diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000000..ef66d13d74 --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,67 @@ +language: en-US +early_access: false +tone_instructions: >- + Prioritize actionable correctness, security, and runtime regressions. Keep + feedback concise. Do not request explanatory code comments; preserve license + headers and compiler-consumed annotations. +reviews: + profile: chill + request_changes_workflow: false + high_level_summary: true + high_level_summary_in_walkthrough: true + poem: false + sequence_diagrams: false + tools: + github-checks: + enabled: false + auto_review: + enabled: true + auto_incremental_review: true + auto_pause_after_reviewed_commits: 0 + drafts: false + pre_merge_checks: + docstrings: + mode: "off" + title: + mode: "off" + description: + mode: "off" + finishing_touches: + docstrings: + enabled: false + unit_tests: + enabled: false + simplify: + enabled: false + autofix: + enabled: false + fix_ci: + enabled: false + resolve_merge_conflict: + enabled: false + path_instructions: + - path: "**/*" + instructions: >- + For cleanup changes, compare executable behavior against the PR merge + base. Check for removed guards, changed return values, weakened compiler + flags, and deleted regression tests. A passing APK build alone does not + establish behavior preservation. Avoid style-only or comment-coverage + requests. + - path: "app/src/main/**" + instructions: >- + Review Android lifecycle, external-display visibility, input cancellation, + permissions, threading, and Compose state. For JNI, native, and Rust + changes, check ABI compatibility, resource ownership, synchronization, + and error paths. Preserve persisted user settings and existing runtime + contracts. + - path: "tools/**" + instructions: >- + Check shell quoting, error handling, path and filesystem semantics, and + Python helper behavior. Preserve MSI same-file protection and strict + compiler checks. Verify downstream patches apply to their pinned sources + and retain intended executable behavior, including embedded scripts. + - path: ".github/workflows/**" + instructions: >- + Check job permissions, triggers, merge validation, build variants, + signing, artifact paths, and release conditions. Verify checks apply to + the current PR head and keep review configuration advisory. diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..3cb68a29e1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +tools/linuxfs/** text=auto eol=lf +tools/mangoapp/** text=auto eol=lf +tools/comet/LICENSE whitespace=-blank-at-eof +tools/comet/droiddeck.patch whitespace=-blank-at-eol,-blank-at-eof + +# These helpers are packaged verbatim and executed inside the Linux runtime. +tools/linuxfs/overlay/** text eol=lf +tools/linuxfs/desktop/** text eol=lf +tools/mangoapp/mangoapp text eol=lf +app/src/main/assets/desktop-removal/*.json text eol=lf +app/src/main/assets/desktop-removal/*.txt text eol=lf +*.pdf binary diff --git a/.github/workflows/build-aaudio-sink.yml b/.github/workflows/build-aaudio-sink.yml index 63133e545f..b6ecd5e042 100644 --- a/.github/workflows/build-aaudio-sink.yml +++ b/.github/workflows/build-aaudio-sink.yml @@ -1,7 +1,5 @@ name: Build AAudio sink module -# A quick check of tools/aaudio-sink on its own; the APK build compiles the same module into the -# audio bundle. Runs on pushes that touch the module. on: push: paths: diff --git a/.github/workflows/build-desktop-kde.yml b/.github/workflows/build-desktop-kde.yml index 9390e1af85..5a9933abc3 100644 --- a/.github/workflows/build-desktop-kde.yml +++ b/.github/workflows/build-desktop-kde.yml @@ -1,13 +1,5 @@ name: Build desktop package (KDE Plasma) -# The desktop the app installs into its Linux runtime on first use: KDE Plasma as SteamOS's desktop -# mode has it, the closure of tools/desktop-kde/seeds.txt over Arch Linux ARM minus what the runtime -# already carries, plus tools/desktop-kde/overlay (tools/desktop-kde/build.sh), every package -# signature-checked. Published as a release in Droid-Deck/DroidDeck-Components with DroidDeck's -# other components; the apk pins it in tools/desktop-kde/release.env (tag, sha256, size). A -# published tag is never rebuilt: the packages are Arch Linux ARM's current ones, so a rebuild -# would not match the pinned sha256. A changed package gets a new tag (desktop-kde-r2, ...) and a -# release.env update. on: push: paths: @@ -72,7 +64,6 @@ jobs: KDE_KWIN_OVERRIDE="$PWD/out/kwin" tools/desktop-kde/build.sh out cp out/kwin/desktop-kde.kwin.txt out/ echo "size $(stat -c %s out/desktop-kde.tar.zst) sha256 $(cat out/desktop-kde.sha256)" - # The package itself too, briefly: enough to try a build on a device before publishing it. - uses: actions/upload-artifact@v4 with: name: desktop-kde diff --git a/.github/workflows/build-fex.yml b/.github/workflows/build-fex.yml new file mode 100644 index 0000000000..8ec3369a1a --- /dev/null +++ b/.github/workflows/build-fex.yml @@ -0,0 +1,49 @@ +name: Build FEX (x86-64 Steam client) + +# Checks tools/fex: the same build DroidDeck-Components' build-fex.yml runs from this repository to publish FEX +# (its single `fex` release and fex.json, which the app follows). Nothing is published from here. + +on: + push: + paths: + - 'tools/fex/**' + - '.github/workflows/build-fex.yml' + workflow_dispatch: + inputs: + thunks: + description: 'Build the host thunks (Vulkan/GL/X11/... to the runtime arm64 libraries)' + required: false + default: 'false' + cxxflags: + description: 'Extra CXXFLAGS for a diagnostic build (e.g. -DDEBUG_STRACE)' + required: false + default: '' + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-24.04-arm + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Build in Arch Linux ARM + # Inputs reach the shell as environment variables, never pasted into the script. + env: + FEX_EXTRA_CXXFLAGS: ${{ inputs.cxxflags }} + FEX_THUNKS: ${{ inputs.thunks == 'true' && '1' || '0' }} + run: | + set -euo pipefail + docker run --rm -e FEX_EXTRA_CXXFLAGS="$FEX_EXTRA_CXXFLAGS" -e FEX_THUNKS="$FEX_THUNKS" -v "$PWD:/work" -w /work menci/archlinuxarm:base-devel bash tools/fex/build-in-arch.sh + sudo chown -R "$(id -u):$(id -g)" . + - uses: actions/upload-artifact@v4 + with: + name: fex + path: | + fex.tzst + fex.tzst.sha256 + fex-needed.txt + fex-files.txt diff --git a/.github/workflows/build-gamescope.yml b/.github/workflows/build-gamescope.yml index 649c01e9fa..0a91fea431 100644 --- a/.github/workflows/build-gamescope.yml +++ b/.github/workflows/build-gamescope.yml @@ -1,9 +1,5 @@ name: Build gamescope (patched) -# The runtime's own gamescope (Arch Linux ARM's 3.16.29 package) rebuilt with the patches under -# tools/gamescope/patches, in an Arch Linux ARM container on an arm64 runner, then published as a -# release asset the apk build fetches (tools/gamescope/release.env names the tag and sha). The -# hosted runtime image is never changed: the apk stages the binary over /usr/local/bin. on: push: paths: @@ -43,6 +39,4 @@ jobs: run: | set -euo pipefail gh release create "${{ inputs.tag }}" --latest=false --prerelease=false --title "${{ inputs.tag }}" --notes "gamescope 3.16.29 with tools/gamescope/patches; staged by the apk over /usr/local/bin/gamescope. sha256 $(cut -d' ' -f1 gamescope.tzst.sha256)" gamescope.tzst gamescope.tzst.sha256 || gh release upload "${{ inputs.tag }}" gamescope.tzst gamescope.tzst.sha256 --clobber - # A component the apk fetches by tag, never something users install: it must not - # become the repo's Latest release or appear as a pre-release, also when re-uploaded. gh release edit "${{ inputs.tag }}" --latest=false --prerelease=false diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62fda2a5e0..5b1af9a2dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,13 +22,11 @@ permissions: pull-requests: write concurrency: - # Replace older builds only for the same PR. Each push/dispatch gets its own group so one main - # build cannot cancel another before it signs and publishes. group: build-${{ github.event.pull_request.number || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: - PRELOAD_CACHE_VERSION: v3 + PRELOAD_CACHE_VERSION: v6 jobs: build: @@ -186,7 +184,7 @@ jobs: 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', '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/linuxfs/debian-image.env') }} + 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/linuxfs/debian-image.env', 'tools/vr/**') }} - name: Build libfakeinput.so and libblsession.so (glibc aarch64) if: steps.preloads.outputs.cache-hit != 'true' @@ -195,7 +193,7 @@ jobs: run: | set -euo pipefail sudo apt-get update -qq - sudo apt-get install -y -qq gcc-aarch64-linux-gnu g++-aarch64-linux-gnu >/dev/null + 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 \ @@ -211,13 +209,14 @@ jobs: 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" - # Force-SSBS adapter, preloaded into a game's Wine only when the game asks for it. 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 @@ -251,14 +250,12 @@ jobs: 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 - # Ours, not the package's: GPU memory without tracefs (tools/mangoapp/libtracefs-shim.c). 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" - # The Windows components installer's tools (tools/msitools/packages.txt). T="$D/usr/local/lib/droiddeck-msitools" mkdir -p "$T" msi-pkgs grep -v '^#' tools/msitools/packages.txt | while read -r sum url; do @@ -270,7 +267,6 @@ jobs: done install -m644 msi-pkgs/usr/bin/msiinfo "$T/msiinfo" install -m644 msi-pkgs/usr/bin/cabextract "$T/cabextract" - # 7-Zip (the full build with its format plugin) opens installer .exe wrappers. 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 @@ -288,10 +284,6 @@ jobs: install -Dm644 tools/linuxfs/desktop/firefox-droiddeck.js "$D/usr/lib/firefox/defaults/pref/droiddeck.js" ls -lR "$D" - # The Debian 11 image the preloads are compiled in comes from a release on this repo - # (published once by ci-debian-image.yml, pinned in tools/linuxfs/debian-image.env): the - # public registry mirrors rate-limit the shared runner addresses and failed builds on a - # busy evening. Only if that download fails is the image pulled, with retries. - name: Fetch the Debian image the preloads build in if: steps.preloads.outputs.cache-hit != 'true' env: @@ -321,9 +313,15 @@ jobs: set -euo pipefail docker run --rm -v "$PWD:/src" -w /src public.ecr.aws/docker/library/debian:bullseye bash -c ' set -euo pipefail - printf "deb http://archive.debian.org/debian bullseye main\ndeb http://archive.debian.org/debian-security bullseye-security main\n" > /etc/apt/sources.list - 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 + 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 @@ -367,9 +365,6 @@ jobs: 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 - # DirectAudio - the game driver (one set per Wine audio interface), the Android-side helper and - # the Steam client's sinks - comes from a pinned release of The412Banner/directaudio, checksummed, - # exactly like gamescope; nothing compiled for audio is kept in this repo. - 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 @@ -407,12 +402,30 @@ jobs: set -euo pipefail bash tools/linuxfs/check-preloads.sh app/src/main/assets/linuxfs - # The store download engines (app/src/main/rust/stores) are Rust, built by Gradle's - # buildRustStores task through cargo-ndk. rustup and cargo are on the runner image; the Android - # target and cargo-ndk are added here. Cache = cargo registry + cargo-ndk + the crate's target - # tree, keyed on the rustc version and Cargo.lock, so a source-only change rebuilds this crate - # on top of the cached dependency objects, and a lockfile change still starts from the - # previous objects (restore-keys). + - 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 -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: | @@ -446,10 +459,17 @@ jobs: path: | app/.cxx app/build/intermediates/cxx - key: cxx-${{ env.NDK_VERSION }}-${{ hashFiles('app/src/main/cpp/**') }} + key: cxx-${{ env.NDK_VERSION }}-${{ hashFiles('app/src/main/cpp/**', 'tools/vr/src/xr_*.h') }} restore-keys: | cxx-${{ env.NDK_VERSION }}- + - 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: Build id: build env: @@ -457,15 +477,13 @@ 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 python3 tools/release/runtime_inputs.py apk app/build/outputs/apk/release/app-release.apk - name: Check the store engines' library - # The exports Kotlin binds must be in the apk's libdroiddeckstores.so, or the stores fail on - # the device with an UnsatisfiedLinkError instead of here. The lockfile check is the - # reproducibility guard: cargo must not have had to re-resolve anything. run: | set -euo pipefail NDK="${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}" @@ -476,11 +494,6 @@ jobs: || { echo "::error::Cargo.lock changed during the build; commit the regenerated lockfile (uploaded as stores-cargo-lock)"; exit 1; } - name: Store engines host unit tests - # The crate's #[test] functions are pure host-side logic (manifest parsing, chunk plans, - # assembly from a cache, hashes), so a plain `cargo test` on the runner's own architecture - # runs them; the Android build above compiles none of them. Informational on this first - # run - the point is to learn whether they pass - and bounded so a hang can never hold - # the apk. Make it blocking once it is known green. timeout-minutes: 10 continue-on-error: true run: | @@ -499,7 +512,24 @@ jobs: run: python3 -m unittest discover -s tools/tests -p 'test_*.py' - name: Unit tests - run: ./gradlew testReleaseUnitTest --console=plain -PndkVersion="$NDK_VERSION" + id: unit-tests + run: | + set -o pipefail + mkdir -p app/build + ./gradlew testReleaseUnitTest --console=plain --info --stacktrace -Drobolectric.logging=stderr -PndkVersion="$NDK_VERSION" 2>&1 | tee app/build/unit-tests.log + + - name: Upload unit test diagnostics + id: unit-test-diagnostics + if: always() && steps.unit-tests.outcome != 'skipped' + uses: actions/upload-artifact@v4 + with: + name: unit-test-results + path: | + app/build/unit-tests.log + app/build/test-results/testReleaseUnitTest/ + app/build/reports/tests/testReleaseUnitTest/ + if-no-files-found: ignore + retention-days: 14 - name: Sign with the testkey (v1 + v2 + v3) run: | @@ -529,6 +559,15 @@ jobs: grep -qi "CN=Android, OU=Android, O=Android" /tmp/sig.txt \ || { echo "::error::apk is not signed with the AOSP testkey"; exit 1; } + - uses: actions/upload-artifact@v4 + id: apk-upload + with: + name: droiddeck-apk + path: app/build/outputs/apk/release/*.apk + if-no-files-found: error + retention-days: 30 + compression-level: 0 + - name: Report on the pull request if: always() && github.event_name == 'pull_request' continue-on-error: true @@ -537,6 +576,9 @@ jobs: PR: ${{ github.event.pull_request.number }} RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} BUILD_OUTCOME: ${{ steps.build.outcome }} + UNIT_TEST_OUTCOME: ${{ steps.unit-tests.outcome }} + 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: | set -uo pipefail @@ -547,8 +589,8 @@ jobs: echo [ -f /tmp/pr-merge.md ] && cat /tmp/pr-merge.md echo - case "$BUILD_OUTCOME" in - success) + 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." @@ -561,7 +603,28 @@ jobs: echo echo "Fallback: [open **PR Release Publish**]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/workflows/pr-release-publish.yml) on \`main\` and enter PR \`$PR\`." ;; - failure) + 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)):" @@ -579,7 +642,7 @@ jobs: echo '```' echo "" ;; - skipped|cancelled) + skipped:*|cancelled:*) echo "### Not built" echo echo "The build did not run (see above, or [the run]($RUN_URL))." @@ -595,14 +658,6 @@ jobs: gh api -X POST "repos/${GITHUB_REPOSITORY}/issues/${PR}/comments" -F body=@/tmp/pr-report.md >/dev/null fi - - uses: actions/upload-artifact@v4 - with: - name: droiddeck-apk - path: app/build/outputs/apk/release/*.apk - if-no-files-found: error - retention-days: 30 - compression-level: 0 - sign: needs: build if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' @@ -615,12 +670,6 @@ jobs: variants: ${{ needs.build.outputs.variants }} secrets: inherit - # Each signed main build as a prerelease of the public Droid-Deck/DroidDeck-CI (main-, the - # last KEEP kept), where anyone can download it without a GitHub account, then a post in the - # Discord's builds channel linking to it. The release is made with a token of the org's - # "DroidDeck CI Publisher" app (installed on DroidDeck-CI only, Contents: write): its ID in the - # DROIDDECK_CI_APP_ID variable, its private key in the DROIDDECK_CI_APP_KEY secret. - # DISCORD_BUILDS_WEBHOOK is the channel's webhook URL. announce: needs: [build, sign] if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' @@ -647,8 +696,6 @@ jobs: owner: Droid-Deck repositories: DroidDeck-CI - # What this build is, for the top of the release notes: the merged PR's title and the first - # paragraph of its description, or the commit's subject for a push made without a PR. - name: Describe the change env: GH_TOKEN: ${{ github.token }} @@ -698,15 +745,12 @@ jobs: 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/* - # Keep the newest main builds by publication time. GitHub App releases can share createdAt. 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 - # Never remove this run's release, even if the API returns an unexpected ordering. if [ "$old" = "$tag" ]; then continue fi - # Another main publish may have removed the same old release concurrently. 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" @@ -722,7 +766,7 @@ jobs: echo "apk=$GITHUB_SERVER_URL/$CI_REPO/releases/download/$tag/$apk" >> "$GITHUB_OUTPUT" echo "Published $url" - - name: Post to Discord + - name: Post the Preview build to Discord env: WEBHOOK: ${{ secrets.DISCORD_BUILDS_WEBHOOK }} GH_TOKEN: ${{ github.token }} @@ -736,8 +780,6 @@ jobs: fi commit=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA") subject=$(jq -r '.commit.message | split("\n")[0]' <<<"$commit") - # A merge commit's subject is "Merge pull request #N from ..."; its body's first line is - # the PR's title, which says more. 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 @@ -746,7 +788,7 @@ jobs: 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 build** `main-%s`\n%s\n%s' "${GITHUB_SHA::7}" "$what" "$get") + 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" diff --git a/.github/workflows/ci-debian-image.yml b/.github/workflows/ci-debian-image.yml index 1635ed4074..a43e6ad7b2 100644 --- a/.github/workflows/ci-debian-image.yml +++ b/.github/workflows/ci-debian-image.yml @@ -1,8 +1,5 @@ name: Publish the CI Debian image -# Pulls the Debian 11 image the x86 preloads build in, once, and publishes it as a release asset -# on this repo so build.yml never depends on a registry mirror's rate limit. Run it again (with a -# new tag) only to refresh the image; tools/linuxfs/debian-image.env names the one builds use. on: workflow_dispatch: @@ -32,7 +29,6 @@ jobs: run: | set -euo pipefail image=public.ecr.aws/docker/library/debian:bullseye - # A published image is pinned by checksum in the build; never replace one by accident. if [ "$REPLACE" != true ] && gh release view "$TAG" -R "$GITHUB_REPOSITORY" --json assets -q '.assets[].name' 2>/dev/null | grep -qx debian-bullseye.tar.zst; then echo "::error::$TAG already carries debian-bullseye.tar.zst; publish to a new tag, or set replace and re-pin tools/linuxfs/debian-image.env" exit 1 diff --git a/.github/workflows/pr-release-cleanup.yml b/.github/workflows/pr-release-cleanup.yml index af4581f45b..edb76a7788 100644 --- a/.github/workflows/pr-release-cleanup.yml +++ b/.github/workflows/pr-release-cleanup.yml @@ -1,9 +1,9 @@ name: PR Release Cleanup -run-name: remove PR #${{ github.event.pull_request.number }}'s test build +run-name: remove PR + + + -# A merged or closed PR's test build leaves DroidDeck-CI, so the app's Updates page stops offering it -# (a merged fix is in the next Preview). pull_request_target for the publisher app's secrets; nothing -# from the PR is checked out or run. on: pull_request_target: types: [ closed ] @@ -32,7 +32,6 @@ jobs: set -euo pipefail state=$(gh api "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER" --jq .state) echo "closed=$([ "$state" = closed ] && echo true || echo false)" >> "$GITHUB_OUTPUT" - # A token of the org's "DroidDeck CI Publisher" app, as build.yml's announce job uses. - uses: actions/create-github-app-token@v2 if: ${{ steps.state.outputs.closed == 'true' }} id: ci-token diff --git a/.github/workflows/pr-release-publish.yml b/.github/workflows/pr-release-publish.yml index 6c5070b270..b55d2a2143 100644 --- a/.github/workflows/pr-release-publish.yml +++ b/.github/workflows/pr-release-publish.yml @@ -11,8 +11,6 @@ on: pull_request_target: types: [labeled] branches: [main] - # A PR from a branch of this repo is signed on its own after each green build: only people who - # can push here can change it. A fork's PR waits for a maintainer's publish-test label. workflow_run: workflows: [Build APK] types: [completed] @@ -53,7 +51,6 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false - # Every variant a main build ships, so a PR build can be tried under any of them. - name: The packages a signed build ships as id: variants run: echo "list=$(awk '!/^#/ && NF { print $1 }' tools/release/variants.txt | jq -R . | jq -sc .)" >> "$GITHUB_OUTPUT" @@ -68,8 +65,6 @@ jobs: run: | set -euo pipefail [[ "$PR_NUMBER" =~ ^[1-9][0-9]*$ ]] || { echo "::error::Invalid PR number '$PR_NUMBER'"; exit 1; } - # The automatic path stands down quietly, never failing: a draft, a PR labelled - # no-test-build, or a build that a later push has already overtaken. skip() { echo "::notice::Not publishing PR #$PR_NUMBER: $1"; echo "skip=true" >> "$GITHUB_OUTPUT"; exit 0; } if [ "$EVENT_NAME" = workflow_run ]; then echo "automatic=true" >> "$GITHUB_OUTPUT" @@ -94,9 +89,6 @@ jobs: head=$(jq -r '.head.sha' <<<"$pr") base=$(jq -r '.base.sha' <<<"$pr") - # The label is often added while the PR's build is still running, or just after a push - # before it has started: wait for the latest build of the head commit to finish (a PR - # build takes about 4 minutes) rather than fail and need the label added again. run_id= for attempt in $(seq 1 60); do latest=$(gh run list -R "$GITHUB_REPOSITORY" --workflow build.yml \ @@ -116,8 +108,6 @@ jobs: sleep 30 done [[ -n "$run_id" ]] || { echo '::error::The PR build did not finish within 30 minutes'; exit 1; } - # GitHub leaves a run's pull_requests empty when its head is in a fork, so the build is - # tied to this PR by its head repository, branch and commit instead. run=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$run_id") jq -e --arg head "$head" --arg repo "$(jq -r .head.repo.full_name <<<"$pr")" --arg ref "$(jq -r .head.ref <<<"$pr")" ' .event == "pull_request" and .head_sha == $head and .conclusion == "success" and @@ -127,8 +117,6 @@ jobs: sdk=${ANDROID_HOME:-${ANDROID_SDK_ROOT:-}} tools=$(find "$sdk/build-tools" -mindepth 1 -maxdepth 1 -type d | sort -V | tail -1) - # A PR build is made from the PR merged onto main, so it must install over main's own - # build. main is what this job checked out; no release has to exist or be marked latest. main_code=$(sed -n 's/^[[:space:]]*versionCode[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' app/build.gradle) [[ "$main_code" =~ ^[0-9]+$ ]] || { echo "::error::No numeric versionCode in main's app/build.gradle"; exit 1; } mkdir -p "$RUNNER_TEMP/pr" @@ -188,8 +176,6 @@ jobs: pattern: droiddeck-pr-signed-* merge-multiple: true path: signed - # What this build is, for the top of the release notes: the PR's title and the first - # paragraph of its description. - name: Describe the change env: GH_TOKEN: ${{ github.token }} @@ -208,7 +194,6 @@ jobs: fi } > notes-head.md cat notes-head.md - # A token of the org's "DroidDeck CI Publisher" app, as build.yml's announce job uses. - uses: actions/create-github-app-token@v2 id: ci-token with: @@ -250,7 +235,6 @@ jobs: echo "first=$first" >> "$GITHUB_OUTPUT" gh release upload "$tag" signed/* -R "$repo" --clobber gh release edit "$tag" -R "$repo" --title "PR #$PR_NUMBER" --notes "$notes" --prerelease - # Drop the previous build's files: anything this build did not just upload. keep=$(cd signed && ls | jq -R . | jq -sc .) gh api "repos/$repo/releases/tags/$tag" | jq -r --argjson keep "$keep" '.assets[] | select(.name as $n | $keep | index($n) | not) | .id' | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f443c7101..b8fe920602 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,7 +63,6 @@ jobs: artifact: droiddeck-release secrets: inherit - # The release is made here, from the apks this run signed, so it traces back to its Build APK run. publish: name: publish the release needs: [find, sign] @@ -94,7 +93,6 @@ jobs: if gh release view "$VERSION" -R "$GITHUB_REPOSITORY" >/dev/null 2>&1; then echo "::error::release $VERSION already exists"; exit 1 fi - # The notes' first line is the title; media paths become raw URLs at this release's tag. title=$(sed -n '1s/^# *//p' "$notes") [ -n "$title" ] || title="DroidDeck $VERSION" raw="https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$VERSION/docs/releases/media/" @@ -110,7 +108,6 @@ jobs: --target "$GITHUB_SHA" --title "$title" --notes-file "$RUNNER_TEMP/body.md" --latest echo "Published [$title]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/tag/$VERSION)" >> "$GITHUB_STEP_SUMMARY" - # A release made with this run's token fires no release event, so the in-app catalog is refreshed here. catalog: needs: publish uses: ./.github/workflows/update-catalog.yml diff --git a/.github/workflows/update-catalog.yml b/.github/workflows/update-catalog.yml index d3a4075b5d..93a74d5f99 100644 --- a/.github/workflows/update-catalog.yml +++ b/.github/workflows/update-catalog.yml @@ -20,7 +20,6 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 5 steps: - # Always use the current trusted generator, even when a release event points at an older tag. - uses: actions/checkout@v4 with: ref: main diff --git a/.gitignore b/.gitignore index a9e068c0d1..e5bdbfffc9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,24 +8,17 @@ captures/ .externalNativeBuild/ .cxx/ .kotlin/ -# Built in CI from tools/linuxfs and app/src/main/cpp/fakeinput.cpp, never committed, so the two -# copies cannot drift. app/src/main/assets/linuxfs/ app/src/main/jniLibs/arm64-v8a/libproot.so app/src/main/jniLibs/arm64-v8a/.proot-inputs app/src/main/jniLibs/arm64-v8a/.proot-outputs app/src/main/jniLibs/arm64-v8a/libproot-loader.so app/src/main/jniLibs/arm64-v8a/libdirectaudiorelay.so -# The store download engines (app/src/main/rust/stores) are cross-compiled by Gradle into -# app/build/rustJniLibs; cargo's own build tree stays next to the crate. Neither is source. app/src/main/rust/stores/target/ app/src/main/assets/droiddeck-esync/ -# Kotlin compiler session files (build-tool state, never source). .kotlin/ -# Signing keys never enter the repo (DroidDeck's lives in GitHub environment secrets; see -# tools/release/make-release-key.sh). keystore/testkey.p12 is the public AOSP testkey. *.jks *.keystore *.p12 @@ -37,6 +30,6 @@ droiddeck-release-key/ password.txt __pycache__/ -# Local signing with the release key (tools/build_local.sh); holds a password. .signing.env app/src/main/assets/directaudio/ +/tools/vr/out/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..c22c5647c0 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,3 @@ +# Rules + +- Comments should be rare, factual, and explain only non-obvious external constraints or business invariants. diff --git a/README.md b/README.md index ceaef7ff73..b1b3bb7f80 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,13 @@ DroidDeck brings the SteamOS experience to Android: Valve's Steam client in Big ## Requirements and install -Use Android 9 or newer on a supported Adreno device (730 or newer, or 8xx). Adreno 6xx is experimental: DirectX 11 uses DXVK 2 and may run, and DirectX 12 games can still crash. Mali, Xclipse, PowerVR, and Adreno 710 are unsupported. No root is required. Allow about 3 GB for the runtime and 1.1 GB more for the desktop and emulators. Install the APK from [Releases](https://github.com/Droid-Deck/DroidDeck/releases), install the Linux runtime, then press **Play** and sign in. Steam downloads on first launch. Install **Desktop & apps** to use the desktop and emulators. The **Store** installs Linux apps and games from Flathub (ARM64 builds) with Flatpak; with additional options to install Appimages and set up scripts. **Stores** (Setup › Stores › "Show Stores in the rail") signs in to GOG, Epic Games and Amazon Games, browses their catalogs and libraries, downloads games into the Games storage and adds each one to the Steam client as a non-Steam game, so it launches through Proton like everything else; the cog on its chip row sets which tab a store opens on and the download speed tier. +Use Android 9 or newer on a supported Adreno device (730 or newer, or 8xx). Adreno 6xx is experimental: DirectX 11 uses DXVK 2 and may run, and DirectX 12 games can still crash. Mali, Xclipse, PowerVR, and Adreno 710 are unsupported. No root is required. Allow about 3 GB for the runtime and 1.1 GB more for the desktop and emulators. Install the APK from [Releases](https://github.com/Droid-Deck/DroidDeck/releases), install the Linux runtime, then press **Play** and sign in. Steam downloads on first launch. Install **Desktop & apps** to use the desktop and emulators. The **Store** installs Linux apps and games from Flathub (ARM64 builds) with Flatpak; with additional options to install Appimages and set up scripts. **Stores** (Setup › Stores › "Show Stores in the rail") signs in to GOG, Epic Games and Amazon Games and downloads games into the Games storage. Epic keeps its direct API install path. Opening Epic Stores prepares Epic’s official Linux launcher preview. When installed, Epic games launched from DroidDeck use that client, and games installed in the client are imported into DroidDeck’s library and shortcuts. The x86-64 client runs through FEX on ARM and DroidDeck retains its Proton hooks; this preview and ARM setup are outside Epic’s listed Linux support. The cog on a store’s chip row sets its opening tab and download speed tier. -Before Steam launches, you must turn off **Restrict child processes** in Developer options. If this option is not available in developer settings (Android 12 and 13 devices), first launch of Steam will present a "Fix it for me" button, which will help automate the setup process. +On Android 14 and newer, before Steam launches, you must turn on **Disable child process restrictions** in Developer options. If this option is not available in developer settings (Android 12 and 13 devices), first launch of Steam will present a "Fix it for me" button, which will help automate the setup process. + +## Smart glasses + +Use **Setup → Smart glasses** for app-wide virtual-screen settings across DroidDeck menus, launchers, desktop sessions, and games. Supported VITURE, RayNeo, and XREAL connections provide 3DoF; Luma Ultra adds optional experimental 6DoF and stereo-assisted hand/Joy-Con tracking. Model support and SDK requirements differ: see the [smart-glasses support matrix](docs/smart-glasses-support.md) for supported devices, controls, setup, and limitations. ## Community @@ -29,6 +33,12 @@ Run `tools/build_local.sh` with Docker, Java 17, the Android SDK/NDK, Rust throu After preparation, ordinary `./gradlew :app:assembleRelease` builds can reuse the verified inputs. If native sources, component pins or staged files change, packaging stops with instructions to rerun the helper. Generated audio stays under `app/build/`; the tracked base bundle is never modified. `./gradlew -PskipRust=true :app:testDebugUnitTest` needs no native preparation. For an APK without store engines, use `DROIDDECK_SKIP_RUST=1 tools/build_local.sh`; it omits cached engine libraries too. +For the prepared Windows checkout, run `./tools/run_windows.ps1` (optionally with `-Serial `), or select **DroidDeck XR** in Android Studio and run the **app** module on the connected phone. Machine-specific options live in the ignored `local.properties`: `droiddeck.python` selects a Python executable, `droiddeck.skipRust=true` omits the optional store download engines, and `droiddeck.debugApplicationIdSuffix=.xr` installs **DroidDeck XR Dev** alongside the signed release. The development app has its own runtime and Steam login. The local Java selection is in `.gradle/config.properties`. + +`python tools/prepare_windows_runtime.py` restores this checkout's audited runtime inputs from the pinned CI APK, three locally rebuilt preload libraries, and the checksum-pinned Gamescope archive in `build/windows-setup/`. Start Docker Desktop's Linux engine first: preparation now rebuilds DroidDeck's ARM64 VR driver and Vulkan layer from current source and runs their native regression tests. The compiler image is built automatically on first use. Vulkan headers come from the NDK beside `--llvm-strip`, or from an explicit `--vk-include ` directory. + +To reuse that build, pass `--rebuilt-vr build/windows-setup/vr`. Preparation verifies its `vr-build.json` against the current Git revision, source files, Vulkan headers, output checksums, and ARM64 architecture; missing or stale builds fail instead of falling back to the donor's VR libraries. The script checks the actual donor CI merge tree, still rejects unrelated unaudited runtime changes, and records component provenance in `app/build/windows-runtime-provenance.json`. Preserve these ignored preparation files when rebuilding locally; `clean` removes the prepared assets and their verification manifest. + Run the helper and preload regression suite with `bash tools/test_local.sh`. On macOS it runs in Linux through Docker, matching the helpers' runtime and CI instead of compiling Linux preloads against macOS headers. ## Limits @@ -37,4 +47,10 @@ 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). 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. 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. 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. mmap ring-buffer controller input was developed by ribbit384 ([WinNative #345](https://github.com/WinNative-Emu/WinNative/pull/345)). See [LICENSE](LICENSE). Steam and Proton belong to Valve Corporation; this project is not affiliated with Valve. + +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). 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 and REDMAGIC are trademarks of their owners; this project is not affiliated with them. + +Joy-Con VR controllers port the arm model of Google's [Google VR SDK for Unity](https://github.com/googlevr/gvr-unity-sdk) (Apache-2.0), adapt the hand skeleton of Valve's [OpenVR](https://github.com/ValveSoftware/openvr) `handskeletonsimulation` sample (BSD-3-Clause), which follows Moshi Turner's hand simulation in [Monado](https://gitlab.freedesktop.org/monado/monado), and use the Index controller offsets from Monado's `vive_poses.c` (BSL-1.0). Joy-Con behaviour was researched in Linux's [hid-nintendo](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-nintendo.c) driver by Daniel J. Ogorchock, [@dekuNukem](https://github.com/dekuNukem)'s [Nintendo_Switch_Reverse_Engineering](https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering), [SDL](https://github.com/libsdl-org/SDL) and the Android Open Source Project, and checked against [ALVR](https://github.com/alvr-org/ALVR), [OpenComposite](https://gitlab.com/znixian/OpenOVR), [PSMoveSteamVRBridge](https://github.com/HipsterSloth/PSMoveSteamVRBridge), [@F8LEFT](https://github.com/F8LEFT)'s [JoyConVr](https://github.com/F8LEFT/JoyConVr), [@krnelpan1c](https://github.com/krnelpan1c)'s [Daydream-Controller-SteamVR](https://github.com/krnelpan1c/Daydream-Controller-SteamVR), [@yoyobuae](https://github.com/yoyobuae)'s [joyconvr](https://github.com/yoyobuae/joyconvr), [Moonlight](https://github.com/moonlight-stream/moonlight-android) and [Dolphin](https://github.com/dolphin-emu/dolphin); see [docs/third-party/joycon](docs/third-party/joycon/README.md). Nintendo Switch and Joy-Con are trademarks of Nintendo; this project is not affiliated with Nintendo. + +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). diff --git a/app/build.gradle b/app/build.gradle index 6752f032bb..4799d4fe46 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,6 +4,32 @@ plugins { apply plugin: 'kotlin-android' apply plugin: 'org.jetbrains.kotlin.plugin.compose' +// Machine-specific tooling and optional CI-prepared inputs stay out of version control. +def localBuildOptions = new Properties() +def localBuildOptionsFile = rootProject.layout.projectDirectory.file('local.properties') +if (localBuildOptionsFile.asFile.exists()) { + localBuildOptions.load(new StringReader(providers.fileContents(localBuildOptionsFile).asText.get())) +} +def pythonExecutable = project.findProperty('pythonExecutable') + ?: localBuildOptions.getProperty('droiddeck.python', 'python3') +def vitureSdkDir = project.hasProperty('vitureSdkDir') ? project.property('vitureSdkDir') : localBuildOptions.getProperty('droiddeck.vitureSdk', '') +def uvcDir = project.hasProperty('uvcDir') ? project.property('uvcDir') : localBuildOptions.getProperty('droiddeck.uvcDir', '') +if (uvcDir) { + ['arm64-v8a/libusb.so', 'arm64-v8a/libuvc.a', 'include/libusb.h', 'include/libuvc/libuvc.h', + 'licenses/libusb-COPYING', 'licenses/libuvc-LICENSE.txt'].each { required -> + if (!new File(uvcDir, required).isFile()) throw new GradleException("Incomplete UVC build: missing ${required}") + } +} +if (vitureSdkDir) { + ['android/arm64-v8a/libglasses.so', 'android/arm64-v8a/libcarina_vio.so', + 'android/arm64-v8a/libcloud_protocol.so', 'include/viture_glasses_provider.h', + 'android/LICENSE', 'android/NOTICE'].each { required -> + if (!new File(vitureSdkDir, required).isFile()) { + throw new GradleException("Incomplete VITURE Android SDK: missing ${required}") + } + } +} + def gitValue = { List arguments -> try { def output = providers.exec { @@ -49,19 +75,12 @@ if (!(treeState in ['clean', 'dirty'])) { buildLabel = "${buildOrigin} ${treeState} · ${buildLabel}" def escapedBuildLabel = buildLabel.replace('\\', '\\\\').replace('"', '\\"') -// What the in-app updater compares against the published builds: the commit this build is of (a PR -// build's head, not the merge CI makes of it), its PR, and whether CI made it at all. def sourceCommit = providers.environmentVariable('DROIDDECK_SOURCE_COMMIT').getOrNull() ?: providers.environmentVariable('GITHUB_SHA').getOrNull() ?: gitValue(['rev-parse', 'HEAD']) ?: '' def prNumber = (providers.environmentVariable('DROIDDECK_PR_NUMBER').getOrNull() ?: '0').with { it.isInteger() ? it : '0' } def ciBuild = providers.environmentVariable('GITHUB_ACTIONS').getOrNull() == 'true' -// The release key's certificate: a build signed with it, from CI or a computer, updates in place. def releaseSigner = rootProject.file('keystore/release-signer.sha256').text.trim() -// When the source was committed, for "built 3 hours ago": fixed per commit, so it costs no rebuilds. def commitTime = (gitValue(['show', '-s', '--format=%ct', 'HEAD']) ?: '0').with { it.isLong() ? it : '0' } -// The desktop package this apk installs (tools/desktop-kde/release.env): published once per tag in -// DroidDeck-Components, pinned here with its checksum like gamescope and the esync packs, so the -// desktop scripts in the apk always get the package they were made for. 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()] } @@ -72,7 +91,6 @@ if (desktopRemovalSources.archives[desktopKde.DESKTOP_KDE_TAG] != desktopKde.DES if (!file('src/main/assets/desktop-removal/versions.txt').readLines().contains(desktopKde.DESKTOP_KDE_TAG)) { throw new GradleException('Regenerate desktop removal inventories for ' + desktopKde.DESKTOP_KDE_TAG) } -// tools/release/variants.txt as "package=suffix;...", so the updater picks the apk of the package it runs as. def variantSuffixes = rootProject.file('tools/release/variants.txt').readLines() .findAll { it.trim() && !it.startsWith('#') } .collect { def f = it.trim().split(/\s+/); "${f[1]}=${f[2] == '-' ? '' : f[2]}" } @@ -81,19 +99,14 @@ def variantSuffixes = rootProject.file('tools/release/variants.txt').readLines() android { namespace 'com.droiddeck.launcher' compileSdk 34 - // The NDK is pinned by property so CI can hand in whatever the runner already has rather than - // downloading a second copy; see gradle.properties. ndkVersion project.findProperty('ndkVersion') ?: '27.3.13750724' defaultConfig { applicationId "com.droiddeck.launcher" minSdkVersion 26 - // 28 is not a leftover. An app on targetSdk 29+ runs in a domain that may not execute a - // file out of its own data directory, and this app's entire job is to exec a rootfs: - // proot, gamescope, the Steam client and everything it launches all live under files/. targetSdkVersion 28 - versionCode 12 - versionName "0.3.2" + versionCode 14 + versionName "0.5.0" buildConfigField "String", "BUILD_LABEL", "\"${escapedBuildLabel}\"" buildConfigField "String", "SOURCE_COMMIT", "\"${sourceCommit}\"" buildConfigField "int", "PR_NUMBER", "${prNumber}" @@ -113,6 +126,8 @@ android { externalNativeBuild { cmake { arguments '-DANDROID_STL=c++_shared' + arguments "-DDROIDDECK_VITURE_SDK_DIR=${vitureSdkDir.toString().replace('\\', '/')}" + arguments "-DDROIDDECK_UVC_DIR=${uvcDir.toString().replace('\\', '/')}" } } } @@ -125,10 +140,6 @@ android { } signingConfigs { - // AOSP testkey (android@android.com), the same key Bannerlator ships with. It is publicly - // known, so it proves nothing about who built the apk - what it buys is ONE stable - // signature: every build installs over the last one instead of asking the user to - // uninstall first. v1 (JAR) + v2 + v3 so every installer and Android version accepts it. testkey { storeFile file("${rootDir}/keystore/testkey.p12") storeType "PKCS12" @@ -145,6 +156,11 @@ android { debug { minifyEnabled false signingConfig signingConfigs.testkey + def localSuffix = localBuildOptions.getProperty('droiddeck.debugApplicationIdSuffix') + if (localSuffix) { + applicationIdSuffix localSuffix + resValue 'string', 'app_name', 'DroidDeck XR Dev' + } } release { minifyEnabled false @@ -153,38 +169,32 @@ android { } lint { - // targetSdk 28 is deliberate and structural: an app on 29+ may not execute a file out of - // its own data directory, and executing a rootfs is the whole of what this app does. Lint - // fails a release build over it because Google Play will not accept an sdk that old - - // true, and not something this app can trade away. Every other check stays on. disable 'ExpiredTargetSdkVersion' } packagingOptions { resources { - // Kadb's Bouncy Castle artifacts repeat the same multi-release JAR manifest. excludes += ['META-INF/versions/9/OSGI-INF/MANIFEST.MF'] } jniLibs { - // The PulseAudio daemon is executed from the native library directory and its - // libraries are read out of the apk by the class loader: both want the old, - // uncompressed-and-extracted layout. useLegacyPackaging = true - // Prefer the PTY helper built by this app's NDK target over Termux's prebuilt copy. pickFirsts += ['**/libtermux.so'] } } buildFeatures { + prefab true compose true buildConfig true } testOptions { - // Plain JVM tests: a stray android.util.Log call returns a default instead of throwing. unitTests.returnDefaultValues = true - // Robolectric tests start activities whose text is now all string resources. unitTests.includeAndroidResources = true + unitTests.all { + def logTarget = providers.systemProperty('robolectric.logging').orNull + if (logTarget != null) systemProperty 'robolectric.logging', logTarget + } } compileOptions { @@ -196,8 +206,16 @@ android { } } -// Session scripts must follow this checkout even when the native asset bundle is cached. -// A stale local bundle can omit a newly required helper on a fresh runtime install. +// Vendor binaries remain in the user's SDK directory; never vendor them into Git. +if (vitureSdkDir) { + android.sourceSets.main.jniLibs.srcDir(new File(vitureSdkDir, 'android')) + def stageVitureNotices = tasks.register('stageVitureNotices', Copy) { + from(new File(vitureSdkDir, 'android')) { include 'LICENSE', 'NOTICE' } + into(layout.buildDirectory.dir('vitureAssets/licenses/viture')) + } + tasks.named('preBuild').configure { dependsOn(stageVitureNotices) } +} + def stageSessionScripts = tasks.register('stageSessionScripts', Copy) { from(rootProject.file('tools/linuxfs/overlay')) { include 'usr/local/bin/droiddeck-*', 'usr/local/bin/steam-compatibility', 'usr/bin/**' @@ -206,8 +224,6 @@ def stageSessionScripts = tasks.register('stageSessionScripts', Copy) { } tasks.named('preBuild').configure { dependsOn(stageSessionScripts) } -// Prepared audio lives under build/, so native builds never rewrite the tracked base bundle. -// Copying into one asset root also prevents an old base bundle winning a duplicate asset merge. def runtimeAssetsDir = layout.buildDirectory.dir('runtimeAssets') def stageRuntimeAssets = tasks.register('stageRuntimeAssets', Sync) { dependsOn(stageSessionScripts) @@ -216,33 +232,30 @@ def stageRuntimeAssets = tasks.register('stageRuntimeAssets', Sync) { into(runtimeAssetsDir) } android.sourceSets.main.assets.setSrcDirs([runtimeAssetsDir]) +if (vitureSdkDir) android.sourceSets.main.assets.srcDir(layout.buildDirectory.dir('vitureAssets')) +if (uvcDir) { + def stageUvcNotices = tasks.register('stageUvcNotices', Copy) { + from(new File(uvcDir, 'licenses')) + into(layout.buildDirectory.dir('uvcAssets/licenses/uvc')) + } + tasks.named('preBuild').configure { dependsOn(stageUvcNotices) } + android.sourceSets.main.assets.srcDir(layout.buildDirectory.dir('uvcAssets')) +} tasks.named('preBuild').configure { dependsOn(stageRuntimeAssets) } -// Unit tests and previews remain usable without Docker. Packaging an APK requires the complete -// runtime payload prepared by the local helper or CI, with matching sources and output hashes. def verifyRuntimeInputs = tasks.register('verifyRuntimeInputs', Exec) { - // The session scripts are re-copied into the asset tree by stageSessionScripts; with parallel - // task execution this check once hashed a file mid-copy and failed a main build. Hash only - // once the staging has finished. mustRunAfter(stageSessionScripts, stageRuntimeAssets) workingDir rootProject.projectDir - commandLine 'python3', 'tools/release/runtime_inputs.py', 'verify' + commandLine pythonExecutable, 'tools/release/runtime_inputs.py', 'verify' } tasks.configureEach { task -> if (task.name in ['packageDebug', 'packageRelease']) task.dependsOn(verifyRuntimeInputs) } -// The GOG / Epic / Amazon download engines are Rust (app/src/main/rust/stores, ported from -// Bannerlator's bl-steam-client crate). cargo-ndk cross-compiles them for arm64-v8a into the build -// directory, which is one more jniLibs source below: nothing compiled is committed, the same rule -// the preloads, proot and the DirectAudio relay follow. cargo-ndk exports the NDK clang/llvm-ar as -// the C compiler for the one C-compiling crate (ring, under rustls) - the step Bannerlator's CI -// does by hand - and reads the NDK from ANDROID_NDK_HOME, which is set to the NDK this build pins. -// -PskipRust=true builds without the library, for a checkout with no Rust toolchain: the stores -// then report themselves unavailable instead of the build failing. def rustCrateDir = layout.projectDirectory.dir('src/main/rust/stores') def rustJniLibsDir = layout.buildDirectory.dir('rustJniLibs') -def skipRust = (project.findProperty('skipRust') ?: 'false').toString().toBoolean() +def skipRust = (project.findProperty('skipRust') + ?: localBuildOptions.getProperty('droiddeck.skipRust', 'false')).toString().toBoolean() def buildRustStores = tasks.register('buildRustStores', Exec) { description = 'Cross-compiles the store download engines (libdroiddeckstores.so) with cargo-ndk.' onlyIf { !skipRust } @@ -255,9 +268,6 @@ def buildRustStores = tasks.register('buildRustStores', Exec) { }.standardOutput.asText) outputs.dir(rustJniLibsDir) workingDir rustCrateDir - // The configuration cache serialises the task, so everything it needs is resolved here, not - // in doFirst. ~/.cargo/bin is where rustup puts cargo and cargo-ndk; an IDE-launched Gradle - // does not always have it on PATH. def cargoBin = "${System.getProperty('user.home')}/.cargo/bin" environment 'PATH', "${cargoBin}${File.pathSeparator}${System.getenv('PATH')}" environment 'ANDROID_NDK_HOME', android.ndkDirectory.absolutePath @@ -265,41 +275,53 @@ def buildRustStores = tasks.register('buildRustStores', Exec) { if (!skipRust) environment 'RUSTC', providers.exec { commandLine 'rustup', 'which', '--toolchain', 'stable', 'rustc' }.standardOutput.asText.get().trim() - // --platform 26 = minSdkVersion: the engines link against the API 26 libc, like the C++ code. - // Homebrew's cargo/rustc can precede rustup on macOS and use a different sysroot, despite - // rustup reporting the Android target installed. Run both through the selected toolchain. commandLine 'rustup', 'run', 'stable', 'cargo', 'ndk', '--target', 'arm64-v8a', '--platform', '26', '--output-dir', rustJniLibsDir.get().asFile.absolutePath, 'build', '--release', '--locked' } -// Skipping Rust must omit its library even if another build left a cached .so behind. if (!skipRust) android.sourceSets.main.jniLibs.srcDir(rustJniLibsDir) tasks.named('preBuild').configure { dependsOn(buildRustStores) } +def verifyHandModel = tasks.register('verifyHandModel') { + def models = ['hand_landmarker.task': 'fbc2a30080c3c557093b5ddfc334698132eb341044ccee322ccf8bcf3607cde1', + 'hand_landmarker_lite.task': '173c0f47ecee7e935bd4a1e93aa580756b4180c1307c07d709313e82c28672c8'] + .collectEntries { name, hash -> [(file("src/main/assets/models/$name")): hash] } + inputs.files(models.keySet()) + doLast { + models.each { model, expected -> + def actual = java.security.MessageDigest.getInstance('SHA-256').digest(model.bytes).encodeHex().toString() + if (actual != expected) throw new GradleException("Hand Landmarker model checksum mismatch: ${model.name}") + } + } +} +tasks.named('preBuild').configure { dependsOn(verifyHandModel) } + dependencies { - // The runtime tarball is a zstd-compressed tar. - implementation 'com.github.luben:zstd-jni:1.5.2-3@aar' + implementation 'org.opencv:opencv:4.13.0' + implementation 'org.khronos.openxr:openxr_loader_for_android:1.1.49' + implementation 'com.github.luben:zstd-jni:1.5.7-4@aar' implementation 'org.apache.commons:commons-compress:1.27.1' - // Bannerlator's Windows components come as .tar.xz (WinComponents). implementation 'org.tukaani:xz:1.10' - // The UI: every menu, dialog and overlay is Compose. The session's SurfaceView and the - // on-screen pad are Views underneath it, which is what they are in every Compose app. implementation platform('androidx.compose:compose-bom:2024.02.00') implementation 'androidx.compose.ui:ui' implementation 'androidx.compose.material3:material3' + implementation 'androidx.compose.ui:ui-tooling-preview' + debugImplementation 'androidx.compose.ui:ui-tooling' implementation 'androidx.activity:activity-compose:1.8.2' - // The File Manager, Bannerlator's: its icon set, image thumbnails and the coroutines it - // copies on. Same versions as Bannerlator so the screen stays a straight copy. implementation 'androidx.compose.material:material-icons-extended' implementation 'io.coil-kt:coil-compose:2.6.0' implementation 'com.caverock:androidsvg-aar:1.4' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' - // ADB-over-Wi-Fi pairing and authenticated shell client. Users still approve pairing from - // Android's Wireless debugging screen; DroidDeck only runs its one fixed setting command. implementation 'com.flyfishxu:kadb-android:1.2.1' - // Android terminal view/emulator used by the in-session secondary-display Linux shell. implementation 'com.termux.termux-app:terminal-view:0.118.0' + implementation 'androidx.camera:camera-camera2:1.4.2' + implementation 'androidx.camera:camera-lifecycle:1.4.2' + implementation('com.google.mediapipe:tasks-vision:1.0.0') { + exclude group: 'com.google.auto.value', module: 'auto-value' + } testImplementation 'junit:junit:4.13.2' testImplementation 'org.robolectric:robolectric:4.16.1' + testImplementation 'androidx.compose.ui:ui-test-junit4' + testRuntimeOnly 'com.github.luben:zstd-jni:1.5.7-4@jar' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d833ca2ae8..81b3adcf4f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,45 +1,38 @@ - + - + - - - - - - - + + + + + - + + + + + + + + + + + android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|density|keyboard|keyboardHidden|navigation"> + + @@ -79,13 +84,10 @@ + - - - - + + + + - - - - + + + + diff --git a/app/src/main/assets/calibration/luma-ultra-640x480.json b/app/src/main/assets/calibration/luma-ultra-640x480.json new file mode 100644 index 0000000000..8136cdeebb --- /dev/null +++ b/app/src/main/assets/calibration/luma-ultra-640x480.json @@ -0,0 +1,102 @@ +{ + "version": 1, + "identity": "luma-ultra-base-v1", + "width": 640, + "height": 480, + "fisheye": false, + "error": 1.1209395390660726, + "verified": false, + "k1": { + "rows": 3, + "cols": 3, + "data": [ + 226.0499636040297, + 0, + 321.62348950766386, + 0, + 228.36987999988767, + 242.2674105020684, + 0, + 0, + 1 + ] + }, + "d1": { + "rows": 5, + "cols": 1, + "data": [ + -0.28622915867944043, + 0.1194613930041054, + 0.007984341063494766, + -0.0008220922923559441, + -0.025579805296512992 + ] + }, + "k2": { + "rows": 3, + "cols": 3, + "data": [ + 240.3338202496282, + 0, + 320.8790079027563, + 0, + 241.14047924325277, + 260.45566640784716, + 0, + 0, + 1 + ] + }, + "d2": { + "rows": 5, + "cols": 1, + "data": [ + -0.27073208928390136, + 0.08065508519805098, + -0.001460778493930769, + -0.0003694718992635806, + -0.011452505620454932 + ] + }, + "r": { + "rows": 3, + "cols": 3, + "data": [ + 0.900501479835182, + 0.04473903344740378, + -0.43254537762047496, + -0.08255720039597626, + 0.9941919046988283, + -0.06904176485356042, + 0.4269442510181227, + 0.0978819468416306, + 0.8989648107712929 + ] + }, + "t": { + "rows": 3, + "cols": 1, + "data": [ + -0.14117171913441395, + 0.0014051874404824838, + -0.007555740272006347 + ] + }, + "cameraToHead": [ + -0.05607918, + 0.023585627, + -0.07998472, + 0.01024512, + 0.9945703, + 0.005859665, + -0.10339546 + ], + "deviceModel": "VITURE Luma Ultra", + "cameraPair": "left0-right0", + "sourceValidation": { + "exportDate": "2026-10-16", + "sourceDeviceVerified": true, + "capturedViews": 25, + "scope": "Starting geometry from one calibrated Luma Ultra; other units have not been individually validated." + } +} diff --git a/app/src/main/assets/handtracking/hand_landmarker.task b/app/src/main/assets/handtracking/hand_landmarker.task new file mode 100644 index 0000000000..0d53faf378 Binary files /dev/null and b/app/src/main/assets/handtracking/hand_landmarker.task differ diff --git a/app/src/main/assets/handtracking/pose_landmarker_lite.task b/app/src/main/assets/handtracking/pose_landmarker_lite.task new file mode 100644 index 0000000000..09576a9301 Binary files /dev/null and b/app/src/main/assets/handtracking/pose_landmarker_lite.task differ diff --git a/app/src/main/assets/models/hand_landmarker.provenance.json b/app/src/main/assets/models/hand_landmarker.provenance.json new file mode 100644 index 0000000000..d9dd876645 --- /dev/null +++ b/app/src/main/assets/models/hand_landmarker.provenance.json @@ -0,0 +1,9 @@ +{ + "url": "https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task", + "sha256": "fbc2a30080c3c557093b5ddfc334698132eb341044ccee322ccf8bcf3607cde1", + "bytes": 7819105, + "mediapipe": "com.google.mediapipe:tasks-vision:1.0.0", + "opencv": "org.opencv:opencv:4.13.0", + "documentation": "https://ai.google.dev/edge/mediapipe/solutions/vision/hand_landmarker", + "runtime": "Two video-mode instances; CPU default; GPU requires separate performance acceptance" +} diff --git a/app/src/main/assets/models/hand_landmarker.task b/app/src/main/assets/models/hand_landmarker.task new file mode 100644 index 0000000000..0d53faf378 Binary files /dev/null and b/app/src/main/assets/models/hand_landmarker.task differ diff --git a/app/src/main/assets/models/hand_landmarker_lite.provenance.json b/app/src/main/assets/models/hand_landmarker_lite.provenance.json new file mode 100644 index 0000000000..29bebf8d73 --- /dev/null +++ b/app/src/main/assets/models/hand_landmarker_lite.provenance.json @@ -0,0 +1,12 @@ +{ + "sha256": "173c0f47ecee7e935bd4a1e93aa580756b4180c1307c07d709313e82c28672c8", + "composition": "Lite palm detector and lite hand landmarks with matching Tasks tensor metadata and associated files from the full bundle", + "palm_source": "https://storage.googleapis.com/mediapipe-assets/palm_detection_lite.tflite", + "palm_source_sha256": "e9a4aaddf90dda56a87235303cf00e4c2d3fb28725f68fd88772997dac905c18", + "landmark_source": "https://storage.googleapis.com/mediapipe-assets/hand_landmark_lite.tflite", + "landmark_source_sha256": "d7fde8ac11f8ce03f8663775bfc323f4fc9f2a38062b4f4efa142874ef5b2a48", + "metadata_source": "hand_landmarker.task", + "metadata_source_sha256": "fbc2a30080c3c557093b5ddfc334698132eb341044ccee322ccf8bcf3607cde1", + "builder": "tools/build_hand_lite.py; mediapipe==0.10.21; deterministic ZIP_STORED bundle and embedded associated-file archives", + "runtime": "com.google.mediapipe:tasks-vision:1.0.0; CPU by default; experimental stereo hand and wrist tracking" +} diff --git a/app/src/main/assets/models/hand_landmarker_lite.task b/app/src/main/assets/models/hand_landmarker_lite.task new file mode 100644 index 0000000000..4c0ab68b42 Binary files /dev/null and b/app/src/main/assets/models/hand_landmarker_lite.task differ diff --git a/app/src/main/assets/steam-startup/droiddeck-startup-60.webm b/app/src/main/assets/steam-startup/droiddeck-startup-60.webm new file mode 100644 index 0000000000..3ecf0b37c3 Binary files /dev/null and b/app/src/main/assets/steam-startup/droiddeck-startup-60.webm differ diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt index cc765a2050..01a0a97a2b 100644 --- a/app/src/main/cpp/CMakeLists.txt +++ b/app/src/main/cpp/CMakeLists.txt @@ -1,27 +1,16 @@ -# The app's native side: the Wayland compositor the session presents into, the adrenotools loader -# it opens Turnip with, and one small library for the fake-input ring's memory fence. cmake_minimum_required(VERSION 3.22.1) project(droiddeck C CXX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wno-unused-function -Wimplicit-function-declaration") -# Every library the app builds is linked with 16 KB-aligned LOAD segments. A 16 KB-page kernel -# (Android 15+ devices) refuses to load a 4 KB-only ELF; a 4 KB kernel loads a 16 KB-aligned one -# unchanged (the alignment is a multiple of its page), so this costs nothing on today's devices -# but a little padding in the file. Prebuilt libraries under jniLibs/ carry their own alignment. set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,max-page-size=16384") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,max-page-size=16384") add_subdirectory(adrenotools) -# DXVK's DXBC->SPIR-V translator (zlib licence), vendored under thirdparty/dxbc from the same -# subset upstream lsfg-vk uses. Native LSFG frame generation needs it: the Lossless Scaling -# shader chain is DXBC in every build downloadable from Steam. +# DXVK's DXBC->SPIR-V translator is zlib licensed (vendored under thirdparty/dxbc). add_subdirectory(thirdparty/dxbc) -# The Win-FG chain self-identifies by two halves: the upstream tag it was copied from (hand-set, -# UPDATE IT when re-copying) and a hash over the sources themselves, computed here, which cannot -# rot. The compositor's frame-generation leg (waylandcomp/CMakeLists.txt) stamps both in. set(WINFG_UPSTREAM "v0.3.0") set(WINFG_CHAIN_SRC framegen/winfg/framegen.cpp @@ -41,14 +30,32 @@ string(SUBSTRING "${WINFG_CHAIN_HASH_FULL}" 0 12 WINFG_CHAIN_HASH) message(STATUS "win-fg chain: ${WINFG_UPSTREAM} (src ${WINFG_CHAIN_HASH})") add_subdirectory(waylandcomp) +add_subdirectory(questxr) add_library(sdnative SHARED sdnative/sdnative.c) target_link_libraries(sdnative log) -# The device info window's Vulkan section: the phone's own driver, asked once through the system -# loader (opened with dlopen, so a phone without Vulkan still loads the app). add_library(deviceinfo SHARED deviceinfo/vkinfo.c) target_link_libraries(deviceinfo dl) -# Rebuild Termux terminal-emulator's PTY JNI helper with the app's NDK instead of carrying its -# prebuilt libtermux.so with a redundant libstdc++.so dependency. add_library(termux SHARED termux/termux.c) + +# The optional proprietary SDK is supplied locally; its headers/libraries are not vendored. +if(DROIDDECK_VITURE_SDK_DIR) + add_library(droiddeck_viture SHARED viture/sdk_bridge.cpp) + target_compile_features(droiddeck_viture PRIVATE cxx_std_17) + target_include_directories(droiddeck_viture PRIVATE "${DROIDDECK_VITURE_SDK_DIR}/include") + target_link_directories(droiddeck_viture PRIVATE "${DROIDDECK_VITURE_SDK_DIR}/android/${ANDROID_ABI}") + target_link_libraries(droiddeck_viture PRIVATE glasses log) +endif() + +if(DROIDDECK_UVC_DIR) + add_library(rgb_usb SHARED IMPORTED) + set_target_properties(rgb_usb PROPERTIES IMPORTED_LOCATION "${DROIDDECK_UVC_DIR}/${ANDROID_ABI}/libusb.so") + add_library(rgb_uvc STATIC IMPORTED) + set_target_properties(rgb_uvc PROPERTIES IMPORTED_LOCATION "${DROIDDECK_UVC_DIR}/${ANDROID_ABI}/libuvc.a") + add_library(droiddeck_uvc SHARED viture/uvc_bridge.cpp) + target_compile_features(droiddeck_uvc PRIVATE cxx_std_17) + target_include_directories(droiddeck_uvc PRIVATE "${DROIDDECK_UVC_DIR}/include") + target_link_libraries(droiddeck_uvc PRIVATE rgb_uvc rgb_usb log) + target_link_options(droiddeck_uvc PRIVATE -Wl,-z,max-page-size=16384) +endif() diff --git a/app/src/main/cpp/adrenotools/build_asm.sh b/app/src/main/cpp/adrenotools/build_asm.sh index b53d25c1ba..6f90a46a00 100755 --- a/app/src/main/cpp/adrenotools/build_asm.sh +++ b/app/src/main/cpp/adrenotools/build_asm.sh @@ -3,7 +3,6 @@ aarch64-linux-gnu-gcc -c src/bcenabler_patch.s -o /tmp/patch.o aarch64-linux-gnu-objcopy -O binary -j .text /tmp/patch.o /tmp/patch.bin -# Must be smaller than a single page bin2c -o gen/bcenabler_patch.h -n PatchRawData /tmp/patch.bin rm /tmp/patch.o diff --git a/app/src/main/cpp/adrenotools/gen/bcenabler_patch.h b/app/src/main/cpp/adrenotools/gen/bcenabler_patch.h index 3909a25ca1..c68424524e 100644 --- a/app/src/main/cpp/adrenotools/gen/bcenabler_patch.h +++ b/app/src/main/cpp/adrenotools/gen/bcenabler_patch.h @@ -1,6 +1,4 @@ -/* Generated by bin2c, do not edit manually */ -/* Contents of file /tmp/patch.bin */ const long int PatchRawData_size = 264; const unsigned char PatchRawData[264] = { 0x1F, 0x0C, 0x02, 0x71, 0x61, 0x00, 0x00, 0x54, 0xE0, 0x08, 0x80, 0x52, 0x3E, 0x00, 0x00, 0x14, diff --git a/app/src/main/cpp/adrenotools/include/adrenotools/bcenabler.h b/app/src/main/cpp/adrenotools/include/adrenotools/bcenabler.h index 3d3a76e7d5..5f97f11c10 100644 --- a/app/src/main/cpp/adrenotools/include/adrenotools/bcenabler.h +++ b/app/src/main/cpp/adrenotools/include/adrenotools/bcenabler.h @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #pragma once #ifdef __cplusplus @@ -11,29 +12,14 @@ extern "C" { #include -/** - * @brief Describes the level of BCeNabler support for a driver - */ enum adrenotools_bcn_type { - ADRENOTOOLS_BCN_INCOMPATIBLE, //!< Driver isn't supported by BCeNabler - ADRENOTOOLS_BCN_BLOB, //!< Driver already supports BCn textures so BCeNabler isn't necessary - ADRENOTOOLS_BCN_PATCH //!< Driver can be patched with BCeNabler to support BCn textures + ADRENOTOOLS_BCN_INCOMPATIBLE, + ADRENOTOOLS_BCN_BLOB, + ADRENOTOOLS_BCN_PATCH }; -/** - * @brief Checks the status of BCn support in the supplied driver - * @param major The major part of VkPhysicalDeviceProperties::driverVersion - * @param minor The minor part of VkPhysicalDeviceProperties::driverVersion - * @param vendorId VkPhysicalDeviceProperties::vendorId - */ enum adrenotools_bcn_type adrenotools_get_bcn_type(uint32_t major, uint32_t minor, uint32_t vendorId); -/** - * @brief Patches the Adreno graphics driver to enable support for BCn compressed formats - * @note adrenotools_get_bcn_type MUST be checked to equal ADRENOTOOLS_BCN_PATCH before calling this - * @param vkGetPhysicalDeviceFormatPropertiesFn A pointer to vkGetPhysicalDeviceFormatProperties obtained through vkGetInstanceProcAddr. This is used to find the correct function to patch - * @return If the patching succeeded, if false the driver will be in an undefined state - */ bool adrenotools_patch_bcn(void *vkGetPhysicalDeviceFormatPropertiesFn); #ifdef __cplusplus diff --git a/app/src/main/cpp/adrenotools/include/adrenotools/driver.h b/app/src/main/cpp/adrenotools/include/adrenotools/driver.h index f81e8fe34d..a81f98593f 100644 --- a/app/src/main/cpp/adrenotools/include/adrenotools/driver.h +++ b/app/src/main/cpp/adrenotools/include/adrenotools/driver.h @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #pragma once #ifdef __cplusplus @@ -10,60 +11,16 @@ extern "C" { #include #include "priv.h" -/** - * @brief Opens a new libvulkan.so instance according to `flags` - * @remark IMPORTANT: The app MUST be packaged w/ useLegacyPackaging = true. The reason for this is - * that we install the hook in hookLibDir; but this folder won't be set correctly when useLegacyPackaging == false - * because Android expects to read the *.so directly from the apk (instead of decompressing them into nativeLibraryDir). - * @param dlopenMode The dlopen mode to use when opening libvulkan - * @param featureFlags Which adrenotools driver features to enable - * @param tmpLibDir A writable directory to hold patched libraries, only used on api < 29 due to the lack of memfd support. If nullptr is passed and the API version is < 29 memfd usage will be attempted and if unsupported nullptr will be returned - * @param hookLibDir The directory holding the built hooks. - * IMPORTANT: This path MUST point to whatever `getApplicationInfo().nativeLibraryDir` (Kotlin code) returns. - * Failing to do so will result in this function returning a valid ptr but then the hook will fail and either the original driver is loaded as fallback, or vkEnumeratePhysicalDevices returns 0 devices. - * @param customDriverDir The directory to load a custom GPU driver named according to `customDriverName` from. Only used if ADRENOTOOLS_DRIVER_CUSTOM is set in `featureFlags`. - * IMPORTANT: This path MUST NOT be on sdcard/storage. i.e. use ANativeActivity::internalDataPath and often looks like "/data/user/0/com.example.app/files/". - * Otherwise you will get permission denied because dlopen() can't be done on *.so libraries that any random user or application can manipulate (which would be a security risk). - * @param customDriverName The soname of the custom driver to load. Only used if ADRENOTOOLS_DRIVER_CUSTOM is set in `featureFlags` - * @param fileRedirectDir The directory which to redirect all file accesses performed by the driver to. Only used if ADRENOTOOLS_DRIVER_FILE_REDIRECT is set in `featureFlags` - * @param userMappingHandle A pointer to a void* which will be set to the mapping handle if ADRENOTOOLS_DRIVER_GPU_MAPPING_IMPORT is set in `featureFlags` - */ void *adrenotools_open_libvulkan(int dlopenMode, int featureFlags, const char *tmpLibDir, const char *hookLibDir, const char *customDriverDir, const char *customDriverName, const char *fileRedirectDir, void **userMappingHandle); -/** - * @brief Imports the given CPU mapped memory range into the GSL allocator. This should then be followed by a call to vkAllocateMemory with a matching size which will return a VkDeviceMemory view over the input region - * @param handle Mapping handle that was returned by adrenotools_open_libvulkan - * @param hostPtr The host pointer to import - * @param size The size of the region to import - * @return True on success - */ bool adrenotools_import_user_mem(void *handle, void *hostPtr, uint64_t size); -/** - * @brief Maps GPU memory and imports it into the GSL allocator. This should then be followed by a call to adrenotools_mem_cpu_map to map the memory on the CPU, then finally vkAllocateMemory with a matching size - * @param handle Mapping handle that was returned by adrenotools_open_libvulkan - * @param size Pointer to a variable containing the size of the region to import, will be updated to contain the required size of the region to allocate CPU side - * @return true on success - */ bool adrenotools_mem_gpu_allocate(void *handle, uint64_t *size); -/** - * @brief Maps the last mapping allocated using adrenotools_mem_gpu_allocate into the given host memory region, such that vkAllocateMemory can then be called - * @param handle Mapping handle that was returned by adrenotools_open_libvulkan - * @param hostPtr A pointer to where the mapping should be mapped - * @param size The size of the mapping. MUST be equal to the size returned by adrenotools_mem_gpu_allocate - */ bool adrenotools_mem_cpu_map(void *handle, void *hostPtr, uint64_t size); -/** - * @note This function should be called after adrenotools_open_libvulkan and Vulkan driver init to check if the mapping import hook loaded successfully - * @return True if the mapping was successfully imported (or initialization succeeded) - */ bool adrenotools_validate_gpu_mapping(void *handle); -/** - * @brief Provides a way to force the GPU to run at the maximum possible clocks (thermal constraints will still be applied) - */ void adrenotools_set_turbo(bool turbo); #ifdef __cplusplus diff --git a/app/src/main/cpp/adrenotools/include/adrenotools/priv.h b/app/src/main/cpp/adrenotools/include/adrenotools/priv.h index 742d24f247..77135d2c9e 100644 --- a/app/src/main/cpp/adrenotools/include/adrenotools/priv.h +++ b/app/src/main/cpp/adrenotools/include/adrenotools/priv.h @@ -1,13 +1,11 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #pragma once #include -/** - * @brief Bitfield enum of additional driver features that can be used with adrenotools_open_libvulkan - */ enum { ADRENOTOOLS_DRIVER_CUSTOM = 1 << 0, ADRENOTOOLS_DRIVER_FILE_REDIRECT = 1 << 1, @@ -16,12 +14,9 @@ enum { #define ADRENOTOOLS_GPU_MAPPING_SUCCEEDED_MAGIC 0xDEADBEEF -/** - * @brief A replacement GPU memory mapping for use with ADRENOTOOLS_DRIVER_GPU_MAPPING_IMPORT - */ struct adrenotools_gpu_mapping { void *host_ptr; - uint64_t gpu_addr; //!< The GPU address of the mapping to import, if mapping import/init succeeds this will be set to ADRENOTOOLS_GPU_MAPPING_SUCCEEDED_MAGIC + uint64_t gpu_addr; uint64_t size; uint64_t flags; }; \ No newline at end of file diff --git a/app/src/main/cpp/adrenotools/lib/linkernsbypass/android_linker_ns.cpp b/app/src/main/cpp/adrenotools/lib/linkernsbypass/android_linker_ns.cpp index 3bd58992c2..8220824eb1 100644 --- a/app/src/main/cpp/adrenotools/lib/linkernsbypass/android_linker_ns.cpp +++ b/app/src/main/cpp/adrenotools/lib/linkernsbypass/android_linker_ns.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #include #include #include @@ -21,7 +22,6 @@ static loader_android_create_namespace_t loader_android_create_namespace; static bool lib_loaded; -/* Public API */ bool linkernsbypass_load_status() { return lib_loaded; } @@ -55,8 +55,6 @@ android_link_namespaces_all_libs_t android_link_namespaces_all_libs; android_link_namespaces_t android_link_namespaces; bool linkernsbypass_link_namespace_to_default_all_libs(android_namespace_t *to) { - // Creating a shared namespace with the default parent will give a copy of the default namespace that we can actually access - // This is needed since there is no way to access a direct handle to the default namespace as it's not exported static auto defaultNs{android_create_namespace_escape("default_copy", nullptr, nullptr, ANDROID_NAMESPACE_TYPE_SHARED, nullptr, nullptr)}; return android_link_namespaces_all_libs(to, defaultNs); } @@ -81,7 +79,6 @@ void *linkernsbypass_namespace_dlopen(const char *filename, int flags, android_n void *linkernsbypass_namespace_dlopen_unique(const char *libPath, const char *libTargetDir, int flags, android_namespace_t *ns) { static std::array PathBuf{}; - // Used as a unique ID for overwriting soname and creating target lib files static uint16_t TargetId{}; int libTargetFd{[&] () { @@ -89,7 +86,6 @@ void *linkernsbypass_namespace_dlopen_unique(const char *libPath, const char *li snprintf(PathBuf.data(), PathBuf.size(), "%s/%d_patched.so", libTargetDir, TargetId); return open(PathBuf.data(), O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); } else { - // If memfd isn't supported errno will contain ENOSYS after calling errno = 0; int fd{static_cast(syscall(__NR_memfd_create, libPath, 0))}; if (errno == ENOSYS || fd < 0) @@ -101,21 +97,18 @@ void *linkernsbypass_namespace_dlopen_unique(const char *libPath, const char *li if (libTargetFd == -1) return nullptr; - // Partially overwrite soname with 3 digits (replacing lib...) with to make sure a cached so isn't loaded std::array sonameOverwrite{}; snprintf(sonameOverwrite.data(), sonameOverwrite.size(), "%03u", TargetId++); if (!elf_soname_patch(libPath, libTargetFd, sonameOverwrite.data())) return nullptr; - // Load our patched library into the hook namespace android_dlextinfo hookExtInfo{ .flags = ANDROID_DLEXT_USE_NAMESPACE | ANDROID_DLEXT_USE_LIBRARY_FD, .library_fd = libTargetFd, .library_namespace = ns }; - // Make a path that looks about right snprintf(PathBuf.data(), PathBuf.size(), "/proc/self/fd/%d", libTargetFd); return android_dlopen_ext(PathBuf.data(), flags, &hookExtInfo); @@ -125,21 +118,19 @@ static void *align_ptr(void *ptr) { return reinterpret_cast(reinterpret_cast(ptr) & ~(getpagesize() - 1)); } -/* Private */ __attribute__((constructor)) static void resolve_linker_symbols() { using loader_dlopen_t = void *(*)(const char *, int, const void *); if (android_get_device_api_level() < 28) return; - // ARM64 specific function walking to locate the internal dlopen handler auto loader_dlopen{[]() { union BranchLinked { uint32_t raw; struct { - int32_t offset : 26; //!< 26-bit branch offset - uint8_t sig : 6; //!< 6-bit signature + int32_t offset : 26; + uint8_t sig : 6; }; bool Verify() { @@ -148,10 +139,8 @@ __attribute__((constructor)) static void resolve_linker_symbols() { }; static_assert(sizeof(BranchLinked) == 4, "BranchLinked is wrong size"); - // Some devices ship with --X mapping for exexecutables so work around that mprotect(align_ptr(reinterpret_cast(&dlopen)), getpagesize(), PROT_WRITE | PROT_READ | PROT_EXEC); - // dlopen is just a wrapper for __loader_dlopen that passes the return address as the third arg hence we can just walk it to find __loader_dlopen auto blInstr{reinterpret_cast(&dlopen)}; while (!blInstr->Verify()) blInstr++; @@ -159,10 +148,8 @@ __attribute__((constructor)) static void resolve_linker_symbols() { return reinterpret_cast(blInstr + blInstr->offset); }()}; - // Protect the loader_dlopen function to remove the BTI attribute (since this is an internal function that isn't intended to be jumped indirectly to) mprotect(align_ptr(reinterpret_cast(&loader_dlopen)), getpagesize(), PROT_WRITE | PROT_READ | PROT_EXEC); - // Passing dlopen as a caller address tricks the linker into using the internal unrestricted namespace letting us access libraries that are normally forbidden in the classloader namespace imposed on apps auto ldHandle{loader_dlopen("ld-android.so", RTLD_LAZY, reinterpret_cast(&dlopen))}; if (!ldHandle) return; @@ -187,6 +174,5 @@ __attribute__((constructor)) static void resolve_linker_symbols() { if (!android_get_exported_namespace) return; - // Lib is now safe to use lib_loaded = true; } diff --git a/app/src/main/cpp/adrenotools/lib/linkernsbypass/android_linker_ns.h b/app/src/main/cpp/adrenotools/lib/linkernsbypass/android_linker_ns.h index 77ec4005a5..cc775b0deb 100644 --- a/app/src/main/cpp/adrenotools/lib/linkernsbypass/android_linker_ns.h +++ b/app/src/main/cpp/adrenotools/lib/linkernsbypass/android_linker_ns.h @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #pragma once #ifdef __cplusplus @@ -9,7 +10,6 @@ extern "C" { #include -// https://cs.android.com/android/platform/superproject/+/0a492a4685377d41fef2b12e9af4ebfa6feef9c2:art/libnativeloader/include/nativeloader/dlext_namespaces.h;l=25;bpv=1;bpt=1 enum { ANDROID_NAMESPACE_TYPE_REGULAR = 0, ANDROID_NAMESPACE_TYPE_ISOLATED = 1, @@ -19,14 +19,8 @@ enum { ANDROID_NAMESPACE_TYPE_SHARED_ISOLATED = ANDROID_NAMESPACE_TYPE_SHARED | ANDROID_NAMESPACE_TYPE_ISOLATED, }; -/** - * @brief Checks if linkernsbypass loaded successfully and is safe to use - * @note IMPORTANT: This should be called before any calls to the rest of the library are made - * @return true if loading succeeded - */ bool linkernsbypass_load_status(); -// https://cs.android.com/android/platform/superproject/+/0a492a4685377d41fef2b12e9af4ebfa6feef9c2:art/libnativeloader/include/nativeloader/dlext_namespaces.h;l=86;bpv=1;bpt=1 struct android_namespace_t *android_create_namespace(const char *name, const char *ld_library_path, const char *default_library_path, @@ -41,39 +35,19 @@ struct android_namespace_t *android_create_namespace_escape(const char *name, const char *permitted_when_isolated_path, struct android_namespace_t *parent_namespace); -// https://cs.android.com/android/platform/superproject/+/dcb01ef31026b3b8aeb72dada3370af63fe66bbd:bionic/linker/linker.cpp;l=3554 typedef struct android_namespace_t *(*android_get_exported_namespace_t)(const char *); extern android_get_exported_namespace_t android_get_exported_namespace; -// https://cs.android.com/android/platform/superproject/+/dcb01ef31026b3b8aeb72dada3370af63fe66bbd:bionic/linker/linker.cpp;l=2499 typedef bool (*android_link_namespaces_all_libs_t)(struct android_namespace_t *, struct android_namespace_t *); extern android_link_namespaces_all_libs_t android_link_namespaces_all_libs; -// https://cs.android.com/android/platform/superproject/+/dcb01ef31026b3b8aeb72dada3370af63fe66bbd:bionic/linker/linker.cpp;l=2473 typedef bool (*android_link_namespaces_t)(struct android_namespace_t *, struct android_namespace_t *, const char *); extern android_link_namespaces_t android_link_namespaces; -/** - * @brief Like android_link_namespaces_all_libs but links from the default namespace - */ bool linkernsbypass_link_namespace_to_default_all_libs(struct android_namespace_t *to); -/** - * @brief Loads a library into a namespace - * @note IMPORTANT: If `filename` is compiled with the '-z global' linker flag and RTLD_GLOBAL is supplied in `flags` the library will be added to the namespace's LD_PRELOAD list - * @param filename The name of the library to load - * @param flags The rtld flags for `filename` - * @param ns The namespace to dlopen into - */ void *linkernsbypass_namespace_dlopen(const char *filename, int flags, struct android_namespace_t *ns); -/** - * @brief Force loads a unique instance of a library into a namespace - * @param libPath The path to the library to load with hooks applied - * @param libTargetDir A temporary directory to hold the soname patched library at `libPath`, will attempt to use memfd if nullptr - * @param flags The rtld flags for `libName` - * @param ns The namespace to dlopen into - */ void *linkernsbypass_namespace_dlopen_unique(const char *libPath, const char *libTargetDir, int flags, struct android_namespace_t *ns); #ifdef __cplusplus diff --git a/app/src/main/cpp/adrenotools/lib/linkernsbypass/elf_soname_patcher.cpp b/app/src/main/cpp/adrenotools/lib/linkernsbypass/elf_soname_patcher.cpp index db619ab534..cd5ca5c476 100644 --- a/app/src/main/cpp/adrenotools/lib/linkernsbypass/elf_soname_patcher.cpp +++ b/app/src/main/cpp/adrenotools/lib/linkernsbypass/elf_soname_patcher.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #include #include #include @@ -20,7 +21,6 @@ bool elf_soname_patch(const char *libPath, int targetFd, const char *sonamePatch if (ftruncate(targetFd, libStat.st_size) == -1) return false; - // Map the memory so we can read our elf into it auto mappedLib{reinterpret_cast(mmap(nullptr, libStat.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, targetFd, 0))}; if (!mappedLib) return false; @@ -29,30 +29,25 @@ bool elf_soname_patch(const char *libPath, int targetFd, const char *sonamePatch if (libFd == false) return false; - // Read lib elf into target file if (read(libFd, mappedLib, libStat.st_size) != libStat.st_size) return false; - // No longer needed close(libFd); auto eHdr{reinterpret_cast(mappedLib)}; auto sHdrEntries{reinterpret_cast(mappedLib + eHdr->e_shoff)}; - // Iterate over section headers to find the .dynamic section for (ElfW(Half) i{}; i < eHdr->e_shnum; i++) { auto &sHdr{sHdrEntries[i]}; if (sHdr.sh_type == SHT_DYNAMIC) { auto strTab{reinterpret_cast(mappedLib + sHdrEntries[sHdr.sh_link].sh_offset)}; auto dynHdrEntries{reinterpret_cast(mappedLib + sHdr.sh_offset)}; - // Iterate over .dynamic entries to find DT_SONAME for (ElfW(Xword) k{}; k < (sHdr.sh_size / sHdr.sh_entsize); k++) { auto &dynHdrEntry{dynHdrEntries[k]}; if (dynHdrEntry.d_tag == DT_SONAME) { char *soname{strTab + dynHdrEntry.d_un.d_val}; - // Partially replace the old soname with the soname patch size_t charIdx{}; for (; soname[charIdx] != 0 && sonamePatch[charIdx] != 0; charIdx++) soname[charIdx] = sonamePatch[charIdx]; diff --git a/app/src/main/cpp/adrenotools/lib/linkernsbypass/elf_soname_patcher.h b/app/src/main/cpp/adrenotools/lib/linkernsbypass/elf_soname_patcher.h index 0b2c186ffc..88ea580059 100644 --- a/app/src/main/cpp/adrenotools/lib/linkernsbypass/elf_soname_patcher.h +++ b/app/src/main/cpp/adrenotools/lib/linkernsbypass/elf_soname_patcher.h @@ -1,19 +1,13 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #pragma once #ifdef __cplusplus extern "C" { #endif -/** - * @brief Overwrites a portion of the soname in an elf by loading it into shared memory and modifying .dynstr - * @note IMPORTANT: The supplied soname patch will overwrite the first strlen(sonamePatch) chars of the soname - * @param elfPath Full path to the elf to patch - * @param targetFd FD to use for storing the patched library - * @return True on success - */ bool elf_soname_patch(const char *elfPath, int targetFd, const char *newSoname); #ifdef __cplusplus diff --git a/app/src/main/cpp/adrenotools/lib/linkernsbypass/meson.build b/app/src/main/cpp/adrenotools/lib/linkernsbypass/meson.build index e666aff8a7..12919c500a 100644 --- a/app/src/main/cpp/adrenotools/lib/linkernsbypass/meson.build +++ b/app/src/main/cpp/adrenotools/lib/linkernsbypass/meson.build @@ -11,8 +11,3 @@ linkernsbypass_lib = static_library ( include_directories: ([linkernsbypass_inc, adrenotools_inc]), dependencies: ([libandroid_dep, libdl_dep]) ) - -# linkernsbypass_include = static_library('linkernsbypass', sources) -# target_compile_options(['linkernsbypass', 'PRIVATE', '-Wall', '-Wextra']) -# target_link_libraries(['linkernsbypass', 'android', 'dl']) -# target_include_directories(['linkernsbypass', 'PUBLIC', '.']) diff --git a/app/src/main/cpp/adrenotools/meson.build b/app/src/main/cpp/adrenotools/meson.build index bf519bb2ad..37404c2681 100644 --- a/app/src/main/cpp/adrenotools/meson.build +++ b/app/src/main/cpp/adrenotools/meson.build @@ -33,18 +33,3 @@ adrenotools_lib = shared_library( ) subdir('src/hook') - -# target_include_directories(['adrenotools', 'PUBLIC', 'include']) -# target_include_directories(['adrenotools', 'PRIVATE', '.']) -# target_compile_options(['adrenotools', 'PRIVATE', '-Wall', '-Wextra']) -# target_link_libraries(['adrenotools', 'android', 'linkernsbypass']) -# hooks_deb = subproject('src/hook') -# if build_shared_libs - # target_link_options(['adrenotools', 'PRIVATE', '-Wl,-s,--exclude-libs,liblinkernsbypass.a']) -# endif -# if gen_install_target - # configure_file(['adrenotools.pc.in', 'adrenotools.pc', '@ONLY']) - # install(['FILES', cmake_binary_dir, '/adrenotools.pc', 'DESTINATION', 'lib/pkgconfig']) - # install(['TARGETS', 'adrenotools', 'main_hook', 'file_redirect_hook', 'gsl_alloc_hook', 'hook_impl']) - # install(['DIRECTORY', 'include/', 'DESTINATION', 'include', 'FILES_MATCHING', 'PATTERN', '*.h*']) -# endif diff --git a/app/src/main/cpp/adrenotools/src/bcenabler.cpp b/app/src/main/cpp/adrenotools/src/bcenabler.cpp index 1deb41df40..6bf3e98dd5 100644 --- a/app/src/main/cpp/adrenotools/src/bcenabler.cpp +++ b/app/src/main/cpp/adrenotools/src/bcenabler.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #include #include #include @@ -19,7 +20,6 @@ enum adrenotools_bcn_type adrenotools_get_bcn_type(uint32_t major, uint32_t mino return ADRENOTOOLS_BCN_PATCH; } -// Searches /proc/self/maps for the first free page after the given address static void *find_free_page(uintptr_t address) { std::ifstream procMaps("/proc/self/maps"); @@ -45,62 +45,48 @@ static void *align_ptr(void *ptr) { bool adrenotools_patch_bcn(void *vkGetPhysicalDeviceFormatPropertiesFn) { union Branch { struct { - int32_t offset : 26; //!< 26-bit branch offset - uint8_t sig : 6; //!< 6-bit signature (0x25 for linked, 0x5 for jump) + int32_t offset : 26; + uint8_t sig : 6; }; uint32_t raw{}; }; static_assert(sizeof(Branch) == 4, "Branch size is invalid"); - // Find the nearest unmapped page where we can place patch code void *patchPage{find_free_page(reinterpret_cast(vkGetPhysicalDeviceFormatPropertiesFn))}; if (!patchPage) return false; - // Map patch region void *ptr{mmap(patchPage, getpagesize(), PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, 0, 0)}; if (ptr != patchPage) return false; - // Allow reading from the blob's .text section since some devices enable ---X - // Protect two pages just in case we happen to land on a page boundary if (mprotect(align_ptr(vkGetPhysicalDeviceFormatPropertiesFn), getpagesize() * 2, PROT_WRITE | PROT_READ | PROT_EXEC)) return false; - // First branch in this function is targeted at the function we want to patch Branch *blInst{reinterpret_cast(vkGetPhysicalDeviceFormatPropertiesFn)}; constexpr uint8_t BranchLinkSignature{0x25}; - // Search for first instruction with the BL signature while (blInst->sig != BranchLinkSignature) blInst++; - // Internal QGL format conversion function that we need to patch uint32_t *convFormatFn{reinterpret_cast(blInst) + blInst->offset}; - // See mprotect call above - // This time we also set PROT_WRITE so we can write our patch to the page if (mprotect(align_ptr(convFormatFn), getpagesize() * 2, PROT_WRITE | PROT_READ | PROT_EXEC)) return false; - // This would normally set the default result to 0 (error) in the format not found case constexpr uint32_t ClearResultSignature{0x2a1f03e0}; - // We replace it with a branch to our own extended if statement which adds in the extra things for BCn uint32_t *clearResultPtr{convFormatFn}; while (*clearResultPtr != ClearResultSignature) clearResultPtr++; - // Ensure we don't write out of bounds if (PatchRawData_size > getpagesize()) return false; - // Copy the patch function to our mapped page memcpy(patchPage, PatchRawData, PatchRawData_size); - // Fixup the patch code so it correctly returns back to the driver after running constexpr uint32_t PatchReturnFixupMagic{0xffffffff}; constexpr uint8_t BranchSignature{0x5}; @@ -130,6 +116,5 @@ bool adrenotools_patch_bcn(void *vkGetPhysicalDeviceFormatPropertiesFn) { asm volatile("ISB"); - // Done! return true; } diff --git a/app/src/main/cpp/adrenotools/src/bcenabler_patch.s b/app/src/main/cpp/adrenotools/src/bcenabler_patch.s index 8766e7880d..99fab59bc3 100644 --- a/app/src/main/cpp/adrenotools/src/bcenabler_patch.s +++ b/app/src/main/cpp/adrenotools/src/bcenabler_patch.s @@ -80,4 +80,4 @@ .L18: mov w0, 0 .L3: - .word 0xffffffff // Branch fixup + .word 0xffffffff diff --git a/app/src/main/cpp/adrenotools/src/driver.cpp b/app/src/main/cpp/adrenotools/src/driver.cpp index 581e04a671..848beae8cd 100644 --- a/app/src/main/cpp/adrenotools/src/driver.cpp +++ b/app/src/main/cpp/adrenotools/src/driver.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #include #include #include @@ -17,17 +18,14 @@ #include void *adrenotools_open_libvulkan(int dlopenFlags, int featureFlags, const char *tmpLibDir, const char *hookLibDir, const char *customDriverDir, const char *customDriverName, const char *fileRedirectDir, void **userMappingHandle) { - // Bail out if linkernsbypass failed to load, this probably means we're on api < 28 if (!linkernsbypass_load_status()) { __android_log_print( ANDROID_LOG_ERROR, "adrenotools", "Could not load linkernsbypass\n"); return nullptr; } - // Use memfd on Q+ since it's guaranteed to work, but only if tmpLibDir wasn't set if (android_get_device_api_level() >= 29 && !tmpLibDir) tmpLibDir = nullptr; - // Verify that params for specific features are only passed if they are enabled if (!(featureFlags & ADRENOTOOLS_DRIVER_FILE_REDIRECT) && fileRedirectDir) { __android_log_print( ANDROID_LOG_ERROR, "adrenotools", "ADRENOTOOLS_DRIVER_FILE_REDIRECT present but no file redirect folder found\n"); return nullptr; @@ -43,7 +41,6 @@ void *adrenotools_open_libvulkan(int dlopenFlags, int featureFlags, const char * return nullptr; } - // Verify that params for enabled features are correct struct stat buf{}; if (featureFlags & ADRENOTOOLS_DRIVER_CUSTOM) { @@ -58,7 +55,6 @@ void *adrenotools_open_libvulkan(int dlopenFlags, int featureFlags, const char * } } - // Verify that params for enabled features are correct if (featureFlags & ADRENOTOOLS_DRIVER_FILE_REDIRECT) { if (!fileRedirectDir) { __android_log_print( ANDROID_LOG_ERROR, "adrenotools", "ADRENOTOOLS_DRIVER_REDIRECT_DIR present but no folder parameter was found\n"); @@ -71,22 +67,18 @@ void *adrenotools_open_libvulkan(int dlopenFlags, int featureFlags, const char * } } - // Create a namespace that can isolate our hook from the classloader namespace auto hookNs{android_create_namespace("adrenotools-libvulkan", hookLibDir, nullptr, ANDROID_NAMESPACE_TYPE_SHARED, nullptr, nullptr)}; - // Link it to the default namespace so the hook can use libandroid etc if (!linkernsbypass_link_namespace_to_default_all_libs(hookNs)) { __android_log_print( ANDROID_LOG_ERROR, "adrenotools", "Failed to hook our namespace to the default one\n"); return nullptr; } - // Preload the hook implementation, otherwise we get a weird issue where despite being in NEEDED of the hook lib the hook's symbols will overwrite ours and cause an infinite loop auto hookImpl{linkernsbypass_namespace_dlopen("libhook_impl.so", RTLD_NOW, hookNs)}; if (!hookImpl) { __android_log_print( ANDROID_LOG_ERROR, "adrenotools", "Couldn't preload the hook implementation\n"); return nullptr; } - // Pass parameters to the hook implementation auto initHookParam{reinterpret_cast(dlsym(hookImpl, "init_hook_param"))}; if (!initHookParam) { __android_log_print( ANDROID_LOG_ERROR, "adrenotools", "Couldn't init hook params\n"); @@ -95,7 +87,6 @@ void *adrenotools_open_libvulkan(int dlopenFlags, int featureFlags, const char * auto importMapping{[&]() -> adrenotools_gpu_mapping * { if (featureFlags & ADRENOTOOLS_DRIVER_GPU_MAPPING_IMPORT) { - // This will be leaked, but it's not a big deal since it's only a few bytes adrenotools_gpu_mapping *mapping{new adrenotools_gpu_mapping{}}; *userMappingHandle = mapping; return mapping; @@ -107,7 +98,6 @@ void *adrenotools_open_libvulkan(int dlopenFlags, int featureFlags, const char * initHookParam(new HookImplParams(featureFlags, tmpLibDir, hookLibDir, customDriverDir, customDriverName, fileRedirectDir, importMapping)); - // Load the libvulkan hook into the isolated namespace if (!linkernsbypass_namespace_dlopen("libmain_hook.so", RTLD_GLOBAL, hookNs)) { __android_log_print( ANDROID_LOG_ERROR, "adrenotools", "Failed to load libvulkan into the isolated namespace\n"); return nullptr; @@ -150,7 +140,7 @@ bool adrenotools_import_user_mem(void *handle, void *hostPtr, uint64_t size) { importMapping->host_ptr = hostPtr; importMapping->gpu_addr = info.gpuaddr; importMapping->size = size; - importMapping->flags = 0xc2600; //!< Unknown flags, but they are required for the mapping to work + importMapping->flags = 0xc2600; close(kgslFd); return true; @@ -189,7 +179,7 @@ bool adrenotools_mem_gpu_allocate(void *handle, uint64_t *size) { mapping->host_ptr = nullptr; mapping->gpu_addr = info.gpuaddr; mapping->size = *size; - mapping->flags = 0xc2600; //!< Unknown flags, but they are required for the mapping to work + mapping->flags = 0xc2600; close(kgslFd); return true; diff --git a/app/src/main/cpp/adrenotools/src/hook/hook_impl.cpp b/app/src/main/cpp/adrenotools/src/hook/hook_impl.cpp index 50e79a946b..8fa80ee185 100644 --- a/app/src/main/cpp/adrenotools/src/hook/hook_impl.cpp +++ b/app/src/main/cpp/adrenotools/src/hook/hook_impl.cpp @@ -15,7 +15,7 @@ #define TAG "hook_impl" #define LOGI(fmt, ...) __android_log_print(ANDROID_LOG_INFO, TAG, fmt, ##__VA_ARGS__) -const HookImplParams *hook_params; //!< Bunch of info needed to load/patch the driver +const HookImplParams *hook_params; int (*gsl_memory_alloc_pure_sym)(uint32_t, uint32_t, void *); int (*gsl_memory_alloc_pure_64_sym)(uint64_t, uint32_t, void *); int (*gsl_memory_free_pure_sym)(void *); @@ -43,7 +43,6 @@ __attribute__((visibility("default"))) void *hook_android_dlopen_ext(const char LOGI("hook_android_dlopen_ext: filename: %s", filename); - // Ignore non-vulkan libraries if (!strstr(filename, "vulkan.")) return android_dlopen_ext(filename, flags, extinfo); @@ -52,7 +51,6 @@ __attribute__((visibility("default"))) void *hook_android_dlopen_ext(const char return fallback(); } - // customDriverDir will be empty if ADRENOTOOLS_DRIVER_CUSTOM isn't set therefore it's fine to have either way auto driverNs{android_create_namespace(filename, hook_params->customDriverDir.c_str(), hook_params->hookLibDir.c_str(), ANDROID_NAMESPACE_TYPE_SHARED, nullptr, extinfo->library_namespace)}; @@ -61,16 +59,12 @@ __attribute__((visibility("default"))) void *hook_android_dlopen_ext(const char return fallback(); } - // We depend on libandroid which is unlikely to be in the supplied driver namespace so we have to link it over android_link_namespaces(driverNs, nullptr, "libandroid.so"); - // Preload ourself, a new instance will be created since we have different linker ancestory - // If we don't preload we get a weird issue where despite being in NEEDED of the hook lib the hook's symbols will overwrite ours and cause an infinite loop auto hookImpl{linkernsbypass_namespace_dlopen("libhook_impl.so", RTLD_NOW, driverNs)}; if (!hookImpl) return nullptr; - // Pass parameters to ourself auto initHookParam{reinterpret_cast(dlsym(hookImpl, "init_hook_param"))}; if (!initHookParam) return nullptr; @@ -86,7 +80,6 @@ __attribute__((visibility("default"))) void *hook_android_dlopen_ext(const char LOGI("hook_android_dlopen_ext: applied libfile_redirect_hook"); } - // Use our new namespace to load the vulkan driver auto newExtinfo{*extinfo}; newExtinfo.library_namespace = driverNs; @@ -122,8 +115,6 @@ __attribute__((visibility("default"))) void *hook_android_dlopen_ext(const char LOGI("hook_android_dlopen_ext: hook failed: failed to apply libgsl_alloc_hook!"); } - // TODO: If there is already an instance of a Vulkan driver loaded hooks won't be applied, this will only be the case for skiavk generally - // To fix this we would need to search /proc/self/maps for the file to a loaded instance of the library in order to read it to patch the soname and load it uniquely if (hook_params->featureFlags & ADRENOTOOLS_DRIVER_CUSTOM) { LOGI("hook_android_dlopen_ext: loading custom driver: %s%s", hook_params->customDriverDir.c_str(), hook_params->customDriverName.c_str()); void *handle{android_dlopen_ext(hook_params->customDriverName.c_str(), flags, &newExtinfo)}; @@ -142,7 +133,6 @@ __attribute__((visibility("default"))) void *hook_android_dlopen_ext(const char __attribute__((visibility("default"))) void *hook_android_load_sphal_library(const char *filename, int flags) { LOGI("hook_android_load_sphal_library: filename: %s", filename); - // https://android.googlesource.com/platform/system/core/+/master/libvndksupport/linker.cpp for (const char *name : {"sphal", "vendor", "default"}) { if (auto vendorNs{android_get_exported_namespace(name)}) { android_dlextinfo dlextinfo{ diff --git a/app/src/main/cpp/adrenotools/src/hook/hook_impl.h b/app/src/main/cpp/adrenotools/src/hook/hook_impl.h index 2ce2471e1d..77be0fd71d 100644 --- a/app/src/main/cpp/adrenotools/src/hook/hook_impl.h +++ b/app/src/main/cpp/adrenotools/src/hook/hook_impl.h @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #pragma once #ifdef __cplusplus diff --git a/app/src/main/cpp/adrenotools/src/hook/hook_impl_params.h b/app/src/main/cpp/adrenotools/src/hook/hook_impl_params.h index 8a3bd1673e..7dbabd7b73 100644 --- a/app/src/main/cpp/adrenotools/src/hook/hook_impl_params.h +++ b/app/src/main/cpp/adrenotools/src/hook/hook_impl_params.h @@ -1,15 +1,12 @@ // SPDX-License-Identifier: BSD-2-Clause // Copyright © 2021 Billy Laws + #pragma once #include #include -/** - * @brief Holds the parameters needed for all hooks - * @note See comments for adrenotools_open_libvulkan as a reference for member variables - */ struct HookImplParams { int featureFlags; std::string tmpLibDir; diff --git a/app/src/main/cpp/adrenotools/src/hook/kgsl.h b/app/src/main/cpp/adrenotools/src/hook/kgsl.h index 6d4d93d6af..fa99b1d343 100644 --- a/app/src/main/cpp/adrenotools/src/hook/kgsl.h +++ b/app/src/main/cpp/adrenotools/src/hook/kgsl.h @@ -3,50 +3,27 @@ * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ - #ifndef _UAPI_MSM_KGSL_H #define _UAPI_MSM_KGSL_H #include #include -/* - * The KGSL version has proven not to be very useful in userspace if features - * are cherry picked into other trees out of order so it is frozen as of 3.14. - * It is left here for backwards compatabilty and as a reminder that - * software releases are never linear. Also, I like pie. - */ #define KGSL_VERSION_MAJOR 3 #define KGSL_VERSION_MINOR 14 -/* - * We have traditionally mixed context and issueibcmds / command batch flags - * together into a big flag stew. This worked fine until we started adding a - * lot more command batch flags and we started running out of bits. Turns out - * we have a bit of room in the context type / priority mask that we could use - * for command batches, but that means we need to split out the flags into two - * coherent sets. - * - * If any future definitions are for both context and cmdbatch add both defines - * and link the cmdbatch to the context define as we do below. Otherwise feel - * free to add exclusive bits to either set. - */ -/* --- context flags --- */ #define KGSL_CONTEXT_SAVE_GMEM 0x00000001 #define KGSL_CONTEXT_NO_GMEM_ALLOC 0x00000002 -/* This is a cmdbatch exclusive flag - use the CMDBATCH equivalent instead */ #define KGSL_CONTEXT_SUBMIT_IB_LIST 0x00000004 #define KGSL_CONTEXT_CTX_SWITCH 0x00000008 #define KGSL_CONTEXT_PREAMBLE 0x00000010 #define KGSL_CONTEXT_TRASH_STATE 0x00000020 #define KGSL_CONTEXT_PER_CONTEXT_TS 0x00000040 #define KGSL_CONTEXT_USER_GENERATED_TS 0x00000080 -/* This is a cmdbatch exclusive flag - use the CMDBATCH equivalent instead */ #define KGSL_CONTEXT_END_OF_FRAME 0x00000100 #define KGSL_CONTEXT_NO_FAULT_TOLERANCE 0x00000200 -/* This is a cmdbatch exclusive flag - use the CMDBATCH equivalent instead */ #define KGSL_CONTEXT_SYNC 0x00000400 #define KGSL_CONTEXT_PWR_CONSTRAINT 0x00000800 #define KGSL_CONTEXT_PRIORITY_MASK 0x0000F000 @@ -80,70 +57,43 @@ #define KGSL_CONTEXT_INVALID 0xffffffff -/* - * --- command batch flags --- - * The bits that are linked to a KGSL_CONTEXT equivalent are either legacy - * definitions or bits that are valid for both contexts and cmdbatches. To be - * safe the other 8 bits that are still available in the context field should be - * omitted here in case we need to share - the other bits are available for - * cmdbatch only flags as needed - */ #define KGSL_CMDBATCH_MEMLIST 0x00000001 #define KGSL_CMDBATCH_MARKER 0x00000002 -#define KGSL_CMDBATCH_SUBMIT_IB_LIST KGSL_CONTEXT_SUBMIT_IB_LIST /* 0x004 */ -#define KGSL_CMDBATCH_CTX_SWITCH KGSL_CONTEXT_CTX_SWITCH /* 0x008 */ +#define KGSL_CMDBATCH_SUBMIT_IB_LIST KGSL_CONTEXT_SUBMIT_IB_LIST +#define KGSL_CMDBATCH_CTX_SWITCH KGSL_CONTEXT_CTX_SWITCH #define KGSL_CMDBATCH_PROFILING 0x00000010 -/* - * KGSL_CMDBATCH_PROFILING must also be set for KGSL_CMDBATCH_PROFILING_KTIME - * to take effect, as the latter only affects the time data returned. - */ #define KGSL_CMDBATCH_PROFILING_KTIME 0x00000020 -#define KGSL_CMDBATCH_END_OF_FRAME KGSL_CONTEXT_END_OF_FRAME /* 0x100 */ -#define KGSL_CMDBATCH_SYNC KGSL_CONTEXT_SYNC /* 0x400 */ -#define KGSL_CMDBATCH_PWR_CONSTRAINT KGSL_CONTEXT_PWR_CONSTRAINT /* 0x800 */ -#define KGSL_CMDBATCH_SPARSE 0x1000 /* 0x1000 */ -/* RECURRING bits must be set for LSR workload with IOCTL_KGSL_RECURRING_COMMAND. */ +#define KGSL_CMDBATCH_END_OF_FRAME KGSL_CONTEXT_END_OF_FRAME +#define KGSL_CMDBATCH_SYNC KGSL_CONTEXT_SYNC +#define KGSL_CMDBATCH_PWR_CONSTRAINT KGSL_CONTEXT_PWR_CONSTRAINT +#define KGSL_CMDBATCH_SPARSE 0x1000 + #define KGSL_CMDBATCH_START_RECURRING 0x00100000 #define KGSL_CMDBATCH_STOP_RECURRING 0x00200000 -/* - * Reserve bits [16:19] and bits [28:31] for possible bits shared between - * contexts and command batches. Update this comment as new flags are added. - */ -/* - * gpu_command_object flags - these flags communicate the type of command or - * memory object being submitted for a GPU command - */ -/* Flags for GPU command objects */ #define KGSL_CMDLIST_IB 0x00000001U #define KGSL_CMDLIST_CTXTSWITCH_PREAMBLE 0x00000002U #define KGSL_CMDLIST_IB_PREAMBLE 0x00000004U -/* Flags for GPU command memory objects */ #define KGSL_OBJLIST_MEMOBJ 0x00000008U #define KGSL_OBJLIST_PROFILE 0x00000010U -/* Flags for GPU command sync points */ #define KGSL_CMD_SYNCPOINT_TYPE_TIMESTAMP 0 #define KGSL_CMD_SYNCPOINT_TYPE_FENCE 1 #define KGSL_CMD_SYNCPOINT_TYPE_TIMELINE 2 -/* --- Memory allocation flags --- */ -/* General allocation hints */ #define KGSL_MEMFLAGS_SECURE (1ULL << 3) #define KGSL_MEMFLAGS_GPUREADONLY (1ULL << 24) #define KGSL_MEMFLAGS_GPUWRITEONLY (1ULL << 25) #define KGSL_MEMFLAGS_FORCE_32BIT (1ULL << 32) -/* Flag for binding all the virt range to single phys data */ #define KGSL_SPARSE_BIND_MULTIPLE_TO_PHYS 0x400000000ULL #define KGSL_SPARSE_BIND 0x1ULL #define KGSL_SPARSE_UNBIND 0x2ULL -/* Memory caching hints */ #define KGSL_CACHEMODE_MASK 0x0C000000U #define KGSL_CACHEMODE_SHIFT 26 @@ -159,7 +109,6 @@ #define KGSL_MEMFLAGS_GUARD_PAGE (1ULL << 33) #define KGSL_MEMFLAGS_VBO (1ULL << 34) -/* Memory types for which allocations are made */ #define KGSL_MEMTYPE_MASK 0x0000FF00 #define KGSL_MEMTYPE_SHIFT 8 @@ -186,10 +135,6 @@ #define KGSL_MEMTYPE_MULTISAMPLE 20 #define KGSL_MEMTYPE_KERNEL 255 -/* - * Alignment hint, passed as the power of 2 exponent. - * i.e 4k (2^12) would be 12, 64k (2^16)would be 16. - */ #define KGSL_MEMALIGN_MASK 0x00FF0000 #define KGSL_MEMALIGN_SHIFT 16 @@ -198,22 +143,12 @@ enum kgsl_user_mem_type { KGSL_USER_MEM_TYPE_ASHMEM = 0x00000001, KGSL_USER_MEM_TYPE_ADDR = 0x00000002, KGSL_USER_MEM_TYPE_ION = 0x00000003, - /* - * ION type is retained for backwards compatibility but Ion buffers are - * dma-bufs so try to use that naming if we can - */ KGSL_USER_MEM_TYPE_DMABUF = 0x00000003, KGSL_USER_MEM_TYPE_MAX = 0x00000007, }; #define KGSL_MEMFLAGS_USERMEM_MASK 0x000000e0 #define KGSL_MEMFLAGS_USERMEM_SHIFT 5 -/* - * Unfortunately, enum kgsl_user_mem_type starts at 0 which does not - * leave a good value for allocated memory. In the flags we use - * 0 to indicate allocated memory and thus need to add 1 to the enum - * values. - */ #define KGSL_USERMEM_FLAG(x) (((x) + 1) << KGSL_MEMFLAGS_USERMEM_SHIFT) #define KGSL_MEMFLAGS_NOT_USERMEM 0 @@ -223,7 +158,6 @@ enum kgsl_user_mem_type { #define KGSL_MEMFLAGS_USERMEM_ADDR KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_ADDR) #define KGSL_MEMFLAGS_USERMEM_ION KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_ION) -/* --- generic KGSL flag values --- */ #define KGSL_FLAGS_NORMALMODE 0x00000000 #define KGSL_FLAGS_SAFEMODE 0x00000001 @@ -237,19 +171,14 @@ enum kgsl_user_mem_type { #define KGSL_FLAGS_SOFT_RESET 0x00000100 #define KGSL_FLAGS_PER_CONTEXT_TIMESTAMPS 0x00000200 -/* Server Side Sync Timeout in milliseconds */ #define KGSL_SYNCOBJ_SERVER_TIMEOUT 2000 -/* UBWC Modes */ #define KGSL_UBWC_NONE 0 #define KGSL_UBWC_1_0 1 #define KGSL_UBWC_2_0 2 #define KGSL_UBWC_3_0 3 #define KGSL_UBWC_4_0 4 -/* - * Reset status values for context - */ enum kgsl_ctx_reset_stat { KGSL_CTX_STAT_NO_ERROR = 0x00000000, KGSL_CTX_STAT_GUILTY_CONTEXT_RESET_EXT = 0x00000001, @@ -263,38 +192,13 @@ enum kgsl_ctx_reset_stat { struct kgsl_devinfo { unsigned int device_id; - /* - * chip revision id - * coreid:8 majorrev:8 minorrev:8 patch:8 - */ unsigned int chip_id; unsigned int mmu_enabled; unsigned long gmem_gpubaseaddr; - /* - * This field contains the adreno revision - * number 200, 205, 220, etc... - */ unsigned int gpu_id; __kernel_size_t gmem_sizebytes; }; -/* - * struct kgsl_devmemstore - this structure defines the region of memory - * that can be mmap()ed from this driver. The timestamp fields are volatile - * because they are written by the GPU - * @soptimestamp: Start of pipeline timestamp written by GPU before the - * commands in concern are processed - * @sbz: Unused, kept for 8 byte alignment - * @eoptimestamp: End of pipeline timestamp written by GPU after the - * commands in concern are processed - * @sbz2: Unused, kept for 8 byte alignment - * @preempted: Indicates if the context was preempted - * @sbz3: Unused, kept for 8 byte alignment - * @ref_wait_ts: Timestamp on which to generate interrupt, unused now. - * @sbz4: Unused, kept for 8 byte alignment - * @current_context: The current context the GPU is working on - * @sbz5: Unused, kept for 8 byte alignment - */ struct kgsl_devmemstore { volatile unsigned int soptimestamp; unsigned int sbz; @@ -312,14 +216,12 @@ struct kgsl_devmemstore { ((ctxt_id)*sizeof(struct kgsl_devmemstore) + \ offsetof(struct kgsl_devmemstore, field)) -/* timestamp id*/ enum kgsl_timestamp_type { - KGSL_TIMESTAMP_CONSUMED = 0x00000001, /* start-of-pipeline timestamp */ - KGSL_TIMESTAMP_RETIRED = 0x00000002, /* end-of-pipeline timestamp*/ + KGSL_TIMESTAMP_CONSUMED = 0x00000001, + KGSL_TIMESTAMP_RETIRED = 0x00000002, KGSL_TIMESTAMP_QUEUED = 0x00000003, }; -/* property types - used with kgsl_device_getproperty */ #define KGSL_PROP_DEVICE_INFO 0x1 #define KGSL_PROP_DEVICE_SHADOW 0x2 #define KGSL_PROP_DEVICE_POWER 0x3 @@ -352,30 +254,13 @@ enum kgsl_timestamp_type { #define KGSL_PROP_VK_DEVICE_ID 0x2A #define KGSL_PROP_IS_LPAC_ENABLED 0x2B -/* - * kgsl_capabilities_properties returns a list of supported properties. - * If the user passes 0 for 'count' the kernel will set it to the number of - * supported properties. The list is expected to be 'count * sizeof(__u32)' - * bytes long. The kernel will return the actual number of entries copied into - * list via 'count'. - */ struct kgsl_capabilities_properties { __u64 list; __u32 count; }; -/* - * KGSL_QUERY_CAPS_PROPERTIES returns a list of the valid properties in the - * kernel. The subtype data should be struct kgsl_capabilities_properties - */ #define KGSL_QUERY_CAPS_PROPERTIES 1 -/* - * kgsl_capabilities allows the user to query kernel capabilities. The 'data' - * type should be set appropriately for the querytype (see above). Pass 0 to - * 'size' and the kernel will set it to the expected size of 'data' that is - * appropriate for querytype (in bytes). - */ struct kgsl_capabilities { __u64 data; __u64 size; @@ -385,7 +270,7 @@ struct kgsl_capabilities { struct kgsl_shadowprop { unsigned long gpuaddr; __kernel_size_t size; - unsigned int flags; /* contains KGSL_FLAGS_ values */ + unsigned int flags; }; struct kgsl_qdss_stm_prop { @@ -437,10 +322,8 @@ struct kgsl_gpu_model { char gpu_model[32]; }; -/* Context property sub types */ #define KGSL_CONTEXT_PROP_FAULTS 1 -/* Performance counter groups */ #define KGSL_PERFCOUNTER_GROUP_CP 0x0 #define KGSL_PERFCOUNTER_GROUP_RBBM 0x1 @@ -502,7 +385,6 @@ struct kgsl_gpu_model { #define KGSL_PERFCOUNTER_NOT_USED 0xFFFFFFFF #define KGSL_PERFCOUNTER_BROKEN 0xFFFFFFFE -/* structure holds list of ibs */ struct kgsl_ibdesc { unsigned long gpuaddr; unsigned long __pad; @@ -510,21 +392,6 @@ struct kgsl_ibdesc { unsigned int ctrl; }; -/** - * struct kgsl_cmdbatch_profiling_buffer - * @wall_clock_s: Ringbuffer submission time (seconds). - * If KGSL_CMDBATCH_PROFILING_KTIME is set, time is provided - * in kernel clocks, otherwise wall clock time is used. - * @wall_clock_ns: Ringbuffer submission time (nanoseconds). - * If KGSL_CMDBATCH_PROFILING_KTIME is set time is provided - * in kernel clocks, otherwise wall clock time is used. - * @gpu_ticks_queued: GPU ticks at ringbuffer submission - * @gpu_ticks_submitted: GPU ticks when starting cmdbatch execution - * @gpu_ticks_retired: GPU ticks when finishing cmdbatch execution - * - * This structure defines the profiling buffer used to measure cmdbatch - * execution time - */ struct kgsl_cmdbatch_profiling_buffer { __u64 wall_clock_s; __u64 wall_clock_ns; @@ -533,20 +400,8 @@ struct kgsl_cmdbatch_profiling_buffer { __u64 gpu_ticks_retired; }; -/* ioctls */ #define KGSL_IOC_TYPE 0x09 -/* - * get misc info about the GPU - * type should be a value from enum kgsl_property_type - * value points to a structure that varies based on type - * sizebytes is sizeof() that structure - * for KGSL_PROP_DEVICE_INFO, use struct kgsl_devinfo - * this structure contaings hardware versioning info. - * for KGSL_PROP_DEVICE_SHADOW, use struct kgsl_shadowprop - * this is used to find mmap() offset and sizes for mapping - * struct kgsl_memstore into userspace. - */ struct kgsl_device_getproperty { unsigned int type; void __user *value; @@ -556,12 +411,7 @@ struct kgsl_device_getproperty { #define IOCTL_KGSL_DEVICE_GETPROPERTY \ _IOWR(KGSL_IOC_TYPE, 0x2, struct kgsl_device_getproperty) -/* IOCTL_KGSL_DEVICE_READ (0x3) - removed 03/2012 - */ -/* block until the GPU has executed past a given timestamp - * timeout is in milliseconds. - */ struct kgsl_device_waittimestamp { unsigned int timestamp; unsigned int timeout; @@ -579,35 +429,20 @@ struct kgsl_device_waittimestamp_ctxtid { #define IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID \ _IOW(KGSL_IOC_TYPE, 0x7, struct kgsl_device_waittimestamp_ctxtid) -/* DEPRECATED: issue indirect commands to the GPU. - * drawctxt_id must have been created with IOCTL_KGSL_DRAWCTXT_CREATE - * ibaddr and sizedwords must specify a subset of a buffer created - * with IOCTL_KGSL_SHAREDMEM_FROM_PMEM - * flags may be a mask of KGSL_CONTEXT_ values - * timestamp is a returned counter value which can be passed to - * other ioctls to determine when the commands have been executed by - * the GPU. - * - * This function is deprecated - consider using IOCTL_KGSL_SUBMIT_COMMANDS - * instead - */ struct kgsl_ringbuffer_issueibcmds { unsigned int drawctxt_id; unsigned long ibdesc_addr; unsigned int numibs; - unsigned int timestamp; /*output param */ + unsigned int timestamp; unsigned int flags; }; #define IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS \ _IOWR(KGSL_IOC_TYPE, 0x10, struct kgsl_ringbuffer_issueibcmds) -/* read the most recently executed timestamp value - * type should be a value from enum kgsl_timestamp_type - */ struct kgsl_cmdstream_readtimestamp { unsigned int type; - unsigned int timestamp; /*output param */ + unsigned int timestamp; }; #define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP_OLD \ @@ -616,11 +451,6 @@ struct kgsl_cmdstream_readtimestamp { #define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP \ _IOWR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp) -/* free memory when the GPU reaches a given timestamp. - * gpuaddr specify a memory region created by a - * IOCTL_KGSL_SHAREDMEM_FROM_PMEM call - * type should be a value from enum kgsl_timestamp_type - */ struct kgsl_cmdstream_freememontimestamp { unsigned long gpuaddr; unsigned int type; @@ -630,28 +460,18 @@ struct kgsl_cmdstream_freememontimestamp { #define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP \ _IOW(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp) -/* - * Previous versions of this header had incorrectly defined - * IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP as a read-only ioctl instead - * of a write only ioctl. To ensure binary compatibility, the following - * #define will be used to intercept the incorrect ioctl - */ #define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_OLD \ _IOR(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp) -/* create a draw context, which is used to preserve GPU state. - * The flags field may contain a mask KGSL_CONTEXT_* values - */ struct kgsl_drawctxt_create { unsigned int flags; - unsigned int drawctxt_id; /*output param */ + unsigned int drawctxt_id; }; #define IOCTL_KGSL_DRAWCTXT_CREATE \ _IOWR(KGSL_IOC_TYPE, 0x13, struct kgsl_drawctxt_create) -/* destroy a draw context */ struct kgsl_drawctxt_destroy { unsigned int drawctxt_id; }; @@ -659,16 +479,12 @@ struct kgsl_drawctxt_destroy { #define IOCTL_KGSL_DRAWCTXT_DESTROY \ _IOW(KGSL_IOC_TYPE, 0x14, struct kgsl_drawctxt_destroy) -/* - * add a block of pmem, fb, ashmem or user allocated address - * into the GPU address space - */ struct kgsl_map_user_mem { int fd; - unsigned long gpuaddr; /*output param */ + unsigned long gpuaddr; __kernel_size_t len; __kernel_size_t offset; - unsigned long hostptr; /*input param */ + unsigned long hostptr; enum kgsl_user_mem_type memtype; unsigned int flags; }; @@ -679,7 +495,7 @@ struct kgsl_map_user_mem { struct kgsl_cmdstream_readtimestamp_ctxtid { unsigned int context_id; unsigned int type; - unsigned int timestamp; /*output param */ + unsigned int timestamp; }; #define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP_CTXTID \ @@ -696,10 +512,9 @@ struct kgsl_cmdstream_freememontimestamp_ctxtid { _IOW(KGSL_IOC_TYPE, 0x17, \ struct kgsl_cmdstream_freememontimestamp_ctxtid) -/* add a block of pmem or fb into the GPU address space */ struct kgsl_sharedmem_from_pmem { int pmem_fd; - unsigned long gpuaddr; /*output param */ + unsigned long gpuaddr; unsigned int len; unsigned int offset; }; @@ -707,7 +522,6 @@ struct kgsl_sharedmem_from_pmem { #define IOCTL_KGSL_SHAREDMEM_FROM_PMEM \ _IOWR(KGSL_IOC_TYPE, 0x20, struct kgsl_sharedmem_from_pmem) -/* remove memory from the GPU's address space */ struct kgsl_sharedmem_free { unsigned long gpuaddr; }; @@ -757,15 +571,10 @@ struct kgsl_bind_gmem_shadow { #define IOCTL_KGSL_DRAWCTXT_BIND_GMEM_SHADOW \ _IOW(KGSL_IOC_TYPE, 0x22, struct kgsl_bind_gmem_shadow) -/* add a block of memory into the GPU address space */ -/* - * IOCTL_KGSL_SHAREDMEM_FROM_VMALLOC deprecated 09/2012 - * use IOCTL_KGSL_GPUMEM_ALLOC instead - */ struct kgsl_sharedmem_from_vmalloc { - unsigned long gpuaddr; /*output param */ + unsigned long gpuaddr; unsigned int hostptr; unsigned int flags; }; @@ -773,13 +582,6 @@ struct kgsl_sharedmem_from_vmalloc { #define IOCTL_KGSL_SHAREDMEM_FROM_VMALLOC \ _IOWR(KGSL_IOC_TYPE, 0x23, struct kgsl_sharedmem_from_vmalloc) -/* - * This is being deprecated in favor of IOCTL_KGSL_GPUMEM_CACHE_SYNC which - * supports both directions (flush and invalidate). This code will still - * work, but by definition it will do a flush of the cache which might not be - * what you want to have happen on a buffer following a GPU operation. It is - * safer to go with IOCTL_KGSL_GPUMEM_CACHE_SYNC - */ #define IOCTL_KGSL_SHAREDMEM_FLUSH_CACHE \ _IOW(KGSL_IOC_TYPE, 0x24, struct kgsl_sharedmem_free) @@ -795,13 +597,12 @@ struct kgsl_drawctxt_set_bin_base_offset { enum kgsl_cmdwindow_type { KGSL_CMDWINDOW_MIN = 0x00000000, KGSL_CMDWINDOW_2D = 0x00000000, - KGSL_CMDWINDOW_3D = 0x00000001, /* legacy */ + KGSL_CMDWINDOW_3D = 0x00000001, KGSL_CMDWINDOW_MMU = 0x00000002, KGSL_CMDWINDOW_ARBITER = 0x000000FF, KGSL_CMDWINDOW_MAX = 0x000000FF, }; -/* write to the command window */ struct kgsl_cmdwindow_write { enum kgsl_cmdwindow_type target; unsigned int addr; @@ -812,7 +613,7 @@ struct kgsl_cmdwindow_write { _IOW(KGSL_IOC_TYPE, 0x2e, struct kgsl_cmdwindow_write) struct kgsl_gpumem_alloc { - unsigned long gpuaddr; /* output param */ + unsigned long gpuaddr; __kernel_size_t size; unsigned int flags; }; @@ -823,49 +624,38 @@ struct kgsl_gpumem_alloc { struct kgsl_cff_syncmem { unsigned long gpuaddr; __kernel_size_t len; - unsigned int __pad[2]; /* For future binary compatibility */ + unsigned int __pad[2]; }; #define IOCTL_KGSL_CFF_SYNCMEM \ _IOW(KGSL_IOC_TYPE, 0x30, struct kgsl_cff_syncmem) -/* - * A timestamp event allows the user space to register an action following an - * expired timestamp. Note IOCTL_KGSL_TIMESTAMP_EVENT has been redefined to - * _IOWR to support fences which need to return a fd for the priv parameter. - */ struct kgsl_timestamp_event { - int type; /* Type of event (see list below) */ - unsigned int timestamp; /* Timestamp to trigger event on */ - unsigned int context_id; /* Context for the timestamp */ - void __user *priv; /* Pointer to the event specific blob */ - __kernel_size_t len; /* Size of the event specific blob */ + int type; + unsigned int timestamp; + unsigned int context_id; + void __user *priv; + __kernel_size_t len; }; #define IOCTL_KGSL_TIMESTAMP_EVENT_OLD \ _IOW(KGSL_IOC_TYPE, 0x31, struct kgsl_timestamp_event) -/* A genlock timestamp event releases an existing lock on timestamp expire */ #define KGSL_TIMESTAMP_EVENT_GENLOCK 1 struct kgsl_timestamp_event_genlock { - int handle; /* Handle of the genlock lock to release */ + int handle; }; -/* A fence timestamp event releases an existing lock on timestamp expire */ #define KGSL_TIMESTAMP_EVENT_FENCE 2 struct kgsl_timestamp_event_fence { - int fence_fd; /* Fence to signal */ + int fence_fd; }; -/* - * Set a property within the kernel. Uses the same structure as - * IOCTL_KGSL_GETPROPERTY - */ #define IOCTL_KGSL_SETPROPERTY \ _IOW(KGSL_IOC_TYPE, 0x32, struct kgsl_device_getproperty) @@ -873,70 +663,26 @@ struct kgsl_timestamp_event_fence { #define IOCTL_KGSL_TIMESTAMP_EVENT \ _IOWR(KGSL_IOC_TYPE, 0x33, struct kgsl_timestamp_event) -/** - * struct kgsl_gpumem_alloc_id - argument to IOCTL_KGSL_GPUMEM_ALLOC_ID - * @id: returned id value for this allocation. - * @flags: mask of KGSL_MEM* values requested and actual flags on return. - * @size: requested size of the allocation and actual size on return. - * @mmapsize: returned size to pass to mmap() which may be larger than 'size' - * @gpuaddr: returned GPU address for the allocation - * - * Allocate memory for access by the GPU. The flags and size fields are echoed - * back by the kernel, so that the caller can know if the request was - * adjusted. - * - * Supported flags: - * KGSL_MEMFLAGS_GPUREADONLY: the GPU will be unable to write to the buffer - * KGSL_MEMTYPE*: usage hint for debugging aid - * KGSL_MEMALIGN*: alignment hint, may be ignored or adjusted by the kernel. - * KGSL_MEMFLAGS_USE_CPU_MAP: If set on call and return, the returned GPU - * address will be 0. Calling mmap() will set the GPU address. - */ struct kgsl_gpumem_alloc_id { unsigned int id; unsigned int flags; __kernel_size_t size; __kernel_size_t mmapsize; unsigned long gpuaddr; -/* private: reserved for future use*/ unsigned long __pad[2]; }; #define IOCTL_KGSL_GPUMEM_ALLOC_ID \ _IOWR(KGSL_IOC_TYPE, 0x34, struct kgsl_gpumem_alloc_id) -/** - * struct kgsl_gpumem_free_id - argument to IOCTL_KGSL_GPUMEM_FREE_ID - * @id: GPU allocation id to free - * - * Free an allocation by id, in case a GPU address has not been assigned or - * is unknown. Freeing an allocation by id with this ioctl or by GPU address - * with IOCTL_KGSL_SHAREDMEM_FREE are equivalent. - */ struct kgsl_gpumem_free_id { unsigned int id; -/* private: reserved for future use*/ unsigned int __pad; }; #define IOCTL_KGSL_GPUMEM_FREE_ID \ _IOWR(KGSL_IOC_TYPE, 0x35, struct kgsl_gpumem_free_id) -/** - * struct kgsl_gpumem_get_info - argument to IOCTL_KGSL_GPUMEM_GET_INFO - * @gpuaddr: GPU address to query. Also set on return. - * @id: GPU allocation id to query. Also set on return. - * @flags: returned mask of KGSL_MEM* values. - * @size: returned size of the allocation. - * @mmapsize: returned size to pass mmap(), which may be larger than 'size' - * @useraddr: returned address of the userspace mapping for this buffer - * - * This ioctl allows querying of all user visible attributes of an existing - * allocation, by either the GPU address or the id returned by a previous - * call to IOCTL_KGSL_GPUMEM_ALLOC_ID. Legacy allocation ioctls may not - * return all attributes so this ioctl can be used to look them up if needed. - * - */ struct kgsl_gpumem_get_info { unsigned long gpuaddr; unsigned int id; @@ -944,27 +690,12 @@ struct kgsl_gpumem_get_info { __kernel_size_t size; __kernel_size_t mmapsize; unsigned long useraddr; -/* private: reserved for future use*/ unsigned long __pad[4]; }; #define IOCTL_KGSL_GPUMEM_GET_INFO\ _IOWR(KGSL_IOC_TYPE, 0x36, struct kgsl_gpumem_get_info) -/** - * struct kgsl_gpumem_sync_cache - argument to IOCTL_KGSL_GPUMEM_SYNC_CACHE - * @gpuaddr: GPU address of the buffer to sync. - * @id: id of the buffer to sync. Either gpuaddr or id is sufficient. - * @op: a mask of KGSL_GPUMEM_CACHE_* values - * @offset: offset into the buffer - * @length: number of bytes starting from offset to perform - * the cache operation on - * - * Sync the L2 cache for memory headed to and from the GPU - this replaces - * KGSL_SHAREDMEM_FLUSH_CACHE since it can handle cache management for both - * directions - * - */ struct kgsl_gpumem_sync_cache { unsigned long gpuaddr; unsigned int id; @@ -982,101 +713,45 @@ struct kgsl_gpumem_sync_cache { #define KGSL_GPUMEM_CACHE_FLUSH \ (KGSL_GPUMEM_CACHE_CLEAN | KGSL_GPUMEM_CACHE_INV) -/* Flag to ensure backwards compatibility of kgsl_gpumem_sync_cache struct */ #define KGSL_GPUMEM_CACHE_RANGE (1 << 31U) #define IOCTL_KGSL_GPUMEM_SYNC_CACHE \ _IOW(KGSL_IOC_TYPE, 0x37, struct kgsl_gpumem_sync_cache) -/** - * struct kgsl_perfcounter_get - argument to IOCTL_KGSL_PERFCOUNTER_GET - * @groupid: Performance counter group ID - * @countable: Countable to select within the group - * @offset: Return offset of the reserved LO counter - * @offset_hi: Return offset of the reserved HI counter - * - * Get an available performance counter from a specified groupid. The offset - * of the performance counter will be returned after successfully assigning - * the countable to the counter for the specified group. An error will be - * returned and an offset of 0 if the groupid is invalid or there are no - * more counters left. After successfully getting a perfcounter, the user - * must call kgsl_perfcounter_put(groupid, contable) when finished with - * the perfcounter to clear up perfcounter resources. - * - */ struct kgsl_perfcounter_get { unsigned int groupid; unsigned int countable; unsigned int offset; unsigned int offset_hi; -/* private: reserved for future use */ - unsigned int __pad; /* For future binary compatibility */ + + unsigned int __pad; }; #define IOCTL_KGSL_PERFCOUNTER_GET \ _IOWR(KGSL_IOC_TYPE, 0x38, struct kgsl_perfcounter_get) -/** - * struct kgsl_perfcounter_put - argument to IOCTL_KGSL_PERFCOUNTER_PUT - * @groupid: Performance counter group ID - * @countable: Countable to release within the group - * - * Put an allocated performance counter to allow others to have access to the - * resource that was previously taken. This is only to be called after - * successfully getting a performance counter from kgsl_perfcounter_get(). - * - */ struct kgsl_perfcounter_put { unsigned int groupid; unsigned int countable; -/* private: reserved for future use */ - unsigned int __pad[2]; /* For future binary compatibility */ + + unsigned int __pad[2]; }; #define IOCTL_KGSL_PERFCOUNTER_PUT \ _IOW(KGSL_IOC_TYPE, 0x39, struct kgsl_perfcounter_put) -/** - * struct kgsl_perfcounter_query - argument to IOCTL_KGSL_PERFCOUNTER_QUERY - * @groupid: Performance counter group ID - * @countable: Return active countables array - * @size: Size of active countables array - * @max_counters: Return total number counters for the group ID - * - * Query the available performance counters given a groupid. The array - * *countables is used to return the current active countables in counters. - * The size of the array is passed in so the kernel will only write at most - * size or counter->size for the group id. The total number of available - * counters for the group ID is returned in max_counters. - * If the array or size passed in are invalid, then only the maximum number - * of counters will be returned, no data will be written to *countables. - * If the groupid is invalid an error code will be returned. - * - */ struct kgsl_perfcounter_query { unsigned int groupid; - /* Array to return the current countable for up to size counters */ unsigned int __user *countables; unsigned int count; unsigned int max_counters; -/* private: reserved for future use */ - unsigned int __pad[2]; /* For future binary compatibility */ + + unsigned int __pad[2]; }; #define IOCTL_KGSL_PERFCOUNTER_QUERY \ _IOWR(KGSL_IOC_TYPE, 0x3A, struct kgsl_perfcounter_query) -/** - * struct kgsl_perfcounter_query - argument to IOCTL_KGSL_PERFCOUNTER_QUERY - * @groupid: Performance counter group IDs - * @countable: Performance counter countable IDs - * @value: Return performance counter reads - * @size: Size of all arrays (groupid/countable pair and return value) - * - * Read in the current value of a performance counter given by the groupid - * and countable. - * - */ struct kgsl_perfcounter_read_group { unsigned int groupid; @@ -1087,44 +762,23 @@ struct kgsl_perfcounter_read_group { struct kgsl_perfcounter_read { struct kgsl_perfcounter_read_group __user *reads; unsigned int count; -/* private: reserved for future use */ - unsigned int __pad[2]; /* For future binary compatibility */ + + unsigned int __pad[2]; }; #define IOCTL_KGSL_PERFCOUNTER_READ \ _IOWR(KGSL_IOC_TYPE, 0x3B, struct kgsl_perfcounter_read) -/* - * struct kgsl_gpumem_sync_cache_bulk - argument to - * IOCTL_KGSL_GPUMEM_SYNC_CACHE_BULK - * @id_list: list of GPU buffer ids of the buffers to sync - * @count: number of GPU buffer ids in id_list - * @op: a mask of KGSL_GPUMEM_CACHE_* values - * - * Sync the cache for memory headed to and from the GPU. Certain - * optimizations can be made on the cache operation based on the total - * size of the working set of memory to be managed. - */ struct kgsl_gpumem_sync_cache_bulk { unsigned int __user *id_list; unsigned int count; unsigned int op; -/* private: reserved for future use */ - unsigned int __pad[2]; /* For future binary compatibility */ + + unsigned int __pad[2]; }; #define IOCTL_KGSL_GPUMEM_SYNC_CACHE_BULK \ _IOWR(KGSL_IOC_TYPE, 0x3C, struct kgsl_gpumem_sync_cache_bulk) -/* - * struct kgsl_cmd_syncpoint_timestamp - * @context_id: ID of a KGSL context - * @timestamp: GPU timestamp - * - * This structure defines a syncpoint comprising a context/timestamp pair. A - * list of these may be passed by IOCTL_KGSL_SUBMIT_COMMANDS to define - * dependencies that must be met before the command can be submitted to the - * hardware - */ struct kgsl_cmd_syncpoint_timestamp { unsigned int context_id; unsigned int timestamp; @@ -1134,60 +788,22 @@ struct kgsl_cmd_syncpoint_fence { int fd; }; -/* - * struct kgsl_cmd_syncpoint_timeline - * @timelines: Address of an array of &struct kgsl_timeline_val - * @count: Number of entries in @timelines - * @timelines_size: Size of each entry in @timelines - * - * Define a syncpoint for a number of timelines. This syncpoint will - * be satisfied when all of the specified timelines are signaled. - */ struct kgsl_cmd_syncpoint_timeline { __u64 timelines; __u32 count; __u32 timelines_size; }; -/** - * struct kgsl_cmd_syncpoint - Define a sync point for a command batch - * @type: type of sync point defined here - * @priv: Pointer to the type specific buffer - * @size: Size of the type specific buffer - * - * This structure contains pointers defining a specific command sync point. - * The pointer and size should point to a type appropriate structure. - */ struct kgsl_cmd_syncpoint { int type; void __user *priv; __kernel_size_t size; }; -/* Flag to indicate that the cmdlist may contain memlists */ #define KGSL_IBDESC_MEMLIST 0x1 -/* Flag to point out the cmdbatch profiling buffer in the memlist */ #define KGSL_IBDESC_PROFILING_BUFFER 0x2 -/** - * struct kgsl_submit_commands - Argument to IOCTL_KGSL_SUBMIT_COMMANDS - * @context_id: KGSL context ID that owns the commands - * @flags: - * @cmdlist: User pointer to a list of kgsl_ibdesc structures - * @numcmds: Number of commands listed in cmdlist - * @synclist: User pointer to a list of kgsl_cmd_syncpoint structures - * @numsyncs: Number of sync points listed in synclist - * @timestamp: On entry the a user defined timestamp, on exist the timestamp - * assigned to the command batch - * - * This structure specifies a command to send to the GPU hardware. This is - * similar to kgsl_issueibcmds expect that it doesn't support the legacy way to - * submit IB lists and it adds sync points to block the IB until the - * dependencies are satisified. This entry point is the new and preferred way - * to submit commands to the GPU. The memory list can be used to specify all - * memory that is referrenced in the current set of commands. - */ struct kgsl_submit_commands { unsigned int context_id; @@ -1197,20 +813,12 @@ struct kgsl_submit_commands { struct kgsl_cmd_syncpoint __user *synclist; unsigned int numsyncs; unsigned int timestamp; -/* private: reserved for future use */ unsigned int __pad[4]; }; #define IOCTL_KGSL_SUBMIT_COMMANDS \ _IOWR(KGSL_IOC_TYPE, 0x3D, struct kgsl_submit_commands) -/** - * struct kgsl_device_constraint - device constraint argument - * @context_id: KGSL context ID - * @type: type of constraint i.e pwrlevel/none - * @data: constraint data - * @size: size of the constraint data - */ struct kgsl_device_constraint { unsigned int type; unsigned int context_id; @@ -1218,103 +826,55 @@ struct kgsl_device_constraint { __kernel_size_t size; }; -/* Constraint Type*/ #define KGSL_CONSTRAINT_NONE 0 #define KGSL_CONSTRAINT_PWRLEVEL 1 -/* L3 constraint Type */ #define KGSL_CONSTRAINT_L3_NONE 2 #define KGSL_CONSTRAINT_L3_PWRLEVEL 3 -/* PWRLEVEL constraint level*/ -/* set to min frequency */ #define KGSL_CONSTRAINT_PWR_MIN 0 -/* set to max frequency */ #define KGSL_CONSTRAINT_PWR_MAX 1 struct kgsl_device_constraint_pwrlevel { unsigned int level; }; -/** - * struct kgsl_syncsource_create - Argument to IOCTL_KGSL_SYNCSOURCE_CREATE - * @id: returned id for the syncsource that was created. - * - * This ioctl creates a userspace sync timeline. - */ struct kgsl_syncsource_create { unsigned int id; -/* private: reserved for future use */ unsigned int __pad[3]; }; #define IOCTL_KGSL_SYNCSOURCE_CREATE \ _IOWR(KGSL_IOC_TYPE, 0x40, struct kgsl_syncsource_create) -/** - * struct kgsl_syncsource_destroy - Argument to IOCTL_KGSL_SYNCSOURCE_DESTROY - * @id: syncsource id to destroy - * - * This ioctl creates a userspace sync timeline. - */ struct kgsl_syncsource_destroy { unsigned int id; -/* private: reserved for future use */ unsigned int __pad[3]; }; #define IOCTL_KGSL_SYNCSOURCE_DESTROY \ _IOWR(KGSL_IOC_TYPE, 0x41, struct kgsl_syncsource_destroy) -/** - * struct kgsl_syncsource_create_fence - Argument to - * IOCTL_KGSL_SYNCSOURCE_CREATE_FENCE - * @id: syncsource id - * @fence_fd: returned sync_fence fd - * - * Create a fence that may be signaled by userspace by calling - * IOCTL_KGSL_SYNCSOURCE_SIGNAL_FENCE. There are no order dependencies between - * these fences. - */ struct kgsl_syncsource_create_fence { unsigned int id; int fence_fd; -/* private: reserved for future use */ unsigned int __pad[4]; }; -/** - * struct kgsl_syncsource_signal_fence - Argument to - * IOCTL_KGSL_SYNCSOURCE_SIGNAL_FENCE - * @id: syncsource id - * @fence_fd: sync_fence fd to signal - * - * Signal a fence that was created by a IOCTL_KGSL_SYNCSOURCE_CREATE_FENCE - * call using the same syncsource id. This allows a fence to be shared - * to other processes but only signaled by the process owning the fd - * used to create the fence. - */ #define IOCTL_KGSL_SYNCSOURCE_CREATE_FENCE \ _IOWR(KGSL_IOC_TYPE, 0x42, struct kgsl_syncsource_create_fence) struct kgsl_syncsource_signal_fence { unsigned int id; int fence_fd; -/* private: reserved for future use */ unsigned int __pad[4]; }; #define IOCTL_KGSL_SYNCSOURCE_SIGNAL_FENCE \ _IOWR(KGSL_IOC_TYPE, 0x43, struct kgsl_syncsource_signal_fence) -/** - * struct kgsl_cff_sync_gpuobj - Argument to IOCTL_KGSL_CFF_SYNC_GPUOBJ - * @offset: Offset into the GPU object to sync - * @length: Number of bytes to sync - * @id: ID of the GPU object to sync - */ struct kgsl_cff_sync_gpuobj { __u64 offset; __u64 length; @@ -1324,16 +884,6 @@ struct kgsl_cff_sync_gpuobj { #define IOCTL_KGSL_CFF_SYNC_GPUOBJ \ _IOW(KGSL_IOC_TYPE, 0x44, struct kgsl_cff_sync_gpuobj) -/** - * struct kgsl_gpuobj_alloc - Argument to IOCTL_KGSL_GPUOBJ_ALLOC - * @size: Size in bytes of the object to allocate - * @flags: mask of KGSL_MEMFLAG_* bits - * @va_len: Size in bytes of the virtual region to allocate - * @mmapsize: Returns the mmap() size of the object - * @id: Returns the GPU object ID of the new object - * @metadata_len: Length of the metdata to copy from the user - * @metadata: Pointer to the user specified metadata to store for the object - */ struct kgsl_gpuobj_alloc { __u64 size; __u64 flags; @@ -1344,22 +894,11 @@ struct kgsl_gpuobj_alloc { __u64 metadata; }; -/* Let the user know that this header supports the gpuobj metadata */ #define KGSL_GPUOBJ_ALLOC_METADATA_MAX 64 #define IOCTL_KGSL_GPUOBJ_ALLOC \ _IOWR(KGSL_IOC_TYPE, 0x45, struct kgsl_gpuobj_alloc) -/** - * struct kgsl_gpuobj_free - Argument to IOCTL_KGLS_GPUOBJ_FREE - * @flags: Mask of: KGSL_GUPOBJ_FREE_ON_EVENT - * @priv: Pointer to the private object if KGSL_GPUOBJ_FREE_ON_EVENT is - * specified - * @id: ID of the GPU object to free - * @type: If KGSL_GPUOBJ_FREE_ON_EVENT is specified, the type of asynchronous - * event to free on - * @len: Length of the data passed in priv - */ struct kgsl_gpuobj_free { __u64 flags; __u64 __user priv; @@ -1373,21 +912,11 @@ struct kgsl_gpuobj_free { #define KGSL_GPU_EVENT_TIMESTAMP 1 #define KGSL_GPU_EVENT_FENCE 2 -/** - * struct kgsl_gpu_event_timestamp - Specifies a timestamp event to free a GPU - * object on - * @context_id: ID of the timestamp event to wait for - * @timestamp: Timestamp of the timestamp event to wait for - */ struct kgsl_gpu_event_timestamp { unsigned int context_id; unsigned int timestamp; }; -/** - * struct kgsl_gpu_event_fence - Specifies a fence ID to to free a GPU object on - * @fd: File descriptor for the fence - */ struct kgsl_gpu_event_fence { int fd; }; @@ -1395,15 +924,6 @@ struct kgsl_gpu_event_fence { #define IOCTL_KGSL_GPUOBJ_FREE \ _IOW(KGSL_IOC_TYPE, 0x46, struct kgsl_gpuobj_free) -/** - * struct kgsl_gpuobj_info - argument to IOCTL_KGSL_GPUOBJ_INFO - * @gpuaddr: GPU address of the object - * @flags: Current flags for the object - * @size: Size of the object - * @va_len: VA size of the object - * @va_addr: Virtual address of the object (if it is mapped) - * id - GPU object ID of the object to query - */ struct kgsl_gpuobj_info { __u64 gpuaddr; __u64 flags; @@ -1417,14 +937,6 @@ struct kgsl_gpuobj_info { _IOWR(KGSL_IOC_TYPE, 0x47, struct kgsl_gpuobj_info) -/** - * struct kgsl_gpuobj_import - argument to IOCTL_KGSL_GPUOBJ_IMPORT - * @priv: Pointer to the private data for the import type - * @priv_len: Length of the private data - * @flags: Mask of KGSL_MEMFLAG_ flags - * @type: Type of the import (KGSL_USER_MEM_TYPE_*) - * @id: Returns the ID of the new GPU object - */ struct kgsl_gpuobj_import { __u64 __user priv; __u64 priv_len; @@ -1433,18 +945,10 @@ struct kgsl_gpuobj_import { unsigned int id; }; -/** - * struct kgsl_gpuobj_import_dma_buf - import a dmabuf object - * @fd: File descriptor for the dma-buf object - */ struct kgsl_gpuobj_import_dma_buf { int fd; }; -/** - * struct kgsl_gpuobj_import_useraddr - import an object based on a useraddr - * @virtaddr: Virtual address of the object to import - */ struct kgsl_gpuobj_import_useraddr { __u64 virtaddr; }; @@ -1452,13 +956,6 @@ struct kgsl_gpuobj_import_useraddr { #define IOCTL_KGSL_GPUOBJ_IMPORT \ _IOWR(KGSL_IOC_TYPE, 0x48, struct kgsl_gpuobj_import) -/** - * struct kgsl_gpuobj_sync_obj - Individual GPU object to sync - * @offset: Offset within the GPU object to sync - * @length: Number of bytes to sync - * @id: ID of the GPU object to sync - * @op: Cache operation to execute - */ struct kgsl_gpuobj_sync_obj { __u64 offset; @@ -1467,12 +964,6 @@ struct kgsl_gpuobj_sync_obj { unsigned int op; }; -/** - * struct kgsl_gpuobj_sync - Argument for IOCTL_KGSL_GPUOBJ_SYNC - * @objs: Pointer to an array of kgsl_gpuobj_sync_obj structs - * @obj_len: Size of each item in the array - * @count: Number of items in the array - */ struct kgsl_gpuobj_sync { __u64 __user objs; @@ -1483,14 +974,6 @@ struct kgsl_gpuobj_sync { #define IOCTL_KGSL_GPUOBJ_SYNC \ _IOW(KGSL_IOC_TYPE, 0x49, struct kgsl_gpuobj_sync) -/** - * struct kgsl_command_object - GPU command object - * @offset: GPU address offset of the object - * @gpuaddr: GPU address of the object - * @size: Size of the object - * @flags: Current flags for the object - * @id - GPU command object ID - */ struct kgsl_command_object { __u64 offset; __u64 gpuaddr; @@ -1499,33 +982,12 @@ struct kgsl_command_object { unsigned int id; }; -/** - * struct kgsl_command_syncpoint - GPU syncpoint object - * @priv: Pointer to the type specific buffer - * @size: Size of the type specific buffer - * @type: type of sync point defined here - */ struct kgsl_command_syncpoint { __u64 __user priv; __u64 size; unsigned int type; }; -/** - * struct kgsl_command_object - Argument for IOCTL_KGSL_GPU_COMMAND - * @flags: Current flags for the object - * @cmdlist: List of kgsl_command_objects for submission - * @cmd_size: Size of kgsl_command_objects structure - * @numcmds: Number of kgsl_command_objects in command list - * @objlist: List of kgsl_command_objects for tracking - * @obj_size: Size of kgsl_command_objects structure - * @numobjs: Number of kgsl_command_objects in object list - * @synclist: List of kgsl_command_syncpoints - * @sync_size: Size of kgsl_command_syncpoint structure - * @numsyncs: Number of kgsl_command_syncpoints in syncpoint list - * @context_id: Context ID submittin ghte kgsl_gpu_command - * @timestamp: Timestamp for the submitted commands - */ struct kgsl_gpu_command { __u64 flags; __u64 __user cmdlist; @@ -1544,23 +1006,6 @@ struct kgsl_gpu_command { #define IOCTL_KGSL_GPU_COMMAND \ _IOWR(KGSL_IOC_TYPE, 0x4A, struct kgsl_gpu_command) -/** - * struct kgsl_preemption_counters_query - argument to - * IOCTL_KGSL_PREEMPTIONCOUNTER_QUERY - * @counters: Return preemption counters array - * @size_user: Size allocated by userspace - * @size_priority_level: Size of preemption counters for each - * priority level - * @max_priority_level: Return max number of priority levels - * - * Query the available preemption counters. The array counters - * is used to return preemption counters. The size of the array - * is passed in so the kernel will only write at most size_user - * or max available preemption counters. The total number of - * preemption counters is returned in max_priority_level. If the - * array or size passed in are invalid, then an error is - * returned back. - */ struct kgsl_preemption_counters_query { __u64 __user counters; unsigned int size_user; @@ -1571,16 +1016,6 @@ struct kgsl_preemption_counters_query { #define IOCTL_KGSL_PREEMPTIONCOUNTER_QUERY \ _IOWR(KGSL_IOC_TYPE, 0x4B, struct kgsl_preemption_counters_query) -/** - * struct kgsl_gpuobj_set_info - argument for IOCTL_KGSL_GPUOBJ_SET_INFO - * @flags: Flags to indicate which parameters to change - * @metadata: If KGSL_GPUOBJ_SET_INFO_METADATA is set, a pointer to the new - * metadata - * @id: GPU memory object ID to change - * @metadata_len: If KGSL_GPUOBJ_SET_INFO_METADATA is set, the length of the - * new metadata string - * @type: If KGSL_GPUOBJ_SET_INFO_TYPE is set, the new type of the memory object - */ #define KGSL_GPUOBJ_SET_INFO_METADATA (1 << 0) #define KGSL_GPUOBJ_SET_INFO_TYPE (1 << 1) @@ -1596,13 +1031,6 @@ struct kgsl_gpuobj_set_info { #define IOCTL_KGSL_GPUOBJ_SET_INFO \ _IOW(KGSL_IOC_TYPE, 0x4C, struct kgsl_gpuobj_set_info) -/** - * struct kgsl_sparse_phys_alloc - Argument for IOCTL_KGSL_SPARSE_PHYS_ALLOC - * @size: Size in bytes to back - * @pagesize: Pagesize alignment required - * @flags: Flags for this allocation - * @id: Returned ID for this allocation - */ struct kgsl_sparse_phys_alloc { __u64 size; __u64 pagesize; @@ -1613,10 +1041,6 @@ struct kgsl_sparse_phys_alloc { #define IOCTL_KGSL_SPARSE_PHYS_ALLOC \ _IOWR(KGSL_IOC_TYPE, 0x50, struct kgsl_sparse_phys_alloc) -/** - * struct kgsl_sparse_phys_free - Argument for IOCTL_KGSL_SPARSE_PHYS_FREE - * @id: ID to free - */ struct kgsl_sparse_phys_free { unsigned int id; }; @@ -1624,14 +1048,6 @@ struct kgsl_sparse_phys_free { #define IOCTL_KGSL_SPARSE_PHYS_FREE \ _IOW(KGSL_IOC_TYPE, 0x51, struct kgsl_sparse_phys_free) -/** - * struct kgsl_sparse_virt_alloc - Argument for IOCTL_KGSL_SPARSE_VIRT_ALLOC - * @size: Size in bytes to reserve - * @pagesize: Pagesize alignment required - * @flags: Flags for this allocation - * @id: Returned ID for this allocation - * @gpuaddr: Returned GPU address for this allocation - */ struct kgsl_sparse_virt_alloc { __u64 size; __u64 pagesize; @@ -1643,10 +1059,6 @@ struct kgsl_sparse_virt_alloc { #define IOCTL_KGSL_SPARSE_VIRT_ALLOC \ _IOWR(KGSL_IOC_TYPE, 0x52, struct kgsl_sparse_virt_alloc) -/** - * struct kgsl_sparse_virt_free - Argument for IOCTL_KGSL_SPARSE_VIRT_FREE - * @id: ID to free - */ struct kgsl_sparse_virt_free { unsigned int id; }; @@ -1654,14 +1066,6 @@ struct kgsl_sparse_virt_free { #define IOCTL_KGSL_SPARSE_VIRT_FREE \ _IOW(KGSL_IOC_TYPE, 0x53, struct kgsl_sparse_virt_free) -/** - * struct kgsl_sparse_binding_object - Argument for kgsl_sparse_bind - * @virtoffset: Offset into the virtual ID - * @physoffset: Offset into the physical ID (bind only) - * @size: Size in bytes to reserve - * @flags: Flags for this kgsl_sparse_binding_object - * @id: Physical ID to bind (bind only) - */ struct kgsl_sparse_binding_object { __u64 virtoffset; __u64 physoffset; @@ -1670,14 +1074,6 @@ struct kgsl_sparse_binding_object { unsigned int id; }; -/** - * struct kgsl_sparse_bind - Argument for IOCTL_KGSL_SPARSE_BIND - * @list: List of kgsl_sparse_bind_objects to bind/unbind - * @id: Virtual ID to bind/unbind - * @size: Size of kgsl_sparse_bind_object - * @count: Number of elements in list - * - */ struct kgsl_sparse_bind { __u64 __user list; unsigned int id; @@ -1688,20 +1084,6 @@ struct kgsl_sparse_bind { #define IOCTL_KGSL_SPARSE_BIND \ _IOW(KGSL_IOC_TYPE, 0x54, struct kgsl_sparse_bind) -/** - * struct kgsl_gpu_sparse_command - Argument for - * IOCTL_KGSL_GPU_SPARSE_COMMAND - * @flags: Current flags for the object - * @sparselist: List of kgsl_sparse_binding_object to bind/unbind - * @synclist: List of kgsl_command_syncpoints - * @sparsesize: Size of kgsl_sparse_binding_object - * @numsparse: Number of elements in list - * @sync_size: Size of kgsl_command_syncpoint structure - * @numsyncs: Number of kgsl_command_syncpoints in syncpoint list - * @context_id: Context ID submitting the kgsl_gpu_command - * @timestamp: Timestamp for the submitted commands - * @id: Virtual ID to bind/unbind - */ struct kgsl_gpu_sparse_command { __u64 flags; __u64 __user sparselist; @@ -1721,26 +1103,6 @@ struct kgsl_gpu_sparse_command { #define KGSL_GPUMEM_RANGE_OP_BIND 1 #define KGSL_GPUMEM_RANGE_OP_UNBIND 2 -/** - * struct kgsl_gpumem_bind_range - specifies a bind operation for a virtual - * buffer object - * @child_offset: Offset to the start of memory within the child buffer object - * (not used for KGSL_GPUMEM_RANGE_OP_UNBIND operations) - * @target_offset: GPU address offset within the target VBO - * @length: Amount of memory to map/unmap (in bytes) - * @child_id: The GPU buffer ID for the child object to map/unmap in the VBO - * @op: One of KGSL_GPUMEM_RANGE_OP_BIND or KGSL_GPUMEM_RANGE_OP_UNBIND - * - * This defines a specific bind operation to a virtual buffer object specified - * in &struct kgsl_gpumem_bind_ranges. When @op is KGSL_GPUMEM_RANGE_OP_BIND the - * physical memory starting at @child_offset in the memory object identified by - * @child_id will be mapped into the target virtual buffer object starting at - * @offset for @length bytes. - * - * When @op is KGSL_GPUMEM_RANGE_OP_UNBIND any entries in the target virtual - * buffer object between @offset and @length that belong to @child_id will be - * removed. - */ struct kgsl_gpumem_bind_range { __u64 child_offset; __u64 target_offset; @@ -1752,32 +1114,6 @@ struct kgsl_gpumem_bind_range { #define KGSL_GPUMEM_BIND_ASYNC (1UL << 0) #define KGSL_GPUMEM_BIND_FENCE_OUT (1UL << 1) -/** - * struct kgsl_gpumem_bind_ranges - Argument to IOCTL_KGSL_GPUMEM_BIND_RANGES to - * either map or unmap a child buffer object into a virtual buffer object. - * @ranges: User memory pointer to an array of range operations of type &struct - * kgsl_gpumem_bind_range - * @ranges_nents: Number of entries in @ranges - * @ranges_size: Size of each entry in @ranges in bytes - * @id: GPU buffer object identifier for the target virtual buffer object - * @flags: Bitmap of KGSL_GPUMEM_BIND_ASYNC and KGSL_GPUMEM_BIND_FENCE_OUT - * @fence_id: If KGSL_GPUMEM_BIND_FENCE_OUT is set in @flags contains the - * identifier for the sync fence that will be signaled after the operation - * completes - * - * Describes a number of range operations to perform on a virtual buffer object - * identified by @id. Ranges should be a __u64 representation of an array of - * &struct kgsl_gpumem_bind_range entries. @ranges_nents will contain the number - * of entries in the array, and @ranges_size will contain the size of each entry - * in the array. If KGSL_GPUMEM_BIND_ASYNC is set the operation will be - * performed asynchronously and the operation will immediately return to the - * user. Otherwise the calling context will block until the operation has - * completed. - * - * If KGSL_GPUMEM_BIND_ASYNC and KGSL_GPUMEM_BIND_FENCE_OUT are both set a sync - * fence will be created and returned in @fence_id. The fence will be signaled - * when the bind operation has completed. - */ struct kgsl_gpumem_bind_ranges { __u64 ranges; __u32 ranges_nents; @@ -1785,7 +1121,6 @@ struct kgsl_gpumem_bind_ranges { __u32 id; __u32 flags; int fence_id; - /* private: 64 bit compatibility */ __u32 padding; }; @@ -1794,81 +1129,23 @@ struct kgsl_gpumem_bind_ranges { #define KGSL_GPU_AUX_COMMAND_BIND (1 << 0) #define KGSL_GPU_AUX_COMMAND_TIMELINE (1 << 1) -/* Reuse the same flag that GPU COMMAND uses */ #define KGSL_GPU_AUX_COMMAND_SYNC KGSL_CMDBATCH_SYNC -/** - * struct kgsl_gpu_aux_command_bind - Descriptor for a GPU AUX bind command - * @rangeslist: Pointer to a list of &struct kgsl_gpumem_bind_range items - * @numranges Number of entries in @rangeslist - * @rangesize: Size of each entry in @rangeslist - * @target: The GPU memory ID for the target virtual buffer object - * - * Describe a GPU AUX command to bind ranges in a virtual buffer object. - * @rangeslist points to a &struct kgsl_gpumem_bind_ranges which is the same - * struct that is used by IOCTl_KGSL_GPUMEM_BIND_RANGES. @numrages is the size - * of the array in @rangeslist and @rangesize is the size of each entity in - * @rangeslist. @target points to the GPU ID for the target VBO object. - */ struct kgsl_gpu_aux_command_bind { __u64 rangeslist; __u64 numranges; __u64 rangesize; __u32 target; -/* private: Padding for 64 bit compatibility */ __u32 padding; }; -/** - * struct kgsl_aux_command_generic - Container for an AUX command - * @priv: Pointer to the type specific buffer - * @size: Size of the type specific buffer - * @type: type of sync point defined here - * - * Describes a generic container for GPU aux commands. @priv is a user pointer - * to the command struct matching @type of size @size. - */ struct kgsl_gpu_aux_command_generic { __u64 priv; __u64 size; __u32 type; -/* private: Padding for 64 bit compatibility */ __u32 padding; }; -/** - * struct kgsl_gpu_aux_command - Argument for IOCTL_KGSL_GPU_AUX_COMMAND - * @flags: flags for the object - * @cmdlist: List of &struct kgsl_gpu_aux_command_generic objects - * @cmd_size: Size of each entry in @cmdlist - * @numcmds: Number of entries in @cmdlist - * @synclist: List of &struct kgsl_command_syncpoint objects - * @syncsize: Size of each entry in @synclist - * @numsyncs: Number of entries in @synclist - * @context_id: ID of the context submtting the aux command - * @timestamp: Timestamp for the command submission - * - * Describe a GPU auxiliary command. Auxiliary commands are tasks that are not - * performed on hardware but can be queued like normal GPU commands. Like GPU - * commands AUX commands are assigned a timestamp and processed in order in the - * queue. They can also have standard sync objects attached. The only - * difference is that AUX commands usually perform some sort of administrative - * task in the CPU and are retired in the dispatcher. - * - * For bind operations flags must have one of the KGSL_GPU_AUX_COMMAND_* flags - * set. If sync objects are attached KGSL_GPU_AUX_COMMAND_SYNC must be set. - * @cmdlist points to an array of &struct kgsl_gpu_aux_command_generic structs - * which in turn will have a pointer to a specific command type. - * @numcmds is the number of commands in the list and @cmdsize is the size - * of each entity in @cmdlist. - * - * If KGSL_GPU_AUX_COMMAND_SYNC is specified @synclist will point to an array of - * &struct kgsl_command_syncpoint items in the same fashion as a GPU hardware - * command. @numsyncs and @syncsize describe the list. - * - * @context_id is the context that is submitting the command and @timestamp - * contains the timestamp for the operation. - */ struct kgsl_gpu_aux_command { __u64 flags; __u64 cmdlist; @@ -1884,59 +1161,24 @@ struct kgsl_gpu_aux_command { #define IOCTL_KGSL_GPU_AUX_COMMAND \ _IOWR(KGSL_IOC_TYPE, 0x57, struct kgsl_gpu_aux_command) -/** - * struct kgsl_timeline_create - Argument for IOCTL_KGSL_TIMELINE_CREATE - * @seqno: Initial sequence number for the timeline - * @id: Timeline identifier [out] - * - * Create a new semaphore timeline and return the identifier in @id. - * The identifier is global for the device and can be used to - * identify the timeline in all subsequent commands. - */ struct kgsl_timeline_create { __u64 seqno; __u32 id; -/* private: padding for 64 bit compatibility */ __u32 padding; }; #define IOCTL_KGSL_TIMELINE_CREATE \ _IOWR(KGSL_IOC_TYPE, 0x58, struct kgsl_timeline_create) -/** - * struct kgsl_timeline_val - A container to store a timeline/sequence number - * pair. - * @seqno: Sequence number to signal/query - * @timeline: The timeline identifier to signal/query - * - * A container to store a timeline/seqno pair used by the query and signal - * ioctls. - */ struct kgsl_timeline_val { __u64 seqno; __u32 timeline; -/* private: padding for 64 bit compatibility */ __u32 padding; }; #define KGSL_TIMELINE_WAIT_ALL 1 #define KGSL_TIMELINE_WAIT_ANY 2 -/** - * struct kgsl_timeline_wait - Argument for IOCTL_KGSL_TIMELINE_WAIT - * @tv_sec: Number of seconds to wait for the signal - * @tv_nsec: Number of nanoseconds to wait for the signal - * @timelines: Address of an array of &struct kgsl_timeline_val entries - * @count: Number of entries in @timeline - * @timelines_size: Size of each entry in @timelines - * @flags: One of KGSL_TIMELINE_WAIT_ALL or KGSL_TIMELINE_WAIT_ANY - * - * Wait for the timelines listed in @timelines to be signaled. If @flags is - * equal to KGSL_TIMELINE_WAIT_ALL then wait for all timelines or if - * KGSL_TIMELINE_WAIT_ANY is specified then wait for any of the timelines to - * signal. @tv_sec and @tv_nsec indicates the number of seconds and nanoseconds - * that the process should be blocked waiting for the signal. - */ struct kgsl_timeline_wait { __s64 tv_sec; __s64 tv_nsec; @@ -1944,7 +1186,6 @@ struct kgsl_timeline_wait { __u32 count; __u32 timelines_size; __u32 flags; -/* private: padding for 64 bit compatibility */ __u32 padding; }; @@ -1954,14 +1195,6 @@ struct kgsl_timeline_wait { #define IOCTL_KGSL_TIMELINE_QUERY \ _IOWR(KGSL_IOC_TYPE, 0x5A, struct kgsl_timeline_val) -/** - * struct kgsl_timeline_signal - argument for IOCTL_KGSL_TIMELINE_SIGNAL - * @timelines: Address of an array of &struct kgsl_timeline_val entries - * @count: Number of entries in @timelines - * @timelines_size: Size of each entry in @timelines - * - * Signal an array of timelines of type @struct kgsl_timeline_val. - */ struct kgsl_timeline_signal { __u64 timelines; __u32 count; @@ -1971,15 +1204,6 @@ struct kgsl_timeline_signal { #define IOCTL_KGSL_TIMELINE_SIGNAL \ _IOW(KGSL_IOC_TYPE, 0x5B, struct kgsl_timeline_signal) -/** - * struct kgsl_timeline_fence_get - argument for IOCTL_KGSL_TIMELINE_FENCE_GET - * @seqno: Sequence number for the fence - * @timeline: Timeline to create the fence on - * @handle: Contains the fence fd for a successful operation [out] - * - * Create a sync file descriptor for the seqnum on the timeline and return it in - * @handle. Can be polled and queried just like any other sync file descriptor - */ struct kgsl_timeline_fence_get { __u64 seqno; __u32 timeline; @@ -1988,34 +1212,18 @@ struct kgsl_timeline_fence_get { #define IOCTL_KGSL_TIMELINE_FENCE_GET \ _IOWR(KGSL_IOC_TYPE, 0x5C, struct kgsl_timeline_fence_get) -/** - * IOCTL_KGSL_TIMELINE_DESTROY takes a u32 identifier for the timeline to - * destroy - */ #define IOCTL_KGSL_TIMELINE_DESTROY _IOW(KGSL_IOC_TYPE, 0x5D, __u32) -/** - * struct kgsl_gpu_aux_command_timeline - An aux command for timeline signals - * @timelines: An array of &struct kgsl_timeline_val elements - * @count: The number of entries in @timelines - * @timelines_size: The size of each element in @timelines - * - * An aux command for timeline signals that can be pointed to by - * &struct kgsl_aux_command_generic when the type is - * KGSL_GPU_AUX_COMMAND_TIMELINE. - */ struct kgsl_gpu_aux_command_timeline { __u64 timelines; __u32 count; __u32 timelines_size; }; -/* Macros for fault type used in kgsl_fault structure */ #define KGSL_FAULT_TYPE_NO_FAULT 0 #define KGSL_FAULT_TYPE_PAGEFAULT 1 #define KGSL_FAULT_TYPE_MAX 2 -/* Macros to be used in kgsl_pagefault_report structure */ #define KGSL_PAGEFAULT_TYPE_NONE 0 #define KGSL_PAGEFAULT_TYPE_READ (1 << 0) #define KGSL_PAGEFAULT_TYPE_WRITE (1 << 1) @@ -2024,87 +1232,32 @@ struct kgsl_gpu_aux_command_timeline { #define KGSL_PAGEFAULT_TYPE_EXTERNAL (1 << 4) #define KGSL_PAGEFAULT_TYPE_TRANSACTION_STALLED (1 << 5) -/** - * struct kgsl_pagefault_report - Descriptor for each page fault - * @fault_addr: page fault address - * @fault_type: type of page fault - * - * Contains information about supported GPU page fault. - * Supported fault type: KGSL_PAGEFAULT_TYPE_* - */ struct kgsl_pagefault_report { __u64 fault_addr; - /* private: reserved for future use */ __u64 reserved[2]; __u32 fault_type; - /* private: padding for 64 bit compatibility */ __u32 __pad; }; -/** - * struct kgsl_fault - Descriptor for each GPU fault type - * @fault: User memory pointer to list of specific fault type - * @type: Type of gpu fault - * @count: Number of entries in @fault - * @size: Size of each entry in @fault in bytes - * - * Contains information about each GPU fault type. If user passes 0 for all the fields, KGSL - * will return the @count and @type of fault. Based on this, user can allocate a buffer for - * specific fault type, fill the @fault and specify the structure size of type specific fault - * in @size. User can walk through @fault list to parse the fault type specific information. - * - * Supported type: KGSL_FAULT_TYPE_* - */ struct kgsl_fault { __u64 fault; __u32 type; __u32 count; __u32 size; - /* private: padding for 64 bit compatibility */ __u32 padding; }; -/** - * struct kgsl_fault_report - Container for list of GPU faults - * @faultlist: User memory pointer to list of fault descriptor &struct kgsl_fault - * @faultnents: Number of entries in @faultlist. Each entry corresponds to a fault type i.e. - * KGSL_FAULT_TYPE_* - * @faultsize: Size of each entry in @faultlist in bytes - * @context_id: ID of a KGSL context - * - * Returns a list of GPU faults for a context identified by @context_id. If the user specifies - * @context_id only, then KGSL will set the @faultnents to the number of fault types it has - * for that context. - * - * User is expected to allocate an array of @struct kgsl_fault with @faultnents number of entries - * and fill the @faultlist field. On calling @IOCTL_KGSL_GET_FAULT_REPORT, KGSL will return the - * type and count for each fault. Based on this, user needs to update the @kgsl_fault structure. - * Then, it should call the @IOCTL_KGSL_GET_FAULT_REPORT again for kernel to fill the fault - * information. - */ struct kgsl_fault_report { __u64 faultlist; __u32 faultnents; __u32 faultsize; __u32 context_id; - /* private: padding for 64 bit compatibility */ __u32 padding; }; #define IOCTL_KGSL_GET_FAULT_REPORT \ _IOWR(KGSL_IOC_TYPE, 0x5E, struct kgsl_fault_report) -/** - * struct kgsl_recurring_object - Argument for IOCTL_KGSL_RECURRING_COMMAND - * @flags: Current flags for the object - * @cmdlist: List of kgsl_command_objects for submission - * @cmd_size: Size of kgsl_command_objects structure - * @numcmds: Number of kgsl_command_objects in command list - * @objlist: List of kgsl_command_objects for tracking - * @obj_size: Size of kgsl_command_objects structure - * @numobjs: Number of kgsl_command_objects in object list - * @context_id: Context ID submitting the kgsl_recurring_command - */ struct kgsl_recurring_command { __u64 flags; __u64 __user cmdlist; @@ -2114,11 +1267,10 @@ struct kgsl_recurring_command { __u32 objsize; __u32 numobjs; __u32 context_id; - /* private: Padding for 64 bit compatibility */ __u32 padding; }; #define IOCTL_KGSL_RECURRING_COMMAND \ _IOWR(KGSL_IOC_TYPE, 0x5F, struct kgsl_recurring_command) -#endif /* _UAPI_MSM_KGSL_H */ \ No newline at end of file +#endif \ No newline at end of file diff --git a/app/src/main/cpp/adrenotools/src/hook/meson.build b/app/src/main/cpp/adrenotools/src/hook/meson.build index 0bb6eb3907..4ea88a7ddd 100644 --- a/app/src/main/cpp/adrenotools/src/hook/meson.build +++ b/app/src/main/cpp/adrenotools/src/hook/meson.build @@ -1,32 +1,12 @@ hook_impl_files = files(['hook_impl.cpp', 'hook_impl.h', 'hook_impl_params.h']) hook_impl_inc = include_directories('../../include') -# hook_impl_lib = shared_library('hook_impl', 'hook_impl.cpp', 'hook_impl.h', 'hook_impl_params.h') -# target_compile_options(['hook_impl', 'PRIVATE', '-Wall', '-Wextra']) -# target_link_libraries(['hook_impl', 'linkernsbypass', 'log']) -# target_include_directories(['hook_impl', 'PRIVATE', '../../include']) -# set_target_properties(['hook_impl', 'PROPERTIES', 'CXX_VISIBILITY_PRESET', 'hidden']) main_hook_files = files(['main_hook.c']) -# main_hook_lib = shared_library('main_hook', 'main_hook.c') -# target_compile_options(['main_hook', 'PRIVATE', '-Wall', '-Wextra']) -# target_link_options(['main_hook', 'PRIVATE', '-z', 'global']) -# target_link_libraries(['main_hook', 'hook_impl']) -# set_target_properties(['main_hook', 'PROPERTIES', 'CXX_VISIBILITY_PRESET', 'hidden']) file_redirect_hook_files = files(['file_redirect_hook.c']) -# file_redirect_hook_lib = shared_library('file_redirect_hook', 'file_redirect_hook.c') -# target_compile_options(['file_redirect_hook', 'PRIVATE', '-Wall', '-Wextra']) -# target_link_options(['file_redirect_hook', 'PRIVATE', '-z', 'global']) -# target_link_libraries(['file_redirect_hook', 'hook_impl']) -# set_target_properties(['file_redirect_hook', 'PROPERTIES', 'CXX_VISIBILITY_PRESET', 'hidden']) gsl_alloc_hook_files = files(['gsl_alloc_hook.c']) -# gsl_alloc_hook_lib = shared_library('gsl_alloc_hook', 'gsl_alloc_hook.c') -# target_compile_options(['gsl_alloc_hook', 'PRIVATE', '-Wall', '-Wextra']) -# target_link_options(['gsl_alloc_hook', 'PRIVATE', '-z', 'global']) -# target_link_libraries(['gsl_alloc_hook', 'hook_impl']) -# set_target_properties(['gsl_alloc_hook', 'PROPERTIES', 'CXX_VISIBILITY_PRESET', 'hidden']) hook_impl_lib = shared_library( 'hook_impl', diff --git a/app/src/main/cpp/adrenotools/tools/acc-shim/vk_acc_shim.cpp b/app/src/main/cpp/adrenotools/tools/acc-shim/vk_acc_shim.cpp index 2bccb05347..4c5b89ccca 100644 --- a/app/src/main/cpp/adrenotools/tools/acc-shim/vk_acc_shim.cpp +++ b/app/src/main/cpp/adrenotools/tools/acc-shim/vk_acc_shim.cpp @@ -5,7 +5,6 @@ thread_local int satisfy_driver_emutls; -// Check libllvm-glnext.so in older drivers for a full list of these, newer ones are slightly more awkward due to the split enum class OptionType : uint32_t { ArgsStringList = 1, QcArgsString = 4, @@ -21,7 +20,6 @@ struct StringListVal { struct Option { OptionType type; - // PAD union { bool boolVal; int intVal; @@ -49,7 +47,6 @@ int CompileHook(void *state, OptionsSet *opts) { Option replacementOpts[ReplacementOptsNum]; uint32_t patchedOptNum{}; - // Insert your desired args here - results will be written to stderr const char *argv[] = {"-help", "-help-hidden", "", NULL }; StringListVal listVal{ .len = 3, @@ -83,7 +80,6 @@ int CompileHook(void *state, OptionsSet *opts) { struct LlvmInterface { uint32_t unk0[3]; - // PAD void *makeContext; void *delContext; decltype(CompileHook) *compile; diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/QtiGrallocDefs.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/QtiGrallocDefs.h index e0ccbe1d25..8dcdaa5bf2 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/QtiGrallocDefs.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/QtiGrallocDefs.h @@ -30,53 +30,31 @@ #ifndef __QTIGRALLOCDEFS_H__ #define __QTIGRALLOCDEFS_H__ -// From gralloc_priv.h -/* Gralloc usage bits indicating the type of allocation that should be used */ -/* Refer to BufferUsage in hardware/interfaces/graphics/common//types.hal */ -/* The bits below are in officially defined vendor space - * i.e bits 28-31 and 48-63*/ -/* Non linear, Universal Bandwidth Compression */ #define GRALLOC_USAGE_PRIVATE_ALLOC_UBWC (UINT32_C(1) << 28) -/* Set this for allocating uncached memory (using O_DSYNC), - * cannot be used with noncontiguous heaps */ #define GRALLOC_USAGE_PRIVATE_UNCACHED (UINT32_C(1) << 29) -/* This flag is used to indicate 10 bit format. - * When both GRALLOC_USAGE_PRIVATE_ALLOC_UBWC & GRALLOC_USAGE_PRIVATE_10BIT - * are set then it will indicate UBWC_TP10 format. - * When only GRALLOC_USAGE_PRIVATE_10BIT is set it will indicate linear P010 format. - */ #define GRALLOC_USAGE_PRIVATE_10BIT (UINT32_C(1) << 30) -/* This flag is used for SECURE display usecase */ #define GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY (UINT32_C(1) << 31) -/* This flag is used to indicate video NV21 format */ #define GRALLOC_USAGE_PRIVATE_VIDEO_NV21_ENCODER 1ULL << 48 -/* unused legacy flags */ #define GRALLOC_USAGE_PRIVATE_MM_HEAP 0 #define GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 0 -/* This flag is set for WFD usecase */ #define GRALLOC_USAGE_PRIVATE_WFD 1ULL << 51 -/* This flag is set for HEIF usecase */ #define GRALLOC_USAGE_PRIVATE_HEIF (UINT32_C(1) << 27) -/* TODO(user): Remove when clients stop referencing this flag */ #define GRALLOC_USAGE_PRIVATE_10BIT_TP 0 -/* This flag indicates PI format is being used */ #define GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI 1ULL << 49 -/* This flag is set while CDSP accesses the buffer */ #define GRALLOC_USAGE_PRIVATE_CDSP 1ULL << 50 -// OEM specific HAL formats #define HAL_PIXEL_FORMAT_RGBA_5551 6 #define HAL_PIXEL_FORMAT_RGBA_4444 7 #define HAL_PIXEL_FORMAT_NV12_ENCODEABLE 0x102 @@ -98,7 +76,6 @@ #define HAL_PIXEL_FORMAT_RAW8 0x123 #define HAL_PIXEL_FORMAT_NV12_HEIF 0x116 -// 10 bit #define HAL_PIXEL_FORMAT_ARGB_2101010 0x117 #define HAL_PIXEL_FORMAT_RGBX_1010102 0x118 #define HAL_PIXEL_FORMAT_XRGB_2101010 0x119 @@ -106,7 +83,7 @@ #define HAL_PIXEL_FORMAT_ABGR_2101010 0x11B #define HAL_PIXEL_FORMAT_BGRX_1010102 0x11C #define HAL_PIXEL_FORMAT_XBGR_2101010 0x11D -#define HAL_PIXEL_FORMAT_YCbCr_420_P010 0x36 // HAL_PIXEL_FORMAT_YCBCR_P010 +#define HAL_PIXEL_FORMAT_YCbCr_420_P010 0x36 #define HAL_PIXEL_FORMAT_YCbCr_420_P010_UBWC 0x124 #define HAL_PIXEL_FORMAT_YCbCr_420_P010_VENUS 0x7FA30C0A @@ -115,7 +92,6 @@ #define HAL_PIXEL_FORMAT_INTERLACE 0x180 -// Camera utils format #define HAL_PIXEL_FORMAT_NV12_LINEAR_FLEX 0x125 #define HAL_PIXEL_FORMAT_NV12_UBWC_FLEX 0x126 #define HAL_PIXEL_FORMAT_MULTIPLANAR_FLEX 0x127 @@ -123,22 +99,16 @@ #define HAL_PIXEL_FORMAT_NV12_UBWC_FLEX_4_BATCH 0x129 #define HAL_PIXEL_FORMAT_NV12_UBWC_FLEX_8_BATCH 0x130 -// FSC Formats #define HAL_PIXEL_FORMAT_RGB888_UBWC_FSC 0x131 #define HAL_PIXEL_FORMAT_RGB101010_UBWC_FSC 0x132 -// v4l2_fourcc('Y', 'U', 'Y', 'L'). 24 bpp YUYV 4:2:2 10 bit per component #define HAL_PIXEL_FORMAT_YCbCr_422_I_10BIT 0x4C595559 -// v4l2_fourcc('Y', 'B', 'W', 'C'). 10 bit per component. This compressed -// format reduces the memory access bandwidth #define HAL_PIXEL_FORMAT_YCbCr_422_I_10BIT_COMPRESSED 0x43574259 -// UBWC aligned Venus format #define HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC 0x7FA30C06 #define HAL_PIXEL_FORMAT_YCbCr_420_TP10_UBWC 0x7FA30C09 -// Khronos ASTC formats #define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 #define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 #define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 @@ -170,4 +140,4 @@ enum { BUFFER_TYPE_UI = 0, BUFFER_TYPE_VIDEO }; -#endif //__QTIGRALLOCDEFS_H__ +#endif diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/common.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/common.h index 73e80cb1d6..a6dd7366d6 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/common.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/common.h @@ -26,7 +26,6 @@ using namespace android::hardware; using namespace android; -/* Simplified version of hidl::base::V1_0::IBase */ struct IBase : virtual public RefBase { virtual bool isRemote() const; diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_adreno_info.cpp b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_adreno_info.cpp index 30610e810d..3a77d92740 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_adreno_info.cpp +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_adreno_info.cpp @@ -80,8 +80,6 @@ AdrenoMemInfo::AdrenoMemInfo() { ALOGE(" Failed to load libadreno_utils.so"); } - // Check if the overriding property debug.gralloc.gfx_ubwc_disable - // that disables UBWC allocations for the graphics stack is set char property[PROPERTY_VALUE_MAX]; property_get(DISABLE_UBWC_PROP, property, "0"); if (!(strncmp(property, "1", PROPERTY_VALUE_MAX)) || @@ -123,16 +121,13 @@ void AdrenoMemInfo::AlignUnCompressedRGB(int width, int height, int format, int break; } - int raster_mode = 0; // Adreno unknown raster mode. - int padding_threshold = 512; // Threshold for padding surfaces. - // the function below computes aligned width and aligned height - // based on linear or macro tile mode selected. + int raster_mode = 0; + int padding_threshold = 512; + + if (LINK_adreno_compute_fmt_aligned_width_and_height) { - // We call into adreno_utils only for RGB formats. So plane_id is 0 and - // num_samples is 1 always. We may have to add uitility function to - // find out these if there is a need to call this API for YUV formats. LINK_adreno_compute_fmt_aligned_width_and_height( - width, height, 0 /*plane_id*/, GetGpuPixelFormat(format), 1 /*num_samples*/, tile_enabled, + width, height, 0 , GetGpuPixelFormat(format), 1 , tile_enabled, raster_mode, padding_threshold, reinterpret_cast(aligned_w), reinterpret_cast(aligned_h)); } else if (LINK_adreno_compute_aligned_width_and_height) { @@ -140,7 +135,7 @@ void AdrenoMemInfo::AlignUnCompressedRGB(int width, int height, int format, int width, height, bpp, tile_enabled, raster_mode, padding_threshold, reinterpret_cast(aligned_w), reinterpret_cast(aligned_h)); } else if (LINK_adreno_compute_padding) { - int surface_tile_height = 1; // Linear surface + int surface_tile_height = 1; *aligned_w = UINT(LINK_adreno_compute_padding(width, bpp, surface_tile_height, raster_mode, padding_threshold)); ALOGW("%s: Warning!! Old GFX API is used to calculate stride", __FUNCTION__); @@ -157,9 +152,9 @@ void AdrenoMemInfo::AlignCompressedRGB(int width, int height, int format, unsign unsigned int* aligned_h) { if (LINK_adreno_compute_compressedfmt_aligned_width_and_height) { int bytesPerPixel = 0; - int raster_mode = 0; // Adreno unknown raster mode. - int padding_threshold = 512; // Threshold for padding - // surfaces. + int raster_mode = 0; + int padding_threshold = 512; + LINK_adreno_compute_compressedfmt_aligned_width_and_height( width, height, format, 0, raster_mode, padding_threshold, reinterpret_cast(aligned_w), @@ -341,4 +336,4 @@ bool AdrenoMemInfo::IsPISupportedByGPU(int format, uint64_t usage) { return false; } -} // namespace gralloc +} diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_adreno_info.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_adreno_info.h index 590d18ba67..f5281bc1c6 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_adreno_info.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_adreno_info.h @@ -35,11 +35,10 @@ namespace gralloc { -// Adreno Pixel Formats typedef enum { ADRENO_PIXELFORMAT_UNKNOWN = 0, ADRENO_PIXELFORMAT_R16G16B16A16_FLOAT = 10, - ADRENO_PIXELFORMAT_R10G10B10A2_UNORM = 24, // Vertex, Normalized GL_UNSIGNED_INT_10_10_10_2_OES + ADRENO_PIXELFORMAT_R10G10B10A2_UNORM = 24, ADRENO_PIXELFORMAT_R8G8B8A8 = 28, ADRENO_PIXELFORMAT_R8G8B8A8_SRGB = 29, ADRENO_PIXELFORMAT_D32_FLOAT = 40, @@ -55,140 +54,87 @@ typedef enum { ADRENO_PIXELFORMAT_P010 = 104, ADRENO_PIXELFORMAT_YUY2 = 107, ADRENO_PIXELFORMAT_B4G4R4A4 = 115, - ADRENO_PIXELFORMAT_NV12_EXT = 506, // NV12 with non-std alignment and offsets - ADRENO_PIXELFORMAT_R8G8B8X8 = 507, // GL_RGB8 (Internal) - ADRENO_PIXELFORMAT_R8G8B8 = 508, // GL_RGB8 - ADRENO_PIXELFORMAT_A1B5G5R5 = 519, // GL_RGB5_A1 - ADRENO_PIXELFORMAT_R8G8B8X8_SRGB = 520, // GL_SRGB8 - ADRENO_PIXELFORMAT_R8G8B8_SRGB = 521, // GL_SRGB8 + ADRENO_PIXELFORMAT_NV12_EXT = 506, + ADRENO_PIXELFORMAT_R8G8B8X8 = 507, + ADRENO_PIXELFORMAT_R8G8B8 = 508, + ADRENO_PIXELFORMAT_A1B5G5R5 = 519, + ADRENO_PIXELFORMAT_R8G8B8X8_SRGB = 520, + ADRENO_PIXELFORMAT_R8G8B8_SRGB = 521, ADRENO_PIXELFORMAT_A2B10G10R10_UNORM = 532, - // Vertex, Normalized GL_UNSIGNED_INT_10_10_10_2_OES ADRENO_PIXELFORMAT_R10G10B10X2_UNORM = 537, ADRENO_PIXELFORMAT_D24_UNORM_X8_UINT = 548, ADRENO_PIXELFORMAT_D24_UNORM = 549, ADRENO_PIXELFORMAT_D32_FLOAT_X24S8_UINT = 551, ADRENO_PIXELFORMAT_S8_UINT = 552, - ADRENO_PIXELFORMAT_ASTC_4X4 = 568, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_5X4 = 569, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_5X5 = 570, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_6X5 = 571, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_6X6 = 572, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_8X5 = 573, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_8X6 = 574, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_8X8 = 575, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_10X5 = 576, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_10X6 = 577, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_10X8 = 578, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_10X10 = 579, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_12X10 = 580, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_12X12 = 581, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_4X4_SRGB = 582, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_5X4_SRGB = 583, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_5X5_SRGB = 584, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_6X5_SRGB = 585, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_6X6_SRGB = 586, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_8X5_SRGB = 587, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_8X6_SRGB = 588, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_8X8_SRGB = 589, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_10X5_SRGB = 590, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_10X6_SRGB = 591, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_10X8_SRGB = 592, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_10X10_SRGB = 593, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_12X10_SRGB = 594, // ASTC Compressed - ADRENO_PIXELFORMAT_ASTC_12X12_SRGB = 595, // ASTC Compressed - // Vertex, Normalized GL_UNSIGNED_INT_10_10_10_2_OES - ADRENO_PIXELFORMAT_R5G6B5 = 610, // RGBA version of B5G6R5 - ADRENO_PIXELFORMAT_R5G5B5A1 = 611, // RGBA version of B5G5R5A1 - ADRENO_PIXELFORMAT_R4G4B4A4 = 612, // RGBA version of B4G4R4A4 - ADRENO_PIXELFORMAT_UYVY = 614, // YUV 4:2:2 packed progressive (1 plane) + ADRENO_PIXELFORMAT_ASTC_4X4 = 568, + ADRENO_PIXELFORMAT_ASTC_5X4 = 569, + ADRENO_PIXELFORMAT_ASTC_5X5 = 570, + ADRENO_PIXELFORMAT_ASTC_6X5 = 571, + ADRENO_PIXELFORMAT_ASTC_6X6 = 572, + ADRENO_PIXELFORMAT_ASTC_8X5 = 573, + ADRENO_PIXELFORMAT_ASTC_8X6 = 574, + ADRENO_PIXELFORMAT_ASTC_8X8 = 575, + ADRENO_PIXELFORMAT_ASTC_10X5 = 576, + ADRENO_PIXELFORMAT_ASTC_10X6 = 577, + ADRENO_PIXELFORMAT_ASTC_10X8 = 578, + ADRENO_PIXELFORMAT_ASTC_10X10 = 579, + ADRENO_PIXELFORMAT_ASTC_12X10 = 580, + ADRENO_PIXELFORMAT_ASTC_12X12 = 581, + ADRENO_PIXELFORMAT_ASTC_4X4_SRGB = 582, + ADRENO_PIXELFORMAT_ASTC_5X4_SRGB = 583, + ADRENO_PIXELFORMAT_ASTC_5X5_SRGB = 584, + ADRENO_PIXELFORMAT_ASTC_6X5_SRGB = 585, + ADRENO_PIXELFORMAT_ASTC_6X6_SRGB = 586, + ADRENO_PIXELFORMAT_ASTC_8X5_SRGB = 587, + ADRENO_PIXELFORMAT_ASTC_8X6_SRGB = 588, + ADRENO_PIXELFORMAT_ASTC_8X8_SRGB = 589, + ADRENO_PIXELFORMAT_ASTC_10X5_SRGB = 590, + ADRENO_PIXELFORMAT_ASTC_10X6_SRGB = 591, + ADRENO_PIXELFORMAT_ASTC_10X8_SRGB = 592, + ADRENO_PIXELFORMAT_ASTC_10X10_SRGB = 593, + ADRENO_PIXELFORMAT_ASTC_12X10_SRGB = 594, + ADRENO_PIXELFORMAT_ASTC_12X12_SRGB = 595, + + ADRENO_PIXELFORMAT_R5G6B5 = 610, + ADRENO_PIXELFORMAT_R5G5B5A1 = 611, + ADRENO_PIXELFORMAT_R4G4B4A4 = 612, + ADRENO_PIXELFORMAT_UYVY = 614, ADRENO_PIXELFORMAT_NV21 = 619, - ADRENO_PIXELFORMAT_Y8U8V8A8 = 620, // YUV 4:4:4 packed (1 plane) - ADRENO_PIXELFORMAT_Y8 = 625, // Single 8-bit luma only channel YUV format - ADRENO_PIXELFORMAT_TP10 = 654, // YUV 4:2:0 planar 10 bits/comp (2 planes) + ADRENO_PIXELFORMAT_Y8U8V8A8 = 620, + ADRENO_PIXELFORMAT_Y8 = 625, + ADRENO_PIXELFORMAT_TP10 = 654, } ADRENOPIXELFORMAT; typedef enum { - SURFACE_TILE_MODE_DISABLE = 0x0, // used for linear surface - SURFACE_TILE_MODE_ENABLE = 0x1 // used for tiled surface + SURFACE_TILE_MODE_DISABLE = 0x0, + SURFACE_TILE_MODE_ENABLE = 0x1 } surface_tile_mode_t; class AdrenoMemInfo { public: - /* - * Function to compute aligned width and aligned height based on - * width, height, format and usage flags. - * - * @return aligned width, aligned height - */ void GetAlignedWidthAndHeight(int width, int height, int format, int usage, unsigned int* aligned_w, unsigned int* aligned_h, bool ubwc_enabled, bool tile_enabled); - /* - * Function to compute the adreno aligned width and aligned height - * based on the width and format. - * - * @return aligned width, aligned height - */ void AlignUnCompressedRGB(int width, int height, int format, int tileEnabled, unsigned int* aligned_w, unsigned int* aligned_h); - /* - * Function to compute the adreno aligned width and aligned height - * based on the width and format. - * - * @return aligned width, aligned height - */ void AlignCompressedRGB(int width, int height, int format, unsigned int* aligned_w, unsigned int* aligned_h); - /* - * Function to compute the pixel alignment requirement. - * - * @return alignment - */ uint32_t GetGpuPixelAlignment(); - /* - * Function to query whether GPU supports UBWC for given HAL format - * @return > 0 : supported - * 0 : not supported - */ bool IsUBWCSupportedByGPU(int format); - /* - * Function to check if GPU supports PI or not - */ bool IsPISupportedByGPU(int format, uint64_t usage); - /* - * Function to get the corresponding Adreno format for given HAL format - */ ADRENOPIXELFORMAT GetGpuPixelFormat(int hal_format); - /* - * Function to get graphics metadata blob size - * @return graphics metadata size - */ uint32_t AdrenoGetMetadataBlobSize(); - /* - * Function to populate the graphics metadata blob - * @return 1 : Successful - * 2 : Unsuccessful - */ int AdrenoInitMemoryLayout(void* metadata_blob, int width, int height, int depth, int format, int num_samples, int isUBWC, uint64_t usage, uint32_t num_planes); - /* - * Function to get buffer size for based on graphcis metadata - * @return buffer size - */ uint32_t AdrenoGetAlignedGpuBufferSize(void* metadata_blob); - /* - * Function to check if adreno size calculation APIs are avaliable - * @return true : Avaliable - * false : Unavaliable - */ bool AdrenoSizeAPIAvaliable(); static AdrenoMemInfo* GetInstance(); @@ -196,7 +142,6 @@ class AdrenoMemInfo { private: AdrenoMemInfo(); ~AdrenoMemInfo(); - // link(s)to adreno surface padding library. int (*LINK_adreno_compute_padding)(int width, int bpp, int surface_tile_height, int screen_tile_height, int padding_threshold) = NULL; void (*LINK_adreno_compute_aligned_width_and_height)(int width, int height, int bpp, @@ -229,6 +174,6 @@ class AdrenoMemInfo { static AdrenoMemInfo* s_instance; }; -} // namespace gralloc +} -#endif // __GR_ADRENO_INFO_H__ +#endif diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_priv_handle.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_priv_handle.h index 3efbea4b78..30a48e7ab5 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_priv_handle.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_priv_handle.h @@ -57,29 +57,27 @@ struct private_handle_t { PRIV_FLAGS_CAMERA_READ = 0x00040000, PRIV_FLAGS_HW_COMPOSER = 0x00080000, PRIV_FLAGS_HW_TEXTURE = 0x00100000, - PRIV_FLAGS_ITU_R_601 = 0x00200000, // Unused from display - PRIV_FLAGS_ITU_R_601_FR = 0x00400000, // Unused from display - PRIV_FLAGS_ITU_R_709 = 0x00800000, // Unused from display + PRIV_FLAGS_ITU_R_601 = 0x00200000, + PRIV_FLAGS_ITU_R_601_FR = 0x00400000, + PRIV_FLAGS_ITU_R_709 = 0x00800000, PRIV_FLAGS_SECURE_DISPLAY = 0x01000000, PRIV_FLAGS_TILE_RENDERED = 0x02000000, PRIV_FLAGS_CPU_RENDERED = 0x04000000, PRIV_FLAGS_UBWC_ALIGNED = 0x08000000, PRIV_FLAGS_DISP_CONSUMER = 0x10000000, - PRIV_FLAGS_CLIENT_ALLOCATED = 0x20000000, // Ion buffer allocated outside of gralloc - PRIV_FLAGS_UBWC_ALIGNED_PI = 0x40000000, // PI format + PRIV_FLAGS_CLIENT_ALLOCATED = 0x20000000, + PRIV_FLAGS_UBWC_ALIGNED_PI = 0x40000000, }; - // file-descriptors dup'd over IPC int fd; int fd_metadata; - // values sent over IPC int magic; int flags; - int width; // holds width of the actual buffer allocated - int height; // holds height of the actual buffer allocated - int unaligned_width; // holds width client asked to allocate - int unaligned_height; // holds height client asked to allocate + int width; + int height; + int unaligned_width; + int unaligned_height; int format; int buffer_type; unsigned int layer_count; @@ -126,7 +124,6 @@ struct private_handle_t { numFds = kNumFds; } - // Legacy constructor used by some clients private_handle_t(int fd, unsigned int size, int usage, int buf_type, int format, int w, int h) : private_handle_t(fd, -1, PRIV_FLAGS_CLIENT_ALLOCATED, w, h, 0, 0, format, buf_type, size, static_cast(usage)) {} @@ -176,7 +173,6 @@ struct private_handle_t { unsigned int GetLayerCount() const { return layer_count; } int GetStride() const { - // In handle we currently store aligned width after allocation. return width; } @@ -187,4 +183,4 @@ struct private_handle_t { }; #pragma pack(pop) -#endif // __GR_PRIV_HANDLE_H__ +#endif diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_utils.cpp b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_utils.cpp index a83ef20a6b..4dc3a1f4b9 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_utils.cpp +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_utils.cpp @@ -162,7 +162,6 @@ bool CpuCanRead(uint64_t usage) { bool CpuCanWrite(uint64_t usage) { if (usage & BufferUsage::CPU_WRITE_MASK) { - // Application intends to use CPU for rendering return true; } @@ -177,7 +176,6 @@ uint32_t GetDataAlignment(int format, uint64_t usage) { if (usage & BufferUsage::PROTECTED) { if ((usage & BufferUsage::CAMERA_OUTPUT) || (usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY)) { - // The alignment here reflects qsee mmu V7L/V8L requirement align = SZ_2M; } else { align = SECURE_ALIGN; @@ -202,7 +200,6 @@ bool IsGPUFlagSupported(uint64_t usage) { return ret; } -// Returns the final buffer size meant to be allocated with ion unsigned int GetSize(const BufferInfo& info, unsigned int alignedw, unsigned int alignedh) { unsigned int size = 0; int format = info.format; @@ -223,7 +220,6 @@ unsigned int GetSize(const BufferInfo& info, unsigned int alignedw, unsigned int } else if (IsCompressedRGBFormat(format)) { size = alignedw * alignedh * ASTC_BLOCK_SIZE; } else { - // Below switch should be for only YUV/custom formats switch (format) { case HAL_PIXEL_FORMAT_RAW16: case HAL_PIXEL_FORMAT_Y16: @@ -237,15 +233,15 @@ unsigned int GetSize(const BufferInfo& info, unsigned int alignedw, unsigned int case HAL_PIXEL_FORMAT_Y8: size = alignedw * alignedh * 1; break; - // adreno formats - case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO: // NV21 + + case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO: size = ALIGN(alignedw * alignedh, SIZE_4K); size += (unsigned int)ALIGN(2 * ALIGN(width / 2, 32) * ALIGN(height / 2, 32), SIZE_4K); break; - case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED: // NV12 - // The chroma plane is subsampled, - // but the pitch in bytes is unchanged - // The GPU needs 4K alignment, but the video decoder needs 8K + case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED: + + + size = ALIGN(alignedw * alignedh, SIZE_8K); size += ALIGN(alignedw * (unsigned int)ALIGN(height / 2, 32), SIZE_8K); break; @@ -296,7 +292,6 @@ unsigned int GetSize(const BufferInfo& info, unsigned int alignedw, unsigned int return size; } -// Explicitly defined UBWC formats bool IsUBwcFormat(int format) { switch (format) { case HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC: @@ -309,7 +304,6 @@ bool IsUBwcFormat(int format) { } bool IsUBwcSupported(int format) { - // Existing HAL formats with UBWC support switch (format) { case HAL_PIXEL_FORMAT_BGR_565: case HAL_PIXEL_FORMAT_RGBA_8888: @@ -336,7 +330,6 @@ bool IsUBwcPISupported(int format, uint64_t usage) { return false; } - // As of now only two formats switch (format) { case HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC: case HAL_PIXEL_FORMAT_YCbCr_420_TP10_UBWC: { @@ -354,27 +347,21 @@ bool IsUBwcPISupported(int format, uint64_t usage) { } bool IsUBwcEnabled(int format, uint64_t usage) { - // Allow UBWC, if client is using an explicitly defined UBWC pixel format. if (IsUBwcFormat(format)) { return true; } - // Allow UBWC, if an OpenGL client sets UBWC usage flag and GPU plus MDP - // support the format. OR if a non-OpenGL client like Rotator, sets UBWC - // usage flag and MDP supports the format. if (((usage & GRALLOC_USAGE_PRIVATE_ALLOC_UBWC) || (usage & GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI) || (usage & BufferUsage::COMPOSER_CLIENT_TARGET)) && IsUBwcSupported(format)) { bool enable = true; - // Query GPU for UBWC only if buffer is intended to be used by GPU. if ((usage & BufferUsage::GPU_TEXTURE) || (usage & BufferUsage::GPU_RENDER_TARGET)) { if (AdrenoMemInfo::GetInstance()) { enable = AdrenoMemInfo::GetInstance()->IsUBWCSupportedByGPU(format); } } - // Allow UBWC, only if CPU usage flags are not set if (enable && !(CpuCanAccess(usage))) { return true; } @@ -418,13 +405,10 @@ unsigned int GetRgbUBwcMetaBufferSize(int width, int height, uint32_t bpp) { return size; } - // Align meta buffer height to 16 blocks meta_height = ALIGN(((height + block_height - 1) / block_height), 16); - // Align meta buffer width to 64 blocks meta_width = ALIGN(((width + block_width - 1) / block_width), 64); - // Align meta buffer size to 4K size = (unsigned int)ALIGN((meta_width * meta_height), 4096); return size; @@ -500,12 +484,10 @@ bool UseUncached(int format, uint64_t usage) { return true; } - // CPU read rarely if ((usage & BufferUsage::CPU_READ_MASK) == static_cast(BufferUsage::CPU_READ_RARELY)) { return true; } - // CPU write rarely if ((usage & BufferUsage::CPU_WRITE_MASK) == static_cast(BufferUsage::CPU_WRITE_RARELY)) { return true; @@ -576,8 +558,6 @@ uint64_t GetHandleFlags(int format, uint64_t usage) { int GetImplDefinedFormat(uint64_t usage, int format) { int gr_format = format; - // If input format is HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED then based on - // the usage bits, gralloc assigns a format. if (format == HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED || format == HAL_PIXEL_FORMAT_YCbCr_420_888) { if ((usage & GRALLOC_USAGE_PRIVATE_ALLOC_UBWC || usage & GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI) && @@ -585,33 +565,30 @@ int GetImplDefinedFormat(uint64_t usage, int format) { gr_format = HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC; } else if (usage & BufferUsage::VIDEO_ENCODER) { if (usage & GRALLOC_USAGE_PRIVATE_VIDEO_NV21_ENCODER) { - gr_format = HAL_PIXEL_FORMAT_NV21_ENCODEABLE; // NV21 + gr_format = HAL_PIXEL_FORMAT_NV21_ENCODEABLE; } else if (usage & GRALLOC_USAGE_PRIVATE_HEIF) { gr_format = HAL_PIXEL_FORMAT_NV12_HEIF; } else if (format == HAL_PIXEL_FORMAT_YCbCr_420_888) { gr_format = HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS; } else { - gr_format = HAL_PIXEL_FORMAT_NV12_ENCODEABLE; // NV12 + gr_format = HAL_PIXEL_FORMAT_NV12_ENCODEABLE; } } else if (usage & BufferUsage::CAMERA_INPUT) { if (usage & BufferUsage::CAMERA_OUTPUT) { - // Assumed ZSL if both producer and consumer camera flags set - gr_format = HAL_PIXEL_FORMAT_NV21_ZSL; // NV21 + + gr_format = HAL_PIXEL_FORMAT_NV21_ZSL; } else { - gr_format = HAL_PIXEL_FORMAT_YCrCb_420_SP; // NV21 + gr_format = HAL_PIXEL_FORMAT_YCrCb_420_SP; } } else if (usage & BufferUsage::CAMERA_OUTPUT) { if (format == HAL_PIXEL_FORMAT_YCbCr_420_888) { - gr_format = HAL_PIXEL_FORMAT_NV21_ZSL; // NV21 + gr_format = HAL_PIXEL_FORMAT_NV21_ZSL; } else { - gr_format = HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS; // NV12 preview + gr_format = HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS; } } else if (usage & BufferUsage::COMPOSER_OVERLAY) { - // XXX: If we still haven't set a format, default to RGBA8888 gr_format = HAL_PIXEL_FORMAT_RGBA_8888; } else if (format == HAL_PIXEL_FORMAT_YCbCr_420_888) { - // If no other usage flags are detected, default the - // flexible YUV format to NV21_ZSL gr_format = HAL_PIXEL_FORMAT_NV21_ZSL; } } @@ -637,7 +614,7 @@ bool HasAlphaComponent(int32_t format) { } void GetRGBPlaneInfo(const BufferInfo& info, int32_t format, int32_t width, int32_t height, - int32_t /* flags */, int* plane_count, PlaneLayoutInfo* plane_info) { + int32_t , int* plane_count, PlaneLayoutInfo* plane_info) { uint64_t usage = info.usage; *plane_count = 1; uint32_t bpp = 0; @@ -659,4 +636,4 @@ void GetRGBPlaneInfo(const BufferInfo& info, int32_t format, int32_t width, int3 plane_info->scanlines = height; } -} // namespace gralloc +} diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_utils.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_utils.h index 13b21577c5..4c757a214f 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_utils.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gr_utils.h @@ -42,7 +42,7 @@ #ifdef SLAVE_SIDE_CP #define SECURE_ALIGN SZ_1M -#else // MASTER_SIDE_CP +#else #define SECURE_ALIGN SZ_4K #endif @@ -68,59 +68,38 @@ inline Type1 ALIGN(Type1 x, Type2 align) { } enum PlaneComponent { - /* luma */ PLANE_COMPONENT_Y = 1 << 0, - /* chroma blue */ PLANE_COMPONENT_Cb = 1 << 1, - /* chroma red */ PLANE_COMPONENT_Cr = 1 << 2, - /* red */ PLANE_COMPONENT_R = 1 << 10, - /* green */ PLANE_COMPONENT_G = 1 << 11, - /* blue */ PLANE_COMPONENT_B = 1 << 12, - /* alpha */ PLANE_COMPONENT_A = 1 << 20, - /* raw data plane */ PLANE_COMPONENT_RAW = 1 << 30, - /* meta information plane */ PLANE_COMPONENT_META = 1 << 31, }; struct PlaneLayoutInfo { - /** Components represented the type of plane. */ PlaneComponent component; - /** horizontal subsampling. Must be a positive power of 2. */ uint32_t h_subsampling; - /** vertical subsampling. Must be a positive power of 2. */ uint32_t v_subsampling; - /** offset to the first byte of the top-left pixel of the plane - * and it is calculated from the start of the buffer. - * Add base of the handle with offset to get the first byte of the plane. - */ uint32_t offset; - /** step is the distance in bytes from one pixel value to the next. */ int32_t step; - /** stride of the plane in pixels */ int32_t stride; - /** stride of the plane in in bytes */ int32_t stride_bytes; - /** plane height or vertical stride */ int32_t scanlines; - /** size of the plane in bytes */ uint32_t size; }; @@ -151,6 +130,6 @@ int GetImplDefinedFormat(uint64_t usage, int format); int GetCustomFormatFlags(int format, uint64_t usage, int* custom_format, uint64_t* priv_flags); bool IsGPUFlagSupported(uint64_t usage); bool HasAlphaComponent(int32_t format); -} // namespace gralloc +} -#endif // __GR_UTILS_H__ +#endif diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gralloc_priv.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gralloc_priv.h index 8a333a6bde..0e4359e5e0 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gralloc_priv.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/gralloc_priv.h @@ -26,7 +26,6 @@ #include "QtiGrallocDefs.h" #include "gr_priv_handle.h" -//#pragma message "Warning: gralloc_priv.h is deprecated" #define GRALLOC_PROP_PREFIX "vendor.gralloc." #define GRALLOC_PROP(prop_name) GRALLOC_PROP_PREFIX prop_name @@ -42,8 +41,6 @@ inline int roundUpToPageSize(int x) { return (x + (getpagesize() - 1)) & ~(getpagesize() - 1); } -/* Legacy gralloc1 definitions */ -/* Some clients may still be using the old flags */ #define GRALLOC1_PRODUCER_USAGE_PRIVATE_ADSP_HEAP GRALLOC_USAGE_PRIVATE_ADSP_HEAP #define GRALLOC1_PRODUCER_USAGE_PRIVATE_ALLOC_UBWC GRALLOC_USAGE_PRIVATE_ALLOC_UBWC #define GRALLOC1_PRODUCER_USAGE_PRIVATE_UNCACHED GRALLOC_USAGE_PRIVATE_UNCACHED @@ -54,7 +51,6 @@ inline int roundUpToPageSize(int x) { #define GRALLOC1_CONSUMER_USAGE_PRIVATE_10BIT_TP GRALLOC_USAGE_PRIVATE_10BIT_TP #define GRALLOC1_PRODUCER_USAGE_PRIVATE_VIDEO_NV21_ENCODER GRALLOC_USAGE_PRIVATE_VIDEO_NV21_ENCODER -// for PERFORM API : #define GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER 1 #define GRALLOC_MODULE_PERFORM_GET_STRIDE 2 #define GRALLOC_MODULE_PERFORM_GET_CUSTOM_STRIDE_FROM_HANDLE 3 @@ -72,11 +68,9 @@ inline int roundUpToPageSize(int x) { #define GRALLOC1_MODULE_PERFORM_GET_INTERLACE_FLAG 15 #define GRALLOC_MODULE_PERFORM_GET_GRAPHICS_METADATA 16 -/* possible values for inverse gamma correction */ #define HAL_IGC_NOT_SPECIFIED 0 #define HAL_IGC_s_RGB 1 -/* Color Space: Values maps to ColorSpace_t in qdMetadata.h */ #define HAL_CSC_ITU_R_601 0 #define HAL_CSC_ITU_R_601_FR 1 #define HAL_CSC_ITU_R_709 2 @@ -84,20 +78,16 @@ inline int roundUpToPageSize(int x) { #define HAL_CSC_ITU_R_2020 4 #define HAL_CSC_ITU_R_2020_FR 5 -/* possible formats for 3D content*/ enum { HAL_NO_3D = 0x0, HAL_3D_SIDE_BY_SIDE_L_R = 0x1, HAL_3D_SIDE_BY_SIDE_R_L = 0x2, HAL_3D_TOP_BOTTOM = 0x4, - HAL_3D_IN_SIDE_BY_SIDE_L_R = 0x10000, // unused legacy format + HAL_3D_IN_SIDE_BY_SIDE_L_R = 0x10000, }; -/* Flag to determine interlaced content - * Value maps to Flags presents in types.hal of QtiMapperextensions - */ enum { LAYOUT_INTERLACED_FLAG = 1 << 0, }; -#endif // __GRALLOC_PRIV_H__ +#endif diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/mapper.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/mapper.h index ae3bdbba9b..0325e8641b 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/mapper.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/mapper.h @@ -60,43 +60,43 @@ struct IMapper : public IBase { int32_t height __attribute__((aligned(4))); }; - static sp getService(const std::string& /* serviceName */, const bool /* getStub */); + static sp getService(const std::string& , const bool ); }; -} // namespace V2_0 +} namespace V3_0 { struct IMapper : public IBase { - static sp getService(const std::string& /* serviceName */, const bool /* getStub */); + static sp getService(const std::string& , const bool ); }; -} // namespace V3_0 +} namespace V4_0 { struct IMapper : public IBase { - static sp getService(const std::string& /* serviceName */, const bool /* getStub */); + static sp getService(const std::string& , const bool ); }; -} // namespace V4_0 -} // namespace android::hardware::graphics::mapper +} +} namespace vendor::qti::hardware::display::mapper { namespace V4_0 { struct IQtiMapper : public IBase { - static Return> castFrom(const sp& /* parent */, - bool /* emitError */); + static Return> castFrom(const sp& , + bool ); }; -} // namespace V4_0 +} namespace V3_0 { struct IQtiMapper : public IBase { - static Return> castFrom(const sp& /* parent */, - bool /* emitError */); + static Return> castFrom(const sp& , + bool ); }; -} // namespace V3_0 +} namespace V2_0 { struct IQtiMapper : public IBase { @@ -175,9 +175,9 @@ struct IQtiMapper : public IBase { V1_0::IQtiMapperExtensions>& extensions)>; virtual Return getMapperExtensions(getMapperExtensions_cb _hidl_cb); - static Return> castFrom(const sp& /* parent */, - bool /* emitError */); + static Return> castFrom(const sp& , + bool ); }; -} // namespace V2_0 -} // namespace vendor::qti::hardware::display::mapper +} +} diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/mapperextensions.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/mapperextensions.h index 078cb90b26..1337627fb2 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/mapperextensions.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/mapperextensions.h @@ -45,7 +45,7 @@ struct IQtiMapperExtensions : public IBase { IQtiMapperExtensions(){}; }; -} // namespace V1_0 +} namespace V1_1 { using Error = V1_0::Error; using PlaneLayout = V1_0::PlaneLayout; @@ -64,7 +64,6 @@ struct IQtiMapperExtensions : public IBase { std::terminate(); } - // Used, passthrough using getInterlacedFlag_cb = std::function; virtual ::android::hardware::Return getInterlacedFlag(void* buffer, @@ -79,7 +78,6 @@ struct IQtiMapperExtensions : public IBase { std::terminate(); } - // Used, passthrough using getRgbDataAddress_cb = std::function; virtual ::android::hardware::Return getRgbDataAddress(void* buffer, @@ -95,7 +93,6 @@ struct IQtiMapperExtensions : public IBase { std::terminate(); } - // Used, passhthrough using getColorSpace_cb = std::function; virtual ::android::hardware::Return getColorSpace(void* buffer, getColorSpace_cb _hidl_cb) { @@ -103,7 +100,6 @@ struct IQtiMapperExtensions : public IBase { std::terminate(); } - // Used, passthrough with hidl fixups using getYuvPlaneInfo_cb = std::function; virtual ::android::hardware::Return getFd(void* buffer, getFd_cb _hidl_cb); - // Used, cast private data with no passthrough using getWidth_cb = std::function; virtual ::android::hardware::Return getWidth(void* buffer, getWidth_cb _hidl_cb); - // Used, cast private data with no passthrough using getHeight_cb = std::function; virtual ::android::hardware::Return getHeight(void* buffer, getHeight_cb _hidl_cb); - // Used, cast private data with no passthrough using getOffset_cb = std::function; virtual ::android::hardware::Return getOffset(void* buffer, getOffset_cb _hidl_cb); - // Used, cast private data with no passthrough using getSize_cb = std::function; virtual ::android::hardware::Return getSize(void* buffer, getSize_cb _hidl_cb); @@ -179,12 +170,10 @@ struct IQtiMapperExtensions : public IBase { ::vendor::qti::hardware::display::mapperextensions::V1_0::Error error, uint64_t usage)>; virtual ::android::hardware::Return getUsageFlags(void* buffer, getUsageFlags_cb _hidl_cb); - // Used, cast private data with no passthrough using getFormat_cb = std::function; virtual ::android::hardware::Return getFormat(void* buffer, getFormat_cb _hidl_cb); - // Used, cast private data with no passthrough using getPrivateFlags_cb = std::function; virtual ::android::hardware::Return getPrivateFlags(void* buffer, @@ -198,7 +187,6 @@ struct IQtiMapperExtensions : public IBase { std::terminate(); } - // Used, PAIN using getFormatLayout_cb = std::function getSurfaceMetadata_V1(void* buffer, void* metadata) { @@ -217,8 +204,8 @@ struct IQtiMapperExtensions : public IBase { } static Return> castFrom( - android::sp const& /* parent */, bool /* emitError */); + android::sp const& , bool ); }; -} // namespace V1_1 -} // namespace vendor::qti::hardware::display::mapperextensions +} +} diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/common.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/common.h index 6f327baf3b..64daacb5d7 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/common.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/common.h @@ -12,7 +12,6 @@ namespace graphics { namespace common { namespace V1_0 { -// Forward declaration for forward reference support: enum class PixelFormat : int32_t; enum class BufferUsage : uint64_t; enum class Transform : int32_t; @@ -21,1402 +20,1072 @@ enum class ColorMode : int32_t; enum class ColorTransform : int32_t; enum class Hdr : int32_t; -/** - * Common enumeration and structure definitions for all graphics HALs. - * - * - * Pixel formats for graphics buffers. - */ enum class PixelFormat : int32_t { - /** - * 32-bit format that has 8-bit R, G, B, and A components, in that order, - * from the lowest memory address to the highest memory address. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGBA_8888 = 1 /* 0x1 */, - /** - * 32-bit format that has 8-bit R, G, B, and unused components, in that - * order, from the lowest memory address to the highest memory address. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGBX_8888 = 2 /* 0x2 */, - /** - * 24-bit format that has 8-bit R, G, and B components, in that order, - * from the lowest memory address to the highest memory address. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGB_888 = 3 /* 0x3 */, - /** - * 16-bit packed format that has 5-bit R, 6-bit G, and 5-bit B components, - * in that order, from the most-sigfinicant bits to the least-significant - * bits. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGB_565 = 4 /* 0x4 */, - /** - * 32-bit format that has 8-bit B, G, R, and A components, in that order, - * from the lowest memory address to the highest memory address. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - BGRA_8888 = 5 /* 0x5 */, - /** - * Legacy formats deprecated in favor of YCBCR_420_888. - */ - YCBCR_422_SP = 16 /* 0x10 */, - YCRCB_420_SP = 17 /* 0x11 */, - YCBCR_422_I = 20 /* 0x14 */, - /** - * 64-bit format that has 16-bit R, G, B, and A components, in that order, - * from the lowest memory address to the highest memory address. - * - * The component values are signed floats, whose interpretation is defined - * by the dataspace. - */ - RGBA_FP16 = 22 /* 0x16 */, - /** - * RAW16 is a single-channel, 16-bit, little endian format, typically - * representing raw Bayer-pattern images from an image sensor, with minimal - * processing. - * - * The exact pixel layout of the data in the buffer is sensor-dependent, and - * needs to be queried from the camera device. - * - * Generally, not all 16 bits are used; more common values are 10 or 12 - * bits. If not all bits are used, the lower-order bits are filled first. - * All parameters to interpret the raw data (black and white points, - * color space, etc) must be queried from the camera device. - * - * This format assumes - * - an even width - * - an even height - * - a horizontal stride multiple of 16 pixels - * - a vertical stride equal to the height - * - strides are specified in pixels, not in bytes - * - * size = stride * height * 2 - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::RENDERSCRIPT - * - * The mapping of the dataspace to buffer contents for RAW16 is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::ARBITRARY | Raw image sensor data, layout is as - * | defined above. - * Dataspace::DEPTH | Unprocessed implementation-dependent raw - * | depth measurements, opaque with 16 bit - * | samples. - * Other | Unsupported - */ - RAW16 = 32 /* 0x20 */, - /** - * BLOB is used to carry task-specific data which does not have a standard - * image structure. The details of the format are left to the two - * endpoints. - * - * A typical use case is for transporting JPEG-compressed images from the - * Camera HAL to the framework or to applications. - * - * Buffers of this format must have a height of 1, and width equal to their - * size in bytes. - * - * The mapping of the dataspace to buffer contents for BLOB is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::JFIF | An encoded JPEG image - * Dataspace::DEPTH | An android_depth_points buffer - * Dataspace::SENSOR | Sensor event data. - * Other | Unsupported - */ - BLOB = 33 /* 0x21 */, - /** - * A format indicating that the choice of format is entirely up to the - * allocator. - * - * The allocator should examine the usage bits passed in when allocating a - * buffer with this format, and it should derive the pixel format from - * those usage flags. This format must never be used with any of the - * BufferUsage::CPU_* usage flags. - * - * Even when the internally chosen format has an alpha component, the - * clients must assume the alpha vlaue to be 1.0. - * - * The interpretation of the component values is defined by the dataspace. - */ - IMPLEMENTATION_DEFINED = 34 /* 0x22 */, - /** - * This format allows platforms to use an efficient YCbCr/YCrCb 4:2:0 - * buffer layout, while still describing the general format in a - * layout-independent manner. While called YCbCr, it can be used to - * describe formats with either chromatic ordering, as well as - * whole planar or semiplanar layouts. - * - * This format must be accepted by the allocator when BufferUsage::CPU_* - * are set. - * - * Buffers with this format must be locked with IMapper::lockYCbCr. - * Locking with IMapper::lock must return an error. - * - * The interpretation of the component values is defined by the dataspace. - */ - YCBCR_420_888 = 35 /* 0x23 */, - /** - * RAW_OPAQUE is a format for unprocessed raw image buffers coming from an - * image sensor. The actual structure of buffers of this format is - * implementation-dependent. - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::RENDERSCRIPT - * - * The mapping of the dataspace to buffer contents for RAW_OPAQUE is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::ARBITRARY | Raw image sensor data. - * Other | Unsupported - */ - RAW_OPAQUE = 36 /* 0x24 */, - /** - * RAW10 is a single-channel, 10-bit per pixel, densely packed in each row, - * unprocessed format, usually representing raw Bayer-pattern images coming from - * an image sensor. - * - * In an image buffer with this format, starting from the first pixel of each - * row, each 4 consecutive pixels are packed into 5 bytes (40 bits). Each one - * of the first 4 bytes contains the top 8 bits of each pixel, The fifth byte - * contains the 2 least significant bits of the 4 pixels, the exact layout data - * for each 4 consecutive pixels is illustrated below (Pi[j] stands for the jth - * bit of the ith pixel): - * - * bit 7 bit 0 - * =====|=====|=====|=====|=====|=====|=====|=====| - * Byte 0: |P0[9]|P0[8]|P0[7]|P0[6]|P0[5]|P0[4]|P0[3]|P0[2]| - * |-----|-----|-----|-----|-----|-----|-----|-----| - * Byte 1: |P1[9]|P1[8]|P1[7]|P1[6]|P1[5]|P1[4]|P1[3]|P1[2]| - * |-----|-----|-----|-----|-----|-----|-----|-----| - * Byte 2: |P2[9]|P2[8]|P2[7]|P2[6]|P2[5]|P2[4]|P2[3]|P2[2]| - * |-----|-----|-----|-----|-----|-----|-----|-----| - * Byte 3: |P3[9]|P3[8]|P3[7]|P3[6]|P3[5]|P3[4]|P3[3]|P3[2]| - * |-----|-----|-----|-----|-----|-----|-----|-----| - * Byte 4: |P3[1]|P3[0]|P2[1]|P2[0]|P1[1]|P1[0]|P0[1]|P0[0]| - * =============================================== - * - * This format assumes - * - a width multiple of 4 pixels - * - an even height - * - a vertical stride equal to the height - * - strides are specified in bytes, not in pixels - * - * size = stride * height - * - * When stride is equal to width * (10 / 8), there will be no padding bytes at - * the end of each row, the entire image data is densely packed. When stride is - * larger than width * (10 / 8), padding bytes will be present at the end of each - * row (including the last row). - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::RENDERSCRIPT - * - * The mapping of the dataspace to buffer contents for RAW10 is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::ARBITRARY | Raw image sensor data. - * Other | Unsupported - */ - RAW10 = 37 /* 0x25 */, - /** - * RAW12 is a single-channel, 12-bit per pixel, densely packed in each row, - * unprocessed format, usually representing raw Bayer-pattern images coming from - * an image sensor. - * - * In an image buffer with this format, starting from the first pixel of each - * row, each two consecutive pixels are packed into 3 bytes (24 bits). The first - * and second byte contains the top 8 bits of first and second pixel. The third - * byte contains the 4 least significant bits of the two pixels, the exact layout - * data for each two consecutive pixels is illustrated below (Pi[j] stands for - * the jth bit of the ith pixel): - * - * bit 7 bit 0 - * ======|======|======|======|======|======|======|======| - * Byte 0: |P0[11]|P0[10]|P0[ 9]|P0[ 8]|P0[ 7]|P0[ 6]|P0[ 5]|P0[ 4]| - * |------|------|------|------|------|------|------|------| - * Byte 1: |P1[11]|P1[10]|P1[ 9]|P1[ 8]|P1[ 7]|P1[ 6]|P1[ 5]|P1[ 4]| - * |------|------|------|------|------|------|------|------| - * Byte 2: |P1[ 3]|P1[ 2]|P1[ 1]|P1[ 0]|P0[ 3]|P0[ 2]|P0[ 1]|P0[ 0]| - * ======================================================= - * - * This format assumes: - * - a width multiple of 4 pixels - * - an even height - * - a vertical stride equal to the height - * - strides are specified in bytes, not in pixels - * - * size = stride * height - * - * When stride is equal to width * (12 / 8), there will be no padding bytes at - * the end of each row, the entire image data is densely packed. When stride is - * larger than width * (12 / 8), padding bytes will be present at the end of - * each row (including the last row). - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::RENDERSCRIPT - * - * The mapping of the dataspace to buffer contents for RAW12 is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::ARBITRARY | Raw image sensor data. - * Other | Unsupported - */ - RAW12 = 38 /* 0x26 */, - /** - * 0x27 to 0x2A are reserved for flexible formats - * - * - * 32-bit packed format that has 2-bit A, 10-bit B, G, and R components, - * in that order, from the most-sigfinicant bits to the least-significant - * bits. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGBA_1010102 = 43 /* 0x2B */, - /** - * 0x100 - 0x1FF - * - * This range is reserved for vendor extensions. Formats in this range - * must support BufferUsage::GPU_TEXTURE. Clients must assume they do not - * have an alpha component. - * - * - * Y8 is a YUV planar format comprised of a WxH Y plane, with each pixel - * being represented by 8 bits. It is equivalent to just the Y plane from - * YV12. - * - * This format assumes - * - an even width - * - an even height - * - a horizontal stride multiple of 16 pixels - * - a vertical stride equal to the height - * - * size = stride * height - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - Y8 = 538982489 /* 0x20203859 */, - /** - * Y16 is a YUV planar format comprised of a WxH Y plane, with each pixel - * being represented by 16 bits. It is just like Y8, but has double the - * bits per pixel (little endian). - * - * This format assumes - * - an even width - * - an even height - * - a horizontal stride multiple of 16 pixels - * - a vertical stride equal to the height - * - strides are specified in pixels, not in bytes - * - * size = stride * height * 2 - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. When the dataspace is - * Dataspace::DEPTH, each pixel is a distance value measured by a depth - * camera, plus an associated confidence value. - */ - Y16 = 540422489 /* 0x20363159 */, - /** - * YV12 is a 4:2:0 YCrCb planar format comprised of a WxH Y plane followed - * by (W/2) x (H/2) Cr and Cb planes. - * - * This format assumes - * - an even width - * - an even height - * - a horizontal stride multiple of 16 pixels - * - a vertical stride equal to the height - * - * y_size = stride * height - * c_stride = ALIGN(stride/2, 16) - * c_size = c_stride * height/2 - * size = y_size + c_size * 2 - * cr_offset = y_size - * cb_offset = y_size + c_size - * - * This range is reserved for vendor extensions. Formats in this range - * must support BufferUsage::GPU_TEXTURE. Clients must assume they do not - * have an alpha component. - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::GPU_TEXTURE - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - YV12 = 842094169 /* 0x32315659 */, + + + + + + + + RGBA_8888 = 1 , + + + + + + + + RGBX_8888 = 2 , + + + + + + + + RGB_888 = 3 , + + + + + + + + + RGB_565 = 4 , + + + + + + + + BGRA_8888 = 5 , + + + + YCBCR_422_SP = 16 , + YCRCB_420_SP = 17 , + YCBCR_422_I = 20 , + + + + + + + + RGBA_FP16 = 22 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RAW16 = 32 , + + + + + + + + + + + + + + + + + + + + + + BLOB = 33 , + + + + + + + + + + + + + + + IMPLEMENTATION_DEFINED = 34 , + + + + + + + + + + + + + + + + YCBCR_420_888 = 35 , + + + + + + + + + + + + + + + + + + + + + RAW_OPAQUE = 36 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RAW10 = 37 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RAW12 = 38 , + + + + + + + + + + + + RGBA_1010102 = 43 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Y8 = 538982489 , + + + + + + + + + + + + + + + + + + + + + + + + + + Y16 = 540422489 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YV12 = 842094169 , }; -/** - * Buffer usage definitions. - */ enum class BufferUsage : uint64_t { - /** - * bit 0-3 is an enum - */ - CPU_READ_MASK = 15ull /* 0xfULL */, - /** - * buffer is never read by CPU - */ + + + + CPU_READ_MASK = 15ull , + + + CPU_READ_NEVER = 0ull, - /** - * buffer is rarely read by CPU - */ CPU_READ_RARELY = 2ull, - /** - * buffer is often read by CPU - */ CPU_READ_OFTEN = 3ull, - /** - * bit 4-7 is an enum - */ - CPU_WRITE_MASK = 240ull /* (0xfULL << 4) */, - /** - * buffer is never written by CPU - */ - CPU_WRITE_NEVER = 0ull /* (0 << 4) */, - /** - * buffer is rarely written by CPU - */ - CPU_WRITE_RARELY = 32ull /* (2 << 4) */, - /** - * buffer is often written by CPU - */ - CPU_WRITE_OFTEN = 48ull /* (3 << 4) */, - /** - * buffer is used as a GPU texture - */ - GPU_TEXTURE = 256ull /* (1ULL << 8) */, - /** - * buffer is used as a GPU render target - */ - GPU_RENDER_TARGET = 512ull /* (1ULL << 9) */, - /** - * bit 10 must be zero - * - * - * buffer is used as a composer HAL overlay layer - */ - COMPOSER_OVERLAY = 2048ull /* (1ULL << 11) */, - /** - * buffer is used as a composer HAL client target - */ - COMPOSER_CLIENT_TARGET = 4096ull /* (1ULL << 12) */, - /** - * bit 13 must be zero - * - * - * Buffer is allocated with hardware-level protection against copying the - * contents (or information derived from the contents) into unprotected - * memory. - */ - PROTECTED = 16384ull /* (1ULL << 14) */, - /** - * buffer is used as a hwcomposer HAL cursor layer - */ - COMPOSER_CURSOR = 32768ull /* (1ULL << 15) */, - /** - * buffer is used as a video encoder input - */ - VIDEO_ENCODER = 65536ull /* (1ULL << 16) */, - /** - * buffer is used as a camera HAL output - */ - CAMERA_OUTPUT = 131072ull /* (1ULL << 17) */, - /** - * buffer is used as a camera HAL input - */ - CAMERA_INPUT = 262144ull /* (1ULL << 18) */, - /** - * bit 19 must be zero - * - * - * buffer is used as a renderscript allocation - */ - RENDERSCRIPT = 1048576ull /* (1ULL << 20) */, - /** - * bit 21 must be zero - * - * - * buffer is used as a video decoder output - */ - VIDEO_DECODER = 4194304ull /* (1ULL << 22) */, - /** - * buffer is used as a sensor direct report output - */ - SENSOR_DIRECT_DATA = 8388608ull /* (1ULL << 23) */, - /** - * buffer is used as as an OpenGL shader storage or uniform - * buffer object - */ - GPU_DATA_BUFFER = 16777216ull /* (1ULL << 24) */, - /** - * bits 25-27 must be zero and are reserved for future versions - * - * - * bits 28-31 are reserved for vendor extensions - */ - VENDOR_MASK = 4026531840ull /* (0xfULL << 28) */, - /** - * bits 32-47 must be zero and are reserved for future versions - * - * - * bits 48-63 are reserved for vendor extensions - */ - VENDOR_MASK_HI = 18446462598732840960ull /* (0xffffULL << 48) */, + + + + CPU_WRITE_MASK = 240ull , + + + + CPU_WRITE_NEVER = 0ull , + + + + CPU_WRITE_RARELY = 32ull , + + + + CPU_WRITE_OFTEN = 48ull , + + + + GPU_TEXTURE = 256ull , + + + + GPU_RENDER_TARGET = 512ull , + + + + + + + COMPOSER_OVERLAY = 2048ull , + + + + COMPOSER_CLIENT_TARGET = 4096ull , + + + + + + + + + PROTECTED = 16384ull , + + + + COMPOSER_CURSOR = 32768ull , + + + + VIDEO_ENCODER = 65536ull , + + + + CAMERA_OUTPUT = 131072ull , + + + + CAMERA_INPUT = 262144ull , + + + + + + + RENDERSCRIPT = 1048576ull , + + + + + + + VIDEO_DECODER = 4194304ull , + + + + SENSOR_DIRECT_DATA = 8388608ull , + + + + + GPU_DATA_BUFFER = 16777216ull , + + + + + + + VENDOR_MASK = 4026531840ull , + + + + + + + VENDOR_MASK_HI = 18446462598732840960ull , }; -/** - * Transformation definitions - */ enum class Transform : int32_t { - /** - * Horizontal flip. FLIP_H/FLIP_V is applied before ROT_90. - */ - FLIP_H = 1 /* (1 << 0) */, - /** - * Vertical flip. FLIP_H/FLIP_V is applied before ROT_90. - */ - FLIP_V = 2 /* (1 << 1) */, - /** - * 90 degree clockwise rotation. FLIP_H/FLIP_V is applied before ROT_90. - */ - ROT_90 = 4 /* (1 << 2) */, - /** - * Commonly used combinations. - */ - ROT_180 = 3 /* (FLIP_H | FLIP_V) */, - ROT_270 = 7 /* ((FLIP_H | FLIP_V) | ROT_90) */, + + + + FLIP_H = 1 , + + + + FLIP_V = 2 , + + + + ROT_90 = 4 , + + + + ROT_180 = 3 , + ROT_270 = 7 , }; -/** - * Dataspace Definitions - * ====================== - * - * Dataspace is the definition of how pixel values should be interpreted. - * - * For many formats, this is the colorspace of the image data, which includes - * primaries (including white point) and the transfer characteristic function, - * which describes both gamma curve and numeric range (within the bit depth). - * - * Other dataspaces include depth measurement data from a depth camera. - * - * A dataspace is comprised of a number of fields. - * - * Version - * -------- - * The top 2 bits represent the revision of the field specification. This is - * currently always 0. - * - * - * bits 31-30 29 - 0 - * +-----+----------------------------------------------------+ - * fields | Rev | Revision specific fields | - * +-----+----------------------------------------------------+ - * - * Field layout for version = 0: - * ---------------------------- - * - * A dataspace is comprised of the following fields: - * Standard - * Transfer function - * Range - * - * bits 31-30 29-27 26 - 22 21 - 16 15 - 0 - * +-----+-----+--------+--------+----------------------------+ - * fields | 0 |Range|Transfer|Standard| Legacy and custom | - * +-----+-----+--------+--------+----------------------------+ - * VV RRR TTTTT SSSSSS LLLLLLLL LLLLLLLL - * - * If range, transfer and standard fields are all 0 (e.g. top 16 bits are - * all zeroes), the bottom 16 bits contain either a legacy dataspace value, - * or a custom value. - */ enum class Dataspace : int32_t { - /** - * Default-assumption data space, when not explicitly specified. - * - * It is safest to assume the buffer is an image with sRGB primaries and - * encoding ranges, but the consumer and/or the producer of the data may - * simply be using defaults. No automatic gamma transform should be - * expected, except for a possible display gamma transform when drawn to a - * screen. - */ - UNKNOWN = 0 /* 0x0 */, - /** - * Arbitrary dataspace with manually defined characteristics. Definition - * for colorspaces or other meaning must be communicated separately. - * - * This is used when specifying primaries, transfer characteristics, - * etc. separately. - * - * A typical use case is in video encoding parameters (e.g. for H.264), - * where a colorspace can have separately defined primaries, transfer - * characteristics, etc. - */ - ARBITRARY = 1 /* 0x1 */, - /** - * Color-description aspects - * - * The following aspects define various characteristics of the color - * specification. These represent bitfields, so that a data space value - * can specify each of them independently. - */ + + + + + + + + + + UNKNOWN = 0 , + + + + + + + + + + + + ARBITRARY = 1 , + + + + + + + STANDARD_SHIFT = 16, - /** - * Standard aspect - * - * Defines the chromaticity coordinates of the source primaries in terms of - * the CIE 1931 definition of x and y specified in ISO 11664-1. - */ - STANDARD_MASK = 4128768 /* (63 << STANDARD_SHIFT) */, - /** - * Chromacity coordinates are unknown or are determined by the application. - * Implementations shall use the following suggested standards: - * - * All YCbCr formats: BT709 if size is 720p or larger (since most video - * content is letterboxed this corresponds to width is - * 1280 or greater, or height is 720 or greater). - * BT601_625 if size is smaller than 720p or is JPEG. - * All RGB formats: BT709. - * - * For all other formats standard is undefined, and implementations should use - * an appropriate standard for the data represented. - */ - STANDARD_UNSPECIFIED = 0 /* (0 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.300 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.2126, KB = 0.0722 luminance interpretation - * for RGB conversion. - */ - STANDARD_BT709 = 65536 /* (1 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.290 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * KR = 0.299, KB = 0.114. This adjusts the luminance interpretation - * for RGB conversion from the one purely determined by the primaries - * to minimize the color shift into RGB space that uses BT.709 - * primaries. - */ - STANDARD_BT601_625 = 131072 /* (2 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.290 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.222, KB = 0.071 luminance interpretation - * for RGB conversion. - */ - STANDARD_BT601_625_UNADJUSTED = 196608 /* (3 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.310 0.595 - * blue 0.155 0.070 - * red 0.630 0.340 - * white (D65) 0.3127 0.3290 - * - * KR = 0.299, KB = 0.114. This adjusts the luminance interpretation - * for RGB conversion from the one purely determined by the primaries - * to minimize the color shift into RGB space that uses BT.709 - * primaries. - */ - STANDARD_BT601_525 = 262144 /* (4 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.310 0.595 - * blue 0.155 0.070 - * red 0.630 0.340 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.212, KB = 0.087 luminance interpretation - * for RGB conversion (as in SMPTE 240M). - */ - STANDARD_BT601_525_UNADJUSTED = 327680 /* (5 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.170 0.797 - * blue 0.131 0.046 - * red 0.708 0.292 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.2627, KB = 0.0593 luminance interpretation - * for RGB conversion. - */ - STANDARD_BT2020 = 393216 /* (6 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.170 0.797 - * blue 0.131 0.046 - * red 0.708 0.292 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.2627, KB = 0.0593 luminance interpretation - * for RGB conversion using the linear domain. - */ - STANDARD_BT2020_CONSTANT_LUMINANCE = 458752 /* (7 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.21 0.71 - * blue 0.14 0.08 - * red 0.67 0.33 - * white (C) 0.310 0.316 - * - * Use the unadjusted KR = 0.30, KB = 0.11 luminance interpretation - * for RGB conversion. - */ - STANDARD_BT470M = 524288 /* (8 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.243 0.692 - * blue 0.145 0.049 - * red 0.681 0.319 - * white (C) 0.310 0.316 - * - * Use the unadjusted KR = 0.254, KB = 0.068 luminance interpretation - * for RGB conversion. - */ - STANDARD_FILM = 589824 /* (9 << STANDARD_SHIFT) */, - /** - * SMPTE EG 432-1 and SMPTE RP 431-2. (DCI-P3) - * Primaries: x y - * green 0.265 0.690 - * blue 0.150 0.060 - * red 0.680 0.320 - * white (D65) 0.3127 0.3290 - */ - STANDARD_DCI_P3 = 655360 /* (10 << STANDARD_SHIFT) */, - /** - * Adobe RGB - * Primaries: x y - * green 0.210 0.710 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - */ - STANDARD_ADOBE_RGB = 720896 /* (11 << STANDARD_SHIFT) */, + + + + + + + STANDARD_MASK = 4128768 , + + + + + + + + + + + + + + STANDARD_UNSPECIFIED = 0 , + + + + + + + + + + + STANDARD_BT709 = 65536 , + + + + + + + + + + + + + STANDARD_BT601_625 = 131072 , + + + + + + + + + + + STANDARD_BT601_625_UNADJUSTED = 196608 , + + + + + + + + + + + + + STANDARD_BT601_525 = 262144 , + + + + + + + + + + + STANDARD_BT601_525_UNADJUSTED = 327680 , + + + + + + + + + + + STANDARD_BT2020 = 393216 , + + + + + + + + + + + STANDARD_BT2020_CONSTANT_LUMINANCE = 458752 , + + + + + + + + + + + STANDARD_BT470M = 524288 , + + + + + + + + + + + STANDARD_FILM = 589824 , + + + + + + + + + STANDARD_DCI_P3 = 655360 , + + + + + + + + + STANDARD_ADOBE_RGB = 720896 , TRANSFER_SHIFT = 22, - /** - * Transfer aspect - * - * Transfer characteristics are the opto-electronic transfer characteristic - * at the source as a function of linear optical intensity (luminance). - * - * For digital signals, E corresponds to the recorded value. Normally, the - * transfer function is applied in RGB space to each of the R, G and B - * components independently. This may result in color shift that can be - * minized by applying the transfer function in Lab space only for the L - * component. Implementation may apply the transfer function in RGB space - * for all pixel formats if desired. - */ - TRANSFER_MASK = 130023424 /* (31 << TRANSFER_SHIFT) */, - /** - * Transfer characteristics are unknown or are determined by the - * application. - * - * Implementations should use the following transfer functions: - * - * For YCbCr formats: use TRANSFER_SMPTE_170M - * For RGB formats: use TRANSFER_SRGB - * - * For all other formats transfer function is undefined, and implementations - * should use an appropriate standard for the data represented. - */ - TRANSFER_UNSPECIFIED = 0 /* (0 << TRANSFER_SHIFT) */, - /** - * Transfer characteristic curve: - * E = L - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_LINEAR = 4194304 /* (1 << TRANSFER_SHIFT) */, - /** - * Transfer characteristic curve: - * - * E = 1.055 * L^(1/2.4) - 0.055 for 0.0031308 <= L <= 1 - * = 12.92 * L for 0 <= L < 0.0031308 - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_SRGB = 8388608 /* (2 << TRANSFER_SHIFT) */, - /** - * BT.601 525, BT.601 625, BT.709, BT.2020 - * - * Transfer characteristic curve: - * E = 1.099 * L ^ 0.45 - 0.099 for 0.018 <= L <= 1 - * = 4.500 * L for 0 <= L < 0.018 - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_SMPTE_170M = 12582912 /* (3 << TRANSFER_SHIFT) */, - /** - * Assumed display gamma 2.2. - * - * Transfer characteristic curve: - * E = L ^ (1/2.2) - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_GAMMA2_2 = 16777216 /* (4 << TRANSFER_SHIFT) */, - /** - * display gamma 2.6. - * - * Transfer characteristic curve: - * E = L ^ (1/2.6) - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_GAMMA2_6 = 20971520 /* (5 << TRANSFER_SHIFT) */, - /** - * display gamma 2.8. - * - * Transfer characteristic curve: - * E = L ^ (1/2.8) - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_GAMMA2_8 = 25165824 /* (6 << TRANSFER_SHIFT) */, - /** - * SMPTE ST 2084 (Dolby Perceptual Quantizer) - * - * Transfer characteristic curve: - * E = ((c1 + c2 * L^n) / (1 + c3 * L^n)) ^ m - * c1 = c3 - c2 + 1 = 3424 / 4096 = 0.8359375 - * c2 = 32 * 2413 / 4096 = 18.8515625 - * c3 = 32 * 2392 / 4096 = 18.6875 - * m = 128 * 2523 / 4096 = 78.84375 - * n = 0.25 * 2610 / 4096 = 0.1593017578125 - * L - luminance of image 0 <= L <= 1 for HDR colorimetry. - * L = 1 corresponds to 10000 cd/m2 - * E - corresponding electrical signal - */ - TRANSFER_ST2084 = 29360128 /* (7 << TRANSFER_SHIFT) */, - /** - * ARIB STD-B67 Hybrid Log Gamma - * - * Transfer characteristic curve: - * E = r * L^0.5 for 0 <= L <= 1 - * = a * ln(L - b) + c for 1 < L - * a = 0.17883277 - * b = 0.28466892 - * c = 0.55991073 - * r = 0.5 - * L - luminance of image 0 <= L for HDR colorimetry. L = 1 corresponds - * to reference white level of 100 cd/m2 - * E - corresponding electrical signal - */ - TRANSFER_HLG = 33554432 /* (8 << TRANSFER_SHIFT) */, + + + + + + + + + + + + + + TRANSFER_MASK = 130023424 , + + + + + + + + + + + + + TRANSFER_UNSPECIFIED = 0 , + + + + + + + TRANSFER_LINEAR = 4194304 , + + + + + + + + + TRANSFER_SRGB = 8388608 , + + + + + + + + + + TRANSFER_SMPTE_170M = 12582912 , + + + + + + + + + TRANSFER_GAMMA2_2 = 16777216 , + + + + + + + + + TRANSFER_GAMMA2_6 = 20971520 , + + + + + + + + + TRANSFER_GAMMA2_8 = 25165824 , + + + + + + + + + + + + + + + TRANSFER_ST2084 = 29360128 , + + + + + + + + + + + + + + + TRANSFER_HLG = 33554432 , RANGE_SHIFT = 27, - /** - * Range aspect - * - * Defines the range of values corresponding to the unit range of 0-1. - * This is defined for YCbCr only, but can be expanded to RGB space. - */ - RANGE_MASK = 939524096 /* (7 << RANGE_SHIFT) */, - /** - * Range is unknown or are determined by the application. Implementations - * shall use the following suggested ranges: - * - * All YCbCr formats: limited range. - * All RGB or RGBA formats (including RAW and Bayer): full range. - * All Y formats: full range - * - * For all other formats range is undefined, and implementations should use - * an appropriate range for the data represented. - */ - RANGE_UNSPECIFIED = 0 /* (0 << RANGE_SHIFT) */, - /** - * Full range uses all values for Y, Cb and Cr from - * 0 to 2^b-1, where b is the bit depth of the color format. - */ - RANGE_FULL = 134217728 /* (1 << RANGE_SHIFT) */, - /** - * Limited range uses values 16/256*2^b to 235/256*2^b for Y, and - * 1/16*2^b to 15/16*2^b for Cb, Cr, R, G and B, where b is the bit depth of - * the color format. - * - * E.g. For 8-bit-depth formats: - * Luma (Y) samples should range from 16 to 235, inclusive - * Chroma (Cb, Cr) samples should range from 16 to 240, inclusive - * - * For 10-bit-depth formats: - * Luma (Y) samples should range from 64 to 940, inclusive - * Chroma (Cb, Cr) samples should range from 64 to 960, inclusive - */ - RANGE_LIMITED = 268435456 /* (2 << RANGE_SHIFT) */, - /** - * Extended range is used for scRGB. Intended for use with - * floating point pixel formats. [0.0 - 1.0] is the standard - * sRGB space. Values outside the range 0.0 - 1.0 can encode - * color outside the sRGB gamut. - * Used to blend / merge multiple dataspaces on a single display. - */ - RANGE_EXTENDED = 402653184 /* (3 << RANGE_SHIFT) */, - /** - * Legacy dataspaces - * - * - * sRGB linear encoding: - * - * The red, green, and blue components are stored in sRGB space, but - * are linear, not gamma-encoded. - * The RGB primaries and the white point are the same as BT.709. - * - * The values are encoded using the full range ([0,255] for 8-bit) for all - * components. - */ - SRGB_LINEAR = 512 /* 0x200 */, - V0_SRGB_LINEAR = 138477568 /* ((STANDARD_BT709 | TRANSFER_LINEAR) | RANGE_FULL) */, - /** - * scRGB linear encoding: - * - * The red, green, and blue components are stored in extended sRGB space, - * but are linear, not gamma-encoded. - * The RGB primaries and the white point are the same as BT.709. - * - * The values are floating point. - * A pixel value of 1.0, 1.0, 1.0 corresponds to sRGB white (D65) at 80 nits. - * Values beyond the range [0.0 - 1.0] would correspond to other colors - * spaces and/or HDR content. - */ - V0_SCRGB_LINEAR = 406913024 /* ((STANDARD_BT709 | TRANSFER_LINEAR) | RANGE_EXTENDED) */, - /** - * sRGB gamma encoding: - * - * The red, green and blue components are stored in sRGB space, and - * converted to linear space when read, using the SRGB transfer function - * for each of the R, G and B components. When written, the inverse - * transformation is performed. - * - * The alpha component, if present, is always stored in linear space and - * is left unmodified when read or written. - * - * Use full range and BT.709 standard. - */ - SRGB = 513 /* 0x201 */, - V0_SRGB = 142671872 /* ((STANDARD_BT709 | TRANSFER_SRGB) | RANGE_FULL) */, - /** - * scRGB: - * - * The red, green, and blue components are stored in extended sRGB space, - * but are linear, not gamma-encoded. - * The RGB primaries and the white point are the same as BT.709. - * - * The values are floating point. - * A pixel value of 1.0, 1.0, 1.0 corresponds to sRGB white (D65) at 80 nits. - * Values beyond the range [0.0 - 1.0] would correspond to other colors - * spaces and/or HDR content. - */ - V0_SCRGB = 411107328 /* ((STANDARD_BT709 | TRANSFER_SRGB) | RANGE_EXTENDED) */, - /** - * YCbCr Colorspaces - * ----------------- - * - * Primaries are given using (x,y) coordinates in the CIE 1931 definition - * of x and y specified by ISO 11664-1. - * - * Transfer characteristics are the opto-electronic transfer characteristic - * at the source as a function of linear optical intensity (luminance). - * - * - * JPEG File Interchange Format (JFIF) - * - * Same model as BT.601-625, but all values (Y, Cb, Cr) range from 0 to 255 - * - * Use full range, BT.601 transfer and BT.601_625 standard. - */ - JFIF = 257 /* 0x101 */, - V0_JFIF = 146931712 /* ((STANDARD_BT601_625 | TRANSFER_SMPTE_170M) | RANGE_FULL) */, - /** - * ITU-R Recommendation 601 (BT.601) - 625-line - * - * Standard-definition television, 625 Lines (PAL) - * - * Use limited range, BT.601 transfer and BT.601_625 standard. - */ - BT601_625 = 258 /* 0x102 */, - V0_BT601_625 = 281149440 /* ((STANDARD_BT601_625 | TRANSFER_SMPTE_170M) | RANGE_LIMITED) */, - /** - * ITU-R Recommendation 601 (BT.601) - 525-line - * - * Standard-definition television, 525 Lines (NTSC) - * - * Use limited range, BT.601 transfer and BT.601_525 standard. - */ - BT601_525 = 259 /* 0x103 */, - V0_BT601_525 = 281280512 /* ((STANDARD_BT601_525 | TRANSFER_SMPTE_170M) | RANGE_LIMITED) */, - /** - * ITU-R Recommendation 709 (BT.709) - * - * High-definition television - * - * Use limited range, BT.709 transfer and BT.709 standard. - */ - BT709 = 260 /* 0x104 */, - V0_BT709 = 281083904 /* ((STANDARD_BT709 | TRANSFER_SMPTE_170M) | RANGE_LIMITED) */, - /** - * SMPTE EG 432-1 and SMPTE RP 431-2. - * - * Digital Cinema DCI-P3 - * - * Use full range, linear transfer and D65 DCI-P3 standard - */ - DCI_P3_LINEAR = 139067392 /* ((STANDARD_DCI_P3 | TRANSFER_LINEAR) | RANGE_FULL) */, - /** - * SMPTE EG 432-1 and SMPTE RP 431-2. - * - * Digital Cinema DCI-P3 - * - * Use full range, gamma 2.6 transfer and D65 DCI-P3 standard - * Note: Application is responsible for gamma encoding the data as - * a 2.6 gamma encoding is not supported in HW. - */ - DCI_P3 = 155844608 /* ((STANDARD_DCI_P3 | TRANSFER_GAMMA2_6) | RANGE_FULL) */, - /** - * Display P3 - * - * Display P3 uses same primaries and white-point as DCI-P3 - * linear transfer function makes this the same as DCI_P3_LINEAR. - */ - DISPLAY_P3_LINEAR = 139067392 /* ((STANDARD_DCI_P3 | TRANSFER_LINEAR) | RANGE_FULL) */, - /** - * Display P3 - * - * Use same primaries and white-point as DCI-P3 - * but sRGB transfer function. - */ - DISPLAY_P3 = 143261696 /* ((STANDARD_DCI_P3 | TRANSFER_SRGB) | RANGE_FULL) */, - /** - * Adobe RGB - * - * Use full range, gamma 2.2 transfer and Adobe RGB primaries - * Note: Application is responsible for gamma encoding the data as - * a 2.2 gamma encoding is not supported in HW. - */ - ADOBE_RGB = 151715840 /* ((STANDARD_ADOBE_RGB | TRANSFER_GAMMA2_2) | RANGE_FULL) */, - /** - * ITU-R Recommendation 2020 (BT.2020) - * - * Ultra High-definition television - * - * Use full range, linear transfer and BT2020 standard - */ - BT2020_LINEAR = 138805248 /* ((STANDARD_BT2020 | TRANSFER_LINEAR) | RANGE_FULL) */, - /** - * ITU-R Recommendation 2020 (BT.2020) - * - * Ultra High-definition television - * - * Use full range, BT.709 transfer and BT2020 standard - */ - BT2020 = 147193856 /* ((STANDARD_BT2020 | TRANSFER_SMPTE_170M) | RANGE_FULL) */, - /** - * ITU-R Recommendation 2020 (BT.2020) - * - * Ultra High-definition television - * - * Use full range, SMPTE 2084 (PQ) transfer and BT2020 standard - */ - BT2020_PQ = 163971072 /* ((STANDARD_BT2020 | TRANSFER_ST2084) | RANGE_FULL) */, - /** - * Data spaces for non-color formats - * - * - * The buffer contains depth ranging measurements from a depth camera. - * This value is valid with formats: - * HAL_PIXEL_FORMAT_Y16: 16-bit samples, consisting of a depth measurement - * and an associated confidence value. The 3 MSBs of the sample make - * up the confidence value, and the low 13 LSBs of the sample make up - * the depth measurement. - * For the confidence section, 0 means 100% confidence, 1 means 0% - * confidence. The mapping to a linear float confidence value between - * 0.f and 1.f can be obtained with - * float confidence = (((depthSample >> 13) - 1) & 0x7) / 7.0f; - * The depth measurement can be extracted simply with - * uint16_t range = (depthSample & 0x1FFF); - * HAL_PIXEL_FORMAT_BLOB: A depth point cloud, as - * a variable-length float (x,y,z, confidence) coordinate point list. - * The point cloud will be represented with the android_depth_points - * structure. - */ - DEPTH = 4096 /* 0x1000 */, - /** - * The buffer contains sensor events from sensor direct report. - * This value is valid with formats: - * HAL_PIXEL_FORMAT_BLOB: an array of sensor event structure that forms - * a lock free queue. Format of sensor event structure is specified - * in Sensors HAL. - */ - SENSOR = 4097 /* 0x1001 */, + + + + + + + RANGE_MASK = 939524096 , + + + + + + + + + + + + RANGE_UNSPECIFIED = 0 , + + + + + RANGE_FULL = 134217728 , + + + + + + + + + + + + + + RANGE_LIMITED = 268435456 , + + + + + + + + RANGE_EXTENDED = 402653184 , + + + + + + + + + + + + + + SRGB_LINEAR = 512 , + V0_SRGB_LINEAR = 138477568 , + + + + + + + + + + + + + V0_SCRGB_LINEAR = 406913024 , + + + + + + + + + + + + + + SRGB = 513 , + V0_SRGB = 142671872 , + + + + + + + + + + + + + V0_SCRGB = 411107328 , + + + + + + + + + + + + + + + + + + JFIF = 257 , + V0_JFIF = 146931712 , + + + + + + + + BT601_625 = 258 , + V0_BT601_625 = 281149440 , + + + + + + + + BT601_525 = 259 , + V0_BT601_525 = 281280512 , + + + + + + + + BT709 = 260 , + V0_BT709 = 281083904 , + + + + + + + + DCI_P3_LINEAR = 139067392 , + + + + + + + + + + DCI_P3 = 155844608 , + + + + + + + DISPLAY_P3_LINEAR = 139067392 , + + + + + + + DISPLAY_P3 = 143261696 , + + + + + + + + ADOBE_RGB = 151715840 , + + + + + + + + BT2020_LINEAR = 138805248 , + + + + + + + + BT2020 = 147193856 , + + + + + + + + BT2020_PQ = 163971072 , + + + + + + + + + + + + + + + + + + + + + + DEPTH = 4096 , + + + + + + + + SENSOR = 4097 , }; -/** - * Color modes that may be supported by a display. - * - * Definitions: - * Rendering intent generally defines the goal in mapping a source (input) - * color to a destination device color for a given color mode. - * - * It is important to keep in mind three cases where mapping may be applied: - * 1. The source gamut is much smaller than the destination (display) gamut - * 2. The source gamut is much larger than the destination gamut (this will - * ordinarily be handled using colorimetric rendering, below) - * 3. The source and destination gamuts are roughly equal, although not - * completely overlapping - * Also, a common requirement for mappings is that skin tones should be - * preserved, or at least remain natural in appearance. - * - * Colorimetric Rendering Intent (All cases): - * Colorimetric indicates that colors should be preserved. In the case - * that the source gamut lies wholly within the destination gamut or is - * about the same (#1, #3), this will simply mean that no manipulations - * (no saturation boost, for example) are applied. In the case where some - * source colors lie outside the destination gamut (#2, #3), those will - * need to be mapped to colors that are within the destination gamut, - * while the already in-gamut colors remain unchanged. - * - * Non-colorimetric transforms can take many forms. There are no hard - * rules and it's left to the implementation to define. - * Two common intents are described below. - * - * Stretched-Gamut Enhancement Intent (Source < Destination): - * When the destination gamut is much larger than the source gamut (#1), the - * source primaries may be redefined to reflect the full extent of the - * destination space, or to reflect an intermediate gamut. - * Skin-tone preservation would likely be applied. An example might be sRGB - * input displayed on a DCI-P3 capable device, with skin-tone preservation. - * - * Within-Gamut Enhancement Intent (Source >= Destination): - * When the device (destination) gamut is not larger than the source gamut - * (#2 or #3), but the appearance of a larger gamut is desired, techniques - * such as saturation boost may be applied to the source colors. Skin-tone - * preservation may be applied. There is no unique method for within-gamut - * enhancement; it would be defined within a flexible color mode. - * - */ enum class ColorMode : int32_t { - /** - * DEFAULT is the "native" gamut of the display. - * White Point: Vendor/OEM defined - * Panel Gamma: Vendor/OEM defined (typically 2.2) - * Rendering Intent: Vendor/OEM defined (typically 'enhanced') - */ NATIVE = 0, - /** - * STANDARD_BT601_625 corresponds with display - * settings that implement the ITU-R Recommendation BT.601 - * or Rec 601. Using 625 line version - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.290 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * KR = 0.299, KB = 0.114. This adjusts the luminance interpretation - * for RGB conversion from the one purely determined by the primaries - * to minimize the color shift into RGB space that uses BT.709 - * primaries. - * - * Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.500 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099 - */ STANDARD_BT601_625 = 1, - /** - * Primaries: - * x y - * green 0.290 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.222, KB = 0.071 luminance interpretation - * for RGB conversion. - * - * Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.500 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099 - */ STANDARD_BT601_625_UNADJUSTED = 2, - /** - * Primaries: - * x y - * green 0.310 0.595 - * blue 0.155 0.070 - * red 0.630 0.340 - * white (D65) 0.3127 0.3290 - * - * KR = 0.299, KB = 0.114. This adjusts the luminance interpretation - * for RGB conversion from the one purely determined by the primaries - * to minimize the color shift into RGB space that uses BT.709 - * primaries. - * - * Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.500 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099 - */ STANDARD_BT601_525 = 3, - /** - * Primaries: - * x y - * green 0.310 0.595 - * blue 0.155 0.070 - * red 0.630 0.340 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.212, KB = 0.087 luminance interpretation - * for RGB conversion (as in SMPTE 240M). - * - * Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.500 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099 - */ STANDARD_BT601_525_UNADJUSTED = 4, - /** - * REC709 corresponds with display settings that implement - * the ITU-R Recommendation BT.709 / Rec. 709 for high-definition television. - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.300 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * HDTV REC709 Inverse Gamma Correction (IGC): V represents normalized - * (with [0 to 1] range) value of R, G, or B. - * - * if Vnonlinear < 0.081 - * Vlinear = Vnonlinear / 4.5 - * else - * Vlinear = ((Vnonlinear + 0.099) / 1.099) ^ (1/0.45) - * - * HDTV REC709 Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.5 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear) ^ 0.45 – 0.099 - */ STANDARD_BT709 = 5, - /** - * DCI_P3 corresponds with display settings that implement - * SMPTE EG 432-1 and SMPTE RP 431-2 - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.265 0.690 - * blue 0.150 0.060 - * red 0.680 0.320 - * white (D65) 0.3127 0.3290 - * - * Gamma: 2.6 - */ DCI_P3 = 6, - /** - * SRGB corresponds with display settings that implement - * the sRGB color space. Uses the same primaries as ITU-R Recommendation - * BT.709 - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.300 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * PC/Internet (sRGB) Inverse Gamma Correction (IGC): - * - * if Vnonlinear ≤ 0.03928 - * Vlinear = Vnonlinear / 12.92 - * else - * Vlinear = ((Vnonlinear + 0.055)/1.055) ^ 2.4 - * - * PC/Internet (sRGB) Gamma Correction (GC): - * - * if Vlinear ≤ 0.0031308 - * Vnonlinear = 12.92 * Vlinear - * else - * Vnonlinear = 1.055 * (Vlinear)^(1/2.4) – 0.055 - */ SRGB = 7, - /** - * ADOBE_RGB corresponds with the RGB color space developed - * by Adobe Systems, Inc. in 1998. - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.210 0.710 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * Gamma: 2.2 - */ ADOBE_RGB = 8, - /** - * DISPLAY_P3 is a color space that uses the DCI_P3 primaries, - * the D65 white point and the SRGB transfer functions. - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.265 0.690 - * blue 0.150 0.060 - * red 0.680 0.320 - * white (D65) 0.3127 0.3290 - * - * PC/Internet (sRGB) Gamma Correction (GC): - * - * if Vlinear ≤ 0.0030186 - * Vnonlinear = 12.92 * Vlinear - * else - * Vnonlinear = 1.055 * (Vlinear)^(1/2.4) – 0.055 - * - * Note: In most cases sRGB transfer function will be fine. - */ DISPLAY_P3 = 9, }; -/** - * Color transforms that may be applied by hardware composer to the whole - * display. - */ enum class ColorTransform : int32_t { - /** - * Applies no transform to the output color - */ IDENTITY = 0, - /** - * Applies an arbitrary transform defined by a 4x4 affine matrix - */ ARBITRARY_MATRIX = 1, - /** - * Applies a transform that inverts the value or luminance of the color, but - * does not modify hue or saturation - */ VALUE_INVERSE = 2, - /** - * Applies a transform that maps all colors to shades of gray - */ GRAYSCALE = 3, - /** - * Applies a transform which corrects for protanopic color blindness - */ CORRECT_PROTANOPIA = 4, - /** - * Applies a transform which corrects for deuteranopic color blindness - */ CORRECT_DEUTERANOPIA = 5, - /** - * Applies a transform which corrects for tritanopic color blindness - */ CORRECT_TRITANOPIA = 6, }; -/** - * Supported HDR formats. Must be kept in sync with equivalents in Display.java. - */ enum class Hdr : int32_t { - /** - * Device supports Dolby Vision HDR - */ DOLBY_VISION = 1, - /** - * Device supports HDR10 - */ HDR10 = 2, - /** - * Device supports hybrid log-gamma HDR - */ HLG = 3, }; -// -// type declarations for package -// template static inline std::string toString(int32_t o); @@ -1691,9 +1360,6 @@ constexpr int32_t& operator&=(int32_t& v, return v; } -// -// type header definitions for package -// template <> inline std::string toString<::android::hardware::graphics::common::V1_0::PixelFormat>(int32_t o) { @@ -3183,15 +2849,12 @@ static inline std::string toString(::android::hardware::graphics::common::V1_0:: return os; } -} // namespace V1_0 -} // namespace common -} // namespace graphics -} // namespace hardware -} // namespace android +} +} +} +} +} -// -// global type declarations for package -// namespace android { namespace hardware { @@ -3220,9 +2883,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_0::PixelFormat, 2 ::android::hardware::graphics::common::V1_0::PixelFormat::Y16, ::android::hardware::graphics::common::V1_0::PixelFormat::YV12, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -3254,9 +2917,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_0::BufferUsage, 2 ::android::hardware::graphics::common::V1_0::BufferUsage::VENDOR_MASK, ::android::hardware::graphics::common::V1_0::BufferUsage::VENDOR_MASK_HI, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -3270,9 +2933,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_0::Transform, 5> ::android::hardware::graphics::common::V1_0::Transform::ROT_180, ::android::hardware::graphics::common::V1_0::Transform::ROT_270, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -3338,9 +3001,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_0::Dataspace, 57> ::android::hardware::graphics::common::V1_0::Dataspace::DEPTH, ::android::hardware::graphics::common::V1_0::Dataspace::SENSOR, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -3359,9 +3022,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_0::ColorMode, 10> ::android::hardware::graphics::common::V1_0::ColorMode::ADOBE_RGB, ::android::hardware::graphics::common::V1_0::ColorMode::DISPLAY_P3, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -3377,9 +3040,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_0::ColorTransform ::android::hardware::graphics::common::V1_0::ColorTransform::CORRECT_DEUTERANOPIA, ::android::hardware::graphics::common::V1_0::ColorTransform::CORRECT_TRITANOPIA, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -3391,11 +3054,11 @@ constexpr std::array<::android::hardware::graphics::common::V1_0::Hdr, 3> ::android::hardware::graphics::common::V1_0::Hdr::HDR10, ::android::hardware::graphics::common::V1_0::Hdr::HLG, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} -#endif // HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_0_TYPES_H +#endif #ifndef HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_1_TYPES_H #define HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_1_TYPES_H @@ -3411,1449 +3074,1158 @@ namespace graphics { namespace common { namespace V1_1 { -// Forward declaration for forward reference support: enum class PixelFormat : int32_t; enum class BufferUsage : uint64_t; enum class Dataspace : int32_t; enum class ColorMode : int32_t; enum class RenderIntent : int32_t; -/** - * Pixel formats for graphics buffers. - */ enum class PixelFormat : int32_t { - /** - * 32-bit format that has 8-bit R, G, B, and A components, in that order, - * from the lowest memory address to the highest memory address. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGBA_8888 = 1 /* 0x1 */, - /** - * 32-bit format that has 8-bit R, G, B, and unused components, in that - * order, from the lowest memory address to the highest memory address. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGBX_8888 = 2 /* 0x2 */, - /** - * 24-bit format that has 8-bit R, G, and B components, in that order, - * from the lowest memory address to the highest memory address. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGB_888 = 3 /* 0x3 */, - /** - * 16-bit packed format that has 5-bit R, 6-bit G, and 5-bit B components, - * in that order, from the most-sigfinicant bits to the least-significant - * bits. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGB_565 = 4 /* 0x4 */, - /** - * 32-bit format that has 8-bit B, G, R, and A components, in that order, - * from the lowest memory address to the highest memory address. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - BGRA_8888 = 5 /* 0x5 */, - /** - * Legacy formats deprecated in favor of YCBCR_420_888. - */ - YCBCR_422_SP = 16 /* 0x10 */, - YCRCB_420_SP = 17 /* 0x11 */, - YCBCR_422_I = 20 /* 0x14 */, - /** - * 64-bit format that has 16-bit R, G, B, and A components, in that order, - * from the lowest memory address to the highest memory address. - * - * The component values are signed floats, whose interpretation is defined - * by the dataspace. - */ - RGBA_FP16 = 22 /* 0x16 */, - /** - * RAW16 is a single-channel, 16-bit, little endian format, typically - * representing raw Bayer-pattern images from an image sensor, with minimal - * processing. - * - * The exact pixel layout of the data in the buffer is sensor-dependent, and - * needs to be queried from the camera device. - * - * Generally, not all 16 bits are used; more common values are 10 or 12 - * bits. If not all bits are used, the lower-order bits are filled first. - * All parameters to interpret the raw data (black and white points, - * color space, etc) must be queried from the camera device. - * - * This format assumes - * - an even width - * - an even height - * - a horizontal stride multiple of 16 pixels - * - a vertical stride equal to the height - * - strides are specified in pixels, not in bytes - * - * size = stride * height * 2 - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::RENDERSCRIPT - * - * The mapping of the dataspace to buffer contents for RAW16 is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::ARBITRARY | Raw image sensor data, layout is as - * | defined above. - * Dataspace::DEPTH | Unprocessed implementation-dependent raw - * | depth measurements, opaque with 16 bit - * | samples. - * Other | Unsupported - */ - RAW16 = 32 /* 0x20 */, - /** - * BLOB is used to carry task-specific data which does not have a standard - * image structure. The details of the format are left to the two - * endpoints. - * - * A typical use case is for transporting JPEG-compressed images from the - * Camera HAL to the framework or to applications. - * - * Buffers of this format must have a height of 1, and width equal to their - * size in bytes. - * - * The mapping of the dataspace to buffer contents for BLOB is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::JFIF | An encoded JPEG image - * Dataspace::DEPTH | An android_depth_points buffer - * Dataspace::SENSOR | Sensor event data. - * Other | Unsupported - */ - BLOB = 33 /* 0x21 */, - /** - * A format indicating that the choice of format is entirely up to the - * allocator. - * - * The allocator should examine the usage bits passed in when allocating a - * buffer with this format, and it should derive the pixel format from - * those usage flags. This format must never be used with any of the - * BufferUsage::CPU_* usage flags. - * - * Even when the internally chosen format has an alpha component, the - * clients must assume the alpha vlaue to be 1.0. - * - * The interpretation of the component values is defined by the dataspace. - */ - IMPLEMENTATION_DEFINED = 34 /* 0x22 */, - /** - * This format allows platforms to use an efficient YCbCr/YCrCb 4:2:0 - * buffer layout, while still describing the general format in a - * layout-independent manner. While called YCbCr, it can be used to - * describe formats with either chromatic ordering, as well as - * whole planar or semiplanar layouts. - * - * This format must be accepted by the allocator when BufferUsage::CPU_* - * are set. - * - * Buffers with this format must be locked with IMapper::lockYCbCr. - * Locking with IMapper::lock must return an error. - * - * The interpretation of the component values is defined by the dataspace. - */ - YCBCR_420_888 = 35 /* 0x23 */, - /** - * RAW_OPAQUE is a format for unprocessed raw image buffers coming from an - * image sensor. The actual structure of buffers of this format is - * implementation-dependent. - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::RENDERSCRIPT - * - * The mapping of the dataspace to buffer contents for RAW_OPAQUE is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::ARBITRARY | Raw image sensor data. - * Other | Unsupported - */ - RAW_OPAQUE = 36 /* 0x24 */, - /** - * RAW10 is a single-channel, 10-bit per pixel, densely packed in each row, - * unprocessed format, usually representing raw Bayer-pattern images coming from - * an image sensor. - * - * In an image buffer with this format, starting from the first pixel of each - * row, each 4 consecutive pixels are packed into 5 bytes (40 bits). Each one - * of the first 4 bytes contains the top 8 bits of each pixel, The fifth byte - * contains the 2 least significant bits of the 4 pixels, the exact layout data - * for each 4 consecutive pixels is illustrated below (Pi[j] stands for the jth - * bit of the ith pixel): - * - * bit 7 bit 0 - * =====|=====|=====|=====|=====|=====|=====|=====| - * Byte 0: |P0[9]|P0[8]|P0[7]|P0[6]|P0[5]|P0[4]|P0[3]|P0[2]| - * |-----|-----|-----|-----|-----|-----|-----|-----| - * Byte 1: |P1[9]|P1[8]|P1[7]|P1[6]|P1[5]|P1[4]|P1[3]|P1[2]| - * |-----|-----|-----|-----|-----|-----|-----|-----| - * Byte 2: |P2[9]|P2[8]|P2[7]|P2[6]|P2[5]|P2[4]|P2[3]|P2[2]| - * |-----|-----|-----|-----|-----|-----|-----|-----| - * Byte 3: |P3[9]|P3[8]|P3[7]|P3[6]|P3[5]|P3[4]|P3[3]|P3[2]| - * |-----|-----|-----|-----|-----|-----|-----|-----| - * Byte 4: |P3[1]|P3[0]|P2[1]|P2[0]|P1[1]|P1[0]|P0[1]|P0[0]| - * =============================================== - * - * This format assumes - * - a width multiple of 4 pixels - * - an even height - * - a vertical stride equal to the height - * - strides are specified in bytes, not in pixels - * - * size = stride * height - * - * When stride is equal to width * (10 / 8), there will be no padding bytes at - * the end of each row, the entire image data is densely packed. When stride is - * larger than width * (10 / 8), padding bytes will be present at the end of each - * row (including the last row). - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::RENDERSCRIPT - * - * The mapping of the dataspace to buffer contents for RAW10 is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::ARBITRARY | Raw image sensor data. - * Other | Unsupported - */ - RAW10 = 37 /* 0x25 */, - /** - * RAW12 is a single-channel, 12-bit per pixel, densely packed in each row, - * unprocessed format, usually representing raw Bayer-pattern images coming from - * an image sensor. - * - * In an image buffer with this format, starting from the first pixel of each - * row, each two consecutive pixels are packed into 3 bytes (24 bits). The first - * and second byte contains the top 8 bits of first and second pixel. The third - * byte contains the 4 least significant bits of the two pixels, the exact layout - * data for each two consecutive pixels is illustrated below (Pi[j] stands for - * the jth bit of the ith pixel): - * - * bit 7 bit 0 - * ======|======|======|======|======|======|======|======| - * Byte 0: |P0[11]|P0[10]|P0[ 9]|P0[ 8]|P0[ 7]|P0[ 6]|P0[ 5]|P0[ 4]| - * |------|------|------|------|------|------|------|------| - * Byte 1: |P1[11]|P1[10]|P1[ 9]|P1[ 8]|P1[ 7]|P1[ 6]|P1[ 5]|P1[ 4]| - * |------|------|------|------|------|------|------|------| - * Byte 2: |P1[ 3]|P1[ 2]|P1[ 1]|P1[ 0]|P0[ 3]|P0[ 2]|P0[ 1]|P0[ 0]| - * ======================================================= - * - * This format assumes: - * - a width multiple of 4 pixels - * - an even height - * - a vertical stride equal to the height - * - strides are specified in bytes, not in pixels - * - * size = stride * height - * - * When stride is equal to width * (12 / 8), there will be no padding bytes at - * the end of each row, the entire image data is densely packed. When stride is - * larger than width * (12 / 8), padding bytes will be present at the end of - * each row (including the last row). - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::RENDERSCRIPT - * - * The mapping of the dataspace to buffer contents for RAW12 is as - * follows: - * - * Dataspace value | Buffer contents - * -------------------------------+----------------------------------------- - * Dataspace::ARBITRARY | Raw image sensor data. - * Other | Unsupported - */ - RAW12 = 38 /* 0x26 */, - /** - * 0x27 to 0x2A are reserved for flexible formats - * - * - * 32-bit packed format that has 2-bit A, 10-bit B, G, and R components, - * in that order, from the most-sigfinicant bits to the least-significant - * bits. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - RGBA_1010102 = 43 /* 0x2B */, - /** - * 0x100 - 0x1FF - * - * This range is reserved for vendor extensions. Formats in this range - * must support BufferUsage::GPU_TEXTURE. Clients must assume they do not - * have an alpha component. - * - * - * Y8 is a YUV planar format comprised of a WxH Y plane, with each pixel - * being represented by 8 bits. It is equivalent to just the Y plane from - * YV12. - * - * This format assumes - * - an even width - * - an even height - * - a horizontal stride multiple of 16 pixels - * - a vertical stride equal to the height - * - * size = stride * height - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - Y8 = 538982489 /* 0x20203859 */, - /** - * Y16 is a YUV planar format comprised of a WxH Y plane, with each pixel - * being represented by 16 bits. It is just like Y8, but has double the - * bits per pixel (little endian). - * - * This format assumes - * - an even width - * - an even height - * - a horizontal stride multiple of 16 pixels - * - a vertical stride equal to the height - * - strides are specified in pixels, not in bytes - * - * size = stride * height * 2 - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. When the dataspace is - * Dataspace::DEPTH, each pixel is a distance value measured by a depth - * camera, plus an associated confidence value. - */ - Y16 = 540422489 /* 0x20363159 */, - /** - * YV12 is a 4:2:0 YCrCb planar format comprised of a WxH Y plane followed - * by (W/2) x (H/2) Cr and Cb planes. - * - * This format assumes - * - an even width - * - an even height - * - a horizontal stride multiple of 16 pixels - * - a vertical stride equal to the height - * - * y_size = stride * height - * c_stride = ALIGN(stride/2, 16) - * c_size = c_stride * height/2 - * size = y_size + c_size * 2 - * cr_offset = y_size - * cb_offset = y_size + c_size - * - * This range is reserved for vendor extensions. Formats in this range - * must support BufferUsage::GPU_TEXTURE. Clients must assume they do not - * have an alpha component. - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::CAMERA_* - * - BufferUsage::CPU_* - * - BufferUsage::GPU_TEXTURE - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - YV12 = 842094169 /* 0x32315659 */, - /** - * 16-bit format that has a single 16-bit depth component. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - DEPTH_16 = 48 /* 0x30 */, - /** - * 32-bit format that has a single 24-bit depth component and, optionally, - * 8 bits that are unused. - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - */ - DEPTH_24 = 49 /* 0x31 */, - /** - * 32-bit format that has a 24-bit depth component and an 8-bit stencil - * component packed into 32-bits. - * - * The depth component values are unsigned normalized to the range [0, 1], - * whose interpretation is defined by the dataspace. The stencil values are - * unsigned integers, whose interpretation is defined by the dataspace. - */ - DEPTH_24_STENCIL_8 = 50 /* 0x32 */, - /** - * 32-bit format that has a single 32-bit depth component. - * - * The component values are signed floats, whose interpretation is defined - * by the dataspace. - */ - DEPTH_32F = 51 /* 0x33 */, - /** - * Two-component format that has a 32-bit depth component, an 8-bit stencil - * component, and optionally 24-bits unused. - * - * The depth component values are signed floats, whose interpretation is - * defined by the dataspace. The stencil bits are unsigned integers, whose - * interpretation is defined by the dataspace. - */ - DEPTH_32F_STENCIL_8 = 52 /* 0x34 */, - /** - * 8-bit format that has a single 8-bit stencil component. - * - * The component values are unsigned integers, whose interpretation is - * defined by the dataspace. - */ - STENCIL_8 = 53 /* 0x35 */, - /** - * P010 is a 4:2:0 YCbCr semiplanar format comprised of a WxH Y plane - * followed immediately by a Wx(H/2) CbCr plane. Each sample is - * represented by a 16-bit little-endian value, with the lower 6 bits set - * to zero. - * - * This format assumes - * - an even height - * - a vertical stride equal to the height - * - * stride_in_bytes = stride * 2 - * y_size = stride_in_bytes * height - * cbcr_size = stride_in_bytes * (height / 2) - * cb_offset = y_size - * cr_offset = cb_offset + 2 - * - * This format must be accepted by the allocator when used with the - * following usage flags: - * - * - BufferUsage::VIDEO_* - * - BufferUsage::CPU_* - * - BufferUsage::GPU_TEXTURE - * - * The component values are unsigned normalized to the range [0, 1], whose - * interpretation is defined by the dataspace. - * - * This format is appropriate for 10bit video content. - * - * Buffers with this format must be locked with IMapper::lockYCbCr - * or with IMapper::lock. - */ - YCBCR_P010 = 54 /* 0x36 */, + + + + + + + + RGBA_8888 = 1 , + + + + + + + + RGBX_8888 = 2 , + + + + + + + + RGB_888 = 3 , + + + + + + + + + RGB_565 = 4 , + + + + + + + + BGRA_8888 = 5 , + + + + YCBCR_422_SP = 16 , + YCRCB_420_SP = 17 , + YCBCR_422_I = 20 , + + + + + + + + RGBA_FP16 = 22 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RAW16 = 32 , + + + + + + + + + + + + + + + + + + + + + + BLOB = 33 , + + + + + + + + + + + + + + + IMPLEMENTATION_DEFINED = 34 , + + + + + + + + + + + + + + + + YCBCR_420_888 = 35 , + + + + + + + + + + + + + + + + + + + + + RAW_OPAQUE = 36 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RAW10 = 37 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RAW12 = 38 , + + + + + + + + + + + + RGBA_1010102 = 43 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Y8 = 538982489 , + + + + + + + + + + + + + + + + + + + + + + + + + + Y16 = 540422489 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YV12 = 842094169 , + + + + + + + DEPTH_16 = 48 , + + + + + + + + DEPTH_24 = 49 , + + + + + + + + + DEPTH_24_STENCIL_8 = 50 , + + + + + + + DEPTH_32F = 51 , + + + + + + + + + DEPTH_32F_STENCIL_8 = 52 , + + + + + + + STENCIL_8 = 53 , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YCBCR_P010 = 54 , }; -/** - * Buffer usage definitions. - */ enum class BufferUsage : uint64_t { - /** - * bit 0-3 is an enum - */ - CPU_READ_MASK = 15ull /* 0xfULL */, - /** - * buffer is never read by CPU - */ + + + + CPU_READ_MASK = 15ull , + + + CPU_READ_NEVER = 0ull, - /** - * buffer is rarely read by CPU - */ CPU_READ_RARELY = 2ull, - /** - * buffer is often read by CPU - */ CPU_READ_OFTEN = 3ull, - /** - * bit 4-7 is an enum - */ - CPU_WRITE_MASK = 240ull /* (0xfULL << 4) */, - /** - * buffer is never written by CPU - */ - CPU_WRITE_NEVER = 0ull /* (0 << 4) */, - /** - * buffer is rarely written by CPU - */ - CPU_WRITE_RARELY = 32ull /* (2 << 4) */, - /** - * buffer is often written by CPU - */ - CPU_WRITE_OFTEN = 48ull /* (3 << 4) */, - /** - * buffer is used as a GPU texture - */ - GPU_TEXTURE = 256ull /* (1ULL << 8) */, - /** - * buffer is used as a GPU render target - */ - GPU_RENDER_TARGET = 512ull /* (1ULL << 9) */, - /** - * bit 10 must be zero - * - * - * buffer is used as a composer HAL overlay layer - */ - COMPOSER_OVERLAY = 2048ull /* (1ULL << 11) */, - /** - * buffer is used as a composer HAL client target - */ - COMPOSER_CLIENT_TARGET = 4096ull /* (1ULL << 12) */, - /** - * bit 13 must be zero - * - * - * Buffer is allocated with hardware-level protection against copying the - * contents (or information derived from the contents) into unprotected - * memory. - */ - PROTECTED = 16384ull /* (1ULL << 14) */, - /** - * buffer is used as a hwcomposer HAL cursor layer - */ - COMPOSER_CURSOR = 32768ull /* (1ULL << 15) */, - /** - * buffer is used as a video encoder input - */ - VIDEO_ENCODER = 65536ull /* (1ULL << 16) */, - /** - * buffer is used as a camera HAL output - */ - CAMERA_OUTPUT = 131072ull /* (1ULL << 17) */, - /** - * buffer is used as a camera HAL input - */ - CAMERA_INPUT = 262144ull /* (1ULL << 18) */, - /** - * bit 19 must be zero - * - * - * buffer is used as a renderscript allocation - */ - RENDERSCRIPT = 1048576ull /* (1ULL << 20) */, - /** - * bit 21 must be zero - * - * - * buffer is used as a video decoder output - */ - VIDEO_DECODER = 4194304ull /* (1ULL << 22) */, - /** - * buffer is used as a sensor direct report output - */ - SENSOR_DIRECT_DATA = 8388608ull /* (1ULL << 23) */, - /** - * buffer is used as as an OpenGL shader storage or uniform - * buffer object - */ - GPU_DATA_BUFFER = 16777216ull /* (1ULL << 24) */, - /** - * bits 25-27 must be zero and are reserved for future versions - * - * - * bits 28-31 are reserved for vendor extensions - */ - VENDOR_MASK = 4026531840ull /* (0xfULL << 28) */, - /** - * bits 32-47 must be zero and are reserved for future versions - * - * - * bits 48-63 are reserved for vendor extensions - */ - VENDOR_MASK_HI = 18446462598732840960ull /* (0xffffULL << 48) */, - /** - * buffer is used as a cube map texture - */ - GPU_CUBE_MAP = 33554432ull /* (1ULL << 25) */, - /** - * buffer contains a complete mipmap hierarchy - */ - GPU_MIPMAP_COMPLETE = 67108864ull /* (1ULL << 26) */, + + + + CPU_WRITE_MASK = 240ull , + + + + CPU_WRITE_NEVER = 0ull , + + + + CPU_WRITE_RARELY = 32ull , + + + + CPU_WRITE_OFTEN = 48ull , + + + + GPU_TEXTURE = 256ull , + + + + GPU_RENDER_TARGET = 512ull , + + + + + + + COMPOSER_OVERLAY = 2048ull , + + + + COMPOSER_CLIENT_TARGET = 4096ull , + + + + + + + + + PROTECTED = 16384ull , + + + + COMPOSER_CURSOR = 32768ull , + + + + VIDEO_ENCODER = 65536ull , + + + + CAMERA_OUTPUT = 131072ull , + + + + CAMERA_INPUT = 262144ull , + + + + + + + RENDERSCRIPT = 1048576ull , + + + + + + + VIDEO_DECODER = 4194304ull , + + + + SENSOR_DIRECT_DATA = 8388608ull , + + + + + GPU_DATA_BUFFER = 16777216ull , + + + + + + + VENDOR_MASK = 4026531840ull , + + + + + + + VENDOR_MASK_HI = 18446462598732840960ull , + + + + GPU_CUBE_MAP = 33554432ull , + + + + GPU_MIPMAP_COMPLETE = 67108864ull , }; enum class Dataspace : int32_t { - /** - * Default-assumption data space, when not explicitly specified. - * - * It is safest to assume the buffer is an image with sRGB primaries and - * encoding ranges, but the consumer and/or the producer of the data may - * simply be using defaults. No automatic gamma transform should be - * expected, except for a possible display gamma transform when drawn to a - * screen. - */ - UNKNOWN = 0 /* 0x0 */, - /** - * Arbitrary dataspace with manually defined characteristics. Definition - * for colorspaces or other meaning must be communicated separately. - * - * This is used when specifying primaries, transfer characteristics, - * etc. separately. - * - * A typical use case is in video encoding parameters (e.g. for H.264), - * where a colorspace can have separately defined primaries, transfer - * characteristics, etc. - */ - ARBITRARY = 1 /* 0x1 */, - /** - * Color-description aspects - * - * The following aspects define various characteristics of the color - * specification. These represent bitfields, so that a data space value - * can specify each of them independently. - */ + + + + + + + + + + UNKNOWN = 0 , + + + + + + + + + + + + ARBITRARY = 1 , + + + + + + + STANDARD_SHIFT = 16, - /** - * Standard aspect - * - * Defines the chromaticity coordinates of the source primaries in terms of - * the CIE 1931 definition of x and y specified in ISO 11664-1. - */ - STANDARD_MASK = 4128768 /* (63 << STANDARD_SHIFT) */, - /** - * Chromacity coordinates are unknown or are determined by the application. - * Implementations shall use the following suggested standards: - * - * All YCbCr formats: BT709 if size is 720p or larger (since most video - * content is letterboxed this corresponds to width is - * 1280 or greater, or height is 720 or greater). - * BT601_625 if size is smaller than 720p or is JPEG. - * All RGB formats: BT709. - * - * For all other formats standard is undefined, and implementations should use - * an appropriate standard for the data represented. - */ - STANDARD_UNSPECIFIED = 0 /* (0 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.300 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.2126, KB = 0.0722 luminance interpretation - * for RGB conversion. - */ - STANDARD_BT709 = 65536 /* (1 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.290 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * KR = 0.299, KB = 0.114. This adjusts the luminance interpretation - * for RGB conversion from the one purely determined by the primaries - * to minimize the color shift into RGB space that uses BT.709 - * primaries. - */ - STANDARD_BT601_625 = 131072 /* (2 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.290 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.222, KB = 0.071 luminance interpretation - * for RGB conversion. - */ - STANDARD_BT601_625_UNADJUSTED = 196608 /* (3 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.310 0.595 - * blue 0.155 0.070 - * red 0.630 0.340 - * white (D65) 0.3127 0.3290 - * - * KR = 0.299, KB = 0.114. This adjusts the luminance interpretation - * for RGB conversion from the one purely determined by the primaries - * to minimize the color shift into RGB space that uses BT.709 - * primaries. - */ - STANDARD_BT601_525 = 262144 /* (4 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.310 0.595 - * blue 0.155 0.070 - * red 0.630 0.340 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.212, KB = 0.087 luminance interpretation - * for RGB conversion (as in SMPTE 240M). - */ - STANDARD_BT601_525_UNADJUSTED = 327680 /* (5 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.170 0.797 - * blue 0.131 0.046 - * red 0.708 0.292 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.2627, KB = 0.0593 luminance interpretation - * for RGB conversion. - */ - STANDARD_BT2020 = 393216 /* (6 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.170 0.797 - * blue 0.131 0.046 - * red 0.708 0.292 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.2627, KB = 0.0593 luminance interpretation - * for RGB conversion using the linear domain. - */ - STANDARD_BT2020_CONSTANT_LUMINANCE = 458752 /* (7 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.21 0.71 - * blue 0.14 0.08 - * red 0.67 0.33 - * white (C) 0.310 0.316 - * - * Use the unadjusted KR = 0.30, KB = 0.11 luminance interpretation - * for RGB conversion. - */ - STANDARD_BT470M = 524288 /* (8 << STANDARD_SHIFT) */, - /** - * Primaries: x y - * green 0.243 0.692 - * blue 0.145 0.049 - * red 0.681 0.319 - * white (C) 0.310 0.316 - * - * Use the unadjusted KR = 0.254, KB = 0.068 luminance interpretation - * for RGB conversion. - */ - STANDARD_FILM = 589824 /* (9 << STANDARD_SHIFT) */, - /** - * SMPTE EG 432-1 and SMPTE RP 431-2. (DCI-P3) - * Primaries: x y - * green 0.265 0.690 - * blue 0.150 0.060 - * red 0.680 0.320 - * white (D65) 0.3127 0.3290 - */ - STANDARD_DCI_P3 = 655360 /* (10 << STANDARD_SHIFT) */, - /** - * Adobe RGB - * Primaries: x y - * green 0.210 0.710 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - */ - STANDARD_ADOBE_RGB = 720896 /* (11 << STANDARD_SHIFT) */, + + + + + + + STANDARD_MASK = 4128768 , + + + + + + + + + + + + + + STANDARD_UNSPECIFIED = 0 , + + + + + + + + + + + STANDARD_BT709 = 65536 , + + + + + + + + + + + + + STANDARD_BT601_625 = 131072 , + + + + + + + + + + + STANDARD_BT601_625_UNADJUSTED = 196608 , + + + + + + + + + + + + + STANDARD_BT601_525 = 262144 , + + + + + + + + + + + STANDARD_BT601_525_UNADJUSTED = 327680 , + + + + + + + + + + + STANDARD_BT2020 = 393216 , + + + + + + + + + + + STANDARD_BT2020_CONSTANT_LUMINANCE = 458752 , + + + + + + + + + + + STANDARD_BT470M = 524288 , + + + + + + + + + + + STANDARD_FILM = 589824 , + + + + + + + + + STANDARD_DCI_P3 = 655360 , + + + + + + + + + STANDARD_ADOBE_RGB = 720896 , TRANSFER_SHIFT = 22, - /** - * Transfer aspect - * - * Transfer characteristics are the opto-electronic transfer characteristic - * at the source as a function of linear optical intensity (luminance). - * - * For digital signals, E corresponds to the recorded value. Normally, the - * transfer function is applied in RGB space to each of the R, G and B - * components independently. This may result in color shift that can be - * minized by applying the transfer function in Lab space only for the L - * component. Implementation may apply the transfer function in RGB space - * for all pixel formats if desired. - */ - TRANSFER_MASK = 130023424 /* (31 << TRANSFER_SHIFT) */, - /** - * Transfer characteristics are unknown or are determined by the - * application. - * - * Implementations should use the following transfer functions: - * - * For YCbCr formats: use TRANSFER_SMPTE_170M - * For RGB formats: use TRANSFER_SRGB - * - * For all other formats transfer function is undefined, and implementations - * should use an appropriate standard for the data represented. - */ - TRANSFER_UNSPECIFIED = 0 /* (0 << TRANSFER_SHIFT) */, - /** - * Transfer characteristic curve: - * E = L - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_LINEAR = 4194304 /* (1 << TRANSFER_SHIFT) */, - /** - * Transfer characteristic curve: - * - * E = 1.055 * L^(1/2.4) - 0.055 for 0.0031308 <= L <= 1 - * = 12.92 * L for 0 <= L < 0.0031308 - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_SRGB = 8388608 /* (2 << TRANSFER_SHIFT) */, - /** - * BT.601 525, BT.601 625, BT.709, BT.2020 - * - * Transfer characteristic curve: - * E = 1.099 * L ^ 0.45 - 0.099 for 0.018 <= L <= 1 - * = 4.500 * L for 0 <= L < 0.018 - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_SMPTE_170M = 12582912 /* (3 << TRANSFER_SHIFT) */, - /** - * Assumed display gamma 2.2. - * - * Transfer characteristic curve: - * E = L ^ (1/2.2) - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_GAMMA2_2 = 16777216 /* (4 << TRANSFER_SHIFT) */, - /** - * display gamma 2.6. - * - * Transfer characteristic curve: - * E = L ^ (1/2.6) - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_GAMMA2_6 = 20971520 /* (5 << TRANSFER_SHIFT) */, - /** - * display gamma 2.8. - * - * Transfer characteristic curve: - * E = L ^ (1/2.8) - * L - luminance of image 0 <= L <= 1 for conventional colorimetry - * E - corresponding electrical signal - */ - TRANSFER_GAMMA2_8 = 25165824 /* (6 << TRANSFER_SHIFT) */, - /** - * SMPTE ST 2084 (Dolby Perceptual Quantizer) - * - * Transfer characteristic curve: - * E = ((c1 + c2 * L^n) / (1 + c3 * L^n)) ^ m - * c1 = c3 - c2 + 1 = 3424 / 4096 = 0.8359375 - * c2 = 32 * 2413 / 4096 = 18.8515625 - * c3 = 32 * 2392 / 4096 = 18.6875 - * m = 128 * 2523 / 4096 = 78.84375 - * n = 0.25 * 2610 / 4096 = 0.1593017578125 - * L - luminance of image 0 <= L <= 1 for HDR colorimetry. - * L = 1 corresponds to 10000 cd/m2 - * E - corresponding electrical signal - */ - TRANSFER_ST2084 = 29360128 /* (7 << TRANSFER_SHIFT) */, - /** - * ARIB STD-B67 Hybrid Log Gamma - * - * Transfer characteristic curve: - * E = r * L^0.5 for 0 <= L <= 1 - * = a * ln(L - b) + c for 1 < L - * a = 0.17883277 - * b = 0.28466892 - * c = 0.55991073 - * r = 0.5 - * L - luminance of image 0 <= L for HDR colorimetry. L = 1 corresponds - * to reference white level of 100 cd/m2 - * E - corresponding electrical signal - */ - TRANSFER_HLG = 33554432 /* (8 << TRANSFER_SHIFT) */, + + + + + + + + + + + + + + TRANSFER_MASK = 130023424 , + + + + + + + + + + + + + TRANSFER_UNSPECIFIED = 0 , + + + + + + + TRANSFER_LINEAR = 4194304 , + + + + + + + + + TRANSFER_SRGB = 8388608 , + + + + + + + + + + TRANSFER_SMPTE_170M = 12582912 , + + + + + + + + + TRANSFER_GAMMA2_2 = 16777216 , + + + + + + + + + TRANSFER_GAMMA2_6 = 20971520 , + + + + + + + + + TRANSFER_GAMMA2_8 = 25165824 , + + + + + + + + + + + + + + + TRANSFER_ST2084 = 29360128 , + + + + + + + + + + + + + + + TRANSFER_HLG = 33554432 , RANGE_SHIFT = 27, - /** - * Range aspect - * - * Defines the range of values corresponding to the unit range of 0-1. - * This is defined for YCbCr only, but can be expanded to RGB space. - */ - RANGE_MASK = 939524096 /* (7 << RANGE_SHIFT) */, - /** - * Range is unknown or are determined by the application. Implementations - * shall use the following suggested ranges: - * - * All YCbCr formats: limited range. - * All RGB or RGBA formats (including RAW and Bayer): full range. - * All Y formats: full range - * - * For all other formats range is undefined, and implementations should use - * an appropriate range for the data represented. - */ - RANGE_UNSPECIFIED = 0 /* (0 << RANGE_SHIFT) */, - /** - * Full range uses all values for Y, Cb and Cr from - * 0 to 2^b-1, where b is the bit depth of the color format. - */ - RANGE_FULL = 134217728 /* (1 << RANGE_SHIFT) */, - /** - * Limited range uses values 16/256*2^b to 235/256*2^b for Y, and - * 1/16*2^b to 15/16*2^b for Cb, Cr, R, G and B, where b is the bit depth of - * the color format. - * - * E.g. For 8-bit-depth formats: - * Luma (Y) samples should range from 16 to 235, inclusive - * Chroma (Cb, Cr) samples should range from 16 to 240, inclusive - * - * For 10-bit-depth formats: - * Luma (Y) samples should range from 64 to 940, inclusive - * Chroma (Cb, Cr) samples should range from 64 to 960, inclusive - */ - RANGE_LIMITED = 268435456 /* (2 << RANGE_SHIFT) */, - /** - * Extended range is used for scRGB. Intended for use with - * floating point pixel formats. [0.0 - 1.0] is the standard - * sRGB space. Values outside the range 0.0 - 1.0 can encode - * color outside the sRGB gamut. - * Used to blend / merge multiple dataspaces on a single display. - */ - RANGE_EXTENDED = 402653184 /* (3 << RANGE_SHIFT) */, - /** - * Legacy dataspaces - * - * - * sRGB linear encoding: - * - * The red, green, and blue components are stored in sRGB space, but - * are linear, not gamma-encoded. - * The RGB primaries and the white point are the same as BT.709. - * - * The values are encoded using the full range ([0,255] for 8-bit) for all - * components. - */ - SRGB_LINEAR = 512 /* 0x200 */, - V0_SRGB_LINEAR = 138477568 /* ((STANDARD_BT709 | TRANSFER_LINEAR) | RANGE_FULL) */, - /** - * scRGB linear encoding: - * - * The red, green, and blue components are stored in extended sRGB space, - * but are linear, not gamma-encoded. - * The RGB primaries and the white point are the same as BT.709. - * - * The values are floating point. - * A pixel value of 1.0, 1.0, 1.0 corresponds to sRGB white (D65) at 80 nits. - * Values beyond the range [0.0 - 1.0] would correspond to other colors - * spaces and/or HDR content. - */ - V0_SCRGB_LINEAR = 406913024 /* ((STANDARD_BT709 | TRANSFER_LINEAR) | RANGE_EXTENDED) */, - /** - * sRGB gamma encoding: - * - * The red, green and blue components are stored in sRGB space, and - * converted to linear space when read, using the SRGB transfer function - * for each of the R, G and B components. When written, the inverse - * transformation is performed. - * - * The alpha component, if present, is always stored in linear space and - * is left unmodified when read or written. - * - * Use full range and BT.709 standard. - */ - SRGB = 513 /* 0x201 */, - V0_SRGB = 142671872 /* ((STANDARD_BT709 | TRANSFER_SRGB) | RANGE_FULL) */, - /** - * scRGB: - * - * The red, green, and blue components are stored in extended sRGB space, - * but are linear, not gamma-encoded. - * The RGB primaries and the white point are the same as BT.709. - * - * The values are floating point. - * A pixel value of 1.0, 1.0, 1.0 corresponds to sRGB white (D65) at 80 nits. - * Values beyond the range [0.0 - 1.0] would correspond to other colors - * spaces and/or HDR content. - */ - V0_SCRGB = 411107328 /* ((STANDARD_BT709 | TRANSFER_SRGB) | RANGE_EXTENDED) */, - /** - * YCbCr Colorspaces - * ----------------- - * - * Primaries are given using (x,y) coordinates in the CIE 1931 definition - * of x and y specified by ISO 11664-1. - * - * Transfer characteristics are the opto-electronic transfer characteristic - * at the source as a function of linear optical intensity (luminance). - * - * - * JPEG File Interchange Format (JFIF) - * - * Same model as BT.601-625, but all values (Y, Cb, Cr) range from 0 to 255 - * - * Use full range, BT.601 transfer and BT.601_625 standard. - */ - JFIF = 257 /* 0x101 */, - V0_JFIF = 146931712 /* ((STANDARD_BT601_625 | TRANSFER_SMPTE_170M) | RANGE_FULL) */, - /** - * ITU-R Recommendation 601 (BT.601) - 625-line - * - * Standard-definition television, 625 Lines (PAL) - * - * Use limited range, BT.601 transfer and BT.601_625 standard. - */ - BT601_625 = 258 /* 0x102 */, - V0_BT601_625 = 281149440 /* ((STANDARD_BT601_625 | TRANSFER_SMPTE_170M) | RANGE_LIMITED) */, - /** - * ITU-R Recommendation 601 (BT.601) - 525-line - * - * Standard-definition television, 525 Lines (NTSC) - * - * Use limited range, BT.601 transfer and BT.601_525 standard. - */ - BT601_525 = 259 /* 0x103 */, - V0_BT601_525 = 281280512 /* ((STANDARD_BT601_525 | TRANSFER_SMPTE_170M) | RANGE_LIMITED) */, - /** - * ITU-R Recommendation 709 (BT.709) - * - * High-definition television - * - * Use limited range, BT.709 transfer and BT.709 standard. - */ - BT709 = 260 /* 0x104 */, - V0_BT709 = 281083904 /* ((STANDARD_BT709 | TRANSFER_SMPTE_170M) | RANGE_LIMITED) */, - /** - * SMPTE EG 432-1 and SMPTE RP 431-2. - * - * Digital Cinema DCI-P3 - * - * Use full range, linear transfer and D65 DCI-P3 standard - */ - DCI_P3_LINEAR = 139067392 /* ((STANDARD_DCI_P3 | TRANSFER_LINEAR) | RANGE_FULL) */, - /** - * SMPTE EG 432-1 and SMPTE RP 431-2. - * - * Digital Cinema DCI-P3 - * - * Use full range, gamma 2.6 transfer and D65 DCI-P3 standard - * Note: Application is responsible for gamma encoding the data as - * a 2.6 gamma encoding is not supported in HW. - */ - DCI_P3 = 155844608 /* ((STANDARD_DCI_P3 | TRANSFER_GAMMA2_6) | RANGE_FULL) */, - /** - * Display P3 - * - * Display P3 uses same primaries and white-point as DCI-P3 - * linear transfer function makes this the same as DCI_P3_LINEAR. - */ - DISPLAY_P3_LINEAR = 139067392 /* ((STANDARD_DCI_P3 | TRANSFER_LINEAR) | RANGE_FULL) */, - /** - * Display P3 - * - * Use same primaries and white-point as DCI-P3 - * but sRGB transfer function. - */ - DISPLAY_P3 = 143261696 /* ((STANDARD_DCI_P3 | TRANSFER_SRGB) | RANGE_FULL) */, - /** - * Adobe RGB - * - * Use full range, gamma 2.2 transfer and Adobe RGB primaries - * Note: Application is responsible for gamma encoding the data as - * a 2.2 gamma encoding is not supported in HW. - */ - ADOBE_RGB = 151715840 /* ((STANDARD_ADOBE_RGB | TRANSFER_GAMMA2_2) | RANGE_FULL) */, - /** - * ITU-R Recommendation 2020 (BT.2020) - * - * Ultra High-definition television - * - * Use full range, linear transfer and BT2020 standard - */ - BT2020_LINEAR = 138805248 /* ((STANDARD_BT2020 | TRANSFER_LINEAR) | RANGE_FULL) */, - /** - * ITU-R Recommendation 2020 (BT.2020) - * - * Ultra High-definition television - * - * Use full range, BT.709 transfer and BT2020 standard - */ - BT2020 = 147193856 /* ((STANDARD_BT2020 | TRANSFER_SMPTE_170M) | RANGE_FULL) */, - /** - * ITU-R Recommendation 2020 (BT.2020) - * - * Ultra High-definition television - * - * Use full range, SMPTE 2084 (PQ) transfer and BT2020 standard - */ - BT2020_PQ = 163971072 /* ((STANDARD_BT2020 | TRANSFER_ST2084) | RANGE_FULL) */, - /** - * Data spaces for non-color formats - * - * - * The buffer contains depth ranging measurements from a depth camera. - * This value is valid with formats: - * HAL_PIXEL_FORMAT_Y16: 16-bit samples, consisting of a depth measurement - * and an associated confidence value. The 3 MSBs of the sample make - * up the confidence value, and the low 13 LSBs of the sample make up - * the depth measurement. - * For the confidence section, 0 means 100% confidence, 1 means 0% - * confidence. The mapping to a linear float confidence value between - * 0.f and 1.f can be obtained with - * float confidence = (((depthSample >> 13) - 1) & 0x7) / 7.0f; - * The depth measurement can be extracted simply with - * uint16_t range = (depthSample & 0x1FFF); - * HAL_PIXEL_FORMAT_BLOB: A depth point cloud, as - * a variable-length float (x,y,z, confidence) coordinate point list. - * The point cloud will be represented with the android_depth_points - * structure. - */ - DEPTH = 4096 /* 0x1000 */, - /** - * The buffer contains sensor events from sensor direct report. - * This value is valid with formats: - * HAL_PIXEL_FORMAT_BLOB: an array of sensor event structure that forms - * a lock free queue. Format of sensor event structure is specified - * in Sensors HAL. - */ - SENSOR = 4097 /* 0x1001 */, - /** - * ITU-R Recommendation 2020 (BT.2020) - * - * Ultra High-definition television - * - * Use limited range, BT.709 transfer and BT2020 standard - */ - BT2020_ITU = 281411584 /* ((STANDARD_BT2020 | TRANSFER_SMPTE_170M) | RANGE_LIMITED) */, - /** - * ITU-R Recommendation 2100 (BT.2100) - * - * High dynamic range television - * - * Use limited/full range, PQ/HLG transfer, and BT2020 standard - * limited range is the preferred / normative definition for BT.2100 - */ - BT2020_ITU_PQ = 298188800 /* ((STANDARD_BT2020 | TRANSFER_ST2084) | RANGE_LIMITED) */, - BT2020_ITU_HLG = 302383104 /* ((STANDARD_BT2020 | TRANSFER_HLG) | RANGE_LIMITED) */, - BT2020_HLG = 168165376 /* ((STANDARD_BT2020 | TRANSFER_HLG) | RANGE_FULL) */, + + + + + + + RANGE_MASK = 939524096 , + + + + + + + + + + + + RANGE_UNSPECIFIED = 0 , + + + + + RANGE_FULL = 134217728 , + + + + + + + + + + + + + + RANGE_LIMITED = 268435456 , + + + + + + + + RANGE_EXTENDED = 402653184 , + + + + + + + + + + + + + + SRGB_LINEAR = 512 , + V0_SRGB_LINEAR = 138477568 , + + + + + + + + + + + + + V0_SCRGB_LINEAR = 406913024 , + + + + + + + + + + + + + + SRGB = 513 , + V0_SRGB = 142671872 , + + + + + + + + + + + + + V0_SCRGB = 411107328 , + + + + + + + + + + + + + + + + + + JFIF = 257 , + V0_JFIF = 146931712 , + + + + + + + + BT601_625 = 258 , + V0_BT601_625 = 281149440 , + + + + + + + + BT601_525 = 259 , + V0_BT601_525 = 281280512 , + + + + + + + + BT709 = 260 , + V0_BT709 = 281083904 , + + + + + + + + DCI_P3_LINEAR = 139067392 , + + + + + + + + + + DCI_P3 = 155844608 , + + + + + + + DISPLAY_P3_LINEAR = 139067392 , + + + + + + + DISPLAY_P3 = 143261696 , + + + + + + + + ADOBE_RGB = 151715840 , + + + + + + + + BT2020_LINEAR = 138805248 , + + + + + + + + BT2020 = 147193856 , + + + + + + + + BT2020_PQ = 163971072 , + + + + + + + + + + + + + + + + + + + + + + DEPTH = 4096 , + + + + + + + + SENSOR = 4097 , + + + + + + + + BT2020_ITU = 281411584 , + + + + + + + + + BT2020_ITU_PQ = 298188800 , + BT2020_ITU_HLG = 302383104 , + BT2020_HLG = 168165376 , }; enum class ColorMode : int32_t { - /** - * DEFAULT is the "native" gamut of the display. - * White Point: Vendor/OEM defined - * Panel Gamma: Vendor/OEM defined (typically 2.2) - * Rendering Intent: Vendor/OEM defined (typically 'enhanced') - */ NATIVE = 0, - /** - * STANDARD_BT601_625 corresponds with display - * settings that implement the ITU-R Recommendation BT.601 - * or Rec 601. Using 625 line version - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.290 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * KR = 0.299, KB = 0.114. This adjusts the luminance interpretation - * for RGB conversion from the one purely determined by the primaries - * to minimize the color shift into RGB space that uses BT.709 - * primaries. - * - * Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.500 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099 - */ STANDARD_BT601_625 = 1, - /** - * Primaries: - * x y - * green 0.290 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.222, KB = 0.071 luminance interpretation - * for RGB conversion. - * - * Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.500 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099 - */ STANDARD_BT601_625_UNADJUSTED = 2, - /** - * Primaries: - * x y - * green 0.310 0.595 - * blue 0.155 0.070 - * red 0.630 0.340 - * white (D65) 0.3127 0.3290 - * - * KR = 0.299, KB = 0.114. This adjusts the luminance interpretation - * for RGB conversion from the one purely determined by the primaries - * to minimize the color shift into RGB space that uses BT.709 - * primaries. - * - * Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.500 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099 - */ STANDARD_BT601_525 = 3, - /** - * Primaries: - * x y - * green 0.310 0.595 - * blue 0.155 0.070 - * red 0.630 0.340 - * white (D65) 0.3127 0.3290 - * - * Use the unadjusted KR = 0.212, KB = 0.087 luminance interpretation - * for RGB conversion (as in SMPTE 240M). - * - * Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.500 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099 - */ STANDARD_BT601_525_UNADJUSTED = 4, - /** - * REC709 corresponds with display settings that implement - * the ITU-R Recommendation BT.709 / Rec. 709 for high-definition television. - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.300 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * HDTV REC709 Inverse Gamma Correction (IGC): V represents normalized - * (with [0 to 1] range) value of R, G, or B. - * - * if Vnonlinear < 0.081 - * Vlinear = Vnonlinear / 4.5 - * else - * Vlinear = ((Vnonlinear + 0.099) / 1.099) ^ (1/0.45) - * - * HDTV REC709 Gamma Correction (GC): - * - * if Vlinear < 0.018 - * Vnonlinear = 4.5 * Vlinear - * else - * Vnonlinear = 1.099 * (Vlinear) ^ 0.45 – 0.099 - */ STANDARD_BT709 = 5, - /** - * DCI_P3 corresponds with display settings that implement - * SMPTE EG 432-1 and SMPTE RP 431-2 - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.265 0.690 - * blue 0.150 0.060 - * red 0.680 0.320 - * white (D65) 0.3127 0.3290 - * - * Gamma: 2.6 - */ DCI_P3 = 6, - /** - * SRGB corresponds with display settings that implement - * the sRGB color space. Uses the same primaries as ITU-R Recommendation - * BT.709 - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.300 0.600 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * PC/Internet (sRGB) Inverse Gamma Correction (IGC): - * - * if Vnonlinear ≤ 0.03928 - * Vlinear = Vnonlinear / 12.92 - * else - * Vlinear = ((Vnonlinear + 0.055)/1.055) ^ 2.4 - * - * PC/Internet (sRGB) Gamma Correction (GC): - * - * if Vlinear ≤ 0.0031308 - * Vnonlinear = 12.92 * Vlinear - * else - * Vnonlinear = 1.055 * (Vlinear)^(1/2.4) – 0.055 - */ SRGB = 7, - /** - * ADOBE_RGB corresponds with the RGB color space developed - * by Adobe Systems, Inc. in 1998. - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.210 0.710 - * blue 0.150 0.060 - * red 0.640 0.330 - * white (D65) 0.3127 0.3290 - * - * Gamma: 2.2 - */ ADOBE_RGB = 8, - /** - * DISPLAY_P3 is a color space that uses the DCI_P3 primaries, - * the D65 white point and the SRGB transfer functions. - * Rendering Intent: Colorimetric - * Primaries: - * x y - * green 0.265 0.690 - * blue 0.150 0.060 - * red 0.680 0.320 - * white (D65) 0.3127 0.3290 - * - * PC/Internet (sRGB) Gamma Correction (GC): - * - * if Vlinear ≤ 0.0030186 - * Vnonlinear = 12.92 * Vlinear - * else - * Vnonlinear = 1.055 * (Vlinear)^(1/2.4) – 0.055 - * - * Note: In most cases sRGB transfer function will be fine. - */ DISPLAY_P3 = 9, - /** - * BT2020 corresponds with display settings that implement the ITU-R - * Recommendation BT.2020 / Rec. 2020 for UHDTV. - * - * Primaries: - * x y - * green 0.170 0.797 - * blue 0.131 0.046 - * red 0.708 0.292 - * white (D65) 0.3127 0.3290 - * - * Inverse Gamma Correction (IGC): V represents normalized (with [0 to 1] - * range) value of R, G, or B. - * - * if Vnonlinear < b * 4.5 - * Vlinear = Vnonlinear / 4.5 - * else - * Vlinear = ((Vnonlinear + (a - 1)) / a) ^ (1/0.45) - * - * Gamma Correction (GC): - * - * if Vlinear < b - * Vnonlinear = 4.5 * Vlinear - * else - * Vnonlinear = a * Vlinear ^ 0.45 - (a - 1) - * - * where - * - * a = 1.09929682680944, b = 0.018053968510807 - * - * For practical purposes, these a/b values can be used instead - * - * a = 1.099, b = 0.018 for 10-bit display systems - * a = 1.0993, b = 0.0181 for 12-bit display systems - */ BT2020 = 10, - /** - * BT2100_PQ and BT2100_HLG correspond with display settings that - * implement the ITU-R Recommendation BT.2100 / Rec. 2100 for HDR TV. - * - * Primaries: - * x y - * green 0.170 0.797 - * blue 0.131 0.046 - * red 0.708 0.292 - * white (D65) 0.3127 0.3290 - * - * For BT2100_PQ, the transfer function is Perceptual Quantizer (PQ). For - * BT2100_HLG, the transfer function is Hybrid Log-Gamma (HLG). - */ BT2100_PQ = 11, BT2100_HLG = 12, }; -/** - * RenderIntent defines the mapping from color mode colors to display colors. - * - * A render intent must not change how it maps colors when the color mode - * changes. That is to say that when a render intent maps color C to color C', - * the fact that color C can have different pixel values in different color - * modes should not affect the mapping. - * - * RenderIntent overrides the render intents defined for individual color - * modes. It is ignored when the color mode is ColorMode::NATIVE, because - * ColorMode::NATIVE colors are already display colors. - */ enum class RenderIntent : int32_t { - /** - * Colors in the display gamut are unchanged. Colors out of the display - * gamut are hard-clipped. - * - * This implies that the display must have been calibrated unless - * ColorMode::NATIVE is the only supported color mode. - */ COLORIMETRIC = 0, - /** - * Enhance colors that are in the display gamut. Colors out of the display - * gamut are hard-clipped. - * - * The enhancement typically picks the biggest standard color space (e.g. - * DCI-P3) that is narrower than the display gamut and stretches it to the - * display gamut. The stretching is recommended to preserve skin tones. - */ ENHANCE = 1, - /** - * Tone map high-dynamic-range colors to the display's dynamic range. The - * dynamic range of the colors are communicated separately. After tone - * mapping, the mapping to the display gamut is as defined in - * COLORIMETRIC. - */ TONE_MAP_COLORIMETRIC = 2, - /** - * Tone map high-dynamic-range colors to the display's dynamic range. The - * dynamic range of the colors are communicated separately. After tone - * mapping, the mapping to the display gamut is as defined in ENHANCE. - * - * The tone mapping step and the enhancing step must match - * TONE_MAP_COLORIMETRIC and ENHANCE respectively when they are also - * supported. - */ TONE_MAP_ENHANCE = 3, }; -// -// type declarations for package -// template static inline std::string toString(int32_t o); @@ -5050,9 +4422,6 @@ constexpr int32_t& operator&=(int32_t& v, return v; } -// -// type header definitions for package -// template <> inline std::string toString<::android::hardware::graphics::common::V1_1::PixelFormat>(int32_t o) { @@ -6546,15 +5915,12 @@ static inline std::string toString(::android::hardware::graphics::common::V1_1:: return os; } -} // namespace V1_1 -} // namespace common -} // namespace graphics -} // namespace hardware -} // namespace android +} +} +} +} +} -// -// global type declarations for package -// namespace android { namespace hardware { @@ -6590,9 +5956,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_1::PixelFormat, 2 ::android::hardware::graphics::common::V1_1::PixelFormat::STENCIL_8, ::android::hardware::graphics::common::V1_1::PixelFormat::YCBCR_P010, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -6626,9 +5992,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_1::BufferUsage, 2 ::android::hardware::graphics::common::V1_1::BufferUsage::GPU_CUBE_MAP, ::android::hardware::graphics::common::V1_1::BufferUsage::GPU_MIPMAP_COMPLETE, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -6698,9 +6064,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_1::Dataspace, 61> ::android::hardware::graphics::common::V1_1::Dataspace::BT2020_ITU_HLG, ::android::hardware::graphics::common::V1_1::Dataspace::BT2020_HLG, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -6722,9 +6088,9 @@ constexpr std::array<::android::hardware::graphics::common::V1_1::ColorMode, 13> ::android::hardware::graphics::common::V1_1::ColorMode::BT2100_PQ, ::android::hardware::graphics::common::V1_1::ColorMode::BT2100_HLG, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -6737,8 +6103,8 @@ constexpr std::array<::android::hardware::graphics::common::V1_1::RenderIntent, ::android::hardware::graphics::common::V1_1::RenderIntent::TONE_MAP_COLORIMETRIC, ::android::hardware::graphics::common::V1_1::RenderIntent::TONE_MAP_ENHANCE, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} -#endif // HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_1_TYPES_H +#endif diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/mapper.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/mapper.h index ce126427de..f060f1c1ed 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/mapper.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/mapper.h @@ -12,7 +12,6 @@ namespace graphics { namespace mapper { namespace V2_0 { -// Forward declaration for forward reference support: enum class Error : int32_t; struct YCbCrLayout; @@ -25,34 +24,8 @@ enum class Error : int32_t { UNSUPPORTED = 7, }; -/** - * A buffer descriptor is an implementation-defined opaque data returned by - * createDescriptor. It describes the properties of a buffer and is consumed - * by the allocator. - */ typedef ::android::hardware::hidl_vec BufferDescriptor; -/** - * Structure for describing YCbCr formats for consumption by applications. - * This is used with PixelFormat::YCBCR_*_888. - * - * Buffer chroma subsampling is defined in the format. - * e.g. PixelFormat::YCBCR_420_888 has subsampling 4:2:0. - * - * Buffers must have a 8 bit depth. - * - * y, cb, and cr point to the first byte of their respective planes. - * - * Stride describes the distance in bytes from the first value of one row of - * the image to the first value of the next row. It includes the width of the - * image plus padding. - * yStride is the stride of the luma plane. - * cStride is the stride of the chroma planes. - * - * chromaStep is the distance in bytes from one chroma pixel value to the - * next. This is 2 bytes for semiplanar (because chroma values are interleaved - * and each chroma value is one byte) and 1 for planar. - */ struct YCbCrLayout final { void* y; void* cb; @@ -62,9 +35,6 @@ struct YCbCrLayout final { uint32_t chromaStep; }; -// -// type declarations for package -// template static inline std::string toString(int32_t o); @@ -107,11 +77,7 @@ constexpr int32_t& operator&=(int32_t& v, static inline std::string toString( const ::android::hardware::graphics::mapper::V2_0::YCbCrLayout& o); -// operator== and operator!= are not generated for YCbCrLayout -// -// type header definitions for package -// template <> inline std::string toString<::android::hardware::graphics::mapper::V2_0::Error>(int32_t o) { @@ -218,17 +184,17 @@ static inline std::string toString( return os; } -// operator== and operator!= are not generated for YCbCrLayout -} // namespace V2_0 -} // namespace mapper -} // namespace graphics -} // namespace hardware -} // namespace android -// -// global type declarations for package -// +} +} +} +} +} + + + + namespace android { namespace hardware { @@ -243,8 +209,8 @@ constexpr std::array<::android::hardware::graphics::mapper::V2_0::Error, 6> ::android::hardware::graphics::mapper::V2_0::Error::NO_RESOURCES, ::android::hardware::graphics::mapper::V2_0::Error::UNSUPPORTED, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} -#endif // HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_MAPPER_V2_0_TYPES_H +#endif diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/mapperextensions.h b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/mapperextensions.h index 79fddd18e4..6890973e01 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/mapperextensions.h +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/ext/types/mapperextensions.h @@ -13,7 +13,6 @@ namespace display { namespace mapperextensions { namespace V1_0 { -// Forward declaration for forward reference support: enum class Error : int32_t; struct YCbCrLayout; enum class PlaneComponent : uint32_t; @@ -36,61 +35,22 @@ struct YCbCrLayout final { uint32_t chromaStep; }; -/** - * Plane Component type definitions. - */ enum class PlaneComponent : uint32_t { - PLANE_COMPONENT_Y = 1u /* (1 << 0) */, - PLANE_COMPONENT_Cb = 2u /* (1 << 1) */, - PLANE_COMPONENT_Cr = 4u /* (1 << 2) */, - PLANE_COMPONENT_R = 1024u /* (1 << 10) */, - PLANE_COMPONENT_G = 2048u /* (1 << 11) */, - PLANE_COMPONENT_B = 4096u /* (1 << 12) */, - PLANE_COMPONENT_A = 1048576u /* (1 << 20) */, - PLANE_COMPONENT_RAW = 1073741824u /* (1 << 30) */, - PLANE_COMPONENT_META = 2147483648u /* (1 << 31) */, + PLANE_COMPONENT_Y = 1u , + PLANE_COMPONENT_Cb = 2u , + PLANE_COMPONENT_Cr = 4u , + PLANE_COMPONENT_R = 1024u , + PLANE_COMPONENT_G = 2048u , + PLANE_COMPONENT_B = 4096u , + PLANE_COMPONENT_A = 1048576u , + PLANE_COMPONENT_RAW = 1073741824u , + PLANE_COMPONENT_META = 2147483648u , }; -/** - * Flags to send with getFormatLayout for extra information for e.g. interlaced, - * otherwise send 0. - */ enum class Flags : int32_t { - LAYOUT_INTERLACED_FLAG = 1 /* (1 << 0) */, + LAYOUT_INTERLACED_FLAG = 1 , }; -/** - * Structure for describing plane layout information for YUVA/RGBA/RAW formats - * YUV formats can be planar or semi-planar. - * - * This layout structure is used with any pixel format that can be - * represented by it, such as: - * - HAL_PIXEL_FORMAT_YCbCr_* - * - HAL_PIXEL_FORMAT_RGB*_* - * - even implementation defined formats that can be represented by - * the structures - * - * Each plane can be made up of one or more PlaneComponents depending on - * the format. - * - * Each plane can be subsampled either vertically or horizontally by - * a power-of-two factor. - * - * Pixel increment describes the distance in bytes from one pixel to the - * next pixel (to the right) on the same row for the component plane. - * This can be negative. - * - * Stride is provided in both pixels and bytes. - * Stride_bytes describes the distance in bytes from the first pixel of - * one row to the first pixel of the next row (below) for the component plane. - * This can be negative. - * - * Scanlines describes the height of the plane in terms of number of rows. - * - * Size of plane is stride_bytes * scanlines + any padding required for - * alignment as per format specification. - * - */ struct PlaneLayout final { ::android::hardware::hidl_bitfield< ::vendor::qti::hardware::display::mapperextensions::V1_0::PlaneComponent> @@ -137,9 +97,6 @@ static_assert(sizeof(::vendor::qti::hardware::display::mapperextensions::V1_0::P static_assert(__alignof(::vendor::qti::hardware::display::mapperextensions::V1_0::PlaneLayout) == 4, "wrong alignment"); -// -// type declarations for package -// template static inline std::string toString(int32_t o); @@ -185,7 +142,6 @@ constexpr int32_t& operator&=( static inline std::string toString( const ::vendor::qti::hardware::display::mapperextensions::V1_0::YCbCrLayout& o); -// operator== and operator!= are not generated for YCbCrLayout template static inline std::string toString(uint32_t o); @@ -284,9 +240,6 @@ static inline bool operator!=( const ::vendor::qti::hardware::display::mapperextensions::V1_0::PlaneLayout& lhs, const ::vendor::qti::hardware::display::mapperextensions::V1_0::PlaneLayout& rhs); -// -// type header definitions for package -// template <> inline std::string toString<::vendor::qti::hardware::display::mapperextensions::V1_0::Error>( @@ -379,7 +332,6 @@ static inline std::string toString( return os; } -// operator== and operator!= are not generated for YCbCrLayout template <> inline std::string @@ -642,16 +594,13 @@ static inline bool operator!=( return !(lhs == rhs); } -} // namespace V1_0 -} // namespace mapperextensions -} // namespace display -} // namespace hardware -} // namespace qti -} // namespace vendor +} +} +} +} +} +} -// -// global type declarations for package -// namespace android { namespace hardware { @@ -664,9 +613,9 @@ constexpr std::array<::vendor::qti::hardware::display::mapperextensions::V1_0::E ::vendor::qti::hardware::display::mapperextensions::V1_0::Error::NO_RESOURCES, ::vendor::qti::hardware::display::mapperextensions::V1_0::Error::UNSUPPORTED, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -688,9 +637,9 @@ constexpr std::array<::vendor::qti::hardware::display::mapperextensions::V1_0::P ::vendor::qti::hardware::display::mapperextensions::V1_0::PlaneComponent:: PLANE_COMPONENT_META, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} namespace android { namespace hardware { @@ -700,8 +649,8 @@ constexpr std::array<::vendor::qti::hardware::display::mapperextensions::V1_0::F hidl_enum_values<::vendor::qti::hardware::display::mapperextensions::V1_0::Flags> = { ::vendor::qti::hardware::display::mapperextensions::V1_0::Flags::LAYOUT_INTERLACED_FLAG, }; -} // namespace details -} // namespace hardware -} // namespace android +} +} +} -#endif // HIDL_GENERATED_VENDOR_QTI_HARDWARE_DISPLAY_MAPPEREXTENSIONS_V1_0_TYPES_H +#endif diff --git a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/shim.cpp b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/shim.cpp index 34dd68296c..3c8a0134e3 100644 --- a/app/src/main/cpp/adrenotools/tools/qtimapper-shim/shim.cpp +++ b/app/src/main/cpp/adrenotools/tools/qtimapper-shim/shim.cpp @@ -46,14 +46,13 @@ using namespace android::hardware; using namespace android; -// These two functions are used by the blob and aren't present on Q so weakly stub them extern "C" uint64_t __attribute__((weak)) atrace_get_enabled_tags() { return 0; } namespace android::hardware::details { void __attribute__((weak)) return_status::onValueRetrieval() const {} -} // namespace android::hardware::details +} bool IBase::isRemote() const { return false; @@ -146,7 +145,7 @@ sp IMapper::getService(const std::string& serviceName, const bool getSt return nullptr; } -} // namespace V2_0 +} namespace V3_0 { sp IMapper::getService(const std::string& serviceName, const bool getStub) { @@ -154,7 +153,7 @@ sp IMapper::getService(const std::string& serviceName, const bool getSt return nullptr; } -} // namespace V3_0 +} namespace V4_0 { sp IMapper::getService(const std::string& serviceName, const bool getStub) { @@ -162,8 +161,8 @@ sp IMapper::getService(const std::string& serviceName, const bool getSt return nullptr; } -} // namespace V4_0 -} // namespace android::hardware::graphics::mapper +} +} namespace vendor::qti::hardware::display { namespace mapper { namespace V4_0 { @@ -174,7 +173,7 @@ Return> IQtiMapper::castFrom(const sp> IQtiMapper::castFrom(const sp& parent, @@ -183,7 +182,7 @@ Return> IQtiMapper::castFrom(const sp> IQtiMapper::castFrom(const sp& parent, @@ -200,8 +199,8 @@ Return IQtiMapper::getMapperExtensions(getMapperExtensions_cb _hidl_cb) { return Void(); } -} // namespace V2_0 -} // namespace mapper +} +} namespace mapperextensions { namespace V1_1 { @@ -467,6 +466,6 @@ Return IQtiMapperExtensions::getFormatLayout(int32_t format, uint64_t usag return Void(); } -} // namespace V1_1 -} // namespace mapperextensions -} // namespace vendor::qti::hardware::display +} +} +} diff --git a/app/src/main/cpp/deviceinfo/vkinfo.c b/app/src/main/cpp/deviceinfo/vkinfo.c index a8d769818e..81ccc6b0dd 100644 --- a/app/src/main/cpp/deviceinfo/vkinfo.c +++ b/app/src/main/cpp/deviceinfo/vkinfo.c @@ -1,6 +1,3 @@ -// What the phone's own Vulkan driver says about its GPU, for the app's device info window: one -// instance on the system loader, the first physical device's properties, a few limits and the -// extensions DXVK and VKD3D-Proton lean on. Returned as "key=value" lines; nothing is kept open. #include #include #include @@ -62,12 +59,10 @@ Java_com_droiddeck_launcher_gpu_VulkanInfo_nativeQuery(JNIEnv *env, jclass clazz LINE("device=%s\n", p.deviceName); LINE("type=%s\n", type_name(p.deviceType)); LINE("api=%u.%u.%u\n", VK_API_VERSION_MAJOR(p.apiVersion), VK_API_VERSION_MINOR(p.apiVersion), VK_API_VERSION_PATCH(p.apiVersion)); - // Qualcomm packs its driver version as 10.10.12 bits, the same layout as VK_MAKE_VERSION. LINE("driver_version=%u.%u.%u\n", p.driverVersion >> 22, (p.driverVersion >> 12) & 0x3ff, p.driverVersion & 0xfff); LINE("vendor_id=0x%04x\ndevice_id=0x%08x\n", p.vendorID, p.deviceID); LINE("max_image_2d=%u\n", p.limits.maxImageDimension2D); - // Driver name and build string (Vulkan 1.2 or VK_KHR_driver_properties). uint32_t extCount = 0; if (vkEnumerateDeviceExtensionProperties) vkEnumerateDeviceExtensionProperties(device, NULL, &extCount, NULL); static VkExtensionProperties exts[512]; diff --git a/app/src/main/cpp/fakeinput_steam.cpp b/app/src/main/cpp/fakeinput_steam.cpp index ad5e033743..486b72076e 100644 --- a/app/src/main/cpp/fakeinput_steam.cpp +++ b/app/src/main/cpp/fakeinput_steam.cpp @@ -1,12 +1,8 @@ /* - * The fake evdev layer. Taken from WinNative (maxjivi05, main 0cfc070b + feature/wayland-gamescope - * through f1f34cd7, 2026-09-14..19), GPL-3.0: the locking, the fork handlers, the shared device - * table, the Steam virtual-gamepad identity and the Z/RZ trigger placement are that author's. - * Added here: an opt-in Xbox 360 identity (FAKE_EVDEV_IDENTITY=xbox360), which is what gets SDL's - * built-in mapping applied with no configuration when the pad is read by the Steam client itself; - * and a stand-in for /dev/uinput (FAKE_EVDEV_UINPUT=1), so the virtual pads Steam Input makes for - * a game become more of these nodes instead of vanishing. + * Taken from WinNative (maxjivi05, main 0cfc070b + feature/wayland-gamescope + * through f1f34cd7, 2026-09-14..19), GPL-3.0. */ + #include #include #include @@ -57,8 +53,6 @@ #define EXPORT extern "C" __attribute__((visibility("default"))) -// glibc declares the request as unsigned long; bionic as int. The same source also serves the -// Linux runtime's preload (tools/linuxfs), where Steam and SDL run against glibc. #ifdef __GLIBC__ typedef unsigned long ioctl_request_t; #else @@ -69,13 +63,9 @@ static constexpr uint16_t GAMEPAD_VENDOR_ID_BASE = 0x1234; static constexpr uint16_t GAMEPAD_PRODUCT_ID_BASE = 0x5678; static constexpr uint16_t GAMEPAD_VERSION = 0x0110; static constexpr const char *GAMEPAD_NAME_TEMPLATE = "Generic HID Gamepad %d"; -// The gamepad Steam Input presents to a game, and the name SDL reads its slot from. static constexpr uint16_t STEAM_VIRTUAL_VENDOR_ID = 0x28de; static constexpr uint16_t STEAM_VIRTUAL_PRODUCT_ID = 0x11ff; static constexpr const char *STEAM_VIRTUAL_NAME_TEMPLATE = "Microsoft X-Box 360 pad %d"; -// Opt-in identity for the process that reads the pad directly (the Steam client): SDL keys its -// mapping database on bus+vendor+product, and 045E:028E is the most widely mapped id there is. -// Not offset per slot: a real pad reports the same ids on every port. static constexpr uint16_t X360_VENDOR_ID = 0x045E; static constexpr uint16_t X360_PRODUCT_ID = 0x028E; static constexpr const char *X360_NAME_TEMPLATE = "Xbox 360 Controller (%d)"; @@ -85,32 +75,39 @@ static constexpr uint8_t GAMEPAD_AXIS_COUNT = 8; static constexpr uint8_t GAMEPAD_BUTTON_COUNT = 11; static constexpr uint32_t FAKE_INPUT_RING_MAGIC = 0x46494252; static constexpr uint32_t FAKE_INPUT_RING_VERSION = 2; -static constexpr uint32_t FAKE_INPUT_EVENT_SIZE = sizeof(struct input_event); +// Rings hold the 64-bit input_event layout that the arm64 writers use; 32-bit guests convert on read. +struct RingEvent { + int64_t sec; + int64_t usec; + uint16_t type; + uint16_t code; + int32_t value; +}; +static_assert(sizeof(RingEvent) == 24, "ring events must stay ABI-stable"); +static constexpr uint32_t FAKE_INPUT_EVENT_SIZE = sizeof(RingEvent); static constexpr uint32_t FAKE_INPUT_RING_CAPACITY = 4096; static constexpr unsigned int FAKE_INPUT_MAJOR = 13; static constexpr unsigned int FAKE_INPUT_EVENT_MINOR_BASE = 64; static constexpr unsigned int FAKE_INPUT_JS_MINOR_BASE = 0; -// Nodes from event16 up are the virtual pads programs make through the /dev/uinput stand-in; -// below that are the app's own rings, one per slot. static constexpr int UINPUT_EVENT_BASE = 16; static constexpr int UINPUT_EVENT_LIMIT = 64; static constexpr uint32_t UINPUT_DESCRIPTION_MAGIC = 0x46495544; struct FakeInputRingHeader { - uint32_t magic; // 0 - uint32_t version; // 4 - uint32_t event_size; // 8 - uint32_t capacity; // 12 - uint64_t write_seq; // 16 - uint64_t generation; // 24 - // Authoritative absolute-state snapshot, published by the writer under a - // seqlock (odd snapshot_seq = write in progress). The reader replays it as a - // full keyframe whenever the delta stream could have desynced (open, ring - // overflow) so dropped events can recover without periodic duplicate input. - uint64_t snapshot_seq; // 32 - uint32_t snapshot_buttons; // 40 bit i -> kSnapshotButtons[i] pressed - int16_t snapshot_axes[8]; // 44 values in kSnapshotAxisCodes order - uint32_t resync_seq; // 60 + uint32_t magic; + uint32_t version; + uint32_t event_size; + uint32_t capacity; + uint64_t write_seq; + uint64_t generation; + + + + + uint64_t snapshot_seq; + uint32_t snapshot_buttons; + int16_t snapshot_axes[8]; + uint32_t resync_seq; }; static_assert(sizeof(FakeInputRingHeader) == 64, @@ -122,8 +119,6 @@ static constexpr size_t FAKE_INPUT_RING_SIZE = FAKE_INPUT_RING_HEADER_SIZE + (FAKE_INPUT_RING_CAPACITY * FAKE_INPUT_EVENT_SIZE); -// What a program told the /dev/uinput stand-in about the device it made, stored after the ring -// in that device's file so every process that opens the node answers the same identity. struct UinputDescription { uint32_t magic; int32_t owner_pid; @@ -142,7 +137,6 @@ static constexpr size_t UINPUT_FILE_SIZE = FAKE_INPUT_RING_SIZE + sizeof(UinputD struct FakeController { char *event = nullptr; - // Set for a node made through the /dev/uinput stand-in; null for the app's own pads. const UinputDescription *uinput = nullptr; int slot = -1; FakeInputRingHeader *ring = nullptr; @@ -157,9 +151,6 @@ struct FakeController { if (ring) munmap(ring, mapping_size); free(event); } - // Pending keyframe (full absolute-state baseline) currently streaming to the - // guest. The axis/button values are captured from the snapshot when the - // keyframe starts so the frame stays consistent across multi-read delivery. size_t keyframe_remaining = 0; int32_t keyframe_axes[8] = {0, 0, 0, 0, 0, 0, 0, 0}; uint32_t keyframe_buttons = 0; @@ -170,11 +161,6 @@ struct NeutralEventSpec { uint16_t code; }; -// Event template for a full keyframe: every button, every axis/hat, then a -// SYN_REPORT, in this fixed order. The value carried by each event is filled -// from the authoritative snapshot (see keyframe_value); an all-zero snapshot -// yields the neutral baseline. Replayed on open and ring overflow so dropped -// events cannot leave a guest stuck. static const NeutralEventSpec kNeutralEvents[] = { {EV_KEY, BTN_A}, {EV_KEY, BTN_B}, {EV_KEY, BTN_X}, {EV_KEY, BTN_Y}, {EV_KEY, BTN_TL}, {EV_KEY, BTN_TR}, @@ -187,30 +173,15 @@ static const NeutralEventSpec kNeutralEvents[] = { static constexpr size_t kNeutralEventCount = sizeof(kNeutralEvents) / sizeof(kNeutralEvents[0]); -// Axis layout of FakeInputRingHeader::snapshot_axes (mirrors the Java writer). static const uint16_t kSnapshotAxisCodes[8] = { ABS_X, ABS_Y, ABS_RX, ABS_RY, ABS_GAS, ABS_BRAKE, ABS_HAT0X, ABS_HAT0Y}; -// Bit i of FakeInputRingHeader::snapshot_buttons maps to this button code. static const uint16_t kSnapshotButtons[11] = { BTN_A, BTN_B, BTN_X, BTN_Y, BTN_TL, BTN_TR, BTN_SELECT, BTN_START, BTN_THUMBL, BTN_THUMBR, - // Bit 10 is the Steam button: the client's in-game menu is bound to it, and SDL reports it - // as button 8 from this position in the key bits. BTN_MODE}; static constexpr size_t kSnapshotButtonCount = sizeof(kSnapshotButtons) / sizeof(kSnapshotButtons[0]); -// An LD_PRELOAD interposer is called outside its own lifetime. The loader initialises libraries -// in dependency order, and the hooks below belong to whichever library gets there first: on the -// Linux runtime, libpython's initialiser runs before ours and calls close() and read(), so a hook -// fires before this library has been initialised at all. A file-scope std::unordered_map or -// std::recursive_mutex has no object yet at that moment - touching one is undefined behaviour, -// and in practice the process dies before main(). The same window reopens at exit, after static -// destructors have run. (Proton is a Python script, so this killed every game launched from the -// native Steam client, and the compatibility-tool registrar with it.) -// -// So everything with a constructor lives behind an accessor that builds it on first use and -// never destroys it. The leak is deliberate and bounded: one map or mutex for the process. namespace Logger { void init(); } @@ -266,9 +237,6 @@ static std::unordered_map &ff_effects() { return *map; } -// Every fd the maps hold, readable without controller_mutex(): the hooks see each read, write, -// ioctl and poll a process makes, and almost none are on these. Set before an fd is handed out, -// cleared once no map holds it; an fd past the bitmap takes the lock once any such fd exists. static constexpr int kWatchedFds = 1 << 16; static constexpr int kWatchedBits = sizeof(unsigned long) * 8; static std::atomic watched_fds[kWatchedFds / kWatchedBits]; @@ -300,17 +268,6 @@ static bool fake_uinput_enabled() { return config().uinput_enabled; } static bool ring_paths_loaded = false; static int next_ff_id = 0; -// fork() carries over only the calling thread, so a lock another thread was holding at that -// instant stays held in the child by a thread that is not there to release it. Every hook below -// takes controller_mutex, and the Steam client forks while its other threads are inside them, so -// the child blocked on its first open() and never reached exec: the spawn never completed, the -// client's main loop stalled past its own watchdog and it tore the session down. -// -// Taking the lock before the fork is what makes the copy consistent - no thread is part way -// through the tables it guards. The parent then unlocks it. The child cannot: a recursive mutex -// records the owning thread, the child's one thread has a new id, and unlocking one it does not -// own is refused, which would leave the lock held for good. It gets a fresh mutex instead, which -// is sound precisely because the fork was taken with the lock held. static void controller_fork_prepare() { controller_mutex().lock(); } static void controller_fork_parent() { controller_mutex().unlock(); } @@ -325,11 +282,6 @@ static void controller_fork_child() { namespace Logger { int log_enabled; -// FAKE_EVDEV_LOG_FILE: the session's pad.log, shared by every process the library is loaded in -// (the client, each game), so a pad report has the guest side in one file of the session folder. -// Opened with the raw syscalls (open() and close() are this library's own hooks), and only once -// there is a line to write: most processes never log one, and each open is a stop in proot on -// shared storage. static std::atomic log_fd{-1}; static std::atomic log_unusable{false}; static char log_path[PATH_MAX]; @@ -371,7 +323,6 @@ void log(const char *message, ...) { std::cerr.flush(); return; } - // One write per line: O_APPEND keeps lines from different processes whole. char line[512]; struct timespec now; clock_gettime(CLOCK_REALTIME, &now); @@ -392,12 +343,9 @@ void log(const char *message, ...) { ssize_t ignored = write(fd, line, n); (void)ignored; } -} // namespace Logger +} __attribute__((constructor)) static void library_init() { - // Warming the lazily built state, not owning it: when the loader runs this before anything - // calls a hook - the ordinary case - the first hook finds everything already there. Nothing - // below depends on it having run, which is the whole point. config(); controller_mutex(); controller_map(); @@ -408,10 +356,6 @@ send_vibration(int strong, int weak, uint16_t duration_ms, uint16_t slot) { if (!fake_vibration_enabled()) return; - // Rumble is best effort: the app listens on the abstract socket below (RumbleComponent) and - // drives the phone's vibrator. A full listener backlog must never park - // winebus (or every input hook through controller_mutex()), and a closing - // listener must not terminate the guest with SIGPIPE. int sock = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); if (sock < 0) return; @@ -436,6 +380,17 @@ send_vibration(int strong, int weak, uint16_t duration_ms, uint16_t slot) { syscall(SYS_close, sock); } +// Must match RumbleComponent.HOLD_MS: play until the slot's next effect or stop. +static constexpr uint16_t RUMBLE_HOLD_MS = 0xffff; + +__attribute__((visibility("hidden"))) static void send_ff_effect(const struct ff_effect &effect, uint16_t slot) { + uint16_t duration = effect.replay.length ? effect.replay.length : RUMBLE_HOLD_MS; + if (effect.type == FF_RUMBLE) + send_vibration(effect.u.rumble.strong_magnitude, effect.u.rumble.weak_magnitude, duration, slot); + else if (effect.type == FF_PERIODIC) + send_vibration(effect.u.periodic.magnitude, effect.u.periodic.magnitude, duration, slot); +} + __attribute__((visibility("hidden"))) static void check_ff_event(const struct input_event *ev, uint16_t slot) { if (ev->type != EV_FF) @@ -446,15 +401,7 @@ check_ff_event(const struct input_event *ev, uint16_t slot) { auto it = ff_effects().find(id); if (it == ff_effects().end()) return; - - uint16_t duration = it->second.replay.length; - if (it->second.type == FF_RUMBLE) { - send_vibration(it->second.u.rumble.strong_magnitude, - it->second.u.rumble.weak_magnitude, duration, slot); - } else if (it->second.type == FF_PERIODIC) { - send_vibration(it->second.u.periodic.magnitude, - it->second.u.periodic.magnitude, duration, slot); - } + send_ff_effect(it->second, slot); } else { send_vibration(0, 0, 0, slot); } @@ -599,8 +546,6 @@ struct SnapshotState { static long long monotonic_ms(); -// The writer protects the events, cursor and snapshot in one publication. -// A busy writer is retried later; inventing a neutral state would lose holds. __attribute__((visibility("hidden"))) static bool read_snapshot(const FakeInputRingHeader *ring, SnapshotState &out) { for (int attempt = 0; attempt < 8; attempt++) { @@ -620,8 +565,6 @@ read_snapshot(const FakeInputRingHeader *ring, SnapshotState &out) { return false; } -// This baseline supersedes all deltas through its cursor. Replaying older -// deltas after it can reassert a control that the snapshot already released. __attribute__((visibility("hidden"))) static void capture_keyframe(FakeController &fake, const SnapshotState &snap) { fake.keyframe_buttons = snap.buttons; @@ -632,25 +575,22 @@ capture_keyframe(FakeController &fake, const SnapshotState &snap) { fake.needs_keyframe = false; } -// Resolve the value a keyframe event should carry from the captured snapshot. __attribute__((visibility("hidden"))) static int32_t keyframe_value(const FakeController &fake, uint16_t type, uint16_t code) { if (type == EV_KEY) { for (size_t i = 0; i < kSnapshotButtonCount; i++) if (kSnapshotButtons[i] == code) return (fake.keyframe_buttons >> i) & 1u; - return 0; // a code the snapshot word does not carry + return 0; } if (type == EV_ABS) { for (int i = 0; i < 8; i++) if (kSnapshotAxisCodes[i] == code) return fake.keyframe_axes[i]; } - return 0; // SYN / unknown + return 0; } -// A virtual pad's ring and description live beside its node, hidden from anything that lists -// event* names: /dev/input/.uinput-event. __attribute__((visibility("hidden"))) static std::string uinput_ring_path(int node) { return std::string(fake_hook_dir()) + "/.uinput-event" + std::to_string(node); } @@ -691,7 +631,6 @@ open_fake_input_ring(const char *event, int flags) { virtual_pad ? reinterpret_cast( static_cast(mapping) + FAKE_INPUT_RING_SIZE) : nullptr; - // A virtual pad whose maker has gone (a crashed client leaves its files) is not there. if (!ring_header_is_valid(ring) || (description && (description->magic != UINPUT_DESCRIPTION_MAGIC || !process_alive(description->owner_pid)))) { @@ -709,8 +648,6 @@ open_fake_input_ring(const char *event, int flags) { controller->uinput = description; controller->mapping_size = mapping_size; controller->generation = ring_generation(ring); - // Establish the cursor at open so taps arriving before the first read stay - // queued. If publication is busy, read() will finish establishing it later. SnapshotState snap; if (read_snapshot(ring, snap) && snap.generation == controller->generation) capture_keyframe(*controller, snap); @@ -725,13 +662,6 @@ open_fake_input_ring(const char *event, int flags) { return fd; } -// Under the Steam client a pad it manages is hidden from the game: the client lists it in -// SDL_GAMECONTROLLER_IGNORE_DEVICES, its overlay refuses the game's open() of the node, and the -// game is meant to see Steam Input's virtual gamepad instead. That one is a uinput device, which -// does not exist here, so the game was left with no controller at all. With -// FAKE_EVDEV_STEAM_VIRTUAL set the pad carries the virtual gamepad's identity for every process -// but the client's own, which must keep seeing the pad as the physical one it reads. -// Whether this process is the Steam client itself. Asked once: a process never becomes another. __attribute__((visibility("hidden"))) static bool is_steam_client() { static int known; if (known == 0) { @@ -757,14 +687,6 @@ __attribute__((visibility("hidden"))) static bool presents_steam_virtual() { return known == 1; } -// The virtual gamepad is an X-Box 360 pad, whose triggers are ABS_Z and ABS_RZ. Wine and SDL place -// a gamepad's axes by their position among the ones it advertises, so the triggers have to sit -// where that pad has them: as ABS_GAS and ABS_BRAKE they follow the sticks, the right stick -// lands on the left trigger, and a released right trigger reads as the right stick held up. That -// is every reader but the Steam client, which maps the pad from what it finds (controller.txt) -// and has always been shown ABS_GAS/ABS_BRAKE: a game Steam Input is off for reads this pad -// itself (the Xbox 360 setting), and so do the desktop's programs. A pad made through -// /dev/uinput is that pad for real, whoever reads it. __attribute__((visibility("hidden"))) static bool presents_xbox_triggers(const FakeController &fake) { return fake.uinput || !is_steam_client(); @@ -778,7 +700,6 @@ presented_abs_code(const FakeController &fake, uint16_t code) { return code; } -// The snapshot keeps the triggers in the ABS_GAS/ABS_BRAKE places either way. __attribute__((visibility("hidden"))) static uint16_t snapshot_abs_code(uint16_t code) { if (code == ABS_Z) return ABS_BRAKE; if (code == ABS_RZ) return ABS_GAS; @@ -807,8 +728,6 @@ __attribute__((visibility("hidden"))) static bool is_fake_input_fd(int fd) { static bool fake_pad_withdrawn(const FakeController &fake); -// A node whose pad is gone: the app republished its ring, or the pad was switched to a type that -// is not this node (it became the Deck or the Steam Controller again, fake_pad_withdrawn). static bool controller_gone(const FakeController &fake) { return ring_generation(fake.ring) != fake.generation || fake_pad_withdrawn(fake); } @@ -820,12 +739,9 @@ __attribute__((visibility("hidden"))) static bool fake_fd_is_stale(int fd) { return controller != controller_map().end() && controller_gone(*controller->second); } -// Caller holds controller_mutex(). static bool fake_has_unread_data(const FakeController &fake) { if (controller_gone(fake)) return false; - // Readiness never consumes resync requests or changes the read cursor. - // Do not spin a nonblocking guest on a producer's unfinished publication. if (fake.keyframe_remaining > 0) return true; uint64_t sequence = __atomic_load_n(&fake.ring->snapshot_seq, __ATOMIC_ACQUIRE); if (sequence & 1ULL) return false; @@ -874,20 +790,6 @@ __attribute__((visibility("hidden"))) static long long monotonic_ms() { return static_cast(now.tv_sec) * 1000LL + now.tv_nsec / 1000000LL; } -// ---- /dev/uinput, stood in for ---- -// -// Under Steam, a game is meant to read Steam Input's output, not the pad: the client hides the -// physical pad from the game (SDL_GAMECONTROLLER_IGNORE_DEVICES, and its overlay refuses the -// open) and makes it a virtual X-Box 360 pad through /dev/uinput, which it then drives with the -// layout the player chose. The sandbox has no uinput the client may use, so the virtual pad never -// appeared and every game was left reading the physical pad as-is. -// -// So /dev/uinput is answered here. A gamepad the client makes becomes another of this library's -// nodes - /dev/input/event16 and up - backed by a ring file of the same layout the app writes, -// and the client's writes are that ring's events. Any process reading the node sees the identity -// the client gave it and gets exactly what the client wrote. A device that is not a gamepad (the -// client's virtual keyboard and mouse) is accepted and its events dropped, which is what happened -// to them before. struct UinputWriter { UinputDescription description{}; bool created = false; @@ -918,8 +820,6 @@ __attribute__((visibility("hidden"))) static bool test_bit(const uint8_t *bits, return bit >= 0 && static_cast(bit) / 8 < size && (bits[bit / 8] >> (bit % 8)) & 1u; } -// A real uinput fd reads EV_UINPUT requests and polls as writable. An eventfd that is never -// signalled does both: nothing to read, always writable, blocking or not as the caller asked. __attribute__((visibility("hidden"))) static int open_uinput(int flags) { int fd = eventfd(0, ((flags & O_NONBLOCK) ? EFD_NONBLOCK : 0) | ((flags & O_CLOEXEC) ? EFD_CLOEXEC : 0)); if (fd < 0) return -1; @@ -932,8 +832,6 @@ __attribute__((visibility("hidden"))) static int open_uinput(int flags) { return fd; } -// The layout the client asks for only matters to readers; what makes it a pad is a south button -// and a left stick, which is also what every pad the ring format carries has. __attribute__((visibility("hidden"))) static bool is_gamepad(const UinputDescription &d) { return test_bit(d.evbits, sizeof(d.evbits), EV_KEY) && test_bit(d.keybits, sizeof(d.keybits), BTN_SOUTH) && test_bit(d.evbits, sizeof(d.evbits), EV_ABS) && test_bit(d.absbits, sizeof(d.absbits), ABS_X); @@ -941,8 +839,6 @@ __attribute__((visibility("hidden"))) static bool is_gamepad(const UinputDescrip __attribute__((visibility("hidden"))) static void unpublish_uinput(UinputWriter &w) { if (!w.published) return; - // Readers holding the mapping see the generation move and report the device gone; the node's - // removal is what tells SDL and Wine through inotify. __atomic_add_fetch(&w.ring->generation, 1, __ATOMIC_RELEASE); std::string node = std::string(fake_hook_dir()) + "/event" + std::to_string(w.node); unlink(node.c_str()); @@ -955,8 +851,6 @@ __attribute__((visibility("hidden"))) static void unpublish_uinput(UinputWriter w.published = false; } -// A node number is claimed by creating its ring file exclusively, so two processes making pads -// at once cannot take the same one. A file left by a process that has gone is reclaimed. __attribute__((visibility("hidden"))) static int claim_uinput_node(int *fd_out) { static auto my_open = reinterpret_cast(dlsym(RTLD_NEXT, "open")); for (int node = UINPUT_EVENT_BASE; node < UINPUT_EVENT_LIMIT; node++) { @@ -977,7 +871,7 @@ __attribute__((visibility("hidden"))) static int claim_uinput_node(int *fd_out) unlink((std::string(fake_hook_dir()) + "/event" + std::to_string(node)).c_str()); unlink((path + ".uevent").c_str()); unlink(path.c_str()); - node--; // try the same number again + node--; } } errno = ENOSPC; @@ -1010,8 +904,6 @@ __attribute__((visibility("hidden"))) static int publish_uinput(UinputWriter &w) shared->owner_pid = w.owner; __atomic_thread_fence(__ATOMIC_RELEASE); - // The identity Wine's HID bus reads through libudev (inputudev.c in libblsession), written - // before the node so the first lookup finds it. char uevent[256]; int length = snprintf(uevent, sizeof(uevent), "PRODUCT=%x/%x/%x/%x\nNAME=\"%s\"\nPHYS=\"%s\"\n", shared->id.bustype, shared->id.vendor, shared->id.product, shared->id.version, @@ -1039,22 +931,19 @@ __attribute__((visibility("hidden"))) static int publish_uinput(UinputWriter &w) return 0; } -// Same publication as the app's writer (FakeInputWriter.flushBufferToRing): the events, then the -// absolute state under its seqlock, then the cursor that makes both visible. __attribute__((visibility("hidden"))) static void flush_uinput(UinputWriter &w) { if (!w.published || w.pending.empty()) { w.pending.clear(); return; } FakeInputRingHeader *ring = w.ring; - auto *events = reinterpret_cast(reinterpret_cast(ring) + - FAKE_INPUT_RING_HEADER_SIZE); + auto *events = reinterpret_cast(reinterpret_cast(ring) + + FAKE_INPUT_RING_HEADER_SIZE); uint64_t write_seq = __atomic_load_n(&ring->write_seq, __ATOMIC_RELAXED); struct timeval now = {}; gettimeofday(&now, nullptr); - for (struct input_event ev : w.pending) { - ev.time = now; - events[write_seq % FAKE_INPUT_RING_CAPACITY] = ev; + for (const struct input_event &ev : w.pending) { + events[write_seq % FAKE_INPUT_RING_CAPACITY] = {now.tv_sec, now.tv_usec, ev.type, ev.code, ev.value}; write_seq++; if (ev.type == EV_KEY) { for (size_t i = 0; i < kSnapshotButtonCount; i++) @@ -1081,7 +970,6 @@ __attribute__((visibility("hidden"))) static void flush_uinput(UinputWriter &w) __attribute__((visibility("hidden"))) static ssize_t write_uinput(UinputWriter &w, const void *buf, size_t count) { if (!w.created) { - // The legacy description: written once, before UI_DEV_CREATE. if (count != sizeof(struct uinput_user_dev)) { errno = EINVAL; return -1; @@ -1106,7 +994,6 @@ write_uinput(UinputWriter &w, const void *buf, size_t count) { const auto *events = static_cast(buf); for (size_t i = 0; i < count / sizeof(struct input_event); i++) { w.pending.push_back(events[i]); - // A frame ends at SYN_REPORT; a writer that never sends one still gets its events out. if ((events[i].type == EV_SYN && events[i].code == SYN_REPORT) || w.pending.size() >= 64) flush_uinput(w); } @@ -1141,7 +1028,7 @@ ioctl_uinput(UinputWriter &w, ioctl_request_t op, void *argp) { } if (w.created && number != _IOC_NR(UI_BEGIN_FF_UPLOAD) && number != _IOC_NR(UI_END_FF_UPLOAD) && number != _IOC_NR(UI_BEGIN_FF_ERASE) && number != _IOC_NR(UI_END_FF_ERASE)) { - errno = EINVAL; // the kernel refuses configuration once the device exists + errno = EINVAL; return -1; } switch (number) { @@ -1190,8 +1077,6 @@ ioctl_uinput(UinputWriter &w, ioctl_request_t op, void *argp) { return -1; } return 0; - // Force feedback reaches the client only as EV_UINPUT requests on this fd, and none are ever - // sent: a game's rumble on a virtual pad goes straight to the app (check_ff_event). case _IOC_NR(UI_BEGIN_FF_UPLOAD): case _IOC_NR(UI_END_FF_UPLOAD): case _IOC_NR(UI_BEGIN_FF_ERASE): @@ -1205,8 +1090,6 @@ ioctl_uinput(UinputWriter &w, ioctl_request_t op, void *argp) { } } -// Only the process that made the device takes it down: a forked child closing its inherited -// copy of the fd (as a spawn does before exec) must not remove the parent's pad. __attribute__((visibility("hidden"))) static void close_uinput(int fd) { std::lock_guard guard(controller_mutex()); auto it = uinput_map().find(fd); @@ -1215,21 +1098,6 @@ __attribute__((visibility("hidden"))) static void close_uinput(int fd) { uinput_map().erase(it); } -// ---- The pad as a Steam Deck controller ---- -// -// On a Deck, and on the handhelds InputPlumber serves, the Steam client reads the built-in -// controller itself as a Steam Deck controller: a vendor HID device it talks to over hidraw, which -// is what gives it the Quick Access button, the back grips, gyro and trackpads, and Steam Input's -// full treatment of the pad. With FAKE_EVDEV_DECK set the app's pad in ring slot 0 is presented to -// the client that way: /dev/hidraw16, found through the sysfs tree the app binds into the session -// (SteamDeckPad.kt), streams the Deck's 64-byte state report every 4 ms, as the real one does, built -// from the ring's absolute snapshot; its feature reports are answered as InputPlumber answers them -// for a virtual Deck. The evdev nodes of the app's pads are then withdrawn - the client would -// otherwise count the pad twice - and games get Steam Input's virtual pad (the /dev/uinput stand-in). -// -// A read returns one report and never blocks past the next one, so the fd is one end of a -// SOCK_SEQPACKET socket pair with a thread writing reports into the other end: poll, select and -// epoll then work on it with no help from the hooks here. static constexpr const char *DECK_HIDRAW_PATH = "/dev/hidraw16"; static constexpr unsigned int DECK_HIDRAW_MAJOR = 240; static constexpr unsigned int DECK_HIDRAW_MINOR = 16; @@ -1238,20 +1106,16 @@ static constexpr int DECK_REPORT_INTERVAL_US = 4000; static constexpr const char *DECK_NAME = "Valve Software Steam Deck Controller"; static constexpr const char *DECK_SERIAL = "DROIDDECK0001"; -// InputPlumber, src/drivers/steam_deck/report_descriptor.rs (CONTROLLER_DESCRIPTOR): one 64-byte -// vendor input report and one 64-byte feature report, no report ids. static const uint8_t kDeckReportDescriptor[] = { 0x06, 0xff, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x09, 0x02, 0x09, 0x03, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x40, 0x81, 0x02, 0x09, 0x06, 0x09, 0x07, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x40, 0xb1, 0x02, 0xc0}; -// Feature report ids (SDL, src/joystick/hidapi/steam/controller_constants.h). static constexpr uint8_t DECK_GET_ATTRIBUTES_VALUES = 0x83; static constexpr uint8_t DECK_GET_STRING_ATTRIBUTE = 0xAE; static constexpr uint8_t DECK_GET_CHIP_ID = 0xBA; static constexpr uint8_t DECK_TRIGGER_RUMBLE_CMD = 0xEB; -// Button bits of the state report (SDL, SDL_hidapi_steamdeck.c): the low word, then the high. static constexpr uint32_t DECK_L_R2 = 0x00000001, DECK_L_L2 = 0x00000002, DECK_L_R1 = 0x00000004, DECK_L_L1 = 0x00000008, DECK_L_Y = 0x00000010, DECK_L_B = 0x00000020, DECK_L_X = 0x00000040, DECK_L_A = 0x00000080, DECK_L_UP = 0x00000100, @@ -1264,8 +1128,6 @@ static constexpr uint32_t DECK_L_L5 = 0x00008000, DECK_L_R5 = 0x00010000, DECK_L_LEFT_TOUCH = 0x00080000, DECK_L_RIGHT_TOUCH = 0x00100000; static constexpr uint32_t DECK_H_L4 = 0x00000200, DECK_H_R4 = 0x00000400; static constexpr uint32_t DECK_H_QAM = 0x00040000; -// Bit 11 of the ring snapshot's button word: the Quick Access button, which an Xbox pad does not -// have and the evdev nodes therefore never report (FakeInputWriter.SNAPSHOT_IDX_QAM). static constexpr uint32_t SNAPSHOT_QAM_BIT = 1u << 11; struct DeckHidraw { @@ -1273,29 +1135,28 @@ struct DeckHidraw { FakeInputRingHeader *ring = nullptr; size_t mapping_size = 0; uint8_t pending_feature = 0; - bool touch = false; // Steam's touch controller (below), not the Deck - bool triton = false; // The paired 2025 Steam Controller, with native BLE report IDs - bool emulated = false; // That Steam Controller made from the app's own pad (FAKE_EVDEV_TRITON_PAD) - uint8_t sony = 0; // The app's own pad as a DualShock 4 (4) or DualSense (5), else 0 + bool touch = false; + bool triton = false; + bool emulated = false; + uint8_t sony = 0; }; -// What the Deck has and an Xbox pad does not, after the ring's events: motion (PadMotion) and the -// back grips and trackpads (the second screen's Deck controls, DeckControls), already in the -// Deck's axes and units, under a seqlock (FakeInputWriter.writeMotion / writeDeckControls). -// Absent from a ring file written without one. struct DeckImu { - uint32_t magic; // IMU1 once written - uint32_t imu_mode; // written by this library: the client's SETTING_IMU_MODE | 0x80000000 - uint64_t seq; // odd while being written + uint32_t magic; + uint32_t imu_mode; + uint64_t seq; int16_t accel[3]; int16_t gyro[3]; - int16_t pads[4]; // left X, Y, right X, Y: -32768..32767, Y up - uint16_t pressure[2]; // left, right: 0..32767 - uint32_t controls; // DECK_EXTRA_* bits - uint32_t pad_type; // PAD_TYPE_* | 0x80000000, written by the app; 0 until it does + int16_t pads[4]; + uint16_t pressure[2]; + uint32_t controls; + uint32_t pad_type; + uint32_t latency; }; static_assert(offsetof(DeckImu, pad_type) == 44, "DeckImu::pad_type matches FakeInputWriter"); -// DeckImu::controls (DeckControls.kt). +static_assert(offsetof(DeckImu, latency) == 48, "DeckImu::latency matches FakeInputWriter"); +static constexpr uint32_t LATENCY_CONTROLLER = 1, LATENCY_TOUCH = 2; +static constexpr int LOW_LATENCY_REPORT_INTERVAL_US = 1000; static constexpr uint32_t DECK_EXTRA_L4 = 1, DECK_EXTRA_R4 = 2, DECK_EXTRA_L5 = 4, DECK_EXTRA_R5 = 8, DECK_EXTRA_LPAD_TOUCH = 16, DECK_EXTRA_RPAD_TOUCH = 32, DECK_EXTRA_LPAD_CLICK = 64, @@ -1312,13 +1173,9 @@ static constexpr uint32_t DECK_IMU_MAGIC = 0x31554D49; static constexpr size_t DECK_IMU_BLOCK_SIZE = 64; static_assert(sizeof(DeckImu) <= DECK_IMU_BLOCK_SIZE, "the IMU block is 64 bytes in the ring file"); -// Shared native Steam Controller reports. Field offsets match FakeInputWriter.java. Android writes -// the original BLE input packet; this process writes Steam's HID output report for Android to send. -// A feature read is a round trip: this process bumps get_request, Android reads the controller's -// report characteristic and answers with get_reply set to the same number. struct TritonSharedData { uint32_t magic; - uint32_t connected; // written by the app: the paired controller is connected and streaming + uint32_t connected; uint64_t input_seq; uint32_t report_id; uint32_t input_length; @@ -1353,13 +1210,11 @@ static_assert(sizeof(TritonSharedData) <= TRITON_SHARED_BLOCK_SIZE, "Triton ring static constexpr const char *TRITON_HIDRAW_PATH = "/dev/hidraw18"; static constexpr unsigned int TRITON_HIDRAW_MAJOR = 240; static constexpr unsigned int TRITON_HIDRAW_MINOR = 18; -// The app's own pad as the wired Steam Controller: a node of its own, so a paired one keeps 18. static constexpr const char *TRITON_PAD_HIDRAW_PATH = "/dev/hidraw19"; static constexpr unsigned int TRITON_PAD_HIDRAW_MINOR = 19; static constexpr int TRITON_REPORT_ID_BYTES = 1; static constexpr int TRITON_STATE_BYTES = 45; static constexpr int TRITON_REPORT_INTERVAL_US = 4000; -// A BLE read takes a few connection intervals; past this the controller is taken to be gone. static constexpr int TRITON_FEATURE_TIMEOUT_MS = 500; static constexpr const char *TRITON_NAME = "Steam Controller"; static constexpr const char *TRITON_SERIAL = "DROIDDECKSC01"; @@ -1407,12 +1262,6 @@ static bool fake_deck_enabled() { return enabled == 1; } -// What the app's own pad is to the client, switchable while the session runs (the drawer's -// Controller page): the Deck (/dev/hidraw16), the wired Steam Controller (/dev/hidraw19, built from -// ring slot 0 as the Deck's reports are), or an Xbox 360 pad (its own evdev node, no HID device). -// The app writes the choice into the slot's Deck block (DeckImu::pad_type); until it has, -// FAKE_EVDEV_PAD_TYPE says what the session started with. Only the chosen device can be opened; -// the others end their streams, and the client is told through udev (pad_type_thread). static constexpr uint32_t PAD_TYPE_DECK = 0, PAD_TYPE_STEAM = 1, PAD_TYPE_XBOX = 2, PAD_TYPE_DS4 = 3, PAD_TYPE_DUALSENSE = 4, PAD_TYPE_LAST = PAD_TYPE_DUALSENSE; static constexpr uint32_t PAD_TYPE_SET = 0x80000000u; @@ -1429,7 +1278,6 @@ __attribute__((visibility("hidden"))) static uint32_t session_pad_type() { return static_cast(type); } -// Slot 0's Deck and Triton blocks, mapped once, read-only; null until the ring file has them. __attribute__((visibility("hidden"))) static const uint8_t *ring_blocks() { static std::atomic block{nullptr}; static std::atomic tries{0}; @@ -1455,8 +1303,6 @@ __attribute__((visibility("hidden"))) static const uint8_t *ring_blocks() { return mapped; } -// The paired Bluetooth controller is offered only while the app has it connected: Steam asks a -// device it is offered for its info, and one that never answers holds up every other controller. __attribute__((visibility("hidden"))) static bool triton_connected() { const uint8_t *blocks = ring_blocks(); if (!blocks) return false; @@ -1472,6 +1318,27 @@ __attribute__((visibility("hidden"))) static uint32_t live_pad_type() { return value & PAD_TYPE_SET ? value & 0xff : session_pad_type(); } +__attribute__((visibility("hidden"))) static bool low_latency(uint32_t which) { + const uint8_t *blocks = ring_blocks(); + const DeckImu *imu = blocks ? reinterpret_cast(blocks + FAKE_INPUT_RING_SIZE) : nullptr; + return imu && (__atomic_load_n(&imu->latency, __ATOMIC_ACQUIRE) & which); +} + +__attribute__((visibility("hidden"))) static int controller_report_interval_us(int normal_us) { + return low_latency(LATENCY_CONTROLLER) ? LOW_LATENCY_REPORT_INTERVAL_US : normal_us; +} + +__attribute__((visibility("hidden"))) static void sleep_us(int us) { + struct timespec interval = {0, us * 1000L}; + nanosleep(&interval, nullptr); +} + +__attribute__((visibility("hidden"))) static uint64_t monotonic_us() { + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); + return static_cast(now.tv_sec) * 1000000ULL + static_cast(now.tv_nsec) / 1000ULL; +} + static bool fake_triton_enabled() { static int enabled = -1; if (enabled < 0) @@ -1479,8 +1346,6 @@ static bool fake_triton_enabled() { return enabled == 1; } -// The Deck is the client's alone: a game that found it would have the pad twice, once through it -// and once through Steam Input's virtual pad. __attribute__((visibility("hidden"))) static bool process_is_steam_client() { static int known; if (known == 0) { @@ -1497,7 +1362,6 @@ __attribute__((visibility("hidden"))) static bool process_is_steam_client() { return known == 1; } -// What the client starts with, so a pad log says whether it was offered a Deck at all. __attribute__((constructor)) static void log_client_start() { config(); if (process_is_steam_client()) @@ -1509,8 +1373,6 @@ __attribute__((visibility("hidden"))) static bool is_deck_hidraw_path(const char return pathname && fake_deck_enabled() && !strcmp(pathname, DECK_HIDRAW_PATH) && live_pad_type() == PAD_TYPE_DECK; } -// The app's own pad as a PlayStation controller: /dev/hidraw20 (DualShock 4) or /dev/hidraw21 -// (DualSense), USB devices of their own in SteamDeckPad's sysfs. Returns 4 or 5, or 0. static constexpr const char *DS4_HIDRAW_PATH = "/dev/hidraw20"; static constexpr const char *DUALSENSE_HIDRAW_PATH = "/dev/hidraw21"; static constexpr unsigned int DS4_HIDRAW_MINOR = 20, DUALSENSE_HIDRAW_MINOR = 21; @@ -1531,11 +1393,8 @@ __attribute__((visibility("hidden"))) static bool is_triton_hidraw_path(const ch return pathname && fake_triton_enabled() && !strcmp(pathname, TRITON_HIDRAW_PATH) && triton_connected(); } -// The app's first pad is the Deck now: its evdev node is withdrawn from everyone. Further players' -// pads are left to the client alone, which hands them to games through Steam Input. __attribute__((visibility("hidden"))) static bool is_withdrawn_pad_path(const char *pathname) { if (!fake_deck_enabled() || !pathname || strncmp(pathname, "/dev/input/", 11)) return false; - // As an Xbox 360 pad it is its own evdev node again, for the client and games alike. if (live_pad_type() == PAD_TYPE_XBOX) return false; const char *event = strrchr(pathname, '/') + 1; if (strncmp(event, "event", 5) && strncmp(event, "js", 2)) return false; @@ -1560,15 +1419,12 @@ static inline void put32(uint8_t *at, uint32_t value) { for (int i = 0; i < 4; i++) at[i] = static_cast(value >> (8 * i)); } -// The Deck's state report (SDL, controller_structs.h: ValveInReportHeader_t then -// SteamDeckStatePacket_t) from the ring's snapshot: kSnapshotButtons order, kSnapshotAxisCodes -// order, sticks as evdev has them (Y down), triggers 0..255. __attribute__((visibility("hidden"))) static void build_deck_report(uint8_t *report, uint32_t packet, uint32_t buttons, const int32_t *axes, const DeckExtras &extras) { memset(report, 0, DECK_REPORT_BYTES); - report[0] = 0x01; // report version - report[2] = 0x09; // ID_CONTROLLER_DECK_STATE + report[0] = 0x01; + report[2] = 0x09; report[3] = DECK_REPORT_BYTES; put32(report + 4, packet); static const uint32_t kButtonBits[11] = {DECK_L_A, DECK_L_B, DECK_L_X, DECK_L_Y, @@ -1583,7 +1439,7 @@ build_deck_report(uint8_t *report, uint32_t packet, uint32_t buttons, const int3 if (hat_y > 0) low |= DECK_L_DOWN; if (hat_x < 0) low |= DECK_L_LEFT; if (hat_x > 0) low |= DECK_L_RIGHT; - int32_t left_trigger = axes[5], right_trigger = axes[4]; // ABS_BRAKE, ABS_GAS + int32_t left_trigger = axes[5], right_trigger = axes[4]; if (left_trigger > 127) low |= DECK_L_L2; if (right_trigger > 127) low |= DECK_L_R2; uint32_t controls = extras.controls; @@ -1597,13 +1453,13 @@ build_deck_report(uint8_t *report, uint32_t packet, uint32_t buttons, const int3 if (controls & DECK_EXTRA_RPAD_CLICK) low |= DECK_L_RIGHT_PAD; put32(report + 8, low); put32(report + 12, high); - for (int i = 0; i < 4; i++) put16(report + 16 + i * 2, extras.pads[i]); // s{Left,Right}PadX/Y + for (int i = 0; i < 4; i++) put16(report + 16 + i * 2, extras.pads[i]); for (int i = 0; i < 3; i++) { - put16(report + 24 + i * 2, extras.accel[i]); // sAccelX/Y/Z - put16(report + 30 + i * 2, extras.gyro[i]); // sGyroX/Y/Z + put16(report + 24 + i * 2, extras.accel[i]); + put16(report + 30 + i * 2, extras.gyro[i]); } - put16(report + 56, extras.pressure[0]); // sPressurePadLeft - put16(report + 58, extras.pressure[1]); // sPressurePadRight + put16(report + 56, extras.pressure[0]); + put16(report + 58, extras.pressure[1]); put16(report + 44, std::min(32767, left_trigger * 32767 / 255)); put16(report + 46, std::min(32767, right_trigger * 32767 / 255)); auto stick = [](int32_t value) { return std::max(-32767, std::min(32767, value)); }; @@ -1622,7 +1478,6 @@ __attribute__((visibility("hidden"))) static void *deck_report_thread(void *arg) uint32_t buttons = 0; int32_t axes[8] = {}; DeckExtras extras; - // Switched to another type, the stream ends: the client's read fails and it lets the Deck go. while (live_pad_type() == PAD_TYPE_DECK) { if (read_snapshot(self->ring, snap) && snap.generation == ring_generation(self->ring)) { buttons = snap.buttons; @@ -1631,28 +1486,16 @@ __attribute__((visibility("hidden"))) static void *deck_report_thread(void *arg) read_deck_extras(*self, extras); uint8_t report[DECK_REPORT_BYTES]; build_deck_report(report, ++packet, buttons, axes, extras); - // A reader that fell behind loses reports rather than getting stale ones later; a reader that - // has closed ends the stream. if (send(self->peer, report, sizeof(report), MSG_DONTWAIT | MSG_NOSIGNAL) < 0 && errno != EAGAIN && errno != EWOULDBLOCK) break; - struct timespec interval = {0, DECK_REPORT_INTERVAL_US * 1000L}; - nanosleep(&interval, nullptr); + sleep_us(controller_report_interval_us(DECK_REPORT_INTERVAL_US)); } syscall(SYS_close, self->peer); munmap(self->ring, self->mapping_size); return nullptr; } -// ---- The pad as a PlayStation controller ---- -// -// The DualShock 4 (054c:09cc) and DualSense (054c:0ce6) as they are on USB, read by the client's -// own PlayStation drivers (SDL's hidapi ps4/ps5 are the reference): input report 1 every 4 ms, -// the feature reports a driver reads at start answered here (calibration, serial, firmware), and -// output reports' rumble on the handheld's motor. Built from the same ring as the Deck's report: -// sticks, triggers, buttons, motion (in the units the calibration below declares), and the -// touchpad from the Deck controls' two trackpads, the left one on its left half and the right one -// on its right half, either's click as the touchpad's. static constexpr int SONY_REPORT_BYTES = 64; static constexpr int SONY_TOUCH_WIDTH = 1920; static constexpr int SONY_TOUCH_HEIGHT_DS4 = 942, SONY_TOUCH_HEIGHT_DUALSENSE = 1080; @@ -1664,8 +1507,6 @@ struct SonyTouch { uint8_t next_id = 0; }; -// One finger per trackpad: Deck pads are -32768..32767 with Y up; the touchpad counts from its top -// left, 12 bits per axis. __attribute__((visibility("hidden"))) static void put_sony_touch(uint8_t *at, SonyTouch &touch, int side, bool down, int16_t x, int16_t y, int height) { if (down && !touch.down[side]) touch.id[side] = touch.next_id++ & 0x7f; @@ -1680,20 +1521,19 @@ __attribute__((visibility("hidden"))) static void put_sony_touch(uint8_t *at, So } __attribute__((visibility("hidden"))) static void -build_sony_report(uint8_t *report, uint8_t model, uint32_t packet, uint32_t buttons, const int32_t *axes, +build_sony_report(uint8_t *report, uint8_t model, uint32_t packet, uint64_t elapsed_us, uint32_t buttons, const int32_t *axes, const DeckExtras &extras, SonyTouch &touch) { memset(report, 0, SONY_REPORT_BYTES); report[0] = 0x01; uint8_t *p = report + 1; auto stick = [](int32_t value) { return static_cast(std::max(0, std::min(255, (value + 32768) >> 8))); }; p[0] = stick(axes[0]); - p[1] = stick(axes[1]); // evdev and the PlayStation pads both count Y downwards + p[1] = stick(axes[1]); p[2] = stick(axes[2]); p[3] = stick(axes[3]); int32_t hat_x = axes[6], hat_y = axes[7]; - static const uint8_t kHat[3][3] = {{7, 0, 1}, {6, 8, 2}, {5, 4, 3}}; // [y+1][x+1] + static const uint8_t kHat[3][3] = {{7, 0, 1}, {6, 8, 2}, {5, 4, 3}}; uint8_t hat = kHat[(hat_y > 0) - (hat_y < 0) + 1][(hat_x > 0) - (hat_x < 0) + 1]; - // Snapshot order (kButtonBits): A B X Y L1 R1 View Menu L3 R3 Steam. uint8_t face = (buttons & 4 ? 0x10 : 0) | (buttons & 1 ? 0x20 : 0) | (buttons & 2 ? 0x40 : 0) | (buttons & 8 ? 0x80 : 0); uint8_t shoulders = (buttons & 16 ? 0x01 : 0) | (buttons & 32 ? 0x02 : 0) | (axes[5] > 0 ? 0x04 : 0) | (axes[4] > 0 ? 0x08 : 0) | (buttons & 64 ? 0x10 : 0) | (buttons & 128 ? 0x20 : 0) | @@ -1702,9 +1542,6 @@ build_sony_report(uint8_t *report, uint8_t model, uint32_t packet, uint32_t butt uint8_t system = (buttons & 1024 ? 0x01 : 0) | (click ? 0x02 : 0); uint8_t left_trigger = static_cast(std::max(0, std::min(255, axes[5]))); uint8_t right_trigger = static_cast(std::max(0, std::min(255, axes[4]))); - // Motion: the Deck block's gyro is 2000 dps and its accel 2 g over 16 bits; the calibration - // reports declare 16 units per degree/s and 8192 per g, and the axes are the Deck's reordered as - // SDL reads both (Deck X, Z, -Y). int16_t gyro[3] = {extras.gyro[0], extras.gyro[2], static_cast(-extras.gyro[1])}; int16_t accel[3] = {static_cast(extras.accel[0] / 2), static_cast(extras.accel[2] / 2), static_cast(-extras.accel[1] / 2)}; @@ -1715,13 +1552,13 @@ build_sony_report(uint8_t *report, uint8_t model, uint32_t packet, uint32_t butt p[6] = static_cast(system | ((packet & 0x3f) << 2)); p[7] = left_trigger; p[8] = right_trigger; - put16(p + 9, static_cast(packet * 750)); // 5.33 us ticks: 4 ms + put16(p + 9, static_cast(elapsed_us * 3 / 16)); for (int i = 0; i < 3; i++) { put16(p + 12 + i * 2, gyro[i]); put16(p + 18 + i * 2, accel[i]); } - p[29] = 0x1b; // on the cable, full - p[32] = 1; // one touch packet + p[29] = 0x1b; + p[32] = 1; p[33] = static_cast(packet); put_sony_touch(p + 34, touch, 0, left, extras.pads[0], extras.pads[1], SONY_TOUCH_HEIGHT_DS4); put_sony_touch(p + 38, touch, 1, right, extras.pads[2], extras.pads[3], SONY_TOUCH_HEIGHT_DS4); @@ -1737,11 +1574,11 @@ build_sony_report(uint8_t *report, uint8_t model, uint32_t packet, uint32_t butt put16(p + 15 + i * 2, gyro[i]); put16(p + 21 + i * 2, accel[i]); } - put32(p + 27, packet * 12000); // 0.33 us ticks: 4 ms + put32(p + 27, static_cast(elapsed_us * 3)); put_sony_touch(p + 32, touch, 0, left, extras.pads[0], extras.pads[1], SONY_TOUCH_HEIGHT_DUALSENSE); put_sony_touch(p + 36, touch, 1, right, extras.pads[2], extras.pads[3], SONY_TOUCH_HEIGHT_DUALSENSE); - p[52] = 0x2a; // charging, full - p[53] = 0x08; // USB + p[52] = 0x2a; + p[53] = 0x08; } } @@ -1756,7 +1593,7 @@ __attribute__((visibility("hidden"))) static void *sony_report_thread(void *arg) int32_t axes[8] = {}; DeckExtras extras; SonyTouch touch; - // Switched to another type, the stream ends, as unplugging the controller would. + const uint64_t start_us = monotonic_us(); while (live_pad_type() == type) { if (read_snapshot(self->ring, snap) && snap.generation == ring_generation(self->ring)) { buttons = snap.buttons; @@ -1764,12 +1601,11 @@ __attribute__((visibility("hidden"))) static void *sony_report_thread(void *arg) } read_deck_extras(*self, extras); uint8_t report[SONY_REPORT_BYTES]; - build_sony_report(report, self->sony, ++packet, buttons, axes, extras, touch); + build_sony_report(report, self->sony, ++packet, monotonic_us() - start_us, buttons, axes, extras, touch); if (send(self->peer, report, sizeof(report), MSG_DONTWAIT | MSG_NOSIGNAL) < 0 && errno != EAGAIN && errno != EWOULDBLOCK) break; - struct timespec interval = {0, DECK_REPORT_INTERVAL_US * 1000L}; - nanosleep(&interval, nullptr); + sleep_us(controller_report_interval_us(DECK_REPORT_INTERVAL_US)); } syscall(SYS_close, self->peer); munmap(self->ring, self->mapping_size); @@ -1780,7 +1616,6 @@ __attribute__((visibility("hidden"))) static int open_deck_hidraw(int flags, uin const char *path = sony == 4 ? DS4_HIDRAW_PATH : sony == 5 ? DUALSENSE_HIDRAW_PATH : DECK_HIDRAW_PATH; static auto my_open = reinterpret_cast(dlsym(RTLD_NEXT, "open")); if (!process_is_steam_client()) { - // Only the client reads the Deck; a game sees Steam Input's virtual pad instead. Logger::log("deck: %s refused: not the Steam client\n", path); errno = ENOENT; return -1; @@ -1793,7 +1628,6 @@ __attribute__((visibility("hidden"))) static int open_deck_hidraw(int flags, uin errno = ENODEV; return -1; } - // The IMU block is mapped only where the file has one: past its end a mapping faults. struct stat ring_stat; size_t mapping_size = FAKE_INPUT_RING_SIZE; if (fstat(ring_fd, &ring_stat) == 0 && @@ -1814,7 +1648,6 @@ __attribute__((visibility("hidden"))) static int open_deck_hidraw(int flags, uin munmap(mapping, mapping_size); return -1; } - // Room for a few reports only, so what the client reads is never more than a few ms old. int buffer = DECK_REPORT_BYTES * 4; setsockopt(pair[1], SOL_SOCKET, SO_SNDBUF, &buffer, sizeof(buffer)); if (!(flags & O_CLOEXEC)) fcntl(pair[0], F_SETFD, 0); @@ -1879,7 +1712,6 @@ __attribute__((visibility("hidden"))) static void *triton_report_thread(void *ar uint8_t report[TRITON_REPORT_ID_BYTES + 64] = {}; uint8_t report_id = 0x45; size_t length = TRITON_STATE_BYTES; - // A disconnect ends the stream, as unplugging the controller would. while (triton_connected()) { if (read_triton_state(*self, report_id, report + 1, length)) { report[0] = report_id; @@ -1887,16 +1719,13 @@ __attribute__((visibility("hidden"))) static void *triton_report_thread(void *ar errno != EAGAIN && errno != EWOULDBLOCK) break; } - struct timespec interval = {0, TRITON_REPORT_INTERVAL_US * 1000L}; - nanosleep(&interval, nullptr); + sleep_us(controller_report_interval_us(TRITON_REPORT_INTERVAL_US)); } syscall(SYS_close, self->peer); munmap(self->ring, self->mapping_size); return nullptr; } -// Button bits of the Triton state report (SDL, SDL_hidapi_steam_triton.c). SDL reads MENU as Back -// and VIEW as Start, the reverse of the Deck's names. static constexpr uint32_t TRITON_A = 0x00000001, TRITON_B = 0x00000002, TRITON_X = 0x00000004, TRITON_Y = 0x00000008, TRITON_QAM = 0x00000010, TRITON_R3 = 0x00000020, TRITON_VIEW = 0x00000040, TRITON_R4 = 0x00000080, TRITON_R5 = 0x00000100, @@ -1909,19 +1738,12 @@ static constexpr uint32_t TRITON_A = 0x00000001, TRITON_B = 0x00000002, TRITON_X TRITON_LSTICK_TOUCH = 0x01000000, TRITON_LPAD_TOUCH = 0x02000000, TRITON_LPAD_CLICK = 0x04000000, TRITON_LTRIGGER_CLICK = 0x08000000, TRITON_RGRIP_TOUCH = 0x10000000, TRITON_LGRIP_TOUCH = 0x20000000; -// The pad is built in, so it is the wired controller: 28de:1302 on USB, state report 0x42 (the -// same layout as the Bluetooth 0x45), where the paired one is 28de:1303 on Bluetooth. static constexpr uint8_t TRITON_STATE_WIRED = 0x42; static constexpr int16_t TRITON_WIRED_PRODUCT = 0x1302; -// A stick counts as touched once it leaves its centre: the pad has no capacitive caps to ask. static constexpr int32_t TRITON_STICK_TOUCH = 2000; -// The Triton BLE state report (SDL, controller_structs.h: TritonMTUNoQuat_t) from the ring's -// snapshot and the Deck block, which already hold the trackpads, back buttons and motion in the -// units both controllers share. A handheld is held whenever it is played, so both grips read as -// touched: Steam's grip-sense activators (gyro while held, say) then simply stay on. __attribute__((visibility("hidden"))) static void -build_triton_report(uint8_t *report, uint32_t packet, uint32_t buttons, const int32_t *axes, +build_triton_report(uint8_t *report, uint32_t packet, uint64_t elapsed_us, uint32_t buttons, const int32_t *axes, const DeckExtras &extras) { memset(report, 0, TRITON_STATE_BYTES); report[0] = static_cast(packet); @@ -1936,7 +1758,7 @@ build_triton_report(uint8_t *report, uint32_t packet, uint32_t buttons, const in if (axes[7] > 0) bits |= TRITON_DOWN; if (axes[6] < 0) bits |= TRITON_LEFT; if (axes[6] > 0) bits |= TRITON_RIGHT; - int32_t left_trigger = axes[5], right_trigger = axes[4]; // ABS_BRAKE, ABS_GAS: 0..255 + int32_t left_trigger = axes[5], right_trigger = axes[4]; if (left_trigger >= 250) bits |= TRITON_LTRIGGER_CLICK; if (right_trigger >= 250) bits |= TRITON_RTRIGGER_CLICK; if (abs(axes[0]) > TRITON_STICK_TOUCH || abs(axes[1]) > TRITON_STICK_TOUCH) bits |= TRITON_LSTICK_TOUCH; @@ -1964,7 +1786,7 @@ build_triton_report(uint8_t *report, uint32_t packet, uint32_t buttons, const in put16(report + 23, extras.pads[2]); put16(report + 25, extras.pads[3]); put16(report + 27, extras.pressure[1]); - put32(report + 29, packet * TRITON_REPORT_INTERVAL_US); // IMU timestamp, microseconds + put32(report + 29, static_cast(elapsed_us)); for (int i = 0; i < 3; i++) { put16(report + 33 + i * 2, extras.accel[i]); put16(report + 39 + i * 2, extras.gyro[i]); @@ -1980,6 +1802,7 @@ __attribute__((visibility("hidden"))) static void *triton_pad_thread(void *arg) uint32_t buttons = 0; int32_t axes[8] = {}; DeckExtras extras; + const uint64_t start_us = monotonic_us(); while (live_pad_type() == PAD_TYPE_STEAM) { if (read_snapshot(self->ring, snap) && snap.generation == ring_generation(self->ring)) { buttons = snap.buttons; @@ -1988,12 +1811,11 @@ __attribute__((visibility("hidden"))) static void *triton_pad_thread(void *arg) read_deck_extras(*self, extras); uint8_t report[TRITON_REPORT_ID_BYTES + TRITON_STATE_BYTES]; report[0] = TRITON_STATE_WIRED; - build_triton_report(report + 1, ++packet, buttons, axes, extras); + build_triton_report(report + 1, ++packet, monotonic_us() - start_us, buttons, axes, extras); if (send(self->peer, report, sizeof(report), MSG_DONTWAIT | MSG_NOSIGNAL) < 0 && errno != EAGAIN && errno != EWOULDBLOCK) break; - struct timespec interval = {0, TRITON_REPORT_INTERVAL_US * 1000L}; - nanosleep(&interval, nullptr); + sleep_us(controller_report_interval_us(TRITON_REPORT_INTERVAL_US)); } syscall(SYS_close, self->peer); munmap(self->ring, self->mapping_size); @@ -2069,24 +1891,6 @@ __attribute__((visibility("hidden"))) static int open_triton_hidraw(int flags, b } -// ---- Steam's touch controller ---- -// -// docs/development/steam-touch-controller.md. Steam builds its touch controller (Steam Input's -// Mobile Touch type, the one Steam Link's on-screen controls are) for any HID device with the ids -// 0000:11fb. With FAKE_TOUCHCTL_RING set, the client is offered one as /dev/hidraw17 beside the -// Deck, its sysfs written by the app (SteamDeckPad.kt). The app draws the controls; this side only -// carries the device's traffic through the file FAKE_TOUCHCTL_RING names, which both map: -// -// - the app writes the 40-byte input report (under a seqlock), whether the device is plugged in, -// and the battery level; -// - this side writes what the client tells the device: the app and action set it is on (output -// report 4), the action set layers added and removed (5, 6), rumble (1, also passed to the app's -// vibration like any pad's) and the setting report (3), and how many readers have it open. -// -// Plugged in and out by the app (while its controls are up and no physical pad is in use), as -// Steam Link withdraws its touch controls: an unplugged device ends its open stream, refuses new -// opens, and a udev event (libblsession's stand-in monitor, udevmon.c) tells the client's HID -// discovery either way. Only the client is offered it; a game reads Steam Input's virtual pad. static constexpr const char *TOUCH_HIDRAW_PATH = "/dev/hidraw17"; static constexpr unsigned int TOUCH_HIDRAW_MINOR = 17; static constexpr int TOUCH_REPORT_BYTES = 40; @@ -2094,25 +1898,21 @@ static constexpr int TOUCH_REPORT_INTERVAL_US = 8000; static constexpr const char *TOUCH_NAME = "Mobile Touch Control"; static constexpr const char *TOUCH_SERIAL = "DROIDDECK0001"; static constexpr const char *TOUCH_DEVPATH = "/devices/droiddeck/usb2/2-1:1.0/0003:0000:11FB.0002/hidraw/hidraw17"; -// Generic Desktop / Game Pad: for a vendor id that is not Valve's the client opens only a device -// with a gamepad usage. One 40-byte input report, one 64-byte output and one 64-byte feature -// report, no report ids. Must match SteamDeckPad.kt. static const uint8_t kTouchReportDescriptor[] = { 0x05, 0x01, 0x09, 0x05, 0xa1, 0x01, 0x09, 0x02, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x28, 0x81, 0x02, 0x09, 0x03, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x40, 0x91, 0x02, 0x09, 0x04, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x40, 0xb1, 0x02, 0xc0}; -// The shared file. Must match SteamTouchDevice.kt. struct TouchRingFile { - uint32_t magic; // TCH1 + uint32_t magic; uint32_t version; - uint64_t report_seq; // odd while the app writes report + uint64_t report_seq; uint8_t report[TOUCH_REPORT_BYTES]; uint32_t plugged; - uint32_t battery; // percent - // Written here. - uint64_t state_seq; // odd while being written + uint32_t battery; + + uint64_t state_seq; uint32_t opened; uint32_t appid; uint32_t action_set; @@ -2168,7 +1968,6 @@ __attribute__((visibility("hidden"))) static bool is_touch_hidraw_path(const cha return pathname && !strcmp(pathname, TOUCH_HIDRAW_PATH) && process_is_steam_client() && touch_ring(); } -// The state the client gave the device, written under the ring's seqlock. template __attribute__((visibility("hidden"))) static void touch_state(F &&write) { TouchRingFile *ring = touch_ring(); @@ -2185,8 +1984,6 @@ static inline uint32_t get32(const uint8_t *at) { static_cast(at[3]) << 24; } -// An output report from the client (Steam Link's CVirtualController::HandleFeatureReports): the -// type, then its fields. __attribute__((visibility("hidden"))) static void touch_output(const uint8_t *data, size_t size) { if (size < 9) return; static std::atomic seen[8]; @@ -2195,7 +1992,7 @@ __attribute__((visibility("hidden"))) static void touch_output(const uint8_t *da if (n && (n & (n - 1)) == 0) Logger::log("touch: output report %u (x%u): app %u, %u\n", type, n, get32(data + 1), get32(data + 5)); switch (type) { - case 1: { // rumble: low, high, duration + case 1: { uint16_t low = data[1] | data[2] << 8, high = data[3] | data[4] << 8; uint32_t ms = get32(data + 5); touch_state([&](TouchRingFile &r) { @@ -2207,10 +2004,10 @@ __attribute__((visibility("hidden"))) static void touch_output(const uint8_t *da send_vibration(low, high, static_cast(std::min(ms, 0xffff)), 0); break; } - case 3: // a setting: 0x30 and a value + case 3: if (data[1] == 0x30) touch_state([&](TouchRingFile &r) { r.setting30 = data[2] | data[3] << 8; }); break; - case 4: // the app and its action set + case 4: touch_state([&](TouchRingFile &r) { r.appid = get32(data + 1); r.action_set = get32(data + 5); @@ -2218,8 +2015,8 @@ __attribute__((visibility("hidden"))) static void touch_output(const uint8_t *da r.action_seq++; }); break; - case 5: // a layer added to the app's action set - case 6: // and removed + case 5: + case 6: touch_state([&](TouchRingFile &r) { uint32_t layer = get32(data + 5); uint32_t count = std::min(r.layer_count, 8); @@ -2256,10 +2053,8 @@ __attribute__((visibility("hidden"))) static void *touch_report_thread(void *arg if (send(self->peer, report, sizeof(report), MSG_DONTWAIT | MSG_NOSIGNAL) < 0 && errno != EAGAIN && errno != EWOULDBLOCK) break; - struct timespec interval = {0, TOUCH_REPORT_INTERVAL_US * 1000L}; - nanosleep(&interval, nullptr); + sleep_us(low_latency(LATENCY_TOUCH) ? LOW_LATENCY_REPORT_INTERVAL_US : TOUCH_REPORT_INTERVAL_US); } - // Ending the stream is the unplug: the client's read fails and it lets the controller go. syscall(SYS_close, self->peer); touch_state([](TouchRingFile &r) { if (r.opened) r.opened--; }); return nullptr; @@ -2312,17 +2107,17 @@ __attribute__((visibility("hidden"))) static int ioctl_touch(DeckHidraw &touch, } size_t size = _IOC_SIZE(op); switch (_IOC_NR(op)) { - case 0x01: // HIDIOCGRDESCSIZE + case 0x01: *static_cast(argp) = sizeof(kTouchReportDescriptor); return 0; - case 0x02: { // HIDIOCGRDESC + case 0x02: { auto *descriptor = static_cast(argp); uint32_t want; memcpy(&want, descriptor, sizeof(want)); memcpy(descriptor + 4, kTouchReportDescriptor, std::min(want, sizeof(kTouchReportDescriptor))); return 0; } - case 0x03: { // HIDIOCGRAWINFO + case 0x03: { struct { uint32_t bustype; int16_t vendor; @@ -2331,13 +2126,13 @@ __attribute__((visibility("hidden"))) static int ioctl_touch(DeckHidraw &touch, memcpy(argp, &info, sizeof(info)); return 0; } - case 0x04: return copy_ioctl_string(op, argp, TOUCH_NAME); // HIDIOCGRAWNAME - case 0x05: return copy_ioctl_string(op, argp, "usb-droiddeck-2/input0"); // HIDIOCGRAWPHYS - case 0x08: return copy_ioctl_string(op, argp, TOUCH_SERIAL); // HIDIOCGRAWUNIQ - case 0x06: // HIDIOCSFEATURE: Steam Link's controller ignores these + case 0x04: return copy_ioctl_string(op, argp, TOUCH_NAME); + case 0x05: return copy_ioctl_string(op, argp, "usb-droiddeck-2/input0"); + case 0x08: return copy_ioctl_string(op, argp, TOUCH_SERIAL); + case 0x06: touch.pending_feature = size > 0 ? static_cast(argp)[0] : 0; return static_cast(size); - case 0x07: { // HIDIOCGFEATURE: report 2 is the battery + case 0x07: { auto *buf = static_cast(argp); uint8_t id = size ? buf[0] : 0; memset(buf, 0, size); @@ -2355,8 +2150,6 @@ __attribute__((visibility("hidden"))) static int ioctl_touch(DeckHidraw &touch, } } -// Plugging in and out: the app flips `plugged`; this tells the client's HID discovery, which -// otherwise never looks again (the sandbox gives it no kernel uevents). __attribute__((visibility("hidden"))) static int inject_uevent(const char *action, const char *devpath, const char *subsystem, const char *devname, unsigned major, unsigned minor) { @@ -2370,7 +2163,6 @@ __attribute__((visibility("hidden"))) static void touch_uevent(const char *actio Logger::log("touch: %s (udev event to %d monitor%s)\n", action, sent, sent == 1 ? "" : "s"); } -// The devices each pad type is, as SteamDeckPad.kt describes them and inputudev.c the evdev node. static constexpr const char *DECK_DEVPATH = "/devices/droiddeck/usb1/1-1:1.2/0003:28DE:1205.0001/hidraw/hidraw16"; static constexpr const char *TRITON_PAD_DEVPATH = "/devices/droiddeck/usb3/3-1:1.0/0003:28DE:1302.0004/hidraw/hidraw19"; static constexpr const char *PAD_EVDEV_DEVPATH = "/devices/virtual/input/droiddeck0/event0"; @@ -2393,10 +2185,6 @@ __attribute__((visibility("hidden"))) static int pad_type_uevent(uint32_t type, return inject_uevent(action, PAD_EVDEV_DEVPATH, "input", "/dev/input/event0", major(rdev), minor(rdev)); } -// SDL's HIDAPI in the client (the PlayStation pads' driver) finds hidraw devices by watching /dev -// with inotify, with udev off, and looks again on any entry named hidraw. The guest cannot -// create one in /dev, so the client's watch of /dev also covers this directory (inotify_add_watch -// below), where a switch makes and removes one. __attribute__((visibility("hidden"))) static std::string hidraw_event_dir() { return std::string(fake_hook_dir()) + "/.hidraw-events"; } @@ -2414,7 +2202,6 @@ __attribute__((visibility("hidden"))) static unsigned pad_type_minor(uint32_t ty : type == PAD_TYPE_STEAM ? TRITON_PAD_HIDRAW_MINOR : DECK_HIDRAW_MINOR; } -// A switch, as the client sees one: the old device unplugged, then the new one plugged in. __attribute__((visibility("hidden"))) static void *pad_type_thread(void *) { static const char *kNames[] = {"Steam Deck controller", "Steam Controller", "Xbox 360 controller", "DualShock 4", "DualSense"}; @@ -2435,15 +2222,11 @@ __attribute__((visibility("hidden"))) static void *pad_type_thread(void *) { uint32_t now = live_pad_type(); if (now == was || now > PAD_TYPE_LAST) continue; int removed = pad_type_uevent(was, "remove"); - // Time for the client to let the old device go before the new one appears. struct timespec settle = {0, 300 * 1000 * 1000}; nanosleep(&settle, nullptr); int added = pad_type_uevent(now, "add"); if (was != PAD_TYPE_XBOX) poke_hidraw_watchers(pad_type_minor(was)); if (now != PAD_TYPE_XBOX) poke_hidraw_watchers(pad_type_minor(now)); - // The pad's evdev node comes or goes with the Xbox 360 type. Its hotplug is watched with - // inotify on /dev/input (SDL's, with udev off), so it is moved out and back in: everyone - // watching sees it removed and added, and opens it again only if it is the pad now. if (was == PAD_TYPE_XBOX || now == PAD_TYPE_XBOX) { std::string node = std::string(fake_hook_dir()) + "/event0"; std::string aside = std::string(fake_hook_dir()) + "/.event0-switching"; @@ -2489,13 +2272,8 @@ __attribute__((constructor)) static void start_touch_controller() { if (pthread_create(&thread, nullptr, touch_plug_thread, nullptr) == 0) pthread_detach(thread); } -// libudev (systemd's sd-device) accepts a device only where its directory is on sysfs, which it -// checks with fstatfs on the directory it resolved. The Deck's sysfs is the app's own files bound -// into /sys, so those paths are said to be sysfs; nothing else is touched. static constexpr long SYSFS_FS_MAGIC = 0x62656572; -// FAKE_DECK_SYSFS_LISTING: stand-ins for the listings of /sys, /sys/class and /sys/bus -// (SteamDeckPad.listingDir), for a client that is not allowed to list the real ones. __attribute__((visibility("hidden"))) static const char *deck_listing_dir() { static const char *dir = getenv("FAKE_DECK_SYSFS_LISTING"); return dir && *dir ? dir : nullptr; @@ -2517,9 +2295,6 @@ __attribute__((visibility("hidden"))) static bool is_deck_sysfs_fd(int fd) { return is_deck_sysfs_path(path); } -// Once per process: proof the client's enumeration reached the Deck's sysfs at all. No line here -// and no open of /dev/hidraw16 means the client never looked; a line here and no open means it -// looked and turned the device down. __attribute__((visibility("hidden"))) static void note_deck_sysfs(const char *how, int result) { static std::atomic noted{false}; if (!noted.exchange(true)) @@ -2563,20 +2338,12 @@ __attribute__((visibility("hidden"))) static int copy_ioctl_string(ioctl_request return static_cast(std::min(size, strlen(value) + 1)); } -// Feature reports carry the report id (0) first, then the Valve message: type, length, payload. -// The client repeats some feature reports (settings, rumble) for as long as it has the pad; each -// is logged the first time and then at 2, 4, 8... so the log shows what it asked and how often -// without a line per report. __attribute__((visibility("hidden"))) static void log_deck_feature(const char *what, uint8_t feature) { static std::atomic counts[2][256]; unsigned n = ++counts[what[0] == 's'][feature]; if ((n & (n - 1)) == 0) Logger::log("deck: feature 0x%02x %s (x%u)\n", feature, what, n); } -// A settings report (ID_SET_SETTINGS_VALUES) is a list of (setting id, 16-bit value) triples after -// the length byte. Returns SETTING_IMU_MODE (48, a SETTING_GYRO_MODE_* bitmask from SDL's -// controller_constants.h) when the report changes it, logged, else -1: the client repeats its -// settings for as long as it has the pad. static constexpr uint8_t DECK_SET_SETTINGS_VALUES = 0x87; static constexpr uint8_t DECK_SETTING_IMU_MODE = 48; @@ -2593,9 +2360,6 @@ __attribute__((visibility("hidden"))) static int deck_imu_mode_change(const uint return -1; } -// Tells the app whether the client wants motion (DeckImu::imu_mode, FakeInputWriter.readImuMode): -// PadMotion reads the phone's sensors only while it does. The mapping is read-only, and the -// client changes the mode a few times a minute at most, so the file is written directly. __attribute__((visibility("hidden"))) static void publish_imu_mode(const DeckHidraw &deck, int mode) { static auto my_open = reinterpret_cast(dlsym(RTLD_NEXT, "open")); if (deck.mapping_size < FAKE_INPUT_RING_SIZE + DECK_IMU_BLOCK_SIZE) return; @@ -2631,7 +2395,6 @@ deck_feature(DeckHidraw &deck, ioctl_request_t op, uint8_t *buf, bool set) { uint8_t reply[DECK_REPORT_BYTES + 1] = {}; switch (deck.pending_feature) { case DECK_GET_ATTRIBUTES_VALUES: { - // InputPlumber's capture from a real Deck (steam_deck_uhid.rs, handle_get_report). static const uint8_t kAttributes[] = {0x00, 0x83, 0x2d, 0x01, 0x05, 0x12, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x2b, 0x12, 0xa9, 0x62, 0x04, 0xad, 0xf1, 0xe4, 0x65, 0x09, 0x2e, 0x00, 0x00, @@ -2661,8 +2424,6 @@ deck_feature(DeckHidraw &deck, ioctl_request_t op, uint8_t *buf, bool set) { return static_cast(length); } -// The PlayStation pads' report descriptor: a gamepad with input report 1, the output report the -// model takes (5 on a DualShock 4, 2 on a DualSense) and the feature reports a driver reads. static const uint8_t kDs4ReportDescriptor[] = { 0x05, 0x01, 0x09, 0x05, 0xa1, 0x01, 0x06, 0x00, 0xff, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x85, 0x01, 0x09, 0x20, 0x95, 0x3f, 0x81, 0x02, 0x85, 0x05, 0x09, 0x21, 0x95, 0x1f, 0x91, 0x02, @@ -2675,8 +2436,6 @@ static const uint8_t kDualSenseReportDescriptor[] = { 0x85, 0x05, 0x09, 0x22, 0x95, 0x28, 0xb1, 0x02, 0x85, 0x09, 0x09, 0x23, 0x95, 0x13, 0xb1, 0x02, 0x85, 0x20, 0x09, 0x24, 0x95, 0x3f, 0xb1, 0x02, 0xc0}; -// Calibration both models report the same way (SDL: LoadCalibrationData): no bias, and the -// ranges that make a unit 1/16 degree/s and 1/8192 g, the scale build_sony_report writes in. __attribute__((visibility("hidden"))) static void put_sony_calibration(uint8_t *reply) { for (int axis = 0; axis < 3; axis++) { put16(reply + 7 + axis * 4, 8640); @@ -2700,9 +2459,9 @@ __attribute__((visibility("hidden"))) static int sony_feature(const DeckHidraw & if ((pad.sony == 4 && id == 0x02) || (pad.sony == 5 && id == 0x05)) { put_sony_calibration(reply); } else if ((pad.sony == 4 && (id == 0x12 || id == 0x81)) || (pad.sony == 5 && id == 0x09)) { - for (int i = 0; i < 6; i++) reply[1 + i] = SONY_MAC[5 - i]; // the address, last byte first + for (int i = 0; i < 6; i++) reply[1 + i] = SONY_MAC[5 - i]; } else if (pad.sony == 5 && id == 0x20) { - reply[44] = 0x30; // firmware 0x0430: past the versions SDL treats as old + reply[44] = 0x30; reply[45] = 0x04; } log_deck_feature("read", id); @@ -2711,8 +2470,6 @@ __attribute__((visibility("hidden"))) static int sony_feature(const DeckHidraw & return static_cast(length); } -// Rumble from the output report, when its flags say it carries rumble: a DualShock 4's report 5 -// (right/weak, then left/strong at 4 and 5), a DualSense's report 2 (at 3 and 4). __attribute__((visibility("hidden"))) static void sony_output(const DeckHidraw &pad, const uint8_t *data, size_t size) { if (!data || size < 6) return; int weak, strong; @@ -2727,7 +2484,6 @@ __attribute__((visibility("hidden"))) static void sony_output(const DeckHidraw & } else { return; } - // The drivers send a new report when the rumble changes and a zero one to stop it. send_vibration(strong * 257, weak * 257, strong || weak ? 2000 : 0, 0); } @@ -2763,7 +2519,7 @@ __attribute__((visibility("hidden"))) static int ioctl_sony(DeckHidraw &pad, ioc : "Sony Interactive Entertainment DualSense Wireless Controller"); case 0x05: return copy_ioctl_string(op, argp, pad.sony == 4 ? "usb-droiddeck-4/input3" : "usb-droiddeck-5/input3"); case 0x08: return copy_ioctl_string(op, argp, "5e:43:4b:44:44:02"); - case 0x06: // HIDIOCSFEATURE: nothing the pads need is set this way + case 0x06: return static_cast(_IOC_SIZE(op)); case 0x07: return sony_feature(pad, static_cast(argp), _IOC_SIZE(op)); default: @@ -2779,17 +2535,17 @@ ioctl_deck(DeckHidraw &deck, ioctl_request_t op, void *argp) { return -1; } switch (_IOC_NR(op)) { - case 0x01: // HIDIOCGRDESCSIZE + case 0x01: *static_cast(argp) = sizeof(kDeckReportDescriptor); return 0; - case 0x02: { // HIDIOCGRDESC: struct hidraw_report_descriptor { __u32 size; __u8 value[4096]; } + case 0x02: { auto *descriptor = static_cast(argp); uint32_t size; memcpy(&size, descriptor, sizeof(size)); memcpy(descriptor + 4, kDeckReportDescriptor, std::min(size, sizeof(kDeckReportDescriptor))); return 0; } - case 0x03: { // HIDIOCGRAWINFO: struct hidraw_devinfo { __u32 bustype; __s16 vendor, product; } + case 0x03: { struct { uint32_t bustype; int16_t vendor; @@ -2798,11 +2554,11 @@ ioctl_deck(DeckHidraw &deck, ioctl_request_t op, void *argp) { memcpy(argp, &info, sizeof(info)); return 0; } - case 0x04: return copy_ioctl_string(op, argp, DECK_NAME); // HIDIOCGRAWNAME - case 0x05: return copy_ioctl_string(op, argp, "usb-droiddeck-1/input2"); // HIDIOCGRAWPHYS - case 0x08: return copy_ioctl_string(op, argp, DECK_SERIAL); // HIDIOCGRAWUNIQ - case 0x06: return deck_feature(deck, op, static_cast(argp), true); // HIDIOCSFEATURE - case 0x07: return deck_feature(deck, op, static_cast(argp), false); // HIDIOCGFEATURE + case 0x04: return copy_ioctl_string(op, argp, DECK_NAME); + case 0x05: return copy_ioctl_string(op, argp, "usb-droiddeck-1/input2"); + case 0x08: return copy_ioctl_string(op, argp, DECK_SERIAL); + case 0x06: return deck_feature(deck, op, static_cast(argp), true); + case 0x07: return deck_feature(deck, op, static_cast(argp), false); default: Logger::log("deck: unhandled hidraw ioctl 0x%02x\n", _IOC_NR(op)); errno = EINVAL; @@ -2831,10 +2587,6 @@ __attribute__((visibility("hidden"))) static void triton_queue_output(DeckHidraw Logger::log("triton: %s report 0x%02x (x%u, %zu bytes)\n", feature ? "feature" : "output", report_id, n, size); } -// HIDIOCGFEATURE: the client reads the controller's info (report 1) this way, and a device that -// answers with nothing is dropped as a zombie. The read goes to the controller itself, as SDL's -// BLE backend does it (hid.m, get_feature_report): its reply is the report, with the report ID -// put in front when the controller left it out. Called without controller_mutex: it waits. __attribute__((visibility("hidden"))) static int triton_get_feature(DeckHidraw &triton, uint8_t *report, size_t size) { if (!report || size < 2 || triton.mapping_size < TRITON_SHARED_OFFSET + TRITON_SHARED_BLOCK_SIZE) { errno = EINVAL; @@ -2877,9 +2629,6 @@ __attribute__((visibility("hidden"))) static int triton_get_feature(DeckHidraw & return -1; } -// The emulated controller's feature reports: report ID 1, then the Valve message (type, length, -// payload), answered here as the Deck's are. The identity is the one a 2025 Steam Controller gave -// on device (HWID 72, its firmware timestamp), with this library's serial. static constexpr uint32_t TRITON_HWID = 72; static constexpr uint32_t TRITON_FW_TIMESTAMP = 0x6AC686B3; @@ -2902,7 +2651,6 @@ __attribute__((visibility("hidden"))) static int triton_pad_feature(DeckHidraw & reply[1] = triton.pending_feature; switch (triton.pending_feature) { case DECK_GET_ATTRIBUTES_VALUES: { - // (attribute, 32-bit value) pairs: product id, capabilities, firmware timestamp, hardware id. static const uint8_t kIds[] = {0x01, 0x02, 0x04, 0x09, 0x0a, 0x0b}; const uint32_t values[] = {static_cast(TRITON_WIRED_PRODUCT), 0, TRITON_FW_TIMESTAMP, TRITON_HWID, 0, 4000}; reply[2] = sizeof(kIds) * 5; @@ -2914,7 +2662,7 @@ __attribute__((visibility("hidden"))) static int triton_pad_feature(DeckHidraw & } case DECK_GET_STRING_ATTRIBUTE: reply[2] = 0x14; - reply[3] = 0x01; // the unit serial + reply[3] = 0x01; memcpy(reply + 4, TRITON_SERIAL, strlen(TRITON_SERIAL)); break; case DECK_GET_CHIP_ID: @@ -2930,25 +2678,22 @@ __attribute__((visibility("hidden"))) static int triton_pad_feature(DeckHidraw & return static_cast(length); } -// The emulated controller's haptic output reports (SDL, controller_structs.h) on the handheld's -// own motor: rumble as asked, the trackpad pulses and effects as short ticks. __attribute__((visibility("hidden"))) static void triton_pad_output(const uint8_t *data, size_t size) { if (!data || size < 2) return; switch (data[0]) { - case 0x80: // ID_OUT_REPORT_HAPTIC_RUMBLE: type, intensity, left {speed, gain}, right {speed, gain} + case 0x80: if (size >= 10) { int left = data[4] | data[5] << 8, right = data[7] | data[8] << 8; - // SDL repeats a held rumble every 40 ms, so each report lasts a little longer than that. send_vibration(left, right, left || right ? 100 : 0, 0); } break; - case 0x81: // ID_OUT_REPORT_HAPTIC_PULSE: side, on_us, off_us, repeat count + case 0x81: if (size >= 8) { int on_ms = (data[2] | data[3] << 8) / 1000, repeat = data[6] | data[7] << 8; send_vibration(0, 40000, std::max(8, std::min(200, on_ms * std::max(1, repeat))), 0); } break; - case 0x82: case 0x83: case 0x84: case 0x85: // command, tone, sweep, script + case 0x82: case 0x83: case 0x84: case 0x85: send_vibration(0, 30000, 15, 0); break; default: @@ -2970,7 +2715,6 @@ __attribute__((visibility("hidden"))) static int ioctl_triton(DeckHidraw &triton uint32_t size; memcpy(&size, descriptor, sizeof(size)); memcpy(descriptor + 4, kTritonReportDescriptor, std::min(size, sizeof(kTritonReportDescriptor))); - // The wired controller's state report (SteamDeckPad's TRITON_WIRED_REPORT_DESCRIPTOR). if (triton.emulated && size > 15) descriptor[4 + 15] = TRITON_STATE_WIRED; return 0; } @@ -2988,8 +2732,6 @@ __attribute__((visibility("hidden"))) static int ioctl_triton(DeckHidraw &triton case 0x05: return copy_ioctl_string(op, argp, triton.emulated ? "usb-droiddeck-3/input0" : "bluetooth-droiddeck-1"); case 0x08: return copy_ioctl_string(op, argp, TRITON_SERIAL); case 0x06: { - // The client's feature reports are the report ID and 64 bytes; the last is padding the BLE - // characteristic does not take (SteamControllerBle.sendOutputReport drops it), so 64 are kept. size_t size = _IOC_SIZE(op); if (!argp || size < 2 || size > 65) { errno = EINVAL; @@ -3008,10 +2750,6 @@ __attribute__((visibility("hidden"))) static int ioctl_triton(DeckHidraw &triton } } -// A device scan that fails on a phone and not on the Thor: libudev gives up its whole scan on any -// sysfs directory it cannot read for a reason other than its absence, and a phone's SELinux policy -// denies directories a permissive device lets through. The client's /sys failures that are not -// ENOENT are logged, each path once, so pad.log names the directory that stopped the scan. __attribute__((visibility("hidden"))) static std::string note_sys_failure(int dirfd, const char *pathname) { int saved_errno = errno; std::string path; @@ -3052,11 +2790,6 @@ __attribute__((visibility("hidden"))) static std::string note_sys_failure(int di return path; } -// An enforcing SELinux policy (every retail phone; the Thor only with it forced on) refuses an app -// a listing of /sys, /sys/class and /sys/bus. libudev lists /sys/class to find the subsystems to -// descend into and gives up its whole scan when it cannot, so the client never reached hidraw and -// found no Deck. The client is listed the stand-ins instead - hidraw under class - and opens -// /sys/class/hidraw itself, which is ours and readable. Only on that refusal, only for the client. __attribute__((visibility("hidden"))) static std::string deck_listing_for(const char *path) { const char *listing = deck_listing_dir(); if (!path || !listing || errno != EACCES || !fake_deck_enabled() || !process_is_steam_client()) return {}; @@ -3072,9 +2805,6 @@ __attribute__((visibility("hidden"))) static std::string deck_listing_for(const } #ifdef __GLIBC__ -// sd-device's path chase now requires a mount ID, which statx only supplies from Linux 5.8. -// Older handheld kernels still publish the real ID in fdinfo. Scope this compatibility path to -// libudev/libsystemd in the Deck-reading Steam client, and never invent a unique mount ID. __attribute__((visibility("hidden"))) static bool deck_device_library(void *caller) { Dl_info info; if (!dladdr(caller, &info) || !info.dli_fname) return false; @@ -3099,7 +2829,6 @@ __attribute__((visibility("hidden"))) static bool deck_mount_id_from_fdinfo( } if (target < 0) return false; struct stat st; - // Pin the inode and check it still matches the successful statx before adding information. bool same = real_fstat(target, &st) == 0 && (buf->stx_mask & STATX_INO) && st.st_ino == buf->stx_ino && major(st.st_dev) == buf->stx_dev_major && minor(st.st_dev) == buf->stx_dev_minor; @@ -3129,7 +2858,7 @@ EXPORT int statx(int dirfd, const char *path, int flags, unsigned mask, struct s static auto real = reinterpret_cast(dlsym(RTLD_NEXT, "statx")); int result = real(dirfd, path, flags, mask, buf); int saved_errno = errno; - constexpr unsigned unique_mount_id = 0x4000; // STATX_MNT_ID_UNIQUE, newer than build headers. + constexpr unsigned unique_mount_id = 0x4000; if (result == 0 && (mask & STATX_MNT_ID) && !(buf->stx_mask & (STATX_MNT_ID | unique_mount_id)) && fake_deck_enabled() && process_is_steam_client() && deck_device_library(__builtin_return_address(0))) { @@ -3553,7 +3282,6 @@ EXPORT int inotify_add_watch(int fd, const char *pathname, uint32_t mask) { } else if (!strcmp(pathname, "/dev/input")) { pathname = fake_hook_dir(); } else if (!strcmp(pathname, "/dev") && fake_deck_enabled() && process_is_steam_client()) { - // Beside /dev itself, not instead: the same descriptor gets both directories' events. std::string events = hidraw_event_dir(); mkdir(events.c_str(), 0700); my_inotify_add_watch(fd, events.c_str(), mask); @@ -3586,8 +3314,6 @@ static bool wait_snapshot(std::shared_ptr fake, return false; } if (read_snapshot(fake->ring, snap)) return true; - // Enumeration queries must not fail merely because Android is publishing - // an input frame. Other hooks (including Binder) can proceed while we wait. guard.unlock(); struct timespec wait = {0, 1000000}; int result = nanosleep(&wait, nullptr); @@ -3600,6 +3326,12 @@ static bool wait_snapshot(std::shared_ptr fake, } } +static int forward_ioctl(int fd, ioctl_request_t op, void *argp) { + using ioctl_fn = int (*)(int, ioctl_request_t, ...); + static const auto next = reinterpret_cast(dlsym(RTLD_NEXT, "ioctl")); + return next ? next(fd, op, argp) : static_cast(syscall(SYS_ioctl, fd, op, argp)); +} + EXPORT int ioctl(int fd, ioctl_request_t op, ...) { va_list va; void *argp; @@ -3608,10 +3340,7 @@ EXPORT int ioctl(int fd, ioctl_request_t op, ...) { argp = va_arg(va, void *); va_end(va); - // The lock must not be held across the passthrough: binder's transport is a - // blocking ioctl(BINDER_WRITE_READ), so a parked binder pool thread would own - // controller_mutex() for as long as it waits and deadlock every other ioctl. - if (!watched(fd)) return syscall(SYS_ioctl, fd, op, argp); + if (!watched(fd)) return forward_ioctl(fd, op, argp); std::unique_lock guard(controller_mutex()); auto maker = uinput_map().find(fd); if (maker != uinput_map().end()) return ioctl_uinput(*maker->second, op, argp); @@ -3629,14 +3358,13 @@ EXPORT int ioctl(int fd, ioctl_request_t op, ...) { auto controller = controller_map().find(fd); if (controller == controller_map().end()) { guard.unlock(); - return syscall(SYS_ioctl, fd, op, argp); + return forward_ioctl(fd, op, argp); } int type = (op >> 8 & 0xFF); int number = (op >> 0 & 0xFF); const char *event = controller->second->event ? controller->second->event : "event0"; int event_number = controller->second->slot; - // A virtual pad answers with what its maker described, not with the app's pad identity. const UinputDescription *made = controller->second->uinput; if (type == 0x45 && number == 0x1) { @@ -3752,16 +3480,7 @@ EXPORT int ioctl(int fd, ioctl_request_t op, ...) { if (effect->id == -1) effect->id = next_ff_id++; ff_effects()[effect->id] = *effect; - - uint16_t duration = effect->replay.length; - uint16_t slot = static_cast(event_number); - if (effect->type == FF_RUMBLE) { - send_vibration(effect->u.rumble.strong_magnitude, - effect->u.rumble.weak_magnitude, duration, slot); - } else if (effect->type == FF_PERIODIC) { - send_vibration(effect->u.periodic.magnitude, effect->u.periodic.magnitude, - duration, slot); - } + send_ff_effect(*effect, static_cast(event_number)); return 0; } else if (type == 0x45 && number == 0x81) { int id = (intptr_t)argp; @@ -3800,6 +3519,12 @@ EXPORT int ioctl(int fd, ioctl_request_t op, ...) { } else if (type == 0x45 && number == 0x90) { Logger::log("Hooking ioctl EVIOCGRAB for event %s\n", event); return 0; + } else if (type == 0x6A && !strncmp(event, "event", 5)) { + // Older SDL2 builds treat any JSIOCGNAME answer as a joydev node and skip EVIOCGID, then drop the pad as 0000:0000. + Logger::log("Rejecting joydev ioctl %d for event %s\n", number, event); + guard.unlock(); + errno = EINVAL; + return -1; } else if (type == 0x6A && number == 0x1) { Logger::log("Hooking ioctl JSIOCGVERSION for event %s\n", event); int version = JS_VERSION; @@ -3825,7 +3550,7 @@ EXPORT int ioctl(int fd, ioctl_request_t op, ...) { } else { Logger::log("Unhandled evdev ioctl, type %d number %d\n", type, number); guard.unlock(); - return syscall(SYS_ioctl, fd, op, argp); + return forward_ioctl(fd, op, argp); } } @@ -3850,6 +3575,7 @@ EXPORT int close(int fd) { } static constexpr int kMaxRingWaitMs = 2; +static constexpr int kLowLatencyRingWaitUs = 250; EXPORT ssize_t read(int fd, void *buf, size_t count) { if (!watched(fd)) return syscall(SYS_read, fd, buf, count); @@ -3859,11 +3585,9 @@ EXPORT ssize_t read(int fd, void *buf, size_t count) { guard.unlock(); return syscall(SYS_read, fd, buf, count); } - // Keep the mapping alive across waits, even if close() removes the fd and - // another open reuses its number. Every state access still holds the lock. auto handle = controller->second; FakeController &fake = *handle; - if (count < FAKE_INPUT_EVENT_SIZE) { + if (count < sizeof(struct input_event)) { errno = EINVAL; return -1; } @@ -3881,7 +3605,7 @@ EXPORT ssize_t read(int fd, void *buf, size_t count) { return -1; } for (int attempt = 0; attempt < 8; ++attempt) { - size_t requested = count / FAKE_INPUT_EVENT_SIZE; + size_t requested = count / sizeof(struct input_event); if (fake.keyframe_remaining == 0) { SnapshotState snap; if (!read_snapshot(fake.ring, snap)) break; @@ -3900,24 +3624,25 @@ EXPORT ssize_t read(int fd, void *buf, size_t count) { FAKE_INPUT_RING_HEADER_SIZE; for (size_t i = 0; i < events; ++i) { size_t index = (fake.read_seq + i) % FAKE_INPUT_RING_CAPACITY; - struct input_event ev; - memcpy(&ev, ring_events + index * FAKE_INPUT_EVENT_SIZE, FAKE_INPUT_EVENT_SIZE); + RingEvent stored; + memcpy(&stored, ring_events + index * FAKE_INPUT_EVENT_SIZE, FAKE_INPUT_EVENT_SIZE); + struct input_event ev = {}; + ev.time.tv_sec = stored.sec; + ev.time.tv_usec = stored.usec; + ev.type = stored.type; + ev.code = stored.code; + ev.value = stored.value; if (ev.type == EV_ABS) ev.code = presented_abs_code(fake, ev.code); - memcpy(static_cast(buf) + i * FAKE_INPUT_EVENT_SIZE, &ev, - FAKE_INPUT_EVENT_SIZE); + memcpy(static_cast(buf) + i * sizeof(ev), &ev, sizeof(ev)); } - // A producer can lap the reader while it copies. Discard that copy - // instead of delivering torn/overwritten events or losing a release. __atomic_thread_fence(__ATOMIC_ACQUIRE); if (snap.sequence != __atomic_load_n(&fake.ring->snapshot_seq, __ATOMIC_RELAXED)) continue; fake.read_seq += events; - return static_cast(events * FAKE_INPUT_EVENT_SIZE); + return static_cast(events * sizeof(struct input_event)); } } - // Finish a captured frame before handling a newer resync. Its counter is - // acknowledged only when that newer snapshot is actually captured. size_t events = std::min(requested, fake.keyframe_remaining); struct timeval now = {}; gettimeofday(&now, nullptr); @@ -3929,11 +3654,10 @@ EXPORT ssize_t read(int fd, void *buf, size_t count) { ev.code = kNeutralEvents[index].code; ev.value = keyframe_value(fake, ev.type, ev.code); if (ev.type == EV_ABS) ev.code = presented_abs_code(fake, ev.code); - memcpy(static_cast(buf) + i * FAKE_INPUT_EVENT_SIZE, - &ev, FAKE_INPUT_EVENT_SIZE); + memcpy(static_cast(buf) + i * sizeof(ev), &ev, sizeof(ev)); --fake.keyframe_remaining; } - return static_cast(events * FAKE_INPUT_EVENT_SIZE); + return static_cast(events * sizeof(struct input_event)); } if (nonblock) { errno = EAGAIN; @@ -3944,7 +3668,8 @@ EXPORT ssize_t read(int fd, void *buf, size_t count) { int result = nanosleep(&sleep_time, nullptr); guard.lock(); if (result < 0) return -1; - if (backoff_ns < kMaxRingWaitMs * 1000 * 1000) backoff_ns *= 2; + if (low_latency(LATENCY_CONTROLLER)) backoff_ns = kLowLatencyRingWaitUs * 1000; + else if (backoff_ns < kMaxRingWaitMs * 1000 * 1000) backoff_ns *= 2; } } @@ -3999,7 +3724,6 @@ EXPORT ssize_t writev(int fd, const struct iovec *iov, int iovcnt) { } auto made = uinput_map().find(fd); if (made != uinput_map().end()) { - // One description or whole events per vector, which is how uinput writers write. ssize_t total = 0; for (int i = 0; i < iovcnt; i++) { ssize_t written = write_uinput(*made->second, iov[i].iov_base, iov[i].iov_len); @@ -4127,7 +3851,7 @@ static int poll_fake(struct pollfd *fds, nfds_t nfds, int timeout, if (deadline_ms >= 0 && monotonic_ms() >= deadline_ms) return 0; - if (backoff_ms < kMaxRingWaitMs) + if (backoff_ms < kMaxRingWaitMs && !low_latency(LATENCY_CONTROLLER)) backoff_ms *= 2; } } @@ -4147,8 +3871,6 @@ EXPORT int ppoll(struct pollfd *fds, nfds_t nfds, if (!is_fake_input_fd(fds[i].fd)) continue; if (!sigmask) return poll_fake(fds, nfds, static_cast(timespec_to_ms(timeout)), nullptr); - // Keep signals pending between polling slices. Each kernel ppoll applies - // the requested mask atomically with its wait, just like a single ppoll. sigset_t all_signals, original_mask; sigfillset(&all_signals); int error = pthread_sigmask(SIG_SETMASK, &all_signals, &original_mask); @@ -4302,14 +4024,12 @@ EXPORT int select(int nfds, fd_set *readfds, fd_set *writefds, if (deadline_ms >= 0 && monotonic_ms() >= deadline_ms) return 0; - if (backoff_ms < kMaxRingWaitMs) + if (backoff_ms < kMaxRingWaitMs && !low_latency(LATENCY_CONTROLLER)) backoff_ms *= 2; } } #ifdef __GLIBC__ -// Steam's binaries were linked against an older glibc and reach the calls above through these -// names instead. static mode_t open_mode(int flags, va_list va) { return (flags & (O_CREAT | O_TMPFILE)) ? va_arg(va, mode_t) : 0; } diff --git a/app/src/main/cpp/framegen/VulkanRendererContext.h b/app/src/main/cpp/framegen/VulkanRendererContext.h index cec4a4119b..efbc00c686 100644 --- a/app/src/main/cpp/framegen/VulkanRendererContext.h +++ b/app/src/main/cpp/framegen/VulkanRendererContext.h @@ -84,12 +84,11 @@ struct VkTable { PFN_vkCmdSetScissor CmdSetScissor; PFN_vkCmdPipelineBarrier CmdPipelineBarrier; PFN_vkCmdCopyImage CmdCopyImage; - PFN_vkCmdBlitImage CmdBlitImage; // frame-gen capture resolution: composite -> swapchain upscale - // Compute: the native LSFG chain is 25 compute dispatches. + PFN_vkCmdBlitImage CmdBlitImage; + PFN_vkCmdDispatch CmdDispatch; PFN_vkCreateComputePipelines CreateComputePipelines; PFN_vkUnmapMemory UnmapMemory; - // win-fg native: clears its flow scratch, resets its scratch pool on resize. PFN_vkCmdClearColorImage CmdClearColorImage; PFN_vkResetDescriptorPool ResetDescriptorPool; PFN_vkCmdCopyBufferToImage CmdCopyBufferToImage; @@ -125,11 +124,8 @@ struct VkTable { #include #include -// Renderer-neutral direct-scanout impl (owns the SurfaceControl/AHB state). -// Included after SCANOUT_LOG is defined above; its own definition is guarded. #include "../scanout/ScanoutContext.h" -// Native (compositor-side) LSFG frame generation - capability gate. #include "lsfg/lsfg_probe.h" #include #include @@ -139,89 +135,83 @@ namespace winfg { class Engine; } static constexpr uint32_t MAX_FRAMES_IN_FLIGHT = 2; -// Push-constant layouts for the spatial-upscaler post passes. The leading vec4 -// `ndc` matches upscale.vert; the remaining members are read only by the -// fragment stage. std430 offsets line up with these C structs. -struct SgsrPushConstants { // 36 bytes + + + +struct SgsrPushConstants { float ndc[4]; - float viewportInfo[4]; // xy = 1/inputSize, zw = inputSize px - float edgeSharpness; // SGSR EdgeSharpness, from the slider + float viewportInfo[4]; + float edgeSharpness; }; -struct NisPushConstants { // 36 bytes +struct NisPushConstants { float ndc[4]; - float viewportInfo[4]; // xy = 1/inputSize, zw = inputSize px - float sharpness; // NIS sharpness [0..1], from the slider + float viewportInfo[4]; + float sharpness; }; -struct EasuPushConstants { // 88 bytes +struct EasuPushConstants { float ndc[4]; uint32_t con0[4], con1[4], con2[4], con3[4]; float outW, outH; }; -struct RcasPushConstants { // 40 bytes +struct RcasPushConstants { float ndc[4]; - uint32_t con[4]; // con.x = bit-packed sharpness + uint32_t con[4]; float outW, outH; }; -// Composable post effects (AMD CAS sharpen + fake-HDR). Both lead with vec4 ndc -// (offset 0) like the upscaler PCs and stay well under the 88-byte PC range. -struct CasPushConstants { // 32 bytes + + +struct CasPushConstants { float ndc[4]; - float resolution[2]; // input texture size in px - float sharpness; // CAS SHARPNESS term [0..1] + float resolution[2]; + float sharpness; float _pad; }; -struct HdrPushConstants { // 24 bytes +struct HdrPushConstants { float ndc[4]; - float resolution[2]; // input texture size in px + float resolution[2]; }; -// Phase 2 screen effects ported from the GL EffectComposer. Each leads with vec4 -// ndc (offset 0) like the upscaler PCs and stays well under the 88-byte PC range. -struct FxaaPushConstants { // 24 bytes + + +struct FxaaPushConstants { float ndc[4]; - float resolution[2]; // input texture size in px + float resolution[2]; }; -struct ToonPushConstants { // 24 bytes +struct ToonPushConstants { float ndc[4]; - float resolution[2]; // input texture size in px + float resolution[2]; }; -struct ColorPushConstants { // 32 bytes +struct ColorPushConstants { float ndc[4]; - float brightness; // additive [-1,1] - float contrast; // [0,2] - float gamma; // [0.1,5] - float saturation; // [0,2]; 1 = unchanged, 0 = greyscale. - // APPENDED last so the three offsets above - // stay where color.frag already had them. + float brightness; + float contrast; + float gamma; + float saturation; + + }; -struct NtscPushConstants { // 28 bytes +struct NtscPushConstants { float ndc[4]; - float resolution[2]; // screen size in px (TextureSize/resolution) - float frameCount; // animated chroma-phase counter + float resolution[2]; + float frameCount; }; -struct CrtPushConstants { // 24 bytes +struct CrtPushConstants { float ndc[4]; - float resolution[2]; // input texture size in px (unused by shader) + float resolution[2]; }; -struct DebandPushConstants { // 28 bytes +struct DebandPushConstants { float ndc[4]; - float resolution[2]; // input texture size in px (layout parity) - float strength; // dither amplitude in LSBs (1.0 = +/-1/255) + float resolution[2]; + float strength; }; class VulkanRendererContext { public: - // `lsfgVk11Compat` (experimental) lets the LSFG capability probe accept a - // Vulkan 1.1/1.2 device that offers the extensions the chain needs; it has - // to be known before vkCreateDevice, hence a constructor argument. VulkanRendererContext(ANativeWindow* window, int cWidth, int cHeight, void* adrenotoolsHandle = nullptr, bool lsfgVk11Compat = false); ~VulkanRendererContext(); void onSurfaceResized(int width, int height); void setTransform(float ox, float oy, float sx, float sy); - // #413: game-region clip rect (surface px). Stored and applied as the swapchain scissor in - // recordCmdBuf so a FILL/STRETCH game confined to a half (TOP/BOTTOM alignment) can't bleed into - // the on-screen-controls half. A full-surface (or w<=0) rect means "no clip" (CENTER). void setClipRegion(int x, int y, int w, int h); void updatePointerPosition(short x, short y); void updateWindowContent(int64_t id, void* pixels, short w, short h, short stride, int x, int y); @@ -241,13 +231,7 @@ public: void scanoutSetBuffer(AHardwareBuffer* ahb, int x, int y, int w, int h, int fenceFd = -1); void scanoutSetCursorImage(void* pixels, short w, short h, short stride); void scanoutSetCursorPos(short x, short y, short hotX, short hotY); - // The renderer-neutral scanout implementation. The scanout methods above are - // thin forwarders to this (see VulkanRendererScanout.cpp); the cursor render- - // thread signalling stays in the forwarders, not in ScanoutContext. ScanoutContext scanout; - // Bound to scanout's atomics so the existing JNI ABI (r->scanoutActive / - // r->gameFrameDelivered direct member access) keeps compiling against a - // single source of truth. Must be declared after `scanout`. std::atomic& scanoutActive = scanout.scanoutActive; std::atomic& gameFrameDelivered = scanout.gameFrameDelivered; std::atomic surfaceDetached{false}; @@ -286,47 +270,16 @@ public: void setPresentMode(VkPresentModeKHR mode); std::vector getSupportedPresentModes() const; - // --- Native LSFG frame generation ------------------------------------- - // Capability verdict for the compositor-side LSFG engine. Filled at device - // creation and completed once the swapchain format is known; read by the - // UI (through JNI) to grey the engine out with a reason. const lsfg::Caps& lsfgCaps() const { return lsfgCaps_; } - // Arm/disarm native LSFG frame generation for this session. Changing the - // armed state recreates the swapchain, because the composite path needs - // TRANSFER_DST usage and a deeper image queue that a normal session does - // not pay for. void setFrameGenArmed(bool armed, int multiplier); bool frameGenArmed() const { return fgArmed_.load(std::memory_order_relaxed); } - // Live frame-gen telemetry for the in-game readout: - // [0] generations the governor currently trusts - // [1] generations actually planned for the last source frame - // [2] measured source (real) frames per second - // [3] measured presented frames per second - // [4] thermal status, -1 when the device gives no signal - // [5] GPU milliseconds the chain spends per generated frame, -1 unknown void frameGenStats(float out[6]) const; - // Why the selected native frame-gen engine cannot run here, for the UI: - // -1 not known yet (caps not probed), 0 fine, 1 this driver lacks what the - // engine needs (lsfgCaps().reason says which gate), 2 the engine failed to start. int frameGenProblem() const; - // Path to the SPIR-V cache built from the user's Lossless.dll. Setting it - // drops any existing engine so the next armed frame rebuilds from it. void setLsfgCachePath(const char* path); - // Flow scale (0.25-1.0) and the panel's real refresh rate. The pacer never - // generates above the refresh rate. - // Experimental: `captureHeight` sizes the composite ring the chain runs on, - // the width following the swapchain's aspect, so a phone GPU generates at - // game-like resolution and the result is blitted up. 0 = panel; - // kFgCaptureGame = the X screen's height (containerHeight), which already - // carries the per-game override and render scale; otherwise a pixel height. static constexpr int32_t kFgCaptureGame = -1; void setFrameGenTuning(float flowScale, float refreshHz, int32_t captureHeight = 0); - // Which native engine generates: 0 = LSFG (needs the cache built from the - // user's Lossless.dll), 1 = win-fg (our own chain, embedded, needs nothing). - // Switching drops the other engine so only one ever holds GPU resources. void setFrameGenEngine(int kind); - // win-fg only: interpolation model (3/4) and performance preset (0..2). void setWinFgTuning(int model, int perfPreset); private: @@ -359,11 +312,9 @@ private: ANativeWindow* window; int surfaceWidth, surfaceHeight, containerWidth, containerHeight; - // #413 compositor clip rect (surface px). clipRegionW<=0 => disabled (whole swapchain). Written from - // the renderer thread (setClipRegion), read from the render thread (recordCmdBuf) -> atomic. std::atomic clipRegionX{0}, clipRegionY{0}, clipRegionW{0}, clipRegionH{0}; void* adrenotoolsHandle = nullptr; - bool lsfgVk11Compat_ = false; // see the constructor + bool lsfgVk11Compat_ = false; int filterMode = 0; bool swapRB = false; float maxAnisotropy = 1.0f; @@ -386,9 +337,6 @@ private: std::vector framePreUpload; std::vector framePostUpload; - // [P0] All SurfaceControl / AHardwareBuffer scanout state moved to - // ScanoutContext (member `scanout` above). Dead members (lastDst*, - // ScanoutPending/scanoutPending*, fnSTSetBackPressure) were dropped. std::atomic pointerX{0}, pointerY{0}; float sceneOffsetX=0.f, sceneOffsetY=0.f, sceneScaleX=1.f, sceneScaleY=1.f; @@ -428,138 +376,69 @@ private: VkPipeline pipeline = VK_NULL_HANDLE; - // ---- Spatial upscaler (SGSR / FSR1) ---- - // upscalerMode enum (mirrored by JNI nativeSetUpscaler): - // 0 = none (passthrough; current sampler governs scaling) - // 1 = linear (rebuild base sampler LINEAR; no shader pass) - // 2 = nearest (rebuild base sampler NEAREST; no shader pass) - // 3 = sgsr (Snapdragon GSR 1.0; single pass; aspect-fit / letterbox) - // 4 = fsr (AMD FSR1 EASU+RCAS; two passes; fill / stretch) - // 5 = fsr_fit (AMD FSR1 EASU+RCAS; two passes; aspect-fit / letterbox) - // 6 = sharpen (RCAS-only; any resolution; aspect-fit / letterbox) - // 7 = nis (NVIDIA Image Scaling NVScaler; single pass; aspect-fit) - // 8 = sgsr_quality (SGSR 1 edge-direction variant; single pass; aspect-fit) - // Shader upscaling only engages for modes 3-8 AND when the game render - // resolution (container) is smaller than the swapchain. Otherwise the - // existing direct-to-swapchain path is used unchanged. int upscalerMode = 0; - // Independent of upscalerMode: high-quality Lanczos downscale for the - // supersampling case (game render res > display res). When enabled and the - // render res exceeds the swapchain, replaces the bilinear minify with a - // proper downscale pass. Supersampling and the upscale modes are mutually - // exclusive in practice (one is render>display, the other render CAS SHARPNESS + int casSharpness = 60; bool hdrEnabled = false; - float upscaleSharpness01 = 0.75f; // slider/100; RCAS lobe scale, SGSR edge derived - // Debanding: terminal TPDF/IGN dither pass before the 8-bit swapchain quantize. + float upscaleSharpness01 = 0.75f; + bool debandEnabled = false; - int debandStrength = 100; // slider 0..200 -> strength/100 LSBs + int debandStrength = 100; - // Phase 2 screen effects (GL EffectComposer parity). FXAA/Toon/CRT/NTSC are - // binary; Color is the brightness/contrast/gamma grade (always-applied via the - // sliders, no toggle) and is "enabled" only when not at neutral (0,0,1). bool fxaaEnabled = false; bool toonEnabled = false; bool crtEnabled = false; bool ntscEnabled = false; - bool colorEnabled = false; // derived: !neutral grade - float colorBrightness = 0.0f; // [-1,1] (slider/100, clamped) - float colorContrast = 0.0f; // [0,2] (slider/100, clamped) - float colorGamma = 1.0f; // [0.1,5] - float colorSaturation = 1.0f; // [0,2] (slider/100, clamped) - uint32_t ntscFrameCounter = 0; // animates NTSC chroma phase + bool colorEnabled = false; + float colorBrightness = 0.0f; + float colorContrast = 0.0f; + float colorGamma = 1.0f; + float colorSaturation = 1.0f; + uint32_t ntscFrameCounter = 0; - VkSampler upscaleSampler = VK_NULL_HANDLE; // linear clamp; offscreen/mid input + VkSampler upscaleSampler = VK_NULL_HANDLE; - // === Native LSFG: composite target ring =================================== - // Frame generation cannot composite straight into a swapchain image: the - // finished frame has to be READABLE (it becomes the next frame's LSFG - // input) and generated frames have to be STORAGE-WRITABLE by a compute - // dispatch. Android swapchain images are COLOR_ATTACHMENT only, and - // storage support on a swapchain format is not something a driver owes us. - // - // So when frame gen is armed the whole existing recording is redirected at - // a composite image we own - format-identical to the swapchain, so every - // existing pipeline stays render-pass compatible - and a copy moves it into - // the acquired swapchain image at the end. With frame gen off, not one of - // these objects is created and the direct-to-swapchain path is untouched. struct CompositeTarget { VkImage img = VK_NULL_HANDLE; VkDeviceMemory mem = VK_NULL_HANDLE; - VkImageView view = VK_NULL_HANDLE; // colour attachment + sampled - VkImageView storageView = VK_NULL_HANDLE; // compute writes (generate) + VkImageView view = VK_NULL_HANDLE; + VkImageView storageView = VK_NULL_HANDLE; VkFramebuffer fb = VK_NULL_HANDLE; - VkDescriptorSet ds = VK_NULL_HANDLE; // sampled, for later passes + VkDescriptorSet ds = VK_NULL_HANDLE; }; - // Hard ceiling: (max generations + 1) presentable frames per source frame, - // times a queue depth of 2, capped so the footprint stays bounded. static constexpr uint32_t kMaxCompositeTargets = 7; std::vector compositeTargets; - VkRenderPass compositeRenderPass = VK_NULL_HANDLE; // CLEAR -> GENERAL + VkRenderPass compositeRenderPass = VK_NULL_HANDLE; uint32_t compositeW = 0, compositeH = 0; - uint32_t compositeIndex = 0; // rotates per composite; gives history for free - bool compositeArmed = false; // targets exist AND this frame uses them - bool swapchainTransferDst = false; // swapchain was created with TRANSFER_DST + uint32_t compositeIndex = 0; + bool compositeArmed = false; + bool swapchainTransferDst = false; - // Set from the app when the native LSFG engine is selected for this - // session. Read on the render thread; false keeps every path as it was. std::atomic fgArmed_{false}; std::atomic fgMultiplier_{0}; - // Tuning is written by the UI thread and consumed by the render thread, so - // it is published through atomics and applied to the engine at the top of - // the frame-gen block. The UI thread never touches the engine itself. std::atomic fgFlowScale_{1.0f}; std::atomic fgRefreshHz_{0.0f}; std::atomic fgConfigDirty_{true}; - // Experimental (see setFrameGenTuning): capture height of the composite - // ring. 0 = panel resolution, kFgCaptureGame = the X screen's height. std::atomic fgCaptureHeight_{0}; - // Extent the composite ring should have for the current swapchain and - // capture height (width follows the swapchain aspect, both even). void compositeExtentFor(uint32_t& w, uint32_t& h) const; - // The extent the scene is rendered at this frame: the composite ring while - // frame gen runs on a ring smaller than the swapchain (experimental capture - // resolution), otherwise the swapchain. Every full-target pass (the effect - // chain, the spatial upscalers, the render-scale downscale) sizes itself by - // this, so those keep working below panel resolution and their - // intermediates shrink with the ring. VkExtent2D renderExtent() const { if (compositeActive() && (compositeW != swapchainExt.width || compositeH != swapchainExt.height)) return VkExtent2D{compositeW, compositeH}; return swapchainExt; } - // Copy (same extent) or blit (composite smaller than the swapchain) a - // composite-ring image, already in TRANSFER_SRC, into a swapchain image - // already in TRANSFER_DST. void recordCompositeToSwapchainTransfer(VkCommandBuffer cb, VkImage src, uint32_t imgIdx); bool createCompositeRenderPass(); bool ensureCompositeTargets(uint32_t w, uint32_t h, uint32_t count); void destroyCompositeTargets(); - // True when this frame should composite off-swapchain. Call on the render - // thread; every gate must hold or we fall back to the untouched path. bool compositeActive() const; - // Render pass / framebuffer this frame draws its FINAL pass into. VkRenderPass targetRenderPass() const; VkFramebuffer targetFramebuffer(uint32_t imgIdx) const; - // Copy the finished composite into the acquired swapchain image and leave - // it in PRESENT_SRC. No-op when the composite path is not active. void copyCompositeToSwapchain(VkCommandBuffer cb, uint32_t imgIdx); - // === Native LSFG: the software cursor ==================================== - // LSFG interpolates whatever it is given, so a cursor composited into the - // frame gets warped along the flow field and smears. It is therefore - // excluded from the composite while frame gen is armed and drawn once into - // EVERY presented image instead - real and generated alike - through a - // load-op render pass that leaves the image ready to present. VkRenderPass cursorOverlayRenderPass = VK_NULL_HANDLE; struct CursorOverlay { bool draw = false; @@ -569,19 +448,16 @@ private: CursorOverlay cursorOverlay_{}; bool createCursorOverlayRenderPass(); - // Draw the cursor into an already-copied swapchain image and leave it in - // PRESENT_SRC. Takes over the final transition from the copy helpers. void recordCursorOverlay(VkCommandBuffer cb, uint32_t imgIdx); - // True when the cursor is being drawn per present rather than composited. bool cursorDrawnPerPresent() const; - // === Native LSFG: the per-source-frame present plan ======================= - // Interpolation produces frames that belong BETWEEN N-1 and N, so the - // generated frames are presented FIRST and real frame N is held back one - // slot. All presents for one source frame are queued together: with FIFO - // the driver then shows them on consecutive vblanks, so the pacing falls - // out of the present mode for free - no sleeps, no render-mode change. - static constexpr uint32_t kMaxPresentsPerFrame = 4; // 1 real + up to 3 generated + + + + + + + static constexpr uint32_t kMaxPresentsPerFrame = 4; struct FrameGenPlan { uint32_t generations = 0; uint32_t presents = 1; @@ -594,30 +470,17 @@ private: bool lsfgEngineTried_ = false; std::unique_ptr winfgEngine_; bool winfgEngineTried_ = false; - std::atomic fgEngineKind_{0}; // 0 = lsfg, 1 = win-fg + std::atomic fgEngineKind_{0}; std::atomic fgModel_{4}; std::atomic fgPerfPreset_{1}; bool ensureWinFgEngine(); - // Capability gate for the SELECTED engine. win-fg's shaders need only a - // storage-capable swapchain format; the LSFG chain also needs the fp16 / - // memory-model feature set, which some otherwise capable GPUs lack. bool fgCapsOk() const; - // Sync objects are indexed per PRESENT, not per composite: each pending - // present needs its own image-available and render-finished semaphore. uint32_t syncSlot(uint32_t k) const { return currentFrame * kMaxPresentsPerFrame + k; } - // Destroy and rebuild every acquire/present semaphore. Called with the - // swapchain, so no stale pending signal can survive into the new one. void recreateSyncObjects(); uint32_t fgAcquireFailLog_ = 0; - // Measured PRESENTS per second - the rate that actually reaches the panel, - // counting generated frames. The pacer's own "loop rate" cannot serve this - // purpose: it is sampled once per SOURCE frame, so it always equals the - // guest rate and contains no evidence that generation happened at all. float fgPresentedRate_ = 0.0f; - // Measured SOURCE frames per second over the same window, for engines that - // do not measure it themselves (win-fg). float fgSourceRate_ = 0.0f; uint32_t fgSourceAccum_ = 0; uint32_t fgPresentAccum_ = 0; @@ -626,22 +489,10 @@ private: void trackPresentedRate(uint32_t presents); bool ensureLsfgEngine(); - // One command buffer per pending present: slot 0 carries the composite, - // the chain's shared passes and generated frame 0; each later generated - // frame and the real frame are recorded and submitted on their own, so a - // finished frame reaches the presentation engine without waiting for the - // rest of the chain. uint32_t cmdSlot(uint32_t k) const { return currentFrame * kMaxPresentsPerFrame + k; } - // Shared chain passes (the 24 shaders every generated frame depends on). void recordFrameGenProcess(VkCommandBuffer cb); - // Generated frame g: synthesise into a spare composite target and copy it - // into the swapchain image reserved for it. void recordFrameGenGeneration(VkCommandBuffer cb, uint32_t g); - // Chain cost: a timestamp pair per frame slot, start before the shared - // passes, end after the last generation's compute (before its copy, so a - // vblank wait on the swapchain image is not counted). Read back after the - // slot's fence wait, one frame later. VkQueryPool fgQueryPool_ = VK_NULL_HANDLE; bool fgTimestampsOk_ = false; float fgTimestampPeriodNs_ = 0.0f; @@ -654,22 +505,21 @@ private: void readFgQueryResult(); VkFormat offscreenFmt = VK_FORMAT_R8G8B8A8_UNORM; - VkRenderPass offscreenRenderPass = VK_NULL_HANDLE; // CLEAR -> SHADER_READ_ONLY + VkRenderPass offscreenRenderPass = VK_NULL_HANDLE; VkPipelineLayout postPipeLayout = VK_NULL_HANDLE; VkPipeline sgsrPipeline = VK_NULL_HANDLE; - VkPipeline nisPipeline = VK_NULL_HANDLE; // NVIDIA Image Scaling (mode 7) - VkPipeline sgsrQualityPipeline = VK_NULL_HANDLE; // SGSR 1 edge-direction (mode 8) + VkPipeline nisPipeline = VK_NULL_HANDLE; + VkPipeline sgsrQualityPipeline = VK_NULL_HANDLE; VkPipeline easuPipeline = VK_NULL_HANDLE; VkPipeline rcasPipeline = VK_NULL_HANDLE; VkPipeline downscalePipeline = VK_NULL_HANDLE; - // CAS/HDR can be either a non-final pass (writes an fx target via - // offscreenRenderPass) or the final pass (writes the swapchain via renderPass); - // a pipeline is render-pass-specific, so keep one variant of each. - VkPipeline casPipelineOff = VK_NULL_HANDLE; // -> fx target (offscreenRenderPass) - VkPipeline casPipelineSwap = VK_NULL_HANDLE; // -> swapchain (renderPass) + + + + VkPipeline casPipelineOff = VK_NULL_HANDLE; + VkPipeline casPipelineSwap = VK_NULL_HANDLE; VkPipeline hdrPipelineOff = VK_NULL_HANDLE; VkPipeline hdrPipelineSwap = VK_NULL_HANDLE; - // Phase 2 effects: same Off (-> fx target) / Swap (-> swapchain) variant pair. VkPipeline fxaaPipelineOff = VK_NULL_HANDLE; VkPipeline fxaaPipelineSwap = VK_NULL_HANDLE; VkPipeline toonPipelineOff = VK_NULL_HANDLE; @@ -680,10 +530,8 @@ private: VkPipeline ntscPipelineSwap = VK_NULL_HANDLE; VkPipeline crtPipelineOff = VK_NULL_HANDLE; VkPipeline crtPipelineSwap = VK_NULL_HANDLE; - // Debanding is always the LAST effect (terminal) -> only a swapchain variant. VkPipeline debandPipelineSwap = VK_NULL_HANDLE; - // offscreen composite target @ game/container resolution VkImage offscreenImg = VK_NULL_HANDLE; VkDeviceMemory offscreenMem = VK_NULL_HANDLE; VkImageView offscreenView = VK_NULL_HANDLE; @@ -691,7 +539,6 @@ private: VkDescriptorSet offscreenDS = VK_NULL_HANDLE; int offscreenW = 0, offscreenH = 0; - // FSR intermediate (EASU output) @ upscale output resolution VkImage midImg = VK_NULL_HANDLE; VkDeviceMemory midMem = VK_NULL_HANDLE; VkImageView midView = VK_NULL_HANDLE; @@ -699,8 +546,6 @@ private: VkDescriptorSet midDS = VK_NULL_HANDLE; int midW = 0, midH = 0; - // Effect-chain intermediates @ swapchain resolution. fx1 holds the scaled (or - // composited) image fed into CAS/HDR; fx2 ping-pongs when both effects run. VkImage fx1Img = VK_NULL_HANDLE; VkDeviceMemory fx1Mem = VK_NULL_HANDLE; VkImageView fx1View = VK_NULL_HANDLE; @@ -715,21 +560,18 @@ private: VkDescriptorSet fx2DS = VK_NULL_HANDLE; int fx2W = 0, fx2H = 0; - // Per-frame upscale plan, computed in renderFrame, consumed by recordCmdBuf. - // upFrame.mode reuses the upscalerMode enum (3=sgsr,4=fsr,5=fsr_fit,6=sharpen,7=nis,8=sgsr_quality) - // plus an internal sentinel (UPMODE_DOWNSCALE) for the supersampling path. struct UpscaleFrame { bool active = false; int mode = 0; int outX = 0, outY = 0, outW = 0, outH = 0; - bool cas = false; // run CAS this frame (snapshot of casEnabled) - bool hdr = false; // run HDR this frame (snapshot of hdrEnabled) - bool fxaa = false; // snapshot of fxaaEnabled - bool toon = false; // snapshot of toonEnabled - bool color = false; // snapshot of colorEnabled (non-neutral grade) - bool ntsc = false; // snapshot of ntscEnabled - bool crt = false; // snapshot of crtEnabled - bool deband = false;// snapshot of debandEnabled (terminal dither) + bool cas = false; + bool hdr = false; + bool fxaa = false; + bool toon = false; + bool color = false; + bool ntsc = false; + bool crt = false; + bool deband = false; SgsrPushConstants sgsrPC{}; NisPushConstants nisPC{}; EasuPushConstants easuPC{}; diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_alpha.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_alpha.cpp index 04a37b720b..52b5c76c60 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_alpha.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_alpha.cpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_alpha.hpp" #include "lsfg_shaders.hpp" diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_alpha.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_alpha.hpp index 9a4e15ddf7..55db1c754c 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_alpha.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_alpha.hpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_beta.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_beta.cpp index d9413e647d..cc9746e117 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_beta.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_beta.cpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_beta.hpp" #include "lsfg_shaders.hpp" diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_beta.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_beta.hpp index 7d259f9e28..a09efcb3be 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_beta.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_beta.hpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_chain.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_chain.cpp index 54acb1a0f7..121b16a680 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_chain.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_chain.cpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_chain.hpp" #include "lsfg_shaders.hpp" diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_chain.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_chain.hpp index 4bab527fd7..f0611dac04 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_chain.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_chain.hpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_common.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_common.cpp index c932754864..5b61acd4cb 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_common.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_common.cpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_common.hpp" #include "lsfg_shaders.hpp" diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_common.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_common.hpp index c5ab3e0adb..3abe5cfb93 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_common.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_common.hpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_delta.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_delta.cpp index cf9b31bfa0..d09f31d205 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_delta.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_delta.cpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_delta.hpp" #include "lsfg_shaders.hpp" diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_delta.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_delta.hpp index e40ffe7bd6..45e3b4adc8 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_delta.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_delta.hpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_dll.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_dll.cpp index 0af479be81..3a37f032a6 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_dll.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_dll.cpp @@ -1,9 +1,5 @@ -// See lsfg_dll.h. PE resource walk + on-device SPIR-V cache for the Lossless -// Scaling frame-generation chain. -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk (PancakeTAS). Ported to WinNative (lsfg_dll.c) and DroidDeck -// by @maxjivi05. GPL-3.0-or-later. +// LSFG from Camille LaVey / the Eden Emulator Project, following upstream lsfg-vk (PancakeTAS). +// Ported to WinNative and DroidDeck by @maxjivi05. GPL-3.0-or-later. #include "lsfg_dll.h" #include "lsfg_dxbc.h" @@ -25,9 +21,9 @@ namespace lsfg { namespace { -// ---- PE constants --------------------------------------------------------- -constexpr uint16_t kDosMagic = 0x5A4Du; // "MZ" -constexpr uint32_t kPeSignature = 0x00004550u; // "PE\0\0" + +constexpr uint16_t kDosMagic = 0x5A4Du; +constexpr uint32_t kPeSignature = 0x00004550u; constexpr uint16_t kPe32Magic = 0x010Bu; constexpr uint16_t kPe32PlusMagic = 0x020Bu; @@ -47,7 +43,6 @@ constexpr size_t kResourceEntrySize = 8u; constexpr uint32_t kResourceSubdirectoryBit = 0x80000000u; constexpr uint32_t kResourceTypeRcData = 10u; -// ---- SPIR-V constants ----------------------------------------------------- constexpr uint32_t kSpirvMagic = 0x07230203u; constexpr size_t kSpirvHeaderWords = 5u; constexpr uint32_t kSpirvWordCountShift = 16u; @@ -64,7 +59,7 @@ constexpr uint32_t kVariantFp32Offset = 98u; constexpr uint32_t kMaxResourceId = 512u; constexpr size_t kMaxSpirvWords = 16u * 1024u * 1024u; -constexpr uint32_t kCacheMagic = 0x4C534642u; // "BFSL" little-endian +constexpr uint32_t kCacheMagic = 0x4C534642u; constexpr uint32_t kCacheVersion = 1u; struct CacheHeader { @@ -83,7 +78,6 @@ struct PeSection { uint32_t rawSize = 0; }; -// Read-only mapping of the DLL. Closes itself; the DLL is never executed. class PeImage { public: ~PeImage() { close(); } @@ -168,7 +162,6 @@ private: std::vector sections_; }; -// RCDATA id -> blob, for the ids we care about. struct ResourceTable { const uint8_t* data[kMaxResourceId] = {}; uint32_t size[kMaxResourceId] = {}; @@ -217,7 +210,6 @@ bool resourceReadLeaf(const PeImage& img, size_t leafOffset, return true; } -// Walk type -> name -> language and keep the first language of every RCDATA id. bool collectRcData(const PeImage& img, size_t resourceBase, ResourceTable& out) { size_t typeTotal = 0; if (!resourceEntryCount(img, resourceBase, typeTotal)) return false; @@ -256,7 +248,7 @@ bool collectRcData(const PeImage& img, size_t resourceBase, ResourceTable& out) if (!resourceReadLeaf(img, resourceBase + langOffset, blob, blobSize)) continue; out.data[nameId] = blob; out.size[nameId] = blobSize; - break; // first language wins + break; } } } @@ -289,7 +281,6 @@ DllStatus parseResources(PeImage& img, ResourceTable& table) { return DllStatus::Ok; } -// ---- SPIR-V adoption (precompiled-variant path) --------------------------- bool isSpirvModule(const uint8_t* blob, uint32_t size) { if (!blob || size < kSpirvHeaderWords * sizeof(uint32_t)) return false; @@ -315,9 +306,6 @@ uint32_t lookupDescriptorSet(const std::vector& w, uint32_t targetId) return 0; } -// Precompiled blobs are renumbered into set/binding order - that is the -// convention they were built with. The DXBC path uses encounter order instead -// (see lsfg_dxbc), which is what DXVK's output pairs with. Do not merge them. bool renumberBindingsSetOrder(std::vector& w) { struct Slot { uint32_t set; uint32_t binding; size_t literalOffset; }; std::vector slots; @@ -399,8 +387,6 @@ bool writeCache(const std::string& cachePath, const CacheHeader& header, const M if (ok) ok = fsync(fileno(f)) == 0; fclose(f); - // Temp file + rename, so a failed or interrupted build can never leave a - // half-written cache that would later be loaded as if it were complete. if (!ok || rename(tempPath.c_str(), cachePath.c_str()) != 0) { unlink(tempPath.c_str()); return false; @@ -416,9 +402,8 @@ bool readCacheHeader(const std::string& cachePath, CacheHeader& out) { return ok && out.magic == kCacheMagic && out.version == kCacheVersion; } -} // namespace +} -// ---- public API ----------------------------------------------------------- const std::vector& shaderIds() { static const std::vector ids = [] { @@ -584,7 +569,6 @@ DllStatus loadModules(const std::string& cachePath, ModuleSet& outSet) { return status; } -// ---- SPIR-V version lowering (Vulkan 1.1/1.2 compat) ---------------------- namespace { @@ -593,14 +577,14 @@ constexpr uint32_t kSpirvOpExtInstImport= 11u; constexpr uint32_t kSpirvOpMemoryModel = 14u; constexpr uint32_t kSpirvOpCapability = 17u; -// Capabilities that are core in the version the translator emits but not in -// the versions we lower to. -constexpr uint32_t kCapVulkanMemoryModel = 5345u; // core from 1.5 -constexpr uint32_t kCapVulkanMemoryModelDeviceScope = 5346u; // core from 1.5 -constexpr uint32_t kCapDemoteToHelperInvocation = 5379u; // core from 1.6 + + +constexpr uint32_t kCapVulkanMemoryModel = 5345u; +constexpr uint32_t kCapVulkanMemoryModelDeviceScope = 5346u; +constexpr uint32_t kCapDemoteToHelperInvocation = 5379u; std::vector encodeOpExtension(const char* name) { - const size_t len = strlen(name) + 1; // incl. NUL + const size_t len = strlen(name) + 1; const size_t strWords = (len + 3) / 4; std::vector ins(1 + strWords, 0u); ins[0] = ((uint32_t)(1 + strWords) << kSpirvWordCountShift) | kSpirvOpExtension; @@ -624,17 +608,13 @@ bool hasOpExtension(const std::vector& w, const char* name) { return false; } -} // namespace +} bool downgradeSpirv(std::vector& w, uint32_t targetVersion) { if (w.size() < kSpirvHeaderWords || w[0] != kSpirvMagic) return false; if (targetVersion < kSpirv14) return false; - if (w[1] <= targetVersion) return true; // already low enough + if (w[1] <= targetVersion) return true; - // Walk the preamble first and only touch the module once it is known to - // be lowerable: note which extension-gated capabilities are declared and - // where the capability block ends (OpExtension must follow every - // OpCapability and precede OpExtInstImport / OpMemoryModel). bool needMemoryModel = false; size_t insertAt = kSpirvHeaderWords; size_t off = kSpirvHeaderWords; @@ -645,9 +625,6 @@ bool downgradeSpirv(std::vector& w, uint32_t targetVersion) { if (opcode == kSpirvOpCapability && length >= 2) { const uint32_t cap = w[off + 1]; if (cap == kCapVulkanMemoryModel || cap == kCapVulkanMemoryModelDeviceScope) needMemoryModel = true; - // Core only in 1.6, and VK_EXT_shader_demote_to_helper_invocation - // is never enabled on the compat path: refuse rather than hand the - // driver a module that is not legal at the lowered version. if (cap == kCapDemoteToHelperInvocation) return false; insertAt = off + length; } else if (opcode == kSpirvOpExtension) { @@ -659,7 +636,6 @@ bool downgradeSpirv(std::vector& w, uint32_t targetVersion) { off += length; } - // 1.5 has the memory model as core; only 1.4 needs it declared. if (targetVersion < kSpirv15 && needMemoryModel && !hasOpExtension(w, "SPV_KHR_vulkan_memory_model")) { const auto e = encodeOpExtension("SPV_KHR_vulkan_memory_model"); @@ -669,4 +645,4 @@ bool downgradeSpirv(std::vector& w, uint32_t targetVersion) { return true; } -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_dll.h b/app/src/main/cpp/framegen/lsfg/lsfg_dll.h index 74d6ca83d3..a20a6c6311 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_dll.h +++ b/app/src/main/cpp/framegen/lsfg/lsfg_dll.h @@ -1,35 +1,7 @@ +// LSFG from Camille LaVey / the Eden Emulator Project, following upstream lsfg-vk (PancakeTAS). +// Ported to WinNative and DroidDeck by @maxjivi05. GPL-3.0-or-later. + #pragma once -// ============================================================================ -// lsfg_dll - extract the Lossless Scaling frame-generation shader chain from -// the user's own Lossless.dll, and cache it on device as SPIR-V. -// -// The 25 compute shaders that make up LSFG 3.1 are NOT redistributable. They -// ship as RCDATA resources inside Lossless.dll from the user's own paid copy -// of Lossless Scaling (Steam app 993090). Every implementation - upstream -// lsfg-vk, LSFG-Android, eden, WinNative - requires the user to supply their -// own DLL and extracts the resources on device. DroidDeck does the same, and -// bundles nothing. -// -// The DLL is mmap'd READ-ONLY and parsed as data. It is never loaded as a -// library and never executed. -// -// Resource layout, measured against real installs: -// * The base chain lives at RCDATA ids 255, 256 and 280-302 (25 modules), -// and is DXBC. It has always been DXBC. -// * Lossless Scaling MAY additionally carry precompiled SPIR-V copies at -// base+49 (native fp16) and base+98 (native fp32). No build currently -// downloadable from Steam carries them - public buildId 19655272 was -// measured with zero SPIR-V anywhere in the 311 MB install - so the DXBC -// path is the normal path and the translator is not optional. The SPIR-V -// path is kept because it costs nothing and a future build may ship them. -// -// Both producers fill the same shader-id -> SPIR-V words map, so everything -// downstream of this file is source-agnostic. -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk (PancakeTAS). Ported to WinNative (lsfg_dll.c) and DroidDeck -// by @maxjivi05. GPL-3.0-or-later. -// ============================================================================ #include #include @@ -39,44 +11,37 @@ namespace lsfg { enum class DllStatus { Ok = 0, - NotInstalled, // no such file / cannot open - UnreadableFile, // opens but cannot be mapped or is empty + NotInstalled, + UnreadableFile, NotPortableExecutable, - MissingShaders, // parses, but the base chain is not all there - TranslationFailed, // a shader failed DXBC->SPIR-V or SPIR-V adoption - CacheUnusable // cache could not be written or read back + MissingShaders, + TranslationFailed, + CacheUnusable }; -// SPIR-V version words. The translator emits 1.6; a Vulkan 1.1 device takes -// 1.4 (via VK_KHR_spirv_1_4) and a 1.2 device 1.5. One definition for the -// probe, the engine and the shader loader. constexpr uint32_t kSpirv14 = 0x00010400u; constexpr uint32_t kSpirv15 = 0x00010500u; constexpr uint32_t kSpirv16 = 0x00010600u; enum class Variant { None = 0, - SpirvFp16, // precompiled fp16 blobs at base+49 - SpirvFp32, // precompiled fp32 blobs at base+98 - DxbcTranslated // base chain, translated on device (the normal case) + SpirvFp16, + SpirvFp32, + DxbcTranslated }; -// The 25 shader ids that make up the chain. constexpr uint32_t kShaderMipmaps = 255u; constexpr uint32_t kShaderGenerate = 256u; constexpr uint32_t kShaderChainFirst= 280u; constexpr uint32_t kShaderChainLast = 302u; constexpr uint32_t kShaderCount = 25u; -// Upstream spelling for the two ids the ported chain files refer to by name. -// Kept so those files stay byte-close to their upstream form; these alias the -// constants above rather than being a second source of truth. constexpr uint32_t LSFG_SHADER_MIPMAPS = kShaderMipmaps; constexpr uint32_t LSFG_SHADER_GENERATE = kShaderGenerate; struct Module { uint32_t id = 0; - std::vector words; // SPIR-V + std::vector words; }; struct ModuleSet { @@ -87,41 +52,19 @@ struct ModuleSet { bool complete() const; }; -// The canonical shader-id list, in dispatch-independent order. const std::vector& shaderIds(); const char* statusName(DllStatus s); const char* variantName(Variant v); -// Does this file look like a usable Lossless.dll? Checks the base chain only, -// so a DLL without the SPIR-V variants (i.e. every build on Steam today) is -// reported as valid - the translator handles it. DllStatus validateDll(const std::string& dllPath); -// Parse the DLL, produce all 25 SPIR-V modules, and write them to cachePath -// (via temp file + rename, so a failed build cannot leave a half-written -// cache behind). Records which producer ran in the cache header. DllStatus buildCache(const std::string& dllPath, const std::string& cachePath, bool preferFp16); -// Load a previously built cache. DllStatus loadModules(const std::string& cachePath, ModuleSet& outSet); -// Which producer built an existing cache, without loading the modules. DllStatus cacheVariant(const std::string& cachePath, Variant& outVariant); -// Experimental Vulkan 1.1 / 1.2 compat: lower a DXBC-translated module's -// declared SPIR-V version to `targetVersion` (kSpirv14 or kSpirv15). Below 1.5 -// the Vulkan memory model is not core, so SPV_KHR_vulkan_memory_model is -// declared for it (the device side enables VK_KHR_vulkan_memory_model). The -// cache is built without a device in hand, always at the translator's native -// 1.6, so this runs at load time against whatever the device can take. A -// module already at or below the target is left untouched. Returns false, -// leaving the module untouched, for a malformed module, a target below 1.4, or -// a module declaring DemoteToHelperInvocation: that capability is core only in -// 1.6 and its extension is never enabled on the compat path, so such a module -// cannot be made legal here (DXVK emits it for pixel-shader discard only, so -// the 25 compute shaders never carry it). Whether the device then accepts the -// result is vkCreateShaderModule's / vkCreateComputePipelines' verdict. bool downgradeSpirv(std::vector& words, uint32_t targetVersion); -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_dxbc.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_dxbc.cpp index c8084119fc..01f904e9d2 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_dxbc.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_dxbc.cpp @@ -1,10 +1,5 @@ -// See lsfg_dxbc.h. DXBC -> SPIR-V via DXVK's vendored translator. -// -// Follows upstream lsfg-vk's src/extract/trans.cpp, including its -// encounter-order binding renumber. Ported to WinNative (lsfg_dxbc.cpp) and -// DroidDeck by @maxjivi05 from the work of Camille LaVey / the Eden Emulator -// Project (GPL-3.0-or-later); the translator itself is DXVK's, zlib licensed, -// vendored under cpp/thirdparty/dxbc. +// Ported to WinNative and DroidDeck by @maxjivi05 from Camille LaVey / the Eden Emulator Project (GPL-3.0-or-later). +// DXVK's translator is zlib licensed; vendored under cpp/thirdparty/dxbc. #include "lsfg_dxbc.h" @@ -21,12 +16,12 @@ namespace { struct BindingSlot { uint32_t bindingIndex = 0; - uint32_t bindingOffset = 0; // word offset of the Binding literal + uint32_t bindingOffset = 0; uint32_t setIndex = 0; uint32_t setOffset = 0; }; -} // namespace +} bool translateDxbc(const uint8_t* bytecode, uint32_t size, std::vector& outWords) { outWords.clear(); @@ -38,9 +33,6 @@ bool translateDxbc(const uint8_t* bytecode, uint32_t size, std::vector const dxvk::DxbcModuleInfo info{}; auto code = module.compile(info, "CS"); - // Collect the descriptor decorations in the order the Binding - // decorations appear. Everything before the first OpFunction is the - // decoration block, so the scan stops there. std::vector slotsByVarId; std::vector varIdsInOrder; for (auto ins : code) { @@ -60,7 +52,6 @@ bool translateDxbc(const uint8_t* bytecode, uint32_t size, std::vector if (ins.opCode() == spv::OpFunction) break; } - // Renumber to a dense 0..n range, in encounter order. uint32_t next = 0; for (const uint32_t varId : varIdsInOrder) { const BindingSlot& slot = slotsByVarId[varId]; @@ -75,11 +66,9 @@ bool translateDxbc(const uint8_t* bytecode, uint32_t size, std::vector std::memcpy(outWords.data(), code.data(), byteSize); return true; } catch (...) { - // DXVK's compiler signals malformed bytecode by throwing. A bad - // resource must degrade to "this DLL is unusable", never to a crash. outWords.clear(); return false; } } -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_dxbc.h b/app/src/main/cpp/framegen/lsfg/lsfg_dxbc.h index 3fa643728d..17ba1876d4 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_dxbc.h +++ b/app/src/main/cpp/framegen/lsfg/lsfg_dxbc.h @@ -1,39 +1,11 @@ #pragma once -// ============================================================================ -// lsfg_dxbc - DXBC -> SPIR-V for the Lossless Scaling shader chain. -// -// Why this exists at all: the base chain inside Lossless.dll is DXBC, and has -// always been DXBC. Lossless Scaling 3.2.2's release note ("Added shaders -// intended for use by the lsfg-vk project") describes precompiled SPIR-V -// copies at RCDATA base+49 / base+98 - but no build downloadable from Steam -// carries them. Measured against the current public build (buildId 19655272, -// 2025-08-19; linux_testing byte-identical on depot 993091): the whole 311 MB -// install contains zero occurrences of the SPIR-V magic word, and the DLL's -// 202 RCDATA entries are all DXBC. -// -// So a translator is required, not optional. Upstream lsfg-vk reaches the same -// conclusion and links DXVK's `dxbc` in src/extract/trans.cpp; we vendor the -// same subset (zlib licence) under cpp/thirdparty/dxbc and follow its -// trans.cpp step for step. -// -// The binding renumber here is ENCOUNTER ORDER - the order in which Binding -// decorations appear in DXVK's output - which is what DXVK's own layout pairs -// with. The precompiled-SPIR-V path in lsfg_dll.cpp uses a set/binding sort -// instead, because those blobs were built with that convention. The two must -// not be merged. -// ============================================================================ +// DXVK's dxbc subset is zlib licensed; vendored under cpp/thirdparty/dxbc. #include #include namespace lsfg { -// Translate one DXBC compute shader to SPIR-V, renumbering descriptor bindings -// into a dense 0..n range in encounter order. Returns false (leaving outWords -// empty) on any malformed input - DXVK's compiler throws, and everything is -// caught here. -// Emits DXVK's native SPIR-V 1.6; lowering for a Vulkan 1.1/1.2 device happens -// at load time (lsfg_dll.h downgradeSpirv). bool translateDxbc(const uint8_t* bytecode, uint32_t size, std::vector& outWords); -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_engine.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_engine.cpp index ba9e8a021e..fe0ea3ebef 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_engine.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_engine.cpp @@ -1,8 +1,3 @@ -// See lsfg_engine.h. -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative (vkr_lsfg.cpp) and DroidDeck by -// @maxjivi05, where it runs on gamescope's output in the compositor. #include "lsfg_engine.h" @@ -21,9 +16,6 @@ namespace lsfg { namespace { -// The chain needs two real frames in its history before anything it produces -// is meaningful, and we require the plan to stay warm for a couple of frames -// so a single settled sample cannot start generation from garbage. constexpr uint64_t kRequiredFrames = 2; constexpr uint32_t kRecurrenceFrames = 2; constexpr uint64_t kTelemetryInterval = 120; @@ -50,8 +42,6 @@ VkImageMemoryBarrier makeTransition(VkImage image, VkAccessFlags srcAccess, return b; } -// Copy the just-composited frame into the chain's input ring. `source` is the -// composite target, which the composite render pass leaves in GENERAL. void copyPresentedFrame(VkCommandBuffer cmd, VkImage source, LsfgImage& destination, VkExtent2D extent) { const VkImageMemoryBarrier before[] = { @@ -88,7 +78,7 @@ void copyPresentedFrame(VkCommandBuffer cmd, VkImage source, LsfgImage& destinat destination.SetLayout(VK_IMAGE_LAYOUT_GENERAL); } -} // namespace +} Engine::Engine() = default; @@ -142,9 +132,6 @@ void Engine::setGuestExtent(uint32_t width, uint32_t height) { peakGuestExtent_.height = std::max(peakGuestExtent_.height, height); } -// The flow pyramid is the expensive part, so its resolution is scaled relative -// to the largest guest surface seen: a game running well below panel -// resolution does not need a panel-resolution flow field. float Engine::effectiveFlowScale(uint32_t width) const { if (width == 0 || peakGuestExtent_.width == 0) return flowScale_; const float ratio = (float)peakGuestExtent_.width / (float)width; @@ -171,8 +158,6 @@ bool Engine::prepare(uint32_t width, uint32_t height, VkFormat format) { chain_ = std::make_unique(device_, *shaders_, VkExtent2D{width, height}, format, scale); if (!chain_->Valid()) { - // A device that cannot build the chain reports unsupported once and - // stops trying, rather than thrashing allocations every frame. LSFG_LOGW("chain build failed at %ux%u; frame generation unavailable", width, height); chain_.reset(); unavailable_ = true; @@ -204,17 +189,9 @@ uint32_t Engine::plan(uint32_t capacity, uint64_t sourceFrames) { plan_ = pacer_.Plan(std::min(capacity, kMaxGenerations), sourceFrames); - // The pacer says how many frames FIT in the panel's budget. The governor - // says how many this device can actually afford right now - on a handheld - // the chain competes with the game for one GPU, so an extra generation has - // to prove it improves total output without collapsing the real frame rate. if (governorEnabled_) { const LsfgPacerStats s = pacer_.Stats(); governor_.configure((uint32_t)std::min(pacer_.MaxGenerations(), kMaxGenerations)); - // presentedRate_, NOT the pacer's loop rate. The pacer samples its loop - // once per SOURCE frame, so its "loop rate" is the guest rate by - // construction and can never show that generation added anything - the - // governor could not accept a probe on any hardware. plan_.generations = governor_.cap((uint32_t)plan_.generations, s.source_rate, presentedRate_); } @@ -223,12 +200,6 @@ uint32_t Engine::plan(uint32_t capacity, uint64_t sourceFrames) { warmStreak_ = warm_ ? warmStreak_ + 1 : 0; generating_ = warm_ && warmStreak_ >= kRecurrenceFrames && plan_.generations > 0; - // The ring is only seeded while generating, so the first frame after any - // gap - arming, or a pacer discontinuity after a hitch - would interpolate - // between this frame and whatever the other slot held when generation last - // stopped. That is a visible warp, and it happens every time the engine - // starts. Spend this frame filling the ring instead and generate from the - // next one, when both slots are genuinely consecutive. primeHistory_ = false; if (generating_ && !historyFresh()) { primeHistory_ = true; @@ -265,11 +236,6 @@ void Engine::process(VkCommandBuffer cmd, VkImage source, uint32_t width, uint32 lastCount_ = count; lastGenerations_ = generations; - // Seeding the input ring is a full-resolution image copy every frame, so it - // is NOT free at 100 fps - it was costing real frame rate while producing - // nothing. Copy only when generating, on the one priming frame that - // precedes generation, or while the governor is warming up towards a - // probe - so the ring is populated by the time it is needed. const bool needHistory = generations > 0 || primeHistory_ || followEveryFrame() || (governorEnabled_ && governor_.wantsHistory()); if (needHistory) { @@ -278,13 +244,6 @@ void Engine::process(VkCommandBuffer cmd, VkImage source, uint32_t width, uint32 haveCopied_ = true; } - // The SHARED chain is 24 of the 25 shaders - the whole flow pyramid - and - // only `generate` runs per generated frame. Running it while producing - // nothing spends almost the entire cost of frame generation for no frames - // at all, every frame. That is what pinned the GPU at 100% on device - // regardless of the game's own settings, and it fed straight back into the - // governor: the chain made the source rate collapse, the governor saw the - // collapse and refused to generate, and refusing did not stop the chain. if (warm_ && (generations > 0 || followEveryFrame())) chain_->DispatchShared(cmd, count); } @@ -318,4 +277,4 @@ void Engine::reset() { plan_ = {}; } -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_engine.h b/app/src/main/cpp/framegen/lsfg/lsfg_engine.h index c8a5028d0e..b04726425c 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_engine.h +++ b/app/src/main/cpp/framegen/lsfg/lsfg_engine.h @@ -1,25 +1,4 @@ #pragma once -// ============================================================================ -// lsfg_engine - the compositor's handle on native LSFG frame generation. -// -// Owns the shader modules, the interpolation chain and the pacer, and exposes -// the small contract the render loop needs: -// -// prepare(w, h, format) build/rebuild the chain for this size -// plan(capacity, sourceFrames) how many frames to generate this time -// process(cmd, source, w, h, gens) take frame N in, run the shared chain -// generateInto(cmd, g, i, img, view) synthesise generated frame g -// -// Ordering matters and is not obvious: interpolation produces frames that -// belong BETWEEN N-1 and N, so the generated frames are presented FIRST and -// the real frame N is held back one slot. That one output interval is the -// unavoidable cost of interpolating rather than extrapolating; no placement of -// this code changes it. -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative (vkr_lsfg.cpp) and DroidDeck by -// @maxjivi05, where it runs on gamescope's output in the compositor. -// ============================================================================ #include #include @@ -28,7 +7,7 @@ #include #include "lsfg_common.hpp" -#include "lsfg_dll.h" // kSpirv16 +#include "lsfg_dll.h" #include "lsfg_governor.h" #include "lsfg_pacer.hpp" @@ -37,27 +16,16 @@ namespace lsfg { class LsfgShaders; class LsfgChain; -// Hard ceiling on generated frames per source frame (2x..4x -> 1..3). constexpr uint32_t kMaxGenerations = 3; class Engine { public: - // Both the constructor and destructor are out-of-line ON PURPOSE. The - // shader set and the chain are held by unique_ptr to forward-declared - // types, and an inline constructor would make the compiler emit the - // exception-cleanup path for those members at every construction site - - // which needs the complete types there. Keeping both here confines that to - // lsfg_engine.cpp, where the types are complete. Engine(); ~Engine(); Engine(const Engine&) = delete; Engine& operator=(const Engine&) = delete; - // Build the shader modules from a cache produced by lsfg_dll::buildCache. - // Returns false if the cache does not yield all 25 modules. `spirvTarget` - // is the highest SPIR-V version the device accepts (lsfg_probe.h); the - // cached 1.6 modules are lowered to it when it is below that. bool init(VkDevice device, VkPhysicalDevice physicalDevice, const std::string& cachePath, uint32_t spirvTarget = kSpirv16); @@ -71,28 +39,18 @@ public: bool needsRebuild(uint32_t width, uint32_t height, VkFormat format) const; bool prepare(uint32_t width, uint32_t height, VkFormat format); - // How many frames to generate for this source frame. Returns 0 until the - // history slots are valid and the rates have settled, so the first frames - // after a start or a resize are never interpolated from garbage. uint32_t plan(uint32_t capacity, uint64_t sourceFrames); - // Take the just-composited frame as LSFG input and run the shared part of - // the chain (everything except `generate`). `source` must be in GENERAL. void process(VkCommandBuffer cmd, VkImage source, uint32_t width, uint32_t height, uint32_t generations); - // Synthesise generated frame `generation` into the given storage image. void generateInto(VkCommandBuffer cmd, uint32_t generation, uint32_t targetIndex, VkImage targetImage, VkImageView targetView, uint32_t width, uint32_t height); - // What the probe governor currently trusts, and the latest thermal - // reading (-1 = no signal). Surfaced for the HUD and diagnostics. uint32_t acceptedGenerations() const { return governor_.accepted(); } int thermalStatus() const { return governor_.thermalStatus(); } float sourceRate() const; - // The rate that actually reaches the panel, generated frames included. - // Supplied by the renderer, which is the only thing that counts presents. float loopRate() const { return presentedRate_; } void setPresentedRate(float fps) { presentedRate_ = fps; } @@ -102,16 +60,8 @@ public: private: float effectiveFlowScale(uint32_t width) const; - // A generated frame is a blend of the last two REAL frames, so the input - // ring - which is two images deep - only holds usable history when the - // other slot was filled by the frame immediately before this one. It is - // not, every time generation resumes after a pause: the ring is seeded - // only while generating, so the slot still carries whatever was there when - // generation last stopped. bool historyFresh() const { return haveCopied_ && lastCopiedCount_ + 1 == frameCount_; } - // With a target rate the pacer plans 0..3 generations frame by frame, so the ring and the - // shared chain have to follow every frame it keeps warm, not just the ones that generate. bool followEveryFrame() const { return warm_ && pacer_.Config().target_rate != 0; } Device device_{}; @@ -120,12 +70,6 @@ private: std::unique_ptr chain_; LsfgPacer pacer_; ProbeGovernor governor_; - // The governor is OFF by default: the device's own thermal management is - // the authority, and a probe loop that can veto the user's setting is not - // wanted here. The multiplier is then what was asked for, still clamped by - // what the panel can show. Kept behind a flag rather than deleted because - // the probe/backoff logic is the right answer for a device WITHOUT decent - // native throttling, and this is the only thing that would have to change. bool governorEnabled_ = false; LsfgPlan plan_{}; @@ -151,4 +95,4 @@ private: bool unavailable_{}; }; -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_gamma.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_gamma.cpp index 574382ed70..83d117cb3c 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_gamma.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_gamma.cpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_gamma.hpp" #include "lsfg_shaders.hpp" diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_gamma.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_gamma.hpp index d1cd384862..c3dcb38481 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_gamma.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_gamma.hpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_generate.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_generate.cpp index 7be96561c5..176208376b 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_generate.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_generate.cpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_generate.hpp" #include "lsfg_dll.h" diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_generate.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_generate.hpp index 0612b74227..716650da40 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_generate.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_generate.hpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_governor.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_governor.cpp index 828b5be6bf..11de0eb8a7 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_governor.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_governor.cpp @@ -1,4 +1,3 @@ -// See lsfg_governor.h. #include "lsfg_governor.h" @@ -12,13 +11,10 @@ namespace lsfg { namespace { -// A probe has to run long enough to survive a single unlucky frame, and the -// baseline long enough to be a fair comparison. constexpr float kBaselineSeconds = 2.0f; constexpr float kProbeSeconds = 2.0f; constexpr uint32_t kMinSamples = 30; -// Keep the extra generation only if it actually paid off. constexpr float kOutputGainRequired = 1.15f; constexpr float kSourceFloor = 0.70f; @@ -28,20 +24,20 @@ constexpr uint32_t kBackoffSteps = 4; constexpr float kThermalPollSeconds = 2.0f; constexpr float kThermalDecaySeconds = 1.0f; -// ADEVICE_THERMAL_STATUS_* from , which is API 30. Resolved -// by dlsym so the build keeps working below that and on devices that do not -// ship the service; -1 simply means "no thermal signal", never "hot". -// Android reports a STATUS, not a temperature - NONE 0, LIGHT 1, MODERATE 2, -// SEVERE 3, CRITICAL 4, EMERGENCY 5, SHUTDOWN 6 - so there is no degree value -// here to raise. The equivalent of "let it run hotter" is to act on a higher -// status, which is what these now do. -// -// A handheld under a real 3D load sits at SEVERE routinely; blocking there -// made the governor refuse on a device that was working exactly as intended. -// It now only stops GROWING at SEVERE and only gives frames back at CRITICAL, -// leaving the device's own thermal management as the authority. -constexpr int kThermalBlock = 4; // CRITICAL: give generations back -constexpr int kThermalNoGrowth = 3; // SEVERE: keep what we have, stop probing + + + + + + + + + + + + +constexpr int kThermalBlock = 4; +constexpr int kThermalNoGrowth = 3; using PFN_AThermal_acquireManager = void* (*)(); using PFN_AThermal_getCurrentThermalStatus = int (*)(void*); @@ -72,17 +68,12 @@ float phaseSeconds(std::chrono::steady_clock::time_point a, return std::chrono::duration(b - a).count(); } -} // namespace +} void ProbeGovernor::configure(uint32_t maxGenerations) { if (maxGenerations_ == maxGenerations) return; - // Raising the ceiling must NOT throw away what we already know works - - // going 2x -> 4x used to reset the accepted level to zero and restart the - // whole baseline/probe cycle, so a user raising the multiplier got FEWER - // frames. Only clamp down to a ceiling that has actually been lowered. maxGenerations_ = maxGenerations; if (accepted_ > maxGenerations_) accepted_ = maxGenerations_; - // Re-measure against the new ceiling, but keep the accepted level. phase_ = Phase::Baseline; havePhaseStart_ = false; sourceAccum_ = loopAccum_ = 0.0f; @@ -132,19 +123,8 @@ uint32_t ProbeGovernor::cap(uint32_t requested, float sourceRate, float loopRate if (!havePhaseStart_) enterBaseline(now); pollThermal(now); - // Thermal override: at SEVERE and above we stop asking for more and give - // generations back, but SLOWLY. - // - // This runs once per source frame - about forty times a second - so the - // previous version's unconditional accepted_-- was not "give one back", it - // was "slam to zero in three frames", and its unconditional enterBackoff() - // reset the backoff clock every single call, so the backoff could never - // expire and the governor could never measure or recover. One decay per - // second, and no churn at all once there is nothing left to give back. thermalBlocked_ = thermal_ >= kThermalBlock; if (thermal_ >= kThermalBlock) { - // Logged, sparingly. This is a REFUSAL TO EVEN MEASURE, and it was - // silent: on device it looked identical to "measured and declined". if ((refusalLog_++ % 600u) == 0u) GOV_LOGI("thermal status %d - not probing (accepted=%u)", thermal_, accepted_); const bool decayDue = !haveThermalDecay_ @@ -183,12 +163,10 @@ uint32_t ProbeGovernor::cap(uint32_t requested, float sourceRate, float loopRate sourceAccum_ = loopAccum_ = 0.0f; samples_ = 0; } else { - // Also previously silent. "Baseline completed but we did not - // probe" is a decision worth seeing in a log. if ((refusalLog_++ % 600u) == 0u) GOV_LOGI("not probing: accepted=%u max=%u requested=%u thermal=%d", accepted_, maxGenerations_, requested, thermal_); - enterBaseline(now); // nothing to try; measure again later + enterBaseline(now); } } break; @@ -226,12 +204,10 @@ uint32_t ProbeGovernor::cap(uint32_t requested, float sourceRate, float loopRate break; } - // While probing we allow one more than is currently accepted; otherwise the - // accepted level is the ceiling, and the pacer's own answer still applies. const uint32_t allowed = phase_ == Phase::Probing ? std::min(accepted_ + 1, maxGenerations_) : accepted_; return std::min(requested, allowed); } -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_governor.h b/app/src/main/cpp/framegen/lsfg/lsfg_governor.h index 0ae9b696de..3d04f4605f 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_governor.h +++ b/app/src/main/cpp/framegen/lsfg/lsfg_governor.h @@ -1,29 +1,4 @@ #pragma once -// ============================================================================ -// lsfg_governor - decides whether an extra generated frame is actually WORTH -// it on this device, right now. -// -// The ported pacer answers "how many frames fit in the panel's budget". That -// is necessary but not sufficient on a handheld: the LSFG chain competes with -// the game for the same GPU, so a naive fixed 3x on a GPU-bound title lowers -// the real frame rate by more than the generated frames add. The user sees a -// higher HUD number and a worse-looking game. -// -// So the multiplier is treated as a ceiling to earn, not a setting to obey. -// The governor starts at 0 generations, periodically PROBES one more, and -// keeps it only if the probe measurably paid off: -// -// * total output rate must improve by at least 1.15x, and -// * the real (source) frame rate must not collapse below 0.70x baseline. -// -// A failed probe reverts immediately and backs off 5s, 15s, 30s, then 60s, so -// a device that cannot afford another generation stops being asked. -// -// Thermals are the second input a phone needs and a desktop does not. -// Sustained frame generation is a thermal decision as much as a performance -// one, so the governor gives back generations as the device heats and refuses -// to probe while it is throttling. -// ============================================================================ #include #include @@ -34,22 +9,15 @@ class ProbeGovernor { public: void configure(uint32_t maxGenerations); - // Cap the pacer's answer. Called once per source frame with the measured - // rates; returns the number of generations actually permitted. uint32_t cap(uint32_t requested, float sourceRate, float loopRate); void reset(); uint32_t accepted() const { return accepted_; } bool probing() const { return phase_ == Phase::Probing; } - // Whether the chain's input ring needs to be kept fed. Seeding it is a - // full-resolution copy every frame, so it is skipped during the long idle - // stretches - a backoff, or a thermal block - and resumed during Baseline, - // which gives it a couple of seconds to fill before a probe can start. bool wantsHistory() const { return !thermalBlocked_ && phase_ != Phase::Backoff; } - // Latest thermal reading, 0 (none) .. 6 (shutdown); -1 when unavailable. int thermalStatus() const { return thermal_; } private: @@ -68,11 +36,9 @@ private: Clock::time_point phaseStart_{}; bool havePhaseStart_ = false; - // Rolling means over the current phase window. float sourceAccum_ = 0.0f, loopAccum_ = 0.0f; uint32_t samples_ = 0; - // What the accepted level achieves, measured during Baseline. float baselineSource_ = 0.0f, baselineLoop_ = 0.0f; bool haveBaseline_ = false; @@ -87,4 +53,4 @@ private: bool haveThermalPoll_ = false; }; -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_jni.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_jni.cpp index ab13096d6e..32dfd552d6 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_jni.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_jni.cpp @@ -1,8 +1,3 @@ -// JNI surface for native LSFG shader-cache management. -// -// Deliberately free of any renderer handle: extracting the shader chain from -// Lossless.dll and caching it is a slow, once-per-DLL operation that the app -// runs off the render thread, long before a game launches. #include "lsfg_dll.h" @@ -20,7 +15,7 @@ std::string toStdString(JNIEnv* env, jstring s) { return out; } -} // namespace +} extern "C" JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_gpu_LsfgNative_nativeValidateDll(JNIEnv* env, jclass, jstring dllPath) { diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_mipmaps.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_mipmaps.cpp index ef1e113181..2e42facd63 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_mipmaps.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_mipmaps.cpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_mipmaps.hpp" #include "lsfg_dll.h" diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_mipmaps.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_mipmaps.hpp index d301c26efe..e863b7491e 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_mipmaps.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_mipmaps.hpp @@ -3,10 +3,6 @@ // SPDX-FileCopyrightText: Copyright 2025 lsfg-vk // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_pacer.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_pacer.cpp index 8ddf453c2b..57307ee050 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_pacer.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_pacer.cpp @@ -1,9 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_pacer.hpp" @@ -21,7 +17,6 @@ constexpr float SOURCE_SMOOTHING = 0.15f; constexpr float SOURCE_STALE_SECONDS = 0.5f; constexpr float DISCONTINUITY_SECONDS = 0.25f; constexpr float HEADROOM_EPSILON = 0.02f; -// A target is aimed just under, so rounding never puts output past the panel's refresh rate. constexpr float TARGET_MARGIN = 0.1f; constexpr float CREDIT_EPSILON = 1.0e-4f; constexpr float SOURCE_ACCUM_FLOOR = 0.01f; @@ -121,17 +116,6 @@ LsfgPlan LsfgPacer::Plan(size_t capacity, uint64_t source_frames) { if (target_rate > 0.0f) target_rate -= TARGET_MARGIN; if (target_rate == 0.0f) { - // No explicit target rate: the multiplier is the multiplier, full stop. - // The panel-headroom clamp was here briefly and was removed at the - // user's decision; this is also upstream's behaviour on this branch. - // - // What that means above the panel's refresh rate, for the record: the - // display cannot show more frames than it refreshes, so under FIFO the - // surplus presents queue and the render thread waits on acquire. Nothing - // is displayed faster, and the compositor falls behind on guest - // deliveries instead. Below the refresh rate - every source at or under - // panel/4 - this branch behaves identically with or without the clamp. - // To restore it: limit = std::min(ceiling, HeadroomLimit()). output_credit = 0.0f; limit = ceiling; return LsfgPlan{limit, true}; diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_pacer.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_pacer.hpp index fe4a43ee56..5762ee47c6 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_pacer.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_pacer.hpp @@ -1,9 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_probe.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_probe.cpp index 8232834193..36ed36cedf 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_probe.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_probe.cpp @@ -1,4 +1,3 @@ -// See lsfg_probe.h. Capability gate for native compositor-side LSFG. #include "lsfg_probe.h" #include "../VulkanRendererContext.h" @@ -16,7 +15,7 @@ bool hasExtension(const std::vector& exts, const char* na return false; } -} // namespace +} FeatureSupport queryFeatures(const VkTable& vk, VkPhysicalDevice pd, const std::vector& deviceExtensions, @@ -33,33 +32,21 @@ FeatureSupport queryFeatures(const VkTable& vk, VkPhysicalDevice pd, const bool below12 = props.apiVersion < VK_API_VERSION_1_2; if (below12) { - // Below 1.2 there is no VkPhysicalDeviceVulkan12Features to chain, and - // the SPIR-V 1.6 modules will not load anyway. Unless the experimental - // compat path is on AND the driver offers the extensions that make the - // chain loadable as SPIR-V 1.4, don't touch the device further: - // device creation stays exactly as it is today. if (!allowVk11) return fs; fs.hasSpirv14 = hasExtension(deviceExtensions, VK_KHR_SPIRV_1_4_EXTENSION_NAME); fs.hasFloatControls = hasExtension(deviceExtensions, VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME); fs.hasMemoryModelExt = hasExtension(deviceExtensions, VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME); if (!fs.hasSpirv14 || !fs.hasFloatControls || !fs.hasMemoryModelExt) { - // Report what was looked at so explain() can name the gap. fs.queried = true; return fs; } fs.extensionPath = true; fs.spirvTarget = kSpirv14; } else if (!fs.apiAtLeast13 && allowVk11) { - // 1.2: SPIR-V 1.5 is core, VulkanMemoryModel is core. Nothing to - // enable beyond the features; the modules only need their header - // lowered from 1.6 to 1.5. Same experimental gate as the 1.1 path so - // a production build keeps rejecting 1.2 exactly as before. fs.extensionPath = true; fs.spirvTarget = kSpirv15; } - // On 1.2+ the Vulkan12Features struct carries the memory model; below - // that the KHR struct does (same sType value, same layout). VkPhysicalDeviceVulkan12Features v12{}; v12.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; VkPhysicalDeviceVulkanMemoryModelFeaturesKHR mm{}; @@ -87,7 +74,7 @@ FeatureSupport queryFeatures(const VkTable& vk, VkPhysicalDevice pd, std::vector extensionNames(const FeatureSupport& f) { std::vector out; if (!f.extensionPath || f.deviceApiVersion >= VK_API_VERSION_1_2) return out; - out.push_back(VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME); // dependency of spirv_1_4 + out.push_back(VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME); out.push_back(VK_KHR_SPIRV_1_4_EXTENSION_NAME); out.push_back(VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME); return out; @@ -108,10 +95,6 @@ bool probeStorageFormat(const VkTable& vk, VkPhysicalDevice pd, VkFormat fmt) { VkFormatProperties fp{}; vk.GetPhysicalDeviceFormatProperties(pd, fmt, &fp); - // The composite target is COLOR_ATTACHMENT (effect chain writes it), - // SAMPLED (next frame's LSFG input reads it), STORAGE (generate writes it) - // and both blit ends (it is copied - or, below panel resolution, blitted - - // into the swapchain image). const VkFormatFeatureFlags need = VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT @@ -163,4 +146,4 @@ void explain(Caps& caps) { } } -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_probe.h b/app/src/main/cpp/framegen/lsfg/lsfg_probe.h index 38d1d1a4f1..3042b10403 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_probe.h +++ b/app/src/main/cpp/framegen/lsfg/lsfg_probe.h @@ -1,45 +1,17 @@ #pragma once -// ============================================================================ -// lsfg_probe - capability gate for native (compositor-side) LSFG frame -// generation. -// -// The Lossless Scaling chain is 25 compute shaders that DXVK's DXBC translator -// emits as SPIR-V 1.6 with OpCapability VulkanMemoryModel and -// StorageImageWriteWithoutFormat. Three consequences, all checked here: -// -// * SPIR-V 1.6 will not load on a Vulkan 1.1 device, so the DEVICE (not just -// the instance) must report 1.3+ ... OR, on the experimental Vulkan 1.1 -// compat path, offer VK_KHR_spirv_1_4 + VK_KHR_vulkan_memory_model so the -// same modules can be handed over as SPIR-V 1.4 (see downgradeSpirv in -// lsfg_dll.h). The stock Qualcomm driver on Adreno 7xx phones reports -// 1.1.128 yet carries every one of those extensions (measured on an -// Adreno 710 / HyperOS device with `cmd gpu vkjson`). -// * vulkanMemoryModel, shaderStorageImageWriteWithoutFormat and -// shaderStorageImageExtendedFormats must be ENABLED at device creation. -// Today the renderer enables no features at all, so all three are off. -// * `generate` writes into a storage image, and Android swapchain formats -// are frequently not storage-capable - so the format is probed separately -// once the swapchain has picked one. -// -// A device failing any gate reports unsupported UP FRONT, with a reason, so -// the UI can grey the engine out instead of failing later inside -// vkCreateShaderModule or vkCreateComputePipelines. -// ============================================================================ #include #include #include -#include "lsfg_dll.h" // kSpirv14/15/16 +#include "lsfg_dll.h" struct VkTable; namespace lsfg { -// Which of the three required features the physical device OFFERS. Queried -// before vkCreateDevice; what we actually enable is recorded in Caps below. struct FeatureSupport { - bool queried = false; // vkGetPhysicalDeviceFeatures2 resolved + bool queried = false; bool apiAtLeast13 = false; bool vulkanMemoryModel = false; bool vulkanMemoryModelDeviceScope= false; @@ -47,65 +19,41 @@ struct FeatureSupport { bool storageImageExtendedFormats = false; uint32_t deviceApiVersion = 0; - // Experimental Vulkan 1.1 compat: the device is below 1.3 but offers the - // extensions that make the chain loadable. When set, the renderer must - // enable those extensions at device creation (see extensionNames) and the - // modules are downgraded to `spirvTarget` at load. bool extensionPath = false; - bool hasSpirv14 = false; // VK_KHR_spirv_1_4 - bool hasFloatControls = false; // VK_KHR_shader_float_controls (spirv_1_4 depends on it) - bool hasMemoryModelExt = false; // VK_KHR_vulkan_memory_model + bool hasSpirv14 = false; + bool hasFloatControls = false; + bool hasMemoryModelExt = false; uint32_t spirvTarget = kSpirv16; - // Every hard device-level gate passes (format is checked separately). bool deviceGatesPass() const { return queried && (apiAtLeast13 || extensionPath) && vulkanMemoryModel && storageImageWriteWithoutFormat && storageImageExtendedFormats; } }; -// What was actually enabled + the running verdict. Owned by the renderer. struct Caps { FeatureSupport features; - bool featuresEnabled = false; // the chain was passed to vkCreateDevice + bool featuresEnabled = false; bool storageOnSwapchainFormat = false; - // The swapchain format blits with VK_FILTER_LINEAR (needs - // SAMPLED_IMAGE_FILTER_LINEAR on the source). Not a gate: without it the - // capture-resolution upscale falls back to NEAREST. bool linearBlitOnSwapchainFormat = false; VkFormat probedFormat = VK_FORMAT_UNDEFINED; char reason[160] = "not probed"; - // The single question the UI and the render path ask. bool supported() const { return featuresEnabled && features.deviceGatesPass() && storageOnSwapchainFormat; } }; -// Ask the physical device which of the required features it offers. -// Safe on any driver: if vkGetPhysicalDeviceFeatures2 cannot be resolved, or -// the device reports below Vulkan 1.2 and `allowVk11` is false, nothing is -// chained and `queried` is left false - the caller then creates the device -// exactly as it always has. With `allowVk11`, a 1.1 device is accepted when -// `deviceExtensions` lists VK_KHR_spirv_1_4, VK_KHR_shader_float_controls and -// VK_KHR_vulkan_memory_model, and the memory-model features are queried -// through the KHR struct instead of VkPhysicalDeviceVulkan12Features. FeatureSupport queryFeatures(const VkTable& vk, VkPhysicalDevice pd, const std::vector& deviceExtensions, bool allowVk11); -// The device extensions the extension path needs enabled, in the order they -// should be pushed onto VkDeviceCreateInfo. Empty unless extensionPath. std::vector extensionNames(const FeatureSupport& f); -// Probe VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT on the live swapchain format. -// `generate` writes into an image of this format via a compute dispatch. bool probeStorageFormat(const VkTable& vk, VkPhysicalDevice pd, VkFormat fmt); -// Whether the format may be the source of a VK_FILTER_LINEAR blit. bool probeLinearBlit(const VkTable& vk, VkPhysicalDevice pd, VkFormat fmt); -// Fill caps.reason with the FIRST gate that failed (or "supported"). void explain(Caps& caps); -} // namespace lsfg +} diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_shaders.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_shaders.cpp index d3266d1734..05562d390f 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_shaders.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_shaders.cpp @@ -1,9 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #include "lsfg_shaders.hpp" #include "lsfg_common.hpp" @@ -27,12 +23,6 @@ LsfgShaders::LsfgShaders(const Device& device_, const std::string& cache_path, return; } - // Vulkan 1.1/1.2 compat: the cache is always built at the translator's - // native SPIR-V 1.6 (no device exists at import time), so lower each module - // to what THIS device accepts. A no-op on 1.3+ devices. Only the - // DXBC-translated chain is lowered: downgradeSpirv knows the capabilities - // DXVK emits, not whatever a precompiled vendor SPIR-V variant may carry, - // and relabelling one of those could hand the driver invalid SPIR-V. uint32_t lowered = 0; for (Module& module : set.modules) { if (module.words.size() > 1 && module.words[1] > spirv_target) { diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_shaders.hpp b/app/src/main/cpp/framegen/lsfg/lsfg_shaders.hpp index d91b00c181..0647564a9c 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_shaders.hpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_shaders.hpp @@ -1,9 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later -// -// LSFG from the work of Camille LaVey / the Eden Emulator Project, following -// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the -// Vulkan dispatch differs here (see lsfg_vkd.h). #pragma once @@ -20,8 +16,6 @@ class Device; class LsfgShaders { public: LsfgShaders() = default; - // `spirv_target` is the highest SPIR-V version the device accepts (see - // lsfg_probe.h); cached modules above it are lowered before creation. LsfgShaders(const Device& device, const std::string& cache_path, uint32_t spirv_target = kSpirv16); ~LsfgShaders(); diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_vkd.cpp b/app/src/main/cpp/framegen/lsfg/lsfg_vkd.cpp index 1e7877e92f..b89807077a 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_vkd.cpp +++ b/app/src/main/cpp/framegen/lsfg/lsfg_vkd.cpp @@ -1,4 +1,3 @@ -// See lsfg_vkd.h. Fills the chain's dispatch from the renderer's own table. #include "lsfg_vkd.h" #include "../VulkanRendererContext.h" diff --git a/app/src/main/cpp/framegen/lsfg/lsfg_vkd.h b/app/src/main/cpp/framegen/lsfg/lsfg_vkd.h index c86d2224f5..3e0ce0c0ed 100644 --- a/app/src/main/cpp/framegen/lsfg/lsfg_vkd.h +++ b/app/src/main/cpp/framegen/lsfg/lsfg_vkd.h @@ -1,24 +1,4 @@ #pragma once -// ============================================================================ -// lsfg_vkd - the Vulkan entry points the LSFG chain calls, as a single global. -// -// Two dispatch styles meet here. DroidDeck's compositor resolves Vulkan -// through a per-context VkTable (`vk_`), because an adrenotools-loaded driver -// lives in an isolated linker namespace and shares no global symbols with the -// system loader. The LSFG chain, ported from Eden by way of WinNative, calls -// through a file-scope `vkd`. Rather than rewrite ~2,300 lines of proven chain -// code to thread a table through every call, this shim exposes exactly the 34 -// entry points the chain uses and is filled from the renderer's own table when -// the chain is created. -// -// That keeps the ported files close to their upstream form, which matters: -// they are the part of this feature that is hardest to review by eye and -// easiest to break with a well-meaning edit. -// -// Single-renderer assumption: there is one Vulkan compositor per process, so -// one global table is correct. lsfgVkdInit() is idempotent and simply -// overwrites; lsfgVkdReady() reports whether every pointer resolved. -// ============================================================================ #include @@ -63,8 +43,5 @@ struct LsfgVkDispatch { extern LsfgVkDispatch vkd; -// Fill `vkd` from the renderer's table. Returns false (and leaves the chain -// unusable) if any entry point failed to resolve - better to report the engine -// unsupported than to call through a null pointer mid-frame. bool lsfgVkdInit(const VkTable& table); bool lsfgVkdReady(); diff --git a/app/src/main/cpp/framegen/winfg/config.hpp b/app/src/main/cpp/framegen/winfg/config.hpp index d8786697c1..a3bf09a5ec 100644 --- a/app/src/main/cpp/framegen/winfg/config.hpp +++ b/app/src/main/cpp/framegen/winfg/config.hpp @@ -1,6 +1,3 @@ -// win-fg - runtime config: enable gate, model, multiplier, and the synthesis -// tuning parameters. Sourced from environment variables and an optional -// conf.toml (a config file, when present, wins over the env defaults). #pragma once #include #include @@ -12,143 +9,110 @@ namespace winfg { struct Config { - bool enabled = false; // gate; loader also honours the manifest enable var - // GRANULAR PRESENT-PATH DEBUG TRACE. Default OFF. When ON, winfg_QueuePresentKHR - // emits a per-frame, step-by-step trail (logcat tag "win-fg") so a freeze/ - // crash-on-enable leaves an obvious LAST line at the exact stage that hung or - // faulted (acquire-spare, compute-submit, present-generated/real, fence wait, - // fallback). Zero behaviour change and effectively zero cost when off - one - // predicted-not-taken bool test per step, no logcat writes. - // WIN_FG_DEBUG=1|0 / conf.toml debug=on|off. + bool enabled = false; + + + + + + + bool debug = false; - // ── EVEN-CADENCE FRAME PACING ───────────────────────────────────────────── - // Default ON. The 2x insert path presents the GENERATED frame then the REAL - // frame back-to-back in one vkQueuePresentKHR hook call, so on Mailbox/ - // Immediate both land in ~one instant followed by a full frame-interval gap - // until the next pair - uneven in time → judder ("slows down to catch up"). - // With pacing on, the layer measures the real-frame interval (EMA of a - // monotonic clock) and holds the REAL present to its scheduled beat so the - // generated frame lands near the temporal MIDPOINT between consecutive real - // frames (even gen,real,gen,real cadence). Pure bounded CPU sleep - no GPU - // wait added; if a frame is already behind schedule the wait is SKIPPED - // (present immediately) so worst case is one un-paced pair, never a hitch. - // FIFO self-paces so the waits collapse to ~0 there. Off ⇒ byte-identical - // back-to-back behaviour. WIN_FG_PACING=on|off / conf.toml pacing=on|off. - // ISOLATION BUILD: default flipped to OFF to A/B the AYANEO-750 post-setting-change - // flicker regression against the pacing feature (everything else byte-identical). bool pacing = false; - int model = 4; // 3 = symmetric flow, 4 = bidir + occlusion gate - int multiplier = 2; // generated presents per real present + 1 - // EXTRA SWAPCHAIN IMAGE HEADROOM (device-freeze fix). On top of the +1 spare the - // insert path needs, request this many ADDITIONAL images at swapchain creation: - // requested minImageCount = app_min + 1 (spare) + extra_images, - // clamped to surfaceCaps.maxImageCount (0 = unlimited -> no clamp), never below - // app_min+1. The extra headroom stops the guest's NEXT vkAcquireNextImageKHR from - // starving while win-fg holds a spare + a real frame in flight to the AHB-backed - // host compositor. Some SoCs (Adreno 840 / Turnip) recycle displayed AHBs too - // slowly to tolerate the extra present with only the +1 spare and freeze on the - // first inserted frame; the AYANEO (Adreno 750) recycles fast enough to tolerate - // it. Default 2 (a few MB VRAM), applied on all devices. On a device that already - // works this only grows the pool - no FPS/quality change; the pool-headroom guard - // in QueuePresentKHR stays a no-op when headroom is adequate. - // WIN_FG_EXTRA_IMAGES / conf.toml extra_images. + int model = 4; + int multiplier = 2; + + + + + + + + + + + + + int extraImages = 2; - // ── FLOW-RESOLUTION PERFORMANCE PRESET ──────────────────────────────────── - // Trades base-FPS-drop against optical-flow quality by selecting the FINEST - // pyramid level the dense flow is solved at (FrameGen::kFlowFinest): - // 0 = Quality -> kFlowFinest = 1 (~1/2-res flow; best motion, biggest FG cost) - // 1 = Balanced -> kFlowFinest = 2 (~1/4-res; TODAY's behaviour) [DEFAULT] - // 2 = Performance -> kFlowFinest = 3 (~1/8-res; cheapest -> smallest base-FPS drop) - // Out-of-range clamps to Balanced (1), so an unset/older conf.toml is byte- - // identical to today. Changing this LIVE rebuilds the affected per-size flow - // images (like a resize) inside the layer and resets the flow predictor, so a - // preset change is fully hot - no FG toggle needed. See FrameGen::configure / - // FrameGen::flowFinestForPreset. WIN_FG_PERF_PRESET / conf.toml perf_preset. - int perfPreset = 1; // 0 quality, 1 balanced (default), 2 performance - float flowScale = 1.0f; // scales solved flow magnitude - // C1 GLOBAL-MOTION PRE-WARP. Estimate the per-frame camera affine (LK) and - // remove it before the dense SAD flow search so the search only sees coherent - // object-only residual motion (kills fast-pan "melt"). 0 = auto (engage only - // when the LK solve is stable), 1 = on (force-engage once a solve exists), - // 2 = off (never pre-warp; identity affine → pipeline == pre-C1 exactly). - // WIN_FG_GM=auto|on|off / conf.toml global_motion=auto|on|off. - int gmMode = 0; // 0 auto, 1 on, 2 off - // C2 FLOW REGULARIZATION (TV-L1 smoothness prior). After C1 removes the camera - // motion, the dense flow (flowLvl_ at kFlowFinest, 1/4-res) is the OBJECT-only - // residual; it still carries spurious per-block vectors. C2 runs N semi-implicit - // TV-L1 denoising iterations on that field - an L1 data term + edge-aware Total- - // Variation regularizer - to kill incoherent vectors while KEEPING true motion - // discontinuities (object edges) sharp. Solved in-place; expand's median + C1 - // add-back consume the cleaned field unchanged. 0 iterations ⇒ byte-identical to - // pre-C2. See shaders/of3_flowreg.comp. - // WIN_FG_FLOWREG=auto|on|off / conf.toml flow_reg=auto|on|off. - int frMode = 0; // 0 auto (engaged), 1 on (engaged), 2 off - int frIters = 4; // TV-L1 iterations at kFlowFinest (0 ⇒ off) - float frLambda = 2.0f; // L1 data-fidelity weight (higher ⇒ trust SAD flow) - float frDt = 0.25f; // semi-implicit smoothing step (higher ⇒ smoother) - float frEdge = 8.0f; // luma-gradient edge sensitivity for the TV weight g - float frEps = 0.05f; // Charbonnier epsilon (px) for the TV diffusivity - // synthesis (wfg_synth) tuning - float beta = 8.0f; // softmax sharpness on importance Z - float lambda = 0.6f; // FB-consistency vs photometric weight - // Tightened 2026-08-17 to prioritise "no ghost" over max sharpness - the - // remaining single-frame ghosts came from pixels that the previous defaults - // still trusted with warp when they should have cross-faded. Raising both - // pushes borderline pixels toward the safe cross-fade path (softer, but no - // smear). Prewarp will lift the ceiling further; this is the "safety net" - // knob change until then. - // Walked back from (0.10, 9.0) tighten after user reported softening. The - // real fix for the residual ghosts is the 3a-fallback path change in - // layer.cpp (present real curr on fallback instead of blitting synth over); - // the gate can stay closer to the original values now. - float epsilon = 0.07f; // disocclusion floor (0.05 -> 0.10 -> 0.07) - float photoScale = 7.5f; // photometric residual scale into Z (6.0 -> 9.0 -> 7.5) - // HUD exclusion rect in pixel coords (x0,y0,x1,y1). Fragments inside are - // passed through as the real current frame (no warp, no synth) so text / - // overlays don't ghost. Disabled when x0 >= x1 or y0 >= y1 (the default). - // Sourced from WIN_FG_HUD_RECT="x0,y0,x1,y1" env var or conf.toml - // (hudRect="x0,y0,x1,y1"). Pattern is Isygold's Vegas DXVK framegen - - // host knows where the HUD is, tell the shader to skip it. + + + + + + + + + + + + int perfPreset = 1; + float flowScale = 1.0f; + + + + + + + int gmMode = 0; + + + + + + + + + + int frMode = 0; + int frIters = 4; + float frLambda = 2.0f; + float frDt = 0.25f; + float frEdge = 8.0f; + float frEps = 0.05f; + + float beta = 8.0f; + float lambda = 0.6f; + + + + + + + + + + + float epsilon = 0.07f; + float photoScale = 7.5f; + + + + + + float hudX0 = 0.0f; float hudY0 = 0.0f; float hudX1 = 0.0f; float hudY1 = 0.0f; - // ── TRAINING-DATA CAPTURE MODE (Route-B VFI dataset collection) ─────────── - // A dev-only gate. When OFF (default) the present path is byte-identical to a - // build without this feature - a single bool test and nothing else. When ON, - // every real present is downscaled on the GPU, read back async, and written to - // disk as lossless QOI (motion-rich 256² triplet patches by default, or full - // downscaled frames) plus a JSONL manifest, for offline (i-1,i+1)->i training. - // NEVER captures win-fg's generated frames - capture reads the real swapchain - // image at the TOP of QueuePresentKHR, before any interpolation. - // WIN_FG_CAPTURE=on|off / conf.toml capture=on|off. bool capture = false; - // Downscale target box (aspect-preserving, never upscales). WIN_FG_CAPTURE_W/H, - // conf capture_width/capture_height. int captureW = 1280; int captureH = 720; - // 0 = patch (self-contained aligned triplets, DEFAULT), 1 = frame (full - // downscaled frames in order). WIN_FG_CAPTURE_MODE=patch|frame. int capMode = 0; - int capPatches = 3; // patches per triplet in patch mode (WIN_FG_CAPTURE_PATCHES) - int capPatchSize = 256; // patch edge in downscaled px (WIN_FG_CAPTURE_PATCH) - // Skip a unit whose inter-frame motion (mean per-pixel luma abs-diff, 0..255) - // is below this. WIN_FG_CAPTURE_MOTION / conf capture_motion. + int capPatches = 3; + int capPatchSize = 256; + + float capMotion = 2.0f; - // Output dir; empty => $HOME/.cache/winfg-capture. WIN_FG_CAPTURE_DIR / - // conf capture_dir. A per-run session subdir is created under it. std::string capDir; - // Rolling-shard size cap (MiB). Output is a small number of large packed - // .wfgcap containers, not thousands of loose files; a new shard opens when the - // current one passes this. WIN_FG_CAPTURE_SHARD_MB / conf capture_shard_mb. int capShardMB = 1024; void sanitize() { if (model < 3) model = 3; if (model > 4) model = 4; if (multiplier < 2) multiplier = 2; if (multiplier > 4) multiplier = 4; if (extraImages < 0) extraImages = 0; if (extraImages > 8) extraImages = 8; - if (perfPreset < 0 || perfPreset > 2) perfPreset = 1; // clamp out-of-range -> Balanced + if (perfPreset < 0 || perfPreset > 2) perfPreset = 1; if (gmMode < 0) gmMode = 0; if (gmMode > 2) gmMode = 2; if (frMode < 0) frMode = 0; if (frMode > 2) frMode = 2; if (frIters < 0) frIters = 0; if (frIters > 16) frIters = 16; @@ -158,7 +122,6 @@ struct Config { if (frEps < 1e-3f) frEps = 1e-3f; if (flowScale < 0.05f) flowScale = 0.05f; if (flowScale > 4.0f) flowScale = 4.0f; if (beta < 0.0f) beta = 0.0f; if (lambda < 0.0f) lambda = 0.0f; - // capture knobs if (captureW < 16) captureW = 16; if (captureW > 7680) captureW = 7680; if (captureH < 16) captureH = 16; if (captureH > 4320) captureH = 4320; if (capMode < 0) capMode = 0; if (capMode > 1) capMode = 1; @@ -176,7 +139,6 @@ static inline int envi(const char* k, int d) { const char* v = std::getenv(k); return v ? std::atoi(v) : d; } -// "auto"/"on"/"off" (also true/false/on/off numerics) -> {0 auto, 1 on, 2 off}. static inline int parse_tristate(const std::string& v, int dflt) { if (v.empty()) return dflt; if (v == "auto") return 0; @@ -185,19 +147,16 @@ static inline int parse_tristate(const std::string& v, int dflt) { return dflt; } -// "on"/"off"/"1"/"true"/... -> bool. static inline bool parse_bool(const std::string& v, bool dflt) { int t = parse_tristate(v, dflt ? 1 : 2); return t == 1; } -// "patch"|"frame" -> {0 patch, 1 frame}. static inline int parse_capmode(const std::string& v, int dflt) { if (v == "patch" || v == "patches" || v == "0") return 0; if (v == "frame" || v == "frames" || v == "1") return 1; return dflt; } -// key=value TOML-lite reader (flat keys, '#' comments) - enough for our knobs. static inline void apply_toml(Config& c, const std::string& path) { std::ifstream f(path); if (!f) return; @@ -229,7 +188,6 @@ static inline void apply_toml(Config& c, const std::string& path) { else if (k == "lambda") c.lambda = std::strtof(v.c_str(), nullptr); else if (k == "epsilon") c.epsilon = std::strtof(v.c_str(), nullptr); else if (k == "photoScale") c.photoScale = std::strtof(v.c_str(), nullptr); - // ── capture-mode knobs ──────────────────────────────────────────────── else if (k == "capture") c.capture = parse_bool(v, c.capture); else if (k == "capture_dir") c.capDir = v; else if (k == "capture_width") c.captureW = std::atoi(v.c_str()); @@ -240,7 +198,6 @@ static inline void apply_toml(Config& c, const std::string& path) { else if (k == "capture_motion") c.capMotion = std::strtof(v.c_str(), nullptr); else if (k == "capture_shard_mb") c.capShardMB = std::atoi(v.c_str()); else if (k == "hudRect") { - // "x0,y0,x1,y1" in pixel coords float r[4] = {0,0,0,0}; int n = 0; size_t start = 0; std::string s = v; for (; n < 4; ++n) { @@ -255,22 +212,18 @@ static inline void apply_toml(Config& c, const std::string& path) { } } -// Path of the conf.toml the app writes (used for hot-reload mtime checks). static inline std::string conf_path() { if (const char* p = std::getenv("WIN_FG_CONF")) return p; const char* home = std::getenv("HOME"); return home ? std::string(home) + "/.config/win-fg/conf.toml" : std::string(); } -// Resolve the capture output root: explicit override, else $HOME/.cache/winfg-capture, -// else a /tmp fallback so a HOME-less prefix still writes somewhere pullable. static inline std::string capture_root(const Config& c) { if (!c.capDir.empty()) return c.capDir; if (const char* home = std::getenv("HOME")) return std::string(home) + "/.cache/winfg-capture"; return std::string("/tmp/winfg-capture"); } -// env defaults first, then conf.toml overrides (file wins when present). static inline Config load_config() { Config c; c.enabled = envi("WIN_FG_ENABLE", 0) != 0; @@ -292,7 +245,6 @@ static inline Config load_config() { c.lambda = envf("WIN_FG_LAMBDA", c.lambda); c.epsilon = envf("WIN_FG_EPSILON", c.epsilon); c.photoScale = envf("WIN_FG_PHOTOSCALE", c.photoScale); - // ── capture-mode env (conf.toml still wins below) ───────────────────────── if (const char* cc = std::getenv("WIN_FG_CAPTURE")) c.capture = parse_bool(cc, c.capture); c.captureW = envi("WIN_FG_CAPTURE_W", c.captureW); c.captureH = envi("WIN_FG_CAPTURE_H", c.captureH); @@ -303,7 +255,6 @@ static inline Config load_config() { c.capShardMB = envi("WIN_FG_CAPTURE_SHARD_MB", c.capShardMB); if (const char* cd = std::getenv("WIN_FG_CAPTURE_DIR")) c.capDir = cd; if (const char* h = std::getenv("WIN_FG_HUD_RECT")) { - // "x0,y0,x1,y1" - pixel coords; disabled when x0>=x1 or y0>=y1 float r[4] = {0,0,0,0}; int n = 0; std::string s = h; size_t start = 0; for (; n < 4; ++n) { @@ -321,37 +272,24 @@ static inline Config load_config() { return c; } -// UBO layout - MUST match wfg_synth.comp binding 0. -// The vec4 hudRect is 16-byte aligned in std140, sits at offset 32 (after the -// 8 leading floats which naturally occupy 32B). Disabled when hudX0>=hudX1. struct SynthUBO { float flowScale, alpha, beta, lambda, epsilon, photoScale, pad0, pad1; float hudX0, hudY0, hudX1, hudY1; }; -// UBO layout - MUST match of3_flow / of3_expand_m4 binding 0 (Model3UBO). struct FlowUBO { float flowScale; uint32_t level; float occlLo; float occlHi; }; -// C1 global-motion UBO - MUST match binding 1 in of3_gm_reduce / of3_gm_prewarp / -// of3_expand(_m4). std140: four vec4 = 64 bytes. The affine is in centered-UV -// space: P = [[p1,p3],[p2,p4]], translation (tx,ty); warp uvSrc = uv + P*(uv-0.5) -// + t maps a prev(template) coord to the curr(image) coord it samples (prev→curr). -// lin[] = running LK estimate (linearization point fed to of3_gm_reduce) -// app[] = APPLIED affine (of3_gm_prewarp + expand add-back); identity when -// disengaged so the pipeline is byte-identical to pre-C1. struct GMUBO { - float lin[4]; // p1,p2,p3,p4 - float linT[4]; // tx,ty, engaged, pad - float app[4]; // p1,p2,p3,p4 - float appT[4]; // tx,ty, pad, pad + float lin[4]; + float linT[4]; + float app[4]; + float appT[4]; }; -// C2 flow-regularization UBO - MUST match binding 0 (vec4 params) in -// of3_flowreg.comp. std140: one vec4 = 16 bytes. See Config::fr* fields. struct FlowRegUBO { - float dt; // params.x - semi-implicit smoothing step - float lambda; // params.y - L1 data-fidelity weight (θ = dt·lambda) - float edgeAlpha; // params.z - luma-gradient edge sensitivity for g - float epsTV; // params.w - Charbonnier epsilon (px) for the TV diffusivity + float dt; + float lambda; + float edgeAlpha; + float epsTV; }; -} // namespace winfg +} diff --git a/app/src/main/cpp/framegen/winfg/embedded_shaders.hpp b/app/src/main/cpp/framegen/winfg/embedded_shaders.hpp index 934d07a616..20dd4477c3 100644 --- a/app/src/main/cpp/framegen/winfg/embedded_shaders.hpp +++ b/app/src/main/cpp/framegen/winfg/embedded_shaders.hpp @@ -1,5 +1,3 @@ -// GENERATED by tools/embed_spv.py - do not edit by hand. -// win-fg embedded SPIR-V: our optical-flow front end + synthesis only. #pragma once #include #include @@ -41,4 +39,4 @@ static inline Blob blob(Shader s) { default: return { nullptr, 0 }; } } -} } // namespace winfg::embedded +} } diff --git a/app/src/main/cpp/framegen/winfg/framegen.cpp b/app/src/main/cpp/framegen/winfg/framegen.cpp index 2848937d50..4ddd12021c 100644 --- a/app/src/main/cpp/framegen/winfg/framegen.cpp +++ b/app/src/main/cpp/framegen/winfg/framegen.cpp @@ -1,4 +1,3 @@ -// win-fg - compute frame-generation engine implementation. #include "framegen.hpp" #include "embedded_shaders.hpp" #include "log.hpp" @@ -49,10 +48,6 @@ void FrameGen::destroyImage(Img& i) { i = Img{}; } -// C1: allocate the per-slot host-visible SSBOs the LK reduce writes partials into. -// Host-visible + coherent so the CPU can read them back after the owning frame's -// fence signals (no staging copy needed; the buffers are tiny - kGmThreads*kGmStride -// floats each, ~64 KB). Persistently mapped. bool FrameGen::makeGmBuffers() { const VkDeviceSize sz = (VkDeviceSize)kGmThreads * kGmStride * sizeof(float); const VkMemoryPropertyFlags want = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; @@ -75,8 +70,6 @@ bool FrameGen::makeGmBuffers() { bool FrameGen::makePipe(Pipe& p, int shaderId, const std::vector&) { - // binding layout is derived per shader below in init(); here we only build - // the module + a generic layout supplied by caller via setLayout already set. embedded::Blob b = embedded::blob((embedded::Shader)shaderId); VkShaderModuleCreateInfo mi{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO}; mi.codeSize = b.words * 4; mi.pCode = b.code; @@ -101,7 +94,6 @@ void FrameGen::destroyPipe(Pipe& p) { p = Pipe{}; } -// Build a descriptor-set layout from an explicit (binding, type) list. static bool buildSetLayout(const DeviceDispatch* dd, VkDevice dev, const std::vector>& binds, VkDescriptorSetLayout& out) { @@ -123,12 +115,11 @@ bool FrameGen::init(const DeviceDispatch* dd, const InstanceDispatch* id, si.addressModeU = si.addressModeV = si.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; VKOK(dd_->CreateSampler(device_, &si, nullptr, &linear_)); - // descriptor pool sized generously for our per-frame sets. VkDescriptorPoolSize sizes[] = { {VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 256}, {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 256}, {VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 64}, - {VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 16}, // C1 LK-reduce SSBOs + {VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 16}, }; VkDescriptorPoolCreateInfo pci{VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO}; pci.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; @@ -141,19 +132,15 @@ bool FrameGen::init(const DeviceDispatch* dd, const InstanceDispatch* id, const auto U = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; const auto SB = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; - // per-shader binding sets (match the GLSL layout(binding=...) declarations) if (!buildSetLayout(dd_, dev, {B{32,S},B{48,W}}, pLuma_.setLayout)) return false; if (!buildSetLayout(dd_, dev, {B{32,S},B{48,W}}, pDown_.setLayout)) return false; if (!buildSetLayout(dd_, dev, {B{0,U},B{32,S},B{33,S},B{34,S},B{48,W}}, pFlow_.setLayout)) return false; if (!buildSetLayout(dd_, dev, {B{0,U},B{32,S},B{33,S},B{34,S},B{48,W}}, pFlowM4_.setLayout)) return false; - // C1: expand sets gain a second UBO (binding 1 = GMUBO) for the global-motion add-back. if (!buildSetLayout(dd_, dev, {B{0,U},B{1,U},B{32,S},B{48,W},B{49,W}}, pExpand_.setLayout)) return false; if (!buildSetLayout(dd_, dev, {B{0,U},B{1,U},B{32,S},B{48,W},B{49,W}}, pExpandM4_.setLayout)) return false; if (!buildSetLayout(dd_, dev, {B{0,U},B{32,S},B{33,S},B{34,S},B{35,S},B{48,W}}, pSynth_.setLayout)) return false; - // C1: LK-reduce (UBO, SSBO, prev, curr) and curr-luma stabilization prewarp (UBO, src, dst). if (!buildSetLayout(dd_, dev, {B{1,U},B{16,SB},B{32,S},B{33,S}}, pGmReduce_.setLayout)) return false; if (!buildSetLayout(dd_, dev, {B{1,U},B{32,S},B{48,W}}, pGmPrewarp_.setLayout)) return false; - // C2: flow-reg (UBO, u_in, f0_obs, luma, out). if (!buildSetLayout(dd_, dev, {B{0,U},B{32,S},B{33,S},B{34,S},B{48,W}}, pFlowReg_.setLayout)) return false; std::vector unused; @@ -177,23 +164,19 @@ static VkExtent2D levelExtent(VkExtent2D e, int l) { return { e.width >> l ? e.width >> l : 1u, e.height >> l ? e.height >> l : 1u }; } -bool FrameGen::onResize(VkExtent2D extent, VkFormat /*colorFormat*/, bool force) { - // force skips the same-extent early-out so a perf_preset change (which alters - // flowFinest_ and therefore the per-size flow-image resolutions) rebuilds them. +bool FrameGen::onResize(VkExtent2D extent, VkFormat , bool force) { + + if (!force && ready_ && extent.width == extent_.width && extent.height == extent_.height) return true; - // tear down previous size for (auto& i : pyrA_) destroyImage(i); pyrA_.clear(); for (auto& i : pyrB_) destroyImage(i); pyrB_.clear(); for (auto& i : pyrAs_) destroyImage(i); pyrAs_.clear(); for (auto& i : flowLvl_) destroyImage(i); flowLvl_.clear(); destroyImage(flowExpA_); destroyImage(flowExpB_); - destroyImage(flowRegA_); destroyImage(flowRegB_); // C2 + destroyImage(flowRegA_); destroyImage(flowRegB_); extent_ = extent; ready_ = false; const VkImageUsageFlags lumaUsage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_STORAGE_BIT; - // flowLvl_ is cleared every frame (per-frame reset) and C2 copies the cleaned - // finest level back into it - both need TRANSFER_DST. The C2 ping-pong images - // are the copy SOURCE (TRANSFER_SRC). const VkImageUsageFlags flowUsage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; const VkImageUsageFlags regUsage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT; pyrA_.resize(kLevels); pyrB_.resize(kLevels); flowLvl_.resize(kLevels); @@ -203,13 +186,11 @@ bool FrameGen::onResize(VkExtent2D extent, VkFormat /*colorFormat*/, bool force) if (!makeImage(pyrB_[l], e, VK_FORMAT_R32_SFLOAT, lumaUsage)) return false; if (!makeImage(flowLvl_[l], e, VK_FORMAT_R16G16B16A16_SFLOAT, flowUsage)) return false; } - // C1: stabilized curr luma - only the levels the dense flow reads (finest..coarsest). pyrAs_.resize(kLevels); for (int l = flowFinest_; l < kLevels; ++l) if (!makeImage(pyrAs_[l], levelExtent(extent, l), VK_FORMAT_R32_SFLOAT, lumaUsage)) return false; if (!makeImage(flowExpA_, extent, VK_FORMAT_R16G16B16A16_SFLOAT, flowUsage)) return false; if (!makeImage(flowExpB_, extent, VK_FORMAT_R16G16B16A16_SFLOAT, flowUsage)) return false; - // C2: TV-L1 ping-pong scratch at the finest solved flow level (perf_preset-driven res). if (!makeImage(flowRegA_, levelExtent(extent, flowFinest_), VK_FORMAT_R16G16B16A16_SFLOAT, regUsage)) return false; if (!makeImage(flowRegB_, levelExtent(extent, flowFinest_), VK_FORMAT_R16G16B16A16_SFLOAT, regUsage)) return false; ready_ = true; @@ -229,13 +210,6 @@ void FrameGen::barrier(VkCommandBuffer cmd, VkImage img, VkImageLayout from, VkI VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &b); } -// NOTE: descriptor-set allocation/update per record() and the exact per-level -// flow wiring are implemented in record_impl.inc for readability; the graph is: -// luma(curr)->pyrA[0], luma(prev)->pyrB[0] -// downsample pyrA/pyrB to kLevels -// coarse->fine flow (per level) into flowLvl -// expand flowLvl[0] -> flowExpA/flowExpB -// synth(prev,curr,flowExpA,flowExpB, alpha) -> out void FrameGen::destroy() { if (!device_) return; @@ -245,11 +219,11 @@ void FrameGen::destroy() { for (auto& i : pyrAs_) destroyImage(i); pyrAs_.clear(); for (auto& i : flowLvl_) destroyImage(i); flowLvl_.clear(); destroyImage(flowExpA_); destroyImage(flowExpB_); - destroyImage(flowRegA_); destroyImage(flowRegB_); // C2 + destroyImage(flowRegA_); destroyImage(flowRegB_); destroyPipe(pLuma_); destroyPipe(pDown_); destroyPipe(pFlow_); destroyPipe(pFlowM4_); destroyPipe(pExpand_); destroyPipe(pExpandM4_); destroyPipe(pSynth_); destroyPipe(pGmReduce_); destroyPipe(pGmPrewarp_); - destroyPipe(pFlowReg_); // C2 + destroyPipe(pFlowReg_); for (int s = 0; s < kGmSlots; ++s) { if (gmSsboMem_[s]) dd_->UnmapMemory(device_, gmSsboMem_[s]); if (gmSsbo_[s]) dd_->DestroyBuffer(device_, gmSsbo_[s], nullptr); @@ -262,8 +236,6 @@ void FrameGen::destroy() { descPool_ = VK_NULL_HANDLE; linear_ = VK_NULL_HANDLE; device_ = VK_NULL_HANDLE; ready_ = false; } -} // namespace winfg +} -// record() + its scratch helpers reopen namespace winfg themselves, so include -// this OUTSIDE the namespace block above (keeps FrameGen:: members attached). #include "record_impl.inc" diff --git a/app/src/main/cpp/framegen/winfg/framegen.hpp b/app/src/main/cpp/framegen/winfg/framegen.hpp index 1980f1104d..8b32fd0c0d 100644 --- a/app/src/main/cpp/framegen/winfg/framegen.hpp +++ b/app/src/main/cpp/framegen/winfg/framegen.hpp @@ -1,8 +1,3 @@ -// win-fg - compute frame-generation engine. -// Owns the compute pipelines (our of3_* optical flow + wfg_synth) and the -// per-resolution intermediate images, and records the flow+synth graph that -// turns (prev, curr) into an interpolated frame. Written for win-fg; no code -// from bionic-fg / lsfg / GameScope. #pragma once #include "vk_dispatch.hpp" #include "config.hpp" @@ -14,70 +9,53 @@ class FrameGen { public: bool init(const DeviceDispatch* dd, const InstanceDispatch* id, VkPhysicalDevice phys, VkDevice dev, uint32_t queueFamily, VkQueue queue); - // Applies a new config. Recomputes the active finest flow level from - // cfg_.perfPreset; if it changed while resources are live, safely rebuilds the - // affected per-size flow images (like a resize) and resets the flow predictor, - // so a perf_preset change is FULLY LIVE - no FG toggle needed. Defined in - // record_impl.inc (needs the scratch-state teardown). See flowFinestForPreset. void configure(const Config& c); - // (Re)build per-resolution resources for a swapchain of the given size/format. - // force=true rebuilds even when the extent is unchanged (used by configure() - // when a perf_preset change alters the finest solved flow level). bool onResize(VkExtent2D extent, VkFormat colorFormat, bool force = false); - // Record the whole flow+synth graph into cmd. prevView/currView are SAMPLED - // views of the two real frames; outView is a STORAGE view of the target - // image the generated frame is written into. alpha in (0,1). - // gmSlot selects which C1 global-motion SSBO to reduce into / read back; the - // caller MUST pass the ring-slot index of the FrameCtx it just fence-waited - // (that guarantees this slot's PREVIOUS reduce has completed and is safe to - // read on the host - see the decoupled-LK note in record_impl.inc). void record(VkCommandBuffer cmd, VkImageView prevView, VkImageView currView, VkImageView outView, float alpha, uint32_t gmSlot = 0); void destroy(); bool valid() const { return device_ != VK_NULL_HANDLE && ready_; } const Config& config() const { return cfg_; } - // public so the record_impl.inc free helpers can reference them struct Img { VkImage image = VK_NULL_HANDLE; VkDeviceMemory mem = VK_NULL_HANDLE; VkImageView view = VK_NULL_HANDLE; VkExtent2D extent{}; VkFormat fmt{}; }; struct Pipe { VkPipeline pipeline = VK_NULL_HANDLE; VkPipelineLayout layout = VK_NULL_HANDLE; VkDescriptorSetLayout setLayout = VK_NULL_HANDLE; VkShaderModule module = VK_NULL_HANDLE; }; - // ── C1 GLOBAL-MOTION PRE-WARP constants (public so record_impl.inc's free - // helpers can size/index the SSBO pool). See of3_gm_reduce/of3_gm_prewarp. ── - static constexpr int kGmSlots = 3; // >= present ring size; one SSBO per in-flight ctx - static constexpr int kGmLevel = 3; // 1/8-res luma pyramid level for the LK estimate - static constexpr int kGmThreads = 512; // fixed reduce threads (8 groups * local_size_x 64) - static constexpr int kGmStride = 32; // floats/thread: 21 H + 6 b + coverage + resid + pad - // Finest pyramid level the dense flow is solved at (0 = full res). This is now - // RUNTIME-SELECTABLE via conf.toml perf_preset (0 Quality=1 / 1 Balanced=2 / - // 2 Performance=3). kFlowFinestDefault is the Balanced value (today's behaviour); - // the ACTIVE level lives in flowFinest_ and is read through flowFinest(). onResize - // sizes the stabilized-curr pyramid + C2 scratch from it, and record_impl.inc - // wires the flow/expand inputs to it - both must agree, so they all read - // flowFinest()/flowFinest_ (never a hard-coded 2). (Was a static constexpr = 2.) - static constexpr int kFlowFinestDefault = 2; // Balanced (perf_preset=1) - // Map perf_preset -> finest solved level. Out-of-range -> Balanced. A higher - // level = coarser (cheaper) flow = smaller base-FPS drop. configure() clamps the - // result against kLevels so at least two solved levels always remain. + + + static constexpr int kGmSlots = 3; + static constexpr int kGmLevel = 3; + static constexpr int kGmThreads = 512; + static constexpr int kGmStride = 32; + + + + + + + + static constexpr int kFlowFinestDefault = 2; + + + static int flowFinestForPreset(int preset) { switch (preset) { - case 0: return 1; // Quality ~1/2-res - case 2: return 3; // Performance ~1/8-res - case 1: default: return kFlowFinestDefault; // Balanced ~1/4-res (today) + case 0: return 1; + case 2: return 3; + case 1: default: return kFlowFinestDefault; } } - // The ACTIVE finest solved flow level (set by configure() from perf_preset). int flowFinest() const { return flowFinest_; } private: uint32_t findMemType(uint32_t bits, VkMemoryPropertyFlags props) const; bool makeImage(Img& out, VkExtent2D ext, VkFormat fmt, VkImageUsageFlags usage); void destroyImage(Img& i); - bool makeGmBuffers(); // allocate the kGmSlots host-visible LK-reduce SSBOs - // Read back one reduce SSBO, solve the 6x6 inverse-compositional LK step, and - // update the running/applied global affine. Returns true if it engaged this - // frame. Implemented in record_impl.inc (has the ScratchState/UBO context). + bool makeGmBuffers(); + + + bool updateGlobalMotion(uint32_t gmSlot, VkExtent2D fullExtent); bool makePipe(Pipe& p, int shaderId, const std::vector& bindings); @@ -97,55 +75,36 @@ private: Config cfg_; VkExtent2D extent_{}; bool ready_ = false; - // ACTIVE finest solved flow level (perf_preset). Default = Balanced (today's 2) - // so an unconfigured engine and an unset conf.toml are byte-identical to before. int flowFinest_ = kFlowFinestDefault; - // pipelines Pipe pLuma_, pDown_, pFlow_, pFlowM4_, pExpand_, pExpandM4_, pSynth_; - // C1: LK normal-equation reduce + curr-luma stabilization pre-warp Pipe pGmReduce_, pGmPrewarp_; - // C2: TV-L1 flow-regularization iteration (one dispatch per iteration) Pipe pFlowReg_; - // per-resolution resources - // 7 levels (was 5): the coarsest levels set the max motion the solver can track. - // At 5 levels the reach was only ~±84px/frame at 720p, so fast camera motion - // (150-300px/frame at the periphery) saturated the search -> incoherent vectors - // -> oil-paint melt. Two more (tiny) coarse levels push the reach to ~±300px so - // large global motion is captured coherently instead of smeared. Near-zero cost: - // the extra levels are 40x22 and 20x11 images. static const int kLevels = 7; - std::vector pyrA_, pyrB_; // luma pyramids for curr / prev - std::vector pyrAs_; // C1: STABILIZED curr luma (flow levels only) - std::vector flowLvl_; // per-level flow scratch - Img flowExpA_, flowExpB_; // fwd / bwd expanded flow (+conf) - // C2: TV-L1 ping-pong scratch at kFlowFinest res. flowLvl_[kFlowFinest] holds - // the fixed observation f0 (never written during the iterations); u ping-pongs - // between these two; the final iterate is copied back into flowLvl_[kFlowFinest] - // so of3_expand consumes the cleaned field with no binding change (⇒ skipping - // C2 leaves flowLvl_ byte-identical to pre-C2). + std::vector pyrA_, pyrB_; + std::vector pyrAs_; + std::vector flowLvl_; + Img flowExpA_, flowExpB_; + + + + + Img flowRegA_, flowRegB_; - // ── C1 global-motion state ──────────────────────────────────────────────── - // Host-visible SSBOs the reduce shader writes per-thread partials into; the - // CPU sums + solves them. One per ring slot so a readback never races a live - // submission (the caller fence-waited its slot before calling record()). VkBuffer gmSsbo_[kGmSlots] {}; VkDeviceMemory gmSsboMem_[kGmSlots]{}; void* gmSsboPtr_[kGmSlots]{}; bool gmBuffersReady_ = false; - // running affine params p1..p6 in centered-UV space (see GMUBO in config.hpp); - // identity = all zero. gmLinAt_ records the linearization params in effect when - // each slot's reduce was dispatched (the correct IC-update base for that slot). double gmRun_[6] {}; double gmLinAt_[kGmSlots][6] {}; bool gmSlotValid_[kGmSlots]{}; - bool gmHaveEst_ = false; // at least one good solve so far - int gmStableCount_ = 0; // consecutive good solves (auto-engage threshold) - bool gmEngaged_ = false; // is the affine being APPLIED this frame - float gmLastTransPx_ = 0.0f; // estimated global translation magnitude (full-res px), for logging + bool gmHaveEst_ = false; + int gmStableCount_ = 0; + bool gmEngaged_ = false; + float gmLastTransPx_ = 0.0f; unsigned long long gmFrames_ = 0; }; -} // namespace winfg +} diff --git a/app/src/main/cpp/framegen/winfg/log.hpp b/app/src/main/cpp/framegen/winfg/log.hpp index 77c7b82702..056f136f44 100644 --- a/app/src/main/cpp/framegen/winfg/log.hpp +++ b/app/src/main/cpp/framegen/winfg/log.hpp @@ -1,5 +1,3 @@ -// win-fg - logging. On Android goes to logcat (tag "win-fg") so device bring-up -// can trace the layer; elsewhere falls back to stderr. #pragma once #if defined(__ANDROID__) #include @@ -11,10 +9,4 @@ #define WFG_LOGE(...) do { std::fprintf(stderr, "[win-fg][E] " __VA_ARGS__); std::fprintf(stderr, "\n"); } while(0) #endif -// Runtime-gated granular debug trace. The gate is a RUNTIME bool (Config::debug), -// not a compile-time switch - a shipping .so carries the full trail but pays only -// a predicted-not-taken bool test per step when debug is off (no logcat write, no -// arg evaluation of the message). Same "win-fg" tag so the app captures it under -// its own UID. Used to step the present path so a freeze leaves an obvious last -// line at the stage that hung. Usage: WFG_LOGD(dbg, "P#%llu step ...", n); #define WFG_LOGD(cond, ...) do { if (cond) WFG_LOGI(__VA_ARGS__); } while(0) diff --git a/app/src/main/cpp/framegen/winfg/record_impl.inc b/app/src/main/cpp/framegen/winfg/record_impl.inc index dcf0696cee..2e8fba009e 100644 --- a/app/src/main/cpp/framegen/winfg/record_impl.inc +++ b/app/src/main/cpp/framegen/winfg/record_impl.inc @@ -1,57 +1,28 @@ -// win-fg - FrameGen::record() and its lazy per-size descriptor/UBO setup. -// Included from framegen.cpp (has access to FrameGen privates). Written for -// win-fg; standard Vulkan compute wiring, no third-party code. -// -// ── C1 GLOBAL-MOTION PRE-WARP (this file wires it end to end) ───────────────── -// The dense SAD flow search melts on fast camera pans because the global motion -// saturates its window. C1 estimates the per-frame camera affine with a cheap -// inverse-compositional Lucas-Kanade solve (of3_gm_reduce accumulates the 6x6 -// normal equations at 1/8 res → CPU 6x6 Cholesky here), then of3_gm_prewarp -// removes it from the curr luma pyramid BEFORE the search, so the search only -// sees small, coherent, object-only residual motion. of3_expand(_m4) composes -// the global affine back so wfg_synth is unchanged and the final warp is correct. -// -// DECOUPLED (stall-free) SCHEDULING: a true in-frame CPU solve would need a -// mid-frame GPU submit+readback stall - unacceptable on a GPU-bound title. So we -// read back the reduce SSBO the caller ALREADY fence-waited (its ring slot from a -// couple of presents ago) and run ONE Gauss-Newton step per frame, warm-started -// from the running estimate. Camera motion is temporally smooth, so a ~1-2 frame -// old affine is an excellent predictor; and because the SAME affine is removed -// (prewarp) and added back (expand), the result is EXACT for any affine we pick - -// an approximate/stale one only changes how much residual the search must absorb, -// never correctness. Identity affine ⇒ byte-identical to the pre-C1 pipeline, so -// the bail-to-identity safety path can never be worse than "no pre-warp". namespace { struct ScratchState { - // host-visible UBO buffers VkBuffer synthUbo = VK_NULL_HANDLE; VkDeviceMemory synthUboMem = VK_NULL_HANDLE; void* synthUboPtr = nullptr; std::vector flowUbo; std::vector flowUboMem; std::vector flowUboPtr; VkBuffer expandUbo = VK_NULL_HANDLE; VkDeviceMemory expandUboMem = VK_NULL_HANDLE; void* expandUboPtr = nullptr; - // C2: flow-regularization UBO (shared by all iterations; refreshed per frame). VkBuffer flowRegUbo = VK_NULL_HANDLE; VkDeviceMemory flowRegUboMem = VK_NULL_HANDLE; void* flowRegUboPtr = nullptr; - // C1: per-slot global-motion UBO (double-buffered by ring slot so a live GPU - // read is never overwritten by the next frame - see the header note). VkBuffer gmUbo[winfg::FrameGen::kGmSlots]{}; VkDeviceMemory gmUboMem[winfg::FrameGen::kGmSlots]{}; void* gmUboPtr[winfg::FrameGen::kGmSlots]{}; - // persistent descriptor sets VkDescriptorSet sLumaCurr = VK_NULL_HANDLE, sLumaPrev = VK_NULL_HANDLE; std::vector sDownA, sDownB, sFlow; - VkDescriptorSet sExpand[winfg::FrameGen::kGmSlots]{}; // per-slot (binds gmUbo[slot]) - // C2: three flow-reg sets covering every (u_in → u_out) pairing of the - // ping-pong. sFlowReg0: in=flowLvl_[F] (=f0), out=A. sFlowRegAB: in=A, out=B. - // sFlowRegBA: in=B, out=A. f0 (binding 33) = flowLvl_[F] in all three. + VkDescriptorSet sExpand[winfg::FrameGen::kGmSlots]{}; + + + VkDescriptorSet sFlowReg0 = VK_NULL_HANDLE, sFlowRegAB = VK_NULL_HANDLE, sFlowRegBA = VK_NULL_HANDLE; VkDescriptorSet sSynth = VK_NULL_HANDLE; - // C1: per-slot reduce set + per-slot per-level prewarp sets VkDescriptorSet sGmReduce[winfg::FrameGen::kGmSlots]{}; - std::vector sGmPrewarp[winfg::FrameGen::kGmSlots]; // sized kLevels; [flowFinest()..) used + std::vector sGmPrewarp[winfg::FrameGen::kGmSlots]; VkExtent2D builtFor{0,0}; bool built = false; - bool flowInited = false; // flow images laid out once, then persist (temporal predictor) + bool flowInited = false; }; -ScratchState g_scratch; // one swapchain in flight in this first-draft engine +ScratchState g_scratch; } static bool makeUbo(const winfg::DeviceDispatch* dd, VkDevice dev, @@ -77,7 +48,6 @@ static VkDescriptorSet allocSet(const winfg::DeviceDispatch* dd, VkDevice dev, VkDescriptorSet s = VK_NULL_HANDLE; dd->AllocateDescriptorSets(dev, &ai, &s); return s; } -// write helpers static void wImg(const winfg::DeviceDispatch* dd, VkDevice dev, VkDescriptorSet set, uint32_t binding, VkDescriptorType type, VkImageView view, VkSampler samp, VkImageLayout layout) { VkDescriptorImageInfo ii{}; ii.imageView = view; ii.sampler = samp; ii.imageLayout = layout; @@ -102,9 +72,6 @@ static void wSsbo(const winfg::DeviceDispatch* dd, VkDevice dev, VkDescriptorSet dd->UpdateDescriptorSets(dev, 1, &w, 0, nullptr); } -// ── C1 CPU-side linear algebra (clean-room, textbook) ──────────────────────── -// 6x6 symmetric positive-definite solve via Cholesky. Returns false if not PD -// (a bad/ill-conditioned frame → caller bails to identity). Damped by the caller. static bool cholSolve6(double A[6][6], const double b[6], double x[6]) { double L[6][6] = {{0}}; for (int i = 0; i < 6; ++i) { @@ -112,7 +79,7 @@ static bool cholSolve6(double A[6][6], const double b[6], double x[6]) { double s = A[i][j]; for (int k = 0; k < j; ++k) s -= L[i][k] * L[j][k]; if (i == j) { - if (s <= 1e-20) return false; // not positive-definite + if (s <= 1e-20) return false; L[i][j] = std::sqrt(s); } else { L[i][j] = s / L[j][j]; @@ -124,7 +91,6 @@ static bool cholSolve6(double A[6][6], const double b[6], double x[6]) { for (int i = 5; i >= 0; --i) { double s = y[i]; for (int k = i+1; k < 6; ++k) s -= L[k][i]*x[k]; x[i] = s / L[i][i]; } return true; } -// affine <-> params. params p=(p1,p2,p3,p4,p5,p6); M = I + [[p1,p3,p5],[p2,p4,p6]]. static void affFromParams(const double p[6], double M[3][3]) { M[0][0]=1.0+p[0]; M[0][1]=p[2]; M[0][2]=p[4]; M[1][0]=p[1]; M[1][1]=1.0+p[3]; M[1][2]=p[5]; @@ -153,8 +119,6 @@ static void mulAff(const double A[3][3], const double B[3][3], double out[3][3]) namespace winfg { -// Lazily allocate per-size UBOs + descriptor sets and wire the fixed (internal- -// resource) bindings once. External views (prev/curr/out) are wired per frame. static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, const VkPhysicalDeviceMemoryProperties& mp, VkDescriptorPool pool, VkSampler samp, VkExtent2D ext, @@ -168,11 +132,6 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, FrameGen::Img& flowRegA, FrameGen::Img& flowRegB, VkBuffer* gmSsbo, int kLevels, const Config& cfg); -// Tear down the lazily-built scratch (all UBO buffers + every descriptor set) so a -// live perf_preset rebuild neither leaks them nor exhausts the descriptor pool. -// The CALLER must have made the device idle first - no in-flight command buffer may -// still reference these. Resetting the pool frees every set FrameGen allocated (all -// sets come from this pool); the mapped UBO memory is unmapped + freed explicitly. static void destroyScratch(const DeviceDispatch* dd, VkDevice dev, VkDescriptorPool pool) { auto freeUbo = [&](VkBuffer& b, VkDeviceMemory& m, void*& p) { if (m) dd->UnmapMemory(dev, m); @@ -186,29 +145,20 @@ static void destroyScratch(const DeviceDispatch* dd, VkDevice dev, VkDescriptorP freeUbo(S.flowRegUbo, S.flowRegUboMem, S.flowRegUboPtr); for (size_t i = 0; i < S.flowUbo.size(); ++i) freeUbo(S.flowUbo[i], S.flowUboMem[i], S.flowUboPtr[i]); for (int s = 0; s < FrameGen::kGmSlots; ++s) freeUbo(S.gmUbo[s], S.gmUboMem[s], S.gmUboPtr[s]); - if (pool && dd->ResetDescriptorPool) dd->ResetDescriptorPool(dev, pool, 0); // reclaim all sets at once - S = ScratchState{}; // built=false -> next record() rebuilds via ensureScratch + if (pool && dd->ResetDescriptorPool) dd->ResetDescriptorPool(dev, pool, 0); + S = ScratchState{}; } -// ── perf_preset apply / live rebuild ───────────────────────────────────────── -// Sets the config, resolves the perf_preset -> finest-solved-level, and - when -// that level changed while resources are already live - safely rebuilds the -// affected per-size flow images (a resize) + scratch descriptor sets and resets -// the flow predictor. This makes a perf_preset change FULLY LIVE per-present (the -// conf.toml hot-reload path calls this), so no FG toggle / bg-fg cycle is needed. void FrameGen::configure(const Config& c) { cfg_ = c; cfg_.sanitize(); - // Map preset -> finest level, clamped so at least TWO solved levels always - // remain (coarse->fine needs a range). With kLevels=7 the presets (1/2/3) never - // hit the clamp; the guard is defensive for future level/preset tuning. int want = flowFinestForPreset(cfg_.perfPreset); - const int maxFinest = kLevels - 2; // keep >= 2 solved levels + const int maxFinest = kLevels - 2; if (want > maxFinest) { WFG_LOGE("perf-preset=%d wants kFlowFinest=%d but only %d pyramid levels exist " "(need >=2 solved) - clamping to %d", cfg_.perfPreset, want, kLevels, maxFinest); want = maxFinest; } - if (want < 1) want = 1; // never solve full-res (level 0) + if (want < 1) want = 1; const int prevFinest = flowFinest_; flowFinest_ = want; @@ -216,35 +166,27 @@ void FrameGen::configure(const Config& c) { WFG_LOGI("perf-preset=%d -> kFlowFinest=%d (was %d) live-rebuild=%d ready=%d", cfg_.perfPreset, flowFinest_, prevFinest, live ? 1 : 0, ready_ ? 1 : 0); - if (!live) return; // unchanged, or not yet built (initial configure before onResize) + if (!live) return; - // The per-size flow images (pyrAs_/flowReg*/flowLvl_ wiring) and the scratch - // descriptor sets were built for the OLD finest level. Rebuild them so record() - // never reads/writes mismatched-size images. - dd_->DeviceWaitIdle(device_); // no in-flight cmd buf may touch these - destroyScratch(dd_, device_, descPool_); // free old scratch (UBOs + all sets) - if (!onResize(extent_, VK_FORMAT_UNDEFINED, /*force=*/true)) + + + + dd_->DeviceWaitIdle(device_); + destroyScratch(dd_, device_, descPool_); + if (!onResize(extent_, VK_FORMAT_UNDEFINED, true)) WFG_LOGE("perf-preset live rebuild: onResize FAILED at %ux%u - FG disabled until next resize", extent_.width, extent_.height); - // Reset the persistent flow predictor so stale, differently-scaled state never - // feeds the new resolution (avoids a melt/garbage frame on switch). The per-frame - // flow field (flowLvl_) is already cleared every frame; the cross-frame state is - // the C1 global-motion estimate + its per-slot reduce partials (dispatched against - // the old pyramid) - drop both back to identity. for (int i = 0; i < 6; ++i) gmRun_[i] = 0.0; for (int s = 0; s < kGmSlots; ++s) { gmSlotValid_[s] = false; for (int i = 0; i < 6; ++i) gmLinAt_[s][i] = 0.0; } gmHaveEst_ = false; gmEngaged_ = false; gmStableCount_ = 0; gmLastTransPx_ = 0.0f; WFG_LOGI("perf-preset live rebuild DONE (kFlowFinest=%d, flow predictor reset)", flowFinest_); } -// ── C1: read back one reduce SSBO, run one inverse-compositional LK step ────── -// Updates the running/applied global affine. Returns whether GM engages this frame. bool FrameGen::updateGlobalMotion(uint32_t gmSlot, VkExtent2D fullExtent) { ++gmFrames_; - if (!gmBuffersReady_ || cfg_.gmMode == 2 /*off*/) { - // off: keep identity applied; keep estimating cheaply is pointless when off. + if (!gmBuffersReady_ || cfg_.gmMode == 2 ) { + gmEngaged_ = false; gmStableCount_ = 0; - // still refresh the linearization record so a live switch to auto starts clean for (int i = 0; i < 6; ++i) gmRun_[i] = 0.0; for (int i = 0; i < 6; ++i) gmLinAt_[gmSlot][i] = gmRun_[i]; gmLastTransPx_ = 0.0f; @@ -260,31 +202,25 @@ bool FrameGen::updateGlobalMotion(uint32_t gmSlot, VkExtent2D fullExtent) { for (int k = 0; k < kGmStride; ++k) sums[k] += (double)row[k]; } double coverage = sums[27]; - // require a few percent of the level's pixels as inliers double lvlpx = double((fullExtent.width >> kGmLevel) * (fullExtent.height >> kGmLevel)); double minCov = 0.03 * (lvlpx > 0 ? lvlpx : 1.0); if (coverage > minCov && coverage > 64.0) { double H[6][6]; int idx = 0; for (int r = 0; r < 6; ++r) for (int c = r; c < 6; ++c) { H[r][c] = H[c][r] = sums[idx]; ++idx; } double b[6]; for (int i = 0; i < 6; ++i) b[i] = sums[21 + i]; - // Levenberg damping for conditioning (relative + tiny absolute). for (int i = 0; i < 6; ++i) H[i][i] += 1e-3 * H[i][i] + 1e-9; double dp[6]; if (cholSolve6(H, b, dp)) { - // reject wild steps (something non-affine / a scene cut) bool bounded = std::fabs(dp[0]) < 0.5 && std::fabs(dp[1]) < 0.5 && std::fabs(dp[2]) < 0.5 && std::fabs(dp[3]) < 0.5 && std::fabs(dp[4]) < 0.25 && std::fabs(dp[5]) < 0.25; if (bounded) { - // IC update: M_new = M_lin ∘ W(dp)^-1 (compose onto the SLOT's - // linearization base, which is what this reduce linearized around). double Mlin[3][3], Md[3][3], Mdi[3][3], Mnew[3][3]; affFromParams(gmLinAt_[gmSlot], Mlin); affFromParams(dp, Md); if (invAff(Md, Mdi)) { mulAff(Mlin, Mdi, Mnew); double pnew[6]; paramsFromAff(Mnew, pnew); - // final sanity clamp on the composed estimate bool sane = std::fabs(pnew[0]) < 0.6 && std::fabs(pnew[1]) < 0.6 && std::fabs(pnew[2]) < 0.6 && std::fabs(pnew[3]) < 0.6 && std::fabs(pnew[4]) < 0.5 && std::fabs(pnew[5]) < 0.5; @@ -297,17 +233,14 @@ bool FrameGen::updateGlobalMotion(uint32_t gmSlot, VkExtent2D fullExtent) { if (good) ++gmStableCount_; else gmStableCount_ = 0; - // engage policy switch (cfg_.gmMode) { - case 1: gmEngaged_ = gmHaveEst_; break; // on - case 2: gmEngaged_ = false; break; // off (unreachable; handled above) - default: gmEngaged_ = (gmStableCount_ >= 3); break; // auto: 3 consecutive good solves + case 1: gmEngaged_ = gmHaveEst_; break; + case 2: gmEngaged_ = false; break; + default: gmEngaged_ = (gmStableCount_ >= 3); break; } - // record the linearization base for the reduce we are about to dispatch into - // this slot this frame (i.e. the current running estimate). for (int i = 0; i < 6; ++i) gmLinAt_[gmSlot][i] = gmRun_[i]; - gmSlotValid_[gmSlot] = true; // this frame's reduce will (re)write it + gmSlotValid_[gmSlot] = true; gmLastTransPx_ = (float)std::sqrt( (gmRun_[4]*fullExtent.width) * (gmRun_[4]*fullExtent.width) + @@ -330,9 +263,7 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur pFlowReg_, flowRegA_, flowRegB_, gmSsbo_, kLevels, cfg_); } - // ── C1: solve the global-motion affine (reads the SSBO the caller fence-waited) ── bool gmEngaged = updateGlobalMotion(gmSlot, extent_); - // Build this slot's GMUBO from the running / applied affine. if (g_scratch.gmUboPtr[gmSlot]) { GMUBO g{}; g.lin[0]=(float)gmRun_[0]; g.lin[1]=(float)gmRun_[1]; g.lin[2]=(float)gmRun_[2]; g.lin[3]=(float)gmRun_[3]; @@ -340,10 +271,9 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur if (gmEngaged) { g.app[0]=(float)gmRun_[0]; g.app[1]=(float)gmRun_[1]; g.app[2]=(float)gmRun_[2]; g.app[3]=(float)gmRun_[3]; g.appT[0]=(float)gmRun_[4]; g.appT[1]=(float)gmRun_[5]; - } // else app/appT stay 0 -> identity -> prewarp/expand are pre-C1 no-ops + } std::memcpy(g_scratch.gmUboPtr[gmSlot], &g, sizeof(g)); } - // Log engage state + estimated global translation periodically (tag win-fg). { static int lastEng = -1; if (gmEngaged != (lastEng == 1) || (gmFrames_ % 300ull) == 0) { @@ -353,12 +283,10 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur } } - // update UBOs for this frame SynthUBO su{cfg_.flowScale, alpha, cfg_.beta, cfg_.lambda, cfg_.epsilon, cfg_.photoScale, 0, 0, cfg_.hudX0, cfg_.hudY0, cfg_.hudX1, cfg_.hudY1}; if (g_scratch.synthUboPtr) std::memcpy(g_scratch.synthUboPtr, &su, sizeof(su)); - // wire per-frame external views wImg(dd_, device_, g_scratch.sLumaCurr, 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, currView, linear_, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); wImg(dd_, device_, g_scratch.sLumaPrev, 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, prevView, linear_, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); wImg(dd_, device_, g_scratch.sSynth, 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, prevView, linear_, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); @@ -372,23 +300,13 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur }; auto bar = [&](FrameGen::Img& i){ barrier(cmd, i.image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL); }; - // Internal images are created UNDEFINED and fully recomputed every frame, so - // discard-transition them all to GENERAL up front (all descriptors use GENERAL - // for these). This also fixes the first-frame layout (storage writes require - // GENERAL, not UNDEFINED). for (auto& i : pyrA_) barrier(cmd, i.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL); for (auto& i : pyrB_) barrier(cmd, i.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL); for (int l = flowFinest_; l < kLevels; ++l) barrier(cmd, pyrAs_[l].image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL); barrier(cmd, flowExpA_.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL); barrier(cmd, flowExpB_.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL); - // C2: ping-pong scratch to GENERAL (storage writes require it; contents discarded). barrier(cmd, flowRegA_.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL); barrier(cmd, flowRegB_.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL); - // Reset the flow field to zero every frame. The coarsest level uses it as its - // search predictor; carrying it across frames lets a spurious vector feed - // forward until it diverges and melts the image (the bg/fg pause was resetting - // it - that's why artifacts vanished on resume). Fresh zero every frame = - // stable, standard pyramid flow, no feedback loop. { VkClearColorValue zero{}; VkImageSubresourceRange rng{VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; @@ -406,20 +324,14 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur } } - // 1) luma of curr/prev at full res disp(pLuma_, g_scratch.sLumaCurr, levelExtent(extent_, 0)); disp(pLuma_, g_scratch.sLumaPrev, levelExtent(extent_, 0)); bar(pyrA_[0]); bar(pyrB_[0]); - // 2) downsample pyramids for (int l = 1; l < kLevels; ++l) { disp(pDown_, g_scratch.sDownA[l - 1], levelExtent(extent_, l)); disp(pDown_, g_scratch.sDownB[l - 1], levelExtent(extent_, l)); bar(pyrA_[l]); bar(pyrB_[l]); } - // 2b) C1: LK normal-equation reduce (fixed grid, 1/8-res) → this slot's SSBO. - // Reads raw prev/curr luma at kGmLevel; writes per-thread partials. A - // compute→host barrier makes the write visible to the CPU readback that - // happens when this slot comes round again (~1-2 frames later). if (gmBuffersReady_ && g_scratch.sGmReduce[gmSlot]) { dd_->CmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, pGmReduce_.pipeline); dd_->CmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, pGmReduce_.layout, 0, 1, &g_scratch.sGmReduce[gmSlot], 0, nullptr); @@ -429,28 +341,15 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur dd_->CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_HOST_BIT, 0, 1, &mb, 0, nullptr, 0, nullptr); } - // 2c) C1: pre-warp curr luma pyramid by the applied affine → stabilized pyramid - // (identity affine ⇒ exact copy, so the flow below is unchanged when - // disengaged). The dense flow reads pyrAs from here on. for (int l = flowFinest_; l < kLevels; ++l) { disp(pGmPrewarp_, g_scratch.sGmPrewarp[gmSlot][l], levelExtent(extent_, l)); bar(pyrAs_[l]); } - // 3) coarse->fine flow (only down to flowFinest_ - reduced res for perf; the - // finest level is perf_preset-selectable). Curr input is now the STABILIZED - // pyramid (pyrAs), wired in ensureScratch. for (int l = kLevels - 1; l >= flowFinest_; --l) { disp(flowP, g_scratch.sFlow[l], levelExtent(extent_, l)); bar(flowLvl_[l]); } - // 3b) ── C2: TV-L1 flow regularization on the finest residual field ────────── - // Run frIters semi-implicit TV-L1 denoising iterations on flowLvl_[flowFinest_] - // (the object-only residual left by C1). flowLvl_[F] is the fixed data term f0 - // (read, never written here); u ping-pongs A<->B; the final iterate is copied - // back into flowLvl_[F] so of3_expand consumes the cleaned field unchanged. - // Disengaged (frMode==off or frIters==0) ⇒ flowLvl_[F] untouched ⇒ byte-identical - // to pre-C2. Identity/zero iterations is therefore never worse than "no reg". const bool frEngaged = (cfg_.frMode != 2) && (cfg_.frIters > 0); if (frEngaged) { const int F = flowFinest_; @@ -471,9 +370,6 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur bar(*outImg); last = outImg; } - // Copy the cleaned finest flow back into flowLvl_[F] (GENERAL->GENERAL). - // Barrier: C2's f0 reads (SHADER_READ of flowLvl_[F]) and the last iterate - // write must complete before the transfer overwrites/reads. VkMemoryBarrier mb{VK_STRUCTURE_TYPE_MEMORY_BARRIER}; mb.srcAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT; mb.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_TRANSFER_WRITE_BIT; @@ -491,7 +387,7 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur dd_->CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 1, &mb2, 0, nullptr, 0, nullptr); } - { // periodic C2 status (tag win-fg), mirrors the C1 log cadence + { static int lastFr = -1; int fe = frEngaged ? 1 : 0; if (fe != lastFr || (gmFrames_ % 300ull) == 0) { @@ -501,14 +397,11 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur } } - // 4) expand finest solved flow -> fwd/bwd (+conf), + C1 global-motion add-back. disp(expandP, g_scratch.sExpand[gmSlot], levelExtent(extent_, 0)); bar(flowExpA_); bar(flowExpB_); - // 5) synthesise interpolated frame disp(pSynth_, g_scratch.sSynth, levelExtent(extent_, 0)); } -// ---- lazy scratch builder ---- static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, const VkPhysicalDeviceMemoryProperties& mp, VkDescriptorPool pool, VkSampler samp, VkExtent2D ext, @@ -528,7 +421,6 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, makeUbo(dd, dev, mp, sizeof(SynthUBO), S.synthUbo, S.synthUboMem, S.synthUboPtr); makeUbo(dd, dev, mp, sizeof(FlowUBO), S.expandUbo, S.expandUboMem, S.expandUboPtr); if (S.expandUboPtr) { FlowUBO u{cfg.flowScale, 0, 0.6f, 1.6f}; std::memcpy(S.expandUboPtr, &u, sizeof(u)); } - // C2: flow-reg UBO (params refreshed each frame in record() for hot-reload). makeUbo(dd, dev, mp, sizeof(FlowRegUBO), S.flowRegUbo, S.flowRegUboMem, S.flowRegUboPtr); if (S.flowRegUboPtr) { FlowRegUBO fu{cfg.frDt, cfg.frLambda, cfg.frEdge, cfg.frEps}; std::memcpy(S.flowRegUboPtr, &fu, sizeof(fu)); } S.flowUbo.resize(kLevels); S.flowUboMem.resize(kLevels); S.flowUboPtr.resize(kLevels); @@ -536,19 +428,16 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, makeUbo(dd, dev, mp, sizeof(FlowUBO), S.flowUbo[l], S.flowUboMem[l], S.flowUboPtr[l]); if (S.flowUboPtr[l]) { FlowUBO u{cfg.flowScale, (uint32_t)l, 0.6f, 1.6f}; std::memcpy(S.flowUboPtr[l], &u, sizeof(u)); } } - // C1: per-slot GMUBO (initialised to identity) for (int s = 0; s < FrameGen::kGmSlots; ++s) { makeUbo(dd, dev, mp, sizeof(GMUBO), S.gmUbo[s], S.gmUboMem[s], S.gmUboPtr[s]); if (S.gmUboPtr[s]) { GMUBO g{}; std::memcpy(S.gmUboPtr[s], &g, sizeof(g)); } } - // luma sets (external src wired per frame; dst is pyramid[0]) S.sLumaCurr = allocSet(dd, dev, pool, pLuma.setLayout); S.sLumaPrev = allocSet(dd, dev, pool, pLuma.setLayout); wImg(dd, dev, S.sLumaCurr, 48, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, pyrA[0].view, VK_NULL_HANDLE, GEN); wImg(dd, dev, S.sLumaPrev, 48, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, pyrB[0].view, VK_NULL_HANDLE, GEN); - // downsample sets (fixed) S.sDownA.resize(kLevels - 1); S.sDownB.resize(kLevels - 1); for (int l = 1; l < kLevels; ++l) { S.sDownA[l-1] = allocSet(dd, dev, pool, pDown.setLayout); @@ -559,10 +448,6 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, wImg(dd, dev, S.sDownB[l-1], 48, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, pyrB[l].view, VK_NULL_HANDLE, GEN); } - // flow sets (fixed): predictor = coarser flow level, or self at coarsest. - // C1: the CURR input (binding 33) is the STABILIZED pyramid pyrAs for the - // solved flow levels; prev stays raw. Below kFlowFinest the level is never - // dispatched, so leaving those at raw curr is harmless. S.sFlow.resize(kLevels); for (int l = 0; l < kLevels; ++l) { S.sFlow[l] = allocSet(dd, dev, pool, pFlow.setLayout); @@ -575,19 +460,17 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, wImg(dd, dev, S.sFlow[l], 48, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, flowLvl[l].view, VK_NULL_HANDLE, GEN); } - // C1: reduce sets (one per slot) - prev/curr raw luma at kGmLevel + SSBO + GMUBO. if (gmSsbo) { for (int s = 0; s < FrameGen::kGmSlots; ++s) { if (!gmSsbo[s]) continue; S.sGmReduce[s] = allocSet(dd, dev, pool, pGmReduce.setLayout); wUbo (dd, dev, S.sGmReduce[s], 1, S.gmUbo[s], sizeof(GMUBO)); wSsbo(dd, dev, S.sGmReduce[s], 16, gmSsbo[s], VK_WHOLE_SIZE); - wImg (dd, dev, S.sGmReduce[s], 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, pyrB[FrameGen::kGmLevel].view, samp, GEN); // prev = template - wImg (dd, dev, S.sGmReduce[s], 33, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, pyrA[FrameGen::kGmLevel].view, samp, GEN); // curr = image + wImg (dd, dev, S.sGmReduce[s], 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, pyrB[FrameGen::kGmLevel].view, samp, GEN); + wImg (dd, dev, S.sGmReduce[s], 33, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, pyrA[FrameGen::kGmLevel].view, samp, GEN); } } - // C1: prewarp sets (one per slot, per solved flow level) - raw curr in, stabilized out. for (int s = 0; s < FrameGen::kGmSlots; ++s) { S.sGmPrewarp[s].assign(kLevels, VK_NULL_HANDLE); for (int l = fg->flowFinest(); l < kLevels; ++l) { @@ -598,7 +481,6 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, } } - // expand sets (one per slot): flow inputs fixed; binding 1 = that slot's GMUBO. for (int s = 0; s < FrameGen::kGmSlots; ++s) { S.sExpand[s] = allocSet(dd, dev, pool, pExpand.setLayout); wUbo(dd, dev, S.sExpand[s], 0, S.expandUbo, sizeof(FlowUBO)); @@ -608,9 +490,6 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, wImg(dd, dev, S.sExpand[s], 49, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, expB.view, VK_NULL_HANDLE, GEN); } - // C2: flow-reg sets. F = kFlowFinest. f0 (binding 33) = flowLvl_[F] in all; luma - // (binding 34) = prev luma at F (pyrB) for the edge-aware weight. u_in (32) and - // u_out (48) alternate to realize the ping-pong (see ScratchState comment). { const int F = fg->flowFinest(); S.sFlowReg0 = allocSet(dd, dev, pool, pFlowReg.setLayout); @@ -619,26 +498,19 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, VkDescriptorSet all3[3] = {S.sFlowReg0, S.sFlowRegAB, S.sFlowRegBA}; for (VkDescriptorSet s : all3) { wUbo(dd, dev, s, 0, S.flowRegUbo, sizeof(FlowRegUBO)); - wImg(dd, dev, s, 33, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, flowLvl[F].view, samp, GEN); // f0 - wImg(dd, dev, s, 34, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, pyrB[F].view, samp, GEN); // luma + wImg(dd, dev, s, 33, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, flowLvl[F].view, samp, GEN); + wImg(dd, dev, s, 34, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, pyrB[F].view, samp, GEN); } - // iter0: in=flowLvl_[F] (=f0), out=A wImg(dd, dev, S.sFlowReg0, 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, flowLvl[F].view, samp, GEN); wImg(dd, dev, S.sFlowReg0, 48, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, flowRegA.view, VK_NULL_HANDLE, GEN); - // odd iters: in=A, out=B wImg(dd, dev, S.sFlowRegAB, 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, flowRegA.view, samp, GEN); wImg(dd, dev, S.sFlowRegAB, 48, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, flowRegB.view, VK_NULL_HANDLE, GEN); - // even iters (>0): in=B, out=A wImg(dd, dev, S.sFlowRegBA, 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, flowRegB.view, samp, GEN); wImg(dd, dev, S.sFlowRegBA, 48, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, flowRegA.view, VK_NULL_HANDLE, GEN); } - // synth set: external prev/curr/out wired per frame; flow inputs fixed S.sSynth = allocSet(dd, dev, pool, pSynth.setLayout); wUbo(dd, dev, S.sSynth, 0, S.synthUbo, sizeof(SynthUBO)); - // GENERAL (not SR): these internal flow images stay in GENERAL across the whole - // record() (written as storage by expand, sampled here) - see the discard - // transition at the top of record(). wImg(dd, dev, S.sSynth, 34, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, expA.view, samp, GEN); wImg(dd, dev, S.sSynth, 35, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, expB.view, samp, GEN); @@ -646,4 +518,4 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev, return true; } -} // namespace winfg +} diff --git a/app/src/main/cpp/framegen/winfg/vk_dispatch.hpp b/app/src/main/cpp/framegen/winfg/vk_dispatch.hpp index d1a6366ad0..ef259250b0 100644 --- a/app/src/main/cpp/framegen/winfg/vk_dispatch.hpp +++ b/app/src/main/cpp/framegen/winfg/vk_dispatch.hpp @@ -1,7 +1,3 @@ -// win-fg - minimal Vulkan layer dispatch tables. -// Structure follows the public Khronos loader/layer interface and the -// renderdoc "Vulkan layer guide" skeleton (learning references, Apache-2.0 / -// CC-BY). No code from bionic-fg / lsfg / GameScope. #pragma once #include #include @@ -9,53 +5,35 @@ namespace winfg { -// The loader sets the first pointer-sized word of a dispatchable handle to the -// dispatch table pointer; layers key their own maps on that value so that all -// handles sharing a chain resolve to the same table. static inline void* dispatch_key(void* handle) { return *reinterpret_cast(handle); } -// Instance-level functions we call from the layer. struct InstanceDispatch { PFN_vkGetInstanceProcAddr GetInstanceProcAddr = nullptr; PFN_vkDestroyInstance DestroyInstance = nullptr; PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties = nullptr; PFN_vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties = nullptr; - // Device-context logging (affected-device fingerprint). Properties2 is core 1.1; - // may be null on a 1.0 instance - always null-check before calling. PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties = nullptr; PFN_vkGetPhysicalDeviceProperties2 GetPhysicalDeviceProperties2 = nullptr; - // Surface caps - used to clamp the extra-image-headroom request to the surface's - // maxImageCount so the bump never exceeds what the driver can grant. PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR = nullptr; }; -// Device-level functions we call. Populated by walking vkGetDeviceProcAddr on -// the next layer down at device-create time. struct DeviceDispatch { PFN_vkGetDeviceProcAddr GetDeviceProcAddr = nullptr; PFN_vkDestroyDevice DestroyDevice = nullptr; PFN_vkGetDeviceQueue GetDeviceQueue = nullptr; PFN_vkQueueSubmit QueueSubmit = nullptr; - // Synchronization2 submit path (core 1.3 + KHR alias). DXVK may use either the - // legacy QueueSubmit or QueueSubmit2/2KHR; both are hooked for the guest-submit - // diagnostic. May be null if the device did not enable them - always null-check. PFN_vkQueueSubmit2 QueueSubmit2 = nullptr; PFN_vkQueueSubmit2KHR QueueSubmit2KHR = nullptr; PFN_vkQueueWaitIdle QueueWaitIdle = nullptr; PFN_vkDeviceWaitIdle DeviceWaitIdle = nullptr; - // swapchain / present PFN_vkCreateSwapchainKHR CreateSwapchainKHR = nullptr; PFN_vkDestroySwapchainKHR DestroySwapchainKHR = nullptr; PFN_vkGetSwapchainImagesKHR GetSwapchainImagesKHR = nullptr; PFN_vkAcquireNextImageKHR AcquireNextImageKHR = nullptr; - // Alternate acquire entry (VK_KHR_swapchain 1.1+ / device-group). DXVK may use - // either AcquireNextImageKHR or AcquireNextImage2KHR - both hooked for the - // guest-acquire diagnostic. May be null - always null-check. PFN_vkAcquireNextImage2KHR AcquireNextImage2KHR = nullptr; PFN_vkQueuePresentKHR QueuePresentKHR = nullptr; - // resources PFN_vkCreateImage CreateImage = nullptr; PFN_vkDestroyImage DestroyImage = nullptr; PFN_vkCreateImageView CreateImageView = nullptr; @@ -73,7 +51,6 @@ struct DeviceDispatch { PFN_vkCreateSampler CreateSampler = nullptr; PFN_vkDestroySampler DestroySampler = nullptr; - // pipeline / descriptors PFN_vkCreateShaderModule CreateShaderModule = nullptr; PFN_vkDestroyShaderModule DestroyShaderModule = nullptr; PFN_vkCreateDescriptorSetLayout CreateDescriptorSetLayout = nullptr; @@ -84,15 +61,10 @@ struct DeviceDispatch { PFN_vkDestroyPipeline DestroyPipeline = nullptr; PFN_vkCreateDescriptorPool CreateDescriptorPool = nullptr; PFN_vkDestroyDescriptorPool DestroyDescriptorPool = nullptr; - // Frees every set in the pool at once - used by FrameGen::configure() to reclaim - // the old scratch descriptor sets when a perf_preset change forces a live rebuild - // (otherwise repeated preset switches would exhaust the pool). May be null in - // theory; the rebuild path null-checks before calling. PFN_vkResetDescriptorPool ResetDescriptorPool = nullptr; PFN_vkAllocateDescriptorSets AllocateDescriptorSets = nullptr; PFN_vkUpdateDescriptorSets UpdateDescriptorSets = nullptr; - // command recording PFN_vkCreateCommandPool CreateCommandPool = nullptr; PFN_vkDestroyCommandPool DestroyCommandPool = nullptr; PFN_vkAllocateCommandBuffers AllocateCommandBuffers = nullptr; @@ -104,7 +76,7 @@ struct DeviceDispatch { PFN_vkCmdDispatch CmdDispatch = nullptr; PFN_vkCmdPipelineBarrier CmdPipelineBarrier = nullptr; PFN_vkCmdCopyImage CmdCopyImage = nullptr; - PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer = nullptr; // capture readback + PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer = nullptr; PFN_vkCmdBlitImage CmdBlitImage = nullptr; PFN_vkCmdClearColorImage CmdClearColorImage = nullptr; PFN_vkCreateFence CreateFence = nullptr; @@ -120,4 +92,4 @@ static inline void load(PFN& slot, PFN_vkGetDeviceProcAddr gdpa, VkDevice dev, c slot = reinterpret_cast(gdpa(dev, name)); } -} // namespace winfg +} diff --git a/app/src/main/cpp/framegen/winfg/winfg_engine.cpp b/app/src/main/cpp/framegen/winfg/winfg_engine.cpp index c2737e2610..965e15a158 100644 --- a/app/src/main/cpp/framegen/winfg/winfg_engine.cpp +++ b/app/src/main/cpp/framegen/winfg/winfg_engine.cpp @@ -1,4 +1,3 @@ -// See winfg_engine.h. #include "winfg_engine.h" #include "winfg_vkd.h" #include "log.hpp" @@ -8,11 +7,6 @@ namespace winfg { namespace { -// 2x: the guest layer synthesises at 0.35, not 0.5 - biased towards prev to -// cut the double-exposure ghost on HUD/text ("iterative bring-up knob" in -// layer.cpp). Kept for parity, since that is the tuning that was proven. -// 3x/4x: evenly spaced; never exercised by the guest layer, so this is the -// new ground native opens up and the first thing to judge by eye. float alphaFor(uint32_t k, uint32_t n) { if (n <= 1) return 0.35f; return (float)(k + 1) / (float)(n + 1); @@ -30,7 +24,7 @@ VkImageMemoryBarrier bar(VkImage img, VkImageLayout from, VkImageLayout to, return b; } -} // namespace +} Engine::Engine() = default; Engine::~Engine() { destroyRing(); fg_.destroy(); } @@ -65,8 +59,8 @@ bool Engine::prepare(uint32_t w, uint32_t h, VkFormat fmt) { if (unavailable_ || w == 0 || h == 0 || fmt == VK_FORMAT_UNDEFINED) return false; if (builtW_ == w && builtH_ == h && builtFmt_ == fmt && fg_.valid()) return true; - // onResize rebuilds the pyramids/scratch; our own input ring follows it. - if (!fg_.onResize(VkExtent2D{w, h}, fmt, /*force=*/false)) { + + if (!fg_.onResize(VkExtent2D{w, h}, fmt, false)) { WFG_LOGE("native: onResize %ux%u failed; frame generation unavailable", w, h); unavailable_ = true; return false; @@ -83,21 +77,17 @@ bool Engine::prepare(uint32_t w, uint32_t h, VkFormat fmt) { } uint32_t Engine::plan(uint32_t capacity) const { - if (!valid() || history_ < 2) return 0; // need prev AND curr + if (!valid() || history_ < 2) return 0; const uint32_t want = (uint32_t)std::max(cfg_.multiplier - 1, 0); return std::min({want, capacity, kMaxGenerations}); } void Engine::process(VkCommandBuffer cmd, VkImage source, uint32_t w, uint32_t h, - uint32_t /*generations*/) { + uint32_t ) { if (!valid()) return; - // Rotate: the slot we are about to overwrite is the OLD prev; after the - // copy it is the new curr and the other slot is prev. curr_ = 1 - curr_; Slot& dst = ring_[curr_]; - // source is GENERAL (composite render pass leaves it there); the slot may - // be in any layout from last use - UNDEFINED is legal as "discard". VkImageMemoryBarrier pre[2] = { bar(source, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_TRANSFER_READ_BIT), @@ -115,8 +105,6 @@ void Engine::process(VkCommandBuffer cmd, VkImage source, uint32_t w, uint32_t h dd_.CmdCopyImage(cmd, source, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, dst.img, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion); - // source back to GENERAL for the real-frame copy that follows; the new - // curr becomes SHADER_READ_ONLY, which is what the chain samples it as. VkImageMemoryBarrier post[2] = { bar(source, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_IMAGE_LAYOUT_GENERAL, VK_ACCESS_TRANSFER_READ_BIT, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_TRANSFER_READ_BIT), @@ -138,17 +126,11 @@ void Engine::generateInto(VkCommandBuffer cmd, uint32_t generation, uint32_t cou const Slot& curr = ring_[curr_]; if (!prev.valid || !curr.valid) return; - // The chain writes the output through a STORAGE descriptor in GENERAL. - // The composite ring already keeps its targets in GENERAL; make the - // prior contents' writes visible and take ownership for the compute write. VkImageMemoryBarrier toWrite = bar(targetImage, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_SHADER_READ_BIT, VK_ACCESS_SHADER_WRITE_BIT); dd_.CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_TRANSFER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &toWrite); - // gmSlot indexes the C1 global-motion SSBO read back on the CPU next - // frame; kGmSlots (3) >= our frames in flight (2), so rotating per source - // frame keeps a slot from being read while its reduce is still in flight. fg_.record(cmd, prev.view, curr.view, targetView, alphaFor(generation, count), gmSlot_); if (generation + 1 == count) gmSlot_ = (gmSlot_ + 1) % (uint32_t)FrameGen::kGmSlots; @@ -157,7 +139,6 @@ void Engine::generateInto(VkCommandBuffer cmd, uint32_t generation, uint32_t cou void Engine::reset() { history_ = 0; frames_ = 0; } -// ---- input ring -------------------------------------------------------------- uint32_t Engine::memType(uint32_t bits, VkMemoryPropertyFlags props) const { for (uint32_t i = 0; i < memProps_.memoryTypeCount; i++) @@ -201,4 +182,4 @@ void Engine::destroyRing() { history_ = 0; } -} // namespace winfg +} diff --git a/app/src/main/cpp/framegen/winfg/winfg_engine.h b/app/src/main/cpp/framegen/winfg/winfg_engine.h index 13675da991..9a607f5315 100644 --- a/app/src/main/cpp/framegen/winfg/winfg_engine.h +++ b/app/src/main/cpp/framegen/winfg/winfg_engine.h @@ -1,28 +1,4 @@ #pragma once -// ============================================================================ -// winfg_engine - win-fg (Bannerlator's own frame generation) running inside -// the compositor, behind the same contract the LSFG engine uses: -// -// prepare(w, h, format) build/rebuild the chain for this size -// plan(capacity) how many frames to generate this time -// process(cmd, source, w, h, gens) take frame N in (becomes "curr") -// generateInto(cmd, k, n, ...) synthesise generated frame k of n -// -// Why this exists: as a guest-side Vulkan layer, win-fg's generated frames -// had to cross Wine -> DRI3 -> our X server -> the compositor, where the -// per-window latest-wins overwrite dropped them before they were ever -// presented - the HUD counted 2x, the panel got 1x. Here the chain runs in the -// compositor's own command stream and its frames are presented directly, on -// the same multi-present path that is device-proven for LSFG Native. -// -// Unlike LSFG this needs nothing from the user: the ten shaders are ours -// (MIT, see LICENSE.win-fg / NOTICE_FIDELITYFX_OPTICALFLOW.md) and embedded. -// -// The chain (framegen.cpp) is used unmodified. Its inputs are two sampled -// rgba8 views (prev, curr) and its output a GENERAL storage view; the guest -// layer transitions curr to SHADER_READ_ONLY before record() and the output -// UNDEFINED -> GENERAL, so we do exactly the same around the same call. -// ============================================================================ #include #include #include "framegen.hpp" @@ -32,8 +8,6 @@ struct VkTable; namespace winfg { -// Hard ceiling on generated frames per source frame (2x..4x -> 1..3), matching -// the LSFG engine and the drawer's buttons. constexpr uint32_t kMaxGenerations = 3; class Engine { @@ -48,22 +22,15 @@ public: bool valid() const { return fg_.valid() && !unavailable_; } bool unavailable() const { return unavailable_; } - // model 3/4, perf preset 0..2, flow scale - the same knobs the drawer - // already exposes for win-fg; they map straight onto winfg::Config. void configure(uint32_t multiplier, int model, int perfPreset, float flowScale); bool prepare(uint32_t width, uint32_t height, VkFormat format); - // 0 until there is a previous frame to interpolate from. uint32_t plan(uint32_t capacity) const; - // Copy the composited frame into the input ring as "curr" (the previous - // one becomes "prev"). `source` must be in GENERAL. void process(VkCommandBuffer cmd, VkImage source, uint32_t width, uint32_t height, uint32_t generations); - // Synthesise generated frame `generation` of `count` into the storage view. - // The target must be in GENERAL (the composite ring keeps it there). void generateInto(VkCommandBuffer cmd, uint32_t generation, uint32_t count, VkImage targetImage, VkImageView targetView, uint32_t width, uint32_t height); @@ -91,12 +58,12 @@ private: bool unavailable_ = false; Slot ring_[2]; - int curr_ = 0; // index of "curr" in ring_; prev is 1 - curr_ - uint32_t history_ = 0; // frames copied so far (need 2) - uint32_t gmSlot_ = 0; // rotates through FrameGen::kGmSlots + int curr_ = 0; + uint32_t history_ = 0; + uint32_t gmSlot_ = 0; uint32_t builtW_ = 0, builtH_ = 0; VkFormat builtFmt_ = VK_FORMAT_UNDEFINED; uint64_t frames_ = 0; }; -} // namespace winfg +} diff --git a/app/src/main/cpp/framegen/winfg/winfg_vkd.cpp b/app/src/main/cpp/framegen/winfg/winfg_vkd.cpp index d76f357c13..a0c2dd441e 100644 --- a/app/src/main/cpp/framegen/winfg/winfg_vkd.cpp +++ b/app/src/main/cpp/framegen/winfg/winfg_vkd.cpp @@ -1,4 +1,3 @@ -// See winfg_vkd.h. #include "winfg_vkd.h" #include "../VulkanRendererContext.h" #include diff --git a/app/src/main/cpp/framegen/winfg/winfg_vkd.h b/app/src/main/cpp/framegen/winfg/winfg_vkd.h index 59d27bf2e3..8faffc8266 100644 --- a/app/src/main/cpp/framegen/winfg/winfg_vkd.h +++ b/app/src/main/cpp/framegen/winfg/winfg_vkd.h @@ -1,19 +1,4 @@ #pragma once -// ============================================================================ -// winfg_vkd - fill win-fg's own dispatch tables from the renderer's VkTable. -// -// win-fg's chain (framegen.cpp / record_impl.inc) was written as a Vulkan -// LAYER and calls through winfg::DeviceDispatch / InstanceDispatch. Inside the -// compositor there is no layer chain to resolve those from, so they are filled -// from the renderer's per-context table instead - the same bridge lsfg_vkd -// provides for the LSFG chain, for the same reason: an adrenotools driver -// shares no global symbols with the system loader. -// -// Only the entry points the chain actually calls are filled (36 device-level -// plus GetPhysicalDeviceMemoryProperties); everything else in the structs -// stays null and is never reached. winfgVkdInit reports a false if any of -// those failed to resolve, so a null is never called mid-frame. -// ============================================================================ #include "vk_dispatch.hpp" struct VkTable; bool winfgVkdInit(const VkTable& table, winfg::DeviceDispatch& dd, winfg::InstanceDispatch& id); diff --git a/app/src/main/cpp/questxr/CMakeLists.txt b/app/src/main/cpp/questxr/CMakeLists.txt new file mode 100644 index 0000000000..c23558bb0b --- /dev/null +++ b/app/src/main/cpp/questxr/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.22.1) +project(droiddeckxr C CXX) +find_package(OpenXR REQUIRED CONFIG) +add_library(droiddeckxr_glue STATIC ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c) +target_include_directories(droiddeckxr_glue PUBLIC ${ANDROID_NDK}/sources/android/native_app_glue) +add_library(droiddeckxr SHARED quest_xr.cpp) +target_compile_features(droiddeckxr PRIVATE cxx_std_17) +target_compile_definitions(droiddeckxr PRIVATE XR_USE_PLATFORM_ANDROID XR_USE_GRAPHICS_API_OPENGL_ES XR_USE_TIMESPEC) +target_compile_options(droiddeckxr PRIVATE -Wall -Wextra -Wno-missing-field-initializers -Werror=return-type) +target_link_options(droiddeckxr PRIVATE -Wl,-z,max-page-size=16384 -uANativeActivity_onCreate) +target_link_libraries(droiddeckxr PRIVATE droiddeckxr_glue OpenXR::openxr_loader EGL GLESv3 android log) + +target_include_directories(droiddeckxr PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../tools/vr/src) diff --git a/app/src/main/cpp/questxr/gpu_frames.h b/app/src/main/cpp/questxr/gpu_frames.h new file mode 100644 index 0000000000..dc69dbbfb6 --- /dev/null +++ b/app/src/main/cpp/questxr/gpu_frames.h @@ -0,0 +1,201 @@ +#pragma once +#include +#include +#include +#include +#include "xr_gpu_channel.h" + +class QuestGpuFrames { +public: + bool Start(const std::string &filename, EGLDisplay display) { + const char *extensions = reinterpret_cast(glGetString(GL_EXTENSIONS)); + const char *eglExtensions = eglQueryString(display, EGL_EXTENSIONS); + if (!extensions || !eglExtensions || !strstr(extensions, "GL_EXT_external_buffer") + || !strstr(eglExtensions, "EGL_ANDROID_get_native_client_buffer")) return false; + storage_ = reinterpret_cast(eglGetProcAddress("glBufferStorageExternalEXT")); + client_ = reinterpret_cast(eglGetProcAddress("eglGetNativeClientBufferANDROID")); + if (strstr(extensions, "GL_OES_texture_view")) view_ = reinterpret_cast(eglGetProcAddress("glTextureViewOES")); + else if (strstr(extensions, "GL_EXT_texture_view")) view_ = reinterpret_cast(eglGetProcAddress("glTextureViewEXT")); + if (!storage_ || !client_ || !view_ || filename.size() >= sizeof(sockaddr_un::sun_path)) return false; + const char *source = "#version 310 es\nlayout(local_size_x=8,local_size_y=8)in;" + "layout(std430,binding=0)readonly buffer Source{uint pixels[];};" + "layout(rgba8,binding=0)writeonly uniform highp image2D target;uniform bool bgra;" + "void main(){ivec2 p=ivec2(gl_GlobalInvocationID.xy),size=imageSize(target);" + "if(any(greaterThanEqual(p,size)))return;vec4 value=unpackUnorm4x8(pixels[p.y*size.x+p.x]);" + "imageStore(target,p,bgra?value.bgra:value);}"; + GLuint shader = glCreateShader(GL_COMPUTE_SHADER); glShaderSource(shader, 1, &source, nullptr); glCompileShader(shader); + program_ = glCreateProgram(); glAttachShader(program_, shader); glLinkProgram(program_); glDeleteShader(shader); + GLint linked{}; glGetProgramiv(program_, GL_LINK_STATUS, &linked); + if (!linked) { Stop(); return false; } + lock_ = open((filename + ".lock").c_str(), O_CREAT | O_RDWR | O_CLOEXEC | O_NOFOLLOW, 0600); + struct stat status{}; + if (lock_ < 0 || fstat(lock_, &status) || !S_ISREG(status.st_mode) || status.st_uid != getuid() + || flock(lock_, LOCK_EX | LOCK_NB)) { Stop(); return false; } + if (lstat(filename.c_str(), &status) == 0) { + if (!S_ISSOCK(status.st_mode) || status.st_uid != getuid() || unlink(filename.c_str())) { Stop(); return false; } + } else if (errno != ENOENT) { Stop(); return false; } + listener_ = socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); + sockaddr_un address{}; address.sun_family = AF_UNIX; strcpy(address.sun_path, filename.c_str()); + if (listener_ < 0 || bind(listener_, reinterpret_cast(&address), sizeof(address))) { Stop(); return false; } + filename_ = filename; + if (chmod(filename.c_str(), 0600) || listen(listener_, 2)) { Stop(); return false; } + return true; + } + + bool Take(DroidDeckXrFrameHeader &header, GLuint &texture) { + if (listener_ < 0) return false; + if (peer_ < 0) { + peer_ = accept4(listener_, nullptr, nullptr, SOCK_CLOEXEC | SOCK_NONBLOCK); + if (peer_ < 0) return false; + if (!xr_frame_peer(peer_)) { Disconnect(); return false; } + configured_ = false; deadline_ = xr_frame_now() + 2000000000LL; + } + pollfd ready{peer_, POLLIN, 0}; + if (poll(&ready, 1, 0) <= 0) { + if (!configured_ && xr_frame_now() > deadline_) Disconnect(); + return false; + } + if (!(ready.revents & POLLIN)) { Disconnect(); return false; } + if (!configured_) { + XrGpuRequest request; + if (!xr_gpu_receive(peer_, &request, sizeof(request)) || request.magic != XR_GPU_MAGIC + || request.version != XR_GPU_VERSION || !xr_gpu_dimensions(request.width, request.height) + || !Allocate(request.width, request.height)) { Disconnect(); return false; } + XrGpuPoolInfo info; info.width = width_; info.height = height_; + for (unsigned index = 0; index < XR_GPU_SLOTS; index++) info.sizes[index] = sizes_[index]; + configured_ = xr_gpu_send(peer_, &info, sizeof(info), fds_.data(), fds_.size()); + for (int &fd : fds_) { if (fd >= 0) close(fd); fd = -1; } + if (!configured_) Disconnect(); + return false; + } + XrGpuFrame frame; + if (!xr_gpu_receive(peer_, &frame, sizeof(frame))) { Disconnect(); return false; } + auto state = xr_gpu_frame_state(frame, width_, height_, lastFrame_, xr_frame_now()); + if (state == XrGpuFrameState::Invalid) { + rejected_++; Disconnect(); return false; + } + lastFrame_ = frame.header.frame_id; + if (state == XrGpuFrameState::Stale) { + // No GPU read was submitted, so the producer can safely reclaim a dropped frame. + dropped_++; + if (!xr_gpu_send(peer_, &frame.header.frame_id, sizeof(frame.header.frame_id))) Disconnect(); + return false; + } + if (!Output()) { Disconnect(); return false; } + glMemoryBarrier(GL_ALL_BARRIER_BITS); + glUseProgram(program_); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, buffers_[frame.slot]); + glUniform1i(glGetUniformLocation(program_, "bgra"), !!(frame.flags & XR_GPU_BGRA)); + glBindImageTexture(0, raw_, 0, GL_FALSE, 0, GL_WRITE_ONLY, GL_RGBA8); + glDispatchCompute((width_ + 7) / 8, (height_ + 7) / 8, 1); + glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT | GL_SHADER_IMAGE_ACCESS_BARRIER_BIT); + // The producer may overwrite this slot only after the native GPU has finished reading it. + glFinish(); + if (glGetError() != GL_NO_ERROR) { rejected_++; Disconnect(); return false; } + if (!xr_gpu_send(peer_, &frame.header.frame_id, sizeof(frame.header.frame_id))) Disconnect(); + received_++; + header = frame.header; + texture = header.color_space == DROIDDECK_XR_COLOR_SRGB_RGBA8 ? srgb_ : raw_; + return true; + } + + uint64_t Received() const { return received_; } + uint64_t Rejected() const { return rejected_; } + uint64_t Dropped() const { return dropped_; } + void Stop() { + Disconnect(); DropPool(); + glDeleteTextures(1, &srgb_); glDeleteTextures(1, &raw_); srgb_ = raw_ = 0; + if (program_) glDeleteProgram(program_); program_ = 0; + if (listener_ >= 0) close(listener_); listener_ = -1; + if (!filename_.empty()) unlink(filename_.c_str()); filename_.clear(); + if (lock_ >= 0) close(lock_); lock_ = -1; + } +private: + int listener_ = -1, peer_ = -1, lock_ = -1; + std::string filename_; + bool configured_ = false; + int64_t deadline_{}; + uint32_t width_{}, height_{}, outputWidth_{}, outputHeight_{}; + uint64_t lastFrame_{}, received_{}, rejected_{}, dropped_{}; + std::array hardware_{}; + std::array buffers_{}; + std::array fds_{{-1, -1, -1}}; + std::array sizes_{}; + GLuint raw_{}, srgb_{}, program_{}; + PFNGLBUFFERSTORAGEEXTERNALEXTPROC storage_{}; + PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC client_{}; + PFNGLTEXTUREVIEWOESPROC view_{}; + + void Disconnect() { if (peer_ >= 0) close(peer_); peer_ = -1; configured_ = false; lastFrame_ = 0; } + void DropPool() { + if (buffers_[0]) glFinish(); + glDeleteBuffers(buffers_.size(), buffers_.data()); buffers_.fill(0); + for (auto *&buffer : hardware_) { if (buffer) AHardwareBuffer_release(buffer); buffer = nullptr; } + for (int &fd : fds_) { if (fd >= 0) close(fd); fd = -1; } + } + static int AllocationFd(AHardwareBuffer *buffer, uint64_t bytes, uint64_t &allocation) { + int pair[2]; + if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, pair)) return -1; + if (AHardwareBuffer_sendHandleToUnixSocket(buffer, pair[0])) { close(pair[0]); close(pair[1]); return -1; } + close(pair[0]); + int selected = -1; unsigned candidates = 0; + for (;;) { + unsigned char data[1024]; iovec bytesReceived{data, sizeof(data)}; + alignas(cmsghdr) unsigned char control[CMSG_SPACE(32 * sizeof(int))]{}; + msghdr message{}; message.msg_iov = &bytesReceived; message.msg_iovlen = 1; + message.msg_control = control; message.msg_controllen = sizeof(control); + ssize_t result = recvmsg(pair[1], &message, MSG_CMSG_CLOEXEC); + if (result < 0 && errno == EINTR) continue; + if (result <= 0) break; + for (auto *item = CMSG_FIRSTHDR(&message); item; item = CMSG_NXTHDR(&message, item)) { + if (item->cmsg_level != SOL_SOCKET || item->cmsg_type != SCM_RIGHTS) continue; + auto *fds = reinterpret_cast(CMSG_DATA(item)); + for (unsigned index = 0; index < (item->cmsg_len - CMSG_LEN(0)) / sizeof(int); index++) { + struct stat status{}; + if (!fstat(fds[index], &status) && status.st_size >= static_cast(bytes) + && status.st_size <= static_cast(bytes + 65536)) { + candidates++; if (selected >= 0) close(selected); + selected = fds[index]; allocation = status.st_size; + } else close(fds[index]); + } + } + if (message.msg_flags & (MSG_TRUNC | MSG_CTRUNC)) { candidates = 0; break; } + } + close(pair[1]); + if (candidates != 1) { if (selected >= 0) close(selected); return -1; } + return selected; + } + bool Allocate(uint32_t width, uint32_t height) { + DropPool(); width_ = width; height_ = height; + const uint64_t bytes = uint64_t(width) * height * 4; + GLint64 limit{}; glGetInteger64v(GL_MAX_SHADER_STORAGE_BLOCK_SIZE, &limit); + if (bytes > static_cast(limit)) return false; + AHardwareBuffer_Desc description{}; description.width = bytes; description.height = description.layers = 1; + description.format = AHARDWAREBUFFER_FORMAT_BLOB; + description.usage = AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER; + glGenBuffers(buffers_.size(), buffers_.data()); + for (unsigned index = 0; index < XR_GPU_SLOTS; index++) { + if (AHardwareBuffer_allocate(&description, &hardware_[index])) { DropPool(); return false; } + fds_[index] = AllocationFd(hardware_[index], bytes, sizes_[index]); + if (fds_[index] < 0) { DropPool(); return false; } + glBindBuffer(GL_SHADER_STORAGE_BUFFER, buffers_[index]); + storage_(GL_SHADER_STORAGE_BUFFER, 0, bytes, client_(hardware_[index]), 0); + if (glGetError() != GL_NO_ERROR) { DropPool(); return false; } + } + glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0); + return true; + } + bool Output() { + if (raw_ && outputWidth_ == width_ && outputHeight_ == height_) return true; + glDeleteTextures(1, &srgb_); glDeleteTextures(1, &raw_); srgb_ = raw_ = 0; + glGenTextures(1, &raw_); glBindTexture(GL_TEXTURE_2D, raw_); + glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, width_, height_); + glGenTextures(1, &srgb_); view_(srgb_, GL_TEXTURE_2D, raw_, GL_SRGB8_ALPHA8, 0, 1, 0, 1); + for (GLuint texture : {raw_, srgb_}) { + glBindTexture(GL_TEXTURE_2D, texture); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + } + outputWidth_ = width_; outputHeight_ = height_; + return glGetError() == GL_NO_ERROR; + } +}; diff --git a/app/src/main/cpp/questxr/quest_xr.cpp b/app/src/main/cpp/questxr/quest_xr.cpp new file mode 100644 index 0000000000..09423c7d1a --- /dev/null +++ b/app/src/main/cpp/questxr/quest_xr.cpp @@ -0,0 +1,777 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "xr_tracking.h" +#include "xr_frame_channel.h" +#include "xr_frame_math.h" +#include "gpu_frames.h" + +static void check(XrResult result, const char *operation) { + if (XR_FAILED(result)) throw std::runtime_error(std::string(operation) + ": " + std::to_string(result)); +} + +struct Eye { + XrSwapchain swapchain = XR_NULL_HANDLE; + int width = 0, height = 0; + std::vector images; +}; + +class QuestXR { +public: + explicit QuestXR(android_app *app) : app_(app) {} + ~QuestXR() { cleanup(); } + + void run() { + initialize(); + while (!app_->destroyRequested && !exit_) { + android_poll_source *source = nullptr; + int events = 0; + int pollTimeout = running_ ? 0 : 100; + for (int eventCount = 0; eventCount < 32; eventCount++) { + if (ALooper_pollOnce(pollTimeout, nullptr, &events, reinterpret_cast(&source)) < 0) break; + if (source) source->process(app_, source); + if (app_->destroyRequested) break; + pollTimeout = 0; + } + receiveFrame(); + pollEvents(); + if (running_ && !app_->destroyRequested) frame(); + } + if (exit_ && !app_->destroyRequested) ANativeActivity_finish(app_->activity); + } + + void health(const char *error = "") { + int steamvrState = -1; + if (statusCallback_) { + steamvrState = env_->CallIntMethod(app_->activity->clazz, statusCallback_); + if (env_->ExceptionCheck()) { env_->ExceptionClear(); steamvrState = -1; } + } + std::string path = std::string(app_->activity->externalDataPath) + "/xr-health.json"; + std::string temp = path + ".tmp"; + FILE *file = std::fopen(temp.c_str(), "w"); + if (!file) return; + std::fprintf(file, + "{\"frames\":%llu,\"rendered\":%llu,\"sessionState\":%d,\"headFlags\":%llu," + "\"headPosition\":[%.6f,%.6f,%.6f],\"controllersActive\":[%s,%s]," + "\"periodNs\":%lld,\"surfaceSwapchain\":%s,\"source\":\"%s\",\"guestFrames\":%lld,\"steamvrState\":%d," + "\"receivedFrames\":%llu,\"rejectedFrames\":%llu,\"uploadedFrames\":%llu,\"sourceFrameId\":%llu," + "\"gpuReceivedFrames\":%llu,\"gpuDroppedFrames\":%llu,\"gpuVerifiedFrameId\":%llu,\"gpuChecksum\":%u,\"error\":\"%s\"}\n", + (unsigned long long)frames_, (unsigned long long)rendered_, state_, + (unsigned long long)head_.locationFlags, + head_.pose.position.x, head_.pose.position.y, head_.pose.position.z, + handActive_[0] ? "true" : "false", handActive_[1] ? "true" : "false", + (long long)period_, "false", "frames", + 0LL, steamvrState, (unsigned long long)(receiver_.Received() + gpuFrames_.Received()), + (unsigned long long)(receiver_.Rejected() + gpuFrames_.Rejected()), + (unsigned long long)uploadedFrames_, (unsigned long long)sourceHeader_.frame_id, + (unsigned long long)gpuFrames_.Received(), (unsigned long long)gpuFrames_.Dropped(), + (unsigned long long)verifiedFrame_, gpuChecksum_, error); + std::fclose(file); + std::rename(temp.c_str(), path.c_str()); + } + +private: + android_app *app_; + JNIEnv *env_ = nullptr; + XrInstance instance_ = XR_NULL_HANDLE; + XrSession session_ = XR_NULL_HANDLE; + XrSystemId system_ = XR_NULL_SYSTEM_ID; + XrSpace world_ = XR_NULL_HANDLE, view_ = XR_NULL_HANDLE; + XrActionSet actions_ = XR_NULL_HANDLE; + XrAction grip_ = XR_NULL_HANDLE, trigger_ = XR_NULL_HANDLE, vibration_ = XR_NULL_HANDLE; + XrAction squeeze_ = XR_NULL_HANDLE, stick_ = XR_NULL_HANDLE, stickClick_ = XR_NULL_HANDLE; + XrAction primary_ = XR_NULL_HANDLE, secondary_ = XR_NULL_HANDLE, menu_ = XR_NULL_HANDLE; + XrAction triggerTouch_ = XR_NULL_HANDLE, stickTouch_ = XR_NULL_HANDLE, primaryTouch_ = XR_NULL_HANDLE; + XrAction secondaryTouch_ = XR_NULL_HANDLE, thumbrestTouch_ = XR_NULL_HANDLE; + DroidDeckXrHand inputs_[2]{}; + PFN_xrConvertTimeToTimespecTimeKHR convertTime_ = nullptr; + bool timespecSupported_ = false; + PFN_xrPerfSettingsSetPerformanceLevelEXT setPerformance_ = nullptr; + bool performanceSupported_ = false; + XrPath hands_[2]{}; + XrSpace handSpaces_[2]{}; + XrSpaceLocation head_{XR_TYPE_SPACE_LOCATION}; + XrSpaceLocation handLocations_[2]{{XR_TYPE_SPACE_LOCATION}, {XR_TYPE_SPACE_LOCATION}}; + bool handActive_[2]{}; + bool running_ = false, exit_ = false, quitRequested_ = false; + bool guestAttached_ = false, verifyPixels_ = false; + XrFrameReceiver receiver_; + QuestGpuFrames gpuFrames_; + DroidDeckXrFrameHeader sourceHeader_{}; + uint64_t uploadedFrames_ = 0, verifiedFrame_ = 0; + uint32_t gpuChecksum_ = 0; + GLuint sourceTexture_ = 0, sourceProgram_ = 0; + GLuint cpuTexture_ = 0; + jmethodID frameCallback_ = nullptr; + jmethodID activeCallback_ = nullptr; + jmethodID statusCallback_ = nullptr; + DroidDeckXrTracking *tracking_ = nullptr; + DroidDeckXrHaptics *haptics_ = nullptr; + uint64_t lastPulse_[2]{}; + XrSessionState state_ = XR_SESSION_STATE_UNKNOWN; + uint64_t frames_ = 0, rendered_ = 0; + XrDuration period_ = 0; + EGLDisplay display_ = EGL_NO_DISPLAY; + EGLContext context_ = EGL_NO_CONTEXT; + EGLSurface surface_ = EGL_NO_SURFACE; + std::array eyes_; + GLuint framebuffer_ = 0, vertexArray_ = 0; + GLint sourceEncoding_ = 0, eyeEncoding_ = 0; + + std::string captureRequest() { + if (frames_ % 9) return {}; + std::string file = std::string(app_->activity->externalDataPath) + "/xr-capture.request"; + FILE *request = std::fopen(file.c_str(), "r"); + if (!request) return {}; + char token[34]{}; + size_t size = std::fread(token, 1, sizeof(token) - 1, request); + std::fclose(request); + unlink(file.c_str()); + if (size != 32 || std::strspn(token, "0123456789abcdef") != 32) return {}; + unlink((std::string(app_->activity->externalDataPath) + "/xr-capture.json").c_str()); + return token; + } + + bool captureTexture(GLuint texture, int width, int height, const char *name) { + glBindFramebuffer(GL_FRAMEBUFFER, framebuffer_); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0); + GLint encoding = 0; + glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &encoding); + if (!std::strcmp(name, "source")) sourceEncoding_ = encoding; + else eyeEncoding_ = encoding; + std::vector pixels((size_t)width * height * 4); + glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels.data()); + bool ok = glGetError() == GL_NO_ERROR; + glBindFramebuffer(GL_FRAMEBUFFER, 0); + if (!ok) return false; + std::string file = std::string(app_->activity->externalDataPath) + + "/xr-capture-" + name + ".ppm"; + std::string temporary = file + ".tmp"; + FILE *output = std::fopen(temporary.c_str(), "wb"); + if (!output) return false; + ok = std::fprintf(output, "P6\n%d %d\n255\n", width, height) > 0; + std::vector row((size_t)width * 3); + for (int y = height - 1; y >= 0 && ok; y--) { + for (int x = 0; x < width; x++) + std::memcpy(row.data() + x * 3, pixels.data() + ((size_t)y * width + x) * 4, 3); + ok = std::fwrite(row.data(), 1, row.size(), output) == row.size(); + } + if (std::fclose(output) != 0) ok = false; + if (!ok) { unlink(temporary.c_str()); return false; } + return std::rename(temporary.c_str(), file.c_str()) == 0; + } + + void captureResult(const std::string &token, bool ok, bool valid, + const XrCompositionLayerProjectionView (&views)[2], XrTime displayTime) { + std::string file = std::string(app_->activity->externalDataPath) + "/xr-capture.json"; + std::string temporary = file + ".tmp"; + FILE *output = std::fopen(temporary.c_str(), "w"); + if (!output) return; + std::fprintf(output, "{\"id\":\"%s\",\"ok\":%s,\"validLayer\":%s,\"frame\":%llu," + "\"sourceFrameId\":%llu,\"displayTime\":%lld,\"sessionState\":%d,\"eyes\":[", + token.c_str(), ok ? "true" : "false", valid ? "true" : "false", + (unsigned long long)frames_, (unsigned long long)sourceHeader_.frame_id, (long long)displayTime, state_); + for (int eye = 0; eye < 2; eye++) { + const auto &pose = views[eye].pose; + const auto &fov = views[eye].fov; + std::fprintf(output, "%s{\"width\":%d,\"height\":%d,\"position\":[%g,%g,%g]," + "\"orientation\":[%g,%g,%g,%g],\"fov\":[%g,%g,%g,%g]}", + eye ? "," : "", eyes_[eye].width, eyes_[eye].height, + pose.position.x, pose.position.y, pose.position.z, + pose.orientation.x, pose.orientation.y, pose.orientation.z, pose.orientation.w, + fov.angleLeft, fov.angleRight, fov.angleUp, fov.angleDown); + } + const char *extensions = reinterpret_cast(glGetString(GL_EXTENSIONS)); + const bool srgbControl = extensions && std::strstr(extensions, "GL_EXT_sRGB_write_control"); + std::fprintf(output, "],\"sourceImage\":true,\"sourceColorSpace\":\"%s\",\"sourceEncoding\":%d,\"eyeEncoding\":%d," + "\"srgbWriteControl\":%s,\"srgbWriteEnabled\":%s}\n", + sourceHeader_.color_space == DROIDDECK_XR_COLOR_SRGB_RGBA8 ? "srgb" : "linear", sourceEncoding_, eyeEncoding_, + srgbControl ? "true" : "false", srgbControl && glIsEnabled(0x8DB9) ? "true" : "false"); + if (std::fclose(output) == 0) std::rename(temporary.c_str(), file.c_str()); + } + + XrPath path(const char *text) { + XrPath result{}; + check(xrStringToPath(instance_, text, &result), "xrStringToPath"); + return result; + } + + void initialize() { + app_->userData = this; + app_->onInputEvent = [](android_app *app, AInputEvent *event) -> int32_t { + if (AInputEvent_getType(event) != AINPUT_EVENT_TYPE_KEY || AKeyEvent_getKeyCode(event) != AKEYCODE_BACK + || AKeyEvent_getAction(event) != AKEY_EVENT_ACTION_UP) return 0; + auto *runtime = static_cast(app->userData); + if (runtime->running_) { + XrResult result = xrRequestExitSession(runtime->session_); + if (XR_SUCCEEDED(result)) runtime->quitRequested_ = true; + else __android_log_print(ANDROID_LOG_ERROR, "DroidDeckXR", "exit request failed: %d", result); + } else ANativeActivity_finish(app->activity); + return 1; + }; + app_->activity->vm->AttachCurrentThread(&env_, nullptr); + jclass activityClass = env_->GetObjectClass(app_->activity->clazz); + jmethodID getIntent = env_->GetMethodID(activityClass, "getIntent", "()Landroid/content/Intent;"); + jobject intent = env_->CallObjectMethod(app_->activity->clazz, getIntent); + jclass intentClass = env_->GetObjectClass(intent); + jmethodID getBoolean = env_->GetMethodID(intentClass, "getBooleanExtra", "(Ljava/lang/String;Z)Z"); + jstring extra = env_->NewStringUTF("frame_verify"); + verifyPixels_ = env_->CallBooleanMethod(intent, getBoolean, extra, JNI_FALSE); + env_->DeleteLocalRef(extra); + activeCallback_ = env_->GetMethodID(activityClass, "onXrActive", "(Z)V"); + frameCallback_ = env_->GetMethodID(activityClass, "onXrFrame", "(J)V"); + statusCallback_ = env_->GetMethodID(activityClass, "onXrStatus", "()I"); + if (env_->ExceptionCheck()) { env_->ExceptionClear(); throw std::runtime_error("XR activity bridge methods unavailable"); } + env_->DeleteLocalRef(intentClass); env_->DeleteLocalRef(intent); env_->DeleteLocalRef(activityClass); + PFN_xrInitializeLoaderKHR initializeLoader = nullptr; + check(xrGetInstanceProcAddr(XR_NULL_HANDLE, "xrInitializeLoaderKHR", + reinterpret_cast(&initializeLoader)), "loader init entrypoint"); + XrLoaderInitInfoAndroidKHR loader{XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR}; + loader.applicationVM = app_->activity->vm; + loader.applicationContext = app_->activity->clazz; + check(initializeLoader(reinterpret_cast(&loader)), "xrInitializeLoaderKHR"); + uint32_t count = 0; + check(xrEnumerateInstanceExtensionProperties(nullptr, 0, &count, nullptr), "extensions count"); + std::vector extensions(count, {XR_TYPE_EXTENSION_PROPERTIES}); + check(xrEnumerateInstanceExtensionProperties(nullptr, count, &count, extensions.data()), "extensions"); + for (const auto &extension : extensions) { + if (!std::strcmp(extension.extensionName, XR_KHR_CONVERT_TIMESPEC_TIME_EXTENSION_NAME)) + timespecSupported_ = true; + if (!std::strcmp(extension.extensionName, XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME)) + performanceSupported_ = true; + } + std::vector enabled{XR_KHR_ANDROID_CREATE_INSTANCE_EXTENSION_NAME, XR_KHR_OPENGL_ES_ENABLE_EXTENSION_NAME}; + if (timespecSupported_) enabled.push_back(XR_KHR_CONVERT_TIMESPEC_TIME_EXTENSION_NAME); + if (performanceSupported_) enabled.push_back(XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME); + XrInstanceCreateInfoAndroidKHR androidInfo{XR_TYPE_INSTANCE_CREATE_INFO_ANDROID_KHR}; + androidInfo.applicationVM = app_->activity->vm; + androidInfo.applicationActivity = app_->activity->clazz; + XrInstanceCreateInfo create{XR_TYPE_INSTANCE_CREATE_INFO}; + create.next = &androidInfo; + std::strcpy(create.applicationInfo.applicationName, "DroidDeck XR"); + create.applicationInfo.applicationVersion = 1; + create.applicationInfo.apiVersion = XR_MAKE_VERSION(1, 0, 0); + create.enabledExtensionCount = enabled.size(); + create.enabledExtensionNames = enabled.data(); + check(xrCreateInstance(&create, &instance_), "xrCreateInstance"); + if (performanceSupported_) { + XrResult result = xrGetInstanceProcAddr(instance_, "xrPerfSettingsSetPerformanceLevelEXT", + reinterpret_cast(&setPerformance_)); + if (XR_FAILED(result)) setPerformance_ = nullptr; + } + if (timespecSupported_) check(xrGetInstanceProcAddr(instance_, "xrConvertTimeToTimespecTimeKHR", + reinterpret_cast(&convertTime_)), "time conversion entrypoint"); + XrSystemGetInfo systemInfo{XR_TYPE_SYSTEM_GET_INFO}; + systemInfo.formFactor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY; + check(xrGetSystem(instance_, &systemInfo, &system_), "xrGetSystem"); + PFN_xrGetOpenGLESGraphicsRequirementsKHR requirementsFunction = nullptr; + check(xrGetInstanceProcAddr(instance_, "xrGetOpenGLESGraphicsRequirementsKHR", + reinterpret_cast(&requirementsFunction)), "GLES requirements entrypoint"); + XrGraphicsRequirementsOpenGLESKHR requirements{XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR}; + check(requirementsFunction(instance_, system_, &requirements), "GLES requirements"); + if (requirements.minApiVersionSupported > XR_MAKE_VERSION(3, 0, 0) + || requirements.maxApiVersionSupported < XR_MAKE_VERSION(3, 0, 0)) + throw std::runtime_error("Runtime does not support GLES 3.0"); + display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY); + if (!eglInitialize(display_, nullptr, nullptr)) throw std::runtime_error("eglInitialize failed"); + const EGLint attributes[] = {EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT, EGL_SURFACE_TYPE, EGL_PBUFFER_BIT | EGL_WINDOW_BIT, + EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_DEPTH_SIZE, 24, EGL_NONE}; + EGLConfig config{}; + EGLint found = 0; + if (!eglChooseConfig(display_, attributes, &config, 1, &found) || found != 1) + throw std::runtime_error("EGL config unavailable"); + const EGLint contextAttributes[] = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE}; + context_ = eglCreateContext(display_, config, EGL_NO_CONTEXT, contextAttributes); + const EGLint surfaceAttributes[] = {EGL_WIDTH, 16, EGL_HEIGHT, 16, EGL_NONE}; + surface_ = eglCreatePbufferSurface(display_, config, surfaceAttributes); + if (!eglMakeCurrent(display_, surface_, surface_, context_)) throw std::runtime_error("eglMakeCurrent failed"); + XrGraphicsBindingOpenGLESAndroidKHR binding{XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR}; + binding.display = display_; binding.config = config; binding.context = context_; + XrSessionCreateInfo sessionInfo{XR_TYPE_SESSION_CREATE_INFO}; + sessionInfo.next = &binding; sessionInfo.systemId = system_; + check(xrCreateSession(instance_, &sessionInfo, &session_), "xrCreateSession"); + XrReferenceSpaceCreateInfo reference{XR_TYPE_REFERENCE_SPACE_CREATE_INFO}; + reference.poseInReferenceSpace.orientation.w = 1; + reference.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_STAGE; + XrResult referenceResult = xrCreateReferenceSpace(session_, &reference, &world_); + if (referenceResult == XR_ERROR_REFERENCE_SPACE_UNSUPPORTED) { + reference.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_LOCAL; + reference.poseInReferenceSpace.position.y = -1.6f; + check(xrCreateReferenceSpace(session_, &reference, &world_), "local standing space"); + } else check(referenceResult, "stage space"); + reference.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_VIEW; + reference.poseInReferenceSpace.position.y = 0; + check(xrCreateReferenceSpace(session_, &reference, &view_), "view space"); + initializeActions(); + initializeImages(); + initializeGraphics(); + initializeTracking(); + { + std::string filename = std::string(app_->activity->internalDataPath) + "/.wayland-rt/" DROIDDECK_XR_FRAME_SOCKET; + if (!receiver_.Start(filename)) throw std::runtime_error("XR frame receiver unavailable"); + bool gpu = !verifyPixels_ && gpuFrames_.Start(std::string(app_->activity->internalDataPath) + "/.wayland-rt/" DROIDDECK_XR_GPU_SOCKET, display_); + __android_log_print(ANDROID_LOG_INFO, "DroidDeckXR", "GPU frame channel available=%d", gpu); + } + health(); + } + + void initializeActions() { + hands_[0] = path("/user/hand/left"); hands_[1] = path("/user/hand/right"); + XrActionSetCreateInfo setInfo{XR_TYPE_ACTION_SET_CREATE_INFO}; + std::strcpy(setInfo.actionSetName, "quest"); std::strcpy(setInfo.localizedActionSetName, "Quest controllers"); + check(xrCreateActionSet(instance_, &setInfo, &actions_), "action set"); + auto action = [&](const char *name, XrActionType type, XrAction *handle) { + XrActionCreateInfo info{XR_TYPE_ACTION_CREATE_INFO}; + std::strcpy(info.actionName, name); std::strcpy(info.localizedActionName, name); + info.actionType = type; info.countSubactionPaths = 2; info.subactionPaths = hands_; + check(xrCreateAction(actions_, &info, handle), "create action"); + }; + action("grip_pose", XR_ACTION_TYPE_POSE_INPUT, &grip_); + action("trigger", XR_ACTION_TYPE_FLOAT_INPUT, &trigger_); + action("squeeze", XR_ACTION_TYPE_FLOAT_INPUT, &squeeze_); + action("stick", XR_ACTION_TYPE_VECTOR2F_INPUT, &stick_); + action("stick_click", XR_ACTION_TYPE_BOOLEAN_INPUT, &stickClick_); + action("primary", XR_ACTION_TYPE_BOOLEAN_INPUT, &primary_); + action("secondary", XR_ACTION_TYPE_BOOLEAN_INPUT, &secondary_); + action("menu", XR_ACTION_TYPE_BOOLEAN_INPUT, &menu_); + action("trigger_touch", XR_ACTION_TYPE_BOOLEAN_INPUT, &triggerTouch_); + action("stick_touch", XR_ACTION_TYPE_BOOLEAN_INPUT, &stickTouch_); + action("primary_touch", XR_ACTION_TYPE_BOOLEAN_INPUT, &primaryTouch_); + action("secondary_touch", XR_ACTION_TYPE_BOOLEAN_INPUT, &secondaryTouch_); + action("thumbrest_touch", XR_ACTION_TYPE_BOOLEAN_INPUT, &thumbrestTouch_); + action("vibration", XR_ACTION_TYPE_VIBRATION_OUTPUT, &vibration_); + std::vector bindings; + for (const char *hand : {"left", "right"}) { + std::string root = std::string("/user/hand/") + hand; + bindings.push_back({grip_, path((root + "/input/grip/pose").c_str())}); + bindings.push_back({trigger_, path((root + "/input/trigger/value").c_str())}); + bindings.push_back({triggerTouch_, path((root + "/input/trigger/touch").c_str())}); + bindings.push_back({squeeze_, path((root + "/input/squeeze/value").c_str())}); + bindings.push_back({stick_, path((root + "/input/thumbstick").c_str())}); + bindings.push_back({stickClick_, path((root + "/input/thumbstick/click").c_str())}); + bindings.push_back({stickTouch_, path((root + "/input/thumbstick/touch").c_str())}); + bindings.push_back({thumbrestTouch_, path((root + "/input/thumbrest/touch").c_str())}); + bindings.push_back({primary_, path((root + (std::strcmp(hand, "left") == 0 ? "/input/x/click" : "/input/a/click")).c_str())}); + bindings.push_back({secondary_, path((root + (std::strcmp(hand, "left") == 0 ? "/input/y/click" : "/input/b/click")).c_str())}); + bindings.push_back({primaryTouch_, path((root + (std::strcmp(hand, "left") == 0 ? "/input/x/touch" : "/input/a/touch")).c_str())}); + bindings.push_back({secondaryTouch_, path((root + (std::strcmp(hand, "left") == 0 ? "/input/y/touch" : "/input/b/touch")).c_str())}); + bindings.push_back({vibration_, path((root + "/output/haptic").c_str())}); + } + bindings.push_back({menu_, path("/user/hand/left/input/menu/click")}); + XrInteractionProfileSuggestedBinding suggestion{XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING}; + suggestion.interactionProfile = path("/interaction_profiles/oculus/touch_controller"); + suggestion.countSuggestedBindings = bindings.size(); suggestion.suggestedBindings = bindings.data(); + check(xrSuggestInteractionProfileBindings(instance_, &suggestion), "Touch bindings"); + XrSessionActionSetsAttachInfo attach{XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO}; + attach.countActionSets = 1; attach.actionSets = &actions_; + check(xrAttachSessionActionSets(session_, &attach), "attach actions"); + for (int hand = 0; hand < 2; hand++) { + XrActionSpaceCreateInfo space{XR_TYPE_ACTION_SPACE_CREATE_INFO}; + space.action = grip_; space.subactionPath = hands_[hand]; space.poseInActionSpace.orientation.w = 1; + check(xrCreateActionSpace(session_, &space, &handSpaces_[hand]), "controller space"); + } + } + + void initializeImages() { + uint32_t count = 0; + check(xrEnumerateViewConfigurationViews(instance_, system_, XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO, + 0, &count, nullptr), "view count"); + if (count != 2) throw std::runtime_error("Expected two stereo views"); + std::vector views(count, {XR_TYPE_VIEW_CONFIGURATION_VIEW}); + check(xrEnumerateViewConfigurationViews(instance_, system_, XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO, + count, &count, views.data()), "view configuration"); + check(xrEnumerateSwapchainFormats(session_, 0, &count, nullptr), "format count"); + std::vector formats(count); + check(xrEnumerateSwapchainFormats(session_, count, &count, formats.data()), "formats"); + int64_t format = 0; + for (int64_t candidate : formats) if (candidate == GL_SRGB8_ALPHA8) format = candidate; + if (!format) throw std::runtime_error("sRGB swapchain unavailable"); + for (int eye = 0; eye < 2; eye++) { + Eye &target = eyes_[eye]; + target.width = views[eye].recommendedImageRectWidth; + target.height = views[eye].recommendedImageRectHeight; + XrSwapchainCreateInfo create{XR_TYPE_SWAPCHAIN_CREATE_INFO}; + create.usageFlags = XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT; + create.format = format; create.sampleCount = 1; + create.width = target.width; create.height = target.height; + create.faceCount = 1; create.arraySize = 1; create.mipCount = 1; + check(xrCreateSwapchain(session_, &create, &target.swapchain), "swapchain"); + check(xrEnumerateSwapchainImages(target.swapchain, 0, &count, nullptr), "image count"); + target.images.resize(count, {XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR}); + check(xrEnumerateSwapchainImages(target.swapchain, count, &count, + reinterpret_cast(target.images.data())), "images"); + } + } + + void initializeTracking() { + std::string directory = std::string(app_->activity->internalDataPath) + "/.wayland-rt"; + if (mkdir(directory.c_str(), 0700) != 0 && errno != EEXIST) + throw std::runtime_error("XR tracking directory unavailable"); + auto mapFile = [&](const char *name, size_t size) { + std::string filename = directory + "/" + name; + int descriptor = open(filename.c_str(), O_CREAT | O_RDWR | O_CLOEXEC, 0600); + if (descriptor < 0) throw std::runtime_error("XR IPC file unavailable"); + if (ftruncate(descriptor, size) != 0) { + close(descriptor); throw std::runtime_error("XR IPC file size failed"); + } + void *mapping = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, descriptor, 0); + close(descriptor); + if (mapping == MAP_FAILED) throw std::runtime_error("XR IPC map failed"); + return mapping; + }; + tracking_ = static_cast(mapFile(DROIDDECK_XR_FILE, sizeof(DroidDeckXrTracking))); + haptics_ = static_cast(mapFile(DROIDDECK_XR_HAPTIC_FILE, sizeof(DroidDeckXrHaptics))); + haptics_->magic = DROIDDECK_XR_HAPTIC_MAGIC; haptics_->version = DROIDDECK_XR_VERSION; + for (int hand = 0; hand < 2; hand++) lastPulse_[hand] = haptics_->hands[hand].id; + } + + static DroidDeckXrPose posePacket(const XrPosef &pose, XrSpaceLocationFlags flags) { + return {{pose.orientation.x, pose.orientation.y, pose.orientation.z, pose.orientation.w}, + {pose.position.x, pose.position.y, pose.position.z}, (uint32_t)flags}; + } + + void publishTracking(const XrView views[2], XrTime predicted) { + if (!tracking_) return; + timespec now{}; clock_gettime(CLOCK_MONOTONIC, &now); + DroidDeckXrTracking packet{}; + packet.magic = DROIDDECK_XR_MAGIC; packet.version = DROIDDECK_XR_VERSION; + packet.active = state_ == XR_SESSION_STATE_VISIBLE || state_ == XR_SESSION_STATE_FOCUSED; + packet.sampled_ns = (int64_t)now.tv_sec * 1000000000LL + now.tv_nsec; + if (convertTime_) { + timespec displayTime{}; + check(convertTime_(instance_, predicted, &displayTime), "display time conversion"); + packet.predicted_ns = (int64_t)displayTime.tv_sec * 1000000000LL + displayTime.tv_nsec; + } + packet.period_ns = period_; + packet.head = posePacket(head_.pose, head_.locationFlags); + for (int eye = 0; eye < 2; eye++) { + packet.eyes[eye].pose = posePacket(views[eye].pose, head_.locationFlags); + packet.eyes[eye].fov[0] = views[eye].fov.angleLeft; + packet.eyes[eye].fov[1] = views[eye].fov.angleRight; + packet.eyes[eye].fov[2] = views[eye].fov.angleUp; + packet.eyes[eye].fov[3] = views[eye].fov.angleDown; + packet.eyes[eye].width = eyes_[eye].width; packet.eyes[eye].height = eyes_[eye].height; + packet.hands[eye] = inputs_[eye]; + packet.hands[eye].pose = posePacket(handLocations_[eye].pose, handLocations_[eye].locationFlags); + packet.hands[eye].active = handActive_[eye]; + } + uint32_t sequence = __atomic_load_n(&tracking_->seq, __ATOMIC_RELAXED); + __atomic_store_n(&tracking_->seq, sequence | 1u, __ATOMIC_SEQ_CST); + __atomic_thread_fence(__ATOMIC_SEQ_CST); + std::memcpy(tracking_, &packet, offsetof(DroidDeckXrTracking, seq)); + std::memcpy(reinterpret_cast(tracking_) + offsetof(DroidDeckXrTracking, active), + reinterpret_cast(&packet) + offsetof(DroidDeckXrTracking, active), + sizeof(packet) - offsetof(DroidDeckXrTracking, active)); + __atomic_store_n(&tracking_->seq, (sequence | 1u) + 1u, __ATOMIC_RELEASE); + } + + void attachGuest(bool attach) { + if (attach == guestAttached_) return; + env_->CallVoidMethod(app_->activity->clazz, activeCallback_, static_cast(attach)); + if (env_->ExceptionCheck()) { + env_->ExceptionDescribe(); env_->ExceptionClear(); throw std::runtime_error("Guest XR handshake failed"); + } + guestAttached_ = attach; + } + + void pollHaptics() { + if (!haptics_) return; + DroidDeckXrHaptics packet{}; + uint32_t sequence = __atomic_load_n(&haptics_->seq, __ATOMIC_ACQUIRE); + if (sequence & 1u) return; + std::memcpy(&packet, haptics_, sizeof(packet)); + __atomic_thread_fence(__ATOMIC_ACQUIRE); + if (__atomic_load_n(&haptics_->seq, __ATOMIC_RELAXED) != sequence + || packet.magic != DROIDDECK_XR_HAPTIC_MAGIC || packet.version != DROIDDECK_XR_VERSION) return; + for (int hand = 0; hand < 2; hand++) { + const auto &pulse = packet.hands[hand]; + if (pulse.id == lastPulse_[hand]) continue; + lastPulse_[hand] = pulse.id; + if (state_ != XR_SESSION_STATE_FOCUSED || !handActive_[hand] + || pulse.duration_ns < 1000000 || pulse.duration_ns > 1000000000 + || !std::isfinite(pulse.amplitude) || pulse.amplitude < 0 || pulse.amplitude > 1 + || !std::isfinite(pulse.frequency) || pulse.frequency < 0) continue; + XrHapticActionInfo info{XR_TYPE_HAPTIC_ACTION_INFO}; info.action = vibration_; info.subactionPath = hands_[hand]; + XrHapticVibration vibration{XR_TYPE_HAPTIC_VIBRATION}; + vibration.duration = pulse.duration_ns; vibration.amplitude = pulse.amplitude; vibration.frequency = pulse.frequency; + check(xrApplyHapticFeedback(session_, &info, reinterpret_cast(&vibration)), "guest haptics"); + } + } + + GLuint shader(GLenum type, const char *text) { + GLuint handle = glCreateShader(type); + glShaderSource(handle, 1, &text, nullptr); glCompileShader(handle); + GLint success = 0; glGetShaderiv(handle, GL_COMPILE_STATUS, &success); + if (!success) { glDeleteShader(handle); throw std::runtime_error("Shader compile failed"); } + return handle; + } + + void initializeGraphics() { + glGenFramebuffers(1, &framebuffer_); + glGenVertexArrays(1, &vertexArray_); + GLuint vertex = shader(GL_VERTEX_SHADER, + "#version 300 es\nout vec2 uv; uniform float eye; void main(){vec2 coordinate=vec2(float((gl_VertexID<<1)&2),float(gl_VertexID&2));uv=vec2(coordinate.x*0.5+eye*0.5,1.0-coordinate.y);gl_Position=vec4(coordinate*2.0-1.0,0.0,1.0);}"); + GLuint fragment = shader(GL_FRAGMENT_SHADER, + "#version 300 es\nprecision highp float; in vec2 uv; uniform sampler2D source; uniform float eye; out vec4 outputColor; void main(){float edge=0.5/float(textureSize(source,0).x);vec2 coordinate=vec2(clamp(uv.x,eye*0.5+edge,(eye+1.0)*0.5-edge),uv.y);outputColor=texture(source,coordinate);}"); + sourceProgram_ = glCreateProgram(); glAttachShader(sourceProgram_, vertex); glAttachShader(sourceProgram_, fragment); + glLinkProgram(sourceProgram_); glDeleteShader(vertex); glDeleteShader(fragment); + GLint linked = 0; glGetProgramiv(sourceProgram_, GL_LINK_STATUS, &linked); + if (!linked) throw std::runtime_error("Frame shader link failed"); + glGenTextures(1, &sourceTexture_); glBindTexture(GL_TEXTURE_2D, sourceTexture_); + cpuTexture_ = sourceTexture_; + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + } + + void receiveFrame() { + if (gpuFrames_.Take(sourceHeader_, sourceTexture_)) { + uploadedFrames_++; + if (uploadedFrames_ % 72 == 1) health(); + return; + } + DroidDeckXrPixels frame; + if (!receiver_.Take(&frame)) return; + GLint maximum = 0; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maximum); + if (frame.header.width > static_cast(maximum) || frame.header.height > static_cast(maximum)) + throw std::runtime_error("XR source exceeds GPU texture limit"); + sourceTexture_ = cpuTexture_; + glBindTexture(GL_TEXTURE_2D, sourceTexture_); + GLenum encoding = frame.header.color_space == DROIDDECK_XR_COLOR_SRGB_RGBA8 ? GL_SRGB8_ALPHA8 : GL_RGBA8; + glTexImage2D(GL_TEXTURE_2D, 0, encoding, frame.header.width, frame.header.height, 0, + GL_RGBA, GL_UNSIGNED_BYTE, frame.pixels.data()); + if (verifyPixels_) { + glBindFramebuffer(GL_FRAMEBUFFER, framebuffer_); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, sourceTexture_, 0); + if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) + throw std::runtime_error("Frame readback framebuffer incomplete"); + std::vector readback(frame.header.bytes); + glReadPixels(0, 0, frame.header.width, frame.header.height, GL_RGBA, GL_UNSIGNED_BYTE, readback.data()); + if (readback != frame.pixels) throw std::runtime_error("Frame GPU readback does not match owned pixels"); + gpuChecksum_ = 2166136261u; + for (unsigned char value : readback) gpuChecksum_ = (gpuChecksum_ ^ value) * 16777619u; + verifiedFrame_ = frame.header.frame_id; + glBindFramebuffer(GL_FRAMEBUFFER, 0); + } + if (glGetError() != GL_NO_ERROR) throw std::runtime_error("Frame texture upload failed"); + sourceHeader_ = frame.header; + receiver_.Recycle(std::move(frame.pixels)); + uploadedFrames_++; + if (verifyPixels_ || uploadedFrames_ % 72 == 1) health(); + } + + void render(Eye &eye, uint32_t image) { + glBindFramebuffer(GL_FRAMEBUFFER, framebuffer_); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, eye.images[image].image, 0); + if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) + throw std::runtime_error("Incomplete eye framebuffer"); + { + glViewport(0, 0, eye.width, eye.height); glDisable(GL_DEPTH_TEST); + glUseProgram(sourceProgram_); glBindVertexArray(vertexArray_); + glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, sourceTexture_); + glUniform1i(glGetUniformLocation(sourceProgram_, "source"), 0); + glUniform1f(glGetUniformLocation(sourceProgram_, "eye"), &eye == &eyes_[1] ? 1.f : 0.f); + glDrawArrays(GL_TRIANGLES, 0, 3); + } + glBindFramebuffer(GL_FRAMEBUFFER, 0); + if (glGetError() != GL_NO_ERROR) throw std::runtime_error("OpenGL render error"); + glFlush(); + } + + void pollEvents() { + XrEventDataBuffer event{XR_TYPE_EVENT_DATA_BUFFER}; + XrResult result; + while ((result = xrPollEvent(instance_, &event)) == XR_SUCCESS) { + if (event.type == XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED) { + state_ = reinterpret_cast(&event)->state; + __android_log_print(ANDROID_LOG_INFO, "DroidDeckXR", "session state=%d", state_); + attachGuest(state_ == XR_SESSION_STATE_VISIBLE || state_ == XR_SESSION_STATE_FOCUSED); + if (state_ == XR_SESSION_STATE_READY) { + XrSessionBeginInfo begin{XR_TYPE_SESSION_BEGIN_INFO}; + begin.primaryViewConfigurationType = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO; + check(xrBeginSession(session_, &begin), "xrBeginSession"); running_ = true; + if (setPerformance_) { + for (auto domain : {XR_PERF_SETTINGS_DOMAIN_CPU_EXT, XR_PERF_SETTINGS_DOMAIN_GPU_EXT}) { + XrResult request = setPerformance_(session_, domain, XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT); + __android_log_print(ANDROID_LOG_INFO, "DroidDeckXR", "sustained performance domain=%d result=%d", domain, request); + } + } + } else if (state_ == XR_SESSION_STATE_STOPPING) { + check(xrEndSession(session_), "xrEndSession"); running_ = false; + if (quitRequested_) exit_ = true; + } else if (state_ == XR_SESSION_STATE_EXITING || state_ == XR_SESSION_STATE_LOSS_PENDING) exit_ = true; + health(); + } else if (event.type == XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING) exit_ = true; + else if (event.type == XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT) { + const auto &performance = *reinterpret_cast(&event); + __android_log_print(ANDROID_LOG_INFO, "DroidDeckXR", "performance domain=%d subdomain=%d level=%d->%d", + performance.domain, performance.subDomain, performance.fromLevel, performance.toLevel); + } + event = {XR_TYPE_EVENT_DATA_BUFFER}; + } + check(result, "xrPollEvent"); + } + + void frame() { + XrFrameWaitInfo wait{XR_TYPE_FRAME_WAIT_INFO}; + XrFrameState frameState{XR_TYPE_FRAME_STATE}; + check(xrWaitFrame(session_, &wait, &frameState), "xrWaitFrame"); + period_ = frameState.predictedDisplayPeriod; + XrFrameBeginInfo begin{XR_TYPE_FRAME_BEGIN_INFO}; check(xrBeginFrame(session_, &begin), "xrBeginFrame"); + check(xrLocateSpace(view_, world_, frameState.predictedDisplayTime, &head_), "head pose"); + if (state_ == XR_SESSION_STATE_FOCUSED) { + XrActiveActionSet active{actions_, XR_NULL_PATH}; + XrActionsSyncInfo sync{XR_TYPE_ACTIONS_SYNC_INFO}; sync.countActiveActionSets = 1; sync.activeActionSets = &active; + check(xrSyncActions(session_, &sync), "xrSyncActions"); + for (int hand = 0; hand < 2; hand++) { + XrActionStateGetInfo get{XR_TYPE_ACTION_STATE_GET_INFO}; get.action = grip_; get.subactionPath = hands_[hand]; + XrActionStatePose pose{XR_TYPE_ACTION_STATE_POSE}; check(xrGetActionStatePose(session_, &get, &pose), "grip state"); + handActive_[hand] = pose.isActive; + check(xrLocateSpace(handSpaces_[hand], world_, frameState.predictedDisplayTime, &handLocations_[hand]), "hand pose"); + get.action = trigger_; + XrActionStateFloat trigger{XR_TYPE_ACTION_STATE_FLOAT}; check(xrGetActionStateFloat(session_, &get, &trigger), "trigger state"); + inputs_[hand].trigger = trigger.isActive ? trigger.currentState : 0; + get.action = squeeze_; + XrActionStateFloat squeeze{XR_TYPE_ACTION_STATE_FLOAT}; check(xrGetActionStateFloat(session_, &get, &squeeze), "squeeze state"); + inputs_[hand].squeeze = squeeze.isActive ? squeeze.currentState : 0; + get.action = stick_; + XrActionStateVector2f stick{XR_TYPE_ACTION_STATE_VECTOR2F}; check(xrGetActionStateVector2f(session_, &get, &stick), "stick state"); + inputs_[hand].stick[0] = stick.isActive ? stick.currentState.x : 0; + inputs_[hand].stick[1] = stick.isActive ? stick.currentState.y : 0; + inputs_[hand].buttons = 0; + const std::pair buttons[] = { + {stickClick_, DROIDDECK_XR_STICK_CLICK}, {primary_, DROIDDECK_XR_PRIMARY_CLICK}, + {secondary_, DROIDDECK_XR_SECONDARY_CLICK}, {menu_, DROIDDECK_XR_MENU_CLICK}, + {triggerTouch_, DROIDDECK_XR_TRIGGER_TOUCH}, {stickTouch_, DROIDDECK_XR_STICK_TOUCH}, + {primaryTouch_, DROIDDECK_XR_PRIMARY_TOUCH}, {secondaryTouch_, DROIDDECK_XR_SECONDARY_TOUCH}, + {thumbrestTouch_, DROIDDECK_XR_THUMBREST_TOUCH}}; + for (const auto &button : buttons) { + get.action = button.first; + XrActionStateBoolean value{XR_TYPE_ACTION_STATE_BOOLEAN}; check(xrGetActionStateBoolean(session_, &get, &value), "button state"); + if (value.isActive && value.currentState) inputs_[hand].buttons |= button.second; + } + } + } else handActive_[0] = handActive_[1] = false; + pollHaptics(); + XrViewLocateInfo locate{XR_TYPE_VIEW_LOCATE_INFO}; locate.viewConfigurationType = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO; + locate.displayTime = frameState.predictedDisplayTime; locate.space = world_; + XrViewState viewState{XR_TYPE_VIEW_STATE}; uint32_t count = 0; + XrView views[2]{{XR_TYPE_VIEW}, {XR_TYPE_VIEW}}; + check(xrLocateViews(session_, &locate, &viewState, 2, &count, views), "xrLocateViews"); + publishTracking(views, frameState.predictedDisplayTime); + if (guestAttached_) { + timespec now{}; clock_gettime(CLOCK_MONOTONIC, &now); + env_->CallVoidMethod(app_->activity->clazz, frameCallback_, (jlong)now.tv_sec * 1000000000LL + now.tv_nsec); + if (env_->ExceptionCheck()) { env_->ExceptionClear(); throw std::runtime_error("Guest frame callback failed"); } + } + XrCompositionLayerProjectionView projection[2]{{XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW}, {XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW}}; + bool valid = frameState.shouldRender && count == 2 && + (viewState.viewStateFlags & (XR_VIEW_STATE_ORIENTATION_VALID_BIT | XR_VIEW_STATE_POSITION_VALID_BIT)) + == (XR_VIEW_STATE_ORIENTATION_VALID_BIT | XR_VIEW_STATE_POSITION_VALID_BIT); + { + valid = valid && sourceHeader_.frame_id && xr_frame_now() - sourceHeader_.captured_ns < 500000000LL; + if (valid) for (int eye = 0; eye < 2; eye++) { + auto source = xr_frame_view(sourceHeader_, eye); + views[eye].pose.orientation = {source.orientation[0], source.orientation[1], source.orientation[2], source.orientation[3]}; + views[eye].pose.position = {source.position[0], source.position[1], source.position[2]}; + views[eye].fov = {source.fov[0], source.fov[1], source.fov[2], source.fov[3]}; + } + } + const std::string capture = captureRequest(); + bool captured = valid; + if (!capture.empty() && valid) + captured = captureTexture(sourceTexture_, sourceHeader_.width, sourceHeader_.height, "source"); + if (valid) for (int eye = 0; eye < 2; eye++) { + uint32_t image = 0; + XrSwapchainImageAcquireInfo acquire{XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO}; + check(xrAcquireSwapchainImage(eyes_[eye].swapchain, &acquire, &image), "acquire image"); + XrSwapchainImageWaitInfo imageWait{XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO}; imageWait.timeout = XR_INFINITE_DURATION; + check(xrWaitSwapchainImage(eyes_[eye].swapchain, &imageWait), "wait image"); + render(eyes_[eye], image); + if (!capture.empty()) captured = captureTexture(eyes_[eye].images[image].image, eyes_[eye].width, eyes_[eye].height, eye ? "right" : "left") && captured; + XrSwapchainImageReleaseInfo release{XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO}; + check(xrReleaseSwapchainImage(eyes_[eye].swapchain, &release), "release image"); + projection[eye].pose = views[eye].pose; projection[eye].fov = views[eye].fov; + projection[eye].subImage.swapchain = eyes_[eye].swapchain; + projection[eye].subImage.imageRect.extent = {eyes_[eye].width, eyes_[eye].height}; + } + XrCompositionLayerProjection layer{XR_TYPE_COMPOSITION_LAYER_PROJECTION}; + layer.space = world_; layer.viewCount = 2; layer.views = projection; + const XrCompositionLayerBaseHeader *layers[] = {reinterpret_cast(&layer)}; + XrFrameEndInfo end{XR_TYPE_FRAME_END_INFO}; end.displayTime = frameState.predictedDisplayTime; + end.environmentBlendMode = XR_ENVIRONMENT_BLEND_MODE_OPAQUE; end.layerCount = valid ? 1 : 0; end.layers = layers; + check(xrEndFrame(session_, &end), "xrEndFrame"); + if (!capture.empty()) captureResult(capture, captured, valid, projection, frameState.predictedDisplayTime); + frames_++; if (valid) rendered_++; + if (frames_ % 72 == 0) { + health(); + __android_log_print(ANDROID_LOG_INFO, "DroidDeckXR", "frames=%llu rendered=%llu head=%llu hands=%d,%d period=%lld", + (unsigned long long)frames_, (unsigned long long)rendered_, (unsigned long long)head_.locationFlags, + handActive_[0], handActive_[1], (long long)period_); + } + } + + void cleanup() { + receiver_.Stop(); + gpuFrames_.Stop(); + try { attachGuest(false); } catch (const std::exception &error) { + __android_log_print(ANDROID_LOG_ERROR, "DroidDeckXR", "cleanup: %s", error.what()); + } + if (tracking_) { + __atomic_store_n(&tracking_->active, 0u, __ATOMIC_RELEASE); + munmap(tracking_, sizeof(DroidDeckXrTracking)); + } + if (haptics_) munmap(haptics_, sizeof(DroidDeckXrHaptics)); + if (display_ != EGL_NO_DISPLAY && context_ != EGL_NO_CONTEXT) { + glDeleteFramebuffers(1, &framebuffer_); glDeleteVertexArrays(1, &vertexArray_); + glDeleteTextures(1, &cpuTexture_); glDeleteProgram(sourceProgram_); + } + for (auto &eye : eyes_) if (eye.swapchain) xrDestroySwapchain(eye.swapchain); + for (auto space : handSpaces_) if (space) xrDestroySpace(space); + if (view_) xrDestroySpace(view_); if (world_) xrDestroySpace(world_); + if (session_) xrDestroySession(session_); + if (actions_) xrDestroyActionSet(actions_); + if (instance_) xrDestroyInstance(instance_); + if (display_ != EGL_NO_DISPLAY) { + eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (surface_ != EGL_NO_SURFACE) eglDestroySurface(display_, surface_); + if (context_ != EGL_NO_CONTEXT) eglDestroyContext(display_, context_); + eglTerminate(display_); + } + if (env_) app_->activity->vm->DetachCurrentThread(); + } +}; + +void android_main(android_app *app) { + QuestXR runtime(app); + try { runtime.run(); } + catch (const std::exception &error) { + __android_log_print(ANDROID_LOG_ERROR, "DroidDeckXR", "%s", error.what()); + runtime.health(error.what()); + ANativeActivity_finish(app->activity); + } +} diff --git a/app/src/main/cpp/scanout/ScanoutContext.h b/app/src/main/cpp/scanout/ScanoutContext.h index e14a82a9b5..0981366408 100644 --- a/app/src/main/cpp/scanout/ScanoutContext.h +++ b/app/src/main/cpp/scanout/ScanoutContext.h @@ -1,17 +1,5 @@ #pragma once -// Renderer-neutral direct-scanout implementation (Android SurfaceControl / -// SurfaceFlinger). Pure NDK: dlsym'd ASurfaceControl_* / ASurfaceTransaction_* -// plus AHardwareBuffer_*. It contains ZERO Vulkan/GL/EGL calls and ZERO -// render-thread coupling: the owning renderer drives it through the public -// surface below and decides WHEN the deferred cursor transaction is applied -// (the Vulkan path defers to its render loop; a GL path would apply inline). -// -// Extracted verbatim from VulkanRendererContext / VulkanRendererScanout.cpp -// (P0 of the GL direct-scanout plan). The only intended semantic change vs the -// old code is that the cursor render-thread signalling (needsRender / dirtyCV) -// stays in the owner: setCursorImage()/setCursorPos() return whether an apply -// became pending so the owner can signal its loop exactly as before. #include #include @@ -27,50 +15,34 @@ class ScanoutContext { public: - // --- API load / lifecycle --- bool loadApi(); - // Fallback path: creates the child SurfaceControls under the owner's own - // ANativeWindow. Passing a window updates the stored fallback window. void initFromWindow(ANativeWindow* win = nullptr); - // Primary path: wraps the two sibling game/cursor windows (handed in by the - // owner) as ASurfaceControls. Takes ownership and releases both windows. void initFromWindows(ANativeWindow* gameWin, ANativeWindow* cursorWin); void destroy(); - // --- per-frame game buffer (applies its transaction INLINE) --- void setBuffer(AHardwareBuffer* ahb, int x, int y, int w, int h, int fenceFd = -1); - // --- cursor: pure state-setters. They mutate state only and DO NOT signal - // any render thread. Each returns true if a deferred apply is now - // pending (i.e. the owner should arrange for applyPendingCursor()). bool setCursorImage(void* pixels, short w, short h, short stride); bool setCursorPos(short x, short y, short hotX, short hotY); - // Applies the pending cursor image/position transaction. Safe to call from - // any thread (a SurfaceControl transaction apply is thread-safe). The Vulkan - // owner calls this from its render loop; an inline owner may call it directly. void applyPendingCursor(); - // --- geometry / sizing fed by the owner --- void setDst(int x, int y, int w, int h); void setContainerSize(int w, int h) { containerWidth = w; containerHeight = h; } void setSurfaceSize(int w, int h) { surfaceWidth = w; surfaceHeight = h; } void setFallbackWindow(ANativeWindow* win) { window = win; } void setVerboseLog(bool v) { verboseLog = v; } - // --- queries --- bool isActive() const { return scanoutActive.load(); } bool isGameFrameDelivered() const { return gameFrameDelivered.load(std::memory_order_acquire); } void* debugGameSC() const { return scanoutGameSC; } - // Public so the owner can expose them through its existing ABI without a - // second source of truth (Vulkan binds references to these). std::atomic scanoutActive{false}; std::atomic gameFrameDelivered{false}; private: - ANativeWindow* window = nullptr; // owner's own window, for the fallback path + ANativeWindow* window = nullptr; bool verboseLog = true; int surfaceWidth = 0, surfaceHeight = 0, containerWidth = 0, containerHeight = 0; diff --git a/app/src/main/cpp/sdnative/sdnative.c b/app/src/main/cpp/sdnative/sdnative.c index aa928b8561..c7ec580abb 100644 --- a/app/src/main/cpp/sdnative/sdnative.c +++ b/app/src/main/cpp/sdnative/sdnative.c @@ -1,11 +1,3 @@ -/* - * One function: the release fence the fake-input ring writer needs. - * - * FakeInputWriter publishes events into a shared-memory ring that libfakeinput.so reads from - * another process. Java's memory model says nothing about what a foreign reader sees, so the - * writer calls this between filling the events and advancing the sequence counter: everything - * written before it is visible to the reader before the counter moves. - */ #include #include diff --git a/app/src/main/cpp/shaders/cas_frag.h b/app/src/main/cpp/shaders/cas_frag.h index 21347e38d1..103c2cce42 100644 --- a/app/src/main/cpp/shaders/cas_frag.h +++ b/app/src/main/cpp/shaders/cas_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t cas_code[] = { 0x07230203,0x00010000,0x0008000b,0x000000f3,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/color_frag.h b/app/src/main/cpp/shaders/color_frag.h index bde543ab47..7026c7c880 100644 --- a/app/src/main/cpp/shaders/color_frag.h +++ b/app/src/main/cpp/shaders/color_frag.h @@ -1,4 +1,3 @@ - // 1116.5.0 #pragma once const uint32_t color_code[] = { 0x07230203,0x00010000,0x0008000b,0x00000059,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/crt_frag.h b/app/src/main/cpp/shaders/crt_frag.h index 2239f22748..e814ea7f78 100644 --- a/app/src/main/cpp/shaders/crt_frag.h +++ b/app/src/main/cpp/shaders/crt_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t crt_code[] = { 0x07230203,0x00010000,0x0008000b,0x00000063,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/deband_frag.h b/app/src/main/cpp/shaders/deband_frag.h index 4a59f2135a..dab0cba930 100644 --- a/app/src/main/cpp/shaders/deband_frag.h +++ b/app/src/main/cpp/shaders/deband_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t deband_code[] = { 0x07230203,0x00010000,0x0008000b,0x00000053,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/fsr_easu_frag.h b/app/src/main/cpp/shaders/fsr_easu_frag.h index eb6d36af4c..b2d1252984 100644 --- a/app/src/main/cpp/shaders/fsr_easu_frag.h +++ b/app/src/main/cpp/shaders/fsr_easu_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t fsr_easu_code[] = { 0x07230203,0x00010000,0x0008000b,0x0000046e,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/fsr_rcas_frag.h b/app/src/main/cpp/shaders/fsr_rcas_frag.h index 066d125dd6..f241d7590c 100644 --- a/app/src/main/cpp/shaders/fsr_rcas_frag.h +++ b/app/src/main/cpp/shaders/fsr_rcas_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t fsr_rcas_code[] = { 0x07230203,0x00010000,0x0008000b,0x0000025e,0x00000000,0x00020011,0x00000001,0x00020011, diff --git a/app/src/main/cpp/shaders/fxaa_frag.h b/app/src/main/cpp/shaders/fxaa_frag.h index 6b7be374bf..8f22155f78 100644 --- a/app/src/main/cpp/shaders/fxaa_frag.h +++ b/app/src/main/cpp/shaders/fxaa_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t fxaa_code[] = { 0x07230203,0x00010000,0x0008000b,0x000000e4,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/hdr_frag.h b/app/src/main/cpp/shaders/hdr_frag.h index 37e5783aa5..4bcdfad3a9 100644 --- a/app/src/main/cpp/shaders/hdr_frag.h +++ b/app/src/main/cpp/shaders/hdr_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t hdr_code[] = { 0x07230203,0x00010000,0x0008000b,0x000000f4,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/nis_frag.h b/app/src/main/cpp/shaders/nis_frag.h index 468283d7f5..b20294eae8 100644 --- a/app/src/main/cpp/shaders/nis_frag.h +++ b/app/src/main/cpp/shaders/nis_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t nis_code[] = { 0x07230203,0x00010000,0x0008000b,0x00000644,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/ntsc_frag.h b/app/src/main/cpp/shaders/ntsc_frag.h index 9eb75f2184..409c9d90f0 100644 --- a/app/src/main/cpp/shaders/ntsc_frag.h +++ b/app/src/main/cpp/shaders/ntsc_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t ntsc_code[] = { 0x07230203,0x00010000,0x0008000b,0x000000d5,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/sgsr_frag.h b/app/src/main/cpp/shaders/sgsr_frag.h index 2452fb68f3..11f19152ea 100644 --- a/app/src/main/cpp/shaders/sgsr_frag.h +++ b/app/src/main/cpp/shaders/sgsr_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t sgsr_code[] = { 0x07230203,0x00010000,0x0008000b,0x00000216,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/sgsr_quality_frag.h b/app/src/main/cpp/shaders/sgsr_quality_frag.h index ca44e6a6a5..34b629f2d0 100644 --- a/app/src/main/cpp/shaders/sgsr_quality_frag.h +++ b/app/src/main/cpp/shaders/sgsr_quality_frag.h @@ -1,4 +1,3 @@ - // 1116.5.0 #pragma once const uint32_t sgsr_quality_code[] = { 0x07230203,0x00010000,0x0008000b,0x00000269,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/toon_frag.h b/app/src/main/cpp/shaders/toon_frag.h index aa54788ff8..615ebdaee1 100644 --- a/app/src/main/cpp/shaders/toon_frag.h +++ b/app/src/main/cpp/shaders/toon_frag.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t toon_code[] = { 0x07230203,0x00010000,0x0008000b,0x0000006d,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/shaders/upscale_vert.h b/app/src/main/cpp/shaders/upscale_vert.h index c64f91729d..61f6782889 100644 --- a/app/src/main/cpp/shaders/upscale_vert.h +++ b/app/src/main/cpp/shaders/upscale_vert.h @@ -1,4 +1,3 @@ - // 1116.2.0 #pragma once const uint32_t upscale_vert_code[] = { 0x07230203,0x00010000,0x0008000b,0x0000004b,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/termux/termux.c b/app/src/main/cpp/termux/termux.c index 7d4f86e31f..5365e95bc8 100644 --- a/app/src/main/cpp/termux/termux.c +++ b/app/src/main/cpp/termux/termux.c @@ -1,4 +1,3 @@ -// Upstream: termux/termux-app v0.118.0, terminal-emulator/src/main/jni/termux.c. // Licensed under the repository's GPL-3.0 license (see LICENSE). #include #include @@ -51,14 +50,12 @@ static int create_subprocess(JNIEnv* env, return throw_runtime_exception(env, "Cannot grantpt()/unlockpt()/ptsname_r() on /dev/ptmx"); } - // Enable UTF-8 mode and disable flow control to prevent Ctrl+S from locking up the display. struct termios tios; tcgetattr(ptm, &tios); tios.c_iflag |= IUTF8; tios.c_iflag &= ~(IXON | IXOFF); tcsetattr(ptm, TCSANOW, &tios); - /** Set initial winsize. */ struct winsize sz = { .ws_row = (unsigned short) rows, .ws_col = (unsigned short) columns }; ioctl(ptm, TIOCSWINSZ, &sz); @@ -69,7 +66,6 @@ static int create_subprocess(JNIEnv* env, *pProcessId = (int) pid; return ptm; } else { - // Clear signals which the Android java process may have blocked: sigset_t signals_to_unblock; sigfillset(&signals_to_unblock); sigprocmask(SIG_UNBLOCK, &signals_to_unblock, 0); @@ -100,13 +96,11 @@ static int create_subprocess(JNIEnv* env, if (chdir(cwd) != 0) { char* error_message; - // No need to free asprintf()-allocated memory since doing execvp() or exit() below. if (asprintf(&error_message, "chdir(\"%s\")", cwd) == -1) error_message = "chdir()"; perror(error_message); fflush(stderr); } execvp(cmd, argv); - // Show terminal output about failing exec() call: char* error_message; if (asprintf(&error_message, "exec(\"%s\")", cmd) == -1) error_message = "exec()"; perror(error_message); @@ -207,7 +201,6 @@ JNIEXPORT jint JNICALL Java_com_termux_terminal_JNI_waitFor(JNIEnv* TERMUX_UNUSE } else if (WIFSIGNALED(status)) { return -WTERMSIG(status); } else { - // Should never happen - waitpid(2) says "One of the first three macros will evaluate to a non-zero (true) value". return 0; } } diff --git a/app/src/main/cpp/thirdparty/dxbc/.gitignore b/app/src/main/cpp/thirdparty/dxbc/.gitignore index 4522fe54d2..bc9544853e 100644 --- a/app/src/main/cpp/thirdparty/dxbc/.gitignore +++ b/app/src/main/cpp/thirdparty/dxbc/.gitignore @@ -1,3 +1,2 @@ -# cmake files .cache/ build/ diff --git a/app/src/main/cpp/thirdparty/dxbc/CMakeLists.txt b/app/src/main/cpp/thirdparty/dxbc/CMakeLists.txt index 2651d7b8dd..43422465ea 100644 --- a/app/src/main/cpp/thirdparty/dxbc/CMakeLists.txt +++ b/app/src/main/cpp/thirdparty/dxbc/CMakeLists.txt @@ -13,7 +13,6 @@ file(GLOB SOURCES add_library(dxbc STATIC ${SOURCES}) -# target set_target_properties(dxbc PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON) diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_analysis.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_analysis.h index 6c8b0325ba..87113c1dcf 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_analysis.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_analysis.h @@ -9,13 +9,6 @@ namespace dxvk { - /** - * \brief Info about unordered access views - * - * Stores whether an UAV is accessed with typed - * read or atomic instructions. This information - * will be used to generate image types. - */ struct DxbcUavInfo { bool accessTypedLoad = false; bool accessAtomicOp = false; @@ -25,27 +18,15 @@ namespace dxvk { VkAccessFlags accessFlags = 0; }; - /** - * \brief Info about shader resource views - * - * Stores whether an SRV is accessed with - * sparse feedback. Useful for buffers. - */ struct DxbcSrvInfo { bool sparseFeedback = false; }; - /** - * \brief Counts cull and clip distances - */ struct DxbcClipCullInfo { uint32_t numClipPlanes = 0; uint32_t numCullPlanes = 0; }; - /** - * \brief Shader analysis info - */ struct DxbcAnalysisInfo { std::array uavInfos; std::array srvInfos; @@ -60,13 +41,6 @@ namespace dxvk { bool usesKill = false; }; - /** - * \brief DXBC shader analysis pass - * - * Collects information about the shader itself - * and the resources used by the shader, which - * will later be used by the actual compiler. - */ class DxbcAnalyzer { public: @@ -81,10 +55,6 @@ namespace dxvk { ~DxbcAnalyzer(); - /** - * \brief Processes a single instruction - * \param [in] ins The instruction - */ void processInstruction( const DxbcShaderInstruction& ins); diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_chunk_isgn.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_chunk_isgn.h index 9b4b79186d..da3c97d685 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_chunk_isgn.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_chunk_isgn.h @@ -9,12 +9,6 @@ namespace dxvk { - /** - * \brief Signature entry - * - * Stores the semantic name of an input or - * output and the corresponding register. - */ struct DxbcSgnEntry { std::string semanticName; uint32_t semanticIndex; @@ -26,12 +20,6 @@ namespace dxvk { uint32_t streamId; }; - /** - * \brief Input/Output signature chunk - * - * Stores information about the input and - * output registers used by the shader stage. - */ class DxbcIsgn : public RcObject { public: diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_chunk_shex.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_chunk_shex.h index 8deecc8675..02b3cd914b 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_chunk_shex.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_chunk_shex.h @@ -6,13 +6,6 @@ namespace dxvk { - /** - * \brief Shader code chunk - * - * Stores the DXBC shader code itself, as well - * as some meta info about the shader, i.e. what - * type of shader this is. - */ class DxbcShex : public RcObject { public: diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_common.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_common.h index d9d4207673..4a382c8c4e 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_common.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_common.h @@ -4,12 +4,6 @@ namespace dxvk { - /** - * \brief DXBC Program type - * - * Defines the shader stage that a DXBC - * module has been compiled form. - */ enum class DxbcProgramType : uint16_t { PixelShader = 0, VertexShader = 1, @@ -24,11 +18,6 @@ namespace dxvk { using DxbcProgramTypeFlags = Flags; - /** - * \brief DXBC shader info - * - * Stores the shader program type. - */ class DxbcProgramInfo { public: @@ -37,30 +26,12 @@ namespace dxvk { DxbcProgramInfo(DxbcProgramType type) : m_type(type) { } - /** - * \brief Program type - * \returns Program type - */ DxbcProgramType type() const { return m_type; } - /** - * \brief Vulkan shader stage - * - * The \c VkShaderStageFlagBits constant - * that corresponds to the program type. - * \returns Vulkan shaer stage - */ VkShaderStageFlagBits shaderStage() const; - /** - * \brief SPIR-V execution model - * - * The execution model that corresponds - * to the Vulkan shader stage. - * \returns SPIR-V execution model - */ spv::ExecutionModel executionModel() const; private: diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_compiler.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_compiler.h index f63d1e11a1..d5c6998853 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_compiler.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_compiler.h @@ -16,27 +16,12 @@ namespace dxvk { - /** - * \brief Vector type - * - * Convenience struct that stores a scalar - * type and a component count. The compiler - * can use this to generate SPIR-V types. - */ struct DxbcVectorType { DxbcScalarType ctype; uint32_t ccount; }; - /** - * \brief Array type - * - * Convenience struct that stores a scalar type, a - * component count and an array size. An array of - * length 0 will be evaluated to a vector type. The - * compiler can use this to generate SPIR-V types. - */ struct DxbcArrayType { DxbcScalarType ctype; uint32_t ccount; @@ -44,39 +29,18 @@ namespace dxvk { }; - /** - * \brief Register info - * - * Stores the array type of a register and - * its storage class. The compiler can use - * this to generate SPIR-V pointer types. - */ struct DxbcRegisterInfo { DxbcArrayType type; spv::StorageClass sclass; }; - /** - * \brief Register value - * - * Stores a vector type and a SPIR-V ID that - * represents an intermediate value. This is - * used to track the type of such values. - */ struct DxbcRegisterValue { DxbcVectorType type; uint32_t id; }; - /** - * \brief Register pointer - * - * Stores a vector type and a SPIR-V ID that - * represents a pointer to such a vector. This - * can be used to load registers conveniently. - */ struct DxbcRegisterPointer { DxbcVectorType type; uint32_t id; @@ -98,12 +62,6 @@ namespace dxvk { }; - /** - * \brief Specialization constant properties - * - * Stores the name, data type and initial - * value of a specialization constant. - */ struct DxbcSpecConstant { DxbcScalarType ctype; uint32_t ccount; @@ -112,13 +70,6 @@ namespace dxvk { }; - /** - * \brief Helper struct for conditional execution - * - * Stores a set of labels required to implement either - * an if-then block or an if-then-else block. This is - * not used to implement control flow instructions. - */ struct DxbcConditional { uint32_t labelIf = 0; uint32_t labelElse = 0; @@ -144,9 +95,6 @@ namespace dxvk { }; - /** - * \brief Vertex shader-specific structure - */ struct DxbcCompilerVsPart { uint32_t functionId = 0; @@ -157,9 +105,6 @@ namespace dxvk { }; - /** - * \brief Geometry shader-specific structure - */ struct DxbcCompilerGsPart { DxbcPrimitive inputPrimitive = DxbcPrimitive::Undefined; DxbcPrimitiveTopology outputTopology = DxbcPrimitiveTopology::Undefined; @@ -175,9 +120,6 @@ namespace dxvk { }; - /** - * \brief Pixel shader-specific structure - */ struct DxbcCompilerPsPart { uint32_t functionId = 0; @@ -196,9 +138,6 @@ namespace dxvk { }; - /** - * \brief Compute shader-specific structure - */ struct DxbcCompilerCsPart { uint32_t functionId = 0; @@ -213,12 +152,6 @@ namespace dxvk { }; - /** - * \brief Hull shader fork/join phase - * - * Defines a function and built-in variables - * for a single fork or join phase sub-program. - */ struct DxbcCompilerHsForkJoinPhase { uint32_t functionId = 0; uint32_t instanceCount = 1; @@ -228,35 +161,20 @@ namespace dxvk { }; - /** - * \brief Hull shader control point phase - * - * Defines the function for the control - * point phase program of a hull shader. - */ struct DxbcCompilerHsControlPointPhase { uint32_t functionId = 0; }; - /** - * \brief Hull shader phase - * - * Used to identify the current - * phase and function ID. - */ enum class DxbcCompilerHsPhase : uint32_t { - None, ///< No active phase - Decl, ///< \c hs_decls - ControlPoint, ///< \c hs_control_point_phase - Fork, ///< \c hs_fork_phase - Join, ///< \c hs_join_phase + None, + Decl, + ControlPoint, + Fork, + Join, }; - /** - * \brief Hull shader-specific structure - */ struct DxbcCompilerHsPart { DxbcCompilerHsPhase currPhaseType = DxbcCompilerHsPhase::None; size_t currPhaseId = 0; @@ -284,9 +202,6 @@ namespace dxvk { }; - /** - * \brief Domain shader-specific structure - */ struct DxbcCompilerDsPart { uint32_t functionId = 0; @@ -362,13 +277,6 @@ namespace dxvk { }; - /** - * \brief DXBC to SPIR-V shader compiler - * - * Processes instructions from a DXBC shader and creates - * a DXVK shader object, which contains the SPIR-V module - * and information about the shader resource bindings. - */ class DxbcCompiler { public: @@ -383,35 +291,13 @@ namespace dxvk { const DxbcAnalysisInfo& analysis); ~DxbcCompiler(); - /** - * \brief Processes a single instruction - * \param [in] ins The instruction - */ void processInstruction( const DxbcShaderInstruction& ins); - /** - * \brief Emits transform feedback passthrough - * - * Writes all captured input variables to the - * corresponding xfb outputs, and sets up the - * geometry shader for point-to-point mode. - */ void processXfbPassthrough(); - /** - * \brief Finalizes the shader - * \returns The final shader object - */ SpirvCodeBuffer finalize(); - /** - * \brief Extracts immediate constant buffer data - * - * Only defined if the ICB needs to be backed by a - * uniform buffer. - * \returns Immediate constant buffer data - */ std::vector getIcbData() const { return std::move(m_icbData); } @@ -428,49 +314,27 @@ namespace dxvk { const DxbcAnalysisInfo* m_analysis; - /////////////////////////////////////////////////////// - // Resource slot description for the shader. This will - // be used to map D3D11 bindings to DXVK bindings. std::vector m_bindings; - //////////////////////////////////////////////// - // Temporary r# vector registers with immediate - // indexing, and x# vector array registers. std::vector m_rRegs; std::vector m_xRegs; - ///////////////////////////////////////////// - // Thread group shared memory (g#) registers std::vector m_gRegs; - /////////////////////////////////////////////////////////// - // v# registers as defined by the shader. The type of each - // of these inputs is either float4 or an array of float4. std::array< DxbcRegisterPointer, DxbcMaxInterfaceRegs> m_vRegs; std::vector m_vMappings; - ////////////////////////////////////////////////////////// - // o# registers as defined by the shader. In the fragment - // shader stage, these registers are typed by the signature, - // in all other stages, they are float4 registers or arrays. std::array< DxbcRegisterPointer, DxbcMaxInterfaceRegs> m_oRegs; std::vector m_oMappings; - ///////////////////////////////////////////// - // xfb output registers for geometry shaders std::vector m_xfbVars; - ///////////////////////////////////////////// - // Dynamically indexed input and output regs std::vector m_indexRanges = { }; - ////////////////////////////////////////////////////// - // Shader resource variables. These provide access to - // constant buffers, samplers, textures, and UAVs. std::array m_constantBuffers; std::array m_samplers; std::array m_textures; @@ -479,9 +343,6 @@ namespace dxvk { bool m_hasGloballyCoherentUav = false; bool m_hasRasterizerOrderedUav = false; - /////////////////////////////////////////////// - // Control flow information. Stores labels for - // currently active if-else blocks and loops. std::vector m_controlFlowBlocks; bool m_topLevelIsUniform = true; @@ -489,22 +350,13 @@ namespace dxvk { uint64_t m_uavRdMask = 0u; uint64_t m_uavWrMask = 0u; - ////////////////////////////////////////////// - // Function state tracking. Required in order - // to properly end functions in some cases. bool m_insideFunction = false; - /////////////////////////////////////////////////////////// - // Array of input values. Since v# registers are indexable - // in DXBC, we need to copy them into an array first. uint32_t m_vArrayLength = 0; uint32_t m_vArrayLengthId = 0; uint32_t m_vArray = 0; - //////////////////////////////////////////////////// - // Per-vertex input and output blocks. Depending on - // the shader stage, these may be declared as arrays. uint32_t m_positionIn = 0; uint32_t m_positionOut = 0; @@ -514,43 +366,25 @@ namespace dxvk { uint32_t m_primitiveIdIn = 0; uint32_t m_primitiveIdOut = 0; - ////////////////////////////////////////////////// - // Immediate constant buffer. If defined, this is - // an array of four-component uint32 vectors. uint32_t m_icbArray = 0; std::vector m_icbData; uint32_t m_icbComponents = 0u; uint32_t m_icbSize = 0u; - /////////////////////////////////////////////////// - // Sample pos array. If defined, this iis an array - // of 32 four-component float vectors. uint32_t m_samplePositions = 0; - //////////////////////////////////////////// - // Struct type used for UAV counter buffers uint32_t m_uavCtrStructType = 0; uint32_t m_uavCtrPointerType = 0; - //////////////////////////////// - // Function IDs for subroutines std::unordered_map m_subroutines; - /////////////////////////////////////////////////// - // Entry point description - we'll need to declare - // the function ID and all input/output variables. uint32_t m_entryPointId = 0; bool m_hasRawAccessChains = false; - //////////////////////////////////////////// - // Inter-stage shader interface slots. Also - // covers vertex input and fragment output. uint32_t m_inputMask = 0u; uint32_t m_outputMask = 0u; - /////////////////////////////////// - // Shader-specific data structures DxbcCompilerVsPart m_vs; DxbcCompilerHsPart m_hs; DxbcCompilerDsPart m_ds; @@ -558,8 +392,6 @@ namespace dxvk { DxbcCompilerPsPart m_ps; DxbcCompilerCsPart m_cs; - ////////////////////// - // Global state stuff bool m_precise = true; DxbcOpcode m_lastOp = DxbcOpcode::Nop; @@ -568,8 +400,6 @@ namespace dxvk { VkPrimitiveTopology m_inputTopology = VK_PRIMITIVE_TOPOLOGY_MAX_ENUM; VkPrimitiveTopology m_outputTopology = VK_PRIMITIVE_TOPOLOGY_MAX_ENUM; - ///////////////////////////////////////////////////// - // Shader interface and metadata declaration methods void emitDcl( const DxbcShaderInstruction& ins); @@ -662,8 +492,6 @@ namespace dxvk { uint32_t emitDclUavCounter( uint32_t regId); - //////////////////////// - // Custom data handlers void emitDclImmediateConstantBuffer( const DxbcShaderInstruction& ins); @@ -680,8 +508,6 @@ namespace dxvk { void emitCustomData( const DxbcShaderInstruction& ins); - ////////////////////////////// - // Instruction class handlers void emitVectorAlu( const DxbcShaderInstruction& ins); @@ -787,8 +613,6 @@ namespace dxvk { void emitTypedUavStore( const DxbcShaderInstruction& ins); - ///////////////////////////////////// - // Control flow instruction handlers void emitControlFlowIf( const DxbcShaderInstruction& ins); @@ -843,10 +667,6 @@ namespace dxvk { void emitControlFlow( const DxbcShaderInstruction& ins); - //////////////////////////////////////////////// - // Constant building methods. These are used to - // generate constant vectors that store the same - // value in each component. DxbcRegisterValue emitBuildConstVecf32( float x, float y, @@ -880,8 +700,6 @@ namespace dxvk { DxbcRegisterValue emitBuildZeroVector( DxbcVectorType type); - ///////////////////////////////////////// - // Generic register manipulation methods DxbcRegisterValue emitRegisterBitcast( DxbcRegisterValue srcValue, DxbcScalarType dstType); @@ -930,8 +748,6 @@ namespace dxvk { DxbcRegisterValue value, DxbcOpModifiers modifiers); - /////////////////////////// - // Sparse feedback methods uint32_t emitExtractSparseTexel( uint32_t texelTypeId, uint32_t resultId); @@ -940,22 +756,16 @@ namespace dxvk { const DxbcRegister& feedbackRegister, uint32_t resultId); - //////////////////////////////// - // Pointer manipulation methods DxbcRegisterPointer emitArrayAccess( DxbcRegisterPointer pointer, spv::StorageClass sclass, uint32_t index); - /////////////////////////////////////// - // Image register manipulation methods uint32_t emitLoadSampledImage( const DxbcShaderResource& textureResource, const DxbcSampler& samplerResource, bool isDepthCompare); - //////////////////////// - // Address load methods DxbcRegisterPointer emitGetTempPtr( const DxbcRegister& operand); @@ -981,8 +791,6 @@ namespace dxvk { const DxbcRegister& operand, const DxbcRegister& address); - ////////////////////////// - // Resource query methods DxbcRegisterValue emitQueryBufferSize( const DxbcRegister& resource); @@ -999,8 +807,6 @@ namespace dxvk { const DxbcRegister& resource, DxbcRegisterValue lod); - //////////////////////////////////// - // Buffer index calculation methods DxbcRegisterValue emitCalcBufferIndexStructured( DxbcRegisterValue structId, DxbcRegisterValue structOffset, @@ -1017,8 +823,6 @@ namespace dxvk { const DxbcRegister& coordReg, const DxbcImageInfo& imageInfo); - ////////////////////////////// - // Operand load/store methods DxbcRegisterValue emitIndexLoad( DxbcRegIndex index); @@ -1045,8 +849,6 @@ namespace dxvk { const DxbcRegister& reg, DxbcRegisterValue value); - //////////////////////////// - // Input/output preparation void emitInputSetup(); void emitInputSetup(uint32_t vertexCount); @@ -1055,8 +857,6 @@ namespace dxvk { void emitInitWorkgroupMemory(); - ////////////////////////////////////////// - // System value load methods (per shader) DxbcRegisterValue emitVsSystemValueLoad( DxbcSystemValue sv, DxbcRegMask mask); @@ -1070,8 +870,6 @@ namespace dxvk { DxbcSystemValue sv, DxbcRegMask mask); - /////////////////////////////////////////// - // System value store methods (per shader) void emitVsSystemValueStore( DxbcSystemValue sv, DxbcRegMask mask, @@ -1097,8 +895,6 @@ namespace dxvk { DxbcRegMask mask, const DxbcRegisterValue& value); - /////////////////////////////// - // Special system value stores void emitClipCullStore( DxbcSystemValue sv, uint32_t dstArray); @@ -1109,8 +905,6 @@ namespace dxvk { void emitPointSizeStore(); - ////////////////////////////////////// - // Common function definition methods void emitInit(); void emitFunctionBegin( @@ -1124,8 +918,6 @@ namespace dxvk { void emitMainFunctionBegin(); - ///////////////////////////////// - // Shader initialization methods void emitVsInit(); void emitHsInit(); void emitDsInit(); @@ -1133,8 +925,6 @@ namespace dxvk { void emitPsInit(); void emitCsInit(); - /////////////////////////////// - // Shader finalization methods void emitVsFinalize(); void emitHsFinalize(); void emitDsFinalize(); @@ -1142,16 +932,12 @@ namespace dxvk { void emitPsFinalize(); void emitCsFinalize(); - /////////////////////// - // Xfb related methods void emitXfbOutputDeclarations(); void emitXfbOutputSetup( uint32_t streamId, bool passthrough); - /////////////////////////////// - // Hull shader phase methods void emitHsControlPointPhase( const DxbcCompilerHsControlPointPhase& phase); @@ -1174,8 +960,6 @@ namespace dxvk { spv::StorageClass storageClass, uint32_t vertexCount); - ////////////// - // Misc stuff void emitDclInputArray( uint32_t vertexCount); @@ -1194,8 +978,6 @@ namespace dxvk { void emitFloatControl(); - /////////////////////////////// - // Variable definition methods uint32_t emitNewVariable( const DxbcRegisterInfo& info); @@ -1212,8 +994,6 @@ namespace dxvk { uint32_t emitPushConstants(); - //////////////// - // Misc methods DxbcCfgBlock* cfgFindBlock( const std::initializer_list& types); @@ -1265,8 +1045,6 @@ namespace dxvk { uint64_t readMask, uint64_t writeMask); - /////////////////////////// - // Type definition methods uint32_t getScalarTypeId( DxbcScalarType type); diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_decoder.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_decoder.h index 771837152e..4ad3f82c8a 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_decoder.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_decoder.h @@ -14,12 +14,6 @@ namespace dxvk { struct DxbcRegister; - /** - * \brief Source operand modifiers - * - * These are applied after loading - * an operand register. - */ enum class DxbcRegModifier : uint32_t { Neg = 0, Abs = 1, @@ -28,32 +22,17 @@ namespace dxvk { using DxbcRegModifiers = Flags; - /** - * \brief Constant buffer binding - * - * Stores information required to - * access a constant buffer. - */ struct DxbcConstantBuffer { uint32_t varId = 0; uint32_t size = 0; }; - /** - * \brief Sampler binding - * - * Stores a sampler variable that can be - * used together with a texture resource. - */ struct DxbcSampler { uint32_t varId = 0; uint32_t typeId = 0; }; - /** - * \brief Image type information - */ struct DxbcImageInfo { spv::Dim dim = spv::Dim1D; uint32_t array = 0; @@ -63,12 +42,6 @@ namespace dxvk { }; - /** - * \brief Shader resource binding - * - * Stores a resource variable - * and associated type IDs. - */ struct DxbcShaderResource { DxbcResourceType type = DxbcResourceType::Typed; DxbcImageInfo imageInfo; @@ -84,12 +57,6 @@ namespace dxvk { }; - /** - * \brief Unordered access binding - * - * Stores a resource variable that is provided - * by a UAV, as well as associated type IDs. - */ struct DxbcUav { DxbcResourceType type = DxbcResourceType::Typed; DxbcImageInfo imageInfo; @@ -105,12 +72,6 @@ namespace dxvk { }; - /** - * \brief Component swizzle - * - * Maps vector components to - * other vector components. - */ class DxbcRegSwizzle { public: @@ -133,12 +94,6 @@ namespace dxvk { }; - /** - * \brief Component mask - * - * Enables access to certain - * subset of vector components. - */ class DxbcRegMask { public: @@ -211,12 +166,6 @@ namespace dxvk { }; - /** - * \brief System value mapping - * - * Maps a system value to a given set of - * components of an input or output register. - */ struct DxbcSvMapping { uint32_t regId; DxbcRegMask regMask; @@ -230,9 +179,6 @@ namespace dxvk { }; - /** - * \brief Instruction operand - */ struct DxbcRegister { DxbcOperandType type; DxbcScalarType dataType; @@ -252,24 +198,12 @@ namespace dxvk { }; - /** - * \brief Instruction result modifiers - * - * Modifiers that are applied - * to all destination operands. - */ struct DxbcOpModifiers { bool saturate; bool precise; }; - /** - * \brief Opcode controls - * - * Instruction-specific controls. Usually, - * only one of the members will be valid. - */ class DxbcShaderOpcodeControls { public: @@ -355,24 +289,11 @@ namespace dxvk { }; - /** - * \brief Sample controls - * - * Constant texel offset with - * values raning from -8 to 7. - */ struct DxbcShaderSampleControls { int u, v, w; }; - /** - * \brief Immediate value - * - * Immediate argument represented either - * as a 32-bit or 64-bit unsigned integer, - * or a 32-bit or 32-bit floating point number. - */ union DxbcImmediate { float f32; double f64; @@ -381,17 +302,6 @@ namespace dxvk { }; - /** - * \brief Shader instruction - * - * Note that this structure may store pointer to - * external structures, such as the original code - * buffer. This is safe to use if and only if: - * - The \ref DxbcDecodeContext that created it - * still exists and was not moved - * - The code buffer that was being decoded - * still exists and was not moved. - */ struct DxbcShaderInstruction { DxbcOpcode op; DxbcInstClass opClass; @@ -413,12 +323,6 @@ namespace dxvk { }; - /** - * \brief DXBC code slice - * - * Convenient pointer pair that allows - * reading the code word stream safely. - */ class DxbcCodeSlice { public: @@ -448,34 +352,14 @@ namespace dxvk { }; - /** - * \brief Decode context - * - * Stores data that is required to decode a single - * instruction. This data is not persistent, so it - * should be forwarded to the compiler right away. - */ class DxbcDecodeContext { public: - /** - * \brief Retrieves current instruction - * - * This is only valid after a call to \ref decode. - * \returns Reference to last decoded instruction - */ const DxbcShaderInstruction& getInstruction() const { return m_instruction; } - /** - * \brief Decodes an instruction - * - * This also advances the given code slice by the - * number of dwords consumed by the instruction. - * \param [in] code Code slice - */ void decodeInstruction(DxbcCodeSlice& code); private: @@ -487,8 +371,6 @@ namespace dxvk { std::array m_immOperands; std::array m_indices; - // Index into the indices array. Used when decoding - // instruction operands with relative indexing. uint32_t m_indexId = 0; void decodeCustomData(DxbcCodeSlice code); diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_defs.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_defs.h index 8782481aff..a0792aaa02 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_defs.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_defs.h @@ -7,98 +7,66 @@ namespace dxvk { constexpr size_t DxbcMaxInterfaceRegs = 32; constexpr size_t DxbcMaxOperandCount = 8; - /** - * \brief Operand kind - * - * In the instruction format definition, this specified - * whether an operand uses an actual operand token, or - * whether it is stored as an immediate value. - */ enum class DxbcOperandKind { - DstReg, ///< Destination register - SrcReg, ///< Source register - Imm32, ///< Constant number + DstReg, + SrcReg, + Imm32, }; - /** - * \brief Instruction class - * - * Instructions with a similar format are grouped into - * instruction classes in order to make implementing - * new instructions easier. - */ enum class DxbcInstClass { - Declaration, ///< Interface or resource declaration - CustomData, ///< Immediate constant buffer - ControlFlow, ///< Control flow instructions - GeometryEmit, ///< Special geometry shader instructions - Atomic, ///< Atomic operations - AtomicCounter, ///< Atomic counter operations - Barrier, ///< Execution or memory barrier - BitExtract, ///< Bit field extract operations - BitInsert, ///< Bit field insert operations - BitScan, ///< Bit scan operations - BufferQuery, ///< Buffer query instruction - BufferLoad, ///< Structured or raw buffer load - BufferStore, ///< Structured or raw buffer store - ConvertFloat16, ///< 16-bit float packing/unpacking - ConvertFloat64, ///< 64-bit float conversion - HullShaderPhase, ///< Hull shader phase declaration - HullShaderInstCnt, ///< Hull shader phase instance count - Interpolate, ///< Input attribute interpolation - NoOperation, ///< The most useful instruction class - SparseCheckAccess, ///< Verifies sparse resource access - TextureQuery, ///< Texture query instruction - TextureQueryLod, ///< Texture LOD query instruction - TextureQueryMs, ///< Multisample texture query - TextureQueryMsPos, ///< Sample position query - TextureFetch, ///< Texture fetch instruction - TextureGather, ///< Texture gather instruction - TextureSample, ///< Texture sampling instruction - TypedUavLoad, ///< Typed UAV load - TypedUavStore, ///< Typed UAV store - VectorAlu, ///< Component-wise vector instructions - VectorCmov, ///< Component-wise conditional move - VectorCmp, ///< Component-wise vector comparison - VectorDeriv, ///< Vector derivatives - VectorDot, ///< Dot product instruction - VectorIdiv, ///< Component-wise integer division - VectorImul, ///< Component-wise integer multiplication - VectorMsad, ///< Component-wise sum of absolute difference - VectorShift, ///< Bit shift operations on vectors - VectorSinCos, ///< Sine and Cosine instruction - Undefined, ///< Instruction code not defined + Declaration, + CustomData, + ControlFlow, + GeometryEmit, + Atomic, + AtomicCounter, + Barrier, + BitExtract, + BitInsert, + BitScan, + BufferQuery, + BufferLoad, + BufferStore, + ConvertFloat16, + ConvertFloat64, + HullShaderPhase, + HullShaderInstCnt, + Interpolate, + NoOperation, + SparseCheckAccess, + TextureQuery, + TextureQueryLod, + TextureQueryMs, + TextureQueryMsPos, + TextureFetch, + TextureGather, + TextureSample, + TypedUavLoad, + TypedUavStore, + VectorAlu, + VectorCmov, + VectorCmp, + VectorDeriv, + VectorDot, + VectorIdiv, + VectorImul, + VectorMsad, + VectorShift, + VectorSinCos, + Undefined, }; - /** - * \brief Instruction operand format - * - * Stores the kind and the expected data type - * of an operand. Used when parsing instructions. - */ struct DxbcInstOperandFormat { DxbcOperandKind kind; DxbcScalarType type; }; - /** - * \brief Instruction format - * - * Defines the instruction class as well as - * the format of the insttruction operands. - */ struct DxbcInstFormat { uint32_t operandCount = 0; DxbcInstClass instructionClass = DxbcInstClass::Undefined; DxbcInstOperandFormat operands[DxbcMaxOperandCount]; }; - /** - * \brief Retrieves instruction format info - * - * \param [in] opcode The opcode to retrieve - * \returns Instruction format info - */ DxbcInstFormat dxbcInstructionFormat(DxbcOpcode opcode); } \ No newline at end of file diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_enums.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_enums.h index f6d29a5b87..531a7afd2c 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_enums.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_enums.h @@ -4,9 +4,6 @@ namespace dxvk { - /** - * \brief Instruction code listing - */ enum class DxbcOpcode : uint32_t { Add = 0, And = 1, @@ -246,9 +243,6 @@ namespace dxvk { }; - /** - * \brief Extended opcode - */ enum class DxbcExtOpcode : uint32_t { Empty = 0, SampleControls = 1, @@ -257,12 +251,6 @@ namespace dxvk { }; - /** - * \brief Operand type - * - * Selects the 'register file' from which - * to retrieve an operand's value. - */ enum class DxbcOperandType : uint32_t { Temp = 0, Input = 1, @@ -310,12 +298,6 @@ namespace dxvk { }; - /** - * \brief Number of components - * - * Used by operands to determine whether the - * operand has one, four or zero components. - */ enum class DxbcComponentCount : uint32_t { Component0 = 0, Component1 = 1, @@ -323,13 +305,6 @@ namespace dxvk { }; - /** - * \brief Component selection mode - * - * When an operand has four components, the - * component selection mode deterines which - * components are used for the operation. - */ enum class DxbcRegMode : uint32_t { Mask = 0, Swizzle = 1, @@ -337,12 +312,6 @@ namespace dxvk { }; - /** - * \brief Index representation - * - * Determines how an operand - * register index is stored. - */ enum class DxbcOperandIndexRepresentation : uint32_t { Imm32 = 0, Imm64 = 1, @@ -352,18 +321,11 @@ namespace dxvk { }; - /** - * \brief Extended operand type - */ enum class DxbcOperandExt : uint32_t { OperandModifier = 1, }; - /** - * \brief Resource dimension - * The type of a resource. - */ enum class DxbcResourceDim : uint32_t { Unknown = 0, Buffer = 1, @@ -381,27 +343,19 @@ namespace dxvk { }; - /** - * \brief Resource return type - * Data type for resource read ops. - */ enum class DxbcResourceReturnType : uint32_t { Unorm = 1, Snorm = 2, Sint = 3, Uint = 4, Float = 5, - Mixed = 6, /// ? + Mixed = 6, Double = 7, - Continued = 8, /// ? - Unused = 9, /// ? + Continued = 8, + Unused = 9, }; - /** - * \brief Register component type - * Data type of a register component. - */ enum class DxbcRegisterComponentType : uint32_t { Unknown = 0, Uint32 = 1, @@ -410,9 +364,6 @@ namespace dxvk { }; - /** - * \brief Instruction return type - */ enum class DxbcInstructionReturnType : uint32_t { Float = 0, Uint = 1, @@ -493,9 +444,6 @@ namespace dxvk { using DxbcSyncFlags = Flags; - /** - * \brief Geometry shader input primitive - */ enum class DxbcPrimitive : uint32_t { Undefined = 0, Point = 1, @@ -538,9 +486,6 @@ namespace dxvk { }; - /** - * \brief Geometry shader output topology - */ enum class DxbcPrimitiveTopology : uint32_t { Undefined = 0, PointList = 1, @@ -555,9 +500,6 @@ namespace dxvk { }; - /** - * \brief Sampler operation mode - */ enum class DxbcSamplerMode : uint32_t { Default = 0, Comparison = 1, @@ -565,13 +507,6 @@ namespace dxvk { }; - /** - * \brief Scalar value type - * - * Enumerates possible register component - * types. Scalar types are represented as - * a one-component vector type. - */ enum class DxbcScalarType : uint32_t { Uint32 = 0, Uint64 = 1, @@ -583,9 +518,6 @@ namespace dxvk { }; - /** - * \brief Tessellator domain - */ enum class DxbcTessDomain : uint32_t { Undefined = 0, Isolines = 1, @@ -593,9 +525,6 @@ namespace dxvk { Quads = 3, }; - /** - * \brief Tessellator partitioning - */ enum class DxbcTessPartitioning : uint32_t { Undefined = 0, Integer = 1, @@ -604,9 +533,6 @@ namespace dxvk { FractEven = 4, }; - /** - * \brief UAV definition flags - */ enum class DxbcUavFlag : uint32_t { GloballyCoherent = 0, RasterizerOrdered = 1, @@ -614,9 +540,6 @@ namespace dxvk { using DxbcUavFlags = Flags; - /** - * \brief Tessellator output primitive - */ enum class DxbcTessOutputPrimitive : uint32_t { Undefined = 0, Point = 1, @@ -625,12 +548,6 @@ namespace dxvk { TriangleCcw = 4, }; - /** - * \brief Custom data class - * - * Stores which type of custom data is - * referenced by the instruction. - */ enum class DxbcCustomDataClass : uint32_t { Comment = 0, DebugInfo = 1, diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_header.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_header.h index 8eca0d499c..f9b33aa1fa 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_header.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_header.h @@ -6,12 +6,6 @@ namespace dxvk { - /** - * \brief DXBC header - * - * Stores information about the shader file itself - * and the data chunks stored inside the file. - */ class DxbcHeader { public: @@ -19,22 +13,10 @@ namespace dxvk { DxbcHeader(DxbcReader& reader); ~DxbcHeader(); - /** - * \brief Number of chunks - * \returns Chunk count - */ uint32_t numChunks() const { return m_chunkOffsets.size(); } - /** - * \brief Chunk offset - * - * Retrieves the offset of a chunk, in - * bytes, from the start of the file. - * \param [in] chunkId Chunk index - * \returns Byte offset of that chunk - */ uint32_t chunkOffset(uint32_t chunkId) const { return m_chunkOffsets.at(chunkId); } diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_modinfo.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_modinfo.h index 13e733dde2..d9ff25522f 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_modinfo.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_modinfo.h @@ -4,22 +4,10 @@ namespace dxvk { - /** - * \brief Tessellation info - * - * Stores the maximum tessellation factor - * to export from tessellation shaders. - */ struct DxbcTessInfo { float maxTessFactor; }; - /** - * \brief Xfb capture entry - * - * Stores an output variable to capture, - * as well as the buffer to write it to. - */ struct DxbcXfbEntry { const char* semanticName; uint32_t semanticIndex; @@ -30,13 +18,6 @@ namespace dxvk { uint32_t offset; }; - /** - * \brief Xfb info - * - * Stores capture entries and output buffer - * strides. This structure must only be - * defined if \c entryCount is non-zero. - */ struct DxbcXfbInfo { uint32_t entryCount; DxbcXfbEntry entries[128]; @@ -44,12 +25,6 @@ namespace dxvk { int32_t rasterizedStream; }; - /** - * \brief Shader module info - * - * Stores information which may affect shader compilation. - * This data can be supplied by the client API implementation. - */ struct DxbcModuleInfo { DxbcOptions options; DxbcTessInfo* tess; diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_module.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_module.h index 3ef75cfe17..ef7617b954 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_module.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_module.h @@ -11,31 +11,18 @@ #include -// References used for figuring out DXBC: -// - https://github.com/tgjones/slimshader-cpp -// - Wine namespace dxvk { class DxbcAnalyzer; class DxbcCompiler; - /** - * \brief Immediate constant buffer properties - */ struct DxbcIcbInfo { size_t size = 0u; const void* data = nullptr; }; - /** - * \brief DXBC shader module - * - * Reads the DXBC byte code and extracts information - * about the resource bindings and the instruction - * stream. A module can then be compiled to SPIR-V. - */ class DxbcModule { public: @@ -43,10 +30,6 @@ namespace dxvk { DxbcModule(DxbcReader& reader); ~DxbcModule(); - /** - * \brief Shader type - * \returns Shader type - */ std::optional programInfo() const { if (m_shexChunk == nullptr) return std::nullopt; @@ -54,21 +37,10 @@ namespace dxvk { return m_shexChunk->programInfo(); } - /** - * \brief Queries shader binding mask - * - * Only valid after successfully compiling the shader. - */ std::optional bindings() const { return m_bindings; } - /** - * \brief Retrieves immediate constant buffer info - * - * Only valid after successfully compiling the shader. - * \returns Immediate constant buffer data - */ DxbcIcbInfo icbInfo() const { DxbcIcbInfo result = { }; result.size = m_icb.size() * sizeof(uint32_t); @@ -76,37 +48,13 @@ namespace dxvk { return result; } - /** - * \brief Input and output signature chunks - * - * Parts of the D3D11 API need access to the - * input or output signature of the shader. - */ Rc isgn() const { return m_isgnChunk; } Rc osgn() const { return m_osgnChunk; } - /** - * \brief Compiles DXBC shader to SPIR-V module - * - * \param [in] moduleInfo DXBC module info - * \param [in] fileName File name, will be added to - * the compiled SPIR-V for debugging purposes. - * \returns The compiled shader object - */ SpirvCodeBuffer compile( const DxbcModuleInfo& moduleInfo, const std::string& fileName); - /** - * \brief Compiles a pass-through geometry shader - * - * Applications can pass a vertex shader to create - * a geometry shader with stream output. In this - * case, we have to create a passthrough geometry - * shader, which operates in point to point mode. - * \param [in] moduleInfo DXBC module info - * \param [in] fileName SPIR-V shader name - */ SpirvCodeBuffer compilePassthroughShader( const DxbcModuleInfo& moduleInfo, const std::string& fileName) const; diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_names.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_names.h index 52235ae593..67e337491e 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_names.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_names.h @@ -23,4 +23,4 @@ namespace dxvk { std::ostream& operator << (std::ostream& os, DxbcCustomDataClass e); std::ostream& operator << (std::ostream& os, DxbcScalarType e); -} // namespace dxvk +} diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_options.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_options.h index 0fe46a767a..c8856026e4 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_options.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_options.h @@ -20,54 +20,34 @@ namespace dxvk { struct DxbcOptions { DxbcOptions() {} - // Clamp oDepth in fragment shaders if the depth - // clip device feature is not supported bool useDepthClipWorkaround = false; - /// Determines whether format qualifiers - /// on typed UAV loads are required bool supportsTypedUavLoadR32 = false; - /// Determines whether raw access chains are supported bool supportsRawAccessChains = false; - /// Clear thread-group shared memory to zero bool zeroInitWorkgroupMemory = false; - /// Declare vertex positions as invariant bool invariantPosition = false; - /// Insert memory barriers after TGSM stoes bool forceVolatileTgsmAccess = false; - /// Try to detect hazards in UAV access and insert - /// barriers when we know control flow is uniform. bool forceComputeUavBarriers = false; - /// Replace ld_ms with ld bool disableMsaa = false; - /// Force sample rate shading by using sample - /// interpolation for fragment shader inputs bool forceSampleRateShading = false; - // Enable per-sample interlock if supported bool enableSampleShadingInterlock = false; - /// Use tightly packed arrays for immediate - /// constant buffers if possible bool supportsTightIcbPacking = false; - /// Whether exporting point size is required bool needsPointSizeExport = true; - /// Whether to enable sincos emulation bool sincosEmulation = false; - /// Float control flags DxbcFloatControlFlags floatControl; - /// Minimum storage buffer alignment VkDeviceSize minSsboAlignment = 0; }; diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_reader.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_reader.h index a16000179b..36748327fb 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_reader.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_reader.h @@ -7,12 +7,6 @@ namespace dxvk { - /** - * \brief DXBC bytecode reader - * - * Holds references to the shader byte code and - * provides methods to read - */ class DxbcReader { public: diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_tag.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_tag.h index 2ba17509c5..bd9a6ce3b2 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_tag.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_tag.h @@ -4,12 +4,6 @@ namespace dxvk { - /** - * \brief Four-character tag - * - * Used to identify chunks in the - * compiled DXBC file by name. - */ class DxbcTag { public: diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_util.h b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_util.h index 7d98af6ee3..686905aaa8 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_util.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxbc/dxbc_util.h @@ -5,17 +5,11 @@ namespace dxvk { - /** - * \brief Push constant struct - */ struct DxbcPushConstants { uint32_t rasterizerSampleCount; }; - /** - * \brief Binding numbers and properties - */ enum DxbcBindingProperties : uint32_t { DxbcConstBufBindingIndex = 0, DxbcConstBufBindingCount = 16, @@ -33,12 +27,6 @@ namespace dxvk { }; - /** - * \brief Shader binding mask - * - * Stores a bit masks of resource bindings - * that are accessed by any given shader. - */ struct DxbcBindingMask { uint32_t cbvMask = 0u; uint32_t samplerMask = 0u; @@ -70,94 +58,41 @@ namespace dxvk { }; - /** - * \brief Computes first binding index for a given stage - * - * \param [in] stage The shader stage - * \returns Index of first binding - */ inline uint32_t computeStageBindingOffset(DxbcProgramType stage) { return DxbcStageBindingCount * uint32_t(stage); } - /** - * \brief Computes first UAV binding index offset for a given stage - * - * \param [in] stage The shader stage - * \returns Index of first UAV binding - */ inline uint32_t computeStageUavBindingOffset(DxbcProgramType stage) { return DxbcUavBindingIndex + DxbcUavBindingCount * (stage == DxbcProgramType::ComputeShader ? 2 : 0); } - /** - * \brief Computes constant buffer binding index - * - * \param [in] stage Shader stage - * \param [in] index Constant buffer index - * \returns Binding index - */ inline uint32_t computeConstantBufferBinding(DxbcProgramType stage, uint32_t index) { return computeStageBindingOffset(stage) + DxbcConstBufBindingIndex + index; } - /** - * \brief Computes sampler binding index - * - * \param [in] stage Shader stage - * \param [in] index Sampler index - * \returns Binding index - */ inline uint32_t computeSamplerBinding(DxbcProgramType stage, uint32_t index) { return computeStageBindingOffset(stage) + DxbcSamplerBindingIndex + index; } - /** - * \brief Computes resource binding index - * - * \param [in] stage Shader stage - * \param [in] index Resource index - * \returns Binding index - */ inline uint32_t computeSrvBinding(DxbcProgramType stage, uint32_t index) { return computeStageBindingOffset(stage) + DxbcResourceBindingIndex + index; } - /** - * \brief Computes UAV binding offset - * - * \param [in] stage Shader stage - * \param [in] index UAV index - * \returns Binding index - */ inline uint32_t computeUavBinding(DxbcProgramType stage, uint32_t index) { return computeStageUavBindingOffset(stage) + index; } - /** - * \brief Computes UAV counter binding offset - * - * \param [in] stage Shader stage - * \param [in] index UAV index - * \returns Binding index - */ inline uint32_t computeUavCounterBinding(DxbcProgramType stage, uint32_t index) { return computeStageUavBindingOffset(stage) + DxbcUavBindingCount + index; } - /** - * \brief Primitive vertex count - * - * Calculates the number of vertices - * for a given primitive type. - */ uint32_t primitiveVertexCount( DxbcPrimitive primitive); diff --git a/app/src/main/cpp/thirdparty/dxbc/include/dxvk/dxvk_pipelayout.h b/app/src/main/cpp/thirdparty/dxbc/include/dxvk/dxvk_pipelayout.h index 9873719c70..190724bb53 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/dxvk/dxvk_pipelayout.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/dxvk/dxvk_pipelayout.h @@ -15,12 +15,6 @@ namespace dxvk { class DxvkDevice; class DxvkPipelineManager; - /** - * \brief Order-invariant atomic access operation - * - * Information used to optimize barriers when a resource - * is accessed exlusively via order-invariant stores. - */ struct DxvkAccessOp { enum OpType : uint16_t { None = 0x0u, @@ -56,50 +50,22 @@ namespace dxvk { static_assert(sizeof(DxvkAccessOp) == sizeof(uint16_t)); - /** - * \brief Binding info - * - * Stores metadata for a single binding in - * a given shader, or for the whole pipeline. - */ struct DxvkBindingInfo { - VkDescriptorType descriptorType = VK_DESCRIPTOR_TYPE_MAX_ENUM; ///< Vulkan descriptor type - uint32_t resourceBinding = 0u; ///< API binding slot for the resource - VkImageViewType viewType = VK_IMAGE_VIEW_TYPE_MAX_ENUM; ///< Image view type - VkShaderStageFlagBits stage = VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM; ///< Shader stage - VkAccessFlags access = 0u; ///< Access mask for the resource - DxvkAccessOp accessOp = DxvkAccessOp::None; ///< Order-invariant store type, if any - bool uboSet = false; ///< Whether to include this in the UBO set - bool isMultisampled = false; ///< Multisampled binding + VkDescriptorType descriptorType = VK_DESCRIPTOR_TYPE_MAX_ENUM; + uint32_t resourceBinding = 0u; + VkImageViewType viewType = VK_IMAGE_VIEW_TYPE_MAX_ENUM; + VkShaderStageFlagBits stage = VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM; + VkAccessFlags access = 0u; + DxvkAccessOp accessOp = DxvkAccessOp::None; + bool uboSet = false; + bool isMultisampled = false; - /** - * \brief Computes descriptor set index for the given binding - * - * This is determines based on the shader stages that use the binding. - * \returns Descriptor set index - */ uint32_t computeSetIndex() const; - /** - * \brief Numeric value of the binding - * - * Used when sorting bindings. - * \returns Numeric value - */ uint32_t value() const; - /** - * \brief Checks for equality - * - * \param [in] other Binding to compare to - * \returns \c true if both bindings are equal - */ bool eq(const DxvkBindingInfo& other) const; - /** - * \brief Hashes binding info - * \returns Binding hash - */ size_t hash() const; }; diff --git a/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_code_buffer.h b/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_code_buffer.h index 4e33d6dcb0..ed8a2c36e9 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_code_buffer.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_code_buffer.h @@ -8,13 +8,6 @@ namespace dxvk { - /** - * \brief SPIR-V code buffer - * - * Helper class for generating SPIR-V shaders. - * Stores arbitrary SPIR-V instructions in a - * format that can be read by Vulkan drivers. - */ class SpirvCodeBuffer { public: @@ -35,193 +28,62 @@ namespace dxvk { SpirvCodeBuffer &operator=(const SpirvCodeBuffer &) = default; SpirvCodeBuffer &operator=(SpirvCodeBuffer &&) = default; - /** - * \brief Code data - * \returns Code data - */ const uint32_t* data() const { return m_code.data(); } uint32_t* data() { return m_code.data(); } - /** - * \brief Code size, in dwords - * \returns Code size, in dwords - */ uint32_t dwords() const { return m_code.size(); } - /** - * \brief Code size, in bytes - * \returns Code size, in bytes - */ size_t size() const { return m_code.size() * sizeof(uint32_t); } - /** - * \brief Begin instruction iterator - * - * Points to the first instruction in the instruction - * block. The header, if any, will be skipped over. - * \returns Instruction iterator - */ SpirvInstructionIterator begin() { return SpirvInstructionIterator( m_code.data(), 0, m_code.size()); } - /** - * \brief End instruction iterator - * - * Points to the end of the instruction block. - * \returns Instruction iterator - */ SpirvInstructionIterator end() { return SpirvInstructionIterator(nullptr, 0, 0); } - /** - * \brief Allocates a new ID - * - * Returns a new valid ID and increments the - * maximum ID count stored in the header. - * \returns The new SPIR-V ID - */ uint32_t allocId(); - /** - * \brief Appends an instruction - * - * Slightly faster than individually adding words. - * \param [in] ins Instruction - */ void append(const SpirvInstruction& ins); - /** - * \brief Merges two code buffers - * - * This is useful to generate declarations or - * the SPIR-V header at the same time as the - * code when doing so in advance is impossible. - * \param [in] other Code buffer to append - */ void append(const SpirvCodeBuffer& other); - /** - * \brief Appends an 32-bit word to the buffer - * \param [in] word The word to append - */ void putWord(uint32_t word); - /** - * \brief Appends an instruction word to the buffer - * - * Adds a single word containing both the word count - * and the op code number for a single instruction. - * \param [in] opCode Operand code - * \param [in] wordCount Number of words - */ void putIns(spv::Op opCode, uint16_t wordCount); - /** - * \brief Appends a 32-bit integer to the buffer - * \param [in] value The number to add - */ void putInt32(uint32_t word); - /** - * \brief Appends a 64-bit integer to the buffer - * - * A 64-bit integer will take up two 32-bit words. - * \param [in] value 64-bit value to add - */ void putInt64(uint64_t value); - /** - * \brief Appends a 32-bit float to the buffer - * \param [in] value The number to add - */ void putFloat32(float value); - /** - * \brief Appends a 64-bit float to the buffer - * \param [in] value The number to add - */ void putFloat64(double value); - /** - * \brief Appends a literal string to the buffer - * \param [in] str String to append to the buffer - */ void putStr(const char* str); - /** - * \brief Adds the header to the buffer - * - * \param [in] version SPIR-V version - * \param [in] boundIds Number of bound IDs - */ void putHeader(uint32_t version, uint32_t boundIds); - /** - * \brief Erases given number of dwords - * - * Removes data from the code buffer, starting - * at the current insertion offset. - * \param [in] size Number of words to remove - */ void erase(size_t size); - /** - * \brief Computes length of a literal string - * - * \param [in] str The string to check - * \returns Number of words consumed by a string - */ uint32_t strLen(const char* str); - /** - * \brief Stores the SPIR-V module to a stream - * - * The ability to save modules to a file - * exists mostly for debugging purposes. - * \param [in] stream Output stream - */ void store(std::ostream& stream) const; - /** - * \brief Retrieves current insertion pointer - * - * Sometimes it may be necessay to insert code into the - * middle of the stream rather than appending it. This - * retrieves the current function pointer. Note that the - * pointer will become invalid if any code is inserted - * before the current pointer location. - * \returns Current instruction pointr - */ size_t getInsertionPtr() const { return m_ptr; } - /** - * \brief Sets insertion pointer to a specific value - * - * Sets the insertion pointer to a value that was - * previously retrieved by \ref getInsertionPtr. - * \returns Current instruction pointr - */ void beginInsertion(size_t ptr) { m_ptr = ptr; } - /** - * \brief Sets insertion pointer to the end - * - * After this call, new instructions will be - * appended to the stream. In other words, - * this will restore default behaviour. - * \returns Previous instruction pointer - */ size_t endInsertion() { return std::exchange(m_ptr, m_code.size()); } diff --git a/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_instruction.h b/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_instruction.h index 1f93141578..cfa932ea65 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_instruction.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_instruction.h @@ -4,13 +4,6 @@ namespace dxvk { - /** - * \brief SPIR-V instruction - * - * Helps parsing a single instruction, providing - * access to the op code, instruction length and - * instruction arguments. - */ class SpirvInstruction { public: @@ -19,64 +12,29 @@ namespace dxvk { SpirvInstruction(uint32_t* code, uint32_t offset, uint32_t length) : m_code(code), m_offset(offset), m_length(length) { } - /** - * \brief SPIR-V Op code - * \returns The op code - */ spv::Op opCode() const { return static_cast( this->arg(0) & spv::OpCodeMask); } - /** - * \brief Instruction length - * \returns Number of DWORDs - */ uint32_t length() const { return this->arg(0) >> spv::WordCountShift; } - /** - * \brief Instruction offset - * \returns Offset in DWORDs - */ uint32_t offset() const { return m_offset; } - /** - * \brief Argument value - * - * Retrieves an argument DWORD. Note that some instructions - * take 64-bit arguments which require more than one DWORD. - * Arguments start at index 1. Calling this method with an - * argument ID of 0 will return the opcode token. - * \param [in] idx Argument index, starting at 1 - * \returns The argument value - */ uint32_t arg(uint32_t idx) const { const uint32_t index = m_offset + idx; return index < m_length ? m_code[index] : 0; } - /** - * \brief Argument string - * - * Retrieves a pointer to a UTF-8-encoded string. - * \param [in] idx Argument index, starting at 1 - * \returns Pointer to the literal string - */ const char* chr(uint32_t idx) const { const uint32_t index = m_offset + idx; return index < m_length ? reinterpret_cast(&m_code[index]) : nullptr; } - /** - * \brief Changes the value of an argument - * - * \param [in] idx Argument index, starting at 1 - * \param [in] word New argument word - */ void setArg(uint32_t idx, uint32_t word) const { if (m_offset + idx < m_length) m_code[m_offset + idx] = word; @@ -91,12 +49,6 @@ namespace dxvk { }; - /** - * \brief SPIR-V instruction iterator - * - * Convenient iterator that can be used - * to process raw SPIR-V shader code. - */ class SpirvInstructionIterator { public: diff --git a/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_module.h b/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_module.h index 02b7b7cf77..6827d1b8b0 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_module.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/spirv/spirv_module.h @@ -45,14 +45,6 @@ namespace dxvk { return (major << 16) | (minor << 8); } - /** - * \brief SPIR-V module - * - * This class generates a code buffer containing a full - * SPIR-V shader module. Ensures that the module layout - * is valid, as defined in the SPIR-V 1.0 specification, - * section 2.4 "Logical Layout of a Module". - */ class SpirvModule { public: diff --git a/app/src/main/cpp/thirdparty/dxbc/include/spirv/thirdparty/GLSL.std.450.h b/app/src/main/cpp/thirdparty/dxbc/include/spirv/thirdparty/GLSL.std.450.h index 0594f907a1..6b862f16e7 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/spirv/thirdparty/GLSL.std.450.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/spirv/thirdparty/GLSL.std.450.h @@ -13,7 +13,7 @@ ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -31,7 +31,7 @@ static const int GLSLstd450Version = 100; static const int GLSLstd450Revision = 3; enum GLSLstd450 { - GLSLstd450Bad = 0, // Don't use + GLSLstd450Bad = 0, GLSLstd450Round = 1, GLSLstd450RoundEven = 2, @@ -71,8 +71,8 @@ enum GLSLstd450 { GLSLstd450Determinant = 33, GLSLstd450MatrixInverse = 34, - GLSLstd450Modf = 35, // second operand needs an OpVariable to write to - GLSLstd450ModfStruct = 36, // no OpVariable operand + GLSLstd450Modf = 35, + GLSLstd450ModfStruct = 36, GLSLstd450FMin = 37, GLSLstd450UMin = 38, GLSLstd450SMin = 39, @@ -83,13 +83,13 @@ enum GLSLstd450 { GLSLstd450UClamp = 44, GLSLstd450SClamp = 45, GLSLstd450FMix = 46, - GLSLstd450IMix = 47, // Reserved + GLSLstd450IMix = 47, GLSLstd450Step = 48, GLSLstd450SmoothStep = 49, GLSLstd450Fma = 50, - GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to - GLSLstd450FrexpStruct = 52, // no OpVariable operand + GLSLstd450Frexp = 51, + GLSLstd450FrexpStruct = 52, GLSLstd450Ldexp = 53, GLSLstd450PackSnorm4x8 = 54, @@ -128,4 +128,4 @@ enum GLSLstd450 { GLSLstd450Count }; -#endif // #ifndef GLSLstd450_H +#endif diff --git a/app/src/main/cpp/thirdparty/dxbc/include/spirv/thirdparty/spirv.hpp b/app/src/main/cpp/thirdparty/dxbc/include/spirv/thirdparty/spirv.hpp index f439e472f1..945e75a07d 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/spirv/thirdparty/spirv.hpp +++ b/app/src/main/cpp/thirdparty/dxbc/include/spirv/thirdparty/spirv.hpp @@ -22,27 +22,7 @@ // FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS // IN THE MATERIALS. -// This header is automatically generated by the same tool that creates -// the Binary Section of the SPIR-V specification. -// Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python, C#, D, Beef -// -// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL -// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL -// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL -// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL -// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] -// - C# will use enum classes in the Specification class located in the "Spv" namespace, -// e.g.: Spv.Specification.SourceLanguage.GLSL -// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL -// - Beef will use enum classes in the Specification class located in the "Spv" namespace, -// e.g.: Spv.Specification.SourceLanguage.GLSL -// -// Some tokens act like mask values, which can be OR'd together, -// while others are mutually exclusive. The mask-like ones have -// "Mask" in their name, and a parallel enum that has the shift -// amount (1 << x) for each corresponding enumerant. #ifndef spirv_HPP #define spirv_HPP @@ -2398,7 +2378,7 @@ enum Op { inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { - default: /* unknown opcode */ break; + default: break; case OpNop: *hasResult = false; *hasResultType = false; break; case OpUndef: *hasResult = true; *hasResultType = true; break; case OpSourceContinued: *hasResult = false; *hasResultType = false; break; @@ -5144,9 +5124,8 @@ inline const char* OpToString(Op value) { } } -#endif /* SPV_ENABLE_UTILITY_CODE */ +#endif -// Overload bitwise operators for mask bit combining inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); } @@ -5209,6 +5188,6 @@ inline RawAccessChainOperandsMask operator&(RawAccessChainOperandsMask a, RawAcc inline RawAccessChainOperandsMask operator^(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) ^ unsigned(b)); } inline RawAccessChainOperandsMask operator~(RawAccessChainOperandsMask a) { return RawAccessChainOperandsMask(~unsigned(a)); } -} // end namespace spv +} -#endif // #ifndef spirv_HPP +#endif diff --git a/app/src/main/cpp/thirdparty/dxbc/include/util/log/log.h b/app/src/main/cpp/thirdparty/dxbc/include/util/log/log.h index b12428c08c..58075723b1 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/util/log/log.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/util/log/log.h @@ -14,12 +14,6 @@ namespace dxvk { None = 5, }; - /** - * \brief Logger - * - * Logger for one DLL. Creates a text file and - * writes all log messages to that file. - */ class Logger { public: diff --git a/app/src/main/cpp/thirdparty/dxbc/include/util/rc/util_rc.h b/app/src/main/cpp/thirdparty/dxbc/include/util/rc/util_rc.h index b92cf00b49..b84654c4f4 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/util/rc/util_rc.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/util/rc/util_rc.h @@ -6,25 +6,14 @@ namespace dxvk { - /** - * \brief Reference-counted object - */ class RcObject { public: - /** - * \brief Increments reference count - * \returns New reference count - */ force_inline uint32_t incRef() { return ++m_refCount; } - /** - * \brief Decrements reference count - * \returns New reference count - */ force_inline uint32_t decRef() { return --m_refCount; } diff --git a/app/src/main/cpp/thirdparty/dxbc/include/util/rc/util_rc_ptr.h b/app/src/main/cpp/thirdparty/dxbc/include/util/rc/util_rc_ptr.h index ac465758cc..c0d1e0778a 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/util/rc/util_rc_ptr.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/util/rc/util_rc_ptr.h @@ -8,13 +8,6 @@ namespace dxvk { - /** - * \brief Pointer for reference-counted objects - * - * This only requires the given type to implement \c incRef - * and \c decRef methods that adjust the reference count. - * \tparam T Object type - */ template class Rc { template @@ -108,36 +101,15 @@ namespace dxvk { return m_object != nullptr; } - /** - * \brief Sets pointer without acquiring a reference - * - * Must only be use when a reference has been taken via - * other means. - * \param [in] object Object pointer - */ void unsafeInsert(T* object) { this->decRef(); m_object = object; } - /** - * \brief Extracts raw pointer - * - * Sets the smart pointer to null without decrementing the - * reference count. Must only be used when the reference - * count is decremented in some other way. - * \returns Pointer to owned object - */ T* unsafeExtract() { return std::exchange(m_object, nullptr); } - /** - * \brief Creates smart pointer without taking reference - * - * Must only be used when a refernece has been obtained via other means. - * \param [in] object Pointer to object to take ownership of - */ static Rc unsafeCreate(T* object) { return Rc(object, false); } @@ -159,7 +131,6 @@ namespace dxvk { if constexpr (std::is_void_vdecRef())>) { m_object->decRef(); } else { - // Deprecated, objects should manage themselves now. if (!m_object->decRef()) delete m_object; } diff --git a/app/src/main/cpp/thirdparty/dxbc/include/util/util_bit.h b/app/src/main/cpp/thirdparty/dxbc/include/util/util_bit.h index 2a53025818..7df34d081d 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/util/util_bit.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/util/util_bit.h @@ -72,11 +72,6 @@ namespace dxvk::bit { #elif defined(__BMI__) return __tzcnt_u32(n); #elif defined(DXVK_ARCH_X86) && (defined(__GNUC__) || defined(__clang__)) - // tzcnt is encoded as rep bsf, so we can use it on all - // processors, but the behaviour of zero inputs differs: - // - bsf: zf = 1, cf = ?, result = ? - // - tzcnt: zf = 0, cf = 1, result = 32 - // We'll have to handle this case manually. uint32_t res; uint32_t tmp; asm ( @@ -223,14 +218,6 @@ namespace dxvk::bit { } - /** - * \brief Clears cache lines of memory - * - * Uses non-temporal stores. The memory region offset - * and size are assumed to be aligned to 64 bytes. - * \param [in] mem Memory region to clear - * \param [in] size Number of bytes to clear - */ inline void bclear(void* mem, size_t size) { #if defined(DXVK_ARCH_X86) && (defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER)) auto zero = _mm_setzero_si128(); @@ -253,13 +240,6 @@ namespace dxvk::bit { } - /** - * \brief Compares two aligned structs bit by bit - * - * \param [in] a First struct - * \param [in] b Second struct - * \returns \c true if the structs are equal - */ template bool bcmpeq(const T* a, const T* b) { static_assert(alignof(T) >= 16); @@ -319,7 +299,6 @@ namespace dxvk::bit { uint32_t dword = 0; uint32_t bit = idx; - // Compiler doesn't remove this otherwise. if constexpr (Dwords > 1) { dword = idx / 32; bit = idx % 32; @@ -332,7 +311,6 @@ namespace dxvk::bit { uint32_t dword = 0; uint32_t bit = idx; - // Compiler doesn't remove this otherwise. if constexpr (Dwords > 1) { dword = idx / 32; bit = idx % 32; @@ -354,7 +332,6 @@ namespace dxvk::bit { uint32_t dword = 0; uint32_t bit = idx; - // Compiler doesn't remove this otherwise. if constexpr (Dwords > 1) { dword = idx / 32; bit = idx % 32; @@ -594,17 +571,6 @@ namespace dxvk::bit { }; - /** - * \brief Encodes float as fixed point - * - * Rounds away from zero. If this is not suitable for - * certain use cases, implement round to nearest even. - * \tparam T Integer type, may be signed - * \tparam I Integer bits - * \tparam F Fractional bits - * \param n Float to encode - * \returns Encoded fixed-point value - */ template T encodeFixed(float n) { if (n != n) @@ -631,18 +597,8 @@ namespace dxvk::bit { } - /** - * \brief Decodes fixed-point integer to float - * - * \tparam T Integer type, may be signed - * \tparam I Integer bits - * \tparam F Fractional bits - * \param n Number to decode - * \returns Decoded number - */ template float decodeFixed(T n) { - // Sign-extend as necessary if constexpr (std::is_signed_v) n -= (n & (T(1u) << (I + F - 1u))) << 1u; @@ -650,9 +606,6 @@ namespace dxvk::bit { } - /** - * \brief Inserts one null bit after each bit - */ inline uint32_t split2(uint32_t c) { c = (c ^ (c << 8u)) & 0x00ff00ffu; c = (c ^ (c << 4u)) & 0x0f0f0f0fu; @@ -662,9 +615,6 @@ namespace dxvk::bit { } - /** - * \brief Inserts two null bits after each bit - */ inline uint64_t split3(uint64_t c) { c = (c | c << 32u) & 0x001f00000000ffffull; c = (c | c << 16u) & 0x001f0000ff0000ffull; @@ -675,32 +625,16 @@ namespace dxvk::bit { } - /** - * \brief Interleaves bits from two integers - * - * Both numbers must fit into 16 bits. - * \param [in] x X coordinate - * \param [in] y Y coordinate - * \returns Morton code of x and y - */ inline uint32_t interleave(uint16_t x, uint16_t y) { return split2(x) | (split2(y) << 1u); } - /** - * \brief Interleaves bits from three integers - * - * All three numbers must fit into 16 bits. - */ inline uint64_t interleave(uint16_t x, uint16_t y, uint16_t z) { return split3(x) | (split3(y) << 1u) | (split3(z) << 2u); } - /** - * \brief 48-bit integer storage type - */ struct uint48_t { explicit uint48_t(uint64_t n) : a(uint16_t(n)), b(uint16_t(n >> 16)), c(uint16_t(n >> 32)) { } @@ -710,7 +644,6 @@ namespace dxvk::bit { uint16_t c; explicit operator uint64_t () const { - // GCC generates worse code if we promote to uint64 directly uint32_t lo = uint32_t(a) | (uint32_t(b) << 16); return uint64_t(lo) | (uint64_t(c) << 32); } diff --git a/app/src/main/cpp/thirdparty/dxbc/include/util/util_error.h b/app/src/main/cpp/thirdparty/dxbc/include/util/util_error.h index 2cfd45ffd0..5790952f6d 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/util/util_error.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/util/util_error.h @@ -4,12 +4,6 @@ namespace dxvk { - /** - * \brief DXVK error - * - * A generic exception class that stores a - * message. Exceptions should be logged. - */ class DxvkError { public: diff --git a/app/src/main/cpp/thirdparty/dxbc/include/util/util_math.h b/app/src/main/cpp/thirdparty/dxbc/include/util/util_math.h index 9276d9337c..c26bf7c87f 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/util/util_math.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/util/util_math.h @@ -24,9 +24,6 @@ namespace dxvk { return (what / to) * to; } - // Equivalent of std::clamp for use with floating point numbers - // Handles (-){INFINITY,NAN} cases. - // Will return min in cases of NAN, etc. inline float fclamp(float value, float min, float max) { return std::fmin( std::fmax(value, min), max); diff --git a/app/src/main/cpp/thirdparty/dxbc/include/util/util_small_vector.h b/app/src/main/cpp/thirdparty/dxbc/include/util/util_small_vector.h index 861c9e0e02..b9091efd85 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/util/util_small_vector.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/util/util_small_vector.h @@ -193,7 +193,6 @@ namespace dxvk { } u; size_t pick_capacity(size_t n) { - // Pick next largest power of two for the new capacity return size_t(1u) << ((sizeof(n) * 8u) - bit::lzcnt(n - 1)); } diff --git a/app/src/main/cpp/thirdparty/dxbc/include/util/util_string.h b/app/src/main/cpp/thirdparty/dxbc/include/util/util_string.h index 5fe00fbf53..e8ca7f2d0e 100644 --- a/app/src/main/cpp/thirdparty/dxbc/include/util/util_string.h +++ b/app/src/main/cpp/thirdparty/dxbc/include/util/util_string.h @@ -48,15 +48,6 @@ namespace dxvk::str { uint32_t* end, uint32_t ch); - /** - * \brief Decodes a single character - * - * Note that \c begin and \c end must not be equal. - * \param [in] begin Pointer to current position within the input string - * \param [in] end Pointer to the end of the input string - * \param [out] ch Pointer to the decoded character code - * \returns Pointer to next character in the input string - */ template const T* decodeChar( const T* begin, @@ -72,18 +63,6 @@ namespace dxvk::str { return reinterpret_cast(result); } - /** - * \brief Encodes a character - * - * Note that \c begin and \c end may be both be \c nullptr or equal, in - * which case only the length of the encoded character will be returned. - * \param [in] begin Pointer to current position within the output string - * \param [in] end Pointer to the end of the output string - * \param [in] ch Character to encode - * \returns If begin is \c nullptr , the number of units required to encode - * the character. Otherwise, the number of units written to the output. - * This may return \c 0 for characters that cannot be written or encoded. - */ template size_t encodeChar( T* begin, @@ -97,13 +76,6 @@ namespace dxvk::str { ch); } - /** - * \brief Computes length of a null-terminated string - * - * \param [in] begin Start of input string - * \returns Number of characters in input string, - * excluding the terminating null character - */ template size_t length(const S* string) { size_t result = 0; @@ -114,23 +86,6 @@ namespace dxvk::str { return result; } - /** - * \brief Converts string from one encoding to another - * - * The output string arguments may be \c nullptr. In that case, the - * total length of the transcoded string will be returned, in units - * of the output character type. The output string will only be - * null-terminated if the input string is also null-terminated. - * \tparam D Output character type - * \tparam S Input character type - * \param [in] dstBegin Start of output string - * \param [in] dstLength Length of output string - * \param [in] srcBegin Start of input string - * \param [in] srcLength Length of input string - * \returns If \c dstBegin is \c nullptr , the total number of output - * characters required to store the output string. Otherwise, the - * total number of characters written to the output string. - */ template size_t transcodeString( D* dstBegin, @@ -159,20 +114,8 @@ namespace dxvk::str { return totalLength; } - /** - * \brief Creates string object from wide char array - * - * \param [in] ws Null-terminated wide string - * \returns Regular string object - */ std::string fromws(const wchar_t* ws); - /** - * \brief Creates wide string object from char array - * - * \param [in] mbs Null-terminated string - * \returns Wide string object - */ std::wstring tows(const char* mbs); #ifdef _WIN32 @@ -211,25 +154,15 @@ namespace dxvk::str { } } - /** - * \brief Split string at one or more delimiters characters - * - * \param [in] string String to split - * \param [in] delims Delimiter characters - * \returns Vector of substring views - */ inline std::vector split(std::string_view string, std::string_view delims = " ") { std::vector tokens; for (size_t start = 0; start < string.size(); ) { - // Find first delimiter const auto end = string.find_first_of(delims, start); - // Add non-empty tokens if (start != end) tokens.emplace_back(string.substr(start, end-start)); - // Break at the end of string if (end == std::string_view::npos) break; diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_analysis.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_analysis.cpp index 6064e9ee5d..138939e83d 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_analysis.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_analysis.cpp @@ -13,9 +13,6 @@ namespace dxvk { m_osgn (osgn), m_psgn (psgn), m_analysis(&analysis) { - // Get number of clipping and culling planes from the - // input and output signatures. We will need this to - // declare the shader input and output interfaces. m_analysis->clipCullIn = getClipCullInfo(m_isgn); m_analysis->clipCullOut = getClipCullInfo(m_osgn); } @@ -36,7 +33,6 @@ namespace dxvk { m_analysis->uavInfos[registerId].accessAtomicOp = true; m_analysis->uavInfos[registerId].accessFlags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT; - // Check whether the atomic operation is order-invariant DxvkAccessOp op = DxvkAccessOp::None; switch (ins.op) { @@ -104,8 +100,6 @@ namespace dxvk { const uint32_t registerId = ins.dst[0].idx[0].offset; m_analysis->uavInfos[registerId].accessFlags |= VK_ACCESS_SHADER_WRITE_BIT; - // The UAV format may change between dispatches, so be conservative here - // and only allow this optimization when the app is writing zeroes. DxvkAccessOp storeOp = getStoreAccessOp(DxbcRegMask(0xf), ins.src[1u]); if (storeOp != DxvkAccessOp(DxvkAccessOp::OpType::StoreUi, 0u)) @@ -190,7 +184,6 @@ namespace dxvk { if (m_analysis->uavInfos[uav].accessOp == DxvkAccessOp::None) m_analysis->uavInfos[uav].accessOp = op; - // Maintain ordering if the UAV is accessed via other operations as well if (op == DxvkAccessOp::None || m_analysis->uavInfos[uav].accessOp != op) m_analysis->uavInfos[uav].nonInvariantAccess = true; } @@ -200,31 +193,26 @@ namespace dxvk { if (src.type != DxbcOperandType::Imm32) return DxvkAccessOp::None; - // Trivial case, same value is written to all components if (src.componentCount == DxbcComponentCount::Component1) return getConstantStoreOp(src.imm.u32_1); if (src.componentCount != DxbcComponentCount::Component4) return DxvkAccessOp::None; - // Otherwise, make sure that all written components are equal DxvkAccessOp op = DxvkAccessOp::None; for (uint32_t i = 0u; i < 4u; i++) { if (!writeMask[i]) continue; - // If the written value can't be represented, skip DxvkAccessOp scalarOp = getConstantStoreOp(src.imm.u32_4[i]); if (scalarOp == DxvkAccessOp::None) return DxvkAccessOp::None; - // First component written if (op == DxvkAccessOp::None) op = scalarOp; - // Conflicting store ops if (op != scalarOp) return DxvkAccessOp::None; } diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_chunk_isgn.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_chunk_isgn.cpp index 80e540f234..6291ac9015 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_chunk_isgn.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_chunk_isgn.cpp @@ -11,7 +11,6 @@ namespace dxvk { DxbcScalarType::Sint32, DxbcScalarType::Float32, }; - // https://github.com/DarkStarSword/3d-fixes/blob/master/dx11shaderanalyse.py#L101 bool hasStream = (tag == "ISG1") || (tag == "OSG1") || (tag == "PSG1") || (tag == "OSG5"); bool hasPrecision = (tag == "ISG1") || (tag == "OSG1") || (tag == "PSG1"); diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_chunk_shex.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_chunk_shex.cpp index 552329b882..3e5d7d36fa 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_chunk_shex.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_chunk_shex.cpp @@ -3,14 +3,10 @@ namespace dxvk { DxbcShex::DxbcShex(DxbcReader reader) { - // The shader version and type are stored in a 32-bit unit, - // where the first byte contains the major and minor version - // numbers, and the high word contains the program type. reader.skip(2); auto pType = reader.readEnum(); m_programInfo = DxbcProgramInfo(pType); - // Read the actual shader code as an array of DWORDs. auto codeLength = reader.readu32() - 2; m_code.resize(codeLength); reader.read(m_code.data(), codeLength * sizeof(uint32_t)); diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_compiler.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_compiler.cpp index 0b6286fe5d..388d348689 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_compiler.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_compiler.cpp @@ -20,17 +20,13 @@ namespace dxvk { m_osgn (osgn), m_psgn (psgn), m_analysis (&analysis) { - // Declare an entry point ID. We'll need it during the - // initialization phase where the execution mode is set. m_entryPointId = m_module.allocateId(); - // Set the shader name so that we recognize it in renderdoc m_module.setDebugSource( spv::SourceLanguageUnknown, 0, m_module.addDebugString(fileName.c_str()), nullptr); - // Set the memory model. This is the same for all shaders. m_module.enableCapability( spv::CapabilityVulkanMemoryModel); @@ -38,7 +34,6 @@ namespace dxvk { spv::AddressingModelLogical, spv::MemoryModelVulkan); - // Make sure our interface registers are clear for (uint32_t i = 0; i < DxbcMaxInterfaceRegs; i++) { m_vRegs.at(i) = DxbcRegisterPointer { }; m_oRegs.at(i) = DxbcRegisterPointer { }; @@ -194,7 +189,6 @@ namespace dxvk { DxbcInterpolationMode::Undefined); } - // Figure out which streams to enable uint32_t streamMask = 0; for (size_t i = 0; i < m_xfbVars.size(); i++) @@ -205,18 +199,13 @@ namespace dxvk { m_module.opEmitVertex(m_module.constu32(streamId)); } - // End the main function emitFunctionEnd(); - // For pass-through we always assume points m_inputTopology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST; } SpirvCodeBuffer DxbcCompiler::finalize() { - // Depending on the shader type, this will prepare - // input registers, call various shader functions - // and write back the output registers. switch (m_programInfo.type()) { case DxbcProgramType::VertexShader: this->emitVsFinalize(); break; case DxbcProgramType::HullShader: this->emitHsFinalize(); break; @@ -227,11 +216,8 @@ namespace dxvk { default: throw DxvkError("Invalid shader stage"); } - // Emit float control mode if the extension is supported this->emitFloatControl(); - // Declare the entry point, we now have all the - // information we need, including the interfaces m_module.addEntryPoint(m_entryPointId, m_programInfo.executionModel(), "main"); m_module.setDebugName(m_entryPointId, "main"); @@ -341,9 +327,6 @@ namespace dxvk { void DxbcCompiler::emitDclIndexRange(const DxbcShaderInstruction& ins) { - // dcl_index_range has one operand: - // (0) Range start, either an input or output register - // (1) Range end uint32_t index = ins.dst[0].idxDim - 1u; DxbcIndexRange range = { }; @@ -356,19 +339,11 @@ namespace dxvk { void DxbcCompiler::emitDclTemps(const DxbcShaderInstruction& ins) { - // dcl_temps has one operand: - // (imm0) Number of temp registers - // Ignore this and declare temps on demand. } void DxbcCompiler::emitDclIndexableTemp(const DxbcShaderInstruction& ins) { - // dcl_indexable_temps has three operands: - // (imm0) Array register index (x#) - // (imm1) Number of vectors stored in the array - // (imm2) Component count of each individual vector. This is - // always 4 in fxc-generated binaries and therefore useless. const uint32_t regId = ins.imm[0].u32; DxbcRegisterInfo info; @@ -398,21 +373,9 @@ namespace dxvk { case DxbcOperandType::Input: case DxbcOperandType::Output: { - // dcl_input and dcl_output instructions - // have the following operands: - // (dst0) The register to declare - // (imm0) The system value (optional) uint32_t regDim = 0; uint32_t regIdx = 0; - // In the vertex and fragment shader stage, the - // operand indices will have the following format: - // (0) Register index - // - // In other stages, the input and output registers - // may be declared as arrays of a fixed size: - // (0) Array length - // (1) Register index if (ins.dst[0].idxDim == 2) { regDim = ins.dst[0].idx[0].offset; regIdx = ins.dst[0].idx[1].offset; @@ -425,9 +388,6 @@ namespace dxvk { return; } - // This declaration may map an output register to a system - // value. If that is the case, the system value type will - // be stored in the second operand. const bool hasSv = ins.op == DxbcOpcode::DclInputSgv || ins.op == DxbcOpcode::DclInputSiv @@ -441,8 +401,6 @@ namespace dxvk { if (hasSv) sv = static_cast(ins.imm[0].u32); - // In the pixel shader, inputs are declared with an - // interpolation mode that is part of the op token. const bool hasInterpolationMode = ins.op == DxbcOpcode::DclInputPs || ins.op == DxbcOpcode::DclInputPsSiv; @@ -452,7 +410,6 @@ namespace dxvk { if (hasInterpolationMode) im = ins.controls.interpolation(); - // Declare the actual input/output variable switch (ins.op) { case DxbcOpcode::DclInput: case DxbcOpcode::DclInputSgv: @@ -599,14 +556,10 @@ namespace dxvk { } break; case DxbcOperandType::OutputControlPointId: { - // This system value map to the invocation - // ID, which has been declared already. } break; case DxbcOperandType::InputPatchConstant: case DxbcOperandType::OutputControlPoint: { - // These have been declared as global input and - // output arrays, so there's nothing left to do. } break; case DxbcOperandType::InputGsInstanceId: { @@ -621,8 +574,6 @@ namespace dxvk { m_module.enableExtension("SPV_EXT_fragment_fully_covered"); m_module.enableCapability(spv::CapabilityFragmentFullyCoveredEXT); - // This is bool in SPIR-V but uint32 in DXBC. A bool value of - // false must be 0, and bit 1 must be set to represent true. uint32_t builtinId = emitNewBuiltinVariable({ { DxbcScalarType::Bool, 1, 0 }, spv::StorageClassInput }, @@ -660,9 +611,6 @@ namespace dxvk { DxbcRegMask regMask, DxbcSystemValue sv, DxbcInterpolationMode im) { - // Avoid declaring the same variable multiple times. - // This may happen when multiple system values are - // mapped to different parts of the same register. if (m_vRegs.at(regIdx).id == 0 && sv == DxbcSystemValue::None) { const DxbcVectorType regType = getInputRegType(regIdx); @@ -679,7 +627,6 @@ namespace dxvk { m_vRegs.at(regIdx) = { regType, varId }; - // Interpolation mode, used in pixel shaders if (im == DxbcInterpolationMode::Constant) m_module.decorate(varId, spv::DecorationFlat); @@ -706,11 +653,9 @@ namespace dxvk { } } - // Declare the input slot as defined m_inputMask |= 1u << regIdx; m_vArrayLength = std::max(m_vArrayLength, regIdx + 1); } else if (sv != DxbcSystemValue::None) { - // Add a new system value mapping if needed bool skipSv = sv == DxbcSystemValue::ClipDistance || sv == DxbcSystemValue::CullDistance; @@ -726,21 +671,15 @@ namespace dxvk { DxbcRegMask regMask, DxbcSystemValue sv, DxbcInterpolationMode im) { - // Add a new system value mapping if needed. Clip - // and cull distances are handled separately. if (sv != DxbcSystemValue::None && sv != DxbcSystemValue::ClipDistance && sv != DxbcSystemValue::CullDistance) m_oMappings.push_back({ regIdx, regMask, sv }); if (m_programInfo.type() == DxbcProgramType::HullShader) { - // Hull shaders don't use standard outputs if (getCurrentHsForkJoinPhase() != nullptr) m_hs.outputPerPatchMask |= 1 << regIdx; } else if (m_oRegs.at(regIdx).id == 0) { - // Avoid declaring the same variable multiple times. - // This may happen when multiple system values are - // mapped to different parts of the same register. const DxbcVectorType regType = getOutputRegType(regIdx); DxbcRegisterInfo info; @@ -749,14 +688,9 @@ namespace dxvk { info.type.alength = regDim; info.sclass = spv::StorageClassOutput; - // In xfb mode, we set up the actual - // output vars when emitting a vertex if (m_moduleInfo.xfb != nullptr) info.sclass = spv::StorageClassPrivate; - // In geometry shaders, don't duplicate system value outputs - // to stay within device limits. The pixel shader will read - // all GS system value outputs as system value inputs. if (m_programInfo.type() == DxbcProgramType::GeometryShader && sv != DxbcSystemValue::None) info.sclass = spv::StorageClassPrivate; @@ -766,33 +700,24 @@ namespace dxvk { if (info.sclass == spv::StorageClassOutput) { m_module.decorateLocation(varId, regIdx); - // Add index decoration for potential dual-source blending if (m_programInfo.type() == DxbcProgramType::PixelShader) m_module.decorateIndex(varId, 0); - // Declare vertex positions in all stages as invariant, even if - // this is not the last stage, to help with potential Z fighting. if (sv == DxbcSystemValue::Position && m_moduleInfo.options.invariantPosition) m_module.decorate(varId, spv::DecorationInvariant); } m_oRegs.at(regIdx) = { regType, varId }; - // Declare the output slot as defined m_outputMask |= 1u << regIdx; } } void DxbcCompiler::emitDclConstantBuffer(const DxbcShaderInstruction& ins) { - // dcl_constant_buffer has one operand with two indices: - // (0) Constant buffer register ID (cb#) - // (1) Number of constants in the buffer uint32_t bufferId = ins.dst[0].idx[0].offset; uint32_t elementCount = ins.dst[0].idx[1].offset; - // With dynamic indexing, games will often index constant buffers - // out of bounds. Declare an upper bound to stay within spec. if (ins.controls.accessType() == DxbcConstantBufferAccessType::DynamicallyIndexed) elementCount = 4096; @@ -806,15 +731,11 @@ namespace dxvk { uint32_t numConstants, uint32_t numComponents, const char* name) { - // Uniform buffer data is stored as a fixed-size array - // of 4x32-bit vectors. SPIR-V requires explicit strides. const uint32_t arrayType = m_module.defArrayTypeUnique( getVectorTypeId({ DxbcScalarType::Float32, numComponents }), m_module.constu32(numConstants)); m_module.decorateArrayStride(arrayType, sizeof(uint32_t) * numComponents); - // SPIR-V requires us to put that array into a - // struct and decorate that struct as a block. const uint32_t structType = m_module.defStructTypeUnique(1, &arrayType); m_module.decorate(structType, spv::DecorationBlock); @@ -823,15 +744,12 @@ namespace dxvk { m_module.setDebugName (structType, str::format(name, "_t").c_str()); m_module.setDebugMemberName (structType, 0, "m"); - // Variable that we'll use to access the buffer const uint32_t varId = m_module.newVar( m_module.defPointerType(structType, spv::StorageClassUniform), spv::StorageClassUniform); m_module.setDebugName(varId, name); - // Compute the DXVK binding slot index for the buffer. - // D3D11 needs to bind the actual buffers to this slot. uint32_t bindingId = computeConstantBufferBinding( m_programInfo.type(), regIdx); @@ -843,7 +761,6 @@ namespace dxvk { buf.size = numConstants; m_constantBuffers.at(regIdx) = buf; - // Store descriptor info for the shader interface DxvkBindingInfo binding = { VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER }; binding.viewType = VK_IMAGE_VIEW_TYPE_MAX_ENUM; binding.access = VK_ACCESS_UNIFORM_READ_BIT; @@ -854,17 +771,12 @@ namespace dxvk { void DxbcCompiler::emitDclSampler(const DxbcShaderInstruction& ins) { - // dclSampler takes one operand: - // (dst0) The sampler register to declare const uint32_t samplerId = ins.dst[0].idx[0].offset; - // The sampler type is opaque, but we still have to - // define a pointer and a variable in oder to use it const uint32_t samplerType = m_module.defSamplerType(); const uint32_t samplerPtrType = m_module.defPointerType( samplerType, spv::StorageClassUniformConstant); - // Define the sampler variable const uint32_t varId = m_module.newVar(samplerPtrType, spv::StorageClassUniformConstant); m_module.setDebugName(varId, @@ -873,14 +785,12 @@ namespace dxvk { m_samplers.at(samplerId).varId = varId; m_samplers.at(samplerId).typeId = samplerType; - // Compute binding slot index for the sampler uint32_t bindingId = computeSamplerBinding( m_programInfo.type(), samplerId); m_module.decorateDescriptorSet(varId, 0); m_module.decorateBinding(varId, bindingId); - // Store descriptor info for the shader interface DxvkBindingInfo binding = { VK_DESCRIPTOR_TYPE_SAMPLER }; binding.viewType = VK_IMAGE_VIEW_TYPE_MAX_ENUM; binding.resourceBinding = bindingId; @@ -895,12 +805,8 @@ namespace dxvk { void DxbcCompiler::emitDclResourceTyped(const DxbcShaderInstruction& ins) { - // dclResource takes two operands: - // (dst0) The resource register ID - // (imm0) The resource return type const uint32_t registerId = ins.dst[0].idx[0].offset; - // We also handle unordered access views here const bool isUav = ins.op == DxbcOpcode::DclUavTyped; if (isUav) { @@ -909,12 +815,8 @@ namespace dxvk { m_module.enableCapability(spv::CapabilityStorageImageWriteWithoutFormat); } - // Defines the type of the resource (texture2D, ...) const DxbcResourceDim resourceType = ins.controls.resourceDim(); - // Defines the type of a read operation. DXBC has the ability - // to define four different types whereas SPIR-V only allows - // one, but in practice this should not be much of a problem. auto xType = static_cast( bit::extract(ins.imm[0].u32, 0, 3)); auto yType = static_cast( @@ -927,12 +829,9 @@ namespace dxvk { if ((xType != yType) || (xType != zType) || (xType != wType)) Logger::warn("DxbcCompiler: dcl_resource: Ignoring resource return types"); - // Declare the actual sampled type const DxbcScalarType sampledType = [xType] { switch (xType) { - // FIXME is this correct? There's no documentation about it case DxbcResourceReturnType::Mixed: return DxbcScalarType::Uint32; - // FIXME do we have to manually clamp writes to SNORM/UNORM resources? case DxbcResourceReturnType::Snorm: return DxbcScalarType::Float32; case DxbcResourceReturnType::Unorm: return DxbcScalarType::Float32; case DxbcResourceReturnType::Float: return DxbcScalarType::Float32; @@ -942,11 +841,9 @@ namespace dxvk { } }(); - // Declare the resource type const uint32_t sampledTypeId = getScalarTypeId(sampledType); const DxbcImageInfo typeInfo = getResourceType(resourceType, isUav); - // Declare additional capabilities if necessary switch (resourceType) { case DxbcResourceDim::Buffer: m_module.enableCapability(isUav @@ -967,13 +864,9 @@ namespace dxvk { break; default: - // No additional capabilities required break; } - // If the read-without-format capability is not set and this - // image is access via a typed load, or if atomic operations - // are used,, we must define the image format explicitly. spv::ImageFormat imageFormat = spv::ImageFormatUnknown; if (isUav) { @@ -983,15 +876,10 @@ namespace dxvk { imageFormat = getScalarImageFormat(sampledType); } - // We do not know whether the image is going to be used as - // a color image or a depth image yet, but we can pick the - // correct type when creating a sampled image object. const uint32_t imageTypeId = m_module.defImageType(sampledTypeId, typeInfo.dim, 0, typeInfo.array, typeInfo.ms, typeInfo.sampled, imageFormat); - // We'll declare the texture variable with the color type - // and decide which one to use when the texture is sampled. const uint32_t resourcePtrType = m_module.defPointerType( imageTypeId, spv::StorageClassUniformConstant); @@ -1001,8 +889,6 @@ namespace dxvk { m_module.setDebugName(varId, str::format(isUav ? "u" : "t", registerId).c_str()); - // Compute the DXVK binding slot index for the resource. - // D3D11 needs to bind the actual resource to this slot. uint32_t bindingId = isUav ? computeUavBinding(m_programInfo.type(), registerId) : computeSrvBinding(m_programInfo.type(), registerId); @@ -1010,8 +896,6 @@ namespace dxvk { m_module.decorateDescriptorSet(varId, 0); m_module.decorateBinding(varId, bindingId); - // Declare a specialization constant which will - // store whether or not the resource is bound. if (isUav) { DxbcUav uav; uav.type = DxbcResourceType::Typed; @@ -1053,7 +937,6 @@ namespace dxvk { m_textures.at(registerId) = res; } - // Store descriptor info for the shader interface DxvkBindingInfo binding = { }; binding.viewType = typeInfo.vtype; binding.resourceBinding = bindingId; @@ -1084,11 +967,6 @@ namespace dxvk { void DxbcCompiler::emitDclResourceRawStructured(const DxbcShaderInstruction& ins) { - // dcl_resource_raw and dcl_uav_raw take one argument: - // (dst0) The resource register ID - // dcl_resource_structured and dcl_uav_structured take two arguments: - // (dst0) The resource register ID - // (imm0) Structure stride, in bytes const uint32_t registerId = ins.dst[0].idx[0].offset; const bool isUav = ins.op == DxbcOpcode::DclUavRaw @@ -1102,11 +980,9 @@ namespace dxvk { const DxbcImageInfo typeInfo = { spv::DimBuffer, 0, 0, isUav ? 2u : 1u, VK_IMAGE_VIEW_TYPE_MAX_ENUM }; - // Declare the resource type uint32_t resTypeId = 0; uint32_t varId = 0; - // Write back resource info DxbcResourceType resType = isStructured ? DxbcResourceType::Structured : DxbcResourceType::Raw; @@ -1119,12 +995,10 @@ namespace dxvk { ? (resStride & -resStride) : 16; - // Compute the DXVK binding slot index for the resource. uint32_t bindingId = isUav ? computeUavBinding(m_programInfo.type(), registerId) : computeSrvBinding(m_programInfo.type(), registerId); - // Test whether we should use a raw SSBO for this resource bool hasSparseFeedback = isUav ? m_analysis->uavInfos[registerId].sparseFeedback : m_analysis->srvInfos[registerId].sparseFeedback; @@ -1148,8 +1022,6 @@ namespace dxvk { str::format(isUav ? "u" : "t", registerId, "_t").c_str()); m_module.setDebugMemberName(structType, 0, "m"); } else { - // Structured and raw buffers are represented as - // texel buffers consisting of 32-bit integers. m_module.enableCapability(isUav ? spv::CapabilityImageBuffer : spv::CapabilitySampledBuffer); @@ -1197,7 +1069,6 @@ namespace dxvk { m_textures.at(registerId) = res; } - // Store descriptor info for the shader interface DxvkBindingInfo binding = { }; binding.descriptorType = useRawSsbo ? VK_DESCRIPTOR_TYPE_STORAGE_BUFFER @@ -1222,7 +1093,6 @@ namespace dxvk { m_bindings.push_back(binding); - // If supported, we'll be using raw access chains to access this if (!m_hasRawAccessChains && m_moduleInfo.options.supportsRawAccessChains) { m_module.enableExtension("SPV_NV_raw_access_chains"); m_module.enableCapability(spv::CapabilityRawAccessChainsNV); @@ -1233,13 +1103,6 @@ namespace dxvk { void DxbcCompiler::emitDclThreadGroupSharedMemory(const DxbcShaderInstruction& ins) { - // dcl_tgsm_raw takes two arguments: - // (dst0) The resource register ID - // (imm0) Block size, in bytes - // dcl_tgsm_structured takes three arguments: - // (dst0) The resource register ID - // (imm0) Structure stride, in bytes - // (imm1) Structure count const bool isStructured = ins.op == DxbcOpcode::DclThreadGroupSharedMemoryStructured; const uint32_t regId = ins.dst[0].idx[0].offset; @@ -1271,9 +1134,6 @@ namespace dxvk { void DxbcCompiler::emitDclGsInputPrimitive(const DxbcShaderInstruction& ins) { - // The input primitive type is stored within in the - // control bits of the opcode token. In SPIR-V, we - // have to define an execution mode. const auto mode = [&] { switch (ins.controls.primitive()) { case DxbcPrimitive::Point: return std::make_pair(VK_PRIMITIVE_TOPOLOGY_POINT_LIST, spv::ExecutionModeInputPoints); @@ -1294,9 +1154,6 @@ namespace dxvk { void DxbcCompiler::emitDclGsOutputTopology(const DxbcShaderInstruction& ins) { - // The input primitive topology is stored within in the - // control bits of the opcode token. In SPIR-V, we have - // to define an execution mode. auto mode = [&] { switch (ins.controls.primitiveTopology()) { case DxbcPrimitiveTopology::PointList: return std::make_pair(VK_PRIMITIVE_TOPOLOGY_POINT_LIST, spv::ExecutionModeOutputPoints); @@ -1312,8 +1169,6 @@ namespace dxvk { void DxbcCompiler::emitDclMaxOutputVertexCount(const DxbcShaderInstruction& ins) { - // dcl_max_output_vertex_count has one operand: - // (imm0) The maximum number of vertices m_gs.outputVertexCount = ins.imm[0].u32; m_module.setOutputVertices(m_entryPointId, m_gs.outputVertexCount); @@ -1321,8 +1176,6 @@ namespace dxvk { void DxbcCompiler::emitDclInputControlPointCount(const DxbcShaderInstruction& ins) { - // dcl_input_control_points has the control point - // count embedded within the opcode token. if (m_programInfo.type() == DxbcProgramType::HullShader) { m_hs.vertexCountIn = ins.controls.controlPointCount(); @@ -1337,8 +1190,6 @@ namespace dxvk { void DxbcCompiler::emitDclOutputControlPointCount(const DxbcShaderInstruction& ins) { - // dcl_output_control_points has the control point - // count embedded within the opcode token. m_hs.vertexCountOut = ins.controls.controlPointCount(); m_hs.outputPerPatch = emitTessInterfacePerPatch(spv::StorageClassPrivate); @@ -1407,10 +1258,6 @@ namespace dxvk { void DxbcCompiler::emitDclThreadGroup(const DxbcShaderInstruction& ins) { - // dcl_thread_group has three operands: - // (imm0) Number of threads in X dimension - // (imm1) Number of threads in Y dimension - // (imm2) Number of threads in Z dimension m_cs.workgroupSizeX = ins.imm[0].u32; m_cs.workgroupSizeY = ins.imm[1].u32; m_cs.workgroupSizeZ = ins.imm[2].u32; @@ -1421,15 +1268,12 @@ namespace dxvk { void DxbcCompiler::emitDclGsInstanceCount(const DxbcShaderInstruction& ins) { - // dcl_gs_instance_count has one operand: - // (imm0) Number of geometry shader invocations m_module.setInvocations(m_entryPointId, ins.imm[0].u32); m_gs.invocationCount = ins.imm[0].u32; } uint32_t DxbcCompiler::emitDclUavCounter(uint32_t regId) { - // Declare a structure type which holds the UAV counter if (m_uavCtrStructType == 0) { const uint32_t t_u32 = m_module.defIntType(32, 0); const uint32_t t_struct = m_module.defStructTypeUnique(1, &t_u32); @@ -1445,7 +1289,6 @@ namespace dxvk { t_struct, spv::StorageClassStorageBuffer); } - // Declare the buffer variable const uint32_t varId = m_module.newVar( m_uavCtrPointerType, spv::StorageClassStorageBuffer); @@ -1458,7 +1301,6 @@ namespace dxvk { m_module.decorateDescriptorSet(varId, 0); m_module.decorateBinding(varId, bindingId); - // Declare the storage buffer binding DxvkBindingInfo binding = { VK_DESCRIPTOR_TYPE_STORAGE_BUFFER }; binding.resourceBinding = bindingId; binding.viewType = VK_IMAGE_VIEW_TYPE_MAX_ENUM; @@ -1476,8 +1318,6 @@ namespace dxvk { if ((ins.customDataSize & 0x3) != 0) throw DxvkError("DxbcCompiler: Immediate constant buffer size not a multiple of four DWORDs"); - // A lot of the time we'll be dealing with a scalar or vec2 - // array here, there's no reason to emit all those zeroes. uint32_t componentCount = 1u; for (uint32_t i = 0; i < ins.customDataSize; i += 4u) { @@ -1507,7 +1347,6 @@ namespace dxvk { uint32_t dwordCount, const uint32_t* dwordArray, uint32_t componentCount) { - // Declare individual vector constants as 4x32-bit vectors small_vector vectorIds; DxbcVectorType vecType; @@ -1530,11 +1369,8 @@ namespace dxvk { vectorIds.push_back(id); } - // Pad array with one entry of zeroes so that we can - // handle out-of-bounds accesses more conveniently. vectorIds.push_back(emitBuildZeroVector(vecType).id); - // Declare the array that contains all the vectors DxbcArrayType arrInfo; arrInfo.ctype = DxbcScalarType::Uint32; arrInfo.ccount = componentCount; @@ -1544,8 +1380,6 @@ namespace dxvk { uint32_t arrayId = m_module.constComposite( arrayTypeId, vectorIds.size(), vectorIds.data()); - // Declare the variable that will hold the constant - // data and initialize it with the constant array. uint32_t pointerTypeId = m_module.defPointerType( arrayTypeId, spv::StorageClassPrivate); @@ -1567,15 +1401,11 @@ namespace dxvk { uint32_t componentCount) { uint32_t vectorCount = dwordCount / 4u; - // Tightly pack vec2 or scalar arrays if possible. Don't bother with - // vec3 since we'd rather have properly vectorized loads in that case. if (m_moduleInfo.options.supportsTightIcbPacking && componentCount <= 2u) m_icbComponents = componentCount; else m_icbComponents = 4u; - // Immediate constant buffer can be read out of bounds, declare - // it with the maximum possible size and rely on robustness. this->emitDclConstantBufferVar(Icb_BindingSlotId, 4096u, m_icbComponents, "icb"); m_icbData.reserve(vectorCount * componentCount); @@ -1618,15 +1448,11 @@ namespace dxvk { const uint32_t typeId = getVectorTypeId(dst.type); switch (ins.op) { - ///////////////////// - // Move instructions case DxbcOpcode::Mov: case DxbcOpcode::DMov: dst.id = src.at(0).id; break; - ///////////////////////////////////// - // ALU operations on float32 numbers case DxbcOpcode::Add: case DxbcOpcode::DAdd: dst.id = m_module.opFAdd(typeId, @@ -1657,8 +1483,6 @@ namespace dxvk { case DxbcOpcode::Mad: case DxbcOpcode::DFma: if (ins.controls.precise()) { - // FXC only emits precise mad if the shader explicitly uses - // the HLSL mad()/fma() intrinsics, let's preserve that. dst.id = m_module.opFFma(typeId, src.at(0).id, src.at(1).id, src.at(2).id); } else { @@ -1730,8 +1554,6 @@ namespace dxvk { typeId, src.at(0).id); break; - ///////////////////////////////////// - // ALU operations on signed integers case DxbcOpcode::IAdd: dst.id = m_module.opIAdd(typeId, src.at(0).id, src.at(1).id); @@ -1760,8 +1582,6 @@ namespace dxvk { typeId, src.at(0).id); break; - /////////////////////////////////////// - // ALU operations on unsigned integers case DxbcOpcode::UMax: dst.id = m_module.opUMax(typeId, src.at(0).id, src.at(1).id); @@ -1772,8 +1592,6 @@ namespace dxvk { src.at(0).id, src.at(1).id); break; - /////////////////////////////////////// - // Bit operations on unsigned integers case DxbcOpcode::And: dst.id = m_module.opBitwiseAnd(typeId, src.at(0).id, src.at(1).id); @@ -1804,8 +1622,6 @@ namespace dxvk { typeId, src.at(0).id); break; - /////////////////////////// - // Conversion instructions case DxbcOpcode::ItoF: dst.id = m_module.opConvertStoF( typeId, src.at(0).id); @@ -1836,19 +1652,12 @@ namespace dxvk { if (ins.controls.precise() || m_precise) m_module.decorate(dst.id, spv::DecorationNoContraction); - // Store computed value dst = emitDstOperandModifiers(dst, ins.modifiers); emitRegisterStore(ins.dst[0], dst); } void DxbcCompiler::emitVectorCmov(const DxbcShaderInstruction& ins) { - // movc and swapc have the following operands: - // (dst0) The first destination register - // (dst1) The second destination register (swapc only) - // (src0) The condition vector - // (src1) Vector to select from if the condition is not 0 - // (src2) Vector to select from if the condition is 0 DxbcRegMask condMask = ins.dst[0].mask; if (ins.dst[0].dataType == DxbcScalarType::Float64) { @@ -1864,8 +1673,6 @@ namespace dxvk { uint32_t componentCount = condMask.popCount(); - // We'll compare against a vector of zeroes to generate a - // boolean vector, which in turn will be used by OpSelect uint32_t zeroType = m_module.defIntType(32, 0); uint32_t boolType = m_module.defBoolType(); @@ -1879,8 +1686,6 @@ namespace dxvk { zero = m_module.constComposite(zeroType, componentCount, zeroVec.data()); } - // In case of swapc, the second destination operand receives - // the output that a cmov instruction would normally get const uint32_t trueIndex = ins.op == DxbcOpcode::Swapc ? 1 : 0; for (uint32_t i = 0; i < ins.dstCount; i++) { @@ -1899,14 +1704,8 @@ namespace dxvk { } void DxbcCompiler::emitVectorCmp(const DxbcShaderInstruction& ins) { - // Compare instructions have three operands: - // (dst0) The destination register - // (src0) The first vector to compare - // (src1) The second vector to compare uint32_t componentCount = ins.dst[0].mask.popCount(); - // For 64-bit operations, we'll return a 32-bit - // vector, so we have to adjust the read mask DxbcRegMask srcMask = ins.dst[0].mask; if (isDoubleType(ins.src[0].dataType)) { @@ -1920,8 +1719,6 @@ namespace dxvk { emitRegisterLoad(ins.src[1], srcMask), }; - // Condition, which is a boolean vector used - // to select between the ~0u and 0u vectors. uint32_t condition = 0; uint32_t conditionType = m_module.defBoolType(); @@ -1991,7 +1788,6 @@ namespace dxvk { return; } - // Generate constant vectors for selection uint32_t sFalse = m_module.constu32( 0u); uint32_t sTrue = m_module.constu32(~0u); @@ -2012,8 +1808,6 @@ namespace dxvk { if (invert) std::swap(sFalse, sTrue); - // Perform component-wise mask selection - // based on the condition evaluated above. result.id = m_module.opSelect( typeId, condition, sTrue, sFalse); @@ -2022,9 +1816,6 @@ namespace dxvk { void DxbcCompiler::emitVectorDeriv(const DxbcShaderInstruction& ins) { - // Derivative instructions have two operands: - // (dst0) Destination register for the derivative - // (src0) The operand to compute the derivative of DxbcRegisterValue value = emitRegisterLoad(ins.src[0], ins.dst[0].mask); const uint32_t typeId = getVectorTypeId(value.type); @@ -2096,9 +1887,6 @@ namespace dxvk { m_module.opCompositeExtract(componentType, src.at(1).id, 1, &i)); } - // Unconditionally mark as precise since the exact order of operation - // matters for some games, even if the instruction itself is not marked - // as precise. m_module.decorate(dst.id, spv::DecorationNoContraction); } @@ -2108,16 +1896,10 @@ namespace dxvk { void DxbcCompiler::emitVectorIdiv(const DxbcShaderInstruction& ins) { - // udiv has four operands: - // (dst0) Quotient destination register - // (dst1) Remainder destination register - // (src0) The first vector to compare - // (src1) The second vector to compare if (ins.dst[0].type == DxbcOperandType::Null && ins.dst[1].type == DxbcOperandType::Null) return; - // FIXME support this if applications require it if (ins.dst[0].type != DxbcOperandType::Null && ins.dst[1].type != DxbcOperandType::Null && ins.dst[0].mask != ins.dst[1].mask) { @@ -2125,8 +1907,6 @@ namespace dxvk { return; } - // Load source operands as integers with the - // mask of one non-NULL destination operand const DxbcRegMask srcMask = ins.dst[0].type != DxbcOperandType::Null ? ins.dst[0].mask @@ -2137,7 +1917,6 @@ namespace dxvk { emitRegisterLoad(ins.src[1], srcMask), }; - // Division by zero will return 0xffffffff for both results auto bvecId = getVectorTypeId({ DxbcScalarType::Bool, srcMask.popCount() }); DxbcRegisterValue const0 = emitBuildConstVecu32( 0u, 0u, 0u, 0u, srcMask); @@ -2145,8 +1924,6 @@ namespace dxvk { uint32_t cmpValue = m_module.opINotEqual(bvecId, src.at(1).id, const0.id); - // Compute results only if the destination - // operands are not NULL. if (ins.dst[0].type != DxbcOperandType::Null) { DxbcRegisterValue quotient; quotient.type.ctype = ins.dst[0].dataType; @@ -2184,17 +1961,10 @@ namespace dxvk { void DxbcCompiler::emitVectorImul(const DxbcShaderInstruction& ins) { - // imul and umul have four operands: - // (dst0) High destination register - // (dst1) Low destination register - // (src0) The first vector to compare - // (src1) The second vector to compare if (ins.dst[0].type == DxbcOperandType::Null) { if (ins.dst[1].type == DxbcOperandType::Null) return; - // If dst0 is NULL, this instruction behaves just - // like any other three-operand ALU instruction const std::array src = { emitRegisterLoad(ins.src[0], ins.dst[1].mask), emitRegisterLoad(ins.src[1], ins.dst[1].mask), @@ -2210,18 +1980,12 @@ namespace dxvk { result = emitDstOperandModifiers(result, ins.modifiers); emitRegisterStore(ins.dst[1], result); } else { - // TODO implement this Logger::warn("DxbcCompiler: Extended Imul not yet supported"); } } void DxbcCompiler::emitVectorMsad(const DxbcShaderInstruction& ins) { - // msad has four operands: - // (dst0) Destination - // (src0) Reference (packed uint8) - // (src1) Source (packed uint8) - // (src2) Accumulator DxbcRegisterValue refReg = emitRegisterLoad(ins.src[0], ins.dst[0].mask); DxbcRegisterValue srcReg = emitRegisterLoad(ins.src[1], ins.dst[0].mask); DxbcRegisterValue result = emitRegisterLoad(ins.src[2], ins.dst[0].mask); @@ -2249,10 +2013,6 @@ namespace dxvk { void DxbcCompiler::emitVectorShift(const DxbcShaderInstruction& ins) { - // Shift operations have three operands: - // (dst0) The destination register - // (src0) The register to shift - // (src1) The shift amount (scalar) DxbcRegisterValue shiftReg = emitRegisterLoad(ins.src[0], ins.dst[0].mask); DxbcRegisterValue countReg = emitRegisterLoad(ins.src[1], ins.dst[0].mask); @@ -2298,12 +2058,7 @@ namespace dxvk { void DxbcCompiler::emitVectorSinCos(const DxbcShaderInstruction& ins) { - // sincos has three operands: - // (dst0) Destination register for sin(x) - // (dst1) Destination register for cos(x) - // (src0) Source operand x - // Load source operand as 32-bit float vector. const DxbcRegisterValue srcValue = emitRegisterLoad( ins.src[0], DxbcRegMask(true, true, true, true)); @@ -2315,7 +2070,6 @@ namespace dxvk { DxbcRegisterValue cosVector = { }; cosVector.type.ctype = DxbcScalarType::Float32; - // Only compute sincos for enabled components std::array sinIds = { }; std::array cosIds = { }; @@ -2353,8 +2107,6 @@ namespace dxvk { void DxbcCompiler::emitGeometryEmit(const DxbcShaderInstruction& ins) { - // In xfb mode we might have multiple streams, so - // we have to figure out which stream to write to uint32_t streamId = 0; uint32_t streamVar = 0; @@ -2363,7 +2115,6 @@ namespace dxvk { streamVar = m_module.constu32(streamId); } - // Checking the negation is easier for EmitThenCut/EmitThenCutStream bool doEmit = ins.op != DxbcOpcode::Cut && ins.op != DxbcOpcode::CutStream; bool doCut = ins.op != DxbcOpcode::Emit && ins.op != DxbcOpcode::EmitStream; @@ -2382,26 +2133,15 @@ namespace dxvk { void DxbcCompiler::emitAtomic(const DxbcShaderInstruction& ins) { - // atomic_* operations have the following operands: - // (dst0) Destination u# or g# register - // (src0) Index into the texture or buffer - // (src1) The source value for the operation - // (src2) Second source operand (optional) - // imm_atomic_* operations have the following operands: - // (dst0) Register that receives the result - // (dst1) Destination u# or g# register - // (srcX) As above const DxbcBufferInfo bufferInfo = getBufferInfo(ins.dst[ins.dstCount - 1]); bool isImm = ins.dstCount == 2; bool isUav = ins.dst[ins.dstCount - 1].type == DxbcOperandType::UnorderedAccessView; bool isSsbo = bufferInfo.isSsbo; - // Retrieve destination pointer for the atomic operation> const DxbcRegisterPointer pointer = emitGetAtomicPointer( ins.dst[ins.dstCount - 1], ins.src[0]); - // Load source values std::array src; for (uint32_t i = 1; i < ins.srcCount; i++) { @@ -2410,7 +2150,6 @@ namespace dxvk { pointer.type.ctype); } - // Define memory scope and semantics based on the operands uint32_t scope = 0; uint32_t semantics = 0; @@ -2430,12 +2169,10 @@ namespace dxvk { const uint32_t scopeId = m_module.constu32(scope); const uint32_t semanticsId = m_module.constu32(semantics); - // Perform the atomic operation on the given pointer DxbcRegisterValue value; value.type = pointer.type; value.id = 0; - // The result type, which is a scalar integer const uint32_t typeId = getVectorTypeId(value.type); switch (ins.op) { @@ -2516,23 +2253,17 @@ namespace dxvk { return; } - // Write back the result to the destination - // register if this is an imm_atomic_* opcode. if (isImm) emitRegisterStore(ins.dst[0], value); } void DxbcCompiler::emitAtomicCounter(const DxbcShaderInstruction& ins) { - // imm_atomic_alloc and imm_atomic_consume have the following operands: - // (dst0) The register that will hold the old counter value - // (dst1) The UAV whose counter is going to be modified const uint32_t registerId = ins.dst[1].idx[0].offset; if (m_uavs.at(registerId).ctrId == 0) m_uavs.at(registerId).ctrId = emitDclUavCounter(registerId); - // Get a pointer to the atomic counter in question DxbcRegisterInfo ptrType; ptrType.type.ctype = DxbcScalarType::Uint32; ptrType.type.ccount = 1; @@ -2545,7 +2276,6 @@ namespace dxvk { m_uavs.at(registerId).ctrId, 1, &zeroId); - // Define memory scope and semantics based on the operands uint32_t scope = spv::ScopeQueueFamily; uint32_t semantics = spv::MemorySemanticsUniformMemoryMask | spv::MemorySemanticsAcquireReleaseMask; @@ -2553,7 +2283,6 @@ namespace dxvk { uint32_t scopeId = m_module.constu32(scope); uint32_t semanticsId = m_module.constu32(semantics); - // Compute the result value DxbcRegisterValue value; value.type.ctype = DxbcScalarType::Uint32; value.type.ccount = 1; @@ -2580,14 +2309,11 @@ namespace dxvk { return; } - // Store the result emitRegisterStore(ins.dst[0], value); } void DxbcCompiler::emitBarrier(const DxbcShaderInstruction& ins) { - // sync takes no operands. Instead, the synchronization - // scope is defined by the operand control bits. const DxbcSyncFlags flags = ins.controls.syncFlags(); uint32_t executionScope = spv::ScopeInvocation; @@ -2643,11 +2369,6 @@ namespace dxvk { void DxbcCompiler::emitBitExtract(const DxbcShaderInstruction& ins) { - // ibfe and ubfe take the following arguments: - // (dst0) The destination register - // (src0) Number of bits to extact - // (src1) Offset of the bits to extract - // (src2) Register to extract bits from const bool isSigned = ins.op == DxbcOpcode::IBfe; DxbcRegisterValue bitCnt = emitRegisterLoad(ins.src[0], ins.dst[0].mask); @@ -2688,12 +2409,6 @@ namespace dxvk { void DxbcCompiler::emitBitInsert(const DxbcShaderInstruction& ins) { - // ibfe and ubfe take the following arguments: - // (dst0) The destination register - // (src0) Number of bits to extact - // (src1) Offset of the bits to extract - // (src2) Register to take bits from - // (src3) Register to replace bits in DxbcRegisterValue bitCnt = emitRegisterLoad(ins.src[0], ins.dst[0].mask); DxbcRegisterValue bitOfs = emitRegisterLoad(ins.src[1], ins.dst[0].mask); @@ -2733,16 +2448,12 @@ namespace dxvk { void DxbcCompiler::emitBitScan(const DxbcShaderInstruction& ins) { - // firstbit(lo|hi|shi) have two operands: - // (dst0) The destination operant - // (src0) Source operand to scan DxbcRegisterValue src = emitRegisterLoad(ins.src[0], ins.dst[0].mask); DxbcRegisterValue dst; dst.type.ctype = ins.dst[0].dataType; dst.type.ccount = ins.dst[0].mask.popCount(); - // Result type, should be an unsigned integer const uint32_t typeId = getVectorTypeId(dst.type); switch (ins.op) { @@ -2752,8 +2463,6 @@ namespace dxvk { default: Logger::warn(str::format("DxbcCompiler: Unhandled instruction: ", ins.op)); return; } - // The 'Hi' variants are counted from the MSB in DXBC - // rather than the LSB, so we have to invert the number if (ins.op == DxbcOpcode::FirstBitHi || ins.op == DxbcOpcode::FirstBitShi) { uint32_t boolTypeId = m_module.defBoolType(); @@ -2769,28 +2478,20 @@ namespace dxvk { constff.id); } - // No modifiers are supported emitRegisterStore(ins.dst[0], dst); } void DxbcCompiler::emitBufferQuery(const DxbcShaderInstruction& ins) { - // bufinfo takes two arguments - // (dst0) The destination register - // (src0) The buffer register to query const DxbcBufferInfo bufferInfo = getBufferInfo(ins.src[0]); bool isSsbo = bufferInfo.isSsbo; - // We'll store this as a scalar unsigned integer DxbcRegisterValue result = isSsbo ? emitQueryBufferSize(ins.src[0]) : emitQueryTexelBufferSize(ins.src[0]); uint32_t typeId = getVectorTypeId(result.type); - // Adjust returned size if this is a raw or structured - // buffer, as emitQueryTexelBufferSize only returns the - // number of typed elements in the buffer. if (bufferInfo.type == DxbcResourceType::Raw) { result.id = m_module.opIMul(typeId, result.id, m_module.constu32(4)); @@ -2799,56 +2500,34 @@ namespace dxvk { m_module.constu32(bufferInfo.stride / 4)); } - // Store the result. The scalar will be extended to a - // vector if the write mask consists of more than one - // component, which is the desired behaviour. emitRegisterStore(ins.dst[0], result); } void DxbcCompiler::emitBufferLoad(const DxbcShaderInstruction& ins) { - // ld_raw takes three arguments: - // (dst0) Destination register - // (src0) Byte offset - // (src1) Source register - // ld_structured takes four arguments: - // (dst0) Destination register - // (src0) Structure index - // (src1) Byte offset - // (src2) Source register const bool isStructured = ins.op == DxbcOpcode::LdStructured || ins.op == DxbcOpcode::LdStructuredS; - // Source register. The exact way we access - // the data depends on the register type. const DxbcRegister& dstReg = ins.dst[0]; const DxbcRegister& srcReg = isStructured ? ins.src[2] : ins.src[1]; if (dstReg.type == DxbcOperandType::UnorderedAccessView) emitUavBarrier(uint64_t(1u) << srcReg.idx[0].offset, 0u); - // Retrieve common info about the buffer const DxbcBufferInfo bufferInfo = getBufferInfo(srcReg); - // Shared memory is the only type of buffer that - // is not accessed through a texel buffer view bool isTgsm = srcReg.type == DxbcOperandType::ThreadGroupSharedMemory; bool isSsbo = bufferInfo.isSsbo; - // Common types and IDs used while loading the data uint32_t bufferId = isTgsm || isSsbo ? 0 : m_module.opLoad(bufferInfo.typeId, bufferInfo.varId); uint32_t vectorTypeId = getVectorTypeId({ DxbcScalarType::Uint32, 4 }); uint32_t scalarTypeId = getVectorTypeId({ DxbcScalarType::Uint32, 1 }); - // Since all data is represented as a sequence of 32-bit - // integers, we have to load each component individually. std::array ccomps = { 0, 0, 0, 0 }; std::array scomps = { 0, 0, 0, 0 }; uint32_t scount = 0; - // The sparse feedback ID will be non-zero for sparse - // instructions on input. We need to reset it to 0. SpirvMemoryOperands memoryOperands; SpirvImageOperands imageOperands; imageOperands.sparse = ins.dstCount == 2; @@ -2987,8 +2666,6 @@ namespace dxvk { throw DxvkError("DxbcCompiler: Invalid operand type for strucured/raw load"); } - // Only read sparse feedback once. This may be somewhat inaccurate - // for reads that straddle pages, but we can't easily emulate this. if (imageOperands.sparse) { imageOperands.sparse = false; sparseFeedbackId = resultId; @@ -3029,19 +2706,8 @@ namespace dxvk { void DxbcCompiler::emitBufferStore(const DxbcShaderInstruction& ins) { - // store_raw takes three arguments: - // (dst0) Destination register - // (src0) Byte offset - // (src1) Source register - // store_structured takes four arguments: - // (dst0) Destination register - // (src0) Structure index - // (src1) Byte offset - // (src2) Source register const bool isStructured = ins.op == DxbcOpcode::StoreStructured; - // Source register. The exact way we access - // the data depends on the register type. const DxbcRegister& dstReg = ins.dst[0]; const DxbcRegister& srcReg = isStructured ? ins.src[2] : ins.src[1]; @@ -3051,10 +2717,8 @@ namespace dxvk { DxbcRegisterValue value = emitRegisterLoad(srcReg, dstReg.mask); value = emitRegisterBitcast(value, DxbcScalarType::Uint32); - // Retrieve common info about the buffer const DxbcBufferInfo bufferInfo = getBufferInfo(dstReg); - // Thread Group Shared Memory is not accessed through a texel buffer view bool isTgsm = dstReg.type == DxbcOperandType::ThreadGroupSharedMemory; bool isSsbo = bufferInfo.isSsbo; @@ -3063,7 +2727,6 @@ namespace dxvk { uint32_t scalarTypeId = getVectorTypeId({ DxbcScalarType::Uint32, 1 }); uint32_t vectorTypeId = getVectorTypeId({ DxbcScalarType::Uint32, 4 }); - // Set memory operands according to resource properties SpirvMemoryOperands memoryOperands; SpirvImageOperands imageOperands; @@ -3087,7 +2750,6 @@ namespace dxvk { } } - // Compute flat element index as necessary bool useRawAccessChains = isSsbo && m_hasRawAccessChains; DxbcRegisterValue index = emitRegisterLoad(ins.src[0], DxbcRegMask(true, false, false, false)); @@ -3206,42 +2868,31 @@ namespace dxvk { void DxbcCompiler::emitConvertFloat16(const DxbcShaderInstruction& ins) { - // f32tof16 takes two operands: - // (dst0) Destination register as a uint32 vector - // (src0) Source register as a float32 vector - // f16tof32 takes two operands: - // (dst0) Destination register as a float32 vector - // (src0) Source register as a uint32 vector const DxbcRegisterValue src = emitRegisterLoad(ins.src[0], ins.dst[0].mask); - // We handle both packing and unpacking here const bool isPack = ins.op == DxbcOpcode::F32toF16; - // The conversion instructions do not map very well to the - // SPIR-V pack instructions, which operate on 2D vectors. std::array scalarIds = {{ 0, 0, 0, 0 }}; const uint32_t componentCount = src.type.ccount; - // These types are used in both pack and unpack operations const uint32_t t_u32 = getVectorTypeId({ DxbcScalarType::Uint32, 1 }); const uint32_t t_f32 = getVectorTypeId({ DxbcScalarType::Float32, 1 }); const uint32_t t_f32v2 = getVectorTypeId({ DxbcScalarType::Float32, 2 }); - // Constant zero-bit pattern, used for packing const uint32_t zerof32 = isPack ? m_module.constf32(0.0f) : 0; for (uint32_t i = 0; i < componentCount; i++) { const DxbcRegisterValue componentValue = emitRegisterExtract(src, DxbcRegMask::select(i)); - if (isPack) { // f32tof16 + if (isPack) { const std::array packIds = {{ componentValue.id, zerof32 }}; scalarIds[i] = m_module.opPackHalf2x16(t_u32, m_module.opCompositeConstruct(t_f32v2, packIds.size(), packIds.data())); - } else { // f16tof32 + } else { const uint32_t zeroIndex = 0; scalarIds[i] = m_module.opCompositeExtract(t_f32, @@ -3261,10 +2912,6 @@ namespace dxvk { : scalarIds[0]; if (isPack) { - // Some drivers return infinity if the input value is above a certain - // threshold, but D3D wants us to return infinity only if the input is - // actually infinite. Fix this up to return the maximum representable - // 16-bit floating point number instead, but preserve input infinity. uint32_t t_bvec = getVectorTypeId({ DxbcScalarType::Bool, componentCount }); uint32_t f16Infinity = m_module.constuReplicant(0x7C00, componentCount); uint32_t f16Unsigned = m_module.constuReplicant(0x7FFF, componentCount); @@ -3279,22 +2926,17 @@ namespace dxvk { result.id); } - // Store result in the destination register emitRegisterStore(ins.dst[0], result); } void DxbcCompiler::emitConvertFloat64(const DxbcShaderInstruction& ins) { - // ftod and dtof take the following operands: - // (dst0) Destination operand - // (src0) Number to convert uint32_t dstBits = ins.dst[0].mask.popCount(); DxbcRegMask srcMask = isDoubleType(ins.dst[0].dataType) ? DxbcRegMask(dstBits >= 2, dstBits >= 4, false, false) : DxbcRegMask(dstBits >= 1, dstBits >= 1, dstBits >= 2, dstBits >= 2); - // Perform actual conversion, destination modifiers are not applied DxbcRegisterValue val = emitRegisterLoad(ins.src[0], srcMask); DxbcRegisterValue result; @@ -3393,8 +3035,6 @@ namespace dxvk { void DxbcCompiler::emitInterpolate(const DxbcShaderInstruction& ins) { m_module.enableCapability(spv::CapabilityInterpolationFunction); - // The SPIR-V instructions operate on input variable pointers, - // which are all declared as four-component float vectors. uint32_t registerId = ins.src[0].idx[0].offset; DxbcRegisterValue result; @@ -3418,7 +3058,6 @@ namespace dxvk { } break; case DxbcOpcode::EvalSnapped: { - // The offset is encoded as a 4-bit fixed point value DxbcRegisterValue offset = emitRegisterLoad( ins.src[1], DxbcRegMask(true, true, false, false)); offset.id = m_module.opBitFieldSExtract( @@ -3454,9 +3093,6 @@ namespace dxvk { void DxbcCompiler::emitSparseCheckAccess( const DxbcShaderInstruction& ins) { - // check_access_mapped has two operands: - // (dst0) The destination register - // (src0) The residency code m_module.enableCapability(spv::CapabilitySparseResidency); DxbcRegisterValue srcValue = emitRegisterLoad(ins.src[0], ins.dst[0].mask); @@ -3474,34 +3110,22 @@ namespace dxvk { void DxbcCompiler::emitTextureQuery(const DxbcShaderInstruction& ins) { - // resinfo has three operands: - // (dst0) The destination register - // (src0) Resource LOD to query - // (src1) Resource to query const DxbcBufferInfo resourceInfo = getBufferInfo(ins.src[1]); const DxbcResinfoType resinfoType = ins.controls.resinfoType(); - // Read the exact LOD for the image query const DxbcRegisterValue mipLod = emitRegisterLoad( ins.src[0], DxbcRegMask(true, false, false, false)); const DxbcScalarType returnType = resinfoType == DxbcResinfoType::Uint ? DxbcScalarType::Uint32 : DxbcScalarType::Float32; - // Query the size of the selected mip level, as well as the - // total number of mip levels. We will have to combine the - // result into a four-component vector later. DxbcRegisterValue imageSize = emitQueryTextureSize(ins.src[1], mipLod); DxbcRegisterValue imageLevels = emitQueryTextureLods(ins.src[1]); - // If the mip level is out of bounds, D3D requires us to return - // zero before applying modifiers, whereas SPIR-V is undefined, - // so we need to fix it up manually here. imageSize.id = m_module.opSelect(getVectorTypeId(imageSize.type), m_module.opULessThan(m_module.defBoolType(), mipLod.id, imageLevels.id), imageSize.id, emitBuildZeroVector(imageSize.type).id); - // Convert intermediates to the requested type if (returnType == DxbcScalarType::Float32) { imageSize.type.ctype = DxbcScalarType::Float32; imageSize.id = m_module.opConvertUtoF( @@ -3514,9 +3138,6 @@ namespace dxvk { imageLevels.id); } - // If the selected return type is rcpFloat, we need - // to compute the reciprocal of the image dimensions, - // but not the array size, so we need to separate it. const uint32_t imageCoordDim = imageSize.type.ccount; DxbcRegisterValue imageLayers; @@ -3536,8 +3157,6 @@ namespace dxvk { imageSize.id); } - // Concatenate result vectors and scalars to form a - // 4D vector. Unused components will be set to zero. std::array vectorIds = { imageSize.id, 0, 0, 0 }; uint32_t numVectorIds = 1; @@ -3555,7 +3174,6 @@ namespace dxvk { vectorIds[numVectorIds++] = imageLevels.id; - // Create the actual result vector DxbcRegisterValue result; result.type.ctype = returnType; result.type.ccount = 4; @@ -3563,8 +3181,6 @@ namespace dxvk { getVectorTypeId(result.type), numVectorIds, vectorIds.data()); - // Swizzle components using the resource swizzle - // and the destination operand's write mask result = emitRegisterSwizzle(result, ins.src[1].swizzle, ins.dst[0].mask); emitRegisterStore(ins.dst[0], result); @@ -3572,32 +3188,21 @@ namespace dxvk { void DxbcCompiler::emitTextureQueryLod(const DxbcShaderInstruction& ins) { - // All sample instructions have at least these operands: - // (dst0) The destination register - // (src0) Texture coordinates - // (src1) The texture itself - // (src2) The sampler object const DxbcRegister& texCoordReg = ins.src[0]; const DxbcRegister& textureReg = ins.src[1]; const DxbcRegister& samplerReg = ins.src[2]; - // Texture and sampler register IDs const auto& texture = m_textures.at(textureReg.idx[0].offset); const auto& sampler = m_samplers.at(samplerReg.idx[0].offset); - // Load texture coordinates const DxbcRegisterValue coord = emitRegisterLoad(texCoordReg, DxbcRegMask::firstN(getTexLayerDim(texture.imageInfo))); - // Query the LOD. The result is a two-dimensional float32 - // vector containing the mip level and virtual LOD numbers. const uint32_t sampledImageId = emitLoadSampledImage(texture, sampler, false); const uint32_t queriedLodId = m_module.opImageQueryLod( getVectorTypeId({ DxbcScalarType::Float32, 2 }), sampledImageId, coord.id); - // Build the result array vector by filling up - // the remaining two components with zeroes. const uint32_t zero = m_module.constf32(0.0f); const std::array resultIds = {{ queriedLodId, zero, zero }}; @@ -3614,9 +3219,6 @@ namespace dxvk { void DxbcCompiler::emitTextureQueryMs(const DxbcShaderInstruction& ins) { - // sampleinfo has two operands: - // (dst0) The destination register - // (src0) Resource to query DxbcRegisterValue sampleCount = emitQueryTextureSamples(ins.src[0]); if (ins.controls.returnType() != DxbcInstructionReturnType::Uint) { @@ -3631,15 +3233,9 @@ namespace dxvk { void DxbcCompiler::emitTextureQueryMsPos(const DxbcShaderInstruction& ins) { - // samplepos has three operands: - // (dst0) The destination register - // (src0) Resource to query - // (src1) Sample index if (m_samplePositions == 0) m_samplePositions = emitSamplePosArray(); - // The lookup index is qual to the sample count plus the - // sample index, or 0 if the resource cannot be queried. DxbcRegisterValue sampleCount = emitQueryTextureSamples(ins.src[0]); DxbcRegisterValue sampleIndex = emitRegisterLoad( ins.src[1], DxbcRegMask(true, false, false, false)); @@ -3648,7 +3244,6 @@ namespace dxvk { getVectorTypeId(sampleCount.type), sampleCount.id, sampleIndex.id); - // Validate the parameters uint32_t sampleCountValid = m_module.opULessThanEqual( m_module.defBoolType(), sampleCount.id, @@ -3659,8 +3254,6 @@ namespace dxvk { sampleIndex.id, sampleCount.id); - // If the lookup cannot be performed, set the lookup - // index to zero, which will return a zero vector. lookupIndex = m_module.opSelect( getVectorTypeId(sampleCount.type), m_module.opLogicalAnd( @@ -3670,8 +3263,6 @@ namespace dxvk { lookupIndex, m_module.constu32(0)); - // Load sample pos vector and write the masked - // components to the destination register. DxbcRegisterPointer samplePos; samplePos.type.ctype = DxbcScalarType::Float32; samplePos.type.ccount = 2; @@ -3681,7 +3272,6 @@ namespace dxvk { spv::StorageClassPrivate), m_samplePositions, 1, &lookupIndex); - // Expand to vec4 by appending zeroes DxbcRegisterValue result = emitValueLoad(samplePos); DxbcRegisterValue zero; @@ -3699,28 +3289,15 @@ namespace dxvk { void DxbcCompiler::emitTextureFetch(const DxbcShaderInstruction& ins) { - // ld has three operands: - // (dst0) The destination register - // (src0) Source address - // (src1) Source texture - // ld2dms has four operands: - // (dst0) The destination register - // (src0) Source address - // (src1) Source texture - // (src2) Sample number const auto& texture = m_textures.at(ins.src[1].idx[0].offset); const uint32_t imageLayerDim = getTexLayerDim(texture.imageInfo); bool isMultisampled = ins.op == DxbcOpcode::LdMs || ins.op == DxbcOpcode::LdMsS; - // Load the texture coordinates. The last component - // contains the LOD if the resource is an image. const DxbcRegisterValue address = emitRegisterLoad( ins.src[0], DxbcRegMask(true, true, true, true)); - // Additional image operands. This will store - // the LOD and the address offset if present. SpirvImageOperands imageOperands; imageOperands.sparse = ins.dstCount == 2; @@ -3741,8 +3318,6 @@ namespace dxvk { } } - // The LOD is not present when reading from - // a buffer or from a multisample texture. if (texture.imageInfo.dim != spv::DimBuffer && texture.imageInfo.ms == 0) { DxbcRegisterValue imageLod; @@ -3750,7 +3325,6 @@ namespace dxvk { imageLod = emitRegisterExtract( address, DxbcRegMask(false, false, false, true)); } else { - // If we force-disabled MSAA, fetch from LOD 0 imageLod.type = { DxbcScalarType::Uint32, 1 }; imageLod.id = m_module.constu32(0); } @@ -3759,8 +3333,6 @@ namespace dxvk { imageOperands.sLod = imageLod.id; } - // The ld2dms instruction has a sample index, but we - // are only allowed to set it for multisample views if (isMultisampled && texture.imageInfo.ms == 1) { DxbcRegisterValue sampleId = emitRegisterLoad( ins.src[2], DxbcRegMask(true, false, false, false)); @@ -3769,11 +3341,8 @@ namespace dxvk { imageOperands.sSampleId = sampleId.id; } - // Extract coordinates from address const DxbcRegisterValue coord = emitCalcTexCoord(address, texture.imageInfo); - // Reading a typed image or buffer view - // always returns a four-component vector. const uint32_t imageId = m_module.opLoad(texture.imageTypeId, texture.varId); DxbcVectorType texelType; @@ -3796,8 +3365,6 @@ namespace dxvk { ? emitExtractSparseTexel(texelTypeId, resultId) : resultId; - // Swizzle components using the texture swizzle - // and the destination operand's write mask result = emitRegisterSwizzle(result, ins.src[1].swizzle, ins.dst[0].mask); @@ -3809,18 +3376,6 @@ namespace dxvk { void DxbcCompiler::emitTextureGather(const DxbcShaderInstruction& ins) { - // Gather4 takes the following operands: - // (dst0) The destination register - // (dst1) The residency code for sparse ops - // (src0) Texture coordinates - // (src1) The texture itself - // (src2) The sampler, with a component selector - // Gather4C takes the following additional operand: - // (src3) The depth reference value - // The Gather4Po variants take an additional operand - // which defines an extended constant offset. - // TODO reduce code duplication by moving some common code - // in both sample() and gather() into separate methods const bool isExtendedGather = ins.op == DxbcOpcode::Gather4Po || ins.op == DxbcOpcode::Gather4PoC || ins.op == DxbcOpcode::Gather4PoS @@ -3830,18 +3385,13 @@ namespace dxvk { const DxbcRegister& textureReg = ins.src[1 + isExtendedGather]; const DxbcRegister& samplerReg = ins.src[2 + isExtendedGather]; - // Texture and sampler register IDs const auto& texture = m_textures.at(textureReg.idx[0].offset); const auto& sampler = m_samplers.at(samplerReg.idx[0].offset); - // Image type, which stores the image dimensions etc. const uint32_t imageLayerDim = getTexLayerDim(texture.imageInfo); - // Load the texture coordinates. SPIR-V allows these - // to be float4 even if not all components are used. DxbcRegisterValue coord = emitLoadTexCoord(texCoordReg, texture.imageInfo); - // Load reference value for depth-compare operations const bool isDepthCompare = ins.op == DxbcOpcode::Gather4C || ins.op == DxbcOpcode::Gather4PoC || ins.op == DxbcOpcode::Gather4CS @@ -3852,7 +3402,6 @@ namespace dxvk { DxbcRegMask(true, false, false, false)) : DxbcRegisterValue(); - // Accumulate additional image operands. SpirvImageOperands imageOperands; imageOperands.sparse = ins.dstCount == 2; @@ -3881,8 +3430,6 @@ namespace dxvk { } } - // Gathering texels always returns a four-component - // vector, even for the depth-compare variants. uint32_t sampledImageId = emitLoadSampledImage(texture, sampler, isDepthCompare); DxbcVectorType texelType; @@ -3898,7 +3445,6 @@ namespace dxvk { if (sampledImageId) { switch (ins.op) { - // Simple image gather operation case DxbcOpcode::Gather4: case DxbcOpcode::Gather4S: case DxbcOpcode::Gather4Po: @@ -3909,7 +3455,6 @@ namespace dxvk { imageOperands); } break; - // Depth-compare operation case DxbcOpcode::Gather4C: case DxbcOpcode::Gather4CS: case DxbcOpcode::Gather4PoC: @@ -3930,15 +3475,12 @@ namespace dxvk { resultId = m_module.constNull(resultTypeId); } - // If necessary, deal with the sparse result DxbcRegisterValue result; result.type = texelType; result.id = imageOperands.sparse ? emitExtractSparseTexel(texelTypeId, resultId) : resultId; - // Swizzle components using the texture swizzle - // and the destination operand's write mask result = emitRegisterSwizzle(result, textureReg.swizzle, ins.dst[0].mask); @@ -3950,25 +3492,16 @@ namespace dxvk { void DxbcCompiler::emitTextureSample(const DxbcShaderInstruction& ins) { - // All sample instructions have at least these operands: - // (dst0) The destination register - // (src0) Texture coordinates - // (src1) The texture itself - // (src2) The sampler object const DxbcRegister& texCoordReg = ins.src[0]; const DxbcRegister& textureReg = ins.src[1]; const DxbcRegister& samplerReg = ins.src[2]; - // Texture and sampler register IDs const auto& texture = m_textures.at(textureReg.idx[0].offset); const auto& sampler = m_samplers.at(samplerReg.idx[0].offset); const uint32_t imageLayerDim = getTexLayerDim(texture.imageInfo); - // Load the texture coordinates. SPIR-V allows these - // to be float4 even if not all components are used. DxbcRegisterValue coord = emitLoadTexCoord(texCoordReg, texture.imageInfo); - // Load reference value for depth-compare operations const bool isDepthCompare = ins.op == DxbcOpcode::SampleC || ins.op == DxbcOpcode::SampleClz || ins.op == DxbcOpcode::SampleCClampS @@ -3978,7 +3511,6 @@ namespace dxvk { ? emitRegisterLoad(ins.src[3], DxbcRegMask(true, false, false, false)) : DxbcRegisterValue(); - // Load explicit gradients for sample operations that require them const bool hasExplicitGradients = ins.op == DxbcOpcode::SampleD || ins.op == DxbcOpcode::SampleDClampS; @@ -3990,7 +3522,6 @@ namespace dxvk { ? emitRegisterLoad(ins.src[4], DxbcRegMask::firstN(imageLayerDim)) : DxbcRegisterValue(); - // LOD for certain sample operations const bool hasLod = ins.op == DxbcOpcode::SampleL || ins.op == DxbcOpcode::SampleLS || ins.op == DxbcOpcode::SampleB @@ -4000,7 +3531,6 @@ namespace dxvk { ? emitRegisterLoad(ins.src[3], DxbcRegMask(true, false, false, false)) : DxbcRegisterValue(); - // Min LOD for certain sparse operations const bool hasMinLod = ins.op == DxbcOpcode::SampleClampS || ins.op == DxbcOpcode::SampleBClampS || ins.op == DxbcOpcode::SampleDClampS @@ -4010,8 +3540,6 @@ namespace dxvk { ? emitRegisterLoad(ins.src[ins.srcCount - 1], DxbcRegMask(true, false, false, false)) : DxbcRegisterValue(); - // Accumulate additional image operands. These are - // not part of the actual operand token in SPIR-V. SpirvImageOperands imageOperands; imageOperands.sparse = ins.dstCount == 2; @@ -4039,11 +3567,8 @@ namespace dxvk { imageOperands.sMinLod = minLod.id; } - // Combine the texture and the sampler into a sampled image uint32_t sampledImageId = emitLoadSampledImage(texture, sampler, isDepthCompare); - // Sampling an image always returns a four-component - // vector, whereas depth-compare ops return a scalar. DxbcVectorType texelType; texelType.ctype = texture.sampledType; texelType.ccount = isDepthCompare ? 1 : 4; @@ -4057,7 +3582,6 @@ namespace dxvk { if (sampledImageId) { switch (ins.op) { - // Simple image sample operation case DxbcOpcode::Sample: case DxbcOpcode::SampleClampS: { resultId = m_module.opImageSampleImplicitLod( @@ -4065,7 +3589,6 @@ namespace dxvk { imageOperands); } break; - // Depth-compare operation case DxbcOpcode::SampleC: case DxbcOpcode::SampleCClampS: { resultId = m_module.opImageSampleDrefImplicitLod( @@ -4073,7 +3596,6 @@ namespace dxvk { referenceValue.id, imageOperands); } break; - // Depth-compare operation on mip level zero case DxbcOpcode::SampleClz: case DxbcOpcode::SampleClzS: { imageOperands.flags |= spv::ImageOperandsLodMask; @@ -4084,7 +3606,6 @@ namespace dxvk { referenceValue.id, imageOperands); } break; - // Sample operation with explicit gradients case DxbcOpcode::SampleD: case DxbcOpcode::SampleDClampS: { imageOperands.flags |= spv::ImageOperandsGradMask; @@ -4096,7 +3617,6 @@ namespace dxvk { imageOperands); } break; - // Sample operation with explicit LOD case DxbcOpcode::SampleL: case DxbcOpcode::SampleLS: { imageOperands.flags |= spv::ImageOperandsLodMask; @@ -4107,7 +3627,6 @@ namespace dxvk { imageOperands); } break; - // Sample operation with LOD bias case DxbcOpcode::SampleB: case DxbcOpcode::SampleBClampS: { imageOperands.flags |= spv::ImageOperandsBiasMask; @@ -4135,8 +3654,6 @@ namespace dxvk { ? emitExtractSparseTexel(texelTypeId, resultId) : resultId; - // Swizzle components using the texture swizzle - // and the destination operand's write mask if (result.type.ccount != 1) { result = emitRegisterSwizzle(result, textureReg.swizzle, ins.dst[0].mask); @@ -4150,16 +3667,11 @@ namespace dxvk { void DxbcCompiler::emitTypedUavLoad(const DxbcShaderInstruction& ins) { - // load_uav_typed has three operands: - // (dst0) The destination register - // (src0) The texture or buffer coordinates - // (src1) The UAV to load from const uint32_t registerId = ins.src[1].idx[0].offset; const DxbcUav uavInfo = m_uavs.at(registerId); emitUavBarrier(uint64_t(1u) << registerId, 0u); - // Load texture coordinates DxbcRegisterValue texCoord = emitLoadTexCoord( ins.src[0], uavInfo.imageInfo); @@ -4183,12 +3695,10 @@ namespace dxvk { if (imageOperands.sparse) resultTypeId = getSparseResultTypeId(texelTypeId); - // Load source value from the UAV resultId = m_module.opImageRead(resultTypeId, m_module.opLoad(uavInfo.imageTypeId, uavInfo.varId), texCoord.id, imageOperands); - // Apply component swizzle and mask DxbcRegisterValue uavValue; uavValue.type = texelType; uavValue.id = imageOperands.sparse @@ -4206,14 +3716,9 @@ namespace dxvk { void DxbcCompiler::emitTypedUavStore(const DxbcShaderInstruction& ins) { - // store_uav_typed has three operands: - // (dst0) The destination UAV - // (src0) The texture or buffer coordinates - // (src1) The value to store const DxbcBufferInfo uavInfo = getBufferInfo(ins.dst[0]); emitUavBarrier(0u, uint64_t(1u) << ins.dst[0].idx[0].offset); - // Set image operands for coherent access if necessary SpirvImageOperands imageOperands; if (uavInfo.coherence) { @@ -4222,16 +3727,12 @@ namespace dxvk { imageOperands.makeAvailable = m_module.constu32(uavInfo.coherence); } - // Load texture coordinates DxbcRegisterValue texCoord = emitLoadTexCoord(ins.src[0], uavInfo.image); - // Load the value that will be written to the image. We'll - // have to cast it to the component type of the image. const DxbcRegisterValue texValue = emitRegisterBitcast( emitRegisterLoad(ins.src[1], DxbcRegMask(true, true, true, true)), uavInfo.stype); - // Write the given value to the image m_module.opImageWrite( m_module.opLoad(uavInfo.typeId, uavInfo.varId), texCoord.id, texValue.id, imageOperands); @@ -4239,14 +3740,9 @@ namespace dxvk { void DxbcCompiler::emitControlFlowIf(const DxbcShaderInstruction& ins) { - // Load the first component of the condition - // operand and perform a zero test on it. const DxbcRegisterValue condition = emitRegisterLoad( ins.src[0], DxbcRegMask(true, false, false, false)); - // Declare the 'if' block. We do not know if there - // will be an 'else' block or not, so we'll assume - // that there is one and leave it empty otherwise. DxbcCfgBlock block; block.type = DxbcCfgBlockType::If; block.b_if.ztestId = emitRegisterZeroTest(condition, ins.controls.zeroTest()).id; @@ -4256,9 +3752,6 @@ namespace dxvk { block.b_if.headerPtr = m_module.getInsertionPtr(); m_controlFlowBlocks.push_back(block); - // We'll insert the branch instruction when closing - // the block, since we don't know whether or not an - // else block is needed right now. m_module.opLabel(block.b_if.labelIf); } @@ -4269,13 +3762,9 @@ namespace dxvk { || m_controlFlowBlocks.back().b_if.labelElse != 0) throw DxvkError("DxbcCompiler: 'Else' without 'If' found"); - // Set the 'Else' flag so that we do - // not insert a dummy block on 'EndIf' DxbcCfgBlock& block = m_controlFlowBlocks.back(); block.b_if.labelElse = m_module.allocateId(); - // Close the 'If' block by branching to - // the merge block we declared earlier m_module.opBranch(block.b_if.labelEnd); m_module.opLabel (block.b_if.labelElse); } @@ -4286,11 +3775,9 @@ namespace dxvk { || m_controlFlowBlocks.back().type != DxbcCfgBlockType::If) throw DxvkError("DxbcCompiler: 'EndIf' without 'If' found"); - // Remove the block from the stack, it's closed DxbcCfgBlock block = m_controlFlowBlocks.back(); m_controlFlowBlocks.pop_back(); - // Write out the 'if' header m_module.beginInsertion(block.b_if.headerPtr); m_module.opSelectionMerge( @@ -4306,20 +3793,15 @@ namespace dxvk { m_module.endInsertion(); - // End the active 'if' or 'else' block m_module.opBranch(block.b_if.labelEnd); m_module.opLabel (block.b_if.labelEnd); } void DxbcCompiler::emitControlFlowSwitch(const DxbcShaderInstruction& ins) { - // Load the selector as a scalar unsigned integer const DxbcRegisterValue selector = emitRegisterLoad( ins.src[0], DxbcRegMask(true, false, false, false)); - // Declare switch block. We cannot insert the switch - // instruction itself yet because the number of case - // statements and blocks is unknown at this point. DxbcCfgBlock block; block.type = DxbcCfgBlockType::Switch; block.b_switch.insertPtr = m_module.getInsertionPtr(); @@ -4330,7 +3812,6 @@ namespace dxvk { block.b_switch.labelCases = nullptr; m_controlFlowBlocks.push_back(block); - // Define the first 'case' label m_module.opLabel(block.b_switch.labelCase); } @@ -4340,11 +3821,9 @@ namespace dxvk { || m_controlFlowBlocks.back().type != DxbcCfgBlockType::Switch) throw DxvkError("DxbcCompiler: 'Case' without 'Switch' found"); - // The source operand must be a 32-bit immediate. if (ins.src[0].type != DxbcOperandType::Imm32) throw DxvkError("DxbcCompiler: Invalid operand type for 'Case'"); - // Use the last label allocated for 'case'. DxbcCfgBlockSwitch* block = &m_controlFlowBlocks.back().b_switch; if (caseBlockIsFallthrough()) { @@ -4376,7 +3855,6 @@ namespace dxvk { m_module.opLabel (block->labelCase); } - // Set the last label allocated for 'case' as the default label. block->labelDefault = block->labelCase; } @@ -4386,7 +3864,6 @@ namespace dxvk { || m_controlFlowBlocks.back().type != DxbcCfgBlockType::Switch) throw DxvkError("DxbcCompiler: 'EndSwitch' without 'Switch' found"); - // Remove the block from the stack, it's closed DxbcCfgBlock block = m_controlFlowBlocks.back(); m_controlFlowBlocks.pop_back(); @@ -4396,17 +3873,13 @@ namespace dxvk { : block.b_switch.labelCase; } - // Close the current 'case' block m_module.opBranch(block.b_switch.labelBreak); - // Insert the 'switch' statement. For that, we need to - // gather all the literal-label pairs for the construct. m_module.beginInsertion(block.b_switch.insertPtr); m_module.opSelectionMerge( block.b_switch.labelBreak, spv::SelectionControlMaskNone); - // We'll restore the original order of the case labels here std::vector jumpTargets; for (auto i = block.b_switch.labelCases; i != nullptr; i = i->next) jumpTargets.insert(jumpTargets.begin(), i->desc); @@ -4418,20 +3891,16 @@ namespace dxvk { jumpTargets.data()); m_module.endInsertion(); - // Destroy the list of case labels - // FIXME we're leaking memory if compilation fails. DxbcSwitchLabel* caseLabel = block.b_switch.labelCases; while (caseLabel != nullptr) delete std::exchange(caseLabel, caseLabel->next); - // Begin new block after switch blocks m_module.opLabel(block.b_switch.labelBreak); } void DxbcCompiler::emitControlFlowLoop(const DxbcShaderInstruction& ins) { - // Declare the 'loop' block DxbcCfgBlock block; block.type = DxbcCfgBlockType::Loop; block.b_loop.labelHeader = m_module.allocateId(); @@ -4458,15 +3927,12 @@ namespace dxvk { || m_controlFlowBlocks.back().type != DxbcCfgBlockType::Loop) throw DxvkError("DxbcCompiler: 'EndLoop' without 'Loop' found"); - // Remove the block from the stack, it's closed const DxbcCfgBlock block = m_controlFlowBlocks.back(); m_controlFlowBlocks.pop_back(); - // Declare the continue block m_module.opBranch(block.b_loop.labelContinue); m_module.opLabel (block.b_loop.labelContinue); - // Declare the merge block m_module.opBranch(block.b_loop.labelHeader); m_module.opLabel (block.b_loop.labelBreak); } @@ -4486,17 +3952,13 @@ namespace dxvk { m_module.opBranch(isBreak ? cfgBlock->b_loop.labelBreak : cfgBlock->b_loop.labelContinue); - } else /* if (cfgBlock->type == DxbcCfgBlockType::Switch) */ { + } else { m_module.opBranch(cfgBlock->b_switch.labelBreak); } - // Subsequent instructions assume that there is an open block const uint32_t labelId = m_module.allocateId(); m_module.opLabel(labelId); - // If this is on the same level as a switch-case construct, - // rather than being nested inside an 'if' statement, close - // the current 'case' block. if (m_controlFlowBlocks.back().type == DxbcCfgBlockType::Switch) cfgBlock->b_switch.labelCase = labelId; } @@ -4512,14 +3974,12 @@ namespace dxvk { if (cfgBlock == nullptr) throw DxvkError("DxbcCompiler: 'Breakc' or 'Continuec' outside 'Loop' or 'Switch' found"); - // Perform zero test on the first component of the condition const DxbcRegisterValue condition = emitRegisterLoad( ins.src[0], DxbcRegMask(true, false, false, false)); const DxbcRegisterValue zeroTest = emitRegisterZeroTest( condition, ins.controls.zeroTest()); - // We basically have to wrap this into an 'if' block const uint32_t breakBlock = m_module.allocateId(); const uint32_t mergeBlock = m_module.allocateId(); @@ -4535,7 +3995,7 @@ namespace dxvk { m_module.opBranch(isBreak ? cfgBlock->b_loop.labelBreak : cfgBlock->b_loop.labelContinue); - } else /* if (cfgBlock->type == DxbcCfgBlockType::Switch) */ { + } else { m_module.opBranch(cfgBlock->b_switch.labelBreak); } @@ -4550,27 +4010,23 @@ namespace dxvk { m_module.opReturn(); m_module.opLabel(labelId); - // return can be used in place of break to terminate a case block if (m_controlFlowBlocks.back().type == DxbcCfgBlockType::Switch) m_controlFlowBlocks.back().b_switch.labelCase = labelId; m_topLevelIsUniform = false; } else { - // Last instruction in the current function this->emitFunctionEnd(); } } void DxbcCompiler::emitControlFlowRetc(const DxbcShaderInstruction& ins) { - // Perform zero test on the first component of the condition const DxbcRegisterValue condition = emitRegisterLoad( ins.src[0], DxbcRegMask(true, false, false, false)); const DxbcRegisterValue zeroTest = emitRegisterZeroTest( condition, ins.controls.zeroTest()); - // We basically have to wrap this into an 'if' block const uint32_t returnLabel = m_module.allocateId(); const uint32_t continueLabel = m_module.allocateId(); @@ -4585,14 +4041,11 @@ namespace dxvk { m_module.opLabel(continueLabel); - // The return condition may be non-uniform m_topLevelIsUniform = false; } void DxbcCompiler::emitControlFlowDiscard(const DxbcShaderInstruction& ins) { - // Discard actually has an operand that determines - // whether or not the fragment should be discarded const DxbcRegisterValue condition = emitRegisterLoad( ins.src[0], DxbcRegMask(true, false, false, false)); @@ -4614,7 +4067,6 @@ namespace dxvk { m_module.enableCapability(spv::CapabilityDemoteToHelperInvocation); - // Discard is just retc in a trenchcoat m_topLevelIsUniform = false; } @@ -4634,8 +4086,6 @@ namespace dxvk { m_insideFunction = true; - // We have to assume that this function gets - // called from non-uniform control flow m_topLevelIsUniform = false; } @@ -4654,14 +4104,12 @@ namespace dxvk { uint32_t functionNr = ins.src[1].idx[0].offset; uint32_t functionId = getFunctionId(functionNr); - // Perform zero test on the first component of the condition const DxbcRegisterValue condition = emitRegisterLoad( ins.src[0], DxbcRegMask(true, false, false, false)); const DxbcRegisterValue zeroTest = emitRegisterZeroTest( condition, ins.controls.zeroTest()); - // We basically have to wrap this into an 'if' block const uint32_t callLabel = m_module.allocateId(); const uint32_t skipLabel = m_module.allocateId(); @@ -4778,7 +4226,6 @@ namespace dxvk { float z, float w, const DxbcRegMask& writeMask) { - // TODO refactor these functions into one single template std::array ids = { 0, 0, 0, 0 }; uint32_t componentIndex = 0; @@ -4947,8 +4394,6 @@ namespace dxvk { indices[dstIndex++] = swizzle[i]; } - // If the swizzle combined with the mask can be reduced - // to a no-op, we don't need to insert any instructions. bool isIdentitySwizzle = dstIndex == value.type.ccount; for (uint32_t i = 0; i < dstIndex && isIdentitySwizzle; i++) @@ -4957,8 +4402,6 @@ namespace dxvk { if (isIdentitySwizzle) return value; - // Use OpCompositeExtract if the resulting vector contains - // only one component, and OpVectorShuffle if it is a vector. DxbcRegisterValue result; result.type.ctype = value.type.ctype; result.type.ccount = dstIndex; @@ -4996,24 +4439,15 @@ namespace dxvk { const uint32_t typeId = getVectorTypeId(result.type); if (srcMask.popCount() == 0) { - // Nothing to do if the insertion mask is empty result.id = dstValue.id; } else if (dstValue.type.ccount == 1) { - // Both values are scalar, so the first component - // of the write mask decides which one to take. result.id = srcMask[0] ? srcValue.id : dstValue.id; } else if (srcValue.type.ccount == 1) { - // The source value is scalar. Since OpVectorShuffle - // requires both arguments to be vectors, we have to - // use OpCompositeInsert to modify the vector instead. const uint32_t componentId = srcMask.firstSet(); result.id = m_module.opCompositeInsert(typeId, srcValue.id, dstValue.id, 1, &componentId); } else { - // Both arguments are vectors. We can determine which - // components to take from which vector and use the - // OpVectorShuffle instruction. std::array components; uint32_t srcComponentId = dstValue.type.ccount; @@ -5232,8 +4666,6 @@ namespace dxvk { DxbcRegisterPointer DxbcCompiler::emitGetTempPtr( const DxbcRegister& operand) { - // r# regs are indexed as follows: - // (0) register index (immediate) uint32_t regIdx = operand.idx[0].offset; if (regIdx >= m_rRegs.size()) @@ -5269,14 +4701,6 @@ namespace dxvk { DxbcRegisterPointer DxbcCompiler::emitGetInputPtr( const DxbcRegister& operand) { - // In the vertex and pixel stages, - // v# regs are indexed as follows: - // (0) register index (relative) - // - // In the tessellation and geometry - // stages, the index has two dimensions: - // (0) vertex index (relative) - // (1) register index (relative) DxbcRegisterPointer result; result.type.ctype = DxbcScalarType::Float32; result.type.ccount = 4; @@ -5286,8 +4710,6 @@ namespace dxvk { for (uint32_t i = 0; i < operand.idxDim; i++) indices.at(i) = emitIndexLoad(operand.idx[i]).id; - // Pick the input array depending on - // the program type and operand type struct InputArray { uint32_t id; spv::StorageClass sclass; @@ -5327,9 +4749,6 @@ namespace dxvk { DxbcRegisterPointer DxbcCompiler::emitGetOutputPtr( const DxbcRegister& operand) { if (m_programInfo.type() == DxbcProgramType::HullShader) { - // Hull shaders are special in that they have two sets of - // output registers, one for per-patch values and one for - // per-vertex values. DxbcRegisterPointer result; result.type.ctype = DxbcScalarType::Float32; result.type.ccount = 4; @@ -5361,8 +4780,6 @@ namespace dxvk { return result; } else { - // Regular shaders have their output - // registers set up at declaration time return m_oRegs.at(operand.idx[0].offset); } } @@ -5373,8 +4790,6 @@ namespace dxvk { DxbcRegisterValue constId = emitIndexLoad(operand.idx[0]); if (m_icbArray) { - // We pad the icb array with an extra zero vector, so we can - // clamp the index and get correct robustness behaviour. constId.id = m_module.opUMin(getVectorTypeId(constId.type), constId.id, m_module.constu32(m_icbSize)); @@ -5542,16 +4957,12 @@ namespace dxvk { DxbcRegisterPointer DxbcCompiler::emitGetAtomicPointer( const DxbcRegister& operand, const DxbcRegister& address) { - // Query information about the resource itself const uint32_t registerId = operand.idx[0].offset; const DxbcBufferInfo resourceInfo = getBufferInfo(operand); - // For UAVs and shared memory, different methods - // of obtaining the final pointer are used. bool isTgsm = operand.type == DxbcOperandType::ThreadGroupSharedMemory; bool isSsbo = resourceInfo.isSsbo; - // Compute the actual address into the resource const DxbcRegisterValue addressValue = [&] { switch (resourceInfo.type) { case DxbcResourceType::Raw: @@ -5581,7 +4992,6 @@ namespace dxvk { } }(); - // Compute the actual pointer DxbcRegisterPointer result; result.type.ctype = resourceInfo.stype; result.type.ccount = 1; @@ -5620,14 +5030,11 @@ namespace dxvk { DxbcRegisterValue DxbcCompiler::emitQueryTexelBufferSize( const DxbcRegister& resource) { - // Load the texel buffer object. This cannot be used with - // constant buffers or any other type of resource. const DxbcBufferInfo bufferInfo = getBufferInfo(resource); const uint32_t bufferId = m_module.opLoad( bufferInfo.typeId, bufferInfo.varId); - // We'll store this as a scalar unsigned integer DxbcRegisterValue result; result.type.ctype = DxbcScalarType::Uint32; result.type.ccount = 1; @@ -5651,7 +5058,6 @@ namespace dxvk { getVectorTypeId(result.type), m_module.opLoad(info.typeId, info.varId)); } else { - // Report one LOD in case of UAVs or multisampled images result.id = m_module.constu32(1); } @@ -5662,8 +5068,6 @@ namespace dxvk { DxbcRegisterValue DxbcCompiler::emitQueryTextureSamples( const DxbcRegister& resource) { if (resource.type == DxbcOperandType::Rasterizer) { - // SPIR-V has no gl_NumSamples equivalent, so we - // have to work around it using a push constant if (!m_ps.pushConstantId) m_ps.pushConstantId = emitPushConstants(); @@ -5689,7 +5093,6 @@ namespace dxvk { getVectorTypeId(result.type), m_module.opLoad(info.typeId, info.varId)); } else { - // OpImageQuerySamples requires MSAA images result.id = m_module.constu32(1); } @@ -5812,22 +5215,15 @@ namespace dxvk { DxbcRegisterPointer ptr, DxbcRegisterValue value, DxbcRegMask writeMask) { - // If the component types are not compatible, - // we need to bit-cast the source variable. if (value.type.ctype != ptr.type.ctype) value = emitRegisterBitcast(value, ptr.type.ctype); - // If the source value consists of only one component, - // it is stored in all components of the destination. if (value.type.ccount == 1) value = emitRegisterExtend(value, writeMask.popCount()); if (ptr.type.ccount == writeMask.popCount()) { - // Simple case: We write to the entire register m_module.opStore(ptr.id, value.id); } else { - // We only write to part of the destination - // register, so we need to load and modify it DxbcRegisterValue tmp = emitValueLoad(ptr); tmp = emitRegisterInsert(tmp, value, writeMask); @@ -5838,7 +5234,6 @@ namespace dxvk { DxbcRegisterValue DxbcCompiler::emitRegisterLoadRaw( const DxbcRegister& reg) { - // Try to find index range for the given register const DxbcIndexRange* indexRange = nullptr; if (reg.idxDim && reg.idx[reg.idxDim - 1u].relReg) { @@ -5870,8 +5265,6 @@ namespace dxvk { m_module.constu32(indexRange->length)); } - // Kind of ugly to have an empty else block here but there's no - // way for us to know the current block ID for the phi below DxbcConditional cond; cond.labelIf = m_module.allocateId(); cond.labelElse = m_module.allocateId(); @@ -5906,7 +5299,6 @@ namespace dxvk { DxbcRegisterValue value = emitValueLoad(emitGetOperandPtr(reg)); - // Pad icb values to a vec4 since the app may access components that are always 0 if (reg.type == DxbcOperandType::ImmediateConstantBuffer && value.type.ccount < 4u) { DxbcVectorType zeroType; zeroType.ctype = value.type.ctype; @@ -5928,9 +5320,6 @@ namespace dxvk { DxbcRegisterValue DxbcCompiler::emitConstantBufferLoad( const DxbcRegister& reg, DxbcRegMask writeMask) { - // Constant buffers take a two-dimensional index: - // (0) register index (immediate) - // (1) constant offset (relative) DxbcRegisterInfo info; info.type.ctype = DxbcScalarType::Float32; info.type.ccount = 4; @@ -5952,7 +5341,6 @@ namespace dxvk { m_constantBuffers.at(regId).varId, indices.size(), indices.data()); - // Load individual components from buffer std::array ccomps = { 0, 0, 0, 0 }; std::array scomps = { 0, 0, 0, 0 }; uint32_t scount = 0; @@ -5993,7 +5381,6 @@ namespace dxvk { scount, scomps.data()); } - // Apply any post-processing that might be necessary result = emitRegisterBitcast(result, reg.dataType); result = emitSrcOperandModifiers(result, reg.modifiers); return result; @@ -6008,14 +5395,12 @@ namespace dxvk { DxbcRegisterValue result; if (reg.componentCount == DxbcComponentCount::Component1) { - // Create one single u32 constant result.type.ctype = DxbcScalarType::Uint32; result.type.ccount = 1; result.id = m_module.constu32(reg.imm.u32_1); result = emitRegisterExtend(result, writeMask.popCount()); } else if (reg.componentCount == DxbcComponentCount::Component4) { - // Create a u32 vector with as many components as needed std::array indices = { }; uint32_t indexId = 0; @@ -6037,26 +5422,19 @@ namespace dxvk { } } else { - // Something went horribly wrong in the decoder or the shader is broken throw DxvkError("DxbcCompiler: Invalid component count for immediate operand"); } - // Cast constants to the requested type return emitRegisterBitcast(result, reg.dataType); } else if (reg.type == DxbcOperandType::ConstantBuffer) { return emitConstantBufferLoad(reg, writeMask); } else { - // Load operand from the operand pointer DxbcRegisterValue result = emitRegisterLoadRaw(reg); - // Apply operand swizzle to the operand value result = emitRegisterSwizzle(result, reg.swizzle, writeMask); - // Cast it to the requested type. We need to do - // this after the swizzling for 64-bit types. result = emitRegisterBitcast(result, reg.dataType); - // Apply operand modifiers result = emitSrcOperandModifiers(result, reg.modifiers); return result; } @@ -6100,7 +5478,6 @@ namespace dxvk { void DxbcCompiler::emitInputSetup() { m_module.setLateConst(m_vArrayLengthId, &m_vArrayLength); - // Copy all defined v# registers into the input array const uint32_t vecTypeId = m_module.defVectorType(m_module.defFloatType(32), 4); const uint32_t ptrTypeId = m_module.defPointerType(vecTypeId, spv::StorageClassPrivate); @@ -6121,8 +5498,6 @@ namespace dxvk { } } - // Copy all system value registers into the array, - // preserving any previously written contents. for (const DxbcSvMapping& map : m_vMappings) { const uint32_t registerId = m_module.consti32(map.regId); @@ -6147,8 +5522,6 @@ namespace dxvk { void DxbcCompiler::emitInputSetup(uint32_t vertexCount) { m_module.setLateConst(m_vArrayLengthId, &m_vArrayLength); - // Copy all defined v# registers into the input array. Note - // that the outer index of the array is the vertex index. const uint32_t vecTypeId = m_module.defVectorType(m_module.defFloatType(32), 4); const uint32_t dstPtrTypeId = m_module.defPointerType(vecTypeId, spv::StorageClassPrivate); @@ -6179,8 +5552,6 @@ namespace dxvk { } } - // Copy all system value registers into the array, - // preserving any previously written contents. for (const DxbcSvMapping& map : m_vMappings) { const uint32_t registerId = m_module.consti32(map.regId); @@ -6240,9 +5611,6 @@ namespace dxvk { void DxbcCompiler::emitOutputDepthClamp() { - // HACK: Some drivers do not clamp FragDepth to [minDepth..maxDepth] - // before writing to the depth attachment, but we do not have acccess - // to those. Clamp to [0..1] instead. if (m_ps.builtinDepth) { DxbcRegisterPointer ptr; ptr.type = { DxbcScalarType::Float32, 1 }; @@ -6466,9 +5834,6 @@ namespace dxvk { ptrIn.type = { DxbcScalarType::Float32, 4 }; ptrIn.id = m_ps.builtinFragCoord; - // The X, Y and Z components of the SV_POSITION semantic - // are identical to Vulkan's FragCoord builtin, but we - // need to compute the reciprocal of the W component. DxbcRegisterValue fragCoord = emitValueLoad(ptrIn); uint32_t componentIndex = 3; @@ -6675,18 +6040,18 @@ namespace dxvk { }; static const std::array s_tessFactors = {{ - { m_hs.builtinTessLevelOuter, 0 }, // FinalQuadUeq0EdgeTessFactor - { m_hs.builtinTessLevelOuter, 1 }, // FinalQuadVeq0EdgeTessFactor - { m_hs.builtinTessLevelOuter, 2 }, // FinalQuadUeq1EdgeTessFactor - { m_hs.builtinTessLevelOuter, 3 }, // FinalQuadVeq1EdgeTessFactor - { m_hs.builtinTessLevelInner, 0 }, // FinalQuadUInsideTessFactor - { m_hs.builtinTessLevelInner, 1 }, // FinalQuadVInsideTessFactor - { m_hs.builtinTessLevelOuter, 0 }, // FinalTriUeq0EdgeTessFactor - { m_hs.builtinTessLevelOuter, 1 }, // FinalTriVeq0EdgeTessFactor - { m_hs.builtinTessLevelOuter, 2 }, // FinalTriWeq0EdgeTessFactor - { m_hs.builtinTessLevelInner, 0 }, // FinalTriInsideTessFactor - { m_hs.builtinTessLevelOuter, 0 }, // FinalLineDensityTessFactor - { m_hs.builtinTessLevelOuter, 1 }, // FinalLineDetailTessFactor + { m_hs.builtinTessLevelOuter, 0 }, + { m_hs.builtinTessLevelOuter, 1 }, + { m_hs.builtinTessLevelOuter, 2 }, + { m_hs.builtinTessLevelOuter, 3 }, + { m_hs.builtinTessLevelInner, 0 }, + { m_hs.builtinTessLevelInner, 1 }, + { m_hs.builtinTessLevelOuter, 0 }, + { m_hs.builtinTessLevelOuter, 1 }, + { m_hs.builtinTessLevelOuter, 2 }, + { m_hs.builtinTessLevelInner, 0 }, + { m_hs.builtinTessLevelOuter, 0 }, + { m_hs.builtinTessLevelOuter, 1 }, }}; const TessFactor tessFactor = s_tessFactors.at(uint32_t(sv) @@ -6695,7 +6060,6 @@ namespace dxvk { const uint32_t tessFactorArrayIndex = m_module.constu32(tessFactor.index); - // Apply global tess factor limit float maxTessFactor = m_hs.maxTessFactor; if (m_moduleInfo.tess != nullptr) { @@ -6841,7 +6205,6 @@ namespace dxvk { for (auto e = m_isgn->begin(); e != m_isgn->end(); e++) { if (e->systemValue == sv) { - // Load individual components from the source array uint32_t componentIndex = 0; std::array componentIds = {{ 0, 0, 0, 0 }}; @@ -6862,7 +6225,6 @@ namespace dxvk { } } - // Put everything into one vector DxbcRegisterValue dstValue; dstValue.type = { DxbcScalarType::Float32, componentIndex }; dstValue.id = componentIds[0]; @@ -6873,7 +6235,6 @@ namespace dxvk { componentIndex, componentIds.data()); } - // Store vector to the input array uint32_t registerId = m_module.consti32(e->registerId); DxbcRegisterPointer dstInput; @@ -6904,12 +6265,9 @@ namespace dxvk { void DxbcCompiler::emitInit() { - // Set up common capabilities for all shaders m_module.enableCapability(spv::CapabilityShader); m_module.enableCapability(spv::CapabilityImageQuery); - // Initialize the shader module with capabilities - // etc. Each shader type has its own peculiarities. switch (m_programInfo.type()) { case DxbcProgramType::VertexShader: emitVsInit(); break; case DxbcProgramType::HullShader: emitHsInit(); break; @@ -6966,10 +6324,8 @@ namespace dxvk { m_module.enableCapability(spv::CapabilityCullDistance); m_module.enableCapability(spv::CapabilityDrawParameters); - // Standard input array emitDclInputArray(0); - // Cull/clip distances as outputs m_clipDistances = emitDclClipCullDistanceArray( m_analysis->clipCullOut.numClipPlanes, spv::BuiltInClipDistance, @@ -6980,7 +6336,6 @@ namespace dxvk { spv::BuiltInCullDistance, spv::StorageClassOutput); - // Main function of the vertex shader m_vs.functionId = m_module.allocateId(); m_module.setDebugName(m_vs.functionId, "vs_main"); @@ -7018,7 +6373,6 @@ namespace dxvk { m_ds.builtinTessLevelOuter = emitBuiltinTessLevelOuter(spv::StorageClassInput); m_ds.builtinTessLevelInner = emitBuiltinTessLevelInner(spv::StorageClassInput); - // Cull/clip distances as outputs m_clipDistances = emitDclClipCullDistanceArray( m_analysis->clipCullOut.numClipPlanes, spv::BuiltInClipDistance, @@ -7029,7 +6383,6 @@ namespace dxvk { spv::BuiltInCullDistance, spv::StorageClassOutput); - // Main function of the domain shader m_ds.functionId = m_module.allocateId(); m_module.setDebugName(m_ds.functionId, "ds_main"); @@ -7047,7 +6400,6 @@ namespace dxvk { m_module.enableCapability(spv::CapabilityClipDistance); m_module.enableCapability(spv::CapabilityCullDistance); - // Enable capabilities for xfb mode if necessary if (m_moduleInfo.xfb) { m_module.enableCapability(spv::CapabilityGeometryStreams); m_module.enableCapability(spv::CapabilityTransformFeedback); @@ -7055,11 +6407,9 @@ namespace dxvk { m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeXfb); } - // We only need outputs if rasterization is enabled m_gs.needsOutputSetup = !m_moduleInfo.xfb || m_moduleInfo.xfb->rasterizedStream >= 0; - // Cull/clip distances as outputs m_clipDistances = emitDclClipCullDistanceArray( m_analysis->clipCullOut.numClipPlanes, spv::BuiltInClipDistance, @@ -7070,11 +6420,9 @@ namespace dxvk { spv::BuiltInCullDistance, spv::StorageClassOutput); - // Emit Xfb variables if necessary if (m_moduleInfo.xfb) emitXfbOutputDeclarations(); - // Main function of the vertex shader m_gs.functionId = m_module.allocateId(); m_module.setDebugName(m_gs.functionId, "gs_main"); @@ -7093,10 +6441,8 @@ namespace dxvk { m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeOriginUpperLeft); - // Standard input array emitDclInputArray(0); - // Cull/clip distances as inputs m_clipDistances = emitDclClipCullDistanceArray( m_analysis->clipCullIn.numClipPlanes, spv::BuiltInClipDistance, @@ -7107,7 +6453,6 @@ namespace dxvk { spv::BuiltInCullDistance, spv::StorageClassInput); - // Main function of the pixel shader m_ps.functionId = m_module.allocateId(); m_module.setDebugName(m_ps.functionId, "ps_main"); @@ -7121,7 +6466,6 @@ namespace dxvk { void DxbcCompiler::emitCsInit() { - // Main function of the compute shader m_cs.functionId = m_module.allocateId(); m_module.setDebugName(m_cs.functionId, "cs_main"); @@ -7152,13 +6496,11 @@ namespace dxvk { if (m_hs.cpPhase.functionId == 0) m_hs.cpPhase = this->emitNewHullShaderPassthroughPhase(); - // Control point phase this->emitMainFunctionBegin(); this->emitInputSetup(m_hs.vertexCountIn); this->emitHsControlPointPhase(m_hs.cpPhase); this->emitHsPhaseBarrier(); - // Fork-join phases and output setup this->emitHsInvocationBlockBegin(1); for (const auto& phase : m_hs.forkPhases) @@ -7196,8 +6538,6 @@ namespace dxvk { m_module.opFunctionCall( m_module.defVoidType(), m_gs.functionId, 0, nullptr); - // No output setup at this point as that was - // already done during the EmitVertex step this->emitFunctionEnd(); } @@ -7209,8 +6549,6 @@ namespace dxvk { this->emitClipCullLoad(DxbcSystemValue::CullDistance, m_cullDistances); if (m_hasRasterizerOrderedUav) { - // For simplicity, just lock the entire fragment shader - // if there are any rasterizer ordered views. m_module.enableExtension("SPV_EXT_fragment_shader_interlock"); if (m_module.hasCapability(spv::CapabilitySampleRateShading) @@ -7293,7 +6631,6 @@ namespace dxvk { m_moduleInfo.xfb->strides[xfbEntry->bufferId]); } - // TODO Compact location/component assignment for (uint32_t i = 0; i < m_xfbVars.size(); i++) { m_xfbVars[i].location = i; m_xfbVars[i].component = 0; @@ -7362,9 +6699,6 @@ namespace dxvk { info.ctype = DxbcScalarType::Float32; info.ccount = 4; - // Define the array type. This will be two-dimensional - // in some shaders, with the outer index representing - // the vertex ID within an invocation. m_vArrayLength = m_isgn != nullptr ? std::max(1u, m_isgn->maxRegisterCount()) : 1; m_vArrayLengthId = m_module.lateConst32(getScalarTypeId(DxbcScalarType::Uint32)); @@ -7376,9 +6710,6 @@ namespace dxvk { arrayTypeId, m_module.constu32(vertexCount)); } - // Define the actual variable. Note that this is private - // because we will copy input registers and some system - // variables to the array during the setup phase. const uint32_t ptrTypeId = m_module.defPointerType( arrayTypeId, spv::StorageClassPrivate); @@ -7433,7 +6764,6 @@ namespace dxvk { uint32_t funTypeId = m_module.defFunctionType( m_module.defVoidType(), 0, nullptr); - // Begin passthrough function uint32_t funId = m_module.allocateId(); m_module.setDebugName(funId, "hs_passthrough"); @@ -7442,8 +6772,6 @@ namespace dxvk { funTypeId); this->emitFunctionLabel(); - // We'll basically copy each input variable to the corresponding - // output, using the shader's invocation ID as the array index. const uint32_t invocationId = m_module.opLoad( getScalarTypeId(DxbcScalarType::Uint32), m_hs.builtinInvocationId); @@ -7455,7 +6783,6 @@ namespace dxvk { DxbcSystemValue::None, DxbcInterpolationMode::Undefined); - // Vector type index const std::array dstIndices = {{ invocationId, m_module.constu32(i->registerId) }}; @@ -7477,7 +6804,6 @@ namespace dxvk { emitValueStore(dstPtr, srcValue, DxbcRegMask::firstN(srcValue.type.ccount)); } - // End function this->emitFunctionEnd(); DxbcCompilerHsControlPointPhase result; @@ -7636,19 +6962,14 @@ namespace dxvk { uint32_t DxbcCompiler::emitSamplePosArray() { const std::array samplePosVectors = {{ - // Invalid sample count / unbound resource m_module.constvec2f32( 0.0f, 0.0f), - // VK_SAMPLE_COUNT_1_BIT m_module.constvec2f32( 0.0f, 0.0f), - // VK_SAMPLE_COUNT_2_BIT m_module.constvec2f32( 0.25f, 0.25f), m_module.constvec2f32(-0.25f,-0.25f), - // VK_SAMPLE_COUNT_4_BIT m_module.constvec2f32(-0.125f,-0.375f), m_module.constvec2f32( 0.375f,-0.125f), m_module.constvec2f32(-0.375f, 0.125f), m_module.constvec2f32( 0.125f, 0.375f), - // VK_SAMPLE_COUNT_8_BIT m_module.constvec2f32( 0.0625f,-0.1875f), m_module.constvec2f32(-0.0625f, 0.1875f), m_module.constvec2f32( 0.3125f, 0.0625f), @@ -7657,7 +6978,6 @@ namespace dxvk { m_module.constvec2f32(-0.4375f,-0.0625f), m_module.constvec2f32( 0.1875f, 0.4375f), m_module.constvec2f32( 0.4375f,-0.4375f), - // VK_SAMPLE_COUNT_16_BIT m_module.constvec2f32( 0.0625f, 0.0625f), m_module.constvec2f32(-0.0625f,-0.1875f), m_module.constvec2f32(-0.1875f, 0.1250f), @@ -7920,10 +7240,6 @@ namespace dxvk { || m_programInfo.type() != DxbcProgramType::ComputeShader) return; - // If both masks are 0, emit a barrier in case at least one read-write UAV - // has a pending unsynchronized access. Only consider read-after-write and - // write-after-read hazards, assume that back-to-back stores are safe and - // do not overlap in memory. Atomics are also completely ignored here. uint64_t rdMask = m_uavRdMask; uint64_t wrMask = m_uavWrMask; @@ -7939,8 +7255,6 @@ namespace dxvk { insertBarrier |= (m_analysis->uavInfos[uav].accessFlags & rwAccess) == rwAccess; } - // Need to be in uniform top-level control flow, or otherwise - // it is not safe to insert control barriers. if (insertBarrier && m_controlFlowBlocks.empty() && m_topLevelIsUniform) { m_module.opControlBarrier( m_module.constu32(spv::ScopeWorkgroup), @@ -7956,7 +7270,6 @@ namespace dxvk { m_uavRdMask = 0u; } - // Mark pending accesses m_uavWrMask |= writeMask; m_uavRdMask |= readMask; } @@ -8093,9 +7406,6 @@ namespace dxvk { DxbcRegisterPointer DxbcCompiler::getIndexableTempPtr( const DxbcRegister& operand, DxbcRegisterValue vectorId) { - // x# regs are indexed as follows: - // (0) register index (immediate) - // (1) element index (relative) const uint32_t regId = operand.idx[0].offset; DxbcRegisterInfo info; @@ -8124,8 +7434,6 @@ namespace dxvk { uint32_t DxbcCompiler::getUavCoherence(uint32_t registerId, DxbcUavFlags flags) { - // For any ROV with write access, we must ensure that - // availability operations happen within the locked scope. if (flags.test(DxbcUavFlag::RasterizerOrdered) && (m_analysis->uavInfos[registerId].accessFlags & VK_ACCESS_SHADER_WRITE_BIT)) { m_hasGloballyCoherentUav = true; @@ -8133,22 +7441,14 @@ namespace dxvk { return spv::ScopeQueueFamily; } - // Ignore any resources that can't both be read and written in - // the current shader, explicit availability/visibility operands - // are not useful in that case. if (m_analysis->uavInfos[registerId].accessFlags != (VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT)) return 0; - // If the globally coherent flag is set, the resource must be - // coherent across multiple workgroups of the same dispatch if (flags.test(DxbcUavFlag::GloballyCoherent)) { m_hasGloballyCoherentUav = true; return spv::ScopeQueueFamily; } - // In compute shaders, UAVs are implicitly workgroup coherent, - // but we can rely on memory barrier instructions to make any - // access available and visible to the entire workgroup. if (m_programInfo.type() == DxbcProgramType::ComputeShader) return spv::ScopeInvocation; diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_decoder.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_decoder.cpp index 0de7ddad17..d1f0632c99 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_decoder.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_decoder.cpp @@ -41,8 +41,6 @@ namespace dxvk { void DxbcDecodeContext::decodeInstruction(DxbcCodeSlice& code) { const uint32_t token0 = code.at(0); - // Initialize the instruction structure. Some of these values - // may not get written otherwise while decoding the instruction. m_instruction.op = static_cast(bit::extract(token0, 0, 10)); m_instruction.opClass = DxbcInstClass::Undefined; m_instruction.sampleControls = { 0, 0, 0 }; @@ -56,12 +54,8 @@ namespace dxvk { m_instruction.customDataSize = 0; m_instruction.customData = nullptr; - // Reset the index pointer, which may still contain - // a non-zero value from the previous iteration m_indexId = 0; - // Instruction length, in DWORDs. This includes the token - // itself and any other prefix that an instruction may have. uint32_t length = 0; if (m_instruction.op == DxbcOpcode::CustomData) { @@ -72,8 +66,6 @@ namespace dxvk { this->decodeOperation(code.take(length)); } - // Advance the caller's slice to the next token so that - // they can make consecutive calls to decodeInstruction() code = code.skip(length); } @@ -86,11 +78,9 @@ namespace dxvk { return; } - // Custom data blocks have their own instruction class m_instruction.op = DxbcOpcode::CustomData; m_instruction.opClass = DxbcInstClass::CustomData; - // We'll point into the code buffer rather than making a copy m_instruction.customDataType = static_cast( bit::extract(code.at(0), 11, 31)); m_instruction.customDataSize = blockLength - 2; @@ -101,15 +91,11 @@ namespace dxvk { void DxbcDecodeContext::decodeOperation(DxbcCodeSlice code) { uint32_t token = code.read(); - // Result modifiers, which are applied to common ALU ops m_instruction.modifiers.saturate = !!bit::extract(token, 13, 13); m_instruction.modifiers.precise = !!bit::extract(token, 19, 22); - // Opcode controls. It will depend on the - // opcode itself which ones are valid. m_instruction.controls = DxbcShaderOpcodeControls(token); - // Process extended opcode tokens while (bit::extract(token, 31, 31)) { token = code.read(); @@ -128,7 +114,6 @@ namespace dxvk { aoffimmi.v = bit::extract(token, 13, 16); aoffimmi.w = bit::extract(token, 17, 20); - // Four-bit signed numbers, sign-extend them m_instruction.sampleControls.u = aoffimmi.u; m_instruction.sampleControls.v = aoffimmi.v; m_instruction.sampleControls.w = aoffimmi.w; @@ -136,7 +121,7 @@ namespace dxvk { case DxbcExtOpcode::ResourceDim: case DxbcExtOpcode::ResourceReturnType: - break; // part of resource description + break; default: Logger::warn(str::format( @@ -145,9 +130,6 @@ namespace dxvk { } } - // Retrieve the instruction format in order to parse the - // operands. Doing this mostly automatically means that - // the compiler can rely on the operands being valid. const DxbcInstFormat format = dxbcInstructionFormat(m_instruction.op); m_instruction.opClass = format.instructionClass; @@ -157,39 +139,29 @@ namespace dxvk { void DxbcDecodeContext::decodeComponentSelection(DxbcRegister& reg, uint32_t token) { - // Pick the correct component selection mode based on the - // component count. We'll simplify this here so that the - // compiler can assume that everything is a 4D vector. reg.componentCount = static_cast(bit::extract(token, 0, 1)); switch (reg.componentCount) { - // No components - used for samplers etc. case DxbcComponentCount::Component0: reg.mask = DxbcRegMask(false, false, false, false); reg.swizzle = DxbcRegSwizzle(0, 0, 0, 0); break; - // One component - used for immediates - // and a few built-in registers. case DxbcComponentCount::Component1: reg.mask = DxbcRegMask(true, false, false, false); reg.swizzle = DxbcRegSwizzle(0, 0, 0, 0); break; - // Four components - everything else. This requires us - // to actually parse the component selection mode. case DxbcComponentCount::Component4: { const DxbcRegMode componentMode = static_cast(bit::extract(token, 2, 3)); switch (componentMode) { - // Write mask for destination operands case DxbcRegMode::Mask: reg.mask = bit::extract(token, 4, 7); reg.swizzle = DxbcRegSwizzle(0, 1, 2, 3); break; - // Swizzle for source operands (including resources) case DxbcRegMode::Swizzle: reg.mask = DxbcRegMask(true, true, true, true); reg.swizzle = DxbcRegSwizzle( @@ -199,9 +171,6 @@ namespace dxvk { bit::extract(token, 10, 11)); break; - // Selection of one component. We can generate both a - // mask and a swizzle for this so that the compiler - // won't have to deal with this case specifically. case DxbcRegMode::Select1: { const uint32_t n = bit::extract(token, 4, 5); reg.mask = DxbcRegMask(n == 0, n == 1, n == 2, n == 3); @@ -223,13 +192,10 @@ namespace dxvk { while (bit::extract(token, 31, 31)) { token = code.read(); - // Type of the extended operand token const DxbcOperandExt extTokenType = static_cast(bit::extract(token, 0, 5)); switch (extTokenType) { - // Operand modifiers, which are used to manipulate the - // value of a source operand during the load operation case DxbcOperandExt::OperandModifier: reg.modifiers = bit::extract(token, 6, 13); break; @@ -247,13 +213,10 @@ namespace dxvk { if (reg.type == DxbcOperandType::Imm32 || reg.type == DxbcOperandType::Imm64) { switch (reg.componentCount) { - // This is commonly used if only one vector - // component is involved in an operation case DxbcComponentCount::Component1: { reg.imm.u32_1 = code.read(); } break; - // Typical four-component vector case DxbcComponentCount::Component4: { reg.imm.u32_4[0] = code.read(); reg.imm.u32_4[1] = code.read(); @@ -272,7 +235,6 @@ namespace dxvk { reg.idxDim = bit::extract(token, 20, 21); for (uint32_t i = 0; i < reg.idxDim; i++) { - // An index can be encoded in various different ways const DxbcOperandIndexRepresentation repr = static_cast( bit::extract(token, 22 + 3 * i, 24 + 3 * i)); diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_defs.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_defs.cpp index 0d193ada97..34effc2d36 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_defs.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_defs.cpp @@ -3,344 +3,273 @@ namespace dxvk { const std::array g_instructionFormats = {{ - /* Add */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* And */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Break */ { 0, DxbcInstClass::ControlFlow }, - /* Breakc */ { 1, DxbcInstClass::ControlFlow, { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Call */ { 1, DxbcInstClass::ControlFlow, { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Callc */ { 2, DxbcInstClass::ControlFlow, { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Case */ { 1, DxbcInstClass::ControlFlow, { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Continue */ { 0, DxbcInstClass::ControlFlow }, - /* Continuec */ { 1, DxbcInstClass::ControlFlow, { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Cut */ { 0, DxbcInstClass::GeometryEmit }, - /* Default */ { 0, DxbcInstClass::ControlFlow }, - /* DerivRtx */ { 2, DxbcInstClass::VectorDeriv, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* DerivRty */ { 2, DxbcInstClass::VectorDeriv, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Discard */ { 1, DxbcInstClass::ControlFlow, { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Div */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Dp2 */ { 3, DxbcInstClass::VectorDot, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Dp3 */ { 3, DxbcInstClass::VectorDot, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Dp4 */ { 3, DxbcInstClass::VectorDot, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Else */ { 0, DxbcInstClass::ControlFlow }, - /* Emit */ { 0, DxbcInstClass::GeometryEmit }, - /* EmitThenCut */ { 0, DxbcInstClass::GeometryEmit }, - /* EndIf */ { 0, DxbcInstClass::ControlFlow }, - /* EndLoop */ { 0, DxbcInstClass::ControlFlow }, - /* EndSwitch */ { 0, DxbcInstClass::ControlFlow }, - /* Eq */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Exp */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Frc */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* FtoI */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* FtoU */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Ge */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* IAdd */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* If */ { 1, DxbcInstClass::ControlFlow, { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* IEq */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* IGe */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* ILt */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* IMad */ { 4, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* IMax */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* IMin */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* IMul */ { 4, DxbcInstClass::VectorImul, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* INe */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* INeg */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* IShl */ { 3, DxbcInstClass::VectorShift, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* IShr */ { 3, DxbcInstClass::VectorShift, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ItoF */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* Label */ { 1, DxbcInstClass::ControlFlow, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, } }, - /* Ld */ { 3, DxbcInstClass::TextureFetch, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* LdMs */ { 4, DxbcInstClass::TextureFetch, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* Log */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Loop */ { 0, DxbcInstClass::ControlFlow }, - /* Lt */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Mad */ { 4, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Min */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Max */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* CustomData */ { 0, DxbcInstClass::CustomData }, - /* Mov */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Movc */ { 4, DxbcInstClass::VectorCmov, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Mul */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Ne */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Nop */ { 0, DxbcInstClass::NoOperation }, - /* Not */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Or */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ResInfo */ { 3, DxbcInstClass::TextureQuery, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Ret */ { 0, DxbcInstClass::ControlFlow }, - /* Retc */ { 1, DxbcInstClass::ControlFlow, { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* RoundNe */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* RoundNi */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* RoundPi */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* RoundZ */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Rsq */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Sample */ { 4, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleC */ { 5, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, @@ -348,7 +277,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleClz */ { 5, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, @@ -356,7 +284,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleL */ { 5, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, @@ -364,7 +291,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleD */ { 6, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, @@ -373,7 +299,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleB */ { 5, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, @@ -381,240 +306,188 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Sqrt */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Switch */ { 1, DxbcInstClass::ControlFlow, { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* SinCos */ { 3, DxbcInstClass::VectorSinCos, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* UDiv */ { 4, DxbcInstClass::VectorIdiv, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ULt */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* UGe */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* UMul */ { 4, DxbcInstClass::VectorImul, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* UMad */ { 4, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* UMax */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* UMin */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* UShr */ { 3, DxbcInstClass::VectorShift, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* UtoF */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Xor */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* DclResource */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclConstantBuffer */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, } }, - /* DclSampler */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, } }, - /* DclIndexRange */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclGsOutputPrimitiveTopology */ { 0, DxbcInstClass::Declaration }, - /* DclGsInputPrimitive */ { 0, DxbcInstClass::Declaration }, - /* DclMaxOutputVertexCount */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclInput */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, } }, - /* DclInputSgv */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclInputSiv */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclInputPs */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, } }, - /* DclInputPsSgv */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclInputPsSiv */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclOutput */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, } }, - /* DclOutputSgv */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclOutputSiv */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclTemps */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclIndexableTemp */ { 3, DxbcInstClass::Declaration, { { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclGlobalFlags */ { 0, DxbcInstClass::Declaration }, - /* Reserved0 */ { 0, DxbcInstClass::Undefined }, - /* Lod */ { 4, DxbcInstClass::TextureQueryLod, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Gather4 */ { 4, DxbcInstClass::TextureGather, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SamplePos */ { 3, DxbcInstClass::TextureQueryMsPos, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* SampleInfo */ { 2, DxbcInstClass::TextureQueryMs, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Reserved1 */ { }, - /* HsDecls */ { 0, DxbcInstClass::HullShaderPhase }, - /* HsControlPointPhase */ { 0, DxbcInstClass::HullShaderPhase }, - /* HsForkPhase */ { 0, DxbcInstClass::HullShaderPhase }, - /* HsJoinPhase */ { 0, DxbcInstClass::HullShaderPhase }, - /* EmitStream */ { 1, DxbcInstClass::GeometryEmit, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, } }, - /* CutStream */ { 1, DxbcInstClass::GeometryEmit, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, } }, - /* EmitThenCutStream */ { 1, DxbcInstClass::GeometryEmit, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, } }, - /* InterfaceCall */ { }, - /* BufInfo */ { 2, DxbcInstClass::BufferQuery, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* DerivRtxCoarse */ { 2, DxbcInstClass::VectorDeriv, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* DerivRtxFine */ { 2, DxbcInstClass::VectorDeriv, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* DerivRtyCoarse */ { 2, DxbcInstClass::VectorDeriv, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* DerivRtyFine */ { 2, DxbcInstClass::VectorDeriv, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Gather4C */ { 5, DxbcInstClass::TextureGather, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, @@ -622,7 +495,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Gather4Po */ { 5, DxbcInstClass::TextureGather, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, @@ -630,7 +502,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Gather4PoC */ { 6, DxbcInstClass::TextureGather, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, @@ -639,60 +510,48 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Rcp */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* F32toF16 */ { 2, DxbcInstClass::ConvertFloat16, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* F16toF32 */ { 2, DxbcInstClass::ConvertFloat16, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* UAddc */ { }, - /* USubb */ { }, - /* CountBits */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* FirstBitHi */ { 2, DxbcInstClass::BitScan, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* FirstBitLo */ { 2, DxbcInstClass::BitScan, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* FirstBitShi */ { 2, DxbcInstClass::BitScan, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* UBfe */ { 4, DxbcInstClass::BitExtract, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* IBfe */ { 4, DxbcInstClass::BitExtract, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* Bfi */ { 5, DxbcInstClass::BitInsert, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, @@ -700,12 +559,10 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* BfRev */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Swapc */ { 5, DxbcInstClass::VectorCmov, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, @@ -713,217 +570,174 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* DclStream */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, } }, - /* DclFunctionBody */ { }, - /* DclFunctionTable */ { }, - /* DclInterface */ { }, - /* DclInputControlPointCount */ { 0, DxbcInstClass::Declaration }, - /* DclOutputControlPointCount */ { 0, DxbcInstClass::Declaration }, - /* DclTessDomain */ { 0, DxbcInstClass::Declaration }, - /* DclTessPartitioning */ { 0, DxbcInstClass::Declaration }, - /* DclTessOutputPrimitive */ { 0, DxbcInstClass::Declaration }, - /* DclHsMaxTessFactor */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::Imm32, DxbcScalarType::Float32 }, } }, - /* DclHsForkPhaseInstanceCount */ { 1, DxbcInstClass::HullShaderInstCnt, { { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclHsJoinPhaseInstanceCount */ { 1, DxbcInstClass::HullShaderInstCnt, { { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclThreadGroup */ { 3, DxbcInstClass::Declaration, { { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclUavTyped */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclUavRaw */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, } }, - /* DclUavStructured */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclThreadGroupSharedMemoryRaw */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclThreadGroupSharedMemoryStructured */ { 3, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* DclResourceRaw */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, } }, - /* DclResourceStructured */ { 2, DxbcInstClass::Declaration, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* LdUavTyped */ { 3, DxbcInstClass::TypedUavLoad, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* StoreUavTyped */ { 3, DxbcInstClass::TypedUavStore, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* LdRaw */ { 3, DxbcInstClass::BufferLoad, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* StoreRaw */ { 3, DxbcInstClass::BufferStore, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* LdStructured */ { 4, DxbcInstClass::BufferLoad, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* StoreStructured */ { 4, DxbcInstClass::BufferStore, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* AtomicAnd */ { 3, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* AtomicOr */ { 3, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* AtomicXor */ { 3, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* AtomicCmpStore */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* AtomicIAdd */ { 3, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* AtomicIMax */ { 3, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* AtomicIMin */ { 3, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* AtomicUMax */ { 3, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* AtomicUMin */ { 3, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicAlloc */ { 2, DxbcInstClass::AtomicCounter, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicConsume */ { 2, DxbcInstClass::AtomicCounter, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicIAdd */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicAnd */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicOr */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicXor */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicExch */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicCmpExch */ { 5, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -931,181 +745,147 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicIMax */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* ImmAtomicIMin */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* ImmAtomicUMax */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ImmAtomicUMin */ { 4, DxbcInstClass::Atomic, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* Sync */ { 0, DxbcInstClass::Barrier }, - /* DAdd */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DMax */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DMin */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DMul */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DEq */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DGe */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DLt */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DNe */ { 3, DxbcInstClass::VectorCmp, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DMov */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DMovc */ { 4, DxbcInstClass::VectorCmov, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DtoF */ { 2, DxbcInstClass::ConvertFloat64, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* FtoD */ { 2, DxbcInstClass::ConvertFloat64, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* EvalSnapped */ { 3, DxbcInstClass::Interpolate, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* EvalSampleIndex */ { 3, DxbcInstClass::Interpolate, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* EvalCentroid */ { 2, DxbcInstClass::Interpolate, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* DclGsInstanceCount */ { 1, DxbcInstClass::Declaration, { { DxbcOperandKind::Imm32, DxbcScalarType::Uint32 }, } }, - /* Abort */ { }, - /* DebugBreak */ { }, - /* ReservedBegin11_1 */ { }, - /* DDiv */ { 3, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DFma */ { 4, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DRcp */ { 2, DxbcInstClass::VectorAlu, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* Msad */ { 4, DxbcInstClass::VectorMsad, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* DtoI */ { 2, DxbcInstClass::ConvertFloat64, { { DxbcOperandKind::DstReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* DtoU */ { 2, DxbcInstClass::ConvertFloat64, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float64 }, } }, - /* ItoD */ { 2, DxbcInstClass::ConvertFloat64, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* UtoD */ { 2, DxbcInstClass::ConvertFloat64, { { DxbcOperandKind::DstReg, DxbcScalarType::Float64 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* ReservedBegin11_2 */ { }, - /* Gather4S */ { 5, DxbcInstClass::TextureGather, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1113,7 +893,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Gather4CS */ { 6, DxbcInstClass::TextureGather, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1122,7 +901,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Gather4PoS */ { 6, DxbcInstClass::TextureGather, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1131,7 +909,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* Gather4PoCS */ { 7, DxbcInstClass::TextureGather, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1141,14 +918,12 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* LdS */ { 4, DxbcInstClass::TextureFetch, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* LdMsS */ { 5, DxbcInstClass::TextureFetch, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1156,21 +931,18 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, } }, - /* LdUavTypedS */ { 4, DxbcInstClass::TypedUavLoad, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* LdRawS */ { 4, DxbcInstClass::BufferLoad, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* LdStructuredS */ { 5, DxbcInstClass::BufferLoad, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1178,7 +950,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, } }, - /* SampleLS */ { 6, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1187,7 +958,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleClzS */ { 6, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1196,7 +966,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleClampS */ { 6, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1205,7 +974,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleBClampS */ { 7, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1215,7 +983,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleDClampS */ { 8, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1226,7 +993,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* SampleCClampS */ { 7, DxbcInstClass::TextureSample, { { DxbcOperandKind::DstReg, DxbcScalarType::Float32 }, { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, @@ -1236,7 +1002,6 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, - /* CheckAccessFullyMapped */ { 2, DxbcInstClass::SparseCheckAccess, { { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 }, diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_header.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_header.cpp index 9b5f698957..c73eef378c 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_header.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_header.cpp @@ -3,21 +3,18 @@ namespace dxvk { DxbcHeader::DxbcHeader(DxbcReader& reader) { - // FourCC at the start of the file, must be 'DXBC' DxbcTag fourcc = reader.readTag(); if (fourcc != "DXBC") throw DxvkError("DxbcHeader::DxbcHeader: Invalid fourcc, expected 'DXBC'"); - // Stuff we don't actually need to store - reader.skip(4 * sizeof(uint32_t)); // Check sum - reader.skip(1 * sizeof(uint32_t)); // Constant 1 - reader.skip(1 * sizeof(uint32_t)); // Bytecode length + + reader.skip(4 * sizeof(uint32_t)); + reader.skip(1 * sizeof(uint32_t)); + reader.skip(1 * sizeof(uint32_t)); - // Number of chunks in the file uint32_t chunkCount = reader.readu32(); - // Chunk offsets are stored immediately after for (uint32_t i = 0; i < chunkCount; i++) m_chunkOffsets.push_back(reader.readu32()); } diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_module.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_module.cpp index 573d503b04..c2ff65673f 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_module.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_module.cpp @@ -8,13 +8,9 @@ namespace dxvk { : m_header(reader) { for (uint32_t i = 0; i < m_header.numChunks(); i++) { - // The chunk tag is stored at the beginning of each chunk auto chunkReader = reader.clone(m_header.chunkOffset(i)); auto tag = chunkReader.readTag(); - // The chunk size follows right after the four-character - // code. This does not include the eight bytes that are - // consumed by the FourCC and chunk length entry. auto chunkLength = chunkReader.readu32(); chunkReader = chunkReader.clone(8); diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_names.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_names.cpp index c6a00eccca..ce9dfbd632 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_names.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_names.cpp @@ -442,4 +442,4 @@ namespace dxvk { } -} //namespace dxvk +} diff --git a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_util.cpp b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_util.cpp index 3d885fc9c5..e1c1c4418c 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_util.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/dxbc/dxbc_util.cpp @@ -4,14 +4,14 @@ namespace dxvk { uint32_t primitiveVertexCount(DxbcPrimitive primitive) { static const std::array s_vertexCounts = { - 0, // Undefined - 1, // Point - 2, // Line - 3, // Triangle - 0, // Undefined - 0, // Undefined - 4, // Line with adjacency - 6, // Triangle with adjacency + 0, + 1, + 2, + 3, + 0, + 0, + 4, + 6, }; if (primitive >= DxbcPrimitive::Patch1) { diff --git a/app/src/main/cpp/thirdparty/dxbc/src/spirv/spirv_code_buffer.cpp b/app/src/main/cpp/thirdparty/dxbc/src/spirv/spirv_code_buffer.cpp index f8166df51c..456c46d9e3 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/spirv/spirv_code_buffer.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/spirv/spirv_code_buffer.cpp @@ -130,7 +130,6 @@ namespace dxvk { } } - // Commit current word this->putWord(word); } @@ -138,9 +137,9 @@ namespace dxvk { void SpirvCodeBuffer::putHeader(uint32_t version, uint32_t boundIds) { this->putWord(spv::MagicNumber); this->putWord(version); - this->putWord(0); // Generator + this->putWord(0); this->putWord(boundIds); - this->putWord(0); // Schema + this->putWord(0); } @@ -152,7 +151,6 @@ namespace dxvk { uint32_t SpirvCodeBuffer::strLen(const char* str) { - // Null-termination plus padding return (std::strlen(str) + 4) / 4; } diff --git a/app/src/main/cpp/thirdparty/dxbc/src/spirv/spirv_module.cpp b/app/src/main/cpp/thirdparty/dxbc/src/spirv/spirv_module.cpp index aad1b39ec3..f37d93b241 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/spirv/spirv_module.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/spirv/spirv_module.cpp @@ -29,9 +29,6 @@ namespace dxvk { result.append(m_typeConstDefs); result.append(m_variables); - // Perform some crude dead code elimination. In some cases, our compilers - // may emit invalid code, such as an unreachable block branching to a loop's - // continue block, but those cases cannot be reasonably detected up-front. std::unordered_set reachableBlocks; std::unordered_set mergeBlocks; @@ -78,8 +75,6 @@ namespace dxvk { void SpirvModule::enableCapability( spv::Capability capability) { - // Scan the generated instructions to check - // whether we already enabled the capability. if (!hasCapability(capability)) { m_capabilities.putIns (spv::OpCapability, 2); m_capabilities.putWord(capability); @@ -416,7 +411,6 @@ namespace dxvk { std::array args = { value, value, value, value }; - // Can't make a scalar composite. if (count == 1) return args[0]; @@ -434,7 +428,6 @@ namespace dxvk { std::array args = { value, value, value, value }; - // Can't make a scalar composite. if (count == 1) return args[0]; @@ -452,7 +445,6 @@ namespace dxvk { std::array args = { value, value, value, value }; - // Can't make a scalar composite. if (count == 1) return args[0]; @@ -470,7 +462,6 @@ namespace dxvk { std::array args = { value, value, value, value }; - // Can't make a scalar composite. if (count == 1) return args[0]; @@ -3765,7 +3756,6 @@ namespace dxvk { uint32_t SpirvModule::opSinCos( uint32_t x, bool useBuiltIn) { - // We only operate on 32-bit floats here uint32_t floatType = defFloatType(32); uint32_t resultType = defVectorType(floatType, 2u); @@ -3777,7 +3767,6 @@ namespace dxvk { uint32_t sintType = defIntType(32, true); uint32_t boolType = defBoolType(); - // Normalize input to multiple of pi/4 uint32_t xNorm = opFMul(floatType, opFAbs(floatType, x), constf32(4.0 / pi)); uint32_t xTrunc = opTrunc(floatType, xNorm); @@ -3785,11 +3774,9 @@ namespace dxvk { uint32_t xInt = opConvertFtoU(uintType, xTrunc); - // Mirror input along x axis as necessary uint32_t mirror = opINotEqual(boolType, opBitwiseAnd(uintType, xInt, constu32(1u)), constu32(0u)); xFract = opSelect(floatType, mirror, opFSub(floatType, constf32(1.0f), xFract), xFract); - // Compute taylor series for fractional part uint32_t xFract_2 = opFMul(floatType, xFract, xFract); uint32_t xFract_4 = opFMul(floatType, xFract_2, xFract_2); uint32_t xFract_6 = opFMul(floatType, xFract_4, xFract_2); @@ -3809,23 +3796,18 @@ namespace dxvk { taylor = opFMul(floatType, taylor, xFract); decorate(taylor, spv::DecorationNoContraction); - // Compute co-function based on sin^2 + cos^2 = 1 uint32_t coFunc = opSqrt(floatType, opFSub(floatType, constf32(1.0f), opFMul(floatType, taylor, taylor))); - // Determine whether the taylor series was used for sine or cosine and assign the correct result uint32_t funcIsSin = opIEqual(boolType, opBitwiseAnd(uintType, opIAdd(uintType, xInt, constu32(1u)), constu32(2u)), constu32(0u)); uint32_t sin = opSelect(floatType, funcIsSin, taylor, coFunc); uint32_t cos = opSelect(floatType, funcIsSin, coFunc, taylor); - // Determine whether sine is negative. Interpret the input as a - // signed integer in order to propagate signed zeroes properly. uint32_t inputNeg = opSLessThan(boolType, opBitcast(sintType, x), consti32(0)); uint32_t sinNeg = opINotEqual(boolType, opBitwiseAnd(uintType, xInt, constu32(4u)), constu32(0u)); sinNeg = opLogicalNotEqual(boolType, sinNeg, inputNeg); - // Determine whether cosine is negative uint32_t cosNeg = opINotEqual(boolType, opBitwiseAnd(uintType, opIAdd(uintType, xInt, constu32(2u)), constu32(4u)), constu32(0u)); sin = opSelect(floatType, sinNeg, opFNegate(floatType, sin), sin); @@ -3841,9 +3823,6 @@ namespace dxvk { spv::Op op, uint32_t argCount, const uint32_t* argIds) { - // Since the type info is stored in the code buffer, - // we can use the code buffer to look up type IDs as - // well. Result IDs are always stored as argument 1. for (auto ins : m_typeConstDefs) { bool match = ins.opCode() == op && ins.length() == 2 + argCount; @@ -3855,7 +3834,6 @@ namespace dxvk { return ins.arg(1); } - // Type not yet declared, create a new one. uint32_t resultId = this->allocateId(); m_typeConstDefs.putIns (op, 2 + argCount); m_typeConstDefs.putWord(resultId); @@ -3871,7 +3849,6 @@ namespace dxvk { uint32_t typeId, uint32_t argCount, const uint32_t* argIds) { - // Avoid declaring constants multiple times for (auto ins : m_typeConstDefs) { bool match = ins.opCode() == op && ins.length() == 3 + argCount @@ -3889,7 +3866,6 @@ namespace dxvk { return id; } - // Constant not yet declared, make a new one uint32_t resultId = this->allocateId(); m_typeConstDefs.putIns (op, 3 + argCount); m_typeConstDefs.putWord(typeId); @@ -3940,7 +3916,6 @@ namespace dxvk { uint32_t SpirvModule::getImageOperandWordCount(const SpirvImageOperands& op) const { - // Each flag may add one or more operands const uint32_t result = ((op.flags & spv::ImageOperandsBiasMask) ? 1 : 0) + ((op.flags & spv::ImageOperandsLodMask) ? 1 : 0) @@ -3953,7 +3928,6 @@ namespace dxvk { + ((op.flags & spv::ImageOperandsMakeTexelAvailableMask) ? 1 : 0) + ((op.flags & spv::ImageOperandsMakeTexelVisibleMask) ? 1 : 0); - // Add a DWORD for the operand mask if it is non-zero return op.flags ? result + 1 : 0; } @@ -4003,7 +3977,6 @@ namespace dxvk { return sclass == spv::StorageClassInput || sclass == spv::StorageClassOutput; } else { - // All global variables need to be declared return sclass != spv::StorageClassFunction; } } @@ -4055,10 +4028,6 @@ namespace dxvk { case spv::OpLoopMerge: { mergeBlocks.insert(ins.arg(1)); - // It is possible for the continue block to be unreachable in - // practice, but we still need to emit it if we are not going - // to eliminate this loop. Since the current block dominates - // the loop, use it to keep the continue block intact. branches.insert({ blockId, ins.arg(2) }); } break; diff --git a/app/src/main/cpp/thirdparty/dxbc/src/util/util_string.cpp b/app/src/main/cpp/thirdparty/dxbc/src/util/util_string.cpp index 9bb4b61149..83403e5367 100644 --- a/app/src/main/cpp/thirdparty/dxbc/src/util/util_string.cpp +++ b/app/src/main/cpp/thirdparty/dxbc/src/util/util_string.cpp @@ -9,20 +9,15 @@ namespace dxvk::str { uint32_t first = begin[0]; if (likely(first < 0x80)) { - // Basic ASCII character ch = uint32_t(first); return begin + 1; } else if (unlikely(first < 0xC0)) { - // Character starts with a continuation byte, - // just skip until we find the next valid prefix while ((begin < end) && (((*begin) & 0xC0) == 0x80)) begin += 1; ch = uint32_t('?'); return begin; } else { - // The number of leading 1 bits in the first byte - // determines the length of this character size_t length = bit::lzcnt((~first) << 24); if (unlikely(begin + length > end)) { @@ -43,7 +38,6 @@ namespace dxvk::str { | ((uint32_t(begin[2]) & 0x3F) << 6) | ((uint32_t(begin[3]) & 0x3F)); } else { - // Invalid prefix ch = uint32_t('?'); } @@ -71,7 +65,6 @@ namespace dxvk::str { + ((uint32_t(begin[1]) & 0x3FF)); return begin + 2; } else if (unlikely(first < 0xE000)) { - // Stray low surrogate ch = uint32_t('?'); return begin + 1; } else { @@ -137,7 +130,6 @@ namespace dxvk::str { return 4; } else { - // Invalid code point for UTF-8 return 0; } } @@ -157,8 +149,6 @@ namespace dxvk::str { return 1; } else if (ch < 0xE000) { - // Private use code points, - // we can't encode these return 0; } else if (ch < 0x10000) { if (begin) { @@ -181,7 +171,6 @@ namespace dxvk::str { return 2; } else { - // Invalid code point return 0; } } diff --git a/app/src/main/cpp/viture/display_modes.h b/app/src/main/cpp/viture/display_modes.h new file mode 100644 index 0000000000..3a78e03aee --- /dev/null +++ b/app/src/main/cpp/viture/display_modes.h @@ -0,0 +1,36 @@ +#pragma once + +// Our controller uses the standard display-mode vocabulary, even for Beast. +// Native mode reuses some numbers with different meanings; never pass them through. +namespace droiddeck::viture { +constexpr int to_native_mode(int standard) { + switch (standard) { + case 0x31: return 0x31; // 1080p 60 + case 0x33: return 0x32; // 1080p 90 + case 0x34: return 0x33; // 1080p 120 + case 0x32: return 0x37; // 1080p SBS 60 + case 0x35: return 0x38; // 1080p SBS 90 + case 0x41: return 0x34; // 1200p 60 + case 0x43: return 0x35; // 1200p 90 + case 0x44: return 0x36; // 1200p 120 + case 0x42: return 0x3a; // 1200p SBS 60 + case 0x45: return 0x3b; // 1200p SBS 90 + default: return -4; + } +} +constexpr int from_native_mode(int native) { + switch (native) { + case 0x31: return 0x31; + case 0x32: return 0x33; + case 0x33: return 0x34; + case 0x37: return 0x32; + case 0x38: return 0x35; + case 0x34: return 0x41; + case 0x35: return 0x43; + case 0x36: return 0x44; + case 0x3a: return 0x42; + case 0x3b: return 0x45; + default: return -4; // Ultrawide is not stereo. + } +} +} diff --git a/app/src/main/cpp/viture/mjpeg_payload.h b/app/src/main/cpp/viture/mjpeg_payload.h new file mode 100644 index 0000000000..a451a4eeea --- /dev/null +++ b/app/src/main/cpp/viture/mjpeg_payload.h @@ -0,0 +1,11 @@ +#pragma once +#include +#include + +inline std::size_t mjpeg_payload_size(const uint8_t* bytes, std::size_t size) { + if (!bytes || size < 4 || size > 4*1024*1024 || bytes[0] != 0xff || bytes[1] != 0xd8) return 0; + std::size_t end = size; + // Luma Ultra UVC frames can pad the JPEG to an eight-byte boundary with zeros. + while (end > 4 && size-end < 7 && bytes[end-1] == 0) --end; + return bytes[end-2] == 0xff && bytes[end-1] == 0xd9 ? end : 0; +} diff --git a/app/src/main/cpp/viture/sdk_bridge.cpp b/app/src/main/cpp/viture/sdk_bridge.cpp new file mode 100644 index 0000000000..053c283358 --- /dev/null +++ b/app/src/main/cpp/viture/sdk_bridge.cpp @@ -0,0 +1,556 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "viture_glasses_provider.h" +#include "viture_device.h" +#include "viture_device_carina.h" +#include "viture_camera_provider.h" +#include "viture_protocol_public.h" +#include "viture_result.h" +#include "viture_version.h" +#include "display_modes.h" +#include "stereo_frame_gate.h" + +namespace { +// SDK callbacks have no user-data parameter. Only one provider may exist at a time. +std::mutex api_mutex; +std::mutex pose_mutex; +std::array latest_pose{}; +int64_t latest_time = 0; +bool accepting_pose = false; +bool accepting_state = false; +std::array state_values{}; +unsigned state_pending = 0; + +void on_state(int id, int value) { + std::lock_guard lock(pose_mutex); + if (!accepting_state || id < 0 || id >= int(state_values.size())) return; + state_values[id] = value; + state_pending |= 1u << id; +} + +void clear_state(bool accept) { + std::lock_guard lock(pose_mutex); + accepting_state = accept; + state_pending = 0; +} + +int64_t now_ns() { + timespec ts{}; + clock_gettime(CLOCK_BOOTTIME, &ts); + return int64_t(ts.tv_sec) * 1000000000LL + ts.tv_nsec; +} + +void on_pose(float* data, uint64_t) { + if (!data) return; + std::lock_guard lock(pose_mutex); + if (!accepting_pose) return; + std::copy_n(data + 3, 4, latest_pose.begin()); + // SDK device ticks are not Android's elapsed-realtime clock. + latest_time = now_ns(); +} + +void clear_pose(bool accept) { + std::lock_guard lock(pose_mutex); + accepting_pose = accept; + latest_time = 0; +} + +int64_t monotonic_ns() { + timespec ts{}; clock_gettime(CLOCK_MONOTONIC, &ts); + return int64_t(ts.tv_sec) * 1000000000LL + ts.tv_nsec; +} +struct CameraPose { double time; std::array pose; }; +std::mutex camera_mutex; +std::deque camera_poses; +std::vector camera_left, camera_right; +bool camera_accepting = false, camera_wanted = false; +int camera_width = 0, camera_height = 0; +uint64_t camera_sequence = 0, camera_consumed = 0; +StereoFrameGate camera_gate; +uint64_t camera_input_sequence = 0; +int64_t camera_receipt = 0; +int64_t camera_pose_receipt = 0; +double camera_source = 0; +const CameraPose *matched_camera_pose(double source) { + const CameraPose *best = nullptr; + double distance = 0.005; + for (const auto &p : camera_poses) if (std::abs(p.time-source) < distance) { + best = &p; distance = std::abs(p.time-source); + } + return best; +} +void on_carina_pose(float *pose, double stamp) { + if (!pose || !std::isfinite(stamp)) return; + std::lock_guard lock(camera_mutex); + if (!camera_accepting) return; + camera_pose_receipt = monotonic_ns(); + CameraPose p{stamp, {}}; std::copy_n(pose, 7, p.pose.begin()); + camera_poses.push_back(p); + while (camera_poses.size() > 64) camera_poses.pop_front(); +} +void on_camera(char *left, char *right, char *, char *, double stamp, int width, int height) { + if (!left || !right || width <= 0 || height <= 0 || width > 2048 || height > 2048 || !std::isfinite(stamp)) return; + const auto received = monotonic_ns(); + std::lock_guard lock(camera_mutex); + if (!camera_accepting || !camera_wanted) return; + if (!camera_gate.Accept(stamp)) return; + const size_t size = size_t(width) * height; + camera_left.resize(size); camera_right.resize(size); + memcpy(camera_left.data(), left, size); memcpy(camera_right.data(), right, size); + camera_width = width; camera_height = height; camera_source = stamp; camera_receipt = received; + camera_input_sequence = camera_gate.received; + ++camera_sequence; +} +void clear_camera(bool enabled) { + std::lock_guard lock(camera_mutex); + camera_accepting = enabled; camera_wanted = false; + camera_poses.clear(); camera_left.clear(); camera_right.clear(); + camera_sequence = camera_consumed = 0; + camera_gate = {}; camera_input_sequence = 0; + camera_pose_receipt = 0; +} + +struct Session { + XRDeviceProviderHandle device = nullptr; + int pid = 0; + int type = -1; + bool initialized = false; + bool started = false; + bool tracking = false; + bool native_dof = false; + bool switched_native = false; + int original_bypass_display = -1; + int saved_dof = -1; + int64_t consumed_time = 0; + jlong token = 0; + int spatial_status = 1; +}; +std::unique_ptr session; +jlong next_token = 0; + +void report(const char* step, int rc) { + if (rc < 0) __android_log_print(ANDROID_LOG_WARN, "VitureSdk", "%s: %d", step, rc); +} + +int suspend_native_dof(Session& s) { + if (!s.native_dof) return 0; + int mode = xr_device_provider_native_get_mode(s.device); + if (mode < 0) return mode; + if (mode != 1) return 0; + if (s.saved_dof < 0) { + int dof = xr_device_provider_native_get_dof(s.device); + if (dof < 0) return dof; + s.saved_dof = dof; + } + return xr_device_provider_native_set_dof(s.device, VITURE_NATIVE_DOF_0); +} + +void restore_native_dof(Session& s) { + if (s.saved_dof >= 0 && xr_device_provider_native_get_mode(s.device) == 1) { + report("restore native DOF", xr_device_provider_native_set_dof(s.device, s.saved_dof)); + } + s.saved_dof = -1; +} + +int tracking(Session& s, bool enabled) { + if (s.tracking == enabled) return 0; + if (!enabled) { + clear_pose(false); + int rc = s.type == XR_DEVICE_TYPE_VITURE_CARINA ? 0 : + xr_device_provider_close_imu(s.device, VITURE_IMU_MODE_POSE); + s.tracking = false; + restore_native_dof(s); + return rc; + } + int rc = suspend_native_dof(s); + if (rc < 0) return rc; + clear_pose(true); + s.consumed_time = 0; + if (s.type != XR_DEVICE_TYPE_VITURE_CARINA) { + int frequency = VITURE_IMU_FREQUENCY_MEDIUM_HIGH; + while (frequency >= VITURE_IMU_FREQUENCY_LOW && + !xr_device_provider_is_product_support_imu_frequency(s.pid, VITURE_IMU_MODE_POSE, frequency)) --frequency; + rc = frequency < 0 ? VITURE_GLASSES_ERROR_NOT_SUPPORTED : + xr_device_provider_open_imu(s.device, VITURE_IMU_MODE_POSE, frequency); + } + if (rc == 0) s.tracking = true; + else { clear_pose(false); restore_native_dof(s); } + return rc; +} + +void destroy(Session& s) { + clear_camera(false); + clear_pose(false); + clear_state(false); + if (s.device) { + if (s.tracking) report("close tracking", tracking(s, false)); + if (s.switched_native && s.original_bypass_display >= 0) { + int rc = xr_device_provider_native_set_mode(s.device, 0); + if (rc == 0) rc = xr_device_provider_set_display_mode(s.device, s.original_bypass_display); + report("restore bypass mode", rc); + } + if (s.started) report("stop", xr_device_provider_stop(s.device)); + if (s.initialized) report("shutdown", xr_device_provider_shutdown(s.device)); + xr_device_provider_destroy(s.device); + s.device = nullptr; + } +} + +int get_display(Session& s) { + if (s.native_dof) { + const int mode = xr_device_provider_native_get_mode(s.device); + if (mode < 0) return mode; + if (mode == 1) { + const int value = xr_device_provider_native_get_display_mode(s.device); + return value < 0 ? value : droiddeck::viture::from_native_mode(value); + } + } + return xr_device_provider_get_display_mode(s.device); +} + +int set_display(Session& s, int standard) { + if (!s.native_dof) return xr_device_provider_set_display_mode(s.device, standard); + int mode = xr_device_provider_native_get_mode(s.device); + if (mode < 0) return mode; + if (mode == 0) { + int rc = xr_device_provider_set_display_mode(s.device, standard); + if (rc != VITURE_GLASSES_ERROR_NOT_SUPPORTED) return rc; + // Older Beast firmware exposes fewer bypass modes. Fall back to its + // separate native table only when the SDK explicitly rejects the mode. + } + const int native = droiddeck::viture::to_native_mode(standard); + if (native < 0) return native; + if (mode == 0) { + if (!s.switched_native) { + s.original_bypass_display = xr_device_provider_get_display_mode(s.device); + if (s.original_bypass_display < 0) return s.original_bypass_display; + } + int rc = xr_device_provider_native_set_mode(s.device, 1); + if (rc < 0) return rc; + s.switched_native = true; + } + int rc = xr_device_provider_native_set_display_mode(s.device, native); + if (rc == 0 && s.tracking) rc = suspend_native_dof(s); + if (rc < 0 && mode == 0) { + restore_native_dof(s); + int rollback = xr_device_provider_native_set_mode(s.device, 0); + if (rollback == 0) rollback = xr_device_provider_set_display_mode(s.device, s.original_bypass_display); + report("rollback display mode", rollback); + if (rollback == 0) s.switched_native = false; + } + return rc; +} +} + +#define JNI_METHOD(name) Java_com_droiddeck_launcher_glasses_VitureSdk_##name +extern "C" JNIEXPORT jboolean JNICALL JNI_METHOD(nativeAvailable)(JNIEnv*, jobject) { + __android_log_print(ANDROID_LOG_INFO, "VitureSdk", "SDK %s", GetVersionString()); + return JNI_TRUE; +} + +extern "C" JNIEXPORT jstring JNICALL JNI_METHOD(nativeMarketName)(JNIEnv* env, jobject, jint pid) { + std::lock_guard lock(api_mutex); + if (!xr_device_provider_is_product_id_valid(pid)) return nullptr; + char name[64]{}; + int length = sizeof(name) - 1; + if (xr_device_provider_get_market_name(pid, name, &length) != 0) return nullptr; + name[sizeof(name) - 1] = 0; + return env->NewStringUTF(name); +} + +extern "C" JNIEXPORT jlong JNICALL JNI_METHOD(nativeOpen)(JNIEnv* env, jobject, jint pid, jint fd, jstring cache, jboolean spatial) { + std::lock_guard lock(api_mutex); + if (session || fd < 0 || !cache || !xr_device_provider_is_product_id_valid(pid)) return 0; + auto s = std::make_unique(); + s->pid = pid; + s->device = xr_device_provider_create(pid, fd); + if (!s->device) return 0; + s->type = xr_device_provider_get_device_type(s->device); + s->native_dof = xr_device_provider_is_product_support_native_dof(pid) == 1; + int rc = s->type < 0 ? s->type : 0; + if (rc == 0) { + clear_state(true); + rc = xr_device_provider_register_state_callback(s->device, on_state); + } + if (rc == 0) { + rc = s->type == XR_DEVICE_TYPE_VITURE_CARINA ? + xr_device_provider_set_dof_type_carina(s->device, spatial ? 1 : 0) : + xr_device_provider_register_imu_pose_callback(s->device, on_pose); + } + if (rc == 0) { + const char* directory = env->GetStringUTFChars(cache, nullptr); + if (!directory) { destroy(*s); return 0; } + rc = xr_device_provider_initialize(s->device, nullptr, directory); + env->ReleaseStringUTFChars(cache, directory); + s->initialized = rc == 0; + } + if (rc == 0 && s->type == XR_DEVICE_TYPE_VITURE_CARINA && spatial) { + clear_camera(true); + rc = xr_device_provider_register_callbacks_carina(s->device, on_carina_pose, nullptr, nullptr, on_camera); + } + if (rc == 0) { + rc = xr_device_provider_start(s->device); + s->started = rc == 0; + } + if (rc != 0) { report("initialize/start", rc); destroy(*s); return 0; } + s->token = ++next_token; + session = std::move(s); + return session->token; +} + +extern "C" JNIEXPORT jint JNICALL JNI_METHOD(nativeType)(JNIEnv*, jobject, jlong token) { + std::lock_guard lock(api_mutex); + return session && session->token == token ? session->type : -1; +} + +extern "C" JNIEXPORT jint JNICALL JNI_METHOD(nativeTracking)(JNIEnv*, jobject, jlong token, jboolean enabled) { + std::lock_guard lock(api_mutex); + return session && session->token == token ? tracking(*session, enabled) : -1; +} + +extern "C" JNIEXPORT jint JNICALL JNI_METHOD(nativeCommand)(JNIEnv*, jobject, jlong token, jint command, jint value) { + std::lock_guard lock(api_mutex); + if (!session || session->token != token) return -1; + auto& s = *session; + switch (command) { + case 1: return get_display(s); + case 2: return set_display(s, value); + case 3: return xr_device_provider_get_brightness_level(s.device); + case 4: return xr_device_provider_set_brightness_level(s.device, value); + case 5: return xr_device_provider_get_volume_level(s.device); + case 6: return xr_device_provider_set_volume_level(s.device, value); + case 7: return xr_device_provider_set_film_mode(s.device, value ? 1.0f : 0.0f); + default: return VITURE_GLASSES_ERROR_NOT_SUPPORTED; + } +} + +extern "C" JNIEXPORT jlong JNICALL JNI_METHOD(nativePose)(JNIEnv* env, jobject, jlong token, jfloatArray output) { + std::lock_guard lock(api_mutex); + if (!session || session->token != token || !output || env->GetArrayLength(output) != 4) return -1; + auto& s = *session; + if (!s.tracking) return 0; + if (s.type == XR_DEVICE_TYPE_VITURE_CARINA) { + float pose[7]{}; + int status = 1; + int rc = xr_device_provider_get_gl_pose_carina(s.device, pose, 0.0, &status); + if (rc < 0) return rc; + if (status != 0) return 0; + env->SetFloatArrayRegion(output, 0, 4, pose + 3); + return now_ns(); + } + std::lock_guard pose_lock(pose_mutex); + if (!latest_time || latest_time == s.consumed_time) return 0; + env->SetFloatArrayRegion(output, 0, 4, latest_pose.data()); + s.consumed_time = latest_time; + return latest_time; +} + +extern "C" JNIEXPORT jint JNICALL JNI_METHOD(nativeNextState)(JNIEnv* env, jobject, jlong token, jintArray output) { + std::lock_guard lock(api_mutex); + if (!session || session->token != token || !output || env->GetArrayLength(output) != 2) return -1; + std::lock_guard state_lock(pose_mutex); + for (int id = 0; id < int(state_values.size()); ++id) { + if (!(state_pending & (1u << id))) continue; + state_pending &= ~(1u << id); + const jint value[] = {id, state_values[id]}; + env->SetIntArrayRegion(output, 0, 2, value); + return 1; + } + return 0; +} + +extern "C" JNIEXPORT void JNICALL JNI_METHOD(nativeClose)(JNIEnv*, jobject, jlong token) { + std::lock_guard lock(api_mutex); + if (session && session->token == token) { destroy(*session); session.reset(); } +} + +extern "C" JNIEXPORT jlong JNICALL JNI_METHOD(nativeSpatialPose)(JNIEnv* env, jobject, jlong token, + jfloatArray output, jintArray state) { + std::lock_guard lock(api_mutex); + if (!session || session->token != token || !session->tracking || session->type != XR_DEVICE_TYPE_VITURE_CARINA || + !output || !state || env->GetArrayLength(output) != 7 || env->GetArrayLength(state) != 1) return 0; + float pose[7]{}; int status = 1; + int rc = xr_device_provider_get_gl_pose_carina(session->device, pose, 0.0, &status); + session->spatial_status = rc == 0 ? status : rc; + jint valid = rc == 0 ? status : rc; + if (valid == 0) { + std::lock_guard lock(camera_mutex); + if (monotonic_ns()-camera_pose_receipt > 100000000LL) valid = 1; + } + env->SetIntArrayRegion(state, 0, 1, &valid); + env->SetFloatArrayRegion(output, 0, 7, pose); + return monotonic_ns(); +} +extern "C" JNIEXPORT void JNICALL JNI_METHOD(nativeCapture)(JNIEnv*, jobject, jlong token, jboolean wanted, jint ratePermille) { + std::lock_guard api(api_mutex); + if (!session || session->token != token) return; + std::lock_guard lock(camera_mutex); + camera_wanted = wanted; + camera_gate.SetRatePermille(wanted ? ratePermille : 1000); + if (!wanted) camera_consumed = camera_sequence; +} +extern "C" JNIEXPORT jstring JNICALL JNI_METHOD(nativeFirmware)(JNIEnv* env, jobject, jlong token) { + std::lock_guard api(api_mutex); + if (!session || session->token != token) return nullptr; + char value[256]{}; int length = 255; + if (xr_device_provider_get_glasses_version(session->device, value, &length) != 0) return nullptr; + value[255] = 0; + return env->NewStringUTF(value); +} +extern "C" JNIEXPORT jbyteArray JNICALL JNI_METHOD(nativeSerialHash)(JNIEnv* env, jobject, jlong token) { + std::lock_guard api(api_mutex); + if (!session || session->token != token) return nullptr; + uint8_t hash[32]{}; + const int rc = xr_device_provider_get_sn_hash(session->device, hash); + if (rc != 0) { report("read device identity", rc); return nullptr; } + auto result = env->NewByteArray(32); + if (result) env->SetByteArrayRegion(result, 0, 32, reinterpret_cast(hash)); + return result; +} +extern "C" JNIEXPORT jdoubleArray JNICALL JNI_METHOD(nativeSpatialDiagnostics)(JNIEnv* env, jobject, jlong token) { + std::lock_guard api(api_mutex); + if (!session || session->token != token) return nullptr; + std::lock_guard lock(camera_mutex); + double values[3] = {double(session->spatial_status), camera_pose_receipt ? (monotonic_ns()-camera_pose_receipt)/1e6 : -1.0, + camera_poses.empty() ? -1.0 : (camera_poses.back().time-camera_source)*1000.0}; + auto result=env->NewDoubleArray(3); + if(result)env->SetDoubleArrayRegion(result,0,3,values); + return result; +} +extern "C" JNIEXPORT jlong JNICALL JNI_METHOD(nativeStereo)(JNIEnv* env, jobject, jlong token, + jobject left, jobject right, jdoubleArray metadata, jfloatArray head, jboolean waitForPose) { + std::lock_guard api(api_mutex); + if (!session || session->token != token || !left || !right || !metadata || !head || + env->GetArrayLength(metadata) != 9 || env->GetArrayLength(head) != 7) return 0; + std::lock_guard lock(camera_mutex); + if (!camera_wanted || camera_sequence == camera_consumed || camera_left.empty()) return 0; + const auto size = camera_left.size(); + if (env->GetDirectBufferCapacity(left) < jlong(size) || env->GetDirectBufferCapacity(right) < jlong(size)) return -1; + auto l = env->GetDirectBufferAddress(left), r = env->GetDirectBufferAddress(right); + if (!l || !r) return -1; + const CameraPose *best = matched_camera_pose(camera_source); + if (waitForPose && !best && monotonic_ns()-camera_receipt < 35000000LL) return 0; + memcpy(l, camera_left.data(), size); memcpy(r, camera_right.data(), size); + double meta[9] = {double(camera_width), double(camera_height), camera_source, double(camera_receipt), + double(token), double(camera_sequence), best ? 1.0 : 0.0, + double(camera_input_sequence), double(camera_gate.skipped)}; + env->SetDoubleArrayRegion(metadata, 0, 9, meta); + if (best) env->SetFloatArrayRegion(head, 0, 7, best->pose.data()); + camera_consumed = camera_sequence; + return jlong(camera_sequence); +} +extern "C" JNIEXPORT jboolean JNICALL JNI_METHOD(nativeCameraSynchronized)(JNIEnv*, jobject, jlong token, jdouble source) { + std::lock_guard api(api_mutex); + if (!session || session->token != token || !std::isfinite(source)) return JNI_FALSE; + std::lock_guard lock(camera_mutex); + return camera_accepting && matched_camera_pose(source) != nullptr; +} + +namespace { +struct RgbUsbLog { + int savedStderr; + bool hadLevel; + std::string oldLevel; + explicit RgbUsbLog(int fd) : savedStderr(dup(STDERR_FILENO)), + hadLevel(getenv("LIBUSB_DEBUG") != nullptr), oldLevel(hadLevel ? getenv("LIBUSB_DEBUG") : "") { + fflush(stderr); + if (savedStderr >= 0) dup2(fd, STDERR_FILENO); + setenv("LIBUSB_DEBUG", "4", 1); + } + ~RgbUsbLog() { + fflush(stderr); + if (savedStderr >= 0) { dup2(savedStderr, STDERR_FILENO); close(savedStderr); } + if (hadLevel) setenv("LIBUSB_DEBUG", oldLevel.c_str(), 1); else unsetenv("LIBUSB_DEBUG"); + } +}; + +void rgb_usb_state(int fd, const char* stage) { + uint8_t alternate = 0; + usbdevfs_ctrltransfer request{}; + request.bRequestType=0x81; request.bRequest=0x0a; request.wIndex=1; + request.wLength=1; request.timeout=200; request.data=&alternate; + int result=ioctl(fd, USBDEVFS_CONTROL, &request); + fprintf(stderr,"RGB %s GET_INTERFACE result=%d errno=%d alternate=%u\n",stage,result,result<0 ? errno : 0,alternate); + for (int selector : {1, 2}) { + uint8_t size[2]{}; + request.bRequestType=0xa1; request.bRequest=0x85; request.wValue=selector << 8; + request.wLength=2; request.data=size; + result=ioctl(fd,USBDEVFS_CONTROL,&request); + const unsigned length=result==2 ? unsigned(size[0]) | unsigned(size[1]) << 8 : 26; + uint8_t bytes[64]{}; + request.bRequest=0x81; request.wLength=std::clamp(length,26u,64u); request.data=bytes; + result=ioctl(fd,USBDEVFS_CONTROL,&request); + fprintf(stderr,"RGB %s %s result=%d errno=%d bytes=",stage,selector==1 ? "PROBE" : "COMMIT",result,result<0 ? errno : 0); + for (int i=0;iGetArrayLength(metadata) != 7 || + !xr_camera_provider_is_valid_camera(vid, pid)) return nullptr; + RgbUsbLog usbLog(logFd); + rgb_usb_state(fd,"before-create"); + struct Capture { + std::mutex mutex; + std::condition_variable ready; + std::vector jpeg; + unsigned frames = 0; + jlong values[7]{}; + } capture; + auto camera = xr_camera_provider_create(vid, pid, fd); + if (!camera) { fprintf(stderr,"RGB provider create failed\n"); return nullptr; } + const int result = xr_camera_provider_start(camera, [](const XRCameraFrame* frame, void* data) { + auto& c = *static_cast(data); + std::lock_guard lock(c.mutex); + ++c.frames; + if (!frame || !frame->data || frame->format != XR_CAMERA_FORMAT_MJPEG || + frame->size < 4 || frame->size > 4 * 1024 * 1024) return; + c.jpeg.assign(frame->data, frame->data + frame->size); + c.values[0] = frame->width; c.values[1] = frame->height; + c.values[2] = frame->timestamp; c.values[3] = frame->sequence; + c.values[6] = monotonic_ns(); + c.ready.notify_one(); + }, &capture); + fprintf(stderr,"RGB start result=%d streaming=%d\n",result,xr_camera_provider_is_streaming(camera)); + rgb_usb_state(fd,"after-start"); + if (result == 0) { + { + std::unique_lock lock(capture.mutex); + capture.ready.wait_for(lock, std::chrono::seconds(5), [&] { return capture.frames >= 10 && !capture.jpeg.empty(); }); + } + fprintf(stderr,"RGB stop result=%d\n",xr_camera_provider_stop(camera)); + } + xr_camera_provider_destroy(camera); + rgb_usb_state(fd,"after-destroy"); + capture.values[4] = result; + capture.values[5] = capture.frames; + env->SetLongArrayRegion(metadata, 0, 7, capture.values); + if (capture.jpeg.empty()) return nullptr; + auto bytes = env->NewByteArray(static_cast(capture.jpeg.size())); + if (bytes) env->SetByteArrayRegion(bytes, 0, static_cast(capture.jpeg.size()), + reinterpret_cast(capture.jpeg.data())); + return bytes; +} diff --git a/app/src/main/cpp/viture/stereo_frame_gate.h b/app/src/main/cpp/viture/stereo_frame_gate.h new file mode 100644 index 0000000000..ae5a8f5ff1 --- /dev/null +++ b/app/src/main/cpp/viture/stereo_frame_gate.h @@ -0,0 +1,29 @@ +#pragma once +#include +#include + +struct StereoFrameGate { + uint64_t received = 0, skipped = 0; + void SetRatePermille(int rate) { + if (rate != 500 && rate != 600 && rate != 800 && rate != 1000) rate = 500; + if (ratePermille_ != rate) phase_ = 1000-rate; + ratePermille_ = rate; + } + void SetHalfRate(bool enabled) { + SetRatePermille(enabled ? 500 : 1000); + } + bool Accept(double source) { + if (!std::isfinite(source) || source <= 0) return false; + ++received; + if (source <= lastSource_) phase_ = 1000-ratePermille_; + lastSource_ = source; + phase_ += ratePermille_; + const bool copy = phase_ >= 1000; + if (copy) phase_ -= 1000; + if (!copy) ++skipped; + return copy; + } +private: + int ratePermille_ = 1000, phase_ = 0; + double lastSource_ = 0; +}; diff --git a/app/src/main/cpp/viture/uvc_bridge.cpp b/app/src/main/cpp/viture/uvc_bridge.cpp new file mode 100644 index 0000000000..38bf9a1051 --- /dev/null +++ b/app/src/main/cpp/viture/uvc_bridge.cpp @@ -0,0 +1,134 @@ +#include +#include +#include +#include "mjpeg_payload.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { +struct UsbLog { + int saved; + bool hadLevel; + std::string level; + explicit UsbLog(int fd) : saved(dup(STDERR_FILENO)), hadLevel(getenv("LIBUSB_DEBUG") != nullptr), + level(hadLevel ? getenv("LIBUSB_DEBUG") : "") { + fflush(stderr); + if (saved >= 0) dup2(fd, STDERR_FILENO); + setenv("LIBUSB_DEBUG", "3", 1); + libusb_set_log_cb(nullptr, [](libusb_context*, libusb_log_level, const char* text) { + fputs(text, stderr); + }, LIBUSB_LOG_CB_GLOBAL); + } + ~UsbLog() { + libusb_set_log_cb(nullptr, nullptr, LIBUSB_LOG_CB_GLOBAL); + fflush(stderr); + if (saved >= 0) { dup2(saved, STDERR_FILENO); close(saved); } + if (hadLevel) setenv("LIBUSB_DEBUG", level.c_str(), 1); else unsetenv("LIBUSB_DEBUG"); + } +}; + +struct Capture { + std::mutex mutex; + std::condition_variable ready; + std::vector jpeg; + jlong values[14]{}; + bool accepting = true; +}; + +jlong monotonic_ns() { + timespec now{}; + clock_gettime(CLOCK_MONOTONIC, &now); + return now.tv_sec*1000000000LL+now.tv_nsec; +} + +void finish_observation(Capture& capture) { + std::lock_guard lock(capture.mutex); + if (!capture.accepting) return; + capture.accepting = false; + capture.values[12] = monotonic_ns(); + if (capture.values[6]) capture.values[13] = capture.values[12]-capture.values[6]; + capture.values[8] = std::max(capture.values[8],capture.values[13]); +} + +void frame_received(uvc_frame_t* frame, void* user) { + auto& capture = *static_cast(user); + std::lock_guard lock(capture.mutex); + if (!capture.accepting) return; + ++capture.values[5]; + const auto* bytes = frame ? static_cast(frame->data) : nullptr; + const size_t size = frame ? frame->data_bytes : 0; + const size_t jpegSize = frame && frame->frame_format == UVC_FRAME_FORMAT_MJPEG ? mjpeg_payload_size(bytes,size) : 0; + if (!jpegSize) { + ++capture.values[10]; + return; + } + const jlong time = monotonic_ns(); + capture.values[0]=frame->width; capture.values[1]=frame->height; capture.values[3]=frame->sequence; + if (!capture.values[7]) capture.values[7]=time; + if (capture.values[6]) capture.values[8]=std::max(capture.values[8],time-capture.values[6]); + capture.values[6]=time; + ++capture.values[9]; + capture.values[11]+=jpegSize; + capture.jpeg.assign(bytes,bytes+jpegSize); + capture.ready.notify_one(); +} +} + +extern "C" JNIEXPORT jbyteArray JNICALL +Java_com_droiddeck_launcher_glasses_UvcRgbDiagnostic_nativeSnapshot(JNIEnv* env, jobject, + jint fd, jint width, jint height, jint fps, jint durationMs, jlongArray metadata, jint logFd) { + if (fd<0 || logFd<0 || !metadata || env->GetArrayLength(metadata)!=14 || width<160 || width>1920 || + height<120 || height>1080 || fps<5 || fps>30 || durationMs<1000 || durationMs>30000) return nullptr; + UsbLog log(logFd); + Capture capture; + uvc_context_t* context=nullptr; + uvc_device_handle_t* camera=nullptr; + libusb_set_option(nullptr,LIBUSB_OPTION_NO_DEVICE_DISCOVERY); + int result=uvc_init(&context,nullptr); + fprintf(stderr,"UVC init=%d\n",result); + if (result==0) { + result=uvc_wrap(fd,context,&camera); + fprintf(stderr,"UVC wrap=%d\n",result); + } + if (result==0) { + uvc_print_diag(camera,stderr); + uvc_stream_ctrl_t control{}; + result=uvc_get_stream_ctrl_format_size(camera,&control,UVC_FRAME_FORMAT_MJPEG,width,height,fps); + fprintf(stderr,"UVC negotiate=%d requested=%dx%d@%d\n",result,width,height,fps); + if (result==0) { + uvc_print_stream_ctrl(&control,stderr); + result=uvc_start_streaming(camera,&control,frame_received,&capture,0); + fprintf(stderr,"UVC start=%d\n",result); + if (result==0) { + { + std::unique_lock lock(capture.mutex); + if (capture.ready.wait_for(lock,std::chrono::seconds(5),[&] { return !capture.jpeg.empty(); })) + capture.ready.wait_for(lock,std::chrono::milliseconds(durationMs),[] { return false; }); + } + finish_observation(capture); + uvc_stop_streaming(camera); + } + } + } + finish_observation(capture); + if (camera) uvc_close(camera); + if (context) uvc_exit(context); + capture.values[4]=result; + fprintf(stderr,"UVC result=%d callbacks=%lld complete=%lld invalid=%lld maxGapMs=%.3f tailMs=%.3f\n",result, + static_cast(capture.values[5]),static_cast(capture.values[9]), + static_cast(capture.values[10]),capture.values[8]/1e6,capture.values[13]/1e6); + env->SetLongArrayRegion(metadata,0,14,capture.values); + if (result!=0 || capture.jpeg.empty()) return nullptr; + auto bytes=env->NewByteArray(static_cast(capture.jpeg.size())); + if (bytes) env->SetByteArrayRegion(bytes,0,static_cast(capture.jpeg.size()), + reinterpret_cast(capture.jpeg.data())); + return bytes; +} diff --git a/app/src/main/cpp/waylandcomp/CMakeLists.txt b/app/src/main/cpp/waylandcomp/CMakeLists.txt index c2f9cb6543..7f6e0f7d9f 100644 --- a/app/src/main/cpp/waylandcomp/CMakeLists.txt +++ b/app/src/main/cpp/waylandcomp/CMakeLists.txt @@ -1,13 +1,9 @@ -# ── Embedded Wayland compositor (experimental parallel runtime) ────────────── -# Runs a libwayland-server compositor in-process so games launched via Wine's -# winewayland.drv can present into it. Protocol glue is pre-generated in -# generated/ (no host wayland-scanner needed at app build time). Built by the app -# (add_subdirectory from ../CMakeLists.txt) and on its own by standalone/ for -# build-waylandcomp.yml. add_library(droiddeckwayland SHARED src/compositor.c src/vk_present.c src/effects_chain.c + src/cardboard.c + src/spatialpose.c src/vk_loader.c src/sc_layer.c src/ahb_swapchain.c @@ -37,25 +33,15 @@ add_library(droiddeckwayland SHARED src/framegen_bridge.c src/framegen_jni.c ) -# Warnings on for the compositor's own C. They do not fail the build; they are there to be read. target_compile_options(droiddeckwayland PRIVATE $<$:-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers>) target_include_directories(droiddeckwayland PRIVATE generated prebuilt/include src - # The X11 Vulkan renderer's committed SPIR-V headers (*_frag.h / upscale_vert.h, made by - # Bannerlator's gen_shaders.sh): the screen-effect chain (src/effects_chain.c) runs the same bytes. ${CMAKE_CURRENT_SOURCE_DIR}/../shaders ) -# ── Frame generation (feat/wayland-framegen) ───────────────────────────────── -# The two native engines the X11 renderer runs (LSFG Native: framegen/lsfg, Win-FG Native: -# framegen/winfg) are compiled into this library unmodified and driven by -# src/framegen_engine.cpp through the compositor's own Turnip entry points. They need the -# framegen tree and the vendored DXBC translator (thirdparty/dxbc, for the LSFG cache format), -# which only the app build has: the standalone build (standalone/) gets the stub, which reports -# every engine unavailable and generates nothing. set(DROIDDECK_FRAMEGEN_LSFG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../framegen/lsfg) set(DROIDDECK_FRAMEGEN_WINFG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../framegen/winfg) if (TARGET dxbc AND EXISTS ${DROIDDECK_FRAMEGEN_LSFG_DIR}/lsfg_engine.cpp @@ -79,15 +65,14 @@ if (TARGET dxbc AND EXISTS ${DROIDDECK_FRAMEGEN_LSFG_DIR}/lsfg_engine.cpp ${DROIDDECK_FRAMEGEN_LSFG_DIR}/lsfg_pacer.cpp ${DROIDDECK_FRAMEGEN_LSFG_DIR}/lsfg_engine.cpp ${DROIDDECK_FRAMEGEN_LSFG_DIR}/lsfg_governor.cpp - # The Lossless.dll import (validate / extract / cache) for the app's LsfgNative. ${DROIDDECK_FRAMEGEN_LSFG_DIR}/lsfg_jni.cpp ${DROIDDECK_FRAMEGEN_WINFG_DIR}/framegen.cpp ${DROIDDECK_FRAMEGEN_WINFG_DIR}/winfg_vkd.cpp ${DROIDDECK_FRAMEGEN_WINFG_DIR}/winfg_engine.cpp ) target_include_directories(droiddeckwayland PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/.. # as the frame-generation engines see it - ${CMAKE_CURRENT_SOURCE_DIR}/../framegen # VulkanRendererContext.h (VkTable), lsfg/, winfg/ + ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${CMAKE_CURRENT_SOURCE_DIR}/../framegen ) target_compile_options(droiddeckwayland PRIVATE $<$:-std=c++17 -fvisibility=hidden>) @@ -103,8 +88,6 @@ endif() add_library(wayland-server SHARED IMPORTED) set_target_properties(wayland-server PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/prebuilt/lib/libwayland-server.so) -# Vulkan is loaded at runtime via adrenotools (Turnip), not linked directly - so the -# compositor uses Turnip's driver, which supports dmabuf import (drm_format_modifier). target_link_libraries(droiddeckwayland wayland-server adrenotools diff --git a/app/src/main/cpp/waylandcomp/generated/banner-ahb-v1-protocol.c b/app/src/main/cpp/waylandcomp/generated/banner-ahb-v1-protocol.c index 08e5d76e0f..17b0c0dfd1 100644 --- a/app/src/main/cpp/waylandcomp/generated/banner-ahb-v1-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/banner-ahb-v1-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright 2026 The412Banner * @@ -29,7 +27,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/banner-ahb-v1-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/banner-ahb-v1-server-protocol.h index a06ea07061..788982c105 100644 --- a/app/src/main/cpp/waylandcomp/generated/banner-ahb-v1-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/banner-ahb-v1-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef BANNER_AHB_V1_SERVER_PROTOCOL_H #define BANNER_AHB_V1_SERVER_PROTOCOL_H @@ -14,12 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_banner_ahb_v1 The banner_ahb_v1 protocol - * @section page_ifaces_banner_ahb_v1 Interfaces - * - @subpage page_iface_banner_ahb_v1 - Android gralloc buffers behind dma-buf wl_buffers +/* * @section page_copyright_banner_ahb_v1 Copyright - *
  *
  * Copyright 2026 The412Banner
  *
@@ -41,132 +36,23 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + struct banner_ahb_v1; struct wl_buffer; #ifndef BANNER_AHB_V1_INTERFACE #define BANNER_AHB_V1_INTERFACE -/** - * @page page_iface_banner_ahb_v1 banner_ahb_v1 - * @section page_iface_banner_ahb_v1_desc Description - * - * Zero-copy window layers on Android. A Vulkan swapchain image that the - * client allocated as an Android AHardwareBuffer (gralloc) is still shared - * as a dma-buf through zwp_linux_dmabuf_v1, so the compositor can import - * and draw it the usual way. This interface additionally hands the - * compositor the AHardwareBuffer itself, once per wl_buffer, so the - * compositor can put the buffer straight on an Android SurfaceControl - * layer (SurfaceFlinger / the display hardware composite it) without - * copying it. - * - * The AHardwareBuffer travels over a Unix socket: the client creates a - * socketpair, writes the buffer's handle into one end with - * AHardwareBuffer_sendHandleToUnixSocket, then sends the other end in the - * attach request. The compositor reads it with - * AHardwareBuffer_recvHandleFromUnixSocket and closes the socket. Its - * reference to the AHardwareBuffer lives as long as the wl_buffer (plus - * whatever the display still holds). - * - * The compositor advertises this global whenever it can put buffers on a - * display layer at all; whether it WANTS gralloc buffers right now is the - * mode event (version 2), sent on bind and every time the user switches - * zero-copy on or off during the session. A client decides per swapchain, - * when it creates the swapchain, from the last mode it received, and a - * client whose live swapchain was built for the other mode retires it - * (VK_ERROR_OUT_OF_DATE_KHR on its next acquire or present) so the program - * rebuilds it for the new mode. Buffers of the old swapchain stay fully - * presentable until then: an attached AHardwareBuffer keeps its association - * for the wl_buffer's lifetime whatever the mode is now. A version 1 - * client (no mode event) keeps deciding from its own environment. A - * client that does not see the global (or does not want it) allocates - * swapchain images the standard way; nothing else changes. - * - * Synchronisation stays implicit: the dma-buf carries the client's render - * fence (DMA_BUF_IOCTL_IMPORT_SYNC_FILE by the client's driver), the - * compositor exports it as the layer's acquire fence, and the compositor - * imports the display's release fence into the dma-buf before it sends - * wl_buffer.release, so the client's next acquire waits on it. - * @section page_iface_banner_ahb_v1_api API - * See @ref iface_banner_ahb_v1. - */ -/** - * @defgroup iface_banner_ahb_v1 The banner_ahb_v1 interface - * - * Zero-copy window layers on Android. A Vulkan swapchain image that the - * client allocated as an Android AHardwareBuffer (gralloc) is still shared - * as a dma-buf through zwp_linux_dmabuf_v1, so the compositor can import - * and draw it the usual way. This interface additionally hands the - * compositor the AHardwareBuffer itself, once per wl_buffer, so the - * compositor can put the buffer straight on an Android SurfaceControl - * layer (SurfaceFlinger / the display hardware composite it) without - * copying it. - * - * The AHardwareBuffer travels over a Unix socket: the client creates a - * socketpair, writes the buffer's handle into one end with - * AHardwareBuffer_sendHandleToUnixSocket, then sends the other end in the - * attach request. The compositor reads it with - * AHardwareBuffer_recvHandleFromUnixSocket and closes the socket. Its - * reference to the AHardwareBuffer lives as long as the wl_buffer (plus - * whatever the display still holds). - * - * The compositor advertises this global whenever it can put buffers on a - * display layer at all; whether it WANTS gralloc buffers right now is the - * mode event (version 2), sent on bind and every time the user switches - * zero-copy on or off during the session. A client decides per swapchain, - * when it creates the swapchain, from the last mode it received, and a - * client whose live swapchain was built for the other mode retires it - * (VK_ERROR_OUT_OF_DATE_KHR on its next acquire or present) so the program - * rebuilds it for the new mode. Buffers of the old swapchain stay fully - * presentable until then: an attached AHardwareBuffer keeps its association - * for the wl_buffer's lifetime whatever the mode is now. A version 1 - * client (no mode event) keeps deciding from its own environment. A - * client that does not see the global (or does not want it) allocates - * swapchain images the standard way; nothing else changes. - * - * Synchronisation stays implicit: the dma-buf carries the client's render - * fence (DMA_BUF_IOCTL_IMPORT_SYNC_FILE by the client's driver), the - * compositor exports it as the layer's acquire fence, and the compositor - * imports the display's release fence into the dma-buf before it sends - * wl_buffer.release, so the client's next acquire waits on it. - */ extern const struct wl_interface banner_ahb_v1_interface; #endif -/** - * @ingroup iface_banner_ahb_v1 - * @struct banner_ahb_v1_interface - */ struct banner_ahb_v1_interface { - /** - * destroy the object - * - * Buffers already attached keep their AHardwareBuffer - * association. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * hand the compositor a buffer's AHardwareBuffer - * - * Associates the AHardwareBuffer readable from socket with the - * (already created) dma-buf wl_buffer. width, height and stride - * (pixels) describe the gralloc allocation; modifier_hi/lo is the - * DRM format modifier the dma-buf was shared with (the same value - * passed to zwp_linux_buffer_params_v1.add); image_count is the - * number of images in the swapchain this buffer belongs to (for - * the compositor's log). Sent once per wl_buffer, before the - * buffer is first attached to a surface. - * @param buffer the dma-buf wl_buffer - * @param socket socket the AHardwareBuffer handle was written to - * @param width buffer width in pixels - * @param height buffer height in pixels - * @param stride gralloc row stride in pixels - * @param modifier_hi high 32 bits of the DRM format modifier - * @param modifier_lo low 32 bits of the DRM format modifier - * @param image_count images in the client's swapchain - */ void (*attach)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *buffer, @@ -181,26 +67,11 @@ struct banner_ahb_v1_interface { #define BANNER_AHB_V1_MODE 0 -/** - * @ingroup iface_banner_ahb_v1 - */ #define BANNER_AHB_V1_MODE_SINCE_VERSION 2 -/** - * @ingroup iface_banner_ahb_v1 - */ #define BANNER_AHB_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_banner_ahb_v1 - */ #define BANNER_AHB_V1_ATTACH_SINCE_VERSION 1 -/** - * @ingroup iface_banner_ahb_v1 - * Sends an mode event to the client owning the resource. - * @param resource_ The client's resource - * @param enabled 1 = gralloc swapchain images wanted, 0 = not - */ static inline void banner_ahb_v1_send_mode(struct wl_resource *resource_, uint32_t enabled) { diff --git a/app/src/main/cpp/waylandcomp/generated/banner-desktop-v1-protocol.c b/app/src/main/cpp/waylandcomp/generated/banner-desktop-v1-protocol.c index 9ed8996dd9..ae0a87daa1 100644 --- a/app/src/main/cpp/waylandcomp/generated/banner-desktop-v1-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/banner-desktop-v1-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright 2026 The412Banner * @@ -29,7 +27,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/banner-desktop-v1-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/banner-desktop-v1-server-protocol.h index f2608a46e2..78f65e7fbb 100644 --- a/app/src/main/cpp/waylandcomp/generated/banner-desktop-v1-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/banner-desktop-v1-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef BANNER_DESKTOP_V1_SERVER_PROTOCOL_H #define BANNER_DESKTOP_V1_SERVER_PROTOCOL_H @@ -14,12 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_banner_desktop_v1 The banner_desktop_v1 protocol - * @section page_ifaces_banner_desktop_v1 Interfaces - * - @subpage page_iface_banner_desktop_v1 - Windows virtual desktop layout +/* * @section page_copyright_banner_desktop_v1 Copyright - *
  *
  * Copyright 2026 The412Banner
  *
@@ -41,98 +36,41 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + struct banner_desktop_v1; struct wl_surface; #ifndef BANNER_DESKTOP_V1_INTERFACE #define BANNER_DESKTOP_V1_INTERFACE -/** - * @page page_iface_banner_desktop_v1 banner_desktop_v1 - * @section page_iface_banner_desktop_v1_desc Description - * - * Each Wine process is a separate Wayland client, so a Windows virtual - * desktop can't be built from subsurfaces. Instead the process that owns - * the desktop window marks one surface as the desktop, and every process - * reports where its top-level windows sit on that desktop and the global - * window stacking order. The compositor draws the desktop at the bottom, - * the windows at the reported positions, and sends pointer and keyboard - * input to the desktop surface; Wine routes it to the right window. - * @section page_iface_banner_desktop_v1_api API - * See @ref iface_banner_desktop_v1. - */ -/** - * @defgroup iface_banner_desktop_v1 The banner_desktop_v1 interface - * - * Each Wine process is a separate Wayland client, so a Windows virtual - * desktop can't be built from subsurfaces. Instead the process that owns - * the desktop window marks one surface as the desktop, and every process - * reports where its top-level windows sit on that desktop and the global - * window stacking order. The compositor draws the desktop at the bottom, - * the windows at the reported positions, and sends pointer and keyboard - * input to the desktop surface; Wine routes it to the right window. - */ extern const struct wl_interface banner_desktop_v1_interface; #endif -/** - * @ingroup iface_banner_desktop_v1 - * @struct banner_desktop_v1_interface - */ struct banner_desktop_v1_interface { - /** - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * mark a surface as the virtual desktop - * - * The surface is drawn at the origin, below every window, and - * sets the size of the desktop. - */ void (*set_desktop)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *surface); - /** - * place a top-level window on the desktop - * - * Position of the top-left corner of the surface in desktop - * coordinates, and the window handle used by set_zorder. - */ void (*set_window)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *surface, uint32_t hwnd, int32_t x, int32_t y); - /** - * report the desktop's window stacking order - * - * Visible top-level window handles as 32-bit values, topmost - * first. - */ void (*set_zorder)(struct wl_client *client, struct wl_resource *resource, struct wl_array *hwnds); }; -/** - * @ingroup iface_banner_desktop_v1 - */ #define BANNER_DESKTOP_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_banner_desktop_v1 - */ #define BANNER_DESKTOP_V1_SET_DESKTOP_SINCE_VERSION 1 -/** - * @ingroup iface_banner_desktop_v1 - */ #define BANNER_DESKTOP_V1_SET_WINDOW_SINCE_VERSION 1 -/** - * @ingroup iface_banner_desktop_v1 - */ #define BANNER_DESKTOP_V1_SET_ZORDER_SINCE_VERSION 1 #ifdef __cplusplus diff --git a/app/src/main/cpp/waylandcomp/generated/color-management-v1-protocol.c b/app/src/main/cpp/waylandcomp/generated/color-management-v1-protocol.c index ff31f8a411..e4fe936c2f 100644 --- a/app/src/main/cpp/waylandcomp/generated/color-management-v1-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/color-management-v1-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright 2019 Sebastian Wick * Copyright 2019 Erwin Burema @@ -34,7 +32,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/color-management-v1-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/color-management-v1-server-protocol.h index 08008e8f88..edd25e45bc 100644 --- a/app/src/main/cpp/waylandcomp/generated/color-management-v1-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/color-management-v1-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef COLOR_MANAGEMENT_V1_SERVER_PROTOCOL_H #define COLOR_MANAGEMENT_V1_SERVER_PROTOCOL_H @@ -14,64 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_color_management_v1 The color_management_v1 protocol - * color management protocol - * - * @section page_desc_color_management_v1 Description - * - * The aim of the color management extension is to allow clients to know - * the color properties of outputs, and to tell the compositor about the color - * properties of their content on surfaces. Doing this enables a compositor - * to perform automatic color management of content for different outputs - * according to how content is intended to look like. - * - * The color properties are represented as an image description object which - * is immutable after it has been created. A wl_output always has an - * associated image description that clients can observe. A wl_surface - * always has an associated preferred image description as a hint chosen by - * the compositor that clients can also observe. Clients can set an image - * description on a wl_surface to denote the color characteristics of the - * surface contents. - * - * An image description includes SDR and HDR colorimetry and encoding, HDR - * metadata, and viewing environment parameters. An image description does - * not include the properties set through color-representation extension. - * It is expected that the color-representation extension is used in - * conjunction with the color management extension when necessary, - * particularly with the YUV family of pixel formats. - * - * Recommendation ITU-T H.273 - * "Coding-independent code points for video signal type identification" - * shall be referred to as simply H.273 here. - * - * The color-and-hdr repository - * (https://gitlab.freedesktop.org/pq/color-and-hdr) contains - * background information on the protocol design and legacy color management. - * It also contains a glossary, learning resources for digital color, tools, - * samples and more. - * - * The terminology used in this protocol is based on common color science and - * color encoding terminology where possible. The glossary in the color-and-hdr - * repository shall be the authority on the definition of terms in this - * protocol. - * - * Warning! The protocol described in this file is currently in the testing - * phase. Backward compatible changes may be added together with the - * corresponding interface version bump. Backward incompatible changes can - * only be done by creating a new major version of the extension. - * - * @section page_ifaces_color_management_v1 Interfaces - * - @subpage page_iface_wp_color_manager_v1 - color manager singleton - * - @subpage page_iface_wp_color_management_output_v1 - output color properties - * - @subpage page_iface_wp_color_management_surface_v1 - color management extension to a surface - * - @subpage page_iface_wp_color_management_surface_feedback_v1 - color management extension to a surface - * - @subpage page_iface_wp_image_description_creator_icc_v1 - holder of image description ICC information - * - @subpage page_iface_wp_image_description_creator_params_v1 - holder of image description parameters - * - @subpage page_iface_wp_image_description_v1 - Colorimetric image description - * - @subpage page_iface_wp_image_description_info_v1 - Colorimetric image description information +/* * @section page_copyright_color_management_v1 Copyright - *
  *
  * Copyright 2019 Sebastian Wick
  * Copyright 2019 Erwin Burema
@@ -98,8 +41,64 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + struct wl_output; struct wl_surface; struct wp_color_management_output_v1; @@ -113,360 +112,47 @@ struct wp_image_description_v1; #ifndef WP_COLOR_MANAGER_V1_INTERFACE #define WP_COLOR_MANAGER_V1_INTERFACE -/** - * @page page_iface_wp_color_manager_v1 wp_color_manager_v1 - * @section page_iface_wp_color_manager_v1_desc Description - * - * A singleton global interface used for getting color management extensions - * for wl_surface and wl_output objects, and for creating client defined - * image description objects. The extension interfaces allow - * getting the image description of outputs and setting the image - * description of surfaces. - * - * Compositors should never remove this global. - * @section page_iface_wp_color_manager_v1_api API - * See @ref iface_wp_color_manager_v1. - */ -/** - * @defgroup iface_wp_color_manager_v1 The wp_color_manager_v1 interface - * - * A singleton global interface used for getting color management extensions - * for wl_surface and wl_output objects, and for creating client defined - * image description objects. The extension interfaces allow - * getting the image description of outputs and setting the image - * description of surfaces. - * - * Compositors should never remove this global. - */ extern const struct wl_interface wp_color_manager_v1_interface; #endif #ifndef WP_COLOR_MANAGEMENT_OUTPUT_V1_INTERFACE #define WP_COLOR_MANAGEMENT_OUTPUT_V1_INTERFACE -/** - * @page page_iface_wp_color_management_output_v1 wp_color_management_output_v1 - * @section page_iface_wp_color_management_output_v1_desc Description - * - * A wp_color_management_output_v1 describes the color properties of an - * output. - * - * The wp_color_management_output_v1 is associated with the wl_output global - * underlying the wl_output object. Therefore the client destroying the - * wl_output object has no impact, but the compositor removing the output - * global makes the wp_color_management_output_v1 object inert. - * @section page_iface_wp_color_management_output_v1_api API - * See @ref iface_wp_color_management_output_v1. - */ -/** - * @defgroup iface_wp_color_management_output_v1 The wp_color_management_output_v1 interface - * - * A wp_color_management_output_v1 describes the color properties of an - * output. - * - * The wp_color_management_output_v1 is associated with the wl_output global - * underlying the wl_output object. Therefore the client destroying the - * wl_output object has no impact, but the compositor removing the output - * global makes the wp_color_management_output_v1 object inert. - */ extern const struct wl_interface wp_color_management_output_v1_interface; #endif #ifndef WP_COLOR_MANAGEMENT_SURFACE_V1_INTERFACE #define WP_COLOR_MANAGEMENT_SURFACE_V1_INTERFACE -/** - * @page page_iface_wp_color_management_surface_v1 wp_color_management_surface_v1 - * @section page_iface_wp_color_management_surface_v1_desc Description - * - * A wp_color_management_surface_v1 allows the client to set the color - * space and HDR properties of a surface. - * - * If the wl_surface associated with the wp_color_management_surface_v1 is - * destroyed, the wp_color_management_surface_v1 object becomes inert. - * @section page_iface_wp_color_management_surface_v1_api API - * See @ref iface_wp_color_management_surface_v1. - */ -/** - * @defgroup iface_wp_color_management_surface_v1 The wp_color_management_surface_v1 interface - * - * A wp_color_management_surface_v1 allows the client to set the color - * space and HDR properties of a surface. - * - * If the wl_surface associated with the wp_color_management_surface_v1 is - * destroyed, the wp_color_management_surface_v1 object becomes inert. - */ extern const struct wl_interface wp_color_management_surface_v1_interface; #endif #ifndef WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_INTERFACE #define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_INTERFACE -/** - * @page page_iface_wp_color_management_surface_feedback_v1 wp_color_management_surface_feedback_v1 - * @section page_iface_wp_color_management_surface_feedback_v1_desc Description - * - * A wp_color_management_surface_feedback_v1 allows the client to get the - * preferred image description of a surface. - * - * If the wl_surface associated with this object is destroyed, the - * wp_color_management_surface_feedback_v1 object becomes inert. - * @section page_iface_wp_color_management_surface_feedback_v1_api API - * See @ref iface_wp_color_management_surface_feedback_v1. - */ -/** - * @defgroup iface_wp_color_management_surface_feedback_v1 The wp_color_management_surface_feedback_v1 interface - * - * A wp_color_management_surface_feedback_v1 allows the client to get the - * preferred image description of a surface. - * - * If the wl_surface associated with this object is destroyed, the - * wp_color_management_surface_feedback_v1 object becomes inert. - */ extern const struct wl_interface wp_color_management_surface_feedback_v1_interface; #endif #ifndef WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_INTERFACE #define WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_INTERFACE -/** - * @page page_iface_wp_image_description_creator_icc_v1 wp_image_description_creator_icc_v1 - * @section page_iface_wp_image_description_creator_icc_v1_desc Description - * - * This type of object is used for collecting all the information required - * to create a wp_image_description_v1 object from an ICC file. A complete - * set of required parameters consists of these properties: - * - ICC file - * - * Each required property must be set exactly once if the client is to create - * an image description. The set requests verify that a property was not - * already set. The create request verifies that all required properties are - * set. There may be several alternative requests for setting each property, - * and in that case the client must choose one of them. - * - * Once all properties have been set, the create request must be used to - * create the image description object, destroying the creator in the - * process. - * @section page_iface_wp_image_description_creator_icc_v1_api API - * See @ref iface_wp_image_description_creator_icc_v1. - */ -/** - * @defgroup iface_wp_image_description_creator_icc_v1 The wp_image_description_creator_icc_v1 interface - * - * This type of object is used for collecting all the information required - * to create a wp_image_description_v1 object from an ICC file. A complete - * set of required parameters consists of these properties: - * - ICC file - * - * Each required property must be set exactly once if the client is to create - * an image description. The set requests verify that a property was not - * already set. The create request verifies that all required properties are - * set. There may be several alternative requests for setting each property, - * and in that case the client must choose one of them. - * - * Once all properties have been set, the create request must be used to - * create the image description object, destroying the creator in the - * process. - */ extern const struct wl_interface wp_image_description_creator_icc_v1_interface; #endif #ifndef WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_INTERFACE #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_INTERFACE -/** - * @page page_iface_wp_image_description_creator_params_v1 wp_image_description_creator_params_v1 - * @section page_iface_wp_image_description_creator_params_v1_desc Description - * - * This type of object is used for collecting all the parameters required - * to create a wp_image_description_v1 object. A complete set of required - * parameters consists of these properties: - * - transfer characteristic function (tf) - * - chromaticities of primaries and white point (primary color volume) - * - * The following properties are optional and have a well-defined default - * if not explicitly set: - * - primary color volume luminance range - * - reference white luminance level - * - mastering display primaries and white point (target color volume) - * - mastering luminance range - * - * The following properties are optional and will be ignored - * if not explicitly set: - * - maximum content light level - * - maximum frame-average light level - * - * Each required property must be set exactly once if the client is to create - * an image description. The set requests verify that a property was not - * already set. The create request verifies that all required properties are - * set. There may be several alternative requests for setting each property, - * and in that case the client must choose one of them. - * - * Once all properties have been set, the create request must be used to - * create the image description object, destroying the creator in the - * process. - * @section page_iface_wp_image_description_creator_params_v1_api API - * See @ref iface_wp_image_description_creator_params_v1. - */ -/** - * @defgroup iface_wp_image_description_creator_params_v1 The wp_image_description_creator_params_v1 interface - * - * This type of object is used for collecting all the parameters required - * to create a wp_image_description_v1 object. A complete set of required - * parameters consists of these properties: - * - transfer characteristic function (tf) - * - chromaticities of primaries and white point (primary color volume) - * - * The following properties are optional and have a well-defined default - * if not explicitly set: - * - primary color volume luminance range - * - reference white luminance level - * - mastering display primaries and white point (target color volume) - * - mastering luminance range - * - * The following properties are optional and will be ignored - * if not explicitly set: - * - maximum content light level - * - maximum frame-average light level - * - * Each required property must be set exactly once if the client is to create - * an image description. The set requests verify that a property was not - * already set. The create request verifies that all required properties are - * set. There may be several alternative requests for setting each property, - * and in that case the client must choose one of them. - * - * Once all properties have been set, the create request must be used to - * create the image description object, destroying the creator in the - * process. - */ extern const struct wl_interface wp_image_description_creator_params_v1_interface; #endif #ifndef WP_IMAGE_DESCRIPTION_V1_INTERFACE #define WP_IMAGE_DESCRIPTION_V1_INTERFACE -/** - * @page page_iface_wp_image_description_v1 wp_image_description_v1 - * @section page_iface_wp_image_description_v1_desc Description - * - * An image description carries information about the color encoding used on - * a surface when attached to a wl_surface via - * wp_color_management_surface_v1.set_image_description. A compositor can use - * this information to decode pixel values into colorimetrically meaningful - * quantities. - * - * Note, that the wp_image_description_v1 object is not ready to be used - * immediately after creation. The object eventually delivers either the - * 'ready' or the 'failed' event, specified in all requests creating it. The - * object is deemed "ready" after receiving the 'ready' event. - * - * An object which is not ready is illegal to use, it can only be destroyed. - * Any other request in this interface shall result in the 'not_ready' - * protocol error. Attempts to use an object which is not ready through other - * interfaces shall raise protocol errors defined there. - * - * Once created and regardless of how it was created, a - * wp_image_description_v1 object always refers to one fixed image - * description. It cannot change after creation. - * @section page_iface_wp_image_description_v1_api API - * See @ref iface_wp_image_description_v1. - */ -/** - * @defgroup iface_wp_image_description_v1 The wp_image_description_v1 interface - * - * An image description carries information about the color encoding used on - * a surface when attached to a wl_surface via - * wp_color_management_surface_v1.set_image_description. A compositor can use - * this information to decode pixel values into colorimetrically meaningful - * quantities. - * - * Note, that the wp_image_description_v1 object is not ready to be used - * immediately after creation. The object eventually delivers either the - * 'ready' or the 'failed' event, specified in all requests creating it. The - * object is deemed "ready" after receiving the 'ready' event. - * - * An object which is not ready is illegal to use, it can only be destroyed. - * Any other request in this interface shall result in the 'not_ready' - * protocol error. Attempts to use an object which is not ready through other - * interfaces shall raise protocol errors defined there. - * - * Once created and regardless of how it was created, a - * wp_image_description_v1 object always refers to one fixed image - * description. It cannot change after creation. - */ extern const struct wl_interface wp_image_description_v1_interface; #endif #ifndef WP_IMAGE_DESCRIPTION_INFO_V1_INTERFACE #define WP_IMAGE_DESCRIPTION_INFO_V1_INTERFACE -/** - * @page page_iface_wp_image_description_info_v1 wp_image_description_info_v1 - * @section page_iface_wp_image_description_info_v1_desc Description - * - * Sends all matching events describing an image description object exactly - * once and finally sends the 'done' event. - * - * This means - * - if the image description is parametric, it must send - * - primaries - * - named_primaries, if applicable - * - at least one of tf_power and tf_named, as applicable - * - luminances - * - target_primaries - * - target_luminance - * - if the image description is parametric, it may send, if applicable, - * - target_max_cll - * - target_max_fall - * - if the image description contains an ICC profile, it must send the - * icc_file event - * - * Once a wp_image_description_info_v1 object has delivered a 'done' event it - * is automatically destroyed. - * - * Every wp_image_description_info_v1 created from the same - * wp_image_description_v1 shall always return the exact same data. - * @section page_iface_wp_image_description_info_v1_api API - * See @ref iface_wp_image_description_info_v1. - */ -/** - * @defgroup iface_wp_image_description_info_v1 The wp_image_description_info_v1 interface - * - * Sends all matching events describing an image description object exactly - * once and finally sends the 'done' event. - * - * This means - * - if the image description is parametric, it must send - * - primaries - * - named_primaries, if applicable - * - at least one of tf_power and tf_named, as applicable - * - luminances - * - target_primaries - * - target_luminance - * - if the image description is parametric, it may send, if applicable, - * - target_max_cll - * - target_max_fall - * - if the image description contains an ICC profile, it must send the - * icc_file event - * - * Once a wp_image_description_info_v1 object has delivered a 'done' event it - * is automatically destroyed. - * - * Every wp_image_description_info_v1 created from the same - * wp_image_description_v1 shall always return the exact same data. - */ extern const struct wl_interface wp_image_description_info_v1_interface; #endif #ifndef WP_COLOR_MANAGER_V1_ERROR_ENUM #define WP_COLOR_MANAGER_V1_ERROR_ENUM enum wp_color_manager_v1_error { - /** - * request not supported - */ WP_COLOR_MANAGER_V1_ERROR_UNSUPPORTED_FEATURE = 0, - /** - * color management surface exists already - */ WP_COLOR_MANAGER_V1_ERROR_SURFACE_EXISTS = 1, }; -#endif /* WP_COLOR_MANAGER_V1_ERROR_ENUM */ +#endif #ifndef WP_COLOR_MANAGER_V1_ERROR_ENUM_IS_VALID #define WP_COLOR_MANAGER_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wp_color_manager_v1 - * Validate a wp_color_manager_v1 error value. - * - * @return true on success, false on error. - * @ref wp_color_manager_v1_error - */ static inline bool wp_color_manager_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -478,56 +164,21 @@ wp_color_manager_v1_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WP_COLOR_MANAGER_V1_ERROR_ENUM_IS_VALID */ +#endif #ifndef WP_COLOR_MANAGER_V1_RENDER_INTENT_ENUM #define WP_COLOR_MANAGER_V1_RENDER_INTENT_ENUM -/** - * @ingroup iface_wp_color_manager_v1 - * rendering intents - * - * See the ICC.1:2022 specification from the International Color Consortium - * for more details about rendering intents. - * - * The principles of ICC defined rendering intents apply with all types of - * image descriptions, not only those with ICC file profiles. - * - * Compositors must support the perceptual rendering intent. Other - * rendering intents are optional. - */ enum wp_color_manager_v1_render_intent { - /** - * perceptual - */ WP_COLOR_MANAGER_V1_RENDER_INTENT_PERCEPTUAL = 0, - /** - * media-relative colorimetric - */ WP_COLOR_MANAGER_V1_RENDER_INTENT_RELATIVE = 1, - /** - * saturation - */ WP_COLOR_MANAGER_V1_RENDER_INTENT_SATURATION = 2, - /** - * ICC-absolute colorimetric - */ WP_COLOR_MANAGER_V1_RENDER_INTENT_ABSOLUTE = 3, - /** - * media-relative colorimetric + black point compensation - */ WP_COLOR_MANAGER_V1_RENDER_INTENT_RELATIVE_BPC = 4, }; -#endif /* WP_COLOR_MANAGER_V1_RENDER_INTENT_ENUM */ +#endif #ifndef WP_COLOR_MANAGER_V1_RENDER_INTENT_ENUM_IS_VALID #define WP_COLOR_MANAGER_V1_RENDER_INTENT_ENUM_IS_VALID -/** - * @ingroup iface_wp_color_manager_v1 - * Validate a wp_color_manager_v1 render_intent value. - * - * @return true on success, false on error. - * @ref wp_color_manager_v1_render_intent - */ static inline bool wp_color_manager_v1_render_intent_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -545,69 +196,24 @@ wp_color_manager_v1_render_intent_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WP_COLOR_MANAGER_V1_RENDER_INTENT_ENUM_IS_VALID */ +#endif #ifndef WP_COLOR_MANAGER_V1_FEATURE_ENUM #define WP_COLOR_MANAGER_V1_FEATURE_ENUM -/** - * @ingroup iface_wp_color_manager_v1 - * compositor supported features - */ enum wp_color_manager_v1_feature { - /** - * create_icc_creator request - */ WP_COLOR_MANAGER_V1_FEATURE_ICC_V2_V4 = 0, - /** - * create_parametric_creator request - */ WP_COLOR_MANAGER_V1_FEATURE_PARAMETRIC = 1, - /** - * parametric set_primaries request - */ WP_COLOR_MANAGER_V1_FEATURE_SET_PRIMARIES = 2, - /** - * parametric set_tf_power request - */ WP_COLOR_MANAGER_V1_FEATURE_SET_TF_POWER = 3, - /** - * parametric set_luminances request - */ WP_COLOR_MANAGER_V1_FEATURE_SET_LUMINANCES = 4, - /** - * parametric set_mastering_display_primaries request - * - * The compositor supports set_mastering_display_primaries - * request with a target color volume fully contained inside the - * primary color volume. - */ WP_COLOR_MANAGER_V1_FEATURE_SET_MASTERING_DISPLAY_PRIMARIES = 5, - /** - * parametric target exceeds primary color volume - * - * The compositor additionally supports target color volumes that - * extend outside of the primary color volume. - * - * This can only be advertised if feature - * set_mastering_display_primaries is supported as well. - */ WP_COLOR_MANAGER_V1_FEATURE_EXTENDED_TARGET_VOLUME = 6, - /** - * get_windows_scrgb request - */ WP_COLOR_MANAGER_V1_FEATURE_WINDOWS_SCRGB = 7, }; -#endif /* WP_COLOR_MANAGER_V1_FEATURE_ENUM */ +#endif #ifndef WP_COLOR_MANAGER_V1_FEATURE_ENUM_IS_VALID #define WP_COLOR_MANAGER_V1_FEATURE_ENUM_IS_VALID -/** - * @ingroup iface_wp_color_manager_v1 - * Validate a wp_color_manager_v1 feature value. - * - * @return true on success, false on error. - * @ref wp_color_manager_v1_feature - */ static inline bool wp_color_manager_v1_feature_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -631,121 +237,26 @@ wp_color_manager_v1_feature_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WP_COLOR_MANAGER_V1_FEATURE_ENUM_IS_VALID */ +#endif #ifndef WP_COLOR_MANAGER_V1_PRIMARIES_ENUM #define WP_COLOR_MANAGER_V1_PRIMARIES_ENUM -/** - * @ingroup iface_wp_color_manager_v1 - * named color primaries - * - * Named color primaries used to encode well-known sets of primaries. H.273 - * is the authority, when it comes to the exact values of primaries and - * authoritative specifications, where an equivalent code point exists. - * - * A value of 0 is invalid and will never be present in the list of enums. - * - * Descriptions do list the specifications for convenience. - */ enum wp_color_manager_v1_primaries { - /** - * Color primaries for the sRGB color space as defined by the BT.709 standard - * - * Color primaries as defined by - Rec. ITU-R BT.709-6 - Rec. - * ITU-R BT.1361-0 conventional colour gamut system and extended - * colour gamut system (historical) - IEC 61966-2-1 sRGB or sYCC - - * IEC 61966-2-4 - Society of Motion Picture and Television - * Engineers (SMPTE) RP 177 (1993) Annex B Equivalent to H.273 - * ColourPrimaries code point 1. - */ WP_COLOR_MANAGER_V1_PRIMARIES_SRGB = 1, - /** - * Color primaries for PAL-M as defined by the BT.470 standard - * - * Color primaries as defined by - Rec. ITU-R BT.470-6 System M - * (historical) - United States National Television System - * Committee 1953 Recommendation for transmission standards for - * color television - United States Federal Communications - * Commission (2003) Title 47 Code of Federal Regulations 73.682 - * (a)(20) Equivalent to H.273 ColourPrimaries code point 4. - */ WP_COLOR_MANAGER_V1_PRIMARIES_PAL_M = 2, - /** - * Color primaries for PAL as defined by the BT.601 standard - * - * Color primaries as defined by - Rec. ITU-R BT.470-6 System B, - * G (historical) - Rec. ITU-R BT.601-7 625 - Rec. ITU-R BT.1358-0 - * 625 (historical) - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM - * Equivalent to H.273 ColourPrimaries code point 5. - */ WP_COLOR_MANAGER_V1_PRIMARIES_PAL = 3, - /** - * Color primaries for NTSC as defined by the BT.601 standard - * - * Color primaries as defined by - Rec. ITU-R BT.601-7 525 - Rec. - * ITU-R BT.1358-1 525 or 625 (historical) - Rec. ITU-R BT.1700-0 - * NTSC - SMPTE 170M (2004) - SMPTE 240M (1999) (historical) - * Equivalent to H.273 ColourPrimaries code point 6 and 7. - */ WP_COLOR_MANAGER_V1_PRIMARIES_NTSC = 4, - /** - * Generic film with colour filters using Illuminant C - * - * Color primaries as defined by H.273 for generic film. - * Equivalent to H.273 ColourPrimaries code point 8. - */ WP_COLOR_MANAGER_V1_PRIMARIES_GENERIC_FILM = 5, - /** - * Color primaries as defined by the BT.2020 and BT.2100 standard - * - * Color primaries as defined by - Rec. ITU-R BT.2020-2 - Rec. - * ITU-R BT.2100-0 Equivalent to H.273 ColourPrimaries code point - * 9. - */ WP_COLOR_MANAGER_V1_PRIMARIES_BT2020 = 6, - /** - * Color primaries of the full CIE 1931 XYZ color space - * - * Color primaries as defined as the maximum of the CIE 1931 XYZ - * color space by - SMPTE ST 428-1 - (CIE 1931 XYZ as in ISO - * 11664-1) Equivalent to H.273 ColourPrimaries code point 10. - */ WP_COLOR_MANAGER_V1_PRIMARIES_CIE1931_XYZ = 7, - /** - * Color primaries of the DCI P3 color space as defined by the SMPTE RP 431 standard - * - * Color primaries as defined by Digital Cinema System and - * published in SMPTE RP 431-2 (2011). Equivalent to H.273 - * ColourPrimaries code point 11. - */ WP_COLOR_MANAGER_V1_PRIMARIES_DCI_P3 = 8, - /** - * Color primaries of Display P3 variant of the DCI-P3 color space as defined by the SMPTE EG 432 standard - * - * Color primaries as defined by Digital Cinema System and - * published in SMPTE EG 432-1 (2010). Equivalent to H.273 - * ColourPrimaries code point 12. - */ WP_COLOR_MANAGER_V1_PRIMARIES_DISPLAY_P3 = 9, - /** - * Color primaries of the Adobe RGB color space as defined by the ISO 12640 standard - * - * Color primaries as defined by Adobe as "Adobe RGB" and later - * published by ISO 12640-4 (2011). - */ WP_COLOR_MANAGER_V1_PRIMARIES_ADOBE_RGB = 10, }; -#endif /* WP_COLOR_MANAGER_V1_PRIMARIES_ENUM */ +#endif #ifndef WP_COLOR_MANAGER_V1_PRIMARIES_ENUM_IS_VALID #define WP_COLOR_MANAGER_V1_PRIMARIES_ENUM_IS_VALID -/** - * @ingroup iface_wp_color_manager_v1 - * Validate a wp_color_manager_v1 primaries value. - * - * @return true on success, false on error. - * @ref wp_color_manager_v1_primaries - */ static inline bool wp_color_manager_v1_primaries_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -773,173 +284,29 @@ wp_color_manager_v1_primaries_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WP_COLOR_MANAGER_V1_PRIMARIES_ENUM_IS_VALID */ +#endif #ifndef WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ENUM #define WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ENUM -/** - * @ingroup iface_wp_color_manager_v1 - * named transfer functions - * - * Named transfer functions used to represent well-known transfer - * characteristics. H.273 is the authority, when it comes to the exact - * formulas and authoritative specifications, where an equivalent code - * point exists. - * - * A value of 0 is invalid and will never be present in the list of enums. - * - * Descriptions do list the specifications for convenience. - */ enum wp_color_manager_v1_transfer_function { - /** - * BT.1886 display transfer characteristic - * - * Rec. ITU-R BT.1886 is the display transfer characteristic - * assumed by - Rec. ITU-R BT.601-7 525 and 625 - Rec. ITU-R - * BT.709-6 - Rec. ITU-R BT.2020-2 These recommendations are - * referred to by H.273 TransferCharacteristics code points 1, 6, - * 14, and 15, which are all equivalent. - * - * This TF implies these default luminances from Rec. ITU-R - * BT.2035: - primary color volume minimum: 0.01 cd/m² - primary - * color volume maximum: 100 cd/m² - reference white: 100 cd/m² - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_BT1886 = 1, - /** - * Assumed display gamma 2.2 transfer function - * - * Transfer characteristics as defined by - Rec. ITU-R BT.470-6 - * System M (historical) - United States National Television System - * Committee 1953 Recommendation for transmission standards for - * color television - United States Federal Communications - * Commission (2003) Title 47 Code of Federal Regulations 73.682 - * (a) (20) - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM Equivalent - * to H.273 TransferCharacteristics code point 4. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_GAMMA22 = 2, - /** - * Assumed display gamma 2.8 transfer function - * - * Transfer characteristics as defined by - Rec. ITU-R BT.470-6 - * System B, G (historical) Equivalent to H.273 - * TransferCharacteristics code point 5. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_GAMMA28 = 3, - /** - * SMPTE ST 240 transfer function - * - * Transfer characteristics as defined by - SMPTE ST 240 (1999) - * Equivalent to H.273 TransferCharacteristics code point 7. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST240 = 4, - /** - * extended linear transfer function - * - * Linear transfer function defined over all real numbers. - * Normalised electrical values are equal the normalised optical - * values. - * - * The differences to H.273 TransferCharacteristics code point 8 - * are the definition over all real numbers. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_EXT_LINEAR = 5, - /** - * logarithmic 100:1 transfer function - * - * Logarithmic transfer characteristic (100:1 range). Equivalent - * to H.273 TransferCharacteristics code point 9. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_LOG_100 = 6, - /** - * logarithmic (100*Sqrt(10) : 1) transfer function - * - * Logarithmic transfer characteristic (100 * Sqrt(10) : 1 - * range). Equivalent to H.273 TransferCharacteristics code point - * 10. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_LOG_316 = 7, - /** - * IEC 61966-2-4 transfer function - * - * Transfer characteristics as defined by - IEC 61966-2-4 - * Equivalent to H.273 TransferCharacteristics code point 11. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_XVYCC = 8, - /** - * sRGB piece-wise transfer function - * - * Transfer characteristics as defined by - IEC 61966-2-1 sRGB - * Equivalent to H.273 TransferCharacteristics code point 13 with - * MatrixCoefficients set to 0. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_SRGB = 9, - /** - * Extended sRGB piece-wise transfer function - * - * Transfer characteristics as defined by - IEC 61966-2-1 sYCC - * Equivalent to H.273 TransferCharacteristics code point 13 with - * MatrixCoefficients set to anything but 0. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_EXT_SRGB = 10, - /** - * perceptual quantizer transfer function - * - * Transfer characteristics as defined by - SMPTE ST 2084 (2014) - * for 10-, 12-, 14- and 16-bit systems - Rec. ITU-R BT.2100-2 - * perceptual quantization (PQ) system Equivalent to H.273 - * TransferCharacteristics code point 16. - * - * This TF implies these default luminances - primary color volume - * minimum: 0.005 cd/m² - primary color volume maximum: 10000 - * cd/m² - reference white: 203 cd/m² - * - * The difference between the primary color volume minimum and - * maximum must be approximately 10000 cd/m² as that is the swing - * of the EOTF defined by ST 2084 and BT.2100. The default value - * for the reference white is a protocol addition: it is suggested - * by Report ITU-R BT.2408-7 and is not part of ST 2084 or BT.2100. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST2084_PQ = 11, - /** - * SMPTE ST 428 transfer function - * - * Transfer characteristics as defined by - SMPTE ST 428-1 (2019) - * Equivalent to H.273 TransferCharacteristics code point 17. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST428 = 12, - /** - * hybrid log-gamma transfer function - * - * Transfer characteristics as defined by - ARIB STD-B67 (2015) - - * Rec. ITU-R BT.2100-2 hybrid log-gamma (HLG) system Equivalent to - * H.273 TransferCharacteristics code point 18. - * - * This TF implies these default luminances - primary color volume - * minimum: 0.005 cd/m² - primary color volume maximum: 1000 - * cd/m² - reference white: 203 cd/m² - * - * HLG is a relative display-referred signal with a specified - * non-linear mapping to the display peak luminance (the HLG OOTF). - * All absolute luminance values used here for HLG assume a 1000 - * cd/m² peak display. - * - * The default value for the reference white is a protocol - * addition: it is suggested by Report ITU-R BT.2408-7 and is not - * part of ARIB STD-B67 or BT.2100. - */ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_HLG = 13, }; -#endif /* WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ENUM */ +#endif #ifndef WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ENUM_IS_VALID #define WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ENUM_IS_VALID -/** - * @ingroup iface_wp_color_manager_v1 - * Validate a wp_color_manager_v1 transfer_function value. - * - * @return true on success, false on error. - * @ref wp_color_manager_v1_transfer_function - */ static inline bool wp_color_manager_v1_transfer_function_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -973,149 +340,29 @@ wp_color_manager_v1_transfer_function_is_valid(uint32_t value, uint32_t version) return false; } } -#endif /* WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wp_color_manager_v1 - * @struct wp_color_manager_v1_interface - */ struct wp_color_manager_v1_interface { - /** - * destroy the color manager - * - * Destroy the wp_color_manager_v1 object. This does not affect - * any other objects in any way. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * create a color management interface for a wl_output - * - * This creates a new wp_color_management_output_v1 object for - * the given wl_output. - * - * See the wp_color_management_output_v1 interface for more - * details. - */ void (*get_output)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *output); - /** - * create a color management interface for a wl_surface - * - * If a wp_color_management_surface_v1 object already exists for - * the given wl_surface, the protocol error surface_exists is - * raised. - * - * This creates a new color wp_color_management_surface_v1 object - * for the given wl_surface. - * - * See the wp_color_management_surface_v1 interface for more - * details. - */ void (*get_surface)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface); - /** - * create a color management feedback interface - * - * This creates a new color - * wp_color_management_surface_feedback_v1 object for the given - * wl_surface. - * - * See the wp_color_management_surface_feedback_v1 interface for - * more details. - */ void (*get_surface_feedback)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface); - /** - * make a new ICC-based image description creator object - * - * Makes a new ICC-based image description creator object with - * all properties initially unset. The client can then use the - * object's interface to define all the required properties for an - * image description and finally create a wp_image_description_v1 - * object. - * - * This request can be used when the compositor advertises - * wp_color_manager_v1.feature.icc_v2_v4. Otherwise this request - * raises the protocol error unsupported_feature. - * @param obj the new creator object - */ void (*create_icc_creator)(struct wl_client *client, struct wl_resource *resource, uint32_t obj); - /** - * make a new parametric image description creator object - * - * Makes a new parametric image description creator object with - * all properties initially unset. The client can then use the - * object's interface to define all the required properties for an - * image description and finally create a wp_image_description_v1 - * object. - * - * This request can be used when the compositor advertises - * wp_color_manager_v1.feature.parametric. Otherwise this request - * raises the protocol error unsupported_feature. - * @param obj the new creator object - */ void (*create_parametric_creator)(struct wl_client *client, struct wl_resource *resource, uint32_t obj); - /** - * create Windows-scRGB image description object - * - * This creates a pre-defined image description for the so-called - * Windows-scRGB stimulus encoding. This comes from the Windows 10 - * handling of its own definition of an scRGB color space for an - * HDR screen driven in BT.2100/PQ signalling mode. - * - * Windows-scRGB uses sRGB (BT.709) color primaries and white - * point. The transfer characteristic is extended linear. - * - * The nominal color channel value range is extended, meaning it - * includes negative and greater than 1.0 values. Negative values - * are used to escape the sRGB color gamut boundaries. To make use - * of the extended range, the client needs to use a pixel format - * that can represent those values, e.g. floating-point 16 bits per - * channel. - * - * Nominal color value R=G=B=0.0 corresponds to BT.2100/PQ system 0 - * cd/m², and R=G=B=1.0 corresponds to BT.2100/PQ system 80 - * cd/m². The maximum is R=G=B=125.0 corresponding to 10k cd/m². - * - * Windows-scRGB is displayed by Windows 10 by converting it to - * BT.2100/PQ, maintaining the CIE 1931 chromaticity and mapping - * the luminance as above. No adjustment is made to the signal to - * account for the viewing conditions. - * - * The reference white level of Windows-scRGB is unknown. If a - * reference white level must be assumed for compositor processing, - * it should be R=G=B=2.5375 corresponding to 203 cd/m² of Report - * ITU-R BT.2408-7. - * - * The target color volume of Windows-scRGB is unknown. The color - * gamut may be anything between sRGB and BT.2100. - * - * Note: EGL_EXT_gl_colorspace_scrgb_linear definition differs from - * Windows-scRGB by using R=G=B=1.0 as the reference white level, - * while Windows-scRGB reference white level is unknown or varies. - * However, it seems probable that Windows implements both - * EGL_EXT_gl_colorspace_scrgb_linear and Vulkan - * VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT as Windows-scRGB. - * - * This request can be used when the compositor advertises - * wp_color_manager_v1.feature.windows_scrgb. Otherwise this - * request raises the protocol error unsupported_feature. - * - * The resulting image description object does not allow - * get_information request. The wp_image_description_v1.ready event - * shall be sent. - */ void (*create_windows_scrgb)(struct wl_client *client, struct wl_resource *resource, uint32_t image_description); @@ -1127,165 +374,53 @@ struct wp_color_manager_v1_interface { #define WP_COLOR_MANAGER_V1_SUPPORTED_PRIMARIES_NAMED 3 #define WP_COLOR_MANAGER_V1_DONE 4 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_SUPPORTED_INTENT_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_SUPPORTED_FEATURE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_SUPPORTED_TF_NAMED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_SUPPORTED_PRIMARIES_NAMED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_GET_OUTPUT_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_GET_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_GET_SURFACE_FEEDBACK_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_CREATE_ICC_CREATOR_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_CREATE_PARAMETRIC_CREATOR_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - */ #define WP_COLOR_MANAGER_V1_CREATE_WINDOWS_SCRGB_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_manager_v1 - * Sends an supported_intent event to the client owning the resource. - * @param resource_ The client's resource - * @param render_intent rendering intent - */ static inline void wp_color_manager_v1_send_supported_intent(struct wl_resource *resource_, uint32_t render_intent) { wl_resource_post_event(resource_, WP_COLOR_MANAGER_V1_SUPPORTED_INTENT, render_intent); } -/** - * @ingroup iface_wp_color_manager_v1 - * Sends an supported_feature event to the client owning the resource. - * @param resource_ The client's resource - * @param feature supported feature - */ static inline void wp_color_manager_v1_send_supported_feature(struct wl_resource *resource_, uint32_t feature) { wl_resource_post_event(resource_, WP_COLOR_MANAGER_V1_SUPPORTED_FEATURE, feature); } -/** - * @ingroup iface_wp_color_manager_v1 - * Sends an supported_tf_named event to the client owning the resource. - * @param resource_ The client's resource - * @param tf Named transfer function - */ static inline void wp_color_manager_v1_send_supported_tf_named(struct wl_resource *resource_, uint32_t tf) { wl_resource_post_event(resource_, WP_COLOR_MANAGER_V1_SUPPORTED_TF_NAMED, tf); } -/** - * @ingroup iface_wp_color_manager_v1 - * Sends an supported_primaries_named event to the client owning the resource. - * @param resource_ The client's resource - * @param primaries Named color primaries - */ static inline void wp_color_manager_v1_send_supported_primaries_named(struct wl_resource *resource_, uint32_t primaries) { wl_resource_post_event(resource_, WP_COLOR_MANAGER_V1_SUPPORTED_PRIMARIES_NAMED, primaries); } -/** - * @ingroup iface_wp_color_manager_v1 - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wp_color_manager_v1_send_done(struct wl_resource *resource_) { wl_resource_post_event(resource_, WP_COLOR_MANAGER_V1_DONE); } -/** - * @ingroup iface_wp_color_management_output_v1 - * @struct wp_color_management_output_v1_interface - */ struct wp_color_management_output_v1_interface { - /** - * destroy the color management output - * - * Destroy the color wp_color_management_output_v1 object. This - * does not affect any remaining protocol objects. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * get the image description of the output - * - * This creates a new wp_image_description_v1 object for the - * current image description of the output. There always is exactly - * one image description active for an output so the client should - * destroy the image description created by earlier invocations of - * this request. This request is usually sent as a reaction to the - * image_description_changed event or when creating a - * wp_color_management_output_v1 object. - * - * The image description of an output represents the color encoding - * the output expects. There might be performance and power - * advantages, as well as improved color reproduction, if a content - * update matches the image description of the output it is being - * shown on. If a content update is shown on any other output than - * the one it matches the image description of, then the color - * reproduction on those outputs might be considerably worse. - * - * The created wp_image_description_v1 object preserves the image - * description of the output from the time the object was created. - * - * The resulting image description object allows get_information - * request. - * - * If this protocol object is inert, the resulting image - * description object shall immediately deliver the - * wp_image_description_v1.failed event with the no_output cause. - * - * If the interface version is inadequate for the output's image - * description, meaning that the client does not support all the - * events needed to deliver the crucial information, the resulting - * image description object shall immediately deliver the - * wp_image_description_v1.failed event with the low_version cause. - * - * Otherwise the object shall immediately deliver the ready event. - */ void (*get_image_description)(struct wl_client *client, struct wl_resource *resource, uint32_t image_description); @@ -1293,25 +428,11 @@ struct wp_color_management_output_v1_interface { #define WP_COLOR_MANAGEMENT_OUTPUT_V1_IMAGE_DESCRIPTION_CHANGED 0 -/** - * @ingroup iface_wp_color_management_output_v1 - */ #define WP_COLOR_MANAGEMENT_OUTPUT_V1_IMAGE_DESCRIPTION_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_management_output_v1 - */ #define WP_COLOR_MANAGEMENT_OUTPUT_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_management_output_v1 - */ #define WP_COLOR_MANAGEMENT_OUTPUT_V1_GET_IMAGE_DESCRIPTION_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_management_output_v1 - * Sends an image_description_changed event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wp_color_management_output_v1_send_image_description_changed(struct wl_resource *resource_) { @@ -1320,35 +441,15 @@ wp_color_management_output_v1_send_image_description_changed(struct wl_resource #ifndef WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_ENUM #define WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_ENUM -/** - * @ingroup iface_wp_color_management_surface_v1 - * protocol errors - */ enum wp_color_management_surface_v1_error { - /** - * unsupported rendering intent - */ WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_RENDER_INTENT = 0, - /** - * invalid image description - */ WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_IMAGE_DESCRIPTION = 1, - /** - * forbidden request on inert object - */ WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_INERT = 2, }; -#endif /* WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_ENUM */ +#endif #ifndef WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_ENUM_IS_VALID #define WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wp_color_management_surface_v1 - * Validate a wp_color_management_surface_v1 error value. - * - * @return true on success, false on error. - * @ref wp_color_management_surface_v1_error - */ static inline bool wp_color_management_surface_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1362,128 +463,34 @@ wp_color_management_surface_v1_error_is_valid(uint32_t value, uint32_t version) return false; } } -#endif /* WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wp_color_management_surface_v1 - * @struct wp_color_management_surface_v1_interface - */ struct wp_color_management_surface_v1_interface { - /** - * destroy the color management interface for a surface - * - * Destroy the wp_color_management_surface_v1 object and do the - * same as unset_image_description. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * set the surface image description - * - * If this protocol object is inert, the protocol error inert is - * raised. - * - * Set the image description of the underlying surface. The image - * description and rendering intent are double-buffered state, see - * wl_surface.commit. - * - * It is the client's responsibility to understand the image - * description it sets on a surface, and to provide content that - * matches that image description. Compositors might convert images - * to match their own or any other image descriptions. - * - * Image descriptions which are not ready (see - * wp_image_description_v1) are forbidden in this request, and in - * such case the protocol error image_description is raised. - * - * All image descriptions which are ready (see - * wp_image_description_v1) are allowed and must always be accepted - * by the compositor. - * - * A rendering intent provides the client's preference on how - * content colors should be mapped to each output. The - * render_intent value must be one advertised by the compositor - * with wp_color_manager_v1.render_intent event, otherwise the - * protocol error render_intent is raised. - * - * When an image description is set on a surface, the Transfer - * Characteristics of the image description defines the valid range - * of the nominal (real-valued) color channel values. The - * processing of out-of-range color channel values is undefined, - * but compositors are recommended to clamp the values to the valid - * range when possible. - * - * By default, a surface does not have an associated image - * description nor a rendering intent. The handling of color on - * such surfaces is compositor implementation defined. Compositors - * should handle such surfaces as sRGB, but may handle them - * differently if they have specific requirements. - * - * Setting the image description has copy semantics; after this - * request, the image description can be immediately destroyed - * without affecting the pending state of the surface. - * @param render_intent rendering intent - */ void (*set_image_description)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *image_description, uint32_t render_intent); - /** - * remove the surface image description - * - * If this protocol object is inert, the protocol error inert is - * raised. - * - * This request removes any image description from the surface. See - * set_image_description for how a compositor handles a surface - * without an image description. This is double-buffered state, see - * wl_surface.commit. - */ void (*unset_image_description)(struct wl_client *client, struct wl_resource *resource); }; -/** - * @ingroup iface_wp_color_management_surface_v1 - */ #define WP_COLOR_MANAGEMENT_SURFACE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_management_surface_v1 - */ #define WP_COLOR_MANAGEMENT_SURFACE_V1_SET_IMAGE_DESCRIPTION_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_management_surface_v1 - */ #define WP_COLOR_MANAGEMENT_SURFACE_V1_UNSET_IMAGE_DESCRIPTION_SINCE_VERSION 1 #ifndef WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_ENUM #define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_ENUM -/** - * @ingroup iface_wp_color_management_surface_feedback_v1 - * protocol errors - */ enum wp_color_management_surface_feedback_v1_error { - /** - * forbidden request on inert object - */ WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_INERT = 0, - /** - * attempted to use an unsupported feature - */ WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_UNSUPPORTED_FEATURE = 1, }; -#endif /* WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_ENUM */ +#endif #ifndef WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_ENUM_IS_VALID #define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wp_color_management_surface_feedback_v1 - * Validate a wp_color_management_surface_feedback_v1 error value. - * - * @return true on success, false on error. - * @ref wp_color_management_surface_feedback_v1_error - */ static inline bool wp_color_management_surface_feedback_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1495,76 +502,14 @@ wp_color_management_surface_feedback_v1_error_is_valid(uint32_t value, uint32_t return false; } } -#endif /* WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wp_color_management_surface_feedback_v1 - * @struct wp_color_management_surface_feedback_v1_interface - */ struct wp_color_management_surface_feedback_v1_interface { - /** - * destroy the color management interface for a surface - * - * Destroy the wp_color_management_surface_feedback_v1 object. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * get the preferred image description - * - * If this protocol object is inert, the protocol error inert is - * raised. - * - * The preferred image description represents the compositor's - * preferred color encoding for this wl_surface at the current - * time. There might be performance and power advantages, as well - * as improved color reproduction, if the image description of a - * content update matches the preferred image description. - * - * This creates a new wp_image_description_v1 object for the - * currently preferred image description for the wl_surface. The - * client should stop using and destroy the image descriptions - * created by earlier invocations of this request for the - * associated wl_surface. This request is usually sent as a - * reaction to the preferred_changed event or when creating a - * wp_color_management_surface_feedback_v1 object if the client is - * capable of adapting to image descriptions. - * - * The created wp_image_description_v1 object preserves the - * preferred image description of the wl_surface from the time the - * object was created. - * - * The resulting image description object allows get_information - * request. - * - * If the image description is parametric, the client should set it - * on its wl_surface only if the image description is an exact - * match with the client content. Particularly if everything else - * matches, but the target color volume is greater than what the - * client needs, the client should create its own parameric image - * description with its exact parameters. - * - * If the interface version is inadequate for the preferred image - * description, meaning that the client does not support all the - * events needed to deliver the crucial information, the resulting - * image description object shall immediately deliver the - * wp_image_description_v1.failed event with the low_version cause, - * otherwise the object shall immediately deliver the ready event. - */ void (*get_preferred)(struct wl_client *client, struct wl_resource *resource, uint32_t image_description); - /** - * get the preferred image description - * - * The same description as for get_preferred applies, except the - * returned image description is guaranteed to be parametric. This - * is meant for clients that can only deal with parametric image - * descriptions. - * - * If the compositor doesn't support parametric image descriptions, - * the unsupported_feature error is emitted. - */ void (*get_preferred_parametric)(struct wl_client *client, struct wl_resource *resource, uint32_t image_description); @@ -1572,30 +517,12 @@ struct wp_color_management_surface_feedback_v1_interface { #define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_PREFERRED_CHANGED 0 -/** - * @ingroup iface_wp_color_management_surface_feedback_v1 - */ #define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_PREFERRED_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_management_surface_feedback_v1 - */ #define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_management_surface_feedback_v1 - */ #define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_GET_PREFERRED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_management_surface_feedback_v1 - */ #define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_GET_PREFERRED_PARAMETRIC_SINCE_VERSION 1 -/** - * @ingroup iface_wp_color_management_surface_feedback_v1 - * Sends an preferred_changed event to the client owning the resource. - * @param resource_ The client's resource - * @param identity image description id number - */ static inline void wp_color_management_surface_feedback_v1_send_preferred_changed(struct wl_resource *resource_, uint32_t identity) { @@ -1604,43 +531,17 @@ wp_color_management_surface_feedback_v1_send_preferred_changed(struct wl_resourc #ifndef WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_ENUM #define WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_ENUM -/** - * @ingroup iface_wp_image_description_creator_icc_v1 - * protocol errors - */ enum wp_image_description_creator_icc_v1_error { - /** - * incomplete parameter set - */ WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_INCOMPLETE_SET = 0, - /** - * property already set - */ WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_ALREADY_SET = 1, - /** - * fd not seekable and readable - */ WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_BAD_FD = 2, - /** - * no or too much data - */ WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_BAD_SIZE = 3, - /** - * offset + length exceeds file size - */ WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_OUT_OF_FILE = 4, }; -#endif /* WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_ENUM */ +#endif #ifndef WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_ENUM_IS_VALID #define WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wp_image_description_creator_icc_v1 - * Validate a wp_image_description_creator_icc_v1 error value. - * - * @return true on success, false on error. - * @ref wp_image_description_creator_icc_v1_error - */ static inline bool wp_image_description_creator_icc_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1658,91 +559,12 @@ wp_image_description_creator_icc_v1_error_is_valid(uint32_t value, uint32_t vers return false; } } -#endif /* WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wp_image_description_creator_icc_v1 - * @struct wp_image_description_creator_icc_v1_interface - */ struct wp_image_description_creator_icc_v1_interface { - /** - * Create the image description object from ICC data - * - * Create an image description object based on the ICC - * information previously set on this object. A compositor must - * parse the ICC data in some undefined but finite amount of time. - * - * The completeness of the parameter set is verified. If the set is - * not complete, the protocol error incomplete_set is raised. For - * the definition of a complete set, see the description of this - * interface. - * - * If the particular combination of the information is not - * supported by the compositor, the resulting image description - * object shall immediately deliver the - * wp_image_description_v1.failed event with the 'unsupported' - * cause. If a valid image description was created from the - * information, the wp_image_description_v1.ready event will - * eventually be sent instead. - * - * This request destroys the wp_image_description_creator_icc_v1 - * object. - * - * The resulting image description object does not allow - * get_information request. - */ void (*create)(struct wl_client *client, struct wl_resource *resource, uint32_t image_description); - /** - * set the ICC profile file - * - * Sets the ICC profile file to be used as the basis of the image - * description. - * - * The data shall be found through the given fd at the given - * offset, having the given length. The fd must be seekable and - * readable. Violating these requirements raises the bad_fd - * protocol error. - * - * If reading the data fails due to an error independent of the - * client, the compositor shall send the - * wp_image_description_v1.failed event on the created - * wp_image_description_v1 with the 'operating_system' cause. - * - * The maximum size of the ICC profile is 32 MB. If length is - * greater than that or zero, the protocol error bad_size is - * raised. If offset + length exceeds the file size, the protocol - * error out_of_file is raised. - * - * A compositor may read the file at any time starting from this - * request and only until whichever happens first: - If create - * request was issued, the wp_image_description_v1 object delivers - * either failed or ready event; or - if create request was not - * issued, this wp_image_description_creator_icc_v1 object is - * destroyed. - * - * A compositor shall not modify the contents of the file, and the - * fd may be sealed for writes and size changes. The client must - * ensure to its best ability that the data does not change while - * the compositor is reading it. - * - * The data must represent a valid ICC profile. The ICC profile - * version must be 2 or 4, it must be a 3 channel profile and the - * class must be Display or ColorSpace. Violating these - * requirements will not result in a protocol error, but will - * eventually send the wp_image_description_v1.failed event on the - * created wp_image_description_v1 with the 'unsupported' cause. - * - * See the International Color Consortium specification ICC.1:2022 - * for more details about ICC profiles. - * - * If ICC file has already been set on this object, the protocol - * error already_set is raised. - * @param icc_profile ICC profile - * @param offset byte offset in fd to start of ICC data - * @param length length of ICC data in bytes - */ void (*set_icc_file)(struct wl_client *client, struct wl_resource *resource, int32_t icc_profile, @@ -1751,58 +573,23 @@ struct wp_image_description_creator_icc_v1_interface { }; -/** - * @ingroup iface_wp_image_description_creator_icc_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_CREATE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_icc_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_ICC_V1_SET_ICC_FILE_SINCE_VERSION 1 #ifndef WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_ENUM #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_ENUM -/** - * @ingroup iface_wp_image_description_creator_params_v1 - * protocol errors - */ enum wp_image_description_creator_params_v1_error { - /** - * incomplete parameter set - */ WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_INCOMPLETE_SET = 0, - /** - * property already set - */ WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_ALREADY_SET = 1, - /** - * request not supported - */ WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_UNSUPPORTED_FEATURE = 2, - /** - * invalid transfer characteristic - */ WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_INVALID_TF = 3, - /** - * invalid primaries named - */ WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_INVALID_PRIMARIES_NAMED = 4, - /** - * invalid luminance value or range - */ WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_INVALID_LUMINANCE = 5, }; -#endif /* WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_ENUM */ +#endif #ifndef WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_ENUM_IS_VALID #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wp_image_description_creator_params_v1 - * Validate a wp_image_description_creator_params_v1 error value. - * - * @return true on success, false on error. - * @ref wp_image_description_creator_params_v1_error - */ static inline bool wp_image_description_creator_params_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1822,144 +609,21 @@ wp_image_description_creator_params_v1_error_is_valid(uint32_t value, uint32_t v return false; } } -#endif /* WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wp_image_description_creator_params_v1 - * @struct wp_image_description_creator_params_v1_interface - */ struct wp_image_description_creator_params_v1_interface { - /** - * Create the image description object using params - * - * Create an image description object based on the parameters - * previously set on this object. - * - * The completeness of the parameter set is verified. If the set is - * not complete, the protocol error incomplete_set is raised. For - * the definition of a complete set, see the description of this - * interface. - * - * The protocol error invalid_luminance is raised if any of the - * following requirements is not met: - When max_cll is set, it - * must be greater than min L and less or equal to max L of the - * mastering luminance range. - When max_fall is set, it must be - * greater than min L and less or equal to max L of the mastering - * luminance range. - When both max_cll and max_fall are set, - * max_fall must be less or equal to max_cll. - * - * If the particular combination of the parameter set is not - * supported by the compositor, the resulting image description - * object shall immediately deliver the - * wp_image_description_v1.failed event with the 'unsupported' - * cause. If a valid image description was created from the - * parameter set, the wp_image_description_v1.ready event will - * eventually be sent instead. - * - * This request destroys the wp_image_description_creator_params_v1 - * object. - * - * The resulting image description object does not allow - * get_information request. - */ void (*create)(struct wl_client *client, struct wl_resource *resource, uint32_t image_description); - /** - * named transfer characteristic - * - * Sets the transfer characteristic using explicitly enumerated - * named functions. - * - * When the resulting image description is attached to an image, - * the content should be encoded and decoded according to the - * industry standard practices for the transfer characteristic. - * - * Only names advertised with wp_color_manager_v1 event - * supported_tf_named are allowed. Other values shall raise the - * protocol error invalid_tf. - * - * If transfer characteristic has already been set on this object, - * the protocol error already_set is raised. - * @param tf named transfer function - */ void (*set_tf_named)(struct wl_client *client, struct wl_resource *resource, uint32_t tf); - /** - * transfer characteristic as a power curve - * - * Sets the color component transfer characteristic to a power - * curve with the given exponent. Negative values are handled by - * mirroring the positive half of the curve through the origin. The - * valid domain and range of the curve are all finite real numbers. - * This curve represents the conversion from electrical to optical - * color channel values. - * - * When the resulting image description is attached to an image, - * the content should be encoded with the inverse of the power - * curve. - * - * The curve exponent shall be multiplied by 10000 to get the - * argument eexp value to carry the precision of 4 decimals. - * - * The curve exponent must be at least 1.0 and at most 10.0. - * Otherwise the protocol error invalid_tf is raised. - * - * If transfer characteristic has already been set on this object, - * the protocol error already_set is raised. - * - * This request can be used when the compositor advertises - * wp_color_manager_v1.feature.set_tf_power. Otherwise this request - * raises the protocol error unsupported_feature. - * @param eexp the exponent * 10000 - */ void (*set_tf_power)(struct wl_client *client, struct wl_resource *resource, uint32_t eexp); - /** - * named primaries - * - * Sets the color primaries and white point using explicitly - * named sets. This describes the primary color volume which is the - * basis for color value encoding. - * - * Only names advertised with wp_color_manager_v1 event - * supported_primaries_named are allowed. Other values shall raise - * the protocol error invalid_primaries_named. - * - * If primaries have already been set on this object, the protocol - * error already_set is raised. - * @param primaries named primaries - */ void (*set_primaries_named)(struct wl_client *client, struct wl_resource *resource, uint32_t primaries); - /** - * primaries as chromaticity coordinates - * - * Sets the color primaries and white point using CIE 1931 xy - * chromaticity coordinates. This describes the primary color - * volume which is the basis for color value encoding. - * - * Each coordinate value is multiplied by 1 million to get the - * argument value to carry precision of 6 decimals. - * - * If primaries have already been set on this object, the protocol - * error already_set is raised. - * - * This request can be used if the compositor advertises - * wp_color_manager_v1.feature.set_primaries. Otherwise this - * request raises the protocol error unsupported_feature. - * @param r_x Red x * 1M - * @param r_y Red y * 1M - * @param g_x Green x * 1M - * @param g_y Green y * 1M - * @param b_x Blue x * 1M - * @param b_y Blue y * 1M - * @param w_x White x * 1M - * @param w_y White y * 1M - */ void (*set_primaries)(struct wl_client *client, struct wl_resource *resource, int32_t r_x, @@ -1970,132 +634,11 @@ struct wp_image_description_creator_params_v1_interface { int32_t b_y, int32_t w_x, int32_t w_y); - /** - * primary color volume luminance range and reference white - * - * Sets the primary color volume luminance range and the - * reference white luminance level. These values include the - * minimum display emission and ambient flare luminances, assumed - * to be optically additive and have the chromaticity of the - * primary color volume white point. - * - * The default luminances from - * https://www.color.org/chardata/rgb/srgb.xalter are - primary - * color volume minimum: 0.2 cd/m² - primary color volume maximum: - * 80 cd/m² - reference white: 80 cd/m² - * - * Setting a named transfer characteristic can imply other default - * luminances. - * - * The default luminances get overwritten when this request is - * used. With transfer_function.st2084_pq the given 'max_lum' value - * is ignored, and 'max_lum' is taken as 'min_lum' + 10000 cd/m². - * - * 'min_lum' and 'max_lum' specify the minimum and maximum - * luminances of the primary color volume as reproduced by the - * targeted display. - * - * 'reference_lum' specifies the luminance of the reference white - * as reproduced by the targeted display, and reflects the targeted - * viewing environment. - * - * Compositors should make sure that all content is anchored, - * meaning that an input signal level of 'reference_lum' on one - * image description and another input signal level of - * 'reference_lum' on another image description should produce the - * same output level, even though the 'reference_lum' on both image - * representations can be different. - * - * 'reference_lum' may be higher than 'max_lum'. In that case - * reaching the reference white output level in image content - * requires the 'extended_target_volume' feature support. - * - * If 'max_lum' or 'reference_lum' are less than or equal to - * 'min_lum', the protocol error invalid_luminance is raised. - * - * The minimum luminance is multiplied by 10000 to get the argument - * 'min_lum' value and carries precision of 4 decimals. The maximum - * luminance and reference white luminance values are unscaled. - * - * If the primary color volume luminance range and the reference - * white luminance level have already been set on this object, the - * protocol error already_set is raised. - * - * This request can be used if the compositor advertises - * wp_color_manager_v1.feature.set_luminances. Otherwise this - * request raises the protocol error unsupported_feature. - * @param min_lum minimum luminance (cd/m²) * 10000 - * @param max_lum maximum luminance (cd/m²) - * @param reference_lum reference white luminance (cd/m²) - */ void (*set_luminances)(struct wl_client *client, struct wl_resource *resource, uint32_t min_lum, uint32_t max_lum, uint32_t reference_lum); - /** - * mastering display primaries as chromaticity coordinates - * - * Provides the color primaries and white point of the mastering - * display using CIE 1931 xy chromaticity coordinates. This is - * compatible with the SMPTE ST 2086 definition of HDR static - * metadata. - * - * The mastering display primaries and mastering display luminances - * define the target color volume. - * - * If mastering display primaries are not explicitly set, the - * target color volume is assumed to have the same primaries as the - * primary color volume. - * - * The target color volume is defined by all tristimulus values - * between 0.0 and 1.0 (inclusive) of the color space defined by - * the given mastering display primaries and white point. The - * colorimetry is identical between the container color space and - * the mastering display color space, including that no chromatic - * adaptation is applied even if the white points differ. - * - * The target color volume can exceed the primary color volume to - * allow for a greater color volume with an existing color space - * definition (for example scRGB). It can be smaller than the - * primary color volume to minimize gamut and tone mapping - * distances for big color spaces (HDR metadata). - * - * To make use of the entire target color volume a suitable pixel - * format has to be chosen (e.g. floating point to exceed the - * primary color volume, or abusing limited quantization range as - * with xvYCC). - * - * Each coordinate value is multiplied by 1 million to get the - * argument value to carry precision of 6 decimals. - * - * If mastering display primaries have already been set on this - * object, the protocol error already_set is raised. - * - * This request can be used if the compositor advertises - * wp_color_manager_v1.feature.set_mastering_display_primaries. - * Otherwise this request raises the protocol error - * unsupported_feature. The advertisement implies support only for - * target color volumes fully contained within the primary color - * volume. - * - * If a compositor additionally supports target color volume - * exceeding the primary color volume, it must advertise - * wp_color_manager_v1.feature.extended_target_volume. If a client - * uses target color volume exceeding the primary color volume and - * the compositor does not support it, the result is implementation - * defined. Compositors are recommended to detect this case and - * fail the image description gracefully, but it may as well result - * in color artifacts. - * @param r_x Red x * 1M - * @param r_y Red y * 1M - * @param g_x Green x * 1M - * @param g_y Green y * 1M - * @param b_x Blue x * 1M - * @param b_y Blue y * 1M - * @param w_x White x * 1M - * @param w_y White y * 1M - */ void (*set_mastering_display_primaries)(struct wl_client *client, struct wl_resource *resource, int32_t r_x, @@ -2106,148 +649,40 @@ struct wp_image_description_creator_params_v1_interface { int32_t b_y, int32_t w_x, int32_t w_y); - /** - * display mastering luminance range - * - * Sets the luminance range that was used during the content - * mastering process as the minimum and maximum absolute luminance - * L. These values include the minimum display emission and ambient - * flare luminances, assumed to be optically additive and have the - * chromaticity of the primary color volume white point. This - * should be compatible with the SMPTE ST 2086 definition of HDR - * static metadata. - * - * The mastering display primaries and mastering display luminances - * define the target color volume. - * - * If mastering luminances are not explicitly set, the target color - * volume is assumed to have the same min and max luminances as the - * primary color volume. - * - * If max L is less than or equal to min L, the protocol error - * invalid_luminance is raised. - * - * Min L value is multiplied by 10000 to get the argument min_lum - * value and carry precision of 4 decimals. Max L value is unscaled - * for max_lum. - * - * This request can be used if the compositor advertises - * wp_color_manager_v1.feature.set_mastering_display_primaries. - * Otherwise this request raises the protocol error - * unsupported_feature. The advertisement implies support only for - * target color volumes fully contained within the primary color - * volume. - * - * If a compositor additionally supports target color volume - * exceeding the primary color volume, it must advertise - * wp_color_manager_v1.feature.extended_target_volume. If a client - * uses target color volume exceeding the primary color volume and - * the compositor does not support it, the result is implementation - * defined. Compositors are recommended to detect this case and - * fail the image description gracefully, but it may as well result - * in color artifacts. - * @param min_lum min L (cd/m²) * 10000 - * @param max_lum max L (cd/m²) - */ void (*set_mastering_luminance)(struct wl_client *client, struct wl_resource *resource, uint32_t min_lum, uint32_t max_lum); - /** - * maximum content light level - * - * Sets the maximum content light level (max_cll) as defined by - * CTA-861-H. - * - * max_cll is undefined by default. - * @param max_cll Maximum content light level (cd/m²) - */ void (*set_max_cll)(struct wl_client *client, struct wl_resource *resource, uint32_t max_cll); - /** - * maximum frame-average light level - * - * Sets the maximum frame-average light level (max_fall) as - * defined by CTA-861-H. - * - * max_fall is undefined by default. - * @param max_fall Maximum frame-average light level (cd/m²) - */ void (*set_max_fall)(struct wl_client *client, struct wl_resource *resource, uint32_t max_fall); }; -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_CREATE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_SET_TF_NAMED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_SET_TF_POWER_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_SET_PRIMARIES_NAMED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_SET_PRIMARIES_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_SET_LUMINANCES_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_SET_MASTERING_DISPLAY_PRIMARIES_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_SET_MASTERING_LUMINANCE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_SET_MAX_CLL_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_creator_params_v1 - */ #define WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_SET_MAX_FALL_SINCE_VERSION 1 #ifndef WP_IMAGE_DESCRIPTION_V1_ERROR_ENUM #define WP_IMAGE_DESCRIPTION_V1_ERROR_ENUM -/** - * @ingroup iface_wp_image_description_v1 - * protocol errors - */ enum wp_image_description_v1_error { - /** - * attempted to use an object which is not ready - */ WP_IMAGE_DESCRIPTION_V1_ERROR_NOT_READY = 0, - /** - * get_information not allowed - */ WP_IMAGE_DESCRIPTION_V1_ERROR_NO_INFORMATION = 1, }; -#endif /* WP_IMAGE_DESCRIPTION_V1_ERROR_ENUM */ +#endif #ifndef WP_IMAGE_DESCRIPTION_V1_ERROR_ENUM_IS_VALID #define WP_IMAGE_DESCRIPTION_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wp_image_description_v1 - * Validate a wp_image_description_v1 error value. - * - * @return true on success, false on error. - * @ref wp_image_description_v1_error - */ static inline bool wp_image_description_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -2259,43 +694,20 @@ wp_image_description_v1_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WP_IMAGE_DESCRIPTION_V1_ERROR_ENUM_IS_VALID */ +#endif #ifndef WP_IMAGE_DESCRIPTION_V1_CAUSE_ENUM #define WP_IMAGE_DESCRIPTION_V1_CAUSE_ENUM -/** - * @ingroup iface_wp_image_description_v1 - * generic reason for failure - */ enum wp_image_description_v1_cause { - /** - * interface version too low - */ WP_IMAGE_DESCRIPTION_V1_CAUSE_LOW_VERSION = 0, - /** - * unsupported image description data - */ WP_IMAGE_DESCRIPTION_V1_CAUSE_UNSUPPORTED = 1, - /** - * error independent of the client - */ WP_IMAGE_DESCRIPTION_V1_CAUSE_OPERATING_SYSTEM = 2, - /** - * the relevant output no longer exists - */ WP_IMAGE_DESCRIPTION_V1_CAUSE_NO_OUTPUT = 3, }; -#endif /* WP_IMAGE_DESCRIPTION_V1_CAUSE_ENUM */ +#endif #ifndef WP_IMAGE_DESCRIPTION_V1_CAUSE_ENUM_IS_VALID #define WP_IMAGE_DESCRIPTION_V1_CAUSE_ENUM_IS_VALID -/** - * @ingroup iface_wp_image_description_v1 - * Validate a wp_image_description_v1 cause value. - * - * @return true on success, false on error. - * @ref wp_image_description_v1_cause - */ static inline bool wp_image_description_v1_cause_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -2311,37 +723,11 @@ wp_image_description_v1_cause_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WP_IMAGE_DESCRIPTION_V1_CAUSE_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wp_image_description_v1 - * @struct wp_image_description_v1_interface - */ struct wp_image_description_v1_interface { - /** - * destroy the image description - * - * Destroy this object. It is safe to destroy an object which is - * not ready. - * - * Destroying a wp_image_description_v1 object has no side-effects, - * not even if a - * wp_color_management_surface_v1.set_image_description has not yet - * been followed by a wl_surface.commit. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * get information about the image description - * - * Creates a wp_image_description_info_v1 object which delivers - * the information that makes up the image description. - * - * Not all image description protocol objects allow get_information - * request. Whether it is allowed or not is defined by the request - * that created the object. If get_information is not allowed, the - * protocol error no_information is raised. - */ void (*get_information)(struct wl_client *client, struct wl_resource *resource, uint32_t information); @@ -2350,43 +736,18 @@ struct wp_image_description_v1_interface { #define WP_IMAGE_DESCRIPTION_V1_FAILED 0 #define WP_IMAGE_DESCRIPTION_V1_READY 1 -/** - * @ingroup iface_wp_image_description_v1 - */ #define WP_IMAGE_DESCRIPTION_V1_FAILED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_v1 - */ #define WP_IMAGE_DESCRIPTION_V1_READY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_v1 - */ #define WP_IMAGE_DESCRIPTION_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_v1 - */ #define WP_IMAGE_DESCRIPTION_V1_GET_INFORMATION_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_v1 - * Sends an failed event to the client owning the resource. - * @param resource_ The client's resource - * @param cause generic reason - * @param msg ad hoc human-readable explanation - */ static inline void wp_image_description_v1_send_failed(struct wl_resource *resource_, uint32_t cause, const char *msg) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_V1_FAILED, cause, msg); } -/** - * @ingroup iface_wp_image_description_v1 - * Sends an ready event to the client owning the resource. - * @param resource_ The client's resource - * @param identity image description id number - */ static inline void wp_image_description_v1_send_ready(struct wl_resource *resource_, uint32_t identity) { @@ -2405,195 +766,79 @@ wp_image_description_v1_send_ready(struct wl_resource *resource_, uint32_t ident #define WP_IMAGE_DESCRIPTION_INFO_V1_TARGET_MAX_CLL 9 #define WP_IMAGE_DESCRIPTION_INFO_V1_TARGET_MAX_FALL 10 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_ICC_FILE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_PRIMARIES_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_PRIMARIES_NAMED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_TF_POWER_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_TF_NAMED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_LUMINANCES_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_TARGET_PRIMARIES_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_TARGET_LUMINANCE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_TARGET_MAX_CLL_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - */ #define WP_IMAGE_DESCRIPTION_INFO_V1_TARGET_MAX_FALL_SINCE_VERSION 1 -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wp_image_description_info_v1_send_done(struct wl_resource *resource_) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_DONE); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an icc_file event to the client owning the resource. - * @param resource_ The client's resource - * @param icc ICC profile file descriptor - * @param icc_size ICC profile size, in bytes - */ static inline void wp_image_description_info_v1_send_icc_file(struct wl_resource *resource_, int32_t icc, uint32_t icc_size) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_ICC_FILE, icc, icc_size); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an primaries event to the client owning the resource. - * @param resource_ The client's resource - * @param r_x Red x * 1M - * @param r_y Red y * 1M - * @param g_x Green x * 1M - * @param g_y Green y * 1M - * @param b_x Blue x * 1M - * @param b_y Blue y * 1M - * @param w_x White x * 1M - * @param w_y White y * 1M - */ static inline void wp_image_description_info_v1_send_primaries(struct wl_resource *resource_, int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_PRIMARIES, r_x, r_y, g_x, g_y, b_x, b_y, w_x, w_y); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an primaries_named event to the client owning the resource. - * @param resource_ The client's resource - * @param primaries named primaries - */ static inline void wp_image_description_info_v1_send_primaries_named(struct wl_resource *resource_, uint32_t primaries) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_PRIMARIES_NAMED, primaries); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an tf_power event to the client owning the resource. - * @param resource_ The client's resource - * @param eexp the exponent * 10000 - */ static inline void wp_image_description_info_v1_send_tf_power(struct wl_resource *resource_, uint32_t eexp) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_TF_POWER, eexp); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an tf_named event to the client owning the resource. - * @param resource_ The client's resource - * @param tf named transfer function - */ static inline void wp_image_description_info_v1_send_tf_named(struct wl_resource *resource_, uint32_t tf) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_TF_NAMED, tf); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an luminances event to the client owning the resource. - * @param resource_ The client's resource - * @param min_lum minimum luminance (cd/m²) * 10000 - * @param max_lum maximum luminance (cd/m²) - * @param reference_lum reference white luminance (cd/m²) - */ static inline void wp_image_description_info_v1_send_luminances(struct wl_resource *resource_, uint32_t min_lum, uint32_t max_lum, uint32_t reference_lum) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_LUMINANCES, min_lum, max_lum, reference_lum); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an target_primaries event to the client owning the resource. - * @param resource_ The client's resource - * @param r_x Red x * 1M - * @param r_y Red y * 1M - * @param g_x Green x * 1M - * @param g_y Green y * 1M - * @param b_x Blue x * 1M - * @param b_y Blue y * 1M - * @param w_x White x * 1M - * @param w_y White y * 1M - */ static inline void wp_image_description_info_v1_send_target_primaries(struct wl_resource *resource_, int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_TARGET_PRIMARIES, r_x, r_y, g_x, g_y, b_x, b_y, w_x, w_y); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an target_luminance event to the client owning the resource. - * @param resource_ The client's resource - * @param min_lum min L (cd/m²) * 10000 - * @param max_lum max L (cd/m²) - */ static inline void wp_image_description_info_v1_send_target_luminance(struct wl_resource *resource_, uint32_t min_lum, uint32_t max_lum) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_TARGET_LUMINANCE, min_lum, max_lum); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an target_max_cll event to the client owning the resource. - * @param resource_ The client's resource - * @param max_cll Maximum content light-level (cd/m²) - */ static inline void wp_image_description_info_v1_send_target_max_cll(struct wl_resource *resource_, uint32_t max_cll) { wl_resource_post_event(resource_, WP_IMAGE_DESCRIPTION_INFO_V1_TARGET_MAX_CLL, max_cll); } -/** - * @ingroup iface_wp_image_description_info_v1 - * Sends an target_max_fall event to the client owning the resource. - * @param resource_ The client's resource - * @param max_fall Maximum frame-average light level (cd/m²) - */ static inline void wp_image_description_info_v1_send_target_max_fall(struct wl_resource *resource_, uint32_t max_fall) { diff --git a/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-client-protocol.h b/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-client-protocol.h index e7c4665f37..e0a20b8549 100644 --- a/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-client-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-client-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef LINUX_DMABUF_V1_CLIENT_PROTOCOL_H #define LINUX_DMABUF_V1_CLIENT_PROTOCOL_H @@ -11,14 +10,8 @@ extern "C" { #endif -/** - * @page page_linux_dmabuf_v1 The linux_dmabuf_v1 protocol - * @section page_ifaces_linux_dmabuf_v1 Interfaces - * - @subpage page_iface_zwp_linux_dmabuf_v1 - factory for creating dmabuf-based wl_buffers - * - @subpage page_iface_zwp_linux_buffer_params_v1 - parameters for creating a dmabuf-based wl_buffer - * - @subpage page_iface_zwp_linux_dmabuf_feedback_v1 - dmabuf feedback +/* * @section page_copyright_linux_dmabuf_v1 Copyright - *
  *
  * Copyright © 2014, 2015 Collabora, Ltd.
  *
@@ -40,8 +33,14 @@ extern "C" {
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + + struct wl_buffer; struct wl_surface; struct zwp_linux_buffer_params_v1; @@ -50,331 +49,21 @@ struct zwp_linux_dmabuf_v1; #ifndef ZWP_LINUX_DMABUF_V1_INTERFACE #define ZWP_LINUX_DMABUF_V1_INTERFACE -/** - * @page page_iface_zwp_linux_dmabuf_v1 zwp_linux_dmabuf_v1 - * @section page_iface_zwp_linux_dmabuf_v1_desc Description - * - * This interface offers ways to create generic dmabuf-based wl_buffers. - * - * For more information about dmabuf, see: - * https://www.kernel.org/doc/html/next/userspace-api/dma-buf-alloc-exchange.html - * - * Clients can use the get_surface_feedback request to get dmabuf feedback - * for a particular surface. If the client wants to retrieve feedback not - * tied to a surface, they can use the get_default_feedback request. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * However, when the underlying graphics stack fails to deliver the - * promise, because of e.g. a device hot-unplug which raises internal - * errors, after the wl_buffer has been successfully created the - * compositor must not raise protocol errors to the client when dmabuf - * import later fails. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_buffer_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * For all DRM formats and unless specified in another protocol extension, - * pre-multiplied alpha is used for pixel values. - * - * Unless specified otherwise in another protocol extension, implicit - * synchronization is used. In other words, compositors and clients must - * wait and signal fences implicitly passed via the DMA-BUF's reservation - * mechanism. - * @section page_iface_zwp_linux_dmabuf_v1_api API - * See @ref iface_zwp_linux_dmabuf_v1. - */ -/** - * @defgroup iface_zwp_linux_dmabuf_v1 The zwp_linux_dmabuf_v1 interface - * - * This interface offers ways to create generic dmabuf-based wl_buffers. - * - * For more information about dmabuf, see: - * https://www.kernel.org/doc/html/next/userspace-api/dma-buf-alloc-exchange.html - * - * Clients can use the get_surface_feedback request to get dmabuf feedback - * for a particular surface. If the client wants to retrieve feedback not - * tied to a surface, they can use the get_default_feedback request. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * However, when the underlying graphics stack fails to deliver the - * promise, because of e.g. a device hot-unplug which raises internal - * errors, after the wl_buffer has been successfully created the - * compositor must not raise protocol errors to the client when dmabuf - * import later fails. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_buffer_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * For all DRM formats and unless specified in another protocol extension, - * pre-multiplied alpha is used for pixel values. - * - * Unless specified otherwise in another protocol extension, implicit - * synchronization is used. In other words, compositors and clients must - * wait and signal fences implicitly passed via the DMA-BUF's reservation - * mechanism. - */ extern const struct wl_interface zwp_linux_dmabuf_v1_interface; #endif #ifndef ZWP_LINUX_BUFFER_PARAMS_V1_INTERFACE #define ZWP_LINUX_BUFFER_PARAMS_V1_INTERFACE -/** - * @page page_iface_zwp_linux_buffer_params_v1 zwp_linux_buffer_params_v1 - * @section page_iface_zwp_linux_buffer_params_v1_desc Description - * - * This temporary object is a collection of dmabufs and other - * parameters that together form a single logical buffer. The temporary - * object may eventually create one wl_buffer unless cancelled by - * destroying it before requesting 'create'. - * - * Single-planar formats only require one dmabuf, however - * multi-planar formats may require more than one dmabuf. For all - * formats, an 'add' request must be called once per plane (even if the - * underlying dmabuf fd is identical). - * - * You must use consecutive plane indices ('plane_idx' argument for 'add') - * from zero to the number of planes used by the drm_fourcc format code. - * All planes required by the format must be given exactly once, but can - * be given in any order. Each plane index can only be set once; subsequent - * calls with a plane index which has already been set will result in a - * plane_set error being generated. - * @section page_iface_zwp_linux_buffer_params_v1_api API - * See @ref iface_zwp_linux_buffer_params_v1. - */ -/** - * @defgroup iface_zwp_linux_buffer_params_v1 The zwp_linux_buffer_params_v1 interface - * - * This temporary object is a collection of dmabufs and other - * parameters that together form a single logical buffer. The temporary - * object may eventually create one wl_buffer unless cancelled by - * destroying it before requesting 'create'. - * - * Single-planar formats only require one dmabuf, however - * multi-planar formats may require more than one dmabuf. For all - * formats, an 'add' request must be called once per plane (even if the - * underlying dmabuf fd is identical). - * - * You must use consecutive plane indices ('plane_idx' argument for 'add') - * from zero to the number of planes used by the drm_fourcc format code. - * All planes required by the format must be given exactly once, but can - * be given in any order. Each plane index can only be set once; subsequent - * calls with a plane index which has already been set will result in a - * plane_set error being generated. - */ extern const struct wl_interface zwp_linux_buffer_params_v1_interface; #endif #ifndef ZWP_LINUX_DMABUF_FEEDBACK_V1_INTERFACE #define ZWP_LINUX_DMABUF_FEEDBACK_V1_INTERFACE -/** - * @page page_iface_zwp_linux_dmabuf_feedback_v1 zwp_linux_dmabuf_feedback_v1 - * @section page_iface_zwp_linux_dmabuf_feedback_v1_desc Description - * - * This object advertises dmabuf parameters feedback. This includes the - * preferred devices and the supported formats/modifiers. - * - * The parameters are sent once when this object is created and whenever they - * change. The done event is always sent once after all parameters have been - * sent. When a single parameter changes, all parameters are re-sent by the - * compositor. - * - * Compositors can re-send the parameters when the current client buffer - * allocations are sub-optimal. Compositors should not re-send the - * parameters if re-allocating the buffers would not result in a more optimal - * configuration. In particular, compositors should avoid sending the exact - * same parameters multiple times in a row. - * - * The tranche_target_device and tranche_formats events are grouped by - * tranches of preference. For each tranche, a tranche_target_device, one - * tranche_flags and one or more tranche_formats events are sent, followed - * by a tranche_done event finishing the list. The tranches are sent in - * descending order of preference. All formats and modifiers in the same - * tranche have the same preference. - * - * To send parameters, the compositor sends one main_device event (unless - * the client bound version 6 or above), tranches (each consisting of one - * tranche_target_device event, one tranche_flags event, tranche_formats - * events and then a tranche_done event), then one done event. - * - * With version 6 and above, the compositor must always advertise at least - * one tranche with the sampling flag set. - * - * The compositor sends a format_table event at least once for each dmabuf - * parameters feedback object, before any tranche events. Unless the format - * table contents change later, the compositor is free not to send another - * format_table event for the same dmabuf parameters feedback object. - * @section page_iface_zwp_linux_dmabuf_feedback_v1_api API - * See @ref iface_zwp_linux_dmabuf_feedback_v1. - */ -/** - * @defgroup iface_zwp_linux_dmabuf_feedback_v1 The zwp_linux_dmabuf_feedback_v1 interface - * - * This object advertises dmabuf parameters feedback. This includes the - * preferred devices and the supported formats/modifiers. - * - * The parameters are sent once when this object is created and whenever they - * change. The done event is always sent once after all parameters have been - * sent. When a single parameter changes, all parameters are re-sent by the - * compositor. - * - * Compositors can re-send the parameters when the current client buffer - * allocations are sub-optimal. Compositors should not re-send the - * parameters if re-allocating the buffers would not result in a more optimal - * configuration. In particular, compositors should avoid sending the exact - * same parameters multiple times in a row. - * - * The tranche_target_device and tranche_formats events are grouped by - * tranches of preference. For each tranche, a tranche_target_device, one - * tranche_flags and one or more tranche_formats events are sent, followed - * by a tranche_done event finishing the list. The tranches are sent in - * descending order of preference. All formats and modifiers in the same - * tranche have the same preference. - * - * To send parameters, the compositor sends one main_device event (unless - * the client bound version 6 or above), tranches (each consisting of one - * tranche_target_device event, one tranche_flags event, tranche_formats - * events and then a tranche_done event), then one done event. - * - * With version 6 and above, the compositor must always advertise at least - * one tranche with the sampling flag set. - * - * The compositor sends a format_table event at least once for each dmabuf - * parameters feedback object, before any tranche events. Unless the format - * table contents change later, the compositor is free not to send another - * format_table event for the same dmabuf parameters feedback object. - */ extern const struct wl_interface zwp_linux_dmabuf_feedback_v1_interface; #endif -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * @struct zwp_linux_dmabuf_v1_listener - */ struct zwp_linux_dmabuf_v1_listener { - /** - * supported buffer format - * - * This event advertises one buffer format that the server - * supports. All the supported formats are advertised once when the - * client binds to this interface. A roundtrip after binding - * guarantees that the client has received all supported formats. - * - * For the definition of the format codes, see the - * zwp_linux_buffer_params_v1::create request. - * - * Starting version 4, the format event is deprecated and must not - * be sent by compositors. Instead, use get_default_feedback or - * get_surface_feedback. - * @param format DRM_FORMAT code - * @deprecated Deprecated since version 4 - */ void (*format)(void *data, struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, uint32_t format); - /** - * supported buffer format modifier - * - * This event advertises the formats that the server supports, - * along with the modifiers supported for each format. All the - * supported modifiers for all the supported formats are advertised - * once when the client binds to this interface. A roundtrip after - * binding guarantees that the client has received all supported - * format-modifier pairs. - * - * For legacy support, DRM_FORMAT_MOD_INVALID (that is, modifier_hi - * == 0x00ffffff and modifier_lo == 0xffffffff) is allowed in this - * event. It indicates that the server can support the format with - * an implicit modifier. When a plane has DRM_FORMAT_MOD_INVALID as - * its modifier, it is as if no explicit modifier is specified. The - * effective modifier will be derived from the dmabuf. - * - * A compositor that sends valid modifiers and - * DRM_FORMAT_MOD_INVALID for a given format supports both explicit - * modifiers and implicit modifiers. - * - * For the definition of the format and modifier codes, see the - * zwp_linux_buffer_params_v1::create and - * zwp_linux_buffer_params_v1::add requests. - * - * Starting version 4, the modifier event is deprecated and must - * not be sent by compositors. Instead, use get_default_feedback or - * get_surface_feedback. - * @param format DRM_FORMAT code - * @param modifier_hi high 32 bits of layout modifier - * @param modifier_lo low 32 bits of layout modifier - * @since 3 - * @deprecated Deprecated since version 4 - */ void (*modifier)(void *data, struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, uint32_t format, @@ -382,9 +71,6 @@ struct zwp_linux_dmabuf_v1_listener { uint32_t modifier_lo); }; -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ static inline int zwp_linux_dmabuf_v1_add_listener(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, const struct zwp_linux_dmabuf_v1_listener *listener, void *data) @@ -398,40 +84,20 @@ zwp_linux_dmabuf_v1_add_listener(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1 #define ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK 2 #define ZWP_LINUX_DMABUF_V1_GET_SURFACE_FEEDBACK 3 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_FORMAT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION 3 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_CREATE_PARAMS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION 4 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_GET_SURFACE_FEEDBACK_SINCE_VERSION 4 -/** @ingroup iface_zwp_linux_dmabuf_v1 */ static inline void zwp_linux_dmabuf_v1_set_user_data(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) zwp_linux_dmabuf_v1, user_data); } -/** @ingroup iface_zwp_linux_dmabuf_v1 */ static inline void * zwp_linux_dmabuf_v1_get_user_data(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) { @@ -444,12 +110,6 @@ zwp_linux_dmabuf_v1_get_version(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) return wl_proxy_get_version((struct wl_proxy *) zwp_linux_dmabuf_v1); } -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * - * Objects created through this interface, especially wl_buffers, will - * remain valid. - */ static inline void zwp_linux_dmabuf_v1_destroy(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) { @@ -457,14 +117,6 @@ zwp_linux_dmabuf_v1_destroy(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) ZWP_LINUX_DMABUF_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_linux_dmabuf_v1), WL_MARSHAL_FLAG_DESTROY); } -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * - * This temporary object is used to collect multiple dmabuf handles into - * a single batch to create a wl_buffer. It can only be used once and - * should be destroyed after a 'created' or 'failed' event has been - * received. - */ static inline struct zwp_linux_buffer_params_v1 * zwp_linux_dmabuf_v1_create_params(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) { @@ -476,14 +128,6 @@ zwp_linux_dmabuf_v1_create_params(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v return (struct zwp_linux_buffer_params_v1 *) params_id; } -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * - * This request creates a new zwp_linux_dmabuf_feedback_v1 object not bound - * to a particular surface. This object will deliver feedback about dmabuf - * parameters to use if the client doesn't support per-surface feedback - * (see get_surface_feedback). - */ static inline struct zwp_linux_dmabuf_feedback_v1 * zwp_linux_dmabuf_v1_get_default_feedback(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) { @@ -495,16 +139,6 @@ zwp_linux_dmabuf_v1_get_default_feedback(struct zwp_linux_dmabuf_v1 *zwp_linux_d return (struct zwp_linux_dmabuf_feedback_v1 *) id; } -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * - * This request creates a new zwp_linux_dmabuf_feedback_v1 object for the - * specified wl_surface. This object will deliver feedback about dmabuf - * parameters to use for buffers attached to this surface. - * - * If the surface is destroyed before the zwp_linux_dmabuf_feedback_v1 object, - * the feedback object becomes inert. - */ static inline struct zwp_linux_dmabuf_feedback_v1 * zwp_linux_dmabuf_v1_get_surface_feedback(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, struct wl_surface *surface) { @@ -519,99 +153,35 @@ zwp_linux_dmabuf_v1_get_surface_feedback(struct zwp_linux_dmabuf_v1 *zwp_linux_d #ifndef ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM #define ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM enum zwp_linux_buffer_params_v1_error { - /** - * the zwp_linux_buffer_params_v1 object has already been used to create a wl_buffer - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ALREADY_USED = 0, - /** - * plane index out of bounds - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_IDX = 1, - /** - * the plane index was already set - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_SET = 2, - /** - * missing or too many planes to create a buffer - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INCOMPLETE = 3, - /** - * format not supported - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT = 4, - /** - * invalid width or height - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_DIMENSIONS = 5, - /** - * offset + stride * height goes out of dmabuf bounds - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS = 6, - /** - * invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER = 7, - /** - * an array with mismatching size for a dev_t was used - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_DEV_T_SIZE = 8, }; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM */ +#endif #ifndef ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM #define ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM enum zwp_linux_buffer_params_v1_flags { - /** - * contents are y-inverted - */ ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT = 1, - /** - * content is interlaced - */ ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_INTERLACED = 2, - /** - * bottom field first - */ ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST = 4, }; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM */ +#endif -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * @struct zwp_linux_buffer_params_v1_listener - */ struct zwp_linux_buffer_params_v1_listener { - /** - * buffer creation succeeded - * - * This event indicates that the attempted buffer creation was - * successful. It provides the new wl_buffer referencing the - * dmabuf(s). - * - * Upon receiving this event, the client should destroy the - * zwp_linux_buffer_params_v1 object. - * @param buffer id for the the newly created wl_buffer - */ void (*created)(void *data, struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, struct wl_buffer *buffer); - /** - * buffer creation failed - * - * This event indicates that the attempted buffer creation has - * failed. It usually means that one of the dmabuf constraints has - * not been fulfilled. - * - * Upon receiving this event, the client should destroy the - * zwp_linux_buffer_params_v1 object. - */ void (*failed)(void *data, struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1); }; -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ static inline int zwp_linux_buffer_params_v1_add_listener(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, const struct zwp_linux_buffer_params_v1_listener *listener, void *data) @@ -626,44 +196,21 @@ zwp_linux_buffer_params_v1_add_listener(struct zwp_linux_buffer_params_v1 *zwp_l #define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED 3 #define ZWP_LINUX_BUFFER_PARAMS_V1_SET_SAMPLING_DEVICE 4 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_CREATED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_FAILED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_SET_SAMPLING_DEVICE_SINCE_VERSION 6 -/** @ingroup iface_zwp_linux_buffer_params_v1 */ static inline void zwp_linux_buffer_params_v1_set_user_data(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) zwp_linux_buffer_params_v1, user_data); } -/** @ingroup iface_zwp_linux_buffer_params_v1 */ static inline void * zwp_linux_buffer_params_v1_get_user_data(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1) { @@ -676,12 +223,6 @@ zwp_linux_buffer_params_v1_get_version(struct zwp_linux_buffer_params_v1 *zwp_li return wl_proxy_get_version((struct wl_proxy *) zwp_linux_buffer_params_v1); } -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * Cleans up the temporary data sent to the server for dmabuf-based - * wl_buffer creation. - */ static inline void zwp_linux_buffer_params_v1_destroy(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1) { @@ -689,29 +230,6 @@ zwp_linux_buffer_params_v1_destroy(struct zwp_linux_buffer_params_v1 *zwp_linux_ ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_linux_buffer_params_v1), WL_MARSHAL_FLAG_DESTROY); } -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * This request adds one dmabuf to the set in this - * zwp_linux_buffer_params_v1. - * - * The 64-bit unsigned value combined from modifier_hi and modifier_lo - * is the dmabuf layout modifier. DRM AddFB2 ioctl calls this the - * fb modifier, which is defined in drm_mode.h of Linux UAPI. - * This is an opaque token. Drivers use this token to express tiling, - * compression, etc. driver-specific modifications to the base format - * defined by the DRM fourcc code. - * - * Starting from version 4, the invalid_format protocol error is sent if - * the format + modifier pair was not advertised as supported. - * - * Starting from version 5, the invalid_format protocol error is sent if - * all planes don't use the same modifier. - * - * This request raises the PLANE_IDX error if plane_idx is too large. - * The error PLANE_SET is raised if attempting to set a plane that - * was already set. - */ static inline void zwp_linux_buffer_params_v1_add(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, int32_t fd, uint32_t plane_idx, uint32_t offset, uint32_t stride, uint32_t modifier_hi, uint32_t modifier_lo) { @@ -719,69 +237,6 @@ zwp_linux_buffer_params_v1_add(struct zwp_linux_buffer_params_v1 *zwp_linux_buff ZWP_LINUX_BUFFER_PARAMS_V1_ADD, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_linux_buffer_params_v1), 0, fd, plane_idx, offset, stride, modifier_hi, modifier_lo); } -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * This asks for creation of a wl_buffer from the added dmabuf - * buffers. The wl_buffer is not created immediately but returned via - * the 'created' event if the dmabuf sharing succeeds. The sharing - * may fail at runtime for reasons a client cannot predict, in - * which case the 'failed' event is triggered. - * - * The 'format' argument is a DRM_FORMAT code, as defined by the - * libdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the - * authoritative source on how the format codes should work. - * - * The 'flags' is a bitfield of the flags defined in enum "flags". - * 'y_invert' means that the image needs to be y-flipped. - * - * Flag 'interlaced' means that the frame in the buffer is not - * progressive as usual, but interlaced. An interlaced buffer as - * supported here must always contain both top and bottom fields. - * The top field always begins on the first pixel row. The temporal - * ordering between the two fields is top field first, unless - * 'bottom_first' is specified. It is undefined whether 'bottom_first' - * is ignored if 'interlaced' is not set. - * - * This protocol does not convey any information about field rate, - * duration, or timing, other than the relative ordering between the - * two fields in one buffer. A compositor may have to estimate the - * intended field rate from the incoming buffer rate. It is undefined - * whether the time of receiving wl_surface.commit with a new buffer - * attached, applying the wl_surface state, wl_surface.frame callback - * trigger, presentation, or any other point in the compositor cycle - * is used to measure the frame or field times. There is no support - * for detecting missed or late frames/fields/buffers either, and - * there is no support whatsoever for cooperating with interlaced - * compositor output. - * - * The composited image quality resulting from the use of interlaced - * buffers is explicitly undefined. A compositor may use elaborate - * hardware features or software to deinterlace and create progressive - * output frames from a sequence of interlaced input buffers, or it - * may produce substandard image quality. However, compositors that - * cannot guarantee reasonable image quality in all cases are recommended - * to just reject all interlaced buffers. - * - * Any argument errors, including non-positive width or height, - * mismatch between the number of planes and the format, bad - * format, bad offset or stride, may be indicated by fatal protocol - * errors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, - * OUT_OF_BOUNDS. - * - * Dmabuf import errors in the server that are not obvious client - * bugs are returned via the 'failed' event as non-fatal. This - * allows attempting dmabuf sharing and falling back in the client - * if it fails. - * - * This request can be sent only once in the object's lifetime, after - * which the only legal request is destroy. This object should be - * destroyed after issuing a 'create' request. Attempting to use this - * object after issuing 'create' raises the ALREADY_USED protocol error. - * - * It is not mandatory to issue 'create'. If a client wants to - * cancel the buffer creation, it can just destroy this object. - */ static inline void zwp_linux_buffer_params_v1_create(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, int32_t width, int32_t height, uint32_t format, uint32_t flags) { @@ -789,33 +244,6 @@ zwp_linux_buffer_params_v1_create(struct zwp_linux_buffer_params_v1 *zwp_linux_b ZWP_LINUX_BUFFER_PARAMS_V1_CREATE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_linux_buffer_params_v1), 0, width, height, format, flags); } -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * This asks for immediate creation of a wl_buffer by importing the - * added dmabufs. - * - * In case of import success, no event is sent from the server, and the - * wl_buffer is ready to be used by the client. - * - * Upon import failure, either of the following may happen, as seen fit - * by the implementation: - * - the client is terminated with one of the following fatal protocol - * errors: - * - INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS, - * in case of argument errors such as mismatch between the number - * of planes and the format, bad format, non-positive width or - * height, or bad offset or stride. - * - INVALID_WL_BUFFER, in case the cause for failure is unknown or - * platform specific. - * - the server creates an invalid wl_buffer, marks it as failed and - * sends a 'failed' event to the client. The result of using this - * invalid wl_buffer as an argument in any request by the client is - * defined by the compositor implementation. - * - * This takes the same arguments as a 'create' request, and obeys the - * same restrictions. - */ static inline struct wl_buffer * zwp_linux_buffer_params_v1_create_immed(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, int32_t width, int32_t height, uint32_t format, uint32_t flags) { @@ -827,23 +255,6 @@ zwp_linux_buffer_params_v1_create_immed(struct zwp_linux_buffer_params_v1 *zwp_l return (struct wl_buffer *) buffer_id; } -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * Set the device the compositor should import the dmabufs to for sampling - * in the next create or create_immed request. - * - * To avoid race conditions when the compositor removes a device from the - * tranches, it is not a protocol error if the device hasn't been advertised - * by the compositor in a tranche with the sampling flag, but the import is - * likely to fail in that case. - * - * If the client doesn't know a suitable target device, it shouldn't set one, - * and the compositor should attempt import on all devices it supports. - * - * If the array is too small to contain a dev_t or larger than required, the - * invalid_dev_t_size error will be emitted. - */ static inline void zwp_linux_buffer_params_v1_set_sampling_device(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, struct wl_array *device) { @@ -854,221 +265,36 @@ zwp_linux_buffer_params_v1_set_sampling_device(struct zwp_linux_buffer_params_v1 #ifndef ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_ENUM #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_ENUM enum zwp_linux_dmabuf_feedback_v1_tranche_flags { - /** - * direct scan-out tranche - * - * The scanout flag is a hint that direct scan-out may be - * attempted by the compositor on the target device if the client - * appropriately allocates a buffer. How to allocate a buffer that - * can be scanned out on the target device is - * implementation-defined. - * @since 4 - */ ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SCANOUT = 1, - /** - * sampling tranche - * - * The sampling flag describes that the compositor is able to - * efficiently sample from buffers imported to the target device if - * the client appropriately allocates a buffer. How to allocate a - * buffer that can be efficiently sampled on the target device is - * implementation defined. - * @since 6 - */ ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SAMPLING = 2, }; -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SCANOUT_SINCE_VERSION 4 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SAMPLING_SINCE_VERSION 6 -#endif /* ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_ENUM */ +#endif -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * @struct zwp_linux_dmabuf_feedback_v1_listener - */ struct zwp_linux_dmabuf_feedback_v1_listener { - /** - * all feedback has been sent - * - * This event is sent after all parameters of a - * zwp_linux_dmabuf_feedback_v1 object have been sent. - * - * This allows changes to the zwp_linux_dmabuf_feedback_v1 - * parameters to be seen as atomic, even if they happen via - * multiple events. - */ void (*done)(void *data, struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1); - /** - * format and modifier table - * - * This event provides a file descriptor which can be - * memory-mapped to access the format and modifier table. - * - * The table contains a tightly packed array of consecutive format - * + modifier pairs. Each pair is 16 bytes wide. It contains a - * format as a 32-bit unsigned integer, followed by 4 bytes of - * unused padding, and a modifier as a 64-bit unsigned integer. The - * native endianness is used. - * - * The client must map the file descriptor in read-only private - * mode. - * - * Compositors are not allowed to mutate the table file contents - * once this event has been sent. Instead, compositors must create - * a new, separate table file and re-send feedback parameters. - * Compositors are allowed to store duplicate format + modifier - * pairs in the table. - * @param fd table file descriptor - * @param size table size, in bytes - */ void (*format_table)(void *data, struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1, int32_t fd, uint32_t size); - /** - * preferred main device - * - * This event advertises the main device that the server prefers - * to use when direct scan-out to the target device isn't possible. - * The advertised main device may be different for each - * zwp_linux_dmabuf_feedback_v1 object, and may change over time. - * - * There is exactly one main device. The compositor must send at - * least one preference tranche with tranche_target_device equal to - * main_device. - * - * Clients need to create buffers that the main device can import - * and read from, otherwise creating the dmabuf wl_buffer will fail - * (see the zwp_linux_buffer_params_v1.create and create_immed - * requests for details). The main device will also likely be kept - * active by the compositor, so clients can use it instead of - * waking up another device for power savings. - * - * In general the device is a DRM node. The DRM node type (primary - * vs. render) is unspecified. Clients must not rely on the - * compositor sending a particular node type. Clients cannot check - * two devices for equality by comparing the dev_t value. - * - * If explicit modifiers are not supported and the client performs - * buffer allocations on a different device than the main device, - * then the client must force the buffer to have a linear layout. - * - * With version 6 and above, this event is no longer sent. Clients - * should use a device with the sampling flag in the tranches - * instead. - * @param device device dev_t value - * @deprecated Deprecated since version 6 - */ void (*main_device)(void *data, struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1, struct wl_array *device); - /** - * a preference tranche has been sent - * - * This event splits tranche_target_device and tranche_formats - * events into preference tranches. It is sent after a set of - * tranche_target_device and tranche_formats events; it represents - * the end of a tranche. The next tranche will have a lower - * preference. - */ void (*tranche_done)(void *data, struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1); - /** - * target device - * - * This event advertises the target device that the server - * prefers to use for a buffer created given this tranche. The - * advertised target device may be different for each preference - * tranche, and may change over time. - * - * There is exactly one target device per tranche. - * - * The target device may be a scan-out device, for example if the - * compositor prefers to directly scan-out a buffer created given - * this tranche. The target device may be a rendering device, for - * example if the compositor prefers to texture from said buffer. - * - * The client can use this hint to allocate the buffer in a way - * that makes it accessible from the target device, ideally - * directly. The buffer must still be accessible from a device with - * the sampling flag, either through direct import or a potentially - * more expensive fallback path. If the buffer can't be directly - * imported for sampling, then clients must be prepared for the - * compositor changing the tranche priority or making wl_buffer - * creation fail (see the zwp_linux_buffer_params_v1.create and - * create_immed requests for details). - * - * If the device is a DRM node, the DRM node type (primary vs. - * render) is unspecified. Clients must not rely on the compositor - * sending a particular node type. Clients cannot check two devices - * for equality by comparing the dev_t value. - * - * This event is tied to a preference tranche, see the tranche_done - * event. - * @param device device dev_t value - */ void (*tranche_target_device)(void *data, struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1, struct wl_array *device); - /** - * supported buffer format modifiers - * - * This event advertises the format + modifier combinations that - * the compositor supports. - * - * It carries an array of indices, each referring to a format + - * modifier pair in the last received format table (see the - * format_table event). Each index is a 16-bit unsigned integer in - * native endianness. - * - * For legacy support, DRM_FORMAT_MOD_INVALID is an allowed - * modifier. It indicates that the server can support the format - * with an implicit modifier. When a buffer has - * DRM_FORMAT_MOD_INVALID as its modifier, it is as if no explicit - * modifier is specified. The effective modifier will be derived - * from the dmabuf. - * - * A compositor that sends valid modifiers and - * DRM_FORMAT_MOD_INVALID for a given format supports both explicit - * modifiers and implicit modifiers. - * - * Compositors must not send duplicate format + modifier pairs - * within the same tranche or across two different tranches with - * the same target device and flags. - * - * This event is tied to a preference tranche, see the tranche_done - * event. - * - * For the definition of the format and modifier codes, see the - * zwp_linux_buffer_params_v1.create request. - * @param indices array of 16-bit indexes - */ void (*tranche_formats)(void *data, struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1, struct wl_array *indices); - /** - * tranche flags - * - * This event sets tranche-specific flags. This event is tied to - * a preference tranche, see the tranche_done event. With version 6 - * and above, the compositor must set at least one flag in each - * tranche. - * @param flags tranche flags - */ void (*tranche_flags)(void *data, struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1, uint32_t flags); }; -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ static inline int zwp_linux_dmabuf_feedback_v1_add_listener(struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1, const struct zwp_linux_dmabuf_feedback_v1_listener *listener, void *data) @@ -1079,48 +305,22 @@ zwp_linux_dmabuf_feedback_v1_add_listener(struct zwp_linux_dmabuf_feedback_v1 *z #define ZWP_LINUX_DMABUF_FEEDBACK_V1_DESTROY 0 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_FORMAT_TABLE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_MAIN_DEVICE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_TARGET_DEVICE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FORMATS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_DESTROY_SINCE_VERSION 1 -/** @ingroup iface_zwp_linux_dmabuf_feedback_v1 */ static inline void zwp_linux_dmabuf_feedback_v1_set_user_data(struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) zwp_linux_dmabuf_feedback_v1, user_data); } -/** @ingroup iface_zwp_linux_dmabuf_feedback_v1 */ static inline void * zwp_linux_dmabuf_feedback_v1_get_user_data(struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1) { @@ -1133,12 +333,6 @@ zwp_linux_dmabuf_feedback_v1_get_version(struct zwp_linux_dmabuf_feedback_v1 *zw return wl_proxy_get_version((struct wl_proxy *) zwp_linux_dmabuf_feedback_v1); } -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * - * Using this request a client can tell the server that it is not going to - * use the zwp_linux_dmabuf_feedback_v1 object anymore. - */ static inline void zwp_linux_dmabuf_feedback_v1_destroy(struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1) { diff --git a/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-protocol.c b/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-protocol.c index 7d2c38984e..f1014b9816 100644 --- a/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright © 2014, 2015 Collabora, Ltd. * @@ -29,7 +27,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-server-protocol.h index 7d87d90ace..849cdbe1d7 100644 --- a/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/linux-dmabuf-v1-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef LINUX_DMABUF_V1_SERVER_PROTOCOL_H #define LINUX_DMABUF_V1_SERVER_PROTOCOL_H @@ -14,14 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_linux_dmabuf_v1 The linux_dmabuf_v1 protocol - * @section page_ifaces_linux_dmabuf_v1 Interfaces - * - @subpage page_iface_zwp_linux_dmabuf_v1 - factory for creating dmabuf-based wl_buffers - * - @subpage page_iface_zwp_linux_buffer_params_v1 - parameters for creating a dmabuf-based wl_buffer - * - @subpage page_iface_zwp_linux_dmabuf_feedback_v1 - dmabuf feedback +/* * @section page_copyright_linux_dmabuf_v1 Copyright - *
  *
  * Copyright © 2014, 2015 Collabora, Ltd.
  *
@@ -43,8 +36,14 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + + struct wl_buffer; struct wl_surface; struct zwp_linux_buffer_params_v1; @@ -53,322 +52,26 @@ struct zwp_linux_dmabuf_v1; #ifndef ZWP_LINUX_DMABUF_V1_INTERFACE #define ZWP_LINUX_DMABUF_V1_INTERFACE -/** - * @page page_iface_zwp_linux_dmabuf_v1 zwp_linux_dmabuf_v1 - * @section page_iface_zwp_linux_dmabuf_v1_desc Description - * - * This interface offers ways to create generic dmabuf-based wl_buffers. - * - * For more information about dmabuf, see: - * https://www.kernel.org/doc/html/next/userspace-api/dma-buf-alloc-exchange.html - * - * Clients can use the get_surface_feedback request to get dmabuf feedback - * for a particular surface. If the client wants to retrieve feedback not - * tied to a surface, they can use the get_default_feedback request. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * However, when the underlying graphics stack fails to deliver the - * promise, because of e.g. a device hot-unplug which raises internal - * errors, after the wl_buffer has been successfully created the - * compositor must not raise protocol errors to the client when dmabuf - * import later fails. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_buffer_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * For all DRM formats and unless specified in another protocol extension, - * pre-multiplied alpha is used for pixel values. - * - * Unless specified otherwise in another protocol extension, implicit - * synchronization is used. In other words, compositors and clients must - * wait and signal fences implicitly passed via the DMA-BUF's reservation - * mechanism. - * @section page_iface_zwp_linux_dmabuf_v1_api API - * See @ref iface_zwp_linux_dmabuf_v1. - */ -/** - * @defgroup iface_zwp_linux_dmabuf_v1 The zwp_linux_dmabuf_v1 interface - * - * This interface offers ways to create generic dmabuf-based wl_buffers. - * - * For more information about dmabuf, see: - * https://www.kernel.org/doc/html/next/userspace-api/dma-buf-alloc-exchange.html - * - * Clients can use the get_surface_feedback request to get dmabuf feedback - * for a particular surface. If the client wants to retrieve feedback not - * tied to a surface, they can use the get_default_feedback request. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * However, when the underlying graphics stack fails to deliver the - * promise, because of e.g. a device hot-unplug which raises internal - * errors, after the wl_buffer has been successfully created the - * compositor must not raise protocol errors to the client when dmabuf - * import later fails. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_buffer_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * For all DRM formats and unless specified in another protocol extension, - * pre-multiplied alpha is used for pixel values. - * - * Unless specified otherwise in another protocol extension, implicit - * synchronization is used. In other words, compositors and clients must - * wait and signal fences implicitly passed via the DMA-BUF's reservation - * mechanism. - */ extern const struct wl_interface zwp_linux_dmabuf_v1_interface; #endif #ifndef ZWP_LINUX_BUFFER_PARAMS_V1_INTERFACE #define ZWP_LINUX_BUFFER_PARAMS_V1_INTERFACE -/** - * @page page_iface_zwp_linux_buffer_params_v1 zwp_linux_buffer_params_v1 - * @section page_iface_zwp_linux_buffer_params_v1_desc Description - * - * This temporary object is a collection of dmabufs and other - * parameters that together form a single logical buffer. The temporary - * object may eventually create one wl_buffer unless cancelled by - * destroying it before requesting 'create'. - * - * Single-planar formats only require one dmabuf, however - * multi-planar formats may require more than one dmabuf. For all - * formats, an 'add' request must be called once per plane (even if the - * underlying dmabuf fd is identical). - * - * You must use consecutive plane indices ('plane_idx' argument for 'add') - * from zero to the number of planes used by the drm_fourcc format code. - * All planes required by the format must be given exactly once, but can - * be given in any order. Each plane index can only be set once; subsequent - * calls with a plane index which has already been set will result in a - * plane_set error being generated. - * @section page_iface_zwp_linux_buffer_params_v1_api API - * See @ref iface_zwp_linux_buffer_params_v1. - */ -/** - * @defgroup iface_zwp_linux_buffer_params_v1 The zwp_linux_buffer_params_v1 interface - * - * This temporary object is a collection of dmabufs and other - * parameters that together form a single logical buffer. The temporary - * object may eventually create one wl_buffer unless cancelled by - * destroying it before requesting 'create'. - * - * Single-planar formats only require one dmabuf, however - * multi-planar formats may require more than one dmabuf. For all - * formats, an 'add' request must be called once per plane (even if the - * underlying dmabuf fd is identical). - * - * You must use consecutive plane indices ('plane_idx' argument for 'add') - * from zero to the number of planes used by the drm_fourcc format code. - * All planes required by the format must be given exactly once, but can - * be given in any order. Each plane index can only be set once; subsequent - * calls with a plane index which has already been set will result in a - * plane_set error being generated. - */ extern const struct wl_interface zwp_linux_buffer_params_v1_interface; #endif #ifndef ZWP_LINUX_DMABUF_FEEDBACK_V1_INTERFACE #define ZWP_LINUX_DMABUF_FEEDBACK_V1_INTERFACE -/** - * @page page_iface_zwp_linux_dmabuf_feedback_v1 zwp_linux_dmabuf_feedback_v1 - * @section page_iface_zwp_linux_dmabuf_feedback_v1_desc Description - * - * This object advertises dmabuf parameters feedback. This includes the - * preferred devices and the supported formats/modifiers. - * - * The parameters are sent once when this object is created and whenever they - * change. The done event is always sent once after all parameters have been - * sent. When a single parameter changes, all parameters are re-sent by the - * compositor. - * - * Compositors can re-send the parameters when the current client buffer - * allocations are sub-optimal. Compositors should not re-send the - * parameters if re-allocating the buffers would not result in a more optimal - * configuration. In particular, compositors should avoid sending the exact - * same parameters multiple times in a row. - * - * The tranche_target_device and tranche_formats events are grouped by - * tranches of preference. For each tranche, a tranche_target_device, one - * tranche_flags and one or more tranche_formats events are sent, followed - * by a tranche_done event finishing the list. The tranches are sent in - * descending order of preference. All formats and modifiers in the same - * tranche have the same preference. - * - * To send parameters, the compositor sends one main_device event (unless - * the client bound version 6 or above), tranches (each consisting of one - * tranche_target_device event, one tranche_flags event, tranche_formats - * events and then a tranche_done event), then one done event. - * - * With version 6 and above, the compositor must always advertise at least - * one tranche with the sampling flag set. - * - * The compositor sends a format_table event at least once for each dmabuf - * parameters feedback object, before any tranche events. Unless the format - * table contents change later, the compositor is free not to send another - * format_table event for the same dmabuf parameters feedback object. - * @section page_iface_zwp_linux_dmabuf_feedback_v1_api API - * See @ref iface_zwp_linux_dmabuf_feedback_v1. - */ -/** - * @defgroup iface_zwp_linux_dmabuf_feedback_v1 The zwp_linux_dmabuf_feedback_v1 interface - * - * This object advertises dmabuf parameters feedback. This includes the - * preferred devices and the supported formats/modifiers. - * - * The parameters are sent once when this object is created and whenever they - * change. The done event is always sent once after all parameters have been - * sent. When a single parameter changes, all parameters are re-sent by the - * compositor. - * - * Compositors can re-send the parameters when the current client buffer - * allocations are sub-optimal. Compositors should not re-send the - * parameters if re-allocating the buffers would not result in a more optimal - * configuration. In particular, compositors should avoid sending the exact - * same parameters multiple times in a row. - * - * The tranche_target_device and tranche_formats events are grouped by - * tranches of preference. For each tranche, a tranche_target_device, one - * tranche_flags and one or more tranche_formats events are sent, followed - * by a tranche_done event finishing the list. The tranches are sent in - * descending order of preference. All formats and modifiers in the same - * tranche have the same preference. - * - * To send parameters, the compositor sends one main_device event (unless - * the client bound version 6 or above), tranches (each consisting of one - * tranche_target_device event, one tranche_flags event, tranche_formats - * events and then a tranche_done event), then one done event. - * - * With version 6 and above, the compositor must always advertise at least - * one tranche with the sampling flag set. - * - * The compositor sends a format_table event at least once for each dmabuf - * parameters feedback object, before any tranche events. Unless the format - * table contents change later, the compositor is free not to send another - * format_table event for the same dmabuf parameters feedback object. - */ extern const struct wl_interface zwp_linux_dmabuf_feedback_v1_interface; #endif -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * @struct zwp_linux_dmabuf_v1_interface - */ struct zwp_linux_dmabuf_v1_interface { - /** - * unbind the factory - * - * Objects created through this interface, especially wl_buffers, - * will remain valid. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * create a temporary object for buffer parameters - * - * This temporary object is used to collect multiple dmabuf - * handles into a single batch to create a wl_buffer. It can only - * be used once and should be destroyed after a 'created' or - * 'failed' event has been received. - * @param params_id id for the newly created zwp_linux_buffer_params_v1 - */ void (*create_params)(struct wl_client *client, struct wl_resource *resource, uint32_t params_id); - /** - * get default feedback - * - * This request creates a new zwp_linux_dmabuf_feedback_v1 object - * not bound to a particular surface. This object will deliver - * feedback about dmabuf parameters to use if the client doesn't - * support per-surface feedback (see get_surface_feedback). - * @since 4 - */ void (*get_default_feedback)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * get feedback for a surface - * - * This request creates a new zwp_linux_dmabuf_feedback_v1 object - * for the specified wl_surface. This object will deliver feedback - * about dmabuf parameters to use for buffers attached to this - * surface. - * - * If the surface is destroyed before the - * zwp_linux_dmabuf_feedback_v1 object, the feedback object becomes - * inert. - * @since 4 - */ void (*get_surface_feedback)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -378,52 +81,20 @@ struct zwp_linux_dmabuf_v1_interface { #define ZWP_LINUX_DMABUF_V1_FORMAT 0 #define ZWP_LINUX_DMABUF_V1_MODIFIER 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_FORMAT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION 3 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_CREATE_PARAMS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION 4 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ #define ZWP_LINUX_DMABUF_V1_GET_SURFACE_FEEDBACK_SINCE_VERSION 4 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * Sends an format event to the client owning the resource. - * @param resource_ The client's resource - * @param format DRM_FORMAT code - */ static inline void zwp_linux_dmabuf_v1_send_format(struct wl_resource *resource_, uint32_t format) { wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_V1_FORMAT, format); } -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * Sends an modifier event to the client owning the resource. - * @param resource_ The client's resource - * @param format DRM_FORMAT code - * @param modifier_hi high 32 bits of layout modifier - * @param modifier_lo low 32 bits of layout modifier - */ static inline void zwp_linux_dmabuf_v1_send_modifier(struct wl_resource *resource_, uint32_t format, uint32_t modifier_hi, uint32_t modifier_lo) { @@ -433,54 +104,20 @@ zwp_linux_dmabuf_v1_send_modifier(struct wl_resource *resource_, uint32_t format #ifndef ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM #define ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM enum zwp_linux_buffer_params_v1_error { - /** - * the zwp_linux_buffer_params_v1 object has already been used to create a wl_buffer - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ALREADY_USED = 0, - /** - * plane index out of bounds - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_IDX = 1, - /** - * the plane index was already set - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_SET = 2, - /** - * missing or too many planes to create a buffer - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INCOMPLETE = 3, - /** - * format not supported - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT = 4, - /** - * invalid width or height - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_DIMENSIONS = 5, - /** - * offset + stride * height goes out of dmabuf bounds - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS = 6, - /** - * invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER = 7, - /** - * an array with mismatching size for a dev_t was used - */ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_DEV_T_SIZE = 8, }; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM */ +#endif #ifndef ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM_IS_VALID #define ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * Validate a zwp_linux_buffer_params_v1 error value. - * - * @return true on success, false on error. - * @ref zwp_linux_buffer_params_v1_error - */ static inline bool zwp_linux_buffer_params_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -506,35 +143,19 @@ zwp_linux_buffer_params_v1_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM_IS_VALID */ +#endif #ifndef ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM #define ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM enum zwp_linux_buffer_params_v1_flags { - /** - * contents are y-inverted - */ ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT = 1, - /** - * content is interlaced - */ ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_INTERLACED = 2, - /** - * bottom field first - */ ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST = 4, }; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM */ +#endif #ifndef ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM_IS_VALID #define ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM_IS_VALID -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * Validate a zwp_linux_buffer_params_v1 flags value. - * - * @return true on success, false on error. - * @ref zwp_linux_buffer_params_v1_flags - */ static inline bool zwp_linux_buffer_params_v1_flags_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -546,51 +167,11 @@ zwp_linux_buffer_params_v1_flags_is_valid(uint32_t value, uint32_t version) { valid |= ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST; return (value & ~valid) == 0; } -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * @struct zwp_linux_buffer_params_v1_interface - */ struct zwp_linux_buffer_params_v1_interface { - /** - * delete this object, used or not - * - * Cleans up the temporary data sent to the server for - * dmabuf-based wl_buffer creation. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * add a dmabuf to the temporary set - * - * This request adds one dmabuf to the set in this - * zwp_linux_buffer_params_v1. - * - * The 64-bit unsigned value combined from modifier_hi and - * modifier_lo is the dmabuf layout modifier. DRM AddFB2 ioctl - * calls this the fb modifier, which is defined in drm_mode.h of - * Linux UAPI. This is an opaque token. Drivers use this token to - * express tiling, compression, etc. driver-specific modifications - * to the base format defined by the DRM fourcc code. - * - * Starting from version 4, the invalid_format protocol error is - * sent if the format + modifier pair was not advertised as - * supported. - * - * Starting from version 5, the invalid_format protocol error is - * sent if all planes don't use the same modifier. - * - * This request raises the PLANE_IDX error if plane_idx is too - * large. The error PLANE_SET is raised if attempting to set a - * plane that was already set. - * @param fd dmabuf fd - * @param plane_idx plane index - * @param offset offset in bytes - * @param stride stride in bytes - * @param modifier_hi high 32 bits of layout modifier - * @param modifier_lo low 32 bits of layout modifier - */ void (*add)(struct wl_client *client, struct wl_resource *resource, int32_t fd, @@ -599,112 +180,12 @@ struct zwp_linux_buffer_params_v1_interface { uint32_t stride, uint32_t modifier_hi, uint32_t modifier_lo); - /** - * create a wl_buffer from the given dmabufs - * - * This asks for creation of a wl_buffer from the added dmabuf - * buffers. The wl_buffer is not created immediately but returned - * via the 'created' event if the dmabuf sharing succeeds. The - * sharing may fail at runtime for reasons a client cannot predict, - * in which case the 'failed' event is triggered. - * - * The 'format' argument is a DRM_FORMAT code, as defined by the - * libdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the - * authoritative source on how the format codes should work. - * - * The 'flags' is a bitfield of the flags defined in enum "flags". - * 'y_invert' means that the image needs to be y-flipped. - * - * Flag 'interlaced' means that the frame in the buffer is not - * progressive as usual, but interlaced. An interlaced buffer as - * supported here must always contain both top and bottom fields. - * The top field always begins on the first pixel row. The temporal - * ordering between the two fields is top field first, unless - * 'bottom_first' is specified. It is undefined whether - * 'bottom_first' is ignored if 'interlaced' is not set. - * - * This protocol does not convey any information about field rate, - * duration, or timing, other than the relative ordering between - * the two fields in one buffer. A compositor may have to estimate - * the intended field rate from the incoming buffer rate. It is - * undefined whether the time of receiving wl_surface.commit with a - * new buffer attached, applying the wl_surface state, - * wl_surface.frame callback trigger, presentation, or any other - * point in the compositor cycle is used to measure the frame or - * field times. There is no support for detecting missed or late - * frames/fields/buffers either, and there is no support whatsoever - * for cooperating with interlaced compositor output. - * - * The composited image quality resulting from the use of - * interlaced buffers is explicitly undefined. A compositor may use - * elaborate hardware features or software to deinterlace and - * create progressive output frames from a sequence of interlaced - * input buffers, or it may produce substandard image quality. - * However, compositors that cannot guarantee reasonable image - * quality in all cases are recommended to just reject all - * interlaced buffers. - * - * Any argument errors, including non-positive width or height, - * mismatch between the number of planes and the format, bad - * format, bad offset or stride, may be indicated by fatal protocol - * errors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, - * OUT_OF_BOUNDS. - * - * Dmabuf import errors in the server that are not obvious client - * bugs are returned via the 'failed' event as non-fatal. This - * allows attempting dmabuf sharing and falling back in the client - * if it fails. - * - * This request can be sent only once in the object's lifetime, - * after which the only legal request is destroy. This object - * should be destroyed after issuing a 'create' request. Attempting - * to use this object after issuing 'create' raises the - * ALREADY_USED protocol error. - * - * It is not mandatory to issue 'create'. If a client wants to - * cancel the buffer creation, it can just destroy this object. - * @param width base plane width in pixels - * @param height base plane height in pixels - * @param format DRM_FORMAT code - * @param flags see enum flags - */ void (*create)(struct wl_client *client, struct wl_resource *resource, int32_t width, int32_t height, uint32_t format, uint32_t flags); - /** - * immediately create a wl_buffer from the given dmabufs - * - * This asks for immediate creation of a wl_buffer by importing - * the added dmabufs. - * - * In case of import success, no event is sent from the server, and - * the wl_buffer is ready to be used by the client. - * - * Upon import failure, either of the following may happen, as seen - * fit by the implementation: - the client is terminated with one - * of the following fatal protocol errors: - INCOMPLETE, - * INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS, in case of - * argument errors such as mismatch between the number of planes - * and the format, bad format, non-positive width or height, or bad - * offset or stride. - INVALID_WL_BUFFER, in case the cause for - * failure is unknown or platform specific. - the server creates an - * invalid wl_buffer, marks it as failed and sends a 'failed' event - * to the client. The result of using this invalid wl_buffer as an - * argument in any request by the client is defined by the - * compositor implementation. - * - * This takes the same arguments as a 'create' request, and obeys - * the same restrictions. - * @param buffer_id id for the newly created wl_buffer - * @param width base plane width in pixels - * @param height base plane height in pixels - * @param format DRM_FORMAT code - * @param flags see enum flags - * @since 2 - */ void (*create_immed)(struct wl_client *client, struct wl_resource *resource, uint32_t buffer_id, @@ -712,26 +193,6 @@ struct zwp_linux_buffer_params_v1_interface { int32_t height, uint32_t format, uint32_t flags); - /** - * set the target device of the wl_buffer - * - * Set the device the compositor should import the dmabufs to for - * sampling in the next create or create_immed request. - * - * To avoid race conditions when the compositor removes a device - * from the tranches, it is not a protocol error if the device - * hasn't been advertised by the compositor in a tranche with the - * sampling flag, but the import is likely to fail in that case. - * - * If the client doesn't know a suitable target device, it - * shouldn't set one, and the compositor should attempt import on - * all devices it supports. - * - * If the array is too small to contain a dev_t or larger than - * required, the invalid_dev_t_size error will be emitted. - * @param device device dev_t value - * @since 6 - */ void (*set_sampling_device)(struct wl_client *client, struct wl_resource *resource, struct wl_array *device); @@ -740,53 +201,21 @@ struct zwp_linux_buffer_params_v1_interface { #define ZWP_LINUX_BUFFER_PARAMS_V1_CREATED 0 #define ZWP_LINUX_BUFFER_PARAMS_V1_FAILED 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_CREATED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_FAILED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ #define ZWP_LINUX_BUFFER_PARAMS_V1_SET_SAMPLING_DEVICE_SINCE_VERSION 6 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * Sends an created event to the client owning the resource. - * @param resource_ The client's resource - * @param buffer id for the the newly created wl_buffer - */ static inline void zwp_linux_buffer_params_v1_send_created(struct wl_resource *resource_, struct wl_resource *buffer) { wl_resource_post_event(resource_, ZWP_LINUX_BUFFER_PARAMS_V1_CREATED, buffer); } -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * Sends an failed event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_linux_buffer_params_v1_send_failed(struct wl_resource *resource_) { @@ -796,48 +225,15 @@ zwp_linux_buffer_params_v1_send_failed(struct wl_resource *resource_) #ifndef ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_ENUM #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_ENUM enum zwp_linux_dmabuf_feedback_v1_tranche_flags { - /** - * direct scan-out tranche - * - * The scanout flag is a hint that direct scan-out may be - * attempted by the compositor on the target device if the client - * appropriately allocates a buffer. How to allocate a buffer that - * can be scanned out on the target device is - * implementation-defined. - * @since 4 - */ ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SCANOUT = 1, - /** - * sampling tranche - * - * The sampling flag describes that the compositor is able to - * efficiently sample from buffers imported to the target device if - * the client appropriately allocates a buffer. How to allocate a - * buffer that can be efficiently sampled on the target device is - * implementation defined. - * @since 6 - */ ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SAMPLING = 2, }; -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SCANOUT_SINCE_VERSION 4 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SAMPLING_SINCE_VERSION 6 -#endif /* ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_ENUM */ +#endif #ifndef ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_ENUM_IS_VALID #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_ENUM_IS_VALID -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * Validate a zwp_linux_dmabuf_feedback_v1 tranche_flags value. - * - * @return true on success, false on error. - * @ref zwp_linux_dmabuf_feedback_v1_tranche_flags - */ static inline bool zwp_linux_dmabuf_feedback_v1_tranche_flags_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -847,19 +243,9 @@ zwp_linux_dmabuf_feedback_v1_tranche_flags_is_valid(uint32_t value, uint32_t ver valid |= ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SAMPLING; return (value & ~valid) == 0; } -#endif /* ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * @struct zwp_linux_dmabuf_feedback_v1_interface - */ struct zwp_linux_dmabuf_feedback_v1_interface { - /** - * destroy the feedback object - * - * Using this request a client can tell the server that it is not - * going to use the zwp_linux_dmabuf_feedback_v1 object anymore. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); }; @@ -872,117 +258,52 @@ struct zwp_linux_dmabuf_feedback_v1_interface { #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FORMATS 5 #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS 6 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_FORMAT_TABLE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_MAIN_DEVICE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_TARGET_DEVICE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FORMATS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - */ #define ZWP_LINUX_DMABUF_FEEDBACK_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_linux_dmabuf_feedback_v1_send_done(struct wl_resource *resource_) { wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_FEEDBACK_V1_DONE); } -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * Sends an format_table event to the client owning the resource. - * @param resource_ The client's resource - * @param fd table file descriptor - * @param size table size, in bytes - */ static inline void zwp_linux_dmabuf_feedback_v1_send_format_table(struct wl_resource *resource_, int32_t fd, uint32_t size) { wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_FEEDBACK_V1_FORMAT_TABLE, fd, size); } -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * Sends an main_device event to the client owning the resource. - * @param resource_ The client's resource - * @param device device dev_t value - */ static inline void zwp_linux_dmabuf_feedback_v1_send_main_device(struct wl_resource *resource_, struct wl_array *device) { wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_FEEDBACK_V1_MAIN_DEVICE, device); } -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * Sends an tranche_done event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_linux_dmabuf_feedback_v1_send_tranche_done(struct wl_resource *resource_) { wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_DONE); } -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * Sends an tranche_target_device event to the client owning the resource. - * @param resource_ The client's resource - * @param device device dev_t value - */ static inline void zwp_linux_dmabuf_feedback_v1_send_tranche_target_device(struct wl_resource *resource_, struct wl_array *device) { wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_TARGET_DEVICE, device); } -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * Sends an tranche_formats event to the client owning the resource. - * @param resource_ The client's resource - * @param indices array of 16-bit indexes - */ static inline void zwp_linux_dmabuf_feedback_v1_send_tranche_formats(struct wl_resource *resource_, struct wl_array *indices) { wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FORMATS, indices); } -/** - * @ingroup iface_zwp_linux_dmabuf_feedback_v1 - * Sends an tranche_flags event to the client owning the resource. - * @param resource_ The client's resource - * @param flags tranche flags - */ static inline void zwp_linux_dmabuf_feedback_v1_send_tranche_flags(struct wl_resource *resource_, uint32_t flags) { diff --git a/app/src/main/cpp/waylandcomp/generated/pointer-constraints-unstable-v1-protocol.c b/app/src/main/cpp/waylandcomp/generated/pointer-constraints-unstable-v1-protocol.c index 89ea811bad..8a697736ad 100644 --- a/app/src/main/cpp/waylandcomp/generated/pointer-constraints-unstable-v1-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/pointer-constraints-unstable-v1-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright © 2014 Jonas Ådahl * Copyright © 2015 Red Hat Inc. @@ -30,7 +28,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/pointer-constraints-unstable-v1-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/pointer-constraints-unstable-v1-server-protocol.h index 8aeb921410..599797e8aa 100644 --- a/app/src/main/cpp/waylandcomp/generated/pointer-constraints-unstable-v1-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/pointer-constraints-unstable-v1-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef POINTER_CONSTRAINTS_UNSTABLE_V1_SERVER_PROTOCOL_H #define POINTER_CONSTRAINTS_UNSTABLE_V1_SERVER_PROTOCOL_H @@ -14,37 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_pointer_constraints_unstable_v1 The pointer_constraints_unstable_v1 protocol - * protocol for constraining pointer motions - * - * @section page_desc_pointer_constraints_unstable_v1 Description - * - * This protocol specifies a set of interfaces used for adding constraints to - * the motion of a pointer. Possible constraints include confining pointer - * motions to a given region, or locking it to its current position. - * - * In order to constrain the pointer, a client must first bind the global - * interface "wp_pointer_constraints" which, if a compositor supports pointer - * constraints, is exposed by the registry. Using the bound global object, the - * client uses the request that corresponds to the type of constraint it wants - * to make. See wp_pointer_constraints for more details. - * - * Warning! The protocol described in this file is experimental and backward - * incompatible changes may be made. Backward compatible changes may be added - * together with the corresponding interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface names and resetting the interface version. Once the protocol - * is to be declared stable, the 'z' prefix and the version number in the - * protocol and interface names are removed and the interface version number is - * reset. - * - * @section page_ifaces_pointer_constraints_unstable_v1 Interfaces - * - @subpage page_iface_zwp_pointer_constraints_v1 - constrain the movement of a pointer - * - @subpage page_iface_zwp_locked_pointer_v1 - receive relative pointer motion events - * - @subpage page_iface_zwp_confined_pointer_v1 - confined pointer object +/* * @section page_copyright_pointer_constraints_unstable_v1 Copyright - *
  *
  * Copyright © 2014      Jonas Ådahl
  * Copyright © 2015      Red Hat Inc.
@@ -67,8 +37,37 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + struct wl_pointer; struct wl_region; struct wl_surface; @@ -78,180 +77,26 @@ struct zwp_pointer_constraints_v1; #ifndef ZWP_POINTER_CONSTRAINTS_V1_INTERFACE #define ZWP_POINTER_CONSTRAINTS_V1_INTERFACE -/** - * @page page_iface_zwp_pointer_constraints_v1 zwp_pointer_constraints_v1 - * @section page_iface_zwp_pointer_constraints_v1_desc Description - * - * The global interface exposing pointer constraining functionality. It - * exposes two requests: lock_pointer for locking the pointer to its - * position, and confine_pointer for locking the pointer to a region. - * - * The lock_pointer and confine_pointer requests create the objects - * wp_locked_pointer and wp_confined_pointer respectively, and the client can - * use these objects to interact with the lock. - * - * For any surface, only one lock or confinement may be active across all - * wl_pointer objects of the same seat. If a lock or confinement is requested - * when another lock or confinement is active or requested on the same surface - * and with any of the wl_pointer objects of the same seat, an - * 'already_constrained' error will be raised. - * @section page_iface_zwp_pointer_constraints_v1_api API - * See @ref iface_zwp_pointer_constraints_v1. - */ -/** - * @defgroup iface_zwp_pointer_constraints_v1 The zwp_pointer_constraints_v1 interface - * - * The global interface exposing pointer constraining functionality. It - * exposes two requests: lock_pointer for locking the pointer to its - * position, and confine_pointer for locking the pointer to a region. - * - * The lock_pointer and confine_pointer requests create the objects - * wp_locked_pointer and wp_confined_pointer respectively, and the client can - * use these objects to interact with the lock. - * - * For any surface, only one lock or confinement may be active across all - * wl_pointer objects of the same seat. If a lock or confinement is requested - * when another lock or confinement is active or requested on the same surface - * and with any of the wl_pointer objects of the same seat, an - * 'already_constrained' error will be raised. - */ extern const struct wl_interface zwp_pointer_constraints_v1_interface; #endif #ifndef ZWP_LOCKED_POINTER_V1_INTERFACE #define ZWP_LOCKED_POINTER_V1_INTERFACE -/** - * @page page_iface_zwp_locked_pointer_v1 zwp_locked_pointer_v1 - * @section page_iface_zwp_locked_pointer_v1_desc Description - * - * The wp_locked_pointer interface represents a locked pointer state. - * - * While the lock of this object is active, the wl_pointer objects of the - * associated seat will not emit any wl_pointer.motion events. - * - * This object will send the event 'locked' when the lock is activated. - * Whenever the lock is activated, it is guaranteed that the locked surface - * will already have received pointer focus and that the pointer will be - * within the region passed to the request creating this object. - * - * To unlock the pointer, send the destroy request. This will also destroy - * the wp_locked_pointer object. - * - * If the compositor decides to unlock the pointer the unlocked event is - * sent. See wp_locked_pointer.unlock for details. - * - * When unlocking, the compositor may warp the cursor position to the set - * cursor position hint. If it does, it will not result in any relative - * motion events emitted via wp_relative_pointer. - * - * If the surface the lock was requested on is destroyed and the lock is not - * yet activated, the wp_locked_pointer object is now defunct and must be - * destroyed. - * @section page_iface_zwp_locked_pointer_v1_api API - * See @ref iface_zwp_locked_pointer_v1. - */ -/** - * @defgroup iface_zwp_locked_pointer_v1 The zwp_locked_pointer_v1 interface - * - * The wp_locked_pointer interface represents a locked pointer state. - * - * While the lock of this object is active, the wl_pointer objects of the - * associated seat will not emit any wl_pointer.motion events. - * - * This object will send the event 'locked' when the lock is activated. - * Whenever the lock is activated, it is guaranteed that the locked surface - * will already have received pointer focus and that the pointer will be - * within the region passed to the request creating this object. - * - * To unlock the pointer, send the destroy request. This will also destroy - * the wp_locked_pointer object. - * - * If the compositor decides to unlock the pointer the unlocked event is - * sent. See wp_locked_pointer.unlock for details. - * - * When unlocking, the compositor may warp the cursor position to the set - * cursor position hint. If it does, it will not result in any relative - * motion events emitted via wp_relative_pointer. - * - * If the surface the lock was requested on is destroyed and the lock is not - * yet activated, the wp_locked_pointer object is now defunct and must be - * destroyed. - */ extern const struct wl_interface zwp_locked_pointer_v1_interface; #endif #ifndef ZWP_CONFINED_POINTER_V1_INTERFACE #define ZWP_CONFINED_POINTER_V1_INTERFACE -/** - * @page page_iface_zwp_confined_pointer_v1 zwp_confined_pointer_v1 - * @section page_iface_zwp_confined_pointer_v1_desc Description - * - * The wp_confined_pointer interface represents a confined pointer state. - * - * This object will send the event 'confined' when the confinement is - * activated. Whenever the confinement is activated, it is guaranteed that - * the surface the pointer is confined to will already have received pointer - * focus and that the pointer will be within the region passed to the request - * creating this object. It is up to the compositor to decide whether this - * requires some user interaction and if the pointer will warp to within the - * passed region if outside. - * - * To unconfine the pointer, send the destroy request. This will also destroy - * the wp_confined_pointer object. - * - * If the compositor decides to unconfine the pointer the unconfined event is - * sent. The wp_confined_pointer object is at this point defunct and should - * be destroyed. - * @section page_iface_zwp_confined_pointer_v1_api API - * See @ref iface_zwp_confined_pointer_v1. - */ -/** - * @defgroup iface_zwp_confined_pointer_v1 The zwp_confined_pointer_v1 interface - * - * The wp_confined_pointer interface represents a confined pointer state. - * - * This object will send the event 'confined' when the confinement is - * activated. Whenever the confinement is activated, it is guaranteed that - * the surface the pointer is confined to will already have received pointer - * focus and that the pointer will be within the region passed to the request - * creating this object. It is up to the compositor to decide whether this - * requires some user interaction and if the pointer will warp to within the - * passed region if outside. - * - * To unconfine the pointer, send the destroy request. This will also destroy - * the wp_confined_pointer object. - * - * If the compositor decides to unconfine the pointer the unconfined event is - * sent. The wp_confined_pointer object is at this point defunct and should - * be destroyed. - */ extern const struct wl_interface zwp_confined_pointer_v1_interface; #endif #ifndef ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM #define ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM -/** - * @ingroup iface_zwp_pointer_constraints_v1 - * wp_pointer_constraints error values - * - * These errors can be emitted in response to wp_pointer_constraints - * requests. - */ enum zwp_pointer_constraints_v1_error { - /** - * pointer constraint already requested on that surface - */ ZWP_POINTER_CONSTRAINTS_V1_ERROR_ALREADY_CONSTRAINED = 1, }; -#endif /* ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM */ +#endif #ifndef ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM_IS_VALID #define ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_zwp_pointer_constraints_v1 - * Validate a zwp_pointer_constraints_v1 error value. - * - * @return true on success, false on error. - * @ref zwp_pointer_constraints_v1_error - */ static inline bool zwp_pointer_constraints_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -261,49 +106,18 @@ zwp_pointer_constraints_v1_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM_IS_VALID */ +#endif #ifndef ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM #define ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM -/** - * @ingroup iface_zwp_pointer_constraints_v1 - * constraint lifetime - * - * These values represent different lifetime semantics. They are passed - * as arguments to the factory requests to specify how the constraint - * lifetimes should be managed. - */ enum zwp_pointer_constraints_v1_lifetime { - /** - * the pointer constraint is defunct once deactivated - * - * A oneshot pointer constraint will never reactivate once it has - * been deactivated. See the corresponding deactivation event - * (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) - * for details. - */ ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT = 1, - /** - * the pointer constraint may reactivate - * - * A persistent pointer constraint may again reactivate once it - * has been deactivated. See the corresponding deactivation event - * (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) - * for details. - */ ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT = 2, }; -#endif /* ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM */ +#endif #ifndef ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM_IS_VALID #define ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM_IS_VALID -/** - * @ingroup iface_zwp_pointer_constraints_v1 - * Validate a zwp_pointer_constraints_v1 lifetime value. - * - * @return true on success, false on error. - * @ref zwp_pointer_constraints_v1_lifetime - */ static inline bool zwp_pointer_constraints_v1_lifetime_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -315,67 +129,11 @@ zwp_pointer_constraints_v1_lifetime_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_zwp_pointer_constraints_v1 - * @struct zwp_pointer_constraints_v1_interface - */ struct zwp_pointer_constraints_v1_interface { - /** - * destroy the pointer constraints manager object - * - * Used by the client to notify the server that it will no longer - * use this pointer constraints object. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * lock pointer to a position - * - * The lock_pointer request lets the client request to disable - * movements of the virtual pointer (i.e. the cursor), effectively - * locking the pointer to a position. This request may not take - * effect immediately; in the future, when the compositor deems - * implementation-specific constraints are satisfied, the pointer - * lock will be activated and the compositor sends a locked event. - * - * The protocol provides no guarantee that the constraints are ever - * satisfied, and does not require the compositor to send an error - * if the constraints cannot ever be satisfied. It is thus possible - * to request a lock that will never activate. - * - * There may not be another pointer constraint of any kind - * requested or active on the surface for any of the wl_pointer - * objects of the seat of the passed pointer when requesting a - * lock. If there is, an error will be raised. See general pointer - * lock documentation for more details. - * - * The intersection of the region passed with this request and the - * input region of the surface is used to determine where the - * pointer must be in order for the lock to activate. It is up to - * the compositor whether to warp the pointer or require some kind - * of user interaction for the lock to activate. If the region is - * null the surface input region is used. - * - * A surface may receive pointer focus without the lock being - * activated. - * - * The request creates a new object wp_locked_pointer which is used - * to interact with the lock as well as receive updates about its - * state. See the the description of wp_locked_pointer for further - * information. - * - * Note that while a pointer is locked, the wl_pointer objects of - * the corresponding seat will not emit any wl_pointer.motion - * events, but relative motion events will still be emitted via - * wp_relative_pointer objects of the same seat. wl_pointer.axis - * and wl_pointer.button events are unaffected. - * @param surface surface to lock pointer to - * @param pointer the pointer that should be locked - * @param region region of surface - * @param lifetime lock lifetime - */ void (*lock_pointer)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -383,32 +141,6 @@ struct zwp_pointer_constraints_v1_interface { struct wl_resource *pointer, struct wl_resource *region, uint32_t lifetime); - /** - * confine pointer to a region - * - * The confine_pointer request lets the client request to confine - * the pointer cursor to a given region. This request may not take - * effect immediately; in the future, when the compositor deems - * implementation- specific constraints are satisfied, the pointer - * confinement will be activated and the compositor sends a - * confined event. - * - * The intersection of the region passed with this request and the - * input region of the surface is used to determine where the - * pointer must be in order for the confinement to activate. It is - * up to the compositor whether to warp the pointer or require some - * kind of user interaction for the confinement to activate. If the - * region is null the surface input region is used. - * - * The request will create a new object wp_confined_pointer which - * is used to interact with the confinement as well as receive - * updates about its state. See the the description of - * wp_confined_pointer for further information. - * @param surface surface to lock pointer to - * @param pointer the pointer that should be confined - * @param region region of surface - * @param lifetime confinement lifetime - */ void (*confine_pointer)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -419,65 +151,17 @@ struct zwp_pointer_constraints_v1_interface { }; -/** - * @ingroup iface_zwp_pointer_constraints_v1 - */ #define ZWP_POINTER_CONSTRAINTS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_constraints_v1 - */ #define ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_constraints_v1 - */ #define ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_locked_pointer_v1 - * @struct zwp_locked_pointer_v1_interface - */ struct zwp_locked_pointer_v1_interface { - /** - * destroy the locked pointer object - * - * Destroy the locked pointer object. If applicable, the - * compositor will unlock the pointer. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * set the pointer cursor position hint - * - * Set the cursor position hint relative to the top left corner - * of the surface. - * - * If the client is drawing its own cursor, it should update the - * position hint to the position of its own cursor. A compositor - * may use this information to warp the pointer upon unlock in - * order to avoid pointer jumps. - * - * The cursor position hint is double buffered. The new hint will - * only take effect when the associated surface gets it pending - * state applied. See wl_surface.commit for details. - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ void (*set_cursor_position_hint)(struct wl_client *client, struct wl_resource *resource, wl_fixed_t surface_x, wl_fixed_t surface_y); - /** - * set a new lock region - * - * Set a new region used to lock the pointer. - * - * The new lock region is double-buffered. The new lock region will - * only take effect when the associated surface gets its pending - * state applied. See wl_surface.commit for details. - * - * For details about the lock region, see wp_locked_pointer. - * @param region region of surface - */ void (*set_region)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *region); @@ -486,84 +170,28 @@ struct zwp_locked_pointer_v1_interface { #define ZWP_LOCKED_POINTER_V1_LOCKED 0 #define ZWP_LOCKED_POINTER_V1_UNLOCKED 1 -/** - * @ingroup iface_zwp_locked_pointer_v1 - */ #define ZWP_LOCKED_POINTER_V1_LOCKED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_locked_pointer_v1 - */ #define ZWP_LOCKED_POINTER_V1_UNLOCKED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_locked_pointer_v1 - */ #define ZWP_LOCKED_POINTER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_locked_pointer_v1 - */ #define ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_locked_pointer_v1 - */ #define ZWP_LOCKED_POINTER_V1_SET_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_locked_pointer_v1 - * Sends an locked event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_locked_pointer_v1_send_locked(struct wl_resource *resource_) { wl_resource_post_event(resource_, ZWP_LOCKED_POINTER_V1_LOCKED); } -/** - * @ingroup iface_zwp_locked_pointer_v1 - * Sends an unlocked event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_locked_pointer_v1_send_unlocked(struct wl_resource *resource_) { wl_resource_post_event(resource_, ZWP_LOCKED_POINTER_V1_UNLOCKED); } -/** - * @ingroup iface_zwp_confined_pointer_v1 - * @struct zwp_confined_pointer_v1_interface - */ struct zwp_confined_pointer_v1_interface { - /** - * destroy the confined pointer object - * - * Destroy the confined pointer object. If applicable, the - * compositor will unconfine the pointer. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * set a new confine region - * - * Set a new region used to confine the pointer. - * - * The new confine region is double-buffered. The new confine - * region will only take effect when the associated surface gets - * its pending state applied. See wl_surface.commit for details. - * - * If the confinement is active when the new confinement region is - * applied and the pointer ends up outside of newly applied region, - * the pointer may warped to a position within the new confinement - * region. If warped, a wl_pointer.motion event will be emitted, - * but no wp_relative_pointer.relative_motion event. - * - * The compositor may also, instead of using the new region, - * unconfine the pointer. - * - * For details about the confine region, see wp_confined_pointer. - * @param region region of surface - */ void (*set_region)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *region); @@ -572,40 +200,18 @@ struct zwp_confined_pointer_v1_interface { #define ZWP_CONFINED_POINTER_V1_CONFINED 0 #define ZWP_CONFINED_POINTER_V1_UNCONFINED 1 -/** - * @ingroup iface_zwp_confined_pointer_v1 - */ #define ZWP_CONFINED_POINTER_V1_CONFINED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_confined_pointer_v1 - */ #define ZWP_CONFINED_POINTER_V1_UNCONFINED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_confined_pointer_v1 - */ #define ZWP_CONFINED_POINTER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_confined_pointer_v1 - */ #define ZWP_CONFINED_POINTER_V1_SET_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_confined_pointer_v1 - * Sends an confined event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_confined_pointer_v1_send_confined(struct wl_resource *resource_) { wl_resource_post_event(resource_, ZWP_CONFINED_POINTER_V1_CONFINED); } -/** - * @ingroup iface_zwp_confined_pointer_v1 - * Sends an unconfined event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_confined_pointer_v1_send_unconfined(struct wl_resource *resource_) { diff --git a/app/src/main/cpp/waylandcomp/generated/presentation-time-protocol.c b/app/src/main/cpp/waylandcomp/generated/presentation-time-protocol.c index 63eea910d4..8db001733e 100644 --- a/app/src/main/cpp/waylandcomp/generated/presentation-time-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/presentation-time-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright © 2013-2014 Collabora, Ltd. * @@ -29,7 +27,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/presentation-time-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/presentation-time-server-protocol.h index 1e1a39c075..828051726c 100644 --- a/app/src/main/cpp/waylandcomp/generated/presentation-time-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/presentation-time-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef PRESENTATION_TIME_SERVER_PROTOCOL_H #define PRESENTATION_TIME_SERVER_PROTOCOL_H @@ -14,13 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_presentation_time The presentation_time protocol - * @section page_ifaces_presentation_time Interfaces - * - @subpage page_iface_wp_presentation - timed presentation related wl_surface requests - * - @subpage page_iface_wp_presentation_feedback - presentation time feedback event +/* * @section page_copyright_presentation_time Copyright - *
  *
  * Copyright © 2013-2014 Collabora, Ltd.
  *
@@ -42,8 +36,13 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + struct wl_output; struct wl_surface; struct wp_presentation; @@ -51,131 +50,23 @@ struct wp_presentation_feedback; #ifndef WP_PRESENTATION_INTERFACE #define WP_PRESENTATION_INTERFACE -/** - * @page page_iface_wp_presentation wp_presentation - * @section page_iface_wp_presentation_desc Description - * - * - * - * - * The main feature of this interface is accurate presentation - * timing feedback to ensure smooth video playback while maintaining - * audio/video synchronization. Some features use the concept of a - * presentation clock, which is defined in the - * presentation.clock_id event. - * - * A content update for a wl_surface is submitted by a - * wl_surface.commit request. Request 'feedback' associates with - * the wl_surface.commit and provides feedback on the content - * update, particularly the final realized presentation time. - * - * - * - * When the final realized presentation time is available, e.g. - * after a framebuffer flip completes, the requested - * presentation_feedback.presented events are sent. The final - * presentation time can differ from the compositor's predicted - * display update time and the update's target time, especially - * when the compositor misses its target vertical blanking period. - * @section page_iface_wp_presentation_api API - * See @ref iface_wp_presentation. - */ -/** - * @defgroup iface_wp_presentation The wp_presentation interface - * - * - * - * - * The main feature of this interface is accurate presentation - * timing feedback to ensure smooth video playback while maintaining - * audio/video synchronization. Some features use the concept of a - * presentation clock, which is defined in the - * presentation.clock_id event. - * - * A content update for a wl_surface is submitted by a - * wl_surface.commit request. Request 'feedback' associates with - * the wl_surface.commit and provides feedback on the content - * update, particularly the final realized presentation time. - * - * - * - * When the final realized presentation time is available, e.g. - * after a framebuffer flip completes, the requested - * presentation_feedback.presented events are sent. The final - * presentation time can differ from the compositor's predicted - * display update time and the update's target time, especially - * when the compositor misses its target vertical blanking period. - */ extern const struct wl_interface wp_presentation_interface; #endif #ifndef WP_PRESENTATION_FEEDBACK_INTERFACE #define WP_PRESENTATION_FEEDBACK_INTERFACE -/** - * @page page_iface_wp_presentation_feedback wp_presentation_feedback - * @section page_iface_wp_presentation_feedback_desc Description - * - * A presentation_feedback object returns an indication that a - * wl_surface content update has become visible to the user. - * One object corresponds to one content update submission - * (wl_surface.commit). There are two possible outcomes: the - * content update is presented to the user, and a presentation - * timestamp delivered; or, the user did not see the content - * update because it was superseded or its surface destroyed, - * and the content update is discarded. - * - * Once a presentation_feedback object has delivered a 'presented' - * or 'discarded' event it is automatically destroyed. - * @section page_iface_wp_presentation_feedback_api API - * See @ref iface_wp_presentation_feedback. - */ -/** - * @defgroup iface_wp_presentation_feedback The wp_presentation_feedback interface - * - * A presentation_feedback object returns an indication that a - * wl_surface content update has become visible to the user. - * One object corresponds to one content update submission - * (wl_surface.commit). There are two possible outcomes: the - * content update is presented to the user, and a presentation - * timestamp delivered; or, the user did not see the content - * update because it was superseded or its surface destroyed, - * and the content update is discarded. - * - * Once a presentation_feedback object has delivered a 'presented' - * or 'discarded' event it is automatically destroyed. - */ extern const struct wl_interface wp_presentation_feedback_interface; #endif #ifndef WP_PRESENTATION_ERROR_ENUM #define WP_PRESENTATION_ERROR_ENUM -/** - * @ingroup iface_wp_presentation - * fatal presentation errors - * - * These fatal protocol errors may be emitted in response to - * illegal presentation requests. - */ enum wp_presentation_error { - /** - * invalid value in tv_nsec - */ WP_PRESENTATION_ERROR_INVALID_TIMESTAMP = 0, - /** - * invalid flag - */ WP_PRESENTATION_ERROR_INVALID_FLAG = 1, }; -#endif /* WP_PRESENTATION_ERROR_ENUM */ +#endif #ifndef WP_PRESENTATION_ERROR_ENUM_IS_VALID #define WP_PRESENTATION_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wp_presentation - * Validate a wp_presentation error value. - * - * @return true on success, false on error. - * @ref wp_presentation_error - */ static inline bool wp_presentation_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -187,37 +78,11 @@ wp_presentation_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WP_PRESENTATION_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wp_presentation - * @struct wp_presentation_interface - */ struct wp_presentation_interface { - /** - * unbind from the presentation interface - * - * Informs the server that the client will no longer be using - * this protocol object. Existing objects created by this object - * are not affected. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * request presentation feedback information - * - * Request presentation feedback for the current content - * submission on the given surface. This creates a new - * presentation_feedback object, which will deliver the feedback - * information once. If multiple presentation_feedback objects are - * created for the same submission, they will all deliver the same - * information. - * - * For details on what information is returned, see the - * presentation_feedback interface. - * @param surface target surface - * @param callback new feedback object - */ void (*feedback)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *surface, @@ -226,26 +91,11 @@ struct wp_presentation_interface { #define WP_PRESENTATION_CLOCK_ID 0 -/** - * @ingroup iface_wp_presentation - */ #define WP_PRESENTATION_CLOCK_ID_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation - */ #define WP_PRESENTATION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation - */ #define WP_PRESENTATION_FEEDBACK_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation - * Sends an clock_id event to the client owning the resource. - * @param resource_ The client's resource - * @param clk_id platform clock identifier - */ static inline void wp_presentation_send_clock_id(struct wl_resource *resource_, uint32_t clk_id) { @@ -254,66 +104,16 @@ wp_presentation_send_clock_id(struct wl_resource *resource_, uint32_t clk_id) #ifndef WP_PRESENTATION_FEEDBACK_KIND_ENUM #define WP_PRESENTATION_FEEDBACK_KIND_ENUM -/** - * @ingroup iface_wp_presentation_feedback - * bitmask of flags in presented event - * - * These flags provide information about how the presentation of - * the related content update was done. The intent is to help - * clients assess the reliability of the feedback and the visual - * quality with respect to possible tearing and timings. - */ enum wp_presentation_feedback_kind { - /** - * presentation was vsync'd - * - * The presentation was synchronized to the "vertical retrace" by - * the display hardware such that tearing does not happen. Relying - * on software scheduling is not acceptable for this flag. If - * presentation is done by a copy to the active frontbuffer, then - * it must guarantee that tearing cannot happen. - */ WP_PRESENTATION_FEEDBACK_KIND_VSYNC = 0x1, - /** - * hardware provided the presentation timestamp - * - * The display hardware provided measurements that the hardware - * driver converted into a presentation timestamp. Sampling a clock - * in software is not acceptable for this flag. - */ WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK = 0x2, - /** - * hardware signalled the start of the presentation - * - * The display hardware signalled that it started using the new - * image content. The opposite of this is e.g. a timer being used - * to guess when the display hardware has switched to the new image - * content. - */ WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION = 0x4, - /** - * presentation was done zero-copy - * - * The presentation of this update was done zero-copy. This means - * the buffer from the client was given to display hardware as is, - * without copying it. Compositing with OpenGL counts as copying, - * even if textured directly from the client buffer. Possible - * zero-copy cases include direct scanout of a fullscreen surface - * and a surface on a hardware overlay. - */ WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY = 0x8, }; -#endif /* WP_PRESENTATION_FEEDBACK_KIND_ENUM */ +#endif #ifndef WP_PRESENTATION_FEEDBACK_KIND_ENUM_IS_VALID #define WP_PRESENTATION_FEEDBACK_KIND_ENUM_IS_VALID -/** - * @ingroup iface_wp_presentation_feedback - * Validate a wp_presentation_feedback kind value. - * - * @return true on success, false on error. - * @ref wp_presentation_feedback_kind - */ static inline bool wp_presentation_feedback_kind_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -327,61 +127,29 @@ wp_presentation_feedback_kind_is_valid(uint32_t value, uint32_t version) { valid |= WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY; return (value & ~valid) == 0; } -#endif /* WP_PRESENTATION_FEEDBACK_KIND_ENUM_IS_VALID */ +#endif #define WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT 0 #define WP_PRESENTATION_FEEDBACK_PRESENTED 1 #define WP_PRESENTATION_FEEDBACK_DISCARDED 2 -/** - * @ingroup iface_wp_presentation_feedback - */ #define WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ #define WP_PRESENTATION_FEEDBACK_PRESENTED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ #define WP_PRESENTATION_FEEDBACK_DISCARDED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - * Sends an sync_output event to the client owning the resource. - * @param resource_ The client's resource - * @param output presentation output - */ static inline void wp_presentation_feedback_send_sync_output(struct wl_resource *resource_, struct wl_resource *output) { wl_resource_post_event(resource_, WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT, output); } -/** - * @ingroup iface_wp_presentation_feedback - * Sends an presented event to the client owning the resource. - * @param resource_ The client's resource - * @param tv_sec_hi high 32 bits of the seconds part of the presentation timestamp - * @param tv_sec_lo low 32 bits of the seconds part of the presentation timestamp - * @param tv_nsec nanoseconds part of the presentation timestamp - * @param refresh nanoseconds till next refresh - * @param seq_hi high 32 bits of refresh counter - * @param seq_lo low 32 bits of refresh counter - * @param flags combination of 'kind' values - */ static inline void wp_presentation_feedback_send_presented(struct wl_resource *resource_, uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec, uint32_t refresh, uint32_t seq_hi, uint32_t seq_lo, uint32_t flags) { wl_resource_post_event(resource_, WP_PRESENTATION_FEEDBACK_PRESENTED, tv_sec_hi, tv_sec_lo, tv_nsec, refresh, seq_hi, seq_lo, flags); } -/** - * @ingroup iface_wp_presentation_feedback - * Sends an discarded event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wp_presentation_feedback_send_discarded(struct wl_resource *resource_) { diff --git a/app/src/main/cpp/waylandcomp/generated/relative-pointer-unstable-v1-protocol.c b/app/src/main/cpp/waylandcomp/generated/relative-pointer-unstable-v1-protocol.c index 454f955562..eb9254f312 100644 --- a/app/src/main/cpp/waylandcomp/generated/relative-pointer-unstable-v1-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/relative-pointer-unstable-v1-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright © 2014 Jonas Ådahl * Copyright © 2015 Red Hat Inc. @@ -30,7 +28,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/relative-pointer-unstable-v1-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/relative-pointer-unstable-v1-server-protocol.h index f40c974980..a25e2b18c9 100644 --- a/app/src/main/cpp/waylandcomp/generated/relative-pointer-unstable-v1-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/relative-pointer-unstable-v1-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef RELATIVE_POINTER_UNSTABLE_V1_SERVER_PROTOCOL_H #define RELATIVE_POINTER_UNSTABLE_V1_SERVER_PROTOCOL_H @@ -14,40 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_relative_pointer_unstable_v1 The relative_pointer_unstable_v1 protocol - * protocol for relative pointer motion events - * - * @section page_desc_relative_pointer_unstable_v1 Description - * - * This protocol specifies a set of interfaces used for making clients able to - * receive relative pointer events not obstructed by barriers (such as the - * monitor edge or other pointer barriers). - * - * To start receiving relative pointer events, a client must first bind the - * global interface "wp_relative_pointer_manager" which, if a compositor - * supports relative pointer motion events, is exposed by the registry. After - * having created the relative pointer manager proxy object, the client uses - * it to create the actual relative pointer object using the - * "get_relative_pointer" request given a wl_pointer. The relative pointer - * motion events will then, when applicable, be transmitted via the proxy of - * the newly created relative pointer object. See the documentation of the - * relative pointer interface for more details. - * - * Warning! The protocol described in this file is experimental and backward - * incompatible changes may be made. Backward compatible changes may be added - * together with the corresponding interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface names and resetting the interface version. Once the protocol - * is to be declared stable, the 'z' prefix and the version number in the - * protocol and interface names are removed and the interface version number is - * reset. - * - * @section page_ifaces_relative_pointer_unstable_v1 Interfaces - * - @subpage page_iface_zwp_relative_pointer_manager_v1 - get relative pointer objects - * - @subpage page_iface_zwp_relative_pointer_v1 - relative pointer object +/* * @section page_copyright_relative_pointer_unstable_v1 Copyright - *
  *
  * Copyright © 2014      Jonas Ådahl
  * Copyright © 2015      Red Hat Inc.
@@ -70,74 +37,56 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + struct wl_pointer; struct zwp_relative_pointer_manager_v1; struct zwp_relative_pointer_v1; #ifndef ZWP_RELATIVE_POINTER_MANAGER_V1_INTERFACE #define ZWP_RELATIVE_POINTER_MANAGER_V1_INTERFACE -/** - * @page page_iface_zwp_relative_pointer_manager_v1 zwp_relative_pointer_manager_v1 - * @section page_iface_zwp_relative_pointer_manager_v1_desc Description - * - * A global interface used for getting the relative pointer object for a - * given pointer. - * @section page_iface_zwp_relative_pointer_manager_v1_api API - * See @ref iface_zwp_relative_pointer_manager_v1. - */ -/** - * @defgroup iface_zwp_relative_pointer_manager_v1 The zwp_relative_pointer_manager_v1 interface - * - * A global interface used for getting the relative pointer object for a - * given pointer. - */ extern const struct wl_interface zwp_relative_pointer_manager_v1_interface; #endif #ifndef ZWP_RELATIVE_POINTER_V1_INTERFACE #define ZWP_RELATIVE_POINTER_V1_INTERFACE -/** - * @page page_iface_zwp_relative_pointer_v1 zwp_relative_pointer_v1 - * @section page_iface_zwp_relative_pointer_v1_desc Description - * - * A wp_relative_pointer object is an extension to the wl_pointer interface - * used for emitting relative pointer events. It shares the same focus as - * wl_pointer objects of the same seat and will only emit events when it has - * focus. - * @section page_iface_zwp_relative_pointer_v1_api API - * See @ref iface_zwp_relative_pointer_v1. - */ -/** - * @defgroup iface_zwp_relative_pointer_v1 The zwp_relative_pointer_v1 interface - * - * A wp_relative_pointer object is an extension to the wl_pointer interface - * used for emitting relative pointer events. It shares the same focus as - * wl_pointer objects of the same seat and will only emit events when it has - * focus. - */ extern const struct wl_interface zwp_relative_pointer_v1_interface; #endif -/** - * @ingroup iface_zwp_relative_pointer_manager_v1 - * @struct zwp_relative_pointer_manager_v1_interface - */ struct zwp_relative_pointer_manager_v1_interface { - /** - * destroy the relative pointer manager object - * - * Used by the client to notify the server that it will no longer - * use this relative pointer manager object. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * get a relative pointer object - * - * Create a relative pointer interface given a wl_pointer object. - * See the wp_relative_pointer interface for more details. - */ void (*get_relative_pointer)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -145,52 +94,20 @@ struct zwp_relative_pointer_manager_v1_interface { }; -/** - * @ingroup iface_zwp_relative_pointer_manager_v1 - */ #define ZWP_RELATIVE_POINTER_MANAGER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_relative_pointer_manager_v1 - */ #define ZWP_RELATIVE_POINTER_MANAGER_V1_GET_RELATIVE_POINTER_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_relative_pointer_v1 - * @struct zwp_relative_pointer_v1_interface - */ struct zwp_relative_pointer_v1_interface { - /** - * release the relative pointer object - * - * - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); }; #define ZWP_RELATIVE_POINTER_V1_RELATIVE_MOTION 0 -/** - * @ingroup iface_zwp_relative_pointer_v1 - */ #define ZWP_RELATIVE_POINTER_V1_RELATIVE_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_relative_pointer_v1 - */ #define ZWP_RELATIVE_POINTER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_relative_pointer_v1 - * Sends an relative_motion event to the client owning the resource. - * @param resource_ The client's resource - * @param utime_hi high 32 bits of a 64 bit timestamp with microsecond granularity - * @param utime_lo low 32 bits of a 64 bit timestamp with microsecond granularity - * @param dx the x component of the motion vector - * @param dy the y component of the motion vector - * @param dx_unaccel the x component of the unaccelerated motion vector - * @param dy_unaccel the y component of the unaccelerated motion vector - */ static inline void zwp_relative_pointer_v1_send_relative_motion(struct wl_resource *resource_, uint32_t utime_hi, uint32_t utime_lo, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t dx_unaccel, wl_fixed_t dy_unaccel) { diff --git a/app/src/main/cpp/waylandcomp/generated/single-pixel-buffer-v1-protocol.c b/app/src/main/cpp/waylandcomp/generated/single-pixel-buffer-v1-protocol.c index 01434221c6..2543c95cf7 100644 --- a/app/src/main/cpp/waylandcomp/generated/single-pixel-buffer-v1-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/single-pixel-buffer-v1-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.26.0 */ - /* * Copyright © 2022 Simon Ser * @@ -29,7 +27,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/single-pixel-buffer-v1-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/single-pixel-buffer-v1-server-protocol.h index a030d47757..a081bc417b 100644 --- a/app/src/main/cpp/waylandcomp/generated/single-pixel-buffer-v1-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/single-pixel-buffer-v1-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.26.0 */ #ifndef SINGLE_PIXEL_BUFFER_V1_SERVER_PROTOCOL_H #define SINGLE_PIXEL_BUFFER_V1_SERVER_PROTOCOL_H @@ -14,27 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_single_pixel_buffer_v1 The single_pixel_buffer_v1 protocol - * single pixel buffer factory - * - * @section page_desc_single_pixel_buffer_v1 Description - * - * This protocol extension allows clients to create single-pixel buffers. - * - * Compositors supporting this protocol extension should also support the - * viewporter protocol extension. Clients may use viewporter to scale a - * single-pixel buffer to a desired size. - * - * Warning! The protocol described in this file is currently in the testing - * phase. Backward compatible changes may be added together with the - * corresponding interface version bump. Backward incompatible changes can - * only be done by creating a new major version of the extension. - * - * @section page_ifaces_single_pixel_buffer_v1 Interfaces - * - @subpage page_iface_wp_single_pixel_buffer_manager_v1 - global factory for single-pixel buffers +/* * @section page_copyright_single_pixel_buffer_v1 Copyright - *
  *
  * Copyright © 2022 Simon Ser
  *
@@ -56,66 +36,38 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + + + + + + + + + + + + + + + struct wl_buffer; struct wp_single_pixel_buffer_manager_v1; #ifndef WP_SINGLE_PIXEL_BUFFER_MANAGER_V1_INTERFACE #define WP_SINGLE_PIXEL_BUFFER_MANAGER_V1_INTERFACE -/** - * @page page_iface_wp_single_pixel_buffer_manager_v1 wp_single_pixel_buffer_manager_v1 - * @section page_iface_wp_single_pixel_buffer_manager_v1_desc Description - * - * The wp_single_pixel_buffer_manager_v1 interface is a factory for - * single-pixel buffers. - * @section page_iface_wp_single_pixel_buffer_manager_v1_api API - * See @ref iface_wp_single_pixel_buffer_manager_v1. - */ -/** - * @defgroup iface_wp_single_pixel_buffer_manager_v1 The wp_single_pixel_buffer_manager_v1 interface - * - * The wp_single_pixel_buffer_manager_v1 interface is a factory for - * single-pixel buffers. - */ extern const struct wl_interface wp_single_pixel_buffer_manager_v1_interface; #endif -/** - * @ingroup iface_wp_single_pixel_buffer_manager_v1 - * @struct wp_single_pixel_buffer_manager_v1_interface - */ struct wp_single_pixel_buffer_manager_v1_interface { - /** - * destroy the manager - * - * Destroy the wp_single_pixel_buffer_manager_v1 object. - * - * The child objects created via this interface are unaffected. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * create a 1×1 buffer from 32-bit RGBA values - * - * Create a single-pixel buffer from four 32-bit RGBA values. - * - * Unless specified in another protocol extension, the RGBA values - * use pre-multiplied alpha. - * - * The width and height of the buffer are 1. - * - * The r, g, b and a arguments valid range is from UINT32_MIN (0) - * to UINT32_MAX (0xffffffff). - * - * These arguments should be interpreted as a percentage, i.e. - - * UINT32_MIN = 0% of the given color component - UINT32_MAX = 100% - * of the given color component - * @param r value of the buffer's red channel - * @param g value of the buffer's green channel - * @param b value of the buffer's blue channel - * @param a value of the buffer's alpha channel - */ void (*create_u32_rgba_buffer)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -126,13 +78,7 @@ struct wp_single_pixel_buffer_manager_v1_interface { }; -/** - * @ingroup iface_wp_single_pixel_buffer_manager_v1 - */ #define WP_SINGLE_PIXEL_BUFFER_MANAGER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_single_pixel_buffer_manager_v1 - */ #define WP_SINGLE_PIXEL_BUFFER_MANAGER_V1_CREATE_U32_RGBA_BUFFER_SINCE_VERSION 1 #ifdef __cplusplus diff --git a/app/src/main/cpp/waylandcomp/generated/text-input-unstable-v3-protocol.c b/app/src/main/cpp/waylandcomp/generated/text-input-unstable-v3-protocol.c index a6030f8df8..557da50a46 100644 --- a/app/src/main/cpp/waylandcomp/generated/text-input-unstable-v3-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/text-input-unstable-v3-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright © 2012, 2013 Intel Corporation * Copyright © 2015, 2016 Jan Arne Petersen @@ -34,7 +32,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/text-input-unstable-v3-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/text-input-unstable-v3-server-protocol.h index c8473dd6ad..e7e142ce2e 100644 --- a/app/src/main/cpp/waylandcomp/generated/text-input-unstable-v3-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/text-input-unstable-v3-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef TEXT_INPUT_UNSTABLE_V3_SERVER_PROTOCOL_H #define TEXT_INPUT_UNSTABLE_V3_SERVER_PROTOCOL_H @@ -14,33 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_text_input_unstable_v3 The text_input_unstable_v3 protocol - * Protocol for composing text - * - * @section page_desc_text_input_unstable_v3 Description - * - * This protocol allows compositors to act as input methods and to send text - * to applications. A text input object is used to manage state of what are - * typically text entry fields in the application. - * - * This document adheres to the RFC 2119 when using words like "must", - * "should", "may", etc. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - * - * @section page_ifaces_text_input_unstable_v3 Interfaces - * - @subpage page_iface_zwp_text_input_v3 - text input - * - @subpage page_iface_zwp_text_input_manager_v3 - text input manager +/* * @section page_copyright_text_input_unstable_v3 Copyright - *
  *
  * Copyright © 2012, 2013 Intel Corporation
  * Copyright © 2015, 2016 Jan Arne Petersen
@@ -67,8 +41,33 @@ struct wl_resource;
  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  * THIS SOFTWARE.
- * 
*/ + + + + + + + + + + + + + + + + + + + + + + + + + + struct wl_seat; struct wl_surface; struct zwp_text_input_manager_v3; @@ -76,118 +75,23 @@ struct zwp_text_input_v3; #ifndef ZWP_TEXT_INPUT_V3_INTERFACE #define ZWP_TEXT_INPUT_V3_INTERFACE -/** - * @page page_iface_zwp_text_input_v3 zwp_text_input_v3 - * @section page_iface_zwp_text_input_v3_desc Description - * - * The zwp_text_input_v3 interface represents text input and input methods - * associated with a seat. It provides enter/leave events to follow the - * text input focus for a seat. - * - * Requests are used to enable/disable the text-input object and set - * state information like surrounding and selected text or the content type. - * The information about the entered text is sent to the text-input object - * via the preedit_string and commit_string events. - * - * Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices - * must not point to middle bytes inside a code point: they must either - * point to the first byte of a code point or to the end of the buffer. - * Lengths must be measured between two valid indices. - * - * Focus moving throughout surfaces will result in the emission of - * zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused - * surface must commit zwp_text_input_v3.enable and - * zwp_text_input_v3.disable requests as the keyboard focus moves across - * editable and non-editable elements of the UI. Those two requests are not - * expected to be paired with each other, the compositor must be able to - * handle consecutive series of the same request. - * - * State is sent by the state requests (set_surrounding_text, - * set_content_type and set_cursor_rectangle) and a commit request. After an - * enter event or disable request all state information is invalidated and - * needs to be resent by the client. - * @section page_iface_zwp_text_input_v3_api API - * See @ref iface_zwp_text_input_v3. - */ -/** - * @defgroup iface_zwp_text_input_v3 The zwp_text_input_v3 interface - * - * The zwp_text_input_v3 interface represents text input and input methods - * associated with a seat. It provides enter/leave events to follow the - * text input focus for a seat. - * - * Requests are used to enable/disable the text-input object and set - * state information like surrounding and selected text or the content type. - * The information about the entered text is sent to the text-input object - * via the preedit_string and commit_string events. - * - * Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices - * must not point to middle bytes inside a code point: they must either - * point to the first byte of a code point or to the end of the buffer. - * Lengths must be measured between two valid indices. - * - * Focus moving throughout surfaces will result in the emission of - * zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused - * surface must commit zwp_text_input_v3.enable and - * zwp_text_input_v3.disable requests as the keyboard focus moves across - * editable and non-editable elements of the UI. Those two requests are not - * expected to be paired with each other, the compositor must be able to - * handle consecutive series of the same request. - * - * State is sent by the state requests (set_surrounding_text, - * set_content_type and set_cursor_rectangle) and a commit request. After an - * enter event or disable request all state information is invalidated and - * needs to be resent by the client. - */ extern const struct wl_interface zwp_text_input_v3_interface; #endif #ifndef ZWP_TEXT_INPUT_MANAGER_V3_INTERFACE #define ZWP_TEXT_INPUT_MANAGER_V3_INTERFACE -/** - * @page page_iface_zwp_text_input_manager_v3 zwp_text_input_manager_v3 - * @section page_iface_zwp_text_input_manager_v3_desc Description - * - * A factory for text-input objects. This object is a global singleton. - * @section page_iface_zwp_text_input_manager_v3_api API - * See @ref iface_zwp_text_input_manager_v3. - */ -/** - * @defgroup iface_zwp_text_input_manager_v3 The zwp_text_input_manager_v3 interface - * - * A factory for text-input objects. This object is a global singleton. - */ extern const struct wl_interface zwp_text_input_manager_v3_interface; #endif #ifndef ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM #define ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM -/** - * @ingroup iface_zwp_text_input_v3 - * text change reason - * - * Reason for the change of surrounding text or cursor posision. - */ enum zwp_text_input_v3_change_cause { - /** - * input method caused the change - */ ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_INPUT_METHOD = 0, - /** - * something else than the input method caused the change - */ ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_OTHER = 1, }; -#endif /* ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM */ +#endif #ifndef ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM_IS_VALID #define ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM_IS_VALID -/** - * @ingroup iface_zwp_text_input_v3 - * Validate a zwp_text_input_v3 change_cause value. - * - * @return true on success, false on error. - * @ref zwp_text_input_v3_change_cause - */ static inline bool zwp_text_input_v3_change_cause_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -199,101 +103,33 @@ zwp_text_input_v3_change_cause_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM_IS_VALID */ +#endif #ifndef ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM #define ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM -/** - * @ingroup iface_zwp_text_input_v3 - * content hint - * - * Content hint is a bitmask to allow to modify the behavior of the text - * input. - */ enum zwp_text_input_v3_content_hint { - /** - * no special behavior - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_NONE = 0x0, - /** - * suggest word completions - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_COMPLETION = 0x1, - /** - * suggest word corrections - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_SPELLCHECK = 0x2, - /** - * switch to uppercase letters at the start of a sentence - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_AUTO_CAPITALIZATION = 0x4, - /** - * prefer lowercase letters - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_LOWERCASE = 0x8, - /** - * prefer uppercase letters - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_UPPERCASE = 0x10, - /** - * prefer casing for titles and headings (can be language dependent) - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_TITLECASE = 0x20, - /** - * characters should be hidden - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_HIDDEN_TEXT = 0x40, - /** - * typed text should not be stored - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_SENSITIVE_DATA = 0x80, - /** - * just Latin characters should be entered - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_LATIN = 0x100, - /** - * the text input is multiline - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_MULTILINE = 0x200, - /** - * an on-screen way to fill in the input is already provided by the client - * @since 2 - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_ON_SCREEN_INPUT_PROVIDED = 0x400, - /** - * prefer not offering emoji support - * @since 2 - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_NO_EMOJI = 0x800, - /** - * the text input will display preedit text in place - * @since 2 - */ ZWP_TEXT_INPUT_V3_CONTENT_HINT_PREEDIT_SHOWN = 0x1000, }; -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_CONTENT_HINT_ON_SCREEN_INPUT_PROVIDED_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_CONTENT_HINT_NO_EMOJI_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_CONTENT_HINT_PREEDIT_SHOWN_SINCE_VERSION 2 -#endif /* ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM */ +#endif #ifndef ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM_IS_VALID #define ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM_IS_VALID -/** - * @ingroup iface_zwp_text_input_v3 - * Validate a zwp_text_input_v3 content_hint value. - * - * @return true on success, false on error. - * @ref zwp_text_input_v3_content_hint - */ static inline bool zwp_text_input_v3_content_hint_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -327,89 +163,30 @@ zwp_text_input_v3_content_hint_is_valid(uint32_t value, uint32_t version) { valid |= ZWP_TEXT_INPUT_V3_CONTENT_HINT_PREEDIT_SHOWN; return (value & ~valid) == 0; } -#endif /* ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM_IS_VALID */ +#endif #ifndef ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM #define ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM -/** - * @ingroup iface_zwp_text_input_v3 - * content purpose - * - * The content purpose allows to specify the primary purpose of a text - * input. - * - * This allows an input method to show special purpose input panels with - * extra characters or to disallow some characters. - */ enum zwp_text_input_v3_content_purpose { - /** - * default input, allowing all characters - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NORMAL = 0, - /** - * allow only alphabetic characters - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ALPHA = 1, - /** - * allow only digits - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DIGITS = 2, - /** - * input a number (including decimal separator and sign) - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NUMBER = 3, - /** - * input a phone number - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PHONE = 4, - /** - * input an URL - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_URL = 5, - /** - * input an email address - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_EMAIL = 6, - /** - * input a name of a person - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NAME = 7, - /** - * input a password (combine with sensitive_data hint) - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PASSWORD = 8, - /** - * input is a numeric password (combine with sensitive_data hint) - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PIN = 9, - /** - * input a date - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATE = 10, - /** - * input a time - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TIME = 11, - /** - * input a date and time - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATETIME = 12, - /** - * input for a terminal - */ ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TERMINAL = 13, }; -#endif /* ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM */ +#endif #ifndef ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM_IS_VALID #define ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM_IS_VALID -/** - * @ingroup iface_zwp_text_input_v3 - * Validate a zwp_text_input_v3 content_purpose value. - * - * @return true on success, false on error. - * @ref zwp_text_input_v3_content_purpose - */ static inline bool zwp_text_input_v3_content_purpose_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -445,27 +222,17 @@ zwp_text_input_v3_content_purpose_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM_IS_VALID */ +#endif #ifndef ZWP_TEXT_INPUT_V3_ERROR_ENUM #define ZWP_TEXT_INPUT_V3_ERROR_ENUM enum zwp_text_input_v3_error { - /** - * an invalid or duplicate action was specified - */ ZWP_TEXT_INPUT_V3_ERROR_INVALID_ACTION = 0, }; -#endif /* ZWP_TEXT_INPUT_V3_ERROR_ENUM */ +#endif #ifndef ZWP_TEXT_INPUT_V3_ERROR_ENUM_IS_VALID #define ZWP_TEXT_INPUT_V3_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_zwp_text_input_v3 - * Validate a zwp_text_input_v3 error value. - * - * @return true on success, false on error. - * @ref zwp_text_input_v3_error - */ static inline bool zwp_text_input_v3_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -475,40 +242,18 @@ zwp_text_input_v3_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWP_TEXT_INPUT_V3_ERROR_ENUM_IS_VALID */ +#endif #ifndef ZWP_TEXT_INPUT_V3_ACTION_ENUM #define ZWP_TEXT_INPUT_V3_ACTION_ENUM -/** - * @ingroup iface_zwp_text_input_v3 - * action - * - * A possible action to perform on a text input. - * - * The submit action is intended for input entries that expect some sort of - * activation after user interaction, e.g. the URL entry in a browser. - */ enum zwp_text_input_v3_action { - /** - * no action - */ ZWP_TEXT_INPUT_V3_ACTION_NONE = 0, - /** - * the action is submitted - */ ZWP_TEXT_INPUT_V3_ACTION_SUBMIT = 1, }; -#endif /* ZWP_TEXT_INPUT_V3_ACTION_ENUM */ +#endif #ifndef ZWP_TEXT_INPUT_V3_ACTION_ENUM_IS_VALID #define ZWP_TEXT_INPUT_V3_ACTION_ENUM_IS_VALID -/** - * @ingroup iface_zwp_text_input_v3 - * Validate a zwp_text_input_v3 action value. - * - * @return true on success, false on error. - * @ref zwp_text_input_v3_action - */ static inline bool zwp_text_input_v3_action_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -520,57 +265,23 @@ zwp_text_input_v3_action_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWP_TEXT_INPUT_V3_ACTION_ENUM_IS_VALID */ +#endif #ifndef ZWP_TEXT_INPUT_V3_PREEDIT_HINT_ENUM #define ZWP_TEXT_INPUT_V3_PREEDIT_HINT_ENUM -/** - * @ingroup iface_zwp_text_input_v3 - * preedit style hint - * - * Style hints for the preedit string. - */ enum zwp_text_input_v3_preedit_hint { - /** - * simple pre-edit text style, typically underlined - */ ZWP_TEXT_INPUT_V3_PREEDIT_HINT_WHOLE = 1, - /** - * hint for a selected piece of text, e.g. per-character navigation and composition - */ ZWP_TEXT_INPUT_V3_PREEDIT_HINT_SELECTION = 2, - /** - * predicted text, not typed by the user - */ ZWP_TEXT_INPUT_V3_PREEDIT_HINT_PREDICTION = 3, - /** - * prefixed text not being currently edited, e.g. prior to a 'selection' section - */ ZWP_TEXT_INPUT_V3_PREEDIT_HINT_PREFIX = 4, - /** - * suffixed text not being currently edited, e.g. after a 'selection' section - */ ZWP_TEXT_INPUT_V3_PREEDIT_HINT_SUFFIX = 5, - /** - * spelling error - */ ZWP_TEXT_INPUT_V3_PREEDIT_HINT_SPELLING_ERROR = 6, - /** - * wrong composition, e.g. user input that can not be transliterated - */ ZWP_TEXT_INPUT_V3_PREEDIT_HINT_COMPOSE_ERROR = 7, }; -#endif /* ZWP_TEXT_INPUT_V3_PREEDIT_HINT_ENUM */ +#endif #ifndef ZWP_TEXT_INPUT_V3_PREEDIT_HINT_ENUM_IS_VALID #define ZWP_TEXT_INPUT_V3_PREEDIT_HINT_ENUM_IS_VALID -/** - * @ingroup iface_zwp_text_input_v3 - * Validate a zwp_text_input_v3 preedit_hint value. - * - * @return true on success, false on error. - * @ref zwp_text_input_v3_preedit_hint - */ static inline bool zwp_text_input_v3_preedit_hint_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -592,269 +303,40 @@ zwp_text_input_v3_preedit_hint_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWP_TEXT_INPUT_V3_PREEDIT_HINT_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_zwp_text_input_v3 - * @struct zwp_text_input_v3_interface - */ struct zwp_text_input_v3_interface { - /** - * Destroy the wp_text_input - * - * Destroy the wp_text_input object. Also disables all surfaces - * enabled through this wp_text_input object. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * Request text input to be enabled - * - * Requests text input on the surface previously obtained from - * the enter event. - * - * This request must be issued every time the focused text input - * changes to a new one, including within the current surface. Use - * zwp_text_input_v3.disable when there is no longer any input - * focus on the current surface. - * - * Clients must not enable more than one text input on the single - * seat and should disable the current text input before enabling - * the new one. Requests to enable a text input when another text - * input is enabled on the same seat must be ignored by compositor. - * - * This request resets all state associated with previous enable, - * disable, set_surrounding_text, set_text_change_cause, - * set_content_type, and set_cursor_rectangle requests, as well as - * the state associated with preedit_string, commit_string, and - * delete_surrounding_text events. - * - * The set_surrounding_text, set_content_type and - * set_cursor_rectangle requests must follow if the text input - * supports the necessary functionality. - * - * State set with this request is double-buffered. It will get - * applied on the next zwp_text_input_v3.commit request, and stay - * valid until the next committed enable or disable request. - * - * The changes must be applied by the compositor after issuing a - * zwp_text_input_v3.commit request. - */ void (*enable)(struct wl_client *client, struct wl_resource *resource); - /** - * Disable text input on a surface - * - * Explicitly disable text input on the current surface - * (typically when there is no focus on any text entry inside the - * surface). - * - * State set with this request is double-buffered. It will get - * applied on the next zwp_text_input_v3.commit request. - */ void (*disable)(struct wl_client *client, struct wl_resource *resource); - /** - * sets the surrounding text - * - * Sets the surrounding plain text around the input, excluding - * the preedit text. - * - * The client should notify the compositor of any changes in any of - * the values carried with this request, including changes caused - * by handling incoming text-input events as well as changes caused - * by other mechanisms like keyboard typing. - * - * If the client is unaware of the text around the cursor, it - * should not issue this request, to signify lack of support to the - * compositor. - * - * Text is UTF-8 encoded, and should include the cursor position, - * the complete selection and additional characters before and - * after them. There is a maximum length of wayland messages, so - * text can not be longer than 4000 bytes. - * - * Cursor is the byte offset of the cursor within text buffer. - * - * Anchor is the byte offset of the selection anchor within text - * buffer. If there is no selected text, anchor is the same as - * cursor. - * - * If any preedit text is present, it is replaced with a cursor for - * the purpose of this event. - * - * Values set with this request are double-buffered. They will get - * applied on the next zwp_text_input_v3.commit request, and stay - * valid until the next committed enable or disable request. - * - * The initial state for affected fields is empty, meaning that the - * text input does not support sending surrounding text. If the - * empty values get applied, subsequent attempts to change them may - * have no effect. - */ void (*set_surrounding_text)(struct wl_client *client, struct wl_resource *resource, const char *text, int32_t cursor, int32_t anchor); - /** - * indicates the cause of surrounding text change - * - * Tells the compositor why the text surrounding the cursor - * changed. - * - * Whenever the client detects an external change in text, cursor, - * or anchor posision, it must issue this request to the - * compositor. This request is intended to give the input method a - * chance to update the preedit text in an appropriate way, e.g. by - * removing it when the user starts typing with a keyboard. - * - * cause describes the source of the change. - * - * The value set with this request is double-buffered. It must be - * applied and reset to initial at the next - * zwp_text_input_v3.commit request. - * - * The initial value of cause is input_method. - */ void (*set_text_change_cause)(struct wl_client *client, struct wl_resource *resource, uint32_t cause); - /** - * set content purpose and hint - * - * Sets the content purpose and content hint. While the purpose - * is the basic purpose of an input field, the hint flags allow to - * modify some of the behavior. - * - * Values set with this request are double-buffered. They will get - * applied on the next zwp_text_input_v3.commit request. Subsequent - * attempts to update them may have no effect. The values remain - * valid until the next committed enable or disable request. - * - * The initial value for hint is none, and the initial value for - * purpose is normal. - */ void (*set_content_type)(struct wl_client *client, struct wl_resource *resource, uint32_t hint, uint32_t purpose); - /** - * set cursor position - * - * Marks an area around the cursor as a x, y, width, height - * rectangle in surface local coordinates. - * - * Allows the compositor to put a window with word suggestions near - * the cursor, without obstructing the text being input. - * - * If the client is unaware of the position of edited text, it - * should not issue this request, to signify lack of support to the - * compositor. - * - * Values set with this request are double-buffered. They will get - * applied on the next zwp_text_input_v3.commit request, and stay - * valid until the next committed enable or disable request. - * - * The initial values describing a cursor rectangle are empty. That - * means the text input does not support describing the cursor - * area. If the empty values get applied, subsequent attempts to - * change them may have no effect. - * - * As of version 2, the zwp_text_input_v3.commit request does not - * apply values sent with this request. Instead, it stores them in - * a separate "committed" area. The committed values, if still - * valid, get applied on the next wl_surface.commit request on the - * surface with text-input focus. Both committed and applied values - * get invalidated on: - * - * - the next committed enable or disable request, or - a change of - * the focused surface of the text-input (leave or enter events). - * - * This double stage application allows the compositor to position - * the input method popup in the same frame as the contents of the - * text on the surface are updated. - */ void (*set_cursor_rectangle)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height); - /** - * commit state - * - * Atomically applies state changes recently sent to the - * compositor. - * - * The commit request establishes and updates the state of the - * client, and must be issued after any changes to apply them. - * - * Text input state (enabled status, content purpose, content hint, - * surrounding text and change cause, cursor rectangle) is - * conceptually double-buffered within the context of a text input, - * i.e. between a committed enable request and the following - * committed enable or disable request. - * - * Protocol requests modify the pending state, as opposed to the - * current state in use by the input method. A commit request - * atomically applies all pending state, replacing the current - * state. After commit, the new pending state is as documented for - * each related request. - * - * Requests are applied in the order of arrival. - * - * Neither current nor pending state are modified unless noted - * otherwise. - * - * The compositor must count the number of commit requests coming - * from each zwp_text_input_v3 object and use the count as the - * serial in done events. - */ void (*commit)(struct wl_client *client, struct wl_resource *resource); - /** - * set the available actions - * - * Set the actions available for this text input. - * - * Values set with this request are double-buffered. They will get - * applied on the next zwp_text_input_v3.commit request. - * - * If the available_actions array contains the none action, or - * contains the same action multiple times, the compositor must - * raise the invalid_action protocol error. - * - * Initially, no actions are available. - * @param available_actions available actions - * @since 2 - */ void (*set_available_actions)(struct wl_client *client, struct wl_resource *resource, struct wl_array *available_actions); - /** - * show input panel - * - * Requests an input panel to be shown (e.g. a on-screen - * keyboard). - * - * This request only hints the desired interaction pattern from the - * client side, and its effect may be ignored by compositors given - * other environmental factors. Repeated calls will be ignored. - * @since 2 - */ void (*show_input_panel)(struct wl_client *client, struct wl_resource *resource); - /** - * hide input panel - * - * Requests an input panel to be hidden. - * - * This request only hints the desired interaction pattern from the - * client side, and its effect may be ignored by compositors given - * other environmental factors. Repeated calls will be ignored. - * @since 2 - */ void (*hide_input_panel)(struct wl_client *client, struct wl_resource *resource); }; @@ -869,212 +351,85 @@ struct zwp_text_input_v3_interface { #define ZWP_TEXT_INPUT_V3_LANGUAGE 7 #define ZWP_TEXT_INPUT_V3_PREEDIT_HINT 8 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_PREEDIT_STRING_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_COMMIT_STRING_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_DELETE_SURROUNDING_TEXT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_ACTION_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_LANGUAGE_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_PREEDIT_HINT_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_ENABLE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_DISABLE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_SET_SURROUNDING_TEXT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_SET_TEXT_CHANGE_CAUSE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_SET_CONTENT_TYPE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_SET_CURSOR_RECTANGLE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_COMMIT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_SET_AVAILABLE_ACTIONS_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_SHOW_INPUT_PANEL_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_text_input_v3 - */ #define ZWP_TEXT_INPUT_V3_HIDE_INPUT_PANEL_SINCE_VERSION 2 -/** - * @ingroup iface_zwp_text_input_v3 - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_text_input_v3_send_enter(struct wl_resource *resource_, struct wl_resource *surface) { wl_resource_post_event(resource_, ZWP_TEXT_INPUT_V3_ENTER, surface); } -/** - * @ingroup iface_zwp_text_input_v3 - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_text_input_v3_send_leave(struct wl_resource *resource_, struct wl_resource *surface) { wl_resource_post_event(resource_, ZWP_TEXT_INPUT_V3_LEAVE, surface); } -/** - * @ingroup iface_zwp_text_input_v3 - * Sends an preedit_string event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_text_input_v3_send_preedit_string(struct wl_resource *resource_, const char *text, int32_t cursor_begin, int32_t cursor_end) { wl_resource_post_event(resource_, ZWP_TEXT_INPUT_V3_PREEDIT_STRING, text, cursor_begin, cursor_end); } -/** - * @ingroup iface_zwp_text_input_v3 - * Sends an commit_string event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_text_input_v3_send_commit_string(struct wl_resource *resource_, const char *text) { wl_resource_post_event(resource_, ZWP_TEXT_INPUT_V3_COMMIT_STRING, text); } -/** - * @ingroup iface_zwp_text_input_v3 - * Sends an delete_surrounding_text event to the client owning the resource. - * @param resource_ The client's resource - * @param before_length length of text before current cursor position - * @param after_length length of text after current cursor position - */ static inline void zwp_text_input_v3_send_delete_surrounding_text(struct wl_resource *resource_, uint32_t before_length, uint32_t after_length) { wl_resource_post_event(resource_, ZWP_TEXT_INPUT_V3_DELETE_SURROUNDING_TEXT, before_length, after_length); } -/** - * @ingroup iface_zwp_text_input_v3 - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwp_text_input_v3_send_done(struct wl_resource *resource_, uint32_t serial) { wl_resource_post_event(resource_, ZWP_TEXT_INPUT_V3_DONE, serial); } -/** - * @ingroup iface_zwp_text_input_v3 - * Sends an action event to the client owning the resource. - * @param resource_ The client's resource - * @param action action performed - * @param serial serial number of the action event - */ static inline void zwp_text_input_v3_send_action(struct wl_resource *resource_, uint32_t action, uint32_t serial) { wl_resource_post_event(resource_, ZWP_TEXT_INPUT_V3_ACTION, action, serial); } -/** - * @ingroup iface_zwp_text_input_v3 - * Sends an language event to the client owning the resource. - * @param resource_ The client's resource - * @param language new language set by IME - */ static inline void zwp_text_input_v3_send_language(struct wl_resource *resource_, const char *language) { wl_resource_post_event(resource_, ZWP_TEXT_INPUT_V3_LANGUAGE, language); } -/** - * @ingroup iface_zwp_text_input_v3 - * Sends an preedit_hint event to the client owning the resource. - * @param resource_ The client's resource - * @param start starting point of the affected substring - * @param end end point of the affected substring - * @param hint hint to apply - */ static inline void zwp_text_input_v3_send_preedit_hint(struct wl_resource *resource_, uint32_t start, uint32_t end, uint32_t hint) { wl_resource_post_event(resource_, ZWP_TEXT_INPUT_V3_PREEDIT_HINT, start, end, hint); } -/** - * @ingroup iface_zwp_text_input_manager_v3 - * @struct zwp_text_input_manager_v3_interface - */ struct zwp_text_input_manager_v3_interface { - /** - * Destroy the wp_text_input_manager - * - * Destroy the wp_text_input_manager object. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * create a new text input object - * - * Creates a new text-input object for a given seat. - */ void (*get_text_input)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -1082,13 +437,7 @@ struct zwp_text_input_manager_v3_interface { }; -/** - * @ingroup iface_zwp_text_input_manager_v3 - */ #define ZWP_TEXT_INPUT_MANAGER_V3_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_text_input_manager_v3 - */ #define ZWP_TEXT_INPUT_MANAGER_V3_GET_TEXT_INPUT_SINCE_VERSION 1 #ifdef __cplusplus diff --git a/app/src/main/cpp/waylandcomp/generated/viewporter-protocol.c b/app/src/main/cpp/waylandcomp/generated/viewporter-protocol.c index d6aaa71e7f..8efb3ee3d5 100644 --- a/app/src/main/cpp/waylandcomp/generated/viewporter-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/viewporter-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright © 2013-2016 Collabora, Ltd. * @@ -29,7 +27,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/viewporter-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/viewporter-server-protocol.h index 51957565cb..9495136e6c 100644 --- a/app/src/main/cpp/waylandcomp/generated/viewporter-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/viewporter-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef VIEWPORTER_SERVER_PROTOCOL_H #define VIEWPORTER_SERVER_PROTOCOL_H @@ -14,13 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_viewporter The viewporter protocol - * @section page_ifaces_viewporter Interfaces - * - @subpage page_iface_wp_viewporter - surface cropping and scaling - * - @subpage page_iface_wp_viewport - crop and scale interface to a wl_surface +/* * @section page_copyright_viewporter Copyright - *
  *
  * Copyright © 2013-2016 Collabora, Ltd.
  *
@@ -42,184 +36,35 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + struct wl_surface; struct wp_viewport; struct wp_viewporter; #ifndef WP_VIEWPORTER_INTERFACE #define WP_VIEWPORTER_INTERFACE -/** - * @page page_iface_wp_viewporter wp_viewporter - * @section page_iface_wp_viewporter_desc Description - * - * The global interface exposing surface cropping and scaling - * capabilities is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow - * cropping and scaling the surface contents, effectively - * disconnecting the direct relationship between the buffer and the - * surface size. - * @section page_iface_wp_viewporter_api API - * See @ref iface_wp_viewporter. - */ -/** - * @defgroup iface_wp_viewporter The wp_viewporter interface - * - * The global interface exposing surface cropping and scaling - * capabilities is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow - * cropping and scaling the surface contents, effectively - * disconnecting the direct relationship between the buffer and the - * surface size. - */ extern const struct wl_interface wp_viewporter_interface; #endif #ifndef WP_VIEWPORT_INTERFACE #define WP_VIEWPORT_INTERFACE -/** - * @page page_iface_wp_viewport wp_viewport - * @section page_iface_wp_viewport_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - * @section page_iface_wp_viewport_api API - * See @ref iface_wp_viewport. - */ -/** - * @defgroup iface_wp_viewport The wp_viewport interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - */ extern const struct wl_interface wp_viewport_interface; #endif #ifndef WP_VIEWPORTER_ERROR_ENUM #define WP_VIEWPORTER_ERROR_ENUM enum wp_viewporter_error { - /** - * the surface already has a viewport object associated - */ WP_VIEWPORTER_ERROR_VIEWPORT_EXISTS = 0, }; -#endif /* WP_VIEWPORTER_ERROR_ENUM */ +#endif #ifndef WP_VIEWPORTER_ERROR_ENUM_IS_VALID #define WP_VIEWPORTER_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wp_viewporter - * Validate a wp_viewporter error value. - * - * @return true on success, false on error. - * @ref wp_viewporter_error - */ static inline bool wp_viewporter_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -229,32 +74,11 @@ wp_viewporter_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WP_VIEWPORTER_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wp_viewporter - * @struct wp_viewporter_interface - */ struct wp_viewporter_interface { - /** - * unbind from the cropping and scaling interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * wp_viewport objects included. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * extend surface interface for crop and scale - * - * Instantiate an interface extension for the given wl_surface to - * crop and scale its content. If the given wl_surface already has - * a wp_viewport object associated, the viewport_exists protocol - * error is raised. - * @param id the new viewport interface id - * @param surface the surface - */ void (*get_viewport)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -262,46 +86,21 @@ struct wp_viewporter_interface { }; -/** - * @ingroup iface_wp_viewporter - */ #define WP_VIEWPORTER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewporter - */ #define WP_VIEWPORTER_GET_VIEWPORT_SINCE_VERSION 1 #ifndef WP_VIEWPORT_ERROR_ENUM #define WP_VIEWPORT_ERROR_ENUM enum wp_viewport_error { - /** - * negative or zero values in width or height - */ WP_VIEWPORT_ERROR_BAD_VALUE = 0, - /** - * destination size is not integer - */ WP_VIEWPORT_ERROR_BAD_SIZE = 1, - /** - * source rectangle extends outside of the content area - */ WP_VIEWPORT_ERROR_OUT_OF_BUFFER = 2, - /** - * the wl_surface was destroyed - */ WP_VIEWPORT_ERROR_NO_SURFACE = 3, }; -#endif /* WP_VIEWPORT_ERROR_ENUM */ +#endif #ifndef WP_VIEWPORT_ERROR_ENUM_IS_VALID #define WP_VIEWPORT_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wp_viewport - * Validate a wp_viewport error value. - * - * @return true on success, false on error. - * @ref wp_viewport_error - */ static inline bool wp_viewport_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -317,63 +116,17 @@ wp_viewport_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WP_VIEWPORT_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wp_viewport - * @struct wp_viewport_interface - */ struct wp_viewport_interface { - /** - * remove scaling and cropping from the surface - * - * The associated wl_surface's crop and scale state is removed. - * The change is applied on the next wl_surface.commit. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * set the source rectangle for cropping - * - * Set the source rectangle of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If all of x, y, width and height are -1.0, the source rectangle - * is unset instead. Any other set of values where width or height - * are zero or negative, or x or y are negative, raise the - * bad_value protocol error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - * @param x source rectangle x - * @param y source rectangle y - * @param width source rectangle width - * @param height source rectangle height - */ void (*set_source)(struct wl_client *client, struct wl_resource *resource, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height); - /** - * set the surface size for scaling - * - * Set the destination size of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If width is -1 and height is -1, the destination size is unset - * instead. Any other pair of values for width and height that - * contains zero or negative values raises the bad_value protocol - * error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - * @param width surface width - * @param height surface height - */ void (*set_destination)(struct wl_client *client, struct wl_resource *resource, int32_t width, @@ -381,17 +134,8 @@ struct wp_viewport_interface { }; -/** - * @ingroup iface_wp_viewport - */ #define WP_VIEWPORT_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ #define WP_VIEWPORT_SET_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ #define WP_VIEWPORT_SET_DESTINATION_SINCE_VERSION 1 #ifdef __cplusplus diff --git a/app/src/main/cpp/waylandcomp/generated/wlr-data-control-unstable-v1-protocol.c b/app/src/main/cpp/waylandcomp/generated/wlr-data-control-unstable-v1-protocol.c index 4bb2945afc..8e8cafaf37 100644 --- a/app/src/main/cpp/waylandcomp/generated/wlr-data-control-unstable-v1-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/wlr-data-control-unstable-v1-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright © 2018 Simon Ser * Copyright © 2019 Ivan Molodetskikh @@ -32,7 +30,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/wlr-data-control-unstable-v1-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/wlr-data-control-unstable-v1-server-protocol.h index a484875848..f8d847ce6c 100644 --- a/app/src/main/cpp/waylandcomp/generated/wlr-data-control-unstable-v1-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/wlr-data-control-unstable-v1-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef WLR_DATA_CONTROL_UNSTABLE_V1_SERVER_PROTOCOL_H #define WLR_DATA_CONTROL_UNSTABLE_V1_SERVER_PROTOCOL_H @@ -14,35 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_wlr_data_control_unstable_v1 The wlr_data_control_unstable_v1 protocol - * control data devices - * - * @section page_desc_wlr_data_control_unstable_v1 Description - * - * This protocol allows a privileged client to control data devices. In - * particular, the client will be able to manage the current selection and take - * the role of a clipboard manager. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - * - * Note! This protocol is deprecated and not intended for production use. - * For clipboard management, use the ext-data-control-v1 protocol. - * - * @section page_ifaces_wlr_data_control_unstable_v1 Interfaces - * - @subpage page_iface_zwlr_data_control_manager_v1 - manager to control data devices - * - @subpage page_iface_zwlr_data_control_device_v1 - manage a data device for a seat - * - @subpage page_iface_zwlr_data_control_source_v1 - offer to transfer data - * - @subpage page_iface_zwlr_data_control_offer_v1 - offer to transfer data +/* * @section page_copyright_wlr_data_control_unstable_v1 Copyright - *
  *
  * Copyright © 2018 Simon Ser
  * Copyright © 2019 Ivan Molodetskikh
@@ -67,8 +39,35 @@ struct wl_resource;
  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  * THIS SOFTWARE.
- * 
*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + struct wl_seat; struct zwlr_data_control_device_v1; struct zwlr_data_control_manager_v1; @@ -77,158 +76,47 @@ struct zwlr_data_control_source_v1; #ifndef ZWLR_DATA_CONTROL_MANAGER_V1_INTERFACE #define ZWLR_DATA_CONTROL_MANAGER_V1_INTERFACE -/** - * @page page_iface_zwlr_data_control_manager_v1 zwlr_data_control_manager_v1 - * @section page_iface_zwlr_data_control_manager_v1_desc Description - * - * This interface is a manager that allows creating per-seat data device - * controls. - * @section page_iface_zwlr_data_control_manager_v1_api API - * See @ref iface_zwlr_data_control_manager_v1. - */ -/** - * @defgroup iface_zwlr_data_control_manager_v1 The zwlr_data_control_manager_v1 interface - * - * This interface is a manager that allows creating per-seat data device - * controls. - */ extern const struct wl_interface zwlr_data_control_manager_v1_interface; #endif #ifndef ZWLR_DATA_CONTROL_DEVICE_V1_INTERFACE #define ZWLR_DATA_CONTROL_DEVICE_V1_INTERFACE -/** - * @page page_iface_zwlr_data_control_device_v1 zwlr_data_control_device_v1 - * @section page_iface_zwlr_data_control_device_v1_desc Description - * - * This interface allows a client to manage a seat's selection. - * - * When the seat is destroyed, this object becomes inert. - * @section page_iface_zwlr_data_control_device_v1_api API - * See @ref iface_zwlr_data_control_device_v1. - */ -/** - * @defgroup iface_zwlr_data_control_device_v1 The zwlr_data_control_device_v1 interface - * - * This interface allows a client to manage a seat's selection. - * - * When the seat is destroyed, this object becomes inert. - */ extern const struct wl_interface zwlr_data_control_device_v1_interface; #endif #ifndef ZWLR_DATA_CONTROL_SOURCE_V1_INTERFACE #define ZWLR_DATA_CONTROL_SOURCE_V1_INTERFACE -/** - * @page page_iface_zwlr_data_control_source_v1 zwlr_data_control_source_v1 - * @section page_iface_zwlr_data_control_source_v1_desc Description - * - * The wlr_data_control_source object is the source side of a - * wlr_data_control_offer. It is created by the source client in a data - * transfer and provides a way to describe the offered data and a way to - * respond to requests to transfer the data. - * @section page_iface_zwlr_data_control_source_v1_api API - * See @ref iface_zwlr_data_control_source_v1. - */ -/** - * @defgroup iface_zwlr_data_control_source_v1 The zwlr_data_control_source_v1 interface - * - * The wlr_data_control_source object is the source side of a - * wlr_data_control_offer. It is created by the source client in a data - * transfer and provides a way to describe the offered data and a way to - * respond to requests to transfer the data. - */ extern const struct wl_interface zwlr_data_control_source_v1_interface; #endif #ifndef ZWLR_DATA_CONTROL_OFFER_V1_INTERFACE #define ZWLR_DATA_CONTROL_OFFER_V1_INTERFACE -/** - * @page page_iface_zwlr_data_control_offer_v1 zwlr_data_control_offer_v1 - * @section page_iface_zwlr_data_control_offer_v1_desc Description - * - * A wlr_data_control_offer represents a piece of data offered for transfer - * by another client (the source client). The offer describes the different - * MIME types that the data can be converted to and provides the mechanism - * for transferring the data directly from the source client. - * @section page_iface_zwlr_data_control_offer_v1_api API - * See @ref iface_zwlr_data_control_offer_v1. - */ -/** - * @defgroup iface_zwlr_data_control_offer_v1 The zwlr_data_control_offer_v1 interface - * - * A wlr_data_control_offer represents a piece of data offered for transfer - * by another client (the source client). The offer describes the different - * MIME types that the data can be converted to and provides the mechanism - * for transferring the data directly from the source client. - */ extern const struct wl_interface zwlr_data_control_offer_v1_interface; #endif -/** - * @ingroup iface_zwlr_data_control_manager_v1 - * @struct zwlr_data_control_manager_v1_interface - */ struct zwlr_data_control_manager_v1_interface { - /** - * create a new data source - * - * Create a new data source. - * @param id data source to create - */ void (*create_data_source)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * get a data device for a seat - * - * Create a data device that can be used to manage a seat's - * selection. - */ void (*get_data_device)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *seat); - /** - * destroy the manager - * - * All objects created by the manager will still remain valid, - * until their appropriate destroy request has been called. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); }; -/** - * @ingroup iface_zwlr_data_control_manager_v1 - */ #define ZWLR_DATA_CONTROL_MANAGER_V1_CREATE_DATA_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_manager_v1 - */ #define ZWLR_DATA_CONTROL_MANAGER_V1_GET_DATA_DEVICE_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_manager_v1 - */ #define ZWLR_DATA_CONTROL_MANAGER_V1_DESTROY_SINCE_VERSION 1 #ifndef ZWLR_DATA_CONTROL_DEVICE_V1_ERROR_ENUM #define ZWLR_DATA_CONTROL_DEVICE_V1_ERROR_ENUM enum zwlr_data_control_device_v1_error { - /** - * source given to set_selection or set_primary_selection was already used before - */ ZWLR_DATA_CONTROL_DEVICE_V1_ERROR_USED_SOURCE = 1, }; -#endif /* ZWLR_DATA_CONTROL_DEVICE_V1_ERROR_ENUM */ +#endif #ifndef ZWLR_DATA_CONTROL_DEVICE_V1_ERROR_ENUM_IS_VALID #define ZWLR_DATA_CONTROL_DEVICE_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_zwlr_data_control_device_v1 - * Validate a zwlr_data_control_device_v1 error value. - * - * @return true on success, false on error. - * @ref zwlr_data_control_device_v1_error - */ static inline bool zwlr_data_control_device_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -238,51 +126,14 @@ zwlr_data_control_device_v1_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWLR_DATA_CONTROL_DEVICE_V1_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_zwlr_data_control_device_v1 - * @struct zwlr_data_control_device_v1_interface - */ struct zwlr_data_control_device_v1_interface { - /** - * copy data to the selection - * - * This request asks the compositor to set the selection to the - * data from the source on behalf of the client. - * - * The given source may not be used in any further set_selection or - * set_primary_selection requests. Attempting to use a previously - * used source is a protocol error. - * - * To unset the selection, set the source to NULL. - */ void (*set_selection)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *source); - /** - * destroy this data device - * - * Destroys the data device object. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * copy data to the primary selection - * - * This request asks the compositor to set the primary selection - * to the data from the source on behalf of the client. - * - * The given source may not be used in any further set_selection or - * set_primary_selection requests. Attempting to use a previously - * used source is a protocol error. - * - * To unset the primary selection, set the source to NULL. - * - * The compositor will ignore this request if it does not support - * primary selection. - * @since 2 - */ void (*set_primary_selection)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *source); @@ -293,74 +144,33 @@ struct zwlr_data_control_device_v1_interface { #define ZWLR_DATA_CONTROL_DEVICE_V1_FINISHED 2 #define ZWLR_DATA_CONTROL_DEVICE_V1_PRIMARY_SELECTION 3 -/** - * @ingroup iface_zwlr_data_control_device_v1 - */ #define ZWLR_DATA_CONTROL_DEVICE_V1_DATA_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_device_v1 - */ #define ZWLR_DATA_CONTROL_DEVICE_V1_SELECTION_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_device_v1 - */ #define ZWLR_DATA_CONTROL_DEVICE_V1_FINISHED_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_device_v1 - */ #define ZWLR_DATA_CONTROL_DEVICE_V1_PRIMARY_SELECTION_SINCE_VERSION 2 -/** - * @ingroup iface_zwlr_data_control_device_v1 - */ #define ZWLR_DATA_CONTROL_DEVICE_V1_SET_SELECTION_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_device_v1 - */ #define ZWLR_DATA_CONTROL_DEVICE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_device_v1 - */ #define ZWLR_DATA_CONTROL_DEVICE_V1_SET_PRIMARY_SELECTION_SINCE_VERSION 2 -/** - * @ingroup iface_zwlr_data_control_device_v1 - * Sends an data_offer event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwlr_data_control_device_v1_send_data_offer(struct wl_resource *resource_, struct wl_resource *id) { wl_resource_post_event(resource_, ZWLR_DATA_CONTROL_DEVICE_V1_DATA_OFFER, id); } -/** - * @ingroup iface_zwlr_data_control_device_v1 - * Sends an selection event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwlr_data_control_device_v1_send_selection(struct wl_resource *resource_, struct wl_resource *id) { wl_resource_post_event(resource_, ZWLR_DATA_CONTROL_DEVICE_V1_SELECTION, id); } -/** - * @ingroup iface_zwlr_data_control_device_v1 - * Sends an finished event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwlr_data_control_device_v1_send_finished(struct wl_resource *resource_) { wl_resource_post_event(resource_, ZWLR_DATA_CONTROL_DEVICE_V1_FINISHED); } -/** - * @ingroup iface_zwlr_data_control_device_v1 - * Sends an primary_selection event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwlr_data_control_device_v1_send_primary_selection(struct wl_resource *resource_, struct wl_resource *id) { @@ -370,22 +180,12 @@ zwlr_data_control_device_v1_send_primary_selection(struct wl_resource *resource_ #ifndef ZWLR_DATA_CONTROL_SOURCE_V1_ERROR_ENUM #define ZWLR_DATA_CONTROL_SOURCE_V1_ERROR_ENUM enum zwlr_data_control_source_v1_error { - /** - * offer sent after wlr_data_control_device.set_selection - */ ZWLR_DATA_CONTROL_SOURCE_V1_ERROR_INVALID_OFFER = 1, }; -#endif /* ZWLR_DATA_CONTROL_SOURCE_V1_ERROR_ENUM */ +#endif #ifndef ZWLR_DATA_CONTROL_SOURCE_V1_ERROR_ENUM_IS_VALID #define ZWLR_DATA_CONTROL_SOURCE_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_zwlr_data_control_source_v1 - * Validate a zwlr_data_control_source_v1 error value. - * - * @return true on success, false on error. - * @ref zwlr_data_control_source_v1_error - */ static inline bool zwlr_data_control_source_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -395,32 +195,12 @@ zwlr_data_control_source_v1_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* ZWLR_DATA_CONTROL_SOURCE_V1_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_zwlr_data_control_source_v1 - * @struct zwlr_data_control_source_v1_interface - */ struct zwlr_data_control_source_v1_interface { - /** - * add an offered MIME type - * - * This request adds a MIME type to the set of MIME types - * advertised to targets. Can be called several times to offer - * multiple types. - * - * Calling this after wlr_data_control_device.set_selection is a - * protocol error. - * @param mime_type MIME type offered by the data source - */ void (*offer)(struct wl_client *client, struct wl_resource *resource, const char *mime_type); - /** - * destroy this source - * - * Destroys the data source object. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); }; @@ -428,106 +208,40 @@ struct zwlr_data_control_source_v1_interface { #define ZWLR_DATA_CONTROL_SOURCE_V1_SEND 0 #define ZWLR_DATA_CONTROL_SOURCE_V1_CANCELLED 1 -/** - * @ingroup iface_zwlr_data_control_source_v1 - */ #define ZWLR_DATA_CONTROL_SOURCE_V1_SEND_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_source_v1 - */ #define ZWLR_DATA_CONTROL_SOURCE_V1_CANCELLED_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_source_v1 - */ #define ZWLR_DATA_CONTROL_SOURCE_V1_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_source_v1 - */ #define ZWLR_DATA_CONTROL_SOURCE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_source_v1 - * Sends an send event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type MIME type for the data - * @param fd file descriptor for the data - */ static inline void zwlr_data_control_source_v1_send_send(struct wl_resource *resource_, const char *mime_type, int32_t fd) { wl_resource_post_event(resource_, ZWLR_DATA_CONTROL_SOURCE_V1_SEND, mime_type, fd); } -/** - * @ingroup iface_zwlr_data_control_source_v1 - * Sends an cancelled event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void zwlr_data_control_source_v1_send_cancelled(struct wl_resource *resource_) { wl_resource_post_event(resource_, ZWLR_DATA_CONTROL_SOURCE_V1_CANCELLED); } -/** - * @ingroup iface_zwlr_data_control_offer_v1 - * @struct zwlr_data_control_offer_v1_interface - */ struct zwlr_data_control_offer_v1_interface { - /** - * request that the data is transferred - * - * To transfer the offered data, the client issues this request - * and indicates the MIME type it wants to receive. The transfer - * happens through the passed file descriptor (typically created - * with the pipe system call). The source client writes the data in - * the MIME type representation requested and then closes the file - * descriptor. - * - * The receiving client reads from the read end of the pipe until - * EOF and then closes its end, at which point the transfer is - * complete. - * - * This request may happen multiple times for different MIME types. - * @param mime_type MIME type desired by receiver - * @param fd file descriptor for data transfer - */ void (*receive)(struct wl_client *client, struct wl_resource *resource, const char *mime_type, int32_t fd); - /** - * destroy this offer - * - * Destroys the data offer object. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); }; #define ZWLR_DATA_CONTROL_OFFER_V1_OFFER 0 -/** - * @ingroup iface_zwlr_data_control_offer_v1 - */ #define ZWLR_DATA_CONTROL_OFFER_V1_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_offer_v1 - */ #define ZWLR_DATA_CONTROL_OFFER_V1_RECEIVE_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_offer_v1 - */ #define ZWLR_DATA_CONTROL_OFFER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwlr_data_control_offer_v1 - * Sends an offer event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type offered MIME type - */ static inline void zwlr_data_control_offer_v1_send_offer(struct wl_resource *resource_, const char *mime_type) { diff --git a/app/src/main/cpp/waylandcomp/generated/xdg-shell-client-protocol.h b/app/src/main/cpp/waylandcomp/generated/xdg-shell-client-protocol.h index 5280ba38b8..c73ba799a5 100644 --- a/app/src/main/cpp/waylandcomp/generated/xdg-shell-client-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/xdg-shell-client-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef XDG_SHELL_CLIENT_PROTOCOL_H #define XDG_SHELL_CLIENT_PROTOCOL_H @@ -11,16 +10,8 @@ extern "C" { #endif -/** - * @page page_xdg_shell The xdg_shell protocol - * @section page_ifaces_xdg_shell Interfaces - * - @subpage page_iface_xdg_wm_base - create desktop-style surfaces - * - @subpage page_iface_xdg_positioner - child surface positioner - * - @subpage page_iface_xdg_surface - desktop user interface surface base interface - * - @subpage page_iface_xdg_toplevel - toplevel surface - * - @subpage page_iface_xdg_popup - short-lived, popup surfaces for menus +/* * @section page_copyright_xdg_shell Copyright - *
  *
  * Copyright © 2008-2013 Kristian Høgsberg
  * Copyright © 2013      Rafael Antognolli
@@ -47,8 +38,16 @@ extern "C" {
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + + + + struct wl_output; struct wl_seat; struct wl_surface; @@ -60,366 +59,44 @@ struct xdg_wm_base; #ifndef XDG_WM_BASE_INTERFACE #define XDG_WM_BASE_INTERFACE -/** - * @page page_iface_xdg_wm_base xdg_wm_base - * @section page_iface_xdg_wm_base_desc Description - * - * The xdg_wm_base interface is exposed as a global object enabling clients - * to turn their wl_surfaces into windows in a desktop environment. It - * defines the basic functionality needed for clients and the compositor to - * create windows that can be dragged, resized, maximized, etc, as well as - * creating transient windows such as popup menus. - * @section page_iface_xdg_wm_base_api API - * See @ref iface_xdg_wm_base. - */ -/** - * @defgroup iface_xdg_wm_base The xdg_wm_base interface - * - * The xdg_wm_base interface is exposed as a global object enabling clients - * to turn their wl_surfaces into windows in a desktop environment. It - * defines the basic functionality needed for clients and the compositor to - * create windows that can be dragged, resized, maximized, etc, as well as - * creating transient windows such as popup menus. - */ extern const struct wl_interface xdg_wm_base_interface; #endif #ifndef XDG_POSITIONER_INTERFACE #define XDG_POSITIONER_INTERFACE -/** - * @page page_iface_xdg_positioner xdg_positioner - * @section page_iface_xdg_positioner_desc Description - * - * The xdg_positioner provides a collection of rules for the placement of a - * child surface relative to a parent surface. Rules can be defined to ensure - * the child surface remains within the visible area's borders, and to - * specify how the child surface changes its position, such as sliding along - * an axis, or flipping around a rectangle. These positioner-created rules are - * constrained by the requirement that a child surface must intersect with or - * be at least partially adjacent to its parent surface. - * - * See the various requests for details about possible rules. - * - * At the time of the request, the compositor makes a copy of the rules - * specified by the xdg_positioner. Thus, after the request is complete the - * xdg_positioner object can be destroyed or reused; further changes to the - * object will have no effect on previous usages. - * - * For an xdg_positioner object to be considered complete, it must have a - * non-zero size set by set_size, and a non-zero anchor rectangle set by - * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an invalid_positioner error. - * @section page_iface_xdg_positioner_api API - * See @ref iface_xdg_positioner. - */ -/** - * @defgroup iface_xdg_positioner The xdg_positioner interface - * - * The xdg_positioner provides a collection of rules for the placement of a - * child surface relative to a parent surface. Rules can be defined to ensure - * the child surface remains within the visible area's borders, and to - * specify how the child surface changes its position, such as sliding along - * an axis, or flipping around a rectangle. These positioner-created rules are - * constrained by the requirement that a child surface must intersect with or - * be at least partially adjacent to its parent surface. - * - * See the various requests for details about possible rules. - * - * At the time of the request, the compositor makes a copy of the rules - * specified by the xdg_positioner. Thus, after the request is complete the - * xdg_positioner object can be destroyed or reused; further changes to the - * object will have no effect on previous usages. - * - * For an xdg_positioner object to be considered complete, it must have a - * non-zero size set by set_size, and a non-zero anchor rectangle set by - * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an invalid_positioner error. - */ extern const struct wl_interface xdg_positioner_interface; #endif #ifndef XDG_SURFACE_INTERFACE #define XDG_SURFACE_INTERFACE -/** - * @page page_iface_xdg_surface xdg_surface - * @section page_iface_xdg_surface_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides a base set of functionality required to construct user - * interface elements requiring management by the compositor, such as - * toplevel windows, menus, etc. The types of functionality are split into - * xdg_surface roles. - * - * Creating an xdg_surface does not set the role for a wl_surface. In order - * to map an xdg_surface, the client must create a role-specific object - * using, e.g., get_toplevel, get_popup. The wl_surface for any given - * xdg_surface can have at most one role, and may not be assigned any role - * not based on xdg_surface. - * - * A role must be assigned before any other requests are made to the - * xdg_surface object. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. - * - * Creating an xdg_surface from a wl_surface which has a buffer attached or - * committed is a client error, and any attempts by a client to attach or - * manipulate a buffer prior to the first xdg_surface.configure call must - * also be treated as errors. - * - * After creating a role-specific object and setting it up, the client must - * perform an initial commit without any buffer attached. The compositor - * will reply with an xdg_surface.configure event. The client must - * acknowledge it and is then allowed to attach a buffer to map the surface. - * - * Mapping an xdg_surface-based role surface is defined as making it - * possible for the surface to be shown by the compositor. Note that - * a mapped surface is not guaranteed to be visible once it is mapped. - * - * For an xdg_surface to be mapped by the compositor, the following - * conditions must be met: - * (1) the client has assigned an xdg_surface-based role to the surface - * (2) the client has set and committed the xdg_surface state and the - * role-dependent state to the surface - * (3) the client has committed a buffer to the surface - * - * A newly-unmapped surface is considered to have met condition (1) out - * of the 3 required conditions for mapping a surface if its role surface - * has not been destroyed, i.e. the client must perform the initial commit - * again before attaching a buffer. - * @section page_iface_xdg_surface_api API - * See @ref iface_xdg_surface. - */ -/** - * @defgroup iface_xdg_surface The xdg_surface interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides a base set of functionality required to construct user - * interface elements requiring management by the compositor, such as - * toplevel windows, menus, etc. The types of functionality are split into - * xdg_surface roles. - * - * Creating an xdg_surface does not set the role for a wl_surface. In order - * to map an xdg_surface, the client must create a role-specific object - * using, e.g., get_toplevel, get_popup. The wl_surface for any given - * xdg_surface can have at most one role, and may not be assigned any role - * not based on xdg_surface. - * - * A role must be assigned before any other requests are made to the - * xdg_surface object. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. - * - * Creating an xdg_surface from a wl_surface which has a buffer attached or - * committed is a client error, and any attempts by a client to attach or - * manipulate a buffer prior to the first xdg_surface.configure call must - * also be treated as errors. - * - * After creating a role-specific object and setting it up, the client must - * perform an initial commit without any buffer attached. The compositor - * will reply with an xdg_surface.configure event. The client must - * acknowledge it and is then allowed to attach a buffer to map the surface. - * - * Mapping an xdg_surface-based role surface is defined as making it - * possible for the surface to be shown by the compositor. Note that - * a mapped surface is not guaranteed to be visible once it is mapped. - * - * For an xdg_surface to be mapped by the compositor, the following - * conditions must be met: - * (1) the client has assigned an xdg_surface-based role to the surface - * (2) the client has set and committed the xdg_surface state and the - * role-dependent state to the surface - * (3) the client has committed a buffer to the surface - * - * A newly-unmapped surface is considered to have met condition (1) out - * of the 3 required conditions for mapping a surface if its role surface - * has not been destroyed, i.e. the client must perform the initial commit - * again before attaching a buffer. - */ extern const struct wl_interface xdg_surface_interface; #endif #ifndef XDG_TOPLEVEL_INTERFACE #define XDG_TOPLEVEL_INTERFACE -/** - * @page page_iface_xdg_toplevel xdg_toplevel - * @section page_iface_xdg_toplevel_desc Description - * - * This interface defines an xdg_surface role which allows a surface to, - * among other things, set window-like properties such as maximize, - * fullscreen, and minimize, set application-specific metadata like title and - * id, and well as trigger user interactive operations such as interactive - * resize and move. - * - * Unmapping an xdg_toplevel means that the surface cannot be shown - * by the compositor until it is explicitly mapped again. - * All active operations (e.g., move, resize) are canceled and all - * attributes (e.g. title, state, stacking, ...) are discarded for - * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to - * the state it had right after xdg_surface.get_toplevel. The client - * can re-map the toplevel by performing a commit without any buffer - * attached, waiting for a configure event and handling it as usual (see - * xdg_surface description). - * - * Attaching a null buffer to a toplevel unmaps the surface. - * @section page_iface_xdg_toplevel_api API - * See @ref iface_xdg_toplevel. - */ -/** - * @defgroup iface_xdg_toplevel The xdg_toplevel interface - * - * This interface defines an xdg_surface role which allows a surface to, - * among other things, set window-like properties such as maximize, - * fullscreen, and minimize, set application-specific metadata like title and - * id, and well as trigger user interactive operations such as interactive - * resize and move. - * - * Unmapping an xdg_toplevel means that the surface cannot be shown - * by the compositor until it is explicitly mapped again. - * All active operations (e.g., move, resize) are canceled and all - * attributes (e.g. title, state, stacking, ...) are discarded for - * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to - * the state it had right after xdg_surface.get_toplevel. The client - * can re-map the toplevel by performing a commit without any buffer - * attached, waiting for a configure event and handling it as usual (see - * xdg_surface description). - * - * Attaching a null buffer to a toplevel unmaps the surface. - */ extern const struct wl_interface xdg_toplevel_interface; #endif #ifndef XDG_POPUP_INTERFACE #define XDG_POPUP_INTERFACE -/** - * @page page_iface_xdg_popup xdg_popup - * @section page_iface_xdg_popup_desc Description - * - * A popup surface is a short-lived, temporary surface. It can be used to - * implement for example menus, popovers, tooltips and other similar user - * interface concepts. - * - * A popup can be made to take an explicit grab. See xdg_popup.grab for - * details. - * - * When the popup is dismissed, a popup_done event will be sent out, and at - * the same time the surface will be unmapped. See the xdg_popup.popup_done - * event for details. - * - * Explicitly destroying the xdg_popup object will also dismiss the popup and - * unmap the surface. Clients that want to dismiss the popup when another - * surface of their own is clicked should dismiss the popup using the destroy - * request. - * - * A newly created xdg_popup will be stacked on top of all previously created - * xdg_popup surfaces associated with the same xdg_toplevel. - * - * The parent of an xdg_popup must be mapped (see the xdg_surface - * description) before the xdg_popup itself. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - * @section page_iface_xdg_popup_api API - * See @ref iface_xdg_popup. - */ -/** - * @defgroup iface_xdg_popup The xdg_popup interface - * - * A popup surface is a short-lived, temporary surface. It can be used to - * implement for example menus, popovers, tooltips and other similar user - * interface concepts. - * - * A popup can be made to take an explicit grab. See xdg_popup.grab for - * details. - * - * When the popup is dismissed, a popup_done event will be sent out, and at - * the same time the surface will be unmapped. See the xdg_popup.popup_done - * event for details. - * - * Explicitly destroying the xdg_popup object will also dismiss the popup and - * unmap the surface. Clients that want to dismiss the popup when another - * surface of their own is clicked should dismiss the popup using the destroy - * request. - * - * A newly created xdg_popup will be stacked on top of all previously created - * xdg_popup surfaces associated with the same xdg_toplevel. - * - * The parent of an xdg_popup must be mapped (see the xdg_surface - * description) before the xdg_popup itself. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - */ extern const struct wl_interface xdg_popup_interface; #endif #ifndef XDG_WM_BASE_ERROR_ENUM #define XDG_WM_BASE_ERROR_ENUM enum xdg_wm_base_error { - /** - * given wl_surface has another role - */ XDG_WM_BASE_ERROR_ROLE = 0, - /** - * xdg_wm_base was destroyed before children - */ XDG_WM_BASE_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ XDG_WM_BASE_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ XDG_WM_BASE_ERROR_INVALID_POPUP_PARENT = 3, - /** - * the client provided an invalid surface state - */ XDG_WM_BASE_ERROR_INVALID_SURFACE_STATE = 4, - /** - * the client provided an invalid positioner - */ XDG_WM_BASE_ERROR_INVALID_POSITIONER = 5, - /** - * the client didn’t respond to a ping event in time - */ XDG_WM_BASE_ERROR_UNRESPONSIVE = 6, }; -#endif /* XDG_WM_BASE_ERROR_ENUM */ +#endif -/** - * @ingroup iface_xdg_wm_base - * @struct xdg_wm_base_listener - */ struct xdg_wm_base_listener { - /** - * check if the client is alive - * - * The ping event asks the client if it's still alive. Pass the - * serial specified in the event back to the compositor by sending - * a "pong" request back with the specified serial. See - * xdg_wm_base.pong. - * - * Compositors can use this to determine if the client is still - * alive. It's unspecified what will happen if the client doesn't - * respond to the ping request, or in what timeframe. Clients - * should try to respond in a reasonable amount of time. The - * “unresponsive” error is provided for compositors that wish - * to disconnect unresponsive clients. - * - * A compositor is free to ping in any way it wants, but a client - * must always respond to any xdg_wm_base object it created. - * @param serial pass this to the pong request - */ void (*ping)(void *data, struct xdg_wm_base *xdg_wm_base, uint32_t serial); }; -/** - * @ingroup iface_xdg_wm_base - */ static inline int xdg_wm_base_add_listener(struct xdg_wm_base *xdg_wm_base, const struct xdg_wm_base_listener *listener, void *data) @@ -433,36 +110,19 @@ xdg_wm_base_add_listener(struct xdg_wm_base *xdg_wm_base, #define XDG_WM_BASE_GET_XDG_SURFACE 2 #define XDG_WM_BASE_PONG 3 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_PING_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_CREATE_POSITIONER_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_PONG_SINCE_VERSION 1 -/** @ingroup iface_xdg_wm_base */ static inline void xdg_wm_base_set_user_data(struct xdg_wm_base *xdg_wm_base, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) xdg_wm_base, user_data); } -/** @ingroup iface_xdg_wm_base */ static inline void * xdg_wm_base_get_user_data(struct xdg_wm_base *xdg_wm_base) { @@ -475,15 +135,6 @@ xdg_wm_base_get_version(struct xdg_wm_base *xdg_wm_base) return wl_proxy_get_version((struct wl_proxy *) xdg_wm_base); } -/** - * @ingroup iface_xdg_wm_base - * - * Destroy this xdg_wm_base object. - * - * Destroying a bound xdg_wm_base object while there are surfaces - * still alive created by this xdg_wm_base object instance is illegal - * and will result in a defunct_surfaces error. - */ static inline void xdg_wm_base_destroy(struct xdg_wm_base *xdg_wm_base) { @@ -491,13 +142,6 @@ xdg_wm_base_destroy(struct xdg_wm_base *xdg_wm_base) XDG_WM_BASE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_wm_base), WL_MARSHAL_FLAG_DESTROY); } -/** - * @ingroup iface_xdg_wm_base - * - * Create a positioner object. A positioner object is used to position - * surfaces relative to some parent surface. See the interface description - * and xdg_surface.get_popup for details. - */ static inline struct xdg_positioner * xdg_wm_base_create_positioner(struct xdg_wm_base *xdg_wm_base) { @@ -509,23 +153,6 @@ xdg_wm_base_create_positioner(struct xdg_wm_base *xdg_wm_base) return (struct xdg_positioner *) id; } -/** - * @ingroup iface_xdg_wm_base - * - * This creates an xdg_surface for the given surface. While xdg_surface - * itself is not a role, the corresponding surface may only be assigned - * a role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is - * illegal to create an xdg_surface for a wl_surface which already has an - * assigned role and this will result in a role error. - * - * This creates an xdg_surface for the given surface. An xdg_surface is - * used as basis to define a role to a given surface, such as xdg_toplevel - * or xdg_popup. It also manages functionality shared between xdg_surface - * based surface roles. - * - * See the documentation of xdg_surface for more details about what an - * xdg_surface is and how it is used. - */ static inline struct xdg_surface * xdg_wm_base_get_xdg_surface(struct xdg_wm_base *xdg_wm_base, struct wl_surface *surface) { @@ -537,13 +164,6 @@ xdg_wm_base_get_xdg_surface(struct xdg_wm_base *xdg_wm_base, struct wl_surface * return (struct xdg_surface *) id; } -/** - * @ingroup iface_xdg_wm_base - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. See xdg_wm_base.ping - * and xdg_wm_base.error.unresponsive. - */ static inline void xdg_wm_base_pong(struct xdg_wm_base *xdg_wm_base, uint32_t serial) { @@ -554,12 +174,9 @@ xdg_wm_base_pong(struct xdg_wm_base *xdg_wm_base, uint32_t serial) #ifndef XDG_POSITIONER_ERROR_ENUM #define XDG_POSITIONER_ERROR_ENUM enum xdg_positioner_error { - /** - * invalid input provided - */ XDG_POSITIONER_ERROR_INVALID_INPUT = 0, }; -#endif /* XDG_POSITIONER_ERROR_ENUM */ +#endif #ifndef XDG_POSITIONER_ANCHOR_ENUM #define XDG_POSITIONER_ANCHOR_ENUM @@ -574,7 +191,7 @@ enum xdg_positioner_anchor { XDG_POSITIONER_ANCHOR_TOP_RIGHT = 7, XDG_POSITIONER_ANCHOR_BOTTOM_RIGHT = 8, }; -#endif /* XDG_POSITIONER_ANCHOR_ENUM */ +#endif #ifndef XDG_POSITIONER_GRAVITY_ENUM #define XDG_POSITIONER_GRAVITY_ENUM @@ -589,115 +206,20 @@ enum xdg_positioner_gravity { XDG_POSITIONER_GRAVITY_TOP_RIGHT = 7, XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT = 8, }; -#endif /* XDG_POSITIONER_GRAVITY_ENUM */ +#endif #ifndef XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM #define XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM -/** - * @ingroup iface_xdg_positioner - * constraint adjustments - * - * The constraint adjustment value define ways the compositor will adjust - * the position of the surface, if the unadjusted position would result - * in the surface being partly constrained. - * - * Whether a surface is considered 'constrained' is left to the compositor - * to determine. For example, the surface may be partly outside the - * compositor's defined 'work area', thus necessitating the child surface's - * position be adjusted until it is entirely inside the work area. - * - * The adjustments can be combined, according to a defined precedence: 1) - * Flip, 2) Slide, 3) Resize. - */ enum xdg_positioner_constraint_adjustment { - /** - * don't move the child surface when constrained - * - * Don't alter the surface position even if it is constrained on - * some axis, for example partially outside the edge of an output. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE = 0, - /** - * move along the x axis until unconstrained - * - * Slide the surface along the x axis until it is no longer - * constrained. - * - * First try to slide towards the direction of the gravity on the x - * axis until either the edge in the opposite direction of the - * gravity is unconstrained or the edge in the direction of the - * gravity is constrained. - * - * Then try to slide towards the opposite direction of the gravity - * on the x axis until either the edge in the direction of the - * gravity is unconstrained or the edge in the opposite direction - * of the gravity is constrained. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1, - /** - * move along the y axis until unconstrained - * - * Slide the surface along the y axis until it is no longer - * constrained. - * - * First try to slide towards the direction of the gravity on the y - * axis until either the edge in the opposite direction of the - * gravity is unconstrained or the edge in the direction of the - * gravity is constrained. - * - * Then try to slide towards the opposite direction of the gravity - * on the y axis until either the edge in the direction of the - * gravity is unconstrained or the edge in the opposite direction - * of the gravity is constrained. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2, - /** - * invert the anchor and gravity on the x axis - * - * Invert the anchor and gravity on the x axis if the surface is - * constrained on the x axis. For example, if the left edge of the - * surface is constrained, the gravity is 'left' and the anchor is - * 'left', change the gravity to 'right' and the anchor to 'right'. - * - * If the adjusted position also ends up being constrained, the - * resulting position of the flip_x adjustment will be the one - * before the adjustment. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X = 4, - /** - * invert the anchor and gravity on the y axis - * - * Invert the anchor and gravity on the y axis if the surface is - * constrained on the y axis. For example, if the bottom edge of - * the surface is constrained, the gravity is 'bottom' and the - * anchor is 'bottom', change the gravity to 'top' and the anchor - * to 'top'. - * - * The adjusted position is calculated given the original anchor - * rectangle and offset, but with the new flipped anchor and - * gravity values. - * - * If the adjusted position also ends up being constrained, the - * resulting position of the flip_y adjustment will be the one - * before the adjustment. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8, - /** - * horizontally resize the surface - * - * Resize the surface horizontally so that it is completely - * unconstrained. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16, - /** - * vertically resize the surface - * - * Resize the surface vertically so that it is completely - * unconstrained. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32, }; -#endif /* XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM */ +#endif #define XDG_POSITIONER_DESTROY 0 #define XDG_POSITIONER_SET_SIZE 1 @@ -711,55 +233,23 @@ enum xdg_positioner_constraint_adjustment { #define XDG_POSITIONER_SET_PARENT_CONFIGURE 9 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_ANCHOR_RECT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_ANCHOR_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_GRAVITY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_OFFSET_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_REACTIVE_SINCE_VERSION 3 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_PARENT_SIZE_SINCE_VERSION 3 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_PARENT_CONFIGURE_SINCE_VERSION 3 -/** @ingroup iface_xdg_positioner */ static inline void xdg_positioner_set_user_data(struct xdg_positioner *xdg_positioner, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) xdg_positioner, user_data); } -/** @ingroup iface_xdg_positioner */ static inline void * xdg_positioner_get_user_data(struct xdg_positioner *xdg_positioner) { @@ -772,11 +262,6 @@ xdg_positioner_get_version(struct xdg_positioner *xdg_positioner) return wl_proxy_get_version((struct wl_proxy *) xdg_positioner); } -/** - * @ingroup iface_xdg_positioner - * - * Notify the compositor that the xdg_positioner will no longer be used. - */ static inline void xdg_positioner_destroy(struct xdg_positioner *xdg_positioner) { @@ -784,15 +269,6 @@ xdg_positioner_destroy(struct xdg_positioner *xdg_positioner) XDG_POSITIONER_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), WL_MARSHAL_FLAG_DESTROY); } -/** - * @ingroup iface_xdg_positioner - * - * Set the size of the surface that is to be positioned with the positioner - * object. The size is in surface-local coordinates and corresponds to the - * window geometry. See xdg_surface.set_window_geometry. - * - * If a zero or negative size is set the invalid_input error is raised. - */ static inline void xdg_positioner_set_size(struct xdg_positioner *xdg_positioner, int32_t width, int32_t height) { @@ -800,20 +276,6 @@ xdg_positioner_set_size(struct xdg_positioner *xdg_positioner, int32_t width, in XDG_POSITIONER_SET_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, width, height); } -/** - * @ingroup iface_xdg_positioner - * - * Specify the anchor rectangle within the parent surface that the child - * surface will be placed relative to. The rectangle is relative to the - * window geometry as defined by xdg_surface.set_window_geometry of the - * parent surface. - * - * When the xdg_positioner object is used to position a child surface, the - * anchor rectangle may not extend outside the window geometry of the - * positioned child's parent surface. - * - * If a negative size is set the invalid_input error is raised. - */ static inline void xdg_positioner_set_anchor_rect(struct xdg_positioner *xdg_positioner, int32_t x, int32_t y, int32_t width, int32_t height) { @@ -821,16 +283,6 @@ xdg_positioner_set_anchor_rect(struct xdg_positioner *xdg_positioner, int32_t x, XDG_POSITIONER_SET_ANCHOR_RECT, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, x, y, width, height); } -/** - * @ingroup iface_xdg_positioner - * - * Defines the anchor point for the anchor rectangle. The specified anchor - * is used derive an anchor point that the child surface will be - * positioned relative to. If a corner anchor is set (e.g. 'top_left' or - * 'bottom_right'), the anchor point will be at the specified corner; - * otherwise, the derived anchor point will be centered on the specified - * edge, or in the center of the anchor rectangle if no edge is specified. - */ static inline void xdg_positioner_set_anchor(struct xdg_positioner *xdg_positioner, uint32_t anchor) { @@ -838,17 +290,6 @@ xdg_positioner_set_anchor(struct xdg_positioner *xdg_positioner, uint32_t anchor XDG_POSITIONER_SET_ANCHOR, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, anchor); } -/** - * @ingroup iface_xdg_positioner - * - * Defines in what direction a surface should be positioned, relative to - * the anchor point of the parent surface. If a corner gravity is - * specified (e.g. 'bottom_right' or 'top_left'), then the child surface - * will be placed towards the specified gravity; otherwise, the child - * surface will be centered over the anchor point on any axis that had no - * gravity specified. If the gravity is not in the ‘gravity’ enum, an - * invalid_input error is raised. - */ static inline void xdg_positioner_set_gravity(struct xdg_positioner *xdg_positioner, uint32_t gravity) { @@ -856,23 +297,6 @@ xdg_positioner_set_gravity(struct xdg_positioner *xdg_positioner, uint32_t gravi XDG_POSITIONER_SET_GRAVITY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, gravity); } -/** - * @ingroup iface_xdg_positioner - * - * Specify how the window should be positioned if the originally intended - * position caused the surface to be constrained, meaning at least - * partially outside positioning boundaries set by the compositor. The - * adjustment is set by constructing a bitmask describing the adjustment to - * be made when the surface is constrained on that axis. - * - * If no bit for one axis is set, the compositor will assume that the child - * surface should not change its position on that axis when constrained. - * - * If more than one bit for one axis is set, the order of how adjustments - * are applied is specified in the corresponding adjustment descriptions. - * - * The default adjustment is none. - */ static inline void xdg_positioner_set_constraint_adjustment(struct xdg_positioner *xdg_positioner, uint32_t constraint_adjustment) { @@ -880,21 +304,6 @@ xdg_positioner_set_constraint_adjustment(struct xdg_positioner *xdg_positioner, XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, constraint_adjustment); } -/** - * @ingroup iface_xdg_positioner - * - * Specify the surface position offset relative to the position of the - * anchor on the anchor rectangle and the anchor on the surface. For - * example if the anchor of the anchor rectangle is at (x, y), the surface - * has the gravity bottom|right, and the offset is (ox, oy), the calculated - * surface position will be (x + ox, y + oy). The offset position of the - * surface is the one used for constraint testing. See - * set_constraint_adjustment. - * - * An example use case is placing a popup menu on top of a user interface - * element, while aligning the user interface element of the parent surface - * with some user interface element placed somewhere in the popup surface. - */ static inline void xdg_positioner_set_offset(struct xdg_positioner *xdg_positioner, int32_t x, int32_t y) { @@ -902,16 +311,6 @@ xdg_positioner_set_offset(struct xdg_positioner *xdg_positioner, int32_t x, int3 XDG_POSITIONER_SET_OFFSET, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, x, y); } -/** - * @ingroup iface_xdg_positioner - * - * When set reactive, the surface is reconstrained if the conditions used - * for constraining changed, e.g. the parent window moved. - * - * If the conditions changed and the popup was reconstrained, an - * xdg_popup.configure event is sent with updated geometry, followed by an - * xdg_surface.configure event. - */ static inline void xdg_positioner_set_reactive(struct xdg_positioner *xdg_positioner) { @@ -919,17 +318,6 @@ xdg_positioner_set_reactive(struct xdg_positioner *xdg_positioner) XDG_POSITIONER_SET_REACTIVE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0); } -/** - * @ingroup iface_xdg_positioner - * - * Set the parent window geometry the compositor should use when - * positioning the popup. The compositor may use this information to - * determine the future state the popup should be constrained using. If - * this doesn't match the dimension of the parent the popup is eventually - * positioned against, the behavior is undefined. - * - * The arguments are given in the surface-local coordinate space. - */ static inline void xdg_positioner_set_parent_size(struct xdg_positioner *xdg_positioner, int32_t parent_width, int32_t parent_height) { @@ -937,14 +325,6 @@ xdg_positioner_set_parent_size(struct xdg_positioner *xdg_positioner, int32_t pa XDG_POSITIONER_SET_PARENT_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, parent_width, parent_height); } -/** - * @ingroup iface_xdg_positioner - * - * Set the serial of an xdg_surface.configure event this positioner will be - * used in response to. The compositor may use this information together - * with set_parent_size to determine what future state the popup should be - * constrained using. - */ static inline void xdg_positioner_set_parent_configure(struct xdg_positioner *xdg_positioner, uint32_t serial) { @@ -955,70 +335,21 @@ xdg_positioner_set_parent_configure(struct xdg_positioner *xdg_positioner, uint3 #ifndef XDG_SURFACE_ERROR_ENUM #define XDG_SURFACE_ERROR_ENUM enum xdg_surface_error { - /** - * Surface was not fully constructed - */ XDG_SURFACE_ERROR_NOT_CONSTRUCTED = 1, - /** - * Surface was already constructed - */ XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED = 2, - /** - * Attaching a buffer to an unconfigured surface - */ XDG_SURFACE_ERROR_UNCONFIGURED_BUFFER = 3, - /** - * Invalid serial number when acking a configure event - */ XDG_SURFACE_ERROR_INVALID_SERIAL = 4, - /** - * Width or height was zero or negative - */ XDG_SURFACE_ERROR_INVALID_SIZE = 5, - /** - * Surface was destroyed before its role object - */ XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT = 6, }; -#endif /* XDG_SURFACE_ERROR_ENUM */ +#endif -/** - * @ingroup iface_xdg_surface - * @struct xdg_surface_listener - */ struct xdg_surface_listener { - /** - * suggest a surface change - * - * The configure event marks the end of a configure sequence. A - * configure sequence is a set of one or more events configuring - * the state of the xdg_surface, including the final - * xdg_surface.configure event. - * - * Where applicable, xdg_surface surface roles will during a - * configure sequence extend this event as a latched state sent as - * events before the xdg_surface.configure event. Such events - * should be considered to make up a set of atomically applied - * configuration states, where the xdg_surface.configure commits - * the accumulated state. - * - * Clients should arrange their surface for the new states, and - * then send an ack_configure request with the serial sent in this - * configure event at some point before committing the new surface. - * - * If the client receives multiple configure events before it can - * respond to one, it is free to discard all but the last event it - * received. - * @param serial serial of the configure event - */ void (*configure)(void *data, struct xdg_surface *xdg_surface, uint32_t serial); }; -/** - * @ingroup iface_xdg_surface - */ static inline int xdg_surface_add_listener(struct xdg_surface *xdg_surface, const struct xdg_surface_listener *listener, void *data) @@ -1033,40 +364,20 @@ xdg_surface_add_listener(struct xdg_surface *xdg_surface, #define XDG_SURFACE_SET_WINDOW_GEOMETRY 3 #define XDG_SURFACE_ACK_CONFIGURE 4 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_GET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_GET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_ACK_CONFIGURE_SINCE_VERSION 1 -/** @ingroup iface_xdg_surface */ static inline void xdg_surface_set_user_data(struct xdg_surface *xdg_surface, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) xdg_surface, user_data); } -/** @ingroup iface_xdg_surface */ static inline void * xdg_surface_get_user_data(struct xdg_surface *xdg_surface) { @@ -1079,13 +390,6 @@ xdg_surface_get_version(struct xdg_surface *xdg_surface) return wl_proxy_get_version((struct wl_proxy *) xdg_surface); } -/** - * @ingroup iface_xdg_surface - * - * Destroy the xdg_surface object. An xdg_surface must only be destroyed - * after its role object has been destroyed, otherwise - * a defunct_role_object error is raised. - */ static inline void xdg_surface_destroy(struct xdg_surface *xdg_surface) { @@ -1093,15 +397,6 @@ xdg_surface_destroy(struct xdg_surface *xdg_surface) XDG_SURFACE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_surface), WL_MARSHAL_FLAG_DESTROY); } -/** - * @ingroup iface_xdg_surface - * - * This creates an xdg_toplevel object for the given xdg_surface and gives - * the associated wl_surface the xdg_toplevel role. - * - * See the documentation of xdg_toplevel for more details about what an - * xdg_toplevel is and how it is used. - */ static inline struct xdg_toplevel * xdg_surface_get_toplevel(struct xdg_surface *xdg_surface) { @@ -1113,18 +408,6 @@ xdg_surface_get_toplevel(struct xdg_surface *xdg_surface) return (struct xdg_toplevel *) id; } -/** - * @ingroup iface_xdg_surface - * - * This creates an xdg_popup object for the given xdg_surface and gives - * the associated wl_surface the xdg_popup role. - * - * If null is passed as a parent, a parent surface must be specified using - * some other protocol, before committing the initial state. - * - * See the documentation of xdg_popup for more details about what an - * xdg_popup is and how it is used. - */ static inline struct xdg_popup * xdg_surface_get_popup(struct xdg_surface *xdg_surface, struct xdg_surface *parent, struct xdg_positioner *positioner) { @@ -1136,39 +419,6 @@ xdg_surface_get_popup(struct xdg_surface *xdg_surface, struct xdg_surface *paren return (struct xdg_popup *) id; } -/** - * @ingroup iface_xdg_surface - * - * The window geometry of a surface is its "visible bounds" from the - * user's perspective. Client-side decorations often have invisible - * portions like drop-shadows which should be ignored for the - * purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at the - * time wl_surface.commit of the corresponding wl_surface is called. - * - * When maintaining a position, the compositor should treat the (x, y) - * coordinate of the window geometry as the top left corner of the window. - * A client changing the (x, y) window geometry coordinate should in - * general not alter the position of the window. - * - * Once the window geometry of the surface is set, it is not possible to - * unset it, and it will remain the same until set_window_geometry is - * called again, even if a new subsurface or buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset is meant for extremely simple clients. - * - * The arguments are given in the surface-local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. Setting an invalid size - * will raise an invalid_size error. When applied, the effective window - * geometry will be the set window geometry clamped to the bounding - * rectangle of the combined geometry of the surface of the xdg_surface and - * the associated subsurfaces. - */ static inline void xdg_surface_set_window_geometry(struct xdg_surface *xdg_surface, int32_t x, int32_t y, int32_t width, int32_t height) { @@ -1176,42 +426,6 @@ xdg_surface_set_window_geometry(struct xdg_surface *xdg_surface, int32_t x, int3 XDG_SURFACE_SET_WINDOW_GEOMETRY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_surface), 0, x, y, width, height); } -/** - * @ingroup iface_xdg_surface - * - * When a configure event is received, if a client commits the - * surface in response to the configure event, then the client - * must make an ack_configure request sometime before the commit - * request, passing along the serial of the configure event. - * - * For instance, for toplevel surfaces the compositor might use this - * information to move a surface to the top left only when the client has - * drawn itself for the maximized or fullscreen state. - * - * If the client receives multiple configure events before it - * can respond to one, it only has to ack the last configure event. - * Acking a configure event that was never sent raises an invalid_serial - * error. - * - * A client is not required to commit immediately after sending - * an ack_configure request - it may even ack_configure several times - * before its next surface commit. - * - * A client may send multiple ack_configure requests before committing, but - * only the last request sent before a commit indicates which configure - * event the client really is responding to. - * - * Sending an ack_configure request consumes the serial number sent with - * the request, as well as serial numbers sent by all configure events - * sent on this xdg_surface prior to the configure event referenced by - * the committed serial. - * - * It is an error to issue multiple ack_configure requests referencing a - * serial from the same configure event, or to issue an ack_configure - * request referencing a serial from a configure event issued before the - * event identified by the last ack_configure request for the same - * xdg_surface. Doing so will raise an invalid_serial error. - */ static inline void xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial) { @@ -1222,30 +436,14 @@ xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial) #ifndef XDG_TOPLEVEL_ERROR_ENUM #define XDG_TOPLEVEL_ERROR_ENUM enum xdg_toplevel_error { - /** - * provided value is not a valid variant of the resize_edge enum - */ XDG_TOPLEVEL_ERROR_INVALID_RESIZE_EDGE = 0, - /** - * invalid parent toplevel - */ XDG_TOPLEVEL_ERROR_INVALID_PARENT = 1, - /** - * client provided an invalid min or max size - */ XDG_TOPLEVEL_ERROR_INVALID_SIZE = 2, }; -#endif /* XDG_TOPLEVEL_ERROR_ENUM */ +#endif #ifndef XDG_TOPLEVEL_RESIZE_EDGE_ENUM #define XDG_TOPLEVEL_RESIZE_EDGE_ENUM -/** - * @ingroup iface_xdg_toplevel - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ enum xdg_toplevel_resize_edge { XDG_TOPLEVEL_RESIZE_EDGE_NONE = 0, XDG_TOPLEVEL_RESIZE_EDGE_TOP = 1, @@ -1257,246 +455,53 @@ enum xdg_toplevel_resize_edge { XDG_TOPLEVEL_RESIZE_EDGE_TOP_RIGHT = 9, XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_RIGHT = 10, }; -#endif /* XDG_TOPLEVEL_RESIZE_EDGE_ENUM */ +#endif #ifndef XDG_TOPLEVEL_STATE_ENUM #define XDG_TOPLEVEL_STATE_ENUM -/** - * @ingroup iface_xdg_toplevel - * types of state on the surface - * - * The different state values used on the surface. This is designed for - * state values like maximized, fullscreen. It is paired with the - * configure event to ensure that both the client and the compositor - * setting the state can be synchronized. - * - * States set in this way are double-buffered. They will get applied on - * the next commit. - */ enum xdg_toplevel_state { - /** - * the surface is maximized - * the surface is maximized - * - * The surface is maximized. The window geometry specified in the - * configure event must be obeyed by the client. - * - * The client should draw without shadow or other decoration - * outside of the window geometry. - */ XDG_TOPLEVEL_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - * the surface is fullscreen - * - * The surface is fullscreen. The window geometry specified in - * the configure event is a maximum; the client cannot resize - * beyond it. For a surface to cover the whole fullscreened area, - * the geometry dimensions must be obeyed by the client. For more - * details, see xdg_toplevel.set_fullscreen. - */ XDG_TOPLEVEL_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - * the surface is being resized - * - * The surface is being resized. The window geometry specified in - * the configure event is a maximum; the client cannot resize - * beyond it. Clients that have aspect ratio or cell sizing - * configuration can use a smaller size, however. - */ XDG_TOPLEVEL_STATE_RESIZING = 3, - /** - * the surface is now activated - * the surface is now activated - * - * Client window decorations should be painted as if the window - * is active. Do not assume this means that the window actually has - * keyboard or pointer focus. - */ XDG_TOPLEVEL_STATE_ACTIVATED = 4, - /** - * the surface’s left edge is tiled - * - * The window is currently in a tiled layout and the left edge is - * considered to be adjacent to another part of the tiling grid. - * @since 2 - */ XDG_TOPLEVEL_STATE_TILED_LEFT = 5, - /** - * the surface’s right edge is tiled - * - * The window is currently in a tiled layout and the right edge - * is considered to be adjacent to another part of the tiling grid. - * @since 2 - */ XDG_TOPLEVEL_STATE_TILED_RIGHT = 6, - /** - * the surface’s top edge is tiled - * - * The window is currently in a tiled layout and the top edge is - * considered to be adjacent to another part of the tiling grid. - * @since 2 - */ XDG_TOPLEVEL_STATE_TILED_TOP = 7, - /** - * the surface’s bottom edge is tiled - * - * The window is currently in a tiled layout and the bottom edge - * is considered to be adjacent to another part of the tiling grid. - * @since 2 - */ XDG_TOPLEVEL_STATE_TILED_BOTTOM = 8, }; -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_STATE_TILED_LEFT_SINCE_VERSION 2 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION 2 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_STATE_TILED_TOP_SINCE_VERSION 2 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_STATE_TILED_BOTTOM_SINCE_VERSION 2 -#endif /* XDG_TOPLEVEL_STATE_ENUM */ +#endif #ifndef XDG_TOPLEVEL_WM_CAPABILITIES_ENUM #define XDG_TOPLEVEL_WM_CAPABILITIES_ENUM enum xdg_toplevel_wm_capabilities { - /** - * show_window_menu is available - */ XDG_TOPLEVEL_WM_CAPABILITIES_WINDOW_MENU = 1, - /** - * set_maximized and unset_maximized are available - */ XDG_TOPLEVEL_WM_CAPABILITIES_MAXIMIZE = 2, - /** - * set_fullscreen and unset_fullscreen are available - */ XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN = 3, - /** - * set_minimized is available - */ XDG_TOPLEVEL_WM_CAPABILITIES_MINIMIZE = 4, }; -#endif /* XDG_TOPLEVEL_WM_CAPABILITIES_ENUM */ +#endif -/** - * @ingroup iface_xdg_toplevel - * @struct xdg_toplevel_listener - */ struct xdg_toplevel_listener { - /** - * suggest a surface change - * - * This configure event asks the client to resize its toplevel - * surface or to change its state. The configured state should not - * be applied immediately. See xdg_surface.configure for details. - * - * The width and height arguments specify a hint to the window - * about how its surface should be resized in window geometry - * coordinates. See set_window_geometry. - * - * If the width or height arguments are zero, it means the client - * should decide its own window dimension. This may happen when the - * compositor needs to configure the state of the surface but - * doesn't have any information about any previous or expected - * dimension. - * - * The states listed in the event specify how the width/height - * arguments should be interpreted, and possibly how it should be - * drawn. - * - * Clients must send an ack_configure in response to this event. - * See xdg_surface.configure and xdg_surface.ack_configure for - * details. - */ void (*configure)(void *data, struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height, struct wl_array *states); - /** - * surface wants to be closed - * - * The close event is sent by the compositor when the user wants - * the surface to be closed. This should be equivalent to the user - * clicking the close button in client-side decorations, if your - * application has any. - * - * This is only a request that the user intends to close the - * window. The client may choose to ignore this request, or show a - * dialog to ask the user to save their data, etc. - */ void (*close)(void *data, struct xdg_toplevel *xdg_toplevel); - /** - * recommended window geometry bounds - * - * The configure_bounds event may be sent prior to a - * xdg_toplevel.configure event to communicate the bounds a window - * geometry size is recommended to constrain to. - * - * The passed width and height are in surface coordinate space. If - * width and height are 0, it means bounds is unknown and - * equivalent to as if no configure_bounds event was ever sent for - * this surface. - * - * The bounds can for example correspond to the size of a monitor - * excluding any panels or other shell components, so that a - * surface isn't created in a way that it cannot fit. - * - * The bounds may change at any point, and in such a case, a new - * xdg_toplevel.configure_bounds will be sent, followed by - * xdg_toplevel.configure and xdg_surface.configure. - * @since 4 - */ void (*configure_bounds)(void *data, struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height); - /** - * compositor capabilities - * - * This event advertises the capabilities supported by the - * compositor. If a capability isn't supported, clients should hide - * or disable the UI elements that expose this functionality. For - * instance, if the compositor doesn't advertise support for - * minimized toplevels, a button triggering the set_minimized - * request should not be displayed. - * - * The compositor will ignore requests it doesn't support. For - * instance, a compositor which doesn't advertise support for - * minimized will ignore set_minimized requests. - * - * Compositors must send this event once before the first - * xdg_surface.configure event. When the capabilities change, - * compositors must send this event again and then send an - * xdg_surface.configure event. - * - * The configured state should not be applied immediately. See - * xdg_surface.configure for details. - * - * The capabilities are sent as an array of 32-bit unsigned - * integers in native endianness. - * @param capabilities array of 32-bit capabilities - * @since 5 - */ void (*wm_capabilities)(void *data, struct xdg_toplevel *xdg_toplevel, struct wl_array *capabilities); }; -/** - * @ingroup iface_xdg_toplevel - */ static inline int xdg_toplevel_add_listener(struct xdg_toplevel *xdg_toplevel, const struct xdg_toplevel_listener *listener, void *data) @@ -1520,88 +525,32 @@ xdg_toplevel_add_listener(struct xdg_toplevel *xdg_toplevel, #define XDG_TOPLEVEL_UNSET_FULLSCREEN 12 #define XDG_TOPLEVEL_SET_MINIMIZED 13 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_CLOSE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION 4 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION 5 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_MAX_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_MIN_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_MINIMIZED_SINCE_VERSION 1 -/** @ingroup iface_xdg_toplevel */ static inline void xdg_toplevel_set_user_data(struct xdg_toplevel *xdg_toplevel, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel, user_data); } -/** @ingroup iface_xdg_toplevel */ static inline void * xdg_toplevel_get_user_data(struct xdg_toplevel *xdg_toplevel) { @@ -1614,12 +563,6 @@ xdg_toplevel_get_version(struct xdg_toplevel *xdg_toplevel) return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel); } -/** - * @ingroup iface_xdg_toplevel - * - * This request destroys the role surface and unmaps the surface; - * see "Unmapping" behavior in interface section for details. - */ static inline void xdg_toplevel_destroy(struct xdg_toplevel *xdg_toplevel) { @@ -1627,30 +570,6 @@ xdg_toplevel_destroy(struct xdg_toplevel *xdg_toplevel) XDG_TOPLEVEL_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), WL_MARSHAL_FLAG_DESTROY); } -/** - * @ingroup iface_xdg_toplevel - * - * Set the "parent" of this surface. This surface should be stacked - * above the parent surface and all other ancestor surfaces. - * - * Parent surfaces should be set on dialogs, toolboxes, or other - * "auxiliary" surfaces, so that the parent is raised when the dialog - * is raised. - * - * Setting a null parent for a child surface unsets its parent. Setting - * a null parent for a surface which currently has no parent is a no-op. - * - * Only mapped surfaces can have child surfaces. Setting a parent which - * is not mapped is equivalent to setting a null parent. If a surface - * becomes unmapped, its children's parent is set to the parent of - * the now-unmapped surface. If the now-unmapped surface has no parent, - * its children's parent is unset. If the now-unmapped surface becomes - * mapped again, its parent-child relationship is not restored. - * - * The parent toplevel must not be one of the child toplevel's - * descendants, and the parent must be different from the child toplevel, - * otherwise the invalid_parent protocol error is raised. - */ static inline void xdg_toplevel_set_parent(struct xdg_toplevel *xdg_toplevel, struct xdg_toplevel *parent) { @@ -1658,17 +577,6 @@ xdg_toplevel_set_parent(struct xdg_toplevel *xdg_toplevel, struct xdg_toplevel * XDG_TOPLEVEL_SET_PARENT, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, parent); } -/** - * @ingroup iface_xdg_toplevel - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ static inline void xdg_toplevel_set_title(struct xdg_toplevel *xdg_toplevel, const char *title) { @@ -1676,33 +584,6 @@ xdg_toplevel_set_title(struct xdg_toplevel *xdg_toplevel, const char *title) XDG_TOPLEVEL_SET_TITLE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, title); } -/** - * @ingroup iface_xdg_toplevel - * - * Set an application identifier for the surface. - * - * The app ID identifies the general class of applications to which - * the surface belongs. The compositor can use this to group multiple - * surfaces together, or to determine how to launch a new application. - * - * For D-Bus activatable applications, the app ID is used as the D-Bus - * service name. - * - * The compositor shell will try to group application surfaces together - * by their app ID. As a best practice, it is suggested to select app - * ID's that match the basename of the application's .desktop file. - * For example, "org.freedesktop.FooViewer" where the .desktop file is - * "org.freedesktop.FooViewer.desktop". - * - * Like other properties, a set_app_id request can be sent after the - * xdg_toplevel has been mapped to update the property. - * - * See the desktop-entry specification [0] for more details on - * application identifiers and how they relate to well-known D-Bus - * names and .desktop files. - * - * [0] https://standards.freedesktop.org/desktop-entry-spec/ - */ static inline void xdg_toplevel_set_app_id(struct xdg_toplevel *xdg_toplevel, const char *app_id) { @@ -1710,22 +591,6 @@ xdg_toplevel_set_app_id(struct xdg_toplevel *xdg_toplevel, const char *app_id) XDG_TOPLEVEL_SET_APP_ID, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, app_id); } -/** - * @ingroup iface_xdg_toplevel - * - * Clients implementing client-side decorations might want to show - * a context menu when right-clicking on the decorations, giving the - * user a menu that they can use to maximize or minimize the window. - * - * This request asks the compositor to pop up such a window menu at - * the given position, relative to the local surface coordinates of - * the parent surface. There are no guarantees as to what menu items - * the window menu contains, or even if a window menu will be drawn - * at all. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. - */ static inline void xdg_toplevel_show_window_menu(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y) { @@ -1733,26 +598,6 @@ xdg_toplevel_show_window_menu(struct xdg_toplevel *xdg_toplevel, struct wl_seat XDG_TOPLEVEL_SHOW_WINDOW_MENU, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, seat, serial, x, y); } -/** - * @ingroup iface_xdg_toplevel - * - * Start an interactive, user-driven move of the surface. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. The passed - * serial is used to determine the type of interactive move (touch, - * pointer, etc). - * - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized), or if the passed serial - * is no longer valid. - * - * If triggered, the surface will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the move. It is up to the - * compositor to visually indicate that the move is taking place, such as - * updating a pointer cursor, during the move. There is no guarantee - * that the device focus will return when the move is completed. - */ static inline void xdg_toplevel_move(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial) { @@ -1760,41 +605,6 @@ xdg_toplevel_move(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint3 XDG_TOPLEVEL_MOVE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, seat, serial); } -/** - * @ingroup iface_xdg_toplevel - * - * Start a user-driven, interactive resize of the surface. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. The passed - * serial is used to determine the type of interactive resize (touch, - * pointer, etc). - * - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * - * If triggered, the client will receive configure events with the - * "resize" state enum value and the expected sizes. See the "resize" - * enum value for more details about what is required. The client - * must also acknowledge configure events using "ack_configure". After - * the resize is completed, the client will receive another "configure" - * event without the resize state. - * - * If triggered, the surface also will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the resize. It is up to the - * compositor to visually indicate that the resize is taking place, - * such as updating a pointer cursor, during the resize. There is no - * guarantee that the device focus will return when the resize is - * completed. - * - * The edges parameter specifies how the surface should be resized, and - * is one of the values of the resize_edge enum. Values not matching - * a variant of the enum will cause a protocol error. The compositor - * may use this information to update the surface position for example - * when dragging the top left corner. The compositor may also use - * this information to adapt its behavior, e.g. choose an appropriate - * cursor image. - */ static inline void xdg_toplevel_resize(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial, uint32_t edges) { @@ -1802,44 +612,6 @@ xdg_toplevel_resize(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uin XDG_TOPLEVEL_RESIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, seat, serial, edges); } -/** - * @ingroup iface_xdg_toplevel - * - * Set a maximum size for the window. - * - * The client can specify a maximum size so that the compositor does - * not try to configure the window beyond this size. - * - * The width and height arguments are in window geometry coordinates. - * See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get applied - * on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the maximum - * size. The compositor may decide to ignore the values set by the - * client and request a larger size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected maximum size in the given dimension. - * As a result, a client wishing to reset the maximum size - * to an unspecified state can use zero for width and height in the - * request. - * - * Requesting a maximum size to be smaller than the minimum size of - * a surface is illegal and will result in an invalid_size error. - * - * The width and height must be greater than or equal to zero. Using - * strictly negative values for width or height will result in a - * invalid_size error. - */ static inline void xdg_toplevel_set_max_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height) { @@ -1847,44 +619,6 @@ xdg_toplevel_set_max_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int3 XDG_TOPLEVEL_SET_MAX_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, width, height); } -/** - * @ingroup iface_xdg_toplevel - * - * Set a minimum size for the window. - * - * The client can specify a minimum size so that the compositor does - * not try to configure the window below this size. - * - * The width and height arguments are in window geometry coordinates. - * See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get applied - * on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the minimum - * size. The compositor may decide to ignore the values set by the - * client and request a smaller size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected minimum size in the given dimension. - * As a result, a client wishing to reset the minimum size - * to an unspecified state can use zero for width and height in the - * request. - * - * Requesting a minimum size to be larger than the maximum size of - * a surface is illegal and will result in an invalid_size error. - * - * The width and height must be greater than or equal to zero. Using - * strictly negative values for width and height will result in a - * invalid_size error. - */ static inline void xdg_toplevel_set_min_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height) { @@ -1892,29 +626,6 @@ xdg_toplevel_set_min_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int3 XDG_TOPLEVEL_SET_MIN_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, width, height); } -/** - * @ingroup iface_xdg_toplevel - * - * Maximize the surface. - * - * After requesting that the surface should be maximized, the compositor - * will respond by emitting a configure event. Whether this configure - * actually sets the window maximized is subject to compositor policies. - * The client must then update its content, drawing in the configured - * state. The client must also acknowledge the configure when committing - * the new content (see ack_configure). - * - * It is up to the compositor to decide how and where to maximize the - * surface, for example which output and what region of the screen should - * be used. - * - * If the surface was already maximized, the compositor will still emit - * a configure event with the "maximized" state. - * - * If the surface is in a fullscreen state, this request has no direct - * effect. It may alter the state the surface is returned to when - * unmaximized unless overridden by the compositor. - */ static inline void xdg_toplevel_set_maximized(struct xdg_toplevel *xdg_toplevel) { @@ -1922,31 +633,6 @@ xdg_toplevel_set_maximized(struct xdg_toplevel *xdg_toplevel) XDG_TOPLEVEL_SET_MAXIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0); } -/** - * @ingroup iface_xdg_toplevel - * - * Unmaximize the surface. - * - * After requesting that the surface should be unmaximized, the compositor - * will respond by emitting a configure event. Whether this actually - * un-maximizes the window is subject to compositor policies. - * If available and applicable, the compositor will include the window - * geometry dimensions the window had prior to being maximized in the - * configure event. The client must then update its content, drawing it in - * the configured state. The client must also acknowledge the configure - * when committing the new content (see ack_configure). - * - * It is up to the compositor to position the surface after it was - * unmaximized; usually the position the surface had before maximizing, if - * applicable. - * - * If the surface was already not maximized, the compositor will still - * emit a configure event without the "maximized" state. - * - * If the surface is in a fullscreen state, this request has no direct - * effect. It may alter the state the surface is returned to when - * unmaximized unless overridden by the compositor. - */ static inline void xdg_toplevel_unset_maximized(struct xdg_toplevel *xdg_toplevel) { @@ -1954,33 +640,6 @@ xdg_toplevel_unset_maximized(struct xdg_toplevel *xdg_toplevel) XDG_TOPLEVEL_UNSET_MAXIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0); } -/** - * @ingroup iface_xdg_toplevel - * - * Make the surface fullscreen. - * - * After requesting that the surface should be fullscreened, the - * compositor will respond by emitting a configure event. Whether the - * client is actually put into a fullscreen state is subject to compositor - * policies. The client must also acknowledge the configure when - * committing the new content (see ack_configure). - * - * The output passed by the request indicates the client's preference as - * to which display it should be set fullscreen on. If this value is NULL, - * it's up to the compositor to choose which display will be used to map - * this surface. - * - * If the surface doesn't cover the whole output, the compositor will - * position the surface in the center of the output and compensate with - * with border fill covering the rest of the output. The content of the - * border fill is undefined, but should be assumed to be in some way that - * attempts to blend into the surrounding area (e.g. solid black). - * - * If the fullscreened surface is not opaque, the compositor must make - * sure that other screen content not part of the same surface tree (made - * up of subsurfaces, popups or similarly coupled surfaces) are not - * visible below the fullscreened surface. - */ static inline void xdg_toplevel_set_fullscreen(struct xdg_toplevel *xdg_toplevel, struct wl_output *output) { @@ -1988,27 +647,6 @@ xdg_toplevel_set_fullscreen(struct xdg_toplevel *xdg_toplevel, struct wl_output XDG_TOPLEVEL_SET_FULLSCREEN, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, output); } -/** - * @ingroup iface_xdg_toplevel - * - * Make the surface no longer fullscreen. - * - * After requesting that the surface should be unfullscreened, the - * compositor will respond by emitting a configure event. - * Whether this actually removes the fullscreen state of the client is - * subject to compositor policies. - * - * Making a surface unfullscreen sets states for the surface based on the following: - * * the state(s) it may have had before becoming fullscreen - * * any state(s) decided by the compositor - * * any state(s) requested by the client while the surface was fullscreen - * - * The compositor may include the previous window geometry dimensions in - * the configure event, if applicable. - * - * The client must also acknowledge the configure when committing the new - * content (see ack_configure). - */ static inline void xdg_toplevel_unset_fullscreen(struct xdg_toplevel *xdg_toplevel) { @@ -2016,18 +654,6 @@ xdg_toplevel_unset_fullscreen(struct xdg_toplevel *xdg_toplevel) XDG_TOPLEVEL_UNSET_FULLSCREEN, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0); } -/** - * @ingroup iface_xdg_toplevel - * - * Request that the compositor minimize your surface. There is no - * way to know if the surface is currently minimized, nor is there - * any way to unset minimization on this surface. - * - * If you are looking to throttle redrawing when minimized, please - * instead use the wl_surface.frame event for this, as this will - * also work with live previews on windows in Alt-Tab, Expose or - * similar compositor features. - */ static inline void xdg_toplevel_set_minimized(struct xdg_toplevel *xdg_toplevel) { @@ -2038,85 +664,24 @@ xdg_toplevel_set_minimized(struct xdg_toplevel *xdg_toplevel) #ifndef XDG_POPUP_ERROR_ENUM #define XDG_POPUP_ERROR_ENUM enum xdg_popup_error { - /** - * tried to grab after being mapped - */ XDG_POPUP_ERROR_INVALID_GRAB = 0, }; -#endif /* XDG_POPUP_ERROR_ENUM */ +#endif -/** - * @ingroup iface_xdg_popup - * @struct xdg_popup_listener - */ struct xdg_popup_listener { - /** - * configure the popup surface - * - * This event asks the popup surface to configure itself given - * the configuration. The configured state should not be applied - * immediately. See xdg_surface.configure for details. - * - * The x and y arguments represent the position the popup was - * placed at given the xdg_positioner rule, relative to the upper - * left corner of the window geometry of the parent surface. - * - * For version 2 or older, the configure event for an xdg_popup is - * only ever sent once for the initial configuration. Starting with - * version 3, it may be sent again if the popup is setup with an - * xdg_positioner with set_reactive requested, or in response to - * xdg_popup.reposition requests. - * @param x x position relative to parent surface window geometry - * @param y y position relative to parent surface window geometry - * @param width window geometry width - * @param height window geometry height - */ void (*configure)(void *data, struct xdg_popup *xdg_popup, int32_t x, int32_t y, int32_t width, int32_t height); - /** - * popup interaction is done - * - * The popup_done event is sent out when a popup is dismissed by - * the compositor. The client should destroy the xdg_popup object - * at this point. - */ void (*popup_done)(void *data, struct xdg_popup *xdg_popup); - /** - * signal the completion of a repositioned request - * - * The repositioned event is sent as part of a popup - * configuration sequence, together with xdg_popup.configure and - * lastly xdg_surface.configure to notify the completion of a - * reposition request. - * - * The repositioned event is to notify about the completion of a - * xdg_popup.reposition request. The token argument is the token - * passed in the xdg_popup.reposition request. - * - * Immediately after this event is emitted, xdg_popup.configure and - * xdg_surface.configure will be sent with the updated size and - * position, as well as a new configure serial. - * - * The client should optionally update the content of the popup, - * but must acknowledge the new popup configuration for the new - * position to take effect. See xdg_surface.ack_configure for - * details. - * @param token reposition request token - * @since 3 - */ void (*repositioned)(void *data, struct xdg_popup *xdg_popup, uint32_t token); }; -/** - * @ingroup iface_xdg_popup - */ static inline int xdg_popup_add_listener(struct xdg_popup *xdg_popup, const struct xdg_popup_listener *listener, void *data) @@ -2129,40 +694,20 @@ xdg_popup_add_listener(struct xdg_popup *xdg_popup, #define XDG_POPUP_GRAB 1 #define XDG_POPUP_REPOSITION 2 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_REPOSITIONED_SINCE_VERSION 3 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_GRAB_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_REPOSITION_SINCE_VERSION 3 -/** @ingroup iface_xdg_popup */ static inline void xdg_popup_set_user_data(struct xdg_popup *xdg_popup, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) xdg_popup, user_data); } -/** @ingroup iface_xdg_popup */ static inline void * xdg_popup_get_user_data(struct xdg_popup *xdg_popup) { @@ -2175,15 +720,6 @@ xdg_popup_get_version(struct xdg_popup *xdg_popup) return wl_proxy_get_version((struct wl_proxy *) xdg_popup); } -/** - * @ingroup iface_xdg_popup - * - * This destroys the popup. Explicitly destroying the xdg_popup - * object will also dismiss the popup, and unmap the surface. - * - * If this xdg_popup is not the "topmost" popup, a protocol error - * will be sent. - */ static inline void xdg_popup_destroy(struct xdg_popup *xdg_popup) { @@ -2191,47 +727,6 @@ xdg_popup_destroy(struct xdg_popup *xdg_popup) XDG_POPUP_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_popup), WL_MARSHAL_FLAG_DESTROY); } -/** - * @ingroup iface_xdg_popup - * - * This request makes the created popup take an explicit grab. An explicit - * grab will be dismissed when the user dismisses the popup, or when the - * client destroys the xdg_popup. This can be done by the user clicking - * outside the surface, using the keyboard, or even locking the screen - * through closing the lid or a timeout. - * - * If the compositor denies the grab, the popup will be immediately - * dismissed. - * - * This request must be used in response to some sort of user action like a - * button press, key press, or touch down event. The serial number of the - * event should be passed as 'serial'. - * - * The parent of a grabbing popup must either be an xdg_toplevel surface or - * another xdg_popup with an explicit grab. If the parent is another - * xdg_popup it means that the popups are nested, with this popup now being - * the topmost popup. - * - * Nested popups must be destroyed in the reverse order they were created - * in, e.g. the only popup you are allowed to destroy at all times is the - * topmost one. - * - * When compositors choose to dismiss a popup, they may dismiss every - * nested grabbing popup as well. When a compositor dismisses popups, it - * will follow the same dismissing order as required from the client. - * - * If the topmost grabbing popup is destroyed, the grab will be returned to - * the parent of the popup, if that parent previously had an explicit grab. - * - * If the parent is a grabbing popup which has already been dismissed, this - * popup will be immediately dismissed. If the parent is a popup that did - * not take an explicit grab, an error will be raised. - * - * During a popup grab, the client owning the grab will receive pointer - * and touch events for all their surfaces as normal (similar to an - * "owner-events" grab in X11 parlance), while the top most grabbing popup - * will always have keyboard focus. - */ static inline void xdg_popup_grab(struct xdg_popup *xdg_popup, struct wl_seat *seat, uint32_t serial) { @@ -2239,33 +734,6 @@ xdg_popup_grab(struct xdg_popup *xdg_popup, struct wl_seat *seat, uint32_t seria XDG_POPUP_GRAB, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_popup), 0, seat, serial); } -/** - * @ingroup iface_xdg_popup - * - * Reposition an already-mapped popup. The popup will be placed given the - * details in the passed xdg_positioner object, and a - * xdg_popup.repositioned followed by xdg_popup.configure and - * xdg_surface.configure will be emitted in response. Any parameters set - * by the previous positioner will be discarded. - * - * The passed token will be sent in the corresponding - * xdg_popup.repositioned event. The new popup position will not take - * effect until the corresponding configure event is acknowledged by the - * client. See xdg_popup.repositioned for details. The token itself is - * opaque, and has no other special meaning. - * - * If multiple reposition requests are sent, the compositor may skip all - * but the last one. - * - * If the popup is repositioned in response to a configure event for its - * parent, the client should send an xdg_positioner.set_parent_configure - * and possibly an xdg_positioner.set_parent_size request to allow the - * compositor to properly constrain the popup. - * - * If the popup is repositioned together with a parent that is being - * resized, but not in response to a configure event, the client should - * send an xdg_positioner.set_parent_size request. - */ static inline void xdg_popup_reposition(struct xdg_popup *xdg_popup, struct xdg_positioner *positioner, uint32_t token) { diff --git a/app/src/main/cpp/waylandcomp/generated/xdg-shell-protocol.c b/app/src/main/cpp/waylandcomp/generated/xdg-shell-protocol.c index 72b394a2b5..d6a52b5de7 100644 --- a/app/src/main/cpp/waylandcomp/generated/xdg-shell-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/xdg-shell-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright © 2008-2013 Kristian Høgsberg * Copyright © 2013 Rafael Antognolli @@ -34,7 +32,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/xdg-shell-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/xdg-shell-server-protocol.h index 2683694cee..825c971b26 100644 --- a/app/src/main/cpp/waylandcomp/generated/xdg-shell-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/xdg-shell-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef XDG_SHELL_SERVER_PROTOCOL_H #define XDG_SHELL_SERVER_PROTOCOL_H @@ -14,16 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_xdg_shell The xdg_shell protocol - * @section page_ifaces_xdg_shell Interfaces - * - @subpage page_iface_xdg_wm_base - create desktop-style surfaces - * - @subpage page_iface_xdg_positioner - child surface positioner - * - @subpage page_iface_xdg_surface - desktop user interface surface base interface - * - @subpage page_iface_xdg_toplevel - toplevel surface - * - @subpage page_iface_xdg_popup - short-lived, popup surfaces for menus +/* * @section page_copyright_xdg_shell Copyright - *
  *
  * Copyright © 2008-2013 Kristian Høgsberg
  * Copyright © 2013      Rafael Antognolli
@@ -50,8 +41,16 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + + + + struct wl_output; struct wl_seat; struct wl_surface; @@ -63,343 +62,40 @@ struct xdg_wm_base; #ifndef XDG_WM_BASE_INTERFACE #define XDG_WM_BASE_INTERFACE -/** - * @page page_iface_xdg_wm_base xdg_wm_base - * @section page_iface_xdg_wm_base_desc Description - * - * The xdg_wm_base interface is exposed as a global object enabling clients - * to turn their wl_surfaces into windows in a desktop environment. It - * defines the basic functionality needed for clients and the compositor to - * create windows that can be dragged, resized, maximized, etc, as well as - * creating transient windows such as popup menus. - * @section page_iface_xdg_wm_base_api API - * See @ref iface_xdg_wm_base. - */ -/** - * @defgroup iface_xdg_wm_base The xdg_wm_base interface - * - * The xdg_wm_base interface is exposed as a global object enabling clients - * to turn their wl_surfaces into windows in a desktop environment. It - * defines the basic functionality needed for clients and the compositor to - * create windows that can be dragged, resized, maximized, etc, as well as - * creating transient windows such as popup menus. - */ extern const struct wl_interface xdg_wm_base_interface; #endif #ifndef XDG_POSITIONER_INTERFACE #define XDG_POSITIONER_INTERFACE -/** - * @page page_iface_xdg_positioner xdg_positioner - * @section page_iface_xdg_positioner_desc Description - * - * The xdg_positioner provides a collection of rules for the placement of a - * child surface relative to a parent surface. Rules can be defined to ensure - * the child surface remains within the visible area's borders, and to - * specify how the child surface changes its position, such as sliding along - * an axis, or flipping around a rectangle. These positioner-created rules are - * constrained by the requirement that a child surface must intersect with or - * be at least partially adjacent to its parent surface. - * - * See the various requests for details about possible rules. - * - * At the time of the request, the compositor makes a copy of the rules - * specified by the xdg_positioner. Thus, after the request is complete the - * xdg_positioner object can be destroyed or reused; further changes to the - * object will have no effect on previous usages. - * - * For an xdg_positioner object to be considered complete, it must have a - * non-zero size set by set_size, and a non-zero anchor rectangle set by - * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an invalid_positioner error. - * @section page_iface_xdg_positioner_api API - * See @ref iface_xdg_positioner. - */ -/** - * @defgroup iface_xdg_positioner The xdg_positioner interface - * - * The xdg_positioner provides a collection of rules for the placement of a - * child surface relative to a parent surface. Rules can be defined to ensure - * the child surface remains within the visible area's borders, and to - * specify how the child surface changes its position, such as sliding along - * an axis, or flipping around a rectangle. These positioner-created rules are - * constrained by the requirement that a child surface must intersect with or - * be at least partially adjacent to its parent surface. - * - * See the various requests for details about possible rules. - * - * At the time of the request, the compositor makes a copy of the rules - * specified by the xdg_positioner. Thus, after the request is complete the - * xdg_positioner object can be destroyed or reused; further changes to the - * object will have no effect on previous usages. - * - * For an xdg_positioner object to be considered complete, it must have a - * non-zero size set by set_size, and a non-zero anchor rectangle set by - * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an invalid_positioner error. - */ extern const struct wl_interface xdg_positioner_interface; #endif #ifndef XDG_SURFACE_INTERFACE #define XDG_SURFACE_INTERFACE -/** - * @page page_iface_xdg_surface xdg_surface - * @section page_iface_xdg_surface_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides a base set of functionality required to construct user - * interface elements requiring management by the compositor, such as - * toplevel windows, menus, etc. The types of functionality are split into - * xdg_surface roles. - * - * Creating an xdg_surface does not set the role for a wl_surface. In order - * to map an xdg_surface, the client must create a role-specific object - * using, e.g., get_toplevel, get_popup. The wl_surface for any given - * xdg_surface can have at most one role, and may not be assigned any role - * not based on xdg_surface. - * - * A role must be assigned before any other requests are made to the - * xdg_surface object. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. - * - * Creating an xdg_surface from a wl_surface which has a buffer attached or - * committed is a client error, and any attempts by a client to attach or - * manipulate a buffer prior to the first xdg_surface.configure call must - * also be treated as errors. - * - * After creating a role-specific object and setting it up, the client must - * perform an initial commit without any buffer attached. The compositor - * will reply with an xdg_surface.configure event. The client must - * acknowledge it and is then allowed to attach a buffer to map the surface. - * - * Mapping an xdg_surface-based role surface is defined as making it - * possible for the surface to be shown by the compositor. Note that - * a mapped surface is not guaranteed to be visible once it is mapped. - * - * For an xdg_surface to be mapped by the compositor, the following - * conditions must be met: - * (1) the client has assigned an xdg_surface-based role to the surface - * (2) the client has set and committed the xdg_surface state and the - * role-dependent state to the surface - * (3) the client has committed a buffer to the surface - * - * A newly-unmapped surface is considered to have met condition (1) out - * of the 3 required conditions for mapping a surface if its role surface - * has not been destroyed, i.e. the client must perform the initial commit - * again before attaching a buffer. - * @section page_iface_xdg_surface_api API - * See @ref iface_xdg_surface. - */ -/** - * @defgroup iface_xdg_surface The xdg_surface interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides a base set of functionality required to construct user - * interface elements requiring management by the compositor, such as - * toplevel windows, menus, etc. The types of functionality are split into - * xdg_surface roles. - * - * Creating an xdg_surface does not set the role for a wl_surface. In order - * to map an xdg_surface, the client must create a role-specific object - * using, e.g., get_toplevel, get_popup. The wl_surface for any given - * xdg_surface can have at most one role, and may not be assigned any role - * not based on xdg_surface. - * - * A role must be assigned before any other requests are made to the - * xdg_surface object. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. - * - * Creating an xdg_surface from a wl_surface which has a buffer attached or - * committed is a client error, and any attempts by a client to attach or - * manipulate a buffer prior to the first xdg_surface.configure call must - * also be treated as errors. - * - * After creating a role-specific object and setting it up, the client must - * perform an initial commit without any buffer attached. The compositor - * will reply with an xdg_surface.configure event. The client must - * acknowledge it and is then allowed to attach a buffer to map the surface. - * - * Mapping an xdg_surface-based role surface is defined as making it - * possible for the surface to be shown by the compositor. Note that - * a mapped surface is not guaranteed to be visible once it is mapped. - * - * For an xdg_surface to be mapped by the compositor, the following - * conditions must be met: - * (1) the client has assigned an xdg_surface-based role to the surface - * (2) the client has set and committed the xdg_surface state and the - * role-dependent state to the surface - * (3) the client has committed a buffer to the surface - * - * A newly-unmapped surface is considered to have met condition (1) out - * of the 3 required conditions for mapping a surface if its role surface - * has not been destroyed, i.e. the client must perform the initial commit - * again before attaching a buffer. - */ extern const struct wl_interface xdg_surface_interface; #endif #ifndef XDG_TOPLEVEL_INTERFACE #define XDG_TOPLEVEL_INTERFACE -/** - * @page page_iface_xdg_toplevel xdg_toplevel - * @section page_iface_xdg_toplevel_desc Description - * - * This interface defines an xdg_surface role which allows a surface to, - * among other things, set window-like properties such as maximize, - * fullscreen, and minimize, set application-specific metadata like title and - * id, and well as trigger user interactive operations such as interactive - * resize and move. - * - * Unmapping an xdg_toplevel means that the surface cannot be shown - * by the compositor until it is explicitly mapped again. - * All active operations (e.g., move, resize) are canceled and all - * attributes (e.g. title, state, stacking, ...) are discarded for - * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to - * the state it had right after xdg_surface.get_toplevel. The client - * can re-map the toplevel by performing a commit without any buffer - * attached, waiting for a configure event and handling it as usual (see - * xdg_surface description). - * - * Attaching a null buffer to a toplevel unmaps the surface. - * @section page_iface_xdg_toplevel_api API - * See @ref iface_xdg_toplevel. - */ -/** - * @defgroup iface_xdg_toplevel The xdg_toplevel interface - * - * This interface defines an xdg_surface role which allows a surface to, - * among other things, set window-like properties such as maximize, - * fullscreen, and minimize, set application-specific metadata like title and - * id, and well as trigger user interactive operations such as interactive - * resize and move. - * - * Unmapping an xdg_toplevel means that the surface cannot be shown - * by the compositor until it is explicitly mapped again. - * All active operations (e.g., move, resize) are canceled and all - * attributes (e.g. title, state, stacking, ...) are discarded for - * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to - * the state it had right after xdg_surface.get_toplevel. The client - * can re-map the toplevel by performing a commit without any buffer - * attached, waiting for a configure event and handling it as usual (see - * xdg_surface description). - * - * Attaching a null buffer to a toplevel unmaps the surface. - */ extern const struct wl_interface xdg_toplevel_interface; #endif #ifndef XDG_POPUP_INTERFACE #define XDG_POPUP_INTERFACE -/** - * @page page_iface_xdg_popup xdg_popup - * @section page_iface_xdg_popup_desc Description - * - * A popup surface is a short-lived, temporary surface. It can be used to - * implement for example menus, popovers, tooltips and other similar user - * interface concepts. - * - * A popup can be made to take an explicit grab. See xdg_popup.grab for - * details. - * - * When the popup is dismissed, a popup_done event will be sent out, and at - * the same time the surface will be unmapped. See the xdg_popup.popup_done - * event for details. - * - * Explicitly destroying the xdg_popup object will also dismiss the popup and - * unmap the surface. Clients that want to dismiss the popup when another - * surface of their own is clicked should dismiss the popup using the destroy - * request. - * - * A newly created xdg_popup will be stacked on top of all previously created - * xdg_popup surfaces associated with the same xdg_toplevel. - * - * The parent of an xdg_popup must be mapped (see the xdg_surface - * description) before the xdg_popup itself. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - * @section page_iface_xdg_popup_api API - * See @ref iface_xdg_popup. - */ -/** - * @defgroup iface_xdg_popup The xdg_popup interface - * - * A popup surface is a short-lived, temporary surface. It can be used to - * implement for example menus, popovers, tooltips and other similar user - * interface concepts. - * - * A popup can be made to take an explicit grab. See xdg_popup.grab for - * details. - * - * When the popup is dismissed, a popup_done event will be sent out, and at - * the same time the surface will be unmapped. See the xdg_popup.popup_done - * event for details. - * - * Explicitly destroying the xdg_popup object will also dismiss the popup and - * unmap the surface. Clients that want to dismiss the popup when another - * surface of their own is clicked should dismiss the popup using the destroy - * request. - * - * A newly created xdg_popup will be stacked on top of all previously created - * xdg_popup surfaces associated with the same xdg_toplevel. - * - * The parent of an xdg_popup must be mapped (see the xdg_surface - * description) before the xdg_popup itself. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - */ extern const struct wl_interface xdg_popup_interface; #endif #ifndef XDG_WM_BASE_ERROR_ENUM #define XDG_WM_BASE_ERROR_ENUM enum xdg_wm_base_error { - /** - * given wl_surface has another role - */ XDG_WM_BASE_ERROR_ROLE = 0, - /** - * xdg_wm_base was destroyed before children - */ XDG_WM_BASE_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ XDG_WM_BASE_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ XDG_WM_BASE_ERROR_INVALID_POPUP_PARENT = 3, - /** - * the client provided an invalid surface state - */ XDG_WM_BASE_ERROR_INVALID_SURFACE_STATE = 4, - /** - * the client provided an invalid positioner - */ XDG_WM_BASE_ERROR_INVALID_POSITIONER = 5, - /** - * the client didn’t respond to a ping event in time - */ XDG_WM_BASE_ERROR_UNRESPONSIVE = 6, }; -#endif /* XDG_WM_BASE_ERROR_ENUM */ +#endif #ifndef XDG_WM_BASE_ERROR_ENUM_IS_VALID #define XDG_WM_BASE_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_xdg_wm_base - * Validate a xdg_wm_base error value. - * - * @return true on success, false on error. - * @ref xdg_wm_base_error - */ static inline bool xdg_wm_base_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -421,64 +117,18 @@ xdg_wm_base_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_WM_BASE_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_xdg_wm_base - * @struct xdg_wm_base_interface - */ struct xdg_wm_base_interface { - /** - * destroy xdg_wm_base - * - * Destroy this xdg_wm_base object. - * - * Destroying a bound xdg_wm_base object while there are surfaces - * still alive created by this xdg_wm_base object instance is - * illegal and will result in a defunct_surfaces error. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * create a positioner object - * - * Create a positioner object. A positioner object is used to - * position surfaces relative to some parent surface. See the - * interface description and xdg_surface.get_popup for details. - */ void (*create_positioner)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * create a shell surface from a surface - * - * This creates an xdg_surface for the given surface. While - * xdg_surface itself is not a role, the corresponding surface may - * only be assigned a role extending xdg_surface, such as - * xdg_toplevel or xdg_popup. It is illegal to create an - * xdg_surface for a wl_surface which already has an assigned role - * and this will result in a role error. - * - * This creates an xdg_surface for the given surface. An - * xdg_surface is used as basis to define a role to a given - * surface, such as xdg_toplevel or xdg_popup. It also manages - * functionality shared between xdg_surface based surface roles. - * - * See the documentation of xdg_surface for more details about what - * an xdg_surface is and how it is used. - */ void (*get_xdg_surface)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface); - /** - * respond to a ping event - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. See xdg_wm_base.ping and - * xdg_wm_base.error.unresponsive. - * @param serial serial of the ping event - */ void (*pong)(struct wl_client *client, struct wl_resource *resource, uint32_t serial); @@ -486,34 +136,13 @@ struct xdg_wm_base_interface { #define XDG_WM_BASE_PING 0 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_PING_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_CREATE_POSITIONER_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_wm_base - */ #define XDG_WM_BASE_PONG_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_wm_base - * Sends an ping event to the client owning the resource. - * @param resource_ The client's resource - * @param serial pass this to the pong request - */ static inline void xdg_wm_base_send_ping(struct wl_resource *resource_, uint32_t serial) { @@ -523,22 +152,12 @@ xdg_wm_base_send_ping(struct wl_resource *resource_, uint32_t serial) #ifndef XDG_POSITIONER_ERROR_ENUM #define XDG_POSITIONER_ERROR_ENUM enum xdg_positioner_error { - /** - * invalid input provided - */ XDG_POSITIONER_ERROR_INVALID_INPUT = 0, }; -#endif /* XDG_POSITIONER_ERROR_ENUM */ +#endif #ifndef XDG_POSITIONER_ERROR_ENUM_IS_VALID #define XDG_POSITIONER_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_xdg_positioner - * Validate a xdg_positioner error value. - * - * @return true on success, false on error. - * @ref xdg_positioner_error - */ static inline bool xdg_positioner_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -548,7 +167,7 @@ xdg_positioner_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_POSITIONER_ERROR_ENUM_IS_VALID */ +#endif #ifndef XDG_POSITIONER_ANCHOR_ENUM #define XDG_POSITIONER_ANCHOR_ENUM @@ -563,17 +182,10 @@ enum xdg_positioner_anchor { XDG_POSITIONER_ANCHOR_TOP_RIGHT = 7, XDG_POSITIONER_ANCHOR_BOTTOM_RIGHT = 8, }; -#endif /* XDG_POSITIONER_ANCHOR_ENUM */ +#endif #ifndef XDG_POSITIONER_ANCHOR_ENUM_IS_VALID #define XDG_POSITIONER_ANCHOR_ENUM_IS_VALID -/** - * @ingroup iface_xdg_positioner - * Validate a xdg_positioner anchor value. - * - * @return true on success, false on error. - * @ref xdg_positioner_anchor - */ static inline bool xdg_positioner_anchor_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -599,7 +211,7 @@ xdg_positioner_anchor_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_POSITIONER_ANCHOR_ENUM_IS_VALID */ +#endif #ifndef XDG_POSITIONER_GRAVITY_ENUM #define XDG_POSITIONER_GRAVITY_ENUM @@ -614,17 +226,10 @@ enum xdg_positioner_gravity { XDG_POSITIONER_GRAVITY_TOP_RIGHT = 7, XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT = 8, }; -#endif /* XDG_POSITIONER_GRAVITY_ENUM */ +#endif #ifndef XDG_POSITIONER_GRAVITY_ENUM_IS_VALID #define XDG_POSITIONER_GRAVITY_ENUM_IS_VALID -/** - * @ingroup iface_xdg_positioner - * Validate a xdg_positioner gravity value. - * - * @return true on success, false on error. - * @ref xdg_positioner_gravity - */ static inline bool xdg_positioner_gravity_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -650,125 +255,23 @@ xdg_positioner_gravity_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_POSITIONER_GRAVITY_ENUM_IS_VALID */ +#endif #ifndef XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM #define XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM -/** - * @ingroup iface_xdg_positioner - * constraint adjustments - * - * The constraint adjustment value define ways the compositor will adjust - * the position of the surface, if the unadjusted position would result - * in the surface being partly constrained. - * - * Whether a surface is considered 'constrained' is left to the compositor - * to determine. For example, the surface may be partly outside the - * compositor's defined 'work area', thus necessitating the child surface's - * position be adjusted until it is entirely inside the work area. - * - * The adjustments can be combined, according to a defined precedence: 1) - * Flip, 2) Slide, 3) Resize. - */ enum xdg_positioner_constraint_adjustment { - /** - * don't move the child surface when constrained - * - * Don't alter the surface position even if it is constrained on - * some axis, for example partially outside the edge of an output. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE = 0, - /** - * move along the x axis until unconstrained - * - * Slide the surface along the x axis until it is no longer - * constrained. - * - * First try to slide towards the direction of the gravity on the x - * axis until either the edge in the opposite direction of the - * gravity is unconstrained or the edge in the direction of the - * gravity is constrained. - * - * Then try to slide towards the opposite direction of the gravity - * on the x axis until either the edge in the direction of the - * gravity is unconstrained or the edge in the opposite direction - * of the gravity is constrained. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1, - /** - * move along the y axis until unconstrained - * - * Slide the surface along the y axis until it is no longer - * constrained. - * - * First try to slide towards the direction of the gravity on the y - * axis until either the edge in the opposite direction of the - * gravity is unconstrained or the edge in the direction of the - * gravity is constrained. - * - * Then try to slide towards the opposite direction of the gravity - * on the y axis until either the edge in the direction of the - * gravity is unconstrained or the edge in the opposite direction - * of the gravity is constrained. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2, - /** - * invert the anchor and gravity on the x axis - * - * Invert the anchor and gravity on the x axis if the surface is - * constrained on the x axis. For example, if the left edge of the - * surface is constrained, the gravity is 'left' and the anchor is - * 'left', change the gravity to 'right' and the anchor to 'right'. - * - * If the adjusted position also ends up being constrained, the - * resulting position of the flip_x adjustment will be the one - * before the adjustment. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X = 4, - /** - * invert the anchor and gravity on the y axis - * - * Invert the anchor and gravity on the y axis if the surface is - * constrained on the y axis. For example, if the bottom edge of - * the surface is constrained, the gravity is 'bottom' and the - * anchor is 'bottom', change the gravity to 'top' and the anchor - * to 'top'. - * - * The adjusted position is calculated given the original anchor - * rectangle and offset, but with the new flipped anchor and - * gravity values. - * - * If the adjusted position also ends up being constrained, the - * resulting position of the flip_y adjustment will be the one - * before the adjustment. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8, - /** - * horizontally resize the surface - * - * Resize the surface horizontally so that it is completely - * unconstrained. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16, - /** - * vertically resize the surface - * - * Resize the surface vertically so that it is completely - * unconstrained. - */ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32, }; -#endif /* XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM */ +#endif #ifndef XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM_IS_VALID #define XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM_IS_VALID -/** - * @ingroup iface_xdg_positioner - * Validate a xdg_positioner constraint_adjustment value. - * - * @return true on success, false on error. - * @ref xdg_positioner_constraint_adjustment - */ static inline bool xdg_positioner_constraint_adjustment_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -788,268 +291,71 @@ xdg_positioner_constraint_adjustment_is_valid(uint32_t value, uint32_t version) valid |= XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y; return (value & ~valid) == 0; } -#endif /* XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_xdg_positioner - * @struct xdg_positioner_interface - */ struct xdg_positioner_interface { - /** - * destroy the xdg_positioner object - * - * Notify the compositor that the xdg_positioner will no longer - * be used. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * set the size of the to-be positioned rectangle - * - * Set the size of the surface that is to be positioned with the - * positioner object. The size is in surface-local coordinates and - * corresponds to the window geometry. See - * xdg_surface.set_window_geometry. - * - * If a zero or negative size is set the invalid_input error is - * raised. - * @param width width of positioned rectangle - * @param height height of positioned rectangle - */ void (*set_size)(struct wl_client *client, struct wl_resource *resource, int32_t width, int32_t height); - /** - * set the anchor rectangle within the parent surface - * - * Specify the anchor rectangle within the parent surface that - * the child surface will be placed relative to. The rectangle is - * relative to the window geometry as defined by - * xdg_surface.set_window_geometry of the parent surface. - * - * When the xdg_positioner object is used to position a child - * surface, the anchor rectangle may not extend outside the window - * geometry of the positioned child's parent surface. - * - * If a negative size is set the invalid_input error is raised. - * @param x x position of anchor rectangle - * @param y y position of anchor rectangle - * @param width width of anchor rectangle - * @param height height of anchor rectangle - */ void (*set_anchor_rect)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height); - /** - * set anchor rectangle anchor - * - * Defines the anchor point for the anchor rectangle. The - * specified anchor is used derive an anchor point that the child - * surface will be positioned relative to. If a corner anchor is - * set (e.g. 'top_left' or 'bottom_right'), the anchor point will - * be at the specified corner; otherwise, the derived anchor point - * will be centered on the specified edge, or in the center of the - * anchor rectangle if no edge is specified. - * @param anchor anchor - */ void (*set_anchor)(struct wl_client *client, struct wl_resource *resource, uint32_t anchor); - /** - * set child surface gravity - * - * Defines in what direction a surface should be positioned, - * relative to the anchor point of the parent surface. If a corner - * gravity is specified (e.g. 'bottom_right' or 'top_left'), then - * the child surface will be placed towards the specified gravity; - * otherwise, the child surface will be centered over the anchor - * point on any axis that had no gravity specified. If the gravity - * is not in the ‘gravity’ enum, an invalid_input error is - * raised. - * @param gravity gravity direction - */ void (*set_gravity)(struct wl_client *client, struct wl_resource *resource, uint32_t gravity); - /** - * set the adjustment to be done when constrained - * - * Specify how the window should be positioned if the originally - * intended position caused the surface to be constrained, meaning - * at least partially outside positioning boundaries set by the - * compositor. The adjustment is set by constructing a bitmask - * describing the adjustment to be made when the surface is - * constrained on that axis. - * - * If no bit for one axis is set, the compositor will assume that - * the child surface should not change its position on that axis - * when constrained. - * - * If more than one bit for one axis is set, the order of how - * adjustments are applied is specified in the corresponding - * adjustment descriptions. - * - * The default adjustment is none. - * @param constraint_adjustment bit mask of constraint adjustments - */ void (*set_constraint_adjustment)(struct wl_client *client, struct wl_resource *resource, uint32_t constraint_adjustment); - /** - * set surface position offset - * - * Specify the surface position offset relative to the position - * of the anchor on the anchor rectangle and the anchor on the - * surface. For example if the anchor of the anchor rectangle is at - * (x, y), the surface has the gravity bottom|right, and the offset - * is (ox, oy), the calculated surface position will be (x + ox, y - * + oy). The offset position of the surface is the one used for - * constraint testing. See set_constraint_adjustment. - * - * An example use case is placing a popup menu on top of a user - * interface element, while aligning the user interface element of - * the parent surface with some user interface element placed - * somewhere in the popup surface. - * @param x surface position x offset - * @param y surface position y offset - */ void (*set_offset)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y); - /** - * continuously reconstrain the surface - * - * When set reactive, the surface is reconstrained if the - * conditions used for constraining changed, e.g. the parent window - * moved. - * - * If the conditions changed and the popup was reconstrained, an - * xdg_popup.configure event is sent with updated geometry, - * followed by an xdg_surface.configure event. - * @since 3 - */ void (*set_reactive)(struct wl_client *client, struct wl_resource *resource); - /** - * - * - * Set the parent window geometry the compositor should use when - * positioning the popup. The compositor may use this information - * to determine the future state the popup should be constrained - * using. If this doesn't match the dimension of the parent the - * popup is eventually positioned against, the behavior is - * undefined. - * - * The arguments are given in the surface-local coordinate space. - * @param parent_width future window geometry width of parent - * @param parent_height future window geometry height of parent - * @since 3 - */ void (*set_parent_size)(struct wl_client *client, struct wl_resource *resource, int32_t parent_width, int32_t parent_height); - /** - * set parent configure this is a response to - * - * Set the serial of an xdg_surface.configure event this - * positioner will be used in response to. The compositor may use - * this information together with set_parent_size to determine what - * future state the popup should be constrained using. - * @param serial serial of parent configure event - * @since 3 - */ void (*set_parent_configure)(struct wl_client *client, struct wl_resource *resource, uint32_t serial); }; -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_ANCHOR_RECT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_ANCHOR_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_GRAVITY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_OFFSET_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_REACTIVE_SINCE_VERSION 3 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_PARENT_SIZE_SINCE_VERSION 3 -/** - * @ingroup iface_xdg_positioner - */ #define XDG_POSITIONER_SET_PARENT_CONFIGURE_SINCE_VERSION 3 #ifndef XDG_SURFACE_ERROR_ENUM #define XDG_SURFACE_ERROR_ENUM enum xdg_surface_error { - /** - * Surface was not fully constructed - */ XDG_SURFACE_ERROR_NOT_CONSTRUCTED = 1, - /** - * Surface was already constructed - */ XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED = 2, - /** - * Attaching a buffer to an unconfigured surface - */ XDG_SURFACE_ERROR_UNCONFIGURED_BUFFER = 3, - /** - * Invalid serial number when acking a configure event - */ XDG_SURFACE_ERROR_INVALID_SERIAL = 4, - /** - * Width or height was zero or negative - */ XDG_SURFACE_ERROR_INVALID_SIZE = 5, - /** - * Surface was destroyed before its role object - */ XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT = 6, }; -#endif /* XDG_SURFACE_ERROR_ENUM */ +#endif #ifndef XDG_SURFACE_ERROR_ENUM_IS_VALID #define XDG_SURFACE_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_xdg_surface - * Validate a xdg_surface error value. - * - * @return true on success, false on error. - * @ref xdg_surface_error - */ static inline bool xdg_surface_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1069,133 +375,25 @@ xdg_surface_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_SURFACE_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_xdg_surface - * @struct xdg_surface_interface - */ struct xdg_surface_interface { - /** - * destroy the xdg_surface - * - * Destroy the xdg_surface object. An xdg_surface must only be - * destroyed after its role object has been destroyed, otherwise a - * defunct_role_object error is raised. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * assign the xdg_toplevel surface role - * - * This creates an xdg_toplevel object for the given xdg_surface - * and gives the associated wl_surface the xdg_toplevel role. - * - * See the documentation of xdg_toplevel for more details about - * what an xdg_toplevel is and how it is used. - */ void (*get_toplevel)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * assign the xdg_popup surface role - * - * This creates an xdg_popup object for the given xdg_surface and - * gives the associated wl_surface the xdg_popup role. - * - * If null is passed as a parent, a parent surface must be - * specified using some other protocol, before committing the - * initial state. - * - * See the documentation of xdg_popup for more details about what - * an xdg_popup is and how it is used. - */ void (*get_popup)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *parent, struct wl_resource *positioner); - /** - * set the new window geometry - * - * The window geometry of a surface is its "visible bounds" from - * the user's perspective. Client-side decorations often have - * invisible portions like drop-shadows which should be ignored for - * the purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at - * the time wl_surface.commit of the corresponding wl_surface is - * called. - * - * When maintaining a position, the compositor should treat the (x, - * y) coordinate of the window geometry as the top left corner of - * the window. A client changing the (x, y) window geometry - * coordinate should in general not alter the position of the - * window. - * - * Once the window geometry of the surface is set, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset is meant for extremely simple clients. - * - * The arguments are given in the surface-local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. Setting an - * invalid size will raise an invalid_size error. When applied, the - * effective window geometry will be the set window geometry - * clamped to the bounding rectangle of the combined geometry of - * the surface of the xdg_surface and the associated subsurfaces. - */ void (*set_window_geometry)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height); - /** - * ack a configure event - * - * When a configure event is received, if a client commits the - * surface in response to the configure event, then the client must - * make an ack_configure request sometime before the commit - * request, passing along the serial of the configure event. - * - * For instance, for toplevel surfaces the compositor might use - * this information to move a surface to the top left only when the - * client has drawn itself for the maximized or fullscreen state. - * - * If the client receives multiple configure events before it can - * respond to one, it only has to ack the last configure event. - * Acking a configure event that was never sent raises an - * invalid_serial error. - * - * A client is not required to commit immediately after sending an - * ack_configure request - it may even ack_configure several times - * before its next surface commit. - * - * A client may send multiple ack_configure requests before - * committing, but only the last request sent before a commit - * indicates which configure event the client really is responding - * to. - * - * Sending an ack_configure request consumes the serial number sent - * with the request, as well as serial numbers sent by all - * configure events sent on this xdg_surface prior to the configure - * event referenced by the committed serial. - * - * It is an error to issue multiple ack_configure requests - * referencing a serial from the same configure event, or to issue - * an ack_configure request referencing a serial from a configure - * event issued before the event identified by the last - * ack_configure request for the same xdg_surface. Doing so will - * raise an invalid_serial error. - * @param serial the serial from the configure event - */ void (*ack_configure)(struct wl_client *client, struct wl_resource *resource, uint32_t serial); @@ -1203,38 +401,14 @@ struct xdg_surface_interface { #define XDG_SURFACE_CONFIGURE 0 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_GET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_GET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ #define XDG_SURFACE_ACK_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial of the configure event - */ static inline void xdg_surface_send_configure(struct wl_resource *resource_, uint32_t serial) { @@ -1244,30 +418,14 @@ xdg_surface_send_configure(struct wl_resource *resource_, uint32_t serial) #ifndef XDG_TOPLEVEL_ERROR_ENUM #define XDG_TOPLEVEL_ERROR_ENUM enum xdg_toplevel_error { - /** - * provided value is not a valid variant of the resize_edge enum - */ XDG_TOPLEVEL_ERROR_INVALID_RESIZE_EDGE = 0, - /** - * invalid parent toplevel - */ XDG_TOPLEVEL_ERROR_INVALID_PARENT = 1, - /** - * client provided an invalid min or max size - */ XDG_TOPLEVEL_ERROR_INVALID_SIZE = 2, }; -#endif /* XDG_TOPLEVEL_ERROR_ENUM */ +#endif #ifndef XDG_TOPLEVEL_ERROR_ENUM_IS_VALID #define XDG_TOPLEVEL_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_xdg_toplevel - * Validate a xdg_toplevel error value. - * - * @return true on success, false on error. - * @ref xdg_toplevel_error - */ static inline bool xdg_toplevel_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1281,17 +439,10 @@ xdg_toplevel_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_TOPLEVEL_ERROR_ENUM_IS_VALID */ +#endif #ifndef XDG_TOPLEVEL_RESIZE_EDGE_ENUM #define XDG_TOPLEVEL_RESIZE_EDGE_ENUM -/** - * @ingroup iface_xdg_toplevel - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ enum xdg_toplevel_resize_edge { XDG_TOPLEVEL_RESIZE_EDGE_NONE = 0, XDG_TOPLEVEL_RESIZE_EDGE_TOP = 1, @@ -1303,17 +454,10 @@ enum xdg_toplevel_resize_edge { XDG_TOPLEVEL_RESIZE_EDGE_TOP_RIGHT = 9, XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_RIGHT = 10, }; -#endif /* XDG_TOPLEVEL_RESIZE_EDGE_ENUM */ +#endif #ifndef XDG_TOPLEVEL_RESIZE_EDGE_ENUM_IS_VALID #define XDG_TOPLEVEL_RESIZE_EDGE_ENUM_IS_VALID -/** - * @ingroup iface_xdg_toplevel - * Validate a xdg_toplevel resize_edge value. - * - * @return true on success, false on error. - * @ref xdg_toplevel_resize_edge - */ static inline bool xdg_toplevel_resize_edge_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1339,124 +483,28 @@ xdg_toplevel_resize_edge_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_TOPLEVEL_RESIZE_EDGE_ENUM_IS_VALID */ +#endif #ifndef XDG_TOPLEVEL_STATE_ENUM #define XDG_TOPLEVEL_STATE_ENUM -/** - * @ingroup iface_xdg_toplevel - * types of state on the surface - * - * The different state values used on the surface. This is designed for - * state values like maximized, fullscreen. It is paired with the - * configure event to ensure that both the client and the compositor - * setting the state can be synchronized. - * - * States set in this way are double-buffered. They will get applied on - * the next commit. - */ enum xdg_toplevel_state { - /** - * the surface is maximized - * the surface is maximized - * - * The surface is maximized. The window geometry specified in the - * configure event must be obeyed by the client. - * - * The client should draw without shadow or other decoration - * outside of the window geometry. - */ XDG_TOPLEVEL_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - * the surface is fullscreen - * - * The surface is fullscreen. The window geometry specified in - * the configure event is a maximum; the client cannot resize - * beyond it. For a surface to cover the whole fullscreened area, - * the geometry dimensions must be obeyed by the client. For more - * details, see xdg_toplevel.set_fullscreen. - */ XDG_TOPLEVEL_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - * the surface is being resized - * - * The surface is being resized. The window geometry specified in - * the configure event is a maximum; the client cannot resize - * beyond it. Clients that have aspect ratio or cell sizing - * configuration can use a smaller size, however. - */ XDG_TOPLEVEL_STATE_RESIZING = 3, - /** - * the surface is now activated - * the surface is now activated - * - * Client window decorations should be painted as if the window - * is active. Do not assume this means that the window actually has - * keyboard or pointer focus. - */ XDG_TOPLEVEL_STATE_ACTIVATED = 4, - /** - * the surface’s left edge is tiled - * - * The window is currently in a tiled layout and the left edge is - * considered to be adjacent to another part of the tiling grid. - * @since 2 - */ XDG_TOPLEVEL_STATE_TILED_LEFT = 5, - /** - * the surface’s right edge is tiled - * - * The window is currently in a tiled layout and the right edge - * is considered to be adjacent to another part of the tiling grid. - * @since 2 - */ XDG_TOPLEVEL_STATE_TILED_RIGHT = 6, - /** - * the surface’s top edge is tiled - * - * The window is currently in a tiled layout and the top edge is - * considered to be adjacent to another part of the tiling grid. - * @since 2 - */ XDG_TOPLEVEL_STATE_TILED_TOP = 7, - /** - * the surface’s bottom edge is tiled - * - * The window is currently in a tiled layout and the bottom edge - * is considered to be adjacent to another part of the tiling grid. - * @since 2 - */ XDG_TOPLEVEL_STATE_TILED_BOTTOM = 8, }; -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_STATE_TILED_LEFT_SINCE_VERSION 2 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION 2 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_STATE_TILED_TOP_SINCE_VERSION 2 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_STATE_TILED_BOTTOM_SINCE_VERSION 2 -#endif /* XDG_TOPLEVEL_STATE_ENUM */ +#endif #ifndef XDG_TOPLEVEL_STATE_ENUM_IS_VALID #define XDG_TOPLEVEL_STATE_ENUM_IS_VALID -/** - * @ingroup iface_xdg_toplevel - * Validate a xdg_toplevel state value. - * - * @return true on success, false on error. - * @ref xdg_toplevel_state - */ static inline bool xdg_toplevel_state_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1480,39 +528,20 @@ xdg_toplevel_state_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_TOPLEVEL_STATE_ENUM_IS_VALID */ +#endif #ifndef XDG_TOPLEVEL_WM_CAPABILITIES_ENUM #define XDG_TOPLEVEL_WM_CAPABILITIES_ENUM enum xdg_toplevel_wm_capabilities { - /** - * show_window_menu is available - */ XDG_TOPLEVEL_WM_CAPABILITIES_WINDOW_MENU = 1, - /** - * set_maximized and unset_maximized are available - */ XDG_TOPLEVEL_WM_CAPABILITIES_MAXIMIZE = 2, - /** - * set_fullscreen and unset_fullscreen are available - */ XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN = 3, - /** - * set_minimized is available - */ XDG_TOPLEVEL_WM_CAPABILITIES_MINIMIZE = 4, }; -#endif /* XDG_TOPLEVEL_WM_CAPABILITIES_ENUM */ +#endif #ifndef XDG_TOPLEVEL_WM_CAPABILITIES_ENUM_IS_VALID #define XDG_TOPLEVEL_WM_CAPABILITIES_ENUM_IS_VALID -/** - * @ingroup iface_xdg_toplevel - * Validate a xdg_toplevel wm_capabilities value. - * - * @return true on success, false on error. - * @ref xdg_toplevel_wm_capabilities - */ static inline bool xdg_toplevel_wm_capabilities_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1528,398 +557,52 @@ xdg_toplevel_wm_capabilities_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_TOPLEVEL_WM_CAPABILITIES_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_xdg_toplevel - * @struct xdg_toplevel_interface - */ struct xdg_toplevel_interface { - /** - * destroy the xdg_toplevel - * - * This request destroys the role surface and unmaps the surface; - * see "Unmapping" behavior in interface section for details. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * set the parent of this surface - * - * Set the "parent" of this surface. This surface should be - * stacked above the parent surface and all other ancestor - * surfaces. - * - * Parent surfaces should be set on dialogs, toolboxes, or other - * "auxiliary" surfaces, so that the parent is raised when the - * dialog is raised. - * - * Setting a null parent for a child surface unsets its parent. - * Setting a null parent for a surface which currently has no - * parent is a no-op. - * - * Only mapped surfaces can have child surfaces. Setting a parent - * which is not mapped is equivalent to setting a null parent. If a - * surface becomes unmapped, its children's parent is set to the - * parent of the now-unmapped surface. If the now-unmapped surface - * has no parent, its children's parent is unset. If the - * now-unmapped surface becomes mapped again, its parent-child - * relationship is not restored. - * - * The parent toplevel must not be one of the child toplevel's - * descendants, and the parent must be different from the child - * toplevel, otherwise the invalid_parent protocol error is raised. - */ void (*set_parent)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *parent); - /** - * set surface title - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ void (*set_title)(struct wl_client *client, struct wl_resource *resource, const char *title); - /** - * set application ID - * - * Set an application identifier for the surface. - * - * The app ID identifies the general class of applications to which - * the surface belongs. The compositor can use this to group - * multiple surfaces together, or to determine how to launch a new - * application. - * - * For D-Bus activatable applications, the app ID is used as the - * D-Bus service name. - * - * The compositor shell will try to group application surfaces - * together by their app ID. As a best practice, it is suggested to - * select app ID's that match the basename of the application's - * .desktop file. For example, "org.freedesktop.FooViewer" where - * the .desktop file is "org.freedesktop.FooViewer.desktop". - * - * Like other properties, a set_app_id request can be sent after - * the xdg_toplevel has been mapped to update the property. - * - * See the desktop-entry specification [0] for more details on - * application identifiers and how they relate to well-known D-Bus - * names and .desktop files. - * - * [0] https://standards.freedesktop.org/desktop-entry-spec/ - */ void (*set_app_id)(struct wl_client *client, struct wl_resource *resource, const char *app_id); - /** - * show the window menu - * - * Clients implementing client-side decorations might want to - * show a context menu when right-clicking on the decorations, - * giving the user a menu that they can use to maximize or minimize - * the window. - * - * This request asks the compositor to pop up such a window menu at - * the given position, relative to the local surface coordinates of - * the parent surface. There are no guarantees as to what menu - * items the window menu contains, or even if a window menu will be - * drawn at all. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param x the x position to pop up the window menu at - * @param y the y position to pop up the window menu at - */ void (*show_window_menu)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial, int32_t x, int32_t y); - /** - * start an interactive move - * - * Start an interactive, user-driven move of the surface. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. The - * passed serial is used to determine the type of interactive move - * (touch, pointer, etc). - * - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized), or if the passed - * serial is no longer valid. - * - * If triggered, the surface will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the move. It is up to the - * compositor to visually indicate that the move is taking place, - * such as updating a pointer cursor, during the move. There is no - * guarantee that the device focus will return when the move is - * completed. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ void (*move)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial); - /** - * start an interactive resize - * - * Start a user-driven, interactive resize of the surface. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. The - * passed serial is used to determine the type of interactive - * resize (touch, pointer, etc). - * - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * - * If triggered, the client will receive configure events with the - * "resize" state enum value and the expected sizes. See the - * "resize" enum value for more details about what is required. The - * client must also acknowledge configure events using - * "ack_configure". After the resize is completed, the client will - * receive another "configure" event without the resize state. - * - * If triggered, the surface also will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the resize. It is up to the - * compositor to visually indicate that the resize is taking place, - * such as updating a pointer cursor, during the resize. There is - * no guarantee that the device focus will return when the resize - * is completed. - * - * The edges parameter specifies how the surface should be resized, - * and is one of the values of the resize_edge enum. Values not - * matching a variant of the enum will cause a protocol error. The - * compositor may use this information to update the surface - * position for example when dragging the top left corner. The - * compositor may also use this information to adapt its behavior, - * e.g. choose an appropriate cursor image. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param edges which edge or corner is being dragged - */ void (*resize)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial, uint32_t edges); - /** - * set the maximum size - * - * Set a maximum size for the window. - * - * The client can specify a maximum size so that the compositor - * does not try to configure the window beyond this size. - * - * The width and height arguments are in window geometry - * coordinates. See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the maximum - * size. The compositor may decide to ignore the values set by the - * client and request a larger size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected maximum size in the given dimension. As a - * result, a client wishing to reset the maximum size to an - * unspecified state can use zero for width and height in the - * request. - * - * Requesting a maximum size to be smaller than the minimum size of - * a surface is illegal and will result in an invalid_size error. - * - * The width and height must be greater than or equal to zero. - * Using strictly negative values for width or height will result - * in a invalid_size error. - */ void (*set_max_size)(struct wl_client *client, struct wl_resource *resource, int32_t width, int32_t height); - /** - * set the minimum size - * - * Set a minimum size for the window. - * - * The client can specify a minimum size so that the compositor - * does not try to configure the window below this size. - * - * The width and height arguments are in window geometry - * coordinates. See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the minimum - * size. The compositor may decide to ignore the values set by the - * client and request a smaller size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected minimum size in the given dimension. As a - * result, a client wishing to reset the minimum size to an - * unspecified state can use zero for width and height in the - * request. - * - * Requesting a minimum size to be larger than the maximum size of - * a surface is illegal and will result in an invalid_size error. - * - * The width and height must be greater than or equal to zero. - * Using strictly negative values for width and height will result - * in a invalid_size error. - */ void (*set_min_size)(struct wl_client *client, struct wl_resource *resource, int32_t width, int32_t height); - /** - * maximize the window - * - * Maximize the surface. - * - * After requesting that the surface should be maximized, the - * compositor will respond by emitting a configure event. Whether - * this configure actually sets the window maximized is subject to - * compositor policies. The client must then update its content, - * drawing in the configured state. The client must also - * acknowledge the configure when committing the new content (see - * ack_configure). - * - * It is up to the compositor to decide how and where to maximize - * the surface, for example which output and what region of the - * screen should be used. - * - * If the surface was already maximized, the compositor will still - * emit a configure event with the "maximized" state. - * - * If the surface is in a fullscreen state, this request has no - * direct effect. It may alter the state the surface is returned to - * when unmaximized unless overridden by the compositor. - */ void (*set_maximized)(struct wl_client *client, struct wl_resource *resource); - /** - * unmaximize the window - * - * Unmaximize the surface. - * - * After requesting that the surface should be unmaximized, the - * compositor will respond by emitting a configure event. Whether - * this actually un-maximizes the window is subject to compositor - * policies. If available and applicable, the compositor will - * include the window geometry dimensions the window had prior to - * being maximized in the configure event. The client must then - * update its content, drawing it in the configured state. The - * client must also acknowledge the configure when committing the - * new content (see ack_configure). - * - * It is up to the compositor to position the surface after it was - * unmaximized; usually the position the surface had before - * maximizing, if applicable. - * - * If the surface was already not maximized, the compositor will - * still emit a configure event without the "maximized" state. - * - * If the surface is in a fullscreen state, this request has no - * direct effect. It may alter the state the surface is returned to - * when unmaximized unless overridden by the compositor. - */ void (*unset_maximized)(struct wl_client *client, struct wl_resource *resource); - /** - * set the window as fullscreen on an output - * - * Make the surface fullscreen. - * - * After requesting that the surface should be fullscreened, the - * compositor will respond by emitting a configure event. Whether - * the client is actually put into a fullscreen state is subject to - * compositor policies. The client must also acknowledge the - * configure when committing the new content (see ack_configure). - * - * The output passed by the request indicates the client's - * preference as to which display it should be set fullscreen on. - * If this value is NULL, it's up to the compositor to choose which - * display will be used to map this surface. - * - * If the surface doesn't cover the whole output, the compositor - * will position the surface in the center of the output and - * compensate with with border fill covering the rest of the - * output. The content of the border fill is undefined, but should - * be assumed to be in some way that attempts to blend into the - * surrounding area (e.g. solid black). - * - * If the fullscreened surface is not opaque, the compositor must - * make sure that other screen content not part of the same surface - * tree (made up of subsurfaces, popups or similarly coupled - * surfaces) are not visible below the fullscreened surface. - */ void (*set_fullscreen)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *output); - /** - * unset the window as fullscreen - * - * Make the surface no longer fullscreen. - * - * After requesting that the surface should be unfullscreened, the - * compositor will respond by emitting a configure event. Whether - * this actually removes the fullscreen state of the client is - * subject to compositor policies. - * - * Making a surface unfullscreen sets states for the surface based - * on the following: * the state(s) it may have had before becoming - * fullscreen * any state(s) decided by the compositor * any - * state(s) requested by the client while the surface was - * fullscreen - * - * The compositor may include the previous window geometry - * dimensions in the configure event, if applicable. - * - * The client must also acknowledge the configure when committing - * the new content (see ack_configure). - */ void (*unset_fullscreen)(struct wl_client *client, struct wl_resource *resource); - /** - * set the window as minimized - * - * Request that the compositor minimize your surface. There is no - * way to know if the surface is currently minimized, nor is there - * any way to unset minimization on this surface. - * - * If you are looking to throttle redrawing when minimized, please - * instead use the wl_surface.frame event for this, as this will - * also work with live previews on windows in Alt-Tab, Expose or - * similar compositor features. - */ void (*set_minimized)(struct wl_client *client, struct wl_resource *resource); }; @@ -1929,119 +612,44 @@ struct xdg_toplevel_interface { #define XDG_TOPLEVEL_CONFIGURE_BOUNDS 2 #define XDG_TOPLEVEL_WM_CAPABILITIES 3 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_CLOSE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION 4 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION 5 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_MAX_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_MIN_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - */ #define XDG_TOPLEVEL_SET_MINIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void xdg_toplevel_send_configure(struct wl_resource *resource_, int32_t width, int32_t height, struct wl_array *states) { wl_resource_post_event(resource_, XDG_TOPLEVEL_CONFIGURE, width, height, states); } -/** - * @ingroup iface_xdg_toplevel - * Sends an close event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void xdg_toplevel_send_close(struct wl_resource *resource_) { wl_resource_post_event(resource_, XDG_TOPLEVEL_CLOSE); } -/** - * @ingroup iface_xdg_toplevel - * Sends an configure_bounds event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void xdg_toplevel_send_configure_bounds(struct wl_resource *resource_, int32_t width, int32_t height) { wl_resource_post_event(resource_, XDG_TOPLEVEL_CONFIGURE_BOUNDS, width, height); } -/** - * @ingroup iface_xdg_toplevel - * Sends an wm_capabilities event to the client owning the resource. - * @param resource_ The client's resource - * @param capabilities array of 32-bit capabilities - */ static inline void xdg_toplevel_send_wm_capabilities(struct wl_resource *resource_, struct wl_array *capabilities) { @@ -2051,22 +659,12 @@ xdg_toplevel_send_wm_capabilities(struct wl_resource *resource_, struct wl_array #ifndef XDG_POPUP_ERROR_ENUM #define XDG_POPUP_ERROR_ENUM enum xdg_popup_error { - /** - * tried to grab after being mapped - */ XDG_POPUP_ERROR_INVALID_GRAB = 0, }; -#endif /* XDG_POPUP_ERROR_ENUM */ +#endif #ifndef XDG_POPUP_ERROR_ENUM_IS_VALID #define XDG_POPUP_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_xdg_popup - * Validate a xdg_popup error value. - * - * @return true on success, false on error. - * @ref xdg_popup_error - */ static inline bool xdg_popup_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -2076,106 +674,15 @@ xdg_popup_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_POPUP_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_xdg_popup - * @struct xdg_popup_interface - */ struct xdg_popup_interface { - /** - * remove xdg_popup interface - * - * This destroys the popup. Explicitly destroying the xdg_popup - * object will also dismiss the popup, and unmap the surface. - * - * If this xdg_popup is not the "topmost" popup, a protocol error - * will be sent. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * make the popup take an explicit grab - * - * This request makes the created popup take an explicit grab. An - * explicit grab will be dismissed when the user dismisses the - * popup, or when the client destroys the xdg_popup. This can be - * done by the user clicking outside the surface, using the - * keyboard, or even locking the screen through closing the lid or - * a timeout. - * - * If the compositor denies the grab, the popup will be immediately - * dismissed. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. The - * serial number of the event should be passed as 'serial'. - * - * The parent of a grabbing popup must either be an xdg_toplevel - * surface or another xdg_popup with an explicit grab. If the - * parent is another xdg_popup it means that the popups are nested, - * with this popup now being the topmost popup. - * - * Nested popups must be destroyed in the reverse order they were - * created in, e.g. the only popup you are allowed to destroy at - * all times is the topmost one. - * - * When compositors choose to dismiss a popup, they may dismiss - * every nested grabbing popup as well. When a compositor dismisses - * popups, it will follow the same dismissing order as required - * from the client. - * - * If the topmost grabbing popup is destroyed, the grab will be - * returned to the parent of the popup, if that parent previously - * had an explicit grab. - * - * If the parent is a grabbing popup which has already been - * dismissed, this popup will be immediately dismissed. If the - * parent is a popup that did not take an explicit grab, an error - * will be raised. - * - * During a popup grab, the client owning the grab will receive - * pointer and touch events for all their surfaces as normal - * (similar to an "owner-events" grab in X11 parlance), while the - * top most grabbing popup will always have keyboard focus. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ void (*grab)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial); - /** - * recalculate the popup's location - * - * Reposition an already-mapped popup. The popup will be placed - * given the details in the passed xdg_positioner object, and a - * xdg_popup.repositioned followed by xdg_popup.configure and - * xdg_surface.configure will be emitted in response. Any - * parameters set by the previous positioner will be discarded. - * - * The passed token will be sent in the corresponding - * xdg_popup.repositioned event. The new popup position will not - * take effect until the corresponding configure event is - * acknowledged by the client. See xdg_popup.repositioned for - * details. The token itself is opaque, and has no other special - * meaning. - * - * If multiple reposition requests are sent, the compositor may - * skip all but the last one. - * - * If the popup is repositioned in response to a configure event - * for its parent, the client should send an - * xdg_positioner.set_parent_configure and possibly an - * xdg_positioner.set_parent_size request to allow the compositor - * to properly constrain the popup. - * - * If the popup is repositioned together with a parent that is - * being resized, but not in response to a configure event, the - * client should send an xdg_positioner.set_parent_size request. - * @param token reposition request token - * @since 3 - */ void (*reposition)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *positioner, @@ -2186,64 +693,26 @@ struct xdg_popup_interface { #define XDG_POPUP_POPUP_DONE 1 #define XDG_POPUP_REPOSITIONED 2 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_REPOSITIONED_SINCE_VERSION 3 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_GRAB_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_popup - */ #define XDG_POPUP_REPOSITION_SINCE_VERSION 3 -/** - * @ingroup iface_xdg_popup - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - * @param x x position relative to parent surface window geometry - * @param y y position relative to parent surface window geometry - * @param width window geometry width - * @param height window geometry height - */ static inline void xdg_popup_send_configure(struct wl_resource *resource_, int32_t x, int32_t y, int32_t width, int32_t height) { wl_resource_post_event(resource_, XDG_POPUP_CONFIGURE, x, y, width, height); } -/** - * @ingroup iface_xdg_popup - * Sends an popup_done event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void xdg_popup_send_popup_done(struct wl_resource *resource_) { wl_resource_post_event(resource_, XDG_POPUP_POPUP_DONE); } -/** - * @ingroup iface_xdg_popup - * Sends an repositioned event to the client owning the resource. - * @param resource_ The client's resource - * @param token reposition request token - */ static inline void xdg_popup_send_repositioned(struct wl_resource *resource_, uint32_t token) { diff --git a/app/src/main/cpp/waylandcomp/generated/xdg-toplevel-icon-v1-protocol.c b/app/src/main/cpp/waylandcomp/generated/xdg-toplevel-icon-v1-protocol.c index 73d39d207a..264b8f29e0 100644 --- a/app/src/main/cpp/waylandcomp/generated/xdg-toplevel-icon-v1-protocol.c +++ b/app/src/main/cpp/waylandcomp/generated/xdg-toplevel-icon-v1-protocol.c @@ -1,5 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ - /* * Copyright © 2023-2024 Matthias Klumpp * Copyright © 2024 David Edmundson @@ -30,7 +28,7 @@ #include "wayland-util.h" #ifndef __has_attribute -# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +# define __has_attribute(x) 0 #endif #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) diff --git a/app/src/main/cpp/waylandcomp/generated/xdg-toplevel-icon-v1-server-protocol.h b/app/src/main/cpp/waylandcomp/generated/xdg-toplevel-icon-v1-server-protocol.h index b186d88975..33e15fd5a8 100644 --- a/app/src/main/cpp/waylandcomp/generated/xdg-toplevel-icon-v1-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/generated/xdg-toplevel-icon-v1-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.24.0 */ #ifndef XDG_TOPLEVEL_ICON_V1_SERVER_PROTOCOL_H #define XDG_TOPLEVEL_ICON_V1_SERVER_PROTOCOL_H @@ -14,33 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_xdg_toplevel_icon_v1 The xdg_toplevel_icon_v1 protocol - * protocol to assign icons to toplevels - * - * @section page_desc_xdg_toplevel_icon_v1 Description - * - * This protocol allows clients to set icons for their toplevel surfaces - * either via the XDG icon stock (using an icon name), or from pixel data. - * - * A toplevel icon represents the individual toplevel (unlike the application - * or launcher icon, which represents the application as a whole), and may be - * shown in window switchers, window overviews and taskbars that list - * individual windows. - * - * This document adheres to RFC 2119 when using words like "must", - * "should", "may", etc. - * - * Warning! The protocol described in this file is currently in the testing - * phase. Backward compatible changes may be added together with the - * corresponding interface version bump. Backward incompatible changes can - * only be done by creating a new major version of the extension. - * - * @section page_ifaces_xdg_toplevel_icon_v1 Interfaces - * - @subpage page_iface_xdg_toplevel_icon_manager_v1 - interface to manage toplevel icons - * - @subpage page_iface_xdg_toplevel_icon_v1 - a toplevel window icon +/* * @section page_copyright_xdg_toplevel_icon_v1 Copyright - *
  *
  * Copyright © 2023-2024 Matthias Klumpp
  * Copyright ©      2024 David Edmundson
@@ -63,8 +37,33 @@ struct wl_resource;
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
*/ + + + + + + + + + + + + + + + + + + + + + + + + + + struct wl_buffer; struct xdg_toplevel; struct xdg_toplevel_icon_manager_v1; @@ -72,104 +71,19 @@ struct xdg_toplevel_icon_v1; #ifndef XDG_TOPLEVEL_ICON_MANAGER_V1_INTERFACE #define XDG_TOPLEVEL_ICON_MANAGER_V1_INTERFACE -/** - * @page page_iface_xdg_toplevel_icon_manager_v1 xdg_toplevel_icon_manager_v1 - * @section page_iface_xdg_toplevel_icon_manager_v1_desc Description - * - * This interface allows clients to create toplevel window icons and set - * them on toplevel windows to be displayed to the user. - * @section page_iface_xdg_toplevel_icon_manager_v1_api API - * See @ref iface_xdg_toplevel_icon_manager_v1. - */ -/** - * @defgroup iface_xdg_toplevel_icon_manager_v1 The xdg_toplevel_icon_manager_v1 interface - * - * This interface allows clients to create toplevel window icons and set - * them on toplevel windows to be displayed to the user. - */ extern const struct wl_interface xdg_toplevel_icon_manager_v1_interface; #endif #ifndef XDG_TOPLEVEL_ICON_V1_INTERFACE #define XDG_TOPLEVEL_ICON_V1_INTERFACE -/** - * @page page_iface_xdg_toplevel_icon_v1 xdg_toplevel_icon_v1 - * @section page_iface_xdg_toplevel_icon_v1_desc Description - * - * This interface defines a toplevel icon. - * An icon can have a name, and multiple buffers. - * In order to be applied, the icon must have either a name, or at least - * one buffer assigned. Applying an empty icon (with no buffer or name) to - * a toplevel should reset its icon to the default icon. - * - * It is up to compositor policy whether to prefer using a buffer or loading - * an icon via its name. See 'set_name' and 'add_buffer' for details. - * @section page_iface_xdg_toplevel_icon_v1_api API - * See @ref iface_xdg_toplevel_icon_v1. - */ -/** - * @defgroup iface_xdg_toplevel_icon_v1 The xdg_toplevel_icon_v1 interface - * - * This interface defines a toplevel icon. - * An icon can have a name, and multiple buffers. - * In order to be applied, the icon must have either a name, or at least - * one buffer assigned. Applying an empty icon (with no buffer or name) to - * a toplevel should reset its icon to the default icon. - * - * It is up to compositor policy whether to prefer using a buffer or loading - * an icon via its name. See 'set_name' and 'add_buffer' for details. - */ extern const struct wl_interface xdg_toplevel_icon_v1_interface; #endif -/** - * @ingroup iface_xdg_toplevel_icon_manager_v1 - * @struct xdg_toplevel_icon_manager_v1_interface - */ struct xdg_toplevel_icon_manager_v1_interface { - /** - * destroy the toplevel icon manager - * - * Destroy the toplevel icon manager. This does not destroy - * objects created with the manager. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * create a new icon instance - * - * Creates a new icon object. This icon can then be attached to a - * xdg_toplevel via the 'set_icon' request. - */ void (*create_icon)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * set an icon on a toplevel window - * - * This request assigns the icon 'icon' to 'toplevel', or clears - * the toplevel icon if 'icon' was null. This state is - * double-buffered and is applied on the next wl_surface.commit of - * the toplevel. - * - * After making this call, the xdg_toplevel_icon_v1 provided as - * 'icon' can be destroyed by the client without 'toplevel' losing - * its icon. The xdg_toplevel_icon_v1 is immutable from this point, - * and any future attempts to change it must raise the - * 'xdg_toplevel_icon_v1.immutable' protocol error. - * - * The compositor must set the toplevel icon from either the pixel - * data the icon provides, or by loading a stock icon using the - * icon name. See the description of 'xdg_toplevel_icon_v1' for - * details. - * - * If 'icon' is set to null, the icon of the respective toplevel is - * reset to its default icon (usually the icon of the application, - * derived from its desktop-entry file, or a placeholder icon). If - * this request is passed an icon with no pixel buffers or icon - * name assigned, the icon must be reset just like if 'icon' was - * null. - * @param toplevel the toplevel to act on - */ void (*set_icon)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *toplevel, @@ -179,45 +93,19 @@ struct xdg_toplevel_icon_manager_v1_interface { #define XDG_TOPLEVEL_ICON_MANAGER_V1_ICON_SIZE 0 #define XDG_TOPLEVEL_ICON_MANAGER_V1_DONE 1 -/** - * @ingroup iface_xdg_toplevel_icon_manager_v1 - */ #define XDG_TOPLEVEL_ICON_MANAGER_V1_ICON_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel_icon_manager_v1 - */ #define XDG_TOPLEVEL_ICON_MANAGER_V1_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel_icon_manager_v1 - */ #define XDG_TOPLEVEL_ICON_MANAGER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel_icon_manager_v1 - */ #define XDG_TOPLEVEL_ICON_MANAGER_V1_CREATE_ICON_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel_icon_manager_v1 - */ #define XDG_TOPLEVEL_ICON_MANAGER_V1_SET_ICON_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel_icon_manager_v1 - * Sends an icon_size event to the client owning the resource. - * @param resource_ The client's resource - * @param size the edge size of the square icon in surface-local coordinates, e.g. 64 - */ static inline void xdg_toplevel_icon_manager_v1_send_icon_size(struct wl_resource *resource_, int32_t size) { wl_resource_post_event(resource_, XDG_TOPLEVEL_ICON_MANAGER_V1_ICON_SIZE, size); } -/** - * @ingroup iface_xdg_toplevel_icon_manager_v1 - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void xdg_toplevel_icon_manager_v1_send_done(struct wl_resource *resource_) { @@ -227,30 +115,14 @@ xdg_toplevel_icon_manager_v1_send_done(struct wl_resource *resource_) #ifndef XDG_TOPLEVEL_ICON_V1_ERROR_ENUM #define XDG_TOPLEVEL_ICON_V1_ERROR_ENUM enum xdg_toplevel_icon_v1_error { - /** - * the provided buffer does not satisfy requirements - */ XDG_TOPLEVEL_ICON_V1_ERROR_INVALID_BUFFER = 1, - /** - * the icon has already been assigned to a toplevel and must not be changed - */ XDG_TOPLEVEL_ICON_V1_ERROR_IMMUTABLE = 2, - /** - * the provided buffer has been destroyed before the toplevel icon - */ XDG_TOPLEVEL_ICON_V1_ERROR_NO_BUFFER = 3, }; -#endif /* XDG_TOPLEVEL_ICON_V1_ERROR_ENUM */ +#endif #ifndef XDG_TOPLEVEL_ICON_V1_ERROR_ENUM_IS_VALID #define XDG_TOPLEVEL_ICON_V1_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_xdg_toplevel_icon_v1 - * Validate a xdg_toplevel_icon_v1 error value. - * - * @return true on success, false on error. - * @ref xdg_toplevel_icon_v1_error - */ static inline bool xdg_toplevel_icon_v1_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -264,77 +136,14 @@ xdg_toplevel_icon_v1_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* XDG_TOPLEVEL_ICON_V1_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_xdg_toplevel_icon_v1 - * @struct xdg_toplevel_icon_v1_interface - */ struct xdg_toplevel_icon_v1_interface { - /** - * destroy the icon object - * - * Destroys the 'xdg_toplevel_icon_v1' object. The icon must - * still remain set on every toplevel it was assigned to, until the - * toplevel icon is reset explicitly. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * set an icon name - * - * This request assigns an icon name to this icon. Any previously - * set name is overridden. - * - * The compositor must resolve 'icon_name' according to the lookup - * rules described in the XDG icon theme specification[1] using the - * environment's current icon theme. - * - * If the compositor does not support icon names or cannot resolve - * 'icon_name' according to the XDG icon theme specification it - * must fall back to using pixel buffer data instead. - * - * If this request is made after the icon has been assigned to a - * toplevel via 'set_icon', an 'immutable' error must be raised. - * - * [1]: - * https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html - */ void (*set_name)(struct wl_client *client, struct wl_resource *resource, const char *icon_name); - /** - * add icon data from a pixel buffer - * - * This request adds pixel data supplied as wl_buffer to the - * icon. - * - * The client should add pixel data for all icon sizes and scales - * that it can provide, or which are explicitly requested by the - * compositor via 'icon_size' events on - * xdg_toplevel_icon_manager_v1. - * - * The wl_buffer supplying pixel data as 'buffer' must be backed by - * wl_shm and must be a square (width and height being equal). If - * any of these buffer requirements are not fulfilled, a - * 'invalid_buffer' error must be raised. - * - * If this icon instance already has a buffer of the same size and - * scale from a previous 'add_buffer' request, data from the last - * request overrides the preexisting pixel data. - * - * The wl_buffer must be kept alive for as long as the - * xdg_toplevel_icon it is associated with is not destroyed, - * otherwise a 'no_buffer' error is raised. The buffer contents - * must not be modified after it was assigned to the icon. As a - * result, the region of the wl_shm_pool's backing storage used for - * the wl_buffer must not be modified after this request is sent. - * The wl_buffer.release event is unused. - * - * If this request is made after the icon has been assigned to a - * toplevel via 'set_icon', an 'immutable' error must be raised. - * @param scale the scaling factor of the icon, e.g. 1 - */ void (*add_buffer)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *buffer, @@ -342,17 +151,8 @@ struct xdg_toplevel_icon_v1_interface { }; -/** - * @ingroup iface_xdg_toplevel_icon_v1 - */ #define XDG_TOPLEVEL_ICON_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel_icon_v1 - */ #define XDG_TOPLEVEL_ICON_V1_SET_NAME_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_toplevel_icon_v1 - */ #define XDG_TOPLEVEL_ICON_V1_ADD_BUFFER_SINCE_VERSION 1 #ifdef __cplusplus diff --git a/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server-core.h b/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server-core.h index 757f6a1f1e..7c53fde661 100644 --- a/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server-core.h +++ b/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server-core.h @@ -43,87 +43,15 @@ enum { WL_EVENT_ERROR = 0x08 }; -/** File descriptor dispatch function type - * - * Functions of this type are used as callbacks for file descriptor events. - * - * \param fd The file descriptor delivering the event. - * \param mask Describes the kind of the event as a bitwise-or of: - * \c WL_EVENT_READABLE, \c WL_EVENT_WRITABLE, \c WL_EVENT_HANGUP, - * \c WL_EVENT_ERROR. - * \param data The user data argument of the related wl_event_loop_add_fd() - * call. - * \return If the event source is registered for re-check with - * wl_event_source_check(): 0 for all done, 1 for needing a re-check. - * If not registered, the return value is ignored and should be zero. - * - * \sa wl_event_loop_add_fd() - * \memberof wl_event_source - */ typedef int (*wl_event_loop_fd_func_t)(int fd, uint32_t mask, void *data); -/** Timer dispatch function type - * - * Functions of this type are used as callbacks for timer expiry. - * - * \param data The user data argument of the related wl_event_loop_add_timer() - * call. - * \return If the event source is registered for re-check with - * wl_event_source_check(): 0 for all done, 1 for needing a re-check. - * If not registered, the return value is ignored and should be zero. - * - * \sa wl_event_loop_add_timer() - * \memberof wl_event_source - */ typedef int (*wl_event_loop_timer_func_t)(void *data); -/** Signal dispatch function type - * - * Functions of this type are used as callbacks for (POSIX) signals. - * - * \param signal_number - * \param data The user data argument of the related wl_event_loop_add_signal() - * call. - * \return If the event source is registered for re-check with - * wl_event_source_check(): 0 for all done, 1 for needing a re-check. - * If not registered, the return value is ignored and should be zero. - * - * \sa wl_event_loop_add_signal() - * \memberof wl_event_source - */ typedef int (*wl_event_loop_signal_func_t)(int signal_number, void *data); -/** Idle task function type - * - * Functions of this type are used as callbacks before blocking in - * wl_event_loop_dispatch(). - * - * \param data The user data argument of the related wl_event_loop_add_idle() - * call. - * - * \sa wl_event_loop_add_idle() wl_event_loop_dispatch() - * \memberof wl_event_source - */ typedef void (*wl_event_loop_idle_func_t)(void *data); -/** \struct wl_event_loop - * - * \brief An event loop context - * - * Usually you create an event loop context, add sources to it, and call - * wl_event_loop_dispatch() in a loop to process events. - * - * \sa wl_event_source - */ -/** \struct wl_event_source - * - * \brief An abstract event source - * - * This is the generic type for fd, timer, signal, and idle sources. - * Functions that operate on specific source types must not be used with - * a different type, even if the function signature allows it. - */ struct wl_event_loop * wl_event_loop_create(void); @@ -266,21 +194,6 @@ wl_global_set_withdrawn_listener(struct wl_global *global, void wl_global_destroy(struct wl_global *global); -/** A filter function for wl_global objects - * - * \param client The client object - * \param global The global object to show or hide - * \param data The user data pointer - * - * A filter function enables the server to decide which globals to - * advertise to each client. - * - * When a wl_global filter is set, the given callback function will be - * called during wl_global advertisement and binding. - * - * This function should return true if the global object should be made - * visible to the client or false otherwise. - */ typedef bool (*wl_display_global_filter_func_t)(const struct wl_client *client, const struct wl_global *global, void *data); @@ -321,7 +234,6 @@ wl_client_get_link(struct wl_client *client); struct wl_client * wl_client_from_link(struct wl_list *link); -/** Iterate over a list of clients. */ #define wl_client_for_each(client, list) \ for (client = wl_client_from_link((list)->next); \ wl_client_get_link(client) != (list); \ @@ -370,7 +282,6 @@ void wl_client_add_resource_created_listener(struct wl_client *client, struct wl_listener *listener); -/** Callback function type for wl_client_for_each_resource() */ typedef enum wl_iterator_result (*wl_client_for_each_resource_iterator_func_t)( struct wl_resource *resource, void *user_data); @@ -393,112 +304,28 @@ wl_client_get_user_data(struct wl_client *client); void wl_client_set_max_buffer_size(struct wl_client *client, size_t max_buffer_size); -/** \class wl_listener - * - * \brief A single listener for Wayland signals - * - * wl_listener provides the means to listen for wl_signal notifications. Many - * Wayland objects use wl_listener for notification of significant events like - * object destruction. - * - * Clients should create wl_listener objects manually and can register them as - * listeners to signals using wl_signal_add(), assuming the signal is - * directly accessible. For opaque structs like wl_event_loop, adding a - * listener should be done through provided accessor methods. A listener can - * only listen to one signal at a time. - * - * \code - * struct wl_listener your_listener; - * - * your_listener.notify = your_callback_method; - * - * // Direct access - * wl_signal_add(&some_object->destroy_signal, &your_listener); - * - * // Accessor access - * wl_event_loop *loop = ...; - * wl_event_loop_add_destroy_listener(loop, &your_listener); - * \endcode - * - * If the listener is part of a larger struct, #wl_container_of can be used - * to retrieve a pointer to it: - * - * \code - * void your_listener(struct wl_listener *listener, void *data) - * { - * struct your_data *data; - * - * your_data = wl_container_of(listener, data, your_member_name); - * } - * \endcode - * - * If you need to remove a listener from a signal, use wl_list_remove(). - * - * \code - * wl_list_remove(&your_listener.link); - * \endcode - * - * \sa wl_signal - */ struct wl_listener { - /** Part of wl_signal::listener_list */ struct wl_list link; - /** Callback function pointer */ wl_notify_func_t notify; }; -/** \class wl_signal - * - * \brief A source of a type of observable event - * - * Signals are recognized points where significant events can be observed. - * Compositors as well as the server can provide signals. Observers are - * wl_listener's that are added through #wl_signal_add. Signals are emitted - * using #wl_signal_emit, which will invoke all listeners until that - * listener is removed by wl_list_remove() (or whenever the signal is - * destroyed). - * - * \sa wl_listener for more information on using wl_signal - */ struct wl_signal { struct wl_list listener_list; }; -/** Initialize a new \ref wl_signal for use. - * - * \param signal The signal that will be initialized - * - * \memberof wl_signal - */ static inline void wl_signal_init(struct wl_signal *signal) { wl_list_init(&signal->listener_list); } -/** Add the specified listener to this signal. - * - * \param signal The signal that will emit events to the listener - * \param listener The listener to add - * - * \memberof wl_signal - */ static inline void wl_signal_add(struct wl_signal *signal, struct wl_listener *listener) { wl_list_insert(signal->listener_list.prev, &listener->link); } -/** Gets the listener struct for the specified callback. - * - * \param signal The signal that contains the specified listener - * \param notify The listener that is the target of this search - * \return the list item that corresponds to the specified listener, or NULL - * if none was found - * - * \memberof wl_signal - */ static inline struct wl_listener * wl_signal_get(struct wl_signal *signal, wl_notify_func_t notify) { @@ -511,13 +338,6 @@ wl_signal_get(struct wl_signal *signal, wl_notify_func_t notify) return NULL; } -/** Emits this signal, notifying all registered listeners. - * - * \param signal The signal object that will emit the signal - * \param data The data that will be emitted with the signal - * - * \memberof wl_signal - */ static inline void wl_signal_emit(struct wl_signal *signal, void *data) { @@ -532,22 +352,6 @@ wl_signal_emit_mutable(struct wl_signal *signal, void *data); typedef void (*wl_resource_destroy_func_t)(struct wl_resource *resource); -/* - * Post an event to the client's object referred to by 'resource'. - * 'opcode' is the event number generated from the protocol XML - * description (the event name). The variable arguments are the event - * parameters, in the order they appear in the protocol XML specification. - * - * The variable arguments' types are: - * - type=uint: uint32_t - * - type=int: int32_t - * - type=fixed: wl_fixed_t - * - type=string: (const char *) to a nil-terminated string - * - type=array: (struct wl_array *) - * - type=fd: int, that is an open file descriptor - * - type=new_id: (struct wl_object *) or (struct wl_resource *) - * - type=object: (struct wl_object *) or (struct wl_resource *) - */ void wl_resource_post_event(struct wl_resource *resource, uint32_t opcode, ...); @@ -723,7 +527,6 @@ struct wl_protocol_logger_message { const union wl_argument *arguments; }; -/** Callback function type for wl_display_add_protocol_logger() */ typedef void (*wl_protocol_logger_func_t)(void *user_data, enum wl_protocol_logger_type direction, const struct wl_protocol_logger_message *message); diff --git a/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server-protocol.h b/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server-protocol.h index 484faff1b1..86ac93f08b 100644 --- a/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server-protocol.h +++ b/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server-protocol.h @@ -1,4 +1,3 @@ -/* Generated by wayland-scanner 1.26.0 */ #ifndef WAYLAND_SERVER_PROTOCOL_H #define WAYLAND_SERVER_PROTOCOL_H @@ -14,34 +13,8 @@ extern "C" { struct wl_client; struct wl_resource; -/** - * @page page_wayland The wayland protocol - * @section page_ifaces_wayland Interfaces - * - @subpage page_iface_wl_display - core global object - * - @subpage page_iface_wl_registry - global registry object - * - @subpage page_iface_wl_callback - callback object - * - @subpage page_iface_wl_compositor - the compositor singleton - * - @subpage page_iface_wl_shm_pool - a shared memory pool - * - @subpage page_iface_wl_shm - shared memory support - * - @subpage page_iface_wl_buffer - content for a wl_surface - * - @subpage page_iface_wl_data_offer - offer to transfer data - * - @subpage page_iface_wl_data_source - offer to transfer data - * - @subpage page_iface_wl_data_device - data transfer device - * - @subpage page_iface_wl_data_device_manager - data transfer interface - * - @subpage page_iface_wl_shell - create desktop-style surfaces - * - @subpage page_iface_wl_shell_surface - desktop-style metadata interface - * - @subpage page_iface_wl_surface - an onscreen surface - * - @subpage page_iface_wl_seat - group of input devices - * - @subpage page_iface_wl_pointer - pointer input device - * - @subpage page_iface_wl_keyboard - keyboard input device - * - @subpage page_iface_wl_touch - touchscreen input device - * - @subpage page_iface_wl_output - compositor output region - * - @subpage page_iface_wl_region - region interface - * - @subpage page_iface_wl_subcompositor - sub-surface compositing - * - @subpage page_iface_wl_subsurface - sub-surface interface to a wl_surface - * - @subpage page_iface_wl_fixes - wayland protocol fixes +/* * @section page_copyright_wayland Copyright - *
  *
  * Copyright © 2008-2011 Kristian Høgsberg
  * Copyright © 2010-2011 Intel Corporation
@@ -67,8 +40,34 @@ struct wl_resource;
  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
- * 
*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + struct wl_buffer; struct wl_callback; struct wl_compositor; @@ -95,904 +94,109 @@ struct wl_touch; #ifndef WL_DISPLAY_INTERFACE #define WL_DISPLAY_INTERFACE -/** - * @page page_iface_wl_display wl_display - * @section page_iface_wl_display_desc Description - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - * @section page_iface_wl_display_api API - * See @ref iface_wl_display. - */ -/** - * @defgroup iface_wl_display The wl_display interface - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - */ extern const struct wl_interface wl_display_interface; #endif #ifndef WL_REGISTRY_INTERFACE #define WL_REGISTRY_INTERFACE -/** - * @page page_iface_wl_registry wl_registry - * @section page_iface_wl_registry_desc Description - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - * @section page_iface_wl_registry_api API - * See @ref iface_wl_registry. - */ -/** - * @defgroup iface_wl_registry The wl_registry interface - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - */ extern const struct wl_interface wl_registry_interface; #endif #ifndef WL_CALLBACK_INTERFACE #define WL_CALLBACK_INTERFACE -/** - * @page page_iface_wl_callback wl_callback - * @section page_iface_wl_callback_desc Description - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - * - * Note, because wl_callback objects are created from multiple independent - * factory interfaces, the wl_callback interface is frozen at version 1. - * @section page_iface_wl_callback_api API - * See @ref iface_wl_callback. - */ -/** - * @defgroup iface_wl_callback The wl_callback interface - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - * - * Note, because wl_callback objects are created from multiple independent - * factory interfaces, the wl_callback interface is frozen at version 1. - */ extern const struct wl_interface wl_callback_interface; #endif #ifndef WL_COMPOSITOR_INTERFACE #define WL_COMPOSITOR_INTERFACE -/** - * @page page_iface_wl_compositor wl_compositor - * @section page_iface_wl_compositor_desc Description - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - * @section page_iface_wl_compositor_api API - * See @ref iface_wl_compositor. - */ -/** - * @defgroup iface_wl_compositor The wl_compositor interface - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - */ extern const struct wl_interface wl_compositor_interface; #endif #ifndef WL_SHM_POOL_INTERFACE #define WL_SHM_POOL_INTERFACE -/** - * @page page_iface_wl_shm_pool wl_shm_pool - * @section page_iface_wl_shm_pool_desc Description - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - * @section page_iface_wl_shm_pool_api API - * See @ref iface_wl_shm_pool. - */ -/** - * @defgroup iface_wl_shm_pool The wl_shm_pool interface - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - */ extern const struct wl_interface wl_shm_pool_interface; #endif #ifndef WL_SHM_INTERFACE #define WL_SHM_INTERFACE -/** - * @page page_iface_wl_shm wl_shm - * @section page_iface_wl_shm_desc Description - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * On binding the wl_shm object one or more format events - * are emitted to inform clients about the valid pixel formats - * that can be used for buffers. - * @section page_iface_wl_shm_api API - * See @ref iface_wl_shm. - */ -/** - * @defgroup iface_wl_shm The wl_shm interface - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * On binding the wl_shm object one or more format events - * are emitted to inform clients about the valid pixel formats - * that can be used for buffers. - */ extern const struct wl_interface wl_shm_interface; #endif #ifndef WL_BUFFER_INTERFACE #define WL_BUFFER_INTERFACE -/** - * @page page_iface_wl_buffer wl_buffer - * @section page_iface_wl_buffer_desc Description - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_shm, wp_linux_buffer_params - * (from the linux-dmabuf protocol extension) or similar. It has a width and - * a height and can be attached to a wl_surface, but the mechanism by which a - * client provides and updates the contents is defined by the buffer factory - * interface. - * - * Color channels are assumed to be electrical rather than optical (in other - * words, encoded with a transfer function) unless otherwise specified. If - * the buffer uses a format that has an alpha channel, the alpha channel is - * assumed to be premultiplied into the electrical color channel values - * (after transfer function encoding) unless otherwise specified. - * - * Note, because wl_buffer objects are created from multiple independent - * factory interfaces, the wl_buffer interface is frozen at version 1. - * @section page_iface_wl_buffer_api API - * See @ref iface_wl_buffer. - */ -/** - * @defgroup iface_wl_buffer The wl_buffer interface - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_shm, wp_linux_buffer_params - * (from the linux-dmabuf protocol extension) or similar. It has a width and - * a height and can be attached to a wl_surface, but the mechanism by which a - * client provides and updates the contents is defined by the buffer factory - * interface. - * - * Color channels are assumed to be electrical rather than optical (in other - * words, encoded with a transfer function) unless otherwise specified. If - * the buffer uses a format that has an alpha channel, the alpha channel is - * assumed to be premultiplied into the electrical color channel values - * (after transfer function encoding) unless otherwise specified. - * - * Note, because wl_buffer objects are created from multiple independent - * factory interfaces, the wl_buffer interface is frozen at version 1. - */ extern const struct wl_interface wl_buffer_interface; #endif #ifndef WL_DATA_OFFER_INTERFACE #define WL_DATA_OFFER_INTERFACE -/** - * @page page_iface_wl_data_offer wl_data_offer - * @section page_iface_wl_data_offer_desc Description - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. The offer - * describes the different mime types that the data can be - * converted to and provides the mechanism for transferring the - * data directly from the source client. - * @section page_iface_wl_data_offer_api API - * See @ref iface_wl_data_offer. - */ -/** - * @defgroup iface_wl_data_offer The wl_data_offer interface - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. The offer - * describes the different mime types that the data can be - * converted to and provides the mechanism for transferring the - * data directly from the source client. - */ extern const struct wl_interface wl_data_offer_interface; #endif #ifndef WL_DATA_SOURCE_INTERFACE #define WL_DATA_SOURCE_INTERFACE -/** - * @page page_iface_wl_data_source wl_data_source - * @section page_iface_wl_data_source_desc Description - * - * The wl_data_source object is the source side of a wl_data_offer. - * It is created by the source client in a data transfer and - * provides a way to describe the offered data and a way to respond - * to requests to transfer the data. - * @section page_iface_wl_data_source_api API - * See @ref iface_wl_data_source. - */ -/** - * @defgroup iface_wl_data_source The wl_data_source interface - * - * The wl_data_source object is the source side of a wl_data_offer. - * It is created by the source client in a data transfer and - * provides a way to describe the offered data and a way to respond - * to requests to transfer the data. - */ extern const struct wl_interface wl_data_source_interface; #endif #ifndef WL_DATA_DEVICE_INTERFACE #define WL_DATA_DEVICE_INTERFACE -/** - * @page page_iface_wl_data_device wl_data_device - * @section page_iface_wl_data_device_desc Description - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - * @section page_iface_wl_data_device_api API - * See @ref iface_wl_data_device. - */ -/** - * @defgroup iface_wl_data_device The wl_data_device interface - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - */ extern const struct wl_interface wl_data_device_interface; #endif #ifndef WL_DATA_DEVICE_MANAGER_INTERFACE #define WL_DATA_DEVICE_MANAGER_INTERFACE -/** - * @page page_iface_wl_data_device_manager wl_data_device_manager - * @section page_iface_wl_data_device_manager_desc Description - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - * @section page_iface_wl_data_device_manager_api API - * See @ref iface_wl_data_device_manager. - */ -/** - * @defgroup iface_wl_data_device_manager The wl_data_device_manager interface - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - */ extern const struct wl_interface wl_data_device_manager_interface; #endif #ifndef WL_SHELL_INTERFACE #define WL_SHELL_INTERFACE -/** - * @page page_iface_wl_shell wl_shell - * @section page_iface_wl_shell_desc Description - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - * - * Note! This protocol is deprecated and not intended for production use. - * For desktop-style user interfaces, use xdg_shell. Compositors and clients - * should not implement this interface. - * @section page_iface_wl_shell_api API - * See @ref iface_wl_shell. - */ -/** - * @defgroup iface_wl_shell The wl_shell interface - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - * - * Note! This protocol is deprecated and not intended for production use. - * For desktop-style user interfaces, use xdg_shell. Compositors and clients - * should not implement this interface. - */ extern const struct wl_interface wl_shell_interface; #endif #ifndef WL_SHELL_SURFACE_INTERFACE #define WL_SHELL_SURFACE_INTERFACE -/** - * @page page_iface_wl_shell_surface wl_shell_surface - * @section page_iface_wl_shell_surface_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides requests to treat surfaces like toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - * @section page_iface_wl_shell_surface_api API - * See @ref iface_wl_shell_surface. - */ -/** - * @defgroup iface_wl_shell_surface The wl_shell_surface interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides requests to treat surfaces like toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - */ extern const struct wl_interface wl_shell_surface_interface; #endif #ifndef WL_SURFACE_INTERFACE #define WL_SURFACE_INTERFACE -/** - * @page page_iface_wl_surface wl_surface - * @section page_iface_wl_surface_desc Description - * - * A surface is a rectangular area that may be displayed on zero - * or more outputs, and shown any number of times at the compositor's - * discretion. They can present wl_buffers, receive user input, and - * define a local coordinate system. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this role - * object before the wl_surface, otherwise a defunct_role_object error is - * sent. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - * @section page_iface_wl_surface_api API - * See @ref iface_wl_surface. - */ -/** - * @defgroup iface_wl_surface The wl_surface interface - * - * A surface is a rectangular area that may be displayed on zero - * or more outputs, and shown any number of times at the compositor's - * discretion. They can present wl_buffers, receive user input, and - * define a local coordinate system. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this role - * object before the wl_surface, otherwise a defunct_role_object error is - * sent. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - */ extern const struct wl_interface wl_surface_interface; #endif #ifndef WL_SEAT_INTERFACE #define WL_SEAT_INTERFACE -/** - * @page page_iface_wl_seat wl_seat - * @section page_iface_wl_seat_desc Description - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - * @section page_iface_wl_seat_api API - * See @ref iface_wl_seat. - */ -/** - * @defgroup iface_wl_seat The wl_seat interface - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - */ extern const struct wl_interface wl_seat_interface; #endif #ifndef WL_POINTER_INTERFACE #define WL_POINTER_INTERFACE -/** - * @page page_iface_wl_pointer wl_pointer - * @section page_iface_wl_pointer_desc Description - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - * @section page_iface_wl_pointer_api API - * See @ref iface_wl_pointer. - */ -/** - * @defgroup iface_wl_pointer The wl_pointer interface - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - */ extern const struct wl_interface wl_pointer_interface; #endif #ifndef WL_KEYBOARD_INTERFACE #define WL_KEYBOARD_INTERFACE -/** - * @page page_iface_wl_keyboard wl_keyboard - * @section page_iface_wl_keyboard_desc Description - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - * - * Each wl_keyboard has the following logical state: - * - * - an active surface (possibly null), - * - the keys currently logically down, - * - the active modifiers, - * - the active group. - * - * By default, the active surface is null, the keys currently logically down - * are empty, the active modifiers and the active group are 0. - * @section page_iface_wl_keyboard_api API - * See @ref iface_wl_keyboard. - */ -/** - * @defgroup iface_wl_keyboard The wl_keyboard interface - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - * - * Each wl_keyboard has the following logical state: - * - * - an active surface (possibly null), - * - the keys currently logically down, - * - the active modifiers, - * - the active group. - * - * By default, the active surface is null, the keys currently logically down - * are empty, the active modifiers and the active group are 0. - */ extern const struct wl_interface wl_keyboard_interface; #endif #ifndef WL_TOUCH_INTERFACE #define WL_TOUCH_INTERFACE -/** - * @page page_iface_wl_touch wl_touch - * @section page_iface_wl_touch_desc Description - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - * @section page_iface_wl_touch_api API - * See @ref iface_wl_touch. - */ -/** - * @defgroup iface_wl_touch The wl_touch interface - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - */ extern const struct wl_interface wl_touch_interface; #endif #ifndef WL_OUTPUT_INTERFACE #define WL_OUTPUT_INTERFACE -/** - * @page page_iface_wl_output wl_output - * @section page_iface_wl_output_desc Description - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - * @section page_iface_wl_output_api API - * See @ref iface_wl_output. - */ -/** - * @defgroup iface_wl_output The wl_output interface - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - */ extern const struct wl_interface wl_output_interface; #endif #ifndef WL_REGION_INTERFACE #define WL_REGION_INTERFACE -/** - * @page page_iface_wl_region wl_region - * @section page_iface_wl_region_desc Description - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - * @section page_iface_wl_region_api API - * See @ref iface_wl_region. - */ -/** - * @defgroup iface_wl_region The wl_region interface - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - */ extern const struct wl_interface wl_region_interface; #endif #ifndef WL_SUBCOMPOSITOR_INTERFACE #define WL_SUBCOMPOSITOR_INTERFACE -/** - * @page page_iface_wl_subcompositor wl_subcompositor - * @section page_iface_wl_subcompositor_desc Description - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - * @section page_iface_wl_subcompositor_api API - * See @ref iface_wl_subcompositor. - */ -/** - * @defgroup iface_wl_subcompositor The wl_subcompositor interface - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - */ extern const struct wl_interface wl_subcompositor_interface; #endif #ifndef WL_SUBSURFACE_INTERFACE #define WL_SUBSURFACE_INTERFACE -/** - * @page page_iface_wl_subsurface wl_subsurface - * @section page_iface_wl_subsurface_desc Description - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * A sub-surface can be in one of two modes. The possible modes are - * synchronized and desynchronized, see methods wl_subsurface.set_sync and - * wl_subsurface.set_desync. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If a surface behaves as in synchronized mode, it is effectively - * synchronized, otherwise it is effectively desynchronized. - * - * A sub-surface is initially in the synchronized mode. - * - * The wl_subsurface interface has requests which modify double-buffered - * state of the parent surface (wl_subsurface.set_position, .place_above and - * .place_below). - * - * Destroying a sub-surface takes effect immediately. If you need to - * synchronize the removal of a sub-surface to the parent surface update, - * unmap the sub-surface first by attaching a NULL wl_buffer, update parent, - * and then destroy the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - * - * A sub-surface never has the keyboard focus of any seat. - * - * The wl_surface.offset request is ignored: clients must use set_position - * instead to move the sub-surface. - * @section page_iface_wl_subsurface_api API - * See @ref iface_wl_subsurface. - */ -/** - * @defgroup iface_wl_subsurface The wl_subsurface interface - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * A sub-surface can be in one of two modes. The possible modes are - * synchronized and desynchronized, see methods wl_subsurface.set_sync and - * wl_subsurface.set_desync. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If a surface behaves as in synchronized mode, it is effectively - * synchronized, otherwise it is effectively desynchronized. - * - * A sub-surface is initially in the synchronized mode. - * - * The wl_subsurface interface has requests which modify double-buffered - * state of the parent surface (wl_subsurface.set_position, .place_above and - * .place_below). - * - * Destroying a sub-surface takes effect immediately. If you need to - * synchronize the removal of a sub-surface to the parent surface update, - * unmap the sub-surface first by attaching a NULL wl_buffer, update parent, - * and then destroy the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - * - * A sub-surface never has the keyboard focus of any seat. - * - * The wl_surface.offset request is ignored: clients must use set_position - * instead to move the sub-surface. - */ extern const struct wl_interface wl_subsurface_interface; #endif #ifndef WL_FIXES_INTERFACE #define WL_FIXES_INTERFACE -/** - * @page page_iface_wl_fixes wl_fixes - * @section page_iface_wl_fixes_desc Description - * - * This global fixes problems with other core-protocol interfaces that - * cannot be fixed in these interfaces themselves. - * @section page_iface_wl_fixes_api API - * See @ref iface_wl_fixes. - */ -/** - * @defgroup iface_wl_fixes The wl_fixes interface - * - * This global fixes problems with other core-protocol interfaces that - * cannot be fixed in these interfaces themselves. - */ extern const struct wl_interface wl_fixes_interface; #endif #ifndef WL_DISPLAY_ERROR_ENUM #define WL_DISPLAY_ERROR_ENUM -/** - * @ingroup iface_wl_display - * global error values - * - * These errors are global and can be emitted in response to any - * server request. - */ enum wl_display_error { - /** - * server couldn't find object - */ WL_DISPLAY_ERROR_INVALID_OBJECT = 0, - /** - * method doesn't exist on the specified interface or malformed request - */ WL_DISPLAY_ERROR_INVALID_METHOD = 1, - /** - * server is out of memory - */ WL_DISPLAY_ERROR_NO_MEMORY = 2, - /** - * implementation error in compositor - */ WL_DISPLAY_ERROR_IMPLEMENTATION = 3, }; -#endif /* WL_DISPLAY_ERROR_ENUM */ +#endif #ifndef WL_DISPLAY_ERROR_ENUM_IS_VALID #define WL_DISPLAY_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_display - * Validate a wl_display error value. - * - * @return true on success, false on error. - * @ref wl_display_error - */ static inline bool wl_display_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1008,47 +212,12 @@ wl_display_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_DISPLAY_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_display - * @struct wl_display_interface - */ struct wl_display_interface { - /** - * asynchronous roundtrip - * - * The sync request asks the server to emit the 'done' event on - * the returned wl_callback object. Since requests are handled - * in-order and events are delivered in-order, this can be used as - * a barrier to ensure all previous requests and the resulting - * events have been handled. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client - * must not attempt to use it after that point. - * - * The callback_data passed in the callback is undefined and should - * be ignored. - * @param callback callback object for the sync request - */ void (*sync)(struct wl_client *client, struct wl_resource *resource, uint32_t callback); - /** - * get global registry object - * - * This request creates a registry object that allows the client - * to list and bind the global objects available from the - * compositor. - * - * It should be noted that the server side resources consumed in - * response to a get_registry request can only be released when the - * client disconnects, not when the client side proxy is destroyed. - * Therefore, clients should invoke get_registry as infrequently as - * possible to avoid wasting memory. - * @param registry global registry object - */ void (*get_registry)(struct wl_client *client, struct wl_resource *resource, uint32_t registry); @@ -1057,39 +226,13 @@ struct wl_display_interface { #define WL_DISPLAY_ERROR 0 #define WL_DISPLAY_DELETE_ID 1 -/** - * @ingroup iface_wl_display - */ #define WL_DISPLAY_ERROR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ #define WL_DISPLAY_DELETE_ID_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ #define WL_DISPLAY_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ #define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_registry - * @struct wl_registry_interface - */ struct wl_registry_interface { - /** - * bind an object to the display - * - * Binds a new, client-created object to the server using the - * specified name as the identifier. - * @param name unique numeric name of the object - * @param interface name of the objects interface - * @param version version of the objects interface - * @param id bound object - */ void (*bind)(struct wl_client *client, struct wl_resource *resource, uint32_t name, @@ -1099,40 +242,17 @@ struct wl_registry_interface { #define WL_REGISTRY_GLOBAL 0 #define WL_REGISTRY_GLOBAL_REMOVE 1 -/** - * @ingroup iface_wl_registry - */ #define WL_REGISTRY_GLOBAL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_registry - */ #define WL_REGISTRY_GLOBAL_REMOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_registry - */ #define WL_REGISTRY_BIND_SINCE_VERSION 1 -/** - * @ingroup iface_wl_registry - * Sends an global event to the client owning the resource. - * @param resource_ The client's resource - * @param name numeric name of the global object - * @param interface interface implemented by the object - * @param version interface version - */ static inline void wl_registry_send_global(struct wl_resource *resource_, uint32_t name, const char *interface, uint32_t version) { wl_resource_post_event(resource_, WL_REGISTRY_GLOBAL, name, interface, version); } -/** - * @ingroup iface_wl_registry - * Sends an global_remove event to the client owning the resource. - * @param resource_ The client's resource - * @param name numeric name of the global object - */ static inline void wl_registry_send_global_remove(struct wl_resource *resource_, uint32_t name) { @@ -1141,101 +261,41 @@ wl_registry_send_global_remove(struct wl_resource *resource_, uint32_t name) #define WL_CALLBACK_DONE 0 -/** - * @ingroup iface_wl_callback - */ #define WL_CALLBACK_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_callback - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - * @param callback_data request-specific data for the callback - */ static inline void wl_callback_send_done(struct wl_resource *resource_, uint32_t callback_data) { wl_resource_post_event(resource_, WL_CALLBACK_DONE, callback_data); } -/** - * @ingroup iface_wl_compositor - * @struct wl_compositor_interface - */ struct wl_compositor_interface { - /** - * create new surface - * - * Ask the compositor to create a new surface. - * @param id the new surface - */ void (*create_surface)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * create new region - * - * Ask the compositor to create a new region. - * @param id the new region - */ void (*create_region)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * destroy wl_compositor - * - * This request destroys the wl_compositor. This has no effect on - * any other objects. - * @since 7 - */ void (*release)(struct wl_client *client, struct wl_resource *resource); }; -/** - * @ingroup iface_wl_compositor - */ #define WL_COMPOSITOR_CREATE_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_compositor - */ #define WL_COMPOSITOR_CREATE_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_compositor - */ #define WL_COMPOSITOR_RELEASE_SINCE_VERSION 7 #ifndef WL_SHM_POOL_ERROR_ENUM #define WL_SHM_POOL_ERROR_ENUM -/** - * @ingroup iface_wl_shm_pool - * wl_shm_pool error values - * - * These errors can be emitted in response to wl_shm_pool requests. - */ enum wl_shm_pool_error { - /** - * buffer format is not known - */ WL_SHM_POOL_ERROR_INVALID_FORMAT = 0, - /** - * invalid size or stride during buffer creation - */ WL_SHM_POOL_ERROR_INVALID_STRIDE = 1, }; -#endif /* WL_SHM_POOL_ERROR_ENUM */ +#endif #ifndef WL_SHM_POOL_ERROR_ENUM_IS_VALID #define WL_SHM_POOL_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_shm_pool - * Validate a wl_shm_pool error value. - * - * @return true on success, false on error. - * @ref wl_shm_pool_error - */ static inline bool wl_shm_pool_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1247,34 +307,9 @@ wl_shm_pool_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_SHM_POOL_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_shm_pool - * @struct wl_shm_pool_interface - */ struct wl_shm_pool_interface { - /** - * create a buffer from the pool - * - * Create a wl_buffer object from the pool. - * - * The buffer is created offset bytes into the pool and has width - * and height as specified. The stride argument specifies the - * number of bytes from the beginning of one row to the beginning - * of the next. The format is the pixel format of the buffer and - * must be one of those advertised through the wl_shm.format event. - * - * A buffer will keep a reference to the pool it was created from - * so it is valid to destroy the pool immediately after creating a - * buffer from it. - * @param id buffer to create - * @param offset buffer byte offset within the pool - * @param width buffer width, in pixels - * @param height buffer height, in pixels - * @param stride number of bytes from the beginning of one row to the beginning of the next row - * @param format buffer pixel format - */ void (*create_buffer)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -1283,84 +318,29 @@ struct wl_shm_pool_interface { int32_t height, int32_t stride, uint32_t format); - /** - * destroy the pool - * - * Destroy the shared memory pool. - * - * The mmapped memory will be released when all buffers that have - * been created from this pool are gone. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * change the size of the pool mapping - * - * This request will cause the server to remap the backing memory - * for the pool from the file descriptor passed when the pool was - * created, but using the new size. This request can only be used - * to make the pool bigger. - * - * This request only changes the amount of bytes that are mmapped - * by the server and does not touch the file corresponding to the - * file descriptor passed at creation time. It is the client's - * responsibility to ensure that the file is at least as big as the - * new pool size. - * @param size new size of the pool, in bytes - */ void (*resize)(struct wl_client *client, struct wl_resource *resource, int32_t size); }; -/** - * @ingroup iface_wl_shm_pool - */ #define WL_SHM_POOL_CREATE_BUFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ #define WL_SHM_POOL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ #define WL_SHM_POOL_RESIZE_SINCE_VERSION 1 #ifndef WL_SHM_ERROR_ENUM #define WL_SHM_ERROR_ENUM -/** - * @ingroup iface_wl_shm - * wl_shm error values - * - * These errors can be emitted in response to wl_shm requests. - */ enum wl_shm_error { - /** - * buffer format is not known - * @deprecated Deprecated since version 3 - */ WL_SHM_ERROR_INVALID_FORMAT = 0, - /** - * invalid size or stride during pool creation - */ WL_SHM_ERROR_INVALID_STRIDE = 1, - /** - * mmapping the file descriptor failed - */ WL_SHM_ERROR_INVALID_FD = 2, }; -#endif /* WL_SHM_ERROR_ENUM */ +#endif #ifndef WL_SHM_ERROR_ENUM_IS_VALID #define WL_SHM_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_shm - * Validate a wl_shm error value. - * - * @return true on success, false on error. - * @ref wl_shm_error - */ static inline bool wl_shm_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -1374,364 +354,94 @@ wl_shm_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_SHM_ERROR_ENUM_IS_VALID */ +#endif #ifndef WL_SHM_FORMAT_ENUM #define WL_SHM_FORMAT_ENUM -/** - * @ingroup iface_wl_shm - * pixel formats - * - * This describes the memory layout of an individual pixel. - * - * All renderers should support argb8888 and xrgb8888 but any other - * formats are optional and may not be supported by the particular - * renderer in use. - * - * The drm format codes match the macros defined in drm_fourcc.h, except - * argb8888 and xrgb8888. The formats actually supported by the compositor - * will be reported by the format event. See drm_fourcc.h for more detailed - * format descriptions. - * - * For all wl_shm formats and unless specified in another protocol - * extension, pre-multiplied alpha is used for pixel values. - */ enum wl_shm_format { - /** - * 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian - */ WL_SHM_FORMAT_ARGB8888 = 0, - /** - * 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian - */ WL_SHM_FORMAT_XRGB8888 = 1, - /** - * 8-bit color index format, [7:0] C - */ WL_SHM_FORMAT_C8 = 0x20203843, - /** - * 8-bit RGB format, [7:0] R:G:B 3:3:2 - */ WL_SHM_FORMAT_RGB332 = 0x38424752, - /** - * 8-bit BGR format, [7:0] B:G:R 2:3:3 - */ WL_SHM_FORMAT_BGR233 = 0x38524742, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian - */ WL_SHM_FORMAT_XRGB4444 = 0x32315258, - /** - * 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian - */ WL_SHM_FORMAT_XBGR4444 = 0x32314258, - /** - * 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian - */ WL_SHM_FORMAT_RGBX4444 = 0x32315852, - /** - * 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian - */ WL_SHM_FORMAT_BGRX4444 = 0x32315842, - /** - * 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian - */ WL_SHM_FORMAT_ARGB4444 = 0x32315241, - /** - * 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian - */ WL_SHM_FORMAT_ABGR4444 = 0x32314241, - /** - * 16-bit RGBA format, [15:0] R:G:B:A 4:4:4:4 little endian - */ WL_SHM_FORMAT_RGBA4444 = 0x32314152, - /** - * 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian - */ WL_SHM_FORMAT_BGRA4444 = 0x32314142, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian - */ WL_SHM_FORMAT_XRGB1555 = 0x35315258, - /** - * 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian - */ WL_SHM_FORMAT_XBGR1555 = 0x35314258, - /** - * 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian - */ WL_SHM_FORMAT_RGBX5551 = 0x35315852, - /** - * 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian - */ WL_SHM_FORMAT_BGRX5551 = 0x35315842, - /** - * 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian - */ WL_SHM_FORMAT_ARGB1555 = 0x35315241, - /** - * 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian - */ WL_SHM_FORMAT_ABGR1555 = 0x35314241, - /** - * 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian - */ WL_SHM_FORMAT_RGBA5551 = 0x35314152, - /** - * 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian - */ WL_SHM_FORMAT_BGRA5551 = 0x35314142, - /** - * 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian - */ WL_SHM_FORMAT_RGB565 = 0x36314752, - /** - * 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian - */ WL_SHM_FORMAT_BGR565 = 0x36314742, - /** - * 24-bit RGB format, [23:0] R:G:B little endian - */ WL_SHM_FORMAT_RGB888 = 0x34324752, - /** - * 24-bit BGR format, [23:0] B:G:R little endian - */ WL_SHM_FORMAT_BGR888 = 0x34324742, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian - */ WL_SHM_FORMAT_XBGR8888 = 0x34324258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian - */ WL_SHM_FORMAT_RGBX8888 = 0x34325852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian - */ WL_SHM_FORMAT_BGRX8888 = 0x34325842, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian - */ WL_SHM_FORMAT_ABGR8888 = 0x34324241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian - */ WL_SHM_FORMAT_RGBA8888 = 0x34324152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian - */ WL_SHM_FORMAT_BGRA8888 = 0x34324142, - /** - * 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian - */ WL_SHM_FORMAT_XRGB2101010 = 0x30335258, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian - */ WL_SHM_FORMAT_XBGR2101010 = 0x30334258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian - */ WL_SHM_FORMAT_RGBX1010102 = 0x30335852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian - */ WL_SHM_FORMAT_BGRX1010102 = 0x30335842, - /** - * 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian - */ WL_SHM_FORMAT_ARGB2101010 = 0x30335241, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian - */ WL_SHM_FORMAT_ABGR2101010 = 0x30334241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian - */ WL_SHM_FORMAT_RGBA1010102 = 0x30334152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian - */ WL_SHM_FORMAT_BGRA1010102 = 0x30334142, - /** - * packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian - */ WL_SHM_FORMAT_YUYV = 0x56595559, - /** - * packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian - */ WL_SHM_FORMAT_YVYU = 0x55595659, - /** - * packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian - */ WL_SHM_FORMAT_UYVY = 0x59565955, - /** - * packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian - */ WL_SHM_FORMAT_VYUY = 0x59555956, - /** - * packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian - */ WL_SHM_FORMAT_AYUV = 0x56555941, - /** - * 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane - */ WL_SHM_FORMAT_NV12 = 0x3231564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane - */ WL_SHM_FORMAT_NV21 = 0x3132564e, - /** - * 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane - */ WL_SHM_FORMAT_NV16 = 0x3631564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane - */ WL_SHM_FORMAT_NV61 = 0x3136564e, - /** - * 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes - */ WL_SHM_FORMAT_YUV410 = 0x39565559, - /** - * 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes - */ WL_SHM_FORMAT_YVU410 = 0x39555659, - /** - * 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes - */ WL_SHM_FORMAT_YUV411 = 0x31315559, - /** - * 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes - */ WL_SHM_FORMAT_YVU411 = 0x31315659, - /** - * 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes - */ WL_SHM_FORMAT_YUV420 = 0x32315559, - /** - * 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes - */ WL_SHM_FORMAT_YVU420 = 0x32315659, - /** - * 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes - */ WL_SHM_FORMAT_YUV422 = 0x36315559, - /** - * 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes - */ WL_SHM_FORMAT_YVU422 = 0x36315659, - /** - * 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes - */ WL_SHM_FORMAT_YUV444 = 0x34325559, - /** - * 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes - */ WL_SHM_FORMAT_YVU444 = 0x34325659, - /** - * [7:0] R - */ WL_SHM_FORMAT_R8 = 0x20203852, - /** - * [15:0] R little endian - */ WL_SHM_FORMAT_R16 = 0x20363152, - /** - * [15:0] R:G 8:8 little endian - */ WL_SHM_FORMAT_RG88 = 0x38384752, - /** - * [15:0] G:R 8:8 little endian - */ WL_SHM_FORMAT_GR88 = 0x38385247, - /** - * [31:0] R:G 16:16 little endian - */ WL_SHM_FORMAT_RG1616 = 0x32334752, - /** - * [31:0] G:R 16:16 little endian - */ WL_SHM_FORMAT_GR1616 = 0x32335247, - /** - * [63:0] x:R:G:B 16:16:16:16 little endian - */ WL_SHM_FORMAT_XRGB16161616F = 0x48345258, - /** - * [63:0] x:B:G:R 16:16:16:16 little endian - */ WL_SHM_FORMAT_XBGR16161616F = 0x48344258, - /** - * [63:0] A:R:G:B 16:16:16:16 little endian - */ WL_SHM_FORMAT_ARGB16161616F = 0x48345241, - /** - * [63:0] A:B:G:R 16:16:16:16 little endian - */ WL_SHM_FORMAT_ABGR16161616F = 0x48344241, - /** - * [31:0] X:Y:Cb:Cr 8:8:8:8 little endian - */ WL_SHM_FORMAT_XYUV8888 = 0x56555958, - /** - * [23:0] Cr:Cb:Y 8:8:8 little endian - */ WL_SHM_FORMAT_VUY888 = 0x34325556, - /** - * Y followed by U then V, 10:10:10. Non-linear modifier only - */ WL_SHM_FORMAT_VUY101010 = 0x30335556, - /** - * [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels - */ WL_SHM_FORMAT_Y210 = 0x30313259, - /** - * [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels - */ WL_SHM_FORMAT_Y212 = 0x32313259, - /** - * [63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels - */ WL_SHM_FORMAT_Y216 = 0x36313259, - /** - * [31:0] A:Cr:Y:Cb 2:10:10:10 little endian - */ WL_SHM_FORMAT_Y410 = 0x30313459, - /** - * [63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian - */ WL_SHM_FORMAT_Y412 = 0x32313459, - /** - * [63:0] A:Cr:Y:Cb 16:16:16:16 little endian - */ WL_SHM_FORMAT_Y416 = 0x36313459, - /** - * [31:0] X:Cr:Y:Cb 2:10:10:10 little endian - */ WL_SHM_FORMAT_XVYU2101010 = 0x30335658, - /** - * [63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian - */ WL_SHM_FORMAT_XVYU12_16161616 = 0x36335658, - /** - * [63:0] X:Cr:Y:Cb 16:16:16:16 little endian - */ WL_SHM_FORMAT_XVYU16161616 = 0x38345658, - /** - * [63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian - */ WL_SHM_FORMAT_Y0L0 = 0x304c3059, - /** - * [63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian - */ WL_SHM_FORMAT_X0L0 = 0x304c3058, - /** - * [63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian - */ WL_SHM_FORMAT_Y0L2 = 0x324c3059, - /** - * [63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian - */ WL_SHM_FORMAT_X0L2 = 0x324c3058, WL_SHM_FORMAT_YUV420_8BIT = 0x38305559, WL_SHM_FORMAT_YUV420_10BIT = 0x30315559, @@ -1743,225 +453,65 @@ enum wl_shm_format { WL_SHM_FORMAT_BGR888_A8 = 0x38413842, WL_SHM_FORMAT_RGB565_A8 = 0x38413552, WL_SHM_FORMAT_BGR565_A8 = 0x38413542, - /** - * non-subsampled Cr:Cb plane - */ WL_SHM_FORMAT_NV24 = 0x3432564e, - /** - * non-subsampled Cb:Cr plane - */ WL_SHM_FORMAT_NV42 = 0x3234564e, - /** - * 2x1 subsampled Cr:Cb plane, 10 bit per channel - */ WL_SHM_FORMAT_P210 = 0x30313250, - /** - * 2x2 subsampled Cr:Cb plane 10 bits per channel - */ WL_SHM_FORMAT_P010 = 0x30313050, - /** - * 2x2 subsampled Cr:Cb plane 12 bits per channel - */ WL_SHM_FORMAT_P012 = 0x32313050, - /** - * 2x2 subsampled Cr:Cb plane 16 bits per channel - */ WL_SHM_FORMAT_P016 = 0x36313050, - /** - * [63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian - */ WL_SHM_FORMAT_AXBXGXRX106106106106 = 0x30314241, - /** - * 2x2 subsampled Cr:Cb plane - */ WL_SHM_FORMAT_NV15 = 0x3531564e, WL_SHM_FORMAT_Q410 = 0x30313451, WL_SHM_FORMAT_Q401 = 0x31303451, - /** - * [63:0] x:R:G:B 16:16:16:16 little endian - */ WL_SHM_FORMAT_XRGB16161616 = 0x38345258, - /** - * [63:0] x:B:G:R 16:16:16:16 little endian - */ WL_SHM_FORMAT_XBGR16161616 = 0x38344258, - /** - * [63:0] A:R:G:B 16:16:16:16 little endian - */ WL_SHM_FORMAT_ARGB16161616 = 0x38345241, - /** - * [63:0] A:B:G:R 16:16:16:16 little endian - */ WL_SHM_FORMAT_ABGR16161616 = 0x38344241, - /** - * [7:0] C0:C1:C2:C3:C4:C5:C6:C7 1:1:1:1:1:1:1:1 eight pixels/byte - */ WL_SHM_FORMAT_C1 = 0x20203143, - /** - * [7:0] C0:C1:C2:C3 2:2:2:2 four pixels/byte - */ WL_SHM_FORMAT_C2 = 0x20203243, - /** - * [7:0] C0:C1 4:4 two pixels/byte - */ WL_SHM_FORMAT_C4 = 0x20203443, - /** - * [7:0] D0:D1:D2:D3:D4:D5:D6:D7 1:1:1:1:1:1:1:1 eight pixels/byte - */ WL_SHM_FORMAT_D1 = 0x20203144, - /** - * [7:0] D0:D1:D2:D3 2:2:2:2 four pixels/byte - */ WL_SHM_FORMAT_D2 = 0x20203244, - /** - * [7:0] D0:D1 4:4 two pixels/byte - */ WL_SHM_FORMAT_D4 = 0x20203444, - /** - * [7:0] D - */ WL_SHM_FORMAT_D8 = 0x20203844, - /** - * [7:0] R0:R1:R2:R3:R4:R5:R6:R7 1:1:1:1:1:1:1:1 eight pixels/byte - */ WL_SHM_FORMAT_R1 = 0x20203152, - /** - * [7:0] R0:R1:R2:R3 2:2:2:2 four pixels/byte - */ WL_SHM_FORMAT_R2 = 0x20203252, - /** - * [7:0] R0:R1 4:4 two pixels/byte - */ WL_SHM_FORMAT_R4 = 0x20203452, - /** - * [15:0] x:R 6:10 little endian - */ WL_SHM_FORMAT_R10 = 0x20303152, - /** - * [15:0] x:R 4:12 little endian - */ WL_SHM_FORMAT_R12 = 0x20323152, - /** - * [31:0] A:Cr:Cb:Y 8:8:8:8 little endian - */ WL_SHM_FORMAT_AVUY8888 = 0x59555641, - /** - * [31:0] X:Cr:Cb:Y 8:8:8:8 little endian - */ WL_SHM_FORMAT_XVUY8888 = 0x59555658, - /** - * 2x2 subsampled Cr:Cb plane 10 bits per channel packed - */ WL_SHM_FORMAT_P030 = 0x30333050, - /** - * [47:0] R:G:B 16:16:16 little endian - */ WL_SHM_FORMAT_RGB161616 = 0x38344752, - /** - * [47:0] B:G:R 16:16:16 little endian - */ WL_SHM_FORMAT_BGR161616 = 0x38344742, - /** - * [15:0] R 16 little endian - */ WL_SHM_FORMAT_R16F = 0x48202052, - /** - * [31:0] G:R 16:16 little endian - */ WL_SHM_FORMAT_GR1616F = 0x48205247, - /** - * [47:0] B:G:R 16:16:16 little endian - */ WL_SHM_FORMAT_BGR161616F = 0x48524742, - /** - * [31:0] R 32 little endian - */ WL_SHM_FORMAT_R32F = 0x46202052, - /** - * [63:0] G:R 32:32 little endian - */ WL_SHM_FORMAT_GR3232F = 0x46205247, - /** - * [95:0] B:G:R 32:32:32 little endian - */ WL_SHM_FORMAT_BGR323232F = 0x46524742, - /** - * [127:0] A:B:G:R 32:32:32:32 little endian - */ WL_SHM_FORMAT_ABGR32323232F = 0x46384241, - /** - * 2x1 subsampled Cr:Cb plane - */ WL_SHM_FORMAT_NV20 = 0x3032564e, - /** - * non-subsampled Cr:Cb plane - */ WL_SHM_FORMAT_NV30 = 0x3033564e, - /** - * 2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel - */ WL_SHM_FORMAT_S010 = 0x30313053, - /** - * 2x1 subsampled Cb (1) and Cr (2) planes 10 bits per channel - */ WL_SHM_FORMAT_S210 = 0x30313253, - /** - * non-subsampled Cb (1) and Cr (2) planes 10 bits per channel - */ WL_SHM_FORMAT_S410 = 0x30313453, - /** - * 2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel - */ WL_SHM_FORMAT_S012 = 0x32313053, - /** - * 2x1 subsampled Cb (1) and Cr (2) planes 12 bits per channel - */ WL_SHM_FORMAT_S212 = 0x32313253, - /** - * non-subsampled Cb (1) and Cr (2) planes 12 bits per channel - */ WL_SHM_FORMAT_S412 = 0x32313453, - /** - * 2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel - */ WL_SHM_FORMAT_S016 = 0x36313053, - /** - * 2x1 subsampled Cb (1) and Cr (2) planes 16 bits per channel - */ WL_SHM_FORMAT_S216 = 0x36313253, - /** - * non-subsampled Cb (1) and Cr (2) planes 16 bits per channel - */ WL_SHM_FORMAT_S416 = 0x36313453, - /** - * [31:0] x:Cr:Cb:Y 2:10:10:10 little endian - */ WL_SHM_FORMAT_XVUY2101010 = 0x30335958, - /** - * 2x1 subsampled Cr:Cb plane 10 bits per channel packed - */ WL_SHM_FORMAT_P230 = 0x30333250, WL_SHM_FORMAT_T430 = 0x30333454, - /** - * 8-bit Y-only - */ WL_SHM_FORMAT_Y8 = 0x59455247, - /** - * [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian - */ WL_SHM_FORMAT_XYYY2101010 = 0x34415059, }; -#endif /* WL_SHM_FORMAT_ENUM */ +#endif #ifndef WL_SHM_FORMAT_ENUM_IS_VALID #define WL_SHM_FORMAT_ENUM_IS_VALID -/** - * @ingroup iface_wl_shm - * Validate a wl_shm format value. - * - * @return true on success, false on error. - * @ref wl_shm_format - */ static inline bool wl_shm_format_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -2265,105 +815,42 @@ wl_shm_format_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_SHM_FORMAT_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_shm - * @struct wl_shm_interface - */ struct wl_shm_interface { - /** - * create a shm pool - * - * Create a new wl_shm_pool object. - * - * The pool can be used to create shared memory based buffer - * objects. The server will mmap size bytes of the passed file - * descriptor, to use as backing memory for the pool. - * @param id pool to create - * @param fd file descriptor for the pool - * @param size pool size, in bytes - */ void (*create_pool)(struct wl_client *client, struct wl_resource *resource, uint32_t id, int32_t fd, int32_t size); - /** - * release the shm object - * - * Using this request a client can tell the server that it is not - * going to use the shm object anymore. - * - * Objects created via this interface remain unaffected. - * @since 2 - */ void (*release)(struct wl_client *client, struct wl_resource *resource); }; #define WL_SHM_FORMAT 0 -/** - * @ingroup iface_wl_shm - */ #define WL_SHM_FORMAT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm - */ #define WL_SHM_CREATE_POOL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm - */ #define WL_SHM_RELEASE_SINCE_VERSION 2 -/** - * @ingroup iface_wl_shm - * Sends an format event to the client owning the resource. - * @param resource_ The client's resource - * @param format buffer pixel format - */ static inline void wl_shm_send_format(struct wl_resource *resource_, uint32_t format) { wl_resource_post_event(resource_, WL_SHM_FORMAT, format); } -/** - * @ingroup iface_wl_buffer - * @struct wl_buffer_interface - */ struct wl_buffer_interface { - /** - * destroy a buffer - * - * Destroy a buffer. If and how you need to release the backing - * storage is defined by the buffer factory interface. - * - * For possible side-effects to a surface, see wl_surface.attach. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); }; #define WL_BUFFER_RELEASE 0 -/** - * @ingroup iface_wl_buffer - */ #define WL_BUFFER_RELEASE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_buffer - */ #define WL_BUFFER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_buffer - * Sends an release event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_buffer_send_release(struct wl_resource *resource_) { @@ -2373,34 +860,15 @@ wl_buffer_send_release(struct wl_resource *resource_) #ifndef WL_DATA_OFFER_ERROR_ENUM #define WL_DATA_OFFER_ERROR_ENUM enum wl_data_offer_error { - /** - * finish request was called untimely - */ WL_DATA_OFFER_ERROR_INVALID_FINISH = 0, - /** - * action mask contains invalid values - */ WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK = 1, - /** - * action argument has an invalid value - */ WL_DATA_OFFER_ERROR_INVALID_ACTION = 2, - /** - * offer doesn't accept this request - */ WL_DATA_OFFER_ERROR_INVALID_OFFER = 3, }; -#endif /* WL_DATA_OFFER_ERROR_ENUM */ +#endif #ifndef WL_DATA_OFFER_ERROR_ENUM_IS_VALID #define WL_DATA_OFFER_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_data_offer - * Validate a wl_data_offer error value. - * - * @return true on success, false on error. - * @ref wl_data_offer_error - */ static inline bool wl_data_offer_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -2416,129 +884,21 @@ wl_data_offer_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_DATA_OFFER_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_data_offer - * @struct wl_data_offer_interface - */ struct wl_data_offer_interface { - /** - * accept one of the offered mime types - * - * Indicate that the client can accept the given mime type, or - * NULL for not accepted. - * - * For objects of version 2 or older, this request is used by the - * client to give feedback whether the client can receive the given - * mime type, or NULL if none is accepted; the feedback does not - * determine whether the drag-and-drop operation succeeds or not. - * - * For objects of version 3 or newer, this request determines the - * final result of the drag-and-drop operation. If the end result - * is that no mime types were accepted, the drag-and-drop operation - * will be cancelled and the corresponding drag source will receive - * wl_data_source.cancelled. Clients may still use this event in - * conjunction with wl_data_source.action for feedback. - * @param serial serial number of the accept request - * @param mime_type mime type accepted by the client - */ void (*accept)(struct wl_client *client, struct wl_resource *resource, uint32_t serial, const char *mime_type); - /** - * request that the data is transferred - * - * To transfer the offered data, the client issues this request - * and indicates the mime type it wants to receive. The transfer - * happens through the passed file descriptor (typically created - * with the pipe system call). The source client writes the data in - * the mime type representation requested and then closes the file - * descriptor. - * - * The receiving client reads from the read end of the pipe until - * EOF and then closes its end, at which point the transfer is - * complete. - * - * This request may happen multiple times for different mime types, - * both before and after wl_data_device.drop. Drag-and-drop - * destination clients may preemptively fetch data or examine it - * more closely to determine acceptance. - * @param mime_type mime type desired by receiver - * @param fd file descriptor for data transfer - */ void (*receive)(struct wl_client *client, struct wl_resource *resource, const char *mime_type, int32_t fd); - /** - * destroy data offer - * - * Destroy the data offer. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * the offer will no longer be used - * - * Notifies the compositor that the drag destination successfully - * finished the drag-and-drop operation. - * - * Upon receiving this request, the compositor will emit - * wl_data_source.dnd_finished on the drag source client. - * - * It is a client error to perform other requests than - * wl_data_offer.destroy after this one. It is also an error to - * perform this request after a NULL mime type has been set in - * wl_data_offer.accept or no action was received through - * wl_data_offer.action. - * - * If wl_data_offer.finish request is received for a non drag and - * drop operation, the invalid_finish protocol error is raised. - * @since 3 - */ void (*finish)(struct wl_client *client, struct wl_resource *resource); - /** - * set the available/preferred drag-and-drop actions - * - * Sets the actions that the destination side client supports for - * this operation. This request may trigger the emission of - * wl_data_source.action and wl_data_offer.action events if the - * compositor needs to change the selected action. - * - * This request can be called multiple times throughout the - * drag-and-drop operation, typically in response to - * wl_data_device.enter or wl_data_device.motion events. - * - * This request determines the final result of the drag-and-drop - * operation. If the end result is that no action is accepted, the - * drag source will receive wl_data_source.cancelled. - * - * The dnd_actions argument must contain only values expressed in - * the wl_data_device_manager.dnd_actions enum, and the - * preferred_action argument must only contain one of those values - * set, otherwise it will result in a protocol error. - * - * While managing an "ask" action, the destination drag-and-drop - * client may perform further wl_data_offer.receive requests, and - * is expected to perform one last wl_data_offer.set_actions - * request with a preferred action other than "ask" (and optionally - * wl_data_offer.accept) before requesting wl_data_offer.finish, in - * order to convey the action selected by the user. If the - * preferred action is not in the wl_data_offer.source_actions - * mask, an error will be raised. - * - * If the "ask" action is dismissed (e.g. user cancellation), the - * client is expected to perform wl_data_offer.destroy right away. - * - * This request can only be made on drag-and-drop offers, a - * protocol error will be raised otherwise. - * @param dnd_actions actions supported by the destination client - * @param preferred_action action preferred by the destination client - * @since 3 - */ void (*set_actions)(struct wl_client *client, struct wl_resource *resource, uint32_t dnd_actions, @@ -2549,70 +909,28 @@ struct wl_data_offer_interface { #define WL_DATA_OFFER_SOURCE_ACTIONS 1 #define WL_DATA_OFFER_ACTION 2 -/** - * @ingroup iface_wl_data_offer - */ #define WL_DATA_OFFER_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ #define WL_DATA_OFFER_SOURCE_ACTIONS_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ #define WL_DATA_OFFER_ACTION_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ #define WL_DATA_OFFER_ACCEPT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ #define WL_DATA_OFFER_RECEIVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ #define WL_DATA_OFFER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ #define WL_DATA_OFFER_FINISH_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ #define WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - * Sends an offer event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type offered mime type - */ static inline void wl_data_offer_send_offer(struct wl_resource *resource_, const char *mime_type) { wl_resource_post_event(resource_, WL_DATA_OFFER_OFFER, mime_type); } -/** - * @ingroup iface_wl_data_offer - * Sends an source_actions event to the client owning the resource. - * @param resource_ The client's resource - * @param source_actions actions offered by the data source - */ static inline void wl_data_offer_send_source_actions(struct wl_resource *resource_, uint32_t source_actions) { wl_resource_post_event(resource_, WL_DATA_OFFER_SOURCE_ACTIONS, source_actions); } -/** - * @ingroup iface_wl_data_offer - * Sends an action event to the client owning the resource. - * @param resource_ The client's resource - * @param dnd_action action selected by the compositor - */ static inline void wl_data_offer_send_action(struct wl_resource *resource_, uint32_t dnd_action) { @@ -2622,26 +940,13 @@ wl_data_offer_send_action(struct wl_resource *resource_, uint32_t dnd_action) #ifndef WL_DATA_SOURCE_ERROR_ENUM #define WL_DATA_SOURCE_ERROR_ENUM enum wl_data_source_error { - /** - * action mask contains invalid values - */ WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK = 0, - /** - * source doesn't accept this request - */ WL_DATA_SOURCE_ERROR_INVALID_SOURCE = 1, }; -#endif /* WL_DATA_SOURCE_ERROR_ENUM */ +#endif #ifndef WL_DATA_SOURCE_ERROR_ENUM_IS_VALID #define WL_DATA_SOURCE_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_data_source - * Validate a wl_data_source error value. - * - * @return true on success, false on error. - * @ref wl_data_source_error - */ static inline bool wl_data_source_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -2653,50 +958,14 @@ wl_data_source_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_DATA_SOURCE_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_data_source - * @struct wl_data_source_interface - */ struct wl_data_source_interface { - /** - * add an offered mime type - * - * This request adds a mime type to the set of mime types - * advertised to targets. Can be called several times to offer - * multiple types. - * @param mime_type mime type offered by the data source - */ void (*offer)(struct wl_client *client, struct wl_resource *resource, const char *mime_type); - /** - * destroy the data source - * - * Destroy the data source. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * set the available drag-and-drop actions - * - * Sets the actions that the source side client supports for this - * operation. This request may trigger wl_data_source.action and - * wl_data_offer.action events if the compositor needs to change - * the selected action. - * - * The dnd_actions argument must contain only values expressed in - * the wl_data_device_manager.dnd_actions enum, otherwise it will - * result in a protocol error. - * - * This request must be made once only, and can only be made on - * sources used in drag-and-drop, so it must be performed before - * wl_data_device.start_drag. Attempting to use the source other - * than for drag-and-drop will raise a protocol error. - * @param dnd_actions actions supported by the data source - * @since 3 - */ void (*set_actions)(struct wl_client *client, struct wl_resource *resource, uint32_t dnd_actions); @@ -2709,108 +978,47 @@ struct wl_data_source_interface { #define WL_DATA_SOURCE_DND_FINISHED 4 #define WL_DATA_SOURCE_ACTION 5 -/** - * @ingroup iface_wl_data_source - */ #define WL_DATA_SOURCE_TARGET_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ #define WL_DATA_SOURCE_SEND_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ #define WL_DATA_SOURCE_CANCELLED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ #define WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ #define WL_DATA_SOURCE_DND_FINISHED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ #define WL_DATA_SOURCE_ACTION_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ #define WL_DATA_SOURCE_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ #define WL_DATA_SOURCE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ #define WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - * Sends an target event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type mime type accepted by the target - */ static inline void wl_data_source_send_target(struct wl_resource *resource_, const char *mime_type) { wl_resource_post_event(resource_, WL_DATA_SOURCE_TARGET, mime_type); } -/** - * @ingroup iface_wl_data_source - * Sends an send event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type mime type for the data - * @param fd file descriptor for the data - */ static inline void wl_data_source_send_send(struct wl_resource *resource_, const char *mime_type, int32_t fd) { wl_resource_post_event(resource_, WL_DATA_SOURCE_SEND, mime_type, fd); } -/** - * @ingroup iface_wl_data_source - * Sends an cancelled event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_data_source_send_cancelled(struct wl_resource *resource_) { wl_resource_post_event(resource_, WL_DATA_SOURCE_CANCELLED); } -/** - * @ingroup iface_wl_data_source - * Sends an dnd_drop_performed event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_data_source_send_dnd_drop_performed(struct wl_resource *resource_) { wl_resource_post_event(resource_, WL_DATA_SOURCE_DND_DROP_PERFORMED); } -/** - * @ingroup iface_wl_data_source - * Sends an dnd_finished event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_data_source_send_dnd_finished(struct wl_resource *resource_) { wl_resource_post_event(resource_, WL_DATA_SOURCE_DND_FINISHED); } -/** - * @ingroup iface_wl_data_source - * Sends an action event to the client owning the resource. - * @param resource_ The client's resource - * @param dnd_action action selected by the compositor - */ static inline void wl_data_source_send_action(struct wl_resource *resource_, uint32_t dnd_action) { @@ -2820,26 +1028,13 @@ wl_data_source_send_action(struct wl_resource *resource_, uint32_t dnd_action) #ifndef WL_DATA_DEVICE_ERROR_ENUM #define WL_DATA_DEVICE_ERROR_ENUM enum wl_data_device_error { - /** - * given wl_surface has another role - */ WL_DATA_DEVICE_ERROR_ROLE = 0, - /** - * source has already been used - */ WL_DATA_DEVICE_ERROR_USED_SOURCE = 1, }; -#endif /* WL_DATA_DEVICE_ERROR_ENUM */ +#endif #ifndef WL_DATA_DEVICE_ERROR_ENUM_IS_VALID #define WL_DATA_DEVICE_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_data_device - * Validate a wl_data_device error value. - * - * @return true on success, false on error. - * @ref wl_data_device_error - */ static inline bool wl_data_device_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -2851,80 +1046,19 @@ wl_data_device_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_DATA_DEVICE_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_data_device - * @struct wl_data_device_interface - */ struct wl_data_device_interface { - /** - * start drag-and-drop operation - * - * This request asks the compositor to start a drag-and-drop - * operation on behalf of the client. - * - * The source argument is the data source that provides the data - * for the eventual data transfer. If source is NULL, enter, leave - * and motion events are sent only to the client that initiated the - * drag and the client is expected to handle the data passing - * internally. If source is destroyed, the drag-and-drop session - * will be cancelled. - * - * The origin surface is the surface where the drag originates and - * the client must have an active implicit grab that matches the - * serial. - * - * The icon surface is an optional (can be NULL) surface that - * provides an icon to be moved around with the cursor. Initially, - * the top-left corner of the icon surface is placed at the cursor - * hotspot, but subsequent wl_surface.offset requests can move the - * relative position. Attach requests must be confirmed with - * wl_surface.commit as usual. The icon surface is given the role - * of a drag-and-drop icon. If the icon surface already has another - * role, it raises a protocol error. - * - * The input region is ignored for wl_surfaces with the role of a - * drag-and-drop icon. - * - * The given source may not be used in any further set_selection or - * start_drag requests. Attempting to reuse a previously-used - * source may send a used_source error. - * @param source data source for the eventual transfer - * @param origin surface where the drag originates - * @param icon drag-and-drop icon surface - * @param serial serial number of the implicit grab on the origin - */ void (*start_drag)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *source, struct wl_resource *origin, struct wl_resource *icon, uint32_t serial); - /** - * copy data to the selection - * - * This request asks the compositor to set the selection to the - * data from the source on behalf of the client. - * - * To unset the selection, set the source to NULL. - * - * The given source may not be used in any further set_selection or - * start_drag requests. Attempting to reuse a previously-used - * source may send a used_source error. - * @param source data source for the selection - * @param serial serial number of the event that triggered this request - */ void (*set_selection)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *source, uint32_t serial); - /** - * destroy data device - * - * This request destroys the data device. - * @since 2 - */ void (*release)(struct wl_client *client, struct wl_resource *resource); }; @@ -2936,114 +1070,47 @@ struct wl_data_device_interface { #define WL_DATA_DEVICE_DROP 4 #define WL_DATA_DEVICE_SELECTION 5 -/** - * @ingroup iface_wl_data_device - */ #define WL_DATA_DEVICE_DATA_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ #define WL_DATA_DEVICE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ #define WL_DATA_DEVICE_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ #define WL_DATA_DEVICE_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ #define WL_DATA_DEVICE_DROP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ #define WL_DATA_DEVICE_SELECTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ #define WL_DATA_DEVICE_START_DRAG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ #define WL_DATA_DEVICE_SET_SELECTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ #define WL_DATA_DEVICE_RELEASE_SINCE_VERSION 2 -/** - * @ingroup iface_wl_data_device - * Sends an data_offer event to the client owning the resource. - * @param resource_ The client's resource - * @param id the new data_offer object - */ static inline void wl_data_device_send_data_offer(struct wl_resource *resource_, struct wl_resource *id) { wl_resource_post_event(resource_, WL_DATA_DEVICE_DATA_OFFER, id); } -/** - * @ingroup iface_wl_data_device - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the enter event - * @param surface client surface entered - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param id source data_offer object - */ static inline void wl_data_device_send_enter(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface, wl_fixed_t x, wl_fixed_t y, struct wl_resource *id) { wl_resource_post_event(resource_, WL_DATA_DEVICE_ENTER, serial, surface, x, y, id); } -/** - * @ingroup iface_wl_data_device - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_data_device_send_leave(struct wl_resource *resource_) { wl_resource_post_event(resource_, WL_DATA_DEVICE_LEAVE); } -/** - * @ingroup iface_wl_data_device - * Sends an motion event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ static inline void wl_data_device_send_motion(struct wl_resource *resource_, uint32_t time, wl_fixed_t x, wl_fixed_t y) { wl_resource_post_event(resource_, WL_DATA_DEVICE_MOTION, time, x, y); } -/** - * @ingroup iface_wl_data_device - * Sends an drop event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_data_device_send_drop(struct wl_resource *resource_) { wl_resource_post_event(resource_, WL_DATA_DEVICE_DROP); } -/** - * @ingroup iface_wl_data_device - * Sends an selection event to the client owning the resource. - * @param resource_ The client's resource - * @param id selection data_offer object - */ static inline void wl_data_device_send_selection(struct wl_resource *resource_, struct wl_resource *id) { @@ -3052,63 +1119,16 @@ wl_data_device_send_selection(struct wl_resource *resource_, struct wl_resource #ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM #define WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM -/** - * @ingroup iface_wl_data_device_manager - * drag and drop actions - * - * This is a bitmask of the available/preferred actions in a - * drag-and-drop operation. - * - * In the compositor, the selected action is a result of matching the - * actions offered by the source and destination sides. "action" events - * with a "none" action will be sent to both source and destination if - * there is no match. All further checks will effectively happen on - * (source actions ∩ destination actions). - * - * In addition, compositors may also pick different actions in - * reaction to key modifiers being pressed. One common design that - * is used in major toolkits (and the behavior recommended for - * compositors) is: - * - * - If no modifiers are pressed, the first match (in bit order) - * will be used. - * - Pressing Shift selects "move", if enabled in the mask. - * - Pressing Control selects "copy", if enabled in the mask. - * - * Behavior beyond that is considered implementation-dependent. - * Compositors may for example bind other modifiers (like Alt/Meta) - * or drags initiated with other buttons than BTN_LEFT to specific - * actions (e.g. "ask"). - */ enum wl_data_device_manager_dnd_action { - /** - * no action - */ WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, - /** - * copy action - */ WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY = 1, - /** - * move action - */ WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE = 2, - /** - * ask action - */ WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK = 4, }; -#endif /* WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM */ +#endif #ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM_IS_VALID #define WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM_IS_VALID -/** - * @ingroup iface_wl_data_device_manager - * Validate a wl_data_device_manager dnd_action value. - * - * @return true on success, false on error. - * @ref wl_data_device_manager_dnd_action - */ static inline bool wl_data_device_manager_dnd_action_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -3122,77 +1142,34 @@ wl_data_device_manager_dnd_action_is_valid(uint32_t value, uint32_t version) { valid |= WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK; return (value & ~valid) == 0; } -#endif /* WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_data_device_manager - * @struct wl_data_device_manager_interface - */ struct wl_data_device_manager_interface { - /** - * create a new data source - * - * Create a new data source. - * @param id data source to create - */ void (*create_data_source)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * create a new data device - * - * Create a new data device for a given seat. - * @param id data device to create - * @param seat seat associated with the data device - */ void (*get_data_device)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *seat); - /** - * destroy wl_data_device_manager - * - * This request destroys the wl_data_device_manager. This has no - * effect on any other objects. - * @since 4 - */ void (*release)(struct wl_client *client, struct wl_resource *resource); }; -/** - * @ingroup iface_wl_data_device_manager - */ #define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device_manager - */ #define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device_manager - */ #define WL_DATA_DEVICE_MANAGER_RELEASE_SINCE_VERSION 4 #ifndef WL_SHELL_ERROR_ENUM #define WL_SHELL_ERROR_ENUM enum wl_shell_error { - /** - * given wl_surface has another role - */ WL_SHELL_ERROR_ROLE = 0, }; -#endif /* WL_SHELL_ERROR_ENUM */ +#endif #ifndef WL_SHELL_ERROR_ENUM_IS_VALID #define WL_SHELL_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_shell - * Validate a wl_shell error value. - * - * @return true on success, false on error. - * @ref wl_shell_error - */ static inline bool wl_shell_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -3202,24 +1179,9 @@ wl_shell_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_SHELL_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_shell - * @struct wl_shell_interface - */ struct wl_shell_interface { - /** - * create a shell surface from a surface - * - * Create a shell surface for an existing surface. This gives the - * wl_surface the role of a shell surface. If the wl_surface - * already has another role, it raises a protocol error. - * - * Only one shell surface can be associated with a given surface. - * @param id shell surface to create - * @param surface surface to be given the shell surface role - */ void (*get_shell_surface)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -3227,71 +1189,25 @@ struct wl_shell_interface { }; -/** - * @ingroup iface_wl_shell - */ #define WL_SHELL_GET_SHELL_SURFACE_SINCE_VERSION 1 #ifndef WL_SHELL_SURFACE_RESIZE_ENUM #define WL_SHELL_SURFACE_RESIZE_ENUM -/** - * @ingroup iface_wl_shell_surface - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. The server may - * use this information to adapt its behavior, e.g. choose - * an appropriate cursor image. - */ enum wl_shell_surface_resize { - /** - * no edge - */ WL_SHELL_SURFACE_RESIZE_NONE = 0, - /** - * top edge - */ WL_SHELL_SURFACE_RESIZE_TOP = 1, - /** - * bottom edge - */ WL_SHELL_SURFACE_RESIZE_BOTTOM = 2, - /** - * left edge - */ WL_SHELL_SURFACE_RESIZE_LEFT = 4, - /** - * top and left edges - */ WL_SHELL_SURFACE_RESIZE_TOP_LEFT = 5, - /** - * bottom and left edges - */ WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT = 6, - /** - * right edge - */ WL_SHELL_SURFACE_RESIZE_RIGHT = 8, - /** - * top and right edges - */ WL_SHELL_SURFACE_RESIZE_TOP_RIGHT = 9, - /** - * bottom and right edges - */ WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT = 10, }; -#endif /* WL_SHELL_SURFACE_RESIZE_ENUM */ +#endif #ifndef WL_SHELL_SURFACE_RESIZE_ENUM_IS_VALID #define WL_SHELL_SURFACE_RESIZE_ENUM_IS_VALID -/** - * @ingroup iface_wl_shell_surface - * Validate a wl_shell_surface resize value. - * - * @return true on success, false on error. - * @ref wl_shell_surface_resize - */ static inline bool wl_shell_surface_resize_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -3315,34 +1231,17 @@ wl_shell_surface_resize_is_valid(uint32_t value, uint32_t version) { valid |= WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT; return (value & ~valid) == 0; } -#endif /* WL_SHELL_SURFACE_RESIZE_ENUM_IS_VALID */ +#endif #ifndef WL_SHELL_SURFACE_TRANSIENT_ENUM #define WL_SHELL_SURFACE_TRANSIENT_ENUM -/** - * @ingroup iface_wl_shell_surface - * details of transient behaviour - * - * These flags specify details of the expected behaviour - * of transient surfaces. Used in the set_transient request. - */ enum wl_shell_surface_transient { - /** - * do not set keyboard focus - */ WL_SHELL_SURFACE_TRANSIENT_INACTIVE = 0x1, }; -#endif /* WL_SHELL_SURFACE_TRANSIENT_ENUM */ +#endif #ifndef WL_SHELL_SURFACE_TRANSIENT_ENUM_IS_VALID #define WL_SHELL_SURFACE_TRANSIENT_ENUM_IS_VALID -/** - * @ingroup iface_wl_shell_surface - * Validate a wl_shell_surface transient value. - * - * @return true on success, false on error. - * @ref wl_shell_surface_transient - */ static inline bool wl_shell_surface_transient_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -3350,47 +1249,20 @@ wl_shell_surface_transient_is_valid(uint32_t value, uint32_t version) { valid |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE; return (value & ~valid) == 0; } -#endif /* WL_SHELL_SURFACE_TRANSIENT_ENUM_IS_VALID */ +#endif #ifndef WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM #define WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM -/** - * @ingroup iface_wl_shell_surface - * different method to set the surface fullscreen - * - * Hints to indicate to the compositor how to deal with a conflict - * between the dimensions of the surface and the dimensions of the - * output. The compositor is free to ignore this parameter. - */ enum wl_shell_surface_fullscreen_method { - /** - * no preference, apply default policy - */ WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT = 0, - /** - * scale, preserve the surface's aspect ratio and center on output - */ WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE = 1, - /** - * switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch - */ WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER = 2, - /** - * no upscaling, center on output and add black borders to compensate size mismatch - */ WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL = 3, }; -#endif /* WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM */ +#endif #ifndef WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM_IS_VALID #define WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM_IS_VALID -/** - * @ingroup iface_wl_shell_surface - * Validate a wl_shell_surface fullscreen_method value. - * - * @return true on success, false on error. - * @ref wl_shell_surface_fullscreen_method - */ static inline bool wl_shell_surface_fullscreen_method_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -3406,160 +1278,34 @@ wl_shell_surface_fullscreen_method_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_shell_surface - * @struct wl_shell_surface_interface - */ struct wl_shell_surface_interface { - /** - * respond to a ping event - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. - * @param serial serial number of the ping event - */ void (*pong)(struct wl_client *client, struct wl_resource *resource, uint32_t serial); - /** - * start an interactive move - * - * Start a pointer-driven move of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * @param seat seat whose pointer is used - * @param serial serial number of the implicit grab on the pointer - */ void (*move)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial); - /** - * start an interactive resize - * - * Start a pointer-driven resizing of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * @param seat seat whose pointer is used - * @param serial serial number of the implicit grab on the pointer - * @param edges which edge or corner is being dragged - */ void (*resize)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial, uint32_t edges); - /** - * make the surface a toplevel surface - * - * Map the surface as a toplevel surface. - * - * A toplevel surface is not fullscreen, maximized or transient. - */ void (*set_toplevel)(struct wl_client *client, struct wl_resource *resource); - /** - * make the surface a transient surface - * - * Map the surface relative to an existing surface. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - * - * The flags argument controls details of the transient behaviour. - * @param parent parent surface - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param flags transient surface behavior - */ void (*set_transient)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *parent, int32_t x, int32_t y, uint32_t flags); - /** - * make the surface a fullscreen surface - * - * Map the surface as a fullscreen surface. - * - * If an output parameter is given then the surface will be made - * fullscreen on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The client may specify a method to resolve a size conflict - * between the output size and the surface size - this is provided - * through the method parameter. - * - * The framerate parameter is used only when the method is set to - * "driver", to indicate the preferred framerate. A value of 0 - * indicates that the client does not care about framerate. The - * framerate is specified in mHz, that is framerate of 60000 is - * 60Hz. - * - * A method of "scale" or "driver" implies a scaling operation of - * the surface, either via a direct scaling operation or a change - * of the output mode. This will override any kind of output - * scaling, so that mapping a surface with a buffer size equal to - * the mode can fill the screen independent of buffer_scale. - * - * A method of "fill" means we don't scale up the buffer, however - * any output scale is applied. This means that you may run into an - * edge case where the application maps a buffer with the same size - * of the output mode but buffer_scale 1 (thus making a surface - * larger than the output). In this case it is allowed to downscale - * the results to fit the screen. - * - * The compositor must reply to this request with a configure event - * with the dimensions for the output on which the surface will be - * made fullscreen. - * @param method method for resolving size conflict - * @param framerate framerate in mHz - * @param output output on which the surface is to be fullscreen - */ void (*set_fullscreen)(struct wl_client *client, struct wl_resource *resource, uint32_t method, uint32_t framerate, struct wl_resource *output); - /** - * make the surface a popup surface - * - * Map the surface as a popup. - * - * A popup surface is a transient surface with an added pointer - * grab. - * - * An existing implicit grab will be changed to owner-events mode, - * and the popup grab will continue after the implicit grab ends - * (i.e. releasing the mouse button does not cause the popup to be - * unmapped). - * - * The popup grab continues until the window is destroyed or a - * mouse button is pressed in any other client's window. A click in - * any of the client's surfaces is reported as normal, however, - * clicks in other clients' surfaces will be discarded and trigger - * the callback. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - * @param seat seat whose pointer is used - * @param serial serial number of the implicit grab on the pointer - * @param parent parent surface - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param flags transient surface behavior - */ void (*set_popup)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, @@ -3568,58 +1314,12 @@ struct wl_shell_surface_interface { int32_t x, int32_t y, uint32_t flags); - /** - * make the surface a maximized surface - * - * Map the surface as a maximized surface. - * - * If an output parameter is given then the surface will be - * maximized on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The compositor will reply with a configure event telling the - * expected new surface size. The operation is completed on the - * next buffer attach to this surface. - * - * A maximized surface typically fills the entire output it is - * bound to, except for desktop elements such as panels. This is - * the main difference between a maximized shell surface and a - * fullscreen shell surface. - * - * The details depend on the compositor implementation. - * @param output output on which the surface is to be maximized - */ void (*set_maximized)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *output); - /** - * set surface title - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - * @param title surface title - */ void (*set_title)(struct wl_client *client, struct wl_resource *resource, const char *title); - /** - * set surface class - * - * Set a class for the surface. - * - * The surface class identifies the general class of applications - * to which the surface belongs. A common convention is to use the - * file name (or the full path if it is a non-standard location) of - * the application's .desktop file as the class. - * @param class_ surface class - */ void (*set_class)(struct wl_client *client, struct wl_resource *resource, const char *class_); @@ -3629,91 +1329,33 @@ struct wl_shell_surface_interface { #define WL_SHELL_SURFACE_CONFIGURE 1 #define WL_SHELL_SURFACE_POPUP_DONE 2 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_PING_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_POPUP_DONE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_PONG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_SET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_SET_TRANSIENT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_SET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ #define WL_SHELL_SURFACE_SET_CLASS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - * Sends an ping event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the ping - */ static inline void wl_shell_surface_send_ping(struct wl_resource *resource_, uint32_t serial) { wl_resource_post_event(resource_, WL_SHELL_SURFACE_PING, serial); } -/** - * @ingroup iface_wl_shell_surface - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - * @param edges how the surface was resized - * @param width new width of the surface - * @param height new height of the surface - */ static inline void wl_shell_surface_send_configure(struct wl_resource *resource_, uint32_t edges, int32_t width, int32_t height) { wl_resource_post_event(resource_, WL_SHELL_SURFACE_CONFIGURE, edges, width, height); } -/** - * @ingroup iface_wl_shell_surface - * Sends an popup_done event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_shell_surface_send_popup_done(struct wl_resource *resource_) { @@ -3722,49 +1364,18 @@ wl_shell_surface_send_popup_done(struct wl_resource *resource_) #ifndef WL_SURFACE_ERROR_ENUM #define WL_SURFACE_ERROR_ENUM -/** - * @ingroup iface_wl_surface - * wl_surface error values - * - * These errors can be emitted in response to wl_surface requests. - */ enum wl_surface_error { - /** - * buffer scale value is invalid - */ WL_SURFACE_ERROR_INVALID_SCALE = 0, - /** - * buffer transform value is invalid - */ WL_SURFACE_ERROR_INVALID_TRANSFORM = 1, - /** - * buffer size is invalid - */ WL_SURFACE_ERROR_INVALID_SIZE = 2, - /** - * buffer offset is invalid - */ WL_SURFACE_ERROR_INVALID_OFFSET = 3, - /** - * surface was destroyed before its role object - */ WL_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT = 4, - /** - * no buffer was attached - */ WL_SURFACE_ERROR_NO_BUFFER = 5, }; -#endif /* WL_SURFACE_ERROR_ENUM */ +#endif #ifndef WL_SURFACE_ERROR_ENUM_IS_VALID #define WL_SURFACE_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_surface - * Validate a wl_surface error value. - * - * @return true on success, false on error. - * @ref wl_surface_error - */ static inline bool wl_surface_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -3784,479 +1395,49 @@ wl_surface_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_SURFACE_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_surface - * @struct wl_surface_interface - */ struct wl_surface_interface { - /** - * delete surface - * - * Deletes the surface and invalidates its object ID. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * set the surface contents - * - * Set a buffer as the content of this surface. - * - * The new size of the surface is calculated based on the buffer - * size transformed by the inverse buffer_transform and the inverse - * buffer_scale. This means that at commit time the supplied buffer - * size must be an integer multiple of the buffer_scale. If that's - * not the case, an invalid_size error is sent. - * - * The x and y arguments specify the location of the new pending - * buffer's upper left corner, relative to the current buffer's - * upper left corner, in surface-local coordinates. In other words, - * the x and y, combined with the new surface size define in which - * directions the surface's size changes. Setting anything other - * than 0 as x and y arguments is discouraged, and should instead - * be replaced with using the separate wl_surface.offset request. - * - * When the bound wl_surface version is 5 or higher, passing any - * non-zero x or y is a protocol violation, and will result in an - * 'invalid_offset' error being raised. The x and y arguments are - * ignored and do not change the pending state. To achieve - * equivalent semantics, use wl_surface.offset. - * - * Surface contents are double-buffered state, see - * wl_surface.commit. - * - * The initial surface contents are void; there is no content. - * wl_surface.attach assigns the given wl_buffer as the pending - * wl_buffer. wl_surface.commit makes the pending wl_buffer the new - * surface contents, and the size of the surface becomes the size - * calculated from the wl_buffer, as described above. After commit, - * there is no pending buffer until the next attach. - * - * Committing a pending wl_buffer allows the compositor to read the - * pixels in the wl_buffer. The compositor may access the pixels at - * any time after the wl_surface.commit request. When the - * compositor will not access the pixels anymore, it will send the - * wl_buffer.release event. Only after receiving wl_buffer.release, - * the client may reuse the wl_buffer. A wl_buffer that has been - * attached and then replaced by another attach instead of - * committed will not receive a release event, and is not used by - * the compositor. - * - * If a pending wl_buffer has been committed to more than one - * wl_surface, the delivery of wl_buffer.release events becomes - * undefined. A well behaved client should not rely on - * wl_buffer.release events in this case. Instead, clients hitting - * this case should use wl_surface.get_release or use a protocol - * extension providing per-commit release notifications (if none of - * these options are available, a fallback can be implemented by - * creating multiple wl_buffer objects from the same backing - * storage). - * - * Destroying the wl_buffer after wl_buffer.release does not change - * the surface contents. Destroying the wl_buffer before - * wl_buffer.release is allowed as long as the underlying buffer - * storage isn't re-used (this can happen e.g. on client process - * termination). However, if the client destroys the wl_buffer - * before receiving the wl_buffer.release event and mutates the - * underlying buffer storage, the surface contents become undefined - * immediately. - * - * If wl_surface.attach is sent with a NULL wl_buffer, the - * following wl_surface.commit will remove the surface content. - * - * If a pending wl_buffer has been destroyed, the result is not - * specified. Many compositors are known to remove the surface - * content on the following wl_surface.commit, but this behaviour - * is not universal. Clients seeking to maximise compatibility - * should not destroy pending buffers and should ensure that they - * explicitly remove content from surfaces, even after destroying - * buffers. - * @param buffer buffer of surface contents - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ void (*attach)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *buffer, int32_t x, int32_t y); - /** - * mark part of the surface damaged - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the - * surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in surface-local coordinates, - * where x and y specify the upper left corner of the damage - * rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage adds pending damage: the new pending damage is - * the union of old pending damage and the given rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * Note! New clients should not use this request. Instead damage - * can be posted with wl_surface.damage_buffer which uses buffer - * coordinates instead of surface coordinates. - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param width width of damage rectangle - * @param height height of damage rectangle - */ void (*damage)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height); - /** - * request a frame throttling hint - * - * Request a notification when it is a good time to start drawing - * a new frame, by creating a frame callback. This is useful for - * throttling redrawing operations, and driving animations. - * - * When a client is animating on a wl_surface, it can use the - * 'frame' request to get notified when it is a good time to draw - * and commit the next frame of animation. If the client commits an - * update earlier than that, it is likely that some updates will - * not make it to the display, and the client is wasting resources - * by drawing too often. - * - * The frame request will take effect on the next - * wl_surface.commit. The notification will only be posted for one - * frame unless requested again. For a wl_surface, the - * notifications are posted in the order the frame requests were - * committed. - * - * The server must send the notifications so that a client will not - * send excessive updates, while still allowing the highest - * possible update rate for clients that wait for the reply before - * drawing again. The server should give some time for the client - * to draw and commit after sending the frame callback events to - * let it hit the next output refresh. - * - * A server should avoid signaling the frame callbacks if the - * surface is not visible in any way, e.g. the surface is - * off-screen, or completely obscured by other opaque surfaces. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client - * must not attempt to use it after that point. - * - * The callback_data passed in the callback is the current time, in - * milliseconds, with an undefined base. - * @param callback callback object for the frame request - */ void (*frame)(struct wl_client *client, struct wl_resource *resource, uint32_t callback); - /** - * set opaque region - * - * This request sets the region of the surface that contains - * opaque content. - * - * The opaque region is an optimization hint for the compositor - * that lets it optimize the redrawing of content behind opaque - * regions. Setting an opaque region is not required for correct - * behaviour, but marking transparent content as opaque will result - * in repaint artifacts. - * - * The opaque region is specified in surface-local coordinates. - * - * The compositor ignores the parts of the opaque region that fall - * outside of the surface. - * - * Opaque region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_opaque_region changes the pending opaque region. - * wl_surface.commit copies the pending region to the current - * region. Otherwise, the pending and current regions are never - * changed. - * - * The initial value for an opaque region is empty. Setting the - * pending opaque region has copy semantics, and the wl_region - * object can be destroyed immediately. A NULL wl_region causes the - * pending opaque region to be set to empty. - * @param region opaque region of the surface - */ void (*set_opaque_region)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *region); - /** - * set input region - * - * This request sets the region of the surface that can receive - * pointer and touch events. - * - * Input events happening outside of this region will try the next - * surface in the server surface stack. The compositor ignores the - * parts of the input region that fall outside of the surface. - * - * The input region is specified in surface-local coordinates. - * - * Input region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_input_region changes the pending input region. - * wl_surface.commit copies the pending region to the current - * region. Otherwise the pending and current regions are never - * changed, except cursor and icon surfaces are special cases, see - * wl_pointer.set_cursor and wl_data_device.start_drag. - * - * The initial value for an input region is infinite. That means - * the whole surface will accept input. Setting the pending input - * region has copy semantics, and the wl_region object can be - * destroyed immediately. A NULL wl_region causes the input region - * to be set to infinite. - * @param region input region of the surface - */ void (*set_input_region)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *region); - /** - * commit pending surface state - * - * Surface state (input, opaque, and damage regions, attached - * buffers, etc.) is double-buffered. Protocol requests modify the - * pending state, as opposed to the active state in use by the - * compositor. - * - * All requests that need a commit to become effective are - * documented to affect double-buffered state. - * - * Other interfaces may add further double-buffered surface state. - * - * A commit request atomically creates a Content Update (CU) from - * the pending state, even if the pending state has not been - * touched. The content update is placed at the end of a - * per-surface queue until it becomes active. After commit, the new - * pending state is as documented for each related request. - * - * A CU is either a Desync Content Update (DCU) or a Sync Content - * Update (SCU). If the surface is effectively synchronized at the - * commit request, it is a SCU, otherwise a DCU. - * - * When a surface transitions from effectively synchronized to - * effectively desynchronized, all SCUs in its queue which are not - * reachable by any DCU become DCUs and dependency edges from - * outside the queue to these CUs are removed. - * - * See wl_subsurface for the definition of 'effectively - * synchronized' and 'effectively desynchronized'. - * - * When a CU is placed in the queue, the CU has a dependency on the - * CU in front of it and to the SCU at end of the queue of every - * direct child surface if that SCU exists and does not have - * another dependent. This can form a directed acyclic graph of CUs - * with dependencies as edges. - * - * In addition to surface state, the CU can have constraints that - * must be satisfied before it can be applied. Other interfaces may - * add CU constraints. - * - * All DCUs which do not have a SCU in front of themselves in their - * queue, are candidates. If the graph that's reachable by a - * candidate does not have any unsatisfied constraints, the entire - * graph must be applied atomically. - * - * When a CU is applied, the wl_buffer is applied before all other - * state. This means that all coordinates in double-buffered state - * are relative to the newly attached wl_buffers, except for - * wl_surface.attach itself. If there is no newly attached - * wl_buffer, the coordinates are relative to the previous content - * update. - */ void (*commit)(struct wl_client *client, struct wl_resource *resource); - /** - * sets the buffer transformation - * - * This request sets the transformation that the client has - * already applied to the content of the buffer. The accepted - * values for the transform parameter are the values for - * wl_output.transform. - * - * The compositor applies the inverse of this transformation - * whenever it uses the buffer contents. - * - * Buffer transform is double-buffered state, see - * wl_surface.commit. - * - * A newly created surface has its buffer transformation set to - * normal. - * - * wl_surface.set_buffer_transform changes the pending buffer - * transformation. wl_surface.commit copies the pending buffer - * transformation to the current one. Otherwise, the pending and - * current values are never changed. - * - * The purpose of this request is to allow clients to render - * content according to the output transform, thus permitting the - * compositor to use certain optimizations even if the display is - * rotated. Using hardware overlays and scanning out a client - * buffer for fullscreen surfaces are examples of such - * optimizations. Those optimizations are highly dependent on the - * compositor implementation, so the use of this request should be - * considered on a case-by-case basis. - * - * Note that if the transform value includes 90 or 270 degree - * rotation, the width of the buffer will become the surface height - * and the height of the buffer will become the surface width. - * - * If transform is not one of the values from the - * wl_output.transform enum the invalid_transform protocol error is - * raised. - * @param transform transform for interpreting buffer contents - * @since 2 - */ void (*set_buffer_transform)(struct wl_client *client, struct wl_resource *resource, int32_t transform); - /** - * sets the buffer scaling factor - * - * This request sets an optional scaling factor on how the - * compositor interprets the contents of the buffer attached to the - * window. - * - * Buffer scale is double-buffered state, see wl_surface.commit. - * - * A newly created surface has its buffer scale set to 1. - * - * wl_surface.set_buffer_scale changes the pending buffer scale. - * wl_surface.commit copies the pending buffer scale to the current - * one. Otherwise, the pending and current values are never - * changed. - * - * The purpose of this request is to allow clients to supply higher - * resolution buffer data for use on high resolution outputs. It is - * intended that you pick the same buffer scale as the scale of the - * output that the surface is displayed on. This means the - * compositor can avoid scaling when rendering the surface on that - * output. - * - * Note that if the scale is larger than 1, then you have to attach - * a buffer that is larger (by a factor of scale in each dimension) - * than the desired surface size. - * - * If scale is not greater than 0 the invalid_scale protocol error - * is raised. - * @param scale scale for interpreting buffer contents - * @since 3 - */ void (*set_buffer_scale)(struct wl_client *client, struct wl_resource *resource, int32_t scale); - /** - * mark part of the surface damaged using buffer coordinates - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the - * surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in buffer coordinates, where x - * and y specify the upper left corner of the damage rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage_buffer adds pending damage: the new pending - * damage is the union of old pending damage and the given - * rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * This request differs from wl_surface.damage in only one way - it - * takes damage in buffer coordinates instead of surface-local - * coordinates. While this generally is more intuitive than surface - * coordinates, it is especially desirable when using wp_viewport - * or when a drawing library (like EGL) is unaware of buffer scale - * and buffer transform. - * - * Note: Because buffer transformation changes and damage requests - * may be interleaved in the protocol stream, it is impossible to - * determine the actual mapping between surface and buffer damage - * until wl_surface.commit time. Therefore, compositors wishing to - * take both kinds of damage into account will have to accumulate - * damage from the two requests separately and only transform from - * one to the other after receiving the wl_surface.commit. - * @param x buffer-local x coordinate - * @param y buffer-local y coordinate - * @param width width of damage rectangle - * @param height height of damage rectangle - * @since 4 - */ void (*damage_buffer)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height); - /** - * set the surface contents offset - * - * The x and y arguments specify the location of the new pending - * buffer's upper left corner, relative to the current buffer's - * upper left corner, in surface-local coordinates. In other words, - * the x and y, combined with the new surface size define in which - * directions the surface's size changes. - * - * The exact semantics of wl_surface.offset are role-specific. - * Refer to the documentation of specific roles for more - * information. - * - * Surface location offset is double-buffered state, see - * wl_surface.commit. - * - * This request is semantically equivalent to and the replaces the - * x and y arguments in the wl_surface.attach request in wl_surface - * versions prior to 5. See wl_surface.attach for details. - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @since 5 - */ void (*offset)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y); - /** - * get a release callback - * - * Create a callback for the release of the buffer attached by - * the client with wl_surface.attach. - * - * The compositor will release the buffer when it has finished its - * usage of the underlying storage for the relevant commit. Once - * the client receives this event, and assuming the associated - * buffer is not pending release from other wl_surface.commit - * requests, the client can safely re-use the buffer. - * - * Release callbacks are double-buffered state, and will be - * associated with the pending buffer at wl_surface.commit time. - * - * The callback_data passed in the wl_callback.done event is unused - * and is always zero. - * - * Sending this request without attaching a non-null buffer in the - * same content update is a protocol error. The compositor will - * send the no_buffer error in this case. - * @param callback callback object for the release - * @since 7 - */ void (*get_release)(struct wl_client *client, struct wl_resource *resource, uint32_t callback); @@ -4267,114 +1448,42 @@ struct wl_surface_interface { #define WL_SURFACE_PREFERRED_BUFFER_SCALE 2 #define WL_SURFACE_PREFERRED_BUFFER_TRANSFORM 3 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION 6 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_PREFERRED_BUFFER_TRANSFORM_SINCE_VERSION 6 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_ATTACH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_DAMAGE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_SET_OPAQUE_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_SET_INPUT_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_COMMIT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_SET_BUFFER_TRANSFORM_SINCE_VERSION 2 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION 3 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION 4 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_OFFSET_SINCE_VERSION 5 -/** - * @ingroup iface_wl_surface - */ #define WL_SURFACE_GET_RELEASE_SINCE_VERSION 7 -/** - * @ingroup iface_wl_surface - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param output output entered by the surface - */ static inline void wl_surface_send_enter(struct wl_resource *resource_, struct wl_resource *output) { wl_resource_post_event(resource_, WL_SURFACE_ENTER, output); } -/** - * @ingroup iface_wl_surface - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - * @param output output left by the surface - */ static inline void wl_surface_send_leave(struct wl_resource *resource_, struct wl_resource *output) { wl_resource_post_event(resource_, WL_SURFACE_LEAVE, output); } -/** - * @ingroup iface_wl_surface - * Sends an preferred_buffer_scale event to the client owning the resource. - * @param resource_ The client's resource - * @param factor preferred scaling factor - */ static inline void wl_surface_send_preferred_buffer_scale(struct wl_resource *resource_, int32_t factor) { wl_resource_post_event(resource_, WL_SURFACE_PREFERRED_BUFFER_SCALE, factor); } -/** - * @ingroup iface_wl_surface - * Sends an preferred_buffer_transform event to the client owning the resource. - * @param resource_ The client's resource - * @param transform preferred transform - */ static inline void wl_surface_send_preferred_buffer_transform(struct wl_resource *resource_, uint32_t transform) { @@ -4383,38 +1492,15 @@ wl_surface_send_preferred_buffer_transform(struct wl_resource *resource_, uint32 #ifndef WL_SEAT_CAPABILITY_ENUM #define WL_SEAT_CAPABILITY_ENUM -/** - * @ingroup iface_wl_seat - * seat capability bitmask - * - * This is a bitmask of capabilities this seat has; if a member is - * set, then it is present on the seat. - */ enum wl_seat_capability { - /** - * the seat has pointer devices - */ WL_SEAT_CAPABILITY_POINTER = 1, - /** - * the seat has one or more keyboards - */ WL_SEAT_CAPABILITY_KEYBOARD = 2, - /** - * the seat has touch devices - */ WL_SEAT_CAPABILITY_TOUCH = 4, }; -#endif /* WL_SEAT_CAPABILITY_ENUM */ +#endif #ifndef WL_SEAT_CAPABILITY_ENUM_IS_VALID #define WL_SEAT_CAPABILITY_ENUM_IS_VALID -/** - * @ingroup iface_wl_seat - * Validate a wl_seat capability value. - * - * @return true on success, false on error. - * @ref wl_seat_capability - */ static inline bool wl_seat_capability_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -4426,33 +1512,17 @@ wl_seat_capability_is_valid(uint32_t value, uint32_t version) { valid |= WL_SEAT_CAPABILITY_TOUCH; return (value & ~valid) == 0; } -#endif /* WL_SEAT_CAPABILITY_ENUM_IS_VALID */ +#endif #ifndef WL_SEAT_ERROR_ENUM #define WL_SEAT_ERROR_ENUM -/** - * @ingroup iface_wl_seat - * wl_seat error values - * - * These errors can be emitted in response to wl_seat requests. - */ enum wl_seat_error { - /** - * get_pointer, get_keyboard or get_touch called on seat without the matching capability - */ WL_SEAT_ERROR_MISSING_CAPABILITY = 0, }; -#endif /* WL_SEAT_ERROR_ENUM */ +#endif #ifndef WL_SEAT_ERROR_ENUM_IS_VALID #define WL_SEAT_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_seat - * Validate a wl_seat error value. - * - * @return true on success, false on error. - * @ref wl_seat_error - */ static inline bool wl_seat_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -4462,68 +1532,18 @@ wl_seat_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_SEAT_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_seat - * @struct wl_seat_interface - */ struct wl_seat_interface { - /** - * return pointer object - * - * The ID provided will be initialized to the wl_pointer - * interface for this seat. - * - * This request only takes effect if the seat has the pointer - * capability, or has had the pointer capability in the past. It is - * a protocol violation to issue this request on a seat that has - * never had the pointer capability. The missing_capability error - * will be sent in this case. - * @param id seat pointer - */ void (*get_pointer)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * return keyboard object - * - * The ID provided will be initialized to the wl_keyboard - * interface for this seat. - * - * This request only takes effect if the seat has the keyboard - * capability, or has had the keyboard capability in the past. It - * is a protocol violation to issue this request on a seat that has - * never had the keyboard capability. The missing_capability error - * will be sent in this case. - * @param id seat keyboard - */ void (*get_keyboard)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * return touch object - * - * The ID provided will be initialized to the wl_touch interface - * for this seat. - * - * This request only takes effect if the seat has the touch - * capability, or has had the touch capability in the past. It is a - * protocol violation to issue this request on a seat that has - * never had the touch capability. The missing_capability error - * will be sent in this case. - * @param id seat touch interface - */ void (*get_touch)(struct wl_client *client, struct wl_resource *resource, uint32_t id); - /** - * release the seat object - * - * Using this request a client can tell the server that it is not - * going to use the seat object anymore. - * @since 5 - */ void (*release)(struct wl_client *client, struct wl_resource *resource); }; @@ -4531,50 +1551,20 @@ struct wl_seat_interface { #define WL_SEAT_CAPABILITIES 0 #define WL_SEAT_NAME 1 -/** - * @ingroup iface_wl_seat - */ #define WL_SEAT_CAPABILITIES_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ #define WL_SEAT_NAME_SINCE_VERSION 2 -/** - * @ingroup iface_wl_seat - */ #define WL_SEAT_GET_POINTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ #define WL_SEAT_GET_KEYBOARD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ #define WL_SEAT_GET_TOUCH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ #define WL_SEAT_RELEASE_SINCE_VERSION 5 -/** - * @ingroup iface_wl_seat - * Sends an capabilities event to the client owning the resource. - * @param resource_ The client's resource - * @param capabilities capabilities of the seat - */ static inline void wl_seat_send_capabilities(struct wl_resource *resource_, uint32_t capabilities) { wl_resource_post_event(resource_, WL_SEAT_CAPABILITIES, capabilities); } -/** - * @ingroup iface_wl_seat - * Sends an name event to the client owning the resource. - * @param resource_ The client's resource - * @param name seat identifier - */ static inline void wl_seat_send_name(struct wl_resource *resource_, const char *name) { @@ -4584,22 +1574,12 @@ wl_seat_send_name(struct wl_resource *resource_, const char *name) #ifndef WL_POINTER_ERROR_ENUM #define WL_POINTER_ERROR_ENUM enum wl_pointer_error { - /** - * given wl_surface has another role - */ WL_POINTER_ERROR_ROLE = 0, }; -#endif /* WL_POINTER_ERROR_ENUM */ +#endif #ifndef WL_POINTER_ERROR_ENUM_IS_VALID #define WL_POINTER_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_pointer - * Validate a wl_pointer error value. - * - * @return true on success, false on error. - * @ref wl_pointer_error - */ static inline bool wl_pointer_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -4609,38 +1589,18 @@ wl_pointer_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_POINTER_ERROR_ENUM_IS_VALID */ +#endif #ifndef WL_POINTER_BUTTON_STATE_ENUM #define WL_POINTER_BUTTON_STATE_ENUM -/** - * @ingroup iface_wl_pointer - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ enum wl_pointer_button_state { - /** - * the button is not pressed - */ WL_POINTER_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ WL_POINTER_BUTTON_STATE_PRESSED = 1, }; -#endif /* WL_POINTER_BUTTON_STATE_ENUM */ +#endif #ifndef WL_POINTER_BUTTON_STATE_ENUM_IS_VALID #define WL_POINTER_BUTTON_STATE_ENUM_IS_VALID -/** - * @ingroup iface_wl_pointer - * Validate a wl_pointer button_state value. - * - * @return true on success, false on error. - * @ref wl_pointer_button_state - */ static inline bool wl_pointer_button_state_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -4652,37 +1612,18 @@ wl_pointer_button_state_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_POINTER_BUTTON_STATE_ENUM_IS_VALID */ +#endif #ifndef WL_POINTER_AXIS_ENUM #define WL_POINTER_AXIS_ENUM -/** - * @ingroup iface_wl_pointer - * axis types - * - * Describes the axis types of scroll events. - */ enum wl_pointer_axis { - /** - * vertical axis - */ WL_POINTER_AXIS_VERTICAL_SCROLL = 0, - /** - * horizontal axis - */ WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, }; -#endif /* WL_POINTER_AXIS_ENUM */ +#endif #ifndef WL_POINTER_AXIS_ENUM_IS_VALID #define WL_POINTER_AXIS_ENUM_IS_VALID -/** - * @ingroup iface_wl_pointer - * Validate a wl_pointer axis value. - * - * @return true on success, false on error. - * @ref wl_pointer_axis - */ static inline bool wl_pointer_axis_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -4694,65 +1635,21 @@ wl_pointer_axis_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_POINTER_AXIS_ENUM_IS_VALID */ +#endif #ifndef WL_POINTER_AXIS_SOURCE_ENUM #define WL_POINTER_AXIS_SOURCE_ENUM -/** - * @ingroup iface_wl_pointer - * axis source types - * - * Describes the source types for axis events. This indicates to the - * client how an axis event was physically generated; a client may - * adjust the user interface accordingly. For example, scroll events - * from a "finger" source may be in a smooth coordinate space with - * kinetic scrolling whereas a "wheel" source may be in discrete steps - * of a number of lines. - * - * The "continuous" axis source is a device generating events in a - * continuous coordinate space, but using something other than a - * finger. One example for this source is button-based scrolling where - * the vertical motion of a device is converted to scroll events while - * a button is held down. - * - * The "wheel tilt" axis source indicates that the actual device is a - * wheel but the scroll event is not caused by a rotation but a - * (usually sideways) tilt of the wheel. - */ enum wl_pointer_axis_source { - /** - * a physical wheel rotation - */ WL_POINTER_AXIS_SOURCE_WHEEL = 0, - /** - * finger on a touch surface - */ WL_POINTER_AXIS_SOURCE_FINGER = 1, - /** - * continuous coordinate space - */ WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, - /** - * a physical wheel tilt - * @since 6 - */ WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, }; -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 -#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ +#endif #ifndef WL_POINTER_AXIS_SOURCE_ENUM_IS_VALID #define WL_POINTER_AXIS_SOURCE_ENUM_IS_VALID -/** - * @ingroup iface_wl_pointer - * Validate a wl_pointer axis_source value. - * - * @return true on success, false on error. - * @ref wl_pointer_axis_source - */ static inline bool wl_pointer_axis_source_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -4768,38 +1665,18 @@ wl_pointer_axis_source_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_POINTER_AXIS_SOURCE_ENUM_IS_VALID */ +#endif #ifndef WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM #define WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM -/** - * @ingroup iface_wl_pointer - * axis relative direction - * - * This specifies the direction of the physical motion that caused a - * wl_pointer.axis event, relative to the wl_pointer.axis direction. - */ enum wl_pointer_axis_relative_direction { - /** - * physical motion matches axis direction - */ WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL = 0, - /** - * physical motion is the inverse of the axis direction - */ WL_POINTER_AXIS_RELATIVE_DIRECTION_INVERTED = 1, }; -#endif /* WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM */ +#endif #ifndef WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM_IS_VALID #define WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM_IS_VALID -/** - * @ingroup iface_wl_pointer - * Validate a wl_pointer axis_relative_direction value. - * - * @return true on success, false on error. - * @ref wl_pointer_axis_relative_direction - */ static inline bool wl_pointer_axis_relative_direction_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -4811,70 +1688,15 @@ wl_pointer_axis_relative_direction_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_pointer - * @struct wl_pointer_interface - */ struct wl_pointer_interface { - /** - * set the pointer surface - * - * Set the pointer surface, i.e., the surface that contains the - * pointer image (cursor). This request gives the surface the role - * of a cursor. If the surface already has another role, it raises - * a protocol error. - * - * The cursor actually changes only if the pointer focus for this - * device is one of the requesting client's surfaces or the surface - * parameter is the current pointer surface. If there was a - * previous surface set with this request it is replaced. If - * surface is NULL, the pointer image is hidden. - * - * The parameters hotspot_x and hotspot_y define the position of - * the pointer surface relative to the pointer location. Its - * top-left corner is always at (x, y) - (hotspot_x, hotspot_y), - * where (x, y) are the coordinates of the pointer location, in - * surface-local coordinates. - * - * On wl_surface.offset requests to the pointer surface, hotspot_x - * and hotspot_y are decremented by the x and y parameters passed - * to the request. The offset must be applied by wl_surface.commit - * as usual. - * - * The hotspot can also be updated by passing the currently set - * pointer surface to this request with new values for hotspot_x - * and hotspot_y. - * - * The input region is ignored for wl_surfaces with the role of a - * cursor. When the use as a cursor ends, the wl_surface is - * unmapped. - * - * The serial parameter must match the latest wl_pointer.enter - * serial number sent to the client. Otherwise the request will be - * ignored. - * @param serial serial number of the enter event - * @param surface pointer surface - * @param hotspot_x surface-local x coordinate - * @param hotspot_y surface-local y coordinate - */ void (*set_cursor)(struct wl_client *client, struct wl_resource *resource, uint32_t serial, struct wl_resource *surface, int32_t hotspot_x, int32_t hotspot_y); - /** - * release the pointer object - * - * Using this request a client can tell the server that it is not - * going to use the pointer object anymore. - * - * This request destroys the pointer proxy object, so clients must - * not call wl_pointer_destroy() after using this request. - * @since 3 - */ void (*release)(struct wl_client *client, struct wl_resource *resource); }; @@ -4892,217 +1714,88 @@ struct wl_pointer_interface { #define WL_POINTER_AXIS_RELATIVE_DIRECTION 10 #define WL_POINTER_WARP 11 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_FRAME_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_AXIS_SOURCE_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_AXIS_STOP_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_AXIS_DISCRETE_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_AXIS_VALUE120_SINCE_VERSION 8 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_AXIS_RELATIVE_DIRECTION_SINCE_VERSION 9 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_WARP_SINCE_VERSION 11 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_SET_CURSOR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ #define WL_POINTER_RELEASE_SINCE_VERSION 3 -/** - * @ingroup iface_wl_pointer - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the enter event - * @param surface surface entered by the pointer - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ static inline void wl_pointer_send_enter(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface, wl_fixed_t surface_x, wl_fixed_t surface_y) { wl_resource_post_event(resource_, WL_POINTER_ENTER, serial, surface, surface_x, surface_y); } -/** - * @ingroup iface_wl_pointer - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the leave event - * @param surface surface left by the pointer - */ static inline void wl_pointer_send_leave(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface) { wl_resource_post_event(resource_, WL_POINTER_LEAVE, serial, surface); } -/** - * @ingroup iface_wl_pointer - * Sends an motion event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ static inline void wl_pointer_send_motion(struct wl_resource *resource_, uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y) { wl_resource_post_event(resource_, WL_POINTER_MOTION, time, surface_x, surface_y); } -/** - * @ingroup iface_wl_pointer - * Sends an button event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the button event - * @param time timestamp with millisecond granularity - * @param button button that produced the event - * @param state physical state of the button - */ static inline void wl_pointer_send_button(struct wl_resource *resource_, uint32_t serial, uint32_t time, uint32_t button, uint32_t state) { wl_resource_post_event(resource_, WL_POINTER_BUTTON, serial, time, button, state); } -/** - * @ingroup iface_wl_pointer - * Sends an axis event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis axis type - * @param value length of vector in surface-local coordinate space - */ static inline void wl_pointer_send_axis(struct wl_resource *resource_, uint32_t time, uint32_t axis, wl_fixed_t value) { wl_resource_post_event(resource_, WL_POINTER_AXIS, time, axis, value); } -/** - * @ingroup iface_wl_pointer - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_pointer_send_frame(struct wl_resource *resource_) { wl_resource_post_event(resource_, WL_POINTER_FRAME); } -/** - * @ingroup iface_wl_pointer - * Sends an axis_source event to the client owning the resource. - * @param resource_ The client's resource - * @param axis_source source of the axis event - */ static inline void wl_pointer_send_axis_source(struct wl_resource *resource_, uint32_t axis_source) { wl_resource_post_event(resource_, WL_POINTER_AXIS_SOURCE, axis_source); } -/** - * @ingroup iface_wl_pointer - * Sends an axis_stop event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis the axis stopped with this event - */ static inline void wl_pointer_send_axis_stop(struct wl_resource *resource_, uint32_t time, uint32_t axis) { wl_resource_post_event(resource_, WL_POINTER_AXIS_STOP, time, axis); } -/** - * @ingroup iface_wl_pointer - * Sends an axis_discrete event to the client owning the resource. - * @param resource_ The client's resource - * @param axis axis type - * @param discrete number of steps - */ static inline void wl_pointer_send_axis_discrete(struct wl_resource *resource_, uint32_t axis, int32_t discrete) { wl_resource_post_event(resource_, WL_POINTER_AXIS_DISCRETE, axis, discrete); } -/** - * @ingroup iface_wl_pointer - * Sends an axis_value120 event to the client owning the resource. - * @param resource_ The client's resource - * @param axis axis type - * @param value120 scroll distance as fraction of 120 - */ static inline void wl_pointer_send_axis_value120(struct wl_resource *resource_, uint32_t axis, int32_t value120) { wl_resource_post_event(resource_, WL_POINTER_AXIS_VALUE120, axis, value120); } -/** - * @ingroup iface_wl_pointer - * Sends an axis_relative_direction event to the client owning the resource. - * @param resource_ The client's resource - * @param axis axis type - * @param direction physical direction relative to axis motion - */ static inline void wl_pointer_send_axis_relative_direction(struct wl_resource *resource_, uint32_t axis, uint32_t direction) { wl_resource_post_event(resource_, WL_POINTER_AXIS_RELATIVE_DIRECTION, axis, direction); } -/** - * @ingroup iface_wl_pointer - * Sends an warp event to the client owning the resource. - * @param resource_ The client's resource - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ static inline void wl_pointer_send_warp(struct wl_resource *resource_, wl_fixed_t surface_x, wl_fixed_t surface_y) { @@ -5111,34 +1804,14 @@ wl_pointer_send_warp(struct wl_resource *resource_, wl_fixed_t surface_x, wl_fix #ifndef WL_KEYBOARD_KEYMAP_FORMAT_ENUM #define WL_KEYBOARD_KEYMAP_FORMAT_ENUM -/** - * @ingroup iface_wl_keyboard - * keyboard mapping format - * - * This specifies the format of the keymap provided to the - * client with the wl_keyboard.keymap event. - */ enum wl_keyboard_keymap_format { - /** - * no keymap; client must understand how to interpret the raw keycode - */ WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0, - /** - * libxkbcommon compatible, null-terminated string; to determine the xkb keycode, clients must add 8 to the key event keycode - */ WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1, }; -#endif /* WL_KEYBOARD_KEYMAP_FORMAT_ENUM */ +#endif #ifndef WL_KEYBOARD_KEYMAP_FORMAT_ENUM_IS_VALID #define WL_KEYBOARD_KEYMAP_FORMAT_ENUM_IS_VALID -/** - * @ingroup iface_wl_keyboard - * Validate a wl_keyboard keymap_format value. - * - * @return true on success, false on error. - * @ref wl_keyboard_keymap_format - */ static inline bool wl_keyboard_keymap_format_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -5150,54 +1823,20 @@ wl_keyboard_keymap_format_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_KEYBOARD_KEYMAP_FORMAT_ENUM_IS_VALID */ +#endif #ifndef WL_KEYBOARD_KEY_STATE_ENUM #define WL_KEYBOARD_KEY_STATE_ENUM -/** - * @ingroup iface_wl_keyboard - * physical key state - * - * Describes the physical state of a key that produced the key event. - * - * Since version 10, the key can be in a "repeated" pseudo-state which - * means the same as "pressed", but is used to signal repetition in the - * key event. - * - * The key may only enter the repeated state after entering the pressed - * state and before entering the released state. This event may be - * generated multiple times while the key is down. - */ enum wl_keyboard_key_state { - /** - * key is not pressed - */ WL_KEYBOARD_KEY_STATE_RELEASED = 0, - /** - * key is pressed - */ WL_KEYBOARD_KEY_STATE_PRESSED = 1, - /** - * key was repeated - * @since 10 - */ WL_KEYBOARD_KEY_STATE_REPEATED = 2, }; -/** - * @ingroup iface_wl_keyboard - */ #define WL_KEYBOARD_KEY_STATE_REPEATED_SINCE_VERSION 10 -#endif /* WL_KEYBOARD_KEY_STATE_ENUM */ +#endif #ifndef WL_KEYBOARD_KEY_STATE_ENUM_IS_VALID #define WL_KEYBOARD_KEY_STATE_ENUM_IS_VALID -/** - * @ingroup iface_wl_keyboard - * Validate a wl_keyboard key_state value. - * - * @return true on success, false on error. - * @ref wl_keyboard_key_state - */ static inline bool wl_keyboard_key_state_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -5211,19 +1850,9 @@ wl_keyboard_key_state_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_KEYBOARD_KEY_STATE_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_keyboard - * @struct wl_keyboard_interface - */ struct wl_keyboard_interface { - /** - * release the keyboard object - * - * - * @since 3 - */ void (*release)(struct wl_client *client, struct wl_resource *resource); }; @@ -5235,132 +1864,52 @@ struct wl_keyboard_interface { #define WL_KEYBOARD_MODIFIERS 4 #define WL_KEYBOARD_REPEAT_INFO 5 -/** - * @ingroup iface_wl_keyboard - */ #define WL_KEYBOARD_KEYMAP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ #define WL_KEYBOARD_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ #define WL_KEYBOARD_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ #define WL_KEYBOARD_KEY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ #define WL_KEYBOARD_MODIFIERS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ #define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 4 -/** - * @ingroup iface_wl_keyboard - */ #define WL_KEYBOARD_RELEASE_SINCE_VERSION 3 -/** - * @ingroup iface_wl_keyboard - * Sends an keymap event to the client owning the resource. - * @param resource_ The client's resource - * @param format keymap format - * @param fd keymap file descriptor - * @param size keymap size, in bytes - */ static inline void wl_keyboard_send_keymap(struct wl_resource *resource_, uint32_t format, int32_t fd, uint32_t size) { wl_resource_post_event(resource_, WL_KEYBOARD_KEYMAP, format, fd, size); } -/** - * @ingroup iface_wl_keyboard - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the enter event - * @param surface surface gaining keyboard focus - * @param keys the keys currently logically down - */ static inline void wl_keyboard_send_enter(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface, struct wl_array *keys) { wl_resource_post_event(resource_, WL_KEYBOARD_ENTER, serial, surface, keys); } -/** - * @ingroup iface_wl_keyboard - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the leave event - * @param surface surface that lost keyboard focus - */ static inline void wl_keyboard_send_leave(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface) { wl_resource_post_event(resource_, WL_KEYBOARD_LEAVE, serial, surface); } -/** - * @ingroup iface_wl_keyboard - * Sends an key event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the key event - * @param time timestamp with millisecond granularity - * @param key key that produced the event - * @param state physical state of the key - */ static inline void wl_keyboard_send_key(struct wl_resource *resource_, uint32_t serial, uint32_t time, uint32_t key, uint32_t state) { wl_resource_post_event(resource_, WL_KEYBOARD_KEY, serial, time, key, state); } -/** - * @ingroup iface_wl_keyboard - * Sends an modifiers event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the modifiers event - * @param mods_depressed depressed modifiers - * @param mods_latched latched modifiers - * @param mods_locked locked modifiers - * @param group keyboard layout - */ static inline void wl_keyboard_send_modifiers(struct wl_resource *resource_, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group) { wl_resource_post_event(resource_, WL_KEYBOARD_MODIFIERS, serial, mods_depressed, mods_latched, mods_locked, group); } -/** - * @ingroup iface_wl_keyboard - * Sends an repeat_info event to the client owning the resource. - * @param resource_ The client's resource - * @param rate the rate of repeating keys in characters per second - * @param delay delay in milliseconds since key down until repeating starts - */ static inline void wl_keyboard_send_repeat_info(struct wl_resource *resource_, int32_t rate, int32_t delay) { wl_resource_post_event(resource_, WL_KEYBOARD_REPEAT_INFO, rate, delay); } -/** - * @ingroup iface_wl_touch - * @struct wl_touch_interface - */ struct wl_touch_interface { - /** - * release the touch object - * - * - * @since 3 - */ void (*release)(struct wl_client *client, struct wl_resource *resource); }; @@ -5373,129 +1922,52 @@ struct wl_touch_interface { #define WL_TOUCH_SHAPE 5 #define WL_TOUCH_ORIENTATION 6 -/** - * @ingroup iface_wl_touch - */ #define WL_TOUCH_DOWN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ #define WL_TOUCH_UP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ #define WL_TOUCH_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ #define WL_TOUCH_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ #define WL_TOUCH_CANCEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ #define WL_TOUCH_SHAPE_SINCE_VERSION 6 -/** - * @ingroup iface_wl_touch - */ #define WL_TOUCH_ORIENTATION_SINCE_VERSION 6 -/** - * @ingroup iface_wl_touch - */ #define WL_TOUCH_RELEASE_SINCE_VERSION 3 -/** - * @ingroup iface_wl_touch - * Sends an down event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the touch down event - * @param time timestamp with millisecond granularity - * @param surface surface touched - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ static inline void wl_touch_send_down(struct wl_resource *resource_, uint32_t serial, uint32_t time, struct wl_resource *surface, int32_t id, wl_fixed_t x, wl_fixed_t y) { wl_resource_post_event(resource_, WL_TOUCH_DOWN, serial, time, surface, id, x, y); } -/** - * @ingroup iface_wl_touch - * Sends an up event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the touch up event - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - */ static inline void wl_touch_send_up(struct wl_resource *resource_, uint32_t serial, uint32_t time, int32_t id) { wl_resource_post_event(resource_, WL_TOUCH_UP, serial, time, id); } -/** - * @ingroup iface_wl_touch - * Sends an motion event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ static inline void wl_touch_send_motion(struct wl_resource *resource_, uint32_t time, int32_t id, wl_fixed_t x, wl_fixed_t y) { wl_resource_post_event(resource_, WL_TOUCH_MOTION, time, id, x, y); } -/** - * @ingroup iface_wl_touch - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_touch_send_frame(struct wl_resource *resource_) { wl_resource_post_event(resource_, WL_TOUCH_FRAME); } -/** - * @ingroup iface_wl_touch - * Sends an cancel event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_touch_send_cancel(struct wl_resource *resource_) { wl_resource_post_event(resource_, WL_TOUCH_CANCEL); } -/** - * @ingroup iface_wl_touch - * Sends an shape event to the client owning the resource. - * @param resource_ The client's resource - * @param id the unique ID of this touch point - * @param major length of the major axis in surface-local coordinates - * @param minor length of the minor axis in surface-local coordinates - */ static inline void wl_touch_send_shape(struct wl_resource *resource_, int32_t id, wl_fixed_t major, wl_fixed_t minor) { wl_resource_post_event(resource_, WL_TOUCH_SHAPE, id, major, minor); } -/** - * @ingroup iface_wl_touch - * Sends an orientation event to the client owning the resource. - * @param resource_ The client's resource - * @param id the unique ID of this touch point - * @param orientation angle between major axis and positive surface y-axis in degrees - */ static inline void wl_touch_send_orientation(struct wl_resource *resource_, int32_t id, wl_fixed_t orientation) { @@ -5504,50 +1976,18 @@ wl_touch_send_orientation(struct wl_resource *resource_, int32_t id, wl_fixed_t #ifndef WL_OUTPUT_SUBPIXEL_ENUM #define WL_OUTPUT_SUBPIXEL_ENUM -/** - * @ingroup iface_wl_output - * subpixel geometry information - * - * This enumeration describes how the physical - * pixels on an output are laid out. - */ enum wl_output_subpixel { - /** - * unknown geometry - */ WL_OUTPUT_SUBPIXEL_UNKNOWN = 0, - /** - * no geometry - */ WL_OUTPUT_SUBPIXEL_NONE = 1, - /** - * horizontal RGB - */ WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB = 2, - /** - * horizontal BGR - */ WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR = 3, - /** - * vertical RGB - */ WL_OUTPUT_SUBPIXEL_VERTICAL_RGB = 4, - /** - * vertical BGR - */ WL_OUTPUT_SUBPIXEL_VERTICAL_BGR = 5, }; -#endif /* WL_OUTPUT_SUBPIXEL_ENUM */ +#endif #ifndef WL_OUTPUT_SUBPIXEL_ENUM_IS_VALID #define WL_OUTPUT_SUBPIXEL_ENUM_IS_VALID -/** - * @ingroup iface_wl_output - * Validate a wl_output subpixel value. - * - * @return true on success, false on error. - * @ref wl_output_subpixel - */ static inline bool wl_output_subpixel_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -5567,70 +2007,24 @@ wl_output_subpixel_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_OUTPUT_SUBPIXEL_ENUM_IS_VALID */ +#endif #ifndef WL_OUTPUT_TRANSFORM_ENUM #define WL_OUTPUT_TRANSFORM_ENUM -/** - * @ingroup iface_wl_output - * transformation applied to buffer contents - * - * This describes transformations that clients and compositors apply to - * buffer contents. - * - * The flipped values correspond to an initial flip around a - * vertical axis followed by rotation. - * - * The purpose is mainly to allow clients to render accordingly and - * tell the compositor, so that for fullscreen surfaces, the - * compositor will still be able to scan out directly from client - * surfaces. - */ enum wl_output_transform { - /** - * no transform - */ WL_OUTPUT_TRANSFORM_NORMAL = 0, - /** - * 90 degrees counter-clockwise - */ WL_OUTPUT_TRANSFORM_90 = 1, - /** - * 180 degrees counter-clockwise - */ WL_OUTPUT_TRANSFORM_180 = 2, - /** - * 270 degrees counter-clockwise - */ WL_OUTPUT_TRANSFORM_270 = 3, - /** - * 180 degree flip around a vertical axis - */ WL_OUTPUT_TRANSFORM_FLIPPED = 4, - /** - * flip and rotate 90 degrees counter-clockwise - */ WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5, - /** - * flip and rotate 180 degrees counter-clockwise - */ WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6, - /** - * flip and rotate 270 degrees counter-clockwise - */ WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7, }; -#endif /* WL_OUTPUT_TRANSFORM_ENUM */ +#endif #ifndef WL_OUTPUT_TRANSFORM_ENUM_IS_VALID #define WL_OUTPUT_TRANSFORM_ENUM_IS_VALID -/** - * @ingroup iface_wl_output - * Validate a wl_output transform value. - * - * @return true on success, false on error. - * @ref wl_output_transform - */ static inline bool wl_output_transform_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -5654,38 +2048,18 @@ wl_output_transform_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_OUTPUT_TRANSFORM_ENUM_IS_VALID */ +#endif #ifndef WL_OUTPUT_MODE_ENUM #define WL_OUTPUT_MODE_ENUM -/** - * @ingroup iface_wl_output - * mode information - * - * These flags describe properties of an output mode. - * They are used in the flags bitfield of the mode event. - */ enum wl_output_mode { - /** - * indicates this is the current mode - */ WL_OUTPUT_MODE_CURRENT = 0x1, - /** - * indicates this is the preferred mode - */ WL_OUTPUT_MODE_PREFERRED = 0x2, }; -#endif /* WL_OUTPUT_MODE_ENUM */ +#endif #ifndef WL_OUTPUT_MODE_ENUM_IS_VALID #define WL_OUTPUT_MODE_ENUM_IS_VALID -/** - * @ingroup iface_wl_output - * Validate a wl_output mode value. - * - * @return true on success, false on error. - * @ref wl_output_mode - */ static inline bool wl_output_mode_is_valid(uint32_t value, uint32_t version) { uint32_t valid = 0; @@ -5695,20 +2069,9 @@ wl_output_mode_is_valid(uint32_t value, uint32_t version) { valid |= WL_OUTPUT_MODE_PREFERRED; return (value & ~valid) == 0; } -#endif /* WL_OUTPUT_MODE_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_output - * @struct wl_output_interface - */ struct wl_output_interface { - /** - * release the output object - * - * Using this request a client can tell the server that it is not - * going to use the output object anymore. - * @since 3 - */ void (*release)(struct wl_client *client, struct wl_resource *resource); }; @@ -5720,153 +2083,60 @@ struct wl_output_interface { #define WL_OUTPUT_NAME 4 #define WL_OUTPUT_DESCRIPTION 5 -/** - * @ingroup iface_wl_output - */ #define WL_OUTPUT_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ #define WL_OUTPUT_MODE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ #define WL_OUTPUT_DONE_SINCE_VERSION 2 -/** - * @ingroup iface_wl_output - */ #define WL_OUTPUT_SCALE_SINCE_VERSION 2 -/** - * @ingroup iface_wl_output - */ #define WL_OUTPUT_NAME_SINCE_VERSION 4 -/** - * @ingroup iface_wl_output - */ #define WL_OUTPUT_DESCRIPTION_SINCE_VERSION 4 -/** - * @ingroup iface_wl_output - */ #define WL_OUTPUT_RELEASE_SINCE_VERSION 3 -/** - * @ingroup iface_wl_output - * Sends an geometry event to the client owning the resource. - * @param resource_ The client's resource - * @param x x position within the global compositor space - * @param y y position within the global compositor space - * @param physical_width width in millimeters of the output - * @param physical_height height in millimeters of the output - * @param subpixel subpixel orientation of the output - * @param make textual description of the manufacturer - * @param model textual description of the model - * @param transform additional transformation applied to buffer contents during presentation - */ static inline void wl_output_send_geometry(struct wl_resource *resource_, int32_t x, int32_t y, int32_t physical_width, int32_t physical_height, int32_t subpixel, const char *make, const char *model, int32_t transform) { wl_resource_post_event(resource_, WL_OUTPUT_GEOMETRY, x, y, physical_width, physical_height, subpixel, make, model, transform); } -/** - * @ingroup iface_wl_output - * Sends an mode event to the client owning the resource. - * @param resource_ The client's resource - * @param flags bitfield of mode flags - * @param width width of the mode in hardware units - * @param height height of the mode in hardware units - * @param refresh vertical refresh rate in mHz - */ static inline void wl_output_send_mode(struct wl_resource *resource_, uint32_t flags, int32_t width, int32_t height, int32_t refresh) { wl_resource_post_event(resource_, WL_OUTPUT_MODE, flags, width, height, refresh); } -/** - * @ingroup iface_wl_output - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - */ static inline void wl_output_send_done(struct wl_resource *resource_) { wl_resource_post_event(resource_, WL_OUTPUT_DONE); } -/** - * @ingroup iface_wl_output - * Sends an scale event to the client owning the resource. - * @param resource_ The client's resource - * @param factor scaling factor of output - */ static inline void wl_output_send_scale(struct wl_resource *resource_, int32_t factor) { wl_resource_post_event(resource_, WL_OUTPUT_SCALE, factor); } -/** - * @ingroup iface_wl_output - * Sends an name event to the client owning the resource. - * @param resource_ The client's resource - * @param name output name - */ static inline void wl_output_send_name(struct wl_resource *resource_, const char *name) { wl_resource_post_event(resource_, WL_OUTPUT_NAME, name); } -/** - * @ingroup iface_wl_output - * Sends an description event to the client owning the resource. - * @param resource_ The client's resource - * @param description output description - */ static inline void wl_output_send_description(struct wl_resource *resource_, const char *description) { wl_resource_post_event(resource_, WL_OUTPUT_DESCRIPTION, description); } -/** - * @ingroup iface_wl_region - * @struct wl_region_interface - */ struct wl_region_interface { - /** - * destroy region - * - * Destroy the region. This will invalidate the object ID. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * add rectangle to region - * - * Add the specified rectangle to the region. - * @param x region-local x coordinate - * @param y region-local y coordinate - * @param width rectangle width - * @param height rectangle height - */ void (*add)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height); - /** - * subtract rectangle from region - * - * Subtract the specified rectangle from the region. - * @param x region-local x coordinate - * @param y region-local y coordinate - * @param width rectangle width - * @param height rectangle height - */ void (*subtract)(struct wl_client *client, struct wl_resource *resource, int32_t x, @@ -5876,42 +2146,20 @@ struct wl_region_interface { }; -/** - * @ingroup iface_wl_region - */ #define WL_REGION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ #define WL_REGION_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ #define WL_REGION_SUBTRACT_SINCE_VERSION 1 #ifndef WL_SUBCOMPOSITOR_ERROR_ENUM #define WL_SUBCOMPOSITOR_ERROR_ENUM enum wl_subcompositor_error { - /** - * the to-be sub-surface is invalid - */ WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0, - /** - * the to-be sub-surface parent is invalid - */ WL_SUBCOMPOSITOR_ERROR_BAD_PARENT = 1, }; -#endif /* WL_SUBCOMPOSITOR_ERROR_ENUM */ +#endif #ifndef WL_SUBCOMPOSITOR_ERROR_ENUM_IS_VALID #define WL_SUBCOMPOSITOR_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_subcompositor - * Validate a wl_subcompositor error value. - * - * @return true on success, false on error. - * @ref wl_subcompositor_error - */ static inline bool wl_subcompositor_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -5923,49 +2171,11 @@ wl_subcompositor_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_SUBCOMPOSITOR_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_subcompositor - * @struct wl_subcompositor_interface - */ struct wl_subcompositor_interface { - /** - * unbind from the subcompositor interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * wl_subsurface objects included. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * give a surface the role sub-surface - * - * Create a sub-surface interface for the given surface, and - * associate it with the given parent surface. This turns a plain - * wl_surface into a sub-surface. - * - * The to-be sub-surface must not already have another role, and it - * must not have an existing wl_subsurface object. Otherwise the - * bad_surface protocol error is raised. - * - * Adding sub-surfaces to a parent is a double-buffered operation - * on the parent (see wl_surface.commit). The effect of adding a - * sub-surface becomes visible on the next time the state of the - * parent surface is applied. - * - * The parent surface must not be one of the child surface's - * descendants, and the parent must be different from the child - * surface, otherwise the bad_parent protocol error is raised. - * - * This request modifies the behaviour of wl_surface.commit request - * on the sub-surface, see the documentation on wl_subsurface - * interface. - * @param id the new sub-surface object ID - * @param surface the surface to be turned into a sub-surface - * @param parent the parent surface - */ void (*get_subsurface)(struct wl_client *client, struct wl_resource *resource, uint32_t id, @@ -5974,34 +2184,18 @@ struct wl_subcompositor_interface { }; -/** - * @ingroup iface_wl_subcompositor - */ #define WL_SUBCOMPOSITOR_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subcompositor - */ #define WL_SUBCOMPOSITOR_GET_SUBSURFACE_SINCE_VERSION 1 #ifndef WL_SUBSURFACE_ERROR_ENUM #define WL_SUBSURFACE_ERROR_ENUM enum wl_subsurface_error { - /** - * wl_surface is not a sibling or the parent - */ WL_SUBSURFACE_ERROR_BAD_SURFACE = 0, }; -#endif /* WL_SUBSURFACE_ERROR_ENUM */ +#endif #ifndef WL_SUBSURFACE_ERROR_ENUM_IS_VALID #define WL_SUBSURFACE_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_subsurface - * Validate a wl_subsurface error value. - * - * @return true on success, false on error. - * @ref wl_subsurface_error - */ static inline bool wl_subsurface_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -6011,149 +2205,44 @@ wl_subsurface_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_SUBSURFACE_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_subsurface - * @struct wl_subsurface_interface - */ struct wl_subsurface_interface { - /** - * remove sub-surface interface - * - * The sub-surface interface is removed from the wl_surface - * object that was turned into a sub-surface with a - * wl_subcompositor.get_subsurface request. The wl_surface's - * association to the parent is deleted. The wl_surface is unmapped - * immediately. - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * reposition the sub-surface - * - * This sets the position of the sub-surface, relative to the - * parent surface. - * - * The sub-surface will be moved so that its origin (top left - * corner pixel) will be at the location x, y of the parent surface - * coordinate system. The coordinates are not restricted to the - * parent surface area. Negative values are allowed. - * - * The initial position is 0, 0. - * - * Position is double-buffered state on the parent surface, see - * wl_subsurface and wl_surface.commit for more information. - * @param x x coordinate in the parent surface - * @param y y coordinate in the parent surface - */ void (*set_position)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y); - /** - * restack the sub-surface - * - * This sub-surface is taken from the stack, and put back just - * above the reference surface, changing the z-order of the - * sub-surfaces. The reference surface must be one of the sibling - * surfaces, or the parent surface. Using any other surface, - * including this sub-surface, will cause a protocol error. - * - * A new sub-surface is initially added as the top-most in the - * stack of its siblings and parent. - * - * Z-order is double-buffered state on the parent surface, see - * wl_subsurface and wl_surface.commit for more information. - * @param sibling the reference surface - */ void (*place_above)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *sibling); - /** - * restack the sub-surface - * - * The sub-surface is placed just below the reference surface. - * - * See wl_subsurface.place_above. - * @param sibling the reference surface - */ void (*place_below)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *sibling); - /** - * set sub-surface to synchronized mode - * - * Change the commit behaviour of the sub-surface to synchronized - * mode. - * - * See wl_subsurface and wl_surface.commit for more information. - */ void (*set_sync)(struct wl_client *client, struct wl_resource *resource); - /** - * set sub-surface to desynchronized mode - * - * Change the commit behaviour of the sub-surface to - * desynchronized mode. - * - * See wl_subsurface and wl_surface.commit for more information. - */ void (*set_desync)(struct wl_client *client, struct wl_resource *resource); }; -/** - * @ingroup iface_wl_subsurface - */ #define WL_SUBSURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ #define WL_SUBSURFACE_SET_POSITION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ #define WL_SUBSURFACE_PLACE_ABOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ #define WL_SUBSURFACE_PLACE_BELOW_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ #define WL_SUBSURFACE_SET_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ #define WL_SUBSURFACE_SET_DESYNC_SINCE_VERSION 1 #ifndef WL_FIXES_ERROR_ENUM #define WL_FIXES_ERROR_ENUM -/** - * @ingroup iface_wl_fixes - * wl_fixes error values - * - * These errors can be emitted in response to wl_fixes requests. - */ enum wl_fixes_error { - /** - * unknown global or the global is not removed - */ WL_FIXES_ERROR_INVALID_ACK_REMOVE = 0, }; -#endif /* WL_FIXES_ERROR_ENUM */ +#endif #ifndef WL_FIXES_ERROR_ENUM_IS_VALID #define WL_FIXES_ERROR_ENUM_IS_VALID -/** - * @ingroup iface_wl_fixes - * Validate a wl_fixes error value. - * - * @return true on success, false on error. - * @ref wl_fixes_error - */ static inline bool wl_fixes_error_is_valid(uint32_t value, uint32_t version) { switch (value) { @@ -6163,68 +2252,14 @@ wl_fixes_error_is_valid(uint32_t value, uint32_t version) { return false; } } -#endif /* WL_FIXES_ERROR_ENUM_IS_VALID */ +#endif -/** - * @ingroup iface_wl_fixes - * @struct wl_fixes_interface - */ struct wl_fixes_interface { - /** - * destroys this object - * - * - */ void (*destroy)(struct wl_client *client, struct wl_resource *resource); - /** - * destroy a wl_registry - * - * This request destroys a wl_registry object. - * - * The client should no longer use the wl_registry after making - * this request. - * - * The compositor will emit a wl_display.delete_id event with the - * object ID of the registry and will no longer emit any events on - * the registry. The client should re-use the object ID once it - * receives the wl_display.delete_id event. - * @param registry the registry to destroy - */ void (*destroy_registry)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *registry); - /** - * acknowledge global removal - * - * Acknowledge the removal of the specified global. - * - * If no global with the specified name exists or the global is not - * removed, the wl_fixes.invalid_ack_remove protocol error will be - * posted. - * - * Due to the Wayland protocol being asynchronous, the wl_global - * objects cannot be destroyed immediately. For example, if a - * wl_global is removed and a client attempts to bind that global - * around same time, it can result in a protocol error due to an - * unknown global name in the bind request. - * - * In order to avoid crashing clients, the compositor should remove - * the wl_global once it is guaranteed that no more bind requests - * will come. - * - * The wl_fixes.ack_global_remove() request is used to signal to - * the compositor that the client will not bind the given global - * anymore. After all clients acknowledge the removal of the - * global, the compositor can safely destroy it. - * - * The client must call the wl_fixes.ack_global_remove() request in - * response to a wl_registry.global_remove() event even if it did - * not bind the corresponding global. - * @param registry the registry object - * @param name unique name of the global - * @since 2 - */ void (*ack_global_remove)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *registry, @@ -6232,17 +2267,8 @@ struct wl_fixes_interface { }; -/** - * @ingroup iface_wl_fixes - */ #define WL_FIXES_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_fixes - */ #define WL_FIXES_DESTROY_REGISTRY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_fixes - */ #define WL_FIXES_ACK_GLOBAL_REMOVE_SINCE_VERSION 2 #ifdef __cplusplus diff --git a/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server.h b/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server.h index 48fab1ddac..6a45c5b587 100644 --- a/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server.h +++ b/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-server.h @@ -23,15 +23,6 @@ * SOFTWARE. */ -/** \file - * - * \brief Include the server API, deprecations and protocol C API. - * - * \warning Use of this header file is discouraged. Prefer including - * wayland-server-core.h instead, which does not include the - * server protocol header and as such only defines the library - * API, excluding the deprecated API below. - */ #ifndef WAYLAND_SERVER_H #define WAYLAND_SERVER_H @@ -43,16 +34,6 @@ extern "C" { #endif -/* - * The user can set this macro to hide the wl_object, wl_resource and wl_buffer - * objects alongside the associated API. - * - * The structs were meant to be opaque, although we missed that in the early days. - * - * NOTE: the list of structs, functions, etc in this section MUST NEVER GROW. - * Otherwise we will break forward compatibility and applications that used to - * build fine will no longer be able to do so. - */ #ifndef WL_HIDE_DEPRECATED struct wl_object { diff --git a/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-util.h b/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-util.h index 98c72fdeda..d411ddd4f5 100644 --- a/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-util.h +++ b/app/src/main/cpp/waylandcomp/prebuilt/include/wayland-util.h @@ -23,10 +23,6 @@ * SOFTWARE. */ -/** \file wayland-util.h - * - * \brief Utility classes, functions, and macros. - */ #ifndef WAYLAND_UTIL_H #define WAYLAND_UTIL_H @@ -40,14 +36,12 @@ extern "C" { #endif -/** Visibility attribute */ #if defined(__GNUC__) && __GNUC__ >= 4 #define WL_EXPORT __attribute__ ((visibility("default"))) #else #define WL_EXPORT #endif -/** Deprecated attribute */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || (defined(__cplusplus) && __cplusplus >= 201402L) #define WL_DEPRECATED [[deprecated]] #elif defined(__GNUC__) && __GNUC__ >= 4 @@ -56,14 +50,6 @@ extern "C" { #define WL_DEPRECATED #endif -/** - * Printf-style argument attribute - * - * \param x Ordinality of the format string argument - * \param y Ordinality of the argument to check against the format string - * - * \sa https://gcc.gnu.org/onlinedocs/gcc-3.2.1/gcc/Function-Attributes.html - */ #if defined(__GNUC__) && __GNUC__ >= 4 #define WL_PRINTF(x, y) __attribute__((__format__(__printf__, x, y))) #else @@ -76,405 +62,57 @@ extern "C" { #define WL_TYPEOF(expr) __typeof__(expr) #endif -/** \class wl_object - * - * \brief A protocol object. - * - * A `wl_object` is an opaque struct identifying the protocol object - * underlying a `wl_proxy` or `wl_resource`. - * - * \note Functions accessing a `wl_object` are not normally used by client code. - * Clients should normally use the higher level interface generated by the - * scanner to interact with compositor objects. - * - */ struct wl_object; -/** - * The maximum size of a protocol message. - * - * If a message size exceeds this value, the connection will be dropped. - * Servers will send an invalid_method error before disconnecting. - */ #define WL_MAX_MESSAGE_SIZE 4096 -/** - * Protocol message signature - * - * A wl_message describes the signature of an actual protocol message, such as a - * request or event, that adheres to the Wayland protocol wire format. The - * protocol implementation uses a wl_message within its demarshal machinery for - * decoding messages between a compositor and its clients. In a sense, a - * wl_message is to a protocol message like a class is to an object. - * - * The `name` of a wl_message is the name of the corresponding protocol message. - * - * The `signature` is an ordered list of symbols representing the data types - * of message arguments and, optionally, a protocol version and indicators for - * nullability. A leading integer in the `signature` indicates the _since_ - * version of the protocol message. A `?` preceding a data type symbol indicates - * that the following argument type is nullable. While it is a protocol violation - * to send messages with non-nullable arguments set to `NULL`, event handlers in - * clients might still get called with non-nullable object arguments set to - * `NULL`. This can happen when the client destroyed the object being used as - * argument on its side and an event referencing that object was sent before the - * server knew about its destruction. As this race cannot be prevented, clients - * should - as a general rule - program their event handlers such that they can - * handle object arguments declared non-nullable being `NULL` gracefully. - * - * When no arguments accompany a message, `signature` is an empty string. - * - * Symbols: - * - * * `i`: int - * * `u`: uint - * * `f`: fixed - * * `s`: string - * * `o`: object - * * `n`: new_id - * * `a`: array - * * `h`: fd - * * `?`: following argument (`o` or `s`) is nullable - * - * While demarshaling primitive arguments is straightforward, when demarshaling - * messages containing `object` or `new_id` arguments, the protocol - * implementation often must determine the type of the object. The `types` of a - * wl_message is an array of wl_interface references that correspond to `o` and - * `n` arguments in `signature`, with `NULL` placeholders for arguments with - * non-object types. - * - * Consider the protocol event wl_display `delete_id` that has a single `uint` - * argument. The wl_message is: - * - * \code - * { "delete_id", "u", [NULL] } - * \endcode - * - * Here, the message `name` is `"delete_id"`, the `signature` is `"u"`, and the - * argument `types` is `[NULL]`, indicating that the `uint` argument has no - * corresponding wl_interface since it is a primitive argument. - * - * In contrast, consider a `wl_foo` interface supporting protocol request `bar` - * that has existed since version 2, and has two arguments: a `uint` and an - * object of type `wl_baz_interface` that may be `NULL`. Such a `wl_message` - * might be: - * - * \code - * { "bar", "2u?o", [NULL, &wl_baz_interface] } - * \endcode - * - * Here, the message `name` is `"bar"`, and the `signature` is `"2u?o"`. Notice - * how the `2` indicates the protocol version, the `u` indicates the first - * argument type is `uint`, and the `?o` indicates that the second argument - * is an object that may be `NULL`. Lastly, the argument `types` array indicates - * that no wl_interface corresponds to the first argument, while the type - * `wl_baz_interface` corresponds to the second argument. - * - * \sa wl_argument - * \sa wl_interface - * \sa Wire Format - */ struct wl_message { - /** Message name */ const char *name; - /** Message signature */ const char *signature; - /** Object argument interfaces */ const struct wl_interface **types; }; -/** - * Protocol object interface - * - * A wl_interface describes the API of a protocol object defined in the Wayland - * protocol specification. The protocol implementation uses a wl_interface - * within its marshalling machinery for encoding client requests. - * - * The `name` of a wl_interface is the name of the corresponding protocol - * interface, and `version` represents the version of the interface. The members - * `method_count` and `event_count` represent the number of `methods` (requests) - * and `events` in the respective wl_message members. - * - * For example, consider a protocol interface `foo`, marked as version `1`, with - * two requests and one event. - * - * \code{.xml} - * - * - * - * - * - * \endcode - * - * Given two wl_message arrays `foo_requests` and `foo_events`, a wl_interface - * for `foo` might be: - * - * \code - * struct wl_interface foo_interface = { - * "foo", 1, - * 2, foo_requests, - * 1, foo_events - * }; - * \endcode - * - * \note The server side of the protocol may define interface implementation - * types that incorporate the term `interface` in their name. Take - * care to not confuse these server-side `struct`s with a wl_interface - * variable whose name also ends in `interface`. For example, while the - * server may define a type `struct wl_foo_interface`, the client may - * define a `struct wl_interface wl_foo_interface`. - * - * \sa wl_message - * \sa wl_proxy - * \sa Interfaces - * \sa Versioning - */ struct wl_interface { - /** Interface name */ const char *name; - /** Interface version */ int version; - /** Number of methods (requests) */ int method_count; - /** Method (request) signatures */ const struct wl_message *methods; - /** Number of events */ int event_count; - /** Event signatures */ const struct wl_message *events; }; -/** \class wl_list - * - * \brief Doubly-linked list - * - * On its own, an instance of `struct wl_list` represents the sentinel head of - * a doubly-linked list, and must be initialized using wl_list_init(). - * When empty, the list head's `next` and `prev` members point to the list head - * itself, otherwise `next` references the first element in the list, and `prev` - * refers to the last element in the list. - * - * Use the `struct wl_list` type to represent both the list head and the links - * between elements within the list. Use wl_list_empty() to determine if the - * list is empty in O(1). - * - * All elements in the list must be of the same type. The element type must have - * a `struct wl_list` member, often named `link` by convention. Prior to - * insertion, there is no need to initialize an element's `link` - invoking - * wl_list_init() on an individual list element's `struct wl_list` member is - * unnecessary if the very next operation is wl_list_insert(). However, a - * common idiom is to initialize an element's `link` prior to removal - ensure - * safety by invoking wl_list_init() before wl_list_remove(). - * - * Consider a list reference `struct wl_list foo_list`, an element type as - * `struct element`, and an element's link member as `struct wl_list link`. - * - * The following code initializes a list and adds three elements to it. - * - * \code - * struct wl_list foo_list; - * - * struct element { - * int foo; - * struct wl_list link; - * }; - * struct element e1, e2, e3; - * - * wl_list_init(&foo_list); - * wl_list_insert(&foo_list, &e1.link); // e1 is the first element - * wl_list_insert(&foo_list, &e2.link); // e2 is now the first element - * wl_list_insert(&e2.link, &e3.link); // insert e3 after e2 - * \endcode - * - * The list now looks like [e2, e3, e1]. - * - * The `wl_list` API provides some iterator macros. For example, to iterate - * a list in ascending order: - * - * \code - * struct element *e; - * wl_list_for_each(e, foo_list, link) { - * do_something_with_element(e); - * } - * \endcode - * - * See the documentation of each iterator for details. - * \sa http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/list.h - */ struct wl_list { - /** Previous list element */ struct wl_list *prev; - /** Next list element */ struct wl_list *next; }; -/** - * Initializes the list. - * - * \param list List to initialize - * - * \memberof wl_list - */ void wl_list_init(struct wl_list *list); -/** - * Inserts an element into the list, after the element represented by \p list. - * When \p list is a reference to the list itself (the head), set the containing - * struct of \p elm as the first element in the list. - * - * \note If \p elm is already part of a list, inserting it again will lead to - * list corruption. - * - * \param list List element after which the new element is inserted - * \param elm Link of the containing struct to insert into the list - * - * \memberof wl_list - */ void wl_list_insert(struct wl_list *list, struct wl_list *elm); -/** - * Removes an element from the list. - * - * \note This operation leaves \p elm in an invalid state. - * - * \param elm Link of the containing struct to remove from the list - * - * \memberof wl_list - */ void wl_list_remove(struct wl_list *elm); -/** - * Determines the length of the list. - * - * \note This is an O(n) operation. - * - * \param list List whose length is to be determined - * - * \return Number of elements in the list - * - * \memberof wl_list - */ int wl_list_length(const struct wl_list *list); -/** - * Determines if the list is empty. - * - * \param list List whose emptiness is to be determined - * - * \return 1 if empty, or 0 if not empty - * - * \memberof wl_list - */ int wl_list_empty(const struct wl_list *list); -/** - * Inserts all of the elements of one list into another, after the element - * represented by \p list. - * - * \note This leaves \p other in an invalid state. - * - * \param list List element after which the other list elements will be inserted - * \param other List of elements to insert - * - * \memberof wl_list - */ void wl_list_insert_list(struct wl_list *list, struct wl_list *other); -/** - * Retrieves a pointer to a containing struct, given a member name. - * - * This macro allows "conversion" from a pointer to a member to its containing - * struct. This is useful if you have a contained item like a wl_list, - * wl_listener, or wl_signal, provided via a callback or other means, and would - * like to retrieve the struct that contains it. - * - * To demonstrate, the following example retrieves a pointer to - * `example_container` given only its `destroy_listener` member: - * - * \code - * struct example_container { - * struct wl_listener destroy_listener; - * // other members... - * }; - * - * void example_container_destroy(struct wl_listener *listener, void *data) - * { - * struct example_container *ctr; - * - * ctr = wl_container_of(listener, ctr, destroy_listener); - * // destroy ctr... - * } - * \endcode - * - * \note `sample` need not be a valid pointer. A null or uninitialised pointer - * is sufficient. - * - * \param ptr Valid pointer to the contained member - * \param sample Pointer to a struct whose type contains \p ptr - * \param member Named location of \p ptr within the \p sample type - * - * \return The container for the specified pointer - */ #define wl_container_of(ptr, sample, member) \ (WL_TYPEOF(sample))((char *)(ptr) - \ offsetof(WL_TYPEOF(*sample), member)) -/** - * Iterates over a list. - * - * This macro expresses a for-each iterator for wl_list. Given a list and - * wl_list link member name (often named `link` by convention), this macro - * assigns each element in the list to \p pos, which can then be referenced in - * a trailing code block. For example, given a wl_list of `struct message` - * elements: - * - * \code - * struct message { - * char *contents; - * wl_list link; - * }; - * - * struct wl_list *message_list; - * // Assume message_list now "contains" many messages - * - * struct message *m; - * wl_list_for_each(m, message_list, link) { - * do_something_with_message(m); - * } - * \endcode - * - * \param pos Cursor that each list element will be assigned to - * \param head Head of the list to iterate over - * \param member Name of the link member within the element struct - * - * \relates wl_list - */ #define wl_list_for_each(pos, head, member) \ for (pos = wl_container_of((head)->next, pos, member); \ &pos->member != (head); \ pos = wl_container_of(pos->member.next, pos, member)) -/** - * Iterates over a list, safe against removal of the list element. - * - * \note Only removal of the current element, \p pos, is safe. Removing - * any other element during traversal may lead to a loop malfunction. - * - * \sa wl_list_for_each() - * - * \param pos Cursor that each list element will be assigned to - * \param tmp Temporary pointer of the same type as \p pos - * \param head Head of the list to iterate over - * \param member Name of the link member within the element struct - * - * \relates wl_list - */ #define wl_list_for_each_safe(pos, tmp, head, member) \ for (pos = wl_container_of((head)->next, pos, member), \ tmp = wl_container_of((pos)->member.next, tmp, member); \ @@ -482,37 +120,11 @@ wl_list_insert_list(struct wl_list *list, struct wl_list *other); pos = tmp, \ tmp = wl_container_of(pos->member.next, tmp, member)) -/** - * Iterates backwards over a list. - * - * \sa wl_list_for_each() - * - * \param pos Cursor that each list element will be assigned to - * \param head Head of the list to iterate over - * \param member Name of the link member within the element struct - * - * \relates wl_list - */ #define wl_list_for_each_reverse(pos, head, member) \ for (pos = wl_container_of((head)->prev, pos, member); \ &pos->member != (head); \ pos = wl_container_of(pos->member.prev, pos, member)) -/** - * Iterates backwards over a list, safe against removal of the list element. - * - * \note Only removal of the current element, \p pos, is safe. Removing - * any other element during traversal may lead to a loop malfunction. - * - * \sa wl_list_for_each() - * - * \param pos Cursor that each list element will be assigned to - * \param tmp Temporary pointer of the same type as \p pos - * \param head Head of the list to iterate over - * \param member Name of the link member within the element struct - * - * \relates wl_list - */ #define wl_list_for_each_reverse_safe(pos, tmp, head, member) \ for (pos = wl_container_of((head)->prev, pos, member), \ tmp = wl_container_of((pos)->member.prev, tmp, member); \ @@ -520,244 +132,75 @@ wl_list_insert_list(struct wl_list *list, struct wl_list *other); pos = tmp, \ tmp = wl_container_of(pos->member.prev, tmp, member)) -/** - * \class wl_array - * - * Dynamic array - * - * A wl_array is a dynamic array that can only grow until released. It is - * intended for relatively small allocations whose size is variable or not known - * in advance. While construction of a wl_array does not require all elements to - * be of the same size, wl_array_for_each() does require all elements to have - * the same type and size. - * - */ struct wl_array { - /** Array size */ size_t size; - /** Allocated space */ size_t alloc; - /** Array data */ void *data; }; -/** - * Initializes the array. - * - * \param array Array to initialize - * - * \memberof wl_array - */ void wl_array_init(struct wl_array *array); -/** - * Releases the array data. - * - * \note Leaves the array in an invalid state. - * - * \param array Array whose data is to be released - * - * \memberof wl_array - */ void wl_array_release(struct wl_array *array); -/** - * Increases the size of the array by \p size bytes. - * - * \param array Array whose size is to be increased - * \param size Number of bytes to increase the size of the array by - * - * \return A pointer to the beginning of the newly appended space, or NULL when - * resizing fails. - * - * \memberof wl_array - */ void * wl_array_add(struct wl_array *array, size_t size); -/** - * Copies the contents of \p source to \p array. - * - * \param array Destination array to copy to - * \param source Source array to copy from - * - * \return 0 on success, or -1 on failure - * - * \memberof wl_array - */ int wl_array_copy(struct wl_array *array, struct wl_array *source); -/** - * Iterates over an array. - * - * This macro expresses a for-each iterator for wl_array. It assigns each - * element in the array to \p pos, which can then be referenced in a trailing - * code block. \p pos must be a pointer to the array element type, and all - * array elements must be of the same type and size. - * - * \param pos Cursor that each array element will be assigned to - * \param array Array to iterate over - * - * \relates wl_array - * \sa wl_list_for_each() - */ #define wl_array_for_each(pos, array) \ for (pos = (array)->data; \ (array)->size != 0 && \ (const char *) pos < ((const char *) (array)->data + (array)->size); \ (pos)++) -/** - * Fixed-point number - * - * A `wl_fixed_t` is a 24.8 signed fixed-point number with a sign bit, 23 bits - * of integer precision and 8 bits of decimal precision. Consider `wl_fixed_t` - * as an opaque struct with methods that facilitate conversion to and from - * `double` and `int` types. - */ typedef int32_t wl_fixed_t; -/** - * Converts a fixed-point number to a floating-point number. - * - * \param f Fixed-point number to convert - * - * \return Floating-point representation of the fixed-point argument - */ static inline double wl_fixed_to_double(wl_fixed_t f) { return f / 256.0; } -/** - * Converts a floating-point number to a fixed-point number. - * - * \param d Floating-point number to convert - * - * \return Fixed-point representation of the floating-point argument - */ static inline wl_fixed_t wl_fixed_from_double(double d) { return (wl_fixed_t) (round(d * 256.0)); } -/** - * Converts a fixed-point number to an integer. - * - * \param f Fixed-point number to convert - * - * \return Integer component of the fixed-point argument - */ static inline int wl_fixed_to_int(wl_fixed_t f) { return f / 256; } -/** - * Converts an integer to a fixed-point number. - * - * \param i Integer to convert - * - * \return Fixed-point representation of the integer argument - */ static inline wl_fixed_t wl_fixed_from_int(int i) { return i * 256; } -/** - * Protocol message argument data types - * - * This union represents all of the argument types in the Wayland protocol wire - * format. The protocol implementation uses wl_argument within its marshalling - * machinery for dispatching messages between a client and a compositor. - * - * \sa wl_message - * \sa wl_interface - * \sa Wire Format - */ union wl_argument { - int32_t i; /**< `int` */ - uint32_t u; /**< `uint` */ - wl_fixed_t f; /**< `fixed` */ - const char *s; /**< `string` */ - struct wl_object *o; /**< `object` */ - uint32_t n; /**< `new_id` */ - struct wl_array *a; /**< `array` */ - int32_t h; /**< `fd` */ + int32_t i; + uint32_t u; + wl_fixed_t f; + const char *s; + struct wl_object *o; + uint32_t n; + struct wl_array *a; + int32_t h; }; -/** - * Dispatcher function type alias - * - * A dispatcher is a function that handles the emitting of callbacks in client - * code. For programs directly using the C library, this is done by using - * libffi to call function pointers. When binding to languages other than C, - * dispatchers provide a way to abstract the function calling process to be - * friendlier to other function calling systems. - * - * A dispatcher takes five arguments: The first is the dispatcher-specific - * implementation associated with the target object. The second is the object - * upon which the callback is being invoked (either wl_proxy or wl_resource). - * The third and fourth arguments are the opcode and the wl_message - * corresponding to the callback. The final argument is an array of arguments - * received from the other process via the wire protocol. - * - * \param user_data Dispatcher-specific implementation data - * \param target Callback invocation target (wl_proxy or `wl_resource`) - * \param opcode Callback opcode - * \param msg Callback message signature - * \param args Array of received arguments - * - * \return 0 on success, or -1 on failure - */ typedef int (*wl_dispatcher_func_t)(const void *user_data, void *target, uint32_t opcode, const struct wl_message *msg, union wl_argument *args); -/** - * Log function type alias - * - * The C implementation of the Wayland protocol abstracts the details of - * logging. Users may customize the logging behavior, with a function conforming - * to the `wl_log_func_t` type, via `wl_log_set_handler_client` and - * `wl_log_set_handler_server`. - * - * A `wl_log_func_t` must conform to the expectations of `vprintf`, and - * expects two arguments: a string to write and a corresponding variable - * argument list. While the string to write may contain format specifiers and - * use values in the variable argument list, the behavior of any `wl_log_func_t` - * depends on the implementation. - * - * \note Take care to not confuse this with `wl_protocol_logger_func_t`, which - * is a specific server-side logger for requests and events. - * - * \param fmt String to write to the log, containing optional format - * specifiers - * \param args Variable argument list - * - * \sa wl_log_set_handler_client - * \sa wl_log_set_handler_server - */ typedef void (*wl_log_func_t)(const char *fmt, va_list args) WL_PRINTF(1, 0); -/** - * Return value of an iterator function - * - * \sa wl_client_for_each_resource_iterator_func_t - * \sa wl_client_for_each_resource - */ enum wl_iterator_result { - /** Stop the iteration */ WL_ITERATOR_STOP, - /** Continue the iteration */ WL_ITERATOR_CONTINUE }; diff --git a/app/src/main/cpp/waylandcomp/protocols/color-management-v1.xml b/app/src/main/cpp/waylandcomp/protocols/color-management-v1.xml index 7f8da78f12..ef02406fdd 100644 --- a/app/src/main/cpp/waylandcomp/protocols/color-management-v1.xml +++ b/app/src/main/cpp/waylandcomp/protocols/color-management-v1.xml @@ -1481,7 +1481,6 @@ - diff --git a/app/src/main/cpp/waylandcomp/protocols/linux-dmabuf-v1.xml b/app/src/main/cpp/waylandcomp/protocols/linux-dmabuf-v1.xml index 733717545a..a88a20ac42 100644 --- a/app/src/main/cpp/waylandcomp/protocols/linux-dmabuf-v1.xml +++ b/app/src/main/cpp/waylandcomp/protocols/linux-dmabuf-v1.xml @@ -158,7 +158,6 @@ summary="low 32 bits of layout modifier"/> - diff --git a/app/src/main/cpp/waylandcomp/protocols/presentation-time.xml b/app/src/main/cpp/waylandcomp/protocols/presentation-time.xml index c2431c5003..c71c2fbe36 100644 --- a/app/src/main/cpp/waylandcomp/protocols/presentation-time.xml +++ b/app/src/main/cpp/waylandcomp/protocols/presentation-time.xml @@ -1,6 +1,5 @@ - Copyright © 2013-2014 Collabora, Ltd. @@ -28,7 +27,6 @@ - The main feature of this interface is accurate presentation timing feedback to ensure smooth video playback while maintaining @@ -41,7 +39,6 @@ the wl_surface.commit and provides feedback on the content update, particularly the final realized presentation time. - When the final realized presentation time is available, e.g. after a framebuffer flip completes, the requested diff --git a/app/src/main/cpp/waylandcomp/protocols/text-input-unstable-v3.xml b/app/src/main/cpp/waylandcomp/protocols/text-input-unstable-v3.xml index 01c1e21042..f75317ace2 100644 --- a/app/src/main/cpp/waylandcomp/protocols/text-input-unstable-v3.xml +++ b/app/src/main/cpp/waylandcomp/protocols/text-input-unstable-v3.xml @@ -458,7 +458,6 @@ - diff --git a/app/src/main/cpp/waylandcomp/protocols/wlr-data-control-unstable-v1.xml b/app/src/main/cpp/waylandcomp/protocols/wlr-data-control-unstable-v1.xml index 567a09e529..2771e9e0bf 100644 --- a/app/src/main/cpp/waylandcomp/protocols/wlr-data-control-unstable-v1.xml +++ b/app/src/main/cpp/waylandcomp/protocols/wlr-data-control-unstable-v1.xml @@ -142,7 +142,6 @@ - diff --git a/app/src/main/cpp/waylandcomp/protocols/xdg-shell.xml b/app/src/main/cpp/waylandcomp/protocols/xdg-shell.xml index 1df7001460..85e45044ed 100644 --- a/app/src/main/cpp/waylandcomp/protocols/xdg-shell.xml +++ b/app/src/main/cpp/waylandcomp/protocols/xdg-shell.xml @@ -366,7 +366,6 @@ - @@ -1115,7 +1114,6 @@ - @@ -1139,7 +1137,6 @@ - @@ -1294,7 +1291,6 @@ - diff --git a/app/src/main/cpp/waylandcomp/src/ahb_swapchain.c b/app/src/main/cpp/waylandcomp/src/ahb_swapchain.c index 4a981f1ee1..6cf0c80373 100644 --- a/app/src/main/cpp/waylandcomp/src/ahb_swapchain.c +++ b/app/src/main/cpp/waylandcomp/src/ahb_swapchain.c @@ -1,5 +1,3 @@ -/* Zero-copy game frames: banner_ahb_v1 + the game's AHardwareBuffers on the sc_layer SurfaceControl. - * See ahb_swapchain.h and ZERO_COPY_SPIKE.md. */ #define _GNU_SOURCE #include "ahb_swapchain.h" #include "droiddeck_color.h" @@ -19,9 +17,8 @@ #include #include -#define MOD_QCOM_COMPRESSED 0x0500000000000001ULL /* DRM_FORMAT_MOD_QCOM_COMPRESSED (UBWC) */ +#define MOD_QCOM_COMPRESSED 0x0500000000000001ULL -/* linux/dma-buf.h (not in the NDK sysroot's older headers): sync_file export / import. */ struct droiddeck_dma_buf_sync_file { uint32_t flags; int32_t fd; }; #define DROIDDECK_DMA_BUF_SYNC_READ 1u #define DROIDDECK_DMA_BUF_IOCTL_EXPORT_SYNC_FILE _IOWR('b', 2, struct droiddeck_dma_buf_sync_file) @@ -29,47 +26,43 @@ struct droiddeck_dma_buf_sync_file { uint32_t flags; int32_t fd; }; extern volatile int g_zero_copy; -/* One per wl_buffer the game attached an AHardwareBuffer to. Lives while the wl_buffer exists or - * the buffer is still on the layer / held by SurfaceFlinger, whichever is longer. */ struct ahb_buf { - uint64_t id; /* the token sc_layer.c hands back */ - struct dmabuf_buffer *b; /* one reference held for the life of this record */ - AHardwareBuffer *ahb; /* our reference to the game's buffer */ + uint64_t id; + struct dmabuf_buffer *b; + AHardwareBuffer *ahb; int w, h; uint32_t stride, image_count; - uint32_t format; /* AHARDWAREBUFFER_FORMAT_* gralloc gave it (10-bit for HDR10) */ + uint32_t format; uint64_t modifier; struct wl_client *client; - struct wl_resource *resource; /* the wl_buffer; NULL once the client destroyed it */ + struct wl_resource *resource; struct wl_listener resource_destroy; - int on_layer; /* set on the SurfaceControl (or not yet released by SurfaceFlinger) */ - int release_pending; /* the surface let go of it while on the layer */ - int64_t deferred_ns; /* when it did (the perf line: how long the display kept it) */ - struct surface *surface; /* for the paced release; NULL = release at once */ - struct wl_event_source *fence_src; /* fallback: waiting the release fence in the event loop */ + int on_layer; + int release_pending; + int64_t deferred_ns; + struct surface *surface; + struct wl_event_source *fence_src; int fence_fd; struct wl_list link; }; static struct wl_list g_bufs; -static struct wl_list g_clients; /* bound banner_ahb_v1 resources (wl_resource links) */ +static struct wl_list g_clients; static uint64_t g_next_id = 1; static struct wl_event_loop *g_loop; static unsigned g_stat_zero_copy; static int g_export_failed_logged, g_import_failed_logged; -static int g_advertised; /* the global exists */ -static int g_mode_sent = -1; /* the mode clients were last told (-1 = none yet) */ -static struct surface *g_announced; /* "presenting X without a copy" said for this surface */ -static volatile int64_t g_last_zero_copy_ns; /* when a frame last went on the layer without a copy */ +static int g_advertised; +static int g_mode_sent = -1; +static struct surface *g_announced; +static volatile int64_t g_last_zero_copy_ns; -/* SurfaceFlinger's callback thread -> compositor thread: released tokens + their fences. */ struct released { uint64_t id; int fd; }; static pthread_mutex_t g_rel_lock = PTHREAD_MUTEX_INITIALIZER; static struct released *g_rel; static int g_rel_n, g_rel_cap; static int g_rel_pipe[2] = {-1, -1}; -/* Which swapchains were announced (one log line per swapchain, not per image). */ struct chain_seen { struct wl_client *client; int w, h; uint32_t image_count; uint64_t modifier; uint32_t format; }; static struct chain_seen g_last_chain; @@ -96,7 +89,6 @@ static void buf_free(struct ahb_buf *ab) { free(ab); } -/* Free once neither the client (wl_buffer) nor the display (layer) refers to it. */ static void maybe_free(struct ahb_buf *ab) { if (!ab->resource && !ab->on_layer && !ab->fence_src) buf_free(ab); } @@ -105,11 +97,10 @@ static void on_buffer_resource_destroyed(struct wl_listener *l, void *data) { struct ahb_buf *ab = wl_container_of(l, ab, resource_destroy); wl_list_remove(&ab->resource_destroy.link); ab->resource = NULL; - ab->release_pending = 0; /* nothing left to release to */ + ab->release_pending = 0; maybe_free(ab); } -/* ---- release: SurfaceFlinger is done with the buffer -> the game's next acquire waits, then wl_buffer.release */ static void send_deferred_release(struct ahb_buf *ab) { if (ab->release_pending && ab->resource) @@ -129,10 +120,6 @@ static int on_fence_readable(int fd, uint32_t mask, void *data) { return 0; } -/* Compositor thread. Puts the display's release fence into the dma-buf so the game's driver waits - * on it before rendering into the buffer again (Mesa exports every fence of the dma-buf as the - * acquire semaphore), then gives the buffer back. If the kernel refuses the import, the release - * itself waits for the fence instead. */ static void handle_released(uint64_t id, int fd) { struct ahb_buf *ab = find_buf(id); if (!ab) { if (fd >= 0) close(fd); return; } @@ -148,7 +135,6 @@ static void handle_released(uint64_t id, int fd) { droiddeck_log("layer", "zero-copy: DMA_BUF_IOCTL_IMPORT_SYNC_FILE failed (%s): releases wait for the display's fence here instead", strerror(errno)); } - /* Wait it out in the event loop (a sync_file is readable once signalled). */ struct pollfd p = {.fd = fd, .events = POLLIN}; if (poll(&p, 1, 0) > 0) { close(fd); @@ -156,7 +142,7 @@ static void handle_released(uint64_t id, int fd) { ab->fence_fd = fd; ab->fence_src = wl_event_loop_add_fd(g_loop, fd, WL_EVENT_READABLE, on_fence_readable, ab); if (!ab->fence_src) { close(fd); ab->fence_fd = -1; } - else return; /* released from on_fence_readable */ + else return; } } } @@ -179,7 +165,6 @@ static int on_release_pipe(int fd, uint32_t mask, void *data) { return 0; } -/* SurfaceFlinger's callback thread. */ void ahb_swapchain_layer_released(void *token, int release_fd) { pthread_mutex_lock(&g_rel_lock); if (g_rel_n == g_rel_cap) { @@ -193,7 +178,6 @@ void ahb_swapchain_layer_released(void *token, int release_fd) { if (g_rel_pipe[1] >= 0) { char c = 1; if (write(g_rel_pipe[1], &c, 1) < 0) {} } } -/* ---- present */ int ahb_swapchain_has_ahb(const struct dmabuf_buffer *b) { return b && *droiddeck_dmabuf_ahb_slot((struct dmabuf_buffer *)b) != NULL; @@ -203,8 +187,6 @@ int ahb_swapchain_present(struct dmabuf_buffer *b, struct surface *s, int scene_ struct ahb_buf *ab = b ? *droiddeck_dmabuf_ahb_slot(b) : NULL; if (!ab) return -1; int dmabuf_fd = droiddeck_dmabuf_fd(b); - /* Acquire fence: the game's render fence, which its driver put into the dma-buf before the - * commit (Mesa's implicit sync). The display waits on it, not the CPU. */ int acquire = -1; struct droiddeck_dma_buf_sync_file exp = {.flags = DROIDDECK_DMA_BUF_SYNC_READ, .fd = -1}; if (dmabuf_fd >= 0 && ioctl(dmabuf_fd, DROIDDECK_DMA_BUF_IOCTL_EXPORT_SYNC_FILE, &exp) == 0 && exp.fd >= 0) { @@ -215,14 +197,14 @@ int ahb_swapchain_present(struct dmabuf_buffer *b, struct surface *s, int scene_ droiddeck_log("layer", "zero-copy: DMA_BUF_IOCTL_EXPORT_SYNC_FILE failed (%s): waiting for each frame on the CPU instead", strerror(errno)); } - struct pollfd p = {.fd = dmabuf_fd, .events = POLLIN}; /* readable = the writers are done */ + struct pollfd p = {.fd = dmabuf_fd, .events = POLLIN}; int r; do { r = poll(&p, 1, 100); } while (r < 0 && errno == EINTR); } int r = sc_layer_present_ahb(ab->ahb, ab->w, ab->h, acquire, (void *)(uintptr_t)ab->id, scene_w, scene_h, s ? droiddeck_surface_color(s) : NULL, ab->format); if (r < 0) return -1; - if (r == 1) return 0; /* nothing of it on screen: not on the layer, nothing to release later */ + if (r == 1) return 0; if (!ab->on_layer) { ab->on_layer = 1; g_stat_zero_copy++; @@ -272,7 +254,6 @@ uint32_t ahb_swapchain_ahb_format(const struct dmabuf_buffer *b) { return ab ? ab->format : 0; } -/* ---- banner_ahb_v1 */ static void ahb_destroy(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } @@ -287,10 +268,8 @@ static void ahb_attach(struct wl_client *c, struct wl_resource *r, struct wl_res return; } void **slot = droiddeck_dmabuf_ahb_slot(b); - if (*slot) { close(sock); return; } /* once per buffer */ + if (*slot) { close(sock); return; } - /* The handle was written into the socket before the request was sent; a short wait is just - * insurance against a slow sender. */ struct pollfd p = {.fd = sock, .events = POLLIN}; int pr; do { pr = poll(&p, 1, 1000); } while (pr < 0 && errno == EINTR); @@ -357,10 +336,7 @@ static void bind_ahb(struct wl_client *c, void *data, uint32_t ver, uint32_t id) if (!r) { wl_client_post_no_memory(c); return; } wl_resource_set_implementation(r, &ahb_impl, NULL, on_client_resource_destroyed); wl_list_insert(&g_clients, wl_resource_get_link(r)); - /* The mode travels with the bind, so the client's registry roundtrip already has it when it - * decides about its first swapchain. */ if (ver >= BANNER_AHB_V1_MODE_SINCE_VERSION) banner_ahb_v1_send_mode(r, g_zero_copy ? 1u : 0u); - /* One line per program, not per surface-format query (each binds its own). */ if (last_named != c) { last_named = c; droiddeck_log("layer", "zero-copy: %s bound banner_ahb_v1 version %u (%s)", droiddeck_client_name(c), ver, @@ -386,7 +362,6 @@ void ahb_swapchain_set_mode(int on, int live) { told++; } } - /* The next chain and the next fullscreen frame get announced again. */ memset(&g_last_chain, 0, sizeof(g_last_chain)); g_announced = NULL; if (live) diff --git a/app/src/main/cpp/waylandcomp/src/ahb_swapchain.h b/app/src/main/cpp/waylandcomp/src/ahb_swapchain.h index 2c72a12b52..7774482734 100644 --- a/app/src/main/cpp/waylandcomp/src/ahb_swapchain.h +++ b/app/src/main/cpp/waylandcomp/src/ahb_swapchain.h @@ -1,28 +1,5 @@ #ifndef AHB_SWAPCHAIN_H #define AHB_SWAPCHAIN_H -/* - * Zero-copy game frames (layer mode, DROIDDECK_WAYLAND_ZERO_COPY=1 at launch, the drawer's "Zero-copy - * presentation" switch live): the guest half of the design in ZERO_COPY_SPIKE.md. Our Wayland Turnip - * (banners-turnip-wayland, patches/wayland/banner_ahb_wsi.py) binds the private global banner_ahb_v1 - * (version 2), which this compositor advertises on every session where a display layer is possible, - * and follows its `mode` event: while the mode is on, each swapchain the game creates has its images - * allocated as gralloc AHardwareBuffers, shared as dma-bufs through zwp_linux_dmabuf_v1 as before (so - * the blit path still works) and handed to us once per wl_buffer over a socketpair - * (banner_ahb_v1.attach). When such a buffer is the one fullscreen frame, it goes straight onto the - * sc_layer SurfaceControl: SurfaceFlinger / the display scan out the game's own buffer, no copy - * anywhere. A mode flip (ahb_swapchain_set_mode, from the drawer through the host queue) is - * broadcast to every bound client; a client whose live swapchain was built for the other mode - * retires it (VK_ERROR_OUT_OF_DATE_KHR) so the program rebuilds it, and until then its buffers keep - * presenting as before: an attached AHardwareBuffer stays with its wl_buffer whatever the mode is. - * - * Fences stay implicit, in the dma-buf itself: Mesa imports the render fence into the dma-buf - * before it commits, we export it as the layer's acquire fence (DMA_BUF_IOCTL_EXPORT_SYNC_FILE), - * and import SurfaceFlinger's release fence back (DMA_BUF_IOCTL_IMPORT_SYNC_FILE) before sending - * wl_buffer.release, so Mesa's acquire (wsi_create_sync_for_dma_buf_wait) waits for the display. - * - * Compositor thread unless noted. Without a usable display layer (sc_layer_available() == 0) the - * global is not created and nothing here runs. - */ #include #include #include @@ -30,53 +7,28 @@ struct dmabuf_buffer; struct surface; -/* ---- compositor.c -> ahb_swapchain.c */ -/* Create the banner_ahb_v1 global (when a display layer is possible at all) and the release queue. */ void ahb_swapchain_init(struct wl_display *display); -/* Zero-copy on/off, live: sets g_zero_copy, tells every bound client (banner_ahb_v1.mode) and logs - * it (live = 1: a drawer switch mid-session; 0: the launch default). Compositor thread. */ void ahb_swapchain_set_mode(int on, int live); -/* Milliseconds since a game frame was last put on the layer without a copy (-1 = never). Any thread: - * the drawer's status line. */ int ahb_swapchain_last_frame_age_ms(void); -/* 1 if the buffer carries an AHardwareBuffer from the game. */ int ahb_swapchain_has_ahb(const struct dmabuf_buffer *b); -/* Show b (the topmost fullscreen frame, shown by surface s) on the layer without a copy. - * 0 = done (or the same frame is already up), -1 = unavailable (draw the old way). */ int ahb_swapchain_present(struct dmabuf_buffer *b, struct surface *s, int scene_w, int scene_h); -/* Surface s lets go of buffer b (its wl_buffer `buffer`, NULL if the client destroyed it); paced = - * the limiter's cadence applies. Returns 1 when the buffer is on the layer: the release is sent - * from here once SurfaceFlinger's release fence is known. 0 = the caller releases as usual. */ int ahb_swapchain_defer_release(struct dmabuf_buffer *b, struct wl_resource *buffer, struct surface *s, int paced); -/* s is being destroyed: forget it (its deferred releases still go out, unpaced). */ void ahb_swapchain_surface_gone(struct surface *s); -/* Zero-copy frames since the last call (the 10 s summary). */ unsigned ahb_swapchain_stats_take(void); -/* 1 when the banner_ahb_v1 global exists (a display layer is possible): part of the HDR gate. */ int ahb_swapchain_advertised(void); -/* The AHARDWAREBUFFER_FORMAT_* of the game's buffer behind b, 0 when it has none. */ uint32_t ahb_swapchain_ahb_format(const struct dmabuf_buffer *b); -/* ---- sc_layer.c -> ahb_swapchain.c (SurfaceFlinger's callback thread): the layer let go of the - * buffer behind `token`; release_fd (owned by the callee, -1 = none) signals when the display is - * done reading it. */ void ahb_swapchain_layer_released(void *token, int release_fd); -/* ---- ahb_swapchain.c -> compositor.c (hooks) */ struct dmabuf_buffer *droiddeck_dmabuf_from_resource(struct wl_resource *buffer); -int droiddeck_dmabuf_fd(const struct dmabuf_buffer *b); /* plane 0's dma-buf */ +int droiddeck_dmabuf_fd(const struct dmabuf_buffer *b); void droiddeck_dmabuf_size(const struct dmabuf_buffer *b, int *w, int *h); -void **droiddeck_dmabuf_ahb_slot(struct dmabuf_buffer *b); /* this module's per-buffer state */ +void **droiddeck_dmabuf_ahb_slot(struct dmabuf_buffer *b); void droiddeck_dmabuf_ref(struct dmabuf_buffer *b); void droiddeck_dmabuf_unref(struct dmabuf_buffer *b); -/* Give a wl_buffer back to its client now (paced = 0) or on the FPS limiter's cadence (s != NULL). - * since_ns = when the compositor let go of it (CLOCK_MONOTONIC; the perf line's release latency). */ void droiddeck_release_buffer(struct surface *s, struct wl_resource *buffer, int paced, int64_t since_ns); -/* Redraw the scene on the next tick (the present path may have changed). */ void droiddeck_request_redraw(void); -/* "" (program) of the window a surface belongs to, for the log. */ void droiddeck_surface_describe(const struct surface *s, char *out, size_t size); -/* The surface's current image description (droiddeck_color.h), NULL = none / HDR gate closed. */ struct droiddeck_color; const struct droiddeck_color *droiddeck_surface_color(const struct surface *s); diff --git a/app/src/main/cpp/waylandcomp/src/blend.frag b/app/src/main/cpp/waylandcomp/src/blend.frag index 88739de255..54e1ac495a 100644 --- a/app/src/main/cpp/waylandcomp/src/blend.frag +++ b/app/src/main/cpp/waylandcomp/src/blend.frag @@ -1,5 +1,4 @@ #version 450 -// Wayland buffers carry premultiplied alpha; the pipeline blends ONE, ONE_MINUS_SRC_ALPHA. layout(binding = 0) uniform sampler2D Surface; layout(location = 0) in vec2 uv; layout(location = 0) out vec4 outColor; diff --git a/app/src/main/cpp/waylandcomp/src/blend.vert b/app/src/main/cpp/waylandcomp/src/blend.vert index 5c87cc3528..6600821009 100644 --- a/app/src/main/cpp/waylandcomp/src/blend.vert +++ b/app/src/main/cpp/waylandcomp/src/blend.vert @@ -1,5 +1,4 @@ #version 450 -// One surface as a quad: dst = the target rectangle in NDC, src = the buffer rectangle in UV. layout(push_constant) uniform PC { vec4 dst; vec4 src; } pc; layout(location = 0) out vec2 uv; diff --git a/app/src/main/cpp/waylandcomp/src/blend_frag.h b/app/src/main/cpp/waylandcomp/src/blend_frag.h index 9d2af54a38..d4409cefa5 100644 --- a/app/src/main/cpp/waylandcomp/src/blend_frag.h +++ b/app/src/main/cpp/waylandcomp/src/blend_frag.h @@ -1,4 +1,3 @@ - // 1115.1.0 #pragma once const uint32_t blend_frag_code[] = { 0x07230203,0x00010000,0x0008000b,0x00000014,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/waylandcomp/src/blend_pass.c b/app/src/main/cpp/waylandcomp/src/blend_pass.c index 842287b07b..9a4d48d0b8 100644 --- a/app/src/main/cpp/waylandcomp/src/blend_pass.c +++ b/app/src/main/cpp/waylandcomp/src/blend_pass.c @@ -1,19 +1,16 @@ -/* Alpha composition: one surface drawn source-over onto the scene - see blend_pass.h. Compositor thread. */ #define _POSIX_C_SOURCE 200809L #include "blend_pass.h" #include "vk_loader.h" -#include "vk_present.h" /* droiddeck_log, vkp_gpu_name */ +#include "vk_present.h" #include <string.h> -/* SPIR-V, pre-compiled (glslangValidator -V blend.vert --vn blend_vert_code, the same for blend.frag) - * and committed next to the GLSL: the NDK build compiles no shaders. */ #include "blend_vert.h" #include "blend_frag.h" struct pc_blend { float dst[4]; float src[4]; }; static VkDevice g_dev; -static int g_ready; /* 0 = not built, 1 = ok, -1 = unavailable (said once) */ +static int g_ready; static VkSampler g_sampler; static VkDescriptorSetLayout g_dsl; static VkPipelineLayout g_pl; @@ -21,8 +18,6 @@ static VkDescriptorPool g_dpool; static VkShaderModule g_vert, g_frag; static unsigned g_frame = 1; -/* One render pass + pipeline per target format: the screen swapchain's, the scene image's, the HDR - * composition's. */ #define NFMT 4 static struct { VkFormat fmt; VkRenderPass rp; VkPipeline pipe; } g_out[NFMT]; @@ -60,8 +55,6 @@ static VkShaderModule shader(const uint32_t *code, size_t size) { return m; } -/* The target keeps what the blits put there (LOAD) and stays in TRANSFER_DST_OPTIMAL for the blits - * that follow. The dependencies order the pass between them. */ static VkRenderPass make_rp(VkFormat fmt) { VkAttachmentDescription att = {.format = fmt, .samples = VK_SAMPLE_COUNT_1_BIT, .loadOp = VK_ATTACHMENT_LOAD_OP_LOAD, .storeOp = VK_ATTACHMENT_STORE_OP_STORE, @@ -111,7 +104,6 @@ static VkPipeline make_pipe(VkRenderPass rp) { .frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE, .lineWidth = 1.0f}; VkPipelineMultisampleStateCreateInfo ms = {.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, .rasterizationSamples = VK_SAMPLE_COUNT_1_BIT}; - /* The target's alpha is left alone: the screen is opaque whatever is drawn onto it. */ VkPipelineColorBlendAttachmentState ba = { .blendEnable = VK_TRUE, .srcColorBlendFactor = VK_BLEND_FACTOR_ONE, .dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, .colorBlendOp = VK_BLEND_OP_ADD, @@ -201,8 +193,6 @@ static VkImageView make_view(VkImage img, VkFormat fmt) { return v; } -/* The slot to recycle: a free one, else the one unused for longest - never one this command buffer - * already refers to. -1 = every slot is in this frame. */ #define OLDEST(arr, n, out) do { \ unsigned age_ = 0; \ (out) = -1; \ diff --git a/app/src/main/cpp/waylandcomp/src/blend_pass.h b/app/src/main/cpp/waylandcomp/src/blend_pass.h index 2faade2521..d6f5a8fff2 100644 --- a/app/src/main/cpp/waylandcomp/src/blend_pass.h +++ b/app/src/main/cpp/waylandcomp/src/blend_pass.h @@ -1,27 +1,12 @@ #ifndef BLEND_PASS_H #define BLEND_PASS_H -/* - * Alpha composition. The scene is composed with blits, which replace what is under them; a surface - * with translucent pixels (gamescope's overlay and notification planes over a game, a toolkit's - * shadowed popup) is drawn through this pass instead, source-over with premultiplied alpha. - * - * Compositor thread. Objects are built on the first use; if the driver refuses them the pass is - * unavailable for the session (logged once) and the caller keeps blitting. - */ #define VK_USE_PLATFORM_ANDROID_KHR #include <vulkan/vulkan.h> -/* Called from dev_init (device up). */ void blendp_bind_device(VkDevice dev); -/* A source or target image is about to be destroyed: drop what is cached for it. Frames are fenced, - * so nothing submitted still uses it. */ void blendp_forget_image(VkImage img); -/* A new command buffer is being recorded: what the previous one used may be recycled again. */ void blendp_begin_frame(void); -/* Record one surface over `dst`. `dst` is in TRANSFER_DST_OPTIMAL before and after. `src` was created - * with SAMPLED usage and is in GENERAL (src_general) or TRANSFER_SRC_OPTIMAL, and is left there. - * `blit` is the draw as the blit path maps it. 0 = recorded, -1 = unavailable (nothing recorded). */ int blendp_draw(VkCommandBuffer cmd, VkImage src, VkFormat src_fmt, int src_w, int src_h, int src_general, VkImage dst, VkFormat dst_fmt, int dst_w, int dst_h, const VkImageBlit *blit); diff --git a/app/src/main/cpp/waylandcomp/src/blend_vert.h b/app/src/main/cpp/waylandcomp/src/blend_vert.h index f402c6a926..a296cb0c00 100644 --- a/app/src/main/cpp/waylandcomp/src/blend_vert.h +++ b/app/src/main/cpp/waylandcomp/src/blend_vert.h @@ -1,4 +1,3 @@ - // 1115.1.0 #pragma once const uint32_t blend_vert_code[] = { 0x07230203,0x00010000,0x0008000b,0x0000003a,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/waylandcomp/src/cardboard.c b/app/src/main/cpp/waylandcomp/src/cardboard.c new file mode 100644 index 0000000000..fc09d2f030 --- /dev/null +++ b/app/src/main/cpp/waylandcomp/src/cardboard.c @@ -0,0 +1,462 @@ +#define _POSIX_C_SOURCE 200809L +#include "cardboard.h" +#include <math.h> +#include <pthread.h> +#include <string.h> + +#ifndef CARDBOARD_HOST_TEST +#include <fcntl.h> +#include <stdatomic.h> +#include <sys/mman.h> +#include <time.h> +#include <unistd.h> +#include "headpose_shm.h" +#endif + +#ifndef CARDBOARD_HOST_TEST +#include "vk_loader.h" +#include "vk_present.h" + +#define upscale_vert_code cardboard_upscale_vert_code +#include "upscale_vert.h" +#undef upscale_vert_code +#include "cardboard_frag.h" +#endif + + +static float clampf(float v, float lo, float hi) { return v < lo ? lo : v > hi ? hi : v; } + +void cardboard_clamp(struct cardboard_params *p) { + p->enabled = p->enabled ? 1 : 0; + if (p->source < CARDBOARD_SOURCE_SCREEN || p->source > CARDBOARD_SOURCE_FLAT) p->source = CARDBOARD_SOURCE_SCREEN; + p->ipd_m = clampf(p->ipd_m, 0.0f, 0.1f); + p->screen_dist_m = clampf(p->screen_dist_m, 0.5f, 50.0f); + p->screen_width_m = clampf(p->screen_width_m, 0.2f, 60.0f); + p->k1 = clampf(p->k1, -1.0f, 2.0f); + p->k2 = clampf(p->k2, -1.0f, 2.0f); + // Optical vertical FOV on supported glasses can be as low as ~22 degrees. + p->fov_deg = clampf(p->fov_deg, 20.0f, 140.0f); + p->lens_inset = clampf(p->lens_inset, -0.25f, 0.25f); + p->chroma = clampf(p->chroma, 0.0f, 0.05f); + p->mono = p->mono ? 1 : 0; + p->display_hz = clampf(p->display_hz, 0.0f, 240.0f); +} + +void cardboard_push_constants(const struct cardboard_params *p, const float pose[9], + int src_w, int src_h, int out_w, int out_h, float out[24]) { + for (int r = 0; r < 3; r++) + for (int c = 0; c < 3; c++) out[r * 4 + c] = pose[r * 3 + c]; + out[3] = p->mono ? 0.0f : p->ipd_m * 0.5f; + out[7] = p->screen_dist_m; + out[11] = p->screen_width_m * 0.5f; + out[12] = p->k1; + out[13] = p->k2; + out[14] = tanf(p->fov_deg * 0.5f * (float)M_PI / 180.0f); + out[15] = p->chroma; + out[16] = p->lens_inset; + out[17] = (src_w > 0 && src_h > 0) ? (float)src_w / (float)src_h : 16.0f / 9.0f; + if (p->source == CARDBOARD_SOURCE_SBS) out[17] *= 0.5f; + out[18] = (float)p->source; + out[19] = (out_w > 0 && out_h > 0) ? ((float)out_w * (p->mono ? 1.0f : 0.5f)) / (float)out_h : 1.0f; + out[20] = p->mono ? 1.0f : 0.0f; + out[21] = out[22] = out[23] = 0.0f; +} + +void cardboard_push_translation(const struct cardboard_params *p, const float position[3], float out[24]) { + for (int i = 0; i < 3; ++i) out[21+i] = p->source == CARDBOARD_SOURCE_SCREEN && isfinite(position[i]) ? position[i] : 0.0f; +} + +#ifndef CARDBOARD_HOST_TEST + +static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; +static struct cardboard_params g_set = { + .enabled = 0, .source = CARDBOARD_SOURCE_SCREEN, .ipd_m = 0.064f, .screen_dist_m = 3.0f, + .screen_width_m = 4.0f, .k1 = 0.22f, .k2 = 0.24f, .fov_deg = 90.0f, .lens_inset = 0.0f, .chroma = 0.0f}; +static float g_pose[9] = {1, 0, 0, 0, 1, 0, 0, 0, 1}; +static volatile int g_changed = 1; + +static float g_position[3]; +static int g_live; +static void shm_publish(int live); + +void vkp_cardboard_set(const struct cardboard_params *p) { + struct cardboard_params c = *p; + cardboard_clamp(&c); + pthread_mutex_lock(&g_lock); + int was = g_set.enabled; + g_set = c; + g_changed = 1; + shm_publish(g_live); + pthread_mutex_unlock(&g_lock); + if (was != c.enabled || c.enabled) + droiddeck_log("cardboard", "%s: %s%s, ipd %.0f mm, screen %.1f m wide at %.1f m, lens k1 %.2f k2 %.2f, fov %.0f, inset %.3f, chroma %.3f", + c.enabled ? "on" : "off", c.source == CARDBOARD_SOURCE_SBS ? "side-by-side source" : + c.source == CARDBOARD_SOURCE_FLAT ? "flat image in both eyes" : "virtual screen", + c.mono ? " (one eye)" : "", c.ipd_m * 1000.0f, c.screen_width_m, c.screen_dist_m, c.k1, c.k2, c.fov_deg, c.lens_inset, c.chroma); +} + +static struct droiddeck_headpose *g_shm; +static int g_eye_w, g_eye_h; +static int g_render_height; + +void vkp_cardboard_set_render_height(int height) { + pthread_mutex_lock(&g_lock); + g_render_height = height > 0 ? height : 0; + shm_publish(g_live); + pthread_mutex_unlock(&g_lock); +} + +void vkp_cardboard_set_pose_file(const char *path) { + pthread_mutex_lock(&g_lock); + if (!g_shm && path && *path) { + int fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0600); + if (fd >= 0 && ftruncate(fd, sizeof(struct droiddeck_headpose)) == 0) { + void *p = mmap(NULL, sizeof(struct droiddeck_headpose), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (p != MAP_FAILED) { + g_shm = p; + memset(g_shm, 0, sizeof(*g_shm)); + g_shm->magic = DROIDDECK_HEADPOSE_MAGIC; + g_shm->version = DROIDDECK_HEADPOSE_VERSION; + memcpy(g_shm->rot, g_pose, sizeof(g_shm->rot)); + shm_publish(g_live); + } + } + if (fd >= 0) close(fd); + droiddeck_log("cardboard", g_shm ? "head pose shared with the guest at %s" : "could not share the head pose at %s", path); + } + pthread_mutex_unlock(&g_lock); +} + +static void shm_publish(int live) { + if (!g_shm) return; + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + atomic_uint *seq = (atomic_uint *)&g_shm->seq; + unsigned s = atomic_load_explicit(seq, memory_order_relaxed); + atomic_store_explicit(seq, s | 1u, memory_order_relaxed); + atomic_thread_fence(memory_order_release); + memcpy(g_shm->rot, g_pose, sizeof(g_shm->rot)); + g_shm->ipd_m = g_set.ipd_m; + g_shm->flags = (live ? DROIDDECK_HEADPOSE_LIVE : 0u) | (g_set.enabled ? DROIDDECK_HEADPOSE_ENABLED : 0u) | + (g_set.mono ? DROIDDECK_HEADPOSE_MONO : 0u); + g_shm->display_hz = g_set.display_hz; + g_shm->render_height = (uint32_t)g_render_height; + g_shm->time_ns = (int64_t)ts.tv_sec * 1000000000LL + ts.tv_nsec; + g_shm->tan_half_fov = tanf(g_set.fov_deg * 0.5f * (float)M_PI / 180.0f); + g_shm->eye_w = (uint32_t)(g_eye_w > 0 ? g_eye_w : 0); + g_shm->eye_h = (uint32_t)(g_eye_h > 0 ? g_eye_h : 0); + g_shm->eye_aspect = g_eye_h > 0 ? (float)g_eye_w / (float)g_eye_h : 1.0f; + atomic_thread_fence(memory_order_release); + atomic_store_explicit(seq, (s | 1u) + 1u, memory_order_relaxed); +} + + +void vkp_cardboard_set_spatial_pose(const float m[9], const float position[3], int live) { + pthread_mutex_lock(&g_lock); + memcpy(g_pose, m, sizeof(g_pose)); + memcpy(g_position, position, sizeof(g_position)); + g_live = live; + if (g_set.enabled && g_set.source == CARDBOARD_SOURCE_SCREEN) g_changed = 1; + shm_publish(live); + pthread_mutex_unlock(&g_lock); +} + +void vkp_cardboard_set_pose(const float m[9], int live) { + const float zero[3] = {0}; + vkp_cardboard_set_spatial_pose(m, zero, live); +} + + +static struct cardboard_params g_cur; +static float g_cur_pose[9]; +static float g_cur_position[3]; + +static void snapshot(void) { + pthread_mutex_lock(&g_lock); + g_cur = g_set; + memcpy(g_cur_pose, g_pose, sizeof(g_cur_pose)); + memcpy(g_cur_position, g_position, sizeof(g_cur_position)); + pthread_mutex_unlock(&g_lock); +} + +int vkp_cardboard_active(void) { + pthread_mutex_lock(&g_lock); + int on = g_set.enabled; + pthread_mutex_unlock(&g_lock); + return on; +} + +int vkp_cardboard_pose_changed(void) { + if (!g_changed) return 0; + g_changed = 0; + return 1; +} + + +#define CB_FORMAT VK_FORMAT_R8G8B8A8_UNORM +#define CB_PC_SIZE (4 * 4 + 24 * 4) +#define CB_MAX_SOURCES 8 + +static VkDevice g_dev; +static VkPhysicalDeviceMemoryProperties g_mp; +static int g_ready; +static VkRenderPass g_rp; +static VkDescriptorSetLayout g_dsl; +static VkPipelineLayout g_pl; +static VkDescriptorPool g_dpool; +static VkSampler g_sampler; +static VkPipeline g_pipe; +static struct { VkImage img; VkDeviceMemory mem; VkImageView view; VkFramebuffer fb; int w, h; } g_t; +static struct { VkImageView view; VkDescriptorSet ds; } g_src[CB_MAX_SOURCES]; +static int g_nsrc; + +void vkp_cardboard_bind_device(VkDevice dev, const VkPhysicalDeviceMemoryProperties *memprops) { + g_dev = dev; + g_mp = *memprops; +} + +static int memtype(uint32_t bits, VkMemoryPropertyFlags want) { + for (uint32_t i = 0; i < g_mp.memoryTypeCount; i++) + if ((bits & (1u << i)) && (g_mp.memoryTypes[i].propertyFlags & want) == want) return (int)i; + return -1; +} + +static void sources_release(void) { + for (int i = 0; i < g_nsrc; i++) { + if (g_src[i].ds) g_vk.FreeDescriptorSets(g_dev, g_dpool, 1, &g_src[i].ds); + if (g_src[i].view) g_vk.DestroyImageView(g_dev, g_src[i].view, NULL); + } + memset(g_src, 0, sizeof(g_src)); + g_nsrc = 0; +} + +void vkp_cardboard_begin_frame(void) { + if (g_ready == 1) sources_release(); +} + +static void target_destroy(void) { + if (g_t.fb) g_vk.DestroyFramebuffer(g_dev, g_t.fb, NULL); + if (g_t.view) g_vk.DestroyImageView(g_dev, g_t.view, NULL); + if (g_t.img) g_vk.DestroyImage(g_dev, g_t.img, NULL); + if (g_t.mem) g_vk.FreeMemory(g_dev, g_t.mem, NULL); + memset(&g_t, 0, sizeof(g_t)); +} + +static VkImageView make_view(VkImage img) { + VkImageView v = VK_NULL_HANDLE; + VkImageViewCreateInfo ci = {.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, .image = img, + .viewType = VK_IMAGE_VIEW_TYPE_2D, .format = CB_FORMAT, + .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}}; + if (g_vk.CreateImageView(g_dev, &ci, NULL, &v) != VK_SUCCESS) return VK_NULL_HANDLE; + return v; +} + +static int target_ensure(int w, int h) { + if (g_t.img && g_t.w == w && g_t.h == h) return 0; + target_destroy(); + VkImageCreateInfo ii = {.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, + .imageType = VK_IMAGE_TYPE_2D, .format = CB_FORMAT, .extent = {(uint32_t)w, (uint32_t)h, 1}, + .mipLevels = 1, .arrayLayers = 1, .samples = VK_SAMPLE_COUNT_1_BIT, + .tiling = VK_IMAGE_TILING_OPTIMAL, + .usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, + .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED}; + if (g_vk.CreateImage(g_dev, &ii, NULL, &g_t.img) != VK_SUCCESS) goto fail; + VkMemoryRequirements req; + g_vk.GetImageMemoryRequirements(g_dev, g_t.img, &req); + int idx = memtype(req.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); + if (idx < 0) idx = memtype(req.memoryTypeBits, 0); + VkMemoryAllocateInfo mai = {.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, .allocationSize = req.size, + .memoryTypeIndex = (uint32_t)(idx < 0 ? 0 : idx)}; + if (g_vk.AllocateMemory(g_dev, &mai, NULL, &g_t.mem) != VK_SUCCESS) goto fail; + g_vk.BindImageMemory(g_dev, g_t.img, g_t.mem, 0); + if (!(g_t.view = make_view(g_t.img))) goto fail; + VkFramebufferCreateInfo fi = {.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, .renderPass = g_rp, + .attachmentCount = 1, .pAttachments = &g_t.view, .width = (uint32_t)w, + .height = (uint32_t)h, .layers = 1}; + if (g_vk.CreateFramebuffer(g_dev, &fi, NULL, &g_t.fb) != VK_SUCCESS) goto fail; + g_t.w = w; + g_t.h = h; + droiddeck_log("cardboard", "eye target %dx%d (two %dx%d eyes)", w, h, w / 2, h); + return 0; +fail: + droiddeck_log("error", "cardboard: could not create the %dx%d eye target", w, h); + target_destroy(); + return -1; +} + +static VkShaderModule shader(const uint32_t *code, size_t size) { + VkShaderModule m = VK_NULL_HANDLE; + VkShaderModuleCreateInfo ci = {.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, .codeSize = size, .pCode = code}; + if (g_vk.CreateShaderModule(g_dev, &ci, NULL, &m) != VK_SUCCESS) return VK_NULL_HANDLE; + return m; +} + +static void objects_destroy(void) { + if (!g_dev) return; + sources_release(); + target_destroy(); + if (g_pipe) g_vk.DestroyPipeline(g_dev, g_pipe, NULL); + if (g_dpool) g_vk.DestroyDescriptorPool(g_dev, g_dpool, NULL); + if (g_pl) g_vk.DestroyPipelineLayout(g_dev, g_pl, NULL); + if (g_dsl) g_vk.DestroyDescriptorSetLayout(g_dev, g_dsl, NULL); + if (g_sampler) g_vk.DestroySampler(g_dev, g_sampler, NULL); + if (g_rp) g_vk.DestroyRenderPass(g_dev, g_rp, NULL); + g_pipe = VK_NULL_HANDLE; g_dpool = VK_NULL_HANDLE; g_pl = VK_NULL_HANDLE; + g_dsl = VK_NULL_HANDLE; g_sampler = VK_NULL_HANDLE; g_rp = VK_NULL_HANDLE; +} + +static int objects_ensure(void) { + if (g_ready) return g_ready == 1 ? 0 : -1; + if (!g_dev || !g_vk.CreateGraphicsPipelines) goto fail; + { + VkAttachmentDescription att = {.format = CB_FORMAT, .samples = VK_SAMPLE_COUNT_1_BIT, + .loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE, .storeOp = VK_ATTACHMENT_STORE_OP_STORE, + .stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE, + .stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE, + .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, .finalLayout = VK_IMAGE_LAYOUT_GENERAL}; + VkAttachmentReference ref = {0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}; + VkSubpassDescription sub = {.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS, .colorAttachmentCount = 1, + .pColorAttachments = &ref}; + VkSubpassDependency deps[2] = { + {.srcSubpass = VK_SUBPASS_EXTERNAL, .dstSubpass = 0, + .srcStageMask = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + .dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT | VK_ACCESS_TRANSFER_READ_BIT, + .dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_SHADER_READ_BIT}, + {.srcSubpass = 0, .dstSubpass = VK_SUBPASS_EXTERNAL, + .srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, + .dstStageMask = VK_PIPELINE_STAGE_TRANSFER_BIT, + .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT}}; + VkRenderPassCreateInfo rci = {.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, .attachmentCount = 1, + .pAttachments = &att, .subpassCount = 1, .pSubpasses = &sub, + .dependencyCount = 2, .pDependencies = deps}; + if (g_vk.CreateRenderPass(g_dev, &rci, NULL, &g_rp) != VK_SUCCESS) goto fail; + + VkSamplerCreateInfo sci = {.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, .magFilter = VK_FILTER_LINEAR, + .minFilter = VK_FILTER_LINEAR, .mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST, + .addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + .addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + .addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE}; + if (g_vk.CreateSampler(g_dev, &sci, NULL, &g_sampler) != VK_SUCCESS) goto fail; + + VkDescriptorSetLayoutBinding b = {.binding = 0, .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, + .descriptorCount = 1, .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT}; + VkDescriptorSetLayoutCreateInfo dli = {.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, + .bindingCount = 1, .pBindings = &b}; + if (g_vk.CreateDescriptorSetLayout(g_dev, &dli, NULL, &g_dsl) != VK_SUCCESS) goto fail; + VkPushConstantRange pcr = {.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, + .offset = 0, .size = CB_PC_SIZE}; + VkPipelineLayoutCreateInfo pli = {.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, .setLayoutCount = 1, + .pSetLayouts = &g_dsl, .pushConstantRangeCount = 1, .pPushConstantRanges = &pcr}; + if (g_vk.CreatePipelineLayout(g_dev, &pli, NULL, &g_pl) != VK_SUCCESS) goto fail; + VkDescriptorPoolSize ps = {VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, CB_MAX_SOURCES}; + VkDescriptorPoolCreateInfo dpi = {.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, + .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, + .maxSets = CB_MAX_SOURCES, .poolSizeCount = 1, .pPoolSizes = &ps}; + if (g_vk.CreateDescriptorPool(g_dev, &dpi, NULL, &g_dpool) != VK_SUCCESS) goto fail; + + VkShaderModule vert = shader(cardboard_upscale_vert_code, sizeof(cardboard_upscale_vert_code)); + VkShaderModule frag = shader(cardboard_frag_code, sizeof(cardboard_frag_code)); + if (!vert || !frag) { + if (vert) g_vk.DestroyShaderModule(g_dev, vert, NULL); + if (frag) g_vk.DestroyShaderModule(g_dev, frag, NULL); + goto fail; + } + VkPipelineShaderStageCreateInfo st[2] = { + {.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, .stage = VK_SHADER_STAGE_VERTEX_BIT, .module = vert, .pName = "main"}, + {.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, .stage = VK_SHADER_STAGE_FRAGMENT_BIT, .module = frag, .pName = "main"}}; + VkPipelineVertexInputStateCreateInfo vi = {.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO}; + VkPipelineInputAssemblyStateCreateInfo ia = {.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, + .topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP}; + VkDynamicState dyn[2] = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR}; + VkPipelineDynamicStateCreateInfo ds = {.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, + .dynamicStateCount = 2, .pDynamicStates = dyn}; + VkPipelineViewportStateCreateInfo vp = {.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, + .viewportCount = 1, .scissorCount = 1}; + VkPipelineRasterizationStateCreateInfo rs = {.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, + .polygonMode = VK_POLYGON_MODE_FILL, .cullMode = VK_CULL_MODE_NONE, + .frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE, .lineWidth = 1.0f}; + VkPipelineMultisampleStateCreateInfo ms = {.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, + .rasterizationSamples = VK_SAMPLE_COUNT_1_BIT}; + VkPipelineColorBlendAttachmentState ba = {.blendEnable = VK_FALSE, .colorWriteMask = 0xF}; + VkPipelineColorBlendStateCreateInfo cb = {.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, + .attachmentCount = 1, .pAttachments = &ba}; + VkGraphicsPipelineCreateInfo pi = {.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, .stageCount = 2, + .pStages = st, .pVertexInputState = &vi, .pInputAssemblyState = &ia, + .pViewportState = &vp, .pRasterizationState = &rs, .pMultisampleState = &ms, + .pColorBlendState = &cb, .pDynamicState = &ds, .layout = g_pl, + .renderPass = g_rp, .subpass = 0}; + VkResult r = g_vk.CreateGraphicsPipelines(g_dev, VK_NULL_HANDLE, 1, &pi, NULL, &g_pipe); + g_vk.DestroyShaderModule(g_dev, vert, NULL); + g_vk.DestroyShaderModule(g_dev, frag, NULL); + if (r != VK_SUCCESS) goto fail; + } + g_ready = 1; + droiddeck_log("cardboard", "pass ready on %s", vkp_gpu_name()); + return 0; +fail: + objects_destroy(); + g_ready = -1; + droiddeck_log("error", "cardboard: the pass could not be built on this driver; frames are shown flat"); + return -1; +} + +static VkDescriptorSet source_ds(VkImage src) { + if (g_nsrc >= CB_MAX_SOURCES) return VK_NULL_HANDLE; + VkImageView view = make_view(src); + if (!view) return VK_NULL_HANDLE; + VkDescriptorSet ds = VK_NULL_HANDLE; + VkDescriptorSetAllocateInfo ai = {.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, + .descriptorPool = g_dpool, .descriptorSetCount = 1, .pSetLayouts = &g_dsl}; + if (g_vk.AllocateDescriptorSets(g_dev, &ai, &ds) != VK_SUCCESS) { + g_vk.DestroyImageView(g_dev, view, NULL); + return VK_NULL_HANDLE; + } + VkDescriptorImageInfo ii = {.sampler = g_sampler, .imageView = view, .imageLayout = VK_IMAGE_LAYOUT_GENERAL}; + VkWriteDescriptorSet wr = {.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, .dstSet = ds, .dstBinding = 0, + .descriptorCount = 1, .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, + .pImageInfo = &ii}; + g_vk.UpdateDescriptorSets(g_dev, 1, &wr, 0, NULL); + g_src[g_nsrc].view = view; + g_src[g_nsrc].ds = ds; + g_nsrc++; + return ds; +} + +VkImage vkp_cardboard_run(VkCommandBuffer cmd, VkImage src, int src_w, int src_h, int out_w, int out_h) { + if (out_w < 2 || out_h < 1 || objects_ensure() != 0 || target_ensure(out_w, out_h) != 0) return VK_NULL_HANDLE; + VkDescriptorSet ds = source_ds(src); + if (!ds) { + static int said; + if (!said) { said = 1; droiddeck_log("error", "cardboard: no descriptor for the frame; shown flat"); } + return VK_NULL_HANDLE; + } + snapshot(); + int eye_w = g_cur.mono ? out_w : out_w / 2; + if (g_eye_w != eye_w || g_eye_h != out_h) { + pthread_mutex_lock(&g_lock); + g_eye_w = eye_w; + g_eye_h = out_h; + shm_publish(g_live); + pthread_mutex_unlock(&g_lock); + } + struct { float ndc[4]; float rest[24]; } pc = {{-1.0f, -1.0f, 1.0f, 1.0f}, {0}}; + cardboard_push_constants(&g_cur, g_cur_pose, src_w, src_h, out_w, out_h, pc.rest); + cardboard_push_translation(&g_cur, g_cur_position, pc.rest); + + VkRenderPassBeginInfo rpi = {.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, .renderPass = g_rp, + .framebuffer = g_t.fb, .renderArea = {{0, 0}, {(uint32_t)out_w, (uint32_t)out_h}}}; + VkViewport vp = {0, 0, (float)out_w, (float)out_h, 0, 1}; + VkRect2D sc = {{0, 0}, {(uint32_t)out_w, (uint32_t)out_h}}; + g_vk.CmdBeginRenderPass(cmd, &rpi, VK_SUBPASS_CONTENTS_INLINE); + g_vk.CmdSetViewport(cmd, 0, 1, &vp); + g_vk.CmdSetScissor(cmd, 0, 1, &sc); + g_vk.CmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, g_pipe); + g_vk.CmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, g_pl, 0, 1, &ds, 0, NULL); + g_vk.CmdPushConstants(cmd, g_pl, VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, 0, sizeof(pc), &pc); + g_vk.CmdDraw(cmd, 4, 1, 0, 0); + g_vk.CmdEndRenderPass(cmd); + return g_t.img; +} + +#endif diff --git a/app/src/main/cpp/waylandcomp/src/cardboard.frag b/app/src/main/cpp/waylandcomp/src/cardboard.frag new file mode 100644 index 0000000000..33298f7b87 --- /dev/null +++ b/app/src/main/cpp/waylandcomp/src/cardboard.frag @@ -0,0 +1,69 @@ +#version 450 +layout(binding = 0) uniform sampler2D Source; +layout(location = 0) in vec2 uv; +layout(location = 0) out vec4 outColor; + +layout(push_constant) uniform PC { + vec4 ndc; + vec4 rot0; + vec4 rot1; + vec4 rot2; + vec4 lens; + vec4 view; + vec4 extra; +} pc; + +const vec3 BACKDROP = vec3(0.015, 0.015, 0.02); + +vec2 undistort(vec2 t, float scale) { + float r2 = dot(t, t); + return t * scale * (1.0 + pc.lens.x * r2 + pc.lens.y * r2 * r2); +} + +vec3 eyeSample(vec2 tan, float eye) { + if (pc.view.z > 0.5) { + float tanH = pc.lens.z; + vec2 s = vec2(tan.x / (tanH * pc.view.w), tan.y / tanH) * 0.5 + 0.5; + if (pc.view.z > 1.5) { + vec2 fit = max(vec2(pc.view.w / pc.view.y, pc.view.y / pc.view.w), vec2(1.0)); + s = (s - 0.5) * fit + 0.5; + if (any(lessThan(s, vec2(0.0))) || any(greaterThan(s, vec2(1.0)))) return vec3(0.0); + return texture(Source, s).rgb; + } + if (any(lessThan(s, vec2(0.0))) || any(greaterThan(s, vec2(1.0)))) return vec3(0.0); + return texture(Source, vec2((s.x + eye) * 0.5, s.y)).rgb; + } + mat3 R = transpose(mat3(pc.rot0.xyz, pc.rot1.xyz, pc.rot2.xyz)); + vec3 d = R * normalize(vec3(tan.x, -tan.y, -1.0)); + vec3 o = pc.extra.yzw + R * vec3((eye < 0.5 ? -1.0 : 1.0) * pc.rot0.w, 0.0, 0.0); + if (d.z > -1e-4) return BACKDROP; + float t = (-pc.rot1.w - o.z) / d.z; + if (t <= 0.0) return BACKDROP; + vec3 hit = o + d * t; + float halfW = pc.rot2.w, halfH = halfW / pc.view.y; + vec2 s = vec2(hit.x / halfW, -hit.y / halfH) * 0.5 + 0.5; + if (any(lessThan(s, vec2(0.0))) || any(greaterThan(s, vec2(1.0)))) return BACKDROP; + return texture(Source, s).rgb; +} + +void main() { + bool mono = pc.extra.x > 0.5; + float eye = mono || uv.x < 0.5 ? 0.0 : 1.0; + vec2 local = mono ? uv : vec2(uv.x * 2.0 - eye, uv.y); + float cx = mono ? 0.5 : 0.5 + (eye < 0.5 ? pc.view.x : -pc.view.x); + vec2 p = local - vec2(cx, 0.5); + float tanH = pc.lens.z; + vec2 t = vec2(p.x * pc.view.w, p.y) * 2.0 * tanH; + + vec3 c; + if (pc.lens.w > 0.0) { + c.r = eyeSample(undistort(t, 1.0 - pc.lens.w), eye).r; + c.g = eyeSample(undistort(t, 1.0), eye).g; + c.b = eyeSample(undistort(t, 1.0 + pc.lens.w), eye).b; + } else { + c = eyeSample(undistort(t, 1.0), eye); + } + vec2 e = min(local, 1.0 - local); + float fade = smoothstep(0.0, 0.03, min(e.x * pc.view.w, e.y)); + outColor = vec4(c * fade, 1.0); +} diff --git a/app/src/main/cpp/waylandcomp/src/cardboard.h b/app/src/main/cpp/waylandcomp/src/cardboard.h new file mode 100644 index 0000000000..88d5ea3ff7 --- /dev/null +++ b/app/src/main/cpp/waylandcomp/src/cardboard.h @@ -0,0 +1,39 @@ +#ifndef CARDBOARD_H +#define CARDBOARD_H +#define VK_USE_PLATFORM_ANDROID_KHR +#include <vulkan/vulkan.h> + +enum { CARDBOARD_SOURCE_SCREEN = 0, CARDBOARD_SOURCE_SBS = 1, CARDBOARD_SOURCE_FLAT = 2 }; + +struct cardboard_params { + int enabled; + int source; + float ipd_m; + float screen_dist_m; + float screen_width_m; + float k1, k2; + float fov_deg; + float lens_inset; + float chroma; + int mono; + float display_hz; +}; + +void vkp_cardboard_set(const struct cardboard_params *p); +void vkp_cardboard_set_pose(const float m[9], int live); +void vkp_cardboard_set_spatial_pose(const float m[9], const float position[3], int live); +void vkp_cardboard_set_pose_file(const char *path); +void vkp_cardboard_set_render_height(int height); + +void vkp_cardboard_bind_device(VkDevice dev, const VkPhysicalDeviceMemoryProperties *memprops); +int vkp_cardboard_active(void); +int vkp_cardboard_pose_changed(void); +void vkp_cardboard_begin_frame(void); +VkImage vkp_cardboard_run(VkCommandBuffer cmd, VkImage src, int src_w, int src_h, int out_w, int out_h); + +void cardboard_clamp(struct cardboard_params *p); +void cardboard_push_constants(const struct cardboard_params *p, const float pose[9], + int src_w, int src_h, int out_w, int out_h, float out[24]); +void cardboard_push_translation(const struct cardboard_params *p, const float position[3], float out[24]); + +#endif diff --git a/app/src/main/cpp/waylandcomp/src/cardboard_frag.h b/app/src/main/cpp/waylandcomp/src/cardboard_frag.h new file mode 100644 index 0000000000..f74676d6a9 --- /dev/null +++ b/app/src/main/cpp/waylandcomp/src/cardboard_frag.h @@ -0,0 +1,317 @@ + // 1115.1.0 + #pragma once +const uint32_t cardboard_frag_code[] = { + 0x07230203,0x00010000,0x0008000b,0x000001ba,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000012d,0x000001b2,0x00030010, + 0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x00040005,0x00000004,0x6e69616d, + 0x00000000,0x00070005,0x0000000d,0x69646e75,0x726f7473,0x66762874,0x31663b32,0x0000003b, + 0x00030005,0x0000000b,0x00000074,0x00040005,0x0000000c,0x6c616373,0x00000065,0x00070005, + 0x00000013,0x53657965,0x6c706d61,0x66762865,0x31663b32,0x0000003b,0x00030005,0x00000011, + 0x006e6174,0x00030005,0x00000012,0x00657965,0x00030005,0x00000015,0x00003272,0x00030005, + 0x0000001e,0x00004350,0x00040006,0x0000001e,0x00000000,0x0063646e,0x00050006,0x0000001e, + 0x00000001,0x30746f72,0x00000000,0x00050006,0x0000001e,0x00000002,0x31746f72,0x00000000, + 0x00050006,0x0000001e,0x00000003,0x32746f72,0x00000000,0x00050006,0x0000001e,0x00000004, + 0x736e656c,0x00000000,0x00050006,0x0000001e,0x00000005,0x77656976,0x00000000,0x00050006, + 0x0000001e,0x00000006,0x72747865,0x00000061,0x00030005,0x00000020,0x00006370,0x00040005, + 0x0000003f,0x486e6174,0x00000000,0x00030005,0x00000042,0x00000073,0x00030005,0x00000059, + 0x00746966,0x00040005,0x00000082,0x72756f53,0x00006563,0x00030005,0x000000a3,0x00000052, + 0x00030005,0x000000c0,0x00000064,0x00030005,0x000000cb,0x0000006f,0x00030005,0x000000e4, + 0x00000074,0x00030005,0x000000f3,0x00746968,0x00040005,0x000000f9,0x666c6168,0x00000057, + 0x00040005,0x000000fc,0x666c6168,0x00000048,0x00030005,0x00000101,0x00000073,0x00040005, + 0x00000123,0x6f6e6f6d,0x00000000,0x00030005,0x00000127,0x00657965,0x00030005,0x0000012d, + 0x00007675,0x00040005,0x00000134,0x61636f6c,0x0000006c,0x00030005,0x00000145,0x00007863, + 0x00030005,0x00000159,0x00000070,0x00040005,0x0000015e,0x486e6174,0x00000000,0x00030005, + 0x00000161,0x00000074,0x00030005,0x00000172,0x00000063,0x00040005,0x00000176,0x61726170, + 0x0000006d,0x00040005,0x00000178,0x61726170,0x0000006d,0x00040005,0x0000017a,0x61726170, + 0x0000006d,0x00040005,0x0000017b,0x61726170,0x0000006d,0x00040005,0x00000180,0x61726170, + 0x0000006d,0x00040005,0x00000182,0x61726170,0x0000006d,0x00040005,0x00000184,0x61726170, + 0x0000006d,0x00040005,0x00000185,0x61726170,0x0000006d,0x00040005,0x0000018d,0x61726170, + 0x0000006d,0x00040005,0x0000018f,0x61726170,0x0000006d,0x00040005,0x00000191,0x61726170, + 0x0000006d,0x00040005,0x00000192,0x61726170,0x0000006d,0x00040005,0x00000198,0x61726170, + 0x0000006d,0x00040005,0x0000019a,0x61726170,0x0000006d,0x00040005,0x0000019c,0x61726170, + 0x0000006d,0x00040005,0x0000019d,0x61726170,0x0000006d,0x00030005,0x000001a0,0x00000065, + 0x00040005,0x000001a6,0x65646166,0x00000000,0x00050005,0x000001b2,0x4374756f,0x726f6c6f, + 0x00000000,0x00030047,0x0000001e,0x00000002,0x00050048,0x0000001e,0x00000000,0x00000023, + 0x00000000,0x00050048,0x0000001e,0x00000001,0x00000023,0x00000010,0x00050048,0x0000001e, + 0x00000002,0x00000023,0x00000020,0x00050048,0x0000001e,0x00000003,0x00000023,0x00000030, + 0x00050048,0x0000001e,0x00000004,0x00000023,0x00000040,0x00050048,0x0000001e,0x00000005, + 0x00000023,0x00000050,0x00050048,0x0000001e,0x00000006,0x00000023,0x00000060,0x00040047, + 0x00000082,0x00000021,0x00000000,0x00040047,0x00000082,0x00000022,0x00000000,0x00040047, + 0x0000012d,0x0000001e,0x00000000,0x00040047,0x000001b2,0x0000001e,0x00000000,0x00020013, + 0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,0x00000006,0x00000020,0x00040017, + 0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,0x00000007,0x00040020, + 0x00000009,0x00000007,0x00000006,0x00050021,0x0000000a,0x00000007,0x00000008,0x00000009, + 0x00040017,0x0000000f,0x00000006,0x00000003,0x00050021,0x00000010,0x0000000f,0x00000008, + 0x00000009,0x0004002b,0x00000006,0x0000001c,0x3f800000,0x00040017,0x0000001d,0x00000006, + 0x00000004,0x0009001e,0x0000001e,0x0000001d,0x0000001d,0x0000001d,0x0000001d,0x0000001d, + 0x0000001d,0x0000001d,0x00040020,0x0000001f,0x00000009,0x0000001e,0x0004003b,0x0000001f, + 0x00000020,0x00000009,0x00040015,0x00000021,0x00000020,0x00000001,0x0004002b,0x00000021, + 0x00000022,0x00000004,0x00040015,0x00000023,0x00000020,0x00000000,0x0004002b,0x00000023, + 0x00000024,0x00000000,0x00040020,0x00000025,0x00000009,0x00000006,0x0004002b,0x00000023, + 0x0000002b,0x00000001,0x0004002b,0x00000021,0x00000036,0x00000005,0x0004002b,0x00000023, + 0x00000037,0x00000002,0x0004002b,0x00000006,0x0000003a,0x3f000000,0x00020014,0x0000003b, + 0x0004002b,0x00000023,0x00000046,0x00000003,0x0004002b,0x00000006,0x00000055,0x3fc00000, + 0x0005002c,0x00000007,0x00000065,0x0000001c,0x0000001c,0x0004002b,0x00000006,0x0000006f, + 0x00000000,0x0005002c,0x00000007,0x00000070,0x0000006f,0x0000006f,0x00040017,0x00000071, + 0x0000003b,0x00000002,0x0006002c,0x0000000f,0x0000007d,0x0000006f,0x0000006f,0x0000006f, + 0x00090019,0x0000007f,0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001, + 0x00000000,0x0003001b,0x00000080,0x0000007f,0x00040020,0x00000081,0x00000000,0x00000080, + 0x0004003b,0x00000081,0x00000082,0x00000000,0x00040018,0x000000a1,0x0000000f,0x00000003, + 0x00040020,0x000000a2,0x00000007,0x000000a1,0x0004002b,0x00000021,0x000000a4,0x00000001, + 0x00040020,0x000000a5,0x00000009,0x0000001d,0x0004002b,0x00000021,0x000000a9,0x00000002, + 0x0004002b,0x00000021,0x000000ad,0x00000003,0x00040020,0x000000bf,0x00000007,0x0000000f, + 0x0004002b,0x00000006,0x000000c7,0xbf800000,0x0004002b,0x00000021,0x000000cc,0x00000006, + 0x0004002b,0x00000006,0x000000dc,0xb8d1b717,0x0004002b,0x00000006,0x000000e0,0x3c75c28f, + 0x0004002b,0x00000006,0x000000e1,0x3ca3d70a,0x0006002c,0x0000000f,0x000000e2,0x000000e0, + 0x000000e0,0x000000e1,0x00040020,0x00000122,0x00000007,0x0000003b,0x00040020,0x0000012c, + 0x00000001,0x00000007,0x0004003b,0x0000012c,0x0000012d,0x00000001,0x00040020,0x0000012e, + 0x00000001,0x00000006,0x0004002b,0x00000006,0x0000013d,0x40000000,0x0004002b,0x00000006, + 0x000001a7,0x3cf5c28f,0x00040020,0x000001b1,0x00000003,0x0000001d,0x0004003b,0x000001b1, + 0x000001b2,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8, + 0x00000005,0x0004003b,0x00000122,0x00000123,0x00000007,0x0004003b,0x00000009,0x00000127, + 0x00000007,0x0004003b,0x00000008,0x00000134,0x00000007,0x0004003b,0x00000008,0x00000136, + 0x00000007,0x0004003b,0x00000009,0x00000145,0x00000007,0x0004003b,0x00000009,0x00000147, + 0x00000007,0x0004003b,0x00000009,0x0000014d,0x00000007,0x0004003b,0x00000008,0x00000159, + 0x00000007,0x0004003b,0x00000009,0x0000015e,0x00000007,0x0004003b,0x00000008,0x00000161, + 0x00000007,0x0004003b,0x000000bf,0x00000172,0x00000007,0x0004003b,0x00000008,0x00000176, + 0x00000007,0x0004003b,0x00000009,0x00000178,0x00000007,0x0004003b,0x00000008,0x0000017a, + 0x00000007,0x0004003b,0x00000009,0x0000017b,0x00000007,0x0004003b,0x00000008,0x00000180, + 0x00000007,0x0004003b,0x00000009,0x00000182,0x00000007,0x0004003b,0x00000008,0x00000184, + 0x00000007,0x0004003b,0x00000009,0x00000185,0x00000007,0x0004003b,0x00000008,0x0000018d, + 0x00000007,0x0004003b,0x00000009,0x0000018f,0x00000007,0x0004003b,0x00000008,0x00000191, + 0x00000007,0x0004003b,0x00000009,0x00000192,0x00000007,0x0004003b,0x00000008,0x00000198, + 0x00000007,0x0004003b,0x00000009,0x0000019a,0x00000007,0x0004003b,0x00000008,0x0000019c, + 0x00000007,0x0004003b,0x00000009,0x0000019d,0x00000007,0x0004003b,0x00000008,0x000001a0, + 0x00000007,0x0004003b,0x00000009,0x000001a6,0x00000007,0x00060041,0x00000025,0x00000124, + 0x00000020,0x000000cc,0x00000024,0x0004003d,0x00000006,0x00000125,0x00000124,0x000500ba, + 0x0000003b,0x00000126,0x00000125,0x0000003a,0x0003003e,0x00000123,0x00000126,0x0004003d, + 0x0000003b,0x00000128,0x00000123,0x000400a8,0x0000003b,0x00000129,0x00000128,0x000300f7, + 0x0000012b,0x00000000,0x000400fa,0x00000129,0x0000012a,0x0000012b,0x000200f8,0x0000012a, + 0x00050041,0x0000012e,0x0000012f,0x0000012d,0x00000024,0x0004003d,0x00000006,0x00000130, + 0x0000012f,0x000500b8,0x0000003b,0x00000131,0x00000130,0x0000003a,0x000200f9,0x0000012b, + 0x000200f8,0x0000012b,0x000700f5,0x0000003b,0x00000132,0x00000128,0x00000005,0x00000131, + 0x0000012a,0x000600a9,0x00000006,0x00000133,0x00000132,0x0000006f,0x0000001c,0x0003003e, + 0x00000127,0x00000133,0x0004003d,0x0000003b,0x00000135,0x00000123,0x000300f7,0x00000138, + 0x00000000,0x000400fa,0x00000135,0x00000137,0x0000013a,0x000200f8,0x00000137,0x0004003d, + 0x00000007,0x00000139,0x0000012d,0x0003003e,0x00000136,0x00000139,0x000200f9,0x00000138, + 0x000200f8,0x0000013a,0x00050041,0x0000012e,0x0000013b,0x0000012d,0x00000024,0x0004003d, + 0x00000006,0x0000013c,0x0000013b,0x00050085,0x00000006,0x0000013e,0x0000013c,0x0000013d, + 0x0004003d,0x00000006,0x0000013f,0x00000127,0x00050083,0x00000006,0x00000140,0x0000013e, + 0x0000013f,0x00050041,0x0000012e,0x00000141,0x0000012d,0x0000002b,0x0004003d,0x00000006, + 0x00000142,0x00000141,0x00050050,0x00000007,0x00000143,0x00000140,0x00000142,0x0003003e, + 0x00000136,0x00000143,0x000200f9,0x00000138,0x000200f8,0x00000138,0x0004003d,0x00000007, + 0x00000144,0x00000136,0x0003003e,0x00000134,0x00000144,0x0004003d,0x0000003b,0x00000146, + 0x00000123,0x000300f7,0x00000149,0x00000000,0x000400fa,0x00000146,0x00000148,0x0000014a, + 0x000200f8,0x00000148,0x0003003e,0x00000147,0x0000003a,0x000200f9,0x00000149,0x000200f8, + 0x0000014a,0x0004003d,0x00000006,0x0000014b,0x00000127,0x000500b8,0x0000003b,0x0000014c, + 0x0000014b,0x0000003a,0x000300f7,0x0000014f,0x00000000,0x000400fa,0x0000014c,0x0000014e, + 0x00000152,0x000200f8,0x0000014e,0x00060041,0x00000025,0x00000150,0x00000020,0x00000036, + 0x00000024,0x0004003d,0x00000006,0x00000151,0x00000150,0x0003003e,0x0000014d,0x00000151, + 0x000200f9,0x0000014f,0x000200f8,0x00000152,0x00060041,0x00000025,0x00000153,0x00000020, + 0x00000036,0x00000024,0x0004003d,0x00000006,0x00000154,0x00000153,0x0004007f,0x00000006, + 0x00000155,0x00000154,0x0003003e,0x0000014d,0x00000155,0x000200f9,0x0000014f,0x000200f8, + 0x0000014f,0x0004003d,0x00000006,0x00000156,0x0000014d,0x00050081,0x00000006,0x00000157, + 0x0000003a,0x00000156,0x0003003e,0x00000147,0x00000157,0x000200f9,0x00000149,0x000200f8, + 0x00000149,0x0004003d,0x00000006,0x00000158,0x00000147,0x0003003e,0x00000145,0x00000158, + 0x0004003d,0x00000007,0x0000015a,0x00000134,0x0004003d,0x00000006,0x0000015b,0x00000145, + 0x00050050,0x00000007,0x0000015c,0x0000015b,0x0000003a,0x00050083,0x00000007,0x0000015d, + 0x0000015a,0x0000015c,0x0003003e,0x00000159,0x0000015d,0x00060041,0x00000025,0x0000015f, + 0x00000020,0x00000022,0x00000037,0x0004003d,0x00000006,0x00000160,0x0000015f,0x0003003e, + 0x0000015e,0x00000160,0x00050041,0x00000009,0x00000162,0x00000159,0x00000024,0x0004003d, + 0x00000006,0x00000163,0x00000162,0x00060041,0x00000025,0x00000164,0x00000020,0x00000036, + 0x00000046,0x0004003d,0x00000006,0x00000165,0x00000164,0x00050085,0x00000006,0x00000166, + 0x00000163,0x00000165,0x00050041,0x00000009,0x00000167,0x00000159,0x0000002b,0x0004003d, + 0x00000006,0x00000168,0x00000167,0x00050050,0x00000007,0x00000169,0x00000166,0x00000168, + 0x0005008e,0x00000007,0x0000016a,0x00000169,0x0000013d,0x0004003d,0x00000006,0x0000016b, + 0x0000015e,0x0005008e,0x00000007,0x0000016c,0x0000016a,0x0000016b,0x0003003e,0x00000161, + 0x0000016c,0x00060041,0x00000025,0x0000016d,0x00000020,0x00000022,0x00000046,0x0004003d, + 0x00000006,0x0000016e,0x0000016d,0x000500ba,0x0000003b,0x0000016f,0x0000016e,0x0000006f, + 0x000300f7,0x00000171,0x00000000,0x000400fa,0x0000016f,0x00000170,0x00000197,0x000200f8, + 0x00000170,0x00060041,0x00000025,0x00000173,0x00000020,0x00000022,0x00000046,0x0004003d, + 0x00000006,0x00000174,0x00000173,0x00050083,0x00000006,0x00000175,0x0000001c,0x00000174, + 0x0004003d,0x00000007,0x00000177,0x00000161,0x0003003e,0x00000176,0x00000177,0x0003003e, + 0x00000178,0x00000175,0x00060039,0x00000007,0x00000179,0x0000000d,0x00000176,0x00000178, + 0x0003003e,0x0000017a,0x00000179,0x0004003d,0x00000006,0x0000017c,0x00000127,0x0003003e, + 0x0000017b,0x0000017c,0x00060039,0x0000000f,0x0000017d,0x00000013,0x0000017a,0x0000017b, + 0x00050051,0x00000006,0x0000017e,0x0000017d,0x00000000,0x00050041,0x00000009,0x0000017f, + 0x00000172,0x00000024,0x0003003e,0x0000017f,0x0000017e,0x0004003d,0x00000007,0x00000181, + 0x00000161,0x0003003e,0x00000180,0x00000181,0x0003003e,0x00000182,0x0000001c,0x00060039, + 0x00000007,0x00000183,0x0000000d,0x00000180,0x00000182,0x0003003e,0x00000184,0x00000183, + 0x0004003d,0x00000006,0x00000186,0x00000127,0x0003003e,0x00000185,0x00000186,0x00060039, + 0x0000000f,0x00000187,0x00000013,0x00000184,0x00000185,0x00050051,0x00000006,0x00000188, + 0x00000187,0x00000001,0x00050041,0x00000009,0x00000189,0x00000172,0x0000002b,0x0003003e, + 0x00000189,0x00000188,0x00060041,0x00000025,0x0000018a,0x00000020,0x00000022,0x00000046, + 0x0004003d,0x00000006,0x0000018b,0x0000018a,0x00050081,0x00000006,0x0000018c,0x0000001c, + 0x0000018b,0x0004003d,0x00000007,0x0000018e,0x00000161,0x0003003e,0x0000018d,0x0000018e, + 0x0003003e,0x0000018f,0x0000018c,0x00060039,0x00000007,0x00000190,0x0000000d,0x0000018d, + 0x0000018f,0x0003003e,0x00000191,0x00000190,0x0004003d,0x00000006,0x00000193,0x00000127, + 0x0003003e,0x00000192,0x00000193,0x00060039,0x0000000f,0x00000194,0x00000013,0x00000191, + 0x00000192,0x00050051,0x00000006,0x00000195,0x00000194,0x00000002,0x00050041,0x00000009, + 0x00000196,0x00000172,0x00000037,0x0003003e,0x00000196,0x00000195,0x000200f9,0x00000171, + 0x000200f8,0x00000197,0x0004003d,0x00000007,0x00000199,0x00000161,0x0003003e,0x00000198, + 0x00000199,0x0003003e,0x0000019a,0x0000001c,0x00060039,0x00000007,0x0000019b,0x0000000d, + 0x00000198,0x0000019a,0x0003003e,0x0000019c,0x0000019b,0x0004003d,0x00000006,0x0000019e, + 0x00000127,0x0003003e,0x0000019d,0x0000019e,0x00060039,0x0000000f,0x0000019f,0x00000013, + 0x0000019c,0x0000019d,0x0003003e,0x00000172,0x0000019f,0x000200f9,0x00000171,0x000200f8, + 0x00000171,0x0004003d,0x00000007,0x000001a1,0x00000134,0x0004003d,0x00000007,0x000001a2, + 0x00000134,0x00050050,0x00000007,0x000001a3,0x0000001c,0x0000001c,0x00050083,0x00000007, + 0x000001a4,0x000001a3,0x000001a2,0x0007000c,0x00000007,0x000001a5,0x00000001,0x00000025, + 0x000001a1,0x000001a4,0x0003003e,0x000001a0,0x000001a5,0x00050041,0x00000009,0x000001a8, + 0x000001a0,0x00000024,0x0004003d,0x00000006,0x000001a9,0x000001a8,0x00060041,0x00000025, + 0x000001aa,0x00000020,0x00000036,0x00000046,0x0004003d,0x00000006,0x000001ab,0x000001aa, + 0x00050085,0x00000006,0x000001ac,0x000001a9,0x000001ab,0x00050041,0x00000009,0x000001ad, + 0x000001a0,0x0000002b,0x0004003d,0x00000006,0x000001ae,0x000001ad,0x0007000c,0x00000006, + 0x000001af,0x00000001,0x00000025,0x000001ac,0x000001ae,0x0008000c,0x00000006,0x000001b0, + 0x00000001,0x00000031,0x0000006f,0x000001a7,0x000001af,0x0003003e,0x000001a6,0x000001b0, + 0x0004003d,0x0000000f,0x000001b3,0x00000172,0x0004003d,0x00000006,0x000001b4,0x000001a6, + 0x0005008e,0x0000000f,0x000001b5,0x000001b3,0x000001b4,0x00050051,0x00000006,0x000001b6, + 0x000001b5,0x00000000,0x00050051,0x00000006,0x000001b7,0x000001b5,0x00000001,0x00050051, + 0x00000006,0x000001b8,0x000001b5,0x00000002,0x00070050,0x0000001d,0x000001b9,0x000001b6, + 0x000001b7,0x000001b8,0x0000001c,0x0003003e,0x000001b2,0x000001b9,0x000100fd,0x00010038, + 0x00050036,0x00000007,0x0000000d,0x00000000,0x0000000a,0x00030037,0x00000008,0x0000000b, + 0x00030037,0x00000009,0x0000000c,0x000200f8,0x0000000e,0x0004003b,0x00000009,0x00000015, + 0x00000007,0x0004003d,0x00000007,0x00000016,0x0000000b,0x0004003d,0x00000007,0x00000017, + 0x0000000b,0x00050094,0x00000006,0x00000018,0x00000016,0x00000017,0x0003003e,0x00000015, + 0x00000018,0x0004003d,0x00000007,0x00000019,0x0000000b,0x0004003d,0x00000006,0x0000001a, + 0x0000000c,0x0005008e,0x00000007,0x0000001b,0x00000019,0x0000001a,0x00060041,0x00000025, + 0x00000026,0x00000020,0x00000022,0x00000024,0x0004003d,0x00000006,0x00000027,0x00000026, + 0x0004003d,0x00000006,0x00000028,0x00000015,0x00050085,0x00000006,0x00000029,0x00000027, + 0x00000028,0x00050081,0x00000006,0x0000002a,0x0000001c,0x00000029,0x00060041,0x00000025, + 0x0000002c,0x00000020,0x00000022,0x0000002b,0x0004003d,0x00000006,0x0000002d,0x0000002c, + 0x0004003d,0x00000006,0x0000002e,0x00000015,0x00050085,0x00000006,0x0000002f,0x0000002d, + 0x0000002e,0x0004003d,0x00000006,0x00000030,0x00000015,0x00050085,0x00000006,0x00000031, + 0x0000002f,0x00000030,0x00050081,0x00000006,0x00000032,0x0000002a,0x00000031,0x0005008e, + 0x00000007,0x00000033,0x0000001b,0x00000032,0x000200fe,0x00000033,0x00010038,0x00050036, + 0x0000000f,0x00000013,0x00000000,0x00000010,0x00030037,0x00000008,0x00000011,0x00030037, + 0x00000009,0x00000012,0x000200f8,0x00000014,0x0004003b,0x00000009,0x0000003f,0x00000007, + 0x0004003b,0x00000008,0x00000042,0x00000007,0x0004003b,0x00000008,0x00000059,0x00000007, + 0x0004003b,0x000000a2,0x000000a3,0x00000007,0x0004003b,0x000000bf,0x000000c0,0x00000007, + 0x0004003b,0x000000bf,0x000000cb,0x00000007,0x0004003b,0x00000009,0x000000e4,0x00000007, + 0x0004003b,0x000000bf,0x000000f3,0x00000007,0x0004003b,0x00000009,0x000000f9,0x00000007, + 0x0004003b,0x00000009,0x000000fc,0x00000007,0x0004003b,0x00000008,0x00000101,0x00000007, + 0x00060041,0x00000025,0x00000038,0x00000020,0x00000036,0x00000037,0x0004003d,0x00000006, + 0x00000039,0x00000038,0x000500ba,0x0000003b,0x0000003c,0x00000039,0x0000003a,0x000300f7, + 0x0000003e,0x00000000,0x000400fa,0x0000003c,0x0000003d,0x0000003e,0x000200f8,0x0000003d, + 0x00060041,0x00000025,0x00000040,0x00000020,0x00000022,0x00000037,0x0004003d,0x00000006, + 0x00000041,0x00000040,0x0003003e,0x0000003f,0x00000041,0x00050041,0x00000009,0x00000043, + 0x00000011,0x00000024,0x0004003d,0x00000006,0x00000044,0x00000043,0x0004003d,0x00000006, + 0x00000045,0x0000003f,0x00060041,0x00000025,0x00000047,0x00000020,0x00000036,0x00000046, + 0x0004003d,0x00000006,0x00000048,0x00000047,0x00050085,0x00000006,0x00000049,0x00000045, + 0x00000048,0x00050088,0x00000006,0x0000004a,0x00000044,0x00000049,0x00050041,0x00000009, + 0x0000004b,0x00000011,0x0000002b,0x0004003d,0x00000006,0x0000004c,0x0000004b,0x0004003d, + 0x00000006,0x0000004d,0x0000003f,0x00050088,0x00000006,0x0000004e,0x0000004c,0x0000004d, + 0x00050050,0x00000007,0x0000004f,0x0000004a,0x0000004e,0x0005008e,0x00000007,0x00000050, + 0x0000004f,0x0000003a,0x00050050,0x00000007,0x00000051,0x0000003a,0x0000003a,0x00050081, + 0x00000007,0x00000052,0x00000050,0x00000051,0x0003003e,0x00000042,0x00000052,0x00060041, + 0x00000025,0x00000053,0x00000020,0x00000036,0x00000037,0x0004003d,0x00000006,0x00000054, + 0x00000053,0x000500ba,0x0000003b,0x00000056,0x00000054,0x00000055,0x000300f7,0x00000058, + 0x00000000,0x000400fa,0x00000056,0x00000057,0x00000058,0x000200f8,0x00000057,0x00060041, + 0x00000025,0x0000005a,0x00000020,0x00000036,0x00000046,0x0004003d,0x00000006,0x0000005b, + 0x0000005a,0x00060041,0x00000025,0x0000005c,0x00000020,0x00000036,0x0000002b,0x0004003d, + 0x00000006,0x0000005d,0x0000005c,0x00050088,0x00000006,0x0000005e,0x0000005b,0x0000005d, + 0x00060041,0x00000025,0x0000005f,0x00000020,0x00000036,0x0000002b,0x0004003d,0x00000006, + 0x00000060,0x0000005f,0x00060041,0x00000025,0x00000061,0x00000020,0x00000036,0x00000046, + 0x0004003d,0x00000006,0x00000062,0x00000061,0x00050088,0x00000006,0x00000063,0x00000060, + 0x00000062,0x00050050,0x00000007,0x00000064,0x0000005e,0x00000063,0x0007000c,0x00000007, + 0x00000066,0x00000001,0x00000028,0x00000064,0x00000065,0x0003003e,0x00000059,0x00000066, + 0x0004003d,0x00000007,0x00000067,0x00000042,0x00050050,0x00000007,0x00000068,0x0000003a, + 0x0000003a,0x00050083,0x00000007,0x00000069,0x00000067,0x00000068,0x0004003d,0x00000007, + 0x0000006a,0x00000059,0x00050085,0x00000007,0x0000006b,0x00000069,0x0000006a,0x00050050, + 0x00000007,0x0000006c,0x0000003a,0x0000003a,0x00050081,0x00000007,0x0000006d,0x0000006b, + 0x0000006c,0x0003003e,0x00000042,0x0000006d,0x0004003d,0x00000007,0x0000006e,0x00000042, + 0x000500b8,0x00000071,0x00000072,0x0000006e,0x00000070,0x0004009a,0x0000003b,0x00000073, + 0x00000072,0x000400a8,0x0000003b,0x00000074,0x00000073,0x000300f7,0x00000076,0x00000000, + 0x000400fa,0x00000074,0x00000075,0x00000076,0x000200f8,0x00000075,0x0004003d,0x00000007, + 0x00000077,0x00000042,0x000500ba,0x00000071,0x00000078,0x00000077,0x00000065,0x0004009a, + 0x0000003b,0x00000079,0x00000078,0x000200f9,0x00000076,0x000200f8,0x00000076,0x000700f5, + 0x0000003b,0x0000007a,0x00000073,0x00000057,0x00000079,0x00000075,0x000300f7,0x0000007c, + 0x00000000,0x000400fa,0x0000007a,0x0000007b,0x0000007c,0x000200f8,0x0000007b,0x000200fe, + 0x0000007d,0x000200f8,0x0000007c,0x0004003d,0x00000080,0x00000083,0x00000082,0x0004003d, + 0x00000007,0x00000084,0x00000042,0x00050057,0x0000001d,0x00000085,0x00000083,0x00000084, + 0x0008004f,0x0000000f,0x00000086,0x00000085,0x00000085,0x00000000,0x00000001,0x00000002, + 0x000200fe,0x00000086,0x000200f8,0x00000058,0x0004003d,0x00000007,0x00000088,0x00000042, + 0x000500b8,0x00000071,0x00000089,0x00000088,0x00000070,0x0004009a,0x0000003b,0x0000008a, + 0x00000089,0x000400a8,0x0000003b,0x0000008b,0x0000008a,0x000300f7,0x0000008d,0x00000000, + 0x000400fa,0x0000008b,0x0000008c,0x0000008d,0x000200f8,0x0000008c,0x0004003d,0x00000007, + 0x0000008e,0x00000042,0x000500ba,0x00000071,0x0000008f,0x0000008e,0x00000065,0x0004009a, + 0x0000003b,0x00000090,0x0000008f,0x000200f9,0x0000008d,0x000200f8,0x0000008d,0x000700f5, + 0x0000003b,0x00000091,0x0000008a,0x00000058,0x00000090,0x0000008c,0x000300f7,0x00000093, + 0x00000000,0x000400fa,0x00000091,0x00000092,0x00000093,0x000200f8,0x00000092,0x000200fe, + 0x0000007d,0x000200f8,0x00000093,0x0004003d,0x00000080,0x00000095,0x00000082,0x00050041, + 0x00000009,0x00000096,0x00000042,0x00000024,0x0004003d,0x00000006,0x00000097,0x00000096, + 0x0004003d,0x00000006,0x00000098,0x00000012,0x00050081,0x00000006,0x00000099,0x00000097, + 0x00000098,0x00050085,0x00000006,0x0000009a,0x00000099,0x0000003a,0x00050041,0x00000009, + 0x0000009b,0x00000042,0x0000002b,0x0004003d,0x00000006,0x0000009c,0x0000009b,0x00050050, + 0x00000007,0x0000009d,0x0000009a,0x0000009c,0x00050057,0x0000001d,0x0000009e,0x00000095, + 0x0000009d,0x0008004f,0x0000000f,0x0000009f,0x0000009e,0x0000009e,0x00000000,0x00000001, + 0x00000002,0x000200fe,0x0000009f,0x000200f8,0x0000003e,0x00050041,0x000000a5,0x000000a6, + 0x00000020,0x000000a4,0x0004003d,0x0000001d,0x000000a7,0x000000a6,0x0008004f,0x0000000f, + 0x000000a8,0x000000a7,0x000000a7,0x00000000,0x00000001,0x00000002,0x00050041,0x000000a5, + 0x000000aa,0x00000020,0x000000a9,0x0004003d,0x0000001d,0x000000ab,0x000000aa,0x0008004f, + 0x0000000f,0x000000ac,0x000000ab,0x000000ab,0x00000000,0x00000001,0x00000002,0x00050041, + 0x000000a5,0x000000ae,0x00000020,0x000000ad,0x0004003d,0x0000001d,0x000000af,0x000000ae, + 0x0008004f,0x0000000f,0x000000b0,0x000000af,0x000000af,0x00000000,0x00000001,0x00000002, + 0x00050051,0x00000006,0x000000b1,0x000000a8,0x00000000,0x00050051,0x00000006,0x000000b2, + 0x000000a8,0x00000001,0x00050051,0x00000006,0x000000b3,0x000000a8,0x00000002,0x00050051, + 0x00000006,0x000000b4,0x000000ac,0x00000000,0x00050051,0x00000006,0x000000b5,0x000000ac, + 0x00000001,0x00050051,0x00000006,0x000000b6,0x000000ac,0x00000002,0x00050051,0x00000006, + 0x000000b7,0x000000b0,0x00000000,0x00050051,0x00000006,0x000000b8,0x000000b0,0x00000001, + 0x00050051,0x00000006,0x000000b9,0x000000b0,0x00000002,0x00060050,0x0000000f,0x000000ba, + 0x000000b1,0x000000b2,0x000000b3,0x00060050,0x0000000f,0x000000bb,0x000000b4,0x000000b5, + 0x000000b6,0x00060050,0x0000000f,0x000000bc,0x000000b7,0x000000b8,0x000000b9,0x00060050, + 0x000000a1,0x000000bd,0x000000ba,0x000000bb,0x000000bc,0x00040054,0x000000a1,0x000000be, + 0x000000bd,0x0003003e,0x000000a3,0x000000be,0x0004003d,0x000000a1,0x000000c1,0x000000a3, + 0x00050041,0x00000009,0x000000c2,0x00000011,0x00000024,0x0004003d,0x00000006,0x000000c3, + 0x000000c2,0x00050041,0x00000009,0x000000c4,0x00000011,0x0000002b,0x0004003d,0x00000006, + 0x000000c5,0x000000c4,0x0004007f,0x00000006,0x000000c6,0x000000c5,0x00060050,0x0000000f, + 0x000000c8,0x000000c3,0x000000c6,0x000000c7,0x0006000c,0x0000000f,0x000000c9,0x00000001, + 0x00000045,0x000000c8,0x00050091,0x0000000f,0x000000ca,0x000000c1,0x000000c9,0x0003003e, + 0x000000c0,0x000000ca,0x00050041,0x000000a5,0x000000cd,0x00000020,0x000000cc,0x0004003d, + 0x0000001d,0x000000ce,0x000000cd,0x0008004f,0x0000000f,0x000000cf,0x000000ce,0x000000ce, + 0x00000001,0x00000002,0x00000003,0x0004003d,0x000000a1,0x000000d0,0x000000a3,0x0004003d, + 0x00000006,0x000000d1,0x00000012,0x000500b8,0x0000003b,0x000000d2,0x000000d1,0x0000003a, + 0x000600a9,0x00000006,0x000000d3,0x000000d2,0x000000c7,0x0000001c,0x00060041,0x00000025, + 0x000000d4,0x00000020,0x000000a4,0x00000046,0x0004003d,0x00000006,0x000000d5,0x000000d4, + 0x00050085,0x00000006,0x000000d6,0x000000d3,0x000000d5,0x00060050,0x0000000f,0x000000d7, + 0x000000d6,0x0000006f,0x0000006f,0x00050091,0x0000000f,0x000000d8,0x000000d0,0x000000d7, + 0x00050081,0x0000000f,0x000000d9,0x000000cf,0x000000d8,0x0003003e,0x000000cb,0x000000d9, + 0x00050041,0x00000009,0x000000da,0x000000c0,0x00000037,0x0004003d,0x00000006,0x000000db, + 0x000000da,0x000500ba,0x0000003b,0x000000dd,0x000000db,0x000000dc,0x000300f7,0x000000df, + 0x00000000,0x000400fa,0x000000dd,0x000000de,0x000000df,0x000200f8,0x000000de,0x000200fe, + 0x000000e2,0x000200f8,0x000000df,0x00060041,0x00000025,0x000000e5,0x00000020,0x000000a9, + 0x00000046,0x0004003d,0x00000006,0x000000e6,0x000000e5,0x0004007f,0x00000006,0x000000e7, + 0x000000e6,0x00050041,0x00000009,0x000000e8,0x000000cb,0x00000037,0x0004003d,0x00000006, + 0x000000e9,0x000000e8,0x00050083,0x00000006,0x000000ea,0x000000e7,0x000000e9,0x00050041, + 0x00000009,0x000000eb,0x000000c0,0x00000037,0x0004003d,0x00000006,0x000000ec,0x000000eb, + 0x00050088,0x00000006,0x000000ed,0x000000ea,0x000000ec,0x0003003e,0x000000e4,0x000000ed, + 0x0004003d,0x00000006,0x000000ee,0x000000e4,0x000500bc,0x0000003b,0x000000ef,0x000000ee, + 0x0000006f,0x000300f7,0x000000f1,0x00000000,0x000400fa,0x000000ef,0x000000f0,0x000000f1, + 0x000200f8,0x000000f0,0x000200fe,0x000000e2,0x000200f8,0x000000f1,0x0004003d,0x0000000f, + 0x000000f4,0x000000cb,0x0004003d,0x0000000f,0x000000f5,0x000000c0,0x0004003d,0x00000006, + 0x000000f6,0x000000e4,0x0005008e,0x0000000f,0x000000f7,0x000000f5,0x000000f6,0x00050081, + 0x0000000f,0x000000f8,0x000000f4,0x000000f7,0x0003003e,0x000000f3,0x000000f8,0x00060041, + 0x00000025,0x000000fa,0x00000020,0x000000ad,0x00000046,0x0004003d,0x00000006,0x000000fb, + 0x000000fa,0x0003003e,0x000000f9,0x000000fb,0x0004003d,0x00000006,0x000000fd,0x000000f9, + 0x00060041,0x00000025,0x000000fe,0x00000020,0x00000036,0x0000002b,0x0004003d,0x00000006, + 0x000000ff,0x000000fe,0x00050088,0x00000006,0x00000100,0x000000fd,0x000000ff,0x0003003e, + 0x000000fc,0x00000100,0x00050041,0x00000009,0x00000102,0x000000f3,0x00000024,0x0004003d, + 0x00000006,0x00000103,0x00000102,0x0004003d,0x00000006,0x00000104,0x000000f9,0x00050088, + 0x00000006,0x00000105,0x00000103,0x00000104,0x00050041,0x00000009,0x00000106,0x000000f3, + 0x0000002b,0x0004003d,0x00000006,0x00000107,0x00000106,0x0004007f,0x00000006,0x00000108, + 0x00000107,0x0004003d,0x00000006,0x00000109,0x000000fc,0x00050088,0x00000006,0x0000010a, + 0x00000108,0x00000109,0x00050050,0x00000007,0x0000010b,0x00000105,0x0000010a,0x0005008e, + 0x00000007,0x0000010c,0x0000010b,0x0000003a,0x00050050,0x00000007,0x0000010d,0x0000003a, + 0x0000003a,0x00050081,0x00000007,0x0000010e,0x0000010c,0x0000010d,0x0003003e,0x00000101, + 0x0000010e,0x0004003d,0x00000007,0x0000010f,0x00000101,0x000500b8,0x00000071,0x00000110, + 0x0000010f,0x00000070,0x0004009a,0x0000003b,0x00000111,0x00000110,0x000400a8,0x0000003b, + 0x00000112,0x00000111,0x000300f7,0x00000114,0x00000000,0x000400fa,0x00000112,0x00000113, + 0x00000114,0x000200f8,0x00000113,0x0004003d,0x00000007,0x00000115,0x00000101,0x000500ba, + 0x00000071,0x00000116,0x00000115,0x00000065,0x0004009a,0x0000003b,0x00000117,0x00000116, + 0x000200f9,0x00000114,0x000200f8,0x00000114,0x000700f5,0x0000003b,0x00000118,0x00000111, + 0x000000f1,0x00000117,0x00000113,0x000300f7,0x0000011a,0x00000000,0x000400fa,0x00000118, + 0x00000119,0x0000011a,0x000200f8,0x00000119,0x000200fe,0x000000e2,0x000200f8,0x0000011a, + 0x0004003d,0x00000080,0x0000011c,0x00000082,0x0004003d,0x00000007,0x0000011d,0x00000101, + 0x00050057,0x0000001d,0x0000011e,0x0000011c,0x0000011d,0x0008004f,0x0000000f,0x0000011f, + 0x0000011e,0x0000011e,0x00000000,0x00000001,0x00000002,0x000200fe,0x0000011f,0x00010038 +}; diff --git a/app/src/main/cpp/waylandcomp/src/compositor.c b/app/src/main/cpp/waylandcomp/src/compositor.c index 805eff9fa1..014c0d1910 100644 --- a/app/src/main/cpp/waylandcomp/src/compositor.c +++ b/app/src/main/cpp/waylandcomp/src/compositor.c @@ -1,23 +1,3 @@ -/* - * droiddeck-wayland - the embedded compositor of the Wayland display path. - * - * Clients are the Wine processes of a container (winewayland.drv) and, through them, - * Mesa's Vulkan WSI. Each process is its own client, so a Windows virtual desktop is - * described with banner_desktop_v1: the desktop owner marks one surface as the desktop, - * and every process reports its top-level windows' desktop positions and the Windows - * stacking order. - * - * The scene is the desktop surface at the bottom, then every mapped xdg_toplevel at its - * reported position in stacking order, each with its subsurface tree (a game's Vulkan - * swapchain is a subsurface of its window) and wp_viewport crop/scale applied. It is - * redrawn once per event-loop pass after any commit or layout change, stretched to the - * Android surface. - * - * Input goes to the desktop surface in desktop coordinates: the Wine server routes it to - * the window under the pointer (or the focus window) in whichever process owns it, the - * same as winex11's virtual desktop. Without a desktop (a client that doesn't speak - * banner_desktop_v1) the topmost window under the pointer gets it. - */ #define _GNU_SOURCE 1 #define _POSIX_C_SOURCE 200809L #include <stdio.h> @@ -26,6 +6,7 @@ #include <sys/stat.h> #include <unistd.h> #include <stdint.h> +#include <stdatomic.h> #include <fcntl.h> #include <time.h> #include <stdarg.h> @@ -50,6 +31,7 @@ #include "framegen_bridge.h" #include <pthread.h> #include "effects_chain.h" +#include "cardboard.h" #include "droiddeck_ext.h" #include "droiddeck_color.h" #include "compositor_internal.h" @@ -57,19 +39,11 @@ #define WLOGI(...) __android_log_print(ANDROID_LOG_INFO, "DroidDeckWayland", __VA_ARGS__) #define WLOGE(...) __android_log_print(ANDROID_LOG_ERROR, "DroidDeckWayland", __VA_ARGS__) -/* ------------------------------------------------------------------ session log - * One readable, time-stamped file per Wayland session in Download/Wayland-logs, also - * mirrored to logcat: which programs connect, the desktop, windows opening and closing, - * Vulkan frames arriving, a frame-rate summary every 10 seconds, and errors. */ #define SESSION_LOG_DIR "/storage/emulated/0/Download/Wayland-logs" static FILE *g_log; -/* Lines logged before the session file exists are kept here and written into it, in order, the - * moment it opens - the compositor runs on its own thread, so anything the app reports as that - * thread starts (the display's HDR capability, for one) would otherwise only reach logcat. The - * lock also serialises the file writes, which now come from the app's threads too. */ #define PRELOG_MAX 32 static pthread_mutex_t g_log_lock = PTHREAD_MUTEX_INITIALIZER; static char *g_prelog[PRELOG_MAX]; @@ -103,8 +77,6 @@ static void open_session_log(void) { localtime_r(&now, &tm); strftime(stamp, sizeof(stamp), "%Y-%m-%d_%H-%M-%S", &tm); - /* The app names the file when it has a session folder to put it in, so one session's logs sit - * together; without that we keep our own dated file. The folder is made on the Java side. */ const char *given = getenv("BL_WAYLAND_LOG"); if (given && *given) { snprintf(path, sizeof(path), "%s", given); @@ -130,8 +102,6 @@ static void open_session_log(void) { "Time Area Event\n" "------------ -------- -----------------------------------------------------\n", stamp, path); - /* Publish the file and flush anything logged before it existed, in one critical section, so a - * line from another thread can never land ahead of the header or be dropped between the two. */ pthread_mutex_lock(&g_log_lock); for (int i = 0; i < g_prelog_n; i++) { fputs(g_prelog[i], f); free(g_prelog[i]); g_prelog[i] = NULL; } g_prelog_n = 0; @@ -140,7 +110,6 @@ static void open_session_log(void) { WLOGI("session log: %s", path); } -/* At most ~10 lines a second for chatty events (window moves), so a drag can't flood logcat. */ static int log_budget(void) { static struct timespec window; static int used; @@ -151,13 +120,12 @@ static int log_budget(void) { } #ifndef BTN_LEFT -#define BTN_LEFT 0x110 /* linux/input-event-codes.h */ +#define BTN_LEFT 0x110 #endif #ifndef BTN_RIGHT #define BTN_RIGHT 0x111 #endif -/* Java sends pointer coordinates in this space, covering the whole output surface. */ #define INPUT_SPACE_W 1920 #define INPUT_SPACE_H 1080 @@ -179,7 +147,7 @@ static const char *client_name(struct wl_client *client) { static void on_client_destroyed(struct wl_listener *l, void *data) { struct client_info *ci = wl_container_of(l, ci, destroy), **pp; droiddeck_log("program", "disconnected: %s (pid %d)", ci->name, (int)ci->pid); - droiddeck_color_client_gone(ci->client); /* HDR summary for a program that presented HDR (gate open only) */ + droiddeck_color_client_gone(ci->client); for (pp = &g_clients; *pp; pp = &(*pp)->next) if (*pp == ci) { *pp = ci->next; break; } free(ci); @@ -201,7 +169,7 @@ static void on_client_created(struct wl_listener *l, void *data) { if ((fd = open(path, O_RDONLY | O_CLOEXEC)) >= 0) { if ((n = read(fd, buf, sizeof(buf) - 1)) > 0) { char *base = buf, *p; - buf[n] = 0; /* argv[0] only; Wine puts the Windows program path there */ + buf[n] = 0; for (p = buf; *p; p++) if (*p == '\\' || *p == '/') base = p + 1; if (*base) snprintf(ci->name, sizeof(ci->name), "%s", base); } @@ -214,147 +182,123 @@ static void on_client_created(struct wl_listener *l, void *data) { droiddeck_log("program", "connected over Wayland: %s (pid %d)", ci->name, (int)ci->pid); } -/* ------------------------------------------------------------------ surfaces */ enum surface_role { ROLE_NONE, ROLE_TOPLEVEL, ROLE_SUBSURFACE, ROLE_DESKTOP, ROLE_CURSOR }; struct surface { struct wl_resource *resource; - struct wl_list link; /* g_surfaces */ + struct wl_list link; - /* Pending state, applied on commit. */ struct wl_resource *pending_buffer; struct wl_listener pending_buffer_destroy; int pending_attach; int pending_src_set, pending_dst_set; - float pending_src[4]; /* x, y, w, h; w < 0 = unset */ - int pending_dst[2]; /* w, h; w < 0 = unset */ + float pending_src[4]; + int pending_dst[2]; struct wl_list pending_frames; - struct wl_list pending_feedback; /* wp_presentation feedback asked for before commit */ + struct wl_list pending_feedback; - /* Current content. */ - struct vkp_image *shm_img; /* our copy of the last wl_shm buffer */ - struct wl_resource *dmabuf; /* current dmabuf wl_buffer (NULL once the client destroyed it) */ - struct dmabuf_buffer *dmabuf_buf; /* its imported image, kept until replaced or the surface goes */ + + struct vkp_image *shm_img; + struct wl_resource *dmabuf; + struct dmabuf_buffer *dmabuf_buf; struct wl_listener dmabuf_destroy; int buf_w, buf_h, has_content; int buf_alpha; - int opaque[4], pending_opaque[4], pending_opaque_set; /* x, y, w, h; w = 0: none */ + int opaque[4], pending_opaque[4], pending_opaque_set; int src_set, dst_set; float src[4]; int dst[2]; - struct wl_list frames; /* frame callbacks for the next redraw */ - struct wl_list feedback; /* presentation feedback for the current content */ - int drawn; /* part of the last rendered scene */ - int64_t next_release_ns; /* FPS limiter: when this surface's last buffer goes back */ - int releases_pending; /* FPS limiter: buffers of this surface still to be released */ + struct wl_list frames; + struct wl_list feedback; + int drawn; + int64_t next_release_ns; + int releases_pending; enum surface_role role; - /* A role-less surface's last buffer, held unreleased: it may become the pointer's image - * (wl_pointer.set_cursor after the commit, which is wlroots' order). */ struct wl_resource *idle_buffer; struct wl_listener idle_buffer_destroy; struct wl_resource *xdg_surface, *xdg_toplevel; struct wl_resource *viewport; - /* Toplevel placement on the scene. */ - int mapped; /* in g_toplevels */ + + int mapped; struct wl_list toplevel_link; + int keep_on_top; int x, y, placed; uint32_t hwnd; - /* Subsurface tree. */ struct surface *parent; struct wl_resource *subsurface; - struct wl_list children; /* bottom to top */ + struct wl_list children; struct wl_list child_link; int sub_x, sub_y, sub_pending_x, sub_pending_y, sub_pending; int below_parent; - int fullscreen; /* xdg_toplevel.set_fullscreen: no client decorations */ - int toplevel_committed; /* the toplevel's initial commit was answered */ + int fullscreen; + int toplevel_committed; - char *title; /* xdg_toplevel title, for the session log */ - int announced_vulkan; /* logged its first dmabuf frame */ - uint32_t hdr_fmt_logged; /* HDR session: the buffer format last named in the log */ + char *title; + int announced_vulkan; + uint32_t hdr_fmt_logged; }; -static struct wl_list g_surfaces; /* every surface */ -static struct wl_list g_toplevels; /* mapped toplevels, bottom to top */ +static struct wl_list g_surfaces; +static struct wl_list g_toplevels; static struct surface *g_desktop; -static uint32_t *g_zorder; /* last reported Windows stacking order, top first */ +static uint32_t *g_zorder; static size_t g_zorder_count; static struct wl_event_source *g_render_idle, *g_frame_timer; -/* Rendering is driven by the screen's vsync (Java's Choreographer ticks, nativeVsync): one scene - * per refresh showing the newest buffers, so the event loop is never parked in the swapchain and - * clients get their buffers back as soon as they're replaced. Without ticks (an older app, no - * window) a fallback timer renders instead. */ -static int g_dirty; /* something changed since the last render */ -static int64_t g_last_vsync_ns; /* last tick, 0 = none yet */ -static int64_t g_refresh_ns = 16666667; /* measured tick interval (pacing only, never reported) */ + + + + +static int g_dirty; +static int64_t g_last_vsync_ns; +static int64_t g_tick_vsync_ns; +static int64_t g_refresh_ns = 16666667; static struct wl_event_source *g_fallback_timer; static int g_fallback_armed; -/* FPS limiter (the in-game drawer's): frames per second, 0 = unlimited. Set from the app thread, - * read here. Like the X11 path, which delays the "your buffer is free" notice, the limit paces - * when a replaced buffer is released to its client, so the game itself slows to the cap. */ volatile int g_fps_limit; -/* Shortcut launches: explorer's windows (the desktop, taskbar, Start menu) aren't drawn, matching - * the X11 renderer's unviewable "explorer.exe". They still exist for input routing. */ volatile int g_hide_shell; -/* Experimental layer mode (DROIDDECK_WAYLAND_ZERO_COPY=1 in the container's environment): a single - * fullscreen window is shown on its own Android layer (sc_layer.c) instead of being blitted into the - * screen swapchain. Set from the app before the compositor starts; read per frame. */ volatile int g_zero_copy; -static int g_zero_copy_paused; /* effects hold the layer path off (render_scene) */ +static int g_zero_copy_paused; static int g_zero_copy_fx_skip_said; -/* Compressed (UBWC) game buffers: zwp_linux_dmabuf_v1 advertises DRM_FORMAT_MOD_QCOM_COMPRESSED next - * to LINEAR for every format the renderer's own driver can import that way, so Turnip's Wayland WSI - * in the game allocates UBWC swapchain images instead of resolving each frame to a linear copy. - * DROIDDECK_WAYLAND_UBWC=0 in the container's environment turns the advertisement off (A/B switch). Set - * from the app before the compositor starts; read at every zwp_linux_dmabuf_v1 bind. */ volatile int g_ubwc = 1; -/* Debug (DROIDDECK_WAYLAND_NO_RENDER_NODE=1): name no DRM device in the dma-buf feedback, as a phone - * that exposes no /dev/dri node to apps does, to reproduce its OpenGL path here. Set from the app - * before the compositor starts. */ volatile int g_no_render_node; -/* The panel's refresh rate in mHz, from the app; wl_output advertises it so Wine's display modes - * carry the real rate (games pick their saved 144 Hz mode, as on X11). 0 = 60 Hz. */ -volatile int g_output_refresh_mhz; +static atomic_int g_output_refresh_mhz = 60000; +static atomic_int g_output_refresh_pending; +static int g_output_announced_refresh_mhz = 60000; -/* The advertised output size: the container's screen (what the app's X server reports on X11), - * so Wine's display-mode list stops at the desktop size. 0 = 1920x1080. */ volatile int g_output_w, g_output_h; struct pending_release { struct wl_resource *buffer; struct wl_listener destroy; - struct surface *surface; /* NULL once the surface is gone */ + struct surface *surface; int64_t at_ns; - int64_t since_ns; /* when the compositor let go of it (the perf line) */ + int64_t since_ns; struct wl_list link; }; static struct wl_list g_pending_releases; static int g_release_timer_fd = -1; static struct wl_event_source *g_release_source; -static int g_scene_w, g_scene_h; /* size of the last drawn scene */ -static int g_desktop_w, g_desktop_h; /* last size the desktop had content at */ -static unsigned g_stat_frames, g_stat_dmabuf, g_stat_shm; /* since the last 10 s summary */ +static int g_scene_w, g_scene_h; +static int g_desktop_w, g_desktop_h; +static unsigned g_stat_frames, g_stat_dmabuf, g_stat_shm; -/* The 10 s `perf` line (on_stats_timer): where the compositor thread's time goes and how long games - * wait for their buffers back. The driver-side times (acquire, present, fence waits) are counted in - * vk_present.c (vkp_perf_take). Compositor thread only. */ static struct { - unsigned ticks; /* screen refreshes (Choreographer ticks) */ - unsigned scenes; /* render_scene() calls ... */ - int64_t scene_ns, scene_max_ns; /* ... and their wall time */ - unsigned copy_scenes; /* scenes drawn into the screen swapchain (the copy path) */ - unsigned releases, releases_held; /* wl_buffer.release after a replacement; held = 1 ms or more */ - int64_t release_ns, release_max_ns; /* replaced (or taken off the layer) -> released to the game */ + unsigned ticks; + unsigned scenes; + int64_t scene_ns, scene_max_ns; + unsigned copy_scenes; + unsigned releases, releases_held; + int64_t release_ns, release_max_ns; } g_perf; static void schedule_render(void); @@ -364,7 +308,6 @@ static int64_t now_ns(void) { return (int64_t)ts.tv_sec * 1000000000LL + ts.tv_nsec; } -/* A game got a replaced buffer back; since_ns = when the compositor let go of it (0 = not counted). */ static void perf_note_release(int64_t since_ns) { if (since_ns <= 0) return; int64_t d = now_ns() - since_ns; @@ -375,7 +318,6 @@ static void perf_note_release(int64_t since_ns) { if (d >= 1000000LL) g_perf.releases_held++; } -/* ------------------------------------------------------------------ buffer release pacing */ static void pending_release_free(struct pending_release *pr) { if (pr->surface && pr->surface->releases_pending > 0) pr->surface->releases_pending--; @@ -384,7 +326,6 @@ static void pending_release_free(struct pending_release *pr) { free(pr); } -/* A surface is going away: its queued releases still go out on time, they just stop counting. */ static void pending_releases_forget_surface(struct surface *s) { struct pending_release *pr; wl_list_for_each(pr, &g_pending_releases, link) @@ -410,7 +351,7 @@ static void arm_release_timer(void) { static int on_release_timer(int fd, uint32_t mask, void *data) { struct pending_release *pr, *tmp; uint64_t expirations; - int64_t now = now_ns() + 300000; /* anything due within 0.3 ms goes now */ + int64_t now = now_ns() + 300000; if (read(fd, &expirations, sizeof(expirations)) < 0 && errno != EAGAIN) return 0; wl_list_for_each_safe(pr, tmp, &g_pending_releases, link) { if (pr->at_ns <= now) { @@ -424,24 +365,8 @@ static int on_release_timer(int fd, uint32_t mask, void *data) { return 0; } -/* Give a replaced buffer back to its client: now, or on the limiter's cadence. - * - * Each release takes the next slot of a per-surface cadence (one slot per interval), so a game - * gets one buffer back per interval however fast it commits. The schedule is kept honest at both - * ends: a slot in the past is brought to now (the game was slower than the cap, no catch-up burst - * is owed), and it never runs further ahead than the releases actually queued - with p releases - * still pending the new one lands at most (p + 1) intervals out, nothing pending means at most - * one interval. Without that bound the schedule kept slots that were consumed but never - * delivered (a swapchain rebuild destroys buffers with queued releases) or that a coarser earlier - * limit had spaced out, and the game's first frames after that waited on empty slots. */ static void release_buffer(struct surface *s, struct wl_resource *buffer, int64_t since_ns) { const int limit = g_fps_limit; - /* Without a limit of its own a game is paced to the screen. A swapchain that does not wait for - * frame callbacks (MAILBOX, IMMEDIATE) is held back by nothing else here, so handing a replaced - * buffer straight back let it draw as fast as the GPU allowed and everything above the refresh - * rate was thrown away - 178 frames a second for 91 on screen, measured (WinNative, maxjivi05). - * One release per refresh is the back-pressure X11 gives, and the screen shows the same frames - * either way. */ const int64_t interval = limit > 0 ? 1000000000LL / limit : g_refresh_ns; if (interval <= 0 || g_release_timer_fd < 0) { wl_buffer_send_release(buffer); perf_note_release(since_ns); return; } int64_t now = now_ns(); @@ -463,9 +388,7 @@ static void release_buffer(struct surface *s, struct wl_resource *buffer, int64_ arm_release_timer(); } -/* ------------------------------------------------------------------ seat state */ -/* Each Wine process is a separate client with its own wl_pointer / wl_keyboard. */ struct seat_pointer { struct wl_resource *ptr; struct wl_resource *focus; }; struct seat_keyboard { struct wl_resource *kb; struct wl_resource *focus; }; struct seat_touch { struct wl_resource *touch; struct wl_resource *focus; }; @@ -475,39 +398,26 @@ static struct seat_pointer g_ptrs[MAX_PTRS]; static int g_nptrs; static struct seat_keyboard g_kbs[MAX_PTRS]; static int g_nkbs; -/* Modifier state in the keymap's real-modifier bits (Shift=0x1, Lock=0x2, Control=0x4, Mod1=0x8, - * Mod4=0x40). A client of the wayland backend - gamescope, labwc - takes modifiers only from - * wl_keyboard.modifiers and ignores what a Shift key event does to its xkb state, so without this - * every capital arrived lowercase. */ static uint32_t g_mods_depressed, g_mods_locked; -static uint32_t g_mod_keys_held; /* one bit per modifier key below, so a repeat press is harmless */ +static uint32_t g_mod_keys_held; +static uint8_t g_keys_down[0x300 / 8]; static struct seat_touch g_touches[MAX_PTRS]; static int g_ntouches; -/* ---- the client's cursor (wl_pointer.set_cursor) ------------------------------------------- - * Not composited: under zero-copy the program's buffer goes straight to an Android layer and there - * is nothing to composite into. The cursor surface is snapshotted here instead and the app draws it - * as its overlay, above every present path (Bannerlator's design). What it buys: the real SHAPE - - * labwc's resize arrows at a window's edges and corners, a text field's I-beam - and an - * authoritative HIDE (set_cursor with a NULL surface, what a mouse-look game does). - * wl_shm cursors (Wine, pixman) are copied directly; a GPU cursor (labwc on Vulkan/GLES, which - * wlroots hands over as a dma-buf, usually UBWC) is read back through vkp_image_readback. */ #define CURSOR_MAX_PX (256 * 256) static pthread_mutex_t g_cursor_lock = PTHREAD_MUTEX_INITIALIZER; -static struct surface *g_cursor_surface; /* compositor thread only */ -static struct surface *g_cursor_shown; /* compositor thread: whose image g_cursor_px holds */ -static int g_cursor_hx, g_cursor_hy; /* hotspot, surface-local */ -static uint32_t g_cursor_px[CURSOR_MAX_PX]; /* guarded by g_cursor_lock: ARGB8888 snapshot */ -static uint32_t g_cursor_rb[CURSOR_MAX_PX]; /* compositor thread: GPU readback staging */ -static int g_cursor_w, g_cursor_h; /* 0 = nothing to draw */ -static int g_cursor_hidden = 1; /* the client asked for no pointer */ -static int g_cursor_serial; /* bumped on every change; the app polls it */ +static struct surface *g_cursor_surface; +static struct surface *g_cursor_shown; +static int g_cursor_hx, g_cursor_hy; +static uint32_t g_cursor_px[CURSOR_MAX_PX]; +static uint32_t g_cursor_rb[CURSOR_MAX_PX]; +static int g_cursor_w, g_cursor_h; +static int g_cursor_hidden = 1; +static int g_cursor_serial; -/* The last image again, after a hide: the same surface set as the pointer once more with nothing - * newly committed to it (wlroots re-sets its cursor surface each time the pointer enters). */ static void cursor_publish_shown(void) { pthread_mutex_lock(&g_cursor_lock); - if (g_cursor_w > 0) { g_cursor_hidden = 0; g_cursor_serial++; } /* serial: the hotspot may be new */ + if (g_cursor_w > 0) { g_cursor_hidden = 0; g_cursor_serial++; } pthread_mutex_unlock(&g_cursor_lock); } @@ -533,23 +443,16 @@ static void cursor_publish_shm(struct wl_shm_buffer *shm, int hx, int hy) { int32_t w = wl_shm_buffer_get_width(shm), h = wl_shm_buffer_get_height(shm); int32_t stride = wl_shm_buffer_get_stride(shm); if (w <= 0 || h <= 0 || (int64_t)w * h > CURSOR_MAX_PX) return; - /* libwayland only promises stride >= width; each row copied here is width * 4 bytes, so a - * shorter stride would read past the end of the client's pool. */ if ((int64_t)stride < (int64_t)w * 4) return; wl_shm_buffer_begin_access(shm); cursor_publish_pixels((const uint8_t *)wl_shm_buffer_get_data(shm), w, h, (size_t)stride, hx, hy); wl_shm_buffer_end_access(shm); } -/* The serial alone, without the lock: the app asks on every pointer move, and the snapshot below - * copies up to 256 KB of pixels across JNI and holds the lock the compositor thread takes to - * change the cursor. A torn read is only a missed or an extra snapshot. */ int droiddeck_cursor_serial(void) { return __atomic_load_n(&g_cursor_serial, __ATOMIC_RELAXED); } -/* Read by the app (UI thread). out = [serial, hidden, w, h, hotspotX, hotspotY, pixels...]. - * Returns the number of ints written, or 0 if out is too small. */ int droiddeck_cursor_snapshot(int *out, int cap) { int n = 0; pthread_mutex_lock(&g_cursor_lock); @@ -568,14 +471,12 @@ int droiddeck_cursor_snapshot(int *out, int cap) { struct active_touch { struct surface *surface; int pointer_fallback; }; static struct active_touch g_touch_points[MAX_TOUCH_POINTS]; static void touch_cancel_surface(struct surface *surface); -static struct surface *g_grab; /* no-desktop fallback: surface holding the button */ -static struct surface *g_key_target; /* no-desktop fallback: last clicked surface */ -static struct surface *g_ime_click; /* last clicked program window: where text input goes */ +static struct surface *g_grab; +static struct surface *g_key_target; +static struct surface *g_ime_click; static int g_input_pipe[2] = {-1, -1}; struct input_msg { int type; int p1; int p2; int p3; int p4; }; -/* Pointer constraints (zwp_pointer_constraints_v1) and relative pointers - * (zwp_relative_pointer_manager_v1); see the "pointer constraints" section. */ struct surface; static void constraints_surface_gone(struct surface *s); static void constraints_surface_commit(struct surface *s); @@ -583,7 +484,6 @@ static void constraints_pointer_gone(struct wl_resource *pointer); static void relative_pointers_pointer_gone(struct wl_resource *pointer); static void constraints_focus_entered(struct wl_resource *target, struct wl_client *client); -/* ------------------------------------------------------------------ dmabuf buffers */ void dmabuf_buffer_unref(struct dmabuf_buffer *b) { if (!b || --b->refs > 0) return; @@ -606,7 +506,6 @@ static struct dmabuf_buffer *get_dmabuf(struct wl_resource *buffer) { return NULL; } -/* ------------------------------------------------------------------ surface state */ static void surface_size(const struct surface *s, int *w, int *h) { if (s->dst_set) { *w = s->dst[0]; *h = s->dst[1]; } @@ -614,7 +513,6 @@ static void surface_size(const struct surface *s, int *w, int *h) { else { *w = s->buf_w; *h = s->buf_h; } } -/* "Title" (program) for the log; subsurfaces are named after the window they belong to. */ static void describe(const struct surface *s, char *out, size_t size) { const struct surface *w = s; while (w->parent) w = w->parent; @@ -631,8 +529,8 @@ static struct surface *toplevel_by_hwnd(uint32_t hwnd) { return NULL; } -/* Reorder the mapped toplevels to match the last reported Windows z-order. Windows the - * report doesn't mention keep their relative order below the ones it does. */ +static void raise_kept_on_top(void); + static void apply_zorder(void) { for (size_t i = g_zorder_count; i-- > 0;) { struct surface *s = toplevel_by_hwnd(g_zorder[i]); @@ -640,6 +538,16 @@ static void apply_zorder(void) { wl_list_remove(&s->toplevel_link); wl_list_insert(g_toplevels.prev, &s->toplevel_link); } + raise_kept_on_top(); +} + +static void raise_kept_on_top(void) { + struct surface *s, *tmp, *kept[4]; + int n = 0; + wl_list_for_each_safe(s, tmp, &g_toplevels, toplevel_link) { + if (s->keep_on_top && n < 4) { wl_list_remove(&s->toplevel_link); kept[n++] = s; } + } + for (int i = 0; i < n; i++) wl_list_insert(g_toplevels.prev, &kept[i]->toplevel_link); } static void map_toplevel(struct surface *s) { @@ -653,10 +561,8 @@ static void map_toplevel(struct surface *s) { droiddeck_log("window", "opened %s %dx%d at %d,%d%s", name, w, h, s->x, s->y, s->placed ? "" : " (no desktop position yet)"); } - wl_list_insert(g_toplevels.prev, &s->toplevel_link); /* new windows start on top */ - /* Without a Wine desktop the clients are whole programs (the Linux desktop, a gamescope a - * program on it started over it): a window that opens on top takes the keys too, as it would - * on any desktop, rather than the one clicked last that is now underneath it. */ + wl_list_insert(g_toplevels.prev, &s->toplevel_link); + raise_kept_on_top(); if (!g_desktop) g_key_target = s; apply_zorder(); } @@ -675,14 +581,9 @@ static void unmap_toplevel(struct surface *s) { droiddeck_text_input_refocus(); } -/* Let go of the surface's dmabuf content. paced = 1: the buffer was replaced, give it back on the - * limiter's cadence; paced = 0: the surface is going away, give it back at once (a buffer of a - * destroyed surface is not shown again and must not sit unreleased with the client). */ static void drop_dmabuf(struct surface *s, int paced) { if (s->dmabuf) { wl_list_remove(&s->dmabuf_destroy.link); - /* A buffer on the zero-copy layer is the display's until SurfaceFlinger says otherwise: - * ahb_swapchain.c releases it then. */ if (!ahb_swapchain_defer_release(s->dmabuf_buf, s->dmabuf, s, paced)) { if (paced) release_buffer(s, s->dmabuf, now_ns()); else wl_buffer_send_release(s->dmabuf); @@ -693,8 +594,6 @@ static void drop_dmabuf(struct surface *s, int paced) { s->dmabuf_buf = NULL; } -/* The client destroyed the wl_buffer we are showing (a swapchain rebuild): keep showing its - * image (s->dmabuf_buf holds it) until the next commit replaces it; only the resource is gone. */ static void on_dmabuf_destroyed(struct wl_listener *l, void *data) { struct surface *s = wl_container_of(l, s, dmabuf_destroy); wl_list_remove(&s->dmabuf_destroy.link); @@ -720,7 +619,6 @@ static void fire_frames(struct wl_list *frames) { } } -/* Copy a committed wl_shm buffer into the surface's image and release the buffer. */ static void take_shm(struct surface *s, struct wl_shm_buffer *shm, struct wl_resource *buffer) { int32_t w = wl_shm_buffer_get_width(shm), h = wl_shm_buffer_get_height(shm); int32_t stride = wl_shm_buffer_get_stride(shm); @@ -742,10 +640,9 @@ static void take_shm(struct surface *s, struct wl_shm_buffer *shm, struct wl_res s->has_content = s->shm_img != NULL; g_stat_shm++; struct client_info *ci = client_info_of(wl_resource_get_client(s->resource)); - if (ci && ci->asked_feedback) ci->shm_frames++; /* since it asked for GPU buffers */ + if (ci && ci->asked_feedback) ci->shm_frames++; } -/* A single-pixel buffer (wl_single_pixel.c) as a 1x1 image, which the surface's viewport stretches. */ static void take_pixel(struct surface *s, const uint8_t bgra[4], struct wl_resource *buffer) { if (s->shm_img && (vkp_image_width(s->shm_img) != 1 || vkp_image_height(s->shm_img) != 1)) { vkp_image_destroy(s->shm_img); @@ -760,21 +657,17 @@ static void take_pixel(struct surface *s, const uint8_t bgra[4], struct wl_resou s->has_content = s->shm_img != NULL; } -/* The window the app's performance HUD follows: the latest one at least as big as the last to - * start presenting GPU frames (take_dmabuf) (X11 binds the HUD to the _MESA_DRV window and counts X presents instead). JNI upcalls. */ static struct surface *g_hud_surface; -/* When the HUD's window last presented a frame (now_ns), to let a replacement take over. */ -static int64_t g_hud_last_ns; -/* That window committed a frame the screen has not drawn yet. */ +static int64_t g_hud_last_ns, g_hud_alive_ns; static int g_hud_fresh; -extern void droiddeck_on_game_surface(const char *window, const char *gpu); /* window NULL = gone */ +static uint64_t g_game_frames; +extern void droiddeck_on_game_surface(const char *window, const char *gpu); extern void droiddeck_on_game_frame(void); -/* The program behind that window: its Linux pid (the Wayland client's credentials) and executable name - * ("" when /proc gave none) - the app arms its CPU affinity on it (X11 does that from window events). */ extern void droiddeck_on_game_program(int pid, const char *program); static void take_dmabuf(struct surface *s, struct dmabuf_buffer *b, struct wl_resource *buffer) { - if (s->dmabuf != buffer || s->dmabuf_buf != b) { + const int repeat = s->dmabuf == buffer && s->dmabuf_buf == b; + if (!repeat) { drop_dmabuf(s, 1); s->dmabuf = buffer; s->dmabuf_buf = b; @@ -793,11 +686,6 @@ static void take_dmabuf(struct surface *s, struct dmabuf_buffer *b, struct wl_re } } if (s->shm_img) { vkp_image_destroy(s->shm_img); s->shm_img = NULL; } - /* The size of the frames a window commits, when it changes after the first announcement: the - * program rebuilt its swapchain. It earns a line of its own, because a game whose swapchain - * came back smaller than it was is exactly what a picture suddenly filling one corner of the - * screen looks like from here - and the two sizes are the whole of the evidence. Rare by - * nature, so there is nothing to rate-limit. */ if (s->announced_vulkan && s->buf_w && s->buf_h && (s->buf_w != b->width || s->buf_h != b->height)) { char name[160]; @@ -809,15 +697,13 @@ static void take_dmabuf(struct surface *s, struct dmabuf_buffer *b, struct wl_re s->buf_h = b->height; s->buf_alpha = (b->format & 0xff) == 'A'; s->has_content = b->img != NULL; - g_stat_dmabuf++; + if (!repeat) g_stat_dmabuf++; const int announced_now = !s->announced_vulkan; if (!s->announced_vulkan) { char name[160]; s->announced_vulkan = 1; describe(s, name, sizeof(name)); if (b->img) - /* Imported for the copy path. Whether its frames ALSO go on the display layer without a copy - * is decided per frame (fullscreen, zero-copy on) and counted in the 10 s lines. */ droiddeck_log("vulkan", "%s is presenting GPU frames through Wayland: %dx%d, format %c%c%c%c, %s (%s)", name, b->width, b->height, b->format & 0xff, (b->format >> 8) & 0xff, (b->format >> 16) & 0xff, (b->format >> 24) & 0xff, @@ -832,15 +718,8 @@ static void take_dmabuf(struct surface *s, struct dmabuf_buffer *b, struct wl_re droiddeck_log("error", "could not import GPU frames from %s (%dx%d, modifier %#llx)", name, b->width, b->height, (unsigned long long)b->modifier); } - /* The HUD follows the window whether its frames are copied or go straight to the layer: a - * zero-copy frame the compositor never imported is still a presented game frame. A - * program's small surfaces - gamescope's 1x1 cursor, Qt's menus and tooltips (melonDS) - - * came after the game's and drew too rarely to count, which left the HUD on 0 fps while the - * game ran at 60. So a new window takes the HUD only when it is at least as big (a - * full-screen gamescope over the desktop still does), and a window gone quiet for a second - * gives way to whatever draws next. */ if (s != g_hud_surface && (b->img || ahb_swapchain_has_ahb(b)) && - (!g_hud_surface || now_ns() - g_hud_last_ns > 1000000000LL || + (!g_hud_surface || now_ns() - g_hud_alive_ns > 1000000000LL || (announced_now && (int64_t)b->width * b->height >= (int64_t)g_hud_surface->buf_w * g_hud_surface->buf_h))) { char name[160]; describe(s, name, sizeof(name)); @@ -849,8 +728,6 @@ static void take_dmabuf(struct surface *s, struct dmabuf_buffer *b, struct wl_re struct client_info *ci = client_info_of(wl_resource_get_client(s->resource)); if (ci) droiddeck_on_game_program((int)ci->pid, strncmp(ci->name, "pid ", 4) ? ci->name : ""); } - /* HDR session (gate open): a DXVK game switches to HDR by REBUILDING its swapchain on the same - * surface, so the one-shot line above never sees the 10-bit buffers - name every format change. */ if (b->format != s->hdr_fmt_logged && droiddeck_color_hdr_open()) { char name[160]; uint32_t af = ahb_swapchain_ahb_format(b); @@ -865,14 +742,14 @@ static void take_dmabuf(struct surface *s, struct dmabuf_buffer *b, struct wl_re : "the compositor's driver could NOT import it (nothing can show it)"); s->hdr_fmt_logged = b->format; } - /* Every buffer that reaches take_dmabuf is a presented GPU frame, so the HUD counts it. - * Asking whether the compositor could import it, as this used to, is a question about the - * copy path and not about whether a frame happened: a game whose buffers go straight to - * the display layer draws on screen while the counter sat at 0.0 fps and 1000.0 ms. */ - if (s == g_hud_surface) { g_hud_last_ns = now_ns(); g_hud_fresh = 1; droiddeck_on_game_frame(); } + if (s == g_hud_surface) { + g_hud_alive_ns = now_ns(); + if (!repeat) { g_hud_last_ns = g_hud_alive_ns; g_hud_fresh = 1; g_game_frames++; droiddeck_on_game_frame(); } + } } -/* ---- hooks for ahb_swapchain.c (zero-copy layers) */ +uint64_t droiddeck_game_frames(void) { return g_game_frames; } + struct dmabuf_buffer *droiddeck_dmabuf_from_resource(struct wl_resource *buffer) { return get_dmabuf(buffer); } int droiddeck_dmabuf_fd(const struct dmabuf_buffer *b) { return b && b->n_planes > 0 ? b->fd[0] : -1; } void droiddeck_dmabuf_size(const struct dmabuf_buffer *b, int *w, int *h) { *w = b->width; *h = b->height; } @@ -888,7 +765,6 @@ const struct droiddeck_color *droiddeck_surface_color(const struct surface *s) { return s ? droiddeck_color_of(s->resource) : NULL; } -/* ------------------------------------------------------------------ wl_surface */ static void surface_destroy(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); @@ -911,9 +787,6 @@ static void frame_callback_destroy(struct wl_resource *r) { wl_list_remove(wl_resource_get_link(r)); } -/* wp_presentation: tells Mesa's Vulkan driver when a frame reached the screen or was replaced - * before it did. Without it the driver waits for a frame callback (one per refresh) for every - * frame, which paced games to the screen rate even in mailbox mode. */ static void feedback_resource_destroy(struct wl_resource *r) { wl_list_remove(wl_resource_get_link(r)); } @@ -926,24 +799,24 @@ static void feedback_discard_all(struct wl_list *list) { } } -/* The current mode's refresh interval in ns, from the rate the app read off the display. */ static uint32_t nominal_refresh_ns(void) { - int mhz = g_output_refresh_mhz; + int mhz = atomic_load(&g_output_refresh_mhz); if (mhz <= 0) mhz = 60000; return (uint32_t)(1000000000000LL / (int64_t)mhz); } +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) + return render_ns; + return g_tick_vsync_ns; +} + static void feedback_present_all(struct wl_list *list, int64_t t) { struct wl_resource *fb, *tmp; uint64_t sec = (uint64_t)(t / 1000000000LL); uint32_t nsec = (uint32_t)(t % 1000000000LL); wl_resource_for_each_safe(fb, tmp, list) { - /* The protocol's "refresh" is the NOMINAL interval of the current mode, a constant - not - * the interval this frame happened to take. Reporting the measured average instead makes a - * variable-refresh panel look like a mode change on every frame: gamescope re-derives its - * pacing each time ("Changed refresh to: 119.2 ... 121.4hz", 826 times in a minute on a - * Galaxy Z Fold, none on a fixed-refresh device). Report the panel's rate, which the app - * gives us and wl_output already advertises. */ wp_presentation_feedback_send_presented(fb, (uint32_t)(sec >> 32), (uint32_t)sec, nsec, nominal_refresh_ns(), 0, 0, WP_PRESENTATION_FEEDBACK_KIND_VSYNC); @@ -979,12 +852,8 @@ static void surface_frame(struct wl_client *c, struct wl_resource *r, uint32_t c wl_resource_set_implementation(callback, NULL, NULL, frame_callback_destroy); wl_list_insert(s->pending_frames.prev, wl_resource_get_link(callback)); } -/* The bounding box serves pointer confinement. The exact flag also tells opaque-region handling - * whether the bounding box itself is the whole region. */ struct region { int set, exact; int x, y, w, h; }; -/* A wl_surface's opaque region is pending until its next commit. An exact region that covers - * the surface lets the blit path keep handling an otherwise alpha-capable buffer. */ static void surface_set_opaque(struct wl_client *c, struct wl_resource *r, struct wl_resource *region) { struct surface *s = wl_resource_get_user_data(r); @@ -1005,9 +874,6 @@ static void surface_set_input(struct wl_client *c, struct wl_resource *r, static void send_toplevel_configure(struct surface *s); -/* The pointer image from a cursor surface's buffer: wl_shm is copied, a dma-buf (labwc on a GPU - * renderer) is read back once the client's render into it is done - its implicit fence, as the - * zero-copy path waits for it (ahb_swapchain_present). */ static void cursor_publish_buffer(struct surface *s, struct wl_resource *buffer) { struct dmabuf_buffer *db = get_dmabuf(buffer); struct wl_shm_buffer *shm = db ? NULL : wl_shm_buffer_get(buffer); @@ -1040,7 +906,6 @@ static void on_idle_buffer_destroyed(struct wl_listener *l, void *data) { s->idle_buffer = NULL; } -/* Only what could be a pointer image is held; anything larger goes straight back. */ static void surface_hold_idle(struct surface *s, struct wl_resource *buffer) { struct dmabuf_buffer *db = get_dmabuf(buffer); struct wl_shm_buffer *shm = db ? NULL : wl_shm_buffer_get(buffer); @@ -1052,7 +917,6 @@ static void surface_hold_idle(struct surface *s, struct wl_resource *buffer) { wl_resource_add_destroy_listener(buffer, &s->idle_buffer_destroy); } -/* Lets go of the held buffer; release = give it back to the client (not while it is going away). */ static struct wl_resource *surface_take_idle(struct surface *s) { struct wl_resource *buffer = s->idle_buffer; if (!buffer) return NULL; @@ -1071,10 +935,6 @@ static void surface_commit(struct wl_client *c, struct wl_resource *r) { struct surface *s = wl_resource_get_user_data(r); struct surface *child; - /* xdg-shell: the initial commit of a toplevel is answered with a configure. One is also sent - * at get_toplevel, which Wine's driver has always had; a client that waits for the reply to its - * commit on a queue of its own (wlroots' Wayland backend - the desktop's labwc) can read that - * early one onto the wrong queue and would wait for ever. */ if (s->xdg_toplevel && !s->toplevel_committed) { s->toplevel_committed = 1; send_toplevel_configure(s); @@ -1101,7 +961,6 @@ static void surface_commit(struct wl_client *c, struct wl_resource *r) { struct wl_shm_buffer *shm = buffer && !db ? wl_shm_buffer_get(buffer) : NULL; uint8_t pixel[4]; - /* The previous content is replaced before reaching the screen. */ feedback_discard_all(&s->feedback); if (buffer) { @@ -1111,18 +970,15 @@ static void surface_commit(struct wl_client *c, struct wl_resource *r) { s->pending_buffer = NULL; s->pending_attach = 0; - surface_drop_idle(s); /* replaced, whatever the surface is now */ + surface_drop_idle(s); if (s->role == ROLE_CURSOR) { - /* The client's pointer image, copied out for the app's overlay (see cursor_publish_*) - * rather than composited, so it survives the zero-copy and HDR layer paths. */ if (!buffer) { - cursor_publish_hidden(); /* wlroots clears its cursor surface to hide the pointer */ + cursor_publish_hidden(); } else { cursor_publish_buffer(s, buffer); wl_buffer_send_release(buffer); } } else if (s->role == ROLE_NONE) { - /* Role-less surface: never drawn, but its buffer is kept for a set_cursor to come. */ if (buffer) surface_hold_idle(s, buffer); } else if (db) { take_dmabuf(s, db, buffer); @@ -1139,7 +995,6 @@ static void surface_commit(struct wl_client *c, struct wl_resource *r) { } } - /* Subsurface positions are applied when the parent commits. */ wl_list_for_each(child, &s->children, child_link) { if (child->sub_pending) { child->sub_x = child->sub_pending_x; @@ -1153,7 +1008,7 @@ static void surface_commit(struct wl_client *c, struct wl_resource *r) { wl_list_insert_list(s->feedback.prev, &s->pending_feedback); wl_list_init(&s->pending_feedback); constraints_surface_commit(s); - droiddeck_color_commit(s->resource); /* wp_color_management_surface_v1 state (returns at once when HDR is off) */ + droiddeck_color_commit(s->resource); if (s->role == ROLE_TOPLEVEL && s->xdg_toplevel) { if (s->has_content) map_toplevel(s); @@ -1234,7 +1089,6 @@ static void surface_resource_destroy(struct wl_resource *r) { schedule_render(); } -/* ------------------------------------------------------------------ wl_region */ static void region_destroy(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } static void region_add(struct wl_client *c, struct wl_resource *r, @@ -1266,7 +1120,6 @@ static const struct wl_region_interface region_impl = { .subtract = region_subtract, }; -/* ------------------------------------------------------------------ wl_compositor */ static void compositor_create_surface(struct wl_client *c, struct wl_resource *r, uint32_t id) { struct surface *s = calloc(1, sizeof(*s)); @@ -1300,8 +1153,6 @@ static void bind_compositor(struct wl_client *c, void *data, uint32_t ver, uint3 wl_resource_set_implementation(r, &compositor_impl, NULL, NULL); } -/* --------------------------------------------------------------- wl_subcompositor - * winewayland puts a window's Vulkan/GL swapchain in a subsurface over the window. */ static void subsurface_destroy(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } static void subsurface_set_position(struct wl_client *c, struct wl_resource *r, int32_t x, int32_t y) { @@ -1314,7 +1165,6 @@ static void subsurface_set_position(struct wl_client *c, struct wl_resource *r, static void restack_child(struct surface *s, struct surface *sibling, int above) { if (!s || !s->parent || !sibling) return; if (sibling == s->parent) { - /* Relative to the parent: directly above it or directly below it. */ s->below_parent = !above; wl_list_remove(&s->child_link); if (above) wl_list_insert(&s->parent->children, &s->child_link); @@ -1371,7 +1221,7 @@ static void subcompositor_get_subsurface(struct wl_client *c, struct wl_resource s->parent = p; s->below_parent = 0; s->sub_x = s->sub_y = 0; - wl_list_insert(p->children.prev, &s->child_link); /* new subsurfaces go on top */ + wl_list_insert(p->children.prev, &s->child_link); } static const struct wl_subcompositor_interface subcompositor_impl = { .destroy = subcompositor_destroy, @@ -1382,9 +1232,6 @@ static void bind_subcompositor(struct wl_client *c, void *data, uint32_t ver, ui wl_resource_set_implementation(r, &subcompositor_impl, NULL, NULL); } -/* ---------------------------------------------------------------- wp_viewporter - * winewayland crops window buffers to the window size and scales swapchains to the - * client area with viewports, so they must be honoured for things to line up. */ static void viewport_destroy(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } static void viewport_set_source(struct wl_client *c, struct wl_resource *r, @@ -1435,18 +1282,12 @@ static void bind_viewporter(struct wl_client *c, void *data, uint32_t ver, uint3 wl_resource_set_implementation(r, &viewporter_impl, NULL, NULL); } -/* ------------------------------------------------------------------ xdg_shell */ static void xdg_toplevel_destroy_req(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } static void xdg_toplevel_noop_parent(struct wl_client *c, struct wl_resource *r, struct wl_resource *p) {} static void xdg_toplevel_set_title(struct wl_client *c, struct wl_resource *r, const char *title) { struct surface *s = wl_resource_get_user_data(r); if (!s) return; - /* A window already on screen being renamed is something else taking it over: gamescope keeps - * one toplevel and retitles it as the game takes the screen. Unlogged, that left the log - * showing a window "closed" under a name it had never been logged as opening - which reads - * like a missing event and is really a rename. A title set before the window is mapped needs - * no line: the "opened" line carries it. */ int announce = s->mapped && title && *title && (!s->title || strcmp(s->title, title) != 0); char before[160]; if (announce) describe(s, before, sizeof(before)); @@ -1458,7 +1299,10 @@ static void xdg_toplevel_set_title(struct wl_client *c, struct wl_resource *r, c droiddeck_log("window", "renamed %s -> %s", before, after); } } -static void xdg_toplevel_set_app_id(struct wl_client *c, struct wl_resource *r, const char *id) {} +static void xdg_toplevel_set_app_id(struct wl_client *c, struct wl_resource *r, const char *id) { + struct surface *s = wl_resource_get_user_data(r); + if (s && id && !strcmp(id, "droiddeck-cardboard-vr")) s->keep_on_top = 1; +} static void xdg_toplevel_show_menu(struct wl_client *c, struct wl_resource *r, struct wl_resource *seat, uint32_t serial, int32_t x, int32_t y) {} static void xdg_toplevel_move(struct wl_client *c, struct wl_resource *r, struct wl_resource *seat, @@ -1467,10 +1311,6 @@ static void xdg_toplevel_resize(struct wl_client *c, struct wl_resource *r, stru uint32_t serial, uint32_t edges) {} static void xdg_toplevel_set_i32(struct wl_client *c, struct wl_resource *r, int32_t w, int32_t h) {} static void xdg_toplevel_noop(struct wl_client *c, struct wl_resource *r) {} -/* The output's size; active, and fullscreen when asked. gamescope waits for the fullscreen - * state before it drops its libdecor frame, and never draws until it arrives; it was told the - * same size on its command line. A nested wlroots compositor (labwc) has no other way to learn - * it: given 0x0 it opens its default 1280x720 and the whole desktop is upscaled from that. */ static void send_toplevel_configure(struct surface *s) { struct wl_array states; wl_array_init(&states); @@ -1536,7 +1376,6 @@ static void xdg_surface_get_toplevel(struct wl_client *c, struct wl_resource *r, s->xdg_toplevel = tl; send_toplevel_configure(s); } -/* A popup is dismissed as soon as it is made (see the positioner below). */ static void popup_destroy(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } static void popup_grab(struct wl_client *c, struct wl_resource *r, struct wl_resource *seat, uint32_t serial) {} static void popup_reposition(struct wl_client *c, struct wl_resource *r, struct wl_resource *positioner, @@ -1570,11 +1409,6 @@ static void xdg_surface_resource_destroy(struct wl_resource *r) { static void xdg_wm_base_destroy(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } -/* Popups are not drawn here, but their requests must still land somewhere: a resource without an - * implementation makes libwayland abort on the first request to it - the whole compositor, and the - * app with it. A positioner takes every request and keeps nothing; a popup is dismissed at once - * (popup_done), which is what a client does with a popup it cannot show. Seen with a gamescope - * started from the Linux desktop beside labwc. */ static void positioner_destroy(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } static void positioner_set_size(struct wl_client *c, struct wl_resource *r, int32_t w, int32_t h) {} static void positioner_set_anchor_rect(struct wl_client *c, struct wl_resource *r, int32_t x, int32_t y, @@ -1624,7 +1458,6 @@ static void bind_xdg_wm_base(struct wl_client *c, void *data, uint32_t ver, uint wl_resource_set_implementation(r, &xdg_wm_base_impl, NULL, NULL); } -/* ------------------------------------------------------------------ banner_desktop_v1 */ static void desktop_destroy_req(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } static void desktop_set_desktop(struct wl_client *c, struct wl_resource *r, struct wl_resource *surface) { @@ -1673,21 +1506,17 @@ static void bind_desktop(struct wl_client *c, void *data, uint32_t ver, uint32_t wl_resource_set_implementation(r, &desktop_impl, NULL, NULL); } -/* ------------------------------------------------------------------ wl_output */ -/* wl_output v3+ has a request (release); without an implementation the first client to send it - * aborted the compositor. */ static void output_release(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } static const struct wl_output_interface output_impl = { .release = output_release }; -/* Every bound wl_output, so a resized output (a foldable opening) can send its new mode. */ static struct wl_list g_outputs; static void output_resource_destroy(struct wl_resource *r) { wl_list_remove(wl_resource_get_link(r)); } -static void output_send_mode(struct wl_resource *r) { +static void output_send_mode(struct wl_resource *r, int mhz) { wl_output_send_mode(r, WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED, g_output_w > 0 ? g_output_w : 1920, g_output_h > 0 ? g_output_h : 1080, - g_output_refresh_mhz > 0 ? g_output_refresh_mhz : 60000); + mhz); } static void bind_output(struct wl_client *c, void *data, uint32_t ver, uint32_t id) { @@ -1697,7 +1526,7 @@ static void bind_output(struct wl_client *c, void *data, uint32_t ver, uint32_t wl_list_insert(&g_outputs, wl_resource_get_link(r)); wl_output_send_geometry(r, 0, 0, 340, 190, WL_OUTPUT_SUBPIXEL_UNKNOWN, "DroidDeck", "Wayland", WL_OUTPUT_TRANSFORM_NORMAL); - output_send_mode(r); + output_send_mode(r, g_output_announced_refresh_mhz); if (ver >= WL_OUTPUT_NAME_SINCE_VERSION) { wl_output_send_name(r, "DroidDeck-1"); wl_output_send_description(r, "DroidDeck display"); @@ -1708,7 +1537,6 @@ static void bind_output(struct wl_client *c, void *data, uint32_t ver, uint32_t } } -/* ------------------------------------------------------------------ rendering */ struct draw_list { struct vkp_draw *d; int n, cap; }; @@ -1718,21 +1546,15 @@ static struct vkp_image *surface_image(struct surface *s) { return s->dmabuf_buf ? s->dmabuf_buf->img : NULL; } -/* HDR (gate open) only: the scene's HDR surface whose current frame is one of the game's gralloc buffers - * that the compositor's own driver could NOT import (a 10-bit UBWC layout it does not take, say). Such a - * frame has no draw, so neither layer_candidate() nor ahb_layer_only_candidate() (toplevels only) can - * find it - and a Vulkan game's swapchain is a SUBSURFACE of its window. Remembered here while the scene - * is built so it can still go on the display layer, which never needed the import. Reset per scene; - * never set while the HDR gate is closed. */ static struct surface *g_hdr_unimported; -static int g_hdr_unimported_rect[4], g_hdr_unimported_below; /* scene x,y,w,h; draws under it */ +static int g_hdr_unimported_rect[4], g_hdr_unimported_below; static void note_hdr_unimported(const struct draw_list *dl, struct surface *s, int ox, int oy) { if (!s->dmabuf_buf || s->dmabuf_buf->img || !ahb_swapchain_has_ahb(s->dmabuf_buf)) return; const struct droiddeck_color *c = droiddeck_color_of(s->resource); if (!c || !c->dataspace) return; if (s->src_set && (s->src[0] != 0 || s->src[1] != 0 || (int)(s->src[2] + 0.5f) != s->buf_w || - (int)(s->src[3] + 0.5f) != s->buf_h)) return; /* cropped: the layer shows whole buffers */ + (int)(s->src[3] + 0.5f) != s->buf_h)) return; int dw, dh; surface_size(s, &dw, &dh); g_hdr_unimported = s; @@ -1741,8 +1563,6 @@ static void note_hdr_unimported(const struct draw_list *dl, struct surface *s, i g_hdr_unimported_below = dl->n; } -/* A client that describes opaque regions can intentionally leave part of an alpha buffer see-through. - * Gamescope uses this for its full-size Steam notification and overlay planes. */ static int surface_translucent(const struct surface *s, int w, int h) { if (!s->buf_alpha) return 0; const struct client_info *ci = client_info_of(wl_resource_get_client(s->resource)); @@ -1786,8 +1606,6 @@ static void add_tree(struct draw_list *dl, struct surface *s, int ox, int oy, in if (!c->below_parent) add_tree(dl, c, ox + c->sub_x, oy + c->sub_y, depth + 1); } -/* Scene size: the desktop's, or without one the largest window's (a single - * fullscreen game then fills the screen exactly as before). */ static void scene_size(int *w, int *h) { struct surface *s; long long best = 0; @@ -1813,13 +1631,6 @@ static void fire_all_frames(void) { wl_list_for_each(s, &g_surfaces, link) fire_frames(&s->frames); } -/* With no output window (the app is in the background, or the SurfaceView is being rebuilt) - * nothing gets drawn, but the clients must not be left waiting on us. A FIFO swapchain blocks - * in its present until its wp_presentation feedback and frame callback arrive, and a client - * blocked there stops pumping messages: winhandler.exe then wedges behind it and the app - * concludes the program has exited and closes the whole session. (DXVK's mailbox presents - * never wait, which is why only OpenGL/Zink clients died on a background/resume.) Answer every - * pending frame and feedback as discarded, and keep doing so until a window is back. */ static void pace_without_output(void) { struct surface *s; wl_list_for_each(s, &g_surfaces, link) { @@ -1831,19 +1642,15 @@ static void pace_without_output(void) { static int on_frame_timer(void *data) { pace_without_output(); - if (vkp_has_window()) schedule_render(); /* it is back: draw the current scene */ + if (vkp_has_window()) schedule_render(); else if (g_frame_timer) wl_event_source_timer_update(g_frame_timer, 16); return 0; } -/* Layer mode: the index of a draw that shows a whole client GPU frame over the whole scene (one - * fullscreen game), or -1. Only the top two positions are looked at: the game must be the topmost - * draw, or have exactly ONE draw above it, which then goes on the overlay layer (sc_layer.h). - * Anything deeper would need more display layers than HWC will compose. */ static int layer_candidate(const struct draw_list *dl, int scene_w, int scene_h) { for (int i = dl->n - 1; i >= 0 && i >= dl->n - 2; i--) { const struct vkp_draw *d = &dl->d[i]; - if (d->blend) continue; /* the translucent plane must not replace the opaque game layer */ + if (d->blend) continue; if (!vkp_image_is_dmabuf(d->img)) continue; if (d->dx != 0 || d->dy != 0 || d->dw != scene_w || d->dh != scene_h) continue; if (d->sx != 0 || d->sy != 0 || (int)d->sw != vkp_image_width(d->img) || @@ -1853,7 +1660,6 @@ static int layer_candidate(const struct draw_list *dl, int scene_w, int scene_h) return -1; } -/* Zero-copy: the surface whose current GPU frame `img` is (layer_candidate found the draw). */ static struct surface *surface_for_image(const struct vkp_image *img) { struct surface *s; wl_list_for_each(s, &g_surfaces, link) @@ -1861,9 +1667,6 @@ static struct surface *surface_for_image(const struct vkp_image *img) { return NULL; } -/* Zero-copy: the topmost window whose frame is one of the game's AHardwareBuffers that this - * renderer could NOT import (so it has no draw), covering the whole scene at 0,0 with nothing of - * its own above it: it can only be shown on the layer. NULL otherwise. */ static struct surface *ahb_layer_only_candidate(int scene_w, int scene_h) { struct surface *s; int w, h; @@ -1878,39 +1681,16 @@ static struct surface *ahb_layer_only_candidate(int scene_w, int scene_h) { return s; } -/* ---- HDR (droiddeck_color.h) in the scene - * An HDR frame is only right on the game's own display layer: everything the compositor draws itself - - * the scene blit, the effects chain, frame generation, its swapchain - is 8-bit sRGB, and a PQ-encoded - * frame pushed through it as it stands comes out washed out. So a scene with HDR in it takes one of - * three routes (hdr_plan): - * 0 the HDR game ALONE on its display layer (zero-copy, or one copy) - with at most one SDR window - * above it on the overlay layer where this display can compose that. Best: nothing is converted. - * 1 the HDR PICTURE: everything else without frame generation - screen effects on, a window above - * the game on a display that cannot take a second layer, a windowed game, zero-copy off. The whole - * scene is composed into ONE 10-bit PQ BT.2020 picture (SDR content placed at the SDR white; the - * effects run on it in 10-bit) and put on the game layer tagged BT2020_PQ (hdr_compose.h). - * 2 frame generation: its extra frames need presents of their own, so the scene is composed into PQ - * and presented through an HDR10 swapchain - or, where the screen surface offers none, - * tone-mapped to SDR (correct colours instead of washed out). - * 3 a frame the compositor could not import: only its display layer can show it, so effects and - * frame generation are skipped for it (said in the log). - * The drawer's HDR output switch (droiddeck_color_output) OFF: the same routes, tone-mapped - route 0 - * becomes route 1 (the whole scene composed, tone-mapped to sRGB, onto the game layer UNtagged), route 2 - * tone-maps into an SDR swapchain, route 3 cannot (nothing can read those frames) and stays HDR, said - * in the log. The game is told nothing; it keeps rendering HDR. - * Nothing here runs while the HDR gate is closed. */ struct hdr_scene { struct vkp_hdr_frame hf; - unsigned char *is_hdr; /* per draw (calloc'd; free after the frame) */ + unsigned char *is_hdr; int n_hdr; - const struct droiddeck_color *color; /* the topmost HDR draw's description: what the picture is tagged */ - struct surface *who; /* its surface, for the log */ - const char *why; /* route 1: why the game cannot be alone on its layer */ + const struct droiddeck_color *color; + struct surface *who; + const char *why; }; -/* The HDR surface note_hdr_unimported() saw in THIS scene, when it covers the whole scene at 0,0 and - * nothing is drawn above it: the display layer is the only place its frame can be shown. */ static struct surface *hdr_unimported_fullscreen(const struct draw_list *dl, int w, int h) { if (!g_hdr_unimported || g_hdr_unimported_below != dl->n) return NULL; if (g_hdr_unimported_rect[0] != 0 || g_hdr_unimported_rect[1] != 0 || @@ -1923,11 +1703,9 @@ static int is_hdr_surface(struct surface *s) { return c && c->dataspace; } -/* Which route this scene takes (see above); fills hs. 0 whenever the gate is closed or no HDR is drawn. */ static int hdr_plan(const struct draw_list *dl, int w, int h, int fx_on, int framegen, struct hdr_scene *hs) { memset(hs, 0, sizeof(*hs)); if (!droiddeck_color_hdr_open()) return 0; - /* A fullscreen HDR frame this compositor could not import has no draw: layer only (route 3). */ struct surface *un = hdr_unimported_fullscreen(dl, w, h); if (!un) { struct surface *lo = ahb_layer_only_candidate(w, h); @@ -1941,7 +1719,7 @@ static int hdr_plan(const struct draw_list *dl, int w, int h, int fx_on, int fra if (!is_hdr_surface(s)) continue; hs->is_hdr[i] = 1; hs->n_hdr++; - hs->color = droiddeck_color_of(s->resource); /* later draws are above: the topmost wins */ + hs->color = droiddeck_color_of(s->resource); hs->who = s; } if (!hs->n_hdr) { free(hs->is_hdr); hs->is_hdr = NULL; return 0; } @@ -1950,9 +1728,6 @@ static int hdr_plan(const struct draw_list *dl, int w, int h, int fx_on, int fra hs->hf.peak_nits = hs->color->max_cll > 0.0f ? hs->color->max_cll : hs->color->has_st2086 ? hs->color->max_lum : 1000.0f; if (framegen) return 2; - /* Route 0 when the game can be alone on its layer: no effects, zero-copy on, the fullscreen draw - * is the HDR game, and above it nothing - or one window the overlay layer can carry. Not while the - * HDR output switch is off: its frame as it stands is PQ, and only the composition can tone-map it. */ int li = g_zero_copy ? layer_candidate(dl, w, h) : -1; int over = li >= 0 ? dl->n - 1 - li : 0; if (!hs->hf.tonemap && !fx_on && li >= 0 && hs->is_hdr[li] && @@ -1966,11 +1741,10 @@ static int hdr_plan(const struct draw_list *dl, int w, int h, int fx_on, int fra return 1; } -/* One line per change of route (and of its reason, and of the HDR output switch). */ static void hdr_note_route(int route, const struct hdr_scene *hs) { static int said = -1, said_tm = -1; static const char *said_why; - const int tm = route != 0 && !droiddeck_color_output(); /* route 0 never runs with the switch off */ + const int tm = route != 0 && !droiddeck_color_output(); if (route == said && tm == said_tm && (route != 1 || hs->why == said_why)) return; int was = said; said = route; said_why = hs->why; said_tm = tm; @@ -1999,7 +1773,7 @@ static void hdr_note_route(int route, const struct hdr_scene *hs) { if (tm) droiddeck_log("color", "HDR output is switched off, but %s's HDR frames cannot be imported by the compositor, " "so nothing can tone-map them: they stay HDR on its own display layer", name); - break; /* otherwise hdr_note_precedence says it */ + break; default: if (was == 1 || was == 2) droiddeck_log("color", "%s is back on its own display layer (no composition needed)", name); @@ -2007,7 +1781,6 @@ static void hdr_note_route(int route, const struct hdr_scene *hs) { } } -/* Say when effects / frame generation start or stop being skipped for an HDR game (once per change). */ static void hdr_note_precedence(struct surface *hs, int fx_on, int framegen) { static int fx_said = -1, fg_said = -1; int fx_skip = hs && fx_on, fg_skip = hs && framegen; @@ -2031,7 +1804,6 @@ static void hdr_note_precedence(struct surface *hs, int fx_on, int framegen) { } } -/* This scene went through the copy path: count every HDR-described surface in it, with the reason. */ static void hdr_count_copied(const struct draw_list *dl, const char *reason) { for (int i = 0; i < dl->n; i++) { struct surface *s = surface_for_image(dl->d[i].img); @@ -2048,11 +1820,11 @@ static void render_scene(void) { struct surface *s; int w, h; const int64_t t_scene = now_ns(); - int copy = 0; /* this scene went through the screen swapchain (the perf line's "copy") */ + int copy = 0; g_dirty = 0; g_hud_fresh = 0; - g_hdr_unimported = NULL; /* found again while the scene is built (HDR gate open only) */ + g_hdr_unimported = NULL; wl_list_for_each(s, &g_surfaces, link) s->drawn = 0; scene_size(&w, &h); if (w != g_scene_w || h != g_scene_h) { @@ -2063,7 +1835,7 @@ static void render_scene(void) { } if (g_desktop && !g_hide_shell) add_tree(&dl, g_desktop, 0, 0, 0); wl_list_for_each(s, &g_toplevels, toplevel_link) { - if (g_desktop && !s->placed) continue; /* wait for its position */ + if (g_desktop && !s->placed) continue; if (g_hide_shell && !strcmp(client_name(wl_resource_get_client(s->resource)), "explorer.exe")) continue; add_tree(&dl, s, s->placed ? s->x : 0, s->placed ? s->y : 0, 0); } @@ -2071,11 +1843,10 @@ static void render_scene(void) { int rendered = 0; int fx_on = vkp_effects_active(); int framegen = vkp_framegen_active(); - /* HDR (see hdr_plan): route 0 = the old paths below; 1 / 2 = composed; 3 = layer only, effects and - * frame generation skipped. Always 0 while the HDR gate is closed: nothing changes for that session. */ + const int cardboard = vkp_cardboard_active(); struct hdr_scene hs; int hdr_route = hdr_plan(&dl, w, h, fx_on, framegen, &hs); - const char *hdr_copy = NULL; /* why this scene's HDR frames (if any) took the copy path */ + const char *hdr_copy = NULL; if (droiddeck_color_hdr_open()) { hdr_note_route(hdr_route, &hs); hdr_note_precedence(hdr_route == 3 ? hs.who : NULL, fx_on, framegen); @@ -2086,10 +1857,10 @@ static void render_scene(void) { vkp_apply_window_request(); sc_layer_hide_overlay(); if (sc_layer_present_hdr_scene(dl.d, dl.n, &hs.hf, w, h, hs.color) == 0) { - rendered = vkp_base_black(w, h) == 0; /* black under the composed picture, presented only when it is not already */ + rendered = vkp_base_black(w, h) == 0; if (fell_back) { fell_back = 0; droiddeck_log("color", "the composed picture is on the game's display layer again"); } } else { - hdr_route = 2; /* no layer this frame: the picture goes through the swapchain instead */ + hdr_route = 2; if (!fell_back) { fell_back = 1; droiddeck_log("color", "the composed picture could not go on the game's display layer (no layer, or the " @@ -2106,26 +1877,17 @@ static void render_scene(void) { else if (rendered && how == 2) droiddeck_color_frame_shown(hs.color, DROIDDECK_HDR_TONEMAPPED, 0); else if (rendered) hdr_copy = "the HDR composition pass is unavailable on this driver"; } - if (hdr_route == 0 || hdr_route == 3) { - /* What still forces the whole scene back through the compositor pass (and so through the app's - * own swapchain), and what no longer does: - * - frame generation ALWAYS does: its extra frames each need a present of their own on - * consecutive vblanks, and a display layer latches one buffer per refresh; - * - screen effects do NOT any more when the game is alone on screen - the chain runs and its - * result is copied into the game layer's own gralloc buffer (sc_layer_present_pass), so the - * game keeps its layer and the display does the scene -> output mapping; - * - screen effects DO when a window is drawn above the game: the chain has to see the whole - * scene to look the way it does on the copy path, and here the game is only part of it. */ + if (hdr_route == 0 && vkp_quest_layer_presentation() && !framegen && !cardboard && + !ahb_layer_only_candidate(w, h)) { + /* The complete SDR scene stays on one display layer. Do not hide/re-show GAME + * on each desktop frame just because it is not a single fullscreen window. */ + rendered = vkp_render(w, h, dl.d, dl.n) == 0; + } else if (hdr_route == 0 || hdr_route == 3) { const int pass_on = fx_on || framegen; - int li = (g_zero_copy && !framegen) ? layer_candidate(&dl, w, h) : -1; - int over = li >= 0 ? dl.n - 1 - li : 0; /* draws above the fullscreen game (0 or 1) */ + int li = (g_zero_copy && !framegen && !cardboard) ? layer_candidate(&dl, w, h) : -1; + int over = li >= 0 ? dl.n - 1 - li : 0; const int fx_blocks = (li >= 0 && fx_on && over > 0); if (fx_blocks) { li = -1; over = 0; } - /* A window above the game needs a SECOND display layer, and on some displays that costs the - * hardware composition the first layer was worth having (sc_layer_overlay_affordable). Where it - * does, the whole scene goes down the copy path exactly as it did before the layer set existed. - * Decided HERE, before the game is committed to a layer: deciding it after the present would - * show the game layer and hide it again on every frame. */ const int ov_blocks = (li >= 0 && over > 0 && !fx_blocks && !sc_layer_overlay_affordable()); if (ov_blocks) { li = -1; over = 0; } const int blocked = framegen ? 1 : (fx_blocks ? 2 : (ov_blocks ? 3 : 0)); @@ -2142,11 +1904,9 @@ static void render_scene(void) { droiddeck_log("effects", "zero-copy resumed: the game is back on its own display layer"); } struct surface *ls = li >= 0 ? surface_for_image(dl.d[li].img) : NULL; - /* A frame this renderer could not import can only be shown on the layer, effects or not. */ if (li < 0) ls = ahb_layer_only_candidate(w, h); - /* HDR: the same, for a game's SUBSURFACE swapchain whose 10-bit frame the compositor could not - * import (NULL whenever the HDR gate is closed - nothing is ever noted then). */ if (li < 0 && !ls) ls = hdr_unimported_fullscreen(&dl, w, h); + if (cardboard) ls = NULL; if (ls && pass_on && li < 0 && !g_zero_copy_fx_skip_said) { g_zero_copy_fx_skip_said = 1; droiddeck_log(framegen ? "framegen" : "effects", @@ -2154,24 +1914,8 @@ static void render_scene(void) { framegen ? "frame generation" : "effects"); } if (li >= 0 || ls) { - /* Layer mode: the fullscreen window goes on the game layer and (at most) one window above - * it on the overlay layer; whatever is under the game is hidden by it, so the screen - * surface only needs to be black. The game's frame goes on its layer as is when it is one - * of the game's own AHardwareBuffers (zero-copy, ahb_swapchain.c), through the effects - * chain's result when a Look is on, else through one blit into the pool. If a layer can't - * take its frame, the whole scene is drawn the usual way. */ - /* The layers go up FIRST and the base surface's black frame is presented after them. The - * order matters: a present holds an acquired swapchain image, and the acquire semaphore is - * a vblank gate - putting the effects chain or the layer transaction behind it costs a - * whole refresh (measured on the Pocket FIT: 72 fps that way, 111 fps this way, with Retro - * CRT at 1920x1080). The window request the app may have left is applied here instead, - * since vkp_render no longer runs before the layer path. */ vkp_apply_window_request(); int r = -1; - /* The game's own buffer can only go on the layer AS IS - with a Look on, the frame has to - * go through the chain first, so the raw buffer is skipped in favour of the pass (a frame - * this renderer could not import has no draw, li < 0, and stays zero-copy with the effects - * skipped, said once above). */ if (!(fx_on && li >= 0) && ls && ls->dmabuf_buf && ahb_swapchain_has_ahb(ls->dmabuf_buf)) r = ahb_swapchain_present(ls->dmabuf_buf, ls, w, h); if (r != 0 && li >= 0) @@ -2179,24 +1923,16 @@ static void render_scene(void) { : sc_layer_present(dl.d[li].img, w, h, ls ? droiddeck_surface_color(ls) : NULL); if (r == 0) { if (ls) ls->drawn = 1; - /* The one window above the game keeps the game off the copy path entirely: it goes on - * its own layer, cropped and placed by the display. */ int go[8], ov = 0; if (over == 1 && li >= 0 && vkp_map_draw(&dl.d[li + 1], go)) ov = sc_layer_present_overlay(dl.d[li + 1].img, go, dl.d[li + 1].blend) == 0 ? 1 : -1; if (ov <= 0) sc_layer_hide_overlay(); - if (ov < 0) { /* the overlay layer refused it: draw the whole scene the old way */ + if (ov < 0) { sc_layer_hide(); rendered = vkp_render(w, h, dl.d, dl.n) == 0; copy = 1; hdr_copy = "the overlay layer refused the window above it"; } else { - /* Black under the opaque layers. It is a plain black frame (no effects, no frame - * generation on it: they would only run on black), and it is presented only when the - * base surface does not already show one - entering layer mode, after a copy-path or - * frame-generation frame, after a swapchain rebuild. Every other layer frame draws and - * presents nothing here: the display layers are all that changes on screen. This loop - * is paced by the Choreographer's ticks (on_vsync), not by this present. */ rendered = vkp_base_black(w, h) == 0; } } else { @@ -2214,24 +1950,18 @@ static void render_scene(void) { : framegen ? "frame generation needs the compositor pass" : "it is not the one fullscreen window (only that one gets its own display layer)"; } - } /* routes 0 and 3 */ + } free(hs.is_hdr); if (hdr_copy && rendered && droiddeck_color_hdr_open()) hdr_count_copied(&dl, hdr_copy); if (rendered) { - int64_t t = now_ns(); + int64_t t = presented_ns(t_scene); g_stat_frames++; - /* A surface outside the scene (role-less, not placed yet, a hidden helper window such - * as wined3d's device window) was not shown, so its feedback is discarded rather than - * left pending: a FIFO present waits on it, and a client blocked there never commits - * again. */ wl_list_for_each(s, &g_surfaces, link) { if (s->drawn) feedback_present_all(&s->feedback, t); else feedback_discard_all(&s->feedback); } fire_all_frames(); } else { - /* No output surface yet (or it went away): keep clients paced without it, now and on a - * timer that re-arms itself until a window is back (see pace_without_output). */ pace_without_output(); if (!g_frame_timer) g_frame_timer = wl_event_loop_add_timer(wl_display_get_event_loop(g_display), @@ -2256,7 +1986,6 @@ static int on_fallback_timer(void *data) { static void schedule_render(void) { g_dirty = 1; if (!g_display) return; - /* With vsync ticks flowing the next tick renders; otherwise render on a timer. */ if (g_last_vsync_ns && now_ns() - g_last_vsync_ns < 100000000LL) return; if (g_fallback_armed) return; if (!g_fallback_timer) @@ -2267,14 +1996,10 @@ static void schedule_render(void) { wl_event_source_timer_update(g_fallback_timer, 8); } -/* With frame generation on, every scene is the engine's next source frame, so one drawn for - * another window (Steam's overlay) counted as a game frame and took its present slots. Such a - * change waits for the game's next frame, unless the game has been still for 100 ms. */ static int scene_waits_for_game(int64_t now) { return g_hud_surface && !g_hud_fresh && now - g_hud_last_ns < 100000000LL && vkp_framegen_active(); } -/* A screen refresh (Choreographer tick): draw the newest state once. */ static void on_vsync(int64_t frame_time_ns) { int64_t now = now_ns(); g_perf.ticks++; @@ -2283,24 +2008,19 @@ static void on_vsync(int64_t frame_time_ns) { if (d > 3000000LL && d < 40000000LL) g_refresh_ns = (g_refresh_ns * 7 + d) / 8; } g_last_vsync_ns = now; - (void)frame_time_ns; - /* The app's surface may have been replaced or taken away since the last frame: apply that now - * (the app never waits for us), and redraw the scene onto a new one. */ + g_tick_vsync_ns = frame_time_ns; if (vkp_apply_window_request()) g_dirty = 1; - /* A screen-effect setting changed (JNI, any thread): redraw so it shows on a static scene too. */ if (vkp_effects_sync()) g_dirty = 1; + if (vkp_cardboard_pose_changed()) g_dirty = 1; if (g_dirty && !scene_waits_for_game(now)) render_scene(); } -/* ------------------------------------------------------------------ wl_seat */ static uint32_t now_ms(void) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); return (uint32_t)(ts.tv_sec * 1000 + ts.tv_nsec / 1000000); } -/* wl_pointer.set_cursor: the client tells us its pointer image, or asks for none. A NULL surface - * means "no cursor" and is authoritative. The surface itself is snapshotted on its next commit. */ static void pointer_set_cursor(struct wl_client *c, struct wl_resource *r, uint32_t serial, struct wl_resource *surface, int32_t hx, int32_t hy) { if (!surface) { @@ -2311,14 +2031,11 @@ static void pointer_set_cursor(struct wl_client *c, struct wl_resource *r, uint3 } struct surface *s = wl_resource_get_user_data(surface); if (!s) return; - if (s->role != ROLE_NONE && s->role != ROLE_CURSOR) return; /* already has another role */ + if (s->role != ROLE_NONE && s->role != ROLE_CURSOR) return; s->role = ROLE_CURSOR; g_cursor_surface = s; g_cursor_hx = hx; g_cursor_hy = hy; - /* Its content may already be committed: wlroots' Wayland backend attaches and commits the - * cursor surface first and sets it as the pointer after, and sets it again with nothing new - * committed each time the pointer re-enters. */ struct wl_resource *buffer = surface_take_idle(s); if (buffer) { cursor_publish_buffer(s, buffer); @@ -2362,8 +2079,6 @@ static void seat_get_keyboard(struct wl_client *c, struct wl_resource *r, uint32 if (!k) { wl_client_post_no_memory(c); return; } wl_resource_set_implementation(k, &keyboard_impl, NULL, keyboard_res_destroy); if (g_nkbs < MAX_PTRS) { g_kbs[g_nkbs].kb = k; g_kbs[g_nkbs].focus = NULL; g_nkbs++; } - /* Send the xkb keymap the app extracted to $XDG_RUNTIME_DIR/keymap.xkb. Without a keymap the - * client can't interpret our evdev key codes. */ const char *rt = getenv("XDG_RUNTIME_DIR"); char path[512]; snprintf(path, sizeof(path), "%s/keymap.xkb", rt ? rt : "."); @@ -2412,9 +2127,6 @@ static struct seat_keyboard *keyboard_for(struct wl_client *client) { return NULL; } -/* A client may hold more than one wl_pointer/wl_keyboard: gamescope creates a second pair and - * reads input on its own thread, so an event sent only to the first object is never seen. - * Every delivery below walks all of the client's objects. */ #define for_each_pointer_of(client, sp) \ for (int _i = 0; _i < g_nptrs; _i++) \ if (((sp) = &g_ptrs[_i]), wl_resource_get_client((sp)->ptr) == (client)) @@ -2425,7 +2137,6 @@ static struct seat_keyboard *keyboard_for(struct wl_client *client) { for (int _i = 0; _i < g_ntouches; _i++) \ if (((st) = &g_touches[_i]), wl_resource_get_client((st)->touch) == (client)) -/* Topmost window whose scene rectangle contains the point (no-desktop fallback). */ static struct surface *toplevel_at(double x, double y) { struct surface *s; wl_list_for_each_reverse(s, &g_toplevels, toplevel_link) { @@ -2477,59 +2188,39 @@ static void keyboard_focus(struct wl_resource *target) { g_mods_depressed, 0, g_mods_locked, 0); } wl_array_release(&keys); - droiddeck_clipboard_keyboard_focus(client); /* wl_data_device selection follows focus */ + droiddeck_clipboard_keyboard_focus(client); } -/* ------------------------------------------------------------------ pointer constraints - * zwp_pointer_constraints_v1 and zwp_relative_pointer_manager_v1: what winewayland uses for - * SetCursorPos, ClipCursor and hidden-cursor (mouse-look) games. - * - * A lock freezes the pointer where it is: no wl_pointer.motion is sent while it holds, and - * every input delta (a relative event from the app, or the difference between absolute - * positions) reaches the locking program as zwp_relative_pointer_v1.relative_motion. A confine - * clamps the pointer to the surface (and the program's region inside it). Relative motion is - * also sent while unlocked, to any program holding a relative pointer. - * - * Input normally goes to the desktop surface; while a constraint holds, pointer focus moves - * to the constrained surface, so the constraining program receives the events itself - * (winewayland only enables relative motion for a window its pointer has entered). One - * constraint holds at a time; a newer request ends the older one. A lock's cursor position - * hint is applied on the surface's commit and is where the pointer ends up when the lock - * ends (winewayland's SetCursorPos: lock, hint, commit, unlock). */ struct constraint { - struct wl_list link; /* g_constraints */ - struct wl_resource *resource; /* zwp_locked_pointer_v1 or zwp_confined_pointer_v1 */ - struct wl_resource *pointer; /* the program's wl_pointer; NULL once released */ - struct surface *surface; /* NULL once the surface is gone */ + struct wl_list link; + struct wl_resource *resource; + struct wl_resource *pointer; + struct surface *surface; int is_lock; uint32_t lifetime; int active; - int defunct; /* a oneshot that ended, or surface/pointer gone */ - struct region region, pending_region; /* confine area, surface-local; unset = whole surface */ + int defunct; + struct region region, pending_region; int pending_region_set; - int hint_set, pending_hint_set; /* lock: cursor position hint, surface-local */ + int hint_set, pending_hint_set; double hint_x, hint_y, pending_hint_x, pending_hint_y; + int gave_keys; }; static struct wl_list g_constraints; static struct constraint *g_active_constraint; struct relative_pointer { - struct wl_list link; /* g_relative_pointers */ + struct wl_list link; struct wl_resource *resource; - struct wl_resource *pointer; /* the program's wl_pointer; NULL once released */ + struct wl_resource *pointer; }; static struct wl_list g_relative_pointers; -/* Last pointer position in scene coordinates (buttons and scrolls from the app's X-server - * input path arrive without one). */ static double g_ptr_x, g_ptr_y; -/* Last absolute input position: absolute input becomes deltas while the pointer is locked. */ static double g_raw_x, g_raw_y; static int g_raw_valid; -/* JNI: the app switches its touch/mouse path to deltas while a lock holds and re-syncs its - * pointer to x,y when it ends. */ extern void droiddeck_on_pointer_lock(int locked, int x, int y); static void sync_lock_notify(void) { @@ -2545,13 +2236,11 @@ static void constraint_describe(const struct constraint *k, char *out, size_t si else snprintf(out, size, "a closed window"); } -/* Scene position of the constrained surface. */ static void constraint_origin(const struct constraint *k, int *x, int *y) { *x = *y = 0; if (k->surface && k->surface != g_desktop && k->surface->placed) { *x = k->surface->x; *y = k->surface->y; } } -/* Keep x,y (scene coordinates) inside the confine area. */ static void confine_clamp(const struct constraint *k, double *x, double *y) { int ox, oy, w, h, rx = 0, ry = 0, rw, rh; if (!k->surface) return; @@ -2582,7 +2271,6 @@ static void constraint_send_state(struct constraint *k, int on) { } } -/* A constraint stops holding. tell_client = 0 when its resource is being destroyed. */ static void constraint_end(struct constraint *k, int tell_client, const char *why) { char name[160]; if (!k->active) return; @@ -2596,6 +2284,14 @@ static void constraint_end(struct constraint *k, int tell_client, const char *wh g_ptr_y = oy + k->hint_y; } g_raw_valid = 0; + if (k->gave_keys) { + k->gave_keys = 0; + for (int i = 0; i < g_nkbs; i++) { + if (!k->surface || g_kbs[i].focus != k->surface->resource) continue; + wl_keyboard_send_leave(g_kbs[i].kb, wl_display_next_serial(g_display), g_kbs[i].focus); + g_kbs[i].focus = NULL; + } + } if (tell_client) constraint_send_state(k, 0); constraint_describe(k, name, sizeof(name)); droiddeck_log("pointer", "%s: %s (%s), pointer at %d,%d", k->is_lock ? "unlocked" : "unconfined", @@ -2612,9 +2308,14 @@ static void constraint_activate(struct constraint *k) { k->active = 1; g_active_constraint = k; if (!k->is_lock) confine_clamp(k, &g_ptr_x, &g_ptr_y); - /* Pointer focus follows the constraint: the program gets the events itself. */ constraint_origin(k, &ox, &oy); pointer_focus(k->surface->resource, wl_fixed_from_double(g_ptr_x - ox), wl_fixed_from_double(g_ptr_y - oy)); + int focused = 0; + for (int i = 0; i < g_nkbs; i++) if (g_kbs[i].focus) focused = 1; + if (k->is_lock && !focused && keyboard_for(wl_resource_get_client(k->surface->resource))) { + keyboard_focus(k->surface->resource); + k->gave_keys = 1; + } constraint_send_state(k, 1); constraint_describe(k, name, sizeof(name)); if (k->is_lock) @@ -2632,7 +2333,6 @@ static void constraint_activate(struct constraint *k) { wl_display_flush_clients(g_display); } -/* Pointer focus entered target: a persistent constraint waiting on it takes hold again. */ static void constraints_focus_entered(struct wl_resource *target, struct wl_client *client) { struct constraint *k; if (g_active_constraint) return; @@ -2664,7 +2364,6 @@ static void constraints_pointer_gone(struct wl_resource *pointer) { } } -/* Double-buffered state (position hint, confine region) applies on the surface's commit. */ static void constraints_surface_commit(struct surface *s) { struct constraint *k; wl_list_for_each(k, &g_constraints, link) { @@ -2709,7 +2408,6 @@ static void locked_pointer_set_cursor_position_hint(struct wl_client *c, struct k->pending_hint_y = wl_fixed_to_double(y); } static void locked_pointer_set_region(struct wl_client *c, struct wl_resource *r, struct wl_resource *region) { - /* A lock's region only says where it may take hold; a lock here takes hold anywhere. */ } static const struct zwp_locked_pointer_v1_interface locked_pointer_impl = { .destroy = constraint_destroy_req, @@ -2787,7 +2485,6 @@ static void bind_pointer_constraints(struct wl_client *c, void *data, uint32_t v wl_resource_set_implementation(r, &pointer_constraints_impl, NULL, NULL); } -/* --- relative pointers --- */ static void relative_pointer_resource_destroy(struct wl_resource *r) { struct relative_pointer *rp = wl_resource_get_user_data(r); @@ -2829,8 +2526,6 @@ static void relative_pointers_pointer_gone(struct wl_resource *pointer) { if (rp->pointer == pointer) rp->pointer = NULL; } -/* relative_motion to every relative pointer of the program owning the focus (winewayland wants - * it whenever it holds one, locked or not). Returns whether any was sent. */ static int send_relative_motion(struct wl_client *client, double dx, double dy) { struct relative_pointer *rp; struct timespec ts; @@ -2849,12 +2544,7 @@ static int send_relative_motion(struct wl_client *client, double dx, double dy) return sent; } -/* ------------------------------------------------------------------ pointer events */ -/* One pointer event: a motion, then an optional button change (button 0 = none). Absolute - * x,y are scene coordinates; with `relative` they are a delta. While a lock holds the pointer - * stays put and the delta (or the change between absolute positions) becomes relative motion - * for the locking program; a confine keeps the pointer inside its area. */ static void pointer_input(double x, double y, int relative, uint32_t button, int pressed) { struct surface *target; struct constraint *k = g_active_constraint; @@ -2913,8 +2603,6 @@ static void pointer_input(double x, double y, int relative, uint32_t button, int if (wl_resource_get_version(sp->ptr) >= WL_POINTER_FRAME_SINCE_VERSION) wl_pointer_send_frame(sp->ptr); } - /* A click lands text input (the soft keyboard's IME text) on the window under the pointer: - * that's where Wine's focus goes, and winewayland routes IME updates per process. */ if (button && pressed && !(k && k->is_lock)) { struct surface *clicked = toplevel_at(g_ptr_x, g_ptr_y); if (clicked) g_ime_click = clicked; @@ -2923,24 +2611,35 @@ static void pointer_input(double x, double y, int relative, uint32_t button, int wl_display_flush_clients(g_display); } -/* Absolute motion to scene x,y, then an optional button change. */ static void pointer_event(double x, double y, uint32_t button, int pressed) { pointer_input(x, y, 0, button, pressed); } -/* A delta from the app's relative input path (Relative Mouse, captured mouse, stick-as-mouse). */ static void pointer_delta(double dx, double dy) { pointer_input(dx, dy, 1, 0, 0); } -/* A button change at the current pointer position. */ static void pointer_button(uint32_t button, int pressed) { - pointer_input(0, 0, 1, button, pressed); + if (pressed) { + pointer_input(0, 0, 1, button, pressed); + return; + } + // Releases also clean up interrupted gestures. Deliver them to the existing + // pointer focus without motion or hit-testing: native touch has independent + // coordinates, so replaying g_ptr_x/y here can warp the game cursor. + uint32_t t = now_ms(); + for (int i = 0; i < g_nptrs; i++) { + struct seat_pointer *sp = &g_ptrs[i]; + if (!sp->focus) continue; + wl_pointer_send_button(sp->ptr, wl_display_next_serial(g_display), t, button, + WL_POINTER_BUTTON_STATE_RELEASED); + if (wl_resource_get_version(sp->ptr) >= WL_POINTER_FRAME_SINCE_VERSION) + wl_pointer_send_frame(sp->ptr); + } + g_grab = NULL; + wl_display_flush_clients(g_display); } -/* Java touch events arrive in INPUT_SPACE over the whole output: action 0=press, 1=move, 2=release. - * Output pixels go through the inverse of the scale mode's mapping (letterbox bars, FILL crop, a - * TOP/BOTTOM half), so the touch lands on the scene pixel that is drawn under the finger. */ static void deliver_pointer(const struct input_msg *m) { int w, h, ow, oh; double x, y; @@ -2948,7 +2647,7 @@ static void deliver_pointer(const struct input_msg *m) { vkp_output_size(&ow, &oh); if (ow <= 0 || oh <= 0 || !vkp_output_to_scene((double)m->p2 * ow / INPUT_SPACE_W, (double)m->p3 * oh / INPUT_SPACE_H, &x, &y)) { - x = (double)m->p2 * w / INPUT_SPACE_W; /* nothing drawn yet: plain stretch */ + x = (double)m->p2 * w / INPUT_SPACE_W; y = (double)m->p3 * h / INPUT_SPACE_H; } if (x < 0) x = 0; @@ -3040,9 +2739,6 @@ static void touch_down(int id, double x, double y) { struct surface *target = touch_target_at(x, y); if (!target) return; struct wl_client *client = wl_resource_get_client(target->resource); - /* A down on an id that is still held means that sequence's up was lost: end it first. The - * fingers still down are counted only after that - counted before, a lost up left any_active - * set, and on the pointer path every later touch was dropped (a tap or swipe did nothing). */ if (g_touch_points[id].surface) touch_cancel_client(client); int any_active = 0; for (int i = 0; i < MAX_TOUCH_POINTS; i++) { @@ -3058,14 +2754,13 @@ static void touch_down(int id, double x, double y) { struct seat_touch *st; int has_touch = 0; for_each_touch_of(client, st) has_touch = 1; - /* One line per gesture (first finger), so a test can see where a touch went. */ if (!any_active) { char name[160]; describe(target, name, sizeof(name)); droiddeck_log("touch", "%s gets %s", name, has_touch ? "touch" : "the pointer (it takes no touch)"); } if (!has_touch) { - if (any_active) return; /* one finger drives the pointer; a second one is ignored */ + if (any_active) return; g_touch_points[id].surface = target; g_touch_points[id].pointer_fallback = 1; pointer_event(x, y, BTN_LEFT, 1); @@ -3146,11 +2841,19 @@ static void deliver_key(const struct input_msg *m) { key_event((uint32_t)m->p1, m->p2); } -/* Vertical wheel steps (negative = up) at the current pointer position. */ -static void scroll_event(int steps) { +static void send_axis(struct seat_pointer *sp, uint32_t t, uint32_t axis, int value120) { + if (!value120) return; + if (wl_resource_get_version(sp->ptr) >= WL_POINTER_AXIS_VALUE120_SINCE_VERSION) + wl_pointer_send_axis_value120(sp->ptr, axis, value120); + else if (wl_resource_get_version(sp->ptr) >= WL_POINTER_AXIS_DISCRETE_SINCE_VERSION && value120 % 120 == 0) + wl_pointer_send_axis_discrete(sp->ptr, axis, value120 / 120); + wl_pointer_send_axis(sp->ptr, t, axis, wl_fixed_from_double(value120 / 12.0)); +} + +static void axis_event(int vertical120, int horizontal120) { struct surface *target = g_active_constraint ? g_active_constraint->surface : g_desktop ? g_desktop : (g_grab ? g_grab : toplevel_at(g_ptr_x, g_ptr_y)); - if (!target || !steps) return; + if (!target || (!vertical120 && !horizontal120)) return; struct wl_client *client = wl_resource_get_client(target->resource); struct seat_pointer *sp; if (!pointer_for(client)) return; @@ -3159,28 +2862,27 @@ static void scroll_event(int steps) { uint32_t t = now_ms(); pointer_focus(target->resource, wl_fixed_from_double(g_ptr_x - tx), wl_fixed_from_double(g_ptr_y - ty)); for_each_pointer_of(client, sp) { - /* From version 8 the discrete event is replaced by value120 and must not be sent. */ - if (wl_resource_get_version(sp->ptr) >= WL_POINTER_AXIS_VALUE120_SINCE_VERSION) - wl_pointer_send_axis_value120(sp->ptr, WL_POINTER_AXIS_VERTICAL_SCROLL, steps * 120); - else if (wl_resource_get_version(sp->ptr) >= WL_POINTER_AXIS_DISCRETE_SINCE_VERSION) - wl_pointer_send_axis_discrete(sp->ptr, WL_POINTER_AXIS_VERTICAL_SCROLL, steps); - wl_pointer_send_axis(sp->ptr, t, WL_POINTER_AXIS_VERTICAL_SCROLL, wl_fixed_from_int(steps * 10)); + send_axis(sp, t, WL_POINTER_AXIS_VERTICAL_SCROLL, vertical120); + send_axis(sp, t, WL_POINTER_AXIS_HORIZONTAL_SCROLL, horizontal120); if (wl_resource_get_version(sp->ptr) >= WL_POINTER_FRAME_SINCE_VERSION) wl_pointer_send_frame(sp->ptr); } wl_display_flush_clients(g_display); } -/* Folds a key into the modifier state; returns whether the state changed. */ +static void scroll_event(int steps) { + axis_event(steps * 120, 0); +} + static int update_modifiers(uint32_t evdev, int pressed) { static const struct { uint32_t evdev, mask; } mod_keys[] = { - { 42, 0x1 }, { 54, 0x1 }, /* Shift L/R */ - { 29, 0x4 }, { 97, 0x4 }, /* Control L/R */ - { 56, 0x8 }, { 100, 0x8 }, /* Alt L/R, both Mod1 in this keymap */ - { 125, 0x40 }, { 126, 0x40 }, /* Super L/R */ + { 42, 0x1 }, { 54, 0x1 }, + { 29, 0x4 }, { 97, 0x4 }, + { 56, 0x8 }, { 100, 0x8 }, + { 125, 0x40 }, { 126, 0x40 }, }; uint32_t depressed = g_mods_depressed, locked = g_mods_locked; - if (evdev == 58) { /* Caps Lock toggles on press */ + if (evdev == 58) { if (pressed) locked ^= 0x2; } else { int i, n = (int)(sizeof(mod_keys) / sizeof(mod_keys[0])); @@ -3197,13 +2899,12 @@ static int update_modifiers(uint32_t evdev, int pressed) { } static void key_event(uint32_t evdev, int pressed) { - /* Tracked even with nothing to deliver to, so a Shift released unseen is not left held. */ + if (evdev < 0x300) { + uint8_t bit = (uint8_t)(1u << (evdev & 7)); + if (pressed && (g_keys_down[evdev >> 3] & bit)) return; + if (pressed) g_keys_down[evdev >> 3] |= bit; else g_keys_down[evdev >> 3] &= (uint8_t)~bit; + } int mods_changed = update_modifiers(evdev, pressed); - /* Keys go to the program window the user last clicked (else the topmost non-shell window), - * never to Wine's desktop surface: winewayland hands each key to the hwnd of the surface that - * holds keyboard focus, and a key handed to explorer's desktop hwnd is queued to explorer's - * thread, not to the foreground program (X11 delivers keys to the focused app window, so - * this mirrors it). The desktop itself is the last resort. */ struct surface *target = NULL; struct wl_resource *ime = droiddeck_ime_target(); if (ime) target = wl_resource_get_user_data(ime); @@ -3228,44 +2929,67 @@ static void key_event(uint32_t evdev, int pressed) { wl_display_flush_clients(g_display); } -/* The output changed size under a running session (a foldable opened or closed, with the - * session following the screen). Every client that has had its first configure is told the new - * size: gamescope's Wayland backend and the desktop's KWin both resize their output to it, and - * the next buffers they commit fill the new panel instead of being letterboxed onto it. */ -static void output_resized(void) { - struct surface *s; +static void output_notify_mode(void) { + int mhz = atomic_load(&g_output_refresh_mhz); struct wl_resource *r; wl_resource_for_each(r, &g_outputs) { - output_send_mode(r); + output_send_mode(r, mhz); if (wl_resource_get_version(r) >= 2) wl_output_send_done(r); } + g_output_announced_refresh_mhz = mhz; +} + +static void output_resized(void) { + struct surface *s; + output_notify_mode(); wl_list_for_each(s, &g_surfaces, link) if (s->xdg_toplevel && s->toplevel_committed) send_toplevel_configure(s); droiddeck_log("display", "output resized to %dx%d", g_output_w, g_output_h); wl_display_flush_clients(g_display); } -/* wl event-loop callback: drain queued input events written by the Android UI thread. */ static int on_input_readable(int fd, uint32_t mask, void *data) { struct input_msg m; + int vsync = 0; + int64_t vsync_ns = 0; while (read(fd, &m, sizeof(m)) == (ssize_t)sizeof(m)) { switch (m.type) { case 1: deliver_key(&m); break; - case 2: pointer_event(m.p1, m.p2, 0, 0); break; /* scene motion */ - case 3: pointer_button(m.p1, m.p2); break; /* button at pointer */ + case 2: pointer_event(m.p1, m.p2, 0, 0); break; + case 3: pointer_button(m.p1, m.p2); break; case 4: scroll_event(m.p1); break; - case 5: on_vsync(((int64_t)m.p1 << 32) | (uint32_t)m.p2); break; - case 6: pointer_delta(m.p1 / 256.0, m.p2 / 256.0); break; /* relative motion, 1/256 px */ + case 5: vsync = 1; vsync_ns = ((int64_t)m.p1 << 32) | (uint32_t)m.p2; break; + case 6: pointer_delta(m.p1 / 256.0, m.p2 / 256.0); break; case 7: deliver_touch(&m); break; case 8: output_resized(); break; + case 9: + vk_present_set_scale_mode(m.p1, m.p2); + schedule_render(); + break; + case 10: break; + case 11: axis_event(m.p1, m.p2); break; default: deliver_pointer(&m); break; } } + if (atomic_exchange(&g_output_refresh_pending, 0) && + atomic_load(&g_output_refresh_mhz) != g_output_announced_refresh_mhz) { + output_notify_mode(); + wl_display_flush_clients(g_display); + } + if (vsync) on_vsync(vsync_ns); return 0; } -/* Called from JNI (Android UI thread). Queues a pointer event; the compositor thread - * dispatches it. x/y are in INPUT_SPACE (0..1919, 0..1079) over the whole output. */ +void droiddeck_wayland_set_scale_mode(int mode, int alignment) { + if (g_input_pipe[1] < 0) { + vk_present_set_scale_mode(mode, alignment); + return; + } + struct input_msg m = { 9, mode, alignment, 0, 0 }; + ssize_t n = write(g_input_pipe[1], &m, sizeof(m)); + (void)n; +} + void droiddeck_wayland_send_pointer(int action, int x, int y) { if (g_input_pipe[1] < 0) return; struct input_msg m = { 0, action, x, y, 0 }; @@ -3280,7 +3004,6 @@ void droiddeck_wayland_send_touch(int action, int pointer_id, int x, int y) { (void)n; } -/* Called from JNI. Queues a key event. evdev = Linux input keycode (e.g. KEY_A=30); state 1=down 0=up. */ void droiddeck_wayland_send_key(int evdev, int state) { if (g_input_pipe[1] < 0) return; struct input_msg m = { 1, evdev, state, 0, 0 }; @@ -3288,7 +3011,6 @@ void droiddeck_wayland_send_key(int evdev, int state) { (void)n; } -/* Called from JNI after g_output_w/h changed: the compositor thread re-sends the size. */ void droiddeck_wayland_output_resized(void) { if (g_input_pipe[1] < 0) return; struct input_msg m = { 8, 0, 0, 0, 0 }; @@ -3296,7 +3018,16 @@ void droiddeck_wayland_output_resized(void) { (void)n; } -/* Called from JNI on every screen refresh (Choreographer). */ +void droiddeck_wayland_set_output_refresh_rate(int mhz) { + if (mhz <= 0) mhz = 60000; + if (atomic_exchange(&g_output_refresh_mhz, mhz) == mhz || g_input_pipe[1] < 0) return; + atomic_store(&g_output_refresh_pending, 1); + struct input_msg m = { 10, 0, 0, 0, 0 }; + ssize_t n; + do { n = write(g_input_pipe[1], &m, sizeof(m)); } while (n < 0 && errno == EINTR); + (void)n; +} + void droiddeck_wayland_vsync(int64_t frame_time_ns) { if (g_input_pipe[1] < 0) return; struct input_msg m = { 5, (int)(frame_time_ns >> 32), (int)(uint32_t)frame_time_ns, 0, 0 }; @@ -3304,9 +3035,6 @@ void droiddeck_wayland_vsync(int64_t frame_time_ns) { (void)n; } -/* Called from JNI with the app's X-server input (on-screen controls, mouse): type 2 = motion - * to scene x,y; 3 = evdev button a pressed/released (b); 4 = a wheel steps (negative = up); - * 6 = relative motion by a,b in 1/256 pixel (the app's Relative Mouse / captured-mouse path). */ void droiddeck_wayland_send_scene_input(int type, int a, int b) { if (g_input_pipe[1] < 0) return; struct input_msg m = { type, a, b, 0, 0 }; @@ -3314,15 +3042,11 @@ void droiddeck_wayland_send_scene_input(int type, int a, int b) { (void)n; } -/* ------------------------------------------------------------------ extension module hooks - * What wl_clipboard.c / wl_text_input.c need from the scene (see droiddeck_ext.h). */ const char *droiddeck_client_name(struct wl_client *client) { return client_name(client); } struct wl_display *droiddeck_get_display(void) { return g_display; } void droiddeck_request_redraw(void) { schedule_render(); } -/* The surface text input follows: the last clicked mapped program window, else the topmost - * mapped window not owned by the desktop's process (explorer). NULL when there is none. */ struct wl_resource *droiddeck_ime_target(void) { struct surface *s; if (g_ime_click && g_ime_click->mapped) return g_ime_click->resource; @@ -3340,10 +3064,8 @@ void droiddeck_surface_scene_origin(struct wl_resource *surface, int *x, int *y) void droiddeck_inject_key(uint32_t evdev, int pressed) { key_event(evdev, pressed); } -/* ------------------------------------------------------------------ 10 s summary */ static struct wl_event_source *g_stats_timer; -/* The last window's zero-copy count, kept for the app (WaylandCompositor.nativeZeroCopyFrames). */ volatile unsigned g_zero_copy_last; static int on_stats_timer(void *data) { @@ -3353,24 +3075,16 @@ static int on_stats_timer(void *data) { unsigned zero_copy = ahb_swapchain_stats_take(); unsigned layer_frames = sc_layer_frames_take(); g_zero_copy_last = zero_copy; - /* Interpolated frames the compositor added (framegen_bridge.c). They are on screen, so they - * count there; they are NOT GPU frames from games and never inflate that number. */ unsigned generated = vkp_framegen_stats_take(); if (g_stat_frames || g_stat_dmabuf || g_stat_shm || generated) { char extra[160] = ""; int off = 0; if (g_zero_copy || zero_copy) off += snprintf(extra + off, sizeof(extra) - (size_t)off, " | %u zero-copy frames", zero_copy); - /* Frames the compositor put on a display layer through one of its OWN gralloc buffers (the - * plain layer blit, or the effects chain's result): still hardware-composed, but not - * zero-copy, so they are counted apart from the line above. */ if (layer_frames) off += snprintf(extra + off, sizeof(extra) - (size_t)off, " | %u layer frames", layer_frames); if (generated) snprintf(extra + off, sizeof(extra) - (size_t)off, " | %u generated frames", generated); droiddeck_log("stats", "last 10 s: %u frames on screen (%.1f fps) | %u GPU frames from games | %u window redraws | %d windows open%s", g_stat_frames + generated, (g_stat_frames + generated) / 10.0, g_stat_dmabuf, g_stat_shm, windows, extra); } - /* The perf line, next to the stats line and only when something happened: the compositor thread's - * time per scene and inside the driver (avg/max), what the base surface did, and how long games - * waited for their buffers back. See the audit memory for how to read it. */ { struct vkp_perf vp; vkp_perf_take(&vp); @@ -3393,10 +3107,10 @@ static int on_stats_timer(void *data) { memset(&g_perf, 0, sizeof(g_perf)); } g_stat_frames = g_stat_dmabuf = g_stat_shm = 0; - droiddeck_color_stats_tick(); /* HDR evidence for the same window (nothing when the HDR gate is closed) */ - /* A program that asked for dma-buf feedback (EGL's GPU path does, first thing) but has drawn - * only wl_shm frames since is an OpenGL program whose EGL gave up on the GPU. The software - * path it fell to has no rasteriser in the Wayland layers, so what it commits is black. */ + droiddeck_color_stats_tick(); + + + for (struct client_info *ci = g_clients; ci; ci = ci->next) { if (!ci->asked_feedback || ci->dmabuf_buffers || ci->shm_gl_said || ci->shm_frames < 150) continue; @@ -3410,12 +3124,6 @@ static int on_stats_timer(void *data) { return 0; } -/* ------------------------------------------------------------------ test input - * $XDG_RUNTIME_DIR/test-input is a FIFO for scripted testing from a root shell, in scene - * (desktop) coordinates: "move X Y", "click X Y", "rclick X Y", "dclick X Y", "down X Y", - * "up X Y", "rdown X Y", "rup X Y", "rel DX DY" (relative motion, like the app's Relative - * Mouse path), "key CODE" (evdev), "keydown CODE", "keyup CODE". - * It lives in the app's private directory, so only the app and root can reach it. */ static char g_test_buf[512]; static size_t g_test_len; @@ -3465,7 +3173,7 @@ static int on_test_input(int fd, uint32_t mask, void *data) { } g_test_len = strlen(start); memmove(g_test_buf, start, g_test_len); - if (g_test_len >= sizeof(g_test_buf) - 1) g_test_len = 0; /* overlong line: drop */ + if (g_test_len >= sizeof(g_test_buf) - 1) g_test_len = 0; } return 0; } @@ -3479,14 +3187,10 @@ static void start_test_input(struct wl_event_loop *loop) { snprintf(path, sizeof(path), "%s/test-input", rt); unlink(path); if (mkfifo(path, 0600) != 0) return; - /* O_RDWR keeps a writer open ourselves, so a closing test shell never leaves us at EOF. */ if ((fd = open(path, O_RDWR | O_NONBLOCK | O_CLOEXEC)) < 0) return; wl_event_loop_add_fd(loop, fd, WL_EVENT_READABLE, on_test_input, NULL); } -/* ------------------------------------------------------------------ entry - * Blocks in the wl event loop, so the JNI wrapper runs it on a dedicated thread. - * XDG_RUNTIME_DIR must be set by the caller before this runs. */ static struct wl_listener g_client_created = { .notify = on_client_created }; @@ -3498,9 +3202,10 @@ int droiddeck_wayland_run(void) { wl_list_init(&g_relative_pointers); open_session_log(); - /* Bring the GPU up before any client can connect: loading Turnip the first time - * can take many seconds, and it must not stall a client mid-handshake. */ if (vkp_ready() != 0) WLOGE("renderer unavailable; clients will connect but nothing is drawn"); + /* Presentation compatibility is not HDR capability. Set the initial layer mode before + * clients bind, including when Desktop is the first session in this app process. */ + if (vkp_quest_layer_presentation() && sc_layer_available()) g_zero_copy = 1; struct wl_display *display = wl_display_create(); if (!display) { @@ -3508,10 +3213,6 @@ int droiddeck_wayland_run(void) { return 1; } - /* Use a FIXED socket name so it always matches the guest's WAYLAND_DISPLAY=wayland-0 - * (wl_display_add_socket_auto would drift to wayland-1/2/… if a stale socket exists, - * and the guest only ever looks for wayland-0). Unlink any stale socket+lock first so - * a previous run that didn't clean up can't block the bind. */ const char *rt = getenv("XDG_RUNTIME_DIR"); if (rt && *rt) { char p[512]; @@ -3529,33 +3230,30 @@ int droiddeck_wayland_run(void) { wl_global_create(display, &wl_compositor_interface, 6, NULL, bind_compositor); wl_global_create(display, &wl_subcompositor_interface, 1, NULL, bind_subcompositor); wl_global_create(display, &wp_viewporter_interface, 1, NULL, bind_viewporter); - wl_display_init_shm(display); /* wl_shm global + pool/buffer handling */ - /* libdecor binds wl_output at 4; a lower version is a protocol error for the client. */ + wl_display_init_shm(display); + wl_global_create(display, &wl_output_interface, 4, NULL, bind_output); wl_global_create(display, &xdg_wm_base_interface, 1, NULL, bind_xdg_wm_base); wl_global_create(display, &zwp_linux_dmabuf_v1_interface, 4, NULL, bind_dmabuf); - /* gamescope's Wayland backend refuses a seat older than 8. */ wl_global_create(display, &wl_seat_interface, 9, NULL, bind_seat); wl_global_create(display, &banner_desktop_v1_interface, 1, NULL, bind_desktop); wl_global_create(display, &wp_presentation_interface, 2, NULL, bind_presentation); wl_global_create(display, &zwp_pointer_constraints_v1_interface, 1, NULL, bind_pointer_constraints); wl_global_create(display, &zwp_relative_pointer_manager_v1_interface, 1, NULL, bind_relative_pointer_manager); - droiddeck_ext_init(display); /* clipboard, text input, toplevel icons (own files, see droiddeck_ext.h) */ - ahb_swapchain_init(display); /* zero-copy layers: banner_ahb_v1, advertised whenever a display - * layer is possible; the mode event carries the live switch - * (ahb_swapchain.h) */ - droiddeck_color_init(display); /* HDR10 (opt-in): decides the gate from the app's request + the - * display + the layer path above; creates wp_color_manager_v1 - * only when it is open (droiddeck_color.h). Before any client can - * bind zwp_linux_dmabuf_v1, whose table it widens. */ + droiddeck_ext_init(display); + ahb_swapchain_init(display); + + + droiddeck_color_init(display); + + + wl_list_init(&g_pending_releases); g_release_timer_fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK | TFD_CLOEXEC); if (g_release_timer_fd >= 0) g_release_source = wl_event_loop_add_fd(wl_display_get_event_loop(display), g_release_timer_fd, WL_EVENT_READABLE, on_release_timer, NULL); - /* Input injection: the Android UI thread writes events to g_input_pipe[1]; - * the wl event loop drains them on this thread. */ g_display = display; if (pipe2(g_input_pipe, O_CLOEXEC | O_NONBLOCK) == 0) { wl_event_loop_add_fd(wl_display_get_event_loop(display), g_input_pipe[0], @@ -3567,7 +3265,8 @@ int droiddeck_wayland_run(void) { if ((g_stats_timer = wl_event_loop_add_timer(wl_display_get_event_loop(display), on_stats_timer, NULL))) wl_event_source_timer_update(g_stats_timer, 10000); - wl_display_run(display); /* blocks, dispatches the event loop */ + g_output_announced_refresh_mhz = atomic_load(&g_output_refresh_mhz); + wl_display_run(display); wl_display_destroy(display); return 0; diff --git a/app/src/main/cpp/waylandcomp/src/compositor_internal.h b/app/src/main/cpp/waylandcomp/src/compositor_internal.h index 0468f007f3..0e4229d0a4 100644 --- a/app/src/main/cpp/waylandcomp/src/compositor_internal.h +++ b/app/src/main/cpp/waylandcomp/src/compositor_internal.h @@ -1,8 +1,3 @@ -/* - * What compositor.c shares with the protocol modules split out of it (wl_dmabuf.c): the dma-buf - * buffer records, the per-client bookkeeping and the few functions and globals both sides use. - * Everything declared here is hidden: it is internal to libdroiddeckwayland, not part of its ABI. - */ #pragma once #include <stdint.h> #include <sys/types.h> @@ -16,7 +11,6 @@ #define WLOGE(...) __android_log_print(ANDROID_LOG_ERROR, "DroidDeckWayland", __VA_ARGS__) #endif -/* ------------------------------------------------------------------ dmabuf buffers */ #define FOURCC(a, b, c, d) \ ((uint32_t)(a) | ((uint32_t)(b) << 8) | ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24)) @@ -41,39 +35,29 @@ struct dmabuf_buffer { int32_t width, height; uint32_t format; uint64_t modifier; - struct vkp_image *img; /* imported once, reused for every frame */ + struct vkp_image *img; int import_failed; - /* One reference for the wl_buffer resource, one per surface showing the buffer. Mesa destroys - * a swapchain's wl_buffers the moment the game rebuilds its swapchain, i.e. while the last - * committed one is still what is on screen: the import (and the dma-buf memory it pins) stays - * until the surface commits something newer, so the picture never blinks to black. */ int refs; - void *ahb_state; /* zero-copy: ahb_swapchain.c's record (the game's AHardwareBuffer) */ + void *ahb_state; }; -/* Which program each Wayland client is (from /proc/<pid>/cmdline), for the session log. */ struct client_info { struct wl_client *client; struct wl_listener destroy; pid_t pid; char name[64]; - /* An OpenGL program whose EGL gave up on the GPU: it asked for dma-buf feedback (EGL's - * Wayland GPU path always does), never made a dma-buf buffer, and draws wl_shm frames. */ unsigned asked_feedback : 1, shm_gl_said : 1; - /* Clients that describe opaque regions can use alpha outside those regions. Wine windows - * never describe them, and their unused alpha channel must not make them translucent. */ unsigned declares_opaque : 1; unsigned dmabuf_buffers, shm_frames; struct client_info *next; }; -/* ---- compositor.c */ COMPOSITOR_INTERNAL struct client_info *client_info_of(struct wl_client *client); COMPOSITOR_INTERNAL void dmabuf_buffer_unref(struct dmabuf_buffer *b); COMPOSITOR_INTERNAL extern const struct wl_buffer_interface dbuf_buffer_impl; -extern volatile int g_ubwc; /* DROIDDECK_WAYLAND_UBWC (waylandcomp_jni.c sets it) */ -extern volatile int g_no_render_node; /* DROIDDECK_WAYLAND_NO_RENDER_NODE */ +extern volatile int g_ubwc; +extern volatile int g_no_render_node; -/* ---- wl_dmabuf.c */ -COMPOSITOR_INTERNAL extern dev_t g_main_device; /* the render node clients are told to allocate on */ + +COMPOSITOR_INTERNAL extern dev_t g_main_device; COMPOSITOR_INTERNAL void bind_dmabuf(struct wl_client *c, void *data, uint32_t ver, uint32_t id); diff --git a/app/src/main/cpp/waylandcomp/src/droiddeck_color.h b/app/src/main/cpp/waylandcomp/src/droiddeck_color.h index 9591870a1f..a578301ae5 100644 --- a/app/src/main/cpp/waylandcomp/src/droiddeck_color.h +++ b/app/src/main/cpp/waylandcomp/src/droiddeck_color.h @@ -1,150 +1,63 @@ #ifndef DROIDDECK_COLOR_H #define DROIDDECK_COLOR_H -/* - * HDR10 output on the Wayland backend (opt-in) - the compositor half of HDR_RECON.md Phase A (round 1) - * plus HDR-aware composition (round 2, hdr_compose.h), implemented in wl_color_mgmt.c. The game half - * already ships: Mesa's Wayland WSI in our Turnip is a wp_color_manager_v1 client and exposes - * VK_COLOR_SPACE_HDR10_ST2084_EXT as soon as a compositor advertises BT.2020 + ST 2084; DXVK takes it - * with DXVK_HDR=1 (the app exports it when the setting is on). - * - * THE GATE. Nothing here exists for a session unless all of these hold when the compositor starts: - * - the container's / game's "HDR output" setting is on, or DROIDDECK_WAYLAND_HDR=1 in their - * environment (which overrides the setting either way); - * - the display the game is on lists HDR10 among its supported HDR types (read by the app from - * android.view.Display - a property of the connector, not of the device); - * - display layers with dataspace control (ASurfaceTransaction_setBufferDataSpace, Android 10+) - * and the zero-copy global (banner_ahb_v1): the HDR frame (or the composed HDR picture) is shown - * on the game's own display layer, tagged BT2020_PQ. - * In game, the drawer's HDR output switch (droiddeck_color_set_output) flips between that and the same - * frames tone-mapped to SDR, live; the gate itself never changes during a session. - * A closed gate advertises nothing - no colour-management global, no 10-bit dma-buf formats - so the - * session is byte-for-byte what it was before this file existed, and the session log says why. - * DROIDDECK_WAYLAND_HDR=force skips the display check only (testing the negotiation on an SDR panel; - * SurfaceFlinger then tone-maps the layer, and says so in its composition type). - * - * WHAT AN OPEN GATE OFFERS (exactly the subset Mesa binds, HDR_RECON.md §2.2): wp_color_manager_v1 - * version 1 with the perceptual intent, the parametric creator + mastering-display metadata, - * BT.2020 primaries and the ST 2084 (PQ) transfer function; zwp_linux_dmabuf_v1 adds AB30/XB30 - * (A2B10G10R10, the only 10-bit layout our zero-copy WSI can put in a gralloc buffer). A surface's - * image description is double-buffered on wl_surface.commit; its frames go onto the game's display - * layer tagged BT2020_PQ with the game's SMPTE 2086 / CTA-861.3 metadata (sc_layer.c). - * - * Compositor thread unless noted. - */ #include <stdint.h> #include <wayland-server.h> -/* ADataSpace values (NDK <android/data_space.h>) the layer path emits. */ #define DROIDDECK_ADATASPACE_UNKNOWN 0 -#define DROIDDECK_ADATASPACE_BT2020_PQ 163971072 /* STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_FULL = 0x09c60000 */ -#define DROIDDECK_ADATASPACE_BT2020_HLG 168165376 /* STANDARD_BT2020 | TRANSFER_HLG | RANGE_FULL */ +#define DROIDDECK_ADATASPACE_BT2020_PQ 163971072 +#define DROIDDECK_ADATASPACE_BT2020_HLG 168165376 -/* One image description as the program made it, and what it becomes on a display layer. Immutable: - * a changed description is a new record with a new identity. */ struct droiddeck_color { - uint32_t identity; /* the id the `ready` event carried (never 0) */ - uint32_t primaries, tf; /* wp_color_manager_v1 named values */ - int32_t dataspace; /* ADataSpace on a display layer; 0 = none (treated as sRGB) */ - int has_st2086; /* SMPTE ST 2086: mastering display primaries + luminance */ - float red[2], green[2], blue[2], white[2]; /* CIE 1931 xy */ - float max_lum, min_lum; /* nits */ - int has_cta861; /* CTA-861.3 */ - float max_cll, max_fall; /* nits; 0 = not given */ - char text[256]; /* the session log's one-line summary of it */ + uint32_t identity; + uint32_t primaries, tf; + int32_t dataspace; + int has_st2086; + float red[2], green[2], blue[2], white[2]; + float max_lum, min_lum; + int has_cta861; + float max_cll, max_fall; + char text[256]; }; -/* ---- app -> compositor (JNI, any thread) */ -/* mode 0 = off, 1 = DROIDDECK_WAYLAND_HDR=1, 2 = DROIDDECK_WAYLAND_HDR=force (testing). source names where - * the switch came from; dxvk_hdr = DXVK_HDR=1 is in the game's environment; zero_copy_forced = the - * app turned zero-copy presentation on for this session because HDR needs it. Before the start. */ void droiddeck_color_set_request(int mode, const char *source, int dxvk_hdr, int zero_copy_forced); -/* The display the game is on, as android.view.Display reports it. Before the start (it feeds the - * gate) and again whenever it changes (logged; the gate is decided once per session). */ void droiddeck_color_set_display(int id, const char *name, const char *formats, int hdr10, float max_lum, float max_avg, float min_lum, int ratio_available, float ratio, int api); -/* One reading of Display.getHdrSdrRatio() (API 34+; < 0 = not available). listener = it came from - * the display's ratio listener rather than the app's periodic sampler. */ void droiddeck_color_ratio_sample(float ratio, int listener); -/* Milliseconds since an HDR frame last went onto a display layer; -1 = none this session. */ int droiddeck_color_last_frame_age_ms(void); -/* -1 = the compositor has not decided yet, 0 = closed, 1 = open. */ int droiddeck_color_gate_state(void); -/* The session is ending: write the summary line ("HDR on screen: …"). */ void droiddeck_color_session_end(void); -/* 1 while HDR frames are really on screen: a frame tagged BT2020_PQ reached a display layer or the HDR - * swapchain in the last 1.5 s AND, where the display reports an HDR/SDR ratio, its last reading is - * above 1.01 (the HUD badge). */ int droiddeck_color_hdr_on_screen(void); -/* The HUD / drawer state: 0 = no HDR frames on screen (or not confirmed yet), 1 = HDR frames on screen - * with headroom (as droiddeck_color_hdr_on_screen), 2 = HDR frames on screen but the display has given - * them NO headroom (ratio <= 1.01) for 5 s or more - the brightness slider at maximum, or a screen - * recording (Android turns HDR headroom off while the screen is recorded). */ int droiddeck_color_hdr_state(void); -/* Nits SDR content is placed at inside an HDR picture (default 203, BT.2408); any thread. */ void droiddeck_color_set_sdr_white(float nits); float droiddeck_color_sdr_white(void); -/* The HDR session was asked for (DROIDDECK_WAYLAND_HDR / the setting resolved on or force) - known before - * the compositor starts, so the Vulkan instance can enable VK_EXT_swapchain_colorspace for it. */ int droiddeck_color_requested(void); -/* The drawer's live "HDR output" switch, per session, starting ON. On = HDR frames go to the display as - * HDR; off = the SAME frames are composed tone-mapped to SDR (hdr_compose.h) - the game is told nothing - * and keeps rendering HDR (DXVK_HDR and the colour-manager offer were decided at launch). Compositor - * thread (the app posts it through droiddeck_host_hdr_output); logs the flip and redraws. */ void droiddeck_color_set_output(int on); -/* 1 = HDR output on (any thread). */ int droiddeck_color_output(void); -/* 1 while an HDR game's frames are being shown tone-mapped to SDR (the last one < 1.5 s ago); any thread. */ int droiddeck_color_tonemapped_on_screen(void); -/* Device evidence beside the HDR/SDR headroom (the app, non-root APIs; any thread; HDR sessions only): - * PowerManager thermal status (0..6, -1 unknown) + getThermalHeadroom(10) (< 0 = not available), - * Settings.System SCREEN_BRIGHTNESS (0..255, -1 unknown) + SCREEN_BRIGHTNESS_MODE (1 auto, 0 manual). - * Changes of status and brightness are logged; every no-headroom line, the 10 s line and the verdict - * carry the last values. */ void droiddeck_color_env_sample(int thermal, float headroom, int brightness, int bmode); -/* ---- the explicit HDR headroom request (Android 15+: ASurfaceTransaction_setDesiredHdrHeadroom on the game - * layer, SurfaceView.setDesiredHdrHeadroom on the screen surface). Some phones only boost HDR when asked. */ -/* The ratio to ask for an HDR frame of `c`: content peak (max CLL, else mastering max, else the display's - * peak) / SDR white (203), capped at the display's highest ratio when it reports one; 0 = ask nothing - * (not HDR, or the display reports it cannot boost). `why` gets the one-line reason. Any thread. */ float droiddeck_color_desired_headroom(const struct droiddeck_color *c, char *why, size_t n); -/* What was last asked for (> 0 the ratio, 0 nothing, -1 the API is missing): for the no-headroom lines. */ void droiddeck_color_note_headroom_request(float ratio); -/* Display.getHighestHdrSdrRatio() (Android 16+; <= 0 = not reported). Any thread; logged when it arrives. */ void droiddeck_color_set_highest_ratio(float ratio); -/* The headroom the SCREEN surface should ask for (frames through the HDR10 swapchain in the last 1.5 s), - * 0 = none; `why` gets the reason. The app polls it and applies it. Any thread. */ float droiddeck_color_screen_headroom(char *why, size_t n); -/* ---- compositor.c -> here */ -/* Decide the gate (call after ahb_swapchain_init) and create the global when it is open. */ void droiddeck_color_init(struct wl_display *display); -/* The gate is open: the 10-bit dma-buf formats may be advertised, descriptions may exist. */ int droiddeck_color_hdr_open(void); -/* wl_surface.commit: the pending image description (if any request touched it) becomes current. */ void droiddeck_color_commit(struct wl_resource *surface); -/* The surface's current image description; NULL = none (sRGB, today's default). */ const struct droiddeck_color *droiddeck_color_of(struct wl_resource *surface); -/* A program disconnected: if it presented HDR, its part of the summary is written now. */ void droiddeck_color_client_gone(struct wl_client *client); -/* The 10 s summary tick (one `color` line when anything HDR happened in the window). */ void droiddeck_color_stats_tick(void); -/* A frame of an HDR-described surface went through the compositor's own 8-bit sRGB pass this scene - * (who = the window, reason = why it did not get the display layer). Shown untone-mapped. */ void droiddeck_color_frame_copied(const char *who, const char *reason); -/* ---- sc_layer.c / compositor.c -> here: a NEW frame of an HDR-described surface was shown, and how */ enum droiddeck_hdr_path { - DROIDDECK_HDR_ZERO_COPY = 0, /* the game's own gralloc buffer on its display layer, tagged */ - DROIDDECK_HDR_LAYER_COPY, /* one 8-bit copy of the game's frame on its layer, tagged */ - DROIDDECK_HDR_COMPOSED, /* the whole scene composed into one PQ picture on the game layer (hdr_compose.h) */ - DROIDDECK_HDR_SWAPCHAIN, /* composed into PQ and presented through an HDR10 swapchain (frame generation) */ - DROIDDECK_HDR_TONEMAPPED, /* composed and tone-mapped to SDR (HDR output switched off, or a present that - * cannot carry HDR) - NOT HDR */ + DROIDDECK_HDR_ZERO_COPY = 0, + DROIDDECK_HDR_LAYER_COPY, + DROIDDECK_HDR_COMPOSED, + DROIDDECK_HDR_SWAPCHAIN, + DROIDDECK_HDR_TONEMAPPED, + }; -/* ahb_format = the buffer's AHARDWAREBUFFER_FORMAT_* where one exists (0 otherwise). */ void droiddeck_color_frame_shown(const struct droiddeck_color *c, int path, uint32_t ahb_format); -/* "RGBA1010102 (10-bit)" etc. for an AHARDWAREBUFFER_FORMAT_* value (static buffer). */ const char *droiddeck_ahb_format_name(uint32_t format); #endif diff --git a/app/src/main/cpp/waylandcomp/src/droiddeck_ext.c b/app/src/main/cpp/waylandcomp/src/droiddeck_ext.c index 913f713d38..1172c095b0 100644 --- a/app/src/main/cpp/waylandcomp/src/droiddeck_ext.c +++ b/app/src/main/cpp/waylandcomp/src/droiddeck_ext.c @@ -1,11 +1,3 @@ -/* - * Host → compositor message queue plus the init of the extension modules. - * - * The app's threads (UI thread, clipboard listener) hand text to the compositor through - * droiddeck_host_* ; the messages are queued under a mutex and a pipe byte wakes the wl event - * loop, which drains them on the compositor thread - the only thread that may touch - * wl_resources. - */ #define _GNU_SOURCE 1 #include <stdlib.h> #include <string.h> @@ -83,7 +75,7 @@ static int on_wake(int fd, uint32_t mask, void *data) { if (!m) break; switch (m->kind) { case HOST_CLIPBOARD: - clipboard_host_text(m->text, m->len); /* takes the buffer */ + clipboard_host_text(m->text, m->len); m->text = NULL; break; case HOST_TEXT_COMMIT: @@ -114,7 +106,7 @@ void droiddeck_ext_init(struct wl_display *display) { if (pipe2(g_wake, O_CLOEXEC | O_NONBLOCK) == 0) { wl_event_loop_add_fd(loop, g_wake[0], WL_EVENT_READABLE, on_wake, NULL); pthread_mutex_lock(&g_mu); - int queued = g_head != NULL; /* posted before the loop existed (clipboard refresh) */ + int queued = g_head != NULL; pthread_mutex_unlock(&g_mu); if (queued) { char c = 1; ssize_t n = write(g_wake[1], &c, 1); (void)n; } } else diff --git a/app/src/main/cpp/waylandcomp/src/droiddeck_ext.h b/app/src/main/cpp/waylandcomp/src/droiddeck_ext.h index 0dc8ae41aa..ca359557e4 100644 --- a/app/src/main/cpp/waylandcomp/src/droiddeck_ext.h +++ b/app/src/main/cpp/waylandcomp/src/droiddeck_ext.h @@ -1,53 +1,38 @@ -/* - * Interface between compositor.c and the extension modules that live in their own files: - * wl_clipboard.c wl_data_device_manager + zwlr_data_control_manager_v1 (selection only) - * wl_text_input.c zwp_text_input_manager_v3 (host IME / soft keyboard) - * wl_toplevel_icon.c xdg_toplevel_icon_manager_v1 (accepted, not rendered) - * droiddeck_ext.c the host→compositor message queue shared by the modules - * Everything here runs on the compositor (dispatch) thread unless noted. - */ #pragma once #include <stdint.h> #include <wayland-server.h> void droiddeck_log(const char *tag, const char *fmt, ...); -/* ---- compositor.c → modules */ -void droiddeck_ext_init(struct wl_display *display); /* creates the globals + host queue */ -void droiddeck_clipboard_keyboard_focus(struct wl_client *client); /* keyboard focus moved; NULL = none */ -void droiddeck_text_input_refocus(void); /* the text-input target may have changed */ + +void droiddeck_ext_init(struct wl_display *display); +void droiddeck_clipboard_keyboard_focus(struct wl_client *client); +void droiddeck_text_input_refocus(void); void droiddeck_text_input_surface_gone(struct wl_resource *surface); -/* ---- modules → compositor.c */ const char *droiddeck_client_name(struct wl_client *client); struct wl_display *droiddeck_get_display(void); -/* The surface text input follows (the last clicked window, else the topmost program window). */ struct wl_resource *droiddeck_ime_target(void); -/* Scene (virtual desktop) origin of a toplevel surface; 0,0 when unknown. */ void droiddeck_surface_scene_origin(struct wl_resource *surface, int *x, int *y); -/* Deliver a key press/release through the wl_keyboard path as if typed. */ void droiddeck_inject_key(uint32_t evdev, int pressed); -/* ---- modules → app (JNI upcalls; waylandcomp_jni.c) */ void droiddeck_on_clipboard_text(const char *utf8, int len); void droiddeck_on_text_input(int enabled, const char *program, int x, int y, int w, int h); -/* ---- app → modules (callable from any thread; queued to the compositor thread) */ -void droiddeck_host_clipboard_text(const char *utf8, int len); /* len 0 = clear */ + +void droiddeck_host_clipboard_text(const char *utf8, int len); void droiddeck_host_text_commit(const char *utf8, int len); void droiddeck_host_text_preedit(const char *utf8, int len, int cursor_begin, int cursor_end); void droiddeck_host_text_delete(int before, int after); -void droiddeck_host_zero_copy(int on, int live); /* the drawer's zero-copy switch (ahb_swapchain_set_mode) */ -void droiddeck_host_hdr_output(int on); /* the drawer's HDR output switch (droiddeck_color_set_output) */ +void droiddeck_host_zero_copy(int on, int live); +void droiddeck_host_hdr_output(int on); -/* ---- module internals reached through the queue (droiddeck_ext.c → modules) */ void clipboard_init(struct wl_display *display); -void clipboard_host_text(char *utf8, size_t len); /* takes ownership of utf8 */ +void clipboard_host_text(char *utf8, size_t len); void text_input_init(struct wl_display *display); void text_input_host_commit(const char *utf8, size_t len); void text_input_host_preedit(const char *utf8, size_t len, int cursor_begin, int cursor_end); void text_input_host_delete(int before, int after); void toplevel_icon_init(struct wl_display *display); void single_pixel_init(struct wl_display *display); -/* A wp_single_pixel_buffer_manager_v1 buffer: 1 and its pixel (B, G, R, A, premultiplied), else 0. */ int single_pixel_buffer_get(struct wl_resource *buffer, uint8_t bgra[4]); diff --git a/app/src/main/cpp/waylandcomp/src/effects_chain.c b/app/src/main/cpp/waylandcomp/src/effects_chain.c index 0ab39af658..aa5e5cb9dd 100644 --- a/app/src/main/cpp/waylandcomp/src/effects_chain.c +++ b/app/src/main/cpp/waylandcomp/src/effects_chain.c @@ -1,16 +1,12 @@ -/* Screen-effect chain - see effects_chain.h. Compositor thread unless noted. */ #define _POSIX_C_SOURCE 200809L #include "effects_chain.h" #include "vk_loader.h" -#include "vk_present.h" /* droiddeck_log */ +#include "vk_present.h" #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -/* The X11 Vulkan renderer's SPIR-V, pre-compiled by app/src/main/cpp/framegen/gen_shaders.sh - * (glslangValidator --vn) and committed next to the GLSL: the NDK build compiles no shaders, so - * there is no build-time tooling for CI to break. Same bytes as the X11 chain runs. */ #include "upscale_vert.h" #include "sgsr_frag.h" #include "sgsr_quality_frag.h" @@ -26,25 +22,24 @@ #include "crt_frag.h" #include "deband_frag.h" -#define FX_FORMAT VK_FORMAT_R8G8B8A8_UNORM /* the default: every SDR frame */ -/* The chain's target format and the scene's view format. R8G8B8A8 always, except while an HDR scene - * runs through the chain (hdr_compose.h): then the scene and the targets are A2B10G10R10, so a PQ - * picture keeps 10 bits through every pass. A change rebuilds the chain's objects once - * (vkp_effects_set_formats). */ +#define FX_FORMAT VK_FORMAT_R8G8B8A8_UNORM + + + + static VkFormat g_fx_fmt = FX_FORMAT, g_scene_fmt = FX_FORMAT; -#define FX_MAX_DIM 4096 /* a FILL-mapped scene can exceed the panel; cap the chain resolution */ +#define FX_MAX_DIM 4096 -/* ------------------------------------------------------------------ settings */ struct fx_settings { - int scaling; /* 0..8 */ - int sharp_pct; /* 0..100, the upscaler's own slider */ + int scaling; + int sharp_pct; int cas_on, cas_pct; int hdr_on; - int deband_on, deband_pct; /* 0..200 */ - int color_on; /* derived: grade not neutral */ - float brightness, contrast, gamma, saturation; /* shader units (already mapped/clamped) */ - float b_raw, c_raw, s_raw; /* slider units, for the log */ + int deband_on, deband_pct; + int color_on; + float brightness, contrast, gamma, saturation; + float b_raw, c_raw, s_raw; int fxaa, toon, crt, ntsc; char look[48]; }; @@ -54,7 +49,7 @@ static struct fx_settings g_set = { .scaling = 0, .sharp_pct = 75, .cas_on = 0, .cas_pct = 60, .deband_pct = 100, .gamma = 1.0f, .saturation = 1.0f, .s_raw = 100.0f, .look = "Off"}; static volatile int g_changed; -static struct fx_settings g_cur; /* the compositor thread's per-frame snapshot */ +static struct fx_settings g_cur; static int g_cur_valid; static void set_begin(void) { pthread_mutex_lock(&g_lock); } @@ -83,7 +78,6 @@ void vkp_effects_set_deband(int enabled, int pct) { static float clampf(float v, float lo, float hi) { return v < lo ? lo : v > hi ? hi : v; } void vkp_effects_set_screen(float brightness, float contrast, float gamma, float saturation, int fxaa, int toon, int crt, int ntsc) { - /* Same mapping as VulkanRendererContext::setColorGrade (GL ColorEffect clamps). */ int on = !(brightness == 0.0f && contrast == 0.0f && gamma == 1.0f && saturation == 100.0f); set_begin(); g_set.color_on = on; @@ -157,18 +151,17 @@ VkFilter vkp_effects_blit_filter(void) { return g_cur.scaling == 2 ? VK_FILTER_NEAREST : VK_FILTER_LINEAR; } -/* ------------------------------------------------------------------ push constants - * Byte-identical to VulkanRendererContext.h: vec4 ndc first (upscale.vert), the rest fragment-only. */ -struct pc_sgsr { float ndc[4]; float vp[4]; float edge; }; /* also NIS: vp + sharpness */ + + +struct pc_sgsr { float ndc[4]; float vp[4]; float edge; }; struct pc_easu { float ndc[4]; uint32_t con0[4], con1[4], con2[4], con3[4]; float outW, outH; }; struct pc_rcas { float ndc[4]; uint32_t con[4]; float outW, outH; }; -struct pc_res { float ndc[4]; float res[2]; float extra; float pad; }; /* fxaa/toon/hdr/crt (res), cas (sharpness), ntsc (frameCount), deband (strength) */ +struct pc_res { float ndc[4]; float res[2]; float extra; float pad; }; struct pc_color { float ndc[4]; float b, c, g, s; }; -#define PC_MAX_SIZE sizeof(struct pc_easu) /* 88 bytes, the largest */ +#define PC_MAX_SIZE sizeof(struct pc_easu) static uint32_t packf(float f) { uint32_t u; memcpy(&u, &f, 4); return u; } -/* Mirrors ffx_fsr1.h FsrEasuCon / FsrRcasCon exactly as the X11 renderer packs them. */ static void easu_con(struct pc_easu *e, float inW, float inH, float outW, float outH) { e->con0[0] = packf(inW / outW); e->con0[1] = packf(inH / outH); e->con0[2] = packf(0.5f * inW / outW - 0.5f); e->con0[3] = packf(0.5f * inH / outH - 0.5f); @@ -183,7 +176,6 @@ static void rcas_con(struct pc_rcas *r, float scale01) { r->con[0] = packf(scale01); r->con[1] = 0; r->con[2] = 0; r->con[3] = 0; } -/* ------------------------------------------------------------------ Vulkan objects */ struct fx_target { VkImage img; VkDeviceMemory mem; VkImageView view; VkFramebuffer fb; VkDescriptorSet ds; @@ -193,16 +185,16 @@ struct fx_target { static VkDevice g_dev; static VkPhysicalDevice g_pd; static VkPhysicalDeviceMemoryProperties g_mp; -static int g_ready; /* 0 = objects not built, 1 = ok, -1 = failed (chain disabled, said once) */ +static int g_ready; static VkRenderPass g_rp; static VkDescriptorSetLayout g_dsl; static VkPipelineLayout g_pl; static VkDescriptorPool g_dpool; -static VkSampler g_sampler; /* linear, clamp-to-edge: what the X11 chain samples its targets with */ +static VkSampler g_sampler; enum { P_SGSR, P_SGSR_HQ, P_NIS, P_EASU, P_RCAS, P_CAS, P_COLOR, P_FXAA, P_TOON, P_HDR, P_NTSC, P_CRT, P_DEBAND, P_COUNT }; static VkPipeline g_pipe[P_COUNT]; -static struct fx_target g_t[2], g_mid; /* ping-pong pair + the EASU output (FSR only) */ -/* The scene image belongs to vk_present; only its view + descriptor live here. */ +static struct fx_target g_t[2], g_mid; + static struct { VkImage img; VkImageView view; VkDescriptorSet ds; int w, h; } g_scene; static uint32_t g_ntsc_frame; @@ -249,13 +241,11 @@ static void target_destroy(struct fx_target *t) { memset(t, 0, sizeof(*t)); } -/* A chain target: rendered into (colour attachment), sampled by the next pass, and blitted to - * the swapchain when it ends up holding the result. Frames are fenced, so a resize never races - * the GPU. 0 = ok. */ static int target_ensure(struct fx_target *t, int w, int h, const char *what) { if (t->img && t->w == w && t->h == h) return 0; target_destroy(t); - VkImageCreateInfo ii = {.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .imageType = VK_IMAGE_TYPE_2D, + VkImageCreateInfo ii = {.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, + .flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, .imageType = VK_IMAGE_TYPE_2D, .format = g_fx_fmt, .extent = {(uint32_t)w, (uint32_t)h, 1}, .mipLevels = 1, .arrayLayers = 1, .samples = VK_SAMPLE_COUNT_1_BIT, .tiling = VK_IMAGE_TILING_OPTIMAL, .usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | @@ -292,6 +282,10 @@ static void scene_release(void) { memset(&g_scene, 0, sizeof(g_scene)); } +void vkp_effects_forget_image(VkImage img) { + if (img && g_scene.img == img) scene_release(); +} + static int scene_ensure(VkImage img, int w, int h) { if (g_scene.img == img && g_scene.w == w && g_scene.h == h && g_scene.ds) return 0; scene_release(); @@ -308,8 +302,6 @@ static VkShaderModule shader(const uint32_t *code, size_t size) { return m; } -/* One full-quad post pipeline: upscale.vert + the effect's fragment shader, opaque, dynamic - * viewport/scissor - the X11 renderer's createPostPipeline. */ static VkPipeline post_pipeline(VkShaderModule vert, const uint32_t *frag_code, size_t frag_size, const char *name) { VkShaderModule frag = shader(frag_code, frag_size); if (!frag) { droiddeck_log("error", "effects: %s: vkCreateShaderModule failed", name); return VK_NULL_HANDLE; } @@ -362,7 +354,6 @@ void vkp_effects_destroy(void) { objects_destroy(); g_dev = VK_NULL_HANDLE; } void vkp_effects_set_formats(VkFormat scene_fmt, VkFormat target_fmt) { if (target_fmt != g_fx_fmt) { - /* The render pass, the pipelines and the targets are built for one format: start over. */ if (g_ready) objects_destroy(); g_fx_fmt = target_fmt; g_scene_fmt = scene_fmt; @@ -379,14 +370,9 @@ void vkp_effects_set_formats(VkFormat scene_fmt, VkFormat target_fmt) { } } -/* Build every device object once, on the first active frame. 0 = ok, -1 = the chain is - * unavailable for this session (logged once; frames fall back to the plain blit). */ static int objects_ensure(void) { if (g_ready) return g_ready == 1 ? 0 : -1; if (!g_dev || !g_vk.CreateGraphicsPipelines) { g_ready = -1; droiddeck_log("error", "effects: no device for the chain"); return -1; } - /* Render pass: one colour target, overwritten whole (DONT_CARE), left SHADER_READ_ONLY for the - * next pass. The dependencies order this pass after whoever read the target last (previous - * pass / previous frame's blit) and before whoever samples or blits it next. */ VkAttachmentDescription att = {.format = g_fx_fmt, .samples = VK_SAMPLE_COUNT_1_BIT, .loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE, .storeOp = VK_ATTACHMENT_STORE_OP_STORE, .stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE, .stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE, @@ -457,7 +443,6 @@ fail: return -1; } -/* ------------------------------------------------------------------ recording */ static void barrier(VkCommandBuffer cmd, VkImage img, VkImageLayout from, VkImageLayout to, VkPipelineStageFlags src_stage, VkAccessFlags src_access, @@ -469,7 +454,6 @@ static void barrier(VkCommandBuffer cmd, VkImage img, VkImageLayout from, VkImag g_vk.CmdPipelineBarrier(cmd, src_stage, dst_stage, 0, 0, NULL, 0, NULL, 1, &b); } -/* One pass: sample `src` (a descriptor in SHADER_READ_ONLY_OPTIMAL), draw the full quad into `dst`. */ static void pass(VkCommandBuffer cmd, VkPipeline p, struct fx_target *dst, VkDescriptorSet src, const void *pc, uint32_t pcsz) { VkRenderPassBeginInfo rpi = {.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, .renderPass = g_rp, .framebuffer = dst->fb, @@ -496,36 +480,26 @@ VkImage vkp_effects_run(VkCommandBuffer cmd, VkImage scene, int scene_w, int sce s = &g_cur; *res_w = scene_w; *res_h = scene_h; - /* The chain's resolution: the scene's mapped size (X11 runs its effects at the output extent, - * with the scene already scaled by the base sampler). Clamped so a FILL-mapped 4K scene does - * not allocate beyond reason; the final blit resizes the remainder. */ int cw = out_w > 0 ? out_w : scene_w, ch = out_h > 0 ? out_h : scene_h; if (cw > FX_MAX_DIM) cw = FX_MAX_DIM; if (ch > FX_MAX_DIM) ch = FX_MAX_DIM; if (cw < 1) cw = 1; if (ch < 1) ch = 1; - /* Spatial upscalers only have work when the scene is shown larger than it is (the X11 - * renderer's "render below display" gate); Sharpen (RCAS) runs at any size. */ const int upscaling = cw > scene_w || ch > scene_h; int spatial = 0; if (spatial_mode(s->scaling) && (s->scaling == 6 || upscaling)) spatial = s->scaling; const int nfx = effect_count(s); const int resize = cw != scene_w || ch != scene_h; - /* Passes that write the ping-pong pair: the scaling/resize stage (if any) + the effects. - * Two targets are needed once any pass reads what an earlier one wrote. */ const int npasses = ((spatial || resize) ? 1 : 0) + nfx; if ((spatial || nfx) && objects_ensure() == 0 && scene_ensure(scene, scene_w, scene_h) == 0 && target_ensure(&g_t[0], cw, ch, "chain") == 0 && (npasses < 2 || target_ensure(&g_t[1], cw, ch, "chain") == 0) && (!(spatial == 4 || spatial == 5) || target_ensure(&g_mid, cw, ch, "EASU") == 0)) { - /* `cur` = the image the next pass samples; `cur_ds` its descriptor. Every pass writes the - * target that is not being read (the pair alternates; the scene is read only first). */ VkDescriptorSet cur_ds; - struct fx_target *cur = NULL; /* NULL = the scene image */ + struct fx_target *cur = NULL; #define FREE_TARGET() ((cur == &g_t[0]) ? &g_t[1] : &g_t[0]) const float sharp01 = (float)s->sharp_pct / 100.0f; - /* ---- stage 1: scaling (scene -> chain res) */ if (spatial) { barrier(cmd, scene, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, @@ -536,20 +510,17 @@ VkImage vkp_effects_run(VkCommandBuffer cmd, VkImage scene, int scene_w, int sce SET_NDC(pc); pc.vp[0] = 1.0f / (float)scene_w; pc.vp[1] = 1.0f / (float)scene_h; pc.vp[2] = (float)scene_w; pc.vp[3] = (float)scene_h; - /* SGSR EdgeSharpness 0.5 (slider 0) .. 4.5 (slider 100); NIS takes the slider as is. */ pc.edge = spatial == 7 ? sharp01 : 0.5f + sharp01 * 4.0f; pass(cmd, g_pipe[spatial == 3 ? P_SGSR : spatial == 8 ? P_SGSR_HQ : P_NIS], dst, g_scene.ds, &pc, sizeof(pc)); } else if (spatial == 6) { - /* Sharpen: RCAS fetches the scene 1:1 (outputSize = scene size) while the quad - * covers the chain target = nearest scale + sharpen, as the X11 renderer does. */ struct pc_rcas pc = {0}; SET_NDC(pc); rcas_con(&pc, sharp01); pc.outW = (float)scene_w; pc.outH = (float)scene_h; pass(cmd, g_pipe[P_RCAS], dst, g_scene.ds, &pc, sizeof(pc)); - } else { /* FSR (4) / FSR Fit (5): EASU scene -> mid, RCAS mid -> dst, both at chain res. - * Fill vs fit is the Fullscreen Mode's business here (the mapping), so both - * run the same EASU+RCAS pair. */ + } else { + + struct pc_easu e = {0}; struct pc_rcas r = {0}; SET_NDC(e); @@ -563,8 +534,6 @@ VkImage vkp_effects_run(VkCommandBuffer cmd, VkImage scene, int scene_w, int sce } cur = dst; cur_ds = dst->ds; } else if (resize) { - /* No spatial pass: a plain filtered resize to the chain resolution first (Linear or - * Nearest per the scaling mode), so the effects run at output resolution like X11. */ struct fx_target *dst = FREE_TARGET(); barrier(cmd, scene, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, @@ -580,16 +549,12 @@ VkImage vkp_effects_run(VkCommandBuffer cmd, VkImage scene, int scene_w, int sce VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_ACCESS_SHADER_READ_BIT); cur = dst; cur_ds = dst->ds; } else { - /* Scene already at output size: the first effect samples it directly. */ barrier(cmd, scene, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_ACCESS_SHADER_READ_BIT); cur = NULL; cur_ds = g_scene.ds; } - /* ---- stage 2: the effects, in the X11 renderer's locked order - * FXAA -> Toon -> Colour -> CAS -> HDR -> NTSC -> CRT -> Debanding (terminal dither). - * Each writes the free ping-pong target; the one just read becomes free. */ enum { FX_FXAA, FX_TOON, FX_COLOR, FX_CAS, FX_HDR, FX_NTSC, FX_CRT, FX_DEBAND }; int order[8], n = 0; if (s->fxaa) order[n++] = FX_FXAA; @@ -618,7 +583,6 @@ VkImage vkp_effects_run(VkCommandBuffer cmd, VkImage scene, int scene_w, int sce case FX_CAS: pr.extra = (float)s->cas_pct / 100.0f; pass(cmd, g_pipe[P_CAS], dst, cur_ds, &pr, sizeof(pr)); break; case FX_HDR: pass(cmd, g_pipe[P_HDR], dst, cur_ds, &pr, sizeof(pr)); break; case FX_NTSC: - /* cos/sin(chromaPhase*0.5) has period 4 in the counter: mod 4 keeps the shimmer exact. */ pr.extra = (float)(g_ntsc_frame++ & 3u); pass(cmd, g_pipe[P_NTSC], dst, cur_ds, &pr, sizeof(pr)); break; @@ -630,23 +594,18 @@ VkImage vkp_effects_run(VkCommandBuffer cmd, VkImage scene, int scene_w, int sce #undef FREE_TARGET if (cur) { - /* The result: written by the last render pass, now for the output blit. */ barrier(cmd, cur->img, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_READ_BIT); *res_w = cur->w; *res_h = cur->h; return cur->img; } - /* Nothing ran after all (cannot happen with nfx > 0): the scene was moved to - * SHADER_READ_ONLY above; bring it to TRANSFER_SRC for the blit. */ barrier(cmd, scene, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_ACCESS_SHADER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_READ_BIT); return scene; } - /* Nothing to do (a spatial mode with no room to upscale and no effect), or the chain is - * unavailable: present the scene as composited. */ barrier(cmd, scene, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_READ_BIT); diff --git a/app/src/main/cpp/waylandcomp/src/effects_chain.h b/app/src/main/cpp/waylandcomp/src/effects_chain.h index 74203bccc1..50e5e34942 100644 --- a/app/src/main/cpp/waylandcomp/src/effects_chain.h +++ b/app/src/main/cpp/waylandcomp/src/effects_chain.h @@ -1,81 +1,33 @@ #ifndef EFFECTS_CHAIN_H #define EFFECTS_CHAIN_H -/* - * Screen-effect chain for the embedded Wayland compositor: the X11 Vulkan renderer's post - * chain (the .frag files in app/src/main/cpp/framegen, VulkanRendererContext::recordUpscalePasses) run - * between the composited scene and the output blit, with the same SPIR-V, push-constant - * layouts, uniform ranges and pass order, so a saved preset looks the same on both backends. - * - * Present-pass hook order (vk_present.c, vkp_render): - * scene (all draws blitted 1:1 into a scene-sized image) - * -> vkp_effects_run() this file: scaling -> effects, in the X11 order - * -> vkp_framegen_run() frame generation (feat/wayland-framegen; inserted after this) - * -> update_map / blit Fullscreen Mode + Screen Alignment, onto the swapchain image - * -> present - * When nothing is on, vkp_effects_active() is 0 and vkp_render keeps its plain path (the draws - * are blitted straight through the mapping; only the blit filter follows Linear/Nearest). - * - * Pass order (LOCKED to the X11 Vulkan renderer): - * scaling (SGSR / SGSR HQ / NIS / FSR EASU+RCAS / Sharpen=RCAS; None/Linear/Nearest = a - * filtered resize) -> FXAA -> Toon -> Colour -> CAS -> HDR -> NTSC -> CRT -> Debanding. - * Scaling resizes the scene to its mapped output size (there is no render scale on Wayland); - * every later pass runs at that resolution and ping-pongs between two targets. - * - * Settings come from any thread (JNI); the compositor thread snapshots them once per frame and - * logs one `effects` line per change. Vulkan objects are created lazily on the first active frame. - */ #define VK_USE_PLATFORM_ANDROID_KHR #include <vulkan/vulkan.h> -/* Compositor thread, from dev_init: the device the chain builds its objects on. */ void vkp_effects_bind_device(VkDevice dev, VkPhysicalDevice pd, const VkPhysicalDeviceMemoryProperties *memprops); -/* Compositor thread: pick up settings changed since the last call. Returns 1 when something - * changed (the caller redraws even a static scene); logs the `effects` line. */ int vkp_effects_sync(void); -/* Compositor thread: 1 when the frame must go through the scene image + chain (any effect on, - * or a spatial scaling mode). Modes None/Linear/Nearest alone are NOT active: the plain blit - * handles them through vkp_effects_blit_filter(). */ int vkp_effects_active(void); -/* The filter for the scene -> output resize: NEAREST for scaling mode 2, else LINEAR. */ VkFilter vkp_effects_blit_filter(void); -/* THE HOOK. Records the chain into `cmd`. `scene` (scene_w x scene_h, R8G8B8A8_UNORM, in - * TRANSFER_DST_OPTIMAL after the composite) -> the image to present, returned in - * TRANSFER_SRC_OPTIMAL with its size in res_w / res_h. out_w/out_h = the scene's mapped size on - * the output (what the scaling modes resize to; the caller maps the result over the whole scene - * afterwards, so Fullscreen Mode / Alignment still apply after the chain). Returns `scene` itself - * (transitioned to TRANSFER_SRC_OPTIMAL) when there is nothing to do or the chain is unavailable. */ VkImage vkp_effects_run(VkCommandBuffer cmd, VkImage scene, int scene_w, int scene_h, int out_w, int out_h, int *res_w, int *res_h); -/* Compositor thread: drop every Vulkan object (device teardown / device lost). */ void vkp_effects_destroy(void); -/* Compositor thread, before vkp_effects_run(): the format of the scene image it will be handed and the - * format its own targets use. R8G8B8A8 / R8G8B8A8 for every SDR frame (the default); A2B10G10R10 / - * A2B10G10R10 while an HDR picture runs through it (hdr_compose.h). A target-format change rebuilds the - * chain's objects on its next run (once per switch). */ +void vkp_effects_forget_image(VkImage img); + void vkp_effects_set_formats(VkFormat scene_fmt, VkFormat target_fmt); -/* ---- settings (any thread; values 1:1 with the X11 Vulkan renderer's setters) ---- */ -/* 0=None 1=Linear 2=Nearest 3=SGSR 4=FSR 5=FSR Fit 6=Sharpen 7=NIS 8=SGSR HQ */ void vkp_effects_set_scaling(int mode); -/* Slider 0..100: RCAS lobe scale (FSR/Sharpen), SGSR EdgeSharpness 0.5..4.5, NIS sharpness. */ void vkp_effects_set_upscale_sharpness(int pct); -/* CAS toggle + slider 0..100 (0 = the pass is off). */ void vkp_effects_set_cas(int enabled, int pct); void vkp_effects_set_hdr(int enabled); -/* Terminal dither: slider 0..200 -> strength/100 LSBs. */ void vkp_effects_set_deband(int enabled, int pct); -/* Colour grade in slider units (brightness/contrast -100..100, gamma 0.5..3, saturation 0..200 - * percent; neutral = 0,0,1,100 turns the pass off) + the four shader toggles. */ void vkp_effects_set_screen(float brightness, float contrast, float gamma, float saturation, int fxaa, int toon, int crt, int ntsc); -/* The Look the current controls match ("Custom" when none), for the log line only. */ void vkp_effects_set_look(const char *name); #endif diff --git a/app/src/main/cpp/waylandcomp/src/framegen_bridge.c b/app/src/main/cpp/waylandcomp/src/framegen_bridge.c index ac2100365c..379087045e 100644 --- a/app/src/main/cpp/waylandcomp/src/framegen_bridge.c +++ b/app/src/main/cpp/waylandcomp/src/framegen_bridge.c @@ -1,4 +1,3 @@ -/* Frame generation on the Wayland backend - see framegen_bridge.h. */ #define _POSIX_C_SOURCE 200809L #include "framegen_bridge.h" #include "framegen_engine.h" @@ -12,23 +11,22 @@ #include <android/log.h> void droiddeck_log(const char *tag, const char *fmt, ...) __attribute__((format(printf, 2, 3))); +uint64_t droiddeck_game_frames(void); #define FGLOG(...) droiddeck_log("framegen", __VA_ARGS__) #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "DroidDeckWayland", __VA_ARGS__) -/* ---- app controls (written from any thread, read on the compositor thread) ------------- */ static _Atomic int g_kind = VKP_FG_ENGINE_LSFG; static _Atomic int g_armed; static _Atomic int g_mult = 2; -static _Atomic int g_target; /* LSFG adaptive fps, 0 = fixed multiplier */ +static _Atomic int g_target; static _Atomic int g_model = 3; static _Atomic int g_preset = 2; static _Atomic int g_cfg_dirty = 1; -static float g_flow = 0.8f, g_refresh_hz; /* under g_lock */ -static char *g_cache_path; /* under g_lock */ -static _Atomic int g_cache_gen; /* bumps when the path changes */ +static float g_flow = 0.8f, g_refresh_hz; +static char *g_cache_path; +static _Atomic int g_cache_gen; static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; -/* ---- device -------------------------------------------------------------------------- */ static VkDevice g_dev; static VkInstance g_inst; static PFN_vkGetInstanceProcAddr g_gipa; @@ -50,12 +48,10 @@ static struct { PFN_vkDeviceWaitIdle DeviceWaitIdle; } vk; -/* ---- engine + generation ring (compositor thread) ------------------------------------ */ -static int g_engine_kind = -1; /* kind of the running engine, -1 = none */ -static int g_engine_cache_gen = -1; /* the LSFG cache it loaded */ + +static int g_engine_kind = -1; +static int g_engine_cache_gen = -1; static int g_engine_ok; -/* The engine of this kind (with this cache) could not start or build its chain; not retried - * every frame - a new engine selection or a new cache clears it. */ static _Atomic int g_failed_kind = -1; static _Atomic int g_failed_cache_gen = -1; @@ -65,11 +61,10 @@ static uint32_t g_ring_n, g_ring_w, g_ring_h; static VkFormat g_ring_fmt; static uint64_t g_source_frames; -static uint32_t g_planned; /* generations planned for the current source frame */ +static uint32_t g_planned; static int g_was_armed, g_generating_logged; static uint32_t g_built_w, g_built_h; static VkFormat g_built_fmt; -/* Deeper formats (FP16 for HDR frames) the engine failed to build its chain in this session. */ static VkFormat g_refused_fmt[4]; static int g_refused_n; static int format_refused(VkFormat f) { @@ -77,10 +72,10 @@ static int format_refused(VkFormat f) { return 0; } -/* ---- stats ------------------------------------------------------------------------- */ -static _Atomic unsigned g_stat_generated; /* since the last stats_take */ + +static _Atomic unsigned g_stat_generated; static uint64_t g_total_generated; -static float g_presented_rate, g_source_rate; /* smoothed, 0.5 s windows */ +static float g_presented_rate, g_source_rate; static uint32_t g_present_accum, g_source_accum; static int64_t g_window_start_ns; @@ -89,7 +84,6 @@ static int64_t now_ns(void) { return (int64_t)ts.tv_sec * 1000000000LL + ts.tv_nsec; } -/* ====================================================================== app controls */ void vkp_framegen_set_engine(int kind) { if (kind != VKP_FG_ENGINE_LSFG && kind != VKP_FG_ENGINE_WINFG) kind = VKP_FG_ENGINE_LSFG; @@ -100,7 +94,6 @@ void vkp_framegen_set_engine(int kind) { void vkp_framegen_set_armed(int armed, int multiplier, int target_fps) { if (target_fps < 0) target_fps = 0; - /* Adaptive sizes the ring and the swapchain for the most it may ever generate. */ if (target_fps) multiplier = VKP_FG_MAX_GENERATIONS + 1; if (multiplier < 2) multiplier = 2; if (multiplier > VKP_FG_MAX_GENERATIONS + 1) multiplier = VKP_FG_MAX_GENERATIONS + 1; @@ -147,8 +140,6 @@ static void mark_failed(int kind) { atomic_store(&g_failed_kind, kind); } -/* Same codes as VulkanRenderer.getFrameGenProblem(); computed from the live state so an engine - * switch from the app is answered at once. */ int vkp_framegen_problem(void) { if (!g_dev_ready) return -1; int kind = atomic_load(&g_kind); @@ -162,8 +153,6 @@ const char *vkp_framegen_caps_reason(void) { return fge_caps_reason(); } void vkp_framegen_stats(float out[6]) { float accepted = 0.0f, src = 0.0f, thermal = -1.0f; if (g_engine_ok) fge_telemetry(&accepted, &src, &thermal); - /* Planned is what is generated; the governor is off on both paths. Our own measured - * source rate serves both engines (Win-FG measures none). */ out[0] = (float)g_planned; out[1] = (float)g_planned; out[2] = g_source_rate; @@ -174,7 +163,6 @@ void vkp_framegen_stats(float out[6]) { unsigned vkp_framegen_stats_take(void) { return atomic_exchange(&g_stat_generated, 0u); } -/* ====================================================================== device setup */ const void *vkp_framegen_device_features(VkInstance inst, PFN_vkGetInstanceProcAddr gipa, VkPhysicalDevice pd) { @@ -199,7 +187,6 @@ void vkp_framegen_device_ready(VkDevice dev, VkQueue queue, uint32_t qfam, int f void vkp_framegen_device_lost(void) { g_dev_lost = 1; } -/* ====================================================================== ring */ static void destroy_ring(void) { if (!g_ring_n) return; @@ -220,9 +207,6 @@ static int memory_type(uint32_t bits, VkMemoryPropertyFlags want) { return -1; } -/* The generation targets: written by the chain through a storage view, read by the screen - * blit. Kept in GENERAL for their whole life (both uses allow it), so there is no layout dance - * per frame - only access barriers. */ static int ensure_ring(uint32_t w, uint32_t h, VkFormat fmt, uint32_t n) { if (n > VKP_FG_MAX_GENERATIONS) n = VKP_FG_MAX_GENERATIONS; if (g_ring_n == n && g_ring_w == w && g_ring_h == h && g_ring_fmt == fmt) return 1; @@ -257,7 +241,6 @@ static int ensure_ring(uint32_t w, uint32_t h, VkFormat fmt, uint32_t n) { return 1; } -/* ====================================================================== present path */ static int engine_usable(void) { int kind = atomic_load(&g_kind); @@ -270,8 +253,6 @@ int vkp_framegen_format_ok(VkFormat fmt) { return fge_format_ok(fmt); } -/* The engine could not build its chain in a deeper format: refuse the format for the session and - * restart the engine on the next frame (a failed build is sticky inside both engines). */ static void refuse_format(VkFormat fmt, int kind, int w, int h, const char *what) { if (g_refused_n < (int)(sizeof(g_refused_fmt) / sizeof(g_refused_fmt[0]))) g_refused_fmt[g_refused_n++] = fmt; FGLOG("%s could not %s in format %d (the HDR picture's FP16) at %dx%d: it restarts, and HDR frames go through " @@ -321,7 +302,6 @@ static int ensure_engine(int kind) { return 1; } -/* "x3 (2 interpolated frames per game frame)" or "adaptive to 90 fps (up to 3 ...)". */ static const char *describe_mode(char *buf, size_t n, int mult, int target) { if (target) snprintf(buf, n, "adaptive to %d fps (up to %d interpolated frames per game frame)", target, mult - 1); else snprintf(buf, n, "x%d (%d interpolated frame%s per game frame)", mult, mult - 1, mult == 2 ? "" : "s"); @@ -393,13 +373,14 @@ int vkp_framegen_run(VkCommandBuffer cmd, VkImage scene, VkImageView scene_view, return 0; } - uint32_t n_gen = fge_plan(g_ring_n, ++g_source_frames, g_presented_rate); + /* 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. */ + ++g_source_frames; + const uint64_t game_frames = droiddeck_game_frames(); + uint32_t n_gen = fge_plan(g_ring_n, game_frames ? game_frames : g_source_frames, g_presented_rate); if (n_gen > g_ring_n) n_gen = g_ring_n; g_planned = n_gen; - /* The scene image was just written (blits, and whatever the effects chain did); make that - * visible to the engine's copy (TRANSFER) and shaders (COMPUTE). Fresh ring images get their - * one UNDEFINED -> GENERAL transition here; the others need TRANSFER-read -> COMPUTE-write. */ VkImageMemoryBarrier bars[1 + VKP_FG_MAX_GENERATIONS]; uint32_t nb = 0; bars[nb++] = (VkImageMemoryBarrier){ @@ -425,15 +406,12 @@ int vkp_framegen_run(VkCommandBuffer cmd, VkImage scene, VkImageView scene_view, VK_PIPELINE_STAGE_TRANSFER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, NULL, 0, NULL, nb, bars); - /* Frame N in; the shared passes (the whole flow pyramid) run only when generating. */ fge_process(cmd, scene, (uint32_t)w, (uint32_t)h, n_gen); for (uint32_t g = 0; g < n_gen; g++) { fge_generate(cmd, g, n_gen, g_ring[g].img, g_ring[g].view, (uint32_t)w, (uint32_t)h); gens[g] = g_ring[g].img; } if (n_gen) { - /* Compute writes -> the screen blits (this command buffer and the later per-present ones; - * a barrier's first scope covers everything submitted earlier on the queue). */ nb = 0; for (uint32_t g = 0; g < n_gen; g++) bars[nb++] = (VkImageMemoryBarrier){ @@ -466,7 +444,7 @@ void vkp_framegen_presented(int generated) { g_total_generated += (uint64_t)generated; } float elapsed = (float)(now - g_window_start_ns) / 1e9f; - if (elapsed < 0.5f) return; /* half-second window, like the X11 renderer */ + if (elapsed < 0.5f) return; float rate = (float)g_present_accum / elapsed, src = (float)g_source_accum / elapsed; g_presented_rate = g_presented_rate > 0.0f ? g_presented_rate + (rate - g_presented_rate) * 0.25f : rate; g_source_rate = g_source_rate > 0.0f ? g_source_rate + (src - g_source_rate) * 0.25f : src; diff --git a/app/src/main/cpp/waylandcomp/src/framegen_bridge.h b/app/src/main/cpp/waylandcomp/src/framegen_bridge.h index b60229cdb7..5e27db40d1 100644 --- a/app/src/main/cpp/waylandcomp/src/framegen_bridge.h +++ b/app/src/main/cpp/waylandcomp/src/framegen_bridge.h @@ -1,27 +1,5 @@ #ifndef FRAMEGEN_BRIDGE_H #define FRAMEGEN_BRIDGE_H -/* - * Frame generation on the Wayland backend (feat/wayland-framegen). - * - * The two NATIVE engines the X11 renderer runs inside Bannerlator's X11 compositor - LSFG Native - * (the user's Lossless.dll chain, lsfg/) and Win-FG Native (our own FSR3-derived optical-flow - * chain, winfg/) - are hosted here inside the Wayland compositor's Turnip device. Both consume - * consecutive presented frames and emit interpolated frames between them; the guest never - * sees any of it. bionic-fg (the guest-side win-fg Vulkan layer) is X11-only and is not - * ported: its frames are born inside the guest and have nothing to attach to here. - * - * Present order per scene frame (vk_present.c): - * scene -> effects -> FRAME GENERATION -> mapping/blit -> swapchain - * The scene is composed 1:1 into an off-screen image, the effects chain runs on it, then - * vkp_framegen_run() (the one hook) feeds that image to the engine and hands back up to three - * generated images. vk_present.c blits the generated frames to the screen FIRST and the real - * frame LAST (interpolation produces frames that belong between N-1 and N), one FIFO present - * each, so the panel shows them on consecutive vblanks - the same pacing the X11 native path - * is device-proven with. No sleeps, no host-side pacer. - * - * Threads: the set_* controls are called from the app (JNI, any thread) and only store - * values; everything that touches Vulkan runs on the compositor thread inside vkp_render(). - */ #include <stdint.h> #ifndef VK_USE_PLATFORM_ANDROID_KHR #define VK_USE_PLATFORM_ANDROID_KHR @@ -29,63 +7,28 @@ #include <vulkan/vulkan.h> enum { VKP_FG_ENGINE_LSFG = 0, VKP_FG_ENGINE_WINFG = 1 }; -/* Hard ceiling on generated frames per source frame (2x..4x -> 1..3), as on X11. */ #define VKP_FG_MAX_GENERATIONS 3 -/* ---- app controls (any thread) ------------------------------------------------------- */ void vkp_framegen_set_engine(int kind); -/* multiplier 2..4, or target_fps > 0 for LSFG's adaptive mode (up to 4x, as the target needs); - * armed = 0 stops generating (the ring and the engine stay for a re-arm). */ void vkp_framegen_set_armed(int armed, int multiplier, int target_fps); -/* LSFG Native: the SPIR-V cache built from the user's Lossless.dll (Lossless.sync); a new path reloads the engine. */ void vkp_framegen_set_lsfg_cache_path(const char *path); -/* Flow scale 0.25..1.0 and the panel's real refresh rate (the pacer never generates above it). */ void vkp_framegen_set_tuning(float flow_scale, float refresh_hz); -/* Win-FG Native: interpolation model (3/4) and performance preset (0..2). */ void vkp_framegen_set_winfg_tuning(int model, int perf_preset); -/* Same codes as VulkanRenderer.getFrameGenProblem(): -1 not known yet (device not up), 0 fine, - * 1 the driver lacks what the selected engine needs (vkp_framegen_caps_reason says what), - * 2 the engine failed to start / build its chain. */ int vkp_framegen_problem(void); const char *vkp_framegen_caps_reason(void); -/* Same shape as VulkanRenderer.getFrameGenStats(): {generations trusted, generations planned, - * real (source) fps, presented fps incl. generated frames, thermal (-1 = none), ms per - * generated frame (-1 = unknown)}. */ void vkp_framegen_stats(float out[6]); -/* Generated frames presented since the last call (compositor.c, the 10 s stats line). */ unsigned vkp_framegen_stats_take(void); -/* ---- vk_present.c: device setup (compositor thread) ----------------------------------- */ -/* Before vkCreateDevice: probe what the engines need on this physical device and return the - * pNext chain to hang on VkDeviceCreateInfo (NULL when the device cannot run the LSFG chain - - * Win-FG needs no feature). Owned by the bridge, valid until the next call. */ const void *vkp_framegen_device_features(VkInstance inst, PFN_vkGetInstanceProcAddr gipa, VkPhysicalDevice pd); -/* After the device exists (features_enabled = the chain above was accepted). */ void vkp_framegen_device_ready(VkDevice dev, VkQueue queue, uint32_t qfam, int features_enabled); -/* VK_ERROR_DEVICE_LOST: never touch the device again. */ void vkp_framegen_device_lost(void); -/* ---- vk_present.c: present path (compositor thread) ------------------------------------ */ -/* 1 when this frame must go through the compositor pass (armed and the engine can run). Safe - * before the device is up (0). */ int vkp_framegen_active(void); -/* Extra swapchain images wanted so every present of one scene frame is queued without waiting - * for a vblank: multiplier - 1 while armed, 0 otherwise. A change means "rebuild the swapchain". */ int vkp_framegen_extra_images(void); -/* THE hook. Called once per composed scene frame, after the effects hook, with the scene image - * (GENERAL, w x h, fmt, TRANSFER_SRC|SAMPLED). Records the engine's chain into `cmd` and - * returns how many generated frames (0..VKP_FG_MAX_GENERATIONS) it produced, their images in - * gens[] (GENERAL, w x h, already made visible to TRANSFER reads). 0 = present the scene alone. */ int vkp_framegen_run(VkCommandBuffer cmd, VkImage scene, VkImageView scene_view, int w, int h, VkFormat fmt, VkImage gens[VKP_FG_MAX_GENERATIONS]); -/* After the presents of one scene frame: how many generated frames actually reached the - * swapchain (rate tracking + the stats counters). */ void vkp_framegen_presented(int generated); -/* 1 when vkp_framegen_run can be fed `fmt` (the 8-bit scene always; FP16 for HDR frames where the - * device can generate in it and the engine has not refused it this session). A chain that fails to - * build in a deeper format is not an engine failure: the engine restarts and the format is refused, - * so the caller goes back to 8 bits. */ int vkp_framegen_format_ok(VkFormat fmt); #endif diff --git a/app/src/main/cpp/waylandcomp/src/framegen_engine.cpp b/app/src/main/cpp/waylandcomp/src/framegen_engine.cpp index 12674e533b..43edb12409 100644 --- a/app/src/main/cpp/waylandcomp/src/framegen_engine.cpp +++ b/app/src/main/cpp/waylandcomp/src/framegen_engine.cpp @@ -1,9 +1,3 @@ -// C++ side of the Wayland frame-generation bridge - see framegen_engine.h. -// -// Hosts the SAME engine objects the X11 renderer drives (lsfg::Engine, winfg::Engine), fed from -// the compositor's own Turnip entry points. Nothing in framegen/lsfg or framegen/winfg is -// modified: the engines take a VkTable (VulkanRendererContext.h) for their dispatch, and one is -// filled here by name from the compositor's vkGetInstanceProcAddr / vkGetDeviceProcAddr. #include "framegen_engine.h" #include <cstdio> @@ -14,7 +8,7 @@ #include <android/log.h> -#include "VulkanRendererContext.h" // VkTable +#include "VulkanRendererContext.h" #include "lsfg/lsfg_engine.h" #include "lsfg/lsfg_probe.h" #include "lsfg/lsfg_vkd.h" @@ -40,13 +34,10 @@ std::unique_ptr<winfg::Engine> g_winfg; int g_kind = -1; char g_build[96] = ""; -// Instance-level entry points the engines and the probe use. #define FGE_INSTANCE_FUNCS(X) \ X(GetPhysicalDeviceProperties) X(GetPhysicalDeviceMemoryProperties) \ X(GetPhysicalDeviceFeatures2) X(GetPhysicalDeviceFormatProperties) \ X(GetPhysicalDeviceQueueFamilyProperties) X(GetDeviceProcAddr) -// Device-level: the LSFG chain's 34 (lsfg_vkd.h), win-fg's extras (winfg_vkd.cpp) and the -// generic set either may reach for. Anything left null in VkTable is never called. #define FGE_DEVICE_FUNCS(X) \ X(AllocateDescriptorSets) X(AllocateMemory) X(BindBufferMemory) X(BindImageMemory) \ X(CmdBindDescriptorSets) X(CmdBindPipeline) X(CmdCopyImage) X(CmdDispatch) \ @@ -78,7 +69,7 @@ void fill_device(VkDevice dev) { #undef X } -} // namespace +} extern "C" { @@ -96,9 +87,9 @@ const void *fge_probe(PFN_vkGetInstanceProcAddr gipa, VkInstance inst, VkPhysica if (n) enumExts(pd, nullptr, &n, exts.data()); } g_caps = lsfg::Caps{}; - // No Vulkan 1.1 compat here: the Wayland compositor only ever runs on Turnip (adrenotools), - // which reports 1.3+; the stock-driver case the compat flag exists for cannot reach it. - g_caps.features = lsfg::queryFeatures(g_table, pd, exts, /*allowVk11=*/false); + + + g_caps.features = lsfg::queryFeatures(g_table, pd, exts, false); g_caps.probedFormat = ring_fmt; g_caps.storageOnSwapchainFormat = g_table.GetPhysicalDeviceFormatProperties ? lsfg::probeStorageFormat(g_table, pd, ring_fmt) : false; @@ -110,7 +101,6 @@ const void *fge_probe(PFN_vkGetInstanceProcAddr gipa, VkInstance inst, VkPhysica ELOG("device gates for the LSFG chain fail: %s", g_caps.reason); return nullptr; } - // Same chain VulkanRendererContext::createLogicalDevice hangs on its device. g_v12 = VkPhysicalDeviceVulkan12Features{}; g_v12.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; g_v12.vulkanMemoryModel = VK_TRUE; @@ -207,8 +197,6 @@ void fge_configure(uint32_t multiplier, uint32_t target_fps, float flow_scale, f int fge_prepare(uint32_t w, uint32_t h, VkFormat fmt) { if (g_kind == 1) return g_winfg && g_winfg->prepare(w, h, fmt) ? 1 : 0; if (!g_lsfg) return 0; - // The Wayland scene is the game's own size when it runs fullscreen, so the flow pyramid is - // scaled against that (X11 passes the X screen size here for the same reason). g_lsfg->setGuestExtent(w, h); return g_lsfg->prepare(w, h, fmt) ? 1 : 0; } @@ -247,4 +235,4 @@ void fge_telemetry(float *accepted, float *source_rate, float *thermal) { const char *fge_engine_name(int kind) { return kind == 1 ? "Win-FG Native" : "LSFG Native"; } const char *fge_build_info(void) { return g_build; } -} // extern "C" +} diff --git a/app/src/main/cpp/waylandcomp/src/framegen_engine.h b/app/src/main/cpp/waylandcomp/src/framegen_engine.h index b0deec70b4..4257a7592e 100644 --- a/app/src/main/cpp/waylandcomp/src/framegen_engine.h +++ b/app/src/main/cpp/waylandcomp/src/framegen_engine.h @@ -1,16 +1,5 @@ #ifndef FRAMEGEN_ENGINE_H #define FRAMEGEN_ENGINE_H -/* - * C face of the C++ frame-generation engines for framegen_bridge.c. - * - * framegen_engine.cpp wraps lsfg::Engine (framegen/lsfg) and winfg::Engine (framegen/winfg) - * unmodified - the same objects the X11 renderer (VulkanRendererContext) drives - and fills - * their dispatch tables from the compositor's own Turnip entry points. The standalone - * compositor build (no framegen tree) compiles framegen_engine_stub.c instead, which reports - * "engines not built in" and generates nothing. - * - * Every function runs on the compositor thread. - */ #include <stdint.h> #ifndef VK_USE_PLATFORM_ANDROID_KHR #define VK_USE_PLATFORM_ANDROID_KHR @@ -21,49 +10,27 @@ extern "C" { #endif -/* Probe the physical device and build the VkDeviceCreateInfo pNext chain the LSFG chain needs - * (vulkanMemoryModel + storage-image features; nothing for Win-FG). Returns the chain, or NULL - * when the device fails a gate. `ring_fmt` is the format the engines generate into; it must be - * storage-capable for either engine. */ const void *fge_probe(PFN_vkGetInstanceProcAddr gipa, VkInstance inst, VkPhysicalDevice pd, VkFormat ring_fmt); -/* The device exists; resolve device-level entry points. features_enabled = fge_probe's chain - * was accepted by vkCreateDevice. */ void fge_device_ready(PFN_vkGetInstanceProcAddr gipa, VkInstance inst, VkPhysicalDevice pd, VkDevice dev, VkQueue queue, uint32_t qfam, int features_enabled); -/* 1 when engine `kind` can run on this device (its capability gates pass). */ int fge_caps_ok(int kind); -/* Why the LSFG gates fail ("supported" when they pass); static string. */ const char *fge_caps_reason(void); -/* 1 when the engines can generate in `fmt` on this device (storage + linear sampling), beyond the - * ring format probed at fge_probe - the FP16 scene of HDR frames (vk_present.c). */ int fge_format_ok(VkFormat fmt); -/* Create engine `kind` (LSFG needs the cache path; Win-FG ignores it). 0 = ready, -1 = failed. - * Only one engine holds GPU resources at a time; a different kind replaces it. */ int fge_start(int kind, const char *cache_path); void fge_stop(void); -/* The engine came up but later found it cannot generate (chain build failed). */ int fge_unavailable(void); -/* target_fps > 0: LSFG picks 0..3 generations per frame to reach it (Win-FG ignores it). */ void fge_configure(uint32_t multiplier, uint32_t target_fps, float flow_scale, float refresh_hz, int model, int perf_preset); -/* Build/rebuild the chain for this extent; the guest extent for the flow pyramid is the same - * (the Wayland scene is the game's own size in fullscreen). 1 = chain valid. */ int fge_prepare(uint32_t w, uint32_t h, VkFormat fmt); -/* How many frames to generate for this source frame (0 until the history is valid). */ uint32_t fge_plan(uint32_t capacity, uint64_t source_frames, float presented_rate); -/* Take the scene image (GENERAL) as frame N and run the shared part of the chain. */ void fge_process(VkCommandBuffer cmd, VkImage source, uint32_t w, uint32_t h, uint32_t gens); -/* Synthesise generated frame g of `count` into a storage image (GENERAL). */ void fge_generate(VkCommandBuffer cmd, uint32_t g, uint32_t count, VkImage img, VkImageView view, uint32_t w, uint32_t h); -/* The generation targets were recreated: drop cached descriptors. */ void fge_forget_targets(void); -/* Engine-side telemetry: accepted generations, source rate (0 = engine has none), thermal. */ void fge_telemetry(float *accepted, float *source_rate, float *thermal); const char *fge_engine_name(int kind); -/* "lsfg-native"/"winfg-native" build provenance for the start log line. */ const char *fge_build_info(void); #ifdef __cplusplus diff --git a/app/src/main/cpp/waylandcomp/src/framegen_engine_stub.c b/app/src/main/cpp/waylandcomp/src/framegen_engine_stub.c index dd4144d3ef..b9c4dff363 100644 --- a/app/src/main/cpp/waylandcomp/src/framegen_engine_stub.c +++ b/app/src/main/cpp/waylandcomp/src/framegen_engine_stub.c @@ -1,5 +1,3 @@ -/* Stand-in for framegen_engine.cpp when the compositor is built on its own (standalone/, no - * framegen tree, no dxbc). Every engine is reported unavailable; nothing is generated. */ #include "framegen_engine.h" const void *fge_probe(PFN_vkGetInstanceProcAddr gipa, VkInstance inst, VkPhysicalDevice pd, diff --git a/app/src/main/cpp/waylandcomp/src/framegen_jni.c b/app/src/main/cpp/waylandcomp/src/framegen_jni.c index 8d5bad571a..ea5ce0396c 100644 --- a/app/src/main/cpp/waylandcomp/src/framegen_jni.c +++ b/app/src/main/cpp/waylandcomp/src/framegen_jni.c @@ -1,8 +1,3 @@ -/* JNI for frame generation on the Wayland backend (WaylandCompositor.nativeFrameGen* / - * nativeSet*FrameGen* / nativeSetLsfgCachePath / nativeSetWinFgTuning). Every call only stores - * a value in framegen_bridge.c; the compositor thread picks it up on its next frame, so these - * are safe from any thread and before the compositor is up (the app arms the engine from its - * launch code while the SurfaceView is still coming). */ #include <jni.h> #include "framegen_bridge.h" diff --git a/app/src/main/cpp/waylandcomp/src/hdr_compose.c b/app/src/main/cpp/waylandcomp/src/hdr_compose.c index 6f54d4e0cd..01d8be6f66 100644 --- a/app/src/main/cpp/waylandcomp/src/hdr_compose.c +++ b/app/src/main/cpp/waylandcomp/src/hdr_compose.c @@ -1,16 +1,10 @@ -/* HDR composition: the encode pass over the mixed scene - see hdr_compose.h. Compositor thread. */ #define _POSIX_C_SOURCE 200809L #include "hdr_compose.h" #include "vk_loader.h" -#include "vk_present.h" /* droiddeck_log, vkp_gpu_name */ +#include "vk_present.h" #include <stdio.h> #include <string.h> -/* SPIR-V, pre-compiled (glslangValidator -V hdr_encode.frag --vn hdr_encode_code) and committed next - * to the GLSL, like every other shader of the compositor: the NDK build compiles no shaders. The quad - * is the effect chain's upscale.vert (same bytes, from app/src/main/cpp/framegen). */ -/* The headers define plain (external) arrays and effects_chain.c includes upscale_vert.h too: this - * translation unit gets its own copy under another name, so the link sees no duplicate symbol. */ #define upscale_vert_code hdrc_upscale_vert_code #include "upscale_vert.h" #undef upscale_vert_code @@ -18,24 +12,20 @@ #define MIXED_FORMAT VK_FORMAT_A2B10G10R10_UNORM_PACK32 -struct pc_encode { float ndc[4]; float params[4]; float rects[HDRC_MAX_RECTS][4]; }; /* 128 bytes */ +struct pc_encode { float ndc[4]; float params[4]; float rects[HDRC_MAX_RECTS][4]; }; static VkDevice g_dev; -static int g_ready; /* 0 = not built, 1 = ok, -1 = unavailable (said once) */ +static int g_ready; static VkSampler g_sampler; static VkDescriptorSetLayout g_dsl; static VkPipelineLayout g_pl; static VkDescriptorPool g_dpool; static VkShaderModule g_vert, g_frag; -/* One render pass + pipeline per output format: the HDR picture is 10-bit, frame generation's scene - * 8-bit - or FP16 where the engine takes it (vk_present.c FG_HDR_FMT). */ #define NFMT 3 static struct { VkFormat fmt; VkRenderPass rp; VkPipeline pipe; } g_out[NFMT] = { {VK_FORMAT_A2B10G10R10_UNORM_PACK32}, {VK_FORMAT_R8G8B8A8_UNORM}, {VK_FORMAT_R16G16B16A16_SFLOAT}}; -/* The mixed image's view + descriptor, and each output image's view + framebuffer: kept while the - * image handle (and size) stays the same, rebuilt when vk_present re-creates the image. */ static struct { VkImage img; int w, h; VkImageView view; VkDescriptorSet ds; } g_src; #define NOUT 3 static struct { VkImage img; VkFormat fmt; int w, h; VkImageView view; VkFramebuffer fb; } g_dst[NOUT]; @@ -92,9 +82,6 @@ static VkShaderModule shader(const uint32_t *code, size_t size) { return m; } -/* The render pass: one colour target written whole (DONT_CARE), left in TRANSFER_DST_OPTIMAL for the - * effects chain / the copies that follow. The dependencies order it after whoever read or wrote the - * target last (last frame's blit or chain) and before whoever samples, blits or copies it next. */ static VkRenderPass make_rp(VkFormat fmt) { VkAttachmentDescription att = {.format = fmt, .samples = VK_SAMPLE_COUNT_1_BIT, .loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE, .storeOp = VK_ATTACHMENT_STORE_OP_STORE, @@ -261,7 +248,6 @@ int hdrc_encode(VkCommandBuffer cmd, VkImage mixed, VkImage out, VkFormat out_fm VkFramebuffer fb = dst_ensure(out, out_fmt, w, h, g_out[slot].rp); if (!fb) return -1; - /* The composite blits wrote the mixed image; the pass samples it. */ VkImageMemoryBarrier b = {.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, .newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, diff --git a/app/src/main/cpp/waylandcomp/src/hdr_compose.h b/app/src/main/cpp/waylandcomp/src/hdr_compose.h index cfeef74972..5a37d42ad8 100644 --- a/app/src/main/cpp/waylandcomp/src/hdr_compose.h +++ b/app/src/main/cpp/waylandcomp/src/hdr_compose.h @@ -1,22 +1,5 @@ #ifndef HDR_COMPOSE_H #define HDR_COMPOSE_H -/* - * HDR composition (round 2 of HDR_RECON.md's Phase B): when an HDR game cannot be alone on its own - * display layer - screen effects on, frame generation on, a window above it on a display that cannot - * compose a second layer, a windowed game, a frame without a gralloc buffer - the whole scene is put - * into ONE encoding instead of being blitted into an 8-bit sRGB target as it stands (which shows the - * game's PQ frames washed out). - * - * vk_present.c blits every draw 1:1 into a 10-bit "mixed" image (each pixel still in its own - * encoding) and hdrc_encode() runs hdr_encode.frag over it into the output image: - * HDRC_OUT_PQ - PQ BT.2020 (SDR pixels placed at the SDR reference white): goes onto the game's - * display layer tagged BT2020_PQ (sc_layer.c), or into an HDR10 swapchain; - * HDRC_OUT_SDR - sRGB BT.709 with the HDR pixels tone-mapped: for a present that cannot carry HDR. - * Which encoding a pixel is in comes from the draws' rectangles (the topmost draw decides). - * - * Compositor thread. Objects are built lazily on the first use; if the driver refuses them, the - * encode is unavailable for the session (logged once) and the caller falls back. - */ #define VK_USE_PLATFORM_ANDROID_KHR #include <vulkan/vulkan.h> @@ -26,26 +9,17 @@ enum hdrc_mode { HDRC_OUT_PQ = 0, HDRC_OUT_SDR = 1 }; struct hdrc_params { enum hdrc_mode mode; - float sdr_white_nits; /* SDR reference white inside the HDR picture (203) */ - float peak_nits; /* HDR content peak for the tone-map (max CLL / mastering max, else 1000) */ - int count; /* rects, top draw first */ - unsigned hdr_mask; /* bit i: rects[i] is an HDR draw */ - float rects[HDRC_MAX_RECTS][4]; /* scene pixels x0, y0, x1, y1 */ + float sdr_white_nits; + float peak_nits; + int count; + unsigned hdr_mask; + float rects[HDRC_MAX_RECTS][4]; }; -/* Called from dev_init (device up). */ void hdrc_bind_device(VkDevice dev, const VkPhysicalDeviceMemoryProperties *memprops); -/* Device teardown. */ void hdrc_destroy(void); -/* vk_present is about to destroy `img` (a resize of the mixed / scene / picture image): drop the view, - * descriptor and framebuffer cached for it, so a later image that happens to reuse the handle value is - * never drawn through a view of the destroyed one. */ void hdrc_forget_image(VkImage img); -/* Record the encode: `mixed` (w x h, VK_FORMAT_A2B10G10R10_UNORM_PACK32, in TRANSFER_DST_OPTIMAL after - * the composite blits) -> `out` (w x h, out_fmt, created with COLOR_ATTACHMENT + SAMPLED usage), which - * is left in TRANSFER_DST_OPTIMAL - the layout vkp_effects_run() takes its scene in. 0 = recorded, - * -1 = unavailable (nothing recorded; `mixed` untouched). */ int hdrc_encode(VkCommandBuffer cmd, VkImage mixed, VkImage out, VkFormat out_fmt, int w, int h, const struct hdrc_params *p); diff --git a/app/src/main/cpp/waylandcomp/src/hdr_encode.frag b/app/src/main/cpp/waylandcomp/src/hdr_encode.frag index 4b75ed5861..db3ea8bcaf 100644 --- a/app/src/main/cpp/waylandcomp/src/hdr_encode.frag +++ b/app/src/main/cpp/waylandcomp/src/hdr_encode.frag @@ -1,38 +1,12 @@ #version 450 -// ============================================================================= -// HDR composition: one encoding for the whole scene (waylandcomp/src/hdr_compose.c). -// -// The compositor composes with blits, which copy values and know nothing about what they mean. -// When an HDR game (PQ-encoded BT.2020 frames) shares the scene with SDR content (sRGB windows, the -// desktop, a window above the game), every draw is first blitted 1:1 into a 10-bit "mixed" image - -// each pixel still in its own encoding - and this pass turns the mixed image into ONE encoding: -// -// mode 0 (HDR out, PQ BT.2020): HDR pixels pass through; SDR pixels are decoded (sRGB), -// converted BT.709 -> BT.2020 and placed at the SDR reference white (params.x nits, -// 203 = Report ITU-R BT.2408), then PQ-encoded. -// mode 1 (SDR out, sRGB): SDR pixels pass through; HDR pixels are PQ-decoded, converted -// BT.2020 -> BT.709, tone-mapped relative to the SDR reference white (linear below a -// knee, a smooth roll-off above it that puts the content's peak, params.y nits, at 98 %) -// and sRGB-encoded - what a display that cannot take HDR gets instead of washed-out PQ. -// -// Which encoding a pixel is in: the topmost draw covering it decides. params.w packs the number of -// rects (count, 0..6) and a bitmask of which of them are HDR (count + 16 * mask); rects are scene -// pixels (x0, y0, x1, y1), TOP draw first, listed down to the lowest HDR draw (everything below -// that is SDR, and so is any pixel no listed rect covers). -// -// Conventions match upscale.vert / the effect passes: combined-image-sampler at binding 0, the -// push-constant block leads with vec4 ndc (offset 0). The target is exactly scene-sized, so -// gl_FragCoord is the scene pixel and texelFetch reads the mixed image 1:1 (no filtering). -// Float-only mask arithmetic (no bitwise ops). -// ============================================================================= layout(binding = 0) uniform sampler2D Mixed; layout(push_constant) uniform PC { - vec4 ndc; // upscale.vert's quad - vec4 params; // x = SDR white nits, y = HDR content peak nits (mode 1), z = mode, w = count + 16 * mask - vec4 rects[6]; // top-first scene rects + vec4 ndc; + vec4 params; + vec4 rects[6]; } pc; layout(location = 0) in vec2 fragTexCoord; @@ -44,7 +18,6 @@ const float PQ_C1 = 0.8359375; const float PQ_C2 = 18.8515625; const float PQ_C3 = 18.6875; -// Column-major: each group of three is one COLUMN (the coefficients of R, then of G, then of B). const mat3 BT709_TO_BT2020 = mat3(0.6274, 0.0691, 0.0164, 0.3293, 0.9195, 0.0880, 0.0433, 0.0114, 0.8956); @@ -64,25 +37,21 @@ vec3 linearToSrgb(vec3 c) { return mix(lo, hi, step(vec3(0.0031308), c)); } -// PQ code (0..1) -> luminance / 10000 cd/m2 (SMPTE ST 2084 EOTF). vec3 pqToLinear(vec3 e) { vec3 p = pow(clamp(e, 0.0, 1.0), vec3(1.0 / PQ_M2)); return pow(max(p - PQ_C1, 0.0) / max(PQ_C2 - PQ_C3 * p, 1e-6), vec3(1.0 / PQ_M1)); } -// luminance / 10000 cd/m2 -> PQ code (inverse EOTF). vec3 linearToPq(vec3 y) { vec3 p = pow(clamp(y, 0.0, 1.0), vec3(PQ_M1)); return pow((PQ_C1 + PQ_C2 * p) / (1.0 + PQ_C3 * p), vec3(PQ_M2)); } -// Tone curve in units of SDR white: identity up to the knee, then an exponential roll-off towards 1 -// whose rate puts `peak` (also in SDR-white units) at 98 % of the range. float toneCurve(float x, float peak) { const float knee = 0.8; if (x <= knee) return x; float span = max(peak - knee, 0.05); - float rate = max(span / 3.912, 1.0 - knee); // ln(50) = 3.912; never steeper than the identity + float rate = max(span / 3.912, 1.0 - knee); return knee + (1.0 - knee) * (1.0 - exp(-(x - knee) / rate)); } @@ -107,7 +76,6 @@ void main() { float sdrWhite = max(pc.params.x, 1.0); vec3 outc; if (pc.params.z < 0.5) { - // HDR out: PQ BT.2020. if (hdr) { outc = c; } else { @@ -115,7 +83,6 @@ void main() { outc = linearToPq(nits / 10000.0); } } else { - // SDR out: sRGB BT.709, HDR tone-mapped. if (!hdr) { outc = c; } else { diff --git a/app/src/main/cpp/waylandcomp/src/hdr_encode_frag.h b/app/src/main/cpp/waylandcomp/src/hdr_encode_frag.h index eb1536f1f3..ba52146fc7 100644 --- a/app/src/main/cpp/waylandcomp/src/hdr_encode_frag.h +++ b/app/src/main/cpp/waylandcomp/src/hdr_encode_frag.h @@ -1,4 +1,3 @@ - // 1116.5.0 #pragma once const uint32_t hdr_encode_code[] = { 0x07230203,0x00010000,0x0008000b,0x0000018e,0x00000000,0x00020011,0x00000001,0x0006000b, diff --git a/app/src/main/cpp/waylandcomp/src/headpose_shm.h b/app/src/main/cpp/waylandcomp/src/headpose_shm.h new file mode 100644 index 0000000000..824232b431 --- /dev/null +++ b/app/src/main/cpp/waylandcomp/src/headpose_shm.h @@ -0,0 +1,38 @@ +#ifndef HEADPOSE_SHM_H +#define HEADPOSE_SHM_H +#include <stdint.h> + +#define DROIDDECK_HEADPOSE_MAGIC 0x50484444u +#define DROIDDECK_HEADPOSE_VERSION 1u +#define DROIDDECK_HEADPOSE_FILE "droiddeck-headpose" + +enum { + DROIDDECK_HEADPOSE_LIVE = 1u << 0, + DROIDDECK_HEADPOSE_ENABLED = 1u << 1, + DROIDDECK_HEADPOSE_MONO = 1u << 2, +}; + +struct droiddeck_headpose { + uint32_t magic; + uint32_t version; + uint32_t seq; + uint32_t flags; + float rot[9]; + float ipd_m; + int64_t time_ns; + float tan_half_fov; + float eye_aspect; + uint32_t eye_w, eye_h; + float display_hz; + // Uses a formerly reserved word; older publishers leave this zero. + uint32_t render_height; + uint32_t reserved[10]; +}; + +#ifdef __cplusplus +static_assert(sizeof(struct droiddeck_headpose) == 128, "headpose layout"); +#else +_Static_assert(sizeof(struct droiddeck_headpose) == 128, "headpose layout"); +#endif + +#endif diff --git a/app/src/main/cpp/waylandcomp/src/quest_device.h b/app/src/main/cpp/waylandcomp/src/quest_device.h new file mode 100644 index 0000000000..ee9c37b10a --- /dev/null +++ b/app/src/main/cpp/waylandcomp/src/quest_device.h @@ -0,0 +1,13 @@ +#ifndef DROIDDECK_QUEST_DEVICE_H +#define DROIDDECK_QUEST_DEVICE_H +#include <string.h> +#include <strings.h> + +/* Presentation only; this does not select a GPU driver or expand driver support. */ +static inline int quest_device_matches(const char *model, const char *device, const char *maker) { + return !strcasecmp(model, "Quest 2") || !strcasecmp(model, "Quest 3") || + !strcasecmp(model, "Quest 3S") || + ((!strcasecmp(maker, "Oculus") || !strcasecmp(maker, "Meta")) && + (!strcmp(device, "hollywood") || !strcmp(device, "eureka") || !strcmp(device, "panther"))); +} +#endif diff --git a/app/src/main/cpp/waylandcomp/src/sc_layer.c b/app/src/main/cpp/waylandcomp/src/sc_layer.c index 3f44a6be8f..f9d203ba1d 100644 --- a/app/src/main/cpp/waylandcomp/src/sc_layer.c +++ b/app/src/main/cpp/waylandcomp/src/sc_layer.c @@ -1,7 +1,3 @@ -/* Layer mode: the scene on a small set of ASurfaceControl layers - see sc_layer.h and - * ZERO_COPY_SPIKE.md. The ASurfaceControl/ASurfaceTransaction API is dlsym'd from libandroid.so - * (API 29+), the same way the X11 renderers' scanout code does it, so the library still loads on - * older devices and the prototype stays off every other path. */ #define _GNU_SOURCE #include "sc_layer.h" #include "ahb_swapchain.h" @@ -25,25 +21,21 @@ #define FOURCC(a, b, c, d) \ ((uint32_t)(a) | ((uint32_t)(b) << 8) | ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24)) -#define DRM_ABGR8888 FOURCC('A', 'B', '2', '4') /* R,G,B,A in memory = AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM */ -#define DRM_ABGR2101010 FOURCC('A', 'B', '3', '0') /* = AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM (VK A2B10G10R10) */ +#define DRM_ABGR8888 FOURCC('A', 'B', '2', '4') +#define DRM_ABGR2101010 FOURCC('A', 'B', '3', '0') #define AHB_RGBA8 AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM #define AHB_RGB10A2 AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM #define MOD_LINEAR 0ULL -#define MOD_QCOM_COMPRESSED 0x0500000000000001ULL /* DRM_FORMAT_MOD_QCOM_COMPRESSED (UBWC) */ +#define MOD_QCOM_COMPRESSED 0x0500000000000001ULL -/* The gralloc buffer handle behind an AHardwareBuffer (AOSP cutils/native_handle.h, which the NDK - * does not ship; the layout is a stable ABI: fds first, then ints). */ struct droiddeck_native_handle { int version; int numFds; int numInts; int data[]; }; -/* ---- libandroid SurfaceControl API (dlsym) ---------------------------------------------------- */ typedef struct ASurfaceControl ASurfaceControl; typedef struct ASurfaceTransaction ASurfaceTransaction; typedef struct ASurfaceTransactionStats ASurfaceTransactionStats; typedef void (*sc_complete_fn)(void *context, ASurfaceTransactionStats *stats); -/* <android/hdr_metadata.h> (NDK, API 29), declared here like the rest of this table: stable ABI. */ struct droiddeck_color_xy { float x, y; }; struct droiddeck_hdr_smpte2086 { struct droiddeck_color_xy displayPrimaryRed, displayPrimaryGreen, displayPrimaryBlue, whitePoint; @@ -65,22 +57,14 @@ static struct { void (*reparent)(ASurfaceTransaction *, ASurfaceControl *, ASurfaceControl *); void (*setOnComplete)(ASurfaceTransaction *, void *, sc_complete_fn); int (*prevReleaseFence)(ASurfaceTransactionStats *, ASurfaceControl *); - /* Display frame-rate vote for the layer (API 30 / 31). Optional: absent on older Android, where - * the layer simply carries no vote and the app's surface vote is all there is. */ void (*setFrameRate)(ASurfaceTransaction *, ASurfaceControl *, float, int8_t); void (*setFrameRateStrategy)(ASurfaceTransaction *, ASurfaceControl *, float, int8_t, int8_t); - /* Colour (API 29), optional: only an HDR session ever calls them (droiddeck_color.h's gate needs - * setBufferDataSpace; the metadata calls are sent when present). */ void (*setBufferDataSpace)(ASurfaceTransaction *, ASurfaceControl *, int32_t); void (*setHdrMetadata_smpte2086)(ASurfaceTransaction *, ASurfaceControl *, const struct droiddeck_hdr_smpte2086 *); void (*setHdrMetadata_cta861_3)(ASurfaceTransaction *, ASurfaceControl *, const struct droiddeck_hdr_cta861_3 *); - /* Not in the public NDK headers (vndk/hardware_buffer.h) but exported by libnativewindow.so on - * every device; Mesa's Android WSI calls it for every gralloc buffer it imports. */ const void *(*getNativeHandle)(const AHardwareBuffer *); - /* API 35: the HDR headroom this layer asks the display for (0 = no preference). Round 2e asks - * explicitly for every PQ layer - some phones only boost HDR when a layer asks. */ void (*setDesiredHdrHeadroom)(ASurfaceTransaction *, ASurfaceControl *, float); - int state; /* 0 = untried, 1 = loaded, -1 = unavailable */ + int state; } api; #define ASC_VISIBILITY_HIDE 0 @@ -132,84 +116,77 @@ static int load_api(void) { return 0; } -/* ---- display frame-rate vote (VRR / refresh-rate matching) ------------------------------------ */ -/* The app votes a panel cadence with Surface.setFrameRate on the compositor's SurfaceView, but a - * zero-copy game's frames never touch that surface - they go straight onto the GAME layer - so - * SurfaceFlinger needs the same vote there or the layer's cadence is invisible to it. The vote - * belongs to the layer the game is actually presenting on and to no other: the overlay layer - * carries a window that updates on its own (slow) schedule and is explicitly voted 0, so it never - * drags the panel. The rate is set from the app thread and applied on the compositor thread with - * the next transaction, so no transaction is ever created off-thread. 0 = no vote (panel free). */ -#define ASC_FRAME_RATE_COMPAT_DEFAULT 0 /* == ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT */ -#define ASC_CHANGE_FRAME_RATE_ALWAYS 1 /* == ANATIVEWINDOW_CHANGE_FRAME_RATE_ALWAYS */ -static _Atomic float g_fps_want; /* what the app asked for (the game's cadence) */ + + + + + + + +#define ASC_FRAME_RATE_COMPAT_DEFAULT 0 +#define ASC_CHANGE_FRAME_RATE_ALWAYS 1 + +static _Atomic float g_fps_want; void sc_layer_set_frame_rate(float fps) { atomic_store(&g_fps_want, fps > 0.0f ? fps : 0.0f); } -/* ---- the layers and their buffer pools -------------------------------------------------------- */ -/* Five for the game layer: one on screen, one queued, and the ones SurfaceFlinger has not reported - * back yet (its OnComplete for a transaction arrives only after the NEXT frame is presented), with - * room to spare, so a free buffer is nearly always one the display already let go of. With three, - * a late callback left none free ("no free layer buffer … frame dropped"). */ #define POOL_MAX 5 struct slot { AHardwareBuffer *ahb; - struct vkp_image *img; /* the AHB imported into the compositor's Turnip as a blit target */ + struct vkp_image *img; int w, h; - uint32_t fmt; /* AHARDWAREBUFFER_FORMAT_*: RGBA8888, or RGBA1010102 for an HDR picture */ - int release_fd; /* SurfaceFlinger's release fence: signals when it stopped reading; -1 = none */ - int busy; /* set on the layer, or still referenced by SurfaceFlinger */ + uint32_t fmt; + int release_fd; + int busy; }; -/* One Android display layer: its SurfaceControl, its own buffer pool and its own lifetime. The - * z-order is fixed by the id (game below, overlay above); nothing is ever re-ordered at runtime. */ struct layer { const char *name; int32_t z; - int pool_n; /* buffers in this layer's pool (the game cycles more) */ + int pool_n; struct slot slots[POOL_MAX]; ASurfaceControl *sc; - ANativeWindow *win; /* the output window sc was created on */ + ANativeWindow *win; int shown; - int cur_slot; /* pool slot of the buffer on the layer, -1 = none / not ours */ - void *cur_token; /* zero-copy: the game's buffer on the layer (NULL = a pool slot) */ + int cur_slot; + void *cur_token; ARect geo_src, geo_dst; int geo_valid; - int alloc_tier; /* how pool buffers are asked of gralloc (TIER_*), lowered on failure */ + int alloc_tier; uint64_t pool_modifier; int first_logged; int64_t drop_logged_ns; - unsigned drops_unlogged; /* frames dropped since the last "no free layer buffer" line */ - /* The last pool layout written to the log, so a line is written per change, not per buffer. */ + unsigned drops_unlogged; + int logged_w, logged_h, logged_tier; uint32_t logged_fmt; uint64_t logged_mod; - int votes_rate; /* 1: this layer carries the game's cadence (the game layer) */ - float fps_applied; /* the vote the live SurfaceControl already carries (-1 = none yet) */ - int recreate_pending; /* composition recovery: swap this layer's SurfaceControl for a fresh - * one inside the next frame's transaction (see swap_sc_begin) */ - int32_t ds_applied; /* dataspace the live SurfaceControl carries; -1 = never set on it - * (untouched, today's UNKNOWN), see apply_colour */ - uint32_t md_applied; /* identity of the image description whose metadata it carries, 0 = none */ - float hr_applied; /* desired HDR headroom the live SurfaceControl carries; < 0 = never set */ + int votes_rate; + float fps_applied; + int recreate_pending; + + int32_t ds_applied; + + uint32_t md_applied; + float hr_applied; }; static struct layer g_layers[SC_LAYER_COUNT]; static void apply_frame_rate(ASurfaceTransaction *tx, struct layer *l); static void coverage_text(const struct layer *l, char *out, size_t n); static int g_layers_ready; -static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; /* pools + callback state */ -static int g_pending_cb; /* OnComplete callbacks not yet delivered */ -static unsigned g_stat_layer_frames; /* frames put on a layer through our own buffers */ +static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; +static int g_pending_cb; +static unsigned g_stat_layer_frames; static int g_two_logged; -/* A small buffer set on a layer when it is hidden or retired, so SurfaceFlinger replaces (and - * releases, with a fence) the game's buffer instead of holding it while the layer is invisible. */ static AHardwareBuffer *g_blank; +static ASurfaceControl *g_base_sc; +static int g_base_w, g_base_h, g_base_shown; static void layers_init(void) { if (g_layers_ready) return; @@ -231,10 +208,10 @@ static struct layer *layer_of(int id) { struct complete_ctx { ASurfaceControl *sc; - int layer; /* which layer's pool prev_slot belongs to */ - int prev_slot; /* pool buffer this transaction replaced: free once its release fence is known */ - void *prev_token; /* or the game's buffer it replaced: ahb_swapchain gets its release fence */ - int retire; /* release sc after this transaction (hide + reparent) */ + int layer; + int prev_slot; + void *prev_token; + int retire; }; static int64_t now_ns(void) { @@ -242,7 +219,6 @@ static int64_t now_ns(void) { return (int64_t)ts.tv_sec * 1000000000LL + ts.tv_nsec; } -/* Binder thread. */ static void on_complete(void *context, ASurfaceTransactionStats *stats) { struct complete_ctx *ctx = context; pthread_mutex_lock(&g_lock); @@ -257,15 +233,12 @@ static void on_complete(void *context, ASurfaceTransactionStats *stats) { pthread_mutex_unlock(&g_lock); if (ctx->prev_token) { int fd = (stats && ctx->sc) ? api.prevReleaseFence(stats, ctx->sc) : -1; - ahb_swapchain_layer_released(ctx->prev_token, fd); /* takes the fd */ + ahb_swapchain_layer_released(ctx->prev_token, fd); } if (ctx->retire && ctx->sc) api.release(ctx->sc); free(ctx); } -/* `sc` is the SurfaceControl the REPLACED buffer sits on, which is not always l->sc: during a - * composition-recovery swap the outgoing buffer belongs to the old SurfaceControl, and both its - * release fence and its release must be taken from that one. */ static int add_complete_on(ASurfaceTransaction *tx, struct layer *l, ASurfaceControl *sc, int prev_slot, void *prev_token, int retire) { struct complete_ctx *ctx = calloc(1, sizeof(*ctx)); @@ -283,7 +256,6 @@ static int add_complete(ASurfaceTransaction *tx, struct layer *l, int prev_slot, return add_complete_on(tx, l, l->sc, prev_slot, prev_token, retire); } -/* The stand-in buffer for a hidden/retired layer (allocated once, black, shared by both layers). */ static AHardwareBuffer *blank_buffer(void) { if (g_blank) return g_blank; AHardwareBuffer_Desc d = { @@ -292,23 +264,63 @@ static AHardwareBuffer *blank_buffer(void) { AHARDWAREBUFFER_USAGE_CPU_WRITE_RARELY}; if (AHardwareBuffer_allocate(&d, &g_blank) != 0 || !g_blank) { g_blank = NULL; return NULL; } void *p = NULL; - if (AHardwareBuffer_lock(g_blank, AHARDWAREBUFFER_USAGE_CPU_WRITE_RARELY, -1, NULL, &p) == 0 && p) { - AHardwareBuffer_Desc got; AHardwareBuffer_describe(g_blank, &got); - memset(p, 0, (size_t)got.stride * 4 * 16); - AHardwareBuffer_unlock(g_blank, NULL); + int locked = AHardwareBuffer_lock(g_blank, AHARDWAREBUFFER_USAGE_CPU_WRITE_RARELY, -1, NULL, &p); + if (locked != 0 || !p) { + if (locked == 0) AHardwareBuffer_unlock(g_blank, NULL); + AHardwareBuffer_release(g_blank); g_blank = NULL; + return NULL; + } + AHardwareBuffer_Desc got; AHardwareBuffer_describe(g_blank, &got); + memset(p, 0, (size_t)got.stride * 4 * got.height); + if (AHardwareBuffer_unlock(g_blank, NULL) != 0) { + AHardwareBuffer_release(g_blank); g_blank = NULL; + return NULL; } return g_blank; } -/* Take the current buffer (pool slot or the game's) off the layer by putting the blank one on it, - * so SurfaceFlinger releases it with a fence through this transaction's callback. */ +int sc_layer_base_black(int width, int height) { + if (width <= 0 || height <= 0 || load_api() != 0 || !vkp_window()) return -1; + if (g_base_sc && g_base_shown && width == g_base_w && height == g_base_h) return 0; + AHardwareBuffer *black = blank_buffer(); + if (!black) return -1; + if (!g_base_sc) g_base_sc = api.createFromWindow(vkp_window(), "droiddeck_wayland_black"); + if (!g_base_sc) return -1; + ASurfaceTransaction *tx = api.txCreate(); + if (!tx) return -1; + ARect src = {0, 0, 16, 16}, dst = {0, 0, width, height}; + api.setBuffer(tx, g_base_sc, black, -1); + api.setBufferTransparency(tx, g_base_sc, ASC_TRANSPARENCY_OPAQUE); + api.setZOrder(tx, g_base_sc, 0); /* GAME = 1, OVERLAY = 2 */ + api.setGeometry(tx, g_base_sc, &src, &dst, 0); + api.setVisibility(tx, g_base_sc, ASC_VISIBILITY_SHOW); + api.txApply(tx); api.txDelete(tx); + g_base_w = width; g_base_h = height; g_base_shown = 1; + return 0; +} + +static void base_hide(int retire) { + if (!g_base_sc) return; + ASurfaceTransaction *tx = api.txCreate(); + if (tx) { + api.setVisibility(tx, g_base_sc, ASC_VISIBILITY_HIDE); + if (retire) api.reparent(tx, g_base_sc, NULL); + api.txApply(tx); api.txDelete(tx); + g_base_shown = 0; + } + if (retire) { + api.release(g_base_sc); g_base_sc = NULL; + g_base_w = g_base_h = g_base_shown = 0; + } +} + +void sc_layer_hide_base(void) { base_hide(0); } + static void replace_with_blank(ASurfaceTransaction *tx, struct layer *l) { AHardwareBuffer *b = blank_buffer(); if (b) api.setBuffer(tx, l->sc, b, -1); } -/* Everything a SurfaceControl needs on its way out, as transaction ops: give the buffer back (so - * SurfaceFlinger releases the game's, with a fence), hide it, unparent it. */ static void retire_ops(ASurfaceTransaction *tx, ASurfaceControl *sc) { AHardwareBuffer *b = blank_buffer(); if (b) api.setBuffer(tx, sc, b, -1); @@ -316,8 +328,6 @@ static void retire_ops(ASurfaceTransaction *tx, ASurfaceControl *sc) { api.reparent(tx, sc, NULL); } -/* Hide + detach one layer; the SurfaceControl is released from the transaction's callback (the - * buffer on it stays referenced by SurfaceFlinger until then). */ static void retire_sc(struct layer *l) { if (!l->sc) return; ASurfaceTransaction *tx = api.txCreate(); @@ -333,13 +343,11 @@ static void retire_sc(struct layer *l) { droiddeck_log("layer", "%s: SurfaceControl retired (window %p)", l->name, (void *)l->win); l->sc = NULL; l->win = NULL; l->shown = 0; l->cur_slot = -1; l->cur_token = NULL; l->geo_valid = 0; - l->fps_applied = -1.0f; /* the next SurfaceControl carries no vote until it is re-applied */ - l->recreate_pending = 0; /* a fresh SurfaceControl is coming anyway */ - l->ds_applied = -1; l->md_applied = 0; l->hr_applied = -1.0f; /* ...and no colour tag either */ + l->fps_applied = -1.0f; + l->recreate_pending = 0; + l->ds_applied = -1; l->md_applied = 0; l->hr_applied = -1.0f; } -/* Wait (bounded) for SurfaceFlinger to finish with every pool buffer of every layer, then free - * the pools. */ static void drain_and_free_pools(void) { int64_t deadline = now_ns() + 300000000LL; for (;;) { @@ -360,14 +368,11 @@ static void drain_and_free_pools(void) { s->release_fd = -1; } g_layers[i].first_logged = 0; - g_layers[i].logged_w = g_layers[i].logged_h = 0; /* the next pool's layout is logged again */ + g_layers[i].logged_w = g_layers[i].logged_h = 0; } pthread_mutex_unlock(&g_lock); } -/* Native-handle sniff, the same one Mesa's u_gralloc fallback uses (u_gralloc_fallback.c): a QTI - * gralloc private_handle_t carries the magic 'gmsm' as its first int and the UBWC flag - * (PRIV_FLAGS_UBWC_ALIGNED, 0x08000000) in the next one. Returns 0 when the layout is unknown. */ static int sniff_modifier(const struct droiddeck_native_handle *h, uint64_t *mod) { const uint32_t gmsm = ('g' << 24) | ('m' << 16) | ('s' << 8) | 'm'; if (!h || h->numFds < 1 || h->numInts < 2) return 0; @@ -376,18 +381,10 @@ static int sniff_modifier(const struct droiddeck_native_handle *h, uint64_t *mod return 1; } -static int g_alloc_failed; /* set by alloc_slot when gralloc or the import refused a buffer */ +static int g_alloc_failed; -/* How a layer's pool buffers are asked of gralloc, best first; a layer only ever moves down. - * TIER_UBWC GPU render target + sampled + composer overlay + AHARDWAREBUFFER_USAGE_VENDOR_0 (bit 28): - * QTI gralloc's GRALLOC_USAGE_PRIVATE_ALLOC_UBWC. Without it QTI gralloc allocates LINEAR even - * for a GPU render target (gr_allocator.cpp IsUBwcEnabled: an explicit UBWC format, the - * private UBWC bit or CLIENT_TARGET, and no CPU bit). Whether gralloc really compressed the - * buffer is read back from its handle (sniff_modifier), never assumed. - * TIER_PLAIN the same without the vendor bit (a gralloc that refuses unknown bits; what we asked before). - * TIER_LINEAR plus a CPU bit, so the layout is known to be linear even when the handle is unreadable. */ enum { TIER_UBWC, TIER_PLAIN, TIER_LINEAR }; -#define DROIDDECK_AHB_USAGE_VENDOR_UBWC (1ULL << 28) /* AHARDWAREBUFFER_USAGE_VENDOR_0 */ +#define DROIDDECK_AHB_USAGE_VENDOR_UBWC (1ULL << 28) static const char *tier_name(int tier) { return tier == TIER_UBWC ? "asked for UBWC" : tier == TIER_PLAIN ? "no UBWC request" : "linear by request (CPU bit)"; @@ -400,8 +397,6 @@ static int alloc_slot(struct layer *l, struct slot *s, int w, int h, uint32_t fm AHardwareBuffer_Desc d = { .width = (uint32_t)w, .height = (uint32_t)h, .layers = 1, .format = fmt, - /* GPU render target (the blit writes it) + sampled (SurfaceFlinger's GPU fallback reads it) + - * composer overlay (the display scans it out). See the tiers above for the rest. */ .usage = AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT | AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE | AHARDWAREBUFFER_USAGE_COMPOSER_OVERLAY | (tier == TIER_UBWC ? DROIDDECK_AHB_USAGE_VENDOR_UBWC : 0) | @@ -422,8 +417,6 @@ static int alloc_slot(struct layer *l, struct slot *s, int w, int h, uint32_t fm const struct droiddeck_native_handle *nh = api.getNativeHandle(ahb); uint64_t mod = MOD_LINEAR; if (!sniff_modifier(nh, &mod)) { - /* Not a handle we can read: the only layout we can assume is linear, and only if the buffer - * was asked for with a CPU bit (gralloc must not have compressed it). */ if (tier < TIER_LINEAR) { AHardwareBuffer_release(ahb); l->alloc_tier = TIER_LINEAR; @@ -434,8 +427,6 @@ static int alloc_slot(struct layer *l, struct slot *s, int w, int h, uint32_t fm mod = MOD_LINEAR; } int fd = (nh && nh->numFds > 0) ? nh->data[0] : -1; - /* The test create: vkp_image_import_dmabuf creates the image with gralloc's explicit layout, so a - * layout the compositor's Turnip refuses falls back a tier instead of drawing garbage. */ struct vkp_image *img = fd >= 0 ? vkp_image_import_dmabuf(fd, fmt == AHB_RGB10A2 ? DRM_ABGR2101010 : DRM_ABGR8888, mod, w, h, got.stride * 4, 0, 1) : NULL; if (!img) { @@ -462,7 +453,6 @@ static int alloc_slot(struct layer *l, struct slot *s, int w, int h, uint32_t fm return -1; } -/* 1 when a sync_file has signalled (the display has stopped reading that buffer). */ static int fence_signalled(int fd) { struct pollfd p = {.fd = fd, .events = POLLIN}; int r; @@ -470,12 +460,6 @@ static int fence_signalled(int fd) { return r > 0; } -/* A slot SurfaceFlinger has handed back, holding a w x h buffer of AHB format fmt. -1 = none free (or - * the buffer could not be made). A free slot whose release fence has already signalled is preferred; - * otherwise the fence of the first free one is handed back in *wait_fd for the copy to wait on ON THE - * GPU (vkp_blit_image / vkp_pass_copy_to consume it), so the compositor thread no longer blocks here. - * Only a driver without VK_KHR_external_semaphore_fd still waits on the CPU, bounded, as before. - * *wait_fd is -1 whenever nothing needs waiting for (and on every failure). */ static int take_free_slot(struct layer *l, int w, int h, uint32_t fmt, int *wait_fd) { int idx = -1, pending = -1, fd = -1; *wait_fd = -1; @@ -493,8 +477,6 @@ static int take_free_slot(struct layer *l, int w, int h, uint32_t fmt, int *wait if (fd >= 0 && fence_signalled(fd)) { close(fd); fd = -1; } struct slot *s = &l->slots[idx]; if (s->ahb && (s->w != w || s->h != h || s->fmt != fmt)) { - /* Size or format change: this slot is free, so it can be replaced at once (the display keeps its - * own reference to the old buffer for as long as it reads it; the new one needs no wait). */ if (fd >= 0) { close(fd); fd = -1; } vkp_image_destroy(s->img); AHardwareBuffer_release(s->ahb); memset(s, 0, sizeof(*s)); s->release_fd = -1; @@ -504,7 +486,6 @@ static int take_free_slot(struct layer *l, int w, int h, uint32_t fmt, int *wait int r; do { r = poll(&p, 1, 100); } while (r < 0 && errno == EINTR); if (r == 0) { - /* Still read by the display: keep its fence with it (the next use waits again), drop this frame. */ pthread_mutex_lock(&g_lock); if (s->release_fd < 0) s->release_fd = fd; else close(fd); pthread_mutex_unlock(&g_lock); @@ -521,7 +502,6 @@ static int take_free_slot(struct layer *l, int w, int h, uint32_t fmt, int *wait return idx; } -/* ---- public --------------------------------------------------------------------------------- */ int sc_layer_available(void) { return load_api() == 0; } @@ -529,8 +509,8 @@ void sc_layer_probe_dmabuf_fd(int fd) { static int done; if (done || fd < 0) return; done = 1; - struct { uint32_t flags; int32_t fd; } exp = {.flags = 1u /* DMA_BUF_SYNC_READ */, .fd = -1}; - /* DMA_BUF_IOCTL_EXPORT_SYNC_FILE = _IOWR('b', 2, struct dma_buf_export_sync_file) */ + struct { uint32_t flags; int32_t fd; } exp = {.flags = 1u , .fd = -1}; + if (ioctl(fd, _IOWR('b', 2, exp), &exp) == 0) { droiddeck_log("layer", "kernel exports sync_file fences from the game's dma-buf: zero-copy acquire fences can come from the buffer itself"); if (exp.fd >= 0) close(exp.fd); @@ -540,8 +520,6 @@ void sc_layer_probe_dmabuf_fd(int fd) { } } -/* One layer's SurfaceControl on the current output window (created on first use, re-created after - * a window change). -1 = no window / no API. */ static int ensure_sc(struct layer *l) { if (load_api() != 0) return -1; ANativeWindow *win = vkp_window(); @@ -564,16 +542,11 @@ static int ensure_sc(struct layer *l) { return 0; } -/* Geometry of a w x h buffer covering the scene, through the same mapping the blit path and the - * app's touch mapping use. 1 = r filled, 0 = nothing of it is on screen, -1 = no mapping. */ static int layer_geometry(int w, int h, int scene_w, int scene_h, int r[8]) { if (vkp_update_map(scene_w, scene_h) != 0) return -1; return vkp_map_rect(w, h, scene_w, scene_h, r) ? 1 : 0; } -/* The GAME layer's last placement, kept across SurfaceControl retires and swaps (l->geo_valid is - * per-SurfaceControl and is cleared by both). This is the src -> dst the display actually works - * with, and it is what decides whether a second layer is affordable - see overlay_affordable(). */ static ARect g_game_src, g_game_dst; static int g_game_geo_known; @@ -581,7 +554,7 @@ static void apply_geometry(ASurfaceTransaction *tx, struct layer *l, const int r ARect srcR = {r[0], r[1], r[2], r[3]}, dstR = {r[4], r[5], r[6], r[7]}; if (l == &g_layers[SC_LAYER_GAME]) { g_game_src = srcR; g_game_dst = dstR; g_game_geo_known = 1; } if (!l->geo_valid || memcmp(&srcR, &l->geo_src, sizeof(srcR)) || memcmp(&dstR, &l->geo_dst, sizeof(dstR))) { - api.setGeometry(tx, l->sc, &srcR, &dstR, 0 /* no transform: the DPU scales, never rotates */); + api.setGeometry(tx, l->sc, &srcR, &dstR, 0 ); l->geo_src = srcR; l->geo_dst = dstR; l->geo_valid = 1; char cov[96] = ""; if (l->ds_applied > 0) coverage_text(l, cov, sizeof(cov)); @@ -590,16 +563,11 @@ static void apply_geometry(ASurfaceTransaction *tx, struct layer *l, const int r } } -/* Add the vote to tx when it differs from what this layer carries (compositor thread). Only the - * layer the game presents on carries the game's rate; every other layer is voted 0, so a slow - * overlay window can never hold the panel at the game's cadence (or the game's at the overlay's). */ static void apply_frame_rate(ASurfaceTransaction *tx, struct layer *l) { float want = l->votes_rate ? atomic_load(&g_fps_want) : 0.0f; if (want == l->fps_applied) return; if (!api.setFrameRateStrategy && !api.setFrameRate) return; if (api.setFrameRateStrategy) { - /* ALWAYS, like the app's own surface vote: the seamless-only default is ignored by a panel - * sitting at its peak rate, which is exactly the case we need to move. */ api.setFrameRateStrategy(tx, l->sc, want, ASC_FRAME_RATE_COMPAT_DEFAULT, ASC_CHANGE_FRAME_RATE_ALWAYS); } else { api.setFrameRate(tx, l->sc, want, ASC_FRAME_RATE_COMPAT_DEFAULT); @@ -610,13 +578,6 @@ static void apply_frame_rate(ASurfaceTransaction *tx, struct layer *l) { else if (!first) droiddeck_log("layer", "display frame-rate vote on %s cleared (panel runs free)", l->name); } -/* ---- colour (HDR, droiddeck_color.h) ------------------------------------------------------------- - * The layer is told what its buffer's pixels MEAN - the dataspace (BT2020_PQ for an HDR10 frame) and - * the game's mastering / content-light metadata - in the same transaction as the buffer, so the - * display never shows an HDR frame decoded as sRGB or the other way round. A layer that has never been - * tagged is never touched: sessions without an HDR description make no colour call at all. */ -/* How much of the screen the layer's picture covers ("covers 80% of the screen (1920x1080 of 2400x1080)"): - * some phones only switch to HDR for an HDR layer above a minimum area. Empty when unknown. */ static void coverage_text(const struct layer *l, char *out, size_t n) { int ow = 0, oh = 0; vkp_output_size(&ow, &oh); @@ -628,8 +589,6 @@ static void coverage_text(const struct layer *l, char *out, size_t n) { snprintf(out, n, "covers %.0f%% of the screen (%dx%d of %dx%d)", pct > 100.0 ? 100.0 : pct, w, h, ow, oh); } -/* API 35: ask the display for HDR headroom explicitly while the layer carries an HDR frame, and clear the - * request (0 = no preference) when it stops. Only on change; a layer never tagged is never touched. */ static void apply_headroom(ASurfaceTransaction *tx, struct layer *l, const struct droiddeck_color *c) { static int said_missing; if (!api.setDesiredHdrHeadroom) { @@ -642,7 +601,7 @@ static void apply_headroom(ASurfaceTransaction *tx, struct layer *l, const struc return; } const float want = (c && c->dataspace) ? droiddeck_color_desired_headroom(c, NULL, 0) : 0.0f; - if (l->hr_applied < 0.0f && want == 0.0f && !(c && c->dataspace)) return; /* never asked: leave it be */ + if (l->hr_applied < 0.0f && want == 0.0f && !(c && c->dataspace)) return; if (l->hr_applied >= 0.0f && fabsf(want - l->hr_applied) < 0.005f) return; char why[200] = ""; if (c && c->dataspace) droiddeck_color_desired_headroom(c, why, sizeof(why)); @@ -662,7 +621,7 @@ static void apply_colour(ASurfaceTransaction *tx, struct layer *l, const struct int32_t want = c ? c->dataspace : DROIDDECK_ADATASPACE_UNKNOWN; uint32_t md = (c && c->dataspace) ? c->identity : 0; if (!api.setBufferDataSpace) return; - if (l->ds_applied < 0 && want == DROIDDECK_ADATASPACE_UNKNOWN) return; /* never tagged: leave it be */ + if (l->ds_applied < 0 && want == DROIDDECK_ADATASPACE_UNKNOWN) return; apply_headroom(tx, l, want ? c : NULL); if (want == l->ds_applied && md == l->md_applied) return; api.setBufferDataSpace(tx, l->sc, want); @@ -676,7 +635,6 @@ static void apply_colour(ASurfaceTransaction *tx, struct layer *l, const struct .maxLuminance = c->max_lum, .minLuminance = c->min_lum}; } if (cta_on) cta = (struct droiddeck_hdr_cta861_3){.maxContentLightLevel = c->max_cll, .maxFrameAverageLightLevel = c->max_fall}; - /* NULL clears what a previous description set: metadata never outlives the frame it belongs to. */ if (api.setHdrMetadata_smpte2086) api.setHdrMetadata_smpte2086(tx, l->sc, st_on ? &st : NULL); if (api.setHdrMetadata_cta861_3) api.setHdrMetadata_cta861_3(tx, l->sc, cta_on ? &cta : NULL); if (want) { @@ -706,8 +664,6 @@ void sc_layer_hdr_symbols(char *out, size_t size) { api.setDesiredHdrHeadroom ? "yes (asked for per HDR frame: content peak / SDR white)" : "no (Android < 15)"); } -/* Once, when a second layer first goes up: HWC only composes a few layers before SurfaceFlinger - * falls back to GPU client composition, so the count is deliberately capped and said out loud. */ static void log_layer_count(void) { if (g_two_logged) return; g_two_logged = 1; @@ -718,34 +674,12 @@ static void log_layer_count(void) { g_layers[SC_LAYER_OVERLAY].name, (int)g_layers[SC_LAYER_OVERLAY].z, SC_LAYER_COUNT); } -/* ---- composition recovery --------------------------------------------------------------------- - * When the overlay is retired and the scene is one fullscreen window again, the game layer is - * marked for a swap and the swap rides the NEXT frame: a fresh SurfaceControl is created here, the - * frame is put on it, and the old one is hidden and unparented IN THE SAME TRANSACTION. Because - * SurfaceFlinger applies a transaction atomically there is never a composited frame with neither - * layer on it - no black frame, and no dropped frame beyond the one layer creation. The outgoing - * buffer is released through the OLD SurfaceControl's callback, which also releases it. - * - * MEASURED 2026-09-14, and the news is bad: on the Pocket FIT this does NOT bring hardware - * composition back. The swap fires 6 ms after the overlay goes, SurfaceFlinger really does hand out - * a new layer (its id changes), the game never drops a frame - and the composer still reports - * `DEVICE/CLIENT` 24 s later. Neither does dropping the layer path entirely and re-creating the - * SurfaceControl after a gap. The ONE thing that clears it is HOME + resume, which re-creates the - * app's whole window and SurfaceView (`VRI[XServerDisplayActivity]#0` becomes `#4`) - so the sticky - * client-composition state belongs to the PARENT surface (or the display), not to this child layer. - * The phase-4 note that "only re-creating the GAME layer's SurfaceControl clears it" was inferred - * from HOME + resume and is wrong; see sc_layer.h. The swap is kept because it is free and correct - * and the mechanism may differ on hardware that does not rotate every layer - but do not claim it - * restores DEVICE composition, and do not log as if it did. - * - * Returns the old SurfaceControl (the caller must add retire_ops for it to the same transaction and - * name it in add_complete_on), or NULL when no swap is due. Compositor thread. */ static ASurfaceControl *swap_sc_begin(struct layer *l) { if (!l->recreate_pending) return NULL; l->recreate_pending = 0; - if (!l->sc) return NULL; /* nothing to swap; ensure_sc made a fresh one already */ + if (!l->sc) return NULL; ANativeWindow *win = vkp_window(); - if (!win || win != l->win) return NULL; /* the window changed: ensure_sc re-creates it anyway */ + if (!win || win != l->win) return NULL; ASurfaceControl *fresh = api.createFromWindow(win, l->name); if (!fresh) { droiddeck_log("error", "layer: %s: composition recovery could not create a new SurfaceControl", l->name); @@ -753,9 +687,6 @@ static ASurfaceControl *swap_sc_begin(struct layer *l) { } ASurfaceControl *old = l->sc; l->sc = fresh; - /* These describe the SurfaceControl, not the layer: the new one carries none of them yet. - * cur_slot / cur_token are deliberately NOT cleared - they name the buffer still on the OLD - * SurfaceControl, which is what the caller passes to add_complete_on as the one being replaced. */ l->shown = 0; l->geo_valid = 0; l->fps_applied = -1.0f; @@ -765,16 +696,13 @@ static ASurfaceControl *swap_sc_begin(struct layer *l) { return old; } -/* The transaction that puts pool slot `idx` of layer `l` on screen at `r`, as `color` (NULL = no - * description). 0 = applied. */ static int present_slot(struct layer *l, int idx, const int r[8], const struct droiddeck_color *color, int translucent) { struct slot *s = &l->slots[idx]; ASurfaceTransaction *tx = api.txCreate(); if (!tx) return -1; - ASurfaceControl *old = swap_sc_begin(l); /* this frame carries the recovery swap, if one is due */ + ASurfaceControl *old = swap_sc_begin(l); if (old) api.setZOrder(tx, l->sc, l->z); - /* The blit was waited for on the CPU, so no acquire fence is needed (-1). */ api.setBuffer(tx, l->sc, s->ahb, -1); api.setBufferTransparency(tx, l->sc, translucent ? ASC_TRANSPARENCY_TRANSLUCENT : ASC_TRANSPARENCY_OPAQUE); @@ -784,7 +712,7 @@ static int present_slot(struct layer *l, int idx, const int r[8], const struct d if (!l->shown) api.setVisibility(tx, l->sc, ASC_VISIBILITY_SHOW); if (old) retire_ops(tx, old); if (add_complete_on(tx, l, old ? old : l->sc, l->cur_slot, l->cur_token, old ? 1 : 0) != 0 && old) - api.release(old); /* no callback to retire it from (out of memory): let it go here */ + api.release(old); pthread_mutex_lock(&g_lock); s->busy = 1; pthread_mutex_unlock(&g_lock); @@ -797,8 +725,6 @@ static int present_slot(struct layer *l, int idx, const int r[8], const struct d return 0; } -/* No free buffer this frame: the display still holds all of them. Counted for the 10 s perf line, and - * logged at most every 30 s with the number of frames dropped since the last line. */ static unsigned g_pool_drops; static void log_drop(struct layer *l) { g_pool_drops++; @@ -828,8 +754,6 @@ int sc_layer_present_ahb(AHardwareBuffer *ahb, int w, int h, int acquire_fd, voi if (g < 0) goto unavailable; if (g == 0) { if (acquire_fd >= 0) close(acquire_fd); sc_layer_hide(); return 1; } if (token == l->cur_token && l->shown && !l->recreate_pending) { - /* The same frame again (the scene was redrawn for another reason): the display already - * has it; only the placement may have changed (or, rarely, its description). */ if (acquire_fd >= 0) close(acquire_fd); ASurfaceTransaction *tx = api.txCreate(); if (tx) { @@ -841,22 +765,20 @@ int sc_layer_present_ahb(AHardwareBuffer *ahb, int w, int h, int acquire_fd, voi } ASurfaceTransaction *tx = api.txCreate(); if (!tx) goto unavailable; - ASurfaceControl *old = swap_sc_begin(l); /* this frame carries the recovery swap, if one is due */ + ASurfaceControl *old = swap_sc_begin(l); if (old) api.setZOrder(tx, l->sc, l->z); - api.setBuffer(tx, l->sc, ahb, acquire_fd); /* the transaction owns the fence */ + api.setBuffer(tx, l->sc, ahb, acquire_fd); api.setBufferTransparency(tx, l->sc, ASC_TRANSPARENCY_OPAQUE); apply_geometry(tx, l, r); apply_frame_rate(tx, l); apply_colour(tx, l, color); if (!l->shown) api.setVisibility(tx, l->sc, ASC_VISIBILITY_SHOW); if (old) retire_ops(tx, old); - /* Same buffer, new SurfaceControl: it is NOT free, so no release is reported for it - the swap - * moved it rather than taking it off screen. */ if (add_complete_on(tx, l, old ? old : l->sc, l->cur_slot, l->cur_token == token ? NULL : l->cur_token, old ? 1 : 0) != 0) { - api.txDelete(tx); /* the fence went with the transaction */ + api.txDelete(tx); if (old) api.release(old); - l->ds_applied = -1; l->md_applied = 0; l->hr_applied = -1.0f; /* the colour tag went with it too: re-send it next time */ + l->ds_applied = -1; l->md_applied = 0; l->hr_applied = -1.0f; return -1; } api.txApply(tx); @@ -864,8 +786,6 @@ int sc_layer_present_ahb(AHardwareBuffer *ahb, int w, int h, int acquire_fd, voi l->cur_slot = -1; l->cur_token = token; if (!l->shown) { l->shown = 1; droiddeck_log("layer", "%s: layer shown", l->name); } - /* The notification is re-armed for each session; the layer and its logging flag can - * outlive it. Let the notification's own one-shot decide whether to fire. */ if (!l->first_logged) l->first_logged = 1; vkp_signal_first_frame(); if (color && color->dataspace) droiddeck_color_frame_shown(color, DROIDDECK_HDR_ZERO_COPY, ahb_format); @@ -882,7 +802,7 @@ int sc_layer_present(struct vkp_image *src, int scene_w, int scene_h, const stru int r[8]; int g = layer_geometry(sw, sh, scene_w, scene_h, r); if (g < 0) return -1; - if (g == 0) { sc_layer_hide(); return 0; } /* nothing of it is on screen */ + if (g == 0) { sc_layer_hide(); return 0; } int wait_fd; int idx = take_free_slot(l, sw, sh, AHB_RGBA8, &wait_fd); @@ -905,15 +825,13 @@ int sc_layer_present_pass(const struct vkp_draw *draws, int n, int scene_w, int int rw = 0, rh = 0, r[8]; if (!draws || n <= 0 || ensure_sc(l) != 0) return -1; if (vkp_update_map(scene_w, scene_h) != 0) return -1; - /* Compose + run the effects chain first: the chain's result size (a scaling mode resizes to - * the scene's mapped output size) decides how big the layer buffer has to be. */ if (vkp_pass_begin(scene_w, scene_h, draws, n, &rw, &rh) != 0) return -1; if (!vkp_map_rect(rw, rh, scene_w, scene_h, r)) { vkp_pass_abort(); sc_layer_hide(); return 0; } int wait_fd; int idx = take_free_slot(l, rw, rh, AHB_RGBA8, &wait_fd); if (idx < 0) { vkp_pass_abort(); log_drop(l); return 0; } if (vkp_pass_copy_to(l->slots[idx].img, wait_fd) != 0) return -1; - if (present_slot(l, idx, r, NULL, 0) != 0) return -1; /* the effects chain's result is 8-bit sRGB */ + if (present_slot(l, idx, r, NULL, 0) != 0) return -1; if (!l->first_logged) { l->first_logged = 1; droiddeck_log("layer", "presenting %dx%d frames on their own SurfaceControl layer (%s pool, %d buffers); " @@ -924,14 +842,6 @@ int sc_layer_present_pass(const struct vkp_draw *draws, int n, int scene_w, int return 0; } -/* ---- the HDR picture (hdr_compose.h) ------------------------------------------------------------ - * An HDR game that cannot be alone on its layer: the WHOLE scene, composed into one 10-bit PQ BT.2020 - * picture with the effects applied, goes onto the game layer - one layer, tagged BT2020_PQ with the - * game's metadata, so the display composes it as HDR (and a window above the game never needs the - * second layer that costs this panel its hardware composition). 10-bit buffers; if gralloc or the - * import refuses those, 8-bit ones carry the same tagged picture (colours right, precision less). - * With the drawer's HDR output switch off (hf->tonemap) the same picture is composed tone-mapped to - * sRGB instead and goes on the ordinary 8-bit buffers, UNtagged - an SDR frame like any other. */ static uint32_t g_hdr_pool_fmt = AHB_RGB10A2; int sc_layer_present_hdr_scene(const struct vkp_draw *draws, int n, const struct vkp_hdr_frame *hf, @@ -955,7 +865,7 @@ int sc_layer_present_hdr_scene(const struct vkp_draw *draws, int n, const struct } if (idx < 0) { vkp_pass_abort(); log_drop(l); return 0; } if (vkp_pass_copy_to(l->slots[idx].img, wait_fd) != 0) return -1; - if (present_slot(l, idx, r, tm ? NULL : color, 0) != 0) return -1; /* tone-mapped = plain sRGB: no tag */ + if (present_slot(l, idx, r, tm ? NULL : color, 0) != 0) return -1; if (color && color->dataspace) droiddeck_color_frame_shown(color, tm ? DROIDDECK_HDR_TONEMAPPED : DROIDDECK_HDR_COMPOSED, tm ? AHB_RGBA8 : g_hdr_pool_fmt); static int said = -1; @@ -980,40 +890,17 @@ int sc_layer_present_hdr_scene(const struct vkp_draw *draws, int n, const struct return 0; } -/* ---- is a SECOND display layer affordable on this display? ----------------------------------- - * MEASURED on the Pocket FIT (2026-09-14, three times): while a second layer is up, this hardware - * composer hands the WHOLE frame back to the GPU (`DEVICE/CLIENT`), and nothing short of re-creating - * the app's window brings it back - so on this display the overlay layer costs more than it saves, - * every time, for the rest of the session. Where it costs nothing it is still the better path (the - * game keeps copy-free frames with a window on top), so this is a GATE, not a removal. - * - * The gate is read from what the layer path actually knows, never from a device or panel list: - * - rotation: vkp_surface_rotation_degrees(), i.e. VkSurfaceCapabilitiesKHR::currentTransform - - * what the presentation engine says it does to every layer we hand it; - * - scale: the GAME layer's own src -> dst rectangles, the ones passed to setGeometry. - * Rotated AND scaled is the combination that was measured to cost composition (the DPU's rotator - * has to take a scaled source); either alone, or neither, is left as it was. - * - * Why not just measure the composition type after raising the layer and back out if it comes back - * CLIENT - which would beat predicting? Because no app can read it. The composition type lives in - * the Composer HAL; ASurfaceTransactionStats exposes latch time and fences and nothing else, and - * the only place the value is published is `dumpsys android.hardware.graphics.composer3.IComposer`, - * which needs android.permission.DUMP and string-parsing. It would also arrive at least a frame - * late, so backing out would itself be the visible change we are avoiding. Hence the rule. */ static int overlay_affordable(int *deg, int sw[2], int dw[2]) { *deg = vkp_surface_rotation_degrees(); sw[0] = sw[1] = dw[0] = dw[1] = 0; - if (!g_game_geo_known) return 1; /* the game has never been placed: nothing to weigh against */ - if (*deg <= 0) return 1; /* unknown (-1) or upright: leave today's behaviour alone */ + if (!g_game_geo_known) return 1; + if (*deg <= 0) return 1; sw[0] = g_game_src.right - g_game_src.left; sw[1] = g_game_src.bottom - g_game_src.top; dw[0] = g_game_dst.right - g_game_dst.left; dw[1] = g_game_dst.bottom - g_game_dst.top; if (sw[0] <= 0 || sw[1] <= 0) return 1; - return !(dw[0] != sw[0] || dw[1] != sw[1]); /* rotated AND scaled -> not affordable */ + return !(dw[0] != sw[0] || dw[1] != sw[1]); } -/* -1 = not decided yet, 0 = raising the overlay, 1 = declining it. Logged on every change, so a - * tester's log says why they are seeing the copy path instead of two layers - and says it again if - * the placement changes the answer (e.g. a fullscreen mode that stops scaling the game). */ static int g_overlay_declined = -1; int sc_layer_overlay_affordable(void) { @@ -1040,8 +927,6 @@ int sc_layer_overlay_affordable(void) { int sc_layer_present_overlay(struct vkp_image *src, const int geo[8], int translucent) { struct layer *l = layer_of(SC_LAYER_OVERLAY); if (!src || !geo) return -1; - /* The caller decides with sc_layer_overlay_affordable() BEFORE it commits the game to a layer; - * this is only a guard so the layer can never go up behind that decision's back. */ if (!sc_layer_overlay_affordable()) return -1; if (ensure_sc(l) != 0) return -1; int sw = vkp_image_width(src), sh = vkp_image_height(src); @@ -1049,8 +934,6 @@ int sc_layer_present_overlay(struct vkp_image *src, const int geo[8], int transl int wait_fd; int idx = take_free_slot(l, sw, sh, AHB_RGBA8, &wait_fd); if (idx < 0) { log_drop(l); return 0; } - /* The window is copied into the layer buffer 1:1; `geo` crops it and places it, so the layer - * is exactly the window's rectangle on screen and nothing else is blended anywhere. */ if (vkp_blit_image(src, l->slots[idx].img, wait_fd) != 0) return -1; if (present_slot(l, idx, geo, NULL, translucent) != 0) return -1; if (!l->first_logged) { @@ -1060,8 +943,6 @@ int sc_layer_present_overlay(struct vkp_image *src, const int geo[8], int transl return 0; } -/* Hide one layer: the buffer comes off with it (a hidden layer would keep the game's buffer - or - * the pool slot - referenced, and the game needs it back to keep presenting the other way). */ static void hide_layer(struct layer *l) { if (!l->sc || !l->shown || api.state != 1) return; ASurfaceTransaction *tx = api.txCreate(); @@ -1076,10 +957,6 @@ static void hide_layer(struct layer *l) { void sc_layer_hide(void) { layers_init(); int said = g_layers[SC_LAYER_GAME].shown || g_layers[SC_LAYER_OVERLAY].sc; - /* Top down, so nothing of the scene is ever uncovered for a frame. The overlay layer is let go - * of entirely rather than hidden (same reason as sc_layer_hide_overlay: a live second - * SurfaceControl keeps SurfaceFlinger composing on the GPU); the game layer keeps its - * SurfaceControl, since it goes up and down with every effects/frame-generation toggle. */ if (g_layers[SC_LAYER_OVERLAY].sc) sc_layer_hide_overlay(); if (g_layers[SC_LAYER_GAME].shown) hide_layer(&g_layers[SC_LAYER_GAME]); if (said) droiddeck_log("layer", "layers hidden (scene is not a single fullscreen window)"); @@ -1089,22 +966,14 @@ void sc_layer_hide_overlay(void) { layers_init(); struct layer *l = &g_layers[SC_LAYER_OVERLAY]; if (!l->sc) return; - /* RETIRED, not just hidden, so the overlay layer lives exactly as long as the window above the - * game: a live second SurfaceControl is what puts SurfaceFlinger into GPU client composition - * on this hardware (see sc_layer.h), and a hidden one is still live. Measured caveat: letting - * it go does NOT by itself bring hardware composition back - on the Pocket FIT the fallback - * outlives the overlay and only clears when the GAME layer's SurfaceControl is re-created - * (HOME + resume). Retiring is still the right thing; it just is not the whole cure. The pool - * buffers stay allocated for the next window. */ if (l->shown) hide_layer(l); retire_sc(l); droiddeck_log("layer", "%s: gone (nothing is above the game any more)", l->name); - /* ...and that is the half the measurement said is not enough: arm the game layer's - * SurfaceControl swap, which the next frame performs (swap_sc_begin). */ if (g_layers[SC_LAYER_GAME].sc) g_layers[SC_LAYER_GAME].recreate_pending = 1; } void sc_layer_window_gone(void) { + base_hide(1); /* the backdrop belongs to the old window, just like GAME and OVERLAY */ if (api.state != 1) return; layers_init(); for (int i = SC_LAYER_COUNT - 1; i >= 0; i--) retire_sc(&g_layers[i]); diff --git a/app/src/main/cpp/waylandcomp/src/sc_layer.h b/app/src/main/cpp/waylandcomp/src/sc_layer.h index 1d8e6a11e5..58fe5f6d61 100644 --- a/app/src/main/cpp/waylandcomp/src/sc_layer.h +++ b/app/src/main/cpp/waylandcomp/src/sc_layer.h @@ -1,70 +1,5 @@ #ifndef SC_LAYER_H #define SC_LAYER_H -/* - * Layer mode (DROIDDECK_WAYLAND_ZERO_COPY=1): the scene is handed to SurfaceFlinger as a small, - * deliberately ordered SET of Android display layers - ASurfaceControl children of the - * compositor's SurfaceView - instead of being blitted into the compositor's own swapchain. - * - * app window ......... Compose UI, the in-game drawer, the HUD, the on-screen controls and - * the pointer arrow: ordinary Android views, ALWAYS above everything - * below (the SurfaceView is not Z-on-top, so its whole subtree is under - * the window's own content). None of the layers below take input: - * an ASurfaceControl has no input channel, so touch and mouse keep - * reaching the SurfaceView exactly as they did. - * +-- SurfaceView ..... the compositor's Vulkan swapchain; black while layer mode is up - * +-- z=1 "droiddeck_wayland_game" ...... the one fullscreen game window - * +-- z=2 "droiddeck_wayland_overlay" ... at most one window drawn ABOVE the game - * - * TWO layers is the hard cap (SC_LAYER_COUNT), and deliberately so: HWC composes only a few - * layers before SurfaceFlinger falls back to GPU client composition, which would throw away the - * whole benefit. The count is logged when the second layer first goes up. - * - * MEASURED on the Pocket FIT (Adreno 750, portrait panel + landscape session, so every layer is - * ROT_90 + scaled), `dumpsys android.hardware.graphics.composer3.IComposer/default`: one layer is - * `composition: DEVICE/DEVICE`, effects on the layer keep it DEVICE/DEVICE - but a SECOND layer - * flips the whole frame to `DEVICE/CLIENT`. It does not come back when the overlay goes away. - * The overlay layer is retired rather than hidden for that reason, but the fallback outlives it. - * The likely mechanism is the DPU's rotator budget (one rotated+scaled layer), not the layer count - * as such, so a device or orientation needing no rotation may well take both on the DPU. Even in - * client composition the overlay layer is not a loss - SurfaceFlinger does the one blit the - * compositor would have done - but the hardware-composition win is only real for one layer. - * - * COMPOSITION RECOVERY (sc_layer.c, swap_sc_begin): retiring the overlay arms the game layer, and - * the NEXT frame is presented on a brand-new SurfaceControl while the old one is hidden and - * unparented in the SAME transaction. SurfaceFlinger applies a transaction atomically, so no - * composited frame is ever missing the game - no black frame, no dropped frame beyond the layer - * creation itself. One `layer` line is written when it happens. - * - * It does NOT restore hardware composition on this panel, and that was measured, not assumed - * (2026-09-14, Wizardry on the game layer + Wine's Task Manager on the overlay, reproduced twice): - * - two layers -> DEVICE/CLIENT - * - overlay retired + fresh game SurfaceControl -> still DEVICE/CLIENT, 24 s later too - * - layer path dropped entirely and re-created -> still DEVICE/CLIENT - * - drawer opened and closed, no second window -> DEVICE/DEVICE (control: the drawer is not the cause) - * - HOME + resume -> DEVICE/DEVICE - * HOME + resume re-creates the app's whole window and SurfaceView (`VRI[XServerDisplayActivity]#0` - * becomes `#4`), not just this child layer - so the sticky state belongs to the parent surface or - * the display. Re-creating the parent would cost a real black frame and a swapchain rebuild, which - * is worse than the few percent of GPU that client composition costs. The cure that actually keeps - * the win is PREVENTION, and it IS implemented: sc_layer_overlay_affordable() declines the second - * layer when the game layer is both rotated and scaled, and the window above the game goes down the - * copy path instead (what the pre-phase-4 code did) - one blit SurfaceFlinger would have done - * anyway, and the session keeps DEVICE composition throughout. Where a second layer costs nothing, - * nothing changes. - * - * What can be on the game layer, cheapest first: - * - the game's own gralloc buffer (ahb_swapchain.c, true zero-copy: no copy anywhere); - * - one blit of the game's frame into a compositor-allocated AHardwareBuffer (sc_layer_present); - * - with screen effects on, the compositor pass's result blitted into such a buffer - * (sc_layer_present_pass) - the game STAYS on its layer while a Look is applied, and the - * scene -> output mapping is done by the display (setGeometry) instead of a second GPU blit. - * The compositor never alpha-blends (it composes with blits, which overwrite), so every layer is - * marked OPAQUE and the overlay layer is cropped to the window it carries: the picture is the - * same as the copy path's, pixel for pixel. - * - * Compositor thread only, except the SurfaceFlinger OnComplete callbacks (binder threads), which - * only touch the pools under g_lock. sc_layer_hide*() is safe at any time. - */ #include <stddef.h> #include <stdint.h> #include <android/hardware_buffer.h> @@ -73,103 +8,41 @@ struct vkp_image; struct vkp_draw; struct droiddeck_color; -/* The layers, bottom first. The z-order is the array order (z = id + 1). */ enum sc_layer_id { SC_LAYER_GAME = 0, SC_LAYER_OVERLAY = 1, SC_LAYER_COUNT = 2 }; -/* 1 when this device has the SurfaceControl API the layers need (Android 10+, libnativewindow's - * getNativeHandle); the reason is logged (tag `layer`) the first time it is missing. */ int sc_layer_available(void); -/* One-shot: does the kernel export a sync_file from the game's dma-buf (DMA_BUF_IOCTL_EXPORT_SYNC_FILE)? - * Decides where a zero-copy acquire fence can come from; result goes to the session log. */ void sc_layer_probe_dmabuf_fd(int fd); -/* HDR (droiddeck_color.h): can a display layer be told its buffer's colour encoding here - * (ASurfaceTransaction_setBufferDataSpace, Android 10+)? Part of the HDR gate. */ int sc_layer_can_tag_hdr(void); -/* Which of the colour calls this libandroid has, for the gate's log line. */ void sc_layer_hdr_symbols(char *out, size_t size); -/* COLOUR on the game layer: `color` is the image description of the frame being presented (NULL = - * none, i.e. sRGB). A layer that was never tagged is never touched (no setBufferDataSpace call at all: - * a session without an HDR description behaves exactly as before); once tagged, a later untagged frame - * puts the layer back to UNKNOWN. SMPTE 2086 / CTA-861.3 metadata travel with the dataspace. */ -/* GAME layer: show `src` (the fullscreen window's imported frame, scene-sized) on it, placed - * through the current fullscreen mode / alignment mapping. 0 = shown (or deliberately dropped: no - * free buffer), -1 = the layer path is unavailable this frame and the caller must draw the old way. - * The copy into the layer buffer is 8-bit: an HDR frame keeps its tag (its colours stay right), and - * loses precision. */ int sc_layer_present(struct vkp_image *src, int scene_w, int scene_h, const struct droiddeck_color *color); -/* GAME layer, screen effects on: run the compositor pass (composite `draws` + the effects chain, - * vkp_pass_begin) and put its result on the layer. Same return values as sc_layer_present. */ int sc_layer_present_pass(const struct vkp_draw *draws, int n, int scene_w, int scene_h); -/* GAME layer, HDR (hdr_compose.h): the whole scene - `draws`, hf->is_hdr marking the HDR ones - composed - * into one 10-bit PQ BT.2020 picture with the effects applied (vkp_pass_begin_hdr), copied into a - * 10-bit layer buffer (8-bit where gralloc refuses those) and shown tagged with `color` (the topmost HDR - * draw's description). The overlay layer is not used: the picture already holds what is above the game. - * Same return values as sc_layer_present. */ struct vkp_hdr_frame; int sc_layer_present_hdr_scene(const struct vkp_draw *draws, int n, const struct vkp_hdr_frame *hf, int scene_w, int scene_h, const struct droiddeck_color *color); -/* GAME layer, zero-copy (ahb_swapchain.c): show the game's own w x h AHardwareBuffer, gated by - * acquire_fd (a sync_file the layer waits on before reading; owned by the callee, -1 = none). - * token identifies the buffer: once a later transaction replaces it (or the layer is hidden or - * retired), ahb_swapchain_layer_released(token, release_fd) reports SurfaceFlinger's release fence - * for it. Presenting the token already on the layer only updates the placement. 0 = on the layer, - * 1 = nothing of it is on screen (layer hidden, the buffer was not taken), -1 = unavailable this - * frame (the caller draws the old way). `color` / `ahb_format`: the frame's image description (NULL = - * none) and the buffer's AHARDWAREBUFFER_FORMAT_*, for the dataspace and the HDR evidence. */ int sc_layer_present_ahb(AHardwareBuffer *ahb, int w, int h, int acquire_fd, void *token, int scene_w, int scene_h, const struct droiddeck_color *color, uint32_t ahb_format); -/* Vote a panel refresh rate for the layer the game presents on (VRR / refresh-rate matching), the - * same rate and compatibility the app votes on its own surface with Surface.setFrameRate; 0 = no - * vote. Needed because a zero-copy game's frames go onto the GAME layer and never reach the app's - * surface, so the surface vote alone does not describe the game's cadence to SurfaceFlinger. Only - * the game layer ever carries it: the overlay layer is explicitly voted 0, so a window that redraws - * once a second can never hold (or drop) the panel at the game's cadence. Callable from any thread - * at any time (it only stores the rate); the compositor applies it with the layer's next - * transaction, and re-applies it whenever a SurfaceControl is re-created. A no-op on devices whose - * libandroid has no ASurfaceTransaction_setFrameRate. */ void sc_layer_set_frame_rate(float fps); -/* Is a SECOND display layer worth raising on THIS display? Ask before committing the game to its - * layer, not after: on a display where the answer is no, the whole scene must go down the copy path - * from the start, or the game layer would be shown and hidden again on every frame. - * - * The answer is computed from what the layer path knows - the rotation the presentation engine - * applies to everything we hand it (VkSurfaceCapabilitiesKHR::currentTransform) and the game - * layer's own src -> dst rectangles - and never from a device or panel allowlist. ROTATED AND - * SCALED is the combination measured to cost hardware composition (below); either alone is fine. - * The reason is written to the session log once, and again if the answer changes. */ int sc_layer_overlay_affordable(void); -/* OVERLAY layer: show `src` (one window's imported frame) above the game layer, at the placement - * `geo` = {src x0,y0,x1,y1 in image pixels, dst x0,y0,x1,y1 in output pixels} from vkp_map_draw. - * `translucent` preserves a client's alpha over the game for Steam notifications and overlays. - * 0 = shown or dropped, -1 = unavailable (the caller must fall back to the copy path). */ int sc_layer_present_overlay(struct vkp_image *src, const int geo[8], int translucent); -/* The scene is not a single fullscreen window this frame: hide every layer that is up. */ void sc_layer_hide(void); -/* Only the overlay layer: nothing is above the game any more. The game keeps its layer, but its - * SurfaceControl is swapped for a fresh one on the next frame (composition recovery, above - which - * on this panel does not in fact win hardware composition back; see the measurement there). */ +int sc_layer_base_black(int width, int height); +void sc_layer_hide_base(void); void sc_layer_hide_overlay(void); -/* The output window changed or went away (compositor thread, from vkp_apply_window_request). */ void sc_layer_window_gone(void); -/* Frames the compositor put on a layer through one of its own buffers (a blit or the effects - * pass) since the last call - the zero-copy frames ahb_swapchain.c counts are NOT included. - * For the 10 s summary. */ unsigned sc_layer_frames_take(void); -/* Frames dropped since the last call because every layer buffer was still held by the display (the - * 10 s perf line; the "no free layer buffer" log line itself is rate-limited). */ unsigned sc_layer_drops_take(void); #endif diff --git a/app/src/main/cpp/waylandcomp/src/spatialpose.c b/app/src/main/cpp/waylandcomp/src/spatialpose.c new file mode 100644 index 0000000000..48f56905ae --- /dev/null +++ b/app/src/main/cpp/waylandcomp/src/spatialpose.c @@ -0,0 +1,59 @@ +#define _POSIX_C_SOURCE 200809L +#include "spatialpose_shm.h" +#include <jni.h> +#include <fcntl.h> +#include <pthread.h> +#include <stdatomic.h> +#include <string.h> +#include <sys/mman.h> +#include <unistd.h> + +static pthread_mutex_t spatial_lock = PTHREAD_MUTEX_INITIALIZER; +static struct droiddeck_spatialpose *shared; + +JNIEXPORT jboolean JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetSpatialFile( + JNIEnv *env, jclass clazz, jstring path) { + (void)clazz; + pthread_mutex_lock(&spatial_lock); + if (!shared && path) { + const char *name = (*env)->GetStringUTFChars(env, path, NULL); + if (name) { + int fd = open(name, O_RDWR | O_CREAT | O_CLOEXEC, 0600); + (*env)->ReleaseStringUTFChars(env, path, name); + if (fd >= 0) { + if (ftruncate(fd, sizeof(*shared)) == 0) { + void *p = mmap(NULL, sizeof(*shared), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (p != MAP_FAILED) { + shared = p; + memset(shared, 0, sizeof(*shared)); + shared->magic = DROIDDECK_SPATIALPOSE_MAGIC; + shared->version = DROIDDECK_SPATIALPOSE_VERSION; + shared->size = sizeof(*shared); + } + } + close(fd); + } + } + } + jboolean ready = shared != NULL; + pthread_mutex_unlock(&spatial_lock); + return ready; +} + +JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativePublishSpatial( + JNIEnv *env, jclass clazz, jobject buffer) { + (void)clazz; + if (!buffer || (*env)->GetDirectBufferCapacity(env, buffer) != sizeof(*shared)) return; + const struct droiddeck_spatialpose *src = (*env)->GetDirectBufferAddress(env, buffer); + if (!src || src->magic != DROIDDECK_SPATIALPOSE_MAGIC || src->version != DROIDDECK_SPATIALPOSE_VERSION || + src->size != sizeof(*shared)) return; + pthread_mutex_lock(&spatial_lock); + if (shared) { + unsigned seq = __atomic_load_n(&shared->seq, __ATOMIC_RELAXED); + __atomic_store_n(&shared->seq, seq | 1u, __ATOMIC_RELAXED); + __atomic_thread_fence(__ATOMIC_RELEASE); + memcpy((char *)shared + 16, (const char *)src + 16, sizeof(*shared) - 16); + __atomic_store_n(&shared->seq, (seq | 1u) + 1u, __ATOMIC_RELEASE); + } + pthread_mutex_unlock(&spatial_lock); +} diff --git a/app/src/main/cpp/waylandcomp/src/spatialpose_shm.h b/app/src/main/cpp/waylandcomp/src/spatialpose_shm.h new file mode 100644 index 0000000000..099188736b --- /dev/null +++ b/app/src/main/cpp/waylandcomp/src/spatialpose_shm.h @@ -0,0 +1,33 @@ +#ifndef DROIDDECK_SPATIALPOSE_SHM_H +#define DROIDDECK_SPATIALPOSE_SHM_H +#include <stdint.h> +#define DROIDDECK_SPATIALPOSE_MAGIC 0x53504444u +#define DROIDDECK_SPATIALPOSE_VERSION 4u +#define DROIDDECK_SPATIALPOSE_FILE "droiddeck-spatialpose" +enum { DD_SPATIAL_ACTIVE = 1u, DD_SPATIAL_HANDS = 2u, DD_SPATIAL_JOYCONS = 4u, DD_SPATIAL_STEADY_AIM = 8u, DD_SPATIAL_VALID = 1u }; +enum { DD_SPATIAL_TRIGGER_VALID = 2u, DD_SPATIAL_GRIP_VALID = 4u }; +struct dd_spatial_pose { + int64_t time_ns; + float position[3]; + float rotation[4]; + uint32_t flags; +}; +struct dd_spatial_hand { + struct dd_spatial_pose pose; + float trigger; + uint32_t grip; +}; +struct droiddeck_spatialpose { + uint32_t magic, version, size, seq; + uint64_t connection, origin; + uint32_t flags, input_epochs; + struct dd_spatial_pose head; + struct dd_spatial_hand hands[2]; +}; +#ifdef __cplusplus +static_assert(sizeof(dd_spatial_pose) == 40, "spatial pose ABI"); +static_assert(sizeof(droiddeck_spatialpose) == 176, "spatial snapshot ABI"); +#else +_Static_assert(sizeof(struct droiddeck_spatialpose) == 176, "spatial snapshot ABI"); +#endif +#endif diff --git a/app/src/main/cpp/waylandcomp/src/vk_loader.c b/app/src/main/cpp/waylandcomp/src/vk_loader.c index ef939911ce..0cda81cd05 100644 --- a/app/src/main/cpp/waylandcomp/src/vk_loader.c +++ b/app/src/main/cpp/waylandcomp/src/vk_loader.c @@ -1,4 +1,3 @@ -/* See vk_loader.h. */ #define _GNU_SOURCE #include "vk_loader.h" #include "../../adrenotools/include/adrenotools/driver.h" diff --git a/app/src/main/cpp/waylandcomp/src/vk_loader.h b/app/src/main/cpp/waylandcomp/src/vk_loader.h index 32a15ae874..e10950d0d1 100644 --- a/app/src/main/cpp/waylandcomp/src/vk_loader.h +++ b/app/src/main/cpp/waylandcomp/src/vk_loader.h @@ -1,11 +1,5 @@ #ifndef VK_LOADER_H #define VK_LOADER_H -/* - * Loads Turnip via adrenotools (the same path the app uses for the guest renderer) - * and resolves every Vulkan entry point through its vkGetInstanceProcAddr - NOT the - * process-default system Adreno driver, which lacks VK_EXT_image_drm_format_modifier / - * dmabuf import. All compositor Vulkan calls go through g_vk.* . - */ #define VK_USE_PLATFORM_ANDROID_KHR #include <vulkan/vulkan.h> @@ -29,7 +23,7 @@ X(EndCommandBuffer) X(ResetFences) X(QueueSubmit) X(QueuePresentKHR) X(WaitForFences) \ X(QueueWaitIdle) X(GetMemoryFdPropertiesKHR) \ X(GetImageSubresourceLayout) X(MapMemory) X(UnmapMemory) X(CmdClearColorImage) \ - /* screen-effect chain (effects_chain.c): graphics pipelines over full-screen quads */ \ + \ X(CreateShaderModule) X(DestroyShaderModule) X(CreatePipelineLayout) X(DestroyPipelineLayout) \ X(CreateGraphicsPipelines) X(DestroyPipeline) X(CreateRenderPass) X(DestroyRenderPass) \ X(CreateFramebuffer) X(DestroyFramebuffer) X(CreateImageView) X(DestroyImageView) \ @@ -37,7 +31,7 @@ X(CreateDescriptorPool) X(DestroyDescriptorPool) X(AllocateDescriptorSets) X(FreeDescriptorSets) \ X(UpdateDescriptorSets) X(CmdBeginRenderPass) X(CmdEndRenderPass) X(CmdBindPipeline) \ X(CmdBindDescriptorSets) X(CmdPushConstants) X(CmdDraw) X(CmdSetViewport) X(CmdSetScissor) \ - /* frame generation (framegen_bridge.c / vk_present.c per-present sync slots) */ \ + \ X(DestroySemaphore) struct vk_api { @@ -47,14 +41,10 @@ struct vk_api { }; extern struct vk_api g_vk; -/* Open Turnip via adrenotools (falls back to system libvulkan if any arg is NULL) - * and load global entry points. Returns 0 on success. */ int vk_loader_open(const char *driver_path, const char *library_name, const char *native_lib_dir); void vk_loader_load_instance(VkInstance instance); void vk_loader_load_device(VkDevice device); -/* The driver's vkGetInstanceProcAddr (NULL before vk_loader_open): for modules that resolve their - * own entry points, e.g. the frame-generation engines (framegen_engine.cpp). */ PFN_vkGetInstanceProcAddr vk_loader_gipa(void); #endif diff --git a/app/src/main/cpp/waylandcomp/src/vk_present.c b/app/src/main/cpp/waylandcomp/src/vk_present.c index 4551c4806f..96d0b415d3 100644 --- a/app/src/main/cpp/waylandcomp/src/vk_present.c +++ b/app/src/main/cpp/waylandcomp/src/vk_present.c @@ -1,17 +1,18 @@ -/* Android-surface render backend - see vk_present.h. Uses Turnip via vk_loader - * (g_vk.*), not the process-default system Adreno driver. */ #define _POSIX_C_SOURCE 200809L #include "vk_present.h" #include "vk_loader.h" #include "sc_layer.h" #include "effects_chain.h" +#include "cardboard.h" #include "framegen_bridge.h" #include "hdr_compose.h" #include "blend_pass.h" #include "droiddeck_color.h" +#include "quest_device.h" #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/system_properties.h> #include <unistd.h> #include <errno.h> #include <poll.h> @@ -28,78 +29,69 @@ struct vkp_image { VkImage image; VkDeviceMemory mem; int w, h; - int dmabuf; /* imported from a client; owned by the foreign queue family */ - int blit_dst; /* layer mode: a pool buffer this backend blits into (never a source) */ - void *map; /* shm images: persistently mapped linear memory */ + int dmabuf; + int blit_dst; + void *map; VkDeviceSize offset, row_pitch; - int in_general; /* shm images: moved from PREINITIALIZED to GENERAL */ + int in_general; VkFormat fmt; - int sampled; /* created with SAMPLED usage: the alpha pass can read it */ + int sampled; }; -static ANativeWindow *g_window; /* the window frames go to; compositor thread only */ +static ANativeWindow *g_window; static char *g_driver_path, *g_library_name, *g_native_lib_dir; -static int g_dev_state; /* 0 = not yet, 1 = ok, -1 = failed, -2 = lost (VK_ERROR_DEVICE_LOST) */ +static int g_dev_state; static VkInstance g_inst; static VkPhysicalDevice g_pd; static VkDevice g_dev; static VkQueue g_queue; static uint32_t g_qfam; static VkCommandPool g_pool; -/* One command buffer + acquire/render-done semaphore pair per PRESENT. A scene frame is one - * present, or up to 1 + VKP_FG_MAX_GENERATIONS with frame generation (the generated frames go - * out first, the real frame last), each on its own slot so no semaphore ever carries two - * pending signals. Slot 0 is also the layer-mode blit's command buffer. */ #define MAX_PRESENTS (1 + VKP_FG_MAX_GENERATIONS) static VkCommandBuffer g_cmds[MAX_PRESENTS]; static VkSemaphore g_acqs[MAX_PRESENTS], g_rnds[MAX_PRESENTS]; static VkFence g_fence; -/* Extra swapchain images this swapchain was built with (frame generation: one per generated - * frame, so all presents of a scene frame queue without waiting for a vblank). */ static int g_swap_extra; -/* Format of the compositor pass's images (the scene image below, the effects chain's targets and - * the frame-generation ring): a blit converts every client format into it, the chains read RGBA. */ #define SCENE_FMT VK_FORMAT_R8G8B8A8_UNORM static VkPhysicalDeviceMemoryProperties g_memprops; static VkSurfaceKHR g_surface; static VkSwapchainKHR g_swapchain; -/* The display's own rotation of everything we present (VkSurfaceCapabilitiesKHR::currentTransform), - * captured when the swapchain is built. Not a panel or device allowlist: it is what the presentation - * engine says it will do to our layers. */ static VkSurfaceTransformFlagBitsKHR g_surface_transform; static int g_surface_transform_known; static VkImage *g_images; static uint32_t g_nimg; static VkExtent2D g_extent; -static int g_first_frame_done; /* one-shot: fire droiddeck_on_first_frame() on first present */ +static int g_first_frame_done; -/* The base surface under the display layers (vkp_base_black): 1 once a plain black frame has been - * presented on the CURRENT swapchain and nothing else since. Every other present clears it, and so does - * every swapchain teardown, so the next layer frame puts one black frame back first. While it is set, - * a frame that lives entirely on the display layers draws and presents nothing here. */ static int g_base_black; -/* The layer path presents nothing on the base surface while the game keeps its layer, so the swapchain's - * OUT_OF_DATE (a resized surface, a new transform) would never be seen there: check_surface_changed() - * asks the surface directly instead, at most every 100 ms. caps.currentExtent at the last build. */ + +int vkp_quest_layer_presentation(void) { + /* Compositor thread only; this is a process-wide device property, not a session setting. + * Quest 2 still needs its separate A6xx driver: this gate only chooses presentation. */ + static int enabled = -1; + if (enabled < 0) { + char model[PROP_VALUE_MAX] = {0}, device[PROP_VALUE_MAX] = {0}, maker[PROP_VALUE_MAX] = {0}; + __system_property_get("ro.product.model", model); + __system_property_get("ro.product.device", device); + __system_property_get("ro.product.manufacturer", maker); + enabled = quest_device_matches(model, device, maker); + if (enabled) droiddeck_log("gpu", "Quest presentation: display layers for Steam and desktop, CPU-initialized black backdrop; independent of HDR"); + } + return enabled; +} static VkExtent2D g_caps_extent; static int64_t g_surface_checked_ns; -/* Letterbox bars: vkCmdClearColorImage clears whole images only, so the bars around the picture are - * blitted from this small black image instead of clearing the whole output under a picture that covers - * most of it. Created and cleared once with the device. 1 = ready, 0/-1 = not available (whole clear). */ #define BLACK_DIM 16 static VkImage g_black_img; static VkDeviceMemory g_black_mem; static int g_black_state; -/* The display's release fence of a layer buffer, as a GPU wait (VK_KHR_external_semaphore_fd): the - * pool's next copy into that buffer waits for it on the GPU instead of the compositor thread polling it. */ static PFN_vkImportSemaphoreFdKHR g_import_sem_fd; static VkSemaphore g_wait_sem; -/* The 10 s perf line's counters (vkp_perf_take). Compositor thread only. */ static struct vkp_perf g_perf; static int64_t perf_now(void) { struct timespec ts; @@ -112,7 +104,6 @@ static void perf_add(int64_t *sum, int64_t *max, unsigned *count, int64_t d) { if (d > *max) *max = d; (*count)++; } -/* vkWaitForFences on the compositor's own work, timed for the perf line. */ static VkResult timed_wait(VkFence fence, uint64_t timeout) { int64_t t0 = perf_now(); VkResult r = g_vk.WaitForFences(g_dev, 1, &fence, VK_TRUE, timeout); @@ -120,93 +111,72 @@ static VkResult timed_wait(VkFence fence, uint64_t timeout) { return r; } -/* The scene image (effects path only): every draw composited 1:1 at scene size, the input of the - * screen-effect chain (effects_chain.c) - and of frame generation once that lands. Recreated on a - * scene size change; frames are fenced, so never while the GPU reads it. */ static struct { VkImage img; VkDeviceMemory mem; int w, h; } g_scene; -/* HDR composition (hdr_compose.h): the 10-bit image every draw is blitted into 1:1 in its own encoding - * ("mixed"), and the 10-bit HDR picture the encode pass makes of it for the game's display layer. Only - * ever created while an HDR game shares the scene with something the display layer cannot show alone. */ struct vkp_img_slot { VkImage img; VkDeviceMemory mem; int w, h; VkFormat fmt; }; static struct vkp_img_slot g_mixed, g_hdrscene, g_fgscene; #define HDR_FMT VK_FORMAT_A2B10G10R10_UNORM_PACK32 -/* Frame generation with HDR frames through an HDR10 swapchain: the scene, the effects and the engine's - * frames in FP16 - the format lsfg-vk itself uses for HDR - where the engine can build its chain in it, - * so the PQ picture keeps more than 8 bits through interpolation (framegen_bridge.h). */ #define FG_HDR_FMT VK_FORMAT_R16G16B16A16_SFLOAT -/* HDR10 swapchain (frame generation with an HDR game): VK_EXT_swapchain_colorspace is enabled on the - * instance only when the session asked for HDR; the swapchain is built as A2B10G10R10 + HDR10_ST2084 - * while such frames are being presented and the Android surface lists that pair (its WSI then sets the - * surface dataspace to BT2020_PQ). */ -static int g_colorspace_ext; /* the instance has VK_EXT_swapchain_colorspace */ -static int g_swap_hdr_want; /* the next swapchain should be HDR10 */ -static int g_swap_is_hdr; /* the live swapchain is HDR10 */ -static int g_swap_hdr_unavailable; /* this surface lists no HDR10 format: tone-map instead (said once) */ -static VkFormat g_swap_fmt; /* the live swapchain's format */ -/* VK_EXT_hdr_metadata (HDR sessions, where the device offers it): the HDR10 swapchain carries the game's - * mastering metadata, sent once per swapchain and image description. */ + + + + +static int g_colorspace_ext; +static int g_swap_hdr_want; +static int g_swap_is_hdr; +static int g_swap_hdr_unavailable; +static VkFormat g_swap_fmt; + + static PFN_vkSetHdrMetadataEXT g_set_hdr_metadata; static uint32_t g_swap_md_identity; static int g_surface_formats_said; static const char *vk_result_name(VkResult r); -/* The Android surface is created/destroyed on the app's UI thread while the compositor thread - * may be inside a WSI call (acquire and present can block for a refresh or more). The UI thread - * therefore never touches the swapchain: it leaves the new window here and returns at once; the - * compositor thread picks it up before its next frame (vkp_apply_window_request). g_req_lock is - * only ever held for these few assignments, never across a Vulkan call. */ static pthread_mutex_t g_req_lock = PTHREAD_MUTEX_INITIALIZER; static ANativeWindow *g_req_window; static int g_req_pending; -/* A detach was asked for since the compositor thread last looked. A rebind (null, then the same - * window) to rebuild the swapchain at a new size can land in full before the thread gets to it, - * and would otherwise read as the same window handed over again - nothing rebuilt, and the old - * size's buffers scaled onto the rotated or refolded panel. */ static int g_req_detached; +static uint64_t g_req_generation, g_req_applied; +static pthread_cond_t g_req_condition = PTHREAD_COND_INITIALIZER; + -/* Scale mode + alignment (app values, see vk_present.h); written from any thread, read per frame. */ static volatile int g_mode = VKP_MODE_STRETCH, g_align = VKP_ALIGN_CENTER; -/* The scene -> output mapping of the last frame (compositor thread): scene pixel (x,y) lands at - * output (off_x + x * kx, off_y + y * ky), clipped to the region rectangle. */ static struct { int scene_w, scene_h, out_w, out_h, mode, align; float kx, ky, off_x, off_y; - int rx, ry, rw, rh; /* region the picture may occupy */ + int rx, ry, rw, rh; int valid; } g_map; +static pthread_mutex_t g_game_picture_lock = PTHREAD_MUTEX_INITIALIZER; +static float g_game_picture_rect[4]; +static int g_game_picture_top; -/* A failed swapchain creation is retried no sooner than this (the window may be mid-teardown), - * and the failure is logged once per streak instead of every frame. */ static int64_t g_swap_retry_at_ns; static int g_swap_fail_logged; -/* Implemented in waylandcomp_jni.c - notifies Java (dismiss launch overlay). */ extern void droiddeck_on_first_frame(void); static char g_gpu_name[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; const char *vkp_gpu_name(void) { return g_gpu_name; } -/* DRM fourccs name the channels of a little-endian 32-bit word: XRGB8888 is B,G,R,X in memory - * (= VK B8G8R8A8) and XBGR8888 is R,G,B,X (= VK R8G8B8A8). Turnip's Wayland WSI sends XB24 for - * R8G8B8A8 swapchains, so reading everything as BGRA swaps red and blue. */ static VkFormat drm_to_vk(uint32_t drm) { switch (drm) { - case 0x34324241: /* AB24 */ - case 0x34324258: /* XB24 */ + case 0x34324241: + case 0x34324258: return VK_FORMAT_R8G8B8A8_UNORM; - case 0x30334241: /* AB30 */ - case 0x30334258: /* XB30 */ + case 0x30334241: + case 0x30334258: return VK_FORMAT_A2B10G10R10_UNORM_PACK32; - case 0x30335241: /* AR30 */ - case 0x30335258: /* XR30 */ + case 0x30335241: + case 0x30335258: return VK_FORMAT_A2R10G10B10_UNORM_PACK32; - case 0x48344241: /* AB4H */ - case 0x48344258: /* XB4H */ + case 0x48344241: + case 0x48344258: return VK_FORMAT_R16G16B16A16_SFLOAT; - default: /* AR24 / XR24 */ + default: return VK_FORMAT_B8G8R8A8_UNORM; } } @@ -219,10 +189,6 @@ void vk_present_set_driver(const char *driver_path, const char *library_name, g_native_lib_dir = native_lib_dir ? strdup(native_lib_dir) : NULL; } -/* Destroy and recreate every acquire/render-done semaphore. Done with the swapchain (after the - * device went idle): a frame that acquired an image and then bailed out leaves its acquire - * semaphore signalled with nothing to wait on it, and reusing it in the next acquire is invalid - * (Adreno answers OUT_OF_DATE, which rebuilds again - a loop). Fresh objects cannot carry that. */ static void reset_sync(void) { VkSemaphoreCreateInfo semci = {.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO}; for (int k = 0; k < MAX_PRESENTS; k++) { @@ -234,14 +200,14 @@ static void reset_sync(void) { } static void destroy_swapchain(void) { - g_base_black = 0; /* a new swapchain starts with nothing on it */ + g_base_black = 0; if (g_dev_state != 1) return; g_vk.DeviceWaitIdle(g_dev); reset_sync(); for (uint32_t i = 0; i < g_nimg; i++) blendp_forget_image(g_images[i]); if (g_swapchain) g_vk.DestroySwapchainKHR(g_dev, g_swapchain, NULL); g_swapchain = VK_NULL_HANDLE; - g_swap_md_identity = 0; /* a new swapchain gets the metadata again */ + g_swap_md_identity = 0; if (g_surface) g_vk.DestroySurfaceKHR(g_inst, g_surface, NULL); g_surface = VK_NULL_HANDLE; free(g_images); @@ -252,43 +218,67 @@ static void destroy_swapchain(void) { void vk_present_set_window(ANativeWindow *window) { ANativeWindow *superseded = NULL; pthread_mutex_lock(&g_req_lock); - /* Two requests before the compositor thread got to the first: the first window was never - * used, so its reference is dropped here. */ if (g_req_pending && g_req_window && g_req_window != window) superseded = g_req_window; g_req_window = window; g_req_pending = 1; + g_req_generation++; if (!window) g_req_detached = 1; pthread_mutex_unlock(&g_req_lock); if (superseded) ANativeWindow_release(superseded); } +static void window_request_applied(uint64_t generation) { + pthread_mutex_lock(&g_req_lock); + g_req_applied = generation; + pthread_cond_broadcast(&g_req_condition); + pthread_mutex_unlock(&g_req_lock); +} + +int vkp_wait_window_request(int timeout_ms) { + if (timeout_ms <= 0 || timeout_ms > 10000) return 0; + struct timespec deadline; + clock_gettime(CLOCK_REALTIME, &deadline); + deadline.tv_sec += timeout_ms / 1000; + deadline.tv_nsec += (timeout_ms % 1000) * 1000000L; + if (deadline.tv_nsec >= 1000000000L) { deadline.tv_sec++; deadline.tv_nsec -= 1000000000L; } + pthread_mutex_lock(&g_req_lock); + const uint64_t generation = g_req_generation; + int error = 0; + while (g_req_applied < generation && error == 0) + error = pthread_cond_timedwait(&g_req_condition, &g_req_lock, &deadline); + int applied = g_req_applied >= generation; + pthread_mutex_unlock(&g_req_lock); + return applied; +} + int vkp_apply_window_request(void) { ANativeWindow *w; pthread_mutex_lock(&g_req_lock); if (!g_req_pending) { pthread_mutex_unlock(&g_req_lock); return 0; } w = g_req_window; const int detached = g_req_detached; + const uint64_t generation = g_req_generation; g_req_window = NULL; g_req_pending = 0; g_req_detached = 0; pthread_mutex_unlock(&g_req_lock); if (w == g_window) { - /* The same window handed over again (ANativeWindow_fromSurface adds a reference each time). */ if (w) ANativeWindow_release(w); - if (!w || !detached) return 0; - /* ... after a detach: a rebind for a resized surface. Rebuilt at its size on the next frame. */ + if (!w || !detached) { window_request_applied(generation); return 0; } sc_layer_window_gone(); destroy_swapchain(); + window_request_applied(generation); droiddeck_log("gpu", "screen surface rebound: rebuilding the swapchain at its new size"); return 1; } - sc_layer_window_gone(); /* the layer (if any) belongs to the old window */ - destroy_swapchain(); /* recreated against the new window on the next frame */ - g_swap_hdr_unavailable = 0; /* a new surface (another display, say) may offer HDR10 */ + sc_layer_window_gone(); + destroy_swapchain(); + g_swap_hdr_unavailable = 0; if (g_window) ANativeWindow_release(g_window); g_window = w; g_swap_retry_at_ns = 0; g_swap_fail_logged = 0; + window_request_applied(generation); droiddeck_log("gpu", w ? "screen surface attached" : "screen surface gone: presenting paused"); return 1; } @@ -305,7 +295,7 @@ int vkp_device_lost(void) { return g_dev_state == -2; } void vk_present_set_scale_mode(int mode, int alignment) { if (mode < VKP_MODE_OFF || mode > VKP_MODE_INTEGER) mode = VKP_MODE_FIT; - if (alignment < VKP_ALIGN_CENTER || alignment > VKP_ALIGN_BOTTOM) alignment = VKP_ALIGN_CENTER; + if (alignment < VKP_ALIGN_CENTER || alignment > VKP_ALIGN_PICTURE_BOTTOM) alignment = VKP_ALIGN_CENTER; g_mode = mode; g_align = alignment; } @@ -324,15 +314,12 @@ static const char *align_name(int a) { switch (a) { case VKP_ALIGN_TOP: return "top"; case VKP_ALIGN_BOTTOM: return "bottom"; + case VKP_ALIGN_PICTURE_TOP: return "picture top"; + case VKP_ALIGN_PICTURE_BOTTOM: return "picture bottom"; default: return "center"; } } -/* Mirror of ViewTransformation.update(outer = output, inner = scene, mode, alignment) - keep the - * arithmetic identical: the app maps touch input through that class with the same inputs, so any - * difference here puts the pointer beside what it is pointing at. OFF and FIT are both an - * aspect-preserving letterbox (OFF only differs in the app's fullscreen gates); TOP/BOTTOM confine - * the picture to the top/bottom half of the output (the app's handheld split, #413). */ static void update_map(int scene_w, int scene_h) { int mode = g_mode, align = g_align; int W = (int)g_extent.width, H = (int)g_extent.height; @@ -357,21 +344,37 @@ static void update_map(int scene_w, int scene_h) { if (mode == VKP_MODE_FILL) aspect = sx > sy ? sx : sy; else if (mode == VKP_MODE_INTEGER) { float m = sx < sy ? sx : sy; - aspect = (float)(int)m; /* floor for m >= 1 */ + aspect = (float)(int)m; if (aspect < 1.0f) aspect = 1.0f; } else aspect = sx < sy ? sx : sy; g_map.kx = g_map.ky = aspect; - /* Same integer truncation as ViewTransformation's viewOffsetX/Y. */ g_map.off_x = (float)(g_map.rx + (int)((g_map.rw - scene_w * aspect) * 0.5f)); g_map.off_y = (float)(g_map.ry + (int)((g_map.rh - scene_h * aspect) * 0.5f)); } + if (align == VKP_ALIGN_PICTURE_TOP) g_map.off_y = 0; + else if (align == VKP_ALIGN_PICTURE_BOTTOM) g_map.off_y = H - scene_h * g_map.ky; g_map.valid = 1; + pthread_mutex_lock(&g_game_picture_lock); + g_game_picture_top = align == VKP_ALIGN_PICTURE_TOP || align == VKP_ALIGN_PICTURE_BOTTOM; + g_game_picture_rect[0] = g_map.off_x; + g_game_picture_rect[1] = g_map.off_y; + g_game_picture_rect[2] = g_map.off_x + scene_w * g_map.kx; + g_game_picture_rect[3] = g_map.off_y + scene_h * g_map.ky; + pthread_mutex_unlock(&g_game_picture_lock); droiddeck_log("screen", "%s, %s: %dx%d scene shown %dx%d at %d,%d on the %dx%d output", mode_name(mode), align_name(align), scene_w, scene_h, (int)(scene_w * g_map.kx + 0.5f), (int)(scene_h * g_map.ky + 0.5f), (int)g_map.off_x, (int)g_map.off_y, W, H); } +int vkp_game_picture_rect(float rect[4]) { + pthread_mutex_lock(&g_game_picture_lock); + int active = g_game_picture_top; + if (active) memcpy(rect, g_game_picture_rect, sizeof(g_game_picture_rect)); + pthread_mutex_unlock(&g_game_picture_lock); + return active; +} + int vkp_output_to_scene(double ox, double oy, double *sx, double *sy) { if (!g_map.valid || g_map.kx <= 0 || g_map.ky <= 0) return 0; *sx = (ox - g_map.off_x) / g_map.kx; @@ -392,11 +395,9 @@ static int has_ext(VkExtensionProperties *e, uint32_t n, const char *name) { return 0; } -/* Instance + device + command objects. Doesn't need the window. */ static int dev_init(void) { if (g_dev_state != 0) return g_dev_state == 1 ? 0 : -1; - /* Load Turnip (adrenotools) and its entry points - NOT the system driver. */ if (vk_loader_open(g_driver_path, g_library_name, g_native_lib_dir) != 0) { LOGE("present: vk_loader_open failed"); g_dev_state = -1; return -1; } @@ -404,9 +405,6 @@ static int dev_init(void) { const char *inst_exts[3] = {VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, NULL}; uint32_t n_inst_exts = 2; - /* HDR sessions only (droiddeck_color.h): the colour-space extension lets the swapchain carry HDR10 for - * frame generation. Asked for only when the loader has it, and only when HDR was asked for, so - * every other session creates exactly the instance it always did. */ if (droiddeck_color_requested() && g_vk.EnumerateInstanceExtensionProperties) { uint32_t ne = 0; g_vk.EnumerateInstanceExtensionProperties(NULL, &ne, NULL); @@ -424,8 +422,6 @@ static int dev_init(void) { "generation %s)", g_colorspace_ext ? "enables" : "has no", g_colorspace_ext ? "is possible where the screen surface offers one" : "is not possible: tone-mapped instead"); } - /* 1.3 like the X11 renderer's instance: the frame-generation probe (framegen_engine.cpp) - * queries VkPhysicalDeviceVulkan12Features, and a 1.1 instance may be answered as 1.1. */ VkApplicationInfo app = {.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .pApplicationName = "droiddeck-wayland-present", .apiVersion = VK_API_VERSION_1_3}; @@ -463,7 +459,6 @@ static int dev_init(void) { } g_vk.GetPhysicalDeviceMemoryProperties(g_pd, &g_memprops); - /* Verify the dmabuf-import extensions are present, and log any that are missing. */ const char *dev_exts[7] = {VK_KHR_SWAPCHAIN_EXTENSION_NAME, "VK_KHR_external_memory_fd", "VK_EXT_external_memory_dma_buf", "VK_EXT_image_drm_format_modifier", "VK_KHR_image_format_list", NULL, NULL}; @@ -475,14 +470,11 @@ static int dev_init(void) { for (unsigned i = 0; i < 5; i++) if (!has_ext(exts, ne, dev_exts[i])) LOGE("present: driver MISSING %s (dmabuf import will fail)", dev_exts[i]); - /* HDR sessions only: the HDR10 swapchain (frame generation) can carry the game's metadata. */ int want_hdr_md = 0; if (droiddeck_color_requested()) { want_hdr_md = has_ext(exts, ne, VK_EXT_HDR_METADATA_EXTENSION_NAME); if (want_hdr_md) dev_exts[n_dev_exts++] = VK_EXT_HDR_METADATA_EXTENSION_NAME; } - /* The layer pool's release fences as GPU waits (sync_file -> semaphore): optional, the pool falls - * back to waiting for them on the CPU without it. */ const int want_sem_fd = has_ext(exts, ne, VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME); if (want_sem_fd) dev_exts[n_dev_exts++] = VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME; free(exts); @@ -490,10 +482,6 @@ static int dev_init(void) { float prio = 1.0f; VkDeviceQueueCreateInfo qci = {.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, .queueFamilyIndex = g_qfam, .queueCount = 1, .pQueuePriorities = &prio}; - /* Frame generation (framegen_bridge.c): the LSFG chain needs the memory-model and - * storage-image features enabled at device creation; the probe hands back the pNext chain - * for them, or NULL on a device that cannot run it (then Win-FG Native alone is offered). A - * driver that rejects the chain costs nothing: retried once without it, exactly as before. */ const void *fg_features = vkp_framegen_device_features(g_inst, vk_loader_gipa(), g_pd); VkDeviceCreateInfo dci = {.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, .pNext = fg_features, .queueCreateInfoCount = 1, .pQueueCreateInfos = &qci, @@ -541,6 +529,7 @@ static int dev_init(void) { g_vk.CreateFence(g_dev, &fci, NULL, &g_fence); vkp_effects_bind_device(g_dev, g_pd, &g_memprops); + vkp_cardboard_bind_device(g_dev, &g_memprops); hdrc_bind_device(g_dev, &g_memprops); blendp_bind_device(g_dev); g_dev_state = 1; @@ -577,7 +566,6 @@ static int swap_init(void) { #define SWLOGE(...) do { if (!g_swap_fail_logged) LOGE(__VA_ARGS__); } while (0) -/* Short names for the session log (the formats and colour spaces an Android surface lists). */ static void vk_format_short(VkFormat f, char *out, size_t n) { const char *s = NULL; switch (f) { @@ -620,8 +608,6 @@ static const char *vk_colorspace_short(VkColorSpaceKHR c) { default: return NULL; } } -/* One line: the total, how many colour spaces each format comes with, and every HDR-capable pair - * (HDR10 / HLG / extended sRGB, any format) - never "the first N pairs". */ static int hdr_capable_space(VkColorSpaceKHR cs) { int c = (int)cs; return c == VK_COLOR_SPACE_HDR10_ST2084_EXT || c == VK_COLOR_SPACE_HDR10_HLG_EXT || @@ -642,7 +628,6 @@ static void log_surface_formats(const VkSurfaceFormatKHR *f, uint32_t n) { pp += (size_t)snprintf(per + pp, sizeof(per) - pp, "%s%s x%u", pp ? ", " : "", nm, cnt); } } - /* The deep formats (10-bit, FP16) first, so a long list never pushes them out of the line. */ for (int pass = 0; pass < 2; pass++) for (uint32_t i = 0; i < n; i++) { if (!hdr_capable_space(f[i].colorSpace) || (vk_format_bits(f[i].format) > 8) != (pass == 0)) continue; @@ -671,17 +656,10 @@ static int swap_init_locked(void) { VkSurfaceCapabilitiesKHR caps; g_vk.GetPhysicalDeviceSurfaceCapabilitiesKHR(g_pd, g_surface, &caps); - /* Remembered for the layer path: currentTransform is the rotation the presentation engine (and - * therefore SurfaceFlinger and the DPU) applies to everything we put on this display. Anything - * but IDENTITY means every display layer we hand over is a ROTATED layer. sc_layer.c needs that - * to decide whether a second layer is affordable - see sc_layer_present_overlay(). */ g_surface_transform = caps.currentTransform; g_surface_transform_known = 1; - g_caps_extent = caps.currentExtent; /* check_surface_changed() compares against this */ + g_caps_extent = caps.currentExtent; g_surface_checked_ns = perf_now(); - /* Every format/colour-space pair the surface lists. With VK_EXT_swapchain_colorspace the Android - * WSI lists each format once per colour space (the Fold: 11 per format), so a fixed-size array - * silently drops the 10-bit and FP16 rows - which is where HDR10 lives. */ uint32_t nfmt = 0; g_vk.GetPhysicalDeviceSurfaceFormatsKHR(g_pd, g_surface, &nfmt, NULL); VkSurfaceFormatKHR *fmts = nfmt ? calloc(nfmt, sizeof(*fmts)) : NULL; @@ -695,10 +673,6 @@ static int swap_init_locked(void) { g_surface_formats_said = 1; log_surface_formats(fmts, nfmt); } - /* HDR10 for frame generation with an HDR game (render_impl sets g_swap_hdr_want): the best format - * the surface lists with VK_COLOR_SPACE_HDR10_ST2084_EXT - 10-bit, then FP16, then 8-bit (still a - * PQ BT.2020 picture, with less precision). None listed -> the frames are tone-mapped into the - * ordinary swapchain, and that is said once. */ g_swap_is_hdr = 0; if (g_swap_hdr_want) { static const VkFormat pref[] = {VK_FORMAT_A2B10G10R10_UNORM_PACK32, VK_FORMAT_A2R10G10B10_UNORM_PACK32, @@ -734,17 +708,10 @@ static int swap_init_locked(void) { g_extent.width = ANativeWindow_getWidth(g_window); g_extent.height = ANativeWindow_getHeight(g_window); } - /* + one image per generated frame while frame generation is armed: every present of a scene - * frame can then be queued at once and FIFO spaces them onto consecutive vblanks. */ g_swap_extra = vkp_framegen_extra_images(); uint32_t want = caps.minImageCount + 1 + (uint32_t)g_swap_extra; if (caps.maxImageCount && want > caps.maxImageCount) want = caps.maxImageCount; - /* Use IDENTITY preTransform when the surface supports it. Setting preTransform = - * currentTransform tells the presentation engine our content is ALREADY pre-rotated by - * that amount - but our blit doesn't rotate, so on a device whose surface reports a 90° - * currentTransform the display then rotates our upright frame 90° (game shows sideways). - * IDENTITY = "don't rotate what I present", which is what we want. */ VkSurfaceTransformFlagBitsKHR pretrans = (caps.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) ? VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR : caps.currentTransform; @@ -759,8 +726,6 @@ static int swap_init_locked(void) { .presentMode = VK_PRESENT_MODE_FIFO_KHR, .clipped = VK_TRUE}; VkResult cr = g_vk.CreateSwapchainKHR(g_dev, &sci, NULL, &g_swapchain); if (cr != VK_SUCCESS && g_swap_is_hdr) { - /* The surface listed the HDR10 pair but refused the swapchain: say so, never ask again this - * surface, and build the ordinary one now (frames tone-mapped) - never a black screen. */ droiddeck_log("color", "the driver refused the HDR10 swapchain (%s): frames with frame generation are " "tone-mapped to SDR instead", vk_result_name(cr)); g_swap_is_hdr = 0; @@ -792,9 +757,6 @@ static int memory_type(uint32_t bits, VkMemoryPropertyFlags want) { return -1; } -/* The small black image the letterbox bars are blitted from (see g_black_img): created, cleared and left - * in TRANSFER_SRC_OPTIMAL once, with a one-time submit, right after the device comes up. Any failure only - * means the bars are cleared the old way (the whole output). */ static void init_black_image(void) { g_black_state = -1; VkImageCreateInfo ici = { @@ -849,10 +811,6 @@ static void init_black_image(void) { droiddeck_log("gpu", "letterbox black image unavailable: the whole output is cleared every copy-path frame"); } -/* Blit the black image over everything of swapchain image `img` (in TRANSFER_DST_OPTIMAL) OUTSIDE the - * destination rectangle of `covered` - the letterbox bars around a picture that fills that rectangle - * completely. Up to four rectangles, one blit command. 0 = not possible (no black image): the caller - * clears the whole image instead. */ static int record_bars_clear(VkCommandBuffer cmd, VkImage img, const VkImageBlit *covered) { if (g_black_state != 1 || !covered) return 0; const int W = (int)g_extent.width, H = (int)g_extent.height; @@ -866,11 +824,11 @@ static int record_bars_clear(VkCommandBuffer cmd, VkImage img, const VkImageBlit if (y1 > H) y1 = H; if (x1 <= x0 || y1 <= y0) return 0; int rects[4][4], n = 0; - if (y0 > 0) { rects[n][0] = 0; rects[n][1] = 0; rects[n][2] = W; rects[n][3] = y0; n++; } /* top */ - if (y1 < H) { rects[n][0] = 0; rects[n][1] = y1; rects[n][2] = W; rects[n][3] = H; n++; } /* bottom */ - if (x0 > 0) { rects[n][0] = 0; rects[n][1] = y0; rects[n][2] = x0; rects[n][3] = y1; n++; } /* left */ - if (x1 < W) { rects[n][0] = x1; rects[n][1] = y0; rects[n][2] = W; rects[n][3] = y1; n++; } /* right */ - if (!n) return 1; /* the picture covers the whole output: nothing to clear */ + if (y0 > 0) { rects[n][0] = 0; rects[n][1] = 0; rects[n][2] = W; rects[n][3] = y0; n++; } + if (y1 < H) { rects[n][0] = 0; rects[n][1] = y1; rects[n][2] = W; rects[n][3] = H; n++; } + if (x0 > 0) { rects[n][0] = 0; rects[n][1] = y0; rects[n][2] = x0; rects[n][3] = y1; n++; } + if (x1 < W) { rects[n][0] = x1; rects[n][1] = y0; rects[n][2] = W; rects[n][3] = y1; n++; } + if (!n) return 1; VkImageBlit blits[4]; for (int i = 0; i < n; i++) blits[i] = (VkImageBlit){.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}, @@ -891,9 +849,8 @@ const char *vkp_modifier_name(uint64_t modifier) { return other; } -/* Can the driver create and import this format/modifier with the requested image usage? */ static int modifier_importable(VkFormat fmt, uint64_t modifier, VkImageUsageFlags usage) { - if (!g_vk.GetPhysicalDeviceImageFormatProperties2) return 1; /* can't ask; the create will tell */ + if (!g_vk.GetPhysicalDeviceImageFormatProperties2) return 1; VkPhysicalDeviceExternalImageFormatInfo ext = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, .handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT}; @@ -1030,7 +987,6 @@ struct vkp_image *vkp_image_import_dmabuf(int fd, uint32_t drm_format, uint64_t return img; } -/* Linear wl_shm images can use the blend pass only if the driver samples them with a linear filter. */ static int shm_sampled(void) { static int known; if (!known) { @@ -1084,8 +1040,6 @@ struct vkp_image *vkp_image_create_shm(int w, int h) { return img; } -/* Renders are synchronous (we wait for the frame's fence), so writing between frames - * never races the GPU. */ void vkp_image_upload_shm(struct vkp_image *img, const void *data, int stride) { if (!img || !img->map || !data) return; size_t rowbytes = (size_t)img->w * 4; @@ -1109,9 +1063,6 @@ void vkp_image_destroy(struct vkp_image *img) { free(img); } -/* Map a draw into swapchain pixels through the scale mode, clipping the destination to the - * picture's region (the whole output, or its half on TOP/BOTTOM; FILL's overflow is cut here) - * and trimming the source to match. Returns 0 if nothing is left to draw. */ static int map_draw(const struct vkp_draw *d, float kx, float ky, float off_x, float off_y, float L, float T, float R, float B, VkImageBlit *blit) { float x0 = off_x + d->dx * kx, y0 = off_y + d->dy * ky; @@ -1146,12 +1097,10 @@ static int draw_to_blit(const struct vkp_draw *d, VkImageBlit *blit) { return map_draw(d, g_map.kx, g_map.ky, g_map.off_x, g_map.off_y, (float)g_map.rx, (float)g_map.ry, R, B, blit); } -/* The same draw 1:1 into the scene image (no mapping: scene pixels are the destination). */ static int draw_to_scene_blit(const struct vkp_draw *d, int scene_w, int scene_h, VkImageBlit *blit) { return map_draw(d, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, (float)scene_w, (float)scene_h, blit); } -/* A translucent draw needs source-over blending; every other draw keeps the existing blit path. */ static void record_draw(VkCommandBuffer cmd, const struct vkp_draw *d, const VkImageBlit *blit, VkImage target, VkFormat target_fmt, int target_w, int target_h, VkFilter filter) { const struct vkp_image *im = d->img; @@ -1164,15 +1113,14 @@ static void record_draw(VkCommandBuffer cmd, const struct vkp_draw *d, const VkI } static void destroy_scene_image(void) { - if (g_scene.img) hdrc_forget_image(g_scene.img); /* the HDR pass may have drawn into it */ + if (g_scene.img) vkp_effects_forget_image(g_scene.img); + if (g_scene.img) hdrc_forget_image(g_scene.img); if (g_scene.img) blendp_forget_image(g_scene.img); if (g_scene.img) g_vk.DestroyImage(g_dev, g_scene.img, NULL); if (g_scene.mem) g_vk.FreeMemory(g_dev, g_scene.mem, NULL); memset(&g_scene, 0, sizeof(g_scene)); } -/* The scene image at this size (R8G8B8A8: a blit converts every client format into it, and the - * chain's shaders read it as RGBA). 0 = ready. */ static int ensure_scene_image(int w, int h) { if (g_scene.img && g_scene.w == w && g_scene.h == h) return 0; destroy_scene_image(); @@ -1181,7 +1129,7 @@ static int ensure_scene_image(int w, int h) { .format = VK_FORMAT_R8G8B8A8_UNORM, .extent = {(uint32_t)w, (uint32_t)h, 1}, .mipLevels = 1, .arrayLayers = 1, .samples = VK_SAMPLE_COUNT_1_BIT, .tiling = VK_IMAGE_TILING_OPTIMAL, .usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | - VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, /* the HDR encode pass writes it (frame generation) */ + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED}; VkResult r = g_vk.CreateImage(g_dev, &ici, NULL, &g_scene.img); if (r != VK_SUCCESS) { LOGE("effects: scene image %dx%d: vkCreateImage %s", w, h, vk_result_name(r)); g_scene.img = VK_NULL_HANDLE; return -1; } @@ -1199,10 +1147,10 @@ static int ensure_scene_image(int w, int h) { return 0; } -/* One of the HDR composition's device-local images at this size and format. 0 = ready. */ static int ensure_img(struct vkp_img_slot *s, int w, int h, VkFormat fmt, VkImageUsageFlags usage, const char *what) { if (s->img && s->w == w && s->h == h && s->fmt == fmt) return 0; if (s->img) hdrc_forget_image(s->img); + if (s->img) vkp_effects_forget_image(s->img); if (s->img) blendp_forget_image(s->img); if (s->img) g_vk.DestroyImage(g_dev, s->img, NULL); if (s->mem) g_vk.FreeMemory(g_dev, s->mem, NULL); @@ -1235,11 +1183,6 @@ static int ensure_img(struct vkp_img_slot *s, int w, int h, VkFormat fmt, VkImag return 0; } -/* The HDR composition (hdr_compose.h): clear the mixed image, blit every draw into it 1:1 in its own - * encoding, then encode it into `out` (left in TRANSFER_DST_OPTIMAL). The caller has already taken the - * draws' images (queue-family acquire / host-write barriers). Which rectangles are HDR comes from - * hf->is_hdr: listed top draw first, down to the lowest HDR draw (everything under that is SDR). - * 0 = done, -1 = the HDR pass is unavailable (nothing was recorded into `out`). */ static int compose_hdr(VkCommandBuffer cmd, const struct vkp_draw *draws, int n, const struct vkp_hdr_frame *hf, int scene_w, int scene_h, VkImage out, VkFormat out_fmt, enum hdrc_mode mode) { if (!hf || !hf->is_hdr || n <= 0) return -1; @@ -1268,7 +1211,6 @@ static int compose_hdr(VkCommandBuffer cmd, const struct vkp_draw *draws, int n, for (int i = 0; i < n; i++) { VkImageBlit blit; if (!draws[i].img || !draw_to_scene_blit(&draws[i], scene_w, scene_h, &blit)) continue; - /* A blit converts UNORM to UNORM by value: 8-bit sRGB and 10-bit PQ both land unchanged. */ record_draw(cmd, &draws[i], &blit, g_mixed.img, HDR_FMT, scene_w, scene_h, VK_FILTER_LINEAR); if (hf->is_hdr[i] && lowest_hdr < 0) lowest_hdr = i; } @@ -1292,9 +1234,6 @@ static int compose_hdr(VkCommandBuffer cmd, const struct vkp_draw *draws, int n, return hdrc_encode(cmd, g_mixed.img, out, out_fmt, scene_w, scene_h, &p); } -/* VK_ERROR_DEVICE_LOST: nothing on this device works any more, and there is no way back short - * of a new session. Say so once and stop touching the swapchain; clients keep being paced by the - * compositor (see pace_without_output) so they don't wedge, they just aren't shown. */ static void device_lost(const char *where) { if (g_dev_state == -2) return; g_dev_state = -2; @@ -1333,22 +1272,33 @@ static const char *vk_result_name(VkResult r) { } } -/* ---------------------------------------------------------------- the compositor pass */ -/* The mapping/blit stage for one present: clear the swapchain image to black (the letterbox), - * blit `src` (src_w x src_h, in GENERAL: the effects chain's result or a generated frame, either - * standing for the whole scene) through the scene -> output mapping, and leave the image ready - * to present. */ static void record_screen_blit(VkCommandBuffer cmd, VkImage src, int src_w, int src_h, - int scene_w, int scene_h, uint32_t img, VkFilter filter) { + int scene_w, int scene_h, uint32_t img, VkFilter filter, int cardboard) { VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; + int direct = 0; + if (cardboard) { + VkImageMemoryBarrier rd = { + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .oldLayout = VK_IMAGE_LAYOUT_GENERAL, + .newLayout = VK_IMAGE_LAYOUT_GENERAL, + .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .image = src, .subresourceRange = range, + .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, .dstAccessMask = VK_ACCESS_SHADER_READ_BIT}; + g_vk.CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + 0, 0, NULL, 0, NULL, 1, &rd); + VkImage eyes = vkp_cardboard_run(cmd, src, src_w, src_h, (int)g_extent.width, (int)g_extent.height); + if (eyes) { + src = eyes; + src_w = (int)g_extent.width; + src_h = (int)g_extent.height; + direct = 1; + } + } VkImageMemoryBarrier pre[2] = { {.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .oldLayout = VK_IMAGE_LAYOUT_UNDEFINED, .newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .image = g_images[img], .subresourceRange = range, .dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT}, - /* Whatever wrote src last (blits, the effects chain, a compute dispatch, in this or an - * earlier submission on this queue) must be visible to the blit's read. */ {.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .oldLayout = VK_IMAGE_LAYOUT_GENERAL, .newLayout = VK_IMAGE_LAYOUT_GENERAL, .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, @@ -1356,11 +1306,15 @@ static void record_screen_blit(VkCommandBuffer cmd, VkImage src, int src_w, int .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT}}; g_vk.CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, NULL, 0, NULL, 2, pre); - struct vkp_image tmp = {.w = src_w, .h = src_h}; /* only its size is looked at */ + struct vkp_image tmp = {.w = src_w, .h = src_h}; struct vkp_draw d = {&tmp, 0, 0, (float)src_w, (float)src_h, 0, 0, scene_w, scene_h}; VkImageBlit blit; - const int have_blit = draw_to_blit(&d, &blit); - /* The result fills its whole mapped rectangle, so only the letterbox bars around it need black. */ + const int have_blit = direct ? 1 : draw_to_blit(&d, &blit); + if (direct) + blit = (VkImageBlit){.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}, + .srcOffsets = {{0, 0, 0}, {src_w, src_h, 1}}, + .dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}, + .dstOffsets = {{0, 0, 0}, {src_w, src_h, 1}}}; if (!have_blit || !record_bars_clear(cmd, g_images[img], &blit)) { VkClearColorValue black = {.float32 = {0.0f, 0.0f, 0.0f, 1.0f}}; g_vk.CmdClearColorImage(cmd, g_images[img], VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &black, 1, &range); @@ -1382,16 +1336,9 @@ static void record_screen_blit(VkCommandBuffer cmd, VkImage src, int src_w, int 0, 0, NULL, 0, NULL, 1, &b_present); } -/* Acquire a swapchain image for present slot k. On the frame's FIRST acquire the swapchain is - * (re)created when needed and rebuilt once when the surface changed under us (OUT_OF_DATE after a - * resize/rotation, SURFACE_LOST when the window was torn down) - once, so a frame is not lost to - * a recreate that would have succeeded. Later slots have presents in flight on this swapchain, - * so they never rebuild; they fail and the frame ends early. 0 on success. */ static int acquire_image(int k, int first, uint32_t *img, VkResult *ar_out) { for (int attempt = 0; ; attempt++) { if (!g_swapchain && (!first || swap_init() != 0)) return -1; - /* A bounded wait: a surface that went away without telling us must not park the - * compositor thread forever (clients are paced from this thread). */ const int64_t t_acq = perf_now(); VkResult ar = g_vk.AcquireNextImageKHR(g_dev, g_swapchain, 1000000000ULL, g_acqs[k], VK_NULL_HANDLE, img); perf_add(&g_perf.acquire_ns, &g_perf.acquire_max_ns, &g_perf.acquires, perf_now() - t_acq); @@ -1405,14 +1352,11 @@ static int acquire_image(int k, int first, uint32_t *img, VkResult *ar_out) { } droiddeck_log("error", "present: acquire %d failed (%s %d)", k, vk_result_name(ar), (int)ar); if (ar == VK_TIMEOUT || ar == VK_NOT_READY) return -1; - destroy_swapchain(); /* anything else: start over next frame */ + destroy_swapchain(); return -1; } } -/* vkp_render_plain: the base surface's black frame with the compositor pass skipped (HDR game on its - * layer, compositor.c) - neither the effects chain nor frame generation runs, and so neither paces - * this loop with extra presents. */ static int g_plain_frame; int vkp_render_plain(int scene_w, int scene_h) { g_plain_frame = 1; @@ -1421,10 +1365,6 @@ int vkp_render_plain(int scene_w, int scene_h) { return r; } -/* A surface that changed size or transform under a swapchain nobody presents to (the base surface - * while the game is on its display layer) never reports OUT_OF_DATE, so ask it - at most every - * 100 ms, on the compositor thread - and tear the swapchain down when it no longer matches; the next - * frame rebuilds it (and, in layer mode, puts one black frame on it). */ static void check_surface_changed(void) { if (!g_swapchain || !g_surface || g_dev_state != 1) return; const int64_t now = perf_now(); @@ -1443,10 +1383,14 @@ static void check_surface_changed(void) { int vkp_base_black(int scene_w, int scene_h) { vkp_apply_window_request(); + if (vkp_quest_layer_presentation()) { + if (vkp_update_map(scene_w, scene_h) != 0) return -1; + return sc_layer_base_black((int)g_extent.width, (int)g_extent.height); + } check_surface_changed(); if (g_base_black && g_swapchain && g_window && g_dev_state == 1) { g_perf.base_kept++; - return 0; /* the black frame from before is still what the base surface shows */ + return 0; } int r = vkp_render_plain(scene_w, scene_h); if (r == 0) g_perf.base_presents++; @@ -1460,10 +1404,6 @@ void vkp_perf_take(struct vkp_perf *out) { int vkp_can_wait_sync_fd(void) { return g_import_sem_fd != NULL && g_wait_sem != VK_NULL_HANDLE; } -/* Hand a sync_file to the next submit as a GPU wait (temporary import into g_wait_sem; the driver - * owns the fd from then on). Returns 1 when the submit must wait on g_wait_sem, 0 when there is nothing - * to wait on - the fd was -1, or it could not be imported and was waited for on the CPU (bounded) and - * closed instead. -1 = the display is still reading the buffer after 100 ms: do not write it. */ static int take_wait_fd(int fd) { if (fd < 0) return 0; if (vkp_can_wait_sync_fd()) { @@ -1487,8 +1427,6 @@ static int take_wait_fd(int fd) { return r == 0 ? -1 : 0; } -/* The HDR10 swapchain's metadata: the game's SMPTE 2086 / CTA-861.3 values (its image description) via - * VK_EXT_hdr_metadata, once per swapchain and description. A game that gave none gets none. */ static void send_hdr_metadata(const struct droiddeck_color *c) { static int said_none, said_nodesc; if (!c) return; @@ -1523,26 +1461,20 @@ static void send_hdr_metadata(const struct droiddeck_color *c) { c->identity, c->text); } -/* The whole present: vkp_render (hf == NULL, exactly as it always was) and vkp_render_hdr (a scene with - * HDR draws: composed into one encoding, hdr_compose.h). */ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, int n, const struct vkp_hdr_frame *hf, int *how) { if (how) *how = 0; vkp_apply_window_request(); - check_surface_changed(); /* a rotation or a fold the rebind did not cover: rebuild at the new size */ + sc_layer_hide_base(); + check_surface_changed(); if (g_dev_state == -2) return -1; if (dev_init() != 0 || !g_window || scene_w <= 0 || scene_h <= 0) return -1; - /* Frame generation queues several presents per scene frame and needs swapchain images for - * them: rebuild when that changes (armed, disarmed, another multiplier). */ if (g_swapchain && vkp_framegen_extra_images() != g_swap_extra) { droiddeck_log("gpu", "frame generation now wants %d present%s per frame: rebuilding the swapchain", 1 + vkp_framegen_extra_images(), vkp_framegen_extra_images() ? "s" : ""); destroy_swapchain(); } - /* HDR frames presented here (frame generation with an HDR game) want an HDR10 swapchain - unless the - * drawer's HDR output switch is off (tone-mapped) - nothing else does. A change of that rebuilds the - * swapchain (only in HDR sessions: g_colorspace_ext). */ const int want_hdr = hf && !hf->tonemap && g_colorspace_ext && !g_swap_hdr_unavailable; if (g_swapchain && want_hdr != g_swap_is_hdr) { droiddeck_log("color", want_hdr ? "HDR frames with frame generation: rebuilding the screen swapchain as HDR10" @@ -1556,22 +1488,20 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i VkResult ar; if (acquire_image(0, 1, &img, &ar) != 0) return -1; update_map(scene_w, scene_h); - /* A new HDR10 swapchain, or a new image description on it: hand the game's metadata over. */ if (g_swap_is_hdr && hf && hf->color && hf->color->identity != g_swap_md_identity) { g_swap_md_identity = hf->color->identity; send_hdr_metadata(hf->color); } - /* The compositor pass - scene -> effects -> frame generation -> mapping/blit -> swapchain - - * composes the scene off-screen when either stage needs the whole frame: the screen-effect - * chain (effects_chain.c) or frame generation (framegen_bridge.c). With both off the draws are - * blitted straight through the mapping into the swapchain image, as they always were; only the - * blit filter follows the scaling mode. */ const int fx = !g_plain_frame && vkp_effects_active(); const int fg = !g_plain_frame && vkp_framegen_active(); - /* HDR frames with frame generation through an HDR10 swapchain: the scene, the effects and the - * engine's frames in FP16 (FG_HDR_FMT) where the engine can take that format - more than 8 bits of - * PQ through interpolation - else the 8-bit scene, as before. */ + int cb = !g_plain_frame && vkp_cardboard_active(); + if (cb && hf) { + static int said; + if (!said) { said = 1; droiddeck_log("cardboard", "HDR frames are shown flat: the cardboard pass is 8-bit only"); } + cb = 0; + } + vkp_cardboard_begin_frame(); const int deep = hf && n > 0 && fg && g_swap_is_hdr && !hf->tonemap && vkp_framegen_format_ok(FG_HDR_FMT) && ensure_img(&g_fgscene, scene_w, scene_h, FG_HDR_FMT, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | @@ -1591,8 +1521,7 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i "into the HDR10 swapchain (%s): banding possible in smooth gradients", sw); } } - /* An HDR scene always takes the pass: its draws are composed into one encoding first. */ - const int pass = deep || ((fx || fg || (hf && n > 0)) && ensure_scene_image(scene_w, scene_h) == 0); + const int pass = deep || ((fx || fg || cb || (hf && n > 0)) && ensure_scene_image(scene_w, scene_h) == 0); VkImage scene_img = deep ? g_fgscene.img : g_scene.img; const VkFormat scene_fmt = deep ? FG_HDR_FMT : SCENE_FMT; const VkFilter blit_filter = vkp_effects_blit_filter(); @@ -1605,11 +1534,6 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i blendp_begin_frame(); VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; - /* Source images: take dmabufs from the client's queue family, move shm images to - * GENERAL once (host writes stay visible across frames: memory is coherent and each - * frame is a new submission). One barrier per distinct image. The destination joins them: - * the swapchain image on the direct path, the scene image on the compositor pass (the - * per-present blits transition the swapchain images themselves there). */ VkImageMemoryBarrier *bars = calloc((size_t)n + 1, sizeof(*bars)); int nb = 0; bars[nb++] = (VkImageMemoryBarrier){ @@ -1644,12 +1568,6 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, NULL, 0, NULL, (uint32_t)nb, bars); free(bars); - /* Clear the composition target to black (the letterbox on the direct path, the desktop's - * background on the pass) before the draws land on it. An opaque draw that covers the whole scene - * overwrites every pixel of its rectangle, so then only what lies outside it - * needs black: the letterbox bars on the direct path, nothing at all on the pass (the scene image - * is exactly the scene). Anything else - no such draw, the HDR composition - clears the whole - * target as before. */ VkImage target = pass ? scene_img : g_images[img]; int covered = 0; VkImageBlit cover_blit; @@ -1674,10 +1592,6 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i 0, 1, &mb, 0, NULL, 0, NULL); } - /* 1. Scene: the draws in order, 1:1 into the scene image (pass) or mapped onto the output. An HDR - * scene is composed into ONE encoding instead (hdr_compose.h): PQ BT.2020 for an HDR10 - * swapchain, tone-mapped sRGB for an ordinary one; the scene image comes back in - * TRANSFER_DST_OPTIMAL like the blits leave it. If that pass is unavailable, the blits below. */ int drawn = 0; int hdr_how = 0; if (hf && pass && n > 0 && @@ -1709,21 +1623,13 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i g_vk.CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, 0, 0, NULL, 0, NULL, 1, &b_present); } else { - /* 2. Effects (the hook): scaling to the scene's mapped size, then the effects, in the X11 - * order. The result stands for the whole scene (rw x rh) and comes back in - * TRANSFER_SRC_OPTIMAL; with nothing on the scene stays as composited. */ 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); - /* This path's scene is 8-bit. Set only where the chain really runs: a plain frame (the black - * base under an HDR picture) must not flip the chain's format back every frame. */ 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; } - /* Hand-off: from here the frame lives in GENERAL - the frame-generation engines copy and - * sample it there, and every screen blit reads it there. Whatever wrote it last (the - * composite blits or the chain's last pass) is made visible to both. */ VkImageMemoryBarrier b_general = { .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .oldLayout = result_layout, .newLayout = VK_IMAGE_LAYOUT_GENERAL, @@ -1735,23 +1641,16 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i VK_PIPELINE_STAGE_TRANSFER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, NULL, 0, NULL, 1, &b_general); - /* 3. Frame generation (the hook): the result is frame N; the engine interpolates between - * N-1 and N and hands back the frames that belong in between. Shown first, N last. */ if (fg) { ngen = vkp_framegen_run(cmd, result, VK_NULL_HANDLE, rw, rh, scene_fmt, gens); if (ngen < 0) ngen = 0; if (ngen > VKP_FG_MAX_GENERATIONS) ngen = VKP_FG_MAX_GENERATIONS; } - /* 4. Mapping/blit: the first present carries generated frame 0, or the result itself. */ - record_screen_blit(cmd, ngen ? gens[0] : result, rw, rh, scene_w, scene_h, img, blit_filter); + record_screen_blit(cmd, ngen ? gens[0] : result, rw, rh, scene_w, scene_h, img, blit_filter, cb); } g_vk.EndCommandBuffer(cmd); - /* One submit + present per slot: generated frames first, the real frame last. The frame - * fence rides on the last submit (a fence signal is ordered after everything submitted - * earlier on the queue, so it still covers all of this frame's work). With FIFO the - * presentation engine shows them on consecutive vblanks: that IS the pacing, no sleeps. */ const int presents = 1 + ngen; int fence_submitted = 0, presented_gen = 0; VkResult pr = VK_SUCCESS; @@ -1768,7 +1667,7 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i VkCommandBuffer ck = g_cmds[k]; g_vk.ResetCommandBuffer(ck, 0); g_vk.BeginCommandBuffer(ck, &bi); - record_screen_blit(ck, k < ngen ? gens[k] : result, rw, rh, scene_w, scene_h, img, blit_filter); + record_screen_blit(ck, k < ngen ? gens[k] : result, rw, rh, scene_w, scene_h, img, blit_filter, cb); g_vk.EndCommandBuffer(ck); } const int last = (k + 1 == presents); @@ -1780,7 +1679,6 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i if (qr != VK_SUCCESS) { if (qr == VK_ERROR_DEVICE_LOST) device_lost("submit"); else LOGE("present: submit %d/%d failed (%d)", k + 1, presents, (int)qr); - /* The acquired image is never presented; the swapchain would be stuck with it. */ if (g_dev_state != -2) destroy_swapchain(); return -1; } @@ -1795,8 +1693,6 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i if (pr == VK_ERROR_OUT_OF_DATE_KHR || pr == VK_ERROR_SURFACE_LOST_KHR || pr == VK_ERROR_DEVICE_LOST) break; } if (!fence_submitted) { - /* Ended early: an empty submit carrying the fence is ordered after everything queued - * above, so the wait below still means "this frame's work is done". */ VkSubmitInfo si = {.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO}; g_vk.QueueSubmit(g_queue, 1, &si, g_fence); } @@ -1804,14 +1700,10 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i if (fg) vkp_framegen_presented(presented_gen); if (fr == VK_ERROR_DEVICE_LOST || pr == VK_ERROR_DEVICE_LOST) { device_lost("present"); return -1; } if (pr == VK_ERROR_OUT_OF_DATE_KHR || pr == VK_ERROR_SURFACE_LOST_KHR) { - /* The surface changed or went away under this frame: rebuild before the next one. */ droiddeck_log("gpu", "screen surface %s on present: rebuilding the swapchain", vk_result_name(pr)); destroy_swapchain(); return -1; } else if (pr == VK_SUBOPTIMAL_KHR || ar == VK_SUBOPTIMAL_KHR) { - /* Expected and harmless here: the swapchain uses IDENTITY preTransform on purpose (see - * swap_init), so a rotated panel reports SUBOPTIMAL on every frame. Rebuilding would change - * nothing (and a rebuild per frame would be far worse), so present as is; say so once. */ static int said; if (!said) { said = 1; droiddeck_log("gpu", "surface reports SUBOPTIMAL (panel rotation); presenting as is"); } } else if (pr != VK_SUCCESS) { @@ -1820,13 +1712,8 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i return -1; } - /* What the base surface shows from now on: black only after a plain frame with nothing drawn - * (vkp_base_black keeps presenting nothing while that holds); anything else it presented is - * content, and the next layer frame must put a black frame back under the layers first. */ g_base_black = (g_plain_frame && n == 0 && !hf) ? 1 : 0; - /* Signal the app once, on the first real client frame reaching the screen, so the - * launch/preloader overlay can dismiss (wayland has no XServer window-content hook). */ if (drawn && !g_first_frame_done) { g_first_frame_done = 1; droiddeck_on_first_frame(); @@ -1836,6 +1723,26 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i } int vkp_render(int scene_w, int scene_h, const struct vkp_draw *draws, int n) { + if (vkp_quest_layer_presentation() && !vkp_framegen_active() && !vkp_cardboard_active()) { + /* The desktop (multiple windows), overlays and an empty scene must also avoid WSI. + * Merely enabling zero-copy handles only a single fullscreen window and leaves both + * the letterbox and every fallback frame going through the corrupted swapchain. */ + vkp_apply_window_request(); + sc_layer_hide_overlay(); + if (n > 0) { + if (sc_layer_present_pass(draws, n, scene_w, scene_h) != 0) { + static int said; + if (!said) { said = 1; droiddeck_log("error", "Quest scene layer unavailable; retaining the previous frame rather than using the corrupt Android swapchain"); } + return -1; + } + } else { + sc_layer_hide(); + } + /* sc_layer_present_pass signals only after submitting client content. + * A backdrop alone, or a successful no-op while a layer slot is unavailable, + * must not dismiss the app's loading UI or mark Steam's window as shown. */ + return vkp_base_black(scene_w, scene_h); + } return render_impl(scene_w, scene_h, draws, n, NULL, NULL); } @@ -1844,25 +1751,19 @@ int vkp_render_hdr(int scene_w, int scene_h, const struct vkp_draw *draws, int n return render_impl(scene_w, scene_h, draws, n, hf, how); } -/* ---------------------------------------------------------------- layer mode helpers */ -/* Degrees the display rotates our layers by: 0, 90, 180 or 270; -1 before the swapchain exists. - * Read from the surface, so it follows the panel's install orientation and the session's own - * orientation together, on any device. */ int vkp_surface_rotation_degrees(void) { if (!g_surface_transform_known) return -1; switch (g_surface_transform) { case VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR: return 90; case VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR: return 180; case VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR: return 270; - default: return 0; /* IDENTITY, and the mirrored forms we never see here */ + default: return 0; } } ANativeWindow *vkp_window(void) { return g_window; } -/* A new session under a compositor that has already presented: arm the one-shot again so the - * next drawn frame reports, or the app would show its loading panel over the new client for good. */ void vkp_reset_first_frame(void) { g_first_frame_done = 0; } @@ -1875,14 +1776,23 @@ void vkp_signal_first_frame(void) { int vkp_update_map(int scene_w, int scene_h) { if (g_dev_state == -2 || dev_init() != 0 || !g_window || scene_w <= 0 || scene_h <= 0) return -1; - check_surface_changed(); /* layer mode may present nothing on the base surface for a long time */ + if (vkp_quest_layer_presentation()) { + /* Layer geometry needs the window size, not a Vulkan swapchain. In particular, do + * not create/present a swapchain just to paint black under an otherwise clean layer. */ + int w = ANativeWindow_getWidth(g_window), h = ANativeWindow_getHeight(g_window); + if (w <= 0 || h <= 0) return -1; + g_extent = (VkExtent2D){(uint32_t)w, (uint32_t)h}; + update_map(scene_w, scene_h); + return g_map.valid ? 0 : -1; + } + check_surface_changed(); if (!g_swapchain && swap_init() != 0) return -1; update_map(scene_w, scene_h); return g_map.valid ? 0 : -1; } int vkp_map_rect(int img_w, int img_h, int scene_w, int scene_h, int out[8]) { - struct vkp_image tmp = {.w = img_w, .h = img_h}; /* only its size is looked at */ + struct vkp_image tmp = {.w = img_w, .h = img_h}; struct vkp_draw d = {&tmp, 0, 0, (float)img_w, (float)img_h, 0, 0, scene_w, scene_h}; return vkp_map_draw(&d, out); } @@ -1897,15 +1807,12 @@ int vkp_map_draw(const struct vkp_draw *d, int out[8]) { return 1; } -/* Copy src (a client frame) into dst (a layer pool buffer) 1:1 and wait for it. Both images are - * owned by the "foreign" queue family (the game's driver / the display) between our uses, so each - * use acquires them and the destination is released back for the display to read. */ int vkp_blit_image(struct vkp_image *src, struct vkp_image *dst, int wait_fd) { if (!src || !dst || !dst->blit_dst || g_dev_state == -2 || dev_init() != 0) { if (wait_fd >= 0) close(wait_fd); return -1; } - const int gpu_wait = take_wait_fd(wait_fd); /* the display's release of dst, before the copy writes it */ + const int gpu_wait = take_wait_fd(wait_fd); if (gpu_wait < 0) return -1; VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; @@ -1924,7 +1831,7 @@ int vkp_blit_image(struct vkp_image *src, struct vkp_image *dst, int wait_fd) { .newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, .srcQueueFamilyIndex = VK_QUEUE_FAMILY_FOREIGN_EXT, .dstQueueFamilyIndex = g_qfam, .image = dst->image, .subresourceRange = range, .dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT}}; - if (!src->dmabuf) { /* shm image: host-written, GENERAL */ + if (!src->dmabuf) { acq[0].oldLayout = src->in_general ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_PREINITIALIZED; acq[0].newLayout = VK_IMAGE_LAYOUT_GENERAL; acq[0].srcAccessMask = VK_ACCESS_HOST_WRITE_BIT; @@ -1966,12 +1873,12 @@ int vkp_blit_image(struct vkp_image *src, struct vkp_image *dst, int wait_fd) { return 0; } -/* A client's GPU cursor read back to the CPU, for the app's pointer overlay (compositor.c, - * wl_pointer.set_cursor). wlroots hands a nested compositor its cursor as a dma-buf from the parent's - * formats - on Adreno usually UBWC, which the CPU cannot read - so it is blitted into a small linear, - * host-visible image first. Rare (a cursor changes shape, it is not redrawn per frame) and waited - * for on the CPU. out: w*h pixels, B8G8R8A8 in memory = 0xAARRGGBB ints. 0 = ok. */ -static struct vkp_image *g_rb; /* the readback image, kept for the next shape */ + + + + + +static struct vkp_image *g_rb; int vkp_image_readback(struct vkp_image *src, uint32_t *out, int max_px) { if (!src || !out || src->w <= 0 || src->h <= 0 || src->w * src->h > max_px || @@ -2038,7 +1945,6 @@ int vkp_image_readback(struct vkp_image *src, uint32_t *out, int max_px) { .newLayout = VK_IMAGE_LAYOUT_GENERAL, .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .image = g_rb->image, .subresourceRange = range, .srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT, .dstAccessMask = VK_ACCESS_HOST_READ_BIT}, - /* the client's buffer goes back to it */ {.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, .newLayout = VK_IMAGE_LAYOUT_GENERAL, .srcQueueFamilyIndex = src->dmabuf ? g_qfam : VK_QUEUE_FAMILY_IGNORED, @@ -2064,32 +1970,10 @@ int vkp_image_readback(struct vkp_image *src, uint32_t *out, int max_px) { return 0; } -/* ---------------------------------------------------------------- the compositor pass, off-screen - * - * Layer mode with screen effects on: the game's frame still has to go through the compositor pass - * (scene image -> effects chain), but the RESULT does not have to end up in the app's swapchain - - * it is copied into a gralloc buffer and put on the game's own Android layer, so hardware - * composition stays alive while a Look is applied and the scene -> output mapping is done by the - * display (setGeometry) instead of a second full-screen GPU blit. - * - * The chain runs in its OWN submit, with no swapchain image acquired. That is deliberate and was - * measured: folding it into the submit that owns the acquired image (one command buffer, one - * present, which looks cheaper on paper) puts the whole 13-pass chain behind the acquire - * semaphore, i.e. behind a vblank - 72 fps instead of 111 fps on the Pocket FIT with Retro CRT at - * 1920x1080. The base surface's black frame is presented by the caller AFTER the layer - * transaction, so the layer never waits for a vblank either. - * - * Three steps because the chain's result size is only known once the chain has run, and the layer - * buffer is allocated from it: - * vkp_pass_begin() -> records composite + effects into the frame's command buffer - * vkp_pass_copy_to()-> appends the copy into the layer buffer, submits, waits - * vkp_pass_abort() -> drops it unsubmitted (no free layer buffer this frame) - * Frame generation is NOT run here: its extra frames need a present each, on consecutive vblanks, - * which one buffer per layer transaction cannot pace (see WAYLAND_RUNTIME.md). */ static struct { int active; - VkImage result; /* in TRANSFER_SRC_OPTIMAL */ + VkImage result; int rw, rh; } g_pass; @@ -2106,17 +1990,10 @@ int vkp_pass_begin_hdr(int scene_w, int scene_h, const struct vkp_draw *draws, i return pass_begin_impl(scene_w, scene_h, draws, n, hf, rw, rh); } -/* The off-screen pass for a layer: the SDR one (hf == NULL: composite into the 8-bit scene image, the - * effects in 8-bit - unchanged) or the HDR one (the draws composed into one 10-bit PQ BT.2020 picture, - * the effects run on it in 10-bit). */ static int pass_begin_impl(int scene_w, int scene_h, const struct vkp_draw *draws, int n, const struct vkp_hdr_frame *hf, int *rw, int *rh) { if (g_pass.active) vkp_pass_abort(); - if (g_dev_state == -2 || dev_init() != 0 || !g_window || scene_w <= 0 || scene_h <= 0) return -1; - check_surface_changed(); /* as in render_impl: the effects pass maps onto the output's size */ - if (!g_swapchain && swap_init() != 0) return -1; /* the mapping is in output pixels */ - update_map(scene_w, scene_h); - if (!g_map.valid) return -1; + if (vkp_update_map(scene_w, scene_h) != 0) return -1; if (hf) { if (ensure_img(&g_hdrscene, scene_w, scene_h, HDR_FMT, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | @@ -2133,8 +2010,6 @@ static int pass_begin_impl(int scene_w, int scene_h, const struct vkp_draw *draw blendp_begin_frame(); VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; - /* Same acquisition as vkp_render's compositor pass: the sources come from the client's queue - * family (dmabuf) or from a host write (shm), the scene image is the transfer destination. */ VkImageMemoryBarrier *bars = calloc((size_t)n + 1, sizeof(*bars)); if (!bars) { g_vk.EndCommandBuffer(cmd); return -1; } int nb = 0; @@ -2171,11 +2046,9 @@ static int pass_begin_impl(int scene_w, int scene_h, const struct vkp_draw *draw free(bars); if (hf) { - /* HDR: every draw into the mixed image, then ONE encoding into the 10-bit picture: PQ BT.2020, or - * tone-mapped sRGB while the drawer's HDR output switch is off. */ if (compose_hdr(cmd, draws, n, hf, scene_w, scene_h, g_hdrscene.img, HDR_FMT, hf->tonemap ? HDRC_OUT_SDR : HDRC_OUT_PQ) != 0) { - g_vk.EndCommandBuffer(cmd); /* never submitted; reset before its next use */ + g_vk.EndCommandBuffer(cmd); return -1; } if (vkp_effects_active()) vkp_effects_set_formats(HDR_FMT, HDR_FMT); @@ -2215,8 +2088,8 @@ int vkp_pass_copy_to(struct vkp_image *dst, int wait_fd) { g_vk.EndCommandBuffer(cmd); return -1; } - const int gpu_wait = take_wait_fd(wait_fd); /* the display's release of dst, before the copy writes it */ - if (gpu_wait < 0) { g_vk.EndCommandBuffer(cmd); return -1; } /* never submitted; reset before its next use */ + const int gpu_wait = take_wait_fd(wait_fd); + if (gpu_wait < 0) { g_vk.EndCommandBuffer(cmd); return -1; } VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; VkImageMemoryBarrier acq = { @@ -2226,9 +2099,6 @@ int vkp_pass_copy_to(struct vkp_image *dst, int wait_fd) { .dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT}; g_vk.CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, NULL, 0, NULL, 1, &acq); - /* The result stands for the whole scene, and so does the layer buffer (the DPU maps it onto - * the output), so this is 1:1 whenever the buffer was allocated at the size begin() reported; - * a stale-sized buffer is resampled rather than shown wrong. */ VkImageBlit blit = {.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}, .srcOffsets = {{0, 0, 0}, {g_pass.rw, g_pass.rh, 1}}, .dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}, @@ -2265,5 +2135,5 @@ int vkp_pass_copy_to(struct vkp_image *dst, int wait_fd) { void vkp_pass_abort(void) { if (!g_pass.active) return; g_pass.active = 0; - g_vk.EndCommandBuffer(g_cmds[0]); /* never submitted; the buffer is reset before its next use */ + g_vk.EndCommandBuffer(g_cmds[0]); } diff --git a/app/src/main/cpp/waylandcomp/src/vk_present.h b/app/src/main/cpp/waylandcomp/src/vk_present.h index 2a752c3439..48d32ab4dc 100644 --- a/app/src/main/cpp/waylandcomp/src/vk_present.h +++ b/app/src/main/cpp/waylandcomp/src/vk_present.h @@ -2,70 +2,37 @@ #define VK_PRESENT_H #include <stdint.h> #include <android/native_window.h> -/* - * Android-surface render backend for the embedded Wayland compositor. - * Owns a Turnip VkDevice + a swapchain on the SurfaceView's ANativeWindow. Each - * client buffer becomes an image (a dmabuf from winewayland's Vulkan WSI is - * imported zero-copy; a wl_shm buffer is copied into a host-visible image), and - * every frame blits the whole scene - desktop, windows, subsurfaces - in order. - */ - -// Set the Turnip driver to load (adrenotools). Call before the first frame. -// NULL args -> the backend falls back to the system libvulkan (dmabuf import will -// likely fail - Adreno lacks drm_format_modifier). driver_path ends with '/'. void vk_present_set_driver(const char *driver_path, const char *library_name, const char *native_lib_dir); -// Set/replace the output window (from Surface via ANativeWindow_fromSurface; the backend -// owns the reference from then on). NULL = the surface is gone. Callable from any thread -// and never blocks: the request is applied by the compositor thread (vkp_render / -// vkp_apply_window_request), which tears the old swapchain down and releases the old window. void vk_present_set_window(ANativeWindow *window); -/* Compositor thread: apply a pending window change now. Returns 1 if the window changed. */ int vkp_apply_window_request(void); -/* How the scene is mapped onto the output (the app's Container.FULLSCREEN_* / ALIGN_* values, - * mirrored 1:1 from ViewTransformation.java so touch input, which is mapped by the app with - * that class, lands on the same pixels). Callable from any thread, applies on the next frame. */ +int vkp_quest_layer_presentation(void); + enum vkp_scale_mode { VKP_MODE_OFF = 0, VKP_MODE_FIT = 1, VKP_MODE_STRETCH = 2, VKP_MODE_FILL = 3, VKP_MODE_INTEGER = 4 }; -enum vkp_align { VKP_ALIGN_CENTER = 0, VKP_ALIGN_TOP = 1, VKP_ALIGN_BOTTOM = 2 }; +enum vkp_align { VKP_ALIGN_CENTER = 0, VKP_ALIGN_TOP = 1, VKP_ALIGN_BOTTOM = 2, VKP_ALIGN_PICTURE_TOP = 3, VKP_ALIGN_PICTURE_BOTTOM = 4 }; void vk_present_set_scale_mode(int mode, int alignment); -/* Output pixel (0..output size) -> scene pixel through the current mapping (compositor thread). - * Returns 0 before the first frame has established a mapping (sx/sy untouched). */ +int vkp_game_picture_rect(float rect[4]); int vkp_output_to_scene(double ox, double oy, double *sx, double *sy); -/* Output size in pixels (0x0 before the first swapchain). */ void vkp_output_size(int *w, int *h); struct vkp_image; -/* DRM format modifiers this backend knows the memory layout of (both single-plane on Adreno): - * LINEAR, and QCOM_COMPRESSED = UBWC (drm_fourcc.h: fourcc_mod_code(QCOM = 0x05, 1)). */ #define VKP_MOD_LINEAR 0x0000000000000000ULL #define VKP_MOD_QCOM_COMPRESSED 0x0500000000000001ULL #define VKP_MOD_INVALID 0x00ffffffffffffffULL -/* "linear", "qcom_compressed", or "modifier 0x…" for anything else (static buffer). */ const char *vkp_modifier_name(uint64_t modifier); -/* The modifiers a dma-buf of this DRM fourcc can be imported with as a blit source, asked of the - * renderer's own driver (VkDrmFormatModifierPropertiesListEXT, each confirmed for a dma-buf-backed - * TRANSFER_SRC image with vkGetPhysicalDeviceImageFormatProperties2). Only LINEAR and - * QCOM_COMPRESSED are ever returned (the ones this file can describe a plane layout for); other - * modifiers the driver reports are logged once. Returns the count, 0 when the device is not up - * (LINEAR is then the only safe assumption). Compositor thread. */ int vkp_dmabuf_modifiers(uint32_t drm_format, uint64_t *out, int max); -// Import a dmabuf (single plane). NULL on failure. The image aliases the buffer, so -// later client frames rendered into the same buffer show up without re-importing. struct vkp_image *vkp_image_from_dmabuf(int fd, uint32_t drm_format, uint64_t modifier, int w, int h, uint32_t stride, uint32_t offset); -// Same, choosing the role: as_blit_dst = 0 imports a client frame (blit source), 1 imports a -// buffer this backend blits INTO (layer mode's AHardwareBuffer pool, see sc_layer.h). struct vkp_image *vkp_image_import_dmabuf(int fd, uint32_t drm_format, uint64_t modifier, int w, int h, uint32_t stride, uint32_t offset, int as_blit_dst); int vkp_image_is_dmabuf(const struct vkp_image *img); -// Create a host-visible image and copy BGRA/XRGB8888 pixels into it. NULL on failure. struct vkp_image *vkp_image_create_shm(int w, int h); void vkp_image_upload_shm(struct vkp_image *img, const void *data, int stride); @@ -73,117 +40,62 @@ int vkp_image_width(const struct vkp_image *img); int vkp_image_height(const struct vkp_image *img); void vkp_image_destroy(struct vkp_image *img); -// One scene draw: the src rectangle of an image (image pixels) scaled into the dst -// rectangle (scene pixels). The scene is mapped onto the output by the scale mode. struct vkp_draw { struct vkp_image *img; float sx, sy, sw, sh; int dx, dy, dw, dh; - int blend; /* translucent: composed over what is under it (blend_pass.h) */ + int blend; }; -// The GPU the renderer runs on ("Adreno (TM) 750"), empty before the device is up. const char *vkp_gpu_name(void); -// 0 if the renderer can create images (device up), -1 otherwise. int vkp_ready(void); -/* Whether an output window is attached (or requested); without one vkp_render() draws nothing. */ int vkp_has_window(void); -/* 1 once the Vulkan device was lost: nothing is presented any more (the session must restart). */ +int vkp_wait_window_request(int timeout_ms); int vkp_device_lost(void); -// Clear to black, blit the draws in order (first = bottom) and present. -// Returns 0 on success, -1 if nothing could be presented (no window yet, etc.). int vkp_render(int scene_w, int scene_h, const struct vkp_draw *draws, int n); -/* A black frame with no compositor pass (no effects, no frame generation), whatever is armed: the - * base surface under an HDR game that keeps its display layer (compositor.c). */ int vkp_render_plain(int scene_w, int scene_h); -/* Layer mode's base surface: make sure it shows a plain black frame under the display layers. A frame - * is presented only when the base is not already black on the current swapchain (entering layer mode, - * after a copy-path / frame-generation frame, after a swapchain rebuild); otherwise nothing is drawn - * or presented at all. 0 = the base is black, -1 = no output. Compositor thread. */ int vkp_base_black(int scene_w, int scene_h); -/* ---- perf counters (the 10 s `perf` line, compositor.c) ---- - * Everything the compositor thread spends in the driver, since the last vkp_perf_take(). Times in ns. */ struct vkp_perf { unsigned acquires, presents, waits; - int64_t acquire_ns, acquire_max_ns; /* vkAcquireNextImageKHR */ - int64_t present_ns, present_max_ns; /* vkQueuePresentKHR */ - int64_t wait_ns, wait_max_ns; /* vkWaitForFences on the compositor's own work */ - unsigned base_presents; /* black frames presented under the display layers */ - unsigned base_kept; /* layer frames that kept the black frame already there */ - unsigned gpu_release_waits; /* layer-buffer release fences waited for on the GPU */ + int64_t acquire_ns, acquire_max_ns; + int64_t present_ns, present_max_ns; + int64_t wait_ns, wait_max_ns; + unsigned base_presents; + unsigned base_kept; + unsigned gpu_release_waits; }; void vkp_perf_take(struct vkp_perf *out); -/* 1 when a release fence (sync_file) can be handed to the GPU as a wait (VK_KHR_external_semaphore_fd): - * the layer pool then reuses a buffer the display is still reading without blocking on the CPU. */ int vkp_can_wait_sync_fd(void); -/* ---- HDR composition (hdr_compose.h) ---- - * An HDR game that cannot be alone on its display layer: the scene is composed into ONE encoding. */ struct droiddeck_color; struct vkp_hdr_frame { - const unsigned char *is_hdr; /* per draw: 1 = its image holds PQ BT.2020 (the surface's description) */ - float peak_nits; /* the HDR content's peak, for a tone-map (max CLL / mastering max; 0 = 1000) */ - int tonemap; /* 1 = the drawer's HDR output switch is off: tone-map to SDR, never PQ */ - const struct droiddeck_color *color; /* the topmost HDR draw's description: an HDR10 swapchain's metadata */ + const unsigned char *is_hdr; + float peak_nits; + int tonemap; + const struct droiddeck_color *color; }; -/* vkp_render for a scene with HDR draws (frame generation): composed into PQ and presented through an - * HDR10 swapchain where the surface offers one (and hf->tonemap is 0), else tone-mapped into the ordinary - * one. *how = 1 HDR10, 2 tone-mapped, 0 the HDR pass was unavailable (shown the old way). Same return as - * vkp_render. */ int vkp_render_hdr(int scene_w, int scene_h, const struct vkp_draw *draws, int n, const struct vkp_hdr_frame *hf, int *how); -/* vkp_pass_begin for a scene with HDR draws: composed into a 10-bit picture - PQ BT.2020, or sRGB - * tone-mapped when hf->tonemap - the effects run on it in 10-bit, the result (rw x rh, A2B10G10R10) is - * left for vkp_pass_copy_to() into a layer buffer (a blit: 10-bit or 8-bit). -1 = not possible (nothing - * recorded). */ int vkp_pass_begin_hdr(int scene_w, int scene_h, const struct vkp_draw *draws, int n, const struct vkp_hdr_frame *hf, int *rw, int *rh); -/* ---- layer mode helpers (sc_layer.c; compositor thread) ---- */ -/* Whole-image copy of src into dst (a blit-destination dmabuf image), waited for on the CPU. - * wait_fd: a sync_file the copy must wait for before writing dst (the display's release fence of that - * buffer), -1 = none. Always consumed (handed to the GPU, or waited for and closed). */ int vkp_blit_image(struct vkp_image *src, struct vkp_image *dst, int wait_fd); -/* A client's GPU cursor (an imported dma-buf, often UBWC) read back as w*h 0xAARRGGBB pixels through a - * linear host-visible copy; waited for on the CPU. Compositor thread, between frames. 0 = ok. */ int vkp_image_readback(struct vkp_image *src, uint32_t *out, int max_px); -/* Refresh the scene -> output mapping for this scene size without presenting (creates the - * swapchain if needed, since the mapping is in output pixels). 0 = mapping valid. */ int vkp_update_map(int scene_w, int scene_h); -/* Map a draw through the current mapping: out = {src x0,y0,x1,y1 (image px), dst x0,y0,x1,y1 - * (output px)}, clipped like the blit path. 0 = nothing of it is visible. */ int vkp_map_draw(const struct vkp_draw *d, int out[8]); -/* The same for a bare w x h buffer shown over the whole scene (no vkp_image: zero-copy layers). */ int vkp_map_rect(int img_w, int img_h, int scene_w, int scene_h, int out[8]); -/* The output window frames go to (NULL = none); compositor thread. */ -/* Degrees the display rotates every layer we present by (0/90/180/270), -1 before the swapchain - * exists. From VkSurfaceCapabilitiesKHR::currentTransform, i.e. what the presentation engine says - * it does - never a device allowlist. The layer path uses it to decide whether a SECOND display - * layer is affordable on this display (sc_layer_present_overlay). */ int vkp_surface_rotation_degrees(void); ANativeWindow *vkp_window(void); -/* Fire the one-shot first-frame notification (layer mode presents outside vkp_render). */ void vkp_signal_first_frame(void); -/* ---- the compositor pass into a layer buffer (sc_layer.c; compositor thread) ---- - * Screen effects on the game's own Android layer: compose `draws` into the scene image and run the - * effects chain WITHOUT presenting, then copy the result into a gralloc layer buffer. Three steps - * because the chain's result size (a scaling mode resizes to the scene's mapped output size) is - * only known once the chain has run, and the layer buffer is allocated from it. - * begin: 0 = a pass is in progress, its result is *rw x *rh; -1 = not possible (draw the old way). - * Exactly one of copy_to (blit into dst, submit, wait; 0 = done) / abort (drop it unsubmitted) - * must follow a successful begin. The chain deliberately runs with NO swapchain image acquired - - * see the comment in vk_present.c. Frame generation is not run here (see WAYLAND_RUNTIME.md). */ int vkp_pass_begin(int scene_w, int scene_h, const struct vkp_draw *draws, int n, int *rw, int *rh); -/* wait_fd: as for vkp_blit_image (consumed in every case). */ int vkp_pass_copy_to(struct vkp_image *dst, int wait_fd); void vkp_pass_abort(void); -// Session log (compositor.c): one line to Download/Wayland-logs and logcat. void droiddeck_log(const char *tag, const char *fmt, ...) __attribute__((format(printf, 2, 3))); #endif diff --git a/app/src/main/cpp/waylandcomp/src/waylandcomp_jni.c b/app/src/main/cpp/waylandcomp/src/waylandcomp_jni.c index 8ec4b96b64..6a407088bb 100644 --- a/app/src/main/cpp/waylandcomp/src/waylandcomp_jni.c +++ b/app/src/main/cpp/waylandcomp/src/waylandcomp_jni.c @@ -1,9 +1,3 @@ -/* - * JNI entry for the embedded Wayland compositor (experimental parallel runtime). - * Starts the compositor on a dedicated thread (it blocks in the wl event loop). - * The render-to-Surface backend + input are added in the M4 phase; this brings up - * the server so a Wayland client (eventually winewayland.drv) can connect. - */ #include <jni.h> #include <errno.h> #include <stdbool.h> @@ -20,9 +14,11 @@ #include "ahb_swapchain.h" #include "sc_layer.h" #include "effects_chain.h" +#include "cardboard.h" #include "droiddeck_color.h" extern int droiddeck_wayland_run(void); +extern void droiddeck_wayland_set_scale_mode(int mode, int alignment); extern void droiddeck_wayland_send_pointer(int action, int x, int y); extern void droiddeck_wayland_send_touch(int action, int pointer_id, int x, int y); extern int droiddeck_cursor_snapshot(int *out, int cap); @@ -31,27 +27,27 @@ extern void droiddeck_wayland_send_key(int evdev, int state); extern void droiddeck_wayland_send_scene_input(int type, int a, int b); extern void droiddeck_wayland_vsync(int64_t frame_time_ns); extern void droiddeck_wayland_output_resized(void); +extern void droiddeck_wayland_set_output_refresh_rate(int mhz); extern volatile int g_fps_limit; extern volatile int g_hide_shell; extern volatile int g_zero_copy; extern volatile unsigned g_zero_copy_last; extern volatile int g_ubwc; extern volatile int g_no_render_node; -extern volatile int g_output_refresh_mhz; extern volatile int g_output_w, g_output_h; #define TAG "DroidDeckWayland" static JavaVM *g_jvm; -static volatile pid_t g_comp_tid; /* the compositor thread, for the app's ADPF hint session */ -static jclass g_compositor_cls; /* global ref */ -static jmethodID g_on_first_frame; /* static void onFirstFramePresented() */ -static jmethodID g_on_game_surface; /* static void onGameSurface(String, String) */ -static jmethodID g_on_game_frame; /* static void onGameFrame() */ -static jmethodID g_on_game_program; /* static void onGameProgram(int, String) */ -static jmethodID g_on_pointer_lock; /* static void onPointerLock(boolean, int, int) */ -static jmethodID g_on_clipboard; /* static void onClipboardText(byte[]) */ -static jmethodID g_on_text_input; /* static void onTextInput(boolean, String, int, int, int, int) */ +static volatile pid_t g_comp_tid; +static jclass g_compositor_cls; +static jmethodID g_on_first_frame; +static jmethodID g_on_game_surface; +static jmethodID g_on_game_frame; +static jmethodID g_on_game_program; +static jmethodID g_on_pointer_lock; +static jmethodID g_on_clipboard; +static jmethodID g_on_text_input; JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { (void)reserved; @@ -78,9 +74,6 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { return JNI_VERSION_1_6; } -/* Called from vk_present.c on the compositor thread when the first client frame is - * presented. Attaches to the JVM (this thread is a bare pthread) and calls back into - * Java so the launch overlay can dismiss. Fires exactly once. */ void droiddeck_on_first_frame(void) { if (!g_jvm || !g_compositor_cls || !g_on_first_frame) return; JNIEnv *env = NULL; @@ -95,8 +88,6 @@ void droiddeck_on_first_frame(void) { __android_log_print(ANDROID_LOG_INFO, TAG, "first client frame presented -> notified app"); } -/* The compositor thread stays attached once it first calls into Java: the HUD gets an upcall - * for every game frame. */ static __thread JNIEnv *t_env; static __thread int t_attached; @@ -111,7 +102,6 @@ static JNIEnv *thread_env(void) { return t_env = env; } -/* A window started presenting GPU frames (window = its description), or NULL when it closed. */ void droiddeck_on_game_surface(const char *window, const char *gpu) { JNIEnv *env; if (!g_compositor_cls || !g_on_game_surface || !(env = thread_env())) return; @@ -123,8 +113,6 @@ void droiddeck_on_game_surface(const char *window, const char *gpu) { if (jg) (*env)->DeleteLocalRef(env, jg); } -/* The program behind the game window that just started presenting: its Linux pid and executable name - * ("" = unknown). The app arms its launch-time CPU affinity on it. Compositor thread. */ void droiddeck_on_game_program(int pid, const char *program) { JNIEnv *env; if (!g_compositor_cls || !g_on_game_program || !(env = thread_env())) return; @@ -134,7 +122,6 @@ void droiddeck_on_game_program(int pid, const char *program) { if (jp) (*env)->DeleteLocalRef(env, jp); } -/* One GPU frame from that window. */ void droiddeck_on_game_frame(void) { JNIEnv *env; if (!g_compositor_cls || !g_on_game_frame || !(env = thread_env())) return; @@ -142,9 +129,6 @@ void droiddeck_on_game_frame(void) { if ((*env)->ExceptionCheck(env)) (*env)->ExceptionClear(env); } -/* A program locked the pointer (locked = 1; the app's input path switches to deltas) or the lock - * ended (locked = 0; x,y = where the pointer is now, in scene coordinates, for the app to re-sync - * its own pointer to). Compositor thread. */ void droiddeck_on_pointer_lock(int locked, int x, int y) { JNIEnv *env; if (!g_compositor_cls || !g_on_pointer_lock || !(env = thread_env())) return; @@ -152,8 +136,6 @@ void droiddeck_on_pointer_lock(int locked, int x, int y) { if ((*env)->ExceptionCheck(env)) (*env)->ExceptionClear(env); } -/* A program copied text (UTF-8, not NUL-terminated for the app's sake - a byte[] so emoji and - * NULs survive JNI). Compositor thread. */ void droiddeck_on_clipboard_text(const char *utf8, int len) { JNIEnv *env; if (!g_compositor_cls || !g_on_clipboard || !(env = thread_env())) return; @@ -165,8 +147,6 @@ void droiddeck_on_clipboard_text(const char *utf8, int len) { (*env)->DeleteLocalRef(env, arr); } -/* A program started (enabled) or stopped accepting IME text; x,y,w,h = its caret rectangle in - * scene pixels (all 0 = unknown). Compositor thread. */ void droiddeck_on_text_input(int enabled, const char *program, int x, int y, int w, int h) { JNIEnv *env; if (!g_compositor_cls || !g_on_text_input || !(env = thread_env())) return; @@ -177,16 +157,11 @@ void droiddeck_on_text_input(int enabled, const char *program, int x, int y, int if (jp) (*env)->DeleteLocalRef(env, jp); } -/* android.os.Process.THREAD_PRIORITY_URGENT_DISPLAY: the level the hwui RenderThread runs at. */ #define COMPOSITOR_NICE (-8) static void *comp_thread(void *arg) { (void)arg; __android_log_print(ANDROID_LOG_INFO, TAG, "compositor thread starting"); - /* Every buffer release, frame callback and layer transaction of the session goes through this one - * thread. It is named, so `ps -T`, the logs and the drawer's Thread Priority Boost (PerfPriority - * matches thread names) can find it, and it runs at display priority instead of whatever the - * thread that started it had. Never lowered: a thread that already runs hotter keeps its value. */ pthread_setname_np(pthread_self(), "wl-compositor"); const id_t tid = (id_t)gettid(); g_comp_tid = (pid_t)tid; @@ -224,15 +199,12 @@ static void start_thread(void) { __android_log_print(ANDROID_LOG_ERROR, TAG, "pthread_create failed"); } -/* The compositor thread's tid, or 0 before it starts. The app opens a PerformanceHintManager session - * on it and reports each presented frame's interval, so the governor sees a frame that ran long. */ JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeCompositorTid(JNIEnv *env, jclass clazz) { (void)env; (void)clazz; return (jint)g_comp_tid; } -/* Headless start (no output window) - used for bring-up tests. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeStart(JNIEnv *env, jclass clazz, jstring xdgRuntimeDir) { @@ -248,8 +220,6 @@ static char *dup_jstr(JNIEnv *env, jstring s) { return out; } -/* Start with a real output Surface + the container's Turnip driver (adrenotools). - * Frames committed by clients are composited to this Surface via Turnip. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeStartWithSurface( JNIEnv *env, jclass clazz, jobject surface, jstring xdgRuntimeDir, @@ -262,14 +232,12 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeStartWithSurface( free(dp); free(ln); free(nl); if (surface) { ANativeWindow *win = ANativeWindow_fromSurface(env, surface); - vk_present_set_window(win); /* backend acquires; released on nativeSetSurface(null) */ + vk_present_set_window(win); __android_log_print(ANDROID_LOG_INFO, TAG, "output window bound (%p)", (void *)win); } start_thread(); } -/* Inject a pointer event from the Android SurfaceView touch listener (UI thread). - * action: 0=down 1=move 2=up; x/y in output space (0..1919, 0..1079). */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSendPointer( JNIEnv *env, jclass clazz, jint action, jint x, jint y) { @@ -282,9 +250,6 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSendTouch( droiddeck_wayland_send_touch(action, pointer_id, x, y); } -/* The client's pointer image and whether it wants one at all (wl_pointer.set_cursor). - * out = [serial, hidden, w, h, hotspotX, hotspotY, ARGB pixels...]; returns ints written, 0 if the - * array is too small. The app polls the serial and only rebuilds its overlay when it changes. */ JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeCursorSnapshot( JNIEnv *env, jclass clazz, jintArray out) { @@ -297,98 +262,75 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeCursorSnapshot( return n; } -/* The serial nativeCursorSnapshot would return, without copying anything. */ JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeCursorSerial(JNIEnv *env, jclass clazz) { (void)env; (void)clazz; return droiddeck_cursor_serial(); } -/* Inject a key event. evdev = Linux input keycode (KEY_A=30…); state 1=down 0=up. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSendKey( JNIEnv *env, jclass clazz, jint evdev, jint state) { droiddeck_wayland_send_key(evdev, state); } -/* App X-server input in scene (virtual desktop) coordinates; see droiddeck_wayland_send_scene_input. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSendSceneInput( JNIEnv *env, jclass clazz, jint type, jint a, jint b) { droiddeck_wayland_send_scene_input(type, a, b); } -/* One screen refresh (Choreographer frame callback, UI thread): the compositor draws once. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeVsync(JNIEnv *env, jclass clazz, jlong frameTimeNanos) { droiddeck_wayland_vsync((int64_t)frameTimeNanos); } -/* Shortcut launches: don't draw explorer's windows (desktop, taskbar), like X11's unviewable classes. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetHideShell(JNIEnv *env, jclass clazz, jboolean hide) { g_hide_shell = hide ? 1 : 0; } -/* Zero-copy layer mode (DROIDDECK_WAYLAND_ZERO_COPY=1 at launch, the drawer's switch live): one fullscreen - * window on its own Android layer instead of the swapchain blit (sc_layer.c / ahb_swapchain.c). Any - * thread, any time: before the compositor starts it is the launch default; afterwards the compositor - * thread flips the state, tells the bound games to rebuild their swapchains for it and redraws. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetZeroCopy(JNIEnv *env, jclass clazz, jboolean on) { int live = droiddeck_get_display() != NULL; - if (!live) g_zero_copy = on ? 1 : 0; /* read by ahb_swapchain_init before the queue drains */ + if (!live) g_zero_copy = on ? 1 : 0; droiddeck_host_zero_copy(on ? 1 : 0, live); __android_log_print(ANDROID_LOG_INFO, TAG, "zero-copy layer mode %s%s", on ? "on" : "off", live ? " (live)" : ""); } -/* Milliseconds since the compositor last put a game frame on the layer without a copy; -1 = never - * this session. The drawer's status line ("switching..." until the frames arrive / stop). */ JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeZeroCopyLastFrameAgeMs(JNIEnv *env, jclass clazz) { return (jint)ahb_swapchain_last_frame_age_ms(); } -/* Zero-copy frames in the last completed 10 s stats window (on_stats_timer), for the drawer's live line. */ JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeZeroCopyFrames(JNIEnv *env, jclass clazz) { return (jint)g_zero_copy_last; } -/* Compressed (UBWC) game buffers: advertise DRM_FORMAT_MOD_QCOM_COMPRESSED on zwp_linux_dmabuf_v1 when - * the renderer's driver imports it (default on; DROIDDECK_WAYLAND_UBWC=0 = off). Set before the compositor - * starts. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetUbwc(JNIEnv *env, jclass clazz, jboolean on) { g_ubwc = on ? 1 : 0; __android_log_print(ANDROID_LOG_INFO, TAG, "compressed (UBWC) game buffers %s", on ? "on" : "off"); } -/* Debug: name no DRM device in the dma-buf feedback (DROIDDECK_WAYLAND_NO_RENDER_NODE=1), the way a - * phone that exposes no /dev/dri node to apps does. Set before the compositor starts. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetNoRenderNode(JNIEnv *env, jclass clazz, jboolean on) { g_no_render_node = on ? 1 : 0; if (on) __android_log_print(ANDROID_LOG_INFO, TAG, "debug: advertising no DRM device (main device 0:0)"); } -/* VRR / refresh-rate matching: the rate the app is voting for the panel, mirrored onto the game's - * own SurfaceControl layer. Under zero-copy the game's frames bypass the app's surface entirely, so - * without this SurfaceFlinger never sees the game's cadence. 0 = clear the vote. Any thread, any - * time; the compositor applies it with its next layer transaction and logs the change. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetLayerFrameRate(JNIEnv *env, jclass clazz, jfloat hz) { (void)env; (void)clazz; sc_layer_set_frame_rate((float)hz); } -/* The panel's refresh rate (Hz) for the advertised wl_output mode. Set before the compositor starts. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetOutputRefreshRate(JNIEnv *env, jclass clazz, jfloat hz) { - g_output_refresh_mhz = hz > 1.0f ? (int)(hz * 1000.0f + 0.5f) : 0; + droiddeck_wayland_set_output_refresh_rate(hz > 1.0f ? (int)(hz * 1000.0f + 0.5f) : 0); } -/* The container's screen size for the advertised wl_output mode. Set before the compositor starts. */ extern void vkp_reset_first_frame(void); JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeResetFirstFrame(JNIEnv *env, jclass clazz) { @@ -400,72 +342,94 @@ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetOutputSize(JNIEnv *env, jclass clazz, jint w, jint h) { g_output_w = w > 0 ? w : 0; g_output_h = h > 0 ? h : 0; + vkp_cardboard_set_render_height(h); } -/* The output's size changed while the compositor runs (a foldable opening or closing with the - * session following the screen): store it and have the compositor thread tell the clients. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeResizeOutput(JNIEnv *env, jclass clazz, jint w, jint h) { (void)env; (void)clazz; if (w <= 0 || h <= 0) return; g_output_w = w; g_output_h = h; + vkp_cardboard_set_render_height(h); droiddeck_wayland_output_resized(); } -/* Fullscreen mode + screen alignment (Container.FULLSCREEN_* / ALIGN_* values): how the scene is - * fitted onto the output. Any thread, any time; the next frame uses it. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetScaleMode(JNIEnv *env, jclass clazz, jint mode, jint alignment) { - vk_present_set_scale_mode(mode, alignment); + droiddeck_wayland_set_scale_mode(mode, alignment); __android_log_print(ANDROID_LOG_INFO, TAG, "scale mode %d alignment %d", mode, alignment); } -/* ---- screen effects (effects_chain.c): the X11 Vulkan renderer's post chain in the compositor. - * Any thread, any time; the compositor thread applies them on its next frame and logs one - * `effects` line per change. Values are 1:1 with VulkanRenderer's setters. */ -/* Scaling mode: 0=None 1=Linear 2=Nearest 3=SGSR 4=FSR 5=FSR Fit 6=Sharpen 7=NIS 8=SGSR HQ. */ +JNIEXPORT jboolean JNICALL +Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeGamePictureRect(JNIEnv *env, jclass clazz, jfloatArray out) { + if (!out || (*env)->GetArrayLength(env, out) < 4) return JNI_FALSE; + float rect[4]; + if (!vkp_game_picture_rect(rect)) return JNI_FALSE; + (*env)->SetFloatArrayRegion(env, out, 0, 4, rect); + return JNI_TRUE; +} + JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetUpscaler(JNIEnv *env, jclass clazz, jint mode) { vkp_effects_set_scaling(mode); } -/* The upscaler's sharpness slider 0..100 (RCAS lobe / SGSR edge / NIS sharpness). */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetUpscaleSharpness(JNIEnv *env, jclass clazz, jint sharpness) { vkp_effects_set_upscale_sharpness(sharpness); } -/* AMD CAS sharpen toggle + level 0..100 (0 = pass off). */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetCas(JNIEnv *env, jclass clazz, jboolean enabled, jint sharpness) { vkp_effects_set_cas(enabled ? 1 : 0, sharpness); } -/* Fake-HDR toggle. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetHdr(JNIEnv *env, jclass clazz, jboolean enabled) { vkp_effects_set_hdr(enabled ? 1 : 0); } -/* Terminal debanding toggle + strength 0..200 (100 = 1 LSB). */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetDeband(JNIEnv *env, jclass clazz, jboolean enabled, jint strength) { vkp_effects_set_deband(enabled ? 1 : 0, strength); } -/* Colour grade (slider units: brightness/contrast -100..100, gamma 0.5..3, saturation 0..200 %) and the - * FXAA / Toon / CRT / NTSC toggles - VulkanRenderer.setScreenEffects. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetScreenEffects(JNIEnv *env, jclass clazz, jfloat brightness, jfloat contrast, jfloat gamma, jfloat saturation, jboolean fxaa, jboolean toon, jboolean crt, jboolean ntsc) { vkp_effects_set_screen(brightness, contrast, gamma, saturation, fxaa ? 1 : 0, toon ? 1 : 0, crt ? 1 : 0, ntsc ? 1 : 0); } -/* One "display" line in the session log, written from Java: facts that live in the Android - * framework (the panel's HDR capability) rather than in the compositor. droiddeck_log() mirrors to - * logcat and appends to the session file when one is open, so this is safe at any point. */ +JNIEXPORT void JNICALL +Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetCardboard(JNIEnv *env, jclass clazz, jboolean enabled, + jint source, jfloat ipd, jfloat dist, jfloat width, jfloat k1, jfloat k2, jfloat fov, jfloat inset, jfloat chroma, + jboolean mono, jfloat hz) { + struct cardboard_params p = {.enabled = enabled ? 1 : 0, .source = source, .ipd_m = ipd, .screen_dist_m = dist, + .screen_width_m = width, .k1 = k1, .k2 = k2, .fov_deg = fov, .lens_inset = inset, + .chroma = chroma, .mono = mono ? 1 : 0, .display_hz = hz}; + vkp_cardboard_set(&p); +} + +JNIEXPORT void JNICALL +Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetCardboardPose(JNIEnv *env, jclass clazz, jfloatArray rot, + jboolean live) { + float m[9]; + if (!rot || (*env)->GetArrayLength(env, rot) < 9) return; + (*env)->GetFloatArrayRegion(env, rot, 0, 9, m); + vkp_cardboard_set_pose(m, live ? 1 : 0); +} + +JNIEXPORT void JNICALL +Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetCardboardPoseFile(JNIEnv *env, jclass clazz, jstring path) { + if (!path) return; + const char *p = (*env)->GetStringUTFChars(env, path, NULL); + if (!p) return; + vkp_cardboard_set_pose_file(p); + (*env)->ReleaseStringUTFChars(env, path, p); +} + JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeLogDisplay(JNIEnv *env, jclass clazz, jstring message) { char *s = dup_jstr(env, message); @@ -473,8 +437,6 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeLogDisplay(JNIEnv *e free(s); } -/* The same under the "perf" area: facts the app knows about the session's performance setup (the CPU - * cores the game is pinned to, say). Same safety as nativeLogDisplay. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeLogPerf(JNIEnv *env, jclass clazz, jstring message) { char *s = dup_jstr(env, message); @@ -482,9 +444,7 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeLogPerf(JNIEnv *env, free(s); } -/* ---- HDR10 output, round 1 (droiddeck_color.h / wl_color_mgmt.c) ---- */ -/* The opt-in: mode 0 off, 1 DROIDDECK_WAYLAND_HDR=1, 2 =force (testing). Before the compositor starts. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetHdrRequest(JNIEnv *env, jclass clazz, jint mode, jstring source, jboolean dxvkHdr, jboolean zeroCopyForced) { @@ -493,7 +453,6 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetHdrRequest(JNIEnv free(s); } -/* The game's display as android.view.Display reports it (before the start; again on every change). */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetHdrDisplay(JNIEnv *env, jclass clazz, jint id, jstring name, jstring formats, jboolean hdr10, jfloat maxLum, jfloat maxAvg, jfloat minLum, jboolean ratioAvailable, @@ -504,38 +463,32 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetHdrDisplay(JNIEnv free(n); free(f); } -/* One Display.getHdrSdrRatio() reading (listener = from the display's ratio listener). Any thread. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrSdrRatioSample(JNIEnv *env, jclass clazz, jfloat ratio, jboolean listener) { droiddeck_color_ratio_sample((float)ratio, listener ? 1 : 0); } -/* ms since an HDR frame last reached a display layer, -1 = never this session. Any thread. */ JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrLastFrameAgeMs(JNIEnv *env, jclass clazz) { return (jint)droiddeck_color_last_frame_age_ms(); } -/* -1 = not decided yet, 0 = closed, 1 = open. Any thread. */ JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrGateState(JNIEnv *env, jclass clazz) { return (jint)droiddeck_color_gate_state(); } -/* The session is ending: the "HDR on screen: ..." summary line. Any thread, once. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrSessionEnd(JNIEnv *env, jclass clazz) { droiddeck_color_session_end(); } -/* HDR frames really on screen right now (the HUD badge). Any thread. */ JNIEXPORT jboolean JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrOnScreen(JNIEnv *env, jclass clazz) { return droiddeck_color_hdr_on_screen() ? JNI_TRUE : JNI_FALSE; } -/* One "color" line in the session log from Java. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeLogColor(JNIEnv *env, jclass clazz, jstring message) { char *s = dup_jstr(env, message); @@ -543,8 +496,6 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeLogColor(JNIEnv *env free(s); } -/* One line in the session log under an area Java names ("gpu", "nvapi"): launch facts the app decides. - * The area is the log's 9-character column; an empty one reads "app". */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeLog(JNIEnv *env, jclass clazz, jstring area, jstring message) { char *a = dup_jstr(env, area), *s = dup_jstr(env, message); @@ -553,18 +504,15 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeLog(JNIEnv *env, jcl free(s); } -/* SDR content's level inside an HDR picture, in nits (default 203). */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetHdrSdrWhite(JNIEnv *env, jclass clazz, jfloat nits) { droiddeck_color_set_sdr_white((float)nits); } -/* The drawer's live HDR output switch: on = HDR frames as HDR, off = the same frames tone-mapped to SDR. - * Applied on the compositor thread (logged there, with a redraw). */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetHdrOutput(JNIEnv *env, jclass clazz, jboolean on) { if (droiddeck_get_display()) droiddeck_host_hdr_output(on ? 1 : 0); - else droiddeck_color_set_output(on ? 1 : 0); /* no compositor thread yet: nothing is drawing either */ + else droiddeck_color_set_output(on ? 1 : 0); } JNIEXPORT jboolean JNICALL @@ -572,7 +520,6 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrOutput(JNIEnv *en return droiddeck_color_output() ? JNI_TRUE : JNI_FALSE; } -/* Device evidence for the HDR lines: thermal status + headroom, brightness + mode. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrEnvSample(JNIEnv *env, jclass clazz, jint thermal, jfloat headroom, jint brightness, jint mode) { @@ -580,13 +527,11 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrEnvSample(JNIEnv (int)brightness, (int)mode); } -/* Display.getHighestHdrSdrRatio() (Android 16+), <= 0 = not reported. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetHdrHighestRatio(JNIEnv *env, jclass clazz, jfloat ratio) { droiddeck_color_set_highest_ratio((float)ratio == (float)ratio ? (float)ratio : -1.0f); } -/* The HDR headroom the screen surface should ask for (HDR10 swapchain frames in the last 1.5 s), 0 = none. */ JNIEXPORT jfloat JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrScreenHeadroom(JNIEnv *env, jclass clazz) { return (jfloat)droiddeck_color_screen_headroom(NULL, 0); @@ -599,25 +544,21 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrScreenHeadroomWhy return (*env)->NewStringUTF(env, why); } -/* The app's screen-surface request, for the no-headroom lines: > 0 asked, 0 cleared, -1 not possible. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrNoteHeadroomRequest(JNIEnv *env, jclass clazz, jfloat ratio) { droiddeck_color_note_headroom_request((float)ratio); } -/* 0 none, 1 HDR frames on screen with headroom, 2 HDR frames on screen without headroom for 5 s+. */ JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrState(JNIEnv *env, jclass clazz) { return (jint)droiddeck_color_hdr_state(); } -/* An HDR game's frames were shown tone-mapped to SDR in the last 1.5 s (the drawer's status line). */ JNIEXPORT jboolean JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeHdrToneMappedOnScreen(JNIEnv *env, jclass clazz) { return droiddeck_color_tonemapped_on_screen() ? JNI_TRUE : JNI_FALSE; } -/* The Look the controls currently match (null = Custom) - only named in the session log. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetLookName(JNIEnv *env, jclass clazz, jstring name) { char *s = dup_jstr(env, name); @@ -625,14 +566,12 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetLookName(JNIEnv * free(s); } -/* The in-game FPS limiter: frames per second, 0 = unlimited. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetFpsLimit(JNIEnv *env, jclass clazz, jint fps) { g_fps_limit = fps > 0 ? fps : 0; __android_log_print(ANDROID_LOG_INFO, TAG, "fps limit %d", fps); } -/* Swap/clear the output window (e.g. SurfaceView recreated/destroyed). */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetSurface( JNIEnv *env, jclass clazz, jobject surface) { @@ -643,8 +582,6 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetSurface( } } -/* ---- clipboard + text input (any thread; queued to the compositor thread) ---- - * Text crosses as UTF-8 byte arrays: JNI's modified UTF-8 would mangle emoji. */ static char *dup_bytes(JNIEnv *env, jbyteArray arr, int *len) { *len = 0; @@ -658,7 +595,12 @@ static char *dup_bytes(JNIEnv *env, jbyteArray arr, int *len) { return buf; } -/* Android's clipboard text becomes the guest's selection (empty/null = clear). */ +JNIEXPORT jboolean JNICALL +Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeWaitSurface( + JNIEnv *env, jclass clazz, jint timeout_ms) { + return vkp_wait_window_request(timeout_ms) ? JNI_TRUE : JNI_FALSE; +} + JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetClipboardText(JNIEnv *env, jclass clazz, jbyteArray utf8) { int len; @@ -667,7 +609,6 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetClipboardText(JNI free(buf); } -/* Soft-keyboard text committed to the program accepting text input. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeTextInputCommit(JNIEnv *env, jclass clazz, jbyteArray utf8) { int len; @@ -676,7 +617,6 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeTextInputCommit(JNIE free(buf); } -/* Composing (pre-edit) text; cursorBegin/cursorEnd are character indexes into it, -1 = end. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeTextInputPreedit(JNIEnv *env, jclass clazz, jbyteArray utf8, jint cursorBegin, jint cursorEnd) { @@ -686,15 +626,11 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeTextInputPreedit(JNI free(buf); } -/* The IME deleted characters around the caret. */ JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeTextInputDelete(JNIEnv *env, jclass clazz, jint before, jint after) { droiddeck_host_text_delete(before, after); } -/* KGSL's power control, off (the GPU held at its top clock) or back on. The property is the - * device's, not this process's: it outlives the fd and the app, so the caller clears it at stop - * and again at every app start. No root; the kernel's thermal limits still apply. */ extern void adrenotools_set_turbo(bool turbo); JNIEXPORT void JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetGpuTurbo(JNIEnv *env, jclass clazz, jboolean on) { @@ -702,10 +638,6 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetGpuTurbo(JNIEnv * adrenotools_set_turbo(on == JNI_TRUE); } -/* Raises one of our own processes or threads to `nice` with a bare setpriority(), never lowering - * it. android.os.Process.setThreadPriority is not used for this: it also moves the thread between - * scheduling groups by priority, and a guest process must stay where Android put the app. Returns - * the nice value it is left at, or 100 when it could not be read. */ JNIEXPORT jint JNICALL Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeRaisePriority(JNIEnv *env, jclass clazz, jint tid, jint nice) { (void)env; (void)clazz; @@ -717,3 +649,14 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeRaisePriority(JNIEnv int after = getpriority(PRIO_PROCESS, (id_t)tid); return after == -1 && errno != 0 ? 100 : after; } + +JNIEXPORT void JNICALL +Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetCardboardSpatialPose(JNIEnv *env, jclass clazz, + jfloatArray rot, jfloatArray pos, jboolean live) { + (void)clazz; + if (!rot || !pos || (*env)->GetArrayLength(env, rot) != 9 || (*env)->GetArrayLength(env, pos) != 3) return; + float m[9], p[3]; + (*env)->GetFloatArrayRegion(env, rot, 0, 9, m); + (*env)->GetFloatArrayRegion(env, pos, 0, 3, p); + vkp_cardboard_set_spatial_pose(m, p, live ? 1 : 0); +} diff --git a/app/src/main/cpp/waylandcomp/src/wl_clipboard.c b/app/src/main/cpp/waylandcomp/src/wl_clipboard.c index 7668090f75..6547db7db8 100644 --- a/app/src/main/cpp/waylandcomp/src/wl_clipboard.c +++ b/app/src/main/cpp/waylandcomp/src/wl_clipboard.c @@ -1,24 +1,3 @@ -/* - * Clipboard: wl_data_device_manager (core, v3) and zwlr_data_control_manager_v1 (v1), selection - * only - drag and drop is refused. Both protocols share one selection: - * - * owner CLIENT a program's wl_data_source / zwlr_data_control_source_v1 (its mime list) - * owner HOST text the app pushed from Android's clipboard (offered under the text mimes) - * owner NONE nothing - * - * Every selection change is announced to every data-control device (they see the selection - * regardless of focus, as the protocol says) and to the wl_data_devices of the client holding - * keyboard focus; a client also gets the current selection when its keyboard focus arrives. - * - * winewayland prefers zwlr_data_control (it then runs the clipboard from the desktop process - * without needing keyboard focus) and tags its own offers with application/x.winewayland.tag - * so it can ignore them when they come back; we pass mime lists through untouched. - * - * Guest → Android: when a program sets a selection with a text mime, the compositor asks for it - * once over a pipe on the event loop (non-blocking, 1 MiB cap, 3 s timeout) and hands the text - * to the app (droiddeck_on_clipboard_text → ClipboardManager). Android → guest: the app's text - * becomes the HOST selection; receive requests are answered with a non-blocking writer. - */ #define _GNU_SOURCE 1 #include <stdlib.h> #include <string.h> @@ -37,17 +16,17 @@ static struct wl_display *g_disp; enum owner { OWNER_NONE, OWNER_CLIENT, OWNER_HOST }; static enum owner g_owner; -static uint32_t g_gen; /* bumps on every selection change */ +static uint32_t g_gen; -struct source { /* a client's data source (either protocol) */ +struct source { struct wl_resource *res; int is_control; char *mimes[MAX_MIMES]; int nmimes; }; -static struct source *g_src; /* current CLIENT selection */ +static struct source *g_src; -static char *g_host_text; /* current HOST selection */ +static char *g_host_text; static size_t g_host_len; static const char *const k_text_mimes[] = { "text/plain;charset=utf-8", "text/plain", "UTF8_STRING", "TEXT", "STRING", NULL @@ -59,18 +38,17 @@ struct device { struct wl_list link; }; static struct wl_list g_devices; -static struct wl_client *g_kb_client; /* keyboard focus holder */ +static struct wl_client *g_kb_client; struct offer { struct wl_resource *res; int is_control; - uint32_t gen; /* the selection this offer describes */ + uint32_t gen; }; -static char *g_last_guest_text; /* echo guard: the last text handed to Android */ +static char *g_last_guest_text; static size_t g_last_guest_len; -/* ------------------------------------------------------------------ helpers */ static int is_text_mime(const char *m) { for (int i = 0; k_text_mimes[i]; i++) if (!strcmp(m, k_text_mimes[i])) return 1; @@ -94,7 +72,6 @@ static void source_send_cancelled(struct source *s) { else wl_data_source_send_cancelled(s->res); } -/* ------------------------------------------------------------------ host → client writer */ struct writer { int fd; @@ -115,9 +92,9 @@ static int writer_pump(struct writer *w) { while (w->off < w->len) { ssize_t n = write(w->fd, w->data + w->off, w->len - w->off); if (n > 0) { w->off += (size_t)n; continue; } - if (n < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return 0; /* wait */ + if (n < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return 0; if (n < 0 && errno == EINTR) continue; - break; /* gone */ + break; } return 1; } @@ -150,13 +127,12 @@ static void writer_start(int fd, const char *data, size_t len) { if (w->timer) wl_event_source_timer_update(w->timer, CLIP_WRITE_TIMEOUT_MS); } -/* ------------------------------------------------------------------ client → host reader */ struct reader { int fd; char *buf; size_t len; - const char *mime; /* points into the source's list */ + const char *mime; struct wl_event_source *src, *timer; }; static struct reader *g_reader; @@ -202,7 +178,7 @@ static int on_reader_readable(int fd, uint32_t mask, void *data) { r->buf = nb; ssize_t n = read(fd, r->buf + r->len, chunk); if (n > 0) { r->len += (size_t)n; continue; } - if (n == 0) { reader_finish(r); return 0; } /* EOF */ + if (n == 0) { reader_finish(r); return 0; } if (errno == EAGAIN || errno == EWOULDBLOCK) { if (mask & WL_EVENT_HANGUP) { reader_finish(r); return 0; } return 0; @@ -220,14 +196,13 @@ static int on_reader_timeout(void *data) { return 0; } -/* Ask the current client source for its text, once. */ static void read_client_text(void) { const char *mime; int p[2]; if (g_reader) reader_free(g_reader); if (!g_src || !(mime = source_text_mime(g_src))) return; if (pipe2(p, O_CLOEXEC) != 0) return; - fcntl(p[0], F_SETFL, fcntl(p[0], F_GETFL) | O_NONBLOCK); /* our end only; the client writes blocking */ + fcntl(p[0], F_SETFL, fcntl(p[0], F_GETFL) | O_NONBLOCK); struct reader *r = calloc(1, sizeof(*r)); if (!r) { close(p[0]); close(p[1]); return; } r->fd = p[0]; @@ -242,13 +217,12 @@ static void read_client_text(void) { wl_display_flush_clients(g_disp); } -/* ------------------------------------------------------------------ offers */ static void offer_res_destroy(struct wl_resource *r) { free(wl_resource_get_user_data(r)); } static void offer_receive(struct wl_client *c, struct wl_resource *r, const char *mime, int32_t fd) { struct offer *o = wl_resource_get_user_data(r); - if (!o || o->gen != g_gen) { close(fd); return; } /* stale offer */ + if (!o || o->gen != g_gen) { close(fd); return; } if (g_owner == OWNER_HOST) { if (is_text_mime(mime)) { droiddeck_log("clipboard", "Android clipboard → guest (%zu bytes) for %s", g_host_len, droiddeck_client_name(c)); @@ -257,7 +231,7 @@ static void offer_receive(struct wl_client *c, struct wl_resource *r, const char close(fd); } } else if (g_owner == OWNER_CLIENT && g_src) { - source_send_send(g_src, mime, fd); /* libwayland dups the fd */ + source_send_send(g_src, mime, fd); close(fd); wl_display_flush_clients(g_disp); } else { @@ -277,7 +251,6 @@ static const struct zwlr_data_control_offer_v1_interface control_offer_impl = { .receive = offer_receive, .destroy = offer_destroy, }; -/* Tell one device what the selection is now (a fresh offer, or nothing). */ static void device_send_selection(struct device *d) { struct wl_client *c = wl_resource_get_client(d->res); if (g_owner == OWNER_NONE) { @@ -315,8 +288,6 @@ static void device_send_selection(struct device *d) { else wl_data_device_send_selection(d->res, o->res); } -/* The selection changed: every data-control device hears it; wl_data_devices only if their - * client holds keyboard focus. */ static void broadcast_selection(void) { struct device *d; g_gen++; @@ -336,7 +307,6 @@ void droiddeck_clipboard_keyboard_focus(struct wl_client *client) { if (!d->is_control && wl_resource_get_client(d->res) == client) device_send_selection(d); } -/* ------------------------------------------------------------------ sources */ static void source_res_destroy(struct wl_resource *r) { struct source *s = wl_resource_get_user_data(r); @@ -380,7 +350,6 @@ static void create_source(struct wl_client *c, uint32_t id, int is_control, uint s, source_res_destroy); } -/* A device set (or cleared) the selection. */ static void set_selection(struct wl_client *c, struct wl_resource *source_res) { struct source *s = source_res ? wl_resource_get_user_data(source_res) : NULL; if (s && s == g_src) return; @@ -404,7 +373,6 @@ static void set_selection(struct wl_client *c, struct wl_resource *source_res) { read_client_text(); } -/* ------------------------------------------------------------------ devices */ static void device_res_destroy(struct wl_resource *r) { struct device *d = wl_resource_get_user_data(r); @@ -429,7 +397,6 @@ static void control_device_set_selection(struct wl_client *c, struct wl_resource set_selection(c, source); } static void control_device_set_primary(struct wl_client *c, struct wl_resource *r, struct wl_resource *source) { - /* No primary selection on Android; a source given here just gets cancelled. */ if (source) { struct source *s = wl_resource_get_user_data(source); if (s && s != g_src) source_send_cancelled(s); @@ -455,11 +422,9 @@ static void create_device(struct wl_client *c, uint32_t id, int is_control, uint : (const void *)&data_device_impl, d, device_res_destroy); wl_list_insert(&g_devices, &d->link); - /* Data-control devices see the selection at once; wl_data_devices when focus arrives. */ if (is_control || (g_kb_client && c == g_kb_client)) device_send_selection(d); } -/* ------------------------------------------------------------------ managers */ static void dm_create_source(struct wl_client *c, struct wl_resource *r, uint32_t id) { create_source(c, id, 0, wl_resource_get_version(r)); @@ -493,12 +458,10 @@ static void bind_data_control_manager(struct wl_client *c, void *data, uint32_t wl_resource_set_implementation(r, &cm_impl, NULL, NULL); } -/* ------------------------------------------------------------------ host side */ -/* Android's clipboard text (compositor thread, via the host queue). Takes the buffer. */ void clipboard_host_text(char *utf8, size_t len) { if (len && g_last_guest_text && len == g_last_guest_len && !memcmp(utf8, g_last_guest_text, len)) { - free(utf8); /* our own copy coming back: not a change */ + free(utf8); return; } if (len && g_owner == OWNER_HOST && g_host_len == len && !memcmp(utf8, g_host_text, len)) { diff --git a/app/src/main/cpp/waylandcomp/src/wl_color_mgmt.c b/app/src/main/cpp/waylandcomp/src/wl_color_mgmt.c index f18aab9f4c..1ba254c4cd 100644 --- a/app/src/main/cpp/waylandcomp/src/wl_color_mgmt.c +++ b/app/src/main/cpp/waylandcomp/src/wl_color_mgmt.c @@ -1,16 +1,3 @@ -/* - * wp_color_manager_v1 (wayland-protocols staging color-management-v1, version 1) - the subset Mesa's - * Wayland WSI binds - plus the HDR gate, the per-surface image descriptions and the session log's - * HDR evidence. See droiddeck_color.h for the design and HDR_RECON.md for why it is shaped this way. - * - * Strictness policy. A protocol error disconnects the client, and the client here is a GAME, so - * errors are only raised where the protocol leaves no choice and a conforming client can never hit - * them: a request gated on a feature we did not advertise, a property set twice, an incomplete - * parameter set, a description that is not ready, an intent we did not advertise. Everything a - * conforming client CAN produce on a bad day is accepted and logged instead: out-of-range HDR - * metadata is dropped (Android gets none rather than nonsense), a second colour-management object - * for the same surface replaces the first, a request on an inert object is ignored. - */ #define _GNU_SOURCE #include "droiddeck_color.h" #include "droiddeck_ext.h" @@ -29,7 +16,6 @@ extern volatile int g_zero_copy; #define TAG "color" -/* AHARDWAREBUFFER_FORMAT_* (android/hardware_buffer.h), for the log only. */ const char *droiddeck_ahb_format_name(uint32_t f) { static char other[32]; switch (f) { @@ -80,24 +66,24 @@ static const char *dataspace_name(int32_t ds) { } } -/* ---------------------------------------------------------------- request (app) + gate */ -static pthread_mutex_t g_mu = PTHREAD_MUTEX_INITIALIZER; /* g_req, g_hdr (app threads + compositor) */ + +static pthread_mutex_t g_mu = PTHREAD_MUTEX_INITIALIZER; static struct { - int mode; /* 0 off, 1 on, 2 forced */ + int mode; char source[64]; int dxvk_hdr, zero_copy_forced; int display_known; int display_id, hdr10, ratio_available, api; char display_name[96], formats[96]; float max_lum, max_avg, min_lum, ratio; - float highest_ratio; /* Display.getHighestHdrSdrRatio() (Android 16+), < 0 = not reported */ + float highest_ratio; } g_req = {.highest_ratio = -1.0f}; -static _Atomic int g_gate = -1; /* -1 undecided, 0 closed, 1 open */ -static char g_gate_why[320]; /* the closed gate's reason (for the summary) */ -static _Atomic int g_output_on = 1; /* the drawer's HDR output switch (per session, starts on) */ +static _Atomic int g_gate = -1; +static char g_gate_why[320]; +static _Atomic int g_output_on = 1; void droiddeck_color_set_request(int mode, const char *source, int dxvk_hdr, int zero_copy_forced) { pthread_mutex_lock(&g_mu); @@ -106,7 +92,7 @@ void droiddeck_color_set_request(int mode, const char *source, int dxvk_hdr, int g_req.dxvk_hdr = dxvk_hdr ? 1 : 0; g_req.zero_copy_forced = zero_copy_forced ? 1 : 0; pthread_mutex_unlock(&g_mu); - atomic_store(&g_output_on, 1); /* the drawer's switch is per session and starts on */ + atomic_store(&g_output_on, 1); } void droiddeck_color_set_display(int id, const char *name, const char *formats, int hdr10, float max_lum, @@ -123,8 +109,6 @@ void droiddeck_color_set_display(int id, const char *name, const char *formats, g_req.ratio = ratio; g_req.api = api; pthread_mutex_unlock(&g_mu); - /* The gate is decided once, when the compositor starts: a display that changes under a running - * session is recorded, and what it means is said out loud. */ if (was_known && atomic_load(&g_gate) >= 0 && (was_hdr10 != (hdr10 ? 1 : 0) || was_id != id)) { if (atomic_load(&g_gate) == 1 && !hdr10) droiddeck_log(TAG, "the game is now on \"%s\" (display %d), which reports no HDR10: HDR frames stay tagged " @@ -139,48 +123,39 @@ void droiddeck_color_set_display(int id, const char *name, const char *formats, int droiddeck_color_gate_state(void) { return atomic_load(&g_gate); } int droiddeck_color_hdr_open(void) { return atomic_load(&g_gate) == 1; } -/* ---------------------------------------------------------------- HDR evidence (summary) */ static struct { - unsigned descs; /* HDR image descriptions made ready */ - unsigned applied; /* commits that made one current on a surface */ - char applied_who[160]; /* the last surface that got one */ - uint64_t layer_frames, layer_10bit, layer_copy8, copy_frames; /* layer_frames = every frame shown AS HDR */ + unsigned descs; + unsigned applied; + char applied_who[160]; + uint64_t layer_frames, layer_10bit, layer_copy8, copy_frames; uint64_t composed, swapchain, tonemapped; - uint64_t tm_off; /* of `tonemapped`: while the drawer's HDR output switch was off */ - unsigned output_offs; /* times the switch was turned off */ + uint64_t tm_off; + unsigned output_offs; unsigned win_layer, win_copy, win_copy8, win_zc, win_composed, win_swapchain, win_tonemapped; char copy_reason[160]; char layer_fmt[48]; int ratio_n, win_ratio_n, ratio_live_n; float ratio_min, ratio_max, ratio_last, win_ratio_min, win_ratio_max, ratio_logged; - float ratio_live_max; /* highest reading taken WHILE HDR frames were on screen (the verdict's) */ + float ratio_live_max; int64_t ratio_logged_ns, ratio_periodic_ns; - /* Live headroom. The display may grant HDR frames no headroom at all while they are on screen - seen - * on the Fold while the screen was being RECORDED (Android turns HDR headroom off for a recording, - * which is SDR), and plausibly with the brightness slider at maximum (SDR white already at the panel's - * limit) - so "the ratio rose once" is not enough for a reader at minute 3: time with HDR frames on - * screen, the part of it with the ratio above 1, and the current no-headroom streak. */ int64_t prev_sample_ns; int prev_live; float prev_ratio; int64_t live_ns, headroom_ns; - int64_t nohead_since_ns; /* HDR frames on screen and ratio <= 1.01 since then (0 = not now) */ - int nohead_said; /* the streak's "no headroom" line is written */ + int64_t nohead_since_ns; + int nohead_said; char verdict[512]; } g_hdr; static _Atomic int64_t g_last_frame_ns; -static _Atomic int64_t g_last_tm_ns; /* the last HDR frame shown tone-mapped to SDR */ +static _Atomic int64_t g_last_tm_ns; -/* What the device says beside the headroom (the app, non-root APIs; droiddeck_color_env_*). The Fold showed - * three ways to lose HDR headroom with HDR frames on screen - a screen recording, heat under load, and - * (plausibly) the brightness slider at maximum - so every no-headroom line carries this. Under g_mu. */ static struct { int known; - int thermal; /* PowerManager THERMAL_STATUS_* (0 none .. 6 shutdown), -1 unknown */ - float headroom; /* PowerManager.getThermalHeadroom(10), < 0 = not available */ - int brightness; /* Settings.System.SCREEN_BRIGHTNESS (0..255), -1 unknown */ - int bmode; /* SCREEN_BRIGHTNESS_MODE: 1 automatic, 0 manual, -1 unknown */ - float requested; /* the last HDR headroom asked for (layer or screen surface): > 0 the ratio, - * 0 none asked, -1 the API is missing on this Android (< 15) */ + int thermal; + float headroom; + int brightness; + int bmode; + float requested; + } g_env = {0, -1, -1.0f, -1, -1, 0.0f}; static const char *thermal_name(int t) { @@ -190,7 +165,6 @@ static const char *thermal_name(int t) { } } -/* "thermal MODERATE (headroom 0.83), brightness 180/255 manual". Caller holds g_mu. */ static void env_text_locked(char *out, size_t n) { char t[48], b[40]; if (g_env.thermal < 0) snprintf(t, sizeof(t), "thermal ?"); @@ -203,9 +177,6 @@ static void env_text_locked(char *out, size_t n) { snprintf(out, n, "%s, %s", t, b); } -/* What the evidence says about headroom lost with HDR frames on screen. A screenshot or a screen recording - * is not detected in this build (that needs extra permissions), so it is named as a possibility when - * nothing the app can measure explains the loss. Caller holds g_mu. */ static void nohead_causes_locked(char *out, size_t n, int brief) { const char *parts[2]; char hot[48]; @@ -214,7 +185,6 @@ static void nohead_causes_locked(char *out, size_t n, int brief) { snprintf(hot, sizeof(hot), "the device is hot (thermal %s)", thermal_name(g_env.thermal)); parts[np++] = hot; } - /* Maximum brightness only counts when it is MANUAL: the Fold kept 3.00 of headroom at 255 auto. */ if (g_env.brightness >= 250 && g_env.bmode == 0) parts[np++] = "brightness at maximum (manual)"; if (np == 1) snprintf(out, n, "likely %s", parts[0]); else if (np == 2) snprintf(out, n, "likely %s and %s", parts[0], parts[1]); @@ -235,11 +205,11 @@ static void nohead_causes_locked(char *out, size_t n, int brief) { snprintf(out, n, "a screenshot or screen recording, heat, or manual brightness at maximum"); } -/* ---- the explicit HDR headroom request (API 35; sc_layer.c for the game layer, the app for the screen - * surface): content peak / SDR white, capped at the display's highest ratio when it reports one. */ -static _Atomic int g_screen_hr_x1000; /* the screen surface's wanted headroom x1000 (HDR10 swapchain) */ -static _Atomic int64_t g_screen_hr_ns; /* the last HDR10-swapchain frame */ -static char g_screen_hr_why[200]; /* under g_mu */ + + +static _Atomic int g_screen_hr_x1000; +static _Atomic int64_t g_screen_hr_ns; +static char g_screen_hr_why[200]; static float peak_of(const struct droiddeck_color *c, float disp_max, const char **src) { if (c->max_cll > 0.0f) { *src = "max CLL"; return c->max_cll; } @@ -308,15 +278,12 @@ int droiddeck_color_last_frame_age_ms(void) { return age > 0x7fffffff ? 0x7fffffff : (int)age; } -/* The one-line answer a tester quotes. Caller holds g_mu. */ static void verdict_locked(char *out, size_t size) { int gate = atomic_load(&g_gate); if (gate < 0) { snprintf(out, size, "not decided yet (the compositor has not started)"); return; } if (gate == 0) { snprintf(out, size, "no, because %s", g_gate_why); return; } if (g_hdr.layer_frames) { const char *who = g_hdr.applied_who[0] ? g_hdr.applied_who : "the game"; - /* Only the paths that carried frames, so the ratio, the share and the device evidence still fit - * the log line. */ char paths[200] = ""; size_t pp = 0; const uint64_t zc_other = g_hdr.layer_frames - g_hdr.layer_10bit - g_hdr.layer_copy8 - g_hdr.composed - @@ -336,12 +303,7 @@ static void verdict_locked(char *out, size_t size) { (unsigned long long)g_hdr.layer_frames, who, paths); char env[128] = "", causes[256] = ""; if (g_env.known) env_text_locked(env, sizeof(env)); - /* Brief: the verdict has to fit one log line with everything else in it. */ if (g_hdr.nohead_said) nohead_causes_locked(causes, sizeof(causes), 1); - /* Only readings taken while HDR frames were on screen count: the ratio says what the display did - * with THEM, not with whatever else was up at another moment. And the share of that time with any - * headroom, plus where it stands now: a ratio that rose once and then fell to 1.00 for minutes is - * not the same answer. */ char share[384] = ""; const long long live_s = (long long)(g_hdr.live_ns / 1000000000LL); if (g_hdr.live_ns >= 1000000000LL) @@ -351,7 +313,6 @@ static void verdict_locked(char *out, size_t size) { (long long)(g_hdr.headroom_ns / 1000000000LL), live_s, g_hdr.ratio_last, g_hdr.nohead_said ? " - no headroom now: " : "", g_hdr.nohead_said ? causes : "", env[0] ? " [" : "", env, env[0] ? "]" : ""); - /* The display's own ceiling (Android 16+) and what was asked for, where known. */ char ceil[80] = "", req[48] = ""; if (g_req.highest_ratio > 0.0f) snprintf(ceil, sizeof(ceil), ", highest possible %.2f", g_req.highest_ratio); if (g_env.requested > 0.0f) snprintf(req, sizeof(req), ", %.1fx requested", g_env.requested); @@ -400,7 +361,6 @@ static void verdict_locked(char *out, size_t size) { "image description (is DXVK_HDR=1 set, and is HDR switched on in the game's own display options?)"); } -/* Log the verdict when it changed (force = log it even if not). */ static void log_verdict(int force) { char v[512]; pthread_mutex_lock(&g_mu); @@ -435,7 +395,7 @@ void droiddeck_color_frame_shown(const struct droiddeck_color *c, int path, uint snprintf(g_hdr.layer_fmt, sizeof(g_hdr.layer_fmt), "HDR10 swapchain"); atomic_store(&g_screen_hr_ns, now_ns()); break; - default: /* DROIDDECK_HDR_TONEMAPPED: shown, but not as HDR */ + default: g_hdr.tonemapped++; g_hdr.win_tonemapped++; if (!atomic_load(&g_output_on)) g_hdr.tm_off++; pthread_mutex_unlock(&g_mu); @@ -447,8 +407,6 @@ void droiddeck_color_frame_shown(const struct droiddeck_color *c, int path, uint pthread_mutex_unlock(&g_mu); atomic_store(&g_last_frame_ns, now_ns()); if (path == DROIDDECK_HDR_SWAPCHAIN) { - /* The screen surface's headroom request (the app applies it): worked out again when the - * description changes, else once a second. */ static uint32_t ident; static int64_t calc_ns; const int64_t t = now_ns(); @@ -494,7 +452,6 @@ void droiddeck_color_ratio_sample(float ratio, int listener) { pthread_mutex_lock(&g_mu); was = g_hdr.ratio_logged; if (ratio > 0.0f) { - /* Time with HDR frames on screen, credited to the reading that stood over it. */ if (g_hdr.prev_sample_ns && g_hdr.prev_live) { int64_t dt = t - g_hdr.prev_sample_ns; if (dt > 0 && dt < 3000000000LL) { @@ -520,8 +477,6 @@ void droiddeck_color_ratio_sample(float ratio, int listener) { if (!g_hdr.ratio_live_n || ratio > g_hdr.ratio_live_max) g_hdr.ratio_live_max = ratio; g_hdr.ratio_live_n++; } - /* A change is logged at once (at most 4 lines a second); while HDR frames are on screen the - * steady value is restated every 5 s, so a tester's log shows it holding, not just moving. */ float moved = ratio - g_hdr.ratio_logged; if (moved < 0.0f) moved = -moved; if ((g_hdr.ratio_n == 1 || moved >= 0.02f) && t - g_hdr.ratio_logged_ns > 250000000LL) @@ -562,7 +517,7 @@ void droiddeck_color_stats_tick(void) { char line[512]; int any; pthread_mutex_lock(&g_mu); - any = g_hdr.win_layer || g_hdr.win_copy || g_hdr.win_tonemapped; /* the ratio alone is logged when it moves */ + any = g_hdr.win_layer || g_hdr.win_copy || g_hdr.win_tonemapped; if (any) { char ratio[256] = "no HDR/SDR ratio reading", env[128] = "", causes[256] = ""; if (g_env.known) env_text_locked(env, sizeof(env)); @@ -591,7 +546,7 @@ int droiddeck_color_hdr_state(void) { int age = droiddeck_color_last_frame_age_ms(); if (age < 0 || age >= 1500) return 0; pthread_mutex_lock(&g_mu); - int confirmed = !g_hdr.ratio_n || g_hdr.ratio_last > 1.01f; /* no ratio on this display: the tag is all there is */ + int confirmed = !g_hdr.ratio_n || g_hdr.ratio_last > 1.01f; int nohead = g_hdr.nohead_said; pthread_mutex_unlock(&g_mu); return confirmed ? 1 : nohead ? 2 : 0; @@ -617,7 +572,7 @@ int droiddeck_color_requested(void) { int droiddeck_color_output(void) { return atomic_load(&g_output_on); } void droiddeck_color_env_sample(int thermal, float headroom, int brightness, int bmode) { - if (atomic_load(&g_gate) != 1) return; /* evidence for the HDR lines only */ + if (atomic_load(&g_gate) != 1) return; char msg[2][200]; int nmsg = 0; pthread_mutex_lock(&g_mu); @@ -656,7 +611,6 @@ int droiddeck_color_tonemapped_on_screen(void) { void droiddeck_color_set_output(int on) { on = on ? 1 : 0; if (atomic_load(&g_gate) != 1) { - /* The drawer only shows the switch in sessions whose gate is open; say so if it ever gets here. */ droiddeck_log(TAG, "HDR output switch (%s) ignored: HDR is not open in this session", on ? "on" : "off"); return; } @@ -674,7 +628,7 @@ void droiddeck_color_set_output(int on) { droiddeck_log(TAG, "HDR output switched OFF in the drawer: HDR frames are tone-mapped to SDR from the next frame " "(%s; %s). The game is not told - it keeps rendering HDR; its own HDR setting and DXVK_HDR are " "untouched", who, age >= 0 && age < 1500 ? "HDR frames were on screen" : "no HDR frames on screen just now"); - droiddeck_request_redraw(); /* a paused game commits nothing: show the change now */ + droiddeck_request_redraw(); } static _Atomic int g_session_ended; @@ -685,19 +639,16 @@ void droiddeck_color_session_end(void) { pthread_mutex_lock(&g_mu); int asked = g_req.mode != 0; pthread_mutex_unlock(&g_mu); - if (asked) log_verdict(1); /* nobody asked for HDR: no summary to write */ + if (asked) log_verdict(1); } -/* ---------------------------------------------------------------- image descriptions */ struct cm_desc { - int refs; /* protocol objects + surfaces (pending / current) */ + int refs; struct droiddeck_color c; - /* Set on the output / preferred descriptions the compositor serves (never on one a game built - * from parameters): get_information is answered rather than refused, with these as the target. */ int informative; - float ref_lum; /* nits: PQ reference white */ - float disp_min_lum, disp_max_lum; /* nits: the display's own volume, from the app */ + float ref_lum; + float disp_min_lum, disp_max_lum; }; static uint32_t g_next_identity = 1; @@ -705,11 +656,10 @@ static uint32_t g_next_identity = 1; static struct cm_desc *desc_ref(struct cm_desc *d) { if (d) d->refs++; return d; } static void desc_unref(struct cm_desc *d) { if (d && --d->refs <= 0) free(d); } -/* The parametric creator's collected properties. 0 / has_* = 0 means unset. */ struct cm_params { uint32_t tf, primaries; int has_mprim; int32_t mprim[8]; - int has_mlum; uint32_t mlum_min, mlum_max; /* min is cd/m² * 10000, max is cd/m² */ + int has_mlum; uint32_t mlum_min, mlum_max; int has_cll; uint32_t cll; int has_fall; uint32_t fall; }; @@ -718,7 +668,6 @@ static void image_description_destroy_req(struct wl_client *c, struct wl_resourc static void image_description_get_information(struct wl_client *c, struct wl_resource *r, uint32_t id) { struct cm_desc *d = wl_resource_get_user_data(r); if (!d || !d->informative) { - /* Built by the game from parameters: the protocol says it knows what it asked for. */ wl_resource_post_error(r, WP_IMAGE_DESCRIPTION_V1_ERROR_NO_INFORMATION, "get_information is not allowed on this image description"); return; @@ -726,7 +675,7 @@ static void image_description_get_information(struct wl_client *c, struct wl_res struct wl_resource *info = wl_resource_create(c, &wp_image_description_info_v1_interface, wl_resource_get_version(r), id); if (!info) { wl_client_post_no_memory(c); return; } - wl_resource_set_implementation(info, NULL, NULL, NULL); /* events only */ + wl_resource_set_implementation(info, NULL, NULL, NULL); const struct droiddeck_color *col = &d->c; int32_t xy[8] = { (int32_t)(col->red[0] * 1e6f + 0.5f), (int32_t)(col->red[1] * 1e6f + 0.5f), (int32_t)(col->green[0] * 1e6f + 0.5f), (int32_t)(col->green[1] * 1e6f + 0.5f), @@ -735,13 +684,11 @@ static void image_description_get_information(struct wl_client *c, struct wl_res wp_image_description_info_v1_send_primaries(info, xy[0], xy[1], xy[2], xy[3], xy[4], xy[5], xy[6], xy[7]); wp_image_description_info_v1_send_primaries_named(info, col->primaries); wp_image_description_info_v1_send_tf_named(info, col->tf); - /* min is cd/m² * 10000, max and reference are cd/m² */ wp_image_description_info_v1_send_luminances(info, (uint32_t)(col->min_lum * 10000.0f + 0.5f), (uint32_t)(col->max_lum + 0.5f), (uint32_t)(d->ref_lum + 0.5f)); wp_image_description_info_v1_send_target_primaries(info, xy[0], xy[1], xy[2], xy[3], xy[4], xy[5], xy[6], xy[7]); wp_image_description_info_v1_send_target_luminance(info, (uint32_t)(d->disp_min_lum * 10000.0f + 0.5f), (uint32_t)(d->disp_max_lum + 0.5f)); - /* done is a destructor event: the client's proxy is gone once it arrives, so the resource goes too. */ wp_image_description_info_v1_send_done(info); wl_resource_destroy(info); } @@ -753,15 +700,6 @@ static void image_description_resource_destroy(struct wl_resource *r) { desc_unref(wl_resource_get_user_data(r)); } -/* What the display layer shows while the gate is open - BT.2020 + PQ over the display's own - * volume - served as the output's image description and as every surface's preferred one. It is - * ready at once and open to get_information, and that is not optional: gamescope asks for the - * preferred description and for its information in the same breath, before any roundtrip - * (WaylandBackend.cpp, UpdateWPPreferredColorManagement). Answering 'failed' and then refusing - * get_information with a protocol error severs its connection mid-roundtrip - the Fold 8 on r5: - * "Broken pipe", signal 6 - while a device with the gate closed never offers colour management - * and never gets here. gamescope reads only the luminances from the answer (reference white vs - * the display's peak) to decide whether it exposes HDR to what it hosts. */ static void make_output_description(struct wl_client *c, struct wl_resource *parent, uint32_t id, const char *what) { struct cm_desc *d = calloc(1, sizeof(*d)); if (!d) { wl_client_post_no_memory(c); return; } @@ -774,9 +712,9 @@ static void make_output_description(struct wl_client *c, struct wl_resource *par col->has_st2086 = 1; col->red[0] = 0.708f; col->red[1] = 0.292f; col->green[0] = 0.170f; col->green[1] = 0.797f; col->blue[0] = 0.131f; col->blue[1] = 0.046f; col->white[0] = 0.3127f; col->white[1] = 0.3290f; - col->min_lum = 0.005f; col->max_lum = 10000.0f; /* the PQ volume */ + col->min_lum = 0.005f; col->max_lum = 10000.0f; d->informative = 1; - d->ref_lum = 203.0f; /* PQ reference white */ + d->ref_lum = 203.0f; pthread_mutex_lock(&g_mu); d->disp_min_lum = g_req.min_lum > 0.0f ? g_req.min_lum : 0.0f; d->disp_max_lum = g_req.max_lum > 0.0f ? g_req.max_lum : 1000.0f; @@ -811,8 +749,6 @@ static void params_create(struct wl_client *client, struct wl_resource *r, uint3 else if (p->primaries == WP_COLOR_MANAGER_V1_PRIMARIES_BT2020 && p->tf == WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_HLG) c->dataspace = DROIDDECK_ADATASPACE_BT2020_HLG; - /* HDR metadata, kept only when it makes sense. The PQ defaults stand in for what was not given - * (0.005 - 10000 cd/m², the target volume = the primary one); CTA-861.3 treats 0 as unknown. */ char dropped[160] = ""; float mlum_min = 0.005f, mlum_max = 10000.0f; if (p->has_mlum) { @@ -827,7 +763,7 @@ static void params_create(struct wl_client *client, struct wl_resource *r, uint3 c->green[0] = p->mprim[2] / 1e6f; c->green[1] = p->mprim[3] / 1e6f; c->blue[0] = p->mprim[4] / 1e6f; c->blue[1] = p->mprim[5] / 1e6f; c->white[0] = p->mprim[6] / 1e6f; c->white[1] = p->mprim[7] / 1e6f; - } else { /* the container's own primaries (BT.2020, D65) */ + } else { c->red[0] = 0.708f; c->red[1] = 0.292f; c->green[0] = 0.170f; c->green[1] = 0.797f; c->blue[0] = 0.131f; c->blue[1] = 0.046f; c->white[0] = 0.3127f; c->white[1] = 0.3290f; } @@ -862,8 +798,6 @@ static void params_create(struct wl_client *client, struct wl_resource *r, uint3 if (!out) { free(d); wl_client_post_no_memory(client); return; } d->refs = 1; wl_resource_set_implementation(out, &image_description_impl, d, image_description_resource_destroy); - /* Sent from inside the request: Mesa blocks its swapchain on this event (it dispatches its queue - * until ready/failed arrives), and the event loop flushes it before it sleeps again. */ wp_image_description_v1_send_ready(out, c->identity); if (c->dataspace) { pthread_mutex_lock(&g_mu); @@ -878,7 +812,7 @@ static void params_create(struct wl_client *client, struct wl_resource *r, uint3 droiddeck_log(TAG, "image description #%u: dropped HDR metadata that breaks the protocol's rules:%s " "(Android gets the rest)", c->identity, dropped); } - wl_resource_destroy(r); /* create is the creator's destructor */ + wl_resource_destroy(r); } #define PARAMS_ONCE(field, what) \ @@ -958,14 +892,11 @@ static const struct wp_image_description_creator_params_v1_interface params_impl }; static void params_resource_destroy(struct wl_resource *r) { free(wl_resource_get_user_data(r)); } -/* ---------------------------------------------------------------- per-surface state */ -/* One per wl_surface that ever had a colour-management object. Lives until the wl_surface goes (a - * swapchain rebuild destroys the object and makes a new one for the same surface). */ struct cm_surf { - struct wl_resource *surface; /* the wl_surface */ + struct wl_resource *surface; struct wl_listener surface_destroy; - struct wl_resource *owner; /* the live wp_color_management_surface_v1, NULL = none */ + struct wl_resource *owner; struct cm_desc *pending, *current; int pending_dirty; }; @@ -989,7 +920,7 @@ static void describe_surface(struct wl_resource *surface, char *out, size_t size static void cm_surface_destroyed(struct wl_listener *l, void *data) { struct cm_surf *cs = wl_container_of(l, cs, surface_destroy); wl_list_remove(&cs->surface_destroy.link); - if (cs->owner) wl_resource_set_user_data(cs->owner, NULL); /* inert from now on */ + if (cs->owner) wl_resource_set_user_data(cs->owner, NULL); desc_unref(cs->pending); desc_unref(cs->current); free(cs); @@ -1035,7 +966,6 @@ static const struct wp_color_management_surface_v1_interface cm_surface_impl = { .unset_image_description = cm_surface_unset_image_description, }; -/* Destroying the object does what unset_image_description does (double-buffered, like it). */ static void cm_surface_resource_destroy(struct wl_resource *r) { struct cm_surf *cs = wl_resource_get_user_data(r); if (!cs || cs->owner != r) return; @@ -1079,7 +1009,6 @@ const struct droiddeck_color *droiddeck_color_of(struct wl_resource *surface) { return cs && cs->current ? &cs->current->c : NULL; } -/* ---------------------------------------------------------------- output + feedback */ static void cm_output_destroy_req(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } static void cm_output_get_image_description(struct wl_client *c, struct wl_resource *r, uint32_t id) { @@ -1100,7 +1029,6 @@ static const struct wp_color_management_surface_feedback_v1_interface cm_feedbac .get_preferred_parametric = cm_feedback_get_preferred, }; -/* ---------------------------------------------------------------- wp_color_manager_v1 */ static void cm_destroy_req(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } @@ -1124,7 +1052,6 @@ static void cm_get_surface(struct wl_client *c, struct wl_resource *r, uint32_t char who[160]; describe_surface(surface, who, sizeof(who)); if (cs->owner) { - /* The protocol says surface_exists; a game would be disconnected for it. The newer object wins. */ droiddeck_log(TAG, "%s: a second colour-management object for the same surface - the newer one takes over " "(protocol error surface_exists not raised)", who); wl_resource_set_user_data(cs->owner, NULL); @@ -1174,16 +1101,12 @@ static void bind_cm(struct wl_client *c, void *data, uint32_t ver, uint32_t id) struct wl_resource *r = wl_resource_create(c, &wp_color_manager_v1_interface, ver > 1 ? 1 : (int)ver, id); if (!r) { wl_client_post_no_memory(c); return; } wl_resource_set_implementation(r, &cm_impl, NULL, NULL); - /* All at bind, then done: Mesa reads them in the registry roundtrip that follows the bind and - * lists VK_COLOR_SPACE_HDR10_ST2084_EXT from exactly this pair (bt2020 + st2084_pq). Only what - * the display layer can honour is offered. */ wp_color_manager_v1_send_supported_intent(r, WP_COLOR_MANAGER_V1_RENDER_INTENT_PERCEPTUAL); wp_color_manager_v1_send_supported_feature(r, WP_COLOR_MANAGER_V1_FEATURE_PARAMETRIC); wp_color_manager_v1_send_supported_feature(r, WP_COLOR_MANAGER_V1_FEATURE_SET_MASTERING_DISPLAY_PRIMARIES); wp_color_manager_v1_send_supported_primaries_named(r, WP_COLOR_MANAGER_V1_PRIMARIES_BT2020); wp_color_manager_v1_send_supported_tf_named(r, WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST2084_PQ); wp_color_manager_v1_send_done(r); - /* One line per program: Mesa binds again for every surface-format query. */ if (last_named != c) { last_named = c; droiddeck_log(TAG, "%s bound wp_color_manager_v1 version %u (offered: perceptual intent; parametric descriptions " @@ -1194,7 +1117,6 @@ static void bind_cm(struct wl_client *c, void *data, uint32_t ver, uint32_t id) void droiddeck_color_client_gone(struct wl_client *client) { if (atomic_load(&g_gate) != 1 || atomic_load(&g_session_ended)) return; - /* A program that presented HDR has left: say where the session stands now, while it is fresh. */ const char *name = droiddeck_client_name(client); int mine; pthread_mutex_lock(&g_mu); @@ -1203,7 +1125,6 @@ void droiddeck_color_client_gone(struct wl_client *client) { if (mine) log_verdict(1); } -/* ---------------------------------------------------------------- the gate */ void droiddeck_color_init(struct wl_display *display) { char why[320] = ""; @@ -1227,7 +1148,6 @@ void droiddeck_color_init(struct wl_display *display) { else snprintf(disp, sizeof(disp), "the app could not read the display's HDR capability"); - /* What asked for HDR, in the words the user knows it by: the editors' setting, or the env override. */ char asked[128]; if (mode == 2) snprintf(asked, sizeof(asked), "DROIDDECK_WAYLAND_HDR=force (%s)", source); else if (strstr(source, "env")) snprintf(asked, sizeof(asked), "DROIDDECK_WAYLAND_HDR=1 (%s)", source); @@ -1262,8 +1182,6 @@ void droiddeck_color_init(struct wl_display *display) { "(games that check fall back to SDR; some show washed-out colours) - remove it on this display"); log_verdict(1); } else if (dxvk_hdr || (known && hdr10)) { - /* Off, and silent unless it is worth a line: a display that could show HDR10, or a DXVK - * switch that promises games an HDR display they cannot get. */ droiddeck_log(TAG, "HDR output off for this session (%s)%s%s", off_why, (known && hdr10) ? " - this display lists HDR10, so switching HDR output on for this game would " "offer it to games" : "", diff --git a/app/src/main/cpp/waylandcomp/src/wl_dmabuf.c b/app/src/main/cpp/waylandcomp/src/wl_dmabuf.c index 2f8552f1ed..cc85bd32e6 100644 --- a/app/src/main/cpp/waylandcomp/src/wl_dmabuf.c +++ b/app/src/main/cpp/waylandcomp/src/wl_dmabuf.c @@ -1,8 +1,3 @@ -/* - * zwp_linux_dmabuf_v1: the buffer params a client builds a dma-buf wl_buffer from, the format and - * modifier table the renderer can import, and dma-buf feedback (version 4). Split out of - * compositor.c; the buffer records themselves are in compositor_internal.h. - */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -20,7 +15,6 @@ #include "droiddeck_color.h" #include "compositor_internal.h" -/* ------------------------------------------------------------ zwp_linux_dmabuf_v1 */ static void dbuf_buffer_resource_destroy(struct wl_resource *r) { dmabuf_buffer_unref(wl_resource_get_user_data(r)); @@ -44,7 +38,7 @@ static struct wl_resource *params_do_create(struct wl_client *c, struct wl_resou struct dmabuf_buffer *b = calloc(1, sizeof(*b)); if (!b) return NULL; b->n_planes = p->n_planes; - b->refs = 1; /* the wl_buffer resource's */ + b->refs = 1; b->width = w; b->height = h; b->format = format; b->modifier = p->modifier[0]; for (int i = 0; i < MAX_PLANES; i++) b->fd[i] = -1; @@ -52,7 +46,7 @@ static struct wl_resource *params_do_create(struct wl_client *c, struct wl_resou b->fd[i] = p->fd[i]; b->offset[i] = p->offset[i]; b->stride[i] = p->stride[i]; - p->fd[i] = -1; /* ownership moves to the buffer */ + p->fd[i] = -1; } struct wl_resource *buf = wl_resource_create(c, &wl_buffer_interface, 1, id); if (!buf) { @@ -109,14 +103,6 @@ static const struct zwp_linux_dmabuf_v1_interface dmabuf_impl = { .get_default_feedback = dmabuf_get_default_feedback, .get_surface_feedback = dmabuf_get_surface_feedback, }; -/* The advertised format/modifier table, built at the first bind from what the renderer's driver - * can import (vkp_dmabuf_modifiers). INVALID is always offered too (Mesa drops it; other clients - * may use it for the implicit path). Without a renderer the list is LINEAR + INVALID, as before. */ -/* The last two rows are HDR10's (droiddeck_color.h): A2B10G10R10 as AB30 (alpha) + XB30 (opaque) - Mesa - * lists a VkFormat only when both are advertised, and it is the one 10-bit layout our zero-copy WSI - * can put in a gralloc buffer (AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM). They are advertised ONLY - * while the HDR gate is open, and after the 8-bit rows, so every other session - and every client that - * takes the first format it sees - gets exactly the table it always had. */ #define DMABUF_NFMT_MAX 6 #define DMABUF_NFMT_SDR 4 #define DMABUF_NMOD 4 @@ -124,7 +110,7 @@ static const struct zwp_linux_dmabuf_v1_interface dmabuf_impl = { #define DRM_XBGR2101010 FOURCC('X', 'B', '3', '0') static struct { uint32_t fmt; uint64_t mods[DMABUF_NMOD]; int n; } g_dmabuf_fmts[DMABUF_NFMT_MAX] = { {DRM_ARGB8888}, {DRM_XRGB8888}, {DRM_ABGR8888}, {DRM_XBGR8888}, {DRM_ABGR2101010}, {DRM_XBGR2101010}}; -static int g_dmabuf_nfmt = DMABUF_NFMT_SDR; /* rows advertised: the SDR four, + 2 with the HDR gate open */ +static int g_dmabuf_nfmt = DMABUF_NFMT_SDR; static int g_dmabuf_fmts_ready; static void dmabuf_build_feedback(void); @@ -136,8 +122,6 @@ static void dmabuf_build_formats(void) { for (int f = 0; f < g_dmabuf_nfmt; f++) { uint64_t got[DMABUF_NMOD]; int n = vkp_dmabuf_modifiers(g_dmabuf_fmts[f].fmt, got, DMABUF_NMOD), k = 0; - /* LINEAR first: it is the layout every client and the shm fallback agree on, and the one - * we advertised before this table existed. */ g_dmabuf_fmts[f].mods[k++] = MOD_LINEAR; for (int i = 0; i < n && k < DMABUF_NMOD - 1; i++) { if (got[i] == MOD_LINEAR) continue; @@ -161,8 +145,6 @@ static void dmabuf_build_formats(void) { droiddeck_log("dmabuf", "the compositor's driver (%s) reports no importable qcom_compressed layout: " "game swapchains stay linear", vkp_gpu_name()); if (g_dmabuf_nfmt > DMABUF_NFMT_SDR) { - /* The rows above always carry LINEAR; say what the compositor's own driver can really import - * for 10-bit, since a gralloc buffer it cannot import is shown on the display layer only. */ uint64_t got[DMABUF_NMOD]; int n = vkp_dmabuf_modifiers(DRM_XBGR2101010, got, DMABUF_NMOD), ubwc10 = 0; for (int i = 0; i < n; i++) if (got[i] == VKP_MOD_QCOM_COMPRESSED) ubwc10 = 1; @@ -174,19 +156,6 @@ static void dmabuf_build_formats(void) { dmabuf_build_feedback(); } -/* ---- dmabuf feedback (zwp_linux_dmabuf_v1 version 4) - * - * Turnip's Vulkan WSI is happy with the version 3 format/modifier events, so every Vulkan game - * worked while we only advertised 3. Mesa's EGL is not: its Wayland platform only takes the GPU - * (kopper/Zink) path when it can bind this interface with FEEDBACK, and with 3 it silently drops - * to its wl_shm software path. On this Proton layer that path has no software rasteriser to fall - * back to (the gallium build is zink+kopper+swrast, no llvmpipe), so the shm buffer it commits is - * never written: a native OpenGL window came out solid black, ~30 shm commits/s and no GPU frame - * at all (Wizardry: The Labyrinth of Lost Souls). Feedback is what makes that path work. - * - * What a client needs from us is one tranche describing "everything the compositor can import": - * a format table it mmaps read-only, the device to allocate on, and the indices it may use. - * Clients binding versions 1-3 keep getting the old format/modifier events instead. */ #ifndef MFD_CLOEXEC #define MFD_CLOEXEC 0x0001U @@ -202,17 +171,13 @@ static void dmabuf_build_formats(void) { #define F_SEAL_WRITE 0x0008 #endif -struct dmabuf_fmt_entry { uint32_t format; uint32_t pad; uint64_t modifier; }; /* the wire layout */ +struct dmabuf_fmt_entry { uint32_t format; uint32_t pad; uint64_t modifier; }; -static int g_fmt_table_fd = -1; /* sealed read-only memfd of dmabuf_fmt_entry[] */ +static int g_fmt_table_fd = -1; static size_t g_fmt_table_size; -static uint16_t g_fmt_table_n; /* entries, == the indices a tranche may name */ -dev_t g_main_device; /* the render node clients should allocate on */ +static uint16_t g_fmt_table_n; +dev_t g_main_device; -/* The GPU we import through is reached with KGSL, not DRM, so there is no render node of our own - * to name. Clients only use main_device to match "the same device as the compositor" and to pick - * a driver; the one DRM render node this platform has is the right answer, and Zink ignores it - * anyway (it renders on the Vulkan device it already has). 0 if the platform has none. */ static dev_t dmabuf_render_node(void) { static const char *nodes[] = {"/dev/dri/renderD128", "/dev/dri/renderD129", "/dev/dri/card0"}; struct stat st; @@ -229,7 +194,7 @@ static void dmabuf_build_feedback(void) { g_main_device = dmabuf_render_node(); for (int f = 0; f < g_dmabuf_nfmt; f++) for (int m = 0; m < g_dmabuf_fmts[f].n; m++) { - if (g_dmabuf_fmts[f].mods[m] == MOD_INVALID) continue; /* never offer INVALID here */ + if (g_dmabuf_fmts[f].mods[m] == MOD_INVALID) continue; entries[n].format = g_dmabuf_fmts[f].fmt; entries[n].pad = 0; entries[n].modifier = g_dmabuf_fmts[f].mods[m]; @@ -246,15 +211,12 @@ static void dmabuf_build_feedback(void) { close(fd); return; } - /* The client mmaps this read-only and trusts it not to change under it. */ fcntl(fd, F_ADD_SEALS, F_SEAL_SEAL | F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE); g_fmt_table_fd = fd; g_fmt_table_size = size; g_fmt_table_n = (uint16_t)n; droiddeck_log("dmabuf", "feedback ready: %d format/modifier pairs, main device %u:%u", n, (unsigned)major(g_main_device), (unsigned)minor(g_main_device)); - /* Vulkan games never need the node. Mesa's EGL did until Wayland layer versionCode 9: without - * one it fell back to a software path that draws nothing here (black window, sound plays). */ if (!g_main_device) droiddeck_log("dmabuf", "%s: OpenGL games need Wayland layer versionCode 9 or newer, " "which runs OpenGL on the GPU without a DRM node; older layers show a black window", @@ -262,7 +224,6 @@ static void dmabuf_build_feedback(void) { : "this device gives apps no display (DRM) device (/dev/dri)"); } -/* One tranche: our device, every pair in the table, no scanout flag. */ static void dmabuf_feedback_send(struct wl_resource *fb) { struct wl_array dev, idx; uint16_t *ind; @@ -309,8 +270,6 @@ static void dmabuf_get_default_feedback(struct wl_client *c, struct wl_resource if (ci) ci->asked_feedback = 1; dmabuf_new_feedback(c, r, id); } -/* Per-surface feedback would let us hint a different tranche for a window on its own display - * layer; we have nothing better to say per surface, so it is the default one. */ static void dmabuf_get_surface_feedback(struct wl_client *c, struct wl_resource *r, uint32_t id, struct wl_resource *surface) { dmabuf_new_feedback(c, r, id); @@ -320,8 +279,6 @@ void bind_dmabuf(struct wl_client *c, void *data, uint32_t ver, uint32_t id) { struct wl_resource *r = wl_resource_create(c, &zwp_linux_dmabuf_v1_interface, ver, id); wl_resource_set_implementation(r, &dmabuf_impl, NULL, NULL); if (!g_dmabuf_fmts_ready) dmabuf_build_formats(); - /* From version 4 the format and modifier events are gone: the client asks for feedback - * instead, and sending both would only confuse it about which list is authoritative. */ if (ver >= 4) return; for (int f = 0; f < g_dmabuf_nfmt; f++) { zwp_linux_dmabuf_v1_send_format(r, g_dmabuf_fmts[f].fmt); diff --git a/app/src/main/cpp/waylandcomp/src/wl_single_pixel.c b/app/src/main/cpp/waylandcomp/src/wl_single_pixel.c index 9dfe78233c..96c6664967 100644 --- a/app/src/main/cpp/waylandcomp/src/wl_single_pixel.c +++ b/app/src/main/cpp/waylandcomp/src/wl_single_pixel.c @@ -1,15 +1,9 @@ -/* - * wp_single_pixel_buffer_manager_v1 (version 1): a wl_buffer of one pixel of one colour, which a - * client stretches over a surface with wp_viewporter. KWin's Wayland backend - the desktop's KWin - * nested in this compositor - refuses to start without it. The surface takes the pixel as a 1x1 - * image, the way it takes a wl_shm buffer (compositor.c, take_pixel). - */ #include <stdlib.h> #include "droiddeck_ext.h" #include "single-pixel-buffer-v1-server-protocol.h" struct single_pixel { - uint8_t bgra[4]; /* premultiplied, as wl_shm's ARGB8888 lies in memory */ + uint8_t bgra[4]; }; static void buffer_destroy(struct wl_client *c, struct wl_resource *r) { wl_resource_destroy(r); } @@ -30,7 +24,6 @@ static void mgr_create_buffer(struct wl_client *c, struct wl_resource *r, uint32 struct single_pixel *p = calloc(1, sizeof(*p)); struct wl_resource *buffer = p ? wl_resource_create(c, &wl_buffer_interface, 1, id) : NULL; if (!buffer) { free(p); wl_client_post_no_memory(c); return; } - /* The protocol's values span the whole u32 range; the top byte is the 8-bit channel. */ p->bgra[0] = blue >> 24; p->bgra[1] = green >> 24; p->bgra[2] = red >> 24; diff --git a/app/src/main/cpp/waylandcomp/src/wl_text_input.c b/app/src/main/cpp/waylandcomp/src/wl_text_input.c index 631167e916..8b0ade227d 100644 --- a/app/src/main/cpp/waylandcomp/src/wl_text_input.c +++ b/app/src/main/cpp/waylandcomp/src/wl_text_input.c @@ -1,25 +1,3 @@ -/* - * Text input: zwp_text_input_manager_v3 (advertised at version 1), the host input method - * bridge winewayland.drv uses for IME text (our soft keyboard). - * - * Focus model. winewayland enables its text input as soon as our `enter` names a surface and - * routes every IME update to that surface's window - inside that window's process (the update - * list is per process). Keyboard focus in this compositor sits on the desktop surface (the - * desktop owner's process), so text input can't follow it; it follows droiddeck_ime_target(): - * the program window last clicked, else the topmost program window. Clicking into notepad - * moves the text-input focus to notepad's process, which is where the edit control lives. - * - * Protocol state. Requests between commits are pending; `commit` bumps the serial and applies - * them (enable resets the state as the protocol says). We answer with `done(serial)` only when - * we sent events (preedit/commit strings), never for every commit. - * - * Host side. droiddeck_on_text_input(enabled, program, cursor rect in scene pixels) tells the app - * when a program starts/stops accepting IME text or moves its caret (Wine reports the rect only - * when an edit control positions its IME composition window, via ImmSetCompositionWindow). - * Typed text arrives through text_input_host_*: preedit_string / commit_string + done. - * delete_surrounding_text is NOT used: winewayland's handler for it is empty, so deletions - * become Backspace/Delete key presses on the wl_keyboard path instead. - */ #define _GNU_SOURCE 1 #include <stdlib.h> #include <string.h> @@ -39,28 +17,25 @@ struct text_input { struct wl_resource *res; struct wl_client *client; struct wl_list link; - struct wl_resource *entered; /* surface we sent enter for, or NULL */ - uint32_t serial; /* commits received */ - /* pending, applied on commit */ + struct wl_resource *entered; + uint32_t serial; + int p_enable, p_disable, p_rect_set, p_content_set; int p_rect[4]; uint32_t p_hint, p_purpose; - /* current */ int enabled; int rect[4]; uint32_t hint, purpose; - int has_preedit; /* we sent a non-empty preedit last */ + int has_preedit; }; static struct wl_list g_inputs; -static struct wl_resource *g_target; /* surface text input is focused on */ +static struct wl_resource *g_target; -/* What the app was last told. */ static int g_told_enabled, g_told_rect[4]; static struct text_input *g_told_ti; static const char *ti_program(struct text_input *ti) { return droiddeck_client_name(ti->client); } -/* The enabled text input focused on the current target, if any. */ static struct text_input *active_input(void) { struct text_input *ti; if (!g_target) return NULL; @@ -92,13 +67,12 @@ static void tell_app(void) { droiddeck_on_text_input(enabled, enabled ? ti_program(ti) : "", rect[0], rect[1], rect[2], rect[3]); } -/* ------------------------------------------------------------------ focus */ static void send_leave(struct text_input *ti) { if (!ti->entered) return; zwp_text_input_v3_send_leave(ti->res, ti->entered); ti->entered = NULL; - ti->enabled = 0; /* the protocol disables on leave */ + ti->enabled = 0; ti->has_preedit = 0; } @@ -129,7 +103,6 @@ void droiddeck_text_input_surface_gone(struct wl_resource *surface) { if (g_told_ti && g_told_ti->entered == NULL && g_told_enabled) tell_app(); } -/* ------------------------------------------------------------------ requests */ static void ti_res_destroy(struct wl_resource *r) { struct text_input *ti = wl_resource_get_user_data(r); @@ -166,7 +139,7 @@ static void ti_commit(struct wl_client *c, struct wl_resource *r) { if (!ti) return; ti->serial++; if (ti->p_enable) { - ti->enabled = ti->entered != NULL; /* enable only counts while focused */ + ti->enabled = ti->entered != NULL; memset(ti->rect, 0, sizeof(ti->rect)); ti->hint = 0; ti->purpose = 0; ti->has_preedit = 0; @@ -212,7 +185,6 @@ static void bind_text_input_manager(struct wl_client *c, void *data, uint32_t ve wl_resource_set_implementation(r, &tim_impl, NULL, NULL); } -/* ------------------------------------------------------------------ host side (compositor thread) */ static size_t utf8_chars(const char *s, size_t len) { size_t n = 0; @@ -220,7 +192,6 @@ static size_t utf8_chars(const char *s, size_t len) { return n; } -/* Byte offset of UTF-8 character index `chars` (negative = end). */ static int32_t utf8_offset(const char *s, size_t len, int chars) { if (chars < 0) return (int32_t)len; size_t i = 0; @@ -259,7 +230,7 @@ void text_input_host_delete(int before, int after) { if (before > 64) before = 64; if (after > 64) after = 64; struct text_input *ti = active_input(); - if (ti && ti->has_preedit) { /* deleting inside a composition: clear it first */ + if (ti && ti->has_preedit) { zwp_text_input_v3_send_preedit_string(ti->res, "", 0, 0); zwp_text_input_v3_send_done(ti->res, ti->serial); ti->has_preedit = 0; diff --git a/app/src/main/cpp/waylandcomp/src/wl_toplevel_icon.c b/app/src/main/cpp/waylandcomp/src/wl_toplevel_icon.c index ce1cd0e5fb..667a225345 100644 --- a/app/src/main/cpp/waylandcomp/src/wl_toplevel_icon.c +++ b/app/src/main/cpp/waylandcomp/src/wl_toplevel_icon.c @@ -1,8 +1,3 @@ -/* - * xdg_toplevel_icon_manager_v1 (version 1): window icons are accepted and dropped. The scene - * has no title bars to draw them in; winewayland only stops complaining that the global is - * missing. We send no icon_size (any size is fine) and `done` at bind, as the protocol asks. - */ #include <stdlib.h> #include "droiddeck_ext.h" #include "xdg-toplevel-icon-v1-server-protocol.h" diff --git a/app/src/main/java/com/droiddeck/launcher/App.kt b/app/src/main/java/com/droiddeck/launcher/App.kt index e12aefb38d..e0abe387d8 100644 --- a/app/src/main/java/com/droiddeck/launcher/App.kt +++ b/app/src/main/java/com/droiddeck/launcher/App.kt @@ -5,11 +5,6 @@ import com.droiddeck.launcher.runtime.BwrapSpawner import com.droiddeck.launcher.session.CrashHandler import com.droiddeck.launcher.session.GpuClockPin -/** - * Process-wide setup: the crash handler, so a session's folder is finished even when we die, and - * the GPU clock pin cleared in case a killed process left it set, and the socket Flatpak's - * sandboxes are started through (BwrapSpawner). - */ class App : Application() { override fun attachBaseContext(base: android.content.Context) = super.attachBaseContext(com.droiddeck.launcher.core.AppLanguage.wrap(base)) @@ -21,13 +16,21 @@ class App : Application() { override fun onCreate() { super.onCreate() + // Helper processes must not initialize the main USB provider or guest graphics context. + val process = if (android.os.Build.VERSION.SDK_INT >= 28) Application.getProcessName() + else (getSystemService(ACTIVITY_SERVICE) as android.app.ActivityManager) + .runningAppProcesses?.firstOrNull { it.pid == android.os.Process.myPid() }?.processName + 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.settleGpuDriverMode(this) com.droiddeck.launcher.update.AppUpdates.init(this) + com.droiddeck.launcher.core.DownloadSource.init(this) GpuClockPin.clearLeftover(this) + com.droiddeck.launcher.glasses.Glasses.init(this) + com.droiddeck.launcher.glasses.GlassesMenuMirror.initialize(this) BwrapSpawner.start(this) com.droiddeck.launcher.frontend.GameFileSync.start(this) - // The game stores the Stores section can talk to; the native engine loads only when one needs it. com.droiddeck.launcher.stores.StoresState.init(this) com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.gog.GogBackend) com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.epic.EpicBackend) diff --git a/app/src/main/java/com/droiddeck/launcher/ComponentsMenu.kt b/app/src/main/java/com/droiddeck/launcher/ComponentsMenu.kt index 13bb3702cb..cbd7603708 100644 --- a/app/src/main/java/com/droiddeck/launcher/ComponentsMenu.kt +++ b/app/src/main/java/com/droiddeck/launcher/ComponentsMenu.kt @@ -8,11 +8,7 @@ import androidx.compose.runtime.setValue import com.droiddeck.launcher.session.ComponentsManager import com.droiddeck.launcher.session.ProtonDefault -/** - * The Components page's state and work: the Protons and their DXVK/VKD3D sets, the Nightlies - * catalog, downloads and the swap/restore actions. The launcher screen keeps one and shows it. - */ -internal class ComponentsMenu(private val activity: android.app.Activity, private val ui: android.os.Handler) { +internal class ComponentsMenu(private val activity: android.app.Activity, private val ui: Handler) { var compSnapshot by mutableStateOf<ComponentsManager.Snapshot?>(null) var compCatalog by mutableStateOf<List<ComponentsManager.CatalogItem>>(emptyList()) var compCatalogAt by mutableStateOf(0L) @@ -20,10 +16,12 @@ internal class ComponentsMenu(private val activity: android.app.Activity, privat var compComp by mutableStateOf(com.droiddeck.launcher.ui.GPU_TAB) var compChecking by mutableStateOf(false) var compBusy by mutableStateOf<String?>(null) - var compDownloads by mutableStateOf<Map<String, Int>>(emptyMap()) + var compDownloads: Map<String, Int> + get() = downloads + private set(value) { downloads = value } + val compDownloadRevision: Long get() = downloadRevision private var shownDefault: String? = null - /** Reads the Protons (and on first open saves their originals) off the UI thread; the Nightlies list comes from its cache. */ fun refreshComponents(snapshotFirst: Boolean = false) { Thread({ if (snapshotFirst) runCatching { ComponentsManager.snapshotAll(activity) } @@ -72,15 +70,15 @@ internal class ComponentsMenu(private val activity: android.app.Activity, privat }, "components-action").start() } - fun refreshComponentCatalog() { + fun refreshComponentCatalog(force: Boolean = true) { if (compChecking) return compChecking = true Thread({ - val cat = runCatching { ComponentsManager.catalog(activity, true) }.getOrNull() + val cat = runCatching { ComponentsManager.catalog(activity, force) }.getOrNull() ui.post { compChecking = false - if (cat == null || cat.items.isEmpty()) android.widget.Toast.makeText(activity, activity.getString(R.string.comp_nightlies_unreachable), android.widget.Toast.LENGTH_LONG).show() - else { compCatalog = cat.items; compCatalogAt = cat.fetchedAt } + if (cat != null && cat.items.isNotEmpty()) { compCatalog = cat.items; compCatalogAt = cat.fetchedAt } + else if (force) android.widget.Toast.makeText(activity, activity.getString(R.string.comp_nightlies_unreachable), android.widget.Toast.LENGTH_LONG).show() } }, "components-catalog").start() } @@ -95,6 +93,7 @@ internal class ComponentsMenu(private val activity: android.app.Activity, privat }.getOrElse { e -> activity.getString(R.string.comp_download_failed, e.message ?: e.javaClass.simpleName) } ui.post { compDownloads = compDownloads - item.file + downloadRevision++ android.widget.Toast.makeText(activity, message, android.widget.Toast.LENGTH_SHORT).show() refreshComponents() } @@ -102,6 +101,8 @@ internal class ComponentsMenu(private val activity: android.app.Activity, privat } private companion object { - const val TAG = "MainActivity" + const val TAG = "ComponentsMenu" + var downloads by mutableStateOf<Map<String, Int>>(emptyMap()) + var downloadRevision by mutableStateOf(0L) } } diff --git a/app/src/main/java/com/droiddeck/launcher/DeckyMenu.kt b/app/src/main/java/com/droiddeck/launcher/DeckyMenu.kt index efffe789d3..9f8a27f9f7 100644 --- a/app/src/main/java/com/droiddeck/launcher/DeckyMenu.kt +++ b/app/src/main/java/com/droiddeck/launcher/DeckyMenu.kt @@ -9,17 +9,12 @@ import com.droiddeck.launcher.runtime.DeckyManager import com.droiddeck.launcher.session.SessionState import java.io.File -/** - * Decky Loader's state in the launcher: what is installed, the releases on offer and an install - * in progress. The launcher screen keeps one and shows it. - */ internal class DeckyMenu(private val activity: android.app.Activity, private val ui: android.os.Handler) { var deckyInstalled by mutableStateOf<String?>(null) var deckyReleases by mutableStateOf<List<DeckyManager.Release>>(emptyList()) var deckyChecking by mutableStateOf(false) var deckyStage by mutableStateOf<String?>(null) var deckyPercent by mutableIntStateOf(-1) - /** True while the stage is the plugin's binary download (DeckyManager.downloadingBinary). */ var deckyDownloadingBinary by mutableStateOf(false) var deckySupervisor by mutableStateOf(false) var deckyReleaseRequest = 0 @@ -32,8 +27,6 @@ internal class DeckyMenu(private val activity: android.app.Activity, private val .getOrElse { DeckyManager.ReleaseChannels(emptyList(), emptyList()) } ui.post { if (request == deckyReleaseRequest) { - // Use the newest compatible stable build, or the newest compatible - // prerelease when the fork has not published a stable ARM64 asset. deckyReleases = channels.stable.ifEmpty { channels.prerelease } deckyChecking = false } diff --git a/app/src/main/java/com/droiddeck/launcher/DriverMenus.kt b/app/src/main/java/com/droiddeck/launcher/DriverMenus.kt index ababdc2300..7ccbba7f55 100644 --- a/app/src/main/java/com/droiddeck/launcher/DriverMenus.kt +++ b/app/src/main/java/com/droiddeck/launcher/DriverMenus.kt @@ -11,6 +11,8 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.runtime.mutableIntStateOf +import com.droiddeck.launcher.gpu.AutoDriverTrial +import com.droiddeck.launcher.gpu.AutoPicks import com.droiddeck.launcher.gpu.DriverBundle import com.droiddeck.launcher.gpu.DriverPairs import com.droiddeck.launcher.gpu.GpuInfo @@ -20,42 +22,45 @@ import com.droiddeck.launcher.gpu.TurnipDriver import com.droiddeck.launcher.gpu.TurnipReleases import com.droiddeck.launcher.session.SessionService import com.droiddeck.launcher.session.SessionPrefs +import com.droiddeck.launcher.session.QuestExperimental +import com.droiddeck.launcher.session.SessionState import com.droiddeck.launcher.ui.DriverRow +import com.droiddeck.launcher.ui.DriverSlot +import com.droiddeck.launcher.ui.GPU_MODE_AUTO +import com.droiddeck.launcher.ui.GPU_MODE_MIX +import com.droiddeck.launcher.ui.GPU_MODE_PAIR import com.droiddeck.launcher.ui.GpuDriversState import com.droiddeck.launcher.ui.PairRow import com.droiddeck.launcher.wayland.CompositorHost -/** - * The GPU drivers: what this GPU is, the matched driver pairs the release repos offer for it, and - * - in Auto, the default - keeping the recommended pair installed and set. Under Advanced, the - * Linux (runtime) and Android (display) lists as before, each picked on its own - except a - * bundle's two halves (DriverBundle), which are always picked, and deleted, together. The launcher - * screen keeps one and hands it to the Components page's GPU drivers tab. - */ internal class DriverMenus(private val activity: Activity, private val ui: Handler) { var linuxRows by mutableStateOf<List<DriverRow>>(emptyList()) - /** The latest Banners-Turnip release as each driver menu offers it (see [refreshReleaseRows]). */ var linuxDownloads by mutableStateOf<List<com.droiddeck.launcher.ui.DownloadRow>>(emptyList()) var androidDownloads by mutableStateOf<List<com.droiddeck.launcher.ui.DownloadRow>>(emptyList()) - // Empty until the first refresh: the activity has no context yet while its fields are made. var releaseStatus by mutableStateOf("") var releaseChecking by mutableStateOf(false) var canRestoreBundled by mutableStateOf(false) - /** Asset name -> download percent, while it downloads. */ private val releaseProgress = HashMap<String, Int>() var linuxSelected by mutableStateOf("") val gpu: GpuInfo = GpuInfo.detect() - // Read in refreshDrivers/ensureAuto: the activity has no context yet while its fields are made. var mode by mutableStateOf(SessionPrefs.GPU_DRIVERS_AUTO) var pairRows by mutableStateOf<List<PairRow>>(emptyList()) - /** The pair being installed, and how far along. */ var pairBusy by mutableStateOf<String?>(null) var pairPercent by mutableIntStateOf(-1) - /** What Auto last did or found, for the line under the pair in use. */ var autoStatus by mutableStateOf("") - /** The bundle both drivers are set to, as "DD-Turnip 0.1.0", or null when they are not one. */ var activeBundle by mutableStateOf<String?>(null) - private var autoCheckedThisProcess = false + private var lastAutoCheck = 0L + private var pairModeOpen by mutableStateOf(false) + var restartPending by mutableStateOf(false) + private set + private var runtimePending by mutableStateOf(false) + private var sessionRunning by mutableStateOf(false) + + val uiMode: String get() = when (mode) { + SessionPrefs.GPU_DRIVERS_AUTO -> GPU_MODE_AUTO + SessionPrefs.GPU_DRIVERS_MIX -> GPU_MODE_MIX + else -> if (pairModeOpen || pairRows.any { it.active }) GPU_MODE_PAIR else GPU_MODE_MIX + } fun state() = GpuDriversState( gpuName = gpu.displayName(activity), gpuFamily = gpu.family.label(activity), soc = gpu.soc, supportText = gpu.supportText(activity), @@ -65,7 +70,56 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl linuxRows = linuxRows, linuxSelected = linuxSelected, androidRows = androidRows, androidSelected = androidSelected, linuxDownloads = linuxDownloads, androidDownloads = androidDownloads, canRestoreBundled = canRestoreBundled, activeBundle = activeBundle, + mode = uiMode, display = displaySlot(), runtime = runtimeSlot(), + canRestart = !sessionRunning, + checkedAt = TurnipReleases.cached(activity)?.checkedAt ?: 0L, ) + + 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 + activeBundle != null -> R.string.gpu_src_bundle + chosenDefault -> defaultLabel + else -> R.string.gpu_src_chosen + }) + + private fun displaySlot(): DriverSlot { + val row = androidRows.firstOrNull { it.id == androidSelected } + val live = androidRows.firstOrNull { it.id == CompositorHost.displayChoice }?.name + return DriverSlot( + name = row?.name ?: activity.getString(R.string.gpu_auto_by_gpu), + source = slotSource(androidSelected == TurnipDriver.AUTO, R.string.gpu_src_by_gpu), + pending = restartPending, + status = when { + restartPending -> activity.getString(R.string.gpu_display_pending, live ?: activity.getString(R.string.gpu_previous_driver)) + CompositorHost.isStarted -> activity.getString(R.string.gpu_display_live) + else -> activity.getString(R.string.gpu_display_next) + }, + ) + } + + private fun runtimeSlot(): DriverSlot { + val row = linuxRows.firstOrNull { it.id == linuxSelected } + val live = SessionState.runtimeDriver?.let { id -> linuxRows.firstOrNull { it.id == id }?.name } + return DriverSlot( + name = row?.name ?: activity.getString(R.string.gpu_runtime_default), + source = slotSource(linuxSelected.isEmpty(), R.string.gpu_src_default), + pending = runtimePending, + status = when { + runtimePending -> activity.getString(R.string.gpu_runtime_pending, live ?: activity.getString(R.string.gpu_previous_driver)) + sessionRunning -> activity.getString(R.string.gpu_runtime_live) + else -> activity.getString(R.string.gpu_runtime_hint) + }, + ) + } + + fun restartApp() { + if (SessionState.running) return + val launch = activity.packageManager.getLaunchIntentForPackage(activity.packageName) ?: return + activity.startActivity(android.content.Intent.makeRestartActivityTask(launch.component) + .putExtra(com.droiddeck.launcher.stores.download.StoreDownloadService.EXTRA_NAV, "components")) + Runtime.getRuntime().exit(0) + } var androidRows by mutableStateOf<List<DriverRow>>(emptyList()) var androidSelected by mutableStateOf("") @@ -103,23 +157,30 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl canRestoreBundled = td.hiddenBundled().isNotEmpty() androidSelected = SessionPrefs.androidDriver(activity) activeBundle = DriverBundle.active(activity)?.label + restartPending = CompositorHost.isStarted && CompositorHost.displayChoice.let { it != null && it != androidSelected } + sessionRunning = SessionState.running + runtimePending = sessionRunning && SessionState.runtimeDriver.let { it != null && it != linuxSelected } refreshReleaseRows() refreshPairs() } - /** One line for the settings row that opens this: "Auto · WinNative · Balanced". */ fun summary(): String { val active = pairRows.firstOrNull { it.active }?.name ?: activeBundle - val label = activity.getString(if (mode == SessionPrefs.GPU_DRIVERS_AUTO) R.string.common_auto else R.string.drivers_manual) - return active?.let { activity.getString(R.string.drivers_summary, label, it) } ?: label + val display = displaySlot().name + val base = when { + uiMode == GPU_MODE_AUTO -> activity.getString(R.string.drivers_summary, activity.getString(R.string.common_auto), active ?: display) + uiMode == GPU_MODE_PAIR && active != null -> activity.getString(R.string.drivers_summary, activity.getString(R.string.gpu_mode_pair_short), active) + else -> activity.getString(R.string.drivers_summary, activity.getString(R.string.gpu_mode_mix_short), + runtimeSlot().name.let { if (it == display) it else activity.getString(R.string.gpu_summary_mix, display, it) }) + } + return if (restartPending) activity.getString(R.string.gpu_summary_restart, base) else base } - /** The pairs the last check found, with what is installed and in use; this GPU's first. */ fun refreshPairs() { val lm = LinuxVulkanDriverManager(activity) val td = TurnipDriver(activity) val pairs = DriverPairs.from(TurnipReleases.cached(activity)) - val recommended = DriverPairs.recommendedKey(gpu, pairs) + val recommended = if (QuestExperimental.isSupported()) null else recommendedKey(pairs) pairRows = pairs.map { p -> val bundle = p.bundle?.let { installedBundle(it) } val displayId = if (p.bundle != null) bundle?.androidId else p.display?.let { TurnipReleases.installedId(activity, it, td::isInstalled) } @@ -136,24 +197,61 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl }.sortedByDescending { it.recommended } } - fun setMode(auto: Boolean) { - mode = if (auto) SessionPrefs.GPU_DRIVERS_AUTO else SessionPrefs.GPU_DRIVERS_MANUAL + private fun recommendedKey(pairs: List<DriverPairs.DriverPair>) = DriverPairs.recommendedKey( + gpu, pairs, TurnipReleases.autoPicks(activity), AutoDriverTrial.bad(activity), + blob = AutoPicks.blobVersion(com.droiddeck.launcher.gpu.VulkanInfo.cachedOrNull()?.get("driver_version")), + ) + + fun chooseMode(next: String) { + pairModeOpen = next == GPU_MODE_PAIR + setMode(auto = next == GPU_MODE_AUTO, mix = next == GPU_MODE_MIX) + } + + fun setMode(auto: Boolean, mix: Boolean = false) { + mode = when { + auto -> SessionPrefs.GPU_DRIVERS_AUTO + mix -> SessionPrefs.GPU_DRIVERS_MIX + else -> SessionPrefs.GPU_DRIVERS_MANUAL + } SessionPrefs.setGpuDriverMode(activity, mode) autoStatus = "" if (auto) ensureAuto(force = false) } - /** - * Auto: make the recommended pair for this GPU the one installed and set. Looks online when - * [force]d (refresh), or when the last check is a day old - Banners-Turnip rebuilds hourly, and - * a new pair a day is plenty - otherwise works from the last check. Once per app start on its - * own; the pair it replaces is removed, anything the user imported or picked is left alone. - */ + fun checkOnOpen() { + if (SessionPrefs.gpuDriverMode(activity) == SessionPrefs.GPU_DRIVERS_AUTO) ensureAuto(force = false) + else if (!releaseChecking && releasesStale() && com.droiddeck.launcher.frontend.AutoComponents.isOnline(activity)) checkLatestTurnip() + } + + private fun releasesStale(): Boolean { + val cached = TurnipReleases.cached(activity) + return cached == null || System.currentTimeMillis() - cached.checkedAt > RELEASE_CHECK_INTERVAL_MS || + cached.assets.none { it.pair.isNotEmpty() } + } + fun ensureAuto(force: Boolean) { mode = SessionPrefs.gpuDriverMode(activity) if (mode != SessionPrefs.GPU_DRIVERS_AUTO || pairBusy != null || releaseChecking) return - if (!force && autoCheckedThisProcess) return - autoCheckedThisProcess = true + if (SessionState.running) { + if (force) autoStatus = activity.getString(R.string.drivers_auto_waits_for_session) + return + } + AutoDriverTrial.rollbackDue(activity)?.let { trial -> + AutoDriverTrial.rollBack(activity, trial) + autoStatus = activity.getString(R.string.drivers_rolled_back, trial.name) + refreshDrivers() + return + } + if (!force && System.currentTimeMillis() - lastAutoCheck < RELEASE_CHECK_INTERVAL_MS) return + lastAutoCheck = System.currentTimeMillis() + val displayChanged = SessionPrefs.androidDriver(activity) != QuestExperimental.defaultAndroidDriver() + if (QuestExperimental.applyAutoDrivers(activity)) { + autoStatus = activity.getString( + if (displayChanged && CompositorHost.isStarted) R.string.drivers_using_quest_restart else R.string.drivers_using_quest, + ) + refreshDrivers() + return + } if (DriverPairs.recommendedKey(gpu, emptyList()) == null) { autoStatus = activity.getString(R.string.drivers_none_to_set, gpu.supportText(activity).lowercase()) return @@ -161,16 +259,15 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl releaseChecking = true autoStatus = activity.getString(R.string.drivers_checking_latest) Thread({ - val cached = TurnipReleases.cached(activity) - val stale = cached == null || System.currentTimeMillis() - cached.checkedAt > 24 * 3_600_000L || - cached.assets.none { it.pair.isNotEmpty() } - val problem = if (force || stale) runCatching { TurnipReleases.refresh(activity) }.exceptionOrNull()?.message else null + val problem = if (force || releasesStale()) runCatching { TurnipReleases.refresh(activity) }.exceptionOrNull()?.message else null + val holdBack = !force && com.droiddeck.launcher.frontend.AutoComponents.constrained(activity) + runCatching { com.droiddeck.launcher.gpu.VulkanInfo.query() } ui.post { releaseChecking = false refreshReleaseRows() refreshPairs() val pairs = DriverPairs.from(TurnipReleases.cached(activity)) - val key = DriverPairs.recommendedKey(gpu, pairs) + val key = recommendedKey(pairs) val pair = pairs.firstOrNull { it.key == key } val row = pairRows.firstOrNull { it.key == key } when { @@ -178,32 +275,30 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl ?: activity.getString(R.string.upd_current_status) pair == null || !pair.complete -> autoStatus = problem?.let { activity.getString(R.string.upd_couldnt_check, it) } ?: activity.getString(R.string.drivers_recommended_unpublished) + AutoDriverTrial.release(pair) in AutoDriverTrial.bad(activity) -> + autoStatus = activity.getString(R.string.drivers_skipping_bad, pair.name, pair.version) + SessionState.running -> autoStatus = activity.getString(R.string.drivers_auto_waits_for_session) + holdBack && row?.installed != true -> autoStatus = activity.getString(R.string.drivers_auto_waits_for_network, pair.name, pair.version) else -> installPair(pair, auto = true) } } }, "gpu-driver-auto").start() } - /** Manual: install (if need be) and set both halves of a pair. */ fun selectPair(key: String) { if (pairBusy != null) return val pair = DriverPairs.from(TurnipReleases.cached(activity)).firstOrNull { it.key == key && it.complete } ?: return + pairModeOpen = true + if (mode != SessionPrefs.GPU_DRIVERS_MANUAL) setMode(auto = false) installPair(pair, auto = false) } - /** - * Download what is missing of [pair], then set both halves - only once both are in, so a - * failed download never leaves a half-changed pair. Auto's own downloads are recorded, and the - * ones the new pair replaces are removed. - */ private fun installPair(pair: DriverPairs.DriverPair, auto: Boolean) { if (!pair.complete) return pairBusy = pair.key pairPercent = 0 if (auto) autoStatus = activity.getString(R.string.drivers_downloading_pair, pair.name, pair.version) Thread({ - val lm = LinuxVulkanDriverManager(activity) - val td = TurnipDriver(activity) var downloaded = false val result = runCatching { val zips = pair.assets @@ -217,22 +312,27 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl pairBusy = null pairPercent = -1 result.onSuccess { (displayId, linuxId) -> - val displayChanged = SessionPrefs.androidDriver(activity) != displayId + if (auto && SessionState.running) { + lastAutoCheck = 0L + autoStatus = activity.getString(R.string.drivers_auto_waits_for_session) + return@onSuccess + } + val previousDisplay = SessionPrefs.androidDriver(activity) + val previousLinux = SessionPrefs.linuxDriver(activity) + val displayChanged = previousDisplay != displayId SessionPrefs.setAndroidDriver(activity, displayId) SessionPrefs.setLinuxDriver(activity, linuxId) val restart = displayChanged && CompositorHost.isStarted if (auto) { - val previous = SessionPrefs.gpuAutoInstalled(activity) - for (id in previous - setOf(displayId, linuxId)) { - val bundle = DriverBundle.containing(activity, id, lm.isInstalled(id)) - when { - bundle != null -> { DriverBundle.remove(activity, bundle); TurnipReleases.forget(activity, bundle.id) } - lm.isInstalled(id) -> lm.removeDriver(id) - else -> td.remove(id) - } - TurnipReleases.forget(activity, id) - } - SessionPrefs.setGpuAutoInstalled(activity, setOf(displayId, linuxId)) + val trial = AutoDriverTrial.current(activity) + val lastGood = trial?.let { setOf(it.previousDisplay, it.previousLinux) } ?: setOf(previousDisplay, previousLinux) + val changed = previousDisplay != displayId || previousLinux != linuxId + SessionPrefs.setGpuAutoInstalled(activity, SessionPrefs.gpuAutoInstalled(activity) + setOf(displayId, linuxId)) + if (changed) AutoDriverTrial.begin( + activity, AutoDriverTrial.release(pair), "${pair.name} ${pair.version}", displayId, linuxId, + trial?.previousDisplay ?: previousDisplay, trial?.previousLinux ?: previousLinux, + ) + if (!SessionState.running) AutoDriverTrial.prune(activity, lastGood + setOf(displayId, linuxId)) autoStatus = activity.getString( if (downloaded) { if (restart) R.string.drivers_updated_to_restart else R.string.drivers_updated_to } else { if (restart) R.string.drivers_switched_to_restart else R.string.drivers_switched_to }, @@ -252,21 +352,15 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl }, "gpu-driver-pair").start() } - /** The bundle a release bundle was downloaded as, while both its halves are installed. */ private fun installedBundle(asset: TurnipReleases.Asset): DriverBundle.Bundle? = TurnipReleases.installedId(activity, asset) { DriverBundle.get(activity, it) != null }?.let { DriverBundle.get(activity, it) } - /** The id a release asset was installed as (a bundle's id for a bundle), or null when it is not installed. */ private fun installedIdOf(asset: TurnipReleases.Asset): String? = when { asset.bundle -> installedBundle(asset)?.id asset.linux -> TurnipReleases.installedId(activity, asset, LinuxVulkanDriverManager(activity)::isInstalled) else -> TurnipReleases.installedId(activity, asset, TurnipDriver(activity)::isInstalled) } - /** - * One release asset, downloaded, checked and installed through the importer; returns its id, - * a bundle's id for a bundle. - */ private fun installAsset(asset: TurnipReleases.Asset, progress: (Int) -> Unit): String { var file: File? = null try { @@ -284,12 +378,6 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl } } - /** - * Import off the main thread - a driver zip is a few MB and the glibc check reads the whole - * library - then say what happened. A refusal's message is the user-facing reason. A bundle, - * from any import, installs both halves and is set as both drivers at once. [linux] null (the - * tab's own Import .zip) takes a single driver to whichever list its libc belongs in. - */ fun importDriver(uri: Uri, linux: Boolean?) { val name = activity.displayNameOf(uri) Thread({ @@ -328,10 +416,6 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl }, "import-driver").start() } - /** - * Pick one driver from a list, which is Manual (Auto would put its pair back). A bundle's half - * sets the bundle's other half in the other list as well. - */ fun selectDriver(id: String, linux: Boolean) { val bundle = DriverBundle.containing(activity, id, linux) when { @@ -339,26 +423,21 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl linux -> SessionPrefs.setLinuxDriver(activity, id) else -> SessionPrefs.setAndroidDriver(activity, id) } - setMode(false) + pairModeOpen = false + setMode(auto = false, mix = true) refreshDrivers() } - /** Set both halves of [bundle] as the drivers in use; returns what to tell the user. */ private fun useBundle(bundle: DriverBundle.Bundle): String { val displayChanged = SessionPrefs.androidDriver(activity) != bundle.androidId DriverBundle.select(activity, bundle) - if (mode == SessionPrefs.GPU_DRIVERS_AUTO) setMode(false) + if (mode == SessionPrefs.GPU_DRIVERS_AUTO) setMode(auto = false, mix = true) return activity.getString( if (displayChanged && CompositorHost.isStarted) R.string.drivers_using_bundle_restart else R.string.drivers_using_bundle, bundle.label, ) } - /** - * Delete an imported or downloaded driver. A mode still set to it goes back to its default, so a - * session never starts on a driver that is gone; a release download is forgotten, so the menu - * offers it again. - */ fun deleteDriver(id: String, linux: Boolean) { val bundle = DriverBundle.containing(activity, id, linux) if (bundle != null) { @@ -381,7 +460,6 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl refreshDrivers() } - /** The download entries and the refresh line, from what the last check found. */ fun refreshReleaseRows() { val check = TurnipReleases.cached(activity) fun rows(linux: Boolean) = check?.assets.orEmpty() @@ -413,7 +491,6 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl } } - /** Only when the user taps refresh: nothing goes online on its own. */ fun checkLatestTurnip() { if (releaseChecking) return releaseChecking = true @@ -431,7 +508,6 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl }, "turnip-release-check").start() } - /** Download one release driver and import it through the same importer a picked zip uses. */ fun downloadReleaseDriver(assetName: String) { val asset = TurnipReleases.cached(activity)?.assets?.firstOrNull { it.name == assetName } ?: return if (releaseProgress.containsKey(assetName)) return @@ -464,6 +540,7 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl private companion object { const val TAG = "MainActivity" + const val RELEASE_CHECK_INTERVAL_MS = 3_600_000L } } diff --git a/app/src/main/java/com/droiddeck/launcher/HomeActivity.kt b/app/src/main/java/com/droiddeck/launcher/HomeActivity.kt index 7a6c60cbf5..54526834b5 100644 --- a/app/src/main/java/com/droiddeck/launcher/HomeActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/HomeActivity.kt @@ -5,7 +5,6 @@ import android.content.Intent import android.os.Bundle import com.droiddeck.launcher.session.SessionService -/** Receives the system Home launch and routes it without consuming KEYCODE_HOME. */ class HomeActivity : Activity() { override fun attachBaseContext(newBase: android.content.Context) { super.attachBaseContext(newBase) diff --git a/app/src/main/java/com/droiddeck/launcher/HomeApp.kt b/app/src/main/java/com/droiddeck/launcher/HomeApp.kt index cc1b2afc0a..74b49821c5 100644 --- a/app/src/main/java/com/droiddeck/launcher/HomeApp.kt +++ b/app/src/main/java/com/droiddeck/launcher/HomeApp.kt @@ -13,7 +13,6 @@ import androidx.core.graphics.drawable.toBitmap import com.droiddeck.launcher.session.SessionService import com.droiddeck.launcher.session.SessionState -/** Android Home role and the launchable Android apps shown by the in-session app drawer. */ object HomeApp { data class LaunchableApp( val label: String, @@ -22,17 +21,10 @@ object HomeApp { val icon: Bitmap?, ) - /** - * Whether the app offers itself as a Home app at all. HomeActivity is declared disabled and - * only enabled when the user turns on "Use as a Home screen": a player who does not want a - * launcher never gets Android's "which Home app?" question, and it is one apk either way. - * The setting is the component's own state, which Android keeps across updates. - */ fun isHomeScreenEnabled(context: Context): Boolean = context.packageManager.getComponentEnabledSetting(ComponentName(context, HomeActivity::class.java)) == PackageManager.COMPONENT_ENABLED_STATE_ENABLED - /** Turned off while DroidDeck is the Home app, the phone goes back to its own launcher. */ fun setHomeScreenEnabled(context: Context, enabled: Boolean) { context.packageManager.setComponentEnabledSetting( ComponentName(context, HomeActivity::class.java), @@ -113,7 +105,6 @@ object HomeApp { try { context.startActivity(settingsIntent()) } catch (_: Exception) { - // A role request remains available on Android 10+ if the settings page is missing. val request = roleRequestIntent(context) if (request != null) context.startActivity(request) } diff --git a/app/src/main/java/com/droiddeck/launcher/MainActivity.kt b/app/src/main/java/com/droiddeck/launcher/MainActivity.kt index 58d8599f50..2330dfb23c 100644 --- a/app/src/main/java/com/droiddeck/launcher/MainActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/MainActivity.kt @@ -47,6 +47,7 @@ import com.droiddeck.launcher.session.SessionLogShare import com.droiddeck.launcher.session.SessionPrefs import com.droiddeck.launcher.session.SteamRepair import com.droiddeck.launcher.core.CpuCores +import com.droiddeck.launcher.core.DownloadSource import com.droiddeck.launcher.core.PhantomProcessLimit import com.droiddeck.launcher.core.PhantomProcessStatus import com.droiddeck.launcher.core.WirelessAdbFix @@ -79,11 +80,6 @@ import com.droiddeck.launcher.session.GameStorage import com.droiddeck.launcher.input.SecondScreenDisplay import com.droiddeck.launcher.input.SecondScreenDisplays -/** - * The whole app outside a session: is the runtime installed, is there a newer one, frame - * generation, and one button that starts Steam. Everything a Steam client can do - the library, - * the store, downloads, settings - is the client's own job once [SessionActivity] has it on screen. - */ class MainActivity : ComponentActivity() { override fun attachBaseContext(newBase: android.content.Context) { super.attachBaseContext(newBase) @@ -97,13 +93,10 @@ class MainActivity : ComponentActivity() { private val updates = UpdatesMenu(this, ui) private val protons = ProtonMenu(this, ui) - // The screen's state. Compose redraws whatever reads these when they change. private var installed by mutableStateOf<String?>(null) - /** A session launch waiting on its button to fill the page (LaunchFlood). */ private var flood by mutableStateOf<PendingFlood?>(null) private var floodProgress by androidx.compose.runtime.mutableFloatStateOf(0f) private class PendingFlood(val from: androidx.compose.ui.geometry.Rect, val intent: Intent) - /** A session stopped behind a flood: its blue, drawn back into the button it started from (FloodReturn). */ private var returning by mutableStateOf<ReturningFlood?>(null) private class ReturningFlood(val color: Int, val to: androidx.compose.ui.geometry.Rect?) private var ready by mutableStateOf(false) @@ -116,18 +109,22 @@ class MainActivity : ComponentActivity() { private var frameGenLabel by mutableStateOf("") private var lossless by mutableStateOf(Lossless.State.NONE) private var showRemove by mutableStateOf(false) + private var pendingSwitch by mutableStateOf<Intent?>(null) + private var switchingTo: Intent? = null + private var switchPoll: Runnable? = null + private var switchDeadline = 0L + private var showResetSettings by mutableStateOf(false) + private var lowSpace by mutableStateOf<Long?>(null) private var showNonAdreno by mutableStateOf<LinuxRuntimeInstaller.Release?>(null) private var glThread by mutableStateOf(true) private var noGlError by mutableStateOf(true) private var steamRepairQueued by mutableStateOf(false) private var mangoapp by mutableStateOf(true) private var steamController by mutableStateOf(SessionPrefs.CONTROLLER_DECK) - // Components page: FEX / DXVK / VKD3D-Proton per Proton (ComponentsManager). private var showComponents by mutableStateOf(false) private var focusComponentsContent by mutableStateOf(true) private var showMapping by mutableStateOf(false) private var saveBusy: String? = null - /** What to do with the zip or folder the file picker hands back after a game page's Manage saves. */ private var onSavePicked: ((File) -> Unit)? = null private var controllerSettings by mutableStateOf<ControllerPrefs.Settings?>(null) private var catalog by mutableStateOf<List<DesktopCatalog.Entry>?>(null) @@ -159,15 +156,21 @@ class MainActivity : ComponentActivity() { private var phantomProcessStatus by mutableStateOf(PhantomProcessStatus.NOT_APPLICABLE) private var showPhantomGate by mutableStateOf(false) 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_SENSOR_LANDSCAPE) private var launcherFullscreen by mutableStateOf(true) + private var downloadSource by mutableStateOf(DownloadSource.MODE_AUTO) + private var downloadMirror by mutableStateOf("") + private var downloadPrefix by mutableStateOf("") private var animationsEnabled by mutableStateOf(true) + private var gameStoresEnabled by mutableStateOf(true) private var gameStoresSpeedTier by mutableStateOf("fast") private var storesOpenTab by mutableStateOf(SessionPrefs.STORES_OPEN_LIBRARY) - /** A page a notification asked for ("stores:downloads", "app:<id>"), until the front end has gone there. */ private var navRequest by mutableStateOf<String?>(null) private var storesShowMature by mutableStateOf(false) + private var storesSort by mutableStateOf(SessionPrefs.STORES_SORTS.first()) + private var storesView by mutableStateOf(SessionPrefs.STORES_VIEWS.first()) private var mic by mutableStateOf(false) private var wifiDiscovery by mutableStateOf(false) private var wifiDiscoveryPermission by mutableStateOf(false) @@ -193,13 +196,15 @@ class MainActivity : ComponentActivity() { SessionPrefs.setWifiDiscoveryEnabled(this, WifiDiscovery.permissionGranted(this)) refreshWifiDiscovery() } + private val cameraPermission = registerForActivityResult(ActivityResultContracts.RequestPermission()) { + com.droiddeck.launcher.handtracking.HandTracking.refreshPermission(this) + } + private var placementCheck by mutableStateOf<Boolean?>(null) private val wifiPermissionSettings = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { SessionPrefs.setWifiDiscoveryEnabled(this, WifiDiscovery.permissionGranted(this)) refreshWifiDiscovery() } - // The app's own picker (files/), once per kind of pick: the two driver lists validate - // differently, and the reason a zip is refused names the list it belongs in. private val pickComponent = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { r -> if (r.resultCode == RESULT_OK) InAppFilePicker.pickedUri(r.data)?.let { importComponent(it) } } @@ -212,6 +217,9 @@ class MainActivity : ComponentActivity() { private val pickDeckyPluginZip = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { r -> if (r.resultCode == RESULT_OK) InAppFilePicker.pickedFile(r.data)?.let { decky.importPluginZip(it) } } + private val pickBootMovie = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { r -> + if (r.resultCode == RESULT_OK) InAppFilePicker.pickedFile(r.data)?.let { importBootMovie(it) } + } private val pickAnyDriver = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { r -> if (r.resultCode == RESULT_OK) InAppFilePicker.pickedUri(r.data)?.let { drivers.importDriver(it, linux = null) } } @@ -233,7 +241,6 @@ class MainActivity : ComponentActivity() { wifiDiscoveryAsked = SessionPrefs.wifiDiscoveryAsked(this) wifiDiscoveryBlocked = !wifiDiscoveryPermission && wifiDiscoveryAsked && WifiDiscovery.permissions.none { shouldShowRequestPermissionRationale(it) } - // A revoked grant must not leave an enabled switch behind. if (!wifiDiscoveryPermission && SessionPrefs.wifiDiscoveryEnabled(this)) { SessionPrefs.setWifiDiscoveryEnabled(this, false) } @@ -249,7 +256,6 @@ class MainActivity : ComponentActivity() { } } - /** Takes a new or updated Lossless Scaling from Steam and shows what LSFG can use. */ private fun syncLossless() { Thread({ Lossless.sync(this) @@ -258,6 +264,38 @@ class MainActivity : ComponentActivity() { }, "lossless-sync").start() } + private fun importBootMovie(file: File) { + bootMovieImporting = true + bootMovieProgress = -1 + Thread({ + val result = com.droiddeck.launcher.session.BootMovie.import( + this, file, + onStart = { ui.post { android.widget.Toast.makeText(this, getString(R.string.boot_movie_converting_started, file.name), android.widget.Toast.LENGTH_LONG).show() } }, + onProgress = { percent -> ui.post { bootMovieProgress = percent } }, + ) + val message = when (result) { + is com.droiddeck.launcher.session.BootMovie.Import.Done -> getString( + if (result.audioDropped) R.string.boot_movie_imported_silent else R.string.boot_movie_imported, result.name) + com.droiddeck.launcher.session.BootMovie.Import.TooLong -> + getString(R.string.boot_movie_too_long, com.droiddeck.launcher.session.BootMovie.MAX_CONVERT_SECONDS) + is com.droiddeck.launcher.session.BootMovie.Import.Unsupported -> getString(R.string.boot_movie_unsupported) + com.droiddeck.launcher.session.BootMovie.Import.Failed -> getString(R.string.boot_movie_import_failed) + } + ui.post { + bootMovieImporting = false + bootMovieProgress = -1 + loadBootMovie() + android.widget.Toast.makeText(this, message, android.widget.Toast.LENGTH_LONG).show() + } + }, "boot-movie-import").start() + } + + private fun loadBootMovie() { + bootMovie = com.droiddeck.launcher.session.BootMovie.choice(this) + bootMovieSound = SessionPrefs.bootMovieSound(this) + bootMovieCustomName = com.droiddeck.launcher.session.BootMovie.customName(this) + } + private fun importLossless(dll: File) { Thread({ val message = Lossless.message(this, Lossless.import(this, dll)) @@ -269,7 +307,6 @@ class MainActivity : ComponentActivity() { }, "lossless-import").start() } - /** Import a save zip into [game]: pick it in the app's file picker, then back up and unzip off the main thread. */ private fun importSaves(name: String, game: () -> GameSaves.Game) { if (SessionState.running) { android.widget.Toast.makeText(this, R.string.main_saves_close_session, android.widget.Toast.LENGTH_LONG).show() @@ -288,7 +325,6 @@ class MainActivity : ComponentActivity() { pickSaveZip.launch(InAppFilePicker.buildIntent(this, listOf("zip"), getString(R.string.main_saves_pick_zip, name), GameSaves.savesDir().parentFile?.parentFile?.path)) } - /** Export [game]'s saves in [layout] to a folder picked in the app's file picker. */ private fun exportSaves(name: String, layout: GameSaves.Layout, game: () -> GameSaves.Game) { onSavePicked = { dir -> saveAction(getString(R.string.main_saves_exporting, name)) { @@ -299,7 +335,6 @@ class MainActivity : ComponentActivity() { GameSaves.savesDir().mkdirs() pickSaveDir.launch(InAppFilePicker.buildDirIntent(this, getString(R.string.main_saves_pick_folder, name, layout.label(this)), GameSaves.savesDir().path)) } - /** The Games tab's +: the picked .exe becomes a game (or selects / switches the one it belongs to). */ private fun addGameExe(path: String) { val exe = java.io.File(path) Thread({ @@ -325,7 +360,6 @@ class MainActivity : ComponentActivity() { } private var addedGamesArt by mutableStateOf(true) @Volatile private var artFetchRunning = false - /** The user entered a SteamGridDB API key of their own. */ private var sgdbUserKey by mutableStateOf(false) private val pickRomsDir = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { r -> if (r.resultCode == RESULT_OK) InAppFilePicker.pickedPath(r.data)?.let { path -> @@ -333,12 +367,17 @@ class MainActivity : ComponentActivity() { romsDir = path } } - // The mode whose lifted sheet last read its settings, with what it shows; refreshed by loadModeSettings(). private var settingsMode by mutableStateOf<String?>(null) private var resolution by mutableStateOf(com.droiddeck.launcher.session.SessionDisplay.DEFAULT_RESOLUTION) private var fexPreset by mutableStateOf("") private var forceSsbs by mutableStateOf(false) + private var steamClientArch by mutableStateOf("arm64") private var runSteamAtStartup by mutableStateOf(false) + private var bootMovie by mutableStateOf(com.droiddeck.launcher.session.BootMovie.DROIDDECK_30) + private var bootMovieSound by mutableStateOf(true) + private var bootMovieCustomName by mutableStateOf<String?>(null) + private var bootMovieImporting by mutableStateOf(false) + private var bootMovieProgress by mutableStateOf(-1) private var theme by mutableStateOf("graphite") private var appScale by mutableStateOf(com.droiddeck.launcher.core.AppUiPrefs.DEFAULT_SCALE) private var hdrOn by mutableStateOf(false) @@ -349,6 +388,8 @@ class MainActivity : ComponentActivity() { private var touchMode by mutableStateOf(SessionPrefs.TOUCH_AUTO) private var suspendPolicy by mutableStateOf(SessionPrefs.SUSPEND_MANUAL) private var steamDownloadsInBackground by mutableStateOf(false) + private var zramCompression by mutableStateOf(false) + private var zramSupported by mutableStateOf<Boolean?>(null) private var oscMode by mutableStateOf(SessionPrefs.OSC_AUTO) private var backActionsInverted by mutableStateOf(false) private var gameStorage by mutableStateOf("") @@ -359,11 +400,13 @@ class MainActivity : ComponentActivity() { } private var romsDir by mutableStateOf<String?>(null) private var steamGames by mutableStateOf<List<Library.SteamGame>>(emptyList()) + private var steamGamesX64 by mutableStateOf(false) @Volatile private var componentSweepDone = false @Volatile private var componentSweepSession: String? = null private var emulatorList by mutableStateOf<List<Library.Emulator>>(emptyList()) private var runningLabel by mutableStateOf<String?>(null) private var logsEnabled by mutableStateOf(true) + private var vacDiagnostics by mutableStateOf(false) private var agentCommands by mutableStateOf(false) private var showRoms by mutableStateOf(false) private var homeAppSelected by mutableStateOf(false) @@ -382,7 +425,6 @@ class MainActivity : ComponentActivity() { refreshHomeAppState() } - /** The session surface rises over the front end instead of cutting to it. */ override fun startActivity(intent: Intent?) { if (intent?.component?.className == SessionActivity::class.java.name) { when { @@ -402,8 +444,6 @@ class MainActivity : ComponentActivity() { } if (intent?.component?.className == SessionActivity::class.java.name) { if (flood != null) return - // Started by a blue button: it floods the page first. A running session is re-joined - // as before, rising over the front end. val from = com.droiddeck.launcher.ui.LaunchOrigin.take() if (from != null && !SessionState.running && com.droiddeck.launcher.ui.Motion.scale != 0f) { flood = PendingFlood(from, intent) @@ -415,7 +455,6 @@ class MainActivity : ComponentActivity() { if (intent?.component?.className == SessionActivity::class.java.name) overridePendingTransition(R.anim.session_rise, R.anim.session_hold) } - /** The page is all blue: the session opens on the same blue, with no animation of its own. */ private fun launchFlooded(f: PendingFlood) { if (busy || LinuxRuntimeInstaller.isBusy()) { flood = null; floodProgress = 0f; return } val signal = com.droiddeck.launcher.ui.Themes.byId(theme).signal @@ -449,7 +488,6 @@ class MainActivity : ComponentActivity() { request.getStringExtra(com.droiddeck.launcher.stores.download.StoreDownloadService.EXTRA_NAV)?.let { navRequest = it; request.removeExtra(com.droiddeck.launcher.stores.download.StoreDownloadService.EXTRA_NAV) } shortcutPicker = request.action == Intent.ACTION_CREATE_SHORTCUT if (shortcutPicker) { - // The shortcut picker must only offer games from the scan started for this request. steamGames = emptyList() shortcutLibraryScanning = true } else shortcutLibraryScanning = false @@ -475,24 +513,186 @@ class MainActivity : ComponentActivity() { android.widget.Toast.makeText(this, R.string.main_wait_install_game, android.widget.Toast.LENGTH_SHORT).show() return false } + if (com.droiddeck.launcher.session.NoSteamLaunch.enabled(this, game)) return launchWithoutSteam(game, returnHome) if (SessionState.running) { if (SessionState.mode != SessionService.MODE_STEAM || SessionState.stopRequested) { android.widget.Toast.makeText(this, R.string.game_link_session_busy, android.widget.Toast.LENGTH_LONG).show() return true } - if (!SessionService.launchGame(this, game.gameIdString)) { + val steamVr = game.gameIdString == com.droiddeck.launcher.gpu.SteamVr.APP_ID + if (!steamVr && !SessionService.launchGame(this, game.gameIdString)) { android.widget.Toast.makeText(this, R.string.game_link_failed, android.widget.Toast.LENGTH_LONG).show() return false } startActivity(Intent(this, SessionActivity::class.java).setAction(SessionService.ACTION_RESUME) + .putExtra(SessionActivity.EXTRA_STEAMVR, steamVr) .putExtra(SessionActivity.EXTRA_RETURN_HOME, 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) - .putExtra(SessionService.EXTRA_STEAM_URL, - com.droiddeck.launcher.frontend.GameLaunchLink.steamUrl(game.gameIdString)), steamSession = true) + .apply { + if (game.gameIdString == com.droiddeck.launcher.gpu.SteamVr.APP_ID) { + putExtra(SessionActivity.EXTRA_STEAMVR, true) + } else { + putExtra(SessionService.EXTRA_STEAM_URL, + com.droiddeck.launcher.frontend.GameLaunchLink.steamUrl(game.gameIdString)) + } + }, steamSession = true) + } + + private fun launchWithoutSteam(game: Library.SteamGame, returnHome: Boolean): Boolean { + val app = applicationContext + Thread({ + val added = if (game.library == Library.ADDED) runCatching { com.droiddeck.launcher.session.NoSteamLaunch.addedGame(app, game) }.getOrNull() else null + val command = com.droiddeck.launcher.session.NoSteamLaunch.command(game, added) + ui.post { + if (isDestroyed) return@post + if (command == null) { + android.widget.Toast.makeText(this, R.string.game_link_failed, android.widget.Toast.LENGTH_LONG).show() + return@post + } + com.droiddeck.launcher.session.NoSteamLaunch.remember(command) + val next = Intent(this, SessionActivity::class.java) + .putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome) + .putExtra(SessionService.EXTRA_MODE, SessionService.MODE_RUN) + .putExtra(SessionService.EXTRA_PROGRAM, command.program) + .putExtra(SessionService.EXTRA_PROGRAM_ARGS, command.args.toTypedArray()) + when { + !SessionState.running -> startSessionOrWait(next) + 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) + .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)) + else -> pendingSwitch = next + } + } + }, "no-steam-launch").start() + return true + } + + private fun opensEpicLauncher(next: Intent): Boolean = + next.getStringExtra(SessionService.EXTRA_PROGRAM) == com.droiddeck.launcher.session.NoSteamLaunch.EPIC || + next.getStringExtra(SessionService.EXTRA_STEAM_URL) == com.droiddeck.launcher.frontend.GameLaunchLink.steamUrl( + com.droiddeck.launcher.stores.epic.EpicClient.gameId(com.droiddeck.launcher.stores.epic.EpicClient.shortcutAppId)) + + private fun uninstallEpicLauncher() { + if (com.droiddeck.launcher.stores.epic.EpicClient.uninstalling) return + com.droiddeck.launcher.stores.epic.EpicClient.uninstalling = true + pendingSwitch?.takeIf(::opensEpicLauncher)?.let { pendingSwitch = null } + switchingTo?.takeIf(::opensEpicLauncher)?.let { + switchPoll?.let { poll -> ui.removeCallbacks(poll) } + switchPoll = null + switchingTo = null + } + if (SessionState.running) SessionService.stop(this) + val app = applicationContext + val deadline = android.os.SystemClock.uptimeMillis() + SESSION_SWITCH_WAIT_MS + Thread({ + while ((SessionState.running || SessionState.phase !in SESSION_ENDED) && android.os.SystemClock.uptimeMillis() < deadline) { + Thread.sleep(SESSION_SWITCH_POLL_MS) + } + val ended = !SessionState.running && SessionState.phase in SESSION_ENDED + val done = try { + ended && com.droiddeck.launcher.stores.epic.EpicClient.uninstall(app) + } finally { + com.droiddeck.launcher.stores.epic.EpicClient.uninstalling = false + } + ui.post { + if (!isDestroyed) refresh() + android.widget.Toast.makeText(app, if (done) R.string.epic_client_uninstalled else R.string.epic_client_uninstall_failed, + android.widget.Toast.LENGTH_LONG).show() + } + }, "epic-uninstall").start() + } + + private fun openEpicLauncher(): Boolean { + if (com.droiddeck.launcher.stores.epic.EpicClient.uninstalling) { + android.widget.Toast.makeText(this, R.string.epic_client_uninstalling, android.widget.Toast.LENGTH_SHORT).show() + return false + } + if (protons.protonBusyId != null || ProtonExtras.installInProgress || pkgStage != null) { + android.widget.Toast.makeText(this, R.string.main_wait_install_game, android.widget.Toast.LENGTH_SHORT).show() + return false + } + if (!com.droiddeck.launcher.stores.epic.EpicClient.launcherRunning(this) && !com.droiddeck.launcher.stores.epic.EpicClient.fexReady(this)) { + com.droiddeck.launcher.stores.epic.EpicClient.requestFex(this) + android.widget.Toast.makeText(this, R.string.epic_client_needs_fex, android.widget.Toast.LENGTH_LONG).show() + if (!SessionState.running) startSteamSession() + else if (SessionState.mode == SessionService.MODE_STEAM) startActivity(Intent(this, SessionActivity::class.java) + .setAction(SessionService.ACTION_RESUME).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)) + return true + } + if (com.droiddeck.launcher.session.NoSteamLaunch.enabled(this, com.droiddeck.launcher.stores.epic.EpicClient.shortcutAppId)) { + com.droiddeck.launcher.stores.epic.EpicClient.launcherEntry(this, Library.EPIC_LAUNCHER_NAME)?.let { return launchWithoutSteam(it, false) } + } + val launcher = Intent(this, SessionActivity::class.java) + .putExtra(SessionActivity.EXTRA_RETURN_HOME, false) + .putExtra(SessionService.EXTRA_STEAM_URL, com.droiddeck.launcher.frontend.GameLaunchLink.steamUrl( + com.droiddeck.launcher.stores.epic.EpicClient.gameId(com.droiddeck.launcher.stores.epic.EpicClient.shortcutAppId))) + if (SessionState.running && SessionState.mode == SessionService.MODE_STEAM && !SessionState.stopRequested) { + val app = applicationContext + val shortcut = com.droiddeck.launcher.stores.epic.EpicClient.shortcutAppId + val listed = com.droiddeck.launcher.frontend.AddedGames.inSteam(app, shortcut) + if (listed && !SessionService.launchGame(this, com.droiddeck.launcher.stores.epic.EpicClient.gameId(shortcut))) { + android.widget.Toast.makeText(this, R.string.game_link_failed, android.widget.Toast.LENGTH_LONG).show() + return false + } + startActivity(Intent(this, SessionActivity::class.java).setAction(SessionService.ACTION_RESUME) + .putExtra(SessionActivity.EXTRA_RETURN_HOME, false) + .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)) + if (!listed) Thread({ + com.droiddeck.launcher.frontend.AddedGamesPublisher.republish(app) + val id = com.droiddeck.launcher.stores.epic.EpicClient.steamLauncherId(app) ?: shortcut + ui.post { SessionService.launchGame(app, com.droiddeck.launcher.stores.epic.EpicClient.gameId(id)) } + }, "epic-launcher-open").start() + return true + } + if (SessionState.running) { + if (SessionState.stopRequested) android.widget.Toast.makeText(this, R.string.game_link_session_busy, android.widget.Toast.LENGTH_LONG).show() + else pendingSwitch = launcher + return true + } + return startSessionOrWait(launcher) + } + + private fun startSessionOrWait(next: Intent): Boolean { + val started = startSession(next, steamSession = next.hasExtra(SessionService.EXTRA_STEAM_URL)) + if (!started && (busy || LinuxRuntimeInstaller.isBusy())) android.widget.Toast.makeText(this, R.string.main_wait_install_game, android.widget.Toast.LENGTH_SHORT).show() + return started + } + + private fun startAfterSession(next: Intent) { + SessionService.stop(this) + awaitSessionEnd(next, android.os.SystemClock.uptimeMillis() + SESSION_SWITCH_WAIT_MS) + } + + private fun awaitSessionEnd(next: Intent, deadline: Long) { + switchingTo = next + switchDeadline = deadline + switchPoll?.let { ui.removeCallbacks(it) } + val poll = object : Runnable { + override fun run() { + if (isDestroyed) return + if (SessionState.running || SessionState.phase !in SESSION_ENDED) { + if (android.os.SystemClock.uptimeMillis() < deadline) ui.postDelayed(this, SESSION_SWITCH_POLL_MS) + else { + switchPoll = null + switchingTo = null + android.widget.Toast.makeText(this@MainActivity, R.string.game_link_session_busy, android.widget.Toast.LENGTH_LONG).show() + } + return + } + switchPoll = null + switchingTo = null + if (com.droiddeck.launcher.stores.epic.EpicClient.uninstalling && opensEpicLauncher(next)) return + startSessionOrWait(next) + } + } + switchPoll = poll + ui.postDelayed(poll, SESSION_SWITCH_POLL_MS) } private fun handleGameLink(games: List<Library.SteamGame>) { @@ -527,16 +727,24 @@ class MainActivity : ComponentActivity() { theme = SessionPrefs.theme(this) frameGenLabel = getString(R.string.frame_gen_off) appScale = com.droiddeck.launcher.core.AppUiPrefs.scale(this) - // Last start's game list, so the Steam wall is up on the first frame; refresh() replaces it. - steamGames = if (shortcutPicker) emptyList() else com.droiddeck.launcher.frontend.LibraryCache.load(this) + val (cached, cachedX64) = com.droiddeck.launcher.frontend.LibraryCache.snapshot(this) + steamGames = if (shortcutPicker) emptyList() else cached + steamGamesX64 = cachedX64 backActionsInverted = SessionPrefs.backActionsInverted(this) orientation = SessionPrefs.orientation(this) requestedOrientation = orientation launcherFullscreen = SessionPrefs.launcherFullscreen(this) + downloadSource = DownloadSource.mode(this) + downloadMirror = DownloadSource.mirror(this) + downloadPrefix = DownloadSource.custom(this) + DownloadSource.probe() animationsEnabled = SessionPrefs.animationsEnabled(this) + gameStoresEnabled = SessionPrefs.gameStoresEnabled(this) gameStoresSpeedTier = SessionPrefs.gameStoresSpeedTier(this) storesOpenTab = SessionPrefs.storesOpenTab(this) storesShowMature = SessionPrefs.storesShowMature(this) + storesSort = SessionPrefs.storesSort(this) + storesView = SessionPrefs.storesView(this) applyLauncherFullscreen() updates.start() setContent { @@ -558,8 +766,9 @@ class MainActivity : ComponentActivity() { busy = busy, stage = stage, percent = percent, desktopInstalled = desktopInstalled, desktopPresent = desktopPresent, offlineAccount = offlineAccount, offline = offline, - frameGenLabel = frameGenLabel, romsDir = romsDir, logsEnabled = logsEnabled, agentCommands = agentCommands, - steamGames = steamGames, emulators = emulatorList, running = runningLabel, + frameGenLabel = frameGenLabel, romsDir = romsDir, logsEnabled = logsEnabled, + vacDiagnostics = vacDiagnostics, agentCommands = agentCommands, + steamGames = steamGames, steamGamesX64 = steamGamesX64, emulators = emulatorList, running = runningLabel, frameGen = FrameGen.mode(this), lossless = lossless, pageKey = if (showPerformance) "performance" else if (showComponents) "components" else if (showMapping) "controller-mapping" else null, @@ -586,42 +795,52 @@ class MainActivity : ComponentActivity() { showPhantomGate = showPhantomGate, orientation = orientation, launcherFullscreen = launcherFullscreen, + downloadSource = downloadSource, + downloadMirror = downloadMirror, + downloadPrefix = downloadPrefix, animationsEnabled = animationsEnabled, + gameStoresEnabled = gameStoresEnabled, gameStoresSpeedTier = gameStoresSpeedTier, storesOpenTab = storesOpenTab, navigate = navRequest, addedGamesArt = addedGamesArt, sgdbUserKey = sgdbUserKey, storesShowMature = storesShowMature, + storesSort = storesSort, + storesView = storesView, storeDownloadsActive = com.droiddeck.launcher.stores.StoresState.activeDownloads, ), FrontEndActions( - onPlay = { startSteamSession() }, - // The client's desktop UI, with gamescope's Deck integration disabled. + onPlay = { playSteam() }, + onPlaySteamVr = { playSteamVr() }, + onSteamUrl = { url -> + if (!SessionState.running) startSession( + Intent(this, SessionActivity::class.java).putExtra(SessionService.EXTRA_STEAM_URL, url), steamSession = true, + ) + }, onPlayDesktopUi = { startSession(Intent(this, SessionActivity::class.java) .putExtra(SessionService.EXTRA_MODE, SessionService.MODE_STEAM) .putExtra(SessionService.EXTRA_STEAM_UI, "desktop"), steamSession = true) }, - // A store game may need something done first (an Epic game its sign-in code). onSteamGame = { g -> if (shortcutPicker) chooseGameShortcut(g) else { - // The launch takes the Windows components already on; the game's list is - // looked at again in the background once the session is over. com.droiddeck.launcher.frontend.AutoComponents.beforeLaunch(this, g) com.droiddeck.launcher.stores.StoreLaunch.prepare(this, g) { launchGame(g) } } }, + onEpicLauncher = { openEpicLauncher() }, + onUninstallEpicLauncher = { uninstallEpicLauncher() }, onGameShortcut = { g -> com.droiddeck.launcher.frontend.GameShortcuts.pin(this, g) }, onExportGameFile = { g -> pickGameExport(g) }, onSyncGameFiles = { pickGameExport(null) }, onAddGameExe = { path -> addGameExe(path) }, onAddedGamesChanged = { folders -> - // New games want art; an edit does not. val known = steamGames.mapNotNull { it.gameFiles?.path }.toSet() updateAddedGames(folders, then = { if (folders.any { it !in known }) fetchAddedGameArt() }) }, + onSteamGameArtChanged = { appId -> refreshSteamGameArt(appId) }, onAddedGameRemoved = { folder, appId, name -> removeAddedGame(folder, appId, name) }, onAddedGamesArt = { on -> SessionPrefs.setAddedGamesArt(this, on); addedGamesArt = on; if (on) refreshAddedGames() }, onSgdbKey = { key -> @@ -646,7 +865,6 @@ class MainActivity : ComponentActivity() { .putExtra(SessionService.EXTRA_MODE, SessionService.MODE_DESKTOP)) }, onEmulator = { e -> launchProgram(e.program) }, - // An app added on the Desktop page, full screen under gamescope like an emulator. onUserApp = { app -> app.args.firstOrNull()?.let { Library.flatpakNames[it] = app.name } startActivity(Intent(this, SessionActivity::class.java) @@ -654,7 +872,6 @@ class MainActivity : ComponentActivity() { .putExtra(SessionService.EXTRA_PROGRAM, app.program) .putExtra(SessionService.EXTRA_PROGRAM_ARGS, app.args.toTypedArray())) }, - // A Flatpak app from the store, full screen under gamescope like an emulator. onFlatpakApp = { id, name -> Library.flatpakNames[id] = name startActivity(Intent(this, SessionActivity::class.java) @@ -669,7 +886,6 @@ class MainActivity : ComponentActivity() { .putExtra(SessionService.EXTRA_PROGRAM, e.program) .putExtra(SessionService.EXTRA_PROGRAM_ARGS, Library.launchArgs(e.id, g.guestPath).toTypedArray())) }, - // The activity re-attaches to the session that is running; nothing restarts. onResume = { startActivity(Intent(this, SessionActivity::class.java)) }, onSteamSettings = { loadModeSettings(SessionService.MODE_STEAM) }, onRemoveDesktop = { removeDesktop() }, @@ -688,7 +904,6 @@ class MainActivity : ComponentActivity() { onProtons = { openProtons() }, onComponents = { focusContent -> openComponents(focusContent) }, onComponentsTab = { tab -> openComponents(focusContent = true, tab = tab) }, - // A game page's Manage saves: the game's Proton and saves are read when the work runs, off the main thread. onSaveImport = { sg -> importSaves(sg.name) { GameSaves.game(sg) } }, onSaveExport = { sg, layout -> exportSaves(sg.name, layout) { GameSaves.game(sg) } }, onPerformance = { refreshCores(); showComponents = false; showMapping = false; showPerformance = true }, @@ -702,6 +917,10 @@ class MainActivity : ComponentActivity() { SessionPrefs.setLogsEnabled(this, !SessionPrefs.logsEnabled(this)) logsEnabled = SessionPrefs.logsEnabled(this) }, + onVacDiagnostics = { + SessionPrefs.setVacDiagnostics(this, !SessionPrefs.vacDiagnostics(this)) + vacDiagnostics = SessionPrefs.vacDiagnostics(this) + }, onAgentCommands = { com.droiddeck.launcher.agent.AgentAccess.setCommandsEnabled(this, !com.droiddeck.launcher.agent.AgentAccess.commandsEnabled(this)) agentCommands = com.droiddeck.launcher.agent.AgentAccess.commandsEnabled(this) @@ -722,16 +941,20 @@ class MainActivity : ComponentActivity() { } }, "clear-logs").start() }, + onResetSettings = { + if (SessionState.running) android.widget.Toast.makeText(this, R.string.setup_reset_settings_session_running, android.widget.Toast.LENGTH_LONG).show() + else showResetSettings = true + }, onOffline = { OfflineMode.setEnabled(this, !OfflineMode.enabled(this)) offline = OfflineMode.enabled(this) }, onPageBack = { showPerformance = false; showComponents = false; showMapping = false }, + onGameStoresEnabled = { on -> SessionPrefs.setGameStoresEnabled(this, on); gameStoresEnabled = on }, onTheme = { id -> SessionPrefs.setTheme(this, id); theme = id }, onLanguage = { tag -> if (tag != com.droiddeck.launcher.core.AppLanguage.chosen(this)) { com.droiddeck.launcher.core.AppLanguage.setChosen(this, tag) - // Redrawn in the new language; Setup's page and tab are saved state. recreate() } }, @@ -753,12 +976,26 @@ class MainActivity : ComponentActivity() { onStoresOpenTab = { tab -> SessionPrefs.setStoresOpenTab(this, tab); storesOpenTab = tab }, onNavigated = { navRequest = null }, onStoresShowMature = { show -> SessionPrefs.setStoresShowMature(this, show); storesShowMature = show }, + onStoresSort = { sort -> SessionPrefs.setStoresSort(this, sort); storesSort = sort }, + onStoresView = { view -> SessionPrefs.setStoresView(this, view); storesView = view }, onLibraryChanged = { refreshAddedGames(); refresh() }, onAnimationsEnabled = { on -> SessionPrefs.setAnimationsEnabled(this, on) animationsEnabled = on com.droiddeck.launcher.ui.Motion.refresh(this) }, + onDownloadSource = { mode -> + DownloadSource.setMode(this, mode) + downloadSource = mode + }, + onDownloadMirror = { host -> + DownloadSource.setMirror(this, host) + downloadMirror = host + }, + onDownloadPrefix = { prefix -> + DownloadSource.setCustom(this, prefix) + downloadPrefix = DownloadSource.custom(this) + }, onHomeApp = { manageHomeApp() }, onHomeScreen = { on -> HomeApp.setHomeScreenEnabled(this, on) @@ -832,6 +1069,7 @@ class MainActivity : ComponentActivity() { onQamButton = { on -> ControllerPrefs.setQamButton(this, on); refreshController() }, onKeyboardButton = { on -> ControllerPrefs.setKeyboardButton(this, on); refreshController() }, onSelectSteam = { on -> ControllerPrefs.setSelectSteam(this, on); refreshController() }, + onJoyConVr = { on -> ControllerPrefs.setJoyConVr(this, on); refreshController() }, onEditLayout = { startActivity(Intent(this, ControllerEditorActivity::class.java)) }, onResetLayout = { ControllerPrefs.resetAllLayouts(this); refreshController() }, onMapping = { showPerformance = false; showComponents = false; showMapping = true }, @@ -859,6 +1097,15 @@ class MainActivity : ComponentActivity() { onDismiss = { showNonAdreno = null }, ) } + pendingSwitch?.let { next -> + ConfirmDialog( + title = androidx.compose.ui.res.stringResource(R.string.drawer_stop_title), + text = runningLabel ?: "", + confirm = androidx.compose.ui.res.stringResource(R.string.drawer_stop), + onConfirm = { pendingSwitch = null; startAfterSession(next) }, + onDismiss = { pendingSwitch = null }, + ) + } if (showRemove) ConfirmDialog( title = androidx.compose.ui.res.stringResource(R.string.main_remove_runtime_title), text = androidx.compose.ui.res.stringResource(R.string.main_remove_runtime_text), @@ -866,6 +1113,24 @@ class MainActivity : ComponentActivity() { onConfirm = { showRemove = false; removeRuntime() }, onDismiss = { showRemove = false }, ) + lowSpace?.let { free -> + com.droiddeck.launcher.ui.LowSpaceDialog( + free, + onFreeUp = { lowSpace = null; com.droiddeck.launcher.storage.StorageState.requestOpen() }, + onPlay = { lowSpace = null; com.droiddeck.launcher.storage.StorageState.lowSpaceDismissed = true; startSteamSession() }, + onDismiss = { lowSpace = null }, + ) + } + com.droiddeck.launcher.ui.HandCameraHost( + check = placementCheck, + onAskPermission = { cameraPermission.launch(Manifest.permission.CAMERA) }, + onPlay = { placementCheck = null; startSteamSession(steamVr = true) }, + onClose = { placementCheck = null }, + ) + if (showResetSettings) com.droiddeck.launcher.ui.ResetSettingsDialog( + onConfirm = { gameProfiles -> resetSettings(gameProfiles) }, + onDismiss = { showResetSettings = false }, + ) flood?.let { f -> com.droiddeck.launcher.ui.LaunchFlood(f.from, onProgress = { floodProgress = it }) { launchFlooded(f) } } returning?.let { r -> com.droiddeck.launcher.ui.FloodReturn(androidx.compose.ui.graphics.Color(r.color), r.to, onProgress = { floodProgress = it }) { @@ -879,26 +1144,22 @@ class MainActivity : ComponentActivity() { } if (savedInstanceState == null) ui.post { startSteamAtStartupIfEnabled() } + else { + pendingSwitch = savedIntent(savedInstanceState, KEY_PENDING_SWITCH) + savedIntent(savedInstanceState, KEY_SWITCHING_TO)?.let { awaitSessionEnd(it, savedInstanceState.getLong(KEY_SWITCH_DEADLINE)) } + } - // The session's logs land in Downloads so a failed run can be handed over as a folder - // rather than dug out of app-private storage. targetSdk 28 means the old permission still - // grants exactly that. val wanted = ArrayList<String>() if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { wanted.add(Manifest.permission.WRITE_EXTERNAL_STORAGE) } - // The microphone is off by default. Someone who turned it on before the permission was - // granted is asked once here, with the storage prompt; a refusal is not asked again - the - // toggle asks when used. if (SessionPrefs.micEnabled(this) && !SessionPrefs.micAsked(this) && checkSelfPermission(Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { wanted.add(Manifest.permission.RECORD_AUDIO) SessionPrefs.setMicAsked(this) } if (wanted.isNotEmpty()) requestPermissions(wanted.toTypedArray(), 1) - // A store sign-in an earlier build left in plain text is sealed with the Keystore key. Thread({ com.droiddeck.launcher.stores.StoreAccounts.encryptAll(this) }, "store-credentials").start() - // A session folder left without its ending - the process was killed - gets it now. if (!SessionState.running) Thread({ com.droiddeck.launcher.session.LogMigration.run(this) com.droiddeck.launcher.frontend.GamesFolderMigration.run(this) @@ -922,8 +1183,23 @@ class MainActivity : ComponentActivity() { if (SessionPrefs.runSteamAtStartup(this) && !isFinishing && !isDestroyed) startSteamSession() } - private fun startSteamSession() { - startSession(Intent(this, SessionActivity::class.java), steamSession = true) + private fun playSteam() { + val storage = com.droiddeck.launcher.storage.StorageState + if (!SessionState.running && !storage.lowSpaceDismissed && storage.lowOnSpace(this)) { + lowSpace = storage.freeBytes(this) + storage.refresh(this) + } else startSteamSession() + } + + private fun playSteamVr() { + val tracking = com.droiddeck.launcher.glasses.Glasses.settings.value + if (!com.droiddeck.launcher.glasses.Glasses.state.value.usesSpatialControllers(tracking) && + com.droiddeck.launcher.handtracking.HandTracking.wanted(this)) placementCheck = true + else startSteamSession(steamVr = true) + } + + private fun startSteamSession(steamVr: Boolean = false) { + startSession(Intent(this, SessionActivity::class.java).putExtra(SessionActivity.EXTRA_STEAMVR, steamVr), steamSession = true) } override fun onWindowFocusChanged(hasFocus: Boolean) { @@ -954,7 +1230,6 @@ class MainActivity : ComponentActivity() { } } - /** On the Components page the pad's LB / RB step through the stack's layers, wrapping around. */ override fun dispatchKeyEvent(event: KeyEvent): Boolean { if (event.keyCode == KeyEvent.KEYCODE_BUTTON_A) com.droiddeck.launcher.ui.HeldKeys.confirm = event.action == KeyEvent.ACTION_DOWN if (showComponents && (event.keyCode == KeyEvent.KEYCODE_BUTTON_L1 || event.keyCode == KeyEvent.KEYCODE_BUTTON_R1)) { @@ -963,8 +1238,6 @@ class MainActivity : ComponentActivity() { } return true } - // Compose throws when its focus tree has lost the focused node; one key is dropped - // instead of the app. return try { super.dispatchKeyEvent(event) } catch (e: IllegalStateException) { @@ -979,23 +1252,17 @@ class MainActivity : ComponentActivity() { orientation = SessionPrefs.orientation(this) requestedOrientation = orientation refreshWifiDiscovery() - // Back from a store's sign-in page: the Stores chips show the account at once. A store - // install finishing while this screen is up rebuilds the Games list through the listener. com.droiddeck.launcher.stores.StoresState.refresh(this) com.droiddeck.launcher.stores.StoresState.libraryListener = { refreshAddedGames(); refresh() } com.droiddeck.launcher.ui.Motion.refresh(this) - // Back from a session stopped behind a flood: open on its blue, before the first frame. com.droiddeck.launcher.ui.QuitFlood.take()?.let { c -> returning = ReturningFlood(c, com.droiddeck.launcher.ui.LaunchOrigin.takeReturn()) } refreshPhantomStatus() syncLossless() - // Opening the app and coming back from a session both land here. updates.onResume() - // Auto keeps this GPU's recommended driver pair installed and set: once per app start. - drivers.ensureAuto(force = false) - // Swaps queued while a game ran on that Proton go in once nothing uses it (usually the - // session has just ended). Cheap when nothing is queued. + drivers.checkOnOpen() + protons.checkUpdates() if (!SessionState.running) Thread({ val applied = runCatching { ComponentsManager.applyQueued(this) }.getOrDefault(emptyList()) if (applied.isNotEmpty()) ui.post { @@ -1012,8 +1279,6 @@ class MainActivity : ComponentActivity() { decky.deckyInstalled = DeckyManager.installed(this) DeckyManager.syncCefMarker(this) decky.deckySupervisor = DeckyManager.supervisorEnabled(this) - // Added games' art (a store lookup for what the folders lack) starts here, not only when - // the cog opens. refreshAddedGames() if (catalog == null) loadDesktopCatalog() if (!busy) Thread({ checkCatalog() }, "catalog").start() @@ -1031,6 +1296,19 @@ class MainActivity : ComponentActivity() { refreshSecondScreenDisplays() } + override fun onSaveInstanceState(outState: Bundle) { + super.onSaveInstanceState(outState) + pendingSwitch?.let { outState.putParcelable(KEY_PENDING_SWITCH, it) } + switchingTo?.let { + outState.putParcelable(KEY_SWITCHING_TO, it) + outState.putLong(KEY_SWITCH_DEADLINE, switchDeadline) + } + } + + private fun savedIntent(state: Bundle, key: String): Intent? = + if (Build.VERSION.SDK_INT >= 33) state.getParcelable(key, Intent::class.java) + else @Suppress("DEPRECATION") state.getParcelable(key) + override fun onDestroy() { updates.unregister() super.onDestroy() @@ -1040,10 +1318,8 @@ class MainActivity : ComponentActivity() { unregisterReceiver(wifiLocationReceiver) unregisterReceiver(mediaReceiver) ui.removeCallbacks(mediaRefresh) - // An install finishing while this screen is away is picked up by onResume's refresh. com.droiddeck.launcher.stores.StoresState.libraryListener = null displayManager.unregisterDisplayListener(secondScreenDisplayListener) - // The session covers the page by now; coming back finds it as it was. flood = null returning = null floodProgress = 0f @@ -1060,7 +1336,9 @@ class MainActivity : ComponentActivity() { private fun refreshSecondScreenDisplays() { if (!::displayManager.isInitialized) return - secondScreenDisplays = SecondScreenDisplays.available(displayManager) + // The launcher can itself be shown on a non-default display (DeX, an external monitor); that one is not a "second screen". + val ownDisplayId = if (android.os.Build.VERSION.SDK_INT >= 30) display?.displayId ?: android.view.Display.DEFAULT_DISPLAY else @Suppress("DEPRECATION") windowManager.defaultDisplay.displayId + secondScreenDisplays = SecondScreenDisplays.available(displayManager, ownDisplayId) } private fun launchAndroidApp(app: HomeApp.LaunchableApp, displayId: Int?) { @@ -1099,7 +1377,6 @@ class MainActivity : ComponentActivity() { }, "catalog-desktop").start() } - /** Runs a save import or export off the main thread, one at a time, and says how it went. */ private fun saveAction(label: String, work: () -> String) { if (busy || LinuxRuntimeInstaller.isBusy() || saveBusy != null) return saveBusy = label @@ -1112,7 +1389,6 @@ class MainActivity : ComponentActivity() { }, "game-saves-action").start() } - /** The Protons DroidDeck installs are the Components page's Proton layer. */ private fun openProtons() = openComponents(focusContent = true, tab = com.droiddeck.launcher.ui.PROTON_TAB) private fun refreshController() { @@ -1136,7 +1412,6 @@ class MainActivity : ComponentActivity() { showPerformance = false showMapping = false showComponents = true - // The Proton layer's options for every Proton, as they are now. fexPreset = SessionPrefs.fexPreset(this) forceSsbs = SessionPrefs.forceSsbs(this) fastSync = SessionPrefs.fastSync(this) @@ -1145,6 +1420,7 @@ class MainActivity : ComponentActivity() { components.refreshComponents(snapshotFirst = true) drivers.refreshDrivers() protons.refreshProtons() + protons.checkUpdates() } private fun importComponent(uri: Uri) { @@ -1178,14 +1454,15 @@ class MainActivity : ComponentActivity() { onDownload = { components.downloadComponent(it) }, onRefresh = { components.refreshComponentCatalog() }, onImport = { pickComponent.launch(InAppFilePicker.buildIntent(this, WCP_EXT, getString(R.string.comp_pick_wcp))) }, - // Reached by a hop (a game's Components card, Play's Graphics drivers): back the way it came. onBack = { if (!com.droiddeck.launcher.ui.Hops.back { showComponents = false }) showComponents = false }, + games = steamGames, + generalFexPreset = fexPreset, + onGeneralFexPreset = { id -> SessionPrefs.setFexPreset(this, id); fexPreset = id }, gpu = drivers.state(), gpuActions = com.droiddeck.launcher.ui.GpuDriversActions( onAuto = { on -> drivers.setMode(on) }, onPair = { key -> drivers.selectPair(key) }, onRefresh = { if (drivers.mode == SessionPrefs.GPU_DRIVERS_AUTO) drivers.ensureAuto(force = true) else drivers.checkLatestTurnip() }, - // Picking one driver on its own is Manual: Auto would put its pair back. onSelectLinux = { id -> drivers.selectDriver(id, linux = true) }, onSelectAndroid = { id -> drivers.selectDriver(id, linux = false) }, onRemoveLinux = { id -> drivers.deleteDriver(id, linux = true) }, @@ -1195,6 +1472,8 @@ class MainActivity : ComponentActivity() { onImportAndroid = { pickAndroidDriver.launch(InAppFilePicker.buildIntent(this, ZIP_EXT, getString(R.string.drivers_pick_android))) }, onImportZip = { pickAnyDriver.launch(InAppFilePicker.buildIntent(this, ZIP_EXT, getString(R.string.drivers_pick_any))) }, onRestoreBundled = { TurnipDriver(this).restoreBundled(); drivers.refreshDrivers() }, + onMode = { m -> drivers.chooseMode(m) }, + onRestart = { drivers.restartApp() }, ), protons = com.droiddeck.launcher.ui.ProtonsState( rows = protons.protonRows, busyId = protons.protonBusyId, stage = protons.protonStage, percent = protons.protonPercent, @@ -1203,7 +1482,8 @@ class MainActivity : ComponentActivity() { protonActions = com.droiddeck.launcher.ui.ProtonsActions( onInstall = { id -> protons.installProton(id) }, onCancel = { id -> ProtonExtras.tools.firstOrNull { it.id == id }?.let { ProtonExtras.unqueue(this, it) }; protons.refreshProtons() }, - onRemove = { id -> protons.removeProton(id) }, + onRemove = { id, dir -> protons.removeProton(id, dir) }, + onRemoveOlder = { id -> protons.removeProton(id, older = true) }, ), protonOptions = { com.droiddeck.launcher.ui.ProtonOptions( @@ -1219,7 +1499,7 @@ class MainActivity : ComponentActivity() { ) }, ) - // A Proton installed or removed changes the stack's list of Protons. + androidx.compose.runtime.LaunchedEffect(components.compDownloadRevision) { components.refreshComponents() } androidx.compose.runtime.LaunchedEffect(protons.protonBusyId) { if (protons.protonBusyId == null) components.refreshComponents() } } @@ -1268,7 +1548,6 @@ class MainActivity : ComponentActivity() { @Composable private fun ModeSheetHost(mode: String, tab: String, extras: com.droiddeck.launcher.ui.SheetExtras) { - // Read for the other mode last (or not yet): what this one shows is read as it opens. if (settingsMode != mode) return com.droiddeck.launcher.ui.ModeSheetRows( ModeSettings( @@ -1280,6 +1559,8 @@ class MainActivity : ComponentActivity() { touchMode = touchMode, suspendPolicy = suspendPolicy, steamDownloadsInBackground = steamDownloadsInBackground, + zramCompression = if (mode == SessionService.MODE_STEAM) zramCompression else null, + zramSupported = zramSupported, pipSupported = com.droiddeck.launcher.session.SessionPipController.supported(this), pipAutoEnter = pipAutoEnter, unfoldedControls = if (mode == SessionService.MODE_STEAM && @@ -1287,6 +1568,7 @@ class MainActivity : ComponentActivity() { oscMode = if (mode == SessionService.MODE_STEAM) oscMode else null, backActionsInverted = backActionsInverted, directAudio = if (mode == SessionService.MODE_STEAM) directAudio else null, + picturePosition = if (mode == SessionService.MODE_STEAM) picturePosition else null, stretch16x9 = if (mode == SessionService.MODE_STEAM) stretch16x9 else null, mic = if (mode == SessionService.MODE_STEAM) mic else null, gameStorage = if (mode == SessionService.MODE_STEAM) gameStorage else null, @@ -1295,10 +1577,16 @@ class MainActivity : ComponentActivity() { fexPreset = if (mode == SessionService.MODE_STEAM) fexPreset else null, forceSsbs = forceSsbs, syncBackend = if (mode == SessionService.MODE_STEAM) SessionPrefs.syncBackendOf(fastSync, fsyncFirst, syncFallback) else null, + steamClientArch = if (mode == SessionService.MODE_STEAM) steamClientArch else null, steamRepairQueued = steamRepairQueued, mangoapp = mangoapp, steamController = if (mode == SessionService.MODE_STEAM) steamController else null, runSteamAtStartup = mode == SessionService.MODE_STEAM && runSteamAtStartup, + bootMovie = if (mode == SessionService.MODE_STEAM) bootMovie else null, + bootMovieSound = bootMovieSound, + bootMovieCustomName = bootMovieCustomName, + bootMovieImporting = bootMovieImporting, + bootMovieProgress = bootMovieProgress, wifiDiscovery = if (mode == SessionService.MODE_STEAM) wifiDiscovery else null, wifiDiscoveryPermission = wifiDiscoveryPermission, wifiDiscoveryLocation = wifiDiscoveryLocation, @@ -1338,6 +1626,7 @@ class MainActivity : ComponentActivity() { SessionPrefs.setSteamDownloadsInBackground(this, enabled) steamDownloadsInBackground = enabled }, + onZramCompression = { on -> SessionPrefs.setZramCompression(this, on); zramCompression = on }, onPipAutoEnter = { on -> SessionPrefs.setPipAutoEnter(this, on); pipAutoEnter = on }, onUnfoldedControls = { on -> SessionPrefs.setUnfoldedControls(this, on); unfoldedControls = on }, onOsc = { o -> SessionPrefs.setOscMode(this, o); oscMode = o }, @@ -1346,12 +1635,11 @@ class MainActivity : ComponentActivity() { backActionsInverted = inverted }, onDirectAudio = { on -> SessionPrefs.setDirectAudio(this, on); directAudio = on }, + onPicturePosition = { value -> SessionPrefs.setPicturePosition(this, value); picturePosition = value }, onStretch16x9 = { on -> SessionPrefs.setStretch16x9(this, on); stretch16x9 = on }, onMic = { on -> SessionPrefs.setMicEnabled(this, on) mic = on - // The session checks the grant itself at start; asking here means the - // answer is in before the first session that wants it. if (on && checkSelfPermission(Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { requestPermissions(arrayOf(Manifest.permission.RECORD_AUDIO), 2) } @@ -1373,12 +1661,19 @@ class MainActivity : ComponentActivity() { syncFallback = SessionPrefs.syncFallback(this) }, onSteamRepair = { steamRepairQueued = SteamRepair.queue(this) }, + onSteamClientArch = { id -> SessionPrefs.setSteamClientArch(this, id); steamClientArch = id; refresh() }, onMangoapp = { on -> SessionPrefs.setMangoapp(this, on); mangoapp = on }, onSteamController = { id -> SessionPrefs.setSteamController(this, id); steamController = id }, onRunSteamAtStartup = { on -> SessionPrefs.setRunSteamAtStartup(this, on) runSteamAtStartup = on }, + onBootMovie = { id -> SessionPrefs.setBootMovie(this, id); loadBootMovie() }, + onBootMovieSound = { on -> SessionPrefs.setBootMovieSound(this, on); bootMovieSound = on }, + onImportBootMovie = { + pickBootMovie.launch(InAppFilePicker.buildIntent(this, com.droiddeck.launcher.session.BootMovie.PICKER_EXTENSIONS, getString(R.string.boot_movie_pick))) + }, + onRemoveBootMovie = { com.droiddeck.launcher.session.BootMovie.removeCustom(this); loadBootMovie() }, onDeckyInstall = { release -> decky.installDecky(release) }, onDeckyCheck = { decky.refreshDecky() }, onDeckyEnabled = { enabled -> DeckyManager.setSupervisorEnabled(this, enabled); decky.deckySupervisor = enabled }, @@ -1434,17 +1729,12 @@ class MainActivity : ComponentActivity() { ) } - /** - * The Games tab after these added games were added or edited: each read alone and put in - * place of its old entry (or added), no library-wide scan. [then] runs after, on the main thread. - */ private fun updateAddedGames(folders: List<String>, then: () -> Unit = {}) { if (folders.isEmpty()) return Thread({ val fresh = folders.mapNotNull { f -> com.droiddeck.launcher.frontend.AddedGames.single(this, f)?.let { com.droiddeck.launcher.frontend.Library.addedGame(this, it) } } - // An added or edited game's Windows components, from its source's list. fresh.forEach { com.droiddeck.launcher.frontend.AutoComponents.refreshLater(this, it) } ui.post { val paths = folders.toSet() @@ -1454,19 +1744,30 @@ class MainActivity : ComponentActivity() { }, "added-games-update").start() } - /** An added game removed: off the Games tab now; the rest (cache, Steam, listing) off the main thread. */ + private val steamArtRefreshes = HashMap<Int, Int>() + + private fun refreshSteamGameArt(appId: Int) { + val version = (steamArtRefreshes[appId] ?: 0) + 1 + steamArtRefreshes[appId] = version + Thread({ + val fresh = com.droiddeck.launcher.frontend.Library.steamGames(this).firstOrNull { it.appId == appId } ?: return@Thread + ui.post { + if (steamArtRefreshes[appId] != version) return@post + steamGames = steamGames.map { if (it.appId == appId && it.library != Library.ADDED) fresh else it } + } + }, "steam-art-update").start() + } + private fun removeAddedGame(folder: String, appId: Long?, name: String) { steamGames = steamGames.filterNot { it.library == Library.ADDED && it.gameFiles?.path == folder } Thread({ com.droiddeck.launcher.frontend.AddedGames.remove(this, java.io.File(folder), appId, name) }, "added-game-remove").start() } - /** After the added games changed: art that is missing is fetched (off the main thread). */ private fun refreshAddedGames() { sgdbKeyKnown() fetchAddedGameArt() } - /** Whether the user has a SteamGridDB key of their own, for Setup; read off the main thread. */ private fun sgdbKeyKnown() { Thread({ val set = com.droiddeck.launcher.frontend.SteamGridDb.userKey(this).isNotEmpty() @@ -1475,8 +1776,6 @@ class MainActivity : ComponentActivity() { } private fun fetchAddedGameArt() { - // Art the games do not have yet, from Steam's store, off the main thread; the rail - // redraws when something arrives. if (SessionPrefs.addedGamesArt(this) && !artFetchRunning) { artFetchRunning = true Thread({ @@ -1502,10 +1801,12 @@ class MainActivity : ComponentActivity() { fastSync = SessionPrefs.fastSync(this) fsyncFirst = SessionPrefs.fsyncFirst(this) syncFallback = SessionPrefs.syncFallback(this) + steamClientArch = SessionPrefs.steamClientArch(this) steamRepairQueued = SteamRepair.queued(this) mangoapp = SessionPrefs.mangoapp(this) steamController = SessionPrefs.steamController(this) runSteamAtStartup = SessionPrefs.runSteamAtStartup(this) + loadBootMovie() hdrOn = SessionPrefs.hdr(this, mode) fpsLimit = SessionPrefs.fpsLimit(this, mode) upscaler = SessionPrefs.upscaler(this) @@ -1517,15 +1818,17 @@ class MainActivity : ComponentActivity() { oscMode = SessionPrefs.oscMode(this) backActionsInverted = SessionPrefs.backActionsInverted(this) directAudio = SessionPrefs.directAudio(this) + picturePosition = SessionPrefs.picturePosition(this) stretch16x9 = SessionPrefs.stretch16x9(this) mic = SessionPrefs.micEnabled(this) refreshWifiDiscovery() gameStorage = SessionPrefs.gameStorage(this) storageDiagnostics = SessionPrefs.storageDiagnosticsEnabled(this) settingsMode = mode - // The sheet lifts at once, on what was last read; the slow part (driver files, a walk of the - // added-games folders, the storage volumes) lands while it rises. Thread({ + val zram = com.droiddeck.launcher.core.ZramSupport.supported() + val zramOn = SessionPrefs.zramCompression(this) + ui.post { zramSupported = zram; zramCompression = zramOn } drivers.refreshDrivers() val storage = GameStorage.options(this) val deckyInstalled = if (mode == SessionService.MODE_STEAM) DeckyManager.installed(this) else null @@ -1542,7 +1845,6 @@ class MainActivity : ComponentActivity() { }, "mode-settings").start() } - /** A second Steam library, proven writable first; "" = internal only. */ private fun setGameStorage(path: String, label: String) { if (path.isNotEmpty() && path != SessionPrefs.GAME_STORAGE_OFF) { val problem = GameStorage.prepare(this, path) @@ -1555,7 +1857,6 @@ class MainActivity : ComponentActivity() { gameStorage = path } - /** The two masks as the dialog shows them; an empty stored list shows as every core ticked. */ private fun refreshCores() { clientOverride = SessionPrefs.clientCpusOverride(this) glThread = SessionPrefs.glThread(this) @@ -1577,7 +1878,14 @@ class MainActivity : ComponentActivity() { } private fun refresh() { + // Until the scan finishes, the other client's games would launch in this one. + val listX64 = SessionPrefs.activeSteamClientArch(this) == "x86_64" + if (listX64 != steamGamesX64) { + steamGamesX64 = listX64 + steamGames = steamGames.filterNot(Library::fromSteamClient) + } if (!busy && LinuxRuntimeInstaller.isBusy()) followRuntimeOperation { LinuxRuntimeInstaller.attach(it) } + if (showComponents) drivers.refreshDrivers() addedGamesArt = SessionPrefs.addedGamesArt(this) desktopInstalled = DesktopCatalog.desktopInstalled(this) desktopPresent = DesktopCatalog.desktopPresent(this) @@ -1589,6 +1897,7 @@ class MainActivity : ComponentActivity() { frameGenLabel = FrameGen.label(this) romsDir = SessionPrefs.romsDir(this).takeIf { it.isNotEmpty() } logsEnabled = SessionPrefs.logsEnabled(this) + vacDiagnostics = SessionPrefs.vacDiagnostics(this) agentCommands = com.droiddeck.launcher.agent.AgentAccess.commandsEnabled(this) runningLabel = if (SessionState.running) when (SessionState.mode) { SessionService.MODE_DESKTOP -> getString(R.string.rail_desktop) @@ -1596,17 +1905,15 @@ class MainActivity : ComponentActivity() { ?: SessionState.program?.substringAfterLast('/')?.substringBefore('.') ?: getString(R.string.main_running_program) else -> "Steam" } else null - // The libraries, off the main thread: manifests and a folder scan. val scanGeneration = ++libraryScanGeneration + val artRefreshesAtStart = HashMap(steamArtRefreshes) if (shortcutPicker) shortcutLibraryScanning = true + if (SessionPrefs.steamClientArch(this) == "x86_64" && !OfflineMode.enabled(this)) { + Thread({ com.droiddeck.launcher.session.FexCatalog.refresh(this) }, "fex-catalog").start() + } Thread({ - // The emulators first: they need no walk of the games, and Desktop's dock is made of them. val emus = Library.emulators(this) { id -> DesktopCatalog.installed(this, id) != null } ui.post { if (scanGeneration == libraryScanGeneration) emulatorList = emus } - // Steam's own games next, from their manifests alone (quick), beside the added games - // already listed: a game Steam installed during the session shows as the session ends, - // without waiting for the added games' walk below. Its Windows components' list is - // queued then too, on the low-priority worker, so its page is usually ready. if (ready) { val quick = runCatching { Library.steamGames(this) }.getOrNull() if (quick != null) ui.post { @@ -1620,15 +1927,11 @@ class MainActivity : ComponentActivity() { } } } - // Then one update with the whole list: the wall places games by their position in it, - // so a partial list first would shuffle every capsule when the rest arrived. - // LibraryCache covers the wait. - val games = if (ready) Library.launchableGames(this) else emptyList() + val scannedArch = SessionPrefs.activeSteamClientArch(this) + val scannedX64 = scannedArch == "x86_64" + val games = if (ready) Library.launchableGames(this, arch = scannedArch) else emptyList() val all = games.distinctBy { it.gameId } - if (ready) com.droiddeck.launcher.frontend.LibraryCache.save(this, all) - // Once per app start: the Steam games' Windows components from Steam's lists. - // Queued only, after the launcher has been up a little; the worker takes them one at a time. - // And again after each session (a game installed in it, files changed). + if (ready && scanGeneration == libraryScanGeneration) com.droiddeck.launcher.frontend.LibraryCache.save(this, all, scannedX64) val endedSession = SessionState.sessionId.takeIf { !SessionState.running && it != null && it != componentSweepSession } if (ready && (!componentSweepDone || endedSession != null)) { componentSweepDone = true @@ -1637,13 +1940,16 @@ class MainActivity : ComponentActivity() { } ui.post { if (scanGeneration == libraryScanGeneration) { - steamGames = all + val current = steamGames.filter { it.library != Library.ADDED }.associateBy { it.appId } + steamGamesX64 = scannedX64 + steamGames = all.map { g -> + val newer = current[g.appId] + if (newer != null && g.library != Library.ADDED && steamArtRefreshes[g.appId] != artRefreshesAtStart[g.appId]) g.withArt(newer.art, newer.hero, newer.icon) else g + } shortcutLibraryScanning = false handleGameLink(all) } } - // Box art for the games that have none, fetched after the list is up; the list is - // rebuilt once if any was found. if (!OfflineMode.enabled(this) && CoverArt.fetchMissing(this, emus.flatMap { it.games })) { val refreshed = Library.emulators(this) { id -> DesktopCatalog.installed(this, id) != null } ui.post { emulatorList = refreshed } @@ -1655,7 +1961,6 @@ class MainActivity : ComponentActivity() { if (runtimeChangesBlocked()) return val release = available if (removalPending || installed != null && release?.version == installed) { - // Nothing to install: offer the one destructive thing this screen can do. showRemove = true return } @@ -1663,16 +1968,16 @@ class MainActivity : ComponentActivity() { Thread({ checkCatalog() }, "catalog").start() return } - // The runtime draws with Turnip, an Adreno driver: on Mali, Xclipse or PowerVR the - // compositor gets no usable Vulkan device and a session is sound over a black screen. - // Said before the download, not after it; the user may still go ahead. if (installed == null && !com.droiddeck.launcher.core.DeviceSupport.adreno()) { showNonAdreno = release; return } install(release) } - /** Starts a session; with no runtime on a non-Adreno, the same warning Setup gives comes first, before any download. */ private fun startSession(intent: Intent, steamSession: Boolean = false): Boolean { if (busy || LinuxRuntimeInstaller.isBusy()) return false + if (com.droiddeck.launcher.storage.StorageState.cleaning) { + android.widget.Toast.makeText(this, R.string.storage_cleanup_busy, android.widget.Toast.LENGTH_SHORT).show() + return false + } refreshPhantomStatus() if (steamSession && PhantomProcessLimit.blocksSteam(phantomProcessStatus)) { showPhantomGate = true @@ -1729,6 +2034,21 @@ class MainActivity : ComponentActivity() { } } + private fun resetSettings(gameProfiles: Boolean) { + if (SessionState.running) return + val scopes = steamGames.map { it.profileKey } + Thread({ + val ok = com.droiddeck.launcher.session.SettingsReset.resetAll(this, gameProfiles, scopes) + ui.post { + if (isDestroyed) return@post + com.droiddeck.launcher.core.AppLanguage.setChosen(this, com.droiddeck.launcher.core.AppLanguage.SYSTEM) + if (!ok) android.widget.Toast.makeText(this, R.string.setup_reset_settings_partial, android.widget.Toast.LENGTH_LONG).show() + com.droiddeck.launcher.ui.Motion.refresh(this) + recreate() + } + }, "reset-settings").start() + } + private fun removeRuntime() { if (runtimeChangesBlocked()) return val removal = LinuxRuntimeInstaller.beginUninstall(this) ?: return @@ -1738,16 +2058,10 @@ class MainActivity : ComponentActivity() { } private fun install(release: LinuxRuntimeInstaller.Release) { - // The service keeps the process alive if the user switches away; this screen joins the - // same install (or starts it, if it gets there first) to show the progress. com.droiddeck.launcher.runtime.RuntimeInstallService.start(this, release) followRuntimeOperation { listener -> LinuxRuntimeInstaller.install(this, release, listener) } } - /** - * Shows a runtime operation's progress until it ends. [run] either starts one or joins the one already - * running (null: nothing was), which is how a launcher rebuilt mid-install picks it back up. - */ private fun followRuntimeOperation(run: (LinuxRuntimeInstaller.ProgressListener) -> Boolean?) { busy = true failed = false @@ -1777,7 +2091,12 @@ class MainActivity : ComponentActivity() { companion object { private const val TAG = "MainActivity" private const val MEDIA_SETTLE_MS = 1500L - /** What the picker offers for a driver zip; some file apps label a zip as a plain stream. */ + private const val SESSION_SWITCH_WAIT_MS = 30_000L + private const val SESSION_SWITCH_POLL_MS = 250L + private const val KEY_PENDING_SWITCH = "pending_switch" + private const val KEY_SWITCHING_TO = "switching_to" + private const val KEY_SWITCH_DEADLINE = "switch_deadline" + private val SESSION_ENDED = setOf(SessionPhase.IDLE, SessionPhase.FAILED) private val ZIP_EXT = listOf("zip") private val WCP_EXT = listOf("wcp") } diff --git a/app/src/main/java/com/droiddeck/launcher/ProtonMenu.kt b/app/src/main/java/com/droiddeck/launcher/ProtonMenu.kt index 8bf520818d..5bd651cf5f 100644 --- a/app/src/main/java/com/droiddeck/launcher/ProtonMenu.kt +++ b/app/src/main/java/com/droiddeck/launcher/ProtonMenu.kt @@ -9,15 +9,12 @@ import com.droiddeck.launcher.session.ProtonExtras import com.droiddeck.launcher.ui.ProtonRow import com.droiddeck.launcher.session.SessionState -/** - * The optional ARM64 Protons (GE-Proton, proton-cachyos): the rows the page lists and an install or - * removal in progress. The launcher screen keeps one and shows it. - */ internal class ProtonMenu(private val activity: android.app.Activity, private val ui: android.os.Handler) { var protonRows by mutableStateOf<List<ProtonRow>>(emptyList()) var protonBusyId by mutableStateOf<String?>(null) var protonStage by mutableStateOf<String?>(null) var protonPercent by mutableIntStateOf(-1) + private val checking = java.util.concurrent.atomic.AtomicBoolean(false) fun installProton(id: String) { val tool = ProtonExtras.tools.firstOrNull { it.id == id } ?: return @@ -40,14 +37,14 @@ internal class ProtonMenu(private val activity: android.app.Activity, private va }, "install-proton-$id").start() } - fun removeProton(id: String) { + fun removeProton(id: String, dir: String? = null, older: Boolean = false) { val tool = ProtonExtras.tools.firstOrNull { it.id == id } ?: return if (protonBusyId != null || SessionState.running) return protonBusyId = id - protonStage = activity.getString(R.string.main_removing_named, tool.name) + protonStage = activity.getString(R.string.main_removing_named, dir ?: tool.name) protonPercent = -1 Thread({ - ProtonExtras.remove(activity, tool) + if (older) ProtonExtras.removeOlder(activity, tool) else ProtonExtras.remove(activity, tool, dir) ui.post { protonBusyId = null protonStage = null @@ -57,6 +54,17 @@ internal class ProtonMenu(private val activity: android.app.Activity, private va } fun refreshProtons() { - protonRows = ProtonExtras.tools.map { ProtonRow(it.id, it.name, ProtonExtras.installed(activity, it), ProtonExtras.queued(activity, it)) } + protonRows = ProtonExtras.tools.map { + val all = ProtonExtras.installedAll(activity, it) + ProtonRow(it.id, it.name, all.lastOrNull(), ProtonExtras.queued(activity, it), all, ProtonExtras.update(activity, it)) + } + } + + fun checkUpdates(force: Boolean = false) { + if (!checking.compareAndSet(false, true)) return + Thread({ + val asked = try { ProtonExtras.checkLatest(activity, force) } catch (_: Throwable) { false } finally { checking.set(false) } + if (asked) ui.post { refreshProtons() } + }, "proton-updates").start() } } diff --git a/app/src/main/java/com/droiddeck/launcher/QuestXrActivity.kt b/app/src/main/java/com/droiddeck/launcher/QuestXrActivity.kt new file mode 100644 index 0000000000..28270e195c --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/QuestXrActivity.kt @@ -0,0 +1,118 @@ +package com.droiddeck.launcher + +import android.app.NativeActivity +import android.os.Bundle +import android.os.SystemClock +import android.util.Log +import android.widget.Toast +import com.droiddeck.launcher.gpu.SteamVr +import com.droiddeck.launcher.session.SessionService +import com.droiddeck.launcher.session.SessionState +import com.droiddeck.launcher.wayland.CompositorHost +import com.droiddeck.launcher.wayland.WaylandCompositor + +class QuestXrActivity : NativeActivity() { + private var steamVrStarted = false + @Volatile private var closing = false + @Volatile private var steamVrStatus = SteamVr.Status.UNAVAILABLE + private var sessionId: String? = null + override fun onCreate(savedInstanceState: Bundle?) { + sessionId = SessionState.sessionId + SessionService.setXrActivityVisible(this, true) + super.onCreate(savedInstanceState) + } + + fun onXrActive(active: Boolean) { + if (active) { + check(CompositorHost.isStarted) { "DroidDeck compositor is not running" } + SessionService.resume(this) + WaylandCompositor.nativeSetCardboard(false, 1, 0.064f, 3f, 4f, 0f, 0f, 90f, 0f, 0f, false, 0f) + WaylandCompositor.nativeSetFrameGenArmed(false, 0, 0) + WaylandCompositor.nativeSetZeroCopy(false) + CompositorHost.attachXr() + WaylandCompositor.nativeVsync(System.nanoTime()) + check(WaylandCompositor.nativeWaitSurface(3000)) { "XR frame GPU handshake timed out" } + } + SessionService.setXrActivityVisible(this, active) + if (active) startSteamVr() + } + + private fun startSteamVr() { + if (!steamVrStarted) { + steamVrStarted = true + Thread({ + try { + val started = synchronized(steamVrLock) { + if (closing || !sessionAlive()) false else { + steamVrOwner = this + SteamVr.run(this, "start") + } + } + if (!started) { + if (!closing) leaveXr("SteamVR start failed", sessionAlive()) + return@Thread + } + val startupDeadline = SystemClock.elapsedRealtime() + 30_000 + var lastRunning: Long? = null + while (!closing) { + if (!sessionAlive()) { + leaveXr("Steam session ended", false) + break + } + steamVrStatus = SteamVr.status(this) + val now = SystemClock.elapsedRealtime() + if (steamVrStatus == SteamVr.Status.RUNNING) lastRunning = now + val deadline = lastRunning?.plus(5_000) ?: startupDeadline + if (steamVrStatus != SteamVr.Status.RUNNING && now >= deadline) { + leaveXr("SteamVR stopped or did not finish starting", true) + break + } + Thread.sleep(1000) + } + } finally { + synchronized(steamVrLock) { + // A retiring activity must not stop a replacement's SteamVR session. + if (steamVrOwner === this) { + if (sessionAlive()) SteamVr.run(this, "stop") + steamVrOwner = null + } + } + } + }, "quest-steamvr-start").start() + } + } + + private fun sessionAlive() = SessionState.running && !SessionState.stopRequested && + sessionId != null && SessionState.sessionId == sessionId + + private fun leaveXr(reason: String, failed: Boolean) { + Log.w("DroidDeckXR", reason) + closing = true + runOnUiThread { + if (failed) Toast.makeText(this, R.string.cardboard_steamvr_failed, Toast.LENGTH_LONG).show() + finish() + } + } + + fun onXrFrame(frameTimeNanos: Long) { + WaylandCompositor.nativeVsync(frameTimeNanos) + } + + fun onXrStatus(): Int = steamVrStatus.ordinal + + override fun onDestroy() { + closing = true + SessionService.setXrActivityVisible(this, false) + super.onDestroy() + } + + override fun onStop() { + SessionService.setXrActivityVisible(this, false) + super.onStop() + } + + companion object { + private val steamVrLock = Any() + private var steamVrOwner: QuestXrActivity? = null + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt index 97c408b8c4..008223ca5c 100644 --- a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt @@ -28,10 +28,12 @@ import android.widget.Toast import androidx.activity.ComponentActivity import androidx.activity.OnBackPressedCallback import androidx.activity.result.contract.ActivityResultContracts +import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue +import androidx.compose.runtime.withFrameNanos import androidx.compose.ui.Modifier import androidx.compose.ui.platform.ComposeView import androidx.compose.ui.graphics.toArgb @@ -40,7 +42,25 @@ import com.droiddeck.launcher.core.FileUtils import com.droiddeck.launcher.core.TextureFiltering import com.droiddeck.launcher.files.InAppFilePicker import com.droiddeck.launcher.frontend.Library +import com.droiddeck.launcher.agent.AgentGuest +import com.droiddeck.launcher.frontend.LibraryCache +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreAchievements +import com.droiddeck.launcher.stores.StoreGameSidecar +import com.droiddeck.launcher.stores.StoreLaunchRequests +import com.droiddeck.launcher.stores.epic.EpicClient +import com.droiddeck.launcher.ui.SessionAchievements +import com.droiddeck.launcher.gpu.Cardboard import com.droiddeck.launcher.gpu.FrameGen +import com.droiddeck.launcher.gpu.HeadTracker +import com.droiddeck.launcher.glasses.Glasses +import com.droiddeck.launcher.glasses.GlassesScreen +import com.droiddeck.launcher.glasses.GlassesRendering +import com.droiddeck.launcher.glasses.SpatialTracking +import com.droiddeck.launcher.glasses.TrackingRecovery +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch +import com.droiddeck.launcher.gpu.SteamVr import com.droiddeck.launcher.gpu.ScreenEffectLooks import com.droiddeck.launcher.gpu.ScreenEffects import com.droiddeck.launcher.gpu.Lossless @@ -52,18 +72,24 @@ import com.droiddeck.launcher.input.ControllerPrefs import com.droiddeck.launcher.input.SessionClipboard import com.droiddeck.launcher.input.OnScreenControls import com.droiddeck.launcher.input.PadBridge +import com.droiddeck.launcher.input.PadMouse +import com.droiddeck.launcher.input.PadState import com.droiddeck.launcher.input.SteamControllerBle import com.droiddeck.launcher.input.PointerGestures import com.droiddeck.launcher.input.SecondScreenDisplay import com.droiddeck.launcher.input.SecondScreenDisplays import com.droiddeck.launcher.input.SecondScreenMode import com.droiddeck.launcher.input.TouchpadGestures +import com.droiddeck.launcher.input.ScrollTouchGestures import com.droiddeck.launcher.runtime.LinuxRuntime import com.droiddeck.launcher.session.LoadingState import com.droiddeck.launcher.session.PerfHud import com.droiddeck.launcher.session.PerfMode import com.droiddeck.launcher.session.SteamRepair import com.droiddeck.launcher.session.GameEnvironmentStore +import com.droiddeck.launcher.session.GameProfileFollowState +import com.droiddeck.launcher.session.GameProfileInventoryCache +import com.droiddeck.launcher.session.GameProfileRefreshState import com.droiddeck.launcher.session.SessionPrefs import com.droiddeck.launcher.session.SessionEvents import com.droiddeck.launcher.session.SessionArtifacts @@ -73,6 +99,9 @@ import com.droiddeck.launcher.session.SessionPaths import com.droiddeck.launcher.wayland.HdrSupport import com.droiddeck.launcher.session.SessionService import com.droiddeck.launcher.session.SessionState +import com.droiddeck.launcher.session.ProtonDefault +import com.droiddeck.launcher.session.SelectedGameProfile +import com.droiddeck.launcher.session.WinComponents import com.droiddeck.launcher.ui.CursorOverlay import androidx.compose.ui.graphics.asImageBitmap import com.droiddeck.launcher.ui.DrawerActions @@ -80,28 +109,18 @@ import com.droiddeck.launcher.ui.HudText import com.droiddeck.launcher.ui.LoadingOverlay import com.droiddeck.launcher.ui.SessionDrawer import com.droiddeck.launcher.ui.SessionPausedOverlay -import com.droiddeck.launcher.ui.SecondScreenPresentation +import com.droiddeck.launcher.ui.SecondScreenWindow import com.droiddeck.launcher.ui.DroidDeckTheme import com.droiddeck.launcher.wayland.CompositorHost import com.droiddeck.launcher.wayland.WaylandCompositor import java.io.File import com.droiddeck.launcher.session.ComponentsManager +import com.droiddeck.launcher.session.LatestRequestCoordinator import com.droiddeck.launcher.ui.SessionDrawerPage import com.droiddeck.launcher.ui.sessionDrawerPages import com.droiddeck.launcher.ui.step import kotlin.math.abs -/** - * The session's screen: our Wayland compositor presenting onto this activity's Surface, and the - * input that reaches it. The session itself - gamescope, the Steam client, audio - belongs to - * [SessionService] and keeps running when this activity does not exist, which is what lets the - * user leave Big Picture for another app and come back to it still signed in and still - * downloading. - * - * Three layers: the SurfaceView the compositor draws into, the on-screen pad (a canvas View, - * since it is input rather than a menu), and one Compose layer on top for everything else - - * the HUD line, the loading overlay, the drawer and its dialogs. - */ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { override fun attachBaseContext(newBase: android.content.Context) { super.attachBaseContext(newBase) @@ -111,8 +130,20 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { private lateinit var pip: com.droiddeck.launcher.session.SessionPipController private var pipUi by mutableStateOf(false) private var pipAutoEnter by mutableStateOf(false) - /** Unfolded controls: the setting, and the Deck controls under the game while they show. */ private var unfoldedControls by mutableStateOf(false) + private var picturePosition by mutableStateOf("center") + + private fun applyGameAlignment() { + if (!CompositorHost.isStarted) return + val active = SessionState.mode == SessionService.MODE_STEAM && + !pipUi && !isInPictureInPictureMode && !cardboard.enabled + val alignment = if (!active) ALIGN_CENTER else when (picturePosition) { + "top" -> ALIGN_PICTURE_TOP + "bottom" -> ALIGN_PICTURE_BOTTOM + else -> ALIGN_CENTER + } + WaylandCompositor.nativeSetScaleMode(SCALE_FIT, alignment) + } private var unfoldedPanel: com.droiddeck.launcher.ui.DeckControlsPanel? = null private lateinit var sessionRoot: FrameLayout private val guestKeysDown = mutableSetOf<Int>() @@ -121,20 +152,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { private lateinit var loading: LoadingState private lateinit var hud: PerfHud private var padBridge: PadBridge? = null - /** The handheld's gyro and accelerometer, fed to the Deck controller while the session shows. */ + private var joyConVr: com.droiddeck.launcher.input.JoyConVr? = null + private var handCamera: com.droiddeck.launcher.handtracking.HandCamera? = null private var padMotion: com.droiddeck.launcher.input.PadMotion? = null - /** Between onResume and onPause. */ private var resumed = false private val deckPadListener: () -> Unit = { uiHandler.post { updatePadMotion(); openDeckRing("deck pad changed"); applyUnfoldedControls() } } - /** - * A Deck's controller is there from the moment it boots, and the client looks for it once, as - * it starts. The ring behind the Deck (libfakeinput's /dev/hidraw16) opens on the pad's first - * input otherwise - on a phone with nothing attached, the first touch of the on-screen - * controls, seconds after the client had looked, found no controller and never set the touch - * mode, so its interface took a finger as a mouse. Opened as soon as the session settles on a - * Deck instead. - */ private fun openDeckRing(why: String) { val deck = SessionState.deckPad val opened = if (deck) padBridge?.start() else null @@ -145,23 +168,16 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { }) } - /** Motion is read while the session shows and only if the pad is a Deck controller - which - * the service can decide after this activity has resumed (SessionState.deckPadListener). */ private fun updatePadMotion() { - // A Steam Controller brings its own gyro (SteamControllerBle); the phone's would fight it. if (resumed && !pipUi && SessionState.deckPad && !SteamControllerBle.connected) padMotion?.start() else padMotion?.stop() } private var steamController: SteamControllerBle? = null private var onScreenControls: OnScreenControls? = null - /** Steam's touch controls (SteamTouchControls), made once the session offers the device. */ private var steamTouchControls: com.droiddeck.launcher.input.SteamTouchControls? = null private var steamTouchAvailable by mutableStateOf(false) private val steamTouchRetry = Runnable { updateOnScreenControls() } - /** While Steam's touch controls are up: how the game's touch config says touches outside them - * act (Steam Link's input and mouse modes), in place of the drawer's touch mode. */ private var steamTouchOptions: com.droiddeck.launcher.input.SteamTouchConfig.Options? = null - /** The touch mode touches are routed by: the drawer's, or the game's while Steam's controls are up. */ private var routedTouchMode = SessionPrefs.TOUCH_AUTO private var keyboard: KeyboardHost? = null private var controllerSettings by mutableStateOf<ControllerPrefs.Settings?>(null) @@ -172,31 +188,36 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } private var watching = true private lateinit var touchpad: TouchpadGestures + private lateinit var threeFingerTap: com.droiddeck.launcher.input.ThreeFingerTap + private lateinit var scrollTouch: ScrollTouchGestures + private lateinit var padMouse: PadMouse + @Volatile private var padMouseOn = false + private var padMouseCheckedAt = 0L + private var scrollTouchGesture = false + private var scrollRestX = 0f + private var scrollRestY = 0f private var touchMode by mutableStateOf(SessionPrefs.TOUCH_AUTO) private var cursorPos by mutableStateOf(androidx.compose.ui.geometry.Offset(-100f, -100f)) private var cursorVisible by mutableStateOf(false) - /** The blue the front end flooded to on the way in; the loading screen opens on it (LaunchFlood). */ private var floodColor by mutableStateOf<Int?>(null) private val cursorHide = Runnable { cursorVisible = false } - /** When the pad or the on-screen controls were last used (uptimeMillis); see [showCursor]. */ private var lastPadInputMs = 0L - // The program's own pointer, from wl_pointer.set_cursor (see syncClientCursor): its image in - // session pixels, hotspot, and whether it asked for no pointer at all. private val cursorBuf = IntArray(WaylandCompositor.CURSOR_BUF_INTS) private var cursorSerial = 0 private var clientHidesCursor = false - /** - * A program holds a pointer lock (zwp_locked_pointer_v1: a mouse-look game, through gamescope). - * While it does, a physical mouse is captured and its raw deltas go to the program as relative - * motion. Without capture the deltas are worked out from Android's pointer position, which stops - * at the screen edge, and so did the camera (#153). - */ private var pointerLocked = false private val pointerLockListener = WaylandCompositor.PointerLockListener { locked, _, _ -> uiHandler.post { if (pointerLocked == locked) return@post pointerLocked = locked Log.i(TAG, "pointer lock " + if (locked) "taken by a program" else "released") + padMouseCheckedAt = 0L + if (::padMouse.isInitialized) padMouseMode() + // Touchpad deltas are measured from the middle while locked (moveLockedPointer). + if (locked && ::touchpad.isInitialized) { + drawnRect()?.let { touchpad.place(it.centerX(), it.centerY()) } + cursorVisible = false + } updatePointerCapture() } } @@ -204,7 +225,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { private var cursorHotX by mutableStateOf(0) private var cursorHotY by mutableStateOf(0) private var cursorImageScale by mutableStateOf(1f) - /** labwc changes the shape a moment after the move that reached an edge: look again then. */ private val cursorResync = Runnable { if (syncClientCursor() && clientHidesCursor) cursorVisible = false } private val uiHandler = Handler(Looper.getMainLooper()) private var pendingBackAction: Runnable? = null @@ -235,31 +255,83 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } private val resumeKeysDown = mutableSetOf<Pair<Int, Int>>() - // Compose reads these; the activity writes them. private var drawerOpen by mutableStateOf(false) - /** A stop growing out of the dialog's Stop (overlay px); the session ends once it covers the screen. */ private var quitFrom by mutableStateOf<androidx.compose.ui.geometry.Rect?>(null) - /** Left behind that flood: the front end opens on its blue, so no sink of our own. */ private var quitFlooded = false - /** Leaving behind a flood spreading out of the throbber (FloodSpread); see finish(). */ private var leaving by mutableStateOf(false) - /** Close without the leaving flood: a retry opens a fresh session at once. */ private var closeAtOnce = false - /** The drawer's Components tab: the Protons as last read (ComponentsManager). */ private var drawerComponents by mutableStateOf<ComponentsManager.Snapshot?>(null) + private var drawerDefaultProton by mutableStateOf<String?>(null) + private val drawerComponentMenu by lazy { ComponentsMenu(this, uiHandler) } + private var drawerGameProfileId by mutableStateOf<Long?>(null) + private val drawerGameInventory = GameProfileInventoryCache<Library.SteamGame>() + private var drawerGameInventoryRevision = 0L + private var drawerGameFexPresetSaving by mutableStateOf(false) + private var drawerGameNoSteamSaving by mutableStateOf(false) + private val drawerGameProfileFollowState = GameProfileFollowState() + private data class DrawerGameProfileRefresh( + val followsSteam: Boolean, + val requestedAppId: Long?, + val inventoryRevision: Long, + ) + private data class DrawerGameProfileResult( + val profiles: List<Pair<Long, String>>, + val selectedAppId: Long?, + val profile: SelectedGameProfile?, + val error: Exception? = null, + ) + private var drawerGameProfileRefresh by mutableStateOf(GameProfileRefreshState<DrawerGameProfileResult>()) + private val drawerGameProfileRefreshes = LatestRequestCoordinator<DrawerGameProfileRefresh>() private var drawerPage by mutableStateOf(SessionDrawerPage.CONTROLLER) private var drawerControllerActive by mutableStateOf(false) private var backActionsInverted by mutableStateOf(false) - /** What the pad is to the Steam client (SessionPrefs.CONTROLLER_*), switched from the drawer. */ + private var lowLatencyController by mutableStateOf(false) + private var lowLatencyTouch by mutableStateOf(false) private var padType by mutableStateOf(SessionPrefs.CONTROLLER_DECK) - /** The on-screen PC keyboard (ui/PcKeyboard): real key presses, Esc and F1 included. */ private var pcKeyboardOpen by mutableStateOf(false) + private var achievementsInFront by mutableStateOf<AchievementsInFront?>(null) + private var achievementsOpen by mutableStateOf(false) private var hudOn by mutableStateOf(true) private var upscaler by mutableStateOf(0) private var upscaleSharpness by mutableStateOf(75) private var effects by mutableStateOf(ScreenEffects.OFF) + private var cardboard by mutableStateOf(Cardboard.OFF) + private var headTracker: HeadTracker? = null + private var steamVrStatus by mutableStateOf<SteamVr.Status?>(null) + private var steamVrSwitchedPicture by mutableStateOf(false) + private var steamVrSeenRunning = false + private val steamVrRecovery by lazy { com.droiddeck.launcher.gpu.SteamVrRecovery(this) { + resumed && !ended && SessionState.running && !isInPictureInPictureMode + } } + private var activeCardboard = Cardboard.OFF + private var glasses by mutableStateOf(Glasses.state.value) + private var glassesSettings by mutableStateOf(Glasses.settings.value) + private var glassesScreen: GlassesScreen? = null + private var glassesOutputActive by mutableStateOf(false) + private var trackingRecovery by mutableStateOf<TrackingRecovery?>(null) + private var glasses3dForVr = false + private var ended = false + private var glassesPresent = false + private var steamVrAutoTried = false + private var steamVrInstallTried = false + @Volatile private var steamVrRequestGeneration = 0L + private var headTracking by mutableStateOf(false) + private var glassesSlot by mutableStateOf(0) + private var glassesKey: List<Any?> = emptyList() + private val glassesScope = kotlinx.coroutines.MainScope() + private val hasRotationSensor by lazy { + (getSystemService(SENSOR_SERVICE) as android.hardware.SensorManager).let { + it.getDefaultSensor(android.hardware.Sensor.TYPE_GAME_ROTATION_VECTOR) + ?: it.getDefaultSensor(android.hardware.Sensor.TYPE_ROTATION_VECTOR) + } != null + } + private val cardboardPrefListener = android.content.SharedPreferences.OnSharedPreferenceChangeListener { _, key -> + if (key == SessionPrefs.CARDBOARD_KEY) uiHandler.post { applyCardboard(SessionPrefs.cardboard(this)) } + } private var textureAnisotropy by mutableStateOf(0) private var textureLodBias by mutableStateOf(TextureFiltering.LOD_BIAS_OFF) + private var drawerTextureAnisotropy by mutableStateOf<Int?>(null) + private var drawerTextureLodBias by mutableStateOf<String?>(null) private var lossless by mutableStateOf(Lossless.State.NONE) private val pickLossless = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { r -> if (r.resultCode == RESULT_OK) InAppFilePicker.pickedFile(r.data)?.let { importLossless(it) } @@ -273,10 +345,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { private var secondScreenMode by mutableStateOf(SessionState.secondScreenMode) private var secondScreenDisplays by mutableStateOf<List<SecondScreenDisplay>>(emptyList()) private var selectedSecondScreenDisplay by mutableStateOf(SessionState.secondScreenDisplay) - /** Between onStart and onStop: while stopped the second screen stays closed, its choice kept. */ private var started = false private lateinit var displayManager: DisplayManager - private var secondScreenPresentation: SecondScreenPresentation? = null + private var secondScreenPresentation: SecondScreenWindow? = null private val displayListener = object : DisplayManager.DisplayListener { override fun onDisplayAdded(displayId: Int) = refreshSecondScreenDisplays() override fun onDisplayRemoved(displayId: Int) = refreshSecondScreenDisplays() @@ -286,47 +357,44 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } } - /** - * The panel's rate, followed for the rest of the session. It is read once at start, and a - * panel that drops from 120 to 60 Hz later (battery saver, heat, a vendor overriding the mode - * asked for) left the compositor telling gamescope every frame took 8.3 ms, so the client and - * its games paced against a vblank that no longer came. (WinNative 53836ca9.) - */ private fun followPanelRefresh(displayId: Int) { if (!CompositorHost.isStarted) return - val display = (if (Build.VERSION.SDK_INT >= 30) display else windowManager.defaultDisplay) ?: return - if (display.displayId != displayId) return - val hz = display.refreshRate - if (hz > 1f) WaylandCompositor.nativeSetOutputRefreshRate(hz) + val output = glassesScreen?.display + ?: (if (Build.VERSION.SDK_INT >= 30) display else windowManager.defaultDisplay) ?: return + if (output.displayId != displayId) return + applyOutputPacing() } private var isHomeApp by mutableStateOf(false) private var androidApps by mutableStateOf<List<HomeApp.LaunchableApp>>(emptyList()) - /** - * Shows the on-screen pad when nothing is plugged in and takes it away the moment something - * is - a user with a controller in their hands should not be looking at buttons they cannot - * press, and a user without one must not be left with no way to answer Big Picture. - */ private val deviceListener = object : InputManager.InputDeviceListener { override fun onInputDeviceAdded(deviceId: Int) { logInputDevice("connected", deviceId) - updateOnScreenControls() + joyConVr?.refresh() + padBridge?.syncConnectedControllers() + refreshControls() updatePointerCapture() + updateHandCamera() } override fun onInputDeviceRemoved(deviceId: Int) { Log.i(TAG, "input device $deviceId disconnected") + joyConVr?.refresh() padBridge?.onDeviceRemoved(deviceId) - updateOnScreenControls() + if (::padMouse.isInitialized) padMouse.reset() + refreshControls() updatePointerCapture() + updateHandCamera() + } + override fun onInputDeviceChanged(deviceId: Int) { + joyConVr?.refresh() + refreshControls() } - override fun onInputDeviceChanged(deviceId: Int) = updateOnScreenControls() } private var runtimeRemovalBlocked = false override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - requestedOrientation = SessionPrefs.orientation(this) if (com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.isRemoving() || com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.isMaintaining()) { runtimeRemovalBlocked = true @@ -336,7 +404,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } if (!SessionState.running && SessionState.phase in setOf(SessionPhase.IDLE, SessionPhase.FAILED)) { val mode = intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM - // A Flatpak app or AppImage is named by its arguments, which the name lookup reads here. SessionState.programArgs = intent.getStringArrayExtra(SessionService.EXTRA_PROGRAM_ARGS)?.toList().orEmpty() SessionEvents.begin(this, mode, SessionPaths.label(mode, intent.getStringExtra(SessionService.EXTRA_PROGRAM))) } @@ -345,35 +412,31 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { SessionState.programArgs = intent.getStringArrayExtra(SessionService.EXTRA_PROGRAM_ARGS)?.toList().orEmpty() SessionState.steamUi = intent.getStringExtra(SessionService.EXTRA_STEAM_UI) SessionState.steamUrl = intent.getStringExtra(SessionService.EXTRA_STEAM_URL) + SessionState.steamVr = intent.getBooleanExtra(EXTRA_STEAMVR, false) + } else if (intent.getBooleanExtra(EXTRA_STEAMVR, false) && SessionState.mode == SessionService.MODE_STEAM) { + SessionState.steamVr = true } + if (SessionState.steamVr) Glasses.prepareSteamVrStart() if (intent.action == SessionService.ACTION_AGENT_START) { SessionEvents.record("agent.start_requested", mapOf("mode" to SessionState.mode)) } + com.droiddeck.launcher.gpu.SteamVrHealth.begin(this, SessionState.sessionId) window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) - // Game-tier power policy for the whole session: the panel's fastest mode (one the frame cap - // divides, when there is a cap), and the OS told it is in gameplay. Logged so a slow device - // says why. The cap is the session's: an activity re-created mid-session keeps it. if (!SessionState.running) { SessionState.fpsLimit = SessionPrefs.fpsLimit( this, SessionPrefs.prefMode(intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM), ) } - Log.i(TAG, "perf: " + PerfMode.apply(this, SessionState.fpsLimit)) + applyOutputPacing() if (!SessionState.running) SessionState.followScreen = followChoice() applyFollowOrientation(resources.configuration) goFullscreen() - // The device's volume keys change the stream the session plays on (the relay and - // PulseAudio are media playback); they are never forwarded to the guest. volumeControlStream = android.media.AudioManager.STREAM_MUSIC displayManager = getSystemService(DISPLAY_SERVICE) as DisplayManager refreshSecondScreenDisplays() - // No runtime is not a reason to leave: the loading screen installs it (installThenStart, - // below) and the session starts when it is in. if (!LinuxRuntime.isInstalled(this)) Log.i(TAG, "the Linux runtime is not installed; the loading screen installs it") - // Captured mouse events go down the focus chain, and focus sits somewhere in the overlay: - // the root sees every one of them whichever view that is. val root = object : FrameLayout(this) { override fun dispatchCapturedPointerEvent(event: MotionEvent): Boolean = onCapturedPointer(event) || super.dispatchCapturedPointerEvent(event) @@ -386,7 +449,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { surfaceView = SurfaceView(this) surfaceView.holder.addCallback(this) root.addView(surfaceView) - // The window's size is only known once laid out, and changes as the phone folds or turns. root.addOnLayoutChangeListener { _, l, t, r, b, ol, ot, or, ob -> if (r - l != or - ol || b - t != ob - ot) uiHandler.post { applyUnfoldedControls() } } @@ -395,8 +457,17 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { bridge.setSelectSteam(ControllerPrefs.read(this).selectSteam) padBridge = bridge SessionState.padBridge = bridge - // A paired Steam Controller is read over Bluetooth LE, out of lizard mode, as Steam Link reads it. - SteamControllerBle.listener = { uiHandler.post { updatePadMotion(); updateOnScreenControls() } } + if (Build.VERSION.SDK_INT >= 31) { + val vr = com.droiddeck.launcher.input.JoyConVr(this, File(filesDir, ".wayland-rt/${com.droiddeck.launcher.input.JoyConVr.FILE}")) { taken, released -> + if (joyConVr == null) return@JoyConVr + taken.forEach(bridge::onDeviceRemoved) + if (released.isNotEmpty()) bridge.syncConnectedControllers() + updateHandCamera() + } + bridge.setExcluded(vr::owns) + joyConVr = vr + } + SteamControllerBle.listener = { uiHandler.post { updatePadMotion(); refreshControls() } } steamController = SteamControllerBle(this).also { it.start() } padMotion = com.droiddeck.launcher.input.PadMotion(this) { @Suppress("DEPRECATION") @@ -404,8 +475,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } SessionState.deckPadListener = deckPadListener openDeckRing("activity created") - // A player on the pad or the on-screen controls has no use for the mouse arrow; the next - // touchpad or mouse move brings it back (showCursor), once the pad has been quiet a moment. bridge.setOnPlayerInput { lastPadInputMs = android.os.SystemClock.uptimeMillis() uiHandler.removeCallbacks(cursorHide) @@ -414,8 +483,17 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { onScreenControls = OnScreenControls(this, bridge, onKeyboard = ::togglePcKeyboard).also { root.addView(it) } keyboard = KeyboardHost(this).also { root.addView(it) } touchpad = TouchpadGestures(PointerGestures.slop(this), pointerListener) - // One arrow, ours: Android draws a system pointer for a mouse over any window, and the - // session already draws the pointer it is sent. + threeFingerTap = com.droiddeck.launcher.input.ThreeFingerTap(PointerGestures.slop(this) * 2) + padMouse = PadMouse(padMouseListener) + bridge.setTouchRoute(object : PadBridge.TouchRoute { + override fun active(): Boolean = if (Looper.myLooper() == Looper.getMainLooper()) padMouseMode() else padMouseOn + override fun accept(state: PadState) { + if (Looper.myLooper() == Looper.getMainLooper()) padMouse.onTouchPad(state) + else PadState().also { it.copyFrom(state) }.let { copy -> uiHandler.post { padMouse.onTouchPad(copy) } } + } + }) + scrollTouch = ScrollTouchGestures(PointerGestures.slop(this), + android.view.ViewConfiguration.get(this).scaledMinimumFlingVelocity.toFloat(), scrollListener) val noCursor = android.view.PointerIcon.getSystemIcon(this, android.view.PointerIcon.TYPE_NULL) root.pointerIcon = noCursor surfaceView.pointerIcon = noCursor @@ -433,7 +511,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { hud.onPresentingWindowChanged = { if (FrameGen.engine(this) != FrameGen.ENGINE_OFF) CompositorHost.rearmFrameGen { applyFrameGen() } } - // A session that has already drawn is past its milestones; do not cover its picture. if (SessionState.running && SessionState.firstFrameSeen) { loading.visible = false hud.start() @@ -447,6 +524,37 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { sessionOverlay = createSessionOverlay() root.addView(sessionOverlay) setContentView(root) + glassesScope.launch { Glasses.state.collect { + glasses = it + onGlassesChanged() + updateJoyConTracking() + updateHandCamera() + } } + glassesScope.launch { Glasses.settings.collect { + glassesSettings = it + onGlassesChanged() + updateJoyConTracking() + updateHandCamera() + } } + glassesScope.launch { com.droiddeck.launcher.handtracking.HandTracking.settings.collect { updateHandCamera() } } + glassesScope.launch { + while (true) { + updateTrackingRecovery() + kotlinx.coroutines.delay(100) + } + } + glassesScope.launch { + while (true) { + if (SessionState.running && SessionState.mode == SessionService.MODE_STEAM && + (SessionState.steamVr || steamVrStatus == SteamVr.Status.RUNNING)) { + val lost = kotlinx.coroutines.withContext(kotlinx.coroutines.Dispatchers.IO) { + com.droiddeck.launcher.gpu.SteamVrHealth.deviceLost() + } + if (lost) steamVrRecovery.detected() + } + kotlinx.coroutines.delay(2000) + } + } pip = com.droiddeck.launcher.session.SessionPipController(this, ::pipBounds, ::showPipUi) surfaceView.addOnLayoutChangeListener { _, _, _, _, _, _, _, _, _ -> pip.refresh() } pip.refresh() @@ -457,15 +565,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { WaylandCompositor.setPointerLockListener(pointerLockListener) SessionEvents.markReadyIfPossible() SessionState.endListener = endListener - // A single Back opens the session menu; two quick presses/swipes send the Steam QAM chord. - // The single action waits out the double-press window so the two actions stay distinct. onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) { override fun handleOnBackPressed() { if (pipUi) return - // The PC keyboard closes first (B on a controller), then Back is the drawer again. when { ::loading.isInitialized && loading.ended -> finish() drawerOpen -> drawerOpen = false + achievementsOpen -> closeAchievements() pcKeyboardOpen -> pcKeyboardOpen = false else -> routeBackAction() } @@ -474,19 +580,20 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { watchSession() } - /** - * One Compose layer for every menu and overlay. Touches nothing in it consumes fall through to - * the pad and the game underneath. - */ private fun createSessionOverlay(): ComposeView = ComposeView(this).apply { isFocusable = true isFocusableInTouchMode = true - // Compose draws each control's focus ring. Android's default highlight would cover - // this full-screen host and remain as a white veil after the drawer closes. defaultFocusHighlightEnabled = false setContent { - // The drawer, the PC keyboard and picture in picture take the mouse back. - androidx.compose.runtime.LaunchedEffect(drawerOpen, pcKeyboardOpen, pipUi) { updatePointerCapture() } + androidx.compose.runtime.SideEffect { + com.droiddeck.launcher.glasses.GlassesMenuMirror.setSessionMenuVisible(this@SessionActivity, + (drawerOpen || achievementsOpen || pcKeyboardOpen) && !pipUi && steamVrStatus != SteamVr.Status.RUNNING) + } + androidx.compose.runtime.DisposableEffect(Unit) { + onDispose { com.droiddeck.launcher.glasses.GlassesMenuMirror.setSessionMenuVisible(this@SessionActivity, false) } + } + androidx.compose.runtime.LaunchedEffect(drawerOpen, pcKeyboardOpen, achievementsOpen, pipUi) { updatePointerCapture() } + androidx.compose.runtime.LaunchedEffect(picturePosition, SessionState.running, pipUi, cardboard.enabled) { applyGameAlignment() } DroidDeckTheme { if (pipUi) { if (SessionState.suspended) androidx.compose.foundation.layout.Box( @@ -501,11 +608,30 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { CursorOverlay(cursorPos, cursorVisible, resources.displayMetrics.density, cursorImage, cursorHotX, cursorHotY, cursorImageScale) if (hud.text.isNotEmpty()) HudText(hud.text) + if (glassesOutputActive && !loading.visible) com.droiddeck.launcher.ui.GlassesPlayingHint(glasses.model) + if (trackingRecovery != null && !drawerOpen && !pcKeyboardOpen && !loading.visible) { + androidx.compose.ui.viewinterop.AndroidView( + factory = { com.droiddeck.launcher.ui.TrackingRecoveryView(it) }, + modifier = Modifier.fillMaxSize(), + update = { it.update(trackingRecovery, !glassesOutputActive && glasses.usable && glasses.sbs) }, + ) + } + if (GlassesRendering.usesGlasses(glasses, glassesOutputActive, steamVrStatus == SteamVr.Status.RUNNING) && + headTracking && !drawerOpen && !pcKeyboardOpen && !loading.visible) com.droiddeck.launcher.ui.GlassesRecenterButton( + controllerSettings?.tint ?: android.graphics.Color.rgb(90, 160, 255), controllerSettings?.opacity ?: 100, + onRecenterJoyCons = if (steamVrStatus == SteamVr.Status.RUNNING && + glasses.usesSpatialControllers(glassesSettings) && glassesSettings.joyConTracking) + joyConVr?.let { { it.recenter() } } else null, + ) { headTracker?.recenter() } + if (glasses.present && !drawerOpen && !pcKeyboardOpen && !loading.visible) com.droiddeck.launcher.ui.GlassesCornerButton(glassesSlot, + controllerSettings?.tint ?: android.graphics.Color.rgb(90, 160, 255), controllerSettings?.opacity ?: 100) { + drawerPage = com.droiddeck.launcher.ui.SessionDrawerPage.GLASSES + drawerOpen = true + } if (loading.visible) LoadingOverlay( loading.step, loading.percent, loading.elapsed, loading.hint, loading.ended, topic = loading.topic, readable = loading.readable, title = loadingTitle(), steam = loadingMode() == SessionService.MODE_STEAM, - // As the drawer's Stop does: the service stops, and a start still installing is cancelled. onCancel = { SessionService.stop(this@SessionActivity); finish() }, endedDetail = loading.endedDetail, onRetry = { retrySession() }, @@ -517,11 +643,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { window.setBackgroundDrawable(android.graphics.drawable.ColorDrawable(android.graphics.Color.BLACK)) }, ) - // Opening the drawer takes the controller away from the game: release its pad. androidx.compose.runtime.LaunchedEffect(drawerOpen) { if (drawerOpen) { syncLossless() - padBridge?.releaseAll() + releasePads() androidx.compose.runtime.withFrameNanos { } val requested = sessionOverlay.requestFocus() Log.i(TAG, "drawer root focus requested=$requested focused=${sessionOverlay.hasFocus()}") @@ -529,8 +654,34 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { releaseDrawerDirection() } } - // The PC keyboard takes it too, for moving over the keys; the drawer opens over it. - androidx.compose.runtime.LaunchedEffect(pcKeyboardOpen) { if (pcKeyboardOpen) padBridge?.releaseAll() } + val glassesVr = glasses.usable && glasses.canControl + val steamVrRequested = SessionState.steamVr + val pollSteamVr = SteamVr.shouldPoll(steamVrStatus, cardboard.enabled, + steamVrSwitchedPicture, glassesVr, steamVrRequested) || (drawerOpen && drawerPage == SessionDrawerPage.VR) + LaunchedEffect(pollSteamVr) { + while (pollSteamVr) { + val request = steamVrRequestGeneration + val session = SessionState.sessionId + val now = kotlinx.coroutines.withContext(kotlinx.coroutines.Dispatchers.IO) { + SteamVr.status(this@SessionActivity) + } + if (request == steamVrRequestGeneration && session == SessionState.sessionId) onSteamVrStatus(now) + kotlinx.coroutines.delay(3000) + } + } + LaunchedEffect(drawerOpen, achievementsOpen, AgentGuest.focusRevision, StoreAchievements.revision) { + if (!drawerOpen && !achievementsOpen) return@LaunchedEffect + val found = kotlinx.coroutines.withContext(kotlinx.coroutines.Dispatchers.IO) { + runCatching { resolveAchievementsInFront() } + .onFailure { Log.w(TAG, "achievements in front: ${it.javaClass.simpleName}") }.getOrNull() + } + achievementsInFront = found + if (found == null) achievementsOpen = false + } + androidx.compose.runtime.LaunchedEffect(pcKeyboardOpen) { if (pcKeyboardOpen) releasePads() } + LaunchedEffect(pcKeyboardOpen, drawerOpen, achievementsOpen) { + if (pcKeyboardOpen || drawerOpen || achievementsOpen) padMouse.reset() + } if (pcKeyboardOpen) com.droiddeck.launcher.ui.PcKeyboard( sendKey = { code, down -> if (CompositorHost.isStarted) sendGuestKey(code, down) }, onAndroidKeyboard = { pcKeyboardOpen = false; keyboard?.toggle() }, @@ -544,7 +695,22 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { androidApps = androidApps, hudOn = hudOn, upscaler = upscaler, upscaleSharpness = upscaleSharpness, - effects = effects, textureAnisotropy = textureAnisotropy, textureLodBias = textureLodBias, + effects = effects, + cardboard = cardboard, + cardboardSensor = hasRotationSensor, + onCardboard = { c -> SessionPrefs.setCardboard(this@SessionActivity, c); applyCardboard(c) }, + onCardboardRecenter = { headTracker?.recenter() }, + glassesPresent = glasses.present, + glassesOutput = glassesOutputActive, + onGlassesRecenter = { + headTracker?.recenter() + com.droiddeck.launcher.glasses.GlassesMenuMirror.recenter() + }, + steamVr = steamVrStatus, + immersiveSteamVr = com.droiddeck.launcher.session.QuestExperimental.isSupported(), + onSteamVr = { action -> steamVrAction(action) }, + textureAnisotropy = if (drawerGameProfileId == null) textureAnisotropy else drawerTextureAnisotropy, + textureLodBias = if (drawerGameProfileId == null) textureLodBias else drawerTextureLodBias, frameGen = frameGen, lossless = lossless, oscMode = oscMode, onScreenButtonsVisible = onScreenButtonsVisible, suspendPolicy = suspendPolicy, @@ -558,7 +724,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { onUpscaler = { m -> SessionPrefs.setUpscaler(this@SessionActivity, m); upscaler = m WaylandCompositor.nativeSetUpscaler(m) - // Two Looks carry a scaling mode of their own, so the mode decides which one the log names. WaylandCompositor.nativeSetLookName(ScreenEffectLooks.match(effects, m)?.name) }, onUpscaleSharpness = { pct -> @@ -569,8 +734,24 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { SessionPrefs.setScreenEffects(this@SessionActivity, e); effects = e e.push(upscaler) }, - onTextureAnisotropy = { v -> SessionPrefs.setTextureAnisotropy(this@SessionActivity, v); textureAnisotropy = v }, - onTextureLodBias = { v -> SessionPrefs.setTextureLodBias(this@SessionActivity, v); textureLodBias = v }, + onTextureAnisotropy = { value -> + drawerGameProfileId?.let { appId -> + SessionPrefs.setGameTextureAnisotropy(this@SessionActivity, appId.toString(), value) + drawerTextureAnisotropy = value + } ?: value?.let { + SessionPrefs.setTextureAnisotropy(this@SessionActivity, it) + textureAnisotropy = it + } + }, + onTextureLodBias = { value -> + drawerGameProfileId?.let { appId -> + SessionPrefs.setGameTextureLodBias(this@SessionActivity, appId.toString(), value) + drawerTextureLodBias = value + } ?: value?.let { + SessionPrefs.setTextureLodBias(this@SessionActivity, it) + textureLodBias = it + } + }, onFrameGenPick = { mode -> FrameGen.set(this@SessionActivity, mode) readPrefs() @@ -589,7 +770,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { onKeyboardButton = { on -> updateControllerPrefs { ControllerPrefs.setKeyboardButton(this@SessionActivity, on) } }, onSteamMenu = if (SessionState.mode == SessionService.MODE_STEAM) ({ sendSteamGuide() }) else null, onQam = if (SessionState.mode == SessionService.MODE_STEAM) ({ triggerSteamQam() }) else null, - // Only where the session set the pad up to be switched (SessionService: deckPad). + onAchievements = achievementsInFront?.let { { drawerOpen = false; achievementsOpen = true } }, + achievementsProgress = achievementsInFront?.progress, padType = if (SessionState.mode == SessionService.MODE_STEAM && SessionState.deckPad) padType else null, onPadType = { id -> SessionPrefs.setSteamController(this@SessionActivity, id) @@ -602,6 +784,18 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { SessionPrefs.setBackActionsInverted(this@SessionActivity, inverted) backActionsInverted = inverted }, + lowLatencyController = lowLatencyController, + lowLatencyTouch = lowLatencyTouch, + onLowLatencyController = { on -> + SessionPrefs.setLowLatencyController(this@SessionActivity, on) + lowLatencyController = on + applyLowLatency() + }, + onLowLatencyTouch = { on -> + SessionPrefs.setLowLatencyTouch(this@SessionActivity, on) + lowLatencyTouch = on + applyLowLatency() + }, onOsc = { v -> SessionPrefs.setOscMode(this@SessionActivity, v) readPrefs() @@ -665,9 +859,50 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { }, onClose = { drawerOpen = false }, components = drawerComponents, - onComponentsRefresh = { refreshDrawerComponents() }, + onComponentsRefresh = { + refreshDrawerComponents() + drawerComponentMenu.refreshComponentCatalog(force = false) + }, + componentCatalog = drawerComponentMenu.compCatalog, + componentCatalogAt = drawerComponentMenu.compCatalogAt, + componentCatalogChecking = drawerComponentMenu.compChecking, + componentDownloads = drawerComponentMenu.compDownloads, + componentDownloadRevision = drawerComponentMenu.compDownloadRevision, + onComponentCatalogRefresh = { drawerComponentMenu.refreshComponentCatalog() }, + onComponentDownload = drawerComponentMenu::downloadComponent, + gameProfiles = drawerGameProfileRefresh.data?.profiles.orEmpty(), + selectedGameProfileId = drawerGameProfileId, + selectedGameProfile = drawerGameProfileRefresh.data + ?.takeIf { it.selectedAppId == drawerGameProfileId }?.profile, + gameProfilesLoaded = drawerGameProfileRefresh.loaded, + gameProfileRefreshFailed = drawerGameProfileRefresh.failed, + onSelectedGameProfile = ::selectDrawerGameProfile, + onGameProfilesPageOpened = { + drawerGameProfileFollowState.resumeFollowingSteam() + drawerGameInventoryRevision++ + }, + onSelectedGameProfileRefresh = ::refreshDrawerGameProfile, + gameFexPresetSaving = drawerGameFexPresetSaving, + onGameFexPreset = ::setDrawerGameFexPreset, + gameNoSteamSaving = drawerGameNoSteamSaving, + onGameNoSteam = ::setDrawerGameNoSteam, onComponentSwap = { pid, comp, value -> swapDrawerComponent(pid, comp, value) }, + onGameComponent = ::setDrawerGameComponent, + defaultProtonId = drawerDefaultProton, + onDefaultProton = ::chooseDrawerDefaultProton, + onGameProton = ::setDrawerGameProton, )) + LaunchedEffect(achievementsOpen) { + if (achievementsOpen) { + releasePads() + withFrameNanos { } + sessionOverlay.requestFocus() + } + } + achievementsInFront?.takeIf { achievementsOpen }?.let { inFront -> + SessionAchievements(inFront.game, inFront.title, onClose = ::closeAchievements) + } + com.droiddeck.launcher.ui.AchievementNotificationOverlay() if (SessionState.suspended) SessionPausedOverlay( title = pausedTitle(), onResume = { SessionService.resume(this@SessionActivity) }, @@ -708,6 +943,27 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { padBridge?.triggerQam() } + private fun closeAchievements() { achievementsOpen = false } + + private fun resolveAchievementsInFront(): AchievementsInFront? { + if (!SessionState.running || SessionState.mode != SessionService.MODE_STEAM) return null + val snapshot = AgentGuest.focus(this) ?: return null + val games = LibraryCache.load(this) + val byKey = games.mapNotNull { g -> g.profileKey.toLongOrNull()?.let { it to g } }.toMap() + val windows = snapshot.optJSONArray("focusableApps")?.let { list -> List(list.length()) { list.optLong(it) } }.orEmpty() + val focusedId = snapshot.optLong("focusedApp").takeUnless { snapshot.isNull("focusedApp") } + val appId = com.droiddeck.launcher.session.SessionAchievementGame.activeAppId(focusedId, windows, byKey.keys) ?: return null + val focused = byKey[appId] ?: return null + val store = Store.byId(focused.source) ?: return null + val id = focused.storeId ?: return null + val source = StoreAchievements.forSource(store.id) ?: return null + val sidecar = StoreGameSidecar.find(this, store, id) ?: return null + val game = StoreAchievements.Game.of(sidecar) + val list = source.cached(this, game) ?: (source.fetch(this, game) as? StoreAchievements.Result.Found)?.list ?: return null + if (list.isEmpty()) return null + return AchievementsInFront(game, sidecar.title, list.count { it.unlocked } to list.size) + } + private fun togglePcKeyboard() { drawerOpen = false keyboard?.hide() @@ -733,7 +989,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { performBackAction(double = false) } pendingBackAction = pending - // Wait 500 ms for a second Back press before performing the single-press action. uiHandler.postDelayed(pending, 500L) } @@ -751,18 +1006,120 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } - /** Re-reads the Protons for the drawer's Components tab, first running swaps a closed game was holding back. */ private fun refreshDrawerComponents() { Thread({ val applied = runCatching { ComponentsManager.applyQueued(this) }.getOrDefault(emptyList()) val snap = runCatching { ComponentsManager.snapshot(this) }.getOrNull() + val chosen = snap?.let { s -> runCatching { ProtonDefault.selectedId(this, s.protons.map { it.proton }) }.getOrNull() } uiHandler.post { drawerComponents = snap + drawerDefaultProton = chosen if (applied.isNotEmpty()) android.widget.Toast.makeText(this, getString(R.string.main_applied, applied.joinToString(", ")), android.widget.Toast.LENGTH_LONG).show() } }, "drawer-components").start() } + private fun selectDrawerGameProfile(appId: Long?) { + drawerGameProfileFollowState.selectManually() + drawerGameProfileId = appId + drawerGameProfileRefresh = drawerGameProfileRefresh.retrying() + readDrawerTextureFiltering(appId) + refreshDrawerGameProfile() + } + + private fun readDrawerTextureFiltering(appId: Long?) { + val choice = appId?.let { SessionPrefs.gameTextureFiltering(this, it.toString()) } + drawerTextureAnisotropy = choice?.anisotropy + drawerTextureLodBias = choice?.lodBias + } + + private fun refreshDrawerGameProfile() { + val refresh = DrawerGameProfileRefresh( + drawerGameProfileFollowState.followsSteam, + drawerGameProfileId, + drawerGameInventoryRevision, + ) + if (!drawerGameProfileRefreshes.submit(refresh)) return + Thread({ + var request = drawerGameProfileRefreshes.takeLatest() + while (request != null) { + val current = request + val result = resolveDrawerGameProfileRefresh(current.value) + uiHandler.post { + if (!drawerGameProfileRefreshes.isLatest(current)) return@post + applyDrawerGameProfileRefresh(current.value, result) + } + request = drawerGameProfileRefreshes.takeLatest() + } + }, "drawer-game-profile").start() + } + + private fun resolveDrawerGameProfileRefresh( + refresh: DrawerGameProfileRefresh, + ): DrawerGameProfileResult { + return try { + val games = drawerGameInventory.get(refresh.inventoryRevision) { Library.launchableGames(this) } + val options = games.mapNotNull { game -> + game.profileKey.toLongOrNull()?.let { it to game.name } + }.sortedBy { it.second.lowercase() } + val installedAppIds = options.mapTo(mutableSetOf()) { it.first } + val selectedAppId = if (refresh.followsSteam) { + val activeAppId = AgentGuest.activeSteamAppId(this, installedAppIds) + val selectedSteamAppId = runCatching { AgentGuest.selectedSteamAppId(this) } + AgentGuest.selectedOrActiveInstalledSteamAppId(selectedSteamAppId, activeAppId, installedAppIds) + ?: refresh.requestedAppId + } else { + refresh.requestedAppId + } + val profile = selectedAppId?.let { resolveDrawerGameProfile(it, games) } + DrawerGameProfileResult(options, selectedAppId, profile) + } catch (error: Exception) { + DrawerGameProfileResult(emptyList(), refresh.requestedAppId, null, error) + } + } + + private fun applyDrawerGameProfileRefresh( + refresh: DrawerGameProfileRefresh, + result: DrawerGameProfileResult, + ) { + if (result.error != null) { + if (!drawerGameProfileRefresh.failed) { + Log.w(TAG, "Could not refresh the selected game profile", result.error) + } + drawerGameProfileRefresh = drawerGameProfileRefresh.failed() + return + } + drawerGameProfileRefresh = drawerGameProfileRefresh.succeeded(result) + if (refresh.followsSteam) { + if (drawerGameProfileFollowState.followsSteam) { + drawerGameProfileId = result.selectedAppId + readDrawerTextureFiltering(result.selectedAppId) + } + } + } + + private fun resolveDrawerGameProfile( + selectedAppId: Long, + games: List<Library.SteamGame>, + ): SelectedGameProfile? { + val game = games.firstOrNull { it.profileKey == selectedAppId.toString() } ?: return null + val snapshot = drawerComponents ?: ComponentsManager.snapshot(this) + val protons = snapshot.protons.map { it.proton } + val gameChoice = ProtonDefault.gameChoice(this, game.profileKey) + return SelectedGameProfile.resolve( + selectedAppId = selectedAppId, + games = games, + generalFexPreset = SessionPrefs.fexPreset(this), + environment = GameEnvironmentStore.read(this), + snapshot = snapshot, + generalProtonId = ProtonDefault.selectedId(this, protons), + gameProtonChoice = gameChoice, + gameProtonId = ProtonDefault.gameSelectedId(this, game.profileKey, protons), + gameComponents = ComponentsManager.gameComponents(this, game.profileKey), + gameWindowsComponents = WinComponents.picks(this, game.profileKey), + ) + } + private fun swapDrawerComponent(protonId: String, comp: String, value: String) { Thread({ val message = runCatching { @@ -772,7 +1129,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { val build = snap.protons.firstOrNull { it.proton.id == protonId }?.proton?.version?.let(ComponentsManager::safeName) val current = active ?: "orig:$build" if (queued != null && value == current) { - // Picking what is already in place again cancels the swap waiting for the game. ComponentsManager.cancelQueued(this, protonId, comp); getString(R.string.comp_swap_cancelled) } else if (value.startsWith("orig:")) ComponentsManager.restore(this, protonId, comp, value.removePrefix("orig:")) else ComponentsManager.swap(this, protonId, value) @@ -784,7 +1140,103 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { }, "drawer-components-swap").start() } - /** The session this screen is bringing up: the live one when re-attached, else the intent's. */ + private fun setDrawerGameComponent(appId: Long, comp: String, file: String?) { + val name = drawerGameProfileRefresh.data?.profiles?.firstOrNull { it.first == appId }?.second ?: appId.toString() + Thread({ + val message = runCatching { + ComponentsManager.setGameComponent(this, appId.toString(), comp, file) + getString(R.string.comp_game_saved_next, name) + }.getOrElse { e -> + getString(R.string.session_profile_save_failed, e.message ?: e.javaClass.simpleName) + } + uiHandler.post { + android.widget.Toast.makeText(this, message, android.widget.Toast.LENGTH_LONG).show() + refreshDrawerComponents() + refreshDrawerGameProfile() + } + }, "drawer-game-component").start() + } + + private fun chooseDrawerDefaultProton(protonId: String) { + val proton = drawerComponents?.protons?.firstOrNull { it.proton.id == protonId }?.proton ?: return + drawerDefaultProton = protonId + Thread({ + val message = runCatching { + when (ProtonDefault.request(this, proton)) { + ProtonDefault.Outcome.LIVE -> getString(R.string.comp_default_live, proton.name) + ProtonDefault.Outcome.NEXT_START -> getString(R.string.comp_default_next, proton.name) + ProtonDefault.Outcome.NOT_RUNNABLE -> getString(R.string.comp_default_not_runnable, proton.name) + } + }.getOrElse { e -> getString(R.string.comp_default_failed, e.message ?: e.javaClass.simpleName) } + uiHandler.post { + Toast.makeText(this, message, Toast.LENGTH_LONG).show() + refreshDrawerComponents() + refreshDrawerGameProfile() + } + }, "drawer-default-proton").start() + } + + private fun setDrawerGameProton(appId: Long, protonId: String?) { + val name = drawerGameProfileRefresh.data?.profiles?.firstOrNull { it.first == appId }?.second ?: appId.toString() + val proton = protonId?.let { id -> drawerComponents?.protons?.firstOrNull { it.proton.id == id }?.proton ?: return } + Thread({ + val message = runCatching { + getString( + when (ProtonDefault.requestGame(this, appId.toString(), proton)) { + ProtonDefault.Outcome.LIVE -> R.string.comp_game_proton_live + ProtonDefault.Outcome.NEXT_START -> R.string.comp_game_proton_next + ProtonDefault.Outcome.NOT_RUNNABLE -> R.string.comp_game_proton_not_runnable + }, + name, + ) + }.getOrElse { e -> getString(R.string.session_profile_save_failed, e.message ?: e.javaClass.simpleName) } + uiHandler.post { + Toast.makeText(this, message, Toast.LENGTH_LONG).show() + refreshDrawerGameProfile() + } + }, "drawer-game-proton").start() + } + + private fun setDrawerGameFexPreset(appId: Long, preset: String?) { + if (drawerGameFexPresetSaving) return + drawerGameFexPresetSaving = true + val name = drawerGameProfileRefresh.data?.profiles?.firstOrNull { it.first == appId }?.second ?: appId.toString() + Thread({ + val message = try { + GameEnvironmentStore.setGameFexPreset(this, appId.toString(), preset) + getString(R.string.comp_game_saved_next, name) + } catch (error: Exception) { + Log.w(TAG, "Could not save the game FEX preset for $appId", error) + getString(R.string.session_profile_save_failed, error.message ?: error.javaClass.simpleName) + } + uiHandler.post { + drawerGameFexPresetSaving = false + Toast.makeText(this, message, Toast.LENGTH_LONG).show() + refreshDrawerGameProfile() + } + }, "drawer-game-fex-preset").start() + } + + private fun setDrawerGameNoSteam(appId: Long, on: Boolean) { + if (drawerGameNoSteamSaving) return + drawerGameNoSteamSaving = true + val name = drawerGameProfileRefresh.data?.profiles?.firstOrNull { it.first == appId }?.second ?: appId.toString() + Thread({ + val message = try { + GameEnvironmentStore.setGameNoSteam(this, appId.toString(), on) + getString(R.string.comp_game_saved_next, name) + } catch (error: Exception) { + Log.w(TAG, "Could not save Start without Steam for $appId", error) + getString(R.string.session_profile_save_failed, error.message ?: error.javaClass.simpleName) + } + uiHandler.post { + drawerGameNoSteamSaving = false + Toast.makeText(this, message, Toast.LENGTH_LONG).show() + refreshDrawerGameProfile() + } + }, "drawer-game-no-steam").start() + } + private fun loadingMode(): String = if (SessionState.running) SessionState.mode else intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM @@ -797,20 +1249,17 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } private fun loadingTitle(): String = when (loadingMode()) { - // Also when the desktop was asked for with Steam (Big Picture's Switch to Desktop): the client - // does not open on it. SessionService.MODE_DESKTOP -> getString(R.string.session_starting_desktop) SessionService.MODE_RUN -> { val program = if (SessionState.running) SessionState.program else intent.getStringExtra(SessionService.EXTRA_PROGRAM) com.droiddeck.launcher.frontend.Library.nameForProgram(program)?.let { getString(R.string.session_starting_named, it) } ?: getString(R.string.session_starting_program) } - else -> getString(R.string.load_starting_steam) + else -> if (com.droiddeck.launcher.session.SessionPrefs.activeSteamClientArch(this) == "x86_64") getString(R.string.load_starting_steam_x64) + else getString(R.string.load_starting_steam) } private fun shareCurrentSessionLogs() { - // Once a session has ended its folder has been handed on (SessionPaths.take), and the - // ended screen's Share logs is for that one. val folder = SessionPaths.current() ?: SessionPaths.lastEnded() if (folder == null || !folder.isDirectory) { Toast.makeText(this, R.string.session_no_logs, Toast.LENGTH_LONG).show() @@ -832,15 +1281,22 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { private fun readPrefs() { pipAutoEnter = SessionPrefs.pipAutoEnter(this) unfoldedControls = SessionPrefs.unfoldedControls(this) + picturePosition = SessionPrefs.picturePosition(this) hudOn = SessionPrefs.hudEnabled(this) upscaler = SessionPrefs.upscaler(this) upscaleSharpness = SessionPrefs.upscaleSharpness(this) effects = SessionPrefs.screenEffects(this) + applyCardboard(SessionPrefs.cardboard(this)) + if (SessionPrefs.cardboardSourceBeforeSteamVr(this) >= 0 && !steamVrSwitchedPicture) { + steamVrSwitchedPicture = true + steamVrSeenRunning = true + } textureAnisotropy = SessionPrefs.textureAnisotropy(this) textureLodBias = SessionPrefs.textureLodBias(this) val nextTouchMode = SessionPrefs.touchMode(this) if (touchMode != nextTouchMode) { if (::touchpad.isInitialized) touchpad.cancel() + if (::scrollTouch.isInitialized) scrollTouch.cancel() if (CompositorHost.isStarted) { WaylandCompositor.nativeSendTouch(3, -1, 0, 0) listOf(PointerGestures.BTN_LEFT, PointerGestures.BTN_RIGHT, PointerGestures.BTN_MIDDLE).forEach { @@ -857,24 +1313,14 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { steamDownloadsInBackground = SessionPrefs.steamDownloadsInBackground(this) oscMode = SessionPrefs.oscMode(this) backActionsInverted = SessionPrefs.backActionsInverted(this) + lowLatencyController = SessionPrefs.lowLatencyController(this) + lowLatencyTouch = SessionPrefs.lowLatencyTouch(this) padType = SessionPrefs.steamController(this) } - // ── Compositor ────────────────────────────────────────────────────────────────────────── - /** True while the loading screen is installing the Linux runtime or the desktop; the session waits for it. */ @Volatile private var installingRuntime = false - /** - * First Play (or Desktop) on a fresh install: the runtime, and for the desktop its package, - * are downloaded and unpacked here, on the loading screen's own line and bar, and the session - * starts when they are in. Nothing else changes. - * - * The first Steam session also gets Valve's ARM64 Proton here, before the client has ever - * started, so the compatibility tool is installed and the default at sign-in with no install - * dialog, download or client restart. Not being able to fetch it stops nothing: the session - * then asks the client for it after sign-in, as it always has. - */ private fun installThenStart(runtime: Boolean, desktop: Boolean, proton: Boolean = false) { if (SessionState.stopRequested) return installingRuntime = true @@ -927,8 +1373,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } loading.percent = -1 loading.say(getString(R.string.session_starting_session), LoadingState.Topic.SESSION, readable = false) - // The surface may have come and gone while the download ran; start on the live one. - if (surfaceView.holder.surface?.isValid == true) surfaceCreated(surfaceView.holder) + outputHolder().let { if (it.surface?.isValid == true) surfaceCreated(it) } } }, "runtime-install").start() } @@ -942,16 +1387,11 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { }, "session-failure-artifacts").start() } - /** - * The loading screen's lines for one package: downloading it (with and without its size), checking it, - * unpacking it; the checklist [topic] they belong to, and whether the checking line is shown as it is. - */ private class PackageLines( val downloading: Int, val downloadingMb: Int, val checking: Int, val unpacking: Int, val topic: LoadingState.Topic, val checkingReadable: Boolean, ) - /** Reports one package's download on the loading screen: "<what> · 332 of 791 MB", checking, unpacking. */ private fun progressFor(what: PackageLines, mb: Long) = object : com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.ProgressListener { override fun onProgress(stage: String, percent: Int) = onProgress(com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.Step.OTHER, stage, percent) @@ -972,7 +1412,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } } - /** Null when the runtime is in, else the loading screen's closing line. */ private fun installRuntime(): String? { val release = com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.fetchRelease() ?: return getString(R.string.session_runtime_catalog_unreachable) @@ -981,7 +1420,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return if (ok) null else getString(R.string.session_runtime_install_failed) } - /** Null when the desktop package is in, else the loading screen's closing line. */ private fun installDesktop(): String? { uiHandler.post { loading.percent = -1; loading.say(getString(DESKTOP_LINES.downloading), DESKTOP_LINES.topic, readable = true) } val entry = com.droiddeck.launcher.runtime.DesktopCatalog.desktopEntry(this) @@ -990,7 +1428,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return problem?.let { getString(R.string.session_desktop_install_failed, it) } } - /** Null when the ARM64 Proton is in, else why not; the session goes on either way. */ private fun installProton(): String? { uiHandler.post { loading.percent = -1; loading.say(getString(PROTON_LINES.downloading), PROTON_LINES.topic, readable = true) } val catalog = com.droiddeck.launcher.runtime.DesktopCatalog @@ -1000,50 +1437,40 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } override fun surfaceCreated(holder: SurfaceHolder) { - if (installingRuntime || SessionState.stopRequested) return + if (holder !== outputHolder()) return + if (installingRuntime || SessionState.stopRequested || ended) return if (!SessionState.running) { SessionEvents.transition(SessionPhase.STARTING_COMPOSITOR, "compositor.starting") } val runtimeDir = File(filesDir, ".wayland-rt").apply { mkdirs() } - // The compositor hands this keymap to wl_keyboard clients, which is how the guest reads - // the evdev codes we inject. FileUtils.copyAsset(this, "wayland/keymap.xkb", File(runtimeDir, "keymap.xkb")) - // Turnip, not the system Adreno driver: importing the dma-bufs gamescope commits needs - // VK_EXT_image_drm_format_modifier, which the system driver does not implement. val turnip = TurnipDriver(this) + com.droiddeck.launcher.gpu.DriverSetupLog.write(this, "surface.driver-setup") + if (!CompositorHost.isStarted) CompositorHost.displayChoice = SessionPrefs.androidDriver(this) val driverId = if (CompositorHost.isStarted) null else turnip.install() - // The output size belongs to the session, not to the Surface: gamescope's display is - // sized once when the session starts and cannot change. A foldable recreates the Surface - // on the other panel, and recomputing the size there told the compositor a 21:9 buffer - // was 16:9 - the picture came back squashed sideways. While a session runs, keep its size. - // Follow screen is the exception: there the compositor tells gamescope the new size, so the - // session takes the shape of the Surface it now has. val previous = SessionState.outputSize val live = if (SessionState.followScreen && !isInPictureInPictureMode) com.droiddeck.launcher.session.SessionDisplay.followSize(holder.surfaceFrame.width(), holder.surfaceFrame.height()) else null - val size = live ?: if (SessionState.running) previous else outputSize() + val size = live ?: if (SessionState.running) previous else glassesOutputSize() ?: outputSize() SessionState.outputSize = size if (!SessionState.running) SessionState.refreshHz = refreshHz() - // How far the panel enlarges the session, for texture sharpness "Auto" (TextureFiltering): - // the game environment is published again so the next launch derives it from this session. val panel = panelBounds() SessionState.upscaleRatio = maxOf(panel.width(), panel.height()).toFloat() / maxOf(size.first, size.second).coerceAtLeast(1) Thread({ runCatching { GameEnvironmentStore.publish(this) } .onFailure { Log.e(TAG, "Could not update game environment", it) } }, "game-env-publish").start() - // Letterbox, never stretch or crop: the output can be a different shape from the panel, - // and a game's picture must keep its proportions with bars, not lose its edges. WaylandCompositor.nativeSetScaleMode(SCALE_FIT, ALIGN_CENTER) WaylandCompositor.nativeSetUpscaler(SessionPrefs.upscaler(this)) WaylandCompositor.nativeSetUpscaleSharpness(SessionPrefs.upscaleSharpness(this)) SessionPrefs.screenEffects(this).push(SessionPrefs.upscaler(this)) - // The session's folder, claimed here because the compositor starts before the service and - // opens its log once. The compositor reads the path from its environment; setting it after - // it has started changes nothing, which is why the service copies the file in at teardown. + activeCardboard = effectiveCardboard(SessionPrefs.cardboard(this)) + pushCardboard(activeCardboard) + WaylandCompositor.nativeSetCardboardPoseFile(File(filesDir, ".wayland-rt/droiddeck-headpose").path) + com.droiddeck.launcher.glasses.SpatialTracking.attachPublisher(File(filesDir, ".wayland-rt/droiddeck-spatialpose").path) if (!SessionState.running) { val waylandLog = File(SessionPaths.beginOrCurrent(this), "wayland.log") WaylandCompositor.setSessionLogFile(waylandLog) @@ -1053,12 +1480,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { Log.w(TAG, "could not point the compositor's log at $waylandLog", e) } } - // HDR10: the gate is decided once, when the compositor starts (it lives for the whole app - // process), from the panel's own word and the mode's setting. Zero-copy presentation is - // what puts an HDR frame on a display layer tagged BT2020_PQ, so it is turned on with it. if (!CompositorHost.isStarted) { val mode = SessionPrefs.prefMode(intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM) - val probe = HdrSupport.probe(this) + val probe = HdrSupport.probe(this, glassesScreen?.display) WaylandCompositor.nativeSetHdrDisplay( probe.displayId, probe.name, probe.formats, probe.hdr10, probe.maxLuminance, probe.maxAverageLuminance, probe.minLuminance, @@ -1078,20 +1502,18 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { ) Log.i(TAG, "hdr: " + (if (on) "on" else if (wanted) "wanted but ${probe.reason}" else "off") + " · display ${probe.formats.ifEmpty { "SDR" }}") } + com.droiddeck.launcher.gpu.DriverSetupLog.write(this, "compositor.start driver=$driverId") CompositorHost.startOrAttach( holder.surface, runtimeDir.path, driverId?.let { turnip.driverPath(it) }, driverId?.let { turnip.libraryName(it) }, - applicationInfo.nativeLibraryDir, size.first, size.second, refreshHz(), SessionState.fpsLimit, + applicationInfo.nativeLibraryDir, size.first, size.second, refreshHz(), outputFpsLimit(), ) + onOutputAttached(holder) if (SessionState.running && size != previous) { Log.i(TAG, "follow screen: ${previous.first}x${previous.second} -> ${size.first}x${size.second} on a new surface") WaylandCompositor.nativeResizeOutput(size.first, size.second) } if (!SessionState.running) SessionEvents.record("compositor.started") - // The service owns everything below the compositor. It is started whenever no session is - // running - NOT only when the compositor was just started: the compositor lives for the - // whole process, so the second Play after a session ended used to re-attach the Surface, - // start nothing, and leave the loading panel counting up over a dead session. if (!SessionState.running) { SessionEvents.transition(SessionPhase.STARTING_GUEST, "guest.starting") SessionService.start( @@ -1103,12 +1525,14 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { ) } applyFrameGen() + applyGameAlignment() } private var surfaceW = 0 private var surfaceH = 0 override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) { + if (holder !== outputHolder()) return val resized = surfaceW != 0 && (width != surfaceW || height != surfaceH) surfaceW = width surfaceH = height @@ -1119,12 +1543,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } } - /** - * Follow screen: the session's display takes the window's new size (a Fold opening onto its - * inner panel, or closing onto the cover), so the picture fills the panel instead of being - * letterboxed onto it. Not in picture-in-picture: that window is a preview of the session, - * and resizing the guest to it would leave Steam laid out for a thumbnail. - */ private fun followWindow(width: Int, height: Int) { if (!SessionState.followScreen || isInPictureInPictureMode || !CompositorHost.isStarted) return val size = com.droiddeck.launcher.session.SessionDisplay.followSize(width, height) ?: return @@ -1136,22 +1554,18 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { WaylandCompositor.nativeResizeOutput(size.first, size.second) } - /** Whether this session's resolution is Follow screen; decided once, when it starts. */ private fun followChoice(): Boolean { val mode = SessionPrefs.prefMode(intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM) return SessionPrefs.resolutionChoice(this, mode, com.droiddeck.launcher.session.SessionDisplay.panelSize(this)) == com.droiddeck.launcher.session.SessionDisplay.FOLLOW_SCREEN } - /** - * Follow screen on a large panel (a Fold's inner screen) may turn with the device: a window - * locked to landscape on a squarer panel is letterboxed by the system itself, which no output - * size can undo. A phone-sized panel (the cover screen) stays landscape as before. - */ private fun applyFollowOrientation(config: android.content.res.Configuration) { - if (!SessionState.followScreen) return - val wanted = if (config.smallestScreenWidthDp >= 600) android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER - else android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE + val wanted = if (SessionState.followScreen && config.smallestScreenWidthDp >= 600) { + android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER + } else { + SessionPrefs.orientation(this) + } if (requestedOrientation != wanted) requestedOrientation = wanted } @@ -1162,16 +1576,15 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } override fun surfaceDestroyed(holder: SurfaceHolder) { + // Hiding the phone surface after a handoff delivers a late destruction + // callback. It must not reset the new output's size or attachment. + if (holder !== outputHolder()) return surfaceW = 0 surfaceH = 0 + glassesOutputActive = false CompositorHost.detach(holder.surface) } - /** - * The size the session renders at. gamescope is told this and scales its output onto whatever - * the panel is, so a 1440p phone can run the client at 1080p without the client knowing. - */ - /** The panel, not the window: resources.displayMetrics is what is left after the system bars and the cutout are taken out. */ private fun panelBounds(): android.graphics.Rect = if (Build.VERSION.SDK_INT >= 30) { windowManager.maximumWindowMetrics.bounds } else { @@ -1185,7 +1598,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { val mode = SessionPrefs.prefMode(intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM) val panel = com.droiddeck.launcher.session.SessionDisplay.panelSize(this) val program = intent.getStringExtra(SessionService.EXTRA_PROGRAM) - // Lightweight emulators keep their panel-sized default until a resolution is chosen. val choice = if (intent.getStringExtra(SessionService.EXTRA_MODE) == SessionService.MODE_RUN && Library.drawsAtPanel(program) && !SessionPrefs.resolutionChosen(this, mode)) com.droiddeck.launcher.session.SessionDisplay.MATCH_SCREEN @@ -1193,23 +1605,33 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return com.droiddeck.launcher.session.SessionDisplay.resolveChoice(panel, choice) } - /** - * The rate of the mode PerfMode asked for, not the one the panel is still in: the switch lands - * some frames after onCreate, and read too early it gave gamescope `-r 60` on a 120 Hz panel - - * the client and every game then paced themselves to 60. (WinNative's requestedPanelRefreshRate.) - */ private fun refreshHz(): Float { + glassesScreen?.hz?.takeIf { it > 1f }?.let { return it } val display = if (Build.VERSION.SDK_INT >= 30) display else windowManager.defaultDisplay val wanted = window.attributes.preferredDisplayModeId val hz = display?.supportedModes?.firstOrNull { wanted != 0 && it.modeId == wanted }?.refreshRate ?: display?.refreshRate ?: 60f - return if (hz > 1f) hz else 60f + val mirrorCap = mirrorRefreshLimit().takeIf { it > 0 }?.toFloat() ?: Float.POSITIVE_INFINITY + val capped = minOf(hz, PerfMode.peakRefreshCap(this), mirrorCap) + return if (capped > 1f) capped else 60f + } + + private fun mirrorRefreshLimit(): Int = + GlassesRendering.mirrorRefreshLimit(glassesSettings, glasses, glassesScreen != null) + + private fun outputFpsLimit(): Int = GlassesRendering.fpsLimit(SessionState.fpsLimit, mirrorRefreshLimit()) + + private fun applyOutputPacing() { + Log.i(TAG, "perf: " + PerfMode.apply(this, outputFpsLimit(), mirrorRefreshLimit())) + if (CompositorHost.isStarted) { + val hz = refreshHz() + val changed = kotlin.math.abs(SessionState.refreshHz - hz) > 0.1f + CompositorHost.updatePacing(hz, outputFpsLimit()) + pushCardboard(activeCardboard) + if (changed && ::surfaceView.isInitialized) applyFrameGen() + } } - /** - * The saved frame-generation setting, pushed to the compositor. Off the main thread: LSFG's - * first use translates the shader chain out of Lossless.dll, which takes seconds. - */ private fun applyFrameGen() { val hz = refreshHz() Thread({ @@ -1222,7 +1644,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { }, "frame-gen").start() } - /** A Lossless Scaling installed or updated in Steam during the session is taken when the drawer opens. */ private fun syncLossless() { Thread({ Lossless.sync(this) @@ -1243,9 +1664,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { }, "lossless-import").start() } - // ── Session state ─────────────────────────────────────────────────────────────────────── - /** Keeps the loading overlay current from the session log, and its clock moving. */ private fun watchSession() { val handler = Handler(Looper.getMainLooper()) var ticks = 0 @@ -1271,18 +1690,18 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } private fun onSessionEnded(status: Int) { + ended = true + ++steamVrRequestGeneration if (isInPictureInPictureMode) { runOnUiThread { finish() } return } closeSecondScreen(reset = true) + updateGlassesScreen() + updateHeadTracker() if (status == 0) { runOnUiThread { if (isFinishing || isDestroyed) return@runOnUiThread - // A session asked for in this one's place (the desktop's Steam launchers or - // Steam's Switch to Desktop) starts here: this activity restarts on its intent, as an agent - // start does. startActivity(next) could not do it - the activity is singleTop, so - // the request landed in this instance's onNewIntent and went with its finish(). SessionState.relaunch?.let { next -> SessionState.relaunch = null next.putExtra(EXTRA_RETURN_HOME, intent.getBooleanExtra(EXTRA_RETURN_HOME, false)) @@ -1294,7 +1713,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } return } - // What the log says about why, read off the main thread (notifyEnded arrives on it). Thread({ val hint = sessionEndHint(SessionState.logFile) runOnUiThread { @@ -1309,7 +1727,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { finish() return } - // It stays until the user leaves: a failure read against a timer is a failure not read. val stopped = when (SessionState.mode) { SessionService.MODE_RUN -> com.droiddeck.launcher.frontend.Library.nameForProgram(SessionState.program) ?.let { getString(R.string.session_ended_named, it) } ?: getString(R.string.session_ended_program) @@ -1323,14 +1740,17 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { focusEndedScreen() } - /** The ended screen's buttons take the pad: it is no longer driving a game. */ + private fun releasePads() { + padBridge?.releaseAll() + joyConVr?.releaseButtons() + } + private fun focusEndedScreen() { drawerOpen = false - padBridge?.releaseAll() + releasePads() uiHandler.post { sessionOverlay.requestFocus() } } - /** The same start again, in a fresh activity: the ended one keeps no session to reuse. */ private fun retrySession() { val again = Intent(intent) closeAtOnce = true @@ -1338,13 +1758,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { startActivity(again) } - /** - * One line of advice for a failure the log identifies, or null. The one this recognises: the - * ENOSYS storm - dozens of `socket(): Function not implemented` / `shared memfd open() failed` - * lines - which is proot's seccomp acceleration failing an x86 helper (Steam's xalia under - * FEX) on some devices (a Fold 5, twice). The switch that answers it is in Performance, and a - * user who never opens the log would not know. - */ private class EndHint(val text: String, val evenOnSuccess: Boolean = false) private fun sessionEndHint(log: File?): EndHint? { @@ -1352,7 +1765,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return try { var enosys = 0 var fexMissing = false - // The tail is where a dying session says why; 512 KB covers the storm without reading a 1 GB log. val size = log.length() java.io.RandomAccessFile(log, "r").use { f -> val start = maxOf(0L, size - 512L * 1024) @@ -1376,22 +1788,20 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } } - // ── Input ─────────────────────────────────────────────────────────────────────────────── override fun dispatchKeyEvent(event: KeyEvent): Boolean { - // The device's own volume keys belong to Android: forwarded to the guest as keys they - // changed nothing anyone could hear (a Pocket FIT report, on the desktop). when (event.keyCode) { KeyEvent.KEYCODE_VOLUME_UP, KeyEvent.KEYCODE_VOLUME_DOWN, KeyEvent.KEYCODE_VOLUME_MUTE -> return super.dispatchKeyEvent(event) } if (pipUi) return true + val pad = com.droiddeck.launcher.input.JoyCon.normalize(event) + if (pad !== event) return dispatchKeyEvent(pad) val fromController = PadBridge.isControllerKeyEvent(event) if (fromController && event.action == KeyEvent.ACTION_DOWN) { if (drawerOpen && !drawerControllerActive) sessionOverlay.requestFocus() drawerControllerActive = true } - // While the session starts, B is the loading screen's Cancel, as its corner says. if (fromController && event.keyCode == KeyEvent.KEYCODE_BUTTON_B && ::loading.isInitialized && loading.visible && !loading.ended && !drawerOpen) { if (event.action == KeyEvent.ACTION_DOWN && event.repeatCount == 0) { SessionService.stop(this) @@ -1399,7 +1809,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } return true } - // The ended screen is a page of buttons: the pad drives them, and B leaves. if (::loading.isInitialized && loading.ended) { if (event.keyCode == KeyEvent.KEYCODE_BUTTON_B || event.keyCode == KeyEvent.KEYCODE_BACK) { if (event.action == KeyEvent.ACTION_DOWN && event.repeatCount == 0) finish() @@ -1410,7 +1819,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { if (drawerOpen) { if (fromController && (event.keyCode == KeyEvent.KEYCODE_BUTTON_L1 || event.keyCode == KeyEvent.KEYCODE_BUTTON_R1)) { if (event.action == KeyEvent.ACTION_DOWN && event.repeatCount == 0) { - drawerPage = sessionDrawerPages(SessionState.mode == SessionService.MODE_STEAM && secondScreenDisplays.isNotEmpty()) + drawerPage = sessionDrawerPages(SessionState.mode == SessionService.MODE_STEAM && secondScreenDisplays.isNotEmpty(), glasses.present) .step(drawerPage, if (event.keyCode == KeyEvent.KEYCODE_BUTTON_R1) 1 else -1) releaseDrawerDirection() } @@ -1438,29 +1847,21 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } return true } - if (pcKeyboardOpen && fromController) return super.dispatchKeyEvent(event) + if ((pcKeyboardOpen || achievementsOpen) && fromController) return super.dispatchKeyEvent(event) + if (joyConVr?.onKeyEvent(event) == true) return true + if (fromController && event.keyCode != KeyEvent.KEYCODE_BACK && padMouseMode() && padMouse.onKey(event)) return true if (event.keyCode != KeyEvent.KEYCODE_BACK && padBridge?.onKeyEvent(event) == true) return true - // A hardware keyboard, forwarded to the compositor's wl_keyboard. Back is left to the - // activity, which opens the drawer. if (CompositorHost.isStarted && event.keyCode != KeyEvent.KEYCODE_BACK && !fromController) { val down = event.action == KeyEvent.ACTION_DOWN + if (down && event.repeatCount > 0) return true if (down || event.action == KeyEvent.ACTION_UP) { var evdev = EvdevKeys.fromKeyCode(event.keyCode) - // What the key stands for, and the key it would sit on without Shift - non-zero - // only for a character Shift puts there: every capital and the symbol row. val ch = event.unicodeChar val plain = if (ch > 0) EvdevKeys.unshiftedChar(ch) else 0 - // A soft keyboard's symbol keys are in neither the table nor a scan code, so they - // reached the session as nothing at all - a sign-in took an address without its @. - // Work back from the character instead: which key carries it. if (evdev <= 0 && ch > 0) { val code = EvdevKeys.fromKeyCode(EvdevKeys.keycodeForChar(if (plain != 0) plain else ch)) if (code > 0) evdev = code } - // The modifier has to be made here. A soft keyboard reports Shift in the event's - // meta state and sends no Shift key of its own, so a capital arrives as a key this - // side already knows and came out lowercase. A hardware keyboard sends its own - // Shift, and a second one would release the modifier while the key is still held. val shiftEvdev = if (evdev > 0 && plain != 0 && event.deviceId <= 0) 42 else 0 if (evdev <= 0 && event.scanCode > 0) evdev = event.scanCode if (evdev > 0) { @@ -1491,13 +1892,14 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return true } if (drawerDirectionKey != KeyEvent.KEYCODE_UNKNOWN) releaseDrawerDirection() - if (pcKeyboardOpen && PadBridge.isControllerMotionEvent(event)) return super.dispatchGenericMotionEvent(event) + if ((pcKeyboardOpen || achievementsOpen) && PadBridge.isControllerMotionEvent(event)) return super.dispatchGenericMotionEvent(event) + if (joyConVr?.onMotionEvent(event) == true) return true + if (PadBridge.isControllerMotionEvent(event) && padMouseMode() && padMouse.onMotion(event)) return true if (padBridge?.onMotionEvent(event) == true) return true if (event.isFromSource(android.view.InputDevice.SOURCE_MOUSE) && !drawerOpen && onMouse(event)) return true return super.dispatchGenericMotionEvent(event) } - /** With no view focused, captured mouse events skip the root and arrive here as trackball events. */ override fun dispatchTrackballEvent(event: MotionEvent): Boolean = onCapturedPointer(event) || super.dispatchTrackballEvent(event) @@ -1549,7 +1951,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { uiHandler.postDelayed(drawerDirectionRepeat, drawerFirstRepeatDelayMs) } - /** Use Android's per-device flat region, then rescale the remaining stick travel to 0..1. */ private fun centeredStickAxis(event: MotionEvent, axis: Int): Float { val value = event.getAxisValue(axis) val flat = (event.device?.getMotionRange(axis, event.source)?.flat ?: 0f) @@ -1582,9 +1983,11 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } private val pointerListener = object : PointerGestures.Listener { - override fun onMove(x: Float, y: Float) = movePointer(x, y) + override fun onMove(x: Float, y: Float) { + if (pointerLocked) moveLockedPointer(x, y) else movePointer(x, y) + } override fun onButton(button: Int, pressed: Boolean, x: Float, y: Float) { - movePointer(x, y) + if (!pointerLocked) movePointer(x, y) WaylandCompositor.nativeSendSceneInput(3, button, if (pressed) 1 else 0) } override fun onWheel(steps: Int) { WaylandCompositor.nativeSendSceneInput(4, steps, 0) } @@ -1594,6 +1997,75 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } } + private val scrollListener = object : ScrollTouchGestures.Listener { + override fun onMove(x: Float, y: Float) { + val rect = drawnRect() ?: return + val cx = x.coerceIn(rect.left, rect.right) + val cy = y.coerceIn(rect.top, rect.bottom) + WaylandCompositor.nativeSendPointer(1, InputSpace.x(cx, surfaceView.width), InputSpace.y(cy, surfaceView.height)) + cursorVisible = false + } + override fun onButton(button: Int, pressed: Boolean) { + WaylandCompositor.nativeSendSceneInput(3, button, if (pressed) 1 else 0) + } + override fun onScroll(dx: Float, dy: Float) { + val rect = drawnRect() ?: return + val out = SessionState.outputSize + scrollRestX += dx * out.first / rect.width() + scrollRestY += dy * out.second / rect.height() + val h = scrollRestX.toInt() + val v = scrollRestY.toInt() + if (h == 0 && v == 0) return + scrollRestX -= h + scrollRestY -= v + WaylandCompositor.nativeSendSceneInput(11, ScrollTouchGestures.wheelUnits(v, out.second), ScrollTouchGestures.wheelUnits(h, out.first)) + } + override fun onLongPress() = pointerListener.onLongPress() + } + + private val padMouseListener = object : PadMouse.Listener { + override fun active(): Boolean = padMouseMode() + override fun onScrollStart() { + scrollRestX = 0f + scrollRestY = 0f + val rect = drawnRect() ?: return + val x = rect.left + rect.width() * PAD_SCROLL_POINTER_X + WaylandCompositor.nativeSendPointer(1, InputSpace.x(x, surfaceView.width), InputSpace.y(rect.centerY(), surfaceView.height)) + cursorVisible = false + } + override fun onScroll(dx: Float, dy: Float) = scrollListener.onScroll(dx, dy) + override fun onKey(evdev: Int, pressed: Boolean) = sendGuestKey(evdev, pressed) + override fun onKeyboard() { + uiHandler.post { togglePcKeyboard() } + } + override fun onNavigate() { + cursorVisible = false + } + override fun scrollSpeed(): Float = (drawnRect()?.height() ?: 0f) * PAD_SCROLL_HEIGHTS_PER_S + } + + private fun padMouseMode(): Boolean { + val now = android.os.SystemClock.uptimeMillis() + if (now - padMouseCheckedAt < PAD_MOUSE_CHECK_MS) return padMouseOn + padMouseCheckedAt = now + val on = !pointerLocked && EpicClient.launcherFocused(this) && !EpicClient.playing(this) + if (padMouseOn && !on) padMouse.reset() + if (!padMouseOn && on) padBridge?.releaseAll() + padMouseOn = on + return on + } + + private fun scrollTouchMode(): Boolean = + (routedTouchMode == SessionPrefs.TOUCH_AUTO || routedTouchMode == SessionPrefs.TOUCH_DIRECT) && padMouseMode() + + private fun moveLockedPointer(x: Float, y: Float) { + val rect = drawnRect() ?: return + val scale = SessionState.outputSize.first / rect.width() + WaylandCompositor.sendPointerDelta((x - rect.centerX()) * scale, (y - rect.centerY()) * scale) + touchpad.place(rect.centerX(), rect.centerY()) + cursorVisible = false + } + private fun movePointer(x: Float, y: Float) { val rect = drawnRect() ?: return val cx = x.coerceIn(rect.left, rect.right) @@ -1602,17 +2074,11 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { showCursor(cx, cy) } - /** - * The arrow stays on a desktop; in a Steam session it shows for a moment after each move. While - * a controller is driving (input in the last [CURSOR_PAD_HOLD_MS]) it stays hidden, so a touch - * during play does not flash it up - Bannerlator's rule for its Wayland pointer. - */ private fun showCursor(x: Float, y: Float) { cursorPos = androidx.compose.ui.geometry.Offset(x, y) syncClientCursor() uiHandler.removeCallbacks(cursorResync) uiHandler.postDelayed(cursorResync, 60) - // A program that asked for no pointer (a mouse-look game) wins over everything below. if (clientHidesCursor) { cursorVisible = false; return } if (android.os.SystemClock.uptimeMillis() - lastPadInputMs < CURSOR_PAD_HOLD_MS) return cursorVisible = true @@ -1620,14 +2086,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { if (SessionState.mode == SessionService.MODE_STEAM && SessionState.steamUi != "desktop") uiHandler.postDelayed(cursorHide, 2500) } - /** - * Pulls the program's pointer (wl_pointer.set_cursor) if it changed: labwc's resize arrows at a - * window's edges and corners, a text field's I-beam, or a request for no pointer. Serial 0 = no - * program has set one yet, and the built-in arrow stays. Returns true when something changed. - */ private fun syncClientCursor(): Boolean { if (!CompositorHost.isStarted) return false - // Asked on every pointer move; the image is copied only when the client has changed it. if (WaylandCompositor.nativeCursorSerial() == cursorSerial) return false val n = WaylandCompositor.nativeCursorSnapshot(cursorBuf) if (n < 6) return false @@ -1648,7 +2108,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { cursorImage = bitmap.asImageBitmap() cursorHotX = cursorBuf[4] cursorHotY = cursorBuf[5] - // Session pixels -> screen pixels, as the session's picture is scaled (movePointer). val width = surfaceView.width.takeIf { it > 0 } val height = surfaceView.height.takeIf { it > 0 } val out = SessionState.outputSize @@ -1661,6 +2120,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { if (!::displayManager.isInitialized) return val primaryId = display?.displayId ?: windowManager.defaultDisplay.displayId val candidates = SecondScreenDisplays.available(displayManager, primaryId) + .filter { glassesScreen == null || it.id != glasses.displayId } val oldIds = secondScreenDisplays.map { it.id }.toSet() secondScreenDisplays = candidates val newIds = candidates.map { it.id }.toSet() @@ -1670,7 +2130,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } if (selectedSecondScreenDisplay !in newIds) selectedSecondScreenDisplay = candidates.firstOrNull()?.id ?: -1 if (secondScreenMode != SecondScreenMode.NONE && candidates.isEmpty()) closeSecondScreen(reset = true) - // A choice kept while its display was away (asleep, waking): back as soon as it is. else if (started && secondScreenMode != SecondScreenMode.NONE && secondScreenPresentation == null) showSecondScreen(secondScreenMode) } @@ -1700,15 +2159,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { if (pipUi || !started) return val target = displayManager.getDisplay(selectedSecondScreenDisplay) if (target == null || !target.isValid || (target.flags and Display.FLAG_PRESENTATION) == 0) { - // Not there right now - a panel still waking, say. The choice is kept; the display - // listener shows it again when the display comes back (refreshSecondScreenDisplays). closeSecondScreen(reset = false) return } var presentation = secondScreenPresentation if (presentation?.display?.displayId != target.displayId) { presentation?.closeControls() - presentation = SecondScreenPresentation( + presentation = SecondScreenWindow( this, target, sendPointer = ::moveSecondScreenPointer, sendButton = { button, pressed -> @@ -1718,6 +2175,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { onSteamMenu = ::tapSteamButton, onQam = ::tapQam, onClose = { selectSecondScreenMode(SecondScreenMode.NONE) }, + pad = padBridge, ) secondScreenPresentation = presentation } @@ -1752,18 +2210,17 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { applyUnfoldedControls() } - /** - * Unfolded controls: on a foldable's inner screen, the game above and the Steam Deck controller's - * trackpads and back grips below ([com.droiddeck.launcher.ui.DeckControlsPanel], as a second - * screen shows them, plus a whole gamepad). The on-screen pad is hidden meanwhile. The surface shrinks to the top part, so a Follow screen session resizes - * to it and any other is fitted into it. Folded onto the cover screen - a phone-sized panel - - * or in picture-in-picture, the game is full screen again. - */ + private fun refreshControls() { + applyUnfoldedControls() + updateOnScreenControls() + } + private fun applyUnfoldedControls() { if (!::sessionRoot.isInitialized) return val width = sessionRoot.width val height = sessionRoot.height val wanted = unfoldedControls && com.droiddeck.launcher.session.SessionDisplay.foldable(this) && + !PadBridge.anyControllerConnected() && !SteamControllerBle.connected && SessionState.mode == SessionService.MODE_STEAM && SessionState.deckPad && !pipUi && !isInPictureInPictureMode && width > 0 && height > 0 && resources.configuration.smallestScreenWidthDp >= com.droiddeck.launcher.session.SessionDisplay.UNFOLDED_MIN_DP @@ -1783,7 +2240,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { if (panel == null) { panel = com.droiddeck.launcher.ui.DeckControlsPanel(this, onClose = { chooseUnfoldedControls(false) }, onSteamMenu = ::tapSteamButton, onQam = ::tapQam, pad = padBridge) - // Just above the surface: the on-screen pad, keyboard and drawer still draw over it. sessionRoot.addView(panel, sessionRoot.indexOfChild(surfaceView) + 1) unfoldedPanel = panel updateOnScreenControls() @@ -1811,7 +2267,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } } - /** The touch mode in force: the game's own while Steam's touch controls are shown. */ private fun effectiveTouchMode(): String { val options = steamTouchOptions if (options == null || steamTouchControls?.visibility != View.VISIBLE) return SessionPrefs.touchMode(this) @@ -1830,22 +2285,27 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } if (next == routedTouchMode) return if (::touchpad.isInitialized) touchpad.cancel() + if (::scrollTouch.isInitialized) scrollTouch.cancel() if (CompositorHost.isStarted) WaylandCompositor.nativeSendTouch(3, -1, 0, 0) if (next == SessionPrefs.TOUCH_OFF) cursorVisible = false routedTouchMode = next } - /** Touchpad on the desktop, direct in Steam, unless the drawer says otherwise. */ private fun usingTouchpad(): Boolean = when (routedTouchMode) { SessionPrefs.TOUCH_PAD -> true SessionPrefs.TOUCH_DIRECT -> false else -> SessionState.mode != SessionService.MODE_STEAM || SessionState.steamUi == "desktop" } - /** The picture's rectangle inside the view: where the pointer may go. */ + private val gamePictureBounds = FloatArray(4) + private var topPictureMapped = false + private fun drawnRect(): android.graphics.RectF? { val width = surfaceView.width.takeIf { it > 0 } ?: return null val height = surfaceView.height.takeIf { it > 0 } ?: return null + topPictureMapped = CompositorHost.isStarted && WaylandCompositor.nativeGamePictureRect(gamePictureBounds) + if (topPictureMapped) return android.graphics.RectF( + gamePictureBounds[0], gamePictureBounds[1], gamePictureBounds[2], gamePictureBounds[3]) val out = SessionState.outputSize val scale = minOf(width / out.first.toFloat(), height / out.second.toFloat()) val drawnW = out.first * scale @@ -1855,10 +2315,25 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return android.graphics.RectF(left, top, left + drawnW, top + drawnH) } + private var ignoreGameTouch = false + override fun onTouchEvent(event: MotionEvent): Boolean { if (event.isFromSource(android.view.InputDevice.SOURCE_MOUSE)) return onMouse(event) - // Child views get the event first, so menus, keyboards and the on-screen pad still work. + if (event.actionMasked == MotionEvent.ACTION_DOWN) { + scrollTouchGesture = scrollTouchMode() + scrollRestX = 0f + scrollRestY = 0f + } + if (scrollTouchGesture) return scrollTouch.onTouch(event) if (routedTouchMode == SessionPrefs.TOUCH_OFF) return true + if (SessionState.mode == SessionService.MODE_STEAM && SessionState.steamUi != "desktop") { + val wasActive = threeFingerTap.active + if (threeFingerTap.onTouch(event)) padBridge?.triggerSteamKeyboard() + if (threeFingerTap.active && !wasActive) { + if (usingTouchpad()) touchpad.cancel() else WaylandCompositor.nativeSendTouch(3, -1, 0, 0) + } + if (threeFingerTap.active || wasActive) return true + } if (usingTouchpad()) { val rect = drawnRect() ?: return false if (touchpad.bounds != rect) { @@ -1869,6 +2344,14 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return touchpad.onTouch(event) } val rect = drawnRect() ?: return false + if (event.actionMasked == MotionEvent.ACTION_DOWN) + ignoreGameTouch = topPictureMapped && !rect.contains(event.x, event.y) + if (ignoreGameTouch) { + if (event.actionMasked == MotionEvent.ACTION_DOWN) + WaylandCompositor.nativeSendTouch(3, -1, 0, 0) + if (event.actionMasked == MotionEvent.ACTION_UP || event.actionMasked == MotionEvent.ACTION_CANCEL) ignoreGameTouch = false + return true + } fun sendTouch(action: Int, index: Int) { val x = event.getX(index).coerceIn(rect.left, rect.right) val y = event.getY(index).coerceIn(rect.top, rect.bottom) @@ -1876,8 +2359,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { InputSpace.x(x, surfaceView.width), InputSpace.y(y, surfaceView.height)) } when (event.actionMasked) { - // A first finger starts a new gesture, and Android has ended every earlier one: whatever - // the compositor still holds (an up lost to the drawer opening mid-touch) goes first. MotionEvent.ACTION_DOWN -> { WaylandCompositor.nativeSendTouch(3, -1, 0, 0) listOf(PointerGestures.BTN_LEFT, PointerGestures.BTN_RIGHT, PointerGestures.BTN_MIDDLE).forEach { @@ -1894,8 +2375,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return true } - /** A mouse: hover moves, buttons press, the wheel scrolls. Android sends buttons as touch - * actions and hover as generic motion, so both paths land here. */ private fun onMouse(event: MotionEvent): Boolean { when (event.actionMasked) { MotionEvent.ACTION_HOVER_MOVE, MotionEvent.ACTION_MOVE, MotionEvent.ACTION_HOVER_ENTER -> @@ -1913,31 +2392,25 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { val v = event.getAxisValue(MotionEvent.AXIS_VSCROLL) if (v != 0f) WaylandCompositor.nativeSendSceneInput(4, -Math.round(v), 0) } - MotionEvent.ACTION_DOWN, MotionEvent.ACTION_UP -> {} // the BUTTON_* events carry these + MotionEvent.ACTION_DOWN, MotionEvent.ACTION_UP -> {} else -> return false } return true } - /** A physical mouse, not a touchscreen, stylus or the system's own virtual devices. */ private fun mouseAttached(): Boolean = InputDevice.getDeviceIds().any { id -> val d = InputDevice.getDevice(id) d != null && !d.isVirtual && d.supportsSource(InputDevice.SOURCE_MOUSE) } - /** Capture the mouse exactly while a program holds a lock and the session has the mouse. */ private fun updatePointerCapture() { if (!::surfaceView.isInitialized) return val view = window.decorView - val want = pointerLocked && resumed && hasWindowFocus() && !drawerOpen && !pcKeyboardOpen && !pipUi && mouseAttached() + val want = pointerLocked && resumed && hasWindowFocus() && !drawerOpen && !pcKeyboardOpen && !achievementsOpen && !pipUi && mouseAttached() if (want == view.hasPointerCapture()) return if (want) view.requestPointerCapture() else view.releasePointerCapture() } - /** - * A captured mouse: raw motion as relative pointer deltas, buttons and the wheel as on the - * uncaptured path. Anything else (a captured touchpad's absolute fingers) is left alone. - */ private fun onCapturedPointer(event: MotionEvent): Boolean { if (!pointerLocked || !event.isFromSource(InputDevice.SOURCE_MOUSE_RELATIVE)) return false when (event.actionMasked) { @@ -1962,14 +2435,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { val v = event.getAxisValue(MotionEvent.AXIS_VSCROLL) if (v != 0f) WaylandCompositor.nativeSendSceneInput(4, -Math.round(v), 0) } - MotionEvent.ACTION_DOWN, MotionEvent.ACTION_UP -> {} // the BUTTON_* events carry these + MotionEvent.ACTION_DOWN, MotionEvent.ACTION_UP -> {} else -> return false } return true } - /** The mode decides which controls appear; `droiddeck-osc` in Downloads still overrides. */ - /** Which controller the session has, so a pad report says what was plugged in and when. */ private fun logInputDevice(what: String, deviceId: Int) { val d = InputDevice.getDevice(deviceId) ?: return if (!PadBridge.isFromController(d)) return @@ -1977,12 +2448,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { what, d.name, d.vendorId, d.productId, d.id, d.sources)) } - /** Steam's touch controls, once the session has made the device (SessionService). */ private fun steamTouch(): com.droiddeck.launcher.input.SteamTouchControls? { val device = com.droiddeck.launcher.input.SteamTouchDevice.current ?: return null steamTouchControls?.let { view -> if (view.device === device) return view - // A new session made a new device: the view of the old one goes. view.releaseAll() (view.parent as? android.view.ViewGroup)?.removeView(view) steamTouchControls = null @@ -1995,13 +2464,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { steamTouchOptions = options applyTouchRouting() } - // Paste: the clipboard is shared with the session's X servers; Ctrl+V types it. view.onPaste = { - sendGuestKey(29, true); sendGuestKey(47, true) // KEY_LEFTCTRL, KEY_V + sendGuestKey(29, true); sendGuestKey(47, true) sendGuestKey(47, false); sendGuestKey(29, false) } - // The client reads a controller's config when it connects: after a save, plug the device - // out and back in so it takes the new one. view.onSaved = { device.plugged = false uiHandler.postDelayed({ updateOnScreenControls() }, 700) @@ -2013,13 +2479,22 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } private fun updateOnScreenControls() { + updateOnScreenPad() + val c = onScreenControls + glassesSlot = when { + c == null || c.visibility != View.VISIBLE -> 0 + c.isButtonsOnly -> -1 + controllerSettings?.keyboardButton != false -> 2 + else -> 1 + } + } + + private fun updateOnScreenPad() { val forced = File(Environment.getExternalStorageDirectory(), "Download/droiddeck-osc") .takeIf { it.isFile } ?.let { FileUtils.readString(it)?.trim()?.lowercase() } ?: SessionPrefs.oscMode(this) val controls = onScreenControls ?: return - // In picture-in-picture, or with the unfolded screen's gamepad below the game, the on-screen - // pad would only cover the picture or that panel. if (pipUi || unfoldedPanel != null) { onScreenButtonsVisible = false controls.releaseAll() @@ -2029,12 +2504,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return } val buttonsOnly = forced == SessionPrefs.OSC_STEAM_QAM - // Steam's touch controller stands in for the app's pad, and is plugged into the client only - // while it is shown - as Steam Link withdraws its controls when a physical pad is in use. val wantsSteam = forced == SessionPrefs.OSC_STEAM_TOUCH && SessionState.mode == SessionService.MODE_STEAM val steam = if (wantsSteam) steamTouch() else null - // The service makes the device while the session starts, after this activity: the app's - // own pad until then, and another look in a moment. if (wantsSteam && steam == null && !isFinishing && !isDestroyed) { uiHandler.removeCallbacks(steamTouchRetry) uiHandler.postDelayed(steamTouchRetry, 1000) @@ -2048,13 +2519,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { SessionPrefs.OSC_ALWAYS -> true SessionPrefs.OSC_STEAM_QAM -> true SessionPrefs.OSC_NEVER -> false - // Shown throughout a Steam session: a handheld's built-in pad would keep Auto off for good. - // Outside Steam it is Auto. SessionPrefs.OSC_STEAM_TOUCH -> SessionState.mode == SessionService.MODE_STEAM || (!PadBridge.anyControllerConnected() && SessionState.mode != SessionService.MODE_DESKTOP) - // Auto: the touch pad when there is no controller - except on the desktop, where the - // screen is a touchpad for the pointer and a pad over it would be in the way. A game - // started from the rail, or Steam, gets it; the drawer turns it on anywhere. else -> !PadBridge.anyControllerConnected() && !SteamControllerBle.connected && SessionState.mode != SessionService.MODE_DESKTOP } @@ -2101,12 +2567,14 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { if (show) { drawerOpen = false pcKeyboardOpen = false + achievementsOpen = false pendingBackAction?.let(uiHandler::removeCallbacks) pendingBackAction = null releaseDrawerDirection() onScreenControls?.releaseAll() - padBridge?.releaseAll() + releasePads() touchpad.cancel() + scrollTouch.cancel() guestKeysDown.toList().forEach { sendGuestKey(it, false) } keyboard?.hide() sessionClipboard.stop() @@ -2139,9 +2607,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { override fun onPictureInPictureModeChanged(inPip: Boolean, newConfig: android.content.res.Configuration) { super.onPictureInPictureModeChanged(inPip, newConfig) if (::pip.isInitialized) pip.changed(inPip) - // The panel may have changed while the session was a thumbnail (folded or unfolded in PiP). if (!inPip && surfaceW > 0) followWindow(surfaceW, surfaceH) applyUnfoldedControls() + updateGlassesScreen() } override fun startActivityForResult(intent: Intent, requestCode: Int, options: Bundle?) { @@ -2151,7 +2619,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { super.startActivityForResult(intent, requestCode, options) } - // ── Lifecycle ─────────────────────────────────────────────────────────────────────────── override fun onStart() { super.onStart() @@ -2160,17 +2627,22 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { displayManager.registerDisplayListener(displayListener, Handler(Looper.getMainLooper())) refreshSecondScreenDisplays() if (secondScreenMode != SecondScreenMode.NONE && secondScreenPresentation == null) showSecondScreen(secondScreenMode) + startedScreens++ SessionService.setActivityVisible(this, true) + Glasses.rescan() + updateGlassesScreen() + updateHandCamera() } override fun onStop() { if (runtimeRemovalBlocked) { super.onStop(); return } started = false + updateHandCamera() displayManager.unregisterDisplayListener(displayListener) - // Closed while the session is out of sight (sleep, a closed lid, another app), and kept: - // onStart puts it back. closeSecondScreen(reset = false) - SessionService.setActivityVisible(this, false) + startedScreens = (startedScreens - 1).coerceAtLeast(0) + updateGlassesScreen() + if (startedScreens == 0) SessionService.setActivityVisible(this, false) super.onStop() } @@ -2185,9 +2657,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { recreate() return } - // Home/notification resumes must retain the external frontend's return destination. if (this.intent.getBooleanExtra(EXTRA_RETURN_HOME, false)) intent.putExtra(EXTRA_RETURN_HOME, true) setIntent(intent) + if (intent.getBooleanExtra(EXTRA_STEAMVR, false) && SessionState.mode == SessionService.MODE_STEAM) { + SessionState.steamVr = true + steamVrAutoTried = false + } if (intent.action == SessionService.ACTION_HOME_GUIDE) { handleHomeGuideIntent(intent) } else if (intent.action == SessionService.ACTION_RESUME) { @@ -2198,7 +2673,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { override fun onResume() { super.onResume() - requestedOrientation = SessionPrefs.orientation(this) + applyFollowOrientation(resources.configuration) if (runtimeRemovalBlocked) return com.droiddeck.launcher.ui.Motion.refresh(this) refreshHomeApp() @@ -2208,56 +2683,406 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } (getSystemService(INPUT_SERVICE) as? InputManager) ?.registerInputDeviceListener(deviceListener, Handler(Looper.getMainLooper())) + if (SessionState.guestPid > 1) padBridge?.syncConnectedControllers() + joyConVr?.refresh() onScreenControls?.reload() controllerSettings = ControllerPrefs.read(this) - updateOnScreenControls() resumed = true updatePointerCapture() if (!pipUi) sessionClipboard.start() updatePadMotion() readPrefs() + refreshControls() if (::pip.isInitialized) pip.resumed() if (CompositorHost.isStarted) applyFrameGen() + SessionPrefs.sessionPrefs(this).registerOnSharedPreferenceChangeListener(cardboardPrefListener) } override fun onPause() { if (runtimeRemovalBlocked) { super.onPause(); return } sessionClipboard.stop() - // Do not carry transient session UI across an app/display transition. In particular, the - // drawer's dim layer can otherwise remain over Steam when this activity returns. drawerOpen = false pcKeyboardOpen = false + achievementsOpen = false (getSystemService(INPUT_SERVICE) as? InputManager)?.unregisterInputDeviceListener(deviceListener) releaseDrawerDirection() - // A button held when the app goes away would stay held in the ring for the whole session. onScreenControls?.releaseAll() + if (::scrollTouch.isInitialized) scrollTouch.cancel() + if (::padMouse.isInitialized) padMouse.reset() resumed = false updatePointerCapture() updatePadMotion() keyboard?.takeIf { it.shown }?.hide() + SessionPrefs.sessionPrefs(this).unregisterOnSharedPreferenceChangeListener(cardboardPrefListener) + updateHeadTracker() super.onPause() } + private fun steamVrAction(action: String) { + if (action == "start" && com.droiddeck.launcher.session.QuestExperimental.isSupported()) { + startActivity(android.content.Intent(this, QuestXrActivity::class.java)) + return + } + val request = ++steamVrRequestGeneration + val session = SessionState.sessionId + fun currentRequest() = request == steamVrRequestGeneration && session == SessionState.sessionId && !isDestroyed && !ended + if (action == "start") { + SessionState.steamVr = true + steamVrAutoTried = true + } + if (action == "stop") { + SessionState.steamVr = false + Glasses.cancelSteamVrStart() + } + if (glasses.present) { + // Optional stereo starts only after RUNNING is observed. READY can + // arrive repeatedly while the launch worker is still starting VR. + if (action == "install") steamVrStatus = SteamVr.Status.INSTALLING + runSteamVrAction(action, ::currentRequest) { + val ok = SteamVr.run(this, action) + val now = SteamVr.status(this) + uiHandler.post { + if (!currentRequest()) return@post + if (!ok && now != SteamVr.Status.RUNNING) Glasses.cancelSteamVrStart() + onSteamVrStatus(now) + if (!ok) Toast.makeText(this, getString(R.string.cardboard_steamvr_failed), Toast.LENGTH_LONG).show() + } + } + return + } + if (action == "start") { + switchPictureForSteamVr() + steamVrSeenRunning = false + } + if (action == "stop") restoreSteamVrPicture() + if (action == "install") steamVrStatus = SteamVr.Status.INSTALLING + runSteamVrAction(action, ::currentRequest) { + val ok = SteamVr.run(this, action) + val now = SteamVr.status(this) + uiHandler.post { + if (!currentRequest()) return@post + if (!ok && now != SteamVr.Status.RUNNING) Glasses.cancelSteamVrStart() + if (!ok && action == "start" && now != SteamVr.Status.RUNNING) restoreSteamVrPicture() + onSteamVrStatus(now) + if (!ok) Toast.makeText(this, getString(R.string.cardboard_steamvr_failed), Toast.LENGTH_LONG).show() + } + } + } + + private fun runSteamVrAction(action: String, currentRequest: () -> Boolean, run: () -> Unit) { + if (action != "start") { + steamVrWorker.execute(run) + return + } + Glasses.prepareSteamVrStart { + uiHandler.post { + if (SessionState.steamVr && currentRequest()) steamVrWorker.execute { + if (SessionState.steamVr && currentRequest()) run() + } + } + } + } + + private fun switchPictureForSteamVr() { + if (cardboard.source != Cardboard.SOURCE_SBS) { + SessionPrefs.setCardboardSourceBeforeSteamVr(this, cardboard.source) + val c = cardboard.copy(source = Cardboard.SOURCE_SBS) + SessionPrefs.setCardboard(this, c) + applyCardboard(c) + } + steamVrSwitchedPicture = SessionPrefs.cardboardSourceBeforeSteamVr(this) >= 0 + } + + private fun usesSpatialControllers() = + GlassesRendering.usesGlasses(glasses, glassesScreen != null, steamVrStatus == SteamVr.Status.RUNNING) && + glasses.usesSpatialControllers(glassesSettings) + + private fun updateJoyConTracking() { + joyConVr?.setActive(steamVrStatus == SteamVr.Status.RUNNING && + (ControllerPrefs.joyConVr(this) || + (usesSpatialControllers() && glassesSettings.joyConTracking))) + } + + private fun updateHandCamera() { + val joyCons = joyConVr?.holding == true + val bare = !joyCons && !controllerConnected() + val want = started && steamVrStatus == SteamVr.Status.RUNNING && (joyCons || bare) && + !usesSpatialControllers() && + com.droiddeck.launcher.handtracking.HandTracking.wanted(this) + handCamera?.bareHands = bare + if (want == (handCamera != null)) return + if (want) { + handCamera = com.droiddeck.launcher.handtracking.HandCamera(this, + File(filesDir, ".wayland-rt/${com.droiddeck.launcher.handtracking.HandCameraShm.FILE}"), preview = false) + .also { + it.bareHands = bare + it.start(com.droiddeck.launcher.handtracking.HandTracking.settings.value.side) + } + } else { + handCamera?.stop() + handCamera = null + } + } + + private fun controllerConnected(): Boolean = InputDevice.getDeviceIds().any { id -> + joyConVr?.owns(id) != true && com.droiddeck.launcher.input.PadBridge.isFromController(InputDevice.getDevice(id)) + } + + private fun onSteamVrStatus(now: SteamVr.Status) { + if (ended || isDestroyed) return + val was = steamVrStatus + steamVrStatus = now + updateJoyConTracking() + updateHandCamera() + autoStartSteamVr(now) + if ((was == SteamVr.Status.RUNNING) != (now == SteamVr.Status.RUNNING)) applyCardboard(cardboard) + if (now != SteamVr.Status.UNAVAILABLE) Glasses.setVrActive(now == SteamVr.Status.RUNNING) + if (glasses.present) onGlassesSteamVr(now) + if (GlassesRendering.usesGlasses(glasses, glassesScreen != null, now == SteamVr.Status.RUNNING)) { + return + } + if (now == SteamVr.Status.RUNNING && cardboard.enabled && !steamVrSwitchedPicture && + cardboard.source != Cardboard.SOURCE_SBS) { + switchPictureForSteamVr() + steamVrSeenRunning = true + } + if (!steamVrSwitchedPicture) return + if (now == SteamVr.Status.RUNNING) steamVrSeenRunning = true + else if (steamVrSeenRunning && now != SteamVr.Status.UNAVAILABLE) restoreSteamVrPicture() + } + + private fun restoreSteamVrPicture() { + val before = SessionPrefs.cardboardSourceBeforeSteamVr(this) + SessionPrefs.setCardboardSourceBeforeSteamVr(this, -1) + steamVrSwitchedPicture = false + steamVrSeenRunning = false + if (before < 0 || cardboard.source == before) return + val c = cardboard.copy(source = before) + SessionPrefs.setCardboard(this, c) + applyCardboard(c) + } + + private fun applyCardboard(c: Cardboard) { + val was = activeCardboard + cardboard = c + val e = effectiveCardboard(c) + activeCardboard = e + if (CompositorHost.isStarted) pushCardboard(e) + if (e.enabled && !was.enabled) headTracker?.recenter() + updateHeadTracker() + } + + private fun pushCardboard(c: Cardboard) { + val fov = when { + c.viewer != Cardboard.Viewer.VITURE.id -> 0f + c.source == Cardboard.SOURCE_SBS -> glassesSettings.vrFovDeg.toFloat() + else -> glasses.verticalFovDeg + } + panelSizeMm().let { (w, h) -> c.push(w, h, fov, refreshHz()) } + } + + private fun effectiveCardboard(c: Cardboard): Cardboard = GlassesRendering.cardboard( + base = c, + settings = glassesSettings, + state = glasses, + outputActive = glassesScreen != null, + steamVrRunning = steamVrStatus == SteamVr.Status.RUNNING, + ) + + private fun updateHeadTracker() { + val onGlasses = GlassesRendering.usesGlasses(glasses, glassesScreen != null, + steamVrStatus == SteamVr.Status.RUNNING) + SpatialTracking.setOutputUsesGlasses(onGlasses && !ended) + val c = activeCardboard + val centerView = onGlasses && c.source == Cardboard.SOURCE_SCREEN + val want = !ended && (resumed || (glassesScreen != null && started)) && c.enabled && c.headTracking + val current = headTracker + if (current != null && (!want || current.usesGlasses != onGlasses || current.centerView != centerView)) { + current.stop() + headTracker = null + } + if (want) { + val t = headTracker ?: HeadTracker(this, glasses = onGlasses, centerView = centerView) { + @Suppress("DEPRECATION") + (if (Build.VERSION.SDK_INT >= 30) display else windowManager.defaultDisplay)?.rotation ?: android.view.Surface.ROTATION_0 + }.also { headTracker = it } + t.start() + } + headTracking = headTracker != null + } + + private fun updateTrackingRecovery() { + val onGlasses = GlassesRendering.usesGlasses(glasses, glassesScreen != null, + steamVrStatus == SteamVr.Status.RUNNING) + val spatialView = onGlasses && SpatialTracking.selected && glassesSettings.positionalTracking && + (SessionState.steamVr || steamVrStatus == SteamVr.Status.RUNNING || + (glassesOutputActive && glassesSettings.headTracking && glassesSettings.picture3d == com.droiddeck.launcher.glasses.GlassesSettings.PICTURE_SCREEN)) + val active = started && !ended && SessionState.running && !loading.visible && !pipUi && spatialView + if (active) SpatialTracking.refreshStatus() + trackingRecovery = TrackingRecovery.forSession(active, glasses.canControl, SpatialTracking.status.value) + glassesScreen?.trackingRecovery?.update(trackingRecovery, glasses.sbs) + } + + private fun outputHolder(): SurfaceHolder = glassesScreen?.holder ?: surfaceView.holder + + private fun onOutputAttached(holder: SurfaceHolder) { + if (holder !== outputHolder()) return + glassesOutputActive = glassesScreen?.holder === holder + // Keep the phone's layout for touch/controller coordinates, but remove + // its SurfaceView so it cannot retain the last game frame under the hint. + surfaceView.visibility = if (glassesOutputActive) View.INVISIBLE else View.VISIBLE + Log.i(TAG, "compositor output attached: " + + if (glassesOutputActive) "glasses display ${glassesScreen?.display?.displayId}" else "phone") + } + + private fun restorePhoneOutput(screen: GlassesScreen) { + if (glassesScreen !== screen) return + glassesScreen = null + glassesOutputActive = false + surfaceW = 0 + surfaceH = 0 + CompositorHost.detach(screen.holder.surface) + surfaceView.visibility = View.VISIBLE + applyOutputPacing() + if (surfaceView.holder.surface?.isValid == true) surfaceCreated(surfaceView.holder) + } + + private fun glassesOutputSize(): Pair<Int, Int>? { + if (glassesScreen == null || glasses.width <= 0 || glasses.height <= 0) return null + val panel = (if (glasses.sbs) glasses.width / 2 else glasses.width) to glasses.height + val mode = SessionPrefs.prefMode(intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM) + val display = com.droiddeck.launcher.session.SessionDisplay + val choice = SessionPrefs.resolutionChoice(this, mode, panel) + val size = display.resolveChoice(panel, choice) + val fixed = choice != display.MATCH_SCREEN && choice != display.FOLLOW_SCREEN && display.presetHeight(choice) == null + return if (fixed) display.resolve(panel, minOf(size.first, size.second), SessionPrefs.SHAPE_AUTO) else size + } + + private fun onGlassesChanged() { + val g = glasses + val s = glassesSettings + val key = listOf(g.present, g.usable, g.displayId, g.sbs, g.sbs90, g.supports30Hz, g.switching3d, g.canControl, g.width, g.height, g.hz, g.resolutions, g.vrActive, s) + if (key == glassesKey) return + glassesKey = key + updateGlassesScreen() + applyCardboard(cardboard) + if (!g.switching3d) { + if (glassesPresent && !g.present) onGlassesUnplugged() + glassesPresent = g.present + } + } + + private fun onGlassesUnplugged() { + val hadVr = steamVrAutoTried + steamVrAutoTried = false + glasses3dForVr = false + if (hadVr && !cardboard.enabled) steamVrAction("stop") + } + + private fun autoStartSteamVr(now: SteamVr.Status) { + if (now == SteamVr.Status.RUNNING) steamVrAutoTried = true + val action = SteamVr.autoAction(now, SessionState.steamVr, loading.visible, + SessionState.mode == SessionService.MODE_STEAM, steamVrAutoTried, steamVrInstallTried) ?: return + if (action == "start") steamVrAutoTried = true else steamVrInstallTried = true + Log.i(TAG, "requested SteamVR $action (glasses=${glasses.model}, output=$glassesOutputActive, control=${glasses.canControl})") + steamVrAction(action) + } + + private fun updateGlassesScreen() { + if (!::surfaceView.isInitialized) return + val g = glasses + val want = started && !ended && !isInPictureInPictureMode && !runtimeRemovalBlocked && g.usable && glassesSettings.gameOnGlasses + val target = if (want) Glasses.glassesDisplay()?.takeIf { it.isValid } else null + val current = glassesScreen + if (current != null && current.display.displayId == target?.displayId) { + current.prefer(Glasses.outputHz(), Glasses.outputResolution()) + applyOutputPacing() + return + } + if (current != null) { + restorePhoneOutput(current) + runCatching { current.dismiss() } + } + if (target != null) { + val screen = GlassesScreen(this, target, Glasses.outputHz(), this, Glasses.outputResolution()) + // show() can create the surface synchronously. Select its holder + // first, otherwise surfaceCreated() rejects the glasses callback. + glassesScreen = screen + applyOutputPacing() + surfaceW = 0 + surfaceH = 0 + screen.setOnDismissListener { + if (glassesScreen === screen) { + restorePhoneOutput(screen) + refreshSecondScreenDisplays() + applyCardboard(cardboard) + } + } + try { + screen.show() + } catch (e: Exception) { + restorePhoneOutput(screen) + runCatching { screen.dismiss() } + Log.w(TAG, "could not show the game on ${target.name}", e) + return + } + Log.i(TAG, "requested game output on ${g.model} (display ${target.displayId})") + } + applyOutputPacing() + refreshSecondScreenDisplays() + applyCardboard(cardboard) + } + + private fun onGlassesSteamVr(now: SteamVr.Status) { + val g = glasses + if (now == SteamVr.Status.RUNNING) { + if (glassesSettings.auto3d && g.can3d && !g.sbs && !glasses3dForVr) { + glasses3dForVr = true + Glasses.set3dForVr(true) + } + } else if (glasses3dForVr && now != SteamVr.Status.UNAVAILABLE) { + glasses3dForVr = false + Glasses.set3dForVr(false) + } + } + + private fun panelSizeMm(): Pair<Float, Float> { + val dm = resources.displayMetrics + val landscape = dm.widthPixels >= dm.heightPixels + val longPx = maxOf(dm.widthPixels, dm.heightPixels).toFloat() + val shortPx = minOf(dm.widthPixels, dm.heightPixels).toFloat() + val longDpi = if (landscape) dm.xdpi else dm.ydpi + val shortDpi = if (landscape) dm.ydpi else dm.xdpi + return (if (longDpi > 0f) longPx / longDpi * 25.4f else 0f) to (if (shortDpi > 0f) shortPx / shortDpi * 25.4f else 0f) + } + override fun onAttachedToWindow() { super.onAttachedToWindow() if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) return val decor = window.decorView - decor.requestUnbufferedDispatch(UNBUFFERED_SOURCES) - decor.viewTreeObserver.addOnGlobalFocusChangeListener { _, _ -> decor.post { decor.requestUnbufferedDispatch(UNBUFFERED_SOURCES) } } + decor.requestUnbufferedDispatch(unbufferedSources()) + decor.viewTreeObserver.addOnGlobalFocusChangeListener { _, _ -> decor.post { decor.requestUnbufferedDispatch(unbufferedSources()) } } + } + + private fun unbufferedSources() = + if (lowLatencyTouch) UNBUFFERED_SOURCES or InputDevice.SOURCE_CLASS_POINTER else UNBUFFERED_SOURCES + + private fun applyLowLatency() { + com.droiddeck.launcher.input.FakeInputWriter.setLowLatency(lowLatencyController, lowLatencyTouch) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) window.decorView.requestUnbufferedDispatch(unbufferedSources()) } override fun onWindowFocusChanged(hasFocus: Boolean) { super.onWindowFocusChanged(hasFocus) + if (!hasFocus && ::padMouse.isInitialized) padMouse.reset() if (runtimeRemovalBlocked) return if (hasFocus && !pipUi) { goFullscreen() refreshClipboard() } - // Android drops a capture with the focus; a lock still held takes it again on return. updatePointerCapture() } - /** The keyboard/trackpad presentation can own focus instead of the main display. */ fun refreshClipboard() { if (resumed) sessionClipboard.refresh() } @@ -2270,8 +3095,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) - // ALWAYS from Android 11: SHORT_EDGES left a black strip along a camera on the long edge, - // which is where a Fold's inner-screen camera sits with the device held in landscape. if (Build.VERSION.SDK_INT >= 28) { window.attributes = window.attributes.apply { layoutInDisplayCutoutMode = if (Build.VERSION.SDK_INT >= 30) @@ -2281,7 +3104,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } } - /** Ours, so a finishing activity never unhooks the one that replaced it. */ private val endListener: (Int) -> Unit = { status -> onSessionEnded(status) } private val firstFrameListener = Runnable { SessionEvents.firstFrame() @@ -2293,17 +3115,23 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { } override fun onDestroy() { + steamVrRecovery.close() uiHandler.removeCallbacks(steamTouchRetry) if (runtimeRemovalBlocked) { super.onDestroy(); return } - // Deliberately does NOT end the session: this activity can be destroyed while the user is - // in another app, and the whole point of the service is that Steam survives that. watching = false releaseDrawerDirection() pendingBackAction?.let(uiHandler::removeCallbacks) pendingBackAction = null if (::pip.isInitialized) pip.destroyed() closeSecondScreen(reset = false) + glassesScope.cancel() + glassesScreen?.let { screen -> glassesScreen = null; runCatching { screen.dismiss() } } + headTracker?.stop() if (::hud.isInitialized) hud.stop() + joyConVr?.close() + joyConVr = null + handCamera?.stop() + handCamera = null padBridge?.stop() steamController?.stop() if (SessionState.padBridge === padBridge) SessionState.padBridge = null @@ -2315,7 +3143,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { super.onDestroy() } - /** The screen is all blue: the session stops and the front end opens on the same blue (FloodReturn). */ private fun finishFlooded() { if (isFinishing) return val signal = com.droiddeck.launcher.ui.Themes.byId(SessionPrefs.theme(this)).signal @@ -2326,20 +3153,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { finish() } - /** - * Every way out on screen (backing out of the loading screen, closing the ended screen, the - * session ending) leaves as a session arrives, in reverse: the blue spreads out of the - * throbber's ball, or the middle of the screen once a game is up, and the front end opens on it - * and draws it back into the button the session came from. Off screen, or with animations - * off, it just closes. - */ override fun finish() { if (isFinishing) return if (!quitFlooded && !closeAtOnce && com.droiddeck.launcher.ui.Motion.scale != 0f && lifecycle.currentState.isAtLeast(androidx.lifecycle.Lifecycle.State.RESUMED)) { if (!leaving) { leaving = true - // Should the flood never get its frames, the session still closes. uiHandler.postDelayed({ completeLeave() }, LEAVE_TIMEOUT_MS) } return @@ -2355,7 +3174,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { else overridePendingTransition(R.anim.session_hold, R.anim.session_sink) } - /** The screen is all blue: close onto the front end, which opens on the same blue. */ private fun completeLeave() { if (isFinishing) return val signal = com.droiddeck.launcher.ui.Themes.byId(SessionPrefs.theme(this)).signal @@ -2367,12 +3185,16 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { companion object { const val EXTRA_RETURN_HOME = "returnHome" - /** How long the leaving flood may take before the session closes without it. */ + const val EXTRA_STEAMVR = "steamVr" private const val LEAVE_TIMEOUT_MS = 1_500L private const val TAG = "SessionActivity" + private var startedScreens = 0 private const val FEX_MISSING = "droiddeck-fex: x86 Linux programs need" private const val UNBUFFERED_SOURCES = InputDevice.SOURCE_CLASS_JOYSTICK or InputDevice.SOURCE_CLASS_TRACKBALL or InputDevice.SOURCE_CLASS_POSITION private const val CURSOR_PAD_HOLD_MS = 1200L + private const val PAD_MOUSE_CHECK_MS = 500L + private const val PAD_SCROLL_POINTER_X = 0.985f + private const val PAD_SCROLL_HEIGHTS_PER_S = 3f private const val DRAWER_HAT_THRESHOLD = 0.5f private const val DRAWER_STICK_ENTER_THRESHOLD = 0.55f private const val DRAWER_STICK_EXIT_THRESHOLD = 0.35f @@ -2381,9 +3203,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { private const val DRAWER_SLOW_REPEAT_FLOOR_MS = 240L private const val DRAWER_FAST_REPEAT_INTERVAL_MS = 90L private const val DRAWER_REPEAT_ACCELERATION_MS = 1_400L - /** Compositor scale modes (Container.FULLSCREEN_* values): 1 = fit with bars, centred. */ + private val steamVrWorker = java.util.concurrent.ThreadPoolExecutor(0, 1, 30, java.util.concurrent.TimeUnit.SECONDS, + java.util.concurrent.LinkedBlockingQueue()) { Thread(it, "steamvr") } private const val SCALE_FIT = 1 private const val ALIGN_CENTER = 0 + private const val ALIGN_PICTURE_TOP = 3 + private const val ALIGN_PICTURE_BOTTOM = 4 private val RUNTIME_LINES = PackageLines( R.string.session_runtime_downloading, R.string.session_runtime_downloading_mb, R.string.session_runtime_checking, R.string.session_runtime_unpacking, @@ -2401,3 +3226,5 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { ) } } + +private class AchievementsInFront(val game: StoreAchievements.Game, val title: String, val progress: Pair<Int, Int>?) diff --git a/app/src/main/java/com/droiddeck/launcher/UpdatesMenu.kt b/app/src/main/java/com/droiddeck/launcher/UpdatesMenu.kt index a55ac19309..8459bc7d95 100644 --- a/app/src/main/java/com/droiddeck/launcher/UpdatesMenu.kt +++ b/app/src/main/java/com/droiddeck/launcher/UpdatesMenu.kt @@ -18,13 +18,7 @@ import com.droiddeck.launcher.ui.UpdatesState import com.droiddeck.launcher.update.AppUpdates import com.droiddeck.launcher.update.SelfInstaller -/** - * The Updates page's state: the channels' latest builds, the one followed, and an update being - * downloaded or installed. Checked when the launcher comes to the front - opening the app, and - * coming back from a session - at most once a minute. - */ internal class UpdatesMenu(private val activity: Activity, private val ui: Handler) { - // Read in start(): the activity has no context yet while its fields are made. var catalog by mutableStateOf<AppUpdates.Catalog?>(null) var follow by mutableStateOf(AppUpdates.Follow(AppUpdates.Channel.STABLE)) var checking by mutableStateOf(false) @@ -32,7 +26,6 @@ internal class UpdatesMenu(private val activity: Activity, private val ui: Handl var stage by mutableStateOf<String?>(null) var percent by mutableIntStateOf(-1) var askPermission by mutableStateOf(false) - // An install waiting for the user to allow "Install unknown apps"; it goes on when they come back. private var pending: AppUpdates.Release? = null private var lastCheck = 0L private var request = 0 @@ -53,7 +46,6 @@ internal class UpdatesMenu(private val activity: Activity, private val ui: Handl val hasUpdate: Boolean get() = AppUpdates.hasUpdate(catalog, follow) - /** On every return to the launcher: go on with an install the user just allowed, and check if due. */ fun onResume() { pending?.let { r -> if (SelfInstaller.canInstall(activity)) { pending = null; install(r) } @@ -107,7 +99,6 @@ internal class UpdatesMenu(private val activity: Activity, private val ui: Handl }, "app-update-install").start() } - /** PackageInstaller's answer: Android's confirm prompt to show, or why it failed. Success restarts the app. */ private val receiver = object : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { when (val status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, PackageInstaller.STATUS_FAILURE)) { @@ -127,7 +118,6 @@ internal class UpdatesMenu(private val activity: Activity, private val ui: Handl } } - /** From onCreate: the last check, the channel followed, and PackageInstaller's answers. */ fun start() { catalog = AppUpdates.cached(activity) follow = AppUpdates.follow(activity, catalog) diff --git a/app/src/main/java/com/droiddeck/launcher/agent/AgentAccess.kt b/app/src/main/java/com/droiddeck/launcher/agent/AgentAccess.kt index e43ba8669c..b755ca6466 100644 --- a/app/src/main/java/com/droiddeck/launcher/agent/AgentAccess.kt +++ b/app/src/main/java/com/droiddeck/launcher/agent/AgentAccess.kt @@ -2,26 +2,16 @@ package com.droiddeck.launcher.agent import android.content.Context -/** - * Who may run code through the agent bridge. Reading state, starting and stopping sessions, - * launching and quitting games and sending input only need the shell (the provider's DUMP - * permission). Running commands in the guest, evaluating JavaScript in the Steam client, session - * environment, binary overrides and preference writes reach inside the app's sandbox - the guest - * holds the Steam login - which the shell of a stock device otherwise cannot. They require - * Setup > Session > Debugging tools to be on, in every build. The bridge itself cannot turn it on. - */ object AgentAccess { const val MAX_REQUEST_CHARS = 256 * 1024 private const val PREFS = "agent" private const val KEY_COMMANDS = "commands" - /** The preferences file the bridge must never write: set-pref refuses it. */ const val PROTECTED_PREFS = PREFS fun commandsAllowed(context: Context): Boolean = prefs(context).getBoolean(KEY_COMMANDS, false) - /** The Setup toggle's own state. */ fun commandsEnabled(context: Context): Boolean = prefs(context).getBoolean(KEY_COMMANDS, false) fun setCommandsEnabled(context: Context, enabled: Boolean) { @@ -33,7 +23,7 @@ object AgentAccess { fun requireCommands(context: Context) { if (!commandsAllowed(context)) throw AgentException( "AGENT_COMMANDS_DISABLED", - "Debugging tools are off: turn on Setup > Session > Debugging tools on the device", + "Debugging tools are off: turn on Setup > Diagnostics > Debugging tools on the device", ) } @@ -44,5 +34,4 @@ object AgentAccess { private fun prefs(context: Context) = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE) } -/** A refusal with a stable code, answered as {"ok": false, "error": {code, message}}. */ class AgentException(val code: String, message: String) : RuntimeException(message) diff --git a/app/src/main/java/com/droiddeck/launcher/agent/AgentBridgeProvider.kt b/app/src/main/java/com/droiddeck/launcher/agent/AgentBridgeProvider.kt index 2b8ba775b0..a4322909ad 100644 --- a/app/src/main/java/com/droiddeck/launcher/agent/AgentBridgeProvider.kt +++ b/app/src/main/java/com/droiddeck/launcher/agent/AgentBridgeProvider.kt @@ -27,14 +27,6 @@ import java.io.File import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit -/** - * The shell's control surface (docs/agent-control.md), in every build: the provider and its start - * Activity need android.permission.DUMP, held by the shell and privileged or explicitly granted callers. Commands that - * reach into the app's sandbox are further gated by [AgentAccess]. - * - * A method's request is JSON, base64-encoded in the "request" extra; every answer is JSON in the - * "json" key of the returned Bundle, {"ok": true, ...} or {"ok": false, "error": {code, message}}. - */ class AgentBridgeProvider : ContentProvider() { override fun onCreate(): Boolean { val appContext = context?.applicationContext ?: return false @@ -58,7 +50,6 @@ class AgentBridgeProvider : ContentProvider() { val response = try { val request = decode(extras?.getString(EXTRA_REQUEST)) - // Binder identity is the shell's; everything below acts as the app. val token = Binder.clearCallingIdentity() try { dispatch(context, method, request) @@ -101,11 +92,111 @@ class AgentBridgeProvider : ContentProvider() { AgentEnv.override(context, request.optString("name")).put("ok", true).put("command", "override") } "prefs" -> prefs(context, request) + "glasses" -> glasses(context, request) "access" -> JSONObject().put("ok", true).put("commands", AgentAccess.commandsAllowed(context)) .put("debugBuild", BuildConfig.DEBUG).put("inbox", AgentEnv.inbox(context).absolutePath) else -> error("UNKNOWN_COMMAND", "Unknown agent command '$method'") } + private fun glasses(context: Context, request: JSONObject): JSONObject { + val g = com.droiddeck.launcher.glasses.Glasses + when (request.optString("op", "status")) { + "status" -> {} + "allow" -> g.requestControl() + "set" -> { + val key = request.optString("key") + val value = request.optString("value") + fun on() = value == "1" || value.equals("true", true) || value.equals("on", true) + val number = value.toIntOrNull() + val numeric = setOf("refreshHz", "sbsHz", "brightness", "volume", "picture3d", "screenWidthDm", "screenDistanceDm", "vrFovDeg", "sbsSupport", "eyeHeightCm") + if (key in numeric && number == null) return error("INVALID_VALUE", "'$key' takes a number") + when (key) { + "refreshHz" -> g.setRefreshHz(number!!) + "sbsHz" -> g.setSbsHz(number!!) + "resolution2d" -> g.setResolution(com.droiddeck.launcher.glasses.GlassesDisplayProfile.TWO_D, value) + "resolution3d" -> g.setResolution(com.droiddeck.launcher.glasses.GlassesDisplayProfile.THREE_D, value) + "resolutionVr" -> g.setResolution(com.droiddeck.launcher.glasses.GlassesDisplayProfile.VR, value) + "brightness" -> g.setBrightness(number!!) + "volume" -> g.setVolume(number!!) + "sunblock" -> g.setSunblock(on()) + "3d" -> g.set3d(on()) + "3dof" -> g.set3dof(on()) + "gameOnGlasses" -> g.setGameOnGlasses(on()) + "headTracking" -> g.setHeadTracking(on()) + "auto3d" -> g.setAuto3d(on()) + "picture3d" -> g.setPicture3d(number!!) + "screenWidthDm" -> g.setScreenWidthDm(number!!) + "screenDistanceDm" -> g.setScreenDistanceDm(number!!) + "vrFovDeg" -> g.setVrFovDeg(number!!) + "sbsSupport" -> g.setSbsSupport(number!!) + "positionalTracking" -> g.setPositionalTracking(on()) + "handControllers" -> g.setHandControllers(on()) + "joyConTracking" -> g.setJoyConTracking(on()) + "eyeHeightCm" -> g.setEyeHeight(number!!) + else -> return error("INVALID_KEY", "Unknown glasses setting '$key'") + } + } + "simulate" -> { + fun angle(key: String) = if (request.has(key)) request.optDouble(key).takeIf { it.isFinite() }?.coerceIn(-90.0, 90.0) else null + if (!g.simulate(request.optInt("seconds", 20).coerceIn(1, 600), angle("yaw"), angle("pitch"))) return error("BUSY", "Already simulating") + } + "stop-simulate" -> g.stopSimulation() + "calibrate" -> g.startCalibration() + "cancel-calibration" -> g.cancelCalibration() + "reset-calibration" -> g.resetCalibration() + "spatial-diagnostics" -> com.droiddeck.launcher.glasses.SpatialTracking.diagnostics(request.optBoolean("enabled",true)) + "spatial-recenter" -> com.droiddeck.launcher.glasses.SpatialTracking.recenter(request.optBoolean("screen",false)) + "spatial-floor" -> g.setSpatialFloor() + "spatial-restart" -> g.restartSpatialTracking() + "spatial-hand-options" -> { + AgentAccess.requireCommands(context) + if(request.has("lite")) com.droiddeck.launcher.glasses.SpatialTracking.setHandModel(request.getBoolean("lite")) + if(request.has("parallel")) com.droiddeck.launcher.glasses.SpatialTracking.setHandCpuParallel(request.getBoolean("parallel")) + if(request.has("halfRate")) com.droiddeck.launcher.glasses.SpatialTracking.setHandHalfRate(request.getBoolean("halfRate")) + if(request.has("adaptive")) com.droiddeck.launcher.glasses.SpatialTracking.setHandAdaptiveInput(request.getBoolean("adaptive")) + if(request.has("scheduled")) com.droiddeck.launcher.glasses.SpatialTracking.setHandScheduledTracking(request.getBoolean("scheduled")) + } + "spatial-hand-benchmark" -> { + AgentAccess.requireCommands(context) + com.droiddeck.launcher.glasses.SpatialTracking.benchmarkSavedCapture(request.getString("capture")) + } + "spatial-hand-capture" -> { + AgentAccess.requireCommands(context) + com.droiddeck.launcher.glasses.SpatialTracking.captureDiagnostic() + } + "spatial-rgb-capture", "spatial-rgb-status" -> { + AgentAccess.requireCommands(context) + return (if (request.getString("op") == "spatial-rgb-capture") + com.droiddeck.launcher.glasses.LumaRgbDiagnostic.capture(context!!,request.optString("transport","sdk"), + request.optInt("width",640),request.optInt("height",480),request.optInt("fps",30), + request.optInt("durationMs",5000)) + else com.droiddeck.launcher.glasses.LumaRgbDiagnostic.status(context!!)).put("ok", true) + } + "query" -> { g.query(); Thread.sleep(600) } + "mode" -> { + val mode = hex(request.optString("mode"), 0xFF) ?: return error("INVALID_VALUE", "mode must be one hex byte, e.g. 0x31") + g.sendMode(mode) + Thread.sleep(600) + } + "imu" -> return g.sampleImu(request.optLong("ms", 2000).coerceIn(200, 20_000)).put("ok", true).put("command", "glasses") + "raw" -> { + AgentAccess.requireCommands(context) + val msgId = hex(request.optString("msgId"), 0xFFFF) ?: return error("INVALID_VALUE", "msgId must be a hex number up to 0xFFFF") + val digits = request.optString("payload").removePrefix("0x") + if (digits.length % 2 != 0 || digits.any { Character.digit(it, 16) < 0 }) return error("INVALID_VALUE", "payload must be whole hex bytes") + val payload = digits.chunked(2).map { it.toInt(16).toByte() }.toByteArray() + if (!g.sendRaw(msgId, payload)) return error("NOT_CONNECTED", "The glasses' control link is not open") + Thread.sleep(300) + } + else -> return error("INVALID_OP", "Unknown glasses op") + } + if (request.optString("op") in setOf("set", "allow")) Thread.sleep(400) + return g.status().put("ok", true).put("command", "glasses").put("frames", g.recentFrames()) + } + + private fun hex(text: String, max: Int): Int? = + text.removePrefix("0x").removePrefix("0X").takeIf { it.isNotEmpty() }?.toIntOrNull(16)?.takeIf { it in 0..max } + private fun state(context: Context): JSONObject { val runtimeVersion = LinuxRuntimeInstaller.installedVersion(context) val dir = SessionState.logDirectory ?: SessionState.logFile?.parentFile ?: SessionPaths.sessionFolders(context).lastOrNull() @@ -118,6 +209,7 @@ class AgentBridgeProvider : ContentProvider() { .put("steamUi", SessionState.steamUi ?: JSONObject.NULL) .put("steamUrl", SessionState.steamUrl ?: JSONObject.NULL) .put("suspended", SessionState.suspended) + .put("steamVr", SessionState.steamVr) .put("pip", SessionState.pipActive) .put("firstFrame", SessionState.firstFrameSeen) .put("output", JSONArray().put(SessionState.outputSize.first).put(SessionState.outputSize.second)) @@ -136,8 +228,6 @@ class AgentBridgeProvider : ContentProvider() { .put("status", SessionState.failureStatus ?: JSONObject.NULL) session.put("failure", failure) - // gamescope's focus as last published by the guest agent, without the window lists - // (the focus command returns those, fresh). val focus = AgentGuest.focus(context)?.let { snap -> JSONObject() .put("focusedApp", snap.opt("focusedApp") ?: JSONObject.NULL) @@ -225,11 +315,9 @@ class AgentBridgeProvider : ContentProvider() { return result.put("ok", true).put("command", "prefs") } - /** A guest agent request; its own answer already carries ok or error. */ private fun guest(context: Context, request: JSONObject, timeoutMs: Long): JSONObject = AgentGuest.call(context, request, timeoutMs) - /** The guest's own timeout plus slack for the round trip. */ private fun timeoutMs(request: JSONObject, defaultSeconds: Double, slackMs: Long): Long { val seconds = if (request.has("timeout")) request.opt("timeout")?.toString()?.toDoubleOrNull() ?: throw AgentException("INVALID_REQUEST", "timeout must be a number") else defaultSeconds @@ -262,7 +350,6 @@ class AgentBridgeProvider : ContentProvider() { companion object { const val RESULT_JSON = "json" const val EXTRA_REQUEST = "request" - /** 2 added agent and session.focus; everything in 1 is unchanged. */ const val SCHEMA = 2 private val recoveryComplete = CountDownLatch(1) diff --git a/app/src/main/java/com/droiddeck/launcher/agent/AgentEnv.kt b/app/src/main/java/com/droiddeck/launcher/agent/AgentEnv.kt index 83ea0ccd11..5f7f092628 100644 --- a/app/src/main/java/com/droiddeck/launcher/agent/AgentEnv.kt +++ b/app/src/main/java/com/droiddeck/launcher/agent/AgentEnv.kt @@ -10,18 +10,6 @@ import java.nio.file.Files import java.nio.file.LinkOption.NOFOLLOW_LINKS import java.nio.file.StandardOpenOption.READ -/** - * Experiment switches an agent sets without touching Download/droiddeck-env or rebuilding the apk: - * - * - environment lines (KEY=VALUE) for the session, applied after the user's own droiddeck-env, so - * they win. "next" lines are taken by the next session that starts and dropped when it ends; - * "persistent" ones stay until cleared. - * - binary overrides: a file pushed to the app's external files (agent-inbox/<name>) is installed - * as /opt/droiddeck-agent/bin/<name> in the rootfs and put first on the next session's PATH - - * a gamescope build under test, say. Removed when that session ends. - * - * Kept in the app's own files (agent-env.json), never in a place the shell can write. - */ object AgentEnv { private const val TAG = "AgentEnv" private const val FILE = "agent-env.json" @@ -38,7 +26,6 @@ object AgentEnv { load(context) } - /** Add [lines] for the next session ([persistent] = every session until cleared). */ fun set(context: Context, lines: List<String>, persistent: Boolean): JSONObject = synchronized(lock) { AgentAccess.requireCommands(context) if (lines.any { line -> KEY.matchEntire(line.substringBefore('=', "")) == null || !line.contains('=') || line.any { it == '\n' || it == '\r' || it == '\u0000' } }) { @@ -52,7 +39,6 @@ object AgentEnv { state } - /** Drop lines: [scope] is "next", "persistent" or "all". */ fun clear(context: Context, scope: String): JSONObject = synchronized(lock) { AgentAccess.requireCommands(context) val state = load(context) @@ -66,7 +52,6 @@ object AgentEnv { state } - /** Install agent-inbox/[name] as an override for the next session. */ fun override(context: Context, name: String): JSONObject = synchronized(lock) { AgentAccess.requireCommands(context) if (NAME.matchEntire(name) == null || name in setOf(".", "..")) throw AgentException("INVALID_NAME", "Override names are letters, digits, '.', '_' and '-'") @@ -93,10 +78,6 @@ object AgentEnv { state.put("installed", "$GUEST_BIN/$name") } - /** - * At session start: the lines this session gets, after the user's droiddeck-env. Pending lines - * and overrides become this session's own, to be dropped by [endSession]. - */ fun beginSession(context: Context): List<String> = synchronized(lock) { if (!AgentAccess.commandsAllowed(context)) { revoke(context) @@ -108,7 +89,6 @@ object AgentEnv { state.put("active", JSONArray(active)).put("pending", JSONArray()) state.put("activeOverrides", JSONArray(overrides)).put("pendingOverrides", JSONArray()) save(context, state) - // Anything else there was left by a session that never reached endSession (the app died). bin(context).listFiles() ?.filter { it.name !in overrides }?.forEach { it.delete() } val lines = strings(state.optJSONArray("persistent")) + active @@ -124,7 +104,6 @@ object AgentEnv { bin(context).listFiles()?.forEach { it.delete() } } - /** At session end: this session's lines and override binaries go. */ fun endSession(context: Context) = synchronized(lock) { val state = load(context) val overrides = strings(state.optJSONArray("activeOverrides")) @@ -135,7 +114,6 @@ object AgentEnv { save(context, state) } - /** A PATH= line among [lines] (the user's or an agent's) is extended rather than replaced. */ private fun pathOf(lines: List<String>) = lines.lastOrNull { it.startsWith("PATH=") }?.substringAfter('=')?.takeIf { it.isNotBlank() } ?: BASE_PATH @@ -178,7 +156,6 @@ object AgentEnv { } } -/** Typed writes to the app's SharedPreferences, for driving a settings matrix without the UI. */ object AgentPrefs { fun set(context: Context, file: String, key: String, type: String, value: String?): JSONObject { AgentAccess.requireCommands(context) diff --git a/app/src/main/java/com/droiddeck/launcher/agent/AgentGuest.kt b/app/src/main/java/com/droiddeck/launcher/agent/AgentGuest.kt index fbf3f84e9e..2295c407e2 100644 --- a/app/src/main/java/com/droiddeck/launcher/agent/AgentGuest.kt +++ b/app/src/main/java/com/droiddeck/launcher/agent/AgentGuest.kt @@ -1,6 +1,11 @@ package com.droiddeck.launcher.agent import android.content.Context +import android.os.Handler +import android.os.Looper +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.setValue import android.os.FileObserver import android.util.Log import com.droiddeck.launcher.runtime.LinuxRuntime @@ -10,12 +15,10 @@ import org.json.JSONObject import java.io.File import java.util.UUID -/** - * The app's side of the guest agent (tools/linuxfs/overlay/usr/local/bin/droiddeck-agent): requests - * go in as files under the session root's agent directory and answers come back the same way, so - * whatever runs does so inside the live session with its own environment. - */ object AgentGuest { + private val main by lazy { Handler(Looper.getMainLooper()) } + var focusRevision by mutableIntStateOf(0) + private set private const val TAG = "AgentGuest" private const val POLL_MS = 50L private val lock = Any() @@ -24,11 +27,6 @@ object AgentGuest { fun dir(context: Context) = File(LinuxRuntime.sessionRoot(context), "agent") - /** - * Before each session: nothing of the last one's daemon, answers or focus may be read as - * current. Then watch for the new daemon's hello and focus snapshots, which go into the - * session's events.jsonl. - */ fun reset(context: Context) { synchronized(lock) { observer?.stopWatching() @@ -51,7 +49,6 @@ object AgentGuest { } } - /** At the end of a session: no more events for a folder that is being closed. */ fun stop() { synchronized(lock) { observer?.stopWatching() @@ -70,10 +67,10 @@ object AgentGuest { if (key == lastFocusKey) return lastFocusKey = key } + main.post { focusRevision++ } SessionEvents.record("focus.changed", fields + ("seq" to snapshot.optInt("seq"))) } - /** The daemon's hello, when it is running in the current session. */ fun hello(context: Context): JSONObject? { if (!SessionState.running) return null val hello = readJson(File(dir(context), "hello.json")) ?: return null @@ -81,13 +78,70 @@ object AgentGuest { return hello.takeIf { pid > 1 && File("/proc/$pid").exists() } } - /** The newest focus snapshot the daemon published, when a session is running. */ fun focus(context: Context): JSONObject? = if (SessionState.running) readJson(File(dir(context), "focus.json")) else null - /** Send one request and wait for its answer. Throws [AgentException] with a stable code. */ - fun call(context: Context, request: JSONObject, timeoutMs: Long): JSONObject { - if (request.optString("kind") in setOf("exec", "cdp")) AgentAccess.requireCommands(context) + fun selectedSteamAppId(context: Context): Long? { + val result = call(context, JSONObject().put("kind", "steam-selection"), 6_000) + if (!result.optBoolean("ok") || result.isNull("appId")) return null + return result.optLong("appId").takeIf { it in 1..4_294_967_295L } + } + + fun activeSteamAppId(context: Context, installedAppIds: Set<Long>): Long? { + val snapshot = focus(context) ?: return null + val focusedAppId = snapshot.optLong("focusedApp").takeIf { snapshot.has("focusedApp") } + val focusableAppIds = snapshot.optJSONArray("focusableApps")?.let { apps -> + buildList { + for (index in 0 until apps.length()) { + apps.optLong(index).takeIf { it > 0 }?.let(::add) + } + } + }.orEmpty() + val baselayerAppIds = snapshot.optJSONArray("baselayerAppIds")?.let { apps -> + buildList { + for (index in 0 until apps.length()) { + apps.optLong(index).takeIf { it > 0 }?.let(::add) + } + } + }.orEmpty() + return activeInstalledSteamAppId(focusedAppId, focusableAppIds, installedAppIds, baselayerAppIds) + } + + internal fun focusedInstalledSteamAppId(focusedAppId: Long?, installedAppIds: Set<Long>): Long? = + focusedAppId?.takeIf { it in installedAppIds } + + internal fun activeInstalledSteamAppId( + focusedAppId: Long?, + focusableAppIds: List<Long>, + installedAppIds: Set<Long>, + baselayerAppIds: List<Long> = emptyList(), + ): Long? = focusedInstalledSteamAppId(focusedAppId, installedAppIds) + ?: focusableAppIds.filter { it in installedAppIds }.distinct().singleOrNull() + ?: baselayerAppIds.filter { it in installedAppIds }.distinct().singleOrNull() + + internal fun preferredInstalledSteamAppId( + selectedAppId: Long?, + activeAppId: Long?, + installedAppIds: Set<Long>, + ): Long? = selectedAppId?.takeIf { it in installedAppIds } + ?: activeAppId?.takeIf { it in installedAppIds } + + internal fun selectedOrActiveInstalledSteamAppId( + selectedAppId: Result<Long?>, + activeAppId: Long?, + installedAppIds: Set<Long>, + ): Long? { + preferredInstalledSteamAppId(selectedAppId.getOrNull(), activeAppId, installedAppIds)?.let { return it } + selectedAppId.exceptionOrNull()?.let { throw it } + return null + } + + fun steamEval(context: Context, expression: String, timeoutMs: Long): JSONObject = + call(context, JSONObject().put("kind", "cdp").put("expression", expression).put("timeout", timeoutMs / 1000.0), + timeoutMs + 2_000, trusted = true) + + fun call(context: Context, request: JSONObject, timeoutMs: Long, trusted: Boolean = false): JSONObject { + if (!trusted && request.optString("kind") in setOf("exec", "cdp")) AgentAccess.requireCommands(context) if (!SessionState.running) throw AgentException("NO_ACTIVE_SESSION", "There is no running session") hello(context) ?: throw AgentException("AGENT_UNAVAILABLE", "The guest agent is not running in this session (yet)") val dir = dir(context) diff --git a/app/src/main/java/com/droiddeck/launcher/agent/AgentInput.kt b/app/src/main/java/com/droiddeck/launcher/agent/AgentInput.kt index e2c8674b4c..94cf533885 100644 --- a/app/src/main/java/com/droiddeck/launcher/agent/AgentInput.kt +++ b/app/src/main/java/com/droiddeck/launcher/agent/AgentInput.kt @@ -5,13 +5,7 @@ import com.droiddeck.launcher.session.SessionState import com.droiddeck.launcher.wayland.WaylandCompositor import org.json.JSONObject -/** - * Input into the running session the way a player gives it: keys and touches through the - * compositor (what the session screen sends), and the virtual pad through the same PadBridge the - * on-screen controls drive, so games that ignore touch still see a controller. - */ object AgentInput { - /** Out of the way of real fingers, which Android numbers from 0. */ private const val TOUCH_ID = 9 private const val TOUCH_SCALE_X = 1919f private const val TOUCH_SCALE_Y = 1079f @@ -56,7 +50,6 @@ object AgentInput { return JSONObject().put("code", code) } - /** Typed as key presses (US layout), which reaches X programs that have no text-input support. */ private fun text(request: JSONObject): JSONObject { val text = request.optString("text") if (request.optBoolean("commit")) { @@ -99,11 +92,6 @@ object AgentInput { return JSONObject().put("from", org.json.JSONArray().put(x1).put(y1)).put("to", org.json.JSONArray().put(x2).put(y2)) } - /** - * A point in the compositor's touch space (0..1919 x 0..1079 whatever the session's size), from - * the session's output pixels (space "output", the default: what the guest draws at) or 0..1 - * fractions (space "fraction"). - */ private fun point(request: JSONObject, xKey: String, yKey: String): Pair<Int, Int> { if (!request.has(xKey) || !request.has(yKey)) throw AgentException("INVALID_INPUT", "$xKey and $yKey are required") val x = request.getDouble(xKey) @@ -183,7 +171,6 @@ object AgentInput { "guide" to PadState.GUIDE, "steam" to PadState.GUIDE, ) - /** Linux evdev codes (input-event-codes.h) by name. */ private val KEYS: Map<String, Int> = buildMap { "1234567890".forEachIndexed { i, c -> put(c.toString(), 2 + i) } "QWERTYUIOP".forEachIndexed { i, c -> put(c.toString(), 16 + i) } @@ -202,7 +189,6 @@ object AgentInput { )) } - /** US-layout characters as (evdev code, shift). */ private val TYPED: Map<Char, Pair<Int, Boolean>> = buildMap { for (c in 'a'..'z') put(c, KEYS.getValue(c.uppercase()) to false) for (c in 'A'..'Z') put(c, KEYS.getValue(c.toString()) to true) diff --git a/app/src/main/java/com/droiddeck/launcher/agent/AgentStartActivity.kt b/app/src/main/java/com/droiddeck/launcher/agent/AgentStartActivity.kt index edf38dde68..f052df93cf 100644 --- a/app/src/main/java/com/droiddeck/launcher/agent/AgentStartActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/agent/AgentStartActivity.kt @@ -10,7 +10,6 @@ import com.droiddeck.launcher.session.SessionService import org.json.JSONArray import org.json.JSONObject -/** Shell-launched trampoline: Android permits the shell to start this protected debug Activity. */ class AgentStartActivity : Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -98,6 +97,7 @@ class AgentStartActivity : Activity() { request.optString("steamUrl").takeIf { it.startsWith("steam://") }?.let { putExtra(SessionService.EXTRA_STEAM_URL, it) } + if (request.optBoolean("steamVr")) putExtra(SessionActivity.EXTRA_STEAMVR, true) } } startActivity(sessionIntent) diff --git a/app/src/main/java/com/droiddeck/launcher/agent/AgentUi.kt b/app/src/main/java/com/droiddeck/launcher/agent/AgentUi.kt index 6153da0f30..b6179e07b8 100644 --- a/app/src/main/java/com/droiddeck/launcher/agent/AgentUi.kt +++ b/app/src/main/java/com/droiddeck/launcher/agent/AgentUi.kt @@ -19,16 +19,8 @@ import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicReference -/** - * The app's own UI as an agent sees it: every Compose node in every window of the process (popups - * and menus included), read from Compose's semantics rather than through UI Automator, which on a - * dual-screen device dumps whichever window has focus - often not this app's. Nodes carry their - * test tag (ui/TestTags.kt), text, content description, role, state and on-screen bounds; click - * and set-text act on a node by tag or text, so a test needs no coordinates. - */ object AgentUi { private const val TIMEOUT_MS = 5_000L - /** Setup's Debugging tools toggle: the bridge never acts on its own gate (AgentAccess). */ private const val GATE_TAG = "setting-agent-commands" fun handle(request: JSONObject): JSONObject = when (val op = request.optString("op", "dump")) { @@ -106,10 +98,6 @@ object AgentUi { return json } - /** - * The node a request names by "tag" (exact) or "match" (text or description containing it, - * ignoring case); "index" picks among several, in tree order. - */ private fun act(request: JSONObject, action: (SemanticsNode) -> Unit): JSONObject { val tag = request.optString("tag").takeIf { it.isNotEmpty() } val text = if (tag == null) request.optString("match").takeIf { it.isNotEmpty() } else null diff --git a/app/src/main/java/com/droiddeck/launcher/audio/DirectAudioRelayComponent.java b/app/src/main/java/com/droiddeck/launcher/audio/DirectAudioRelayComponent.java index ad5278117c..15ffd7bdb0 100644 --- a/app/src/main/java/com/droiddeck/launcher/audio/DirectAudioRelayComponent.java +++ b/app/src/main/java/com/droiddeck/launcher/audio/DirectAudioRelayComponent.java @@ -9,34 +9,12 @@ import com.droiddeck.launcher.core.HostProcess; import java.io.File; import java.util.ArrayList; -/** - * The DirectAudio relay helper, which owns Android's speaker and microphone on behalf of a Linux - * session. - * - * <p>Nothing inside the session can open Android's audio itself. A game is a glibc process in a - * rootfs that binds no {@code /system}, and a glibc process cannot call libaaudio at all; the - * session is also never given a way to spawn a bionic helper of its own. So the helper runs out - * here, under the app's own uid, and the driver inside Wine talks to it over a unix socket. The uid - * matters for more than tidiness: Android checks the microphone permission against whoever opens - * the stream, so a helper started any other way could play but never record. - * - * <p>It is executed from the app's native library directory because Android will not execute a - * binary from anywhere else - the same reason the PulseAudio daemon ships as {@code - * libpulseaudio.so} despite being a program rather than a library. - * - * <p>Started before the client, because the driver asks once whether a helper is there, when Wine - * picks an audio driver, and reports itself unavailable if not. Ported from Bannerlator (GPL-3.0); - * the helper binary is the one built by The412Banner/directaudio's relay workflow. - */ public class DirectAudioRelayComponent extends SessionPart { private static final String TAG = "DirectAudioRelay"; - /** The helper, named as a library so Android will run it. */ public static final String BINARY = "libdirectaudiorelay.so"; private final File socketPath; - /** Shared with PulseAudioComponent: one audio.log per session, appended by both. */ private File logFile; - /** Null when the microphone was not asked for; the helper then opens no input stream. */ private final File micFifoPath; private volatile int pid = -1; @@ -45,7 +23,6 @@ public class DirectAudioRelayComponent extends SessionPart { this.micFifoPath = micFifoPath; } - /** Send the helper's output to this file as well as logcat. Set before {@link #start()}. */ public void setLogFile(File file) { this.logFile = file; } @@ -60,21 +37,10 @@ public class DirectAudioRelayComponent extends SessionPart { } File parent = socketPath.getParentFile(); if (parent != null) { - //noinspection ResultOfMethodCallIgnored parent.mkdirs(); } - // A socket left by a session that did not shut down cleanly is not a listener, and the - // helper would fail to bind onto it. - //noinspection ResultOfMethodCallIgnored socketPath.delete(); - // PulseAudio's pipe module insists on creating the pipe itself and fails if one is already - // there. The helper creates one too when the path is missing, and it starts a few - // milliseconds after the daemon is exec'd - well before the daemon has read its config. So - // left to itself the helper won its own race, the daemon's mkfifo failed with EEXIST, and - // the microphone was lost while everything else came up. Wait for the daemon to make the - // pipe before the helper runs; it appears within a second, and if it never does the helper - // starts anyway and creates it, which is the right thing when the daemon is not involved. if (micFifoPath != null) { long deadline = System.currentTimeMillis() + 3000L; while (!micFifoPath.exists() && System.currentTimeMillis() < deadline) { @@ -91,12 +57,8 @@ public class DirectAudioRelayComponent extends SessionPart { StringBuilder command = new StringBuilder(binary.getAbsolutePath()); command.append(" --socket ").append(socketPath.getAbsolutePath()); - // Diagnostics into the session's audio.log: every 1000 callbacks the device buffer, - // Android's own xrun count and the ring's fill, plus every buffer change. command.append(" --log"); if (micFifoPath != null) { - // The helper creates the pipe if it is not there. PulseAudio is told the same path and - // reads from the other end of it. command.append(" --mic-fifo ").append(micFifoPath.getAbsolutePath()); } ArrayList<String> env = new ArrayList<>(); @@ -126,8 +88,6 @@ public class DirectAudioRelayComponent extends SessionPart { @Override public void stop() { if (pid != -1) { - // The helper exits on a signal and tears down its streams; there is nothing below it to - // orphan, unlike the proot tree. Process.killProcess(pid); pid = -1; } diff --git a/app/src/main/java/com/droiddeck/launcher/audio/PulseAudioComponent.java b/app/src/main/java/com/droiddeck/launcher/audio/PulseAudioComponent.java index c4e1db8c7d..849455b7a0 100644 --- a/app/src/main/java/com/droiddeck/launcher/audio/PulseAudioComponent.java +++ b/app/src/main/java/com/droiddeck/launcher/audio/PulseAudioComponent.java @@ -17,30 +17,15 @@ import java.nio.file.StandardCopyOption; import java.util.ArrayList; import java.util.concurrent.TimeUnit; -/** - * PulseAudio 13.0 running in the app process, with Android's AAudio as its sink, so the guest's - * libpulse clients (Steam and everything it launches) have a server to talk to. The socket lives - * in the app's files directory and is bound into the session at its own path, so PULSE_SERVER - * needs no translating. - */ public class PulseAudioComponent extends SessionPart { private static final String TAG = "PulseAudio"; - /** Where the guest reaches the daemon; the session exports PULSE_SERVER=unix:<this>. */ public static final String SOCKET_NAME = "PS0"; - /** Identifies the bundled pulseaudio.tzst; a change here re-unpacks it over what a device has. */ private static final String BUNDLE_STAMP = "2026-10-08-pa13-directaudio-native"; private final File workingDir; - /** Where the daemon's own output is kept for this session, or null for logcat only. */ private File logFile; - /** - * A named pipe carrying microphone audio, or null for no microphone. The bundle ships - * module-aaudio-sink but no matching source, and the daemon runs where Android permits - * recording - so pointing module-pipe-source at a pipe the DirectAudio relay helper writes - * turns that one stream into a source the client can see, named DirectAudioMic. - */ private final String micFifoPath; private volatile int pid = -1; @@ -48,13 +33,11 @@ public class PulseAudioComponent extends SessionPart { this(context, null); } - /** As above, with a microphone fed from {@code micFifoPath}; null for output only. */ public PulseAudioComponent(Context context, String micFifoPath) { this.workingDir = new File(context.getFilesDir(), "pulseaudio"); this.micFifoPath = micFifoPath; } - /** CRC-32 of the bundled pulseaudio.tzst, or "?" if it cannot be read. About 600 KB; cheap. */ private String bundleChecksum() { java.util.zip.CRC32 crc = new java.util.zip.CRC32(); byte[] buf = new byte[64 * 1024]; @@ -67,7 +50,6 @@ public class PulseAudioComponent extends SessionPart { return Long.toHexString(crc.getValue()); } - /** Send the daemon's output to this file as well as logcat. Set before {@link #start()}. */ public void setLogFile(File file) { this.logFile = file; } @@ -80,18 +62,9 @@ public class PulseAudioComponent extends SessionPart { public void start() { stop(); if (!workingDir.isDirectory()) { - //noinspection ResultOfMethodCallIgnored workingDir.mkdirs(); FileUtils.chmod(workingDir, 0771); } - // The loadable modules (module-aaudio-sink - the app's own, from tools/aaudio-sink - the - // native protocol, the pipe modules) ride in the apk; the daemon and its libraries come from the native library directory, the one - // place an app may execute a file from. The bundle is unpacked once per BUNDLE_STAMP, not - // once ever: an installed app kept the modules it unpacked on its first run, so a bundle - // fixed in a later build never reached the device - which is how a 17.0 glibc build of - // module-pipe-source sat beside the 13.0 daemon, failed to dlopen, and the microphone - // never appeared. The stamp carries a checksum of the bundle itself, so any change to it - - // a rebuilt sink module included - re-unpacks, whether or not BUNDLE_STAMP was bumped. File modulesDir = new File(workingDir, "modules"); File stamp = new File(modulesDir, ".bundle"); String have = FileUtils.readString(stamp); @@ -112,38 +85,18 @@ public class PulseAudioComponent extends SessionPart { if (pactl.isFile()) FileUtils.chmod(pactl, 0771); copyFromLibraryDir(); - //noinspection ResultOfMethodCallIgnored socket().delete(); - // module-pipe-source creates the pipe with mkfifo and fails outright if one is already - // there - EEXIST, reported as "Unknown error 17" - and the module then does not load at - // all, so the source never appears and the client reports no microphone. Ours lives in the - // app's files directory and survives a session, so after the very first run the path would - // always be occupied. Removed here, before the daemon reads this config: the daemon makes - // it, and the relay helper starts afterwards and is content to find one already made. if (micFifoPath != null && !micFifoPath.isEmpty()) { - //noinspection ResultOfMethodCallIgnored new File(micFifoPath).delete(); } ArrayList<String> config = new ArrayList<>(); config.add("load-module module-native-protocol-unix auth-anonymous=1 auth-cookie-enabled=0 socket=\"" + socket().getAbsolutePath() + "\""); - // volume=1.0 is not optional: with no volume argument module-aaudio-sink defaults - // the sink to 0% and the session plays silence. - // The sink's name is what the client's Audio settings show as the output device, so it - // says which road the sound takes. - // The client's sound: DirectAudio's own engine, in this process, one step from Android. - // decay=0: shrinking the device buffer after a quiet spell probes below what works and that - // probe is a click; the client plays menus. Between .nofail and .fail a module that cannot - // open its stream does not take the daemon down; ensureClientSink() then loads the plain - // AAudio sink in its place. config.add(".nofail"); config.add("load-module module-directaudio-native-sink sink_name=DirectAudio performance_mode=1 adaptive=1 decay=0 limiter=1 watchdog=1 volume=1.0"); config.add("set-default-sink DirectAudio"); config.add(".fail"); if (micFifoPath != null && !micFifoPath.isEmpty()) { - // The format is the helper's, fixed at s16le/48000/mono: it resamples when the device - // grants another input rate, so the daemon is never told a rate the bytes are not. - // A pipe has no clock, so nothing here corrects drift - acceptable for voice. config.add("load-module module-pipe-source source_name=DirectAudioMic file=\"" + micFifoPath + "\" format=s16le rate=48000 channels=1"); config.add("set-default-source DirectAudioMic"); @@ -159,12 +112,7 @@ public class PulseAudioComponent extends SessionPart { String command = workingDir.getAbsolutePath() + "/libpulseaudio.so" + " --system=false --disable-shm=true --fail=false" + " -n --file=default.pa --daemonize=false --use-pid-file=false --exit-idle-time=-1" - // Info level: the classic sink reports the stream Android granted (burst, capacity, - // starting buffer) only there, and that is what a stutter report needs. + " --log-level=info"; - // A module that refuses to load, a pipe that could not be made, the daemon exiting at - // startup: all of it used to reach logcat and nothing else, so a user's folder said nothing - // at all about sound. Four separate faults hid behind "no input device" in one night. final java.io.PrintWriter out = openLog(); pid = HostProcess.start(command, env.toArray(new String[0]), workingDir, null, line -> { @@ -176,11 +124,6 @@ public class PulseAudioComponent extends SessionPart { guard.start(); } - /** - * The fallback: once the daemon answers, if the DirectAudio sink is not - * there (the module failed to load or to open its stream), load the plain AAudio sink so the - * client is never left without an output. Says so in the audio log either way. - */ private void ensureClientSink(java.io.PrintWriter out) { try { long deadline = System.currentTimeMillis() + 15000L; @@ -208,7 +151,6 @@ public class PulseAudioComponent extends SessionPart { } } - /** Runs pactl against this daemon; its stdout, or null when it failed or timed out. */ private String pactl(String... args) { File pactl = new File(workingDir, "pactl"); if (!pactl.isFile() || pid <= 1) return null; @@ -298,7 +240,6 @@ public class PulseAudioComponent extends SessionPart { } } - /** The session's audio log, appended to by both the daemon and the relay helper. */ private java.io.PrintWriter openLog() { if (logFile == null) return null; try { diff --git a/app/src/main/java/com/droiddeck/launcher/core/AppLanguage.kt b/app/src/main/java/com/droiddeck/launcher/core/AppLanguage.kt index 4021e18040..3ea69d565b 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/AppLanguage.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/AppLanguage.kt @@ -6,31 +6,20 @@ import android.content.res.Configuration import android.os.LocaleList import java.util.Locale -/** - * The language the app shows itself in. - * - * Nothing chosen (the default) means the system's: Android's own language, or the per-app language - * Android 13+ lets a user set for DroidDeck in its settings, exactly as Android resolves it. Picking - * one in Setup overrides that until the user picks "System default" again. Each activity and service - * applies the choice to its own context ([wrap], [applyTo]), so it works on every Android version - * the app runs on rather than only where the platform's per-app language API exists. - * - * Steam follows the same choice: [SteamLanguage] turns [effective] into the client's language. - */ object AppLanguage { - /** The stored value meaning "follow the system". */ const val SYSTEM = "" - /** The languages the app ships, as BCP 47 tags, in the order the picker lists them. */ - val supported: List<String> = listOf("en", "es", "fr", "ru", "ja", "ko", "zh-CN", "zh-TW", "zh-HK") + val supported: List<String> = listOf( + "en", "id", "ms", "cs", "da", "de", "es", "es-419", "fr", "it", "hu", "nl", "nb", "pl", + "pt-BR", "pt-PT", "ro", "fi", "sv", "vi", "tr", "el", "bg", "ru", "uk", "ar", "hi", "th", + "ja", "ko", "zh-CN", "zh-TW", "zh-HK", + ) private const val PREFS = "language" private const val KEY = "app_language" - /** The locale Android gave the process before any choice here was applied. */ @Volatile private var systemLocale: Locale? = null - /** The stored choice: one of [supported], or [SYSTEM]. */ fun chosen(context: Context): String = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).getString(KEY, SYSTEM) ?.takeIf { it in supported } ?: SYSTEM @@ -40,7 +29,6 @@ object AppLanguage { context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).edit().putString(KEY, value).commit() val locale = value.takeIf { it.isNotEmpty() }?.let(Locale::forLanguageTag) ?: system(context) Locale.setDefault(locale) - // Code that reads strings through the application context sees the new language too. val app = context.applicationContext @Suppress("DEPRECATION") app.resources.updateConfiguration( @@ -49,24 +37,16 @@ object AppLanguage { ) } - /** The locale Android chose for the app, ignoring the choice made here. */ fun system(context: Context): Locale = systemLocale ?: context.resources.configuration.locales[0] ?: Locale.getDefault() - /** The locale the app is shown in: the chosen language, or else the system's. */ fun effective(context: Context): Locale = chosen(context).takeIf { it.isNotEmpty() }?.let(Locale::forLanguageTag) ?: system(context) - /** Remembers the system's locale; call with the untouched base context, before [wrap]. */ fun noteSystem(base: Context) { if (systemLocale == null) systemLocale = base.resources.configuration.locales[0] } - /** - * [base], showing the chosen language: for an Application's or a Service's attachBaseContext. - * Only the locale is overridden, so screen size, density and night mode keep following the - * device as they change. - */ fun wrap(base: Context): Context { noteSystem(base) val tag = chosen(base).ifEmpty { return base } @@ -75,11 +55,6 @@ object AppLanguage { return base.createConfigurationContext(override(locale)) } - /** - * Applies the chosen language to an activity; call from its attachBaseContext, after super. - * applyOverrideConfiguration keeps the locale through rotation and window resizes, which an - * activity here handles itself rather than being recreated. - */ fun applyTo(activity: Activity, base: Context) { noteSystem(base) val tag = chosen(base).ifEmpty { return } @@ -88,18 +63,23 @@ object AppLanguage { activity.applyOverrideConfiguration(override(locale)) } - /** Follows a change of the system's language while the process lives (Application.onConfigurationChanged). */ fun systemChanged(config: Configuration) { config.locales[0]?.let { systemLocale = it } } - // A new Configuration's fontScale is 1, which as an override would undo the user's font size; - // 0 leaves it undefined, so only the locale is changed. private fun override(locale: Locale) = Configuration().apply { fontScale = 0f; setLocales(LocaleList(locale)) } - /** Which of the app's languages [locale] reads as, or null when the app does not ship it. */ + private val latinAmerica = setOf( + "419", "AR", "BO", "BR", "BZ", "CL", "CO", "CR", "CU", "DO", "EC", "GT", "HN", "MX", "NI", "PA", + "PE", "PR", "PY", "SV", "US", "UY", "VE", + ) + fun supportedTag(locale: Locale): String? = when (locale.language) { - "en", "es", "fr", "ru", "ja", "ko" -> locale.language + "en", "fr", "ru", "ja", "ko", "ms", "cs", "da", "de", "it", "hu", "nl", "nb", "pl", "ro", "fi", + "sv", "vi", "tr", "el", "bg", "uk", "ar", "hi", "th" -> locale.language + "in", "id" -> "id" + "es" -> if (locale.country in latinAmerica) "es-419" else "es" + "pt" -> if (locale.country.isEmpty() || locale.country == "BR") "pt-BR" else "pt-PT" "zh" -> when { locale.script == "Hans" -> "zh-CN" locale.country == "HK" || locale.country == "MO" -> "zh-HK" @@ -109,16 +89,38 @@ object AppLanguage { else -> null } - /** [locale]'s language named in itself, without its region unless the app tells them apart. */ fun displayName(locale: Locale): String = supportedTag(locale)?.let(::nativeName) ?: locale.getDisplayLanguage(locale).replaceFirstChar { it.titlecase(locale) } - /** A language's name in that language, for the picker: what a reader of it looks for. */ fun nativeName(tag: String): String = when (tag) { "en" -> "English" - "es" -> "Español" + "id" -> "Bahasa Indonesia" + "ms" -> "Bahasa Melayu" + "cs" -> "Čeština" + "da" -> "Dansk" + "de" -> "Deutsch" + "es" -> "Español (España)" + "es-419" -> "Español (Latinoamérica)" "fr" -> "Français" + "it" -> "Italiano" + "hu" -> "Magyar" + "nl" -> "Nederlands" + "nb" -> "Norsk bokmål" + "pl" -> "Polski" + "pt-BR" -> "Português (Brasil)" + "pt-PT" -> "Português (Portugal)" + "ro" -> "Română" + "fi" -> "Suomi" + "sv" -> "Svenska" + "vi" -> "Tiếng Việt" + "tr" -> "Türkçe" + "el" -> "Ελληνικά" + "bg" -> "Български" "ru" -> "Русский" + "uk" -> "Українська" + "ar" -> "العربية" + "hi" -> "हिन्दी" + "th" -> "ไทย" "ja" -> "日本語" "ko" -> "한국어" "zh-CN" -> "简体中文" diff --git a/app/src/main/java/com/droiddeck/launcher/core/ArchivePaths.java b/app/src/main/java/com/droiddeck/launcher/core/ArchivePaths.java index 3f9eaee443..8f6a8cb6e8 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/ArchivePaths.java +++ b/app/src/main/java/com/droiddeck/launcher/core/ArchivePaths.java @@ -3,18 +3,9 @@ package com.droiddeck.launcher.core; import java.io.File; import java.io.IOException; -/** - * Where an archive entry may land. An entry name ("../x", "/etc/x") or a symlink already written - * by an earlier entry can point outside the directory being filled; the canonical path follows - * both, so anything that does not resolve inside it is refused. - */ public final class ArchivePaths { private ArchivePaths() {} - /** - * The file for {@code name} under {@code destination}, or null when it would resolve outside - * it. The destination itself counts as inside (a "./" entry). - */ public static File inside(File destination, String name) throws IOException { String base = destination.getCanonicalPath(); File file = new File(destination, name); diff --git a/app/src/main/java/com/droiddeck/launcher/core/CpuAllocationDefaults.kt b/app/src/main/java/com/droiddeck/launcher/core/CpuAllocationDefaults.kt new file mode 100644 index 0000000000..adaa106a02 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/core/CpuAllocationDefaults.kt @@ -0,0 +1,27 @@ +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()), + ) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/core/CpuCores.kt b/app/src/main/java/com/droiddeck/launcher/core/CpuCores.kt index 5b0b82209e..b3dca67cc9 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/CpuCores.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/CpuCores.kt @@ -2,17 +2,9 @@ package com.droiddeck.launcher.core import java.io.File -/** - * The device's cores as taskset names them, for the two masks a Steam session can carry. - * - * A list is stored the way taskset's `-c` takes it - comma-separated core numbers - so what the - * dialog produces is what the session script and the Proton wrappers consume unchanged. - */ object CpuCores { - /** Core numbers present on this device, in order. */ val all: List<Int> by lazy { (0 until Runtime.getRuntime().availableProcessors()).toList() } - /** The core's ceiling in GHz for the dialog's labels, or null where the kernel hides it. */ fun maxGhz(core: Int): Double? = FileUtils.readString(File("/sys/devices/system/cpu/cpu$core/cpufreq/cpuinfo_max_freq")) ?.trim()?.toLongOrNull()?.let { it / 1_000_000.0 } @@ -22,18 +14,14 @@ object CpuCores { fun format(cores: Set<Int>): String = cores.sorted().joinToString(",") - /** The stored list, or every core when nothing (or nothing valid) is stored. */ fun listOrAll(list: String): String { val cores = parse(list) return format(if (cores.isEmpty()) all.toSet() else cores) } - /** - * The list only when it is a real restriction, else "". Empty, absent, or naming every core - * all mean "no preference": pinning a process to all cores is what the scheduler does - * unaided, and passing it would only put a meaningless line in the session log. Bannerlator's - * rule, kept for the game mask. - */ + fun gameLaunchList(list: String, clientPinned: Boolean): String = + restrictionOrEmpty(list).ifEmpty { if (clientPinned) listOrAll("") else "" } + fun restrictionOrEmpty(list: String): String { val cores = parse(list) return if (cores.isEmpty() || cores.size >= all.size) "" else format(cores) diff --git a/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt b/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt index 5fa562da95..1290884bb4 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt @@ -2,10 +2,15 @@ package com.droiddeck.launcher.core import android.app.ActivityManager import android.content.Context +import android.hardware.display.DisplayManager import android.os.Build import android.os.Environment +import android.os.PerformanceHintManager +import android.os.PowerManager import android.os.StatFs +import android.provider.Settings import android.util.Log +import android.view.Display import com.droiddeck.launcher.gpu.LinuxVulkanDriver import com.droiddeck.launcher.gpu.LinuxVulkanDriverManager import com.droiddeck.launcher.gpu.TurnipDriver @@ -21,15 +26,6 @@ import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -/** - * `device.txt`: what this device is and what the session was told to do, written the moment a - * session starts so a log can be read months later without asking the reporter a single question. - * - * **Nothing identifying goes in here.** No serial number, no Android ID, no IMEI, no account name, - * no network names - only what the hardware is, what the ROM is, and which of our own settings - * were in effect. The one thing that comes close is the build fingerprint, which names the ROM and - * its build date and is the same string on every unit of that model. - */ object DeviceReport { private const val TAG = "DeviceReport" @@ -41,6 +37,57 @@ object DeviceReport { } } + /** Name of an ApplicationExitInfo reason code, so a report says "LOW_MEMORY" instead of "3". */ + internal fun exitReasonName(reason: Int): String = when (reason) { + 0 -> "UNKNOWN" + 1 -> "EXIT_SELF" + 2 -> "SIGNALED" + 3 -> "LOW_MEMORY" + 4 -> "CRASH" + 5 -> "CRASH_NATIVE" + 6 -> "ANR" + 7 -> "INITIALIZATION_FAILURE" + 8 -> "PERMISSION_CHANGE" + 9 -> "EXCESSIVE_RESOURCE_USAGE" + 10 -> "USER_REQUESTED" + 11 -> "USER_STOPPED" + 12 -> "DEPENDENCY_DIED" + 13 -> "OTHER" + 14 -> "FREEZER" + 15 -> "PACKAGE_STATE_CHANGE" + 16 -> "PACKAGE_UPDATED" + else -> "REASON_$reason" + } + + internal fun thermalStatusName(status: Int): String = when (status) { + 0 -> "NONE" + 1 -> "LIGHT" + 2 -> "MODERATE" + 3 -> "SEVERE" + 4 -> "CRITICAL" + 5 -> "EMERGENCY" + 6 -> "SHUTDOWN" + else -> "STATUS_$status" + } + + internal fun gameModeName(mode: Int): String = when (mode) { + 0 -> "UNSUPPORTED" + 1 -> "STANDARD" + 2 -> "PERFORMANCE" + 3 -> "BATTERY" + 4 -> "CUSTOM" + else -> "MODE_$mode" + } + + internal fun refreshModesSummary(rates: List<Float>): String = + rates.map { Math.round(it) }.distinct().sortedDescending().joinToString(", ") { "$it Hz" } + + internal fun exitSummary(processName: String?, reason: Int, status: Int, description: String?): String = + buildString { + append(processName ?: "?").append(" ").append(exitReasonName(reason)).append(" status=").append(status) + if (!description.isNullOrBlank()) append(" ").append(description.trim()) + } + fun build(context: Context, mode: String): String { val b = StringBuilder() fun h(title: String) { @@ -77,6 +124,20 @@ object DeviceReport { k("Fingerprint", Build.FINGERPRINT) k("Kernel", System.getProperty("os.version")) k("ABIs", Build.SUPPORTED_ABIS.joinToString(", ")) + k("Memory page size", runCatching { android.system.Os.sysconf(android.system.OsConstants._SC_PAGESIZE) }.getOrNull()?.let { "$it bytes" }) + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + h("Recent process exits") + val exits = runCatching { + context.getSystemService(android.app.ActivityManager::class.java).getHistoricalProcessExitReasons(context.packageName, 0, 5) + }.getOrNull().orEmpty() + if (exits.isEmpty()) k("Exits", "none recorded") else { + val stamp = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US) + for (e in exits) { + k(stamp.format(Date(e.timestamp)), exitSummary(e.processName, e.reason, e.status, e.description)) + } + } + } h("CPU and memory") k("Cores", CpuCores.all.size) @@ -91,6 +152,19 @@ 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) }) + } + k("Power saver", pm.isPowerSaveMode) + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + val rate = runCatching { context.getSystemService(PerformanceHintManager::class.java)?.preferredUpdateRateNanos }.getOrNull() + k("ADPF hint sessions", if (rate == null || rate <= 0) "not supported" else "supported (preferred update ${rate / 1000} us)") + k("Game Mode", runCatching { context.getSystemService(android.app.GameManager::class.java)?.gameMode }.getOrNull()?.let { gameModeName(it) }) + } runCatching { val fs = StatFs(context.filesDir.path) k("App storage free", FileUtils.sizeToString(fs.availableBlocksLong * fs.blockSizeLong)) @@ -108,6 +182,13 @@ object DeviceReport { h("Display") k("Session output", SessionState.outputSize?.let { "${it.first}x${it.second}" }) k("Session refresh", String.format(Locale.US, "%.2f Hz", SessionState.refreshHz)) + runCatching { + val display = context.getSystemService(DisplayManager::class.java).getDisplay(Display.DEFAULT_DISPLAY) + k("Panel refresh now", String.format(Locale.US, "%.2f Hz", display.refreshRate)) + k("Panel refresh modes", refreshModesSummary(display.supportedModes.map { it.refreshRate })) + } + k("peak_refresh_rate", runCatching { Settings.System.getString(context.contentResolver, "peak_refresh_rate") }.getOrNull() ?: "not set") + k("refresh_rate_mode", runCatching { Settings.Secure.getString(context.contentResolver, "refresh_rate_mode") }.getOrNull() ?: "not set") val panelSize = com.droiddeck.launcher.session.SessionDisplay.panelSize(context) for ((label, mode) in listOf("Resolution (Steam)" to SessionService.MODE_STEAM, "Resolution (Desktop)" to SessionService.MODE_DESKTOP)) { val choice = SessionPrefs.resolutionChoice(context, mode, panelSize) @@ -121,7 +202,8 @@ object DeviceReport { k("GPU", "${gpu.name} · ${gpu.family.label} · ${gpu.supportText}" + if (gpu.oneUi8Gen2) " · One UI 8 Gen 2" else "") 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)))?.let { " (recommended pair: $it)" } ?: "")) + com.droiddeck.launcher.gpu.TurnipReleases.cached(context)), com.droiddeck.launcher.gpu.TurnipReleases.autoPicks(context), + com.droiddeck.launcher.gpu.AutoDriverTrial.bad(context))?.let { " (recommended pair: $it)" } ?: "")) val turnip = TurnipDriver(context) val androidChoice = SessionPrefs.androidDriver(context) k("Display driver (chosen)", if (androidChoice.isEmpty()) "Auto -> ${turnip.autoId()}" else androidChoice) @@ -147,7 +229,7 @@ object DeviceReport { h("Settings in effect") k("Client core override", SessionPrefs.clientCpusOverride(context)) k(" client cores", CpuCores.listOrAll(SessionPrefs.clientCpus(context))) - k(" game cores", CpuCores.restrictionOrEmpty(SessionPrefs.gameCpus(context)).ifEmpty { "every core (nothing sent)" }) + k(" game cores", CpuCores.restrictionOrEmpty(SessionPrefs.gameCpus(context)).ifEmpty { "every core" }) k("Turnip sysmem", SessionPrefs.tuSysmem(context)) k("Zink lazy descriptors", SessionPrefs.zinkLazy(context)) k("Threaded GL (glthread)", SessionPrefs.glThread(context)) diff --git a/app/src/main/java/com/droiddeck/launcher/core/DeviceSupport.kt b/app/src/main/java/com/droiddeck/launcher/core/DeviceSupport.kt index 1af4095be1..325ed7d43d 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/DeviceSupport.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/DeviceSupport.kt @@ -5,26 +5,14 @@ import android.os.Build import com.droiddeck.launcher.R import java.io.File -/** - * Whether this device can draw a Linux session at all. - * - * The runtime draws with Turnip, an Adreno driver. On Mali, Xclipse and PowerVR the compositor - * gets no usable Vulkan device and a session comes up as sound over a black screen - a failure - * with nothing in it to read. The app cannot fix that, so it says so before the download rather - * than after it. Adreno is recognised by what only Qualcomm's stack has: the KGSL node, or the - * vendor's own Vulkan driver at its usual path. - */ object DeviceSupport { fun adreno(): Boolean = File("/sys/class/kgsl/kgsl-3d0").exists() || File("/vendor/lib64/hw/vulkan.adreno.so").exists() - /** The chip as the device names it, for the card that explains the refusal. */ fun gpuName(context: Context): String { val soc = if (Build.VERSION.SDK_INT >= 31) Build.SOC_MODEL.takeIf { it.isNotBlank() && it != Build.UNKNOWN } else null return soc?.let { "$it (${Build.HARDWARE})" } ?: Build.HARDWARE.ifBlank { context.getString(R.string.gpu_this_gpu) } } - /** False on the Odin 3 (CQ8725S): a low-latency Wi-Fi lock makes its WLAN firmware hang, and - * that firmware reboots the whole device instead of restarting Wi-Fi. */ fun lowLatencyWifiSafe(): Boolean = Build.VERSION.SDK_INT < 31 || Build.SOC_MODEL != "CQ8725S" } diff --git a/app/src/main/java/com/droiddeck/launcher/core/DownloadSource.kt b/app/src/main/java/com/droiddeck/launcher/core/DownloadSource.kt new file mode 100644 index 0000000000..870e8ed424 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/core/DownloadSource.kt @@ -0,0 +1,208 @@ +package com.droiddeck.launcher.core + +import android.content.Context +import android.content.SharedPreferences +import java.net.HttpURLConnection +import java.net.URL +import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import java.util.concurrent.atomic.AtomicBoolean +import java.util.concurrent.atomic.AtomicLong + +object DownloadSource { + const val MODE_AUTO = "auto" + const val MODE_DIRECT = "direct" + const val MODE_MIRROR = "mirror" + const val MODE_CUSTOM = "custom" + + private const val PREFS = "download-source" + private const val KEY_MODE = "mode" + private const val KEY_MIRROR = "mirror" + private const val KEY_CUSTOM = "custom" + private const val KEY_FASTEST = "fastest" + + private const val PROBE = "https://raw.githubusercontent.com/Droid-Deck/DroidDeck/main/README.md" + private const val PROBE_TIMEOUT_MS = 4_000 + private const val PROBE_COOLDOWN_MS = 30_000L + private const val UA = "DroidDeck-Android" + + private val MODES = listOf(MODE_AUTO, MODE_DIRECT, MODE_MIRROR, MODE_CUSTOM) + + private val GITHUB_HOSTS = listOf( + "github.com", + "raw.githubusercontent.com", + "api.github.com", + ) + + private val CATALOGS = listOf( + "https://raw.githubusercontent.com/Droid-Deck/DroidDeck-CI/", + "https://raw.githubusercontent.com/Droid-Deck/DroidDeck-Components/", + "https://raw.githubusercontent.com/Droid-Deck/Drivers-CI/", + ) + + data class Mirror(val host: String, val api: Boolean) + + val MIRRORS = listOf( + Mirror("gh-proxy.com", true), + Mirror("gh-proxy.org", true), + Mirror("ghproxy.net", false), + Mirror("ghfast.top", false), + ) + + @Volatile + private var app: Context? = null + + @Volatile + private var lastGood: String? = null + + private val probing = AtomicBoolean(false) + private val probedAt = AtomicLong(0L) + + fun init(context: Context) { + app = context.applicationContext + lastGood = prefs()?.getString(KEY_FASTEST, null) + } + + fun probe() { + if (app == null || prefs()?.getString(KEY_MODE, MODE_AUTO) == MODE_DIRECT) return + if (!probing.compareAndSet(false, true)) return + val now = System.currentTimeMillis() + if (now - probedAt.get() < PROBE_COOLDOWN_MS) { + probing.set(false) + return + } + probedAt.set(now) + Thread { + try { + val times = ConcurrentHashMap<String, Long>() + val sources = listOf<String?>(null) + MIRRORS.map { it.host } + val latch = CountDownLatch(sources.size) + for (mirror in sources) { + Thread { + try { + val ms = latency(mirror?.let { "https://$it/$PROBE" } ?: PROBE) + if (ms > 0) times[mirror ?: ""] = ms + } finally { + latch.countDown() + } + }.apply { isDaemon = true }.start() + } + latch.await(PROBE_TIMEOUT_MS * 3L, TimeUnit.MILLISECONDS) + val best = times.minByOrNull { it.value }?.key ?: return@Thread + lastGood = best + prefs()?.edit()?.putString(KEY_FASTEST, best)?.apply() + } finally { + probing.set(false) + } + }.apply { isDaemon = true }.start() + } + + private fun latency(url: String): Long { + val started = System.nanoTime() + var connection: HttpURLConnection? = null + return try { + val c = (URL(url).openConnection() as HttpURLConnection).apply { + connectTimeout = PROBE_TIMEOUT_MS + readTimeout = PROBE_TIMEOUT_MS + instanceFollowRedirects = true + setRequestProperty("Range", "bytes=0-1023") + setRequestProperty("User-Agent", UA) + } + connection = c + if (c.responseCode / 100 != 2) 0L else { + c.inputStream.use { it.read() } + (System.nanoTime() - started) / 1_000_000 + } + } catch (e: Exception) { + 0L + } finally { + runCatching { connection?.disconnect() } + } + } + + fun isGithub(url: String): Boolean = GITHUB_HOSTS.any { url.startsWith("https://$it/") } + + /** Catalogs carry the digests everything else is checked against, so a mirror must never supply one. */ + fun isCatalog(url: String): Boolean = CATALOGS.any { url.startsWith(it) } + + fun candidates(target: String): List<String> { + // GitHub API metadata carries executable URLs and digests; never proxy it. + if (isCatalog(target) || target.startsWith("https://api.github.com/")) return listOf(target) + val prefs = prefs() ?: return listOf(target) + if (!isGithub(target)) return listOf(target) + val api = target.startsWith("https://api.github.com/") + val proxies = MIRRORS.filter { !api || it.api }.map { it.proxy(target) } + val ordered = when (prefs.getString(KEY_MODE, MODE_AUTO) ?: MODE_AUTO) { + MODE_DIRECT -> listOf(target) + MODE_MIRROR -> listOfNotNull(picked(prefs, api)?.proxy(target)) + listOf(target) + quickest(proxies) + MODE_CUSTOM -> listOfNotNull(customProxy(prefs, target)) + listOf(target) + quickest(proxies) + else -> if (api) listOf(target) else listOf(target) + quickest(proxies) + } + return ordered.distinct() + } + + private fun quickest(sources: List<String>): List<String> = + sources.sortedBy { if (host(it) == lastGood) 0 else 1 } + + fun succeeded(source: String) { + lastGood = host(source) + } + + fun failed() { + lastGood = null + prefs()?.edit()?.remove(KEY_FASTEST)?.apply() + } + + fun mode(context: Context): String = prefs(context)?.getString(KEY_MODE, MODE_AUTO) ?: MODE_AUTO + + fun setMode(context: Context, mode: String) { + prefs(context)?.edit()?.putString(KEY_MODE, mode.takeIf { it in MODES } ?: MODE_AUTO)?.apply() + } + + fun mirror(context: Context): String { + val host = prefs(context)?.getString(KEY_MIRROR, "") ?: "" + return MIRRORS.firstOrNull { it.host == host }?.host ?: MIRRORS.first().host + } + + fun setMirror(context: Context, host: String) { + prefs(context)?.edit()?.putString(KEY_MIRROR, host.takeIf { h -> MIRRORS.any { it.host == h } } ?: "")?.apply() + } + + fun custom(context: Context): String = prefs(context)?.getString(KEY_CUSTOM, "") ?: "" + + fun setCustom(context: Context, prefix: String) { + prefs(context)?.edit()?.putString(KEY_CUSTOM, normalizePrefix(prefix))?.apply() + } + + fun reset(context: Context) { + lastGood = null + prefs(context)?.edit()?.clear()?.apply() + } + + private fun prefs(): SharedPreferences? = app?.getSharedPreferences(PREFS, Context.MODE_PRIVATE) + + private fun prefs(context: Context): SharedPreferences? = + context.applicationContext.getSharedPreferences(PREFS, Context.MODE_PRIVATE) + + private fun Mirror.proxy(target: String): String = "https://$host/$target" + + private fun host(url: String): String = + MIRRORS.firstOrNull { url.startsWith("https://${it.host}/") }?.host ?: "" + + private fun picked(prefs: SharedPreferences, api: Boolean): Mirror? { + val chosen = MIRRORS.firstOrNull { it.host == (prefs.getString(KEY_MIRROR, "") ?: "") } ?: MIRRORS.firstOrNull() + return if (api && chosen != null && !chosen.api) MIRRORS.firstOrNull { it.api } else chosen + } + + private fun custom(prefs: SharedPreferences): String = prefs.getString(KEY_CUSTOM, "") ?: "" + + private fun customProxy(prefs: SharedPreferences, target: String): String? = + normalizePrefix(custom(prefs)).takeIf { it.isNotEmpty() }?.let { "$it/$target" } + + private fun normalizePrefix(value: String): String { + val trimmed = value.trim().trimEnd('/') + if (trimmed.isEmpty() || trimmed.startsWith("http://")) return "" + return if (trimmed.startsWith("https://")) trimmed else "https://$trimmed" + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/core/Downloader.java b/app/src/main/java/com/droiddeck/launcher/core/Downloader.java index 2543412216..2527c57e82 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/Downloader.java +++ b/app/src/main/java/com/droiddeck/launcher/core/Downloader.java @@ -6,75 +6,201 @@ import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; +import java.io.FileInputStream; +import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.Properties; -/** - * The two fetches this app makes: the runtime catalog (a few hundred bytes of JSON) and the - * runtime tarball itself (~790 MB). Plain HttpURLConnection - nothing here needs a client library, - * and one fewer dependency is one fewer thing that can fail a release build. - */ public final class Downloader { private static final String TAG = "Downloader"; - private static final int TIMEOUT_MS = 30_000; + private static final int CONNECT_TIMEOUT_MS = 10_000; + private static final int STALL_TIMEOUT_MS = 15_000; + private static final int HTTP_RANGE_NOT_SATISFIABLE = 416; private Downloader() {} public static String downloadString(String url) { - HttpURLConnection connection = null; - try { - connection = open(url); - if (connection.getResponseCode() / 100 != 2) { - Log.w(TAG, url + " -> HTTP " + connection.getResponseCode()); - return null; + List<String> sources = DownloadSource.INSTANCE.candidates(url); + for (int i = 0; i < sources.size(); i++) { + if (i > 0) Log.i(TAG, "retrying " + url + " via " + sources.get(i)); + Fetch fetch = fetch(sources.get(i)); + if (fetch.body != null) { + DownloadSource.INSTANCE.succeeded(sources.get(i)); + return fetch.body; } - try (InputStream in = connection.getInputStream(); - ByteArrayOutputStream out = new ByteArrayOutputStream()) { - FileUtils.copy(in, out); - return new String(out.toByteArray(), StandardCharsets.UTF_8); + if (fetch.fatal && sources.get(i).equals(url)) return null; + } + DownloadSource.INSTANCE.failed(); + return null; + } + + /** Fetches without the mirror list, for a URL whose body is a digest the payload is checked against. */ + public static String downloadDirect(String url) { + return fetch(url).body; + } + + public static boolean downloadFile(String url, File destination, boolean resume, + java.util.function.Consumer<Float> progress) { + return downloadFile(url, destination, resume, null, progress); + } + + /** Verify each candidate before accepting it, so a bad mirror can fall back. */ + public static boolean downloadFile(String url, File destination, boolean resume, String expectedSha256, + java.util.function.Consumer<Float> progress) { + if (expectedSha256 != null && !expectedSha256.matches("(?i)[0-9a-f]{64}")) + throw new IllegalArgumentException("Expected SHA-256 must be 64 hex characters"); + return downloadCandidates(url, DownloadSource.INSTANCE.candidates(url), destination, resume, expectedSha256, progress); + } + + // Package-private for the local multi-source HTTP test. + static boolean downloadCandidates(String original, List<String> sources, File destination, boolean resume, + String expectedSha256, java.util.function.Consumer<Float> progress) { + Identity identity = loadIdentity(destination, resume, expectedSha256); + for (int i = 0; i < sources.size(); i++) { + String source = sources.get(i); + if (i > 0) Log.i(TAG, "retrying " + original + " via " + source); + Outcome outcome = attempt(source, destination, resume, identity, expectedSha256, progress); + if (outcome == Outcome.DONE) { + if (expectedSha256 != null && !expectedSha256.equalsIgnoreCase(Hashes.sha256(destination))) { + Log.w(TAG, "checksum mismatch from " + source + "; trying another source"); + if (!discardPartial(destination, identity)) return false; + continue; + } + resumeFile(destination).delete(); + DownloadSource.INSTANCE.succeeded(source); + if (progress != null) progress.accept(1f); + return true; } - } catch (Exception e) { - Log.w(TAG, "GET " + url, e); - return null; - } finally { - if (connection != null) connection.disconnect(); + if (outcome == Outcome.FATAL && source.equals(original)) return false; + } + DownloadSource.INSTANCE.failed(); + return false; + } + + private enum Outcome { DONE, RETRY, FATAL } + + private static final class Identity { + private String source; + private String etag; + } + + private static File resumeFile(File dest) { + return new File(dest.getPath() + ".resume.properties"); + } + + private static boolean strongETag(String value) { + return value != null && !value.isEmpty() && !value.startsWith("W/"); + } + + /** Only reuse saved bytes when we persisted a strong validator and their source. */ + private static Identity loadIdentity(File dest, boolean resume, String expectedSha256) { + Identity identity = new Identity(); + File marker = resumeFile(dest); + if (!resume || !dest.isFile() || dest.length() == 0) { + marker.delete(); + return identity; + } + try (FileInputStream in = new FileInputStream(marker)) { + Properties p = new Properties(); + p.load(in); + String source = p.getProperty("source"); + String etag = p.getProperty("etag"); + String expected = p.getProperty("sha256", ""); + if (source != null && source.startsWith("http") && strongETag(etag) + && expected.equals(expectedSha256 == null ? "" : expectedSha256.toLowerCase(java.util.Locale.ROOT))) { + identity.source = source; + identity.etag = etag; + return identity; + } + } catch (IOException e) { + // Legacy partials or interrupted metadata writes have no trustworthy identity. + } + if (!discardPartial(dest, identity)) Log.w(TAG, "could not discard unidentified partial " + dest); + return identity; + } + + private static boolean discardPartial(File dest, Identity identity) { + identity.source = null; + identity.etag = null; + File marker = resumeFile(dest); + return (!dest.exists() || dest.delete()) && (!marker.exists() || marker.delete()); + } + + private static void saveIdentity(File dest, Identity identity, String expectedSha256) { + File marker = resumeFile(dest); + if (!strongETag(identity.etag)) { + marker.delete(); + return; + } + Properties p = new Properties(); + p.setProperty("source", identity.source); + p.setProperty("etag", identity.etag); + p.setProperty("sha256", expectedSha256 == null ? "" : expectedSha256.toLowerCase(java.util.Locale.ROOT)); + try (FileOutputStream out = new FileOutputStream(marker)) { + p.store(out, "DroidDeck partial download validator"); + } catch (IOException e) { + marker.delete(); // No valid metadata means no future resume. + Log.w(TAG, "cannot persist download validator", e); } } - /** - * Downloads to {@code destination}, reporting a 0..1 fraction (or -1 when the server sends no - * length). {@code resume} continues a partial file with a Range request, which is what makes a - * 790 MB download survive a dropped connection instead of starting over. - */ - public static boolean downloadFile(String url, File destination, boolean resume, - java.util.function.Consumer<Float> progress) { + private static Outcome attempt(String url, File destination, boolean resume, Identity identity, + String expectedSha256, java.util.function.Consumer<Float> progress) { HttpURLConnection connection = null; long have = resume && destination.isFile() ? destination.length() : 0; try { - connection = open(url); - if (have > 0) connection.setRequestProperty("Range", "bytes=" + have + "-"); + if (have > 0 && (!url.equals(identity.source) || !strongETag(identity.etag))) { + // A new source or unvalidated bytes must restart from byte zero. + if (!discardPartial(destination, identity)) return Outcome.RETRY; + have = 0; + } + connection = open(url, STALL_TIMEOUT_MS); + if (have > 0) { + connection.setRequestProperty("Range", "bytes=" + have + "-"); + connection.setRequestProperty("If-Range", identity.etag); + } int code = connection.getResponseCode(); - boolean appending = code == HttpURLConnection.HTTP_PARTIAL; + if (have > 0 && code == HTTP_RANGE_NOT_SATISFIABLE) { + connection.disconnect(); + if (!discardPartial(destination, identity)) return Outcome.RETRY; + return attempt(url, destination, false, identity, expectedSha256, progress); + } if (code / 100 != 2) { - // The server ignored or refused the range: start the file again. - if (have > 0) { - connection.disconnect(); - //noinspection ResultOfMethodCallIgnored - destination.delete(); - return downloadFile(url, destination, false, progress); - } Log.w(TAG, url + " -> HTTP " + code); - return false; + return code == HttpURLConnection.HTTP_NOT_FOUND || code == HttpURLConnection.HTTP_GONE + ? Outcome.FATAL : Outcome.RETRY; + } + boolean appending = code == HttpURLConnection.HTTP_PARTIAL; + if (appending && !rangeStartsAt(connection.getHeaderField("Content-Range"), have)) { + connection.disconnect(); + if (!discardPartial(destination, identity)) return Outcome.RETRY; + return attempt(url, destination, false, identity, expectedSha256, progress); + } + String etag = connection.getHeaderField("ETag"); + if (have > 0 && appending && (!strongETag(etag) || !etag.equals(identity.etag))) { + connection.disconnect(); + if (!discardPartial(destination, identity)) return Outcome.RETRY; + return attempt(url, destination, false, identity, expectedSha256, progress); + } + if (!appending && have > 0) { + // If-Range may legitimately return full 200 when representation changed. + if (!discardPartial(destination, identity)) return Outcome.RETRY; + have = 0; } if (!appending) have = 0; long length = connection.getContentLengthLong(); - long total = length < 0 ? -1 : length + have; + long total = appending ? rangeTotal(connection.getHeaderField("Content-Range")) : -1; + if (total < 0) total = length < 0 ? -1 : length + have; File parent = destination.getParentFile(); - if (parent != null && !parent.isDirectory()) //noinspection ResultOfMethodCallIgnored - parent.mkdirs(); + if (parent != null && !parent.isDirectory()) parent.mkdirs(); + identity.source = url; + identity.etag = strongETag(etag) ? etag : null; + saveIdentity(destination, identity, expectedSha256); long written = have; try (InputStream in = new BufferedInputStream(connection.getInputStream(), 1 << 16); OutputStream out = new FileOutputStream(destination, appending)) { @@ -83,28 +209,72 @@ public final class Downloader { for (int read = in.read(buffer); read > 0; read = in.read(buffer)) { out.write(buffer, 0, read); written += read; - // A callback per 64 KB would be tens of thousands of UI hops; once per MB is - // enough to move a progress bar smoothly. if (progress != null && written - lastReport > (1 << 20)) { lastReport = written; progress.accept(total > 0 ? written / (float) total : -1f); } } } - if (progress != null) progress.accept(1f); - return total <= 0 || written >= total; + if (total > 0 && written < total) return Outcome.RETRY; + return Outcome.DONE; } catch (Exception e) { Log.w(TAG, "download " + url, e); - return false; + return Outcome.RETRY; } finally { if (connection != null) connection.disconnect(); } } - private static HttpURLConnection open(String url) throws java.io.IOException { + /** True when a `Content-Range: bytes START-END/TOTAL` header starts exactly at {@code start}. */ + static boolean rangeStartsAt(String contentRange, long start) { + if (contentRange == null) return false; + java.util.regex.Matcher m = java.util.regex.Pattern.compile("^\\s*bytes\\s+(\\d+)-\\d+/(?:\\d+|\\*)\\s*$").matcher(contentRange); + return m.matches() && Long.parseLong(m.group(1)) == start; + } + + /** The complete length in a `Content-Range` header, or -1 when the header leaves it unknown. */ + static long rangeTotal(String contentRange) { + if (contentRange == null) return -1; + java.util.regex.Matcher m = java.util.regex.Pattern.compile("^\\s*bytes\\s+\\d+-\\d+/(\\d+)\\s*$").matcher(contentRange); + return m.matches() ? Long.parseLong(m.group(1)) : -1; + } + + private static final class Fetch { + final String body; + final boolean fatal; + + Fetch(String body, boolean fatal) { + this.body = body; + this.fatal = fatal; + } + } + + private static Fetch fetch(String url) { + HttpURLConnection connection = null; + try { + connection = open(url, STALL_TIMEOUT_MS); + int code = connection.getResponseCode(); + if (code / 100 != 2) { + Log.w(TAG, url + " -> HTTP " + code); + return new Fetch(null, code == HttpURLConnection.HTTP_NOT_FOUND || code == HttpURLConnection.HTTP_GONE); + } + try (InputStream in = connection.getInputStream(); + ByteArrayOutputStream out = new ByteArrayOutputStream()) { + FileUtils.copy(in, out); + return new Fetch(new String(out.toByteArray(), StandardCharsets.UTF_8), false); + } + } catch (Exception e) { + Log.w(TAG, "GET " + url, e); + return new Fetch(null, false); + } finally { + if (connection != null) connection.disconnect(); + } + } + + private static HttpURLConnection open(String url, int readTimeoutMs) throws java.io.IOException { HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); - connection.setConnectTimeout(TIMEOUT_MS); - connection.setReadTimeout(TIMEOUT_MS); + connection.setConnectTimeout(CONNECT_TIMEOUT_MS); + connection.setReadTimeout(readTimeoutMs); connection.setInstanceFollowRedirects(true); connection.setRequestProperty("User-Agent", "DroidDeck-Android"); return connection; diff --git a/app/src/main/java/com/droiddeck/launcher/core/FexPreset.kt b/app/src/main/java/com/droiddeck/launcher/core/FexPreset.kt index f0c0feb3f5..6914bffa83 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/FexPreset.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/FexPreset.kt @@ -28,6 +28,12 @@ object FexPreset { fun byId(id: String): Preset = all.firstOrNull { it.id == id } ?: all[0] - /** Game-launch variables in KEY=VALUE form. */ fun env(id: String): List<String> = byId(id).env + + val environmentKeys: Set<String> by lazy { + all.flatMap { it.env }.mapTo(linkedSetOf()) { it.substringBefore('=') } + } + + fun environment(id: String): Map<String, String> = + env(id).associate { it.substringBefore('=') to it.substringAfter('=') } } diff --git a/app/src/main/java/com/droiddeck/launcher/core/FileUtils.java b/app/src/main/java/com/droiddeck/launcher/core/FileUtils.java index 8190e28778..4cbba0897a 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/FileUtils.java +++ b/app/src/main/java/com/droiddeck/launcher/core/FileUtils.java @@ -18,14 +18,12 @@ public final class FileUtils { private FileUtils() {} - /** Recursive delete that does not follow symlinks - a rootfs is full of them. */ public static void delete(File file) { if (file == null || !file.exists() && !isSymlink(file)) return; if (file.isDirectory() && !isSymlink(file)) { File[] children = file.listFiles(); if (children != null) for (File child : children) delete(child); } - //noinspection ResultOfMethodCallIgnored file.delete(); } @@ -37,7 +35,6 @@ public final class FileUtils { } } - /** Empties a directory without removing it. */ public static void clear(File dir) { if (dir == null || !dir.isDirectory()) return; File[] children = dir.listFiles(); @@ -47,7 +44,7 @@ public final class FileUtils { public static boolean writeString(File file, String content) { try { File parent = file.getParentFile(); - if (parent != null && !parent.isDirectory()) //noinspection ResultOfMethodCallIgnored + if (parent != null && !parent.isDirectory()) parent.mkdirs(); Files.write(file.toPath(), content.getBytes(StandardCharsets.UTF_8)); return true; @@ -81,10 +78,9 @@ public final class FileUtils { } } - /** Copies an asset out of the apk, creating the parent directory. */ public static boolean copyAsset(Context context, String assetPath, File destination) { File parent = destination.getParentFile(); - if (parent != null && !parent.isDirectory()) //noinspection ResultOfMethodCallIgnored + if (parent != null && !parent.isDirectory()) parent.mkdirs(); try (InputStream in = context.getAssets().open(assetPath); OutputStream out = new FileOutputStream(destination)) { diff --git a/app/src/main/java/com/droiddeck/launcher/core/GameEnvironment.kt b/app/src/main/java/com/droiddeck/launcher/core/GameEnvironment.kt index ffc9f772b8..c8341afc26 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/GameEnvironment.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/GameEnvironment.kt @@ -1,5 +1,7 @@ package com.droiddeck.launcher.core +import com.droiddeck.launcher.session.SessionPrefs + object GameEnvironment { data class Config( val shared: Map<String, String?> = emptyMap(), @@ -29,21 +31,88 @@ object GameEnvironment { "MESA_SHADER_CACHE_DISABLE" to "false", "VKD3D_FEATURE_LEVEL" to "12_2", "VKD3D_SHADER_MODEL" to "6_9", - // .NET 7 and later reserve 256 GB of address space for the GC heap at startup, more than an - // Android process has free, and the runtime fails to start. 32 GB is plenty for a game. - // Older NativeAOT runtimes require bare hex digits. CoreCLR accepts this form too. "DOTNET_GCRegionRange" to "800000000", - // .NET's W^X writes JIT code through a second mapping that FEX does not watch, so FEX keeps - // running the stale translation and the game hangs at startup. "DOTNET_EnableWriteXorExecute" to "0", ).apply { FexPreset.env(preset).forEach { put(it.substringBefore('='), it.substringAfter('=')) } - // Steam settings' Force SSBS: droiddeck-game-env preloads libssbs.so into the game's Wine. if (forceSsbs) put(FORCE_SSBS, "1") } const val FORCE_SSBS = "DROIDDECK_FORCE_SSBS" + const val NO_STEAM = "DROIDDECK_NO_STEAM" + + fun gameNoSteam(config: Config, scope: String): Boolean = + scope.isNotEmpty() && config.games[scope]?.get(NO_STEAM)?.lowercase() in setOf("1", "on", "true", "yes") + + fun withGameNoSteam(config: Config, scope: String, on: Boolean): Config { + require(scope.isNotEmpty() && validScope(scope)) + return withScopeValue(config, scope, NO_STEAM, if (on) "1" else null) + } + fun effective(config: Config, preset: String, scope: String, forceSsbs: Boolean = false): Map<String, String?> = defaults(preset, forceSsbs) + config.shared + if (scope.isEmpty()) emptyMap() else config.games[scope].orEmpty() + + fun hasOverride(config: Config, scope: String, name: String): Boolean = + scope.isNotEmpty() && config.entries(scope).containsKey(name) + + fun withScopeValue(config: Config, scope: String, name: String, value: String?): Config { + require(scope.isEmpty() || validScope(scope)) + val entries = config.entries(scope).toMutableMap() + if (value == null) entries.remove(name) else entries[name] = value + return config.withEntries(scope, entries) + } + + fun gameFexPreset(config: Config, scope: String): String? { + require(scope.isNotEmpty() && validScope(scope)) + val entries = config.games[scope].orEmpty() + if (FexPreset.environmentKeys.none(entries::containsKey)) return null + return FexPreset.all.firstOrNull { preset -> + val expected = FexPreset.environment(preset.id) + FexPreset.environmentKeys.all { key -> entries.containsKey(key) && entries[key] == expected[key] } + }?.id ?: CUSTOM_FEX_PRESET + } + + fun withGameFexPreset(config: Config, scope: String, preset: String?): Config { + require(scope.isNotEmpty() && validScope(scope)) + require(preset == null || FexPreset.all.any { it.id == preset }) + val entries = config.entries(scope).filterKeys { it !in FexPreset.environmentKeys }.toMutableMap() + if (preset != null) { + val values = FexPreset.environment(preset) + FexPreset.environmentKeys.forEach { key -> entries[key] = values[key] } + } + return config.withEntries(scope, entries) + } + + const val CUSTOM_FEX_PRESET = "__custom__" + + val syncBackends = listOf(SessionPrefs.SYNC_NTSYNC, SessionPrefs.SYNC_FSYNC, SessionPrefs.SYNC_ESYNC, SessionPrefs.SYNC_WINESERVER) + + val syncKeys = listOf("BL_SYNC", "BL_FSYNC_FIRST", "BL_SYNC_FALLBACK", "PROTON_NO_ESYNC", "PROTON_NO_FSYNC", "PROTON_NO_NTSYNC", "WINEESYNC") + + fun syncEnvironment(backend: String): Map<String, String> { + require(backend in syncBackends) { "unknown sync $backend" } + return buildMap { + put("BL_SYNC", if (backend == SessionPrefs.SYNC_NTSYNC) "1" else "0") + put("BL_FSYNC_FIRST", if (backend == SessionPrefs.SYNC_FSYNC) "1" else "0") + put("BL_SYNC_FALLBACK", if (backend == SessionPrefs.SYNC_WINESERVER) "0" else "1") + if (backend == SessionPrefs.SYNC_FSYNC) put("PROTON_NO_ESYNC", "1") + } + } + + fun gameSync(config: Config, scope: String): String? { + require(scope.isNotEmpty() && validScope(scope)) + val entries = config.games[scope].orEmpty().filterKeys { it in syncKeys } + if (entries.isEmpty()) return null + return syncBackends.firstOrNull { entries == syncEnvironment(it) } ?: CUSTOM_SYNC + } + + fun withGameSync(config: Config, scope: String, backend: String?): Config { + require(scope.isNotEmpty() && validScope(scope)) + val entries = config.entries(scope).filterKeys { it !in syncKeys }.toMutableMap() + if (backend != null) entries += syncEnvironment(backend) + return config.withEntries(scope, entries) + } + + const val CUSTOM_SYNC = "__custom__" } diff --git a/app/src/main/java/com/droiddeck/launcher/core/Hashes.kt b/app/src/main/java/com/droiddeck/launcher/core/Hashes.kt index 072874c876..0e4dce5001 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/Hashes.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/Hashes.kt @@ -3,7 +3,6 @@ package com.droiddeck.launcher.core import java.io.File import java.security.MessageDigest -/** File checksums as lowercase hex, and GitHub's release-asset digests, in one place. */ object Hashes { private val GITHUB_SHA256 = Regex("(?i)sha256:[0-9a-f]{64}") @@ -13,11 +12,9 @@ object Hashes { @JvmStatic fun sha512(file: File): String = hex(file, "SHA-512") - /** True when [digest] is GitHub's asset digest form, "sha256:" and 64 hex digits. */ @JvmStatic fun isGithubSha256(digest: String?): Boolean = digest != null && digest.matches(GITHUB_SHA256) - /** The hex of a GitHub asset digest ("sha256:<hex>"), or null when [digest] is not one. */ @JvmStatic fun githubSha256(digest: String?): String? = digest?.takeIf { isGithubSha256(it) }?.substringAfter(':') diff --git a/app/src/main/java/com/droiddeck/launcher/core/HostEnvironment.kt b/app/src/main/java/com/droiddeck/launcher/core/HostEnvironment.kt index f40c93f823..e9b06990e5 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/HostEnvironment.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/HostEnvironment.kt @@ -1,6 +1,5 @@ package com.droiddeck.launcher.core -/** The variables a host process is started with, in the order they were set. */ class HostEnvironment { private val entries = LinkedHashMap<String, String>() @@ -8,6 +7,5 @@ class HostEnvironment { entries[name] = value } - /** `NAME=VALUE` lines, the shape ProcessBuilder and proot take. */ fun asArray(): Array<String> = entries.map { (name, value) -> "$name=$value" }.toTypedArray() } diff --git a/app/src/main/java/com/droiddeck/launcher/core/HostProcess.kt b/app/src/main/java/com/droiddeck/launcher/core/HostProcess.kt index 550d55a529..4a8b12934e 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/HostProcess.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/HostProcess.kt @@ -4,27 +4,9 @@ import android.util.Log import java.io.File import java.util.function.Consumer -/** - * Starts a process on the Android side - proot, the audio daemon, logcat - and hands back its pid. - * - * The pid matters: stopping a session means killing that exact process (proot runs with - * --kill-on-exit, so the guest tree goes with it), and java.lang.Process does not expose it before - * API 33, so it is read from the implementation's private field. Output can be drained line by - * line to a callback; without one it goes to /dev/null, never to a pipe nobody reads, which would - * block the child the moment the pipe filled. - */ object HostProcess { private const val TAG = "HostProcess" - /** - * @param command the program and its arguments as one line; a backslash escapes a space, since - * paths under /data are full of them. - * @param env `NAME=VALUE` lines added to the app's own environment (proot needs nothing from - * the inherited set, and the guest starts with `env -i` anyway), or null. - * @param onExit told the exit status from a waiting thread, or null. - * @param onLine told each line of stdout and stderr, or null to discard both. - * @return the pid, or -1 when the process could not be started. - */ @JvmStatic fun start(command: String, env: Array<String>?, dir: File?, onExit: Consumer<Int>?, onLine: Consumer<String>?): Int { val argv = split(command) @@ -46,14 +28,13 @@ object HostProcess { try { process.inputStream.bufferedReader().useLines { lines -> lines.forEach { onLine.accept(it) } } } catch (e: Exception) { - // The process ended or the pipe closed; nothing more to read. } }, "proc-out-$pid").apply { priority = Thread.NORM_PRIORITY - 1; isDaemon = true; start() } } if (onExit != null) { Thread({ var status = -1 - try { status = process.waitFor() } catch (e: InterruptedException) { /* reported as -1 */ } + try { status = process.waitFor() } catch (e: InterruptedException) { } onExit.accept(status) }, "proc-wait-$pid").apply { priority = Thread.NORM_PRIORITY - 1; start() } } @@ -75,7 +56,6 @@ object HostProcess { -1 } - /** Splits a command line on spaces; a backslash keeps the space that follows it. */ @JvmStatic fun split(command: String): List<String> { val parts = ArrayList<String>() diff --git a/app/src/main/java/com/droiddeck/launcher/core/LogRedactor.kt b/app/src/main/java/com/droiddeck/launcher/core/LogRedactor.kt index 4406a7028b..d2128476ac 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/LogRedactor.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/LogRedactor.kt @@ -1,64 +1,28 @@ package com.droiddeck.launcher.core -/** - * Scrubs credentials out of a log line before it is written somewhere a user will share. - * - * The Steam client's own logs are the reason this exists: they carry the account's session token - * (logged as a bare number after "Using JWT"), machine-auth GUIDs, `token=`/`sessionid=` pairs, - * Steam Guard codes, 32-hex WebAPI keys and the account's SteamID. A session folder from this app - * is meant to be attached to a bug report as it is, so none of that may be in it. - * - * Ported from Bannerlator's {@code SteamLogRedactor} (GPL-3.0), which was written against real - * client logs; the account-name registration is left out because this app never learns it. - * - * What is deliberately KEPT, because it is what makes a log worth reading: EResult codes, CM host - * names and Valve's server addresses, timings, token expiry dates, app IDs, pids, connection-state - * changes and file paths. A SteamID is masked rather than deleted - first four and last four digits - * survive - so a reader can still tell two accounts' lines apart without the value identifying either. - * - * The device's OWN addresses are not kept: the client's IPv6 check logs "external address <ours>" - * about twenty times a session, and a public IPv6 address is the user's. [learnOwnAddresses] reads - * the link the session was given (etc/droiddeck-net) and every address on the same /64 - privacy - * addresses rotate inside it - or an own public IPv4 is replaced wherever it appears. Likewise every - * Steam account and persona name on the device ([learnAccounts]), for users who sign in with an - * account name rather than an email. - */ object LogRedactor { private val EMAIL = Regex("[A-Za-z0-9._%+\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,}") - /** "Using JWT 25484942796017334" - the client logs its session token as digits, not base64. */ private val JWT_LABELLED = Regex("(?i)(\\bJWT[\\s=:]+)(\\d{8,})") - /** A 3-part base64url JWT logged verbatim (a refresh or access token). */ private val JWT_BASE64 = Regex("ey[A-Za-z0-9_\\-]{6,}\\.[A-Za-z0-9_\\-]{6,}\\.[A-Za-z0-9_\\-]{6,}") - /** Machine-auth and other GUIDs. */ private val GUID = Regex("\\b[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\b") - /** - * key=value secrets. A bare `key` is excluded on purpose so "key=english" survives; a real - * WebAPI key is caught by [WEBAPI_KEY]. The value class excludes `<` and `>` so running this - * twice over an already-scrubbed line changes nothing. - */ private val SECRET_KV = Regex( "(?i)\\b(access[_-]?token|refresh[_-]?token|auth[_-]?token|authtoken|token|authcode|" + "auth[_-]?ticket|ticket|sessionid|steamloginsecure|webapikey|api[_-]?key|" + "machine[_-]?auth(?:[_-]?token)?|machineauth|password|passwd|pwd|secret)" + "(\\s*[=:]\\s*|=)([^\\s\"'<>&;,]{4,})" ) - /** A Steam Guard code, only where the text around it says that is what it is. */ private val GUARD_CODE = Regex( "(?i)((?:steam\\s*)?guard\\s*code[\\s:=]*|two[\\s-]?factor[\\s:=]*|2fa[\\s:=]*)([A-Za-z0-9]{5})" ) - /** Exactly 32 hex - a WebAPI key. Bounded so a 40-hex depot chunk id is left alone. */ private val WEBAPI_KEY = Regex("\\b[0-9A-Fa-f]{32}\\b") - /** A long opaque run after a sensitive word, for anything the rules above missed. */ private val RESIDUAL = Regex( "(?i)\\b(jwt|token|ticket|sessionid|steamloginsecure|machineauth)\\b[\\s=:]*([A-Za-z0-9+/=_\\-]{12,})" ) private val LONG_TOKEN = Regex("[A-Za-z0-9_\\-]{88,}") private val STEAMID64 = Regex("\\b(76561)(\\d{8})(\\d{4})\\b") private val STEAMID3 = Regex("\\[U:1:(\\d+)]") - /** "external address 2607:..." / "external IP: 203.0.113.9" - the client stating ours. */ private val EXTERNAL_ADDR = Regex("(?i)(external\\s+(?:ip\\s+)?address\\s*[:=]?\\s*|external\\s+ip\\s*[:=]?\\s*)([0-9A-Fa-f:.]{7,})") private val IPV4 = Regex("(?<![0-9.])(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})(?![0-9.])") - /** An IPv6 literal: "::" somewhere, or all eight groups (a clock's 10:03:05 is neither). */ private val IPV6 = Regex("(?<![0-9A-Za-z:])[0-9A-Fa-f]{0,4}(?::[0-9A-Fa-f]{0,4}){2,7}(?:%[A-Za-z0-9_.]+)?(?![0-9A-Za-z:])") private val MAC = Regex("(?i)(?<![0-9a-z:-])[0-9a-f]{2}([:-])(?:[0-9a-f]{2}\\1){4}[0-9a-f]{2}(?![0-9a-z:-])") private val MAC_FIELD = Regex( @@ -70,20 +34,9 @@ object LogRedactor { "[\"']?\\s*[:=]\\s*)(\"[^\"\\r\\n<>]+\"|'[^'\\r\\n<>]+'|[^\\s\"'<>&;,\\[\\]{}]+)" ) - /** - * The account a Steam UI login line names ("Login: OnLoginStateChange <account> 2 1 0 0"): a - * user who signs in with a plain account name, not an email, had it in every log. The single - * space then a non-space keeps "OnLoginStateChange 0 1 0 0" (no account yet) as it is. - */ private val LOGIN_STATE = Regex("(?i)(OnLoginStateChange:? )([^\\s<]\\S*)") private val LOGIN_USERS = Regex("(OnLoginUsersChanged )(\\S.*)$") - /** - * An account name as a field: `AccountName`, `account_name`, `username` (`"AccountName" - * "someone"` in a VDF, `account_name=...`, `"username": "..."`) and `login` - the last only - * as `login=`, a quoted key or a VDF pair, so "Login: OnLoginStateChange ..." keeps its label. - * A quoted value is blanked whole; one already blanked is left as it is. - */ private const val ACCOUNT_VALUE = "(\"[^\"<\\r\\n]+\"|'[^'<\\r\\n]+'|[^\\s\"'<>&;,}]+)" private val ACCOUNT_KV = Regex( "(?i)(?<![A-Za-z0-9_])(account[_-]?name|user[_-]?name|epicusername)" + @@ -93,49 +46,39 @@ object LogRedactor { "(?i)(?<![A-Za-z0-9_])(login)(\\s*=\\s*|[\"']\\s*[=:]\\s*|[\"']\\s+)" + ACCOUNT_VALUE ) - /** A learned pattern and the text (lowercase) a line must hold for it to match; null when none can be said. */ private class Learned(val regex: Regex, val needs: String?) - /** The device's Steam accounts and persona names as patterns (see [learnAccounts]). */ @Volatile private var accounts: List<Learned> = emptyList() - /** - * Learns every Steam account on the device from the client's loginusers.vdf - its AccountName - * and PersonaName - so they are replaced wherever a log mentions them, whoever the user is. - * Names under three characters are skipped: blanking every "a" would ruin a log. - */ - fun learnAccounts(loginUsers: java.io.File) { - val found = ArrayList<Learned>() - try { - if (loginUsers.isFile) { - val kv = Regex("\"(AccountName|PersonaName)\"\\s+\"([^\"]*)\"") - kv.findAll(loginUsers.readText()).map { it.groupValues[2].trim() }.filter { it.length >= 3 }.distinct().forEach { name -> - val needs = name.lowercase().takeIf { name.all { it.code < 0x80 } } - found += Learned(Regex("(?i)(?<![A-Za-z0-9_])" + Regex.escape(name) + "(?![A-Za-z0-9_])"), needs) - } - } - } catch (e: Exception) { - return + fun learnAccounts(vararg loginUsers: java.io.File) { + val names = LinkedHashSet<String>() + val kv = Regex("\"(AccountName|PersonaName)\"\\s+\"([^\"]*)\"") + var unread = false + for (file in loginUsers) { + if (!file.isFile) continue + val text = try { file.readText() } catch (e: Exception) { unread = true; continue } + kv.findAll(text).map { it.groupValues[2].trim() }.filter { it.length >= 3 }.forEach { names += it } } - accounts = found + val learned = names.map { name -> + val needs = name.lowercase().takeIf { name.all { it.code < 0x80 } } + Learned(Regex("(?i)(?<![A-Za-z0-9_])" + Regex.escape(name) + "(?![A-Za-z0-9_])"), needs) + } + // A file that could not be read keeps the names learned from it before. + accounts = if (unread) (accounts + learned).distinctBy { it.regex.pattern } else learned } - /** Everything the session's runtime can tell about whose logs these are: addresses and accounts. */ fun learnFromRuntime(root: java.io.File) { learnOwnAddresses(java.io.File(root, "etc/droiddeck-net")) - learnAccounts(java.io.File(root, "root/.local/share/Steam/config/loginusers.vdf")) + learnAccounts( + java.io.File(root, "root/.local/share/Steam/config/loginusers.vdf"), + java.io.File(root, "root/.droiddeck-x64/.local/share/Steam/config/loginusers.vdf"), + ) } - /** This device's public addresses as patterns (see [learnOwnAddresses]); empty until learned. */ @Volatile private var own: List<Learned> = emptyList() - /** - * Learns the device's addresses from the link file the app writes for the session - * (`addr <address> <prefix>` lines). Global IPv6 become their /64, public IPv4 stay exact; - * private, link-local and loopback addresses identify nobody and are left out. - */ fun learnOwnAddresses(linkFile: java.io.File) { val found = ArrayList<Learned>() try { @@ -144,7 +87,6 @@ object LogRedactor { when (kind(addr)) { "public IPv6" -> { val groups = expand6(addr)?.take(4) ?: return@forEachLine - // Any spelling of an address in this /64: leading zeros dropped, :: anywhere after. val prefix = groups.joinToString(":") { g -> "0{0,3}" + Regex.escape(g.trimStart('0').ifEmpty { "0" }) } found += Learned( Regex("(?i)(?<![0-9A-Fa-f:])$prefix(?::[0-9A-Fa-f]{0,4}){1,4}(?:%[A-Za-z0-9_.]+)?"), @@ -160,7 +102,6 @@ object LogRedactor { own = found } - /** "public IPv6", "private IPv4", "link-local IPv6", ... for an address literal; null if it is not one. */ fun kind(address: String): String? { val a = address.substringBefore('%') IPV4.matchEntire(a)?.let { m -> @@ -184,7 +125,6 @@ object LogRedactor { } } - /** The eight groups of an IPv6 literal, or null. */ private fun expand6(address: String): List<String>? { val a = address.substringBefore('%') if (!a.contains(':') || a.count { it == ':' } > 7 || a.contains(":::")) return null @@ -200,17 +140,12 @@ object LogRedactor { return parts.map { it.lowercase() } } - /** - * Every IP address in [text] replaced by what kind it is ("<public IPv6>"), for reports whose - * point is the shape of the network, not its numbers. - */ fun describeAddresses(text: String): String { var out = IPV6.replace(text) { m -> kind(m.value)?.let { "<$it>" } ?: m.value } out = IPV4.replace(out) { m -> kind(m.value)?.let { "<$it>" } ?: m.value } return out } - /** A file worth scrubbing: text (no NUL in its first 4 KB) and not huge. */ fun isText(file: java.io.File): Boolean = try { file.isFile && file.length() < 64L * 1024 * 1024 && file.inputStream().use { input -> val buf = ByteArray(4096) @@ -221,34 +156,16 @@ object LogRedactor { false } - /** - * Bump whenever a pattern is added or tightened. A session folder records the version it was - * scrubbed under (SessionArtifacts.SCRUBBED_TREE_MARKER), and a share copies a file as it is - * only when that matches, so a folder scrubbed under older rules is scrubbed again on the way - * out. - */ const val RULES_VERSION = 3 - /** - * A private IPv4 address (10/8, 172.16/12, 192.168/16, link-local 169.254/16): the home - * network's layout, e.g. its router as the resolver. Blanked in a shared zip only; public - * server addresses stay. Not part of a longer dotted number (a version like 10.0.19041.1). - */ private val LAN_IPV4 = Regex( "(?<![\\d.])(?:10\\.\\d{1,3}|192\\.168|172\\.(?:1[6-9]|2\\d|3[01])|169\\.254)\\.\\d{1,3}\\.\\d{1,3}(?!\\.?\\d)" ) - /** [src]'s lines, scrubbed, to [out]. */ fun scrubTo(src: java.io.File, out: java.io.Writer) { src.forEachLine { line -> out.write(redact(line)); out.write("\n") } } - /** - * The last pass for a file going into a shared zip: [redact], then the rules the stores' log - * uses too ([SecretScrub]) - URLs without query, fragment and user:password and with any - * token-bearing path segment blanked, token values and Authorization / Cookie headers blanked - * - and private IPv4 addresses as `<lan-address>`. A line already clean comes out unchanged. - */ fun redactForShare(line: String): String { if (line.isEmpty()) return line return try { @@ -259,23 +176,15 @@ object LogRedactor { } } - /** [src]'s lines through [redactForShare], to [out]: the pass every text file in a shared zip gets. */ fun scrubForShare(src: java.io.File, out: java.io.Writer) { src.forEachLine { line -> out.write(redactForShare(line)); out.write("\n") } } - /** `<redacted:account>`, inside [value]'s quotes when it had them. */ private fun quoted(value: String): String { val q = value.first().takeIf { it == '"' || it == '\'' }?.toString().orEmpty() return "$q<redacted:account>$q" } - /** - * A line on its way through [redact]. Each rule runs only on a line holding what it cannot match - * without - a word, enough separators, a long enough run: most of a Steam log is lines no rule - * touches, and a session's logs went through every rule at about a megabyte a second. A line with anything but ASCII in it goes through - * every case-insensitive rule, since Android's regex folds case more widely than lowercase(). - */ private class Line(var text: String) { private val unfolded = text.any { it.code >= 0x80 } private var lower: String? = null @@ -308,7 +217,6 @@ object LogRedactor { private fun isHex(c: Char) = c in '0'..'9' || c in 'a'..'f' || c in 'A'..'F' - /** [line] with every credential shape replaced. Null- and exception-safe by construction. */ fun redact(line: String): String { if (line.isEmpty()) return line return try { @@ -328,7 +236,6 @@ object LogRedactor { } if (out.has("guard", "factor", "2fa")) out.set(GUARD_CODE.replace(out.text) { "${it.groupValues[1]}<redacted:code>" }) if (out.hasRun(32, ::isHex)) out.set(WEBAPI_KEY.replace(out.text, "<redacted:key>")) - // Mask, not delete: the last four digits let a reader correlate lines to one account. if ("76561" in out.text) out.set(STEAMID64.replace(out.text) { "${it.groupValues[1]}********${it.groupValues[3]}" }) if ("[U:1:" in out.text) out.set(STEAMID3.replace(out.text) { m -> val id = m.groupValues[1] @@ -352,8 +259,6 @@ object LogRedactor { } out.text } catch (t: Throwable) { - // A log line is never worth crashing a session over, but an unscrubbed one must not - // reach the file either. "<redaction failed; line withheld>" } } diff --git a/app/src/main/java/com/droiddeck/launcher/core/NetworkReport.kt b/app/src/main/java/com/droiddeck/launcher/core/NetworkReport.kt index b8a0e5dae2..d06b5c5937 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/NetworkReport.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/NetworkReport.kt @@ -10,24 +10,11 @@ import java.io.File import java.net.Inet4Address import java.net.Inet6Address -/** - * `network.txt`: what the session was given to work with, for the reports that say "the client - * thinks WiFi is off" or "Firefox cannot resolve anything". - * - * The runtime's NetworkManager bridge reports Android's active link. Include whether the phone - * had a validated link and which DNS servers the app wrote into the runtime's `resolv.conf`. - * - * **No network names.** The SSID is identifying and is deliberately not collected; the transport - * type, the addresses' families and the DNS servers are what a diagnosis needs. - */ object NetworkReport { private const val TAG = "NetworkReport" fun write(context: Context, target: File) { try { - // Addresses as their kind ("<public IPv6>"), never the numbers: a public address is the - // user's, and this file goes into shared session logs. The session's made-up hardware - // address is stable per device (seeded from ANDROID_ID), so it is masked too. val text = LogRedactor.describeAddresses(build(context)) .replace(Regex("(?m)^(\\s*mac )\\S+"), "$1<masked>") target.writeText(text) @@ -82,8 +69,6 @@ object NetworkReport { append("\nWhat the runtime was given\n") append("--------------------------\n") - // The app writes this file from the live link at every change; it is what everything inside - // the session resolves with, so a mismatch with the system's list above is the bug itself. val resolv = File(LinuxRuntime.rootDir(context), "etc/resolv.conf") if (resolv.isFile) { append("etc/resolv.conf:\n") diff --git a/app/src/main/java/com/droiddeck/launcher/core/PhantomProcessLimit.kt b/app/src/main/java/com/droiddeck/launcher/core/PhantomProcessLimit.kt index 6a39746b7f..6ad5f89b64 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/PhantomProcessLimit.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/PhantomProcessLimit.kt @@ -5,7 +5,6 @@ import android.os.Build import android.provider.Settings import com.droiddeck.launcher.R -/** Android's phantom process monitor can kill the many child processes used by a Steam session. */ enum class PhantomProcessStatus { NOT_APPLICABLE, DISABLED, @@ -27,10 +26,12 @@ object PhantomProcessLimit { usesDeviceConfig(sdk) && enabled -> listOf( "device_config delete activity_manager max_phantom_processes", "device_config set_sync_disabled_for_tests none", + "settings put global $SETTING true", ) usesDeviceConfig(sdk) -> listOf( "device_config set_sync_disabled_for_tests persistent", "device_config put activity_manager max_phantom_processes $MAX_PHANTOM", + "settings put global $SETTING false", ) else -> listOf("settings put global $SETTING ${if (enabled) "true" else "false"}") } @@ -58,7 +59,12 @@ object PhantomProcessLimit { if (sdk < Build.VERSION_CODES.S) return PhantomProcessStatus.NOT_APPLICABLE if (usesDeviceConfig(sdk)) { val off = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).getBoolean(PREF_ANDROID_12_OFF, false) - return if (off) PhantomProcessStatus.DISABLED else PhantomProcessStatus.UNREADABLE + val global = try { + Settings.Global.getString(context.contentResolver, SETTING) + } catch (_: Exception) { + null + } + return android12Status(off, global, systemProperty(OVERRIDE_PROPERTY)) } val global = try { Settings.Global.getString(context.contentResolver, SETTING) @@ -68,12 +74,10 @@ object PhantomProcessLimit { return status(global, systemProperty(OVERRIDE_PROPERTY)) } - /** - * The value Android itself acts on, in FeatureFlagUtils.isEnabled's order: the global setting - * when it is set, otherwise the feature-flag override property. Developer options' "Disable - * child process restrictions" writes only the property, so a device switched off there has no - * global setting at all and must not be reported as unset. - */ + fun android12Status(rememberedOff: Boolean, global: String?, override: String?): PhantomProcessStatus = + if (rememberedOff || status(global, override) == PhantomProcessStatus.DISABLED) PhantomProcessStatus.DISABLED + else PhantomProcessStatus.UNREADABLE + fun status(global: String?, override: String?): PhantomProcessStatus { val value = global?.trim()?.lowercase()?.takeIf { it.isNotEmpty() } ?: override?.trim()?.lowercase()?.takeIf { it.isNotEmpty() } @@ -122,7 +126,6 @@ object PhantomProcessLimit { fun fixSentence(context: Context, sdk: Int = Build.VERSION.SDK_INT): String = context.getString(if (hasDeveloperToggle(sdk)) R.string.phantom_fix_toggle else R.string.phantom_fix_no_toggle) - /** English: for the device report. */ fun reportValue(status: PhantomProcessStatus): String = when (status) { PhantomProcessStatus.DISABLED -> "disabled (good - the OS will not kill the session's children)" PhantomProcessStatus.ENABLED -> "ENABLED (the OS may kill the session with no log; turn off Restrict child processes)" diff --git a/app/src/main/java/com/droiddeck/launcher/core/SecretScrub.kt b/app/src/main/java/com/droiddeck/launcher/core/SecretScrub.kt index c91ca60ef9..7ac3f18017 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/SecretScrub.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/SecretScrub.kt @@ -1,21 +1,5 @@ package com.droiddeck.launcher.core -/** - * The one set of rules that keeps URLs and tokens out of anything the app writes or shares: the - * stores' log ([com.droiddeck.launcher.stores.StoreLog.redactLine]) and the last pass over every - * text file in a shared log zip ([LogRedactor.redactForShare]). - * - * - Every URL loses its query, fragment and `user:password@`. [Urls.SHORT] then keeps only the host - * and a plain first path segment (the stores' lines, where a GOG secure link carries its token in - * the path); [Urls.KEEP_PATH] keeps the path but blanks any segment that carries a token. - * - Outside URLs, the values of token-like keys (`token`, `__token__`, `f_token`, `hdnts`, access / - * refresh / id tokens; exchange and authorization codes of four characters or more, and a bare - * `code=` where it is one: in a query string or on a line with OAuth keys such as `client_id`, - * `redirect_uri` or `state`, never an 8-hex exception code like Proton's `code=c0000005`) and of - * Authorization / Cookie headers are blanked with [mark]. - * - * A line already scrubbed comes out unchanged. - */ object SecretScrub { enum class Urls { SHORT, KEEP_PATH } @@ -23,12 +7,9 @@ object SecretScrub { private val SAFE_SEGMENT = Regex("""[A-Za-z0-9._\-]{1,40}""") private val TOKEN_SEGMENT = Regex("""(?i)(token|hdnts|hmac|signature|sig|exp)=""") private val TOKEN = Regex("""(?i)(?<![A-Za-z0-9_])(__token__|f_token|hdnts|access_token|refresh_token|id_token|token)(["']?\s*[=:]\s*["']?)[^\s&;,"'<>}]+""") - /** Codes that are only ever OAuth grants. */ private val GRANT_CODE = Regex("""(?i)(?<![A-Za-z0-9_])(exchange_code|authorization_?code)(["']?\s*=\s*["']?)[^\s&;,"'<>}]{4,}""") - /** A bare `code=`: a grant only right after `?` / `&` (a query string) or beside OAuth keys ([OAUTH_CONTEXT]). */ private val CODE = Regex("""(?i)(?<![A-Za-z0-9_])(code)(["']?\s*=\s*["']?)([^\s&;,"'<>}]{4,})""") private val OAUTH_CONTEXT = Regex("""(?i)(?<![A-Za-z0-9_])(client_id|client_secret|redirect_uri|state|grant_type|response_type|access_token|refresh_token|id_token)["']?\s*[=:]""") - /** A Windows exception or status code (`code=c0000005`, `code=0x80000003`): never a grant. */ private val STATUS_CODE = Regex("""(?i)(0x)?[0-9a-f]{8}""") private val HEADER = Regex("""(?i)\b(authorization|cookie|set-cookie)(\s*[:=]\s*).+""") diff --git a/app/src/main/java/com/droiddeck/launcher/core/SessionLogCapture.kt b/app/src/main/java/com/droiddeck/launcher/core/SessionLogCapture.kt index 67b924ec28..9ba5c2f6ff 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/SessionLogCapture.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/SessionLogCapture.kt @@ -4,33 +4,16 @@ import android.os.Process import android.util.Log import java.io.BufferedWriter import java.io.File +import java.io.FileOutputStream -/** - * `app.log`: what the app itself said while the session ran, and `crash.log`: what Android's crash - * buffer holds if something died hard. - * - * Everything this app decides is reported through `Log` - which driver was chosen and why, the - * audio line, a rival client being stopped, the session's exit status, a helper that was missing. - * None of it reaches a user's folder, so a report used to arrive with the settings visible in - * `device.txt` and no record of what actually happened. An app may always read back its own log - * entries, so the simplest complete answer is to run `logcat` filtered to our own pid and keep - * what it says. - * - * `logcat -b crash` earns its own file: proot once died before `main` over a missing library, and - * that appeared in the crash buffer and *nowhere else* - not in the session log, not in the main - * buffer. It is the first thing to read when a session "exits instantly". - * - * Both are best-effort. Where a ROM refuses to hand an app its own entries the files are written - * with a line saying so, which is better than their absence looking like silence. - */ object SessionLogCapture { private const val TAG = "SessionLogCapture" private var pid = -1 private var writer: BufferedWriter? = null private var target: File? = null + private var syncer: Thread? = null - /** Start mirroring this process's log lines into [target]. Safe to call twice. */ @Synchronized fun start(target: File) { stop() @@ -41,8 +24,6 @@ object SessionLogCapture { out.flush() writer = out this.target = target - // -T 1 starts at the newest line rather than replaying the whole buffer; -v threadtime - // keeps the timestamps and thread ids that make two logs line up. pid = HostProcess.start( "/system/bin/logcat -v threadtime -T 1 --pid=" + Process.myPid(), null, target.parentFile, null, @@ -51,7 +32,6 @@ object SessionLogCapture { try { writer?.apply { write(line); newLine(); flush() } } catch (e: Exception) { - // A full or unmounted card must not take the session with it. } } } @@ -59,21 +39,32 @@ object SessionLogCapture { out.write("logcat could not be started; this ROM may not hand an app its own entries.\n") out.flush() } + target.parentFile?.let { syncer = startSyncing(it) } Log.i(TAG, "app log -> $target (logcat pid $pid)") } catch (e: Exception) { Log.w(TAG, "could not start the app log", e) } } - /** Stops the capture only if it is the one writing into [dir]: a newer session's is left alone. */ @Synchronized fun stopFor(dir: File) { val t = target ?: return if (t.parentFile?.absolutePath == dir.absolutePath) stop() } + /** flush() only reaches the page cache, and a hard reset on f2fs lost the last minutes of every + * log. Every 2 s the session folder's files (ours and the native parts') are synced to storage. */ + private fun startSyncing(dir: File): Thread = Thread({ + while (true) { + try { Thread.sleep(2000) } catch (e: InterruptedException) { break } + dir.listFiles()?.forEach { runCatching { FileOutputStream(it, true).use { s -> s.fd.sync() } } } + } + }, "session-log-sync").apply { isDaemon = true; start() } + @Synchronized fun stop() { + syncer?.interrupt() + syncer = null target = null if (pid != -1) { try { @@ -86,23 +77,14 @@ object SessionLogCapture { try { writer?.close() } catch (e: Exception) { - // nothing useful to do with a failure to close a log } writer = null } - /** - * Dump Android's crash buffer into [target]. Called at teardown: a session that was killed is - * exactly when this matters, and the buffer keeps its entries after the process is gone. - */ fun dumpCrashBuffer(target: File) { try { val lines = StringBuilder() val done = java.util.concurrent.CountDownLatch(1) - // Wait on the process ENDING, not on the first line arriving: the lines come through a - // callback on another thread, so a poll for "is it empty yet" declared an empty buffer - // every time and still cost the wait. exec() returns a pid, never an exit status - the - // first version printed that pid as "rc", which was nonsense in the file. val pid = HostProcess.start( "/system/bin/logcat -b crash -d -v threadtime -t 400", null, target.parentFile, { done.countDown() }, diff --git a/app/src/main/java/com/droiddeck/launcher/core/SessionPart.java b/app/src/main/java/com/droiddeck/launcher/core/SessionPart.java index 86f4380aa9..bb5d132140 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/SessionPart.java +++ b/app/src/main/java/com/droiddeck/launcher/core/SessionPart.java @@ -2,12 +2,6 @@ package com.droiddeck.launcher.core; import android.content.Context; -/** - * One thing a running session depends on beside the guest process itself: the audio daemon, the - * rumble listener, the battery the client reads, the network-link file. The session starts its - * parts in order before the guest and stops them in reverse after it. A part is handed the - * application context, never an activity's, so nothing here can keep a screen alive. - */ public abstract class SessionPart { private Context app; @@ -15,7 +9,6 @@ public abstract class SessionPart { this.app = context.getApplicationContext(); } - /** The application context, valid after {@link #attach}. */ protected final Context app() { return app; } diff --git a/app/src/main/java/com/droiddeck/launcher/core/TarZst.java b/app/src/main/java/com/droiddeck/launcher/core/TarZst.java index 0a1110f233..c00030c018 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/TarZst.java +++ b/app/src/main/java/com/droiddeck/launcher/core/TarZst.java @@ -13,11 +13,6 @@ import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; -/** - * The small zstd tarballs that ship inside the apk (the Turnip driver, the PulseAudio modules). - * The runtime rootfs is not one of these - it needs hard links and symlinks preserved, which - * {@link com.droiddeck.launcher.runtime.LinuxRuntimeInstaller} handles itself. - */ public final class TarZst { private static final String TAG = "TarZst"; @@ -33,7 +28,6 @@ public final class TarZst { } public static boolean extract(InputStream source, File destination) { - //noinspection ResultOfMethodCallIgnored destination.mkdirs(); try (InputStream in = new ZstdCompressorInputStream(new BufferedInputStream(source, 1 << 16)); TarArchiveInputStream tar = new TarArchiveInputStream(in)) { @@ -42,15 +36,13 @@ public final class TarZst { File file = ArchivePaths.inside(destination, entry.getName()); if (file == null) continue; if (entry.isDirectory()) { - //noinspection ResultOfMethodCallIgnored file.mkdirs(); continue; } File parent = file.getParentFile(); - if (parent != null && !parent.isDirectory()) //noinspection ResultOfMethodCallIgnored + if (parent != null && !parent.isDirectory()) parent.mkdirs(); if (entry.isSymbolicLink()) { - //noinspection ResultOfMethodCallIgnored file.delete(); FileUtils.symlink(entry.getLinkName(), file.getAbsolutePath()); continue; @@ -59,7 +51,7 @@ public final class TarZst { try (OutputStream out = new FileOutputStream(file)) { FileUtils.copy(tar, out); } - if ((entry.getMode() & 0111) != 0) //noinspection ResultOfMethodCallIgnored + if ((entry.getMode() & 0111) != 0) file.setExecutable(true, false); } return true; diff --git a/app/src/main/java/com/droiddeck/launcher/core/TextureFiltering.kt b/app/src/main/java/com/droiddeck/launcher/core/TextureFiltering.kt index 97c07289f2..66be28cb4f 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/TextureFiltering.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/TextureFiltering.kt @@ -5,29 +5,15 @@ import kotlin.math.ln import kotlin.math.max import kotlin.math.min -/** - * Texture filtering for DirectX 9-11 games, as DXVK configuration options - * (d3d9/d3d11.samplerAnisotropy and samplerLodBias). VKD3D-Proton and WineD3D do not read them. - * Published into the game environment and read by DXVK when a game starts, so a change lands on - * the next launch, not the running game. - */ object TextureFiltering { - /** 0 = the game's own filtering; otherwise that anisotropy on every linearly filtered sampler. */ val ANISOTROPY = listOf(0, 2, 4, 8, 16) - /** Negative mip LOD bias added to the game's own: sharper textures at the cost of some shimmer. */ const val LOD_BIAS_OFF = "0" - /** Derived from how far the session is enlarged to the panel (see [autoLodBias]). */ const val LOD_BIAS_AUTO = "auto" val LOD_BIAS = listOf(LOD_BIAS_OFF, LOD_BIAS_AUTO, "-0.25", "-0.5", "-0.75", "-1.0") private const val LOD_BIAS_MIN = -2f - /** - * The mip LOD bias for a picture enlarged by [scale] (panel size over session size, long side - * to long side): -log2(scale), AMD's FSR 1 guidance (a 1.5x enlargement - 720p on a 1080p - * panel - gives -0.58). 0 when the session is not enlarged or the scale is unknown. - */ fun autoLodBias(scale: Float): Float { if (scale.isNaN() || scale <= 1f) return 0f return max((-ln(scale.toDouble()) / ln(2.0)).toFloat(), LOD_BIAS_MIN) @@ -39,7 +25,6 @@ object TextureFiltering { else -> choice.toFloatOrNull()?.let { max(min(it, 0f), LOD_BIAS_MIN) } ?: 0f } - /** The DXVK_CONFIG options for the two settings, "" when both are left to the game. */ fun dxvkOptions(anisotropy: Int, lodBiasChoice: String, autoBias: Float): String { val parts = ArrayList<String>(4) val aniso = if (anisotropy in ANISOTROPY) anisotropy else 0 @@ -49,7 +34,6 @@ object TextureFiltering { } val bias = lodBias(lodBiasChoice, autoBias) if (bias < 0f) { - // Locale.US: DXVK parses "-0.58", never "-0,58". val b = String.format(Locale.US, "%.2f", bias) parts += "d3d9.samplerLodBias = $b" parts += "d3d11.samplerLodBias = $b" diff --git a/app/src/main/java/com/droiddeck/launcher/core/WifiDiscovery.kt b/app/src/main/java/com/droiddeck/launcher/core/WifiDiscovery.kt index 40a6721dc5..66cc77f91f 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/WifiDiscovery.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/WifiDiscovery.kt @@ -7,11 +7,9 @@ import android.location.LocationManager import android.os.Build import com.droiddeck.launcher.session.SessionPrefs -/** Location is used only for Android's Wi-Fi names and scan results, never coordinates. */ object WifiDiscovery { val permissions = arrayOf(Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION) - // targetSdk 28 accepts either grant for Wi-Fi scanning. fun permissionGranted(context: Context): Boolean = permissions.any { context.checkSelfPermission(it) == PackageManager.PERMISSION_GRANTED } diff --git a/app/src/main/java/com/droiddeck/launcher/core/WirelessAdbFix.kt b/app/src/main/java/com/droiddeck/launcher/core/WirelessAdbFix.kt index 573aea35ac..e3f432e184 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/WirelessAdbFix.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/WirelessAdbFix.kt @@ -16,7 +16,6 @@ import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicInteger import java.util.ArrayDeque -/** A narrowly scoped Wireless debugging client for the child-process setting repair. */ object WirelessAdbFix { private const val CERT_FILE = "wireless-adb-cert.pem" private const val KEY_FILE = "wireless-adb-key.pem" @@ -66,7 +65,6 @@ object WirelessAdbFix { return SavedConnection(host, port) } - /** A saved pairing skips the PIN; an unknown connection port can be filled in from Settings. */ fun savedConnectionAddress(context: Context): String? = savedConnection(context)?.let { saved -> val host = if (':' in saved.host) "[${saved.host}]" else saved.host "$host:${saved.port ?: ""}" @@ -80,7 +78,6 @@ object WirelessAdbFix { ) } - /** Finds this paired device's separate TLS connection port from Android's ADB mDNS record. */ fun isLocalAddress(address: InetAddress): Boolean = runCatching { if (address.isLoopbackAddress) return true NetworkInterface.getNetworkInterfaces()?.toList().orEmpty().any { network -> @@ -184,7 +181,6 @@ object WirelessAdbFix { saveConnection(context, host, port) } - /** Tries the app's saved pairing without asking for a new pairing code. */ fun setUsingSavedPairing(context: Context, enabled: Boolean) { val appContext = context.applicationContext val saved = savedConnection(appContext) diff --git a/app/src/main/java/com/droiddeck/launcher/core/ZramSupport.kt b/app/src/main/java/com/droiddeck/launcher/core/ZramSupport.kt new file mode 100644 index 0000000000..51c3b24948 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/core/ZramSupport.kt @@ -0,0 +1,34 @@ +package com.droiddeck.launcher.core + +import android.app.ActivityManager +import android.content.Context +import android.os.Build +import java.io.File + +object ZramSupport { + private const val GIB = 1L shl 30 + + fun supported(): Boolean = kernelAtLeast(System.getProperty("os.version").orEmpty(), 5, 4) && swapTotalKb() > 0 + + fun recommended(context: Context): Boolean { + if (!supported()) return false + val memory = ActivityManager.MemoryInfo() + context.getSystemService(ActivityManager::class.java).getMemoryInfo(memory) + val advertised = if (Build.VERSION.SDK_INT >= 34) memory.advertisedMem else 0L + return belowTwelveGb(advertised, memory.totalMem) + } + + fun belowTwelveGb(advertisedBytes: Long, totalBytes: Long): Boolean = + if (advertisedBytes > 0) advertisedBytes < 11 * GIB else totalBytes < 10 * GIB + + fun kernelAtLeast(release: String, major: Int, minor: Int): Boolean { + val parts = Regex("^(\\d+)\\.(\\d+)").find(release)?.groupValues ?: return false + val ma = parts[1].toInt() + val mi = parts[2].toInt() + return ma > major || (ma == major && mi >= minor) + } + + fun swapTotalKb(meminfo: List<String> = runCatching { File("/proc/meminfo").readLines() }.getOrDefault(emptyList())): Long = + meminfo.firstOrNull { it.startsWith("SwapTotal:") } + ?.substringAfter(':')?.trim()?.substringBefore(' ')?.toLongOrNull() ?: 0L +} diff --git a/app/src/main/java/com/droiddeck/launcher/files/AppFilesProvider.kt b/app/src/main/java/com/droiddeck/launcher/files/AppFilesProvider.kt index c5bbef88e7..0f794ce0dd 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/AppFilesProvider.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/AppFilesProvider.kt @@ -23,15 +23,6 @@ import java.nio.file.Path import java.nio.file.SimpleFileVisitor import java.nio.file.attribute.BasicFileAttributes -/** - * The app's own data folder (the Linux runtime, settings, logs) in Android's file picker, under the - * app's name beside the phone's storage - what MT Manager's "documents provider" injection does, as - * part of the app. Only the system's documents UI can bind it (MANAGE_DOCUMENTS); another app sees - * a file only when the user picks it there. - * - * A document id is the file's absolute path, and nothing outside the data folder is ever handed out - * or accepted: every id is resolved and checked to lie inside it. - */ class AppFilesProvider : DocumentsProvider() { private lateinit var base: File private lateinit var baseCanonical: String @@ -65,8 +56,6 @@ class AppFilesProvider : DocumentsProvider() { override fun queryChildDocuments(parentDocumentId: String, projection: Array<String>?, sortOrder: String?): Cursor { val result = MatrixCursor(projection ?: DOCUMENT_COLUMNS) - // A link in the runtime that leads out of the data folder (/etc/localtime and the like) is - // left out rather than listed as something that cannot be opened. fileFor(parentDocumentId).listFiles()?.filter { inside(it) }?.forEach { addRow(result, it) } return result } @@ -104,10 +93,6 @@ class AppFilesProvider : DocumentsProvider() { } } - /** - * Deletes a file or a folder and what is in it without ever following a link: the runtime holds - * links to places outside it, and deleting a folder must remove the link, not what it points at. - */ private fun deleteTree(root: Path) { if (!Files.isDirectory(root, LinkOption.NOFOLLOW_LINKS)) { Files.delete(root) @@ -158,7 +143,6 @@ class AppFilesProvider : DocumentsProvider() { val needle = query.lowercase() val pending = ArrayDeque(listOf(base)) var visited = 0 - // The runtime is tens of thousands of files: a bounded walk, not the whole tree. while (pending.isNotEmpty() && result.count < 50 && visited++ < 20000) { val f = pending.removeFirst() if (!inside(f)) continue @@ -168,7 +152,6 @@ class AppFilesProvider : DocumentsProvider() { return result } - /** The file an id names, when it exists and lies inside the data folder (links followed). */ private fun fileFor(documentId: String): File { val f = File(documentId) if (!f.isAbsolute || !inside(f)) throw FileNotFoundException("$documentId is outside the app's files") @@ -177,7 +160,6 @@ class AppFilesProvider : DocumentsProvider() { } private fun inside(f: File): Boolean { - // The folder's own entries are listed as they are; a link is judged by where it leads. val abs = f.absoluteFile.normalize().path if (abs != base.absolutePath && !abs.startsWith(base.absolutePath + "/")) return false val real = runCatching { f.canonicalPath }.getOrNull() ?: return false @@ -225,11 +207,6 @@ class AppFilesProvider : DocumentsProvider() { Document.COLUMN_LAST_MODIFIED, Document.COLUMN_FLAGS, Document.COLUMN_SIZE, ) - /** - * The name in the picker. The same app ships under other package names (for the performance - * modes some phones give only named apps); each says which it is, so four installs are not - * four identical "DroidDeck" entries. - */ fun titleFor(context: Context): String { val name = context.getString(R.string.app_name) return when (context.packageName) { diff --git a/app/src/main/java/com/droiddeck/launcher/files/CollapsibleRail.kt b/app/src/main/java/com/droiddeck/launcher/files/CollapsibleRail.kt index 30ae1537b7..665d063fd5 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/CollapsibleRail.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/CollapsibleRail.kt @@ -49,38 +49,26 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -/** One tappable entry in a [CollapsibleRail] (a container tab, a file-manager location, …). */ data class RailItem( val label: String, val icon: ImageVector, val selected: Boolean, - /** >0 shows a small accent count badge on the item's icon (expanded and collapsed). */ val badge: Int = 0, - /** The under-icon label when the rail is collapsed, for names too long to fit; null derives one. */ val shortLabel: String? = null, - // onClick stays LAST so existing call sites can pass it as a trailing lambda; badge is an - // optional named param before it (default 0). val onClick: () -> Unit, ) -/** A group of [RailItem]s under an optional small section header (STORAGE / QUICK / FAVORITES …). */ data class RailSection(val header: String?, val items: List<RailItem>) -/** - * The tiny under-icon label for a COLLAPSED rail item. The rail width never changes, so labels must - * fit the narrow (~58dp) column: multi-word names wrap to a second line; single words too long to - * fit are abbreviated; short ones pass through. (Explicit abbreviations first, then a length guard.) - */ private fun collapsedLabel(label: String): String { when (label) { - "ENVIROMENT" -> return "ENVIRON" // the app's existing (mis)spelling, kept uppercase + "ENVIROMENT" -> return "ENVIRON" "WIN COMPONENTS" -> return "WIN COMP" } - if (label.contains(' ')) return label // multi-word → wraps to 2 lines + if (label.contains(' ')) return label return if (label.length > 9) label.take(8) + "…" else label } -/** A rail item's 20dp icon, with a small accent count badge on its corner when [badge] > 0. */ @Composable private fun RailItemIcon(item: RailItem, tint: androidx.compose.ui.graphics.Color) { if (item.badge > 0) { @@ -99,21 +87,10 @@ private fun RailItemIcon(item: RailItem, tint: androidx.compose.ui.graphics.Colo } } -/** A secondary link shown under the header (e.g. "What is all this?", "Reset to app defaults"). */ data class RailLink(val label: String, val icon: ImageVector, val onClick: () -> Unit) -/** - * State for a [CollapsibleRail], with the app-wide unified rule: - * - PORTRAIT → always collapsed (icon-only), the toggle is HIDDEN and it can never expand. - * - LANDSCAPE → expanded by default; the user's collapse choice is remembered PER-SCREEN - * ([screenKey]) and is NOT overridden by rotation. portrait→landscape restores that choice. - * - * Backed by rememberSaveable (survives process death) and by the fact the app UI activity keeps - * orientation in configChanges (no recreate) so the selected item / fields / scroll are preserved. - */ class RailState internal constructor( val collapsed: Boolean, - /** True in portrait: the rail is locked collapsed and must not show an expand toggle. */ val portraitLocked: Boolean, val onToggle: () -> Unit, ) @@ -121,15 +98,12 @@ class RailState internal constructor( @Composable fun rememberRailState(screenKey: String): RailState { val context = LocalContext.current - // The same file the File Manager keeps its own browse settings in (no androidx.preference here). val prefs = remember { context.getSharedPreferences("file_manager", android.content.Context.MODE_PRIVATE) } val isLandscape = LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE val choseKey = "rail_${screenKey}_userChose" val collapsedKey = "rail_${screenKey}_collapsed" - // Keep the landscape choice in saveable state regardless of orientation so portrait→landscape - // restores it. In portrait we simply report collapsed+locked and ignore it. var userChose by rememberSaveable(screenKey) { mutableStateOf(prefs.getBoolean(choseKey, false)) } var landscapeCollapsed by rememberSaveable(screenKey) { mutableStateOf(if (prefs.getBoolean(choseKey, false)) prefs.getBoolean(collapsedKey, false) else false) @@ -152,16 +126,6 @@ fun rememberRailState(screenKey: String): RailState { ) } -/** - * The shared collapsible left rail (mockup "Option 3"): app glyph + title, optional links, and the - * navigation items, replacing a top tab bar so content runs full height beside it. Width animates - * 190dp ↔ 58dp. When collapsed it is icon-only (the caller surfaces the active item's name over the - * content). Used by the container editors, File Manager and Save Manager. - * - * [footer] is an optional slot pinned to the bottom of the rail (a weighted spacer pushes it down), - * for a persistent per-screen summary (e.g. the Save Manager's "N games need syncing" line). The - * caller renders whatever it wants there and can key it off [RailState.collapsed] to go icon-only. - */ @Composable fun CollapsibleRail( state: RailState, @@ -170,12 +134,7 @@ fun CollapsibleRail( modifier: Modifier = Modifier, links: List<RailLink> = emptyList(), footer: (@Composable ColumnScope.() -> Unit)? = null, - // Optional header glyph (a themed drawable). When null the rail shows its plain solid square. - // Used by the container editors to show the wine-glass container icon; other rails leave it null. @DrawableRes headerIcon: Int? = null, - // When true each item gets a rounded outlined-button look (the selected one takes the accent - // border + accent-dim fill), matching the File Manager's "New Folder" button. Off by default so - // the container/save rails keep their lighter flat rows (5 stacked outlined tabs read too heavy). outlinedItems: Boolean = false, ) { val collapsed = state.collapsed @@ -187,7 +146,6 @@ fun CollapsibleRail( .fillMaxHeight() .background(MaterialTheme.colorScheme.surfaceContainerHigh) ) { - // ── Header: app glyph + title + collapse handle (handle hidden when portrait-locked) ── Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = if (collapsed) Arrangement.Center else Arrangement.Start, @@ -228,14 +186,12 @@ fun CollapsibleRail( } } } - // Collapsed (landscape only) → an expand handle; portrait is locked with no handle. if (collapsed && !state.portraitLocked) { IconButton(onClick = state.onToggle, modifier = Modifier.fillMaxWidth().height(24.dp)) { Text("››", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 15.sp) } } - // ── Links ── if (links.isNotEmpty()) { if (collapsed) { Row(horizontalArrangement = Arrangement.Center, modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp)) { @@ -258,8 +214,6 @@ fun CollapsibleRail( HorizontalDivider(color = MaterialTheme.colorScheme.outline.copy(alpha = 0.4f)) - // ── Sections + items (SCROLLABLE so a tall rail - e.g. many File Manager favourites - is - // fully reachable in both orientations; the header above and footer below stay pinned) ── Column( modifier = Modifier .weight(1f) @@ -283,8 +237,6 @@ fun CollapsibleRail( } section.items.forEach { item -> val active = item.selected - // Outlined variant: each item is a rounded outlined button; selected = accent border + - // accent-dim fill. Flat variant (default): a simple accent-tinted highlight for selected. val shape = RoundedCornerShape(9.dp) val base = Modifier.fillMaxWidth() val styled = if (outlinedItems) { @@ -308,9 +260,6 @@ fun CollapsibleRail( val iconTint = if (active) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurfaceVariant val labelColor = if (active) MaterialTheme.colorScheme.onSurface else MaterialTheme.colorScheme.onSurfaceVariant if (collapsed) { - // Icon-only width is unchanged - a TINY label goes UNDER the icon (2 lines max, - // centre-aligned, wrapping/abbreviated) so every button stays identifiable without - // widening the rail. Column( horizontalAlignment = Alignment.CenterHorizontally, modifier = styled, @@ -350,9 +299,8 @@ fun CollapsibleRail( } } - } // end scrollable section list (its weight fills the gap so the footer stays pinned) + } - // ── Optional pinned footer (e.g. the sync summary) ── if (footer != null) { HorizontalDivider(color = MaterialTheme.colorScheme.outline.copy(alpha = 0.25f)) footer() @@ -360,16 +308,6 @@ fun CollapsibleRail( } } -/** - * Portrait counterpart to [CollapsibleRail]: the same navigation [items] laid out as a horizontal - * icon-over-label bar pinned across the top, with an accent underline under the selected one. Mirrors - * the container editor's top tab bar so every editor reads the same - pin this in portrait wherever a - * [CollapsibleRail] is used in landscape. Optional [links] (Help / Reset …) are appended after a - * faint separator, exactly like the rail's links. - * - * (The container editor still carries its own private copy of this bar; new screens should prefer - * this shared one, and the container editor can migrate to it later.) - */ @Composable fun RailTopTabs( items: List<RailItem>, @@ -391,7 +329,6 @@ fun RailTopTabs( ) } if (links.isNotEmpty()) { - // Faint separator: everything past here is an action button, not a tab. Box( modifier = Modifier .padding(horizontal = 2.dp) @@ -408,8 +345,6 @@ fun RailTopTabs( } } -/** One cell of [RailTopTabs] - icon over a small label, with an accent underline (zero-width when - * unselected, so every cell keeps the same height). Mirrors the container editor's TopCell. */ @Composable private fun TopTabCell( icon: ImageVector, diff --git a/app/src/main/java/com/droiddeck/launcher/files/FavoritesStore.kt b/app/src/main/java/com/droiddeck/launcher/files/FavoritesStore.kt index de38b7a4f7..8255b561bc 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/FavoritesStore.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/FavoritesStore.kt @@ -3,15 +3,6 @@ package com.droiddeck.launcher.files import android.content.Context import org.json.JSONArray -/** - * Persists the File Manager's favourite / bookmarked directories. - * - * Stores an ordered (insertion-order) list of absolute path strings as a JSON array - * under "file_manager_favorites" in SharedPreferences "file_manager_prefs". Only the - * absolute path is kept - everything shown on a favourite card (drive label, container - * name, display path) is derived live, so a renamed or deleted container resolves - * correctly for free. - */ object FavoritesStore { private const val PREFS_NAME = "file_manager_prefs" @@ -20,7 +11,6 @@ object FavoritesStore { private fun prefs(context: Context) = context.applicationContext.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE) - /** Ordered list of favourited absolute paths (insertion order). */ fun list(context: Context): List<String> { val raw = prefs(context).getString(KEY, null) ?: return emptyList() return runCatching { @@ -31,7 +21,6 @@ object FavoritesStore { fun isFavorite(context: Context, path: String): Boolean = list(context).contains(path) - /** Add [path] if not already present (deduped); keeps insertion order. */ fun add(context: Context, path: String) { val current = list(context) if (current.contains(path)) return @@ -44,7 +33,6 @@ object FavoritesStore { save(context, current.filterNot { it == path }) } - /** Toggle [path]; returns true if it is now a favourite, false if it was removed. */ fun toggle(context: Context, path: String): Boolean = if (isFavorite(context, path)) { remove(context, path); false diff --git a/app/src/main/java/com/droiddeck/launcher/files/FileAttributes.kt b/app/src/main/java/com/droiddeck/launcher/files/FileAttributes.kt index 60c359bf4b..43fc55d718 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/FileAttributes.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/FileAttributes.kt @@ -4,30 +4,18 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.setValue import java.io.File -// Reading and setting a file's read-only and hidden attributes (the DOS attribute xattr). -// ── DOS file attributes (Read-only / Hidden) ── -// The in-container file manager (wfm.exe) exposes these in its Properties dialog; this mirrors the -// same two toggles for files browsed from the app side. No root - we only touch permission bits the -// app owns (container files) and the Wine DOS-attribute xattr. -// FILE_ATTRIBUTE_HIDDEN, as Wine encodes it in the user.DOSATTRIB extended attribute. private const val FILE_ATTRIBUTE_HIDDEN = 0x2 private const val DOSATTRIB_XATTR = "user.DOSATTRIB" -// Snapshot of a file's two toggleable attributes. hiddenSupported is false when the underlying -// filesystem can't store the DOSATTRIB xattr (the FUSE /storage volumes) - the Hidden toggle is then -// disabled while Read-only keeps working. internal data class FileAttrState( val readOnly: Boolean, val hidden: Boolean, val hiddenSupported: Boolean, ) -// Wine (and Samba) store user.DOSATTRIB as an ASCII hex string ("0x22"), sometimes with trailing -// Samba fields after a separator. We only need the leading DOS-attribute hex, so read from the "0x" -// prefix and stop at the first non-hex character. private fun parseDosAttrib(raw: ByteArray): Int { val s = String(raw, Charsets.US_ASCII).trim() val hex = if (s.startsWith("0x") || s.startsWith("0X")) s.substring(2) else s @@ -35,11 +23,8 @@ private fun parseDosAttrib(raw: ByteArray): Int { return digits.toIntOrNull(16) ?: 0 } -// Read the current read-only + Wine-hidden state. Never throws: an xattr-unsupported filesystem -// comes back hiddenSupported=false (Hidden toggle disabled), Read-only always resolves. internal fun readFileAttrs(file: File): FileAttrState { val path = file.absolutePath - // Read-only reflects the OWNER write bit - that's what Wine maps to FILE_ATTRIBUTE_READONLY. val readOnly = runCatching { (android.system.Os.stat(path).st_mode and android.system.OsConstants.S_IWUSR) == 0 }.getOrDefault(!file.canWrite()) @@ -49,8 +34,6 @@ internal fun readFileAttrs(file: File): FileAttrState { try { hidden = (parseDosAttrib(android.system.Os.getxattr(path, DOSATTRIB_XATTR)) and FILE_ATTRIBUTE_HIDDEN) != 0 } catch (e: android.system.ErrnoException) { - // ENODATA: xattr namespace works, the attribute just isn't set yet -> still toggleable. - // ENOTSUP/EOPNOTSUPP/anything else: the fs can't store it -> disable the Hidden toggle. supported = e.errno == android.system.OsConstants.ENODATA } catch (e: Exception) { supported = false @@ -58,10 +41,6 @@ internal fun readFileAttrs(file: File): FileAttrState { return FileAttrState(readOnly, hidden, supported) } -// Toggle read-only by flipping the write bits, preserving every other permission bit. Setting -// read-only clears owner/group/other write (so Wine sees FILE_ATTRIBUTE_READONLY regardless of which -// write bit it checks); clearing it restores owner write. Falls back to File.setWritable if chmod is -// somehow refused. Returns true on success. internal fun setReadOnly(file: File, readOnly: Boolean): Boolean = runCatching { val path = file.absolutePath val mode = android.system.Os.stat(path).st_mode @@ -73,10 +52,6 @@ internal fun setReadOnly(file: File, readOnly: Boolean): Boolean = runCatching { true }.getOrElse { file.setWritable(!readOnly, true) } -// Flip Wine's DOS hidden bit in user.DOSATTRIB, preserving the other DOS-attribute bits -// (archive/system/read-only) already encoded there, and synthesizing a minimal value when absent. -// Writes Wine's own "0x%x" format, which Wine reads back natively. Returns false when the fs can't -// store the xattr, so the caller can disable just the Hidden toggle. internal fun setHidden(file: File, hidden: Boolean): Boolean = try { val path = file.absolutePath var attr = try { diff --git a/app/src/main/java/com/droiddeck/launcher/files/FileManagerActivity.kt b/app/src/main/java/com/droiddeck/launcher/files/FileManagerActivity.kt index 2395d1c80d..27cb9dbcea 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/FileManagerActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/FileManagerActivity.kt @@ -13,7 +13,6 @@ import androidx.compose.ui.Modifier import com.droiddeck.launcher.ui.DroidDeckTheme import java.io.File -/** The File Manager as a screen of its own, from the Files tile on the main screen. */ class FileManagerActivity : ComponentActivity() { override fun attachBaseContext(newBase: android.content.Context) { super.attachBaseContext(newBase) diff --git a/app/src/main/java/com/droiddeck/launcher/files/FileManagerItems.kt b/app/src/main/java/com/droiddeck/launcher/files/FileManagerItems.kt index 8efe2c6cd0..45c8a92c83 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/FileManagerItems.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/FileManagerItems.kt @@ -77,23 +77,16 @@ import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -// The File Manager's rows, tiles, favourites and context menu. -// Semantic identity colours for the favourite-card drive badge. Intentionally NOT theme -// accent colours - they identify the storage source at a glance. Returns (background, foreground). private fun badgeColors(loc: FavLocation): Pair<Color, Color> { val white = Color(0xFFFFFFFF) return when { - loc.storage == FavStorage.INTERNAL -> Color(0xFF2E5FB0) to white // blue - loc.storage == FavStorage.SD -> Color(0xFF2E7D32) to white // green - else -> Color(0xFF555555) to white // grey + loc.storage == FavStorage.INTERNAL -> Color(0xFF2E5FB0) to white + loc.storage == FavStorage.SD -> Color(0xFF2E7D32) to white + else -> Color(0xFF555555) to white } } -// The context-menu item list shared by the list rows (FileItemRow) and the grid tiles -// (FileGridTile), so both open the identical menu. Gating (isDir/canRun/isInno/looksLikeArchive) is -// recomputed from [file] here - one source of truth for what each item shows. Every item dismisses -// the menu first, then runs its action. @Composable private fun FileContextMenuItems( file: File, @@ -114,15 +107,12 @@ private fun FileContextMenuItems( onClick = { onDismissMenu(); onSelect() }, ) MenuItemDivider() - // Properties: basic info + Read-only / Hidden toggles, for ANY file or folder (handy for config - // files like .txt/.cfg/.ini). Kept near the top since it's a common reason to open this menu. DropdownMenuItem( text = { Text(stringResource(R.string.fm_properties)) }, leadingIcon = { Icon(Icons.Filled.Info, null, tint = MaterialTheme.colorScheme.primary) }, onClick = { onDismissMenu(); onProperties() }, ) MenuItemDivider() - // Favorites are directories - only folders get the pin toggle. if (isDir) { DropdownMenuItem( text = { Text(if (isFavorite) stringResource(R.string.fm_favorite_remove) else stringResource(R.string.fm_favorite_add)) }, @@ -189,11 +179,8 @@ internal fun FileItemRow( val context = LocalContext.current val isDir = file.isDirectory val isExe = !isDir && file.name.lowercase().let { it.endsWith(".exe") || it.endsWith(".bat") || it.endsWith(".msi") || it.endsWith(".sh") } - // Image files show a real thumbnail instead of the generic file icon (handy when picking a - // wallpaper/icon). Coil sizes the decode to the 36dp slot and caches it, so scrolling stays smooth. val isImage = !isDir && file.extension.lowercase() in IMAGE_THUMB_EXTS - // For real PE executables, try to pull out the embedded application icon (async, off the main thread). var exeIcon by remember(file.absolutePath) { mutableStateOf<ImageBitmap?>(null) } if (!isDir && file.name.lowercase().endsWith(".exe")) { LaunchedEffect(file.absolutePath) { @@ -207,8 +194,6 @@ internal fun FileItemRow( .fillMaxWidth() .padding(horizontal = 12.dp, vertical = 3.dp) .combinedClickable( - // In selection mode a tap toggles instead of opening, so you can rattle through a - // folder without long-pressing every single row. onClick = { if (selectionMode) onToggleSelect() else onTap() }, onLongClick = onLongPress, ), @@ -231,7 +216,6 @@ internal fun FileItemRow( Spacer(Modifier.width(4.dp)) } when { - // Show the executable's own embedded icon when we managed to extract one. exeIcon != null -> Image( bitmap = exeIcon!!, contentDescription = null, @@ -249,7 +233,6 @@ internal fun FileItemRow( tint = MaterialTheme.colorScheme.primary, modifier = Modifier.size(if (compact) 24.dp else 36.dp), ) - // Real image preview. Falls back to the generic file icon while loading or on decode failure. isImage -> AsyncImage( model = file, contentDescription = null, @@ -313,8 +296,6 @@ internal fun FileItemRow( } } -// The ".." row at the top of a folder: one level up, styled like a folder row so it reads as part -// of the list and takes controller focus the same way. @Composable internal fun ParentFolderRow(compact: Boolean = false, onTap: () -> Unit) { Card( @@ -354,8 +335,6 @@ internal fun ParentFolderRow(compact: Boolean = false, onTap: () -> Unit) { } } -// Dedicated Favorites list that replaces the file list while the star toggle is on. -// Reads the store keyed on [favTick] so it recomposes after any pin/unpin. @Composable internal fun FavoritesList( currentDir: File, @@ -431,9 +410,6 @@ internal fun FavoritesList( } } -// A single favourite - matches the FileItemRow card style (surfaceContainer + outline + -// RoundedCornerShape(10.dp)). Shows the folder name, a coloured drive badge + origin text, -// and the full display path; tapping jumps into it, the filled star unpins. @Composable private fun FavoriteCard( file: File, @@ -472,7 +448,6 @@ private fun FavoriteCard( overflow = TextOverflow.Ellipsis, ) Spacer(Modifier.height(2.dp)) - // Origin line: coloured drive badge + source description. Row(verticalAlignment = Alignment.CenterVertically) { Text( text = stringResource(loc.driveLabel), @@ -517,13 +492,6 @@ private fun FavoriteCard( } } -/** - * One entry in the File Manager's grid view: a big thumbnail with the name under it. - * - * Deliberately drops size and date - at this width they truncate to noise. The grid is for - * recognising things by sight (screenshots, covers, game folders); the list stays the view for - * reading details. - */ @OptIn(ExperimentalFoundationApi::class) @Composable internal fun FileGridTile( @@ -554,7 +522,6 @@ internal fun FileGridTile( if (bmp != null) exeIcon = bmp.asImageBitmap() } } - // The tile has no ⋮ button - long-press opens this menu, anchored to the Box around the Card. Box { Card( modifier = Modifier @@ -608,8 +575,6 @@ internal fun FileGridTile( } } Spacer(Modifier.height(4.dp)) - // Always reserve two lines (issue #475): a one-line name used to make its card shorter than - // its neighbours, so grid rows had ragged heights. Fixed min/max keeps every tile the same size. Text( file.name, color = MaterialTheme.colorScheme.onSurface, diff --git a/app/src/main/java/com/droiddeck/launcher/files/FileManagerModel.kt b/app/src/main/java/com/droiddeck/launcher/files/FileManagerModel.kt index eac7dc463f..c8bcf1ee7a 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/FileManagerModel.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/FileManagerModel.kt @@ -12,33 +12,8 @@ import androidx.annotation.StringRes import com.droiddeck.launcher.R import java.io.File -// The File Manager's non-UI helpers: sorting, paths, conflict choices and favourite locations. - -/* - * Bannerlator's File Manager (ui/screens/FileManagerScreen.kt), carried over whole: the same - * browsing, grid and list, sorting, search, multi-select, copy/cut/paste with conflicts and - * progress, rename, delete, new folder, properties, favourites and the locations rail, and the - * same pick modes. What this app has no use for is not here: running a file in a Wine container, - * adding it to a container's shortcuts, the Drive C: / Drive Z: locations and the archive - * unpacker that installs into a prefix. Everything else is line for line the same so a fix in - * either app carries to the other. - */ - -/** - * What to do when a pasted item already exists at the destination. - * - * OVERWRITE and MERGE resolve to the same call - `copyWithProgress` recurses into an existing - * directory and truncates existing files - but they mean different things to the user, so both are - * offered and the wording is chosen per item type (files overwrite, folders merge). - */ enum class ConflictChoice { OVERWRITE, MERGE, KEEP_BOTH, SKIP } -/** - * Shortens a path from the LEFT, keeping whole segments. - * - * Compose's TextOverflow can only ellipsise the tail, which for a path throws away the part that - * matters - `/storage/emulated/0/Games/Racing/Dir…` tells you nothing about where you are. - */ internal fun elidePathStart(path: String, max: Int): String { if (path.length <= max) return path val parts = path.split('/').filter { it.isNotEmpty() } @@ -50,12 +25,9 @@ internal fun elidePathStart(path: String, max: Int): String { return if (out.isEmpty()) "…" + path.takeLast(max - 1) else "…$out" } -/** Folder-first ordering stays fixed across both sort directions. */ internal fun comparatorFor(sortBy: String, desc: Boolean): Comparator<File> { val inner: Comparator<File> = when (sortBy) { "date" -> compareBy { it.lastModified() } - // Directory length() is meaningless, so folders sort by name within the size ordering - // instead of pretending to have one. "size" -> compareBy { if (it.isDirectory) -1L else it.length() } else -> compareBy { it.name.lowercase() } } @@ -63,27 +35,23 @@ internal fun comparatorFor(sortBy: String, desc: Boolean): Comparator<File> { return compareBy<File> { if (it.isDirectory) 0 else 1 }.then(directed) } -// Image extensions that get a real thumbnail (via Coil) instead of the generic file icon. internal val IMAGE_THUMB_EXTS = setOf("jpg", "jpeg", "png", "webp", "bmp", "gif") -// True when [child] is [ancestor] itself or lives anywhere inside it. internal fun isWithin(child: File, ancestor: File): Boolean { val c = runCatching { child.canonicalPath }.getOrDefault(child.absolutePath) val a = runCatching { ancestor.canonicalPath }.getOrDefault(ancestor.absolutePath) return c == a || c.startsWith(a + File.separator) } -// ── Favorites: origin resolution ── enum class FavStorage { INTERNAL, SD, OTHER } data class FavLocation( val storage: FavStorage, - @StringRes val driveLabel: Int, // Internal, SD card, or Storage - val displayPath: String // the unix absolute path + @StringRes val driveLabel: Int, + val displayPath: String ) -// Resolve where [file] lives (storage source + a friendly label) by prefix-matching its path. fun describeLocation(file: File): FavLocation { val abs = file.absolutePath @@ -99,7 +67,6 @@ fun describeLocation(file: File): FavLocation { } } - // The Linux system's root (the app's files/linuxfs, the sessions' /) and anything under it. if (Regex("/files/linuxfs(/|$)").containsMatchIn(abs)) { return FavLocation(FavStorage.OTHER, R.string.fm_drive_linux, abs) } diff --git a/app/src/main/java/com/droiddeck/launcher/files/FileManagerScreen.kt b/app/src/main/java/com/droiddeck/launcher/files/FileManagerScreen.kt index 46f2f708b2..9fbd251ffa 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/FileManagerScreen.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/FileManagerScreen.kt @@ -98,12 +98,7 @@ import java.util.Date @OptIn(ExperimentalMaterial3Api::class) @Composable fun FileManagerScreen( - // Pick mode (issue #73): reuse this File Manager as a themed file picker. When on, editing/run - // features are gated off and tapping a matching file returns it via [onPick]. Defaults keep the - // full-featured File Manager nav destination unchanged. pickMode: Boolean = false, - // Directory-pick mode (issue #70): only folders are listed, files are hidden, and a - // "Select this folder" action returns the current directory via [onPick]. Implies pickMode. pickDirMode: Boolean = false, pickExtensions: List<String> = emptyList(), initialDir: File? = null, @@ -113,7 +108,6 @@ fun FileManagerScreen( val context = LocalContext.current val scope = rememberCoroutineScope() - // Only matching files are shown in pick mode (directories are always shown). Empty = all files. val lowerExts = remember(pickExtensions) { pickExtensions.map { it.lowercase() } } fun matchesPickExt(file: File): Boolean { if (lowerExts.isEmpty()) return true @@ -124,18 +118,10 @@ fun FileManagerScreen( val pickPrefs = remember { context.getSharedPreferences("file_manager", android.content.Context.MODE_PRIVATE) } val browsePrefs = pickPrefs val rootDir = remember { - // Both modes: honour an explicit caller-supplied start dir (e.g. Log Manager's game-log - // folder), else open at the INTERNAL STORAGE ROOT. Selection screens (drive-folder pick, - // local component pick, imports) previously defaulted to Download which - combined with the - // currentRoot floor below - trapped users in Download with no way up (reported bug). initialDir?.takeIf { it.isDirectory } ?: File("/storage/emulated/0") } var currentDir by remember { mutableStateOf(rootDir) } - // The up/back FLOOR - back + the up-arrow are disabled while currentDir == currentRoot. It MUST be - // the VOLUME ROOT of the start dir (internal /storage/emulated/0, or an SD card /storage/XXXX-XXXX), - // NOT the start dir itself: otherwise opening at any subfolder disables up/back and traps the user - // there. (Mirrors the volume-root logic in favLocationOf above.) var currentRoot by remember { val abs = rootDir.absolutePath val internal = "/storage/emulated/0" @@ -145,8 +131,6 @@ fun FileManagerScreen( val name = abs.removePrefix("/storage/").substringBefore('/') if (name.isNotEmpty() && name != "emulated" && name != "self") File("/storage/$name") else rootDir } - // A game's own folder or Proton prefix lives in the app's private storage, which has no - // volume above it: floor at the app's files dir so up/back still reach the library roots. else -> { val appFiles = runCatching { context.filesDir.canonicalPath }.getOrNull() generateSequence(rootDir) { it.parentFile } @@ -159,40 +143,26 @@ fun FileManagerScreen( var entries by remember { mutableStateOf(listOf<File>()) } var selectedEntry by remember { mutableStateOf<File?>(null) } var showMenuFor by remember { mutableStateOf<File?>(null) } - // Clipboard holds a LIST so one paste can carry a whole selection. Cut/copy semantics are a - // flag on the batch rather than per item - mixing the two in one clipboard has no sane meaning. var clipboardFiles by remember { mutableStateOf<List<File>>(emptyList()) } var isCutOperation by remember { mutableStateOf(false) } - // Multi-select. Keyed by absolute path rather than File so a directory reload (which builds - // fresh File objects) doesn't silently drop the selection. var selectionMode by remember { mutableStateOf(false) } var selectedPaths by remember { mutableStateOf<Set<String>>(emptySet()) } - // Paste conflict resolution, surfaced from the IO coroutine and answered by the dialog. var pendingConflict by remember { mutableStateOf<File?>(null) } var conflictChoice by remember { mutableStateOf<ConflictChoice?>(null) } var conflictApplyToAll by remember { mutableStateOf(false) } - // Set while a copy/move runs so the progress UI can offer a cancel. var operationJob by remember { mutableStateOf<kotlinx.coroutines.Job?>(null) } var pendingBulkDelete by remember { mutableStateOf<List<File>>(emptyList()) } - // Browse controls. Persisted so the list doesn't reset its order every time you open a folder. var searchQuery by remember { mutableStateOf("") } var showSearch by remember { mutableStateOf(false) } var sortBy by remember { mutableStateOf(browsePrefs.getString("fmSortBy", "name") ?: "name") } var sortDesc by remember { mutableStateOf(browsePrefs.getBoolean("fmSortDesc", false)) } var showHidden by remember { mutableStateOf(browsePrefs.getBoolean("fmShowHidden", true)) } var showSortMenu by remember { mutableStateOf(false) } - // View mode: list of cards (default) or a thumbnail grid. Density applies to the list only - - // a grid tile has no second line to compact. - // The grid/list toggle is the SOURCE OF TRUTH in BOTH orientations (it drives the view and its - // choice persists across rotation). Grid is the default - most useful in landscape, and in - // portrait GridCells.Adaptive naturally renders fewer columns (~2). Do NOT force portrait to list: - // that broke the toggle on-device (tapping it did nothing in portrait). var gridView by remember { mutableStateOf(browsePrefs.getBoolean("fmGridView", true)) } val showGrid = gridView var compactRows by remember { mutableStateOf(browsePrefs.getBoolean("fmCompactRows", false)) } var showNewFolderDialog by remember { mutableStateOf(false) } var renameTarget by remember { mutableStateOf<File?>(null) } - // Properties sheet (basic info + Read-only / Hidden toggles) target; null when closed. var propertiesTarget by remember { mutableStateOf<File?>(null) } var isOperationRunning by remember { mutableStateOf(false) } var operationLabel by remember { mutableStateOf("") } @@ -201,24 +171,16 @@ fun FileManagerScreen( val listState = rememberLazyListState() val pullState = rememberPullToRefreshState() - // Favorites view: when on, a dedicated bookmarks list replaces the file list. - // favTick is bumped on any add/remove/toggle so the favorites view + per-row star recompute. var showFavorites by remember { mutableStateOf(false) } var favTick by remember { mutableIntStateOf(0) } - // resetScroll: jump to the top of the list (true for navigation; false for in-place reloads - // after delete/paste/rename/refresh so the user keeps their scroll position). fun loadDirectory(dir: File, resetScroll: Boolean = true) { currentDir = dir - // Remember the browsed directory so the next pick resumes here. if (pickMode) pickPrefs.edit().putString("lastFilePickerDir", dir.absolutePath).apply() scope.launch { val list = withContext(Dispatchers.IO) { dir.listFiles()?.toList() - // Dir-pick mode: folders only. File-pick: folders + matching files. Else: all. ?.filter { if (pickDirMode) it.isDirectory else !pickMode || it.isDirectory || matchesPickExt(it) } - // Dotfiles are noise in a storage root (.aya, .$recycle_bin$) but occasionally - // the thing you came for, so it's a toggle rather than a permanent filter. ?.filter { showHidden || !it.name.startsWith(".") } ?.sortedWith(comparatorFor(sortBy, sortDesc)) ?: emptyList() } @@ -227,7 +189,6 @@ fun FileManagerScreen( } } - // Pull-to-refresh: re-list the current directory, keeping scroll position. if (pullState.isRefreshing) { LaunchedEffect(true) { loadDirectory(currentDir, resetScroll = false) @@ -235,19 +196,13 @@ fun FileManagerScreen( } } - // Jump to a drive's root; pins the Back boundary so we don't climb above it. fun openDrive(dir: File) { currentRoot = dir loadDirectory(dir) } - // Open the start dir without openDrive(): that pins the floor to the start dir itself, which - // greyed out up/back whenever the manager was opened at a game's folder. LaunchedEffect(Unit) { loadDirectory(rootDir) } - // System/gesture Back: while the Favorites view is open it closes that first; otherwise - // it goes up one directory. Only at the current drive's root with Favorites closed is it - // disabled, letting Back propagate to close the File Manager. BackHandler(enabled = showFavorites || currentDir != currentRoot) { if (showFavorites) { showFavorites = false @@ -257,15 +212,12 @@ fun FileManagerScreen( if (parent != null && parent.exists()) loadDirectory(parent) } - // One level up, never above the current drive's root: shared by the toolbar arrow and the - // ".." row at the top of the list. val canGoUp = currentDir != currentRoot && currentDir.parentFile?.exists() == true fun goUp() { val parent = currentDir.parentFile if (currentDir != currentRoot && parent != null && parent.exists()) loadDirectory(parent) } - // Resolve a non-colliding destination in [dir] for [name] (foo.txt -> "foo (1).txt"). fun uniqueDestination(dir: File, name: String): File { var candidate = File(dir, name) if (!candidate.exists()) return candidate @@ -291,12 +243,9 @@ fun FileManagerScreen( } } - /** Waits for the user to answer the conflict dialog for [file]; null if they cancelled it. */ suspend fun askConflict(file: File): ConflictChoice? { pendingConflict = file conflictChoice = null - // Poll rather than plumb a CompletableDeferred through Compose state - the dialog answers - // by setting conflictChoice, and this coroutine is already off the critical path. while (pendingConflict != null && conflictChoice == null) kotlinx.coroutines.delay(50) return conflictChoice } @@ -319,12 +268,10 @@ fun FileManagerScreen( var done = 0 for (src in sources) { - // Pasting a folder into itself or its own subtree would recurse forever. if (src.isDirectory && isWithin(dstDir, src)) { failed++ continue } - // Moving into the folder it already sits in is a no-op. if (cut && src.parentFile?.absolutePath == dstDir.absolutePath) { skipped++ continue @@ -336,16 +283,12 @@ fun FileManagerScreen( if (conflictApplyToAll) applyToAll = it } ?: run { skipped++; null } ?: continue when (choice) { - // Overwrite and Merge both paste onto the real destination: copyWithProgress - // recurses into an existing directory and truncates existing files, so the - // two differ only in what the user expects, not in what we call. ConflictChoice.OVERWRITE, ConflictChoice.MERGE -> Unit ConflictChoice.KEEP_BOTH -> dst = uniqueDestination(dstDir, src.name) ConflictChoice.SKIP -> { skipped++; continue } } } - // Progress is per item; with a batch the label carries the overall position. operationLabel = if (sources.size > 1) { context.getString(if (cut) R.string.fm_op_moving_batch else R.string.fm_op_copying_batch, done + 1, sources.size, src.name) } else { @@ -419,8 +362,6 @@ fun FileManagerScreen( } var showDriveMenu by remember { mutableStateOf(false) } - // Re-enumerated whenever we come back to the screen: returning from a container can leave this - // process on a stale storage view, and the volume set has to be re-read rather than cached. var storageTick by remember { mutableIntStateOf(0) } val lifecycleOwner = LocalLifecycleOwner.current DisposableEffect(lifecycleOwner) { @@ -435,7 +376,6 @@ fun FileManagerScreen( com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context).takeIf { File(it, "usr").isDirectory } } - // ── Dialogs ── if (showNewFolderDialog) { var folderName by remember { mutableStateOf("") } @@ -488,8 +428,6 @@ fun FileManagerScreen( FilePropertiesDialog( file = file, onDismiss = { propertiesTarget = null }, - // Attribute changes affect Hidden/read-only which the listing filters/sorts on, so refresh - // in place (keeping scroll) after any toggle applies. onChanged = { loadDirectory(currentDir, resetScroll = false) }, ) } @@ -519,7 +457,6 @@ fun FileManagerScreen( Column { Text(stringResource(R.string.fm_cannot_undo)) Spacer(Modifier.height(6.dp)) - // Name a few so an accidental Select-All is obvious before it's too late. victims.take(5).forEach { Text("• ${it.name}", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 12.sp) } @@ -557,7 +494,6 @@ fun FileManagerScreen( ) } - // Paste conflict - one per colliding item, with "apply to all" for a long batch. pendingConflict?.let { conflict -> val isDir = conflict.isDirectory OutlinedAlertDialog( @@ -605,7 +541,6 @@ fun FileManagerScreen( } Column(modifier = Modifier.fillMaxSize()) { - // ── Pick-mode title ── if (pickMode && !pickerTitle.isNullOrEmpty()) { Text( text = pickerTitle, @@ -618,7 +553,6 @@ fun FileManagerScreen( .padding(horizontal = 16.dp, vertical = 10.dp), ) } - // ── Dir-pick action bar: confirm the currently-browsed folder ── if (pickDirMode) { Button( onClick = { onPick?.invoke(currentDir) }, @@ -631,7 +565,6 @@ fun FileManagerScreen( Text(stringResource(R.string.fm_select_this_folder)) } } - // ── Path bar ── Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier @@ -644,12 +577,8 @@ fun FileManagerScreen( } val currentDriveLabel = stringResource(describeLocation(currentDir).driveLabel) - // Dim the drive chip while the Favorites list is open (it's not the active context). val driveChipAlpha = if (showFavorites) 0.45f else 1f Box { - // The drive/location selector opens the drive dropdown, so give it the same outlined - // look as the "New Folder" button + the rail location items - it reads as a button, not - // plain text. Border uses the theme accent token; behaviour unchanged. val driveChipShape = RoundedCornerShape(8.dp) Text( text = " $currentDriveLabel ▾", @@ -720,13 +649,8 @@ fun FileManagerScreen( modifier = Modifier.weight(1f), ) } else if (LocalConfiguration.current.orientation == Configuration.ORIENTATION_PORTRAIT) { - // PORTRAIT: hide the current-folder name - it's redundant with the path bar directly - // below (which shows the full path). The spacer keeps the action icons right-aligned. Spacer(Modifier.weight(1f)) } else { - // LANDSCAPE: the CURRENT FOLDER, not the full path. A path ellipsised on the right - // hides its tail - the only part that says where you are ("…/Games/Racing/Dir…"). The - // full path moves to the line below, where it has room. Text( text = currentDir.name.ifBlank { currentDir.absolutePath }, color = MaterialTheme.colorScheme.onSurface, @@ -739,7 +663,6 @@ fun FileManagerScreen( } if (!showFavorites) { - // Keep New Folder in the toolbar so the file list uses the full height. if (!pickMode) { OutlinedButton( onClick = { showNewFolderDialog = true }, @@ -777,8 +700,6 @@ fun FileManagerScreen( Text(if (sortBy == key) "$label ${if (sortDesc) "↓" else "↑"}" else label) }, onClick = { - // Tapping the active field flips direction; a different - // field switches to it ascending. if (sortBy == key) sortDesc = !sortDesc else { sortBy = key; sortDesc = false } browsePrefs.edit().putString("fmSortBy", sortBy) .putBoolean("fmSortDesc", sortDesc).apply() @@ -809,7 +730,6 @@ fun FileManagerScreen( } } - // Star toggle: open/close the dedicated Favorites list. IconButton(onClick = { showFavorites = !showFavorites }) { if (showFavorites) { Icon(Icons.Filled.Star, stringResource(R.string.fm_hide_favorites), tint = MaterialTheme.colorScheme.primary) @@ -819,7 +739,6 @@ fun FileManagerScreen( } } - // ── Search field ── filters the current folder only; it is not a recursive search. if (showSearch && !showFavorites) { OutlinedTextField( value = searchQuery, @@ -830,7 +749,6 @@ fun FileManagerScreen( ) } - // Free space on the volume being browsed - worth knowing before starting a 60 GB copy. val freeSpace = remember(currentDir.absolutePath, entries) { runCatching { currentDir.usableSpace }.getOrDefault(0L) } @@ -840,14 +758,10 @@ fun FileManagerScreen( modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp, vertical = 2.dp), ) { Text( - // Elided from the LEFT: the deepest part of a path is the informative part, so - // when it doesn't fit we drop the /storage/emulated/0 prefix, not the tail. text = elidePathStart(currentDir.absolutePath, 52), color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 12.sp, maxLines = 1, - // fill = true: the path takes all remaining width, so the free-space figure - // is pinned to the right edge instead of sliding around with the path length. modifier = Modifier.weight(1f), ) if (freeSpace > 0) { @@ -863,7 +777,6 @@ fun FileManagerScreen( HorizontalDivider(color = MaterialTheme.colorScheme.outline) - // ── Selection bar ── replaces the paste banner while picking items. if (selectionMode) { Row( verticalAlignment = Alignment.CenterVertically, @@ -878,7 +791,6 @@ fun FileManagerScreen( fontSize = 13.sp, modifier = Modifier.weight(1f), ) - // Compact outlined buttons so all five fit one row alongside the count. val selBarPadding = PaddingValues(horizontal = 10.dp, vertical = 2.dp) OutlinedButton( onClick = { @@ -924,7 +836,6 @@ fun FileManagerScreen( } } - // ── Paste banner ── if (clipboardFiles.isNotEmpty()) { Row( verticalAlignment = Alignment.CenterVertically, @@ -948,7 +859,6 @@ fun FileManagerScreen( } } - // ── Progress overlay ── if (isOperationRunning) { Column( modifier = Modifier @@ -966,8 +876,6 @@ fun FileManagerScreen( overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f), ) - // A multi-gigabyte copy onto a slow card is exactly when you discover you - // picked the wrong folder; without this the only way out was killing the app. if (operationJob != null) { TextButton(onClick = { operationJob?.cancel() @@ -996,10 +904,6 @@ fun FileManagerScreen( } } - // ── Left locations rail (mockup Option 2) + content ── - // Shared collapsible rail: landscape expanded by default, portrait collapsed icon-only. Not - // shown in pick mode (the themed picker keeps its slim layout). Built each recompose (cheap) - // so it tracks the current drive/favourites without stale click lambdas. val fmRailState = rememberRailState("filemanager") fun locItem(label: String, icon: androidx.compose.ui.graphics.vector.ImageVector, dir: File, shortLabel: String? = null) = RailItem(label, icon, !showFavorites && currentRoot.absolutePath == dir.absolutePath, shortLabel = shortLabel) { @@ -1012,15 +916,12 @@ fun FileManagerScreen( showFavorites = false; if (d.readable) openDrive(d.dir) }) } - // The Linux system the sessions run in: its own / (the desktop's root), once installed. linuxRoot?.let { add(locItem(stringResource(R.string.fm_drive_linux), Icons.Filled.Terminal, it)) } } val quickItems = buildList { File("/storage/emulated/0/Download").takeIf { it.isDirectory }?.let { add(locItem(stringResource(R.string.fm_rail_downloads), Icons.Filled.Download, it, stringResource(R.string.fm_rail_downloads_short))) } - // The ROMs folder chosen on the main screen: what the session shows as /root/ROMs. SessionPrefs.romsDir(context).takeIf { it.isNotEmpty() }?.let(::File)?.takeIf { it.isDirectory } ?.let { add(locItem(stringResource(R.string.fm_rail_roms), Icons.Filled.SportsEsports, it)) } - // The app's own logs folder: private, which this file manager (the app itself) can read. com.droiddeck.launcher.runtime.LinuxRuntime.logDir(context).takeIf { it.isDirectory }?.let { add(locItem(stringResource(R.string.fm_rail_session_logs), Icons.Filled.Description, it)) } File("/storage/emulated/0/Pictures").takeIf { it.isDirectory }?.let { add(locItem(stringResource(R.string.fm_rail_pictures), Icons.Filled.Image, it)) } } @@ -1033,12 +934,10 @@ fun FileManagerScreen( } Row(modifier = Modifier.weight(1f).fillMaxWidth()) { - // The slim picker keeps its layout: no rail. if (!pickMode) { CollapsibleRail(state = fmRailState, title = stringResource(R.string.fm_rail_title), sections = locationSections, outlinedItems = true) } Box(modifier = Modifier.weight(1f).fillMaxSize()) { - // ── Favorites list OR file list ── if (showFavorites) { FavoritesList( currentDir = currentDir, @@ -1060,7 +959,6 @@ fun FileManagerScreen( modifier = Modifier.fillMaxSize(), ) } else { - // ── File list (pull down to refresh) ── Box( modifier = Modifier .fillMaxSize() @@ -1088,8 +986,6 @@ fun FileManagerScreen( selected = file.absolutePath in selectedPaths, onLongPress = { if (!pickMode) { - // In selection mode a long-press toggles; otherwise it opens the - // same context menu the list rows show (the tile has no ⋮ button). if (selectionMode) { selectedPaths = if (file.absolutePath in selectedPaths) selectedPaths - file.absolutePath @@ -1168,8 +1064,6 @@ fun FileManagerScreen( selectionMode = selectionMode, selected = file.absolutePath in selectedPaths, onLongPress = { - // In selection mode a long-press toggles; otherwise it opens the - // per-item context menu (matching the grid tiles). if (!pickMode) { if (selectionMode) { selectedPaths = if (file.absolutePath in selectedPaths) @@ -1223,8 +1117,6 @@ fun FileManagerScreen( } } } - // material3 1.2.0's PullToRefreshContainer draws its indicator even at rest; - // only show it while the user is actively pulling or a refresh is running. if (pullState.verticalOffset > 0.5f || pullState.isRefreshing) { PullToRefreshContainer( state = pullState, @@ -1233,7 +1125,7 @@ fun FileManagerScreen( } } } - } // end content Box (beside the rail) - } // end rail + content Row + } + } } } diff --git a/app/src/main/java/com/droiddeck/launcher/files/FileOps.kt b/app/src/main/java/com/droiddeck/launcher/files/FileOps.kt index e363a3acc8..04b83abaa2 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/FileOps.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/FileOps.kt @@ -10,15 +10,9 @@ import java.io.IOException import java.nio.file.Files import java.util.Locale -/** - * The file operations the File Manager needs, as Bannerlator's FileUtils has them: a delete that - * says whether it worked, a copy and a move that report bytes as they go, and the size format - * the rows use. Kept apart from core/FileUtils, whose callers want a quiet delete. - */ object FileOps { private const val TAG = "FileOps" - /** Byte-accurate copy progress (copied/total bytes), reported as the copy proceeds. */ fun interface ProgressCallback { fun onProgress(copiedBytes: Long, totalBytes: Long) } fun formatBytes(context: Context, bytes: Long): String { @@ -30,7 +24,6 @@ object FileOps { fun isSymlink(file: File): Boolean = try { Files.isSymbolicLink(file.toPath()) } catch (e: Exception) { false } - /** Recursive delete that never follows a symlink; true when everything went. */ fun delete(target: File?): Boolean { if (target == null) return false if (target.isDirectory && !isSymlink(target)) { @@ -46,20 +39,12 @@ object FileOps { return ok } - /** Recursive total size in bytes of files under [f] (skips symlinks). Used to size a progress bar. */ fun totalSize(f: File?): Long { if (f == null || !f.exists() || isSymlink(f)) return 0 if (f.isDirectory) return f.listFiles()?.sumOf { totalSize(it) } ?: 0 return f.length() } - /** - * Moves [src] to [dst], relinking instead of copying whenever possible. A rename is instant - * regardless of size but only works within one filesystem; renameTo returning false is the - * signal that a boundary was crossed, so it doubles as the check, and the fallback is - * copy-then-delete. Only attempted when the destination does not exist: renaming onto an - * existing directory does not merge. - */ fun moveWithProgress(src: File, dst: File, progress: ProgressCallback?): Boolean { if (sameFile(src, dst)) return true if (!dst.exists() && src.renameTo(dst)) { @@ -70,7 +55,6 @@ object FileOps { return delete(src) } - /** A copy that reports byte progress, smooth even within one large file. */ fun copyWithProgress(src: File, dst: File, progress: ProgressCallback?): Boolean { val total = maxOf(totalSize(src), 1L) return copyWithProgress(src, dst, longArrayOf(0), total, progress) @@ -96,7 +80,7 @@ object FileOps { } val parent = dst.parentFile if (!src.exists() || (parent != null && !parent.exists() && !parent.mkdirs())) return false - val chunk = 4L * 1024 * 1024 // report progress every 4 MiB + val chunk = 4L * 1024 * 1024 try { FileInputStream(src).channel.use { input -> FileOutputStream(dst).channel.use { output -> @@ -123,7 +107,6 @@ object FileOps { private fun sameFile(a: File, b: File): Boolean = try { a.canonicalPath == b.canonicalPath } catch (e: IOException) { a.absolutePath == b.absolutePath } - /** True when [child] is [ancestor] itself or lives anywhere inside it. */ private fun isWithin(child: File, ancestor: File): Boolean { val c = try { child.canonicalPath } catch (e: IOException) { child.absolutePath } val a = try { ancestor.canonicalPath } catch (e: IOException) { ancestor.absolutePath } diff --git a/app/src/main/java/com/droiddeck/launcher/files/FilePickerActivity.kt b/app/src/main/java/com/droiddeck/launcher/files/FilePickerActivity.kt index 8f8782719f..6fd89fa99f 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/FilePickerActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/FilePickerActivity.kt @@ -16,16 +16,6 @@ import com.droiddeck.launcher.R import com.droiddeck.launcher.ui.DroidDeckTheme import java.io.File -/** - * Themed host for [FileManagerScreen] in pick mode. Launched through [InAppFilePicker] and answers with the - * picked path in [EXTRA_SELECTED_FILE] on RESULT_OK. - * - * Extras: - * - [EXTRA_EXTENSIONS] allowed lowercase extensions, no dot; absent or empty = all files - * - [EXTRA_PICK_DIRECTORY] true to pick a folder instead of a file - * - [EXTRA_INITIAL_DIRECTORY] where to open; absent = the last folder picked from, then internal storage - * - [EXTRA_PICKER_TITLE] the header - */ class FilePickerActivity : ComponentActivity() { override fun attachBaseContext(newBase: android.content.Context) { super.attachBaseContext(newBase) @@ -36,7 +26,6 @@ class FilePickerActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) requestedOrientation = com.droiddeck.launcher.session.SessionPrefs.orientation(this) - // targetSdk 28: the old storage permission is exactly what lets us list the card. if (checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { requestPermissions(arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE), 1) } @@ -44,7 +33,6 @@ class FilePickerActivity : ComponentActivity() { val extensions = intent.getStringArrayExtra(EXTRA_EXTENSIONS)?.toList() ?: emptyList() val pickDir = intent.getBooleanExtra(EXTRA_PICK_DIRECTORY, false) val title = intent.getStringExtra(EXTRA_PICKER_TITLE) - // The screen remembers the folder it last picked from; an explicit start wins over it. val prefs = getSharedPreferences("file_manager", MODE_PRIVATE) val initialDir = (intent.getStringExtra(EXTRA_INITIAL_DIRECTORY) ?: prefs.getString("lastFilePickerDir", null)) ?.let { File(it) }?.takeIf { it.isDirectory } @@ -70,7 +58,6 @@ class FilePickerActivity : ComponentActivity() { override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) { super.onRequestPermissionsResult(requestCode, permissions, grantResults) - // The screen re-lists on its own when the grant lands; nothing to relay. if (requestCode == 1 && grantResults.firstOrNull() == PackageManager.PERMISSION_GRANTED) recreate() } diff --git a/app/src/main/java/com/droiddeck/launcher/files/FilePropertiesDialog.kt b/app/src/main/java/com/droiddeck/launcher/files/FilePropertiesDialog.kt index fff674dc99..f4f8d80fb2 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/FilePropertiesDialog.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/FilePropertiesDialog.kt @@ -39,17 +39,7 @@ import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -// The File Manager's properties dialog. -/** - * Properties sheet for a single file or folder: basic info plus the two Windows/Wine file attributes - * the in-container file manager (wfm.exe) also exposes - Read-only and Hidden. Each toggle applies - * immediately (off the main thread) and refreshes the listing via [onChanged]. - * - * State is keyed on the file so it always reflects the entry it was opened for. On a filesystem that - * can't store Wine's DOSATTRIB xattr (the FUSE /storage volumes) only the Hidden toggle is disabled; - * Read-only keeps working everywhere. - */ @Composable internal fun FilePropertiesDialog( file: File, @@ -60,7 +50,6 @@ internal fun FilePropertiesDialog( val scope = rememberCoroutineScope() val dateFormat = remember { SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()) } var attrs by remember(file.absolutePath) { mutableStateOf<FileAttrState?>(null) } - // Guards against a second toggle landing while the first is still being applied off-thread. var busy by remember(file.absolutePath) { mutableStateOf(false) } LaunchedEffect(file.absolutePath) { attrs = withContext(Dispatchers.IO) { readFileAttrs(file) } @@ -71,7 +60,6 @@ internal fun FilePropertiesDialog( title = { Text(stringResource(R.string.fm_properties)) }, text = { Column(modifier = Modifier.verticalScroll(rememberScrollState())) { - // ── Basic info ── Text( text = file.name, color = MaterialTheme.colorScheme.onBackground, @@ -95,7 +83,6 @@ internal fun FilePropertiesDialog( Spacer(Modifier.height(6.dp)) val state = attrs - // ── Read-only ── checked when the owner can't write (Wine's FILE_ATTRIBUTE_READONLY). AttributeToggleRow( label = stringResource(R.string.fm_read_only), description = stringResource(R.string.fm_read_only_hint), @@ -116,7 +103,6 @@ internal fun FilePropertiesDialog( }, ) Spacer(Modifier.height(2.dp)) - // ── Hidden ── Wine's DOS hidden bit in the user.DOSATTRIB xattr. val hiddenSupported = state?.hiddenSupported == true AttributeToggleRow( label = stringResource(R.string.fm_hidden), @@ -134,7 +120,6 @@ internal fun FilePropertiesDialog( attrs = attrs?.copy(hidden = want) onChanged() } else { - // The write failed after all - disable the toggle rather than lie. attrs = attrs?.copy(hiddenSupported = false) Toast.makeText(context, R.string.fm_hidden_failed, Toast.LENGTH_SHORT).show() } @@ -147,7 +132,6 @@ internal fun FilePropertiesDialog( ) } -// One "label: value" line in the Properties info block. @Composable private fun PropertyLine(label: String, value: String) { Row(modifier = Modifier.fillMaxWidth().padding(vertical = 2.dp)) { @@ -168,7 +152,6 @@ private fun PropertyLine(label: String, value: String) { } } -// A labelled attribute switch with a one-line description, used by the Properties sheet. @Composable private fun AttributeToggleRow( label: String, diff --git a/app/src/main/java/com/droiddeck/launcher/files/InAppFilePicker.kt b/app/src/main/java/com/droiddeck/launcher/files/InAppFilePicker.kt index f53ffd26ff..1ce9aca1fa 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/InAppFilePicker.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/InAppFilePicker.kt @@ -5,14 +5,7 @@ import android.content.Intent import android.net.Uri import java.io.File -/** - * The app's own file picker, the way Bannerlator's File Manager offers its pick mode: one intent - * builder per kind of pick, and the picked path read back from the result. Every import on the - * main screen goes through here rather than Android's document picker, which cannot show an SD - * card as a card, remembers nothing, and hands back a content URI the runtime cannot bind. - */ object InAppFilePicker { - /** Pick one file. [extensions] are lowercase, without the dot; empty = any file. */ fun buildIntent( context: Context, extensions: List<String> = emptyList(), @@ -24,7 +17,6 @@ object InAppFilePicker { initialDir?.let { putExtra(FilePickerActivity.EXTRA_INITIAL_DIRECTORY, it) } } - /** Pick a folder: only folders are listed, and "Use this folder" returns the one open. */ fun buildDirIntent( context: Context, title: String? = null, @@ -39,6 +31,5 @@ object InAppFilePicker { fun pickedFile(data: Intent?): File? = pickedPath(data)?.let { File(it) } - /** The picked file as the `file:` URI the import code already accepts. */ fun pickedUri(data: Intent?): Uri? = pickedFile(data)?.let { Uri.fromFile(it) } } diff --git a/app/src/main/java/com/droiddeck/launcher/files/MenuStyle.kt b/app/src/main/java/com/droiddeck/launcher/files/MenuStyle.kt index 4435c3795b..81f138b204 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/MenuStyle.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/MenuStyle.kt @@ -10,9 +10,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.unit.dp -// Shared outlined-card look for the app's popup menus, matching the FileManager / CommunityCard -// idiom (surfaceContainer fill, 1dp outline, rounded 10dp). Applied to a DropdownMenu's modifier so -// the popup reads as an outlined card. Keep all three menu call-sites on this so they stay identical. @Composable internal fun Modifier.outlinedMenuCard(): Modifier { val cs = MaterialTheme.colorScheme @@ -23,7 +20,6 @@ internal fun Modifier.outlinedMenuCard(): Modifier { .border(1.dp, cs.outline, shape) } -// The thin low-alpha separator that sits between items inside an outlined menu card. @Composable internal fun MenuItemDivider() { HorizontalDivider(color = MaterialTheme.colorScheme.outline.copy(alpha = 0.5f)) diff --git a/app/src/main/java/com/droiddeck/launcher/files/OutlinedAlertDialog.kt b/app/src/main/java/com/droiddeck/launcher/files/OutlinedAlertDialog.kt index 3159d361ce..3919e89b0d 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/OutlinedAlertDialog.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/OutlinedAlertDialog.kt @@ -12,12 +12,6 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.window.DialogProperties -// Single source of truth for the app's AlertDialogs: a drop-in wrapper around the Material3 -// slot-based AlertDialog that adds a 1dp outline around the whole popup box - matching the -// outline that Modifier.outlinedMenuCard() (MenuStyle.kt) puts on the app's menus. Signature -// mirrors androidx.compose.material3.AlertDialog exactly (compose-bom 2024.02.00 → material3 -// 1.2.0), so every call site can swap AlertDialog( → OutlinedAlertDialog( unchanged. The -// border shares the dialog's shape so its corner radius follows the rounded dialog. @Composable internal fun OutlinedAlertDialog( onDismissRequest: () -> Unit, diff --git a/app/src/main/java/com/droiddeck/launcher/files/PeIconExtractor.kt b/app/src/main/java/com/droiddeck/launcher/files/PeIconExtractor.kt index dc65b5e0cd..621a06118f 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/PeIconExtractor.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/PeIconExtractor.kt @@ -6,21 +6,11 @@ import java.io.File import java.io.RandomAccessFile import kotlin.math.max -/** - * Extracts the embedded application icon from a Windows PE executable (.exe). - * - * Walks the PE resource directory to the first RT_GROUP_ICON, picks the largest / - * deepest-colour entry it references, then decodes that RT_ICON image. Icon images - * are either PNG (Vista+) - decoded directly - or a classic DIB (BITMAPINFOHEADER + - * XOR pixels + 1-bpp AND mask) - decoded by hand here. - * - * Everything is best-effort: any malformed/oversized/unsupported input returns null. - */ object PeIconExtractor { private const val RT_ICON = 3 private const val RT_GROUP_ICON = 14 - private const val MAX_RES_SECTION = 64 * 1024 * 1024 // don't slurp absurd resource sections + private const val MAX_RES_SECTION = 64 * 1024 * 1024 private const val MAX_ICON_DIM = 1024 fun extract(file: File): Bitmap? = try { @@ -31,11 +21,11 @@ object PeIconExtractor { private fun parse(raf: RandomAccessFile): Bitmap? { val dos = read(raf, 0, 0x40) ?: return null - if (u8(dos, 0) != 0x4D || u8(dos, 1) != 0x5A) return null // "MZ" + if (u8(dos, 0) != 0x4D || u8(dos, 1) != 0x5A) return null val peOff = u32(dos, 0x3C).toInt() val coff = read(raf, peOff.toLong(), 24) ?: return null - if (u8(coff, 0) != 0x50 || u8(coff, 1) != 0x45 || u8(coff, 2) != 0 || u8(coff, 3) != 0) return null // "PE\0\0" + if (u8(coff, 0) != 0x50 || u8(coff, 1) != 0x45 || u8(coff, 2) != 0 || u8(coff, 3) != 0) return null val numSections = u16(coff, 6) val sizeOpt = u16(coff, 20) if (numSections <= 0 || numSections > 96 || sizeOpt <= 0) return null @@ -43,8 +33,8 @@ object PeIconExtractor { val optOff = peOff + 24L val opt = read(raf, optOff, sizeOpt) ?: return null val magic = u16(opt, 0) - val ddOff = if (magic == 0x20B) 112 else 96 // PE32+ vs PE32 data-directory offset - val resDirEntry = ddOff + 2 * 8 // data directory index 2 = resource table + val ddOff = if (magic == 0x20B) 112 else 96 + val resDirEntry = ddOff + 2 * 8 if (resDirEntry + 8 > opt.size) return null val resRVA = u32(opt, resDirEntry).toInt() val resSize = u32(opt, resDirEntry + 4).toInt() @@ -75,7 +65,6 @@ object PeIconExtractor { val resDirStart = resRVA - secVA if (resDirStart < 0 || resDirStart + 16 > res.size) return null - // RT_GROUP_ICON -> first group's data entry -> GRPICONDIR val grpTypeDir = findIdSubdir(res, resDirStart, RT_GROUP_ICON, resDirStart) ?: return null val grpData = firstDataEntry(res, grpTypeDir, resDirStart) ?: return null val grp = dataEntryBytes(res, grpData, secVA) ?: return null @@ -97,7 +86,6 @@ object PeIconExtractor { } if (bestId < 0) return null - // RT_ICON with the chosen id -> image bytes val iconTypeDir = findIdSubdir(res, resDirStart, RT_ICON, resDirStart) ?: return null val iconIdDir = findIdSubdir(res, iconTypeDir, bestId, resDirStart) ?: return null val iconData = firstDataEntry(res, iconIdDir, resDirStart) ?: return null @@ -106,9 +94,7 @@ object PeIconExtractor { return decodeIcon(img) } - // ── resource-directory navigation ── - /** Resolve the sub-directory under [dirIdx] whose id matches [wantId]; null if absent or not a directory. */ private fun findIdSubdir(res: ByteArray, dirIdx: Int, wantId: Int, resDirStart: Int): Int? { if (dirIdx + 16 > res.size) return null val total = u16(res, dirIdx + 12) + u16(res, dirIdx + 14) @@ -126,7 +112,6 @@ object PeIconExtractor { return null } - /** Descend the first entry of each level until an IMAGE_RESOURCE_DATA_ENTRY; returns its index. */ private fun firstDataEntry(res: ByteArray, dirIdx: Int, resDirStart: Int): Int? { if (dirIdx + 16 > res.size) return null if (u16(res, dirIdx + 12) + u16(res, dirIdx + 14) == 0) return null @@ -140,7 +125,6 @@ object PeIconExtractor { } } - /** Read the bytes an IMAGE_RESOURCE_DATA_ENTRY points at (its OffsetToData is an RVA). */ private fun dataEntryBytes(res: ByteArray, entryIdx: Int, secVA: Int): ByteArray? { if (entryIdx < 0 || entryIdx + 8 > res.size) return null val rva = u32(res, entryIdx).toInt() @@ -150,7 +134,6 @@ object PeIconExtractor { return res.copyOfRange(start, start + size) } - // ── icon image decoding ── private fun decodeIcon(b: ByteArray): Bitmap? { if (b.size >= 8 && u8(b, 0) == 0x89 && u8(b, 1) == 0x50 && u8(b, 2) == 0x4E && u8(b, 3) == 0x47) { @@ -164,7 +147,7 @@ object PeIconExtractor { val headerSize = u32(b, 0).toInt() val width = s32(b, 4) val heightFull = s32(b, 8) - val height = heightFull / 2 // DIB icon height counts XOR + AND mask + val height = heightFull / 2 val bitCount = u16(b, 14) if (width <= 0 || height <= 0 || width > MAX_ICON_DIM || height > MAX_ICON_DIM) return null @@ -183,7 +166,6 @@ object PeIconExtractor { val andRowSize = ((width + 31) / 32) * 4 val andStart = xorStart + rowSize * height - // 32-bit icons sometimes ship an all-zero alpha channel; fall back to the AND mask then. var hasAlpha = false if (bitCount == 32) { var y = 0 @@ -245,7 +227,6 @@ object PeIconExtractor { return Bitmap.createBitmap(pixels, width, height, Bitmap.Config.ARGB_8888) } - /** AND-mask alpha for a pixel: returns 0xFF000000 (opaque) or 0 (transparent), shifted into place. */ private fun maskAlpha(b: ByteArray, andStart: Int, andRowSize: Int, srcRow: Int, x: Int): Int { val o = andStart + srcRow * andRowSize + x / 8 if (o >= b.size) return 0xFF shl 24 @@ -253,7 +234,6 @@ object PeIconExtractor { return if (bit == 1) 0 else (0xFF shl 24) } - // ── little-endian readers ── private fun u8(b: ByteArray, off: Int): Int = b[off].toInt() and 0xFF private fun u16(b: ByteArray, off: Int): Int = u8(b, off) or (u8(b, off + 1) shl 8) diff --git a/app/src/main/java/com/droiddeck/launcher/files/StorageRoots.kt b/app/src/main/java/com/droiddeck/launcher/files/StorageRoots.kt index a53e792ce1..99e9401570 100644 --- a/app/src/main/java/com/droiddeck/launcher/files/StorageRoots.kt +++ b/app/src/main/java/com/droiddeck/launcher/files/StorageRoots.kt @@ -8,52 +8,24 @@ import android.os.storage.StorageVolume import com.droiddeck.launcher.R import java.io.File -/** - * A storage volume offered in the file manager's drive menu. - * - * [dir] is the best path we found for the volume: its root when that is listable, otherwise the - * deepest directory we can actually read on the way down to the app-specific directory. A volume - * always gets exactly one entry, even if several paths lead to it. - */ data class StorageRoot( val label: String, val dir: File, val removable: Boolean, - /** False when no path on the volume could be listed; the entry is still shown. */ val readable: Boolean, ) -/** - * Enumerates mounted storage volumes. - * - * Listing `/storage` is not enough on its own: a volume can be absent from this process's mount - * view (notably after a container exits and the app process is restarted onto a stale storage - * sandbox) even though it is mounted and healthy. The framework knows about it regardless, so the - * volume set is built from several independent sources: - * - * 1. [StorageManager.getStorageVolumes] - the authoritative list, read over Binder. - * 2. [Context.getExternalFilesDirs] - per-app directories, granted separately from shared storage. - * 3. `/storage` and `/mnt/media_rw` directory listings - the filesystem view, as a backstop. - * - * Those sources overlap heavily: one SD card is reachable as `/storage/<uuid>`, as - * `/mnt/media_rw/<uuid>`, and via its app-specific directory, and typically only some of them are - * readable. So paths are grouped by the *volume* they belong to rather than by path, and each - * volume contributes a single entry pointing at the best path available for it. - */ object StorageRoots { private const val EMULATED_PREFIX = "/storage/emulated" private const val INTERNAL_PATH = "/storage/emulated/0" - /** Identifies the physical volume a path belongs to; paths sharing a key are the same card. */ private const val PRIMARY_KEY = "primary" private class Volume(val key: String) { var label: String? = null var removable: Boolean = key != PRIMARY_KEY - /** Candidate directories, best-guess first. */ val candidates = LinkedHashSet<File>() - /** App-specific directories, used to find a readable path inside an unreadable root. */ val seeds = LinkedHashSet<File>() } @@ -62,7 +34,6 @@ object StorageRoots { fun volumeOf(key: String) = volumes.getOrPut(key) { Volume(key) } - // Internal storage is never removable and never absent; seed it first so it heads the menu. volumeOf(PRIMARY_KEY).apply { label = context.getString(R.string.fm_drive_internal) removable = false @@ -72,7 +43,6 @@ object StorageRoots { val appDirs = appSpecificDirs(context) val storageManager = context.getSystemService(StorageManager::class.java) - // 1 + 2 - framework-reported volumes. Authoritative, and unaffected by our mount view. storageManager?.storageVolumes.orEmpty() .filter { isMounted(it.state) } .forEach { volume -> @@ -86,14 +56,11 @@ object StorageRoots { } if (uuid != null) { entry.candidates += File("/storage/$uuid") - // Last resort only: the raw mount is normally unreadable to an app, so it must - // never outrank /storage/<uuid> and must never become an entry of its own. entry.candidates += File("/mnt/media_rw/$uuid") } appDirs.filter { belongsTo(storageManager!!, it, volume) }.forEach { entry.seeds += it } } - // 3 - filesystem backstop, for any volume the framework did not report. File("/storage").listFiles().orEmpty().forEach { child -> if (!child.isDirectory || child.name == "self" || child.name == "emulated") return@forEach volumeOf(child.name).candidates += child @@ -102,7 +69,6 @@ object StorageRoots { if (child.isDirectory) volumeOf(child.name).candidates += child } - // App-specific directories, which stay reachable when shared storage is not. appDirs.forEach { dir -> val root = volumeRootOf(dir) ?: return@forEach val entry = volumeOf(if (isEmulated(root)) PRIMARY_KEY else root.name) @@ -117,11 +83,9 @@ object StorageRoots { } private fun Volume.toRoot(context: Context): StorageRoot { - // Prefer a path we can actually list; a readable child beats an unreadable root. val dir = candidates.firstOrNull(::canBrowse) ?: candidates.firstNotNullOfOrNull { root -> seeds.firstNotNullOfOrNull { deepestReadable(root, it) } } ?: seeds.firstOrNull(::canBrowse) - // Report the volume anyway; an entry that lists empty beats one that silently vanished. ?: candidates.firstOrNull() ?: File("/storage/$key") @@ -135,7 +99,6 @@ object StorageRoots { private fun Volume.defaultLabel(context: Context): String = if (removable) context.getString(R.string.fm_drive_sd) else key - /** Appends the volume id to any label used by more than one volume, so entries stay tellable apart. */ private fun disambiguate(roots: List<StorageRoot>): List<StorageRoot> { val counts = roots.groupingBy { it.label }.eachCount() return roots.map { root -> @@ -143,7 +106,6 @@ object StorageRoots { } } - /** Walks up from [seed] towards [root] and returns the highest directory we can list. */ private fun deepestReadable(root: File, seed: File): File? { var current: File? = seed.absoluteFile var best: File? = null @@ -154,7 +116,6 @@ object StorageRoots { return best } - /** `/storage/ABCD-1234/Android/data/<pkg>/files` -> `/storage/ABCD-1234`. */ private fun volumeRootOf(appDir: File): File? = generateSequence(appDir.absoluteFile) { it.parentFile } .firstOrNull { it.name.equals("Android", ignoreCase = true) } @@ -178,11 +139,6 @@ object StorageRoots { } } - /** - * Names a volume the way the rest of the file manager does. The framework description is only - * used when it says something more useful than "SD card" - on some devices it is a bare disk - * name like "android", which tells the user nothing about which card they are looking at. - */ private fun labelFor(context: Context, volume: StorageVolume, uuid: String?): String { if (volume.isPrimary) return context.getString(R.string.fm_drive_internal) if (volume.isRemovable) return context.getString(R.string.fm_drive_sd) diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/AddedExes.kt b/app/src/main/java/com/droiddeck/launcher/frontend/AddedExes.kt index 62afb0b8af..a9f18ac064 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/AddedExes.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/AddedExes.kt @@ -5,15 +5,7 @@ import org.json.JSONArray import org.json.JSONObject import java.io.File -/** - * Games added from the Games tab's + rather than a Games folder: one picked .exe, or each game - * "Add all games in this folder" found. Kept by the game's folder in `files/added-exes.json`, - * which [AddedGames.scan] merges in. The exe chosen later, the shortcut appid, the edits and the - * removal live where every added game keeps them ([com.droiddeck.launcher.session.SessionPrefs]); - * this holds which folders are games and the exe they came with. - */ object AddedExes { - /** [picked]: the user chose [exe]; false = [GameExePicker]'s best guess, which a scan ranks again. */ class Entry(val folder: String, val exe: String, val picked: Boolean = true) private fun file(context: Context) = File(context.filesDir, "added-exes.json") @@ -30,7 +22,6 @@ object AddedExes { emptyList() } - /** Adds [entry], replacing one for the same folder. */ @Synchronized fun put(context: Context, entry: Entry) = write(context, list(context).filter { it.folder != entry.folder } + entry) diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/AddedGameArt.kt b/app/src/main/java/com/droiddeck/launcher/frontend/AddedGameArt.kt index 1fb5bb272d..b3bdeb9684 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/AddedGameArt.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/AddedGameArt.kt @@ -11,14 +11,6 @@ import java.net.HttpURLConnection import java.net.URL import java.net.URLEncoder -/** - * Artwork for an added game: what the user put in the game's folder first, else what Steam has - * for it - by the Steam appid its files name, else by a store search on its title - else what - * SteamGridDB has ([SteamGridDb]), fetched once into the app's cache. Four pieces, named the way - * the client names them in its grid folder: the portrait capsule, the wide header, the hero - * background and the logo; plus an icon pulled out of the game's own .exe. The session hands - * the paths to the runtime's shortcuts writer, which copies them into the client's grid. - */ object AddedGameArt { private const val TAG = "AddedGameArt" private const val STORE_SEARCH = "https://store.steampowered.com/api/storesearch/?l=english&cc=US&term=" @@ -29,15 +21,10 @@ object AddedGameArt { val any get() = portrait != null || header != null || hero != null || logo != null } - /** - * The pieces a user can choose, as the client takes them: [assetType] is its custom-artwork - * number (null: the icon, set by path); [cacheName] the automatic file in the game's cache. - */ enum class Slot(val key: String, val cacheName: String, val assetType: Int?) { - COVER("p", "p.jpg", 0), BACKGROUND("hero", "hero.jpg", 1), LOGO("logo", "logo.png", 2), ICON("icon", "icon.png", null), + COVER("p", "p.jpg", 0), WIDE("header", "header.jpg", 3), BACKGROUND("hero", "hero.jpg", 1), LOGO("logo", "logo.png", 2), ICON("icon", "icon.png", null), } - /** Where a piece came from; [AUTO] = nothing found yet. */ const val FOLDER = "folder" const val STEAM = "steam" const val SGDB = "sgdb" @@ -45,16 +32,18 @@ object AddedGameArt { const val EXE = "exe" const val AUTO = "" - /** A slot as it stands: the file shown and where it came from (one of [FOLDER].. [AUTO]); [chosen] = the user picked it. */ class SlotState(val slot: Slot, val file: File?, val source: String, val chosen: Boolean) - /** One image the chooser offers: its group ([FOLDER], [STEAM], [SGDB]), a thumbnail and the full image (URL or path). */ class Option(val group: String, val thumb: String, val full: String) - private val CHOSEN = Regex("""chosen-(\w+)\.(\w+)""") + class Choices(val options: List<Option>, val sgdb: SteamGridDb.Status) - private fun chosen(cache: File, slot: Slot): File? = - cache.listFiles { f -> CHOSEN.matchEntire(f.name)?.groupValues?.get(1) == slot.key }?.firstOrNull() + class Found<T>(val items: List<T>, val status: SteamGridDb.Status) + + private val CHOSEN = Regex("""chosen-(p|header|hero|logo|icon)(?:-\d+)?\.(\w+)""") + + internal fun chosen(cache: File, slot: Slot): File? = + cache.listFiles { f -> CHOSEN.matchEntire(f.name)?.groupValues?.get(1) == slot.key }?.maxWithOrNull(compareBy({ it.lastModified() }, { it.name })) private val IMAGE = listOf("png", "jpg", "jpeg") private val PORTRAIT = listOf("cover", "poster", "grid", "boxart", "capsule", "folder", "library_600x900", "portrait") @@ -64,7 +53,6 @@ object AddedGameArt { internal fun cacheDir(context: Context, game: AddedGames.Game) = File(context.filesDir, "added-art/${game.appId}") - /** An image in the folder (or its `art` subfolder) under one of the given names, any image extension. */ private fun find(folder: File, names: List<String>): File? { val dirs = listOf(folder, File(folder, "art"), File(folder, ".art")) for (dir in dirs) for (name in names) for (ext in IMAGE) { @@ -74,7 +62,6 @@ object AddedGameArt { return null } - /** What the folder itself offers; the file named after the folder counts as the portrait. */ private fun local(game: AddedGames.Game): Art { val folder = game.folder return Art( @@ -86,21 +73,19 @@ object AddedGameArt { ) } - /** The user's choice for each piece, else the folder's art, else the cached art; no network. */ fun resolve(context: Context, game: AddedGames.Game): Art { val own = local(game) val cache = cacheDir(context, game) fun cached(name: String) = File(cache, name).takeIf { it.isFile } return Art( portrait = chosen(cache, Slot.COVER) ?: own.portrait ?: cached("p.jpg") ?: exeArt(context, game, cover = true), - header = own.header ?: cached("header.jpg") ?: exeArt(context, game, cover = false), + header = chosen(cache, Slot.WIDE) ?: own.header ?: cached("header.jpg") ?: exeArt(context, game, cover = false), hero = chosen(cache, Slot.BACKGROUND) ?: own.hero ?: cached("hero.jpg"), logo = chosen(cache, Slot.LOGO) ?: own.logo ?: cached("logo.png"), icon = chosen(cache, Slot.ICON) ?: own.icon ?: cached("icon-sgdb.png") ?: exeIcon(context, game), ) } - /** Each choosable piece with its file and where it came from, for the game's editor; no network. */ fun describe(context: Context, game: AddedGames.Game): List<SlotState> { val own = local(game) val cache = cacheDir(context, game) @@ -111,6 +96,7 @@ object AddedGameArt { chosen(cache, slot)?.let { return@map SlotState(slot, it, chosenSource(context, game, slot).first.ifEmpty { FILE }, true) } val auto: Pair<File, String>? = when (slot) { Slot.COVER -> own.portrait?.let { it to FOLDER } ?: cached("p.jpg") ?: exeArt(context, game, cover = true)?.let { it to EXE } + Slot.WIDE -> own.header?.let { it to FOLDER } ?: cached("header.jpg") ?: exeArt(context, game, cover = false)?.let { it to EXE } Slot.BACKGROUND -> own.hero?.let { it to FOLDER } ?: cached("hero.jpg") Slot.LOGO -> own.logo?.let { it to FOLDER } ?: cached("logo.png") Slot.ICON -> own.icon?.let { it to FOLDER } ?: File(cache, "icon-sgdb.png").takeIf { it.isFile }?.let { it to SGDB } @@ -122,61 +108,98 @@ object AddedGameArt { private val CHOOSABLE = setOf("png", "jpg", "jpeg", "webp") - /** Images in the game's folder (and its art folders) that could stand for a piece. */ internal fun folderImages(folder: File): List<File> = listOf(folder, File(folder, "art"), File(folder, ".art")).flatMap { dir -> dir.listFiles { f -> f.isFile && f.extension.lowercase() in CHOOSABLE }?.sortedBy { it.name.lowercase() }.orEmpty() }.take(12) - /** - * What the chooser offers for [slot]: the game folder's images, Steam's official piece (when the - * game has a Steam appid and Steam has the piece), and SteamGridDB's best few (with a key). - * Blocking: it asks the network. - */ - fun options(context: Context, game: AddedGames.Game, slot: Slot): List<Option> { + fun choices(context: Context, game: AddedGames.Game, slot: Slot): Choices { val out = ArrayList<Option>() folderImages(game.folder).forEach { out.add(Option(FOLDER, it.path, it.path)) } val cache = cacheDir(context, game) val steamId = SteamMatch.resolve(context, game.folder.path, game.exe, game.name, legacy = File(cache, "steam-appid")).appId?.toString() - val remote = when (slot) { Slot.COVER -> "library_600x900.jpg"; Slot.BACKGROUND -> "library_hero.jpg"; Slot.LOGO -> "logo.png"; Slot.ICON -> null } - if (steamId != null && remote != null) { - val url = "$CDN$steamId/$remote".takeIf { exists(it) } ?: steamAssetUrl(steamId, remote) - if (url != null) out.add(Option(STEAM, url, url)) + if (steamId != null) steamOption(steamId, slot)?.let { out.add(it) } + val (found, status) = sgdbChoices(context, File(cache, "sgdb-id"), steamId?.toIntOrNull(), game.name, slot) + out.addAll(found) + return Choices(out, status) + } + + internal fun steamOption(steamId: String, slot: Slot): Option? { + val remote = when (slot) { Slot.COVER -> "library_600x900.jpg"; Slot.WIDE -> "header.jpg"; Slot.BACKGROUND -> "library_hero.jpg"; Slot.LOGO -> "logo.png"; Slot.ICON -> null } ?: return null + val url = "$CDN$steamId/$remote".takeIf { exists(it) } ?: steamAssetUrl(steamId, remote) ?: return null + return Option(STEAM, url, url) + } + + internal fun sgdbChoices(context: Context, marker: File, steamId: Int?, name: String, slot: Slot): Pair<List<Option>, SteamGridDb.Status> { + val key = SteamGridDb.key(context) + if (key.isEmpty()) return emptyList<Option>() to SteamGridDb.Status.NO_KEY + marker.parentFile?.mkdirs() + return try { + val gridId = remembered(marker, SteamGridDb.keyChangedAt(context), retryMiss = true) { + SteamGridDb.gameId(key, steamId, name)?.toString() + }?.toIntOrNull() ?: return emptyList<Option>() to SteamGridDb.Status.NO_GAME + SteamGridDb.images(key, gridId, slot, if (slot == Slot.ICON) 3 else 5).map { (thumb, full) -> Option(SGDB, thumb, full) } to SteamGridDb.Status.OK + } catch (e: Exception) { + Log.w(TAG, "$name: SteamGridDB failed (${e.javaClass.simpleName})") + emptyList<Option>() to ((e as? SteamGridDb.Failed)?.status ?: SteamGridDb.Status.SERVER) } + } + + fun searchGames(context: Context, term: String): Found<SteamGridDb.Game> = sgdb(context) { SteamGridDb.search(it, term) } + + fun gameImages(context: Context, id: Int, slot: Slot): Found<Option> = sgdb(context) { key -> + SteamGridDb.all(key, id, slot).map { (thumb, full) -> Option(SGDB, thumb, full) } + } + + private fun <T> sgdb(context: Context, call: (String) -> List<T>): Found<T> { val key = SteamGridDb.key(context) - if (key.isNotEmpty()) { - cache.mkdirs() - val gridId = remembered(File(cache, "sgdb-id")) { - runCatching { SteamGridDb.gameId(key, steamId?.toIntOrNull(), game.name) }.getOrNull()?.toString() - }?.toIntOrNull() - if (gridId != null) runCatching { SteamGridDb.images(key, gridId, slot, if (slot == Slot.ICON) 3 else 5) }.getOrNull() - ?.forEach { (thumb, full) -> out.add(Option(SGDB, thumb, full)) } + if (key.isEmpty()) return Found(emptyList(), SteamGridDb.Status.NO_KEY) + return try { + Found(call(key), SteamGridDb.Status.OK) + } catch (e: Exception) { + Log.w(TAG, "SteamGridDB: ${e.javaClass.simpleName}") + Found(emptyList(), (e as? SteamGridDb.Failed)?.status ?: SteamGridDb.Status.SERVER) } - return out } - /** Sets [slot] to [option] (a file is copied, a URL fetched) and records where it came from. False when it could not be had. Blocking. */ fun choose(context: Context, game: AddedGames.Game, slot: Slot, option: Option): Boolean { - val bytes = if (option.full.startsWith("https://")) get(option.full) else runCatching { File(option.full).readBytes() }.getOrNull() - bytes ?: return false - val ext = option.full.substringAfterLast('.', "png").substringBefore('?').lowercase().takeIf { it in CHOOSABLE + "ico" } ?: "png" - val cache = cacheDir(context, game).apply { mkdirs() } - chosen(cache, slot)?.delete() - val dst = File(cache, "chosen-${slot.key}.${if (ext == "jpeg") "jpg" else ext}") - val tmp = File(cache, dst.name + ".tmp") - tmp.writeBytes(bytes) - if (!tmp.renameTo(dst)) return false + if (!store(cacheDir(context, game), slot, option)) return false SessionPrefs.setAddedGameArtSource(context, game.folder.path, slot.key, option.group + "|" + option.full) return true } - /** Where the user's choice for [slot] came from and which image it was ("" both when automatic). */ + internal fun store(cache: File, slot: Slot, option: Option): Boolean { + val fresh = storeNew(cache, slot, option) ?: return false + dropOlder(cache, slot, fresh) + return true + } + + internal fun dropOlder(cache: File, slot: Slot, keep: File) { + cache.listFiles { f -> f != keep && CHOSEN.matchEntire(f.name)?.groupValues?.get(1) == slot.key }?.forEach { it.delete() } + } + + private val lastStamp = java.util.concurrent.atomic.AtomicLong(0) + + private fun nextStamp(): Long = lastStamp.updateAndGet { maxOf(it + 1, System.currentTimeMillis()) } + + internal fun storeNew(cache: File, slot: Slot, option: Option): File? { + val bytes = if (option.full.startsWith("https://")) get(option.full) else runCatching { File(option.full).readBytes() }.getOrNull() + bytes ?: return null + val ext = option.full.substringAfterLast('.', "png").substringBefore('?').lowercase().takeIf { it in CHOOSABLE + "ico" } ?: "png" + cache.mkdirs() + val suffix = if (ext == "jpeg") "jpg" else ext + var dst = File(cache, "chosen-${slot.key}-" + "%013d".format(nextStamp()) + "." + suffix) + while (dst.exists()) dst = File(cache, "chosen-${slot.key}-" + "%013d".format(nextStamp()) + "." + suffix) + val tmp = File(cache, dst.name + ".tmp") + tmp.writeBytes(bytes) + return if (tmp.renameTo(dst)) dst else null + } + fun chosenSource(context: Context, game: AddedGames.Game, slot: Slot): Pair<String, String> { val value = SessionPrefs.addedGameArtSource(context, game.folder.path, slot.key) return value.substringBefore('|') to value.substringAfter('|', "") } - /** [slot] back to what is found by itself. */ fun reset(context: Context, game: AddedGames.Game, slot: Slot) { chosen(cacheDir(context, game), slot)?.delete() SessionPrefs.setAddedGameArtSource(context, game.folder.path, slot.key, "") @@ -191,7 +214,6 @@ object AddedGameArt { try { c.responseCode == 200 } finally { c.disconnect() } }.getOrDefault(false) - /** The first icon inside the game's .exe, kept as a PNG beside the cached art. */ private fun exeIcon(context: Context, game: AddedGames.Game): File? { val cache = cacheDir(context, game) val png = File(cache, "icon.png") @@ -206,15 +228,11 @@ object AddedGameArt { return if (tmp.renameTo(png)) png else null } - /** - * Fetches the art that is missing: Steam first (the appid the game's files name, else a store - * search on its title whose result carries the same name), then SteamGridDB when a key is - * set. Each lookup runs once per game; a miss is retried after a week. Blocking: run it off - * the main thread. Returns true when anything new arrived. - */ fun fetchMissing(context: Context, games: List<AddedGames.Game>): Boolean { if (!SessionPrefs.addedGamesArt(context)) return false val sgdbKey = SteamGridDb.key(context) + val keyChangedAt = SteamGridDb.keyChangedAt(context) + var sgdbDown = false var changed = false for (game in games) { if (local(game).portrait != null) continue @@ -227,31 +245,40 @@ object AddedGameArt { val appId = match.appId?.takeIf { match.certainty == SteamMatch.Certainty.FILES } val id = match.appId?.toString() if (id != null && download(id, cache)) changed = true - if (File(cache, "p.jpg").isFile || sgdbKey.isEmpty()) continue - val gridId = remembered(File(cache, "sgdb-id")) { - runCatching { SteamGridDb.gameId(sgdbKey, appId ?: id?.toIntOrNull(), game.name) }.getOrNull()?.toString() - }?.toIntOrNull() ?: continue - if (runCatching { SteamGridDb.download(sgdbKey, gridId, cache) }.getOrDefault(false)) changed = true + if (File(cache, "p.jpg").isFile || sgdbKey.isEmpty() || sgdbDown) continue + val stored: String? = try { + remembered(File(cache, "sgdb-id"), keyChangedAt) { + SteamGridDb.gameId(sgdbKey, appId ?: id?.toIntOrNull(), game.name)?.toString() + } + } catch (e: Exception) { + Log.w(TAG, "${game.name}: SteamGridDB lookup failed (${e.javaClass.simpleName}); not asking again this pass") + sgdbDown = true + null + } + val gridId = stored?.toIntOrNull() ?: continue + val grabbed = try { + SteamGridDb.download(sgdbKey, gridId, cache) + } catch (e: Exception) { + sgdbDown = true + false + } + if (grabbed) changed = true } return changed } - /** - * The game's Steam app, the one record its Windows components use too ([SteamMatch]): what its - * files name, else a store search on its title ([search]) whose result has the same name. - */ internal fun steamMatch(context: Context, game: AddedGames.Game, search: (String) -> Int?): SteamMatch.Match { val match = SteamMatch.resolve(context, game.folder.path, game.exe, game.name, legacy = File(cacheDir(context, game), "steam-appid"), search = search) match.appId?.let { Log.i(TAG, "${game.name}: Steam app $it (${match.certainty.name.lowercase()})") } return match } - /** What [marker] remembers (an id, or "none" for a week), else [find]'s answer written to it. */ - private fun remembered(marker: File, find: () -> String?): String? { + internal fun remembered(marker: File, notBefore: Long = 0L, retryMiss: Boolean = false, find: () -> String?): String? { if (marker.isFile) { val value = marker.readText().trim() if (value != "none") return value - if (System.currentTimeMillis() - marker.lastModified() < RETRY_AFTER_MS) return null + val at = marker.lastModified() + if (!retryMiss && at >= notBefore && System.currentTimeMillis() - at < RETRY_AFTER_MS) return null } val found = find() marker.writeText(found ?: "none") @@ -262,11 +289,6 @@ object AddedGameArt { private val EDITION = Regex("(?i)\\b(complete|definitive|legendary|goty|game of the year|deluxe|ultimate|remastered)( edition)?\\b") - /** - * How well a result's name [got] matches the game's [name]: 3 the same, 2 the same once - * edition words are dropped, 1 one starts with the other; 0 no match. Nothing is taken for - * being the first result. - */ internal fun nameMatch(name: String, got: String): Int { val want = normalize(name) val wantShort = normalize(name.replace(EDITION, " ").trim().ifEmpty { name }) @@ -280,13 +302,11 @@ object AddedGameArt { } } - /** The id of the store result whose name matches [name] best, or null when none does. */ internal fun pickStoreResult(name: String, items: List<Pair<String, String>>): String? = items.map { (id, got) -> id to nameMatch(name, got) } .filter { it.second > 0 && it.first.isNotEmpty() } .maxByOrNull { it.second }?.first - /** The Steam appid whose store name matches [name], or null for no match. */ private fun search(name: String): String? { val term = name.replace(EDITION, " ").trim().ifEmpty { name } val json = get(STORE_SEARCH + URLEncoder.encode(term, "UTF-8"))?.toString(Charsets.UTF_8) ?: return null @@ -309,10 +329,6 @@ object AddedGameArt { return got } - /** - * Newer Steam games keep their art under hashed paths (store_item_assets/steam/apps/<id>/<hash>/…), - * where the fixed CDN names above 404. The store's item API names those paths; once per appid. - */ private fun steamAssetUrl(id: String, remote: String): String? { val assets = steamAssets.getOrPut(id) { runCatching { @@ -336,11 +352,6 @@ object AddedGameArt { private val steamAssets = java.util.concurrent.ConcurrentHashMap<String, Map<String, String>>() - /** - * When nothing else gave a cover (or header), one made from the exe's icon: the icon centred on - * its own colour, darkened toward the bottom, so the game still has a face in the list and in - * Steam. Made once per game; real art found later takes over because it is looked at first. - */ private fun exeArt(context: Context, game: AddedGames.Game, cover: Boolean): File? { val cache = cacheDir(context, game) val out = File(cache, if (cover) "p-exe.png" else "header-exe.png") diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/AddedGameEdits.kt b/app/src/main/java/com/droiddeck/launcher/frontend/AddedGameEdits.kt index df3a22f9b9..42b0877880 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/AddedGameEdits.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/AddedGameEdits.kt @@ -5,27 +5,16 @@ import com.droiddeck.launcher.session.SessionPrefs import com.droiddeck.launcher.stores.SteamLiveShortcuts import java.io.File -/** - * The game editor's writes for an added game, Steam's non-Steam Properties in the app: name, - * target, Start in, launch options and art. Each goes through the same shortcut - the listing the - * shortcuts writer reads, and the running client - on the appid the game already has, so an edit - * never makes a second shortcut. Each call is quick (the game alone, [AddedGames.single]); the - * client and the listing follow on [AddedGamesPublisher], in order. Call off the main thread. - */ object AddedGameEdits { - /** The added game in [folder] as it stands now, or null when it is not listed. */ fun game(context: Context, folder: String): AddedGames.Game? = AddedGames.single(context, folder) - /** The client told ([live]), then the listing rewritten, on [AddedGamesPublisher]. */ private fun publish(context: Context, live: () -> Unit) = AddedGamesPublisher.later(context, live) - /** [name] as the game's name; "" goes back to the name found by itself. */ fun setName(context: Context, folder: String, name: String): AddedGames.Game? { SessionPrefs.setAddedGameName(context, folder, name) return apply(context, folder) } - /** [exe] as the game's target; false when the session cannot see it. */ fun setExe(context: Context, folder: String, exe: File): Boolean { if (!exe.isFile || AddedGames.guestPath(context, exe) == null) return false SessionPrefs.setAddedGameExe(context, folder, exe.path) @@ -33,7 +22,6 @@ object AddedGameEdits { return true } - /** [dir] (a host folder) as the game's Start in; "" = the exe's own folder. False when the session cannot see it. */ fun setStartIn(context: Context, folder: String, dir: String): Boolean { val guest = if (dir.isBlank()) "" else AddedGames.guestPath(context, File(dir.trim())) ?: return false SessionPrefs.setAddedGameStartIn(context, folder, guest) @@ -46,23 +34,36 @@ object AddedGameEdits { return apply(context, folder) } - /** [slot] set to [option], then handed to the shortcut. False when the image could not be had. */ fun setArt(context: Context, folder: String, slot: AddedGameArt.Slot, option: AddedGameArt.Option): Boolean { val game = game(context, folder) ?: return false - if (!AddedGameArt.choose(context, game, slot, option)) return false - applyArt(context, game, slot) - return true + return synchronized(SteamGrid.lock) { + if (!AddedGameArt.choose(context, game, slot, option)) return@synchronized false + applyArt(context, game, slot) + true + } } - /** [slot] back to automatic, then handed to the shortcut. */ fun resetArt(context: Context, folder: String, slot: AddedGameArt.Slot) { val game = game(context, folder) ?: return - AddedGameArt.reset(context, game, slot) - applyArt(context, game, slot) + synchronized(SteamGrid.lock) { + AddedGameArt.reset(context, game, slot) + applyArt(context, game, slot) + } + } + + fun logoPosition(context: Context, folder: String): LogoPosition.Value? = + game(context, folder)?.let { SteamGrid.position(SteamGrid.target(it, context)) } + + fun setLogoPosition(context: Context, folder: String, value: LogoPosition.Value?): Boolean { + val game = game(context, folder) ?: return false + if (!SteamGrid.writePosition(context, SteamGrid.target(game, context), value)) return false + publish(context) { SteamLiveShortcuts.setLogoPosition(context, game.appId, value) } + return true } private fun applyArt(context: Context, game: AddedGames.Game, slot: AddedGameArt.Slot) { val file = AddedGameArt.describe(context, game).first { it.slot == slot }.file + if (slot != AddedGameArt.Slot.ICON) SteamGrid.write(context, SteamGrid.target(game, context), slot, AddedGameArt.chosen(AddedGameArt.cacheDir(context, game), slot)) publish(context) { if (slot == AddedGameArt.Slot.ICON) SteamLiveShortcuts.setArt(context, game.appId, null, null, iconPath = file?.absolutePath.orEmpty()) else SteamLiveShortcuts.setArt(context, game.appId, slot.assetType, file) diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/AddedGames.kt b/app/src/main/java/com/droiddeck/launcher/frontend/AddedGames.kt index a4ce68acbe..f0808edab5 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/AddedGames.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/AddedGames.kt @@ -6,12 +6,12 @@ import com.droiddeck.launcher.runtime.LinuxRuntime import org.json.JSONObject import com.droiddeck.launcher.session.GameStorage import com.droiddeck.launcher.session.SessionPrefs +import com.droiddeck.launcher.stores.Store import com.droiddeck.launcher.stores.StoreGameSidecar import com.droiddeck.launcher.stores.StoreInstallRoot import java.io.File import java.util.zip.CRC32 -/** Windows game folders shared with the Steam session. */ object AddedGames { private const val TAG = "AddedGames" private const val LIBRARY = "/mnt/droiddeck-sd" @@ -19,38 +19,23 @@ object AddedGames { class Game( val folder: File, val name: String, - /** The game's own .exe: what the icon is read from and what the settings page lists. */ val exe: File, - /** The guest path the shortcut runs: [exe], or a store install's launcher .bat in front of it. */ val guestExe: String, val guestDir: String, - /** The client's 32-bit appid for this shortcut, as an unsigned value. */ val appId: Long, - /** What steam://rungameid/ takes for a shortcut. */ val gameId: Long, val candidates: List<File>, val steamAppId: Int? = null, - /** Where the game came from: a store's id, or [Library.ADDED] for a folder the user added. */ val source: String = Library.ADDED, - /** The store's own id for the game, from its sidecar; null for a plain added folder. */ val storeId: String? = null, - /** The exe is the picker's guess and nothing clearly won ([GameExePicker.Ranking.uncertain]). */ val exeUncertain: Boolean = false, - /** Steam's launch options for the shortcut; "" for none. */ val launchOptions: String = "", - /** Added from the Games tab (an entry of its own), not found in a Games folder. */ val single: Boolean = false, ) { fun folderName(): String = folder.name } - /** A Games folder an earlier build had, and where the session sees it. */ class Root(val host: File, val guest: String) - /** - * The Games folders earlier builds had, bound into the session at the guest paths they had - * then (/root/Games/<name>), so the games in them (entries now, [GamesFolderMigration]) keep - * their paths and shortcuts. Nothing adds one any more. - */ fun roots(context: Context): List<Root> { GamesFolderMigration.run(context) return SessionPrefs.gameFolderBinds(context).map { (host, guest) -> Root(File(host), guest) } @@ -61,14 +46,10 @@ object AddedGames { "|.*installer.*|.*uninstall.*|.*updater?.*|.*config(ur.*)?|.*settings.*|.*editor.*|.*server.*|.*benchmark.*|.*helper.*|.*eac.*|.*easyanticheat.*|.*battleye.*)\\.exe$", ) - /** Under here the chosen Games folders are bound inside the session, one each. */ const val GUEST_DIR = "/root/Games" - /** Where a host path appears inside the session, or null when the session cannot see it. */ fun guestPath(context: Context, host: File): String? { val path = host.absolutePath - // The Games folders are bound on their own, so a folder anywhere - an SD card, a USB - // drive - works without being inside one of the other binds. for (root in roots(context)) { val dir = root.host.absolutePath if (path == dir) return root.guest @@ -77,26 +58,19 @@ object AddedGames { SessionPrefs.romsDir(context).takeIf { it.isNotEmpty() }?.let { roms -> if (path.startsWith("$roms/")) return "/root/ROMs/" + path.removePrefix("$roms/") } - // A store root on a card has a bind of its own, before the library rule: the same folder - // keeps the same guest path (and appid) whether or not that card is also the Steam library. StoreInstallRoot.externalGuestPath(context, host)?.let { return it } GameStorage.effective(context)?.let { lib -> if (path.startsWith("${lib.path}/")) return "$LIBRARY/" + path.removePrefix("${lib.path}/") } - // Inside the runtime's own tree (store installs on internal storage live at - // root/Games/Stores): the tree is the session's / and needs no bind. val runtime = LinuxRuntime.rootDir(context).absolutePath if (path.startsWith("$runtime/")) return "/" + path.removePrefix("$runtime/") - // Internal storage, bound at /root/Storage in every session: an exe picked anywhere on it. val storage = android.os.Environment.getExternalStorageDirectory().absolutePath if (path.startsWith("$storage/")) return "/root/Storage/" + path.removePrefix("$storage/") return null } - /** The .exe files a game folder offers, best first ([GameExePicker]); declared Store exes lead. */ fun candidates(folder: File): List<File> = rank(folder).exes - /** [GameExePicker]'s ranking, with a Store-declared executable taking precedence when present. */ fun rank(folder: File): GameExePicker.Ranking { val key = "${folder.path}|${folder.lastModified()}" val now = System.currentTimeMillis() @@ -115,20 +89,11 @@ object AddedGames { return result } - /** A folder's ranking for a minute, so one add (rank, then the game built from it) walks it once. */ private val ranked = java.util.concurrent.ConcurrentHashMap<String, Pair<Long, GameExePicker.Ranking>>() private const val RANK_FRESH_MS = 60_000L - /** - * Names identified from an exe (Steam manifest, GOG info, version resource), by the exe's path, - * size and time and its game folder's time (a GOG info file dropped in changes the latter). - */ private val identified = java.util.concurrent.ConcurrentHashMap<String, String>() - /** - * The game's own title for [exe] when the disk names one ([GameIdentifier]: a Steam manifest, - * a GOG info file, the exe's version resource), else null (the folder name stands). - */ internal fun identifiedName(folder: File, exe: File): String? { val key = "${exe.path}|${exe.length()}|${exe.lastModified()}|${folder.lastModified()}" identified[key]?.let { return it.ifEmpty { null } } @@ -141,13 +106,6 @@ object AddedGames { return name } - /** - * The exe's version resource often spells the title the way a programmer typed it ("Insane2") - * while the folder has the real spacing ("Insane 2"). When both spell the same letters and - * digits, the one with more word breaks wins; a tie keeps mixed case over all one case - * ("DiRT 3" over "dirt 3"), else the exe's spelling. Different titles keep the exe's. - */ - /** "Watch_Dogs" → "Watch Dogs": an underscore in a version-resource title is a programmer's space. */ internal fun underscoresToSpaces(name: String): String = name.replace('_', ' ').replace(Regex("\\s+"), " ").trim().ifEmpty { name } @@ -163,7 +121,6 @@ object AddedGames { else -> peName } } - /** The executables MicrosoftGame.config or appxmanifest.xml declares that exist inside [folder]. */ internal fun declaredExes(folder: File): List<File> { val names = DECLARED.flatMap { (file, pattern) -> runCatching { pattern.findAll(File(folder, file).readText()).map { it.groupValues[1] }.toList() }.getOrDefault(emptyList()) @@ -182,6 +139,10 @@ object AddedGames { "appxmanifest.xml" to Regex("<Application\\b[^>]*?\\bExecutable\\s*=\\s*\"([^\"]+)\"", RegexOption.IGNORE_CASE), ) + /** The card's Steam libraries: the arm64 client's steamapps and the x86-64 client's own folder beside it. */ + internal fun isSteamLibraryFolder(name: String): Boolean = + name.equals("steamapps", ignoreCase = true) || name == com.droiddeck.launcher.session.GameStorage.X64_CARD_DIR + fun scan(context: Context): List<Game> { val out = ArrayList<Game>() GamesFolderMigration.run(context) @@ -194,31 +155,21 @@ object AddedGames { if (!dir.isDirectory) { Log.w(TAG, "$dir is not a folder; skipped"); continue } val steamInstalls = steamInstallDirs(dir) for (folder in dir.listFiles { f -> f.isDirectory }?.sortedBy { it.name.lowercase() } ?: emptyList()) { - if (folder.name.lowercase() in steamInstalls || folder.name.equals("steamapps", ignoreCase = true)) continue - // Removed from the list by the user (the folder stays on disk); restored from the settings page. + if (folder.name.lowercase() in steamInstalls || isSteamLibraryFolder(folder.name)) continue if (folder.path in removed) continue - // The store install root sits inside the Games storage; its games are scanned below, per store. if (folder.name == "Games" && StoreInstallRoot.roots(context).any { it.absolutePath == folder.absolutePath }) continue scanGame(context, folder, out) } } - // Games added as one picked exe (the Games tab's +), by that exe's folder. for (entry in AddedExes.list(context)) { val folder = File(entry.folder) if (folder.path in removed || !folder.isDirectory) continue scanGame(context, folder, out, single = entry) } - // Games the Stores section installed: one folder each under <root>/<Store>/, with a sidecar. - // An unfinished one (sidecar still `installing`, or none at all) is neither a game nor Custom. for (folder in StoreInstallRoot.gameFolders(context)) if (StoreInstallRoot.isFinished(folder)) scanGame(context, folder, out) return out.distinctBy { it.folder.canonicalPath } } - /** - * The game in [folderPath] alone, built by the same rules as [scan] (store sidecar, an entry - * from the Games tab, the chosen exe, the edits) without walking every other game: what the - * editor needs for one game. Null when that folder is not a game, or was removed. - */ fun single(context: Context, folderPath: String): Game? { val folder = File(folderPath) if (!folder.isDirectory || folderPath in SessionPrefs.removedAddedGames(context)) return null @@ -227,12 +178,6 @@ object AddedGames { return out.firstOrNull() } - /** - * Stops listing the added game in [folder] at once: marked removed and dropped from the - * library cache; the running client loses its shortcut ([appId], else the one stored for the - * folder) and the listing is rewritten afterwards ([AddedGamesPublisher]). Nothing on disk is - * deleted. Quick; call off the main thread (preferences and a small file). - */ fun remove(context: Context, folder: File, appId: Long? = null, name: String = folder.name) { val app = context.applicationContext val started = android.os.SystemClock.elapsedRealtime() @@ -243,13 +188,10 @@ object AddedGames { AddedGamesPublisher.later(app) { if (id != null) com.droiddeck.launcher.stores.SteamLiveShortcuts.remove(app, id) } } - /** What [addExe] did with a picked exe. */ sealed class AddResult { - /** A new game, or the existing one the exe already is, or the listed game whose exe it now is. */ class Added(val game: Game) : AddResult() class Existing(val game: Game) : AddResult() class Switched(val game: Game) : AddResult() - /** The session cannot see the exe's path. */ object Unreachable : AddResult() object NotFound : AddResult() } @@ -258,11 +200,6 @@ object AddedGames { private fun inside(path: String, folder: String) = path.startsWith(folder.trimEnd('/') + "/") - /** - * The game folder [exe] belongs to, without a scan: an entry from the Games tab (Games folders - * of earlier builds included), a removed game, a store install, or the first-level folder under - * the Steam library that holds it. Null when it is in none. - */ private fun ownerFolder(context: Context, exe: File): File? { GamesFolderMigration.run(context) val path = canonical(exe) @@ -270,7 +207,6 @@ object AddedGames { AddedExes.list(context).map { File(it.folder) }.firstOrNull(::holds)?.let { return it } SessionPrefs.removedAddedGames(context).map { File(it) }.firstOrNull(::holds)?.let { return it } StoreInstallRoot.gameFolders(context).firstOrNull(::holds)?.let { return it } - // Games folders of earlier builds are entries now, found above. val dirs = listOfNotNull( GameStorage.effective(context)?.let { File(it.path, "steamapps/common") }, GameStorage.effective(context)?.let { File(it.path) }, @@ -279,17 +215,11 @@ object AddedGames { val base = canonical(dir) if (!inside(path, base)) continue val first = path.removePrefix("$base/").substringBefore('/') - File(dir, first).takeIf { it.isDirectory && first != "steamapps" }?.let { return it } + File(dir, first).takeIf { it.isDirectory && !isSteamLibraryFolder(first) }?.let { return it } } return null } - /** - * Adds the game [exe] is: the game itself when it is listed already, that game's exe switched - * when [exe] sits in a listed (or removed) game's folder, else a new game for [exe]'s folder. - * Only that one game is read; Steam (the running client, then the listing) follows on - * [AddedGamesPublisher]. Nothing is added when the session cannot see the path. - */ fun addExe(context: Context, exe: File): AddResult { val app = context.applicationContext if (!exe.isFile) return AddResult.NotFound @@ -309,15 +239,8 @@ object AddedGames { return if (owner == null) AddResult.Added(game) else AddResult.Switched(game) } - /** What [addFolder] did: the games it added, and how many of the folder's games were listed already. */ class FolderResult(val added: List<Game>, val already: Int) - /** - * "Add all games in this folder": every subfolder of [dir] with an .exe becomes a game with - * [GameExePicker]'s best one (marked uncertain where nothing clearly won), as an entry of its - * own, not a Games folder. A subfolder that is, holds or sits in a listed game counts as - * already there; a removed one comes back. Steam follows once, on [AddedGamesPublisher]. Blocking. - */ fun addFolder(context: Context, dir: File, onGame: (Game) -> Unit = {}, onChecking: (String?) -> Unit = {}): FolderResult { val app = context.applicationContext val removed = SessionPrefs.removedAddedGames(app).toSet() @@ -343,11 +266,6 @@ object AddedGames { return FolderResult(added, already) } - /** - * The game folders already listed, without building any game: the first-level folders of the - * Steam library (as [scan] walks them), the Games tab's entries (Games folders of earlier builds - * included) and the store installs. Canonical paths; removed games are left out. - */ private fun listedFolders(context: Context, removed: Set<String>): List<String> { val out = ArrayList<String>() GamesFolderMigration.run(context) @@ -357,7 +275,7 @@ object AddedGames { ) for (dir in dirs.distinctBy { it.absolutePath }) { for (folder in dir.listFiles { f -> f.isDirectory }.orEmpty()) { - if (folder.path in removed || folder.name.equals("steamapps", ignoreCase = true)) continue + if (folder.path in removed || isSteamLibraryFolder(folder.name)) continue if (folder.name == "Games" && StoreInstallRoot.roots(context).any { it.absolutePath == folder.absolutePath }) continue out.add(canonical(folder)) } @@ -367,11 +285,6 @@ object AddedGames { return out } - /** - * The folders under a library's steamapps/common that a manifest beside it already claims. - * Steam lists those itself, so a shortcut would only add a non-Steam copy of the game. Steam - * may lowercase installdir on Android's case-insensitive storage, so names compare lowercased. - */ internal fun steamInstallDirs(dir: File): Set<String> { val steamapps = dir.parentFile?.takeIf { dir.name == "common" && it.name == "steamapps" } ?: return emptySet() return steamapps.listFiles { f -> f.isFile && f.name.startsWith("appmanifest_") && f.name.endsWith(".acf") } @@ -385,33 +298,27 @@ object AddedGames { private val INSTALL_DIR = Regex("\"installdir\"\\s*\"([^\"]*)\"", RegexOption.IGNORE_CASE) - /** [single]: the entry a game added from the Games tab has; its exe stands in when no other is chosen and the user picked it. */ private fun scanGame(context: Context, folder: File, out: MutableList<Game>, single: AddedExes.Entry? = null) { run { - // A store install carries a sidecar; every one of them is a shortcut. val sidecar = StoreGameSidecar.read(folder) + sidecar?.takeIf { it.id.isNotEmpty() }?.let { SessionPrefs.followStoreGame(context, "${it.store.id}:${it.id}", folder.path) { old -> !File(old).exists() } } val ranking = rank(folder) val candidates = ranking.exes val picked = SessionPrefs.addedGameExe(context, folder.path) val chosen = picked.takeIf { it.isNotEmpty() }?.let { File(it) }?.takeIf { it.isFile } ?: single?.takeIf { it.picked }?.let { File(it.exe) }?.takeIf { it.isFile } - // A store install says which exe it is; the folder's guess only when that file is gone. val found = chosen ?: sidecar?.exeFile(folder)?.takeIf { it.isFile } ?: candidates.firstOrNull() ?: return - // The store's launcher .bat stands in front of the exe when the game needs arguments or - // environment; it is what the shortcut runs. Dropped when the user picked another exe. - val launch = if (chosen == null) sidecar?.launcherFile(folder)?.takeIf { it.isFile } ?: found else found + val epicLauncher = sidecar?.takeIf { it.store == Store.EPIC && (chosen == null || canonical(chosen) == canonical(it.exeFile(folder))) } + ?.launcherFile(folder)?.takeIf { it.isFile } + val launch = epicLauncher ?: if (chosen == null) sidecar?.launcherFile(folder)?.takeIf { it.isFile } ?: found else found val foundGuest = guestPath(context, launch) if (foundGuest == null) { Log.w(TAG, "${folder.name}: the session cannot see ${launch.path}"); return } - // A store install's title; else the title the disk gives (the shortcut's appid is kept - // per folder from its first scan, so a name found later does not move it); else the folder. val autoName = sidecar?.title ?: identifiedName(folder, found) ?: folder.name - // Keyed by the pre-rename path so shortcut ids, and the prefixes and saves under them, stay put. val crc = CRC32().apply { update(("\"${foundGuest.replaceFirst(Regex("^$LIBRARY/"), "$LEGACY_LIBRARY/")}\"" + autoName).toByteArray()) }.value val appId = SessionPrefs.addedGameAppId(context, folder.path, crc or 0x80000000L) - val config = accountConfig(File(LinuxRuntime.rootDir(context), "root/.local/share/Steam")) + val config = accountConfig(SessionPrefs.activeSteamRoot(context)) val record = config?.let { shortcutRecord(it, appId) } val rev = record?.optInt("rev", 0) ?: 0 - // Name, Start in and launch options edited in Steam's own Properties become the app's. if (sidecar == null && record != null) adoptSteamEdits(context, folder, record) val name = SessionPrefs.addedGameName(context, folder.path).takeIf { sidecar == null && it.isNotEmpty() } ?: autoName val adopted = guestPath(context, folder) @@ -431,7 +338,7 @@ object AddedGames { } } - private fun accountConfig(root: File): File? { + 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]) } @@ -444,6 +351,9 @@ object AddedGames { JSONObject(File(config, ".droiddeck-routes.json").readText()).optInt(appId.toString()).takeIf { it > 0 } }.getOrNull() + fun inSteam(context: Context, appId: Long): Boolean = + accountConfig(SessionPrefs.activeSteamRoot(context))?.let { shortcutRecord(it, appId) } != null + private fun shortcutRecord(config: File, appId: Long): JSONObject? = runCatching { JSONObject(File(config, ".droiddeck-shortcuts.json").readText()).optJSONObject("games")?.optJSONObject(appId.toString()) }.getOrNull() @@ -460,12 +370,6 @@ object AddedGames { private fun unquote(value: String?): String = value.orEmpty().trim().trim('"') - /** - * What the user changed in Steam's Properties since the app last wrote the shortcut ([record]: - * what the app asked for, and what Steam had): a new name, launch options, or a Start in other - * than the exe's folder, taken over as the app's own. Each Steam value is taken once, so an app - * edit made after it is not undone before the shortcut is written again. - */ internal fun adoptSteamEdits(context: Context, folder: File, record: JSONObject) { val app = record.optJSONObject("app") ?: return val steam = record.optJSONObject("steam") ?: return @@ -489,8 +393,8 @@ object AddedGames { } } - /** The list the session hands the runtime's shortcuts writer; one file per session start. */ - fun writeListing(context: Context, games: List<Game>): File { + fun writeListing(context: Context, games: List<Game>, + extra: List<JSONObject> = listOfNotNull(com.droiddeck.launcher.stores.epic.EpicClient.steamListing(context))): File { val file = File(context.filesDir, "session/added-games.json").apply { parentFile?.mkdirs() } val json = StringBuilder("[") games.forEachIndexed { i, g -> @@ -500,14 +404,17 @@ object AddedGames { .append(",\"dir\":").append(quote(g.guestDir)).append(",\"appid\":").append(g.appId) .append(",\"seen\":").append(SessionPrefs.addedGameExeSeen(context, g.folder.path)) if (g.launchOptions.isNotEmpty()) json.append(",\"launch\":").append(quote(g.launchOptions)) - // The art, as the session sees it: the app's cache is bound at its own path, a file in - // the game's folder at the folder's guest path. + if (g.source != Library.ADDED) json.append(",\"store\":").append(quote(g.source)) val art = AddedGameArt.resolve(context, g) val pieces = listOf("p" to art.portrait, "header" to art.header, "hero" to art.hero, "logo" to art.logo, "icon" to art.icon) .mapNotNull { (k, f) -> f?.let { file -> artGuestPath(context, file)?.let { k to it } } } if (pieces.isNotEmpty()) json.append(",\"art\":{").append(pieces.joinToString(",") { (k, v) -> quote(k) + ":" + quote(v) }).append('}') json.append('}') } + extra.forEachIndexed { i, entry -> + if (games.isNotEmpty() || i > 0) json.append(',') + json.append(entry.toString()) + } file.writeText(json.append(']').toString()) return file } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/AddedGamesPublisher.kt b/app/src/main/java/com/droiddeck/launcher/frontend/AddedGamesPublisher.kt index 19243b8e8f..c70b2a895a 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/AddedGamesPublisher.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/AddedGamesPublisher.kt @@ -5,23 +5,15 @@ import android.util.Log import androidx.annotation.VisibleForTesting import java.util.concurrent.Executors -/** - * The slow part of an added-game change, off the caller's path and in order: the running client - * told ([later]'s work), then the listing the shortcuts writer reads at the next session start and - * the library cache, both from one scan ([republish]). An add, an edit or a removal shows at once; - * this follows. - */ object AddedGamesPublisher { private const val TAG = "AddedGamesPublisher" - /** Tests publish at once, to read the listing right after a change. */ @VisibleForTesting @Volatile internal var now = false private val worker = Executors.newSingleThreadExecutor { r -> Thread(r, "added-games-publish") } - /** [live] (a DevTools call or nothing), then [republish], on the worker. */ fun later(context: Context, live: () -> Unit = {}) { val app = context.applicationContext val work = Runnable { @@ -31,10 +23,10 @@ object AddedGamesPublisher { if (now) work.run() else worker.execute(work) } - /** The listing and the library cache from one scan of the added games. Blocking. */ fun republish(context: Context) { val games = AddedGames.scan(context) AddedGames.writeListing(context, games) - LibraryCache.save(context, Library.launchableGames(context, added = games)) + val arch = com.droiddeck.launcher.session.SessionPrefs.activeSteamClientArch(context) + LibraryCache.save(context, Library.launchableGames(context, added = games, arch = arch), arch == "x86_64") } } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/AutoComponents.kt b/app/src/main/java/com/droiddeck/launcher/frontend/AutoComponents.kt index b71c8c1a4d..fc32744273 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/AutoComponents.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/AutoComponents.kt @@ -16,29 +16,12 @@ import org.json.JSONObject import java.io.File import java.util.concurrent.PriorityBlockingQueue -/** - * Turns on, per game, the Windows components its source's list names ([WinCompSources]). Only the - * findings marked auto are turned on, only the ones that install here, and never one the user - * switched off: the user's switches are kept apart ([WinComponents.Selection.user]) and win. - * - * All the work is done by one background thread (low priority, so are the runtime helpers it - * starts), one job at a time from one queue: working out a game's list (kept, so a page opens on - * it) and downloading a component (each once, whichever games want it). The queue waits while a - * session runs; jobs nobody asked for (the start-up sweep, a game being launched) also wait on - * battery saver, a warm device or a metered network. Nothing here runs on the caller's thread. - */ object AutoComponents { private const val TAG = "AutoComponents" - /** The key a game's picks are kept under: the appid its prefix is named after. */ fun appKey(game: Library.SteamGame): String? = if (game.library == Library.ADDED) Integer.toUnsignedString(game.appId) else game.appId.takeIf { it > 0 }?.toString() - /** - * What turns on by itself for [findings], given [catalog] and what is [installed]: the catalog - * name each auto finding installs as, with its reason. A component that needs a Windows - * installer, or is not in the catalog, stays out (the editor lists it as a suggestion). - */ fun autoPicks(findings: List<WinCompSources.Finding>, catalog: Map<String, WinComponents.Component>): Map<String, WinComponents.AutoReason> { val out = LinkedHashMap<String, WinComponents.AutoReason>() for (f in findings) { @@ -51,30 +34,22 @@ object AutoComponents { return out } - // ---- seams for tests ---- @VisibleForTesting internal var catalogOf: (Context, Boolean) -> List<WinComponents.Component>? = { c, network -> if (network) WinComponents.fetch(c) else WinComponents.cached(c) } @VisibleForTesting internal var installedOf: (Context) -> Set<String> = { WinComponents.installedIds(it).toSet() } @VisibleForTesting internal var installer: (Context, WinComponents.Component, Map<String, WinComponents.Component>, (WinComponents.Progress) -> Unit) -> String? = { c, comp, all, progress -> WinComponents.install(c, comp, all, progress) } @VisibleForTesting internal var sessionRunning: () -> Boolean = { SessionState.running } - /** Battery saver, a warm device or a metered network: no work nobody asked for. */ @VisibleForTesting internal var unfavourable: (Context) -> Boolean = { c -> constrained(c) } - /** A usable network: a download waits for one. */ @VisibleForTesting internal var online: (Context) -> Boolean = { c -> isOnline(c) } - /** Tests run the queue on the caller's thread ([drain]) instead of the worker. */ @VisibleForTesting @Volatile internal var runNow = false - /** Bumped whenever a game's list or automatic components change, so an open page reads them again. */ val changes = MutableStateFlow(0) - /** The components downloading for an automatic pick right now, with their progress. */ val downloading = MutableStateFlow<Map<String, WinComponents.Progress>>(emptyMap()) - /** Games (by [appKey]) whose list is queued or being worked out: a page waits on it. */ val pendingGames = MutableStateFlow<Set<String>>(emptySet()) - /** Components queued for an automatic pick, not yet downloaded. */ val pendingComponents = MutableStateFlow<Set<String>>(emptySet()) private fun mark(job: Job, on: Boolean) { @@ -84,10 +59,8 @@ object AutoComponents { flow.value = if (on) flow.value + id else flow.value - id } - /** One piece of work: a game's list ([game]) or one component's download ([component]). [asked]: the user is waiting on it. */ internal class Job( val game: Library.SteamGame?, val component: String?, val asked: Boolean, val seq: Long, val pics: List<Int>? = null, - /** For a game Steam installed during the running session: may run in it, unless a game is running. */ val inSession: Boolean = false, ) { val key get() = when { @@ -95,24 +68,17 @@ object AutoComponents { component != null -> "c:$component" else -> "g:" + (game?.let { appKey(it) } ?: "") } - /** Needs the network: a download, or Steam asked anonymously. */ val online get() = component != null || pics != null } private val seq = java.util.concurrent.atomic.AtomicLong() - /** What the user asked for first, then in the order queued. */ private val jobs = PriorityBlockingQueue<Job>(16, compareByDescending<Job> { it.asked }.thenBy { it.seq }) @Volatile private var draining = false private val queuedKeys = java.util.Collections.synchronizedSet(HashSet<String>()) - /** The games waiting on a component's download, to turn it on for when it lands. */ private val waiting = HashMap<String, MutableList<Library.SteamGame>>() @Volatile private var worker: Thread? = null private const val PAUSE_MS = 15_000L - /** - * [game]'s list worked out again on the worker, and its components queued: [asked] when the - * user is waiting (its page is open, or they installed or added it). - */ fun queueGame(context: Context, game: Library.SteamGame, asked: Boolean) { if (appKey(game) == null) return enqueue(context, Job(game, null, asked, seq.incrementAndGet())) @@ -121,10 +87,8 @@ object AutoComponents { private fun queueDownload(context: Context, id: String, asked: Boolean, inSession: Boolean = false) = enqueue(context, Job(null, id, asked, seq.incrementAndGet(), inSession = inSession)) - /** Adds [job] unless the same one is queued (a game or a component, once each). */ private fun enqueue(context: Context, job: Job) { if (!queuedKeys.add(job.key)) { - // Asked for now: ahead of what nobody asked for, so the open page does not wait behind the sweep. if (job.asked && jobs.removeIf { it.key == job.key && !it.asked }) jobs.add(job) if (runNow && !draining) drain(context) return @@ -135,12 +99,10 @@ object AutoComponents { if (runNow) { if (!draining) drain(context) } else ensureWorker(context.applicationContext) } - /** Whether [job] has to wait: always while a session runs; one nobody asked for also when it is unfavourable. */ internal fun mustWait(context: Context, job: Job): Boolean = if (job.inSession && sessionRunning()) gameRunning() || (job.online && !online(context)) else sessionRunning() || (job.online && !online(context)) || (!job.asked && unfavourable(context)) - /** A game is running in the session (Steam's reaper, or Proton waiting on its game). */ @VisibleForTesting internal var gameRunning: () -> Boolean = { gameProcessRunning() } private fun gameProcessRunning(): Boolean = File("/proc").listFiles()?.any { p -> @@ -148,17 +110,11 @@ object AutoComponents { ?.let { it.contains("SteamLaunch AppId=") || it.contains("proton waitforexitandrun") } == true } == true - /** - * A game Steam installed during the running session: its list worked out and its components - * readied in the session (one job, low priority), so a launch right after finds them; it - * waits while a game runs. All other work stays paused until the session ends. - */ fun queueInSession(context: Context, game: Library.SteamGame) { if (appKey(game) == null) return enqueue(context, Job(game, null, true, seq.incrementAndGet(), inSession = true)) } - /** Runs the queued jobs on this thread until the queue is empty or the next one has to wait. Tests. */ @VisibleForTesting internal fun drain(context: Context) { draining = true @@ -173,7 +129,6 @@ object AutoComponents { } } - /** The first job in order that may run now, taken off the queue; null when none may. */ private fun next(context: Context): Job? = synchronized(jobs) { val job = jobs.sortedWith(order).firstOrNull { !mustWait(context, it) } ?: return null jobs.remove(job) @@ -190,8 +145,6 @@ object AutoComponents { worker = Thread({ android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND) while (true) { - // Something queued, then the first that may run (one for a game installed in the - // session goes ahead of paused work); else a look again in a while. try { jobs.put(jobs.take()) } catch (e: InterruptedException) { return@Thread } val job = next(app) if (job == null) { @@ -219,21 +172,14 @@ object AutoComponents { } } - /** - * [game]'s list (worked out again only when what it is read from changed), its automatic - * components that are downloaded turned on, and the rest queued for download. - */ private fun apply(context: Context, game: Library.SteamGame, asked: Boolean, inSession: Boolean = false) { val key = appKey(game) ?: return val folder = game.gameFiles if (game.library == Library.ADDED && game.source == Library.ADDED && folder != null && SteamMatch.get(context, folder.path) == null) { AddedGames.single(context, folder.path)?.let { SteamMatch.resolve(context, folder.path, it.exe, it.name) } } - // A GOG or Epic game installed before its sidecar kept the store's list: read it once from the store. val store = com.droiddeck.launcher.stores.Store.byId(game.source) if (folder != null && (store == com.droiddeck.launcher.stores.Store.GOG || store == com.droiddeck.launcher.stores.Store.EPIC)) StoreListBackfill.fill(context, folder) - // Its Steam app, when the client never saw it: Steam asked anonymously now if the user is - // waiting on this game (a pass over every game asks for all of them in one go, [sweep]). if (asked && online(context)) steamAppOf(context, game)?.let { SteamAppInfo.lookup(context, listOf(it)) } val findings = findings(context, game) val catalog = (catalogOf(context, false) ?: catalogOf(context, true))?.associateBy { it.name } ?: return @@ -249,7 +195,6 @@ object AutoComponents { queueDownload(context, id, asked, inSession) missing.add(id) } - // In a session the launch waits a little for these (droiddeck-wincomponents reads the list). if (inSession) Pending.set(context, key, missing) val before = WinComponents.selection(context, key).auto if (before.keys != kept.keys) { @@ -259,7 +204,6 @@ object AutoComponents { changes.value = changes.value + 1 } - /** One component downloaded and installed, then turned on for every game waiting on it. */ private fun download(context: Context, id: String, asked: Boolean, inSession: Boolean = false) { val catalog = catalogOf(context, true)?.associateBy { it.name } ?: run { Pending.drop(context, id); return } if (id !in installedOf(context)) { @@ -279,10 +223,6 @@ object AutoComponents { Pending.drop(context, id) } - /** - * The components still being readied for games installed in the session, where the launch - * reads them (~/.config/droiddeck/wincomponents-pending.json in the runtime). - */ internal object Pending { private fun file(context: Context) = File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), "root/.config/droiddeck/wincomponents-pending.json") @@ -315,11 +255,9 @@ object AutoComponents { } } - // ---- the list, kept per game ---- private const val FINDINGS = "wincomp-findings.json" - /** What the list is read from, by modification time: a change means it is worked out again. */ internal fun signature(context: Context, game: Library.SteamGame): String { val folder = game.gameFiles val parts = listOfNotNull( @@ -334,7 +272,6 @@ object AutoComponents { return parts.joinToString("|") } - /** [game]'s list: the one kept when nothing it is read from changed, else worked out again and kept. Worker only. */ internal fun findings(context: Context, game: Library.SteamGame): List<WinCompSources.Finding> { val key = appKey(game) ?: return emptyList() val sig = signature(context, game) @@ -345,7 +282,6 @@ object AutoComponents { return fresh } - /** The list kept for [appKey], without working anything out; null before the first time. */ fun cachedFindings(context: Context, appKey: String): List<WinCompSources.Finding>? = readFindings(context).optJSONObject(appKey)?.let { decode(it.optJSONArray("findings")) } @@ -374,34 +310,21 @@ object AutoComponents { WinCompSources.Finding(o.optString("component").takeIf { it.isNotEmpty() }, o.optString("original"), origin, o.optBoolean("auto"), args) } - // ---- when ---- - /** Before a launch from DroidDeck: nothing but a queued look (it waits for the session to end). */ fun beforeLaunch(context: Context, game: Library.SteamGame) = queueGame(context, game, asked = false) - /** After an install or an add: the user did it, so it does not wait on a metered network. */ fun refreshLater(context: Context, game: Library.SteamGame) = queueGame(context, game, asked = true) - /** - * Every game, whatever its source, at app start and after each session (Steam installs its - * games without a word to DroidDeck; older GOG and Epic installs get their list read once): - * only queued, one game at a time, behind anything asked for, under the same conditions. A - * game whose files did not change costs a look at their times. - */ fun sweep(context: Context, games: List<Library.SteamGame>) { - // First every Steam app these games are that the client never saw, asked of Steam in one - // connection; then each game's list. val apps = games.mapNotNull { steamAppOf(context, it) }.distinct() if (apps.isNotEmpty() && SteamAppInfo.needLookup(context, apps).isNotEmpty()) enqueue(context, Job(null, null, false, seq.incrementAndGet(), pics = apps)) games.forEach { queueGame(context, it, asked = false) } } - /** The Steam app whose list a game takes: a Steam game's own, or an added game's match. */ private fun steamAppOf(context: Context, game: Library.SteamGame): Int? = if (game.library != Library.ADDED) game.appId.takeIf { it > 0 } else game.gameFiles?.let { SteamMatch.get(context, it.path) }?.appId - /** The default network is there and validated (reaches the internet). */ fun isOnline(context: Context): Boolean { val cm = context.getSystemService(ConnectivityManager::class.java) ?: return false val caps = cm.getNetworkCapabilities(cm.activeNetwork ?: return false) ?: return false @@ -409,8 +332,7 @@ object AutoComponents { caps.hasCapability(android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED) } - /** Battery saver, thermal status moderate or worse, or a metered network. */ - private fun constrained(context: Context): Boolean { + fun constrained(context: Context): Boolean { val power = context.getSystemService(PowerManager::class.java) if (power?.isPowerSaveMode == true) return true if (Build.VERSION.SDK_INT >= 29 && (power?.currentThermalStatus ?: 0) >= PowerManager.THERMAL_STATUS_MODERATE) return true diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/CoverArt.kt b/app/src/main/java/com/droiddeck/launcher/frontend/CoverArt.kt index cf7f151aa3..5f30796e4c 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/CoverArt.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/CoverArt.kt @@ -3,6 +3,7 @@ package com.droiddeck.launcher.frontend import android.content.Context import android.graphics.BitmapFactory import android.util.Log +import com.droiddeck.launcher.core.DownloadSource import org.json.JSONArray import org.json.JSONObject import java.io.File @@ -11,27 +12,12 @@ import java.net.HttpURLConnection import java.net.URL import java.net.URLEncoder -/** - * Box art for the emulators' games, found and kept on the device: the front end shows a disc image - * with nothing but its emulator's logo otherwise. - * - * In order: the name of the file against RetroArch's thumbnail collection for the system - * (libretro-thumbnails, named after the standard disc-dump names - "Need for Speed - Underground 2 - * (USA)"), first exactly and then loosely (tags dropped, the same region preferred) against the - * collection's list of names; then the disc's own ID, read from the image - PS2 serials against - * xlenore/ps2-covers (what PCSX2 and ARMSX2 download from), GameCube/Wii IDs against GameTDB (what - * Dolphin uses). A PS3 disc image gives its own PS3_GAME/ICON0.PNG first: the libretro PS3 - * collection is small. A cover is downloaded once into files/covers; a game none of them has is not - * asked about again for a few days. - */ object CoverArt { private const val TAG = "CoverArt" private const val MISS_RETRY_MS = 3L * 24 * 3600 * 1000 private const val INDEX_TTL_MS = 14L * 24 * 3600 * 1000 - /** Downloads in one pass, so a first visit to a big library does not hold the network for long. */ private const val MAX_PER_PASS = 40 - /** The emulator's systems in libretro-thumbnails, in the order they are tried. */ private val collections = mapOf( "rpcs3" to listOf("Sony_-_PlayStation_3"), "armsx2" to listOf("Sony_-_PlayStation_2"), @@ -44,14 +30,12 @@ object CoverArt { private fun root(context: Context) = File(context.filesDir, "covers") - /** The file name, as the cover is kept under: a game keeps its art when its folder moves. */ private fun keyOf(rom: Library.Rom): String = rom.hostPath.name.replace(Regex("[^A-Za-z0-9._() -]"), "_").take(150) private fun coverFile(context: Context, rom: Library.Rom) = File(root(context), "${rom.emulatorId}/${keyOf(rom)}.img") private fun missFile(context: Context, rom: Library.Rom) = File(root(context), "${rom.emulatorId}/${keyOf(rom)}.miss") - /** A cover already on the device for this game, or null. */ fun cached(context: Context, rom: Library.Rom): File? = coverFile(context, rom).takeIf { it.isFile && it.length() > 0 } private fun wanted(context: Context, rom: Library.Rom): Boolean { @@ -60,10 +44,6 @@ object CoverArt { return !(miss.isFile && System.currentTimeMillis() - miss.lastModified() < MISS_RETRY_MS) } - /** - * Looks for covers for the games that have none, on the calling (background) thread. True when - * at least one was found, so the caller rebuilds the list to show it. - */ fun fetchMissing(context: Context, roms: List<Library.Rom>): Boolean { var found = false var tries = 0 @@ -71,7 +51,6 @@ object CoverArt { if (!wanted(context, rom)) continue if (++tries > MAX_PER_PASS) break val target = coverFile(context, rom) - // A PS3 disc carries its own cover (PS3_GAME/ICON0.PNG, not encrypted): no download. if (rom.emulatorId == "rpcs3" && try { copyPs3Icon(rom.hostPath, target) } catch (e: Exception) { false }) { Log.i(TAG, "${rom.name}: ICON0.PNG from the disc") missFile(context, rom).delete() @@ -93,13 +72,10 @@ object CoverArt { private fun findUrl(context: Context, rom: Library.Rom): String? { val name = rom.hostPath.nameWithoutExtension.removeSuffix(".dec") for (collection in collections.getValue(rom.emulatorId)) { - // Exactly the dump name first: no listing needed. val exact = thumbnailUrl(collection, name) if (exists(exact)) return exact - // Then loosely, against the collection's names. nearest(name, names(context, collection))?.let { return thumbnailUrl(collection, it) } } - // The disc's own ID. return when (rom.emulatorId) { "armsx2" -> ps2Serial(rom.hostPath)?.let { "https://raw.githubusercontent.com/xlenore/ps2-covers/main/covers/default/$it.jpg" } "dolphin" -> nintendoDiscId(rom.hostPath)?.let { id -> @@ -110,18 +86,15 @@ object CoverArt { }?.takeIf { exists(it) } } - /** libretro-thumbnails replaces these in a title's file name. */ private fun thumbName(title: String) = title.replace(Regex("[&*/:`<>?\\\\|\"]"), "_") private fun thumbnailUrl(collection: String, title: String) = "https://raw.githubusercontent.com/libretro-thumbnails/$collection/master/Named_Boxarts/" + URLEncoder.encode("${thumbName(title)}.png", "UTF-8").replace("+", "%20") - // ---- loose matching ------------------------------------------------------------------------ private fun tags(name: String): List<String> = Regex("[(\\[]([^)\\]]*)[)\\]]").findAll(name).map { it.groupValues[1].lowercase() }.toList() - /** A title without its tags, articles and punctuation: "Legend of Zelda, The (USA)" = "legend of zelda". */ private fun base(name: String): String = name .replace(Regex("\\s*[(\\[][^)\\]]*[)\\]]"), " ") .lowercase() @@ -139,7 +112,6 @@ object CoverArt { return same.firstOrNull { region in tags(it) } ?: same.firstOrNull { "usa" in tags(it) } ?: same.first() } - /** The titles in a collection's Named_Boxarts (no extension), kept for a fortnight. */ private fun names(context: Context, collection: String): List<String> { val cache = File(root(context), "index-$collection.txt") if (cache.isFile && System.currentTimeMillis() - cache.lastModified() < INDEX_TTL_MS) return cache.readLines() @@ -161,12 +133,7 @@ object CoverArt { private fun cachedOr(cache: File): List<String> = if (cache.isFile) cache.readLines() else emptyList() - // ---- disc IDs ------------------------------------------------------------------------------ - /** - * A file's bytes from an ISO 9660 image by path ("PS3_GAME/ICON0.PNG"), or null. Primary volume - * names only (upper case, ";1" suffix), which is what PS2 and PS3 discs use. - */ private fun isoFile(file: File, path: String, maxSize: Int): ByteArray? { if (!file.name.endsWith(".iso", ignoreCase = true)) return null RandomAccessFile(file, "r").use { f -> @@ -208,14 +175,12 @@ object CoverArt { return if (bounds.outWidth > 0 && tmp.renameTo(target)) true else { tmp.delete(); false } } - /** "SLUS-21065" from a PS2 .iso's SYSTEM.CNF (BOOT2 = cdrom0:\SLUS_210.65;1), or null. */ private fun ps2Serial(file: File): String? { val cnf = String(isoFile(file, "SYSTEM.CNF", 4096) ?: return null, Charsets.US_ASCII) val m = Regex("BOOT2\\s*=\\s*cdrom0:\\\\?([A-Z]{4})_(\\d{3})\\.(\\d{2})").find(cnf) ?: return null return "${m.groupValues[1]}-${m.groupValues[2]}${m.groupValues[3]}" } - /** The six-character ID of a GameCube/Wii disc image (.iso/.gcm, or .wbfs), or null. */ private fun nintendoDiscId(file: File): String? { val offset = when (file.extension.lowercase()) { "iso", "gcm" -> 0L; "wbfs" -> 0x200L; else -> return null } RandomAccessFile(file, "r").use { f -> @@ -225,7 +190,6 @@ object CoverArt { } } - // ---- network ------------------------------------------------------------------------------- private fun open(url: String, method: String = "GET"): HttpURLConnection = (URL(url).openConnection() as HttpURLConnection).apply { @@ -236,25 +200,62 @@ object CoverArt { setRequestProperty("User-Agent", "DroidDeck") } - private fun exists(url: String): Boolean = try { - val c = open(url, "HEAD"); val ok = c.responseCode == 200; c.disconnect(); ok - } catch (e: Exception) { false } + private fun <T> through(url: String, attempt: (String, Boolean) -> T?): T? { + for (source in DownloadSource.candidates(url)) { + val result = attempt(source, source == url) + if (result != null) { + DownloadSource.succeeded(source) + return result + } + } + DownloadSource.failed() + return null + } - private fun get(url: String): String? = try { + private fun exists(url: String): Boolean = through(url) { source, original -> head(source, original) } ?: false + + private fun head(url: String, original: Boolean): Boolean? = try { + val c = open(url, "HEAD") + val code = c.responseCode + c.disconnect() + when { + code == 200 -> true + code == 404 || code == 410 -> if (original) false else null + else -> null + } + } catch (e: Exception) { null } + + private fun get(url: String): String? = through(url) { source, original -> text(source, original) } + + private fun text(url: String, original: Boolean): String? = try { val c = open(url) - if (c.responseCode != 200) { c.disconnect(); null } else c.inputStream.bufferedReader().use { it.readText() } + val code = c.responseCode + when { + code == 200 -> c.inputStream.bufferedReader().use { it.readText() }.takeIf { it.isNotEmpty() } + code == 404 || code == 410 -> { c.disconnect(); if (original) "" else null } + else -> { c.disconnect(); null } + } } catch (e: Exception) { Log.w(TAG, "$url: $e"); null } - /** Saves the image at [url] to [target] if it really is an image. */ - private fun download(url: String, target: File): Boolean = try { + private fun download(url: String, target: File): Boolean = through(url) { source, original -> fetch(source, target, original) } ?: false + + private fun fetch(url: String, target: File, original: Boolean): Boolean? = try { val c = open(url) - if (c.responseCode != 200) { c.disconnect(); false } else { - target.parentFile?.mkdirs() - val tmp = File(target.path + ".part") - c.inputStream.use { input -> tmp.outputStream().use { input.copyTo(it) } } - val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true } - BitmapFactory.decodeFile(tmp.path, bounds) - if (bounds.outWidth > 0 && tmp.renameTo(target)) true else { tmp.delete(); false } + when (val code = c.responseCode) { + 200 -> { + target.parentFile?.mkdirs() + val tmp = File(target.path + ".part") + c.inputStream.use { input -> tmp.outputStream().use { input.copyTo(it) } } + val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true } + BitmapFactory.decodeFile(tmp.path, bounds) + when { + bounds.outWidth > 0 && tmp.renameTo(target) -> true + original -> { tmp.delete(); false } + else -> { tmp.delete(); null } + } + } + 404, 410 -> { c.disconnect(); if (original) false else null } + else -> { c.disconnect(); null } } - } catch (e: Exception) { Log.w(TAG, "$url: $e"); false } + } catch (e: Exception) { Log.w(TAG, "$url: $e"); null } } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/DependencyDetector.kt b/app/src/main/java/com/droiddeck/launcher/frontend/DependencyDetector.kt index 3b977bc4be..330265a0fd 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/DependencyDetector.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/DependencyDetector.kt @@ -3,49 +3,25 @@ package com.droiddeck.launcher.frontend import java.io.File import java.util.Locale -/** - * Best-effort detection of the Windows redistributables a game bundles, by scanning its install - * folder for the redist installers Steam/Epic/GOG ship (`_CommonRedist/`, `_Redist/`, - * `Redistributables/`, loose `vcredist_x64.exe`, …) and mapping them to entries in our component - * catalog (WinComponents, Bannerlator's components.json `name` keys). The result drives the - * Recommended part of a game's Windows components; the user still switches each one on. - * Bannerlator's detector, unchanged but for this note and its package. - * - * Wine-aware: keeps the redists that actually matter under Wine/DXVK (VC++ runtimes, .NET, PhysX, - * OpenAL, XACT, XNA, GFWL) and SKIPS the ones DXVK/VKD3D already provide (DX12 Agility SDK) or that - * aren't our components (anti-cheat, Rockstar/Social-Club/launcher setups). Never throws; returns an - * empty list on anything unexpected. Pure filesystem — no network, no Android deps (unit-testable). - */ object DependencyDetector { - /** How a recommendation was found — drives the UI's "recommended vs optional" split. */ enum class Kind { - /** The game bundles the redist installer (in _CommonRedist etc.) — meant to be installed. */ BUNDLED, - /** A runtime DLL the game ships loose — usually already works from the game folder; install - * only if the game misbehaves. */ SHIPPED, - /** Steam installs it with the game from Steamworks Shared ([SteamRedists]). */ STEAM, } - /** A recommended component: the catalog [componentName] to install, a display [label], the on-disk - * redist that triggered it ([reason]), and [kind] (bundled installer vs shipped DLL). */ data class Recommendation(val componentName: String, val label: String, val reason: String, val kind: Kind = Kind.BUNDLED) private const val MAX_DEPTH = 5 - private const val MAX_ENTRIES = 8000 // cost guard against giant game trees + private const val MAX_ENTRIES = 8000 - /** A loose VC++ installer with no year in its path — resolved to "latest" only if no specific - * vcredistYYYY was found anywhere (else it's just a duplicate of the versioned one). */ private const val VCREDIST_LOOSE = "__vcredist_loose" - /** Directory names that are redist containers worth descending into. */ private val REDIST_DIR_RE = Regex( """(?i)^(_?commonredist|_?redist(ributables)?|__?installer|vcredist|vc_redist|directx|direct_x|physx|openal|dotnet(fx)?|\.net|xna|xact|redist|support)$""" ) - /** Skip whole subtrees that are never our components. */ private val SKIP_DIR_RE = Regex("""(?i)^(d3d12.*|.*agility.*|dxvk|vkd3d|battleye|easyanticheat|eac|anticheat)$""") private val YEAR_TO_VCREDIST = mapOf( @@ -70,7 +46,6 @@ object DependencyDetector { "dotnetcoredesktop8" to ".NET Desktop 8", ) - /** Preferred install order (runtimes others may depend on first). */ private val INSTALL_ORDER = listOf( "vcredist2005", "vcredist2008", "vcredist2010", "vcredist2012", "vcredist2013", "vcredist2015", "vcredist2019", "vcredist2022", @@ -79,13 +54,6 @@ object DependencyDetector { "d3dx9", "d3dx11", "xact", "xact_x64", "xna31", "xna40", "physx", "oalinst", "XLiveRedist", ) - /** - * Detect from the .exe the user picked, resolving the game root first: walk up from the exe's - * folder (bounded) to the nearest ancestor that holds a redist container (`_CommonRedist`, …) at - * its top level, and scan from there — so a nested exe (`…/Game/bin/x.exe`) still finds a root-level - * `_CommonRedist`, without over-reaching into a shared `steamapps/common` (which has no redist - * container of its own). Falls back to scanning the exe's own folder. - */ fun detectForExe(exeFile: File): List<Recommendation> { val start = exeFile.absoluteFile.parentFile ?: return emptyList() var d: File? = start @@ -101,19 +69,14 @@ object DependencyDetector { return detect(start) } - /** - * Scan [gameDir] and return the recommended components, de-duplicated (first reason wins), in a - * stable install-friendly order. Empty when nothing is detected or [gameDir] isn't a directory. - */ fun detect(gameDir: File): List<Recommendation> { if (!gameDir.isDirectory) return emptyList() - val hits = LinkedHashMap<String, Recommendation>() // componentName -> first recommendation + val hits = LinkedHashMap<String, Recommendation>() var visited = 0 fun consider(f: File, isDir: Boolean, insideRedist: Boolean) { val name = f.name.lowercase(Locale.US) - val path = f.path.replace('\\', '/').lowercase(Locale.US) - // Bundled = in a redist container or an installer (exe/msi/cab); shipped = a loose runtime DLL. + val path = relativeReason(gameDir, f).lowercase(Locale.US) val kind = if (insideRedist || isDir || name.endsWith(".exe") || name.endsWith(".msi") || name.endsWith(".cab")) Kind.BUNDLED else Kind.SHIPPED for (comp in classify(path, name, isDir)) { @@ -121,7 +84,7 @@ object DependencyDetector { if (existing == null) { hits[comp] = Recommendation(comp, LABELS[comp] ?: comp, relativeReason(gameDir, f), kind) } else if (existing.kind == Kind.SHIPPED && kind == Kind.BUNDLED) { - hits[comp] = existing.copy(kind = Kind.BUNDLED) // a bundled installer outranks a shipped DLL + hits[comp] = existing.copy(kind = Kind.BUNDLED) } } } @@ -134,17 +97,11 @@ object DependencyDetector { val lower = f.name.lowercase(Locale.US) if (f.isDirectory) { if (SKIP_DIR_RE.matches(lower)) continue - // Unity's <Game>_Data/Managed holds the game's own Mono assemblies, not a .NET - // Framework to install. if (lower == "managed" && dir.name.endsWith("_Data", ignoreCase = true)) continue val isRedistDir = insideRedist || REDIST_DIR_RE.matches(lower) if (isRedistDir) consider(f, isDir = true, insideRedist = true) - // Aggressive coverage: descend redist containers fully, and otherwise sweep the game - // tree a few levels deep so runtime libraries the game ships (in bin/, etc.) are seen. if (isRedistDir || depth < 3) walk(f, depth + 1, isRedistDir) } else { - // Classify installers + runtime libraries (.dll/.exe/.msi) anywhere in the scanned - // tree; other files are ignored. Recommendations are advisory, so cast a wide net. val ext = lower.substringAfterLast('.', "") if (insideRedist || ext == "dll" || ext == "exe" || ext == "msi") consider(f, isDir = false, insideRedist = insideRedist) } @@ -160,20 +117,13 @@ object DependencyDetector { } } - /** - * The catalog components one installer stands for, by its path ("_CommonRedist/vcredist/2015/ - * vc_redist.x64.exe", "DXSETUP.exe"): what a store's install list names. A VC++ installer - * with no year is the latest; empty for one that is none of ours. - */ fun componentsFor(path: String): List<String> { val p = path.replace('\\', '/').lowercase(Locale.US) return classify(p, p.substringAfterLast('/'), isDir = false).map { if (it == VCREDIST_LOOSE) "vcredist2022" else it } } - /** The name the catalog component [name] goes by, for a reason line. */ fun label(name: String): String = LABELS[name] ?: name - /** A loose VC++ installer resolves to the latest 14.x only if no specific vcredistYYYY was found. */ private fun resolveLooseVcredist(hits: LinkedHashMap<String, Recommendation>) { val loose = hits.remove(VCREDIST_LOOSE) ?: return val hasSpecific = hits.keys.any { it in YEAR_TO_VCREDIST.values } @@ -186,52 +136,38 @@ object DependencyDetector { return if (p.startsWith("$g/")) p.substring(g.length + 1) else f.name } - /** - * Map a redist file/dir (its full lowercased [path], leaf [name], and whether it [isDir]) to - * catalog component name(s). Empty for things we deliberately skip. - */ private fun classify(path: String, name: String, isDir: Boolean): List<String> { - // Hard skips first — DX12 is provided by DXVK/VKD3D; these aren't our components. if (path.contains("d3d12") || path.contains("agility") || path.contains("battleye") || path.contains("anticheat") || path.contains("easyanticheat") || name.contains("socialclub") || name.contains("social-club") || name.contains("rockstar") || name == "setup.exe" ) return emptyList() - // Visual C++ runtimes — most important. Year comes from the path context. if (path.contains("vcredist") || path.contains("vc_redist") || name.startsWith("vcredist") || name.startsWith("vc_redist")) { val year = YEAR_TO_VCREDIST.keys.firstOrNull { path.contains(it) } return when { year != null -> listOf(YEAR_TO_VCREDIST.getValue(year)) - isDir -> emptyList() // bare "vcredist" container — wait for the year subfolder / installer - else -> listOf(VCREDIST_LOOSE) // loose installer, no year → resolved post-walk + isDir -> emptyList() + else -> listOf(VCREDIST_LOOSE) } } - // VC++ runtime DLL the game ships (msvcp140.dll → 2015-2022, msvcp120.dll → 2013, …). VCRUNTIME_DLL.entries.firstOrNull { name.startsWith(it.key) }?.let { return listOf(it.value) } if (path.contains("openal") || name.startsWith("oalinst") || name == "openal32.dll" || name == "wrap_oal.dll") return listOf("oalinst") if (path.contains("physx") || name.startsWith("physx")) return listOf("physx") if (path.contains("xact") || name.startsWith("xactengine") || name.startsWith("x3daudio")) return listOf("xact", "xact_x64") - // Games for Windows Live — the redist folder, OR a GFWL library the game ships (xlive.dll, - // Codemasters' dbxLive32/64, gfwl*): GFWL titles need XLiveRedist to run even when they don't - // bundle the redist itself. if (path.contains("xliveredist") || name.contains("xlive") || name.startsWith("gfwl") || name.startsWith("dbxlive")) { return listOf("XLiveRedist") } if (path.contains("xna")) return listOf(if (path.contains("3.1") || path.contains("3_1") || path.contains("v31")) "xna31" else "xna40") - // .NET — Framework and Core/Desktop runtimes. if (path.contains("dotnet") || path.contains(".net") || name.startsWith("ndp") || name.startsWith("dotnetfx") || name.contains("windowsdesktop-runtime")) { val comp = dotnetComponent("$path $name") return when { comp != null -> listOf(comp) - isDir -> emptyList() // bare ".NET" container — wait for the versioned installer - else -> listOf("dotnet48") // unlabeled .NET Framework installer file → sensible default + isDir -> emptyList() + else -> listOf("dotnet48") } } - // DirectX 11 helper DLLs the game ships (d3dx11_43.dll). if (D3DX11_RE.matches(name)) return listOf("d3dx11") - // DirectX 9 helper DLLs / d3dcompiler / June-2010 DX redist (DXVK provides core d3d9 but NOT - // these helper DLLs). if (name.startsWith("dxsetup") || name.startsWith("dxwebsetup") || D3DX9_RE.matches(name) || D3DCOMPILER_RE.matches(name) || (path.contains("directx") && name.endsWith(".exe")) @@ -239,7 +175,6 @@ object DependencyDetector { return emptyList() } - /** Runtime DLL prefix → the VC++ redistributable that provides it (checked with startsWith). */ private val VCRUNTIME_DLL = linkedMapOf( "vcruntime140" to "vcredist2022", "msvcp140" to "vcredist2022", "msvcr140" to "vcredist2022", "concrt140" to "vcredist2022", "msvcp120" to "vcredist2013", "msvcr120" to "vcredist2013", @@ -252,7 +187,6 @@ object DependencyDetector { private val D3DX11_RE = Regex("""d3dx11_\d+\.dll""") private val D3DCOMPILER_RE = Regex("""d3dcompiler_\d+\.dll""") - /** Resolve a .NET component from installer/path text, or null when no version is discernible. */ private fun dotnetComponent(s: String): String? = when { s.contains("desktop-runtime-8") || Regex("""\b8\.\d""").containsMatchIn(s) -> "dotnetcoredesktop8" s.contains("desktop-runtime-7") || Regex("""\b7\.\d""").containsMatchIn(s) -> "dotnetcoredesktop7" @@ -264,6 +198,6 @@ object DependencyDetector { s.contains("dotnetfx45") || s.contains("ndp45") || s.contains("4.5") -> "dotnet45" s.contains("dotnetfx40") || s.contains("ndp40") || s.contains("4.0") -> "dotnet40" s.contains("dotnetfx35") || s.contains("3.5") -> "dotnet35" - else -> null // no version signal (e.g. a bare "DotNet" container dir) + else -> null } } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/GameExePicker.kt b/app/src/main/java/com/droiddeck/launcher/frontend/GameExePicker.kt index 1ceadbfa4f..f692c75234 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/GameExePicker.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/GameExePicker.kt @@ -2,26 +2,15 @@ package com.droiddeck.launcher.frontend import java.io.File -/** - * Which `.exe` in a game folder is the game. A real install holds installers, crash handlers, - * anti-cheat stubs and launchers beside the game, and the game itself may sit several levels down - * (`Game/Binaries/Win64/Game-Win64-Shipping.exe`), so candidates are collected with a bounded walk - * and ranked rather than guessed by position. - */ object GameExePicker { - /** How far below a game folder to look: Unreal puts the game three down, repacks deeper. */ const val MAX_DEPTH = 5 - /** Folders and .exe files looked at per game before the walk stops, so a huge game stays quick. */ const val WALK_BUDGET = 400 - /** Below this the pick is marked uncertain rather than trusted silently. */ const val CONFIDENT_SCORE = 60 - /** The best and the runner-up this close together: nothing clearly won. */ const val AMBIGUOUS_MARGIN = 15 - /** Folders that never hold the game itself. */ private val SKIP_DIRS = setOf( "_commonredist", "commonredist", "redist", "redistributable", "redistributables", "directx", "dotnet", "dotnetfx", "vcredist", "vc_redist", "prerequisites", "prereq", @@ -32,7 +21,6 @@ object GameExePicker { private val SKIP_DIR_PREFIX = listOf("dotnet", "vcredist", "$") private val SKIP_PATHS = listOf("engine/extras", "engine/binaries/thirdparty") - /** Exe names that are never the game. */ private val JUNK_EXE_RE = Regex( """(?i)^(unins\w*|setup|install\w*|vc_?redist.*|vcredist.*|dxsetup|dxwebsetup|directx.*|""" + """oalinst|openal.*|dotnetfx.*|ndp\d.*|unitycrashhandler\d*|crashreport\w*|crashpad\w*|""" + @@ -41,10 +29,8 @@ object GameExePicker { """activation\w*|register\w*|readme|report\w*|.*_debug|.*-debug)$""", ) - /** A folder's exes best first, with their scores, and whether the first clearly won. */ class Ranking(val exes: List<File>, val scores: List<Int>, val uncertain: Boolean) - /** Ranks the .exe files under [folder]; [keep] drops names the caller never offers. */ fun rank(folder: File, keep: (File) -> Boolean = { true }): Ranking { val scored = collect(folder).filter { keep(it.first) }.map { (exe, depth) -> exe to score(exe, folder, depth) } .sortedWith(compareByDescending<Pair<File, Int>> { it.second }.thenBy { it.first.path.lowercase() }) @@ -54,11 +40,6 @@ object GameExePicker { return Ranking(scored.map { it.first }, scored.map { it.second }, uncertain) } - /** - * Every plausible exe under [folder] with its depth (0 = in the folder itself): up to - * [MAX_DEPTH] folders down, nearest levels first, at most [WALK_BUDGET] entries, never through a - * symlink, past folders that never hold the game. - */ private fun collect(folder: File): List<Pair<File, Int>> { val found = ArrayList<Pair<File, Int>>() var visited = 0 @@ -86,31 +67,23 @@ object GameExePicker { return found } - /** - * How likely [exe] is to be the game in [folder]. Relative only: the numbers rank candidates - * against each other and decide whether anything won clearly enough to trust. - */ internal fun score(exe: File, folder: File, depth: Int): Int { var score = 0 val base = exe.nameWithoutExtension val exeKey = key(base) val folderKey = key(folder.name) - // The exe named after its folder is the single strongest signal. if (exeKey.isNotEmpty() && folderKey.isNotEmpty()) { when { exeKey == folderKey -> score += 100 folderKey.contains(exeKey) || exeKey.contains(folderKey) -> score += 60 } } - // Unreal ships as <Game>-Win64-Shipping.exe under Binaries/Win64. if (base.endsWith("-Win64-Shipping", true) || base.endsWith("-Win32-Shipping", true)) score += 70 val path = exe.absolutePath.lowercase() if (path.contains("/binaries/win64") || path.contains("/binaries/win32")) score += 30 if (path.contains("/bin/") || path.contains("/bin64/")) score += 10 - // A launcher is a real entry point, so it stays a candidate, just not the preferred one. if (GameIdentifier.isLauncherExeName(base)) score -= 40 if (GameIdentifier.isJunkPeName(base)) score -= 30 - // Shallower is more likely the entry point; big binaries beat small helpers. score -= depth * 8 score += (exe.length() / (8L * 1024 * 1024)).toInt().coerceAtMost(30) return score @@ -125,6 +98,5 @@ object GameExePicker { private fun isLink(f: File): Boolean = runCatching { java.nio.file.Files.isSymbolicLink(f.toPath()) }.getOrDefault(false) - /** Comparison key: letters and digits only, so "GTA IV" and "gta-iv" match. */ private fun key(s: String) = s.lowercase().filter { it.isLetterOrDigit() } } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/GameFileSync.kt b/app/src/main/java/com/droiddeck/launcher/frontend/GameFileSync.kt index 3bef04f5a5..e31b86dd09 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/GameFileSync.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/GameFileSync.kt @@ -10,7 +10,6 @@ import java.io.File import java.util.concurrent.Executors import java.util.concurrent.TimeUnit -/** Runs while DroidDeck's process is alive, including downloads in a background Steam session. */ object GameFileSync { private val worker = Executors.newSingleThreadScheduledExecutor { task -> Thread(task, "game-file-sync").apply { isDaemon = true } } private fun prefs(context: Context) = context.getSharedPreferences("game_files", Context.MODE_PRIVATE) @@ -39,8 +38,7 @@ object GameFileSync { @Synchronized private fun sync(context: Context, folder: File) { check(LinuxRuntime.isInstalled(context)) { context.getString(R.string.game_sync_err_runtime) } - // A disconnected library must not be interpreted as a mass uninstall. - check(File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/steamapps").isDirectory) { context.getString(R.string.game_sync_err_steam_library) } + check(File(SessionPrefs.activeSteamRoot(context), "steamapps").isDirectory) { context.getString(R.string.game_sync_err_steam_library) } val storage = GameStorage.effective(context) val storageSetting = SessionPrefs.gameStorage(context) val previousStorage = prefs(context).getString("storagePath", null) diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/GameFiles.kt b/app/src/main/java/com/droiddeck/launcher/frontend/GameFiles.kt index 6b39093c0b..8e0b55def2 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/GameFiles.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/GameFiles.kt @@ -11,14 +11,12 @@ import org.json.JSONObject import java.io.File import java.io.InputStream -/** Small, portable launch files for frontends that scan ROM folders. No guest paths or commands. */ object GameFiles { const val EXTENSION = "steam" private const val MAX_BYTES = 128 private const val INVENTORY = ".droiddeck-sync.json" private const val FORMAT = "droiddeck-game-files-v1" - /** Called on a worker: content providers and shared storage may block. */ fun readIntent(context: Context, request: Intent): String? = runCatching { if (request.action != Intent.ACTION_VIEW) return null val uri = request.data ?: return null @@ -36,7 +34,6 @@ object GameFiles { }.getOrNull() fun read(stream: InputStream): String? { - // An untrusted URI must not make us buffer an arbitrary ROM or parse a command. val bytes = ByteArray(MAX_BYTES + 1) var count = 0 while (count < bytes.size) { @@ -84,7 +81,6 @@ object GameFiles { } else target } - /** Cocoon matches icons in its data folder's images directory. Never replace custom art. */ private fun exportArt(context: Context, folder: File, game: Library.SteamGame) { val art = listOfNotNull(game.icon, game.art).firstOrNull { it.isFile && it.extension.lowercase() in listOf("jpg", "jpeg", "png", "webp") @@ -100,7 +96,6 @@ object GameFiles { if (!target.exists()) AtomicFile(target).writeBytes(art.readBytes()) } - /** Only remove files in our inventory whose content is still exactly what we wrote. */ @Synchronized fun sync(context: Context, folder: File, games: List<Library.SteamGame>) { require(folder.isDirectory) { context.getString(R.string.gfiles_folder_unavailable) } val inventory = child(context, folder, INVENTORY) @@ -119,21 +114,17 @@ object GameFiles { else exportTarget(context, folder, game, name) val text = contents(game.gameIdString) val existed = target.exists() - // Keep an edited export without letting it block the rest of the library sync. val owned = inventoryOwns(context, folder, previous, target, game.gameIdString) val file = if (owned && target.exists() && !matches(target, text)) target else exportNamed(context, folder, game, target.name) if (!existed || owned) next.put(file.name, game.gameIdString) file } - // Write new exports before pruning; a failed write must not remove old launch files. for (name in previous.keys()) { val id = previous.getString(name) if (!next.has(name) && name.endsWith(".$EXTENSION") && GameLaunchLink.validId(id)) { val file = child(context, folder, name) if (matches(file, contents(id))) { - // Android shared storage is often case insensitive. A case-only rename may - // still resolve to the live export, which must not be pruned as an old file. val retained = exports.any { java.nio.file.Files.isSameFile(it.toPath(), file.toPath()) } if (!retained) check(file.delete()) { context.getString(R.string.gfiles_remove_failed, name) } } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/GameIdentifier.kt b/app/src/main/java/com/droiddeck/launcher/frontend/GameIdentifier.kt index d3b88b2a97..4b385d896c 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/GameIdentifier.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/GameIdentifier.kt @@ -2,65 +2,35 @@ package com.droiddeck.launcher.frontend import java.io.File -/** - * Best-effort identification of a game from its on-disk footprint, given its .exe: a Steam appId - * and/or a display name, so an added game is not just named after its folder or exe. Pure - * filesystem and PE parsing, no network, never throws; it reports only what the disk tells. - * - * Signal chain (appId preferred; best name chosen across all hits): - * 1. steam_appid.txt → appId (Goldberg-style installs) - * 2. ColdClientLoader / emu ini → appId (AppId= key) - * 3. appmanifest_<id>.acf → appId + name (real Steam install under steamapps/) - * 4. goggame-<id>.info → name (+ gogId) (GOG installs) - * 5. PE VS_VERSIONINFO → name (ProductName / FileDescription) - * 6. cleaned folder / exe name → name (weak fallback) - */ object GameIdentifier { - /** How far up the directory tree to look for marker files (games nest deep, e.g. Game/Binaries/Win64/x.exe). */ private const val MAX_PARENT_DEPTH = 6 enum class Source { STEAM_APPID_TXT, STEAM_MANIFEST_ACF, STEAM_EMU_INI, GOG_INFO, PE_VERSION, FILENAME, NONE } enum class Confidence { HIGH, MEDIUM, LOW } - /** - * @param appId Steam appId if one was found on disk, else null. - * @param gogId GOG product id if a goggame info file was found, else null. - * @param name Best display name found locally; may be null when only an appId was - * found (caller resolves the name from the appId over the network). - * @param source Which signal produced the primary identity. - */ data class GameIdentity( val appId: Int? = null, val gogId: String? = null, val name: String? = null, val source: Source = Source.NONE, val confidence: Confidence = Confidence.LOW, - /** Which signal gave [name]: [Source.FILENAME] means only a cleaned folder or exe name. */ val nameSource: Source = Source.NONE, ) { val hasStrongId: Boolean get() = appId != null } - /** Identify the game owning [exeFile]. Never throws; returns an empty identity if nothing matched. */ fun identify(exeFile: File): GameIdentity { val dirs = ancestorDirs(exeFile) - // Steam appId from a bare steam_appid.txt (in the exe dir, a steam_settings/ subdir, or an ancestor). val steamAppId = dirs.firstNotNullOfOrNull { readSteamAppIdTxt(it) } - // AppId= out of a ColdClientLoader.ini / steam_emu.ini next to the game. val emuAppId = dirs.firstNotNullOfOrNull { readEmuIniAppId(it) } - // Real Steam install: appmanifest_<id>.acf up under steamapps/ — carries both appId and name. val acf = resolveSteamManifest(exeFile, dirs) - // GOG: goggame-<id>.info JSON with the real title. val gog = dirs.firstNotNullOfOrNull { readGogInfo(it) } - // PE ProductName / FileDescription — but not when it merely names a launcher/loader - // ("Rockstar Games Launcher Redirector", "GSE", …), which must not become the game name. val peName = PeVersionInfo.bestName(PeVersionInfo.read(exeFile))?.takeUnless { isJunkPeName(it) } val appId = acf?.appId ?: steamAppId ?: emuAppId - // Best name, most-trustworthy first. val nameHit: Pair<String, Source>? = when { acf?.name != null -> acf.name to Source.STEAM_MANIFEST_ACF gog?.name != null -> gog.name to Source.GOG_INFO @@ -68,7 +38,6 @@ object GameIdentifier { else -> cleanedFallbackName(exeFile)?.let { it to Source.FILENAME } } - // Primary source = whatever gave us the appId (strongest), else the name source. val primary: Source = when { acf?.appId != null -> Source.STEAM_MANIFEST_ACF steamAppId != null -> Source.STEAM_APPID_TXT @@ -93,27 +62,19 @@ object GameIdentifier { ) } - /** - * Make an identified title readable and filesystem-safe (a Steam shortcut's name also names - * files): "DARK SOULS: REMASTERED" becomes "DARK SOULS - REMASTERED". Strips trademark marks, - * turns title punctuation into safe equivalents, and collapses whitespace. - */ fun normalizeName(raw: String): String { var s = raw s = s.replace("™", "").replace("®", "").replace("©", "") - s = s.replace(Regex("""(?i)\(\s*(tm|r|c)\s*\)"""), "") // "(TM)" / "(R)" / "(C)" - s = s.replace(":", " - ") // colon → dash separator (safe + readable) - s = s.replace(Regex("""[\\/]"""), " ") // path separators → space - s = s.replace(Regex("""["*?<>|]"""), "") // other illegal chars → drop - // Drop trailing generic descriptors a PE FileDescription tacks on ("DiRT 3 Executable" → "DiRT 3"). + s = s.replace(Regex("""(?i)\(\s*(tm|r|c)\s*\)"""), "") + s = s.replace(":", " - ") + s = s.replace(Regex("""[\\/]"""), " ") + s = s.replace(Regex("""["*?<>|]"""), "") s = s.replace(Regex("""(?i)[ \-]+(executable|application|launcher|redistributable|installer|setup)$"""), "") - s = s.replace(Regex("""\s+"""), " ").trim() // collapse whitespace - return s.trim(' ', '-').trim() // tidy stray leading/trailing dashes + s = s.replace(Regex("""\s+"""), " ").trim() + return s.trim(' ', '-').trim() } - // ── directory walk ── - /** The exe's directory plus its ancestors, nearest-first, bounded by [MAX_PARENT_DEPTH]. */ private fun ancestorDirs(exeFile: File): List<File> { val out = ArrayList<File>(MAX_PARENT_DEPTH + 1) var d: File? = exeFile.absoluteFile.parentFile @@ -126,12 +87,9 @@ object GameIdentifier { return out } - // ── signal readers (all best-effort; return null on anything unexpected) ── - /** steam_appid.txt directly in [dir] or in a steam_settings/ subdir. */ private fun readSteamAppIdTxt(dir: File): Int? { for (candidate in arrayOf(File(dir, "steam_appid.txt"), File(dir, "steam_settings/steam_appid.txt"))) { - // Strip a leading UTF-8 BOM (trim() doesn't) before reading the digits. val id = readSmallTextFile(candidate)?.removePrefix("\uFEFF")?.trim() ?.takeWhile { it.isDigit() }?.toIntOrNull() if (id != null && id > 0) return id @@ -139,12 +97,6 @@ object GameIdentifier { return null } - /** - * First `AppId=<n>` in a crack/emu config .ini next to the game (ColdClientLoader, steam_emu, - * flt, hlm, …). Known names are tried first, then any other `.ini` in the dir — only crack - * configs carry an `AppId=` key, game settings .ini files (settings.ini, graphics.ini) don't, - * so the broad scan is safe. - */ private fun readEmuIniAppId(dir: File): Int? { val re = Regex("""(?im)^\s*appid\s*=\s*(\d+)""") val named = arrayOf( @@ -166,13 +118,6 @@ object GameIdentifier { private data class Acf(val appId: Int?, val name: String?) - /** - * Resolve the Steam appmanifest for this game: find the `common` ancestor on the exe's - * path, read the sibling `steamapps/appmanifest_*.acf`, and match by installdir == the - * game folder under common. No match, no manifest: a folder in steamapps/common that no - * manifest claims is exactly the kind added games list, and the library's one other game is - * not its name. - */ private fun resolveSteamManifest(exeFile: File, dirs: List<File>): Acf? { val commonIdx = dirs.indexOfFirst { it.name.equals("common", ignoreCase = true) } if (commonIdx < 0) return null @@ -183,7 +128,6 @@ object GameIdentifier { } ?: return null if (manifests.isEmpty()) return null - // The game's install folder is the child of `common` on our descent path. val gameFolder = if (commonIdx > 0) dirs[commonIdx - 1].name else null val match = manifests.firstOrNull { m -> @@ -200,7 +144,6 @@ object GameIdentifier { private data class Gog(val id: String?, val name: String?) - /** goggame-<id>.info JSON: pull `name` (and the id from the filename). */ private fun readGogInfo(dir: File): Gog? { val files = dir.listFiles { f -> f.isFile && f.name.startsWith("goggame-") && f.name.endsWith(".info") @@ -214,75 +157,42 @@ object GameIdentifier { return null } - // ── filename fallback ── private val REPACK_TOKENS = setOf( "fitgirl", "dodi", "codex", "plaza", "skidrow", "rune", "empress", "flt", "tenoke", "reloaded", "elamigos", "razor1911", "hoodlum", "gog", "repack", "multi", "goldberg", - // repack/site tags that show up in folder names "ankergames", "steamrip", "onlinefix", "online-fix", "gload", "fitgirlrepacks", ) private const val EXE_NOISE_WORDS = """win64|win32|shipping|wingdk|client|launcher|game|x64|x86|64bit|32bit""" - /** - * Does this exe basename look like engine/arch boilerplate rather than a title? Deliberately - * UNANCHORED — "GameConTest" is boilerplate-ish wherever the giveaway sits, and the answer - * decides whether we trust the folder name instead of the exe name. - */ private val EXE_NOISE_RE = Regex("""(?i)[-_. ]*(?:$EXE_NOISE_WORDS)""") - /** - * Trailing noise to strip off a title. ANCHORED to the end and allowed to repeat, because these - * words are only junk as a suffix: "Witcher3-Win64-Shipping" -> "Witcher3", while - * "Game of Thrones" and "Client Simulator" must survive intact. - * - * Kept separate from [EXE_NOISE_RE] on purpose. One regex used to serve both jobs, so - * anchoring it to fix stripping ALSO narrowed the boilerplate test — and a game in - * "Game Controller Test/GameConTest.exe" stopped preferring its folder and became "GameConTest". - */ private val EXE_SUFFIX_RE = Regex("""(?i)(?:[-_. ]*(?:$EXE_NOISE_WORDS))+$""") private val VERSION_TOKEN_RE = Regex("""(?i)\b(v?\d+([._]\d+)+|build[-_ ]?\d+|update[-_ ]?\d+)\b""") - /** - * True when an exe basename is a launcher/loader rather than the game — its parent folder is the - * better title. Catches "PlayGTAV"/"Play - GTA IV"/"LaunchGame"/"MyLauncher"/"GSE" but NOT a real - * title that merely starts with those letters ("PlayerUnknown"). A "play|launch|start|run" prefix - * counts only when it's a whole token — followed by a separator or a camelCase uppercase boundary, - * not another lowercase letter (checked case-sensitively, so it survives the case-insensitive JUNK - * matching used elsewhere). - */ - /** True when an exe basename looks like a launcher/loader rather than the game itself. */ fun isLauncherExeName(base: String): Boolean { val lower = base.lowercase() if (lower == "gse" || lower.endsWith("launcher") || lower.endsWith("redirector")) return true for (p in arrayOf("play", "launch", "start", "run")) { if (!lower.startsWith(p)) continue val rest = base.substring(p.length) - if (rest.isEmpty()) return true // exactly "Play" + if (rest.isEmpty()) return true val c = rest[0] - if (!c.isLetterOrDigit() || c.isUpperCase()) return true // "Play - GTA IV" / camelCase "PlayGTAV" - // lowercase continuation ("Player…") → part of a longer word, not a launcher + if (!c.isLetterOrDigit() || c.isUpperCase()) return true } return false } - /** A PE ProductName/FileDescription that describes a launcher/loader, not the game — reject it so it - * doesn't become the shortcut name (e.g. "Rockstar Games Launcher Redirector", "GSE", "Steam"). */ private val JUNK_NAME_RE = Regex( """(?i)^(gse|steam|steam client|goldberg.*|launcher|game|play|start|setup|.* launcher.*|.*launcher redirector|.* redirector|rockstar games launcher.*|epic games launcher|smartsteamemu|coldclient.*|steamemu.*)$""" ) - /** True when a PE name is a launcher/loader label rather than a real game title. */ fun isJunkPeName(name: String): Boolean { val n = name.trim() return n.isEmpty() || JUNK_NAME_RE.matches(n) } - /** - * Prefer the game's install-folder name (usually the real title) over the exe basename when the - * exe is a UE-style shipping binary OR a launcher/loader; then strip repack/suffix noise. - */ private fun cleanedFallbackName(exeFile: File): String? { val exeBase = exeFile.nameWithoutExtension val preferFolder = EXE_NOISE_RE.containsMatchIn(exeBase) || @@ -293,14 +203,12 @@ object GameIdentifier { return cleanName(raw) } - /** Strip bracketed tags, repack-group names, engine/arch suffixes and version tokens; tidy separators. */ private fun cleanName(raw: String): String? { var s = raw - s = s.replace(Regex("""[\[(][^\])]*[\])]"""), " ") // (…) […] + s = s.replace(Regex("""[\[(][^\])]*[\])]"""), " ") s = VERSION_TOKEN_RE.replace(s, " ") s = EXE_SUFFIX_RE.replace(s, " ") s = s.replace(Regex("""[._]+"""), " ") - // Drop standalone repack-group words. s = s.split(Regex("""[\s-]+""")) .filter { it.isNotBlank() && it.lowercase() !in REPACK_TOKENS } .joinToString(" ") @@ -308,20 +216,16 @@ object GameIdentifier { return s.ifBlank { null } } - // ── tiny text/format helpers (regex-based → no Android/org.json dependency, unit-testable) ── - /** Read a small text file (guards against accidentally slurping a huge file). */ private fun readSmallTextFile(f: File, maxBytes: Long = 1L * 1024 * 1024): String? = try { if (f.isFile && f.length() in 1..maxBytes) f.readText(Charsets.UTF_8) else null } catch (_: Throwable) { null } - /** Value of a Valve KeyValues (.acf/.vdf) `"key" "value"` pair, first match, case-insensitive key. */ private fun vdfValue(text: String, key: String): String? = Regex(""""${Regex.escape(key)}"\s*"([^"]*)"""", RegexOption.IGNORE_CASE).find(text)?.groupValues?.getOrNull(1)?.trim() - /** Value of a JSON `"key": "value"` pair, first match. Sufficient for the flat goggame .info files. */ private fun jsonStringValue(text: String, key: String): String? = Regex(""""${Regex.escape(key)}"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"""").find(text) ?.groupValues?.getOrNull(1)?.replace("\\\"", "\"")?.replace("\\\\", "\\")?.trim() diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/GameLaunchLink.kt b/app/src/main/java/com/droiddeck/launcher/frontend/GameLaunchLink.kt index c197092505..27374023cb 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/GameLaunchLink.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/GameLaunchLink.kt @@ -1,6 +1,5 @@ package com.droiddeck.launcher.frontend -/** External callers can select a game, never a guest path or arbitrary Steam command. */ object GameLaunchLink { private val idPattern = Regex("[1-9][0-9]{0,19}") private val linkPattern = Regex("droiddeck://game/([1-9][0-9]{0,19})") diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/GameShortcuts.kt b/app/src/main/java/com/droiddeck/launcher/frontend/GameShortcuts.kt index 5cd2216587..d5ca08be2a 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/GameShortcuts.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/GameShortcuts.kt @@ -5,12 +5,14 @@ import android.content.Context import android.content.Intent import android.content.pm.ShortcutInfo import android.content.pm.ShortcutManager +import android.graphics.Bitmap import android.graphics.BitmapFactory import android.graphics.drawable.Icon import android.net.Uri import android.widget.Toast import com.droiddeck.launcher.MainActivity import com.droiddeck.launcher.R +import java.io.File object GameShortcuts { fun launchIntent(context: Context, gameId: String) = Intent(Intent.ACTION_VIEW, @@ -19,22 +21,35 @@ object GameShortcuts { private fun info(context: Context, game: Library.SteamGame): ShortcutInfo { val name = game.name.ifBlank { context.getString(R.string.app_name) } - val icon = listOfNotNull(game.icon, game.art).firstNotNullOfOrNull { file -> runCatching { - val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true } - BitmapFactory.decodeFile(file.path, bounds) - if (bounds.outWidth <= 0 || bounds.outHeight <= 0) return@runCatching null - val options = BitmapFactory.Options().apply { - inSampleSize = 1 - while (maxOf(bounds.outWidth, bounds.outHeight) / inSampleSize > 256) inSampleSize *= 2 - } - BitmapFactory.decodeFile(file.path, options)?.let(Icon::createWithBitmap) - }.getOrNull() } ?: Icon.createWithResource(context, R.mipmap.ic_launcher) + val icon = iconBitmap(game)?.let(Icon::createWithBitmap) ?: Icon.createWithResource(context, R.mipmap.ic_launcher) return ShortcutInfo.Builder(context, "game:${game.gameIdString}") .setActivity(android.content.ComponentName(context, MainActivity::class.java)) .setShortLabel(name.take(40)).setLongLabel(name).setIcon(icon) .setIntent(launchIntent(context, game.gameIdString)).build() } + internal fun iconBitmap(game: Library.SteamGame): Bitmap? { + val icon = game.icon?.let(::decode) + if (icon != null && minOf(icon.width, icon.height) >= SHARP_ICON_PX) return icon + return game.art?.let(::decode)?.let(::square) ?: icon + } + + private fun decode(file: File): Bitmap? = runCatching { + val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true } + BitmapFactory.decodeFile(file.path, bounds) + if (bounds.outWidth <= 0 || bounds.outHeight <= 0) return@runCatching null + val options = BitmapFactory.Options().apply { + inSampleSize = 1 + while (minOf(bounds.outWidth, bounds.outHeight) / (inSampleSize * 2) >= ICON_PX) inSampleSize *= 2 + } + BitmapFactory.decodeFile(file.path, options) + }.getOrNull() + + private fun square(bitmap: Bitmap): Bitmap { + val side = minOf(bitmap.width, bitmap.height) + return Bitmap.createBitmap(bitmap, (bitmap.width - side) / 2, (bitmap.height - side) / 2, side, side) + } + fun pin(activity: Activity, game: Library.SteamGame) { val manager = activity.getSystemService(ShortcutManager::class.java) val requested = runCatching { manager.isRequestPinShortcutSupported && @@ -42,7 +57,9 @@ object GameShortcuts { if (!requested) Toast.makeText(activity, R.string.game_shortcut_unsupported, Toast.LENGTH_LONG).show() } - /** Standard shortcut picker result, understood by launchers that import Android shortcuts. */ fun result(activity: Activity, game: Library.SteamGame): Intent = activity.getSystemService(ShortcutManager::class.java).createShortcutResultIntent(info(activity, game)) + + private const val ICON_PX = 256 + private const val SHARP_ICON_PX = 128 } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/GamesFolderMigration.kt b/app/src/main/java/com/droiddeck/launcher/frontend/GamesFolderMigration.kt index 56846c8079..2c544b0104 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/GamesFolderMigration.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/GamesFolderMigration.kt @@ -8,15 +8,6 @@ import com.droiddeck.launcher.stores.StoreInstallRoot import java.io.File import java.util.zip.CRC32 -/** - * Games folders (the roots earlier builds let the user add in Steam settings) become what the - * Games tab's "Add all games in this folder" makes: one entry per game ([AddedExes]). Everything - * a game had is keyed by its own folder and stays as it was - the chosen exe, the shortcut appid, - * the name, Start in, launch options, art choices, a removal. The roots stay bound into the - * session at the same guest paths ([SessionPrefs.gameFolderBinds]), so every exe keeps its path - * inside the session and every Steam shortcut its target; they are no longer Steam libraries. - * Runs whenever saved roots remain (so twice is the same as once) and clears them after. - */ object GamesFolderMigration { private const val TAG = "GamesFolderMigration" @@ -26,7 +17,6 @@ object GamesFolderMigration { if (dirs.isEmpty()) return val roots = legacyRoots(SessionPrefs.gameFolderBinds(context).map { it.first } + dirs) .filter { root -> root.host.path in dirs } - // The binds first: a game's guest path (and with it the shortcut's appid) depends on them. SessionPrefs.setGameFolderBinds(context, SessionPrefs.gameFolderBinds(context) + roots.map { it.host.path to it.guest }) val removed = SessionPrefs.removedAddedGames(context).toSet() val entries = AddedExes.list(context).map { it.folder }.toMutableSet() @@ -35,7 +25,7 @@ object GamesFolderMigration { var n = 0 val steamInstalls = AddedGames.steamInstallDirs(root.host) for (folder in root.host.listFiles { f -> f.isDirectory }?.sortedBy { it.name.lowercase() }.orEmpty()) { - if (folder.name.equals("steamapps", ignoreCase = true) || folder.name.lowercase() in steamInstalls) continue + if (AddedGames.isSteamLibraryFolder(folder.name) || folder.name.lowercase() in steamInstalls) continue if (folder.absolutePath in storeRoots || StoreGameSidecar.read(folder) != null) continue if (folder.path in entries) continue val picked = SessionPrefs.addedGameExe(context, folder.path).takeIf { it.isNotEmpty() }?.let { File(it) }?.takeIf { it.isFile } @@ -50,10 +40,6 @@ object GamesFolderMigration { SessionPrefs.setGamesFoldersMigrated(context) } - /** - * The guest paths earlier builds gave Games folders: /root/Games/<folder name>, with a short - * hash of the host path when two share a name. Kept exactly, so nothing moves in the session. - */ internal fun legacyRoots(paths: List<String>): List<AddedGames.Root> { val hosts = paths.distinct().map { File(it) } val names = hosts.groupingBy { it.name.lowercase() }.eachCount() diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/Library.kt b/app/src/main/java/com/droiddeck/launcher/frontend/Library.kt index 9324607795..8fbb19b7cb 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/Library.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/Library.kt @@ -8,40 +8,29 @@ import com.droiddeck.launcher.session.SessionPrefs import com.droiddeck.launcher.session.SecondaryLibrary import java.io.File -/** - * What the front end lists: the Steam client's installed games (from its own appmanifests, both - * libraries) and each emulator's games (files in the ROMs folder, by extension, with a system - * folder as a hint). Read on a worker thread; nothing here is cached beyond one screen refresh. - */ object Library { - /** [gameId] is what steam://rungameid/ takes: the appid for a Steam title, the shortcut id for an added game. */ - /** - * [art] is the portrait capsule; [hero] the wide banner Steam shows above a game's page, when - * the client has cached one. [lastPlayed] is Steam's own "LastPlayed" (unix seconds), 0 = never. - */ class SteamGame( val appId: Int, val name: String, val art: File?, val library: String, val gameId: Long = appId.toLong(), val hero: File? = null, val lastPlayed: Long = 0L, val gameFiles: File? = null, val protonPrefix: File? = null, val icon: File? = null, - /** Where the game came from: [SOURCE_STEAM], a store's id (gog, epic, amazon) or [ADDED] for a folder the user added. */ val source: String = SOURCE_STEAM, - /** The store's own id for a store install; null otherwise. */ val storeId: String? = null, ) { - /** Decimal form used by Steam links and Android shortcuts, including unsigned shortcut ids. */ + fun withArt(art: File?, hero: File?, icon: File?) = + SteamGame(appId, name, art, library, gameId, hero, lastPlayed, gameFiles, protonPrefix, icon, source, storeId) + val gameIdString: String get() = java.lang.Long.toUnsignedString(gameId) + val profileKey: String get() = if (library == ADDED) java.lang.Integer.toUnsignedString(appId) else appId.toString() } - /** The [SteamGame.library] of a game added to the library rather than installed by Steam, and the [SteamGame.source] of a plain added folder. */ const val ADDED = "added" - /** The [SteamGame.source] of a title Steam itself installed. */ + const val EPIC_LAUNCHER = "epic-launcher" + const val EPIC_LAUNCHER_NAME = "Epic Games Launcher" const val SOURCE_STEAM = "steam" class Rom(val name: String, val hostPath: File, val guestPath: String, val emulatorId: String, val art: File? = null) class Emulator(val id: String, val name: String, val system: String, val program: String, val installed: Boolean, val games: List<Rom>) { - /** The shown name of [system] when it is words rather than a platform name, else 0. */ val systemRes: Int get() = if (id == "retroarch") R.string.content_system_many else 0 - /** The emulator's own icon, bundled (the runtime keeps them as theme SVGs the app cannot draw). */ val iconRes: Int get() = when (id) { "rpcs3" -> R.drawable.emu_rpcs3; "armsx2" -> R.drawable.emu_pcsx2; "dolphin" -> R.drawable.emu_dolphin "duckstation" -> R.drawable.emu_duckstation; "melonds" -> R.drawable.emu_melonds; "cemu" -> R.drawable.emu_cemu @@ -49,34 +38,33 @@ object Library { } } - /** The client's own tools and runtimes live in steamapps beside the games; they are not titles. */ private val NOT_GAMES = setOf( - 858280, // Proton 3.7 - 961940, // Proton 3.16 - 993090, // Lossless Scaling - 1054830, // Proton 4.2 - 1070560, // Steam Linux Runtime 1.0 - 1113280, // Proton 4.11 - 1245040, // Proton 5.0 - 1391110, // Steam Linux Runtime 2.0 - 1420170, // Proton 5.13 - 1493710, // Proton Experimental - 1580130, // Proton 6.3 - 1628350, // Steam Linux Runtime 3.0 - 1887720, // Proton 7 - 2180100, // Proton Hotfix - 228980, // Steamworks Common Redistributables - 2348590, // Proton 8 - 2805730, // Proton 9 - 3029110, // Lepton - 3127680, // FEX - 3658110, // Proton 10 - 4183110, // Steam Linux Runtime 4.0 - 4185400, // Steam Linux Runtime 4.0 for ARM64 - 4427310, // Proton Experimental for ARM64 - 4628710, // Proton 11 / Proton Next - 4628740, // Proton 11 for ARM64 - 4690330, // Legacy Steam Runtime + 858280, + 961940, + 993090, + 1054830, + 1070560, + 1113280, + 1245040, + 1391110, + 1420170, + 1493710, + 1580130, + 1628350, + 1887720, + 2180100, + 228980, + 2348590, + 2805730, + 3029110, + 3127680, + 3658110, + 4183110, + 4185400, + 4427310, + 4628710, + 4628740, + 4690330, ) private val STEAM_CAPSULES = listOf("library_capsule.jpg", "library_600x900.jpg") private val STEAM_HEROES = listOf("library_hero.jpg") @@ -86,16 +74,17 @@ object Library { private val LAST_PLAYED = Regex("^\\s*\"LastPlayed\"\\s*\"(\\d+)\"", RegexOption.MULTILINE) private val INSTALL_DIR = Regex("^\\s*\"installdir\"\\s*\"([^\"]*)\"", RegexOption.MULTILINE) - /** Steam's library roots visible to this launcher: its private default plus the selected library. */ - private fun steamLibraries(context: Context): List<Pair<File, String>> { - val root = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam") + internal fun steamLibraries(context: Context, arch: String = SessionPrefs.activeSteamClientArch(context)): List<Pair<File, String>> { + val root = SessionPrefs.steamRoot(context, arch) + // The session gives the x86-64 client only its card folder; the games folders stay the arm64 client's. + val card = GameStorage.effective(context) + if (arch == "x86_64") return listOfNotNull(root to "internal", card?.let { File(it.path, GameStorage.X64_CARD_DIR) to it.label }) return listOfNotNull( root to "internal", - GameStorage.effective(context)?.let { File(it.path) to it.label }, + card?.let { File(it.path) to it.label }, ) + GameStorage.gamesFolderLibraries(context).map { it.host to it.label } } - /** Proton keeps each game's prefix below compatdata/<appid>/pfx in a Steam library. */ fun protonPrefix( context: Context, appId: Long, preferredLibrary: File? = null, libraries: List<File> = steamLibraries(context).map { it.first }, @@ -112,10 +101,10 @@ object Library { .firstOrNull { it.isDirectory } } - fun steamGames(context: Context, strictRead: Boolean = false): List<SteamGame> { - val root = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam") + fun steamGames(context: Context, strictRead: Boolean = false, arch: String = SessionPrefs.activeSteamClientArch(context)): List<SteamGame> { + val root = SessionPrefs.steamRoot(context, arch) val cache = File(root, "appcache/librarycache") - val libraries = steamLibraries(context) + val libraries = steamLibraries(context, arch) val roots = libraries.map { it.first } val out = LinkedHashMap<Int, SteamGame>() for ((library, label) in libraries) { @@ -128,37 +117,47 @@ object Library { val text = try { manifest.readText() } catch (e: Exception) { if (strictRead) throw e; return@forEach } val name = NAME.find(text)?.groupValues?.get(1)?.trim().orEmpty() val flags = STATE.find(text)?.groupValues?.get(1)?.toIntOrNull() ?: 0 - // StateFlags 4 = fully installed; anything else is downloading, updating or broken. if (name.isEmpty() || flags and 4 == 0) return@forEach val art = steamCacheImage(cache, appId, STEAM_CAPSULES) val hero = steamCacheImage(cache, appId, STEAM_HEROES) val lastPlayed = LAST_PLAYED.find(text)?.groupValues?.get(1)?.toLongOrNull() ?: 0L - // App manifests are Valve KeyValues (VDF) files. installdir is one folder - // below steamapps/common; only expose it when the directory exists and the - // manifest value cannot escape that directory. val installDir = INSTALL_DIR.find(text)?.groupValues?.get(1)?.trim() ?.takeIf { it.isNotEmpty() && it != "." && it != ".." && '/' !in it && '\\' !in it } val gameFiles = installDir?.let { File(steamapps, "common/$it").takeIf(File::isDirectory) } - out[appId] = SteamGame( + out[appId] = SteamGameArt.withOverrides(context, SteamGame( 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) }, - ) + )) } } return out.values.toList() } - /** The same installed-game inventory used for links, shortcuts and file exports. */ - /** [added]: the added games when the caller has just scanned them, so they are not scanned again. */ - fun launchableGames(context: Context, strictRead: Boolean = false, added: List<AddedGames.Game>? = null): List<SteamGame> { - val roots = steamLibraries(context).map { it.first } - return (steamGames(context, strictRead) + (added ?: AddedGames.scan(context)).map { g -> addedGame(context, g, roots) }).distinctBy { it.gameId } + fun steamLibraryArt(context: Context): List<Pair<Int, File>> { + val cache = File(SessionPrefs.activeSteamRoot(context), "appcache/librarycache") + return cache.listFiles().orEmpty().mapNotNull { dir -> + val appId = dir.name.toIntOrNull()?.takeIf { it !in NOT_GAMES } ?: return@mapNotNull null + steamCacheImage(cache, appId, STEAM_CAPSULES)?.let { appId to it } + } + } + + fun fromSteamClient(g: SteamGame): Boolean = g.library != ADDED && g.source == SOURCE_STEAM + + fun launchableGames( + context: Context, strictRead: Boolean = false, added: List<AddedGames.Game>? = null, + arch: String = SessionPrefs.activeSteamClientArch(context), + ): List<SteamGame> { + val roots = steamLibraries(context, arch).map { it.first } + val list = added ?: AddedGames.scan(context) + var steam = steamGames(context, strictRead, arch) + val targets = steam.filter(::fromSteamClient).map { SteamGrid.target(it, context) } + list.map { SteamGrid.target(it, context) } + if (runCatching { SteamGrid.sync(context, targets) }.getOrDefault(false)) steam = steamGames(context, strictRead, arch) + return (steam + list.map { g -> addedGame(context, g, roots) }).distinctBy { it.gameId } } - /** One added game as the Games tab lists it; [roots] the Steam libraries, for its Proton prefix. */ fun addedGame(context: Context, g: AddedGames.Game, roots: List<File> = steamLibraries(context).map { it.first }): SteamGame = AddedGameArt.resolve(context, g).let { art -> SteamGame( @@ -170,8 +169,7 @@ object Library { ) } - /** Steam stores current library art inside hash-named folders under the app's cache dir. */ - private fun steamCacheImage(cache: File, appId: Int, names: List<String>): File? { + 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 } @@ -180,12 +178,9 @@ object Library { .firstOrNull { it.isFile && it.length() > 0L } } - /** [atPanel]: frames cheap enough to draw at the panel's own size (see [drawsAtPanel]). */ 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) private val specs = listOf( Spec("rpcs3", "RPCS3", "PS3", "/opt/appimages/rpcs3.AppImage", listOf("ps3"), setOf("iso")), - // PS2: ARMSX2, the PCSX2 fork with ARM64 recompilers. Upstream PCSX2 interprets the PS2's - // CPUs on ARM64 (NFS Underground 2: 17 fps against ARMSX2's full 60), so it is not offered. Spec("armsx2", "ARMSX2", "PS2", "/opt/appimages/armsx2.AppImage", listOf("ps2"), setOf("iso", "chd", "cso", "gz")), Spec("dolphin", "Dolphin", "GameCube / Wii", "/opt/appimages/dolphin.AppImage", listOf("gc", "gamecube", "wii"), setOf("iso", "rvz", "gcz", "wbfs", "ciso")), Spec("duckstation", "DuckStation", "PS1", "/opt/appimages/duckstation.AppImage", listOf("ps1", "psx"), setOf("cue", "chd", "pbp", "iso", "bin", "img", "ecm", "m3u")), @@ -194,73 +189,47 @@ object Library { Spec("ppsspp", "PPSSPP", "PSP", "/usr/bin/PPSSPPSDL", listOf("psp"), setOf("iso", "cso", "pbp", "chd")), Spec("retroarch", "RetroArch", "many systems", "/usr/bin/retroarch", emptyList(), emptySet()), ) - /** - * A dump's file name as a title: its tags - (USA), (En,Fr,Es,Pt), [!], (v1.01) - identify the - * file and are dropped for reading ("Tomb Raider (USA) (En,Fr,Es,Pt)" -> "Tomb Raider"). The - * file keeps them, and the cover lookup still uses them. - */ private fun displayTitle(name: String): String = name.replace(Regex("\\s*[(\\[][^)\\]]*[)\\]]"), "").trim().ifEmpty { name } - /** Every system folder name the specs claim, so a loose-file scan of the root skips them. */ private val systemFolders: Set<String> by lazy { specs.flatMap { it.folders }.toSet() } private val installedIds = mapOf( "rpcs3" to "rpcs3", "armsx2" to "armsx2", "dolphin" to "dolphin", "duckstation" to "duckstation", "melonds" to "melonds", "cemu" to "cemu", "ppsspp" to "emulators", "retroarch" to "emulators", ) - /** The emulator's name for a program path from the rail ("ARMSX2"), or null. */ fun nameForProgram(program: String?): String? = if (program == com.droiddeck.launcher.runtime.FlatpakManager.LAUNCHER || program == com.droiddeck.launcher.runtime.AppImageManager.LAUNCHER || program == com.droiddeck.launcher.runtime.UserApps.SCRIPT_LAUNCHER) { com.droiddeck.launcher.session.SessionState.programArgs.firstOrNull()?.let { flatpakNames[it] ?: it.substringAfterLast('.') } - } else specs.firstOrNull { it.program == program }?.name + } else com.droiddeck.launcher.session.NoSteamLaunch.nameFor(program, com.droiddeck.launcher.session.SessionState.programArgs) + ?: specs.firstOrNull { it.program == program }?.name - /** Added apps' names by Flatpak id or directory, as launched: the session only knows that. */ val flatpakNames = java.util.concurrent.ConcurrentHashMap<String, String>() - /** - * Whether a program from the rail runs at the panel's own resolution rather than the session's - * 720p default. melonDS draws two 256x192 screens on the CPU: the panel's size costs it - * nothing, and 720p scaled up to the panel blurs the sharp pixels its screen layout is set - * up for (droiddeck-pad-defaults). - */ fun drawsAtPanel(program: String?): Boolean = specs.any { it.program == program && it.atPanel } - /** Desktop catalog package that supplies this emulator. */ fun packageId(emulatorId: String): String? = installedIds[emulatorId] - /** Every emulator the app knows, installed or not, with the games its system folder holds. */ fun emulators(context: Context, installedPackage: (String) -> Boolean): List<Emulator> { val romsRoot = SessionPrefs.romsDir(context).takeIf { it.isNotEmpty() }?.let(::File)?.takeIf { it.isDirectory } return specs.map { spec -> val games = ArrayList<Rom>() if (romsRoot != null && spec.exts.isNotEmpty()) { - // The system's folder(s), matched without regard to case, and up to three folders - // inside them - a dump usually comes as a folder named for the game with the image - // inside it, and people sort those into folders of their own (ps2/games/<game>/). - // The root itself only one deep, for a file left loose there. val systemDirs = romsRoot.listFiles { f -> f.isDirectory && f.name.lowercase() in spec.folders }.orEmpty().toList() val dirs = LinkedHashSet<File>() - // A BIOS folder holds the console's firmware, not games (psx/bios/SCPH1001.BIN). for (top in systemDirs) top.walkTopDown().maxDepth(3).onEnter { it.name.lowercase() !in firmwareFolders } .filter { it.isDirectory }.forEach { dirs.add(it) } dirs.add(romsRoot) - // ...and not into another system's folder: a PS3 .iso in ps3/ is not a PS2 game. romsRoot.listFiles { f -> f.isDirectory && f.name.lowercase() !in systemFolders }?.forEach { dirs.add(it) } for (dir in dirs) { - // A PS3 disc dump is a folder with PS3_GAME in it; RPCS3 boots the folder. if (spec.id == "rpcs3" && File(dir, "PS3_GAME").isDirectory) { val rel = dir.relativeTo(romsRoot).path games.add(Rom(displayTitle(dir.name), dir, "/root/ROMs/$rel", spec.id, - // The dump carries its own art, as an installed package does. art = File(dir, "PS3_GAME/ICON0.PNG").takeIf { it.isFile })) continue } val files = dir.listFiles()?.sortedBy { it.name.lowercase() }.orEmpty() - // A disc sheet (.cue, .gdi) names its track files and a playlist (.m3u) its - // discs: the sheet is the game, what it names is part of it. A .bin beside a - // .cue of the same name is a track even when the sheet can't be read. val parts = files.filter { it.isFile && it.extension.lowercase() in sheetExts }.flatMap(::sheetParts).toSet() files.forEach { f -> val ext = f.extension.lowercase() @@ -273,7 +242,6 @@ object Library { } } if (spec.id == "rpcs3") games.addAll(rpcs3Installed(context)) - // A cover found for the game before (CoverArt) where it has no art of its own. val withArt = games.map { g -> if (g.art != null) g else CoverArt.cached(context, g)?.let { Rom(g.name, g.hostPath, g.guestPath, g.emulatorId, it) } ?: g } Emulator(spec.id, spec.name, spec.system, spec.program, installedPackage(installedIds.getValue(spec.id)), withArt) } @@ -282,27 +250,19 @@ object Library { private val firmwareFolders = setOf("bios", "firmware") private val sheetExts = setOf("cue", "gdi", "m3u") - /** The file names (lower case) a .cue, .gdi or .m3u refers to, from its own folder. */ private fun sheetParts(sheet: File): List<String> = runCatching { if (sheet.length() > 64 * 1024) return emptyList() sheet.readLines().mapNotNull { line -> val t = line.trim() when (sheet.extension.lowercase()) { - // FILE "Tekken 3 (USA) (Track 1).bin" BINARY "cue" -> Regex("^FILE\\s+\"([^\"]+)\"", RegexOption.IGNORE_CASE).find(t)?.groupValues?.get(1) ?: Regex("^FILE\\s+(\\S+)", RegexOption.IGNORE_CASE).find(t)?.groupValues?.get(1) - // 1 0 4 2352 "track01.bin" 0 / 1 0 4 2352 track01.bin 0 "gdi" -> Regex("\"([^\"]+)\"").find(t)?.groupValues?.get(1) ?: t.split(Regex("\\s+")).getOrNull(4) else -> t.takeIf { it.isNotEmpty() && !it.startsWith("#") } } }.map { File(it.replace('\\', '/')).name.lowercase() } }.getOrDefault(emptyList()) - /** - * What RPCS3 has installed on its own HDD - packages (PSN games) land in dev_hdd0/game/<ID> - * with a PARAM.SFO for the title and an EBOOT to boot - as RPCS3's own file list would show - * them. Not in the ROMs folder, so listed from RPCS3's home in the runtime. - */ private fun rpcs3Installed(context: Context): List<Rom> { val hdd = File(LinuxRuntime.rootDir(context), "root/.config/rpcs3/dev_hdd0/game") return hdd.listFiles { f -> f.isDirectory }?.sortedBy { it.name }?.mapNotNull { dir -> @@ -310,7 +270,6 @@ object Library { val sfo = File(dir, "PARAM.SFO") if (!eboot.isFile || !sfo.isFile) return@mapNotNull null val fields = readSfo(sfo) - // Only games: patches, DLC and save data live here too, with their own categories. if (fields["CATEGORY"]?.let { it == "HG" || it == "DG" || it == "GD" } == false) return@mapNotNull null val title = fields["TITLE"]?.trim()?.takeIf { it.isNotEmpty() } ?: dir.name Rom(title, eboot, "/root/.config/rpcs3/dev_hdd0/game/${dir.name}/USRDIR/EBOOT.BIN", "rpcs3", @@ -318,7 +277,6 @@ object Library { } ?: emptyList() } - /** The string fields of a PARAM.SFO (the PSP/PS3 metadata file): a small binary table. */ private fun readSfo(file: File): Map<String, String> { val out = HashMap<String, String>() try { @@ -335,7 +293,7 @@ object Library { var keyEnd = keyStart while (keyEnd < b.size && b[keyEnd] != 0.toByte()) keyEnd++ val key = String(b, keyStart, keyEnd - keyStart, Charsets.US_ASCII) - if (fmt == 0x0204 || fmt == 0x0004) { // utf8 string (null-terminated or not) + if (fmt == 0x0204 || fmt == 0x0004) { val start = data + dataOff val end = minOf(b.size, start + len) var stop = start @@ -344,38 +302,21 @@ object Library { } } } catch (e: Exception) { - // unreadable metadata: the folder name stands in } return out } - /** How the emulator is told which game to boot, on its command line. */ fun launchArgs(emulatorId: String, guestPath: String): List<String> = when (emulatorId) { "rpcs3" -> listOf("--no-gui", guestPath) - // Straight into the game in its controller-driven full-screen UI (first-time setup there - // too), and gone when the game is quit from its pause menu (guide button): -batch. "armsx2" -> listOf("-batch", "-bigpicture", "-fullscreen", "--", guestPath) - // DuckStation shares PCSX2's flags (src/duckstation-qt/qthost.cpp): the same launch and exit. "duckstation" -> listOf("-batch", "-bigpicture", "-fullscreen", "--", guestPath) - // Dolphin: full screen, drawn inside its own main window, without its "stop the emulation?" - // question; no warning boxes either, which wait for a click a controller cannot give - // (they still go to Dolphin's log). The guide button is Dolphin's Toggle Fullscreen hotkey - // (droiddeck-pad-defaults), which shows Dolphin's window and its settings - so no -b, which - // hides that window; closing Dolphin ends the session. Under gamescope Dolphin does not - // always see its window as focused, and by default both its hotkeys and the game's - // controller then stop: HotkeysRequireFocus off, BackgroundInput on. -C sets a Dolphin.ini - // value for this run only, so Dolphin started from the desktop keeps its own settings. "dolphin" -> listOf( "-C", "Dolphin.Display.Fullscreen=True", "-C", "Dolphin.Display.RenderToMain=True", "-C", "Dolphin.Interface.ConfirmStop=False", "-C", "Dolphin.Interface.UsePanicHandlers=False", "-C", "Dolphin.General.HotkeysRequireFocus=False", "-C", "Dolphin.Input.BackgroundInput=True", "-e", guestPath, ) - // Full screen (LaunchSettings.cpp -f); the settings seed keeps the Getting Started - // dialog away (droiddeck-pad-defaults). "cemu" -> listOf("-f", "-g", guestPath) - // Full screen (CLI.cpp --fullscreen); the guide button leaves it for melonDS's menus and - // comes back (HK_FullscreenToggle, droiddeck-pad-defaults). "melonds" -> listOf("-f", guestPath) else -> listOf(guestPath) } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/LibraryCache.kt b/app/src/main/java/com/droiddeck/launcher/frontend/LibraryCache.kt index cd946724ad..3d03b23073 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/LibraryCache.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/LibraryCache.kt @@ -6,19 +6,18 @@ import org.json.JSONArray import org.json.JSONObject import java.io.File -/** - * The last game list the front end showed, kept in the app's files so the next start draws the - * Steam wall on its first frame. Building the list reads every manifest and walks the added-games - * folders, which can take a second or more; the fresh list replaces this one when it is ready. - */ object LibraryCache { private const val TAG = "LibraryCache" private fun file(context: Context) = File(context.filesDir, "library-cache.json") - fun load(context: Context): List<Library.SteamGame> = runCatching { + /** The cached games and whether they are the x86-64 client's; a cache written as a bare list is arm64's. */ + @Synchronized + fun snapshot(context: Context): Pair<List<Library.SteamGame>, Boolean> = runCatching { val f = file(context) - if (!f.isFile) return emptyList() - val array = JSONArray(f.readText()) + if (!f.isFile) return Pair(emptyList(), false) + val text = f.readText().trim() + val (array, x64) = if (text.startsWith("{")) JSONObject(text).let { it.getJSONArray("games") to (it.optString("client") == "x86_64") } + else JSONArray(text) to false List(array.length()) { i -> val o = array.getJSONObject(i) Library.SteamGame( @@ -29,11 +28,18 @@ object LibraryCache { source = o.optString("source").ifEmpty { if (o.getString("library") == Library.ADDED) Library.ADDED else Library.SOURCE_STEAM }, storeId = o.optString("storeId").ifEmpty { null }, ) - } - }.getOrElse { e -> Log.w(TAG, "unreadable, ignored: ${e.message}"); emptyList() } + } to x64 + }.getOrElse { e -> Log.w(TAG, "unreadable, ignored: ${e.message}"); Pair(emptyList(), false) } - fun save(context: Context, games: List<Library.SteamGame>) { + fun load(context: Context): List<Library.SteamGame> = snapshot(context).first + + fun listedX64(context: Context): Boolean = snapshot(context).second + + /** Without [x64] the list keeps the client already recorded. */ + @Synchronized + fun save(context: Context, games: List<Library.SteamGame>, x64: Boolean? = null) { runCatching { + val client = x64 ?: listedX64(context) val array = JSONArray() for (g in games) array.put( JSONObject().put("appId", g.appId).put("name", g.name).put("library", g.library).put("gameId", g.gameId) @@ -43,8 +49,12 @@ object LibraryCache { ) val f = file(context) val tmp = File(f.path + ".tmp") - tmp.writeText(array.toString()) - tmp.renameTo(f) + tmp.writeText(JSONObject().put("client", if (client) "x86_64" else "arm64").put("games", array).toString()) + if (!tmp.renameTo(f)) { + tmp.delete() + f.delete() + Log.w(TAG, "not saved: rename failed; cache dropped so the next start scans") + } }.onFailure { e -> Log.w(TAG, "not saved: ${e.message}") } } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/LogoPosition.kt b/app/src/main/java/com/droiddeck/launcher/frontend/LogoPosition.kt new file mode 100644 index 0000000000..a047da09e4 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/frontend/LogoPosition.kt @@ -0,0 +1,48 @@ +package com.droiddeck.launcher.frontend + +import org.json.JSONObject + +/** Where Steam pins a game's logo on its hero image and how big it draws it; the same JSON Steam keeps in `<appid>.json`. */ +object LogoPosition { + enum class Pin(val steam: String) { + UPPER_LEFT("UpperLeft"), UPPER_CENTER("UpperCenter"), CENTER("CenterCenter"), BOTTOM_LEFT("BottomLeft"), BOTTOM_CENTER("BottomCenter"); + + companion object { + fun of(steam: String): Pin? = values().firstOrNull { it.steam == steam } + } + } + + data class Value(val pin: Pin, val widthPct: Int, val heightPct: Int) + + const val MIN_PCT = 10 + const val MAX_PCT = 100 + + /** What Steam draws when a game has no custom position. */ + val DEFAULT = Value(Pin.BOTTOM_LEFT, 50, 50) + + private const val VERSION = 1 + private const val KEY = "logoPosition" + + fun sized(pin: Pin, size: Int): Value = size.coerceIn(MIN_PCT, MAX_PCT).let { Value(pin, it, it) } + + /** `{"nVersion":1,"logoPosition":{...}}`, with whatever else [into] already held kept as it was. */ + fun toJson(value: Value, into: JSONObject = JSONObject()): JSONObject = into + .put("nVersion", VERSION) + .put(KEY, JSONObject().put("pinnedPosition", value.pin.steam).put("nWidthPct", value.widthPct).put("nHeightPct", value.heightPct)) + + fun parse(text: String): Value? = runCatching { parse(JSONObject(text)) }.getOrNull() + + fun parse(json: JSONObject): Value? { + val inner = json.optJSONObject(KEY) ?: return null + val pin = Pin.of(inner.optString("pinnedPosition")) ?: return null + if (!inner.has("nWidthPct") || !inner.has("nHeightPct")) return null + return Value(pin, inner.optInt("nWidthPct").coerceIn(MIN_PCT, MAX_PCT), inner.optInt("nHeightPct").coerceIn(MIN_PCT, MAX_PCT)) + } + + /** [existing] without the logo position; null when nothing but the version number would be left. */ + fun without(existing: JSONObject): JSONObject? { + existing.remove(KEY) + val rest = existing.keys().asSequence().filter { it != "nVersion" }.toList() + return if (rest.isEmpty()) null else existing + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/PeVersionInfo.kt b/app/src/main/java/com/droiddeck/launcher/frontend/PeVersionInfo.kt index 77b61deca7..99ead7d6fa 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/PeVersionInfo.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/PeVersionInfo.kt @@ -3,27 +3,11 @@ package com.droiddeck.launcher.frontend import java.io.File import java.io.RandomAccessFile -/** - * Reads the StringFileInfo strings (ProductName, FileDescription, …) out of the - * VS_VERSION_INFO resource embedded in a Windows PE executable (.exe). - * - * Walks the PE resource directory to the first RT_VERSION resource — the same - * navigation [com.droiddeck.launcher.files.PeIconExtractor] uses for icons — then parses the alignment-heavy - * VS_VERSIONINFO → StringFileInfo → StringTable → String tree by hand. - * - * Everything is best-effort: any malformed / oversized / unsupported input returns - * null (or an empty map). No allocation beyond the single resource blob. - */ object PeVersionInfo { private const val RT_VERSION = 16 - private const val MAX_RES_SECTION = 64 * 1024 * 1024 // don't slurp absurd resource sections + private const val MAX_RES_SECTION = 64 * 1024 * 1024 - /** - * Returns the StringFileInfo key→value map (e.g. `"ProductName" -> "Palworld"`), - * or null if the file has no readable version resource. Keys are the raw - * VS_VERSIONINFO names; look up [productName]/[fileDescription] for the common ones. - */ fun read(file: File): Map<String, String>? = try { RandomAccessFile(file, "r").use { raf -> val blob = versionResourceBytes(raf) ?: return@use null @@ -33,13 +17,6 @@ object PeVersionInfo { null } - /** - * Best display name from a version map. ProductName is usually the cleanest title, but is - * sometimes an internal abbreviation (e.g. God of War ships ProductName "GoW" while - * FileDescription is "God of War"). When ProductName is a single spaceless token and - * FileDescription is a normal multi-word title, prefer FileDescription. Trimmed; null if - * neither is meaningful. - */ fun bestName(map: Map<String, String>?): String? { if (map == null) return null val product = map["ProductName"]?.trim()?.takeIf { it.isNotEmpty() } @@ -52,15 +29,14 @@ object PeVersionInfo { return product ?: desc } - // ── locate the RT_VERSION resource blob (mirrors PeIconExtractor's navigation) ── private fun versionResourceBytes(raf: RandomAccessFile): ByteArray? { val dos = read(raf, 0, 0x40) ?: return null - if (u8(dos, 0) != 0x4D || u8(dos, 1) != 0x5A) return null // "MZ" + if (u8(dos, 0) != 0x4D || u8(dos, 1) != 0x5A) return null val peOff = u32(dos, 0x3C).toInt() val coff = read(raf, peOff.toLong(), 24) ?: return null - if (u8(coff, 0) != 0x50 || u8(coff, 1) != 0x45 || u8(coff, 2) != 0 || u8(coff, 3) != 0) return null // "PE\0\0" + if (u8(coff, 0) != 0x50 || u8(coff, 1) != 0x45 || u8(coff, 2) != 0 || u8(coff, 3) != 0) return null val numSections = u16(coff, 6) val sizeOpt = u16(coff, 20) if (numSections <= 0 || numSections > 96 || sizeOpt <= 0) return null @@ -68,8 +44,8 @@ object PeVersionInfo { val optOff = peOff + 24L val opt = read(raf, optOff, sizeOpt) ?: return null val magic = u16(opt, 0) - val ddOff = if (magic == 0x20B) 112 else 96 // PE32+ vs PE32 data-directory offset - val resDirEntry = ddOff + 2 * 8 // data directory index 2 = resource table + val ddOff = if (magic == 0x20B) 112 else 96 + val resDirEntry = ddOff + 2 * 8 if (resDirEntry + 8 > opt.size) return null val resRVA = u32(opt, resDirEntry).toInt() val resSize = u32(opt, resDirEntry + 4).toInt() @@ -105,7 +81,6 @@ object PeVersionInfo { return dataEntryBytes(res, verData, secVA) } - /** Resolve the sub-directory under [dirIdx] whose id matches [wantId]; null if absent or not a directory. */ private fun findIdSubdir(res: ByteArray, dirIdx: Int, wantId: Int, resDirStart: Int): Int? { if (dirIdx + 16 > res.size) return null val total = u16(res, dirIdx + 12) + u16(res, dirIdx + 14) @@ -123,7 +98,6 @@ object PeVersionInfo { return null } - /** Descend the first entry of each level until an IMAGE_RESOURCE_DATA_ENTRY; returns its index. */ private fun firstDataEntry(res: ByteArray, dirIdx: Int, resDirStart: Int): Int? { if (dirIdx + 16 > res.size) return null if (u16(res, dirIdx + 12) + u16(res, dirIdx + 14) == 0) return null @@ -137,7 +111,6 @@ object PeVersionInfo { } } - /** Read the bytes an IMAGE_RESOURCE_DATA_ENTRY points at (its OffsetToData is an RVA). */ private fun dataEntryBytes(res: ByteArray, entryIdx: Int, secVA: Int): ByteArray? { if (entryIdx < 0 || entryIdx + 8 > res.size) return null val rva = u32(res, entryIdx).toInt() @@ -147,17 +120,11 @@ object PeVersionInfo { return res.copyOfRange(start, start + size) } - // ── VS_VERSIONINFO tree parse ── - // - // Every node is: WORD wLength, WORD wValueLength, WORD wType, WCHAR szKey[], - // then (32-bit aligned) an optional Value, then (32-bit aligned) child nodes. - // We only care about: VS_VERSIONINFO → StringFileInfo → StringTable → String. private fun parseStringFileInfo(b: ByteArray): Map<String, String> { val out = LinkedHashMap<String, String>() if (b.size < 6) return out val rootLen = minOf(u16(b, 0), b.size) - // VS_VERSION_INFO header: skip szKey "VS_VERSION_INFO" then the FIXEDFILEINFO value. val rootValLen = u16(b, 2) var pos = align4(6 + (utf16zLen(b, 6) + 1) * 2) pos = align4(pos + rootValLen) @@ -173,7 +140,6 @@ object PeVersionInfo { return out } - /** Iterate the StringTable children inside a StringFileInfo block [start, end). */ private fun parseTables(b: ByteArray, start: Int, end: Int, out: MutableMap<String, String>) { var p = align4(start + 6 + (utf16zLen(b, start + 6) + 1) * 2) while (p + 6 <= end) { @@ -185,7 +151,6 @@ object PeVersionInfo { } } - /** Iterate the String children inside a StringTable block [start, end). */ private fun parseStrings(b: ByteArray, start: Int, end: Int, out: MutableMap<String, String>) { var q = align4(start + 6 + (utf16zLen(b, start + 6) + 1) * 2) while (q + 6 <= end) { @@ -202,11 +167,9 @@ object PeVersionInfo { } } - // ── little-endian / UTF-16 readers ── private fun align4(x: Int): Int = (x + 3) and 3.inv() - /** Number of UTF-16 code units before the null terminator starting at [off]. */ private fun utf16zLen(b: ByteArray, off: Int): Int { var i = off while (i + 1 < b.size) { @@ -216,7 +179,6 @@ object PeVersionInfo { return (i - off) / 2 } - /** Read a null-terminated UTF-16LE string starting at [off], not reading past [limit]. */ private fun utf16z(b: ByteArray, off: Int, limit: Int = b.size): String { val sb = StringBuilder() var i = off diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/PrefixInstalledDetector.kt b/app/src/main/java/com/droiddeck/launcher/frontend/PrefixInstalledDetector.kt index 7f5ca5b0b3..91625338ca 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/PrefixInstalledDetector.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/PrefixInstalledDetector.kt @@ -3,18 +3,9 @@ package com.droiddeck.launcher.frontend import org.json.JSONObject import java.io.File -/** - * Which catalog components a game's prefix already has from elsewhere - a real installer, the game, - * the user - so the list can say so instead of recommending them again. Bannerlator's detector, - * on DroidDeck's compatdata/<id>: only markers absent from a fresh Proton prefix count (OpenAL32, - * Mono, PhysX, Games for Windows Live); msvcp140, d3dx9 and the like ship with Proton and cannot - * tell. Files DroidDeck put there itself (droiddeck-wincomponents' state) are not counted. - * Pure filesystem reads; never throws. - */ object PrefixInstalledDetector { private const val STATE = ".droiddeck-wincomponents.json" - /** Detector names (oalinst, mono, physx, XLiveRedist) present in [compat]/pfx. */ fun detect(compat: File?): Set<String> = try { val pfx = compat?.let { File(it, "pfx") } if (pfx == null || !pfx.isDirectory) emptySet() else { @@ -38,7 +29,6 @@ object PrefixInstalledDetector { emptySet() } - /** Windows names ignore case; the prefix's folder may spell them either way. */ private fun fileIgnoringCase(pfx: File, rel: String): Boolean { val target = File(pfx, rel) return target.parentFile?.listFiles()?.any { it.isFile && it.name.equals(target.name, ignoreCase = true) } == true diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/SessionInstalls.kt b/app/src/main/java/com/droiddeck/launcher/frontend/SessionInstalls.kt index 5291f80fc9..1f07da8320 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/SessionInstalls.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/SessionInstalls.kt @@ -7,17 +7,10 @@ import com.droiddeck.launcher.session.GameStorage import com.droiddeck.launcher.session.SessionState import java.io.File -/** - * A Steam game whose download finishes during a session, noticed by its appmanifest (a new one, - * or StateFlags turning to 4, fully installed) with a light look every five seconds while the - * session runs, and handed to [AutoComponents] as a single job that may run in the session, so its - * Windows components are in place when the user plays it right after the download. - */ object SessionInstalls { private const val TAG = "SessionInstalls" private const val POLL_MS = 5_000L - /** One appmanifest as read: the app, its name and folder, whether it is fully installed. */ class Manifest(val appId: Int, val name: String, val installDir: String, val installed: Boolean, val steamapps: File) private val APPID = Regex("\"appid\"\\s*\"(\\d+)\"", RegexOption.IGNORE_CASE) @@ -32,16 +25,18 @@ object SessionInstalls { STATE.find(text)?.groupValues?.get(1)?.toIntOrNull() == 4, file.parentFile!!) }.getOrNull() - /** The libraries the session's client installs to, as host folders. */ - internal fun steamappsDirs(context: Context): List<File> = listOfNotNull( - File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/steamapps"), - GameStorage.effective(context)?.let { File(it.path, "steamapps") }, + internal fun steamappsDirs(context: Context): List<File> = ( + if (com.droiddeck.launcher.session.SessionPrefs.activeSteamClientArch(context) == "x86_64") + listOfNotNull( + File(com.droiddeck.launcher.session.SessionPrefs.activeSteamRoot(context), "steamapps"), + GameStorage.x64CardLibrary(context)?.let { File(it, "steamapps") }, + ) + else listOfNotNull( + File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/steamapps"), + GameStorage.effective(context)?.let { File(it.path, "steamapps") }, + ) ).filter { it.isDirectory } - /** - * Keeps what the libraries hold between looks: a manifest re-read only when its time changed. - * [poll] returns the apps that became fully installed since the last look (none on the first). - */ internal class Watch(private val dirs: () -> List<File>) { private val seen = HashMap<String, Pair<Long, Manifest?>>() private var first = true @@ -60,22 +55,16 @@ object SessionInstalls { } } - /** A finished install as the Games tab would list it. */ internal fun gameOf(m: Manifest): Library.SteamGame = Library.SteamGame(m.appId, m.name.ifEmpty { m.appId.toString() }, null, m.steamapps.parentFile?.path ?: "steam", gameFiles = File(m.steamapps, "common/${m.installDir}"), source = Library.SOURCE_STEAM) - /** - * Looks every five seconds while the session runs, on a thread of its own at background - * priority; each finished install becomes one job for its Windows components. - */ fun watch(context: Context) { val app = context.applicationContext Thread({ android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND) val watch = Watch { steamappsDirs(app) } try { - // The session is still starting when this is called: up to two minutes for it. var waited = 0L while (!SessionState.running && waited < 120_000L) { Thread.sleep(POLL_MS); waited += POLL_MS } watch.poll() diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/SteamAppInfo.kt b/app/src/main/java/com/droiddeck/launcher/frontend/SteamAppInfo.kt index 16a37fc0aa..d43c4bafb0 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/SteamAppInfo.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/SteamAppInfo.kt @@ -3,7 +3,6 @@ package com.droiddeck.launcher.frontend import android.content.Context import android.util.AtomicFile import android.util.Log -import com.droiddeck.launcher.runtime.LinuxRuntime import org.json.JSONArray import org.json.JSONObject import java.io.DataInputStream @@ -12,25 +11,16 @@ import java.io.RandomAccessFile import java.nio.ByteBuffer import java.nio.ByteOrder -/** - * Steam's own data for an app, from the client in the runtime: its app-info cache - * (Steam/appcache/appinfo.vdf, the PICS data the client keeps for every app it has seen). What is - * read is which Steamworks Shared depots (the VC++, DirectX... redistributables of app 228980) the - * app's depots point at, and its name. Kept per appid in the app's files, so it works offline; an - * app the client has not seen is looked for again after a week. - */ object SteamAppInfo { private const val TAG = "SteamAppInfo" private const val CACHE = "steam-appinfo.json" private const val RETRY_AFTER_MS = 7L * 24 * 3600 * 1000 - /** The Steamworks Shared app the redistributable depots belong to. */ const val SHARED_APP = "228980" class Info(val name: String, val sharedDepots: List<String>) - fun appinfoFile(context: Context) = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/appcache/appinfo.vdf") + fun appinfoFile(context: Context) = File(com.droiddeck.launcher.session.SessionPrefs.activeSteamRoot(context), "appcache/appinfo.vdf") - /** The shared depots for [appId]: from the cache, else the client's app-info file; null when unknown. */ @Synchronized fun info(context: Context, appId: Int, appinfo: File = appinfoFile(context)): Info? { val cacheFile = AtomicFile(File(context.filesDir, CACHE)) @@ -40,13 +30,10 @@ object SteamAppInfo { val known = cache.optJSONObject(appId.toString()) known?.let { o -> if (!o.optBoolean("miss")) return Info(o.optString("name"), o.optJSONArray("depots").strings()) - // A miss is read again when the client has written its cache since (the user may have - // looked at the app in Steam), else a week later. if (now - o.optLong("at") < RETRY_AFTER_MS && o.optLong("mtime") == mtime) return null } val read = runCatching { read(appinfo, appId) }.onFailure { Log.w(TAG, "appinfo: ${it.javaClass.simpleName}") }.getOrNull() val entry = JSONObject().put("at", now).put("mtime", mtime) - // When Steam was last asked anonymously ([lookup]), kept across re-reads of the file. known?.optLong("picsAt")?.takeIf { it > 0 }?.let { entry.put("picsAt", it) } if (read == null) entry.put("miss", true) else entry.put("name", read.name).put("depots", JSONArray(read.sharedDepots)) cache.put(appId.toString(), entry) @@ -55,14 +42,9 @@ object SteamAppInfo { return read } - /** Steam asked anonymously ([SteamPics]); a test stands in for it. */ @androidx.annotation.VisibleForTesting internal var pics: (List<Int>) -> Map<Int, Info?>? = { SteamPics.lookup(it) } - /** - * Of [appIds], those neither the client's cache (appinfo.vdf, read first: free) nor an earlier - * answer has, and that Steam was not asked about anonymously in the past week. - */ fun needLookup(context: Context, appIds: List<Int>): List<Int> { val wanted = appIds.distinct().filter { it > 0 && info(context, it) == null } if (wanted.isEmpty()) return emptyList() @@ -71,11 +53,6 @@ object SteamAppInfo { return wanted.filter { now - (cache.optJSONObject(it.toString())?.optLong("picsAt") ?: 0L) >= RETRY_AFTER_MS } } - /** - * [appIds] the client never saw, asked of Steam anonymously in one connection ([SteamPics], in - * batches) and every answer kept like the client's: an app's depots and name, or a miss tried - * again in a week. False when nothing needed asking or Steam could not be reached. Blocking. - */ @Synchronized fun lookup(context: Context, appIds: List<Int>): Boolean { val need = needLookup(context, appIds) @@ -96,7 +73,6 @@ object SteamAppInfo { return true } - /** What is kept for [appId]: "hit", "miss" or "none" (part of a game's list fingerprint). */ fun state(context: Context, appId: Int): String = cache(context).optJSONObject(appId.toString())?.let { if (it.optBoolean("miss")) "miss" else "hit" } ?: "none" private fun cache(context: Context): JSONObject = @@ -104,10 +80,6 @@ object SteamAppInfo { private fun JSONArray?.strings(): List<String> = if (this == null) emptyList() else (0 until length()).map { optString(it) } - /** - * [appId]'s entry in an appinfo.vdf (versions 27, 28 and 29, the last with its keys in a string - * table), or null when the file does not have it. - */ internal fun read(file: File, appId: Int): Info? { if (!file.isFile) return null RandomAccessFile(file, "r").use { raf -> @@ -181,7 +153,6 @@ object SteamAppInfo { return String(bytes, Charsets.UTF_8) } - /** One binary key-value map, to its end marker; keys by name, or by index into [strings]. */ private fun readMap(b: ByteBuffer, strings: List<String>?): Map<String, Any> { val out = LinkedHashMap<String, Any>() while (b.hasRemaining()) { diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/SteamFeatured.kt b/app/src/main/java/com/droiddeck/launcher/frontend/SteamFeatured.kt new file mode 100644 index 0000000000..10ddea6c35 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/frontend/SteamFeatured.kt @@ -0,0 +1,91 @@ +package com.droiddeck.launcher.frontend + +import android.content.Context +import android.util.Log +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue +import com.droiddeck.launcher.stores.StoreNet +import org.json.JSONArray +import org.json.JSONObject +import java.util.Locale +import java.util.concurrent.atomic.AtomicBoolean + +object SteamFeatured { + class Game(val appId: Int, val name: String, val art: String) + + private const val TAG = "SteamFeatured" + private const val PREFS = "steam_featured" + private const val KEY_GAMES = "games_v2" + private const val KEY_AT = "at" + private const val FRESH_MS = 6 * 60 * 60 * 1000L + private val SECTIONS = listOf("top_sellers", "new_releases", "specials") + private const val ASSET_ROOT = "https://shared.akamai.steamstatic.com/store_item_assets/" + + private val HIDDEN_DESCRIPTORS = setOf(1, 3, 4) + + var games by mutableStateOf<List<Game>>(emptyList()) + private set + private val loading = AtomicBoolean(false) + + fun load(context: Context) { + val prefs = context.applicationContext.getSharedPreferences(PREFS, Context.MODE_PRIVATE) + if (games.isEmpty()) parse(prefs.getString(KEY_GAMES, null))?.let { games = it } + if (System.currentTimeMillis() - prefs.getLong(KEY_AT, 0L) in 0 until FRESH_MS && games.isNotEmpty()) return + if (!loading.compareAndSet(false, true)) return + Thread({ + try { + val cc = Locale.getDefault().country.takeIf { it.length == 2 } ?: "US" + val body = StoreNet.get("https://store.steampowered.com/api/featuredcategories?cc=$cc&l=english") ?: return@Thread + val root = JSONObject(body) + val ids = LinkedHashSet<Int>() + for (section in SECTIONS) { + val items = root.optJSONObject(section)?.optJSONArray("items") ?: continue + for (i in 0 until items.length()) { + val o = items.optJSONObject(i) ?: continue + val id = o.optInt("id") + if (id > 0 && o.optInt("type", 0) == 0) ids += id + } + } + val list = withArt(ids, cc) + if (list.isEmpty()) return@Thread + prefs.edit().putString(KEY_GAMES, JSONArray(list.map { JSONObject().put("id", it.appId).put("name", it.name).put("art", it.art) }).toString()) + .putLong(KEY_AT, System.currentTimeMillis()).apply() + android.os.Handler(android.os.Looper.getMainLooper()).post { games = list } + Log.i(TAG, "featured games: ${list.size}") + } catch (e: Exception) { + Log.w(TAG, "featured: ${e.javaClass.simpleName}") + } finally { + loading.set(false) + } + }, "steam-featured").start() + } + + private fun withArt(ids: Collection<Int>, cc: String): List<Game> { + if (ids.isEmpty()) return emptyList() + val input = JSONObject() + .put("ids", JSONArray(ids.map { JSONObject().put("appid", it) })) + .put("context", JSONObject().put("language", "english").put("country_code", cc)) + .put("data_request", JSONObject().put("include_assets", true)) + val body = StoreNet.get( + "https://api.steampowered.com/IStoreBrowseService/GetItems/v1/?input_json=" + java.net.URLEncoder.encode(input.toString(), "UTF-8"), + ) ?: return emptyList() + val items = JSONObject(body).optJSONObject("response")?.optJSONArray("store_items") ?: return emptyList() + return (0 until items.length()).mapNotNull { i -> + val o = items.optJSONObject(i) ?: return@mapNotNull null + val descriptors = o.optJSONArray("content_descriptorids") + if (descriptors != null && (0 until descriptors.length()).any { descriptors.optInt(it) in HIDDEN_DESCRIPTORS }) return@mapNotNull null + val assets = o.optJSONObject("assets") ?: return@mapNotNull null + val format = assets.optString("asset_url_format").takeIf { "\${FILENAME}" in it } ?: return@mapNotNull null + val file = listOf("library_capsule_2x", "library_capsule").firstNotNullOfOrNull { k -> assets.optString(k).takeIf { it.isNotEmpty() } } + ?: return@mapNotNull null + Game(o.optInt("appid"), o.optString("name"), ASSET_ROOT + format.replace("\${FILENAME}", file)) + } + } + + private fun parse(text: String?): List<Game>? { + val a = runCatching { JSONArray(text ?: return null) }.getOrNull() ?: return null + return (0 until a.length()).mapNotNull { a.optJSONObject(it) }.map { Game(it.optInt("id"), it.optString("name"), it.optString("art")) } + .filter { it.appId > 0 && it.art.isNotEmpty() }.takeIf { it.isNotEmpty() } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/SteamGameArt.kt b/app/src/main/java/com/droiddeck/launcher/frontend/SteamGameArt.kt new file mode 100644 index 0000000000..cb4f49f0fd --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/frontend/SteamGameArt.kt @@ -0,0 +1,99 @@ +package com.droiddeck.launcher.frontend + +import android.content.Context +import com.droiddeck.launcher.stores.SteamLiveShortcuts +import com.droiddeck.launcher.session.SessionPrefs +import java.io.File + +object SteamGameArt { + internal fun dir(context: Context, appId: Int) = File(context.filesDir, "steam-art/$appId") + + private fun sourceFile(context: Context, appId: Int, slot: AddedGameArt.Slot) = File(dir(context, appId), "source-${slot.key}") + + internal fun setSource(context: Context, appId: Int, slot: AddedGameArt.Slot, value: String) { + val file = sourceFile(context, appId, slot) + if (value.isEmpty()) file.delete() else file.apply { parentFile?.mkdirs() }.writeText(value) + } + + fun chosenFile(context: Context, appId: Int, slot: AddedGameArt.Slot): File? = AddedGameArt.chosen(dir(context, appId), slot) + + fun withOverrides(context: Context, game: Library.SteamGame): Library.SteamGame { + if (game.library == Library.ADDED || !dir(context, game.appId).isDirectory) return game + val cover = chosenFile(context, game.appId, AddedGameArt.Slot.COVER) + val hero = chosenFile(context, game.appId, AddedGameArt.Slot.BACKGROUND) + val icon = chosenFile(context, game.appId, AddedGameArt.Slot.ICON) + if (cover == null && hero == null && icon == null) return game + return Library.SteamGame( + game.appId, game.name, cover ?: game.art, game.library, game.gameId, + hero ?: game.hero, game.lastPlayed, game.gameFiles, game.protonPrefix, icon ?: game.icon, game.source, game.storeId, + ) + } + + fun chosenSource(context: Context, appId: Int, slot: AddedGameArt.Slot): Pair<String, String> { + val value = sourceFile(context, appId, slot).takeIf { it.isFile }?.readText()?.trim().orEmpty() + return value.substringBefore('|') to value.substringAfter('|', "") + } + + fun describe(context: Context, game: Library.SteamGame): List<AddedGameArt.SlotState> { + val cache = File(SessionPrefs.activeSteamRoot(context), "appcache/librarycache") + val own = withOverrides(context, game) + return AddedGameArt.Slot.values().map { slot -> + chosenFile(context, game.appId, slot)?.let { + return@map AddedGameArt.SlotState(slot, it, chosenSource(context, game.appId, slot).first.ifEmpty { AddedGameArt.FILE }, true) + } + val auto = when (slot) { + AddedGameArt.Slot.COVER -> own.art + AddedGameArt.Slot.WIDE -> Library.steamCacheImage(cache, game.appId, listOf("library_header.jpg", "header.jpg")) + AddedGameArt.Slot.BACKGROUND -> own.hero + AddedGameArt.Slot.ICON -> own.icon + AddedGameArt.Slot.LOGO -> Library.steamCacheImage(cache, game.appId, listOf("logo.png")) + } + AddedGameArt.SlotState(slot, auto, if (auto != null) AddedGameArt.STEAM else AddedGameArt.AUTO, false) + } + } + + fun choices(context: Context, game: Library.SteamGame, slot: AddedGameArt.Slot): AddedGameArt.Choices { + val out = ArrayList<AddedGameArt.Option>() + AddedGameArt.steamOption(game.appId.toString(), slot)?.let { out.add(it) } + val (found, status) = AddedGameArt.sgdbChoices(context, File(dir(context, game.appId), "sgdb-id"), game.appId, game.name, slot) + out.addAll(found) + return AddedGameArt.Choices(out, status) + } + + fun choose(context: Context, game: Library.SteamGame, slot: AddedGameArt.Slot, option: AddedGameArt.Option): Boolean { + return synchronized(SteamGrid.lock) { + val folder = dir(context, game.appId) + val fresh = AddedGameArt.storeNew(folder, slot, option) ?: return@synchronized false + if (!push(context, game, slot, fresh)) { + fresh.delete() + return@synchronized false + } + AddedGameArt.dropOlder(folder, slot, fresh) + setSource(context, game.appId, slot, option.group + "|" + option.full) + true + } + } + + fun reset(context: Context, game: Library.SteamGame, slot: AddedGameArt.Slot) { + synchronized(SteamGrid.lock) { + if (!push(context, game, slot, null)) return@synchronized + AddedGameArt.chosen(dir(context, game.appId), slot)?.delete() + setSource(context, game.appId, slot, "") + } + } + + fun position(context: Context, game: Library.SteamGame): LogoPosition.Value? = SteamGrid.position(SteamGrid.target(game, context)) + + fun setPosition(context: Context, game: Library.SteamGame, value: LogoPosition.Value?): Boolean { + if (!SteamGrid.writePosition(context, SteamGrid.target(game, context), value)) return false + AddedGamesPublisher.later(context) { SteamLiveShortcuts.setLogoPosition(context, game.appId.toLong(), value) } + return true + } + + private fun push(context: Context, game: Library.SteamGame, slot: AddedGameArt.Slot, file: File?): Boolean { + val type = slot.assetType ?: return true + if (!SteamGrid.write(context, SteamGrid.target(game, context), slot, file)) return false + AddedGamesPublisher.later(context) { SteamLiveShortcuts.setArt(context, game.appId.toLong(), type, file) } + return true + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/SteamGrid.kt b/app/src/main/java/com/droiddeck/launcher/frontend/SteamGrid.kt new file mode 100644 index 0000000000..47b679031f --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/frontend/SteamGrid.kt @@ -0,0 +1,209 @@ +package com.droiddeck.launcher.frontend + +import android.content.Context +import android.util.Log +import com.droiddeck.launcher.session.SessionPrefs +import org.json.JSONObject +import java.io.File + +/** Steam keeps a game's custom art in `userdata/<account>/config/grid`; this is where DroidDeck's choices and Steam's meet. */ +object SteamGrid { + private const val TAG = "SteamGrid" + + /** Every change to a game's art, here or in a scan, takes this first so two of them never interleave. */ + internal val lock = Any() + private const val MANIFEST = ".droiddeck-art.json" + private val SUFFIX = mapOf(AddedGameArt.Slot.COVER to "p", AddedGameArt.Slot.WIDE to "", AddedGameArt.Slot.BACKGROUND to "_hero", AddedGameArt.Slot.LOGO to "_logo") + private val EXTS = listOf("png", "jpg", "jpeg", "webp") + + class Target(val artDir: File, val id: Long, val setSource: (AddedGameArt.Slot, String) -> Unit) + + fun target(game: Library.SteamGame, context: Context) = Target(SteamGameArt.dir(context, game.appId), game.appId.toLong()) { slot, value -> + SteamGameArt.setSource(context, game.appId, slot, value) + } + + fun target(game: AddedGames.Game, context: Context) = Target(AddedGameArt.cacheDir(context, game), game.appId and 0xFFFFFFFFL) { slot, value -> + SessionPrefs.setAddedGameArtSource(context, game.folder.path, slot.key, value) + } + + internal fun dir(context: Context): File? { + return AddedGames.accountConfig(SessionPrefs.activeSteamRoot(context))?.let { File(it, "grid") } + } + + private fun files(grid: File, id: Long, slot: AddedGameArt.Slot): List<File> = + EXTS.map { File(grid, "$id${SUFFIX[slot]}.$it") }.filter { it.isFile } + + private fun signature(file: File?) = if (file == null) "" else "${file.length()}:${file.lastModified()}" + + /** Each Steam client has its own grid folder, so what was last seen there is kept per client. */ + private fun sigName(context: Context, key: String) = + if (SessionPrefs.activeSteamClientArch(context) == "x86_64") "grid-x86_64-$key" else "grid-$key" + + private fun sigFile(context: Context, target: Target, slot: AddedGameArt.Slot) = File(target.artDir, sigName(context, slot.key)) + + private fun recorded(context: Context, target: Target, slot: AddedGameArt.Slot): String? = + sigFile(context, target, slot).takeIf { it.isFile }?.readText() + + private fun record(context: Context, target: Target, slot: AddedGameArt.Slot, value: String) { + target.artDir.mkdirs() + sigFile(context, target, slot).writeText(value) + } + + private fun writtenByDroidDeck(grid: File): Set<String> = runCatching { + val manifest = JSONObject(File(grid, MANIFEST).readText()) + manifest.keys().asSequence().filter { name -> File(grid, name).let { it.isFile && it.length() == manifest.optLong(name, -1L) } }.toSet() + }.getOrDefault(emptySet()) + + /** Puts a choice (or, with null, the lack of one) where Steam reads it, whether or not Steam is running. */ + fun write(context: Context, target: Target, slot: AddedGameArt.Slot, file: File?): Boolean = synchronized(lock) { place(context, target, slot, file) } + + private fun place(context: Context, target: Target, slot: AddedGameArt.Slot, file: File?): Boolean { + val suffix = SUFFIX[slot] ?: return true + val grid = dir(context) ?: return true + if (file == null) { + if (files(grid, target.id, slot).map { it.delete() }.any { !it }) return false + record(context, target, slot, "") + return true + } + val ext = file.extension.lowercase().let { if (it == "jpeg") "jpg" else it } + if (ext !in EXTS) return false + grid.mkdirs() + val dst = File(grid, "${target.id}$suffix.$ext") + val tmp = File(grid, dst.name + ".tmp") + val placed = runCatching { file.copyTo(tmp, overwrite = true); if (tmp.renameTo(dst)) dst else null }.getOrNull() + if (placed == null) { + tmp.delete() + return false + } + if (files(grid, target.id, slot).filter { it != dst }.map { it.delete() }.any { !it }) return false + record(context, target, slot, signature(placed)) + return true + } + + private const val POSITION = "logo-position" + private const val POSITION_SIG = "json" + + private fun positionFile(grid: File, id: Long) = File(grid, "$id.json") + + private fun positionIn(file: File): LogoPosition.Value? = file.takeIf { it.isFile }?.let { runCatching { it.readText() }.getOrNull() }?.let(LogoPosition::parse) + + /** The logo position chosen here (or taken over from Steam) for a game; null when Steam's own default applies. */ + fun position(target: Target): LogoPosition.Value? = positionIn(File(target.artDir, POSITION)) + + private fun positionRecorded(context: Context, target: Target): String? = + File(target.artDir, sigName(context, POSITION_SIG)).takeIf { it.isFile }?.readText() + + private fun recordPosition(context: Context, target: Target, value: String) { + target.artDir.mkdirs() + File(target.artDir, sigName(context, POSITION_SIG)).writeText(value) + } + + private fun storePosition(target: Target, value: LogoPosition.Value?): Boolean { + val file = File(target.artDir, POSITION) + if (value == null) return !file.exists() || file.delete() + target.artDir.mkdirs() + return runCatching { file.writeText(LogoPosition.toJson(value).toString()) }.isSuccess + } + + /** Sets (or with null, clears) a game's logo position here and in the client's grid folder, whether or not Steam is running. */ + fun writePosition(context: Context, target: Target, value: LogoPosition.Value?): Boolean = synchronized(lock) { + placePosition(context, target, value) && storePosition(target, value) + } + + /** Steam keeps the position in `<id>.json`; anything else that file holds is left as it was. */ + private fun placePosition(context: Context, target: Target, value: LogoPosition.Value?): Boolean { + val grid = dir(context) ?: return true + val file = positionFile(grid, target.id) + val existing = if (file.isFile) runCatching { JSONObject(file.readText()) }.getOrNull() else null + if (file.isFile && existing == null) return value == null + val next = if (value == null) existing?.let(LogoPosition::without) else LogoPosition.toJson(value, existing ?: JSONObject()) + if (next == null) { + if (file.isFile && !file.delete()) return false + recordPosition(context, target, "") + return true + } + grid.mkdirs() + val tmp = File(grid, file.name + ".tmp") + val placed = runCatching { tmp.writeText(next.toString()); tmp.renameTo(file) }.getOrDefault(false) + if (!placed) { + tmp.delete() + return false + } + recordPosition(context, target, signature(file)) + return true + } + + /** A `logoPosition` this version cannot read (a pin it does not know, say) is left alone rather than read as "removed". */ + private fun hasUnknownPosition(file: File): Boolean { + val json = runCatching { JSONObject(file.readText()) }.getOrNull() ?: return false + return json.has("logoPosition") && LogoPosition.parse(json) == null + } + + private fun reconcilePosition(context: Context, grid: File, target: Target) { + val file = positionFile(grid, target.id) + if (hasUnknownPosition(file)) return + val theirs = positionIn(file) + val now = if (theirs != null) signature(file) else "" + val before = positionRecorded(context, target) + val own = position(target) + when { + before == null && own != null && theirs == null -> placePosition(context, target, own) + before == null || now != before -> { + // Recorded only once the local side agrees, so a failed take-over is tried again on the next scan. + if (theirs != null) { + if (own == theirs || storePosition(target, theirs)) recordPosition(context, target, now) + } else { + if (own == null || storePosition(target, null)) recordPosition(context, target, "") + } + } + own != null && own != theirs -> placePosition(context, target, own) + } + } + + /** Takes over what changed in Steam since the last look; returns true when a choice was added, replaced or dropped. */ + fun sync(context: Context, targets: List<Target>): Boolean = synchronized(lock) { reconcile(context, targets) } + + private fun reconcile(context: Context, targets: List<Target>): Boolean { + val grid = dir(context) ?: return false + val ours = writtenByDroidDeck(grid) + var changed = false + for (target in targets) for (slot in SUFFIX.keys) { + try { + val own = AddedGameArt.chosen(target.artDir, slot) + val present = files(grid, target.id, slot) + val theirs = present.filter { it.name !in ours }.maxByOrNull { it.lastModified() } + val now = signature(theirs) + val before = recorded(context, target, slot) + when { + before == null && own != null && theirs == null -> write(context, target, slot, own) + before == null || now != before -> { + if (theirs != null) { + if (own != null && own.length() == theirs.length() && own.readBytes().contentEquals(theirs.readBytes())) record(context, target, slot, now) + else if (AddedGameArt.store(target.artDir, slot, AddedGameArt.Option(AddedGameArt.STEAM, theirs.path, theirs.path))) { + target.setSource(slot, AddedGameArt.STEAM + "|steam-client") + record(context, target, slot, now) + changed = true + } + } else { + if (own != null && present.isEmpty()) { own.delete(); target.setSource(slot, ""); changed = true } + record(context, target, slot, "") + } + } + own != null && theirs != null && now == before && own.length() != theirs.length() -> write(context, target, slot, own) + own != null && present.isEmpty() -> write(context, target, slot, own) + } + } catch (e: Exception) { + Log.w(TAG, "${target.id} ${slot.key}: ${e.javaClass.simpleName}") + } + } + for (target in targets) { + try { + reconcilePosition(context, grid, target) + } catch (e: Exception) { + Log.w(TAG, "${target.id} logo position: ${e.javaClass.simpleName}") + } + } + if (changed) Log.i(TAG, "took over art changed in Steam") + return changed + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/SteamGridDb.kt b/app/src/main/java/com/droiddeck/launcher/frontend/SteamGridDb.kt index 630fb64cd6..dec6c24cfb 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/SteamGridDb.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/SteamGridDb.kt @@ -11,37 +11,33 @@ import java.net.HttpURLConnection import java.net.URL import java.net.URLEncoder -/** - * SteamGridDB, the art source after Steam's store: a game by its Steam appid, else by a search - * whose result must carry the same name, then its best-rated grids, heroes, logos and icons. - * - * The API key: the user's own (Steam settings › Games), sealed with [CredentialCipher] in the - * app's files, else the one the build carries (`BuildConfig.SGDB_API_KEY`, from a CI secret), else - * none, and then this step is skipped. The key travels only in the Authorization header and is - * never logged. - */ object SteamGridDb { private const val TAG = "SteamGridDb" private const val API = "https://www.steamgriddb.com/api/v2" private const val QUERY = "nsfw=false&humor=false" + enum class Status { OK, NO_KEY, BAD_KEY, LIMIT, OFFLINE, SERVER, NO_GAME } + + class Failed(val status: Status) : Exception(status.name) + + class Game(val id: Int, val name: String, val verified: Boolean) + @VisibleForTesting @Volatile internal var keys: CredentialCipher.KeyProvider = CredentialCipher.Keystore private fun keyFile(context: Context) = File(context.filesDir, "sgdb/key.json") - /** The key the build carries, or "" (a build without the secret, a fork's PR build). */ fun builtInKey(): String = runCatching { Class.forName("com.droiddeck.launcher.BuildConfig").getField("SGDB_API_KEY").get(null) as? String }.getOrNull().orEmpty() - /** The user's key wins, then the build's; "" when there is neither. */ fun pick(user: String, builtIn: String): String = user.trim().ifEmpty { builtIn.trim() } fun key(context: Context): String = pick(userKey(context), builtInKey()) - /** The key the user entered, or "". */ + fun keyChangedAt(context: Context): Long = keyFile(context).lastModified() + @Synchronized fun userKey(context: Context): String { val f = keyFile(context) @@ -56,7 +52,6 @@ object SteamGridDb { } } - /** Saves the user's key sealed (plain only where the Keystore does not work); "" clears it. */ @Synchronized fun setUserKey(context: Context, key: String) { val f = keyFile(context) @@ -75,7 +70,6 @@ object SteamGridDb { if (!tmp.renameTo(f)) { f.delete(); tmp.renameTo(f) } } - /** The SteamGridDB game id for [steamAppId], else for a search on [name] that returns the same name; null when neither. */ fun gameId(key: String, steamAppId: Int?, name: String): Int? { if (steamAppId != null) { json(key, "$API/games/steam/$steamAppId")?.optJSONObject("data")?.optInt("id")?.takeIf { it > 0 }?.let { return it } @@ -85,16 +79,11 @@ object SteamGridDb { return match(name, (0 until results.length()).map { results.getJSONObject(it) }.map { it.optInt("id") to it.optString("name") }) } - /** The id of the first result whose name matches [name] ([AddedGameArt.nameMatch]); no blind first pick. */ internal fun match(name: String, results: List<Pair<Int, String>>): Int? = results.map { (id, got) -> id to AddedGameArt.nameMatch(name, got) } .filter { it.second > 0 && it.first > 0 } .maxByOrNull { it.second }?.first - /** - * Fetches what is missing into [cache] under the names Steam's art uses there (p.jpg, - * header.jpg, hero.jpg, logo.png) and the icon as icon-sgdb.png. True when anything arrived. - */ fun download(key: String, id: Int, cache: File): Boolean { var got = false for ((path, local) in listOf( @@ -116,32 +105,74 @@ object SteamGridDb { return got } - /** The best-scored [limit] images for [slot] of game [id], as (thumbnail, full image) URLs. */ - fun images(key: String, id: Int, slot: AddedGameArt.Slot, limit: Int): List<Pair<String, String>> { - val path = when (slot) { + fun search(key: String, term: String): List<Game> { + val q = term.trim() + if (q.isEmpty()) return emptyList() + val enc = URLEncoder.encode(q, "UTF-8").replace("+", "%20") + val data = json(key, "$API/search/autocomplete/$enc")?.optJSONArray("data") ?: return emptyList() + return games(data) + } + + internal fun games(data: JSONArray): List<Game> = + (0 until data.length()).mapNotNull { data.optJSONObject(it) } + .filter { it.optInt("id") > 0 && it.optString("name").isNotEmpty() } + .map { Game(it.optInt("id"), it.optString("name"), it.optBoolean("verified")) } + + internal fun path(id: Int, slot: AddedGameArt.Slot): String = + when (slot) { AddedGameArt.Slot.COVER -> "grids/game/$id?dimensions=600x900&$QUERY" + AddedGameArt.Slot.WIDE -> "grids/game/$id?dimensions=460x215,920x430&$QUERY" AddedGameArt.Slot.BACKGROUND -> "heroes/game/$id?$QUERY" AddedGameArt.Slot.LOGO -> "logos/game/$id?$QUERY" AddedGameArt.Slot.ICON -> "icons/game/$id?$QUERY" } - val items = json(key, "$API/$path")?.optJSONArray("data") ?: return emptyList() - return ranked(items, pngOnly = slot == AddedGameArt.Slot.LOGO || slot == AddedGameArt.Slot.ICON).take(limit) + + fun page(key: String, id: Int, slot: AddedGameArt.Slot): List<Pair<String, String>> { + val items = json(key, "$API/${path(id, slot)}")?.optJSONArray("data") ?: return emptyList() + return ranked(items, pngOnly = slot == AddedGameArt.Slot.LOGO || slot == AddedGameArt.Slot.ICON) } - /** [items] best-scored first, as (thumbnail, full image) URLs; for a .png slot only PNGs. */ + private const val PAGE_SIZE = 50 + private const val MAX_PAGES = 4 + + fun all(key: String, id: Int, slot: AddedGameArt.Slot): List<Pair<String, String>> { + val raw = JSONArray() + for (n in 0 until MAX_PAGES) { + val url = "$API/${path(id, slot)}" + if (n > 0) "&page=$n" else "" + val data: JSONArray? = try { + json(key, url)?.optJSONArray("data") + } catch (e: Failed) { + if (n == 0) throw e + null + } + val items = data ?: break + for (i in 0 until items.length()) raw.put(items.get(i)) + if (items.length() < PAGE_SIZE) break + } + return ranked(raw, pngOnly = slot == AddedGameArt.Slot.LOGO || slot == AddedGameArt.Slot.ICON) + } + + fun images(key: String, id: Int, slot: AddedGameArt.Slot, limit: Int): List<Pair<String, String>> = + page(key, id, slot).take(limit) + internal fun ranked(items: JSONArray, pngOnly: Boolean): List<Pair<String, String>> = (0 until items.length()).map { items.getJSONObject(it) } .filter { it.optString("url").startsWith("https://") && (!pngOnly || it.optString("mime") == "image/png" || it.optString("url").endsWith(".png", true)) } .sortedByDescending { it.optInt("score", 0) } .map { (it.optString("thumb").takeIf { t -> t.startsWith("https://") } ?: it.optString("url")) to it.optString("url") } - /** The highest-scored image's URL; for a .png slot only a PNG. */ internal fun best(items: JSONArray, pngOnly: Boolean): String? = (0 until items.length()).map { items.getJSONObject(it) } .filter { it.optString("url").startsWith("https://") && (!pngOnly || it.optString("mime") == "image/png" || it.optString("url").endsWith(".png", true)) } .maxByOrNull { it.optInt("score", 0) }?.optString("url") - /** A GET with the key in its Authorization header; the body as JSON, or null. Logs the path only. */ + internal fun failure(code: Int): Status? = when { + code == 401 || code == 403 -> Status.BAD_KEY + code == 429 -> Status.LIMIT + code >= 500 -> Status.SERVER + else -> null + } + private fun json(key: String, url: String): JSONObject? { val c = URL(url).openConnection() as HttpURLConnection c.connectTimeout = 10_000 @@ -149,8 +180,19 @@ object SteamGridDb { c.setRequestProperty("User-Agent", "DroidDeck-launcher") c.setRequestProperty("Authorization", "Bearer $key") return try { - if (c.responseCode != 200) { Log.w(TAG, "${URL(url).path}: HTTP ${c.responseCode}"); null } - else JSONObject(c.inputStream.use { it.readBytes() }.toString(Charsets.UTF_8)).takeIf { it.optBoolean("success", true) } + val code = c.responseCode + if (code == 200) { + JSONObject(c.inputStream.use { it.readBytes() }.toString(Charsets.UTF_8)).takeIf { it.optBoolean("success", true) } + } else { + Log.w(TAG, "${URL(url).path}: HTTP $code") + failure(code)?.let { throw Failed(it) } + null + } + } catch (e: Failed) { + throw e + } catch (e: java.io.IOException) { + Log.w(TAG, "${URL(url).path}: ${e.javaClass.simpleName}") + throw Failed(Status.OFFLINE) } catch (e: Exception) { Log.w(TAG, "${URL(url).path}: ${e.javaClass.simpleName}"); null } finally { diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/SteamMatch.kt b/app/src/main/java/com/droiddeck/launcher/frontend/SteamMatch.kt index 177888a467..c0c83676dc 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/SteamMatch.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/SteamMatch.kt @@ -5,20 +5,9 @@ import android.util.AtomicFile import org.json.JSONObject import java.io.File -/** - * Which Steam app a game added in DroidDeck is, kept once per game (by its folder) and used by - * everything that asks: its art ([AddedGameArt]) and its Windows components ([WinCompSources]), - * so the two never disagree. - * - * [Certainty.FILES]: the game's own files name the appid (steam_appid.txt, also under - * steam_settings/ or a parent folder; an emulator ini; Steam's appmanifest) - certain. - * [Certainty.NAME]: Steam's store search returned a game of the same name - a guess. - * [Certainty.NONE]: neither; a miss is tried again after a week. - */ object SteamMatch { enum class Certainty { FILES, NAME, NONE } - /** [source]: what gave the appid (GameIdentifier's source, or "store search"). */ class Match(val appId: Int?, val certainty: Certainty, val source: String, val checkedAt: Long) private const val FILE = "steam-matches.json" @@ -50,12 +39,6 @@ object SteamMatch { try { out.write(json.toString().toByteArray()); atomic.finishWrite(out) } catch (e: Exception) { atomic.failWrite(out) } } - /** - * The match for the game in [key] (its folder), [exe] its exe and [name] its title: its files - * first, always read again; else the one kept (a name match stays, a miss for a week); else - * [legacy], an appid an earlier build's art lookup kept; else [search] on the name, when given. - * Blocking ([search] asks the network). - */ fun resolve(context: Context, key: String, exe: File, name: String, legacy: File? = null, search: ((String) -> Int?)? = null): Match { val now = System.currentTimeMillis() val identity = runCatching { GameIdentifier.identify(exe) }.getOrNull() diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/SteamPics.kt b/app/src/main/java/com/droiddeck/launcher/frontend/SteamPics.kt index ae0bf12f2e..2dd132c510 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/SteamPics.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/SteamPics.kt @@ -18,18 +18,9 @@ import java.util.zip.GZIPInputStream import javax.net.ssl.SSLSocket import javax.net.ssl.SSLSocketFactory -/** - * Steam's own app info (PICS) for apps the client in the runtime has never seen, asked of Steam - * anonymously: a connection to one of Steam's connection managers (the list from Steam's public - * ISteamDirectory/GetCMListForConnect, the WebSocket transport Steam's web clients use), an - * anonymous logon - no account, nothing of the user's Steam sign-in - a request for the apps' - * access tokens and then their product info, the app KeyValues read for their Steamworks Shared - * depots and name, and the connection closed. What steamcmd's anonymous `app_info_print` sees. - */ object SteamPics { private const val TAG = "SteamPics" private const val CM_LIST = "https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v1/?cellid=0&format=json" - /** At most this many apps per request. */ const val BATCH = 25 private const val PROTO = 0x80000000.toInt() private const val EMSG_MULTI = 1 @@ -41,13 +32,8 @@ object SteamPics { private const val EMSG_INFO_REQUEST = 8903 private const val EMSG_INFO_RESPONSE = 8904 private const val PROTOCOL_VERSION = 65580 - /** An anonymous user's SteamID: universe Public, account type AnonUser, instance 0. */ private const val ANON_STEAMID = (1L shl 56) or (10L shl 52) - /** - * [appIds]' info, one connection for all of them in batches of [BATCH]: each known app's - * info, null for an app Steam does not know. Null when Steam could not be reached. Blocking. - */ fun lookup(appIds: List<Int>): Map<Int, SteamAppInfo.Info?>? { if (appIds.isEmpty()) return emptyMap() val host = runCatching { cmHost() }.getOrNull() ?: return null @@ -56,7 +42,6 @@ object SteamPics { ws.send(message(EMSG_LOGON, header(ANON_STEAMID, 0), Proto().varint(1, PROTOCOL_VERSION.toLong()).varint(7, 16).string(6, "english").bytes())) var steamId = 0L var session = 0 - // The logon's answer (other messages before it are passed over). loop@ while (true) for ((emsg, hdr, body) in messages(ws.receive() ?: return null)) if (emsg == EMSG_LOGON_RESPONSE) { val h = fields(hdr); val b = fields(body) if ((b[1]?.firstOrNull() as? Long ?: 0L) != 1L) { Log.w(TAG, "anonymous logon refused: ${b[1]}"); return null } @@ -99,10 +84,8 @@ object SteamPics { } } - /** [appIds] in requests of at most [BATCH], each once. */ fun batches(appIds: List<Int>): List<List<Int>> = appIds.distinct().chunked(BATCH) - /** A connection manager for the WebSocket transport, least loaded first as Steam lists them. */ private fun cmHost(): String? { val c = URL(CM_LIST).openConnection() as HttpURLConnection c.connectTimeout = 10_000; c.readTimeout = 10_000 @@ -112,11 +95,9 @@ object SteamPics { .firstOrNull { it.optString("type") == "websockets" }?.optString("endpoint")?.substringBefore(':') } - // ---- the product info answer ---- class InfoResponse(val apps: Map<Int, SteamAppInfo.Info>, val unknown: List<Int>, val pending: Boolean) - /** A CMsgClientPICSProductInfoResponse: each app's KeyValues read, the unknown ones, whether more follows. */ @VisibleForTesting internal fun parseInfoResponse(body: ByteArray): InfoResponse { val f = fields(body) @@ -132,17 +113,14 @@ object SteamPics { return InfoResponse(apps, unknown, (f[6]?.firstOrNull() as? Long ?: 0L) != 0L) } - /** An app's KeyValues text ("appinfo" { "common" {...} "depots" {...} }) to its name and shared depots. */ @VisibleForTesting internal fun infoFromKeyValues(text: String): SteamAppInfo.Info? { - // The buffer ends in a NUL, kept or not by whoever handed it over. val tree = runCatching { KeyValues(text.trimEnd('\u0000', ' ', '\n', '\r', '\t')).read() }.getOrNull() ?: return null @Suppress("UNCHECKED_CAST") val app = tree["appinfo"] as? Map<String, Any> ?: return null return SteamAppInfo.infoOf(app) } - /** Valve's text KeyValues: quoted keys and values, nested braces. */ private class KeyValues(private val s: String) { private var i = 0 fun read(): Map<String, Any> = map(top = true) @@ -182,7 +160,6 @@ object SteamPics { } } - // ---- messages ---- private fun header(steamId: Long, session: Int) = Proto().fixed64(1, steamId).varint(2, session.toLong()).bytes() @@ -190,7 +167,6 @@ object SteamPics { ByteBuffer.allocate(8 + header.size + body.size).order(ByteOrder.LITTLE_ENDIAN) .putInt(emsg or PROTO).putInt(header.size).put(header).put(body).array() - /** One message off the wire as (emsg, header, body); a Multi unpacked (gunzipped when it says so) into the ones inside. */ @VisibleForTesting internal fun messages(data: ByteArray): List<Triple<Int, ByteArray, ByteArray>> { if (data.size < 8) return emptyList() @@ -217,9 +193,7 @@ object SteamPics { return out } - // ---- protobuf, the little needed ---- - /** Writes protobuf fields. */ @VisibleForTesting internal class Proto { private val out = ByteArrayOutputStream() @@ -231,7 +205,6 @@ object SteamPics { fun bytes(): ByteArray = out.toByteArray() } - /** Reads protobuf fields: number to values (Long for varint and fixed, ByteArray for length-delimited). */ @VisibleForTesting internal fun fields(b: ByteArray): Map<Int, List<Any>> { val out = HashMap<Int, MutableList<Any>>() @@ -258,16 +231,13 @@ object SteamPics { return out } - // ---- WebSocket over TLS, binary frames ---- private class Wss(host: String, timeoutMs: Int) : AutoCloseable { - // Made with the host name, so it goes out as SNI. private val socket: SSLSocket = (SSLSocketFactory.getDefault().createSocket(host, 443) as SSLSocket).apply { soTimeout = timeoutMs } private val out: OutputStream private val input: DataInputStream init { - // Host name checked against the certificate, as HTTPS does. socket.sslParameters = socket.sslParameters.apply { endpointIdentificationAlgorithm = "HTTPS" } socket.startHandshake() out = socket.outputStream @@ -305,7 +275,6 @@ object SteamPics { out.write(frame.toByteArray()); out.flush() } - /** The next binary message (fragments joined); null on close. */ fun receive(): ByteArray? { val message = ByteArrayOutputStream() while (true) { diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/SteamRedists.kt b/app/src/main/java/com/droiddeck/launcher/frontend/SteamRedists.kt index f656df784c..f41b8265ff 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/SteamRedists.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/SteamRedists.kt @@ -2,14 +2,7 @@ package com.droiddeck.launcher.frontend import java.io.File -/** - * What Steam itself installs alongside a game: the Steamworks Shared redistributables (app 228980) - * listed under "SharedDepots" in the game's appmanifest. Those live in Steamworks Shared rather than - * the game's folder, so the folder scan ([DependencyDetector]) cannot see them; this reads Steam's - * list instead. Depots are matched to Bannerlator's catalog names; unknown ones are left out. - */ object SteamRedists { - /** Steamworks Shared depot -> (catalog component, what Steam calls it). 2015-2019 runtimes are one family. */ val DEPOTS = linkedMapOf( "228981" to ("vcredist2005_dll" to "VC++ 2005"), "228982" to ("vcredist2008_dll" to "VC++ 2008"), @@ -25,7 +18,6 @@ object SteamRedists { private val BLOCK = Regex("\"SharedDepots\"\\s*\\{([^}]*)\\}", RegexOption.IGNORE_CASE) private val ENTRY = Regex("\"(\\d+)\"\\s+\"\\d+\"") - /** The game's appmanifest beside its install folder (steamapps/common/<dir> -> steamapps/). */ fun manifest(gameDir: File?, appId: Int): File? { val steamapps = gameDir?.parentFile?.parentFile ?: return null return File(steamapps, "appmanifest_$appId.acf").takeIf { it.isFile } diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/StoreListBackfill.kt b/app/src/main/java/com/droiddeck/launcher/frontend/StoreListBackfill.kt index 0ac8cf34d3..63315ac7bf 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/StoreListBackfill.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/StoreListBackfill.kt @@ -14,47 +14,28 @@ import com.droiddeck.launcher.stores.gog.GogDownloadManager import org.json.JSONObject import java.io.File -/** - * For a GOG or Epic game installed before its sidecar kept the store's list (GOG's build - * `dependencies`, Epic's manifest prerequisite): the list read once from the store's build - * manifest with the saved sign-in - the manifest alone, never a game file - and kept in the sidecar - * the way an install keeps it. Runs on the components' worker ([AutoComponents]). Without a - * sign-in or a network it is skipped quietly and tried again a week later. - */ object StoreListBackfill { private const val TAG = "StoreListBackfill" private const val FILE = "store-list-backfill.json" private const val RETRY_AFTER_MS = 7L * 24 * 3600 * 1000 - /** The store's list for the game in a sidecar: GOG's dependency ids, or Epic's prerequisite {name, path}; null when it could not be had. */ fun interface Fetcher { fun fetch(context: Context, sidecar: StoreGameSidecar): Map<String, String>? } - /** The store itself, with the saved sign-in. */ internal val storeFetcher = Fetcher { context, sidecar -> fromStore(context, sidecar) } @VisibleForTesting internal var fetcher: Fetcher = storeFetcher - /** Whether [sidecar] was written before the list was kept. */ - /** - * Whether [sidecar] has no list read whole: written before the list was kept, or by a build - * that could have written an empty one for a manifest it did not read right. - */ fun needs(sidecar: StoreGameSidecar): Boolean = (sidecar.store == Store.GOG || sidecar.store == Store.EPIC) && WinCompSources.LIST_READ !in sidecar.extra - /** - * The list for the game in [folder], fetched and kept when its sidecar lacks one and it was not - * tried in the past week. True when the sidecar changed. Blocking (network). - */ @Synchronized fun fill(context: Context, folder: File): Boolean { val sidecar = StoreGameSidecar.read(folder)?.takeIf { it.isInstalled && needs(it) } ?: return false val tries = runCatching { JSONObject(AtomicFile(File(context.filesDir, FILE)).readFully().toString(Charsets.UTF_8)) }.getOrDefault(JSONObject()) val now = System.currentTimeMillis() if (now - tries.optLong(folder.path, 0L) < RETRY_AFTER_MS) return false - // Offline is no try: it waits for a network rather than a week. if (!AutoComponents.online(context)) return false val list = runCatching { fetcher.fetch(context, sidecar) }.getOrNull() if (list == null) { @@ -65,7 +46,6 @@ object StoreListBackfill { Log.i(TAG, "${sidecar.title}: the ${sidecar.store.label} list could not be had; again in a week") return false } - // Read fresh and written whole, as an install writes it: only the list is added. val current = StoreGameSidecar.read(folder) ?: return false current.copy(extra = current.extra + list + (WinCompSources.LIST_READ to "1")).write(folder) Log.i(TAG, "backfill: ${sidecar.title} " + when (sidecar.store) { diff --git a/app/src/main/java/com/droiddeck/launcher/frontend/WinCompSources.kt b/app/src/main/java/com/droiddeck/launcher/frontend/WinCompSources.kt index b96d23bd65..7562cc1ee0 100644 --- a/app/src/main/java/com/droiddeck/launcher/frontend/WinCompSources.kt +++ b/app/src/main/java/com/droiddeck/launcher/frontend/WinCompSources.kt @@ -7,35 +7,11 @@ import org.json.JSONObject import java.io.File import java.util.Locale -/** - * Which Windows components a game needs, from the list its source keeps - the source badge decides - * which list is trusted: - * - * - **Steam**: the Steamworks Shared redistributables Steam installs with the game (its - * appmanifest's SharedDepots, else the client's app info) - turned on by themselves. - * - **GOG**: the build manifest's `dependencies`, kept in the sidecar at install - on by themselves. - * - **Epic Games**: the manifest's prerequisite (usually UE4/UE5's prerequisite setup: VC++ and the - * DirectX June 2010 runtime), kept in the sidecar at install - on by themselves. - * - **Amazon Games**: fuel.json's PostInstall installers - on by themselves. - * - **Custom** whose files name a Steam appid ([SteamMatch], certain): Steam's list for that app - - * on by themselves. Matched by name only: the same list as Recommended. No match: the folder scan - * ([DependencyDetector]) as Recommended. - * - * Every store entry is mapped to catalog names here, in one place; one that maps to nothing is a - * suggestion under its own name. The folder scan is offered as Recommended for every game. - */ object WinCompSources { - /** Whose list a finding came from; the reason line says it. */ enum class Origin { STEAM, GOG, EPIC, AMAZON, STEAM_NAME, FOLDER } - /** - * One thing a list names: [component] the catalog name it maps to (null: none, a suggestion), - * [original] what the list called it, [auto] whether it is turned on by itself, [args] what - * the reason line names (Steam: the label, the game, the appid). - */ data class Finding(val component: String?, val original: String, val origin: Origin, val auto: Boolean, val args: List<String> = emptyList()) - // ---- mapping tables: a store's names -> catalog components ---- private val VC_YEAR = mapOf( "2005" to "vcredist2005", "2008" to "vcredist2008", "2010" to "vcredist2010", "2012" to "vcredist2012", @@ -47,10 +23,6 @@ object WinCompSources { "472" to "dotnet472", "48" to "dotnet48", "481" to "dotnet48", ) - /** - * A GOG dependency id ("MSVC2017_x64", "DirectX", "DOTNET48", "PhysX", "OpenAL", "XNA4") to its - * components; empty for one that is none of ours (ISI scripts, GOG's own helpers). - */ fun gog(id: String): List<String> { val key = id.uppercase(Locale.US).replace(Regex("[^A-Z0-9]"), "") Regex("""^(?:MSVC|VCREDIST|VC)(\d{4})""").find(key)?.let { m -> return listOfNotNull(VC_YEAR[m.groupValues[1]]) } @@ -67,40 +39,30 @@ object WinCompSources { } } - /** Unreal's prerequisite setup (UE4PrereqSetup_x64.exe, UEPrereqSetup_x64.exe): VC++ 2015-2022 and DirectX June 2010. */ private val UE_PREREQ = Regex("""(?i)ue\d?prereqsetup""") - /** An Epic prerequisite ([path] the installer it runs, [name] what it is called) to its components. */ fun epic(path: String, name: String): List<String> = when { UE_PREREQ.containsMatchIn(path) || name.contains("UE4 Prerequisites", true) || name.contains("UE5 Prerequisites", true) || name.contains("Unreal Engine Prerequisites", true) -> listOf("vcredist2022", "d3dx9") else -> DependencyDetector.componentsFor(path).ifEmpty { if (path.isEmpty()) gog(name) else emptyList() } } - /** An installer a store runs after an install (Amazon's PostInstall "Command") to its components. */ fun installer(path: String): List<String> = if (UE_PREREQ.containsMatchIn(path)) listOf("vcredist2022", "d3dx9") else DependencyDetector.componentsFor(path) - /** Steamworks Shared depot ids to (component, Steam's label). */ fun steamDepots(ids: List<String>): List<Pair<String, String>> = ids.mapNotNull { SteamRedists.DEPOTS[it] }.distinctBy { it.first } - // ---- what each store left at install ---- - /** Sidecar keys the store installs fill. */ const val GOG_DEPENDENCIES = "dependencies" const val EPIC_PREREQ_PATH = "prereqPath" const val EPIC_PREREQ_NAME = "prereqName" - /** Set beside the list when it was read whole (an empty list then means the store lists none). */ const val LIST_READ = "listRead" - /** fuel.json's PostInstall commands. */ fun amazonPostInstall(folder: File): List<String> = runCatching { val arr = JSONObject(File(folder, "fuel.json").readText()).optJSONArray("PostInstall") ?: return emptyList() (0 until arr.length()).mapNotNull { arr.optJSONObject(it)?.optString("Command")?.takeIf { c -> c.isNotEmpty() } } }.getOrDefault(emptyList()) - // ---- per game ---- - /** Steam's list for [appId]: the local appmanifest's SharedDepots, else the client's app info. */ fun steamList(context: Context, gameDir: File?, appId: Int, gameName: String, auto: Boolean): List<Finding> { val local = SteamRedists.detect(gameDir, appId) val pairs = if (local.isNotEmpty()) local.map { it.componentName to it.label } @@ -110,7 +72,6 @@ object WinCompSources { } } - /** Everything known for [game], blocking (files; the client's app info; no network). */ fun forGame(context: Context, game: Library.SteamGame): List<Finding> { val folder = game.gameFiles val out = ArrayList<Finding>() @@ -141,8 +102,6 @@ object WinCompSources { } else -> {} } - // A game added in DroidDeck (Custom, or a store's) that is a Steam app: Steam's list for it, - // on by itself when its files say so, else only recommended. if (game.library == Library.ADDED && folder != null) SteamMatch.get(context, folder.path)?.let { match -> val id = match.appId ?: return@let when (match.certainty) { @@ -151,7 +110,6 @@ object WinCompSources { else -> {} } } - // The folder scan, for every game: what it bundles, as Recommended. folder?.let { DependencyDetector.detect(it) }?.forEach { rec -> out += Finding(rec.componentName, rec.reason, Origin.FOLDER, false, listOf(rec.reason, rec.kind.name)) } diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/CalibrationDistanceCheck.kt b/app/src/main/java/com/droiddeck/launcher/glasses/CalibrationDistanceCheck.kt new file mode 100644 index 0000000000..37efa034c0 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/CalibrationDistanceCheck.kt @@ -0,0 +1,24 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import com.droiddeck.launcher.R +import kotlin.math.abs + +internal data class CalibrationDistanceResult(val accepted: Boolean, val message: String) + +internal object CalibrationDistanceCheck { + fun evaluate(context: Context, expected: Float, corners: Int, points: List<SpatialVector>?): CalibrationDistanceResult { + require(expected.isFinite() && expected in 0.15f..1.5f) + if (corners != 24) return CalibrationDistanceResult(false, + context.getString(R.string.spatial_distance_corners, corners)) + if (points?.size != 24 || points.any { !it.finite() }) return CalibrationDistanceResult(false, + context.getString(R.string.spatial_distance_depth)) + val measured=(points.reduce { a,b -> a+b }*(1f/points.size)).length() + if (!measured.isFinite()) return CalibrationDistanceResult(false,context.getString(R.string.spatial_distance_invalid)) + val accepted=abs(measured-expected)<0.05f + return CalibrationDistanceResult(accepted, + context.getString(R.string.spatial_distance_result, + SpatialMeasurements.validation(measured), SpatialMeasurements.validation(expected), + context.getString(if (accepted) R.string.spatial_distance_passed else R.string.spatial_distance_retry))) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/CalibrationObservationData.kt b/app/src/main/java/com/droiddeck/launcher/glasses/CalibrationObservationData.kt new file mode 100644 index 0000000000..4df64156cd --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/CalibrationObservationData.kt @@ -0,0 +1,27 @@ +package com.droiddeck.launcher.glasses + +import org.json.JSONObject + +internal data class CalibrationObservationData( + val objects: List<DoubleArray>, val left: List<DoubleArray>, val right: List<DoubleArray>, val head: SpatialPose, +) { + companion object { + fun parse(view: JSONObject): CalibrationObservationData { + fun points(name: String, dimensions: Int): List<DoubleArray> { + val rows=view.getJSONArray(name) + require(rows.length() in 12..24) { "Invalid saved board corner count" } + return (0 until rows.length()).map { row -> + val values=rows.getJSONArray(row) + require(values.length()==dimensions) + DoubleArray(dimensions) { values.getDouble(it).also { value -> require(value.isFinite()) } } + } + } + val objects=points("objects",3); val left=points("left",2); val right=points("right",2) + require(objects.size==left.size && objects.size==right.size) + val pose=view.getJSONArray("head") + require(pose.length()==7) + val head=SpatialPose.fromSdk(FloatArray(7) { pose.getDouble(it).toFloat() }) ?: error("Invalid saved head pose") + return CalibrationObservationData(objects,left,right,head) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/Glasses.kt b/app/src/main/java/com/droiddeck/launcher/glasses/Glasses.kt new file mode 100644 index 0000000000..89d5fcbde0 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/Glasses.kt @@ -0,0 +1,1096 @@ +package com.droiddeck.launcher.glasses + +import android.annotation.SuppressLint +import android.app.PendingIntent +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.hardware.display.DisplayManager +import android.hardware.usb.UsbDevice +import android.hardware.usb.UsbManager +import android.os.Build +import android.os.Handler +import android.os.HandlerThread +import android.os.SystemClock +import android.util.Log +import android.view.Display +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import org.json.JSONArray +import org.json.JSONObject +import kotlin.math.abs +import kotlin.math.sin +import com.droiddeck.launcher.R +import java.io.File + +data class GlassesState( + val present: Boolean = false, + val model: String = "VITURE", + val controllable: Boolean = false, + val permission: Glasses.Permission = Glasses.Permission.NONE, + val connected: Boolean = false, + val displayId: Int = Display.INVALID_DISPLAY, + val width: Int = 0, + val height: Int = 0, + val hz: Float = 0f, + val sbs: Boolean = false, + val switching3d: Boolean = false, + val brightness: Int = -1, + val volume: Int = -1, + val brightnessMax: Int = 8, + val volumeMax: Int = 8, + val sunblock: Boolean = false, + val hardwareControls: Boolean = true, + val hasSunblock: Boolean = true, + val controlError: String? = null, + val tracking: Boolean = false, + val diagonalFovDeg: Float = 46f, + val noSignal: Boolean = false, + val sbsSupport: Int = SBS_UNKNOWN, + val sbs90: Boolean = false, + val experimental: Boolean = false, + val supportsScreen3dof: Boolean = false, + val supports30Hz: Boolean = false, + val supportsSpatial: Boolean = false, + val resolutions: List<GlassesResolution> = emptyList(), + val vrActive: Boolean = false, +) { + val hasDisplay: Boolean get() = displayId != Display.INVALID_DISPLAY + val usable: Boolean get() = hasDisplay && !noSignal + val canControl: Boolean get() = connected && controllable + val spatialConnected: Boolean get() = canControl && supportsSpatial + fun usesSpatialControllers(settings: GlassesSettings) = spatialConnected && settings.positionalTracking && + (settings.handControllers || settings.joyConTracking) + val can3d: Boolean get() = canControl && !noSignal && sbsSupport != SBS_FAILS + val verticalFovDeg: Float get() { + val half = Math.toRadians(diagonalFovDeg / 2.0) + val aspect = if (width > 0 && height > 0) + width.toDouble() / (if (sbs) 2 else 1) / height else 16.0 / 9.0 + val v = kotlin.math.atan(kotlin.math.tan(half) / kotlin.math.sqrt(1 + aspect * aspect)) + return Math.toDegrees(2 * v).toFloat() + } + + companion object { + const val SBS_UNKNOWN = 0 + const val SBS_WORKS = 1 + const val SBS_FAILS = -1 + } +} + +data class GlassesSettings( + val refreshHz: Int = 120, + val sbsHz: Int = 60, + val resolution2d: String = "", + val resolution3d: String = "", + val resolutionVr: String = "", + val sunblock: Boolean? = null, + val gameOnGlasses: Boolean = true, + val headTracking: Boolean = true, + val auto3d: Boolean = false, + val picture3d: Int = PICTURE_AUTO, + val screenWidthDm: Int = 20, + val screenDistanceDm: Int = 30, + val vrFovDeg: Int = VR_FOV_DEFAULT, + val positionalTracking: Boolean = false, + val handControllers: Boolean = false, + val joyConTracking: Boolean = false, + val steadyHandAim: Boolean = false, + val eyeHeightCm: Int = 160, +) { + val screen3dof: Boolean get() = picture3d == PICTURE_SCREEN && headTracking + + companion object { + const val VR_FOV_MIN = 24 + const val VR_FOV_MAX = 90 + const val VR_FOV_DEFAULT = 90 + const val PICTURE_AUTO = 0 + const val PICTURE_SCREEN = 1 + const val PICTURE_SBS = 2 + } +} + +@SuppressLint("StaticFieldLeak") +object Glasses { + enum class Permission { NONE, ASKING, DENIED, GRANTED } + + fun interface PoseSink { + fun onPose(x: Float, y: Float, z: Float, w: Float, timeNs: Long) + } + + private const val TAG = "Glasses" + private const val ACTION_PERMISSION = "com.droiddeck.launcher.glasses.USB_PERMISSION" + private const val PREFS = "glasses" + private const val KEY_SBS_FAILED = "sbsFailed" + private const val SBS_CONFIRM_MS = 20_000L + + private val _state = MutableStateFlow(GlassesState()) + val state: StateFlow<GlassesState> = _state.asStateFlow() + private val _settings = MutableStateFlow(GlassesSettings()) + val settings: StateFlow<GlassesSettings> = _settings.asStateFlow() + private val _calibration = MutableStateFlow(GlassesCalibrationState()) + val calibration: StateFlow<GlassesCalibrationState> = _calibration.asStateFlow() + private lateinit var calibrationStore: RayNeoCalibrationStore + private var calibrationKey: String? = null + private var calibrationRevision = 0L + + private lateinit var app: Context + private lateinit var handler: Handler + private lateinit var usb: UsbManager + private lateinit var displays: DisplayManager + @Volatile private var link: GlassesLink? = null + @Volatile private var linkGeneration = 0L + private var linkDevice: UsbDevice? = null + private var model: GlassesModel? = null + private var asked = false + private var lastModeSentAt = 0L + private val modeState = GlassesModeState(SBS_CONFIRM_MS) + private val confirmMode = Runnable { refresh() } + private val steamVrSpatialGate = SteamVrSpatialGate() + private val resumeSteamVrSpatial = Runnable { updateSpatialMode() } + private var glassesMode = 0 + private var autoModeSent = false + + @Volatile private var sink: PoseSink? = null + private val poseObservers = java.util.concurrent.CopyOnWriteArraySet<PoseSink>() + @Volatile private var probe: ((ByteArray?, FloatArray?) -> Unit)? = null + @Volatile private var latest: FloatArray? = null + @Volatile private var imuPackets = 0L + private val simulating = java.util.concurrent.atomic.AtomicReference<Thread?>(null) + private val frames = ArrayDeque<String>() + + fun init(context: Context) { + if (::handler.isInitialized) return + app = context.applicationContext + SpatialTracking.initialize(app) + usb = app.getSystemService(Context.USB_SERVICE) as UsbManager + displays = app.getSystemService(Context.DISPLAY_SERVICE) as DisplayManager + _settings.value = load() + calibrationStore = RayNeoCalibrationStore(app.getSharedPreferences(PREFS, Context.MODE_PRIVATE)) + handler = Handler(HandlerThread("droiddeck-glasses").apply { start() }.looper) + handler.post { + val filter = IntentFilter(ACTION_PERMISSION).apply { + addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED) + addAction(UsbManager.ACTION_USB_DEVICE_DETACHED) + } + if (Build.VERSION.SDK_INT >= 33) app.registerReceiver(receiver, filter, null, handler, Context.RECEIVER_NOT_EXPORTED) + else app.registerReceiver(receiver, filter, null, handler) + displays.registerDisplayListener(displayListener, handler) + refresh() + } + } + + fun rescan() = post { refresh() } + + fun startCalibration() = post { + val l = link as? RayNeoLink ?: return@post + if (!l.ready || _calibration.value.running || simulating.get() != null) return@post + _calibration.value = _calibration.value.copy(phase = CalibrationPhase.SETTLING, progress = 0) + l.startCalibration(++calibrationRevision) + updateImu() + } + + fun cancelCalibration() = post { + (link as? RayNeoLink)?.cancelCalibration(++calibrationRevision, calibrationKey?.let(calibrationStore::load)) + _calibration.value = _calibration.value.copy(phase = CalibrationPhase.IDLE, progress = 0) + updateImu() + } + + fun resetCalibration() = post { + (link as? RayNeoLink)?.resetCalibration(++calibrationRevision) + calibrationKey?.let { calibrationStore.save(it, null) } + _calibration.value = _calibration.value.copy(saved = false, phase = CalibrationPhase.IDLE, progress = 0) + updateImu() + } + + fun query() = post { + val l = link ?: return@post + listOf(VitureProtocol.MSG_GET_DISPLAY, VitureProtocol.MSG_GET_BRIGHTNESS, VitureProtocol.MSG_GET_VOLUME, VitureProtocol.MSG_GET_IMU).forEachIndexed { i, msg -> + handler.postDelayed({ if (link === l) l.send(msg) }, VitureLink.COMMAND_GAP_MS * i) + } + } + + fun sendMode(mode: Int) = post { + if (!_state.value.canControl) return@post + if (link?.send(VitureProtocol.MSG_DISPLAY, byteArrayOf(mode.toByte())) == true) lastModeSentAt = SystemClock.uptimeMillis() + } + + fun requestControl() = post { + asked = false + refresh(ask = true) + } + + fun setRefreshHz(hz: Int) = post { + if (hz == 30 && (_state.value.sbs || !GlassesRendering.native30HzAvailable(_settings.value, _state.value))) return@post + update { it.copy(refreshHz = if (hz == 30) 30 else hz.coerceIn(60, 120)) } + if (!_state.value.sbs) applyMode(force = true) + } + + fun setSbsHz(hz: Int) = post { + if (hz == 30 && (!_state.value.sbs || !GlassesRendering.native30HzAvailable(_settings.value, _state.value))) return@post + update { it.copy(sbsHz = when { hz == 30 -> 30; hz >= 90 -> 90; else -> 60 }) } + if (hz != 30 && _state.value.sbs && _state.value.can3d) sendMode(true) + } + + fun setResolution(profile: GlassesDisplayProfile, value: String) = post { + val s = _state.value + val choice = if (value == "auto") "" else value + if (choice.isNotEmpty() && s.resolutions.none { it.key == choice }) return@post + if (GlassesDisplayModes.choice(_settings.value, profile) == choice) return@post + update { when (profile) { + GlassesDisplayProfile.TWO_D -> it.copy(resolution2d = choice) + GlassesDisplayProfile.THREE_D -> it.copy(resolution3d = choice) + GlassesDisplayProfile.VR -> it.copy(resolutionVr = choice) + } } + val active = GlassesDisplayModes.profile(s.sbs, s.vrActive) + val inheritedByVr = s.vrActive && _settings.value.resolutionVr.isEmpty() && + profile == GlassesDisplayModes.profile(s.sbs, false) + if ((profile == active || inheritedByVr) && s.canControl && !s.switching3d && + model?.resolutions?.isNotEmpty() == true) sendMode(s.sbs) + } + + fun prepareSteamVrStart(onPrepared: () -> Unit = {}) { + if (!::handler.isInitialized) { + steamVrSpatialGate.prepare() + onPrepared() + return + } + post { + if (steamVrSpatialGate.prepare()) { + handler.removeCallbacks(resumeSteamVrSpatial) + updateSpatialMode() + } + onPrepared() + } + } + + fun cancelSteamVrStart() { + if (!::handler.isInitialized) { + steamVrSpatialGate.cancel() + return + } + post { + steamVrSpatialGate.cancel() + handler.removeCallbacks(resumeSteamVrSpatial) + updateSpatialMode() + } + } + + fun setVrActive(on: Boolean) = post { + val s = _state.value + val trackingChanged = steamVrSpatialGate.setRunning(on, SystemClock.uptimeMillis()) + if (trackingChanged) { + handler.removeCallbacks(resumeSteamVrSpatial) + steamVrSpatialGate.deadline?.let { + Log.i(TAG, "SteamVR RUNNING; spatial resume scheduled at uptime ${it}ms") + handler.postAtTime(resumeSteamVrSpatial, it) + } + } + if (s.vrActive == on) { + if (trackingChanged) updateSpatialMode() + return@post + } + val previous = GlassesDisplayModes.selected(_settings.value, s) + publish { it.copy(vrActive = on) } + val restore2d = !on && modeState.stopVr() + val stereo = (s.sbs || modeState.pendingStereo) && !restore2d + val selected = GlassesDisplayModes.selected(_settings.value, _state.value, stereo) + if (s.canControl && s.usable && (restore2d || + (previous != selected && model?.resolutions?.isNotEmpty() == true)) && + !(on && _settings.value.auto3d && !s.sbs)) sendMode(stereo) + updateSpatialMode() + } + + fun set3d(on: Boolean) = post { + val s = _state.value + if (!s.canControl || (on && s.noSignal)) return@post + modeState.manual() + if (on) { + markSbsFailed(linkDevice?.productId, false) + rememberSbs(GlassesState.SBS_UNKNOWN) + } + sendMode(on) + } + + fun set3dForVr(on: Boolean) = post { + val s = _state.value + if (on) { + if (!s.can3d || s.sbs || modeState.pendingStereo) return@post + if (sendMode(true)) modeState.startVr() + } else if (modeState.stopVr() && s.canControl) { + sendMode(false) + } + } + + fun setBrightness(level: Int) = post { + val s = _state.value + if (!s.canControl || s.brightnessMax == 0) return@post + val v = level.coerceIn(0, s.brightnessMax) + if (link?.send(VitureProtocol.MSG_BRIGHTNESS, byteArrayOf(v.toByte(), 0)) == true && link !is XrealLink) + publish { it.copy(brightness = v) } + } + + fun setVolume(level: Int) = post { + val s = _state.value + if (!s.canControl || s.volumeMax == 0) return@post + val v = level.coerceIn(0, s.volumeMax) + if (link?.send(VitureProtocol.MSG_VOLUME, byteArrayOf(v.toByte(), 0)) == true) publish { it.copy(volume = v) } + } + + fun setSunblock(on: Boolean) = post { + update { it.copy(sunblock = on) } + sendFilm(on) + } + + fun setSbsSupport(support: Int) = post { + val s = support.coerceIn(GlassesState.SBS_FAILS, GlassesState.SBS_WORKS) + markSbsFailed(linkDevice?.productId, s == GlassesState.SBS_FAILS) + rememberSbs(s) + } + fun setGameOnGlasses(on: Boolean) = post { + val s = _state.value + if (!on && s.canControl && (s.sbs || modeState.pendingStereo)) { + modeState.manual() + sendMode(false) + } + update { + it.copy( + gameOnGlasses = on, + picture3d = if (!on && it.picture3d == GlassesSettings.PICTURE_SCREEN) + GlassesSettings.PICTURE_AUTO else it.picture3d, + ) + } + } + fun set3dof(on: Boolean) = post { + if (!_state.value.supportsScreen3dof) return@post + update { + it.copy( + gameOnGlasses = on || it.gameOnGlasses, + headTracking = on || it.headTracking, + picture3d = if (on) GlassesSettings.PICTURE_SCREEN + else if (it.picture3d == GlassesSettings.PICTURE_SCREEN) GlassesSettings.PICTURE_AUTO else it.picture3d, + ) + } + } + fun setPositionalTracking(on: Boolean) = post { + if (!_state.value.spatialConnected || _settings.value.positionalTracking == on) return@post + update { it.copy(positionalTracking = on, handControllers = it.handControllers && on, + joyConTracking = it.joyConTracking && on) } + if (!on) SpatialTracking.setControllers(false, false) + closeLink() + refresh() + } + fun setHandControllers(on: Boolean) = post { + val wanted = on && _settings.value.positionalTracking && _state.value.spatialConnected + update { it.copy(handControllers = wanted, joyConTracking = it.joyConTracking && !wanted) } + SpatialTracking.setControllers(wanted, _settings.value.joyConTracking) + } + fun setSteadyHandAim(on: Boolean) = post { + update { it.copy(steadyHandAim = on) } + SpatialTracking.setSteadyHandAim(on) + } + fun setJoyConTracking(on: Boolean) = post { + val wanted = on && _settings.value.positionalTracking && _state.value.spatialConnected + update { it.copy(joyConTracking = wanted, handControllers = it.handControllers && !wanted) } + SpatialTracking.setControllers(_settings.value.handControllers, wanted) + } + fun setEyeHeight(cm: Int) = post { update { it.copy(eyeHeightCm = cm.coerceIn(50, 250)) } } + fun setSpatialFloor() = SpatialTracking.setFloor(_settings.value.eyeHeightCm / 100f) + fun restartSpatialTracking() = post { + if (_state.value.spatialConnected && _settings.value.positionalTracking) { closeLink(); refresh() } + } + + fun setHeadTracking(on: Boolean) = post { update { it.copy(headTracking = on) } } + fun setAuto3d(on: Boolean) = post { update { it.copy(auto3d = on) } } + fun setPicture3d(picture: Int) = post { update { it.copy(picture3d = picture.coerceIn(0, 2)) } } + fun setScreenWidthDm(dm: Int) = post { update { it.copy(screenWidthDm = dm.coerceIn(5, 200)) } } + fun setScreenDistanceDm(dm: Int) = post { update { it.copy(screenDistanceDm = dm.coerceIn(5, 200)) } } + fun setVrFovDeg(deg: Int) = post { update { it.copy(vrFovDeg = deg.coerceIn(GlassesSettings.VR_FOV_MIN, GlassesSettings.VR_FOV_MAX)) } } + + fun outputHz(): Int = GlassesRendering.outputHz(_settings.value, _state.value) + fun outputResolution(): GlassesResolution? = GlassesDisplayModes.selected(_settings.value, _state.value) + + fun glassesDisplay(): Display? = _state.value.displayId.takeIf { it != Display.INVALID_DISPLAY }?.let { displays.getDisplay(it) } + + fun setPoseSink(s: PoseSink) { + synchronized(this) { sink = s } + post { updateImu() } + } + + fun clearPoseSink(s: PoseSink) { + synchronized(this) { if (sink === s) sink = null } + post { updateImu() } + } + + internal fun addPoseObserver(observer: PoseSink) { + poseObservers.add(observer) + post { updateImu() } + } + + internal fun removePoseObserver(observer: PoseSink) { + poseObservers.remove(observer) + post { updateImu() } + } + + fun simulate(seconds: Int, holdYaw: Double? = null, holdPitch: Double? = null): Boolean { + val hold = holdYaw != null || holdPitch != null + val t = Thread({ + val start = SystemClock.elapsedRealtimeNanos() + val end = start + seconds * 1_000_000_000L + while (SystemClock.elapsedRealtimeNanos() < end && simulating.get() === Thread.currentThread()) { + val now = SystemClock.elapsedRealtimeNanos() + val t = (now - start) / 1e9 + val yaw = if (hold) holdYaw ?: 0.0 else 40.0 * sin(t * 2 * Math.PI / 6.0) + val pitch = if (hold) holdPitch ?: 0.0 else 15.0 * sin(t * 2 * Math.PI / 4.0) + val roll = if (hold) 0.0 else 5.0 * sin(t * 2 * Math.PI / 5.0) + val q = VitureProtocol.eulerZxy(roll.toFloat(), pitch.toFloat(), yaw.toFloat()) + deliver(q, now) + SystemClock.sleep(4) + } + simulating.compareAndSet(Thread.currentThread(), null) + }, "glasses-simulate") + if (!simulating.compareAndSet(null, t)) return false + t.start() + return true + } + + fun stopSimulation() { + simulating.set(null) + } + + fun status(): JSONObject { + val s = _state.value + val g = _settings.value + val q = latest + return JSONObject() + .put("present", s.present).put("model", s.model).put("controllable", s.controllable) + .put("permission", s.permission.name).put("connected", s.connected) + .put("controlError", s.controlError ?: JSONObject.NULL) + .put("experimental", s.experimental) + .put("supportsScreen3dof", s.supportsScreen3dof) + .put("supportsSpatial", s.supportsSpatial) + .put("firmware", (link as? VitureSdkLink)?.firmware ?: JSONObject.NULL) + .put("spatialSdk", (link as? VitureSdkLink)?.spatialDiagnostics()?.let { + JSONObject().put("status",it[0]).put("callbackAgeMs",it[1]).put("cameraPoseDeltaMs",it[2]) + } ?: JSONObject.NULL) + .put("spatial", SpatialTracking.diagnosticStatus()) + .put("supports30Hz", s.supports30Hz).put("vrActive", s.vrActive) + .put("resolutions", JSONArray(s.resolutions.map { it.key })) + .put("display", if (s.hasDisplay) JSONObject().put("id", s.displayId).put("width", s.width).put("height", s.height).put("hz", s.hz.toDouble()) else JSONObject.NULL) + .put("sbs", s.sbs).put("deviceMode", glassesMode).put("switching3d", s.switching3d) + .put("brightness", s.brightness).put("volume", s.volume) + .put("brightnessMax", s.brightnessMax).put("volumeMax", s.volumeMax).put("sunblock", s.sunblock) + .put("tracking", s.tracking).put("simulating", simulating.get() != null).put("imuPackets", imuPackets) + .put("calibration", JSONObject().put("supported", _calibration.value.supported) + .put("saved", _calibration.value.saved).put("phase", _calibration.value.phase.name) + .put("progress", _calibration.value.progress)) + .put("badFrames", link?.badFrames ?: 0L) + .put("pose", q?.let { JSONArray().put(it[0].toDouble()).put(it[1].toDouble()).put(it[2].toDouble()).put(it[3].toDouble()) } ?: JSONObject.NULL) + .put("fovDeg", s.diagonalFovDeg.toDouble()).put("noSignal", s.noSignal).put("sbsSupport", s.sbsSupport) + .put("settings", JSONObject().put("refreshHz", g.refreshHz).put("sbsHz", g.sbsHz).put("sunblock", g.sunblock ?: JSONObject.NULL) + .put("gameOnGlasses", g.gameOnGlasses).put("headTracking", g.headTracking).put("auto3d", g.auto3d) + .put("screen3dof", g.screen3dof) + .put("resolution2d", g.resolution2d).put("resolution3d", g.resolution3d).put("resolutionVr", g.resolutionVr) + .put("positionalTracking", g.positionalTracking).put("handControllers", g.handControllers) + .put("joyConTracking", g.joyConTracking).put("eyeHeightCm", g.eyeHeightCm) + .put("steadyHandAim", g.steadyHandAim) + .put("picture3d", g.picture3d).put("screenWidthDm", g.screenWidthDm).put("screenDistanceDm", g.screenDistanceDm) + .put("vrFovDeg", g.vrFovDeg)) + } + + fun recentFrames(): JSONArray = synchronized(frames) { JSONArray(frames.toList()) } + + fun sendRaw(msgId: Int, payload: ByteArray): Boolean { + val l = link ?: return false + return l.send(msgId, payload) + } + + private fun post(block: () -> Unit) { + if (!::handler.isInitialized) return + handler.post(block) + } + + private fun publish(transform: (GlassesState) -> GlassesState) { + _state.value = transform(_state.value) + } + + private fun update(transform: (GlassesSettings) -> GlassesSettings) { + val next = transform(_settings.value) + _settings.value = next + save(next) + } + + private val receiver = object : BroadcastReceiver() { + override fun onReceive(context: Context, intent: Intent) { + when (intent.action) { + ACTION_PERMISSION -> { + val granted = intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false) + Log.i(TAG, "USB permission ${if (granted) "granted" else "denied"}") + if (!granted) publish { it.copy(permission = Permission.DENIED) } + refresh() + } + UsbManager.ACTION_USB_DEVICE_ATTACHED -> { + if (intent.device()?.let { isGlassesVendor(it.vendorId) } == true) asked = false + refresh(ask = true) + } + UsbManager.ACTION_USB_DEVICE_DETACHED -> if (intent.device()?.let { isGlassesVendor(it.vendorId) } == true) { + refresh() + } + } + } + } + + private val displayListener = object : DisplayManager.DisplayListener { + override fun onDisplayAdded(displayId: Int) = refresh() + override fun onDisplayRemoved(displayId: Int) = refresh() + override fun onDisplayChanged(displayId: Int) { + if (displayId == _state.value.displayId || displayId != Display.DEFAULT_DISPLAY) refresh() + } + } + + private fun refresh(ask: Boolean = false) { + val devices = usb.deviceList.values.filter { + it.vendorId == VitureProtocol.VENDOR_ID || deviceModel(it) != null + } + val known = devices.mapNotNull { device -> + deviceModel(device)?.let { device to it } + } + val selected = known.firstOrNull { canOpenModel(it.second) } ?: known.firstOrNull() + val device = selected?.first + val m = selected?.second + val controllable = m?.let(::canOpenModel) == true + // XREAL uses Android's Ethernet sockets, without opening or claiming USB interfaces. + val permitted = controllable && device != null && (m === XrealModel || usb.hasPermission(device)) + val identity = device?.let { + GlassesModeState.Device(it.productId, if (permitted) runCatching { it.serialNumber }.getOrNull() else null) + } + if (modeState.updateDevice(identity, SystemClock.uptimeMillis())) { + rememberSbs(if (identity != null && sbsFailed(identity.productId)) GlassesState.SBS_FAILS else GlassesState.SBS_UNKNOWN) + } + if (device == null || (linkDevice != null && linkDevice?.deviceName != device.deviceName)) closeLink() + model = m + val display = findDisplay(devices.isNotEmpty()) + val mode = display?.mode + val width = mode?.physicalWidth ?: 0 + val height = mode?.physicalHeight ?: 0 + val sbsByDisplay = width >= 3000 + val noSignal = display != null && width in 1 until 1280 + when (modeState.observe(sbsByDisplay, SystemClock.uptimeMillis())) { + GlassesModeState.Confirmation.FAILED -> { + Log.w(TAG, "3D signal was not confirmed at ${width}x$height; restoring 2D") + if (noSignal) markSbsFailed(device?.productId, true) + rememberSbs(GlassesState.SBS_FAILS) + } + else -> Unit + } + if (sbsByDisplay) { + markSbsFailed(device?.productId, false) + rememberSbs(GlassesState.SBS_WORKS) + } + if (controllable && device != null && !permitted && (ask || !asked) && _state.value.permission != Permission.ASKING) askPermission(device) + if (device != null && permitted && link == null) openLink(device) + publish { + it.copy( + present = device != null || display != null, + model = m?.name ?: display?.let(::displayName) ?: "VITURE", + controllable = controllable, + permission = when { + !controllable -> Permission.NONE + permitted -> Permission.GRANTED + it.permission == Permission.ASKING || it.permission == Permission.DENIED -> it.permission + else -> Permission.NONE + }, + connected = link?.ready == true, + controlError = when { + m is VitureProtocol.Model && m.needsSdk && !VitureSdk.available -> app.getString(R.string.glasses_driver_missing) + device == null || link?.ready == true -> null + else -> it.controlError + }, + displayId = display?.displayId ?: Display.INVALID_DISPLAY, + width = width, height = height, hz = mode?.refreshRate ?: 0f, + sbs = sbsByDisplay, + switching3d = modeState.pendingStereo, + brightnessMax = m?.brightnessMax ?: 8, volumeMax = m?.volumeMax ?: 8, + sunblock = if (m === XrealModel) it.sunblock else _settings.value.sunblock ?: it.sunblock, + hardwareControls = device?.vendorId == VitureProtocol.VENDOR_ID || m === XrealModel, + hasSunblock = m?.hasSunblock == true, + diagonalFovDeg = m?.diagonalFovDeg ?: 46f, + tracking = it.tracking && link != null, + noSignal = noSignal, + sbs90 = m?.sbs90 == true, + experimental = m === XrealModel, + supportsScreen3dof = link?.hasImu == true, + supports30Hz = display?.let(::supports30Hz) == true, + supportsSpatial = (link as? VitureSdkLink)?.isCarina == true, + resolutions = m?.resolutions?.takeIf { modes -> modes.isNotEmpty() } + ?: display?.supportedModes.orEmpty().filter { mode -> + mode.physicalWidth >= 1280 && (mode.physicalWidth >= 3000) == sbsByDisplay + }.map { mode -> GlassesResolution(mode.physicalWidth / (if (sbsByDisplay) 2 else 1), mode.physicalHeight) } + .distinct().sortedWith(compareBy({ size -> size.height }, { size -> size.width })), + ) + } + if (link != null) applyMode(force = false) + scheduleModeCheck() + } + + internal fun isGlassesVendor(vid: Int) = vid == VitureProtocol.VENDOR_ID || RayNeoModel.isVendor(vid) || vid == XrealModel.VENDOR_ID + + internal fun supports30Hz(display: Display): Boolean { + val current = display.mode + return display.supportedModes.any { + it.physicalWidth == current.physicalWidth && it.physicalHeight == current.physicalHeight && + abs(it.refreshRate - 30f) < 0.5f + } + } + + private fun canOpenModel(m: GlassesModel): Boolean = m.controllable && + (m !is VitureProtocol.Model || !m.needsSdk || VitureSdk.available) + + internal fun deviceModel(device: UsbDevice): GlassesModel? { + val name = runCatching { device.productName }.getOrNull() + return if (device.vendorId == VitureProtocol.VENDOR_ID) { + VitureSdk.marketName(device.productId)?.let(VitureProtocol::sdkModel) + ?: VitureProtocol.model(device.productId, name) + } + else if (XrealModel.matches(device.vendorId, device.productId)) XrealModel + else RayNeoModel.model(device.vendorId, device.productId, name) + } + + internal fun isGlassesDisplayName(name: String) = + name.contains("VITURE", ignoreCase = true) || RayNeoModel.isDisplay(name) || XrealModel.isDisplay(name) + + private fun findDisplay(usbPresent: Boolean): Display? { + return selectGlassesDisplay(displays.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION).toList(), usbPresent) + } + + internal fun selectGlassesDisplay(displays: List<Display>, usbPresent: Boolean): Display? { + val candidates = displays + .filter { it.displayId != Display.DEFAULT_DISPLAY && it.flags and Display.FLAG_PRESENTATION != 0 } + // Android can expose the glasses name on either the logical display or + // its product metadata. A generic label on one must not hide the other. + return candidates.firstOrNull { display -> + isGlassesDisplayName(display.name) || + (Build.VERSION.SDK_INT >= 31 && display.deviceProductInfo?.let { product -> + product.name?.let(::isGlassesDisplayName) == true || + RayNeoModel.isDisplayProduct(product.name, product.manufacturerPnpId, product.productId) + } == true) + } + ?: candidates.singleOrNull()?.takeIf { usbPresent && unnamedPanel(it) } + } + + private fun unnamedPanel(d: Display): Boolean { + if (Build.VERSION.SDK_INT < 31) return true + return d.deviceProductInfo?.name.isNullOrBlank() + } + + private fun displayName(d: Display): String? { + if (Build.VERSION.SDK_INT >= 31) d.deviceProductInfo?.name?.takeIf { it.isNotBlank() }?.let { return it } + return d.name + } + + private fun askPermission(device: UsbDevice) { + asked = true + publish { it.copy(permission = Permission.ASKING) } + val flags = if (Build.VERSION.SDK_INT >= 31) PendingIntent.FLAG_MUTABLE else 0 + val pi = PendingIntent.getBroadcast(app, 0, Intent(ACTION_PERMISSION).setPackage(app.packageName), flags) + runCatching { usb.requestPermission(device, pi) }.onFailure { Log.w(TAG, "requestPermission", it) } + } + + private fun updateSpatialMode() { + val current = link as? VitureSdkLink ?: return + if (!current.ready || !current.isCarina || current.spatialEnabled == + steamVrSpatialGate.spatialEnabled(_settings.value.positionalTracking, SystemClock.uptimeMillis())) return + val device = linkDevice + closeLink() + refresh() + val resumed = link as? VitureSdkLink + if (!current.spatialEnabled && resumed?.isCarina == true && resumed.spatialEnabled && + device != null && linkDevice?.deviceName == device.deviceName) SpatialTracking.recenter(false) + } + + private fun openLink(device: UsbDevice) { + val generation = ++linkGeneration + val spatial = steamVrSpatialGate.spatialEnabled(_settings.value.positionalTracking, SystemClock.uptimeMillis()) + calibrationKey = calibrationStore.key(device.vendorId, device.productId, + runCatching { device.serialNumber }.getOrNull(), model?.name.orEmpty()) + val l = if (device.vendorId == VitureProtocol.VENDOR_ID) { + if ((model as? VitureProtocol.Model)?.needsSdk == true) { + // Android can evict cacheDir while the SDK is running. + Log.i(TAG, "opening VITURE SDK pid=0x%04X spatial=%s".format(device.productId, spatial)) + VitureSdkLink.open(usb, device, File(app.noBackupFilesDir, "viture"), sdkListener(generation), + (model as? VitureProtocol.Model)?.family, spatial) + } else VitureLink.open(usb, device, linkListener(generation)) + } else if (model === XrealModel) { + XrealLink.open(app, xrealListener(generation)) + } else { + val baseKey = calibrationKey!! + val gtUsb = RayNeoProtocol.isGt(device.vendorId, device.productId) + RayNeoLink.open(usb, device, rayNeoListener(generation)) { board -> + calibrationStore.load(RayNeoCalibrationStore.profileKey(baseKey, gtUsb, board)) + } + } + val opened = l ?: run { + linkGeneration++ + Log.w(TAG, "could not open ${device.deviceName}") + publish { it.copy(controlError = app.getString(R.string.glasses_connection_failed)) } + return + } + link = opened + if (opened is VitureSdkLink && opened.isCarina) SpatialTracking.connect(opened.sdkToken, generation, + opened.spatialIdentity ?: runCatching { device.serialNumber }.getOrNull()?.takeIf { it.isNotBlank() } + ?.let { "${device.vendorId}:${device.productId}:$it" }, + spatial, _settings.value.eyeHeightCm / 100f, _settings.value.handControllers, + _settings.value.joyConTracking, _settings.value.steadyHandAim) + else SpatialTracking.useLegacyTracking() + _calibration.value = GlassesCalibrationState(supported = opened is RayNeoLink, + saved = opened is RayNeoLink && calibrationKey?.let(calibrationStore::load) != null) + linkDevice = device + glassesMode = 0 + autoModeSent = false + Log.i(TAG, "opened ${model?.name} pid=0x%04X imu=%s".format(device.productId, opened.hasImu)) + publish { it.copy(connected = opened.ready, controlError = null) } + listOf(VitureProtocol.MSG_GET_BRIGHTNESS, VitureProtocol.MSG_GET_VOLUME, VitureProtocol.MSG_GET_DISPLAY).forEachIndexed { i, msg -> + handler.postDelayed({ if (link === opened) opened.send(msg) }, VitureLink.COMMAND_GAP_MS * (i + 1)) + } + handler.postDelayed({ + if (link !== opened) return@postDelayed + _settings.value.sunblock?.let { sendFilm(it) } + updateImu() + applyMode(force = false) + }, 300) + } + + private fun xrealListener(generation: Long) = object : XrealLink.Listener { + override fun onReady() = post { + if (generation != linkGeneration) return@post + publish { it.copy(connected = true, controlError = null) } + autoModeSent = false + updateImu() + applyMode(force = false) + } + override fun onValue(message: Int, value: Int) = post { + if (generation != linkGeneration) return@post + when (message) { + VitureProtocol.MSG_GET_DISPLAY -> glassesMode = value + VitureProtocol.MSG_BRIGHTNESS -> publish { it.copy(brightness = value) } + VitureProtocol.MSG_FILM -> publish { it.copy(sunblock = value != 0) } + } + } + override fun onPose(raw: ByteArray, pose: FloatArray, timeNs: Long) { + if (generation != linkGeneration) return + imuPackets++ + probe?.invoke(raw, pose) + if (simulating.get() == null) deliver(pose, timeNs) + } + override fun onUnavailable(networkMissing: Boolean) = post { + if (generation != linkGeneration) return@post + publish { it.copy(connected = false, tracking = false, + controlError = app.getString(if (networkMissing) R.string.glasses_xreal_network_missing else R.string.glasses_xreal_connection_failed)) } + } + } + + private fun sdkListener(generation: Long) = object : VitureSdkLink.Listener { + override fun onSpatial(pose: FloatArray, timeNs: Long, valid: Boolean) { + if (generation == linkGeneration) SpatialTracking.accept(pose, timeNs, generation, valid) + } + override fun onValue(msgId: Int, value: Int) = post { + if (generation != linkGeneration) return@post + when (msgId) { + VitureProtocol.MSG_GET_DISPLAY -> glassesMode = value + VitureProtocol.MSG_GET_BRIGHTNESS -> publish { it.copy(brightness = value) } + VitureProtocol.MSG_GET_VOLUME -> publish { it.copy(volume = value) } + VitureProtocol.MSG_FILM -> publish { it.copy(sunblock = value != 0) } + } + } + override fun onPose(q: FloatArray, timeNs: Long) { + if (generation != linkGeneration) return + imuPackets++ + probe?.invoke(null, q) + if (simulating.get() == null) deliver(q, timeNs) + } + override fun onLost() = post { + if (generation != linkGeneration) return@post + closeLink() + publish { it.copy(controlError = app.getString(R.string.glasses_connection_failed)) } + // Let a reconnect or explicit Allow retry restart the SDK, not an endless failure loop. + } + } + + private fun rayNeoListener(generation: Long) = object : RayNeoLink.Listener { + override fun onDeviceInfo(boardId: Int, calibrationSaved: Boolean) = post { + if (generation != linkGeneration) return@post + val device = linkDevice ?: return@post + val base = calibrationStore.key(device.vendorId, device.productId, + runCatching { device.serialNumber }.getOrNull(), model?.name.orEmpty()) + calibrationKey = RayNeoCalibrationStore.profileKey(base, + RayNeoProtocol.isGt(device.vendorId, device.productId), boardId) + _calibration.value = _calibration.value.copy(saved = calibrationSaved) + } + override fun onCalibration(revision: Long, phase: CalibrationPhase, progress: Int) = post { + if (generation != linkGeneration || revision != calibrationRevision) return@post + if (phase != CalibrationPhase.IDLE && !_calibration.value.running) return@post + _calibration.value = _calibration.value.copy(phase = phase, progress = progress) + if (!_calibration.value.running) updateImu() + } + override fun onCalibrationSaved(revision: Long, value: RayNeoCalibration?) = post { + if (generation != linkGeneration || revision != calibrationRevision) return@post + if (value != null && !_calibration.value.running) return@post + calibrationKey?.let { calibrationStore.save(it, value) } + _calibration.value = _calibration.value.copy(saved = value != null) + } + override fun onReady() = post { + if (generation == linkGeneration) { + publish { it.copy(connected = true) } + updateImu() + applyMode(force = false) + } + } + override fun onPose(raw: ByteArray, xyzw: FloatArray, timeNs: Long) { + if (generation != linkGeneration) return + imuPackets++ + probe?.invoke(raw, xyzw) + if (simulating.get() == null) deliver(xyzw, timeNs) + } + override fun onLost() = post { + if (generation != linkGeneration) return@post + closeLink() + refresh() + } + } + + private fun closeLink() { + val l = link ?: return + linkGeneration++ + SpatialTracking.disconnect() + link = null + linkDevice = null + calibrationKey = null + _calibration.value = GlassesCalibrationState(phase = if (_calibration.value.running) CalibrationPhase.FAILED else CalibrationPhase.IDLE) + glassesMode = 0 + l.close() + publish { it.copy(connected = false, tracking = false, supportsScreen3dof = false, supportsSpatial = false) } + Log.i(TAG, "link closed") + } + + private fun rememberSbs(support: Int) { + if (_state.value.sbsSupport == support) return + publish { it.copy(sbsSupport = support) } + } + + private fun sbsFailed(productId: Int): Boolean = + app.getSharedPreferences(PREFS, Context.MODE_PRIVATE).getStringSet(KEY_SBS_FAILED, null)?.contains(productId.toString(16)) == true + + private fun markSbsFailed(productId: Int?, failed: Boolean) { + if (productId == null || sbsFailed(productId) == failed) return + val prefs = app.getSharedPreferences(PREFS, Context.MODE_PRIVATE) + val ids = prefs.getStringSet(KEY_SBS_FAILED, null).orEmpty() + val id = productId.toString(16) + prefs.edit().putStringSet(KEY_SBS_FAILED, if (failed) ids + id else ids - id).apply() + } + + private fun applyMode(force: Boolean) { + val s = _state.value + val m = model ?: return + if (!s.canControl) return + if (modeState.restorePending) { + sendMode(false) + return + } + if (!s.usable || s.sbs || modeState.pendingStereo) return + val hz = _settings.value.refreshHz + // Native 30 Hz is selected by the Android presentation, without a vendor mode command. + if (hz == 30 && GlassesRendering.native30HzAvailable(_settings.value, s)) return + if (glassesMode == m.mode(hz, false, outputResolution())) return + if (!force) { + if (autoModeSent || SystemClock.uptimeMillis() - lastModeSentAt < 8_000) return + val resolution = outputResolution() + if (glassesMode == 0 && abs(s.hz - hz) < 1.5f && + (resolution == null || (s.width == resolution.width && s.height == resolution.height))) return + autoModeSent = true + } + sendMode(false) + } + + private fun sendMode(sbs: Boolean): Boolean { + val m = model ?: return false + if (sbs && !_settings.value.gameOnGlasses) update { it.copy(gameOnGlasses = true) } + val g = _settings.value + val resolution = GlassesDisplayModes.selected(g, _state.value, sbs) + val mode = m.mode(if (sbs) g.sbsHz else g.refreshHz, sbs, resolution) + if (link?.send(VitureProtocol.MSG_DISPLAY, byteArrayOf(mode.toByte())) == true) { + if (link is RayNeoLink) glassesMode = mode + lastModeSentAt = SystemClock.uptimeMillis() + modeState.sent(sbs, lastModeSentAt) + publish { it.copy(switching3d = modeState.pendingStereo) } + scheduleModeCheck() + return true + } + return false + } + + private fun scheduleModeCheck() { + handler.removeCallbacks(confirmMode) + modeState.nextCheckAt?.let { at -> + handler.postDelayed(confirmMode, (at - SystemClock.uptimeMillis()).coerceAtLeast(0)) + } + } + + private fun sendFilm(on: Boolean) { + if (!_state.value.canControl || !_state.value.hardwareControls || !_state.value.hasSunblock) return + if (link?.send(VitureProtocol.MSG_FILM, byteArrayOf(if (on) 1 else 0)) == true && link !is XrealLink) + publish { it.copy(sunblock = on) } + } + + private fun updateImu() { + val l = link ?: return + if (!l.ready) return + val want = (sink != null || poseObservers.isNotEmpty() || probe != null || _calibration.value.running || SpatialTracking.enabled) && l.hasImu + if (want == _state.value.tracking) return + val accepted = l.send(VitureProtocol.MSG_IMU, byteArrayOf(if (want) 1 else 0)) + if (want && !accepted) return + if (want) l.send(VitureProtocol.MSG_IMU_RATE, byteArrayOf(VitureProtocol.IMU_RATE_240.toByte())) + publish { it.copy(tracking = want) } + } + + private fun linkListener(generation: Long) = object : VitureLink.Listener { + override fun onFrame(frame: VitureProtocol.Frame) = post { + if (generation != linkGeneration) return@post + val line = "%s 0x%04X %s".format( + when (frame.magic) { VitureProtocol.MAGIC_REPORT -> "FD"; VitureProtocol.MAGIC_COMMAND -> "FE"; else -> "FC" }, + frame.msgId, frame.payload.joinToString("") { "%02X".format(it) }, + ) + synchronized(frames) { + frames.addLast(line) + while (frames.size > 64) frames.removeFirst() + } + Log.i(TAG, "frame $line") + onReport(frame) + } + + override fun onImu(payload: ByteArray, timeNs: Long) { + if (generation != linkGeneration) return + imuPackets++ + probe?.invoke(payload, null) + if (simulating.get() != null) return + VitureProtocol.imuQuaternion(payload)?.let { deliver(it, timeNs) } + } + + override fun onLost() = post { + if (generation != linkGeneration) return@post + closeLink() + refresh() + } + } + + private fun deliver(q: FloatArray, timeNs: Long) { + latest = q + sink?.onPose(q[0], q[1], q[2], q[3], timeNs) + poseObservers.forEach { it.onPose(q[0], q[1], q[2], q[3], timeNs) } + } + + private fun onReport(frame: VitureProtocol.Frame) { + val p = frame.payload + val event = p.firstOrNull()?.toInt()?.and(0xFF) ?: return + val answer = if (p.size >= 2 && event == 0) p[1].toInt() and 0xFF else null + when (frame.msgId) { + VitureProtocol.EVENT_DISPLAY -> { + Log.i(TAG, "glasses switched to mode 0x%02X".format(event)) + glassesMode = event + } + VitureProtocol.EVENT_DISPLAY_STEP -> model?.modeForStep(event)?.let { mode -> + Log.i(TAG, "glasses report mode 0x%02X".format(mode)) + glassesMode = mode + } + VitureProtocol.EVENT_BRIGHTNESS -> publish { it.copy(brightness = event) } + VitureProtocol.EVENT_VOLUME -> publish { it.copy(volume = event) } + VitureProtocol.MSG_GET_BRIGHTNESS, VitureProtocol.MSG_BRIGHTNESS -> answer?.let { v -> publish { it.copy(brightness = v) } } + VitureProtocol.MSG_GET_VOLUME, VitureProtocol.MSG_VOLUME -> answer?.let { v -> publish { it.copy(volume = v) } } + VitureProtocol.MSG_DISPLAY -> if (event != 0) { + Log.w(TAG, "glasses refused display mode 0x%02X".format(p.getOrNull(1)?.toInt()?.and(0xFF) ?: 0)) + modeState.cancelPending() + publish { it.copy(switching3d = false) } + scheduleModeCheck() + } else answer?.let { glassesMode = it } + VitureProtocol.MSG_GET_DISPLAY -> answer?.let { v -> + glassesMode = v + } + } + } + + fun sampleImu(ms: Long): JSONObject { + val raw = java.util.Collections.synchronizedList(mutableListOf<Pair<ByteArray?, FloatArray?>>()) + val counter = java.util.concurrent.atomic.AtomicInteger() + val began = SystemClock.elapsedRealtime() + probe = { payload, pose -> val n = counter.incrementAndGet(); if (raw.size < 4 || n % 60 == 0) raw.add(payload?.copyOf() to pose?.copyOf()) } + post { updateImu() } + SystemClock.sleep(ms) + probe = null + post { updateImu() } + val seconds = (SystemClock.elapsedRealtime() - began) / 1000.0 + val count = counter.get() + val samples = JSONArray() + synchronized(raw) { + raw.forEach { (b, pose) -> + val rayneo = b != null && RayNeoProtocol.classifyPacket(b) is RayNeoPacket.Sensor + val q = pose ?: if (b == null || rayneo) null else VitureProtocol.imuQuaternion(b) + samples.put(JSONObject() + .put("hex", b?.joinToString("") { "%02X".format(it) } ?: JSONObject.NULL) + .put("euler", if (b == null || b.size < 12 || rayneo || pose != null) JSONObject.NULL else JSONArray().put(VitureProtocol.beFloat(b, 0).toDouble()).put(VitureProtocol.beFloat(b, 4).toDouble()).put(VitureProtocol.beFloat(b, 8).toDouble())) + .put("quat", q?.let { JSONArray().put(it[0].toDouble()).put(it[1].toDouble()).put(it[2].toDouble()).put(it[3].toDouble()) } ?: JSONObject.NULL)) + } + } + return JSONObject().put("packets", count).put("rateHz", count / seconds).put("samples", samples) + } + + private fun Intent.device(): UsbDevice? = + if (Build.VERSION.SDK_INT >= 33) getParcelableExtra(UsbManager.EXTRA_DEVICE, UsbDevice::class.java) + else @Suppress("DEPRECATION") getParcelableExtra(UsbManager.EXTRA_DEVICE) + + private fun load(): GlassesSettings { + val p = app.getSharedPreferences(PREFS, Context.MODE_PRIVATE) + return GlassesSettings( + positionalTracking = p.getBoolean("positionalTracking", false), + handControllers = p.getBoolean("handControllers", false), + joyConTracking = p.getBoolean("joyConTracking", false), + steadyHandAim = p.getBoolean("steadyHandAim", false), + eyeHeightCm = p.getInt("eyeHeightCm", 160).coerceIn(50, 250), + refreshHz = p.getInt("refreshHz", 120), + sbsHz = p.getInt("sbsHz", 60), + resolution2d = p.getString("resolution2d", "").orEmpty(), + resolution3d = p.getString("resolution3d", "").orEmpty(), + resolutionVr = p.getString("resolutionVr", "").orEmpty(), + sunblock = if (p.contains("sunblock")) p.getBoolean("sunblock", false) else null, + gameOnGlasses = p.getBoolean("gameOnGlasses", true), + headTracking = p.getBoolean("headTracking", true), + auto3d = p.getBoolean("auto3d", GlassesSettings().auto3d), + picture3d = p.getInt("picture3d", GlassesSettings.PICTURE_AUTO), + screenWidthDm = p.getInt("screenWidthDm", 20), + screenDistanceDm = p.getInt("screenDistanceDm", 30), + vrFovDeg = p.getInt("vrFovDeg", GlassesSettings.VR_FOV_DEFAULT).coerceIn(GlassesSettings.VR_FOV_MIN, GlassesSettings.VR_FOV_MAX), + ) + } + + private fun save(s: GlassesSettings) { + app.getSharedPreferences(PREFS, Context.MODE_PRIVATE).edit().apply { + putBoolean("positionalTracking", s.positionalTracking) + putBoolean("handControllers", s.handControllers) + putBoolean("joyConTracking", s.joyConTracking) + putBoolean("steadyHandAim", s.steadyHandAim) + putInt("eyeHeightCm", s.eyeHeightCm) + putInt("refreshHz", s.refreshHz) + putInt("sbsHz", s.sbsHz) + putString("resolution2d", s.resolution2d) + putString("resolution3d", s.resolution3d) + putString("resolutionVr", s.resolutionVr) + s.sunblock?.let { putBoolean("sunblock", it) } ?: remove("sunblock") + putBoolean("gameOnGlasses", s.gameOnGlasses) + putBoolean("headTracking", s.headTracking) + putBoolean("auto3d", s.auto3d) + putInt("picture3d", s.picture3d) + putInt("screenWidthDm", s.screenWidthDm) + putInt("screenDistanceDm", s.screenDistanceDm) + putInt("vrFovDeg", s.vrFovDeg) + }.apply() + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/GlassesDisplayModes.kt b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesDisplayModes.kt new file mode 100644 index 0000000000..7cb533b968 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesDisplayModes.kt @@ -0,0 +1,29 @@ +package com.droiddeck.launcher.glasses + +data class GlassesResolution(val width: Int, val height: Int) { + val key: String get() = "${width}x$height" +} + +enum class GlassesDisplayProfile { TWO_D, THREE_D, VR } + +internal object GlassesDisplayModes { + fun profile(stereo: Boolean, vr: Boolean): GlassesDisplayProfile = when { + vr -> GlassesDisplayProfile.VR + stereo -> GlassesDisplayProfile.THREE_D + else -> GlassesDisplayProfile.TWO_D + } + + fun choice(settings: GlassesSettings, profile: GlassesDisplayProfile): String = when (profile) { + GlassesDisplayProfile.TWO_D -> settings.resolution2d + GlassesDisplayProfile.THREE_D -> settings.resolution3d + GlassesDisplayProfile.VR -> settings.resolutionVr + } + + fun selected(settings: GlassesSettings, state: GlassesState, + stereo: Boolean = state.sbs, vr: Boolean = state.vrActive): GlassesResolution? { + val selected = choice(settings, profile(stereo, vr)).ifEmpty { + if (vr) choice(settings, profile(stereo, false)) else "" + } + return state.resolutions.firstOrNull { it.key == selected } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/GlassesHardware.kt b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesHardware.kt new file mode 100644 index 0000000000..0f6c288334 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesHardware.kt @@ -0,0 +1,27 @@ +package com.droiddeck.launcher.glasses + +/** Hardware properties; display refresh is selected from Android's advertised modes. */ +interface GlassesModel { + val name: String + val controllable: Boolean + val brightnessMax: Int + val volumeMax: Int + val diagonalFovDeg: Float + val sbs90: Boolean + val hasSunblock: Boolean get() = true + val resolutions: List<GlassesResolution> get() = emptyList() + fun mode(hz: Int, sbs: Boolean, resolution: GlassesResolution?): Int = mode(hz, sbs) + fun mode(hz: Int, sbs: Boolean): Int + fun modeForStep(step: Int): Int? +} + +/** The command IDs here are the existing glasses controller's internal vocabulary. + * Each transport translates them to its own wire protocol; unsupported controls return false. + */ +internal interface GlassesLink { + val hasImu: Boolean + val badFrames: Long get() = 0L + val ready: Boolean get() = true + fun send(msgId: Int, payload: ByteArray = ByteArray(0)): Boolean + fun close() +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuCapture.kt b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuCapture.kt new file mode 100644 index 0000000000..a22f575768 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuCapture.kt @@ -0,0 +1,175 @@ +package com.droiddeck.launcher.glasses + +import android.app.Activity +import android.content.Context +import android.content.ContextWrapper +import android.graphics.Color +import android.graphics.PorterDuff +import android.graphics.SurfaceTexture +import android.os.Build +import android.os.Looper +import android.view.Choreographer +import android.view.Surface +import android.view.View +import android.view.WindowManager +import android.view.inspector.WindowInspector +import kotlin.math.min +import kotlin.math.roundToInt + +class GlassesMenuCapture(private val activity: Activity, private val onSize: (Int, Int) -> Unit, + private val onFailure: (Throwable) -> Unit = {}) : Choreographer.FrameCallback { + private var texture: SurfaceTexture? = null + private var surface: Surface? = null + private var running = false + private var framePending = false + private var lastFrameNs = Long.MIN_VALUE + private var failures = 0 + private var bufferWidth = 0 + private var bufferHeight = 0 + private val basePosition = IntArray(2) + private val windowPosition = IntArray(2) + + fun attach(texture: SurfaceTexture, surface: Surface) { + checkMainThread() + this.texture = texture + this.surface = surface + bufferWidth = 0 + bufferHeight = 0 + failures = 0 + lastFrameNs = Long.MIN_VALUE + } + + fun start() { + checkMainThread() + if (running || activity.isDestroyed || activity.isFinishing) return + running = true + failures = 0 + lastFrameNs = Long.MIN_VALUE + schedule() + } + + fun stop() { + checkMainThread() + running = false + if (framePending) Choreographer.getInstance().removeFrameCallback(this) + framePending = false + } + + override fun doFrame(frameTimeNanos: Long) { + framePending = false + if (!running) return + if (activity.isDestroyed || activity.isFinishing) { + stop() + return + } + if (lastFrameNs == Long.MIN_VALUE || frameTimeNanos - lastFrameNs >= FRAME_INTERVAL_NS) { + lastFrameNs = frameTimeNanos + try { + capture() + failures = 0 + } catch (error: Exception) { + if (++failures >= MAX_FAILURES) { + stop() + onFailure(error) + } + } + } + if (running) schedule() + } + + private fun schedule() { + if (framePending) return + framePending = true + Choreographer.getInstance().postFrameCallback(this) + } + + private fun capture() { + val target = surface ?: return + val input = texture ?: return + val decor = activity.window.decorView + if (!decor.isAttachedToWindow || !decor.isShown) return + val size = captureSize(decor.width, decor.height) ?: return + check(target.isValid) + if (bufferWidth != size.first || bufferHeight != size.second) { + input.setDefaultBufferSize(size.first, size.second) + onSize(size.first, size.second) + bufferWidth = size.first + bufferHeight = size.second + } + val candidates = if (Build.VERSION.SDK_INT >= 29) WindowInspector.getGlobalWindowViews() else emptyList() + val roots = captureRoots(activity, candidates) + val canvas = target.lockHardwareCanvas() + val initialSave = canvas.save() + try { + canvas.drawColor(Color.BLACK, PorterDuff.Mode.SRC) + val scale = min(canvas.width.toFloat() / decor.width, canvas.height.toFloat() / decor.height) + canvas.translate((canvas.width - decor.width * scale) / 2f, (canvas.height - decor.height * scale) / 2f) + canvas.scale(scale, scale) + canvas.clipRect(0, 0, decor.width, decor.height) + decor.getLocationOnScreen(basePosition) + for (root in roots) { + val params = root.layoutParams as? WindowManager.LayoutParams + if (root !== decor && params != null && params.flags and WindowManager.LayoutParams.FLAG_DIM_BEHIND != 0) { + canvas.drawColor(Color.argb((params.dimAmount.coerceIn(0f, 1f) * 255).roundToInt(), 0, 0, 0)) + } + root.getLocationOnScreen(windowPosition) + val saved = canvas.save() + try { + canvas.translate((windowPosition[0] - basePosition[0]).toFloat(), (windowPosition[1] - basePosition[1]).toFloat()) + root.draw(canvas) + } finally { + canvas.restoreToCount(saved) + } + } + } finally { + try { + canvas.restoreToCount(initialSave) + } finally { + target.unlockCanvasAndPost(canvas) + } + } + } + + private fun checkMainThread() { + check(Looper.myLooper() == Looper.getMainLooper()) + } + + internal companion object { + private const val FRAME_INTERVAL_NS = 33_333_334L + private const val MAX_FAILURES = 3 + private const val MAX_EDGE = 1920 + + internal fun captureSize(width: Int, height: Int): Pair<Int, Int>? { + if (width <= 0 || height <= 0) return null + val scale = min(1.0, MAX_EDGE.toDouble() / maxOf(width, height)) + return (width * scale).roundToInt().coerceAtLeast(1) to (height * scale).roundToInt().coerceAtLeast(1) + } + + internal fun captureRoots(activity: Activity, candidates: List<View>): List<View> { + val decor = activity.window.decorView + if (activity.window.attributes.flags and WindowManager.LayoutParams.FLAG_SECURE != 0 || + !decor.isAttachedToWindow || !decor.isShown) return emptyList() + if (Build.VERSION.SDK_INT < 29) return listOf(decor) + val display = decor.display?.displayId ?: return listOf(decor) + val token = decor.applicationWindowToken + return listOf(decor) + candidates.filter { root -> + if (root === decor || !root.isAttachedToWindow || !root.isShown || root.display?.displayId != display) return@filter false + val params = root.layoutParams as? WindowManager.LayoutParams ?: return@filter false + if (params.flags and WindowManager.LayoutParams.FLAG_SECURE != 0 || + params.type !in WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW..WindowManager.LayoutParams.LAST_SUB_WINDOW) return@filter false + ownsContext(root.context, activity) || (token != null && root.applicationWindowToken == token) + }.distinct() + } + + private fun ownsContext(context: Context, activity: Activity): Boolean { + var current = context + repeat(16) { + if (current === activity) return true + val next = (current as? ContextWrapper)?.baseContext ?: return false + if (next === current) return false + current = next + } + return false + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuMirror.kt b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuMirror.kt new file mode 100644 index 0000000000..d1b2cc33c4 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuMirror.kt @@ -0,0 +1,219 @@ +package com.droiddeck.launcher.glasses + +import android.app.Activity +import android.app.Application +import android.app.Presentation +import android.os.Bundle +import android.util.Log +import android.view.Display +import android.view.WindowManager +import com.droiddeck.launcher.SessionActivity +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.launch + +object GlassesMenuMirror { + private var controller: GlassesMenuController? = null + + fun initialize(app: Application) { + if (controller != null) return + val pose = GlassesMenuPose() + val menus = GlassesMenuController(pose, + display = Glasses::glassesDisplay, + observe = { active -> if (active) Glasses.addPoseObserver(pose) else Glasses.removePoseObserver(pose) }, + create = { activity, display, failure -> MenuPresentation(activity, display, pose, failure) }) + controller = menus + app.registerActivityLifecycleCallbacks(object : Application.ActivityLifecycleCallbacks { + override fun onActivityResumed(activity: Activity) = menus.resume(activity) + override fun onActivityPaused(activity: Activity) = menus.pause(activity) + override fun onActivityDestroyed(activity: Activity) = menus.pause(activity) + override fun onActivityCreated(activity: Activity, state: Bundle?) = Unit + override fun onActivityStarted(activity: Activity) = Unit + override fun onActivityStopped(activity: Activity) = Unit + override fun onActivitySaveInstanceState(activity: Activity, state: Bundle) = Unit + }) + CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate).launch { + combine(Glasses.state, Glasses.settings) { state, settings -> state to settings } + .collect { (state, settings) -> menus.update(state, settings) } + } + } + + fun setSessionMenuVisible(activity: Activity, visible: Boolean) { + controller?.setSessionMenuVisible(activity, visible) + } + + fun recenter() { controller?.recenter() } +} + +internal class GlassesMenuController( + private val pose: GlassesMenuPose, + private val display: () -> Display?, + private val observe: (Boolean) -> Unit, + private val create: (Activity, Display, (Throwable) -> Unit) -> Output, + private val schedule: (() -> Unit) -> Unit = { android.os.Handler(android.os.Looper.getMainLooper()).post(it) }, +) { + interface Output { + fun configure(state: GlassesState, settings: GlassesSettings) + fun show() + fun close() + } + + private var activity: Activity? = null + private val sessionMenus = java.util.WeakHashMap<Activity, Boolean>() + private var state = GlassesState() + private var settings = GlassesSettings() + private var output: Output? = null + private var outputDisplay = Display.INVALID_DISPLAY + private var failed = false + private var dismissalRetried = false + private var generation = 0 + + fun resume(owner: Activity) { + if (activity !== owner) close() + activity = owner + failed = false + dismissalRetried = false + reconcile() + } + + fun pause(owner: Activity) { + if (activity !== owner) return + close() + activity = null + } + + fun setSessionMenuVisible(owner: Activity, visible: Boolean) { + if (visible) sessionMenus[owner] = true else sessionMenus.remove(owner) + if (activity === owner) reconcile() + } + + fun update(next: GlassesState, preferences: GlassesSettings) { + val deviceChanged = state.canControl != next.canControl || state.model != next.model + if (deviceChanged) pose.reset() + if (deviceChanged || state.displayId != next.displayId || state.width != next.width || + state.height != next.height || state.sbs != next.sbs || settings != preferences) { + failed = false + dismissalRetried = false + } + state = next + settings = preferences + pose.configure(preferences) + reconcile() + } + + fun recenter() = pose.recenter() + + private fun reconcile() { + val owner = activity + val eligible = owner != null && !owner.isFinishing && !owner.isDestroyed && !owner.isInPictureInPictureMode && + owner.window.attributes.flags and WindowManager.LayoutParams.FLAG_SECURE == 0 && + owner !is com.droiddeck.launcher.QuestXrActivity && + (owner !is SessionActivity || sessionMenus[owner] == true) && + settings.gameOnGlasses && settings.screen3dof && state.usable && state.canControl && state.supportsScreen3dof + val target = if (eligible && !failed) display() else null + if (target == null || owner == null || owner.windowManager.defaultDisplay.displayId == target.displayId) { + close() + return + } + if (outputDisplay != target.displayId) close() + try { + output?.let { it.configure(state, settings); return } + val token = ++generation + val next = create(owner, target) { error -> + if (generation == token) { + close() + if (error is GlassesMenuDisplayStopped && !dismissalRetried) { + dismissalRetried = true + val retry = generation + schedule { if (generation == retry && activity === owner) reconcile() } + } else { + Log.w("GlassesMenu", "Tracked menus are unavailable for this display", error) + failed = true + } + } + } + if (generation != token) { + next.close() + return + } + output = next + outputDisplay = target.displayId + next.configure(state, settings) + if (generation != token) return + observe(true) + next.show() + } catch (error: RuntimeException) { + Log.w("GlassesMenu", "Could not show tracked menus", error) + failed = true + close() + } + } + + private fun close() { + ++generation + val previous = output + output = null + outputDisplay = Display.INVALID_DISPLAY + if (previous != null) { + observe(false) + try { previous.close() } + catch (error: RuntimeException) { Log.w("GlassesMenu", "Could not close tracked menus", error) } + } + } +} + +internal class GlassesMenuDisplayStopped : IllegalStateException("The glasses menu display stopped") + +private class MenuPresentation( + private val owner: Activity, + display: Display, + pose: GlassesMenuPose, + private val onFailure: (Throwable) -> Unit, +) : Presentation(owner, display), GlassesMenuController.Output { + private var closed = false + private val capture: GlassesMenuCapture = GlassesMenuCapture(owner, + onSize = { width, height -> surface.setSourceSize(width, height) }, onFailure = onFailure) + private val surface: GlassesMenuSurface = GlassesMenuSurface(context, pose, onFailure = onFailure) { texture, input -> + if (!closed) { + capture.attach(texture, input) + capture.start() + } + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + window?.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or + WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE or WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + setContentView(surface) + } + + override fun configure(state: GlassesState, settings: GlassesSettings) { + surface.configure(settings, state) + val mode = display.mode + val hz = if (state.sbs) settings.sbsHz else settings.refreshHz + val best = display.supportedModes.filter { + it.physicalWidth == mode.physicalWidth && it.physicalHeight == mode.physicalHeight + }.minByOrNull { kotlin.math.abs(it.refreshRate - hz) } + if (best != null) window?.let { it.attributes = it.attributes.apply { preferredDisplayModeId = best.modeId } } + } + + override fun close() { + if (closed) return + closed = true + capture.stop() + surface.close() + dismiss() + } + + override fun onStop() { + capture.stop() + surface.close() + super.onStop() + if (!closed) { + closed = true + onFailure(GlassesMenuDisplayStopped()) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuPose.kt b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuPose.kt new file mode 100644 index 0000000000..d64e2f1236 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuPose.kt @@ -0,0 +1,86 @@ +package com.droiddeck.launcher.glasses + +import com.droiddeck.launcher.gpu.HeadPose + +class GlassesMenuPose internal constructor( + private val spatialEnabled: () -> Boolean = { SpatialTracking.enabled }, + private val spatialView: (Long) -> SpatialPose? = { now -> + synchronized(SpatialTracking.session) { + if (SpatialTracking.session.valid(now)) SpatialTracking.session.view(true) else null + } + }, + private val recenterSpatial: () -> Unit = { SpatialTracking.recenter(true) }, +) : Glasses.PoseSink { + data class Frame( + val rotation: FloatArray, + val position: FloatArray, + val valid: Boolean, + val spatial: Boolean, + ) + + private var tracking = true + private var positional = false + private var reference: HeadPose.Reference? = null + private var latest: FloatArray? = null + private var latestTime = 0L + private var safe = identity() + + @Synchronized fun configure(settings: GlassesSettings) { + if (tracking != settings.headTracking) { + reference = null + safe = identity() + } + tracking = settings.headTracking + positional = settings.positionalTracking + } + + @Synchronized override fun onPose(x: Float, y: Float, z: Float, w: Float, timeNs: Long) { + val norm = x*x + y*y + z*z + w*w + if (!norm.isFinite() || norm !in 0.25f..2.25f || timeNs <= latestTime) return + val matrix = HeadPose.fromGlasses(x, y, z, w) + if (matrix.any { !it.isFinite() }) return + latest = matrix + latestTime = timeNs + } + + @Synchronized fun snapshot(now: Long = System.nanoTime()): Frame { + if (!tracking) return identity() + val spatial = positional && spatialEnabled() + if (spatial) { + val pose = spatialView(now) + val normalized = pose?.rotation?.normalized() + if (pose != null && pose.position.finite() && normalized != null) { + safe = Frame(normalized.matrix(), pose.position.array(), true, true) + return copy(safe) + } + } else { + val matrix = latest + if (matrix != null && latestTime > 0 && now-latestTime in 0..MAX_AGE_NS) { + val anchor = reference ?: HeadPose.recenter(matrix, centerView = true).also { reference = it } + safe = Frame(HeadPose.relative(anchor, matrix), FloatArray(3), true, false) + return copy(safe) + } + } + return copy(safe).copy(valid = false, spatial = spatial) + } + + @Synchronized fun recenter() { + if (positional && spatialEnabled()) recenterSpatial() + else reference = null + } + + @Synchronized fun reset() { + reference = null + latest = null + latestTime = 0L + safe = identity() + } + + private fun copy(frame: Frame) = frame.copy(rotation = frame.rotation.copyOf(), position = frame.position.copyOf()) + + private fun identity() = Frame(HeadPose.IDENTITY.copyOf(), FloatArray(3), false, false) + + companion object { + internal const val MAX_AGE_NS = 100_000_000L + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuSurface.kt b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuSurface.kt new file mode 100644 index 0000000000..cefe3d9329 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuSurface.kt @@ -0,0 +1,291 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import android.graphics.SurfaceTexture +import android.opengl.GLES11Ext +import android.opengl.GLES20 +import android.opengl.GLSurfaceView +import android.os.Handler +import android.os.Looper +import android.util.Log +import android.view.Surface +import java.nio.ByteBuffer +import java.nio.ByteOrder +import java.util.concurrent.atomic.AtomicBoolean +import java.util.concurrent.atomic.AtomicInteger +import javax.microedition.khronos.egl.EGLConfig +import javax.microedition.khronos.opengles.GL10 +import kotlin.math.tan + +class GlassesMenuSurface( + context: Context, + private val pose: GlassesMenuPose, + private val onFailure: (Throwable) -> Unit = {}, + private val onInput: (SurfaceTexture, Surface) -> Unit, +) : GLSurfaceView(context) { + private data class Scene(val settings: GlassesSettings, val state: GlassesState) + + private val main = Handler(Looper.getMainLooper()) + private val closed = AtomicBoolean() + private val failed = AtomicBoolean() + private val generation = AtomicInteger() + private val pendingFrame = AtomicBoolean() + private val inputLock = Any() + private var inputTexture: SurfaceTexture? = null + private var inputSurface: Surface? = null + @Volatile private var scene = Scene(GlassesSettings(), GlassesState()) + @Volatile private var sourceAspect = 16f / 9f + private val renderer = MenuRenderer() + + init { + setEGLContextClientVersion(2) + setEGLConfigChooser(8, 8, 8, 8, 0, 0) + preserveEGLContextOnPause = true + setRenderer(renderer) + renderMode = RENDERMODE_CONTINUOUSLY + } + + fun configure(settings: GlassesSettings, state: GlassesState) { + pose.configure(settings) + scene = Scene(settings, state) + } + + fun setSourceSize(width: Int, height: Int) { + if (width > 0 && height > 0) sourceAspect = width.toFloat() / height + } + + fun close() { + if (!closed.compareAndSet(false, true)) return + generation.incrementAndGet() + queueEvent { renderer.release() } + } + + override fun onDetachedFromWindow() { + close() + super.onDetachedFromWindow() + // GLSurfaceView may exit its GL thread before queued cleanup is consumed. + releaseInput() + } + + private fun releaseInput() = synchronized(inputLock) { + inputTexture?.setOnFrameAvailableListener(null) + inputSurface?.release() + inputTexture?.release() + inputSurface = null + inputTexture = null + pendingFrame.set(false) + } + + private fun fail(error: Throwable) { + if (!failed.compareAndSet(false, true)) return + generation.incrementAndGet() + Log.e("GlassesMenu", "Menu rendering is unavailable", error) + main.post { if (!closed.get()) onFailure(error) } + } + + private inner class MenuRenderer : Renderer { + private val vertices = ByteBuffer.allocateDirect(8 * 4).order(ByteOrder.nativeOrder()).asFloatBuffer().apply { + put(floatArrayOf(-1f, -1f, 1f, -1f, -1f, 1f, 1f, 1f)); position(0) + } + private val textureMatrix = FloatArray(16) + private var texture = 0 + private var program = 0 + private var width = 1 + private var height = 1 + private var hasFrame = false + private var positionLocation = 0 + private var textureLocation = 0 + private var transformLocation = 0 + private var rotationLocation = IntArray(3) + private var headLocation = 0 + private var screenLocation = 0 + private var opticsLocation = 0 + + override fun onSurfaceCreated(gl: GL10?, config: EGLConfig?) { + releaseInput() + texture = 0 + program = 0 + hasFrame = false + if (closed.get() || failed.get()) return + val token = generation.incrementAndGet() + try { + program = linkProgram() + positionLocation = GLES20.glGetAttribLocation(program, "aPosition") + textureLocation = GLES20.glGetUniformLocation(program, "uTexture") + transformLocation = GLES20.glGetUniformLocation(program, "uTextureMatrix") + rotationLocation = IntArray(3) { GLES20.glGetUniformLocation(program, "uRotation$it") } + headLocation = GLES20.glGetUniformLocation(program, "uHead") + screenLocation = GLES20.glGetUniformLocation(program, "uScreen") + opticsLocation = GLES20.glGetUniformLocation(program, "uOptics") + val names = IntArray(1) + GLES20.glGenTextures(1, names, 0) + texture = names[0] + check(texture != 0) { "Could not allocate the menu texture" } + GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, texture) + GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR) + GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR) + GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE) + GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE) + checkGl("initialize menu texture") + val incoming = SurfaceTexture(texture) + val surface = synchronized(inputLock) { + inputTexture = incoming + Surface(incoming).also { inputSurface = it } + } + incoming.setOnFrameAvailableListener({ + if (!closed.get() && generation.get() == token) pendingFrame.set(true) + }, main) + main.post { + if (!closed.get() && !failed.get() && generation.get() == token) onInput(incoming, surface) + } + } catch (e: RuntimeException) { + fail(e) + release() + } + } + + override fun onSurfaceChanged(gl: GL10?, width: Int, height: Int) { + this.width = width.coerceAtLeast(1) + this.height = height.coerceAtLeast(1) + GLES20.glViewport(0, 0, this.width, this.height) + } + + override fun onDrawFrame(gl: GL10?) { + if (closed.get() || failed.get()) return + GLES20.glClearColor(0.015f, 0.015f, 0.02f, 1f) + GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT) + if (program == 0) return + if (pendingFrame.getAndSet(false)) synchronized(inputLock) { + inputTexture?.let { + try { + it.updateTexImage() + it.getTransformMatrix(textureMatrix) + checkGl("update menu texture") + hasFrame = true + } catch (e: RuntimeException) { + fail(e) + release() + return + } + } + } + if (!hasFrame) return + val current = scene + val frame = pose.snapshot() + val halfWidth = current.settings.screenWidthDm.coerceIn(5, 200) / 20f + val distance = current.settings.screenDistanceDm.coerceIn(5, 200) / 10f + val mono = !current.state.sbs + val fov = current.state.verticalFovDeg.takeIf { it.isFinite() }?.coerceIn(20f, 140f) ?: 23.3f + val tangent = tan(Math.toRadians(fov.toDouble()) / 2).toFloat() + GLES20.glUseProgram(program) + GLES20.glActiveTexture(GLES20.GL_TEXTURE0) + GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, texture) + GLES20.glUniform1i(textureLocation, 0) + GLES20.glUniformMatrix4fv(transformLocation, 1, false, textureMatrix, 0) + for (row in 0..2) GLES20.glUniform3fv(rotationLocation[row], 1, frame.rotation, row * 3) + GLES20.glUniform3fv(headLocation, 1, frame.position, 0) + GLES20.glUniform3f(screenLocation, halfWidth, distance, sourceAspect) + GLES20.glUniform4f(opticsLocation, tangent, width.toFloat() / height / (if (mono) 1f else 2f), + if (mono) 0f else IPD_METERS / 2f, if (mono) 1f else 0f) + vertices.position(0) + GLES20.glEnableVertexAttribArray(positionLocation) + GLES20.glVertexAttribPointer(positionLocation, 2, GLES20.GL_FLOAT, false, 0, vertices) + GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4) + GLES20.glDisableVertexAttribArray(positionLocation) + } + + fun release() { + releaseInput() + if (texture != 0) GLES20.glDeleteTextures(1, intArrayOf(texture), 0) + if (program != 0) GLES20.glDeleteProgram(program) + texture = 0 + program = 0 + hasFrame = false + } + + private fun checkGl(operation: String) { + val error = GLES20.glGetError() + check(error == GLES20.GL_NO_ERROR) { "Could not $operation: GL error 0x${error.toString(16)}" } + } + + private fun shader(type: Int, source: String): Int { + val shader = GLES20.glCreateShader(type) + GLES20.glShaderSource(shader, source) + GLES20.glCompileShader(shader) + val status = IntArray(1) + GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, status, 0) + if (status[0] == 0) { + val error = GLES20.glGetShaderInfoLog(shader) + GLES20.glDeleteShader(shader) + throw IllegalStateException(error) + } + return shader + } + + private fun linkProgram(): Int { + val vertex = shader(GLES20.GL_VERTEX_SHADER, VERTEX) + var fragment = 0 + var linked = 0 + try { + fragment = shader(GLES20.GL_FRAGMENT_SHADER, FRAGMENT) + linked = GLES20.glCreateProgram() + GLES20.glAttachShader(linked, vertex) + GLES20.glAttachShader(linked, fragment) + GLES20.glLinkProgram(linked) + val status = IntArray(1) + GLES20.glGetProgramiv(linked, GLES20.GL_LINK_STATUS, status, 0) + check(status[0] != 0) { GLES20.glGetProgramInfoLog(linked) } + return linked + } catch (e: RuntimeException) { + if (linked != 0) GLES20.glDeleteProgram(linked) + throw e + } finally { + GLES20.glDeleteShader(vertex) + if (fragment != 0) GLES20.glDeleteShader(fragment) + } + } + } + + companion object { + internal const val IPD_METERS = 0.064f + private const val VERTEX = """ + attribute vec2 aPosition; + varying vec2 vUv; + void main() { + gl_Position = vec4(aPosition, 0.0, 1.0); + vUv = aPosition * 0.5 + 0.5; + } + """ + private const val FRAGMENT = """ + #extension GL_OES_EGL_image_external : require + precision highp float; + uniform samplerExternalOES uTexture; + uniform mat4 uTextureMatrix; + uniform vec3 uRotation0, uRotation1, uRotation2, uHead, uScreen; + uniform vec4 uOptics; + varying vec2 vUv; + vec3 rotate(vec3 v) { + return vec3(dot(uRotation0, v), dot(uRotation1, v), dot(uRotation2, v)); + } + void main() { + bool mono = uOptics.w > 0.5; + float eye = mono || vUv.x < 0.5 ? 0.0 : 1.0; + vec2 local = vec2(mono ? vUv.x : vUv.x * 2.0 - eye, 1.0 - vUv.y); + vec2 ray = (local - 0.5) * vec2(uOptics.y, 1.0) * (2.0 * uOptics.x); + vec3 direction = rotate(vec3(ray.x, -ray.y, -1.0)); + vec3 origin = uHead + rotate(vec3((eye < 0.5 ? -1.0 : 1.0) * uOptics.z, 0.0, 0.0)); + vec3 color = vec3(0.015, 0.015, 0.02); + if (direction.z < -0.0001) { + float distance = (-uScreen.y - origin.z) / direction.z; + vec3 hit = origin + direction * distance; + vec2 source = vec2(hit.x / uScreen.x, -hit.y * uScreen.z / uScreen.x) * 0.5 + 0.5; + if (distance > 0.0 && all(greaterThanEqual(source, vec2(0.0))) && all(lessThanEqual(source, vec2(1.0)))) { + vec2 uv = (uTextureMatrix * vec4(source.x, 1.0 - source.y, 0.0, 1.0)).xy; + color = texture2D(uTexture, uv).rgb; + } + } + gl_FragColor = vec4(color, 1.0); + } + """ + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/GlassesModeState.kt b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesModeState.kt new file mode 100644 index 0000000000..2bf61b8135 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesModeState.kt @@ -0,0 +1,84 @@ +package com.droiddeck.launcher.glasses + +internal class GlassesModeState(private val timeoutMs: Long) { + enum class Confirmation { NONE, WAITING, CONFIRMED, FAILED } + data class Device(val productId: Int, val serial: String?) + + private var deadline: Long? = null + private var device: Device? = null + private var attached = false + private var reconnectDeadline: Long? = null + private var vrOwned = false + var restorePending = false + private set + val pendingStereo: Boolean get() = deadline != null + val nextCheckAt: Long? get() = listOfNotNull(deadline, reconnectDeadline).minOrNull() + + fun updateDevice(current: Device?, now: Long): Boolean { + if (reconnectDeadline?.let { now >= it } == true) abandon() + if (current == null) { + if (attached) reconnectDeadline = now + timeoutMs + attached = false + return false + } + val previous = device + val changed = previous == null || previous.productId != current.productId || + (previous.serial != null && current.serial != null && previous.serial != current.serial) + if (changed) abandon() + device = if (!changed && current.serial == null) previous else current + attached = true + reconnectDeadline = null + return changed + } + + private fun abandon() { + deadline = null + reconnectDeadline = null + vrOwned = false + restorePending = false + } + + fun manual() { + vrOwned = false + restorePending = false + } + + fun startVr() { + vrOwned = true + restorePending = false + } + + fun stopVr(): Boolean { + if (vrOwned) { + vrOwned = false + restorePending = true + } + return restorePending + } + + fun sent(stereo: Boolean, now: Long) { + deadline = if (stereo) now + timeoutMs else null + if (!stereo) restorePending = false + } + + fun cancelPending() { + deadline = null + } + + fun observe(stereo: Boolean, now: Long): Confirmation { + val until = deadline ?: return Confirmation.NONE + if (stereo) { + deadline = null + return Confirmation.CONFIRMED + } + if (now < until) return Confirmation.WAITING + if (!attached) { + abandon() + return Confirmation.NONE + } + deadline = null + vrOwned = false + restorePending = true + return Confirmation.FAILED + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/GlassesRendering.kt b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesRendering.kt new file mode 100644 index 0000000000..4cd7f0a6d3 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesRendering.kt @@ -0,0 +1,89 @@ +package com.droiddeck.launcher.glasses + +import com.droiddeck.launcher.gpu.Cardboard + +/** Share the actual picture mode with settings so controls match the rendered view. */ +internal object GlassesRendering { + enum class Picture { FLAT, DUPLICATED, VIRTUAL_SCREEN, STEREO } + + fun native30HzAvailable(settings: GlassesSettings, state: GlassesState): Boolean = + state.usable && state.supports30Hz && settings.gameOnGlasses + + fun refreshRates(settings: GlassesSettings, state: GlassesState): List<Int> = buildList { + if (native30HzAvailable(settings, state)) add(30) + add(60) + if (!state.sbs || state.sbs90) add(90) + if (!state.sbs) add(120) + } + + fun outputHz(settings: GlassesSettings, state: GlassesState): Int { + val requested = if (state.sbs) settings.sbsHz else settings.refreshHz + return when { + requested == 30 -> if (native30HzAvailable(settings, state)) 30 else 60 + state.sbs && !state.sbs90 -> 60 + else -> requested + } + } + + fun mirrorRefreshLimit(settings: GlassesSettings, state: GlassesState, outputActive: Boolean): Int { + if (!state.usable || outputActive) return 0 + val hz = outputHz(settings, state) + return if (hz == 30 && kotlin.math.abs(state.hz - 30f) >= 0.5f) 60 else hz + } + + fun fpsLimit(requested: Int, mirrorRefreshLimit: Int): Int = when { + mirrorRefreshLimit <= 0 -> requested + requested <= 0 -> mirrorRefreshLimit + else -> minOf(requested, mirrorRefreshLimit) + } + + fun usesGlasses(state: GlassesState, outputActive: Boolean, steamVrRunning: Boolean): Boolean = + outputActive || (steamVrRunning && state.usable) + + fun picture(settings: GlassesSettings, stereoDisplay: Boolean, steamVrRunning: Boolean): Picture = + when { + steamVrRunning -> Picture.STEREO + settings.picture3d == GlassesSettings.PICTURE_SCREEN -> Picture.VIRTUAL_SCREEN + settings.picture3d == GlassesSettings.PICTURE_SBS -> Picture.STEREO + stereoDisplay -> Picture.DUPLICATED + else -> Picture.FLAT + } + + fun cardboard( + base: Cardboard, + settings: GlassesSettings, + state: GlassesState, + outputActive: Boolean, + steamVrRunning: Boolean, + ): Cardboard { + // Mirror output still uses the glasses' picture and sensors during VR. + if (!usesGlasses(state, outputActive, steamVrRunning)) { + // SteamVR uses the renderer's enabled flag as headset proximity. + // A flat phone preview still needs an active HMD and one SBS eye; + // otherwise SteamVR enters standby and leaves a frozen frame. + return if (steamVrRunning && !base.enabled) base.copy( + enabled = true, + source = Cardboard.SOURCE_SBS, + viewer = Cardboard.Viewer.NONE.id, + mono = true, + ) else base + } + val picture = picture(settings, state.sbs, steamVrRunning) + if (picture == Picture.FLAT) return Cardboard.OFF + return Cardboard( + enabled = true, + source = when (picture) { + Picture.STEREO -> Cardboard.SOURCE_SBS + Picture.DUPLICATED -> Cardboard.SOURCE_FLAT + else -> Cardboard.SOURCE_SCREEN + }, + viewer = Cardboard.Viewer.VITURE.id, + ipdMm = base.ipdMm, + screenWidthDm = settings.screenWidthDm, + screenDistanceDm = settings.screenDistanceDm, + headTracking = settings.headTracking && state.canControl && + (picture == Picture.VIRTUAL_SCREEN || steamVrRunning), + mono = !state.sbs, + ) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/GlassesScreen.kt b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesScreen.kt new file mode 100644 index 0000000000..c15e9c623f --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/GlassesScreen.kt @@ -0,0 +1,60 @@ +package com.droiddeck.launcher.glasses + +import android.app.Presentation +import android.content.Context +import android.graphics.Color +import android.os.Bundle +import android.util.Log +import android.view.Display +import android.view.SurfaceHolder +import android.view.SurfaceView +import android.view.ViewGroup +import android.view.WindowManager +import android.widget.FrameLayout +import kotlin.math.abs + +class GlassesScreen(context: Context, display: Display, refreshHz: Int, private val callback: SurfaceHolder.Callback, resolution: GlassesResolution? = null) : Presentation(context, display) { + val surfaceView = SurfaceView(getContext()) + internal val trackingRecovery = com.droiddeck.launcher.ui.TrackingRecoveryView(getContext()) + val holder: SurfaceHolder get() = surfaceView.holder + private var wantHz = refreshHz + private var wantResolution = resolution + + val hz: Float get() = display.mode.refreshRate + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + val root = FrameLayout(context).apply { setBackgroundColor(Color.BLACK) } + root.addView(surfaceView, FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)) + root.addView(trackingRecovery, FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)) + setContentView(root) + window?.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + applyMode() + surfaceView.holder.addCallback(callback) + } + + fun prefer(hz: Int, resolution: GlassesResolution? = null) { + wantHz = hz + wantResolution = resolution + // A 2D/SBS transition can replace the active mode without changing Hz. + applyMode() + } + + private fun applyMode() { + val w = window ?: return + val current = display.mode + val target = wantResolution + val width = target?.width?.times(if (current.physicalWidth >= 3000) 2 else 1) ?: current.physicalWidth + val height = target?.height ?: current.physicalHeight + val requested = display.supportedModes.filter { it.physicalWidth == width && it.physicalHeight == height } + val candidates = requested.ifEmpty { display.supportedModes.filter { + it.physicalWidth == current.physicalWidth && it.physicalHeight == current.physicalHeight + } } + val best = candidates.minByOrNull { abs(it.refreshRate - wantHz) } ?: return + if (w.attributes.preferredDisplayModeId != best.modeId) { + Log.i("GlassesScreen", "display ${display.displayId}: prefer mode ${best.modeId} " + + "${best.physicalWidth}x${best.physicalHeight}@${best.refreshRate} (requested $wantHz Hz)") + w.attributes = w.attributes.apply { preferredDisplayModeId = best.modeId } + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/HandGestures.kt b/app/src/main/java/com/droiddeck/launcher/glasses/HandGestures.kt new file mode 100644 index 0000000000..dae8c4cb6e --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/HandGestures.kt @@ -0,0 +1,48 @@ +package com.droiddeck.launcher.glasses + +import kotlin.math.* + +internal class HandGestures(private val rightHand: Boolean) { + private var grip = false + private var last: SpatialHand? = null + var lastOutcome = HandObservationOutcome.LANDMARK_COUNT_INVALID; private set + fun reset() { grip = false; last = null } + fun resetAfterRejection(outcome: HandObservationOutcome) { + if (outcome != HandObservationOutcome.PALM_MOTION_REJECTED) reset() + } + private fun reject(outcome: HandObservationOutcome): SpatialHand? { lastOutcome = outcome; return null } + fun estimate(points: List<SpatialVector?>, worldFromCamera: SpatialPose, time: Long, + leftImage: List<SpatialVector>? = null, rightImage: List<SpatialVector>? = null): SpatialHand? { + if (points.size != 21) return reject(HandObservationOutcome.LANDMARK_COUNT_INVALID) + val p = points.map { it?.takeIf(SpatialVector::finite) } + val wrist = p[0] ?: return reject(HandObservationOutcome.PALM_LANDMARK_MISSING) + val index = p[5] ?: return reject(HandObservationOutcome.PALM_LANDMARK_MISSING) + val middle = p[9] ?: return reject(HandObservationOutcome.PALM_LANDMARK_MISSING) + val ring = p[13] ?: return reject(HandObservationOutcome.PALM_LANDMARK_MISSING) + val little = p[17] ?: return reject(HandObservationOutcome.PALM_LANDMARK_MISSING) + val width = (index-little).length() + if (width !in 0.035f..0.13f) return reject(HandObservationOutcome.PALM_WIDTH_INVALID) + val forward = (middle-wrist).normalized() ?: return reject(HandObservationOutcome.PALM_BASIS_INVALID) + val lateral = (if (rightHand) little-index else index-little).normalized() ?: return reject(HandObservationOutcome.PALM_BASIS_INVALID) + val up = lateral.cross(forward).normalized() ?: return reject(HandObservationOutcome.PALM_BASIS_INVALID) + val right = forward.cross(up).normalized() ?: return reject(HandObservationOutcome.PALM_BASIS_INVALID) + val palm = (wrist+index+middle+ring+little) * 0.2f + val pose = worldFromCamera * SpatialPose(palm,SpatialRotation.fromBasis(right,up,forward * -1f)) + last?.let { old -> + val dt=(time-old.timeNs)/1e9f + if (dt>0 && dt<0.2f && (pose.position-old.pose.position).length()>0.08f+dt*3f) + return reject(HandObservationOutcome.PALM_MOTION_REJECTED) + } + val stereo = if (leftImage != null || rightImage != null) + StereoFingerGestures.estimate(leftImage,rightImage,grip) else null + val triggerValid = stereo?.triggerValid ?: (p[4] != null && p[8] != null) + val trigger = stereo?.trigger ?: if (triggerValid) ((0.55f-(p[4]!!-p[8]!!).length()/width)/0.35f).coerceIn(0f,1f) else 0f + val gripValid = stereo?.gripValid ?: listOf(12,16,20).all { p[it] != null } + val closed = if (stereo == null && gripValid) listOf(12 to 9,16 to 13,20 to 17).count { (tip,base) -> + (p[tip]!!-wrist).length() < (p[base]!!-wrist).length()*1.35f + } else 0 + grip=stereo?.grip ?: (gripValid && if(grip) closed>=2 else closed==3) + lastOutcome = HandObservationOutcome.ACCEPTED + return SpatialHand(pose,time,true,trigger,grip,triggerValid,gripValid).also { last=it } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/HandImageBuffer.kt b/app/src/main/java/com/droiddeck/launcher/glasses/HandImageBuffer.kt new file mode 100644 index 0000000000..b6aa9844a5 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/HandImageBuffer.kt @@ -0,0 +1,57 @@ +package com.droiddeck.launcher.glasses + +import android.graphics.Bitmap +import com.google.mediapipe.framework.image.ByteBufferImageBuilder +import com.google.mediapipe.framework.image.MPImage +import java.nio.ByteBuffer + +internal class HandImageBuffer { + companion object { + const val PREPROCESSING = "raw-grayscale-rgb" + } + private var pixels = ByteBuffer.allocateDirect(0) + private var source = IntArray(0) + private var rgb = ByteArray(0) + + private fun allocateRgb(count: Int) { + if (rgb.size != count * 3) { + rgb = ByteArray(count * 3) + pixels = ByteBuffer.allocateDirect(rgb.size) + } + } + + fun image(grayscale: ByteArray, width: Int, height: Int): MPImage { + require(width > 0 && height > 0 && width.toLong() * height == grayscale.size.toLong()) + allocateRgb(grayscale.size) + var index = 0 + for (value in grayscale) { + rgb[index++] = value + rgb[index++] = value + rgb[index++] = value + } + return image(width, height) + } + + fun image(grayscale: Bitmap): MPImage { + val count = grayscale.width * grayscale.height + if (source.size != count) source = IntArray(count) + allocateRgb(count) + grayscale.getPixels(source, 0, grayscale.width, 0, 0, grayscale.width, grayscale.height) + var index = 0 + for (pixel in source) { + val value = (pixel ushr 16).toByte() + rgb[index++] = value + rgb[index++] = value + rgb[index++] = value + } + return image(grayscale.width, grayscale.height) + } + + private fun image(width: Int, height: Int): MPImage { + pixels.clear() + pixels.put(rgb) + pixels.rewind() + // MediaPipe applies the model metadata's float normalization to these RGB bytes. + return ByteBufferImageBuilder(pixels, width, height, MPImage.IMAGE_FORMAT_RGB).build() + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/HandInferenceSchedule.kt b/app/src/main/java/com/droiddeck/launcher/glasses/HandInferenceSchedule.kt new file mode 100644 index 0000000000..7e55f273fe --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/HandInferenceSchedule.kt @@ -0,0 +1,72 @@ +package com.droiddeck.launcher.glasses + +internal class HandInferenceSchedule( + private val stableFrames: Int = 3, + private val discoveryIntervalMs: Long = 240, + private val maximumGapMs: Long = 400 +) { + init { + require(stableFrames > 0) + require(discoveryIntervalMs > 0 && maximumGapMs >= discoveryIntervalMs) + } + + private var lastFrameMs = -1L + private var selectedAtMs = -1L + private var selectedMaximum = 2 + private var lastSearchMs = -1L + private var candidateSide = -1 + private var consistentFrames = 0 + private var trackingSide = -1 + + fun select(timestampMs: Long): Int { + if (timestampMs < 0) { + reset() + return 2 + } + if (selectedAtMs >= 0 || lastFrameMs >= 0 && + (timestampMs <= lastFrameMs || timestampMs - lastFrameMs > maximumGapMs)) reset() + val maximum = if (trackingSide >= 0 && lastSearchMs >= 0 && + timestampMs - lastSearchMs < discoveryIntervalMs) 1 else 2 + lastFrameMs = timestampMs + selectedAtMs = timestampMs + selectedMaximum = maximum + if (maximum == 2) lastSearchMs = timestampMs + return maximum + } + + fun observe(timestampMs: Long, leftSides: List<Int>, rightSides: List<Int>, + leftRawCount: Int = leftSides.size, rightRawCount: Int = rightSides.size) { + if (timestampMs < 0 || selectedAtMs != timestampMs) { + reset() + return + } + selectedAtMs = -1L + val side = leftSides.singleOrNull() ?: -1 + val consistent = leftRawCount == 1 && rightRawCount == 1 && side in 0..1 && + rightSides.singleOrNull() == side + if (!consistent || selectedMaximum == 1 && side != trackingSide) { + forgetHand() + return + } + if (candidateSide != side) { + candidateSide = side + consistentFrames = 0 + } + consistentFrames = minOf(stableFrames, consistentFrames + 1) + if (consistentFrames >= stableFrames) trackingSide = side + } + + fun reset() { + lastFrameMs = -1L + selectedAtMs = -1L + selectedMaximum = 2 + lastSearchMs = -1L + forgetHand() + } + + private fun forgetHand() { + candidateSide = -1 + consistentFrames = 0 + trackingSide = -1 + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/HandModel.kt b/app/src/main/java/com/droiddeck/launcher/glasses/HandModel.kt new file mode 100644 index 0000000000..c1bcaaa342 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/HandModel.kt @@ -0,0 +1,10 @@ +package com.droiddeck.launcher.glasses + +internal enum class HandModel(val asset: String, val sha256: String) { + FULL("models/hand_landmarker.task", "fbc2a30080c3c557093b5ddfc334698132eb341044ccee322ccf8bcf3607cde1"), + LITE("models/hand_landmarker_lite.task", "173c0f47ecee7e935bd4a1e93aa580756b4180c1307c07d709313e82c28672c8"); + + companion object { + val DEFAULT = FULL + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/HandProcessingRate.kt b/app/src/main/java/com/droiddeck/launcher/glasses/HandProcessingRate.kt new file mode 100644 index 0000000000..f6859b4a73 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/HandProcessingRate.kt @@ -0,0 +1,48 @@ +package com.droiddeck.launcher.glasses + +internal class HandProcessingRate { + var permille = 500 + private set + private var processingMs = Double.NaN + private var headroomSamples = 0 + + fun observe(processingNs: Long, observationAgeNs: Long, trackingHealthy: Boolean): Int { + if (!trackingHealthy || processingNs <= 0 || observationAgeNs < 0) return reset() + val measuredMs = processingNs / 1_000_000.0 + val ageMs = observationAgeNs / 1_000_000.0 + processingMs = if (processingMs.isNaN()) measuredMs else processingMs + 0.2 * (measuredMs - processingMs) + if (measuredMs >= 80 || ageMs >= 140) { + permille = 500 + headroomSamples = 0 + return permille + } + val reduced = when { + permille > 500 && processingMs > 1000.0 / 15 -> 500 + permille == 800 && processingMs > 50 -> 600 + else -> permille + } + if (reduced != permille) { + permille = reduced + headroomSamples = 0 + return permille + } + val enoughHeadroom = when (permille) { + 500 -> processingMs <= 55 && ageMs <= 110 + 600 -> processingMs <= 40 && ageMs <= 90 + else -> false + } + headroomSamples = if (enoughHeadroom) headroomSamples + 1 else 0 + if (headroomSamples >= 8) { + permille = if (permille == 500) 600 else 800 + headroomSamples = 0 + } + return permille + } + + fun reset(): Int { + permille = 500 + processingMs = Double.NaN + headroomSamples = 0 + return permille + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/HandTrackingMetrics.kt b/app/src/main/java/com/droiddeck/launcher/glasses/HandTrackingMetrics.kt new file mode 100644 index 0000000000..bb02d28f23 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/HandTrackingMetrics.kt @@ -0,0 +1,107 @@ +package com.droiddeck.launcher.glasses + +internal enum class HandObservationOutcome { + ACCEPTED, DISABLED, CALIBRATION_REQUIRED, CLOCK_NOT_READY, HEAD_TRACKING_INVALID, + CAMERA_NOT_SYNCHRONIZED, STALE_OBSERVATION, INFERENCE_UNAVAILABLE, + NO_MATCHING_DETECTION, AMBIGUOUS_HANDEDNESS, ONE_CAMERA_ONLY, STEREO_REJECTED, + LANDMARK_COUNT_INVALID, PALM_LANDMARK_MISSING, PALM_WIDTH_INVALID, PALM_BASIS_INVALID, + PALM_MOTION_REJECTED, WRIST_LANDMARK_MISSING, WRIST_MOTION_REJECTED +} + +internal data class HandObservationDiagnostic( + val outcome: HandObservationOutcome, + val reconstructedPalmLandmarks: List<Int> = emptyList(), + val triggerEstimate: Float = 0f, + val triggerGeometryValid: Boolean = false, + val gripEstimate: Boolean = false, + val gripGeometryValid: Boolean = false, + val positionSource: String = "none" +) { + val accepted get() = outcome == HandObservationOutcome.ACCEPTED + val triggerValid get() = accepted && triggerGeometryValid + val gripValid get() = accepted && gripGeometryValid +} + +internal data class HandSideMetrics( + val observations: Long, + val accepted: Long, + val triggerValid: Long, + val gripValid: Long, + val triggerAboveClickThreshold: Long, + val triggerReleased: Long, + val gripPressed: Long, + val trackingLosses: Long, + val triggerLosses: Long, + val gripLosses: Long, + val maximumConsecutiveRejected: Long, + val outcomes: Map<HandObservationOutcome, Long> +) + +internal data class HandTrackingMetricSnapshot( + val processedPairs: Long, + val inferencePairs: Long, + val left: HandSideMetrics, + val right: HandSideMetrics +) + +internal class HandTrackingMetrics { + private class Side { + val outcomes = LongArray(HandObservationOutcome.entries.size) + var triggerValid = 0L + var gripValid = 0L + var triggerAboveClickThreshold = 0L + var triggerReleased = 0L + var gripPressed = 0L + var trackingLosses = 0L + var triggerLosses = 0L + var gripLosses = 0L + var consecutiveRejected = 0L + var maximumConsecutiveRejected = 0L + var wasAccepted = false + var wasTriggerValid = false + var wasGripValid = false + + fun observe(sample: HandObservationDiagnostic) { + outcomes[sample.outcome.ordinal]++ + if (sample.triggerValid) { + triggerValid++ + if (sample.triggerEstimate > 0.65f) triggerAboveClickThreshold++ + if (sample.triggerEstimate < 0.25f) triggerReleased++ + } + if (sample.gripValid) { + gripValid++ + if (sample.gripEstimate) gripPressed++ + } + if (wasAccepted && !sample.accepted) trackingLosses++ + if (wasTriggerValid && !sample.triggerValid) triggerLosses++ + if (wasGripValid && !sample.gripValid) gripLosses++ + consecutiveRejected = if (sample.accepted) 0 else consecutiveRejected + 1 + maximumConsecutiveRejected = maxOf(maximumConsecutiveRejected, consecutiveRejected) + wasAccepted = sample.accepted + wasTriggerValid = sample.triggerValid + wasGripValid = sample.gripValid + } + + fun snapshot() = HandSideMetrics(outcomes.sum(), outcomes[HandObservationOutcome.ACCEPTED.ordinal], + triggerValid, gripValid, triggerAboveClickThreshold, triggerReleased, gripPressed, trackingLosses, triggerLosses, gripLosses, + maximumConsecutiveRejected, HandObservationOutcome.entries.filter { outcomes[it.ordinal] > 0 } + .associateWith { outcomes[it.ordinal] }) + } + + private val sides = Array(2) { Side() } + private var lastSequence = 0L + private var processedPairs = 0L + private var inferencePairs = 0L + + fun observe(sequence: Long, inferred: Boolean, left: HandObservationDiagnostic, + right: HandObservationDiagnostic) { + if (sequence <= lastSequence) return + lastSequence = sequence + processedPairs++ + if (inferred) inferencePairs++ + sides[0].observe(left) + sides[1].observe(right) + } + + fun snapshot() = HandTrackingMetricSnapshot(processedPairs, inferencePairs, sides[0].snapshot(), sides[1].snapshot()) +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/JoyConFlowGate.kt b/app/src/main/java/com/droiddeck/launcher/glasses/JoyConFlowGate.kt new file mode 100644 index 0000000000..7b6c2ce083 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/JoyConFlowGate.kt @@ -0,0 +1,16 @@ +package com.droiddeck.launcher.glasses + +import kotlin.math.hypot + +internal object JoyConFlowGate { + const val MAX_SEED_AGE_NS = 750_000_000L + fun fresh(seed: Long, previous: Long, now: Long) = seed > 0 && previous > 0 && + now > previous && now - previous <= 200_000_000L && now - seed in 0..MAX_SEED_AGE_NS + + fun point(x: Double, y: Double, backX: Double, backY: Double, oldX: Double, oldY: Double, + error: Float, forward: Boolean, backward: Boolean, width: Int, height: Int): Boolean = + forward && backward && error.isFinite() && error in 0f..20f && + x.isFinite() && y.isFinite() && backX.isFinite() && backY.isFinite() && + x >= 3 && y >= 3 && x < width - 3 && y < height - 3 && + hypot(backX - oldX, backY - oldY) <= 1.5 && hypot(x - oldX, y - oldY) <= 100 +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/JoyConWristPosition.kt b/app/src/main/java/com/droiddeck/launcher/glasses/JoyConWristPosition.kt new file mode 100644 index 0000000000..74f3237eb6 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/JoyConWristPosition.kt @@ -0,0 +1,26 @@ +package com.droiddeck.launcher.glasses + +internal class JoyConWristPosition { + private var last: SpatialHand? = null + var lastOutcome = HandObservationOutcome.WRIST_LANDMARK_MISSING; private set + + fun reset() { last = null } + + private fun reject(outcome: HandObservationOutcome): SpatialHand? { + lastOutcome = outcome + return null + } + + fun estimate(points: List<SpatialVector?>, worldFromCamera: SpatialPose, time: Long): SpatialHand? { + val wrist = points.firstOrNull()?.takeIf(SpatialVector::finite) + ?: return reject(HandObservationOutcome.WRIST_LANDMARK_MISSING) + val pose = worldFromCamera * SpatialPose(wrist) + last?.let { old -> + val dt = (time - old.timeNs) / 1e9f + if (dt <= 0 || (dt < .2f && (pose.position - old.pose.position).length() > .08f + dt * 3f)) + return reject(HandObservationOutcome.WRIST_MOTION_REJECTED) + } + lastOutcome = HandObservationOutcome.ACCEPTED + return SpatialHand(pose, time, true, triggerValid = false, gripValid = false).also { last = it } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/LumaRgbDiagnostic.kt b/app/src/main/java/com/droiddeck/launcher/glasses/LumaRgbDiagnostic.kt new file mode 100644 index 0000000000..6a483a1a04 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/LumaRgbDiagnostic.kt @@ -0,0 +1,160 @@ +package com.droiddeck.launcher.glasses + +import android.Manifest +import android.app.PendingIntent +import android.app.Service +import android.content.Context +import android.content.Intent +import android.content.pm.PackageManager +import android.hardware.usb.UsbManager +import android.os.IBinder +import android.util.AtomicFile +import org.json.JSONObject +import java.io.File + +internal object LumaRgbDiagnostic { + private fun file(context: Context) = AtomicFile(File(context.filesDir, "spatial/rgb-diagnostic.json")) + private fun save(context: Context, value: JSONObject) { + val target = file(context) + target.baseFile.parentFile?.mkdirs() + val output = target.startWrite() + try { + output.write(value.toString().toByteArray(Charsets.UTF_8)) + target.finishWrite(output) + } catch (e: Exception) { target.failWrite(output); throw e } + } + + private fun expired(value: JSONObject, nowMs: Long) = nowMs-value.optLong("startedMs") !in + 0..value.optLong("timeoutMs",15_000).coerceIn(15_000,45_000) + + private fun workerAlive(context: Context, pid: Int): Boolean = pid > 0 && pid != android.os.Process.myPid() && + runCatching { + File("/proc/$pid/cmdline").readText().substringBefore('\u0000') == "${context.packageName}:rgb_diagnostic" + }.getOrDefault(false) + + internal fun resolveStatus(value: JSONObject, nowMs: Long, workerAlive: Boolean): JSONObject { + val pending = value.optString("state") == "capturing" + if (workerAlive && !expired(value,nowMs)) { + if (!pending) value.put("resultState",value.optString("state")).put("phase","finishing") + return value.put("state","capturing").put("busy",true) + } + if (pending && (expired(value,nowMs) || value.optInt("workerPid") > 0 && !workerAlive)) + value.put("state","failed").put("message","RGB capture worker stopped or timed out") + return value.put("busy",workerAlive || value.optString("state") == "capturing") + } + + fun status(context: Context): JSONObject = runCatching { + val value = JSONObject(file(context).readFully().toString(Charsets.UTF_8)) + val now = android.os.SystemClock.elapsedRealtime() + val pid = value.optInt("workerPid") + if (expired(value,now) && workerAlive(context,pid)) android.os.Process.killProcess(pid) + resolveStatus(value,now,workerAlive(context,pid)) + }.getOrElse { JSONObject().put("state", "idle") } + + @Synchronized fun capture(context: Context, transport: String = "sdk", width: Int = 640, height: Int = 480, + fps: Int = 30, durationMs: Int = 5000): JSONObject { + require(transport in listOf("sdk","uvc") && width in 160..1920 && height in 120..1080 && + fps in 5..30 && durationMs in 1000..30000) { "Invalid RGB capture options" } + val app = context.applicationContext + val old = status(app) + if (old.optBoolean("busy")) return old + val usb = app.getSystemService(Context.USB_SERVICE) as UsbManager + val device = usb.deviceList.values.singleOrNull { it.vendorId == 0x0c45 && it.productId == 0x636b } + fun state(value: String, message: String): JSONObject { + val result = JSONObject().put("state", value).put("message", message) + save(app, result) + return result + } + if (!Glasses.state.value.spatialConnected || device == null) + return state("unavailable", "Connect the Luma Ultra glasses and RGB camera") + if (app.checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) + return state("permission_required", "Grant Android camera permission to capture the RGB camera") + if (!usb.hasPermission(device)) { + val intent = Intent("${app.packageName}.RGB_DIAGNOSTIC_PERMISSION").setPackage(app.packageName) + val pending = PendingIntent.getBroadcast(app, 3, intent, PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT) + usb.requestPermission(device, pending) + return state("permission_required", "Approve the USB camera permission, then request the capture again") + } + val result = JSONObject().put("state", "capturing").put("startedMs", android.os.SystemClock.elapsedRealtime()) + .put("timeoutMs",durationMs+15000).put("transport",transport) + save(app, result) + try { app.startService(Intent(app, LumaRgbCaptureService::class.java).putExtra("device", device.deviceName) + .putExtra("transport",transport).putExtra("width",width).putExtra("height",height) + .putExtra("fps",fps).putExtra("durationMs",durationMs)) } + catch (e: Exception) { return state("failed", e.message ?: e.toString()) } + return result + } + + internal fun perform(context: Context, deviceName: String, transport: String, width: Int, height: Int, + fps: Int, durationMs: Int) { + val folder=File(context.filesDir,"spatial/rgb-captures/${System.nanoTime()}").apply { mkdirs() } + val startedMs=android.os.SystemClock.elapsedRealtime() + val workerPid=android.os.Process.myPid() + save(context,JSONObject().put("state","capturing").put("path",folder.path) + .put("startedMs",startedMs).put("timeoutMs",durationMs+15000) + .put("transport",transport).put("workerPid",workerPid)) + val result = try { + val direct=transport=="uvc" + check(if(direct) UvcRgbDiagnostic.available else VitureSdk.available) { "Requested RGB transport is unavailable" } + val usb = context.getSystemService(Context.USB_SERVICE) as UsbManager + val device = checkNotNull(usb.deviceList[deviceName]) { "RGB camera disconnected" } + check(device.vendorId == 0x0c45 && device.productId == 0x636b && usb.hasPermission(device)) + val connection = checkNotNull(usb.openDevice(device)) { "Could not open RGB camera" } + val metadata=LongArray(if(direct) 14 else 7) + val jpeg=try { + File(folder,"usb-descriptors.bin").writeBytes(connection.rawDescriptors) + android.os.ParcelFileDescriptor.open(File(folder,"usb.log"), + android.os.ParcelFileDescriptor.MODE_CREATE or android.os.ParcelFileDescriptor.MODE_TRUNCATE or + android.os.ParcelFileDescriptor.MODE_WRITE_ONLY).use { log -> + if(direct) UvcRgbDiagnostic.nativeSnapshot(connection.fileDescriptor,width,height,fps,durationMs,metadata,log.fd) + else VitureSdk.nativeRgbSnapshot(device.vendorId,device.productId,connection.fileDescriptor,metadata,log.fd) + } + } finally { connection.close() } + check(jpeg != null) { "RGB camera returned no frame ($transport status ${metadata[4]}, callbacks ${metadata[5]})" } + File(folder,"rgb.jpg").writeBytes(jpeg) + val info=JSONObject().put("state","completed").put("path",folder.path) + .put("width",metadata[0]).put("height",metadata[1]).put("timestampNs",metadata[2]) + .put("sequence",metadata[3]).put("callbacks",metadata[5]).put("source","Luma Ultra UVC RGB") + .put("receiptNs",metadata[6]).put("timingBasis","Host callback receipt; not exposure time") + .put("snapshotAcquired",true) + if(direct) { + val health=UvcStreamHealth.assess(metadata,fps,durationMs) + info.put("firstReceiptNs",metadata[7]).put("maxFrameGapMs",health.maximumGapMs) + .put("completeFrames",metadata[9]).put("invalidFrames",metadata[10]).put("bytes",metadata[11]) + .put("observationEndNs",metadata[12]).put("tailFrameAgeMs",metadata[13]/1e6) + .put("observationMs",health.observationMs).put("observedFps",health.observedFps) + .put("streamHealthy",health.healthy) + } + info + } catch (e: Exception) { JSONObject().put("state","failed").put("snapshotAcquired",false) + .put("message",e.message ?: e.toString()) } + result.put("path",folder.path).put("transport",transport).put("requestedWidth",width).put("requestedHeight",height) + .put("requestedFps",fps).put("durationMs",durationMs).put("workerPid",workerPid) + .put("startedMs",startedMs).put("timeoutMs",durationMs+15000) + if (transport == "uvc" && !result.has("streamHealthy")) result.put("streamHealthy",false) + File(folder,"frame.json").writeText(result.toString()) + save(context,result) + } +} + +class LumaRgbCaptureService : Service() { + private var running = false + override fun onBind(intent: Intent?): IBinder? = null + override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { + if (!running) { + running = true + Thread({ + try { LumaRgbDiagnostic.perform(this,intent?.getStringExtra("device") ?: "", + intent?.getStringExtra("transport") ?: "sdk",intent?.getIntExtra("width",640) ?: 640, + intent?.getIntExtra("height",480) ?: 480,intent?.getIntExtra("fps",30) ?: 30, + intent?.getIntExtra("durationMs",5000) ?: 5000) } + finally { + stopSelf() + // SDK 2.4.0 can crash while cancelling failed USB transfers; isolate each diagnostic. + android.os.Process.killProcess(android.os.Process.myPid()) + } + }, "luma-rgb-diagnostic").start() + } + return START_NOT_STICKY + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoCalibration.kt b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoCalibration.kt new file mode 100644 index 0000000000..8e579aee39 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoCalibration.kt @@ -0,0 +1,105 @@ +package com.droiddeck.launcher.glasses + +import android.content.SharedPreferences +import org.json.JSONArray +import org.json.JSONObject + +enum class CalibrationPhase { IDLE, SETTLING, COLLECTING, MOVING, TURN_OVER, SAVED, FAILED } + +data class GlassesCalibrationState( + val supported: Boolean = false, + val saved: Boolean = false, + val phase: CalibrationPhase = CalibrationPhase.IDLE, + val progress: Int = 0, +) { + val running: Boolean get() = phase in setOf(CalibrationPhase.SETTLING, CalibrationPhase.COLLECTING, + CalibrationPhase.MOVING, CalibrationPhase.TURN_OVER) +} + +internal data class RayNeoCalibration(val gyroBiasDps: Vec3, val level: Quaternion) { + fun encode(): String = JSONObject().put("version", 1) + .put("bias", JSONArray(listOf(gyroBiasDps.x, gyroBiasDps.y, gyroBiasDps.z))) + .put("level", JSONArray(listOf(level.w, level.x, level.y, level.z))).toString() + + companion object { + fun decode(json: String?): RayNeoCalibration? = runCatching { + val obj = JSONObject(json ?: return null) + require(obj.getInt("version") == 1) + val b = obj.getJSONArray("bias"); val q = obj.getJSONArray("level") + require(b.length() == 3 && q.length() == 4) + val bias = Vec3(b.getDouble(0).toFloat(), b.getDouble(1).toFloat(), b.getDouble(2).toFloat()) + val level = Quaternion(q.getDouble(0).toFloat(), q.getDouble(1).toFloat(), q.getDouble(2).toFloat(), q.getDouble(3).toFloat()) + require(listOf(bias.x, bias.y, bias.z, level.w, level.x, level.y, level.z).all { it.isFinite() }) + require(bias.length() <= 6f && level.w in 0.96f..1.001f) + val norm = level.w * level.w + level.x * level.x + level.y * level.y + level.z * level.z + require(norm in 0.99f..1.01f) + RayNeoCalibration(bias, level.normalized()) + }.getOrNull() + } +} + +internal class RayNeoCalibrationStore(private val prefs: SharedPreferences) { + companion object { + // GT and GT Max can share USB identity fields. Keep the non-Max mounting + // correction separate from existing Max profiles and their legacy keys. + fun profileKey(base: String, gtUsb: Boolean, boardId: Int): String = + if (gtUsb && boardId == RayNeoProtocol.BOARD_GT) "$base:gt-standard-v1" else base + } + // A serial isolates physical units. Devices without one share their model profile. + fun key(vid: Int, pid: Int, serial: String?, modelName: String = ""): String = + "rayneo-cal-v1:$vid:$pid:${serial?.takeIf { it.isNotBlank() } ?: "model:$modelName"}" + fun load(key: String): RayNeoCalibration? = RayNeoCalibration.decode(prefs.getString(key, null)) + fun save(key: String, value: RayNeoCalibration?) { + if (value == null) prefs.edit().remove(key).apply() + else prefs.edit().putString(key, value.encode()).apply() + } +} + +/** One upside-down stationary pose estimates gyro bias and tilt, never yaw or accelerometer scale. */ +internal class RayNeoCalibrationCollector(private val axes: RayNeoSensorAxes, private val beganMs: Long) { + var phase = CalibrationPhase.SETTLING; private set + var progress = 0; private set + private var windowStart = -1L + private var lastMs = -1L + private var count = 0 + private var meanA = Vec3(0f, 0f, 0f) + private var meanG = Vec3(0f, 0f, 0f) + private var aVariance = 0f + private var gVariance = 0f + + private fun clear(next: CalibrationPhase) { + phase = next; progress = 0; windowStart = -1; count = 0 + meanA = Vec3(0f, 0f, 0f); meanG = meanA; aVariance = 0f; gVariance = 0f + } + + fun update(sample: RayNeoSensorSample, nowMs: Long): RayNeoCalibration? { + if (phase == CalibrationPhase.FAILED || phase == CalibrationPhase.SAVED) return null + if (nowMs - beganMs >= 30_000) { clear(CalibrationPhase.FAILED); return null } + val gap = lastMs >= 0 && nowMs - lastMs > 250 + lastMs = nowMs + if (nowMs - beganMs < 3000) return null + val a = axes.map(Vec3(sample.accelMps2[0], sample.accelMps2[1], sample.accelMps2[2])) + val g = Vec3(sample.gyroDps[0], sample.gyroDps[1], sample.gyroDps[2]) + if (a.length() !in 8.5f..11f || !g.length().isFinite() || g.length() > 6f || gap) { + clear(CalibrationPhase.MOVING); return null + } + if (a.normalized().y > -0.94f) { clear(CalibrationPhase.TURN_OVER); return null } + if (windowStart < 0) windowStart = nowMs + phase = CalibrationPhase.COLLECTING + count++ + val da = a - meanA; val dg = g - meanG + meanA += da * (1f / count); meanG += dg * (1f / count) + fun dot(x: Vec3, y: Vec3) = x.x * y.x + x.y * y.y + x.z * y.z + aVariance += dot(da, a - meanA); gVariance += dot(dg, g - meanG) + if (count > 25 && (aVariance / count > 0.04f || gVariance / count > 2.25f)) { + clear(CalibrationPhase.MOVING); return null + } + progress = ((nowMs - windowStart) * 100 / 5000).toInt().coerceIn(0, 99) + if (nowMs - windowStart < 5000 || count < 200) return null + val down = meanA.normalized() + val axis = down.cross(Vec3(0f, -1f, 0f)) + val result = RayNeoCalibration(meanG, Quaternion(1f - down.y, axis.x, axis.y, axis.z).normalized()) + phase = CalibrationPhase.SAVED; progress = 100 + return result + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoLink.kt b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoLink.kt new file mode 100644 index 0000000000..c9770ed224 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoLink.kt @@ -0,0 +1,202 @@ +package com.droiddeck.launcher.glasses + +import android.hardware.usb.UsbDevice +import android.hardware.usb.UsbDeviceConnection +import android.hardware.usb.UsbManager +import android.os.SystemClock +import android.util.Log + +/** RayNeo command/response and IMU share one endpoint. Keep reads on a single worker. */ +internal class RayNeoLink private constructor( + private val connection: UsbDeviceConnection, + private val endpoints: RayNeoEndpointSelection, + private val listener: Listener, + private val gt: Boolean, + private val loadCalibration: (Int) -> RayNeoCalibration?, +) : GlassesLink { + interface Listener { + fun onReady() + fun onPose(raw: ByteArray, xyzw: FloatArray, timeNs: Long) + fun onLost() + fun onCalibration(revision: Long, phase: CalibrationPhase, progress: Int) {} + fun onCalibrationSaved(revision: Long, value: RayNeoCalibration?) {} + fun onDeviceInfo(boardId: Int, calibrationSaved: Boolean) {} + } + + @Volatile private var running = true + @Volatile override var ready = false + private set + @Volatile private var wantImu = false + private val writeLock = Any() + private val assembler = RayNeoPacketAssembler() + private val readBuffer = ByteArray(maxOf(endpoints.inEndpoint.maxPacketSize, 64)) + private var failures = 0 + private lateinit var worker: Thread + private var calibration: RayNeoCalibration? = null + private data class CalibrationCommand(val revision: Long, val action: Int, val saved: RayNeoCalibration? = null) + private val calibrationCommand = java.util.concurrent.atomic.AtomicReference<CalibrationCommand?>(null) + fun startCalibration(revision: Long) { calibrationCommand.set(CalibrationCommand(revision, 1)) } + fun cancelCalibration(revision: Long, saved: RayNeoCalibration?) { calibrationCommand.set(CalibrationCommand(revision, 2, saved)) } + fun resetCalibration(revision: Long) { calibrationCommand.set(CalibrationCommand(revision, 3)) } + override val hasImu = true + + override fun send(msgId: Int, payload: ByteArray): Boolean { + if (!running) return false + return when (msgId) { + VitureProtocol.MSG_IMU -> { + wantImu = payload.firstOrNull() == 1.toByte() + true + } + VitureProtocol.MSG_DISPLAY -> { + val mode = payload.firstOrNull()?.toInt()?.and(0xff) + ready && (mode == RayNeoProtocol.CMD_SWITCH_TO_3D || mode == RayNeoProtocol.CMD_SWITCH_TO_2D) && + command(mode) + } + // No VITURE brightness, volume, film, rate or raw command is sent to RayNeo. + else -> false + } + } + + private fun command(cmd: Int): Boolean = synchronized(writeLock) { + if (!running) return false + val packet = RayNeoProtocol.buildCommandPacket(cmd, 0, endpoints.outEndpoint.maxPacketSize) + connection.bulkTransfer(endpoints.outEndpoint, packet, packet.size, 250) == packet.size + } + + private fun read(timeoutMs: Int): ByteArray? { + val deadline = SystemClock.elapsedRealtime() + timeoutMs + while (running && SystemClock.elapsedRealtime() < deadline) { + assembler.nextPacket()?.let { return it } + val began = SystemClock.elapsedRealtime() + val count = connection.bulkTransfer(endpoints.inEndpoint, readBuffer, readBuffer.size, 50) + if (count > 0) { + failures = 0 + assembler.append(readBuffer, count) + } else if (count < 0 && SystemClock.elapsedRealtime() - began < 25) { + if (++failures >= 50) error("RayNeo USB link lost") + SystemClock.sleep(5) + } + } + return null + } + + private fun response(cmd: Int, timeoutMs: Int): RayNeoPacket.Response? { + val deadline = SystemClock.elapsedRealtime() + timeoutMs + while (running && SystemClock.elapsedRealtime() < deadline) { + val packet = read(100)?.let(RayNeoProtocol::classifyPacket) + if (packet is RayNeoPacket.Response && packet.cmd == cmd) return packet + } + return null + } + + private fun run() { + var streaming = false + try { + check(command(RayNeoProtocol.CMD_ACQUIRE_DEVICE_INFO)) { "RayNeo device-info write failed" } + val info = response(RayNeoProtocol.CMD_ACQUIRE_DEVICE_INFO, 2500) + ?.let { RayNeoProtocol.parseDeviceInfo(it.raw) } ?: error("RayNeo device-info timed out") + val profile = RayNeoSensorProfile.forDevice(gt, info.boardId) + val rotation = profile.rotationXDeg + val gtMaxAxes = profile.gtMaxAxes + calibration = loadCalibration(info.boardId) + listener.onDeviceInfo(info.boardId, calibration != null) + Log.i("RayNeoLink", "Device board=0x%02x gt=%s".format(info.boardId, gt)) + var filter = RayNeoOrientationFilter(rotation, gtMaxAxes, calibration) + var collector: RayNeoCalibrationCollector? = null + var calibrationRevision = 0L + var lastCalibrationUpdate = 0L + var warmupUntil = 0L + var lastSensor = 0L + ready = true + listener.onReady() + while (running) { + val request = calibrationCommand.getAndSet(null) + if (request != null) calibrationRevision = request.revision + when (request?.action) { + 1 -> collector = RayNeoCalibrationCollector(RayNeoSensorAxes(rotation, gtMaxAxes), SystemClock.elapsedRealtime()) + 2 -> { + collector = null + if (calibration != request.saved) { + calibration = request.saved + filter = RayNeoOrientationFilter(rotation, gtMaxAxes, calibration) + } + listener.onCalibration(calibrationRevision, CalibrationPhase.IDLE, 0) + } + 3 -> { + collector = null; calibration = null + filter = RayNeoOrientationFilter(rotation, gtMaxAxes) + listener.onCalibrationSaved(calibrationRevision, null) + listener.onCalibration(calibrationRevision, CalibrationPhase.IDLE, 0) + } + } + if (wantImu != streaming) { + val cmd = if (wantImu) RayNeoProtocol.CMD_OPEN_IMU else RayNeoProtocol.CMD_CLOSE_IMU + check(command(cmd) && response(cmd, 1500) != null) { "RayNeo IMU command timed out" } + streaming = cmd == RayNeoProtocol.CMD_OPEN_IMU + filter = RayNeoOrientationFilter(rotation, gtMaxAxes, calibration) + lastSensor = SystemClock.elapsedRealtime() + warmupUntil = lastSensor + 2000 + } + val raw = read(100) + if (streaming && SystemClock.elapsedRealtime() - lastSensor > 4000) error("RayNeo IMU stream stalled") + if (raw == null) continue + val packet = RayNeoProtocol.classifyPacket(raw) + if (streaming && packet is RayNeoPacket.Sensor) { + lastSensor = SystemClock.elapsedRealtime() + collector?.let { c -> + val result = c.update(packet.sample, lastSensor) + if (result != null && calibrationCommand.get() == null) { + calibration = result + filter = RayNeoOrientationFilter(rotation, gtMaxAxes, result) + warmupUntil = lastSensor + 2000 + listener.onCalibrationSaved(calibrationRevision, result) + } + if (lastSensor - lastCalibrationUpdate >= 200 || result != null || c.phase == CalibrationPhase.FAILED) { + listener.onCalibration(calibrationRevision, c.phase, c.progress) + lastCalibrationUpdate = lastSensor + } + if (result != null || c.phase == CalibrationPhase.FAILED) collector = null + } + val wxyz = filter.update(packet.sample) + if (wantImu && collector == null && lastSensor >= warmupUntil) { + // Normalize basis and component order at the hardware boundary. + listener.onPose(raw, RayNeoOrientationFilter.glassesPose(wxyz), + SystemClock.elapsedRealtimeNanos()) + } + } + } + } catch (e: Exception) { + if (running) Log.w("RayNeoLink", "RayNeo stream failed", e) + } finally { + ready = false + if (running) listener.onLost() + } + } + + override fun close() { + synchronized(writeLock) { + if (!running) return + // Best effort: stop the sensor before releasing the claimed interface. + if (ready) runCatching { command(RayNeoProtocol.CMD_CLOSE_IMU) } + running = false + } + if (Thread.currentThread() !== worker) worker.join(500) + runCatching { connection.releaseInterface(endpoints.usbInterface) } + connection.close() + } + + companion object { + fun open(usb: UsbManager, device: UsbDevice, listener: Listener, loadCalibration: (Int) -> RayNeoCalibration? = { null }): RayNeoLink? { + val endpoints = RayNeoProtocol.selectEndpoints(device) ?: return null + val conn = usb.openDevice(device) ?: return null + if (!conn.claimInterface(endpoints.usbInterface, true)) { + conn.close() + return null + } + return RayNeoLink(conn, endpoints, listener, RayNeoProtocol.isGt(device.vendorId, device.productId), loadCalibration).also { link -> + link.worker = Thread({ link.run() }, "rayneo-imu").apply { isDaemon = true } + link.worker.start() + } + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoModel.kt b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoModel.kt new file mode 100644 index 0000000000..ccb19f7445 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoModel.kt @@ -0,0 +1,42 @@ +package com.droiddeck.launcher.glasses + +object RayNeoModel { + private val modelName = Regex("(?i)(ray\\s*neo|tcl).*\\b(air|gt)(?=\\b|[0-9])") + + fun isVendor(vid: Int) = vid == RayNeoProtocol.VENDOR_ID || + vid == RayNeoProtocol.GT_VENDOR_ID || vid == 0x22d9 + + fun model(vid: Int, pid: Int, name: String?): GlassesModel? { + if (!isVendor(vid)) return null + // GT's identity is confirmed by verncat's SDK; do not claim other products + // from that vendor just because their name resembles a supported model. + val gt = RayNeoProtocol.isGt(vid, pid) + if (vid == RayNeoProtocol.GT_VENDOR_ID && !gt) return null + if (!(vid == RayNeoProtocol.VENDOR_ID && pid == RayNeoProtocol.PRODUCT_ID) && + !gt && + !modelName.containsMatchIn(name.orEmpty())) return null + return Model(name?.trim()?.takeIf { modelName.containsMatchIn(it) } + ?: if (gt) "RayNeo GT series" else "RayNeo Air") + } + + fun isDisplay(name: String): Boolean = + name.contains("rayneo", ignoreCase = true) || name.contains("ray neo", ignoreCase = true) || + modelName.containsMatchIn(name) + + // Observed on GT Max: Android exposes an unbranded EDID monitor name. + // Match its product metadata, not every display called SmartGlasses/TCL. + fun isDisplayProduct(name: String?, manufacturer: String?, productId: String?): Boolean = + name?.trim().equals("SmartGlasses", ignoreCase = true) && + manufacturer.equals("TCL", ignoreCase = true) && productId == "980" + + private class Model(override val name: String) : GlassesModel { + override val controllable = true + override val brightnessMax = 0 + override val volumeMax = 0 + override val diagonalFovDeg = 46f // Conservative existing default, not a calibrated model profile. + override val sbs90 = false + override fun mode(hz: Int, sbs: Boolean) = + if (sbs) RayNeoProtocol.CMD_SWITCH_TO_3D else RayNeoProtocol.CMD_SWITCH_TO_2D + override fun modeForStep(step: Int): Int? = null + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoOrientationFilter.kt b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoOrientationFilter.kt new file mode 100644 index 0000000000..96bff85009 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoOrientationFilter.kt @@ -0,0 +1,190 @@ +// Adapted from informalTechCode/RayNeo-Air-Series-3DoF-Scaffold (Apache-2.0). +// See docs/third-party/rayneo/. Returns scaffold quaternions in (w, x, y, z) order. +package com.droiddeck.launcher.glasses + +import kotlin.math.cos +import kotlin.math.sin +import kotlin.math.sqrt + +internal data class Vec3(val x: Float, val y: Float, val z: Float) { + fun length(): Float = sqrt(x * x + y * y + z * z) + + fun normalized(): Vec3 { + val n = length() + if (n < 1e-6f) { + return Vec3(0f, 0f, 0f) + } + return Vec3(x / n, y / n, z / n) + } + + fun cross(other: Vec3): Vec3 { + return Vec3( + y * other.z - z * other.y, + z * other.x - x * other.z, + x * other.y - y * other.x + ) + } + + operator fun plus(other: Vec3): Vec3 = Vec3(x + other.x, y + other.y, z + other.z) + operator fun minus(other: Vec3): Vec3 = Vec3(x - other.x, y - other.y, z - other.z) + operator fun times(scale: Float): Vec3 = Vec3(x * scale, y * scale, z * scale) +} + +internal data class Quaternion(val w: Float, val x: Float, val y: Float, val z: Float) { + operator fun times(other: Quaternion): Quaternion { + return Quaternion( + w = w * other.w - x * other.x - y * other.y - z * other.z, + x = w * other.x + x * other.w + y * other.z - z * other.y, + y = w * other.y - x * other.z + y * other.w + z * other.x, + z = w * other.z + x * other.y - y * other.x + z * other.w + ) + } + + operator fun times(scale: Float): Quaternion { + return Quaternion(w * scale, x * scale, y * scale, z * scale) + } + + fun normalized(): Quaternion { + val n = sqrt(w * w + x * x + y * y + z * z) + if (n < 1e-6f) { + return IDENTITY + } + return Quaternion(w / n, x / n, y / n, z / n) + } + + fun conjugate(): Quaternion = Quaternion(w, -x, -y, -z) + + fun rotate(v: Vec3): Vec3 { + val qv = Quaternion(0f, v.x, v.y, v.z) + val r = this * qv * conjugate() + return Vec3(r.x, r.y, r.z) + } + + fun integrateBodyRate(omegaRadPerSec: Vec3, dtSec: Float): Quaternion { + val omega = Quaternion(0f, omegaRadPerSec.x, omegaRadPerSec.y, omegaRadPerSec.z) + val qDot = (this * omega) * 0.5f + return Quaternion( + w + qDot.w * dtSec, + x + qDot.x * dtSec, + y + qDot.y * dtSec, + z + qDot.z * dtSec + ) + } + + companion object { + val IDENTITY = Quaternion(1f, 0f, 0f, 0f) + + fun fromAxisAngle(axis: Vec3, angleRad: Float): Quaternion { + val nAxis = axis.normalized() + val half = angleRad * 0.5f + val s = sin(half) + val c = cos(half) + return Quaternion(c, nAxis.x * s, nAxis.y * s, nAxis.z * s).normalized() + } + } +} + +internal data class RayNeoSensorProfile(val rotationXDeg: Float, val gtMaxAxes: Boolean) { + companion object { + fun forDevice(gtUsb: Boolean, boardId: Int) = when { + gtUsb && boardId == RayNeoProtocol.BOARD_GT -> RayNeoSensorProfile(-25f, false) + gtUsb -> RayNeoSensorProfile(35f, true) + boardId == RayNeoProtocol.BOARD_AIR_4_PRO -> RayNeoSensorProfile(-20f, false) + else -> RayNeoSensorProfile(0f, false) + } + } +} + +internal class RayNeoSensorAxes(imuRotationXDeg: Float, private val gt: Boolean) { + private val rotation = Quaternion.fromAxisAngle(Vec3(1f, 0f, 0f), + Math.toRadians((if (gt) 35f else imuRotationXDeg).toDouble()).toFloat()) + + fun map(v: Vec3): Vec3 = rotation.rotate(if (gt) Vec3(-v.y, v.z, -v.x) else v) +} + +internal class RayNeoOrientationFilter( + imuRotationXDeg: Float, + gt: Boolean = false, + private val calibration: RayNeoCalibration? = null, +) { + private val worldUp = Vec3(0f, 1f, 0f) + private val accelGain = 1.5f + private val dpsToRad = (Math.PI.toFloat() / 180f) + private val gravityMps2 = 9.81f + private val stationaryAccelTol = 1.25f + private val stationaryGyroRadPerSec = 0.18f + private val gyroBiasUpdateHz = 0.5f + private val axes = RayNeoSensorAxes(imuRotationXDeg, gt) + + private var q = Quaternion.IDENTITY + private var gravityInitialized = false + private var gyroBias = Vec3(0f, 0f, 0f) + private var lastTick100us: Long = -1L + private var lastRealtimeNs: Long = 0L + + companion object { + /** Scaffold: right +X, up +Y, back +Z. VITURE: right -Y, up +Z, back -X. + * Conjugate by HeadPose.GLASSES_AXES before entering the unchanged VITURE pose path. + * This is a basis conversion, not a projection or seated-origin adjustment. + */ + fun glassesPose(wxyz: FloatArray): FloatArray = + floatArrayOf(-wxyz[3], -wxyz[1], wxyz[2], wxyz[0]) + } + + fun update(sample: RayNeoSensorSample): FloatArray { + var accel = Vec3(sample.accelMps2[0], sample.accelMps2[1], sample.accelMps2[2]) + var gyro = Vec3(sample.gyroDps[0], sample.gyroDps[1], sample.gyroDps[2]) + calibration?.let { gyro -= it.gyroBiasDps } + accel = axes.map(accel) + gyro = axes.map(gyro) * dpsToRad + calibration?.let { + accel = it.level.rotate(accel) + gyro = it.level.rotate(gyro) + } + + val nowNs = System.nanoTime() + var dtSec = 0.01f + if (lastTick100us >= 0L && sample.deviceTick100us != lastTick100us) { + dtSec = (((sample.deviceTick100us - lastTick100us) and 0xffffffffL).toFloat() * 1e-4f) + } else if (lastRealtimeNs > 0L && nowNs > lastRealtimeNs) { + dtSec = ((nowNs - lastRealtimeNs).toFloat() * 1e-9f) + } + if (dtSec < 0.001f || dtSec > 0.1f) { + dtSec = 0.01f + } + lastTick100us = sample.deviceTick100us + lastRealtimeNs = nowNs + + val accelNorm = accel.length() + val stationary = + kotlin.math.abs(accelNorm - gravityMps2) < stationaryAccelTol && + gyro.length() < stationaryGyroRadPerSec + if (stationary) { + val alpha = minOf(1f, dtSec * gyroBiasUpdateHz) + gyroBias = gyroBias * (1f - alpha) + gyro * alpha + } + gyro -= gyroBias + + if (accelNorm > 1e-3f) { + val measuredUp = accel.normalized() + if (!gravityInitialized) { + // Align gravity before publishing the first pose. Starting at + // identity and settling after recenter can rotate the horizon. + val axis = measuredUp.cross(worldUp) + q = if (measuredUp.y < -0.9999f) { + Quaternion.fromAxisAngle(Vec3(1f, 0f, 0f), Math.PI.toFloat()) + } else { + Quaternion(1f + measuredUp.y, axis.x, axis.y, axis.z).normalized() + } + gravityInitialized = true + } + val predictedUp = q.conjugate().rotate(worldUp).normalized() + // q maps body to world: measured x predicted reduces gravity error. + val correction = measuredUp.cross(predictedUp) + gyro += correction * accelGain + } + + q = q.integrateBodyRate(gyro, dtSec).normalized() + return floatArrayOf(q.w, q.x, q.y, q.z) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoProtocol.kt b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoProtocol.kt new file mode 100644 index 0000000000..9f65b04dfc --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/RayNeoProtocol.kt @@ -0,0 +1,270 @@ +// Adapted from informalTechCode/RayNeo-Air-Series-3DoF-Scaffold (Apache-2.0). +// See docs/third-party/rayneo/ for license and protocol attribution. +package com.droiddeck.launcher.glasses + +import android.hardware.usb.UsbConstants +import android.hardware.usb.UsbDevice +import android.hardware.usb.UsbEndpoint +import android.hardware.usb.UsbInterface +import java.util.Arrays + +private fun Byte.u(): Int = toInt() and 0xFF + +data class RayNeoSensorSample( + val accelMps2: FloatArray, + val gyroDps: FloatArray, + val temperatureC: Float, + val magnet: FloatArray, + val proximity: Float, + val light: Float, + val deviceTick100us: Long +) + +data class RayNeoDeviceInfo( + val boardId: Int, + val sideBySideEnabled: Boolean +) + +sealed interface RayNeoPacket { + data class Sensor(val sample: RayNeoSensorSample) : RayNeoPacket + data class Response(val cmd: Int, val raw: ByteArray) : RayNeoPacket + data object Unknown : RayNeoPacket +} + +data class RayNeoEndpointSelection( + val usbInterface: UsbInterface, + val inEndpoint: UsbEndpoint, + val outEndpoint: UsbEndpoint +) + +object RayNeoProtocol { + const val VENDOR_ID = 0x1BBB + const val PRODUCT_ID = 0xAF50 + // verncat/RayNeo-Air-3S-Pro-OpenVR PR #3 (MIT), tested on GT hardware. + const val GT_VENDOR_ID = 0x3941 + private const val GT_CONTROL_INTERFACE = 5 + + fun isGt(vid: Int, pid: Int) = vid == GT_VENDOR_ID && pid == PRODUCT_ID + + const val BOARD_AIR_4_PRO = 0x3A + const val BOARD_GT = 0x40 // Observed on the user's non-Max GT. + + const val PKT_MAGIC = 0x99 + const val PKT_SENSOR = 0x65 + const val PKT_RESPONSE = 0xC8 + + const val CMD_ACQUIRE_DEVICE_INFO = 0 + const val CMD_OPEN_IMU = 1 + const val CMD_CLOSE_IMU = 2 + const val CMD_SWITCH_TO_3D = 6 + const val CMD_SWITCH_TO_2D = 7 + + private const val RESPONSE_CMD_OFFSET = 8 + + private const val ACCEL_OFFSET = 4 + private const val GYRO_OFFSET = 16 + private const val TEMP_OFFSET = 28 + private const val MAG_X_OFFSET = 32 + private const val TICK_OFFSET = 40 + private const val PSENSOR_OFFSET = 44 + private const val LSENSOR_OFFSET = 48 + private const val MAG_Z_OFFSET = 52 + + private const val DEVINFO_BOARD_ID_OFFSET = 21 + private const val DEVINFO_SIDE_BY_SIDE_OFFSET = 43 + + fun buildCommandPacket(cmd: Int, arg: Int, packetSize: Int): ByteArray { + val len = maxOf(packetSize, 64) + val pkt = ByteArray(len) + pkt[0] = 0x66 + pkt[1] = cmd.toByte() + pkt[2] = arg.toByte() + return pkt + } + + fun classifyPacket(raw: ByteArray): RayNeoPacket { + if (raw.size < 4 || raw[0].u() != PKT_MAGIC || raw[2].u() != raw.size) { + return RayNeoPacket.Unknown + } + + return when (raw[1].u()) { + PKT_SENSOR -> { + val sample = parseSensorSample(raw) + if (sample != null) RayNeoPacket.Sensor(sample) else RayNeoPacket.Unknown + } + PKT_RESPONSE -> { + if (raw.size <= RESPONSE_CMD_OFFSET) { + RayNeoPacket.Unknown + } else { + RayNeoPacket.Response(raw[RESPONSE_CMD_OFFSET].u(), raw) + } + } + else -> RayNeoPacket.Unknown + } + } + + fun parseDeviceInfo(raw: ByteArray): RayNeoDeviceInfo? { + if (raw.size <= DEVINFO_SIDE_BY_SIDE_OFFSET || raw[2].u() != raw.size || raw[0].u() != PKT_MAGIC || + raw[1].u() != PKT_RESPONSE || raw[RESPONSE_CMD_OFFSET].u() != CMD_ACQUIRE_DEVICE_INFO) { + return null + } + + return RayNeoDeviceInfo( + boardId = raw[DEVINFO_BOARD_ID_OFFSET].u(), + sideBySideEnabled = raw[DEVINFO_SIDE_BY_SIDE_OFFSET].u() != 0 + ) + } + + fun selectEndpoints(device: UsbDevice): RayNeoEndpointSelection? { + val gt = isGt(device.vendorId, device.productId) + val gtCandidates = mutableListOf<RayNeoEndpointSelection>() + var fallback: RayNeoEndpointSelection? = null + + for (i in 0 until device.interfaceCount) { + val usbInterface = device.getInterface(i) + var inEndpoint: UsbEndpoint? = null + var outEndpoint: UsbEndpoint? = null + + for (j in 0 until usbInterface.endpointCount) { + val endpoint = usbInterface.getEndpoint(j) + if (endpoint.type != UsbConstants.USB_ENDPOINT_XFER_INT && + endpoint.type != UsbConstants.USB_ENDPOINT_XFER_BULK) { + continue + } + // Exclude small button reports from GT's protocol transport. + if (gt && endpoint.maxPacketSize < 64) continue + + if (endpoint.direction == UsbConstants.USB_DIR_IN && inEndpoint == null) { + inEndpoint = endpoint + } else if (endpoint.direction == UsbConstants.USB_DIR_OUT && outEndpoint == null) { + outEndpoint = endpoint + } + } + + if (inEndpoint != null && outEndpoint != null) { + val selection = RayNeoEndpointSelection(usbInterface, inEndpoint, outEndpoint) + if (gt) { + if (usbInterface.id == GT_CONTROL_INTERFACE) return selection + gtCandidates += selection + continue + } + if (inEndpoint.type == UsbConstants.USB_ENDPOINT_XFER_INT && + outEndpoint.type == UsbConstants.USB_ENDPOINT_XFER_INT + ) { + return selection + } + if (fallback == null) { + fallback = selection + } + } + } + + // Interface numbers can change with firmware. Use a unique protocol-sized + // pair when interface 5 is absent, never an arbitrary composite interface. + return if (gt) gtCandidates.singleOrNull() else fallback + } + + private fun parseSensorSample(raw: ByteArray): RayNeoSensorSample? { + if (raw.size < MAG_Z_OFFSET + 4 || + (ACCEL_OFFSET until TEMP_OFFSET step 4).any { !readF32LE(raw, it).isFinite() }) { + return null + } + + return RayNeoSensorSample( + accelMps2 = floatArrayOf( + readF32LE(raw, ACCEL_OFFSET + 0), + readF32LE(raw, ACCEL_OFFSET + 4), + readF32LE(raw, ACCEL_OFFSET + 8) + ), + gyroDps = floatArrayOf( + readF32LE(raw, GYRO_OFFSET + 0), + readF32LE(raw, GYRO_OFFSET + 4), + readF32LE(raw, GYRO_OFFSET + 8) + ), + temperatureC = readF32LE(raw, TEMP_OFFSET), + magnet = floatArrayOf( + readF32LE(raw, MAG_X_OFFSET), + readF32LE(raw, MAG_X_OFFSET + 4), + readF32LE(raw, MAG_Z_OFFSET) + ), + proximity = readF32LE(raw, PSENSOR_OFFSET), + light = readF32LE(raw, LSENSOR_OFFSET), + deviceTick100us = readU32LE(raw, TICK_OFFSET).toLong() and 0xffffffffL + ) + } + + private fun readU32LE(raw: ByteArray, offset: Int): Int { + val b0 = raw[offset].u() + val b1 = raw[offset + 1].u() + val b2 = raw[offset + 2].u() + val b3 = raw[offset + 3].u() + return b0 or (b1 shl 8) or (b2 shl 16) or (b3 shl 24) + } + + private fun readF32LE(raw: ByteArray, offset: Int): Float { + return Float.fromBits(readU32LE(raw, offset)) + } +} + +class RayNeoPacketAssembler { + private val stash = ByteArray(4096) + private var len = 0 + + fun append(data: ByteArray, count: Int) { + require(count in 0..data.size) + if (count <= 0) { + return + } + + if (count >= stash.size || len + count > stash.size) { + len = 0 + } + + val copyLen = minOf(count, stash.size - len) + System.arraycopy(data, 0, stash, len, copyLen) + len += copyLen + } + + fun nextPacket(): ByteArray? { + var offset = 0 + while (offset + 4 <= len) { + if (stash[offset].u() != RayNeoProtocol.PKT_MAGIC) { + offset++ + continue + } + + val packetLen = stash[offset + 2].u() + if (packetLen < 4 || packetLen > 64 || + stash[offset + 1].u() !in listOf(RayNeoProtocol.PKT_SENSOR, RayNeoProtocol.PKT_RESPONSE)) { + offset++ + continue + } + if (offset + packetLen > len) { + break + } + + val packet = Arrays.copyOfRange(stash, offset, offset + packetLen) + compact(offset + packetLen) + return packet + } + + if (offset > 0) { + compact(offset) + } + return null + } + + private fun compact(consumed: Int) { + if (consumed <= 0) { + return + } + + if (consumed >= len) { + len = 0 + return + } + + System.arraycopy(stash, consumed, stash, 0, len - consumed) + len -= consumed + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/SpatialMeasurements.kt b/app/src/main/java/com/droiddeck/launcher/glasses/SpatialMeasurements.kt new file mode 100644 index 0000000000..bacb781baf --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/SpatialMeasurements.kt @@ -0,0 +1,36 @@ +package com.droiddeck.launcher.glasses + +import com.droiddeck.launcher.R +import java.util.Locale +import kotlin.math.roundToInt + +internal object SpatialMeasurements { + fun height(centimeters: Int): String { + val tenths = (centimeters / 2.54 * 10).roundToInt() + return String.format(Locale.getDefault(), "%d cm (%d ft %.1f in)", centimeters, tenths / 120, tenths % 120 / 10.0) + } + + fun distance(meters: Float): String = String.format( + Locale.getDefault(), "%.1f m (%.1f ft)", meters, meters / 0.3048f) + + fun validation(meters: Float): String = String.format( + Locale.getDefault(), "%.1f cm (%.2f in)", meters * 100, meters / 0.0254f) +} + +internal enum class CalibrationDistance(val meters: Float, val labelRes: Int) { + INCHES_12(0.3048f, R.string.spatial_distance_12in), + CENTIMETERS_30(0.3f, R.string.spatial_distance_30cm), + INCHES_20(0.508f, R.string.spatial_distance_20in), + CENTIMETERS_50(0.5f, R.string.spatial_distance_50cm), +} + +internal data class SpatialCalibrationProgress( + val collecting: Boolean = false, + val views: Int = 0, + val fitted: Boolean = false, + val solving: Boolean = false, + val capturing: Boolean = false, + val captureMessage: String? = null, + val validating: Boolean = false, + val validationMessage: String? = null, +) diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/SpatialPose.kt b/app/src/main/java/com/droiddeck/launcher/glasses/SpatialPose.kt new file mode 100644 index 0000000000..6d037fd0c2 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/SpatialPose.kt @@ -0,0 +1,278 @@ +package com.droiddeck.launcher.glasses + +import kotlin.math.* + +data class SpatialVector(val x: Float = 0f, val y: Float = 0f, val z: Float = 0f) { + operator fun plus(b: SpatialVector) = SpatialVector(x + b.x, y + b.y, z + b.z) + operator fun minus(b: SpatialVector) = SpatialVector(x - b.x, y - b.y, z - b.z) + operator fun times(s: Float) = SpatialVector(x * s, y * s, z * s) + fun dot(b: SpatialVector) = x * b.x + y * b.y + z * b.z + fun cross(b: SpatialVector) = SpatialVector(y * b.z - z * b.y, z * b.x - x * b.z, x * b.y - y * b.x) + fun length() = sqrt(dot(this)) + fun normalized() = length().takeIf { it > 1e-6f }?.let { this * (1f / it) } + fun finite() = x.isFinite() && y.isFinite() && z.isFinite() + fun array() = floatArrayOf(x, y, z) +} + +data class SpatialRotation(val x: Float = 0f, val y: Float = 0f, val z: Float = 0f, val w: Float = 1f) { + fun normalized(): SpatialRotation? { + val n = sqrt(x*x + y*y + z*z + w*w) + return if (n.isFinite() && n in 0.5f..1.5f) SpatialRotation(x/n, y/n, z/n, w/n) else null + } + fun inverse() = SpatialRotation(-x, -y, -z, w) + operator fun times(b: SpatialRotation) = SpatialRotation( + w*b.x + x*b.w + y*b.z - z*b.y, w*b.y - x*b.z + y*b.w + z*b.x, + w*b.z + x*b.y - y*b.x + z*b.w, w*b.w - x*b.x - y*b.y - z*b.z) + fun apply(v: SpatialVector): SpatialVector { + val q = SpatialVector(x, y, z) + val t = q.cross(v) * 2f + return v + t * w + q.cross(t) + } + fun matrix() = floatArrayOf( + 1-2*(y*y+z*z), 2*(x*y-z*w), 2*(x*z+y*w), + 2*(x*y+z*w), 1-2*(x*x+z*z), 2*(y*z-x*w), + 2*(x*z-y*w), 2*(y*z+x*w), 1-2*(x*x+y*y)) + fun yaw(): SpatialRotation { + val forward = apply(SpatialVector(0f, 0f, -1f)) + val a = if (forward.x*forward.x + forward.z*forward.z < 1e-8f) { + val right = apply(SpatialVector(x = 1f)) + atan2(-right.z, right.x) / 2 + } else atan2(-forward.x, -forward.z) / 2 + return SpatialRotation(y = sin(a), w = cos(a)) + } + companion object { + fun fromBasis(right: SpatialVector, up: SpatialVector, back: SpatialVector): SpatialRotation { + val m = floatArrayOf(right.x, up.x, back.x, right.y, up.y, back.y, right.z, up.z, back.z) + val trace = m[0] + m[4] + m[8] + val q = if (trace > 0) { + val s = sqrt(trace + 1) * 2 + SpatialRotation((m[7]-m[5])/s, (m[2]-m[6])/s, (m[3]-m[1])/s, s/4) + } else { + val i = if (m[0] > m[4] && m[0] > m[8]) 0 else if (m[4] > m[8]) 1 else 2 + val j = (i+1)%3; val k = (i+2)%3 + val s = sqrt(1 + m[i*3+i] - m[j*3+j] - m[k*3+k]) * 2 + val v = FloatArray(3) + v[i] = s/4; v[j] = (m[j*3+i]+m[i*3+j])/s; v[k] = (m[k*3+i]+m[i*3+k])/s + SpatialRotation(v[0], v[1], v[2], (m[k*3+j]-m[j*3+k])/s) + } + return q.normalized() ?: SpatialRotation() + } + } +} + +data class SpatialPose(val position: SpatialVector = SpatialVector(), val rotation: SpatialRotation = SpatialRotation()) { + fun inverse(): SpatialPose { + val r = rotation.inverse() + return SpatialPose(r.apply(position * -1f), r) + } + operator fun times(b: SpatialPose) = SpatialPose(position + rotation.apply(b.position), rotation * b.rotation) + companion object { + fun fromSdk(v: FloatArray): SpatialPose? { + if (v.size != 7 || v.any { !it.isFinite() }) return null + val q = SpatialRotation(v[4], v[5], v[6], v[3]).normalized() ?: return null + return SpatialPose(SpatialVector(v[0], v[1], v[2]), q) + } + } +} + +data class SpatialSample(val pose: SpatialPose, val timeNs: Long, val generation: Long, val valid: Boolean) +data class SpatialHand(val pose: SpatialPose = SpatialPose(), val timeNs: Long = 0, val valid: Boolean = false, + val trigger: Float = 0f, val grip: Boolean = false, + val triggerValid: Boolean = valid, val gripValid: Boolean = valid) { + fun flags() = if (!valid) 0 else 1 or (if (triggerValid) 2 else 0) or (if (gripValid) 4 else 0) +} + +class SpatialSession { + var generation: Long = 0; private set + var originGeneration: Long = 0; private set + var trackingFrameGeneration: Long = 0; private set + var needsRecenter = false; private set + val recenterPending: Boolean get() = pendingRecenter != null + private var pendingRecenter: Boolean? = null + private var recoveryAnchor: SpatialSample? = null + private var head: SpatialSample? = null + private var lastStable: SpatialSample? = null + private var vrOrigin: SpatialPose? = null + private var screenOrigin: SpatialPose? = null + private var hands = arrayOf(SpatialHand(), SpatialHand()) + private val gestureEpochs = IntArray(4) + private val gestureEligible = BooleanArray(4) + private var inputsAfterNs = 0L + private var height = 1.6f + private val history = ArrayDeque<SpatialSample>() + + @Synchronized fun reset(connection: Long, eyeHeight: Float, requireSetup: Boolean = false) { + generation = connection; height = eyeHeight.takeIf { it.isFinite() }?.coerceIn(0.5f, 2.5f) ?: 1.6f + originGeneration++; trackingFrameGeneration++; head = null; lastStable = null; vrOrigin = null; screenOrigin = null + history.clear() + pendingRecenter = null; recoveryAnchor = null + hands = arrayOf(SpatialHand(), SpatialHand()); needsRecenter = requireSetup + gestureEpochs.fill(0); gestureEligible.fill(false) + inputsAfterNs = 0L + } + @Synchronized fun accept(sample: SpatialSample): Boolean { + if (sample.generation != generation || sample.timeNs <= (head?.timeNs ?: 0)) return false + val previous = head + if (previous != null && sample.timeNs-previous.timeNs > 100_000_000L) invalidateHeadInputs(sample.timeNs) + val rotation = sample.pose.rotation.normalized() + val current = sample.copy(pose = sample.pose.copy(rotation = rotation ?: SpatialRotation()), + valid = sample.valid && sample.pose.position.finite() && rotation != null) + head = current + if (!current.valid) { + recoveryAnchor = null; invalidateHeadInputs(current.timeNs); return false + } + lastStable?.let { + val d = (current.pose.position - it.pose.position).length() + val a = current.pose.rotation; val b = it.pose.rotation + if (!needsRecenter && (d > 0.5f || abs(a.x*b.x+a.y*b.y+a.z*b.z+a.w*b.w) < 0.9238795f)) { + needsRecenter = true; trackingFrameGeneration++ + } + } + pendingRecenter?.let { screen -> + val anchor = recoveryAnchor + val a = current.pose.rotation; val b = anchor?.pose?.rotation ?: a + if (anchor == null || previous?.valid != true || current.timeNs-previous.timeNs > 100_000_000L || + (current.pose.position-anchor.pose.position).length() > 0.05f || + abs(a.x*b.x+a.y*b.y+a.z*b.z+a.w*b.w) < 0.9961947f) { + recoveryAnchor = current + } else if (current.timeNs-anchor.timeNs >= 250_000_000L) { + applyRecenter(screen, current) + } + } + if (needsRecenter || recenterPending) { invalidateHeadInputs(current.timeNs); return false } + lastStable = current + history.addLast(current) + while (history.size > 512) history.removeFirst() + if (vrOrigin == null) vrOrigin = SpatialPose(current.pose.position - SpatialVector(y = height), current.pose.rotation.yaw()) + if (screenOrigin == null) screenOrigin = current.pose + return true + } + @Synchronized fun setFloor(eyeHeight: Float, now: Long = System.nanoTime()) { + if (!eyeHeight.isFinite()) return + height = eyeHeight.coerceIn(0.5f, 2.5f) + val p = head?.takeIf { it.valid && now-it.timeNs in 0..100_000_000L }?.pose ?: return + vrOrigin = SpatialPose(p.position - SpatialVector(y = height), p.rotation.yaw()) + if (needsRecenter) { history.clear(); screenOrigin = p } + lastStable = head; needsRecenter = false; pendingRecenter = null; recoveryAnchor = null + originGeneration++; invalidateHeadInputs(now) + } + @Synchronized fun recenter(screen: Boolean, now: Long = System.nanoTime()) { + val current = head?.takeIf { it.valid && now-it.timeNs in 0..100_000_000L } + if (current == null || needsRecenter || recenterPending) { + if (pendingRecenter == null) recoveryAnchor = null + pendingRecenter = screen + invalidateHeadInputs(now) + return + } + applyRecenter(screen, current) + } + private fun applyRecenter(screen: Boolean, current: SpatialSample) { + val p = current.pose + if (vrOrigin == null) vrOrigin = SpatialPose(p.position - SpatialVector(y = height), p.rotation.yaw()) + if (screenOrigin == null) screenOrigin = p + if (needsRecenter) { + vrOrigin = SpatialPose(p.position - SpatialVector(y = height), p.rotation.yaw()) + screenOrigin = p; originGeneration++; history.clear() + } + if (screen) screenOrigin = p else { + val floor = vrOrigin?.position?.y ?: (p.position.y-height) + vrOrigin = SpatialPose(SpatialVector(p.position.x, floor, p.position.z), p.rotation.yaw()) + originGeneration++ + } + lastStable = current; needsRecenter = false; pendingRecenter = null; recoveryAnchor = null + invalidateHeadInputs(current.timeNs) + } + @Synchronized fun view(screen: Boolean): SpatialPose? = lastStable?.pose?.let { + (if (screen) screenOrigin else vrOrigin)?.inverse()?.times(it) + } + @Synchronized fun latest() = head + @Synchronized fun poseAt(time: Long, connection: Long): SpatialPose? { + if (connection != generation || needsRecenter || recenterPending) return null + return history.minByOrNull { abs(it.timeNs-time) }?.takeIf { abs(it.timeNs-time) <= 12_000_000L }?.pose + } + @Synchronized fun valid(now: Long) = !needsRecenter && !recenterPending && head?.let { it.valid && now-it.timeNs in 0..100_000_000L } == true + @Synchronized internal fun isCurrentTrackingFrame(connection: Long, frame: Long, clock: () -> Long = System::nanoTime): Boolean = + connection == generation && frame == trackingFrameGeneration && valid(clock()) + @Synchronized fun setHands(connection: Long, left: SpatialHand, right: SpatialHand) { + if (connection != generation || needsRecenter || recenterPending) return + val next = arrayOf(left, right) + for (index in 0..1) { + val oldTime = hands[index].timeNs + val hand = next[index] + if (oldTime > 0 && (hand.timeNs < oldTime || hand.timeNs-oldTime > HandObservation.MAX_AGE_NS)) + invalidateInputs(index) + updateInputs(index, hand, head?.valid == true && usableHand(hand) && hand.timeNs > inputsAfterNs) + } + hands = next + } + @Synchronized fun hand(index: Int, now: Long): SpatialHand { + val h = hands[index] + val origin = vrOrigin + val current = origin != null && usableHand(h) && valid(now) && now-h.timeNs in 0..HandObservation.MAX_AGE_NS + updateInputs(index, h, current && h.timeNs > inputsAfterNs) + return if (origin == null) SpatialHand() else h.copy(pose = origin.inverse() * h.pose, valid = current, + triggerValid = h.triggerValid && gestureEligible[index*2], gripValid = h.gripValid && gestureEligible[index*2+1]) + } + @Synchronized fun inputEpochs(): Int { + var packed = 0 + for (index in gestureEpochs.indices) packed = packed or (gestureEpochs[index] shl (index*8)) + return packed + } + private fun usableHand(hand: SpatialHand): Boolean { + val q = hand.pose.rotation + val norm = q.x*q.x+q.y*q.y+q.z*q.z+q.w*q.w + return hand.valid && hand.timeNs > 0 && hand.pose.position.finite() && norm > 0.99f && norm < 1.01f + } + private fun updateInputs(index: Int, hand: SpatialHand, valid: Boolean) { + updateInput(index*2, valid && hand.triggerValid && hand.trigger.isFinite() && hand.trigger in 0f..1f) + updateInput(index*2+1, valid && hand.gripValid) + } + private fun updateInput(index: Int, eligible: Boolean) { + if (gestureEligible[index] && !eligible) gestureEpochs[index] = (gestureEpochs[index]+1) and 0xff + gestureEligible[index] = eligible + } + private fun invalidateInputs(index: Int? = null) { + if (index == null) for (gesture in gestureEligible.indices) updateInput(gesture, false) + else { updateInput(index*2, false); updateInput(index*2+1, false) } + } + private fun invalidateHeadInputs(time: Long) { + inputsAfterNs = maxOf(inputsAfterNs, time) + hands = arrayOf(SpatialHand(), SpatialHand()) + invalidateInputs() + } +} + +internal data class HandObservation(val timeNs: Long, val connection: Long, val trackingFrame: Long) { + fun headPose(session: SpatialSession, cameraSynchronized: Boolean, now: Long? = null): SpatialPose? = synchronized(session) { + val checkedAt=now ?: System.nanoTime() + if (!cameraSynchronized || timeNs <= 0 || checkedAt-timeNs !in 0..MAX_AGE_NS || + !session.isCurrentTrackingFrame(connection, trackingFrame) { checkedAt }) null + else session.poseAt(timeNs, connection) + } + companion object { + const val MAX_AGE_NS = 200_000_000L + } +} + +internal class CameraClock { + private val offsets = ArrayDeque<Long>() + private var lastSource = 0L + private var lastReceipt = 0L + fun map(source: Long, receipt: Long): Long? { + if (source <= 0 || receipt <= 0) { + offsets.clear();lastSource=0;lastReceipt=0 + return null + } + val offset = receipt-source + val skipped = lastSource > 0 && source-lastSource > 200_000_000L + val inconsistent = skipped && offsets.minOrNull()?.let { abs(offset-it) > 20_000_000L } == true + if (source <= lastSource || receipt <= lastReceipt || inconsistent) offsets.clear() + lastSource = source;lastReceipt = receipt + offsets.addLast(offset) + while (offsets.size > 64) offsets.removeFirst() + if (offsets.size < 16) return null + val sorted = offsets.sorted() + if (sorted[sorted.size*9/10]-sorted.first() > 20_000_000L) return null + return source+sorted.first() + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/SpatialTracking.kt b/app/src/main/java/com/droiddeck/launcher/glasses/SpatialTracking.kt new file mode 100644 index 0000000000..42b476d4fe --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/SpatialTracking.kt @@ -0,0 +1,208 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import com.droiddeck.launcher.R +import com.droiddeck.launcher.wayland.WaylandCompositor +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.update +import java.nio.ByteBuffer +import java.nio.ByteOrder + +data class SpatialTrackingStatus(val message: String = "", val calibration: Boolean = false, + val frames: Long = 0, val dropped: Long = 0, val processingMs: Float = 0f, + val frameAgeMs: Float = -1f, val cameraHz: Float = 0f, val synchronized: Boolean = false, + val trackingValid: Boolean = false, val needsRecenter: Boolean = false, val recenterPending: Boolean = false, + val handStatus: String = "", val headFresh: Boolean = false, + val cameraFrameDivisor: Int = 1, val rateLimitedFrames: Long = 0, val cameraCopyPermille: Int = 1000, + val calibrationSource: String = "none", val calibrationVerified: Boolean = false) + +object SpatialTracking { + val session = SpatialSession() + private val mutableStatus = MutableStateFlow(SpatialTrackingStatus()) + val status = mutableStatus.asStateFlow() + @Volatile var enabled = false; private set + @Volatile var handsEnabled = false; private set + private var context: Context? = null + private var engine: StereoHandEngine? = null + private var diagnosticsEnabled = false + private val buffer = ByteBuffer.allocateDirect(176).order(ByteOrder.LITTLE_ENDIAN) + private var lastStatus = 0L + @Volatile private var publisherAttached = false + @Volatile private var spatialSelected = false + private var outputUsesGlasses = true + private var handsSelected = false + private var steadyAimSelected = false + @Volatile private var joyConsSelected = false + internal val joyConsEnabled get() = enabled && joyConsSelected + private var hadSpatialSession = false + internal val selected: Boolean get() = spatialSelected + private fun text(id: Int) = context?.getString(id).orEmpty() + fun initialize(app: Context) { + context = app.applicationContext + mutableStatus.update { it.copy( + message = it.message.ifEmpty { text(R.string.spatial_disabled) }, + handStatus = it.handStatus.ifEmpty { text(R.string.spatial_hands_off) }, + ) } + } + fun attachPublisher(path: String) { + publisherAttached = WaylandCompositor.nativeSetSpatialFile(path) + publish(System.nanoTime()) + } + + internal fun connect(token: Long, generation: Long, identity: String?, spatial: Boolean, eyeHeight: Float, hands: Boolean, + joyCons: Boolean = false, steadyAim: Boolean = false) { + engine?.close(); engine = null + enabled = spatial; handsEnabled = spatial && (hands || joyCons) + spatialSelected = spatial; handsSelected = spatial && hands && !joyCons + joyConsSelected = spatial && joyCons + steadyAimSelected = steadyAim + session.reset(generation, eyeHeight, spatial && hadSpatialSession) + hadSpatialSession = hadSpatialSession || spatial + if (spatial) context?.let { engine = StereoHandEngine(it, token, generation, identity) } + mutableStatus.value = SpatialTrackingStatus(if (spatial) text(R.string.spatial_wait_stable) else text(R.string.spatial_disabled)) + engine?.setEnabled(handsEnabled) + engine?.diagnostics(diagnosticsEnabled) + publish(System.nanoTime()) + } + internal fun disconnect() { + enabled = false; handsEnabled = false + session.reset(session.generation + 1, 1.6f) + publish(System.nanoTime()) + engine?.close(); engine = null + mutableStatus.value = SpatialTrackingStatus(text(R.string.spatial_disconnected)) + publish(System.nanoTime()) + } + @Synchronized internal fun useLegacyTracking() { + spatialSelected = false; handsSelected = false; joyConsSelected = false + publish(System.nanoTime()) + } + @Synchronized internal fun setOutputUsesGlasses(on: Boolean) { + if (outputUsesGlasses == on) return + outputUsesGlasses = on + publish(System.nanoTime()) + } + @Synchronized internal fun accept(values: FloatArray, time: Long, generation: Long, valid: Boolean) { + if (!enabled || generation != session.generation) return + val pose = SpatialPose.fromSdk(values) + session.accept(SpatialSample(pose ?: SpatialPose(), time, generation, valid && pose != null)) + publish(time) + if (time-lastStatus > 250_000_000L) { + lastStatus = time + refreshStatus(time) + } + } + @Synchronized fun refreshStatus(now: Long? = null) { + val checkedAt = now ?: System.nanoTime() + val valid = session.valid(checkedAt) + val pending = session.recenterPending + val recenter = session.needsRecenter + val fresh = session.latest()?.let { it.valid && checkedAt-it.timeNs in 0..100_000_000L } == true + mutableStatus.update { it.copy(trackingValid = valid, needsRecenter = recenter, recenterPending = pending, headFresh = fresh, + handStatus = engine?.handStatus?.message ?: text(R.string.spatial_hands_off), + message = when { + !enabled -> text(R.string.spatial_tracking_off) + pending -> text(R.string.spatial_recenter_pending) + !fresh -> text(R.string.spatial_tracking_lost) + recenter -> text(R.string.spatial_origin_changed) + else -> text(R.string.spatial_active) + }) } + } + @Synchronized fun setControllers(hands: Boolean, joyCons: Boolean) { + handsSelected = hands && !joyCons + joyConsSelected = joyCons + handsEnabled = enabled && (hands || joyCons) + session.setHands(session.generation, SpatialHand(), SpatialHand()) + engine?.setEnabled(handsEnabled) + publish(System.nanoTime()) + } + @Synchronized fun setSteadyHandAim(on: Boolean) { + steadyAimSelected = on + publish(System.nanoTime()) + } + fun setFloor(height: Float) { session.setFloor(height); refreshStatus(); publish(System.nanoTime()) } + fun recenter(screen: Boolean) { session.recenter(screen); refreshStatus(); publish(System.nanoTime()) } + fun diagnostics(on: Boolean) { diagnosticsEnabled = on; engine?.diagnostics(on) } + fun calibrationStart() { engine?.startCalibration() } + fun calibrationCapture() { engine?.captureCalibration() } + fun calibrationSolve() { engine?.solveCalibration() } + fun calibrationValidate(distanceMeters: Float) { engine?.validateCalibration(distanceMeters) } + fun captureDiagnostic() { engine?.recordDiagnostic() } + fun setGpu(gpu: Boolean) { engine?.setGpu(gpu) } + fun setHandModel(lite: Boolean) { engine?.setModel(lite) } + fun setHandHalfRate(halfRate: Boolean) { engine?.setHalfRate(halfRate) } + fun setHandCpuParallel(parallel: Boolean) { engine?.setCpuParallel(parallel) } + fun setHandAdaptiveInput(adaptive: Boolean) { engine?.setAdaptiveInput(adaptive) } + fun setHandScheduledTracking(scheduled: Boolean) { engine?.setScheduledTracking(scheduled) } + internal fun handLiteEnabled() = (engine?.model ?: HandModel.DEFAULT) == HandModel.LITE + internal fun handHalfRateEnabled() = engine?.halfRateInput ?: true + internal fun handAdaptiveInputEnabled() = engine?.adaptiveInput ?: true + fun benchmarkSavedCapture(id: String) { checkNotNull(engine) { "Connect glasses and enable positional tracking" }.benchmarkSavedCapture(id) } + internal fun diagnosticFrame() = engine?.preview + internal fun diagnosticMessage() = engine?.message ?: text(R.string.spatial_connect_hint) + internal fun calibrationProgress() = engine?.calibrationProgress ?: SpatialCalibrationProgress() + internal fun gpuEnabled() = engine?.gpu ?: false + fun diagnosticStatus(): org.json.JSONObject { + val now=System.nanoTime();val sample=session.latest();val state=status.value;val progress=calibrationProgress() + return org.json.JSONObject().put("enabled",enabled).put("valid",session.valid(now)).put("needsRecenter",session.needsRecenter) + .put("joyConTracking",joyConsSelected) + .put("steadyHandAim",handsSelected && steadyAimSelected) + .put("positionEstimator",if (joyConsSelected) "joycon-wrist" else "full-palm") + .put("recenterPending",session.recenterPending) + .put("handMaxAgeMs",HandObservation.MAX_AGE_NS / 1_000_000) + .put("handGpuEnabled",gpuEnabled()).put("handInferenceBackend",engine?.inferenceBackend ?: "not initialized") + .put("handModel",(engine?.model ?: HandModel.DEFAULT).name).put("handHalfRate",handHalfRateEnabled()) + .put("handImagePreprocessing",HandImageBuffer.PREPROCESSING) + .put("handLensCorrection",engine?.lensCorrection ?: "none") + .put("handCpuParallel",engine?.cpuParallel ?: true) + .put("handAdaptiveInput",handAdaptiveInputEnabled()).put("handScheduledTracking",engine?.scheduledTracking ?: true) + .put("handInputRatePermille",engine?.inputRatePermille ?: 500) + .put("handBenchmark",engine?.benchmark) + .put("calibrationViews",progress.views).put("calibrationCollecting",progress.collecting) + .put("capturePending",progress.capturing).put("captureMessage",progress.captureMessage) + .put("calibrationFitted",progress.fitted).put("validationPending",progress.validating).put("validationMessage",progress.validationMessage) + .put("calibrationIdentityAvailable",engine?.hasStableIdentity == true).put("handTracking",engine?.handStatus?.json()) + .put("calibrationSource",engine?.calibrationSource ?: "none").put("calibrationVerified",engine?.calibrationVerified == true) + .put("generation",session.generation).put("origin",session.originGeneration) + .put("ageMs",sample?.let { (now-it.timeNs)/1e6 } ?: -1.0) + .put("position",sample?.pose?.position?.array()?.let { org.json.JSONArray(it.toList()) }) + .put("message",state.message).put("camera",diagnosticMessage()).put("frames",state.frames).put("dropped",state.dropped) + .put("processingMs",state.processingMs.toDouble()).put("calibrated",state.calibration) + .put("frameAgeMs",state.frameAgeMs.toDouble()).put("cameraHz",state.cameraHz.toDouble()).put("synchronized",state.synchronized) + .put("cameraFrameDivisor",state.cameraFrameDivisor).put("rateLimitedFrames",state.rateLimitedFrames) + .put("cameraCopyPermille",state.cameraCopyPermille) + .put("leftValid",session.hand(0,now).valid).put("rightValid",session.hand(1,now).valid) + } + internal fun statistics(calibrated: Boolean, frames: Long, dropped: Long, ms: Float, age: Float, hz: Float, synchronized: Boolean, + frameDivisor: Int, rateLimited: Long, copyPermille: Int = 1000) { + mutableStatus.update { it.copy(calibration = calibrated, frames = frames, dropped = dropped, processingMs = ms, + frameAgeMs=age,cameraHz=hz,synchronized=synchronized,cameraFrameDivisor=frameDivisor, + rateLimitedFrames=rateLimited,cameraCopyPermille=copyPermille, + calibrationSource=engine?.calibrationSource ?: "none",calibrationVerified=engine?.calibrationVerified == true) } + } + @Synchronized internal fun publish(now: Long) { + synchronized(session) { + val hands = Array(2) { session.hand(it, now) } + buffer.clear() + buffer.putInt(0x53504444).putInt(4).putInt(176).putInt(0) + buffer.putLong(session.generation).putLong(session.originGeneration) + val modes = (if (spatialSelected) 1 else 0) or (if (handsSelected) 2 else 0) or + (if (joyConsSelected) 4 else 0) or (if (handsSelected && steadyAimSelected) 8 else 0) + buffer.putInt(if (outputUsesGlasses) modes else 0).putInt(session.inputEpochs()) + putPose(session.view(false) ?: SpatialPose(), session.latest()?.timeNs ?: 0, if(session.valid(now)) 1 else 0) + for (i in 0..1) { + val hand = hands[i] + putPose(hand.pose, hand.timeNs, hand.flags()) + buffer.putFloat(if (hand.valid && hand.triggerValid) hand.trigger else 0f) + .putInt(if (hand.valid && hand.gripValid && hand.grip) 1 else 0) + } + buffer.flip() + if (publisherAttached) WaylandCompositor.nativePublishSpatial(buffer) + } + } + private fun putPose(p: SpatialPose, time: Long, flags: Int) { + buffer.putLong(time).putFloat(p.position.x).putFloat(p.position.y).putFloat(p.position.z) + buffer.putFloat(p.rotation.x).putFloat(p.rotation.y).putFloat(p.rotation.z).putFloat(p.rotation.w) + buffer.putInt(flags) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/SteamVrSpatialGate.kt b/app/src/main/java/com/droiddeck/launcher/glasses/SteamVrSpatialGate.kt new file mode 100644 index 0000000000..848541b1ad --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/SteamVrSpatialGate.kt @@ -0,0 +1,32 @@ +package com.droiddeck.launcher.glasses + +internal class SteamVrSpatialGate(private val settleMs: Long = 2_000) { + private var waiting = false + private var running = false + var deadline: Long? = null + private set + + fun prepare(): Boolean { + if (running || waiting) return false + waiting = true + deadline = null + return true + } + + fun setRunning(on: Boolean, now: Long): Boolean { + if (running == on) return false + running = on + waiting = false + deadline = if (on) now + settleMs else null + return true + } + + fun cancel() { + waiting = false + running = false + deadline = null + } + + fun spatialEnabled(requested: Boolean, now: Long) = + requested && !waiting && (deadline?.let { now >= it } ?: true) +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/StereoCalibration.kt b/app/src/main/java/com/droiddeck/launcher/glasses/StereoCalibration.kt new file mode 100644 index 0000000000..027f0b92e1 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/StereoCalibration.kt @@ -0,0 +1,300 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import com.droiddeck.launcher.R +import org.json.JSONArray +import org.json.JSONObject +import org.opencv.calib3d.Calib3d +import org.opencv.core.* +import org.opencv.objdetect.CharucoBoard +import org.opencv.objdetect.CharucoDetector +import org.opencv.objdetect.Objdetect +import org.opencv.imgproc.Imgproc +import java.io.File +import kotlin.math.* + +internal data class BoardObservation(val objects: Mat, val left: Mat, val right: Mat, val head: SpatialPose) + +internal class CalibrationAlignmentException(context: Context, val deviation: Float) : IllegalArgumentException( + context.getString(R.string.spatial_alignment_error, SpatialMeasurements.validation(deviation))) + +internal class StereoCalibration(val identity: String, val width: Int, val height: Int, val fisheye: Boolean, + val k1: Mat, val d1: Mat, val k2: Mat, val d2: Mat, val r: Mat, val t: Mat, + val cameraToHead: SpatialPose, val error: Double, var verified: Boolean = false, + val bundledBase: Boolean = false) : AutoCloseable { + val readyForTracking get() = verified || bundledBase + val source get() = if (bundledBase && !verified) "luma-ultra-base" else "device" + private val p1 = Mat.zeros(3, 4, CvType.CV_64F) + private val p2 = Mat.zeros(3, 4, CvType.CV_64F) + private val undistortionMaps = Array(2) { arrayOf(Mat(),Mat()) } + init { + val a = Mat.eye(3, 4, CvType.CV_64F) + val b = Mat.zeros(3, 4, CvType.CV_64F) + r.copyTo(b.colRange(0, 3)); t.copyTo(b.col(3)) + val empty = Mat() + Core.gemm(k1, a, 1.0, empty, 0.0, p1); Core.gemm(k2, b, 1.0, empty, 0.0, p2) + a.release(); b.release(); empty.release() + } + fun undistort(src: Mat, dst: Mat, right: Boolean) { + val k = if (right) k2 else k1; val d = if (right) d2 else d1 + val maps=undistortionMaps[if(right) 1 else 0] + if(maps[0].empty()) { + val identity=Mat.eye(3,3,CvType.CV_64F) + try { + if(fisheye) Calib3d.fisheye_initUndistortRectifyMap(k,d,identity,k,src.size(),CvType.CV_16SC2,maps[0],maps[1]) + else Calib3d.initUndistortRectifyMap(k,d,identity,k,src.size(),CvType.CV_16SC2,maps[0],maps[1]) + } finally { identity.release() } + } + Imgproc.remap(src,dst,maps[0],maps[1],Imgproc.INTER_LINEAR) + } + fun triangulateRaw(left: List<Point>, right: List<Point>): List<SpatialVector>? { + val points = triangulateLandmarksRaw(left,right) ?: return null + return if(points.any { it == null }) null else points.filterNotNull() + } + fun triangulateLandmarksRaw(left: List<Point>, right: List<Point>): List<SpatialVector?>? { + if (left.size != right.size || left.isEmpty()) return null + val l=MatOfPoint2f(*left.toTypedArray()); val r=MatOfPoint2f(*right.toTypedArray()) + try { return triangulateRawPoints(l,r) } finally { l.release();r.release() } + } + fun triangulateRaw(left: Mat, right: Mat): List<SpatialVector>? { + val points = triangulateRawPoints(left,right) ?: return null + return if(points.any { it == null }) null else points.filterNotNull() + } + private fun triangulateRawPoints(left: Mat, right: Mat): List<SpatialVector?>? { + val l=MatOfPoint2f(); val r=MatOfPoint2f(); val identity=Mat.eye(3,3,CvType.CV_64F) + try { + if (fisheye) { + Calib3d.fisheye_undistortPoints(left,l,k1,d1,identity,k1) + Calib3d.fisheye_undistortPoints(right,r,k2,d2,identity,k2) + } else { + val criteria=TermCriteria(TermCriteria.COUNT+TermCriteria.EPS,50,1e-8) + Calib3d.undistortPointsIter(left,l,k1,d1,identity,k1,criteria) + Calib3d.undistortPointsIter(right,r,k2,d2,identity,k2,criteria) + } + return triangulatePoints(l.toList(),r.toList()) + } finally { l.release(); r.release(); identity.release() } + } + fun triangulate(left: List<Point>, right: List<Point>): List<SpatialVector>? { + val points = triangulatePoints(left,right) ?: return null + return if(points.any { it == null }) null else points.filterNotNull() + } + private fun triangulatePoints(left: List<Point>, right: List<Point>): List<SpatialVector?>? { + if (left.size != right.size || left.isEmpty()) return null + val a = Mat(2, left.size, CvType.CV_64F); val b = Mat(2, right.size, CvType.CV_64F); val out = Mat() + try { + a.put(0, 0, *left.map { it.x }.toDoubleArray()); a.put(1, 0, *left.map { it.y }.toDoubleArray()) + b.put(0, 0, *right.map { it.x }.toDoubleArray()); b.put(1, 0, *right.map { it.y }.toDoubleArray()) + Calib3d.triangulatePoints(p1, p2, a, b, out) + val projection1 = DoubleArray(12); val projection2 = DoubleArray(12) + p1.get(0,0,projection1); p2.get(0,0,projection2) + return left.indices.map { i -> + StereoPointValidation.reconstruct(DoubleArray(4) { out.get(it,i)[0] }, + doubleArrayOf(left[i].x,left[i].y),doubleArrayOf(right[i].x,right[i].y),projection1,projection2) + } + } finally { a.release(); b.release(); out.release() } + } + fun save(file: File) { + fun mat(m: Mat) = JSONArray((0 until m.rows()).flatMap { row -> (0 until m.cols()).map { m.get(row,it)[0] } }) + val j = JSONObject().put("version",1).put("identity",identity).put("width",width).put("height",height) + .put("fisheye",fisheye).put("error",error).put("verified",verified) + for ((name,value) in listOf("k1" to k1,"d1" to d1,"k2" to k2,"d2" to d2,"r" to r,"t" to t)) + j.put(name, JSONObject().put("rows",value.rows()).put("cols",value.cols()).put("data",mat(value))) + val p = cameraToHead.position; val q = cameraToHead.rotation + j.put("cameraToHead",JSONArray(listOf(p.x,p.y,p.z,q.w,q.x,q.y,q.z))) + file.parentFile?.mkdirs() + val tmp = File(file.parentFile,file.name+".tmp"); tmp.writeText(j.toString()) + java.nio.file.Files.move(tmp.toPath(),file.toPath(),java.nio.file.StandardCopyOption.REPLACE_EXISTING) + } + override fun close() { (listOf(k1,d1,k2,d2,r,t,p1,p2)+undistortionMaps.flatMap { it.toList() }).forEach { it.release() } } + companion object { + fun load(file: File, identity: String, width: Int, height: Int): StereoCalibration? = + runCatching { StereoCalibrationProfile.parse(file.readText(), identity, width, height)?.let(::fromProfile) }.getOrNull() + + fun fromProfile(profile: StereoCalibrationProfile): StereoCalibration { + val matrices = mutableListOf<Mat>() + try { + profile.matrices.forEach { data -> + val matrix = Mat(data.rows, data.columns, CvType.CV_64F) + matrices.add(matrix) + matrix.put(0, 0, *data.values) + } + return StereoCalibration(profile.identity, profile.width, profile.height, profile.fisheye, + matrices[0], matrices[1], matrices[2], matrices[3], matrices[4], matrices[5], + profile.cameraToHead, profile.error, profile.verified, profile.bundledBase) + } catch (e: Exception) { + matrices.forEach(Mat::release) + throw e + } + } + } +} + +internal class StereoCalibrator(private val context: Context) : AutoCloseable { + val board = CharucoBoard(Size(5.0,7.0),0.03f,0.022f,Objdetect.getPredefinedDictionary(Objdetect.DICT_4X4_50)) + private val detector = CharucoDetector(board) + val observations = mutableListOf<BoardObservation>() + var commonCorners: Int = 0; private set + fun detect(left: Mat, right: Mat, head: SpatialPose): BoardObservation? { + val lc=Mat(); val li=Mat(); val rc=Mat(); val ri=Mat() + try { + detector.detectBoard(left,lc,li); detector.detectBoard(right,rc,ri) + val l=(0 until li.rows()).associate { li.get(it,0)[0].toInt() to lc.get(it,0) } + val r=(0 until ri.rows()).associate { ri.get(it,0)[0].toInt() to rc.get(it,0) } + val ids=l.keys.intersect(r.keys).sorted() + commonCorners = ids.size + if (ids.size<12) return null + val objects=MatOfPoint3f(*ids.map { Point3((it%4+1)*0.03,(it/4+1)*0.03,0.0) }.toTypedArray()) + return BoardObservation(objects,MatOfPoint2f(*ids.map { Point(l[it]!![0],l[it]!![1]) }.toTypedArray()), + MatOfPoint2f(*ids.map { Point(r[it]!![0],r[it]!![1]) }.toTypedArray()),head) + } finally { listOf(lc,li,rc,ri).forEach { it.release() } } + } + fun solve(identity: String,width: Int,height: Int): StereoCalibration { + require(observations.size>=24) { context.getString(R.string.spatial_need_views) } + val initial=observations.first().head.rotation + val axes=observations.map { initial.inverse()*it.head.rotation }.map { SpatialVector(it.x,it.y,it.z) } + require(axes.any { a -> axes.any { b -> a.cross(b).length()>0.02f } }) { context.getString(R.string.spatial_need_rotation) } + val training=observations.filterIndexed { i,_ -> i%5!=0 }; val held=observations.filterIndexed { i,_ -> i%5==0 } + val failures = mutableListOf<Pair<String, Exception>>() + val candidates=listOf(false,true).mapNotNull { fish -> + try { fit(identity,width,height,fish,training,held) } + catch (e: Exception) { + val model = if (fish) "Fisheye" else "Pinhole" + android.util.Log.w("StereoCalibration", "$model calibration failed", e) + failures.add(model to e) + null + } + } + val best=candidates.minByOrNull { it.error } ?: run { + val alignment=failures.map { it.second }.filterIsInstance<CalibrationAlignmentException>().minByOrNull { it.deviation } + val reason=alignment?.message ?: failures.joinToString(" ") { (model,e) -> + "$model: ${e.message?.substringBefore('\n') ?: e.javaClass.simpleName}" + } + error(context.getString(R.string.spatial_calibration_error, reason)) + } + candidates.filter { it !== best }.forEach { it.close() } + if(best.error>2.0) { best.close(); error(context.getString(R.string.spatial_reprojection_error, best.error)) } + return best + } + private fun fit(identity: String,w: Int,h: Int,fish: Boolean,train: List<BoardObservation>,held: List<BoardObservation>): StereoCalibration { + val k1=Mat.eye(3,3,CvType.CV_64F); val k2=Mat.eye(3,3,CvType.CV_64F) + val d1=Mat.zeros(if(fish) 4 else 5,1,CvType.CV_64F); val d2=d1.clone() + val r=Mat(); val t=Mat(); val objects=train.map { it.objects }; val size=Size(w.toDouble(),h.toDouble()) + fun intrinsic(k: Mat,d: Mat,images: List<Mat>) { + val rv=mutableListOf<Mat>(); val tv=mutableListOf<Mat>() + try { + if(fish) Calib3d.fisheye_calibrate(objects,images,size,k,d,rv,tv,Calib3d.fisheye_CALIB_RECOMPUTE_EXTRINSIC or Calib3d.fisheye_CALIB_FIX_SKEW) + else Calib3d.calibrateCamera(objects,images,size,k,d,rv,tv) + } finally { (rv+tv).forEach { it.release() } } + } + try { + intrinsic(k1,d1,train.map { it.left }); intrinsic(k2,d2,train.map { it.right }) + stereoGeometry(objects,train.map{it.left},train.map{it.right},k1,d1,k2,d2,size,fish,r,t) + require(Core.norm(t) in 0.02..0.3) { context.getString(R.string.spatial_bad_baseline) } + val hr=mutableListOf<Mat>(); val ht=mutableListOf<Mat>(); val br=mutableListOf<Mat>(); val bt=mutableListOf<Mat>() + val camR=Mat(); val camT=Mat() + try { + for(o in train) { + val rv=Mat(); val tv=Mat(); val rotation=Mat() + boardPose(o.objects,o.left,k1,d1,fish,rv,tv) + Calib3d.Rodrigues(rv,rotation); rv.release(); br.add(rotation); bt.add(tv) + hr.add(matrix(o.head.rotation)); ht.add(vector(o.head.position)) + } + Calib3d.calibrateHandEye(hr,ht,br,bt,camR,camT,Calib3d.CALIB_HAND_EYE_PARK) + require(Core.checkRange(camR) && Core.checkRange(camT) && Core.norm(camT)<0.3) { context.getString(R.string.spatial_need_orientations) } + val cameraToHead=pose(camR,camT) + require(abs(Core.determinant(camR)-1.0)<0.01) { context.getString(R.string.spatial_bad_rotation) } + val boardWorld=held.map { o -> + val rv=Mat();val tv=Mat();val rotation=Mat() + try { + boardPose(o.objects,o.left,k1,d1,fish,rv,tv);Calib3d.Rodrigues(rv,rotation) + o.head*cameraToHead*pose(rotation,tv) + } finally { rv.release();tv.release();rotation.release() } + } + val center=boardWorld.map { it.position }.reduce { a,b -> a+b }*(1f/boardWorld.size) + val drift = boardWorld.maxOf { (it.position-center).length() } + if (drift>=0.05f) throw CalibrationAlignmentException(context,drift) + val orientation=boardWorld.first().rotation + require(boardWorld.all { val q=orientation.inverse()*it.rotation;abs(q.w)>cos(Math.toRadians(8.0)/2) }) { context.getString(R.string.spatial_bad_alignment) } + val error=held.map { reprojection(it,k1,d1,k2,d2,r,t,fish) }.average() + require(error.isFinite()) + return StereoCalibration(identity,w,h,fish,k1,d1,k2,d2,r,t,cameraToHead,error) + } finally { (hr+ht+br+bt+listOf(camR,camT)).forEach { it.release() } } + } catch(e: Exception) { listOf(k1,k2,d1,d2,r,t).forEach { it.release() }; throw e } + } + private fun boardPose(objects: Mat,pixels: Mat,k: Mat,d: Mat,fish: Boolean,rv: Mat,tv: Mat) { + val ok=if(fish) Calib3d.fisheye_solvePnP(objects,pixels,k,d,rv,tv) + else { + val obj=MatOfPoint3f(objects); val img=MatOfPoint2f(pixels); val dist=MatOfDouble(d) + try { Calib3d.solvePnP(obj,img,k,dist,rv,tv) } finally { obj.release(); img.release(); dist.release() } + } + require(ok) + } + private fun reprojection(o: BoardObservation,k1: Mat,d1: Mat,k2: Mat,d2: Mat,r: Mat,t: Mat,fish: Boolean): Double { + val rv=Mat(); val tv=Mat(); val rot=Mat(); val rightR=Mat(); val rightT=Mat(); val rightV=Mat(); val empty=Mat() + val predicted=MatOfPoint2f(); val objectPoints=MatOfPoint3f(o.objects); val dist=MatOfDouble(d2) + try { + boardPose(o.objects,o.left,k1,d1,fish,rv,tv); Calib3d.Rodrigues(rv,rot) + Core.gemm(r,rot,1.0,empty,0.0,rightR); Core.gemm(r,tv,1.0,t,1.0,rightT); Calib3d.Rodrigues(rightR,rightV) + if(fish) Calib3d.fisheye_projectPoints(o.objects,predicted,rightV,rightT,k2,d2) + else Calib3d.projectPoints(objectPoints,rightV,rightT,k2,dist,predicted) + return Core.norm(predicted,o.right,Core.NORM_L2)/sqrt(o.right.rows().toDouble()) + } finally { listOf(rv,tv,rot,rightR,rightT,rightV,empty,predicted,objectPoints,dist).forEach { it.release() } } + } + override fun close() { observations.forEach { listOf(it.objects,it.left,it.right).forEach(Mat::release) }; observations.clear(); detector.clear() } + fun save(file: File, identity: String, width: Int, height: Int) { + fun points(m: Mat) = JSONArray((0 until m.rows()).map { row -> JSONArray(m.get(row,0).toList()) }) + val views = JSONArray(observations.map { o -> + val p=o.head.position; val q=o.head.rotation + JSONObject().put("objects",points(o.objects)).put("left",points(o.left)).put("right",points(o.right)) + .put("head",JSONArray(listOf(p.x,p.y,p.z,q.w,q.x,q.y,q.z))) + }) + val data=JSONObject().put("version",1).put("identity",identity).put("width",width).put("height",height).put("views",views) + file.parentFile?.mkdirs() + val temporary=File(file.parentFile,file.name+".tmp") + temporary.writeText(data.toString()) + java.nio.file.Files.move(temporary.toPath(),file.toPath(),java.nio.file.StandardCopyOption.REPLACE_EXISTING) + } + companion object { + fun load(context: Context, file: File, identity: String, width: Int, height: Int): StereoCalibrator? { + if (!file.isFile) return null + val restored=StereoCalibrator(context) + try { + val data=JSONObject(file.readText()) + require(data.getInt("version")==1 && data.getString("identity")==identity && data.getInt("width")==width && data.getInt("height")==height) + val views=data.getJSONArray("views") + require(views.length() in 1..1000) + for (i in 0 until views.length()) { + val view=views.getJSONObject(i) + val points=CalibrationObservationData.parse(view) + restored.observations.add(BoardObservation( + MatOfPoint3f(*points.objects.map { Point3(it[0],it[1],it[2]) }.toTypedArray()), + MatOfPoint2f(*points.left.map { Point(it[0],it[1]) }.toTypedArray()), + MatOfPoint2f(*points.right.map { Point(it[0],it[1]) }.toTypedArray()),points.head)) + } + return restored + } catch (e: Exception) { + restored.close() + android.util.Log.w("StereoCalibration", "Saved captures could not be restored", e) + return null + } + } + internal fun stereoGeometry(objects: List<Mat>, left: List<Mat>, right: List<Mat>, k1: Mat,d1: Mat,k2: Mat,d2: Mat, + size: Size,fish: Boolean,r: Mat,t: Mat) { + val e=Mat(); val f=Mat(); val identity=Mat.eye(3,3,CvType.CV_64F); val zero=Mat.zeros(5,1,CvType.CV_64F) + val corrected=mutableListOf<Mat>() + fun images(input: List<Mat>, k: Mat,d: Mat) = if (!fish) input else input.map { pixels -> + Mat().also { output -> corrected.add(output); Calib3d.fisheye_undistortPoints(pixels,output,k,d,identity,k) } + } + try { + // OpenCV 4.13 fisheye stereo fitting assumes equal corner counts in every view. + Calib3d.stereoCalibrate(objects,images(left,k1,d1),images(right,k2,d2),k1,if(fish)zero else d1,k2,if(fish)zero else d2, + size,r,t,e,f,Calib3d.CALIB_FIX_INTRINSIC) + } finally { (corrected+listOf(e,f,identity,zero)).forEach(Mat::release) } + } + fun matrix(q: SpatialRotation)=Mat(3,3,CvType.CV_64F).also { it.put(0,0,*q.matrix().map(Float::toDouble).toDoubleArray()) } + fun vector(p: SpatialVector)=Mat(3,1,CvType.CV_64F).also { it.put(0,0,p.x.toDouble(),p.y.toDouble(),p.z.toDouble()) } + fun pose(r: Mat,t: Mat)=SpatialPose(SpatialVector(t.get(0,0)[0].toFloat(),t.get(1,0)[0].toFloat(),t.get(2,0)[0].toFloat()), + SpatialRotation.fromBasis(column(r,0),column(r,1),column(r,2))) + private fun column(r: Mat,c: Int)=SpatialVector(r.get(0,c)[0].toFloat(),r.get(1,c)[0].toFloat(),r.get(2,c)[0].toFloat()) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/StereoCalibrationProfile.kt b/app/src/main/java/com/droiddeck/launcher/glasses/StereoCalibrationProfile.kt new file mode 100644 index 0000000000..f6728735a6 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/StereoCalibrationProfile.kt @@ -0,0 +1,51 @@ +package com.droiddeck.launcher.glasses + +import org.json.JSONObject + +internal data class CalibrationMatrix(val rows: Int, val columns: Int, val values: DoubleArray) + +internal data class StereoCalibrationProfile( + val identity: String, val width: Int, val height: Int, val fisheye: Boolean, + val matrices: List<CalibrationMatrix>, val cameraToHead: SpatialPose, val error: Double, + val verified: Boolean, val bundledBase: Boolean = false, +) { + companion object { + const val BASE_ASSET = "calibration/luma-ultra-640x480.json" + const val BASE_IDENTITY = "luma-ultra-base-v1" + + fun select(saved: String?, base: () -> String?, identity: String?, width: Int, height: Int): StereoCalibrationProfile? { + if (identity != null && saved != null) parse(saved, identity, width, height)?.let { return it } + return base()?.let { parse(it, identity ?: BASE_IDENTITY, width, height, bundledBase = true) } + } + + fun parse(text: String, identity: String, width: Int, height: Int, + bundledBase: Boolean = false): StereoCalibrationProfile? = runCatching { + val data = JSONObject(text) + require(data.getInt("version") == 1 && data.getInt("width") == width && data.getInt("height") == height) + if (bundledBase) { + require(data.getString("identity") == BASE_IDENTITY && data.getString("deviceModel") == "VITURE Luma Ultra") + require(data.getString("cameraPair") == "left0-right0" && width == 640 && height == 480) + } else require(data.getString("identity") == identity) + val fisheye = data.getBoolean("fisheye") + val matrices = listOf("k1", "d1", "k2", "d2", "r", "t").map { name -> + val matrix = data.getJSONObject(name) + val rows = matrix.getInt("rows"); val columns = matrix.getInt("cols") + val values = matrix.getJSONArray("data") + require(rows in 1..14 && columns in 1..14 && values.length() == rows * columns) + CalibrationMatrix(rows, columns, DoubleArray(values.length()) { values.getDouble(it).also { n -> require(n.isFinite()) } }) + } + require(listOf(0, 2, 4).all { matrices[it].rows == 3 && matrices[it].columns == 3 }) + require(matrices[5].rows == 3 && matrices[5].columns == 1) + require(listOf(1, 3).all { + val matrix = matrices[it] + (matrix.rows == 1 || matrix.columns == 1) && matrix.values.size in if (fisheye) listOf(4) else listOf(4, 5, 8, 12, 14) + }) + require(listOf(0, 2).all { matrices[it].values[0] > 0 && matrices[it].values[4] > 0 }) + val pose = data.getJSONArray("cameraToHead"); require(pose.length() == 7) + val cameraToHead = SpatialPose.fromSdk(FloatArray(7) { pose.getDouble(it).toFloat() }) ?: error("Invalid camera transform") + val error = data.getDouble("error"); require(error.isFinite() && error in 0.0..2.0) + StereoCalibrationProfile(identity, width, height, fisheye, matrices, cameraToHead, error, + verified = !bundledBase && data.getBoolean("verified"), bundledBase = bundledBase) + }.getOrNull() + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/StereoFingerGestures.kt b/app/src/main/java/com/droiddeck/launcher/glasses/StereoFingerGestures.kt new file mode 100644 index 0000000000..f43c0e134c --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/StereoFingerGestures.kt @@ -0,0 +1,67 @@ +package com.droiddeck.launcher.glasses + +import kotlin.math.abs +import kotlin.math.min + +internal object StereoFingerGestures { + data class Result(val trigger: Float = 0f, val triggerValid: Boolean = false, + val grip: Boolean = false, val gripValid: Boolean = false) + + fun estimate(left: List<SpatialVector>?, right: List<SpatialVector>?, gripping: Boolean): Result { + val a = View.create(left) ?: return Result() + val b = View.create(right) ?: return Result() + val triggerA = a.pinch() + val triggerB = b.pinch() + val triggerValid = triggerA != null && triggerB != null && abs(triggerA-triggerB) <= 0.30f + val curls = listOf(9,13,17).map { base -> + val ca = a.curl(base) + val cb = b.curl(base) + if (ca != null && cb != null && abs(ca-cb) <= 0.45f) min(ca,cb) else null + } + val gripValid = curls.all { it != null } + val closed = curls.count { it != null && it >= (if (gripping) 0.40f else 0.65f) } + return Result(if (triggerValid) min(triggerA!!,triggerB!!) else 0f,triggerValid, + gripValid && closed >= (if (gripping) 2 else 3),gripValid) + } + + private class View(val points: List<SpatialVector>,val width: Float) { + private fun point(index: Int) = points[index].takeIf(SpatialVector::finite) + ?.let { SpatialVector(it.x,it.y) } + + fun pinch(): Float? { + val thumb = point(4) ?: return null + val index = point(8) ?: return null + val wrist = point(0) ?: return null + if ((thumb-wrist).length() > width*3.5f || (index-wrist).length() > width*3.5f) return null + return ((0.55f-(thumb-index).length()/width)/0.35f).coerceIn(0f,1f) + } + + fun curl(base: Int): Float? { + val wrist = point(0) ?: return null + val joints = (base..base+3).map { point(it) ?: return null } + val lengths = joints.zipWithNext { a,b -> (b-a).length() } + if (lengths.any { it < width*0.005f }) return null + val path = lengths.sum() + val reach = (joints[0]-wrist).length() + if (path !in width*0.15f..width*3f || reach < width*0.20f) return null + val shortness = ((1.7f-(joints[3]-wrist).length()/reach)/0.55f).coerceIn(0f,1f) + val bend = ((1f-(joints[3]-joints[0]).length()/path)/0.35f).coerceIn(0f,1f) + return min(shortness,bend) + } + + companion object { + fun create(points: List<SpatialVector>?): View? { + if (points?.size != 21) return null + if (listOf(0,5,9,13,17).any { !points[it].finite() }) return null + fun xy(index: Int) = SpatialVector(points[index].x,points[index].y) + val across = xy(5)-xy(17) + val along = xy(9)-xy(0) + val width = across.length() + val length = along.length() + if (!width.isFinite() || !length.isFinite() || width < 1e-3f || length < 1e-3f) return null + if (width/length !in 0.25f..3f || abs(across.cross(along).z)/(width*length) < 0.15f) return null + return View(points,width) + } + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/StereoHandEngine.kt b/app/src/main/java/com/droiddeck/launcher/glasses/StereoHandEngine.kt new file mode 100644 index 0000000000..0b086c7c4a --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/StereoHandEngine.kt @@ -0,0 +1,650 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import com.droiddeck.launcher.R +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.Paint +import com.google.mediapipe.framework.image.MPImage +import com.google.mediapipe.tasks.core.BaseOptions +import com.google.mediapipe.tasks.core.Delegate +import com.google.mediapipe.tasks.vision.core.RunningMode +import com.google.mediapipe.tasks.vision.handlandmarker.HandLandmarker +import org.opencv.android.OpenCVLoader +import org.opencv.android.Utils +import org.opencv.core.* +import org.opencv.imgproc.Imgproc +import org.opencv.imgcodecs.Imgcodecs +import org.json.JSONObject +import java.io.File +import java.nio.ByteBuffer +import java.security.MessageDigest +import java.util.concurrent.ConcurrentLinkedQueue + +internal data class HandTrackingDiagnostics(val message: String, val leftCameraHands: Int = 0, + val rightCameraHands: Int = 0, val matched: Int = 0, val reconstructed: Int = 0, val accepted: Int = 0, + val preprocessMs: Float = 0f, val inferenceMs: Float = 0f, + val triggerValid: Int = 0, val gripValid: Int = 0, + val leftRawHands: Int = 0, val rightRawHands: Int = 0, + val previousLeftRawHands: Int = -1, val previousRightRawHands: Int = -1, + val leftInferenceMs: Float = 0f, val rightInferenceMs: Float = 0f, + val inferenceHandLimit: Int = 2, + val observationTimeNs: Long = 0, val observationAgeMs: Float = -1f, + val left: HandObservationDiagnostic? = null, val right: HandObservationDiagnostic? = null, + val observations: HandTrackingMetricSnapshot? = null) { + fun json() = JSONObject().put("message",message).put("experimental",true).put("leftCameraHands",leftCameraHands) + .put("rightCameraHands",rightCameraHands).put("matched",matched).put("reconstructed",reconstructed).put("accepted",accepted) + .put("preprocessMs",preprocessMs.toDouble()).put("inferenceMs",inferenceMs.toDouble()) + .put("triggerValid",triggerValid).put("gripValid",gripValid) + .put("leftRawHands",leftRawHands).put("rightRawHands",rightRawHands) + .put("previousLeftRawHands",previousLeftRawHands).put("previousRightRawHands",previousRightRawHands) + .put("leftInferenceMs",leftInferenceMs.toDouble()).put("rightInferenceMs",rightInferenceMs.toDouble()) + .put("inferenceHandLimit",inferenceHandLimit) + .put("observationTimeNs",observationTimeNs).put("observationAgeMs",observationAgeMs.toDouble()) + .put("left",left?.json()).put("right",right?.json()).put("observations",observations?.json()) +} + +private fun HandObservationDiagnostic.json() = JSONObject().put("outcome",outcome.name.lowercase()) + .put("positionSource",positionSource) + .put("reconstructedPalmLandmarks",org.json.JSONArray(reconstructedPalmLandmarks)) + .put("accepted",accepted).put("triggerEstimate",triggerEstimate.toDouble()) + .put("triggerGeometryValid",triggerGeometryValid).put("triggerValid",triggerValid) + .put("gripEstimate",gripEstimate).put("gripGeometryValid",gripGeometryValid).put("gripValid",gripValid) + +private fun HandSideMetrics.json() = JSONObject().put("observations",observations).put("accepted",accepted) + .put("triggerValid",triggerValid).put("gripValid",gripValid) + .put("triggerAboveClickThreshold",triggerAboveClickThreshold).put("triggerReleased",triggerReleased) + .put("gripPressed",gripPressed).put("trackingLosses",trackingLosses) + .put("triggerLosses",triggerLosses).put("gripLosses",gripLosses) + .put("maximumConsecutiveRejected",maximumConsecutiveRejected) + .put("outcomes",JSONObject().also { json -> outcomes.forEach { (outcome,count) -> json.put(outcome.name.lowercase(),count) } }) + +private fun HandTrackingMetricSnapshot.json() = JSONObject().put("processedPairs",processedPairs).put("inferencePairs",inferencePairs) + .put("scope","Processed camera pairs in this tracking connection, including absent hands and setup; not detection accuracy") + .put("left",left.json()).put("right",right.json()) + +internal class StereoHandEngine(private val context: Context, private val token: Long, + private val generation: Long, private val identity: String?) : AutoCloseable { + @Volatile private var running=true + @Volatile private var enabled=false + @Volatile private var debug=false + @Volatile var preview: Bitmap? = null; private set + @Volatile var message=context.getString(R.string.spatial_wait_cameras); private set + @Volatile var calibrationProgress = SpatialCalibrationProgress(); private set + @Volatile var handStatus = HandTrackingDiagnostics(context.getString(R.string.spatial_wait_hands)); private set + val hasStableIdentity get() = identity != null + private val commands=ConcurrentLinkedQueue<() -> Unit>() + private var calibrator: StereoCalibrator?=null + private var calibrationFrame = 0L + private var calibration: StereoCalibration?=null + val calibrationSource get() = calibration?.source ?: "none" + val calibrationVerified get() = calibration?.verified == true + val lensCorrection get() = calibration?.let { if(it.fisheye) "fisheye-points-only" else "pinhole-points-only" } ?: "none" + private var capture=false + private var record=false + private var verify: Float?=null + private var validationRequestedAt=0L + @Volatile var gpu=false; private set + @Volatile var model=HandModel.DEFAULT; private set + @Volatile var halfRateInput=true; private set + @Volatile var adaptiveInput=true; private set + @Volatile var scheduledTracking=true; private set + @Volatile var inputRatePermille=500; private set + @Volatile var cpuParallel=true; private set + @Volatile var benchmark: JSONObject?=null; private set + @Volatile var inferenceBackend: String? = null; private set + private var detectors: DetectorBank?=null + private var fastDetectors: DetectorBank?=null + private var rightWorker: StereoInferenceRunner?=null + private val inferenceSchedule=HandInferenceSchedule() + private val processingRate=HandProcessingRate() + private val handMetrics=HandTrackingMetrics() + private val gestures=Array(2) { HandGestures(rightHand=it==1) } + private val joyConPositions=Array(2) { JoyConWristPosition() } + private var joyConFlow: StereoJoyConFlow? = null + private val profile: File get() { + val hash=MessageDigest.getInstance("SHA-256").digest((identity ?: "session:$generation").toByteArray()).joinToString("") { "%02x".format(it) } + return File(context.filesDir,"spatial/calibration-$hash.json") + } + private val captures: File get() = File(profile.parentFile,profile.nameWithoutExtension+"-captures.json") + private fun saveCaptures() { + try { calibrator?.save(captures,identity ?: "session:$generation",width,height) } + catch (e: Exception) { android.util.Log.w("StereoCalibration", "Could not save captured views", e) } + } + fun setEnabled(on: Boolean) { enabled=on } + fun diagnostics(on: Boolean) { debug=on } + fun setGpu(on: Boolean) { commands.add { clearHands();closeDetectors();gpu=on } } + fun setModel(lite: Boolean) { commands.add { + clearHands();closeDetectors();model=if(lite) HandModel.LITE else HandModel.FULL + } } + fun setHalfRate(on: Boolean) { commands.add { adaptiveInput=false;halfRateInput=on;processingRate.reset() } } + fun setAdaptiveInput(on: Boolean) { commands.add { adaptiveInput=on;processingRate.reset() } } + fun setScheduledTracking(on: Boolean) { commands.add { clearHands();closeDetectors();scheduledTracking=on } } + fun setCpuParallel(on: Boolean) { commands.add { clearHands();closeDetectors();cpuParallel=on } } + fun benchmarkSavedCapture(id: String) { + require(id.matches(Regex("[0-9]{1,20}"))) + benchmark=JSONObject().put("state","pending").put("capture",id) + commands.add { + try { benchmark=benchmarkCapture(id) } + catch(e: Exception) { benchmark=JSONObject().put("state","failed").put("error",e.message) } + } + } + fun startCalibration() { debug=true; commands.add { + check(width > 0 && height > 0) { context.getString(R.string.spatial_wait_previews) } + calibrator?.close();calibrator=StereoCalibrator(context) + calibrationFrame = SpatialTracking.session.trackingFrameGeneration + calibrationProgress = SpatialCalibrationProgress(collecting = true) + saveCaptures() + message=context.getString(R.string.spatial_collect_instructions) + } } + fun captureCalibration() { commands.add { + check(calibrationProgress.collecting && calibrationFrame==SpatialTracking.session.trackingFrameGeneration) { + context.getString(R.string.spatial_saved_views_hint) + } + capture=true + calibrationProgress = calibrationProgress.copy(capturing = true, captureMessage = context.getString(R.string.spatial_capture_pending)) + } } + fun recordDiagnostic() { commands.add { record=true } } + fun validateCalibration(distance: Float) { commands.add { + require(distance.isFinite() && distance in 0.15f..1.5f) + verify=distance;validationRequestedAt=System.nanoTime() + calibrationProgress=calibrationProgress.copy(validating=true, + validationMessage=context.getString(R.string.spatial_validation_pending)) + } } + private var width=0; private var height=0 + private val imageBuffer=HandImageBuffer() + private val rightImageBuffer=HandImageBuffer() + private val worker=Thread({ loop() },"viture-stereo-hands").apply { isDaemon=true; start() } + fun solveCalibration() { commands.add { + val c=calibrator ?: error(context.getString(R.string.spatial_start_first)) + saveCaptures() + calibrationProgress = calibrationProgress.copy(solving = true, validationMessage = null) + try { + val fitted=c.solve(identity ?: "session:$generation",width,height) + clearHands();closeDetectors() + calibration?.close();calibration=fitted + calibrationProgress = calibrationProgress.copy(fitted = true) + if(identity!=null) fitted.save(profile) + message=context.getString(R.string.spatial_fit_ready, fitted.error) + } finally { calibrationProgress = calibrationProgress.copy(solving = false) } + } } + private fun detector(selected: HandModel=model, useGpu: Boolean=gpu, maxHands: Int=2): HandLandmarker { + val bytes=context.assets.open(selected.asset).use { it.readBytes() } + val hash=MessageDigest.getInstance("SHA-256").digest(bytes).joinToString("") { "%02x".format(it) } + check(hash==selected.sha256) { context.getString(R.string.spatial_model_checksum_error) } + return HandLandmarker.createFromOptions(context,HandLandmarker.HandLandmarkerOptions.builder() + .setBaseOptions(BaseOptions.builder().setModelAssetPath(selected.asset) + .setDelegate(if(useGpu) Delegate.GPU else Delegate.CPU).build()) + .setRunningMode(RunningMode.VIDEO).setNumHands(maxHands).setMinHandDetectionConfidence(0.6f) + .setMinHandPresenceConfidence(0.6f).setMinTrackingConfidence(0.6f).build()) + } + private data class Detection(val side: Int,val points: List<Point>) + private data class Detections(val hands: List<Detection>,val rawCount: Int,val inferenceMs: Float) + private class DetectorBank(val left: HandLandmarker, val right: HandLandmarker, val maxHands: Int) { + var previousLeftRaw=-1 + var previousRightRaw=-1 + } + private fun createBank(selected: HandModel, useGpu: Boolean, maxHands: Int, + worker: StereoInferenceRunner?): DetectorBank { + val left=detector(selected,useGpu,maxHands) + try { + val right=worker?.onRight { detector(selected,useGpu,maxHands) } ?: detector(selected,useGpu,maxHands) + return DetectorBank(left,right,maxHands) + } catch(e: Throwable) { left.close();throw e } + } + private fun closeBank(bank: DetectorBank?, worker: StereoInferenceRunner?) { + if(bank==null) return + try { bank.left.close() } finally { + if(worker!=null) worker.onRight { bank.right.close() } else bank.right.close() + } + } + private fun imagePoints(detection: Detection?) = detection?.points?.map { + SpatialVector(it.x.toFloat(),it.y.toFloat(),0f) + } + private fun detect(detector: HandLandmarker, bitmap: Bitmap, stamp: Long, buffer: HandImageBuffer, + wristOnly: Boolean): Detections = + detect(detector,stamp,wristOnly) { buffer.image(bitmap) } + private fun detect(detector: HandLandmarker, stamp: Long, wristOnly: Boolean, + prepareImage: () -> MPImage): Detections { + val image=prepareImage() + try { + val start=System.nanoTime() + val result=detector.detectForVideo(image,stamp) + val elapsed=(System.nanoTime()-start)/1e6f + val hands=result.landmarks().mapIndexedNotNull { i, hand -> + val category=result.handedness()[i].firstOrNull() ?: return@mapIndexedNotNull null + if(category.score()<0.6f) return@mapIndexedNotNull null + val points=if(wristOnly) hand.take(1) else hand + Detection(if(category.categoryName()=="Left") 0 else 1,points.map { Point(it.x()*image.width.toDouble(),it.y()*image.height.toDouble()) }) + } + return Detections(hands,result.landmarks().size,elapsed) + } finally { image.close() } + } + private fun closeDetectors() { + inferenceBackend=null + inferenceSchedule.reset();processingRate.reset() + val search=detectors;val fast=fastDetectors;val worker=rightWorker + detectors=null;fastDetectors=null;rightWorker=null + try { closeBank(search,worker) } finally { + try { closeBank(fast,worker) } finally { worker?.close() } + } + } + private fun detectPair(left: HandLandmarker, right: HandLandmarker, leftImage: Bitmap, + rightImage: Bitmap, stamp: Long, worker: StereoInferenceRunner?, wristOnly: Boolean): Pair<Detections,Detections> { + val l={ detect(left,leftImage,stamp,imageBuffer,wristOnly) };val r={ detect(right,rightImage,stamp,rightImageBuffer,wristOnly) } + return worker?.pair(l,r) ?: (l() to r()) + } + private fun detectRawPair(left: HandLandmarker, right: HandLandmarker, leftGray: ByteArray, + rightGray: ByteArray, stamp: Long, worker: StereoInferenceRunner?, wristOnly: Boolean): Pair<Detections,Detections> { + val l={ detect(left,stamp,wristOnly) { imageBuffer.image(leftGray,width,height) } } + val r={ detect(right,stamp,wristOnly) { rightImageBuffer.image(rightGray,width,height) } } + return worker?.pair(l,r) ?: (l() to r()) + } + private fun benchmarkCapture(id: String): JSONObject { + val folder=File(context.filesDir,"spatial/captures/$id") + val c=calibration ?: error("Load the saved calibration before benchmarking") + val wristOnly=SpatialTracking.joyConsEnabled + val gray=ArrayList<Mat>();val images=ArrayList<Bitmap>();val rows=org.json.JSONArray() + clearHands();closeDetectors() + try { + for(name in listOf("left","right")) { + val source=Imgcodecs.imread(File(folder,"$name.png").path,Imgcodecs.IMREAD_GRAYSCALE) + gray.add(source) + check(source.cols()==width && source.rows()==height) { "Saved pair has incompatible dimensions" } + val rgba=Mat() + try { + Imgproc.cvtColor(source,rgba,Imgproc.COLOR_GRAY2RGBA) + val bitmap=Bitmap.createBitmap(width,height,Bitmap.Config.ARGB_8888) + images.add(bitmap);Utils.matToBitmap(rgba,bitmap) + } finally { rgba.release() } + } + for((selected,parallel,scheduled) in listOf(Triple(HandModel.FULL,true,false),Triple(HandModel.FULL,true,true), + Triple(HandModel.LITE,true,true),Triple(HandModel.FULL,true,false))) { + var search: DetectorBank?=null;var fast: DetectorBank?=null + val schedule=HandInferenceSchedule() + val worker=if(parallel) StereoInferenceRunner() else null + val times=ArrayList<Double>();val samples=org.json.JSONArray() + try { + search=createBank(selected,false,2,worker) + if(scheduled) fast=createBank(selected,false,1,worker) + repeat(24) { frame -> + check(running) { "Tracking stopped during benchmark" } + val start=System.nanoTime();val stamp=1000L+frame*80L + val bank=if(scheduled && schedule.select(stamp)==1) fast!! else search + val (leftResult,rightResult)=detectPair(bank.left,bank.right,images[0],images[1],stamp,worker,wristOnly) + val l=leftResult.hands;val r=rightResult.hands + if(scheduled) schedule.observe(stamp,l.map { it.side },r.map { it.side },leftResult.rawCount,rightResult.rawCount) + val ms=(System.nanoTime()-start)/1e6 + val hands=org.json.JSONArray() + val joyCons=org.json.JSONArray() + val wrists=org.json.JSONArray() + for(side in 0..1) { + val a=l.singleOrNull { it.side==side };val b=r.singleOrNull { it.side==side } + val points=if(a!=null && b!=null) c.triangulateLandmarksRaw(a.points,b.points) else null + points?.get(0)?.takeIf { it.finite() }?.let { wrist -> + wrists.put(JSONObject().put("side",side).put("position",org.json.JSONArray(wrist.array().toList()))) + } + val hand=if(wristOnly) null else points?.let { HandGestures(rightHand=side==1).estimate(it,SpatialPose(),stamp*1_000_000,imagePoints(a),imagePoints(b)) } + val joyCon=if(wristOnly) points?.let { JoyConWristPosition().estimate(it,SpatialPose(),stamp*1_000_000) } else null + if(joyCon!=null) joyCons.put(JSONObject().put("side",side) + .put("position",org.json.JSONArray(joyCon.pose.position.array().toList()))) + if(hand!=null) hands.put(JSONObject().put("side",side).put("flags",hand.flags()) + .put("position",org.json.JSONArray(hand.pose.position.array().toList())) + .put("trigger",hand.trigger.toDouble()).put("grip",hand.grip)) + } + if(frame>=4) { + times.add(ms);samples.put(JSONObject().put("left",l.size).put("right",r.size).put("hands",hands) + .put("joyCons",joyCons).put("wrists",wrists) + .put("inferenceHandLimit",bank.maxHands) + .put("leftRawHands",leftResult.rawCount).put("rightRawHands",rightResult.rawCount) + .put("leftInferenceMs",leftResult.inferenceMs.toDouble()).put("rightInferenceMs",rightResult.inferenceMs.toDouble())) + } + } + } finally { + try { closeBank(search,worker) } finally { + try { closeBank(fast,worker) } finally { worker?.close() } + } + } + val sorted=times.sorted() + rows.put(JSONObject().put("model",selected.name).put("parallel",parallel).put("medianMs",(sorted[9]+sorted[10])/2) + .put("scheduled",scheduled) + .put("p95Ms",sorted[18]).put("samples",samples)) + } + return JSONObject().put("state","completed").put("capture",id).put("backend","CPU") + .put("wristOnly",wristOnly).put("imagePreprocessing",HandImageBuffer.PREPROCESSING) + .put("lensCorrection",lensCorrection) + .put("scope","Saved stereo pair replay; not live tracking or external latency").put("results",rows) + } finally { gray.forEach { it.release() };images.forEach { it.recycle() };clearHands() } + } + private fun clearHands() { + gestures.forEach { it.reset() } + joyConPositions.forEach { it.reset() } + joyConFlow?.reset() + inferenceSchedule.reset();processingRate.reset() + SpatialTracking.session.setHands(generation,SpatialHand(),SpatialHand()) + } + private fun loop() { + try { check(OpenCVLoader.initLocal()) } catch(e: Throwable) { message=context.getString(R.string.spatial_opencv_error, e.message.orEmpty());return } + var grayL=Mat();var grayR=Mat();val rgba=Mat() + var bmpL: Bitmap?=null;var bmpR: Bitmap?=null + var leftGray=ByteArray(0);var rightGray=ByteArray(0) + val left=ByteBuffer.allocateDirect(2048*2048);val right=ByteBuffer.allocateDirect(2048*2048) + val metadata=DoubleArray(9);val headData=FloatArray(7) + var lastSeq=0L;var dropped=0L;var frames=0L;var previewTime=0L + val clock=CameraClock() + var lastSource=0L;var lastStamp=0L;var captureOn=false;var captureRate=1000;var lastInputSeq=0L + var rate=0f + try { + check(OpenCVLoader.initLocal()) { context.getString(R.string.spatial_opencv_load_error) } + joyConFlow=StereoJoyConFlow() + while(running) { + while(true) { + val command=commands.poll() ?: break + try { command() } catch(e: Exception) { message=e.message ?: e.toString() } + } + if (verify!=null && System.nanoTime()-validationRequestedAt>2_000_000_000L) { + verify=null + calibrationProgress=calibrationProgress.copy(validating=false, + validationMessage=context.getString(R.string.spatial_no_camera_frame)) + } + val want=enabled || debug + val copyPermille=if(enabled && !calibrationProgress.collecting && !capture && verify==null && !record) + if(adaptiveInput && !gpu) processingRate.permille else if(halfRateInput) 500 else 1000 + else 1000 + inputRatePermille=copyPermille + if(want!=captureOn || copyPermille!=captureRate) { + VitureSdk.nativeCapture(token,want,copyPermille);captureOn=want;captureRate=copyPermille + if(!want) clearHands() + } + if(!want) { Thread.sleep(20);continue } + val seq=VitureSdk.nativeStereo(token,left,right,metadata,headData,!enabled || capture) + if(seq<=0) { Thread.sleep(5);continue } + val sequenceDelta=if(lastSeq>0) (seq-lastSeq).coerceAtLeast(1) else 1 + if(lastSeq>0) dropped+=(sequenceDelta-1) + lastSeq=seq;frames++ + val start=System.nanoTime();val source=(metadata[2]*1e9).toLong();val receipt=metadata[3].toLong() + val inputSequence=metadata[7].toLong() + if(source<=lastSource) { clearHands();message=context.getString(R.string.spatial_clock_reset);closeDetectors();lastStamp=0 } + if(lastSource>0 && source>lastSource) { + val hz=1e9f*(inputSequence-lastInputSeq).coerceAtLeast(1)/(source-lastSource) + rate=if(rate==0f)hz else rate*.9f+hz*.1f + } + lastSource=source;lastInputSeq=inputSequence + val time=clock.map(source,receipt) ?: 0L + val trackingFrame = SpatialTracking.session.trackingFrameGeneration + if (calibrator != null && calibrationProgress.collecting && calibrationFrame != trackingFrame) { + capture=false + message=context.getString(R.string.spatial_frame_changed) + calibrationProgress = calibrationProgress.copy(collecting = false, capturing = false, captureMessage = message) + } + // The callback pose's basis is undocumented; use canonical GL pose history. + val observation=HandObservation(time,generation,trackingFrame) + var captureHead=observation.headPose(SpatialTracking.session,metadata[6]>0) + val w=metadata[0].toInt();val h=metadata[1].toInt() + if(w!=width || h!=height) { + clearHands();closeDetectors() + width=w;height=h;leftGray=ByteArray(w*h);rightGray=ByteArray(w*h) + grayL.release();grayR.release();grayL=Mat(h,w,CvType.CV_8UC1);grayR=Mat(h,w,CvType.CV_8UC1) + bmpL?.recycle();bmpR?.recycle();bmpL=null;bmpR=null + calibration?.close() + val selected=StereoCalibrationProfile.select( + if(identity!=null) runCatching { profile.readText() }.getOrNull() else null, + { runCatching { context.assets.open(StereoCalibrationProfile.BASE_ASSET).bufferedReader().use { it.readText() } }.getOrNull() }, + identity,w,h) + calibration=selected?.let(StereoCalibration::fromProfile) + calibrator?.close();calibrator=null + calibrationProgress = SpatialCalibrationProgress(fitted = calibration != null) + message=context.getString(R.string.spatial_stereo_loaded, w, h, when { + calibration?.verified==true -> context.getString(R.string.spatial_device_loaded) + calibration?.bundledBase==true -> context.getString(R.string.spatial_base_loaded) + else -> context.getString(R.string.spatial_calibration_needed) + }) + if (identity!=null) calibrator=StereoCalibrator.load(context,captures,identity,w,h) + calibrator?.let { + calibrationFrame=-1 + val restored=context.getString(R.string.spatial_restored, it.observations.size) + calibrationProgress=calibrationProgress.copy(views=it.observations.size,captureMessage=restored) + message=restored + } + } + left.position(0);left.get(leftGray) + right.position(0);right.get(rightGray) + val joyConMode=SpatialTracking.joyConsEnabled + val drawPreview=debug && start-previewTime>150_000_000L + if(capture || verify!=null || record || drawPreview || joyConMode) { + grayL.put(0,0,leftGray);grayR.put(0,0,rightGray) + } + if(capture) { + capture=false + val observation=captureHead?.let { calibrator?.detect(grayL,grayR,it) } + val currentTracking = SpatialTracking.session.isCurrentTrackingFrame(generation, trackingFrame) + if(observation!=null && currentTracking) { + calibrator!!.observations.add(observation) + calibrationProgress = calibrationProgress.copy(views = calibrator!!.observations.size) + saveCaptures() + message=context.getString(R.string.spatial_captured, calibrator!!.observations.size) + } else { + observation?.let { listOf(it.objects,it.left,it.right).forEach(Mat::release) } + message = when { + calibrator == null -> context.getString(R.string.spatial_tap_start) + SpatialTracking.session.recenterPending -> context.getString(R.string.spatial_capture_recenter_pending) + SpatialTracking.session.needsRecenter -> context.getString(R.string.spatial_capture_recenter) + captureHead == null || !currentTracking -> context.getString(R.string.spatial_capture_unsynchronized) + else -> context.getString(R.string.spatial_capture_corners, calibrator?.commonCorners ?: 0) + } + } + calibrationProgress = calibrationProgress.copy(capturing = false, captureMessage = message) + } + val c=calibration + val distance=verify + if(distance!=null) { + verify=null + var temporary: StereoCalibrator?=null + var observed: BoardObservation?=null + try { + check(c!=null) { context.getString(R.string.spatial_align_first) } + temporary=StereoCalibrator(context) + observed=temporary.detect(grayL,grayR,SpatialPose()) + val points=observed?.let { c.triangulateRaw(it.left,it.right) } + val result=CalibrationDistanceCheck.evaluate(context,distance,temporary.commonCorners,points) + if(result.accepted) { + c.verified=true;if(identity!=null)c.save(profile) + calibrationProgress=calibrationProgress.copy(validationMessage=result.message+ + if(identity==null) " " + context.getString(R.string.spatial_validation_session) else " " + context.getString(R.string.spatial_validation_saved)) + } else calibrationProgress=calibrationProgress.copy(validationMessage=result.message) + } catch (e: Exception) { + android.util.Log.w("StereoCalibration","Distance validation failed",e) + calibrationProgress=calibrationProgress.copy(validationMessage=context.getString(R.string.spatial_validation_error, e.message?.substringBefore('\n') ?: context.getString(R.string.spatial_processing_failed))) + } finally { + calibrationProgress=calibrationProgress.copy(validating=false) + observed?.let { listOf(it.objects,it.left,it.right).forEach(Mat::release) };temporary?.close() + } + } + var dl=emptyList<Detection>();var dr=emptyList<Detection>() + var trackingHealthy=false + var inferred=false + val sideDiagnostics=Array(2) { HandObservationDiagnostic(HandObservationOutcome.NO_MATCHING_DETECTION) } + val nextStatus: HandTrackingDiagnostics + if(enabled && c?.readyForTracking==true && time>0 && SpatialTracking.session.isCurrentTrackingFrame(generation, trackingFrame) && System.nanoTime()-time in 0..HandObservation.MAX_AGE_NS) { + val preprocessMs=(System.nanoTime()-start)/1e6f + if(detectors==null) { + try { + rightWorker=if(cpuParallel && !gpu) StereoInferenceRunner() else null + detectors=createBank(model,gpu,2,rightWorker) + if(scheduledTracking && !gpu) fastDetectors=createBank(model,false,1,rightWorker) + inferenceBackend=if(gpu) "GPU" else "CPU" + } + catch(e: Exception) { + closeDetectors() + enabled=false;clearHands();message=context.getString(R.string.spatial_inference_error, e.message.orEmpty()) + val unavailable=HandObservationDiagnostic(HandObservationOutcome.INFERENCE_UNAVAILABLE) + handMetrics.observe(seq,false,unavailable,unavailable) + handStatus=HandTrackingDiagnostics(message,observationTimeNs=time, + observationAgeMs=(System.nanoTime()-time)/1e6f,left=unavailable,right=unavailable,observations=handMetrics.snapshot()) + continue + } + } + val stamp=maxOf(time/1_000_000,lastStamp+1);lastStamp=stamp + val inferenceStart=System.nanoTime() + val scheduled=scheduledTracking && !gpu + val bank=if(scheduled && inferenceSchedule.select(stamp)==1) fastDetectors!! else detectors!! + val pair=detectRawPair(bank.left,bank.right,leftGray,rightGray,stamp,rightWorker,joyConMode) + inferred=true + dl=pair.first.hands;dr=pair.second.hands + if(scheduled) inferenceSchedule.observe(stamp,dl.map { it.side },dr.map { it.side },pair.first.rawCount,pair.second.rawCount) + val inferenceMs=(System.nanoTime()-inferenceStart)/1e6f + // VIO callbacks can arrive during inference; verify this exact camera stamp before publishing. + captureHead=observation.headPose(SpatialTracking.session, + metadata[6]>0 || VitureSdk.nativeCameraSynchronized(token,metadata[2])) + val hands=Array(2) { SpatialHand() } + if (joyConMode) joyConFlow?.begin(grayL,grayR,time) else joyConFlow?.reset() + var matched=0;var reconstructed=0 + for(side in 0..1) { + val leftCandidates=dl.filter { it.side==side };val rightCandidates=dr.filter { it.side==side } + val l=leftCandidates.singleOrNull();val r=rightCandidates.singleOrNull() + val detectedPoints=if(l!=null && r!=null) { + matched++ + c.triangulateLandmarksRaw(l.points,r.points) + } else null + var points=detectedPoints + if(points?.any { it != null }==true) reconstructed++ + var hand=points?.let { p -> captureHead?.let { head -> + if (joyConMode) joyConPositions[side].estimate(p,head*c.cameraToHead,time) + else gestures[side].estimate(p,head*c.cameraToHead,time,imagePoints(l),imagePoints(r)) + } } + var positionSource=if(hand!=null) "landmarks" else "none" + if (joyConMode && captureHead!=null) { + if (hand!=null && l!=null && r!=null && detectedPoints!=null) + joyConFlow?.seed(side,l.points.first(),r.points.first(),time) + else if (leftCandidates.size<=1 && rightCandidates.size<=1) { + joyConFlow?.points(side)?.let { tracked -> + val flowed=c.triangulateLandmarksRaw(tracked.left,tracked.right) + val position=flowed?.let { joyConPositions[side].estimate(it,captureHead!!*c.cameraToHead,time) } + if(position!=null) { hand=position;points=flowed;positionSource="stereo_flow" } + } + } + } + val outcome=when { + hand!=null -> HandObservationOutcome.ACCEPTED + leftCandidates.size>1 || rightCandidates.size>1 -> HandObservationOutcome.AMBIGUOUS_HANDEDNESS + l==null && r==null -> HandObservationOutcome.NO_MATCHING_DETECTION + l==null || r==null -> HandObservationOutcome.ONE_CAMERA_ONLY + points?.any { it != null }!=true -> HandObservationOutcome.STEREO_REJECTED + captureHead==null -> HandObservationOutcome.CAMERA_NOT_SYNCHRONIZED + else -> if (joyConMode) joyConPositions[side].lastOutcome else gestures[side].lastOutcome + } + sideDiagnostics[side]=HandObservationDiagnostic(outcome, + listOf(0,5,9,13,17).filter { points?.getOrNull(it)?.finite()==true }, + hand?.trigger ?: 0f,hand?.triggerValid ?: false,hand?.grip ?: false,hand?.gripValid ?: false,positionSource) + if (hand!=null) hands[side]=hand + else if (joyConMode) gestures[side].reset() + else gestures[side].resetAfterRejection(outcome) + } + if (joyConMode) joyConFlow?.end(grayL,grayR,time) + val current=SpatialTracking.session.isCurrentTrackingFrame(generation, trackingFrame) && + joyConMode==SpatialTracking.joyConsEnabled + val fresh=System.nanoTime()-time in 0..HandObservation.MAX_AGE_NS + if (current && fresh) + SpatialTracking.session.setHands(generation,hands[0],hands[1]) + else { + clearHands() + for(side in 0..1) sideDiagnostics[side]=sideDiagnostics[side].copy(outcome= + if(!current) HandObservationOutcome.HEAD_TRACKING_INVALID else HandObservationOutcome.STALE_OBSERVATION) + } + val accepted=if(current && fresh) hands.count { it.valid } else 0 + trackingHealthy=accepted>0 + nextStatus=HandTrackingDiagnostics(when { + !current -> context.getString(R.string.spatial_hand_head_changed) + !fresh -> context.getString(R.string.spatial_hand_timeout, HandObservation.MAX_AGE_NS / 1_000_000) + captureHead==null -> context.getString(R.string.spatial_hand_wait_sync) + accepted>0 && joyConMode -> context.getString(R.string.spatial_wrists_tracked, accepted) + accepted>0 -> context.getString(R.string.spatial_palms_tracked, accepted, hands.count { it.valid && it.triggerValid }, hands.count { it.valid && it.gripValid }) + dl.isEmpty() && dr.isEmpty() && joyConMode -> context.getString(R.string.spatial_no_wrists) + dl.isEmpty() && dr.isEmpty() -> context.getString(R.string.spatial_no_hands) + (dl.isEmpty() || dr.isEmpty()) && joyConMode -> context.getString(R.string.spatial_one_camera_wrists) + dl.isEmpty() || dr.isEmpty() -> context.getString(R.string.spatial_one_camera_hands) + matched==0 -> context.getString(R.string.spatial_ambiguous_hands) + reconstructed==0 -> context.getString(R.string.spatial_inconsistent_depth) + joyConMode -> context.getString(R.string.spatial_rejected_wrist) + else -> context.getString(R.string.spatial_inconsistent_palm) + },dl.size,dr.size,matched,reconstructed,accepted,preprocessMs,inferenceMs, + if(current && fresh) hands.count { it.valid && it.triggerValid } else 0, + if(current && fresh) hands.count { it.valid && it.gripValid } else 0, + pair.first.rawCount,pair.second.rawCount,bank.previousLeftRaw,bank.previousRightRaw, + pair.first.inferenceMs,pair.second.inferenceMs,bank.maxHands) + bank.previousLeftRaw=pair.first.rawCount;bank.previousRightRaw=pair.second.rawCount + } else { + clearHands() + val outcome=when { + !enabled -> HandObservationOutcome.DISABLED + c?.readyForTracking!=true -> HandObservationOutcome.CALIBRATION_REQUIRED + time<=0 -> HandObservationOutcome.CLOCK_NOT_READY + !SpatialTracking.session.isCurrentTrackingFrame(generation,trackingFrame) -> HandObservationOutcome.HEAD_TRACKING_INVALID + else -> HandObservationOutcome.STALE_OBSERVATION + } + for(side in 0..1) sideDiagnostics[side]=HandObservationDiagnostic(outcome) + nextStatus=HandTrackingDiagnostics(when { + !enabled -> context.getString(R.string.spatial_hands_off) + c?.readyForTracking!=true -> context.getString(R.string.spatial_hands_need_calibration) + captureHead==null -> context.getString(R.string.spatial_hand_wait_sync) + !SpatialTracking.session.isCurrentTrackingFrame(generation,trackingFrame) -> context.getString(R.string.spatial_hands_wait_stable) + else -> context.getString(R.string.spatial_old_frame) + }) + } + handMetrics.observe(seq,inferred,sideDiagnostics[0],sideDiagnostics[1]) + handStatus=nextStatus.copy(observationTimeNs=time, + observationAgeMs=if(time>0) (System.nanoTime()-time)/1e6f else -1f, + left=sideDiagnostics[0],right=sideDiagnostics[1],observations=handMetrics.snapshot()) + if(drawPreview) { + previewTime=start + if(bmpL==null) bmpL=Bitmap.createBitmap(w,h,Bitmap.Config.ARGB_8888) + if(bmpR==null) bmpR=Bitmap.createBitmap(w,h,Bitmap.Config.ARGB_8888) + Imgproc.cvtColor(grayL,rgba,Imgproc.COLOR_GRAY2RGBA);Utils.matToBitmap(rgba,bmpL) + Imgproc.cvtColor(grayR,rgba,Imgproc.COLOR_GRAY2RGBA);Utils.matToBitmap(rgba,bmpR) + val combined=Bitmap.createBitmap(w*2,h,Bitmap.Config.ARGB_8888);val canvas=Canvas(combined) + canvas.drawBitmap(bmpL!!,0f,0f,null);canvas.drawBitmap(bmpR!!,w.toFloat(),0f,null) + val paint=Paint().apply { color=Color.GREEN;strokeWidth=3f } + for((index,detections) in listOf(dl,dr).withIndex()) for(d in detections) for(p in d.points) + canvas.drawCircle(p.x.toFloat()+index*w,p.y.toFloat(),3f,paint) + preview=combined + } + if(record) { + record=false + val folder=File(context.filesDir,"spatial/captures/$receipt").apply { mkdirs() } + Imgcodecs.imwrite(File(folder,"left.png").path,grayL);Imgcodecs.imwrite(File(folder,"right.png").path,grayR) + File(folder,"frame.json").writeText(JSONObject().put("sourceSeconds",metadata[2]).put("receiptNs",receipt) + .put("connection",generation).put("width",w).put("height",h).put("pairedPose",captureHead!=null).toString()) + message=context.getString(R.string.spatial_capture_saved, folder.path) + } + if(running && generation==SpatialTracking.session.generation) { + val finished=System.nanoTime() + if(adaptiveInput && !gpu) processingRate.observe(finished-start,if(time>0) finished-time else -1,trackingHealthy) + SpatialTracking.statistics(c?.readyForTracking==true,frames,dropped,(finished-start)/1e6f, + if(time>0)(finished-time)/1e6f else -1f,rate,captureHead!=null, + when(copyPermille) { 500 -> 2;1000 -> 1;else -> 0 },metadata[8].toLong(),copyPermille) + SpatialTracking.publish(System.nanoTime()) + } + } + } catch(e: InterruptedException) { /* Shutdown interrupts the idle wait. */ } + catch(e: Throwable) { + message=context.getString(R.string.spatial_hand_error, e.message.orEmpty()) + val unavailable=HandObservationDiagnostic(HandObservationOutcome.INFERENCE_UNAVAILABLE) + handStatus=HandTrackingDiagnostics(message,left=unavailable,right=unavailable,observations=handMetrics.snapshot()) + calibrationProgress = calibrationProgress.copy(capturing = false, captureMessage = message, + validating = false, validationMessage = if(calibrationProgress.validating) message else calibrationProgress.validationMessage) + clearHands() + } + finally { + VitureSdk.nativeCapture(token,false,1000) + joyConFlow?.close();joyConFlow=null + closeDetectors() + calibration?.close();calibrator?.close() + listOf(grayL,grayR,rgba).forEach(Mat::release);bmpL?.recycle();bmpR?.recycle() + } + } + override fun close() { + running=false;worker.interrupt() + if(Thread.currentThread()!==worker) worker.join(2000) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/StereoInferenceRunner.kt b/app/src/main/java/com/droiddeck/launcher/glasses/StereoInferenceRunner.kt new file mode 100644 index 0000000000..351fe332e5 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/StereoInferenceRunner.kt @@ -0,0 +1,38 @@ +package com.droiddeck.launcher.glasses + +import java.util.concurrent.ExecutionException +import java.util.concurrent.Executors +import java.util.concurrent.Future + +internal class StereoInferenceRunner : AutoCloseable { + private val worker = Executors.newSingleThreadExecutor { task -> + Thread(task, "viture-right-hand").apply { isDaemon = true } + } + + fun <T> onRight(action: () -> T): T = worker.submit<T> { action() }.completed() + + fun <T> pair(left: () -> T, right: () -> T): Pair<T, T> { + val pending = worker.submit<T> { right() } + val result = try { left() } catch (error: Throwable) { + try { pending.completed() } catch (other: Throwable) { if (other !== error) error.addSuppressed(other) } + throw error + } + return result to pending.completed() + } + + override fun close() { worker.shutdown() } + + private fun <T> Future<T>.completed(): T { + var interrupted = false + try { + while (true) { + try { return get() } + catch (e: InterruptedException) { interrupted = true } + catch (e: ExecutionException) { throw e.cause ?: e } + } + } finally { + // Native inference must finish before either camera's pixels or detector can be reused. + if (interrupted) Thread.currentThread().interrupt() + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/StereoJoyConFlow.kt b/app/src/main/java/com/droiddeck/launcher/glasses/StereoJoyConFlow.kt new file mode 100644 index 0000000000..35b7e5b90a --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/StereoJoyConFlow.kt @@ -0,0 +1,72 @@ +package com.droiddeck.launcher.glasses + +import org.opencv.core.* +import org.opencv.video.Video + +internal class StereoJoyConFlow : AutoCloseable { + data class Points(val left: List<Point>, val right: List<Point>, val seedNs: Long) + private val previousLeft = Mat() + private val previousRight = Mat() + private val tracks = arrayOfNulls<Points>(2) + private var previousTime = 0L + + fun reset() { + previousTime = 0 + tracks.fill(null) + previousLeft.release(); previousRight.release() + } + + fun begin(left: Mat, right: Mat, time: Long) { + for (side in 0..1) { + val old = tracks[side] ?: continue + if (!JoyConFlowGate.fresh(old.seedNs, previousTime, time) || + previousLeft.size() != left.size() || previousRight.size() != right.size()) { + tracks[side] = null + continue + } + tracks[side] = try { + Points(follow(previousLeft, left, old.left), follow(previousRight, right, old.right), old.seedNs) + } catch (e: CvException) { + android.util.Log.w("StereoJoyConFlow", "Discarding failed optical flow", e) + null + } + } + } + + fun points(side: Int): Points? = tracks[side] + + fun seed(side: Int, left: Point, right: Point, time: Long) { + tracks[side] = Points(listOf(Point(left.x, left.y)), listOf(Point(right.x, right.y)), time) + } + + fun end(left: Mat, right: Mat, time: Long) { + left.copyTo(previousLeft); right.copyTo(previousRight); previousTime = time + } + + private fun follow(previous: Mat, current: Mat, points: List<Point>): List<Point> { + val indices = points.indices.filter { points[it].x.isFinite() && points[it].y.isFinite() } + val result = MutableList(points.size) { missing() } + if (indices.isEmpty()) return result + val before = MatOfPoint2f(*indices.map { points[it] }.toTypedArray()) + val after = MatOfPoint2f(); val back = MatOfPoint2f() + val forwardStatus = MatOfByte(); val backStatus = MatOfByte() + val error = MatOfFloat(); val backError = MatOfFloat() + try { + Video.calcOpticalFlowPyrLK(previous, current, before, after, forwardStatus, error) + Video.calcOpticalFlowPyrLK(current, previous, after, back, backStatus, backError) + val next = after.toArray(); val returned = back.toArray() + val valid = forwardStatus.toArray(); val validBack = backStatus.toArray(); val errors = error.toArray() + for ((i, index) in indices.withIndex()) { + val n = next[i]; val b = returned[i]; val p = points[index] + if (JoyConFlowGate.point(n.x,n.y,b.x,b.y,p.x,p.y,errors[i],valid[i].toInt()!=0, + validBack[i].toInt()!=0,current.cols(),current.rows())) result[index] = n + } + } finally { + listOf(before, after, back, forwardStatus, backStatus, error, backError).forEach(Mat::release) + } + return result + } + + private fun missing() = Point(Double.NaN, Double.NaN) + override fun close() = reset() +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/StereoPointValidation.kt b/app/src/main/java/com/droiddeck/launcher/glasses/StereoPointValidation.kt new file mode 100644 index 0000000000..26f1c0cdcf --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/StereoPointValidation.kt @@ -0,0 +1,21 @@ +package com.droiddeck.launcher.glasses + +import kotlin.math.abs +import kotlin.math.hypot + +internal object StereoPointValidation { + fun reconstruct(homogeneous: DoubleArray, left: DoubleArray, right: DoubleArray, + p1: DoubleArray, p2: DoubleArray): SpatialVector? { + if (homogeneous.size != 4 || left.size != 2 || right.size != 2 || p1.size != 12 || p2.size != 12) return null + val w = homogeneous[3] + if (!w.isFinite() || abs(w) < 1e-8) return null + val v = DoubleArray(3) { homogeneous[it]/w } + if (v.any { !it.isFinite() } || v[2] !in 0.15..1.5) return null + for ((projection,pixel) in listOf(p1 to left,p2 to right)) { + val q = DoubleArray(3) { row -> (0..2).sumOf { projection[row*4+it]*v[it] } + projection[row*4+3] } + if (q.any { !it.isFinite() } || pixel.any { !it.isFinite() } || q[2] <= 0 || + hypot(q[0]/q[2]-pixel[0],q[1]/q[2]-pixel[1]) > 3.0) return null + } + return SpatialVector(v[0].toFloat(),v[1].toFloat(),v[2].toFloat()) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/TrackingRecovery.kt b/app/src/main/java/com/droiddeck/launcher/glasses/TrackingRecovery.kt new file mode 100644 index 0000000000..aeba262236 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/TrackingRecovery.kt @@ -0,0 +1,17 @@ +package com.droiddeck.launcher.glasses + +internal enum class TrackingRecovery { + DISCONNECTED, LOST, RECENTER, STABILIZING; + + companion object { + fun forSession(active: Boolean, connected: Boolean, status: SpatialTrackingStatus): TrackingRecovery? = when { + !active -> null + !connected -> DISCONNECTED + status.trackingValid -> null + !status.headFresh -> LOST + status.recenterPending -> STABILIZING + status.needsRecenter -> RECENTER + else -> LOST + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/UvcRgbDiagnostic.kt b/app/src/main/java/com/droiddeck/launcher/glasses/UvcRgbDiagnostic.kt new file mode 100644 index 0000000000..6bd9c6b151 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/UvcRgbDiagnostic.kt @@ -0,0 +1,32 @@ +package com.droiddeck.launcher.glasses + +internal object UvcRgbDiagnostic { + val available: Boolean by lazy { + runCatching { System.loadLibrary("droiddeck_uvc"); true } + .onFailure { android.util.Log.w("UvcRgbDiagnostic", "Direct UVC transport unavailable", it) }.getOrDefault(false) + } + external fun nativeSnapshot(fd: Int, width: Int, height: Int, fps: Int, durationMs: Int, + metadata: LongArray, logFd: Int): ByteArray? +} + +internal data class UvcStreamHealth(val observationMs: Double, val observedFps: Double, + val maximumGapMs: Double, val healthy: Boolean) { + companion object { + // Health requires the full requested window, 80% of requested FPS, and no gap + // (including the final silent interval) above max(250 ms, three frame periods). + fun assess(metadata: LongArray, requestedFps: Int, durationMs: Int): UvcStreamHealth { + require(metadata.size == 14 && requestedFps > 0 && durationMs > 0) + val first = metadata[7] + val last = metadata[6] + val end = metadata[12] + val window = if (first > 0 && end > first) end-first else 0 + val frames = metadata[9] + val fps = if (window > 0 && frames > 1) (frames-1)*1e9/window else 0.0 + val maximumGapMs = maxOf(metadata[8],metadata[13],(end-last).coerceAtLeast(0))/1e6 + val healthy = metadata[4] == 0L && first > 0 && last in first..end && frames >= 2 && + window >= durationMs*1_000_000L && fps >= requestedFps*0.8 && + maximumGapMs <= maxOf(250.0,3000.0/requestedFps) + return UvcStreamHealth(window/1e6,fps,maximumGapMs,healthy) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/VitureLink.kt b/app/src/main/java/com/droiddeck/launcher/glasses/VitureLink.kt new file mode 100644 index 0000000000..3c6497a573 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/VitureLink.kt @@ -0,0 +1,134 @@ +package com.droiddeck.launcher.glasses + +import android.hardware.usb.UsbConstants +import android.hardware.usb.UsbDevice +import android.hardware.usb.UsbDeviceConnection +import android.hardware.usb.UsbEndpoint +import android.hardware.usb.UsbInterface +import android.hardware.usb.UsbManager +import android.os.SystemClock +import android.util.Log +import java.util.concurrent.atomic.AtomicLong + +internal class VitureLink private constructor( + private val connection: UsbDeviceConnection, + private val mcu: UsbInterface, + private val mcuOut: UsbEndpoint, + private val mcuIn: UsbEndpoint?, + private val imu: UsbInterface?, + private val imuIn: UsbEndpoint?, + private val listener: Listener, +) : GlassesLink { + interface Listener { + fun onFrame(frame: VitureProtocol.Frame) + fun onImu(payload: ByteArray, timeNs: Long) + fun onLost() + } + + @Volatile private var running = true + private val writeLock = Any() + private var lastSendAt = 0L + private val readers = mutableListOf<Thread>() + private val bad = AtomicLong() + + override val hasImu: Boolean get() = imuIn != null + override val badFrames: Long get() = bad.get() + + private fun startReaders() { + mcuIn?.let { ep -> readers += reader("viture-mcu", ep) { buf, n -> onPacket(buf, n, false) } } + imuIn?.let { ep -> + readers += reader("viture-imu", ep) { buf, n -> onPacket(buf, n, true) } + } + } + + private fun onPacket(buf: ByteArray, size: Int, imuEndpoint: Boolean) { + val frame = VitureProtocol.parse(buf, size) ?: return + if (!frame.crcOk) { + if (bad.incrementAndGet() == 1L) Log.w(TAG, "dropping frames with a bad checksum") + return + } + if (imuEndpoint && frame.magic == VitureProtocol.MAGIC_IMU) + listener.onImu(frame.payload, SystemClock.elapsedRealtimeNanos()) + else listener.onFrame(frame) + } + + private fun reader(name: String, ep: UsbEndpoint, onPacket: (ByteArray, Int) -> Unit): Thread = + Thread({ + val buf = ByteArray(VitureProtocol.PACKET_SIZE) + var failures = 0 + while (running) { + val started = SystemClock.uptimeMillis() + val n = connection.bulkTransfer(ep, buf, buf.size, READ_TIMEOUT_MS) + if (!running) break + if (n > 0) { + failures = 0 + runCatching { onPacket(buf, n) }.onFailure { Log.w(TAG, "$name packet", it) } + } else if (n < 0 && SystemClock.uptimeMillis() - started < READ_TIMEOUT_MS / 2) { + failures++ + SystemClock.sleep(2) + if (failures >= LOST_AFTER) { + Log.w(TAG, "$name: reads keep failing, link lost") + if (running) listener.onLost() + break + } + } + } + }, name).apply { isDaemon = true; priority = Thread.MAX_PRIORITY; start() } + + override fun send(msgId: Int, payload: ByteArray): Boolean { + val pkt = VitureProtocol.packet(msgId, payload) + val n = synchronized(writeLock) { + if (!running) return false + val wait = lastSendAt + COMMAND_GAP_MS - SystemClock.uptimeMillis() + if (wait > 0) SystemClock.sleep(wait) + connection.bulkTransfer(mcuOut, pkt, pkt.size, WRITE_TIMEOUT_MS).also { lastSendAt = SystemClock.uptimeMillis() } + } + Log.i(TAG, "send 0x%04X [%s] -> %d".format(msgId, payload.joinToString("") { "%02X".format(it) }, n)) + return n == pkt.size + } + + override fun close() { + synchronized(writeLock) { running = false } + val self = Thread.currentThread() + readers.forEach { if (it !== self) runCatching { it.join(READ_TIMEOUT_MS * 4L) } } + runCatching { connection.releaseInterface(mcu) } + imu?.let { runCatching { connection.releaseInterface(it) } } + runCatching { connection.close() } + } + + companion object { + private const val TAG = "VitureLink" + private const val READ_TIMEOUT_MS = 100 + private const val WRITE_TIMEOUT_MS = 250 + private const val LOST_AFTER = 50 + const val COMMAND_GAP_MS = 60L + + fun open(usb: UsbManager, device: UsbDevice, listener: Listener): VitureLink? { + val hid = (0 until device.interfaceCount).map(device::getInterface) + .filter { it.interfaceClass == UsbConstants.USB_CLASS_HID } + .sortedBy { it.id } + for (intf in hid) Log.i(TAG, "iface ${intf.id} eps " + (0 until intf.endpointCount).joinToString { + val ep = intf.getEndpoint(it) + "0x%02X".format(ep.address) + }) + val mcu = hid.lastOrNull { it.outEndpoint() != null } ?: return null + val imu = hid.firstOrNull { it.id != mcu.id && it.inEndpoint() != null } + val conn = usb.openDevice(device) ?: return null + if (!conn.claimInterface(mcu, true)) { + conn.close() + return null + } + val imuClaimed = imu != null && conn.claimInterface(imu, true) + val link = VitureLink(conn, mcu, mcu.outEndpoint()!!, mcu.inEndpoint(), + imu.takeIf { imuClaimed }, imu.takeIf { imuClaimed }?.inEndpoint(), listener) + link.startReaders() + return link + } + + private fun UsbInterface.outEndpoint(): UsbEndpoint? = (0 until endpointCount).map(::getEndpoint) + .firstOrNull { it.direction == UsbConstants.USB_DIR_OUT && it.type == UsbConstants.USB_ENDPOINT_XFER_INT } + + private fun UsbInterface.inEndpoint(): UsbEndpoint? = (0 until endpointCount).map(::getEndpoint) + .firstOrNull { it.direction == UsbConstants.USB_DIR_IN && it.type == UsbConstants.USB_ENDPOINT_XFER_INT } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/VitureProtocol.kt b/app/src/main/java/com/droiddeck/launcher/glasses/VitureProtocol.kt new file mode 100644 index 0000000000..4d3147d65d --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/VitureProtocol.kt @@ -0,0 +1,196 @@ +package com.droiddeck.launcher.glasses + +import kotlin.math.cos +import kotlin.math.sin +import kotlin.math.sqrt + +object VitureProtocol { + const val VENDOR_ID = 0x35CA + const val PACKET_SIZE = 64 + private const val HEADER = 0x12 + + const val MAGIC_COMMAND = 0xFE + const val MAGIC_REPORT = 0xFD + const val MAGIC_IMU = 0xFC + + const val MSG_GET_BRIGHTNESS = 0x0005 + const val MSG_BRIGHTNESS = 0x0006 + const val MSG_GET_DISPLAY = 0x0007 + const val MSG_DISPLAY = 0x0008 + const val MSG_FILM = 0x000E + const val MSG_IMU = 0x0015 + const val MSG_GET_IMU = 0x0017 + const val MSG_IMU_RATE = 0x0018 + const val MSG_GET_VOLUME = 0x0032 + const val MSG_VOLUME = 0x0033 + + const val EVENT_BRIGHTNESS = 0x0301 + const val EVENT_DISPLAY = 0x0302 + const val EVENT_VOLUME = 0x0304 + const val EVENT_DISPLAY_STEP = 0x030D + + const val IMU_RATE_240 = 3 + + enum class Family { ONE, PRO, LUMA, ULTRA, BEAST, PRO2 } + + class Model(override val name: String, val family: Family) : GlassesModel { + override val controllable: Boolean get() = true + val needsSdk: Boolean get() = family == Family.ULTRA || family == Family.BEAST || family == Family.PRO2 + val tall: Boolean get() = family == Family.LUMA || family == Family.ULTRA || family == Family.BEAST + override val sbs90: Boolean get() = family == Family.ULTRA + override val brightnessMax: Int get() = 8 + override val volumeMax: Int get() = if (family == Family.BEAST) 15 else 8 + override val hasSunblock: Boolean get() = family != Family.PRO2 + override val diagonalFovDeg: Float get() = when (family) { + Family.ONE -> 43f + Family.PRO -> 46f + Family.PRO2, Family.LUMA, Family.ULTRA -> 50f + Family.BEAST -> 58f + } + + override val resolutions: List<GlassesResolution> get() = buildList { + add(GlassesResolution(1920, 1080)) + if (tall) add(GlassesResolution(1920, 1200)) + } + + override fun mode(hz: Int, sbs: Boolean): Int = mode(hz, sbs, null) + + override fun mode(hz: Int, sbs: Boolean, resolution: GlassesResolution?): Int { + val useTall = tall && (resolution == null || resolution !in resolutions || resolution.height == 1200) + return when { + useTall && sbs -> if (hz >= 90 && sbs90) 0x45 else 0x42 + useTall -> when { hz >= 120 -> 0x44; hz >= 90 -> 0x43; else -> 0x41 } + sbs -> if (hz >= 90 && sbs90) 0x35 else 0x32 + else -> when { hz >= 120 -> 0x34; hz >= 90 -> 0x33; else -> 0x31 } + } + } + + override fun modeForStep(step: Int): Int? = if (tall) null else when (step) { + 1 -> 0x31 + 2 -> 0x33 + 3 -> 0x34 + 4 -> 0x32 + else -> null + } + } + + /** SDK validates the PID before returning this market name. Never guess a new PID. */ + fun sdkModel(marketName: String): Model? { + val family = when (marketName) { + "One", "Lite" -> Family.ONE + "Pro" -> Family.PRO + "Pro 2" -> Family.PRO2 + "Luma", "Luma Pro", "Luma Cyber" -> Family.LUMA + "Luma Ultra" -> Family.ULTRA + "Beast" -> Family.BEAST + else -> return null + } + return Model("VITURE $marketName", family) + } + + fun model(productId: Int, productName: String?): Model? { + val family = when (productId) { + 0x1011, 0x1013, 0x1015, 0x1017, 0x101b -> Family.ONE + 0x1019, 0x101d -> Family.PRO + 0x1121, 0x1131, 0x1141, 0x1151 -> Family.LUMA + 0x1101, 0x1104 -> Family.ULTRA + 0x1201, 0x1211 -> Family.BEAST + else -> return null + } + val fallback = when (productId) { + 0x1015, 0x101b -> "VITURE One Lite" + 0x1011, 0x1013, 0x1017 -> "VITURE One" + 0x1019 -> "VITURE Pro" + 0x101d -> "VITURE Pro XR" + 0x1131 -> "VITURE Luma" + 0x1121, 0x1141, 0x1151 -> "VITURE Luma Pro" + 0x1101, 0x1104 -> "VITURE Luma Ultra" + else -> "VITURE Beast" + } + val name = productName?.trim()?.removeSuffix(" Glasses")?.takeIf { it.startsWith("VITURE", ignoreCase = true) } ?: fallback + return Model(name, family) + } + + private val CRC_TABLE = IntArray(256) { i -> + var c = i shl 8 + repeat(8) { c = if (c and 0x8000 != 0) (c shl 1) xor 0x1021 else c shl 1 } + c and 0xFFFF + } + + fun crc16(data: ByteArray, offset: Int, length: Int): Int { + var crc = 0 + for (i in offset until offset + length) { + crc = (CRC_TABLE[((data[i].toInt() and 0xFF) xor (crc ushr 8)) and 0xFF] xor (crc shl 8)) and 0xFFFF + } + return crc + } + + fun packet(msgId: Int, payload: ByteArray = ByteArray(0)): ByteArray { + require(payload.size <= PACKET_SIZE - HEADER) + val buf = ByteArray(PACKET_SIZE) + buf[0] = 0xFF.toByte() + buf[1] = MAGIC_COMMAND.toByte() + val len = payload.size + 0x0C + buf[4] = len.toByte() + buf[5] = (len shr 8).toByte() + buf[14] = msgId.toByte() + buf[15] = (msgId shr 8).toByte() + payload.copyInto(buf, HEADER) + val crc = crc16(buf, 4, len + 2) + buf[2] = crc.toByte() + buf[3] = (crc shr 8).toByte() + return buf + } + + class Frame(val magic: Int, val msgId: Int, val payload: ByteArray, val crcOk: Boolean) + + fun parse(buf: ByteArray, size: Int): Frame? { + if (size < HEADER || size > buf.size || (buf[0].toInt() and 0xFF) != 0xFF) return null + val magic = buf[1].toInt() and 0xFF + if (magic != MAGIC_COMMAND && magic != MAGIC_REPORT && magic != MAGIC_IMU) return null + val len = u16(buf, 4) + if (len < 0x0C || len + 6 > size) return null + val dataLen = len - 0x0C + val crcOk = crc16(buf, 4, len + 2) == u16(buf, 2) + return Frame(magic, u16(buf, 14), buf.copyOfRange(HEADER, HEADER + dataLen), crcOk) + } + + private fun u16(buf: ByteArray, at: Int) = (buf[at].toInt() and 0xFF) or ((buf[at + 1].toInt() and 0xFF) shl 8) + + fun beFloat(b: ByteArray, at: Int): Float = java.lang.Float.intBitsToFloat( + ((b[at].toInt() and 0xFF) shl 24) or ((b[at + 1].toInt() and 0xFF) shl 16) or + ((b[at + 2].toInt() and 0xFF) shl 8) or (b[at + 3].toInt() and 0xFF), + ) + + fun imuQuaternion(payload: ByteArray): FloatArray? { + if (payload.size >= 36) { + val w = beFloat(payload, 20) + val x = beFloat(payload, 24) + val y = beFloat(payload, 28) + val z = beFloat(payload, 32) + val n = sqrt(w * w + x * x + y * y + z * z) + if (n.isFinite() && n > 0.9f && n < 1.1f) return floatArrayOf(x / n, y / n, z / n, w / n) + } + if (payload.size < 12) return null + val roll = beFloat(payload, 0) + val pitch = beFloat(payload, 4) + val yaw = beFloat(payload, 8) + if (!roll.isFinite() || !pitch.isFinite() || !yaw.isFinite()) return null + return eulerZxy(roll, pitch, yaw) + } + + fun eulerZxy(rollDeg: Float, pitchDeg: Float, yawDeg: Float): FloatArray { + val r = Math.toRadians(rollDeg.toDouble()) / 2 + val p = Math.toRadians(pitchDeg.toDouble()) / 2 + val y = Math.toRadians(yawDeg.toDouble()) / 2 + val cx = cos(r); val sx = sin(r) + val cy = cos(p); val sy = sin(p) + val cz = cos(y); val sz = sin(y) + return floatArrayOf( + (sx * cy * cz - cx * sy * sz).toFloat(), + (cx * sy * cz + sx * cy * sz).toFloat(), + (cx * cy * sz + sx * sy * cz).toFloat(), + (cx * cy * cz - sx * sy * sz).toFloat(), + ) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/VitureSdk.kt b/app/src/main/java/com/droiddeck/launcher/glasses/VitureSdk.kt new file mode 100644 index 0000000000..1b5f09e3d9 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/VitureSdk.kt @@ -0,0 +1,65 @@ +package com.droiddeck.launcher.glasses + +import android.util.Log +import kotlin.math.sqrt + +/** JNI adapter to VITURE's Android C SDK. The vendor binary is a local build input. */ +internal object VitureSdk { + val available: Boolean by lazy { + runCatching { + System.loadLibrary("droiddeck_viture") + nativeAvailable() + }.onFailure { Log.w("VitureSdk", "VITURE driver unavailable", it) }.getOrDefault(false) + } + + fun marketName(pid: Int): String? = if (available) nativeMarketName(pid) else null + external fun nativeAvailable(): Boolean + external fun nativeMarketName(pid: Int): String? + external fun nativeOpen(pid: Int, fd: Int, cacheDirectory: String, spatial: Boolean = false): Long + external fun nativeSpatialPose(token: Long, pose: FloatArray, state: IntArray): Long + external fun nativeCapture(token: Long, enabled: Boolean, ratePermille: Int) + external fun nativeStereo(token: Long, left: java.nio.ByteBuffer, right: java.nio.ByteBuffer, metadata: DoubleArray, head: FloatArray, waitForPose: Boolean): Long + external fun nativeCameraSynchronized(token: Long, sourceSeconds: Double): Boolean + external fun nativeRgbSnapshot(vid: Int, pid: Int, fd: Int, metadata: LongArray, logFd: Int): ByteArray? + external fun nativeType(token: Long): Int + external fun nativeFirmware(token: Long): String? + external fun nativeSerialHash(token: Long): ByteArray? + external fun nativeSpatialDiagnostics(token: Long): DoubleArray? + external fun nativeTracking(token: Long, enabled: Boolean): Int + external fun nativeCommand(token: Long, command: Int, value: Int): Int + /** Returns CLOCK_BOOTTIME receipt time, zero for no new pose, or a negative SDK error. */ + external fun nativePose(token: Long, wxyz: FloatArray): Long + external fun nativeNextState(token: Long, event: IntArray): Int + external fun nativeClose(token: Long) + + const val CARINA = 2 + const val GET_DISPLAY = 1 + const val SET_DISPLAY = 2 + const val GET_BRIGHTNESS = 3 + const val SET_BRIGHTNESS = 4 + const val GET_VOLUME = 5 + const val SET_VOLUME = 6 + const val SET_FILM = 7 +} + +internal object VitureSpatialIdentity { + fun fromSerialHash(hash: ByteArray?): String? = hash?.takeIf { it.size == 32 && it.any { b -> b != 0.toByte() } } + ?.joinToString("", prefix = "viture:sn-sha256:") { "%02x".format(it.toInt() and 0xff) } +} + +internal object VitureSdkPose { + // Pro 2 hardware captures use OpenGL axes despite the generic Gen2 callback's + // NWU documentation. Keep that model-specific exception out of other Gen2 devices. + fun usesOpenGlAxes(carina: Boolean, family: VitureProtocol.Family?) = + carina || family == VitureProtocol.Family.PRO2 + + /** SDK quaternions are wxyz; normalize their coordinate basis at the boundary. */ + fun toGlasses(wxyz: FloatArray, openGlAxes: Boolean): FloatArray? { + if (wxyz.size != 4 || wxyz.any { !it.isFinite() }) return null + val length = sqrt(wxyz.sumOf { it.toDouble() * it }.toFloat()) + if (!length.isFinite() || length < 0.5f || length > 1.5f) return null + val q = if (openGlAxes) floatArrayOf(-wxyz[3], -wxyz[1], wxyz[2], wxyz[0]) + else floatArrayOf(wxyz[1], wxyz[2], wxyz[3], wxyz[0]) + return q.map { it / length }.toFloatArray() + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/VitureSdkLink.kt b/app/src/main/java/com/droiddeck/launcher/glasses/VitureSdkLink.kt new file mode 100644 index 0000000000..36ceedf6e7 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/VitureSdkLink.kt @@ -0,0 +1,149 @@ +package com.droiddeck.launcher.glasses + +import android.hardware.usb.UsbDevice +import android.hardware.usb.UsbDeviceConnection +import android.hardware.usb.UsbManager +import android.os.SystemClock +import android.util.Log +import java.io.File + +/** SDK owns interface selection (including Ultra bulk endpoints) and all USB I/O. */ +internal class VitureSdkLink private constructor( + private val connection: UsbDeviceConnection, + private val token: Long, + private val listener: Listener, + family: VitureProtocol.Family?, + private val spatial: Boolean, +) : GlassesLink { + interface Listener { + fun onValue(msgId: Int, value: Int) + fun onPose(q: FloatArray, timeNs: Long) + fun onSpatial(pose: FloatArray, timeNs: Long, valid: Boolean) {} + fun onLost() + } + + internal val sdkToken get() = token + internal val spatialEnabled get() = spatial + internal val firmware = VitureSdk.nativeFirmware(token) + internal fun spatialDiagnostics() = if (running && spatial) VitureSdk.nativeSpatialDiagnostics(token) else null + internal val isCarina = VitureSdk.nativeType(token) == VitureSdk.CARINA + internal val spatialIdentity = if (isCarina) VitureSpatialIdentity.fromSerialHash(VitureSdk.nativeSerialHash(token)) else null + private val lock = Any() + @Volatile private var running = true + @Volatile private var tracking = false + override val ready: Boolean get() = running + override val hasImu = true + private val openGlAxes = VitureSdkPose.usesOpenGlAxes(VitureSdk.nativeType(token) == VitureSdk.CARINA, family) + private val worker = Thread({ poll() }, "viture-sdk-pose").apply { isDaemon = true; start() } + + override fun send(msgId: Int, payload: ByteArray): Boolean = synchronized(lock) { + if (!running) return false + val value = payload.firstOrNull()?.toInt()?.and(0xff) ?: 0 + when (msgId) { + VitureProtocol.MSG_IMU -> { + val wanted = value != 0 + if (wanted == tracking) return true + val rc = VitureSdk.nativeTracking(token, wanted) + if (rc == 0 || !wanted) tracking = wanted + return result("tracking", rc) + } + // Frequency is negotiated against SDK capabilities, including Pro 2's pose limit. + VitureProtocol.MSG_IMU_RATE -> return tracking + VitureProtocol.MSG_GET_IMU -> return true + } + val operation = when (msgId) { + VitureProtocol.MSG_GET_DISPLAY -> VitureSdk.GET_DISPLAY + VitureProtocol.MSG_DISPLAY -> VitureSdk.SET_DISPLAY + VitureProtocol.MSG_GET_BRIGHTNESS -> VitureSdk.GET_BRIGHTNESS + VitureProtocol.MSG_BRIGHTNESS -> VitureSdk.SET_BRIGHTNESS + VitureProtocol.MSG_GET_VOLUME -> VitureSdk.GET_VOLUME + VitureProtocol.MSG_VOLUME -> VitureSdk.SET_VOLUME + VitureProtocol.MSG_FILM -> VitureSdk.SET_FILM + else -> return false + } + val rc = VitureSdk.nativeCommand(token, operation, value) + if (rc < 0) return result("command $operation", rc) + if (operation == VitureSdk.GET_DISPLAY || operation == VitureSdk.GET_BRIGHTNESS || operation == VitureSdk.GET_VOLUME) + listener.onValue(msgId, rc) + else if (operation == VitureSdk.SET_DISPLAY) { + val actual = VitureSdk.nativeCommand(token, VitureSdk.GET_DISPLAY, 0) + if (actual >= 0) listener.onValue(VitureProtocol.MSG_GET_DISPLAY, actual) + } + true + } + + private fun result(operation: String, rc: Int): Boolean { + if (rc < 0) Log.w("VitureSdkLink", "$operation failed: $rc") + return rc == 0 + } + + private fun poll() { + val pose = FloatArray(4) + val spatialPose = FloatArray(7) + val spatialStatus = IntArray(1) + val event = IntArray(2) + var failures = 0 + while (running) { + val timestamp = synchronized(lock) { + if (running) repeat(6) { + if (VitureSdk.nativeNextState(token, event) == 1) when (event[0]) { + 0 -> listener.onValue(VitureProtocol.MSG_GET_BRIGHTNESS, event[1]) + 1 -> listener.onValue(VitureProtocol.MSG_GET_VOLUME, event[1]) + // A device event can use a different display-mode namespace. + 2 -> send(VitureProtocol.MSG_GET_DISPLAY) + 3 -> listener.onValue(VitureProtocol.MSG_FILM, event[1]) + } + } + if (!running || !tracking) 0L else if (spatial && isCarina) { + val time = VitureSdk.nativeSpatialPose(token, spatialPose, spatialStatus) + if (time > 0) listener.onSpatial(spatialPose, time, spatialStatus[0] == 0) + if (spatialStatus[0] == 0) { + spatialPose.copyInto(pose, 0, 3, 7) + time + } else if (spatialStatus[0] < 0) spatialStatus[0].toLong() else 0L + } else VitureSdk.nativePose(token, pose) + } + if (timestamp > 0) { + failures = 0 + VitureSdkPose.toGlasses(pose, openGlAxes)?.let { listener.onPose(it, timestamp) } + } else if (timestamp == -2L || timestamp == -3L) { + if (++failures >= 10) { + Log.w("VitureSdkLink", "closing after $failures pose USB errors; last SDK result: $timestamp") + listener.onLost() + break + } + } + SystemClock.sleep(if (tracking) 4 else 25) + } + } + + override fun close() { + synchronized(lock) { + if (!running) return + running = false + VitureSdk.nativeClose(token) + // Keep Java's descriptor alive until the SDK and its worker threads have stopped. + connection.close() + } + if (Thread.currentThread() !== worker) worker.join(1000) + } + + companion object { + fun open(usb: UsbManager, device: UsbDevice, cacheDirectory: File, listener: Listener, + family: VitureProtocol.Family? = null, spatial: Boolean = false): VitureSdkLink? { + if (!VitureSdk.available) return null + val conn = usb.openDevice(device) ?: return null + val token = runCatching { + cacheDirectory.mkdirs() + VitureSdk.nativeOpen(device.productId, conn.fileDescriptor, cacheDirectory.absolutePath, spatial) + }.onFailure { Log.w("VitureSdkLink", "SDK initialization failed", it) }.getOrDefault(0) + if (token <= 0) { conn.close(); return null } + return runCatching { VitureSdkLink(conn, token, listener, family, spatial) }.getOrElse { + VitureSdk.nativeClose(token) + conn.close() + Log.w("VitureSdkLink", "SDK worker could not start", it) + null + } + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/XrealConnection.kt b/app/src/main/java/com/droiddeck/launcher/glasses/XrealConnection.kt new file mode 100644 index 0000000000..3dbd22eb3b --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/XrealConnection.kt @@ -0,0 +1,88 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import android.net.ConnectivityManager +import android.net.LinkProperties +import android.net.NetworkCapabilities +import java.io.Closeable +import java.io.IOException +import java.io.InputStream +import java.io.OutputStream +import java.net.InetAddress +import java.net.InetSocketAddress +import java.net.Socket + +internal interface XrealChannels : Closeable { + val controlInput: InputStream + val controlOutput: OutputStream + val reports: InputStream +} + +internal interface XrealConnector : Closeable { + fun connect(): XrealChannels +} + +internal class XrealNetworkMissing : IOException("XREAL USB Ethernet network is not available") + +/** Bind individual sockets, never the process: Steam must retain its Internet network. */ +internal class AndroidXrealConnector(context: Context) : XrealConnector { + private val manager = context.getSystemService(ConnectivityManager::class.java) + private val address = InetAddress.getByName(XrealProtocol.HOST) + private val lock = Any() + private val sockets = mutableSetOf<Socket>() + private var closed = false + + companion object { + internal fun hasDirectRoute(properties: LinkProperties, address: InetAddress): Boolean = + properties.routes.any { !it.hasGateway() && it.destination.prefixLength > 0 && it.matches(address) } + } + + override fun connect(): XrealChannels { + val network = manager.allNetworks.firstOrNull { network -> + manager.getNetworkCapabilities(network)?.let { + it.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET) && + !it.hasTransport(NetworkCapabilities.TRANSPORT_VPN) + } == true && manager.getLinkProperties(network)?.let { hasDirectRoute(it, address) } == true + } ?: throw XrealNetworkMissing() + fun open(port: Int): Socket { + val socket = Socket() + synchronized(lock) { + if (closed) { socket.close(); throw IOException("XREAL connection closed") } + sockets.add(socket) + } + try { + network.bindSocket(socket) + socket.soTimeout = 2000 + socket.tcpNoDelay = true + socket.connect(InetSocketAddress(address, port), 1500) + return socket + } catch (e: Exception) { + release(socket) + throw e + } + } + val control = open(XrealProtocol.CONTROL_PORT) + val reportSocket = try { open(XrealProtocol.REPORT_PORT) } catch (e: Exception) { + release(control) + throw e + } + return object : XrealChannels { + override val controlInput = control.getInputStream() + override val controlOutput = control.getOutputStream() + override val reports = reportSocket.getInputStream() + override fun close() { release(control); release(reportSocket) } + } + } + + private fun release(socket: Socket) = synchronized(lock) { + runCatching { socket.close() } + sockets.remove(socket) + Unit + } + + override fun close() = synchronized(lock) { + closed = true + sockets.forEach { runCatching { it.close() } } + sockets.clear() + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/XrealLink.kt b/app/src/main/java/com/droiddeck/launcher/glasses/XrealLink.kt new file mode 100644 index 0000000000..86f93fbef5 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/XrealLink.kt @@ -0,0 +1,201 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import android.util.Log +import java.io.IOException +import java.util.concurrent.ArrayBlockingQueue +import java.util.concurrent.TimeUnit +import java.util.concurrent.atomic.AtomicReference + +/** One connection owns two TCP channels. All control requests are serialized off the UI thread. */ +internal class XrealLink internal constructor( + private val connector: XrealConnector, + private val listener: Listener, +) : GlassesLink { + interface Listener { + fun onReady() + fun onValue(message: Int, value: Int) + fun onPose(raw: ByteArray, pose: FloatArray, timeNs: Long) + fun onUnavailable(networkMissing: Boolean) + } + + private data class Command(val message: Int, val value: Int) + private val commands = ArrayBlockingQueue<Command>(16) + private val connection = AtomicReference<XrealChannels?>() + @Volatile private var running = true + @Volatile private var tracking = false + @Volatile override var ready = false + private set + override val hasImu = true + private val worker = Thread(::run, "xreal-control").apply { isDaemon = true; start() } + + companion object { + fun open(context: Context, listener: Listener) = XrealLink(AndroidXrealConnector(context), listener) + } + + override fun send(msgId: Int, payload: ByteArray): Boolean { + if (!running || !ready) return false + val value = payload.firstOrNull()?.toInt()?.and(255) ?: -1 + if (msgId == VitureProtocol.MSG_IMU) { + if (value !in 0..1) return false + tracking = value == 1 + return true + } + if (msgId == VitureProtocol.MSG_GET_IMU) return true + val valid = when (msgId) { + VitureProtocol.MSG_GET_DISPLAY -> true + VitureProtocol.MSG_DISPLAY -> value in 2..5 || value == XrealModel.NATIVE_60HZ + VitureProtocol.MSG_BRIGHTNESS -> value in 0..9 + VitureProtocol.MSG_FILM -> value in 0..1 + else -> false // No guessed volume, sensor-rate, or VITURE wire commands. + } + return valid && commands.offer(Command(msgId, value)) + } + + private fun run() { + var lastError: String? = null + while (running) { + var channels: XrealChannels? = null + var reports: Thread? = null + val failure = AtomicReference<Exception?>() + try { + channels = connector.connect() + connection.set(channels) + if (!running) break + val control = XrealControl(channels) + listener.onValue(VitureProtocol.MSG_GET_DISPLAY, control.display()) + val current = channels + reports = Thread({ + try { + var filter = XrealOrientationFilter() + var wasTracking = false + var lastSensor = System.nanoTime() + while (running && connection.get() === current) { + val frame = XrealProtocol.read(current.reports) + val sample = XrealProtocol.sample(frame) + if (sample != null) { + lastSensor = System.nanoTime() + val enabled = tracking + if (enabled && !wasTracking) filter = XrealOrientationFilter() + wasTracking = enabled + if (enabled) filter.update(sample)?.let { + if (running && ready && tracking && connection.get() === current) + listener.onPose(frame.body, it, System.nanoTime()) + } + } else if (System.nanoTime() - lastSensor > 3_000_000_000L) { + throw IOException("No valid XREAL IMU reports") + } + } + } catch (e: Exception) { + failure.set(e) + current.close() // Wake a control read immediately. + } + }, "xreal-reports").apply { isDaemon = true; start() } + ready = true + lastError = null + listener.onReady() + var heartbeat = System.nanoTime() + while (running && failure.get() == null) { + val command = commands.poll(250, TimeUnit.MILLISECONDS) + if (command != null) { + when (command.message) { + VitureProtocol.MSG_GET_DISPLAY -> + listener.onValue(command.message, control.display()) + VitureProtocol.MSG_DISPLAY -> { + listener.onValue(VitureProtocol.MSG_GET_DISPLAY, control.changeDisplay(command.value)) + } + VitureProtocol.MSG_BRIGHTNESS -> { + control.set(XrealProtocol.SET_BRIGHTNESS, command.value) + listener.onValue(command.message, command.value) + } + VitureProtocol.MSG_FILM -> { + control.set(XrealProtocol.SET_DIMMER, if (command.value == 1) 2 else 0) + listener.onValue(command.message, command.value) + } + } + } + if (System.nanoTime() - heartbeat > 5_000_000_000L) { + listener.onValue(VitureProtocol.MSG_GET_DISPLAY, control.display()) + heartbeat = System.nanoTime() + } + } + failure.get()?.let { throw it } + } catch (e: Exception) { + ready = false + if (running && lastError != e.message) { + lastError = e.message + Log.w("XrealLink", "Connection unavailable: ${e.message}") + listener.onUnavailable(e is XrealNetworkMissing) + } + } finally { + ready = false + tracking = false + commands.clear() + connection.compareAndSet(channels, null) + channels?.close() + try { reports?.join(2500) } catch (_: InterruptedException) { } + } + if (running) try { Thread.sleep(2000) } catch (_: InterruptedException) { } + } + } + + override fun close() { + running = false + ready = false + tracking = false + commands.clear() + connection.getAndSet(null)?.close() + connector.close() // Includes sockets still inside connect(). + worker.interrupt() + } +} + +/** Kept independent of Android so the real framing/acknowledgement path is testable. */ +internal class XrealControl(private val channels: XrealChannels, private val settleDelayMs: Long = 150) { + private var transaction = 0 + private fun exchange(command: Int, value: Int? = null): ByteArray { + transaction = if (transaction == Int.MAX_VALUE) 1 else transaction + 1 + channels.controlOutput.write(XrealProtocol.request(command, transaction, value)) + channels.controlOutput.flush() + val deadline = System.nanoTime() + 3_000_000_000L + repeat(32) { // Bound unsolicited button/status packets and stale responses. + if (System.nanoTime() > deadline) throw IOException("XREAL control timed out") + XrealProtocol.response(XrealProtocol.read(channels.controlInput), command, transaction)?.let { return it } + } + throw IOException("XREAL control response was not received") + } + fun display(): Int { + val reply = exchange(XrealProtocol.GET_DISPLAY) + return XrealProtocol.numeric(reply)?.takeIf { it in 2..5 || it == XrealModel.NATIVE_60HZ } + ?: throw IOException("Unsupported XREAL display response: ${reply.take(32).joinToString("") { "%02x".format(it) }}") + } + fun changeDisplay(mode: Int): Int { + val stereo = mode == 5 + set(XrealProtocol.SET_INPUT, if (stereo) 1 else 0) + // On 1S, SET_INPUT itself changes EDID. Sending SET_DISPLAY immediately + // receives error 5001 while that change is pending. GET_DISPLAY returns + // an empty property during the transition; wait for a real mode report. + val current = awaitDisplay { (it == 5) == stereo } + if (current == mode) return current + set(XrealProtocol.SET_DISPLAY, mode) + return awaitDisplay { it == mode } + } + private fun awaitDisplay(matches: (Int) -> Boolean): Int { + val deadline = System.nanoTime() + 8_000_000_000L + repeat(40) { + val reply = exchange(XrealProtocol.GET_DISPLAY) + val value = XrealProtocol.numeric(reply) + if (value != null && matches(value)) return value + if (value == null && !XrealProtocol.acknowledged(reply)) + throw IOException("Invalid XREAL display transition response") + if (System.nanoTime() > deadline) throw IOException("XREAL display transition timed out") + Thread.sleep(settleDelayMs) + } + throw IOException("XREAL display transition did not complete") + } + fun set(command: Int, value: Int) { + val reply = exchange(command, value) + if (!XrealProtocol.acknowledged(reply)) throw IOException("XREAL command %04x was not acknowledged: %s".format( + command, reply.take(32).joinToString("") { "%02x".format(it) })) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/XrealModel.kt b/app/src/main/java/com/droiddeck/launcher/glasses/XrealModel.kt new file mode 100644 index 0000000000..19cd2097c2 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/XrealModel.kt @@ -0,0 +1,27 @@ +package com.droiddeck.launcher.glasses + +/** First One-family target. Recovery and Air USB products must not use this transport. */ +object XrealModel : GlassesModel { + const val VENDOR_ID = 0x3318 + const val PRODUCT_1S = 0x043e + const val NATIVE_60HZ = 29 // Captured on 1S: 1920 x 1200 at 60 Hz. + override val name = "XREAL 1S" + override val controllable = true + override val brightnessMax = 9 + override val volumeMax = 0 + override val hasSunblock = true + override val diagonalFovDeg = 52f + override val sbs90 = false + + fun matches(vid: Int, pid: Int) = vid == VENDOR_ID && pid == PRODUCT_1S + fun isDisplay(name: String) = name.contains("XREAL", ignoreCase = true) + + // One-family EDID configuration values, not VITURE's display mode IDs. + override fun mode(hz: Int, sbs: Boolean) = when { + sbs -> 5 + hz >= 120 -> 4 + hz >= 90 -> 3 + else -> NATIVE_60HZ + } + override fun modeForStep(step: Int): Int? = null +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/XrealOrientationFilter.kt b/app/src/main/java/com/droiddeck/launcher/glasses/XrealOrientationFilter.kt new file mode 100644 index 0000000000..f6ac28f69a --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/XrealOrientationFilter.kt @@ -0,0 +1,46 @@ +package com.droiddeck.launcher.glasses + +import kotlin.math.abs + +/** 1S radians/sec and device nanoseconds, mapped using directed hardware captures. */ +internal class XrealOrientationFilter { + private var previous = 0L + private var rotation = Quaternion.IDENTITY + private var initialized = false + private var bias = Vec3(0f, 0f, 0f) + + fun update(sample: XrealProtocol.Sample): FloatArray? { + if (sample.timeNs <= previous) return null + val dt = if (previous == 0L) 0f else (sample.timeNs - previous) * 1e-9f + previous = sample.timeNs + // 1S reports right/down/forward. Rotate 180 degrees about X into the + // shared right/up/back basis before either gravity alignment or fusion. + // Captures: level gravity -Y; looking left -gyroY; up +gyroX; right tilt +gyroZ. + val accel = Vec3(sample.accel.x, -sample.accel.y, -sample.accel.z) + val gyro = Vec3(sample.gyro.x, -sample.gyro.y, -sample.gyro.z) + val norm = accel.length() + val gravityValid = abs(norm - 9.81f) < 1.5f + if (dt > 0.25f) initialized = false // Never integrate a reconnect/stall as motion. + if (!initialized) { + if (!gravityValid) return null + val up = accel.normalized() + val axis = up.cross(Vec3(0f, 1f, 0f)) + rotation = if (up.y < -0.9999f) Quaternion.fromAxisAngle(Vec3(1f, 0f, 0f), Math.PI.toFloat()) + else Quaternion(1f + up.y, axis.x, axis.y, axis.z).normalized() + initialized = true + } else if (dt in 0.0001f..0.05f) { + if (gravityValid && gyro.length() < 0.04f) { + val alpha = (dt * 0.5f).coerceAtMost(1f) + bias = bias * (1f - alpha) + gyro * alpha + } + var rate = gyro - bias + if (gravityValid) { + val predictedUp = rotation.conjugate().rotate(Vec3(0f, 1f, 0f)) + rate += accel.normalized().cross(predictedUp) * 1.5f + } + rotation = rotation.integrateBodyRate(rate, dt).normalized() + } + // Same right/up/back -> shared glasses basis used by the RayNeo adapter. + return RayNeoOrientationFilter.glassesPose(floatArrayOf(rotation.w, rotation.x, rotation.y, rotation.z)) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/glasses/XrealProtocol.kt b/app/src/main/java/com/droiddeck/launcher/glasses/XrealProtocol.kt new file mode 100644 index 0000000000..d18ca1a94c --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/glasses/XrealProtocol.kt @@ -0,0 +1,78 @@ +package com.droiddeck.launcher.glasses + +import java.io.EOFException +import java.io.IOException +import java.io.InputStream +import java.nio.ByteBuffer +import java.nio.ByteOrder + +/** Independent implementation of the One-family wire format; see xreal-investigation.md. */ +internal object XrealProtocol { + const val HOST = "169.254.2.1" + const val REPORT_PORT = 52998 + const val CONTROL_PORT = 52999 + const val REPORT = 0x2836 + const val GET_DISPLAY = 0x275e + const val SET_DISPLAY = 0x275f + const val SET_INPUT = 0x2822 + const val SET_BRIGHTNESS = 0x271c + const val SET_DIMMER = 0x2727 + const val MAX_BODY = 64 * 1024 + + data class Frame(val command: Int, val body: ByteArray) + data class Sample(val timeNs: Long, val gyro: Vec3, val accel: Vec3) + + fun read(input: InputStream): Frame { + val deadline = System.nanoTime() + 3_000_000_000L + val header = ByteArray(6) + input.readFully(header, deadline) + val size = ByteBuffer.wrap(header, 2, 4).int + if (size !in 0..MAX_BODY) throw IOException("Invalid XREAL frame length: $size") + return Frame(((header[0].toInt() and 255) shl 8) or (header[1].toInt() and 255), + ByteArray(size).also { input.readFully(it, deadline) }) + } + + private fun InputStream.readFully(bytes: ByteArray, deadline: Long) { + var at = 0 + while (at < bytes.size) { + if (System.nanoTime() > deadline) throw IOException("XREAL frame timed out") + val count = read(bytes, at, bytes.size - at) + if (count < 0) throw EOFException("XREAL stream closed mid-frame") + if (count == 0) throw IOException("XREAL stream made no progress") + at += count + } + } + + fun sample(frame: Frame): Sample? { + if (frame.command != REPORT || frame.body.size != 128) return null + val b = ByteBuffer.wrap(frame.body).order(ByteOrder.LITTLE_ENDIAN) + if (b.getInt(24) != 11) return null // Magnetometer reports are a different type. + val time = b.getLong(8) + val gyro = Vec3(b.getFloat(28), b.getFloat(32), b.getFloat(36)) + val accel = Vec3(b.getFloat(40), b.getFloat(44), b.getFloat(48)) + if (time <= 0 || !gyro.valid(100f) || !accel.valid(200f)) return null + return Sample(time, gyro, accel) + } + + private fun Vec3.valid(limit: Float) = listOf(x, y, z).all { it.isFinite() && kotlin.math.abs(it) <= limit } + + fun request(command: Int, transaction: Int, value: Int? = null): ByteArray { + require(transaction > 0) + require(value == null || value in 0..127) + val payload = if (value == null) byteArrayOf(0x18, 0) else byteArrayOf(0x1a, 2, 8, value.toByte()) + return ByteBuffer.allocate(10 + payload.size).putShort(command.toShort()) + .putInt(4 + payload.size).putInt(transaction or Int.MIN_VALUE).put(payload).array() + } + + /** No acknowledgement is inferred from a write; match both command and transaction. */ + fun response(frame: Frame, command: Int, transaction: Int): ByteArray? { + if (frame.command != command || frame.body.size < 4 || + ByteBuffer.wrap(frame.body).int != transaction) return null + return frame.body.copyOfRange(4, frame.body.size) + } + + fun acknowledged(payload: ByteArray) = payload.contentEquals(byteArrayOf(0x22, 0)) + fun numeric(payload: ByteArray): Int? = if (payload.size == 4 && + payload[0] == 0x22.toByte() && payload[1] == 2.toByte() && payload[2] == 0x10.toByte() && + payload[3].toInt() in 0..127) payload[3].toInt() else null +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/AutoDriverTrial.kt b/app/src/main/java/com/droiddeck/launcher/gpu/AutoDriverTrial.kt new file mode 100644 index 0000000000..751ab8298d --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/AutoDriverTrial.kt @@ -0,0 +1,101 @@ +package com.droiddeck.launcher.gpu + +import android.content.Context +import android.util.Log +import com.droiddeck.launcher.session.SessionPrefs + +object AutoDriverTrial { + private const val TAG = "AutoDriverTrial" + private const val PREFS = "gpu_auto_trial" + const val UNREADY_STARTS_BEFORE_ROLLBACK = 2 + + class Trial( + val release: String, val name: String, + val display: String, val linux: String, + val previousDisplay: String, val previousLinux: String, + val starts: Int, + ) + + @Volatile private var app: Context? = null + @Volatile private var watching: Trial? = null + + fun release(pair: DriverPairs.DriverPair) = "${pair.key}@${pair.version}" + + fun current(context: Context): Trial? { + val p = prefs(context) + val release = p.getString("release", null) ?: return null + return Trial( + release, p.getString("name", "").orEmpty(), + p.getString("display", "").orEmpty(), p.getString("linux", "").orEmpty(), + p.getString("previousDisplay", "").orEmpty(), p.getString("previousLinux", "").orEmpty(), + p.getInt("starts", 0), + ) + } + + fun begin(context: Context, release: String, name: String, display: String, linux: String, previousDisplay: String, previousLinux: String) { + prefs(context).edit() + .putString("release", release).putString("name", name) + .putString("display", display).putString("linux", linux) + .putString("previousDisplay", previousDisplay).putString("previousLinux", previousLinux) + .putInt("starts", 0) + .commit() + } + + fun clear(context: Context) { + val bad = bad(context) + prefs(context).edit().clear().putStringSet("bad", bad).commit() + } + + fun bad(context: Context): Set<String> = prefs(context).getStringSet("bad", emptySet()).orEmpty() + + fun sessionStarting(context: Context, display: String, linux: String) { + val trial = current(context) + watching = null + if (trial == null || trial.display != display || trial.linux != linux) return + app = context.applicationContext + watching = trial + prefs(context).edit().putInt("starts", trial.starts + 1).commit() + } + + fun sessionReady() { + val trial = watching ?: return + val context = app ?: return + watching = null + if (current(context)?.release != trial.release) return + Log.i(TAG, "${trial.release} reached a ready session; keeping it") + clear(context) + prune(context, setOf(trial.display, trial.linux)) + } + + fun rollbackDue(context: Context): Trial? = current(context)?.takeIf { it.starts >= UNREADY_STARTS_BEFORE_ROLLBACK } + + fun rollBack(context: Context, trial: Trial) { + Log.w(TAG, "${trial.release} never reached a ready session in ${trial.starts} starts; restoring the previous drivers") + if (SessionPrefs.androidDriver(context) == trial.display) SessionPrefs.setAndroidDriver(context, trial.previousDisplay) + if (SessionPrefs.linuxDriver(context) == trial.linux) SessionPrefs.setLinuxDriver(context, trial.previousLinux) + val bad = bad(context) + trial.release + prefs(context).edit().clear().putStringSet("bad", bad).commit() + prune(context, setOf(trial.previousDisplay, trial.previousLinux, SessionPrefs.androidDriver(context), SessionPrefs.linuxDriver(context))) + } + + fun prune(context: Context, keep: Set<String>) { + val lm = LinuxVulkanDriverManager(context) + val td = TurnipDriver(context) + val owned = SessionPrefs.gpuAutoInstalled(context) + for (id in owned - keep) { + val bundle = DriverBundle.containing(context, id, lm.isInstalled(id)) + when { + bundle != null -> { + if (bundle.androidId in keep || bundle.linuxId in keep) continue + DriverBundle.remove(context, bundle); TurnipReleases.forget(context, bundle.id) + } + lm.isInstalled(id) -> lm.removeDriver(id) + else -> td.remove(id) + } + TurnipReleases.forget(context, id) + } + SessionPrefs.setGpuAutoInstalled(context, owned.intersect(keep)) + } + + private fun prefs(context: Context) = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE) +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/AutoPicks.kt b/app/src/main/java/com/droiddeck/launcher/gpu/AutoPicks.kt new file mode 100644 index 0000000000..76b6dddc96 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/AutoPicks.kt @@ -0,0 +1,64 @@ +package com.droiddeck.launcher.gpu + +import com.droiddeck.launcher.gpu.GpuInfo.Family +import org.json.JSONArray +import org.json.JSONObject + +object AutoPicks { + const val URL = "https://raw.githubusercontent.com/Droid-Deck/Drivers-CI/main/auto-drivers.json" + const val SCHEMA = 1 + const val NEWEST_DD_TURNIP = DriverPairs.DD_TURNIP + + class Rule( + val families: Set<Family>, + val models: Set<Int> = emptySet(), + val oneUi8Gen2: Boolean? = null, + val minSdk: Int = 0, + val blobMin: Int = 0, + val blobMax: Int = Int.MAX_VALUE, + val prefer: List<String>, + ) { + fun matches(gpu: GpuInfo, sdk: Int, blob: Int?): Boolean = + gpu.family in families && + (models.isEmpty() || gpu.model in models) && + (oneUi8Gen2 == null || gpu.oneUi8Gen2 == oneUi8Gen2) && + sdk >= minSdk && + (blobMin == 0 && blobMax == Int.MAX_VALUE || blob != null && blob in blobMin..blobMax) + } + + val BUILT_IN = listOf( + Rule(setOf(Family.A8XX), models = setOf(840), prefer = listOf(NEWEST_DD_TURNIP, DriverPairs.WN_BALANCED)), + Rule(setOf(Family.A8XX), prefer = listOf(DriverPairs.WN_BALANCED)), + Rule(setOf(Family.A7XX_LOW), prefer = listOf(DriverPairs.BANNER_710)), + Rule(setOf(Family.A7XX), oneUi8Gen2 = true, prefer = listOf(DriverPairs.BANNER_ONEUI)), + Rule(setOf(Family.A7XX, Family.A6XX), prefer = listOf(DriverPairs.BANNER)), + Rule(setOf(Family.ADRENO_UNKNOWN), minSdk = 36, prefer = listOf(DriverPairs.WN_BALANCED)), + Rule(setOf(Family.ADRENO_UNKNOWN), prefer = listOf(DriverPairs.BANNER)), + ) + + fun parse(text: String?): List<Rule>? = runCatching { + val json = JSONObject(text ?: return null) + if (json.optInt("schemaVersion") != SCHEMA) return null + val rules = json.getJSONArray("rules") + (0 until rules.length()).mapNotNull { i -> rule(rules.getJSONObject(i)) }.takeIf { it.isNotEmpty() } + }.getOrNull() + + private fun rule(o: JSONObject): Rule? { + val families = strings(o.optJSONArray("families")).mapNotNull { name -> Family.values().firstOrNull { it.name == name } }.toSet() + val prefer = strings(o.optJSONArray("prefer")) + if (families.isEmpty() || prefer.isEmpty()) return null + val models = o.optJSONArray("models")?.let { a -> (0 until a.length()).map { a.getInt(it) }.toSet() } ?: emptySet() + return Rule( + families, models, + if (o.has("oneUi8Gen2")) o.getBoolean("oneUi8Gen2") else null, + o.optInt("minSdk", 0), o.optInt("blobMin", 0), o.optInt("blobMax", Int.MAX_VALUE), prefer, + ) + } + + private fun strings(a: JSONArray?): List<String> = a?.let { (0 until it.length()).map { i -> it.getString(i) } }.orEmpty() + + fun preferences(gpu: GpuInfo, rules: List<Rule>, sdk: Int, blob: Int?): List<String> = + rules.firstOrNull { it.matches(gpu, sdk, blob) }?.prefer.orEmpty() + + fun blobVersion(driverVersion: String?): Int? = driverVersion?.split('.')?.getOrNull(1)?.toIntOrNull() +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/Cardboard.kt b/app/src/main/java/com/droiddeck/launcher/gpu/Cardboard.kt new file mode 100644 index 0000000000..a9fd9ef836 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/Cardboard.kt @@ -0,0 +1,142 @@ +package com.droiddeck.launcher.gpu + +import com.droiddeck.launcher.wayland.WaylandCompositor +import org.json.JSONObject +import kotlin.math.sqrt + +data class Cardboard( + val enabled: Boolean = false, + val source: Int = SOURCE_SCREEN, + val viewer: String = Viewer.CARDBOARD_V2.id, + val ipdMm: Int = 64, + val screenWidthDm: Int = 40, + val screenDistanceDm: Int = 30, + val headTracking: Boolean = true, + val mono: Boolean = false, +) { + val lens: Viewer get() = Viewer.byId(viewer) + + fun push(panelWidthMm: Float, panelHeightMm: Float, fovOverrideDeg: Float = 0f, displayHz: Float = 0f) { + val l = lens + WaylandCompositor.nativeSetCardboard(enabled, source, ipdMm / 1000f, screenDistanceDm / 10f, + screenWidthDm / 10f, l.k1, l.k2, if (fovOverrideDeg > 0f) fovOverrideDeg else fovDeg(l, panelHeightMm), + if (mono) 0f else lensInset(panelWidthMm, l.lensSeparationMm), l.chroma, mono, displayHz) + } + + fun encode(): JSONObject = JSONObject() + .put("enabled", enabled).put("source", source).put("viewer", viewer).put("ipdMm", ipdMm) + .put("screenWidthDm", screenWidthDm).put("screenDistanceDm", screenDistanceDm).put("headTracking", headTracking) + + enum class Viewer(val id: String, val k1: Float, val k2: Float, val screenToLensMm: Float, + val lensSeparationMm: Float, val chroma: Float, val fallbackFovDeg: Float) { + CARDBOARD_V2("cardboard2", 0.34f, 0.55f, 39.3f, 63.9f, 0.006f, 90f), + CARDBOARD_V1("cardboard1", 0.441f, 0.156f, 42f, 60f, 0.004f, 80f), + NONE("none", 0f, 0f, 0f, 0f, 0f, 60f), + VITURE("viture", 0f, 0f, 0f, 0f, 0f, 23.3f); + + companion object { + fun byId(id: String): Viewer = entries.firstOrNull { it.id == id } ?: CARDBOARD_V2 + } + } + + companion object { + const val SOURCE_SCREEN = 0 + const val SOURCE_SBS = 1 + const val SOURCE_FLAT = 2 + + val OFF = Cardboard() + + fun decode(json: JSONObject): Cardboard = Cardboard( + enabled = json.optBoolean("enabled", false), + source = json.optInt("source", SOURCE_SCREEN).takeIf { it in SOURCE_SCREEN..SOURCE_FLAT } ?: SOURCE_SCREEN, + viewer = Viewer.byId(json.optString("viewer", Viewer.CARDBOARD_V2.id)).id, + ipdMm = json.optInt("ipdMm", 64).coerceIn(50, 80), + screenWidthDm = json.optInt("screenWidthDm", 40).coerceIn(5, 200), + screenDistanceDm = json.optInt("screenDistanceDm", 30).coerceIn(5, 200), + headTracking = json.optBoolean("headTracking", true), + ) + + fun fovDeg(viewer: Viewer, panelHeightMm: Float): Float { + if (panelHeightMm <= 0f || viewer.screenToLensMm <= 0f) return viewer.fallbackFovDeg + val half = Math.toDegrees(kotlin.math.atan((panelHeightMm / 2f / viewer.screenToLensMm).toDouble())).toFloat() + return (2f * half).coerceIn(30f, 140f) + } + + fun lensInset(panelWidthMm: Float, lensSeparationMm: Float): Float { + if (panelWidthMm <= 0f || lensSeparationMm <= 0f) return 0f + val inset = (panelWidthMm / 4f - lensSeparationMm / 2f) / (panelWidthMm / 2f) + return inset.coerceIn(-0.25f, 0.25f) + } + } +} + +object HeadPose { + val IDENTITY = floatArrayOf(1f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 1f) + + fun fromQuaternion(x: Float, y: Float, z: Float, w: Float): FloatArray { + val n = sqrt(x * x + y * y + z * z + w * w).takeIf { it > 1e-6f } ?: 1f + val qx = x / n; val qy = y / n; val qz = z / n; val qw = w / n + return floatArrayOf( + 1 - 2 * (qy * qy + qz * qz), 2 * (qx * qy - qz * qw), 2 * (qx * qz + qy * qw), + 2 * (qx * qy + qz * qw), 1 - 2 * (qx * qx + qz * qz), 2 * (qy * qz - qx * qw), + 2 * (qx * qz - qy * qw), 2 * (qy * qz + qx * qw), 1 - 2 * (qx * qx + qy * qy), + ) + } + + fun quaternionFromRotationVector(v: FloatArray): FloatArray { + val x = v[0]; val y = v[1]; val z = v[2] + val w = if (v.size >= 4) v[3] else sqrt((1f - x * x - y * y - z * z).coerceAtLeast(0f)) + return floatArrayOf(x, y, z, w) + } + + fun toScreen(deviceToWorld: FloatArray, rotation: Int): FloatArray { + val a = when (rotation and 3) { + 1 -> floatArrayOf(0f, 1f, 0f, -1f, 0f, 0f, 0f, 0f, 1f) + 2 -> floatArrayOf(-1f, 0f, 0f, 0f, -1f, 0f, 0f, 0f, 1f) + 3 -> floatArrayOf(0f, -1f, 0f, 1f, 0f, 0f, 0f, 0f, 1f) + else -> IDENTITY + } + return multiply(deviceToWorld, a) + } + + private const val FLAT_SIN = 0.866f + + class Reference(val basis: FloatArray, val tilt: FloatArray) + + fun recenter(screenToWorld: FloatArray, centerView: Boolean = false): Reference { + if (centerView) return Reference(screenToWorld.copyOf(), IDENTITY) + val fz = -screenToWorld[8] + val flat = kotlin.math.abs(fz) > FLAT_SIN + var fx = if (flat) screenToWorld[1] else -screenToWorld[2] + var fy = if (flat) screenToWorld[4] else -screenToWorld[5] + val len = sqrt(fx * fx + fy * fy).takeIf { it > 1e-4f } ?: run { fx = 0f; fy = 1f; 1f } + fx /= len; fy /= len + val basis = floatArrayOf( + fy, 0f, -fx, + -fx, 0f, -fy, + 0f, 1f, 0f, + ) + val tilt = if (flat) multiply(transpose(screenToWorld), basis) else IDENTITY + return Reference(basis, tilt) + } + + fun relative(ref: Reference, screenToWorld: FloatArray): FloatArray = + multiply(multiply(transpose(ref.basis), screenToWorld), ref.tilt) + + fun multiply(a: FloatArray, b: FloatArray): FloatArray = FloatArray(9) { i -> + val r = i / 3; val c = i % 3 + a[r * 3] * b[c] + a[r * 3 + 1] * b[3 + c] + a[r * 3 + 2] * b[6 + c] + } + + private val GLASSES_AXES = floatArrayOf(0f, 0f, -1f, -1f, 0f, 0f, 0f, 1f, 0f) + + fun fromGlasses(x: Float, y: Float, z: Float, w: Float): FloatArray = multiply(fromQuaternion(x, y, z, w), GLASSES_AXES) + + fun transpose(m: FloatArray): FloatArray = floatArrayOf(m[0], m[3], m[6], m[1], m[4], m[7], m[2], m[5], m[8]) + + fun apply(m: FloatArray, v: FloatArray): FloatArray = floatArrayOf( + m[0] * v[0] + m[1] * v[1] + m[2] * v[2], + m[3] * v[0] + m[4] * v[1] + m[5] * v[2], + m[6] * v[0] + m[7] * v[1] + m[8] * v[2], + ) +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/DeviceInfo.kt b/app/src/main/java/com/droiddeck/launcher/gpu/DeviceInfo.kt index 5e30ebb4af..48c58d01be 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/DeviceInfo.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/DeviceInfo.kt @@ -9,25 +9,17 @@ import com.droiddeck.launcher.session.SessionPrefs import java.io.File import java.util.Locale -/** - * Everything the device info window shows about the phone's chip: SoC, GPU, CPU, memory, system, - * the phone's own Vulkan driver and the drivers DroidDeck uses. Reads files and asks Vulkan once - * ([VulkanInfo]), so [collect] belongs off the main thread. Values the phone does not give are - * left out rather than guessed. - */ object DeviceInfo { class Section(val title: String, val rows: List<Pair<String, String>>) fun collect(context: Context): List<Section> { val vk = VulkanInfo.query() - // After Vulkan has been asked, detection can use its name too. val gpu = GpuInfo.detect() return listOf( chip(), gpu(gpu), cpu(), memory(context), system(), vulkan(context, vk), drivers(context, gpu), ).filter { it.rows.isNotEmpty() } } - /** The whole window as plain text, for a bug report. */ fun text(sections: List<Section>): String = buildString { append("DroidDeck device info\n") for (s in sections) { @@ -78,7 +70,6 @@ object DeviceInfo { private fun cpu() = Section("CPU", buildList<Pair<String, String>> { add("Cores", Runtime.getRuntime().availableProcessors().toString()) - // Each cpufreq policy is one cluster: the cores it covers and their speed range. val policies = File("/sys/devices/system/cpu/cpufreq").listFiles { f -> f.name.matches(Regex("policy\\d+")) } ?.sortedBy { it.name.removePrefix("policy").toInt() }.orEmpty() for (p in policies) { @@ -94,7 +85,6 @@ object DeviceInfo { private fun ghz(khz: Long) = String.format(Locale.US, "%.2f GHz", khz / 1e6) - /** The GPU's slowest and fastest step: KGSL's list, else a devfreq GPU node (Mali and others). */ private fun gpuRange(): String? { fun mhz(hz: Long) = "${hz / 1_000_000} MHz" val kgsl = read("/sys/class/kgsl/kgsl-3d0/gpu_available_frequencies") @@ -134,7 +124,6 @@ object DeviceInfo { add("API version", vk["api"]) add("Loader version", vk["loader"]) add("Driver", listOfNotNull(vk["driver_name"], vk["driver_version"]).joinToString(" ")) - // Qualcomm's build string starts with its own label ("Driver Build: 43c70540de, ..."). add("Driver build", vk["driver_info"]?.replace(Regex("(?i)^driver build:\\s*"), "")) add("Conformance", vk["conformance"]) add("Vendor / device id", listOfNotNull(vk["vendor_id"], vk["device_id"]).joinToString(" / ")) @@ -144,7 +133,6 @@ object DeviceInfo { val features = listOf("geometry_shader" to "Geometry shaders", "tessellation_shader" to "Tessellation", "texture_bc" to "BC textures") for ((key, label) in features) add(label, vk[key]) for ((key, value) in vk) if (key.startsWith("ext.")) add(key.removePrefix("ext."), value) - // What Android certifies the phone for. val pm = context.packageManager val hw = pm.systemAvailableFeatures.associate { it.name to it.version } hw[PackageManager.FEATURE_VULKAN_HARDWARE_VERSION]?.let { diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/DriverBundle.kt b/app/src/main/java/com/droiddeck/launcher/gpu/DriverBundle.kt index 2814e4bfbe..db8dc86c4b 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/DriverBundle.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/DriverBundle.kt @@ -11,37 +11,18 @@ import java.io.File import java.io.IOException import java.util.zip.ZipInputStream -/** - * An all-in-one driver package: one zip carrying both halves of a matched pair, the display - * (Android, bionic) driver in one directory and the runtime (Linux, glibc) driver in another, - * indexed by a root `manifest.json` - DroidDeck's own DD-Turnip releases (Droid-Deck/Drivers): - * - * ``` - * manifest.json {"package", "version", "drivers": {"android": {"path"}, "linux": {"path"}}} - * android/ meta.json (AdrenoTools) + libvulkan_freedreno.so - * linux/ meta.json + libvulkan_freedreno.so - * ``` - * - * Installing one puts each half through its own importer, with that importer's checks, and - * remembers the two as one bundle: picking either half sets both, and deleting either deletes both, - * so a bundle is always used whole. Zips of the older kind, one driver each, never reach this. - */ object DriverBundle { private const val TAG = "DriverBundle" private const val PREFS = "driver_bundles" private const val MANIFEST = "manifest.json" - /** Refuses a zip that unpacks to more than this: both halves together are about 30 MB. */ private const val MAX_BYTES = 512L shl 20 class Manifest(val name: String, val version: String, val tag: String, val androidPath: String, val linuxPath: String) - /** An installed bundle: [androidId] in TurnipDriver's list, [linuxId] in LinuxVulkanDriverManager's. */ class Bundle(val id: String, val name: String, val version: String, val androidId: String, val linuxId: String) { - /** "DD-Turnip 0.1.0". */ val label: String get() = if (version.isEmpty()) name else "$name $version" } - /** The manifest of a bundle, or null when [json] is not one (both halves, in two directories). */ fun parseManifest(json: JSONObject): Manifest? { val drivers = json.optJSONObject("drivers") ?: return null val android = cleanPath(drivers.optJSONObject("android")?.optString("path").orEmpty()) ?: return null @@ -58,7 +39,6 @@ object DriverBundle { return p.takeIf { it.isNotEmpty() && it.split('/').none { part -> part.isEmpty() || part == "." || part == ".." } } } - /** True when the zip at [uri] is a bundle rather than a single driver. */ fun isBundle(context: Context, uri: Uri): Boolean = try { context.contentResolver.openInputStream(uri)?.use { input -> ZipInputStream(input).use { zip -> @@ -71,11 +51,6 @@ object DriverBundle { false } - /** - * Install both halves of the bundle at [uri]. Both or neither: a half that is refused removes - * the one already in. Throws [IllegalArgumentException] with a user-facing reason when the zip - * is not a usable bundle, [IOException] on read failures. - */ fun install(context: Context, uri: Uri): Bundle { val work = File(context.cacheDir, "bundle-${System.nanoTime()}") val td = TurnipDriver(context) @@ -153,7 +128,6 @@ object DriverBundle { } ?: throw IOException("cannot open $uri") } - /** Every installed bundle whose two halves are both still there. */ fun all(context: Context): List<Bundle> { val td = TurnipDriver(context) val lm = LinuxVulkanDriverManager(context) @@ -167,24 +141,20 @@ object DriverBundle { fun get(context: Context, id: String): Bundle? = all(context).firstOrNull { it.id == id } - /** The bundle [driverId] is a half of, in the runtime list when [linux], else the display list. */ fun containing(context: Context, driverId: String, linux: Boolean): Bundle? = all(context).firstOrNull { (if (linux) it.linuxId else it.androidId) == driverId } - /** The bundle both drivers are set to right now, if they are one. */ fun active(context: Context): Bundle? { val android = SessionPrefs.androidDriver(context) val linux = SessionPrefs.linuxDriver(context) return all(context).firstOrNull { it.androidId == android && it.linuxId == linux } } - /** Set both halves as the drivers in use. */ fun select(context: Context, bundle: Bundle) { SessionPrefs.setAndroidDriver(context, bundle.androidId) SessionPrefs.setLinuxDriver(context, bundle.linuxId) } - /** Delete both halves; a driver still set to either goes back to its default. */ fun remove(context: Context, bundle: Bundle) { TurnipDriver(context).remove(bundle.androidId) LinuxVulkanDriverManager(context).removeDriver(bundle.linuxId) diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/DriverPairs.kt b/app/src/main/java/com/droiddeck/launcher/gpu/DriverPairs.kt index f3b28fe384..c99bfb5f10 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/DriverPairs.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/DriverPairs.kt @@ -2,20 +2,6 @@ package com.droiddeck.launcher.gpu import com.droiddeck.launcher.gpu.GpuInfo.Family -/** - * The release drivers as matched pairs: a display build (the app's compositor, bionic) and a Linux - * build (the runtime, glibc) that were made to run together. Mixing a runtime driver carrying a - * patch with a display driver that lacks it is where the hard-to-read bugs come from, so the app - * installs and selects both halves of one pair at once. - * - * - Banners-Turnip publishes each variant as a set in every release (`Turnip-<tag><variant>.zip` - * and `...-Linux.zip`), rebuilt from upstream Mesa as it moves: the pair is one variant of the - * newest release that carries both halves. - * - WinNative ships its display (`v1.x`) and Linux (`linux-v0.x`) builds as two release lines with - * their own numbers: the pair is the newest of each, of one flavour (Balanced or Performance). - * - DroidDeck's DD-Turnip ships both halves in one zip per release (DriverBundle): the pair is the - * newest bundle, and it can never be mixed. - */ object DriverPairs { const val BANNER = "banner" const val BANNER_A8XX = "banner-a8xx" @@ -24,24 +10,18 @@ object DriverPairs { const val WN_BALANCED = "wn-b" const val WN_PERFORMANCE = "wn-p" const val DD_TURNIP = "dd-turnip" - /** Each DD-Turnip release is its own pair: "dd-turnip:DD-Turnip-v0.1.0". */ fun ddTurnip(tag: String) = "$DD_TURNIP:$tag" class DriverPair( val key: String, - /** "Banners-Turnip · Adreno 6xx/7xx", "WinNative · Balanced". */ val name: String, - /** The families the pair is built for; the list only offers it on those unless asked. */ val families: Set<Family>, val display: TurnipReleases.Asset?, val linux: TurnipReleases.Asset?, - /** Both halves in one zip, instead of [display] and [linux]. */ val bundle: TurnipReleases.Asset? = null, ) { val complete: Boolean get() = bundle != null || (display != null && linux != null) - /** The zips to download for the pair: the bundle, or the two halves. */ val assets: List<TurnipReleases.Asset> get() = listOfNotNull(bundle ?: display, if (bundle == null) linux else null) - /** "r4 · 1.19 + 0.1.2": the build of each half. */ val version: String get() = listOfNotNull(bundle?.tag, display?.tag, linux?.tag).distinct().joinToString(" + ") { it.removePrefix("linux-").removePrefix("DD-Turnip-") } fun suits(gpu: GpuInfo) = gpu.family in families || @@ -65,7 +45,6 @@ object DriverPairs { else -> key to ALL_ADRENO } - /** Every pair the last release check found, in the order the list shows them. */ fun from(check: TurnipReleases.Check?): List<DriverPair> { val assets = check?.assets.orEmpty().filter { it.pair.isNotEmpty() } val order = listOf(DD_TURNIP, BANNER, BANNER_A8XX, BANNER_ONEUI, BANNER_710, WN_BALANCED, WN_PERFORMANCE) @@ -75,9 +54,6 @@ object DriverPairs { val (name, families) = describe(key) val halves = assets.filter { it.pair == key } halves.firstOrNull { it.bundle }?.let { return@map DriverPair(key, name, families, null, null, it) } - // The list keeps the newest release of each half; for Banners-Turnip the two halves - // must come from the same release, so a set missing one half in its newest release - // is offered incomplete rather than mixed with an older one. val display = halves.firstOrNull { !it.linux } val linux = halves.firstOrNull { it.linux } val sameRelease = !key.startsWith(BANNER) || display?.tag == linux?.tag @@ -85,24 +61,19 @@ object DriverPairs { } } - /** - * The pair Auto sets for [gpu], among the [pairs] the last release check found: the newest - * official DD-Turnip release on the Adreno 840 (840 and 840v2), WinNative Balanced on the other - * 8xx (Banners' A8xx builds still break on some first boots) and on an 840 while no DD-Turnip - * release is listed, the OneUI build for an 8 Gen 2 under One UI, the patched test builds for - * the 710/720/722, and upstream Banners-Turnip for the rest. Null when nothing fits (not Adreno). - */ - fun recommendedKey(gpu: GpuInfo, pairs: List<DriverPair>): String? = when (gpu.family) { - Family.NOT_ADRENO -> null - Family.A8XX -> if (gpu.model == 840) newestDdTurnip(pairs) ?: WN_BALANCED else WN_BALANCED - Family.A7XX_LOW -> BANNER_710 - Family.A7XX -> if (gpu.oneUi8Gen2) BANNER_ONEUI else BANNER - Family.A6XX -> BANNER - // KGSL gave no model: Android 16 arrived with the 8xx, so a device that new is taken as one. - Family.ADRENO_UNKNOWN -> if (android.os.Build.VERSION.SDK_INT >= 36) WN_BALANCED else BANNER + fun recommendedKey( + gpu: GpuInfo, pairs: List<DriverPair>, + rules: List<AutoPicks.Rule> = AutoPicks.BUILT_IN, bad: Set<String> = emptySet(), + sdk: Int = android.os.Build.VERSION.SDK_INT, blob: Int? = null, + ): String? { + if (gpu.family == Family.NOT_ADRENO) return null + val keys = AutoPicks.preferences(gpu, rules, sdk, blob) + .ifEmpty { AutoPicks.preferences(gpu, AutoPicks.BUILT_IN, sdk, blob) } + .mapNotNull { if (it == AutoPicks.NEWEST_DD_TURNIP) newestDdTurnip(pairs) else it } + return keys.firstOrNull { key -> pairs.any { it.key == key && it.complete && AutoDriverTrial.release(it) !in bad } } + ?: keys.firstOrNull() } - /** The complete DD-Turnip pair with the highest version, or null when none is listed. */ fun newestDdTurnip(pairs: List<DriverPair>): String? = pairs .filter { it.key.startsWith("$DD_TURNIP:") && it.complete } .maxByOrNull { p -> diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/DriverSetupLog.java b/app/src/main/java/com/droiddeck/launcher/gpu/DriverSetupLog.java new file mode 100644 index 0000000000..0fb72fbac0 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/DriverSetupLog.java @@ -0,0 +1,28 @@ +package com.droiddeck.launcher.gpu; + +import android.content.Context; +import android.util.Log; +import java.io.File; +import java.io.FileWriter; + +public final class DriverSetupLog { + private DriverSetupLog() {} + + public static synchronized void write(Context context, String stage) { + Log.i("DriverSetup", stage); + append(context.getFilesDir(), stage); + try { append(context.getExternalFilesDir(null), stage); } + catch (Exception ignored) { } + } + + private static void append(File directory, String stage) { + if (directory == null) return; + try { + directory.mkdirs(); + File file = new File(directory, "driver-setup.txt"); + try (FileWriter out = new FileWriter(file, file.length() < 131072)) { + out.write(System.currentTimeMillis() + " " + stage + "\n"); + } + } catch (Exception ignored) { } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/FrameGen.kt b/app/src/main/java/com/droiddeck/launcher/gpu/FrameGen.kt index b864e837bd..952ada6160 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/FrameGen.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/FrameGen.kt @@ -5,34 +5,20 @@ import android.util.Log import com.droiddeck.launcher.R import com.droiddeck.launcher.wayland.WaylandCompositor -/** - * The frame-generation setting and how it reaches the compositor. - * - * Both engines generate on gamescope's final output inside our compositor, so they work for any - * game with nothing changed in the runtime. Win-FG is our own and needs nothing; LSFG needs the - * shader chain from the user's copy of Lossless Scaling (see [Lossless]). Every compositor - * setter is a value store on the native side, so this can be applied before the compositor is - * up and changed live from the main screen while a session runs. - */ object FrameGen { const val ENGINE_OFF = "off" const val ENGINE_WINFG = "winfg" const val ENGINE_LSFG = "lsfg" - /** Win-FG's Performance preset, pinned: changing it live rebuilds the whole chain. */ private const val WINFG_PERF_PRESET = 2 - /** Bidirectional flow with the occlusion gate - the chain's own default. */ private const val WINFG_MODEL = 4 - /** Optical-flow resolution as a fraction of the output; Bannerlator's per-engine defaults. */ private const val FLOW_SCALE_WINFG = 0.60f private const val FLOW_SCALE_LSFG = 0.80f - /** LSFG's adaptive targets: it generates as many frames as it takes to reach one. */ val ADAPTIVE_TARGETS = listOf(120, 90, 60) private const val PREFS = "frame_gen" - /** A fixed [multiplier] (2..4), or for LSFG a [target] frame rate (0 = fixed). */ data class Mode(val engine: String, val multiplier: Int = 2, val target: Int = 0) { companion object { val OFF = Mode(ENGINE_OFF) @@ -54,7 +40,6 @@ object FrameGen { .putString("engine", mode.engine).putInt("multiplier", mode.multiplier).putInt("target", mode.target).apply() } - /** "Off", "Win-FG 2×", "LSFG 3×", "LSFG Adaptive 90". */ fun label(context: Context): String = label(context, mode(context)) fun label(context: Context, mode: Mode): String = when { @@ -64,11 +49,6 @@ object FrameGen { else -> context.getString(R.string.frame_gen_off) } - /** - * Pushes the saved setting into the compositor. Returns a message for the user when the - * engine cannot run (LSFG without Lossless Scaling), or null. Blocks while a new or updated - * Lossless.dll is prepared. - */ fun apply(context: Context, refreshHz: Float): String? { val mode = mode(context) when (mode.engine) { diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/GpuInfo.kt b/app/src/main/java/com/droiddeck/launcher/gpu/GpuInfo.kt index 87bf01d4dd..adfa2589a5 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/GpuInfo.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/GpuInfo.kt @@ -6,38 +6,23 @@ import com.droiddeck.launcher.R import com.droiddeck.launcher.core.FileUtils import java.io.File -/** - * What GPU this is, in the terms the driver lists are sorted by. KGSL names the model - * ("Adreno740v2", "Adreno825"); the family decides which Turnip builds run on it at all, and the - * support level is what the app has actually been tested on (Adreno 650, 725 and newer) - an - * Adreno 610 may start, but it is not "supported" just because it is a Qualcomm chip. - */ data class GpuInfo( - /** "Adreno 740", or the vendor's own name when this is not an Adreno. */ val name: String, - /** The three-digit Adreno model (740, 825), or 0 when KGSL does not say. */ val model: Int, val family: Family, - /** The SoC as a person would say it ("Snapdragon 8 Gen 2 (QCS8550)"), or "" when the phone does not say. */ val soc: String, - /** Samsung's One UI on an 8 Gen 2: its Turnip needs the OneUI build, or frames tear and flicker. */ val oneUi8Gen2: Boolean, - /** KGSL's own name for the GPU, as the kernel spells it ("Adreno740v2", "Adreno33v2"). */ val kgslName: String = "", - /** Where [model] came from: "kernel", "vulkan" or "platform", "" when unknown. */ val modelSource: String = "", ) { enum class Family(val label: String) { A8XX("Adreno 8xx"), - /** Adreno 710/720/722: gen 7 cores cut down enough to need their own patches. */ A7XX_LOW("Adreno 710/720/722"), A7XX("Adreno 7xx"), A6XX("Adreno 6xx"), - /** An Adreno whose model KGSL does not give: treated as the newest family it could be. */ ADRENO_UNKNOWN("Adreno"), NOT_ADRENO("Not an Adreno GPU"); - /** [label] in the app's language: the Adreno families are names, the rest is words. */ fun label(context: Context): String = if (this == NOT_ADRENO) context.getString(R.string.gpuinfo_not_adreno) else label } @@ -52,7 +37,6 @@ data class GpuInfo( else -> Support.UNTESTED } - /** One line for the device card and the system check, in English for the device report. */ val supportText: String get() = when (support) { Support.TESTED -> "Supported" @@ -61,30 +45,23 @@ data class GpuInfo( Support.UNSUPPORTED -> "Not supported: DroidDeck needs an Adreno (Snapdragon) GPU" } - /** [supportText] in the app's language. */ fun supportText(context: Context): String = context.getString(when (support) { Support.TESTED -> R.string.gpuinfo_supported Support.UNTESTED -> if (family == Family.A7XX_LOW) R.string.gpuinfo_experimental else R.string.gpuinfo_below_tested Support.UNSUPPORTED -> R.string.gpuinfo_unsupported }) - /** [name] for the screen: the stand-in for a GPU the device does not name is in the app's language. */ fun displayName(context: Context): String = if (name == UNNAMED) context.getString(R.string.gpu_this_gpu) else name companion object { - /** [name] when the device names no GPU; English, as the device report shows it. */ private const val UNNAMED = "this GPU" fun detect(): GpuInfo { val adreno = File("/sys/class/kgsl/kgsl-3d0").exists() || File("/vendor/lib64/hw/vulkan.adreno.so").exists() val raw = listOf("/sys/class/kgsl/kgsl-3d0/gpu_model", "/sys/class/kgsl/kgsl-3d0/gpu_chipid") .firstNotNullOfOrNull { FileUtils.readString(File(it))?.trim()?.takeIf(String::isNotEmpty) } - // Where vendors put the chip's model, named when it is known: "Snapdragon 8 Gen 2 (QCS8550)". val soc = if (adreno) SocNames.label() else "" val fromKernel = raw?.let { threeDigits(it) } ?: 0 - // Some kernels name the GPU without its model (AYANEO's Pocket FIT: "Adreno33v2"). The - // Vulkan driver's own name, when this process has asked it, then the platform's code - // name stand in - the GPU is the same on every phone of a platform. val fromVulkan = if (fromKernel > 0 || !adreno) 0 else VulkanInfo.cachedOrNull()?.get("device")?.let { threeDigits(it) } ?: 0 val fromPlatform = if (fromKernel > 0 || fromVulkan > 0 || !adreno) 0 else platformModel() val model = maxOf(fromKernel, fromVulkan, fromPlatform) @@ -104,9 +81,8 @@ data class GpuInfo( ) } - private fun threeDigits(text: String): Int = Regex("""(\d{3})""").find(text)?.groupValues?.get(1)?.toIntOrNull() ?: 0 + internal fun threeDigits(text: String): Int = Regex("""(\d{3})""").find(text)?.groupValues?.get(1)?.toIntOrNull() ?: 0 - /** Qualcomm platform code names whose GPU is known for certain. */ private val PLATFORMS = mapOf( "msmnile" to 640, "kona" to 650, "lahaina" to 660, "taro" to 730, "cape" to 730, "kalama" to 740, "pineapple" to 750, "sun" to 830, @@ -115,7 +91,6 @@ data class GpuInfo( internal fun platformModel(platform: String = systemProperty("ro.board.platform")): Int = PLATFORMS[platform.lowercase()] ?: PLATFORMS[systemProperty("ro.vendor.qti.soc_name").lowercase()] ?: 0 - /** android.os.SystemProperties.get, which apps may read but not call directly. */ fun systemProperty(name: String): String = try { Class.forName("android.os.SystemProperties").getMethod("get", String::class.java).invoke(null, name) as? String ?: "" } catch (_: Exception) { diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/HeadTracker.kt b/app/src/main/java/com/droiddeck/launcher/gpu/HeadTracker.kt new file mode 100644 index 0000000000..026cef9361 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/HeadTracker.kt @@ -0,0 +1,112 @@ +package com.droiddeck.launcher.gpu + +import android.content.Context +import android.hardware.Sensor +import android.hardware.SensorEvent +import android.hardware.SensorEventListener +import android.hardware.SensorManager +import android.os.Handler +import android.os.HandlerThread +import android.util.Log +import com.droiddeck.launcher.glasses.SpatialTracking +import com.droiddeck.launcher.wayland.WaylandCompositor + +class HeadTracker(context: Context, private val glasses: Boolean = false, val centerView: Boolean = false, + private val rotation: () -> Int) : SensorEventListener { + private val sensors = context.getSystemService(Context.SENSOR_SERVICE) as SensorManager + private val sensor: Sensor? = sensors.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR) + ?: sensors.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR) + private var thread: HandlerThread? = null + private var started = false + private val glassesLock = Any() + @Volatile private var reference: HeadPose.Reference? = null + @Volatile private var recenterPending = true + @Volatile private var latest: FloatArray? = null + + private val glassesSink = com.droiddeck.launcher.glasses.Glasses.PoseSink { x, y, z, w, _ -> + val m = HeadPose.fromGlasses(x, y, z, w) + synchronized(glassesLock) { + if (!started) return@PoseSink + latest = m + if (SpatialTracking.enabled) { + SpatialTracking.session.view(centerView)?.let { pose -> + WaylandCompositor.nativeSetCardboardSpatialPose(pose.rotation.matrix(), pose.position.array(), + SpatialTracking.session.valid(System.nanoTime())) + } + } else apply(m) + } + } + + val usesGlasses: Boolean get() = glasses + + val available: Boolean get() = sensor != null + val sensorName: String get() = sensor?.let { "${it.name} (${if (it.type == Sensor.TYPE_GAME_ROTATION_VECTOR) "game rotation vector" else "rotation vector"})" } ?: "none" + + fun start() { + if (glasses) { + synchronized(glassesLock) { + if (started) return + started = true + recenterPending = true + } + com.droiddeck.launcher.glasses.Glasses.setPoseSink(glassesSink) + WaylandCompositor.nativeLog("cardboard", "head tracking on: VITURE glasses IMU") + return + } + val s = sensor ?: run { + WaylandCompositor.nativeLog("cardboard", "no rotation sensor: the virtual screen stays head-locked") + WaylandCompositor.nativeSetCardboardPose(HeadPose.IDENTITY, false) + return + } + if (thread != null) return + recenterPending = true + val t = HandlerThread("droiddeck-headtracker").also { it.start() } + thread = t + sensors.registerListener(this, s, SensorManager.SENSOR_DELAY_FASTEST, Handler(t.looper)) + WaylandCompositor.nativeLog("cardboard", "head tracking on: $sensorName") + } + + fun stop() { + if (glasses) { + synchronized(glassesLock) { + if (!started) return + started = false + SpatialTracking.publish(System.nanoTime()) + WaylandCompositor.nativeSetCardboardPose(HeadPose.IDENTITY, false) + } + com.droiddeck.launcher.glasses.Glasses.clearPoseSink(glassesSink) + return + } + val t = thread ?: return + sensors.unregisterListener(this) + t.quitSafely() + thread = null + WaylandCompositor.nativeSetCardboardPose(HeadPose.IDENTITY, false) + } + + fun recenter() { + if (glasses && SpatialTracking.enabled) { SpatialTracking.recenter(centerView); return } + recenterPending = true + if (glasses) synchronized(glassesLock) { if (started) latest?.let { apply(it) } } + else latest?.let { apply(it) } + } + + override fun onSensorChanged(event: SensorEvent) { + val q = HeadPose.quaternionFromRotationVector(event.values) + val m = HeadPose.toScreen(HeadPose.fromQuaternion(q[0], q[1], q[2], q[3]), rotation()) + latest = m + apply(m) + } + + private fun apply(screenToWorld: FloatArray) { + val ref = reference.takeUnless { recenterPending } ?: HeadPose.recenter(screenToWorld, centerView).also { + reference = it + recenterPending = false + } + WaylandCompositor.nativeSetCardboardPose(HeadPose.relative(ref, screenToWorld), true) + } + + override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) { + Log.d("DroidDeck", "head tracker accuracy $accuracy") + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/LinuxVulkanDriver.java b/app/src/main/java/com/droiddeck/launcher/gpu/LinuxVulkanDriver.java index 4662f894f9..d74b5a3f13 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/LinuxVulkanDriver.java +++ b/app/src/main/java/com/droiddeck/launcher/gpu/LinuxVulkanDriver.java @@ -6,28 +6,8 @@ import android.util.Log; import java.util.ArrayList; import java.util.List; -/** - * The Vulkan driver a session draws with inside the runtime: in Steam mode the native client's - * own UI (OpenGL through the runtime's Zink), every game it launches (D3D through Proton's - * DXVK/VKD3D) and gamescope's compositing; in desktop mode every program on the desktop. One - * choice per mode covers all of it. - * - * <p>Distinct from the Android driver the app's compositor loads to put the finished frame on the - * screen ({@link TurnipDriver}), which every session ends in - and NOT interchangeable with it: - * these are glibc processes, that one is bionic. - * - * <p>"" (the default) means the driver the runtime was built with, at - * {@code usr/lib/libvulkan_freedreno.so} inside it - nothing is set and nothing is touched. - * Otherwise the value is an imported driver's id ({@link LinuxVulkanDriverManager}), and the - * session is handed that driver's ICD manifest in {@code BL_VK_DRIVER}: the session script points - * the Vulkan loader at it with {@code VK_DRIVER_FILES} after checking both the manifest and the - * library are readable from inside, so the runtime itself is never modified and the choice is - * reversible. Ported from Bannerlator's {@code LinuxVulkanDriver} (GPL-3.0); the choice lives in - * {@code SessionPrefs} per mode here rather than on a shortcut. - */ public final class LinuxVulkanDriver { private static final String TAG = "LinuxVulkanDriver"; - /** Env var the session reads; its value is an absolute ICD manifest path. */ public static final String ENV = "BL_VK_DRIVER"; public static final String HELP_TEXT = @@ -38,7 +18,6 @@ public final class LinuxVulkanDriver { private LinuxVulkanDriver() {} - /** Stored values in editor order: the runtime's own driver, then each imported one. */ public static List<String> optionValues(Context context) { ArrayList<String> values = new ArrayList<>(); values.add(""); @@ -46,10 +25,6 @@ public final class LinuxVulkanDriver { return values; } - /** - * Label for a stored value. An id that is no longer installed says so - the launch path falls - * back to the runtime's own driver for it. - */ public static String optionLabel(Context context, String value) { if (value == null || value.isEmpty()) return "Runtime default (built into the runtime)"; LinuxVulkanDriverManager m = new LinuxVulkanDriverManager(context); @@ -58,10 +33,6 @@ public final class LinuxVulkanDriver { return m.getDriverName(value) + (ver.isEmpty() ? "" : " " + ver) + " (imported)"; } - /** - * The ICD manifest path to hand the session, or null to leave the runtime's own driver alone. - * An id whose import is gone resolves to null rather than failing the launch. - */ public static String resolveIcdPath(Context context, String value) { if (value == null || value.isEmpty()) return null; LinuxVulkanDriverManager m = new LinuxVulkanDriverManager(context); diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/LinuxVulkanDriverManager.java b/app/src/main/java/com/droiddeck/launcher/gpu/LinuxVulkanDriverManager.java index e5c3d585c0..3973297cd8 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/LinuxVulkanDriverManager.java +++ b/app/src/main/java/com/droiddeck/launcher/gpu/LinuxVulkanDriverManager.java @@ -22,30 +22,6 @@ import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -/** - * Imported LINUX Vulkan drivers: glibc Turnip ICDs ({@code Turnip-<tag>[-variant]-Linux.zip} from - * Banners-Turnip) for the runtime - the gamescope session that runs Valve's native ARM64 Steam - * client, and the KDE Plasma desktop beside it. This is the driver that DRAWS there: the client's own UI - * (OpenGL through the runtime's Zink), every game the client launches (D3D through Proton's - * DXVK/VKD3D) and everything on the desktop. Putting the frame on the screen stays the Android - * driver's job, in the app's compositor ({@link TurnipDriver}). - * - * <p>Not interchangeable with that one: the client and its games are glibc processes and cannot - * load a bionic object at all, and this one cannot be loaded by the app. The check that separates - * them is the libc the driver links against - {@code libc.so.6} here, {@code libc.so} there. - * - * <p>Layout (under the app's files dir, which the session sees by its full host path): - * <pre> - * files/linux_vulkan_drivers/<id>/ - * libvulkan_freedreno.so the driver - * icd.json generated Vulkan ICD manifest; library_path = the .so's ABSOLUTE path - * meta.json name / driverVersion / minGlibc, our own schema - * </pre> - * The session gets {@code icd.json}'s path in {@code BL_VK_DRIVER} and exports it as - * {@code VK_DRIVER_FILES}, so nothing inside the runtime is modified and the choice is reversible. - * - * <p>Ported from Bannerlator's {@code LinuxVulkanDriverManager} (GPL-3.0), unchanged in behaviour. - */ public class LinuxVulkanDriverManager { private static final String TAG = "LinuxVulkanDriver"; public static final String DIR_NAME = "linux_vulkan_drivers"; @@ -66,14 +42,12 @@ public class LinuxVulkanDriverManager { return new File(rootDir, id); } - /** Installed = has the .so AND the generated manifest (a half-extracted dir is never offered). */ public boolean isInstalled(String id) { if (id == null || id.isEmpty() || id.contains("/") || id.contains("..")) return false; File dir = getDriverDir(id); return new File(dir, LIB_NAME).isFile() && new File(dir, ICD_NAME).isFile(); } - /** Absolute path of the driver's ICD manifest, or null when the id isn't installed. */ public String getIcdPath(String id) { return isInstalled(id) ? new File(getDriverDir(id), ICD_NAME).getAbsolutePath() : null; } @@ -108,7 +82,6 @@ public class LinuxVulkanDriverManager { return m != null ? m.optString("driverVersion", "") : ""; } - /** The glibc the driver asks for, as its zip recorded it ("" when the zip did not say). */ public String getMinGlibc(String id) { JSONObject m = readMeta(id); return m != null ? m.optString("minGlibc", "") : ""; @@ -118,14 +91,8 @@ public class LinuxVulkanDriverManager { if (id == null || id.isEmpty() || id.contains("/") || id.contains("..")) return; Log.d(TAG, "removing imported Linux Vulkan driver " + id); FileUtils.delete(getDriverDir(id)); - // A mode still set to this id falls back to the runtime's own driver at launch (logged there). } - /** - * Import a {@code -Linux.zip}. Returns the new driver id. - * @throws IllegalArgumentException with a user-facing reason when the zip is not an importable - * Linux driver; {@link IOException} on read/extract failures. - */ public String installDriver(Uri zipUri, String displayName) throws IOException { File tmpDir = newStagingDir(); boolean keep = false; @@ -138,7 +105,6 @@ public class LinuxVulkanDriverManager { ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (entry.isDirectory()) continue; - // Flatten: only the base name matters, and it also defeats zip-slip paths. String base = new File(entry.getName()).getName(); if (base.isEmpty()) continue; if (base.startsWith("libvulkan_freedreno") && base.endsWith(".so")) { @@ -154,8 +120,6 @@ public class LinuxVulkanDriverManager { Log.w(TAG, "meta.json unreadable, ignoring: " + e.getMessage()); } } - // The zip's own freedreno_icd.aarch64.json is dropped on purpose: its - // library_path is relative to itself, and adopt() writes an absolute one. } } String id = adopt(tmpDir, soName, zipMeta, displayName); @@ -166,7 +130,6 @@ public class LinuxVulkanDriverManager { } } - /** An empty directory beside the installed drivers, for a driver's files before {@link #adopt}. */ File newStagingDir() throws IOException { File tmpDir = new File(rootDir, ".tmp-" + System.nanoTime()); FileUtils.delete(tmpDir); @@ -174,11 +137,6 @@ public class LinuxVulkanDriverManager { return tmpDir; } - /** - * Check a staged driver ({@link #LIB_NAME} in {@code tmpDir}, copied from {@code soName} in - * the zip), write its manifest and meta.json, and move it in. Returns the id; the caller - * deletes {@code tmpDir} when this throws. - */ String adopt(File tmpDir, String soName, JSONObject zipMeta, String displayName) throws IOException { try { if (soName == null) { @@ -188,9 +146,6 @@ public class LinuxVulkanDriverManager { if (!isAarch64Elf(so)) { throw new IllegalArgumentException(context.getString(R.string.lvd_not_aarch64, soName)); } - // The one check that actually separates this from the bionic builds. Both sonames - // are in the driver's .dynstr, so a byte scan is enough and needs no ELF parsing: - // glibc's is versioned ("libc.so.6"), bionic's is not ("libc.so"). if (!containsAscii(so, "libc.so.6")) { throw new IllegalArgumentException(context.getString(R.string.lvd_not_glibc, soName)); } @@ -209,8 +164,6 @@ public class LinuxVulkanDriverManager { String id = uniqueId(sanitizeId(name)); File dir = getDriverDir(id); - // ICD manifest: absolute library_path, so the loader never depends on cwd and the guest - // reads it at the same path the app wrote (the files dir is bound into the session). JSONObject icd = new JSONObject(); icd.put("file_format_version", "1.0.0"); JSONObject icdBody = new JSONObject(); @@ -251,7 +204,6 @@ public class LinuxVulkanDriverManager { return s.isEmpty() ? "linux-driver" : s; } - /** ELF magic, EI_CLASS = 64-bit, EI_DATA = little-endian, e_machine = 0xB7 (AArch64). */ static boolean isAarch64Elf(File f) { try (FileInputStream in = new FileInputStream(f)) { byte[] h = new byte[20]; @@ -292,7 +244,6 @@ public class LinuxVulkanDriverManager { while (j < nb.length && buf[i + j] == nb[j]) j++; if (j == nb.length) return true; } - // Keep the last needle-1 bytes so a match across a buffer boundary is still found. carry = Math.min(nb.length - 1, len); System.arraycopy(buf, len - carry, buf, 0, carry); } diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/Lossless.kt b/app/src/main/java/com/droiddeck/launcher/gpu/Lossless.kt index b07e5d4bb1..f78cb629ee 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/Lossless.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/Lossless.kt @@ -10,16 +10,6 @@ import java.io.File import java.security.DigestOutputStream import java.security.MessageDigest -/** - * LSFG's shader chain, from the user's own Lossless Scaling (Steam app 993090). - * - * The copy the Steam client installs, in any library it installs to, is taken by - * itself and taken again whenever the client updates it. Once the session has seen the account - * own the app, a Lossless.dll can also be imported by hand; it stays until the Steam copy changes - * or another is imported. The DLL is copied in and its shaders are built into a cache named after - * its contents, so a different DLL hands the compositor a different path and its engine reloads. - * Everything here blocks: call it off the main thread. - */ object Lossless { enum class Source { NONE, STEAM, IMPORT } @@ -46,7 +36,6 @@ object Lossless { return State(owned(context), cacheFile(context)?.isFile == true, source) } - /** Recorded once: by the session's ownership check (a flag in the guest's home) or a Steam copy. */ fun owned(context: Context): Boolean { if (prefs(context).getBoolean(KEY_OWNED, false)) return true if (!ownedFlag(context).exists()) return false @@ -56,7 +45,6 @@ object Lossless { fun cacheFile(context: Context): File? = prefs(context).getString(KEY_ID, null)?.let { cacheFor(context, it) } - /** Takes a new or updated Steam copy and rebuilds a missing or outdated cache. A [LsfgNative] status. */ @Synchronized fun sync(context: Context): Int { val steam = steamDll(context) @@ -163,11 +151,12 @@ object Lossless { ?.forEach { it.delete() } } - /** The newest copy in any library the client installs to: its own, the card's, the Games folders. */ private fun steamDll(context: Context): File? { val libraries = listOfNotNull( File(LinuxRuntime.rootDir(context), "root/.local/share/Steam"), + File(LinuxRuntime.rootDir(context), "root/.droiddeck-x64/.local/share/Steam"), GameStorage.effective(context)?.path?.let(::File), + GameStorage.x64CardLibrary(context), ) + com.droiddeck.launcher.frontend.AddedGames.roots(context).map { it.host } return libraries.map { File(it, STEAM_DLL) }.filter { it.isFile }.maxByOrNull { it.lastModified() } } diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/LsfgNative.java b/app/src/main/java/com/droiddeck/launcher/gpu/LsfgNative.java index 6eb3c3441a..d16a8c7a47 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/LsfgNative.java +++ b/app/src/main/java/com/droiddeck/launcher/gpu/LsfgNative.java @@ -1,16 +1,10 @@ package com.droiddeck.launcher.gpu; -/** - * The native half of LSFG's shader cache (lsfg_jni.cpp, compiled into the compositor library): - * {@code Lossless.dll} is mapped read-only and parsed as data, never loaded or executed, and its - * DXBC chain translated to SPIR-V. {@link Lossless} decides when; these calls block. - */ final class LsfgNative { static { System.loadLibrary("droiddeckwayland"); } private LsfgNative() {} - // Mirrors lsfg::DllStatus. static final int STATUS_OK = 0; static final int STATUS_NOT_INSTALLED = 1; static final int STATUS_UNREADABLE_FILE = 2; @@ -19,7 +13,6 @@ final class LsfgNative { static final int STATUS_TRANSLATION_FAILED = 5; static final int STATUS_CACHE_UNUSABLE = 6; - // Mirrors lsfg::Variant. static final int VARIANT_NONE = 0; static native int nativeValidateDll(String dllPath); diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/ScreenEffects.kt b/app/src/main/java/com/droiddeck/launcher/gpu/ScreenEffects.kt index 36d233f49d..a7c7175c72 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/ScreenEffects.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/ScreenEffects.kt @@ -6,20 +6,6 @@ import com.droiddeck.launcher.wayland.WaylandCompositor import org.json.JSONObject import kotlin.math.abs -/** - * The compositor's post chain (waylandcomp/src/effects_chain.c) as the session menu drives it: - * the colour grade, the sharpening, the shader toggles and terminal debanding. Units are the - * menu's own, so a value goes straight from a row into the setter it drives: - * - * - [brightness] / [contrast] -100..100, 0 = neutral - * - [gamma] 0.5..3.0, 1.0 = neutral - * - [saturation] 0..200 percent, 100 = neutral - * - [casLevel] 0..100; the pass runs only while [cas] is on - * - [debandStrength] 0..200, 100 = one LSB - * - * Applies live: the compositor picks the change up on its next frame. While any pass is on, a - * zero-copy game goes through the compositor pass instead, which costs a little GPU time. - */ data class ScreenEffects( val brightness: Int = 0, val contrast: Int = 0, @@ -35,14 +21,11 @@ data class ScreenEffects( val crt: Boolean = false, val ntsc: Boolean = false, ) { - /** The sharpening level the picture gets: 0 while the pass is off, whatever its level is parked at. */ val effectiveCas: Int get() = if (cas) casLevel else 0 - /** Whether any pass runs, so the menu can say when the picture is untouched. */ val any: Boolean get() = brightness != 0 || contrast != 0 || abs(gamma - 1f) > 0.005f || saturation != 100 || effectiveCas > 0 || hdr || deband || fxaa || toon || crt || ntsc - /** Hands every pass to the compositor, with the Look's name for its log line. */ fun push(upscaler: Int) { WaylandCompositor.nativeSetCas(cas, casLevel) WaylandCompositor.nativeSetHdr(hdr) @@ -77,30 +60,19 @@ data class ScreenEffects( } } -/** - * One Look: a named set of values for the rows that already exist on the Display page. Picking - * a Look moves those rows; each stays adjustable afterwards, and the moment one moves the Look - * row reads Custom. [scalingMode] null leaves the scaling mode alone; otherwise it is a - * SessionPrefs.upscalerChoices mode the Look switches to. - */ data class Look( - /** The Look's id: what the row picks by and the compositor logs. */ val name: String, val effects: ScreenEffects, val scalingMode: Int? = null, - /** One line under the row while this Look is picked. */ val desc: String, - /** [name] and [desc] in the app's language, for the menu. */ @StringRes val label: Int, @StringRes val descRes: Int, ) object ScreenEffectLooks { - // Scaling modes as the compositor numbers them (WaylandCompositor.nativeSetUpscaler). private const val SCALING_NEAREST = 2 private const val SCALING_FSR = 4 - /** Index 0 is the neutral state a fresh session matches, so the row always names something. */ val LOOKS: List<Look> = listOf( Look("Off", ScreenEffects.OFF, desc = "Nothing applied.", label = R.string.frame_gen_off, descRes = R.string.look_off_desc), Look("Game Clarity", ScreenEffects(brightness = 2, contrast = 12, saturation = 108, cas = true, casLevel = 55), @@ -127,11 +99,6 @@ object ScreenEffectLooks { desc = "Toon outlines plus sharpening.", label = R.string.look_anime_edge, descRes = R.string.look_anime_edge_desc), ) - /** - * The Look the live values are, or null for Custom. A Look's sharpening is compared as the - * effective level, so a pass switched off matches a Look without one whatever its level is - * parked at; a Look with no scaling mode of its own matches under any. - */ fun match(e: ScreenEffects, upscaler: Int): Look? = LOOKS.firstOrNull { l -> val t = l.effects t.brightness == e.brightness && t.contrast == e.contrast && abs(t.gamma - e.gamma) < 0.005f && diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/SocNames.kt b/app/src/main/java/com/droiddeck/launcher/gpu/SocNames.kt index 76adb4bf2d..39ad3f2ab2 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/SocNames.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/SocNames.kt @@ -2,14 +2,7 @@ package com.droiddeck.launcher.gpu import android.os.Build -/** - * Which chip this is, as a person would say it. Handhelds often leave Android's SoC model blank - * (the AYANEO Pocket FIT does), so the model is looked for where vendors put it, the same order - * ClusterTune uses; then it is named from a table of models we are sure of, or from the platform - * code name as a family ("Snapdragon 8 Gen 3 family") when the model itself is a vendor variant. - */ object SocNames { - /** Model codes whose product name is certain. */ private val MODELS = mapOf( "SM8150" to "Snapdragon 855", "SM8250" to "Snapdragon 865", "SM8250-AC" to "Snapdragon 870", "SM8350" to "Snapdragon 888", "SM8450" to "Snapdragon 8 Gen 1", "SM8475" to "Snapdragon 8+ Gen 1", @@ -19,27 +12,22 @@ object SocNames { "SM6375" to "Snapdragon 695", ) - /** Platform code names: every chip of one platform shares its CPU and GPU design. */ private val PLATFORMS = mapOf( "msmnile" to "Snapdragon 855/860", "kona" to "Snapdragon 865/870", "lahaina" to "Snapdragon 888", "taro" to "Snapdragon 8 Gen 1", "cape" to "Snapdragon 8+ Gen 1", "kalama" to "Snapdragon 8 Gen 2", "pineapple" to "Snapdragon 8 Gen 3", "sun" to "Snapdragon 8 Elite", ) - /** The chip's model code ("QCS8550", "SG8350P"), or "" when the phone does not say. */ fun model(prop: (String) -> String = GpuInfo::systemProperty): String { val sdk = if (Build.VERSION.SDK_INT >= 31) Build.SOC_MODEL.takeIf { it != Build.UNKNOWN }.orEmpty() else "" return listOf(prop("ro.soc.model"), prop("ro.vendor.qti.soc_model"), sdk, prop("ro.fota.platform")) .map { it.trim() } - // ro.fota.platform is often a branch name ("MSM_13.0"), not a chip. .firstOrNull { it.isNotEmpty() && !Regex("(?i)^msm_\\d").containsMatchIn(it) }.orEmpty() } - /** "Snapdragon 8 Gen 2", "Snapdragon 8 Gen 3 family", or null when neither the model nor the platform is known. */ fun name(model: String, platform: String = GpuInfo.systemProperty("ro.board.platform")): String? = MODELS[model.uppercase()] ?: PLATFORMS[platform.lowercase()]?.let { "$it family" } - /** For the GPU card: "Snapdragon 8 Gen 2 (QCS8550)", the bare model, or "". */ fun label(model: String = model(), platform: String = GpuInfo.systemProperty("ro.board.platform")): String { val name = name(model, platform) return when { diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/SteamVr.kt b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVr.kt new file mode 100644 index 0000000000..b06498339d --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVr.kt @@ -0,0 +1,62 @@ +package com.droiddeck.launcher.gpu + +import android.content.Context +import com.droiddeck.launcher.agent.AgentGuest +import org.json.JSONObject + +object SteamVr { + const val APP_ID = "250820" + + enum class Status { + UNAVAILABLE, + NOT_INSTALLED, + INSTALLING, + READY, + RUNNING, + } + + internal fun shouldPoll(status: Status?, cardboardEnabled: Boolean, pictureSwitched: Boolean, + glassesControl: Boolean, requested: Boolean): Boolean = + requested || cardboardEnabled || pictureSwitched || glassesControl || + status == Status.RUNNING || status == Status.INSTALLING + + internal fun autoAction( + status: Status, requested: Boolean, loading: Boolean, steamSession: Boolean, + startTried: Boolean, installTried: Boolean, + ): String? { + if (!requested || loading || !steamSession || startTried) return null + return when (status) { + Status.READY -> "start" + Status.NOT_INSTALLED -> if (installTried) null else "install" + else -> null + } + } + + fun status(context: Context): Status = runCatching { + parse(AgentGuest.call(context, JSONObject().put("kind", "vr").put("action", "status"), STATUS_TIMEOUT_MS)) + }.getOrDefault(Status.UNAVAILABLE) + + fun run(context: Context, action: String): Boolean = runCatching { + require(action in setOf("install", "start", "stop")) + succeeded(action, AgentGuest.call(context, JSONObject().put("kind", "vr").put("action", action), ACTION_TIMEOUT_MS)) + }.getOrDefault(false) + + fun succeeded(action: String, answer: JSONObject): Boolean = when { + !answer.optBoolean("ok", false) -> false + action == "install" -> answer.optBoolean("started", false) + else -> answer.optInt("exitCode", -1) == 0 + } + + fun parse(answer: JSONObject): Status = when { + !answer.optBoolean("ok", false) -> Status.UNAVAILABLE + answer.optInt("exitCode", 0) != 0 -> Status.UNAVAILABLE + answer.optBoolean("installing") -> Status.INSTALLING + !answer.optBoolean("driver") -> Status.UNAVAILABLE + !answer.optBoolean("installed") -> Status.NOT_INSTALLED + answer.optBoolean("running") -> Status.RUNNING + else -> Status.READY + } + + private const val STATUS_TIMEOUT_MS = 10_000L + private const val ACTION_TIMEOUT_MS = 40_000L +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrDeviceLossLog.kt b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrDeviceLossLog.kt new file mode 100644 index 0000000000..4d94b6628a --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrDeviceLossLog.kt @@ -0,0 +1,86 @@ +package com.droiddeck.launcher.gpu + +import org.json.JSONObject +import java.io.File +import java.io.RandomAccessFile +import java.nio.file.Files +import java.nio.file.attribute.BasicFileAttributes + +/** Only new compositor output is evidence of a fault in the current session. */ +internal class SteamVrDeviceLossLog(private val file: File) { + private var identity: Any? = identity() + private var position = file.length() + private var prefix = runCatching { + RandomAccessFile(file, "r").use { input -> ByteArray(minOf(64, input.length()).toInt()).also(input::readFully) } + }.getOrDefault(byteArrayOf()) + private var partial = "" + private var handled = false + + private fun identity(): Any? = runCatching { + Files.readAttributes(file.toPath(), BasicFileAttributes::class.java).fileKey() + }.getOrNull() + + fun poll(): Boolean { + if (handled) return true + if (!file.isFile) return false + return runCatching { + val current = identity() + RandomAccessFile(file, "r").use { input -> + val head = ByteArray(minOf(64, input.length()).toInt()).also(input::readFully) + val replaced = prefix.isNotEmpty() && !head.take(prefix.size).toByteArray().contentEquals(prefix) + if (current != identity || input.length() < position || replaced) { + position = 0 + partial = "" + } + identity = current + prefix = head + // Fault loops can produce megabytes per second. Bound work and keep the newest output. + if (input.length() - position > MAX_READ) { + position = input.length() - MAX_READ + partial = "" + } + input.seek(position) + val bytes = ByteArray(minOf(MAX_READ, input.length() - position).toInt()) + input.readFully(bytes) + position = input.filePointer + val text = partial + bytes.toString(Charsets.UTF_8) + val end = text.lastIndexOf('\n') + partial = text.substring(end + 1).takeLast(2048) + if (end >= 0 && isDeviceLoss(text.substring(0, end + 1))) handled = true + handled + } + }.getOrDefault(false) + } + + companion object { + private const val MAX_READ = 128 * 1024L + internal fun isDeviceLoss(text: String): Boolean = + Regex("\\bVK_ERROR_DEVICE_LOST\\b|\\bvkerror\\s*=\\s*-4\\b", RegexOption.IGNORE_CASE).containsMatchIn(text) + } +} + +internal object SteamVrRecoveryPolicy { + const val COOLDOWN_MS = 10 * 60 * 1000L + const val STOP_MS = 15_000L + const val LOGS_MS = 30_000L + private const val POLL_MS = 250L + + enum class Shutdown { COMPLETE, LOGS_PENDING, STUCK } + + fun canRestartAutomatically(lastAttempt: Long, now: Long): Boolean = + lastAttempt == 0L || (now >= lastAttempt && now - lastAttempt >= COOLDOWN_MS) + + fun awaitShutdown(session: () -> JSONObject?, now: () -> Long, sleep: (Long) -> Unit): Shutdown { + fun await(ms: Long, done: (JSONObject) -> Boolean): Boolean { + val deadline = now() + ms + while (true) { + if (session()?.let(done) == true) return true + if (now() >= deadline) return false + sleep(POLL_MS) + } + } + if (!await(STOP_MS) { it.optString("phase") in setOf("IDLE", "FAILED") }) return Shutdown.STUCK + return if (await(LOGS_MS) { !it.optBoolean("artifactsAvailable") || it.optBoolean("artifactsComplete") }) Shutdown.COMPLETE + else Shutdown.LOGS_PENDING + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrRecovery.kt b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrRecovery.kt new file mode 100644 index 0000000000..8c045b68e2 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrRecovery.kt @@ -0,0 +1,83 @@ +package com.droiddeck.launcher.gpu + +import android.app.Activity +import android.app.AlertDialog +import android.content.Context +import android.content.Intent +import android.os.Handler +import android.os.Looper +import com.droiddeck.launcher.R +import com.droiddeck.launcher.runtime.LinuxRuntime +import com.droiddeck.launcher.session.SessionEvents +import java.io.File + +/** Process-wide cursor survives Activity recreation; a new session ignores older log errors. */ +internal object SteamVrHealth { + private var session: String? = null + private var log: SteamVrDeviceLossLog? = null + + @Synchronized fun begin(context: Context, sessionId: String?) { + if (sessionId == session && log != null) return + session = sessionId + log = SteamVrDeviceLossLog(File(LinuxRuntime.rootDir(context), + "root/.local/share/Steam/logs/vrcompositor.txt")) + } + + @Synchronized fun deviceLost(): Boolean = log?.poll() == true +} + +internal class SteamVrRecovery(private val activity: Activity, private val foreground: () -> Boolean) { + private val handler = Handler(Looper.getMainLooper()) + private var dialog: AlertDialog? = null + private var handled = false + private var countdown: Runnable? = null + + fun detected() { + if (handled || !foreground() || activity.isFinishing || activity.isDestroyed) return + handled = true + SessionEvents.record("steamvr.device_lost") + val prefs = activity.getSharedPreferences(PREFS, Context.MODE_PRIVATE) + val automatic = SteamVrRecoveryPolicy.canRestartAutomatically(prefs.getLong(LAST_ATTEMPT, 0), System.currentTimeMillis()) + var seconds = 8 + fun message() = if (automatic) activity.getString(R.string.steamvr_recovery_countdown, seconds) + else activity.getString(R.string.steamvr_recovery_repeated) + val prompt = AlertDialog.Builder(activity) + .setTitle(R.string.steamvr_recovery_title) + .setMessage(message()) + .setPositiveButton(R.string.steamvr_recovery_restart) { _, _ -> restart() } + .setNegativeButton(R.string.steamvr_recovery_cancel) { _, _ -> } + .create() + prompt.setOnDismissListener { countdown?.let(handler::removeCallbacks); countdown = null; dialog = null } + dialog = prompt + // A touch meant for the game must not silently dismiss the recovery controls. + prompt.setCanceledOnTouchOutside(false) + prompt.show() + if (automatic) { + countdown = object : Runnable { + override fun run() { + if (!foreground() || activity.isFinishing || activity.isDestroyed) { handled = false; prompt.dismiss(); return } + if (--seconds <= 0) { prompt.dismiss(); restart(); return } + prompt.setMessage(message()) + handler.postDelayed(this, 1000) + } + }.also { handler.postDelayed(it, 1000) } + } + } + + private fun restart() { + if (!foreground()) return + // Commit before crossing processes so a repeated fault cannot create a restart loop. + if (!activity.getSharedPreferences(PREFS, Context.MODE_PRIVATE).edit() + .putLong(LAST_ATTEMPT, System.currentTimeMillis()).commit()) return + SessionEvents.record("steamvr.recovery_requested") + activity.startActivity(Intent(activity, SteamVrRestartActivity::class.java) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) + } + + fun close() { countdown?.let(handler::removeCallbacks); countdown = null; dialog?.dismiss() } + + companion object { + internal const val PREFS = "steamvr_recovery" + internal const val LAST_ATTEMPT = "lastAttempt" + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrRecoverySettings.kt b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrRecoverySettings.kt new file mode 100644 index 0000000000..c05cc21296 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrRecoverySettings.kt @@ -0,0 +1,27 @@ +package com.droiddeck.launcher.gpu + +import android.util.AtomicFile +import org.json.JSONObject +import java.io.File + +internal object SteamVrRecoverySettings { + /** After a graphics crash SteamVR can quarantine our HMD, leaving a server with no VR output. */ + fun unblockHeadset(file: File): Boolean { + if (!file.isFile) return false + val settings = JSONObject(file.readText()) + val driver = settings.optJSONObject("driver_droiddeck") ?: return false + if (!driver.optBoolean("blocked_by_safe_mode")) return false + // Preserve every other setting, including safe mode and blocks on other drivers. + driver.put("blocked_by_safe_mode", false) + val atomic = AtomicFile(file) + val output = atomic.startWrite() + try { + output.write(settings.toString(3).toByteArray(Charsets.UTF_8)) + atomic.finishWrite(output) + } catch (e: Exception) { + atomic.failWrite(output) + throw e + } + return true + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrRestartActivity.kt b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrRestartActivity.kt new file mode 100644 index 0000000000..671132c4f2 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/SteamVrRestartActivity.kt @@ -0,0 +1,72 @@ +package com.droiddeck.launcher.gpu + +import android.app.Activity +import android.app.ActivityManager +import android.content.Intent +import android.net.Uri +import android.os.Bundle +import android.os.Process +import android.os.SystemClock +import android.view.Gravity +import android.widget.TextView +import com.droiddeck.launcher.R +import com.droiddeck.launcher.SessionActivity +import com.droiddeck.launcher.session.SessionService +import org.json.JSONObject + +/** A visible, private process survives destruction of the app's native graphics context. */ +class SteamVrRestartActivity : Activity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(TextView(this).apply { + setText(R.string.steamvr_recovery_restarting) + gravity = Gravity.CENTER + textSize = 22f + }) + Thread({ recover() }, "steamvr-process-recovery").start() + } + + private fun recover() { + try { + val manager = getSystemService(ACTIVITY_SERVICE) as ActivityManager + val main = manager.runningAppProcesses?.firstOrNull { + it.processName == packageName && it.uid == Process.myUid() && it.pid != Process.myPid() + } ?: error("DroidDeck process is unavailable") + val uri = Uri.parse("content://$packageName.agent") + contentResolver.call(uri, "stop", null, null) + val shutdown = SteamVrRecoveryPolicy.awaitShutdown({ + runCatching { + contentResolver.call(uri, "state", null, null)?.getString("json")?.let(::JSONObject)?.optJSONObject("session") + }.getOrNull() + }, SystemClock::elapsedRealtime, SystemClock::sleep) + if (shutdown != SteamVrRecoveryPolicy.Shutdown.COMPLETE) + android.util.Log.w("SteamVrRecovery", "Restarting before the session finished stopping: $shutdown") + // Only the verified main process, never a caller-supplied PID or an external app. + Process.killProcess(main.pid) + val exited = SystemClock.elapsedRealtime() + 5000 + while (java.io.File("/proc/${main.pid}").exists() && SystemClock.elapsedRealtime() < exited) SystemClock.sleep(50) + check(!java.io.File("/proc/${main.pid}").exists()) { "DroidDeck process did not exit" } + val settings = java.io.File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(this), + "root/.local/share/Steam/config/steamvr.vrsettings") + runCatching { SteamVrRecoverySettings.unblockHeadset(settings) } + .onSuccess { if (it) android.util.Log.i("SteamVrRecovery", "Cleared the DroidDeck HMD crash block before restarting SteamVR") } + .onFailure { android.util.Log.w("SteamVrRecovery", "Could not read the SteamVR settings; restarting with them unchanged", it) } + runOnUiThread { + startActivity(Intent(this, SessionActivity::class.java) + .putExtra(SessionService.EXTRA_MODE, SessionService.MODE_STEAM) + .putExtra(SessionActivity.EXTRA_STEAMVR, true) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)) + finishAndRemoveTask() + } + } catch (e: Exception) { + android.util.Log.e("SteamVrRecovery", "Could not restart DroidDeck", e) + runOnUiThread { + setContentView(TextView(this).apply { + setText(R.string.steamvr_recovery_failed) + gravity = Gravity.CENTER + textSize = 22f + }) + } + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/TpUbwcHint.kt b/app/src/main/java/com/droiddeck/launcher/gpu/TpUbwcHint.kt new file mode 100644 index 0000000000..84440c213d --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/gpu/TpUbwcHint.kt @@ -0,0 +1,36 @@ +package com.droiddeck.launcher.gpu + +import android.util.Log + +object TpUbwcHint { + const val ENV = "FD_DEV_FEATURES" + private const val TAG = "TpUbwcHint" + + @Volatile private var resolved = false + @Volatile private var cached: String? = null + + // 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. + internal fun features(model: Int, systemDriverVersion: String?): String? { + if (model != 740) return null + val blob = systemDriverVersion?.split('.')?.getOrNull(1)?.toIntOrNull() ?: return null + return "enable_tp_ubwc_flag_hint=" + if (blob >= 700) "1" else "0" + } + + @Synchronized + fun forThisDevice(): String? { + if (resolved) return cached + val model = GpuInfo.detect().model + val version = if (model == 740) VulkanInfo.query()["driver_version"] else null + cached = features(model, version) + resolved = true + Log.i(TAG, "Adreno $model, system driver ${version ?: "n/a"}: ${cached ?: "driver default"}") + return cached + } + + fun applyToProcess() { + val value = forThisDevice() ?: return + runCatching { android.system.Os.setenv(ENV, value, true) } + .onFailure { Log.w(TAG, "setenv $ENV failed: ${it.javaClass.simpleName}") } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/TurnipDriver.java b/app/src/main/java/com/droiddeck/launcher/gpu/TurnipDriver.java index 5cd4146769..6fb7360f3e 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/TurnipDriver.java +++ b/app/src/main/java/com/droiddeck/launcher/gpu/TurnipDriver.java @@ -8,6 +8,7 @@ import android.util.Log; import com.droiddeck.launcher.R; import com.droiddeck.launcher.core.FileUtils; import com.droiddeck.launcher.core.TarZst; +import com.droiddeck.launcher.session.QuestExperimental; import com.droiddeck.launcher.session.SessionPrefs; import org.json.JSONObject; @@ -24,39 +25,17 @@ import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -/** - * The Vulkan driver the in-app compositor runs on. It has to be Turnip: the system Adreno driver - * does not implement VK_EXT_image_drm_format_modifier, so importing the dma-bufs gamescope hands - * over fails and the session renders nothing. Two builds ship in the apk, one per Adreno - * generation, and the GPU decides which is unpacked - unless the user has imported an AdrenoTools - * zip of their own and chosen it, which then wins. - * - * <p>The guest's own Turnip is a different copy entirely - a glibc build inside the rootfs, or an - * imported one ({@link LinuxVulkanDriverManager}). This one is the bionic build the app process - * loads through adrenotools, and it is what every session ends in: whatever draws inside the - * runtime, this is the driver that puts the frame on the panel. - * - * <p>Every driver, bundled or imported, lives under {@code files/graphics_driver/<id>/} with a - * {@code meta.json} whose {@code libraryName} names the .so beside it - the AdrenoTools layout. - * The import path is ported from Bannerlator's {@code AdrenotoolsManager} (GPL-3.0), including - * the refusal of zips that belong in the Linux runtime list: a "-Linux" (glibc) Turnip names no - * library on purpose, and installed here it would put the compositor on the system Vulkan - a - * black screen wearing a driver's name. - */ public final class TurnipDriver { private static final String TAG = "TurnipDriver"; - /** Adreno 7xx (8 Gen 2/3, e.g. the Pocket FIT's A750). */ + private static final String DRIVER_A6XX = "turnip26.3.0-a6xx"; private static final String DRIVER_A7XX = "turnip25.1.0"; - /** Adreno 8xx (8 Elite, e.g. a Fold 8's A830). */ private static final String DRIVER_A8XX = "turnip-sdk36"; - /** The two the apk carries; never removable, unpacked on demand. */ - public static final List<String> BUNDLED = Collections.unmodifiableList(Arrays.asList(DRIVER_A7XX, DRIVER_A8XX)); - /** Overrides the pick, for a device we cannot reach: a7xx, a8xx or system. */ + public static final List<String> BUNDLED = Collections.unmodifiableList(Arrays.asList( + DRIVER_A7XX, DRIVER_A8XX, com.droiddeck.launcher.session.QuestExperimental.DRIVER, + DRIVER_A6XX, com.droiddeck.launcher.session.QuestExperimental.DRIVER_A6XX)); private static final String OVERRIDE_FILE = "Download/droiddeck-driver"; - /** Bundled drivers the user deleted: hidden from the list, their unpacked copy removed. */ private static final String PREFS = "graphics_driver"; private static final String KEY_HIDDEN = "hiddenBundled"; - /** Stored choice meaning "pick by GPU" - the default, and what a removed import falls back to. */ public static final String AUTO = ""; public static final String HELP_TEXT = @@ -74,7 +53,6 @@ public final class TurnipDriver { this.contentDir = new File(context.getFilesDir(), "graphics_driver"); } - /** Absolute directory holding the driver, with a trailing slash - adrenotools wants both. */ public String driverPath(String driverId) { return new File(contentDir, driverId).getAbsolutePath() + "/"; } @@ -84,7 +62,6 @@ public final class TurnipDriver { return meta != null ? meta.optString("libraryName", null) : null; } - /** meta.json's "name", or the id when it has none. */ public String displayName(String driverId) { JSONObject meta = readMeta(driverId); String name = meta != null ? meta.optString("name", "") : ""; @@ -109,17 +86,11 @@ public final class TurnipDriver { } } - /** An imported driver is installed when its meta.json names a library that is there. */ public boolean isInstalled(String driverId) { String library = libraryName(driverId); return library != null && !library.isEmpty() && new File(new File(contentDir, driverId), library).isFile(); } - /** - * The bundled drivers the list shows: {@link #BUNDLED} minus the ones the user deleted. A deleted - * one still lives in the apk and Auto still unpacks it on a GPU that needs it, so deleting can - * never leave a device without a driver; it only leaves the list. - */ public List<String> visibleBundled() { java.util.Set<String> hidden = hiddenBundled(); ArrayList<String> out = new ArrayList<>(); @@ -132,7 +103,6 @@ public final class TurnipDriver { .getStringSet(KEY_HIDDEN, java.util.Collections.<String>emptySet())); } - /** "Delete" for a bundled driver: remove its unpacked copy and hide it from the list. */ public void hideBundled(String driverId) { if (!BUNDLED.contains(driverId)) return; FileUtils.delete(new File(contentDir, driverId)); @@ -146,7 +116,6 @@ public final class TurnipDriver { context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).edit().remove(KEY_HIDDEN).apply(); } - /** Imported drivers only - the bundled two are listed by {@link #BUNDLED}. */ public List<String> enumerateImported() { ArrayList<String> ids = new ArrayList<>(); File[] dirs = contentDir.listFiles(); @@ -159,7 +128,6 @@ public final class TurnipDriver { return ids; } - /** The bundled build the GPU would pick on its own, for the "Auto" row's label. */ public String autoId() { String id = chooseByDevice(); return id == null ? "system" : id; @@ -173,12 +141,6 @@ public final class TurnipDriver { if (driverId.equals(SessionPrefs.androidDriver(context))) SessionPrefs.setAndroidDriver(context, AUTO); } - /** - * Import an AdrenoTools zip. Returns the new driver id. - * @throws IllegalArgumentException with a user-facing reason when the zip is not an AdrenoTools - * driver - including when it is a Linux runtime driver, which says which list it belongs in; - * {@link IOException} on read/extract failures. - */ public String installFromZip(Uri zipUri, String displayName) throws IOException { File tmpDir = newStagingDir(); boolean keep = false; @@ -189,8 +151,6 @@ public final class TurnipDriver { ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (entry.isDirectory()) continue; - // Flatten: adrenotools reads the .so beside meta.json, and a base name also - // defeats zip-slip paths. String base = new File(entry.getName()).getName(); if (base.isEmpty()) continue; Files.copy(zis, new File(tmpDir, base).toPath(), StandardCopyOption.REPLACE_EXISTING); @@ -204,7 +164,6 @@ public final class TurnipDriver { } } - /** An empty directory beside the installed drivers, for a driver's files before {@link #adopt}. */ File newStagingDir() throws IOException { if (!contentDir.exists()) contentDir.mkdirs(); File tmpDir = new File(contentDir, ".tmp-" + System.nanoTime()); @@ -213,10 +172,6 @@ public final class TurnipDriver { return tmpDir; } - /** - * Check a staged driver (meta.json and its library, flat) and move it in as a new driver. - * Returns the id; the caller deletes {@code tmpDir} when this throws. - */ String adopt(File tmpDir, String displayName) throws IOException { String rejected = rejectionReason(tmpDir); if (rejected != null) throw new IllegalArgumentException(context.getString(R.string.turnip_not_adrenotools, rejected)); @@ -242,10 +197,6 @@ public final class TurnipDriver { } } - /** - * Why a just-extracted zip is not something adrenotools can be pointed at, or null when it is. - * The kinds refused by name are the other driver lists' zips, which carry a meta.json too. - */ private String rejectionReason(File dir) { File metaFile = new File(dir, "meta.json"); if (!metaFile.isFile()) return context.getString(R.string.turnip_reject_no_meta); @@ -268,7 +219,6 @@ public final class TurnipDriver { return context.getString(R.string.turnip_reject_library_missing, libraryName); if (!LinuxVulkanDriverManager.isAarch64Elf(library)) return context.getString(R.string.turnip_reject_not_aarch64, libraryName); - // A glibc build that happens to carry a libraryName would load nothing in this process. if (LinuxVulkanDriverManager.containsAscii(library, "libc.so.6")) return context.getString(R.string.turnip_reject_glibc, libraryName); return null; @@ -281,19 +231,16 @@ public final class TurnipDriver { return id; } - /** - * Unpacks the driver this device needs and returns its id, or null to fall back to the system - * Vulkan loader (which means a black session on Adreno, but is better than refusing to start - * on a GPU neither build covers). - */ public String install() { String id = choose(); + DriverSetupLog.write(context, "install.begin driver=" + id); if (id == null) return null; File dir = new File(contentDir, id); if (!new File(dir, "meta.json").isFile()) { FileUtils.delete(dir); if (!TarZst.extractAsset(context, "graphics_driver/adrenotools-" + id + ".tzst", dir)) { Log.e(TAG, "could not unpack " + id); + DriverSetupLog.write(context, "install.unpack-failed driver=" + id); FileUtils.delete(dir); return null; } @@ -304,14 +251,10 @@ public final class TurnipDriver { return null; } Log.i(TAG, "graphics driver " + id + " (" + library + ")"); + DriverSetupLog.write(context, "install.ready driver=" + id + " library=" + library); return id; } - /** - * The user's choice first - an imported driver, or one of the bundled two pinned by hand - - * then the Downloads override, then the GPU. A chosen import that has since been removed logs - * and falls through, so a stale preference never blocks a session. - */ private String choose() { String chosen = SessionPrefs.androidDriver(context); if (chosen != null && !chosen.isEmpty()) { @@ -337,23 +280,24 @@ public final class TurnipDriver { if (forced.startsWith("system")) return null; if (forced.startsWith("a8")) return DRIVER_A8XX; if (forced.startsWith("a7")) return DRIVER_A7XX; + if (forced.startsWith("a6")) return DRIVER_A6XX; } + String quest = QuestExperimental.INSTANCE.defaultAndroidDriver(); + if (quest != null) return quest; String model = gpuModel(); Log.i(TAG, "gpu model: " + (model == null ? "unknown" : model)); if (model != null) { - // "Adreno750", "adreno_830" - the generation is the first digit of the three. java.util.regex.Matcher m = java.util.regex.Pattern.compile("(\\d)\\d\\d").matcher(model); if (m.find()) { char generation = m.group(1).charAt(0); if (generation >= '8') return DRIVER_A8XX; if (generation == '7') return DRIVER_A7XX; + if (generation == '6') return DRIVER_A6XX; } } - // Nothing to go on: Android 16 shipped with the 8 Elite, so treat a new device as 8xx. return android.os.Build.VERSION.SDK_INT >= 36 ? DRIVER_A8XX : DRIVER_A7XX; } - /** KGSL names the GPU here, and this file is world-readable where /dev/kgsl-3d0 is not. */ private static String gpuModel() { for (String path : new String[]{ "/sys/class/kgsl/kgsl-3d0/gpu_model", diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/TurnipReleases.kt b/app/src/main/java/com/droiddeck/launcher/gpu/TurnipReleases.kt index acc9419280..43540c0e23 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/TurnipReleases.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/TurnipReleases.kt @@ -1,52 +1,35 @@ package com.droiddeck.launcher.gpu +import com.droiddeck.launcher.core.DownloadSource +import com.droiddeck.launcher.core.Downloader import com.droiddeck.launcher.core.Hashes import com.droiddeck.launcher.R import android.content.Context +import android.util.Log import com.droiddeck.launcher.core.FileUtils import org.json.JSONArray import org.json.JSONObject import java.io.File -import java.io.FileOutputStream import java.io.IOException import java.net.HttpURLConnection import java.net.URL -/** - * Driver downloads from the Turnip release repos, offered in both driver menus. Checked only when - * the user taps refresh - the result is remembered, so the menu shows the last check without going - * online. A download goes through the same importer as a zip picked by hand, so it gets the same - * checks and lands as an ordinary imported driver. - * - * Each repo's recent releases are read newest first and every driver variant is offered from the - * newest release that carries it: a repo that stops publishing one variant (Banners-Turnip's A8xx - * Linux build after v26.3.0-20260923) still offers its last one, and a repo with two release lines - * (WinNative's Android `v1.x` and Linux `linux-v0.x`) offers the newest of each. - */ object TurnipReleases { + private const val TAG = "TurnipReleases" private const val PREFS = "turnip_releases" private const val KEY_RELEASE = "latest" private const val KEY_DOWNLOADS = "downloads" + private const val KEY_PICKS = "autoPicks" - /** [label] names the variant for the menu: the GPUs it is for, and a build flavour. */ - /** [sha256] is the release asset's digest from GitHub; empty for a list cached before it was kept. */ - /** - * [pair] names the matched set an asset belongs to (DriverPairs): a display build and a Linux - * build of the same pair are made to run together. "" for a list cached before pairs were kept. - */ - /** [bundle]: one zip holding both halves of the pair (DriverBundle); [linux] is false for it. */ class Asset(val source: String, val tag: String, val name: String, val url: String, val size: Long, val linux: Boolean, val label: String, val sha256: String = "", val pair: String = "", val bundle: Boolean = false) - /** [latest] = each source's newest release tag, for the refresh line. */ class Check(val assets: List<Asset>, val latest: List<Pair<String, String>>, val failed: List<String>, val checkedAt: Long) - /** What an asset is: a Linux build or not, the menu label, and the pair it belongs to. */ private class Kind(val linux: Boolean, val label: String, val pair: String, val bundle: Boolean = false) private class Source(val label: String, val repo: String, val classify: (name: String, tag: String) -> Kind?) private val SOURCES = listOf( - // Turnip-<tag>[-variant][-Linux|-Wayland].zip; -Wayland is for a path this app does not have. Source("Banners-Turnip", "The412Banner/Banners-Turnip") { name, tag -> val prefix = "Turnip-$tag" if (!name.startsWith(prefix) || !name.endsWith(".zip")) return@Source null @@ -63,32 +46,26 @@ object TurnipReleases { } Kind(linux, label, "banner" + variant.lowercase()) }, - // WN-Turnip-<ver>-<b|p>_Axxx.zip (Android) and WN-Linux-Turnip-<ver>-<b|p>_Axxx.zip (Linux): - // b = Balanced, p = Performance, Axxx = every Adreno. Source("WinNative", "WinNative-Emu/Drivers") { name, _ -> val m = Regex("""^WN-(Linux-)?Turnip-[^-]+-([a-z]+)_(\w+)\.zip$""").find(name) ?: return@Source null val flavour = when (m.groupValues[2]) { "b" -> "Balanced"; "p" -> "Performance"; else -> m.groupValues[2] } val gpus = if (m.groupValues[3] == "Axxx") "all Adreno" else m.groupValues[3] Kind(m.groupValues[1].isNotEmpty(), "$gpus · $flavour", "wn-" + m.groupValues[2]) }, - // DD-Turnip-v<ver>.zip: DroidDeck's own all-in-one build, both halves in one zip, published - // to Drivers-CI (releases only). Every release is offered, not just the newest, each its own pair. Source("DroidDeck", "Droid-Deck/Drivers-CI") { name, tag -> if (!Regex("""^DD-Turnip-v\d+\.\d+\.\d+\.zip$""").matches(name)) return@Source null Kind(false, "Android + Linux · all Adreno", DriverPairs.ddTurnip(tag), bundle = true) }, ) - /** The result of the last check, or null when the user has never checked. */ + fun autoPicks(context: Context): List<AutoPicks.Rule> = + AutoPicks.parse(prefs(context).getString(KEY_PICKS, null)) ?: AutoPicks.BUILT_IN + fun cached(context: Context): Check? { val raw = prefs(context).getString(KEY_RELEASE, null) ?: return null return runCatching { parse(JSONObject(raw)) }.getOrNull() } - /** - * Read every source now and remember the result. A source that fails is named in [Check.failed] - * and the others still count; throws only when every source failed. - */ fun refresh(context: Context): Check { val assets = JSONArray() val latest = JSONArray() @@ -109,13 +86,10 @@ object TurnipReleases { val a = list.getJSONObject(j) val name = a.getString("name") val kind = src.classify(name, tag) ?: continue - // A bundle is only offered from an official release, never a pre-release. if (kind.bundle && r.optBoolean("prerelease")) continue val linux = kind.linux val label = kind.label - // Only assets GitHub has a sha256 for are offered: the download is checked against it. val sha = Hashes.githubSha256(a.optString("digest")) ?: continue - // Newest first: the first release carrying a variant is the one offered. if (!seen.add(if (kind.bundle) kind.pair else "$linux|$label")) continue assets.put(JSONObject().put("source", src.label).put("tag", tag).put("name", name) .put("url", a.getString("browser_download_url")).put("size", a.optLong("size")) @@ -130,6 +104,10 @@ object TurnipReleases { } } if (failed.size == SOURCES.size) throw lastError ?: IOException("no source answered") + runCatching { get(context, AutoPicks.URL, AutoPicks.URL) } + .onFailure { Log.i(TAG, "auto picks: ${it.message}") } + .getOrNull()?.takeIf { AutoPicks.parse(it) != null } + ?.let { prefs(context).edit().putString(KEY_PICKS, it).apply() } val stored = JSONObject().put("assets", assets).put("latest", latest) .put("failed", JSONArray(failed)).put("checkedAt", System.currentTimeMillis()) prefs(context).edit().putString(KEY_RELEASE, stored.toString()).apply() @@ -137,7 +115,24 @@ object TurnipReleases { } private fun get(context: Context, url: String): String { - val c = URL(url).openConnection() as HttpURLConnection + val sources = DownloadSource.candidates(url) + var last: IOException? = null + for ((index, source) in sources.withIndex()) { + try { + val body = get(context, source, url) + DownloadSource.succeeded(source) + return body + } catch (e: IOException) { + last = e + if (index < sources.lastIndex) Log.i(TAG, "retrying $url via $source") + } + } + DownloadSource.failed() + throw last ?: IOException(context.getString(R.string.turnip_github_http, 0)) + } + + private fun get(context: Context, source: String, url: String): String { + val c = URL(source).openConnection() as HttpURLConnection c.connectTimeout = 15_000 c.readTimeout = 20_000 c.setRequestProperty("Accept", "application/vnd.github+json") @@ -170,11 +165,9 @@ object TurnipReleases { return Check(out, latest, failed, json.optLong("checkedAt")) } - /** The id an asset was installed as, when it was downloaded before and is still installed. */ fun installedId(context: Context, asset: Asset, isInstalled: (String) -> Boolean): String? = downloads(context).optString(asset.name, "").takeIf { it.isNotEmpty() && isInstalled(it) } - /** True when [id] came from a release download rather than a zip picked by hand. */ fun isDownloaded(context: Context, id: String): Boolean { val d = downloads(context) return d.keys().asSequence().any { d.optString(it) == id } @@ -184,7 +177,6 @@ object TurnipReleases { prefs(context).edit().putString(KEY_DOWNLOADS, downloads(context).put(asset.name, id).toString()).apply() } - /** Forget a deleted driver, so its release offers the download again. */ fun forget(context: Context, id: String) { val d = downloads(context) val keys = d.keys().asSequence().filter { d.optString(it) == id }.toList() @@ -193,43 +185,16 @@ object TurnipReleases { prefs(context).edit().putString(KEY_DOWNLOADS, d.toString()).apply() } - /** Download an asset into the cache; the caller imports it and deletes the file. */ fun download(context: Context, asset: Asset, progress: (Int) -> Unit): File { if (asset.sha256.isEmpty()) throw IOException(context.getString(R.string.turnip_list_predates_checksums)) val target = File(context.cacheDir, asset.name) - val c = URL(asset.url).openConnection() as HttpURLConnection - c.connectTimeout = 15_000 - c.readTimeout = 60_000 - c.setRequestProperty("User-Agent", "DroidDeck-app") - c.instanceFollowRedirects = true - try { - if (c.responseCode != 200) throw IOException(context.getString(R.string.turnip_download_http, c.responseCode)) - val total = c.contentLengthLong.takeIf { it > 0 } ?: asset.size - c.inputStream.use { input -> - FileOutputStream(target).use { out -> - val buf = ByteArray(1 shl 16) - var done = 0L - var last = -1 - while (true) { - val r = input.read(buf) - if (r <= 0) break - out.write(buf, 0, r) - done += r - val pct = if (total > 0) (done * 100 / total).toInt() else 0 - if (pct != last) { last = pct; progress(pct) } - } - } - } - if (!asset.sha256.equals(Hashes.sha256(target), ignoreCase = true)) { - throw IOException(context.getString(R.string.turnip_checksum_mismatch)) - } - return target - } catch (e: Exception) { + val ok = Downloader.downloadFile(asset.url, target, true, asset.sha256) { f -> progress(if (f < 0) -1 else (f * 100).toInt()) } + if (!ok) throw IOException(context.getString(R.string.turnip_download_failed)) + if (!asset.sha256.equals(Hashes.sha256(target), ignoreCase = true)) { FileUtils.delete(target) - throw e - } finally { - c.disconnect() + throw IOException(context.getString(R.string.turnip_checksum_mismatch)) } + return target } private fun downloads(context: Context): JSONObject = diff --git a/app/src/main/java/com/droiddeck/launcher/gpu/VulkanInfo.kt b/app/src/main/java/com/droiddeck/launcher/gpu/VulkanInfo.kt index ee4ca1a694..d03e6a5c60 100644 --- a/app/src/main/java/com/droiddeck/launcher/gpu/VulkanInfo.kt +++ b/app/src/main/java/com/droiddeck/launcher/gpu/VulkanInfo.kt @@ -2,17 +2,11 @@ package com.droiddeck.launcher.gpu import android.util.Log -/** - * The phone's own Vulkan driver, as it describes itself (native/deviceinfo): device name, API and - * driver versions, a few limits and the extensions DXVK/VKD3D lean on. Asked once per process and - * kept; the first [query] creates a Vulkan instance, so it belongs off the main thread. - */ object VulkanInfo { @Volatile private var cached: Map<String, String>? = null @JvmStatic private external fun nativeQuery(): String - /** Blocking on first use. Empty-ish map with an "error" key when Vulkan cannot be asked. */ @Synchronized fun query(): Map<String, String> { cached?.let { return it } @@ -31,6 +25,5 @@ object VulkanInfo { return map } - /** What [query] found, if it has run in this process; never blocks. */ fun cachedOrNull(): Map<String, String>? = cached } diff --git a/app/src/main/java/com/droiddeck/launcher/handtracking/BodyPose.kt b/app/src/main/java/com/droiddeck/launcher/handtracking/BodyPose.kt new file mode 100644 index 0000000000..52c26a7439 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/handtracking/BodyPose.kt @@ -0,0 +1,255 @@ +package com.droiddeck.launcher.handtracking + +import com.droiddeck.launcher.glasses.Vec3 +import kotlin.math.abs +import kotlin.math.atan2 +import kotlin.math.hypot + +internal class Landmark(val x: Float, val y: Float, val visibility: Float) + +internal class WorldPoint(val x: Float, val y: Float, val z: Float) + +internal class Intrinsics(val fx: Float, val fy: Float, val cx: Float, val cy: Float, val width: Int, val height: Int) + +internal class CameraLevel(up: Vec3) { + val right: Vec3 + val up: Vec3 + val back: Vec3 + val valid: Boolean + + init { + val u = up.normalized() + val forward = Vec3(0f, 0f, 1f) + val along = u.x * forward.x + u.y * forward.y + u.z * forward.z + val horizontal = Vec3(forward.x - u.x * along, forward.y - u.y * along, forward.z - u.z * along) + valid = u.length() > 0.5f && horizontal.length() > MIN_HORIZONTAL + this.up = u + back = (horizontal * -1f).normalized() + right = this.up.cross(back) + } + + fun level(v: Vec3) = Vec3(dot(v, right), dot(v, up), dot(v, back)) + + private fun dot(a: Vec3, b: Vec3) = a.x * b.x + a.y * b.y + a.z * b.z + + companion object { + private const val MIN_HORIZONTAL = 0.25f + } +} + +internal class BodyFrame( + val hands: Array<Vec3?>, + val faceYaw: Float?, + val distance: Float, + val shoulderSpan: Float, + val seen: Boolean, + val estimated: BooleanArray = BooleanArray(2), + val edgeRoom: Float = 1f, + val joints: Array<FloatArray?> = arrayOfNulls(2), +) + +internal class HandFix(val palm: Vec3, val x: Float, val y: Float, val extent: Float, val points: FloatArray, val world: List<WorldPoint> = emptyList()) + +internal object Pnp { + fun translation(count: Int, k: Intrinsics, x: (Int) -> Float, y: (Int) -> Float, world: (Int) -> WorldPoint): Vec3? { + val ata = Array(3) { DoubleArray(3) } + val atb = DoubleArray(3) + for (i in 0 until count) { + val a = ((x(i) - k.cx) / k.fx).toDouble() + val b = ((y(i) - k.cy) / k.fy).toDouble() + val w = world(i) + add(ata, atb, doubleArrayOf(1.0, 0.0, -a), a * w.z - w.x) + add(ata, atb, doubleArrayOf(0.0, 1.0, -b), b * w.z - w.y) + } + val t = solve3(ata, atb) ?: return null + return Vec3(t[0].toFloat(), t[1].toFloat(), t[2].toFloat()) + } + + private fun add(ata: Array<DoubleArray>, atb: DoubleArray, row: DoubleArray, rhs: Double) { + for (i in 0..2) { + atb[i] += row[i] * rhs + for (j in 0..2) ata[i][j] += row[i] * row[j] + } + } + + private fun solve3(a: Array<DoubleArray>, b: DoubleArray): DoubleArray? { + val det = det3(a) + if (abs(det) < 1e-12) return null + return DoubleArray(3) { col -> det3(Array(3) { r -> DoubleArray(3) { c -> if (c == col) b[r] else a[r][c] } }) / det } + } + + private fun det3(m: Array<DoubleArray>) = m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) - + m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0]) + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]) +} + +internal object BodyPose { + const val NOSE = 0 + const val LEFT_EYE = 2 + const val RIGHT_EYE = 5 + const val LEFT_EAR = 7 + const val RIGHT_EAR = 8 + const val RIGHT_MOUTH = 10 + const val LEFT_SHOULDER = 11 + const val RIGHT_SHOULDER = 12 + const val LEFT_ELBOW = 13 + const val RIGHT_ELBOW = 14 + const val LEFT_WRIST = 15 + const val RIGHT_WRIST = 16 + const val LEFT_PINKY = 17 + const val RIGHT_PINKY = 18 + const val LEFT_INDEX = 19 + const val RIGHT_INDEX = 20 + const val LEFT_HIP = 23 + const val RIGHT_HIP = 24 + + private val ANCHORS = intArrayOf(NOSE, LEFT_EYE, RIGHT_EYE, LEFT_EAR, RIGHT_EAR, LEFT_SHOULDER, RIGHT_SHOULDER, LEFT_HIP, RIGHT_HIP) + private val WRISTS = intArrayOf(LEFT_WRIST, RIGHT_WRIST) + private val PINKIES = intArrayOf(LEFT_PINKY, RIGHT_PINKY) + private val INDEXES = intArrayOf(LEFT_INDEX, RIGHT_INDEX) + const val MIN_VISIBILITY = 0.6f + + fun solve( + image: List<Landmark>, + world: List<WorldPoint>, + k: Intrinsics, + level: CameraLevel, + fixes: Array<HandFix?>? = null, + held: FloatArray? = null, + ): BodyFrame? { + if (image.size <= RIGHT_HIP || world.size <= RIGHT_HIP || !level.valid) return null + val t = translation(image, world, k) ?: return null + fun at(i: Int): Vec3 { + val w = world[i] + val depth = w.z + t.z + val px = image[i].x * k.width + val py = image[i].y * k.height + return Vec3((px - k.cx) / k.fx * depth, (py - k.cy) / k.fy * depth, depth) + } + fun visible(i: Int) = image[i].visibility >= MIN_VISIBILITY && image[i].x in 0f..1f && image[i].y in 0f..1f + val eyesSeen = visible(LEFT_EYE) && visible(RIGHT_EYE) + val shouldersSeen = visible(LEFT_SHOULDER) && visible(RIGHT_SHOULDER) + val hands = arrayOfNulls<Vec3>(2) + val estimated = BooleanArray(2) + val joints = arrayOfNulls<FloatArray>(2) + if (fixes == null) { + val head = if (eyesSeen) (at(LEFT_EYE) + at(RIGHT_EYE)) * 0.5f else null + if (head != null) for (side in 0..1) { + if (!visible(WRISTS[side])) continue + val grip = (at(WRISTS[side]) + at(PINKIES[side]) + at(INDEXES[side])) * (1f / 3f) + hands[side] = level.level(grip - head) + } + } else { + val head = if (eyesSeen) eyes(image, world, k) else null + if (head != null) for (side in 0..1) { + val fix = fixes.getOrNull(side) + if (fix != null) { + hands[side] = level.level(fix.palm - head) + joints[side] = handJoints(fix.world, level) + continue + } + val depth = held?.getOrNull(side)?.takeIf { it.isFinite() && it > 0f } ?: continue + if (!visible(WRISTS[side])) continue + val gx = (image[WRISTS[side]].x + image[PINKIES[side]].x + image[INDEXES[side]].x) / 3f * k.width + val gy = (image[WRISTS[side]].y + image[PINKIES[side]].y + image[INDEXES[side]].y) / 3f * k.height + hands[side] = level.level(Vec3((gx - k.cx) / k.fx * depth, (gy - k.cy) / k.fy * depth, depth) - head) + estimated[side] = true + } + } + val faceYaw = if (visible(NOSE) && visible(LEFT_EAR) && visible(RIGHT_EAR)) { + val n = world[NOSE] + val l = world[LEFT_EAR] + val r = world[RIGHT_EAR] + val f = level.level(Vec3(n.x - (l.x + r.x) / 2, n.y - (l.y + r.y) / 2, n.z - (l.z + r.z) / 2)) + if (hypot(f.x, f.z) > 0.02f) atan2(-f.x, -f.z) else null + } else null + val span = if (shouldersSeen) hypot(image[LEFT_SHOULDER].x - image[RIGHT_SHOULDER].x, + (image[LEFT_SHOULDER].y - image[RIGHT_SHOULDER].y) * k.height / k.width) else 0f + var room = 1f + for (i in EDGE_JOINTS) { + if (image[i].visibility < MIN_VISIBILITY) continue + room = minOf(room, image[i].x, 1f - image[i].x, image[i].y, 1f - image[i].y) + } + return BodyFrame(hands, faceYaw, t.z, span, eyesSeen && shouldersSeen, estimated, room, joints) + } + + fun handJoints(world: List<WorldPoint>, level: CameraLevel): FloatArray? { + if (world.size < HAND_POINTS) return null + var mx = 0f + var my = 0f + var mz = 0f + for (i in PALM) { + mx += world[i].x + my += world[i].y + mz += world[i].z + } + val n = PALM.size.toFloat() + val out = FloatArray(HAND_POINTS * 3) + for (i in 0 until HAND_POINTS) { + val v = level.level(Vec3(world[i].x - mx / n, world[i].y - my / n, world[i].z - mz / n)) + out[i * 3] = v.x + out[i * 3 + 1] = v.y + out[i * 3 + 2] = v.z + } + return out + } + + fun eyes(image: List<Landmark>, world: List<WorldPoint>, k: Intrinsics): Vec3? { + val used = HEAD.filter { image[it].visibility >= MIN_VISIBILITY } + if (used.size < MIN_HEAD_POINTS) return null + val t = Pnp.translation(used.size, k, { image[used[it]].x * k.width }, { image[used[it]].y * k.height }, { world[used[it]] }) + ?: return null + if (!(t.z > MIN_DISTANCE && t.z < MAX_DISTANCE)) return null + val l = world[LEFT_EYE] + val r = world[RIGHT_EYE] + return Vec3(t.x + (l.x + r.x) / 2, t.y + (l.y + r.y) / 2, t.z + (l.z + r.z) / 2) + } + + fun handFix(points: FloatArray, world: List<WorldPoint>, k: Intrinsics): HandFix? { + if (world.size < HAND_POINTS || points.size < HAND_POINTS * 2) return null + val t = Pnp.translation(HAND_POINTS, k, { points[it * 2] }, { points[it * 2 + 1] }, { world[it] }) ?: return null + if (!(t.z > MIN_HAND_DISTANCE && t.z < MAX_DISTANCE)) return null + var px = 0f + var py = 0f + var wx = 0f + var wy = 0f + var wz = 0f + for (i in PALM) { + px += points[i * 2] + py += points[i * 2 + 1] + wx += world[i].x + wy += world[i].y + wz += world[i].z + } + val n = PALM.size.toFloat() + var minX = Float.MAX_VALUE + var maxX = -Float.MAX_VALUE + var minY = Float.MAX_VALUE + var maxY = -Float.MAX_VALUE + for (i in 0 until HAND_POINTS) { + minX = minOf(minX, points[i * 2]) + maxX = maxOf(maxX, points[i * 2]) + minY = minOf(minY, points[i * 2 + 1]) + maxY = maxOf(maxY, points[i * 2 + 1]) + } + return HandFix(Vec3(t.x + wx / n, t.y + wy / n, t.z + wz / n), px / n, py / n, maxOf(maxX - minX, maxY - minY), points, world) + } + + private fun translation(image: List<Landmark>, world: List<WorldPoint>, k: Intrinsics): Vec3? { + val used = ANCHORS.filter { image[it].visibility >= MIN_VISIBILITY } + if (used.size < MIN_ANCHORS) return null + val t = Pnp.translation(used.size, k, { image[used[it]].x * k.width }, { image[used[it]].y * k.height }, { world[used[it]] }) + ?: return null + if (!(t.z > MIN_DISTANCE && t.z < MAX_DISTANCE)) return null + return t + } + + const val HAND_POINTS = 21 + private val HEAD = (NOSE..RIGHT_MOUTH).toList() + private val PALM = intArrayOf(0, 5, 9, 13, 17) + private val EDGE_JOINTS = intArrayOf(LEFT_ELBOW, RIGHT_ELBOW, LEFT_WRIST, RIGHT_WRIST) + private const val MIN_ANCHORS = 4 + private const val MIN_HEAD_POINTS = 4 + private const val MIN_DISTANCE = 0.2f + private const val MIN_HAND_DISTANCE = 0.05f + private const val MAX_DISTANCE = 6f +} diff --git a/app/src/main/java/com/droiddeck/launcher/handtracking/HandCamera.kt b/app/src/main/java/com/droiddeck/launcher/handtracking/HandCamera.kt new file mode 100644 index 0000000000..ff2fccb857 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/handtracking/HandCamera.kt @@ -0,0 +1,323 @@ +package com.droiddeck.launcher.handtracking + +import android.content.Context +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.Matrix +import android.hardware.Sensor +import android.hardware.SensorEvent +import android.hardware.SensorEventListener +import android.hardware.SensorManager +import android.hardware.camera2.CaptureRequest +import android.os.Build +import android.os.PowerManager +import android.os.SystemClock +import android.util.Log +import android.util.Range +import android.util.Size +import androidx.camera.camera2.interop.Camera2CameraInfo +import androidx.camera.camera2.interop.Camera2Interop +import androidx.camera.camera2.interop.ExperimentalCamera2Interop +import androidx.camera.core.CameraSelector +import androidx.camera.core.ImageAnalysis +import androidx.camera.core.ImageProxy +import androidx.camera.core.resolutionselector.AspectRatioStrategy +import androidx.camera.core.resolutionselector.ResolutionSelector +import androidx.camera.core.resolutionselector.ResolutionStrategy +import androidx.camera.lifecycle.ProcessCameraProvider +import androidx.core.content.ContextCompat +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleOwner +import androidx.lifecycle.LifecycleRegistry +import com.droiddeck.launcher.glasses.Vec3 +import com.google.mediapipe.framework.image.BitmapImageBuilder +import com.google.mediapipe.tasks.core.BaseOptions +import com.google.mediapipe.tasks.core.Delegate +import com.google.mediapipe.tasks.vision.core.RunningMode +import com.google.mediapipe.tasks.vision.poselandmarker.PoseLandmarker +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import java.io.File +import java.nio.ByteBuffer +import java.nio.ByteOrder +import java.util.concurrent.Executors +import kotlin.math.abs + +@androidx.annotation.OptIn(ExperimentalCamera2Interop::class) +internal class HandCamera( + context: Context, + private val output: File?, + private val preview: Boolean, +) : LifecycleOwner { + class View( + val image: Bitmap, + val front: Boolean, + val landmarks: List<Landmark>?, + val placement: Placement, + val advice: Advice, + ) + + private val context = context.applicationContext + private val registry = LifecycleRegistry(this) + override val lifecycle: Lifecycle get() = registry + private val executor = Executors.newSingleThreadExecutor { Thread(it, "hand-camera") } + private val sensors = this.context.getSystemService(SensorManager::class.java) + private val power = this.context.getSystemService(PowerManager::class.java) + private val state = MutableStateFlow<View?>(null) + val view: StateFlow<View?> = state.asStateFlow() + private val broken = MutableStateFlow(false) + val failed: StateFlow<Boolean> = broken.asStateFlow() + @Volatile private var up: Vec3? = null + @Volatile private var thermal = 0 + @Volatile private var stopped = false + @Volatile var bareHands = false + set(value) { + if (field != value) Log.i(TAG, if (value) "no controllers: tracking bare hands" else "controllers in use: placing them only") + field = value + } + private var provider: ProcessCameraProvider? = null + private var analysis: ImageAnalysis? = null + private var landmarker: PoseLandmarker? = null + private var hands: HandModel? = null + private val heldDepth = FloatArray(2) { Float.NaN } + private val heldAt = LongArray(2) + private var shm: HandCameraShm? = null + private var camera: TrackingCamera? = null + private var zoom = 1f + private var lastRun = 0L + private var lastStampMs = 0L + private var skipped = 0 + private var recorder: HandCameraRecorder? = null + private var rawFrame: Bitmap? = null + private var turnedFrame: Bitmap? = null + + private val gravity = object : SensorEventListener { + override fun onSensorChanged(event: SensorEvent) { + val v = Vec3(event.values[0], event.values[1], event.values[2]) + val last = up + up = if (event.sensor.type == Sensor.TYPE_GRAVITY || last == null) v else last + (v - last) * ACCEL_SMOOTHING + } + + override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) {} + } + + private val heat: Any? = if (Build.VERSION.SDK_INT >= 29) PowerManager.OnThermalStatusChangedListener { thermal = it } else null + + init { + registry.currentState = Lifecycle.State.CREATED + } + + fun start(side: String?) { + val chosen = TrackingCameras.pick(HandTracking.cameras(context), side) + if (chosen == null) { + broken.value = true + return + } + camera = chosen + zoom = chosen.zoom() + recorder = HandCameraRecorder.start(context, output, preview, chosen) + val sensor = sensors?.getDefaultSensor(Sensor.TYPE_GRAVITY) ?: sensors?.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) + if (sensor != null) sensors?.registerListener(gravity, sensor, SensorManager.SENSOR_DELAY_UI) + if (Build.VERSION.SDK_INT >= 29) { + thermal = power?.currentThermalStatus ?: 0 + power?.addThermalStatusListener(ContextCompat.getMainExecutor(context), heat as PowerManager.OnThermalStatusChangedListener) + } + executor.execute { prepare() } + val future = ProcessCameraProvider.getInstance(context) + future.addListener({ + if (stopped) return@addListener + runCatching { bind(future.get(), chosen) }.onFailure { + Log.w(TAG, "camera ${chosen.id} could not start", it) + broken.value = true + } + }, ContextCompat.getMainExecutor(context)) + } + + fun stop() { + if (stopped) return + stopped = true + sensors?.unregisterListener(gravity) + if (Build.VERSION.SDK_INT >= 29) power?.removeThermalStatusListener(heat as PowerManager.OnThermalStatusChangedListener) + analysis?.let { + it.clearAnalyzer() + runCatching { provider?.unbind(it) } + } + registry.currentState = Lifecycle.State.DESTROYED + executor.execute { + runCatching { landmarker?.close() } + landmarker = null + hands?.close() + hands = null + shm?.close() + shm = null + recorder?.close() + recorder = null + } + executor.shutdown() + } + + private fun bind(cameras: ProcessCameraProvider, chosen: TrackingCamera) { + val selector = CameraSelector.Builder() + .addCameraFilter { infos -> infos.filter { Camera2CameraInfo.from(it).cameraId == chosen.id } } + .build() + val builder = ImageAnalysis.Builder() + val extender = Camera2Interop.Extender(builder) + chosen.fps?.let { extender.setCaptureRequestOption(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, Range(it.first, it.second)) } + recorder?.let { extender.setSessionCaptureCallback(it.callback) } + val use = builder + .setResolutionSelector( + ResolutionSelector.Builder() + .setAspectRatioStrategy(AspectRatioStrategy.RATIO_4_3_FALLBACK_AUTO_STRATEGY) + .setResolutionStrategy(ResolutionStrategy(Size(ANALYSIS_WIDTH, ANALYSIS_HEIGHT), ResolutionStrategy.FALLBACK_RULE_CLOSEST_HIGHER_THEN_LOWER)) + .build(), + ) + .setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST) + .setOutputImageFormat(ImageAnalysis.OUTPUT_IMAGE_FORMAT_RGBA_8888) + .build() + use.setAnalyzer(executor, ::analyze) + val bound = cameras.bindToLifecycle(this, selector, use) + if (zoom < 1f) bound.cameraControl.setZoomRatio(zoom) + provider = cameras + analysis = use + registry.currentState = Lifecycle.State.RESUMED + Log.i(TAG, "camera ${chosen.id} (${if (chosen.front) "front" else "rear"}, ${chosen.fovDegrees.toInt()}°, zoom $zoom, ${chosen.fps} fps) " + + if (preview) "checking placement" else "tracking hands") + } + + private fun prepare() { + if (stopped) return + runCatching { + val bytes = context.assets.open(MODEL).use { it.readBytes() } + val model = ByteBuffer.allocateDirect(bytes.size).order(ByteOrder.nativeOrder()).put(bytes) + model.rewind() + val options = PoseLandmarker.PoseLandmarkerOptions.builder() + .setBaseOptions(BaseOptions.builder().setModelAssetBuffer(model).setDelegate(Delegate.CPU).build()) + .setRunningMode(RunningMode.VIDEO) + .setNumPoses(1) + .setMinPoseDetectionConfidence(MIN_CONFIDENCE) + .setMinPosePresenceConfidence(MIN_CONFIDENCE) + .setOutputSegmentationMasks(false) + .build() + landmarker = PoseLandmarker.createFromOptions(context, options) + if (output != null) shm = HandCameraShm.open(output) + }.onFailure { + Log.w(TAG, "pose model could not load", it) + broken.value = true + } + if (landmarker != null) hands = runCatching { HandModel.open(context) }.onFailure { Log.w(TAG, "hand model could not load", it) }.getOrNull() + } + + private fun analyze(image: ImageProxy) { + try { + val chosen = camera ?: return + val pose = landmarker ?: return + val arrival = System.nanoTime() + if (stopped || arrival - lastRun < interval()) { + skipped++ + return + } + lastRun = arrival + val exposed = exposure(image.imageInfo.timestamp, arrival, chosen) + val stampMs = maxOf(exposed / 1_000_000L, lastStampMs + 1) + lastStampMs = stampMs + val gravity = up + val placement = if (gravity != null) CameraGeometry.placement(chosen.front, gravity) else Placement.UNKNOWN + val turns = if (gravity != null) CameraGeometry.uprightTurns(chosen.front, chosen.orientation, gravity) + else image.imageInfo.rotationDegrees / 90 + val frame = upright(raw(image), turns) + val result = pose.detectForVideo(BitmapImageBuilder(frame).build(), stampMs) + val inferred = System.nanoTime() + val found = result.landmarks().firstOrNull() + val marks = found?.map { Landmark(it.x(), it.y(), it.visibility().orElse(0f)) } + val world = result.worldLandmarks().firstOrNull()?.map { WorldPoint(it.x(), it.y(), it.z()) } + val k = chosen.intrinsics(image.width, image.height, zoom, turns) + val model = hands + val fixes = if (marks != null && model != null) model.find(frame, marks, k, stampMs) else null + val handsDone = System.nanoTime() + fixes?.forEachIndexed { side, fix -> + if (fix != null) { + heldDepth[side] = fix.palm.z + heldAt[side] = exposed + } + } + val held = FloatArray(2) { if (exposed - heldAt[it] <= HOLD_NS) heldDepth[it] else Float.NaN } + val body = if (marks != null && world != null && gravity != null) { + BodyPose.solve(marks, world, k, CameraLevel(CameraGeometry.upInCamera(chosen.front, chosen.orientation, turns, gravity)), + if (model != null) fixes ?: arrayOfNulls(2) else null, held) + } else null + shm?.write(exposed, body, bareHands) + if (preview) state.value = View(frame, chosen.front, marks, placement, PlacementAdvice.of(placement, body)) + recorder?.frame(HandCameraRecorder.Frame(exposed, image.imageInfo.timestamp, arrival, inferred, System.nanoTime(), skipped, + thermal, turns, placement, gravity, k, + found?.map { floatArrayOf(it.x(), it.y(), it.z(), it.visibility().orElse(0f), it.presence().orElse(0f)) }, + world, body, handsDone, fixes), frame) + skipped = 0 + } catch (e: Exception) { + Log.w(TAG, "camera frame skipped", e) + } finally { + image.close() + } + } + + private fun raw(image: ImageProxy): Bitmap { + val plane = image.planes[0] + if (plane.pixelStride != 4 || plane.rowStride != image.width * 4) return image.toBitmap() + val bitmap = rawFrame?.takeIf { it.width == image.width && it.height == image.height } + ?: Bitmap.createBitmap(image.width, image.height, Bitmap.Config.ARGB_8888).also { rawFrame = it } + plane.buffer.rewind() + bitmap.copyPixelsFromBuffer(plane.buffer) + return bitmap + } + + private fun upright(raw: Bitmap, turns: Int): Bitmap { + val quarter = Math.floorMod(turns, 4) + if (quarter == 0) return if (preview) raw.copy(Bitmap.Config.ARGB_8888, false) else raw + val width = if (quarter % 2 == 1) raw.height else raw.width + val height = if (quarter % 2 == 1) raw.width else raw.height + val target = if (preview) Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) + else turnedFrame?.takeIf { it.width == width && it.height == height } + ?: Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888).also { turnedFrame = it } + val matrix = Matrix() + matrix.postRotate(90f * quarter) + when (quarter) { + 1 -> matrix.postTranslate(raw.height.toFloat(), 0f) + 2 -> matrix.postTranslate(raw.width.toFloat(), raw.height.toFloat()) + else -> matrix.postTranslate(0f, raw.width.toFloat()) + } + Canvas(target).drawBitmap(raw, matrix, null) + return target + } + + private fun exposure(stamp: Long, arrival: Long, chosen: TrackingCamera): Long { + val monotonic = if (chosen.realtime) stamp - (SystemClock.elapsedRealtimeNanos() - System.nanoTime()) else stamp + return if (abs(arrival - monotonic) < MAX_DELAY_NS) monotonic else arrival - TYPICAL_DELAY_NS + } + + private fun interval(): Long { + val fps = when { + thermal >= SEVERE -> HOT_FPS + thermal >= MODERATE -> WARM_FPS + else -> FPS + } + return 1_000_000_000L / fps - SLACK_NS + } + + companion object { + private const val TAG = "HandCamera" + private const val MODEL = "handtracking/pose_landmarker_lite.task" + private const val ANALYSIS_WIDTH = 960 + private const val ANALYSIS_HEIGHT = 720 + private const val MIN_CONFIDENCE = 0.5f + private const val FPS = 15 + private const val WARM_FPS = 10 + private const val HOT_FPS = 6 + private const val MODERATE = 2 + private const val SEVERE = 3 + private const val SLACK_NS = 8_000_000L + private const val MAX_DELAY_NS = 1_000_000_000L + private const val TYPICAL_DELAY_NS = 60_000_000L + private const val ACCEL_SMOOTHING = 0.1f + private const val HOLD_NS = 500_000_000L + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/handtracking/HandCameraRecorder.kt b/app/src/main/java/com/droiddeck/launcher/handtracking/HandCameraRecorder.kt new file mode 100644 index 0000000000..8bd4a17ae4 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/handtracking/HandCameraRecorder.kt @@ -0,0 +1,203 @@ +package com.droiddeck.launcher.handtracking + +import android.content.Context +import android.graphics.Bitmap +import android.hardware.camera2.CameraCaptureSession +import android.hardware.camera2.CaptureRequest +import android.hardware.camera2.CaptureResult +import android.hardware.camera2.TotalCaptureResult +import android.util.Log +import com.droiddeck.launcher.glasses.Vec3 +import java.io.BufferedWriter +import java.io.File +import java.io.FileOutputStream +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale +import java.util.concurrent.Executors +import java.util.concurrent.atomic.AtomicBoolean +import kotlin.math.max +import kotlin.math.roundToInt + +internal class HandCameraRecorder private constructor(private val dir: File, private val traceFlag: File?) { + class Capture(val exposureNs: Long, val frameDurationNs: Long, val iso: Int) + + class Frame( + val exposureNs: Long, + val sensorNs: Long, + val arrivalNs: Long, + val inferredNs: Long, + val doneNs: Long, + val skipped: Int, + val thermal: Int, + val turns: Int, + val placement: Placement, + val gravity: Vec3?, + val intrinsics: Intrinsics?, + val marks: List<FloatArray>?, + val world: List<WorldPoint>?, + val body: BodyFrame?, + val handsNs: Long = 0L, + val fixes: Array<HandFix?>? = null, + ) + + private val writer = Executors.newSingleThreadExecutor { Thread(it, "hand-camera-record") } + private val lines: BufferedWriter = File(dir, "frames.jsonl").bufferedWriter() + private val busy = AtomicBoolean(false) + private val captures = object : LinkedHashMap<Long, Capture>() { + override fun removeEldestEntry(eldest: MutableMap.MutableEntry<Long, Capture>?) = size > KEEP_CAPTURES + } + private var count = 0 + @Volatile private var closed = false + + val callback = object : CameraCaptureSession.CaptureCallback() { + override fun onCaptureCompleted(session: CameraCaptureSession, request: CaptureRequest, result: TotalCaptureResult) { + val stamp = result.get(CaptureResult.SENSOR_TIMESTAMP) ?: return + val capture = Capture(result.get(CaptureResult.SENSOR_EXPOSURE_TIME) ?: 0L, + result.get(CaptureResult.SENSOR_FRAME_DURATION) ?: 0L, result.get(CaptureResult.SENSOR_SENSITIVITY) ?: 0) + synchronized(captures) { captures[stamp] = capture } + } + } + + fun frame(frame: Frame, image: Bitmap) { + if (closed || count >= MAX_FRAMES) return + val index = ++count + val capture = synchronized(captures) { captures[frame.sensorNs] } + val small = if (busy.compareAndSet(false, true)) runCatching { shrink(image) }.getOrNull().also { if (it == null) busy.set(false) } else null + val name = if (small != null) "%05d.jpg".format(Locale.ROOT, index) else null + val line = json(index, frame, capture, name) + val queued = runCatching { writer.execute { + if (small != null) { + runCatching { FileOutputStream(File(dir, name!!)).use { small.compress(Bitmap.CompressFormat.JPEG, QUALITY, it) } } + small.recycle() + busy.set(false) + } + runCatching { + lines.write(line) + lines.newLine() + if (index % FLUSH_EVERY == 0) lines.flush() + } + } } + if (queued.isFailure) { + small?.recycle() + busy.set(false) + } + } + + fun close() { + if (closed) return + closed = true + traceFlag?.delete() + writer.execute { runCatching { lines.close() } } + writer.shutdown() + Log.i(TAG, "recorded $count frames to $dir") + } + + private fun shrink(image: Bitmap): Bitmap { + val scale = SIDE.toFloat() / max(image.width, image.height) + if (scale >= 1f) return image.copy(Bitmap.Config.ARGB_8888, false) + return Bitmap.createScaledBitmap(image, (image.width * scale).roundToInt(), (image.height * scale).roundToInt(), true) + } + + private fun json(index: Int, f: Frame, capture: Capture?, jpg: String?): String = buildString { + append("{\"i\":").append(index) + append(",\"exp\":").append(f.exposureNs) + append(",\"sensor\":").append(f.sensorNs) + append(",\"arr\":").append(f.arrivalNs) + append(",\"inf\":").append(f.inferredNs) + append(",\"done\":").append(f.doneNs) + append(",\"hand\":").append(f.handsNs) + append(",\"skip\":").append(f.skipped) + append(",\"heat\":").append(f.thermal) + append(",\"turns\":").append(f.turns) + append(",\"place\":\"").append(f.placement.name).append('"') + append(",\"g\":").vec(f.gravity) + f.intrinsics?.let { append(",\"k\":[").num(it.fx).append(',').num(it.cx).append(',').num(it.cy).append(',').append(it.width).append(',').append(it.height).append(']') } + capture?.let { append(",\"ae\":[").append(it.exposureNs).append(',').append(it.frameDurationNs).append(',').append(it.iso).append(']') } + append(",\"lm\":") + if (f.marks == null) append("null") else { + append('[') + f.marks.forEachIndexed { i, m -> + if (i > 0) append(',') + append('[') + m.forEachIndexed { j, v -> if (j > 0) append(','); num(v) } + append(']') + } + append(']') + } + append(",\"wl\":") + if (f.world == null) append("null") else { + append('[') + f.world.forEachIndexed { i, w -> + if (i > 0) append(',') + append('[').num(w.x).append(',').num(w.y).append(',').num(w.z).append(']') + } + append(']') + } + f.body?.let { b -> + append(",\"hands\":[").vec(b.hands[0]).append(',').vec(b.hands[1]).append(']') + append(",\"face\":"); if (b.faceYaw == null) append("null") else num(b.faceYaw) + append(",\"est\":[").append(b.estimated[0]).append(',').append(b.estimated[1]).append(']') + append(",\"room\":").num(b.edgeRoom) + append(",\"dist\":").num(b.distance) + append(",\"span\":").num(b.shoulderSpan) + append(",\"joints\":[") + b.joints.forEachIndexed { i, j -> + if (i > 0) append(',') + if (j == null) append("null") else { + append('[') + j.forEachIndexed { k, v -> if (k > 0) append(','); num(v) } + append(']') + } + } + append(']') + } + f.fixes?.let { fixes -> + append(",\"fix\":[") + fixes.forEachIndexed { i, fix -> + if (i > 0) append(',') + if (fix == null) append("null") else { + append("{\"palm\":").vec(fix.palm).append(",\"at\":[").num(fix.x).append(',').num(fix.y).append("],\"size\":").num(fix.extent) + append(",\"pts\":[") + fix.points.forEachIndexed { j, v -> if (j > 0) append(','); num(v) } + append("],\"world\":[") + fix.world.forEachIndexed { j, w -> if (j > 0) append(','); num(w.x).append(',').num(w.y).append(',').num(w.z) } + append("]}") + } + } + append(']') + } + append(",\"jpg\":"); if (jpg == null) append("null") else append('"').append(jpg).append('"') + append('}') + } + + private fun StringBuilder.num(v: Float): StringBuilder = if (v.isFinite()) append(v) else append("null") + + private fun StringBuilder.vec(v: Vec3?): StringBuilder = + if (v == null) append("null") else append('[').num(v.x).append(',').num(v.y).append(',').num(v.z).append(']') + + companion object { + private const val TAG = "HandCamera" + const val FLAG = "handcam-record" + const val TRACE_FLAG = "droiddeck-handtrace.on" + private const val MAX_FRAMES = 5400 + private const val KEEP_CAPTURES = 32 + private const val SIDE = 640 + private const val QUALITY = 85 + private const val FLUSH_EVERY = 30 + + fun start(context: Context, output: File?, preview: Boolean, camera: TrackingCamera): HandCameraRecorder? { + if (!File(context.filesDir, FLAG).exists()) return null + return runCatching { + val stamp = SimpleDateFormat("yyyyMMdd-HHmmss", Locale.ROOT).format(Date()) + val dir = File(context.cacheDir, "handcam-rec/$stamp-${if (preview) "check" else "track"}").apply { mkdirs() } + File(dir, "camera.json").writeText("{\"id\":\"${camera.id}\",\"front\":${camera.front},\"orientation\":${camera.orientation}," + + "\"focal\":${camera.focalPixels},\"active\":[${camera.activeWidth},${camera.activeHeight}]," + + "\"fps\":${camera.fps?.let { "[${it.first},${it.second}]" } ?: "null"}}") + val flag = output?.parentFile?.let { File(it, TRACE_FLAG) }?.also { it.createNewFile() } + Log.i(TAG, "recording hand camera to $dir") + HandCameraRecorder(dir, flag) + }.onFailure { Log.w(TAG, "hand camera recording unavailable", it) }.getOrNull() + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/handtracking/HandCameraShm.kt b/app/src/main/java/com/droiddeck/launcher/handtracking/HandCameraShm.kt new file mode 100644 index 0000000000..946018d2af --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/handtracking/HandCameraShm.kt @@ -0,0 +1,103 @@ +package com.droiddeck.launcher.handtracking + +import android.util.Log +import com.droiddeck.launcher.glasses.Vec3 +import com.droiddeck.launcher.input.FakeInputWriter +import java.io.File +import java.io.RandomAccessFile +import java.nio.ByteOrder +import java.nio.MappedByteBuffer +import java.nio.channels.FileChannel + +internal class HandCameraShm private constructor( + private val file: RandomAccessFile, + private val map: MappedByteBuffer, + private val fence: () -> Unit, +) { + private var seq = map.getInt(SEQ).let { if (it and 1 != 0) it + 1 else it } + private var frame = 0 + + init { + begin() + map.putInt(MAGIC_AT, MAGIC) + map.putInt(VERSION_AT, VERSION) + for (at in FLAGS until SIZE step 4) map.putInt(at, 0) + end() + } + + fun write(timeNs: Long, body: BodyFrame?, bareHands: Boolean = false) { + begin() + val face = body?.faceYaw + map.putInt(FLAGS, RUNNING or (if (face != null) FACE else 0) or (if (bareHands) BARE_HANDS else 0)) + map.putLong(TIME, timeNs) + map.putInt(FRAME, ++frame) + map.putFloat(FACE_YAW, face ?: 0f) + for (side in 0..1) { + val at = HANDS + side * HAND_SIZE + val hand: Vec3? = body?.hands?.getOrNull(side) + val joints = if (hand != null) body?.joints?.getOrNull(side)?.takeIf { it.size == JOINT_FLOATS } else null + val seen = if (body?.estimated?.getOrNull(side) == true) SEEN or ESTIMATED else SEEN + map.putInt(at, if (hand == null) 0 else if (joints != null) seen or JOINTS else seen) + map.putFloat(at + 4, hand?.x ?: 0f) + map.putFloat(at + 8, hand?.y ?: 0f) + map.putFloat(at + 12, hand?.z ?: 0f) + for (i in 0 until JOINT_FLOATS) map.putFloat(at + JOINTS_AT + i * 4, joints?.get(i) ?: 0f) + } + end() + } + + fun close() { + begin() + for (at in FLAGS until SIZE step 4) map.putInt(at, 0) + end() + runCatching { file.close() } + } + + private fun begin() { + map.putInt(SEQ, ++seq) + fence() + } + + private fun end() { + fence() + map.putInt(SEQ, ++seq) + } + + companion object { + const val FILE = "droiddeck-handcam" + const val SIZE = 568 + private const val MAGIC = 0x4D434844 + private const val VERSION = 2 + private const val MAGIC_AT = 0 + private const val VERSION_AT = 4 + private const val SEQ = 8 + private const val FLAGS = 12 + private const val TIME = 16 + private const val FRAME = 24 + private const val FACE_YAW = 28 + private const val HANDS = 32 + private const val HAND_SIZE = 268 + private const val JOINTS_AT = 16 + private const val JOINT_FLOATS = BodyPose.HAND_POINTS * 3 + private const val RUNNING = 1 + private const val FACE = 2 + private const val BARE_HANDS = 4 + private const val SEEN = 1 + private const val ESTIMATED = 2 + private const val JOINTS = 4 + + fun open(path: File, fence: () -> Unit = FakeInputWriter::storeFence): HandCameraShm? = runCatching { + path.parentFile?.mkdirs() + val file = RandomAccessFile(path, "rw") + try { + file.setLength(SIZE.toLong()) + val map = file.channel.map(FileChannel.MapMode.READ_WRITE, 0, SIZE.toLong()) + map.order(ByteOrder.LITTLE_ENDIAN) + HandCameraShm(file, map, fence) + } catch (e: Exception) { + file.close() + throw e + } + }.onFailure { Log.w("HandCamera", "hand camera file unavailable: $path", it) }.getOrNull() + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/handtracking/HandModel.kt b/app/src/main/java/com/droiddeck/launcher/handtracking/HandModel.kt new file mode 100644 index 0000000000..0f4e754d1e --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/handtracking/HandModel.kt @@ -0,0 +1,172 @@ +package com.droiddeck.launcher.handtracking + +import android.content.Context +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.Matrix +import android.graphics.Paint +import com.google.mediapipe.framework.image.BitmapImageBuilder +import com.google.mediapipe.tasks.components.containers.Landmark as MpLandmark +import com.google.mediapipe.tasks.components.containers.NormalizedLandmark +import com.google.mediapipe.tasks.core.BaseOptions +import com.google.mediapipe.tasks.core.Delegate +import com.google.mediapipe.tasks.vision.core.RunningMode +import com.google.mediapipe.tasks.vision.handlandmarker.HandLandmarker +import java.nio.ByteBuffer +import java.nio.ByteOrder +import kotlin.math.hypot +import kotlin.math.max + +internal class HandModel private constructor(private val landmarkers: List<HandLandmarker>, private val starter: HandLandmarker) { + private class Track(val x: Float, val y: Float, val size: Float) + + private val crops = List(2) { Bitmap.createBitmap(CROP, CROP, Bitmap.Config.ARGB_8888) } + private val startCrop = Bitmap.createBitmap(START_CROP, START_CROP, Bitmap.Config.ARGB_8888) + private val tracks = arrayOfNulls<Track>(2) + private val starts = IntArray(2) + private val paint = Paint(Paint.FILTER_BITMAP_FLAG) + private val matrix = Matrix() + + fun find(frame: Bitmap, marks: List<Landmark>, k: Intrinsics, stampMs: Long): Array<HandFix?> { + val fixes = arrayOfNulls<HandFix>(2) + if (marks.size <= BodyPose.RIGHT_INDEX) return fixes + val shoulders = hypot((marks[BodyPose.LEFT_SHOULDER].x - marks[BodyPose.RIGHT_SHOULDER].x) * k.width, + (marks[BodyPose.LEFT_SHOULDER].y - marks[BodyPose.RIGHT_SHOULDER].y) * k.height) + for (side in 0..1) { + val wrist = marks[WRISTS[side]] + val wx = wrist.x * k.width + val wy = wrist.y * k.height + val fix = tracks[side]?.let { follow(frame, it, side, k, stampMs) }?.takeIf { belongs(it, marks, side, shoulders, k) } + ?: start(frame, marks, side, wx, wy, shoulders, k)?.takeIf { belongs(it, marks, side, shoulders, k) } + if (fix == null) { + tracks[side] = null + continue + } + fixes[side] = fix + starts[side] = 0 + tracks[side] = Track(fix.x, fix.y, max(fix.extent, shoulders * MIN_HAND)) + } + val left = fixes[0] + val right = fixes[1] + if (left != null && right != null && hypot(left.x - right.x, left.y - right.y) < max(left.extent, right.extent) * SAME_HAND) { + val drop = if (gap(left, marks, 0, k) <= gap(right, marks, 1, k)) 1 else 0 + fixes[drop] = null + tracks[drop] = null + } + return fixes + } + + fun close() { + landmarkers.forEach { runCatching { it.close() } } + runCatching { starter.close() } + crops.forEach { it.recycle() } + startCrop.recycle() + } + + private fun follow(frame: Bitmap, track: Track, side: Int, k: Intrinsics, stampMs: Long): HandFix? { + val size = max(track.size * CROP_HANDS, MIN_CROP) + val x0 = track.x - size / 2 + val y0 = track.y - size / 2 + draw(frame, crops[side], x0, y0, size) + val result = landmarkers[side].detectForVideo(BitmapImageBuilder(crops[side]).build(), stampMs) + val found = result.landmarks().firstOrNull() ?: return null + val world = result.worldLandmarks().firstOrNull() ?: return null + return fixOf(found, world, x0, y0, size, k) + } + + private fun start(frame: Bitmap, marks: List<Landmark>, side: Int, wx: Float, wy: Float, shoulders: Float, k: Intrinsics): HandFix? { + val wrist = marks[WRISTS[side]] + if (wrist.visibility < MIN_VISIBILITY || shoulders < 1f) return null + if (wrist.x < -EDGE || wrist.x > 1f + EDGE || wrist.y < -EDGE || wrist.y > 1f + EDGE) return null + val wide = starts[side]++ % 2 == 0 + val tx = (marks[PINKIES[side]].x + marks[INDEXES[side]].x) / 2 * k.width - wx + val ty = (marks[PINKIES[side]].y + marks[INDEXES[side]].y) / 2 * k.height - wy + val length = hypot(tx, ty) + val reach = if (wide) 0f else shoulders * TOWARD_FINGERS + val cx = if (length > 1e-3f) wx + tx / length * reach else wx + val cy = if (length > 1e-3f) wy + ty / length * reach else wy + val size = max(shoulders * if (wide) WIDE_SHOULDERS else START_SHOULDERS, MIN_CROP) + val x0 = cx - size / 2 + val y0 = cy - size / 2 + draw(frame, startCrop, x0, y0, size) + val result = starter.detect(BitmapImageBuilder(startCrop).build()) + var best: HandFix? = null + var bestGap = Float.MAX_VALUE + result.landmarks().forEachIndexed { i, found -> + val world = result.worldLandmarks().getOrNull(i) ?: return@forEachIndexed + val fix = fixOf(found, world, x0, y0, size, k) ?: return@forEachIndexed + val gap = hypot(fix.points[0] - wx, fix.points[1] - wy) + if (gap < bestGap) { + best = fix + bestGap = gap + } + } + return best + } + + private fun draw(frame: Bitmap, crop: Bitmap, x0: Float, y0: Float, size: Float) { + crop.eraseColor(Color.BLACK) + matrix.setTranslate(-x0, -y0) + matrix.postScale(crop.width / size, crop.height / size) + Canvas(crop).drawBitmap(frame, matrix, paint) + } + + private fun fixOf(found: List<NormalizedLandmark>, world: List<MpLandmark>, x0: Float, y0: Float, size: Float, k: Intrinsics): HandFix? { + if (found.size < BodyPose.HAND_POINTS || world.size < BodyPose.HAND_POINTS) return null + val points = FloatArray(BodyPose.HAND_POINTS * 2) { i -> + val p = found[i / 2] + if (i % 2 == 0) x0 + p.x() * size else y0 + p.y() * size + } + return BodyPose.handFix(points, world.map { WorldPoint(it.x(), it.y(), it.z()) }, k) + } + + private fun belongs(fix: HandFix, marks: List<Landmark>, side: Int, shoulders: Float, k: Intrinsics): Boolean { + val own = marks[WRISTS[side]] + if (hypot(fix.x - own.x * k.width, fix.y - own.y * k.height) > max(fix.extent, shoulders) * MAX_WRIST_GAP) return false + val other = marks[WRISTS[1 - side]] + if (other.visibility < MIN_VISIBILITY || other.x !in 0f..1f || other.y !in 0f..1f) return true + return hypot(fix.points[0] - other.x * k.width, fix.points[1] - other.y * k.height) >= + hypot(fix.points[0] - own.x * k.width, fix.points[1] - own.y * k.height) + } + + private fun gap(fix: HandFix, marks: List<Landmark>, side: Int, k: Intrinsics): Float = + hypot(fix.x - marks[WRISTS[side]].x * k.width, fix.y - marks[WRISTS[side]].y * k.height) + + companion object { + private const val MODEL = "handtracking/hand_landmarker.task" + private val WRISTS = intArrayOf(BodyPose.LEFT_WRIST, BodyPose.RIGHT_WRIST) + private val PINKIES = intArrayOf(BodyPose.LEFT_PINKY, BodyPose.RIGHT_PINKY) + private val INDEXES = intArrayOf(BodyPose.LEFT_INDEX, BodyPose.RIGHT_INDEX) + private const val CROP = 256 + private const val START_CROP = 384 + private const val CROP_HANDS = 2.8f + private const val MIN_CROP = 48f + private const val START_SHOULDERS = 2.5f + private const val WIDE_SHOULDERS = 4f + private const val MIN_HAND = 0.25f + private const val TOWARD_FINGERS = 0.35f + private const val MAX_WRIST_GAP = 3f + private const val SAME_HAND = 0.5f + private const val EDGE = 0.05f + private const val MIN_VISIBILITY = 0.5f + private const val MIN_CONFIDENCE = 0.4f + + fun open(context: Context): HandModel { + val bytes = context.assets.open(MODEL).use { it.readBytes() } + fun landmarker(mode: RunningMode, hands: Int): HandLandmarker { + val model = ByteBuffer.allocateDirect(bytes.size).order(ByteOrder.nativeOrder()).put(bytes) + model.rewind() + return HandLandmarker.createFromOptions(context, HandLandmarker.HandLandmarkerOptions.builder() + .setBaseOptions(BaseOptions.builder().setModelAssetBuffer(model).setDelegate(Delegate.CPU).build()) + .setRunningMode(mode) + .setNumHands(hands) + .setMinHandDetectionConfidence(MIN_CONFIDENCE) + .setMinHandPresenceConfidence(MIN_CONFIDENCE) + .setMinTrackingConfidence(MIN_CONFIDENCE) + .build()) + } + return HandModel(List(2) { landmarker(RunningMode.VIDEO, 1) }, landmarker(RunningMode.IMAGE, 2)) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/handtracking/HandTracking.kt b/app/src/main/java/com/droiddeck/launcher/handtracking/HandTracking.kt new file mode 100644 index 0000000000..de2d4dbe27 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/handtracking/HandTracking.kt @@ -0,0 +1,110 @@ +package com.droiddeck.launcher.handtracking + +import android.Manifest +import android.content.Context +import android.content.pm.PackageManager +import android.os.Build +import com.droiddeck.launcher.input.ControllerPrefs +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow + +internal object HandTracking { + data class Settings( + val enabled: Boolean = false, + val asked: Boolean = false, + val side: String? = null, + val permitted: Boolean = false, + val sides: Set<String> = emptySet(), + ) { + val usable: Boolean get() = sides.isNotEmpty() + val ready: Boolean get() = enabled && permitted && usable + } + + private val state = MutableStateFlow(Settings()) + val settings: StateFlow<Settings> = state.asStateFlow() + private val checks = MutableStateFlow(0) + val checkRequests: StateFlow<Int> = checks.asStateFlow() + @Volatile private var cameras: List<TrackingCamera>? = null + + val supported: Boolean get() = Build.VERSION.SDK_INT >= 31 + + fun load(context: Context): Settings { + val prefs = ControllerPrefs.prefs(context) + val found = cameras(context) + val next = Settings( + enabled = prefs.getBoolean(ENABLED, false), + asked = prefs.getBoolean(ASKED, false), + side = prefs.getString(SIDE, null), + permitted = permitted(context), + sides = if (supported) TrackingCameras.sides(found) else emptySet(), + ) + state.value = next + return next + } + + fun cameras(context: Context): List<TrackingCamera> = + cameras ?: TrackingCameras.list(context.applicationContext).also { cameras = it } + + fun camera(context: Context): TrackingCamera? = TrackingCameras.pick(cameras(context), state.value.side) + + fun permitted(context: Context): Boolean = + context.checkSelfPermission(Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED + + fun refreshPermission(context: Context) { + state.value = state.value.copy(permitted = permitted(context)) + } + + fun allow(context: Context, side: String?) { + val edit = ControllerPrefs.prefs(context).edit().putBoolean(ASKED, true).putBoolean(ENABLED, true) + if (side != null) edit.putString(SIDE, side) + edit.apply() + load(context) + } + + fun decline(context: Context) { + ControllerPrefs.prefs(context).edit().putBoolean(ASKED, true).putBoolean(ENABLED, false).apply() + load(context) + } + + fun setEnabled(context: Context, on: Boolean) { + ControllerPrefs.prefs(context).edit().putBoolean(ASKED, true).putBoolean(ENABLED, on).apply() + load(context) + } + + fun setSide(context: Context, side: String) { + ControllerPrefs.prefs(context).edit().putString(SIDE, side).apply() + load(context) + } + + fun shouldAsk(settings: Settings, headset: Boolean): Boolean = headset && !settings.asked && settings.usable + + fun wanted(context: Context): Boolean = supported && load(context).ready + + fun requestCheck() { + checks.value++ + } + + private const val ENABLED = "handCamera" + private const val ASKED = "handCameraAsked" + private const val SIDE = "handCameraSide" +} + +internal enum class Advice { STARTING, STAND_UP, UPRIGHT, NOT_SEEN, MOVE_BACK, MOVE_CLOSER, SHOW_HANDS, GOOD } + +internal object PlacementAdvice { + const val MIN_SPAN = 0.12f + const val MAX_SPAN = 0.26f + const val MIN_ROOM = 0.05f + + fun of(placement: Placement, body: BodyFrame?): Advice = when { + placement == Placement.FACE_UP || placement == Placement.FACE_DOWN -> Advice.STAND_UP + placement == Placement.POINTS_UP || placement == Placement.POINTS_DOWN -> Advice.UPRIGHT + body == null || !body.seen -> Advice.NOT_SEEN + body.shoulderSpan > MAX_SPAN -> Advice.MOVE_BACK + body.shoulderSpan < MIN_SPAN -> Advice.MOVE_CLOSER + body.edgeRoom < MIN_ROOM -> Advice.MOVE_BACK + body.hands.any { it == null } -> Advice.SHOW_HANDS + else -> Advice.GOOD + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/handtracking/TrackingCameras.kt b/app/src/main/java/com/droiddeck/launcher/handtracking/TrackingCameras.kt new file mode 100644 index 0000000000..196e5188f0 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/handtracking/TrackingCameras.kt @@ -0,0 +1,136 @@ +package com.droiddeck.launcher.handtracking + +import android.content.Context +import android.hardware.camera2.CameraCharacteristics +import android.hardware.camera2.CameraManager +import android.os.Build +import com.droiddeck.launcher.glasses.Vec3 +import kotlin.math.asin +import kotlin.math.atan +import kotlin.math.max +import kotlin.math.min +import kotlin.math.tan + +internal class TrackingCamera( + val id: String, + val front: Boolean, + val orientation: Int, + val focalPixels: Float, + val activeWidth: Int, + val activeHeight: Int, + val minZoom: Float, + val realtime: Boolean, + val fps: Pair<Int, Int>? = null, +) { + val fovDegrees: Float get() = Math.toDegrees(2.0 * atan(activeWidth / 2.0 / focalPixels)).toFloat() + + fun zoom(): Float { + if (minZoom >= 1f) return 1f + val needed = (tan(Math.toRadians(fovDegrees / 2.0)) / tan(Math.toRadians(MAX_FOV / 2.0))).toFloat() + return min(1f, max(minZoom, needed)) + } + + fun intrinsics(bufferWidth: Int, bufferHeight: Int, zoom: Float, turns: Int): Intrinsics { + val aspect = bufferWidth.toFloat() / bufferHeight + val region = min(activeWidth.toFloat(), activeHeight * aspect) / zoom + val f = focalPixels * bufferWidth / region + val quarter = turns and 1 == 1 + val w = if (quarter) bufferHeight else bufferWidth + val h = if (quarter) bufferWidth else bufferHeight + return Intrinsics(f, f, w / 2f, h / 2f, w, h) + } + + companion object { + const val MAX_FOV = 100.0 + } +} + +internal object TrackingCameras { + const val REAR = "rear" + const val FRONT = "front" + private const val MAX_FPS = 30 + + fun list(context: Context): List<TrackingCamera> { + val manager = context.getSystemService(CameraManager::class.java) ?: return emptyList() + val ids = runCatching { manager.cameraIdList.toList() }.getOrDefault(emptyList()) + return ids.mapNotNull { id -> runCatching { describe(id, manager.getCameraCharacteristics(id)) }.getOrNull() } + } + + private fun describe(id: String, c: CameraCharacteristics): TrackingCamera? { + val facing = c.get(CameraCharacteristics.LENS_FACING) ?: return null + if (facing == CameraCharacteristics.LENS_FACING_EXTERNAL) return null + val caps = c.get(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES) ?: return null + if (CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE !in caps) return null + val active = c.get(CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE) ?: return null + val pixels = c.get(CameraCharacteristics.SENSOR_INFO_PIXEL_ARRAY_SIZE) ?: return null + val physical = c.get(CameraCharacteristics.SENSOR_INFO_PHYSICAL_SIZE) ?: return null + val focal = c.get(CameraCharacteristics.LENS_INFO_AVAILABLE_FOCAL_LENGTHS)?.firstOrNull() ?: return null + val calibrated = c.get(CameraCharacteristics.LENS_INTRINSIC_CALIBRATION)?.firstOrNull()?.takeIf { it > 1f } + val focalPixels = calibrated ?: (focal * pixels.width / physical.width) + val minZoom = if (Build.VERSION.SDK_INT >= 30) c.get(CameraCharacteristics.CONTROL_ZOOM_RATIO_RANGE)?.lower ?: 1f else 1f + val realtime = c.get(CameraCharacteristics.SENSOR_INFO_TIMESTAMP_SOURCE) == CameraCharacteristics.SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME + val fps = steadyFps(c.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES)?.map { it.lower to it.upper }.orEmpty()) + return TrackingCamera(id, facing == CameraCharacteristics.LENS_FACING_FRONT, c.get(CameraCharacteristics.SENSOR_ORIENTATION) ?: 0, + focalPixels, active.width(), active.height(), minZoom, realtime, fps) + } + + fun steadyFps(ranges: List<Pair<Int, Int>>): Pair<Int, Int>? = + ranges.filter { it.second <= MAX_FPS }.maxWithOrNull(compareBy<Pair<Int, Int>> { it.first }.thenByDescending { it.second }) + + fun sides(cameras: List<TrackingCamera>): Set<String> = cameras.mapTo(LinkedHashSet()) { if (it.front) FRONT else REAR } + + fun pick(cameras: List<TrackingCamera>, side: String?): TrackingCamera? { + val wanted = cameras.filter { side == null || (it.front == (side == FRONT)) }.ifEmpty { cameras } + val preferred = if (side == null) wanted.filter { !it.front }.ifEmpty { wanted } else wanted + return preferred.maxWithOrNull(compareBy<TrackingCamera> { min(widest(it), TrackingCamera.MAX_FOV.toFloat()) } + .thenBy { it.activeWidth.toLong() * it.activeHeight }) + } + + private fun widest(c: TrackingCamera): Float = + Math.toDegrees(2.0 * atan(tan(Math.toRadians(c.fovDegrees / 2.0)) / c.zoom())).toFloat() +} + +internal object CameraGeometry { + fun axes(front: Boolean, orientation: Int, turns: Int): Pair<Vec3, Vec3> { + val t = Math.toRadians(orientation.toDouble()) + val c = Math.cos(t).toFloat() + val s = Math.sin(t).toFloat() + var u = if (front) Vec3(-c, -s, 0f) else Vec3(c, -s, 0f) + var v = if (front) Vec3(s, -c, 0f) else Vec3(-s, -c, 0f) + repeat(Math.floorMod(turns, 4)) { + val nu = v * -1f + v = u + u = nu + } + return u to v + } + + fun upInCamera(front: Boolean, orientation: Int, turns: Int, up: Vec3): Vec3 { + val (u, v) = axes(front, orientation, turns) + val n = up.normalized() + return Vec3(dot(n, u), dot(n, v), dot(n, u.cross(v))) + } + + fun uprightTurns(front: Boolean, orientation: Int, up: Vec3): Int = + (0..3).minBy { turns -> dot(up.normalized(), axes(front, orientation, turns).second) } + + fun placement(front: Boolean, up: Vec3): Placement { + val n = up.normalized() + if (n.length() < 0.5f) return Placement.UNKNOWN + if (n.z > FLAT) return Placement.FACE_UP + if (n.z < -FLAT) return Placement.FACE_DOWN + val elevation = Math.toDegrees(asin((if (front) n.z else -n.z).toDouble().coerceIn(-1.0, 1.0))) + return when { + elevation > STEEP -> Placement.POINTS_UP + elevation < -STEEP -> Placement.POINTS_DOWN + else -> Placement.STANDING + } + } + + private fun dot(a: Vec3, b: Vec3) = a.x * b.x + a.y * b.y + a.z * b.z + + private const val FLAT = 0.9f + private const val STEEP = 45.0 +} + +internal enum class Placement { UNKNOWN, STANDING, FACE_UP, FACE_DOWN, POINTS_UP, POINTS_DOWN } diff --git a/app/src/main/java/com/droiddeck/launcher/input/ControllerPrefs.kt b/app/src/main/java/com/droiddeck/launcher/input/ControllerPrefs.kt index 739f83d3f8..9b08fd8adb 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/ControllerPrefs.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/ControllerPrefs.kt @@ -47,6 +47,7 @@ object ControllerPrefs { val qamButton: Boolean, val keyboardButton: Boolean, val selectSteam: Boolean, + val joyConVr: Boolean, val snap: Boolean, val customLayout: Boolean, val mapping: Map<String, String>, @@ -67,6 +68,7 @@ object ControllerPrefs { qamButton = p.getBoolean("qamButton", true), keyboardButton = p.getBoolean("keyboardButton", true), selectSteam = p.getBoolean("selectSteam", false), + joyConVr = joyConVr(context), snap = p.getBoolean("snap", true), customLayout = p.all.keys.any { it.startsWith("layout.") }, mapping = mappable.associate { (id, _) -> id to target(context, id) }, @@ -123,11 +125,16 @@ object ControllerPrefs { prefs(context).edit().putBoolean("keyboardButton", on).apply() } - /** The physical Select button opens the Steam menu instead of View/Select. */ fun setSelectSteam(context: Context, on: Boolean) { prefs(context).edit().putBoolean("selectSteam", on).apply() } + fun joyConVr(context: Context): Boolean = prefs(context).getBoolean("joyConVr", true) + + fun setJoyConVr(context: Context, on: Boolean) { + prefs(context).edit().putBoolean("joyConVr", on).apply() + } + fun setSnap(context: Context, on: Boolean) { prefs(context).edit().putBoolean("snap", on).apply() } @@ -151,7 +158,6 @@ object ControllerPrefs { } fun resetAll(context: Context) { - // On older Android versions clear() does not notify listeners; restore rumble explicitly. prefs(context).edit().clear().putBoolean("rumble", true).apply() } diff --git a/app/src/main/java/com/droiddeck/launcher/input/DeckControls.kt b/app/src/main/java/com/droiddeck/launcher/input/DeckControls.kt index 23146be374..a8c499793b 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/DeckControls.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/DeckControls.kt @@ -1,15 +1,6 @@ package com.droiddeck.launcher.input -/** - * The Steam Deck controller's back grips and trackpads, which a handheld's own pad does not have: - * the second screen's Deck controls (DeckControlsPanel) drive them, and each change goes into the - * pad's ring ([FakeInputWriter.writeDeckControls]) for libfakeinput's Deck report. - * - * Trackpad positions are -1..1 each way with y up, as on a Deck; a pad touched reports its - * position, a pad clicked also reports full pressure. - */ object DeckControls { - /** Bits of the ring's controls word - MUST match DECK_EXTRA_* in fakeinput_steam.cpp. */ const val L4 = 1 const val R4 = 2 const val L5 = 4 @@ -19,7 +10,6 @@ object DeckControls { private const val LEFT_CLICK = 64 private const val RIGHT_CLICK = 128 - /** The pad the Deck controller is made from (PadBridge's slot). */ private const val SLOT = 0 private var controls = 0 @@ -32,7 +22,6 @@ object DeckControls { publish() } - /** A finger on (or off) one trackpad at x, y in -1..1, y up. */ @Synchronized fun setPad(right: Boolean, touching: Boolean, x: Float = 0f, y: Float = 0f) { val at = if (right) 2 else 0 @@ -49,7 +38,6 @@ object DeckControls { publish() } - /** Everything let go - for when the panel goes away with a finger still on it. */ @Synchronized fun releaseAll() { if (controls == 0 && pads.all { it.toInt() == 0 } && pressure.all { it.toInt() == 0 }) return diff --git a/app/src/main/java/com/droiddeck/launcher/input/EvdevKeys.java b/app/src/main/java/com/droiddeck/launcher/input/EvdevKeys.java index 23aae64be7..48f9ea30d4 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/EvdevKeys.java +++ b/app/src/main/java/com/droiddeck/launcher/input/EvdevKeys.java @@ -2,21 +2,11 @@ package com.droiddeck.launcher.input; import android.view.KeyEvent; -/** - * Android key codes to Linux evdev codes, for the keys we inject into the compositor's - * wl_keyboard. A hardware keyboard is how an account name and password are typed on the client's - * first run, so this matters before any game does. - * - * <p>evdev's order is not alphabetical: the numbers are the physical positions of a PC keyboard, - * which is what the compositor's xkb keymap is written against. Table taken from Bannerlator's - * Wayland path unchanged. - */ public final class EvdevKeys { private EvdevKeys() {} public static int fromKeyCode(int kc) { switch (kc) { - // Letters (evdev order is NOT alphabetical) case KeyEvent.KEYCODE_A: return 30; case KeyEvent.KEYCODE_B: return 48; case KeyEvent.KEYCODE_C: return 46; case KeyEvent.KEYCODE_D: return 32; case KeyEvent.KEYCODE_E: return 18; case KeyEvent.KEYCODE_F: return 33; @@ -30,36 +20,30 @@ public final class EvdevKeys { case KeyEvent.KEYCODE_U: return 22; case KeyEvent.KEYCODE_V: return 47; case KeyEvent.KEYCODE_W: return 17; case KeyEvent.KEYCODE_X: return 45; case KeyEvent.KEYCODE_Y: return 21; case KeyEvent.KEYCODE_Z: return 44; - // Digit row case KeyEvent.KEYCODE_1: return 2; case KeyEvent.KEYCODE_2: return 3; case KeyEvent.KEYCODE_3: return 4; case KeyEvent.KEYCODE_4: return 5; case KeyEvent.KEYCODE_5: return 6; case KeyEvent.KEYCODE_6: return 7; case KeyEvent.KEYCODE_7: return 8; case KeyEvent.KEYCODE_8: return 9; case KeyEvent.KEYCODE_9: return 10; case KeyEvent.KEYCODE_0: return 11; - // Whitespace / edit case KeyEvent.KEYCODE_ENTER: return 28; case KeyEvent.KEYCODE_NUMPAD_ENTER: return 28; case KeyEvent.KEYCODE_SPACE: return 57; case KeyEvent.KEYCODE_TAB: return 15; - case KeyEvent.KEYCODE_DEL: return 14; /* backspace */ + case KeyEvent.KEYCODE_DEL: return 14; case KeyEvent.KEYCODE_FORWARD_DEL: return 111; case KeyEvent.KEYCODE_ESCAPE: return 1; - // Modifiers case KeyEvent.KEYCODE_SHIFT_LEFT: return 42; case KeyEvent.KEYCODE_SHIFT_RIGHT: return 54; case KeyEvent.KEYCODE_CTRL_LEFT: return 29; case KeyEvent.KEYCODE_CTRL_RIGHT: return 97; case KeyEvent.KEYCODE_ALT_LEFT: return 56; case KeyEvent.KEYCODE_ALT_RIGHT: return 100; case KeyEvent.KEYCODE_CAPS_LOCK: return 58; - // Arrows / nav case KeyEvent.KEYCODE_DPAD_UP: return 103; case KeyEvent.KEYCODE_DPAD_DOWN: return 108; case KeyEvent.KEYCODE_DPAD_LEFT: return 105; case KeyEvent.KEYCODE_DPAD_RIGHT: return 106; case KeyEvent.KEYCODE_MOVE_HOME: return 102; case KeyEvent.KEYCODE_MOVE_END: return 107; case KeyEvent.KEYCODE_PAGE_UP: return 104; case KeyEvent.KEYCODE_PAGE_DOWN: return 109; case KeyEvent.KEYCODE_INSERT: return 110; - // Punctuation case KeyEvent.KEYCODE_GRAVE: return 41; case KeyEvent.KEYCODE_MINUS: return 12; case KeyEvent.KEYCODE_EQUALS: return 13; case KeyEvent.KEYCODE_LEFT_BRACKET: return 26; case KeyEvent.KEYCODE_RIGHT_BRACKET: return 27; case KeyEvent.KEYCODE_BACKSLASH: return 43; case KeyEvent.KEYCODE_SEMICOLON: return 39; case KeyEvent.KEYCODE_APOSTROPHE: return 40; case KeyEvent.KEYCODE_SLASH: return 53; case KeyEvent.KEYCODE_COMMA: return 51; case KeyEvent.KEYCODE_PERIOD: return 52; - // Function row case KeyEvent.KEYCODE_F1: return 59; case KeyEvent.KEYCODE_F2: return 60; case KeyEvent.KEYCODE_F3: return 61; case KeyEvent.KEYCODE_F4: return 62; case KeyEvent.KEYCODE_F5: return 63; case KeyEvent.KEYCODE_F6: return 64; @@ -70,23 +54,15 @@ public final class EvdevKeys { } } - /** - * The character a key carries when Shift is not held, for a character that needs it - so '@' - * gives '2' and 'A' gives 'a'. Returns 0 when the character is typed without Shift, which is - * also the answer for anything this layout does not place on a key. US layout, which is what - * the session's keymap is. - */ public static int unshiftedChar(int ch) { if (ch >= 'A' && ch <= 'Z') return Character.toLowerCase(ch); int at = SHIFTED_CHARS.indexOf(ch); return at >= 0 ? PLAIN_CHARS.charAt(at) : 0; } - // Index-aligned: the symbol, and the key it shares with Shift held. private static final String SHIFTED_CHARS = "!@#$%^&*()_+{}|:\"<>?~"; private static final String PLAIN_CHARS = "1234567890-=[]\\;',./`"; - /** The Android key code that carries an unshifted character, or 0 when nothing does. */ public static int keycodeForChar(int ch) { if (ch >= 'a' && ch <= 'z') return KeyEvent.KEYCODE_A + (ch - 'a'); if (ch >= '0' && ch <= '9') return KeyEvent.KEYCODE_0 + (ch - '0'); diff --git a/app/src/main/java/com/droiddeck/launcher/input/FakeInputRingPaths.java b/app/src/main/java/com/droiddeck/launcher/input/FakeInputRingPaths.java index 05e5fc3060..d16aa0b539 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/FakeInputRingPaths.java +++ b/app/src/main/java/com/droiddeck/launcher/input/FakeInputRingPaths.java @@ -2,16 +2,11 @@ package com.droiddeck.launcher.input; import java.io.File; -/** - * Where the fake input rings live and how the guest is told about them. Kept apart from - * {@link FakeInputWriter}, which loads native code, so it can be tested on the JVM. - */ final class FakeInputRingPaths { static final String RING_DIR_NAME = "fakeinput-rings"; private FakeInputRingPaths() {} - /** The rings sit beside the fake evdev nodes: session/dev/input -> session/dev/fakeinput-rings. */ static File ringDir(File fakeInputDir) { if (fakeInputDir == null) { return null; @@ -26,13 +21,6 @@ final class FakeInputRingPaths { return ringDir != null ? new File(ringDir, "ring" + slot) : null; } - /** - * The ring's path as the guest opens it. The session tree is bound into the guest at its own - * host path, spelled the way {@code Context.getFilesDir()} spells it (LinuxRuntime.binds), so - * the export has to use that same spelling. A canonical path is not that: where - * /data/user/0 is a link, or a separate mount, onto /data/data (ColorOS 16, #166) it resolves - * to a prefix nothing is bound at, and every pad, physical and on-screen, goes dead. - */ static String exportPath(File ringFile) { return ringFile.getAbsolutePath(); } diff --git a/app/src/main/java/com/droiddeck/launcher/input/FakeInputWriter.java b/app/src/main/java/com/droiddeck/launcher/input/FakeInputWriter.java index c345532d7b..308b6add85 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/FakeInputWriter.java +++ b/app/src/main/java/com/droiddeck/launcher/input/FakeInputWriter.java @@ -9,33 +9,17 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.channels.FileChannel; -/** - * Fake evdev transport for the emulated Xbox 360 pads. - * - * <p>Replaces the old append-file transport (which desynced after ~15 min when an - * unlooped {@code channel.write} left a partial event in the file and the - * IOException was swallowed) with a fixed-size mmap RING BUFFER shared with the - * native reader in {@code fakeinput.cpp}. Delta events are published into the - * ring under a monotonic {@code write_seq}; an authoritative absolute-state - * snapshot is published alongside under a seqlock so the native reader can replay - * a full keyframe to heal any desync (open, ring overflow) without duplicate - * input. Ring layout (magic/version/offsets) is a paired ABI with the native - * {@code FakeInputRingHeader} - keep the two in lockstep. - */ public class FakeInputWriter { private static final String TAG = "FakeInputWriter"; - // Event types public static final short EV_SYN = 0x00; public static final short EV_KEY = 0x01; public static final short EV_ABS = 0x03; public static final short EV_MSC = 0x04; - // Event codes public static final short MSC_SCAN = 0x04; public static final short SYN_REPORT = 0x00; - // Xbox 360 controller button codes public static final short BTN_A = 0x130; public static final short BTN_B = 0x131; public static final short BTN_X = 0x133; @@ -48,7 +32,6 @@ public class FakeInputWriter { public static final short BTN_MODE = 0x13C; public static final short BTN_THUMBR = 0x13E; - // Absolute axis codes public static final short ABS_X = 0x00; public static final short ABS_Y = 0x01; public static final short ABS_RX = 0x03; @@ -58,17 +41,12 @@ public class FakeInputWriter { public static final short ABS_HAT0X = 0x10; public static final short ABS_HAT0Y = 0x11; - // Button mapping (bit i of the snapshot buttons word) private static final short[] BUTTON_MAP = { BTN_A, BTN_B, BTN_X, BTN_Y, BTN_TL, BTN_TR, BTN_SELECT, BTN_START, BTN_THUMBL, BTN_THUMBR, BTN_MODE }; - /** Bit 10 of the snapshot word. The first ten are PadState's own bit order; the Steam - * button is not, because PadState keeps 10 and 11 for the triggers. */ private static final int SNAPSHOT_IDX_MODE = 10; - /** Bit 11: the Quick Access button. Snapshot only - an Xbox pad's evdev node has no such key; - * libfakeinput's Deck controller reads it from here. */ private static final int SNAPSHOT_IDX_QAM = 11; private static final int EVENT_SIZE = 24; @@ -76,11 +54,10 @@ public class FakeInputWriter { private static final int BUFFER_SIZE = EVENT_SIZE * MAX_EVENTS_PER_UPDATE; private static final int MAX_FAKE_INPUT_SLOTS = 4; - // Ring layout - MUST match FakeInputRingHeader in fakeinput.cpp. private static final int RING_CAPACITY_EVENTS = 4096; private static final int RING_HEADER_SIZE = 64; private static final int RING_SIZE = RING_HEADER_SIZE + (RING_CAPACITY_EVENTS * EVENT_SIZE); - private static final int RING_MAGIC = 0x46494252; // FIBR + private static final int RING_MAGIC = 0x46494252; private static final int RING_VERSION = 2; private static final int RING_MAGIC_OFFSET = 0; private static final int RING_VERSION_OFFSET = 4; @@ -88,40 +65,33 @@ public class FakeInputWriter { private static final int RING_CAPACITY_OFFSET = 12; private static final int RING_WRITE_SEQ_OFFSET = 16; private static final int RING_GENERATION_OFFSET = 24; - // Authoritative absolute-state snapshot the native reader replays as a full - // keyframe to heal any delta-stream desync. Written under a seqlock - // (RING_SNAPSHOT_SEQ_OFFSET: odd = write in progress). private static final int RING_SNAPSHOT_SEQ_OFFSET = 32; private static final int RING_SNAPSHOT_BUTTONS_OFFSET = 40; - private static final int RING_SNAPSHOT_AXES_OFFSET = 44; // short[8] - // After the events - MUST match the blocks in fakeinput_steam.cpp. DeckImu carries the - // Deck-only motion, grips and trackpads. TritonShared carries the paired Steam Controller's - // native BLE reports and output reports, so the Steam client can see it as its own device. + private static final int RING_SNAPSHOT_AXES_OFFSET = 44; private static final int IMU_OFFSET = RING_SIZE; - private static final int IMU_MAGIC = 0x31554D49; // IMU1 - // Written by libfakeinput, not here: the client's SETTING_IMU_MODE | 0x80000000 (readImuMode). + private static final int IMU_MAGIC = 0x31554D49; private static final int IMU_MODE_OFFSET = IMU_OFFSET + 4; private static final int IMU_SEQ_OFFSET = IMU_OFFSET + 8; - private static final int IMU_ACCEL_OFFSET = IMU_OFFSET + 16; // short[3] - private static final int IMU_GYRO_OFFSET = IMU_OFFSET + 22; // short[3] - private static final int DECK_PADS_OFFSET = IMU_OFFSET + 28; // short[4]: left X, Y, right X, Y - private static final int DECK_PRESSURE_OFFSET = IMU_OFFSET + 36; // short[2]: left, right - private static final int DECK_CONTROLS_OFFSET = IMU_OFFSET + 40; // int: DeckControls bits - // Slot 0 only: what the pad is to the Steam client (libfakeinput's PAD_TYPE_*), | PAD_TYPE_SET. + private static final int IMU_ACCEL_OFFSET = IMU_OFFSET + 16; + private static final int IMU_GYRO_OFFSET = IMU_OFFSET + 22; + private static final int DECK_PADS_OFFSET = IMU_OFFSET + 28; + private static final int DECK_PRESSURE_OFFSET = IMU_OFFSET + 36; + private static final int DECK_CONTROLS_OFFSET = IMU_OFFSET + 40; private static final int PAD_TYPE_OFFSET = IMU_OFFSET + 44; private static final int PAD_TYPE_SET = 0x80000000; + private static final int LATENCY_OFFSET = IMU_OFFSET + 48; + public static final int LATENCY_CONTROLLER = 1; + public static final int LATENCY_TOUCH = 2; + private static volatile int latency = 0; public static final int PAD_TYPE_DECK = 0; public static final int PAD_TYPE_STEAM = 1; public static final int PAD_TYPE_XBOX = 2; public static final int PAD_TYPE_DS4 = 3; public static final int PAD_TYPE_DUALSENSE = 4; - /** The type chosen this process, written into a ring made after the choice too; -1 for none. */ private static volatile int padType = -1; - /** The paired controller's state, likewise written into a ring made after it connected. */ private static volatile boolean tritonConnected = false; private static final int TRITON_OFFSET = RING_SIZE + 64; - private static final int TRITON_MAGIC = 0x4e525454; // TTRN - // Whether the paired controller is connected: libfakeinput offers its device only then. + private static final int TRITON_MAGIC = 0x4e525454; private static final int TRITON_CONNECTED_OFFSET = TRITON_OFFSET + 4; private static final int TRITON_INPUT_SEQ_OFFSET = TRITON_OFFSET + 8; private static final int TRITON_REPORT_ID_OFFSET = TRITON_OFFSET + 16; @@ -131,7 +101,6 @@ public class FakeInputWriter { private static final int TRITON_OUTPUT_FEATURE_OFFSET = TRITON_OFFSET + 96; private static final int TRITON_OUTPUT_LENGTH_OFFSET = TRITON_OFFSET + 100; private static final int TRITON_OUTPUT_OFFSET = TRITON_OFFSET + 104; - // A feature read: libfakeinput bumps the request, the reply names the request it answers. private static final int TRITON_GET_REQUEST_OFFSET = TRITON_OFFSET + 168; private static final int TRITON_GET_REPLY_OFFSET = TRITON_OFFSET + 176; private static final int TRITON_GET_REPORT_ID_OFFSET = TRITON_OFFSET + 184; @@ -150,6 +119,10 @@ public class FakeInputWriter { private static native void nativeStoreFence(); + public static void storeFence() { + nativeStoreFence(); + } + private final File eventFile; private final int slot; private final ByteBuffer buffer = ByteBuffer.allocateDirect(BUFFER_SIZE); @@ -163,9 +136,6 @@ public class FakeInputWriter { private int prevTriggerL, prevTriggerR; private int prevHatX, prevHatY; private boolean hasChanges = false; - // If a publish fails after prev* state has already advanced, the next frame - // must re-emit the whole state once; otherwise an unchanged control would stay - // silent and the ring snapshot would never catch up. private boolean pendingFullResend = false; private boolean forceResend = false; @@ -186,7 +156,6 @@ public class FakeInputWriter { boolean everActivated; } - // ---- Static ring management (shared by all writers + the env exporter) ---- public static void prepareRingSlots(File fakeInputDir, int slotCount) { int boundedSlotCount = Math.max(0, Math.min(slotCount, MAX_FAKE_INPUT_SLOTS)); @@ -197,10 +166,6 @@ public class FakeInputWriter { } } - /** - * Prepares every slot ring and returns the {@code slot=path;...} spec the native - * reader consumes via FAKE_EVDEV_MEMFD_PATHS. - */ public static String getRingEnv(File fakeInputDir) { synchronized (RING_LOCK) { prepareRingSlotsLocked(fakeInputDir, MAX_FAKE_INPUT_SLOTS); @@ -257,6 +222,7 @@ public class FakeInputWriter { data.putInt(DECK_CONTROLS_OFFSET, 0); int type = padType; data.putInt(PAD_TYPE_OFFSET, type >= 0 ? PAD_TYPE_SET | type : 0); + data.putInt(LATENCY_OFFSET, latency); data.putInt(TRITON_OFFSET, TRITON_MAGIC); data.putInt(TRITON_CONNECTED_OFFSET, tritonConnected ? 1 : 0); data.putLong(TRITON_INPUT_SEQ_OFFSET, 0L); @@ -269,8 +235,6 @@ public class FakeInputWriter { data.putLong(TRITON_GET_REPLY_OFFSET, 0L); } - // Lock order: RING_LOCK, then the slot. Every writer holds the slot while it touches data, and - // re-checks it there: a writer that looked the slot up just before this ran finds it gone. private static void releaseRingSlotLocked(int slot) { RingSlot ringSlot = RING_SLOTS[slot]; if (ringSlot == null) { @@ -433,8 +397,6 @@ public class FakeInputWriter { return false; } - // Raw byte copy: endianness is irrelevant since we never interpret - // multi-byte fields out of the source here. ByteBuffer source = this.buffer.duplicate(); synchronized (ringSlot) { ByteBuffer ring = ringSlot.data; @@ -446,19 +408,12 @@ public class FakeInputWriter { while (source.remaining() >= EVENT_SIZE) { int eventIndex = (int) (writeSeq % RING_CAPACITY_EVENTS); int targetOffset = RING_HEADER_SIZE + (eventIndex * EVENT_SIZE); - // Bulk-copy one event (EVENT_SIZE bytes) instead of byte-by-byte. - // Bound the source to a single event, position the ring at the slot, - // then let put(ByteBuffer) move the whole block. Mutating the ring's - // Java position is harmless: the native reader uses a raw pointer, not - // this position. API-26 safe (no JDK 13+ absolute bulk put). source.limit(source.position() + EVENT_SIZE); ring.position(targetOffset); ring.put(source); source.limit(sourceLimit); writeSeq++; } - // Publish the resulting absolute state. prev* now hold the post-update - // values, i.e. exactly the state the events just written transition to. writeSnapshotLocked(ring); nativeStoreFence(); ring.putLong(RING_WRITE_SEQ_OFFSET, writeSeq); @@ -466,9 +421,6 @@ public class FakeInputWriter { return true; } - // Publishes the full absolute controller state for the native reader to replay - // as a keyframe. seqlock: bump to odd, write fields, bump to even, with - // store-store fences so the reader's acquire loads see consistent payloads. private void writeSnapshotLocked(ByteBuffer ring) { int buttons = 0; for (int i = 0; i < BUTTON_MAP.length; i++) { @@ -480,11 +432,9 @@ public class FakeInputWriter { buttons |= (1 << SNAPSHOT_IDX_QAM); } long seq = ring.getLong(RING_SNAPSHOT_SEQ_OFFSET); - ring.putLong(RING_SNAPSHOT_SEQ_OFFSET, seq + 1); // odd: write in progress + ring.putLong(RING_SNAPSHOT_SEQ_OFFSET, seq + 1); nativeStoreFence(); ring.putInt(RING_SNAPSHOT_BUTTONS_OFFSET, buttons); - // Axis order must match the native kSnapshotAxisCodes: - // X, Y, RX, RY, GAS(=triggerR), BRAKE(=triggerL), HAT0X, HAT0Y. ring.putShort(RING_SNAPSHOT_AXES_OFFSET, clampShort(this.prevThumbLX)); ring.putShort(RING_SNAPSHOT_AXES_OFFSET + 2, clampShort(this.prevThumbLY)); ring.putShort(RING_SNAPSHOT_AXES_OFFSET + 4, clampShort(this.prevThumbRX)); @@ -494,13 +444,9 @@ public class FakeInputWriter { ring.putShort(RING_SNAPSHOT_AXES_OFFSET + 12, clampShort(this.prevHatX)); ring.putShort(RING_SNAPSHOT_AXES_OFFSET + 14, clampShort(this.prevHatY)); nativeStoreFence(); - ring.putLong(RING_SNAPSHOT_SEQ_OFFSET, seq + 2); // even: write complete + ring.putLong(RING_SNAPSHOT_SEQ_OFFSET, seq + 2); } - /** - * Publishes the pad's motion for slot {@code slot}: accelerometer and gyro, already in the Deck - * controller's axes and units (see PadMotion). Safe from any thread. - */ public static void writeMotion(int slot, short[] accel, short[] gyro) { RingSlot ringSlot; synchronized (RING_LOCK) { @@ -511,7 +457,7 @@ public class FakeInputWriter { ByteBuffer ring = ringSlot.data; if (ring == null) return; long seq = ring.getLong(IMU_SEQ_OFFSET); - ring.putLong(IMU_SEQ_OFFSET, seq + 1); // odd: write in progress + ring.putLong(IMU_SEQ_OFFSET, seq + 1); nativeStoreFence(); for (int i = 0; i < 3; i++) { ring.putShort(IMU_ACCEL_OFFSET + i * 2, accel[i]); @@ -523,10 +469,6 @@ public class FakeInputWriter { } } - /** - * The motion the Steam client asked the Deck controller of slot {@code slot} for: its - * SETTING_IMU_MODE (0 = off), or -1 until it has said. Safe from any thread. - */ public static int readImuMode(int slot) { RingSlot ringSlot; synchronized (RING_LOCK) { @@ -540,11 +482,6 @@ public class FakeInputWriter { } } - /** - * Publishes the Deck's back grips and trackpads for slot {@code slot} (see DeckControls): - * {@code controls} is the DeckControls bit set, {@code pads} left X, Y, right X, Y and - * {@code pressure} left, right, already in the Deck's units. Safe from any thread. - */ public static void writeDeckControls(int slot, int controls, short[] pads, short[] pressure) { RingSlot ringSlot; synchronized (RING_LOCK) { @@ -566,10 +503,11 @@ public class FakeInputWriter { } } - /** - * Switches what the pad is to the Steam client while the session runs ([PAD_TYPE_DECK], - * [PAD_TYPE_STEAM] or [PAD_TYPE_XBOX]); libfakeinput unplugs the old device and plugs in the new. - */ + public static boolean padHasQam() { + int type = padType; + return type < 0 || type == PAD_TYPE_DECK || type == PAD_TYPE_STEAM; + } + public static void setPadType(int type) { padType = type; RingSlot ringSlot; @@ -585,7 +523,22 @@ public class FakeInputWriter { } } - /** The paired Steam Controller came or went (SteamControllerBle): its device is plugged in or out. */ + public static void setLowLatency(boolean controller, boolean touch) { + int flags = (controller ? LATENCY_CONTROLLER : 0) | (touch ? LATENCY_TOUCH : 0); + latency = flags; + RingSlot ringSlot; + synchronized (RING_LOCK) { + ringSlot = RING_SLOTS[0]; + } + if (ringSlot == null) return; + synchronized (ringSlot) { + ByteBuffer ring = ringSlot.data; + if (ring == null) return; + nativeStoreFence(); + ring.putInt(LATENCY_OFFSET, flags); + } + } + public static void setTritonConnected(int slot, boolean connected) { tritonConnected = connected; RingSlot ringSlot = tritonSlot(slot); @@ -598,7 +551,6 @@ public class FakeInputWriter { } } - /** Publishes a native Triton input report (without the HID report ID byte). */ public static void writeTritonState(int slot, int reportId, byte[] report) { if (report == null || report.length == 0 || report.length > TRITON_REPORT_MAX) return; RingSlot ringSlot; @@ -623,7 +575,6 @@ public class FakeInputWriter { } } - /** Returns the newest Steam-client output report after {@code lastSequence}, or null. */ public static byte[] readTritonOutput(int slot, long lastSequence) { RingSlot ringSlot; synchronized (RING_LOCK) { @@ -647,7 +598,6 @@ public class FakeInputWriter { } } - /** The Steam client's newest unanswered feature read, or 0: its request number. */ public static long readTritonFeatureRequest(int slot) { RingSlot ringSlot = tritonSlot(slot); if (ringSlot == null) return 0L; @@ -660,7 +610,6 @@ public class FakeInputWriter { } } - /** Answers feature read {@code request} with the controller's report, or a failure when null. */ public static void writeTritonFeatureReply(int slot, long request, byte[] report) { RingSlot ringSlot = tritonSlot(slot); if (ringSlot == null) return; @@ -738,11 +687,6 @@ public class FakeInputWriter { isOpen = false; } - /** - * Reset all input state to neutral (all buttons released, axes zeroed). - * This keeps the ring active so games that cache the file descriptor can still - * reconnect. - */ public synchronized void reset() { if (!isOpen && !open()) return; @@ -750,7 +694,6 @@ public class FakeInputWriter { buffer.clear(); hasChanges = false; - // Release all buttons for (int i = 0; i < BUTTON_MAP.length; i++) { if (prevButtonStates[i]) { prevButtonStates[i] = false; @@ -764,7 +707,6 @@ public class FakeInputWriter { hasChanges = true; } - // Zero all axes if (prevThumbLX != 0) { prevThumbLX = 0; writeEvent(EV_ABS, ABS_X, 0); @@ -813,9 +755,6 @@ public class FakeInputWriter { Log.i(TAG, "Soft released fake input: " + eventFile.getAbsolutePath()); } - /** - * Full destroy - reset, tear the ring generation down, and delete the discovery node. - */ public synchronized void destroy() { destroyed = true; reset(); @@ -851,9 +790,6 @@ public class FakeInputWriter { if (!isOpen && !open()) return; - // Keep the ring delta-first for latency. Full event frames are only used as - // a one-shot repair after a failed publish; normal open/overflow recovery is - // handled by the native snapshot keyframe. forceResend = pendingFullResend; pendingFullResend = false; if (forceResend) { @@ -863,13 +799,9 @@ public class FakeInputWriter { buffer.clear(); hasChanges = false; - // Buttons for (int i = 0; i < 10; i++) { writeButton(i, state.isDown(i)); } - // The Steam button. In a Linux session this is what opens the client's own in-game menu, - // and the client looks for it where an Xbox pad keeps it: evdev BTN_MODE, which SDL then - // reports as button 8 - exactly the "guide:b8" in the mapping Steam writes for this pad. writeButton(SNAPSHOT_IDX_MODE, state.isDown(PadState.GUIDE)); boolean qam = state.isDown(PadState.QAM); @@ -878,14 +810,11 @@ public class FakeInputWriter { hasChanges = true; } - // Sticks int lx = (int) (state.leftX * 32767); int ly = (int) (state.leftY * 32767); int rx = (int) (state.rightX * 32767); int ry = (int) (state.rightY * 32767); - // The fake evdev ring is event-queue semantics, so unchanged axes normally - // stay silent; forceResend overrides that to emit a complete keyframe. if (forceResend || lx != prevThumbLX) { prevThumbLX = lx; writeEvent(EV_ABS, ABS_X, lx); @@ -903,7 +832,6 @@ public class FakeInputWriter { writeEvent(EV_ABS, ABS_RY, ry); } - // L2 and R2 (Triggers) int tl = (int) (state.leftTrigger * 255); int tr = (int) (state.rightTrigger * 255); if (forceResend || tl != prevTriggerL) { @@ -915,7 +843,6 @@ public class FakeInputWriter { writeEvent(EV_ABS, ABS_GAS, tr); } - // D-pad int hatX = state.hatX(); int hatY = state.hatY(); if (forceResend || hatX != prevHatX) { @@ -927,13 +854,11 @@ public class FakeInputWriter { writeEvent(EV_ABS, ABS_HAT0Y, hatY); } - // Detect change else no need to write if (hasChanges) { writeEvent(EV_SYN, SYN_REPORT, 0); buffer.flip(); if (!flushBuffer()) { Log.e(TAG, "Gamepad write error: fake input mmap ring unavailable"); - // Couldn't publish; re-assert the whole state on the next frame. pendingFullResend = true; } } diff --git a/app/src/main/java/com/droiddeck/launcher/input/JoyCon.kt b/app/src/main/java/com/droiddeck/launcher/input/JoyCon.kt new file mode 100644 index 0000000000..57cb710ae9 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/input/JoyCon.kt @@ -0,0 +1,143 @@ +package com.droiddeck.launcher.input + +import android.view.InputDevice +import android.view.KeyEvent +import android.view.MotionEvent + +object JoyCon { + const val LEFT = 0 + const val RIGHT = 1 + + const val VR_TRIGGER = 1 shl 0 + const val VR_GRIP = 1 shl 1 + const val VR_A = 1 shl 2 + const val VR_B = 1 shl 3 + const val VR_STICK = 1 shl 4 + const val VR_SYSTEM = 1 shl 5 + const val VR_RUMBLE_SLOT = 0x100 + + private const val VENDOR = 0x057e + private const val PRODUCT_LEFT = 0x2006 + private const val PRODUCT_RIGHT = 0x2007 + + private const val BTN_SOUTH = 0x130 + private const val BTN_EAST = 0x131 + private const val BTN_NORTH = 0x133 + private const val BTN_WEST = 0x134 + private const val BTN_Z = 0x135 + private const val BTN_TL = 0x136 + private const val BTN_TR = 0x137 + private const val BTN_TL2 = 0x138 + private const val BTN_TR2 = 0x139 + private const val BTN_SELECT = 0x13a + private const val BTN_START = 0x13b + private const val BTN_MODE = 0x13c + private const val BTN_THUMBL = 0x13d + private const val BTN_THUMBR = 0x13e + private const val BTN_DPAD_UP = 0x220 + private const val BTN_DPAD_DOWN = 0x221 + private const val BTN_DPAD_LEFT = 0x222 + private const val BTN_DPAD_RIGHT = 0x223 + private val NO_VR_DEVICES = intArrayOf(PadBridge.NO_CONTROLLER, PadBridge.NO_CONTROLLER) + private var vrOwner: Any? = null + @Volatile private var vrDevices = NO_VR_DEVICES + + @JvmStatic + fun side(device: InputDevice?): Int = when { + device == null || device.isVirtual || device.vendorId != VENDOR -> -1 + device.productId == PRODUCT_LEFT -> LEFT + device.productId == PRODUCT_RIGHT -> RIGHT + else -> -1 + } + + @JvmStatic + fun stickAxes(side: Int, device: InputDevice, source: Int): IntArray = when { + side == LEFT -> intArrayOf(MotionEvent.AXIS_X, MotionEvent.AXIS_Y) + device.getMotionRange(MotionEvent.AXIS_RX, source) != null -> intArrayOf(MotionEvent.AXIS_RX, MotionEvent.AXIS_RY) + else -> intArrayOf(MotionEvent.AXIS_Z, MotionEvent.AXIS_RZ) + } + + @JvmStatic + fun isRail(side: Int, scanCode: Int): Boolean = when (side) { + LEFT -> scanCode == BTN_TR || scanCode == BTN_TR2 + RIGHT -> scanCode == BTN_TL || scanCode == BTN_TL2 + else -> false + } + + internal fun padKey(side: Int, scanCode: Int): Int = when (side) { + LEFT -> when (scanCode) { + BTN_TL -> KeyEvent.KEYCODE_BUTTON_L1 + BTN_TL2 -> KeyEvent.KEYCODE_BUTTON_L2 + BTN_SELECT -> KeyEvent.KEYCODE_BUTTON_SELECT + BTN_THUMBL -> KeyEvent.KEYCODE_BUTTON_THUMBL + BTN_Z -> KeyEvent.KEYCODE_BUTTON_Z + BTN_DPAD_UP -> KeyEvent.KEYCODE_DPAD_UP + BTN_DPAD_DOWN -> KeyEvent.KEYCODE_DPAD_DOWN + BTN_DPAD_LEFT -> KeyEvent.KEYCODE_DPAD_LEFT + BTN_DPAD_RIGHT -> KeyEvent.KEYCODE_DPAD_RIGHT + else -> KeyEvent.KEYCODE_UNKNOWN + } + RIGHT -> when (scanCode) { + BTN_SOUTH -> KeyEvent.KEYCODE_BUTTON_A + BTN_EAST -> KeyEvent.KEYCODE_BUTTON_B + BTN_NORTH -> KeyEvent.KEYCODE_BUTTON_Y + BTN_WEST -> KeyEvent.KEYCODE_BUTTON_X + BTN_TR -> KeyEvent.KEYCODE_BUTTON_R1 + BTN_TR2 -> KeyEvent.KEYCODE_BUTTON_R2 + BTN_START -> KeyEvent.KEYCODE_BUTTON_START + BTN_THUMBR -> KeyEvent.KEYCODE_BUTTON_THUMBR + BTN_MODE -> KeyEvent.KEYCODE_BUTTON_MODE + else -> KeyEvent.KEYCODE_UNKNOWN + } + else -> KeyEvent.KEYCODE_UNKNOWN + } + + @JvmStatic + fun normalize(event: KeyEvent): KeyEvent { + val side = side(event.device) + if (side < 0) return event + val code = padKey(side, event.scanCode) + if (code == KeyEvent.KEYCODE_UNKNOWN || code == event.keyCode) return event + return KeyEvent(event.downTime, event.eventTime, event.action, code, event.repeatCount, event.metaState, + event.deviceId, event.scanCode, event.flags, event.source) + } + + internal fun vrButton(side: Int, scanCode: Int): Int = when (side) { + LEFT -> when (scanCode) { + BTN_TL2 -> VR_TRIGGER + BTN_TL, BTN_TR, BTN_TR2 -> VR_GRIP + BTN_DPAD_DOWN, BTN_DPAD_RIGHT -> VR_A + BTN_DPAD_UP, BTN_DPAD_LEFT, BTN_SELECT -> VR_B + BTN_THUMBL -> VR_STICK + BTN_Z -> VR_SYSTEM + else -> 0 + } + RIGHT -> when (scanCode) { + BTN_TR2 -> VR_TRIGGER + BTN_TR, BTN_TL, BTN_TL2 -> VR_GRIP + BTN_SOUTH, BTN_EAST -> VR_A + BTN_NORTH, BTN_WEST, BTN_START -> VR_B + BTN_THUMBR -> VR_STICK + BTN_MODE -> VR_SYSTEM + else -> 0 + } + else -> 0 + } + + @JvmStatic + fun vrRumbleDevice(slot: Int): Int? = + if (slot == VR_RUMBLE_SLOT + LEFT || slot == VR_RUMBLE_SLOT + RIGHT) vrDevices[slot - VR_RUMBLE_SLOT] else null + + @Synchronized + internal fun setVrDevices(owner: Any, devices: IntArray) { + vrOwner = owner + vrDevices = devices + } + + @Synchronized + internal fun clearVrDevices(owner: Any) { + if (vrOwner !== owner) return + vrOwner = null + vrDevices = NO_VR_DEVICES + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/input/JoyConMotion.kt b/app/src/main/java/com/droiddeck/launcher/input/JoyConMotion.kt new file mode 100644 index 0000000000..fcfceaba67 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/input/JoyConMotion.kt @@ -0,0 +1,213 @@ +package com.droiddeck.launcher.input + +import android.content.Context +import com.droiddeck.launcher.glasses.Quaternion +import com.droiddeck.launcher.glasses.Vec3 +import kotlin.math.abs +import kotlin.math.exp +import kotlin.math.roundToInt +import kotlin.math.sqrt + +internal class JoyConAccelCalibration { + var bias = Vec3(0f, 0f, 0f) + private set + var scale = 1f + private set + var ready = false + private set + private val sums = HashMap<Int, DoubleArray>() + + fun restore(saved: FloatArray?) { + if (saved == null || saved.size != 4 || saved.any { it.isNaN() || it.isInfinite() }) return + val b = Vec3(saved[0], saved[1], saved[2]) + if (!plausible(b, saved[3])) return + bias = b + scale = saved[3] + ready = true + } + + fun saved(): FloatArray? = if (ready) floatArrayOf(bias.x, bias.y, bias.z, scale) else null + + fun correct(raw: Vec3): Vec3 = if (ready) (raw - bias) * scale else raw + + fun addResting(raw: Vec3): Boolean { + val n = raw.length() + if (n < 1e-3f) return false + val key = bin(raw.x / n) * 9 + bin(raw.y / n) * 3 + bin(raw.z / n) + val s = sums.getOrPut(key) { DoubleArray(4) } + s[0] += raw.x.toDouble() + s[1] += raw.y.toDouble() + s[2] += raw.z.toDouble() + s[3] += 1.0 + return s[3] % SOLVE_EVERY == 0.0 && solve() + } + + private fun solve(): Boolean { + val points = sums.values.filter { it[3] >= MIN_SAMPLES }.map { doubleArrayOf(it[0] / it[3], it[1] / it[3], it[2] / it[3]) } + if (points.size < MIN_BINS || smallestSpread(points) < MIN_SPREAD) return false + val ata = Array(4) { DoubleArray(4) } + val atb = DoubleArray(4) + for (p in points) { + val row = doubleArrayOf(2 * p[0], 2 * p[1], 2 * p[2], 1.0) + val rhs = p[0] * p[0] + p[1] * p[1] + p[2] * p[2] + for (i in 0..3) { + atb[i] += row[i] * rhs + for (j in 0..3) ata[i][j] += row[i] * row[j] + } + } + val x = solve4(ata, atb) ?: return false + val radius2 = x[3] + x[0] * x[0] + x[1] * x[1] + x[2] * x[2] + if (radius2 <= 0) return false + val b = Vec3(x[0].toFloat(), x[1].toFloat(), x[2].toFloat()) + val s = (GRAVITY / sqrt(radius2)).toFloat() + if (!plausible(b, s)) return false + bias = b + scale = s + ready = true + return true + } + + private fun bin(v: Float) = (v * 1.5f).roundToInt().coerceIn(-1, 1) + 1 + + companion object { + private const val GRAVITY = 9.80665 + private const val MIN_SAMPLES = 20.0 + private const val MIN_BINS = 5 + private const val MIN_SPREAD = 2.0 + private const val SOLVE_EVERY = 25.0 + private const val MAX_BIAS = 1.5f + private const val MAX_SCALE_ERROR = 0.1f + + private fun plausible(b: Vec3, s: Float) = b.length() <= MAX_BIAS && abs(s - 1f) <= MAX_SCALE_ERROR + + private fun smallestSpread(points: List<DoubleArray>): Double { + val mean = DoubleArray(3) { i -> points.sumOf { it[i] } / points.size } + val c = Array(3) { DoubleArray(3) } + for (p in points) for (i in 0..2) for (j in 0..2) c[i][j] += (p[i] - mean[i]) * (p[j] - mean[j]) + return sqrt(maxOf(smallestEigenvalue(c), 0.0)) + } + + private fun smallestEigenvalue(m: Array<DoubleArray>): Double { + val a = Array(3) { m[it].copyOf() } + repeat(50) { + var p = 0 + var q = 1 + for ((i, j) in listOf(0 to 2, 1 to 2)) if (abs(a[i][j]) > abs(a[p][q])) { p = i; q = j } + if (abs(a[p][q]) < 1e-12) return minOf(a[0][0], a[1][1], a[2][2]) + val theta = (a[q][q] - a[p][p]) / (2 * a[p][q]) + val t = (if (theta >= 0) 1.0 else -1.0) / (abs(theta) + sqrt(theta * theta + 1)) + val c = 1 / sqrt(t * t + 1) + val s = t * c + for (k in 0..2) { + val kp = a[k][p] + val kq = a[k][q] + a[k][p] = c * kp - s * kq + a[k][q] = s * kp + c * kq + } + for (k in 0..2) { + val pk = a[p][k] + val qk = a[q][k] + a[p][k] = c * pk - s * qk + a[q][k] = s * pk + c * qk + } + } + return minOf(a[0][0], a[1][1], a[2][2]) + } + + private fun solve4(a: Array<DoubleArray>, b: DoubleArray): DoubleArray? { + val m = Array(4) { i -> DoubleArray(5) { j -> if (j < 4) a[i][j] else b[i] } } + for (col in 0..3) { + val pivot = (col..3).maxBy { abs(m[it][col]) } + if (abs(m[pivot][col]) < 1e-9) return null + val swap = m[col] + m[col] = m[pivot] + m[pivot] = swap + for (r in 0..3) { + if (r == col) continue + val f = m[r][col] / m[col][col] + for (k in col..4) m[r][k] -= f * m[col][k] + } + } + return DoubleArray(4) { m[it][4] / m[it][it] } + } + } +} + +internal class JoyConMotion { + var velocity = Vec3(0f, 0f, 0f) + private set + var displacement = Vec3(0f, 0f, 0f) + private set + var inertial = Vec3(0f, 0f, 0f) + private set + var resting = false + private set + private var gravity = Float.NaN + private var average = Vec3(0f, 0f, 0f) + private var calmFor = 0f + private var stillFor = 0f + private var movingFor = 0f + + fun update(rotation: Quaternion, accel: Vec3, rate: Vec3, calibrated: Boolean, dt: Float) { + if (dt <= 0f) return + if (gravity.isNaN()) { + gravity = accel.length() + average = accel + } + if (calibrated) gravity = GRAVITY + average += (accel - average) * (dt / AVERAGE_SECONDS).coerceAtMost(1f) + val world = rotation.rotate(accel) + val linear = Vec3(world.x, world.y - gravity, world.z) + inertial = inertial * exp(-dt / INERTIAL_SECONDS) + linear * dt + val calm = rate.length() < CALM_RATE && (accel - average).length() < CALM_ACCEL + calmFor = if (calm) calmFor + dt else 0f + val still = rate.length() < CALM_RATE && + (linear.length() < STILL_ACCEL || calmFor >= if (calibrated) CALIBRATED_CALM_SECONDS else UNCALIBRATED_CALM_SECONDS) + stillFor = if (still) stillFor + dt else 0f + resting = calmFor >= RESTING_SECONDS && rate.length() < RESTING_RATE + if (stillFor >= STILL_SECONDS) { + movingFor = 0f + velocity *= exp(-dt / SETTLE_SECONDS) + if (!calibrated) gravity += (accel.length() - gravity) * (dt / GRAVITY_SECONDS).coerceAtMost(1f) + } else { + movingFor += dt + val leak = if (movingFor < FREE_SECONDS) LEAK_SECONDS else LONG_MOVE_LEAK_SECONDS + velocity = velocity * exp(-dt / leak) + linear * dt + } + displacement += velocity * dt + } + + companion object { + private const val GRAVITY = 9.80665f + private const val AVERAGE_SECONDS = 0.1f + private const val CALM_RATE = 0.2f + private const val CALM_ACCEL = 0.25f + private const val STILL_ACCEL = 0.12f + private const val STILL_SECONDS = 0.2f + private const val UNCALIBRATED_CALM_SECONDS = 0.5f + private const val CALIBRATED_CALM_SECONDS = 2f + private const val SETTLE_SECONDS = 0.05f + private const val LEAK_SECONDS = 20f + private const val FREE_SECONDS = 1f + private const val LONG_MOVE_LEAK_SECONDS = 0.2f + private const val GRAVITY_SECONDS = 0.5f + private const val INERTIAL_SECONDS = 30f + private const val RESTING_SECONDS = 0.3f + private const val RESTING_RATE = 0.05f + } +} + +internal object JoyConCalibrations { + fun load(context: Context, descriptor: String?): FloatArray? { + if (descriptor.isNullOrEmpty()) return null + val text = ControllerPrefs.prefs(context).getString(KEY + descriptor, null) ?: return null + return text.split(',').mapNotNull { it.toFloatOrNull() }.toFloatArray().takeIf { it.size == 4 } + } + + fun save(context: Context, descriptor: String?, values: FloatArray?) { + if (descriptor.isNullOrEmpty() || values == null) return + ControllerPrefs.prefs(context).edit().putString(KEY + descriptor, values.joinToString(",")).apply() + } + + private const val KEY = "joyConAccel." +} diff --git a/app/src/main/java/com/droiddeck/launcher/input/JoyConOrientation.kt b/app/src/main/java/com/droiddeck/launcher/input/JoyConOrientation.kt new file mode 100644 index 0000000000..c94d2d500a --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/input/JoyConOrientation.kt @@ -0,0 +1,113 @@ +package com.droiddeck.launcher.input + +import com.droiddeck.launcher.glasses.Quaternion +import com.droiddeck.launcher.glasses.Vec3 +import kotlin.math.abs + +internal class JoyConOrientation { + var rotation = Quaternion.IDENTITY + private set + var rate = Vec3(0f, 0f, 0f) + private set + var ready = false + private set + private var bias = Vec3(0f, 0f, 0f) + private var stillFor = 0f + + fun update(accelKernel: FloatArray, gyroKernel: FloatArray, dt: Float) = update(axes(accelKernel), axes(gyroKernel), dt) + + fun update(accel: Vec3, gyro: Vec3, dt: Float) { + val norm = accel.length() + val gravityValid = abs(norm - GRAVITY) < GRAVITY_TOLERANCE + if (!ready) { + if (!gravityValid) return + val up = accel.normalized() + val axis = up.cross(WORLD_UP) + rotation = if (up.y < -0.9999f) Quaternion.fromAxisAngle(Vec3(1f, 0f, 0f), Math.PI.toFloat()) + else Quaternion(1f + up.y, axis.x, axis.y, axis.z).normalized() + rate = Vec3(0f, 0f, 0f) + ready = true + return + } + if (dt <= 0f) return + val still = gravityValid && abs(norm - GRAVITY) < STILL_ACCEL && (gyro - bias).length() < STILL_RATE + stillFor = if (still) stillFor + dt else 0f + if (stillFor >= STILL_SECONDS) { + val alpha = (dt / BIAS_SECONDS).coerceAtMost(1f) + bias = bias * (1f - alpha) + gyro * alpha + } + rate = gyro - bias + var corrected = rate + if (gravityValid && rate.length() < MOVING_RATE) { + val predictedUp = rotation.conjugate().rotate(WORLD_UP) + corrected += accel.normalized().cross(predictedUp) * (GAIN * (1f - abs(norm - GRAVITY) / GRAVITY_TOLERANCE)) + } + rotation = rotation.integrateBodyRate(corrected, dt).normalized() + } + + companion object { + private val WORLD_UP = Vec3(0f, 1f, 0f) + private const val GRAVITY = 9.80665f + private const val GRAVITY_TOLERANCE = 1.0f + private const val STILL_ACCEL = 0.5f + private const val STILL_RATE = 0.05f + private const val STILL_SECONDS = 0.3f + private const val BIAS_SECONDS = 2f + private const val GAIN = 1.0f + private const val MOVING_RATE = 1.0f + + fun axes(v: FloatArray) = Vec3(-v[1], v[2], -v[0]) + } +} + +internal class JoyConReports { + class Sample(val accel: FloatArray, val gyro: FloatArray, val dt: Float) + + private val pending = ArrayList<FloatArray>(4) + private var pendingAt = 0L + private var previousFirst: FloatArray? = null + private var previousLast: FloatArray? = null + private var previousSample: FloatArray? = null + private var previousAt = 0L + private var order = NEWEST_FIRST_START + + val size: Int get() = pending.size + + fun add(accel: FloatArray, gyro: FloatArray, arrivalNs: Long) { + if (pending.isEmpty()) pendingAt = arrivalNs + pending += floatArrayOf(accel[0], accel[1], accel[2], gyro[0], gyro[1], gyro[2]) + } + + fun flush(): List<Sample> { + if (pending.isEmpty()) return emptyList() + val first = pending.first() + val last = pending.last() + if (pending.size > 1) { + if (previousFirst?.contentEquals(last) == true) order = (order + 1).coerceAtMost(ORDER_LIMIT) + else if (previousLast?.contentEquals(first) == true) order = (order - 1).coerceAtLeast(-ORDER_LIMIT) + } + val chronological = if (order >= 0) pending.asReversed() else pending + val fresh = ArrayList<FloatArray>(chronological.size) + var before = previousSample + for (sample in chronological) { + if (before?.contentEquals(sample) != true) fresh += sample + before = sample + } + val used = fresh.ifEmpty { listOf(chronological.last()) } + val dt = if (previousAt == 0L) 0f else ((pendingAt - previousAt).coerceAtLeast(0L) * 1e-9f / used.size).coerceAtMost(MAX_STEP_S) + val out = used.map { Sample(it.copyOfRange(0, 3), it.copyOfRange(3, 6), dt) } + previousFirst = first + previousLast = last + previousSample = chronological.last() + previousAt = pendingAt + pending.clear() + return out + } + + companion object { + const val SAMPLES_PER_REPORT = 3 + private const val NEWEST_FIRST_START = 2 + private const val ORDER_LIMIT = 20 + private const val MAX_STEP_S = 0.05f + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/input/JoyConShm.kt b/app/src/main/java/com/droiddeck/launcher/input/JoyConShm.kt new file mode 100644 index 0000000000..0fbb548abe --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/input/JoyConShm.kt @@ -0,0 +1,116 @@ +package com.droiddeck.launcher.input + +import android.util.Log +import com.droiddeck.launcher.glasses.Quaternion +import com.droiddeck.launcher.glasses.Vec3 +import java.io.File +import java.io.RandomAccessFile +import java.nio.ByteOrder +import java.nio.MappedByteBuffer +import java.nio.channels.FileChannel + +internal class JoyConShm private constructor( + private val file: RandomAccessFile, + private val map: MappedByteBuffer, + private val fence: () -> Unit, +) { + class Hand( + val connected: Boolean, + val charging: Boolean = false, + val buttons: Int = 0, + val rotation: Quaternion = Quaternion.IDENTITY, + val rate: Vec3 = Vec3(0f, 0f, 0f), + val displacement: Vec3 = Vec3(0f, 0f, 0f), + val velocity: Vec3 = Vec3(0f, 0f, 0f), + val inertial: Vec3 = Vec3(0f, 0f, 0f), + val stickX: Float = 0f, + val stickY: Float = 0f, + val battery: Float = -1f, + val recenter: Int = 0, + val timeNs: Long = 0L, + ) + + private var seq = map.getInt(SEQ).let { if (it and 1 != 0) it + 1 else it } + + init { + begin() + map.putInt(MAGIC_AT, MAGIC) + map.putInt(VERSION_AT, VERSION) + for (at in HANDS until SIZE step 4) map.putInt(at, 0) + end() + } + + fun write(side: Int, hand: Hand) { + val at = HANDS + side * HAND_SIZE + begin() + map.putInt(at, (if (hand.connected) CONNECTED else 0) or (if (hand.charging) CHARGING else 0)) + map.putInt(at + 4, hand.buttons) + map.putFloat(at + 8, hand.rotation.w) + map.putFloat(at + 12, hand.rotation.x) + map.putFloat(at + 16, hand.rotation.y) + map.putFloat(at + 20, hand.rotation.z) + map.putFloat(at + 24, hand.rate.x) + map.putFloat(at + 28, hand.rate.y) + map.putFloat(at + 32, hand.rate.z) + map.putFloat(at + 36, hand.stickX) + map.putFloat(at + 40, hand.stickY) + map.putFloat(at + 44, hand.battery) + map.putInt(at + 48, hand.recenter) + map.putLong(at + 56, hand.timeNs) + map.putFloat(at + 64, hand.displacement.x) + map.putFloat(at + 68, hand.displacement.y) + map.putFloat(at + 72, hand.displacement.z) + map.putFloat(at + 76, hand.velocity.x) + map.putFloat(at + 80, hand.velocity.y) + map.putFloat(at + 84, hand.velocity.z) + map.putFloat(at + 88, hand.inertial.x) + map.putFloat(at + 92, hand.inertial.y) + map.putFloat(at + 96, hand.inertial.z) + map.putInt(at + 100, 0) + end() + } + + fun close() { + write(JoyCon.LEFT, Hand(connected = false)) + write(JoyCon.RIGHT, Hand(connected = false)) + runCatching { file.close() } + } + + private fun begin() { + map.putInt(SEQ, ++seq) + fence() + } + + private fun end() { + fence() + map.putInt(SEQ, ++seq) + } + + companion object { + const val FILE = "droiddeck-joycon" + const val SIZE = 224 + private const val MAGIC = 0x4E434A44 + private const val VERSION = 3 + private const val MAGIC_AT = 0 + private const val VERSION_AT = 4 + private const val SEQ = 8 + private const val HANDS = 16 + private const val HAND_SIZE = 104 + private const val CONNECTED = 1 + private const val CHARGING = 2 + + fun open(path: File, fence: () -> Unit = FakeInputWriter::storeFence): JoyConShm? = runCatching { + path.parentFile?.mkdirs() + val file = RandomAccessFile(path, "rw") + try { + file.setLength(SIZE.toLong()) + val map = file.channel.map(FileChannel.MapMode.READ_WRITE, 0, SIZE.toLong()) + map.order(ByteOrder.LITTLE_ENDIAN) + JoyConShm(file, map, fence) + } catch (e: Exception) { + file.close() + throw e + } + }.onFailure { Log.w("JoyConVr", "Joy-Con pose file unavailable: $path", it) }.getOrNull() + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/input/JoyConVr.kt b/app/src/main/java/com/droiddeck/launcher/input/JoyConVr.kt new file mode 100644 index 0000000000..abbefe10e7 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/input/JoyConVr.kt @@ -0,0 +1,372 @@ +package com.droiddeck.launcher.input + +import android.content.Context +import android.hardware.BatteryState +import android.hardware.Sensor +import android.hardware.SensorEvent +import android.hardware.SensorEventListener +import android.hardware.SensorManager +import android.os.CombinedVibration +import android.os.Handler +import android.os.HandlerThread +import android.os.Looper +import android.os.Process +import android.os.VibrationEffect +import android.util.Log +import android.view.InputDevice +import android.view.KeyEvent +import android.view.MotionEvent +import androidx.annotation.RequiresApi +import java.io.File +import kotlin.math.min +import kotlin.math.sqrt + +@RequiresApi(31) +class JoyConVr( + private val context: Context, + private val path: File, + private val onDevicesChanged: (taken: List<Int>, released: List<Int>) -> Unit, +) { + private val thread = HandlerThread("joycon-vr", Process.THREAD_PRIORITY_DISPLAY).apply { start() } + private val worker = Handler(thread.looper) + private val main = Handler(Looper.getMainLooper()) + @Volatile private var owned = IntArray(0) + private var wanted = false + private var closed = false + private var retries = 0 + private var shm: JoyConShm? = null + private val hands = arrayOfNulls<Hand>(2) + private val retry = Runnable { apply() } + + fun setActive(on: Boolean) { + worker.post { + if (closed || wanted == on) return@post + wanted = on + retries = 0 + apply() + } + } + + fun refresh() { + worker.post { + if (closed) return@post + retries = 0 + apply() + } + } + + fun owns(deviceId: Int): Boolean = owned.contains(deviceId) + + val holding: Boolean get() = owned.isNotEmpty() + + fun onKeyEvent(event: KeyEvent): Boolean { + if (!owns(event.deviceId)) return false + if (event.repeatCount > 0) return true + val down = when (event.action) { + KeyEvent.ACTION_DOWN -> true + KeyEvent.ACTION_UP -> false + else -> return true + } + val id = event.deviceId + val scanCode = event.scanCode + worker.post { hand(id)?.key(scanCode, down) } + return true + } + + fun onMotionEvent(event: MotionEvent): Boolean { + if (!owns(event.deviceId)) return false + if (!event.isFromSource(InputDevice.SOURCE_JOYSTICK) || event.actionMasked != MotionEvent.ACTION_MOVE) return true + val device = event.device ?: return true + val side = JoyCon.side(device) + if (side < 0) return true + val axes = JoyCon.stickAxes(side, device, event.source) + val x = event.getAxisValue(axes[0]) + val y = event.getAxisValue(axes[1]) + val id = event.deviceId + worker.post { hand(id)?.stick(x, -y) } + return true + } + + fun releaseButtons() { + worker.post { hands.forEach { it?.release() } } + } + + fun recenter() { + worker.post { hands.forEach { it?.recenter() } } + } + + fun close() { + worker.post { + closed = true + wanted = false + apply() + shm?.close() + shm = null + } + thread.quitSafely() + } + + private fun hand(id: Int): Hand? = hands.firstOrNull { it?.device?.id == id } + + private fun apply() { + worker.removeCallbacks(retry) + val found = arrayOfNulls<InputDevice>(2) + var waiting = false + if (wanted && !closed) { + for (id in InputDevice.getDeviceIds()) { + val device = InputDevice.getDevice(id) ?: continue + val side = JoyCon.side(device) + if (side < 0 || found[side] != null) continue + if (hasMotion(device)) found[side] = device else waiting = true + } + } + val before = owned + for (side in 0..1) { + val current = hands[side] + val device = found[side] + if (current != null && current.device.id == device?.id) continue + current?.stop() + hands[side] = null + if (device != null) { + hands[side] = start(side, device) + if (hands[side] == null) waiting = true + } + } + val now = hands.mapNotNull { it?.device?.id }.toIntArray() + owned = now + if (closed) JoyCon.clearVrDevices(this) + else JoyCon.setVrDevices(this, IntArray(2) { hands[it]?.device?.id ?: PadBridge.NO_CONTROLLER }) + if (!closed) { + val taken = now.filter { it !in before } + val released = before.filter { it !in now } + if (taken.isNotEmpty() || released.isNotEmpty()) main.post { onDevicesChanged(taken, released) } + } + if (wanted && waiting && retries < MAX_RETRIES) { + retries++ + worker.postDelayed(retry, RETRY_MS) + } + } + + private fun hasMotion(device: InputDevice): Boolean = + runCatching { + val sensors = device.sensorManager + sensors.getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null && sensors.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null + }.getOrDefault(false) + + private fun start(side: Int, device: InputDevice): Hand? { + val out = shm ?: JoyConShm.open(path)?.also { shm = it } ?: return null + val sensors = runCatching { device.sensorManager }.getOrNull() ?: return null + val gyro = runCatching { sensors.getDefaultSensor(Sensor.TYPE_GYROSCOPE) }.getOrNull() ?: return null + val accel = runCatching { sensors.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) }.getOrNull() ?: return null + val hand = Hand(side, device, sensors, out) + val listening = runCatching { + sensors.registerListener(hand, accel, SensorManager.SENSOR_DELAY_FASTEST, worker) && + sensors.registerListener(hand, gyro, SensorManager.SENSOR_DELAY_FASTEST, worker) + }.onFailure { Log.w(TAG, "Joy-Con motion unavailable for \"${device.name}\"", it) }.getOrDefault(false) + if (!listening) { + runCatching { sensors.unregisterListener(hand) } + return null + } + Log.i(TAG, "${SIDES[side]} Joy-Con \"${device.name}\" (id ${device.id}) is a VR controller") + return hand + } + + private inner class Hand( + val side: Int, + val device: InputDevice, + private val sensors: SensorManager, + private val out: JoyConShm, + ) : SensorEventListener { + private val filter = JoyConOrientation() + private val motion = JoyConMotion() + private val calibration = JoyConAccelCalibration().apply { restore(JoyConCalibrations.load(context, device.descriptor)) } + private val reports = JoyConReports() + private val accel = FloatArray(3) + private var accelStamp = 0L + private var haveAccel = false + private val pressed = HashSet<Int>() + private var stickX = 0f + private var stickY = 0f + private var systemDown = false + private var systemTap = false + private var held = false + private var recenter = 0 + private var battery = -1f + private var charging = false + private var batteryAt = 0L + private var sampleAt = 0L + private var live = true + private val hold = Runnable { + if (!systemDown || held) return@Runnable + held = true + recenter() + } + private val tapEnd = Runnable { + systemTap = false + publish() + } + private val flush = Runnable { flushReport() } + + override fun onSensorChanged(event: SensorEvent) { + if (!live) return + when (event.sensor.type) { + Sensor.TYPE_ACCELEROMETER -> { + if (event.timestamp == accelStamp) return + accelStamp = event.timestamp + event.values.copyInto(accel, 0, 0, 3) + haveAccel = true + } + Sensor.TYPE_GYROSCOPE -> { + if (!haveAccel) return + reports.add(accel, event.values, System.nanoTime()) + worker.removeCallbacks(flush) + if (reports.size >= JoyConReports.SAMPLES_PER_REPORT) flushReport() else worker.postDelayed(flush, FLUSH_MS) + } + } + } + + private fun flushReport() { + val samples = reports.flush() + if (samples.isEmpty() || !live) return + for (sample in samples) { + val raw = JoyConOrientation.axes(sample.accel) + val corrected = calibration.correct(raw) + filter.update(corrected, JoyConOrientation.axes(sample.gyro), sample.dt) + if (!filter.ready) continue + motion.update(filter.rotation, corrected, filter.rate, calibration.ready, sample.dt) + if (motion.resting && calibration.addResting(raw)) JoyConCalibrations.save(context, device.descriptor, calibration.saved()) + } + val now = System.nanoTime() + sampleAt = now + if (now - batteryAt > BATTERY_NS) refreshBattery(now) + publish() + } + + override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) = Unit + + fun key(scanCode: Int, down: Boolean) { + if (!live) return + val bit = JoyCon.vrButton(side, scanCode) + if (bit == 0) return + if (bit == JoyCon.VR_SYSTEM) { + system(down) + return + } + if (down) pressed += scanCode else pressed -= scanCode + publish() + } + + fun stick(x: Float, y: Float) { + if (!live) return + val length = sqrt(x * x + y * y) + if (length < STICK_DEADZONE) { + stickX = 0f + stickY = 0f + } else { + val scale = min((length - STICK_DEADZONE) / (1f - STICK_DEADZONE), 1f) / length + stickX = x * scale + stickY = y * scale + } + publish() + } + + fun release() { + if (!live) return + pressed.clear() + stickX = 0f + stickY = 0f + systemDown = false + systemTap = false + held = false + worker.removeCallbacks(hold) + worker.removeCallbacks(tapEnd) + publish() + } + + fun recenter() { + if (!live) return + recenter++ + confirm() + publish() + } + + fun stop() { + live = false + runCatching { sensors.unregisterListener(this) } + worker.removeCallbacks(hold) + worker.removeCallbacks(tapEnd) + worker.removeCallbacks(flush) + out.write(side, JoyConShm.Hand(connected = false)) + Log.i(TAG, "${SIDES[side]} Joy-Con \"${device.name}\" (id ${device.id}) is a game pad again") + } + + private fun system(down: Boolean) { + if (down == systemDown) return + systemDown = down + if (down) { + held = false + worker.postDelayed(hold, HOLD_MS) + return + } + worker.removeCallbacks(hold) + if (held) return + systemTap = true + publish() + worker.removeCallbacks(tapEnd) + worker.postDelayed(tapEnd, TAP_MS) + } + + private fun buttons(): Int { + var bits = if (systemTap) JoyCon.VR_SYSTEM else 0 + for (scanCode in pressed) bits = bits or JoyCon.vrButton(side, scanCode) + return bits + } + + private fun publish() { + out.write(side, JoyConShm.Hand( + connected = filter.ready, + charging = charging, + buttons = buttons(), + rotation = filter.rotation, + rate = filter.rate, + displacement = motion.displacement, + velocity = motion.velocity, + inertial = motion.inertial, + stickX = stickX, + stickY = stickY, + battery = battery, + recenter = recenter, + timeNs = sampleAt, + )) + } + + private fun refreshBattery(now: Long) { + batteryAt = now + val state = runCatching { device.batteryState }.getOrNull() ?: return + battery = if (state.isPresent && !state.capacity.isNaN()) state.capacity else -1f + charging = state.isPresent && state.status == BatteryState.STATUS_CHARGING + } + + private fun confirm() { + if (!ControllerPrefs.rumbleEnabled(context)) return + runCatching { + device.vibratorManager.vibrate(CombinedVibration.createParallel( + VibrationEffect.createOneShot(CONFIRM_MS, VibrationEffect.DEFAULT_AMPLITUDE))) + } + } + } + + companion object { + const val FILE = JoyConShm.FILE + private const val TAG = "JoyConVr" + private val SIDES = arrayOf("left", "right") + private const val MAX_RETRIES = 6 + private const val RETRY_MS = 500L + private const val HOLD_MS = 800L + private const val TAP_MS = 120L + private const val CONFIRM_MS = 80L + private const val BATTERY_NS = 30_000_000_000L + private const val STICK_DEADZONE = 0.12f + private const val FLUSH_MS = 3L + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/input/KeyboardHost.kt b/app/src/main/java/com/droiddeck/launcher/input/KeyboardHost.kt index 48e54c7918..494533f434 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/KeyboardHost.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/KeyboardHost.kt @@ -2,26 +2,17 @@ package com.droiddeck.launcher.input import android.app.Activity import android.content.Context +import android.os.Build import android.text.InputType import android.view.KeyCharacterMap import android.view.KeyEvent import android.view.View +import android.view.WindowInsets import android.view.inputmethod.BaseInputConnection import android.view.inputmethod.EditorInfo import android.view.inputmethod.InputConnection import android.view.inputmethod.InputMethodManager -/** - * A place for the soft keyboard to land. Steam's UI and the games under it are X11 clients of - * gamescope and know nothing of Wayland text input, so everything the keyboard produces has to - * become key events: what the IME commits as text is turned into the key presses that would have - * typed it (Shift included, from the key character map), and handed to the activity, whose key - * path turns them into evdev codes for the compositor. Backspace, Enter and the keys an IME sends - * directly go the same way. - * - * Invisible and unfocusable until asked for: a focused View would take D-pad and stick motion - * away from the pad. - */ class KeyboardHost( context: Context, private val sendKeyEvent: (KeyEvent) -> Boolean, @@ -36,7 +27,7 @@ class KeyboardHost( init { isFocusable = false isFocusableInTouchMode = false - visibility = VISIBLE // present in the tree, draws nothing + visibility = VISIBLE layoutParams = android.widget.FrameLayout.LayoutParams(1, 1) } @@ -44,8 +35,6 @@ class KeyboardHost( override fun onCreateInputConnection(outAttrs: EditorInfo): InputConnection? { if (!shown) return null - // No suggestions and no autocorrect: the keyboard sends what was pressed, key by key, which - // is what a password field on the other side needs. outAttrs.inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS or InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD outAttrs.imeOptions = EditorInfo.IME_ACTION_NONE or EditorInfo.IME_FLAG_NO_FULLSCREEN or @@ -53,7 +42,10 @@ class KeyboardHost( return KeyConnection() } - fun toggle() = if (shown) hide() else show() + fun toggle() = if (shown && imeVisible()) hide() else show() + + private fun imeVisible() = Build.VERSION.SDK_INT < Build.VERSION_CODES.R || + rootWindowInsets?.isVisible(WindowInsets.Type.ime()) != false fun show() { shown = true @@ -75,9 +67,6 @@ class KeyboardHost( private inner class KeyConnection : BaseInputConnection(this, false) { override fun commitText(text: CharSequence?, newCursorPosition: Int): Boolean { if (text.isNullOrEmpty()) return true - // The key events that type this text on a US layout - a capital arrives as Shift - // down, the letter, Shift up. Characters the map cannot place are sent as a bare - // key event carrying the character, which the activity's key path works back from. val events = map.getEvents(text.toString().toCharArray()) if (events != null) { for (event in events) sendKeyEvent(event) @@ -120,7 +109,6 @@ class KeyboardHost( override fun getSelectedText(flags: Int): CharSequence? = null } - /** A key event that carries a character the key map could not place. */ private class CharKeyEvent(origin: KeyEvent, private val ch: Char) : KeyEvent(origin) { override fun getUnicodeChar(): Int = ch.code override fun getUnicodeChar(metaState: Int): Int = ch.code diff --git a/app/src/main/java/com/droiddeck/launcher/input/OnScreenControls.kt b/app/src/main/java/com/droiddeck/launcher/input/OnScreenControls.kt index 8c4de8858b..50ffb17a81 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/OnScreenControls.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/OnScreenControls.kt @@ -92,6 +92,7 @@ class OnScreenControls( private val groups = controls.map { it.group }.distinct() private var buttonsOnly = false + val isButtonsOnly: Boolean get() = buttonsOnly private var quickHidden = false private var quickPressedBy = -1 private var keyboardPressedBy = -1 @@ -183,7 +184,6 @@ class OnScreenControls( relayout() } - /** Hide the full touch pad for an unobstructed screen while keeping its quick toggle available. */ fun setQuickHidden(hidden: Boolean) { if (buttonsOnly || editing || quickHidden == hidden) return if (hidden) releaseAll() diff --git a/app/src/main/java/com/droiddeck/launcher/input/PadBridge.java b/app/src/main/java/com/droiddeck/launcher/input/PadBridge.java index 9eff5a89bf..f25c4d32f0 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/PadBridge.java +++ b/app/src/main/java/com/droiddeck/launcher/input/PadBridge.java @@ -13,31 +13,13 @@ import java.io.File; import java.util.Arrays; import java.util.concurrent.atomic.AtomicIntegerArray; -/** - * A physical controller, republished as a synthetic evdev device the Steam client can see. - * - * <p>Android hands a gamepad to the foreground activity as key and motion events; the Steam client - * inside the runtime never sees that. What it does scan is {@code /dev/input}, which the session's - * interposer (libfakeinput.so) serves out of the shared-memory rings written here. So the path is: - * Android event → {@link PadState} → {@link FakeInputWriter} ring → interposer → evdev node → - * SDL → Big Picture. - * - * <p>The identity the interposer reports is an Xbox 360 pad, which is what makes SDL apply a known - * mapping without the user configuring anything. In a Steam session it is a Steam Deck controller - * to the client instead ({@link com.droiddeck.launcher.session.SteamDeckPad}), which has a Quick - * Access button of its own; an Xbox pad has none, so there the client's menu is reached with the - * Guide-then-A chord the client itself answers. - * - * <p>Each further controller is another player: slots 1 to 3, an Xbox 360 pad each, which in a - * Steam session only the client reads (libfakeinput) and hands games through Steam Input. - */ public final class PadBridge { private static final String TAG = "PadBridge"; - /** Player slots: the session prepares a ring for each (SessionService). */ public static final int SLOTS = 4; private static final float DEAD_ZONE = 0.12f; private static final int[] JOYSTICK_AXES = { MotionEvent.AXIS_X, MotionEvent.AXIS_Y, MotionEvent.AXIS_Z, MotionEvent.AXIS_RZ, + MotionEvent.AXIS_RX, MotionEvent.AXIS_RY, MotionEvent.AXIS_HAT_X, MotionEvent.AXIS_HAT_Y, MotionEvent.AXIS_LTRIGGER, MotionEvent.AXIS_RTRIGGER, MotionEvent.AXIS_BRAKE, MotionEvent.AXIS_GAS }; @@ -48,18 +30,12 @@ public final class PadBridge { KeyEvent.KEYCODE_BUTTON_THUMBL, KeyEvent.KEYCODE_BUTTON_THUMBR, KeyEvent.KEYCODE_BUTTON_MODE, KeyEvent.KEYCODE_BUTTON_L2, KeyEvent.KEYCODE_BUTTON_R2 }; - // The client takes A as part of the chord only once it has had Guide held for a while, and a - // client starved of CPU needs longer. Too short, and it acts on A as well, selecting whatever it - // had focused before opening QAM: with 80 ms of lead that was 3 times in 20 at rest, and 250 ms - // none in 20; with the session down to 1 fps a fixed 400 ms still let 3 in 15 through, where - // 1000 ms let none. The lead keeps 80 ms when frames are quick, for a QAM that feels immediate, - // and stretches to eight frames when they are slow. + private static final int[] ROUTED_PASS_THROUGH = {PadState.GUIDE, PadState.QAM, PadState.SELECT}; private static final long QAM_GUIDE_LEAD_MIN_MS = 80; private static final long QAM_GUIDE_LEAD_MAX_MS = 1500; private static final int QAM_GUIDE_LEAD_FRAMES = 8; private static final long QAM_A_HOLD_MS = 200; private static final long QAM_GUIDE_TAIL_MS = 200; - // Off the main thread, so a busy UI cannot shorten or stretch the steps. private static final Handler chordHandler; static { android.os.HandlerThread thread = new android.os.HandlerThread("qam-chord", android.os.Process.THREAD_PRIORITY_DISPLAY); @@ -70,28 +46,27 @@ public final class PadBridge { private final File fakeInputDir; private final FakeInputWriter writer; private final PadState state = new PadState(); - /** The input device id holding each slot, or {@link #NO_CONTROLLER}. */ private final int[] owners = new int[SLOTS]; + private final int[] partners = new int[SLOTS]; + private volatile java.util.function.IntPredicate excluded = id -> false; private final FakeInputWriter[] playerWriters = new FakeInputWriter[SLOTS]; private final PadState[] playerStates = new PadState[SLOTS]; private final PadState effectiveState = new PadState(); private final Handler mainHandler = new Handler(Looper.getMainLooper()); private boolean open; private volatile boolean selectSteam; + private TouchRoute touchRoute; + private final PadState routedTouch = new PadState(); private boolean systemGuidePressed; private boolean systemQamPressed; private boolean qamChordActive; - private boolean qamSyntheticAPressed; - /** The Deck controller's Quick Access button, held for one tap. */ + private int chordButton = -1; + private boolean chordButtonPressed; private boolean qamTapPressed; private int qamChordGeneration; - /** Told on the main thread when a player uses the pad or the on-screen controls; see [setOnPlayerInput]. */ private volatile Runnable onPlayerInput; private final java.util.concurrent.atomic.AtomicBoolean playerInputPosted = new java.util.concurrent.atomic.AtomicBoolean(); - // What reached the pad over the last stats window, so a report of "the pad does nothing" or - // "touch and the pad don't work together" shows in the app log whether input arrived, from - // which device, and whether it got to the ring. Logged only for a window that had input. private static final long STATS_WINDOW_MS = 10_000; private int statButtons, statAxes, statOnScreen, statDropped; private String statDevice; @@ -99,39 +74,42 @@ public final class PadBridge { private final java.util.Set<Integer> seenDevices = new java.util.HashSet<>(); private int lastDeviceId = Integer.MIN_VALUE; - /** No physical controller is driving the pad: nothing yet, or the on-screen controls were last. */ public static final int NO_CONTROLLER = -1; - /** - * The Android input device id of the physical controller that last drove any slot, or - * {@link #NO_CONTROLLER}: where rumble goes when it names no slot of ours (RumbleComponent). - */ private static volatile int activeControllerId = NO_CONTROLLER; - /** Per slot, the controller its rumble belongs to; slot 0's is none while the on-screen controls lead. */ private static final AtomicIntegerArray slotControllers = new AtomicIntegerArray(SLOTS); + private static final AtomicIntegerArray slotJoyCons = new AtomicIntegerArray(SLOTS * 2); static { for (int slot = 0; slot < SLOTS; slot++) slotControllers.set(slot, NO_CONTROLLER); + for (int i = 0; i < SLOTS * 2; i++) slotJoyCons.set(i, NO_CONTROLLER); } public static int activeControllerId() { return activeControllerId; } - /** The controller playing in this ring slot, or the last one used for any other slot. */ public static int controllerForSlot(int slot) { return slot >= 0 && slot < SLOTS ? slotControllers.get(slot) : activeControllerId; } + public static int joyConForSlot(int slot, int side) { + return slot >= 0 && slot < SLOTS && (side == JoyCon.LEFT || side == JoyCon.RIGHT) + ? slotJoyCons.get(slot * 2 + side) : NO_CONTROLLER; + } + public PadBridge(File fakeInputDir) { this.fakeInputDir = fakeInputDir; writer = new FakeInputWriter(fakeInputDir.getAbsolutePath(), 0); Arrays.fill(owners, NO_CONTROLLER); + Arrays.fill(partners, NO_CONTROLLER); for (int slot = 1; slot < SLOTS; slot++) playerStates[slot] = new PadState(); } - /** The physical Select button opens the Steam menu instead of View/Select (Setup → Controller). */ public void setSelectSteam(boolean on) { selectSteam = on; } - /** Opens the ring; safe to call more than once. */ + public void setExcluded(java.util.function.IntPredicate devices) { + excluded = devices; + } + public synchronized boolean start() { if (!open) { open = writer.open(); @@ -141,10 +119,13 @@ public final class PadBridge { } public synchronized void stop() { + releaseBackPaddles(); activeControllerId = NO_CONTROLLER; for (int slot = 0; slot < SLOTS; slot++) { owners[slot] = NO_CONTROLLER; + partners[slot] = NO_CONTROLLER; slotControllers.set(slot, NO_CONTROLLER); + clearJoyCons(slot); if (playerWriters[slot] != null) { playerWriters[slot].destroy(); playerWriters[slot] = null; @@ -154,7 +135,7 @@ public final class PadBridge { systemGuidePressed = false; systemQamPressed = false; qamChordActive = false; - qamSyntheticAPressed = false; + chordButtonPressed = false; qamTapPressed = false; qamChordGeneration++; if (open) { @@ -165,19 +146,13 @@ public final class PadBridge { } } - /** True when the device this event came from is a gamepad or joystick, not the touchscreen. */ public static boolean isFromController(InputDevice device) { if (device == null) return false; - // A virtual device is the system's own synthetic input, not a pad somebody is holding - - // counting it would hide the on-screen controls with nothing to replace them. if (device.isVirtual()) return false; int sources = device.getSources(); if ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) return true; if ((sources & InputDevice.SOURCE_JOYSTICK) != InputDevice.SOURCE_JOYSTICK) return false; if (device.getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC) return true; - // Some composite keyboards advertise joystick input without any sticks or pad buttons. - // A keyboard's mouse ranges do not establish a joystick; a real hybrid's joystick ranges - // or physical controller buttons do. GAMEPAD above remains authoritative even with keys. for (int axis : JOYSTICK_AXES) { InputDevice.MotionRange range = device.getMotionRange(axis, InputDevice.SOURCE_JOYSTICK); if (range != null && range.getMax() > range.getMin()) return true; @@ -188,11 +163,9 @@ public final class PadBridge { return false; } - /** Whether this key belongs to the pad, rather than a keyboard on the same input device. */ public static boolean isControllerKeyEvent(KeyEvent event) { InputDevice device = event.getDevice(); if (device == null || device.isVirtual()) return false; - // An explicit pad button is unambiguous even when a hybrid omits its capabilities. if (KeyEvent.isGamepadButton(event.getKeyCode())) { return device.supportsSource(InputDevice.SOURCE_GAMEPAD) || device.supportsSource(InputDevice.SOURCE_JOYSTICK); @@ -206,9 +179,6 @@ public final class PadBridge { case KeyEvent.KEYCODE_MENU: case KeyEvent.KEYCODE_HOME: if (!isFromController(device)) return false; - // Without GAMEPAD, an alphabetic hybrid's keyboard arrows remain keyboard keys. - // Its ambiguous navigation keys need explicit pad/joystick event provenance; - // DPAD alone also describes ordinary keyboard arrows. return device.supportsSource(InputDevice.SOURCE_GAMEPAD) || device.getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC || event.isFromSource(InputDevice.SOURCE_GAMEPAD) @@ -217,17 +187,13 @@ public final class PadBridge { } } - /** Mouse motion on a composite controller still belongs to the pointer, not its sticks. */ public static boolean isControllerMotionEvent(MotionEvent event) { InputDevice device = event.getDevice(); - // An actual joystick event, like a pad button, survives a hybrid's missing capabilities. return event.isFromSource(InputDevice.SOURCE_JOYSTICK) && device != null && !device.isVirtual() && (device.supportsSource(InputDevice.SOURCE_GAMEPAD) || device.supportsSource(InputDevice.SOURCE_JOYSTICK)); } - /** A Bluetooth keyboard can share a device with a joystick. Classify the key, not just - * the device, so its letters and modifiers still reach the desktop keyboard. */ public static boolean isControllerKey(KeyEvent event) { return isFromController(event.getDevice()) && isPadKey(event.getKeyCode(), event.getDevice().getKeyboardType()); @@ -249,7 +215,6 @@ public final class PadBridge { } } - /** Whether any real controller is attached right now. */ public static boolean anyControllerConnected() { for (int id : InputDevice.getDeviceIds()) { if (isFromController(InputDevice.getDevice(id))) return true; @@ -257,11 +222,13 @@ public final class PadBridge { return false; } - /** - * Called (main thread) when a player presses a button, pushes a stick, trigger or d-pad past - * halfway, or uses the on-screen controls - the session hides its mouse cursor then. Resting - * sticks and trigger noise do not count. - */ + public synchronized void syncConnectedControllers() { + for (int deviceId : InputDevice.getDeviceIds()) { + InputDevice device = InputDevice.getDevice(deviceId); + if (isFromController(device) && !excluded.test(deviceId)) publish(slotFor(device)); + } + } + public void setOnPlayerInput(Runnable listener) { onPlayerInput = listener; } @@ -275,10 +242,11 @@ public final class PadBridge { }); } - /** @return true when the event was a pad button and has been consumed. */ public synchronized boolean onKeyEvent(KeyEvent event) { - if (!isControllerKeyEvent(event)) return false; + if (!isControllerKeyEvent(event) || excluded.test(event.getDeviceId())) return false; int slot = slotFor(event.getDevice()); + int side = JoyCon.side(event.getDevice()); + if (side >= 0 && partners[slot] != NO_CONTROLLER && JoyCon.isRail(side, event.getScanCode())) return true; PadState pad = stateFor(slot); boolean pressed = event.getAction() == KeyEvent.ACTION_DOWN; switch (event.getKeyCode()) { @@ -289,8 +257,6 @@ public final class PadBridge { case KeyEvent.KEYCODE_BUTTON_L1: pad.press(4, pressed); break; case KeyEvent.KEYCODE_BUTTON_R1: pad.press(5, pressed); break; case KeyEvent.KEYCODE_BUTTON_SELECT: - // Optionally (Setup → Controller) the physical Select button opens the Steam menu - // instead of View/Select: on some handhelds it sits next to the Steam button. if (selectSteam) pad.press(PadState.GUIDE, pressed); else pad.press(6, pressed); break; @@ -299,10 +265,14 @@ public final class PadBridge { case KeyEvent.KEYCODE_MENU: pad.press(7, pressed); break; case KeyEvent.KEYCODE_BUTTON_THUMBL: pad.press(8, pressed); break; case KeyEvent.KEYCODE_BUTTON_THUMBR: pad.press(9, pressed); break; - // The client's own in-game menu is opened by this one; the interposer publishes it as - // BTN_MODE, which SDL reports as the "guide" button. case KeyEvent.KEYCODE_BUTTON_MODE: case KeyEvent.KEYCODE_HOME: pad.press(PadState.GUIDE, pressed); break; + case KeyEvent.KEYCODE_BUTTON_Z: + if (isPrimary(event)) DeckControls.INSTANCE.setGrip(DeckControls.L4, pressed); + break; + case KeyEvent.KEYCODE_BUTTON_C: + if (isPrimary(event)) DeckControls.INSTANCE.setGrip(DeckControls.R4, pressed); + break; case KeyEvent.KEYCODE_BUTTON_L2: pad.leftTrigger = pressed ? 1f : 0f; break; case KeyEvent.KEYCODE_BUTTON_R2: pad.rightTrigger = pressed ? 1f : 0f; break; case KeyEvent.KEYCODE_DPAD_UP: pad.up = pressed; break; @@ -319,26 +289,38 @@ public final class PadBridge { return true; } - /** @return true when the event was a pad's sticks/triggers and has been consumed. */ public synchronized boolean onMotionEvent(MotionEvent event) { - if (!isControllerMotionEvent(event)) return false; + if (!isControllerMotionEvent(event) || excluded.test(event.getDeviceId())) return false; if (event.getAction() != MotionEvent.ACTION_MOVE) return false; int slot = slotFor(event.getDevice()); PadState pad = stateFor(slot); noteDevice(event.getDevice(), slot); statAxes++; scheduleStats(); + InputDevice device = event.getDevice(); + int side = JoyCon.side(device); + if (side >= 0) { + int[] stick = JoyCon.stickAxes(side, device, event.getSource()); + float x = axis(event, stick[0]); + float y = axis(event, stick[1]); + if (side == JoyCon.LEFT) { + pad.leftX = x; + pad.leftY = y; + } else { + pad.rightX = x; + pad.rightY = y; + } + if (Math.max(Math.abs(x), Math.abs(y)) > 0.5f) notePlayerInput(); + publish(slot); + return true; + } pad.leftX = axis(event, MotionEvent.AXIS_X); - // Android's Y axis grows downwards and evdev's ABS_Y does too, so no flip here: what the - // pad reports as "down" is what the client is told. pad.leftY = axis(event, MotionEvent.AXIS_Y); - pad.rightX = axis(event, MotionEvent.AXIS_Z); - pad.rightY = axis(event, MotionEvent.AXIS_RZ); - float lt = event.getAxisValue(MotionEvent.AXIS_LTRIGGER); - float rt = event.getAxisValue(MotionEvent.AXIS_RTRIGGER); - // Some pads only report the triggers on BRAKE/GAS. - if (lt == 0f) lt = event.getAxisValue(MotionEvent.AXIS_BRAKE); - if (rt == 0f) rt = event.getAxisValue(MotionEvent.AXIS_GAS); + boolean wired = wiredXboxLayout(event); + pad.rightX = rightX(event, wired); + pad.rightY = rightY(event, wired); + float lt = leftTrigger(event, wired); + float rt = rightTrigger(event, wired); pad.leftTrigger = lt; pad.rightTrigger = rt; float hatX = event.getAxisValue(MotionEvent.AXIS_HAT_X); @@ -355,11 +337,36 @@ public final class PadBridge { return true; } - /** - * The on-screen controls' way in: they mutate the same state a physical pad writes, so the - * client only ever sees one device and a user can use both at once without them fighting. - */ + public interface TouchRoute { + boolean active(); + + void accept(PadState state); + } + + public synchronized void setTouchRoute(TouchRoute route) { + touchRoute = route; + routedTouch.clear(); + } + public synchronized void applyTouch(java.util.function.Consumer<PadState> mutation) { + if (touchRoute != null && touchRoute.active()) { + mutation.accept(routedTouch); + touchRoute.accept(routedTouch); + boolean changed = false; + for (int button : ROUTED_PASS_THROUGH) { + boolean down = routedTouch.isDown(button); + if (state.isDown(button) == down) continue; + state.press(button, down); + changed = true; + } + if (changed) { + activeControllerId = NO_CONTROLLER; + slotControllers.set(0, NO_CONTROLLER); + publish(); + } + return; + } + routedTouch.clear(); mutation.accept(state); activeControllerId = NO_CONTROLLER; slotControllers.set(0, NO_CONTROLLER); @@ -369,12 +376,6 @@ public final class PadBridge { publish(); } - /** - * A controller the app reads itself rather than through Android's input (the Steam Controller - * over Bluetooth, SteamControllerBle): its whole state, merged into the one exported slot as a - * physical pad's events are. Android has no device for it, so a game's rumble cannot reach it. - * It streams its state whether or not anything moved; {@code changed} is whether this one did. - */ public synchronized void applyExternal(java.util.function.Consumer<PadState> mutation, boolean changed) { mutation.accept(state); if (changed) { @@ -386,22 +387,18 @@ public final class PadBridge { publish(); } - /** Touch-only Steam and QAM buttons, merged with physical input without changing its state. */ public synchronized void setSystemButtons(boolean guidePressed, boolean qamPressed) { if (systemGuidePressed == guidePressed && systemQamPressed == qamPressed) return; boolean qamStarted = qamPressed && !systemQamPressed; systemGuidePressed = guidePressed; systemQamPressed = qamPressed; - // A Deck controller's QAM button is held for as long as the touch one is. - if (qamStarted && !SessionState.getDeckPad()) startQamChord(); + if (qamStarted && !nativeQam()) startChord(PadState.A); else publish(); } - /** - * Everything released and centred - for when the controller stops feeding the game (the - * session drawer opened), so a button or stick held at that moment is not left down in it. - */ public synchronized void releaseAll() { + routedTouch.clear(); + releaseBackPaddles(); state.clear(); publish(); for (int slot = 1; slot < SLOTS; slot++) { @@ -411,17 +408,19 @@ public final class PadBridge { } } - /** A controller went away: its player's buttons are let go, and a further player's pad is unplugged. */ public synchronized void onDeviceRemoved(int deviceId) { for (int slot = 0; slot < SLOTS; slot++) { - if (owners[slot] == deviceId) free(slot); + if (owners[slot] == deviceId || partners[slot] == deviceId) leave(slot, deviceId); } } - /** Opens the client's Quick Access menu: a tap of the Deck's button, or the Guide-then-A chord. */ + private static boolean nativeQam() { + return SessionState.getDeckPad() && FakeInputWriter.padHasQam(); + } + public synchronized void triggerQam() { - if (!SessionState.getDeckPad()) { - startQamChord(); + if (!nativeQam()) { + startChord(PadState.A); return; } if (qamTapPressed) return; @@ -437,12 +436,17 @@ public final class PadBridge { publish(); } - private void startQamChord() { + public synchronized void triggerSteamKeyboard() { + startChord(PadState.X); + } + + private void startChord(int button) { if (qamChordActive) return; qamChordActive = true; + chordButton = button; int generation = ++qamChordGeneration; publish(); - chordHandler.postDelayed(() -> pressQamA(generation), qamGuideLeadMs()); + chordHandler.postDelayed(() -> pressChordButton(generation), qamGuideLeadMs()); } static long qamGuideLeadMs() { @@ -451,16 +455,16 @@ public final class PadBridge { return Math.max(QAM_GUIDE_LEAD_MIN_MS, Math.min(QAM_GUIDE_LEAD_MAX_MS, frame * QAM_GUIDE_LEAD_FRAMES)); } - private synchronized void pressQamA(int generation) { + private synchronized void pressChordButton(int generation) { if (generation != qamChordGeneration || !qamChordActive) return; - qamSyntheticAPressed = true; + chordButtonPressed = true; publish(); - chordHandler.postDelayed(() -> releaseQamA(generation), QAM_A_HOLD_MS); + chordHandler.postDelayed(() -> releaseChordButton(generation), QAM_A_HOLD_MS); } - private synchronized void releaseQamA(int generation) { + private synchronized void releaseChordButton(int generation) { if (generation != qamChordGeneration || !qamChordActive) return; - qamSyntheticAPressed = false; + chordButtonPressed = false; publish(); chordHandler.postDelayed(() -> releaseQamGuide(generation), QAM_GUIDE_TAIL_MS); } @@ -471,15 +475,28 @@ public final class PadBridge { publish(); } - /** The slot this controller plays in: the one it has, else the first free one, else player 1's. */ private int slotFor(InputDevice device) { int id = device.getId(); - if (owners[0] == id) return 0; + if (owners[0] == id || partners[0] == id) return 0; for (int slot = 1; slot < SLOTS; slot++) { - if (owners[slot] == id) return slot; + if (owners[slot] == id || partners[slot] == id) return slot; } for (int slot = 0; slot < SLOTS; slot++) { - if (owners[slot] != NO_CONTROLLER && InputDevice.getDevice(owners[slot]) == null) free(slot); + if (partners[slot] != NO_CONTROLLER && InputDevice.getDevice(partners[slot]) == null) leave(slot, partners[slot]); + if (owners[slot] != NO_CONTROLLER && InputDevice.getDevice(owners[slot]) == null) leave(slot, owners[slot]); + } + int side = JoyCon.side(device); + for (int slot = 0; side >= 0 && slot < SLOTS; slot++) { + if (owners[slot] == NO_CONTROLLER || partners[slot] != NO_CONTROLLER) continue; + InputDevice owner = InputDevice.getDevice(owners[slot]); + if (JoyCon.side(owner) != 1 - side) continue; + partners[slot] = id; + slotJoyCons.set(slot * 2 + side, id); + slotJoyCons.set(slot * 2 + 1 - side, owner.getId()); + if (slot == 0) releaseBackPaddles(); + stateFor(slot).clear(); + Log.i(TAG, "\"" + device.getName() + "\" (id " + id + ") joins \"" + owner.getName() + "\" as player " + (slot + 1)); + return slot; } for (int slot = 0; slot < SLOTS; slot++) { if (owners[slot] != NO_CONTROLLER) continue; @@ -494,11 +511,45 @@ public final class PadBridge { return slot == 0 ? state : playerStates[slot]; } + private boolean isPrimary(KeyEvent event) { + int id = event.getDevice().getId(); + return owners[0] == id || partners[0] == id; + } + + private void releaseBackPaddles() { + DeckControls.INSTANCE.setGrip(DeckControls.L4, false); + DeckControls.INSTANCE.setGrip(DeckControls.R4, false); + } + + private void leave(int slot, int id) { + if (partners[slot] == NO_CONTROLLER) { + free(slot); + return; + } + Log.i(TAG, "player " + (slot + 1) + " Joy-Con (id " + id + ") left"); + if (owners[slot] == id) owners[slot] = partners[slot]; + partners[slot] = NO_CONTROLLER; + clearJoyCons(slot); + if (slotControllers.get(slot) == id) slotControllers.set(slot, owners[slot]); + if (activeControllerId == id) activeControllerId = owners[slot]; + if (slot == 0) releaseBackPaddles(); + stateFor(slot).clear(); + publish(slot); + } + + private static void clearJoyCons(int slot) { + slotJoyCons.set(slot * 2, NO_CONTROLLER); + slotJoyCons.set(slot * 2 + 1, NO_CONTROLLER); + } + private void free(int slot) { Log.i(TAG, "player " + (slot + 1) + " (id " + owners[slot] + ") left"); owners[slot] = NO_CONTROLLER; + partners[slot] = NO_CONTROLLER; + clearJoyCons(slot); slotControllers.set(slot, NO_CONTROLLER); if (slot == 0) { + releaseBackPaddles(); state.clear(); publish(); return; @@ -510,7 +561,6 @@ public final class PadBridge { } } - /** Per event, so the common case - the same pad as last time - is a single compare. */ private void noteDevice(InputDevice device, int slot) { activeControllerId = device.getId(); slotControllers.set(slot, device.getId()); @@ -563,7 +613,7 @@ public final class PadBridge { return; } boolean guide = systemGuidePressed || qamChordActive; - boolean qam = SessionState.getDeckPad() && (systemQamPressed || qamTapPressed); + boolean qam = nativeQam() && (systemQamPressed || qamTapPressed); if (!guide && !qam) { writer.writePad(state); return; @@ -571,10 +621,41 @@ public final class PadBridge { effectiveState.copyFrom(state); if (guide) effectiveState.press(PadState.GUIDE, true); if (qam) effectiveState.press(PadState.QAM, true); - if (qamSyntheticAPressed) effectiveState.press(PadState.A, true); + if (chordButtonPressed) effectiveState.press(chordButton, true); writer.writePad(effectiveState); } + public static boolean wiredXboxLayout(MotionEvent event) { + InputDevice device = event.getDevice(); + return device != null + && ((device.getVendorId() == 0x20d6 && device.getProductId() == 0x2063) + || (device.getVendorId() == 0x0e6f && device.getProductId() == 0x02f0)) + && device.getMotionRange(MotionEvent.AXIS_RX, event.getSource()) != null + && device.getMotionRange(MotionEvent.AXIS_RY, event.getSource()) != null + && device.getMotionRange(MotionEvent.AXIS_Z, event.getSource()) != null + && device.getMotionRange(MotionEvent.AXIS_RZ, event.getSource()) != null; + } + + public static float rightX(MotionEvent event, boolean wired) { + return axis(event, wired ? MotionEvent.AXIS_RX : MotionEvent.AXIS_Z); + } + + public static float rightY(MotionEvent event, boolean wired) { + return axis(event, wired ? MotionEvent.AXIS_RY : MotionEvent.AXIS_RZ); + } + + public static float leftTrigger(MotionEvent event, boolean wired) { + if (wired) return Math.max(0f, Math.min(1f, (event.getAxisValue(MotionEvent.AXIS_Z) + 1f) / 2f)); + float value = event.getAxisValue(MotionEvent.AXIS_LTRIGGER); + return value != 0f ? value : event.getAxisValue(MotionEvent.AXIS_BRAKE); + } + + public static float rightTrigger(MotionEvent event, boolean wired) { + if (wired) return Math.max(0f, Math.min(1f, (event.getAxisValue(MotionEvent.AXIS_RZ) + 1f) / 2f)); + float value = event.getAxisValue(MotionEvent.AXIS_RTRIGGER); + return value != 0f ? value : event.getAxisValue(MotionEvent.AXIS_GAS); + } + private static float axis(MotionEvent event, int axis) { float value = event.getAxisValue(axis); return Math.abs(value) < DEAD_ZONE ? 0f : value; diff --git a/app/src/main/java/com/droiddeck/launcher/input/PadMotion.kt b/app/src/main/java/com/droiddeck/launcher/input/PadMotion.kt index 7058bf3002..bc640507a2 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/PadMotion.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/PadMotion.kt @@ -11,31 +11,14 @@ import android.util.Log import android.view.Surface import kotlin.math.roundToInt -/** - * The handheld's own gyro and accelerometer, as the Steam Deck controller's (SteamDeckPad). - * - * The phone is the controller's body, so its motion sensors are the ones a Deck's would be. Android - * reports them in the device's natural orientation; they are turned to the screen as it is shown - * (x right, y up, z towards the player - SDL's frame for a gamepad), then to the Deck's own axes - * and units as SDL's Deck driver undoes them (SDL_hidapi_steamdeck.c): X right, Y away from the - * player, Z up; 1 g = 16384, 2000 °/s = 32768. The Steam client calibrates the gyro itself. - * - * Sensors run only while the session is on screen with the pad a Deck controller, and the client - * wants motion (see [follow]), sampled as often as the Deck reports (4 ms); each reading goes - * straight into the pad's ring ([FakeInputWriter.writeMotion]), where libfakeinput's 4 ms report - * picks up the latest. - */ class PadMotion(private val context: Context, private val rotation: () -> Int) : SensorEventListener { private val sensors = context.getSystemService(SensorManager::class.java) private var thread: HandlerThread? = null - /** Readings are taken only while this is set; a callback already queued when [stop] ran drops. */ @Volatile private var active = false - // Touched only on the worker thread. private val accel = ShortArray(3) private val gyro = ShortArray(3) private var reading = false private var idlePolls = 0 - // Asking the display costs more than the rest of a reading, which arrives every 2 ms. private var turn = Surface.ROTATION_0 private var turnAt = 0L @@ -65,8 +48,6 @@ class PadMotion(private val context: Context, private val rotation: () -> Int) : val worker = thread ?: return thread = null active = false - // On the worker, after any poll or reading already queued there, so nothing registers again - // or overwrites the still controller. Handler(worker.looper).post { sensors?.unregisterListener(this) reading = false @@ -76,12 +57,6 @@ class PadMotion(private val context: Context, private val rotation: () -> Int) : worker.quitSafely() } - /** - * Reads the sensors while the client wants motion: the Deck's IMU mode (unknown counts as - * wanted), or Steam's touch controls asking for gyro. A game whose layout has no gyro turns the - * mode off; Steam's own menus keep it on. The client also turns it off and on again for a few - * ms whenever it re-applies a layout, so the sensors stop only after two polls without it. - */ private fun follow(handler: Handler, gyroscope: Sensor?, accelerometer: Sensor?) { val touch = SteamTouchDevice.current val wanted = FakeInputWriter.readImuMode(SLOT) != 0 || @@ -101,7 +76,6 @@ class PadMotion(private val context: Context, private val rotation: () -> Int) : } } - /** A still controller, not one frozen mid-turn. */ private fun still() { gyro.fill(0) FakeInputWriter.writeMotion(SLOT, accel, gyro) @@ -115,7 +89,6 @@ class PadMotion(private val context: Context, private val rotation: () -> Int) : turn = rotation() turnAt = event.timestamp } - // Natural orientation to the screen's: Android's display-rotation transform. val x: Float val y: Float when (turn) { @@ -132,7 +105,6 @@ class PadMotion(private val context: Context, private val rotation: () -> Int) : Sensor.TYPE_ACCELEROMETER -> { target = accel; scale = ACCEL_COUNTS_PER_M_S2 } else -> return } - // Screen frame (right, up, towards the player) to the Deck's (right, away, up). target[0] = counts(x * scale) target[1] = counts(-z * scale) target[2] = counts(y * scale) @@ -146,11 +118,8 @@ class PadMotion(private val context: Context, private val rotation: () -> Int) : companion object { private const val TAG = "PadMotion" - /** The pad the Deck controller is made from (PadBridge's slot). */ private const val SLOT = 0 - /** The Deck controller's report interval (libfakeinput: DECK_REPORT_INTERVAL_US). */ private const val SAMPLING_US = 4000 - /** How often [follow] checks whether the client wants motion. */ private const val POLL_MS = 500L private const val ROTATION_REFRESH_NS = 250_000_000L private const val ACCEL_COUNTS_PER_M_S2 = 16384f / SensorManager.GRAVITY_EARTH diff --git a/app/src/main/java/com/droiddeck/launcher/input/PadMouse.kt b/app/src/main/java/com/droiddeck/launcher/input/PadMouse.kt new file mode 100644 index 0000000000..77fb4f6fd9 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/input/PadMouse.kt @@ -0,0 +1,358 @@ +package com.droiddeck.launcher.input + +import android.os.SystemClock +import android.view.Choreographer +import android.view.KeyEvent +import android.view.MotionEvent +import kotlin.math.abs +import kotlin.math.hypot + +class PadMouse(private val listener: Listener, private val clock: () -> Long = SystemClock::uptimeMillis) { + interface Listener { + fun active(): Boolean + fun onScrollStart() + fun onScroll(dx: Float, dy: Float) + fun onKey(evdev: Int, pressed: Boolean) + fun onKeyboard() + fun onNavigate() + fun scrollSpeed(): Float + } + + private class Sticks { + var leftX = 0f + var leftY = 0f + var rightX = 0f + var rightY = 0f + var leftTrigger = 0f + var rightTrigger = 0f + + fun clear() { + leftX = 0f + leftY = 0f + rightX = 0f + rightY = 0f + leftTrigger = 0f + rightTrigger = 0f + } + } + + private val choreographer = Choreographer.getInstance() + private val physical = HashMap<Int, Sticks>() + private val touch = Sticks() + private val total = Sticks() + private val triggerAxes = HashMap<Int, Boolean>() + private val wiredLayout = HashMap<Int, Boolean>() + private val down = HashMap<Int, MutableSet<Int>>() + private val sent = HashMap<Int, IntArray>() + private val held = LinkedHashMap<Int, Int>() + private var scrolling = false + private var stickDirection = NONE + private var stickRepeatAt = 0L + private var frameAt = 0L + private var running = false + + private val frame = object : Choreographer.FrameCallback { + override fun doFrame(frameTimeNanos: Long) { + if (!running) return + if (!listener.active()) { + reset() + return + } + val dt = if (frameAt == 0L) 1f / 60f else ((frameTimeNanos - frameAt) / 1e9f).coerceIn(0f, 0.05f) + frameAt = frameTimeNanos + step(dt) + if (moving()) choreographer.postFrameCallback(this) else stop() + } + } + + fun onKey(event: KeyEvent): Boolean { + if (event.keyCode == KeyEvent.KEYCODE_BUTTON_L2 || event.keyCode == KeyEvent.KEYCODE_BUTTON_R2) { + if (event.repeatCount == 0 && !hasTriggerAxes(event)) { + val sticks = physical.getOrPut(event.deviceId) { Sticks() } + val value = if (event.action == KeyEvent.ACTION_DOWN) 1f else 0f + if (event.keyCode == KeyEvent.KEYCODE_BUTTON_L2) sticks.leftTrigger = value else sticks.rightTrigger = value + wake() + } + return true + } + val button = BUTTONS[event.keyCode] ?: return false + if (event.repeatCount > 0) return true + when (event.action) { + KeyEvent.ACTION_DOWN -> set(source(event.deviceId, SOURCE_KEYS), button, true) + KeyEvent.ACTION_UP -> set(source(event.deviceId, SOURCE_KEYS), button, false) + } + return true + } + + fun onMotion(event: MotionEvent): Boolean { + if (event.actionMasked != MotionEvent.ACTION_MOVE) return true + val sticks = physical.getOrPut(event.deviceId) { Sticks() } + val wired = wiredLayout.getOrPut(event.deviceId) { PadBridge.wiredXboxLayout(event) } + sticks.leftX = event.getAxisValue(MotionEvent.AXIS_X) + sticks.leftY = event.getAxisValue(MotionEvent.AXIS_Y) + sticks.rightX = PadBridge.rightX(event, wired) + sticks.rightY = PadBridge.rightY(event, wired) + if (hasTriggerAxes(event)) { + sticks.leftTrigger = PadBridge.leftTrigger(event, wired) + sticks.rightTrigger = PadBridge.rightTrigger(event, wired) + } + val hatX = event.getAxisValue(MotionEvent.AXIS_HAT_X) + val hatY = event.getAxisValue(MotionEvent.AXIS_HAT_Y) + val hat = source(event.deviceId, SOURCE_HAT) + set(hat, UP, hatY < -0.5f) + set(hat, DOWN, hatY > 0.5f) + set(hat, LEFT, hatX < -0.5f) + set(hat, RIGHT, hatX > 0.5f) + wake() + return true + } + + fun onTouchPad(state: PadState) { + touch.leftX = state.leftX + touch.leftY = state.leftY + touch.rightX = state.rightX + touch.rightY = state.rightY + touch.leftTrigger = state.leftTrigger + touch.rightTrigger = state.rightTrigger + for (button in TOUCH_BUTTONS) { + set(SOURCE_TOUCH, button, state.isDown(button)) + } + set(SOURCE_TOUCH, UP, state.up) + set(SOURCE_TOUCH, DOWN, state.down) + set(SOURCE_TOUCH, LEFT, state.left) + set(SOURCE_TOUCH, RIGHT, state.right) + wake() + } + + fun reset() { + stop() + physical.clear() + triggerAxes.clear() + wiredLayout.clear() + touch.clear() + down.clear() + sent.clear() + stickDirection = NONE + scrolling = false + held.keys.toList().reversed().forEach { code -> + held.remove(code) + send(code, false) + } + } + + internal fun step(dt: Float) { + sum() + val lx = total.leftX + val ly = total.leftY + val held = heldDirection() + val direction = when { + held != NONE -> held + hypot(lx, ly) < STICK_NAVIGATE -> NONE + abs(lx) > abs(ly) -> if (lx > 0) RIGHT else LEFT + else -> if (ly > 0) DOWN else UP + } + val now = clock() + if (direction != stickDirection) { + stickDirection = direction + if (direction != NONE) { + tap(direction) + stickRepeatAt = now + REPEAT_FIRST_MS + } + } else if (direction != NONE && now >= stickRepeatAt) { + tap(direction) + stickRepeatAt = now + REPEAT_MS + } + val gain = gain(total.rightX, total.rightY) + val sx = total.rightX * gain + val triggers = trigger(total.rightTrigger) - trigger(total.leftTrigger) + val vertical = (total.rightY * gain + triggers).coerceIn(-1f, 1f) + if (sx != 0f || vertical != 0f) { + if (!scrolling) { + scrolling = true + listener.onScrollStart() + } + val speed = listener.scrollSpeed() * dt + listener.onScroll(sx * speed, vertical * speed) + } else if (scrolling) { + scrolling = false + press(KEY_SETTLE) + release(KEY_SETTLE) + } + } + + private fun set(source: Int, button: Int, pressed: Boolean) { + val sources = down.getOrPut(button) { HashSet() } + val was = sources.isNotEmpty() + if (pressed) sources.add(source) else sources.remove(source) + val now = sources.isNotEmpty() + if (was == now) return + if (button in DIRECTIONS) { + if (now) step(0f) + wake() + return + } + if (now) { + if (button == PadState.Y) { + listener.onKeyboard() + return + } + val codes = codesFor(button) + sent[button] = codes + codes.forEach { press(it) } + } else { + sent.remove(button)?.reversed()?.forEach { release(it) } + } + } + + private fun hasTriggerAxes(event: android.view.InputEvent): Boolean = triggerAxes.getOrPut(event.deviceId) { + val device = event.device ?: return@getOrPut true + device.getMotionRange(MotionEvent.AXIS_LTRIGGER) != null || device.getMotionRange(MotionEvent.AXIS_BRAKE) != null || + (event is MotionEvent && wiredLayout.getOrPut(event.deviceId) { PadBridge.wiredXboxLayout(event) }) + } + + private fun heldDirection(): Int { + for (direction in DIRECTIONS) if (down[direction]?.isNotEmpty() == true) return direction + return NONE + } + + private fun sum() { + total.leftX = touch.leftX + total.leftY = touch.leftY + total.rightX = touch.rightX + total.rightY = touch.rightY + total.leftTrigger = touch.leftTrigger + total.rightTrigger = touch.rightTrigger + for (sticks in physical.values) { + total.leftX += sticks.leftX + total.leftY += sticks.leftY + total.rightX += sticks.rightX + total.rightY += sticks.rightY + total.leftTrigger += sticks.leftTrigger + total.rightTrigger += sticks.rightTrigger + } + } + + private fun tap(direction: Int) { + listener.onNavigate() + val codes = codesFor(direction) + codes.forEach { press(it) } + codes.reversed().forEach { release(it) } + } + + private fun codesFor(button: Int): IntArray = when (button) { + PadState.A -> intArrayOf(KEY_ENTER) + PadState.X -> intArrayOf(KEY_MENU) + PadState.B -> intArrayOf(KEY_ESC, KEY_BACK) + PadState.START -> intArrayOf(KEY_ENTER) + PadState.LB -> intArrayOf(KEY_LEFTCTRL, KEY_PAGEUP) + PadState.RB -> intArrayOf(KEY_LEFTCTRL, KEY_PAGEDOWN) + UP -> intArrayOf(KEY_UP) + DOWN -> intArrayOf(KEY_DOWN) + LEFT -> intArrayOf(KEY_LEFT) + RIGHT -> intArrayOf(KEY_RIGHT) + else -> IntArray(0) + } + + private fun wake() { + if (moving() && !running) { + running = true + frameAt = 0L + choreographer.postFrameCallback(frame) + } + } + + private fun moving(): Boolean { + if (heldDirection() != NONE || stickDirection != NONE || scrolling) return true + sum() + return hypot(total.leftX, total.leftY) >= STICK_NAVIGATE || gain(total.rightX, total.rightY) != 0f || + trigger(total.leftTrigger) != 0f || trigger(total.rightTrigger) != 0f + } + + private fun stop() { + running = false + frameAt = 0L + choreographer.removeFrameCallback(frame) + } + + private fun press(code: Int) { + val count = held[code] ?: 0 + held[code] = count + 1 + if (count == 0) send(code, true) + } + + private fun release(code: Int) { + val count = held[code] ?: return + if (count > 1) { + held[code] = count - 1 + return + } + held.remove(code) + send(code, false) + } + + private fun send(code: Int, pressed: Boolean) { + listener.onKey(code, pressed) + } + + companion object { + private const val DEAD_ZONE = 0.15f + private const val STICK_NAVIGATE = 0.5f + private const val REPEAT_FIRST_MS = 300L + private const val REPEAT_MS = 120L + private const val SOURCE_KEYS = 0 + private const val SOURCE_HAT = 1 + private const val SOURCE_TOUCH = Int.MIN_VALUE + private const val NONE = -1 + private const val UP = 100 + private const val DOWN = 101 + private const val LEFT = 102 + private const val RIGHT = 103 + private val DIRECTIONS = intArrayOf(UP, DOWN, LEFT, RIGHT) + private val TOUCH_BUTTONS = intArrayOf(PadState.A, PadState.B, PadState.X, PadState.Y, PadState.LB, PadState.RB, PadState.START) + private const val KEY_ESC = 1 + private const val KEY_ENTER = 28 + private const val KEY_UP = 103 + private const val KEY_LEFT = 105 + private const val KEY_RIGHT = 106 + private const val KEY_DOWN = 108 + private const val KEY_BACK = 158 + private const val KEY_LEFTCTRL = 29 + private const val KEY_PAGEUP = 104 + private const val KEY_PAGEDOWN = 109 + private const val KEY_MENU = 127 + private const val KEY_SETTLE = 183 + + private val BUTTONS = mapOf( + KeyEvent.KEYCODE_BUTTON_A to PadState.A, + KeyEvent.KEYCODE_BUTTON_B to PadState.B, + KeyEvent.KEYCODE_BUTTON_X to PadState.X, + KeyEvent.KEYCODE_BUTTON_Y to PadState.Y, + KeyEvent.KEYCODE_BUTTON_L1 to PadState.LB, + KeyEvent.KEYCODE_BUTTON_R1 to PadState.RB, + KeyEvent.KEYCODE_BUTTON_START to PadState.START, + KeyEvent.KEYCODE_DPAD_UP to UP, + KeyEvent.KEYCODE_DPAD_DOWN to DOWN, + KeyEvent.KEYCODE_DPAD_LEFT to LEFT, + KeyEvent.KEYCODE_DPAD_RIGHT to RIGHT, + ) + + internal fun curve(x: Float, y: Float): Pair<Float, Float> { + val gain = gain(x, y) + return x * gain to y * gain + } + + private fun gain(x: Float, y: Float): Float { + val length = hypot(x, y) + if (length <= DEAD_ZONE) return 0f + val scaled = (length.coerceAtMost(1f) - DEAD_ZONE) / (1f - DEAD_ZONE) + return scaled * scaled / length + } + + private fun source(deviceId: Int, kind: Int): Int = deviceId * 2 + kind + + + + private fun trigger(value: Float): Float = + if (value <= DEAD_ZONE) 0f else (value.coerceAtMost(1f) - DEAD_ZONE) / (1f - DEAD_ZONE) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/input/PadState.kt b/app/src/main/java/com/droiddeck/launcher/input/PadState.kt index c798b682f0..d337a2a320 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/PadState.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/PadState.kt @@ -1,11 +1,5 @@ package com.droiddeck.launcher.input -/** - * What one Xbox-shaped pad is doing right now: two sticks and two triggers as -1..1 / 0..1, the - * four d-pad directions, and a bitmask of the buttons numbered the way the fake evdev node - * reports them. Written by whatever drives the pad (a physical controller, the on-screen one, or - * both at once) and read by [FakeInputWriter] into the guest's input ring. - */ class PadState { @JvmField var leftX = 0f @JvmField var leftY = 0f @@ -25,7 +19,6 @@ class PadState { fun isDown(button: Int): Boolean = buttons and (1 shl button) != 0 - /** The d-pad as a hat: -1 left, 1 right; -1 up, 1 down. Opposites cancel to 0. */ fun hatX(): Int = if (right && !left) 1 else if (left && !right) -1 else 0 fun hatY(): Int = if (down && !up) 1 else if (up && !down) -1 else 0 @@ -36,7 +29,6 @@ class PadState { buttons = other.buttons } - /** Everything released and centred. */ fun clear() { leftX = 0f; leftY = 0f; rightX = 0f; rightY = 0f leftTrigger = 0f; rightTrigger = 0f @@ -55,9 +47,7 @@ class PadState { const val START = 7 const val L3 = 8 const val R3 = 9 - /** The Steam/Guide button, which the fake evdev node reports as BTN_MODE. */ const val GUIDE = 12 - /** The Quick Access button: a Deck controller's (SteamDeckPad) only, since an Xbox pad has none. */ const val QAM = 13 } } diff --git a/app/src/main/java/com/droiddeck/launcher/input/PointerGestures.kt b/app/src/main/java/com/droiddeck/launcher/input/PointerGestures.kt index 9183578d1e..dab9ff6528 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/PointerGestures.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/PointerGestures.kt @@ -7,25 +7,12 @@ import android.view.ViewConfiguration import kotlin.math.abs import kotlin.math.roundToInt -/** - * Touch as a mouse, the way a remote desktop does it: where you touch is where the pointer goes. - * - * - tap ............................ left click - * - drag ........................... moves the pointer, no button (hover) - * - hold, then lift ................ right click - * - hold, then drag ................ left-button drag (a window by its title bar, a selection) - * - two fingers up / down .......... scroll wheel - * - * The listener gets pointer positions in the view's pixels; the activity maps them onto the - * compositor. Mouse events are not handled here - a mouse has real buttons. - */ class PointerGestures( private val slopPx: Float, private val listener: Listener, ) { interface Listener { fun onMove(x: Float, y: Float) - /** [button] is an evdev code: BTN_LEFT, BTN_RIGHT. */ fun onButton(button: Int, pressed: Boolean, x: Float, y: Float) fun onWheel(steps: Int) fun onLongPress() @@ -36,8 +23,8 @@ class PointerGestures( private var downY = 0f private var downAt = 0L private var moved = false - private var held = false // the long press fired - private var dragging = false // left button down after a hold + private var held = false + private var dragging = false private var scrolling = false private var scrollAnchorY = 0f private val longPress = Runnable { @@ -55,7 +42,6 @@ class PointerGestures( return true } MotionEvent.ACTION_POINTER_DOWN -> { - // A second finger: scrolling, and whatever the first one was doing is off. handler.removeCallbacks(longPress) if (dragging) { listener.onButton(BTN_LEFT, false, event.x, event.y); dragging = false } scrolling = true @@ -67,7 +53,6 @@ class PointerGestures( val dy = event.getY(0) - scrollAnchorY val steps = (dy / SCROLL_STEP_PX).toInt() if (steps != 0) { - // Finger down = content up = wheel "up", which the compositor takes as negative. listener.onWheel(-steps) scrollAnchorY += steps * SCROLL_STEP_PX } @@ -77,7 +62,6 @@ class PointerGestures( moved = true handler.removeCallbacks(longPress) if (held) { - // Held, then moved: a drag with the left button, from where the hold was. dragging = true listener.onButton(BTN_LEFT, true, downX, downY) } diff --git a/app/src/main/java/com/droiddeck/launcher/input/ScrollTouchGestures.kt b/app/src/main/java/com/droiddeck/launcher/input/ScrollTouchGestures.kt new file mode 100644 index 0000000000..3bb1c9c1ec --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/input/ScrollTouchGestures.kt @@ -0,0 +1,190 @@ +package com.droiddeck.launcher.input + +import android.os.Handler +import android.os.Looper +import android.view.Choreographer +import android.view.MotionEvent +import android.view.VelocityTracker +import kotlin.math.abs +import kotlin.math.exp +import kotlin.math.floor +import kotlin.math.hypot +import kotlin.math.pow + +class ScrollTouchGestures( + private val slopPx: Float, + private val minFlingPx: Float, + private val listener: Listener, +) { + interface Listener { + fun onMove(x: Float, y: Float) + fun onButton(button: Int, pressed: Boolean) + fun onScroll(dx: Float, dy: Float) + fun onLongPress() + } + + private val handler = Handler(Looper.getMainLooper()) + private val choreographer = Choreographer.getInstance() + private var tracker: VelocityTracker? = null + private var pointerId = -1 + private var startX = 0f + private var startY = 0f + private var lastX = 0f + private var lastY = 0f + private var movedAt = 0L + private var scrolling = false + private var vertical = true + private var held = false + private var dragging = false + private var stoppedFling = false + private var clicked = 0 + private var flingX = 0f + private var flingY = 0f + private var flingAt = 0L + private var flinging = false + + private val longPress = Runnable { + held = true + listener.onLongPress() + } + private val clickUp = Runnable { releaseClick() } + private val flingFrame = object : Choreographer.FrameCallback { + override fun doFrame(frameTimeNanos: Long) { + if (!flinging) return + val dt = if (flingAt == 0L) 1f / 60f else ((frameTimeNanos - flingAt) / 1e9f).coerceIn(0f, 0.05f) + flingAt = frameTimeNanos + val decay = exp(-dt / FLING_TIME_S) + listener.onScroll(flingX * dt, flingY * dt) + flingX *= decay + flingY *= decay + if (hypot(flingX, flingY) < FLING_STOP_PX) flinging = false else choreographer.postFrameCallback(this) + } + } + + fun cancel() { + handler.removeCallbacks(longPress) + stopFling() + releaseClick() + if (dragging) listener.onButton(PointerGestures.BTN_LEFT, false) + dragging = false + held = false + scrolling = false + pointerId = -1 + tracker?.recycle() + tracker = null + } + + fun onTouch(event: MotionEvent): Boolean { + when (event.actionMasked) { + MotionEvent.ACTION_DOWN -> { + stoppedFling = flinging + cancel() + pointerId = event.getPointerId(0) + startX = event.x + startY = event.y + lastX = startX + lastY = startY + tracker = VelocityTracker.obtain().also { it.addMovement(event) } + listener.onMove(startX, startY) + handler.postDelayed(longPress, HOLD_MS) + } + MotionEvent.ACTION_MOVE -> { + val index = event.findPointerIndex(pointerId).takeIf { it >= 0 } ?: return true + tracker?.addMovement(event) + val x = event.getX(index) + val y = event.getY(index) + if (!scrolling && !dragging && hypot(x - startX, y - startY) > slopPx) { + handler.removeCallbacks(longPress) + if (held) { + dragging = true + listener.onButton(PointerGestures.BTN_LEFT, true) + } else { + scrolling = true + vertical = abs(y - startY) >= abs(x - startX) + lastX = startX + lastY = startY + } + } + if (dragging) listener.onMove(x, y) + follow(event, x, y) + } + MotionEvent.ACTION_POINTER_UP -> { + if (event.getPointerId(event.actionIndex) == pointerId) cancel() + } + MotionEvent.ACTION_UP -> { + handler.removeCallbacks(longPress) + if (pointerId == -1 || event.getPointerId(0) != pointerId) return true + tracker?.addMovement(event) + follow(event, event.x, event.y) + when { + scrolling -> tracker?.takeIf { event.eventTime - movedAt <= FLING_STILL_MS }?.let { t -> + t.computeCurrentVelocity(1000) + val vx = if (vertical) 0f else -t.getXVelocity(pointerId) + val vy = if (vertical) -t.getYVelocity(pointerId) else 0f + if (hypot(vx, vy) >= minFlingPx) startFling(vx, vy) + } + dragging -> listener.onButton(PointerGestures.BTN_LEFT, false) + held -> click(PointerGestures.BTN_RIGHT) + !stoppedFling -> click(PointerGestures.BTN_LEFT) + } + dragging = false + held = false + scrolling = false + pointerId = -1 + tracker?.recycle() + tracker = null + } + MotionEvent.ACTION_CANCEL -> cancel() + } + return true + } + + private fun follow(event: MotionEvent, x: Float, y: Float) { + if (!scrolling || (x == lastX && y == lastY)) return + movedAt = event.eventTime + if (vertical) listener.onScroll(0f, lastY - y) else listener.onScroll(lastX - x, 0f) + lastX = x + lastY = y + } + + private fun click(button: Int) { + releaseClick() + listener.onButton(button, true) + clicked = button + handler.postDelayed(clickUp, CLICK_MS) + } + + private fun releaseClick() { + handler.removeCallbacks(clickUp) + if (clicked != 0) listener.onButton(clicked, false) + clicked = 0 + } + + private fun startFling(vx: Float, vy: Float) { + flingX = vx + flingY = vy + flingAt = 0L + flinging = true + choreographer.postFrameCallback(flingFrame) + } + + private fun stopFling() { + flinging = false + choreographer.removeFrameCallback(flingFrame) + } + + companion object { + fun wheelUnits(pixels: Int, viewSize: Int): Int { + if (pixels == 0) return 0 + val step = floor(viewSize.toDouble().pow(2.0 / 3.0)).coerceAtLeast(1.0) + val units = (abs(pixels) * 120.0 / step).toInt() + 1 + return if (pixels < 0) -units else units + } + + private const val HOLD_MS = 500L + private const val CLICK_MS = 50L + private const val FLING_TIME_S = 0.45f + private const val FLING_STOP_PX = 40f + private const val FLING_STILL_MS = 60L + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/input/SecondScreenMode.kt b/app/src/main/java/com/droiddeck/launcher/input/SecondScreenMode.kt index de5f70d947..6789654f7a 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/SecondScreenMode.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/SecondScreenMode.kt @@ -5,18 +5,15 @@ import android.view.Display import androidx.annotation.StringRes import com.droiddeck.launcher.R -/** The control surface shown on a secondary Android display during a Linux session. */ enum class SecondScreenMode(val id: String, @StringRes val label: Int) { NONE("none", R.string.second_mode_none), KEYBOARD_TRACKPAD("keyboard-trackpad", R.string.second_mode_keyboard_trackpad), TERMINAL("terminal", R.string.second_mode_terminal), - /** The Steam Deck controller's back grips and trackpads; offered while the pad is one. */ DECK_CONTROLS("deck-controls", R.string.second_mode_deck_controls), } data class SecondScreenDisplay(val id: Int, val label: String) -/** The presentation-capable displays shared by the session controls and Android app launcher. */ object SecondScreenDisplays { fun available(displayManager: DisplayManager, primaryDisplayId: Int = Display.DEFAULT_DISPLAY): List<SecondScreenDisplay> = displayManager.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION) diff --git a/app/src/main/java/com/droiddeck/launcher/input/SessionClipboard.kt b/app/src/main/java/com/droiddeck/launcher/input/SessionClipboard.kt index faa6e1ace6..4ec08bcb41 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/SessionClipboard.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/SessionClipboard.kt @@ -11,7 +11,6 @@ import com.droiddeck.launcher.wayland.WaylandCompositor import java.io.File import java.io.IOException -/** Text selections shared by Android and the guest while the session is visible. */ class SessionClipboard(context: Context, private val hasFocus: () -> Boolean) { private val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager private val handler = Handler(Looper.getMainLooper()) @@ -20,8 +19,6 @@ class SessionClipboard(context: Context, private val hasFocus: () -> Boolean) { private val androidListener = ClipboardManager.OnPrimaryClipChangedListener { refresh() } private val guestListener = object : WaylandCompositor.ClipboardListener { override fun onGuestClipboardText(text: String) { - // Native callbacks arrive on the compositor thread. Do not publish a delayed callback - // after this activity has paused or been replaced. handler.post { if (active && hasFocus() && WaylandCompositor.isClipboardListener(this)) { val current = clipboard.primaryClip?.takeIf { it.itemCount > 0 }?.getItemAt(0)?.text @@ -49,11 +46,9 @@ class SessionClipboard(context: Context, private val hasFocus: () -> Boolean) { handler.removeCallbacksAndMessages(null) } - /** Android 10+ permits clipboard reads only with window focus. Resume can precede focus. */ fun refresh() { if (!active || !hasFocus()) return val clip = clipboard.primaryClip - // Only share literal text, never resolve content URIs or load copied files. if (clip == null) { publish(null) } else if (clip.itemCount > 0) { @@ -63,8 +58,6 @@ class SessionClipboard(context: Context, private val hasFocus: () -> Boolean) { private fun publish(text: String?) { WaylandCompositor.setClipboardText(text) - // Gamescope needs the same selection in its own Xwayland. Rename complete UTF-8 text - // into place so its helper never sees half a launch command. Kept in private app data. val pending = File(hostFile.parentFile, "android-clipboard.pending") try { hostFile.parentFile?.mkdirs() diff --git a/app/src/main/java/com/droiddeck/launcher/input/SteamControllerBle.kt b/app/src/main/java/com/droiddeck/launcher/input/SteamControllerBle.kt index 34357e48a8..ee84cffe46 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/SteamControllerBle.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/SteamControllerBle.kt @@ -18,20 +18,11 @@ import java.nio.ByteOrder import java.util.ArrayDeque import java.util.UUID -/** - * Reads the Steam Controller (2025, Triton) through its Valve BLE service. State reports remain - * native Triton packets and are published to the session's separate 28DE:1303 HID device. Steam's - * output reports travel back to their matching BLE characteristics, preserving grip capacitance, - * trackpads, sensors, and controller haptics without folding the controller into the Deck target. - * - * Lizard mode is refreshed while connected; when a session ends, the controller restores it itself. - */ -@SuppressLint("MissingPermission") // BLUETOOTH is granted at install below targetSdk 31 +@SuppressLint("MissingPermission") class SteamControllerBle(private val context: Context) { private val thread = HandlerThread("steam-controller-ble").apply { start() } private val handler = Handler(thread.looper) private val outputReports = mutableMapOf<Int, UUID>() - /** GATT allows one operation at a time: writes carry a value, a feature read none. */ private val queuedWrites = ArrayDeque<Pair<UUID, ByteArray?>>() private var gatt: BluetoothGatt? = null private var running = false @@ -42,10 +33,8 @@ class SteamControllerBle(private val context: Context) { private var discoveries = 0 private var outputSequence = 0L private var outputWritePending = false - /** The Steam client's feature read being answered, so the poll queues each one once. */ private var featureRead = 0L - /** Looks for a paired Steam Controller and keeps a connection to it until [stop]. */ fun start() = handler.post { if (running) return@post running = true @@ -53,7 +42,6 @@ class SteamControllerBle(private val context: Context) { connect() } - /** Lets the controller go (it returns to lizard mode by itself); this object is done after. */ fun stop() = handler.post { running = false handler.removeCallbacksAndMessages(null) @@ -118,7 +106,6 @@ class SteamControllerBle(private val context: Context) { if (running) handler.postDelayed(::connect, RETRY_MS) return } - // The Triton needs data length extensions, which Android enables for a large MTU. if (!g.requestMtu(517)) subscribe(g) } @@ -160,7 +147,6 @@ class SteamControllerBle(private val context: Context) { if (g === gatt) onFeatureRead(characteristic.value.takeIf { status == BluetoothGatt.GATT_SUCCESS }) } - // Android 13 hands the value over with the call; older ones only through the characteristic. override fun onCharacteristicChanged(g: BluetoothGatt, characteristic: BluetoothGattCharacteristic, value: ByteArray) { if (g === gatt && characteristic.uuid == input) onState(value) } @@ -177,8 +163,6 @@ class SteamControllerBle(private val context: Context) { if (service == null) { Log.w(TAG, "no Valve service on \"${g.device.name}\" (attempt ${discoveries + 1}); services: " + g.services.joinToString { it.uuid.toString().take(8) }) - // Android may answer from the service list its HID host cached, which can lack the - // vendor service: ask the controller again before giving up on it. if (++discoveries < 3) { refreshCache(g) handler.postDelayed({ if (g === gatt) g.discoverServices() }, 500) @@ -213,13 +197,11 @@ class SteamControllerBle(private val context: Context) { g.writeDescriptor(cccd) } - /** BluetoothGatt.refresh(): hidden, but used to drop stale service caches. */ private fun refreshCache(g: BluetoothGatt) { runCatching { g.javaClass.getMethod("refresh").invoke(g) } .onFailure { Log.w(TAG, "could not refresh the service cache", it) } } - /** SDL's DisableSteamTritonLizardMode: ID_SET_SETTINGS_VALUES (0x87), setting 9 = off. */ private fun refreshLizardMode() { if (!connected) return val msg = ByteArray(FEATURE_BYTES) @@ -228,18 +210,15 @@ class SteamControllerBle(private val context: Context) { handler.postDelayed(::refreshLizardMode, LIZARD_REFRESH_MS) } - /** Preserve the full 0x45 or 0x47 packet so Triton-only bits reach Steam's native driver. */ private fun onState(data: ByteArray) { if (data.size < STATE_BYTES) return FakeInputWriter.writeTritonState(SLOT, reportId, data) } - /** A neutral report prevents a link lost mid-press from leaving controls held. */ private fun release() { FakeInputWriter.writeTritonState(SLOT, if (reportId == 0x47) 0x47 else 0x45, ByteArray(STATE_BYTES)) } - /** Drain Steam HID output reports and write each to Triton's matching BLE characteristic. */ private fun pollOutput() { if (!running || !connected || gatt == null) return FakeInputWriter.readTritonOutput(SLOT, outputSequence)?.let { output -> @@ -249,14 +228,12 @@ class SteamControllerBle(private val context: Context) { val request = FakeInputWriter.readTritonFeatureRequest(SLOT) if (request != 0L && request != featureRead) { featureRead = request - // Behind any queued write, so a read answers the feature report written before it. queuedWrites.addLast(REPORT to null) writeNextOutput() } handler.postDelayed(::pollOutput, OUTPUT_POLL_MS) } - /** The controller's answer to a feature read (its info, for one), or null when the read failed. */ private fun onFeatureRead(value: ByteArray?) { outputWritePending = false if (featureRead != 0L) { @@ -277,7 +254,6 @@ class SteamControllerBle(private val context: Context) { return } } - // SDL's BLE driver removes the HID report ID and trailing padding byte before transmission. enqueueOutput(characteristic, report.copyOfRange(1, report.size - 1)) } @@ -319,13 +295,11 @@ class SteamControllerBle(private val context: Context) { companion object { private const val TAG = "SteamControllerBle" - /** The paired controller's native Triton reports live in slot 0's extended ring. */ private const val SLOT = 0 private const val RETRY_MS = 5_000L private const val LIZARD_REFRESH_MS = 3_000L private const val OUTPUT_POLL_MS = 4L private const val OUTPUT_RETRY_MS = 10L - /** SDL's 64-byte feature report less the report ID and the trailing byte. */ private const val FEATURE_BYTES = 62 private const val STATE_BYTES = 45 private const val OUTPUT_UUID_PREFIX = "100f6c" @@ -341,7 +315,6 @@ class SteamControllerBle(private val context: Context) { device.type and BluetoothDevice.DEVICE_TYPE_LE != 0 && (device.name ?: "").let { it.startsWith("Steam Ctrl") || it.startsWith("SteamController") } - /** Whether a session should expose a Triton HID node for a paired controller. */ @JvmStatic fun hasPairedController(context: Context): Boolean { val adapter = (context.getSystemService(Context.BLUETOOTH_SERVICE) as? BluetoothManager)?.adapter ?: return false @@ -350,12 +323,10 @@ class SteamControllerBle(private val context: Context) { .getOrDefault(false) } - /** A Steam Controller is connected and feeding its native HID reports. */ @Volatile @JvmStatic var connected = false private set - /** Notifies the activity when [connected] changes. */ @Volatile @JvmStatic var listener: (() -> Unit)? = null } diff --git a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchBindings.kt b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchBindings.kt index f5f46d88ce..4d19cb87d6 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchBindings.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchBindings.kt @@ -6,21 +6,8 @@ import android.graphics.BitmapFactory import android.util.LruCache import java.io.File -/** - * What each touch control is bound to, and the icon it shows - Steam's, as its configurator keeps - * them. - * - * A Steam Input binding is one string: `<action>, <label>, <icon>, <#foreground #background>`, e.g. - * `xinput_button A, Jump, ghost_045_move_0400.png, #232323 #E4E4E4`. The icon is a file name looked - * up as Steam does (steamui.so): the game's own `TouchMenuIcons` folder, then the binding icon - * library `tenfoot/resource/images/library/controller/binding_icons`. Steam draws it filled with - * the foreground colour through its own alpha (mask-image) on a button of the background colour. - * Steam Link is sent these per control by the client it streams from; here they are read from the - * game's touch config, and editing one writes the binding string back, as the configurator does. - */ object SteamTouchBindings { - /** Steam's binding icon colours (the configurator's palette, steamui sp.js), and its defaults. */ val PALETTE = listOf( "#FFFFFF", "#E4E4E4", "#AAAAAA", "#787878", "#434343", "#222222", "#0000AD", "#0045AD", "#0074AD", "#00ADAD", "#33AD69", "#00AD3D", "#00AD00", "#48B119", "#74AD00", "#96AD00", "#ADA200", "#AD5D00", @@ -29,7 +16,6 @@ object SteamTouchBindings { const val DEFAULT_FOREGROUND = "#232323" const val DEFAULT_BACKGROUND = "#E4E4E4" - /** A parsed binding string. Empty strings for absent fields. */ data class Binding(val action: String, val label: String, val icon: String, val foreground: String, val background: String) { fun compose(): String = if (icon.isEmpty() && foreground.isEmpty() && background.isEmpty()) "$action, $label, " @@ -45,10 +31,8 @@ object SteamTouchBindings { colors.getOrNull(0).orEmpty(), colors.getOrNull(1).orEmpty()) } - /** Where a control's binding lives: its input in the group the preset puts on its source. */ data class Ref(val groupId: String, val input: String) - /** The source and input names a control reads (D-pad: its four directions). */ private fun inputsOf(type: Int): List<Pair<String, String>> = when (type) { SteamTouchConfig.A -> listOf("button_diamond" to "button_a") SteamTouchConfig.B -> listOf("button_diamond" to "button_b") @@ -69,13 +53,8 @@ object SteamTouchBindings { else -> emptyList() } - /** D-pad directions, in the order [refsFor] returns them: up, down, left, right. */ val DPAD_INPUTS = listOf("dpad_north", "dpad_south", "dpad_west", "dpad_east") - /** - * Where control [type]'s bindings are for preset [preset] (the action set less one) and its - * active [layers]: a layer's group wins over the base's for the same source. - */ fun refsFor(mappings: KeyValues.Node, type: Int, preset: Int, layers: List<Int> = emptyList()): List<Ref?> { val presets = mappings.children("preset").associateBy { it.string("id")?.toIntOrNull() ?: -1 } val stack = layers.reversed().mapNotNull { presets[it - 1] } + listOfNotNull(presets[preset] ?: presets.values.firstOrNull()) @@ -90,7 +69,6 @@ object SteamTouchBindings { parts.getOrNull(0) == source && parts.getOrNull(1) == "active" && !parts.contains("modeshift") }?.first - /** The binding at [ref]: its first activator's first binding (Full_Press when there is one). */ fun bindingAt(mappings: KeyValues.Node, ref: Ref): Binding? { val group = mappings.children("group").firstOrNull { it.string("id") == ref.groupId } ?: return null val activators = group.child("inputs")?.child(ref.input)?.child("activators") ?: return null @@ -98,7 +76,6 @@ object SteamTouchBindings { return activator?.child("bindings")?.string("binding")?.let(::parse) } - /** A short glyph for a binding with no icon or label: what it presses. */ fun glyph(binding: Binding?): String? { val words = binding?.action?.split(' ') ?: return null val arg = words.getOrNull(1)?.uppercase() ?: return null @@ -123,12 +100,7 @@ object SteamTouchBindings { "LEFT_ARROW" to "←", "RIGHT_ARROW" to "→", ) - // ---- Writing a binding back ---- - /** - * Rewrites every binding of [ref]'s input in config [text] (VDF) with [change], keeping the rest - * of the file byte for byte. Returns the new text, or null when the input is not there. - */ fun rewrite(text: String, ref: Ref, change: (Binding) -> Binding): String? { val tokens = Vdf.tokens(text) val group = Vdf.blocks(tokens, 0, tokens.size, "group").firstOrNull { (s, e) -> @@ -145,7 +117,6 @@ object SteamTouchBindings { return out.toString() } - /** A VDF tokenizer that keeps where each token sits, for edits that leave the rest untouched. */ private object Vdf { class Token(val text: String, val quoted: Boolean, val start: Int, val end: Int) @@ -175,8 +146,6 @@ object SteamTouchBindings { return out } - /** The bodies (token index ranges inside the braces) of direct children named [key] of the - * block spanning [from, to). */ fun blocks(tokens: List<Token>, from: Int, to: Int, key: String): List<Pair<Int, Int>> { val found = mutableListOf<Pair<Int, Int>>() var i = from @@ -200,7 +169,6 @@ object SteamTouchBindings { } i++ } - // The whole file is one top-level block ("controller_mappings"): look inside it too. if (found.isEmpty() && from == 0) { val top = tokens.indexOfFirst { it.text == "{" && !it.quoted } if (top > 0) { @@ -217,7 +185,6 @@ object SteamTouchBindings { return found } - /** A direct key-value of the block spanning [from, to). */ fun value(tokens: List<Token>, from: Int, to: Int, key: String): String? { var depth = 0 var i = from @@ -232,7 +199,6 @@ object SteamTouchBindings { } } - // ---- Icons ---- private val cache = object : LruCache<String, Bitmap>(24 * 1024 * 1024) { override fun sizeOf(key: String, value: Bitmap) = value.byteCount @@ -241,7 +207,6 @@ object SteamTouchBindings { fun libraryDir(context: Context) = File(SteamTouchConfig.steamRoot(context), "tenfoot/resource/images/library/controller/binding_icons") - /** The game's own icons folder (`TouchMenuIcons` in its install directory), when it has one. */ fun gameIconsDir(context: Context, appId: Int): File? = try { val manifest = File(SteamTouchConfig.steamRoot(context), "steamapps/appmanifest_$appId.acf") val installDir = KeyValues.parse(manifest.readText()).let { it.child("AppState") ?: it }.string("installdir") @@ -257,7 +222,6 @@ object SteamTouchBindings { return File(SteamTouchConfig.steamRoot(context), "steamui/images/controller/$name").takeIf { it.isFile } } - /** An icon, decoded at about [size] px. Blocking (reads a file); cached. */ fun icon(context: Context, appId: Int, name: String, size: Int = 128): Bitmap? { val key = "$appId/$name/$size" cache.get(key)?.let { return it } @@ -276,7 +240,6 @@ object SteamTouchBindings { fun cachedIcon(appId: Int, name: String, size: Int = 128): Bitmap? = cache.get("$appId/$name/$size") - /** Icon names for the picker: the game's own first, then Steam's library by category. */ fun iconNames(context: Context, appId: Int): List<String> { val own = gameIconsDir(context, appId)?.list()?.filter { it.endsWith(".png", true) }?.sorted().orEmpty() val library = libraryDir(context).list()?.filter { it.endsWith(".png", true) && it != "special_blank.png" }?.sorted().orEmpty() diff --git a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchConfig.kt b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchConfig.kt index 844fe147ef..4025db9348 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchConfig.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchConfig.kt @@ -7,25 +7,9 @@ import java.io.ByteArrayOutputStream import java.io.File import java.io.RandomAccessFile -/** - * Steam's touch configs, read and written where Steam keeps them. - * - * A touch config is a Steam Input config (`controller_mobile_touch`) like any other - bindings per - * action set, synced to the account, shared as community configs - with one extra key, - * `touch_layout`: where each on-screen control sits, per action set, as a hex-encoded - * `CVirtualControllerLayouts` protobuf (steammessages_virtualcontroller.proto). Steam Link is - * handed both by the client it streams from; here the client tells the device only the app and - * action set it is on (SteamTouchDevice), so the config is found on disk: the file the client's - * console log says it loaded for the touch controller, else the app's entry in - * `configset_controller_mobile_touch.vdf`. With no layout in it, controls go where Steam Link puts - * them by default. Saving a layout writes `touch_layout` into the app's autosave config, as the - * client does when Steam Link saves one; Steam Cloud picks that file up like any autosave. - * (docs/development/steam-touch-controller.md.) - */ object SteamTouchConfig { private const val TAG = "SteamTouch" - // EControllerElementType. const val THUMB = 0 const val STEAM = 1 const val JOYSTICK_LEFT = 2 @@ -43,7 +27,7 @@ object SteamTouchConfig { const val TRIGGER_RIGHT = 14 const val BUMPER_LEFT = 15 const val BUMPER_RIGHT = 16 - const val MACRO_0 = 17 // 17..24 = macros 0-7 + const val MACRO_0 = 17 const val TRACKPAD_CENTER = 25 const val TRACKPAD_LEFT = 26 const val TRACKPAD_RIGHT = 27 @@ -53,27 +37,19 @@ object SteamTouchConfig { const val MAGNIFYING_GLASS = 29 const val PASTE = 34 - /** Controls a layout may place though no binding asks for them (Steam Link's tray). */ val OPTIONAL = setOf(PASTE) - /** A control's place: centre as a fraction of the screen, and its scale. */ data class Element(val type: Int, val visible: Boolean, val x: Float, val y: Float, val xScale: Float = 1f, val yScale: Float = 1f) data class Layout(val actionSet: Int, val elements: List<Element>, val color: FloatArray?, val version: Int?) - /** A decoded `touch_layout`; [rest] is every other top-level field, written back untouched. */ class Layouts(val layouts: List<Layout>, val rest: ByteArray) { fun forActionSet(id: Int): Layout? = layouts.firstOrNull { it.actionSet == id } - /** The per-game options Steam Link keeps beside the layouts (CVirtualControllerLayouts - * fields 2-4): input mode, mouse mode, trackpad sensitivity. */ val options: Options get() = Options.decode(rest) } - /** EInputMode: 1 mouse, 2 controller, 3 both. EMouseMode: 2 absolute cursor (direct touch), - * 3 touch, 4 relative (trackpad); 0 = not set. */ data class Options(val inputMode: Int = INPUT_CONTROLLER, val mouseMode: Int = 0, val trackpadSensitivity: Float = 1f) { - /** [rest] with these options in place of its own fields 2-4, the rest kept as it was. */ fun encodeInto(rest: ByteArray): ByteArray { val out = ByteArrayOutputStream() val p = Proto(rest) @@ -116,7 +92,6 @@ object SteamTouchConfig { const val MOUSE_TOUCH = 3 const val MOUSE_RELATIVE = 4 - /** The config's action sets in preset order: id as the device is told (preset id + 1) and title. */ fun actionSets(config: Config): List<Pair<Int, String>> { val mappings = config.mappings ?: return listOf(1 to "Default") val titles = mappings.child("actions")?.entries?.mapNotNull { (key, v) -> @@ -130,40 +105,30 @@ object SteamTouchConfig { return sets.ifEmpty { listOf(1 to "Default") } } - /** A config as the overlay needs it. */ class Config( val file: File?, val text: String?, val layouts: Layouts?, - /** Bound controls per preset (action set id - 1). */ val available: Map<Int, Set<Int>>, - /** The parsed config, for its bindings (SteamTouchBindings). */ val mappings: KeyValues.Node? = null, ) { - /** The config's own title, as Steam Link's tray shows it ("Default", "Gamepad"…). */ val title: String? get() = mappings?.string("title")?.let { t -> if (t.startsWith("#")) mappings.child("localization")?.child("english")?.string("title") ?: "Default" else t } - /** The controls to show for [actionSet] (as the device is told it) and [layers]. */ fun availableFor(actionSet: Int, layers: List<Int>): Set<Int> { val base = available[presetOf(actionSet)] ?: available.values.firstOrNull() ?: DEFAULT_SET return layers.fold(base) { set, layer -> set + (available[presetOf(layer)] ?: emptySet()) } + ALWAYS } } - /** Big Picture's own config uses Steam's basic UI bindings: the default set. */ private val DEFAULT_SET = setOf(DPAD, A, B, X, Y, SELECT, START) private val ALWAYS = setOf(STEAM, THUMB, KEYBOARD) - /** The layout entry for the action set the device was told about (the client counts from 1, - * 0 for an app with none). */ fun layoutIdOf(actionSet: Int) = if (actionSet <= 0) 1 else actionSet private fun presetOf(actionSet: Int) = layoutIdOf(actionSet) - 1 - // ---- Where Steam keeps them ---- - /** A game's name from its app manifest, when it is installed. */ fun gameName(context: Context, appId: Int): String? = try { val kv = KeyValues.parse(File(steamRoot(context), "steamapps/appmanifest_$appId.acf").readText()) (kv.child("AppState") ?: kv).string("name") @@ -171,7 +136,7 @@ object SteamTouchConfig { null } - fun steamRoot(context: Context) = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam") + fun steamRoot(context: Context) = com.droiddeck.launcher.session.SessionPrefs.activeSteamRoot(context) fun configDir(context: Context): File? { val base = File(steamRoot(context), "steamapps/common/Steam Controller Configs") @@ -181,7 +146,6 @@ object SteamTouchConfig { ?.maxByOrNull { it.lastModified() }?.let { File(it, "config") } } - /** The signed-in account (loginusers.vdf's MostRecent) as a 32-bit account id. */ private fun accountId(context: Context): Long? = try { val users = KeyValues.parse(File(steamRoot(context), "config/loginusers.vdf").readText()) val node = users.child("users") @@ -192,12 +156,10 @@ object SteamTouchConfig { null } - /** The config the client has for app [appId] on the touch controller. Blocking: reads files. */ fun load(context: Context, appId: Int): Config { val dir = configDir(context) - // The app's own saved config is what the client loads when there is one (its configset - // entry); otherwise what it logged loading - a template, an official or a workshop config. - val file = dir?.let { autosaveConfig(it, appId) } + val file = dir?.let { deviceConfig(context, it, appId) } + ?: dir?.let { autosaveConfig(it, appId) } ?: loggedConfig(context, appId)?.takeIf { isTouchConfig(it) } ?: dir?.let { configsetConfig(context, it, appId) } if (file == null) { @@ -220,9 +182,6 @@ object SteamTouchConfig { private fun isTouchConfig(file: File) = file.isFile && file.bufferedReader().use { r -> generateSequence { r.readLine() }.take(40).any { it.contains("controller_mobile_touch") } } - /** From the client's console log: the last config it loaded for [appId] on the touch controller - * (`Loaded Config for ... App ID <n>, Controller <i>: <path>`, where controller i reported - * type 43). Guest paths come back as the app's own. */ private fun loggedConfig(context: Context, appId: Int): File? = try { val log = File(steamRoot(context), "logs/console_log.txt") val tail = RandomAccessFile(log, "r").use { raf -> @@ -249,12 +208,16 @@ object SteamTouchConfig { null } - /** The app's entry in configset_controller_mobile_touch.vdf. */ - private fun configsetConfig(context: Context, dir: File, appId: Int): File? = try { - val set = KeyValues.parse(File(dir, CONFIGSET).readText()).child("controller_config")?.child(appId.toString()) + private fun configsetConfig(context: Context, dir: File, appId: Int): File? = entryConfig(context, dir, CONFIGSET, appId) + + private fun deviceConfig(context: Context, dir: File, appId: Int): File? = entryConfig(context, dir, DEVICE_CONFIGSET, appId) + + private fun entryConfig(context: Context, dir: File, configset: String, appId: Int): File? = try { + val set = KeyValues.parse(File(dir, configset).readText()).child("controller_config")?.child(appId.toString()) when { set == null -> null set.string("autosave") == "1" -> File(dir, "$appId/controller_mobile_touch.vdf") + set.string("workshop") != null -> workshopConfig(context, set.string("workshop")!!) set.string("template") != null -> File(steamRoot(context), "controller_base/templates/" + set.string("template")) else -> null }?.takeIf { it.isFile } @@ -262,11 +225,18 @@ object SteamTouchConfig { null } + internal fun workshopConfig(context: Context, id: String): File? { + if (!id.all(Char::isDigit)) return null + return File(steamRoot(context), "steamapps/workshop/content/$CONFIGS_APP/$id").listFiles() + ?.filter { it.isFile && (it.name.endsWith(".vdf") || it.name.endsWith(".bin")) } + ?.maxByOrNull { it.lastModified() } + } + private const val CONFIGSET = "configset_controller_mobile_touch.vdf" + private const val DEVICE_CONFIGSET = "configset_MT-DROIDDECK0001.vdf" + private const val CONFIGS_APP = 241100 - // ---- What a config binds ---- - /** Per preset, the controls its active sources bind - what Steam Link shows (UpdateElementAvailability). */ private fun availability(mappings: KeyValues.Node): Map<Int, Set<Int>> { val groups = mappings.children("group").associateBy({ it.string("id") ?: "" }) { group -> group.child("inputs")?.entries?.filter { (_, v) -> (v as? KeyValues.Node)?.let(::hasBinding) == true } @@ -312,11 +282,7 @@ object SteamTouchConfig { (activator as? KeyValues.Node)?.child("bindings")?.entries?.any { (k, v) -> k == "binding" && (v as? String)?.isNotBlank() == true } == true } == true - // ---- Steam Link's defaults ---- - /** Where Steam Link puts a control with no layout (CVirtualController::BInitializeDefaultElement, - * on a 1280x720 screen), and the same scheme for the controls its table leaves out, made room - * for when a config binds sticks. */ fun defaultElement(type: Int, available: Set<Int>): Element? { val leftStick = JOYSTICK_LEFT in available val rightStick = JOYSTICK_RIGHT in available @@ -352,8 +318,6 @@ object SteamTouchConfig { return Element(type, true, p.first, p.second) } - /** The controls to draw: the layout's own where it has one, Steam Link's defaults otherwise, - * only those the config binds. */ fun elementsFor(config: Config, actionSet: Int, layers: List<Int>): List<Element> { val available = config.availableFor(actionSet, layers) val layout = config.layouts?.forActionSet(layoutIdOf(actionSet)) @@ -371,14 +335,7 @@ object SteamTouchConfig { fun layoutColor(config: Config, actionSet: Int): FloatArray? = config.layouts?.forActionSet(layoutIdOf(actionSet))?.color - // ---- Saving ---- - /** - * Saves [elements] as the layout of [actionSet] in app [appId]'s touch config: into the app's - * autosave config (`<appid>/controller_mobile_touch.vdf`, made from the config in use when the - * app has none) and selected for the app in the configset, as the client saves a layout Steam - * Link sends it. Returns the file written, or null. - */ fun saveLayout( context: Context, appId: Int, @@ -389,10 +346,6 @@ object SteamTouchConfig { bindings: Map<SteamTouchBindings.Ref, (SteamTouchBindings.Binding) -> SteamTouchBindings.Binding> = emptyMap(), ): File? = saveLayouts(context, appId, config, mapOf(layoutIdOf(actionSet) to elements), color?.let { c -> setOf(layoutIdOf(actionSet)).associateWith { c } } ?: emptyMap(), bindings) - /** - * Saves the layouts of several action sets (by layout id) at once, with their colours, any - * binding edits and the per-game [options], into the game's autosave touch config. - */ fun saveLayouts( context: Context, appId: Int, @@ -403,8 +356,6 @@ object SteamTouchConfig { options: Options? = null, ): File? { val dir = configDir(context) ?: return null - // Icons, labels and colours live in the binding strings (SteamTouchBindings), as the - // configurator writes them. val source = bindings.entries.fold(config.text ?: return null) { text, (ref, change) -> SteamTouchBindings.rewrite(text, ref, change) ?: text } @@ -414,7 +365,7 @@ object SteamTouchConfig { val written = sets.map { (id, elements) -> Layout(id, elements, colors[id] ?: old?.forActionSet(id)?.color ?: floatArrayOf(1f, 1f, 1f, 0.4f), old?.forActionSet(id)?.version) } - val rest = old?.rest ?: byteArrayOf(0x10, 0x02) // input_mode = controller + val rest = old?.rest ?: byteArrayOf(0x10, 0x02) val layouts = Layouts((keep + written).sortedBy { it.actionSet }, options?.encodeInto(rest) ?: rest) val hex = bytesToHex(encodeLayouts(layouts)) val line = "\t\"touch_layout\"\t\t\"$hex\"" @@ -427,11 +378,20 @@ object SteamTouchConfig { tmp.writeText(text) if (!tmp.renameTo(target)) return null selectAutosave(dir, appId) + dropDeviceEntry(dir, appId) Log.i(TAG, "steam touch: saved layouts ${sets.keys} for app $appId to ${target.path}") return target } - /** Points the app's configset entry at its autosave config. */ + private fun dropDeviceEntry(dir: File, appId: Int) { + val file = File(dir, DEVICE_CONFIGSET) + if (!file.isFile) return + val text = file.readText() + val block = Regex("""\n\s*"$appId"\s*\{[^}]*\}""") + if (!block.containsMatchIn(text)) return + File(file.path + ".tmp").apply { writeText(text.replace(block, "")) }.renameTo(file) + } + private fun selectAutosave(dir: File, appId: Int) { val file = File(dir, CONFIGSET) val text = if (file.isFile) file.readText() else "\"controller_config\"\n{\n}\n" @@ -442,7 +402,6 @@ object SteamTouchConfig { File(file.path + ".tmp").apply { writeText(next) }.renameTo(file) } - // ---- touch_layout: CVirtualControllerLayouts ---- fun decodeLayouts(bytes: ByteArray): Layouts { val layouts = mutableListOf<Layout>() @@ -591,7 +550,6 @@ object SteamTouchConfig { fun bytesToHex(b: ByteArray) = b.joinToString("") { "%02x".format(it.toInt() and 0xff) } } -/** Valve's KeyValues text format, as far as controller configs use it. */ class KeyValues private constructor() { class Node(val entries: MutableList<Pair<String, Any>> = mutableListOf()) { fun child(key: String): Node? = entries.firstOrNull { it.first.equals(key, true) && it.second is Node }?.second as Node? diff --git a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchControls.kt b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchControls.kt index 350a619347..5a717150ee 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchControls.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchControls.kt @@ -13,6 +13,7 @@ import android.util.Log import android.view.MotionEvent import android.view.View import android.widget.Toast +import com.droiddeck.launcher.R import com.droiddeck.launcher.input.SteamTouchConfig.Element import java.util.concurrent.Executors import kotlin.math.abs @@ -21,18 +22,6 @@ import kotlin.math.hypot import kotlin.math.max import kotlin.math.min -/** - * Steam's touch controls, drawn by the app. - * - * The layout is Steam's: the game's touch config for the action set the client says is active - * (SteamTouchDevice.State, SteamTouchConfig), placed where the config's layout puts each control or - * where Steam Link would by default, and only the controls the config binds. Touches become the - * touch controller's input report; the client does the rest - bindings, action sets, the virtual - * pad the game reads. Each control shows its binding's icon, label and colours, as Steam keeps them - * (SteamTouchBindings). [startEditing] moves, resizes and hides controls, picks their icons and the - * layout's colour, and saves all of it into the game's touch config, as Steam Link and Steam's - * configurator do. - */ @SuppressLint("ViewConstructor") class SteamTouchControls( context: Context, @@ -41,19 +30,14 @@ class SteamTouchControls( private val onKeyboard: () -> Unit, ) : View(context) { - /** The game's input and mouse modes changed (from its config or the menu): the session routes - * touches outside the controls by them. */ var onOptions: (SteamTouchConfig.Options) -> Unit = {} - /** The Paste control: types the clipboard into the session. */ var onPaste: () -> Unit = {} - // Steam Link's own settings, for every game (CVirtualControllerGlobalConfig). private val prefs = context.getSharedPreferences("steam_touch", Context.MODE_PRIVATE) private var feedback = prefs.getBoolean("feedback", false) private var autoFade = prefs.getBoolean("autoFade", true) private var gyroOn = prefs.getBoolean("gyro", true).also { device.motionEnabled = it } - // Shake the device to hide the controls and again to bring them back (Steam Link's shake_fade). private var shakeToHide = prefs.getBoolean("shake", false) private var shakenAway = false private val sensors by lazy { context.getSystemService(Context.SENSOR_SERVICE) as android.hardware.SensorManager } @@ -68,7 +52,6 @@ class SteamTouchControls( val now = android.os.SystemClock.uptimeMillis() jolts = if (now - lastJolt < 400) jolts + 1 else 1 lastJolt = now - // Three jolts in quick succession, at most once a second. if (jolts >= 3 && now - lastShake > 1000) { lastShake = now jolts = 0 @@ -112,15 +95,12 @@ class SteamTouchControls( private var tint = Color.WHITE private var alphaScale = 0.45f - // What each control is bound to (its icon, label, colours), per element type; the D-pad has four. private class Visual(val ref: SteamTouchBindings.Ref?, val binding: SteamTouchBindings.Binding?) private var visuals: Map<Int, List<Visual>> = emptyMap() - // Touch state. private class Finger(val element: Element?, var x: Float, var y: Float, val toolbar: Int = -1) private val fingers = HashMap<Int, Finger>() - // Editing. private var editing = false private var editElements: MutableList<Element> = mutableListOf() private var hidden: MutableList<Element> = mutableListOf() @@ -129,7 +109,6 @@ class SteamTouchControls( private var pinchStart = 0f private var pinchScale = 1f private var saving = false - // Icon and colour edits not saved yet. private val pendingBindings = HashMap<SteamTouchBindings.Ref, SteamTouchBindings.Binding>() private var pendingColor: FloatArray? = null private var selectedArm = 0 @@ -161,12 +140,9 @@ class SteamTouchControls( super.onDetachedFromWindow() } - /** Follows what the client tells the device: a new app loads its config, a new action set or - * layer redraws. */ private fun refreshState() { val state = device.state() val app = if (state.appId == 0) BIG_PICTURE else state.appId - // The client reads the config afresh when the controller (re)connects: so do we. val reconnected = state.opened > 0 && opened == 0 opened = state.opened if (app != configApp || reconnected) { @@ -194,7 +170,6 @@ class SteamTouchControls( } } - /** Re-reads the config for the current app (after a save). */ fun reloadConfig() { configApp = -1 refreshState() @@ -215,12 +190,9 @@ class SteamTouchControls( private fun applyColor(color: FloatArray?) { tint = if (color != null) Color.rgb((color[0] * 255).toInt(), (color[1] * 255).toInt(), (color[2] * 255).toInt()) else Color.WHITE - // Steam Link's opacity: its default layout colour (alpha about 0.4) draws solid white - // outlines; lower values fade them. alphaScale = ((color?.get(3) ?: 0.45f) * 2.2f).coerceIn(0.15f, 1f) } - /** Each control's bindings for the action set and layers in use, with edits not saved yet. */ private fun rebuildVisuals() { val mappings = config.mappings val preset = SteamTouchConfig.layoutIdOf(actionSet) - 1 @@ -239,7 +211,6 @@ class SteamTouchControls( } } - // ---- Geometry ---- private fun unit() = min(width / 1280f, height / 720f) @@ -247,7 +218,6 @@ class SteamTouchControls( private fun radiusY(e: Element): Float = baseRadius(e.type) * e.yScale * unit() private fun baseRadius(type: Int) = when (type) { - // Steam Link's sizes on its 1280x720 reference. SteamTouchConfig.DPAD -> 112f SteamTouchConfig.JOYSTICK_LEFT, SteamTouchConfig.JOYSTICK_RIGHT -> 90f SteamTouchConfig.TRACKPAD_LEFT, SteamTouchConfig.TRACKPAD_RIGHT, SteamTouchConfig.TRACKPAD_CENTER -> 100f @@ -262,17 +232,14 @@ class SteamTouchControls( private fun cx(e: Element) = e.x * width private fun cy(e: Element) = e.y * height - /** How far (x, y) is from [e]'s centre, in its own radii (it may be an oval). */ private fun reach(e: Element, x: Float, y: Float) = hypot((x - cx(e)) / radius(e), (y - cy(e)) / radiusY(e)) private fun hit(list: List<Element>, x: Float, y: Float): Element? = list.filter { reach(it, x, y) <= 1.15f }.minByOrNull { reach(it, x, y) } - /** What is drawn and touchable: in mouse mode only the menu button, as on Steam Link. */ private fun live(): List<Element> = if (shakenAway) emptyList() else if (options.inputMode == SteamTouchConfig.INPUT_MOUSE) elements.filter { it.type == SteamTouchConfig.THUMB } else elements - // ---- Drawing ---- override fun onDraw(canvas: Canvas) { val shown = if (editing) editElements else live() @@ -280,7 +247,6 @@ class SteamTouchControls( val x = cx(e) val y = cy(e) canvas.save() - // An oval control: drawn as its circle, stretched to its height. if (e.yScale != e.xScale && e.xScale > 0f) canvas.scale(1f, e.yScale / e.xScale, x, y) draw(canvas, e, editing && editElements.indexOf(e) == selected) canvas.restore() @@ -296,10 +262,6 @@ class SteamTouchControls( private fun pressedTypes(): Set<Int> = fingers.values.mapNotNull { it.element?.type }.toSet() - // ---- Steam Link's look (measured from Steam Link 1.3 on the Thor) ---- - // Outlines only: 3 px white strokes on a 1280x720 reference, no fill; a pressed control fills - // white with its content dark. Face letters in Steam's colours; Select and Start are ◀ ▶ pills - // beside a solid white Steam disc; bumpers, triggers, the menu and keyboard are rounded squares. private fun lineWidth() = 3f * unit() @@ -335,11 +297,10 @@ class SteamTouchControls( if (editing) { text.textSize = r * 0.3f text.color = Color.argb(alpha / 2, 255, 255, 255) - canvas.drawText("Trackpad", x, y - (text.descent() + text.ascent()) / 2, text) + canvas.drawText(context.getString(R.string.deck_surface_trackpad), x, y - (text.descent() + text.ascent()) / 2, text) } } SteamTouchConfig.STEAM -> { - // The guide button: DroidDeck's split D and orb, in a ring. if (pressed) canvas.drawCircle(x, y, r, fill) canvas.drawCircle(x, y, r, stroke) drawMark(canvas, x, y, r * 0.5f, if (pressed) Color.argb(alpha, 23, 26, 33) else ink, alpha) @@ -363,7 +324,6 @@ class SteamTouchControls( } } - /** Controls drawn as rounded squares on Steam Link; the face buttons and the rest are rings. */ private fun isSquare(type: Int) = type in setOf(SteamTouchConfig.BUMPER_LEFT, SteamTouchConfig.BUMPER_RIGHT, SteamTouchConfig.TRIGGER_LEFT, SteamTouchConfig.TRIGGER_RIGHT, SteamTouchConfig.THUMB, SteamTouchConfig.KEYBOARD, SteamTouchConfig.PASTE, SteamTouchConfig.MACRO_1_FINGER, SteamTouchConfig.MACRO_2_FINGER) || @@ -371,8 +331,6 @@ class SteamTouchControls( private val markD by lazy { androidx.core.graphics.PathParser.createPathFromPathData(MARK_D) } - /** DroidDeck's mark (artwork/droiddeck-mark.svg): the split D in [ink] around the blue orb, - * centred at (x, y), [r] its half height. */ private fun drawMark(canvas: Canvas, x: Float, y: Float, r: Float, ink: Int = onSurface, alpha: Int = 255) { val k = r / 111.86f canvas.save() @@ -383,7 +341,6 @@ class SteamTouchControls( canvas.restore() } - /** The Steam logo's mark, drawn: a wheel and a piston rod. */ private fun drawSteamMark(canvas: Canvas, x: Float, y: Float, r: Float, color: Int) { val p = Paint(Paint.ANTI_ALIAS_FLAG).apply { this.color = color; style = Paint.Style.STROKE; strokeCap = Paint.Cap.ROUND } p.strokeWidth = r * 0.16f @@ -395,11 +352,6 @@ class SteamTouchControls( canvas.drawLine(x - r * 0.45f, y + r * 0.28f, x - r * 0.95f, y + r * 0.1f, p) } - /** - * A button as Steam Link draws it: a ring (or rounded square) outline with its name - face - * letters in Steam's colours. With a binding icon, the icon on a disc of its background colour, - * as Steam draws binding icons; with a binding label, the label. - */ private fun drawFace(canvas: Canvas, type: Int, binding: SteamTouchBindings.Binding?, x: Float, y: Float, r: Float, alpha: Int, pressed: Boolean) { val square = isSquare(type) @@ -411,7 +363,6 @@ class SteamTouchControls( val s = r * 0.62f val custom = binding.background.isNotEmpty() && !binding.background.equals(SteamTouchBindings.DEFAULT_BACKGROUND, true) if (custom) { - // Colours chosen for this icon: drawn as Steam draws binding icons. shape(Paint(Paint.ANTI_ALIAS_FLAG).apply { color = parseColor(binding.background, SteamTouchBindings.DEFAULT_BACKGROUND) this.alpha = if (pressed) alpha else (alpha * 0.85f).toInt() @@ -419,7 +370,6 @@ class SteamTouchControls( canvas.drawBitmap(tinted(binding.icon, icon, binding.foreground), null, RectF(x - s, y - s, x + s, y + s), Paint(Paint.ANTI_ALIAS_FLAG or Paint.FILTER_BITMAP_FLAG).apply { this.alpha = alpha }) } else { - // Steam's default colours: Steam Link's own look, the icon in the outline's ink. if (pressed) shape(fill) val ink = if (pressed) Color.argb(alpha, 23, 26, 33) else stroke.color canvas.drawBitmap(inked(binding.icon, icon), null, RectF(x - s, y - s, x + s, y + s), @@ -434,7 +384,6 @@ class SteamTouchControls( shape(stroke) if (type == SteamTouchConfig.THUMB) { drawDots(canvas, x, y, r, if (pressed) Color.argb(alpha, 23, 26, 33) else text.color); return } if (type == SteamTouchConfig.KEYBOARD) { drawKeyboardGlyph(canvas, x, y, r, if (pressed) Color.argb(alpha, 23, 26, 33) else text.color); return } - // Steam Link names a control by itself, whatever its binding is labelled ("B", not "Back"). val own = label(type) val shown = own text.textSize = when { @@ -468,14 +417,11 @@ class SteamTouchControls( private val iconsLoading = HashSet<String>() - // Icons as a mask (their alpha), tinted when drawn. private val inkedIcons = android.util.LruCache<String, android.graphics.Bitmap>(48) private fun inked(name: String, icon: android.graphics.Bitmap): android.graphics.Bitmap { val key = "$name|${icon.width}" inkedIcons.get(key)?.let { return it } - // Steam's icons are drawn in greys on clear; their dark parts are the glyph's detail, so the - // mask keeps what is opaque and not near white. val out = icon.copy(android.graphics.Bitmap.Config.ARGB_8888, true) val px = IntArray(out.width * out.height) out.getPixels(px, 0, out.width, 0, 0, out.width, out.height) @@ -490,8 +436,6 @@ class SteamTouchControls( return out } - // Icons already in their foreground colour. Drawn plain: a colour filter on the icon bitmap - // itself stopped drawing on the hardware canvas once a dialog had been over the view. private val tintedIcons = android.util.LruCache<String, android.graphics.Bitmap>(48) private fun tinted(name: String, icon: android.graphics.Bitmap, foreground: String): android.graphics.Bitmap { @@ -504,7 +448,6 @@ class SteamTouchControls( return out } - /** An icon from the cache, or null while it is (re)loaded; the view redraws when it comes in. */ private fun iconOrLoad(name: String): android.graphics.Bitmap? { SteamTouchBindings.cachedIcon(appId, name, ICON_PX)?.let { return it } if (iconsLoading.add(name)) { @@ -520,17 +463,15 @@ class SteamTouchControls( private fun parseColor(hex: String, fallback: String) = try { Color.parseColor(hex.ifEmpty { fallback }) } catch (_: IllegalArgumentException) { Color.parseColor(fallback) } - /** Steam Link's d-pad: four shield-shaped arms pointing at the centre, outlined. */ private fun drawDpad(canvas: Canvas, e: Element, x: Float, y: Float, r: Float) { val dirs = if (editing) 0 else dpadBits(e) val armVisuals = visuals[SteamTouchConfig.DPAD].orEmpty() val isSelected = editing && selected >= 0 && editElements.indexOf(e) == selected - val half = r * 0.36f // half the arm's width - val outer = r // the arm's far end - val inner = r * 0.1f // the point, near the centre - val shoulder = r * 0.42f // where the sides turn into the point + val half = r * 0.36f + val outer = r + val inner = r * 0.1f + val shoulder = r * 0.42f val corner = r * 0.12f - // Arms in report order: up, down, left, right, as (bit, rotation). val arms = listOf(DPAD_UP to 0f, DPAD_DOWN to 180f, DPAD_LEFT to 270f, DPAD_RIGHT to 90f) val oldStroke = stroke.color for ((armIndex, armEntry) in arms.withIndex()) { @@ -560,7 +501,6 @@ class SteamTouchControls( canvas.drawPath(path, stroke) canvas.restore() if (icon != null) { - // Upright, in the middle of the arm. val c = (outer + shoulder) / 2f val (ax, ay) = when (armIndex) { 0 -> x to y - c; 1 -> x to y + c; 2 -> x - c to y; else -> x + c to y } val s = half * 0.8f @@ -579,7 +519,7 @@ class SteamTouchControls( SteamTouchConfig.STEAM -> "STEAM" SteamTouchConfig.THUMB -> "…" SteamTouchConfig.KEYBOARD -> "⌨" - SteamTouchConfig.PASTE -> "Paste" + SteamTouchConfig.PASTE -> context.getString(R.string.touch_paste) SteamTouchConfig.SELECT -> "⧉" SteamTouchConfig.START -> "☰" SteamTouchConfig.BUMPER_LEFT -> "LB" @@ -594,7 +534,6 @@ class SteamTouchControls( else -> "?" } - // ---- The report ---- private fun dpadBits(e: Element): Long { var bits = 0L @@ -603,7 +542,6 @@ class SteamTouchControls( val dy = f.y - cy(e) if (hypot(dx, dy) < radius(e) * 0.22f) return@forEach val angle = Math.toDegrees(atan2(-dy, dx).toDouble()).let { if (it < 0) it + 360 else it } - // Eight sectors: each direction covers 67.5°, diagonals press two. if (angle < 67.5 || angle > 292.5) bits = bits or DPAD_RIGHT if (angle in 22.5..157.5) bits = bits or DPAD_UP if (angle in 112.5..247.5) bits = bits or DPAD_LEFT @@ -632,7 +570,7 @@ class SteamTouchControls( buttons = buttons or if (right) STICK_RIGHT_TOUCHED else STICK_LEFT_TOUCHED } SteamTouchConfig.TRACKPAD_CENTER, SteamTouchConfig.TRACKPAD_LEFT, SteamTouchConfig.TRACKPAD_RIGHT -> { - val index = e.type - SteamTouchConfig.TRACKPAD_CENTER // centre, left, right + val index = e.type - SteamTouchConfig.TRACKPAD_CENTER val nx = ((f.x - (cx(e) - r)) / (2 * r)).coerceIn(0f, 1f) val ny = ((f.y - (cy(e) - radiusY(e))) / (2 * radiusY(e))).coerceIn(0f, 1f) pads[2 * index] = (((nx * 65535).toInt().coerceIn(0, 65535)) xor 0x8000).toShort() @@ -652,7 +590,6 @@ class SteamTouchControls( invalidate() } - // ---- Touch ---- @SuppressLint("ClickableViewAccessibility") override fun onTouchEvent(event: MotionEvent): Boolean { @@ -693,7 +630,6 @@ class SteamTouchControls( val f = fingers[event.getPointerId(i)] ?: continue f.x = event.getX(i) f.y = event.getY(i) - // A finger on a button can slide onto another, as on Steam Link. val e = f.element ?: continue if (BUTTON_BITS.containsKey(e.type)) { val over = hit(live(), f.x, f.y) @@ -725,12 +661,9 @@ class SteamTouchControls( return true } - // ---- Editing ---- val isEditing get() = editing - /** Moves, resizes and hides controls, action set by action set; Save writes them to the - * game's touch config. */ fun startEditing() { releaseAll() editing = true @@ -743,7 +676,6 @@ class SteamTouchControls( invalidate() } - // The action set being edited (its layout id), and the edits of every set visited. private var editSet = 1 private class EditState(val elements: MutableList<Element>, val hidden: MutableList<Element>) private val editSets = HashMap<Int, EditState>() @@ -751,7 +683,6 @@ class SteamTouchControls( private fun loadEditSet(id: Int) { editSet = id val state = editSets.getOrPut(id) { - // The device's action set numbering is the layout id. val available = config.availableFor(id, emptyList()) val shown = SteamTouchConfig.elementsFor(config, id, emptyList()) val els = available.mapNotNull { type -> @@ -815,7 +746,6 @@ class SteamTouchControls( val e = hit(editElements, x, y) selected = if (e != null) editElements.indexOf(e) else -1 if (e != null) dragOffset = (x - cx(e)) to (y - cy(e)) - // The D-pad's icons are per direction: a tap picks the one under the finger. if (e?.type == SteamTouchConfig.DPAD) { val dx = x - cx(e) val dy = y - cy(e) @@ -831,7 +761,6 @@ class SteamTouchControls( MotionEvent.ACTION_MOVE -> if (selected >= 0 && !trayOpen) { val e = editElements[selected] if (event.pointerCount >= 2 && pinchStart > 0f) { - // A pinch along one axis stretches that axis; a diagonal one scales both. val sx = abs(event.getX(0) - event.getX(1)) val sy = abs(event.getY(0) - event.getY(1)) val min = 40f * unit() @@ -849,7 +778,6 @@ class SteamTouchControls( MotionEvent.ACTION_POINTER_UP -> pinchStart = 0f MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> { pinchStart = 0f - // Dropped back on the menu button: back into the tray, as on Steam Link. val e = editElements.getOrNull(selected) if (e != null && editMenuButton().contains(cx(e), cy(e)) && e.type != SteamTouchConfig.THUMB) { hidden += editElements.removeAt(selected).copy(visible = false) @@ -880,44 +808,42 @@ class SteamTouchControls( } private fun controlName(type: Int) = when (type) { - SteamTouchConfig.DPAD -> "D-pad" - SteamTouchConfig.JOYSTICK_LEFT -> "Left stick" - SteamTouchConfig.JOYSTICK_RIGHT -> "Right stick" - SteamTouchConfig.TRACKPAD_LEFT -> "Left trackpad" - SteamTouchConfig.TRACKPAD_RIGHT -> "Right trackpad" - SteamTouchConfig.TRACKPAD_CENTER -> "Trackpad" + SteamTouchConfig.DPAD -> context.getString(R.string.touch_dpad) + SteamTouchConfig.JOYSTICK_LEFT -> context.getString(R.string.touch_left_stick) + SteamTouchConfig.JOYSTICK_RIGHT -> context.getString(R.string.touch_right_stick) + SteamTouchConfig.TRACKPAD_LEFT -> context.getString(R.string.deck_left_trackpad) + SteamTouchConfig.TRACKPAD_RIGHT -> context.getString(R.string.deck_right_trackpad) + SteamTouchConfig.TRACKPAD_CENTER -> context.getString(R.string.deck_surface_trackpad) SteamTouchConfig.STEAM -> "Steam" - SteamTouchConfig.THUMB -> "Menu" - SteamTouchConfig.KEYBOARD -> "Keyboard" + SteamTouchConfig.THUMB -> context.getString(R.string.touch_menu) + SteamTouchConfig.KEYBOARD -> context.getString(R.string.touch_keyboard) else -> label(type) } - /** Reset, copy and paste a layout, the layout's colour. */ private fun moreMenu() { val host = parent as? android.view.ViewGroup ?: return val density = resources.displayMetrics.density val list = android.widget.LinearLayout(context).apply { orientation = android.widget.LinearLayout.VERTICAL; setPadding((12 * density).toInt(), 0, (12 * density).toInt(), 0) } var close: () -> Unit = {} val copied = prefs.getString("copiedLayout", null) - fun item(name: String, enabled: Boolean = true, action: () -> Unit) = list.addView(android.widget.Button(context).apply { - text = name + fun item(name: Int, enabled: Boolean = true, action: () -> Unit) = list.addView(android.widget.Button(context).apply { + setText(name) isAllCaps = false isEnabled = enabled setOnClickListener { close(); action(); invalidate() } }) - item("Colour and opacity…") { pickColor() } - item("Copy this layout") { + item(R.string.touch_color_opacity) { pickColor() } + item(R.string.touch_copy_layout) { prefs.edit().putString("copiedLayout", (editElements + hidden).joinToString(";") { "${it.type},${it.visible},${it.x},${it.y},${it.xScale},${it.yScale}" }).apply() - Toast.makeText(context, "Layout copied; paste it into any game's touch layout", Toast.LENGTH_SHORT).show() + Toast.makeText(context, R.string.touch_layout_copied, Toast.LENGTH_SHORT).show() } - item("Paste copied layout", copied != null) { pasteLayout(copied ?: "") } - item("Reset to Steam's default") { resetEditSet() } - close = SteamTouchIconPicker.showPanel(host, "Layout", list, listOf("Close" to {})) + item(R.string.touch_paste_layout, copied != null) { pasteLayout(copied ?: "") } + item(R.string.touch_reset_layout) { resetEditSet() } + close = SteamTouchIconPicker.showPanel(host, context.getString(R.string.ctrl_layout), list, listOf(context.getString(R.string.common_close) to {})) } - /** A copied layout onto this action set: each control the set has takes the copied place. */ private fun pasteLayout(copied: String) { val placed = copied.split(';').mapNotNull { row -> val f = row.split(',') @@ -931,30 +857,21 @@ class SteamTouchControls( selected = -1 } - // ---- Steam Link's menu ---- - /** The menu button: Steam Link's touch menu. */ private fun openMenu() { releaseAll() menuOpen = true invalidate() } - // ---- Steam Link's panels: the touch menu and the layout tray ---- - // - // Drawn here, on this view, to Steam Link's measurements (a 624x400 panel in its reference - // pixels, navy with a blue top rule, blue tiles), so that controls can be dragged out of the tray - // onto the screen as on Steam Link. private var menuOpen = false private var trayOpen = false - /** A hit area on a panel and what it does. */ private class Hot(val rect: RectF, val onTap: () -> Unit, val onDown: ((Float, Float) -> Unit)? = null) private val hots = mutableListOf<Hot>() private var trayDrag: Element? = null - // DroidDeck's own palette (ui/Theme.kt, the default theme). private val surface = Color.rgb(18, 20, 23) private val surfaceVariant = Color.rgb(26, 29, 34) private val line = Color.rgb(38, 42, 49) @@ -964,7 +881,6 @@ class SteamTouchControls( private val accent = Color.rgb(26, 159, 255) private val onAccent = Color.rgb(3, 17, 31) - /** The panel's rectangle and its scale (screen pixels per reference pixel). */ private fun panelFrame(): Pair<RectF, Float> { val s = min(width * 0.8f / 624f, height * 0.78f / 400f) val w = 624f * s @@ -985,16 +901,15 @@ class SteamTouchControls( RectF(frame.left + l * s, frame.top + t * s, frame.left + r * s, frame.top + b * s) private fun text(canvas: Canvas, str: String, x: Float, y: Float, size: Float, color: Int = Color.WHITE, bold: Boolean = true, - align: Paint.Align = Paint.Align.CENTER) { + align: Paint.Align = Paint.Align.CENTER, maxWidth: Float = 0f) { val p = Paint(Paint.ANTI_ALIAS_FLAG).apply { this.color = color; textSize = size; textAlign = align typeface = if (bold) android.graphics.Typeface.DEFAULT_BOLD else android.graphics.Typeface.DEFAULT } + if (maxWidth > 0f) p.measureText(str).let { if (it > maxWidth) p.textSize = size * maxWidth / it } canvas.drawText(str, x, y - (p.descent() + p.ascent()) / 2, p) } - /** A button in DroidDeck's style: the accent filled for the main action, a quiet outlined - * surface otherwise. */ private fun blueButton(canvas: Canvas, r: RectF, text: String, s: Float, enabled: Boolean = true, primary: Boolean = false, onTap: () -> Unit) { val radius = 12f * s if (primary && enabled) { @@ -1004,11 +919,10 @@ class SteamTouchControls( canvas.drawRoundRect(r, radius, radius, Paint(Paint.ANTI_ALIAS_FLAG).apply { color = line2; style = Paint.Style.STROKE; strokeWidth = 1.2f * s }) } val ink = when { !enabled -> Color.argb(110, 242, 244, 247); primary -> onAccent; else -> onSurface } - text(canvas, text, r.centerX(), r.centerY(), 14f * s, ink) + text(canvas, text, r.centerX(), r.centerY(), 14f * s, ink, maxWidth = r.width() - 16f * s) if (enabled) hots += Hot(r, onTap) } - /** A toggle: quiet when off, accent-tinted with an accent glyph when on. */ private fun iconButton(canvas: Canvas, r: RectF, active: Boolean, onTap: () -> Unit, glyph: (Canvas, RectF, Int) -> Unit) { val radius = 10f * (r.height() / 40f) canvas.drawRoundRect(r, radius, radius, Paint(Paint.ANTI_ALIAS_FLAG).apply { @@ -1044,7 +958,7 @@ class SteamTouchControls( BIG_PICTURE -> "Steam" else -> gameNames[appId] ?: run { val app = appId - gameNames[app] = "app $app" + gameNames[app] = context.getString(R.string.touch_app_id, app) loader.execute { val name = SteamTouchConfig.gameName(context, app) ?: return@execute handler.post { gameNames[app] = name; invalidate() } @@ -1053,15 +967,13 @@ class SteamTouchControls( } } - // -- The touch menu (Steam Link: CVirtualController's choose-mode screen) -- private fun drawMenu(canvas: Canvas) { val (f, s) = panelFrame() canvas.panel(f, s) - // Header: power (DroidDeck's own menu: stop, settings), the Steam mark, what is running, close. iconButton(canvas, ref(f, s, 494f, 18f, 531f, 55f), false, { menuOpen = false; onMenu() }) { c, r, col -> drawPower(c, r, col) } drawMark(canvas, f.left + 104f * s, f.top + 37f * s, 13f * s) - text(canvas, "Touch controls", f.left + 124f * s, f.top + 30f * s, 14f * s, onSurface, align = Paint.Align.LEFT) + text(canvas, context.getString(R.string.touch_title), f.left + 124f * s, f.top + 30f * s, 14f * s, onSurface, align = Paint.Align.LEFT) text(canvas, gameName(), f.left + 124f * s, f.top + 46f * s, 11f * s, muted, bold = false, align = Paint.Align.LEFT) closeButton(canvas, f, s) { menuOpen = false } val controller = options.inputMode != SteamTouchConfig.INPUT_MOUSE @@ -1071,13 +983,12 @@ class SteamTouchControls( m -> SteamTouchConfig.INPUT_MOUSE else -> SteamTouchConfig.INPUT_CONTROLLER })) - tile(canvas, ref(f, s, 45f, 81f, 249f, 271f), s, "Touch Controller", controller, { setModes(!controller, mouse || controller) }) { c, r, col -> + tile(canvas, ref(f, s, 45f, 81f, 249f, 271f), s, context.getString(R.string.touch_controller), controller, { setModes(!controller, mouse || controller) }) { c, r, col -> drawPhonePad(c, r, col) } - tile(canvas, ref(f, s, 271f, 81f, 475f, 271f), s, "Mouse", mouse, { setModes(controller || mouse, !mouse) }) { c, r, col -> + tile(canvas, ref(f, s, 271f, 81f, 475f, 271f), s, context.getString(R.string.touch_mouse), mouse, { setModes(controller || mouse, !mouse) }) { c, r, col -> drawMouse(c, r, col, crossed = false) } - // Under the controller: gyroscope, fade, vibrate on touch. iconButton(canvas, ref(f, s, 45f, 278f, 91f, 318f), gyroOn, { gyroOn = !gyroOn; device.motionEnabled = gyroOn; prefs.edit().putBoolean("gyro", gyroOn).apply() }) { c, r, col -> drawGyro(c, r, col) } @@ -1090,7 +1001,6 @@ class SteamTouchControls( iconButton(canvas, ref(f, s, 204f, 278f, 249f, 318f), feedback, { feedback = !feedback; prefs.edit().putBoolean("feedback", feedback).apply() }) { c, r, col -> drawHaptic(c, r, col) } - // Under the mouse: direct touch, trackpad, trackpad speed. val relative = options.mouseMode == SteamTouchConfig.MOUSE_RELATIVE iconButton(canvas, ref(f, s, 271f, 278f, 333f, 318f), mouse && !relative, { setOptions(options.copy(mouseMode = SteamTouchConfig.MOUSE_ABSOLUTE)) @@ -1102,17 +1012,18 @@ class SteamTouchControls( val speed = speeds.indexOfFirst { abs(it - options.trackpadSensitivity) < 0.2f }.coerceAtLeast(1) iconButton(canvas, ref(f, s, 412f, 278f, 475f, 318f), mouse && relative, { setOptions(options.copy(trackpadSensitivity = speeds[(speed + 1) % speeds.size])) - }) { c, r, col -> text(c, listOf("Slow", "Normal", "Fast")[speed], r.centerX(), r.centerY(), r.height() * 0.32f, col) } + }) { c, r, col -> + val name = context.getString(listOf(R.string.touch_speed_slow, R.string.touch_speed_normal, R.string.touch_speed_fast)[speed]) + text(c, name, r.centerX(), r.centerY(), r.height() * 0.32f, col, maxWidth = r.width() - 6f * s) + } drawVolume(canvas, f, s) - blueButton(canvas, ref(f, s, 45f, 329f, 249f, 372f), "Edit layout", s, primary = true) { menuOpen = false; startEditing() } - blueButton(canvas, ref(f, s, 271f, 329f, 475f, 372f), "DroidDeck menu", s) { menuOpen = false; onMenu() } + blueButton(canvas, ref(f, s, 45f, 329f, 249f, 372f), context.getString(R.string.touch_edit_layout), s, primary = true) { menuOpen = false; startEditing() } + blueButton(canvas, ref(f, s, 271f, 329f, 475f, 372f), context.getString(R.string.touch_droiddeck_menu), s) { menuOpen = false; onMenu() } } private val audio by lazy { context.getSystemService(Context.AUDIO_SERVICE) as android.media.AudioManager } private var volumeSlider = RectF() - /** Steam Link's audio column: the speaker (mute), its volume slider - the device's media - * volume here - and the microphone, which DroidDeck does not stream, shown off. */ private fun drawVolume(canvas: Canvas, f: RectF, s: Float) { val stream = android.media.AudioManager.STREAM_MUSIC val maxVol = audio.getStreamMaxVolume(stream).coerceAtLeast(1) @@ -1131,7 +1042,6 @@ class SteamTouchControls( canvas.drawRoundRect(RectF(inner.left, knobY, inner.right, inner.bottom), inner.width() / 2, inner.width() / 2, Paint(Paint.ANTI_ALIAS_FLAG).apply { color = accent }) canvas.drawCircle(inner.centerX(), knobY, inner.width() / 2 * 1.05f, Paint(Paint.ANTI_ALIAS_FLAG).apply { color = onSurface }) - // The mic's slider, dimmed. val micTrack = ref(f, s, 539f, 133f, 577f, 372f) canvas.drawRoundRect(micTrack, micTrack.width() / 2, micTrack.width() / 2, Paint(stroke).apply { color = Color.argb(60, 255, 255, 255) }) hots += Hot(track, {}) { _, y -> setVolumeAt(y) } @@ -1166,26 +1076,23 @@ class SteamTouchControls( c.drawLine(x - u * 2.4f, y - u * 2.4f, x + u * 2.4f, y + u * 2.4f, glyphPaint(Color.rgb(200, 40, 40), r.height() * 0.07f)) } - /** A mode card: tap to turn it on or off; the accent marks it on. */ private fun tile(canvas: Canvas, r: RectF, s: Float, title: String, on: Boolean, toggle: () -> Unit, art: (Canvas, RectF, Int) -> Unit) { val radius = 14f * s canvas.drawRoundRect(r, radius, radius, Paint(Paint.ANTI_ALIAS_FLAG).apply { color = surfaceVariant }) canvas.drawRoundRect(r, radius, radius, Paint(Paint.ANTI_ALIAS_FLAG).apply { color = if (on) accent else line; style = Paint.Style.STROKE; strokeWidth = (if (on) 2f else 1.2f) * s }) - text(canvas, title, r.left + 16f * s, r.top + 22f * s, 14f * s, onSurface, align = Paint.Align.LEFT) - // A switch, top right. + text(canvas, title, r.left + 16f * s, r.top + 22f * s, 14f * s, onSurface, align = Paint.Align.LEFT, maxWidth = r.width() - 72f * s) val sw = RectF(r.right - 50f * s, r.top + 12f * s, r.right - 14f * s, r.top + 32f * s) canvas.drawRoundRect(sw, sw.height() / 2, sw.height() / 2, Paint(Paint.ANTI_ALIAS_FLAG).apply { color = if (on) accent else line2 }) canvas.drawCircle(if (on) sw.right - sw.height() / 2 else sw.left + sw.height() / 2, sw.centerY(), sw.height() * 0.38f, Paint(Paint.ANTI_ALIAS_FLAG).apply { color = if (on) onAccent else muted }) val artRect = RectF(r.centerX() - 58f * s, r.top + 62f * s, r.centerX() + 58f * s, r.top + 140f * s) art(canvas, artRect, if (on) onSurface else muted) - text(canvas, if (on) "On" else "Off", r.left + 16f * s, r.bottom - 18f * s, 12f * s, if (on) accent else muted, bold = false, align = Paint.Align.LEFT) + text(canvas, context.getString(if (on) R.string.touch_on else R.string.touch_off), r.left + 16f * s, r.bottom - 18f * s, 12f * s, if (on) accent else muted, bold = false, align = Paint.Align.LEFT) hots += Hot(r, toggle) } - // -- The layout tray (Steam Link: CVirtualController's tray) -- private fun drawTray(canvas: Canvas) { val (f, s) = panelFrame() @@ -1194,9 +1101,9 @@ class SteamTouchControls( closeButton(canvas, f, s) { save() } val sets = SteamTouchConfig.actionSets(config) val setName = sets.firstOrNull { it.first == editSet }?.second - val title = if (sets.size > 1 && setName != null) "${gameName()} · $setName" else "${gameName()} ${config.title ?: "Layout"}" - text(canvas, title, f.centerX(), f.top + 30f * s, 14f * s, onSurface) - text(canvas, "Drag controls onto the screen", f.centerX(), f.top + 47f * s, 11f * s, muted, bold = false) + val title = if (sets.size > 1 && setName != null) "${gameName()} · $setName" else "${gameName()} ${config.title ?: context.getString(R.string.ctrl_layout)}" + text(canvas, title, f.centerX(), f.top + 30f * s, 14f * s, onSurface, maxWidth = f.width() - 200f * s) + text(canvas, context.getString(R.string.touch_drag_hint), f.centerX(), f.top + 47f * s, 11f * s, muted, bold = false, maxWidth = f.width() - 200f * s) if (sets.size > 1) { arrowPill(canvas, ref(f, s, 120f, 26f, 150f, 44f), -1) { stepEditSet(-1) } arrowPill(canvas, ref(f, s, 474f, 26f, 504f, 44f), 1) { stepEditSet(1) } @@ -1241,7 +1148,6 @@ class SteamTouchControls( item(SteamTouchConfig.MACRO_0 + i, 519f, 228f + 43f * i, 14f) item(SteamTouchConfig.MACRO_0 + 4 + i, 562f, 228f + 43f * i, 14f) } - // The colour wheel: the layout's colour and opacity. val wheel = ref(f, s, 511f, 91f, 573f, 153f) canvas.drawCircle(wheel.centerX(), wheel.centerY(), wheel.width() / 2f, Paint(Paint.ANTI_ALIAS_FLAG).apply { shader = android.graphics.SweepGradient(wheel.centerX(), wheel.centerY(), @@ -1251,8 +1157,8 @@ class SteamTouchControls( shader = android.graphics.RadialGradient(wheel.centerX(), wheel.centerY(), wheel.width() / 2f, Color.WHITE, Color.TRANSPARENT, android.graphics.Shader.TileMode.CLAMP) }) hots += Hot(wheel, { pickColor() }) - blueButton(canvas, ref(f, s, 45f, 329f, 232f, 372f), "Arrange", s, primary = true) { trayOpen = false } - blueButton(canvas, ref(f, s, 254f, 329f, 441f, 372f), "Discard", s) { stopEditing() } + blueButton(canvas, ref(f, s, 45f, 329f, 232f, 372f), context.getString(R.string.touch_arrange), s, primary = true) { trayOpen = false } + blueButton(canvas, ref(f, s, 254f, 329f, 441f, 372f), context.getString(R.string.touch_discard), s) { stopEditing() } } private fun arrowPill(canvas: Canvas, r: RectF, dir: Int, onTap: () -> Unit) { @@ -1265,7 +1171,6 @@ class SteamTouchControls( hots += Hot(RectF(r.left - r.height() * 0.4f, r.top - r.height() * 0.6f, r.right + r.height() * 0.4f, r.bottom + r.height() * 0.6f), onTap) } - /** A control taken out of the tray: on screen under the finger, following it until it lifts. */ private fun beginTrayDrag(type: Int, x: Float, y: Float) { val available = config.availableFor(editSet, emptyList()) val existing = editElements.indexOfFirst { it.type == type } @@ -1281,7 +1186,6 @@ class SteamTouchControls( invalidate() } - // -- While editing: Steam Link's menu button, and a small bar for the selected control -- private fun editMenuButton(): RectF { val r = 37f * unit() @@ -1290,7 +1194,10 @@ class SteamTouchControls( return RectF(x - r, y - r, x + r, y + r) } - private val contextLabels = listOf("Icon", "W−", "W+", "H−", "H+", "Hide") + private val contextLabels by lazy { + listOf(R.string.touch_icon, R.string.touch_narrower, R.string.touch_wider, R.string.touch_shorter, R.string.touch_taller, R.string.touch_hide) + .map(context::getString) + } private fun contextRects(): List<RectF> { val e = editElements.getOrNull(selected) ?: return emptyList() @@ -1313,11 +1220,11 @@ class SteamTouchControls( canvas.drawRoundRect(m, m.width() * 0.15f, m.width() * 0.15f, p) drawDots(canvas, m.centerX(), m.centerY() - m.height() * 0.1f, m.width() * 0.5f, Color.WHITE) hots += Hot(m, { trayOpen = true }) - if (saving) text(canvas, "Saving…", width / 2f, height * 0.08f, 22f * max(unit(), 0.6f)) + if (saving) text(canvas, context.getString(R.string.touch_saving), width / 2f, height * 0.08f, 22f * max(unit(), 0.6f)) contextRects().forEachIndexed { i, r -> canvas.drawRoundRect(r, r.height() * 0.3f, r.height() * 0.3f, Paint(Paint.ANTI_ALIAS_FLAG).apply { color = surface }) canvas.drawRoundRect(r, r.height() * 0.3f, r.height() * 0.3f, Paint(Paint.ANTI_ALIAS_FLAG).apply { color = line2; style = Paint.Style.STROKE; strokeWidth = 1.2f }) - text(canvas, contextLabels[i], r.centerX(), r.centerY(), r.height() * 0.4f, onSurface, bold = false) + text(canvas, contextLabels[i], r.centerX(), r.centerY(), r.height() * 0.4f, onSurface, bold = false, maxWidth = r.width() - 6f) hots += Hot(r, { contextTool(i) }) } } @@ -1332,7 +1239,6 @@ class SteamTouchControls( invalidate() } - // -- Glyphs for the menu's buttons -- private fun glyphPaint(col: Int, w: Float) = Paint(Paint.ANTI_ALIAS_FLAG).apply { color = col; style = Paint.Style.STROKE; strokeWidth = w; strokeCap = Paint.Cap.ROUND; strokeJoin = Paint.Join.ROUND @@ -1422,8 +1328,6 @@ class SteamTouchControls( Paint(Paint.ANTI_ALIAS_FLAG).apply { color = col }) } - /** New per-game input options: applied now, and saved into the game's touch layout as Steam - * Link saves them, so they follow the game and the account. */ private fun setOptions(next: SteamTouchConfig.Options) { pendingOptions = next options = next @@ -1441,26 +1345,26 @@ class SteamTouchControls( } } - /** The selected control's icon, label and colours (a D-pad direction: the one tapped). */ private fun pickIcon(e: Element) { val list = visuals[e.type].orEmpty() val visual = list.getOrNull(if (e.type == SteamTouchConfig.DPAD) selectedArm else 0) val ref = visual?.ref val binding = visual?.binding if (ref == null || binding == null) { - Toast.makeText(context, "This control has no binding in Steam to put an icon on", Toast.LENGTH_SHORT).show() + Toast.makeText(context, R.string.touch_no_binding, Toast.LENGTH_SHORT).show() return } - val name = if (e.type == SteamTouchConfig.DPAD) "D-pad " + listOf("up", "down", "left", "right")[selectedArm] else label(e.type) + val name = if (e.type == SteamTouchConfig.DPAD) { + context.getString(listOf(R.string.touch_dpad_up, R.string.touch_dpad_down, R.string.touch_dpad_left, R.string.touch_dpad_right)[selectedArm]) + } else label(e.type) val host = parent as? android.view.ViewGroup ?: return - SteamTouchIconPicker(context, host, appId, "Icon for $name", binding) { picked -> + SteamTouchIconPicker(context, host, appId, context.getString(R.string.touch_icon_for, name), binding) { picked -> pendingBindings[ref] = picked rebuildVisuals() invalidate() }.show() } - /** The layout's colour and opacity, as Steam Link's colour picker sets them. */ private fun pickColor() { val current = pendingColor ?: SteamTouchConfig.layoutColor(config, actionSet) ?: floatArrayOf(1f, 1f, 1f, 0.45f) val density = resources.displayMetrics.density @@ -1480,9 +1384,9 @@ class SteamTouchControls( } }, android.widget.LinearLayout.LayoutParams(dp(30), dp(30)).apply { marginEnd = dp(6) }) } - root.addView(android.widget.TextView(context).apply { text = "Colour" }) + root.addView(android.widget.TextView(context).apply { setText(R.string.ctrl_color) }) root.addView(android.widget.HorizontalScrollView(context).apply { addView(swatchRow) }) - root.addView(android.widget.TextView(context).apply { text = "Opacity"; setPadding(0, dp(12), 0, 0) }) + root.addView(android.widget.TextView(context).apply { setText(R.string.ctrl_opacity); setPadding(0, dp(12), 0, 0) }) val opacityRow = android.widget.LinearLayout(context) listOf(20, 35, 50, 65, 80, 100).forEach { percent -> opacityRow.addView(android.widget.Button(context).apply { @@ -1497,7 +1401,7 @@ class SteamTouchControls( } root.addView(android.widget.HorizontalScrollView(context).apply { addView(opacityRow) }) val host = parent as? android.view.ViewGroup ?: return - SteamTouchIconPicker.showPanel(host, "Touch layout colour", root, listOf("Done" to {})) + SteamTouchIconPicker.showPanel(host, context.getString(R.string.touch_layout_color), root, listOf(context.getString(R.string.touch_done) to {})) } private fun save() { @@ -1511,8 +1415,6 @@ class SteamTouchControls( } val color = pendingColor val colors = if (color != null) sets.keys.associateWith { color } else emptyMap() - // A picked icon replaces the label, icon and colours of every binding of that input; what - // the binding does stays as it is. val bindings = pendingBindings.mapValues { (_, picked) -> { old: SteamTouchBindings.Binding -> old.copy(label = picked.label, icon = picked.icon, foreground = picked.foreground, background = picked.background) @@ -1528,11 +1430,11 @@ class SteamTouchControls( handler.post { saving = false if (file == null) { - Toast.makeText(context, "Could not save the touch layout", Toast.LENGTH_SHORT).show() + Toast.makeText(context, R.string.touch_save_failed, Toast.LENGTH_SHORT).show() invalidate() return@post } - Toast.makeText(context, "Touch layout saved to Steam", Toast.LENGTH_SHORT).show() + Toast.makeText(context, R.string.touch_saved, Toast.LENGTH_SHORT).show() onSaved() stopEditing() reloadConfig() @@ -1540,7 +1442,6 @@ class SteamTouchControls( } } - /** Called after a save: the client reads the config again when the controller reconnects. */ var onSaved: () -> Unit = {} companion object { @@ -1548,7 +1449,6 @@ class SteamTouchControls( private const val POLL_MS = 150L const val BIG_PICTURE = 769 private const val ICON_PX = 128 - // artwork/droiddeck-mark.svg: the D's two halves, the orb's ring cut out (Wordmark.kt). private const val MARK_D = "M-31.98 0H56.055V40.489A71.81 71.81 0 0 0 56.055 183.231V223.72H-31.98Z" + "M71.885 0.28A111.86 111.86 0 0 1 71.885 223.44V183.234A71.81 71.81 0 0 0 71.885 40.486Z" private const val FADE_AFTER_MS = 5000L @@ -1563,7 +1463,6 @@ class SteamTouchControls( private const val STICK_RIGHT_TOUCHED = 1L shl 47 private val TRACKPAD_TOUCHED = longArrayOf(1L shl 27, 1L shl 19, 1L shl 20) - /** Steam Link's button bits (CVirtualController's table, by element type). */ private val BUTTON_BITS: Map<Int, Long> = buildMap { put(SteamTouchConfig.STEAM, 1L shl 13) put(SteamTouchConfig.JOYSTICK_LEFT_BUTTON, 1L shl 22) @@ -1581,7 +1480,6 @@ class SteamTouchControls( for (i in 0 until 8) put(SteamTouchConfig.MACRO_0 + i, 1L shl (32 + i)) put(SteamTouchConfig.MACRO_1_FINGER, 1L shl 48) put(SteamTouchConfig.MACRO_2_FINGER, 1L shl 49) - // Not bits: the menu and the keyboard are the app's own. put(SteamTouchConfig.THUMB, 0L) put(SteamTouchConfig.KEYBOARD, 0L) put(SteamTouchConfig.PASTE, 0L) diff --git a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchDevice.kt b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchDevice.kt index f0c30b971d..2d63358d3d 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchDevice.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchDevice.kt @@ -7,20 +7,8 @@ import java.nio.ByteOrder import java.nio.ByteBuffer import java.nio.channels.FileChannel -/** - * Steam's touch controller, as the app's side of it. - * - * libfakeinput offers the Steam client a HID device with the ids of Steam Link's touch controls - * (0000:11fb), and the client builds its own touch controller for it: Steam Input's Mobile Touch - * type, with the game's touch config, action sets, community configs and cloud sync all Steam's - * (docs/development/steam-touch-controller.md). This class is the file the two share - * (fakeinput_steam.cpp: TouchRingFile): the app writes the device's 40-byte input report and - * whether it is plugged in; libfakeinput writes back what the client told the device - the app and - * action set it is on, its layers, rumble. - */ class SteamTouchDevice private constructor(private val buffer: ByteBuffer) { - /** What the client last told the device. */ data class State( val opened: Int, val appId: Int, @@ -29,13 +17,9 @@ class SteamTouchDevice private constructor(private val buffer: ByteBuffer) { val actionSeq: Int, ) - // The input report (Steam Link's CVirtualController, docs/development/steam-touch-controller.md): - // bytes 0-7 buttons, 8-15 sticks, 16-27 trackpads, 28-33 accelerometer, 34-39 gyro. private val report = ByteArray(REPORT_BYTES) private var reportSeq = 0L - /** The controls part of the report: button bits, sticks (LX, LY, RX, RY, already in the report's - * units) and trackpads (centre, left, right: x, y each). */ @Synchronized fun setControls(buttons: Long, sticks: ShortArray, pads: ShortArray) { val next = report.copyOf() @@ -45,27 +29,19 @@ class SteamTouchDevice private constructor(private val buffer: ByteBuffer) { publish(next) } - /** Motion in the Deck's axes and units (PadMotion), which the touch report shares. */ @Synchronized fun setMotion(accel: ShortArray, gyro: ShortArray) { - // Sent only while the client asks for it (setting report 0x30, which Steam Link reads as - // "gyro on") and the player has not turned motion off - as Steam Link does. if (!plugged || !gyroRequested || !motionEnabled) return val next = report.copyOf() for (i in 0 until 3) { - // Accelerometer: the Deck's 1 g = 16384 is the touch report's ±2 g = ±32767 already. putShort(next, 28 + 2 * i, accel[i]) - // Gyro: the Deck's 2000 °/s = 32768; the touch report's full scale is 1000 °/s - // (Steam Link: rad/s × 180/π / 1000 × 32767). putShort(next, 34 + 2 * i, (gyro[i] * 2).coerceIn(-32767, 32767).toShort()) } publish(next) } - /** Whether the client has asked the device for motion (setting report 0x30 non-zero). */ val gyroRequested get() = buffer.getInt(OFF_SETTING30) != 0 - /** The player's motion switch (Steam Link's gyroscope option). */ @Volatile var motionEnabled = true set(value) { field = value @@ -81,7 +57,6 @@ class SteamTouchDevice private constructor(private val buffer: ByteBuffer) { into[at + 1] = (value.toInt() shr 8).toByte() } - /** Writes the report under the seqlock libfakeinput reads it with. */ private fun publish(next: ByteArray) { if (next.contentEquals(report)) return next.copyInto(report) @@ -122,7 +97,7 @@ class SteamTouchDevice private constructor(private val buffer: ByteBuffer) { private const val TAG = "SteamTouch" const val REPORT_BYTES = 40 private const val SIZE = 256 - private const val MAGIC = 0x31484354 // TCH1 + private const val MAGIC = 0x31484354 private const val OFF_REPORT_SEQ = 8 private const val OFF_REPORT = 16 private const val OFF_PLUGGED = 56 @@ -140,10 +115,8 @@ class SteamTouchDevice private constructor(private val buffer: ByteBuffer) { var current: SteamTouchDevice? = null private set - /** The shared file in the session's pad directory, made fresh each session. */ fun ringFile(fakeInputDir: File) = File(fakeInputDir, "touchctl") - /** Creates the file for a new session (unplugged) and maps it. */ fun prepare(fakeInputDir: File): File? = try { val file = ringFile(fakeInputDir) file.delete() diff --git a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchIconPicker.kt b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchIconPicker.kt index ce7f28fd6e..17d665f503 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/SteamTouchIconPicker.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/SteamTouchIconPicker.kt @@ -21,13 +21,9 @@ import android.widget.HorizontalScrollView import android.widget.ImageView import android.widget.LinearLayout import android.widget.TextView +import com.droiddeck.launcher.R import java.util.concurrent.Executors -/** - * Picks a touch control's icon, label and colours the way Steam's configurator does: an icon from - * the game's own `TouchMenuIcons` and Steam's binding icon library, a foreground and a background - * from Steam's palette. [onPicked] gets the binding with the new fields (the action untouched). - */ class SteamTouchIconPicker( private val context: Context, private val host: ViewGroup, @@ -46,11 +42,10 @@ class SteamTouchIconPicker( private fun dp(v: Int) = (v * density).toInt() fun show() { - // Side by side, for a landscape screen: what is picked on the left, the icons on the right. val root = LinearLayout(context).apply { orientation = LinearLayout.HORIZONTAL; setPadding(dp(16), dp(8), dp(16), 0) } val left = LinearLayout(context).apply { orientation = LinearLayout.VERTICAL } val label = EditText(context).apply { - hint = "Label (optional)" + setHint(R.string.touch_label_hint) setText(current.label) inputType = InputType.TYPE_CLASS_TEXT setSingleLine() @@ -77,21 +72,22 @@ class SteamTouchIconPicker( setPadding(0, dp(8), 0, 0) addView(preview, LinearLayout.LayoutParams(dp(56), dp(56))) addView(TextView(context).apply { - text = if (names.isEmpty()) "Steam's icons were not found" else "${names.size} icons from Steam" + text = if (names.isEmpty()) context.getString(R.string.touch_icons_missing) + else context.resources.getQuantityString(R.plurals.touch_icons_found, names.size, names.size) setPadding(dp(12), 0, 0, 0) }) }) - left.addView(paletteRow("Icon colour", { foreground }) { foreground = it; adapter.notifyDataSetChanged(); updatePreview(preview) }) - left.addView(paletteRow("Button colour", { background }) { background = it; adapter.notifyDataSetChanged(); updatePreview(preview) }) + left.addView(paletteRow(context.getString(R.string.touch_icon_color), { foreground }) { foreground = it; adapter.notifyDataSetChanged(); updatePreview(preview) }) + left.addView(paletteRow(context.getString(R.string.touch_button_color), { background }) { background = it; adapter.notifyDataSetChanged(); updatePreview(preview) }) root.addView(left, LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1f)) root.addView(grid, LinearLayout.LayoutParams(0, dp(250), 1.2f).apply { marginStart = dp(16) }) updatePreview(preview) showPanel(host, title, root, listOf( - "No icon" to { + context.getString(R.string.touch_no_icon) to { onPicked(current.copy(label = label.text.toString().replace(",", " ").trim(), icon = "", foreground = "", background = "")) }, - "Cancel" to {}, - "Use" to { + context.getString(R.string.common_cancel) to {}, + context.getString(R.string.common_use) to { onPicked(current.copy(label = label.text.toString().replace(",", " ").trim(), icon = icon, foreground = if (icon.isEmpty()) "" else foreground, background = if (icon.isEmpty()) "" else background)) }, @@ -130,8 +126,6 @@ class SteamTouchIconPicker( } } - /** The icon as Steam draws it: on a disc of the background colour, filled with the foreground - * through its own alpha. */ private fun render(icon: Bitmap, size: Int): Bitmap { val out = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888) val canvas = Canvas(out) @@ -146,7 +140,6 @@ class SteamTouchIconPicker( private val loading = HashSet<String>() private var refreshQueued = false - /** Loads an icon in the background; the grid redraws from the cache once some have come in. */ private fun load(name: String) { if (!loading.add(name)) return loader.execute { @@ -187,7 +180,6 @@ class SteamTouchIconPicker( return view } - // One thumbnail per icon and colour, reused when the grid rebinds. private val thumbs = android.util.LruCache<String, Bitmap>(64) private fun tinted(name: String, icon: Bitmap): Bitmap { @@ -202,10 +194,6 @@ class SteamTouchIconPicker( } companion object { - /** - * A panel over the session, in the session's own window: a dialog's window of its own left - * new bitmaps and layers undrawn in the session window afterwards on the Thor. - */ fun showPanel(host: ViewGroup, title: String, content: View, buttons: List<Pair<String, () -> Unit>>, onClose: () -> Unit = {}): () -> Unit { val context = host.context val density = context.resources.displayMetrics.density @@ -215,7 +203,6 @@ class SteamTouchIconPicker( isClickable = true isFocusable = true } - // DroidDeck's panel: dark surface, rounded, a hairline border. val card = LinearLayout(context).apply { orientation = LinearLayout.VERTICAL background = GradientDrawable().apply { @@ -264,8 +251,6 @@ class SteamTouchIconPicker( return { if (scrim.parent != null) close() } } - /** Steam's binding icon look (steamui: the icon multiplied with its foreground colour, - * background-blend-mode: multiply, keeping the icon's own alpha). */ fun drawSteamIcon(canvas: Canvas, icon: Bitmap, into: android.graphics.RectF, foreground: Int, paint: Paint) { val tint = Paint(paint).apply { colorFilter = PorterDuffColorFilter(foreground, PorterDuff.Mode.MULTIPLY) } canvas.drawBitmap(icon, null, into, tint) diff --git a/app/src/main/java/com/droiddeck/launcher/input/ThreeFingerTap.kt b/app/src/main/java/com/droiddeck/launcher/input/ThreeFingerTap.kt new file mode 100644 index 0000000000..4d88ba4e62 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/input/ThreeFingerTap.kt @@ -0,0 +1,55 @@ +package com.droiddeck.launcher.input + +import android.view.MotionEvent +import kotlin.math.hypot + +class ThreeFingerTap(private val slopPx: Float) { + var active = false + private set + + private val starts = HashMap<Int, Pair<Float, Float>>() + private var downAt = 0L + private var threeAt = 0L + private var valid = false + + fun onTouch(event: MotionEvent): Boolean { + when (event.actionMasked) { + MotionEvent.ACTION_DOWN -> { + starts.clear() + active = false + valid = true + downAt = event.eventTime + note(event, event.actionIndex) + } + MotionEvent.ACTION_POINTER_DOWN -> { + note(event, event.actionIndex) + if (event.pointerCount > 3) valid = false + if (event.pointerCount == 3 && !active) { + active = true + threeAt = event.eventTime + if (threeAt - downAt > LAND_MS) valid = false + } + } + MotionEvent.ACTION_MOVE -> for (i in 0 until event.pointerCount) { + val start = starts[event.getPointerId(i)] ?: continue + if (hypot(event.getX(i) - start.first, event.getY(i) - start.second) > slopPx) valid = false + } + MotionEvent.ACTION_UP -> { + val fired = active && valid && event.eventTime - threeAt < TAP_MS + active = false + return fired + } + MotionEvent.ACTION_CANCEL -> active = false + } + return false + } + + private fun note(event: MotionEvent, index: Int) { + starts[event.getPointerId(index)] = event.getX(index) to event.getY(index) + } + + private companion object { + const val LAND_MS = 250L + const val TAP_MS = 350L + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/input/TouchpadGestures.kt b/app/src/main/java/com/droiddeck/launcher/input/TouchpadGestures.kt index d17b096e94..2dc403a43a 100644 --- a/app/src/main/java/com/droiddeck/launcher/input/TouchpadGestures.kt +++ b/app/src/main/java/com/droiddeck/launcher/input/TouchpadGestures.kt @@ -5,30 +5,10 @@ import android.os.Looper import android.view.MotionEvent import kotlin.math.abs -/** - * The screen as a touchpad, the way Bannerlator's desktop containers work: the arrow is where it - * was, and a finger dragged anywhere moves it from there. - * - * - drag one finger .................. moves the pointer (relative, with a little acceleration) - * - tap .............................. left click, where the pointer is - * - second finger taps while one holds right click - * - two-finger tap ................... right click - * - two fingers up / down ............ scroll wheel - * - hold still, then drag ............ left-button drag - * - double-tap, hold, drag ........... left-button drag as well - * - one finger held, another slides .. left-button drag, as on a laptop's pad: the held finger is - * the button, the other moves the pointer (a window by its - * title bar or edge, a desktop icon). The sliding finger may - * lift and slide again; lifting the held one drops. - * - * Positions handed to the listener are the pointer's, in the view's pixels; the caller keeps them - * inside the picture. - */ class TouchpadGestures( private val slopPx: Float, private val listener: PointerGestures.Listener, ) { - /** The pointer, tracked here since every move is relative. */ var x = 0f private set var y = 0f @@ -49,7 +29,6 @@ class TouchpadGestures( private var twoFingers = false private var scrollAnchorY = 0f private var scrolled = false - // Hold-and-slide: the first finger stays as the button, the second moves the pointer. private var anchorId = -1 private var anchorStartX = 0f private var anchorStartY = 0f @@ -59,15 +38,31 @@ class TouchpadGestures( private var moverLastX = 0f private var moverLastY = 0f private var holdDrag = false + private var clicked = 0 private val longPress = Runnable { held = true dragging = true listener.onLongPress() listener.onButton(PointerGestures.BTN_LEFT, true, x, y) } + private val clickUp = Runnable { releaseClick() } + + private fun click(button: Int) { + releaseClick() + listener.onButton(button, true, x, y) + clicked = button + handler.postDelayed(clickUp, CLICK_MS) + } + + private fun releaseClick() { + handler.removeCallbacks(clickUp) + if (clicked != 0) listener.onButton(clicked, false, x, y) + clicked = 0 + } fun cancel() { handler.removeCallbacks(longPress) + releaseClick() if (dragging) listener.onButton(PointerGestures.BTN_LEFT, false, x, y) dragging = false held = false @@ -85,11 +80,11 @@ class TouchpadGestures( fun onTouch(event: MotionEvent): Boolean { when (event.actionMasked) { MotionEvent.ACTION_DOWN -> { + releaseClick() lastX = event.x; lastY = event.y downAt = event.eventTime travelled = 0f; held = false; twoFingers = false; scrolled = false; secondWasTap = false anchorId = event.getPointerId(0); moverId = -1; holdDrag = false - // A tap shortly before this touch: holding now drags (double-tap-and-hold). if (event.eventTime - lastTapAt < DOUBLE_TAP_MS) { dragging = true listener.onButton(PointerGestures.BTN_LEFT, true, x, y) @@ -110,7 +105,6 @@ class TouchpadGestures( anchorStartX = event.getX(it); anchorStartY = event.getY(it) } } - // Mid-drag, a finger coming back only picks the sliding up again. if (holdDrag) return true twoFingers = true secondDownAt = event.eventTime @@ -123,8 +117,6 @@ class TouchpadGestures( val mi = if (moverId == -1) -1 else event.findPointerIndex(moverId) if (ai >= 0 && mi >= 0) { val mx = event.getX(mi); val my = event.getY(mi) - // One finger still, the other on the move: that is a drag, not a scroll (which - // moves both). Decided once, before anything has scrolled. if (!holdDrag && !scrolled) { val anchorMoved = abs(event.getX(ai) - anchorStartX) + abs(event.getY(ai) - anchorStartY) val moverMoved = abs(mx - moverStartX) + abs(my - moverStartY) @@ -148,7 +140,6 @@ class TouchpadGestures( return true } } else if (holdDrag) { - // Only the held finger is down: the drag waits for the next slide. return true } if (twoFingers && event.pointerCount >= 2) { @@ -169,7 +160,6 @@ class TouchpadGestures( travelled += abs(dx) + abs(dy) if (travelled > slopPx) { handler.removeCallbacks(longPress) - // A little acceleration: a slow finger is precise, a fast one crosses the screen. val speed = (abs(dx) + abs(dy)) val gain = sensitivity * (1f + minOf(speed / 40f, 1.5f)) place(x + dx * gain, y + dy * gain) @@ -181,7 +171,6 @@ class TouchpadGestures( val gone = event.getPointerId(event.actionIndex) if (holdDrag) { if (gone == anchorId) { - // The held finger lifted: drop. The other finger carries on as the pointer. listener.onButton(PointerGestures.BTN_LEFT, false, x, y) dragging = false; holdDrag = false; twoFingers = false anchorId = moverId; moverId = -1 @@ -196,16 +185,13 @@ class TouchpadGestures( } if (gone == moverId) moverId = -1 if (gone == anchorId) { - // The first finger left a two-finger gesture: the other one is the pointer now. anchorId = event.getPointerId(if (event.actionIndex == 0) 1 else 0) event.findPointerIndex(anchorId).takeIf { it >= 0 }?.let { lastX = event.getX(it); lastY = event.getY(it) } } - // The second finger lifting quickly, with nothing scrolled: a right click. if (twoFingers && secondWasTap && event.eventTime - secondDownAt < TAP_MS && !scrolled) { - listener.onButton(PointerGestures.BTN_RIGHT, true, x, y) - listener.onButton(PointerGestures.BTN_RIGHT, false, x, y) + click(PointerGestures.BTN_RIGHT) secondWasTap = false } return true @@ -216,15 +202,12 @@ class TouchpadGestures( when { dragging -> listener.onButton(PointerGestures.BTN_LEFT, false, x, y) twoFingers -> { - // Both fingers down and up together, no scroll: a right click. if (secondWasTap && !scrolled && !cancelled && event.eventTime - downAt < TAP_MS * 2) { - listener.onButton(PointerGestures.BTN_RIGHT, true, x, y) - listener.onButton(PointerGestures.BTN_RIGHT, false, x, y) + click(PointerGestures.BTN_RIGHT) } } !cancelled && travelled <= slopPx && event.eventTime - downAt < TAP_MS -> { - listener.onButton(PointerGestures.BTN_LEFT, true, x, y) - listener.onButton(PointerGestures.BTN_LEFT, false, x, y) + click(PointerGestures.BTN_LEFT) lastTapAt = event.eventTime } } @@ -239,6 +222,7 @@ class TouchpadGestures( companion object { private const val HOLD_MS = 500L private const val TAP_MS = 300L + private const val CLICK_MS = 50L private const val DOUBLE_TAP_MS = 300L private const val SCROLL_STEP_PX = 36f } diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/AppImageManager.kt b/app/src/main/java/com/droiddeck/launcher/runtime/AppImageManager.kt index 201acb1eb0..4fe191a218 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/AppImageManager.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/AppImageManager.kt @@ -11,14 +11,6 @@ import com.droiddeck.launcher.core.FileUtils import java.io.File import java.io.RandomAccessFile -/** - * AppImages the user brings: picked from storage, checked, and extracted once into the runtime at - * /opt/appimages/user/<id>/app. proot has no FUSE to mount an image, and extracting it at every - * start would cost its whole size in /tmp each time. Each one gets a menu entry on the Linux - * desktop, and the front end starts it under gamescope through droiddeck-appimage-run. - * - * <id>/name holds the name to show, <id>/icon.png the icon when the image has a PNG one. - */ object AppImageManager { private const val TAG = "AppImageManager" const val GUEST_DIR = "/opt/appimages/user" @@ -29,7 +21,6 @@ object AppImageManager { val guestDir: String get() = "$GUEST_DIR/$id" } - /** Why a file cannot be imported: [text] with its [args]. */ internal class Problem(@StringRes val text: Int, vararg val args: Any) { fun describe(context: Context): String = context.getString(text, *args) } @@ -47,10 +38,6 @@ object AppImageManager { ) }?.sortedBy { it.name.lowercase() } ?: emptyList() - /** - * What is wrong with [file] as an AppImage for this device, or null when it can be imported. - * An AppImage is an ELF program (its runtime) with "AI" and the format version at byte 8. - */ internal fun problem(file: File): Problem? { if (!file.isFile) return Problem(R.string.user_apps_file_gone) val head = ByteArray(20) @@ -71,7 +58,6 @@ object AppImageManager { } } - /** A directory name from the image's file name: "Some_App-1.2-aarch64.AppImage" -> "some-app-1-2-aarch64". */ internal fun idFor(fileName: String, taken: Set<String>): String { val base = fileName.removeSuffix(".AppImage").removeSuffix(".appimage").lowercase() .replace(Regex("[^a-z0-9]+"), "-").trim('-').take(48).ifEmpty { "appimage" } @@ -83,17 +69,12 @@ object AppImageManager { fun dir(context: Context, id: String) = File(root(context), id) - /** - * Imports [file]; null on success, else what went wrong. [name] and [icon] replace the image's own; - * each of [meta] is written as a file beside them. - */ fun import( context: Context, file: File, name: String?, icon: File?, meta: Map<String, String> = emptyMap(), onProgress: (String) -> Unit, ): String? { if (!LinuxRuntime.isInstalled(context)) return context.getString(R.string.user_apps_runtime_required) problem(file)?.let { return it.describe(context) } val base = root(context).apply { mkdirs() } - // Room for the image while it is extracted, and the extracted tree (about the same again). if (StatFs(base.path).availableBytes < file.length() * 3) { return context.getString(R.string.appimg_no_space_import, FileUtils.sizeToString(file.length() * 3)) } @@ -114,7 +95,6 @@ object AppImageManager { } } - /** Swaps the program of imported [id] for [file], keeping its name and icon; the old one stays if this fails. */ fun replace(context: Context, id: String, file: File, meta: Map<String, String>, onProgress: (String) -> Unit): String? { problem(file)?.let { return it.describe(context) } val dir = dir(context, id) @@ -134,14 +114,11 @@ object AppImageManager { } } - /** Extracts [file] to [dir]/app, replacing what is there only once the extraction has worked. */ private fun extract(context: Context, dir: File, file: File, onProgress: (String) -> Unit): String? { val image = File(dir, "image.AppImage") val links = File(dir, ".links").apply { mkdirs() } try { dir.mkdirs() - // Copied in, not run where it lies: shared storage is mounted noexec, and proot's loader - // maps a program executable. onProgress(context.getString(R.string.user_apps_copying, file.name)) file.inputStream().use { input -> image.outputStream().use { FileUtils.copy(input, it) } } image.setExecutable(true, false) @@ -149,8 +126,6 @@ object AppImageManager { val unpack = if (LinuxFex.isX86(LinuxFex.elfMachine(image))) "${LinuxFex.TOOL} extract ./image.AppImage" else "./image.AppImage --appimage-extract || { rm -rf squashfs-root AppDir; ${LinuxFex.TOOL} extract ./image.AppImage; }" val out = StringBuilder() - // uruntime's DwarFS images unpack into AppDir with squashfs-root a link to it, and keep - // one program under several names as hard links (sharun), which Android denies apps. val status = GuestCommand.run(context, listOf( "/bin/bash", "-c", "cd \"$1\" && rm -rf squashfs-root AppDir && { $unpack; } >/dev/null && " + @@ -170,10 +145,6 @@ object AppImageManager { } } - /** - * Each name proot's link2symlink left for a hard link becomes a file of its own: a program run - * through a link would see the shared file's name, and sharun picks what to start by its own. - */ private fun copyLinkedFiles(app: File, links: File) { val roots = setOf(links.path + "/", links.canonicalPath + "/") app.walkTopDown().onEnter { !Files.isLink(it) }.forEach { f -> @@ -187,7 +158,6 @@ object AppImageManager { } } - /** Name, comment and icon from the image's own desktop entry; the file name when it has none. */ private fun describe(dir: File, source: File) { val app = File(dir, "app") val entry = app.listFiles { f -> f.isFile && f.name.endsWith(".desktop") }?.firstOrNull() @@ -200,11 +170,6 @@ object AppImageManager { restoreIcon(dir) } - /** - * The image's own icon as [dir]'s: of the files its entry names, beside it or anywhere in its - * icon theme, a PNG of at least [SHARP_ICON] px, else the SVG, else the largest PNG; .DirIcon - * without any. - */ internal fun restoreIcon(dir: File) { val app = File(dir, "app") val entry = app.listFiles { f -> f.isFile && f.name.endsWith(".desktop") }?.firstOrNull() @@ -229,7 +194,6 @@ object AppImageManager { f.inputStream().use { val b = ByteArray(4); it.read(b) == 4 && b[1] == 'P'.code.toByte() && b[2] == 'N'.code.toByte() && b[3] == 'G'.code.toByte() } } catch (e: Exception) { false } - /** A key of a desktop entry's main group, unlocalised. */ internal fun desktopKey(desktop: String, key: String): String? { var inMain = false for (line in desktop.lineSequence()) { @@ -241,11 +205,8 @@ object AppImageManager { } private fun menuEntry(context: Context, id: String) = - // A system directory, not ~/.local/share/applications: the desktop copies game entries from - // here into the user's with a GPU launcher (droiddeck-desktop-gpu), since it composites in software. File(LinuxRuntime.rootDir(context), "usr/local/share/applications/droiddeck-appimage-$id.desktop") - /** The Linux desktop's menu entry: the desktop's own Exec rules (and droiddeck-gpu) apply to it. */ internal fun writeMenuEntry(context: Context, dir: File) { val id = dir.name val name = FileUtils.readString(File(dir, "name"))?.trim() ?: id @@ -256,7 +217,6 @@ object AppImageManager { "Terminal=false\nCategories=$categories\nX-DroidDeck-AppImage=$id\n") } - /** The desktop's import of [key]; older ones of the image at [path], since replaced, are removed. */ fun desktopImport(context: Context, key: String, path: String): String? { var found: String? = null root(context).listFiles()?.forEach { dir -> diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/BwrapSpawner.kt b/app/src/main/java/com/droiddeck/launcher/runtime/BwrapSpawner.kt index a5d3152970..e7f393fd87 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/BwrapSpawner.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/BwrapSpawner.kt @@ -18,38 +18,25 @@ import java.io.IOException import java.nio.file.Files import java.util.concurrent.atomic.AtomicInteger -/** - * Flatpak's sandboxes, started for the runtime's bwrap stand-in (droiddeck-bwrap). - * - * A Flatpak app runs with its runtime as /usr and itself as /app, which bwrap arranges with mount - * namespaces Android gives no app. proot can show the same picture, and started here - beside the - * session's proot rather than inside it - it traces the app once instead of twice. The stand-in - * sends the sandbox Flatpak asked for (its binds, directories, symlinks and files, in guest paths), - * this builds it under the cache and starts it, then streams the output, the pid and the exit - * status back until one side goes away: the stand-in ending takes the sandbox down with it. - * - * The socket is abstract, so anything on the device could connect: only this app's own uid - the - * uid every program in the runtime already runs as - is served. - */ object BwrapSpawner { private const val TAG = "BwrapSpawner" - const val SOCKET = "com.droiddeck.launcher.bwrap" + fun socket(context: Context): String = "${context.packageName}.bwrap" private val seq = AtomicInteger() @Volatile private var server: LocalServerSocket? = null - /** Listens for sandboxes for the rest of the process's life; later calls do nothing. */ @Synchronized fun start(context: Context) { if (server != null) return val app = context.applicationContext + val name = socket(app) val socket = try { - LocalServerSocket(SOCKET) + LocalServerSocket(name) } catch (e: IOException) { - Log.e(TAG, "cannot listen on $SOCKET", e) + Log.e(TAG, "cannot listen on $name", e) return } server = socket - FileUtils.delete(File(app.cacheDir, "bwrap")) + FileUtils.delete(File(LinuxRuntime.liveDir(app), "bwrap")) Thread({ while (true) { val client = try { socket.accept() } catch (e: IOException) { Log.e(TAG, "accept", e); break } @@ -60,7 +47,7 @@ object BwrapSpawner { private fun serve(context: Context, client: LocalSocket) { val id = seq.incrementAndGet() - val dir = File(context.cacheDir, "bwrap/$id") + val dir = File(LinuxRuntime.liveDir(context), "bwrap/$id") client.use { val out = DataOutputStream(client.outputStream) try { @@ -88,7 +75,6 @@ object BwrapSpawner { } } - /** What proot is started with: the sandbox root, its binds (host to guest), and the program. */ class Plan(val root: File, val binds: List<Bind>, val cwd: String, val argv: List<String>, val env: Map<String, String>) data class Bind(val host: String, val guest: String) { @@ -102,14 +88,9 @@ object BwrapSpawner { } } - /** True when [path] is [dir] or inside it. */ internal fun under(path: String, dir: String): Boolean = dir == "/" || path == dir || path.startsWith(if (dir.endsWith("/")) dir else "$dir/") - /** - * Where a path the session's programs see lives on the host: through the session's own binds - * (the most specific one), or else inside the rootfs. - */ internal fun hostPath(sessionBinds: List<Bind>, rootfs: String, guest: String): String { val bind = sessionBinds.filter { under(guest, it.guest) }.maxByOrNull { it.guest.length } ?: return rootfs.trimEnd('/') + guest @@ -117,11 +98,6 @@ object BwrapSpawner { return if (rest.isEmpty()) bind.host else bind.host.trimEnd('/') + "/" + rest } - /** - * Guest [src] bound at [dest]: the bind itself, then every session bind below [src] moved - * under [dest] - /dev brings the session's /dev/shm and GPU node, /proc its stand-ins for what - * Android keeps apps from reading. - */ internal fun bindsFor(sessionBinds: List<Bind>, rootfs: String, src: String, dest: String): List<Bind> { val out = ArrayList<Bind>() out.add(Bind(hostPath(sessionBinds, rootfs, src), dest)) @@ -145,12 +121,6 @@ object BwrapSpawner { } fun coveringBind(dest: String) = binds.filter { under(dest, it.guest) }.maxByOrNull { it.guest.length } fun newScratch(): File = File(dir, "x${scratch++}") - /** - * Where [dest] can be created on the host: inside the sandbox root, or inside a directory - * of ours bound into it (a --tmpfs under the runtime's /usr, which Flatpak fills with the - * GL extension's links). Null inside anything else bound in - the runtime itself, a host - * directory - which must not be written to. - */ fun writable(dest: String): File? { val cover = coveringBind(dest) ?: return inRoot(root, dest) if (!under(cover.host, dir.path)) return null @@ -198,8 +168,6 @@ object BwrapSpawner { link.parentFile?.mkdirs() if (!Files.isSymbolicLink(link.toPath()) && !link.exists()) Files.createSymbolicLink(link.toPath(), java.nio.file.Paths.get(target)) } else { - // A link inside the runtime's own tree cannot be made; what it points at is - // bound in its place. val abs = if (target.startsWith("/")) target else normalize(dest.substringBeforeLast('/') + "/" + target) val host = hostPath(binds, root.path, abs) if (File(host).exists()) addBind(Bind(host, dest)) else Log.w(TAG, "symlink $dest -> $target: nothing there; left out") @@ -217,24 +185,13 @@ object BwrapSpawner { return Plan(root, binds, request.optString("cwd", "/").ifEmpty { "/" }, argv, env) } - /** Where a sandbox finds the runtime's own GPU driver. */ private const val GPU_DIR = "/run/droiddeck-gpu" - /** - * The GPU, for an app that is given /dev. Flathub's Mesa has Turnip, but built for the DRM - * kernel driver: Adreno on Android is KGSL, so apps fell back to drawing on the CPU. The - * runtime's own Turnip has the KGSL backend and needs nothing the Freedesktop runtime lacks - * but three libraries, which come with it; Mesa's GL then runs on it through Zink. An app's - * own choice of driver (VK_ICD_FILENAMES, MESA_LOADER_DRIVER_OVERRIDE) is left alone. - */ private fun gpu(rootfs: String, root: File, env: MutableMap<String, String>): List<Bind>? { val lib = File(rootfs, "usr/lib") val driver = File(lib, "libvulkan_freedreno.so") if (!driver.isFile || !File("/dev/kgsl-3d0").exists()) return null if (env.containsKey("VK_ICD_FILENAMES") || env.containsKey("VK_DRIVER_FILES")) return null - // A window on the desktop gets shared-memory buffers only (KWin composites in software); - // Zink cannot present there, so such an app keeps Flathub's own Mesa (llvmpipe). From the - // desktop, games go through droiddeck-gpu's gamescope and do get the GPU. if (env["BL_DESKTOP"] == "1" && env["GAMESCOPE_WAYLAND_DISPLAY"] == null) return null val binds = ArrayList<Bind>() for (name in listOf("libvulkan_freedreno.so", "libdisplay-info.so.3", "libSPIRV-Tools.so", "libSPIRV-Tools-opt.so")) { @@ -242,7 +199,6 @@ object BwrapSpawner { if (!f.exists()) { Log.w(TAG, "gpu: the runtime has no $name; apps draw on the CPU"); return null } binds.add(Bind(f.canonicalPath, "$GPU_DIR/$name")) } - // Beside the sandbox root, in the sandbox's own directory: removed with it. val icd = File(root.parentFile, "freedreno_icd.json") icd.writeText("{\"file_format_version\": \"1.0.0\", \"ICD\": {\"library_path\": \"$GPU_DIR/libvulkan_freedreno.so\", \"api_version\": \"1.4.0\"}}\n") binds.add(Bind(icd.path, "$GPU_DIR/freedreno_icd.json")) @@ -252,18 +208,10 @@ object BwrapSpawner { env["MESA_LOADER_DRIVER_OVERRIDE"] = "zink" env["GALLIUM_DRIVER"] = "zink" } - // The driver's own libraries, found beside it; nothing else is in that directory. env["LD_LIBRARY_PATH"] = listOf(env["LD_LIBRARY_PATH"], GPU_DIR).filter { !it.isNullOrEmpty() }.joinToString(":") return binds } - /** - * What every program in the session preloads (SessionFiles writes /etc/ld.so.preload): the - * session shim - SysV shared memory for X11, the network calls Android refuses - and the - * controller reader. A sandbox's /etc is the runtime's, so the same libraries go in through - * LD_PRELOAD instead, with the directory the controllers' rings live in; without them an app - * saw no gamepad. Both are built against an older glibc than any Flathub runtime has. - */ private fun preload(session: List<Bind>, rootfs: String, env: MutableMap<String, String>): List<Bind> { val libs = FileUtils.readString(File(rootfs, "etc/ld.so.preload"))?.lines() ?.map { it.trim() }?.filter { it.startsWith("/") && File(rootfs + it).isFile } ?: return emptyList() @@ -271,9 +219,6 @@ object BwrapSpawner { val binds = ArrayList<Bind>() val paths = libs.map { lib -> "$PRELOAD_DIR/${lib.substringAfterLast('/')}".also { binds.add(Bind(rootfs + lib, it)) } } env["LD_PRELOAD"] = (paths + listOfNotNull(env["LD_PRELOAD"]?.takeIf { it.isNotBlank() })).joinToString(":") - // Not through ZYPAK_LD_PRELOAD to Chromium's children: the session shim's stat hooks then - // hide the setuid bit zypak fakes on chrome-sandbox, and Chromium refuses to start. - // The controllers: FAKE_EVDEV_DIR is <session>/dev/input, the rings beside it in <session>/dev. env["FAKE_EVDEV_DIR"]?.let { File(it).parent }?.let { dev -> binds.addAll(bindsFor(session, rootfs, dev, dev)) } @@ -282,47 +227,24 @@ object BwrapSpawner { private const val PRELOAD_DIR = "/run/droiddeck-preload" - /** - * Browsers sandbox their own children, and neither way works in here. Firefox wants - * namespaces and seccomp from the kernel; its content processes died without them (the - * desktop sets the same for the runtime's own Firefox). Chromium and Electron apps start - * their zygote through Flatpak's portal (zypak's spawn strategy), and the portal refuses: - * it knows a Flatpak by /proc/<pid>/root/.flatpak-info, and a proot sandbox's root is the - * host's. zypak's older strategy mimics the zygote inside the app's own sandbox instead. - */ private fun browserSandboxes(env: MutableMap<String, String>) { env.putIfAbsent("ZYPAK_ZYGOTE_STRATEGY_SPAWN", "0") - // Qt WebEngine is Chromium without zypak: it sets up its own namespace sandbox. env.putIfAbsent("QTWEBENGINE_DISABLE_SANDBOX", "1") - // Chromium on Wayland asks the render node the compositor names for its DRM version; - // KGSL has none, and the GPU process aborts until Chromium gives up ("GPU process isn't - // usable"). Electron picks Wayland from XDG_SESSION_TYPE; with an X server there (every - // session has Xwayland) it stays on X11, which works. GTK and Qt go by their own settings. if (env.containsKey("DISPLAY")) env["XDG_SESSION_TYPE"] = "x11" for (name in listOf("MOZ_DISABLE_CONTENT_SANDBOX", "MOZ_DISABLE_GMP_SANDBOX", "MOZ_DISABLE_RDD_SANDBOX", "MOZ_DISABLE_SOCKET_PROCESS_SANDBOX", "MOZ_DISABLE_UTILITY_SANDBOX", - // Android 16 refuses the size seal Firefox puts on a tab's shared - // memory, and the tab then dies on every page (droiddeck-desktop). "MOZ_SHM_NO_SEALS")) { env.putIfAbsent(name, "1") } } - /** - * /proc/cpuinfo without the cores' names. Snapdragon's ARMv9 cores (Cortex-A510/A715/X3) have - * SVE2 by architecture, and LLVM - llvmpipe's JIT in Flathub's Mesa, which is what apps draw - * with here - takes the CPU part to mean it may use it. Qualcomm leaves SVE off, so the first - * shader compiled killed the app with SIGILL. Without a part number LLVM targets generic - * ARMv8 plus the "Features" line, which lists what the kernel really enabled. - */ private fun genericCpuinfo(context: Context): File? = try { - val out = File(context.cacheDir, "cpuinfo-generic") + val out = File(LinuxRuntime.liveDir(context), "cpuinfo-generic") val text = File("/proc/cpuinfo").readLines() .filterNot { it.startsWith("CPU implementer") || it.startsWith("CPU part") || it.startsWith("CPU variant") || it.startsWith("CPU revision") } .joinToString("\n", postfix = "\n") - // Sandboxes start side by side; one must never read another's half-written copy. if (!out.isFile || out.readText() != text) { - val staged = File.createTempFile("cpuinfo", null, context.cacheDir) + val staged = File.createTempFile("cpuinfo", null, LinuxRuntime.liveDir(context)) staged.writeText(text) if (!staged.renameTo(out)) staged.delete() } @@ -331,7 +253,6 @@ object BwrapSpawner { Log.w(TAG, "cpuinfo", e); null } - /** [path] with "." and ".." resolved lexically. */ internal fun normalize(path: String): String { val out = ArrayList<String>() for (part in path.split('/')) when (part) { @@ -342,10 +263,6 @@ object BwrapSpawner { return "/" + out.joinToString("/") } - /** - * [guest] inside the sandbox root, or null when the way there crosses a symlink: one of - * Flatpak's (var/run -> ../run) may point anywhere once followed on the host. - */ private fun inRoot(root: File, guest: String): File? { var f = root for (part in guest.split('/').filter { it.isNotEmpty() }) { @@ -357,17 +274,14 @@ object BwrapSpawner { } private fun chmod(f: File, mode: Int) { - try { Os.chmod(f.path, mode) } catch (e: Exception) { /* the default mode serves */ } + try { Os.chmod(f.path, mode) } catch (e: Exception) { } } private fun run(context: Context, plan: Plan, client: LocalSocket, out: DataOutputStream, id: Int) { val cmd = LinuxRuntime.prootPrefix(context, plan.root, plan.cwd) - // DROIDDECK_PROOT_VERBOSE=N in the app's environment (flatpak run --env=...) has proot - // say what it does, to logcat in full: for a sandbox that dies without a word. val verbose = plan.env["DROIDDECK_PROOT_VERBOSE"]?.toIntOrNull() if (verbose != null) { cmd.add(1, "-v"); cmd.add(2, verbose.toString()) } plan.binds.forEach { cmd.add("-b"); cmd.add(it.spec) } - // proot hands its own environment on; the sandbox gets exactly what Flatpak asked for. cmd.add("/usr/bin/env") cmd.add("-i") plan.env.forEach { (k, v) -> cmd.add("$k=$v") } @@ -376,29 +290,24 @@ object BwrapSpawner { builder.environment().apply { clear() put("PROOT_LOADER", LinuxRuntime.prootLoader(context).path) - put("PROOT_TMP_DIR", context.cacheDir.path) + put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(context).path) if (SessionPrefs.prootNoSeccomp(context)) put("PROOT_NO_SECCOMP", "1") LinuxRuntime.prootLibraryPath(context).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) } } val process = builder.start() val pid = HostProcess.pidOf(process) - // A sandbox lives exactly as long as its bwrap stand-in, which ends it; a session starting - // meanwhile (OrphanReaper) must not take it - an install's extra-data step, say. com.droiddeck.launcher.session.OrphanReaper.keep(pid) Log.i(TAG, "sandbox $id pid $pid: ${plan.argv.joinToString(" ")} (${plan.binds.size} binds)") synchronized(out) { frame(out, 'P', pid.toString().toByteArray()) } - // The stand-in going away (Flatpak killed, the session over) ends the sandbox. Thread({ - try { while (client.inputStream.read() >= 0) { /* nothing is sent after the request */ } } - catch (e: IOException) { /* closed */ } + try { while (client.inputStream.read() >= 0) { } } + catch (e: IOException) { } if (process.isAlive) { Log.i(TAG, "sandbox $id: its bwrap is gone; stopping it") process.destroy() } }, "bwrap-$id-watch").apply { isDaemon = true; start() } val buffer = ByteArray(16384) - // The start of what the sandbox says goes to logcat too: a sandbox that fails at once - // (proot refusing a bind, a missing library) says why there even when nothing reads it. var logged = 0 process.inputStream.use { stream -> while (true) { diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/DeckyManager.kt b/app/src/main/java/com/droiddeck/launcher/runtime/DeckyManager.kt index 60058b72ca..ba454af7a7 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/DeckyManager.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/DeckyManager.kt @@ -16,16 +16,18 @@ import java.util.zip.ZipInputStream import org.json.JSONArray import org.json.JSONObject -/** Optional Decky Loader installation for the ARM64 Linux guest. */ object DeckyManager { private const val TAG = "DeckyManager" - const val REPOSITORY = "Droid-Deck/decky-loader" + const val REPOSITORY = "SteamDeckHomebrew/decky-loader" private const val RELEASES = "https://api.github.com/repos/$REPOSITORY/releases?per_page=30" private const val PATH = "root/homebrew/services/PluginLoader" private const val VERSION = "root/homebrew/services/.droiddeck-decky-version" - private const val CEF_REMOTE_DEBUG_MARKER = "root/.local/share/Steam/.cef-enable-remote-debugging" + // droiddeck-session reads the marker from the root of the client it runs. + private val CEF_REMOTE_DEBUG_MARKERS = listOf( + "root/.local/share/Steam/.cef-enable-remote-debugging", + "root/.droiddeck-x64/.local/share/Steam/.cef-enable-remote-debugging", + ) - /** True while a plugin's remote binary downloads: what the UI branches on, not the stage's words. */ @Volatile var downloadingBinary = false private set @@ -41,30 +43,34 @@ object DeckyManager { fun loader(context: Context) = File(LinuxRuntime.rootDir(context), PATH) fun supervisorEnabled(context: Context) = File(LinuxRuntime.rootDir(context), "root/.droiddeck-decky-enabled").isFile - /** Remove the legacy install-time debugger marker unless the user opted into Decky. */ + private fun cefMarkers(context: Context, creating: Boolean = false) = + CEF_REMOTE_DEBUG_MARKERS.map { File(LinuxRuntime.rootDir(context), it) }.filter { marker -> + !creating || !marker.path.contains("/.droiddeck-x64/") || + com.droiddeck.launcher.storage.SteamStorage.x64ClientPresent(marker.parentFile ?: marker) + } + fun syncCefMarker(context: Context) { - val marker = File(LinuxRuntime.rootDir(context), CEF_REMOTE_DEBUG_MARKER) if (!supervisorEnabled(context)) { - marker.delete() + cefMarkers(context).forEach { it.delete() } return } - runCatching { - marker.parentFile?.mkdirs() - marker.createNewFile() + for (marker in cefMarkers(context, creating = true)) { + runCatching { + marker.parentFile?.mkdirs() + marker.createNewFile() + } } } fun setSupervisorEnabled(context: Context, enabled: Boolean) { val marker = File(LinuxRuntime.rootDir(context), "root/.droiddeck-decky-enabled") - val cefMarker = File(LinuxRuntime.rootDir(context), CEF_REMOTE_DEBUG_MARKER) if (enabled) { marker.parentFile?.mkdirs() marker.writeText("enabled\n") - cefMarker.parentFile?.mkdirs() - cefMarker.createNewFile() + cefMarkers(context, creating = true).forEach { it.parentFile?.mkdirs(); it.createNewFile() } } else { marker.delete() - cefMarker.delete() + cefMarkers(context).forEach { it.delete() } } } @@ -105,18 +111,17 @@ object DeckyManager { } catch (e: Exception) { Log.w(TAG, "release metadata", e); ReleaseChannels(emptyList(), emptyList()) } } - /** Downloads to a sibling temp file and atomically renames only after size, digest and ELF checks. */ fun install(context: Context, release: Release, progress: (String, Int) -> Unit): String? { if (SessionState.running) return context.getString(R.string.deckymgr_stop_session_loader) val target = loader(context) target.parentFile?.mkdirs() val temp = File(target.parentFile, "PluginLoader.download") val downloading = context.getString(R.string.user_apps_downloading, release.tag) - val ok = Downloader.downloadFile(release.url, temp, false) { f -> progress(downloading, if (f < 0) -1 else (f * 100).toInt().coerceIn(0, 100)) } + val ok = Downloader.downloadFile(release.url, temp, true, release.digest?.substringAfter(':')) { f -> progress(downloading, if (f < 0) -1 else (f * 100).toInt().coerceIn(0, 100)) } if (!ok) { temp.delete(); return context.getString(R.string.deckymgr_download_failed) } if (temp.length() != release.size) { temp.delete(); return context.getString(R.string.deckymgr_size_mismatch) } val expected = release.digest?.substringAfter(':') ?: release.shaUrl?.let { checksumUrl -> - val checksumBody = Downloader.downloadString(checksumUrl) ?: run { temp.delete(); return context.getString(R.string.deckymgr_checksum_download_failed) } + val checksumBody = Downloader.downloadDirect(checksumUrl) ?: run { temp.delete(); return context.getString(R.string.deckymgr_checksum_download_failed) } Regex("(?i)\\b[0-9a-f]{64}\\b").find(checksumBody)?.value } ?: run { temp.delete(); return context.getString(R.string.deckymgr_checksum_missing) } if (!expected.matches(Regex("(?i)[0-9a-f]{64}"))) { temp.delete(); return context.getString(R.string.deckymgr_checksum_invalid) } @@ -124,12 +129,12 @@ object DeckyManager { if (!validElf(temp, release.machine)) { temp.delete(); return context.getString(R.string.deckymgr_not_elf) } if (SessionState.running) { temp.delete(); return context.getString(R.string.deckymgr_session_started_loader) } if (!temp.setExecutable(true, false)) { temp.delete(); return context.getString(R.string.deckymgr_loader_not_executable) } - // Decky needs Steam's local CEF debugger only when its session supervisor is enabled. - val cefMarker = File(LinuxRuntime.rootDir(context), CEF_REMOTE_DEBUG_MARKER) - val cefReady = !supervisorEnabled(context) || cefMarker.isFile || runCatching { - cefMarker.parentFile?.mkdirs() - cefMarker.createNewFile() || cefMarker.isFile - }.getOrDefault(false) + val cefReady = !supervisorEnabled(context) || cefMarkers(context, creating = true).all { cefMarker -> + cefMarker.isFile || runCatching { + cefMarker.parentFile?.mkdirs() + cefMarker.createNewFile() || cefMarker.isFile + }.getOrDefault(false) + } if (!cefReady) { temp.delete(); return context.getString(R.string.deckymgr_cef_failed) } val staged = File(target.parentFile, "PluginLoader.new") staged.delete() @@ -145,11 +150,10 @@ object DeckyManager { old.delete() File(target.parentFile, ".droiddeck-decky-version").writeText(release.tag + "\n") File(target.parentFile, ".droiddeck-decky-arch").writeText(if (release.machine == 183) "arm64\n" else "x86_64\n") - if (!supervisorEnabled(context)) cefMarker.delete() + if (!supervisorEnabled(context)) cefMarkers(context).forEach { it.delete() } return null } - /** Imports a Decky distribution ZIP into homebrew/plugins for the next Steam session. */ fun installPluginZip(context: Context, archive: File, progress: (String, Int) -> Unit): String? { if (SessionState.running) return context.getString(R.string.deckymgr_stop_session_plugin) if (installed(context) == null) return context.getString(R.string.deckymgr_loader_required) @@ -216,8 +220,6 @@ object DeckyManager { out.write(buffer, 0, read) } } - // Decky distributions place plugin executables under bin/. Java's ZIP reader - // does not expose Unix mode bits, so restore execution on those payload files. if (relative.split('/').dropLast(1).any { it == "bin" } && !output.setExecutable(true, false)) { throw IllegalStateException(context.getString(R.string.deckymgr_bundled_not_executable)) } @@ -244,7 +246,7 @@ object DeckyManager { downloadingBinary = true progress(downloading, -1) val downloaded = try { - Downloader.downloadFile(url, temp, false) { fraction -> + Downloader.downloadFile(url, temp, true, hash) { fraction -> progress(downloading, if (fraction < 0) -1 else (fraction * 100).toInt().coerceIn(0, 100)) } } finally { @@ -280,7 +282,7 @@ object DeckyManager { File(root, PATH).delete() File(root, VERSION).delete() File(root, "root/homebrew/services/.droiddeck-decky-arch").delete() - File(root, CEF_REMOTE_DEBUG_MARKER).delete() + CEF_REMOTE_DEBUG_MARKERS.forEach { File(root, it).delete() } if (wipeData) File(root, "root/homebrew").deleteRecursively() } diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/DeckyPluginInstall.kt b/app/src/main/java/com/droiddeck/launcher/runtime/DeckyPluginInstall.kt index b4223b7afe..19414a49e0 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/DeckyPluginInstall.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/DeckyPluginInstall.kt @@ -6,9 +6,7 @@ import java.io.File import org.json.JSONArray import org.json.JSONObject -/** Offline equivalent of Decky's identity-based replacement and loader settings update. */ internal object DeckyPluginInstall { - /** A failure the user is told about: [text] is its string resource. */ class Failure(@StringRes val text: Int) : IllegalStateException() fun activate(staged: File, plugins: File, name: String, settingsFile: File, backupSuffix: String) { @@ -26,7 +24,6 @@ internal object DeckyPluginInstall { .distinct()) if ((0 until order.length()).none { order.optString(it) == name }) order.put(name) settings.put("pluginOrder", order) - // Decky's reinstall removes these flags while retaining the plugin's order and data. for (key in listOf("frozenPlugins", "hiddenPlugins", "disabled_plugins")) { val values = settings.optJSONArray(key) ?: continue settings.put(key, JSONArray((0 until values.length()).map { values.get(it) }.filter { it != name })) diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/DesktopCatalog.kt b/app/src/main/java/com/droiddeck/launcher/runtime/DesktopCatalog.kt index 9716081061..3fad171f23 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/DesktopCatalog.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/DesktopCatalog.kt @@ -10,28 +10,15 @@ import com.droiddeck.launcher.core.FileUtils import org.json.JSONObject import java.io.File -/** - * The hosted packages that go into the runtime on request - the desktop, the emulators, and the - * builds we mirror or make ourselves - described by desktop.json beside the runtime's own catalog. - * - * Two kinds. A `tar` extracts over the rootfs like the runtime itself (the same extractor, links - * and modes preserved). An `appimage` is one file dropped in /opt/appimages with a .desktop entry - * written for it; proot has no FUSE, so it runs extracted (APPIMAGE_EXTRACT_AND_RUN). - */ object DesktopCatalog { private const val TAG = "DesktopCatalog" const val CATALOG_URL = "https://raw.githubusercontent.com/Droid-Deck/DroidDeck-Components/main/desktop.json" - /** - * Valve's Proton Experimental (ARM64) with its appmanifest, laid out as the client keeps it. - * In a catalog of its own so it never shows among the packages a user picks from. - */ const val STEAM_SEED_URL = "https://raw.githubusercontent.com/Droid-Deck/DroidDeck-Components/main/steam-seed.json" const val PROTON_SEED_ID = "proton-arm64" class Entry( val id: String, val name: String, val tier: Int, val version: String, val kind: String, val url: String, val sha256: String, val size: Long, val notes: String, - /** For an appimage: the icon name and menu category of its .desktop entry. */ val icon: String, val category: String, ) @@ -40,8 +27,6 @@ object DesktopCatalog { return try { val json = JSONObject(body) val arr = json.getJSONArray("packages") - // A package built per memory page size (ARMSX2: 4K and 16K kernels) names the others - // under "pages"; the device's own size picks one, and the top-level file is the 4K one. val pageSize = try { android.system.Os.sysconf(android.system.OsConstants._SC_PAGESIZE).toString() } catch (e: Exception) { "4096" } @@ -62,42 +47,21 @@ object DesktopCatalog { private fun marker(context: Context, id: String) = File(LinuxRuntime.rootDir(context), ".droiddeck-pkg-$id") - /** The installed version of a package, or null. */ fun installed(context: Context, id: String): String? = FileUtils.readString(marker(context, id))?.trim()?.takeIf { it.isNotEmpty() } - /** - * True until the ARM64 Proton has been placed once. Its appmanifest counts too, so an install - * the client fetched itself is never overwritten; after the first placement the client owns it - * and updates it like any other app, and a user who removes it is not given it back. - */ fun protonSeedNeeded(context: Context): Boolean = installed(context, PROTON_SEED_ID) == null && !File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/steamapps/appmanifest_4427310.acf").isFile - /** - * The desktop: KDE Plasma (tools/desktop-kde). It replaced an LXQt/labwc package of id - * "desktop", which a runtime may still carry; that one does not count, so the first desktop - * after the update installs this one over it. - */ const val DESKTOP_ID = "desktop-kde" - /** - * The desktop package this apk installs: pinned in tools/desktop-kde/release.env and published - * in DroidDeck-Components, not read from the catalog, so the desktop scripts staged by this - * apk always get the package they were made for. - */ fun desktopEntry(context: Context) = Entry( DESKTOP_ID, context.getString(R.string.content_linux_desktop), 1, BuildConfig.DESKTOP_KDE_TAG, "tar", BuildConfig.DESKTOP_KDE_URL, BuildConfig.DESKTOP_KDE_SHA256, BuildConfig.DESKTOP_KDE_SIZE, "", "", "", ) - // The desktop package installed to the end: KWin is there and the marker install() writes once - // the whole package is extracted. An install cut short (the app killed, storage full) leaves - // KWin without the marker, and the next desktop installs it again. A newer pinned package also - // replaces the installed one, keeping the user's home and settings. The launcher is staged by - // the app at every session, so it cannot tell. SessionFiles uses the same test. fun desktopInstalled(context: Context): Boolean = desktopInstalled(LinuxRuntime.rootDir(context)) fun desktopInstalled(root: File): Boolean = @@ -110,7 +74,6 @@ object DesktopCatalog { return File(root, DesktopRemoval.PENDING).exists() || marker(context, DESKTOP_ID).exists() } - /** The installed desktop's size on disk; off the main thread. */ fun desktopSize(context: Context): Long = DesktopRemoval.installedSize(context) fun cleanLegacy(context: Context, listener: LinuxRuntimeInstaller.ProgressListener? = null) = @@ -119,17 +82,15 @@ object DesktopCatalog { fun removeDesktop(context: Context, listener: LinuxRuntimeInstaller.ProgressListener): String? = DesktopRemoval.remove(context, listener) - /** Downloads, verifies and installs one package. Returns null on success, else a message. */ fun install(context: Context, entry: Entry, listener: LinuxRuntimeInstaller.ProgressListener?): String? { val root = LinuxRuntime.rootDir(context) if (!root.isDirectory) return context.getString(R.string.deskpkg_runtime_missing) - // Every catalog row carries a sha256; one without is refused rather than trusted. if (entry.sha256.isEmpty()) return context.getString(R.string.deskpkg_no_checksum, entry.name) val download = File(context.cacheDir, "pkg-${entry.id}.download") try { val downloading = context.getString(R.string.user_apps_downloading, entry.name) listener?.onProgress(LinuxRuntimeInstaller.Step.DOWNLOADING, downloading, 0) - val ok = Downloader.downloadFile(entry.url, download, true) { f -> + val ok = Downloader.downloadFile(entry.url, download, true, entry.sha256) { f -> listener?.onProgress(LinuxRuntimeInstaller.Step.DOWNLOADING, downloading, if (f < 0) -1 else Math.round(f * 100f)) } if (!ok) return context.getString(R.string.user_apps_download_failed) @@ -141,7 +102,6 @@ object DesktopCatalog { "appimage" -> { val dir = File(root, "opt/appimages").apply { mkdirs() } val target = File(dir, "${entry.id}.AppImage") - // Some projects zip the AppImage (melonDS); the one file inside is what we want. val placed = if (entry.url.endsWith(".zip", ignoreCase = true)) unzipAppImage(download, target) else download.renameTo(target) if (!placed) return context.getString(R.string.deskpkg_place_failed) @@ -152,8 +112,6 @@ object DesktopCatalog { "Icon=${entry.icon}\nTerminal=false\nCategories=${entry.category};\n") } else -> { - // Not complete until written again at the end: a reinstall cut short must not - // leave the last install's marker saying it is. marker(context, entry.id).delete() if (!LinuxRuntimeInstaller.extract(context, download, root, listener)) return context.getString(R.string.deskpkg_extract_failed) } @@ -192,10 +150,6 @@ object DesktopCatalog { return false } - /** - * Removes an appimage package outright. A tar package is spread through the rootfs and is - * not tracked file by file; only its marker is dropped, which offers it again. - */ fun remove(context: Context, entry: Entry) { val root = LinuxRuntime.rootDir(context) if (entry.kind == "appimage") { diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/DesktopFileRemoval.kt b/app/src/main/java/com/droiddeck/launcher/runtime/DesktopFileRemoval.kt index 063a5c9a96..6d2c42b018 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/DesktopFileRemoval.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/DesktopFileRemoval.kt @@ -7,7 +7,6 @@ import java.nio.file.LinkOption.NOFOLLOW_LINKS import java.nio.file.attribute.BasicFileAttributes import java.security.MessageDigest -/** Removes only unchanged, recorded package files. Never visits home or follows a symlink. */ internal object DesktopFileRemoval { data class Entry(val kind: String, val size: Long, val identity: String, val path: String) { companion object { @@ -37,14 +36,13 @@ internal object DesktopFileRemoval { else -> attrs.isRegularFile && attrs.size() == entry.size && sha(file, buffer) == entry.identity } if (!matches) { kept++; continue } - Files.delete(file.toPath()) // A failure propagates; the pending marker makes retry possible. + Files.delete(file.toPath()) removed++ bytes += if (attrs.isRegularFile) attrs.size() else 0 var parent = file.parentFile while (parent != root && parent != null) { directories.add(parent); parent = parent.parentFile } if (index % 200 == 0) progress(if (total > 0) index * 99 / total else -1) } - // Only now-empty parents of removed files, never a recursive delete of a package directory. for (dir in directories.sortedByDescending { it.path.length }) { if (dir.list()?.isEmpty() == true && !dir.delete()) throw IOException("Cannot remove $dir") } @@ -56,7 +54,6 @@ internal object DesktopFileRemoval { if (Files.isSymbolicLink(root.toPath())) return null val parts = name.split('/') if (parts.firstOrNull() !in setOf("usr", "etc") || parts.any { it.isEmpty() || it == "." || it == ".." }) return null - // Even an in-root symlink in a parent can redirect deletion into a user's data. var parent = root for (part in parts.dropLast(1)) { parent = File(parent, part) @@ -76,7 +73,6 @@ internal object DesktopFileRemoval { } } - /** The base runtime's pacman database is still present: desktop archives never replace it. */ fun runtimeFiles(root: File): Set<String> = buildSet { val database = File(root, "var/lib/pacman/local") if (!database.isDirectory || Files.isSymbolicLink(database.toPath())) throw IOException("Runtime package database missing") diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/DesktopRemoval.kt b/app/src/main/java/com/droiddeck/launcher/runtime/DesktopRemoval.kt index 09c93d73de..3d031a85a7 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/DesktopRemoval.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/DesktopRemoval.kt @@ -7,7 +7,6 @@ import com.droiddeck.launcher.core.FileUtils import java.io.File import java.util.zip.GZIPInputStream -/** Inventories are generated from pinned archives by tools/desktop-kde/removal-manifests.py. */ internal object DesktopRemoval { const val PENDING = ".droiddeck-desktop-removing" private const val CLEANING = ".droiddeck-lxqt-cleaning-v1" @@ -19,15 +18,9 @@ internal object DesktopRemoval { private fun protected(context: Context, root: File) = DesktopFileRemoval.runtimeFiles(root) + lines(context, "emulators-keep.txt.gzip") - /** - * What the desktop's own files take on disk, from the same inventory its removal uses (each - * file's size); the bundled apps' and emulators' shared files are not counted. Reads an asset: - * call it off the main thread. - */ fun installedSize(context: Context): Long = lines(context, "kde-remove.tsv.gzip").sumOf { line -> line.split('\t').getOrNull(1)?.toLongOrNull() ?: 0L } - /** Called before a guest starts or just after KDE extraction; retries after a process death. */ fun cleanLegacy(context: Context, listener: LinuxRuntimeInstaller.ProgressListener? = null) { val root = LinuxRuntime.rootDir(context) if (FileUtils.readString(File(root, CLEANED))?.trim() == "1") return @@ -54,7 +47,6 @@ internal object DesktopRemoval { val version = FileUtils.readString(pending)?.trim() ?: FileUtils.readString(marker)?.trim() val versions = context.assets.open("desktop-removal/versions.txt").bufferedReader().use { it.readLines() } check(version in versions) { context.getString(R.string.desktop_removal_unknown) } - // Validate all inventories and the runtime database before dropping the installed marker. val entries = lines(context, "kde-remove.tsv.gzip").map(DesktopFileRemoval.Entry::parse) val keep = protected(context, root) cleanLegacy(context, listener) @@ -63,7 +55,6 @@ internal object DesktopRemoval { if (marker.exists() && !marker.delete()) error("Could not clear desktop marker") val removing = context.getString(R.string.desktop_removing) val result = DesktopFileRemoval.remove(root, entries, keep) { listener.onProgress(removing, it) } - // APK-staged desktop files are matched against the APK too; keep user-modified copies. for ((asset, path) in com.droiddeck.launcher.session.SessionFiles.DESKTOP_FILES) { val target = DesktopFileRemoval.safeFile(root, path) ?: continue if (!isRegularFile(target)) continue diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/FlatpakManager.kt b/app/src/main/java/com/droiddeck/launcher/runtime/FlatpakManager.kt index c5c1fa6db6..56340b111e 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/FlatpakManager.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/FlatpakManager.kt @@ -7,31 +7,20 @@ import com.droiddeck.launcher.core.FileUtils import org.json.JSONObject import java.io.File -/** - * Flatpak in the Linux runtime: putting it there (droiddeck-flatpak-setup), the apps installed - * from Flathub, and installing, removing and updating them (droiddeck-flatpak). One per-user - * installation at /root/.local/share/flatpak, so nothing needs the system helper or polkit. - * - * Every command runs in a proot of its own, outside any session: the store works whether or not - * Steam or the desktop is up, and a session starting meanwhile leaves it running (OrphanReaper). - */ object FlatpakManager { private const val TAG = "FlatpakManager" const val FLATPAK = "/usr/bin/flatpak" const val BWRAP = "/usr/local/bin/droiddeck-bwrap" - /** The program the front end starts a Flatpak app through, in a session of its own. */ const val LAUNCHER = "/usr/local/bin/droiddeck-flatpak-run" private const val HELPER = "/usr/local/bin/droiddeck-flatpak" private const val SETUP = "/usr/local/bin/droiddeck-flatpak-setup" private const val USER_DIR = "root/.local/share/flatpak" - /** One store operation at a time: Flatpak locks its installation per transaction anyway. */ @Volatile var busy: String? = null private set class App(val id: String, val name: String, val icon: File?, val branch: String, val summary: String?) - /** Flatpak is in the runtime, with Flathub to install from. */ fun ready(context: Context): Boolean { val root = LinuxRuntime.rootDir(context) return File(root, FLATPAK.substring(1)).isFile && @@ -44,10 +33,6 @@ object FlatpakManager { else -> "aarch64" } - /** - * The installed apps, read from the installation itself: each app's deployed files carry the - * desktop entry and icons it exports, so listing them needs no process in the runtime. - */ fun installedApps(context: Context): List<App> { val apps = File(LinuxRuntime.rootDir(context), "$USER_DIR/app") val arch = arch() @@ -67,7 +52,6 @@ object FlatpakManager { fun isInstalled(context: Context, id: String): Boolean = File(LinuxRuntime.rootDir(context), "$USER_DIR/app/$id/${arch()}").listFiles()?.any { File(it, "active").exists() } == true - /** A key of the desktop entry's main group ([Desktop Entry]), unlocalised. */ private fun entry(desktop: String, key: String): String? { var inMain = false for (line in desktop.lineSequence()) { @@ -78,7 +62,6 @@ object FlatpakManager { return null } - /** The largest PNG the app exports (the front end draws no SVG). */ private fun icon(export: File, id: String): File? { val hicolor = File(export, "icons/hicolor") return hicolor.listFiles() @@ -87,13 +70,11 @@ object FlatpakManager { ?.maxByOrNull { it.first }?.second } - /** Runs [argv] in the runtime, its output also in files/logs/tools/flatpak-<verb>.log. */ private fun runGuest(context: Context, argv: List<String>, fakeRoot: Boolean, onLine: (String) -> Unit): Int { val name = "flatpak-" + (argv.getOrNull(2)?.takeIf { argv.getOrNull(1) == HELPER } ?: "setup") return GuestCommand.run(context, argv, fakeRoot, name, onLine = onLine) } - /** [block]'s result, or [ifBusy]'s while another operation has the installation. */ private inline fun <T> exclusive(what: String, ifBusy: () -> T, block: () -> T): T { synchronized(this) { if (busy != null) return ifBusy() @@ -102,7 +83,6 @@ object FlatpakManager { try { return block() } finally { busy = null } } - /** Puts Flatpak into the runtime and adds Flathub. Null on success, else what went wrong. */ fun setup(context: Context, onProgress: (String, Int) -> Unit): String? { if (!LinuxRuntime.isInstalled(context)) return context.getString(R.string.user_apps_runtime_required) return exclusive("setup", { context.getString(R.string.flatpakmgr_busy) }) { @@ -123,17 +103,12 @@ object FlatpakManager { } } - /** - * One store operation - install, uninstall or update - with its progress as a stage line and - * an overall percentage across the steps Flatpak plans (a runtime, its extensions, the app). - */ private fun transaction( context: Context, verb: String, id: String?, onProgress: (String, Int) -> Unit, onDone: (JSONObject) -> Unit = {}, ): String? { if (!ready(context)) return context.getString(R.string.flatpakmgr_not_ready) return exclusive("$verb:${id ?: "all"}", { context.getString(R.string.flatpakmgr_busy) }) { var error: String? = null - // Progress lines carry no ref; they belong to the step the last "op" line started. var step = context.getString(R.string.flatpakmgr_starting) val argv = listOfNotNull("/usr/bin/python3", HELPER, verb, id) val status = runGuest(context, argv, fakeRoot = false) { line -> @@ -169,10 +144,6 @@ object FlatpakManager { }, name) } - /** - * A ref in words: "app/org.supertuxproject.SuperTux/aarch64/stable" is "SuperTux". [text] - * resolves a string resource with its arguments. - */ internal fun refLabel(ref: String, text: (Int, Array<out Any>) -> String): String { val parts = ref.split('/') val id = parts.getOrNull(1) ?: return ref @@ -190,7 +161,6 @@ object FlatpakManager { } } - /** The whole transaction's percentage: steps done, plus this one's share. */ private fun overall(o: JSONObject, percent: Int): Int { val n = o.optInt("n").coerceAtLeast(1) val i = o.optInt("i").coerceIn(1, n) @@ -200,15 +170,14 @@ object FlatpakManager { fun install(context: Context, id: String, onProgress: (String, Int) -> Unit) = transaction(context, "install", id, onProgress) fun uninstall(context: Context, id: String, onProgress: (String, Int) -> Unit) = transaction(context, "uninstall", id, onProgress) - /** Installs the .flatpak bundle at [guestPath], its runtimes from Flathub: the app's ID, and what went wrong if anything. */ fun installBundle(context: Context, guestPath: String, onProgress: (String, Int) -> Unit): Pair<String?, String?> { var id: String? = null val problem = transaction(context, "install-bundle", guestPath, onProgress) { id = it.optString("id").ifEmpty { null } } return id to problem } fun update(context: Context, id: String?, onProgress: (String, Int) -> Unit) = transaction(context, "update", id, onProgress) + fun prune(context: Context, onProgress: (String, Int) -> Unit) = transaction(context, "prune", null, onProgress) - /** Installed apps with an update on Flathub, or null when that could not be checked. */ fun updates(context: Context): Set<String>? { if (!ready(context)) return emptySet() var apps: Set<String>? = null diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/GuestCommand.kt b/app/src/main/java/com/droiddeck/launcher/runtime/GuestCommand.kt index 286059588f..9c65c426ae 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/GuestCommand.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/GuestCommand.kt @@ -9,18 +9,7 @@ import com.droiddeck.launcher.session.SessionPaths import com.droiddeck.launcher.session.SessionPrefs import java.io.File -/** - * One command in the Linux runtime outside any session - the store's Flatpak work, an AppImage - * import - in a proot of its own. A session starting meanwhile leaves it running (OrphanReaper). - */ object GuestCommand { - /** - * Runs [argv] and hands each output line to [onLine]; returns the exit status. [fakeRoot] is - * for the package tools, which refuse any uid but 0. With [logName], everything the command - * says also goes to files/logs/tools/<logName>.log beside the session logs, so a problem can - * be handed over like a session's. With [linkDir], hard links (which Android denies apps) - * become symlinks to files proot keeps there (its link2symlink). - */ fun run(context: Context, argv: List<String>, fakeRoot: Boolean = false, logName: String? = null, linkDir: File? = null, onLine: (String) -> Unit): Int { val log = logName?.let { @@ -40,7 +29,6 @@ object GuestCommand { val root = LinuxRuntime.rootDir(context) LinuxRuntime.writeAccounts(context) SessionFiles.stage(context, root) - // The resolver otherwise names the DNS of whatever network the last session was on. LinuxNetworkLinkComponent(context, root).publish() val runtimeDir = File(context.filesDir, ".flatpak-rt").apply { mkdirs() } val cmd = LinuxRuntime.prootPrefix(context, root, "/root", fakeRoot) @@ -51,13 +39,14 @@ object GuestCommand { "/usr/bin/env", "-i", "HOME=/root", "USER=root", "LANG=C.UTF-8", "PATH=/usr/local/bin:/usr/bin:/bin", "XDG_RUNTIME_DIR=${LinuxRuntime.GUEST_RUNTIME_DIR}", "XDG_DATA_HOME=/root/.local/share", "FLATPAK_BWRAP=${FlatpakManager.BWRAP}", + "DROIDDECK_BWRAP_SOCKET=${BwrapSpawner.socket(context)}", "XDG_DATA_DIRS=/root/.local/share/flatpak/exports/share:/usr/local/share:/usr/share", ) cmd += argv val builder = ProcessBuilder(cmd).directory(root).redirectErrorStream(true) builder.environment().apply { put("PROOT_LOADER", LinuxRuntime.prootLoader(context).path) - put("PROOT_TMP_DIR", context.cacheDir.path) + put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(context).path) if (linkDir != null) put("PROOT_L2S_DIR", linkDir.path) if (SessionPrefs.prootNoSeccomp(context)) put("PROOT_NO_SECCOMP", "1") LinuxRuntime.prootLibraryPath(context).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) } diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxNetworkLinkComponent.kt b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxNetworkLinkComponent.kt index 5b5585c22f..3bf43fc348 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxNetworkLinkComponent.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxNetworkLinkComponent.kt @@ -26,18 +26,6 @@ import java.net.Inet6Address import org.json.JSONArray import org.json.JSONObject -/** - * The device's network link, published for the Linux runtime's processes. - * - * Android denies an app the rtnetlink dump behind getifaddrs() and if_nameindex(), the hardware - * address ioctl and every table under /proc/net. Wine builds its adapter, address, route and - * neighbour tables from those, so a game under the runtime saw no adapter, no address, no gateway - * and no MAC - and one that checks its adapters before going online waited for good. The link the - * app can see through ConnectivityManager is written here, kept current while the session runs, - * and the session shim answers whatever the kernel refuses from it (tools/linuxfs/preload/netif.c). - * - * Shape follows WinNative's LinuxNetworkLinkComponent (maxjivi05, f76a5c4a), GPL-3.0. - */ class LinuxNetworkLinkComponent( context: Context, private val rootDir: File, @@ -71,7 +59,6 @@ class LinuxNetworkLinkComponent( } } - /** Called before the session starts, so its first process already sees the link. */ fun publish() = synchronized(lock) { currentNetwork = connectivity.activeNetwork currentProperties = currentNetwork?.let(connectivity::getLinkProperties) @@ -102,7 +89,6 @@ class LinuxNetworkLinkComponent( } override fun onLost(network: Network) = synchronized(lock) { - // A handover can report the old link lost after the new default arrived. if (network == currentNetwork) { currentNetwork = null currentProperties = null @@ -174,7 +160,6 @@ class LinuxNetworkLinkComponent( } } - /** NetworkManager's view of Android. Kept separate from netif.c's legacy adapter format. */ @Suppress("DEPRECATION") private fun writeNetworkState(properties: LinkProperties?, capabilities: NetworkCapabilities?) { val namesAllowed = canReadWifiNames() @@ -238,8 +223,6 @@ class LinuxNetworkLinkComponent( connectionInfo } if (info != null) { - // SSIDs can be redacted by Android. No location permission is needed to - // report the transport; a hidden name simply displays as Wi-Fi in Steam. if (namesAllowed) { val namedInfo = connectionInfo ?: info namedInfo.ssid?.takeUnless { it == WifiManager.UNKNOWN_SSID || it.isEmpty() } @@ -262,15 +245,6 @@ class LinuxNetworkLinkComponent( } } - /** - * The guest's resolver, from the network it is actually on. glibc reads /etc/resolv.conf, - * and the image ships two public servers there, which is why Steam resolves at all - but a - * captive portal, a private-DNS network or a v6-only carrier wants the network's own - * servers. Those come first, IPv4 before IPv6 and never a link-local one (Android lists - * fe80:: resolvers a guest cannot reach; handing Bannerlator's Wine guests exactly that was - * the Pale Moon "no internet"). The public ones stay as fallback so nothing is ever worse - * than the image was. - */ private fun writeResolver(properties: LinkProperties?) { val own = properties?.dnsServers.orEmpty() .filter { !it.isLinkLocalAddress && !it.isLoopbackAddress && !it.isAnyLocalAddress } @@ -321,10 +295,6 @@ class LinuxNetworkLinkComponent( } } - /** - * A stable, locally administered address for this device. Android hides the real one, and a - * title should see the same hardware identity every session. - */ 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()) diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java index 082bf814e9..f7f68d6da3 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java +++ b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java @@ -16,47 +16,23 @@ import java.nio.file.Files; import java.util.ArrayList; import java.util.List; -/** - * The glibc arm64 rootfs at {@code files/linuxfs} and the proot invocation that runs a program in - * it as this app's own uid. It is a second runtime beside the Wine imagefs, not a container: no - * Wine, no box64, no FEX. proot is packaged as {@code libproot.so} so the installer places it, with - * its loader, in the native library directory - the only place an app on targetSdk 28 may execute - * a file from. - * - * <p>Ported from WinNative's gamescope runtime (GPL-3.0). - */ public final class LinuxRuntime { public static final String DIR = "linuxfs"; public static final String SESSION_SCRIPT = "/usr/local/bin/droiddeck-session"; public static final String MODE_DESKTOP = "desktop"; public static final String MODE_STEAM = "steam"; public static final String MODE_RUN = "run"; - /** Shortcut extra naming which of the modes above a Linux entry launches. */ public static final String EXTRA_LINUX_MODE = "linux_mode"; private static final String KGSL_DEVICE = "/dev/kgsl-3d0"; - /** - * Where the guest sees a command's XDG_RUNTIME_DIR. A Unix socket's path must fit in 108 bytes, - * and libwayland checks the guest's path before proot ever sees it: with the app on an SD card - * adopted as internal storage the files directory is /mnt/expand/<uuid>/user/0/<package>/files, - * and gamescope-0 under it is one byte over, so gamescope could not open its socket and the - * session ended at once. A long host path behind it is proot's to shorten. - */ public static final String GUEST_RUNTIME_DIR = "/run/droiddeck"; private static final String SYSTEM_FONTS = "/system/fonts"; private static final String GUEST_SYSTEM_FONTS = "/usr/local/share/fonts/android"; - /** The folder under Downloads where builds before private logs wrote them; read only to move them. */ public static final String DEBUG_LOG_DIR = "DroidDeck"; - /** - * Where every log lands: app-private, {@code files/logs}. Session folders, tools/ (one-off - * commands) and stores/ sit under it; the files directory is bound into every session at the - * same path, so the guest writes there too. Share logs is how a folder leaves the device. - */ public static File logDir(Context context) { return new File(context.getFilesDir(), "logs"); } - /** {@code Download/DroidDeck}, where earlier builds wrote logs. Only LogMigration reads it. */ public static File legacyLogDir() { return new File(android.os.Environment.getExternalStoragePublicDirectory( android.os.Environment.DIRECTORY_DOWNLOADS), DEBUG_LOG_DIR); @@ -68,16 +44,23 @@ public final class LinuxRuntime { return new File(context.getFilesDir(), DIR); } - /** - * The session's own small tree beside the rootfs: the fake evdev nodes and their rings. In - * Bannerlator these lived in the Wine imagefs; here there is no Wine, so the session owns them. - * Bound into the guest at its own host path, so nothing needs translating. - */ public static File sessionRoot(Context context) { return new File(context.getFilesDir(), "session"); } - /** Where the runtime carries the host-side proot; see tools/linuxfs/prebuilt/proot/README.md. */ + public static File liveDir(Context context) { + // Android may evict cache files even while guest processes are using them. + File dir = new File(context.getNoBackupFilesDir(), "guest-runtime"); + dir.mkdirs(); + return dir; + } + + public static File prootTempDir(Context context) { + File dir = new File(liveDir(context), "proot"); + dir.mkdirs(); + return dir; + } + private static final String HOST_DIR = "opt/android-host"; public static File prootBinary(Context context) { @@ -92,13 +75,11 @@ public final class LinuxRuntime { return new File(rootDir(context), HOST_DIR + "/loader"); } - /** proot links against libtalloc, which sits beside it; empty when the apk copy is in use. */ public static String prootLibraryPath(Context context) { File dir = new File(rootDir(context), HOST_DIR); return dir.equals(prootBinary(context).getParentFile()) ? dir.getPath() : ""; } - /** The rootfs is present with gamescope and the session script the launcher hands control to. */ public static boolean isInstalled(Context context) { if (LinuxRuntimeInstaller.isRemoving() || LinuxRuntimeInstaller.hasRemovalPending(context)) return false; File root = rootDir(context); @@ -109,7 +90,6 @@ public final class LinuxRuntime { && prootLoader(context).isFile(); } - /** The Vulkan ICD manifest the rootfs ships for the device GPU, or null when it has none. */ public static File vulkanIcd(Context context) { File icdDir = new File(rootDir(context), "usr/share/vulkan/icd.d"); File[] manifests = icdDir.listFiles((dir, name) -> name.endsWith(".json")); @@ -120,25 +100,16 @@ public final class LinuxRuntime { return manifests.length > 0 ? manifests[0] : null; } - /** - * The proot command line running {@code guestCommand} inside the rootfs. Host paths the session - * needs - the app's files directory for the compositor and audio sockets, external storage for - * the user's games - are bound at their own paths, so nothing on either side needs translating - * and proot never touches the fds a dma-buf travels in. Android has no /dev/shm; a directory - * under the cache stands in, which glibc's shm_open and Chromium's shared memory accept. - */ public static List<String> command(Context context, File sessionRoot, File runtimeDir, File externalStorage, List<String> guestCommand) { return command(context, sessionRoot, runtimeDir, externalStorage, null, guestCommand); } - /** As above, plus {@code host:guest} bind specs - the installed games handed to Steam. */ public static List<String> command(Context context, File sessionRoot, File runtimeDir, File externalStorage, List<String> extraBinds, List<String> guestCommand) { File root = rootDir(context); List<String> binds = binds(context, sessionRoot, runtimeDir, externalStorage, extraBinds); - // A session's binds are the view its programs have; a one-off command's are not recorded. if (sessionRoot != null) lastBinds = binds; List<String> cmd = prootPrefix(context, root, "/root"); for (String spec : binds) bind(cmd, spec); @@ -146,10 +117,6 @@ public final class LinuxRuntime { return cmd; } - /** - * The binds of the last command built: the guest's view of the host, which the Flatpak - * sandboxes started beside a session (BwrapSpawner) translate their paths through. - */ private static volatile List<String> lastBinds; public static List<String> lastBinds(Context context) { @@ -158,25 +125,15 @@ public final class LinuxRuntime { return binds(context, null, null, android.os.Environment.getExternalStorageDirectory(), null); } - /** proot and its options up to the binds: the rootfs at {@code root}, starting in {@code cwd}. */ public static List<String> prootPrefix(Context context, File root, String cwd) { return prootPrefix(context, root, cwd, false); } - /** - * As above; {@code fakeRoot} has the guest see uid 0 (proot -0), for the package tools that - * refuse any other uid. Files it writes still belong to the app. - */ public static List<String> prootPrefix(Context context, File root, String cwd, boolean fakeRoot) { List<String> cmd = new ArrayList<>(); cmd.add(prootBinary(context).getPath()); cmd.add("--kill-on-exit"); - // Preserve the host kernel identity while giving the guest the app's branded host name. cmd.add("--kernel-release=" + guestUtsname(SessionPrefs.guestHostname(context))); - // Android's app seccomp policy traps the whole set*id family. Xwayland's Popen() calls - // setgid()/setuid() before it execs xkbcomp and _exit(127)s when they fail, so without - // this the keymap never compiles and Xwayland dies. -i makes proot answer those calls - // itself while still reporting our real ids, so nothing inside sees a different user. int uid = Process.myUid(); if (fakeRoot) { cmd.add("-0"); @@ -191,7 +148,6 @@ public final class LinuxRuntime { return cmd; } - /** The {@code host:guest} (or same-path) bind specs of a session; see {@link #command}. */ public static List<String> binds(Context context, File sessionRoot, File runtimeDir, File externalStorage, List<String> extraBinds) { File root = rootDir(context); @@ -208,6 +164,7 @@ public final class LinuxRuntime { bind(cmd, new File(root, "etc/droiddeck/empty").getPath() + ":/sys/fs/selinux"); bind(cmd, context.getFilesDir().getPath()); bind(cmd, context.getCacheDir().getPath()); + bind(cmd, liveDir(context).getPath()); if (runtimeDir != null) { bind(cmd, runtimeDir.getPath()); bind(cmd, runtimeDir.getPath() + ":" + GUEST_RUNTIME_DIR); @@ -216,44 +173,25 @@ public final class LinuxRuntime { if (externalStorage != null && externalStorage.isDirectory()) { bind(cmd, externalStorage.getPath()); } - File shm = new File(context.getCacheDir(), "shm"); + File shm = new File(liveDir(context), "shm"); shm.mkdirs(); bind(cmd, shm.getPath() + ":/dev/shm"); bindSystemFonts(cmd, root); - // Android denies apps these; glibc, Steam and libcap read them at startup. File fakeProc = new File(root, "etc/droiddeck/proc"); - // libpci picks its procfs backend on whether it can read the /proc/bus/pci directory, which - // the app can, then die()s - exit(1) on the calling process - on the devices file inside - // it, which the app cannot. Chromium loads libpci in its GPU process to name the video - // card, so that exit kills the process; after a few tries CEF gives up on hardware and - // draws the rest of the session on SwiftShader: the client's interface rendered on the - // CPU. An empty list is the truthful answer from in here - nothing the app can see is on - // a PCI bus. Created at session start rather than shipped in the rootfs so an installed - // runtime is fixed too, and the table's guard below binds it only when the real file - // cannot be read, so it can never stand in front of real data. (WinNative, maxjivi05, - // deff1ac6, via Bannerlator 8fb668d1: 44 -> 85 fps scrolling the Big Picture library on a - // OnePlus 15, GPU-process crashes 12 -> 0.) File pciDevices = new File(fakeProc, "pci_devices"); if (!pciDevices.isFile()) { try { - //noinspection ResultOfMethodCallIgnored pciDevices.getParentFile().mkdirs(); - //noinspection ResultOfMethodCallIgnored pciDevices.createNewFile(); } catch (java.io.IOException e) { - // It then fails the isFile() test below and the session runs as it did before. } } - // protonfixes, which GE-Proton and proton-cachyos run before every game, opens this to - // check the esync file limit and dies on the PermissionError, so no game starts with them. - // The value is the 64-bit kernel default. File fileMax = new File(fakeProc, "file-max"); if (!fileMax.isFile()) { try { Files.write(fileMax.toPath(), "9223372036854775807\n".getBytes(StandardCharsets.US_ASCII)); } catch (IOException e) { - // Left unbound, as above. } } String[][] procFiles = { @@ -270,7 +208,6 @@ public final class LinuxRuntime { }; for (String[] entry : procFiles) { File fake = new File(fakeProc, entry[0]); - // A live stand-in the session binds itself (CpuStatComponent's /proc/stat) wins. boolean live = false; if (extraBinds != null) for (String spec : extraBinds) live |= spec.endsWith(":" + entry[1]); if (!live && fake.isFile() && !new File(entry[1]).canRead()) { @@ -288,14 +225,6 @@ public final class LinuxRuntime { return specs; } - /** - * An app process may not open {@code /dev/dri} - the nodes exist but are labelled - * {@code graphics_device}, which stock policy grants surfaceflinger and not us - yet libdrm and - * everything built on it identify a GPU by its render node, and gamescope refuses to offer - * linux-dmabuf without one. The KGSL device Turnip actually drives ({@code gpu_device}, which we - * may open) stands in: it appears as a render node with the sysfs entries libdrm reads, and our - * Turnip build reports the same device numbers for it. - */ private static void bindGpuNode(Context context, List<String> cmd) { StructStat st; try { @@ -307,7 +236,7 @@ public final class LinuxRuntime { long major = ((dev >> 8) & 0xfff) | ((dev >> 32) & ~0xfffL); long minor = (dev & 0xff) | ((dev >> 12) & ~0xffL); String node = "renderD" + minor; - File base = new File(context.getCacheDir(), "drm"); + File base = new File(liveDir(context), "drm"); File dri = new File(base, "dri"); File device = new File(base, "sys/" + major + ":" + minor + "/device"); File drm = new File(device, "drm/" + node); @@ -324,8 +253,6 @@ public final class LinuxRuntime { if (!Files.isSymbolicLink(subsystem.toPath())) { Os.symlink("/sys/bus/platform", subsystem.getPath()); } - // What MangoHud names a GPU's driver by; msm_drm is how an Adreno's render node reads - // on a mainline kernel, and the driver it reads the load of (bindAdrenoStats). File driver = new File(device, "driver"); if (!Files.isSymbolicLink(driver.toPath())) { Os.symlink("/sys/bus/platform/drivers/msm_drm", driver.getPath()); @@ -339,22 +266,11 @@ public final class LinuxRuntime { bindDrmClass(base, cmd, node, major + ":" + minor); } - /** - * MangoHud (Deck mode's performance overlay, mangoapp) finds the GPU by listing - * {@code /sys/class/drm}, and an exception from that listing ends the process: under an - * enforcing SELinux policy - every retail phone - an app may not list it, so mangoapp died on - * start, gamescope restarted it until the session gave up, and there was no overlay. Where the - * app cannot list it, the session's {@code /sys/class/drm} is ours: the render node above, - * named as an Adreno's is. MangoHud then reads the GPU's stats from KGSL's sysfs, which such a - * device refuses too - SessionService's GpuStatsComponent stands in for that. Where the - * listing is allowed it is left alone. - */ private static void bindDrmClass(File base, List<String> cmd, String node, String devNumbers) { if (new File("/sys/class/drm").list() != null) return; File drmClass = new File(base, "class"); try { if (!drmClass.isDirectory() && !drmClass.mkdirs()) return; - // Only symlinks are ever made here; deleting them must not follow one into its target. File[] old = drmClass.listFiles(); if (old != null) for (File f : old) Files.deleteIfExists(f.toPath()); Os.symlink("/sys/dev/char/" + devNumbers, new File(drmClass, node).getPath()); @@ -363,15 +279,12 @@ public final class LinuxRuntime { } bind(cmd, drmClass.getPath() + ":/sys/class/drm"); android.util.Log.i("LinuxRuntime", "hud: /sys/class/drm is not listable here; the session's lists " + node); - // Also refused to list, also asked for by MangoHud twice a second - an error line each - // time in the session log - and holding nothing it reads on an Adreno phone. if (new File("/sys/class/powercap").list() == null) { File empty = new File(base, "empty-powercap"); if (empty.isDirectory() || empty.mkdirs()) bind(cmd, empty.getPath() + ":/sys/class/powercap"); } } - /** The temperature of a CPU zone the app may read (the first by name), or null. */ public static String cpuTempSource() { for (java.util.Map.Entry<String, File> e : new java.util.TreeMap<>(thermalZones()).entrySet()) { File temp = new File(e.getValue(), "temp"); @@ -380,7 +293,6 @@ public final class LinuxRuntime { return null; } - /** The file the GPU's temperature reads from, or null where the app may read none. */ public static String gpuTempSource() { String kgsl = "/sys/class/kgsl/kgsl-3d0/"; return firstReadable(kgsl + "temp", kgsl + "devfreq/temp", thermalZone("gpu")); @@ -391,12 +303,6 @@ public final class LinuxRuntime { return firstReadable(kgsl + "gpu_busy_percentage", kgsl + "devfreq/gpu_load"); } - /** - * Valve's mangoapp (Deck mode's performance overlay) reads an Adreno GPU's load, clock and - * temperatures from where they are on Valve's own hardware; every Adreno under Android keeps - * them in KGSL's sysfs, readable by the app, though which files a kernel has differs between - * Snapdragon generations. - */ private static void bindAdrenoStats(List<String> cmd, List<String> extraBinds) { String kgsl = "/sys/class/kgsl/kgsl-3d0/"; String gpuTemp = gpuTempSource(); @@ -409,13 +315,10 @@ public final class LinuxRuntime { {thermalZone("ddr"), "/sys/class/thermal/thermal_zone22/temp"}, }; for (String[] stat : stats) { - // A value the session feeds itself (GpuStatsComponent, where KGSL is refused) wins. boolean fed = false; if (extraBinds != null) for (String spec : extraBinds) fed |= spec.endsWith(":" + stat[1]); if (stat[0] != null && !fed) bind(cmd, stat[0] + ":" + stat[1]); } - // Which of the overlay's GPU values this device lets the app read: a phone under an - // enforcing policy refuses some of them, and the overlay then has no line for that value. android.util.Log.i("LinuxRuntime", "hud sources: gpu load " + orNone(stats[0][0]) + ", gpu clock " + orNone(stats[1][0]) + ", gpu temp " + orNone(gpuTemp) + ", ddr temp " + orNone(stats[4][0]) + ", thermal zones " + thermalZones().size() @@ -426,12 +329,6 @@ public final class LinuxRuntime { return path != null ? path : "none"; } - /** - * mangoapp's CPU temperature is the mean of the thermal zones named cpuN-thermal or - * cpuN-top-thermal, as mainline kernels name them; Android kernels name the same sensors - * cpuss-0, cpu-1-0, cpu0-silver-usr, apc1-cpu0-usr and the like, so those zones are shown - * under the mainline name. - */ private static void bindCpuTemps(List<String> cmd, File root) { File name = new File(root, "etc/droiddeck/cpu-thermal-type"); try { @@ -454,7 +351,6 @@ public final class LinuxRuntime { return null; } - /** The temp file of the thermal zone for a sensor: the one named so, else the first whose name has it. */ private static String thermalZone(String sensor) { java.util.Map<String, File> zones = thermalZones(); File zone = zones.get(sensor); @@ -464,7 +360,6 @@ public final class LinuxRuntime { return zone != null ? new File(zone, "temp").getPath() : null; } - /** The device's thermal zones by their sensor's name, in lower case. */ private static java.util.Map<String, File> thermalZones() { java.util.Map<String, File> byType = new java.util.HashMap<>(); File[] zones = new File("/sys/class/thermal").listFiles((dir, n) -> n.startsWith("thermal_zone")); @@ -492,14 +387,12 @@ public final class LinuxRuntime { cmd.add(spec); } - /** PRoot's complex -k format: sysname, nodename, release, version, machine, domain, HWCAP. */ static String guestUtsname(String hostname) { StructUtsname host = Os.uname(); return "\\" + host.sysname + "\\" + hostname + "\\" + host.release + "\\" + host.version + "\\" + host.machine + "\\localdomain\\-1\\"; } - /** X access control and Steam look the session user up by uid: the app uid is root inside. */ public static void writeAccounts(Context context) throws IOException { File root = rootDir(context); int uid = Process.myUid(); diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntimeInstaller.java b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntimeInstaller.java index c6d0fb22ce..efecb6fb20 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntimeInstaller.java +++ b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntimeInstaller.java @@ -29,30 +29,19 @@ import java.nio.file.StandardCopyOption; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CountDownLatch; -/** - * Downloads and unpacks the Linux runtime rootfs into {@code files/linuxfs}. It is opt-in: nothing - * fetches it until the user asks for it, and a gamescope session refuses to start without it. - * - * <p>The catalog row names the build, its URL and its sha256, so an interrupted or corrupted - * download is caught before anything is written into the app's files directory. - */ public final class LinuxRuntimeInstaller { private static final String TAG = "LinuxRuntimeInstaller"; - /** Catalog row, beside the other component catalogs in winlator-contents. */ public static final String CATALOG_URL = "https://raw.githubusercontent.com/Droid-Deck/DroidDeck-Components/main/linuxfs.json"; private static final String VERSION_FILE = ".version"; - /** What a stage is doing, for code that branches on it rather than on its (translated) words. */ public enum Step { DOWNLOADING, VERIFYING, OTHER } public interface ProgressListener { - /** {@code percent} is -1 while the size is unknown. */ void onProgress(String stage, int percent); - /** The same with its {@link Step}; a listener that branches on the step overrides this one. */ default void onProgress(Step step, String stage, int percent) { onProgress(stage, percent); } @@ -72,11 +61,6 @@ public final class LinuxRuntimeInstaller { } } - /** - * One runtime operation per process. The launcher and session can both install, and a - * launcher rebuilt mid-install (a pad plugged in, dark mode switched) forgets it had: a second - * install would share the first one's archive and staging directory and wreck both. - */ private static final class Job { final CopyOnWriteArrayList<ProgressListener> listeners = new CopyOnWriteArrayList<>(); final CountDownLatch done = new CountDownLatch(1); @@ -95,7 +79,6 @@ public final class LinuxRuntimeInstaller { private LinuxRuntimeInstaller() {} - /** The build currently unpacked, or null when the runtime is not installed. */ public static String installedVersion(Context context) { File marker = new File(LinuxRuntime.rootDir(context), VERSION_FILE); if (!marker.isFile() || !LinuxRuntime.isInstalled(context)) return null; @@ -103,7 +86,6 @@ public final class LinuxRuntimeInstaller { return v == null ? null : v.trim(); } - /** The catalog's current build, or null when it cannot be reached or read. */ public static Release fetchRelease() { String body = Downloader.downloadString(CATALOG_URL); if (body == null || body.isEmpty()) return null; @@ -120,22 +102,8 @@ public final class LinuxRuntimeInstaller { } } - /** - * The guest's home directory, carried across an update rather than replaced with the tarball's - * empty one. Steam installs itself here - the client, the signed-in account and every - * downloaded game - so replacing the rootfs wholesale used to delete all three and leave the - * user re-downloading Steam and signing in again, with their library gone. - */ private static final String USER_DATA = "root"; - /** - * Downloads {@code release} and replaces whatever is installed with it. Returns false and - * leaves the existing runtime alone if the download or the checksum fails; the new rootfs is - * only moved into place once it has been unpacked whole. - * - * <p>{@link #USER_DATA} survives the swap: the system is replaced, what the user put in it is - * not. An update therefore keeps Steam, the login and the installed games. - */ public static boolean install(Context context, Release release, ProgressListener listener) { Job job; boolean owner; @@ -169,7 +137,6 @@ public final class LinuxRuntimeInstaller { } } - /** True while an install is running in this process, whoever started it. */ public static boolean isInstalling() { synchronized (JOB_LOCK) { return running != null && !running.removal && !running.maintenance; @@ -188,7 +155,6 @@ public final class LinuxRuntimeInstaller { synchronized (JOB_LOCK) { return running != null && running.maintenance; } } - /** Reserve an in-place package operation with the same exclusion/progress as runtime installs. */ public static Maintenance beginMaintenance(Context context, String stage) { if (com.droiddeck.launcher.session.SessionState.INSTANCE.getRunning()) return null; com.droiddeck.launcher.session.SessionPhase phase = com.droiddeck.launcher.session.SessionState.INSTANCE.getPhase(); @@ -241,10 +207,6 @@ public final class LinuxRuntimeInstaller { return new File(root.getParentFile(), root.getName() + ".removing"); } - /** - * Follows the runtime operation already running, including removal, after a screen rebuild. - * Blocks until it ends and returns its result, or null when there is no current operation. - */ public static Boolean attach(ProgressListener listener) { Job job; synchronized (JOB_LOCK) { @@ -268,19 +230,38 @@ public final class LinuxRuntimeInstaller { } } + /** + * The download is named after the release, so a partial file is only ever resumed for the same + * version and checksum, never for a different runtime that happens to share a fixed name. + */ + static String archiveName(Release release) { + String version = release.version.replaceAll("[^A-Za-z0-9._-]", "_"); + String sum = release.sha256.replaceAll("[^A-Za-z0-9]", ""); + if (sum.length() > 12) sum = sum.substring(0, 12); + return "linuxfs-" + version + "-" + sum + ".tar.zst"; + } + + /** Removes archives left by other releases and by builds that used the fixed name. */ + private static void deleteOtherArchives(File dir, String keep) { + File[] files = dir.listFiles((d, name) -> name.startsWith("linuxfs") && name.endsWith(".tar.zst") && !name.equals(keep)); + if (files == null) return; + for (File file : files) file.delete(); + } + private static boolean installOnce(Context context, Release release, ProgressListener listener) { - File archive = new File(context.getCacheDir(), "linuxfs.tar.zst"); + File archive = new File(context.getCacheDir(), archiveName(release)); + // A failed download keeps what it fetched so the next attempt resumes it; anything that + // reached verification and failed is not trusted and is removed. + boolean keepPartial = false; try { - // A failed/interrupted explicit removal must finish before a fresh installation. - // Its quarantined home is not user data to carry into an update. + deleteOtherArchives(context.getCacheDir(), archive.getName()); File pendingRemoval = removalDirectory(LinuxRuntime.rootDir(context)); if (pendingRemoval.exists() && listener != null) listener.onProgress(context.getString(R.string.rtinst_removing_leftovers), -1); if (!discard(pendingRemoval, null)) throw new IOException("Cannot clear the previous runtime: " + pendingRemoval); emptyTrash(LinuxRuntime.rootDir(context).getParentFile()); String downloading = context.getString(R.string.rtinst_downloading); if (listener != null) listener.onProgress(Step.DOWNLOADING, downloading, 0); - // Downloader reports a 0..1 fraction, or -1 while the total size is unknown. - boolean ok = Downloader.downloadFile(release.url, archive, true, (fraction) -> { + boolean ok = Downloader.downloadFile(release.url, archive, true, release.sha256, (fraction) -> { if (listener != null) { listener.onProgress(Step.DOWNLOADING, downloading, fraction < 0 ? -1 : Math.round(fraction * 100f)); @@ -288,6 +269,7 @@ public final class LinuxRuntimeInstaller { }); if (!ok) { Log.w(TAG, "download failed"); + keepPartial = true; return false; } @@ -298,8 +280,6 @@ public final class LinuxRuntimeInstaller { return false; } - // Unpack beside the live rootfs and swap, so a failure here cannot leave a half - // runtime that isInstalled() would happily launch. File root = LinuxRuntime.rootDir(context); File staging = new File(root.getParentFile(), LinuxRuntime.DIR + ".new"); File old = new File(root.getParentFile(), LinuxRuntime.DIR + ".old"); @@ -321,16 +301,10 @@ public final class LinuxRuntimeInstaller { return false; } - // Carry the user's home over before the new rootfs takes the name. A rename inside the - // same filesystem, so a 30 GB library costs nothing and cannot half-copy; the tarball's - // own empty /root is dropped first so the rename has somewhere to land. If this fails - // the update is abandoned and the previous runtime is put back untouched - shipping a - // working system with the user's games gone is the worse outcome. try { RuntimeFileTree.carryHome(old, staging); } catch (IOException e) { Log.w(TAG, "could not carry root across the update; rolling back", e); - // Restore the live name even if cleaning the failed staging tree is denied. old.renameTo(root); try { RuntimeFileTree.delete(staging, null); } catch (IOException cleanup) { Log.w(TAG, "could not clear the failed staging tree", cleanup); } @@ -349,7 +323,7 @@ public final class LinuxRuntimeInstaller { Log.e(TAG, "install", e); return false; } finally { - archive.delete(); + if (!keepPartial) archive.delete(); } } @@ -366,15 +340,8 @@ public final class LinuxRuntimeInstaller { } } - /** Where entries the app cannot unlink are set aside, out of the way of the runtime's names. */ static final String TRASH = ".runtime-trash"; - /** - * Gets {@code tree} out from under its name. What can be deleted is; if something inside - * cannot be (a file made by root or {@code su} carries another SELinux category, and the app - * may not unlink it), the remainder is moved aside into {@link #TRASH} instead of blocking - * every later install and removal on it. False only when even that move is refused. - */ static boolean discard(File tree, java.util.function.LongConsumer progress) { if (RuntimeFileTree.deleteWhatCan(tree, progress)) return true; File trash = new File(tree.getParentFile(), TRASH); @@ -388,7 +355,6 @@ public final class LinuxRuntimeInstaller { return !tree.exists(); } - /** Another try at what {@link #discard} set aside. Whatever still cannot go stays there. */ static void emptyTrash(File parent) { File trash = new File(parent, TRASH); if (trash.exists() && !RuntimeFileTree.deleteWhatCan(trash, null)) @@ -400,15 +366,18 @@ public final class LinuxRuntimeInstaller { return dir.isDirectory() && names != null && names.length == 0; } - /** Reserve removal before returning to the UI, so Play cannot race the worker. */ public static Removal beginUninstall(Context context) { - if (com.droiddeck.launcher.session.SessionState.INSTANCE.getRunning()) return null; - com.droiddeck.launcher.session.SessionPhase phase = com.droiddeck.launcher.session.SessionState.INSTANCE.getPhase(); - if (phase != com.droiddeck.launcher.session.SessionPhase.IDLE && phase != com.droiddeck.launcher.session.SessionPhase.FAILED) return null; + if (sessionInUse()) return null; return beginUninstall(context.getApplicationContext(), LinuxRuntime.rootDir(context)); } - /** {@code app} words the progress; unit tests pass null and get none. */ + private static boolean sessionInUse() { + com.droiddeck.launcher.session.SessionState session = com.droiddeck.launcher.session.SessionState.INSTANCE; + com.droiddeck.launcher.session.SessionPhase phase = session.getPhase(); + return session.getRunning() || + (phase != com.droiddeck.launcher.session.SessionPhase.IDLE && phase != com.droiddeck.launcher.session.SessionPhase.FAILED); + } + static Removal beginUninstall(Context app, File root) { synchronized (JOB_LOCK) { if (running != null) return null; @@ -433,6 +402,7 @@ public final class LinuxRuntimeInstaller { if (!started.compareAndSet(false, true)) return join(job, listener); if (listener != null) job.listeners.add(listener); try { + requireStopped(); report(text(app, R.string.rtinst_removing), -1); final long[] removed = {0}; final long[] lastShown = {0}; @@ -446,17 +416,12 @@ public final class LinuxRuntimeInstaller { } }; File pending = removalDirectory(root); - // Invalidate the installation before traversing it. A process killed halfway - // through leaves a named removal to resume, never a launchable partial runtime. if (root.exists()) { if (!discard(pending, progress) || !root.renameTo(pending)) throw new IOException("Cannot prepare the runtime for removal"); } else if (!pending.isDirectory() && !pending.mkdirs()) { throw new IOException("Cannot prepare the runtime for removal"); } - // Keep the quarantine until all leftovers are gone, so a failure stays retryable. - // An entry the app may not delete is set aside rather than failing the removal: - // a quarantine that can never clear would block reinstalling for good. for (File leftover : new File[]{ new File(root.getParentFile(), root.getName() + ".new"), new File(root.getParentFile(), root.getName() + ".old"), @@ -464,6 +429,8 @@ public final class LinuxRuntimeInstaller { if (!discard(leftover, progress)) throw new IOException("Cannot remove " + leftover); } emptyTrash(root.getParentFile()); + requireStopped(); + if (app != null) RuntimeFileTree.delete(new File(app.getNoBackupFilesDir(), "guest-runtime"), null); job.ok = true; report(text(app, R.string.rtinst_removed), 100); return true; @@ -477,6 +444,11 @@ public final class LinuxRuntimeInstaller { job.done.countDown(); } } + + private void requireStopped() throws IOException { + if (Thread.currentThread().isInterrupted()) throw new IOException("Runtime removal was interrupted"); + if (app != null && sessionInUse()) throw new IOException("A session is still using the runtime"); + } private void report(String stage, int percent) { job.stage = stage; job.percent = percent; @@ -484,12 +456,6 @@ public final class LinuxRuntimeInstaller { } } - /** - * A whole-rootfs tar, which is not the shape the shared extractor handles: a distribution - * rootfs is full of hard links (one binary under several names), and an entry written as an - * empty file instead of its link target is a rootfs that boots to nothing. Symlinks, hard - * links and the executable bit are all carried over here. - */ public static boolean extract(Context context, File archive, File destination, ProgressListener listener) { long entries = 0; String extracting = context.getString(R.string.rtinst_extracting); @@ -498,7 +464,6 @@ public final class LinuxRuntimeInstaller { TarArchiveInputStream tar = new TarArchiveInputStream(in)) { TarArchiveEntry entry; while ((entry = tar.getNextTarEntry()) != null) { - // Refuse anything that would land outside the runtime directory. File file = ArchivePaths.inside(destination, entry.getName()); if (file == null) { Log.w(TAG, "skipping entry outside the rootfs: " + entry.getName()); @@ -515,10 +480,6 @@ public final class LinuxRuntimeInstaller { file.delete(); FileUtils.symlink(entry.getLinkName(), file.getAbsolutePath()); } else if (entry.isLink()) { - // A hard link to an earlier entry. Link where the filesystem allows it and - // fall back to a copy, which costs space but always works. - // The target is checked too: a link to "../../shared_prefs/x" would pull a - // file from outside the rootfs into it. File target = ArchivePaths.inside(destination, entry.getLinkName()); if (target == null) { Log.w(TAG, "skipping hard link outside the rootfs: " + entry.getLinkName()); @@ -540,7 +501,7 @@ public final class LinuxRuntimeInstaller { } if ((entry.getMode() & 0111) != 0) file.setExecutable(true, false); } else { - continue; // device nodes and fifos: the runtime binds the real ones + continue; } if (++entries % 2000 == 0 && listener != null) { listener.onProgress(extracting, -1); diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/ProotFastPath.kt b/app/src/main/java/com/droiddeck/launcher/runtime/ProotFastPath.kt index 10538c5bc6..08ca036677 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/ProotFastPath.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/ProotFastPath.kt @@ -5,36 +5,14 @@ import com.droiddeck.launcher.session.SessionPrefs import java.io.File import java.security.MessageDigest -/** - * proot's fast path: the session's path lookups answered inside each process by libblfastpath - * (tools/proot/fastpath), which issues the translated call from a trampoline page proot's seccomp - * filter lets through (tools/proot/patches/0014). A stat or an open costs about a microsecond - * instead of a 15-60 us round trip through the tracer. - * - * The library maps guest paths to host paths itself, so it has to be told the rootfs and the - * binds exactly as proot was given them. Both sides carry a key derived from that view - proot - * PROOT_FASTPATH=<key>, the guest PROOT_FP_KEY=<key> - and the library answers nothing unless the - * process that traces it has the same key: a program that inherited the variables but runs under - * another proot (a Flatpak sandbox, a one-off command) leaves every call to its own proot. - * - * Needs proot's seccomp filter, so "Run proot without seccomp" turns it off as well. - */ object ProotFastPath { const val LIBRARY = "/usr/local/lib/libblfastpath.so" - /** MAX_BINDS in fastpath.c: past it the library turns itself off, so the session keeps it off. */ const val MAX_BINDS = 256 - /** - * Only the app's own proot (libproot.so, built with patches/0014) lets the trampoline through. - * The runtime's fallback copy (LinuxRuntime.prootBinary) is Termux's, which traps those calls - * too and translates their host paths a second time: every lookup then fails inside the - * process and goes to proot anyway, paying for both. - */ fun enabled(context: Context): Boolean = SessionPrefs.prootFastPath(context) && !SessionPrefs.prootNoSeccomp(context) && LinuxRuntime.prootBinary(context).parent == context.applicationInfo.nativeLibraryDir - /** The key for this rootfs and these binds, or null when the library cannot be told them. */ fun key(root: File, binds: List<String>): String? { if (binds.size > MAX_BINDS || binds.any { it.contains('|') } || root.path.contains('|')) return null val digest = MessageDigest.getInstance("SHA-256") @@ -42,10 +20,8 @@ object ProotFastPath { return digest.take(12).joinToString("") { "%02x".format(it) } } - /** What proot's own environment carries. */ fun hostEnv(key: String): Pair<String, String> = "PROOT_FASTPATH" to key - /** The guest's assignments (for `env -i`), describing the view proot was given. */ fun guestEnv(root: File, binds: List<String>, key: String): List<String> = listOf( "PROOT_FP_ROOT=" + root.path, "PROOT_FP_BINDS=" + binds.joinToString("|"), diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/RuntimeFileTree.java b/app/src/main/java/com/droiddeck/launcher/runtime/RuntimeFileTree.java index ca59389f2d..5fb94de051 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/RuntimeFileTree.java +++ b/app/src/main/java/com/droiddeck/launcher/runtime/RuntimeFileTree.java @@ -12,11 +12,9 @@ import java.nio.file.attribute.BasicFileAttributes; import java.util.function.LongConsumer; import java.util.function.Predicate; -/** Checked removal of an app-owned runtime tree, including read-only directories. */ -final class RuntimeFileTree { +public final class RuntimeFileTree { private RuntimeFileTree() {} - /** Unit tests stand in for an entry the app cannot unlink (a file another SELinux user made). */ static volatile Predicate<Path> refuseForTest; static void delete(File root, LongConsumer progress) throws IOException { @@ -28,8 +26,6 @@ final class RuntimeFileTree { try { attrs = Files.readAttributes(path, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS); } catch (NoSuchFileException e) { return; } if (attrs.isDirectory()) { - // Change directory permissions before opening it, so mode 000 also works. Links - // are inspected with lstat and unlinked directly; never chmod or visit their target. makeWritable(path.toFile()); try (DirectoryStream<Path> children = Files.newDirectoryStream(path)) { for (Path child : children) delete(child, progress, removed); @@ -39,11 +35,7 @@ final class RuntimeFileTree { if (progress != null) progress.accept(++removed[0]); } - /** - * Removes what it can of {@code root} and carries on past entries it cannot, rather than - * stopping at the first. Returns true when nothing is left. - */ - static boolean deleteWhatCan(File root, LongConsumer progress) { + public static boolean deleteWhatCan(File root, LongConsumer progress) { return deleteWhatCan(root.toPath(), progress, new long[]{0}); } diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/RuntimeInstallService.kt b/app/src/main/java/com/droiddeck/launcher/runtime/RuntimeInstallService.kt index aef352baa0..95a96b899f 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/RuntimeInstallService.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/RuntimeInstallService.kt @@ -12,15 +12,6 @@ import android.os.IBinder import com.droiddeck.launcher.MainActivity import com.droiddeck.launcher.R -/** - * Keeps the process in the foreground while the Linux runtime downloads and unpacks. The runtime - * is several hundred megabytes; without a foreground service Android may kill the app the moment - * the user switches away, and the install starts over from the resumable part file. - * - * The install itself is [LinuxRuntimeInstaller.install], which runs one job per process: the - * screen that asked for it joins the same job to show progress, so it does not matter which of the - * two gets there first. - */ class RuntimeInstallService : Service() { override fun attachBaseContext(newBase: android.content.Context) = super.attachBaseContext(com.droiddeck.launcher.core.AppLanguage.wrap(newBase)) @@ -39,7 +30,6 @@ class RuntimeInstallService : Service() { val manager = getSystemService(NotificationManager::class.java) var shown = "" val progress = LinuxRuntimeInstaller.ProgressListener { stage, percent -> - // Install percentages and throttled removal counts, including stage transitions. if ("$stage:$percent" != shown) { shown = "$stage:$percent" manager?.notify(NOTIFICATION_ID, notification(stage, percent)) @@ -87,7 +77,6 @@ class RuntimeInstallService : Service() { private const val EXTRA_SHA256 = "sha256" private const val EXTRA_SIZE = "size" - /** Starts the install of [release] in the foreground; a running install is joined instead. */ fun start(context: Context, release: LinuxRuntimeInstaller.Release) { val intent = Intent(context, RuntimeInstallService::class.java) .putExtra(EXTRA_VERSION, release.version) diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/UserApps.kt b/app/src/main/java/com/droiddeck/launcher/runtime/UserApps.kt index 21325b936c..445a56348b 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/UserApps.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/UserApps.kt @@ -19,20 +19,10 @@ import org.json.JSONObject import java.io.File import java.io.RandomAccessFile -/** - * The apps a user adds to the Desktop page: shell scripts, AppImages (from storage or a GitHub - * release) and Flatpak apps. Each opens full screen under gamescope, like an emulator. - * - * A script lives at /opt/droiddeck-apps/<id>: its folder at `files`, the script's name in `entry`. - * The folder is linked where it lies; shared storage is mounted noexec, so a folder holding Linux - * programs is copied in instead. A linked folder outside internal storage is bound into the - * session at its own path ([binds]), so the link resolves inside the guest. - */ object UserApps { private const val TAG = "UserApps" const val GUEST_DIR = "/opt/droiddeck-apps" const val SCRIPT_LAUNCHER = "/usr/local/bin/droiddeck-script-run" - /** An app the desktop asked for (droiddeck-open): its key, then the path it was started from there. */ const val DESKTOP_IMPORT = "desktop-import" private const val FLATPAK_OVERRIDES = ".flatpak" private const val ICON_SIZE = 256 @@ -47,10 +37,6 @@ object UserApps { enum class Kind { SCRIPT, APPIMAGE, FLATPAK } - /** - * [copied]: a script whose folder was copied in rather than linked. [repo]: the GitHub repository - * an AppImage came from, [version] the release it is. - */ class App( val key: String, val kind: Kind, val name: String, val icon: Any?, val detail: String?, val program: String, val args: List<String>, val copied: Boolean = false, @@ -74,10 +60,8 @@ object UserApps { class FlatpakBundle(val file: File) : Source() } - /** [icon]: a picked file's path or a suggested icon's URL. [meta]: files written into the added app's folder. */ class Request(val source: Source, val name: String?, val icon: String?, val meta: Map<String, String> = emptyMap()) - /** How a script's folder reaches the session: linked in place, or copied in ([bytes] to copy). */ class ScriptPlan(val folder: File, val copy: Boolean, val bytes: Long) private fun root(context: Context) = File(LinuxRuntime.rootDir(context), GUEST_DIR.substring(1)) @@ -117,7 +101,6 @@ object UserApps { private fun readName(dir: File) = FileUtils.readString(File(dir, "name"))?.trim()?.takeIf { it.isNotEmpty() } - /** Adds [request]; null on success, else what went wrong. */ fun add(context: Context, request: Request, onProgress: (String, Int) -> Unit): String? { if (!LinuxRuntime.isInstalled(context)) return context.getString(R.string.user_apps_runtime_required) val name = request.name?.trim()?.takeIf { it.isNotEmpty() } @@ -132,7 +115,6 @@ object UserApps { } } - /** [icon] as a file for [use]: a path as it is, a URL downloaded for the while. */ private inline fun <T> withIcon(context: Context, icon: String?, use: (File?) -> T): T { if (icon == null || !icon.startsWith("https://")) return use(icon?.let(::File)) val download = File(context.cacheDir, "icon-${System.nanoTime()}") @@ -143,10 +125,6 @@ object UserApps { } } - /** - * Renames [app] and sets its icon: [icon] a path or URL, "" for its default, null to keep it. - * The Linux desktop's menu entry follows. - */ fun edit(context: Context, app: App, name: String, icon: String?, fex: String? = null): String? { val id = app.key.substringAfter(':') if (id.isEmpty() || '/' in id || id.startsWith(".")) return null @@ -177,7 +155,6 @@ object UserApps { return when (app.kind) { Kind.SCRIPT -> { val dir = File(root(context), id) - // The link goes, never the folder it points to. File(dir, "files").delete() FileUtils.delete(dir) menuEntry(context, id).delete() @@ -190,7 +167,6 @@ object UserApps { } } - /** Folders linked from outside internal storage, bound into a session at their own paths. */ fun binds(context: Context): List<String> { val internal = Environment.getExternalStorageDirectory().canonicalPath return root(context).listFiles().orEmpty().mapNotNull { dir -> @@ -199,7 +175,6 @@ object UserApps { }.distinct() } - /** The desktop's import of [key] as the session sees it: an added script's folder, or an AppImage's. */ fun desktopImport(context: Context, key: String, path: String): String? { root(context).listFiles()?.firstOrNull { dir -> File(dir, "entry").isFile && FileUtils.readString(File(dir, DESKTOP_IMPORT))?.lineSequence()?.firstOrNull() == key @@ -263,7 +238,6 @@ object UserApps { "Terminal=false\nCategories=Game;\nX-DroidDeck-App=$id\n") } - /** Copies [from] into [to], keeping Linux programs and scripts executable. */ private fun copyTree(from: File, to: File) { from.walkTopDown().forEach { src -> val dst = File(to, src.relativeTo(from).path) @@ -275,7 +249,6 @@ object UserApps { } } - /** [source] (PNG, JPEG, WebP or SVG) as the app's icon: a PNG no larger than [ICON_SIZE] on a side. */ internal fun saveIcon(source: File, target: File): Boolean { val bitmap = (if (isSvg(source)) renderSvg(source) else decodeScaled(source)) ?: return false return try { @@ -306,7 +279,6 @@ object UserApps { f.inputStream().use { val head = ByteArray(1024); val n = it.read(head); n > 0 && String(head, 0, n).contains("<svg") } } catch (e: Exception) { false } - /** An SVG drawn at [ICON_SIZE], centred in its own proportions. */ private fun renderSvg(source: File): Bitmap? = try { val svg = source.inputStream().use { SVG.getFromInputStream(it) } if (svg.documentViewBox == null && svg.documentWidth > 0 && svg.documentHeight > 0) { @@ -319,7 +291,6 @@ object UserApps { Log.w(TAG, "svg ${source.path}", e); null } - /** "owner/repo" from what was typed: any link into the repository, its clone address, or the short form. */ fun githubRepo(input: String): String? { val t = input.trim() val m = Regex("^(?:https?://)?(?:www\\.)?github\\.com[/:]([\\w.-]+)/([\\w.-]+)", RegexOption.IGNORE_CASE).find(t) @@ -329,10 +300,6 @@ object UserApps { return if (repo.isEmpty() || repo == "." || repo == "..") null else "${m.groupValues[1]}/$repo" } - /** - * The AppImage among a release's files: named for aarch64/arm64, else for no other CPU, else the - * x86_64 one, which runs through FEX. - */ internal fun pickAsset(names: List<String>): String? { val images = names.filter { it.endsWith(".appimage", ignoreCase = true) } return images.firstOrNull { Regex("aarch64|arm64", RegexOption.IGNORE_CASE).containsMatchIn(it) } @@ -340,7 +307,6 @@ object UserApps { ?: images.firstOrNull { Regex("x86_64|x86-64|amd64|x64", RegexOption.IGNORE_CASE).containsMatchIn(it) } } - /** The newest release of [repo] with an AppImage this device runs, preferring full releases; else what went wrong. */ private fun latestRelease(context: Context, repo: String): Pair<Release?, String?> { val body = Downloader.downloadString("https://api.github.com/repos/$repo/releases?per_page=15") val releases = body?.let { runCatching { JSONArray(it) }.getOrNull() } @@ -358,7 +324,6 @@ object UserApps { return pick to if (pick == null) context.getString(R.string.user_apps_github_no_appimage, repo) else null } - /** Downloads [release] and hands it to [use]; null on success, else what went wrong. */ private fun withDownload(context: Context, release: Release, onProgress: (String, Int) -> Unit, use: (File) -> String?): String? { val download = File(context.cacheDir, "github-${release.asset}") try { @@ -382,10 +347,6 @@ object UserApps { } } - /** - * Images in [repo] that look like its icon, best first, then its owner's picture: links to show - * as suggestions and to download once one is picked. - */ fun githubIcons(repo: String): List<String> { val info = Downloader.downloadString("https://api.github.com/repos/$repo")?.let { runCatching { JSONObject(it) }.getOrNull() } ?: return emptyList() val branch = info.optString("default_branch").ifEmpty { return emptyList() } @@ -410,13 +371,11 @@ object UserApps { return urls + listOfNotNull(avatar) } - /** Whether [app], added from GitHub, has a newer release than the one it is. */ fun checkUpdate(context: Context, app: App): UpdateCheck { val repo = app.repo ?: return UpdateCheck.Failed(context.getString(R.string.user_apps_update_failed)) val (release, problem) = latestRelease(context, repo) if (release == null) return UpdateCheck.Failed(problem ?: context.getString(R.string.user_apps_update_failed)) val published = FileUtils.readString(File(AppImageManager.dir(context, app.key.substringAfter(':')), GITHUB_PUBLISHED))?.trim().orEmpty() - // Releases are compared by date, so a newest one without an ARM64 build never reads as a downgrade. val newer = if (published.isNotEmpty() && release.published.isNotEmpty()) release.published > published else release.tag != app.version return if (newer) UpdateCheck.Available(release) else UpdateCheck.Current(app.version ?: release.tag) } @@ -428,7 +387,6 @@ object UserApps { } } - /** A Flathub app ID from what was typed: the ID itself or its Flathub page. */ fun flatpakId(input: String): String? { val t = input.trim().removeSuffix("/").substringAfterLast('/') return t.takeIf { Regex("^[A-Za-z][\\w-]*(\\.[A-Za-z0-9_][\\w-]*){2,}$").matches(it) } @@ -444,7 +402,6 @@ object UserApps { private fun addFlatpakBundle(context: Context, file: File, name: String?, icon: File?, onProgress: (String, Int) -> Unit): String? { if (!file.isFile) return context.getString(R.string.user_apps_file_gone) if (!FlatpakManager.ready(context)) FlatpakManager.setup(context, onProgress)?.let { return it } - // Shared storage is bound into the runtime at its own path; a file anywhere else is copied in. val shared = Environment.getExternalStorageDirectory().canonicalPath val copy = File(LinuxRuntime.rootDir(context), "tmp/droiddeck-bundle.flatpak").takeIf { !file.canonicalPath.startsWith("$shared/") } try { diff --git a/app/src/main/java/com/droiddeck/launcher/session/BatteryComponent.kt b/app/src/main/java/com/droiddeck/launcher/session/BatteryComponent.kt index fc6526f596..252e06a9e2 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/BatteryComponent.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/BatteryComponent.kt @@ -8,30 +8,11 @@ import com.droiddeck.launcher.core.SessionPart import java.io.File import kotlin.math.abs -/** - * The battery the Steam client can see. - * - * The client reads `/sys/class/power_supply/BAT<n>/...` - a laptop's or a Deck's naming and files - * (`energy_now`, `power_now`, `time_to_empty_now`, a `uevent` of `POWER_SUPPLY_*` lines). Android - * names its supply `battery` and lays it out differently, and on many phones an app may not read - * it at all, so the client showed no battery. This writes one `BAT1` (the Deck's name) - * from Android's own battery API - the same on every device - into a directory the session binds - * over `/sys/class/power_supply`, refreshed every few seconds while the session runs. - * - * Steam's Quick Access Menu takes its time estimates from neither: it reads the files in `/run/vpower` (as on - * SteamOS), and with those absent showed "?h ?m" for projected battery life and for time to full. - * The same estimates are written there too, into [vpowerDir] in the guest's own `/run`. - * - * Values: charge in µAh from the charge counter; energy in µWh from charge × voltage; power in µW - * from |current| × voltage; time to empty from charge ÷ |average current| while discharging. Where - * a device reports no current, the client still gets status and percentage. - */ class BatteryComponent(val dir: File, private val vpowerDir: File) : SessionPart() { @Volatile private var running = false private var thread: Thread? = null override fun start() { - // Older builds exported the same aggregate battery twice; MangoHud counts both supplies. File(dir, "BAT0").deleteRecursively() running = true write() @@ -48,7 +29,6 @@ class BatteryComponent(val dir: File, private val vpowerDir: File) : SessionPart running = false thread?.interrupt() thread = null - // Stale estimates would outlive the session in the rootfs; Steam falls back to "?h ?m". for (name in VPOWER_FILES) File(vpowerDir, name).delete() } @@ -65,9 +45,9 @@ class BatteryComponent(val dir: File, private val vpowerDir: File) : SessionPart val tempDeci = sticky?.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, 0) ?: 0 val tech = sticky?.getStringExtra(BatteryManager.EXTRA_TECHNOLOGY)?.takeIf { it.isNotBlank() } ?: "Li-ion" val chargeNowUah = bm?.getLongProperty(BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER)?.takeIf { it > 0 && it != Long.MIN_VALUE } ?: 0L - val currentNowUa = bm?.getLongProperty(BatteryManager.BATTERY_PROPERTY_CURRENT_NOW)?.takeIf { it != Long.MIN_VALUE } ?: 0L - val currentAvgUa = bm?.getLongProperty(BatteryManager.BATTERY_PROPERTY_CURRENT_AVERAGE)?.takeIf { it != Long.MIN_VALUE && it != 0L } ?: currentNowUa - // Android's sign convention varies by vendor; the status says which way the current flows. + val currentNowUa = toMicroamps(bm?.getLongProperty(BatteryManager.BATTERY_PROPERTY_CURRENT_NOW)?.takeIf { it != Long.MIN_VALUE } ?: 0L) + val currentAvgUa = toMicroamps(bm?.getLongProperty(BatteryManager.BATTERY_PROPERTY_CURRENT_AVERAGE)?.takeIf { it != Long.MIN_VALUE && it != 0L } ?: 0L) + .takeIf { it != 0L } ?: currentNowUa val discharging = status == BatteryManager.BATTERY_STATUS_DISCHARGING || status == BatteryManager.BATTERY_STATUS_NOT_CHARGING val chargeFullUah = if (chargeNowUah > 0 && pct > 0) chargeNowUah * 100 / pct else 0L val energyNowUwh = chargeNowUah * voltageUv / 1_000_000L @@ -129,7 +109,6 @@ class BatteryComponent(val dir: File, private val vpowerDir: File) : SessionPart "ac_status" to if (plugged) "Connected" else "Disconnected", "battery_percent" to "%.2f".format(java.util.Locale.ROOT, pct.toDouble()), "battery_status" to statusText, - // Steam reads a separate file for each direction; -1 = no estimate. "secs_until_battery_full" to (if (timeToFullS > 0) timeToFullS else -1L).toString(), "secs_until_shutdown_request" to (if (timeToEmptyS > 0) timeToEmptyS else -1L).toString(), ) @@ -139,7 +118,6 @@ class BatteryComponent(val dir: File, private val vpowerDir: File) : SessionPart } } - /** Atomic per file: a reader in the guest never sees a half-written value. */ private fun put(target: File, text: String) { val tmp = File(target.parentFile, "." + target.name + ".tmp") tmp.writeText(text) @@ -148,6 +126,12 @@ class BatteryComponent(val dir: File, private val vpowerDir: File) : SessionPart companion object { private const val TAG = "SessionService" + // CURRENT_NOW/CURRENT_AVERAGE are documented as µA, but Samsung and other vendors report mA, + // which made every lifetime estimate 1000x too long. No real µA reading under load is below 10 mA, + // and no mA reading is above 10 A, so anything smaller than 10_000 is taken as mA. + private const val MILLIAMP_CEILING = 10_000L + + internal fun toMicroamps(raw: Long): Long = if (abs(raw) < MILLIAMP_CEILING) raw * 1000L else raw private const val PERIOD_MS = 5_000L private val VPOWER_FILES = listOf( "ac_status", "battery_percent", "battery_status", diff --git a/app/src/main/java/com/droiddeck/launcher/session/BootMovie.kt b/app/src/main/java/com/droiddeck/launcher/session/BootMovie.kt new file mode 100644 index 0000000000..3641caec51 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/BootMovie.kt @@ -0,0 +1,208 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import android.media.MediaCodec +import android.media.MediaExtractor +import android.media.MediaFormat +import android.media.MediaMuxer +import android.util.Log +import com.droiddeck.launcher.core.FileUtils +import java.io.File +import java.nio.ByteBuffer + +object BootMovie { + private const val TAG = "BootMovie" + const val DROIDDECK_30 = "dd30" + const val DROIDDECK_60 = "dd60" + const val CUSTOM = "custom" + const val MAX_BYTES = 50L shl 20 + const val MAX_CONVERT_SECONDS = 60 + val PICKER_EXTENSIONS = listOf("webm", "mkv", "mp4", "mov", "m4v", "3gp") + + private val ASSETS = mapOf( + DROIDDECK_30 to "droiddeck-startup.webm", + DROIDDECK_60 to "droiddeck-startup-60.webm", + ) + + // Steam's CEF player only takes WebM codecs; MediaMuxer's WebM writer cannot take AV1. + internal val VIDEO_CODECS = setOf(MediaFormat.MIMETYPE_VIDEO_VP8, MediaFormat.MIMETYPE_VIDEO_VP9, MediaFormat.MIMETYPE_VIDEO_AV1) + private val REMUX_CODECS = setOf(MediaFormat.MIMETYPE_VIDEO_VP8, MediaFormat.MIMETYPE_VIDEO_VP9) + internal val AUDIO_CODECS = setOf(MediaFormat.MIMETYPE_AUDIO_OPUS, MediaFormat.MIMETYPE_AUDIO_VORBIS) + + sealed class Import { + data class Done(val name: String, val audioDropped: Boolean) : Import() + object TooLong : Import() + data class Unsupported(val codec: String?) : Import() + object Failed : Import() + } + + private fun dir(context: Context) = File(context.filesDir, "boot-movie") + private fun customFile(context: Context) = File(dir(context), "custom.webm") + + fun customName(context: Context): String? = + if (customFile(context).isFile) SessionPrefs.bootMovieCustomName(context) ?: "custom.webm" else null + + fun choice(context: Context): String { + val chosen = SessionPrefs.bootMovie(context) + return when { + chosen == CUSTOM && customFile(context).isFile -> CUSTOM + chosen in ASSETS -> chosen + else -> DROIDDECK_30 + } + } + + fun prepare(context: Context): File? { + val choice = choice(context) + val source = if (choice == CUSTOM) customFile(context) else extractAsset(context, ASSETS.getValue(choice)) ?: return null + if (SessionPrefs.bootMovieSound(context)) return source + val muted = File(source.parentFile, source.nameWithoutExtension + "-muted.webm") + if (muted.isFile && muted.lastModified() >= source.lastModified()) return muted + if (remux(source, muted, audio = false)) return muted + if (BootMovieTranscoder.transcode(source, muted, keepAudio = false) {} != null) return muted + Log.e(TAG, "could not strip audio from ${source.name}; not staging it") + return null + } + + private fun extractAsset(context: Context, name: String): File? { + val target = File(dir(context), name) + val updated = runCatching { context.packageManager.getPackageInfo(context.packageName, 0).lastUpdateTime }.getOrDefault(Long.MAX_VALUE) + if (target.isFile && target.lastModified() >= updated) return target + val staged = File(target.parentFile, "$name.staged") + return try { + target.parentFile?.mkdirs() + context.assets.open("steam-startup/$name").use { input -> + staged.outputStream().use { output -> FileUtils.copy(input, output) } + } + if (staged.renameTo(target)) target else null + } catch (e: Exception) { + Log.w(TAG, "could not extract $name", e) + null + } finally { + staged.delete() + } + } + + fun import(context: Context, file: File, onStart: () -> Unit = {}, onProgress: (Int) -> Unit = {}): Import { + val (format, audio) = probe(file) ?: return Import.Unsupported(null) + val video = format.getString(MediaFormat.KEY_MIME) + val audioPlayable = audio == null || audio in AUDIO_CODECS + val playable = video in VIDEO_CODECS && file.length() <= MAX_BYTES + val copy = playable && audioPlayable && isWebm(file) + val remux = !copy && playable && video in REMUX_CODECS + if (!copy && !remux) { + if (!BootMovieTranscoder.canDecode(format)) return Import.Unsupported(video) + val durationUs = if (format.containsKey(MediaFormat.KEY_DURATION)) format.getLong(MediaFormat.KEY_DURATION) else 0L + if (durationUs > MAX_CONVERT_SECONDS * 1_000_000L) return Import.TooLong + onStart() + } + val target = customFile(context) + val staged = File(dir(context), "custom.webm.staged") + var audioDropped = remux && !audioPlayable + return try { + target.parentFile?.mkdirs() + val ok = when { + copy -> { + file.inputStream().use { input -> staged.outputStream().use { output -> FileUtils.copy(input, output) } } + true + } + remux -> remux(file, staged, audio = true) + else -> BootMovieTranscoder.transcode(file, staged, onProgress = onProgress)?.also { audioDropped = it.audioDropped } != null + } + if (!ok || !staged.renameTo(target)) return Import.Failed + File(target.parentFile, "custom-muted.webm").delete() + SessionPrefs.setBootMovieCustomName(context, file.name) + SessionPrefs.setBootMovie(context, CUSTOM) + Import.Done(file.name, audioDropped) + } catch (e: Exception) { + Log.w(TAG, "could not import ${file.name}", e) + Import.Failed + } finally { + staged.delete() + } + } + + fun removeCustom(context: Context) { + customFile(context).delete() + File(dir(context), "custom-muted.webm").delete() + SessionPrefs.setBootMovieCustomName(context, null) + if (SessionPrefs.bootMovie(context) == CUSTOM) SessionPrefs.setBootMovie(context, DROIDDECK_30) + } + + private fun isWebm(file: File): Boolean { + if (!file.name.endsWith(".webm", ignoreCase = true)) return false + val magic = ByteArray(4) + val read = runCatching { file.inputStream().use { it.read(magic) } }.getOrDefault(0) + return read == 4 && magic.contentEquals(byteArrayOf(0x1A, 0x45, 0xDF.toByte(), 0xA3.toByte())) + } + + private fun probe(file: File): Pair<MediaFormat, String?>? { + val extractor = MediaExtractor() + return try { + extractor.setDataSource(file.path) + var video: MediaFormat? = null + var audio: String? = null + for (i in 0 until extractor.trackCount) { + val format = extractor.getTrackFormat(i) + val mime = format.getString(MediaFormat.KEY_MIME) ?: continue + if (video == null && mime.startsWith("video/")) video = format + if (audio == null && mime.startsWith("audio/")) audio = mime + } + video?.let { it to audio } + } catch (e: Exception) { + Log.w(TAG, "could not read ${file.name}", e) + null + } finally { + extractor.release() + } + } + + private fun remux(source: File, target: File, audio: Boolean): Boolean { + val staged = File(target.parentFile, target.name + ".remux") + val extractor = MediaExtractor() + var muxer: MediaMuxer? = null + return try { + extractor.setDataSource(source.path) + val output = MediaMuxer(staged.path, MediaMuxer.OutputFormat.MUXER_OUTPUT_WEBM).also { muxer = it } + val tracks = HashMap<Int, Int>() + var hasVideo = false + var hasAudio = false + var bufferSize = 8 shl 20 + for (i in 0 until extractor.trackCount) { + val format = extractor.getTrackFormat(i) + val mime = format.getString(MediaFormat.KEY_MIME) ?: continue + val keep = mime in VIDEO_CODECS && !hasVideo || audio && mime in AUDIO_CODECS && !hasAudio + if (!keep) continue + if (mime in VIDEO_CODECS) hasVideo = true else hasAudio = true + extractor.selectTrack(i) + tracks[i] = output.addTrack(format) + if (format.containsKey(MediaFormat.KEY_MAX_INPUT_SIZE)) bufferSize = maxOf(bufferSize, format.getInteger(MediaFormat.KEY_MAX_INPUT_SIZE)) + } + if (!hasVideo) return false + output.start() + val buffer = ByteBuffer.allocate(bufferSize) + val info = MediaCodec.BufferInfo() + while (true) { + val size = extractor.readSampleData(buffer, 0) + if (size < 0) break + val track = tracks[extractor.sampleTrackIndex] + if (track != null) { + val key = extractor.sampleFlags and MediaExtractor.SAMPLE_FLAG_SYNC != 0 + info.set(0, size, extractor.sampleTime, if (key) MediaCodec.BUFFER_FLAG_KEY_FRAME else 0) + output.writeSampleData(track, buffer, info) + } + extractor.advance() + } + output.stop() + output.release() + muxer = null + staged.renameTo(target) + } catch (e: Exception) { + Log.w(TAG, "could not remux ${source.name}", e) + false + } finally { + runCatching { muxer?.release() } + extractor.release() + staged.delete() + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/BootMovieTranscoder.kt b/app/src/main/java/com/droiddeck/launcher/session/BootMovieTranscoder.kt new file mode 100644 index 0000000000..ff1275d851 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/BootMovieTranscoder.kt @@ -0,0 +1,499 @@ +package com.droiddeck.launcher.session + +import android.graphics.SurfaceTexture +import android.media.MediaCodec +import android.media.MediaCodecInfo +import android.media.MediaCodecList +import android.media.MediaExtractor +import android.media.MediaFormat +import android.media.MediaMuxer +import android.opengl.EGL14 +import android.opengl.EGLConfig +import android.opengl.EGLExt +import android.opengl.GLES11Ext +import android.opengl.GLES20 +import android.os.Handler +import android.os.HandlerThread +import android.util.Log +import android.view.Surface +import java.io.ByteArrayOutputStream +import java.io.File +import java.nio.ByteBuffer +import java.nio.ByteOrder +import java.nio.FloatBuffer + +internal object BootMovieTranscoder { + private const val TAG = "BootMovieTranscoder" + private const val TIMEOUT_US = 10_000L + private const val MAX_FPS = 60 + private const val OPUS_RATE = 48_000 + + class Result(val audioDropped: Boolean) + + private class Sample(val data: ByteArray, val timeUs: Long) + private class Audio(val format: MediaFormat, val samples: List<Sample>) + + fun canDecode(format: MediaFormat): Boolean = runCatching { + MediaCodecList(MediaCodecList.REGULAR_CODECS).findDecoderForFormat(format) != null + }.getOrDefault(false) + + fun transcode(source: File, target: File, keepAudio: Boolean = true, onProgress: (Int) -> Unit): Result? { + val hadAudio = keepAudio && trackFormat(source, "audio/") != null + val audio = if (hadAudio) runCatching { encodeAudio(source) } + .onFailure { Log.w(TAG, "could not convert the audio of ${source.name}", it) }.getOrNull() else null + val muxedAudio = runCatching { encodeVideo(source, target, audio, onProgress) } + .onFailure { Log.w(TAG, "could not convert ${source.name}", it) }.getOrNull() ?: return null + return Result(audioDropped = hadAudio && !muxedAudio) + } + + private fun trackFormat(source: File, prefix: String): Pair<Int, MediaFormat>? { + val extractor = MediaExtractor() + return try { + extractor.setDataSource(source.path) + (0 until extractor.trackCount).map { it to extractor.getTrackFormat(it) } + .firstOrNull { it.second.getString(MediaFormat.KEY_MIME)?.startsWith(prefix) == true } + } finally { + extractor.release() + } + } + + internal class Layout(val width: Int, val height: Int, val x: Int, val y: Int, val contentWidth: Int, val contentHeight: Int) + + // Steam fills the screen with its startup movie, so portrait clips are pillarboxed into 16:9 instead of cropped. + internal fun layout(width: Int, height: Int, rotation: Int): Layout { + val (w, h) = if (rotation % 180 != 0) height to width else width to height + fun even(v: Double) = maxOf(2, (v.toInt() / 2) * 2) + if (w >= h) { + val scale = minOf(1.0, 1280.0 / w, 720.0 / h) + val cw = even(w * scale) + val ch = even(h * scale) + return Layout(cw, ch, 0, 0, cw, ch) + } + val ch = even(minOf(h, 720).toDouble()) + val cw = even(w * ch.toDouble() / h) + val canvas = even(ch * 16 / 9.0) + return Layout(canvas, ch, (canvas - cw) / 2, 0, cw, ch) + } + + internal fun resample(pcm: ShortArray, channels: Int, rate: Int): ShortArray { + if (rate == OPUS_RATE) return pcm + val frames = pcm.size / channels + val outFrames = (frames.toLong() * OPUS_RATE / rate).toInt() + val out = ShortArray(outFrames * channels) + for (i in 0 until outFrames) { + val pos = i.toDouble() * rate / OPUS_RATE + val i0 = pos.toInt().coerceAtMost(frames - 1) + val i1 = (i0 + 1).coerceAtMost(frames - 1) + val frac = pos - i0 + for (c in 0 until channels) { + val a = pcm[i0 * channels + c] + val b = pcm[i1 * channels + c] + out[i * channels + c] = (a + (b - a) * frac).toInt().toShort() + } + } + return out + } + + private fun encodeAudio(source: File): Audio? { + val (track, inFormat) = trackFormat(source, "audio/") ?: return null + val extractor = MediaExtractor() + var decoder: MediaCodec? = null + var encoder: MediaCodec? = null + try { + extractor.setDataSource(source.path) + extractor.selectTrack(track) + var rate = inFormat.getInteger(MediaFormat.KEY_SAMPLE_RATE) + var channels = inFormat.getInteger(MediaFormat.KEY_CHANNEL_COUNT) + val dec = MediaCodec.createDecoderByType(inFormat.getString(MediaFormat.KEY_MIME)!!).also { decoder = it } + dec.configure(inFormat, null, null, 0) + dec.start() + val pcm = ByteArrayOutputStream() + val info = MediaCodec.BufferInfo() + var inputDone = false + while (true) { + if (!inputDone) { + val index = dec.dequeueInputBuffer(TIMEOUT_US) + if (index >= 0) { + val size = extractor.readSampleData(dec.getInputBuffer(index)!!, 0) + if (size < 0) { + dec.queueInputBuffer(index, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM) + inputDone = true + } else { + dec.queueInputBuffer(index, 0, size, extractor.sampleTime, 0) + extractor.advance() + } + } + } + val index = dec.dequeueOutputBuffer(info, TIMEOUT_US) + if (index == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) { + val format = dec.outputFormat + rate = format.getInteger(MediaFormat.KEY_SAMPLE_RATE) + channels = format.getInteger(MediaFormat.KEY_CHANNEL_COUNT) + if (format.containsKey(MediaFormat.KEY_PCM_ENCODING) && + format.getInteger(MediaFormat.KEY_PCM_ENCODING) != android.media.AudioFormat.ENCODING_PCM_16BIT) return null + } else if (index >= 0) { + if (info.size > 0) { + val bytes = ByteArray(info.size) + dec.getOutputBuffer(index)!!.apply { position(info.offset); get(bytes) } + pcm.write(bytes) + } + dec.releaseOutputBuffer(index, false) + if (info.flags and MediaCodec.BUFFER_FLAG_END_OF_STREAM != 0) break + } + } + if (channels !in 1..2) return null + val raw = pcm.toByteArray() + val shorts = ShortArray(raw.size / 2) + ByteBuffer.wrap(raw).order(ByteOrder.nativeOrder()).asShortBuffer().get(shorts) + val samples = resample(shorts, channels, rate) + + val format = MediaFormat.createAudioFormat(MediaFormat.MIMETYPE_AUDIO_OPUS, OPUS_RATE, channels) + format.setInteger(MediaFormat.KEY_BIT_RATE, 128_000) + val name = MediaCodecList(MediaCodecList.REGULAR_CODECS).findEncoderForFormat(format) ?: return null + val enc = MediaCodec.createByCodecName(name).also { encoder = it } + enc.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE) + enc.start() + val packets = ArrayList<Sample>() + var outFormat: MediaFormat? = null + var offset = 0 + var encodeInputDone = false + while (true) { + if (!encodeInputDone) { + val index = enc.dequeueInputBuffer(TIMEOUT_US) + if (index >= 0) { + val buffer = enc.getInputBuffer(index)!! + buffer.clear() + val count = minOf(buffer.remaining() / 2, samples.size - offset) / channels * channels + val timeUs = offset.toLong() / channels * 1_000_000L / OPUS_RATE + if (count == 0) { + enc.queueInputBuffer(index, 0, 0, timeUs, MediaCodec.BUFFER_FLAG_END_OF_STREAM) + encodeInputDone = true + } else { + buffer.order(ByteOrder.nativeOrder()).asShortBuffer().put(samples, offset, count) + enc.queueInputBuffer(index, 0, count * 2, timeUs, 0) + offset += count + } + } + } + val index = enc.dequeueOutputBuffer(info, TIMEOUT_US) + if (index == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) { + outFormat = enc.outputFormat + } else if (index >= 0) { + if (info.size > 0 && info.flags and MediaCodec.BUFFER_FLAG_CODEC_CONFIG == 0) { + val bytes = ByteArray(info.size) + enc.getOutputBuffer(index)!!.apply { position(info.offset); get(bytes) } + packets.add(Sample(bytes, info.presentationTimeUs)) + } + enc.releaseOutputBuffer(index, false) + if (info.flags and MediaCodec.BUFFER_FLAG_END_OF_STREAM != 0) break + } + } + return outFormat?.let { Audio(it, packets) } + } finally { + runCatching { decoder?.stop() } + decoder?.release() + runCatching { encoder?.stop() } + encoder?.release() + extractor.release() + } + } + + private fun MediaFormat.intOrNull(key: String): Int? = if (!containsKey(key)) null else + runCatching { getInteger(key) }.getOrElse { runCatching { getFloat(key).toInt() }.getOrNull() } + + private fun encodeVideo(source: File, target: File, audio: Audio?, onProgress: (Int) -> Unit): Boolean { + val (track, inFormat) = trackFormat(source, "video/") ?: throw IllegalStateException("no video track") + val rotation = (inFormat.intOrNull(MediaFormat.KEY_ROTATION) ?: 0).mod(360) + val layout = layout(inFormat.getInteger(MediaFormat.KEY_WIDTH), inFormat.getInteger(MediaFormat.KEY_HEIGHT), rotation) + val width = layout.width + val height = layout.height + val fps = (inFormat.intOrNull(MediaFormat.KEY_FRAME_RATE) ?: 30).coerceIn(1, MAX_FPS) + val durationUs = if (inFormat.containsKey(MediaFormat.KEY_DURATION)) inFormat.getLong(MediaFormat.KEY_DURATION) else 0L + val minIntervalUs = 1_000_000L / MAX_FPS - 2_000 + + val encFormat = MediaFormat.createVideoFormat(MediaFormat.MIMETYPE_VIDEO_VP8, width, height).apply { + setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface) + setInteger(MediaFormat.KEY_BIT_RATE, (width.toLong() * height * fps / 10).coerceIn(1_000_000, 8_000_000).toInt()) + setInteger(MediaFormat.KEY_FRAME_RATE, fps) + setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 2) + } + val encoderName = MediaCodecList(MediaCodecList.REGULAR_CODECS).findEncoderForFormat(encFormat) + ?: throw IllegalStateException("no VP8 encoder") + + val extractor = MediaExtractor() + var encoder: MediaCodec? = null + var decoder: MediaCodec? = null + var egl: EglWindow? = null + var renderer: FrameRenderer? = null + var muxer: MediaMuxer? = null + val staged = File(target.parentFile, target.name + ".convert") + try { + extractor.setDataSource(source.path) + extractor.selectTrack(track) + val enc = MediaCodec.createByCodecName(encoderName).also { encoder = it } + enc.configure(encFormat, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE) + val window = EglWindow(enc.createInputSurface()).also { egl = it } + val frames = FrameRenderer(rotation).also { renderer = it } + enc.start() + inFormat.setInteger(MediaFormat.KEY_ROTATION, 0) + val dec = MediaCodec.createDecoderByType(inFormat.getString(MediaFormat.KEY_MIME)!!).also { decoder = it } + dec.configure(inFormat, frames.surface, null, 0) + dec.start() + val mux = MediaMuxer(staged.path, MediaMuxer.OutputFormat.MUXER_OUTPUT_WEBM).also { muxer = it } + + var videoTrack = -1 + var audioTrack = -1 + var audioIndex = 0 + fun writeAudioUpTo(timeUs: Long) { + if (audioTrack < 0 || audio == null) return + val info = MediaCodec.BufferInfo() + while (audioIndex < audio.samples.size && audio.samples[audioIndex].timeUs <= timeUs) { + val sample = audio.samples[audioIndex++] + info.set(0, sample.data.size, sample.timeUs, 0) + mux.writeSampleData(audioTrack, ByteBuffer.wrap(sample.data), info) + } + } + + val decInfo = MediaCodec.BufferInfo() + val encInfo = MediaCodec.BufferInfo() + var inputDone = false + var decoderDone = false + var lastKept = Long.MIN_VALUE + var lastProgress = -1 + while (true) { + if (!inputDone) { + val index = dec.dequeueInputBuffer(TIMEOUT_US) + if (index >= 0) { + val size = extractor.readSampleData(dec.getInputBuffer(index)!!, 0) + if (size < 0) { + dec.queueInputBuffer(index, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM) + inputDone = true + } else { + dec.queueInputBuffer(index, 0, size, extractor.sampleTime, 0) + extractor.advance() + } + } + } + if (!decoderDone) { + val index = dec.dequeueOutputBuffer(decInfo, TIMEOUT_US) + if (index >= 0) { + val timeUs = decInfo.presentationTimeUs + val keep = decInfo.size > 0 && (lastKept == Long.MIN_VALUE || timeUs - lastKept >= minIntervalUs) + dec.releaseOutputBuffer(index, keep) + if (keep) { + if (!frames.awaitFrame()) throw IllegalStateException("decoder frame timed out") + frames.draw(layout) + window.swap(timeUs * 1000) + lastKept = timeUs + if (durationUs > 0) { + val percent = (timeUs * 100 / durationUs).toInt().coerceIn(0, 99) + if (percent != lastProgress) { lastProgress = percent; onProgress(percent) } + } + } + if (decInfo.flags and MediaCodec.BUFFER_FLAG_END_OF_STREAM != 0) { + enc.signalEndOfInputStream() + decoderDone = true + } + } + } + var encoderDone = false + while (true) { + val index = enc.dequeueOutputBuffer(encInfo, if (decoderDone) TIMEOUT_US else 0) + if (index == MediaCodec.INFO_TRY_AGAIN_LATER) break + if (index == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) { + videoTrack = mux.addTrack(enc.outputFormat) + if (audio != null) audioTrack = runCatching { mux.addTrack(audio.format) } + .onFailure { Log.w(TAG, "WebM muxer refused the Opus track", it) }.getOrDefault(-1) + mux.start() + } else if (index >= 0) { + if (encInfo.size > 0 && encInfo.flags and MediaCodec.BUFFER_FLAG_CODEC_CONFIG == 0) { + check(videoTrack >= 0) { "encoder produced data before its format" } + writeAudioUpTo(encInfo.presentationTimeUs) + mux.writeSampleData(videoTrack, enc.getOutputBuffer(index)!!, encInfo) + } + enc.releaseOutputBuffer(index, false) + if (encInfo.flags and MediaCodec.BUFFER_FLAG_END_OF_STREAM != 0) { encoderDone = true; break } + } + } + if (encoderDone) break + } + writeAudioUpTo(Long.MAX_VALUE) + mux.stop() + mux.release() + muxer = null + if (!staged.renameTo(target)) throw IllegalStateException("could not move the converted movie") + onProgress(100) + return audioTrack >= 0 + } finally { + runCatching { muxer?.release() } + runCatching { decoder?.stop() } + decoder?.release() + runCatching { encoder?.stop() } + encoder?.release() + renderer?.release() + egl?.release() + extractor.release() + staged.delete() + } + } + + private class EglWindow(private val surface: Surface) { + private val display = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY) + private val context: android.opengl.EGLContext + private val window: android.opengl.EGLSurface + + init { + val version = IntArray(2) + check(EGL14.eglInitialize(display, version, 0, version, 1)) { "eglInitialize failed" } + val attributes = intArrayOf( + EGL14.EGL_RED_SIZE, 8, EGL14.EGL_GREEN_SIZE, 8, EGL14.EGL_BLUE_SIZE, 8, + EGL14.EGL_RENDERABLE_TYPE, EGL14.EGL_OPENGL_ES2_BIT, EGL_RECORDABLE_ANDROID, 1, EGL14.EGL_NONE, + ) + val configs = arrayOfNulls<EGLConfig>(1) + val count = IntArray(1) + check(EGL14.eglChooseConfig(display, attributes, 0, configs, 0, 1, count, 0) && count[0] > 0) { "no recordable EGL config" } + context = EGL14.eglCreateContext(display, configs[0], EGL14.EGL_NO_CONTEXT, + intArrayOf(EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL14.EGL_NONE), 0) + window = EGL14.eglCreateWindowSurface(display, configs[0], surface, intArrayOf(EGL14.EGL_NONE), 0) + check(EGL14.eglMakeCurrent(display, window, window, context)) { "eglMakeCurrent failed" } + } + + fun swap(timeNs: Long) { + EGLExt.eglPresentationTimeANDROID(display, window, timeNs) + EGL14.eglSwapBuffers(display, window) + } + + fun release() { + EGL14.eglMakeCurrent(display, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT) + EGL14.eglDestroySurface(display, window) + EGL14.eglDestroyContext(display, context) + EGL14.eglReleaseThread() + EGL14.eglTerminate(display) + surface.release() + } + + companion object { + private const val EGL_RECORDABLE_ANDROID = 0x3142 + } + } + + private class FrameRenderer(rotation: Int) { + private val thread = HandlerThread("boot-movie-frames").apply { start() } + private val lock = Object() + private var available = false + private val texture = IntArray(1).also { GLES20.glGenTextures(1, it, 0) }[0] + private val surfaceTexture: SurfaceTexture + val surface: Surface + private val program: Int + private val transform = FloatArray(16) + private val positions: FloatBuffer + private val coords: FloatBuffer = floats(0f, 0f, 1f, 0f, 0f, 1f, 1f, 1f) + + init { + GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, texture) + GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR) + GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR) + GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE) + GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE) + surfaceTexture = SurfaceTexture(texture) + surfaceTexture.setOnFrameAvailableListener({ + synchronized(lock) { available = true; lock.notifyAll() } + }, Handler(thread.looper)) + surface = Surface(surfaceTexture) + program = link(VERTEX, FRAGMENT) + val radians = Math.toRadians(rotation.toDouble()) + val cos = Math.cos(radians).toFloat() + val sin = Math.sin(radians).toFloat() + val corners = floatArrayOf(-1f, -1f, 1f, -1f, -1f, 1f, 1f, 1f) + positions = floats(*FloatArray(8) { i -> + val x = corners[i - i % 2] + val y = corners[i - i % 2 + 1] + if (i % 2 == 0) x * cos + y * sin else -x * sin + y * cos + }) + } + + fun awaitFrame(): Boolean { + synchronized(lock) { + val deadline = System.currentTimeMillis() + 2_500 + while (!available) { + val wait = deadline - System.currentTimeMillis() + if (wait <= 0) return false + lock.wait(wait) + } + available = false + } + surfaceTexture.updateTexImage() + return true + } + + fun draw(layout: Layout) { + surfaceTexture.getTransformMatrix(transform) + GLES20.glViewport(0, 0, layout.width, layout.height) + GLES20.glClearColor(0f, 0f, 0f, 1f) + GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT) + GLES20.glViewport(layout.x, layout.y, layout.contentWidth, layout.contentHeight) + GLES20.glUseProgram(program) + GLES20.glActiveTexture(GLES20.GL_TEXTURE0) + GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, texture) + val position = GLES20.glGetAttribLocation(program, "aPosition") + val coord = GLES20.glGetAttribLocation(program, "aCoord") + GLES20.glEnableVertexAttribArray(position) + GLES20.glVertexAttribPointer(position, 2, GLES20.GL_FLOAT, false, 0, positions) + GLES20.glEnableVertexAttribArray(coord) + GLES20.glVertexAttribPointer(coord, 2, GLES20.GL_FLOAT, false, 0, coords) + GLES20.glUniformMatrix4fv(GLES20.glGetUniformLocation(program, "uTransform"), 1, false, transform, 0) + GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4) + } + + fun release() { + surface.release() + surfaceTexture.release() + GLES20.glDeleteProgram(program) + GLES20.glDeleteTextures(1, intArrayOf(texture), 0) + thread.quitSafely() + } + + private fun floats(vararg values: Float): FloatBuffer = + ByteBuffer.allocateDirect(values.size * 4).order(ByteOrder.nativeOrder()).asFloatBuffer().apply { put(values); position(0) } + + private fun link(vertex: String, fragment: String): Int { + fun compile(type: Int, code: String): Int = GLES20.glCreateShader(type).also { + GLES20.glShaderSource(it, code) + GLES20.glCompileShader(it) + val ok = IntArray(1) + GLES20.glGetShaderiv(it, GLES20.GL_COMPILE_STATUS, ok, 0) + check(ok[0] != 0) { GLES20.glGetShaderInfoLog(it) } + } + return GLES20.glCreateProgram().also { + GLES20.glAttachShader(it, compile(GLES20.GL_VERTEX_SHADER, vertex)) + GLES20.glAttachShader(it, compile(GLES20.GL_FRAGMENT_SHADER, fragment)) + GLES20.glLinkProgram(it) + val ok = IntArray(1) + GLES20.glGetProgramiv(it, GLES20.GL_LINK_STATUS, ok, 0) + check(ok[0] != 0) { GLES20.glGetProgramInfoLog(it) } + } + } + + companion object { + private val VERTEX = """ + attribute vec4 aPosition; + attribute vec4 aCoord; + uniform mat4 uTransform; + varying vec2 vCoord; + void main() { + gl_Position = aPosition; + vCoord = (uTransform * aCoord).xy; + } + """.trimIndent() + private val FRAGMENT = """ + #extension GL_OES_EGL_image_external : require + precision mediump float; + varying vec2 vCoord; + uniform samplerExternalOES sTexture; + void main() { + gl_FragColor = texture2D(sTexture, vCoord); + } + """.trimIndent() + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/ComponentsManager.kt b/app/src/main/java/com/droiddeck/launcher/session/ComponentsManager.kt index 0e7045a716..01e6a2fe13 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/ComponentsManager.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/ComponentsManager.kt @@ -6,6 +6,7 @@ import android.content.Context import android.util.Log import com.droiddeck.launcher.core.Downloader import com.droiddeck.launcher.core.FileUtils +import com.droiddeck.launcher.core.GameEnvironment import com.droiddeck.launcher.gpu.GpuInfo import com.droiddeck.launcher.runtime.LinuxRuntime import com.github.luben.zstd.ZstdInputStream @@ -21,30 +22,9 @@ import java.io.File import java.io.FileInputStream import java.io.FileOutputStream -/** - * FEX, DXVK and VKD3D-Proton per Proton, for the Linux Steam client. - * - * Every Proton the client runs games with keeps its own copy of these three inside its tree. This - * lists them, stores packages (.wcp: tar + zstd with a profile.json) downloaded from the Nightlies - * "-Linux" releases or imported, swaps one into a Proton, keeps the Proton's shipped files as - * "original bundles" - one per Proton build, so a Steam update adds a new one instead of replacing - * the last - restores those, and deletes stored packages. - * - * Where a Proton reads each component (its own `proton` script, ARM64 host): - * DXVK files/lib/wine/dxvk/{aarch64,i386}-windows -> the prefix's system32 / syswow64 - * VKD3D files/lib/wine/vkd3d-proton/{aarch64,i386}-windows -> the same, on every launch - * FEX files/lib/wine/aarch64-windows/lib{arm64ec,wow64}fex.dll - * files/lib/wine/aarch64-unix/lib{arm64ec,wow64}fex.so (FEX 2607 and newer) - * Proton copies DXVK and VKD3D into the prefix on every normal launch, so a swap applies the next - * time a game starts. A swap into a Proton a running game is using waits until that game exits. - * - * Same formats and data layout as the Decky "Components Manager" plugin, whose data is taken over - * once on first use. - */ object ComponentsManager { private const val TAG = "Components" private const val NIGHTLIES = "The412Banner/Nightlies" - /** Release tag -> component. Only the Linux repacks: the Android releases carry bionic unixlibs. */ private val RELEASES = linkedMapOf( "FexCore-Linux" to "fex", "Dxvk-Linux" to "dxvk", @@ -65,13 +45,7 @@ object ComponentsManager { "$WINE/aarch64-unix/libwow64fex.so", ) private val COMP_DIR = mapOf("dxvk" to "$WINE/dxvk", "vkd3d" to "$WINE/vkd3d-proton") - /** The folders a Proton reads on ARM64. */ private val PE_ARCHES = listOf("aarch64-windows", "i386-windows") - /** - * The DLLs that ARE the component. A swap clears exactly these before unpacking, so no file of - * the previous version is left mixed in; anything else a Proton keeps beside them - GE's - * openvr_api_dxvk.dll, which its launcher copies into every prefix and aborts without - stays. - */ private val COMP_DLLS = mapOf( "dxvk" to setOf("d3d8.dll", "d3d9.dll", "d3d10.dll", "d3d10_1.dll", "d3d10core.dll", "d3d11.dll", "dxgi.dll"), "vkd3d" to setOf("d3d12.dll", "d3d12core.dll"), @@ -79,13 +53,19 @@ object ComponentsManager { private const val PLUGIN_DATA = "root/homebrew/data/decky-components-manager" data class Proton(val id: String, val name: String, val dir: File, val guestPath: String, val version: String, val valve: Boolean) - data class Component(val detected: String, val detail: String, val inUse: String, val activeFile: String?, val queued: String?) + data class Component( + val detected: String, + val detail: String, + val inUse: String, + val selected: String, + val activeFile: String?, + val queued: String?, + ) data class Original(val comp: String, val protonVersion: String, val label: String, val size: Long) data class Package(val file: String, val comp: String, val version: String, val description: String, val size: Long) data class CatalogItem(val file: String, val comp: String, val release: String, val url: String, val size: Long, val digest: String) data class ProtonView( val proton: Proton, val components: Map<String, Component>, val originals: List<Original>, val inUseByGame: Boolean, - /** When a launch last had to put this Proton's chosen files back (epoch seconds), or 0. */ val reappliedAt: Long = 0, val sync: EsyncPacks.ToolState? = null, ) @@ -94,7 +74,6 @@ object ComponentsManager { private val lock = Any() - // ------------------------------------------------------------------ paths private fun root(context: Context) = LinuxRuntime.rootDir(context) private fun steam(context: Context) = File(root(context), "root/.local/share/Steam") @@ -104,10 +83,6 @@ object ComponentsManager { private fun originalsDir(context: Context) = File(dataDir(context), "originals").apply { mkdirs() } private fun stateFile(context: Context) = File(dataDir(context), "state.json") private fun catalogFile(context: Context) = File(dataDir(context), "catalog.json") - /** - * Inside the Linux runtime, read by the Proton launch wrappers (steam-compatibility's - * bl_components) before every game launch: desired.tsv + an unpacked copy of each package in use. - */ private const val LAUNCH_DIR = "root/.local/share/droiddeck-components" private const val LEGACY_LAUNCH_DIR = "root/.local/share/bannerlator-components" private fun launchDir(context: Context): File { @@ -127,26 +102,120 @@ object ComponentsManager { fun safeName(s: String): String = s.replace(Regex("[^A-Za-z0-9._+-]+"), "_").trim('_').ifEmpty { "unnamed" } - // ------------------------------------------------------------------ state - private fun loadState(context: Context): JSONObject = - runCatching { JSONObject(stateFile(context).readText()) }.getOrElse { JSONObject() }.apply { + private fun pendingStateFile(context: Context) = File(dataDir(context), "state.pending.json") + + private fun loadState(context: Context): JSONObject { + recoverState(context) + return runCatching { JSONObject(stateFile(context).readText()) }.getOrElse { JSONObject() }.apply { if (!has("active")) put("active", JSONObject()) if (!has("queued")) put("queued", JSONObject()) + if (!has("profiles")) put("profiles", JSONObject()) } + } + + private fun writeStateFile(file: File, text: String) { + val tmp = File(file.parentFile, file.name + ".tmp") + try { + writeSynced(tmp, text) + check(tmp.renameTo(file)) { "Could not save component selections: ${file.name}" } + } finally { + tmp.delete() + } + } + + private fun writeSynced(file: File, text: String) { + FileOutputStream(file).use { + it.write(text.toByteArray(Charsets.UTF_8)) + it.fd.sync() + } + } + + private fun recoverState(context: Context) { + val pending = pendingStateFile(context) + if (!pending.exists()) return + val transaction = JSONObject(pending.readText()) + val state = transaction.getJSONObject("state") + val expected = transaction.getString("launchSha256") + val published = File(launchDir(context), "desired.tsv") + val staged = File(launchDir(context), "desired.tsv.tmp") + if (!staged.exists() && published.isFile && Hashes.sha256(published) == expected) { + writeStateFile(stateFile(context), state.toString(2)) + Log.i(TAG, "recovered published component selections") + } else { + Log.i(TAG, "discarded unpublished component selections") + } + check(pending.delete()) { "Could not finish component selection recovery" } + if (staged.exists()) check(staged.delete()) { "Could not remove unpublished component selections" } + } private fun saveState(context: Context, state: JSONObject) { - val f = stateFile(context) - val tmp = File(f.parentFile, f.name + ".tmp") - tmp.writeText(state.toString(2)) - tmp.renameTo(f) - // Every change of choice reaches the launch wrappers at once. - runCatching { syncLaunchState(context, state) }.onFailure { Log.w(TAG, "launch state", it) } + val prepared = prepareLaunchState(context, state) + val dir = launchDir(context) + val tmp = File(dir, "desired.tsv.tmp") + try { + writeSynced(tmp, prepared.text) + writeStateFile(pendingStateFile(context), JSONObject() + .put("state", state) + .put("launchSha256", Hashes.sha256(tmp)) + .toString()) + check(tmp.renameTo(File(dir, "desired.tsv"))) { "Could not publish component selections" } + writeStateFile(stateFile(context), state.toString(2)) + check(pendingStateFile(context).delete()) { "Could not finish saving component selections" } + } finally { + if (!pendingStateFile(context).exists()) tmp.delete() + } + File(dir, "store").listFiles()?.filter { it.isDirectory && it.name !in prepared.keep } + ?.forEach { it.deleteRecursively() } } private fun JSONObject.sub(key: String): JSONObject = optJSONObject(key) ?: JSONObject().also { put(key, it) } - /** Takes over the Decky plugin's packages, originals and swap records, once. */ + private fun rememberProfiledComponent(state: JSONObject, comp: String) { + val profiled = state.optJSONArray("profiledComponents")?.let { values -> + (0 until values.length()).mapNotNull { values.optString(it).takeIf(COMPONENTS::contains) } + }.orEmpty().toMutableSet() + if (profiled.add(comp)) state.put("profiledComponents", JSONArray(profiled.sorted())) + } + + fun gameComponents(context: Context, scope: String): Map<String, String> = synchronized(lock) { + val profile = loadState(context).sub("profiles").optJSONObject(scope) ?: return emptyMap() + COMPONENTS.mapNotNull { comp -> profile.optString(comp).takeIf(String::isNotEmpty)?.let { comp to it } }.toMap() + } + + fun setGameComponent(context: Context, scope: String, comp: String, file: String?) = synchronized(lock) { + require(scope.matches(Regex("[1-9][0-9]{0,9}")) && scope.toLong() <= 4294967295L) + require(comp in COMPONENTS) + val state = loadState(context) + val profiles = state.sub("profiles") + val profile = profiles.optJSONObject(scope) ?: JSONObject().also { profiles.put(scope, it) } + if (file == null) { + if (profile.optString(comp).isNotEmpty()) rememberProfiledComponent(state, comp) + profile.remove(comp) + if (profile.length() == 0) profiles.remove(scope) + } else { + val name = safeName(file) + val wcp = File(packagesDir(context), name) + require(packageInfo(context, wcp).comp == comp) + for (proton in protons(context)) ensureOriginal(context, proton, comp, state) + rememberProfiledComponent(state, comp) + profile.put(comp, name) + } + saveState(context, state) + } + + fun clearGameComponents(context: Context, scope: String) = synchronized(lock) { + require(GameEnvironment.validScope(scope)) + val state = loadState(context) + val profiles = state.sub("profiles") + profiles.optJSONObject(scope)?.let { profile -> + COMPONENTS.filter { profile.optString(it).isNotEmpty() } + .forEach { rememberProfiledComponent(state, it) } + } + profiles.remove(scope) + saveState(context, state) + } + private fun migratePlugin(context: Context) { val marker = File(dataDir(context), ".plugin-imported") if (marker.isFile) return @@ -169,7 +238,6 @@ object ComponentsManager { marker.writeText("1\n") } - // ------------------------------------------------------------------ Protons private fun libraryRoots(context: Context): List<File> { val roots = mutableListOf(steam(context)) @@ -192,13 +260,10 @@ object ComponentsManager { if (parts.size > 1) parts[1] else parts.firstOrNull()?.ifEmpty { null } ?: "unknown" }.getOrDefault("unknown") - /** Every Proton tree with a Wine inside. Launch wrappers pointing at another Proton are left out. */ fun protons(context: Context): List<Proton> { val found = LinkedHashMap<String, Proton>() val bases = listOf(File(steam(context), "compatibilitytools.d") to false) + libraryRoots(context).map { File(it, "steamapps/common") to true } - // Not canonical: /data/user/0 is a link to /data/data on many devices, and the guest path is - // what is left after removing the rootfs prefix exactly as the paths were built. val rootPath = root(context).absolutePath.trimEnd('/') for ((base, valve) in bases) { val entries = base.listFiles()?.sortedBy { it.name } ?: continue @@ -216,40 +281,39 @@ object ComponentsManager { private fun proton(context: Context, id: String) = protons(context).firstOrNull { it.id == id } ?: throw IllegalStateException("No Proton with id $id") - /** - * Is anything running on this Proton right now - a game, or the client's own start-up runs, - * whose Wine processes can outlive them? Swaps wait while it is. Read from the command lines. - */ - fun inUse(context: Context, proton: Proton): Boolean = anyProcess(context, proton) { needle, text -> text.contains(needle + "proton ") || text.contains(needle + "files/bin") } + fun inUse(context: Context, proton: Proton): Boolean = + anyProcess(context, proton) { paths, text -> processUsesProton(paths, text, gameOnly = false) } - /** - * Is a game running on this Proton? Only a launch runs proton with the verb waitforexitandrun - * (Proton's own script stays up until the game exits); the client's start-up runs do not. - */ - fun gameRunning(context: Context, proton: Proton): Boolean = anyProcess(context, proton) { needle, text -> text.contains(needle + "proton waitforexitandrun") } + fun gameRunning(context: Context, proton: Proton): Boolean = + anyProcess(context, proton) { paths, text -> processUsesProton(paths, text, gameOnly = true) } - private fun anyProcess(context: Context, proton: Proton, match: (String, String) -> Boolean): Boolean { - val needles = (listOf(proton.guestPath) + EsyncPacks.distPathsFor(root(context), proton.guestPath)) - .map { it.trimEnd('/') + "/" } + internal fun processUsesProton(paths: List<String>, text: String, gameOnly: Boolean): Boolean = + paths.any { path -> + val needle = path.trimEnd('/') + "/" + if (gameOnly) text.contains(needle + "proton waitforexitandrun") + else text.contains(needle + "proton ") || text.contains(needle + "files/bin") + } + + private fun anyProcess(context: Context, proton: Proton, match: (List<String>, String) -> Boolean): Boolean { + val guestPaths = listOf(proton.guestPath) + EsyncPacks.distPathsFor(root(context), proton.guestPath) + val paths = (guestPaths + guestPaths.map { host(context, it).absolutePath } + proton.dir.absolutePath).distinct() val procs = File("/proc").listFiles() ?: return false for (p in procs) { if (!p.name.all(Char::isDigit)) continue val cmd = runCatching { File(p, "cmdline").readBytes() }.getOrNull() ?: continue if (cmd.isEmpty()) continue val text = String(cmd).replace('\u0000', ' ') - if (needles.any { match(it, text) }) return true + if (match(paths, text)) return true } return false } - // ------------------------------------------------------------------ component files private fun readVersionFile(f: File): String = runCatching { val text = f.readText().trim() Regex("\\(([^)]+)\\)").find(text)?.groupValues?.get(1) ?: text.split(Regex("\\s+")).last() }.getOrDefault("") - /** The FEX build's version name; [unnamed] when its DLL carries none, "" when there is no FEX. */ private fun fexVersion(dir: File, unnamed: String = "FEX (build without a version name)"): String { val dll = File(dir, FEX_FILES[0]) if (!dll.isFile) return "" @@ -261,7 +325,7 @@ object ComponentsManager { private fun compFiles(dir: File, comp: String): List<String> { if (comp == "fex") return FEX_FILES.filter { File(dir, it).isFile } val base = File(dir, COMP_DIR.getValue(comp)) - return base.walkTopDown().filter { it.isFile }.map { it.relativeTo(dir).path }.sorted().toList() + return base.walkTopDown().filter { it.isFile }.map { it.relativeTo(dir).invariantSeparatorsPath }.sorted().toList() } private fun owned(comp: String, rel: String) = comp == "fex" || PE_ARCHES.any { "/$it/" in rel } @@ -269,7 +333,6 @@ object ComponentsManager { private fun fingerprint(dir: File, comp: String): Map<String, String> = compFiles(dir, comp).filter { owned(comp, it) }.associateWith { Hashes.sha256(File(dir, it)) } - // ------------------------------------------------------------------ packages private fun normalize(name: String) = name.removePrefix("./").trimStart('/') @@ -292,11 +355,11 @@ object ComponentsManager { } fun packages(context: Context): List<Package> = packagesDir(context).listFiles() - ?.filter { it.isFile && it.name.endsWith(".wcp") }?.sortedBy { it.name } + ?.filter { it.isFile && it.name.endsWith(".wcp") } ?.mapNotNull { f -> runCatching { packageInfo(context, f) }.onFailure { Log.w(TAG, "skipping ${f.name}", it) }.getOrNull() } + ?.sortedWith(newestFirst { it.version.ifEmpty { it.file } }) ?: emptyList() - /** Unpacks a package's files/ into a Proton; for DXVK/VKD3D the component's own DLLs are replaced as a set. */ private fun installFiles(context: Context, dir: File, comp: String, wcp: File): Map<String, String> { val staged = File(dataDir(context), "staging-${System.nanoTime()}") try { @@ -352,10 +415,9 @@ object ComponentsManager { tar.closeArchiveEntry() } } - tmp.renameTo(dest) + check(tmp.renameTo(dest)) { "Could not save original bundle ${dest.name}" } } - // ------------------------------------------------------------------ originals private fun originalFile(context: Context, p: Proton, comp: String) = File(originalsDir(context), "${p.id}/${safeName(p.version)}/$comp.wcp").apply { parentFile?.mkdirs() } @@ -371,17 +433,23 @@ object ComponentsManager { } } - /** - * Saves a Proton's shipped files for this component before they are first replaced in this - * Proton build. A build already swapped into is not saved again: its files are ours. - */ private fun ensureOriginal(context: Context, p: Proton, comp: String, state: JSONObject) { val dest = originalFile(context, p, comp) if (dest.isFile) return val active = state.sub("active").optJSONObject(p.id)?.optJSONObject(comp) if (active != null && active.optString("protonVersion") == p.version) return + val published = File(launchDir(context), "desired.tsv") + if (published.isFile) { + val mayHaveOverride = published.useLines { rows -> + rows.any { row -> + val fields = row.split('\t') + fields.size == 7 && fields[0] != "*" && fields[1] == p.dir.name && + fields[2] == p.version && fields[3] == comp + } + } + check(!mayHaveOverride) { context.getString(R.string.cmgr_original_missing) } + } val rels = compFiles(p.dir, comp) - if (rels.isEmpty()) return val current = if (comp == "fex") fexVersion(p.dir) else readVersionFile(File(p.dir, "${COMP_DIR.getValue(comp)}/version")) val profile = JSONObject() .put("type", TYPE_OF.getValue(comp)) @@ -393,17 +461,15 @@ object ComponentsManager { Log.i(TAG, "saved original $comp of ${p.name} ${p.version}") } - /** Saves the originals of every Proton build not seen yet (first open, and after a Steam update). */ fun snapshotAll(context: Context) = synchronized(lock) { migratePlugin(context) val state = loadState(context) for (p in protons(context)) for (comp in COMPONENTS) { runCatching { ensureOriginal(context, p, comp, state) }.onFailure { Log.w(TAG, "original $comp of ${p.name}", it) } } - runCatching { syncLaunchState(context, state) }.onFailure { Log.w(TAG, "launch state", it) } + runCatching { saveState(context, state) }.onFailure { Log.w(TAG, "launch state", it) } } - // ------------------------------------------------------------------ view fun snapshot(context: Context): Snapshot = synchronized(lock) { migratePlugin(context) @@ -431,9 +497,14 @@ object ComponentsManager { else context.getString(R.string.cmgr_changed_outside) } } + val selectedLabel = when { + active == null || active.optString("protonVersion") != p.version -> + context.getString(R.string.comp_tag_original) + else -> originalLabel(context, active) ?: active.optString("label", active.optString("file")) + } val q = state.sub("queued").optJSONObject(p.id)?.optJSONObject(comp) Component( - detected.ifEmpty { context.getString(R.string.cmgr_not_present) }, detail, inUseLabel, + detected.ifEmpty { context.getString(R.string.cmgr_not_present) }, detail, inUseLabel, selectedLabel, active?.optString("file")?.takeIf { active.optString("protonVersion") == p.version }, q?.let { originalLabel(context, it) ?: it.optString("label") }, ) @@ -443,81 +514,115 @@ object ComponentsManager { Snapshot(views, packages(context)) } - /** - * The label of a chosen or queued original, in the app's language: the stored "label" was written - * in English when it was chosen. Null for a package, whose label is its version. - */ private fun originalLabel(context: Context, entry: JSONObject): String? = when { entry.optString("kind") == "original" -> context.getString(R.string.cmgr_original_version, entry.optString("protonVersion")) entry.optString("file").startsWith("original ") -> context.getString(R.string.cmgr_original_from, entry.optString("file").removePrefix("original ")) else -> null } - // ------------------------------------------------------------------ launch-time enforcement - /** - * Writes what each Proton should be using for the launch wrappers: desired.tsv, one line per - * file (tool dir, Proton build, component, file, sha256, source copy), and an unpacked copy of - * every package or older-build original in use to copy from. Rebuilt whole after every change, so - * a restored or deleted choice simply stops being enforced. The Proton's own current-build - * originals are not listed: the wrappers also give Steam's probe runs their own prefix, which is - * what overwrote files in the first place. - */ - private fun syncLaunchState(context: Context, state: JSONObject) { + private data class PreparedLaunchState(val text: String, val keep: Set<String>) + + private fun prepareLaunchState(context: Context, state: JSONObject): PreparedLaunchState { val dir = launchDir(context) val store = File(dir, "store").apply { mkdirs() } val all = protons(context) val lines = StringBuilder() val keep = HashSet<String>() - val active = state.sub("active") - for (pid in active.keys()) { - val p = all.firstOrNull { it.id == pid } ?: continue - val comps = active.optJSONObject(pid) ?: continue - for (comp in comps.keys()) { - val a = comps.optJSONObject(comp) ?: continue - if (a.optString("protonVersion") != p.version) continue - val file = a.optString("file") - val (key, wcp) = if (file.startsWith("original ")) { - val v = file.removePrefix("original ") - "original-$pid-${safeName(v)}-$comp" to File(originalsDir(context), "$pid/${safeName(v)}/$comp.wcp") - } else safeName(file.removeSuffix(".wcp")) to File(packagesDir(context), file) - if (!wcp.isFile) continue - val unpacked = File(store, key) - if (!File(unpacked, ".complete").isFile) { - unpacked.deleteRecursively() - readWcp(wcp) { tar -> - while (true) { - val e = tar.nextTarEntry ?: break - val rel = normalize(e.name) - if (e.isDirectory || !rel.startsWith("files/") || rel.split('/').any { it == ".." }) continue - val out = File(unpacked, rel) - out.parentFile?.mkdirs() - FileOutputStream(out).use { tar.copyTo(it) } - } + + fun unpack(key: String, wcp: File, comp: String): File { + check(wcp.isFile) { context.getString(R.string.cmgr_not_stored) } + val unpacked = File(store, key) + if (!File(unpacked, ".complete").isFile) { + check(packageInfo(context, wcp).comp == comp) { "Wrong component in ${wcp.name}" } + unpacked.deleteRecursively() + check(unpacked.mkdirs()) { "Could not stage component bundle ${wcp.name}" } + readWcp(wcp) { tar -> + while (true) { + val e = tar.nextTarEntry ?: break + val rel = normalize(e.name) + if (e.isDirectory || !rel.startsWith("files/") || rel.split('/').any { it == ".." }) continue + val out = File(unpacked, rel) + out.parentFile?.mkdirs() + FileOutputStream(out).use { tar.copyTo(it) } } - File(unpacked, ".complete").writeText("1\n") - } - keep += key - val files = a.optJSONObject("files") ?: continue - for (rel in files.keys()) { - val src = File(unpacked, rel) - if (!src.isFile) continue - val guestSrc = "/" + src.absolutePath.removePrefix(root(context).absolutePath.trimEnd('/')).trimStart('/') - lines.append(p.dir.name).append('\t').append(p.version).append('\t').append(comp).append('\t') - .append(rel).append('\t').append(files.optString(rel)).append('\t').append(guestSrc).append('\n') } + File(unpacked, ".complete").writeText("1\n") + } + keep += key + return unpacked + } + + fun managed(comp: String): Set<String> = if (comp == "fex") FEX_FILES.toSet() else buildSet { + for (arch in PE_ARCHES) for (dll in COMP_DLLS.getValue(comp)) add("${COMP_DIR.getValue(comp)}/$arch/$dll") + } + + fun append(scope: String, p: Proton, comp: String, key: String, wcp: File) { + val unpacked = unpack(key, wcp, comp) + val files = unpacked.let { base -> + File(base, "files").walkTopDown().filter { it.isFile }.map { it.relativeTo(base).invariantSeparatorsPath } + .filter { owned(comp, it) }.associateWith { File(base, it) } + } + for (rel in managed(comp) - files.keys) { + lines.append(scope).append('\t').append(p.dir.name).append('\t').append(p.version).append('\t').append(comp) + .append('\t').append(rel).append("\t-\t-\n") + } + for ((rel, src) in files) { + val guestSrc = "/" + src.relativeTo(root(context)).invariantSeparatorsPath + lines.append(scope).append('\t').append(p.dir.name).append('\t').append(p.version).append('\t').append(comp) + .append('\t').append(rel).append('\t').append(Hashes.sha256(src)).append('\t').append(guestSrc).append('\n') } } - store.listFiles()?.filter { it.isDirectory && it.name !in keep }?.forEach { it.deleteRecursively() } - val list = File(dir, "desired.tsv") - val tmp = File(dir, "desired.tsv.tmp") - tmp.writeText(lines.toString()) - tmp.renameTo(list) + + fun choice(p: Proton, comp: String, entry: JSONObject): Pair<String, File>? { + val file = entry.optString("file") + return if (file.startsWith("original ")) { + val version = safeName(file.removePrefix("original ")) + "original-${p.id}-$version-$comp" to File(originalsDir(context), "${p.id}/$version/$comp.wcp") + } else { + safeName(file.removeSuffix(".wcp")) to File(packagesDir(context), file) + }.takeIf { it.second.isFile } + } + + val profiles = state.sub("profiles") + val profiledComponents = buildSet { + state.optJSONArray("profiledComponents")?.let { stored -> + for (index in 0 until stored.length()) { + stored.optString(index).takeIf(COMPONENTS::contains)?.let(::add) + } + } + for (scope in profiles.keys()) { + val profile = profiles.optJSONObject(scope) ?: continue + COMPONENTS.filterTo(this) { profile.optString(it).isNotEmpty() } + } + } + val active = state.sub("active") + for (p in all) for (comp in COMPONENTS) { + val entry = active.optJSONObject(p.id)?.optJSONObject(comp) + val selected = entry?.takeIf { it.optString("protonVersion") == p.version }?.let { choice(p, comp, it) } + if (selected != null) append("*", p, comp, selected.first, selected.second) + else if (comp in profiledComponents) { + ensureOriginal(context, p, comp, state) + val original = originalFile(context, p, comp) + check(original.isFile) { context.getString(R.string.cmgr_original_missing) } + append("*", p, comp, "original-${p.id}-${safeName(p.version)}-$comp", original) + } + } + for (scope in profiles.keys()) { + val profile = profiles.optJSONObject(scope) ?: continue + for (comp in COMPONENTS) { + val file = profile.optString(comp) + if (file.isEmpty()) continue + val wcp = File(packagesDir(context), file) + if (!wcp.isFile) continue + val key = safeName(file.removeSuffix(".wcp")) + for (p in all) append(scope, p, comp, key, wcp) + } + } + return PreparedLaunchState(lines.toString(), keep) } - // ------------------------------------------------------------------ actions - /** Applies a package now, or queues it when a game is running on that Proton. Returns what happened. */ fun swap(context: Context, protonId: String, file: String): String = synchronized(lock) { val p = proton(context, protonId) val wcp = File(packagesDir(context), safeName(file)) @@ -570,7 +675,6 @@ object ComponentsManager { .put("protonVersion", p.version).put("files", JSONObject(fingerprint(p.dir, comp) as Map<*, *>)).put("at", System.currentTimeMillis() / 1000)) } - /** Runs the swaps that waited for a game to close. Cheap when nothing is queued. */ fun applyQueued(context: Context): List<String> = synchronized(lock) { val state = loadState(context) val queued = state.sub("queued") @@ -607,14 +711,81 @@ object ComponentsManager { saveState(context, state) } + class StoredPackage(val pkg: Package, val inUse: Boolean) + 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> { + 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) + } + } + val profiles = state.optJSONObject("profiles") + for (scope in profiles?.keys() ?: emptyList<String>().iterator()) { + val profile = profiles?.optJSONObject(scope) ?: continue + COMPONENTS.forEach { comp -> profile.optString(comp).takeIf { it.isNotEmpty() }?.let(names::add) } + } + return names + } + + private fun originalKept(state: JSONObject, installed: Map<String, Proton>, protonId: String, comp: String, version: String): Boolean { + val current = installed[protonId]?.let { safeName(it.version) == version } == true + val queued = state.optJSONObject("queued")?.optJSONObject(protonId)?.optJSONObject(comp) + ?.takeIf { it.optString("kind") == "original" }?.let { safeName(it.optString("protonVersion")) == version } == true + return current || queued + } + + fun stored(context: Context): Stored = synchronized(lock) { + val state = loadState(context) + val used = packagesInUse(state) + val installed = protons(context).associateBy { it.id } + val originals = originalsDir(context).listFiles()?.filter { it.isDirectory }?.flatMap { proton -> + proton.listFiles()?.filter { it.isDirectory }?.flatMap { version -> + COMPONENTS.mapNotNull { comp -> + val f = File(version, "$comp.wcp") + if (!f.isFile) null else StoredOriginal( + proton.name, installed[proton.name]?.name, comp, version.name, f.length(), + originalKept(state, installed, proton.name, comp, version.name), + ) + } + }.orEmpty() + }.orEmpty() + Stored(packages(context).map { StoredPackage(it, it.file in used) }, originals) + } + + fun deleteUnusedOriginal(context: Context, protonId: String, comp: String, protonVersion: String): Boolean = synchronized(lock) { + val state = loadState(context) + if (originalKept(state, protons(context).associateBy { it.id }, protonId, comp, protonVersion)) return false + if (comp !in COMPONENTS || listOf(protonId, protonVersion).any { it.isEmpty() || '/' in it || it == "." || it == ".." }) return false + val f = File(originalsDir(context), "$protonId/$protonVersion/$comp.wcp") + if (!f.isFile || !f.delete()) return false + f.parentFile?.takeIf { it.listFiles().isNullOrEmpty() }?.delete() + f.parentFile?.parentFile?.takeIf { it.listFiles().isNullOrEmpty() }?.delete() + true + } + 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 f = File(packagesDir(context), name) check(f.isFile) { context.getString(R.string.cmgr_package_not_stored, name) } f.delete() @@ -631,7 +802,6 @@ object ComponentsManager { context.getString(R.string.cmgr_deleted_original, protonVersion, LABEL[comp]) } - /** Imports a -linux .wcp from anywhere the app can read (the file picker hands over a copy). */ fun importPackage(context: Context, source: File, name: String): Package = synchronized(lock) { val info = packageInfo(context, source) val dest = File(packagesDir(context), safeName(name).let { if (it.endsWith(".wcp")) it else "$it.wcp" }) @@ -639,9 +809,7 @@ object ComponentsManager { info.copy(file = dest.name) } - // ------------------------------------------------------------------ catalog - /** The Nightlies listing: cached on disk, fetched again only when [force] (the refresh button). */ fun catalog(context: Context, force: Boolean): Catalog { val cache = catalogFile(context) if (!force && cache.isFile) runCatching { return parseCatalog(JSONObject(cache.readText())) } @@ -654,7 +822,6 @@ object ComponentsManager { val a = assets.getJSONObject(i) val name = a.optString("name") if (!name.endsWith(".wcp")) continue - // Only packages GitHub has a sha256 for are offered: the download is checked against it. if (!Hashes.isGithubSha256(a.optString("digest"))) continue items.put(JSONObject().put("file", name).put("comp", comp).put("release", tag) .put("url", a.optString("browser_download_url")).put("size", a.optLong("size")).put("digest", a.optString("digest"))) @@ -670,15 +837,13 @@ object ComponentsManager { val arr = o.optJSONArray("items") ?: JSONArray() val items = (0 until arr.length()).map { arr.getJSONObject(it) }.map { CatalogItem(it.optString("file"), it.optString("comp"), it.optString("release"), it.optString("url"), it.optLong("size"), it.optString("digest")) - }.sortedWith(compareBy({ it.comp }, { it.release }, { it.file })) + }.sortedWith(compareBy<CatalogItem> { it.comp }.then(newestFirst { it.file })) return Catalog(items, o.optLong("fetchedAt")) } - /** - * A package Proton does not ship, required on the GPUs listed here. An empty [models] set - * means every model in [families]. A row the user already chose in Components is left alone; - * a Steam update that puts the Proton's own files back is replaced on the next session. - */ + private fun <T> newestFirst(of: (T) -> String): Comparator<T> = + Comparator { a, b -> ProtonExtras.compareVersions(of(b), of(a)) } + internal data class ForcedPackage( val families: Set<GpuInfo.Family>, val comp: String, @@ -690,28 +855,15 @@ object ComponentsManager { } internal val FORCED_PACKAGES = listOf( - // DXVK 3 refuses to start unless the device exposes storageBuffer8BitAccess. Turnip on - // Adreno 6xx does not. 2.7.1 is the last DXVK 2 package on the Dxvk-Linux tag. ForcedPackage(setOf(GpuInfo.Family.A6XX), "dxvk", "dxvk-2.7.1-linux.wcp", "Dxvk-Linux"), ) - /** - * True when this Proton should receive the forced package. No active swap means the Proton's - * own copy. A record for a different Proton build means a Steam update put that copy back, - * whichever package was recorded. A record for this build is a Components choice and stays. - */ internal fun forcedPackageWanted(activeFile: String?, protonVersionMatches: Boolean): Boolean = activeFile.isNullOrEmpty() || !protonVersionMatches - /** The catalog row for this file and release, or null. */ internal fun catalogMatch(items: List<CatalogItem>, file: String, release: String): CatalogItem? = items.firstOrNull { it.file == file && it.release == release } - /** - * Install every [FORCED_PACKAGES] row this GPU matches into each Proton that - * [forcedPackageWanted] selects. Returns a line for the log, or null when this GPU or these - * Protons need nothing. A failed fetch throws and the session logs it without stopping. - */ fun ensureForcedPackages(context: Context): String? = ensureForcedPackages( context, GpuInfo.detect(), { file, release -> catalogItem(context, file, release) }, @@ -747,7 +899,6 @@ object ComponentsManager { return lines.joinToString("; ").ifEmpty { null } } - /** Null when [rule]'s package is stored and readable. Otherwise the log line, after a fetch. */ private fun missingPackage( context: Context, rule: ForcedPackage, @@ -763,11 +914,9 @@ object ComponentsManager { return null } - /** The cached Nightlies row for this file, fetching the listing when the cache does not have it. */ internal fun catalogItem(context: Context, file: String, release: String): CatalogItem? = resolveCatalogItem(file, release, { catalog(context, false).items }, { catalog(context, true).items }) - /** [cached] when it has the row, otherwise [refresh]. [refresh] is not called on a hit. */ internal fun resolveCatalogItem( file: String, release: String, @@ -775,14 +924,12 @@ object ComponentsManager { refresh: () -> List<CatalogItem>, ): CatalogItem? = catalogMatch(cached(), file, release) ?: catalogMatch(refresh(), file, release) - /** Downloads a catalog item into storage, verifying the release's sha256 and the package type. */ fun download(context: Context, item: CatalogItem, progress: (Int) -> Unit): Package { require(item.url.startsWith("https://github.com/$NIGHTLIES/releases/download/")) { context.getString(R.string.cmgr_nightlies_only) } require(Hashes.isGithubSha256(item.digest)) { context.getString(R.string.cmgr_list_predates_checksums) } val dest = File(packagesDir(context), safeName(item.file)) val part = File(dest.parentFile, dest.name + ".part") - part.delete() - check(Downloader.downloadFile(item.url, part, false) { f -> progress(if (f < 0) -1 else (f * 100).toInt().coerceIn(0, 100)) }) { context.getString(R.string.user_apps_download_failed) } + check(Downloader.downloadFile(item.url, part, true, item.digest.substringAfter(':')) { f -> progress(if (f < 0) -1 else (f * 100).toInt().coerceIn(0, 100)) }) { context.getString(R.string.user_apps_download_failed) } if (!Hashes.sha256(part).equals(item.digest.substringAfter(':'), true)) { part.delete(); error(context.getString(R.string.cmgr_checksum_mismatch)) } val info = runCatching { packageInfo(context, part) }.getOrElse { part.delete(); throw it } synchronized(lock) { part.renameTo(dest) } diff --git a/app/src/main/java/com/droiddeck/launcher/session/CpuStatComponent.kt b/app/src/main/java/com/droiddeck/launcher/session/CpuStatComponent.kt index 7c5aa9a28a..40e4591950 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/CpuStatComponent.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/CpuStatComponent.kt @@ -5,19 +5,6 @@ import android.util.Log import com.droiddeck.launcher.core.SessionPart import java.io.File -/** - * A `/proc/stat` that moves. - * - * Android has refused apps `/proc/stat` since 8.0, and the session's stand-in for it was one - * `cpu0` line of zeros - enough for glibc and Steam to start, but every CPU load in the session - * read 0 % (the performance overlay showed one core, idle). The kernel still lets apps read each - * core's idle residency (`cpuidle/stateN/time`, µs, the same label as the cpufreq files), which is - * how overlays on Android work out CPU load: a core's busy time is the time that passed less the - * time it spent idle. This writes `/proc/stat` from that, one line per core, refreshed twice a - * second. Counters only grow - a sample's idle is never more than the time that passed - so a - * reader taking the difference of two reads never sees a negative. Where `/proc/stat` is readable, - * or the idle times are not, nothing is done. - */ class CpuStatComponent(val file: File) : SessionPart() { @Volatile private var running = false private var thread: Thread? = null @@ -28,7 +15,6 @@ class CpuStatComponent(val file: File) : SessionPart() { private var lastMs = 0L private val bootSeconds = (System.currentTimeMillis() - SystemClock.elapsedRealtime()) / 1000 - /** Writes the first sample; true when it should be bound over `/proc/stat`. */ fun prepare(): Boolean { if (File("/proc/stat").canRead() || cores.isEmpty() || idleUs(0) == null) return false lastMs = SystemClock.elapsedRealtime() @@ -62,7 +48,6 @@ class CpuStatComponent(val file: File) : SessionPart() { if (elapsed <= 0) return lastMs += elapsed * MS_PER_TICK for (i in cores) { - // An offline core has no idle residency to count and runs nothing: all idle. val us = idleUs(i) val idleTicks = if (us == null) elapsed else ((us - lastIdleUs[i]) / US_PER_TICK).coerceIn(0, elapsed) if (us != null) lastIdleUs[i] = us @@ -71,7 +56,6 @@ class CpuStatComponent(val file: File) : SessionPart() { } } - /** The whole file at once, renamed into place: a reader opens either the last sample or this one. */ private fun write() { val text = StringBuilder() text.append("cpu ${busy.sum()} 0 0 ${idle.sum()} 0 0 0 0 0 0\n") @@ -88,14 +72,12 @@ class CpuStatComponent(val file: File) : SessionPart() { companion object { private const val TAG = "SessionService" private const val PERIOD_MS = 500L - /** /proc/stat counts in USER_HZ, 100 a second on every Linux the guest runs. */ private const val MS_PER_TICK = 10L private const val US_PER_TICK = 10_000L private fun coreCount(): Int = File("/sys/devices/system/cpu").list()?.count { it.matches(Regex("cpu\\d+")) } ?: 0 - /** The core's total idle residency in µs, or null when it has none to read (offline). */ private fun idleUs(core: Int): Long? { val states = File("/sys/devices/system/cpu/cpu$core/cpuidle").listFiles { f -> f.name.startsWith("state") } ?: return null diff --git a/app/src/main/java/com/droiddeck/launcher/session/CrashHandler.kt b/app/src/main/java/com/droiddeck/launcher/session/CrashHandler.kt index 1a0a669339..3605db8805 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/CrashHandler.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/CrashHandler.kt @@ -6,16 +6,6 @@ import java.io.File import java.io.PrintWriter import java.io.StringWriter -/** - * The last thing that runs when our own code throws on any thread: the stack trace into the - * session's folder, then the folder's ending ([SessionArtifacts.collect]), then Android's own - * handler so the crash is still reported and still lands in the crash buffer. Bounded, because - * a handler that hangs turns a crash into a frozen app: the collect gets a few seconds and the - * process dies regardless. - * - * A native crash (the compositor, a JNI call) never reaches here - the process is gone before - * Java sees anything. [SessionArtifacts.finishAbandoned] at the next start covers that case. - */ object CrashHandler { private const val TAG = "CrashHandler" @@ -24,6 +14,12 @@ object CrashHandler { Thread.setDefaultUncaughtExceptionHandler { thread, error -> try { Log.e(TAG, "uncaught on ${thread.name}", error) + if (QuestExperimental.isSupported()) runCatching { + File(context.filesDir, "quest-last-crash.txt").writeText( + "${java.time.Instant.now()} thread=${thread.name}\n" + + StringWriter().also { error.printStackTrace(PrintWriter(it)) }.toString() + ) + } val dir = SessionPaths.current() if (dir != null && dir.isDirectory) { val trace = StringWriter().also { error.printStackTrace(PrintWriter(it)) }.toString() @@ -34,10 +30,8 @@ object CrashHandler { worker.start() worker.join(8000) } - // The session's tree would outlive us otherwise, and block the next launch. OrphanReaper.reap("app crash") } catch (e: Throwable) { - // Nothing more to do for a crash inside the crash handler. } finally { previous?.uncaughtException(thread, error) ?: Runtime.getRuntime().halt(2) } diff --git a/app/src/main/java/com/droiddeck/launcher/session/EsyncPacks.kt b/app/src/main/java/com/droiddeck/launcher/session/EsyncPacks.kt index 696657b1a3..60044ccb84 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/EsyncPacks.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/EsyncPacks.kt @@ -2,6 +2,7 @@ package com.droiddeck.launcher.session import android.content.Context import android.util.Log +import com.droiddeck.launcher.core.DownloadSource import com.droiddeck.launcher.core.FileUtils import com.droiddeck.launcher.core.Hashes import com.github.luben.zstd.ZstdInputStream @@ -620,16 +621,27 @@ object EsyncPacks { val label = context.getString(com.droiddeck.launcher.R.string.esync_fetching) onProgress?.invoke(label, -1) var reported = -1 - val fetched = FileOutputStream(part).use { output -> - fetch(entry.asset.url, entry.asset.size, output) { done -> - val percent = (done * 100 / entry.asset.size).toInt().coerceIn(0, 100) - if (percent != reported) { - reported = percent - onProgress?.invoke(label, percent) + val sources = DownloadSource.candidates(entry.asset.url) + var fetched = false + for ((index, source) in sources.withIndex()) { + if (index > 0) Log.i(TAG, "retrying ${entry.asset.url} via $source") + reported = -1 + fetched = FileOutputStream(part).use { output -> + fetch(source, entry.asset.size, output) { done -> + val percent = (done * 100 / entry.asset.size).toInt().coerceIn(0, 100) + if (percent != reported) { + reported = percent + onProgress?.invoke(label, percent) + } } } + if (fetched) { + DownloadSource.succeeded(source) + break + } } if (!fetched) { + DownloadSource.failed() SessionEvents.record("sync.pack", mapOf("id" to entry.id, "source" to "download", "result" to "failed", "reason" to "download")) return false } @@ -836,8 +848,17 @@ object EsyncPacks { } private fun fetchBytes(url: String, limit: Long): ByteArray? { - val out = ByteArrayOutputStream() - return if (fetch(url, limit, out, null)) out.toByteArray() else null + val sources = DownloadSource.candidates(url) + for ((index, source) in sources.withIndex()) { + if (index > 0) Log.i(TAG, "retrying $url via $source") + val out = ByteArrayOutputStream() + if (fetch(source, limit, out, null)) { + DownloadSource.succeeded(source) + return out.toByteArray() + } + } + DownloadSource.failed() + return null } private fun fetch(url: String, limit: Long, out: OutputStream, progress: ((Long) -> Unit)?): Boolean = diff --git a/app/src/main/java/com/droiddeck/launcher/session/FexCatalog.kt b/app/src/main/java/com/droiddeck/launcher/session/FexCatalog.kt new file mode 100644 index 0000000000..73f42cb141 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/FexCatalog.kt @@ -0,0 +1,71 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import android.util.Log +import com.droiddeck.launcher.core.DownloadSource +import com.droiddeck.launcher.core.Downloader +import org.json.JSONObject +import java.io.File + +/** + * The FEX build DroidDeck-Components' fex.json names for the x86-64 client. A session uses the last copy read. + * Components' build-fex.yml replaces the archive on its single `fex` release and records the build's version; + * a release per build (fex-2610-r5) is still read. + */ +object FexCatalog { + private const val TAG = "FexCatalog" + const val CATALOG_URL = "https://raw.githubusercontent.com/Droid-Deck/DroidDeck-Components/main/fex.json" + private const val RELEASES = "https://github.com/Droid-Deck/DroidDeck-Components/releases/download/" + private const val REFRESH_MS = 10 * 60 * 1000L + private val TAG_FORMAT = Regex("""fex-\d+-r\d+""") + private val VERSION_FORMAT = Regex("""\d+-r\d+""") + private val SHA256 = Regex("[0-9a-f]{64}") + + data class Build(val tag: String, val url: String, val sha256: String) + + @Volatile private var refreshedAt = 0L + + private fun file(context: Context) = File(context.filesDir, "fex-catalog.json") + + internal fun parse(text: String): Build? = runCatching { + val o = JSONObject(text) + val release = o.getString("release") + val url = o.getString("url") + val sha = o.getString("sha256").lowercase() + val version = o.optString("version") + val tag = when { + TAG_FORMAT.matches(release) -> release + release == "fex" && VERSION_FORMAT.matches(version) -> "fex-$version" + else -> return@runCatching null + } + Build(tag, url, sha).takeIf { url == "$RELEASES$release/fex.tzst" && SHA256.matches(sha) } + }.getOrNull() + + fun cached(context: Context): Build? = runCatching { parse(file(context).readText()) }.getOrNull() + + /** Reads fex.json straight from GitHub (a digest never comes from a mirror), at most every ten minutes. */ + @Synchronized + fun refresh(context: Context, now: Long = System.currentTimeMillis()): Build? { + if (now - refreshedAt < REFRESH_MS) return cached(context) + refreshedAt = now + val text = Downloader.downloadDirect(CATALOG_URL) ?: return cached(context) + val build = parse(text) ?: run { + Log.w(TAG, "fex.json not usable; keeping the last one") + return cached(context) + } + runCatching { + val f = file(context) + val tmp = File(f.path + ".tmp") + tmp.writeText(text) + if (!tmp.renameTo(f)) tmp.delete() + } + return build + } + + /** For droiddeck-steam-x64: the build and every source its archive may come from (it checks the sha256). */ + fun environment(build: Build, sources: List<String> = DownloadSource.candidates(build.url)): List<String> = listOf( + "BL_FEX_TAG=${build.tag}", + "BL_FEX_SHA256=${build.sha256}", + "BL_FEX_URLS=" + sources.joinToString(" "), + ) +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/GameEnvironmentStore.kt b/app/src/main/java/com/droiddeck/launcher/session/GameEnvironmentStore.kt index affc00dc77..351fe304c0 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/GameEnvironmentStore.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/GameEnvironmentStore.kt @@ -11,8 +11,8 @@ import java.io.File object GameEnvironmentStore { private const val SETTINGS = "game-environment.json" private const val GUEST_FILE = "root/.config/droiddeck/game-environment.json" - /** The published file's extra DXVK options (droiddeck-game-env reads it; the app's own file has none). */ const val DXVK_CONFIG = "dxvkConfig" + const val DXVK_CONFIG_GAMES = "dxvkConfigGames" @Synchronized fun read(context: Context): GameEnvironment.Config { @@ -57,17 +57,51 @@ object GameEnvironmentStore { publish(context, config) } + @Synchronized + fun setGameFexPreset(context: Context, scope: String, preset: String?): GameEnvironment.Config { + val config = GameEnvironment.withGameFexPreset(read(context), scope, preset) + save(context, config) + return config + } + + @Synchronized + fun setGameSync(context: Context, scope: String, backend: String?): GameEnvironment.Config { + val config = GameEnvironment.withGameSync(read(context), scope, backend) + save(context, config) + return config + } + + @Synchronized + fun setGameNoSteam(context: Context, scope: String, on: Boolean): GameEnvironment.Config { + val config = GameEnvironment.withGameNoSteam(read(context), scope, on) + save(context, config) + return config + } + @Synchronized fun publish(context: Context, config: GameEnvironment.Config = read(context)) { val resolved = config.copy(shared = GameEnvironment.defaults(SessionPrefs.fexPreset(context), SessionPrefs.forceSsbs(context)) + config.shared) val json = encode(resolved) - // The Display page's texture filtering, as DXVK options the launcher appends to - // DXVK_CONFIG after the profiles - a user's own DXVK_CONFIG entry keeps its options. val dxvk = TextureFiltering.dxvkOptions( SessionPrefs.textureAnisotropy(context), SessionPrefs.textureLodBias(context), TextureFiltering.autoLodBias(SessionState.upscaleRatio), ) if (dxvk.isNotEmpty()) json.put(DXVK_CONFIG, dxvk) + val autoBias = TextureFiltering.autoLodBias(SessionState.upscaleRatio) + val generalAnisotropy = SessionPrefs.textureAnisotropy(context) + val generalLodBias = SessionPrefs.textureLodBias(context) + val gameDxvk = JSONObject() + SessionPrefs.gameTextureFiltering(context).forEach { (scope, choice) -> + gameDxvk.put( + scope, + TextureFiltering.dxvkOptions( + choice.anisotropy ?: generalAnisotropy, + choice.lodBias ?: generalLodBias, + autoBias, + ), + ) + } + if (gameDxvk.length() > 0) json.put(DXVK_CONFIG_GAMES, gameDxvk) write(File(LinuxRuntime.rootDir(context), GUEST_FILE), json.toString()) } diff --git a/app/src/main/java/com/droiddeck/launcher/session/GameProfileFollowState.kt b/app/src/main/java/com/droiddeck/launcher/session/GameProfileFollowState.kt new file mode 100644 index 0000000000..77e9f67b1a --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/GameProfileFollowState.kt @@ -0,0 +1,14 @@ +package com.droiddeck.launcher.session + +internal class GameProfileFollowState { + var followsSteam = true + private set + + fun selectManually() { + followsSteam = false + } + + fun resumeFollowingSteam() { + followsSteam = true + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/GameProfileInventoryCache.kt b/app/src/main/java/com/droiddeck/launcher/session/GameProfileInventoryCache.kt new file mode 100644 index 0000000000..b140620e39 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/GameProfileInventoryCache.kt @@ -0,0 +1,15 @@ +package com.droiddeck.launcher.session + +internal class GameProfileInventoryCache<T : Any> { + private val lock = Any() + + private var revision: Long? = null + private var value: List<T>? = null + + fun get(requestedRevision: Long, load: () -> List<T>): List<T> = synchronized(lock) { + value?.takeIf { revision == requestedRevision } ?: load().toList().also { + value = it + revision = requestedRevision + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/GameProfileManager.kt b/app/src/main/java/com/droiddeck/launcher/session/GameProfileManager.kt new file mode 100644 index 0000000000..ed1d357b32 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/GameProfileManager.kt @@ -0,0 +1,31 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import com.droiddeck.launcher.core.GameEnvironment + +object GameProfileManager { + @Synchronized + fun reset(context: Context, scope: String) { + require(scope.isNotEmpty() && GameEnvironment.validScope(scope)) + val failures = mutableListOf<Pair<String, Throwable>>() + fun clear(name: String, action: () -> Unit) { + runCatching(action).onFailure { failures += name to it } + } + + clear("environment") { + GameEnvironmentStore.save( + context, + GameEnvironmentStore.read(context).withEntries(scope, emptyMap()), + ) + } + clear("Proton") { ProtonDefault.requestGame(context, scope, null) } + clear("component packages") { ComponentsManager.clearGameComponents(context, scope) } + clear("texture filtering") { SessionPrefs.clearGameTextureFiltering(context, scope) } + clear("Windows components") { WinComponents.setPicks(context, scope, emptyList()) } + + if (failures.isNotEmpty()) { + val names = failures.joinToString { it.first } + throw IllegalStateException("Could not clear: $names", failures.first().second) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/GameProfileRefreshState.kt b/app/src/main/java/com/droiddeck/launcher/session/GameProfileRefreshState.kt new file mode 100644 index 0000000000..721953abcf --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/GameProfileRefreshState.kt @@ -0,0 +1,13 @@ +package com.droiddeck.launcher.session + +internal data class GameProfileRefreshState<T>( + val data: T? = null, + val loaded: Boolean = false, + val failed: Boolean = false, +) { + fun succeeded(data: T) = GameProfileRefreshState(data, loaded = true) + + fun failed() = copy(failed = true) + + fun retrying() = copy(failed = false) +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/GameSaves.kt b/app/src/main/java/com/droiddeck/launcher/session/GameSaves.kt index 8e9fe257d5..3a31da0113 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/GameSaves.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/GameSaves.kt @@ -17,30 +17,18 @@ import java.util.zip.ZipEntry import java.util.zip.ZipInputStream import java.util.zip.ZipOutputStream -/** - * Game saves in and out of a game's Proton prefix, as zips other apps read: GameHub keeps a prefix's - * drive_c rooted at "/drive_c/users/steamuser/…", Winlator / WinNative / Bannerlator at - * "drive_c/users/xuser/…". Proton here runs as steamuser too, so on the way in any user folder but - * Public becomes steamuser, and on the way out the chosen layout decides the user segment. - * - * Saves belong to the game's prefix (compatdata/<appid>/pfx), whichever Proton it runs with. - * Ported from Bannerlator's GameSaveBackup and SaveLocator. - */ object GameSaves { enum class Layout(val app: String, val rootPrefix: String, val user: String) { GAMEHUB("GameHub", "/drive_c/", "steamuser"), WINLATOR("Winlator", "drive_c/", "xuser"); - /** "GameHub zip", in the app's language. */ fun label(context: Context): String = context.getString(R.string.saves_layout_zip, app) } - /** A game, its prefix, and the save folders found in it. */ data class Game(val game: Library.SteamGame, val prefix: File?, val saves: List<SaveDir>) { val launched get() = prefix?.let { File(it, "drive_c").isDirectory } == true } - /** A folder of saves, relative to the steamuser profile. */ data class SaveDir(val relPath: String, val files: Int, val bytes: Long) private const val USER = "steamuser" @@ -48,21 +36,14 @@ object GameSaves { fun savesDir(): File = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "DroidDeck/Saves") private fun backupsDir(): File = File(savesDir(), "backups") - /** [game] with its prefix and the saves found there; reads files, so not on the main thread. */ fun game(game: Library.SteamGame): Game = Game(game, game.protonPrefix, game.protonPrefix?.let { locate(it, game) } ?: emptyList()) - // ------------------------------------------------------------------ finding saves - /** Roots of the steamuser profile that hold most PC game saves, in the order they are trusted. */ private val SAVE_ROOTS = listOf("Documents/My Games", "Saved Games", "AppData/Roaming", "Documents", "AppData/Local", "AppData/LocalLow") private const val KEEP_THRESHOLD = 50 private fun profile(prefix: File) = File(prefix, "drive_c/users/$USER") - /** - * Folders under the save roots, one and two deep, whose names match the game's name or its folder's. - * Nested matches keep the outer folder only. - */ fun locate(prefix: File, game: Library.SteamGame): List<SaveDir> { val profile = profile(prefix) if (!profile.isDirectory) return emptyList() @@ -102,7 +83,6 @@ object GameSaves { return Ident(cleaned.filter { it.isLetterOrDigit() }, cleaned.split(Regex("[^a-z0-9]+")).filter { it.isNotEmpty() }.toSet()) } - /** exact 100, one contains the other 70, half the words shared 50, close spelling 40. */ private fun score(a: Ident, b: Ident): Int { if (a.norm.isEmpty() || b.norm.isEmpty()) return 0 if (a.norm == b.norm) return 100 @@ -123,15 +103,10 @@ object GameSaves { return prev[b.length] } - // ------------------------------------------------------------------ export private fun stamp() = SimpleDateFormat("yyyy-MM-dd_HHmm", Locale.US).format(Date()) private fun safe(name: String) = name.replace(Regex("[/\\\\:*?\"<>|]"), "_").trim().ifEmpty { "game" } - /** - * Zips the game's saves into [dir] as "<Game>_<date>.zip" in [layout]. The found save folders when - * there are any, else the whole steamuser profile minus Temp and crash dumps. Returns the zip. - */ fun export(context: Context, game: Game, layout: Layout, dir: File): Pair<File, Int> { val prefix = game.prefix ?: error(context.getString(R.string.saves_not_launched, game.game.name)) dir.mkdirs() @@ -160,13 +135,7 @@ object GameSaves { return count } - // ------------------------------------------------------------------ import - /** - * Unzips a GameHub or Winlator save zip into the game's drive_c, after zipping what its steamuser - * profile holds now into Download/DroidDeck/Saves/backups. Entries outside drive_c, launcher - * shortcuts and anything escaping drive_c are skipped. Returns (files written, backup or null). - */ fun import(context: Context, game: Game, zip: File): Pair<Int, File?> { val prefix = game.prefix ?: error(context.getString(R.string.saves_not_launched, game.game.name)) val driveC = File(prefix, "drive_c") @@ -201,7 +170,6 @@ object GameSaves { return written to backup.takeIf { it.exists() } } - /** Which layout a zip was written in, from its first user folder; null when it has none. */ fun layoutOf(zip: File): Layout? = runCatching { ZipInputStream(BufferedInputStream(zip.inputStream())).use { zis -> var e = zis.nextEntry @@ -223,11 +191,9 @@ object GameSaves { } }.getOrDefault(false) - /** An entry's path below drive_c, with any user folder but Public renamed to steamuser. */ private fun remap(raw: String): String? { val segs = driveCSegments(raw)?.takeIf { it.isNotEmpty() } ?: return null if (segs.any { it == ".." }) return null - // GameHub also packs its own launcher shortcuts; they are never saves. if (segs[0].equals("proton_shortcuts", true)) return null val last = segs.last().lowercase() if ((last.endsWith(".lnk") || last.endsWith(".desktop") || last.endsWith(".url")) && segs.any { it.equals("Desktop", true) }) return null diff --git a/app/src/main/java/com/droiddeck/launcher/session/GameStorage.kt b/app/src/main/java/com/droiddeck/launcher/session/GameStorage.kt index df457d2e34..90feec16e1 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/GameStorage.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/GameStorage.kt @@ -9,20 +9,9 @@ import com.droiddeck.launcher.core.FileUtils import com.droiddeck.launcher.frontend.AddedGames import java.io.File -/** - * Where a second Steam library can live on this device. - * - * An SD card is offered through the app's own folder on it ({@code Android/data/<pkg>/files/steam}): - * the one place on a card a targetSdk-28 app may write without a permission prompt, and a real - * filesystem path the session can bind. Any other folder comes from the File Manager's pick mode - * and is checked for writing before it is accepted. Both are FUSE-backed on Android and stream - * slowly (intro movies, big asset loads); internal stays the default and the dialog says so. - */ object GameStorage { - /** A library root: [label] as the menu lists it (a volume with its free space), [name] alone. */ class Option(val label: String, val path: String, val name: String = label) - /** Every removable volume, as its app folder, with the free space it has. */ fun options(context: Context): List<Option> { val sm = context.getSystemService(StorageManager::class.java) return context.getExternalFilesDirs(null).orEmpty().filterNotNull().mapNotNull { dir -> @@ -40,10 +29,6 @@ object GameStorage { "?" } - /** - * Makes [path] a library root the session can bind - the folder and its steamapps/ - and proves - * it writable. Returns why it cannot be used, or null when it can. - */ fun prepare(context: Context, path: String): String? { val root = File(path) val steamapps = File(root, "steamapps") @@ -56,7 +41,6 @@ object GameStorage { } } - /** The root the session binds, from the setting: automatic = the first card in the phone. */ fun effective(context: Context): Option? { val pref = SessionPrefs.gameStorage(context) return when { @@ -66,14 +50,13 @@ object GameStorage { } } + const val X64_CARD_DIR = "x86-64" + const val X64_CARD_GUEST = "/mnt/droiddeck-sd/$X64_CARD_DIR" + + fun x64CardLibrary(context: Context): File? = effective(context)?.let { File(it.path, X64_CARD_DIR) } + class Library(val host: File, val guest: String, val label: String) - /** - * Games folders an earlier build registered as Steam libraries that Steam has installed games - * into (an appmanifest in their steamapps/): those stay libraries, so the games are not lost. - * Any other Games folder is no longer one; the session's library list leaves it out and the - * runtime's droiddeck-steam-library forgets it. - */ fun gamesFolderLibraries(context: Context): List<Library> { if (SessionPrefs.gameStorage(context).isNotEmpty()) return emptyList() val card = effective(context)?.let { canonical(File(it.path)) } @@ -90,13 +73,11 @@ object GameStorage { } } - /** Steam has installed a game into [root] as a library: a manifest in its steamapps/. */ internal fun hasInstalledGames(root: File): Boolean = File(root, "steamapps").listFiles { f -> f.isFile && f.name.startsWith("appmanifest_") && f.name.endsWith(".acf") }?.isNotEmpty() == true private fun canonical(file: File): String = runCatching { file.canonicalPath }.getOrDefault(file.absolutePath) - /** The label the client shows for a chosen folder: its last name, or the volume's. */ fun labelFor(context: Context, path: String): String = options(context).firstOrNull { it.path == path }?.name ?: File(path).name.ifEmpty { context.getString(R.string.gstore_folder) } diff --git a/app/src/main/java/com/droiddeck/launcher/session/GameThreadHints.kt b/app/src/main/java/com/droiddeck/launcher/session/GameThreadHints.kt new file mode 100644 index 0000000000..1b5b90db62 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/GameThreadHints.kt @@ -0,0 +1,209 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import android.os.Build +import android.os.PerformanceHintManager +import android.os.PowerManager +import android.os.Process +import android.system.Os +import android.system.OsConstants +import android.util.Log +import com.droiddeck.launcher.wayland.WaylandCompositor +import java.io.File +import kotlin.math.abs + +/** + * The game's busiest threads named to Android's performance hint service (ADPF) for a session. + * + * Qualcomm's WALT moves a thread to the prime cores only once it fills a mid core (the Odin 3's + * sched_upmigrate is 95), and a game thread that waits on its workers or the GPU for part of each + * frame never does: Factorio's update thread sat at ~68% on cores 0-5 with 6-7 idle, and ran 60% + * faster pinned to 6-7. An app may not raise a thread's uclamp (EPERM without CAP_SYS_NICE), but a + * hint session may name any thread of its UID - the guest's are - and one reported behind its + * target is boosted by the power HAL onto the prime cores: on the Odin 3 a 70%-busy thread of a + * child process went from cores 0-5 to 6-7 and ran 1.7x faster within a second. + * + * Once a second the busiest threads of this UID are read from /proc; one busy more than [ENTER] of + * the time (averaged with the second before, so a loading spike does not count) joins the session, + * and leaves it under [LEAVE] - well below, since it runs faster where it was moved. While the + * session has threads it reports them behind target, which is what asks for the boost: the reports + * carry no frame timing, the busy share is the signal (a capped game's frame interval looks the same + * as a slow one's). Nothing is boosted while the device is critically hot or saves power. + * + * Nor while the game holds the panel's rate or a fraction of it ([holdsPace]): there is nothing to + * gain, and it cost frame pacing - Serious Sam capped at 120 fps ran its boosted main thread on prime + * cores the governor kept at 2.2 GHz, slower than a 3.5 GHz mid core, and 23-25% of its frames fell + * under 90 fps against 2-7% unboosted. A game with no frames (Factorio's benchmark, a loading screen) + * or one falling behind the panel is boosted; one holding pace keeps what it has for [PACE_LEAVE_S] + * seconds and is then let go. + */ +object GameThreadHints { + private const val TAG = "GameThreadHints" + private const val TARGET_NS = 10_000_000L + private const val REPORT_MS = 50L + private const val SCAN_EVERY = 20 // reports, so once a second + private const val ENTER = 0.6 + private const val LEAVE = 0.15 // a capped game's main thread idles to ~30% on a prime core; under 0.3 it hopped back and forth + private const val MAX_THREADS = 2 // one per prime core; a third would be sped up in place instead + private const val TOP_PROCESSES = 3 + private const val PACE_WINDOW_S = 3 + private const val PACE_LEAVE_S = 10 + private const val PACE_TOLERANCE = 0.08 + + /** Busy, but not the game: the app itself and the Steam client, whose UI would otherwise hold the prime cores. */ + private val NOT_GAMES = setOf("steam", "steamwebhelper") + + private var worker: Thread? = null + + /** At a session's start. The line is for the log. */ + @Synchronized + fun start(context: Context): String { + if (!SessionPrefs.gameThreadHints(context)) return "game thread hints: off" + // Measured on the Odin 3 (CQ8725S) only; another HAL may boost differently, or not at all. + if (Build.VERSION.SDK_INT < 31 || Build.SOC_MODEL != "CQ8725S") return "game thread hints: Odin 3 only" + val hm = context.getSystemService(PerformanceHintManager::class.java) + ?: return "game thread hints: no PerformanceHintManager" + val pm = context.getSystemService(PowerManager::class.java) + worker?.interrupt() + worker = Thread({ run(hm, pm) }, "game-thread-hints").apply { isDaemon = true; start() } + return "game thread hints: watching" + } + + /** At a session's end. */ + @Synchronized + fun stop() { + worker?.interrupt() + worker = null + } + + private fun run(hm: PerformanceHintManager, pm: PowerManager) { + val scanner = Scanner() + var session: PerformanceHintManager.Session? = null + var boosted = emptySet<Int>() + val frames = ArrayDeque<Long>() + var pacedFor = 0 + var tick = 0 + try { + while (!Thread.currentThread().isInterrupted) { + if (tick++ % SCAN_EVERY == 0) { + val busy = scanner.sample() + frames.addLast(WaylandCompositor.gameFrameCount()) + if (frames.size > PACE_WINDOW_S + 1) frames.removeFirst() + val fps = (frames.last() - frames.first()).toDouble() / (frames.size - 1).coerceAtLeast(1) + val paced = frames.size > PACE_WINDOW_S && holdsPace(fps, SessionState.refreshHz.toDouble()) + pacedFor = if (paced) pacedFor + 1 else 0 + // Not SEVERE: the Odin 3 reports it once its skin reaches 50 C, a couple of minutes into any game. + val spare = pm.isPowerSaveMode || pm.currentThermalStatus >= PowerManager.THERMAL_STATUS_CRITICAL + val next = when { + spare || pacedFor >= PACE_LEAVE_S -> emptySet() + paced -> pick(boosted, busy.filterKeys { it in boosted }) + else -> pick(boosted, busy) + } + if (next != boosted) { + session = update(hm, session, next) + // No session means a thread exited in between: tried again next second. + boosted = if (session == null) emptySet() else next + Log.i(TAG, (if (session == null && next.isNotEmpty()) "no session for " else "boosting ") + + next.joinToString { "${readName("/proc/$it/comm")}/$it ${((busy[it] ?: 0.0) * 100).toInt()}%" }.ifEmpty { "nothing" } + + " (game ${fps.toInt()} fps${if (paced) ", holding pace" else ""})") + } + } + session?.reportActualWorkDuration(TARGET_NS * 3 / 2) + Thread.sleep(REPORT_MS) + } + } catch (_: InterruptedException) { + } catch (t: Throwable) { + Log.w(TAG, "stopped", t) + } finally { + session?.close() + } + } + + /** A new session over [tids] in place of [session]; null for none. The set changes seldom, so no setThreads. */ + private fun update(hm: PerformanceHintManager, session: PerformanceHintManager.Session?, tids: Set<Int>): PerformanceHintManager.Session? { + session?.close() + if (tids.isEmpty()) return null + return try { + hm.createHintSession(tids.toIntArray(), TARGET_NS) + } catch (t: RuntimeException) { + Log.w(TAG, "createHintSession", t) + null + } + } + + /** + * Whether a game presenting [fps] frames a second keeps up with a [refreshHz] panel: within + * [PACE_TOLERANCE] of the rate or of a half, a third or a quarter of it (a 60 fps limiter on 120 Hz). + * A game with next to no frames (a headless benchmark, a loading screen) does not. + */ + // ponytail: a CPU-bound game that happens to run at ~60 fps on a 120 Hz panel reads as limited; narrow the band if that shows up + internal fun holdsPace(fps: Double, refreshHz: Double): Boolean = + fps >= 10 && refreshHz > 0 && (1..4).any { k -> abs(fps - refreshHz / k) < PACE_TOLERANCE * refreshHz / k } + + /** + * The threads to boost next: those already boosted that are still above [LEAVE], then new ones + * above [ENTER], busiest first, at most [MAX_THREADS]. + */ + internal fun pick(boosted: Set<Int>, busy: Map<Int, Double>): Set<Int> = + busy.entries + .filter { (tid, share) -> share >= if (tid in boosted) LEAVE else ENTER } + .sortedWith(compareByDescending<Map.Entry<Int, Double>> { it.key in boosted }.thenByDescending { it.value }) + .take(MAX_THREADS) + .map { it.key } + .toSet() + + private fun readName(path: String) = try { File(path).readText().trim() } catch (_: Exception) { "?" } + + /** Busy shares of this UID's threads since the last sample: /proc shows an app only its own processes. */ + private class Scanner { + private val self = Process.myPid() + private val hz = Os.sysconf(OsConstants._SC_CLK_TCK).toDouble() + private var lastNs = 0L + private var lastProcess = HashMap<Int, Long>() + private var lastThread = HashMap<Int, Long>() + private var lastBusy = HashMap<Int, Double>() + + /** Only the busiest few processes have their threads read, so a second costs a few dozen small reads. */ + fun sample(): Map<Int, Double> { + val now = System.nanoTime() + val seconds = (now - lastNs) / 1e9 + lastNs = now + val process = HashMap<Int, Long>() + File("/proc").list()?.forEach { entry -> + val pid = entry.toIntOrNull() ?: return@forEach + cpuTicks("/proc/$pid/stat")?.let { process[pid] = it } + } + val top = process.entries + .map { (pid, ticks) -> pid to ticks - (lastProcess[pid] ?: ticks) } + .filter { (pid, delta) -> delta > 0 && pid != self } + .sortedByDescending { it.second } + .asSequence() + .filter { (pid, _) -> readName("/proc/$pid/comm") !in NOT_GAMES } + .take(TOP_PROCESSES) + .toList() + lastProcess = process + val thread = HashMap<Int, Long>() + val busy = HashMap<Int, Double>() + for ((pid, _) in top) { + File("/proc/$pid/task").list()?.forEach { entry -> + val tid = entry.toIntOrNull() ?: return@forEach + val ticks = cpuTicks("/proc/$pid/task/$tid/stat") ?: return@forEach + thread[tid] = ticks + lastThread[tid]?.let { before -> busy[tid] = ((ticks - before) / hz / seconds + (lastBusy[tid] ?: 0.0)) / 2 } + } + } + lastThread = thread + lastBusy = busy + return busy + } + + /** utime + stime of a /proc stat line; fields counted after the command's closing parenthesis. */ + private fun cpuTicks(path: String): Long? = try { + val line = File(path).readText() + val fields = line.substring(line.lastIndexOf(')') + 2).split(' ') + fields[11].toLong() + fields[12].toLong() + } catch (_: Exception) { + null + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/GpuClockPin.kt b/app/src/main/java/com/droiddeck/launcher/session/GpuClockPin.kt index 8e0c7c8a02..7855c49590 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/GpuClockPin.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/GpuClockPin.kt @@ -5,18 +5,6 @@ import android.util.Log import com.droiddeck.launcher.wayland.WaylandCompositor import java.io.File -/** - * The GPU held at its top clock for a session, without root: KGSL's power-control property turned - * off on /dev/kgsl-3d0, the node the driver already opens (adrenotools' "turbo"). Left to itself the - * governor lets the GPU sit low between bursts, and a frame that lands on a low clock is a hitch; - * Bannerlator measured the clock going from 231 to 1000 MHz with this set. It costs power and heat, - * so it is opt-in, and the kernel's thermal limits still apply on top of it. - * - * The property belongs to the device, not to this process, and a killed app cannot unwind it: it - * is cleared when a session stops, and at the next app start when a marker file says this app set - * it and never cleared it - only then, so another app's own setting is not undone. - * (Bannerlator, PerfGpuTurbo.) - */ object GpuClockPin { private const val TAG = "GpuClockPin" private const val KGSL_NODE = "/dev/kgsl-3d0" @@ -28,7 +16,6 @@ object GpuClockPin { private val supported: Boolean by lazy { File(KGSL_NODE).exists() } - /** At a session's start: pins the clock when the user asked for it. The line is for the log. */ @Synchronized fun start(context: Context): String { if (!SessionPrefs.gpuClockPin(context)) return "gpu clock: governed" @@ -44,13 +31,11 @@ object GpuClockPin { } } - /** At a session's end. */ @Synchronized fun stop(context: Context) { if (pinned) clear(context) } - /** At the app's start: a process killed with the clock pinned left only the marker behind. */ @Synchronized fun clearLeftover(context: Context) { if (File(context.filesDir, MARKER).exists()) clear(context) diff --git a/app/src/main/java/com/droiddeck/launcher/session/GpuMemComponent.kt b/app/src/main/java/com/droiddeck/launcher/session/GpuMemComponent.kt index efa6a7956f..449c2bb7ff 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/GpuMemComponent.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/GpuMemComponent.kt @@ -4,32 +4,11 @@ import android.util.Log import com.droiddeck.launcher.core.SessionPart import java.io.File -/** - * The GPU memory in use, for the performance overlay's VRAM and PVRAM lines. - * - * Valve's mangoapp reads it from the kernel's gpu_mem_total tracepoint, which no Android app may - * reach, so both lines read 0. Our libtracefs for mangoapp (tools/mangoapp/libtracefs-shim.c) hands - * it what this writes to [file] - `/run/droiddeck-hud/gpu-mem` in the guest - every few seconds, in - * bytes, from the best of what KGSL lets the app read: - * - * - `/sys/class/kgsl/kgsl/page_alloc`, every GPU page on the device - what the tracepoint's total - * counts, where the policy allows it; - * - else KGSL's own accounting of each of the session's processes - * (`/sys/class/kgsl/kgsl/proc/<pid>/gpumem_mapped` and `gpumem_unmapped`); - * - else the size of the KGSL mappings in each of the session's processes' `maps` - only the - * buffers the CPU has mapped, so less than the GPU holds (about 40 % of KGSL's own count in a - * game on an AYN Thor), but always readable: every process the app can see in `/proc` is one of - * its own. `maps` rather than `smaps`, which gives the same sizes but walks page tables to do it: - * in a game, 180,000 lines and most of a second of CPU a pass. - * - * Sampled only while the overlay shows (OverlayShown). - */ class GpuMemComponent(private val file: File, private val root: File) : SessionPart() { @Volatile private var running = false private var thread: Thread? = null private var source = "" - /** True when there is a source to write from. */ fun prepare(): Boolean { val bytes = sample() ?: return false write(bytes) @@ -76,11 +55,9 @@ class GpuMemComponent(private val file: File, private val root: File) : SessionP return null } - /** The processes this app may see in /proc: Android hides every other uid's. */ private fun sessionPids(): List<String> = File("/proc").list()?.filter { it.isNotEmpty() && it.all(Char::isDigit) }.orEmpty() - /** Size of a process's mappings of the KGSL device, in kB; null where its maps cannot be read. */ private fun kgslMappedKb(pid: String): Long? = runCatching { var bytes = 0L File("/proc/$pid/maps").forEachLine { line -> @@ -95,7 +72,6 @@ class GpuMemComponent(private val file: File, private val root: File) : SessionP bytes / 1024 }.getOrNull() - /** Whole, renamed into place: the reader opens either the last value or this one. */ private fun write(bytes: Long) { try { file.parentFile?.mkdirs() @@ -109,7 +85,6 @@ class GpuMemComponent(private val file: File, private val root: File) : SessionP companion object { private const val TAG = "SessionService" private const val KGSL_ROOT = "/sys/class/kgsl/kgsl" - /** GPU memory moves slowly; a pass over every process's maps is ~40 ms of CPU in a game. */ private const val PERIOD_MS = 5_000L private fun readLong(path: String): Long? = diff --git a/app/src/main/java/com/droiddeck/launcher/session/GpuStatsComponent.kt b/app/src/main/java/com/droiddeck/launcher/session/GpuStatsComponent.kt index 205240fa28..fb6efe09f3 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/GpuStatsComponent.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/GpuStatsComponent.kt @@ -6,34 +6,15 @@ import com.droiddeck.launcher.runtime.LinuxRuntime import java.io.File import java.io.RandomAccessFile -/** - * The Adreno's stats as mangoapp (Deck mode's performance overlay) reads them. - * - * MangoHud takes an Adreno's load, clock and temperature from `gpu_busy_percentage`, `clock_mhz` - * and `temp` in `/sys/class/kgsl/kgsl-3d0`, and ends the process on one of them it may not read - - * not on one that is missing, which it skips. An enforcing SELinux policy (every retail phone) - * refuses apps some or all of KGSL's sysfs, each vendor differently, so mangoapp died on start and - * the session ran with no overlay. Where any of the three is refused, a directory of our own is - * bound there instead. A value with no - * readable source is left out, and the overlay shows no line for it. Where all three are - * readable, nothing is done. - * - * Valve's build also reads load and clock where a mainline msm kernel has them (debugfs - * `perf_now`, the GPU's devfreq `cur_freq` in Hz) - the paths LinuxRuntime.bindAdrenoStats points - * at KGSL's own files when it may - so the same values are fed there too, in the same formats - * ([binds]). - */ class GpuStatsComponent(val dir: File) : SessionPart() { @Volatile private var running = false private var thread: Thread? = null private val feeds = ArrayList<Feed>() - /** One of MangoHud's files and where its value comes from. */ private class Feed( val file: File, val source: String, val read: () -> Long?, val format: String, val percent: Boolean = false, ) - /** Where Valve's msm reader looks, and the feed for it, as host:guest binds. */ fun binds(): List<String> { val list = mutableListOf(dir.path + ":" + KGSL) if (File(dir, "perf_now").exists()) list.add(File(dir, "perf_now").path + ":" + MSM_LOAD) @@ -41,7 +22,6 @@ class GpuStatsComponent(val dir: File) : SessionPart() { return list } - /** Writes the directory; true when it should be bound over [KGSL]. */ fun prepare(): Boolean { if (!File(KGSL).exists() || MANGOHUD_FILES.none { File(KGSL, it).let { f -> f.exists() && !f.canRead() } }) return false return try { @@ -50,8 +30,6 @@ class GpuStatsComponent(val dir: File) : SessionPart() { feeds.clear() loadFeed()?.let { load -> feeds.add(load) - // KGSL's gpu_busy_percentage reads "37 %"; padded after, so a shorter value - // written over a longer one leaves no digits behind. feeds.add(Feed(File(dir, "perf_now"), load.source, load.read, "%-6s\n", percent = true)) } pick("clock_mhz", clockSources(), "%5d\n") { mhz(it) }?.let { clock -> @@ -88,7 +66,6 @@ class GpuStatsComponent(val dir: File) : SessionPart() { thread = null } - /** Load: a file that states it in percent, else KGSL's busy and total of the last sample. */ private fun loadFeed(): Feed? { pick("gpu_busy_percentage", LOAD_SOURCES, "%3d %%\n") { it.coerceIn(0, 100) }?.let { return it } val gpubusy = "$KGSL/gpubusy" @@ -102,7 +79,6 @@ class GpuStatsComponent(val dir: File) : SessionPart() { return if (read() != null) Feed(File(dir, "gpu_busy_percentage"), gpubusy, read, "%3d %%\n") else null } - /** The first of [sources] that reads as a number, its value put in MangoHud's unit by [unit]. */ private fun pick(name: String, sources: List<String>, format: String, unit: (Long) -> Long?): Feed? { for (source in sources) { val read = { firstNumber(source)?.let(unit) } @@ -111,7 +87,6 @@ class GpuStatsComponent(val dir: File) : SessionPart() { return null } - /** In place and at one length, so a reader that keeps the file open sees each value whole. */ private fun write(feed: Feed, value: Long) { try { val text = if (feed.percent) String.format(feed.format, "$value %") else String.format(feed.format, value) @@ -123,17 +98,14 @@ class GpuStatsComponent(val dir: File) : SessionPart() { companion object { private const val TAG = "SessionService" const val KGSL = "/sys/class/kgsl/kgsl-3d0" - /** Must match LinuxRuntime.bindAdrenoStats. */ const val MSM_LOAD = "/sys/kernel/debug/dri/0/perf_now" const val MSM_CLOCK = "/sys/devices/platform/soc@0/3d00000.gpu/devfreq/3d00000.gpu/cur_freq" private const val PERIOD_MS = 500L private val MANGOHUD_FILES = listOf("gpu_busy_percentage", "clock_mhz", "temp") - /** Qualcomm's own GPU summary, beside KGSL in vendor kernels, under the plain sysfs label. */ private const val QCOM_GPU = "/sys/kernel/gpu" private val LOAD_SOURCES = listOf( "$KGSL/gpu_busy_percentage", "$KGSL/devfreq/gpu_load", "$KGSL/gpuload", "$QCOM_GPU/gpu_busy", ) - /** The GPU's devfreq node is named by its register address, which differs between Snapdragons. */ private val DEVFREQ_NODES = listOf( "kgsl-3d0", "3d00000.qcom,kgsl-3d0", "2c00000.qcom,kgsl-3d0", "5000000.qcom,kgsl-3d0", "5900000.qcom,kgsl-3d0", ) @@ -152,11 +124,9 @@ class GpuStatsComponent(val dir: File) : SessionPart() { private fun tempSources(): List<String> = listOfNotNull("$KGSL/temp", "$KGSL/devfreq/temp", "$QCOM_GPU/temp", LinuxRuntime.gpuTempSource()).distinct() - /** The first integer in the file ("550", "37 %", "550000000"), or null. */ private fun firstNumber(path: String): Long? = runCatching { Regex("-?\\d+").find(File(path).readText())?.value?.toLong() }.getOrNull() - /** Hz, kHz or MHz to MHz, as the files differ; a stopped clock reads 0. */ private fun mhz(raw: Long): Long? = when { raw < 0 -> null raw > 10_000_000 -> raw / 1_000_000 @@ -164,7 +134,6 @@ class GpuStatsComponent(val dir: File) : SessionPart() { else -> raw } - /** °C or m°C to MangoHud's m°C; nothing a GPU reads at is below 1 °C or above 1000. */ private fun milliCelsius(raw: Long): Long? = when { raw <= 0 -> null raw < 1000 -> raw * 1000 diff --git a/app/src/main/java/com/droiddeck/launcher/session/HwmonComponent.kt b/app/src/main/java/com/droiddeck/launcher/session/HwmonComponent.kt index fb00489335..2cd84747d4 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/HwmonComponent.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/HwmonComponent.kt @@ -8,25 +8,6 @@ import com.droiddeck.launcher.runtime.LinuxRuntime import java.io.File import java.io.RandomAccessFile -/** - * The session's `/sys/class/hwmon`, as mangoapp (Deck mode's performance overlay) looks there. - * - * MangoHud finds a CPU's temperature by an hwmon sensor named `cpuN_thermal`, and an Adreno's - * temperature, fan and power by one whose name has `gpuss` in it - a mainline Arm kernel's names. - * An Android kernel has neither (its hwmon holds the PMIC's sensors, or nothing), and where the - * app may not list hwmon at all the overlay logged an error twice a second. So the overlay showed - * no CPU temperature and no fan. This is two sensors named so: - * - * - `hwmon0` (`cpu0_thermal`): `temp1_input` linked to a CPU thermal zone the app can read; - * - `hwmon1` (`gpuss0_thermal`): `temp1_input` linked to the GPU's zone, and `fan1_input` with - * the device's fan speed where it has a fan the app can read - an AYN handheld's tachometer - * (`/sys/class/gpio5_pwm2/speed`), or a `fan*_input` in the device's own hwmon; - * - `hwmon2` (`slg4ax46073v`): the same fan, for Valve's own Qualcomm reader (msm.cpp), which - * looks for its fan controller by that name and halves what it reads - that part reports twice - * the real speed - so this one holds twice it. - * - * Nothing in a phone's own hwmon is read by the overlay, so standing in for it loses nothing. - */ class HwmonComponent(val dir: File, private val root: File) : SessionPart() { @Volatile private var running = false private var thread: Thread? = null @@ -36,7 +17,6 @@ class HwmonComponent(val dir: File, private val root: File) : SessionPart() { private var lastRpm = 0L private var lastRpmAt = 0L - /** Writes the sensors; true when the directory should be bound over `/sys/class/hwmon`. */ fun prepare(): Boolean = try { dir.mkdirs() clear(dir) @@ -65,7 +45,6 @@ class HwmonComponent(val dir: File, private val root: File) : SessionPart() { thread = Thread({ while (running) { try { Thread.sleep(FAN_PERIOD_MS) } catch (e: InterruptedException) { break } - // A tachometer read busy-waits 100 ms in the kernel: only while the overlay shows. if (running && OverlayShown.check(root)) writeFan(sampleFan()) } }, "hwmon-fan").apply { isDaemon = true; start() } @@ -77,11 +56,6 @@ class HwmonComponent(val dir: File, private val root: File) : SessionPart() { thread = null } - /** - * The fan's speed in RPM. An AYN tachometer counts pulses over a short window per read and - * often catches none, reading 0 while the fan turns; a reading is held until a newer one - * comes or [FAN_HOLD_MS] passes with only zeros, when the fan is taken to have stopped. - */ private fun sampleFan(): Long { val now = SystemClock.elapsedRealtime() val rpm = fanSource?.let { readNumber(it) } ?: 0L @@ -94,7 +68,6 @@ class HwmonComponent(val dir: File, private val root: File) : SessionPart() { return lastRpm } - /** In place and at one length, so a reader that keeps the file open sees each value whole. */ private fun writeFan(rpm: Long) { for ((file, value) in listOf(fanFile to rpm, valveFanFile to rpm * 2)) { try { @@ -112,7 +85,6 @@ class HwmonComponent(val dir: File, private val root: File) : SessionPart() { Os.symlink(target, link.path) } - /** Only files and links are made here; deleting a link must not follow it into sysfs. */ private fun clear(root: File) { root.listFiles()?.forEach { f -> if (!java.nio.file.Files.isSymbolicLink(f.toPath()) && f.isDirectory) clear(f) @@ -122,7 +94,6 @@ class HwmonComponent(val dir: File, private val root: File) : SessionPart() { companion object { private const val TAG = "SessionService" - /** The AYN tachometer reads 0 if read again within a couple of seconds. */ private const val FAN_PERIOD_MS = 3_000L private const val FAN_HOLD_MS = 10_000L diff --git a/app/src/main/java/com/droiddeck/launcher/session/LatestRequestCoordinator.kt b/app/src/main/java/com/droiddeck/launcher/session/LatestRequestCoordinator.kt new file mode 100644 index 0000000000..611c17deca --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/LatestRequestCoordinator.kt @@ -0,0 +1,33 @@ +package com.droiddeck.launcher.session + +internal class LatestRequestCoordinator<T> { + data class Request<T>(val generation: Long, val value: T) + + private val lock = Any() + private var generation = 0L + private var running = false + private var latest: Request<T>? = null + private var pending: Request<T>? = null + + fun submit(value: T): Boolean = synchronized(lock) { + if (latest?.value != value) generation++ + pending = Request(generation, value).also { latest = it } + if (running) { + false + } else { + running = true + true + } + } + + fun takeLatest(): Request<T>? = synchronized(lock) { + pending.also { + pending = null + if (it == null) running = false + } + } + + fun isLatest(request: Request<T>): Boolean = synchronized(lock) { + request.generation == latest?.generation + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/LoadingState.kt b/app/src/main/java/com/droiddeck/launcher/session/LoadingState.kt index a190cbaef8..e7a32fbad2 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/LoadingState.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/LoadingState.kt @@ -10,45 +10,32 @@ import java.io.File import java.io.RandomAccessFile import java.nio.charset.StandardCharsets -/** - * The loading overlay's state: what to say, read out of the session log, and a clock so a user - * can see that time is passing even when the log is quiet. The runtime script marks its - * milestones with "== STEP"; the client's own bootstrap does not, but it does print its download - * progress, and lifting that out is the difference between "starting the Steam client" for three - * minutes and a percentage that moves. - */ class LoadingState(context: Context, private val steam: Boolean = true) { var visible by mutableStateOf(true) var step by mutableStateOf(context.getString(com.droiddeck.launcher.R.string.loadstate_starting)) private set - /** What [step] is about, so the screen picks its checklist stage without reading the (translated) words. */ var topic by mutableStateOf(Topic.SESSION) private set - /** [step] is a download or install line worth showing as it is, not one of the script's own notes. */ var readable by mutableStateOf(false) private set var percent by mutableIntStateOf(-1) var elapsed by mutableStateOf("") var hint by mutableStateOf("") var ended by mutableStateOf(false) - /** The technical side of an ended session (exit status, log path), under the advice in [step]. */ var endedDetail by mutableStateOf<String?>(null) - // The desktop and the emulators get their own: the Steam ones talk about Steam. private val hints = context.resources.getStringArray( if (steam) com.droiddeck.launcher.R.array.loading_hints else com.droiddeck.launcher.R.array.loading_hints_desktop, ) private val res = context.resources private val startedAt = SystemClock.elapsedRealtime() - /** Once a second: the clock and the hint. */ fun tick() { val seconds = (SystemClock.elapsedRealtime() - startedAt) / 1000 elapsed = res.getString(com.droiddeck.launcher.R.string.loadstate_elapsed, seconds / 60, seconds % 60) hint = hints[((seconds / 8) % hints.size).toInt()] } - /** A line the app itself writes (an install's progress, the session starting). */ fun say(line: String, topic: Topic, readable: Boolean) { step = line this.topic = topic @@ -62,7 +49,6 @@ class LoadingState(context: Context, private val steam: Boolean = true) { endedDetail = detail } - /** Re-reads the end of the log and updates the line and the bar. */ fun update(context: Context, log: File?) { val state = read(context, log) ?: return step = state.line @@ -73,7 +59,6 @@ class LoadingState(context: Context, private val steam: Boolean = true) { private class Line(val line: String, val percent: Int, val topic: Topic, val readable: Boolean) - /** Only the tail is read: the client alone writes megabytes an hour. */ private fun read(context: Context, log: File?): Line? { if (log == null || !log.isFile) return null val text = try { @@ -131,14 +116,9 @@ class LoadingState(context: Context, private val steam: Boolean = true) { } } - /** The checklist stages a loading line can move the screen to. */ enum class Topic { RUNTIME, SESSION, DESKTOP, STEAM, STEAM_STARTING, OTHER } companion object { - /** - * A session script "== STEP" line's topic in a Steam ([steam]) or desktop session; those - * lines are English whatever the app's language. - */ internal fun topicOf(scriptStep: String, steam: Boolean): Topic { val t = scriptStep.lowercase() return when { @@ -166,7 +146,6 @@ class LoadingState(context: Context, private val steam: Boolean = true) { return count.groupValues[1] to count.groupValues[2].toInt() * 100 / maxOf(1, count.groupValues[3].toInt()) } - /** The script's install lines are worth reading as they are; its other notes are not. */ 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") diff --git a/app/src/main/java/com/droiddeck/launcher/session/LogMigration.kt b/app/src/main/java/com/droiddeck/launcher/session/LogMigration.kt index c2b34f8165..57964944da 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/LogMigration.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/LogMigration.kt @@ -6,13 +6,6 @@ import com.droiddeck.launcher.core.FileUtils import com.droiddeck.launcher.runtime.LinuxRuntime import java.io.File -/** - * Once, on the first start of a build with private logs: the session folders, tools/ and the loose - * tool logs that earlier builds left in `Download/DroidDeck/` move into `files/logs/`. Best effort: - * an item that cannot be moved stays where it is. Moved session folders lose their old scrub markers - * ([SessionArtifacts.unmarkMoved]), so [SessionArtifacts.scrubOlder] scrubs them under the current rules. Nothing else in that folder is touched - game - * save backups (Saves/) stay public - and after this pass the app never reads it again. - */ object LogMigration { private const val TAG = "LogMigration" private const val MARKER = ".moved-from-downloads" @@ -24,7 +17,6 @@ object LogMigration { if (marker.exists()) return val legacy = LinuxRuntime.legacyLogDir() val items = if (legacy.isDirectory) legacy.listFiles() else emptyArray() - // Unreadable (no storage access yet): try again next start rather than give up on them. if (items == null) { Log.w(TAG, "$legacy cannot be listed; logs there stay until it can"); return } var moved = 0 val movedFolders = ArrayList<File>() @@ -40,15 +32,11 @@ object LogMigration { if (SessionPaths.isSessionFolder(dest)) movedFolders.add(dest) } else Log.w(TAG, "could not move ${f.name}; left in place") } - // Earlier builds scrubbed these under older rules (or not at all) and marked them done: - // without their markers, the pass over older folders that follows at the same start puts - // them through the current redactor. SessionArtifacts.unmarkMoved(movedFolders) try { marker.writeText("moved $moved item(s)\n") } catch (e: Exception) { Log.w(TAG, "could not mark the move: ${e.message}") } if (moved > 0) Log.i(TAG, "moved $moved log item(s) from $legacy into $target") } - /** A rename where it works (same volume), else a copy then the source's removal; false = left as it was. */ private fun move(src: File, dest: File): Boolean { if (src.renameTo(dest)) return true return try { diff --git a/app/src/main/java/com/droiddeck/launcher/session/NoSteamLaunch.kt b/app/src/main/java/com/droiddeck/launcher/session/NoSteamLaunch.kt new file mode 100644 index 0000000000..6787d92d22 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/NoSteamLaunch.kt @@ -0,0 +1,62 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import com.droiddeck.launcher.core.GameEnvironment +import com.droiddeck.launcher.frontend.AddedGames +import com.droiddeck.launcher.frontend.Library +import com.droiddeck.launcher.stores.epic.EpicClient + +object NoSteamLaunch { + const val PROTON_RUN = "/usr/local/bin/droiddeck-proton-run" + const val EPIC = "/usr/local/bin/droiddeck-epic" + + class Command(val program: String, val args: List<String>, val name: String) + + fun scope(game: Library.SteamGame): String? = when { + game.library == Library.EPIC_LAUNCHER -> EpicClient.shortcutAppId.toString() + game.library == Library.ADDED || game.appId > 0 -> game.profileKey + else -> null + }?.takeIf { it.isNotEmpty() && GameEnvironment.validScope(it) } + + fun enabled(config: GameEnvironment.Config, game: Library.SteamGame): Boolean = + scope(game)?.let { GameEnvironment.gameNoSteam(config, it) } == true + + fun enabled(context: Context, game: Library.SteamGame): Boolean = + scope(game) != null && runCatching { enabled(GameEnvironmentStore.read(context), game) }.getOrDefault(false) + + fun enabled(context: Context, appId: Long): Boolean = runCatching { + GameEnvironment.gameNoSteam(GameEnvironmentStore.read(context), (appId and 0xFFFFFFFFL).toString()) + }.getOrDefault(false) + + fun command(game: Library.SteamGame, added: AddedGames.Game?): Command? = when { + game.library == Library.EPIC_LAUNCHER -> Command(EPIC, listOf("run"), game.name) + game.library == Library.ADDED -> added?.let { a -> a.steamAppId?.let { Command(PROTON_RUN, listOf("--app", it.toString()), a.name) } ?: addedCommand(a) } + game.appId > 0 -> Command(PROTON_RUN, listOf("--app", game.appId.toString()), game.name) + else -> null + } + + fun addedCommand(game: AddedGames.Game): Command = Command( + PROTON_RUN, + listOf("--app", (game.appId and 0xFFFFFFFFL).toString(), "--dir", game.guestDir, "--options", game.launchOptions, "--", game.guestExe), + game.name, + ) + + fun settingsId(game: AddedGames.Game): Long = (game.steamAppId?.toLong() ?: game.appId) and 0xFFFFFFFFL + + fun addedGame(context: Context, game: Library.SteamGame): AddedGames.Game? { + val id = game.appId.toLong() and 0xFFFFFFFFL + return AddedGames.scan(context).firstOrNull { settingsId(it) == id } + } + + fun nameFor(program: String?, args: List<String>): String? = when (program) { + EPIC -> Library.EPIC_LAUNCHER_NAME + PROTON_RUN -> args.getOrNull(args.indexOf("--app") + 1)?.takeIf { args.contains("--app") }?.let { names[it] } + else -> null + } + + val names = java.util.concurrent.ConcurrentHashMap<String, String>() + + fun remember(command: Command) { + if (command.program == PROTON_RUN) command.args.getOrNull(command.args.indexOf("--app") + 1)?.let { names[it] = command.name } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/OfflineMode.kt b/app/src/main/java/com/droiddeck/launcher/session/OfflineMode.kt index 42a5a2866a..5632bd27ea 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/OfflineMode.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/OfflineMode.kt @@ -5,19 +5,6 @@ import android.util.Log import com.droiddeck.launcher.runtime.LinuxRuntime import java.io.File -/** - * Starting the Steam client signed out of Valve's servers. - * - * The client can run without a connection - installed games launch, Proton and the frame-gen are - * all local - but only if it has credentials from an earlier successful sign-in. Two keys in - * loginusers.vdf decide what it does when it cannot reach a CM: WantsOfflineMode makes it go - * offline on its own, SkipOfflineModeWarning stops it asking first. Both are read once, while the - * client starts, which is why this belongs to the main screen and not to the in-session drawer: - * changing it during a session would write the file and change nothing until the next launch. - * - * The client rewrites this file when it exits, so the request is kept as our own preference and - * written into the file again at every session start. - */ object OfflineMode { private const val TAG = "OfflineMode" private const val KEY = "steam_offline" @@ -30,9 +17,13 @@ object OfflineMode { private fun loginUsers(root: File) = File(root, "root/.local/share/Steam/config/loginusers.vdf") - /** The account the client could sign in as offline: its name, "" when it recorded none, null when there is none. */ + private fun x64LoginUsers(root: File) = File(root, "root/.droiddeck-x64/.local/share/Steam/config/loginusers.vdf") + fun account(context: Context): String? { - val file = loginUsers(LinuxRuntime.rootDir(context)) + val root = LinuxRuntime.rootDir(context) + // Until its first start the x86-64 client has no sign-in; droiddeck-steam-x64 --sync-login copies the arm64 one. + val file = x64LoginUsers(root).takeIf { SessionPrefs.activeSteamClientArch(context) == "x86_64" && it.isFile } + ?: loginUsers(root) val text = try { if (file.isFile) file.readText() else return null } catch (e: Exception) { @@ -49,14 +40,12 @@ object OfflineMode { apply(context, LinuxRuntime.rootDir(context)) } - /** - * Write the request into loginusers.vdf. Every account block gets the same answer: the client - * signs in as one of them and we have no say in which. Keys the file does not carry are added - * beside the account's name; a file without an account block is left alone, since there is - * nothing to be offline as. - */ fun apply(context: Context, root: File) { - val file = loginUsers(root) + applyTo(context, loginUsers(root)) + applyTo(context, x64LoginUsers(root)) + } + + private fun applyTo(context: Context, file: File) { if (!file.isFile) return val want = if (enabled(context)) "1" else "0" try { diff --git a/app/src/main/java/com/droiddeck/launcher/session/OrphanReaper.kt b/app/src/main/java/com/droiddeck/launcher/session/OrphanReaper.kt index 9a17a97aea..35ac169a77 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/OrphanReaper.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/OrphanReaper.kt @@ -3,26 +3,10 @@ package com.droiddeck.launcher.session import android.util.Log import java.io.File -/** - * Kills every process of this app's uid other than the app itself. - * - * A session is a tree of processes under proot, and proot dies with the app only when the app's - * own teardown runs. When the app is killed or crashes instead, the tree stays: proot holding the - * rootfs, gamescope holding the GPU, Steam holding its lock file - and the next session never - * comes up, or comes up beside a client that is already running. A user on a Thor Pro had to - * force-stop the app before every launch. Everything of ours that should be alive between - * sessions is inside the app process, so at session start anything else under our uid is a - * leftover, and this sweeps it. Each pid is checked by uid at kill time, never by name. - * - * The one exception is work the app started outside any session and is still waiting on - a - * Flatpak install from the store - registered with [keep]: that process and everything under it - * are left to finish. - */ object OrphanReaper { private const val TAG = "OrphanReaper" private val kept = java.util.concurrent.ConcurrentHashMap.newKeySet<Int>() - /** Spares [pid] and its descendants until [release]. */ fun keep(pid: Int) { if (pid > 0) kept.add(pid) } fun release(pid: Int) { kept.remove(pid) } @@ -49,14 +33,12 @@ object OrphanReaper { return killed } - /** [roots] and every process below them, by each process's parent in /proc/<pid>/stat. */ private fun descendants(roots: Set<Int>): Set<Int> { if (roots.isEmpty()) return emptySet() val parent = HashMap<Int, Int>() File("/proc").listFiles()?.forEach { entry -> val pid = entry.name.toIntOrNull() ?: return@forEach val stat = try { File(entry, "stat").readText() } catch (e: Exception) { return@forEach } - // "pid (comm) state ppid ...": comm may hold spaces and parentheses; the last ')' ends it. stat.substringAfterLast(") ").split(' ').getOrNull(1)?.toIntOrNull()?.let { parent[pid] = it } } val out = HashSet(roots) diff --git a/app/src/main/java/com/droiddeck/launcher/session/OverlayShown.kt b/app/src/main/java/com/droiddeck/launcher/session/OverlayShown.kt index 028091e44d..22f067d54d 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/OverlayShown.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/OverlayShown.kt @@ -2,12 +2,6 @@ package com.droiddeck.launcher.session import java.io.File -/** - * Whether Deck mode's performance overlay is on screen. The client sets its level by rewriting - * mangoapp's config (droiddeck-session makes it, `/tmp/mangohud.*`), and `no_display` is the - * level that hides it. The feeds whose reads cost something - the fan's tachometer busy-waits in - * the kernel, GPU memory walks every process's mappings - only run while it shows. - */ object OverlayShown { fun check(root: File): Boolean { val config = File(root, "tmp").listFiles { f -> f.name.startsWith("mangohud.") } diff --git a/app/src/main/java/com/droiddeck/launcher/session/PerfHud.kt b/app/src/main/java/com/droiddeck/launcher/session/PerfHud.kt index b3c3fd6eaa..042396b9f2 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/PerfHud.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/PerfHud.kt @@ -16,17 +16,7 @@ import java.io.File import java.util.Locale import java.util.concurrent.atomic.AtomicInteger -/** - * The numbers behind the top-right line: the game's own frame rate and, when frame generation - * is on, what the screen is actually being shown - "60 → 118 fps" is the proof that the engine - * is doing something, and "FG starting" or a reason is the proof that it is not. - * - * The base rate is the game window's own frames, counted here from the compositor's per-frame - * callback with or without an engine - what Steam's overlay counts too. The presented rate comes - * from the engine's telemetry while it generates. - */ class PerfHud(context: Context) { - /** Empty when the HUD is off or not yet started. */ var text by mutableStateOf("") private set @@ -36,19 +26,15 @@ class PerfHud(context: Context) { private var running = false private val handler = Handler(Looper.getMainLooper()) - /** The session's own switch (drawer), with the Downloads file as a device-side override. */ private val enabled: Boolean get() = SessionPrefs.hudEnabled(context) && !File(Environment.getExternalStorageDirectory(), "Download/droiddeck-no-hud").exists() - /** Told, on the main thread, when the window presenting frames changes. */ var onPresentingWindowChanged: (() -> Unit)? = null private var lastWindow: String? = null private val listener = object : WaylandCompositor.GameListener { override fun onGameSurface(window: String?, gpuName: String?) { - // gamescope forwards a fullscreen game's own buffers straight through and its composited - // output when the Steam menu is up; each is a different window here. Compositor thread. if (window != null && window != lastWindow) { lastWindow = window handler.post { onPresentingWindowChanged?.invoke() } @@ -68,7 +54,6 @@ class PerfHud(context: Context) { } } - /** Re-reads the switch: starts or stops to match it. */ fun refresh() { if (enabled) start() else stop() } diff --git a/app/src/main/java/com/droiddeck/launcher/session/PerfMode.kt b/app/src/main/java/com/droiddeck/launcher/session/PerfMode.kt index 7a44423a00..a60c160350 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/PerfMode.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/PerfMode.kt @@ -3,52 +3,31 @@ package com.droiddeck.launcher.session import android.app.Activity import android.app.GameManager import android.app.GameState +import android.content.Context import android.os.Build +import android.provider.Settings import android.util.Log +import android.view.Display -/** - * What a session tells Android about itself so the SoC is run for a game, not for an app. - * - * The manifest already makes the app a game (appCategory + game_mode_config); this is the - * per-window half, applied when the session activity is created: - * - * - NOT sustained performance mode: on Pixel and Qualcomm power HALs it caps the CPU and GPU at - * a level the device can hold indefinitely rather than holding a floor, which cost games and - * Big Picture their peak clocks. WinNative never asks for it; the thermal budget is left to - * the game; - * - the panel's fastest mode at its current size (Android 6+): a 120 Hz phone is switched to - * 120 Hz for the menu, not only when a game votes for it. With a frame cap, the fastest mode - * the cap divides evenly, so every capped frame is shown for the same number of refreshes; - * - GameManager's game state (Android 13+): "in gameplay", so an OEM framework that releases - * its boost on loading screens or menus keeps it up. - * - * Every step is version-guarded and skipped silently below its API; the returned line is what - * the session log shows, which is the first thing to read on a device that feels slow. - */ object PerfMode { private const val TAG = "PerfMode" - fun apply(a: Activity, fpsLimit: Int = 0): String { + fun apply(a: Activity, fpsLimit: Int = 0, refreshLimit: Int = 0): String { val parts = ArrayList<String>(2) - // The fastest display mode at the panel's current size. parts += try { val display = if (Build.VERSION.SDK_INT >= 30) a.display else @Suppress("DEPRECATION") a.windowManager.defaultDisplay if (display == null || Build.VERSION.SDK_INT < 23) "display mode unchanged" else { val cur = display.mode - val sameSize = display.supportedModes - .filter { it.physicalWidth == cur.physicalWidth && it.physicalHeight == cur.physicalHeight } - val best = sameSize.filter { cadenceFits(it.refreshRate, fpsLimit) }.maxByOrNull { it.refreshRate } - ?: sameSize.maxByOrNull { it.refreshRate } - if (best != null && best.modeId != cur.modeId && - (best.refreshRate > cur.refreshRate + 0.5f || !cadenceFits(cur.refreshRate, fpsLimit))) { + val cap = minOf(peakRefreshCap(a), refreshLimit.takeIf { it > 0 }?.toFloat() ?: Float.POSITIVE_INFINITY) + val best = selectMode(display.supportedModes, cur, fpsLimit, cap) + if (best != null && a.window.attributes.preferredDisplayModeId != best.modeId) { a.window.attributes = a.window.attributes.apply { preferredDisplayModeId = best.modeId } "display ${cur.refreshRate.toInt()} → ${best.refreshRate.toInt()} Hz (mode ${best.modeId})" } else "display ${cur.refreshRate.toInt()} Hz" } } catch (t: Throwable) { Log.w(TAG, "display mode", t); "display mode failed" } - // GameManager: what mode the OS put us in, and that we are playing. parts += if (Build.VERSION.SDK_INT >= 31) { val gm = a.getSystemService(GameManager::class.java) if (gm == null) "no GameManager" else { @@ -68,7 +47,23 @@ object PerfMode { return parts.joinToString(" · ") } - /** A panel rate that shows every capped frame for a whole number of refreshes (no cap: any). */ + fun peakRefreshCap(context: Context): Float { + val peak = try { + Settings.System.getFloat(context.contentResolver, "peak_refresh_rate") + } catch (_: Throwable) { 0f } + return if (peak >= 1f) peak else Float.POSITIVE_INFINITY + } + + internal fun selectMode(modes: Array<Display.Mode>, current: Display.Mode, fpsLimit: Int, cap: Float): Display.Mode? { + val sameSize = modes.filter { + it.physicalWidth == current.physicalWidth && it.physicalHeight == current.physicalHeight + } + val allowed = sameSize.filter { it.refreshRate <= cap + 0.5f } + return allowed.filter { cadenceFits(it.refreshRate, fpsLimit) }.maxByOrNull { it.refreshRate } + ?: allowed.maxByOrNull { it.refreshRate } + ?: sameSize.minByOrNull { it.refreshRate } + } + fun cadenceFits(hz: Float, fpsLimit: Int): Boolean { if (fpsLimit <= 0) return true val ratio = hz / fpsLimit diff --git a/app/src/main/java/com/droiddeck/launcher/session/PipPolicy.kt b/app/src/main/java/com/droiddeck/launcher/session/PipPolicy.kt index 5626e35e21..d2d4d49bd9 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/PipPolicy.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/PipPolicy.kt @@ -1,6 +1,5 @@ package com.droiddeck.launcher.session -/** Platform-independent eligibility; a service existing alone does not mean it has a picture. */ object PipPolicy { fun eligible(running: Boolean, frameSeen: Boolean, phase: SessionPhase, suspended: Boolean, automatic: Boolean): Boolean = running && frameSeen && phase in setOf(SessionPhase.READY, SessionPhase.SUSPENDED) && diff --git a/app/src/main/java/com/droiddeck/launcher/session/ProtonDefault.kt b/app/src/main/java/com/droiddeck/launcher/session/ProtonDefault.kt index 12a517e083..ff3214cf79 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/ProtonDefault.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/ProtonDefault.kt @@ -2,6 +2,7 @@ package com.droiddeck.launcher.session import android.content.Context import android.util.Log +import com.droiddeck.launcher.core.GameEnvironment import com.droiddeck.launcher.runtime.LinuxRuntime import org.json.JSONObject import java.io.File @@ -9,10 +10,12 @@ import java.io.File object ProtonDefault { private const val TAG = "ProtonDefault" private const val DIR = "root/.local/share/droiddeck-compat" + private const val GAMES = "games.json" data class Tool(val name: String, val display: String, val dir: String, val valve: Boolean) data class Request(val seq: Long, val valve: Boolean, val dir: String) data class State(val default: String?, val applied: Long, val live: Boolean, val pending: String?, val tools: List<Tool>) + data class GameChoice(val valve: Boolean, val dir: String) enum class Outcome { LIVE, NEXT_START, NOT_RUNNABLE } @@ -60,6 +63,33 @@ object ProtonDefault { return protons.firstOrNull { it.valve == pick.first && it.dir.name == pick.second }?.id } + internal fun parseGames(text: String?): Map<String, GameChoice?> { + val root = runCatching { JSONObject(text ?: "") }.getOrNull() ?: return emptyMap() + if (root.optInt("version", 0) != 1) return emptyMap() + val games = root.optJSONObject("games") ?: return emptyMap() + return buildMap { + games.keys().forEach { id -> + if (!GameEnvironment.validScope(id)) return@forEach + if (games.isNull(id)) { + put(id, null) + } else { + val value = games.optJSONObject(id) ?: return@forEach + val gameDir = value.optString("dir") + val valve = value.opt("valve") + if (gameDir.isNotEmpty() && valve is Boolean) put(id, GameChoice(valve, gameDir)) + } + } + } + } + + fun gameChoice(context: Context, scope: String): GameChoice? = + parseGames(read(File(dir(context), GAMES)))[scope] + + fun gameSelectedId(context: Context, scope: String, protons: List<ComponentsManager.Proton>): String? { + val pick = gameChoice(context, scope) ?: return null + return protons.firstOrNull { it.valve == pick.valve && it.dir.name == pick.dir }?.id + } + internal fun nextSeq(now: Long, state: State, previous: Request?): Long = maxOf(now, state.applied + 1, (previous?.seq ?: 0) + 1) @@ -83,4 +113,33 @@ object ProtonDefault { val tool = state.tools.firstOrNull { it.valve == proton.valve && it.dir == proton.dir.name } return if (SessionState.running && state.live && (tool == null || state.pending != tool.name)) Outcome.LIVE else Outcome.NEXT_START } + + @Synchronized + fun requestGame(context: Context, scope: String, proton: ComponentsManager.Proton?): Outcome { + require(GameEnvironment.validScope(scope)) + val d = dir(context) + val choices = parseGames(read(File(d, GAMES))).toMutableMap() + choices[scope] = proton?.let { GameChoice(it.valve, it.dir.name) } + val games = JSONObject() + choices.forEach { (id, choice) -> + games.put(id, choice?.let { JSONObject().put("valve", it.valve).put("dir", it.dir) } ?: JSONObject.NULL) + } + val staged = File(d, "$GAMES.staged") + try { + d.mkdirs() + staged.writeText(JSONObject().put("version", 1).put("games", games).toString(1) + "\n") + if (!staged.renameTo(File(d, GAMES))) throw java.io.IOException("rename failed") + } catch (e: Exception) { + staged.delete() + Log.w(TAG, "could not write the per-game Proton request", e) + throw e + } + val state = state(context) + val tool = proton?.let { selected -> state.tools.firstOrNull { it.valve == selected.valve && it.dir == selected.dir.name } } + return if (SessionState.running && state.live && (proton == null || tool != null && state.pending != tool.name)) { + Outcome.LIVE + } else { + Outcome.NEXT_START + } + } } diff --git a/app/src/main/java/com/droiddeck/launcher/session/ProtonExtras.kt b/app/src/main/java/com/droiddeck/launcher/session/ProtonExtras.kt index 2682108887..42c0deeb6f 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/ProtonExtras.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/ProtonExtras.kt @@ -10,38 +10,120 @@ import com.droiddeck.launcher.core.FileUtils import com.droiddeck.launcher.runtime.LinuxRuntime import java.io.File import org.json.JSONArray +import org.json.JSONObject -/** Immediate download and installation of the optional ARM64 Proton builds. */ object ProtonExtras { private const val TAG = "ProtonExtras" private const val NEED_BYTES = 4L * 1024 * 1024 * 1024 private const val RELEASES = "https://api.github.com/repos/%s/releases?per_page=15" + const val CHECK_EVERY_MS = 6L * 60 * 60 * 1000 @Volatile var installInProgress = false private set class Tool(val id: String, val name: String, val prefix: String, val repo: String, val assetPattern: Regex) - /** [sha256] from GitHub's asset digest; [sha512] the URL of a checksum file published beside it. */ - private data class Asset(val tag: String, val name: String, val url: String, val sha512: String?, val size: Long, + internal data class Asset(val tag: String, val name: String, val url: String, val sha512: String?, val size: Long, val sha256: String? = null) val tools = listOf( Tool("ge", "GE-Proton", "GE-Proton", "GloriousEggroll/proton-ge-custom", Regex("aarch64\\.tar\\.(gz|xz)$")), Tool("cachyos", "proton-cachyos", "proton-cachyos", "CachyOS/proton-cachyos", Regex("arm64\\.tar\\.(gz|xz)$")), + Tool("droiddeck", "DroidDeck-Proton", "DroidDeck-Proton", "Droid-Deck/DroidDeck-Proton", Regex("aarch64\\.tar\\.(gz|xz)$")), ) private fun home(context: Context) = File(LinuxRuntime.rootDir(context), "root") private fun requests(context: Context) = File(home(context), ".bl-proton-extra") private fun toolsDir(context: Context) = File(home(context), ".local/share/Steam/compatibilitytools.d") + private fun releasesFile(context: Context) = File(context.filesDir, "proton-extras.json") + private fun latestFile(context: Context) = File(context.filesDir, "proton-latest.json") - /** The installed build's directory name (e.g. GE-Proton11-7), or null. */ - fun installed(context: Context, tool: Tool): String? = - toolsDir(context).listFiles() + fun installed(context: Context, tool: Tool): String? = installedIn(toolsDir(context), tool).lastOrNull() + + fun installedAll(context: Context, tool: Tool): List<String> = installedIn(toolsDir(context), tool) + + internal fun installedIn(dir: File, tool: Tool): List<String> = + dir.listFiles() ?.filter { it.isDirectory && it.name.startsWith(tool.prefix) && File(it, "toolmanifest.vdf").isFile } - ?.maxByOrNull { it.name }?.name + ?.map { it.name } + ?.sortedWith { a, b -> compareVersions(a, b) } + ?: emptyList() + + private val ARCH = Regex("(?i)aarch64|arm64|x86_64|x86-64|amd64") + private val NUMBER = Regex("\\d+") + + internal fun versionKey(name: String): List<Long> = + NUMBER.findAll(ARCH.replace(name, " ")).mapNotNull { it.value.toLongOrNull() }.toList() + + internal fun compareVersions(a: String, b: String): Int { + val x = versionKey(a) + val y = versionKey(b) + for (i in 0 until minOf(x.size, y.size)) if (x[i] != y[i]) return x[i].compareTo(y[i]) + return if (x.size != y.size) x.size.compareTo(y.size) else a.compareTo(b) + } + + internal fun updateFor(installed: List<String>, latest: String?): String? { + if (latest == null || installed.isEmpty()) return null + val newest = installed.maxWithOrNull { a, b -> compareVersions(a, b) } ?: return null + val x = versionKey(latest) + val y = versionKey(newest) + for (i in 0 until minOf(x.size, y.size)) if (x[i] != y[i]) return if (x[i] > y[i]) latest else null + return if (x.size > y.size) latest else null + } + + fun installedTags(context: Context, tool: Tool): List<String> { + val recorded = readJson(releasesFile(context)) + return installedAll(context, tool).map { recorded.optString(it).ifEmpty { it } } + } + + fun update(context: Context, tool: Tool): String? = updateFor(installedTags(context, tool), cachedLatest(context, tool)) + + fun cachedLatest(context: Context, tool: Tool): String? = + readJson(latestFile(context)).optJSONObject(tool.id)?.optString("tag")?.ifEmpty { null } + + private val checkLock = Any() + private const val RETRY_MS = 15L * 60 * 1000 + private var lastAttempt = 0L + + fun checkLatest(context: Context, force: Boolean = false, now: Long = System.currentTimeMillis()): Boolean { + synchronized(checkLock) { + val file = latestFile(context) + val cache = readJson(file) + val due = tools.filter { tool -> + val at = cache.optJSONObject(tool.id)?.optLong("at", 0L) ?: 0L + force || (now - at) !in 0 until CHECK_EVERY_MS + } + if (due.isEmpty() || !force && (now - lastAttempt) in 0 until RETRY_MS) return false + lastAttempt = now + for (tool in due) { + val tag = findLatestAsset(tool)?.tag ?: continue + cache.put(tool.id, JSONObject().put("tag", tag).put("at", now)) + } + runCatching { file.writeText(cache.toString()) } + return true + } + } + + private fun record(context: Context, tool: Tool, dir: String?, tag: String) { + runCatching { + val latest = readJson(latestFile(context)) + val known = latest.optJSONObject(tool.id)?.optString("tag") + if (known.isNullOrEmpty() || compareVersions(tag, known) >= 0) { + latest.put(tool.id, JSONObject().put("tag", tag).put("at", System.currentTimeMillis())) + latestFile(context).writeText(latest.toString()) + } + if (dir != null) { + val releases = readJson(releasesFile(context)) + val present = toolsDir(context).list()?.toSet() ?: emptySet() + releases.keys().asSequence().toList().filter { it !in present }.forEach { releases.remove(it) } + releasesFile(context).writeText(releases.put(dir, tag).toString()) + } + }.onFailure { Log.w(TAG, "record ${tool.id} $tag", it) } + } + + private fun readJson(file: File): JSONObject = + runCatching { JSONObject(FileUtils.readString(file) ?: "{}") }.getOrDefault(JSONObject()) - /** A request left by an earlier app version, still consumed by the session shim. */ fun queued(context: Context, tool: Tool): Boolean = requestLines(context).any { it.trim() == tool.id || it.trim().startsWith(tool.id + " ") } @@ -52,12 +134,15 @@ object ProtonExtras { else file.writeText(lines.joinToString("\n") + "\n") } - /** Deletes the installed build; Steam discovers its absence on its next start. */ - fun remove(context: Context, tool: Tool) { - installed(context, tool)?.let { File(toolsDir(context), it).deleteRecursively() } + 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() + } + + fun removeOlder(context: Context, tool: Tool) { + installedAll(context, tool).dropLast(1).forEach { File(toolsDir(context), it).deleteRecursively() } } - /** Downloads, verifies and registers the latest build without waiting for another session. */ @Synchronized fun install(context: Context, tool: Tool, onProgress: (String, Int) -> Unit): String? { if (installInProgress) return context.getString(R.string.pextra_busy) @@ -82,7 +167,7 @@ object ProtonExtras { onProgress(downloading, 0) var downloaded = false for (attempt in 0 until 5) { - downloaded = Downloader.downloadFile(asset.url, archive, true) { fraction -> + downloaded = Downloader.downloadFile(asset.url, archive, true, asset.sha256) { fraction -> onProgress(downloading, if (fraction < 0) -1 else (fraction * 100f).toInt().coerceIn(0, 100)) } if (downloaded) break @@ -103,13 +188,11 @@ object ProtonExtras { return context.getString(R.string.pextra_incomplete) } - // One checksum has to be found and has to match: GitHub's sha256 digest, else the - // release's own sha512 file. A download neither vouches for is not installed. onProgress(context.getString(R.string.pextra_verifying), -1) val verified = when { asset.sha256 != null -> asset.sha256.equals(Hashes.sha256(archive), ignoreCase = true) asset.sha512 != null -> { - val expected = Downloader.downloadString(asset.sha512)?.let { Regex("(?i)\\b[0-9a-f]{128}\\b").find(it)?.value } + val expected = Downloader.downloadDirect(asset.sha512)?.let { Regex("(?i)\\b[0-9a-f]{128}\\b").find(it)?.value } ?: return context.getString(R.string.pextra_checksum_unreadable) expected.equals(Hashes.sha512(archive), ignoreCase = true) } @@ -142,12 +225,14 @@ object ProtonExtras { .redirectErrorStream(true) val hostEnv = process.environment() hostEnv["PROOT_LOADER"] = LinuxRuntime.prootLoader(context).path - hostEnv["PROOT_TMP_DIR"] = context.cacheDir.path + hostEnv["PROOT_TMP_DIR"] = LinuxRuntime.prootTempDir(context).path LinuxRuntime.prootLibraryPath(context).takeIf { it.isNotEmpty() }?.let { hostEnv["LD_LIBRARY_PATH"] = it } val child = process.start() + var placed: String? = null child.inputStream.bufferedReader().useLines { lines -> lines.forEach { line -> Log.i(TAG, line) + line.substringAfter("droiddeck-proton-extra: installed ", "").takeIf { it.isNotEmpty() }?.let { placed = it } if (line.contains("unpacking", ignoreCase = true) || line.contains("adopted", ignoreCase = true)) { onProgress(installing, -1) } @@ -158,6 +243,7 @@ object ProtonExtras { else { archive.delete() unqueue(context, tool) + record(context, tool, placed, asset.tag) if (EsyncPacks.enabled(context)) { onProgress(context.getString(R.string.esync_fetching), -1) try { @@ -177,32 +263,35 @@ object ProtonExtras { private fun findLatestAsset(tool: Tool): Asset? { val releases = Downloader.downloadString(RELEASES.format(tool.repo)) ?: return null return try { - val array = JSONArray(releases) - for (i in 0 until array.length()) { - val release = array.getJSONObject(i) - if (release.optBoolean("draft", false)) continue - val assets = release.optJSONArray("assets") ?: continue - val entries = (0 until assets.length()).map { assets.getJSONObject(it) } - val archive = entries.sortedBy { it.optString("name") }.firstOrNull { tool.assetPattern.containsMatchIn(it.optString("name")) } ?: continue - val name = archive.optString("name") - val stem = name.substringBefore(".tar") - val checksum = entries.firstOrNull { - it.optString("name").startsWith(stem) && it.optString("name").contains("sha512", ignoreCase = true) - }?.optString("browser_download_url")?.takeIf { it.startsWith("http") } - return Asset( - release.optString("tag_name"), name, - archive.optString("browser_download_url").takeIf { it.startsWith("http") } ?: continue, checksum, - archive.optLong("size", 0L), - Hashes.githubSha256(archive.optString("digest")), - ) - } - null + pickAsset(tool, JSONArray(releases)) } catch (e: Exception) { Log.w(TAG, "release metadata for ${tool.id}", e) null } } + internal fun pickAsset(tool: Tool, array: JSONArray): Asset? { + for (i in 0 until array.length()) { + val release = array.getJSONObject(i) + if (release.optBoolean("draft", false) || release.optBoolean("prerelease", false)) continue + val assets = release.optJSONArray("assets") ?: continue + val entries = (0 until assets.length()).map { assets.getJSONObject(it) } + val archive = entries.sortedBy { it.optString("name") }.firstOrNull { tool.assetPattern.containsMatchIn(it.optString("name")) } ?: continue + val name = archive.optString("name") + val stem = name.substringBefore(".tar") + val checksum = entries.firstOrNull { + it.optString("name").startsWith(stem) && it.optString("name").contains("sha512", ignoreCase = true) + }?.optString("browser_download_url")?.takeIf { it.startsWith("http") } + return Asset( + release.optString("tag_name"), name, + archive.optString("browser_download_url").takeIf { it.startsWith("http") } ?: continue, checksum, + archive.optLong("size", 0L), + Hashes.githubSha256(archive.optString("digest")), + ) + } + return null + } + private fun requestLines(context: Context): List<String> = FileUtils.readString(requests(context))?.lines()?.filter { it.isNotBlank() } ?: emptyList() } diff --git a/app/src/main/java/com/droiddeck/launcher/session/QuestExperimental.kt b/app/src/main/java/com/droiddeck/launcher/session/QuestExperimental.kt new file mode 100644 index 0000000000..dc992c5bfc --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/QuestExperimental.kt @@ -0,0 +1,78 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import android.os.Build +import android.util.Log +import com.droiddeck.launcher.BuildConfig +import java.io.File + +object QuestExperimental { + private const val TAG = "QuestExperimental" + const val DRIVER = "turnip25.1.0-quest1" + const val DRIVER_A6XX = "turnip26.3.0-quest2" + + internal fun quest2(model: String, device: String, manufacturer: String): Boolean = + model.equals("Quest 2", ignoreCase = true) || + ((manufacturer.equals("Oculus", ignoreCase = true) || manufacturer.equals("Meta", ignoreCase = true)) && + device == "hollywood") + + internal fun supported(model: String, device: String, manufacturer: String): Boolean = + quest2(model, device, manufacturer) || model.equals("Quest 3", ignoreCase = true) || model.equals("Quest 3S", ignoreCase = true) || + ((manufacturer.equals("Oculus", ignoreCase = true) || manufacturer.equals("Meta", ignoreCase = true)) && + (device == "eureka" || device == "panther")) + + fun isSupported(): Boolean = supported(Build.MODEL, Build.DEVICE, Build.MANUFACTURER) + fun isQuest2(): Boolean = quest2(Build.MODEL, Build.DEVICE, Build.MANUFACTURER) + + fun defaultAndroidDriver(): String? = when { + !isSupported() -> null + isQuest2() -> DRIVER_A6XX + else -> DRIVER + } + + fun applyAutoDrivers(context: Context): Boolean { + if (SessionPrefs.gpuDriverMode(context) != SessionPrefs.GPU_DRIVERS_AUTO) return false + val driver = defaultAndroidDriver() ?: return false + context.getSharedPreferences("session", Context.MODE_PRIVATE).edit() + .putString("androidDriver", driver) + .putString("linuxDriver", "") + .apply() + return true + } + + fun initialize(context: Context) { + if (!isSupported()) return + val prefs = context.getSharedPreferences("session", Context.MODE_PRIVATE) + val defaultsKey = if (isQuest2()) "quest2DefaultsV1" else "questDefaultsV1" + if (!prefs.getBoolean(defaultsKey, false)) { + prefs.edit() + .putString("gpuDriverMode", SessionPrefs.GPU_DRIVERS_MANUAL) + .putString("androidDriver", if (isQuest2()) DRIVER_A6XX else DRIVER) + .putString("linuxDriver", "") + .putBoolean("hdr.steam", true) + .putBoolean(defaultsKey, true) + .apply() + } + val report = buildString { + appendLine("DroidDeck Quest Experimental ${BuildConfig.VERSION_NAME}") + appendLine("package=${context.packageName}") + appendLine("manufacturer=${Build.MANUFACTURER} model=${Build.MODEL}") + appendLine("device=${Build.DEVICE} board=${Build.BOARD} hardware=${Build.HARDWARE}") + appendLine("android=${Build.VERSION.RELEASE} sdk=${Build.VERSION.SDK_INT}") + appendLine("abis=${Build.SUPPORTED_ABIS.joinToString()}") + for (name in listOf("gpu_model", "gpu_chipid")) { + val value = runCatching { File("/sys/class/kgsl/kgsl-3d0/$name").readText().trim() } + .getOrDefault("unavailable") + appendLine("$name=$value") + } + appendLine("driverMode=${SessionPrefs.gpuDriverMode(context)}") + appendLine("androidDriver=${SessionPrefs.androidDriver(context)}") + appendLine("steamSurfaceControlWorkaround=${SessionPrefs.hdr(context, "steam")}") + appendLine("GPUOBJ fallback installed in Android driver and ARM64 libblsession") + appendLine("Experimental Quest 2/3/3S compatibility; 2D panel application") + } + Log.i(TAG, report) + runCatching { File(context.filesDir, "quest-startup.txt").writeText(report) } + .onFailure { Log.w(TAG, "Could not write startup report", it) } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/RivalClients.kt b/app/src/main/java/com/droiddeck/launcher/session/RivalClients.kt index 75973e467a..0d7bd22cc1 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/RivalClients.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/RivalClients.kt @@ -4,25 +4,11 @@ import android.app.ActivityManager import android.content.Context import android.util.Log -/** - * Other apps on the device that sign into the user's Steam account with their own client. Steam - * allows one session per account: the moment one of them signs in, ours is signed out - which - * shows up as "Session Replaced" in the client's log 2-3 seconds after every login, and looks - * like a bug in this app. - * - * Installed is the most a normal app can know (since Android 7 `getRunningAppProcesses()` returns - * only the caller's own), so the list is checked for presence and then asked to stop. - * `killBackgroundProcesses` is a normal permission: it ends an app's background processes and - * leaves anything in the foreground alone - and background is exactly the case that keeps - * happening, because GameHub declares boot receivers and is running from the moment the phone - * starts without ever having been opened. Telling someone to close an app they never opened is - * not much help. Ported from Bannerlator's Linux session (GPL-3.0). - */ object RivalClients { private const val TAG = "RivalClients" private val PACKAGES = arrayOf( - "com.xiaoji.egggame", // GameHub + "com.xiaoji.egggame", ) fun installed(context: Context): List<String> = @@ -32,10 +18,6 @@ object RivalClients { fun name(pkg: String): String = if (pkg == "com.xiaoji.egggame") "GameHub" else pkg - /** - * Stop the installed rivals' background processes before the client starts. A rival in the - * foreground survives this. The activity service call and its log messages are unchanged. - */ fun stopBeforeSession(context: Context) { val rivals = installed(context) if (rivals.isEmpty()) return diff --git a/app/src/main/java/com/droiddeck/launcher/session/RumbleComponent.kt b/app/src/main/java/com/droiddeck/launcher/session/RumbleComponent.kt index 4adf1c0a56..f2b1c0a1e6 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/RumbleComponent.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/RumbleComponent.kt @@ -4,6 +4,9 @@ import android.net.LocalServerSocket import android.content.SharedPreferences import android.os.Build import android.os.CombinedVibration +import android.os.Handler +import android.os.HandlerThread +import android.os.Looper import android.os.SystemClock import android.os.VibrationEffect import android.os.Vibrator @@ -13,39 +16,28 @@ import android.view.InputDevice import androidx.annotation.RequiresApi import com.droiddeck.launcher.core.SessionPart import com.droiddeck.launcher.input.ControllerPrefs +import com.droiddeck.launcher.input.JoyCon import com.droiddeck.launcher.input.PadBridge import java.io.DataInputStream import kotlin.math.max -/** - * Rumble for the pad, on the motors in the player's hands. - * - * When a game plays a force-feedback effect on the fake pad (or Steam Input sends the Deck's - * rumble report), the fake evdev layer inside the guest connects to the abstract socket [NAME] - * and sends one packet: strong, weak, duration in ms and the pad slot, four little-endian 16-bit - * values. This listens for those and plays the effect on the physical controller playing in that - * slot (PadBridge.controllerForSlot) when Android exposes its motors - strong and weak separately - * where it has two - and otherwise on the device's own vibrator, with the stronger motor's - * strength: the on-screen pad, or a controller without rumble. Best effort both ways: a missing - * listener costs the guest nothing, and a bad packet is dropped. - */ class RumbleComponent : SessionPart() { @Volatile private var server: LocalServerSocket? = null private var phone: Motors? = null - /** Per slot, where its last effect went, so the next one (or a stop) can end it there. */ private val playing = HashMap<Int, Motors>() - /** Per slot, the last effect handed to the motors and when, to drop the repeats games stream. */ - private val sent = HashMap<Int, Sent>() - /** Each controller's motors, looked up once; null when it has none. */ + private val effects = HashMap<Int, Effect>() private val controllers = HashMap<Int, Motors?>() + private val joyConPairs = HashMap<Long, Motors>() private var preferences: SharedPreferences? = null private var enabled = false + private var motorThread: HandlerThread? = null + private var handler: Handler? = null private val preferenceListener = SharedPreferences.OnSharedPreferenceChangeListener { _, key -> if (key == null || key == "rumble") refreshEnabled() } - /** The motors of the controller with this input device id, or null when it has none. Tests swap it. */ internal var controllerMotors: (Int) -> Motors? = ::lookupController + internal var motorLooper: Looper? = null @Synchronized private fun refreshEnabled() { enabled = app()?.let { ControllerPrefs.rumbleEnabled(it) } == true @@ -58,6 +50,7 @@ class RumbleComponent : SessionPart() { val vibrator = if (Build.VERSION.SDK_INT >= 31) ctx.getSystemService(VibratorManager::class.java)?.defaultVibrator else @Suppress("DEPRECATION") ctx.getSystemService(Vibrator::class.java) phone = vibrator?.takeIf { it.hasVibrator() }?.let { PhoneMotors(it) } + handler = Handler(motorLooper ?: HandlerThread("rumble-motors").also { motorThread = it; it.start() }.looper) preferences = ControllerPrefs.prefs(ctx).also { it.registerOnSharedPreferenceChangeListener(preferenceListener) } refreshEnabled() server = s @@ -69,9 +62,8 @@ class RumbleComponent : SessionPart() { DataInputStream(client.inputStream).readFully(bytes) buzz(u16(bytes, 0), u16(bytes, 2), u16(bytes, 4), u16(bytes, 6)) } catch (e: Exception) { - // A partial packet or a closed peer: nothing to play. } finally { - try { client.close() } catch (e: Exception) { /* already gone */ } + try { client.close() } catch (e: Exception) { } } } }, "rumble").apply { isDaemon = true; start() } @@ -83,11 +75,15 @@ class RumbleComponent : SessionPart() { preferences = null enabled = false cancelAll() + handler = null + motorThread?.quitSafely() + motorThread = null phone = null controllers.clear() + joyConPairs.clear() val s = server server = null - try { s?.close() } catch (e: Exception) { /* the accept loop ends on the next wake */ } + try { s?.close() } catch (e: Exception) { } } private fun u16(b: ByteArray, at: Int): Int = (b[at].toInt() and 0xFF) or ((b[at + 1].toInt() and 0xFF) shl 8) @@ -98,43 +94,94 @@ class RumbleComponent : SessionPart() { val previous = playing[slot] if (target !== previous) { previous?.cancel() - sent.remove(slot) + forget(slot) if (target == null) playing.remove(slot) else playing[slot] = target target?.let { Log.i(TAG, "rumble: slot $slot playing on ${it.name}") } } if (target == null) return - if ((strong == 0 && weak == 0) || ms == 0) { target.cancel(); sent.remove(slot); return } - // Games re-send their effect every frame; restarting the motor that often floods the haptics - // driver. ponytail: a change inside MIN_GAP_MS is dropped, the game's next packet brings it. + if ((strong == 0 && weak == 0) || ms == 0) { target.cancel(); forget(slot); return } + val handler = handler ?: return + val effect = effects.getOrPut(slot) { Effect(slot) } + effect.want(strong, weak, ms) val now = SystemClock.uptimeMillis() - val last = sent[slot] - if (last != null && (now - last.at < MIN_GAP_MS || (last.strong == strong && last.weak == weak && now < last.until))) return - val duration = ms.toLong().coerceIn(1L, 5000L) + if (effect.playing(now)) return + handler.removeCallbacks(effect) + val wait = effect.at + MIN_GAP_MS - now + if (wait > 0) handler.postDelayed(effect, wait) else play(effect) + } + + @Synchronized private fun play(effect: Effect) { + val target = playing[effect.slot] + if (target == null || effects[effect.slot] !== effect) return + val duration = if (effect.hold) HOLD_EFFECT_MS else effect.ms.toLong().coerceIn(1L, 5000L) try { - target.play(strong, weak, duration) - sent[slot] = Sent(strong, weak, now, now + duration) + target.play(effect.strong, effect.weak, duration) + effect.played(SystemClock.uptimeMillis(), duration) + if (effect.hold) handler?.postDelayed(effect, KEEPALIVE_MS) } catch (e: Exception) { Log.w(TAG, "rumble: ${target.name}: $e") } } - /** The motors of the controller playing in this slot when it has any, else the phone's. */ + private fun forget(slot: Int) { + effects.remove(slot)?.let { handler?.removeCallbacks(it) } + } + private fun target(slot: Int): Motors? { + JoyCon.vrRumbleDevice(slot)?.let { hand -> return if (hand == PadBridge.NO_CONTROLLER) null else motors(hand) } + val left = PadBridge.joyConForSlot(slot, JoyCon.LEFT) + val right = PadBridge.joyConForSlot(slot, JoyCon.RIGHT) + if (left != PadBridge.NO_CONTROLLER && right != PadBridge.NO_CONTROLLER) { + val key = (left.toLong() shl 32) or (right.toLong() and 0xFFFFFFFFL) + joyConPairs[key]?.let { return it } + val l = motors(left) + val r = motors(right) + if (l != null && r != null) return JoyConPairMotors(l, r).also { joyConPairs[key] = it } + } val id = PadBridge.controllerForSlot(slot) if (id == PadBridge.NO_CONTROLLER) return phone + return motors(id) ?: phone + } + + private fun motors(id: Int): Motors? { if (!controllers.containsKey(id)) controllers[id] = try { controllerMotors(id) } catch (e: Exception) { null } - return controllers[id] ?: phone + return controllers[id] } private fun cancelAll() { playing.values.toSet().forEach { it.cancel() } playing.clear() - sent.clear() + effects.values.forEach { handler?.removeCallbacks(it) } + effects.clear() } - private data class Sent(val strong: Int, val weak: Int, val at: Long, val until: Long) + private inner class Effect(val slot: Int) : Runnable { + var strong = 0 + var weak = 0 + var ms = 0 + var at = -MIN_GAP_MS + private var playedStrong = 0 + private var playedWeak = 0 + private var playedMs = 0 + private var until = 0L + val hold get() = ms == HOLD_MS + + fun want(strong: Int, weak: Int, ms: Int) { this.strong = strong; this.weak = weak; this.ms = ms } + + fun playing(now: Long) = playedMs != 0 && playedStrong == strong && playedWeak == weak && playedMs == ms && + (hold || now < until) + + fun played(now: Long, duration: Long) { + playedStrong = strong + playedWeak = weak + playedMs = ms + at = now + until = now + duration + } + + override fun run() = play(this) + } - /** One place an effect can play. Strengths are the evdev 0..65535 magnitudes. */ internal interface Motors { val name: String fun play(strong: Int, weak: Int, ms: Long) @@ -147,7 +194,6 @@ class RumbleComponent : SessionPart() { override fun cancel() = vibrator.cancel() } - /** Android 12+: each of the pad's motors on its own, the lower id being the strong one. */ @RequiresApi(31) private class PadMotors(override val name: String, private val manager: VibratorManager, private val ids: IntArray) : Motors { override fun play(strong: Int, weak: Int, ms: Long) { @@ -159,23 +205,54 @@ class RumbleComponent : SessionPart() { any = true } if (ids.size >= 2) { add(ids[0], strong); add(ids[1], weak) } else add(ids[0], max(strong, weak)) - if (any) manager.vibrate(combined.combine()) else manager.cancel() + if (any) manager.vibrate(combined.combine()) else cancel() } + + // Some vendors' input-device vibrator HALs (Samsung's) don't halt a Bluetooth pad's running + // effect on cancel(), but a new effect always replaces it. + override fun cancel() { + val supersede = CombinedVibration.startParallel() + ids.forEach { supersede.addVibrator(it, VibrationEffect.createOneShot(1L, 1)) } + manager.vibrate(supersede.combine()) + manager.cancel() + } + } + + @RequiresApi(31) + private class JoyConMotors(override val name: String, private val manager: VibratorManager) : Motors { + override fun play(strong: Int, weak: Int, ms: Long) = + manager.vibrate(CombinedVibration.createParallel(oneShot(manager.defaultVibrator, max(strong, weak), ms))) override fun cancel() = manager.cancel() } - /** Before Android 12 a pad has one vibrator. */ + private class JoyConPairMotors(private val left: Motors, private val right: Motors) : Motors { + override val name = "${left.name} and ${right.name}" + override fun play(strong: Int, weak: Int, ms: Long) { + if (strong == 0) left.cancel() else left.play(strong, 0, ms) + if (weak == 0) right.cancel() else right.play(0, weak, ms) + } + override fun cancel() { + left.cancel() + right.cancel() + } + } + private class LegacyPadMotors(override val name: String, private val vibrator: Vibrator) : Motors { override fun play(strong: Int, weak: Int, ms: Long) = vibrator.vibrate(oneShot(vibrator, max(strong, weak), ms)) - override fun cancel() = vibrator.cancel() + override fun cancel() { + vibrator.vibrate(VibrationEffect.createOneShot(1L, 1)) + vibrator.cancel() + } } companion object { private const val TAG = "SessionService" - /** Must match the fake evdev layer (fakeinput_steam.cpp). */ const val NAME = "droiddeck-rumble" - /** The shortest time between two effects started on one slot's motors. */ const val MIN_GAP_MS = 50L + // Must match RUMBLE_HOLD_MS in fakeinput_steam.cpp. + const val HOLD_MS = 0xFFFF + const val HOLD_EFFECT_MS = 2000L + const val KEEPALIVE_MS = 1500L private fun oneShot(vibrator: Vibrator, strength: Int, ms: Long): VibrationEffect { val amplitude = if (vibrator.hasAmplitudeControl()) (strength * 255L / 65535L).toInt().coerceIn(1, 255) @@ -189,7 +266,8 @@ class RumbleComponent : SessionPart() { if (Build.VERSION.SDK_INT >= 31) { val manager = device.vibratorManager val ids = manager.vibratorIds.sortedArray() - return if (ids.isEmpty()) null else PadMotors(name, manager, ids) + if (ids.isEmpty()) return null + return if (JoyCon.side(device) >= 0) JoyConMotors(name, manager) else PadMotors(name, manager, ids) } @Suppress("DEPRECATION") val vibrator = device.vibrator diff --git a/app/src/main/java/com/droiddeck/launcher/session/SecondaryLibrary.kt b/app/src/main/java/com/droiddeck/launcher/session/SecondaryLibrary.kt index 10692167dd..53fc319c26 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SecondaryLibrary.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SecondaryLibrary.kt @@ -6,8 +6,8 @@ import java.nio.file.LinkOption.NOFOLLOW_LINKS import java.nio.file.StandardCopyOption.COPY_ATTRIBUTES import java.security.MessageDigest import java.util.Locale +import java.util.UUID -/** Android shared storage cannot create the links in Wine prefixes or native Steam depots. */ object SecondaryLibrary { private val bootstrapTools = linkedMapOf( "4185400" to "SteamLinuxRuntime_4-arm64", @@ -17,6 +17,34 @@ object SecondaryLibrary { "3127680" to "FEX-Emu", ) + fun contentPath(library: File): File { + val path = library.absolutePath + if (!path.startsWith("/storage/")) return library + val candidate = File("/mnt/media_rw/" + path.removePrefix("/storage/")) + return verifiedAlias(library, candidate) + } + + internal fun verifiedAlias( + library: File, + candidate: File, + readableAndWritable: (File) -> Boolean = { it.canRead() && it.canWrite() }, + ): File { + if (!candidate.isDirectory || !readableAndWritable(candidate)) return library + var probe: File? = null + return try { + val created = File.createTempFile(".droiddeck-path-", ".probe", candidate) + probe = created + val token = UUID.randomUUID().toString() + created.writeText(token) + val visible = File(library, created.name) + if (visible.readText() == token && visible.delete() && !created.exists()) candidate else library + } catch (_: Exception) { + library + } finally { + probe?.delete() + } + } + fun privateRoot(files: File, library: File): File { val digest = MessageDigest.getInstance("SHA-256").digest(library.canonicalPath.toByteArray()) .joinToString("") { "%02x".format(it.toInt() and 255) } @@ -25,12 +53,10 @@ object SecondaryLibrary { val CARD_GUESTS = listOf("/mnt/droiddeck-sd", "/mnt/bannerlator-sd") - /** Parent binds come first; the more specific private directories override them in PRoot. */ - fun binds(files: File, library: File, guests: List<String> = CARD_GUESTS): List<String> { + fun binds(files: File, library: File, guests: List<String> = CARD_GUESTS, content: File = library): List<String> { val private = privateRoot(files, library) val apps = File(library, "steamapps") val tools = LinkedHashMap(bootstrapTools) - // Include other installed Proton/runtime versions, without routing ordinary game depots. apps.listFiles()?.filter { it.name.matches(Regex("appmanifest_\\d+\\.acf")) }?.forEach { manifest -> val text = manifest.readText() val id = Regex("\"appid\"\\s+\"(\\d+)\"").find(text)?.groupValues?.get(1) @@ -48,23 +74,17 @@ object SecondaryLibrary { for (relative in listOf("steamapps/common/$dir", "steamapps/downloading/$id")) { val target = File(private, relative) migrate(File(library, relative), target) - // FUSE discarded the executable bits. Steam will restore the depot's exact modes - // on verification; its launchers must already be executable when importing it. target.walkTopDown().filter { it.isFile }.forEach { it.setExecutable(true, true) } overrides.add(target to relative) - // Steam normalizes depot install directories to lowercase on Android's - // case-insensitive shared storage. PRoot binds are case-sensitive, so both - // spellings must reach the same private directory during the commit. val lower = relative.lowercase(Locale.ROOT) if (lower != relative) overrides.add(target to lower) } } return guests.flatMap { guest -> - listOf("${library.path}:$guest") + overrides.map { (host, relative) -> "${host.path}:$guest/$relative" } + listOf("${content.path}:$guest") + overrides.map { (host, relative) -> "${host.path}:$guest/$relative" } } } - /** Copy once into a staging directory; retain the source and never merge over a live prefix. */ private fun migrate(source: File, target: File) { val migrated = File(target.parentFile, ".${target.name}.migrated") if (target.isDirectory) { diff --git a/app/src/main/java/com/droiddeck/launcher/session/SelectedGameProfile.kt b/app/src/main/java/com/droiddeck/launcher/session/SelectedGameProfile.kt new file mode 100644 index 0000000000..41eeac38f6 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/SelectedGameProfile.kt @@ -0,0 +1,74 @@ +package com.droiddeck.launcher.session + +import com.droiddeck.launcher.core.FexPreset +import com.droiddeck.launcher.core.GameEnvironment +import com.droiddeck.launcher.frontend.Library + +data class ProfileValue(val value: String, val inherited: Boolean) + +data class SelectedGameProfile( + val appId: Long, + val name: String, + val fexPreset: ProfileValue, + val proton: ProfileValue, + val protonId: String?, + val components: Map<String, ProfileValue>, + val componentFiles: Map<String, String>, + val environmentOverrides: Int, + val windowsComponentNames: List<String>, + val startWithoutSteam: Boolean = false, +) { + val hasOverrides: Boolean + get() = !fexPreset.inherited || + !proton.inherited || + components.values.any { !it.inherited } || + environmentOverrides > 0 || + windowsComponentNames.isNotEmpty() || + startWithoutSteam + + companion object { + fun resolve( + selectedAppId: Long, + games: List<Library.SteamGame>, + generalFexPreset: String, + environment: GameEnvironment.Config, + snapshot: ComponentsManager.Snapshot, + generalProtonId: String?, + gameProtonChoice: ProtonDefault.GameChoice?, + gameProtonId: String?, + gameComponents: Map<String, String>, + gameWindowsComponents: List<String>, + ): SelectedGameProfile? { + val game = games.firstOrNull { it.profileKey == selectedAppId.toString() } ?: return null + val fexOverride = GameEnvironment.gameFexPreset(environment, game.profileKey) + val selectedProtonId = if (gameProtonChoice == null) generalProtonId else gameProtonId + val selectedProton = snapshot.protons.firstOrNull { it.proton.id == selectedProtonId } + val packages = snapshot.packages.associateBy { it.file } + val components = ComponentsManager.COMPONENTS.associateWith { component -> + val override = gameComponents[component] + ProfileValue( + value = override?.let { packages[it]?.version ?: it } + ?: selectedProton?.components?.get(component)?.selected.orEmpty(), + inherited = override == null, + ) + } + val otherEnvironment = environment.games[game.profileKey].orEmpty().keys - FexPreset.environmentKeys - + GameEnvironment.NO_STEAM + return SelectedGameProfile( + appId = selectedAppId, + name = game.name, + fexPreset = ProfileValue(fexOverride ?: generalFexPreset, fexOverride == null), + proton = ProfileValue( + selectedProton?.proton?.name ?: gameProtonChoice?.dir.orEmpty(), + gameProtonChoice == null, + ), + protonId = selectedProtonId, + components = components, + componentFiles = gameComponents, + environmentOverrides = otherEnvironment.size, + windowsComponentNames = gameWindowsComponents.map(WinComponentNames::of), + startWithoutSteam = GameEnvironment.gameNoSteam(environment, game.profileKey), + ) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionAchievementGame.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionAchievementGame.kt new file mode 100644 index 0000000000..d86c88df43 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionAchievementGame.kt @@ -0,0 +1,10 @@ +package com.droiddeck.launcher.session + +internal object SessionAchievementGame { + fun activeAppId(focused: Long?, windows: List<Long>, installed: Set<Long>): Long? { + if (focused != null && focused > 0 && focused != 769L) { + return focused.takeIf { it in windows && it in installed } + } + return windows.filter { it != 769L && it in installed }.distinct().singleOrNull() + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionArtifacts.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionArtifacts.kt index cc0f5ad821..e0e8557422 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionArtifacts.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionArtifacts.kt @@ -11,45 +11,55 @@ import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -/** - * Finishes a session's folder: the compositor's log, the Steam client's logs scrubbed line by - * line, Android's crash buffer, and a marker that says the folder is complete. - * - * Three callers, because a session ends three ways. [collect] runs at an ordinary stop. The - * app's uncaught-exception handler ([CrashHandler]) runs it as the process dies, so a crash in - * our own code leaves a full folder and not a half one. And [finishAbandoned] runs at the next - * app start for a folder that has no marker: the process was killed outright (Android's phantom - * process killer, a native crash in the compositor, the battery) and nothing of ours got to run. - * Everything written *during* the session - session.log, app.log, wayland.log, audio.log, the - * device report - is already on disk at that point; only the pieces gathered at the end were - * missing, and the crash buffer keeps its entries after the process is gone, which is the whole - * reason it is worth coming back for. - */ object SessionArtifacts { private const val TAG = "SessionArtifacts" - /** Written last; a folder without it did not get its ending. */ const val COMPLETE_MARKER = ".complete" - /** - * Every file in the folder has been through the redactor under its current rules. Named after - * [LogRedactor.RULES_VERSION], so a folder scrubbed under older rules is scrubbed again. - */ private val SCRUBBED_MARKER = ".scrubbed-r${LogRedactor.RULES_VERSION}" private val OLD_SCRUBBED_MARKER = Regex("""\.scrubbed-(r?\d+)""") - /** - * Written by a session's own ending, and only when every file in the folder, subfolders - * included (whatever the session script copied into steam/ and droiddeck-esync/ as well as what - * the app wrote), went through the redactor without a failure. It lists each of those files - * with its size and modification time, under the redactor's rules version ([scrubbedFiles]). - * A share no longer relies on it: every text file goes through the share pass on the way into - * the zip regardless. - */ const val SCRUBBED_TREE_MARKER = ".scrubbed-tree" - /** Everything the end of a session gathers, into [dir]. Safe to call for a dead session. */ - fun collect(context: Context, dir: File, reason: String) { + private val collectingLock = java.util.concurrent.locks.ReentrantLock() + private val collectingDone = collectingLock.newCondition() + private val collecting = HashSet<File>() + + /** Recovery leaves [dir] alone from the stop until [collect] has finished it. */ + fun collectionStarted(dir: File) { + collectingLock.lock() + try { collecting.add(dir) } finally { collectingLock.unlock() } + } + + private fun collectionDone(dir: File) { + collectingLock.lock() + try { collecting.remove(dir); collectingDone.signalAll() } finally { collectingLock.unlock() } + } + + private fun inFlight(dir: File): Boolean { + collectingLock.lock() + try { return dir in collecting } finally { collectingLock.unlock() } + } + + fun awaitCollections(timeoutMs: Long = 30_000) { + collectingLock.lock() + try { + var left = java.util.concurrent.TimeUnit.MILLISECONDS.toNanos(timeoutMs) + while (collecting.isNotEmpty() && left > 0) left = collectingDone.awaitNanos(left) + } finally { + collectingLock.unlock() + } + } + + fun collect(context: Context, dir: File, reason: String, steamArch: String? = null) { + try { + collectNow(context, dir, reason, steamArch) + } finally { + collectionDone(dir) + } + } + + private fun collectNow(context: Context, dir: File, reason: String, steamArch: String?) { try { val wayland = File(dir, "wayland.log") if (!wayland.exists()) { @@ -59,8 +69,8 @@ object SessionArtifacts { } LogRedactor.learnFromRuntime(LinuxRuntime.rootDir(context)) val record = Record(dir) - copySteamLogs(context, dir, record) - // A session the system killed leaves its trace here and nowhere else. + copySteamLogs(context, dir, record, steamArch) + VacDiagnostics.collect(context, dir) SessionLogCapture.dumpCrashBuffer(File(dir, "crash.log")) markScrubbed(scrubTree(record)) SessionEvents.record("session.artifacts_collected", mapOf("reason" to reason), dir) @@ -70,17 +80,6 @@ object SessionArtifacts { } } - /** - * Every session folder not yet scrubbed under the redactor's current rules - written before - * every file was scrubbed, before the device's own addresses or the Steam account were, or - * moved in from Download/ ([LogMigration] strips their markers first, [unmarkMoved]): the - * whole folder, steam/ and every other subfolder included, through the redactor, and the - * current marker written in place of the old ones. Runs at app start with [finishAbandoned]. - * - * A folder holds some 30 MB of Steam logs, about half a minute's work, so folders go through - * a few at a time; one the process does not get to keeps its old marker and is taken up at - * the next start. - */ @Synchronized fun scrubOlder(context: Context) { val current = SessionPaths.current() @@ -104,27 +103,14 @@ object SessionArtifacts { if (failed > 0) ", $failed not fully (again at the next start)" else "") } - /** - * Folders [LogMigration] just moved in lose every scrub marker an earlier build left, so - * [scrubOlder], which runs right after it, puts them through the current rules whatever those - * markers claimed. - */ fun unmarkMoved(dirs: List<File>) { dirs.filter { SessionPaths.isSessionFolder(it) }.forEach { dir -> dir.listFiles { f -> OLD_SCRUBBED_MARKER.matches(f.name) || f.name == SCRUBBED_TREE_MARKER }?.forEach { it.delete() } } } - /** - * The session's own files (session.log, app.log, desktop.log, the Steam desktop client's - * steam-desktop.log, ...) were written as they happened, unscrubbed; this pass puts every one - * through the redactor before the folder can be shared. A file is rewritten only if a line - * changed. steam/ was scrubbed on the way in. - */ - /** A file's size and modification time as they stood right after it was scrubbed. */ private class Scrubbed(val length: Long, val modified: Long) - /** Files of a folder as they stood right after scrubbing, filled by [scrubTree] and [copySteamLogs]. */ private class Record(val dir: File) { val files = HashMap<File, Scrubbed>() var failed = false @@ -138,12 +124,6 @@ object SessionArtifacts { } } - /** - * Puts [f] through the redactor in place. Returns its size and modification time as it then - * stands, or null if it could not, and [f] may still hold the original. A writer still - * appending to [f] (the app's own log capture) changes its size afterwards, and a share then - * scrubs it again. - */ private fun scrubFile(dir: File, f: File): Scrubbed? { val tmp = File(dir, ".${f.name}.scrub") return try { @@ -152,11 +132,8 @@ object SessionArtifacts { val scrubbed = tmp.readBytes() if (scrubbed.contentEquals(f.readBytes())) { tmp.delete() - // Unchanged by the redactor, and by anything else while it read. before.takeIf { f.length() == it.length && f.lastModified() == it.modified } } else { - // Shared storage can refuse a rename; then the scrubbed bytes are written over the - // original instead, so it never stays behind unscrubbed. if (!tmp.renameTo(f)) { f.writeBytes(scrubbed); tmp.delete() } Scrubbed(scrubbed.size.toLong(), f.lastModified()).takeIf { f.length() == it.length } } @@ -167,14 +144,9 @@ object SessionArtifacts { } } - /** - * Records [record]'s folder as scrubbed - every file went through without a failure - or - * leaves it unmarked, so the next share and the pass over older folders scrub it again. - */ private fun markScrubbed(record: Record): Boolean { val dir = record.dir val tree = File(dir, SCRUBBED_TREE_MARKER) - // A marker from older rules vouches for nothing now, whether or not this pass succeeded. dir.listFiles { f -> OLD_SCRUBBED_MARKER.matches(f.name) }?.forEach { it.delete() } if (record.failed) { tree.delete() @@ -186,7 +158,7 @@ object SessionArtifacts { val lines = StringBuilder("rules ${LogRedactor.RULES_VERSION}\n") record.files.forEach { (f, s) -> lines.append(s.length).append('\t').append(s.modified).append('\t') - .append(f.relativeTo(dir).path).append('\n') + .append(f.relativeTo(dir).invariantSeparatorsPath).append('\n') } tree.writeText(lines.toString()) true @@ -197,11 +169,6 @@ object SessionArtifacts { } } - /** - * The files of [dir] that its own ending scrubbed and that are unchanged since (same size and - * modification time), by path relative to [dir]. Empty when the folder has no such record, or - * one made under other redactor rules. - */ fun scrubbedFiles(dir: File): Set<String> { val lines = try { File(dir, SCRUBBED_TREE_MARKER).takeIf { it.isFile }?.readLines() } catch (e: Exception) { null } ?: return emptySet() @@ -214,23 +181,25 @@ object SessionArtifacts { }.toSet() } - /** The end-of-session scrub of [dir] on its own (steam/ already in place); also the pass over older and moved folders. */ internal fun scrubAndMark(dir: File): Boolean = markScrubbed(scrubTree(Record(dir))) - /** - * [record]'s folder and every folder under it (steam/, droiddeck-esync/): the session script - * copied files there verbatim, and a Steam log the app did not copy over again (gone from the - * runtime, or past its size limit) stayed as the script left it. Files [copySteamLogs] already - * redacted on the way in are in [record] and left alone. - */ private fun scrubTree(record: Record): Record { record.dir.walkTopDown().filter { it.isDirectory }.forEach { scrubFolder(it, record) } return record } - /** Steam's logs: redacted into steam/, never copied verbatim. What it wrote goes in [record]. */ - private fun copySteamLogs(context: Context, dir: File, record: Record) { - val logs = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/logs") + private const val CLIENT_FILE = "steam-client.txt" + + fun recordClient(dir: File, arch: String) { + runCatching { File(dir, CLIENT_FILE).writeText("$arch\n") } + } + + /** The Steam client a session ran, when it recorded one. */ + internal fun recordedClient(dir: File): String? = + runCatching { File(dir, CLIENT_FILE).readText().trim() }.getOrNull()?.takeIf { it == "arm64" || it == "x86_64" } + + 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 -> @@ -247,17 +216,11 @@ object SessionArtifacts { Log.i(TAG, "collected ${out.listFiles()?.size ?: 0} Steam log(s), scrubbed, into $out") } - /** - * Every session folder without a marker gets its ending now. Only the newest of them gets the - * Steam logs - the runtime holds one set, and it belongs to the last session that ran; an - * older folder would be handed logs that are not its own. Runs on a worker thread at app - * start; nothing here touches the session that is about to begin. - */ @Synchronized fun finishAbandoned(context: Context) { val parent = LinuxRuntime.logDir(context) val abandoned = parent.listFiles { f -> - SessionPaths.isSessionFolder(f) && !File(f, COMPLETE_MARKER).exists() + SessionPaths.isSessionFolder(f) && !File(f, COMPLETE_MARKER).exists() && !inFlight(f) }?.sortedWith(SessionPaths.chronological) ?: return if (abandoned.isEmpty()) return val current = SessionPaths.current() @@ -277,7 +240,10 @@ object SessionArtifacts { "session died of a crash, the entry is in there unless the device rebooted.\n" ) val record = Record(dir) - if (newest) copySteamLogs(context, dir, record) + if (newest) { + copySteamLogs(context, dir, record, recordedClient(dir)) + VacDiagnostics.collect(context, dir) + } SessionLogCapture.dumpCrashBuffer(File(dir, "crash.log")) SessionEvents.record("session.artifacts_recovered", mapOf("newest" to newest), dir) markScrubbed(scrubTree(record)) @@ -289,12 +255,6 @@ object SessionArtifacts { } } - /** - * Keeps the newest [SessionPaths.KEEP_SESSIONS] session folders and deletes the rest: a few - * days of testing left hundreds, and the one a report needed was lost among them. Only folders - * that are finished; the session in progress is never touched. Runs at app start after - * [finishAbandoned], on its worker thread. - */ @Synchronized fun prune(context: Context) { val current = SessionPaths.current() @@ -304,11 +264,6 @@ object SessionArtifacts { if (old.isNotEmpty()) Log.i(TAG, "deleted ${old.size} session folder(s) past the newest ${SessionPaths.KEEP_SESSIONS}") } - /** - * Every session folder but the one in progress, and the one-off command logs (tools/, or loose - * beside the folders from before it): the Setup page's Clear logs. Returns how many session - * folders went. - */ @Synchronized fun clearAll(context: Context): Int { val current = SessionPaths.current() diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionDisplay.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionDisplay.kt index bdb5575399..ae64b98cf0 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionDisplay.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionDisplay.kt @@ -3,26 +3,14 @@ package com.droiddeck.launcher.session import android.content.Context import android.view.WindowManager -/** The virtual display advertised to the guest, before it is fitted onto the Android panel. */ object SessionDisplay { const val MATCH_SCREEN = "screen" - /** The window's size, kept in step while the session runs: a foldable opening or closing, a - * split screen or a freeform window resizes the guest's display instead of letterboxing it. */ const val FOLLOW_SCREEN = "follow" - /** Below this a side is a picture-in-picture or a sliver of split screen: not worth a resize. */ const val FOLLOW_MIN_SIDE = 480 - /** - * Presets are heights, not sizes: "720p" is the panel's own shape at 720 lines, never narrower - * than 16:9 and never taller than the panel (SHAPE_AUTO). The client treats the output as the - * games' native resolution, so the height is what bounds a game's default size on a 1440p - * phone; the shape is what keeps the client's interface edge to edge on a 20:9 one (1600x720) - * and keeps games at 16:9 or wider on a foldable's near-square panel. - */ const val DEFAULT_RESOLUTION = "720p" private val PRESET_HEIGHTS = listOf(720, 900, 1080) - /** The height of a preset choice ("900p"), or null for Match screen and fixed sizes. */ fun presetHeight(choice: String): Int? = if (choice.endsWith("p")) choice.dropLast(1).toIntOrNull()?.takeIf { it > 0 } else null @@ -32,42 +20,27 @@ object SessionDisplay { fun resolveChoice(panel: Pair<Int, Int>, choice: String): Pair<Int, Int> { if (choice == MATCH_SCREEN || choice == FOLLOW_SCREEN) return screenSize(panel) presetHeight(choice)?.let { return resolve(panel, it, SessionPrefs.SHAPE_AUTO) } - // Fixed sizes (custom, or a preset saved before presets were heights) keep their exact size, - // including legacy ones past the custom dialog's limit. val parts = choice.split('x').map { it.toIntOrNull() } return if (parts.size == 2 && parts.all { it != null && it > 0 }) parts[0]!! to parts[1]!! else resolve(panel, 720, SessionPrefs.SHAPE_AUTO) } - /** The height presets the panel is tall enough for, then the panel itself, with no duplicate - * sizes, then Follow screen. */ fun resolutionOptions(panel: Pair<Int, Int>): List<String> { val panelHeight = minOf(panel.first, panel.second) return PRESET_HEIGHTS.filter { it <= panelHeight }.map { "${it}p" } .filter { resolveChoice(panel, it) != screenSize(panel) } + MATCH_SCREEN + FOLLOW_SCREEN } - /** A Follow screen session's display for a window of this size: its own shape, square or - * portrait included, with even sides; null when it is too small to follow (PiP). */ fun followSize(width: Int, height: Int): Pair<Int, Int>? = if (minOf(width, height) < FOLLOW_MIN_SIDE) null else (width and 1.inv()) to (height and 1.inv()) - /** Unfolded controls: the most of the window the game may take, so a window near 16:9 itself - * still leaves the Deck controls room. */ const val UNFOLDED_MAX_GAME_SHARE = 0.8f - /** A foldable: Android 11's hinge angle sensor, which foldables report and slates do not. Unfolded - * controls are offered only there - untested on tablets, whose 16:10 landscape leaves them - * little room under a 16:9 game. */ fun foldable(context: Context): Boolean = context.packageManager.hasSystemFeature("android.hardware.sensor.hinge_angle") - /** A panel at least this wide on its shortest side (dp) is a foldable's unfolded inner screen. */ const val UNFOLDED_MIN_DP = 600 - /** Unfolded controls: the game's height in a window of this size - 16:9 across the full width, - * held either way, with even sides - and the Deck controls take the rest below it, laid out to - * whatever that leaves (DeckControlsPanel's GamepadLayout). */ fun unfoldedGameHeight(width: Int, height: Int): Int = minOf(width * 9 / 16, (height * UNFOLDED_MAX_GAME_SHARE).toInt()) and 1.inv() @@ -79,13 +52,10 @@ object SessionDisplay { return maxOf(mode.physicalWidth, mode.physicalHeight) to minOf(mode.physicalWidth, mode.physicalHeight) } - /** Interpret an older cap/aspect combination without altering the saved picture size. */ fun resolve(panel: Pair<Int, Int>, cap: Int, shape: String, custom: Pair<Int, Int>? = null): Pair<Int, Int> { custom?.let { return it } val panelW = maxOf(panel.first, panel.second).toFloat() val panelH = minOf(panel.first, panel.second).toFloat().coerceAtLeast(1f) - // Auto retains wide panels but floors squarer ones at 16:9 for game compatibility. - // Match screen removes that floor; fixed 16:9 also keeps foldable sessions stable. val aspect = when (shape) { SessionPrefs.SHAPE_WIDE -> 16f / 9f SessionPrefs.SHAPE_EXACT -> panelW / panelH @@ -95,7 +65,6 @@ object SessionDisplay { return ((height * aspect).toInt() and 1.inv()) to (height and 1.inv()) } - /** Mirrors gamescope's even-width 16:9 calculation, including near-16:9 rounding. */ fun canStretch16x9(size: Pair<Int, Int>): Boolean = (size.second * 16 + 4) / 9 / 2 * 2 > size.first } diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionEvents.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionEvents.kt index 5f8f2bf966..26b63fd5cf 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionEvents.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionEvents.kt @@ -6,15 +6,11 @@ import org.json.JSONObject import java.io.File import java.io.FileOutputStream -/** Writes the machine-readable lifecycle stream beside the existing session artifacts. */ object SessionEvents { private const val TAG = "SessionEvents" private val lock = Any() - /** [label] names the session's folder for what is being run (SessionPaths.label). */ fun begin(context: Context, mode: String, label: String? = null) { - // A runtime-install failure can leave the folder claimed before the service ever starts. - // Keep that folder, but give the next attempt its own session directory. SessionPaths.take() val dir = SessionPaths.beginOrCurrent(context, label ?: SessionPaths.label(mode, null)) synchronized(SessionState) { @@ -35,6 +31,7 @@ object SessionEvents { SessionState.programArgs = emptyList() SessionState.steamUi = null SessionState.steamUrl = null + SessionState.steamVr = false SessionState.firstFrameSeen = false SessionState.suspended = false } @@ -107,6 +104,7 @@ object SessionEvents { if (!SessionState.running || SessionState.guestPid <= 1 || !SessionState.firstFrameSeen || SessionState.suspended) return if (SessionState.phase != SessionPhase.READY) { transition(SessionPhase.READY, "session.ready") + Thread({ com.droiddeck.launcher.gpu.AutoDriverTrial.sessionReady() }, "gpu-driver-trial").start() } } diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt index 9bc9fc1955..681287c868 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt @@ -11,37 +11,22 @@ import com.droiddeck.launcher.runtime.LinuxRuntime import com.droiddeck.launcher.runtime.ProotFastPath import java.io.File -/** Everything the session needs written into the runtime before it starts. */ object SessionFiles { private const val TAG = "SessionFiles" private const val NO_PAD_SWITCH = "Download/droiddeck-no-pad" - /** Where the DirectAudio driver lives inside the runtime; the wrappers get it as BL_DIRECTAUDIO. */ const val DIRECTAUDIO_DIR = "usr/local/lib/directaudio" - /** The driver sets staged under it: classic Wine 11 (Valve, GE) and the system-thread interface (Proton-CachyOS). */ val DIRECTAUDIO_SETS = arrayOf("linux-wine11", "linux-wine11-systhread") - // Staged only with a complete desktop; removal matches these against the APK as well. internal val DESKTOP_FILES = arrayOf( "usr/local/bin/droiddeck-desktop" to "usr/local/bin/droiddeck-desktop", - // Games and emulators from the menu, full screen in a gamescope of their own. "usr/local/bin/droiddeck-gpu" to "usr/local/bin/droiddeck-gpu", "usr/local/bin/droiddeck-desktop-gpu" to "usr/local/bin/droiddeck-desktop-gpu", "usr/local/bin/droiddeck-desktop-window-rules" to "usr/local/bin/droiddeck-desktop-window-rules", - // KWin at the app's surface size, for Plasma's session (it starts KWin through this name). "usr/local/bin/kwin_wayland_wrapper" to "usr/local/bin/kwin_wayland_wrapper", "usr/lib/firefox/defaults/pref/droiddeck.js" to "usr/lib/firefox/defaults/pref/droiddeck.js", "etc/xdg/autostart/droiddeck-clipboard.desktop" to "etc/xdg/autostart/droiddeck-clipboard.desktop", ) - /** - * The libraries and scripts the session runs, refreshed from the apk at every launch. - * - * The runtime image carries its own copies, but a runtime installed months ago carries the - * copies of that day and a device has no way to replace them from outside the app. Staging - * them here is how a fix inside the session shim, the controller reader or one of the scripts - * reaches an already-installed runtime without a ~790 MB re-download. Each lands through a - * rename, so a session that still has one mapped keeps the file it opened. - */ fun stage(context: Context, root: File) { if (DesktopCatalog.desktopInstalled(root)) try { DesktopCatalog.cleanLegacy(context) } catch (e: Exception) { Log.w(TAG, "LXQt cleanup will retry next session", e) } @@ -81,45 +66,38 @@ object SessionFiles { "usr/local/bin/droiddeck-desktop-bookmarks" to "usr/local/bin/droiddeck-desktop-bookmarks", "usr/local/bin/droiddeck-steam-shim" to "usr/local/bin/droiddeck-steam-shim", "usr/local/bin/droiddeck-steam-shortcuts" to "usr/local/bin/droiddeck-steam-shortcuts", - // Asks the app for an Epic game's sign-in code at launch, from the compat tool (StoreLaunchRequests). "usr/local/bin/droiddeck-store-launch" to "usr/local/bin/droiddeck-store-launch", - // A game's web links to Android's browser (Wine's winebrowser starts it). + "usr/local/bin/droiddeck-epic" to "usr/local/bin/droiddeck-epic", + "usr/local/bin/droiddeck-epic-steam" to "usr/local/bin/droiddeck-epic-steam", "usr/local/bin/droiddeck-open-url" to "usr/local/bin/droiddeck-open-url", "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", - // Flatpak: the bwrap stand-in, the store's helper and setup, and the front end's launcher. + "usr/local/bin/droiddeck-steam-x64" to "usr/local/bin/droiddeck-steam-x64", + "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", + "usr/local/bin/droiddeck-steamvr" to "usr/local/bin/droiddeck-steamvr", + "usr/local/bin/droiddeck-steamvr-settings" to "usr/local/bin/droiddeck-steamvr-settings", + "usr/local/bin/droiddeck-steamvr-game" to "usr/local/bin/droiddeck-steamvr-game", "usr/local/bin/droiddeck-bwrap" to "usr/local/bin/droiddeck-bwrap", "usr/local/bin/droiddeck-flatpak" to "usr/local/bin/droiddeck-flatpak", "usr/local/bin/droiddeck-flatpak-setup" to "usr/local/bin/droiddeck-flatpak-setup", "usr/local/bin/droiddeck-flatpak-run" to "usr/local/bin/droiddeck-flatpak-run", - // The user's own AppImages, extracted at import (AppImageManager). "usr/local/bin/droiddeck-appimage-run" to "usr/local/bin/droiddeck-appimage-run", "usr/local/bin/droiddeck-script-run" to "usr/local/bin/droiddeck-script-run", - // The desktop's Run entries and its exec fallback: Windows programs through Steam's Proton, - // x86 Linux programs through FEX. "usr/local/bin/droiddeck-open" to "usr/local/bin/droiddeck-open", "usr/local/bin/droiddeck-proton-run" to "usr/local/bin/droiddeck-proton-run", - // The SteamOS helpers the client calls in Deck mode: the two Armada found it needs, plus - // the three under /usr/bin, all no-ops that answer "nothing to do" (see each file). "usr/bin/steamos-update" to "usr/bin/steamos-update", "usr/bin/steamos-select-branch" to "usr/bin/steamos-select-branch", - // Big Picture's "Switch to Desktop": asks the app for the desktop with Steam in it. "usr/bin/steamos-session-select" to "usr/bin/steamos-session-select", "usr/bin/jupiter-biosupdate" to "usr/bin/jupiter-biosupdate", "usr/bin/steamos-polkit-helpers/steamos-priv-write" to "usr/bin/steamos-polkit-helpers/steamos-priv-write", "usr/bin/steamos-polkit-helpers/steamos-set-timezone" to "usr/bin/steamos-polkit-helpers/steamos-set-timezone", - // On device the client called these four by their polkit-helpers path, not /usr/bin: the - // "Update Error" dialog was steamos-update missing there. "usr/bin/steamos-polkit-helpers/steamos-update" to "usr/bin/steamos-polkit-helpers/steamos-update", "usr/bin/steamos-polkit-helpers/steamos-select-branch" to "usr/bin/steamos-polkit-helpers/steamos-select-branch", "usr/bin/steamos-polkit-helpers/jupiter-biosupdate" to "usr/bin/steamos-polkit-helpers/jupiter-biosupdate", "usr/bin/steamos-polkit-helpers/jupiter-dock-updater" to "usr/bin/steamos-polkit-helpers/jupiter-dock-updater", ) - // The patched gamescope (tools/gamescope): the runtime's own version rebuilt with the ARM64 - // client fixes, over /usr/local/bin so it comes first in the session's PATH. Only when the - // apk carries it - a build without the asset leaves the runtime's copy alone. - // Valve's mangoapp (tools/mangoapp) - Deck mode's performance overlay - with the five - // libraries the runtime lacks beside it, and the wrapper on PATH that points it at them. val mangoapp = listOf( "usr/local/bin/mangoapp", "usr/local/lib/mangoapp/mangoapp", @@ -129,18 +107,33 @@ object SessionFiles { "usr/local/lib/mangoapp/libtraceevent.so.1", "usr/local/lib/mangoapp/libtracefs.so.1", ).map { it to it } - // What the Windows components installer reads .msi packages with (tools/msitools). val msitools = listOf("msiinfo", "cabextract", "7z", "7z.so", "libmsi-1.0.so.0", "libgsf-1.so.114", "libgcab-1.0.so.0") .map { "usr/local/lib/droiddeck-msitools/$it" } + listOf("NOTICE", "GPL-2", "GPL-3", "LGPL-2.1", "7zip-License", "7zip-unRarLicense").map { "usr/local/share/licenses/droiddeck-msitools/$it" } + val handModels = listOf("left", "right").flatMap { side -> + listOf("droiddeck_hand_$side.json", "hand.mtl", "hand.png", "hand_open.obj", "hand_fist.obj", "thumb_index_open.obj", + "thumb_index_pinch.obj") + .map { "droiddeck/resources/rendermodels/droiddeck_hand_$side/$it" } + } + val vr = (listOf( + "droiddeck/bin/linuxarm64/driver_droiddeck.so", + "droiddeck/bin/linuxarm64/xr-display-mode", + "droiddeck/driver.vrdrivermanifest", + "droiddeck/resources/settings/default.vrsettings", + "layer/libVkLayer_droiddeck_vr.so", + "layer/libdroiddeck_vr_scheduling.so", + "layer/VK_LAYER_DROIDDECK_vr.json", + ) + handModels).map { "usr/local/lib/droiddeck-vr/$it" to "usr/local/lib/droiddeck-vr/$it" } + + listOf("usr/local/lib/droiddeck-vr/layer/VK_LAYER_DROIDDECK_vr_implicit.json" to + "usr/share/vulkan/implicit_layer.d/droiddeck_vr.json") val fexPreloads = listOf("x86_64", "i386").flatMap { arch -> listOf("libblsession.so", "libfakeinput.so", "libfaultreport.so").map { "$arch/$it" to "usr/local/lib/droiddeck-fex/$arch/$it" } - } + listOf("libthunkaudit.so", "libvulkan-thunk.so").map { "x86_64/$it" to "usr/local/lib/droiddeck-fex/x86_64/$it" } + } + listOf("libvulkan-thunk.so", "libwebkitinput.so").map { "x86_64/$it" to "usr/local/lib/droiddeck-fex/x86_64/$it" } val optional = (arrayOf( "usr/local/bin/gamescope" to "usr/local/bin/gamescope", "usr/local/lib/droiddeck/uruntime" to "usr/local/lib/droiddeck/uruntime", "usr/local/share/licenses/uruntime/LICENSE" to "usr/local/share/licenses/uruntime/LICENSE", - ) + mangoapp + msitools.map { it to it } + fexPreloads).filter { (asset, _) -> + ) + mangoapp + listOf("comet", "GalaxyCommunication.exe", "update-permissions.exe", "LICENSE", "version").map { "usr/local/lib/droiddeck-comet/$it" to "usr/local/lib/droiddeck-comet/$it" } + msitools.map { it to it } + vr + fexPreloads).filter { (asset, _) -> val dir = asset.substringBeforeLast('/') runCatching { context.assets.list("linuxfs/$dir")?.contains(asset.substringAfterLast('/')) == true }.getOrDefault(false) } @@ -166,12 +159,6 @@ object SessionFiles { LegacyNames.migrateRootfs(root) ComponentsManager.migrateLaunchDir(context) EsyncPacks.stageBundled(context, root) - // The DirectAudio driver for games under Proton: the glibc build of winedirectaudio, which - // the Proton wrappers add to WINEDLLPATH when the session asks for it (BL_DIRECTAUDIO). Two - // sets, one per Wine audio interface - the wrapper picks by what the Proton's own winepulse.so - // imports (see steam-compatibility), because both Wines call themselves 11.0 and the wrong set - // plays silence. Staged like the scripts, so a driver fix reaches an installed runtime without - // re-hosting. The sets come from the pinned DirectAudio release (tools/directaudio/release.env). val directAudio = arrayOf( "aarch64-unix/winedirectaudio.so", "aarch64-windows/winedirectaudio.drv", @@ -195,18 +182,11 @@ object SessionFiles { } if (!installed) Log.e(TAG, "DirectAudio $set/$relative NOT staged") } - // A runtime from before the sets had names kept the driver at the directory's root; it would - // never be picked again, so it goes. for (old in arrayOf("aarch64-unix", "aarch64-windows", "i386-windows")) File(root, "$DIRECTAUDIO_DIR/lib/wine/$old").deleteRecursively() - // What every process in the session preloads. LD_PRELOAD in the environment would not - // survive: the Steam client rebuilds it for each process it starts and appends its own - // overlay entry without a separator, which silently drops whatever was there. val preload = StringBuilder("/usr/local/lib/libblsession.so\n") if (!File(Environment.getExternalStorageDirectory(), NO_PAD_SWITCH).exists()) { preload.append("/usr/local/lib/libfakeinput.so\n") } - // Last, so the others' opens and stats reach it through RTLD_NEXT. It stays idle in any - // process its proot did not describe to it (ProotFastPath). if (ProotFastPath.enabled(context)) preload.append(ProotFastPath.LIBRARY + "\n") val etc = File(root, "etc").apply { mkdirs() } val staged = File(etc, "ld.so.preload.staged") @@ -219,30 +199,35 @@ object SessionFiles { Log.e(TAG, "could not write steam-compatibility-label") } - val startupMovieDir = File(root, "root/.local/share/Steam/config/uioverrides/movies") - // Steam looks up these conventional names in its user override directory. Keep both - // variants populated because the startup movie name differs across Steam clients. - val bigPictureMovieInstalled = stageStartupMovie( - context, - startupMovieDir, - "bigpicture_startup.webm", - ) - stageStartupMovie(context, startupMovieDir, "steam_os_startup.webm") - if (bigPictureMovieInstalled) { - ensureStartupMovieDefault(File(root, "root/.local/share/Steam/config/config.vdf")) + val startupMovie = BootMovie.prepare(context) + // The x86-64 client's config is left alone until its first start creates it. + val steamRoots = listOf(File(root, "root/.local/share/Steam"), File(root, "root/.droiddeck-x64/.local/share/Steam")) + .filterIndexed { i, steam -> i == 0 || File(steam, "config").isDirectory } + for (steam in steamRoots) { + val startupMovieDir = File(steam, "config/uioverrides/movies") + val bigPictureMovieInstalled = startupMovie != null && + stageStartupMovie(startupMovie, startupMovieDir, "bigpicture_startup.webm") + if (startupMovie != null) stageStartupMovie(startupMovie, startupMovieDir, "steam_os_startup.webm") + if (bigPictureMovieInstalled) { + ensureStartupMovieDefault(File(steam, "config/config.vdf")) + } } } - private fun stageStartupMovie(context: Context, directory: File, name: String): Boolean { + private fun stageStartupMovie(source: File, directory: File, name: String): Boolean { val movie = File(directory, name) + val stamp = File(directory, ".$name.source") + val identity = "${source.absolutePath}\n${source.length()}\n${source.lastModified()}" + if (movie.length() == source.length() && runCatching { stamp.readText() }.getOrNull() == identity) return true val staged = File(directory, "$name.staged") var installed = false try { directory.mkdirs() - context.assets.open("steam-startup/droiddeck-startup.webm").use { input -> + source.inputStream().use { input -> staged.outputStream().use { output -> FileUtils.copy(input, output) } } installed = staged.setReadable(true, false) && staged.renameTo(movie) + if (installed) FileUtils.writeString(stamp, identity) } catch (e: Exception) { Log.w(TAG, "could not stage Steam startup movie $name", e) } finally { @@ -373,10 +358,5 @@ object SessionFiles { indent + "}", ).joinToString(newline) - /** - * Where the session writes its log: app-private `files/logs`, bound into the session at the same - * path, so the session script's own redirection always opens. A folder leaves the device only - * through Share logs, which scrubs every file again on the way into the zip. - */ fun logDirectory(context: Context): File = LinuxRuntime.logDir(context).apply { mkdirs() } } diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionLogShare.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionLogShare.kt index 85760c8224..80c00cc99a 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionLogShare.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionLogShare.kt @@ -17,28 +17,12 @@ import java.io.File import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream -/** - * Share logs: one zip, made when asked, of a session folder (the newest by default) with the last - * seven days of the stores' log and the one-off command logs beside it, handed to Android's share - * sheet. Logs live in app-private `files/logs`; this is how they leave the device. Every text file - * goes through [LogRedactor.redactForShare] on the way in, so even a file written before a rule - * existed is clean in the zip. The zip sits in `cache/share/` until the next share or app start. - */ object SessionLogShare { private val main = Handler(Looper.getMainLooper()) - /** - * How far the zip for a share has got, 0..1, or null when none is being made. The Share logs - * buttons show it in place of their label, so a tap is answered at once. - */ var progress by mutableStateOf<Float?>(null) private set - /** - * Zips [folder] on a worker thread with [progress] following along, then hands the zip (null - * if there was nothing to zip or it failed) to [done] on the main thread. Call on the main - * thread; a tap while a zip is being made is ignored. - */ fun prepare(context: Context, folder: () -> File?, done: (File?) -> Unit) { if (progress != null) return progress = 0f @@ -50,29 +34,17 @@ object SessionLogShare { }, "share-logs").start() } - /** The newest session folder in either place logs are written, or null if there is none. */ fun latest(context: Context): File? = SessionPaths.sessionFolders(context).lastOrNull() - /** Builds the zip (blocking). Returns null when there is no session to share. */ - /** Builds a zip for one specific session folder (blocking). */ fun zipFolder(context: Context, folder: File, onProgress: ((Float) -> Unit)? = null): File? { if (!folder.isDirectory) return null - // The client's logs past STEAM_LOG_MAX_BYTES stay out, as they do from the app's own copy: a - // CEF debug log or an old *.previous.txt reached 17 MB, every share scrubbed them line by - // line, and the share sheet took ten seconds to appear. val files = folder.walkTopDown().filter { it.isFile } .filterNot { it.parentFile?.name == "steam" && it.length() > STEAM_LOG_MAX_BYTES }.toList() if (files.isEmpty()) return null val out = shareDir(context).apply { deleteRecursively(); mkdirs() } val zip = File(out, "DroidDeck-${folder.name}.zip") - // Scrubbed on the way into the zip: a session shared while it runs has not had its end-of- - // session pass yet, and the redactor changes nothing in a line that is already clean. LogRedactor.learnFromRuntime(LinuxRuntime.rootDir(context)) - // A finished folder was scrubbed whole when it ended. A file its record lists, unchanged - // since, goes in as it is; anything else (added or changed since, hidden, or any file of a - // session still running) is scrubbed again. Scrubbing tens of MB of the client's logs on - // every share kept the share sheet from appearing for ten seconds or more. val live = liveSteamLogs(context, folder) val logs = LinuxRuntime.logDir(context) val stores = recent(File(logs, STORES_DIR)) @@ -86,7 +58,7 @@ object SessionLogShare { if (percent != shown) { shown = percent; onProgress?.invoke(percent / 100f) } } ZipOutputStream(zip.outputStream().buffered()).use { z -> - files.forEach { f -> addEntry(z, folder.name + "/" + f.relativeTo(folder).path, f); advance(f) } + files.forEach { f -> addEntry(z, folder.name + "/" + f.relativeTo(folder).invariantSeparatorsPath, f); advance(f) } live.forEach { f -> addEntry(z, folder.name + "/steam/" + f.name, f); advance(f) } stores.forEach { f -> addEntry(z, "$STORES_DIR/" + f.name, f); advance(f) } tools.forEach { f -> addEntry(z, SessionPaths.TOOLS_DIR + "/" + f.name, f); advance(f) } @@ -96,7 +68,6 @@ object SessionLogShare { private fun addEntry(z: ZipOutputStream, name: String, f: File) { z.putNextEntry(ZipEntry(name)) - // Every text file, every time: the folder's own scrub may predate a rule. if (LogRedactor.isText(f)) { val w = z.bufferedWriter() LogRedactor.scrubForShare(f, w) @@ -107,38 +78,26 @@ object SessionLogShare { z.closeEntry() } - /** - * The client's own logs as they stand, for a session shared while it runs. The session script - * copies them into steam/ only as it exits, so a zip made from the drawer had none - and - * controller.txt (which pad the client opened, the touch mode it set) is what a controller or - * touch report needs most. Only for the running session: an older folder would get this - * session's logs. The same files the script copies; nothing holding credentials is in logs/. - */ private fun liveSteamLogs(context: Context, folder: File): List<File> { if (folder != SessionPaths.current() || File(folder, "steam").exists()) return emptyList() - val logs = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/logs") + val logs = File(SessionPrefs.activeSteamRoot(context), "logs") return logs.listFiles()?.filter { it.isFile && it.length() <= STEAM_LOG_MAX_BYTES }.orEmpty() } - /** The client's content and bootstrap logs grow large over months and say nothing about a session. */ private const val STEAM_LOG_MAX_BYTES = 8L * 1024 * 1024 - /** The stores' engine log, one file a day, under files/logs. */ const val STORES_DIR = "stores" private const val RECENT_DAYS = 7 private fun shareDir(context: Context): File = File(context.cacheDir, "share") - /** The files in [dir] changed in the last [RECENT_DAYS] days. */ private fun recent(dir: File): List<File> { val since = System.currentTimeMillis() - RECENT_DAYS * 86_400_000L return dir.listFiles { f -> f.isFile && f.lastModified() >= since }?.sortedBy { it.name }.orEmpty() } - /** Deletes the last share's zip; at app start, so a zip never outlives the share it was made for. */ fun clear(context: Context) { shareDir(context).deleteRecursively() - // Where builds before this one put it. File(context.cacheDir, "shared-logs").deleteRecursively() } diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionPaths.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionPaths.kt index 5b94c6a44c..e67092c1d0 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionPaths.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionPaths.kt @@ -7,42 +7,14 @@ import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -/** - * One folder per session under app-private `files/logs/`, holding everything that session recorded, - * named for the day, that day's session number and what was run, so the one a report is about can - * be picked out without opening any: - * - * ``` - * files/logs/2026-09-30-03-steam/ - * device.txt what this device is, and every setting the session ran with - * session.log the guest session: proot, gamescope, the client's stdout - * wayland.log the app's compositor - * steam.log the Steam client's own log, scrubbed (Steam mode) - * steam/ the rest of the client's logs, scrubbed (Steam mode) - * desktop.log KWin, Plasma and the programs on it (desktop mode) - * files/logs/tools/ one-off commands: Flatpak installs, AppImage imports - * files/logs/stores/ the stores' engine log, one file a day - * ``` - * - * Folders from before this naming (`session-20260930-180642`) are still recognised, shared and - * pruned with the rest. - * - * The folder is claimed by whoever starts first - the activity starts the compositor before the - * service starts the session - so both write into the same one, and a recreated activity (a - * foldable opening mid-session) joins the folder in progress instead of opening another. - */ object SessionPaths { private const val TAG = "SessionPaths" - /** How many session folders are kept; older ones go at the next app start. */ - const val KEEP_SESSIONS = 30 + const val KEEP_SESSIONS = 3 - /** Beside the session folders: the logs of one-off commands (GuestCommand's logName). */ const val TOOLS_DIR = "tools" - /** `2026-09-30-03-steam`: day, that day's session number, what was run. */ private val NAMED = Regex("""^(\d{4})-(\d{2})-(\d{2})-(\d{2,})-.+$""") - /** `session-20260930-180642`, from before. */ private val LEGACY = Regex("""^session-(\d{8})-(\d{6})(-\d+)?$""") @Volatile @@ -51,20 +23,12 @@ object SessionPaths { @Volatile private var ended: File? = null - /** - * The folder for the session now starting, or the one already in progress. With logs turned - * off on the main screen the folder lives in the app's cache instead of Downloads - the - * scripts and the compositor still need somewhere to write - and [release] deletes it. - * [label] says what is being run (see [label]); without one it comes from the session's state. - */ @Synchronized fun beginOrCurrent(context: Context, label: String? = null): File { dir?.let { if (it.isDirectory) return it } val parent = if (SessionPrefs.logsEnabled(context)) SessionFiles.logDirectory(context) else File(context.cacheDir, "session-logs") val day = SimpleDateFormat("yyyy-MM-dd", Locale.US).format(Date()) - // The day's highest number plus one, not a count: pruning removes the oldest folders, and - // a count would hand out a number already in use. val last = parent.listFiles()?.mapNotNull { f -> NAMED.matchEntire(f.name)?.takeIf { f.name.startsWith("$day-") }?.groupValues?.get(4)?.toIntOrNull() }?.maxOrNull() ?: 0 @@ -80,14 +44,8 @@ object SessionPaths { fun current(): File? = dir - /** The folder of the session that ended last, while it is still there: what its Share logs sends. */ fun lastEnded(): File? = ended?.takeIf { it.isDirectory } - /** - * The ending session takes its folder with it: the next session (one that replaces this one - * in place) then claims a folder of its own instead of sharing, and this one's collector - * finishes the folder it was handed. Called on the main thread as the session stops. - */ @Synchronized fun take(): File? { val taken = dir @@ -98,22 +56,14 @@ object SessionPaths { fun file(name: String): File? = dir?.let { File(it, name) } - /** Let the next session claim a new folder. Called when a session ends. */ @Synchronized fun release(context: Context, ended: File) { - // Only the session that owns the folder lets go of it (take() usually has already): the - // next session may have claimed its own by the time the last one's collector gets here. if (dir == ended) dir = null - // A folder kept in the cache was never meant to outlive its session. if (ended != null && ended.path.startsWith(context.cacheDir.path)) { com.droiddeck.launcher.core.FileUtils.delete(ended) } } - /** - * What a session's folder is named for: Steam, the desktop, or the program started from the - * rail by its own name (`2026-10-01-02-retroarch`). - */ fun label(mode: String, program: String?): String = when (mode) { SessionService.MODE_RUN -> com.droiddeck.launcher.frontend.Library.nameForProgram(program) ?: program?.substringAfterLast('/') @@ -122,21 +72,15 @@ object SessionPaths { else -> mode } - /** Whether [f] is a session's folder, in either naming. */ fun isSessionFolder(f: File): Boolean = f.isDirectory && (NAMED.matches(f.name) || LEGACY.matches(f.name)) - /** - * Oldest first: by day, then by when in the day. A folder from before the new naming sorts - * ahead of a new one from the same day, which it always predates. - */ val chronological: Comparator<File> = compareBy { f -> NAMED.matchEntire(f.name)?.groupValues?.let { g -> "${g[1]}${g[2]}${g[3]}1${g[4].padStart(6, '0')}" } ?: LEGACY.matchEntire(f.name)?.groupValues?.let { g -> "${g[1]}0${g[2]}${g[3].removePrefix("-").padStart(2, '0')}" } ?: f.name } - /** Every session folder in the places logs are written, oldest first. */ fun sessionFolders(context: Context): List<File> = (com.droiddeck.launcher.runtime.LinuxRuntime.logDir(context).listFiles { f -> isSessionFolder(f) }?.toList() ?: emptyList()) .sortedWith(chronological) diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionPipController.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionPipController.kt index 92070761db..1b26e7de29 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionPipController.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionPipController.kt @@ -12,7 +12,6 @@ import android.widget.Toast import com.droiddeck.launcher.R import com.droiddeck.launcher.SessionActivity -/** Owns Android's PiP parameters, while the service continues to own the session. */ class SessionPipController( private val activity: SessionActivity, private val bounds: () -> Rect, diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt index 5e1387cab5..49aa2e9ba7 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt @@ -4,12 +4,17 @@ 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.core.ZramSupport +import com.droiddeck.launcher.gpu.Cardboard import com.droiddeck.launcher.gpu.ScreenEffects import org.json.JSONObject -/** The in-session switches: the HUD and how the on-screen controls decide to appear. */ object SessionPrefs { + data class GameTextureFiltering(val anisotropy: Int? = null, val lodBias: String? = null) + const val SUSPEND_AUTO = "auto" const val SUSPEND_NATIVE = "native" const val SUSPEND_MANUAL = "manual" @@ -26,10 +31,8 @@ object SessionPrefs { const val OSC_ALWAYS = "always" const val OSC_STEAM_QAM = "steam-qam" const val OSC_NEVER = "never" - /** Steam's touch controller (SteamTouchControls) in place of the app's pad; Steam sessions only. */ const val OSC_STEAM_TOUCH = "steam-touch" - /** What Back does in a Steam session, first press then second: the labels of the two orders. */ val BACK_MENU_THEN_QAM = R.string.back_menu_then_qam val BACK_QAM_THEN_MENU = R.string.back_qam_then_menu @@ -55,7 +58,6 @@ object SessionPrefs { prefs(context).edit().putInt("orientation", orientation).apply() } - /** Whether the launcher hides Android's status and navigation bars. */ fun launcherFullscreen(context: Context): Boolean = prefs(context).getBoolean("launcherFullscreen", true) fun setLauncherFullscreen(context: Context, on: Boolean) { @@ -68,14 +70,27 @@ object SessionPrefs { prefs(context).edit().putBoolean("animations", on).apply() } - /** The store download engine's speed tier (stores/download/StoreDownloadTier ids); Fast unless chosen otherwise. */ + fun gameStoresEnabled(context: Context): Boolean = prefs(context).getBoolean("gameStoresEnabled", true) + + fun setGameStoresEnabled(context: Context, on: Boolean) { + prefs(context).edit().putBoolean("gameStoresEnabled", on).apply() + } + fun gameStoresSpeedTier(context: Context): String = prefs(context).getString("gameStoresSpeedTier", "fast") ?: "fast" fun setGameStoresSpeedTier(context: Context, tier: String) { prefs(context).edit().putString("gameStoresSpeedTier", tier).apply() } - /** Which tab a signed-in store opens on when its chip is picked: [STORES_OPEN_LIBRARY] or [STORES_OPEN_STORE]. */ + /** + * Hidden A/B switch for the Epic installer: "adaptive" (default: native parallel fetch written + * straight into staged files), "lookahead" (the native ordered-lookahead engine that caches each + * chunk and copies it into staged files), "batch" (the older whole-cache native fetch, then + * native assembly; needs about twice the game's size free) or "java" (the bounded Java writer). + * No UI; set it in the `session` preferences for benchmarks. + */ + fun storesEpicMode(context: Context): String = prefs(context).getString("storesEpicMode", "adaptive") ?: "adaptive" + fun storesOpenTab(context: Context): String = prefs(context).getString("storesOpenTab", STORES_OPEN_LIBRARY)?.takeIf { it == STORES_OPEN_STORE } ?: STORES_OPEN_LIBRARY @@ -83,35 +98,44 @@ object SessionPrefs { prefs(context).edit().putString("storesOpenTab", if (tab == STORES_OPEN_STORE) STORES_OPEN_STORE else STORES_OPEN_LIBRARY).apply() } - /** Mature titles (the stores' own 17+/18 ratings or adult tags) in the storefront's shelves and search; off by default. Owned games always show. */ fun storesShowMature(context: Context): Boolean = prefs(context).getBoolean("storesShowMature", false) fun setStoresShowMature(context: Context, show: Boolean) { prefs(context).edit().putBoolean("storesShowMature", show).apply() } + fun storesSort(context: Context): String = + prefs(context).getString("storesSort", null)?.takeIf { it in STORES_SORTS } ?: STORES_SORTS.first() + + fun setStoresSort(context: Context, sort: String) { + prefs(context).edit().putString("storesSort", if (sort in STORES_SORTS) sort else STORES_SORTS.first()).apply() + } + + fun storesView(context: Context): String = + prefs(context).getString("storesView", null)?.takeIf { it in STORES_VIEWS } ?: STORES_VIEWS.first() + + fun setStoresView(context: Context, view: String) { + prefs(context).edit().putString("storesView", if (view in STORES_VIEWS) view else STORES_VIEWS.first()).apply() + } + + val STORES_SORTS = listOf("lastPlayed", "recentlyInstalled", "titleAsc", "titleDesc", "sizeDesc", "sizeAsc", "releaseDateDesc") + val STORES_VIEWS = listOf("cards", "list") + const val STORES_OPEN_LIBRARY = "library" const val STORES_OPEN_STORE = "store" - /** The install root picked last time the Stores asked where (a StoreInstallRoot target's path); only the dialog's default, never a silent choice. */ fun storesInstallTarget(context: Context): String = prefs(context).getString("storesInstallTarget", "") ?: "" fun setStoresInstallTarget(context: Context, path: String) { prefs(context).edit().putString("storesInstallTarget", path).apply() } - /** How many store downloads run at once, 1..3; one by default (a single download already fills the link). */ fun gameStoresParallel(context: Context): Int = prefs(context).getInt("gameStoresParallel", 1).coerceIn(1, 3) fun setGameStoresParallel(context: Context, count: Int) { prefs(context).edit().putInt("gameStoresParallel", count.coerceIn(1, 3)).apply() } - /** - * The session's performance HUD (the fps box). A Deck-mode Steam session with the performance - * overlay has Steam's own (mangoapp, from the QAM), so there the HUD is off unless turned on - * in one - a choice kept apart from every other session's, where it stays on by default. - */ fun hudEnabled(context: Context): Boolean = prefs(context).getBoolean(hudKey(context), !mangoappSession(context)) fun setHudEnabled(context: Context, on: Boolean) { @@ -120,11 +144,21 @@ object SessionPrefs { private fun hudKey(context: Context) = if (mangoappSession(context)) "hudDeck" else "hud" - /** A Steam session with Deck mode's performance overlay (mangoapp). */ private fun mangoappSession(context: Context) = SessionState.mode == SessionService.MODE_STEAM && mangoapp(context) - /** When enabled, a single Back opens Steam QAM and a double Back opens the session menu. */ + fun lowLatencyController(context: Context): Boolean = prefs(context).getBoolean("lowLatencyController", false) + + fun setLowLatencyController(context: Context, on: Boolean) { + prefs(context).edit().putBoolean("lowLatencyController", on).apply() + } + + fun lowLatencyTouch(context: Context): Boolean = prefs(context).getBoolean("lowLatencyTouch", false) + + fun setLowLatencyTouch(context: Context, on: Boolean) { + prefs(context).edit().putBoolean("lowLatencyTouch", on).apply() + } + fun backActionsInverted(context: Context): Boolean = prefs(context).getBoolean("backActionsInverted", false) fun setBackActionsInverted(context: Context, inverted: Boolean) { @@ -136,9 +170,6 @@ object SessionPrefs { const val TOUCH_DIRECT = "direct" const val TOUCH_OFF = "off" - /** How touch drives the pointer: a touchpad (drag moves it from where it is) or direct - * (it jumps under the finger). Auto = touchpad on the desktop, direct in Steam. - * Off ignores touches on the guest picture; Android controls remain usable. */ fun touchMode(context: Context): String = prefs(context).getString("touch", TOUCH_AUTO) ?: TOUCH_AUTO fun setTouchMode(context: Context, mode: String) { @@ -149,12 +180,6 @@ object SessionPrefs { const val SHAPE_WIDE = "16:9" const val SHAPE_EXACT = "exact" - /** - * The shape of the display the session presents: the panel's own (never narrower than 16:9), - * exactly the panel's (a 4:3 or 3:2 handheld, drawn edge to edge), or a fixed 16:9. A foldable defaults to 16:9, which sits with modest bars on either of its - * panels; the panel's own shape would fit one and leave a strip on the other, and gamescope's - * display cannot change size once the session is up. - */ private fun shapeMode(context: Context): String = prefs(context).getString("shape", null) ?: if (context.packageManager.hasSystemFeature("android.hardware.sensor.hinge_angle")) SHAPE_WIDE else SHAPE_AUTO @@ -165,12 +190,6 @@ object SessionPrefs { prefs(context).edit().putString("osc", mode).apply() } - /** - * The imported glibc Turnip every session draws with inside the runtime - Steam, its games and - * the desktop alike, as they run on the same GPU; "" = the driver built into the runtime. - * Resolved by LinuxVulkanDriver at session start. It was once chosen per mode: the Steam - * session's choice, the one nearly everyone set, carries over. - */ fun linuxDriver(context: Context): String = prefs(context).getString("linuxDriver", null) ?: prefs(context).getString("linuxDriver.steam", null) @@ -182,12 +201,8 @@ object SessionPrefs { const val GPU_DRIVERS_AUTO = "auto" const val GPU_DRIVERS_MANUAL = "manual" + const val GPU_DRIVERS_MIX = "mix" - /** - * Who picks the GPU drivers: [GPU_DRIVERS_AUTO] (the app, the matched pair recommended for - * this GPU, kept current - DriverPairs) or [GPU_DRIVERS_MANUAL] (the user). Auto for new - * installs; see settleGpuDriverMode. - */ fun gpuDriverMode(context: Context): String = prefs(context).getString("gpuDriverMode", GPU_DRIVERS_AUTO) ?: GPU_DRIVERS_AUTO @@ -195,10 +210,6 @@ object SessionPrefs { prefs(context).edit().putString("gpuDriverMode", mode).apply() } - /** - * Auto arrived after people had picked drivers by hand: an install that chose either driver - * keeps its choice (Manual), everyone else is Auto. Decided once, at process start. - */ fun settleGpuDriverMode(context: Context) { val p = prefs(context) if (p.contains("gpuDriverMode")) return @@ -206,7 +217,6 @@ object SessionPrefs { p.edit().putString("gpuDriverMode", if (chosen) GPU_DRIVERS_MANUAL else GPU_DRIVERS_AUTO).apply() } - /** Drivers Auto downloaded: the only ones it removes when a newer pair replaces them. */ fun gpuAutoInstalled(context: Context): Set<String> = prefs(context).getStringSet("gpuAutoInstalled", emptySet()).orEmpty() @@ -214,9 +224,15 @@ object SessionPrefs { prefs(context).edit().putStringSet("gpuAutoInstalled", ids.toSet()).apply() } - // The Steam client's own sound has one route now: DirectAudio's engine inside the PulseAudio - // daemon (PulseAudioComponent), one step from Android. The old "clientDirectAudio" boolean - // (which meant the relay route, one hop more) is no longer read. + + fun picturePosition(context: Context): String = + prefs(context).getString("picturePosition", "center") + ?.takeIf { it in listOf("top", "bottom", "center") } ?: "center" + + fun setPicturePosition(context: Context, position: String) { + prefs(context).edit().putString("picturePosition", + position.takeIf { it in listOf("top", "bottom", "center") } ?: "center").apply() + } fun stretch16x9(context: Context): Boolean = prefs(context).getBoolean("stretch16x9", false) @@ -225,20 +241,14 @@ object SessionPrefs { } - /** - * DirectAudio for games: their Wine audio driver talks to the relay helper on this side. On - * unless the user turned it off. - */ fun directAudio(context: Context): Boolean = prefs(context).getBoolean("directAudio", true) fun setDirectAudio(context: Context, on: Boolean) { prefs(context).edit().putBoolean("directAudio", on).apply() } - /** The microphone for voice chat, off until the user turns it on (which asks for RECORD_AUDIO). */ fun micEnabled(context: Context): Boolean = prefs(context).getBoolean("mic", false) - /** Whether the app has already asked for the microphone once at start-up. */ fun micAsked(context: Context): Boolean = prefs(context).getBoolean("micAsked", false) fun setMicAsked(context: Context) { @@ -249,7 +259,6 @@ object SessionPrefs { prefs(context).edit().putBoolean("mic", on).apply() } - /** Optional SSID reporting and scans. A Location grant alone never opts the user in. */ fun wifiDiscoveryEnabled(context: Context): Boolean = prefs(context).getBoolean("wifiDiscovery", false) fun setWifiDiscoveryEnabled(context: Context, on: Boolean) { @@ -262,41 +271,35 @@ object SessionPrefs { prefs(context).edit().putBoolean("wifiDiscoveryAsked", true).apply() } - /** - * Whether the client's own core pick is overridden. When on, BL_CLIENT_CPUS is sent even when - * it names every core - unlike a game mask, the point here is to undo a pin Steam applies to - * itself, and the scheduler's default is exactly what Steam's choice takes away. - */ - fun clientCpusOverride(context: Context): Boolean = prefs(context).getBoolean("clientCpusOverride", false) + 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 setClientCpusOverride(context: Context, on: Boolean) { prefs(context).edit().putBoolean("clientCpusOverride", on).apply() } - /** Comma-separated core list for the client (taskset -c syntax); "" = every core. */ - fun clientCpus(context: Context): String = prefs(context).getString("clientCpus", "") ?: "" + fun clientCpus(context: Context): String = coreAllocation(context).clientCpus fun setClientCpus(context: Context, list: String) { prefs(context).edit().putString("clientCpus", list).apply() } - /** Comma-separated core list for games (taskset -c syntax); "" = every core = nothing sent. */ - fun gameCpus(context: Context): String = prefs(context).getString("gameCpus", "") ?: "" + fun gameCpus(context: Context): String = coreAllocation(context).gameCpus fun setGameCpus(context: Context, list: String) { prefs(context).edit().putString("gameCpus", list).apply() } - /** - * Whether Steam's xalia helper is kept out of the session (PROTON_USE_XALIA=0). - * - * xalia is an x86 Windows program Proton launches to give Windows programs gamepad navigation. - * Under FEX it cannot load the session's aarch64 preload shim, so its socket() and memfd calls - * reach the vendor's seccomp filter raw; where that answers ENOSYS - a Galaxy Fold, measured - - * it storms, and the session dies seconds after Big Picture appears. On by default: where it - * does run, it sits beside every game under FEX for nothing a controller-first session needs - * (about 10% of a core beside Once Upon a KATAMARI on an SD 8 Gen 2). - */ fun noXalia(context: Context): Boolean = prefs(context).getBoolean("noXalia", true) fun setNoXalia(context: Context, on: Boolean) { @@ -320,10 +323,6 @@ object SessionPrefs { const val SYNC_FSYNC = "fsync" const val SYNC_WINESERVER = "wineserver" - /** - * The sync Proton games use, as the three switches above decide it: droiddeck-ntsync wins - * while it is on, then droiddeck-fsync first, then droiddeck-esync, and wineserver alone while all three are off. - */ fun syncBackend(context: Context): String = syncBackendOf(fastSync(context), fsyncFirst(context), syncFallback(context)) fun syncBackendOf(fastSync: Boolean, fsyncFirst: Boolean, syncFallback: Boolean): String = when { @@ -333,7 +332,6 @@ object SessionPrefs { else -> SYNC_WINESERVER } - /** Picks one sync for Proton games; the switches change together, in one write. */ fun setSyncBackend(context: Context, backend: String) { require(backend == SYNC_ESYNC || backend == SYNC_NTSYNC || backend == SYNC_FSYNC || backend == SYNC_WINESERVER) { "unknown sync $backend" } prefs(context).edit() @@ -349,45 +347,27 @@ object SessionPrefs { prefs(context).edit().putBoolean("syncFallback", on).apply() } - /** - * Whether gamescope asks for realtime-priority Vulkan queues (GAMESCOPE_FORCE_VULKAN_REALTIME=1, - * which the app's gamescope build honours without CAP_SYS_NICE). Off by default, as in - * Bannerlator's session: the compositor's queue preempting the game's buys nothing on a device - * whose GPU is waiting on the CPU. - */ fun gamescopeRealtime(context: Context): Boolean = prefs(context).getBoolean("gamescopeRealtime", false) fun setGamescopeRealtime(context: Context, on: Boolean) { prefs(context).edit().putBoolean("gamescopeRealtime", on).apply() } - /** - * Whether proot runs without its seccomp acceleration (PROOT_NO_SECCOMP=1). - * - * proot normally installs a seccomp filter so only the syscalls it must rewrite stop in the - * tracer; everything else runs untraced, which is most of proot's speed. Where a vendor kernel - * handles that filter badly the wrong calls are trapped or refused - ENOSYS from calls that - * plainly exist is the signature - and the fallback is to trace everything instead: slower, - * but correct. Max's advice for devices whose kernels "don't work well with it". - */ - /** Hold the GPU at its top clock during a session (GpuClockPin). Off by default: power and heat. */ fun gpuClockPin(context: Context): Boolean = prefs(context).getBoolean("gpuClockPin", false) fun setGpuClockPin(context: Context, on: Boolean) { prefs(context).edit().putBoolean("gpuClockPin", on).apply() } + /** Whether the game's busiest threads are named to the power HAL for a boost (GameThreadHints). */ + fun gameThreadHints(context: Context): Boolean = prefs(context).getBoolean("gameThreadHints", true) + fun prootNoSeccomp(context: Context): Boolean = prefs(context).getBoolean("prootNoSeccomp", false) fun setProotNoSeccomp(context: Context, on: Boolean) { prefs(context).edit().putBoolean("prootNoSeccomp", on).apply() } - /** - * Whether the session's path lookups take proot's fast path (ProotFastPath): answered inside - * each process instead of a round trip through the tracer. On by default; it needs proot's - * seccomp filter, so it is off whenever proot runs without one. - */ fun prootFastPath(context: Context): Boolean = prefs(context).getBoolean("prootFastPath", true) fun setProotFastPath(context: Context, on: Boolean) { @@ -410,43 +390,21 @@ object SessionPrefs { return trimmed.takeIf { Regex("[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?").matches(it) } } - /** - * Turnip's sysmem rendering (TU_DEBUG=sysmem) for the runtime's driver: bypasses GMEM tiling. - * On by default, as WinNative runs every Linux session: Chromium -> ANGLE -> Zink draws the - * client's interface as many small render passes, each paying GMEM's load/store and binning, - * and WinNative's A/B on an Adreno 840 put a game ahead with it too (Palworld 42.8 against 41.3). - */ fun tuSysmem(context: Context): Boolean = prefs(context).getBoolean("tuSysmem", true) fun setTuSysmem(context: Context, on: Boolean) { prefs(context).edit().putBoolean("tuSysmem", on).apply() } - /* - * The client's interface is drawn Chromium -> ANGLE -> Zink -> Turnip, and that chain is what - * limits its menus (~14 fps on an Adreno 840 while a game ran 89). These make the chain - * cheaper rather than asking for more; the three environment switches are on by default, - * Deck mode off. Bannerlator's LinuxTuning, carried over; none device-proven here yet. - */ - /** mesa_glthread=true: GL marshalled off the calling thread. */ fun glThread(context: Context): Boolean = prefs(context).getBoolean("glThread", true) fun setGlThread(context: Context, on: Boolean) { prefs(context).edit().putBoolean("glThread", on).apply() } - /** MESA_NO_ERROR=1: no GL error checking. */ fun noGlError(context: Context): Boolean = prefs(context).getBoolean("noGlError", true) fun setNoGlError(context: Context, on: Boolean) { prefs(context).edit().putBoolean("noGlError", on).apply() } - /** - * What the pad is to the Steam client: [CONTROLLER_DECK], a Steam Deck controller (Quick Access - * button, gyro, Steam Input's full treatment - SteamDeckPad), [CONTROLLER_STEAM], a 2025 Steam - * Controller (the same, plus grip sense and its own haptics), [CONTROLLER_DS4] or - * [CONTROLLER_DUALSENSE], a PlayStation pad with its touchpad fed by the trackpads, or - * [CONTROLLER_XBOX360], the plain Xbox 360 pad of earlier versions (QAM by the Guide+A chord). - */ fun steamController(context: Context): String = prefs(context).getString("steamController", CONTROLLER_DECK) ?: CONTROLLER_DECK fun setSteamController(context: Context, id: String) { prefs(context).edit().putString("steamController", id).apply() } - /** [steamController]'s choice as libfakeinput's pad type (FakeInputWriter.PAD_TYPE_*). */ fun padType(id: String): Int = when (id) { CONTROLLER_STEAM -> com.droiddeck.launcher.input.FakeInputWriter.PAD_TYPE_STEAM CONTROLLER_XBOX360 -> com.droiddeck.launcher.input.FakeInputWriter.PAD_TYPE_XBOX @@ -455,24 +413,15 @@ object SessionPrefs { else -> com.droiddeck.launcher.input.FakeInputWriter.PAD_TYPE_DECK } - /** - * Deck mode's performance overlay (mangoapp, beside gamescope): the QAM's Overlay Level draws - * through it. Off is the way out where Valve's mangoapp crashes (one Turnip build did). - */ fun mangoapp(context: Context): Boolean = prefs(context).getBoolean("mangoapp", true) fun setMangoapp(context: Context, on: Boolean) { prefs(context).edit().putBoolean("mangoapp", on).apply() } - /** - * Zink's lazy descriptor mode (ZINK_DESCRIPTORS=lazy) with its compact set layout - * (ZINK_DEBUG=compact) for the client's GL-on-Vulkan UI, as WinNative runs it. On by default. - */ fun zinkLazy(context: Context): Boolean = prefs(context).getBoolean("zinkLazy", true) fun setZinkLazy(context: Context, on: Boolean) { prefs(context).edit().putBoolean("zinkLazy", on).apply() } - /** The Android driver the compositor loads: "" = pick by GPU, else a bundled or imported id. */ @JvmStatic fun androidDriver(context: Context): String = prefs(context).getString("androidDriver", "") ?: "" @@ -481,12 +430,7 @@ object SessionPrefs { prefs(context).edit().putString("androidDriver", id).apply() } - // ── Storage the session can see ───────────────────────────────────────────────────────────── - /** - * The folder on this device that every session shows at `/root/ROMs`, for the emulators on the - * desktop. "" = none chosen. All of internal storage is at `/root/Storage` regardless. - */ fun romsDir(context: Context): String = prefs(context).getString("romsDir", "") ?: "" @@ -494,11 +438,6 @@ object SessionPrefs { prefs(context).edit().putString("romsDir", path).apply() } - /** - * Whether a session keeps its folder under files/logs. Off, the same logs are kept in - * the app's cache for the session's lifetime (the scripts need somewhere to write) and thrown - * away at the end, so nothing accumulates in Downloads. - */ fun logsEnabled(context: Context): Boolean = prefs(context).getBoolean("logs", true) @@ -506,7 +445,6 @@ object SessionPrefs { prefs(context).edit().putBoolean("logs", on).apply() } - /** Steam storage-call diagnostics are opt-in because they add timing work to file operations. */ fun storageDiagnosticsEnabled(context: Context): Boolean = prefs(context).getBoolean("storageDiagnostics", false) @@ -514,24 +452,19 @@ object SessionPrefs { prefs(context).edit().putBoolean("storageDiagnostics", on).apply() } - // ── Per-mode display ──────────────────────────────────────────────────────────────────── + fun vacDiagnostics(context: Context): Boolean = + prefs(context).getBoolean("vac_diagnostics", false) + + fun setVacDiagnostics(context: Context, on: Boolean) { + prefs(context).edit().putBoolean("vac_diagnostics", on).apply() + } - /** - * The tallest the session's display may be, in pixels, for MODE_STEAM / MODE_DESKTOP: - * 0 = the panel's own height, otherwise a cap. Both modes default to 720p: the client's CEF - * is the heaviest thing in a session, Big Picture is drawn for a TV at arm's length, and on - * a handheld panel 720p is where its menus stay responsive on a regular flagship; the desktop - * and the emulators under it get the same GPU headroom. Read once, when the session's display - * is sized; a cap the user chose wins over the default. - */ private fun resolutionCap(context: Context, mode: String): Int = prefs(context).getInt("resolutionCap.$mode", 720) - /** Whether the user chose the mode's resolution (a cap or a custom size) rather than the default. */ fun resolutionChosen(context: Context, mode: String): Boolean = prefs(context).contains("displayResolution.$mode") || prefs(context).contains("resolutionCap.$mode") || customResolution(context, mode) != null - /** One per-mode choice now owns both dimensions; old caps/shapes are read only for migration. */ fun resolutionChoice(context: Context, mode: String, panel: Pair<Int, Int>): String { val saved = prefs(context) saved.getString("displayResolution.$mode", null)?.let { value -> @@ -554,24 +487,10 @@ object SessionPrefs { prefs(context).edit().putString("displayResolution.$mode", value).apply() } - /** - * The FEXCore preset for the games the client launches (core/FexPreset ids); "" = FEX's defaults. - * Performance + TSO unless chosen, WinNative's default: FEX's own defaults keep half-barrier TSO - * and full-precision x87, which cost every x86 game time; a game that needs them can still be - * given another preset. - */ fun fexPreset(context: Context): String = prefs(context).getString("fexPreset", DEFAULT_FEX_PRESET) ?: DEFAULT_FEX_PRESET private const val DEFAULT_FEX_PRESET = "PERFORMANCE_TSO" - /** - * Force SSBS for Proton games: Wine resumes threads from a Windows CONTEXT that never carries - * PSTATE.SSBS, so they run with speculative store bypass disabled; libssbs.so keeps it set - * (on DiRT 3 / GE-Proton: from ~99% of a game's threads running without it to none). The - * speed-up is reported on Oryon cores (Snapdragon 8 Elite) and was not measurable on an - * 8 Gen 3, so it is off unless turned on. A game's own environment can still say - * DROIDDECK_FORCE_SSBS=0. - */ fun forceSsbs(context: Context): Boolean = prefs(context).getBoolean("forceSsbs", false) fun setForceSsbs(context: Context, on: Boolean) { @@ -586,18 +505,39 @@ object SessionPrefs { .onFailure { android.util.Log.e("GameEnvironment", "Could not update game environment", it) } } - /** Whether opening DroidDeck starts a Steam session instead of showing the front end. */ + fun steamClientArch(context: Context): String = prefs(context).getString("steamClientArch", null) ?: "arm64" + + fun setSteamClientArch(context: Context, id: String) { + prefs(context).edit().putString("steamClientArch", id).apply() + } + + /** The running session's client, else the selected one: a changed setting applies from the next session. */ + fun activeSteamClientArch(context: Context): String = + SessionState.steamClientArch?.takeIf { SessionState.running } ?: steamClientArch(context) + + fun activeSteamRoot(context: Context): java.io.File = steamRoot(context, activeSteamClientArch(context)) + + fun steamRoot(context: Context, arch: String): java.io.File = java.io.File( + com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), + if (arch == "x86_64") "root/.droiddeck-x64/.local/share/Steam" else "root/.local/share/Steam", + ) + + fun bootMovie(context: Context): String = + prefs(context).getString("bootMovie", BootMovie.DROIDDECK_30) ?: BootMovie.DROIDDECK_30 + fun setBootMovie(context: Context, id: String) { prefs(context).edit().putString("bootMovie", id).apply() } + fun bootMovieSound(context: Context): Boolean = prefs(context).getBoolean("bootMovieSound", true) + fun setBootMovieSound(context: Context, on: Boolean) { prefs(context).edit().putBoolean("bootMovieSound", on).apply() } + fun bootMovieCustomName(context: Context): String? = prefs(context).getString("bootMovieCustomName", null) + fun setBootMovieCustomName(context: Context, name: String?) { + prefs(context).edit().apply { if (name == null) remove("bootMovieCustomName") else putString("bootMovieCustomName", name) }.apply() + } + fun runSteamAtStartup(context: Context): Boolean = prefs(context).getBoolean("runSteamAtStartup", false) fun setRunSteamAtStartup(context: Context, on: Boolean) { prefs(context).edit().putBoolean("runSteamAtStartup", on).apply() } - /** - * The Games folders earlier builds let the user add (one game per subfolder); read only by - * GamesFolderMigration, which turns them into entries and clears them. The single folder an - * even earlier build kept is carried in. - */ fun addedGamesDirs(context: Context): List<String> { val p = prefs(context) val list = p.getString("addedGamesDirs", null) @@ -610,10 +550,6 @@ object SessionPrefs { prefs(context).edit().putString("addedGamesDirs", dirs.distinct().joinToString("\n")).remove("addedGamesDir").apply() } - /** - * The Games folders earlier builds had (host path, guest path), still bound into the session so - * their games keep their paths; written once by GamesFolderMigration. - */ fun gameFolderBinds(context: Context): List<Pair<String, String>> = (prefs(context).getString("gameFolderBinds", "") ?: "").split('\n').mapNotNull { line -> line.split('\t').takeIf { it.size == 2 && it[0].isNotEmpty() && it[1].isNotEmpty() }?.let { it[0] to it[1] } @@ -623,17 +559,12 @@ object SessionPrefs { prefs(context).edit().putString("gameFolderBinds", binds.distinctBy { it.first }.joinToString("\n") { "${it.first}\t${it.second}" }).apply() } - /** The Games folders were turned into entries (GamesFolderMigration); a record, not a gate. */ fun gamesFoldersMigrated(context: Context): Boolean = prefs(context).getBoolean("gamesFoldersMigrated", false) fun setGamesFoldersMigrated(context: Context) { prefs(context).edit().putBoolean("gamesFoldersMigrated", true).apply() } - /** - * Game folders (by path) the user removed from the added games: a scan skips them, so they - * stay off the Games tab and out of Steam until restored. Nothing on disk is touched. - */ fun removedAddedGames(context: Context): List<String> = (prefs(context).getString("removedAddedGames", "") ?: "").split('\n').filter { it.isNotEmpty() } @@ -644,31 +575,24 @@ object SessionPrefs { } } - /** An added game's name as the user set it (in the app, or in Steam's Properties); "" = automatic. */ fun addedGameName(context: Context, folderPath: String): String = prefs(context).getString("addedName:$folderPath", "") ?: "" fun setAddedGameName(context: Context, folderPath: String, name: String) { prefs(context).edit().putString("addedName:$folderPath", name.trim()).apply() } - /** An added game's Start in, as the session sees it; "" = the exe's own folder. */ fun addedGameStartIn(context: Context, folderPath: String): String = prefs(context).getString("addedStartIn:$folderPath", "") ?: "" fun setAddedGameStartIn(context: Context, folderPath: String, guestDir: String) { prefs(context).edit().putString("addedStartIn:$folderPath", guestDir.trim()).apply() } - /** An added game's launch options, as Steam takes them ("-dx11", "VAR=1 %command%"). */ fun addedGameLaunch(context: Context, folderPath: String): String = prefs(context).getString("addedLaunch:$folderPath", "") ?: "" fun setAddedGameLaunch(context: Context, folderPath: String, options: String) { prefs(context).edit().putString("addedLaunch:$folderPath", options.trim()).apply() } - /** - * The last value of [field] (AppName, StartDir, LaunchOptions) taken over from Steam's own - * Properties for this game, so the same Steam edit is not taken again over a later app edit. - */ fun addedGameAdopted(context: Context, folderPath: String, field: String): String? = prefs(context).getString("addedAdopted:$field:$folderPath", null) @@ -676,7 +600,6 @@ object SessionPrefs { prefs(context).edit().putString("addedAdopted:$field:$folderPath", value).apply() } - /** Where an added game's art for [slot] comes from when the user chose it ("folder", "steam", "sgdb", "file"); "" = automatic. */ fun addedGameArtSource(context: Context, folderPath: String, slot: String): String = prefs(context).getString("addedArt:$slot:$folderPath", "") ?: "" @@ -684,14 +607,12 @@ object SessionPrefs { prefs(context).edit().putString("addedArt:$slot:$folderPath", source).apply() } - /** Whether added games without art of their own get Steam's store art fetched for them. */ fun addedGamesArt(context: Context): Boolean = prefs(context).getBoolean("addedGamesArt", true) fun setAddedGamesArt(context: Context, on: Boolean) { prefs(context).edit().putBoolean("addedGamesArt", on).apply() } - /** The .exe the user chose for one game folder (by its path), "" = the scanner's pick. */ fun addedGameExe(context: Context, folderPath: String): String = prefs(context).getString("addedExe:$folderPath", "") ?: "" private val addedGameLock = Any() @@ -709,31 +630,54 @@ object SessionPrefs { unchanged } - /** The shortcut appid stored for the folder, or null before its first scan. */ fun addedGameStoredAppId(context: Context, folderPath: String): Long? = prefs(context).getLong("addedAppId:$folderPath", 0L).takeIf { it != 0L } + fun followStoreGame(context: Context, key: String, folderPath: String, gone: (String) -> Boolean) = synchronized(addedGameLock) { + val p = prefs(context) + val previous = p.getString("storeFolder:$key", null) + if (previous == folderPath) return@synchronized + if (previous != null && !gone(previous)) return@synchronized + val edit = p.edit().putString("storeFolder:$key", folderPath) + if (previous != null && !p.contains("addedAppId:$folderPath")) { + val moved = movedAddedGame(p.all, previous, folderPath) + moved.keys.forEach { edit.remove(it) } + moved.values.forEach { (name, value) -> + when (value) { + is String -> edit.putString(name, value) + is Long -> edit.putLong(name, value) + is Int -> edit.putInt(name, value) + is Boolean -> edit.putBoolean(name, value) + is Float -> edit.putFloat(name, value) + } + } + val removed = removedAddedGames(context) + if (previous in removed) edit.putString("removedAddedGames", removed.map { if (it == previous) folderPath else it }.joinToString("\n")) + } + edit.apply() + } + + internal fun movedAddedGame(all: Map<String, *>, from: String, to: String): Map<String, Pair<String, Any?>> = + all.filterKeys { it.startsWith("added") && it.endsWith(":$from") }.mapValues { (name, value) -> + val moved = if (value is String && (value == from || value.startsWith("$from/"))) to + value.removePrefix(from) else value + name.removeSuffix(from) + to to moved + } + fun addedGameAppId(context: Context, folderPath: String, first: Long): Long = synchronized(addedGameLock) { val p = prefs(context) p.getLong("addedAppId:$folderPath", 0L).takeIf { it != 0L } ?: first.also { p.edit().putLong("addedAppId:$folderPath", it).apply() } } - /** The app's colour theme (ui/Themes ids); Graphite unless chosen otherwise. */ fun theme(context: Context): String = prefs(context).getString("theme", "graphite") ?: "graphite" fun setTheme(context: Context, id: String) { prefs(context).edit().putString("theme", id).apply() } - /** - * A fixed size for the session's display, per mode, or null. When set it replaces both the - * cap and the shape: the compositor fits it to the panel with bars where the shapes differ. - */ private fun customResolution(context: Context, mode: String): Pair<Int, Int>? = parseResolution(prefs(context).getString("customRes.$mode", null)) - /** "1024x768" (or ×, or *) to an even size inside 320x240..3840x2160; anything else is null. */ fun parseResolution(text: String?): Pair<Int, Int>? { val parts = text?.trim()?.split('x', 'X', '×', '*')?.map { it.trim() } ?: return null if (parts.size != 2) return null @@ -743,25 +687,12 @@ object SessionPrefs { return Pair(w and 1.inv(), h and 1.inv()) } - /** - * HDR10 output for MODE_STEAM / MODE_DESKTOP. Off by default. Honoured only when the panel - * lists HDR10 (HdrSupport), and decided when the compositor starts, which is once per app - * process: a change applies after the app is fully closed and opened again. - */ fun hdr(context: Context, mode: String): Boolean = prefs(context).getBoolean("hdr.$mode", false) fun setHdr(context: Context, mode: String, on: Boolean) { prefs(context).edit().putBoolean("hdr.$mode", on).apply() } - /** - * The session's frame cap, 0 for none. One number used everywhere a frame is paced: gamescope's - * -r (what the client and its games see as the display's rate), the compositor's buffer release - * pacer, the rate the display layer votes for, and the panel mode picked, which is the fastest - * one the cap divides evenly (40 on a 120 Hz panel, not on a 144 Hz one). A 60 fps cap on a - * 144 Hz panel with nothing else changed judders; this is what WinNative's per-shortcut limit - * does. Applies next session. - */ fun fpsLimit(context: Context, mode: String): Int = prefs(context).getInt("fpsLimit.$mode", 0) fun setFpsLimit(context: Context, mode: String, fps: Int) { @@ -770,28 +701,19 @@ object SessionPrefs { val fpsLimitChoices = listOf(0 to "Off", 30 to "30", 40 to "40", 45 to "45", 60 to "60", 90 to "90", 120 to "120") - /** [fpsLimitChoices] labelled in the app's language. */ fun fpsLimitChoices(context: Context): List<Pair<Int, String>> = fpsLimitChoices.map { (fps, label) -> fps to if (fps == 0) context.getString(R.string.frame_gen_off) else label } - /** - * How the compositor resizes the session onto the panel (WaylandCompositor.nativeSetUpscaler's - * modes). Linear is the default; Nearest preserves hard pixel edges. Spatial filters work - * when enlarged; Sharpen only works at any size. The old Off/Linear and FSR/FSR Fit pairs - * are equivalent on Wayland, so saved aliases resolve to one choice. - */ val upscalerChoices = listOf( 0 to "Linear", 2 to "Nearest", 4 to "AMD FSR 1", 3 to "Snapdragon GSR", 8 to "Snapdragon GSR (quality)", 7 to "NVIDIA NIS", 6 to "Sharpen only", ) - /** The [upscalerChoices] labels that are words rather than product names. */ private val upscalerLabels = mapOf( 0 to R.string.sprefs_upscaler_linear, 2 to R.string.sprefs_upscaler_nearest, 8 to R.string.sprefs_upscaler_gsr_quality, 6 to R.string.sprefs_upscaler_sharpen, ) - /** [upscalerChoices] labelled in the app's language; the English list stays for the device report. */ fun upscalerChoices(context: Context): List<Pair<Int, String>> = upscalerChoices.map { (mode, label) -> mode to (upscalerLabels[mode]?.let(context::getString) ?: label) } @@ -815,9 +737,7 @@ object SessionPrefs { prefs(context).edit().putInt("upscaleSharpness", pct.coerceIn(0, 100)).apply() } - // ── Screen effects and texture filtering (the Display page) ───────────────────────────── - /** The compositor's post chain as last set; off until the user picks a Look or moves a row. */ fun screenEffects(context: Context): ScreenEffects { val text = prefs(context).getString("screenEffects", null) ?: return ScreenEffects.OFF return runCatching { ScreenEffects.decode(JSONObject(text)) }.getOrDefault(ScreenEffects.OFF) @@ -827,9 +747,27 @@ object SessionPrefs { prefs(context).edit().putString("screenEffects", effects.encode().toString()).apply() } + const val CARDBOARD_KEY = "cardboard" + + fun cardboard(context: Context): Cardboard { + val text = prefs(context).getString(CARDBOARD_KEY, null) ?: return Cardboard.OFF + return runCatching { Cardboard.decode(JSONObject(text)) }.getOrDefault(Cardboard.OFF) + } + + fun setCardboard(context: Context, cardboard: Cardboard) { + prefs(context).edit().putString(CARDBOARD_KEY, cardboard.encode().toString()).apply() + } + + fun cardboardSourceBeforeSteamVr(context: Context): Int = prefs(context).getInt("cardboardSourceBeforeSteamVr", -1) + + fun setCardboardSourceBeforeSteamVr(context: Context, source: Int) { + prefs(context).edit().putInt("cardboardSourceBeforeSteamVr", source).apply() + } + + fun sessionPrefs(context: Context): android.content.SharedPreferences = prefs(context) + val textureAnisotropyChoices = TextureFiltering.ANISOTROPY.map { it to if (it == 0) "Off" else "${it}x" } - /** [textureAnisotropyChoices] labelled in the app's language. */ fun textureAnisotropyChoices(context: Context): List<Pair<Int, String>> = textureAnisotropyChoices.map { (value, label) -> value to if (value == 0) context.getString(R.string.frame_gen_off) else label } @@ -841,7 +779,6 @@ object SessionPrefs { } } - /** [textureLodBiasChoices] labelled in the app's language. */ fun textureLodBiasChoices(context: Context): List<Pair<String, String>> = textureLodBiasChoices.map { (value, label) -> value to when (value) { TextureFiltering.LOD_BIAS_OFF -> context.getString(R.string.frame_gen_off) @@ -850,7 +787,6 @@ object SessionPrefs { } } - /** Anisotropic filtering forced on DirectX 9-11 games (core/TextureFiltering); 0 = the game's own. */ fun textureAnisotropy(context: Context): Int = prefs(context).getInt("textureAnisotropy", 0).takeIf { it in TextureFiltering.ANISOTROPY } ?: 0 @@ -859,7 +795,6 @@ object SessionPrefs { publishGameEnvironment(context) } - /** Texture sharpness: the mip LOD bias choice (TextureFiltering.LOD_BIAS), "0" = the game's own. */ fun textureLodBias(context: Context): String = prefs(context).getString("textureLodBias", null)?.takeIf { it in TextureFiltering.LOD_BIAS } ?: TextureFiltering.LOD_BIAS_OFF @@ -868,16 +803,79 @@ object SessionPrefs { publishGameEnvironment(context) } - /** Hands the change to the next game launch (GameEnvironmentStore); the running game keeps its own. */ + fun gameTextureFiltering(context: Context, scope: String): GameTextureFiltering { + require(GameEnvironment.validScope(scope)) + return gameTextureFiltering(context)[scope] ?: GameTextureFiltering() + } + + fun gameTextureFiltering(context: Context): Map<String, GameTextureFiltering> { + val json = runCatching { + JSONObject(prefs(context).getString("gameTextureFiltering", null) ?: "{}") + }.getOrElse { JSONObject() } + return buildMap { + json.keys().forEach { scope -> + if (!GameEnvironment.validScope(scope)) return@forEach + val entry = json.optJSONObject(scope) ?: return@forEach + val anisotropy = entry.optInt("anisotropy").takeIf { + entry.has("anisotropy") && it in TextureFiltering.ANISOTROPY + } + val lodBias = entry.optString("lodBias").takeIf { + entry.has("lodBias") && it in TextureFiltering.LOD_BIAS + } + if (anisotropy != null || lodBias != null) { + put(scope, GameTextureFiltering(anisotropy, lodBias)) + } + } + } + } + + fun setGameTextureAnisotropy(context: Context, scope: String, value: Int?) { + require(value == null || value in TextureFiltering.ANISOTROPY) + updateGameTextureFiltering(context, scope) { it.copy(anisotropy = value) } + } + + fun setGameTextureLodBias(context: Context, scope: String, choice: String?) { + require(choice == null || choice in TextureFiltering.LOD_BIAS) + updateGameTextureFiltering(context, scope) { it.copy(lodBias = choice) } + } + + fun clearGameTextureFiltering(context: Context, scope: String) { + require(GameEnvironment.validScope(scope)) + val choices = gameTextureFiltering(context).toMutableMap() + if (choices.remove(scope) == null) return + saveGameTextureFiltering(context, choices) + publishGameEnvironment(context) + } + + private fun updateGameTextureFiltering( + context: Context, + scope: String, + change: (GameTextureFiltering) -> GameTextureFiltering, + ) { + require(GameEnvironment.validScope(scope)) + val choices = gameTextureFiltering(context).toMutableMap() + val next = change(choices[scope] ?: GameTextureFiltering()) + if (next.anisotropy == null && next.lodBias == null) choices.remove(scope) else choices[scope] = next + saveGameTextureFiltering(context, choices) + publishGameEnvironment(context) + } + + private fun saveGameTextureFiltering(context: Context, choices: Map<String, GameTextureFiltering>) { + val json = JSONObject() + choices.forEach { (id, choice) -> + json.put(id, JSONObject().apply { + choice.anisotropy?.let { put("anisotropy", it) } + choice.lodBias?.let { put("lodBias", it) } + }) + } + prefs(context).edit().putString("gameTextureFiltering", json.toString()).apply() + } + private fun publishGameEnvironment(context: Context) { runCatching { GameEnvironmentStore.publish(context) } .onFailure { android.util.Log.e("GameEnvironment", "Could not update game environment", it) } } - /** - * The mode whose per-mode settings apply: a program run under gamescope (MODE_RUN) is a - * fullscreen session like Steam's, so it takes Steam's display, driver and HDR choices. - */ fun prefMode(mode: String): String = if (mode == SessionService.MODE_RUN) SessionService.MODE_STEAM else mode fun pipAutoEnter(context: Context): Boolean = prefs(context).getBoolean("pipAutoEnter", false) @@ -886,7 +884,6 @@ object SessionPrefs { prefs(context).edit().putBoolean("pipAutoEnter", enabled).apply() } - /** A foldable's unfolded panel shows the game above the Deck controls (SessionDisplay.unfoldedGameHeight). */ fun unfoldedControls(context: Context): Boolean = prefs(context).getBoolean("unfoldedControls", false) fun setUnfoldedControls(context: Context, enabled: Boolean) { @@ -896,8 +893,6 @@ object SessionPrefs { const val SURFACE_STICK = "stick" const val SURFACE_TRACKPAD = "trackpad" - /** The Deck controls' gamepad tab: what each side is - an analog stick or a Steam trackpad. - * Left a stick and right a trackpad until changed, as a Deck is mostly played. */ fun gamepadSurface(context: Context, right: Boolean): String = prefs(context).getString(if (right) "gamepadRight" else "gamepadLeft", null) ?: if (right) SURFACE_TRACKPAD else SURFACE_STICK @@ -910,7 +905,6 @@ object SessionPrefs { prefs(context).getString("suspendPolicy.${prefMode(mode)}", SUSPEND_MANUAL) ?.let { if (it == LEGACY_SUSPEND_DOWNLOADS) SUSPEND_AUTO else it } ?.takeIf { it in setOf(SUSPEND_AUTO, SUSPEND_NATIVE, SUSPEND_MANUAL, SUSPEND_NEVER) } - // Direct games share Steam's settings but have no Steam client to prepare. ?.let { if (mode != SessionService.MODE_STEAM && it == SUSPEND_NATIVE) SUSPEND_AUTO else it } ?: SUSPEND_MANUAL @@ -945,15 +939,16 @@ object SessionPrefs { }.apply() } - // ── Game storage ──────────────────────────────────────────────────────────────────────── + fun zramCompression(context: Context): Boolean { + val prefs = prefs(context) + return if (prefs.contains("zramCompression")) prefs.getBoolean("zramCompression", false) else ZramSupport.recommended(context) + } + + fun setZramCompression(context: Context, on: Boolean) { + prefs(context).edit().putBoolean("zramCompression", on).apply() + } + - /** - * A second Steam library on this device: the folder bound at /mnt/droiddeck-sd and - * registered with the client, which then asks where to install every game and shows both - * on its Storage page. "" = automatic: the SD card when one is in the phone (the default, - * so the choice is made inside the client like anywhere else); GAME_STORAGE_OFF = internal - * only; otherwise the folder chosen. - */ fun gameStorage(context: Context): String = prefs(context).getString("gameStorage", "") ?: "" const val GAME_STORAGE_OFF = "off" diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt index 77031187a8..5459d67fb7 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt @@ -50,32 +50,16 @@ import java.util.Date import java.util.Locale import java.util.UUID -/** - * Owns the running session: the proot tree, the audio daemon, the network link and the locks that - * keep all three alive while the app is not on screen. - * - * The session deliberately does **not** belong to the activity. Android demotes a process the - * moment it loses its last visible activity, and the low-memory killer then reaps the guest - so - * leaving Big Picture to answer a message would come back to a dead Steam. A foreground service - * holds the process at perceptible priority, a partial wake lock keeps the CPU from dropping the - * guest's threads, and a high-performance WiFi lock keeps the radio out of power-save so a - * backgrounded download does not throttle to nothing. All three are Bannerlator's recipe, where - * each was added to fix a failure seen on a device. - * - * The activity comes and goes on top of this; see [com.droiddeck.launcher.wayland.CompositorHost]. - */ class SessionService : Service() { override fun attachBaseContext(newBase: android.content.Context) = super.attachBaseContext(com.droiddeck.launcher.core.AppLanguage.wrap(newBase)) private val components = java.util.concurrent.CopyOnWriteArrayList<SessionPart>() - /** The Steam Deck controller's sysfs binds (SteamDeckPad), when this session has one. */ private var deckBinds: List<String> = emptyList() private val stopLock = Any() private var wakeLock: PowerManager.WakeLock? = null private var wifiLock: WifiManager.WifiLock? = null private var sessionPid = -1 - /** Auxiliary PTY-backed proot shells launched from a secondary-display terminal. */ private val auxiliaryProcesses = HashMap<Int, Long>() private val auxiliaryProcessesLock = Any() private val mainHandler = Handler(Looper.getMainLooper()) @@ -93,9 +77,11 @@ class SessionService : Service() { private var suspendPolicy = SessionPrefs.SUSPEND_MANUAL private var steamDownloadsInBackground = false private var activityVisible = true + private var xrActivityVisible = false + private var signInHold = false + private val hasVisibleSurface get() = sessionHasVisibleSurface(activityVisible || signInHold, screenOn, xrActivityVisible) private var screenOn = true private var manualPauseRequested = false - /** An explicit Steam sleep request is independent of the background policy. */ private var steamSleepToken: String? = null private var nativeSleepToken: String? = null private var nativeSleepReady = false @@ -104,7 +90,6 @@ class SessionService : Service() { private var suspendOperationPending = false private var pipTask = false private var suspendAttemptFailed = false - /** One validated game request waiting for this Steam session to reach a usable state. */ private var pendingSteamGameId: String? = null private var pendingSteamGameGeneration = -1 private val flushSteamGame = object : Runnable { @@ -123,7 +108,6 @@ class SessionService : Service() { updateSuspendPolicy() } } - /** Counts sessions this service has started; a process exit from an earlier one is ignored. */ @Volatile private var sessionGen = 0 override fun onCreate() { @@ -195,6 +179,26 @@ class SessionService : Service() { updateSuspendPolicy() return START_NOT_STICKY } + ACTION_XR_ACTIVITY_VISIBLE -> { + xrActivityVisible = true + resumeSession(panelVisible = false) + return START_NOT_STICKY + } + ACTION_XR_ACTIVITY_HIDDEN -> { + xrActivityVisible = false + suspendAttemptFailed = false + updateSuspendPolicy() + return START_NOT_STICKY + } + ACTION_SIGN_IN_HOLD -> { + val hold = intent?.getBooleanExtra(EXTRA_HOLD, false) == true + if (hold == signInHold) return START_NOT_STICKY + signInHold = hold + if (hold) manualPauseRequested = false + suspendAttemptFailed = false + updateSuspendPolicy() + return START_NOT_STICKY + } ACTION_SUSPEND_POLICY_CHANGED -> { if (!SessionState.running) return START_NOT_STICKY suspendPolicy = SessionPrefs.suspendPolicy(this, SessionState.mode) @@ -230,6 +234,8 @@ class SessionService : Service() { suspendPolicy = SessionPrefs.suspendPolicy(this, SessionState.mode) steamDownloadsInBackground = SessionPrefs.steamDownloadsInBackground(this) activityVisible = true + xrActivityVisible = false + signInHold = false screenOn = (getSystemService(Context.POWER_SERVICE) as? PowerManager)?.isInteractive ?: true manualPauseRequested = false suspendDownloadNow = false @@ -248,52 +254,34 @@ class SessionService : Service() { SessionState.programArgs = intent?.getStringArrayExtra(EXTRA_PROGRAM_ARGS)?.toList().orEmpty() SessionState.steamUi = intent?.getStringExtra(EXTRA_STEAM_UI) SessionState.steamUrl = intent?.getStringExtra(EXTRA_STEAM_URL) - SessionState.running = true + synchronized(stopLock) { + SessionState.steamClientArch = null + SessionState.running = true + } if (SessionState.stopRequested) { stopSession(0) return START_NOT_STICKY } - // Another Steam client on the device signs ours out seconds after every login; the one that - // does it here runs from boot without being opened. Only the Steam session signs in. - // The desktop too: its Steam launchers run the client right there (droiddeck-steam-launch). if (SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP) RivalClients.stopBeforeSession(this) SessionState.firstFrameSeen = false SessionState.guestPid = -1 SessionEvents.transition(SessionPhase.STARTING_GUEST, "service.started", mapOf("mode" to SessionState.mode)) - // Re-arm after clearing readiness: a retained picture can present between the activity's - // start request and this callback, and that notice must not be erased by the reset above. com.droiddeck.launcher.wayland.CompositorHost.newSession() - // This session's number, claimed here and not when its process starts: the session it - // replaces can report its own exit in the gap between the two, and that exit must not - // be taken as this one's. val gen = ++sessionGen cancelQueuedSteamGame(clearMailbox = false) clearSteamGameMailbox() acquireLocks() Thread({ - // A tree the last session left behind (the app was killed or crashed, so its teardown - // never ran) would hold the rootfs, the GPU and Steam's lock: nothing of ours should - // be alive between sessions outside this process. OrphanReaper.reap("session starting") runSession(gen) }, "session-start").start() - // The activity or the notification stops us; the system must not resurrect a session whose - // guest processes are long gone. return START_NOT_STICKY } - /** - * Finish the session's folder after the session has stopped, then let go of it. The guest - * script copies Steam's logs too, at a clean exit; this runs whatever killed the session, - * which is when they matter. The collecting itself is [SessionArtifacts], shared with the - * crash handler and the next-start sweep so a folder is finished whichever way it ends. - */ - private fun collectSessionArtifacts(dir: File) { + private fun collectSessionArtifacts(dir: File, steamArch: String?) { try { - SessionArtifacts.collect(this, dir, "session stopped") + SessionArtifacts.collect(this, dir, "session stopped", steamArch) } finally { - // Last, so everything above is in the file it is about - and only this session's: - // a session that replaced this one may already own the capture and the folder. SessionLogCapture.stopFor(dir) SessionPaths.release(this, dir) } @@ -322,10 +310,10 @@ class SessionService : Service() { return if (name.contains("710-720") || name.contains("710_720")) "sysmem" else null } - // ── The session ───────────────────────────────────────────────────────────────────────── private fun runSession(gen: Int) { SessionTerminal.clear() + com.droiddeck.launcher.gpu.TpUbwcHint.forThisDevice() try { LinuxRuntime.writeAccounts(this) } catch (e: Exception) { @@ -339,42 +327,38 @@ class SessionService : Service() { val runtimeDir = File(filesDir, ".wayland-rt").apply { mkdirs() } killStragglers() SessionFiles.stage(this, root) + // Earlier sessions' reports still read the Steam logs and VAC marker this session replaces. + SessionArtifacts.awaitCollections() + SessionArtifacts.finishAbandoned(this) + VacDiagnostics.arm(this) com.droiddeck.launcher.agent.AgentGuest.reset(this) - // The compat tool asks for an Epic game's sign-in code at every launch, the client's Play button included. + com.droiddeck.launcher.stores.gog.GogComet.begin() com.droiddeck.launcher.stores.StoreLaunchRequests.start(this) val sessionDir = openSessionFolder() val sessionLog = File(sessionDir, "session.log") Log.i(TAG, GpuClockPin.start(this)) + Log.i(TAG, GameThreadHints.start(this)) val size = SessionState.outputSize val guest = ArrayList<String>() - // The desktop's Steam launchers start the client there (droiddeck-steam-launch), through the - // same set-up as a Steam session: it gets what the client and its games are started with. val steamHere = SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP - // Some GPUs need a component Proton does not ship. Apply those before the guest, so the - // next game launch copies them into the prefix. A download failure is logged and the - // session still starts; the next session tries again. if (steamHere) { runCatching { ComponentsManager.ensureForcedPackages(this) } .onSuccess { if (it != null) Log.i(TAG, it) } .onFailure { Log.w(TAG, "forced components", it) } } addClientEnvironment(guest, steamHere) - // Where the fast path's description of proot's view goes, once the binds are known. + if (steamHere) guest.add("BL_EPIC_APP_ID=" + com.droiddeck.launcher.stores.epic.EpicClient.shortcutAppId) val fastPathAt = guest.size val pulse = startAudio(guest, sessionDir) guest.add("BL_WIDTH=" + size.first) guest.add("BL_HEIGHT=" + size.second) - // Follow screen: the output is resized under gamescope when a foldable opens or closes, - // and the session script asks gamescope to resize Steam's X screen along with it. if (SessionState.followScreen) guest.add("BL_FOLLOW_OUTPUT=1") if (SessionState.hdr) { - // The activity opened the compositor's HDR gate: gamescope offers HDR to its clients - // and DXVK takes the HDR10 swapchain when a game asks for one. guest.add("BL_HDR=1") guest.add("DXVK_HDR=1") Log.i(TAG, "hdr: gamescope --hdr-enabled, DXVK_HDR=1") @@ -388,10 +372,19 @@ class SessionService : Service() { val controllersOn = !File(Environment.getExternalStorageDirectory(), NO_PAD_SWITCH).exists() SessionState.deckPad = false deckBinds = emptyList() - if (controllersOn) addControllerEnvironment(guest, fakeInputDir, sessionDir) - // The user's own games, for the runtime's shortcuts writer to put in the client's library - // before the client starts (see frontend/AddedGames and droiddeck-steam-shortcuts). - if (steamHere) { + if (controllersOn) { + addControllerEnvironment(guest, fakeInputDir, sessionDir) + SessionState.padBridge?.syncConnectedControllers() + } + val noSteamGame = noSteamGame() + if (noSteamGame) guest.add("BL_PIN_CORES=0") + if ((steamHere || SessionState.program == NoSteamLaunch.EPIC) && com.droiddeck.launcher.stores.epic.EpicClient.read(this).installed) { + runCatching { com.droiddeck.launcher.stores.epic.EpicClientLibrary.sync(this) } + .onFailure { Log.w(TAG, "Epic library sync failed", it) } + runCatching { com.droiddeck.launcher.stores.epic.EpicClient.prepareInstallDir(this) } + .onFailure { Log.w(TAG, "Epic install directory setup failed", it) } + } + if (steamHere || noSteamGame) { val added = com.droiddeck.launcher.frontend.AddedGames.scan(this) val listing = com.droiddeck.launcher.frontend.AddedGames.writeListing(this, added) guest.add("BL_ADDED_GAMES=" + listing.path) @@ -399,9 +392,7 @@ class SessionService : Service() { if (com.droiddeck.launcher.gpu.Lossless.owned(this)) guest.add("BL_LOSSLESS_OWNED=1") if (added.isNotEmpty()) Log.i(TAG, "added games: " + added.joinToString { "${it.name} (${it.exe.name})" }) } - // Where the guest leaves a request for another session (the desktop's Steam launchers). guest.add("BL_LAUNCH_DIR=" + sessionRoot.path) - // The second library's name, for droiddeck-steam-library; the bind itself is made below. GameStorage.effective(this)?.let { guest.add("BL_LIBRARY_LABEL=" + it.label.replace('"', ' ')) } if (SessionState.mode == MODE_STEAM && SessionState.steamUi == "desktop") guest.add("BL_STEAM_UI=desktop") val shellGuest = ArrayList(guest).apply { @@ -417,13 +408,7 @@ class SessionService : Service() { guest.add(it) Log.i(TAG, "steam: handing the client $it") } - // A game whose download finishes in this session gets its Windows components readied in it. if (SessionState.mode == MODE_STEAM) com.droiddeck.launcher.frontend.SessionInstalls.watch(this) - // A program under gamescope: the script's run mode takes the path (an AppImage, a script - // or a binary inside the runtime). This is how an emulator gets the GPU - the desktop's - // KWin composites in software and offers no dma-buf, so a Vulkan swapchain cannot exist - // there (RPCS3 died with VK_ERROR_SURFACE_LOST); gamescope's Xwayland is the path the - // Steam games already render through. if (SessionState.mode == MODE_RUN) { val program = SessionState.program if (program.isNullOrEmpty()) { @@ -436,12 +421,9 @@ class SessionService : Service() { Log.i(TAG, "run: $program (${SessionState.programArgs.size} arguments) under gamescope") } - // Android has no /dev/shm; the cache stands in for it and, unlike the real thing, keeps - // whatever a session leaves behind. The client abandons tens of megabytes of streams a run. - FileUtils.clear(File(cacheDir, "shm")) + FileUtils.clear(File(LinuxRuntime.liveDir(this), "shm")) val binds = sessionBinds(controllersOn, fakeInputDir, sessionDir, guest, sessionRoot, runtimeDir) - // The fast path is told exactly the rootfs and binds proot is given (ProotFastPath). val fastPathKey = if (ProotFastPath.enabled(this)) { val prootBinds = LinuxRuntime.binds( this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds, @@ -464,11 +446,7 @@ class SessionService : Service() { val hostEnv = HostEnvironment() hostEnv["PROOT_LOADER"] = LinuxRuntime.prootLoader(this).path - hostEnv["PROOT_TMP_DIR"] = cacheDir.path - // proot links against a libtalloc beside it, and Android's linker does not search an - // executable's own directory: unnamed, the process dies before it starts and says so only - // in `logcat -b crash`. - // proot reads this itself, so it belongs in proot's own environment rather than the guest's. + hostEnv["PROOT_TMP_DIR"] = LinuxRuntime.prootTempDir(this).path if (SessionPrefs.prootNoSeccomp(this)) { hostEnv["PROOT_NO_SECCOMP"] = "1" Log.i(TAG, "proot: seccomp acceleration off by request") @@ -489,8 +467,6 @@ class SessionService : Service() { SessionTerminal.prepare(terminalCommand, terminalHostEnvironment.map { (key, value) -> "$key=$value" }.toTypedArray(), root, gen) } - // Whether the client signs in to Valve or starts offline: read once, while it starts, and - // rewritten by the client when it exits, so it is set again here at every session start. if (SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP) OfflineMode.apply(this, root) val networkLink = LinuxNetworkLinkComponent(this, root) @@ -510,17 +486,14 @@ class SessionService : Service() { watchLaunchRequests(sessionRoot) watchSyncWanted(root) EsyncPacks.fetchInBackground(this, root) - // One session replacing another (the desktop's Steam launchers): the old proot is killed - // by the teardown a second after the new one has started, and its exit used to arrive - // here as "session ended: 137" and end the NEW session. An exit belongs to the session - // that started it. val pid = HostProcess.start(line, hostEnv.asArray(), root, { status -> if (gen != sessionGen) { Log.i(TAG, "an earlier session's process ended ($status); the current one carries on") return@start } - Log.i(TAG, "session ended: $status") - stopSession(status ?: -1) + val program = programStatus(sessionRoot) + Log.i(TAG, "session ended: $status" + if (program != null) " (program $program)" else "") + stopSession(program ?: status ?: -1) }, null) Log.i(TAG, "session pid $pid, log ${sessionLog.path}") if (gen != sessionGen || !SessionState.running) { @@ -563,10 +536,7 @@ class SessionService : Service() { } } - /** The session's own log folder, opened and filled with what is known before anything starts. */ private fun openSessionFolder(): File { - // One folder per session, claimed by whoever started first - the activity starts the - // compositor before this service runs - so the compositor's log lands in the same place. val sessionDir = SessionPaths.beginOrCurrent(this) val sessionLog = File(sessionDir, "session.log") SessionState.logFile = sessionLog @@ -574,152 +544,110 @@ class SessionService : Service() { SessionState.sessionId = sessionDir.name SessionState.eventsFile = File(sessionDir, "events.jsonl") SessionEvents.record("session.logs_ready", mapOf("logDir" to sessionDir.path)) - // Written first, so a session that dies in its first second still says what it ran on. DeviceReport.write(this, File(sessionDir, "device.txt"), SessionState.mode) NetworkReport.write(this, File(sessionDir, "network.txt")) - // Everything the app decides from here on - the driver it chose, the audio line, a rival - // client stopped, the exit status - reaches logcat and nowhere a user can get at. Mirror it. SessionLogCapture.start(File(sessionDir, "app.log")) return sessionDir } - /** The guest's base environment: paths, the display, the GL/Vulkan stack and the client's switches. */ private fun addClientEnvironment(guest: MutableList<String>, steamHere: Boolean) { guest.add("/usr/bin/env") guest.add("-i") + guest.add("DROIDDECK_BWRAP_SOCKET=" + com.droiddeck.launcher.runtime.BwrapSpawner.socket(this)) guest.add("HOME=/root") guest.add("USER=root") guest.add("PATH=/usr/local/bin:/usr/bin:/bin") guest.add("TERM=xterm-256color") guest.add("LANG=C.UTF-8") - // Steam's interface language: the app's (Setup's choice, or the system's). The system's - // region decides between Spain's and Latin American Spanish, which the app has one of. guest.add("BL_STEAM_LANGUAGE=" + SteamLanguage.forLocale( com.droiddeck.launcher.core.AppLanguage.effective(this), com.droiddeck.launcher.core.AppLanguage.system(this).country, )) - // Without this the session is UTC: the client's clock, its logs and every timestamp in a - // session bundle sit hours off the device's. Bannerlator carries the same line. guest.add("TZ=" + java.util.TimeZone.getDefault().id) guest.add("XDG_RUNTIME_DIR=" + LinuxRuntime.GUEST_RUNTIME_DIR) guest.add("XDG_SESSION_TYPE=wayland") guest.add("WAYLAND_DISPLAY=wayland-0") guest.add("BL_ANDROID_CLIPBOARD=" + File(filesDir, "session/android-clipboard").path) guest.add("GAMESCOPE_FORCE_GENERAL_QUEUE=1") - // Steam's CEF needs GL and the rootfs ships no native GL driver: route it through Zink. guest.add("MESA_LOADER_DRIVER_OVERRIDE=zink") guest.add("GALLIUM_DRIVER=zink") guest.add("LIBGL_KOPPER_DRI2=true") LinuxRuntime.vulkanIcd(this)?.let { guest.add("VK_ICD_FILENAMES=" + it.path) } - // An imported glibc Turnip, when one is set (by the user, or by Auto): the session script - // checks the manifest and its library from inside and points the loader at it with - // VK_DRIVER_FILES, so the runtime's own driver above stays untouched and is what a bad - // import falls back to. One driver for every session: the driver's shader cache is keyed on - // its build, and with one per mode every emulator compiled its shaders twice. val linuxDriverId = SessionPrefs.linuxDriver(this) + SessionState.runtimeDriver = linuxDriverId + com.droiddeck.launcher.gpu.AutoDriverTrial.sessionStarting( + this, + com.droiddeck.launcher.wayland.CompositorHost.displayChoice.takeIf { com.droiddeck.launcher.wayland.CompositorHost.isStarted } + ?: SessionPrefs.androidDriver(this), + linuxDriverId, + ) LinuxVulkanDriver.resolveIcdPath(this, linuxDriverId) ?.let { guest.add(LinuxVulkanDriver.ENV + "=" + it) } - // Turnip's own debug switches, for the runtime's driver and everything on it. The file in - // Downloads holds the value verbatim ("sysmem", "sysmem,deck_emu"); with nothing there, an - // imported driver from the A710/A720/A722 legs gets "sysmem" on its own, which is what both - // its authors advise for those GPUs and what nothing else in the list needs. tuDebug(linuxDriverId)?.let { guest.add("TU_DEBUG=$it") } - // Zink renders the client's UI (Chromium -> ANGLE -> Zink -> Turnip). Lazy descriptors is - // the mode Zink recommends where the driver has no descriptor buffer, and what Ludashi ships - // by default for its Zink path; a switch here because on one Fold the menus run at 14 fps. - // compact packs Zink's descriptor sets into fewer, so a draw binds less (WinNative's default). + 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") } - // The rest of the client-interface switches (SessionPrefs): GL marshalled off the calling - // thread and no GL error checks. if (SessionPrefs.glThread(this)) guest.add("mesa_glthread=true") if (SessionPrefs.noGlError(this)) guest.add("MESA_NO_ERROR=1") - // Mesa's shader cache as one database instead of a file per entry. Every lookup in the - // file cache is an open and every store an open and a rename, each a proot stop (a rename - // two), for every pipeline DXVK, vkd3d-proton and Zink compile or find; the database is - // opened once and read and written with pread/pwrite, which proot never sees. Mesa removes - // the old folder itself once it has gone a week untouched. guest.add("MESA_DISK_CACHE_DATABASE=1") - // glibc's per-thread rseq registration is refused by Android's app seccomp policy, so - // every thread start paid a SIGSYS that proot answers; the malloc top pad grows the heap - // 16 MB at a time instead of 128 KB, and every brk(2) is a proot stop too. guest.add("GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.malloc.top_pad=16777216") if (SessionState.mode == MODE_STEAM) guest.add("BL_MANGOAPP=" + (if (SessionPrefs.mangoapp(this)) "1" else "0")) + 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) } + if (arch == "x86_64") FexCatalog.cached(this)?.let { guest.addAll(FexCatalog.environment(it)) } + } if (SessionState.mode == MODE_STEAM) { guest.add("BL_GAMESCOPE_STRETCH_16X9=" + (if (SessionPrefs.stretch16x9(this)) "1" else "0")) } - // Proton's own gate for its xalia helper (its `proton` script reads this, and sets - // XALIA_SUPPORTED_ONLY itself otherwise). Skipped by default: under FEX it costs every game - // a slice of a core for gamepad navigation the session already has. if (SessionPrefs.noXalia(this)) guest.add("PROTON_USE_XALIA=0") guest.add("BL_SYNC=" + (if (SessionPrefs.fastSync(this)) "1" else "0")) guest.add("BL_SYNC_FALLBACK=" + (if (SessionPrefs.syncFallback(this)) "1" else "0")) guest.add("BL_FSYNC_FIRST=" + (if (SessionPrefs.fsyncFirst(this)) "1" else "0")) - // gamescope's realtime Vulkan queues (the session script turns this into - // GAMESCOPE_FORCE_VULKAN_REALTIME); off unless the user turns it on. guest.add("BL_GAMESCOPE_REALTIME=" + (if (SessionPrefs.gamescopeRealtime(this)) "1" else "0")) + if (SessionState.mode == MODE_STEAM && SessionPrefs.zramCompression(this) && + com.droiddeck.launcher.core.ZramSupport.supported()) guest.add("BL_ZRAM=1") guest.add("BANNER_AUDIO_DIRECT_DECAY=0") - // Anything else, for a device that cannot be reached with a debugger: droiddeck-env in the - // app's own external files (envSwitchFile) holds KEY=VALUE lines that go into the session's - // environment as written, after ours, so a line here wins. Zink and Turnip tunables - // (ZINK_DESCRIPTORS=lazy, MESA_*), gamescope's, the client's - whatever the experiment - // needs, without a build per attempt. extraEnv().forEach { guest.add(it) } - // The agent bridge's experiment lines (AgentEnv), after the user's so an agent's win. com.droiddeck.launcher.agent.AgentEnv.beginSession(this).forEach { guest.add(it) } - // Core masks, Bannerlator's two (cfca3912). The client's is sent whenever the override is - // on, even naming every core: it exists to undo the pin Steam applies to its own interface - // renderer, and the scheduler's default is exactly what that pin takes away. A game's is - // sent only when it is a real restriction - a game has no pin of its own to undo. - if (steamHere && SessionPrefs.clientCpusOverride(this)) { + val clientPinned = steamHere && SessionPrefs.clientCpusOverride(this) + if (clientPinned) { guest.add("BL_CLIENT_CPUS=" + CpuCores.listOrAll(SessionPrefs.clientCpus(this))) } - // The game cores also pin the desktop and a program from the rail; without a choice the - // session script picks every core but the slowest cluster for those (program_cores). - CpuCores.restrictionOrEmpty(SessionPrefs.gameCpus(this)) + CpuCores.gameLaunchList(SessionPrefs.gameCpus(this), clientPinned) .takeIf { it.isNotEmpty() }?.let { guest.add("BL_GAME_CPUS=$it") } } - /** PulseAudio, and the DirectAudio relay when a path needs it; returns the daemon for suspend and resume. */ + private fun noSteamGame(): Boolean = + SessionState.mode == MODE_RUN && SessionState.program in setOf(NoSteamLaunch.PROTON_RUN, NoSteamLaunch.EPIC) + private fun startAudio(guest: MutableList<String>, sessionDir: File): PulseAudioComponent { - // PulseAudio always: the client is a native Linux program and has no other way to make a - // sound - its menus, its music and its voice chat all go through here. DirectAudio is not - // an alternative to it on this path: it replaces the audio driver INSIDE Wine, so it - // changes what games do and leaves the client alone. The microphone is its own opt-in on - // top, and the helper only opens an input stream when asked - so a user who wants game - // sound but no recording gets exactly that, and Android's recording indicator stays off. - // The desktop starts Windows programs through the same Proton wrappers (droiddeck-proton-run). - val wantsDirectAudio = (SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP) && + val wantsDirectAudio = (SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP || noSteamGame()) && SessionPrefs.directAudio(this) val wantsMic = SessionPrefs.micEnabled(this) && checkSelfPermission(android.Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED - // Both paths sit under the app's files directory, which the session binds at its own path, - // so the same string is valid on both sides and nothing has to be translated. + guest.add("BL_MIC_ENABLED=" + if (wantsMic) "1" else "0") + guest.add("BANNER_AUDIO_DIRECT_MIC=" + if (wantsMic) "1" else "0") val audioDir = File(filesDir, "directaudio").apply { mkdirs() } val relaySocket = File(audioDir, "relay.sock") val micFifo = if (wantsMic) File(audioDir, "mic.fifo") else null val audioLog = File(sessionDir, "audio.log") val pulse = PulseAudioComponent(this, micFifo?.absolutePath) - // The client's own sound: DirectAudio's engine inside the daemon, one step from Android (the - // daemon runs on the Android side). The relay below is for games and the microphone only. pulse.setLogFile(audioLog) pulse.attach(this) guest.add("PULSE_SERVER=unix:" + pulse.socket().absolutePath) components.add(pulse) if (wantsDirectAudio || wantsMic) { - // After the daemon in the list, so it can wait for the pipe the daemon makes. val relay = DirectAudioRelayComponent(relaySocket, micFifo) relay.setLogFile(audioLog) relay.attach(this) components.add(relay) } if (wantsDirectAudio) { - // Read by the Proton wrappers, which point Wine at the driver and name it in the - // prefix. Absent, they take an early return and the game uses Proton's own audio - so - // this variable is the whole of the selection. guest.add("BL_DIRECTAUDIO=/" + SessionFiles.DIRECTAUDIO_DIR) guest.add("BANNER_AUDIO_DIRECT_RELAY=" + relaySocket.absolutePath) } @@ -729,11 +657,8 @@ class SessionService : Service() { return pulse } - /** The fake evdev pads: the ring files the app writes and the identity SDL and Steam see. */ private fun addControllerEnvironment(guest: MutableList<String>, fakeInputDir: File, sessionDir: File) { FakeInputWriter.prepareRingSlots(fakeInputDir, 4) - // Virtual pads a client made last session (event16 and up, and their hidden rings) are - // not there any more; a client that crashed never took its own down. fakeInputDir.listFiles()?.forEach { file -> val node = Regex("event(\\d+)").matchEntire(file.name)?.groupValues?.get(1)?.toIntOrNull() if (file.name.startsWith(".uinput-") || (node != null && node >= FIRST_VIRTUAL_PAD)) file.delete() @@ -741,68 +666,44 @@ class SessionService : Service() { guest.add("FAKE_EVDEV_DIR=" + fakeInputDir.path) val rings = FakeInputWriter.getRingEnv(fakeInputDir) if (!rings.isNullOrEmpty()) guest.add("FAKE_EVDEV_MEMFD_PATHS=$rings") - // SDL and Steam key their mapping database on bus+vendor+product: only a known - // identity gets the standard layout without the user configuring the pad by hand. guest.add("FAKE_EVDEV_IDENTITY=xbox360") guest.add("FAKE_EVDEV_VIBRATION=1") val uinput = !File(Environment.getExternalStorageDirectory(), NO_UINPUT_SWITCH).exists() - // In Steam, the pad is what a Deck's is: a Steam Deck controller the client reads over - // hidraw (SteamDeckPad), which only works with Steam Input's virtual pad for games to read. - // Decided only once its sysfs is in place: without it the client would find no Deck, and - // with the Deck asked for the pad's own nodes are withdrawn - no controller at all. - // Set up whatever the pad is to be, so the drawer can switch it between a Deck, a Steam - // Controller and an Xbox 360 pad while the session runs (FakeInputWriter.setPadType). val wantsDeck = uinput && SessionState.mode == MODE_STEAM && SessionState.steamUi != "desktop" && !File(Environment.getExternalStorageDirectory(), NO_DECK_PAD_SWITCH).exists() - // Steam's touch controller rides on the Deck's sysfs and is offered only beside it. val wantsTouch = wantsDeck && !File(Environment.getExternalStorageDirectory(), NO_STEAM_TOUCH_SWITCH).exists() - // A paired Triton is exposed as a second native Steam Controller HID, with its original - // report IDs and output path, beside whatever the handheld's own pad is. val wantsTriton = wantsDeck && SteamControllerBle.hasPairedController(this) deckBinds = if (wantsDeck) SteamDeckPad.prepare(this, fakeInputDir.parentFile!!.parentFile!!, wantsTouch, wantsTriton, SessionPrefs.padType(SessionPrefs.steamController(this))) else emptyList() SessionState.deckPad = deckBinds.isNotEmpty() if (wantsDeck && !SessionState.deckPad) Log.w(TAG, "deck pad: not available this session; the pad stays an Xbox 360 controller") logControllersAtStart() + com.droiddeck.launcher.input.FakeInputWriter.setLowLatency(SessionPrefs.lowLatencyController(this), SessionPrefs.lowLatencyTouch(this)) if (uinput) { - // /dev/uinput, stood in for by libfakeinput: the virtual pad Steam Input makes for a - // game becomes a node the game reads, carrying the player's layout, as on a Deck. guest.add("FAKE_EVDEV_UINPUT=1") if (SessionState.deckPad) { guest.add("FAKE_EVDEV_DECK=1") if (wantsTriton) guest.add("FAKE_EVDEV_TRITON=1") - // What the pad starts as; the drawer's changes reach libfakeinput through the ring. val padType = SessionPrefs.steamController(this) guest.add("FAKE_EVDEV_PAD_TYPE=$padType") com.droiddeck.launcher.input.FakeInputWriter.setPadType(SessionPrefs.padType(padType)) - // Steam's touch controller (SteamTouchDevice): the file the app and libfakeinput share. if (wantsTouch) com.droiddeck.launcher.input.SteamTouchDevice.prepare(fakeInputDir)?.let { guest.add("FAKE_TOUCHCTL_RING=" + it.path) } guest.add("FAKE_DECK_SYSFS_LISTING=" + SteamDeckPad.listingDir(fakeInputDir.parentFile!!.parentFile!!).path) } } else if (SessionState.mode == MODE_STEAM) { - // Without it, games see the pad itself wearing Steam Input's virtual-gamepad identity - - // for games the client starts only. Everywhere else (the desktop, a program from the - // rail) that identity hides the pad: SDL ignores a Steam virtual gamepad unless it - // runs under Steam, so every SDL emulator came up with no controller. guest.add("FAKE_EVDEV_STEAM_VIRTUAL=1") } guest.add("SDL_JOYSTICK_DISABLE_UDEV=1") guest.add("SDL_HIDAPI_JOYSTICK_DISABLE_UDEV=1") - // The client reads a Deck controller through SDL's HIDAPI; a hint in the environment - // outranks the client's own. Nothing else is shown the Deck (libfakeinput). if (!SessionState.deckPad) guest.add("SDL_JOYSTICK_HIDAPI=0") - // The guest side of the pads (libfakeinput: which pads were opened, the Deck's hidraw and why - // it was refused) in pad.log beside the session's other logs, so it is in every shared zip. - // Setup-time lines only, nothing per input event. guest.add("FAKE_EVDEV_LOG=1") guest.add("FAKE_EVDEV_LOG_FILE=" + File(sessionDir, "pad.log").path) SessionState.fakeInputDir = fakeInputDir } - /** What proot binds into the guest: the pads, the battery, storage, the game library, added games and ROMs. */ private fun sessionBinds( controllersOn: Boolean, fakeInputDir: File, @@ -814,11 +715,6 @@ class SessionService : Service() { val binds = ArrayList<String>() if (controllersOn) binds.add(fakeInputDir.path + ":/dev/input") if (controllersOn) binds.addAll(deckBinds) - // The client's battery readout (the Quick Access Menu, the top bar) reads - // /sys/class/power_supply/BAT<n>/..., a laptop's or a Deck's naming; Android's supply is - // called "battery" and its files differ, so the client sees no battery at all. A directory - // of our own, written from Android's battery API every few seconds, is bound over it. - // Steam's time estimates come from /run/vpower instead, written straight into the rootfs. val battery = BatteryComponent( File(filesDir, "session/sys/power_supply"), File(LinuxRuntime.rootDir(this), "run/vpower"), @@ -826,60 +722,47 @@ class SessionService : Service() { battery.attach(this) components.add(battery) binds.add(battery.dir.path + ":/sys/class/power_supply") - // The overlay's CPU and GPU temperatures and the fan, as hwmon sensors it knows by name. val hwmon = HwmonComponent(File(filesDir, "session/sys/hwmon"), LinuxRuntime.rootDir(this)) if (hwmon.prepare()) { hwmon.attach(this) components.add(hwmon) binds.add(hwmon.dir.path + ":/sys/class/hwmon") } - // CPU load for everything in the session that reads /proc/stat, the overlay among them. val cpuStat = CpuStatComponent(File(filesDir, "session/proc-stat")) if (cpuStat.prepare()) { cpuStat.attach(this) components.add(cpuStat) binds.add(cpuStat.file.path + ":/proc/stat") } - // The GPU memory in use for the overlay's VRAM lines, which it would read from tracefs. val gpuMem = GpuMemComponent(File(LinuxRuntime.rootDir(this), "run/droiddeck-hud/gpu-mem"), LinuxRuntime.rootDir(this)) if (gpuMem.prepare()) { gpuMem.attach(this) components.add(gpuMem) } - // The GPU's load and temperature for the performance overlay, where KGSL's sysfs is refused. val gpuStats = GpuStatsComponent(File(filesDir, "session/sys/kgsl-3d0")) if (gpuStats.prepare()) { gpuStats.attach(this) components.add(gpuStats) binds.addAll(gpuStats.binds()) } - // Rumble for the on-screen pad: the fake evdev layer sends force-feedback effects to this - // listener, which drives the phone's vibrator (see RumbleComponent). if (controllersOn) components.add(RumbleComponent().also { it.attach(this) }) - // Where the device's files appear inside the session. Internal storage is bound at its own - // path already, and every program's file dialog opens at home and lists "Computer" from - // /proc/mounts, where a proot bind never shows - so a user saw only the runtime's own - // tree and could not find the phone at all. The same storage is placed under home as - // well, and the ROMs folder chosen on the main screen beside it; a bind rather than a - // link, so a folder on an SD card works the same. val home = File(LinuxRuntime.rootDir(this), "root") File(home, "Storage").mkdirs() binds.add(Environment.getExternalStorageDirectory().path + ":/root/Storage") - // A second Steam library: the storage chosen in the Steam cog, at the path the runtime's - // droiddeck-steam-library registers with the client. Nothing bound = the script removes - // the entry, so the client never offers a place that is not there. val library = GameStorage.effective(this) var storageDiagnosticLibrary: File? = null if (library != null) { val problem = GameStorage.prepare(this, library.path) if (problem == null) { File(LinuxRuntime.rootDir(this), "mnt/droiddeck-sd").mkdirs() - // Links, prefixes and Steam entries made before the rename still name the old path. File(LinuxRuntime.rootDir(this), "mnt/bannerlator-sd").mkdirs() try { - binds.addAll(SecondaryLibrary.binds(filesDir, File(library.path))) - storageDiagnosticLibrary = File(library.path) - Log.i(TAG, "game storage: ${library.path} -> /mnt/droiddeck-sd (\"${library.label}\"); prefixes and native tools private") + val configured = File(library.path) + val content = SecondaryLibrary.contentPath(configured) + binds.addAll(SecondaryLibrary.binds(filesDir, configured, content = content)) + storageDiagnosticLibrary = content + val route = if (content === configured) "configured" else "verified-native" + Log.i(TAG, "game storage: ${content.path} ($route) -> /mnt/droiddeck-sd (\"${library.label}\"); prefixes and native tools private") } catch (e: Exception) { Log.w(TAG, "game storage: private directories could not be prepared; internal only this session", e) } @@ -894,13 +777,11 @@ class SessionService : Service() { val device = StorageDiagnostics.writeSnapshot( sessionDir, target, selectedLibrary = if (storageDiagnosticLibrary != null) "secondary" else "internal", - removable = storageDiagnosticLibrary?.let { - runCatching { Environment.isExternalStorageRemovable(it) }.getOrDefault(false) - } ?: false, + removable = storageDiagnosticLibrary != null && library?.let { + runCatching { Environment.isExternalStorageRemovable(File(it.path)) }.getOrDefault(false) + } == true, ) if (device != null) { - // guest already has the session command at this point. Put these with the `env -i` - // assignments so they reach the Steam process instead of becoming script args. val envAt = guest.indexOf(LinuxRuntime.SESSION_SCRIPT).takeIf { it >= 0 } ?: guest.size guest.add(envAt, "BL_STORAGE_DIAGNOSTICS=1") guest.add(envAt + 1, "BL_STORAGE_DEVICE=$device") @@ -909,8 +790,6 @@ class SessionService : Service() { Log.w(TAG, "storage diagnostics: selected library could not be identified; metadata snapshot only") } } - // The user's own games folder (the Steam cog's "Added games"), bound at a fixed place so - // the shortcuts the app writes point somewhere whatever storage the folder is on. for (root in com.droiddeck.launcher.frontend.AddedGames.roots(this)) { if (root.host.isDirectory && root.host.canRead()) { File(LinuxRuntime.rootDir(this), root.guest.removePrefix("/")).mkdirs() @@ -920,8 +799,6 @@ class SessionService : Service() { Log.w(TAG, "added games: ${root.host} is not a readable folder this session") } } - // Store games installed on a card: each card's Games root at its own fixed place, so the - // shortcuts point somewhere whether or not the card is also the Steam library. for ((host, guest) in com.droiddeck.launcher.stores.StoreInstallRoot.externalRoots(this)) { if (host.isDirectory && host.canRead()) { File(LinuxRuntime.rootDir(this), guest.removePrefix("/")).mkdirs() @@ -929,7 +806,6 @@ class SessionService : Service() { Log.i(TAG, "store games: $host -> $guest") } } - // Folders of added scripts outside internal storage, where their links point. binds.addAll(com.droiddeck.launcher.runtime.UserApps.binds(this)) val roms = SessionPrefs.romsDir(this).takeIf { it.isNotEmpty() }?.let { File(it) } if (roms != null && roms.isDirectory && roms.canRead()) { @@ -968,6 +844,40 @@ class SessionService : Service() { } } } + val x64Libraries = org.json.JSONArray() + // Desktop mode offers the x86-64 client either way; droiddeck-steam-x64 drops library folders it is not given. + val x64Here = SessionPrefs.steamClientArch(this) == "x86_64" || + (SessionState.mode == MODE_DESKTOP && + com.droiddeck.launcher.storage.SteamStorage.x64ClientPresent(SessionPrefs.steamRoot(this, "x86_64"))) + if (storageDiagnosticLibrary != null && library != null && x64Here) { + val x64 = File(library.path, GameStorage.X64_CARD_DIR) + val problem = GameStorage.prepare(this, x64.path) + if (problem != null) { + Log.w(TAG, "x86-64 steam library: $problem") + } else try { + val room = if (ProotFastPath.enabled(this)) { + ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds).size + } else Int.MAX_VALUE + val extra = SecondaryLibrary.binds(filesDir, x64, listOf(GameStorage.X64_CARD_GUEST)).drop(1) + if (extra.size > room) { + Log.w(TAG, "x86-64 steam library: $x64 needs ${extra.size} binds, $room left for the fast path; not a library this session") + } else { + binds.addAll(extra) + x64Libraries.put(org.json.JSONObject().put("path", GameStorage.X64_CARD_GUEST).put("label", library.label.replace('"', ' ').replace('\\', ' '))) + Log.i(TAG, "x86-64 steam library: $x64 -> ${GameStorage.X64_CARD_GUEST} (\"${library.label}\")") + } + } catch (e: Exception) { + Log.w(TAG, "x86-64 steam library: $x64 private directories could not be prepared", e) + } + } + try { + val listing = File(filesDir, "session/steam-libraries-x64.json").apply { parentFile?.mkdirs() } + listing.writeText(x64Libraries.toString()) + val envAt = guest.indexOf(LinuxRuntime.SESSION_SCRIPT).takeIf { it >= 0 } ?: guest.size + guest.add(envAt, "BL_X64_STEAM_LIBRARIES=" + listing.path) + } catch (e: Exception) { + Log.w(TAG, "x86-64 steam library: the list could not be written; internal storage alone this session", e) + } try { val listing = File(filesDir, "session/steam-libraries.json").apply { parentFile?.mkdirs() } val json = org.json.JSONArray() @@ -986,7 +896,7 @@ class SessionService : Service() { if (!stillSameProcess()) return val tree = descendants(prootPid) if (!stillSameProcess()) return - android.os.Process.sendSignal(prootPid, 15) // SIGTERM + android.os.Process.sendSignal(prootPid, 15) if (!waitForExit(prootPid, GRACE_MS)) { if (!stillSameProcess()) return Log.w(TAG, "proot $prootPid did not exit on SIGTERM; killing it") @@ -994,15 +904,14 @@ class SessionService : Service() { } var killed = 0 for ((pid, started) in tree) { - val stat = readStat(pid) ?: continue // already gone - if (stat.second != started) continue // same number, different process + val stat = readStat(pid) ?: continue + if (stat.second != started) continue android.os.Process.killProcess(pid) killed++ } if (killed > 0) Log.i(TAG, "swept $killed process(es) proot left behind") } - /** Every process under [root], as (pid, start time), from a single walk of /proc. */ private fun descendants(root: Int): List<Pair<Int, Long>> { val started = HashMap<Int, Long>() val children = HashMap<Int, MutableList<Int>>() @@ -1026,7 +935,6 @@ class SessionService : Service() { return out } - /** (parent pid, start time) from /proc/pid/stat, or null when the process is gone. */ private fun readStat(pid: Int): Pair<Int, Long>? { val stat = try { File("/proc/$pid/stat").readText() } catch (e: Exception) { return null } val close = stat.lastIndexOf(')') @@ -1114,8 +1022,8 @@ class SessionService : Service() { Log.i(TAG, "queued Steam game $gameId for the running client") } - private fun resumeSession() { - activityVisible = true + private fun resumeSession(panelVisible: Boolean = true) { + if (panelVisible) activityVisible = true screenOn = (getSystemService(Context.POWER_SERVICE) as? PowerManager)?.isInteractive ?: screenOn manualPauseRequested = false suspendDownloadNow = false @@ -1139,19 +1047,6 @@ class SessionService : Service() { File(directory, STEAM_GAME_REQUEST + ".tmp").delete() } - /** - * proot's --kill-on-exit takes its tracees down, but a session that died from the inside - * (the client asserting, Xwayland going) leaves gamescopereaper and the session script - * behind, still holding the Wayland socket and the audio server the next session needs. They - * are our uid, so they are ours to kill. - */ - /** - * Every process of ours still running a program out of the Linux runtime once proot is gone. - * proot's --kill-on-exit and the tree sweep only reach what proot still traces; a tracee it - * lost - an Xwayland that aborted from one thread and then looped on a syscall proot's own - * seccomp filter, with no tracer left, answers ENOSYS - survives both, reparented to init, - * and wrote 9 GB of one line into the session log before anything killed it. - */ private fun killGuestLeftovers() { val me = android.os.Process.myPid() val rootfs = try { File(filesDir, "linuxfs").canonicalPath } catch (e: Exception) { return } + "/" @@ -1160,7 +1055,6 @@ class SessionService : Service() { for (proc in procs) { val pid = proc.name.toIntOrNull() ?: continue if (pid == me) continue - // Another uid's exe is not ours to read; a process already gone has none. val exe = try { File(proc, "exe").canonicalPath } catch (e: Exception) { continue } if (!exe.startsWith(rootfs)) continue android.os.Process.killProcess(pid) @@ -1188,19 +1082,17 @@ class SessionService : Service() { if (killed > 0) Log.w(TAG, "killed $killed leftover process(es) of a previous session") } - /** - * The desktop's Steam launchers cannot start the client where they are (no dma-buf on the - * desktop), so they leave `steam-launch` in the session directory instead: which UI, and a - * steam:// URL or nothing. This ends the session and hands the activity the one to start. - * `session=desktop` (Big Picture's "Switch to Desktop", steamos-session-select) asks for the - * desktop instead, with Steam's desktop client started in it. - */ private var launchWatcher: android.os.FileObserver? = null + private fun programStatus(dir: File): Int? = + runCatching { File(dir, RUN_STATUS).readText().trim().toInt() }.getOrNull() + private fun watchLaunchRequests(dir: File) { launchWatcher?.stopWatching() listOf("steam-sleep", "steam-sleep-state", "steam-sleep-ready", "steam-wake", "steam-wake.tmp", - "steam-native-sleep", "steam-native-sleep.tmp", "steam-native-ready", "steam-native-ready.tmp" + "steam-native-sleep", "steam-native-sleep.tmp", "steam-native-ready", "steam-native-ready.tmp", + RUN_STATUS, "$RUN_STATUS.tmp", "epic-game", "epic-game.tmp", com.droiddeck.launcher.stores.epic.EpicClient.PLAYING, + com.droiddeck.launcher.stores.epic.EpicClient.OPEN, com.droiddeck.launcher.stores.epic.EpicClient.FOCUSED_APP ).forEach { File(dir, it).delete() } val gen = sessionGen @Suppress("DEPRECATION") @@ -1274,12 +1166,6 @@ class SessionService : Service() { private val desktopImports = java.util.concurrent.ConcurrentHashMap<String, Any>() - /** - * What the desktop cannot run where it lies (droiddeck-open), added as Add an app adds it, menu entry - * included: an AppImage of sharun's, whose hard links Android denies apps and only the app's own proot - * (link2symlink) makes, or a script or program whose folder of Linux programs is on noexec shared - * storage, copied in. The answer goes beside the request, "ok <folder>" or "error <why>". - */ private fun importForDesktop(dir: File, text: String) { val fields = text.lineSequence().mapNotNull { line -> line.split('=', limit = 2).takeIf { it.size == 2 }?.let { it[0] to it[1].trim() } @@ -1290,7 +1176,6 @@ class SessionService : Service() { val binds = LinuxRuntime.lastBinds(this).map { BwrapSpawner.Bind.parse(it) } val file = File(BwrapSpawner.hostPath(binds, LinuxRuntime.rootDir(this).path, guestPath)) val context = applicationContext - // A request for what is already being added waits for that, then finds it. val lock = desktopImports.computeIfAbsent(key) { Any() } Thread({ fun imported() = UserApps.desktopImport(context, key, guestPath)?.let { "ok $it" } @@ -1334,11 +1219,11 @@ class SessionService : Service() { private fun updateSuspendPolicy() { if (!SessionState.running) return - if (suspendPolicy == SessionPrefs.SUSPEND_MANUAL && (!activityVisible || !screenOn)) { + if (suspendPolicy == SessionPrefs.SUSPEND_MANUAL && !hasVisibleSurface) { manualPauseRequested = true } val controller = suspendController ?: return - val hidden = !activityVisible || !screenOn + val hidden = !hasVisibleSurface val downloadsBlockingSuspend = downloadsKeepAwake() && hidden && !suspendDownloadNow if (downloadsBlockingSuspend) acquireLocks() if (suspendPolicy != SessionPrefs.SUSPEND_NATIVE || !hidden || downloadsBlockingSuspend) { @@ -1359,6 +1244,7 @@ class SessionService : Service() { SessionEvents.record(if (shouldSuspend) "session.suspend_requested" else "session.resume_requested", mapOf( "policy" to suspendPolicy, "activityVisible" to activityVisible, "screenOn" to screenOn, "steamSleep" to (steamSleepToken != null), + "xrActivityVisible" to xrActivityVisible, "nativeSleep" to (nativeSleepToken != null), )) if (shouldSuspend) { @@ -1411,21 +1297,18 @@ class SessionService : Service() { private fun completeSteamSleep() { val token = steamSleepToken ?: return - // Write before SIGCONT: the guest's login1 sees it immediately on thaw - // and delivers PrepareForSleep(false), restoring Steam's main surface. writeSteamSleepState(token, "awake") steamSleepToken = null } private fun resumeSteamSleepOnReturn() { - if (suspendPolicy in setOf(SessionPrefs.SUSPEND_AUTO, SessionPrefs.SUSPEND_NATIVE) && activityVisible && screenOn) { + if (suspendPolicy in setOf(SessionPrefs.SUSPEND_AUTO, SessionPrefs.SUSPEND_NATIVE) && hasVisibleSurface) { if (steamSleepToken == null && (nativeSleepToken == null || nativeSleepFallback)) requestSteamWake() completeNativeSleep() completeSteamSleep() } } - /** Let Steam prepare before freezing; retain the wake lock until that freeze completes. */ private fun prepareNativeSleep() { val token = UUID.randomUUID().toString().replace("-", "") nativeSleepToken = token @@ -1449,7 +1332,6 @@ class SessionService : Service() { updateSuspendPolicy() } nativeSleepTimeout = timeout - // A missing or stalled guest helper must not keep the device awake indefinitely. mainHandler.postDelayed(timeout, 4000L) } @@ -1466,7 +1348,6 @@ class SessionService : Service() { nativeSleepFallback = false } - /** Resume must also recover a Steam sleep whose request never reached Android. */ private fun requestSteamWake() { if (!SessionState.running || SessionState.mode != MODE_STEAM) return val dir = LinuxRuntime.sessionRoot(this) @@ -1489,8 +1370,6 @@ class SessionService : Service() { SessionState.guestPid = -1 com.droiddeck.launcher.agent.AgentGuest.stop() com.droiddeck.launcher.stores.StoreLaunchRequests.stop() - // Cloud saves of a store game played this session, if the compat tool's exit request did - // not upload them (a session closed from the drawer never reaches it). Thread({ com.droiddeck.launcher.stores.CloudSaves.uploadAllDirty(applicationContext, "session-end", running = false) }, "cloud-session-end").start() runCatching { com.droiddeck.launcher.agent.AgentEnv.endSession(this) } .onFailure { Log.w(TAG, "clearing the agent's session environment", it) } @@ -1503,19 +1382,16 @@ class SessionService : Service() { val failureStatus = SessionState.failureStatus ?: status SessionEvents.fail(code, message, failureStatus) } + SessionState.steamVr = false + com.droiddeck.launcher.glasses.Glasses.cancelSteamVrStart() + com.droiddeck.launcher.glasses.Glasses.setVrActive(false) + com.droiddeck.launcher.glasses.Glasses.set3dForVr(false) SessionState.notifyEnded(status) stopForeground(STOP_FOREGROUND_REMOVE) stopSelf() } } - /** - * proot is one thread, and every syscall it traps anywhere in the session - a path lookup in - * Proton's python, Wine's file opens, the Steam client's /proc scans - waits for that thread to - * be scheduled, at nice 0 beside a game that keeps the big cores busy. It is raised to nice -6, - * under the compositor's -8. After a moment, not at once: the first guest process is forked by - * proot itself and would inherit the value, and with it everything the session starts. - */ private fun raiseTracer(pid: Int, gen: Int) { Thread({ try { @@ -1537,28 +1413,26 @@ class SessionService : Service() { private fun stopSession(status: Int) { cancelQueuedSteamGame() completeNativeSleep() - synchronized(stopLock) { + val (ended, endedArch) = synchronized(stopLock) { if (!SessionState.running) return SessionState.running = false + SessionPaths.take() to SessionState.steamClientArch } + xrActivityVisible = false updateDownloadMonitoring() val stoppedGen = sessionGen + val stoppedSession = SessionState.sessionId + val launcherEnded = SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP || SessionState.program == NoSteamLaunch.EPIC SessionState.stopRequested = false SessionEvents.record("guest.exited", mapOf("status" to status)) GpuClockPin.stop(this) + GameThreadHints.stop() SessionEvents.transition(SessionPhase.STOPPING, "session.stopping", mapOf("status" to status)) suspendOperationPending = false launchWatcher?.stopWatching() launchWatcher = null syncWatcher?.stopWatching() syncWatcher = null - // proot's --kill-on-exit takes the guest tree down only if proot gets to run it, and - // SIGKILL never lets it. A SIGKILLed proot left its tracees alive with no tracer: every - // seccomp-trapped syscall then failed with ENOSYS, they spun on retries at a full core - // for over an hour, and the reaper could not even open /proc to kill them. So: SIGTERM, - // a grace for proot's own cleanup, SIGKILL only if it will not go, then a sweep of the - // tree it had - snapshotted first, each pid checked against its start time so a number - // reused by a new process is never touched. val prootPid = sessionPid sessionPid = -1 val auxiliary = synchronized(auxiliaryProcessesLock) { @@ -1567,13 +1441,11 @@ class SessionService : Service() { SessionTerminal.clear(sessionGen) val controller = suspendController suspendController = null - // On its own thread, never here: stopSession runs on the main thread (the notification's - // Stop action arrives there), and collecting means copying the compositor's log, scrubbing - // every Steam log line by line - 42 files on one measured run - and waiting for logcat to - // dump the crash buffer. That was about four and a half seconds of blocked main thread, - // and Android ANR'd the app for it: the desktop session that would not let go. - val ended = SessionPaths.take() - if (ended != null) Thread({ collectSessionArtifacts(ended) }, "session-collect").start() + if (ended != null) { + VacDiagnostics.snapshot(this, ended) + SessionArtifacts.collectionStarted(ended) + Thread({ collectSessionArtifacts(ended, endedArch) }, "session-collect").start() + } components.reversed().forEach { try { it.stop() @@ -1589,26 +1461,34 @@ class SessionService : Service() { if (prootPid > 1 || auxiliary.isNotEmpty()) { Thread({ if (prootPid > 1 && steamClientMayRun) askSteamToExit(prootPid) + com.droiddeck.launcher.stores.gog.GogComet.end(stoppedSession) auxiliary.forEach { (pid, started) -> teardown(pid, started) } if (prootPid > 1) teardown(prootPid) killGuestLeftovers() finishSessionStop(status, stoppedGen) + if (launcherEnded) importLauncherGames() }, "session-teardown").start() } else { - finishSessionStop(status, stoppedGen) + Thread({ + com.droiddeck.launcher.stores.gog.GogComet.end(stoppedSession) + finishSessionStop(status, stoppedGen) + if (launcherEnded) importLauncherGames() + }, "gog-session-stop").start() } } if (prootPid > 1) acquireLocks() if (controller != null) controller.closeAndResume(finishAfterTeardown) else finishAfterTeardown() } - /** - * Swiped out of recents. The activity is destroyed without any of our teardown running, so the - * guest would survive as an orphan holding the rootfs and the GPU. Treat the swipe as "quit". - */ + private fun importLauncherGames() { + runCatching { com.droiddeck.launcher.stores.epic.EpicClientLibrary.importClientGames(this) } + .onFailure { Log.w(TAG, "client library scan failed: ${it.javaClass.simpleName}") } + } + override fun onTaskRemoved(rootIntent: Intent?) { - if (pipTask) { - Log.i(TAG, "PiP task dismissed - retaining the session under its background policy") + if (rootIntent?.component?.className == com.droiddeck.launcher.ui.SecondScreenActivity::class.java.name) return + if (pipTask || xrActivityVisible) { + Log.i(TAG, "panel task dismissed - retaining the session under its active surface policy") activityVisible = false updateSuspendPolicy() return @@ -1620,6 +1500,7 @@ class SessionService : Service() { override fun onDestroy() { stopSession(0) + GameThreadHints.stop() // also when the session never got as far as running if (screenReceiverRegistered) { unregisterReceiver(screenReceiver) screenReceiverRegistered = false @@ -1629,7 +1510,6 @@ class SessionService : Service() { override fun onBind(intent: Intent?): IBinder? = null - // ── Keeping the process alive ─────────────────────────────────────────────────────────── private fun acquireLocks() { try { @@ -1648,7 +1528,7 @@ class SessionService : Service() { val wifi = applicationContext.getSystemService(Context.WIFI_SERVICE) as? WifiManager val allowed = DeviceSupport.lowLatencyWifiSafe() if (!allowed) Log.i(TAG, "wifi lock skipped: its low-latency mode resets this device") - @Suppress("DEPRECATION") // deprecated from API 29, still honoured; targetSdk is 28 + @Suppress("DEPRECATION") if (allowed && wifiLock?.isHeld != true) { wifiLock = wifi?.createWifiLock(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "DroidDeck:session-wifi") ?.apply { @@ -1658,8 +1538,6 @@ class SessionService : Service() { } Log.i(TAG, "wifi lock held=${wifiLock?.isHeld}") } catch (t: Throwable) { - // A partial wake lock keeps the process alive but does not stop WiFi power-save from - // throttling a backgrounded download to nothing, which is what this lock is for. Log.w(TAG, "no wifi lock (${t.message}) - a backgrounded download may stall") } } @@ -1679,11 +1557,9 @@ class SessionService : Service() { wifiLock = null } - // ── Notification ──────────────────────────────────────────────────────────────────────── private fun buildNotification(): Notification { val manager = getSystemService(NotificationManager::class.java) - // IMPORTANCE_LOW: it must never make a sound or push a heads-up over a game. val channel = NotificationChannel(CHANNEL_ID, getString(R.string.session_channel), NotificationManager.IMPORTANCE_LOW).apply { description = getString(R.string.session_channel_description) @@ -1785,6 +1661,7 @@ class SessionService : Service() { downloadActive = clientInstallActive || steamDownloadsInBackground && steamDownloadMonitor.poll( root, receivedBytes = TrafficStats.getUidRxBytes(android.os.Process.myUid()), + client = SessionState.steamClientArch, ) if (wasInstalling != clientInstallActive) { SessionEvents.record("steam.client_download", mapOf("active" to clientInstallActive)) @@ -1798,7 +1675,6 @@ class SessionService : Service() { mainHandler.post(poll) } - /** The pads attached as the session starts; the activity logs the ones that come and go after. */ private fun logControllersAtStart() { val pads = ArrayList<String>() for (id in android.view.InputDevice.getDeviceIds()) { @@ -1812,25 +1688,11 @@ class SessionService : Service() { companion object { private const val TAG = "SessionService" - /** proot's tracer: above everything in the guest, under the compositor thread's -8. */ private const val TRACER_NICE = -6 - /** Downloads file whose contents become TU_DEBUG inside the session, e.g. "sysmem". */ private const val TU_DEBUG_SWITCH = "Download/droiddeck-tu-debug" - /** - * Where droiddeck-env (KEY=VALUE lines added to the session environment verbatim) used to - * be. Ignored now: a line there reaches the Steam client's environment as written - * (LD_PRELOAD, VK_ICD_FILENAMES, PATH...), and any app with storage access can write to - * Download - code of its choosing inside our sandbox, next to the client's saved login. - */ private const val LEGACY_ENV_SWITCH = "Download/droiddeck-env" private const val ENV_SWITCH_NAME = "droiddeck-env" - /** - * The session's extra-environment file: Android/data/<package>/files/droiddeck-env. Only - * this app, adb and the user (through the app's own file manager) can write there - from - * Android 11 on. Before that other apps with storage access can reach Android/data too, so - * there is no such file at all. - */ fun envSwitchFile(context: Context): File? = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) context.getExternalFilesDir(null)?.let { File(it, ENV_SWITCH_NAME) } @@ -1847,14 +1709,16 @@ class SessionService : Service() { private const val ACTION_SUSPEND_POLICY_CHANGED = "com.droiddeck.launcher.SUSPEND_POLICY_CHANGED" private const val ACTION_ACTIVITY_VISIBLE = "com.droiddeck.launcher.ACTIVITY_VISIBLE" private const val ACTION_ACTIVITY_HIDDEN = "com.droiddeck.launcher.ACTIVITY_HIDDEN" + private const val ACTION_XR_ACTIVITY_VISIBLE = "com.droiddeck.launcher.XR_ACTIVITY_VISIBLE" + private const val ACTION_XR_ACTIVITY_HIDDEN = "com.droiddeck.launcher.XR_ACTIVITY_HIDDEN" + private const val ACTION_SIGN_IN_HOLD = "com.droiddeck.launcher.SIGN_IN_HOLD" + private const val EXTRA_HOLD = "hold" private const val ACTION_TRACK_AUXILIARY = "com.droiddeck.launcher.TRACK_AUXILIARY" private const val ACTION_STOP_AUXILIARY = "com.droiddeck.launcher.STOP_AUXILIARY" private const val ACTION_AUXILIARY_EXITED = "com.droiddeck.launcher.AUXILIARY_EXITED" private const val EXTRA_AUXILIARY_PID = "auxiliaryPid" - /** Command lines that can only belong to a session of ours. */ private val STRAGGLERS = listOf("droiddeck-session", "gamescope", "Xwayland", "steamrtarm64", "steamwebhelper", "linuxfs/opt/android-host/proot", "/libproot.so", "pulseaudio/libpulseaudio.so") - /** How long proot gets to run its own cleanup before it is killed outright. */ private const val GRACE_MS = 1200L private const val STEAM_PICKUP_MS = 1500L private const val STEAM_EXIT_MS = 10_000L @@ -1865,19 +1729,15 @@ class SessionService : Service() { private const val NO_UINPUT_SWITCH = "Download/droiddeck-no-uinput" private const val NO_DECK_PAD_SWITCH = "Download/droiddeck-no-deck-pad" private const val NO_STEAM_TOUCH_SWITCH = "Download/droiddeck-no-steam-touch" - /** libfakeinput numbers the pads made through its /dev/uinput stand-in from here. */ private const val FIRST_VIRTUAL_PAD = 16 const val EXTRA_MODE = "mode" const val MODE_STEAM = "steam" const val MODE_DESKTOP = "lxqt" - /** A program inside the runtime, fullscreen under gamescope (EXTRA_PROGRAM = its path). */ const val MODE_RUN = "run" const val EXTRA_PROGRAM = "program" - /** MODE_RUN: arguments after the program (a game to boot). */ + private const val RUN_STATUS = "run-status" const val EXTRA_PROGRAM_ARGS = "programArgs" - /** MODE_STEAM: "desktop" for the client's desktop UI (default Big Picture); a steam:// URL to hand it. - * MODE_DESKTOP: "desktop" = open Steam's desktop client in the desktop once it is up. */ const val EXTRA_STEAM_UI = "steamUi" const val EXTRA_STEAM_URL = "steamUrl" const val EXTRA_GAME_ID = "gameId" @@ -1913,12 +1773,22 @@ class SessionService : Service() { context.startService(Intent(context, SessionService::class.java).setAction(action)) } + fun setXrActivityVisible(context: Context, visible: Boolean) { + if (!SessionState.running) return + val action = if (visible) ACTION_XR_ACTIVITY_VISIBLE else ACTION_XR_ACTIVITY_HIDDEN + context.startService(Intent(context, SessionService::class.java).setAction(action)) + } + + fun holdForSignIn(context: Context, hold: Boolean) { + if (!SessionState.running) return + context.startService(Intent(context, SessionService::class.java).setAction(ACTION_SIGN_IN_HOLD).putExtra(EXTRA_HOLD, hold)) + } + fun resume(context: Context) { if (!SessionState.running) return context.startService(Intent(context, SessionService::class.java).setAction(ACTION_RESUME)) } - /** Route a validated decimal Steam game id through the current guest session. */ fun launchGame(context: Context, gameId: String): Boolean { if (!GameLaunchLink.validId(gameId) || !SessionState.running || SessionState.mode != MODE_STEAM || SessionState.stopRequested) return false @@ -1937,7 +1807,6 @@ class SessionService : Service() { context.startService(Intent(context, SessionService::class.java).setAction(ACTION_SUSPEND_POLICY_CHANGED)) } - /** Let the session service clean up the PTY's proot tree if the control screen closes. */ fun stopTerminalProcess(context: Context, pid: Int) { if (pid > 1) context.startService( Intent(context, SessionService::class.java) diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionState.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionState.kt index 57c377bcbd..ab32b90591 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionState.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionState.kt @@ -5,11 +5,6 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue -/** - * The little that the activity and the service have to agree on. Process-wide rather than passed - * through intents, because both halves live in one process and the point of the split is that - * either can outlive the other. - */ object SessionState { @Volatile var phase = SessionPhase.IDLE @@ -46,28 +41,26 @@ object SessionState { @Volatile var running = false + @Volatile + var runtimeDriver: String? = null var suspended by mutableStateOf(false) @Volatile var pipActive = false - /** MODE_RUN: the program inside the runtime the session was started for. */ @Volatile var program: String? = null @Volatile var programArgs: List<String> = emptyList() - /** MODE_STEAM: "desktop" for the client's desktop UI, else Big Picture; and a steam:// URL to hand it. */ @Volatile var steamUi: String? = null @Volatile var steamUrl: String? = null - /** A session the guest asked for (the desktop's Steam launchers): started by the activity once this one has ended. */ + @Volatile + var steamClientArch: String? = null + // A Play SteamVR request can arrive while an existing session is visible. + // Wake the status/launch effect even if no glasses surface has attached yet. + var steamVr by mutableStateOf(false) var relaunch: android.content.Intent? = null - /** HDR10 was asked for and the panel can show it: the compositor was told, and the session - * gets DXVK_HDR=1 and gamescope --hdr-enabled. Decided by the activity before the compositor starts. */ @JvmStatic var hdr = false - /** The pad is presented to the Steam client as a Steam Deck controller this session - * (SteamDeckPad): its Quick Access button is a real button, not the Guide+A chord. Decided by - * the service as the session starts, which can be after the activity has resumed - hence - * [deckPadListener]. */ @Volatile private var deckPadValue = false @JvmStatic var deckPad: Boolean get() = deckPadValue @@ -77,57 +70,40 @@ object SessionState { deckPadListener?.invoke() } - /** Told (on the thread that changed it) whenever [deckPad] changes. */ @Volatile var deckPadListener: (() -> Unit)? = null - /** The session screen's virtual pad, for the agent bridge's pad input (AgentInput). */ @Volatile var padBridge: com.droiddeck.launcher.input.PadBridge? = null - /** What the second screen shows, and on which display: kept for the session, so a screen - * turned off (sleep, a closed lid) or an activity recreated brings it back as it was. */ @Volatile var secondScreenMode = com.droiddeck.launcher.input.SecondScreenMode.NONE @Volatile var secondScreenDisplay = -1 - /** Which session this is: SessionService.MODE_STEAM or MODE_DESKTOP. */ @Volatile var mode = "steam" - /** The size gamescope was told to render at; set by the activity before the service starts. */ @Volatile var outputSize: Pair<Int, Int> = Pair(1920, 1080) - /** The session's resolution is "Follow screen": outputSize tracks the window while it runs. */ @Volatile var followScreen = false @Volatile var refreshHz: Float = 60f - /** - * How far the compositor enlarges the session onto the panel (panel over outputSize, long - * side to long side); set with outputSize. 0 before a session has been sized. Texture - * sharpness "Auto" (core/TextureFiltering) is derived from it when a game launches. - */ @Volatile var upscaleRatio: Float = 0f - /** The session's frame cap (SessionPrefs.fpsLimit), fixed when it starts; 0 = none. */ @Volatile var fpsLimit: Int = 0 - /** The compositor has presented a frame, so the loading panel is behind us for this session. */ @Volatile var firstFrameSeen = false - /** Where this session is writing its log, for the "it ended" message. */ @Volatile var logFile: File? = null - /** The fake evdev directory, once the service has prepared the rings. */ @Volatile var fakeInputDir: File? = null - /** Told when the session ends, so a visible activity can close itself. */ @Volatile var endListener: ((Int) -> Unit)? = null @@ -136,7 +112,6 @@ object SessionState { } } -/** Stable lifecycle values returned by the debug agent bridge. */ enum class SessionPhase { IDLE, PREPARING, diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionSuspendController.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionSuspendController.kt index 662d44e710..fbe9084083 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionSuspendController.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionSuspendController.kt @@ -211,11 +211,14 @@ internal class SessionSuspendController( } } for (record in ordered) send(record, SIGCONT) - repeat(8) { + val waiting = ordered.toMutableList() + repeat(RESTORE_CHECKS) { check -> Thread.sleep(25L) - if (ordered.all(::isRunningOrGone)) return true + waiting.removeAll { isRunningOrGone(it) } + if (waiting.isEmpty()) return true + if (check % 8 == 7) for (record in waiting) send(record, SIGCONT) } - return ordered.all(::isRunningOrGone) + return false } private fun send(record: ProcessRecord, signal: Int) { @@ -242,5 +245,6 @@ internal class SessionSuspendController( private companion object { const val SIGSTOP = 19 const val SIGCONT = 18 + const val RESTORE_CHECKS = 80 } } diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionTerminal.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionTerminal.kt index 4db8f8671e..c7ecba3bbf 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionTerminal.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionTerminal.kt @@ -4,7 +4,6 @@ import com.termux.terminal.TerminalSession import com.termux.terminal.TerminalSessionClient import java.io.File -/** Immutable launch context for the optional PTY shell attached to the active Linux runtime. */ object SessionTerminal { private data class Launch( val command: Array<String>, diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionVisibility.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionVisibility.kt new file mode 100644 index 0000000000..33b456ecca --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionVisibility.kt @@ -0,0 +1,4 @@ +package com.droiddeck.launcher.session + +internal fun sessionHasVisibleSurface(panelVisible: Boolean, screenOn: Boolean, xrVisible: Boolean): Boolean = + xrVisible || (panelVisible && screenOn) diff --git a/app/src/main/java/com/droiddeck/launcher/session/SettingsReset.kt b/app/src/main/java/com/droiddeck/launcher/session/SettingsReset.kt new file mode 100644 index 0000000000..f5304ed1ea --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/SettingsReset.kt @@ -0,0 +1,69 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import android.util.Log +import com.droiddeck.launcher.core.DownloadSource +import com.droiddeck.launcher.core.GameEnvironment +import com.droiddeck.launcher.input.ControllerPrefs +import com.droiddeck.launcher.runtime.LinuxRuntime + +object SettingsReset { + private const val TAG = "SettingsReset" + + internal val SESSION_KEYS = setOf( + "orientation", "launcherFullscreen", "animations", "theme", "runSteamAtStartup", "addedGamesArt", + "gameStoresEnabled", "gameStoresSpeedTier", "gameStoresParallel", "storesOpenTab", "storesShowMature", + "hud", "hudDeck", "backActionsInverted", "touch", "osc", "shape", "steamController", + "gamepadLeft", "gamepadRight", "pipAutoEnter", "unfoldedControls", "stretch16x9", "picturePosition", + "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", + "guestHostname", "fexPreset", "forceSsbs", "logs", "storageDiagnostics", + "upscaler", "upscaleSharpness", "screenEffects", "textureAnisotropy", "textureLodBias", + "steamDownloadsInBackground", "steam_offline", "bootMovie", "bootMovieSound", + "questDefaultsV1", + ) + + internal val SESSION_PREFIXES = listOf( + "resolutionCap.", "displayResolution.", "customRes.", "hdr.", "fpsLimit.", "suspendPolicy.", + ) + + private val STEAM_TOUCH_KEYS = listOf("feedback", "autoFade", "gyro", "shake") + + internal fun isSessionSetting(key: String) = key in SESSION_KEYS || SESSION_PREFIXES.any { key.startsWith(it) } + + fun resetAll(context: Context, gameProfiles: Boolean, gameScopes: Collection<String> = emptyList()): Boolean { + var ok = true + val session = context.getSharedPreferences("session", Context.MODE_PRIVATE) + session.edit().apply { session.all.keys.filter { isSessionSetting(it) }.forEach { remove(it) } }.commit() + ControllerPrefs.resetAll(context) + context.getSharedPreferences("app-ui", Context.MODE_PRIVATE).edit().clear().commit() + context.getSharedPreferences("frame_gen", Context.MODE_PRIVATE).edit().clear().commit() + context.getSharedPreferences("steam_touch", Context.MODE_PRIVATE).edit() + .apply { STEAM_TOUCH_KEYS.forEach { remove(it) } }.commit() + DownloadSource.reset(context) + com.droiddeck.launcher.agent.AgentAccess.setCommandsEnabled(context, false) + + if (gameProfiles) { + val scopes = (gameScopes + runCatching { GameEnvironmentStore.read(context).games.keys }.getOrDefault(emptySet()) + + SessionPrefs.gameTextureFiltering(context).keys) + .filter { it.isNotEmpty() && GameEnvironment.validScope(it) }.toSet() + scopes.forEach { scope -> + runCatching { GameProfileManager.reset(context, scope) } + .onFailure { ok = false; Log.w(TAG, "Could not reset the profile of $scope", it) } + } + session.edit().remove("gameTextureFiltering").commit() + runCatching { GameEnvironmentStore.save(context, GameEnvironmentStore.read(context).copy(shared = emptyMap())) } + .onFailure { ok = false; Log.w(TAG, "Could not clear the Default profile's environment", it) } + } + + QuestExperimental.initialize(context) + runCatching { OfflineMode.apply(context, LinuxRuntime.rootDir(context)) } + .onFailure { ok = false; Log.w(TAG, "Could not turn offline mode off", it) } + runCatching { GameEnvironmentStore.publish(context) } + .onFailure { ok = false; Log.w(TAG, "Could not update game environment", it) } + Log.i(TAG, "settings reset (game profiles: $gameProfiles, ok: $ok)") + return ok + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/SteamDeckPad.kt b/app/src/main/java/com/droiddeck/launcher/session/SteamDeckPad.kt index ca30bf4690..db9884dd53 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SteamDeckPad.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SteamDeckPad.kt @@ -7,33 +7,8 @@ import com.droiddeck.launcher.core.FileUtils import com.droiddeck.launcher.runtime.LinuxRuntime import java.io.File -/** - * The session's pad, described to the Steam client as a Steam Deck controller. - * - * On a Deck - and on the handhelds InputPlumber serves as one - the client finds the controller - * through libudev as a `hidraw` device under a `hid` device under a USB interface and reads it - * itself. libfakeinput serves the device node (`/dev/hidraw16`, built from the pad's input ring); - * what the client also needs is the sysfs it walks to find and identify that node, which a sandbox - * shows nothing of. This writes that sysfs as the kernel lays out a Deck's controller interface and - * returns the binds that put it in place: - * - * - `/sys/devices/droiddeck/usb1` - the USB device (Valve, 28de:1205), its interface 2, the HID - * device on it (`HID_ID`, `report_descriptor`) and that device's `hidraw/hidraw16`; - * - `/sys/class/hidraw/hidraw16` - what an enumeration of the `hidraw` subsystem lists; - * - `/sys/dev/char/240:16` - how the node's device number is looked up (in the directory the - * runtime already binds there for the GPU); - * - `/run/udev/data/c240:16` - the udev database entry that marks the device initialised, without - * which libudev's enumeration leaves a device node out; - * - [listingDir] - stand-ins for the listings of `/sys`, `/sys/class` and `/sys/bus`. An app under - * an enforcing SELinux policy (every retail phone) may not list those directories, and libudev - * abandons its whole scan when it cannot, so the client never reached `hidraw`; libfakeinput - * lists these to the client instead when the real listing is refused (FAKE_DECK_SYSFS_LISTING). - * - * Symlinks are absolute guest paths; proot resolves them inside the session. - */ object SteamDeckPad { private const val TAG = "SessionService" - /** Must match libfakeinput (fakeinput_steam.cpp: DECK_HIDRAW_*). */ private const val MAJOR = 240 private const val MINOR = 16 private const val NODE = "hidraw$MINOR" @@ -44,20 +19,14 @@ object SteamDeckPad { private const val HIDRAW = "$HID/hidraw/$NODE" private const val SERIAL = "DROIDDECK0001" - // The paired Bluetooth Steam Controller is a separate Triton HID device. It must not inherit - // the Deck's identity or report format. Must match fakeinput_steam.cpp (TRITON_HIDRAW_*). private const val TRITON_MINOR = 18 private const val TRITON_HID = "$GUEST_DEVICES/bluetooth/0005:28DE:1303.0003" private const val TRITON_SERIAL = "DROIDDECKSC01" - // The handheld's own pad as the Steam Controller (SessionPrefs.CONTROLLER_STEAM): the wired - // controller (28de:1302) on a USB device of its own, since it is built in. private const val TRITON_USB = "$GUEST_DEVICES/usb3" private const val TRITON_INTERFACE = "$TRITON_USB/3-1:1.0" private const val TRITON_WIRED_HID = "$TRITON_INTERFACE/0003:28DE:1302.0004" - /** Must match libfakeinput (DS4_HIDRAW_MINOR, DUALSENSE_HIDRAW_MINOR). */ private const val SONY_DS4_MINOR = 20 private const val SONY_DUALSENSE_MINOR = 21 - /** Must match libfakeinput's kDs4ReportDescriptor and kDualSenseReportDescriptor. */ private val DS4_REPORT_DESCRIPTOR = intArrayOf( 0x05, 0x01, 0x09, 0x05, 0xa1, 0x01, 0x06, 0x00, 0xff, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x85, 0x01, 0x09, 0x20, 0x95, 0x3f, 0x81, 0x02, 0x85, 0x05, 0x09, 0x21, 0x95, 0x1f, 0x91, 0x02, @@ -71,11 +40,8 @@ object SteamDeckPad { 0x85, 0x05, 0x09, 0x22, 0x95, 0x28, 0xb1, 0x02, 0x85, 0x09, 0x09, 0x23, 0x95, 0x13, 0xb1, 0x02, 0x85, 0x20, 0x09, 0x24, 0x95, 0x3f, 0xb1, 0x02, 0xc0, ).map { it.toByte() }.toByteArray() - /** Must match libfakeinput (TRITON_PAD_HIDRAW_*): its own node, so a paired controller keeps 18. */ private const val TRITON_PAD_MINOR = 19 - // Steam's touch controller (SteamTouchDevice), a second device beside the Deck's: 0000:11fb, - // "Mobile Touch Control", on a USB device of its own. Must match libfakeinput (TOUCH_*). private const val TOUCH_MINOR = 17 private const val TOUCH_NODE = "hidraw$TOUCH_MINOR" private const val TOUCH_USB = "$GUEST_DEVICES/usb2" @@ -84,7 +50,6 @@ object SteamDeckPad { private const val TOUCH_HIDRAW = "$TOUCH_HID/hidraw/$TOUCH_NODE" private const val TOUCH_SERIAL = "DROIDDECK0001" - /** libfakeinput's kTouchReportDescriptor: Generic Desktop / Game Pad, 40-byte input report. */ private val TOUCH_REPORT_DESCRIPTOR = intArrayOf( 0x05, 0x01, 0x09, 0x05, 0xa1, 0x01, 0x09, 0x02, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x28, 0x81, 0x02, @@ -92,14 +57,12 @@ object SteamDeckPad { 0x09, 0x04, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x40, 0xb1, 0x02, 0xc0, ).map { it.toByte() }.toByteArray() - /** InputPlumber's CONTROLLER_DESCRIPTOR, as libfakeinput answers HIDIOCGRDESC. */ private val REPORT_DESCRIPTOR = intArrayOf( 0x06, 0xff, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x09, 0x02, 0x09, 0x03, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x40, 0x81, 0x02, 0x09, 0x06, 0x09, 0x07, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95, 0x40, 0xb1, 0x02, 0xc0, ).map { it.toByte() }.toByteArray() - /** Triton's native 0x45/0x47 input and 0x80-0x85 haptic output report IDs. */ private val TRITON_REPORT_DESCRIPTOR = intArrayOf( 0x06, 0x00, 0xff, 0x09, 0x01, 0xa1, 0x01, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, @@ -115,23 +78,13 @@ object SteamDeckPad { 0xc0, ).map { it.toByte() }.toByteArray() - /** The wired controller's: its 0x42 state report in place of the Bluetooth 0x45. */ private val TRITON_WIRED_REPORT_DESCRIPTOR = TRITON_REPORT_DESCRIPTOR.copyOf().also { it[15] = 0x42 } - /** Where [prepare] puts the stand-in listings; bound into the guest at the same path. */ fun listingDir(sessionRoot: File) = File(sessionRoot, "sys/deck/listing") - /** Writes the tree and returns the `host:guest` binds for it, or none if it could not be made. */ - /** The pad's own devices by minor (the Deck, its Steam Controller, the PlayStation pads): guest paths. */ private val padNodes = mutableMapOf<Int, String>() @Volatile private var hidrawClassDir: File? = null - /** - * Lists only the device the pad is now ([padType], FakeInputWriter.PAD_TYPE_*) in - * /sys/class/hidraw, none for an Xbox 360 pad. Device scans then find what is plugged in: SDL's - * (the PlayStation pads' driver) keeps a device it found and could not open, and never tries it - * again, while one that disappears from the listing is let go. Before the shim is told. - */ @Synchronized fun showPad(padType: Int) { val dir = hidrawClassDir ?: return @@ -200,12 +153,9 @@ object SteamDeckPad { padNodes.clear() padNodes[MINOR] = HIDRAW - // Only the names matter: libudev reads a listing for the subsystems to descend into and - // then opens /sys/class/hidraw itself, which is the bind above. val listing = listingDir(sessionRoot) for (name in listOf("sys/bus", "sys/class", "sys/devices", "class/hidraw", "bus")) File(listing, name).mkdirs() - // The runtime binds this directory over /sys/dev/char for the GPU (LinuxRuntime.bindGpuNode). - link(File(context.cacheDir, "drm/sys/$MAJOR:$MINOR"), HIDRAW) + link(File(LinuxRuntime.liveDir(context), "drm/sys/$MAJOR:$MINOR"), HIDRAW) val udevData = File(LinuxRuntime.rootDir(context), "run/udev/data").apply { mkdirs() } File(udevData, "c$MAJOR:$MINOR").writeText("I:1\nE:ID_INPUT=1\nE:ID_INPUT_JOYSTICK=1\n") @@ -233,13 +183,11 @@ object SteamDeckPad { link(File(dir(TOUCH_HIDRAW), "subsystem"), "/sys/class/hidraw") link(File(dir(TOUCH_HIDRAW), "device"), TOUCH_HID) link(File(hidrawClass, TOUCH_NODE), TOUCH_HIDRAW) - link(File(context.cacheDir, "drm/sys/$MAJOR:$TOUCH_MINOR"), TOUCH_HIDRAW) + link(File(LinuxRuntime.liveDir(context), "drm/sys/$MAJOR:$TOUCH_MINOR"), TOUCH_HIDRAW) File(udevData, "c$MAJOR:$TOUCH_MINOR").writeText("I:1\nE:ID_INPUT=1\nE:ID_INPUT_JOYSTICK=1\n") Log.i(TAG, "deck pad: /dev/$TOUCH_NODE described as Steam's touch controller (0000:11fb)") } - // A Steam Controller's HID device: the handheld's own pad as the wired one, or the paired - // one on Bluetooth. Both are always described; libfakeinput offers whichever is in use. fun describeTriton(wired: Boolean) { val hid = if (wired) TRITON_WIRED_HID else TRITON_HID val product = if (wired) "1302" else "1303" @@ -272,12 +220,10 @@ object SteamDeckPad { link(File(dir(hidraw), "subsystem"), "/sys/class/hidraw") link(File(dir(hidraw), "device"), hid) if (wired) padNodes[minor] = hidraw else link(File(hidrawClass, node), hidraw) - link(File(context.cacheDir, "drm/sys/$MAJOR:$minor"), hidraw) + link(File(LinuxRuntime.liveDir(context), "drm/sys/$MAJOR:$minor"), hidraw) File(udevData, "c$MAJOR:$minor").writeText("I:1\nE:ID_INPUT=1\nE:ID_INPUT_JOYSTICK=1\n") Log.i(TAG, "steam controller: /dev/$node described as Triton (28de:$product)") } - // The handheld's own pad as a PlayStation controller, each a USB device of its own with - // the report descriptor libfakeinput serves (kDs4/kDualSenseReportDescriptor). fun describeSony(dualSense: Boolean) { val bus = if (dualSense) 5 else 4 val product = if (dualSense) "0ce6" else "09cc" @@ -309,7 +255,7 @@ object SteamDeckPad { link(File(dir(hidraw), "subsystem"), "/sys/class/hidraw") link(File(dir(hidraw), "device"), hid) padNodes[minor] = hidraw - link(File(context.cacheDir, "drm/sys/$MAJOR:$minor"), hidraw) + link(File(LinuxRuntime.liveDir(context), "drm/sys/$MAJOR:$minor"), hidraw) File(udevData, "c$MAJOR:$minor").writeText("I:1\nE:ID_INPUT=1\nE:ID_INPUT_JOYSTICK=1\n") Log.i(TAG, "playstation pad: /dev/$node described as 054c:$product") } diff --git a/app/src/main/java/com/droiddeck/launcher/session/SteamDownloadMonitor.kt b/app/src/main/java/com/droiddeck/launcher/session/SteamDownloadMonitor.kt index d43aa3ab27..33d0d3f7e6 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SteamDownloadMonitor.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SteamDownloadMonitor.kt @@ -12,17 +12,13 @@ internal class SteamDownloadMonitor { private var previous = emptyMap<String, ManifestState>() private var lastProgressAt = 0L private var contentLogOffset = 0L + private var contentLog: File? = null private val activeContentUpdates = mutableSetOf<String>() private var lastContentActivityAt = 0L private var lastReceivedBytes = -1L private var lastReceivedAt = 0L - /** - * [receivedBytes] is the app uid's received-byte counter (the guest runs as that uid), or a - * negative value when Android does not report one. Steam writes its rate line about once a - * minute and flushes manifest counters even less often, so live traffic is what bridges them. - */ - fun poll(runtimeRoot: File, now: Long = System.currentTimeMillis(), receivedBytes: Long = -1L): Boolean { + fun poll(runtimeRoot: File, now: Long = System.currentTimeMillis(), receivedBytes: Long = -1L, client: String? = null): Boolean { val current = manifests(runtimeRoot).associate { it.path to read(it) } val progressed = current.any { (path, state) -> state.incomplete && state.bytesDownloaded > (previous[path]?.bytesDownloaded ?: state.bytesDownloaded) @@ -32,7 +28,7 @@ internal class SteamDownloadMonitor { val manifestActive = progressed || lastProgressAt > 0L && now - lastProgressAt <= MANIFEST_PROGRESS_GRACE_MS && current.values.any { it.incomplete } if (receiving(receivedBytes, now)) lastContentActivityAt = now - return manifestActive || readContentActivity(runtimeRoot, now) + return manifestActive || readContentActivity(runtimeRoot, now, client) } private fun receiving(receivedBytes: Long, now: Long): Boolean { @@ -48,16 +44,19 @@ internal class SteamDownloadMonitor { previous = emptyMap() lastProgressAt = 0L contentLogOffset = 0L + contentLog = null activeContentUpdates.clear() lastContentActivityAt = 0L lastReceivedBytes = -1L lastReceivedAt = 0L } - private fun readContentActivity(runtimeRoot: File, now: Long): Boolean { - val log = File(runtimeRoot, "root/.local/share/Steam/logs/content_log.txt") + private fun readContentActivity(runtimeRoot: File, now: Long, client: String?): Boolean { + val homes = client?.let { listOf(if (it == "x86_64") STEAM_HOMES[1] else STEAM_HOMES[0]) } ?: STEAM_HOMES + val log = homes.map { File(runtimeRoot, "$it/logs/content_log.txt") }.maxByOrNull { it.lastModified() }!! if (!log.isFile) return false - if (log.length() < contentLogOffset) { + if (log != contentLog || log.length() < contentLogOffset) { + contentLog = log contentLogOffset = 0L activeContentUpdates.clear() lastContentActivityAt = 0L @@ -100,12 +99,15 @@ internal class SteamDownloadMonitor { } private fun manifests(runtimeRoot: File): List<File> { - val steamRoots = linkedSetOf(File(runtimeRoot, "root/.local/share/Steam")) - val primary = steamRoots.first() - val libraryFolders = File(primary, "steamapps/libraryfolders.vdf") - runCatching { - PATH.findAll(libraryFolders.readText()).forEach { match -> - steamRoots += File(runtimeRoot, match.groupValues[1].removePrefix("/")) + val steamRoots = linkedSetOf<File>() + for (home in STEAM_HOMES) { + val primary = File(runtimeRoot, home) + steamRoots += primary + val libraryFolders = File(primary, "steamapps/libraryfolders.vdf") + runCatching { + PATH.findAll(libraryFolders.readText()).forEach { match -> + steamRoots += File(runtimeRoot, match.groupValues[1].removePrefix("/")) + } } } return steamRoots.flatMap { root -> @@ -145,6 +147,7 @@ internal class SteamDownloadMonitor { 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""") } diff --git a/app/src/main/java/com/droiddeck/launcher/session/SteamLanguage.kt b/app/src/main/java/com/droiddeck/launcher/session/SteamLanguage.kt index 11bb6d3038..166dc8e231 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SteamLanguage.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SteamLanguage.kt @@ -2,14 +2,9 @@ package com.droiddeck.launcher.session import java.util.Locale -/** - * Steam's name for a language: the API language codes the client and the Steamworks API use - * ("english", "schinese", "koreana"...), for every language Steam's interface comes in. - */ object SteamLanguage { const val DEFAULT = "english" - /** Every language the Steam client's interface is offered in. */ val all: Set<String> = setOf( "arabic", "bulgarian", "schinese", "tchinese", "czech", "danish", "dutch", "english", "finnish", "french", "german", "greek", "hungarian", "indonesian", "italian", "japanese", @@ -17,16 +12,11 @@ object SteamLanguage { "spanish", "latam", "swedish", "thai", "turkish", "ukrainian", "vietnamese", "malay", ) - /** Spanish-speaking regions Steam serves with Latin American Spanish rather than Spain's. */ private val latinAmerica = setOf( "419", "AR", "BO", "CL", "CO", "CR", "CU", "DO", "EC", "GT", "HN", "MX", "NI", "PA", "PE", "PR", "PY", "SV", "US", "UY", "VE", ) - /** - * Steam's language for [locale]. [region] stands in for the locale's own when it has none: the - * app's Spanish carries no region, and a player in Mexico should get Latin American Spanish. - */ fun forLocale(locale: Locale, region: String? = null): String { val country = locale.country.ifEmpty { region.orEmpty() } return when (locale.language) { diff --git a/app/src/main/java/com/droiddeck/launcher/session/SteamRepair.kt b/app/src/main/java/com/droiddeck/launcher/session/SteamRepair.kt index 38fc9c2352..9cd25d6856 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SteamRepair.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SteamRepair.kt @@ -8,6 +8,7 @@ object SteamRepair { private fun home(context: Context) = File(LinuxRuntime.rootDir(context), "root") private fun request(context: Context) = File(home(context), ".bl-steam-repair") private fun unconfirmed(context: Context) = File(home(context), ".local/share/Steam/package/droiddeck-unconfirmed") + private fun x64Unconfirmed(context: Context) = File(home(context), ".droiddeck-x64/.local/share/Steam/package/droiddeck-unconfirmed") fun queued(context: Context): Boolean = request(context).exists() @@ -16,6 +17,6 @@ object SteamRepair { }.isSuccess fun clientShown(context: Context) { - unconfirmed(context).delete() + (if (SessionPrefs.activeSteamClientArch(context) == "x86_64") x64Unconfirmed(context) else unconfirmed(context)).delete() } } diff --git a/app/src/main/java/com/droiddeck/launcher/session/StorageDiagnostics.kt b/app/src/main/java/com/droiddeck/launcher/session/StorageDiagnostics.kt index 73b64fb445..62e00be14f 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/StorageDiagnostics.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/StorageDiagnostics.kt @@ -5,14 +5,9 @@ import android.system.Os import android.util.Log import java.io.File -/** The opt-in snapshot written beside a session's other logs. */ object StorageDiagnostics { private const val TAG = "StorageDiagnostics" - /** - * Records facts about the library actually selected for this session and returns its device - * number for the preload shim. The path and volume ID stay out of the shared log. - */ fun writeSnapshot( sessionDir: File, library: File, @@ -46,7 +41,6 @@ object StorageDiagnostics { } } - /** The longest matching mount entry determines the filesystem for nested bindable folders. */ private fun filesystemType(path: File): String? = runCatching { val canonical = path.canonicalPath File("/proc/mounts").useLines { lines -> diff --git a/app/src/main/java/com/droiddeck/launcher/session/VacDiagnostics.kt b/app/src/main/java/com/droiddeck/launcher/session/VacDiagnostics.kt new file mode 100644 index 0000000000..5681882097 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/session/VacDiagnostics.kt @@ -0,0 +1,223 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import android.util.Log +import com.droiddeck.launcher.core.LogRedactor +import com.droiddeck.launcher.runtime.LinuxRuntime +import java.io.File +import java.io.RandomAccessFile +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale + +/** + * Source games state VAC-secure or insecure only in their console, which reaches a file (console.log in the + * mod folder) only with -condebug. The report quotes the lines it found and says inconclusive rather than guessing. + */ +object VacDiagnostics { + private const val TAG = "VacDiagnostics" + + /** + * Checked by the launch wrapper. Lines: session start (epoch seconds), the Steam client it ran, then + * "length<tab>canonical path" for each console.log already there. + */ + private const val MARKER = "root/.droiddeck-vac-diagnostics" + + private const val LAUNCHES = "root/.droiddeck-vac-launches" + + private const val CONSOLE_TAIL_BYTES = 4L * 1024 * 1024 + + private const val MAX_QUOTED = 40 + + private val INSECURE = Regex("insecure mode", RegexOption.IGNORE_CASE) + // "Connecting to" is only an attempt: L4D2 refuses a VAC server with a dialog that never reaches the console. + private val CONNECTED = Regex("^Connected to", RegexOption.IGNORE_CASE) + private val ATTEMPTED = Regex("^Connecting to", RegexOption.IGNORE_CASE) + private val NOTABLE = Regex("\\bVAC\\b|secure|Connected to|Connecting to|Disconnect|challenge|game coordinator", RegexOption.IGNORE_CASE) + private val STEAM_VAC = Regex("\\bVAC\\b|anti-?cheat", RegexOption.IGNORE_CASE) + + fun enabled(context: Context): Boolean = SessionPrefs.vacDiagnostics(context) + + fun arm(context: Context) { + val root = LinuxRuntime.rootDir(context) + val marker = File(root, MARKER) + try { + File(root, LAUNCHES).delete() + if (enabled(context)) { + val arch = SessionPrefs.steamClientArch(context) + // -condebug appends, so each console.log's length now is where this session's lines start. + val sizes = consoleLogs(context, arch).joinToString("") { "${it.length()}\t${canonical(it)}\n" } + marker.writeText("${System.currentTimeMillis() / 1000}\n$arch\n$sizes") + } else marker.delete() + } catch (e: Exception) { + Log.w(TAG, "could not arm VAC diagnostics", e) + } + } + + private const val SNAPSHOT_MARKER = ".vac-marker" + private const val SNAPSHOT_LAUNCHES = ".vac-launches" + + /** Call when a session stops, before the next [arm] replaces its marker and launch list. */ + fun snapshot(context: Context, dir: File) { + val root = LinuxRuntime.rootDir(context) + try { + File(root, MARKER).takeIf { it.isFile }?.copyTo(File(dir, SNAPSHOT_MARKER), overwrite = true) ?: return + File(root, LAUNCHES).takeIf { it.isFile }?.copyTo(File(dir, SNAPSHOT_LAUNCHES), overwrite = true) + } catch (e: Exception) { + Log.w(TAG, "could not keep this session's VAC diagnostics state", e) + } + } + + fun collect(context: Context, dir: File) { + val root = LinuxRuntime.rootDir(context) + val kept = File(dir, SNAPSHOT_MARKER).takeIf { it.isFile } + val marker = kept ?: File(root, MARKER) + val launchList = if (kept != null) File(dir, SNAPSHOT_LAUNCHES) else File(root, LAUNCHES) + if (!marker.isFile) return + try { + val armed = marker.readLines().map { it.trim() } + val since = (armed.getOrNull(0)?.toLongOrNull() ?: 0L) * 1000 - 5_000 + val arch = armed.getOrNull(1)?.takeIf { it.isNotEmpty() } ?: SessionPrefs.steamClientArch(context) + val armedSizes = armed.drop(2).mapNotNull { line -> + val (size, path) = line.split('\t', limit = 2).takeIf { it.size == 2 } ?: return@mapNotNull null + size.toLongOrNull()?.let { path to it } + }.toMap() + val out = File(dir, "vac").apply { mkdirs() } + val consoles = consoleLogs(context, arch).filter { writtenThisSession(it, since, armedSizes) } + val report = StringBuilder() + report.appendLine("VAC diagnostics - ${now()}") + report.appendLine("Read from the game's own console (-condebug) and the Steam client's logs.") + report.appendLine() + report.appendLine("== Client") + report.appendLine(" Client this session: " + if (arch == "x86_64") "x86-64 (Valve's x86-64 client under FEX)" else "arm64") + report.appendLine(" Files in its folder (/${SessionPrefs.steamRoot(context, arch).relativeTo(root).path}):") + clientFiles(context, arch).forEach { report.appendLine(" $it") } + report.appendLine() + report.appendLine("== Game launches this session (from the launch wrapper)") + val launches = launchList.takeIf { it.isFile }?.readLines().orEmpty().filter { it.isNotBlank() } + if (launches.isEmpty()) report.appendLine(" none - no Windows game was launched through the client") + launches.forEach { report.appendLine(" " + LogRedactor.redact(it)) } + report.appendLine() + report.appendLine("== Game consoles") + if (consoles.isEmpty()) { + report.appendLine(" No console.log was written this session. Only Source-engine games write one,") + report.appendLine(" and only when started with -condebug (this setting adds it).") + } + val names = consoleNames(consoles) + consoles.forEachIndexed { i, log -> + val name = names[i] + val lines = tail(log, armedSizes[canonical(log)] ?: 0L) + File(out, "$name-console.log").bufferedWriter().use { w -> + lines.forEach { w.write(LogRedactor.redact(it)); w.newLine() } + } + report.appendLine("-- $name (vac/$name-console.log)") + report.appendLine(" Verdict: " + verdict(lines)) + lines.filter { NOTABLE.containsMatchIn(it) }.takeLast(MAX_QUOTED) + .forEach { report.appendLine(" | " + LogRedactor.redact(it.trim())) } + report.appendLine() + } + report.appendLine("== VAC in the Steam client's logs") + val steamHits = File(dir, "steam").listFiles { f -> f.isFile }?.sortedBy { it.name }.orEmpty() + .flatMap { f -> runCatching { f.readLines() }.getOrDefault(emptyList()).filter { STEAM_VAC.containsMatchIn(it) }.map { "${f.name}: ${it.trim()}" } } + if (steamHits.isEmpty()) report.appendLine(" none - the client logged no VAC activity this session") + steamHits.takeLast(MAX_QUOTED).forEach { report.appendLine(" $it") } + File(dir, "vac.txt").writeText(report.toString()) + File(dir, SNAPSHOT_MARKER).delete() + File(dir, SNAPSHOT_LAUNCHES).delete() + Log.i(TAG, "VAC diagnostics: ${consoles.size} console log(s), ${steamHits.size} client VAC line(s), into $dir") + } catch (e: Exception) { + Log.w(TAG, "collecting VAC diagnostics", e) + } + } + + private fun verdict(lines: List<String>): String = when { + lines.any { INSECURE.containsMatchIn(it) } -> + "INSECURE - the game started in insecure mode and cannot join VAC-secured servers until it restarts." + lines.any { CONNECTED.containsMatchIn(it) } -> + "No insecure notice, and the game connected to a server. Confirm with the server's own info that it is VAC-secured." + lines.any { ATTEMPTED.containsMatchIn(it) } -> + "NOT CONNECTED - the game tried a server and never got in. If the screen said \"Connection Blocked: " + + "Please remove plug-ins ... VAC secured server\" (Left 4 Dead 2's wording), the game is insecure; " + + "that dialog never reaches the console." + else -> + "Inconclusive - the game never connected to a server. Join a VAC-secured server, then check again." + } + + /** Source writes <game>/<mod>/console.log, Source 2 <game>/game/<mod>/console.log. */ + private fun consoleLogs(context: Context, arch: String): List<File> { + val found = LinkedHashMap<String, File>() + for (library in libraryRoots(context, arch)) { + val games = File(library, "steamapps/common").listFiles { f -> f.isDirectory } ?: continue + for (game in games) { + val mods = (game.listFiles { f -> f.isDirectory }.orEmpty().toList() + + File(game, "game").listFiles { f -> f.isDirectory }.orEmpty().toList()) + for (mod in mods) { + val log = File(mod, "console.log") + if (log.isFile) found[canonical(log)] = log + } + } + } + return found.values.toList() + } + + private fun libraryRoots(context: Context, arch: String): List<File> { + val root = LinuxRuntime.rootDir(context) + val steam = SessionPrefs.steamRoot(context, arch) + val roots = mutableListOf(steam) + (if (arch == "x86_64") GameStorage.x64CardLibrary(context) else GameStorage.effective(context)?.let { File(it.path) }) + ?.let { roots.add(it) } + runCatching { + Regex("\"path\"\\s+\"([^\"]+)\"").findAll(File(steam, "steamapps/libraryfolders.vdf").readText()).forEach { + roots.add(File(root, it.groupValues[1].removePrefix("/"))) + } + } + return roots.filter { it.isDirectory }.distinctBy { runCatching { it.canonicalPath }.getOrDefault(it.path) } + } + + /** Two libraries can hold the same game and mod folder; a repeated name takes a tag from the log's path. */ + internal fun consoleNames(logs: List<File>): List<String> { + val used = HashSet<String>() + return logs.map { log -> + val base = consoleName(log) + if (used.add(base)) base else "$base-%08x".format(canonical(log).hashCode()).also { used.add(it) } + } + } + + private fun consoleName(log: File): String { + val mod = log.parentFile + val game = mod?.parentFile?.let { if (it.name == "game") it.parentFile else it } + return "${game?.name ?: "game"}-${mod?.name ?: "mod"}".replace(Regex("[^A-Za-z0-9._ +-]+"), "_") + } + + private fun canonical(file: File): String = runCatching { file.canonicalPath }.getOrDefault(file.path) + + internal fun writtenThisSession(log: File, since: Long, armedSizes: Map<String, Long>): Boolean = + log.lastModified() >= since && log.length() != armedSizes[canonical(log)] + + internal fun tail(file: File, from: Long = 0L): List<String> = try { + RandomAccessFile(file, "r").use { raf -> + val length = raf.length() + val since = from.takeIf { it <= length } ?: 0L + val start = maxOf(since, length - CONSOLE_TAIL_BYTES) + raf.seek(start) + val bytes = ByteArray((length - start).toInt()) + raf.readFully(bytes) + String(bytes, Charsets.UTF_8).lines().let { if (start > since) it.drop(1) else it } + } + } catch (e: Exception) { + Log.w(TAG, "could not read ${file.name}", e) + emptyList() + } + + private fun clientFiles(context: Context, arch: String): List<String> { + val steam = SessionPrefs.steamRoot(context, arch) + return listOf( + "linuxarm64/steamclient.so" to "arm64 Linux client", + "linux64/steamclient.so" to "x86-64 Linux client", + "ubuntu12_64/steamclient.so" to "x86-64 Linux client (ubuntu12_64)", + "steamrt64/steamclient.so" to "x86-64 Linux client (steamrt64)", + ).map { (path, label) -> "$label: ${if (File(steam, path).isFile) "present" else "absent"} ($path)" } + } + + private fun now(): String = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US).format(Date()) +} diff --git a/app/src/main/java/com/droiddeck/launcher/session/WinComponentNames.kt b/app/src/main/java/com/droiddeck/launcher/session/WinComponentNames.kt index 5a8d38f5ea..e9720e0f98 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/WinComponentNames.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/WinComponentNames.kt @@ -1,11 +1,5 @@ package com.droiddeck.launcher.session -/** - * What to call a catalog component on screen. Bannerlator's catalog keys (vcredist2010_dll, - * oalinst_dll, d3dcompiler_47...) have no display name, and some descriptions do not fit the entry, - * so names come from here: families by pattern, the rest from a table, the key itself otherwise. - * The "_dll" twin of an installer (the direct DLL copy) shares the installer's name. - */ object WinComponentNames { private val TABLE = mapOf( "oalinst" to "OpenAL", "XLiveRedist" to "Games for Windows Live", "gfw" to "Games for Windows Live", diff --git a/app/src/main/java/com/droiddeck/launcher/session/WinComponents.kt b/app/src/main/java/com/droiddeck/launcher/session/WinComponents.kt index 20e3f374c4..c79171df26 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/WinComponents.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/WinComponents.kt @@ -19,23 +19,6 @@ import java.io.FileOutputStream import java.security.MessageDigest import java.util.zip.ZipInputStream -/** - * Windows components (OpenAL, d3dx9, XAudio, VC++ DLLs...) for a game's Proton prefix, picked per - * game, from Bannerlator's catalog (components.json on winlator-contents, Bottles' manifest format). - * - * Installing one runs its steps once, into the runtime: the archives it names are downloaded and - * its DLLs copied to /opt/droiddeck/wincomponents/<name>/{system32,syswow64}, with component.json - * holding its DLL overrides and the components it bundles. The picks go to the runtime as - * ~/.config/droiddeck/wincomponents.json, and droiddeck-wincomponents copies the picked components - * into the game's prefix at every launch (see that script for why every launch). - * - * A component whose installer is a Windows Installer package (.msi: XNA, PhysX, Games for Windows - * Live, MSXML...) installs here too, without running it: droiddeck-msi-install reads the package's - * tables in the runtime and lays out its files (Program Files, the .NET GAC, winsxs) and registry - * values the way Wine's msiexec would, under the same store folder. One that runs any other - * installer (.exe), unpacks a cabinet or edits the prefix's registry by itself is listed with the - * reason it cannot be installed yet. - */ object WinComponents { private const val TAG = "WinComponents" const val CATALOG_URL = "https://raw.githubusercontent.com/Droid-Deck/DroidDeck-Components/main/components.json" @@ -43,46 +26,23 @@ object WinComponents { private const val GUEST_SELECTION = "root/.config/droiddeck/wincomponents.json" private const val STORE = "opt/droiddeck/wincomponents" private val ID = Regex("[A-Za-z0-9][A-Za-z0-9._-]{0,63}") - // register_dll is left out on purpose: the DLLs it names are ones Wine ships and has registered - // at the same path, so the native file at that path is the one the registration loads. private val FILE_STEPS = setOf("download_archive", "archive_extract", "copy_dll", "copy_file", "override_dll", "register_dll") private val INSTALLER_STEPS = setOf("install_exe", "install_msi") - /** - * Steps done here without any installer running: a Windows version or registry value for the - * prefix (written by droiddeck-wincomponents with the rest), files picked out of a cabinet, and - * "uninstall Wine Mono", which the mscoree override beside it already does for the game. - */ private val OFFLINE_STEPS = setOf("set_windows", "set_register_key", "get_from_cab", "uninstall") - /** - * Installers that are their own setup program (NSIS, InnoSetup, IExpress scripts): nothing - * inside them is a package to lay out, so they wait for a way to run them. - */ private val RUNS_OWN_SETUP = setOf( "K-Lite", "ffdshow", "lavfilters702", "lavfilters741", "quicktime72", "dirac", "webview2", "aairruntime", "gfw", "ie8_kb2936068", "art2k7min", "vcredist6sp6", "VulkanRT", "jet40", "mdac28", "oalinst", "dotnet20", "dotnet20sp1", "dotnet35", "dotnet35sp1", ) private const val MSI_INSTALL = "/usr/local/bin/droiddeck-msi-install" - /** Where a downloaded package or installer waits for the installer, inside the runtime so it can read it. */ private const val MSI_CACHE = "$STORE/.packages" - /** - * Catalog entries every Proton here already ships, which an install would only shadow: Wine - * Gecko and Mono, the Chinese/Japanese/Korean fonts (Malgun, MS Gothic, YaHei, SimSun are in - * share/fonts of Proton Experimental, GE-Proton and proton-cachyos alike), Wine's own - * PowerShell wrapper and the Vulkan loader (vulkan-1.dll, 32- and 64-bit, in all three). - */ private val PROTON_PROVIDES = setOf("gecko", "mono", "cjkfonts", "powershell", "VulkanRT") - /** The keys the catalog nests under "environment" on a few .NET entries. */ private val NESTED_KEYS = setOf("url", "file_name", "file_checksum", "file_size") fun validId(id: String): Boolean = ID.matches(id) && ".." !in id private val BACKGROUND = ThreadLocal<Boolean>() - /** - * Runs [block] as background work: the runtime helpers an install starts on this thread run - * at the lowest CPU and I/O priority (nice 19, ionice idle where the runtime has it). - */ fun <T> background(block: () -> T): T { BACKGROUND.set(true) try { return block() } finally { BACKGROUND.remove() } @@ -101,58 +61,35 @@ object WinComponents { class Component( val name: String, val description: String, val provider: String, val status: String, val dependencies: List<String>, val steps: List<Step>, - /** - * A recording of what the component's own installer leaves in a prefix (winlator-contents' - * component-snapshots release, made by tools/snapshot/record.py): the files it places and - * the registry values it writes. With one, the installer never runs: the files come from - * the archive beside the recording or out of the vendor's installer, the registry from the - * recording. Empty for a component without one. - */ val snapshot: String = "", ) enum class Support { READY, NEEDS_INSTALLER, UNSUPPORTED } - /** The two halves of an install the page shows one after the other, each 0..100. */ enum class Phase { DOWNLOAD, INSTALL } - /** Progress: the component being worked on, what it is doing, the phase, 0..100 or -1 when unknown. */ class Progress(val component: String, val stage: String, val phase: Phase, val percent: Int) - /** The percent a droiddeck-msi-install progress line carries ("progress 37% placing files"), or -1. */ private val PERCENT_LINE = Regex("""^(\d{1,3})% (.*)$""") private fun engineLine(text: String): Pair<String, Int> = PERCENT_LINE.find(text)?.let { it.groupValues[2] to it.groupValues[1].toInt().coerceIn(0, 100) } ?: (text to -1) - /** - * A step that installs a Windows Installer package, or an installer .exe that is a wrapper - * around packages (a WiX bundle, a self-extracting cabinet or 7-Zip archive), which - * droiddeck-msi-install lays out here without running it. - */ private fun isPackage(step: Step): Boolean = step.action in INSTALLER_STEPS && step.str("url").startsWith("https://") && (step.action == "install_msi" || listOf(step.str("file_name"), step.str("url").substringBefore('?')) .any { it.endsWith(".msi", ignoreCase = true) || it.endsWith(".exe", ignoreCase = true) }) - /** - * Catalog entries nothing here can use: the IE8 security update patches a browser no prefix - * has; the OpenAL setup program is a twin of oalinst_dll, which copies the same DLLs; and - * WebView2 can only be installed by running Microsoft's installer in the prefix (its files - * sit in a container nothing opens and may not be hosted), which no runtime here does. - */ private val POINTLESS = setOf("ie8_kb2936068", "oalinst", "webview2") private fun protonProvides(name: String): Boolean = name in PROTON_PROVIDES || name in POINTLESS || name.startsWith("mono-") fun hasSnapshot(c: Component): Boolean = c.snapshot.startsWith("https://github.com/") && c.snapshot.endsWith(".snapshot.json") - /** The steps a recording makes redundant: everything that places files or edits the registry. */ private val SNAPSHOT_COVERS = INSTALLER_STEPS + setOf("download_archive", "archive_extract", "copy_dll", "copy_file") + OFFLINE_STEPS fun fetch(): List<Component>? = Downloader.downloadString(CATALOG_URL)?.let { parse(it) } private const val CATALOG_CACHE = "wincomponents-catalog.json" - /** The catalog from the network, kept for later; the copy kept last time when offline. */ fun fetch(context: Context): List<Component>? { val cache = File(context.filesDir, CATALOG_CACHE) Downloader.downloadString(CATALOG_URL)?.let { body -> @@ -161,7 +98,6 @@ object WinComponents { return runCatching { parse(cache.readText()) }.getOrNull() } - /** The copy of the catalog kept by [fetch], without asking the network; null before the first fetch. */ fun cached(context: Context): List<Component>? = runCatching { parse(File(context.filesDir, CATALOG_CACHE).readText()) }.getOrNull() @@ -186,21 +122,14 @@ object WinComponents { } } - /** - * The catalog entry that installs [name] here: the detector names installers - * (vcredist2022, oalinst), and their DLL-copy twin (vcredist2022_dll, oalinst_dll) is the one - * that installs without running anything; [name] itself when there is no such twin. - */ fun installable(name: String, all: Map<String, Component>): String { val twin = all[if (name == "oalinst") "oalinst_dll" else "${name}_dll"] return if (twin != null && support(twin, all) == Support.READY) twin.name else name } - /** Whether [c] can be installed here, its bundled components included. */ fun support(c: Component, all: Map<String, Component>, depth: Int = 0): Support { if (c.status != "ready" || depth > 8 || protonProvides(c.name)) return Support.UNSUPPORTED val installers = c.steps.filter { it.action in INSTALLER_STEPS } - // A recording of the installer's result stands in for running it, whatever the steps say. if (hasSnapshot(c)) { return c.dependencies.map { all[it]?.let { d -> support(d, all, depth + 1) } ?: Support.UNSUPPORTED } .maxOrNull() ?: Support.READY @@ -219,7 +148,6 @@ object WinComponents { } private fun fileStepOk(step: Step): Boolean = when (step.action) { - // An .exe or .cab archive (DirectX's redistributable) is opened by the runtime's tools. "download_archive", "archive_extract" -> step.str("url").let { url -> !url.startsWith("http") || url.startsWith("https://github.com/") && url.substringBefore('?').lowercase().let { it.endsWith(".tar.xz") || it.endsWith(".zip") || it.endsWith(".exe") || it.endsWith(".cab") } @@ -228,20 +156,14 @@ object WinComponents { else -> true } - /** The installed version of a component, or null. */ fun installed(context: Context, id: String): String? = runCatching { JSONObject(File(LinuxRuntime.rootDir(context), "$STORE/$id/component.json").readText()).optString("version", "?") }.getOrNull() - /** Every component in the runtime, by id. */ fun installedIds(context: Context): List<String> = File(LinuxRuntime.rootDir(context), STORE).listFiles { f -> f.isDirectory && validId(f.name) } .orEmpty().map { it.name }.filter { installed(context, it) != null }.sorted() - /** - * Installs [c] and the components it bundles that are not installed yet. [onProgress] gets a - * line for the step and 0..100 (or -1). Returns null on success, else a message. - */ fun install(context: Context, c: Component, all: Map<String, Component>, onProgress: (Progress) -> Unit): String? { if (support(c, all) != Support.READY) return "${c.name} cannot be installed here yet" val order = ArrayList<Component>() @@ -251,8 +173,6 @@ object WinComponents { if (x.name == c.name || installed(context, x.name) == null) order.add(x) } visit(c, 0) - // One download per archive however many components copy out of it (DirectMusic's eleven - // parts all come from dxnt, 100 MB). val work = File(context.cacheDir, "wincomponents").apply { FileUtils.delete(this); mkdirs() } val archives = HashMap<String, File>() return try { @@ -276,10 +196,7 @@ object WinComponents { val overrides = ArrayList<String>() var source: File? = null var msi: JSONObject? = null - // The registry values the steps themselves set (a Windows version, a key), beside the packages'. val registry = ArrayList<JSONObject>() - // Archives the runtime's tools opened (installer .exe, cabinets), by the name the catalog - // calls them, and the folders they were opened into; cleaned up at the end. val runtimeArchives = HashMap<String, File>() val runtimeDirs = ArrayList<File>() val cabs = HashMap<String, File>() @@ -293,8 +210,6 @@ object WinComponents { for (step in c.steps) when { hasSnapshot(c) && step.action in SNAPSHOT_COVERS -> Unit else -> when (step.action) { - // A component may have several packages (PowerShell's 32- and 64-bit): each adds to the - // same folder, the first one names the component. "install_msi", "install_exe" -> { val (result, problem) = installPackage(context, c, step, staging, onProgress) if (result == null) return problem @@ -303,15 +218,12 @@ object WinComponents { result.optJSONArray("notes")?.let { for (i in 0 until it.length()) notes.put(it.get(i)) } } ?: result } - // A catalog step that makes room for the installer's own copy; ours is copied anyway. "delete_dlls" -> Unit "download_archive", "archive_extract" -> { val url = step.str("url") if (!url.startsWith("http")) continue source = archives[url] ?: run { val name = url.substringBefore('?').substringAfterLast('/') - // A zip or tar.xz is opened here; an .exe or .cab by the runtime's tools, so it - // is downloaded where the runtime can read it and kept for get_from_cab steps. val byRuntime = name.lowercase().let { it.endsWith(".exe") || it.endsWith(".cab") } val file = if (byRuntime) File(root, "$MSI_CACHE/${archives.size}-$name").apply { parentFile?.mkdirs() } else File(work, "${archives.size}-$name") @@ -333,8 +245,6 @@ object WinComponents { dir.also { archives[url] = it } } } - // Files picked out of a cabinet: one the catalog downloaded (DirectX's redistributable, - // a self-extracting cabinet), or cabinets an earlier pick put under temp/. "get_from_cab" -> { val pattern = step.str("source") val containers = runtimeArchives[pattern]?.let { listOf(it) } ?: run { @@ -362,7 +272,6 @@ object WinComponents { } } } - // The Windows version a game sees: HKCU\Software\Wine "Version", the last word wins. "set_windows" -> step.str("version").takeIf { it.isNotEmpty() }?.let { version -> registry.removeAll { it.optString("key") == "Software\\Wine" && it.optString("name") == "Version" } registry += JSONObject().put("hive", "HKCU").put("key", "Software\\Wine").put("name", "Version").put("type", "sz").put("data", version) @@ -385,8 +294,6 @@ object WinComponents { } registry += value } - // "Uninstall Wine Mono" before a real .NET Framework: the mscoree override the catalog - // sets beside it is what takes Mono out of the game's way; nothing to remove here. "uninstall" -> Unit "copy_dll", "copy_file" -> { val from = source ?: return "a copy step before any archive" @@ -424,7 +331,6 @@ object WinComponents { FileUtils.delete(temp) } if (registry.isNotEmpty()) { - // The packages' values are already in registry.json; the steps' own go after them. val file = File(staging, "registry.json") val values = runCatching { JSONObject(file.readText()).optJSONArray("values") }.getOrNull() ?: JSONArray() registry.forEach { values.put(it) } @@ -444,13 +350,6 @@ object WinComponents { return null } - /** - * Lays the component out from its recording: downloads the snapshot, then its files (the - * archive beside it when the recording carries them, else out of the vendor's installer by - * the paths the recording maps, small generated ones inline) into [staging]/drive_c, and the - * recorded registry values into registry.json. Returns a result like the MSI engine's, or - * null and why. - */ private fun installSnapshot(context: Context, c: Component, staging: File, work: File, onProgress: (Progress) -> Unit): Pair<JSONObject?, String> { val root = LinuxRuntime.rootDir(context) val name = c.snapshot.substringAfterLast('/') @@ -481,7 +380,6 @@ object WinComponents { file.delete() placed = drive.walkTopDown().count { it.isFile } } else { - // The files come out of the installer the catalog names, by the paths the recording maps. val step = c.steps.firstOrNull { it.action in INSTALLER_STEPS && it.str("url").startsWith("https://") } ?: return null to "the recording needs the installer, which the catalog does not name" val url = step.str("url") @@ -532,14 +430,9 @@ object WinComponents { .put("notes", JSONArray(notes + listOfNotNull(installerVersion.takeIf { it.isNotEmpty() }?.let { "recorded from $it on ${snapshot.optString("wine")}" }))) to "" } - /** The regex for a catalog file pattern: * matches anything, case does not matter. */ private fun globRegex(pattern: String) = Regex("^" + pattern.split("*").joinToString(".*") { Regex.escape(it) } + "$", RegexOption.IGNORE_CASE) - /** - * Has the runtime's tools open [archive] (an installer .exe, a cabinet, a self-extracting - * one) into a folder of the package cache called [tag]; that folder, or null and a log line. - */ private fun unpackInRuntime(context: Context, c: Component, archive: File, tag: String, onProgress: (Progress) -> Unit): File? { val root = LinuxRuntime.rootDir(context) val cache = File(root, MSI_CACHE) @@ -563,12 +456,6 @@ object WinComponents { return dir } - /** - * Downloads the component's package (.msi) or installer (.exe) into the runtime and has - * droiddeck-msi-install lay it out in [staging]. Returns the installer's result (product, - * version, counts, notes), or null and why. Everything the installer prints also goes to - * files/logs/tools. - */ private fun installPackage(context: Context, c: Component, step: Step, staging: File, onProgress: (Progress) -> Unit): Pair<JSONObject?, String> { val root = LinuxRuntime.rootDir(context) val url = step.str("url") @@ -641,10 +528,6 @@ object WinComponents { Log.w(TAG, "extract ${archive.name}", e); false } - /** - * Bannerlator's rule: the manifest's own temp paths are Bottles', so the files are found by name - * anywhere in the unpacked tree, preferring the ones under the matching win32/win64 folder. - */ private fun copyMatching(srcRoot: File, pattern: String, dest: File, arch: String?) { if (pattern.isEmpty()) return val rx = Regex("^" + pattern.split("*").joinToString(".*") { Regex.escape(it) } + "$", RegexOption.IGNORE_CASE) @@ -658,7 +541,6 @@ object WinComponents { matches.forEach { f -> f.copyTo(File(dest, f.name.lowercase()), overwrite = true) } } - /** Removes a component from the runtime and from every game's picks. */ @Synchronized fun uninstall(context: Context, id: String) { require(validId(id)) @@ -666,17 +548,8 @@ object WinComponents { save(context, selections(context).mapValues { (_, sel) -> Selection(sel.auto - id, sel.user - id) }) } - /** - * Why a component was turned on for a game by itself ([setAuto]): [kind] says whose list it came - * from (see AutoComponents), [args] what the reason line names. Kept beside the picks. - */ class AutoReason(val kind: String, val args: List<String>) - /** - * Everything kept per game, by the appid its prefix is named after: [auto] - turned on by - * itself, with its reason; [user] - a switch the user pressed (true on, false off), which wins - * over [auto] either way. What the launch reads is [effective]. - */ class Selection(val auto: Map<String, AutoReason>, val user: Map<String, Boolean>) { val effective: List<String> get() = (auto.keys.filter { user[it] != false } + user.filterValues { it }.keys).distinct() @@ -697,7 +570,6 @@ object WinComponents { AutoReason(r.optString("kind"), (0 until a.length()).map { a.optString(it) }) } }.orEmpty() - // Before there were overrides, every pick was the user's own. val user = if (users == null) games.optJSONArray(app)?.let { ids -> (0 until ids.length()).map { ids.getString(it) }.filter { validId(it) }.associateWith { true } }.orEmpty() else users.optJSONObject(app)?.let { o -> o.keys().asSequence().filter { validId(it) }.associateWith { o.optBoolean(it) } }.orEmpty() Selection(auto, user) @@ -706,7 +578,6 @@ object WinComponents { emptyMap() } - /** Each game's picks as the launch takes them, by the appid its prefix is named after. */ fun read(context: Context): Map<String, List<String>> = selections(context).mapValues { it.value.effective }.filterValues { it.isNotEmpty() } @@ -714,7 +585,6 @@ object WinComponents { fun selection(context: Context, appKey: String): Selection = selections(context)[appKey] ?: Selection(emptyMap(), emptyMap()) - /** The user's own switch for [id] in [appKey]: on or off, over whatever was picked by itself. */ @Synchronized fun setUser(context: Context, appKey: String, id: String, on: Boolean) { require(validId(id)) @@ -724,7 +594,6 @@ object WinComponents { save(context, all) } - /** The components picked by themselves for [appKey], replacing the earlier ones; the user's switches stay. */ @Synchronized fun setAuto(context: Context, appKey: String, auto: Map<String, AutoReason>) { require(auto.keys.all { validId(it) }) @@ -734,7 +603,6 @@ object WinComponents { save(context, all) } - /** The user's picks for [appKey] set outright (each listed on, every other user switch dropped). */ @Synchronized fun setPicks(context: Context, appKey: String, ids: List<String>) { require(ids.all { validId(it) }) @@ -746,7 +614,6 @@ object WinComponents { private fun save(context: Context, games: Map<String, Selection>) { val kept = games.filterValues { it.auto.isNotEmpty() || it.user.isNotEmpty() } - // Version 1 still: droiddeck-wincomponents reads "games" and ignores the rest. val text = JSONObject().put("version", 1) .put("games", JSONObject().apply { kept.forEach { (app, sel) -> sel.effective.takeIf { it.isNotEmpty() }?.let { put(app, JSONArray(it)) } } }) .put("auto", JSONObject().apply { @@ -762,11 +629,6 @@ object WinComponents { publish(context, text) } - /** - * Writes the picks where the launch script reads them; SessionFiles calls this at every session - * start too, so a runtime reinstalled since keeps them. An empty selection still writes a file, - * which is how a component turned off for every game is taken out of their prefixes. - */ @Synchronized fun publish(context: Context, text: String? = null) { val body = text ?: runCatching { AtomicFile(File(context.filesDir, SELECTION)).readFully().toString(Charsets.UTF_8) }.getOrNull() ?: return diff --git a/app/src/main/java/com/droiddeck/launcher/storage/SteamStorage.kt b/app/src/main/java/com/droiddeck/launcher/storage/SteamStorage.kt new file mode 100644 index 0000000000..e707fd59fc --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/storage/SteamStorage.kt @@ -0,0 +1,138 @@ +package com.droiddeck.launcher.storage + +import java.io.File + +object SteamStorage { + const val SCOUT = 1070560 + const val SOLDIER = 1391110 + const val SNIPER = 1628350 + const val ARM_RUNTIME = 4185400 + const val PROTON_ARM = 4427310 + const val PROTON_11_ARM = 4628740 + const val REDISTRIBUTABLES = 228980 + const val FEX = 3127680 + + const val ARM_TOOL = "droiddeck-proton-arm64" + const val ARM_11_TOOL = "droiddeck-proton-11-arm64" + + private val VALVE_TOOLS = setOf( + 858280, 961940, 1054830, 1113280, 1245040, 1420170, 1493710, 1580130, 1887720, 2180100, 2348590, + 2805730, 3029110, 3658110, 4183110, 4628710, 4690330, + SCOUT, SOLDIER, SNIPER, ARM_RUNTIME, PROTON_ARM, PROTON_11_ARM, REDISTRIBUTABLES, FEX, + ) + + private val APP_ID = Regex("^\\s*\"appid\"\\s*\"(\\d+)\"", RegexOption.MULTILINE) + private val NAME = Regex("^\\s*\"name\"\\s*\"([^\"]*)\"", RegexOption.MULTILINE) + private val INSTALL_DIR = Regex("^\\s*\"installdir\"\\s*\"([^\"]*)\"", RegexOption.MULTILINE) + private val STATE = Regex("^\\s*\"StateFlags\"\\s*\"(\\d+)\"", RegexOption.MULTILINE) + 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*\"([^\"]+)\"") + + data class Manifest( + val file: File, val appId: Int, val name: String, val installDir: String?, + val installed: Boolean, val lastPlayed: Long, + ) + + fun parseManifest(file: File, text: String): Manifest? { + val id = APP_ID.find(text)?.groupValues?.get(1)?.toIntOrNull() + ?: file.name.removePrefix("appmanifest_").removeSuffix(".acf").toIntOrNull() ?: return null + val dir = INSTALL_DIR.find(text)?.groupValues?.get(1)?.trim() + ?.takeIf { it.isNotEmpty() && it != "." && it != ".." && '/' !in it && '\\' !in it } + return Manifest( + file, id, NAME.find(text)?.groupValues?.get(1)?.trim().orEmpty(), dir, + (STATE.find(text)?.groupValues?.get(1)?.toIntOrNull() ?: 0) and 4 != 0, + LAST_PLAYED.find(text)?.groupValues?.get(1)?.toLongOrNull() ?: 0L, + ) + } + + /** The folder alone does not mean installed: Decky's CEF marker creates it. */ + fun x64ClientPresent(root: File): Boolean = File(root, "steamrt64/steam").isFile || + File(root, "package/droiddeck-installed").isFile || File(root, "steamapps").isDirectory + + class Listing(val manifests: List<Manifest>, val otherIds: Set<Int>, val complete: Boolean) { + val ids: Set<Int> get() = manifests.map { it.appId }.toSet() + otherIds + } + + private val PENDING_MANIFEST = Regex("appmanifest_(\\d+)\\.acf\\..+") + + // A partial download has no manifest yet, only a temporary one and its staging folder. + fun manifests(library: File): Listing? { + val apps = File(library, "steamapps") + val names = apps.list() ?: return null + var complete = true + val other = HashSet<Int>() + val read = ArrayList<Manifest>() + for (name in names.sorted()) { + val pending = PENDING_MANIFEST.matchEntire(name) + if (pending != null) { + pending.groupValues[1].toIntOrNull()?.let(other::add) + continue + } + if (!name.startsWith("appmanifest_") || !name.endsWith(".acf")) continue + val f = File(apps, name) + if (!f.isFile) continue + val named = name.removePrefix("appmanifest_").removeSuffix(".acf").toIntOrNull() + val text = runCatching { f.readText() }.getOrNull() + if (text == null) { + if (named != null) other.add(named) else complete = false + continue + } + parseManifest(f, text)?.let(read::add) + } + File(apps, "downloading").list()?.forEach { it.toIntOrNull()?.let(other::add) } + return Listing(read, other, complete) + } + + fun isTool(m: Manifest): Boolean = m.appId in VALVE_TOOLS || + m.installDir?.let { it.startsWith("Proton ") || it.startsWith("SteamLinuxRuntime") } == true + + enum class Kind { ARM_PROTON, REQUIRED, OLD_RUNTIME, X86_PROTON } + + // DroidDeck's ARM64 Steam client cannot run Valve's x86 Protons, and its own Proton and FEX tools + // replace the scout and soldier container runtimes. + fun kind(m: Manifest): Kind { + val dir = m.installDir.orEmpty() + return when { + m.appId == SCOUT || m.appId == SOLDIER || dir == "SteamLinuxRuntime" || dir == "SteamLinuxRuntime_soldier" -> Kind.OLD_RUNTIME + dir.startsWith("Proton") && "ARM64" in dir -> Kind.ARM_PROTON + m.appId == PROTON_ARM || m.appId == PROTON_11_ARM -> Kind.ARM_PROTON + dir.startsWith("Proton ") -> Kind.X86_PROTON + else -> Kind.REQUIRED + } + } + + fun compatMappings(configVdf: String): Map<String, String> { + val start = configVdf.indexOf("\"CompatToolMapping\"") + if (start < 0) return emptyMap() + val open = configVdf.indexOf('{', start) + if (open < 0) return emptyMap() + var depth = 0 + var end = configVdf.length + for (i in open until configVdf.length) { + when (configVdf[i]) { + '{' -> depth++ + '}' -> if (--depth == 0) { end = i; break } + } + } + return MAPPING.findAll(configVdf.substring(open, end)).associate { it.groupValues[1] to it.groupValues[2] } + } + + fun compatToolName(compatibilityToolVdf: String): String? = COMPAT_NAME.find(compatibilityToolVdf)?.groupValues?.get(1) + + private val ARM_IN_NAME = Regex("arm64|aarch64") + + // The x86-64 client ignores tools named for arm64; droiddeck-steam-x64 names its wrappers with a64 instead. + fun x64ToolName(name: String): String = name.replace(ARM_IN_NAME, "a64") + + class ToolUse(val mappings: Map<String, String>, val installed: Set<String>, val x64: Boolean = false) { + private fun key(tool: String) = if (x64) x64ToolName(tool) else tool + fun games(tool: String): Int = mappings.count { (app, name) -> name == key(tool) && app in installed } + fun isDefault(tool: String): Boolean = mappings["0"] == key(tool) + } + + fun leftoverId(name: String): Int? = name.toLongOrNull()?.takeIf { it in 1 until (1L shl 31) }?.toInt() + + fun isStubPrefix(prefix: File): Boolean = prefix.walkTopDown().onEnter { !java.nio.file.Files.isSymbolicLink(it.toPath()) } + .none { it.isFile && it.name != "steam_autocloud.vdf" && !java.nio.file.Files.isSymbolicLink(it.toPath()) } +} diff --git a/app/src/main/java/com/droiddeck/launcher/storage/StorageScan.kt b/app/src/main/java/com/droiddeck/launcher/storage/StorageScan.kt new file mode 100644 index 0000000000..71eb791985 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/storage/StorageScan.kt @@ -0,0 +1,290 @@ +package com.droiddeck.launcher.storage + +import android.content.Context +import android.os.StatFs +import android.system.Os +import android.system.OsConstants +import com.droiddeck.launcher.frontend.Library +import com.droiddeck.launcher.runtime.LinuxRuntime +import android.util.Log +import com.droiddeck.launcher.runtime.FlatpakManager +import com.droiddeck.launcher.session.ComponentsManager +import com.droiddeck.launcher.session.SecondaryLibrary +import com.droiddeck.launcher.session.SessionPaths +import com.droiddeck.launcher.session.SessionPrefs +import java.io.File + +enum class Bucket { GAMES, GAME_DATA, TOOLS, COMPONENTS, STORES, DESKTOP, SYSTEM, DROIDDECK } + +class GameUsage( + val appId: Int, val name: String, val art: File?, val library: String, val internal: Boolean, val lastPlayed: Long, + val game: Long, val prefix: Long, val shaders: Long, val workshop: Long, val shaderDir: File?, + val x64: Boolean = false, +) { + val data: Long get() = prefix + shaders + workshop + val total: Long get() = game + data +} + +enum class ToolState { IN_USE, REQUIRED, UNUSED } +enum class ToolReason { DEFAULT_PROTON, PROTON, FEX_RUNTIME, ARM_RUNTIME, REDISTRIBUTABLES, FEX, STEAM_TOOL, OLD_RUNTIME, X86_PROTON, CUSTOM, CUSTOM_UNKNOWN, X64_CLIENT } + +class ToolUsage( + val key: String, val name: String, val bytes: Long, val state: ToolState, val reason: ToolReason, + val games: Int, val isDefault: Boolean, val manifests: List<File>, val dirs: List<File>, +) + +class Leftover(val appId: Int, val prefix: File?, val shaders: File?, val bytes: Long, val safe: Boolean) + +class ComponentUsage( + val comp: String, val version: String, val bytes: Long, val inUse: Boolean, + val packageFile: String? = null, val protonId: String? = null, val protonName: String? = null, +) + +class FlatpakUsage(val id: String, val name: String, val bytes: Long) + +class StorageReport( + val at: Long, + val total: Long, + val free: Long, + val buckets: Map<Bucket, Long>, + val prefixes: Long, + val shaders: Long, + val workshop: Long, + val flatpak: Long, + val games: List<GameUsage>, + val tools: List<ToolUsage>, + val leftovers: List<Leftover>, + val logs: List<File>, + val logBytes: Long, + val components: List<ComponentUsage>, + val flatpakApps: List<FlatpakUsage>, + val flatpakRuntimes: Long, + val otherPrefixes: Long, + val leftoversChecked: Boolean, +) { + val droiddeck: Long get() = buckets.values.sum() + val installedShaders: Long get() = games.sumOf { it.shaders } + val unusedTools: List<ToolUsage> get() = tools.filter { it.state == ToolState.UNUSED } + val gamesOnSd: Int get() = games.count { !it.internal } + val unusedComponents: List<ComponentUsage> get() = components.filter { !it.inUse } + val flatpakCache: Long get() = (flatpak - flatpakApps.sumOf { it.bytes } - flatpakRuntimes).coerceAtLeast(0) +} + +object StorageScan { + private class Walker { + private val seen = HashSet<Long>() + val known = HashMap<String, Long>() + + fun size(file: File): Long { + known[file.path]?.let { return it } + val st = try { Os.lstat(file.path) } catch (e: Exception) { return 0 } + if (st.st_nlink > 1 && !OsConstants.S_ISDIR(st.st_mode)) { + if (!seen.add(st.st_ino xor (st.st_dev shl 40))) return 0 + } + var total = st.st_blocks * 512 + if (OsConstants.S_ISDIR(st.st_mode)) file.list()?.forEach { total += size(File(file, it)) } + return total + } + + fun measure(file: File): Long = size(file).also { known[file.path] = it } + } + + // Proton tools' files live only in the arm64 client's root; the x86-64 client has wrappers of them. + fun steamRoot(context: Context) = SessionPrefs.steamRoot(context, "arm64") + + fun scan(context: Context): StorageReport { + val walker = Walker() + val files = context.filesDir + val rootfs = LinuxRuntime.rootDir(context) + val steamRoot = steamRoot(context) + val x64Root = SessionPrefs.steamRoot(context, "x86_64").takeIf { SteamStorage.x64ClientPresent(it) } + val clients = listOfNotNull("arm64", "x86_64".takeIf { x64Root != null }) + fun canonical(f: File) = runCatching { f.canonicalPath }.getOrDefault(f.path) + val art = clients.associate { arch -> + (arch == "x86_64") to runCatching { Library.steamGames(context, arch = arch) }.getOrDefault(emptyList()).associateBy { it.appId } + } + + class Lib(val root: File, val label: String, val internal: Boolean, val data: File, val listing: SteamStorage.Listing?, val x64: Boolean) { + val manifests: List<SteamStorage.Manifest>? get() = listing?.manifests + } + val libs = clients.flatMap { arch -> + val x64 = arch == "x86_64" + val primary = canonical(SessionPrefs.steamRoot(context, arch)) + Library.steamLibraries(context, arch).map { (root, label) -> + val internal = canonical(root) == primary + val data = if (internal) root else SecondaryLibrary.privateRoot(files, root) + // The x86-64 card folder and its steamapps appear only with that client's first session and library write. + val listing = SteamStorage.manifests(root) + ?: SteamStorage.Listing(emptyList(), emptySet(), true).takeIf { + x64 && (if (internal) !File(root, "steamapps").exists() else !root.exists() && root.parentFile?.isDirectory == true) + } + Lib(root, label, internal, data, listing, x64) + } + } + val everyLibraryRead = libs.all { it.listing?.complete == true } + val clientIds = libs.groupBy { it.x64 }.mapValues { (_, own) -> own.flatMap { it.listing?.ids.orEmpty() }.toSet() } + fun installedGames(x64: Boolean) = libs.filter { it.x64 == x64 }.flatMap { it.manifests.orEmpty() } + .filter { !SteamStorage.isTool(it) && it.installed }.map { it.appId.toString() }.toSet() + val armUse = runCatching { SteamStorage.compatMappings(File(steamRoot, "config/config.vdf").readText()) }.getOrNull() + ?.let { SteamStorage.ToolUse(it, installedGames(false)) } + // An x86-64 client without a config.vdf has never mapped a game to anything. + val x64Vdf = x64Root?.let { File(it, "config/config.vdf") } + val x64Use = if (x64Vdf == null || !x64Vdf.exists()) SteamStorage.ToolUse(emptyMap(), emptySet(), x64 = true) + else runCatching { SteamStorage.ToolUse(SteamStorage.compatMappings(x64Vdf.readText()), installedGames(true), x64 = true) }.getOrNull() + val mappingsRead = armUse != null && x64Use != null + val uses = listOfNotNull(armUse, x64Use) + fun gamesOn(tool: String) = uses.sumOf { it.games(tool) } + + val tools = LinkedHashMap<String, ToolUsage>() + val games = ArrayList<GameUsage>() + for (lib in libs) { + for (m in lib.manifests.orEmpty()) { + val dir = m.installDir + if (SteamStorage.isTool(m)) { + val dirs = listOfNotNull( + dir?.let { File(lib.root, "steamapps/common/$it") }, + dir?.let { File(lib.data, "steamapps/common/$it") }.takeIf { !lib.internal }, + ).filter { it.exists() } + val bytes = dirs.sumOf { walker.measure(it) } + val kind = SteamStorage.kind(m) + val (state, reason) = if (lib.x64) ToolState.REQUIRED to ToolReason.X64_CLIENT else when (kind) { + SteamStorage.Kind.OLD_RUNTIME -> ToolState.UNUSED to ToolReason.OLD_RUNTIME + SteamStorage.Kind.X86_PROTON -> ToolState.UNUSED to ToolReason.X86_PROTON + SteamStorage.Kind.ARM_PROTON -> ToolState.IN_USE to (if (m.appId == SteamStorage.PROTON_ARM) ToolReason.DEFAULT_PROTON else ToolReason.PROTON) + SteamStorage.Kind.REQUIRED -> ToolState.REQUIRED to when (m.appId) { + SteamStorage.SNIPER -> ToolReason.FEX_RUNTIME + SteamStorage.ARM_RUNTIME -> ToolReason.ARM_RUNTIME + SteamStorage.REDISTRIBUTABLES -> ToolReason.REDISTRIBUTABLES + SteamStorage.FEX -> ToolReason.FEX + else -> ToolReason.STEAM_TOOL + } + } + val count = when { + lib.x64 -> 0 + m.appId == SteamStorage.PROTON_ARM -> gamesOn(SteamStorage.ARM_TOOL) + m.appId == SteamStorage.PROTON_11_ARM -> gamesOn(SteamStorage.ARM_11_TOOL) + else -> 0 + } + val key = if (lib.x64) "x64:app:${m.appId}" else "app:${m.appId}" + val prior = tools[key] + tools[key] = ToolUsage( + key, m.name.ifEmpty { dir ?: m.appId.toString() }, bytes + (prior?.bytes ?: 0), state, reason, count, + false, (prior?.manifests.orEmpty()) + m.file, (prior?.dirs.orEmpty()) + dirs, + ) + continue + } + if (!m.installed) continue + val gameBytes = dir?.let { File(lib.root, "steamapps/common/$it") }?.takeIf { it.isDirectory }?.let { walker.measure(it) } ?: 0 + val prefix = File(lib.data, "steamapps/compatdata/${m.appId}").takeIf { it.isDirectory }?.let { walker.measure(it) } ?: 0 + val shaderDir = File(lib.data, "steamapps/shadercache/${m.appId}").takeIf { it.isDirectory } + val shaders = shaderDir?.let { walker.measure(it) } ?: 0 + val workshop = File(lib.root, "steamapps/workshop/content/${m.appId}").takeIf { it.isDirectory }?.let { walker.measure(it) } ?: 0 + val known = art[lib.x64]?.get(m.appId) + games.add(GameUsage( + m.appId, known?.name ?: m.name, known?.art, lib.label, lib.internal, m.lastPlayed, + gameBytes, prefix, shaders, workshop, shaderDir, lib.x64, + )) + } + } + + File(steamRoot, "compatibilitytools.d").listFiles()?.sortedBy { it.name }?.forEach { dir -> + if (!dir.isDirectory) return@forEach + val bytes = walker.measure(dir) + if (dir.name.startsWith(".") || dir.name.startsWith("droiddeck-") || dir.name.startsWith("bannerlator-") || + !File(dir, "toolmanifest.vdf").isFile) return@forEach + val name = runCatching { SteamStorage.compatToolName(File(dir, "compatibilitytool.vdf").readText()) }.getOrNull() ?: dir.name + val count = gamesOn(name) + val isDefault = uses.any { it.isDefault(name) } + tools["dir:${dir.name}"] = ToolUsage( + "dir:${dir.name}", dir.name, bytes, + when { + !mappingsRead -> ToolState.REQUIRED + count > 0 || isDefault -> ToolState.IN_USE + else -> ToolState.UNUSED + }, + if (!mappingsRead) ToolReason.CUSTOM_UNKNOWN else ToolReason.CUSTOM, count, isDefault, emptyList(), listOf(dir), + ) + } + + val leftovers = ArrayList<Leftover>() + for (lib in libs) { + if (!everyLibraryRead) break + val everyId = clientIds[lib.x64].orEmpty() + val prefixes = File(lib.data, "steamapps/compatdata").listFiles().orEmpty() + .mapNotNull { f -> SteamStorage.leftoverId(f.name)?.takeIf { it !in everyId && f.isDirectory }?.let { it to f } }.toMap() + val caches = File(lib.data, "steamapps/shadercache").listFiles().orEmpty() + .mapNotNull { f -> SteamStorage.leftoverId(f.name)?.takeIf { it !in everyId && f.isDirectory }?.let { it to f } }.toMap() + for (id in (prefixes.keys + caches.keys).sorted()) { + val prefix = prefixes[id] + val cache = caches[id] + val bytes = (prefix?.let { walker.measure(it) } ?: 0) + (cache?.let { walker.measure(it) } ?: 0) + val safe = prefix == null || SteamStorage.isStubPrefix(prefix) + leftovers.add(Leftover(id, prefix, cache, bytes, safe)) + } + } + + val logs = SessionPaths.sessionFolders(context).filter { it != SessionPaths.current() } + + listOf(File(LinuxRuntime.logDir(context), SessionPaths.TOOLS_DIR)).filter { it.exists() } + val logBytes = logs.sumOf { walker.measure(it) } + + val flatpakDir = File(rootfs, "root/.local/share/flatpak") + val flatpakNames = runCatching { FlatpakManager.installedApps(context) }.getOrDefault(emptyList()).associate { it.id to it.name } + val flatpakApps = File(flatpakDir, "app").listFiles().orEmpty().filter { it.isDirectory }.map { dir -> + FlatpakUsage(dir.name, flatpakNames[dir.name] ?: dir.name.substringAfterLast('.'), walker.measure(dir)) + }.sortedByDescending { it.bytes } + val flatpakRuntimes = File(flatpakDir, "runtime").takeIf { it.isDirectory }?.let { walker.measure(it) } ?: 0 + + val componentsDir = File(files, "components") + val stored = runCatching { ComponentsManager.stored(context) }.onFailure { Log.w("StorageScan", "components", it) }.getOrNull() + val components = stored?.let { st -> + st.packages.map { ComponentUsage(it.pkg.comp, it.pkg.version, it.pkg.size, it.inUse, packageFile = it.pkg.file) } + + st.originals.map { ComponentUsage(it.comp, it.protonVersion, it.size, it.kept, protonId = it.protonId, protonName = it.protonName) } + }.orEmpty() + + val otherPrefixes = libs.flatMap { lib -> + File(lib.data, "steamapps/compatdata").listFiles().orEmpty().filter { it.isDirectory && SteamStorage.leftoverId(it.name) == null } + }.sumOf { walker.measure(it) } + + val clientRoots = listOfNotNull(steamRoot, x64Root) + val apps = clientRoots.map { File(it, "steamapps") } + val privateRoots = File(files, "steam-libraries").listFiles().orEmpty().filter { it.isDirectory } + fun m(file: File): Long = if (file.exists()) walker.measure(file) else 0 + fun inApps(name: String): Long = apps.sumOf { m(File(it, name)) } + val toolDirs = tools.values.flatMap { it.dirs }.distinctBy { it.path } + val toolsInApps = toolDirs.filter { d -> apps.any { d.path.startsWith(it.path + "/") } }.sumOf { walker.known[it.path] ?: 0 } + val toolsPrivate = toolDirs.filter { d -> privateRoots.any { d.path.startsWith(it.path + "/") } }.sumOf { walker.known[it.path] ?: 0 } + val compatTools = clientRoots.sumOf { m(File(it, "compatibilitytools.d")) } + val installs = inApps("common") + inApps("downloading") + inApps("temp") + val privatePrefixes = privateRoots.sumOf { m(File(it, "steamapps/compatdata")) } + val privateShaders = privateRoots.sumOf { m(File(it, "steamapps/shadercache")) } + val prefixes = inApps("compatdata") + privatePrefixes + val shaders = inApps("shadercache") + privateShaders + val workshop = inApps("workshop") + val stores = m(File(rootfs, "root/Games")) + val flatpak = m(File(rootfs, "root/.local/share/flatpak")) + val rootfsBytes = m(rootfs) + val privateBytes = privateRoots.sumOf { m(it) } + val system = rootfsBytes - installs - inApps("compatdata") - inApps("shadercache") - workshop - + compatTools - stores - flatpak + val componentBytes = m(componentsDir) + val droiddeck = m(files) + m(context.cacheDir) - rootfsBytes - privateBytes - componentBytes + + (privateBytes - toolsPrivate - privatePrefixes - privateShaders) + val stat = StatFs(files.path) + return StorageReport( + System.currentTimeMillis(), stat.totalBytes, stat.availableBytes, + mapOf( + Bucket.GAMES to (installs - toolsInApps).coerceAtLeast(0), + Bucket.GAME_DATA to (prefixes + shaders + workshop), + Bucket.TOOLS to toolsInApps + toolsPrivate + compatTools, + Bucket.COMPONENTS to componentBytes, + Bucket.STORES to stores, + Bucket.DESKTOP to flatpak, + Bucket.SYSTEM to system.coerceAtLeast(0), + Bucket.DROIDDECK to droiddeck.coerceAtLeast(0), + ), + prefixes, shaders, workshop, flatpak, + games.sortedByDescending { it.total }, tools.values.toList(), leftovers, logs, logBytes, + components, flatpakApps, flatpakRuntimes, otherPrefixes, everyLibraryRead, + ) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/storage/StorageState.kt b/app/src/main/java/com/droiddeck/launcher/storage/StorageState.kt new file mode 100644 index 0000000000..0724dd8dd2 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/storage/StorageState.kt @@ -0,0 +1,221 @@ +package com.droiddeck.launcher.storage + +import android.content.Context +import android.os.Handler +import android.os.Looper +import android.os.StatFs +import android.util.Log +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue +import com.droiddeck.launcher.files.FileOps +import com.droiddeck.launcher.runtime.FlatpakManager +import com.droiddeck.launcher.session.ComponentsManager +import com.droiddeck.launcher.session.SessionState + +enum class CleanItem { OLD_TOOLS, LEFTOVERS, LEFTOVERS_UNSURE, LOGS, UNUSED_CUSTOM, UNUSED_COMPONENTS, SHADERS } + +object StorageState { + private const val TAG = "StorageState" + const val LOW_SPACE_BYTES = 10L * 1024 * 1024 * 1024 + private const val FRESH_MS = 5L * 60 * 1000 + + var report by mutableStateOf<StorageReport?>(null) + private set + var scanning by mutableStateOf(false) + private set + var cleaning by mutableStateOf(false) + private set + var lastFreed by mutableStateOf<Long?>(null) + var progress by mutableStateOf<String?>(null) + private set + var lastError by mutableStateOf<String?>(null) + + var openRequests by mutableIntStateOf(0) + private set + var openPending = false + + @Volatile var lowSpaceDismissed = false + + private val main = Handler(Looper.getMainLooper()) + @Volatile private var appContext: Context? = null + + fun requestOpen() { + openPending = true + openRequests++ + } + + fun refresh(context: Context, force: Boolean = false) { + val current = report + if (scanning || cleaning) return + if (!force && current != null && System.currentTimeMillis() - current.at < FRESH_MS) return + val app = context.applicationContext + scanning = true + Thread({ + val result = runCatching { StorageScan.scan(app) } + .onFailure { Log.w(TAG, "storage scan failed", it) }.getOrNull() + main.post { + if (result != null) report = result + scanning = false + } + }, "storage-scan").start() + } + + fun freeBytes(context: Context): Long = runCatching { StatFs(context.filesDir.path).availableBytes }.getOrDefault(Long.MAX_VALUE) + + fun lowOnSpace(context: Context): Boolean = freeBytes(context) < LOW_SPACE_BYTES + + fun bytes(report: StorageReport, item: CleanItem): Long = when (item) { + CleanItem.OLD_TOOLS -> report.unusedTools.filter { it.reason != ToolReason.CUSTOM }.sumOf { it.bytes } + CleanItem.LEFTOVERS -> report.leftovers.filter { it.safe }.sumOf { it.bytes } + CleanItem.LEFTOVERS_UNSURE -> report.leftovers.filter { !it.safe }.sumOf { it.bytes } + CleanItem.LOGS -> report.logBytes + CleanItem.UNUSED_CUSTOM -> report.unusedTools.filter { it.reason == ToolReason.CUSTOM }.sumOf { it.bytes } + CleanItem.UNUSED_COMPONENTS -> report.unusedComponents.sumOf { it.bytes } + CleanItem.SHADERS -> report.installedShaders + } + + val SAFE = setOf(CleanItem.OLD_TOOLS, CleanItem.LEFTOVERS, CleanItem.LOGS) + + fun safeBytes(report: StorageReport): Long = SAFE.sumOf { bytes(report, it) } + + fun clean(context: Context, items: Set<CleanItem>, onDone: (Long?) -> Unit) { + if (cleaning || SessionState.running) { onDone(null); return } + val app = context.applicationContext + appContext = app + cleaning = true + Thread({ + val before = freeBytes(app) + val fresh = runCatching { StorageScan.scan(app) }.onFailure { Log.w(TAG, "storage scan before cleanup failed", it) }.getOrNull() + if (fresh != null && !SessionState.running) { + for (item in items) runCatching { cleanItem(fresh, item) }.onFailure { Log.w(TAG, "could not clean $item", it) } + } + val freed = if (fresh == null) null else (freeBytes(app) - before).coerceAtLeast(0) + Log.i(TAG, "cleaned ${items.joinToString()} and freed $freed bytes") + finish(app, freed, onDone) + }, "storage-clean").start() + } + + fun removeTool(context: Context, tool: ToolUsage, onDone: (Long?) -> Unit) { + if (tool.state != ToolState.UNUSED || cleaning || SessionState.running) { onDone(null); return } + val app = context.applicationContext + cleaning = true + Thread({ + val before = freeBytes(app) + val current = runCatching { StorageScan.scan(app) }.getOrNull()?.tools?.firstOrNull { it.key == tool.key } + val freed = if (current?.state == ToolState.UNUSED && !SessionState.running) { + runCatching { deleteTool(current) }.onFailure { Log.w(TAG, "could not remove ${tool.key}", it) } + (freeBytes(app) - before).coerceAtLeast(0) + } else { + Log.w(TAG, "kept ${tool.key}: it is in use now or could not be checked") + null + } + finish(app, freed, onDone) + }, "storage-remove-tool").start() + } + + // Every action works from a fresh scan so nothing is deleted on the strength of an older one. + private fun act(context: Context, name: String, action: (Context, StorageReport) -> Boolean, onDone: (Long?) -> Unit = {}) { + if (cleaning || SessionState.running) { onDone(null); return } + val app = context.applicationContext + appContext = app + cleaning = true + lastError = null + Thread({ + val before = freeBytes(app) + val fresh = runCatching { StorageScan.scan(app) }.getOrNull() + val done = fresh != null && !SessionState.running && + runCatching { action(app, fresh) }.onFailure { Log.w(TAG, "$name failed", it); main.post { lastError = it.message } }.getOrDefault(false) + val freed = if (done) (freeBytes(app) - before).coerceAtLeast(0) else null + Log.i(TAG, "$name: freed $freed bytes") + main.post { progress = null } + finish(app, freed, onDone) + }, "storage-$name").start() + } + + // A game can be installed in both Steam clients, and an id can be left over in several libraries. + fun clearShaders(context: Context, appId: Int, x64: Boolean = false) = act(context, "shaders-$appId", { _, fresh -> + val dir = fresh.games.firstOrNull { it.appId == appId && it.x64 == x64 }?.shaderDir ?: return@act false + FileOps.delete(dir) + }) + + fun removeLeftover(context: Context, l: Leftover) = act(context, "leftover-${l.appId}", { _, fresh -> + val leftover = fresh.leftovers.firstOrNull { it.appId == l.appId && it.prefix?.path == l.prefix?.path && it.shaders?.path == l.shaders?.path } + ?: return@act false + deleteLeftover(leftover) + true + }) + + fun removeComponent(context: Context, usage: ComponentUsage) = act(context, "component", { app, fresh -> + val current = fresh.components.firstOrNull { it.packageFile == usage.packageFile && it.protonId == usage.protonId && + it.comp == usage.comp && it.version == usage.version } ?: return@act false + !current.inUse && deleteComponent(app, current) + }) + + fun uninstallFlatpak(context: Context, id: String) = act(context, "flatpak-$id", { app, fresh -> + if (fresh.flatpakApps.none { it.id == id }) return@act false + val error = FlatpakManager.uninstall(app, id) { step, _ -> main.post { progress = step } } + if (error != null) main.post { lastError = error } + error == null + }) + + fun pruneFlatpak(context: Context) = act(context, "flatpak-prune", { app, _ -> + val error = FlatpakManager.prune(app) { step, _ -> main.post { progress = step } } + if (error != null) main.post { lastError = error } + error == null + }) + + private fun deleteComponent(app: Context, usage: ComponentUsage): Boolean { + if (usage.inUse) return false + usage.packageFile?.let { file -> + return runCatching { ComponentsManager.deletePackage(app, file) }.onFailure { Log.w(TAG, "kept $file", it) }.isSuccess + } + val proton = usage.protonId ?: return false + return ComponentsManager.deleteUnusedOriginal(app, proton, usage.comp, usage.version) + } + + private fun finish(app: Context, freed: Long?, onDone: (Long?) -> Unit) { + val rescanned = runCatching { StorageScan.scan(app) }.getOrNull() + main.post { + if (rescanned != null) report = rescanned + cleaning = false + lastFreed = freed + onDone(freed) + } + } + + private fun cleanItem(report: StorageReport, item: CleanItem) { + when (item) { + CleanItem.OLD_TOOLS -> report.unusedTools.filter { it.reason != ToolReason.CUSTOM }.forEach(::deleteTool) + CleanItem.UNUSED_CUSTOM -> report.unusedTools.filter { it.reason == ToolReason.CUSTOM }.forEach(::deleteTool) + CleanItem.UNUSED_COMPONENTS -> report.unusedComponents.forEach { deleteComponent(appContext!!, it) } + CleanItem.LEFTOVERS -> report.leftovers.filter { it.safe }.forEach(::deleteLeftover) + CleanItem.LEFTOVERS_UNSURE -> report.leftovers.filter { !it.safe }.forEach(::deleteLeftover) + CleanItem.LOGS -> report.logs.forEach { FileOps.delete(it) } + CleanItem.SHADERS -> report.games.mapNotNull { it.shaderDir }.forEach { FileOps.delete(it) } + } + } + + // Steam treats an app as installed while its manifest exists, so the manifest goes first. + private fun deleteTool(tool: ToolUsage) { + tool.manifests.forEach { check(!it.exists() || it.delete()) { "cannot delete $it" } } + tool.dirs.forEach { FileOps.delete(it) } + } + + private fun deleteLeftover(leftover: Leftover) { + leftover.prefix?.let { FileOps.delete(it) } + leftover.shaders?.let { FileOps.delete(it) } + } + + fun format(bytes: Long): String { + val gb = bytes / (1024.0 * 1024 * 1024) + return when { + gb >= 100 -> String.format(java.util.Locale.US, "%.0f GB", gb) + gb >= 10 -> String.format(java.util.Locale.US, "%.1f GB", gb) + gb >= 0.995 -> String.format(java.util.Locale.US, "%.2f GB", gb) + bytes >= 1024L * 1024 -> String.format(java.util.Locale.US, "%.0f MB", bytes / (1024.0 * 1024)) + else -> "0 MB" + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/store/FlathubApi.kt b/app/src/main/java/com/droiddeck/launcher/store/FlathubApi.kt index a26c4d4a45..b95a4c10e5 100644 --- a/app/src/main/java/com/droiddeck/launcher/store/FlathubApi.kt +++ b/app/src/main/java/com/droiddeck/launcher/store/FlathubApi.kt @@ -9,10 +9,6 @@ import java.net.HttpURLConnection import java.net.URL import java.net.URLEncoder -/** - * Flathub's public API (flathub.org/api/v2): the collections its front page shows, search, and an - * app's AppStream data. Only what this device can install is kept - apps built for aarch64. - */ object FlathubApi { private const val TAG = "FlathubApi" private const val BASE = "https://flathub.org/api/v2" @@ -33,7 +29,6 @@ object FlathubApi { val runtime: String?, val downloadSize: Long, val installedSize: Long, val arches: List<String>, ) - /** A category as Flathub's search filters it, with the name shown for it. */ class Category(val id: String, @StringRes val label: Int) val categories = listOf( @@ -43,14 +38,11 @@ object FlathubApi { Category("Utility", R.string.store_cat_utilities), ) - /** Front-page collections: popular, trending, recently-updated, recently-added. */ fun collection(name: String, count: Int = 30): List<AppSummary>? { - // The collections are not filtered by architecture; ask for more and keep what fits. val body = get("$BASE/collection/$name?page=1&per_page=${count * 2}") ?: return null return hits(body)?.take(count) } - /** Search, optionally within one category (Flathub's main_categories facet). */ fun search(query: String, category: String? = null, count: Int = 48): List<AppSummary>? { val filters = JSONArray().put(JSONObject().put("filterType", "arches").put("value", ARCH)) if (category != null) filters.put(JSONObject().put("filterType", "main_categories").put("value", category)) @@ -60,7 +52,6 @@ object FlathubApi { return hits(body) } - /** Flathub's own copy of an app's icon: for apps that export only an SVG, which is not drawn here. */ fun iconUrl(id: String) = "https://dl.flathub.org/media/icons/128x128/$id.png" fun details(id: String): AppDetails? { @@ -120,7 +111,6 @@ object FlathubApi { Log.w(TAG, "hits: $e"); null } - /** AppStream descriptions are a small HTML subset: paragraphs and lists become lines. */ internal fun plainText(html: String): String = html .replace(Regex("(?i)<li>\\s*"), "• ") .replace(Regex("(?i)</(p|li|ul|ol)>"), "\n") diff --git a/app/src/main/java/com/droiddeck/launcher/store/StoreState.kt b/app/src/main/java/com/droiddeck/launcher/store/StoreState.kt index cd47019d85..c03a98246b 100644 --- a/app/src/main/java/com/droiddeck/launcher/store/StoreState.kt +++ b/app/src/main/java/com/droiddeck/launcher/store/StoreState.kt @@ -11,10 +11,6 @@ import androidx.compose.runtime.setValue import com.droiddeck.launcher.R import com.droiddeck.launcher.runtime.FlatpakManager -/** - * The store's state for the life of the process, so an install carries on - and its progress - * shows - while the user moves around the launcher or plays something meanwhile. - */ object StoreState { private val main = Handler(Looper.getMainLooper()) @@ -26,10 +22,8 @@ object StoreState { private set var checkingUpdates by mutableStateOf(false) private set - /** Flathub has been asked this session, so an empty [updates] means up to date. */ var updatesChecked by mutableStateOf(false) private set - /** What is running: "setup", an app id, or "update-all"; null when idle. */ var busy by mutableStateOf<String?>(null) private set var stage by mutableStateOf<String?>(null) @@ -37,7 +31,6 @@ object StoreState { var percent by mutableStateOf(-1) private set - /** The front page's sections, by collection name; absent until loaded, empty list on failure. */ val sections = mutableStateMapOf<String, List<FlathubApi.AppSummary>>() var sectionsFailed by mutableStateOf(false) private set @@ -49,7 +42,6 @@ object StoreState { var searching by mutableStateOf(false) private set - /** An app whose Flathub page was asked for from outside the store (its card on Desktop), once. */ var openRequest by mutableStateOf<String?>(null) private var searchSeq = 0 diff --git a/app/src/main/java/com/droiddeck/launcher/store/UserAppsState.kt b/app/src/main/java/com/droiddeck/launcher/store/UserAppsState.kt index 340eabfbfd..9979b0e5d2 100644 --- a/app/src/main/java/com/droiddeck/launcher/store/UserAppsState.kt +++ b/app/src/main/java/com/droiddeck/launcher/store/UserAppsState.kt @@ -10,31 +10,23 @@ import androidx.compose.runtime.setValue import com.droiddeck.launcher.R import com.droiddeck.launcher.runtime.UserApps -/** - * The Desktop page's added apps and the one add or remove in progress. State changes only on the - * main thread; the work runs on a thread of its own and posts back. - */ object UserAppsState { private val main = Handler(Looper.getMainLooper()) var items by mutableStateOf<List<UserApps.App>>(emptyList()) private set - /** What is being added or removed; null when idle. */ var working by mutableStateOf<String?>(null) private set var stage by mutableStateOf<String?>(null) private set var percent by mutableStateOf(-1) private set - /** Why the last add or remove failed, shown on the page until the next one. */ var lastError by mutableStateOf<String?>(null) private set - /** The app whose updates are being looked up, and what each lookup found, by app key. */ var checking by mutableStateOf<String?>(null) private set var updates by mutableStateOf<Map<String, UserApps.UpdateCheck>>(emptyMap()) private set - /** Bumped per listing; only the newest one is shown. */ private var listing = 0 fun refresh(context: Context) { diff --git a/app/src/main/java/com/droiddeck/launcher/stores/AchievementNotifications.kt b/app/src/main/java/com/droiddeck/launcher/stores/AchievementNotifications.kt new file mode 100644 index 0000000000..e6bfc35f69 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/AchievementNotifications.kt @@ -0,0 +1,48 @@ +package com.droiddeck.launcher.stores + +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue +import org.json.JSONObject + +object AchievementNotifications { + data class Unlock(val client: String, val id: String, val name: String, val description: String, val icon: String?, val game: String) + + private var session: String? = null + private val seen = HashSet<String>() + var pending by mutableStateOf<List<Unlock>>(emptyList()) + private set + + fun begin(owner: String?) = StoresState.post { + session = owner + seen.clear() + pending = emptyList() + } + + fun end(owner: String?) = StoresState.post { + if (session == owner) { + session = null + seen.clear() + pending = emptyList() + } + } + + fun unlock(owner: String, unlock: Unlock) = StoresState.post { + if (session == owner && seen.add("${unlock.client}:${unlock.id}")) { + pending = (pending + unlock).take(16) + } + } + + fun dismiss(unlock: Unlock) { + if (pending.firstOrNull() === unlock) pending = pending.drop(1) + } + + fun parse(event: JSONObject, game: String): Unlock? { + val client = event.optString("client_id") + val id = event.optString("id") + val name = event.optString("name").trim() + if (!client.matches(Regex("[0-9]{1,32}")) || id.isBlank() || id.length > 256 || name.isEmpty()) return null + val icon = event.optString("icon").takeIf { it.length <= 2048 && it.startsWith("https://") } + return Unlock(client, id, name.take(256), event.optString("description").take(1024), icon, game.take(256)) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/CloudPlan.kt b/app/src/main/java/com/droiddeck/launcher/stores/CloudPlan.kt index 720b462d69..6368f558ad 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/CloudPlan.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/CloudPlan.kt @@ -2,21 +2,7 @@ package com.droiddeck.launcher.stores import org.json.JSONObject -/** - * What a cloud sync may do, decided from three views of each save file: the local copy, the cloud - * copy, and the baseline - both as they were when this device last synced the game. Pure, so the - * rules are tested on their own: - * - * - No upload before a download has completed once on this device (no baseline): a first launch - * writes new profile files that must never replace the real saves in the cloud. - * - The first download (no baseline) lets the cloud win where the two differ - the local folder is - * backed up first. - * - A file changed on both sides since the baseline is a conflict: neither side is overwritten; the - * user picks Keep cloud or Keep local in Manage saves. - * - Otherwise the side that changed since the baseline wins; one that changed on neither is left. - */ object CloudPlan { - /** One file as this device last saw it in sync: the local MD5, and the cloud's MD5 (when known) and time. */ data class Entry(val localMd5: String, val cloudMd5: String?, val cloudModified: Long) class Local(val md5: String) @@ -24,11 +10,9 @@ object CloudPlan { class Plan(val transfer: List<String>, val conflicts: List<String>, val same: List<String>, val refused: String? = null) - /** The cloud copy differs from what the baseline recorded of it. */ private fun cloudChanged(r: Remote, b: Entry?): Boolean { if (b == null) return true if (r.md5 != null && b.cloudMd5 != null) return !r.md5.equals(b.cloudMd5, ignoreCase = true) - // Times only (Epic's listing): the service's own clock, so a couple of seconds of slack. return r.modified > 0 && b.cloudModified > 0 && kotlin.math.abs(r.modified - b.cloudModified) > 2000 } @@ -36,7 +20,6 @@ object CloudPlan { private fun same(l: Local, r: Remote): Boolean = r.md5 != null && r.md5.equals(l.md5, ignoreCase = true) - /** Cloud → device. [baseline] null = this device never synced the game. */ fun down(local: Map<String, Local>, remote: Map<String, Remote>, baseline: Map<String, Entry>?): Plan { val transfer = ArrayList<String>(); val conflicts = ArrayList<String>(); val same = ArrayList<String>() for ((name, r) in remote) { @@ -53,7 +36,6 @@ object CloudPlan { return Plan(transfer, conflicts, same) } - /** Device → cloud. Refused outright without a baseline. */ fun up(local: Map<String, Local>, remote: Map<String, Remote>, baseline: Map<String, Entry>?): Plan { if (baseline == null) return Plan(emptyList(), emptyList(), emptyList(), refused = "no-baseline") val transfer = ArrayList<String>(); val conflicts = ArrayList<String>(); val same = ArrayList<String>() diff --git a/app/src/main/java/com/droiddeck/launcher/stores/CloudSavePaths.kt b/app/src/main/java/com/droiddeck/launcher/stores/CloudSavePaths.kt index c54297794d..194448f0c8 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/CloudSavePaths.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/CloudSavePaths.kt @@ -1,28 +1,10 @@ -/* - * Cloud-save folder resolution for GOG and Epic games, after Bannerlator's GogCloudSavePaths and - * EpicCloudSavePaths (device-proven there, August 2026): a store's save-location template expanded - * against the game's Proton prefix and its install folder. - */ package com.droiddeck.launcher.stores import java.io.File -/** - * Where a store keeps a game's saves on Windows, made concrete inside this game's Proton prefix. - * - * GOG gives a template per game in its public remote-config (`cloudStorage.locations[].location`): - * a leading `<?TOKEN?>` (or `%TOKEN%`) and a path, e.g. ELDERBORN's - * `<?APPLICATION_DATA_LOCAL_LOW?>/Hyperstrange/ELDERBORN`. Epic gives `CloudSaveFolder` in the - * game's catalog attributes: a leading `{Token}`, with `{EpicId}` / `{AppName}` inside, e.g. - * `{AppData}/Game/Saved/SaveGames`. Profile tokens map under the prefix's Wine user - * (`drive_c/users/steamuser`), the install tokens to the game's folder. The path is walked against - * what is on disk case-insensitively; a result outside its boundary is refused, never guessed. - */ object CloudSavePaths { - /** The Wine user every prefix has (Proton's). */ fun profile(prefix: File): File = File(prefix, "drive_c/users/steamuser") - /** Expands a GOG location template; null for an unknown token or an escape. */ fun gog(template: String, prefix: File, install: File): File? { val norm = template.replace('\\', '/').trim().trimStart('/') val match = Regex("^(<\\?[^?>]+\\?>|%[^%]+%)").find(norm) ?: return null @@ -42,30 +24,20 @@ object CloudSavePaths { return walk(base, boundary, norm.substring(match.value.length), fuzzy = false) } - /** Expands an Epic CloudSaveFolder; null for an unknown token or an escape. */ fun epic(template: String, prefix: File, install: File, accountId: String, appName: String): File? { - val norm = template.replace('\\', '/').trim().trimStart('/') - val match = Regex("^\\{([^}]+)\\}").find(norm) ?: return null + val parsed = com.droiddeck.launcher.stores.epic.EpicSaveTemplate.parse(template, accountId, appName) ?: return null val profile = profile(prefix) - val (base, boundary) = when (match.groupValues[1].lowercase()) { - "installdir" -> install to install - "userprofile" -> profile to profile - "userdir" -> File(profile, "Documents") to profile - "usersavedgames" -> File(profile, "Saved Games") to profile - "appdata", "localappdata" -> File(profile, "AppData/Local") to profile - "roamingappdata" -> File(profile, "AppData/Roaming") to profile - else -> return null + val (base, boundary) = when (parsed.root) { + com.droiddeck.launcher.stores.epic.EpicSaveTemplate.Root.INSTALL_DIR -> install to install + com.droiddeck.launcher.stores.epic.EpicSaveTemplate.Root.USER_PROFILE -> profile to profile + com.droiddeck.launcher.stores.epic.EpicSaveTemplate.Root.DOCUMENTS -> File(profile, "Documents") to profile + com.droiddeck.launcher.stores.epic.EpicSaveTemplate.Root.SAVED_GAMES -> File(profile, "Saved Games") to profile + com.droiddeck.launcher.stores.epic.EpicSaveTemplate.Root.LOCAL_APPDATA -> File(profile, "AppData/Local") to profile + com.droiddeck.launcher.stores.epic.EpicSaveTemplate.Root.ROAMING_APPDATA -> File(profile, "AppData/Roaming") to profile } - val rest = norm.substring(match.value.length) - .replace("{epicid}", accountId, ignoreCase = true) - .replace("{appname}", appName, ignoreCase = true) - return walk(base, boundary, rest, fuzzy = true) + return walk(base, boundary, parsed.rest, fuzzy = true) } - /** - * Each segment matched against the folder's entries case-insensitively (and, for Epic, by letters - * and digits alone when that names exactly one), else taken as written - a download creates it. - */ private fun walk(base: File, boundary: File, rest: String, fuzzy: Boolean): File? { var dir = base for (seg in rest.trimStart('/').split('/').filter { it.isNotEmpty() && it != "." }) { diff --git a/app/src/main/java/com/droiddeck/launcher/stores/CloudSaves.kt b/app/src/main/java/com/droiddeck/launcher/stores/CloudSaves.kt index 3d877784fd..3c3d38d262 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/CloudSaves.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/CloudSaves.kt @@ -17,34 +17,16 @@ import java.util.concurrent.Executors import java.util.concurrent.TimeUnit import org.json.JSONObject -/** - * GOG and Epic cloud saves for an installed store game: before a launch the cloud copy is brought - * down where it is newer, after the game exits what changed goes up - newest wins, file by file. - * Before a download overwrites anything, the folder is copied to the app's storage (the last - * [BACKUPS] per game). Both launch paths reach it: the compat tool's request from - * droiddeck-store-launch ([StoreLaunchRequests]) for every launch, and the Games tab's Manage saves. - * - * The save folder: GOG's remote-config location template (by the game's Galaxy client id) or - * Epic's CloudSaveFolder catalog attribute, cached per game, made concrete by [CloudSavePaths] - * inside the game's Proton prefix. A game whose store gives none has no cloud saves. - */ object CloudSaves { private const val TAG = "CloudSaves" private const val BACKUPS = 3 private const val PARALLEL = 6 - /** What a sync did, for the log and the Manage saves row. */ - /** - * What a sync did, for the log and the Manage saves row. [result]: ok, skipped (nothing to do or - * not possible: [reason] says why), deferred (no prefix yet; it runs once Proton makes one), - * failed. [conflicts]: files changed on both sides, left alone. - */ class Result(val result: String, val files: Int, val bytes: Long, val reason: String, val conflicts: Int = 0) { val ok: Boolean get() = result != "failed" val line: String get() = "result=$result files=$files bytes=$bytes reason=$reason" + if (conflicts > 0) " conflicts=$conflicts" else "" } - /** A game's cloud state for the Manage saves row. */ class Status(val supported: Boolean, val folder: File?, val lastSync: Long, val reason: String, val conflicts: List<String> = emptyList()) private fun game(context: Context, store: Store, id: String): Pair<File, StoreGameSidecar>? = @@ -52,7 +34,6 @@ object CloudSaves { StoreGameSidecar.read(f)?.takeIf { it.store == store && it.id == id && it.isInstalled }?.let { f to it } } - /** The game's prefix: compatdata/<its shortcut appid>/pfx, wherever that library is. */ fun prefix(context: Context, folder: File): File? { val appId = AddedGames.scan(context).firstOrNull { it.folder.absolutePath == folder.absolutePath }?.appId ?: return null return Library.protonPrefix(context, appId and 0xFFFFFFFFL) @@ -64,9 +45,7 @@ object CloudSaves { private fun markSynced(context: Context, store: Store, id: String) = prefs(context, store).edit().putLong("cloud_sync_$id", System.currentTimeMillis()).apply() - // ---- the save folder ------------------------------------------------------------------------ - /** The store's template for this game: cached, else fetched; "" when the store gives none, null when it could not be asked. */ fun template(context: Context, store: Store, id: String, folder: File, sidecar: StoreGameSidecar): String? { val p = prefs(context, store) if (p.contains("cloud_template_$id")) return p.getString("cloud_template_$id", "") @@ -89,7 +68,6 @@ object CloudSaves { GogPrefs.get(context).getString("client_id_$id", null)?.ifEmpty { null } ?: runCatching { JSONObject(File(folder, "goggame-$id.info").readText()).optString("clientId").ifEmpty { null } }.getOrNull() - /** GOG's public remote-config: `content.Windows.cloudStorage.locations`, the one named "saves" first. */ private fun gogTemplate(context: Context, id: String, folder: File): String? { val clientId = gogClientId(context, id, folder) ?: return "" return try { @@ -109,7 +87,6 @@ object CloudSaves { } } - /** The concrete save folder in the prefix, or null with why. */ private fun saveFolder(context: Context, store: Store, id: String): Pair<File?, String> { val (folder, sidecar) = game(context, store, id) ?: return null to "not-installed" val template = template(context, store, id, folder, sidecar) ?: return null to "store-unreachable" @@ -128,7 +105,6 @@ object CloudSaves { return Status(reason != "no-cloud-saves" && reason != "not-installed", dir, lastSync(context, store, id), reason, conflicts(context, store, id)) } - // ---- transport ------------------------------------------------------------------------------ private fun transport(context: Context, store: Store, id: String, folder: File): CloudTransport? = when (store) { Store.GOG -> { @@ -137,7 +113,7 @@ object CloudSaves { val galaxy = GogAuth.validToken(context) val clientId = gogClientId(context, id, folder) if (userId.isEmpty() || galaxy == null || clientId == null) null - else GogCloud(userId, clientId, gogScopedToken(context, id, clientId, account?.optString("refresh_token").orEmpty()) ?: galaxy) + else GogCloud(userId, clientId, gogScopedToken(context, id, clientId) ?: galaxy) } Store.EPIC -> { val token = EpicCredentialStore.getValidAccessToken(context) @@ -147,21 +123,11 @@ object CloudSaves { Store.AMAZON -> null } - /** GOG cloud storage wants a token issued to the game's own client: the Galaxy refresh token, exchanged with the game's id and secret. */ - private fun gogScopedToken(context: Context, id: String, clientId: String, refresh: String): String? { + private fun gogScopedToken(context: Context, id: String, clientId: String): String? { val secret = GogPrefs.get(context).getString("client_secret_$id", null)?.ifEmpty { null } ?: return null - if (refresh.isEmpty()) return null - return try { - val enc = { s: String -> java.net.URLEncoder.encode(s, "UTF-8") } - val c = URL("https://auth.gog.com/token?client_id=${enc(clientId)}&client_secret=${enc(secret)}&grant_type=refresh_token&refresh_token=${enc(refresh)}").openConnection() as HttpURLConnection - c.connectTimeout = 15_000; c.readTimeout = 15_000 - c.setRequestProperty("User-Agent", "GOG Galaxy") - if (c.responseCode != 200) { c.disconnect(); return null } - JSONObject(c.inputStream.bufferedReader().readText()).optString("access_token").ifEmpty { null }.also { c.disconnect() } - } catch (e: Exception) { null } + return GogAuth.gameToken(context, clientId, secret)?.accessToken } - // ---- sync ----------------------------------------------------------------------------------- private fun baseline(context: Context, store: Store, id: String): Map<String, CloudPlan.Entry>? = CloudPlan.fromJson(prefs(context, store).getString("cloud_baseline_$id", null)) @@ -169,29 +135,21 @@ object CloudSaves { private fun saveBaseline(context: Context, store: Store, id: String, b: Map<String, CloudPlan.Entry>) = prefs(context, store).edit().putString("cloud_baseline_$id", CloudPlan.toJson(b)).apply() - /** Files changed on both sides since the last sync, waiting for Keep cloud / Keep local. */ fun conflicts(context: Context, store: Store, id: String): List<String> = prefs(context, store).getString("cloud_conflicts_$id", "").orEmpty().split('\n').filter { it.isNotEmpty() } private fun saveConflicts(context: Context, store: Store, id: String, names: Collection<String>) = prefs(context, store).edit().putString("cloud_conflicts_$id", names.joinToString("\n")).apply() - /** Cloud → device where the cloud copy changed (the first time: wherever it differs). [force]: conflicts too (Keep cloud). Blocking. */ fun download(context: Context, store: Store, id: String, force: Boolean = false): Result = sync(context, store, id, "down") { dir, cloud -> downWith(context, store, id, dir, cloud, force) } - /** Device → cloud where the local copy changed, once a download has set the baseline. [force]: conflicts too (Keep local). Blocking. */ fun upload(context: Context, store: Store, id: String, force: Boolean = false): Result = sync(context, store, id, "up") { dir, cloud -> upWith(context, store, id, dir, cloud, force) } fun keepCloud(context: Context, store: Store, id: String): Result = download(context, store, id, force = true) fun keepLocal(context: Context, store: Store, id: String): Result = upload(context, store, id, force = true) - /** - * The pre-launch download, or - when Proton has not made the game's prefix yet (a first launch) - * - a deferred one: answered at once, then run in the background as soon as the prefix's user - * folder appears (within [PREFIX_WAIT_MS]), so the launch is not held up for it. - */ fun downloadOrDefer(context: Context, store: Store, id: String): Result { val app = context.applicationContext val g = game(app, store, id) ?: return done(store, id, "down", Result("skipped", 0, 0, "not-installed")) @@ -249,7 +207,6 @@ object CloudSaves { internal fun md5(data: ByteArray): String = MessageDigest.getInstance("MD5").digest(data).joinToString("") { "%02x".format(it) } - /** The cloud listing, with MD5 and time filled in (one HEAD each where the listing lacks them, in parallel). */ private fun remote(cloud: CloudTransport, wanted: (String) -> Boolean): Map<String, CloudFile> { val files = cloud.list() val pool = Executors.newFixedThreadPool(PARALLEL, com.droiddeck.launcher.stores.download.DownloadQueue.workerFactory("cloud")) @@ -280,7 +237,6 @@ object CloudSaves { next[name] = CloudPlan.Entry(md5(data), f.md5, if (modified > 0) modified else f.modifiedMs) } for (name in plan.same) remote[name]?.let { r -> next[name] = CloudPlan.Entry(local.getValue(name).md5, r.md5, r.modifiedMs) } - // A download that completed sets the baseline even when the cloud was empty: uploads may follow. saveBaseline(context, store, id, next) val left = if (force) emptyList() else plan.conflicts saveConflicts(context, store, id, left) @@ -298,7 +254,6 @@ object CloudSaves { val next = HashMap(base) for (name in plan.same) remote[name]?.let { r -> next[name] = CloudPlan.Entry(local.getValue(name).md5, r.md5, r.modifiedMs) } if (send.isNotEmpty()) { - // The cloud copies about to be replaced are kept first, as a download keeps the local ones. backupCloud(context, store, id, cloud, send.mapNotNull { remote[it] }) val data = send.associateWith { files.getValue(it).readBytes() } val stamped = cloud.put(data) @@ -315,15 +270,7 @@ object CloudSaves { return Result("ok", send.size, send.sumOf { files.getValue(it).length() }, if (send.isEmpty()) "up-to-date" else "uploaded", left.size) } - // ---- uploads that do not depend on one hook --------------------------------------------------- - /** - * A game launched with cloud saves is marked dirty in the app's storage when its pre-launch step - * runs. The upload happens on the first of: the compat tool's exit request (`exit`), the end of - * the session (`session-end`), or the app's next start for a mark a killed app left (`recovery`) - * - so a session closed from the drawer, a game Steam killed, or a crash still uploads. The mark - * goes only after an upload that went through, or one skipped on purpose with its reason logged. - */ private fun marks(context: Context) = context.applicationContext.getSharedPreferences("stores.cloud", Context.MODE_PRIVATE) fun markDirty(context: Context, store: Store, id: String) { @@ -337,10 +284,8 @@ object CloudSaves { private val markLock = Any() - /** Why a skip is final: retrying cannot change it, so the mark goes. */ private val FINAL_SKIPS = setOf("off", "no-cloud-saves", "no-baseline", "not-installed", "nothing-local") - /** Uploads [id] if it is marked dirty; null when it is not (another trigger got there first). */ fun uploadDirty(context: Context, store: Store, id: String, trigger: String): Result? = synchronized(markLock) { val key = "dirty:${store.id}:$id" if (!marks(context).contains(key)) return null @@ -349,10 +294,6 @@ object CloudSaves { r } - /** - * Every dirty game, uploaded; [running] says a game session is up, in which case `recovery` waits - * - a marked game may be the one running. - */ fun uploadAllDirty(context: Context, trigger: String, running: Boolean = com.droiddeck.launcher.session.SessionState.running) { if (trigger == "recovery" && running) return for ((store, id) in dirty(context)) uploadDirty(context, store, id, trigger) @@ -361,7 +302,6 @@ object CloudSaves { private fun backupRoot(context: Context, store: Store, id: String) = File(context.filesDir, "stores/cloud-backups/${store.id}-${id.replace(Regex("[^A-Za-z0-9._-]"), "_")}") - /** The local folder as it is, before a download changes it; the last [BACKUPS] of each kind are kept. */ private fun backup(context: Context, store: Store, id: String, dir: File, kind: String) { val root = backupRoot(context, store, id) runCatching { dir.copyRecursively(File(root, "$kind-${System.currentTimeMillis()}"), overwrite = true) } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/CloudTransport.kt b/app/src/main/java/com/droiddeck/launcher/stores/CloudTransport.kt index 3446bf4ab7..33c34196ff 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/CloudTransport.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/CloudTransport.kt @@ -1,9 +1,3 @@ -/* - * The two stores' cloud-save services, after Bannerlator's GogCloudSaveManager and - * EpicCloudSaveManager (device-proven there, August 2026): GOG's cloudstorage (one object per - * file, Last-Modified and an MD5 ETag on a HEAD) and Epic's savesync data storage (a listing with - * lastModified and signed read links; signed write links asked for per upload). - */ package com.droiddeck.launcher.stores import java.io.ByteArrayOutputStream @@ -16,17 +10,12 @@ import java.util.TimeZone import org.json.JSONArray import org.json.JSONObject -/** One file in a game's cloud: its key (a path with '/'), when it was written (-1 unknown) and its MD5 when known. */ class CloudFile(val name: String, var modifiedMs: Long, var md5: String? = null, val readLink: String? = null) -/** A store's cloud for one game. Every call is blocking network. */ interface CloudTransport { fun list(): List<CloudFile> - /** Fills in [CloudFile.modifiedMs] / [CloudFile.md5] where the listing left them out. */ fun details(file: CloudFile) {} - /** The file's bytes and its cloud time (-1 unknown). */ fun get(file: CloudFile): Pair<ByteArray, Long> - /** Writes [files] (key → bytes); the cloud times assigned, where the service says (-1 unknown). */ fun put(files: Map<String, ByteArray>): Map<String, Long> } @@ -60,15 +49,12 @@ internal fun isoDate(s: String?): Long { } catch (e: Exception) { -1L } } -/** Thrown when the store says the game has no cloud saves for this client. */ class NoCloudSaves : Exception("no cloud saves") -/** GOG cloudstorage: `/v1/<userId>/<clientId>[/<key>]`. */ class GogCloud(private val userId: String, private val clientId: String, private val token: String) : CloudTransport { private val base = "https://cloudstorage.gog.com/v1/$userId/$clientId" private val ua = "GOG Galaxy" - /** A path segment: '+' from a space is wrong in a path (it stores a second, '+'-named copy). */ private fun key(name: String) = URLEncoder.encode(name, "UTF-8").replace("+", "%20") override fun list(): List<CloudFile> { @@ -84,7 +70,6 @@ class GogCloud(private val userId: String, private val clientId: String, private val text = c.body().decodeToString().trim() c.disconnect() if (text.isEmpty() || text == "[]") return emptyList() - // A plain newline-separated list of keys (checked on device); a JSON array is read too. if (text.startsWith("[")) { val a = JSONArray(text) return (0 until a.length()).mapNotNull { a.optJSONObject(it) }.mapNotNull { o -> @@ -122,70 +107,15 @@ class GogCloud(private val userId: String, private val clientId: String, private val code = c.responseCode c.disconnect() if (code !in 200..299) throw java.io.IOException("GOG cloud put HTTP $code") - // The server stamps the object itself; that time, so the next sync sees the two as equal. CloudFile(name, -1L).also { details(it) }.modifiedMs } } -/** Epic savesync: `/api/v1/access/egstore/savesync/<accountId>/<appName>/`. */ class EpicCloud(private val accountId: String, private val appName: String, private val token: String) : CloudTransport { - private val base = "https://datastorage-public-service-liveegs.live.use1a.on.epicgames.com/api/v1/access/egstore/savesync/$accountId/$appName/" - private val ua = "EpicGamesLauncher/15.17.1-22692490" + override fun list(): List<CloudFile> = com.droiddeck.launcher.stores.epic.EpicSaveSync.list(token, accountId, appName) - override fun list(): List<CloudFile> { - val c = open(base, "GET", token, ua) - val code = c.responseCode - if (code == 404) { c.disconnect(); return emptyList() } - if (code !in 200..299) { c.disconnect(); throw java.io.IOException("Epic cloud list HTTP $code") } - val root = JSONObject(c.body().decodeToString().ifEmpty { "{}" }) - c.disconnect() - val files = root.optJSONObject("files") ?: return emptyList() - return files.keys().asSequence().mapNotNull { k -> - val e = files.optJSONObject(k) ?: return@mapNotNull null - CloudFile(strip(k), isoDate(e.optString("lastModified", null)), e.optString("hash", "").ifEmpty { null }, e.optString("readLink", "").ifEmpty { null }) - }.toList() - } + override fun get(file: CloudFile): Pair<ByteArray, Long> = com.droiddeck.launcher.stores.epic.EpicSaveSync.read(file) - /** The listing names a file `<...>/<appName>/<key>`; the key is what is under the save folder. */ - private fun strip(key: String): String { - val marker = "/$appName/" - val i = key.indexOf(marker) - if (i >= 0) return key.substring(i + marker.length) - return key.removePrefix("$appName/") - } - - override fun get(file: CloudFile): Pair<ByteArray, Long> { - val link = file.readLink ?: throw java.io.IOException("Epic cloud: no read link") - val c = open(link, "GET", null, ua) - if (c.responseCode !in 200..299) { val code = c.responseCode; c.disconnect(); throw java.io.IOException("Epic cloud get HTTP $code") } - return c.body().also { c.disconnect() } to file.modifiedMs - } - - override fun put(files: Map<String, ByteArray>): Map<String, Long> { - if (files.isEmpty()) return emptyMap() - val c = open(base, "POST", token, ua) - c.doOutput = true - c.setRequestProperty("Content-Type", "application/json") - val req = JSONObject().put("files", JSONArray(files.keys.toList())).toString().toByteArray() - c.outputStream.use { it.write(req) } - if (c.responseCode !in 200..299) { val code = c.responseCode; c.disconnect(); throw java.io.IOException("Epic cloud write links HTTP $code") } - val links = JSONObject(c.body().decodeToString()).optJSONObject("files") ?: JSONObject() - c.disconnect() - val out = HashMap<String, Long>() - for (k in links.keys()) { - val link = links.optJSONObject(k)?.optString("writeLink", "")?.ifEmpty { null } ?: continue - val name = strip(k) - val data = files[name] ?: files[k] ?: continue - val p = open(link, "PUT", null, ua) - p.doOutput = true - p.setRequestProperty("Content-Type", "application/octet-stream") - p.setFixedLengthStreamingMode(data.size) - p.outputStream.use { it.write(data) } - val code = p.responseCode - p.disconnect() - if (code !in 200..299) throw java.io.IOException("Epic cloud put HTTP $code") - out[name] = -1L - } - return out - } + override fun put(files: Map<String, ByteArray>): Map<String, Long> = + com.droiddeck.launcher.stores.epic.EpicSaveSync.write(token, accountId, appName, files) } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/CredentialCipher.kt b/app/src/main/java/com/droiddeck/launcher/stores/CredentialCipher.kt index 2a7e84357e..aa07484231 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/CredentialCipher.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/CredentialCipher.kt @@ -11,44 +11,24 @@ import javax.crypto.KeyGenerator import javax.crypto.SecretKey import javax.crypto.spec.GCMParameterSpec -/** - * The stores' sign-in files at rest: AES-256-GCM under a key that lives in the AndroidKeyStore and - * never leaves it, as a small versioned envelope `{"v":1,"alg":"AES/GCM","iv":...,"ct":...}` - * (base64). The session's Linux side shares the app's files directory but not its Keystore, so - * what it can see of a sign-in is the envelope only. - */ object CredentialCipher { const val VERSION = 1 const val ALG = "AES/GCM" private const val TRANSFORMATION = "AES/GCM/NoPadding" private const val TAG_BITS = 128 - /** Where the key comes from: the AndroidKeyStore on a device, a plain key in tests. */ fun interface KeyProvider { - /** The key, created on first use. Throws when no key can be had (no Keystore on this ROM). */ fun key(): SecretKey - /** The key that sealed earlier files: never a new one. Throws [KeyMissing] when there is none. */ fun existing(): SecretKey = key() } - /** The Keystore answered and holds no key: nothing sealed before can open again. */ class KeyMissing : java.security.GeneralSecurityException("no key") - /** - * Whether [e], from [open], means the file can never open: it does not authenticate (tampered, - * or sealed under another key), the key is permanently invalidated or gone, or the file is not - * an envelope. Anything else - the Keystore busy or erroring, an I/O error - may pass. - */ fun isPermanent(e: Throwable): Boolean = e is javax.crypto.AEADBadTagException || e is android.security.keystore.KeyPermanentlyInvalidatedException || e is KeyMissing || e is org.json.JSONException || e is IllegalArgumentException - /** - * An AES-256 key in the AndroidKeyStore: not exportable, encrypt/decrypt with GCM only, no user - * authentication (background downloads and launch-time code fetches use it with the screen - * off). StrongBox where the device has it, the TEE otherwise. - */ object Keystore : KeyProvider { private const val ALIAS = "droiddeck-store-credentials" private const val PROVIDER = "AndroidKeyStore" @@ -64,7 +44,7 @@ object CredentialCipher { val ks = KeyStore.getInstance(PROVIDER).apply { load(null) } (ks.getKey(ALIAS, null) as? SecretKey)?.let { return it } if (Build.VERSION.SDK_INT >= 28) { - try { return generate(strongBox = true) } catch (e: Exception) { /* no StrongBox: the TEE */ } + try { return generate(strongBox = true) } catch (e: Exception) { } } return generate(strongBox = false) } @@ -81,7 +61,6 @@ object CredentialCipher { } } - /** [plain] sealed into the envelope. The cipher picks the IV (the Keystore requires it). */ fun seal(plain: String, keys: KeyProvider): JSONObject { val cipher = Cipher.getInstance(TRANSFORMATION).apply { init(Cipher.ENCRYPT_MODE, keys.key()) } val ct = cipher.doFinal(plain.toByteArray(Charsets.UTF_8)) @@ -89,7 +68,6 @@ object CredentialCipher { .put("iv", b64(cipher.iv)).put("ct", b64(ct)) } - /** The text inside [envelope]. Throws when it is not ours, of another version, or does not authenticate. */ fun open(envelope: JSONObject, keys: KeyProvider): String { require(envelope.optInt("v", -1) == VERSION && envelope.optString("alg") == ALG) { "unknown envelope" } val iv = Base64.decode(envelope.getString("iv"), Base64.NO_WRAP) @@ -98,7 +76,6 @@ object CredentialCipher { return String(cipher.doFinal(ct), Charsets.UTF_8) } - /** Whether [json] is an envelope rather than plain credentials. */ fun isEnvelope(json: JSONObject): Boolean = json.has("v") && json.has("ct") && json.has("iv") private fun b64(bytes: ByteArray) = Base64.encodeToString(bytes, Base64.NO_WRAP) diff --git a/app/src/main/java/com/droiddeck/launcher/stores/GameFacts.kt b/app/src/main/java/com/droiddeck/launcher/stores/GameFacts.kt new file mode 100644 index 0000000000..88b0f01054 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/GameFacts.kt @@ -0,0 +1,224 @@ +package com.droiddeck.launcher.stores + +import android.content.Context +import android.util.Log +import org.json.JSONArray +import org.json.JSONObject +import java.io.File +import java.net.URLEncoder +import java.time.LocalDate +import java.time.format.DateTimeFormatter +import java.time.format.FormatStyle +import java.util.concurrent.ConcurrentHashMap + +object GameFacts { + private const val TAG = "GameFacts" + private const val HIT_TTL_MS = 14L * 24 * 60 * 60 * 1000 + private const val MISS_TTL_MS = 2L * 24 * 60 * 60 * 1000 + private const val TIMEOUT_MS = 10_000 + + data class Metacritic(val score: Int, val url: String) + + data class Hltb(val main: Int, val extras: Int, val completionist: Int, val url: String) { + val isEmpty: Boolean get() = main <= 0 && extras <= 0 && completionist <= 0 + } + + private class Entry<T>(val value: T?, val at: Long) { + fun fresh(now: Long) = now - at < if (value != null) HIT_TTL_MS else MISS_TTL_MS + } + + private val memory = ConcurrentHashMap<String, Entry<*>>() + + fun peekMetacritic(title: String): Lookup<Metacritic>? = peek("metacritic", title) + fun peekHltb(title: String): Lookup<Hltb>? = peek("hltb", title) + + fun metacritic(context: Context, title: String): Metacritic? = + remembered(context, "metacritic", title, + read = { o -> o.optInt("score").takeIf { it > 0 }?.let { Metacritic(it, o.optString("url").ifEmpty { metacriticSearch(title) }) } }, + write = { o, v -> o.put("score", v.score).put("url", v.url) }, + ) { searchSteamScore(title) } + + fun hltb(context: Context, title: String): Hltb? = + remembered(context, "hltb", title, + read = { o -> Hltb(o.optInt("main"), o.optInt("extras"), o.optInt("completionist"), o.optString("url").ifEmpty { hltbSearch(title) }).takeUnless { it.isEmpty } }, + write = { o, v -> o.put("main", v.main).put("extras", v.extras).put("completionist", v.completionist).put("url", v.url) }, + ) { searchHltb(title) } + + private fun metacriticSearch(title: String) = "https://www.metacritic.com/search/${encodePath(TitleMatch.searchTerm(title))}/?category=13" + private fun hltbSearch(title: String) = "$HLTB/?q=${URLEncoder.encode(TitleMatch.searchTerm(title), "UTF-8")}" + private fun encodePath(s: String) = URLEncoder.encode(s, "UTF-8").replace("+", "%20") + + @Suppress("UNCHECKED_CAST") + private fun <T> peek(kind: String, title: String): Lookup<T>? { + val e = memory[key(kind, title)] as Entry<T>? ?: return null + return e.value?.let { Lookup.Found(it) } ?: Lookup.None + } + + @Suppress("UNCHECKED_CAST") + private fun <T : Any> remembered( + context: Context, kind: String, title: String, + read: (JSONObject) -> T?, write: (JSONObject, T) -> Unit, fetch: () -> Fetched<T>, + ): T? { + val now = System.currentTimeMillis() + val k = key(kind, title) + (memory[k] as Entry<T>?)?.takeIf { it.fresh(now) }?.let { return it.value } + val file = File(context.filesDir, "game-facts/$kind/${fileName(title)}.json") + val disk = runCatching { JSONObject(file.readText()) }.getOrNull() + ?.let { o -> Entry(if (o.optBoolean("none")) null else read(o), o.optLong("at")) } + if (disk != null && disk.fresh(now)) { memory[k] = disk; return disk.value } + return when (val got = fetch()) { + is Fetched.Failed -> disk?.value + is Fetched.Answer -> { + val entry = Entry(got.value, now) + memory[k] = entry + runCatching { + file.parentFile?.mkdirs() + val o = JSONObject().put("at", now) + if (got.value != null) write(o, got.value) else o.put("none", true) + file.writeText(o.toString()) + } + got.value + } + } + } + + private sealed interface Fetched<out T> { + object Failed : Fetched<Nothing> + class Answer<T>(val value: T?) : Fetched<T> + } + + private fun key(kind: String, title: String) = "$kind:${TitleMatch.normalize(title)}" + + private fun fileName(title: String) = TitleMatch.normalize(title).take(80).ifEmpty { "_" + title.hashCode().toUInt() } + + private fun searchSteamScore(title: String): Fetched<Metacritic> { + val term = URLEncoder.encode(TitleMatch.searchTerm(title), "UTF-8") + val body = StoreNet.get("https://store.steampowered.com/api/storesearch/?l=english&cc=US&term=$term", timeoutMs = TIMEOUT_MS) + ?: return Fetched.Failed + return runCatching { + val items = JSONObject(body).optJSONArray("items") ?: JSONArray() + val scored = (0 until items.length()).mapNotNull { items.optJSONObject(it) } + .filter { it.optString("type") == "app" && (it.optString("metascore").toIntOrNull() ?: 0) > 0 } + val best = TitleMatch.pick(title, scored) { listOf(it.optString("name")) } + val score = best?.optString("metascore")?.toIntOrNull() ?: return Fetched.Answer(null) + Fetched.Answer(Metacritic(score, metacriticPage(best.optLong("id")) ?: metacriticSearch(title))) + }.getOrElse { Fetched.Failed } + } + + private fun metacriticPage(appId: Long): String? { + if (appId <= 0) return null + val body = StoreNet.get("https://store.steampowered.com/api/appdetails?appids=$appId&filters=metacritic", timeoutMs = TIMEOUT_MS) ?: return null + return runCatching { + JSONObject(body).optJSONObject("$appId")?.optJSONObject("data")?.optJSONObject("metacritic")?.optString("url") + ?.substringBefore('?')?.takeIf { it.startsWith("https://") } + }.getOrNull() + } + + private const val HLTB = "https://howlongtobeat.com" + private val hltbHeaders = mapOf("Referer" to "$HLTB/", "Origin" to HLTB) + @Volatile private var hltbToken: Pair<String, Long>? = null + + private fun hltbToken(renew: Boolean): String? { + val now = System.currentTimeMillis() + hltbToken?.takeIf { !renew && now - it.second < 10 * 60 * 1000 }?.let { return it.first } + val body = StoreNet.get("$HLTB/api/search/site/init?t=$now", timeoutMs = TIMEOUT_MS, headers = hltbHeaders) ?: return null + val token = runCatching { JSONObject(body).optString("token") }.getOrNull()?.takeIf { it.isNotBlank() } ?: return null + hltbToken = token to now + return token + } + + private fun searchHltb(title: String): Fetched<Hltb> { + val terms = JSONArray().apply { TitleMatch.searchTerm(title).split(' ').filter { it.isNotBlank() }.forEach { put(it) } } + val request = JSONObject() + .put("searchType", "games").put("searchTerms", terms).put("searchPage", 1).put("size", 20) + .put("searchOptions", JSONObject() + .put("games", JSONObject().put("userId", 0).put("platform", "").put("sortCategory", "popular").put("rangeCategory", "main") + .put("rangeTime", JSONObject().put("min", 0).put("max", 0)) + .put("gameplay", JSONObject().put("perspective", "").put("flow", "").put("genre", "")) + .put("year", "").put("modifier", "")) + .put("users", JSONObject().put("sortCategory", "postcount")) + .put("lists", JSONObject().put("sortCategory", "follows")) + .put("filter", "").put("sort", 0).put("randomizer", 0)) + .put("useCache", true) + .toString() + var body: String? = null + for (renew in listOf(false, true)) { + val token = hltbToken(renew) ?: return Fetched.Failed + body = StoreNet.postJson("$HLTB/api/search/site", request, timeoutMs = TIMEOUT_MS, headers = hltbHeaders + ("x-auth-token" to token)) + if (body != null) break + } + if (body == null) return Fetched.Failed + return runCatching { + val data = JSONObject(body).optJSONArray("data") ?: JSONArray() + val games = (0 until data.length()).mapNotNull { data.optJSONObject(it) } + .sortedByDescending { it.optString("game_type") == "game" } + val best = TitleMatch.pick(title, games) { g -> listOf(g.optString("game_name")) + g.optString("game_alias").split(',') } + Fetched.Answer(best?.let { + val page = it.optInt("game_id").takeIf { id -> id > 0 }?.let { id -> "$HLTB/game/$id" } ?: hltbSearch(title) + Hltb(it.optInt("comp_main"), it.optInt("comp_plus"), it.optInt("comp_100"), page) + }?.takeUnless { it.isEmpty }) + }.getOrElse { + Log.w(TAG, "HowLongToBeat answer unreadable: ${it.javaClass.simpleName}") + Fetched.Failed + } + } + + fun releaseLabel(raw: String): String? { + val m = Regex("""^(\d{4})[.\-/](\d{2})[.\-/](\d{2})""").find(raw.trim()) ?: return null + val (y, mo, d) = m.destructured + val date = runCatching { LocalDate.of(y.toInt(), mo.toInt(), d.toInt()) }.getOrNull()?.takeIf { it.year in 1970..2098 } ?: return null + return date.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)) + } + + fun hours(seconds: Int): String? { + if (seconds < 3600) return null + val halves = Math.round(seconds / 1800.0).toInt() + return "${halves / 2}" + if (halves % 2 == 1) "½" else "" + } +} + +sealed interface Lookup<out T> { + object Pending : Lookup<Nothing> + object None : Lookup<Nothing> + data class Found<T>(val value: T) : Lookup<T> +} + +internal object TitleMatch { + private val MARKS = Regex("[™®©]") + private val EDITION = Regex( + "(?i)[\\s:\\-–—]*\\b(?:(?:complete|definitive|legendary|deluxe|ultimate|enhanced|gold|premium|standard|special|anniversary|collector'?s|digital deluxe|game of the year|goty)\\s+edition|goty|director'?s cut)\\b", + ) + private val SUBTITLE = Regex("\\s*[:–—]\\s*|\\s+-\\s+|\\s*\\(") + + fun normalize(s: String): String = s.lowercase().replace(MARKS, "").replace("&", "and").replace(Regex("[^\\p{L}\\p{N}]"), "") + + fun stripEdition(s: String): String = s.replace(EDITION, " ").trim().ifEmpty { s } + + fun searchTerm(title: String): String = + stripEdition(title.replace(MARKS, "")).replace(Regex("\\s+[-–—]\\s+|[:–—()\\[\\]]"), " ").replace(Regex("\\s+"), " ").trim() + + fun score(want: String, got: String): Int { + val w = normalize(want) + val g = normalize(got) + if (w.isEmpty() || g.isEmpty()) return 0 + if (w == g) return 3 + val ws = normalize(stripEdition(want)) + val gs = normalize(stripEdition(got)) + if (ws == gs || ws == g || w == gs) return 2 + if (ws in heads(got) || gs in heads(want)) return 1 + return 0 + } + + private fun heads(title: String): Set<String> = + SUBTITLE.findAll(title).map { normalize(title.substring(0, it.range.first)) }.filter { it.isNotEmpty() }.toSet() + + fun <T> pick(want: String, items: List<T>, names: (T) -> List<String>): T? { + var best: T? = null + var bestScore = 0 + for (item in items) { + val s = names(item).filter { it.isNotBlank() }.maxOfOrNull { score(want, it.trim()) } ?: 0 + if (s > bestScore) { best = item; bestScore = s } + } + return best + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/LoginFlows.kt b/app/src/main/java/com/droiddeck/launcher/stores/LoginFlows.kt index 54f31f7512..7a4f579aec 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/LoginFlows.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/LoginFlows.kt @@ -5,7 +5,6 @@ import android.util.Log import android.webkit.WebView import com.droiddeck.launcher.stores.gog.GogAuth -/** The three stores' sign-in flows for [StoreLoginActivity]. */ internal object LoginFlows { private const val TAG = "StoreLogin" @@ -15,15 +14,9 @@ internal object LoginFlows { Store.AMAZON -> amazonFlow() } - /** Set by the Epic and Amazon backends when they are in the build; null keeps the chip's card honest. */ @Volatile var epicFlow: () -> StoreLoginActivity.Flow? = { null } @Volatile var amazonFlow: () -> StoreLoginActivity.Flow? = { null } - /** - * GOG's implicit grant: the token arrives in the redirect URL's fragment. The CSRF state is - * checked only when GOG echoes one back - its social-login path returns none, and treating - * that as a mismatch threw away good tokens. - */ private class GogFlow(private val state: String) : StoreLoginActivity.Flow { override val startUrl: String get() = GogAuth.authUrl(state) override val userAgent: String get() = GogAuth.GALAXY_UA @@ -39,7 +32,6 @@ internal object LoginFlows { } val access = frag.getQueryParameter("access_token") if (access.isNullOrEmpty()) { - // The keys only, never the values: the fragment carries live tokens. Log.w(TAG, "gog: redirect without access_token; keys=${frag.queryParameterNames}") return activity.getString(com.droiddeck.launcher.R.string.stores_login_error_verification) } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/SizeCache.kt b/app/src/main/java/com/droiddeck/launcher/stores/SizeCache.kt index c89df6b526..ca10780589 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/SizeCache.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/SizeCache.kt @@ -3,12 +3,6 @@ package com.droiddeck.launcher.stores import java.io.File import org.json.JSONObject -/** - * Game sizes as found, kept per game AND the version they were found for, in - * `filesDir/stores/<store>/sizes.json`: a size is never fetched twice for one version, and a - * new version (a library refresh brings it) simply misses and is looked up again. The file carries - * its format; one in another format is discarded, not read. - */ class SizeCache(private val file: File) { private val sizes = HashMap<String, Pair<String, Long>>() diff --git a/app/src/main/java/com/droiddeck/launcher/stores/SteamLiveShortcuts.kt b/app/src/main/java/com/droiddeck/launcher/stores/SteamLiveShortcuts.kt index 250a373460..345f4da32b 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/SteamLiveShortcuts.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/SteamLiveShortcuts.kt @@ -3,58 +3,34 @@ package com.droiddeck.launcher.stores import android.content.Context import android.util.Base64 import android.util.Log +import com.droiddeck.launcher.agent.AgentGuest import com.droiddeck.launcher.frontend.AddedGames import com.droiddeck.launcher.frontend.Library -import com.droiddeck.launcher.runtime.LinuxRuntime +import com.droiddeck.launcher.frontend.LogoPosition import com.droiddeck.launcher.session.SessionService import com.droiddeck.launcher.session.SessionState import org.json.JSONArray import org.json.JSONObject -import java.io.ByteArrayOutputStream -import java.io.DataInputStream -import java.io.File -import java.io.InputStream -import java.io.OutputStream -import java.net.HttpURLConnection -import java.net.Socket -import java.net.URL -import java.security.SecureRandom -/** - * Adds and removes a store game's shortcut in a Steam client that is running right now, so it - * shows without waiting for the next client start. The runtime starts the client with its - * DevTools port open (droiddeck-session writes it to session/agent/cdp-port) and the client's own - * JavaScript API has `SteamClient.Apps.AddShortcut`; this speaks the small part of the DevTools - * protocol that one `Runtime.evaluate` needs, over a plain socket, nothing else. - * - * Best-effort throughout: no session, no port, no SharedJSContext, or an API that moved and the - * shortcut simply arrives with the shortcuts writer at the next start. The appid Steam derives - * (CRC of the quoted exe plus the name) is the one the writer computes, so the two never disagree. - */ object SteamLiveShortcuts { private const val TAG = "SteamLive" private const val TAG_NAME = "droiddeck-app" private const val COMPAT_TOOL = "droiddeck-proton-arm64" + private const val EVAL_TIMEOUT_MS = 20_000L + private const val THAW_WAIT_MS = 15_000L - /** Adds every game in [games] that [include] takes (store games by default) and the client does not list yet. Blocking; worker thread. */ fun sync(context: Context, games: List<AddedGames.Game>, include: (AddedGames.Game) -> Boolean = { it.source != Library.ADDED }) { val wanted = games.filter(include) if (wanted.isEmpty() || !clientRunning()) return val list = JSONArray() - for (g in wanted) list.put(JSONObject().put("name", g.name).put("exe", g.guestExe).put("dir", g.guestDir)) + for (g in wanted) list.put(JSONObject().put("name", g.name).put("exe", g.guestExe).put("dir", g.guestDir).put("appid", g.appId and 0xFFFFFFFFL)) val js = """ (async () => { const want = ${list}; - const have = await SteamClient.Apps.GetAllShortcuts(); - const strip = s => (s || "").replace(/^"|"$/g, ""); let added = 0; for (const w of want) { - if (have.some(a => a.data && strip(a.data.strExePath) === w.exe && a.data.strAppName === w.name)) continue; - const id = await SteamClient.Apps.AddShortcut(w.name, w.exe, w.dir, ""); - if (!id) continue; - try { SteamClient.Apps.AddUserTagToApps([id], ${JSONObject.quote(TAG_NAME)}); } catch (e) {} - try { SteamClient.Apps.SpecifyCompatTool(id, ${JSONObject.quote(COMPAT_TOOL)}); } catch (e) {} - added++; + if (await ${KNOWN}(w.appid, w.name, w.exe)) continue; + if (await ${ADD}(w.name, w.exe, w.dir, true)) added++; } return added; })() @@ -64,17 +40,42 @@ object SteamLiveShortcuts { if (result != "0") StoresState.logLine("Steam: $result shortcut(s) added to the running client") } - /** Removes the shortcut with [appId] from the running client. Blocking; worker thread. */ + fun ensure(context: Context, name: String, exe: String, dir: String, compat: Boolean, appId: Long? = null): Long? { + if (!awake(THAW_WAIT_MS)) return null + val js = """ + (async () => { + const known = await ${KNOWN}(${appId?.and(0xFFFFFFFFL) ?: 0}, ${JSONObject.quote(name)}, ${JSONObject.quote(exe)}); + if (known) return known; + return await ${ADD}(${JSONObject.quote(name)}, ${JSONObject.quote(exe)}, ${JSONObject.quote(dir)}, $compat); + })() + """.trimIndent() + val id = evaluate(context, js)?.toLongOrNull()?.and(0xFFFFFFFFL)?.takeIf { it != 0L } ?: return null + Log.i(TAG, "live shortcuts: $name is $id") + return id + } + + fun known(context: Context, appId: Long): Boolean? { + if (!clientRunning()) return null + val js = """ + (() => { + const store = globalThis.appStore; + if (typeof store?.GetAppOverviewByAppID !== 'function' || !store.m_bIsInitialized) return 'unknown'; + return store.GetAppOverviewByAppID(${appId and 0xFFFFFFFFL}) != null ? 'yes' : 'no'; + })() + """.trimIndent() + return when (evaluate(context, js)) { + "yes" -> true + "no" -> false + else -> null + } + } + fun remove(context: Context, appId: Long) { if (!clientRunning()) return val result = evaluate(context, "(async () => { await SteamClient.Apps.RemoveShortcut(${appId and 0xFFFFFFFFL}); return 1; })()") if (result != null) Log.i(TAG, "live shortcuts: removed $appId") } - /** - * The running client's shortcut for [game] made to match it: name, target, Start in and - * launch options, on the same appid (an edit never adds a second shortcut). Blocking. - */ fun update(context: Context, game: AddedGames.Game) { if (!clientRunning()) return val id = game.appId and 0xFFFFFFFFL @@ -91,11 +92,6 @@ object SteamLiveShortcuts { if (evaluate(context, js) != null) Log.i(TAG, "live shortcuts: updated $id") } - /** - * One piece of art for the running client's shortcut [appId]: [assetType] as the client numbers - * them (0 portrait capsule, 1 hero, 2 logo, 3 wide capsule), from [file]; null clears it. The - * icon goes by path ([iconPath]). Blocking. - */ fun setArt(context: Context, appId: Long, assetType: Int?, file: java.io.File?, iconPath: String? = null) { if (!clientRunning()) return val id = appId and 0xFFFFFFFFL @@ -112,117 +108,69 @@ object SteamLiveShortcuts { if (evaluate(context, js) != null) Log.i(TAG, "live shortcuts: art $assetType for $id") } - private fun clientRunning(): Boolean = SessionState.running && SessionState.mode == SessionService.MODE_STEAM && !SessionState.stopRequested + /** Moves and resizes a game's logo in the running client; with null the client's default position comes back. */ + fun setLogoPosition(context: Context, appId: Long, position: LogoPosition.Value?) { + if (!clientRunning()) return + val id = appId and 0xFFFFFFFFL + val js = if (position == null) "(async () => { try { await SteamClient.Apps.ClearCustomLogoPositionForApp($id); } catch (e) {} return 1; })()" + else "(async () => { try { await SteamClient.Apps.SetCustomLogoPositionForApp($id, ${JSONObject.quote(LogoPosition.toJson(position).toString())}); } catch (e) {} return 1; })()" + if (evaluate(context, js) != null) Log.i(TAG, "live shortcuts: logo position for $id") + } + + private fun clientRunning(): Boolean = + SessionState.running && SessionState.mode == SessionService.MODE_STEAM && !SessionState.stopRequested && !SessionState.suspended + + private fun awake(waitMs: Long): Boolean { + val end = android.os.SystemClock.uptimeMillis() + waitMs + while (SessionState.running && SessionState.suspended && android.os.SystemClock.uptimeMillis() < end) Thread.sleep(100) + return clientRunning() + } - /** `Runtime.evaluate` of [expression] in the client's SharedJSContext; the value as text, or null. */ private fun evaluate(context: Context, expression: String): String? { - val portFile = File(LinuxRuntime.sessionRoot(context), "agent/cdp-port") - val port = runCatching { portFile.readText().trim().toInt() }.getOrNull() ?: return null - val targets = runCatching { JSONArray(get("http://127.0.0.1:$port/json")) }.getOrNull() ?: return null - var wsUrl: String? = null - for (i in 0 until targets.length()) { - val t = targets.optJSONObject(i) ?: continue - if (t.optString("title").contains("SharedJSContext") || t.optString("url").contains("SharedJSContext")) { wsUrl = t.optString("webSocketDebuggerUrl").ifEmpty { null }; break } - } - if (wsUrl == null) { Log.w(TAG, "no SharedJSContext target"); return null } - return try { - WebSocket(wsUrl, 8000).use { ws -> - ws.sendText(JSONObject().put("id", 1).put("method", "Runtime.evaluate").put("params", JSONObject() - .put("expression", expression).put("returnByValue", true).put("awaitPromise", true).put("userGesture", true)).toString()) - val deadline = System.currentTimeMillis() + 15_000 - while (System.currentTimeMillis() < deadline) { - val message = JSONObject(ws.receiveText() ?: return null) - if (message.optInt("id") != 1) continue - if (message.has("error")) { Log.w(TAG, "cdp: ${message.optJSONObject("error")}"); return null } - val result = message.optJSONObject("result") ?: return null - result.optJSONObject("exceptionDetails")?.let { Log.w(TAG, "js: ${it.optJSONObject("exception")?.optString("description") ?: it.optString("text")}"); return null } - return result.optJSONObject("result")?.opt("value")?.toString() - } - null - } + val answer = try { + AgentGuest.steamEval(context, expression, EVAL_TIMEOUT_MS) } catch (e: Exception) { Log.w(TAG, "cdp: ${e.javaClass.simpleName}: ${e.message}") - null + return null } + if (!answer.optBoolean("ok")) { + Log.w(TAG, "cdp: ${answer.optJSONObject("error")?.optString("message")}") + return null + } + return answer.opt("value")?.takeIf { it != JSONObject.NULL }?.toString() } - private fun get(url: String): String { - val c = URL(url).openConnection() as HttpURLConnection - c.connectTimeout = 3000; c.readTimeout = 3000 - try { return c.inputStream.bufferedReader().readText() } finally { c.disconnect() } - } + private val KNOWN = """(async (appid, name, exe) => { + const store = globalThis.appStore; + if (typeof store?.GetAppOverviewByAppID !== 'function' || !store.m_bIsInitialized) throw new Error("appStore is not ready"); + const byId = appid ? store.GetAppOverviewByAppID(appid) : null; + if (byId) return byId.appid; + const strip = s => (s || "").replace(/^"|"$/g, ""); + const details = id => new Promise(done => { + let handle = null, answer; + const finish = d => { clearTimeout(timer); try { handle?.unregister(); } catch (e) {} done(d); }; + const timer = setTimeout(() => finish(null), 4000); + handle = SteamClient.Apps.RegisterForAppDetails(id, d => { answer = d; if (handle) finish(d); }); + if (answer !== undefined) finish(answer); + }); + for (const a of store.allApps.filter(a => a.app_type == 1073741824 && a.display_name === name)) { + const d = await details(a.appid); + if (!d) throw new Error("no details for shortcut " + a.appid); + if (strip(d.strShortcutExe) === strip(exe)) return a.appid; + } + return 0; + })""" - /** The least of RFC 6455 a localhost DevTools talk needs: upgrade, masked text out, text in. */ - private class WebSocket(url: String, timeoutMs: Int) : AutoCloseable { - private val socket: Socket - private val out: OutputStream - private val input: DataInputStream - - init { - val u = URL(url.replaceFirst("ws://", "http://")) - socket = Socket(u.host, if (u.port > 0) u.port else 80).apply { soTimeout = timeoutMs } - out = socket.getOutputStream() - input = DataInputStream(socket.getInputStream()) - val key = ByteArray(16).also { SecureRandom().nextBytes(it) } - val path = u.path.ifEmpty { "/" } + (u.query?.let { "?$it" } ?: "") - out.write(("GET $path HTTP/1.1\r\nHost: ${u.host}:${u.port}\r\nUpgrade: websocket\r\nConnection: Upgrade\r\n" + - "Sec-WebSocket-Key: ${Base64.encodeToString(key, Base64.NO_WRAP)}\r\nSec-WebSocket-Version: 13\r\n\r\n").toByteArray()) - out.flush() - val status = readLine(input) ?: throw java.io.IOException("no upgrade response") - if (!status.contains(" 101 ")) throw java.io.IOException("upgrade refused: $status") - while (true) { val line = readLine(input) ?: break; if (line.isEmpty()) break } - } - - private fun readLine(s: InputStream): String? { - val buf = ByteArrayOutputStream() - while (true) { - val b = s.read() - if (b < 0) return if (buf.size() == 0) null else buf.toString("UTF-8") - if (b == '\n'.code) return buf.toString("UTF-8").trimEnd('\r') - buf.write(b) - } - } - - fun sendText(text: String) { - val payload = text.toByteArray() - val mask = ByteArray(4).also { SecureRandom().nextBytes(it) } - val frame = ByteArrayOutputStream() - frame.write(0x81) - when { - payload.size < 126 -> frame.write(0x80 or payload.size) - payload.size < 65536 -> { frame.write(0x80 or 126); frame.write(payload.size ushr 8); frame.write(payload.size and 0xFF) } - else -> { frame.write(0x80 or 127); for (i in 7 downTo 0) frame.write(((payload.size.toLong() ushr (8 * i)) and 0xFF).toInt()) } - } - frame.write(mask) - for (i in payload.indices) frame.write((payload[i].toInt() xor mask[i % 4].toInt()) and 0xFF) - out.write(frame.toByteArray()); out.flush() - } - - /** The next text message (fragments joined); null on close. */ - fun receiveText(): String? { - val message = ByteArrayOutputStream() - while (true) { - val b0 = input.read(); if (b0 < 0) return null - val b1 = input.read(); if (b1 < 0) return null - val fin = b0 and 0x80 != 0 - val opcode = b0 and 0x0F - var len = (b1 and 0x7F).toLong() - if (len == 126L) len = input.readUnsignedShort().toLong() - else if (len == 127L) len = input.readLong() - val masked = b1 and 0x80 != 0 - val mask = if (masked) ByteArray(4).also { input.readFully(it) } else null - if (len > 16L * 1024 * 1024) throw java.io.IOException("frame too large") - val data = ByteArray(len.toInt()).also { input.readFully(it) } - if (mask != null) for (i in data.indices) data[i] = (data[i].toInt() xor mask[i % 4].toInt()).toByte() - when (opcode) { - 0x8 -> return null - 0x9 -> { out.write(byteArrayOf(0x8A.toByte(), 0x80.toByte(), 0, 0, 0, 0)); out.flush() } - 0x1, 0x0 -> { message.write(data); if (fin) return message.toString("UTF-8") } - else -> {} - } - } - } - - override fun close() { runCatching { out.write(byteArrayOf(0x88.toByte(), 0x80.toByte(), 0, 0, 0, 0)); out.flush() }; runCatching { socket.close() } } - } + private val ADD = """(async (name, exe, dir, compat) => { + const id = await SteamClient.Apps.AddShortcut(name, exe, dir, ""); + if (!id) return 0; + try { SteamClient.Apps.SetShortcutName(id, name); } catch (e) {} + try { SteamClient.Apps.AddUserTagToApps([id], ${JSONObject.quote(TAG_NAME)}); } catch (e) {} + if (compat) { try { SteamClient.Apps.SpecifyCompatTool(id, ${JSONObject.quote(COMPAT_TOOL)}); } catch (e) {} } + for (let i = 0; i < 40; i++) { + try { if (globalThis.appStore.GetAppOverviewByAppID(id)) break; } catch (e) {} + await new Promise(r => setTimeout(r, 250)); + } + return id; + })""" } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/Store.kt b/app/src/main/java/com/droiddeck/launcher/stores/Store.kt index 9ff97654b8..3288e1c6ec 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/Store.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/Store.kt @@ -1,9 +1,5 @@ package com.droiddeck.launcher.stores -/** - * The three storefronts the Stores section talks to. [id] is what the sidecar, the prefs file - * names and the Games badge carry; it never changes once a game is installed under it. - */ enum class Store(val id: String, val label: String, val shortLabel: String) { GOG("gog", "GOG", "GOG"), EPIC("epic", "Epic Games", "Epic"), diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreAccounts.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreAccounts.kt index 77599e0a47..6b5f301863 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreAccounts.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreAccounts.kt @@ -6,22 +6,6 @@ import androidx.annotation.VisibleForTesting import org.json.JSONObject import java.io.File -/** - * Each store's sign-in, kept in the app's private files: `filesDir/stores/<store>/credentials.json`. - * Tokens never go to shared storage and never into a log; the file holds whatever the store's auth - * flow handed back (access and refresh tokens, expiry, the account's display name, and for Amazon - * the device registration), as one JSON object the store's own client reads and writes - sealed - * with [CredentialCipher] under a key in the AndroidKeyStore. Every read and write of a sign-in - * goes through here. - * - * - A plain file an earlier build wrote is sealed the first time it is read ([encryptAll] at app - * start), verified by opening it again, and the plain text is replaced. - * - Where the Keystore does not work (some ROMs), the file stays plain, the log says so once, and - * the next start tries again. - * - A sealed file that can never open again (the key is gone: data cleared, a backup restored on - * another device) is deleted and the store reads as signed out; one that fails for a reason that - * may pass is kept and tried again (see [read]). - */ object StoreAccounts { private const val TAG = "StoreAccounts" private const val FILE = "credentials.json" @@ -30,32 +14,19 @@ object StoreAccounts { @Volatile internal var keys: CredentialCipher.KeyProvider = CredentialCipher.Keystore - /** The Keystore failed once in this process: files stay plain until the next start tries again. */ @VisibleForTesting @Volatile internal var keystoreFailed = false - /** The store's private folder: credentials, caches, the engine's scratch. */ fun dir(context: Context, store: Store): File = File(File(context.filesDir, "stores"), store.id).apply { mkdirs() } fun credentialsFile(context: Context, store: Store): File = File(dir(context, store), FILE) - /** Stores whose sealed sign-in could not be opened this time for a reason that may pass (see [read]). */ private val unavailable = java.util.concurrent.ConcurrentHashMap.newKeySet<Store>() @Volatile private var unavailableLogged = false - /** - * The stored credentials, or null when signed out or unreadable (never logged: the text is the - * secret). - * - * A sealed file is deleted - the store signs in again - only when it can never open: it does - * not authenticate (tampered, or another key: data cleared, restored on another device), the - * key is permanently invalidated or gone from the Keystore, or it is not an envelope at all. Any - * other failure (the Keystore busy or erroring, an I/O error) keeps the file, marks the store - * [isUnavailable] - signed in, its actions failing for now - and the next read tries again. - */ @Synchronized fun read(context: Context, store: Store): JSONObject? { val f = credentialsFile(context, store) @@ -74,7 +45,6 @@ object StoreAccounts { } } - /** The store's sign-in is on disk but could not be opened this time (see [read]). */ fun isUnavailable(store: Store): Boolean = store in unavailable private fun unreadable(f: File, store: Store, e: Exception): JSONObject? { @@ -107,30 +77,19 @@ object StoreAccounts { File(credentialsFile(context, store).path + ".tmp").delete() } - /** At app start: every plain sign-in an earlier build left is sealed now. */ fun encryptAll(context: Context) { Store.entries.forEach { store -> - // An older build's temp file held the plain text too. File(credentialsFile(context, store).path + ".tmp").delete() read(context, store) } } - /** - * The account's display name when signed in (the store's own name for it, or a stand-in), else - * null. A sign-in that could not be opened this time ([isUnavailable]) still counts, under the - * store's name, so the sign-in card does not ask for what is still there. - */ fun signedInAs(context: Context, store: Store): String? { val json = read(context, store) ?: return if (isUnavailable(store)) store.label else null if (json.optString("access_token", "").isEmpty()) return null return json.optString("display_name", "").ifEmpty { json.optString("username", "") }.ifEmpty { store.label } } - /** - * [json] sealed into [f], checked by opening what was written. Null - and [f] as it was - when - * the Keystore cannot seal or the check fails. - */ private fun seal(f: File, json: JSONObject): File? { if (keystoreFailed) return null val text = json.toString() @@ -145,7 +104,6 @@ object StoreAccounts { return f } - /** [text] into [f] through a temp file and a rename, readable and writable by the app alone. */ private fun put(f: File, text: String) { val tmp = File(f.path + ".tmp") tmp.writeText(text) diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreAchievements.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreAchievements.kt new file mode 100644 index 0000000000..67ae6bae61 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreAchievements.kt @@ -0,0 +1,102 @@ +package com.droiddeck.launcher.stores + +import android.content.Context +import android.util.Log +import androidx.compose.runtime.Immutable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.setValue +import com.droiddeck.launcher.stores.epic.EpicAchievements +import com.droiddeck.launcher.stores.gog.GogAchievements +import org.json.JSONArray +import org.json.JSONObject +import java.io.File +import java.time.Instant +import java.time.OffsetDateTime +import java.util.Locale + +abstract class StoreAchievements(val source: String, val label: String) { + + @Immutable + data class Game(val source: String, val id: String, val extra: Map<String, String> = emptyMap()) { + companion object { + fun of(item: CatalogItem) = Game(item.store.id, item.id, item.extra) + fun of(sidecar: StoreGameSidecar) = Game(sidecar.store.id, sidecar.id, sidecar.extra) + } + } + + class Achievement( + val id: String, + val name: String, + val description: String, + val hidden: Boolean, + val unlocked: Boolean, + val unlockedAt: Long, + val icon: String?, + val iconLocked: String?, + ) + + sealed class Result { + class Found(val list: List<Achievement>) : Result() + class Failed(val reason: Reason) : Result() + } + + enum class Reason { SIGNED_OUT, UNREACHABLE, NO_SERVICE } + + protected abstract fun request(context: Context, game: Game): Result + + fun fetch(context: Context, game: Game): Result { + val result = runCatching { request(context, game) }.getOrElse { e -> + Log.w(TAG, "$source:${game.id}: ${e.javaClass.simpleName}") + Result.Failed(Reason.UNREACHABLE) + } + if (result is Result.Found) runCatching { + cacheFile(context, game).apply { parentFile?.mkdirs() }.writeText(toJson(result.list).toString()) + } + return result + } + + fun cached(context: Context, game: Game): List<Achievement>? = runCatching { + val file = cacheFile(context, game) + if (!file.exists()) null else fromJson(JSONArray(file.readText())) + }.getOrNull() + + private fun cacheFile(context: Context, game: Game) = + File(context.filesDir, "achievements/$source/${game.id.replace(Regex("[^A-Za-z0-9._-]"), "_")}.json") + + protected fun locale(): String = Locale.getDefault().toLanguageTag() + + protected fun epochSeconds(iso: String?): Long { + if (iso.isNullOrBlank()) return 0 + val normalized = iso.replace(Regex("([+-]\\d{2})(\\d{2})$"), "$1:$2") + return runCatching { OffsetDateTime.parse(normalized).toEpochSecond() } + .recoverCatching { Instant.parse(normalized).epochSecond } + .getOrDefault(0) + } + + private fun toJson(list: List<Achievement>) = JSONArray().apply { + for (a in list) put( + JSONObject().put("id", a.id).put("name", a.name).put("description", a.description).put("hidden", a.hidden) + .put("unlocked", a.unlocked).put("unlockedAt", a.unlockedAt).put("icon", a.icon ?: "").put("iconLocked", a.iconLocked ?: ""), + ) + } + + private fun fromJson(arr: JSONArray) = List(arr.length()) { i -> + val o = arr.getJSONObject(i) + Achievement( + id = o.getString("id"), name = o.optString("name"), description = o.optString("description"), + hidden = o.optBoolean("hidden"), unlocked = o.optBoolean("unlocked"), unlockedAt = o.optLong("unlockedAt"), + icon = o.optString("icon").ifEmpty { null }, iconLocked = o.optString("iconLocked").ifEmpty { null }, + ) + } + + companion object { + private const val TAG = "StoreAchievements" + var revision by androidx.compose.runtime.mutableIntStateOf(0) + private set + fun invalidate() { revision++ } + + private val all: List<StoreAchievements> by lazy { listOf(GogAchievements, EpicAchievements) } + + fun forSource(source: String?): StoreAchievements? = all.firstOrNull { it.source == source } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreArt.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreArt.kt index 4726c2db7b..4b2b0b8039 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreArt.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreArt.kt @@ -9,17 +9,9 @@ import java.io.File import java.net.HttpURLConnection import java.net.URL -/** - * The store's art, placed in the game's folder under the names AddedGameArt already looks for - - * `cover.jpg` (the portrait capsule), `hero.jpg` and `header.jpg` (the wide art) - so a store game - * shows real art in the Games tab and the session's shortcuts writer copies it into the client's - * grid. Each image is decoded and re-encoded as an opaque JPEG over a dark ground: a store's PNG - * with an alpha fade would otherwise end in white, which is what the washed-out cards were. - */ object StoreArt { private const val TAG = "StoreArt" - /** Fetches what the sidecar names; a missing or unreadable image is skipped, never an error. Blocking. */ fun fetchInto(folder: File, sidecar: StoreGameSidecar) { sidecar.cover?.let { place(it, File(folder, "cover.jpg")) } val wide = sidecar.hero ?: return diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreCatalog.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreCatalog.kt index c5c85378b4..049e2b926b 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreCatalog.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreCatalog.kt @@ -1,76 +1,48 @@ package com.droiddeck.launcher.stores -/** - * One title as the Stores page draws it, whichever store produced it: a card on a shelf, a tile - * in a grid, the hero of a game page. Library games and storefront results both project into - * this, so one card composable serves every tab. - */ data class CatalogItem( val store: Store, - /** Store-native id: GOG product id, Epic catalog item id (offer id for storefront results), Amazon product id. */ val id: String, val title: String, - /** Wide (16:9-ish) art for cards and heroes. */ val imageUrl: String?, - /** Tall (2:3) box art when the store publishes one; falls back to [imageUrl]. */ val tallImageUrl: String? = null, - /** Comma-joined genre / tag line. */ val tags: String = "", val isFree: Boolean = false, - /** False when the endpoint gave no price at all: the price row then draws nothing. */ val hasPrice: Boolean = false, - /** Pre-formatted by the store ("$9.99"). */ val finalPrice: String = "", val originalPrice: String = "", val discountPercent: Int = 0, - /** The web product page: where "Get for free" and "View on <store>" land. */ val storeUrl: String = "", val developer: String = "", + val publisher: String = "", val releaseDate: String = "", val description: String = "", - /** True for a title the signed-in account owns (a library entry). */ val owned: Boolean = false, - /** The install size in bytes when known, else 0. */ val sizeBytes: Long = 0L, - /** Per-store identifiers the install needs (Epic namespace / catalog id / app name, Amazon entitlement / sku). */ val extra: Map<String, String> = emptyMap(), - /** Rated or tagged for adults by the store's own data; hidden from the storefront unless Show mature content is on. */ val mature: Boolean = false, ) { val isDiscounted: Boolean get() = discountPercent > 0 && originalPrice.isNotBlank() - /** Stable key across stores ("gog:1207658924"). */ val key: String get() = "${store.id}:$id" } -/** A store's storefront shelves: what the Store tab shows above the account's own library. */ class StoreShelves( val whatsNew: List<CatalogItem> = emptyList(), val deals: List<CatalogItem> = emptyList(), val free: List<CatalogItem> = emptyList(), val trending: List<CatalogItem> = emptyList(), + val art: List<String> = emptyList(), ) { val isEmpty: Boolean get() = whatsNew.isEmpty() && deals.isEmpty() && free.isEmpty() && trending.isEmpty() val all: List<CatalogItem> get() = (whatsNew + deals + free + trending).distinctBy { it.id } } -/** A game a store installed, as found on disk through its sidecar. */ -/** Store tags that mark adult content, by slug or name, lowercased. */ private val MATURE_TAGS = setOf("mature", "nsfw", "adult", "adult only", "adults only", "nudity", "sexual content", "sexual-content") -/** Whether a store's own tags mark a title as adult. */ fun matureByTags(tags: Collection<String>): Boolean = tags.any { it.trim().lowercase() in MATURE_TAGS } -/** - * Whether a store's own age ratings mark a title as adult: ESRB M (17) or AO (18), PEGI / USK / the - * store's own rating 18, or any rating system's 17+. Ratings are ages, as GOG gives them. - */ fun matureByAge(ages: Collection<Int>): Boolean = ages.any { it >= 17 } -/** - * The Installed tab's cards for [store], from the installs on disk - the same source as its count: - * each joined to its library item by store id (by title when the ids differ), else a card made - * from the sidecar's own title and art, so an install shows even before the library has loaded. - */ fun installedCards(store: Store, installed: List<InstalledStoreGame>, library: List<CatalogItem>): List<CatalogItem> { val byId = library.associateBy { it.id } val byTitle = library.associateBy { it.title.lowercase() } @@ -81,11 +53,35 @@ fun installedCards(store: Store, installed: List<InstalledStoreGame>, library: L }.distinctBy { it.id }.sortedBy { it.title.lowercase() } } -/** - * A refreshed list with every unchanged item kept as the very object already shown, so a refresh - * that lands while the grid is on screen recomposes only the cards that changed - no reset, the - * scroll position and the pad's focus stay. - */ +private fun releaseDateValue(item: CatalogItem): Long = + item.releaseDate.take(10).takeIf { it.length == 10 }?.let { raw -> + runCatching { java.time.LocalDate.parse(raw).toEpochDay() }.getOrDefault(0L) + } ?: 0L + +fun sortCatalogItems( + items: List<CatalogItem>, + sort: String, + lastPlayed: (CatalogItem) -> Long = { 0L }, + installedAt: (CatalogItem) -> Long = { 0L }, + size: (CatalogItem) -> Long = { it.sizeBytes }, +): List<CatalogItem> = when (sort) { + "lastPlayed" -> items.sortedWith(compareByDescending(lastPlayed).thenBy { it.title.lowercase() }) + "recentlyInstalled" -> items.sortedWith(compareByDescending(installedAt).thenBy { it.title.lowercase() }) + "titleAsc" -> items.sortedBy { it.title.lowercase() } + "titleDesc" -> items.sortedByDescending { it.title.lowercase() } + "sizeDesc" -> items.sortedWith(compareByDescending(size).thenBy { it.title.lowercase() }) + "sizeAsc" -> items.sortedWith(compareBy<CatalogItem> { size(it).takeIf { b -> b > 0 } ?: Long.MAX_VALUE }.thenBy { it.title.lowercase() }) + "releaseDateDesc" -> items.sortedWith(compareByDescending(::releaseDateValue).thenBy { it.title.lowercase() }) + else -> items +} + +internal fun retainCatalogOrder(items: List<CatalogItem>, previous: List<CatalogItem>): List<CatalogItem> { + if (items.size != previous.size) return items + val byKey = items.associateBy { it.key } + if (previous.any { it.key !in byKey }) return items + return previous.map { byKey.getValue(it.key) } +} + fun mergeItems(old: List<CatalogItem>?, new: List<CatalogItem>): List<CatalogItem> { if (old.isNullOrEmpty()) return new val before = old.associateBy { it.key } @@ -102,12 +98,6 @@ private val HTML_TAG = Regex("<[^>]+>") private val ENTITY = Regex("&(#\\d+|#x[0-9a-fA-F]+|[a-zA-Z]+);") private val NAMED_ENTITIES = mapOf("amp" to "&", "lt" to "<", "gt" to ">", "quot" to "\"", "apos" to "'", "nbsp" to " ", "ndash" to "–", "mdash" to "—", "hellip" to "…", "trade" to "™", "reg" to "®", "copy" to "©") -/** - * Store copy as plain text: GOG's account endpoints return template keys - * (`product_description_2015545325`) for some products instead of words, and every store's - * descriptions carry HTML. Those keys go, tags go, entities are decoded, whitespace is collapsed; - * "" when nothing readable is left, so a page shows nothing rather than a placeholder. - */ fun cleanStoreText(raw: String?): String { if (raw.isNullOrBlank()) return "" var s = raw.replace(TEMPLATE_KEY, " ") @@ -123,7 +113,6 @@ fun cleanStoreText(raw: String?): String { return s.lines().map { it.replace(Regex("[ \\t\\u00A0]+"), " ").trim() }.filter { it.isNotEmpty() }.joinToString("\n") } -/** Human sizes the way the Downloads page and the cards print them ("810.2 MB", "3.9 GB"). */ fun formatBytes(bytes: Long): String = when { bytes >= 1_073_741_824L -> "%.1f GB".format(bytes / 1_073_741_824.0) bytes >= 1_048_576L -> "%.1f MB".format(bytes / 1_048_576.0) diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreExe.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreExe.kt index f1a97541b4..ad2d478c18 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreExe.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreExe.kt @@ -2,12 +2,6 @@ package com.droiddeck.launcher.stores import java.io.File -/** - * Which .exe in an install folder is the game. The store's own hint (a manifest's launch - * executable) wins when the file exists; else the candidates, helpers and installers left out, - * the one named most like the title first, then the shallowest. Relative to the folder, forward - * slashes; "" when the folder has none. - */ object StoreExe { private val SKIP = listOf("redist", "unins", "setup", "crash", "report", "helper", "dotnet", "vcredist", "directx", "eac", "easyanticheat", "battleye", "launcher", "updater", "config") diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreGameSidecar.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreGameSidecar.kt index 149f30fb31..25850f7479 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreGameSidecar.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreGameSidecar.kt @@ -1,28 +1,10 @@ package com.droiddeck.launcher.stores +import android.content.Context import org.json.JSONArray import org.json.JSONObject import java.io.File -/** - * What a store install leaves beside the game so the rest of the app can treat the folder like - * any added game: `.droiddeck-store.json` in the game's folder. - * - * [AddedGames.scanGame] reads it to pick the exe (instead of guessing from the folder), to name - * the shortcut after the store's title and to tag the game with its [store]. [launcher] is the - * small .bat the install writes when the game needs arguments or environment at launch (Epic's - * identity arguments, Amazon's FuelPump variables): a Steam shortcut can only carry a fixed Exe, - * so the launcher is what the shortcut runs and [exe] is what it starts. Every store install is a - * Steam shortcut; there is no switch for it (an `addToSteam` field in an older sidecar is ignored). - * - * Paths are relative to the game folder with forward slashes, so the folder can move between - * storage volumes and stay valid. - * - * An install writes the sidecar twice: at its start with [state] `installing` (store, id, title - - * no exe yet), and at its end with the exe, the launcher and `installed`. A folder whose sidecar - * still says `installing` is an unfinished install, never a game: the scan leaves it out and the - * Stores page offers to resume it. A sidecar without the field (an earlier build) is installed. - */ class StoreGameSidecar( val store: Store, val id: String, @@ -35,13 +17,11 @@ class StoreGameSidecar( val installedAt: Long = 0L, val cover: String? = null, val hero: String? = null, - /** Per-store identifiers the launcher needs again (Epic namespace / catalog id, Amazon entitlement). */ val extra: Map<String, String> = emptyMap(), val state: String = STATE_INSTALLED, - /** An Epic game's launch choices (the Games tab's Epic card); both launch paths read them from here. */ val epic: EpicOptions = EpicOptions(), - /** GOG / Epic cloud saves for this game: down before a launch, up after it (the game card's switch). */ val cloud: Boolean = true, + val achievements: Boolean = true, ) { val isInstalled: Boolean get() = state == STATE_INSTALLED @@ -52,8 +32,8 @@ class StoreGameSidecar( exe: String = this.exe, launcher: String? = this.launcher, args: List<String> = this.args, env: Map<String, String> = this.env, installVersion: String = this.installVersion, installedAt: Long = this.installedAt, cover: String? = this.cover, hero: String? = this.hero, - extra: Map<String, String> = this.extra, state: String = this.state, epic: EpicOptions = this.epic, cloud: Boolean = this.cloud, - ) = StoreGameSidecar(store, id, title, exe, launcher, args, env, installVersion, installedAt, cover, hero, extra, state, epic, cloud) + extra: Map<String, String> = this.extra, state: String = this.state, epic: EpicOptions = this.epic, cloud: Boolean = this.cloud, achievements: Boolean = this.achievements, + ) = StoreGameSidecar(store, id, title, exe, launcher, args, env, installVersion, installedAt, cover, hero, extra, state, epic, cloud, achievements) fun toJson(): JSONObject = JSONObject().apply { put("version", VERSION) @@ -64,6 +44,7 @@ class StoreGameSidecar( if (state != STATE_INSTALLED) put("state", state) if (store == Store.EPIC) put("epic", JSONObject().put("eos", epic.eos).put("offline", epic.offline)) if (store != Store.AMAZON) put("cloud", cloud) + if (store == Store.GOG) put("achievements", achievements) if (!launcher.isNullOrEmpty()) put("launcher", launcher) if (args.isNotEmpty()) put("args", JSONArray(args)) if (env.isNotEmpty()) put("env", JSONObject(env as Map<*, *>)) @@ -87,14 +68,15 @@ class StoreGameSidecar( const val VERSION = 1 const val STATE_INSTALLED = "installed" const val STATE_INSTALLING = "installing" + const val STATE_UPDATING = "updating" fun file(folder: File): File = File(folder, FILE_NAME) - /** - * Changes an Epic game's launch choices on disk: reads the sidecar fresh (never a copy held - * by a screen), applies [change], writes it, and reads it back. The written sidecar, or null - * when there is none or the write did not take. Blocking. - */ + fun find(context: Context, store: Store, id: String): StoreGameSidecar? = + StoreInstallRoot.gameFolders(context.applicationContext).asSequence() + .mapNotNull { read(it) } + .firstOrNull { it.store == store && it.id == id } + fun updateEpic(folder: File, change: (EpicOptions) -> EpicOptions): StoreGameSidecar? { val current = read(folder) ?: return null val next = current.copy(epic = change(current.epic)) @@ -102,21 +84,24 @@ class StoreGameSidecar( return read(folder)?.takeIf { it.epic == next.epic } } - /** As [updateEpic], for the cloud-saves switch. */ fun updateCloud(folder: File, on: Boolean): StoreGameSidecar? { val current = read(folder) ?: return null current.copy(cloud = on).write(folder) return read(folder)?.takeIf { it.cloud == on } } - /** The sidecar in [folder], or null when there is none or it cannot be read. */ + fun updateAchievements(folder: File, on: Boolean): StoreGameSidecar? { + val current = read(folder) ?: return null + current.copy(achievements = on).write(folder) + return read(folder)?.takeIf { it.achievements == on } + } + fun read(folder: File): StoreGameSidecar? { val f = file(folder) if (!f.isFile) return null return runCatching { parse(f.readText()) }.getOrNull() } - /** Pure parse; null for anything that is not a usable sidecar (so a scan falls back to guessing). */ fun parse(text: String): StoreGameSidecar? { val o = runCatching { JSONObject(text) }.getOrNull() ?: return null val store = Store.byId(o.optString("store")) ?: return null @@ -125,9 +110,7 @@ class StoreGameSidecar( val exe = o.optString("exe", "").replace('\\', '/') val state = o.optString("state", STATE_INSTALLED).ifEmpty { STATE_INSTALLED } if (id.isEmpty() || title.isEmpty()) return null - // An unfinished install has no exe yet; a finished one must name one. if (exe.isEmpty() && state == STATE_INSTALLED) return null - // A relative path only: a sidecar that points outside its folder is not trusted. if (exe.isNotEmpty() && !relativeInside(exe)) return null val launcher = o.optString("launcher", "").replace('\\', '/').takeIf { it.isNotEmpty() && relativeInside(it) } val args = o.optJSONArray("args")?.let { a -> List(a.length()) { a.optString(it) }.filter { it.isNotEmpty() } } ?: emptyList() @@ -143,23 +126,17 @@ class StoreGameSidecar( hero = o.optString("hero", "").ifEmpty { null }, extra = extra, state = state, - // An "overlay" (or "v") field from an earlier build is read past: there is no overlay. epic = o.optJSONObject("epic")?.let { e -> EpicOptions(eos = e.optBoolean("eos", true), offline = e.optBoolean("offline", false)) } ?: EpicOptions(), cloud = o.optBoolean("cloud", true), + achievements = o.optBoolean("achievements", true), ) } - /** Relative, no drive letter, no step up: an absolute or escaping path is refused, not trimmed into shape. */ private fun relativeInside(path: String): Boolean = path.isNotEmpty() && !path.startsWith("/") && !path.contains(":") && path.split('/').none { it == ".." || it.isEmpty() } } } -/** - * An Epic game's launch choices. [eos]: pass a fresh exchange code (Epic sign-in). [offline]: start - * with the Epic identity arguments only, no code - for a game that will not start when sign-in fails. - */ data class EpicOptions(val eos: Boolean = true, val offline: Boolean = false) { - /** Whether a launch asks for a code at all. */ val wantsCode: Boolean get() = eos && !offline } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreInstallRoot.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreInstallRoot.kt index 468f924198..611b7f3dba 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreInstallRoot.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreInstallRoot.kt @@ -8,52 +8,95 @@ import com.droiddeck.launcher.session.GameStorage import java.io.File import java.util.zip.CRC32 -/** - * Where store games are installed: `<root>/<Store>/<title>`. - * - * The default root is the app's own internal storage - the runtime's tree, where the folder sits at - * /root/Games/Stores and needs no bind - whatever the session's Game storage setting says. An SD - * card the app may write (its app folder, `GameStorage.options`) is offered as a second root at - * Install time and never chosen silently. Every root is scanned, so a game stays in the library - * wherever it went. A card that is the Steam library is already bound (`/mnt/droiddeck-sd`); any - * other card's root is bound at a fixed place of its own (`/mnt/droiddeck-stores/<volume>`), so a - * shortcut's path - and with it its appid - stays the same from one session to the next. - */ object StoreInstallRoot { + const val SPACE_UNKNOWN = -1L private const val INTERNAL = "root/Games/Stores" private const val ON_VOLUME = "Games" const val GUEST_EXTERNAL = "/mnt/droiddeck-stores" - /** One place a game can be installed: the folder, its name for the dialog, and whether it is a card. */ - class Target(val root: File, val label: String, val removable: Boolean) { - val freeBytes: Long get() = try { StatFs((if (root.isDirectory) root else root.parentFile ?: root).path).availableBytes } catch (e: Exception) { 0L } + class Target(val root: File, val label: String, val removable: Boolean, val folder: Boolean = false) { + val freeBytes: Long get() = availableBytes(root) + } + + data class StorageCheck( + val enough: Boolean, + val requiredBytes: Long, + val availableBytes: Long, + val errorMessage: String? = null + ) + + @JvmStatic + fun availableBytes(file: File): Long = probeAvailableBytes(file, { StatFs(it.path).availableBytes }, { it.usableSpace }) + + internal fun probeAvailableBytes(file: File, statBytes: (File) -> Long, usableBytes: (File) -> Long): Long { + var dir: File? = if (file.isDirectory) file else file.parentFile + if (dir == null) dir = file + while (dir != null && !dir.exists()) dir = dir.parentFile + val existing = dir ?: return SPACE_UNKNOWN + return try { + statBytes(existing).coerceAtLeast(SPACE_UNKNOWN) + } catch (e: Exception) { + StoresState.logLine("storage: StatFs failed for store install target (${e.javaClass.simpleName})") + try { + // File's zero also means an unavailable measurement; only StatFs establishes zero. + usableBytes(existing).takeIf { it > 0L } ?: SPACE_UNKNOWN + } catch (fallback: Exception) { + StoresState.logLine("storage: usable-space fallback failed for store install target (${fallback.javaClass.simpleName})") + SPACE_UNKNOWN + } + } + } + + @JvmStatic + fun insufficientSpace(required: Long, available: Long): Boolean = required > 0L && available >= 0L && available < required + + /** + * The catalog size is the known minimum for an install. Epic's actual chunk-cache requirement + * is determined from its manifest before chunk downloads begin. + */ + fun estimatedBytesNeeded(item: CatalogItem): Long = StoreSizes.size(item).coerceAtLeast(0L) + + /** Pre-install storage check to detect insufficient space before starting. */ + fun checkStorage(context: Context, item: CatalogItem, targetRoot: File): StorageCheck { + val size = estimatedBytesNeeded(item) + val existing = existingFolder(context, item.store, item.id, item.title) + val freeTarget = availableBytes(existing ?: targetRoot) + // Backends account for completed files on resume; the catalog cannot describe remaining work. + // Comparing the full catalog size to remaining free space would reject valid resumes. + if (item.store == Store.EPIC || existing != null) return StorageCheck(enough = true, requiredBytes = size, availableBytes = freeTarget) + if (size <= 0L) return StorageCheck(enough = true, requiredBytes = 0L, availableBytes = freeTarget) + if (insufficientSpace(size, freeTarget)) { + val msg = context.getString(com.droiddeck.launcher.R.string.stores_storage_insufficient, formatBytes(size), formatBytes(freeTarget)) + return StorageCheck(enough = false, requiredBytes = size, availableBytes = freeTarget, errorMessage = msg) + } + return StorageCheck(enough = true, requiredBytes = size, availableBytes = freeTarget) } - /** The internal root: always there, always the default. */ fun internalRoot(context: Context): File = File(LinuxRuntime.rootDir(context), INTERNAL) - /** The roots a game can go to right now: internal first, then every writable card. */ fun targets(context: Context): List<Target> { val internal = Target(internalRoot(context), context.getString(com.droiddeck.launcher.R.string.games_internal), removable = false) val cards = GameStorage.options(context).map { Target(File(it.path, ON_VOLUME), it.name, removable = true) } - return listOf(internal) + cards + val library = GameStorage.effective(context)?.let { lib -> + val root = File(lib.path, ON_VOLUME) + if (cards.any { it.root.absolutePath == root.absolutePath }) return@let null + val volume = runCatching { context.getSystemService(StorageManager::class.java)?.getStorageVolume(File(lib.path)) }.getOrNull() + val name = File(lib.path).name.ifBlank { lib.label } + val where = volume?.takeUnless { it.isPrimary }?.getDescription(context) + val label = if (where.isNullOrBlank()) name else context.getString(com.droiddeck.launcher.R.string.gstore_folder_on_volume, name, where) + Target(root, label, removable = true, folder = true) + } + return listOf(internal) + cards + listOfNotNull(library) } - /** The default root, when nothing asks: internal storage. */ fun installRoot(context: Context): File = internalRoot(context) - /** Every root that may hold store games: the internal one, every card's, and the Steam library's (older installs). */ fun roots(context: Context): List<File> { val cards = GameStorage.options(context).map { File(it.path, ON_VOLUME) } val library = GameStorage.effective(context)?.let { File(it.path, ON_VOLUME) } return (listOf(internalRoot(context)) + cards + listOfNotNull(library)).distinctBy { it.absolutePath } } - /** - * The card roots that need a bind of their own, with where the session sees them. A root under - * the Steam library is left out: the library's bind already covers it, and the games there keep - * the guest path (and appid) they were registered with. - */ fun externalRoots(context: Context): List<Pair<File, String>> { val library = GameStorage.effective(context)?.path return roots(context) @@ -61,7 +104,6 @@ object StoreInstallRoot { .map { it to guestFor(context, it) } } - /** A card root's guest path, keyed on the volume (its UUID, else a hash of the path), so it is the same across sessions. */ 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-]"), "") @@ -71,7 +113,6 @@ object StoreInstallRoot { fun isInternal(context: Context, root: File): Boolean = root.absolutePath == internalRoot(context).absolutePath - /** Where a host path under a card root appears inside the session, or null when it is not under one. */ fun externalGuestPath(context: Context, host: File): String? { val path = host.absolutePath for ((root, guest) in externalRoots(context)) { @@ -82,7 +123,6 @@ object StoreInstallRoot { return null } - /** The target a game folder sits under, for the page and the Downloads row; internal when unknown. */ fun labelFor(context: Context, folder: File): String { val path = folder.absolutePath for (t in targets(context)) if (path.startsWith(t.root.absolutePath + "/")) return t.label @@ -93,23 +133,15 @@ object StoreInstallRoot { fun storeDir(root: File, store: Store): File = File(root, store.shortLabel) - /** The game folders under every root, by store: what AddedGames scans in addition to the user's folders. */ fun gameFolders(context: Context): List<File> = roots(context).flatMap { root -> Store.entries.flatMap { store -> storeDir(root, store).listFiles { f -> f.isDirectory }?.sortedBy { it.name.lowercase() } ?: emptyList() } } - /** - * The folder a game installs into under [root]. An existing folder wins over a fresh one, so a - * repair, an update or a resume lands on what is already there: one with this game's sidecar - * anywhere, else one under any root with this game's folder name and no finished sidecar (an - * install an earlier build left without one, or that stopped before writing it). - */ fun folderFor(context: Context, store: Store, id: String, title: String, root: File = installRoot(context)): File = existingFolder(context, store, id, title) ?: File(storeDir(root, store), folderName(title, id)) - /** The folder an earlier install of this game left, finished or not; null when there is none. */ fun existingFolder(context: Context, store: Store, id: String, title: String): File? { val all = roots(context).flatMap { r -> storeDir(r, store).listFiles { f -> f.isDirectory }?.toList().orEmpty() } all.firstOrNull { folder -> StoreGameSidecar.read(folder)?.let { it.store == store && it.id == id } == true }?.let { return it } @@ -117,17 +149,10 @@ object StoreInstallRoot { return all.firstOrNull { it.name == name && StoreGameSidecar.read(it)?.isInstalled != true } } - /** An unfinished install: [id] from its `installing` sidecar, null when it has none (matched by folder name then). */ class Unfinished(val store: Store, val id: String?, val folder: File) - /** - * A folder under a store root is a game only once its sidecar says installed. Without one it is - * an install that never finished (stopped, killed, or from a build that wrote the sidecar last): - * not a Custom game, and not listed in Steam. - */ fun isFinished(folder: File): Boolean = StoreGameSidecar.read(folder)?.isInstalled == true - /** Every unfinished install under every root, for the Stores page's "Resume install". */ fun unfinished(context: Context): List<Unfinished> = roots(context).flatMap { root -> Store.entries.flatMap { store -> storeDir(root, store).listFiles { f -> f.isDirectory }.orEmpty().mapNotNull { folder -> @@ -141,15 +166,9 @@ object StoreInstallRoot { } } - /** A scratch folder in the app's cache for an install's in-flight pieces, when the install itself is on a card. */ fun scratchDir(context: Context, store: Store, id: String): File = File(File(File(context.cacheDir, "stores"), store.id), id.replace(Regex("[^A-Za-z0-9._-]"), "_")) - /** - * A folder name from a store title: letters, digits and a few safe marks, single spaces, at most - * 60 characters; the store id when nothing printable is left. The name is the shortcut's folder - * for ever, so it is chosen once at install and read back from the sidecar afterwards. - */ fun folderName(title: String, id: String): String { val cleaned = title.replace(Regex("[^A-Za-z0-9 ._'()\\-]"), " ").replace(Regex("\\s+"), " ").trim().trimEnd('.') val cut = if (cleaned.length > 60) cleaned.take(60).trimEnd().trimEnd('.') else cleaned diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreInstalls.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreInstalls.kt index 966e1fdfb7..9b3f7136d6 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreInstalls.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreInstalls.kt @@ -1,107 +1,98 @@ package com.droiddeck.launcher.stores +import com.droiddeck.launcher.session.SessionPrefs import android.content.Context import android.util.Log import com.droiddeck.launcher.frontend.AddedGames import com.droiddeck.launcher.frontend.LibraryCache import com.droiddeck.launcher.frontend.Library import java.io.File +import java.nio.file.Files +import java.nio.file.StandardCopyOption -/** - * What happens around a store install so the rest of the app sees the game: the sidecar is - * written, the launcher .bat beside it when the game needs one, and Steam is told. - * - * Telling Steam is the same path an added folder takes: the game is one more folder the - * [AddedGames] scan finds, the scan's listing (`session/added-games.json`) is what the runtime's - * shortcuts writer reads at the client's next start, and here the listing is rewritten at once so - * a Steam client that restarts inside the running session already has it. When the client is up, - * [SteamLiveShortcuts] adds the shortcut over the client's DevTools port as well, so the game shows - * without a restart; that part is best-effort. - */ object StoreInstalls { private const val TAG = "StoreInstalls" - /** - * Marks [folder] as an install under way before anything is fetched: a sidecar in state - * `installing` with the store, id and title. Whatever stops the install from here on - a - * failure, a cancel, the process killed - leaves a folder the scan skips and the Stores page - * offers to resume, never a half-written Custom game. A finished install being repaired or - * updated keeps its finished sidecar, so the game stays in Steam meanwhile. - */ fun begin(folder: File, store: Store, id: String, title: String, cover: String?, hero: String?) { - if (StoreGameSidecar.read(folder)?.isInstalled == true) return + val before = StoreGameSidecar.read(folder) + if (before?.isInstalled == true || before?.state == StoreGameSidecar.STATE_UPDATING) return StoreGameSidecar(store, id, title, exe = "", cover = cover, hero = hero, state = StoreGameSidecar.STATE_INSTALLING).write(folder) } - /** - * Finishes an install: writes the launcher and the finished sidecar, then the art, then - * registers the game. Runs on the caller's worker thread. The launcher and sidecar writes - * throw, so a failure there fails the download with its message; the art and the Steam side - * are best-effort and only logged. - */ + /** Epic commits verified files individually, not a whole-game transaction. Keep updates resumable. */ + @JvmStatic + fun markUpdating(folder: File) { + val before = StoreGameSidecar.read(folder) ?: return + if (!before.isInstalled) return + val stage = File.createTempFile(".droiddeck-update-", ".stage", folder) + try { + java.io.FileOutputStream(stage).use { + it.write(before.copy(state = StoreGameSidecar.STATE_UPDATING, installVersion = "").toJson().toString(2).toByteArray(Charsets.UTF_8)) + it.fd.sync() + } + Files.move(stage.toPath(), StoreGameSidecar.file(folder).toPath(), StandardCopyOption.ATOMIC_MOVE, StandardCopyOption.REPLACE_EXISTING) + } finally { + stage.delete() + } + } + fun complete(context: Context, folder: File, sidecar: StoreGameSidecar, onStep: ((Int, Int) -> Unit)? = null) { val app = context.applicationContext onStep?.invoke(0, STEPS) - // The user's launch choices survive an update or a repair. val before = StoreGameSidecar.read(folder) - val finished = StoreLaunch.writeLauncher(folder, sidecar.copy(state = StoreGameSidecar.STATE_INSTALLED, epic = before?.epic ?: sidecar.epic, cloud = before?.cloud ?: sidecar.cloud)) + val finished = StoreLaunch.writeLauncher(folder, sidecar.copy(state = StoreGameSidecar.STATE_INSTALLED, epic = before?.epic ?: sidecar.epic, cloud = before?.cloud ?: sidecar.cloud, achievements = before?.achievements ?: sidecar.achievements)) finished.write(folder) if (StoreGameSidecar.read(folder)?.isInstalled != true) throw java.io.IOException("the install record could not be written in ${folder.name}") onStep?.invoke(1, STEPS) - // The art before the listing, so the listing already carries it for the client's grid. try { StoreArt.fetchInto(folder, finished) } catch (e: Exception) { Log.w(TAG, "art for ${folder.name}: ${e.message}") } onStep?.invoke(2, STEPS) register(app) - // Its Windows components from the store's list (GOG's dependencies, Epic's prerequisite, - // Amazon's install steps), on a thread of their own. AddedGames.single(app, folder.path)?.let { com.droiddeck.launcher.frontend.AutoComponents.refreshLater(app, Library.addedGame(app, it)) } onStep?.invoke(STEPS, STEPS) } - /** The finishing steps [complete] reports: the record and launcher, the art, Steam. */ private const val STEPS = 3 - /** Rewrites the session's listing from a fresh scan and, with a client running, adds live. */ fun register(context: Context) { val app = context.applicationContext try { val games = AddedGames.scan(app) AddedGames.writeListing(app, games) - LibraryCache.save(app, Library.launchableGames(app, added = games)) + val arch = SessionPrefs.activeSteamClientArch(app) + LibraryCache.save(app, Library.launchableGames(app, added = games, arch = arch), arch == "x86_64") SteamLiveShortcuts.sync(app, games) } catch (e: Exception) { Log.w(TAG, "registration: ${e.message}") } + com.droiddeck.launcher.stores.epic.EpicClient.libraryChanged(app) } - /** - * Removes a store game: its folder with the sidecar, then the shortcut (the listing without - * it makes the writer drop the entry; the live client is asked too). Blocking. - */ - fun uninstall(context: Context, game: InstalledStoreGame) { + fun uninstall(context: Context, game: InstalledStoreGame, progress: (Float) -> Unit = {}, removed: () -> Unit = {}) { val app = context.applicationContext - val appId = AddedGames.scan(app).firstOrNull { it.folder.absolutePath == game.folder.absolutePath }?.appId + val appId = SessionPrefs.addedGameStoredAppId(app, game.folder.path) + val files = game.folder.walkBottomUp().toList() + val step = (files.size / 100).coerceAtLeast(1) + files.forEachIndexed { i, f -> + f.delete() + if (i % step == 0) progress((i + 1).toFloat() / files.size) + } deleteTree(game.folder) - // The scratch cache an install on a card may have left in the app's cache. + progress(1f) deleteTree(StoreInstallRoot.scratchDir(app, game.sidecar.store, game.sidecar.id)) + removed() register(app) if (appId != null) SteamLiveShortcuts.remove(app, appId) StoresState.logLine("uninstalled \"${game.sidecar.title}\"") } - /** - * What Cancel does: everything the install wrote goes - the game folder with its sidecar and - * the caches in [caches] - unless the folder holds a finished install being repaired or updated; - * then only the caches go and the working game stays. Off the caller's thread; the library - * follows when it is done, so the game reads Install again. - */ fun discard(context: Context, folder: File, caches: List<File>) { val app = context.applicationContext Thread({ - val keep = StoreGameSidecar.read(folder)?.isInstalled == true + val sidecar = StoreGameSidecar.read(folder) + val keep = sidecar?.isInstalled == true || sidecar?.state == StoreGameSidecar.STATE_UPDATING caches.forEach { deleteTree(it) } if (!keep) deleteTree(folder) - StoresState.logLine(if (keep) "removed the partial update of ${folder.name}" else "removed ${folder.name}") + StoresState.logLine(if (keep) "removed update caches for ${folder.name}; verified file swaps are retained" else "removed ${folder.name}") StoresState.notifyLibraryChanged(app) }, "store-cancel-clean").start() } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreLaunch.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreLaunch.kt index 4977baefcf..4486df81e1 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreLaunch.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreLaunch.kt @@ -5,27 +5,12 @@ import android.util.Log import com.droiddeck.launcher.frontend.Library import java.io.File -/** - * How a store game is started inside the session. The shortcut Steam gets can only name an exe, - * so when a game needs arguments or environment the install writes a small `.droiddeck-launch.bat` - * beside it and the shortcut runs that: Proton's steam.exe shim hands a .bat to Wine's cmd, the - * script sets the variables, steps into the exe's folder and starts it, and waits for it as a - * batch file does, so Steam sees the game running. - * - * Epic's online sign-in is a fresh exchange code per launch (it expires in minutes), which no fixed - * command line can carry: [prepare] mints one right before a launch and leaves it in - * `.droiddeck-epic-code`; the script reads the file, deletes it and passes the AUTH arguments. With - * no file the game starts in its offline identity mode, which most EOS titles accept. - */ object StoreLaunch { private const val TAG = "StoreLaunch" const val LAUNCHER = ".droiddeck-launch.bat" const val EPIC_CODE = ".droiddeck-epic-code" + const val EPIC_ARGS = ".droiddeck-epic-args" - /** - * Writes the launcher for [sidecar] when it needs one (arguments, environment, or an Epic - * sign-in), removes a stale one otherwise, and returns the sidecar with [StoreGameSidecar.launcher] set. - */ fun writeLauncher(folder: File, sidecar: StoreGameSidecar): StoreGameSidecar { val needs = sidecar.args.isNotEmpty() || sidecar.env.isNotEmpty() || sidecar.store == Store.EPIC val file = File(folder, LAUNCHER) @@ -34,7 +19,6 @@ object StoreLaunch { return sidecar.copy(launcher = LAUNCHER) } - /** The batch file's text; pure, so it can be checked without a folder. CRLF line ends, as cmd expects. */ fun launcherText(sidecar: StoreGameSidecar): String { val exe = sidecar.exe.replace('/', '\\') val dir = exe.substringBeforeLast('\\', "") @@ -47,9 +31,7 @@ object StoreLaunch { val args = sidecar.args.joinToString(" ") { quoteArg(it) } val run = "\"%~dp0$exe\"" + (if (args.isNotEmpty()) " $args" else "") if (sidecar.store == Store.EPIC) { - // The one-shot code reaches the game on its command line only. cmd expands %DD_X% when it - // parses the last line, so the variable is cleared on that same line before the game - // starts: nothing of it is left in the environment the game inherits (and dumps). + lines += "if exist \"%~dp0$EPIC_ARGS\" goto client" lines += "set \"$CODE_VAR=\"" lines += "if exist \"%~dp0$EPIC_CODE\" set /p $CODE_VAR=<\"%~dp0$EPIC_CODE\"" lines += "if exist \"%~dp0$EPIC_CODE\" del \"%~dp0$EPIC_CODE\"" @@ -58,6 +40,13 @@ object StoreLaunch { lines += "goto :eof" lines += ":signed" lines += "set \"$CODE_VAR=\" & $run -AUTH_LOGIN=unused -AUTH_PASSWORD=%$CODE_VAR% -AUTH_TYPE=exchangecode" + lines += "goto :eof" + lines += ":client" + lines += "set \"$CLIENT_VAR=\"" + lines += "set /p $CLIENT_VAR=<\"%~dp0$EPIC_ARGS\"" + lines += "del \"%~dp0$EPIC_ARGS\"" + lines += "if exist \"%~dp0$EPIC_CODE\" del \"%~dp0$EPIC_CODE\"" + lines += "set \"$CLIENT_VAR=\" & \"%~dp0$exe\" %$CLIENT_VAR%" } else { lines += run } @@ -66,24 +55,14 @@ object StoreLaunch { private val ENV_NAME = Regex("[A-Za-z_][A-Za-z0-9_]*") - /** An argument on cmd's line: quoted when it has a space and is not already quoted; control characters dropped. */ fun quoteArg(arg: String): String { val clean = arg.filter { it >= ' ' && it != '\u007f' } return if (' ' in clean && !clean.contains('"')) "\"$clean\"" else clean } - /** - * Everything a launch needs done first, then [onReady] on the main thread: for an Epic game a - * fresh exchange code written beside its launcher (a few seconds at most; the launch goes - * ahead without one when the store cannot be reached). Other stores need nothing. - */ - /** The launcher's variable for the one-shot code; a plain name, cleared before the game starts. */ private const val CODE_VAR = "DD_X" + private const val CLIENT_VAR = "DD_A" - /** - * Rewrites a game's launcher when its text is not what this build writes - an install from an - * earlier build keeps its old .bat otherwise. Called before every Epic launch. - */ fun refreshLauncher(folder: File, sidecar: StoreGameSidecar) { if (sidecar.launcher != LAUNCHER) return val file = File(folder, LAUNCHER) @@ -103,16 +82,8 @@ object StoreLaunch { }, "stores-launch-prep").start() } - /** What [epicCode] did, for the guest's request and the log: whether a code was written, and why not. */ class CodeResult(val written: Boolean, val reason: String) - /** - * Mints an Epic exchange code for the installed game [id] and writes it as [EPIC_CODE] into the - * very folder its sidecar and launcher are in, where the launcher .bat reads and deletes it. - * Blocking (network). Logs `epic launch id=<id> code=yes|no reason=...` - never the code. Every - * launch path comes here: the Games tab and Stores before they launch, and the compat tool for - * any launch, the Steam client's own Play button included ([StoreLaunchRequests]). - */ fun epicCode(context: Context, id: String): CodeResult { val app = context.applicationContext val result = try { @@ -152,9 +123,7 @@ object StoreLaunch { } } -/** What the Epic backend adds for launches: a short-lived exchange code for the signed-in account. */ interface EpicLaunchSupport { fun exchangeCode(context: Context): String? - /** True when the stored sign-in can no longer be refreshed: the user has to sign in again. */ fun signInExpired(context: Context): Boolean } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreLaunchRequests.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreLaunchRequests.kt index ee8c623627..4005ff2b3b 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreLaunchRequests.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreLaunchRequests.kt @@ -7,27 +7,22 @@ import com.droiddeck.launcher.runtime.LinuxRuntime import java.io.File import org.json.JSONObject -/** - * The app's half of droiddeck-store-launch: the compat tool asks, before Proton starts a store - * game, for what the store needs at launch, through files under the session root's `stores/` - * (`req/<id>.json` in, `resp/<id>.json` out, both written tmp + rename). Today that is an Epic - * game's exchange code, which [StoreLaunch.epicCode] writes into the game's own folder; the answer - * says only whether it did and why not. Watched while a session runs. - */ object StoreLaunchRequests { private const val TAG = "StoreLaunchRequests" private val lock = Any() private var observer: FileObserver? = null + @Volatile var lastLaunched: Pair<Store, String>? = null + fun dir(context: Context) = File(LinuxRuntime.sessionRoot(context), "stores") - /** Before each session: nothing of the last one's requests; then watch for new ones. */ fun start(context: Context) { val app = context.applicationContext synchronized(lock) { observer?.stopWatching() val root = dir(app) root.deleteRecursively() + lastLaunched = null val req = File(root, "req").apply { mkdirs() } File(root, "resp").mkdirs() @Suppress("DEPRECATION") @@ -52,25 +47,26 @@ object StoreLaunchRequests { val request = try { JSONObject(file.readText()).also { file.delete() } } catch (e: Exception) { - return // withdrawn already, or not complete yet (the rename brings it again) + return } val reply = when (request.optString("op")) { + "gog-achievements" -> runCatching { com.droiddeck.launcher.stores.gog.GogComet.prepare(app, request.optString("id")) } + .getOrElse { JSONObject().put("ok", false).put("ready", false).put("reason", "service-unavailable") } "epic-code" -> { val id = request.optString("id") if (id.isEmpty()) JSONObject().put("ok", false).put("reason", "no-id") else { + lastLaunched = Store.EPIC to id val code = StoreLaunch.epicCode(app, id) JSONObject().put("ok", true).put("code", code.written).put("reason", code.reason) } } - // Cloud saves: down before Proton starts (the wrapper waits a bounded time), up after the - // game exits (answered at once; the upload runs on without holding Steam). "cloud-down" -> { val store = Store.byId(request.optString("store")) val id = request.optString("id") if (store == null || id.isEmpty()) JSONObject().put("ok", false).put("reason", "no-game") else { - // Marked before the game runs: whatever ends it, an upload follows (CloudSaves.uploadDirty). + lastLaunched = store to id CloudSaves.markDirty(app, store, id) CloudSaves.downloadOrDefer(app, store, id).let { JSONObject().put("ok", it.ok).put("result", it.result).put("files", it.files).put("reason", it.reason) } } @@ -81,8 +77,6 @@ object StoreLaunchRequests { if (store != null && id.isNotEmpty()) Thread({ CloudSaves.uploadDirty(app, store, id, "exit") }, "cloud-up").start() JSONObject().put("ok", true) } - // A browser a game opens inside the session (an EOS device sign-in, a store page): - // http(s) only, handed to Android's browser. "open-url" -> { val url = request.optString("url") if (!(url.startsWith("https://") || url.startsWith("http://"))) JSONObject().put("ok", false).put("reason", "not-http") @@ -94,6 +88,41 @@ object StoreLaunchRequests { JSONObject().put("ok", false).put("reason", e.javaClass.simpleName) } } + "epic-sign-in" -> { + val url = request.optString("url") + try { + if (com.droiddeck.launcher.stores.epic.EpicClient.signIn(app, url, request.optBoolean("auto"))) JSONObject().put("ok", true) + else JSONObject().put("ok", false).put("reason", "not-sign-in") + } catch (e: Exception) { + JSONObject().put("ok", false).put("reason", e.javaClass.simpleName) + } + } + "epic-play-in-steam" -> { + val id = request.optString("id") + if (id.isEmpty()) JSONObject().put("ok", false).put("reason", "no-id") + else try { + com.droiddeck.launcher.stores.epic.EpicClient.playInSteam(app, id) + } catch (e: Exception) { + JSONObject().put("ok", false).put("reason", e.javaClass.simpleName) + } + } + "steam-run" -> try { + com.droiddeck.launcher.stores.epic.EpicClient.runSteamGame(app, request.optString("id")) + } catch (e: Exception) { + JSONObject().put("ok", false).put("reason", e.javaClass.simpleName) + } + "epic-signed-out" -> { + val signedIn = com.droiddeck.launcher.stores.epic.EpicCredentialStore.isLoggedIn(app) + if (signedIn) { + Log.i(TAG, "the Epic Games Launcher was signed out; signing the Epic store out too") + StoresState.signOut(app, Store.EPIC) + } + JSONObject().put("ok", true).put("signedOut", signedIn) + } + "epic-client-handoff" -> { + if (com.droiddeck.launcher.stores.epic.EpicClient.canHandOff(app)) JSONObject().put("ok", true) + else JSONObject().put("ok", false).put("reason", "no-account") + } else -> JSONObject().put("ok", false).put("reason", "unknown-op") } try { diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreLogFiles.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreLogFiles.kt index eb4a14fc2c..0af6590120 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreLogFiles.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreLogFiles.kt @@ -8,13 +8,6 @@ import java.util.Date import java.util.Locale import java.util.concurrent.Executors -/** - * The stores' log on disk, app-private: `filesDir/logs/stores/stores-<yyyy-MM-dd>.log` (beside the - * session folders, where every log lives), one file a - * day, the last [KEEP_DAYS] kept, each capped near [MAX_BYTES] (the full one moves to `.1`). Lines - * arrive already redacted ([StoreLog.redactLine]). Written on one background thread, in order. The - * session's Share logs zip carries these files, so they can be attached to a report when asked. - */ object StoreLogFiles { private const val TAG = "StoreLogFiles" private const val KEEP_DAYS = 7 @@ -31,10 +24,6 @@ object StoreLogFiles { Thread({ android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND); r.run() }, "store-log-flush").apply { isDaemon = true } } - /** - * Queues one stamped line for today's file. Any thread; nothing touches the disk here. Lines are - * written in batches, at most every half second, on [writer] in order. - */ fun append(context: Context, line: String) { val app = context.applicationContext pending.add(line) @@ -61,7 +50,6 @@ object StoreLogFiles { } } - /** Drops the files older than [KEEP_DAYS] days. Called as the app starts. */ fun prune(context: Context) { val app = context.applicationContext writer.execute { @@ -73,7 +61,6 @@ object StoreLogFiles { } } - /** The files there are, oldest first, for a log share. */ fun files(context: Context): List<File> = dir(context).listFiles { f -> f.isFile && NAME.matches(f.name) }?.sortedBy { it.name }.orEmpty() } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreLoginActivity.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreLoginActivity.kt index 277d42bb59..2416358432 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreLoginActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreLoginActivity.kt @@ -1,6 +1,7 @@ package com.droiddeck.launcher.stores import android.annotation.SuppressLint +import android.content.res.Configuration import android.graphics.Color import android.net.Uri import android.net.http.SslError @@ -31,28 +32,14 @@ import com.droiddeck.launcher.R import com.droiddeck.launcher.stores.gog.GogAuth import java.util.concurrent.atomic.AtomicBoolean -/** - * A store's own sign-in page in a WebView, one activity for the three stores: GOG's OAuth page - * (the token comes back in the redirect's fragment), Epic's web login (an authorization code on - * a JSON page), Amazon's device sign-in (a PKCE code on the return URL). Plain views, as the - * proven GOG flow was: the page is rendered with the store's own client identity, and a social - * sign-in hop to Google / Facebook / Apple runs under a real browser identity in a popup, since - * those providers refuse an embedded browser. - * - * Nothing from the page is logged but redacted URLs and key names; the tokens go straight to - * StoreAccounts' private file and the activity finishes. - */ class StoreLoginActivity : ComponentActivity() { companion object { private const val TAG = "StoreLogin" const val EXTRA_STORE = "store" + const val EXTRA_CLIENT_URL = "client_url" private const val KEY_STATE = "oauth_state" - /** - * The colour the Stores page flooded to before opening this page, read once: the page opens - * on it, with no window animation, and its chrome rises in, as a session opens on Play's blue. - */ @Volatile internal var floodColor: Int? = null - private const val CHROME_UA = "Mozilla/5.0 (Linux; Android 14; SM-S918B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.103 Mobile Safari/537.36" + internal const val CHROME_UA = "Mozilla/5.0 (Linux; Android 14; SM-S918B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.103 Mobile Safari/537.36" fun generateState(): String { val bytes = ByteArray(24) @@ -61,19 +48,16 @@ class StoreLoginActivity : ComponentActivity() { } } - /** What one store's flow decides: the page to open, the identity to open it with, and the redirect that ends it. */ internal interface Flow { val startUrl: String val userAgent: String - /** True when [url] is the flow's end; the activity then calls [finish]. */ fun isRedirect(url: String): Boolean - /** Runs off the main thread with the redirect; returns null on success, else a message to show. */ fun finish(activity: StoreLoginActivity, view: WebView, url: String): String? - /** Whether a JSON page at the redirect must be read out of the document instead of the URL (Epic). */ val readsPage: Boolean get() = false } private var store: Store? = null + private var clientUrl: String? = null private var flow: Flow? = null private var webViewRef: WebView? = null private var popupWebView: WebView? = null @@ -83,9 +67,12 @@ class StoreLoginActivity : ComponentActivity() { private lateinit var errorPanel: LinearLayout private lateinit var errorText: TextView private lateinit var titleText: TextView + private lateinit var topBar: LinearLayout + private lateinit var reloadButton: ImageButton + private lateinit var closeButton: ImageButton + private lateinit var retryButton: Button private var oauthState: String? = null private val captured = AtomicBoolean(false) - /** Opened behind a flood: it opens and closes with no window animation. */ private var flooded = false private fun dp(value: Int): Int = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, value.toFloat(), resources.displayMetrics).toInt() @@ -93,8 +80,9 @@ class StoreLoginActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) store = Store.byId(intent.getStringExtra(EXTRA_STORE)) + clientUrl = intent.getStringExtra(EXTRA_CLIENT_URL)?.takeIf { store == Store.EPIC } oauthState = savedInstanceState?.getString(KEY_STATE) ?: generateState() - flow = store?.let { LoginFlows.forStore(it, oauthState!!) } + flow = newFlow(oauthState!!) floodColor?.let { c -> floodColor = null flooded = true @@ -124,9 +112,14 @@ class StoreLoginActivity : ComponentActivity() { webView.loadUrl(flow!!.startUrl) } + private fun newFlow(state: String): Flow? { + val url = clientUrl + if (url != null) return com.droiddeck.launcher.stores.epic.EpicClient.loginFlow(url) + return store?.let { LoginFlows.forStore(it, state) } + } + override fun finish() { super.finish() - // Back to the Stores page, which is still covered in the flood and drains it from there. @Suppress("DEPRECATION") if (flooded) overridePendingTransition(0, 0) } @@ -151,6 +144,7 @@ class StoreLoginActivity : ComponentActivity() { contentDescription = getString(R.string.stores_login_close); layoutParams = LinearLayout.LayoutParams(dp(48), dp(48)) setOnClickListener { finish() } } + topBar = bar; reloadButton = reload; closeButton = close bar.addView(titleText); bar.addView(reload); bar.addView(close) progressBar = ProgressBar(this, null, android.R.attr.progressBarStyleHorizontal).apply { max = 100; isIndeterminate = false @@ -165,6 +159,7 @@ class StoreLoginActivity : ComponentActivity() { } errorText = TextView(this).apply { setTextColor(0xFFF2F4F7.toInt()); textSize = 15f; gravity = Gravity.CENTER } val retry = Button(this).apply { text = getString(R.string.stores_login_retry); setOnClickListener { reloadLogin() } } + retryButton = retry errorPanel.addView(errorText) errorPanel.addView(retry, LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT).apply { topMargin = dp(16) }) contentHost.addView(errorPanel, FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)) @@ -172,6 +167,24 @@ class StoreLoginActivity : ComponentActivity() { return root } + /** + * The activity handles density changes itself so that folding between two displays of different + * density keeps the page and the sign-in in progress; the dp-based chrome sizes are applied again. + */ + override fun onConfigurationChanged(newConfig: Configuration) { + super.onConfigurationChanged(newConfig) + if (!::topBar.isInitialized) return + topBar.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, dp(48)) + titleText.setPadding(dp(16), 0, dp(8), 0) + titleText.textSize = 16f + errorText.textSize = 15f + reloadButton.layoutParams = LinearLayout.LayoutParams(dp(48), dp(48)) + closeButton.layoutParams = LinearLayout.LayoutParams(dp(48), dp(48)) + progressBar.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, dp(3)) + errorPanel.setPadding(dp(24), dp(24), dp(24), dp(24)) + retryButton.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT).apply { topMargin = dp(16) } + } + private fun showError(message: String) { runOnUiThread { errorText.text = message; errorPanel.visibility = View.VISIBLE; errorPanel.bringToFront(); progressBar.visibility = View.GONE } } @@ -183,7 +196,7 @@ class StoreLoginActivity : ComponentActivity() { captured.set(false) val fresh = generateState() oauthState = fresh - flow = store?.let { LoginFlows.forStore(it, fresh) } ?: return + flow = newFlow(fresh) ?: return webViewRef?.let { it.settings.userAgentString = flow!!.userAgent; it.loadUrl(flow!!.startUrl) } } @@ -192,8 +205,10 @@ class StoreLoginActivity : ComponentActivity() { setBackgroundColor(0xFF0A0B0D.toInt()) settings.javaScriptEnabled = true settings.domStorageEnabled = true + // Store sign-in pages are web pages; they never need to read local files or content:// URIs. + settings.allowFileAccess = false + settings.allowContentAccess = false settings.userAgentString = userAgent - // The stores' social-login buttons are window.open() popups; without these the call is dropped silently. settings.setSupportMultipleWindows(true) settings.javaScriptCanOpenWindowsAutomatically = true if (isPopup) CookieManager.getInstance().setAcceptThirdPartyCookies(this, true) @@ -224,7 +239,6 @@ class StoreLoginActivity : ComponentActivity() { override fun onCloseWindow(window: WebView?) { if (isPopup || window === popupWebView) dismissPopup() } } - /** Deferred: destroying a WebView from inside one of its own callbacks crashes chromium. */ private fun dismissPopup() { val child = popupWebView ?: return popupWebView = null @@ -243,12 +257,10 @@ class StoreLoginActivity : ComponentActivity() { private inner class Client(private val isPopup: Boolean) : WebViewClient() { override fun onPageStarted(view: WebView?, url: String?, favicon: android.graphics.Bitmap?) { Log.d(TAG, "page[popup=$isPopup]: ${StoreLog.redactUrl(url)}") - // Amazon's return URL lands as a page load rather than a navigation we can intercept. if (url != null && view != null && flow?.isRedirect(url) == true && flow?.readsPage != true) complete(view, url) } override fun onPageFinished(view: WebView?, url: String?) { - // Epic's redirect is a JSON page: the code is in the document, read once it is loaded. if (url != null && view != null && flow?.readsPage == true && flow?.isRedirect(url) == true) complete(view, url) } @@ -277,9 +289,6 @@ class StoreLoginActivity : ComponentActivity() { val f = flow ?: return false val url = uri.toString() if (f.isRedirect(url) && !f.readsPage) { complete(view, url); return true } - // A social sign-in hop that stays in the main view: the provider gets a browser identity, - // and the store gets its own identity back afterwards (a plain Chrome UA makes GOG's - // page serve a form that never renders in a WebView). if (!isPopup && store == Store.GOG) { if (GogAuth.isGogHost(uri.host) && view.settings.userAgentString != f.userAgent) { view.settings.userAgentString = f.userAgent; return false } if (GogAuth.isIdentityProviderHost(uri.host) && view.settings.userAgentString != CHROME_UA) { @@ -303,7 +312,6 @@ class StoreLoginActivity : ComponentActivity() { if (!f.readsPage) view.stopLoading() } if (f.readsPage) { - // The document's text, then the exchange off the main thread. view.evaluateJavascript("(function(){ try { return document.body.innerText; } catch(e){ return ''; } })()") { json -> Thread({ settle(f.finish(this, view, json ?: "")) }, "store-login").start() } @@ -324,6 +332,16 @@ class StoreLoginActivity : ComponentActivity() { oauthState?.let { outState.putString(KEY_STATE, it) } } + override fun onStart() { + super.onStart() + if (clientUrl != null && !isFinishing) com.droiddeck.launcher.session.SessionService.holdForSignIn(this, true) + } + + override fun onStop() { + if (clientUrl != null && !isChangingConfigurations) com.droiddeck.launcher.session.SessionService.holdForSignIn(this, false) + super.onStop() + } + override fun onDestroy() { popupWebView?.let { popupWebView = null; destroyPopupView(it) } webViewRef?.let { it.webChromeClient = null; (it.parent as? ViewGroup)?.removeView(it); it.destroy() } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreNet.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreNet.kt index 4eeba0cab5..8517a1aa0f 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreNet.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreNet.kt @@ -7,16 +7,9 @@ import java.io.OutputStreamWriter import java.net.HttpURLConnection import java.net.URL -/** - * The small HTTP the storefront catalogs and account calls need: a GET or a JSON POST with the - * right User-Agent, a bearer token when the call is signed in, and a body or null. Store URLs - * carry their authorization in the query string or the path, so a URL is only ever logged - * through [StoreLog.redactUrl]. Plain HttpURLConnection, like the rest of the app. - */ internal object StoreNet { private const val TAG = "StoreNet" - /** A desktop browser: GOG's catalog and Epic's store GraphQL answer it; Epic's edge refuses the bare Java UA. */ const val BROWSER_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36" fun get(url: String, bearer: String? = null, userAgent: String = BROWSER_UA, timeoutMs: Int = 20_000, headers: Map<String, String> = emptyMap()): String? { @@ -41,7 +34,7 @@ internal object StoreNet { } } - fun postJson(url: String, body: String, bearer: String? = null, userAgent: String = BROWSER_UA, timeoutMs: Int = 25_000): String? { + fun postJson(url: String, body: String, bearer: String? = null, userAgent: String = BROWSER_UA, timeoutMs: Int = 25_000, headers: Map<String, String> = emptyMap()): String? { var conn: HttpURLConnection? = null return try { conn = (URL(url).openConnection() as HttpURLConnection).apply { @@ -53,6 +46,7 @@ internal object StoreNet { setRequestProperty("Content-Type", "application/json") setRequestProperty("Accept", "application/json") if (bearer != null) setRequestProperty("Authorization", "Bearer $bearer") + headers.forEach { (k, v) -> setRequestProperty(k, v) } } OutputStreamWriter(conn.outputStream, "UTF-8").use { it.write(body) } val code = conn.responseCode @@ -65,10 +59,6 @@ internal object StoreNet { } } - /** - * A 600x900 poster for [title] from SteamGridDB by name, or "" - the lookup the GOG library and - * the Amazon poster backfill use, since those stores publish no tall art of their own. - */ fun sgdbPoster(title: String): String = try { val enc = java.net.URLEncoder.encode(title, "UTF-8") val search = get("https://www.steamgriddb.com/api/v2/search/autocomplete/$enc", bearer = SGDB_KEY) @@ -94,14 +84,7 @@ internal object StoreNet { } } -/** - * Keeps credentials out of the logs. A store's CDN, manifest and token URLs carry their - * authorization in the query string (signed, time-limited tokens, `client_secret`, - * `refresh_token`) or in the authority's userinfo; one such line in logcat or a shared log hands a - * reader a live download. Every store URL that is written anywhere goes through [redactUrl] first. - */ object StoreLog { - /** `scheme://host/path` only: query, fragment and `user:pass@` dropped; "[url]" when it cannot be parsed. */ @JvmStatic fun redactUrl(url: String?): String? { if (url == null) return null @@ -125,11 +108,6 @@ object StoreLog { } } - /** - * What any store line may say, for the stores' log and logcat alike: URLs cut to their host and a - * plain first path segment, token values and Authorization / Cookie headers blanked - the shared - * rules of [com.droiddeck.launcher.core.SecretScrub], which a shared log zip applies too. - */ @JvmStatic fun redactLine(text: String): String = com.droiddeck.launcher.core.SecretScrub.scrub(text, com.droiddeck.launcher.core.SecretScrub.Urls.SHORT, "…") diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoreSizes.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoreSizes.kt index 122b3778fb..9e37226f85 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoreSizes.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoreSizes.kt @@ -12,23 +12,17 @@ import com.droiddeck.launcher.stores.epic.EpicCredentialStore import com.droiddeck.launcher.stores.epic.EpicDownloadManager import com.droiddeck.launcher.stores.epic.EpicInstallTags import com.droiddeck.launcher.stores.epic.EpicPrefs +import java.util.concurrent.CompletableFuture import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.Executors -/** - * Install sizes for owned Epic and Amazon games, whose library answers carry none: Epic's from the - * game's build manifest (the files this device installs), Amazon's from its download manifest. - * Asked for a card as it comes on screen, three at a time in the background, once per game - the - * answer is kept in the store's prefs (`size_<id>`, where the library reads it too). Until it is - * known the card shows nothing. - */ object StoreSizes { private const val TAG = "StoreSizes" - /** Sizes found this run, by card key; the cards read them. */ val known = mutableStateMapOf<String, Long>() - private val asked = ConcurrentHashMap.newKeySet<String>() + private val sizeRequests = ConcurrentHashMap<String, CompletableFuture<Long?>>() + private val diskRequests = ConcurrentHashMap<String, CompletableFuture<Long?>>() private val pool = Executors.newFixedThreadPool(3, com.droiddeck.launcher.stores.download.DownloadQueue.workerFactory("sizes")) fun size(item: CatalogItem): Long = known[item.key] ?: item.sizeBytes @@ -36,40 +30,62 @@ object StoreSizes { private val caches = ConcurrentHashMap<Store, SizeCache>() private fun cache(context: Context, store: Store) = caches.getOrPut(store) { SizeCache.forStore(context.applicationContext.filesDir, store) } - /** A card for [item] is on screen (or about to be): its size from the cache for this version, else looked up. */ fun request(context: Context, item: CatalogItem) { - if (!item.owned || item.sizeBytes > 0 || item.store == Store.GOG) return - if (known.containsKey(item.key) || !asked.add(item.key)) return + if (!item.owned || item.sizeBytes > 0 || item.store == Store.GOG || known.containsKey(item.key)) return + resolve(context, item).thenAccept { bytes -> + if (bytes != null) StoresState.post { known[item.key] = bytes } + } + } + + fun resolve(context: Context, item: CatalogItem): CompletableFuture<Long?> { + val available = known[item.key] ?: item.sizeBytes.takeIf { it > 0 } + if (!item.owned || item.store == Store.GOG || item.sizeBytes > 0) return CompletableFuture.completedFuture(available) + if (available != null) return CompletableFuture.completedFuture(available) val app = context.applicationContext val version = item.extra["version"].orEmpty() - pool.execute { - val cached = cache(app, item.store).get(item.id, version) - if (cached != null) { StoresState.post { known[item.key] = cached }; return@execute } - val bytes = runCatching { fetch(app, item) }.onFailure { Log.w(TAG, "${item.key}: ${it.javaClass.simpleName}") }.getOrNull() ?: 0L - if (bytes > 0) { - cache(app, item.store).put(item.id, version, bytes) - when (item.store) { - Store.EPIC -> EpicPrefs.get(app).edit().putLong("size_${item.id}", bytes).apply() - Store.AMAZON -> AmazonPrefs.get(app).edit().putLong("size_${item.id}", bytes).apply() - Store.GOG -> {} + return sizeRequests.computeIfAbsent(item.key) { + CompletableFuture.supplyAsync({ + val cached = cache(app, item.store).get(item.id, version) + val bytes = cached ?: runCatching { fetch(app, item) } + .onFailure { Log.w(TAG, "${item.key}: ${it.javaClass.simpleName}") } + .getOrNull() + bytes?.takeIf { it > 0 }?.also { + cache(app, item.store).put(item.id, version, it) + when (item.store) { + Store.EPIC -> EpicPrefs.get(app).edit().putLong("size_${item.id}", it).apply() + Store.AMAZON -> AmazonPrefs.get(app).edit().putLong("size_${item.id}", it).apply() + Store.GOG -> {} + } } - StoresState.post { known[item.key] = bytes } + }, pool).exceptionally { error -> + Log.w(TAG, "${item.key}: size resolution failed", error) + null } } } - /** An installed game's size on disk, by card key; worked out once per install. */ val onDisk = mutableStateMapOf<String, Long>() fun requestDisk(context: Context, key: String, game: InstalledStoreGame) { - if (onDisk.containsKey(key) || !asked.add("disk:$key")) return + resolveDisk(context, key, game).thenAccept { bytes -> + if (bytes != null) StoresState.post { onDisk[key] = bytes } + } + } + + fun resolveDisk(context: Context, key: String, game: InstalledStoreGame): CompletableFuture<Long?> { + onDisk[key]?.let { return CompletableFuture.completedFuture(it) } val app = context.applicationContext val version = "disk:${game.sidecar.installedAt}:${game.sidecar.installVersion}" - pool.execute { - val c = cache(app, game.sidecar.store) - val bytes = c.get("disk:${game.sidecar.id}", version) - ?: game.folder.walkTopDown().filter { it.isFile && !it.name.startsWith(".droiddeck") }.sumOf { it.length() }.also { c.put("disk:${game.sidecar.id}", version, it) } - if (bytes > 0) StoresState.post { onDisk[key] = bytes } + return diskRequests.computeIfAbsent(key) { + CompletableFuture.supplyAsync({ + val c = cache(app, game.sidecar.store) + c.get("disk:${game.sidecar.id}", version) + ?: game.folder.walkTopDown().filter { it.isFile && !it.name.startsWith(".droiddeck") } + .sumOf { it.length() }.also { c.put("disk:${game.sidecar.id}", version, it) } + }, pool).thenApply { it.takeIf { bytes -> bytes > 0 } }.exceptionally { error -> + Log.w(TAG, "$key: disk size resolution failed", error) + null + } } } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoresNative.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoresNative.kt index 6d626353fa..a015586614 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoresNative.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoresNative.kt @@ -2,12 +2,6 @@ package com.droiddeck.launcher.stores import android.util.Log -/** - * The native download engine for the three stores: `libdroiddeckstores.so`, loaded the first time - * a store needs it, never at process start. The app has to run without it (a build without the - * Rust side, or an ABI the library was not built for), so [available] is a plain false then and - * Setup says "Stores engine not built"; the store managers fall back to their Java fetch loops. - */ object StoresNative { private const val TAG = "StoresNative" private const val LIBRARY = "droiddeckstores" @@ -16,13 +10,10 @@ object StoresNative { @Volatile private var versionText: String? = null @Volatile private var failure: String? = null - /** True once the library is loaded and its version symbol binds; false when it cannot be. Cached. */ val available: Boolean get() = ensureLoaded() - /** The engine's own version string, or null when the library is not there. */ val version: String? get() { ensureLoaded(); return versionText } - /** Why the library did not load, for the Setup row; null when it did. */ val problem: String? get() { ensureLoaded(); return failure } @Synchronized @@ -34,8 +25,6 @@ object StoresNative { Log.i(TAG, "engine ${versionText ?: "?"} loaded") true } catch (t: Throwable) { - // UnsatisfiedLinkError when the .so is missing or a symbol is not there; anything else is - // a surprise worth the same treatment: the Java paths carry on. failure = t.javaClass.simpleName + (t.message?.let { ": $it" } ?: "") Log.w(TAG, "engine unavailable: $failure") false @@ -44,11 +33,9 @@ object StoresNative { return ok } - /** Resets the cached answer, so a probe after an update tries the library again. */ @Synchronized fun forget() { loaded = null } - /** The crate's version string; only after [ensureLoaded] said yes. */ @JvmStatic external fun nativeVersion(): String } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/StoresState.kt b/app/src/main/java/com/droiddeck/launcher/stores/StoresState.kt index 954293fcdc..6b99210e9e 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/StoresState.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/StoresState.kt @@ -14,65 +14,39 @@ import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -/** - * The Stores section's state for the life of the process (like the Flathub store's StoreState): - * who is signed in where, each store's library and shelves, what is installed on disk and what is - * being downloaded, so a download carries on - and its progress shows - while the user moves - * around the launcher or plays something meanwhile. - * - * Everything here is read on the main thread by Compose; the workers post their results back. - * The stores themselves plug in as [StoreBackend]s; a store with no backend in this build shows - * its sign-in card and nothing else. - */ object StoresState { private const val TAG = "Stores" private val main = Handler(Looper.getMainLooper()) - /** The signed-in account name per store; absent = signed out. */ val accounts = mutableStateMapOf<Store, String>() - /** Each store's owned games, once synced; absent until then. */ val library = mutableStateMapOf<Store, List<CatalogItem>>() - /** Each store's storefront shelves, once fetched. */ val shelves = mutableStateMapOf<Store, StoreShelves>() - /** What a store is doing for the user right now ("Syncing 12 games…"); absent when idle. */ val status = mutableStateMapOf<Store, String>() - /** Why the last sync or shelf fetch failed, per store; cleared by the next success. */ val problems = mutableStateMapOf<Store, String>() - /** Games the stores installed, as their sidecars say; rebuilt by [refresh]. */ var installed by mutableStateOf<List<InstalledStoreGame>>(emptyList()) private set - /** - * The download queue as the Downloads page lists it, newest first. Replaced only when a row is - * added, removed, reordered or changes state - not on progress - so whatever iterates it does - * not recompose on every byte. A row's progress is read through [download]. - */ var downloads by mutableStateOf<List<DownloadEntry>>(emptyList()) private set - /** Downloads queued, running or paused across the stores (the rail badge); changes only when the count does. */ var activeDownloads by mutableStateOf(0) private set private val rows = HashMap<String, androidx.compose.runtime.MutableState<DownloadEntry?>>() - /** One row's live entry: a composable reading it recomposes for that row's progress only. Main thread. */ fun download(key: String): DownloadEntry? = rows.getOrPut(key) { mutableStateOf(null) }.value - /** Main thread: each row's holder set (equal entries change nothing), the list and the count only when they change. */ - /** The newest list as published, progress included; for the notification, which is not composed. */ @Volatile var latestDownloads: List<DownloadEntry> = emptyList() private set private var notifiedAt = 0L internal fun publishDownloads(list: List<DownloadEntry>) { latestDownloads = list - // The notification follows at most once a second. val now = android.os.SystemClock.uptimeMillis() if (now - notifiedAt >= 1000) { notifiedAt = now; com.droiddeck.launcher.stores.download.StoreDownloadService.tick() } val keys = list.mapTo(HashSet()) { it.key } @@ -84,22 +58,20 @@ object StoresState { } - /** The native engine's version once probed, "" when the probe said it is missing, null before. */ var engine by mutableStateOf<String?>(null) private set private val backends = HashMap<Store, StoreBackend>() - /** A store's implementation, registered once as the app starts; null when this build lacks it. */ fun backend(store: Store): StoreBackend? = backends[store] fun register(backend: StoreBackend) { backends[backend.store] = backend } - /** Reads what is on disk for every store: sign-ins, installed games, the engine probe. Off the main thread. */ fun refresh(context: Context) { val app = context.applicationContext - Thread({ + com.droiddeck.launcher.stores.download.SavedQueue.restore(app) + background("stores-refresh") { val found = Store.entries.mapNotNull { store -> StoreAccounts.signedInAs(app, store)?.let { store to it } } val onDisk = StoreInstallRoot.gameFolders(app).mapNotNull { folder -> StoreGameSidecar.read(folder)?.takeIf { it.isInstalled }?.let { InstalledStoreGame(it, folder) } @@ -113,22 +85,19 @@ object StoresState { unfinished = partial engine = version } - }, "stores-refresh").start() + } } fun isSignedIn(store: Store): Boolean = accounts.containsKey(store) - /** A store action's error line when it found no usable sign-in: gone, or on disk but unreadable for now. */ fun notSignedInLine(store: Store): String = if (StoreAccounts.isUnavailable(store)) "${store.shortLabel} sign-in could not be read: try again." else "${store.shortLabel} session expired: sign in again." - /** Stores whose sign-in has run out (a launch could not get a code): their chip dims until the user signs in again. */ val expired = mutableStateMapOf<Store, Boolean>() fun markSignInExpired(store: Store) = post { expired[store] = true } - /** Installs that stopped before they finished; their Install button reads "Resume install". */ var unfinished by mutableStateOf<List<StoreInstallRoot.Unfinished>>(emptyList()) internal set @@ -136,7 +105,6 @@ object StoresState { it.store == item.store && (it.id == item.id || (it.id == null && it.folder.name == StoreInstallRoot.folderName(item.title, item.id))) } - /** Deletes an unfinished install's folder and caches, as Cancel would; drops its row if there is one. */ fun clearUnfinished(context: Context, item: CatalogItem) { val app = context.applicationContext val key = "${item.store.id}:${item.id}" @@ -149,7 +117,6 @@ object StoresState { fun installedGame(store: Store, id: String): InstalledStoreGame? = installed.firstOrNull { it.sidecar.store == store && it.sidecar.id == id } - /** The user's library and the shelves for [store], from the cache first and the network when stale. */ fun open(context: Context, store: Store, force: Boolean = false) { val backend = backends[store] ?: return val app = context.applicationContext @@ -158,7 +125,6 @@ object StoresState { if (force || !shelves.containsKey(store)) backend.loadShelves(app, force) } - /** A store not signed into: its public storefront only, for its sign-in page to show. */ fun preview(context: Context, store: Store) { if (!shelves.containsKey(store)) backends[store]?.loadShelves(context.applicationContext, false) } @@ -170,23 +136,19 @@ object StoresState { fun signOut(context: Context, store: Store) { val app = context.applicationContext - Thread({ + background("stores-signout") { backends[store]?.signOut(app) - StoreAccounts.clear(app, store) + if (store == Store.GOG) com.droiddeck.launcher.stores.gog.GogComet.replaceAccount { StoreAccounts.clear(app, store) } + else StoreAccounts.clear(app, store) main.post { accounts.remove(store); library.remove(store); status.remove(store); problems.remove(store) logLine("${store.label}: signed out") } - }, "stores-signout").start() + } } - /** A notification asked for the Downloads chip; the Stores page takes it and clears it. */ var openDownloads by mutableStateOf(false) - /** - * Android 13+: notifications need permission. Asked once, the first time a download starts from - * a screen; refused, downloads still run, without their notification. - */ private fun askForNotifications(context: Context) { val activity = context as? android.app.Activity ?: return if (android.os.Build.VERSION.SDK_INT < 33) return @@ -197,51 +159,66 @@ object StoresState { runCatching { activity.requestPermissions(arrayOf("android.permission.POST_NOTIFICATIONS"), 7102) } } - /** An install waiting for the user to say where: the page shows the choice while this is set. */ var pendingInstall by mutableStateOf<CatalogItem?>(null) - /** - * The way a page starts an install: with a card in the device the user is asked where (the - * dialog's default is last time's pick, never a silent choice); with none it goes to internal - * storage at once. - */ fun requestInstall(context: Context, item: CatalogItem) { askForNotifications(context) - // A resume goes where the files already are; there is nothing to choose. if (isUnfinished(item)) { install(context, item); return } val targets = StoreInstallRoot.targets(context) if (targets.size > 1) pendingInstall = item else install(context, item, targets.first().root) } - /** Starts an install into [root] (the internal root when null). */ fun install(context: Context, item: CatalogItem, root: java.io.File? = null) { val app = context.applicationContext - val target = root ?: StoreInstallRoot.installRoot(app) + val folder = StoreInstallRoot.folderFor(app, item.store, item.id, item.title, root ?: StoreInstallRoot.installRoot(app)) + val target = folder.parentFile!!.parentFile!! + val check = StoreInstallRoot.checkStorage(app, item, target) + if (!check.enough) { + val errorMsg = check.errorMessage ?: app.getString(com.droiddeck.launcher.R.string.stores_storage_insufficient, formatBytes(check.requiredBytes), formatBytes(check.availableBytes)) + val entry = com.droiddeck.launcher.stores.download.DownloadEntry( + item.store, + item.id, + item.title, + cover = item.imageUrl, + bytesTotal = item.sizeBytes, + location = StoreInstallRoot.labelFor(app, folder) + ) + com.droiddeck.launcher.stores.download.SavedQueue.remember(app, item, target) + com.droiddeck.launcher.stores.download.DownloadQueue.recordFailed(app, entry, errorMsg) { + install(app, item, target) + } + return + } + com.droiddeck.launcher.stores.download.SavedQueue.remember(app, item, target) backends[item.store]?.install(app, item, target) ?: logLine("${item.store.label}: this build cannot install yet") } - /** Removes the game's folder and its shortcut, then [onDone] on the main thread. */ + val uninstalling = mutableStateMapOf<String, Float>() + fun uninstall(context: Context, game: InstalledStoreGame, onDone: () -> Unit = {}) { val app = context.applicationContext - Thread({ + val key = "${game.sidecar.store.id}:${game.sidecar.id}" + uninstalling[key] = 0f + background("stores-uninstall", onFailure = { main.post { uninstalling.remove(key); onDone() } }) { runCatching { backends[game.sidecar.store]?.uninstall(app, game) } - StoreInstalls.uninstall(app, game) + StoreInstalls.uninstall(app, game, progress = { f -> main.post { if (key in uninstalling) uninstalling[key] = f } }, removed = { + main.post { + installed = installed.filterNot { it.folder.absolutePath == game.folder.absolutePath } + uninstalling.remove(key) + } + }) main.post(onDone) - }, "stores-uninstall").start() + } } - /** Told on the main thread when an install or removal changed what is on disk; the launcher rebuilds its Games list. */ @Volatile var libraryListener: (() -> Unit)? = null - /** A game landed or went: the installed set is re-read and the launcher told. Any thread. */ fun notifyLibraryChanged(context: Context) { refresh(context) main.post { libraryListener?.invoke() } } - /** Appends to the engine log with a clock, keeping the last 80 lines. Any thread. */ fun logLine(raw: String) { - // Every store line passes here, the engines' included: no token or full URL is kept. val text = StoreLog.redactLine(raw) Log.i(TAG, text) val app = appContext ?: return @@ -250,32 +227,44 @@ object StoresState { private var appContext: Context? = null - /** Called once as the app starts: where the log file goes, and the old days pruned. */ fun init(context: Context) { appContext = context.applicationContext StoreLogFiles.prune(context) - // The EOS overlay an earlier build downloaded (656 MB) is gone with the feature. val overlay = java.io.File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), "root/.local/share/droiddeck/epic-overlay") - if (overlay.exists()) Thread({ overlay.deleteRecursively(); Log.i(TAG, "removed the old EOS overlay download") }, "epic-overlay-cleanup").start() - // Cloud saves a killed app never uploaded; not while a session (and maybe that game) runs. + if (overlay.exists()) background("epic-overlay-cleanup") { overlay.deleteRecursively(); Log.i(TAG, "removed the old EOS overlay download") } val app = context.applicationContext - Thread({ CloudSaves.uploadAllDirty(app, "recovery") }, "cloud-recovery").start() + Thread({ + runCatching { CloudSaves.uploadAllDirty(app, "recovery") } + .onFailure { Log.w(TAG, "cloud save recovery failed", it) } + }, "cloud-recovery").start() } internal fun post(block: () -> Unit) = main.post(block) + /** + * A worker thread whose failure is logged. An uncaught exception on a plain Thread reaches the crash + * handler, which ends the whole app, and none of these jobs is worth that. + */ + private fun background(name: String, onFailure: () -> Unit = {}, block: () -> Unit) { + Thread({ + try { + block() + } catch (e: Throwable) { + Log.w(TAG, "$name failed", e) + runCatching(onFailure) + } + }, name).start() + } + private val CLOCK = SimpleDateFormat("HH:mm:ss.SSS", Locale.US) } -/** What one store contributes: sign-in, its library, its shelves, installs and removals. */ interface StoreBackend { val store: Store fun signIn(context: Context) fun signOut(context: Context) fun syncLibrary(context: Context, force: Boolean) fun loadShelves(context: Context, force: Boolean) - /** Queues an install of [item] under [root] (a StoreInstallRoot target). */ fun install(context: Context, item: CatalogItem, root: java.io.File) - /** The store's own records of the install, before the folder goes (the queue row, cached ids). */ fun uninstall(context: Context, game: InstalledStoreGame) } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonApiClient.java b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonApiClient.java deleted file mode 100644 index 7683217d91..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonApiClient.java +++ /dev/null @@ -1,218 +0,0 @@ -package com.droiddeck.launcher.stores.amazon; - -import android.util.Log; - -import com.droiddeck.launcher.stores.StoreLog; - -import org.json.JSONArray; -import org.json.JSONObject; - -import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Amazon's distribution API, as the launcher calls it: every gaming call carries `X-Amz-Target`, - * `x-amzn-token`, the launcher's User-Agent and `Content-Encoding: amz-1.0`. - */ -public final class AmazonApiClient { - - private static final String TAG = "AmazonApi"; - private static final String ENTITLEMENTS_URL = "https://gaming.amazon.com/api/distribution/entitlements"; - private static final String DISTRIBUTION_URL = "https://gaming.amazon.com/api/distribution/v2/public"; - // As nile sends them: the session's User-Agent, and the launcher's own string under "UserAgent". - private static final String GAMING_USER_AGENT = "AGSLauncher/1.0.0"; - private static final String LAUNCHER_USER_AGENT = "com.amazon.agslauncher.win/3.0.9202.1"; - private static final String DOWNLOAD_USER_AGENT = "nile/0.1 Amazon"; - private static final String KEY_ID = "d5dc8b8b-86c8-4fc4-ae93-18c0def5314d"; - - private AmazonApiClient() {} - - /** The owned games, every page, one per productId; null when Amazon refused or could not be reached. */ - public static List<AmazonGame> getEntitlements(String accessToken, String deviceSerial) { - Map<String, AmazonGame> seen = new HashMap<>(); - String nextToken = null; - String hardwareHash; - try { - hardwareHash = AmazonPkce.sha256Upper(deviceSerial); - } catch (Exception e) { - Log.e(TAG, "hardware hash failed", e); - return null; - } - boolean answered = false; - do { - try { - JSONObject body = new JSONObject(); - body.put("Operation", "GetEntitlements"); - body.put("clientId", "Sonic"); - body.put("syncPoint", JSONObject.NULL); - body.put("nextToken", nextToken != null ? nextToken : JSONObject.NULL); - body.put("maxResults", 50); - body.put("productIdFilter", JSONObject.NULL); - body.put("keyId", KEY_ID); - body.put("hardwareHash", hardwareHash); - String resp = postGaming(ENTITLEMENTS_URL, "com.amazon.animusdistributionservice.entitlement.AnimusEntitlementsService.GetEntitlements", accessToken, body.toString()); - if (resp == null) break; - JSONObject json = new JSONObject(resp); - answered = true; - JSONArray entitlements = json.optJSONArray("entitlements"); - if (entitlements != null) for (int i = 0; i < entitlements.length(); i++) { - AmazonGame game = parseEntitlement(entitlements.getJSONObject(i)); - if (game != null && !game.productId.isEmpty()) seen.put(game.productId, game); - } - // A JSON null reads as "null" through optString; the last page carries none. - nextToken = json.isNull("nextToken") ? null : json.optString("nextToken", ""); - if (nextToken != null && nextToken.isEmpty()) nextToken = null; - } catch (Exception e) { - Log.e(TAG, "entitlements page failed: " + e.getClass().getSimpleName()); - break; - } - } while (nextToken != null); - if (!answered) return null; - Log.i(TAG, "entitlements: " + seen.size()); - return new ArrayList<>(seen.values()); - } - - static AmazonGame parseEntitlement(JSONObject e) { - try { - JSONObject product = e.optJSONObject("product"); - if (product == null) return null; - AmazonGame game = new AmazonGame(); - game.entitlementId = e.optString("id", ""); - game.productId = product.optString("id", ""); - game.title = product.optString("title", "Unknown"); - game.productSku = product.optString("sku", ""); - String productType = product.optString("productType", ""); - if (productType.isEmpty()) productType = product.optString("type", ""); - String parentId = product.optString("parentProductId", ""); - if (parentId.isEmpty()) parentId = product.optString("baseProductId", ""); - if (parentId.isEmpty()) parentId = product.optString("parentId", ""); - JSONObject detail = product.optJSONObject("productDetail"); - if (detail != null) { - // The opaque images only: the square icon, and for the wide card the second - // background (a plain key art) before the first (often faded) or the crown image. - game.artUrl = detail.optString("iconUrl", ""); - JSONObject details = detail.optJSONObject("details"); - if (details != null) { - if (game.artUrl.isEmpty()) game.artUrl = details.optString("pgCrownImageUrl", ""); - game.heroUrl = details.optString("backgroundUrl2", ""); - if (game.heroUrl.isEmpty()) game.heroUrl = details.optString("backgroundUrl1", ""); - if (game.heroUrl.isEmpty()) game.heroUrl = details.optString("pgCrownImageUrl", ""); - game.developer = details.optString("developer", ""); - game.publisher = details.optString("publisher", ""); - if (productType.isEmpty()) productType = details.optString("productType", ""); - if (parentId.isEmpty()) parentId = details.optString("parentProductId", ""); - } - } - boolean typeIsDlc = !productType.isEmpty() && !productType.equalsIgnoreCase("GAME"); - if (typeIsDlc || !parentId.isEmpty()) { game.isDLC = true; game.parentProductId = parentId; } - return game; - } catch (Exception ex) { - Log.e(TAG, "entitlement parse failed: " + ex.getClass().getSimpleName()); - return null; - } - } - - public static final class GameDownloadSpec { - public String downloadUrl; - public String versionId; - } - - /** The download root and version for a game; takes the entitlement id, not the product id. */ - public static GameDownloadSpec getGameDownload(String accessToken, String entitlementId) { - try { - JSONObject body = new JSONObject().put("entitlementId", entitlementId).put("Operation", "GetGameDownload"); - String resp = postGaming(DISTRIBUTION_URL, "com.amazon.animusdistributionservice.external.AnimusDistributionService.GetGameDownload", accessToken, body.toString()); - if (resp == null) return null; - JSONObject json = new JSONObject(resp); - GameDownloadSpec spec = new GameDownloadSpec(); - spec.downloadUrl = json.optString("downloadUrl", ""); - spec.versionId = json.optString("versionId", ""); - return spec.downloadUrl.isEmpty() ? null : spec; - } catch (Exception e) { - Log.e(TAG, "GetGameDownload failed: " + e.getClass().getSimpleName()); - return null; - } - } - - /** The live version id of a product, for update checks. */ - public static String getLiveVersionId(String accessToken, String productId) { - try { - JSONObject body = new JSONObject().put("adgProductIds", new JSONArray().put(productId)).put("Operation", "GetLiveVersionIds"); - String resp = postGaming(DISTRIBUTION_URL, "com.amazon.animusdistributionservice.external.AnimusDistributionService.GetLiveVersionIds", accessToken, body.toString()); - if (resp == null) return null; - JSONObject json = new JSONObject(resp); - JSONObject versions = json.optJSONObject("adgProductIdToVersionIdMap"); - if (versions == null) versions = json.optJSONObject("versionIds"); - return versions == null ? null : versions.optString(productId, null); - } catch (Exception e) { - Log.e(TAG, "GetLiveVersionIds failed: " + e.getClass().getSimpleName()); - return null; - } - } - - /** `baseUrl/segment`, keeping a query string on the base where it belongs. */ - public static String appendPath(String baseUrl, String segment) { - int q = baseUrl.indexOf('?'); - if (q >= 0) return baseUrl.substring(0, q) + "/" + segment + baseUrl.substring(q); - return baseUrl + "/" + segment; - } - - static String postGaming(String urlStr, String target, String accessToken, String body) { - try { - HttpURLConnection conn = (HttpURLConnection) new URL(urlStr).openConnection(); - conn.setRequestMethod("POST"); - conn.setConnectTimeout(30000); - conn.setReadTimeout(30000); - conn.setDoOutput(true); - conn.setRequestProperty("X-Amz-Target", target); - conn.setRequestProperty("x-amzn-token", accessToken); - conn.setRequestProperty("User-Agent", GAMING_USER_AGENT); - conn.setRequestProperty("UserAgent", LAUNCHER_USER_AGENT); - conn.setRequestProperty("Content-Type", "application/json"); - conn.setRequestProperty("Content-Encoding", "amz-1.0"); - try (OutputStream os = conn.getOutputStream()) { os.write(body.getBytes(StandardCharsets.UTF_8)); } - int code = conn.getResponseCode(); - String resp = AmazonAuthClient.readStream(code < 400 ? conn.getInputStream() : conn.getErrorStream()); - conn.disconnect(); - if (code < 200 || code >= 300) { - Log.e(TAG, "HTTP " + code + " from " + StoreLog.redactUrl(urlStr) + ": " + (resp.length() > 200 ? resp.substring(0, 200) : resp)); - return null; - } - return resp; - } catch (Exception e) { - Log.e(TAG, "POST failed: " + StoreLog.redactUrl(urlStr) + " (" + e.getClass().getSimpleName() + ")"); - return null; - } - } - - /** Raw bytes (the manifest). */ - public static byte[] getBytes(String urlStr, String accessToken) { - try { - HttpURLConnection conn = (HttpURLConnection) new URL(urlStr).openConnection(); - conn.setRequestMethod("GET"); - conn.setConnectTimeout(30000); - conn.setReadTimeout(120000); - if (accessToken != null) conn.setRequestProperty("x-amzn-token", accessToken); - conn.setRequestProperty("User-Agent", DOWNLOAD_USER_AGENT); - int code = conn.getResponseCode(); - if (code < 200 || code >= 300) { Log.e(TAG, "bytes HTTP " + code + " from " + StoreLog.redactUrl(urlStr)); conn.disconnect(); return null; } - java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream(); - try (java.io.InputStream in = conn.getInputStream()) { - byte[] buf = new byte[131072]; - int n; - while ((n = in.read(buf)) != -1) out.write(buf, 0, n); - } - conn.disconnect(); - return out.toByteArray(); - } catch (Exception e) { - Log.e(TAG, "bytes failed: " + StoreLog.redactUrl(urlStr) + " (" + e.getClass().getSimpleName() + ")"); - return null; - } - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonApiClient.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonApiClient.kt new file mode 100644 index 0000000000..bc8c68cb53 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonApiClient.kt @@ -0,0 +1,31 @@ +package com.droiddeck.launcher.stores.amazon + +import org.json.JSONObject + +class GameDownloadSpec(@JvmField val downloadUrl: String, @JvmField val versionId: String) + +object AmazonApiClient { + @JvmStatic + fun getGameDownload(accessToken: String, entitlementId: String): GameDownloadSpec? { + val answer = AmazonNative.call( + "download.lookup", + JSONObject().put("accessToken", accessToken).put("entitlementId", entitlementId), + ) ?: return null + if (answer.has("error")) return null + val url = answer.optString("downloadUrl").ifEmpty { return null } + return GameDownloadSpec(url, answer.optString("versionId")) + } + + @JvmStatic + fun getBytes(url: String, accessToken: String?): ByteArray? { + val request = JSONObject().put("url", url) + if (accessToken != null) request.put("accessToken", accessToken) + return AmazonNative.fetch("cdn.get", request) + } + + @JvmStatic + fun appendPath(baseUrl: String, segment: String): String { + val q = baseUrl.indexOf('?') + return if (q < 0) "$baseUrl/$segment" else baseUrl.substring(0, q) + "/" + segment + baseUrl.substring(q) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonAuthClient.java b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonAuthClient.java deleted file mode 100644 index 878f659ae1..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonAuthClient.java +++ /dev/null @@ -1,180 +0,0 @@ -package com.droiddeck.launcher.stores.amazon; - -import android.util.Log; - -import com.droiddeck.launcher.stores.StoreLog; - -import org.json.JSONArray; -import org.json.JSONObject; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.nio.charset.StandardCharsets; - -/** - * Amazon's device-auth endpoints, as the Amazon Games launcher registers itself: - * POST api.amazon.com/auth/register (the PKCE code for bearer tokens, with a device registration) - * POST api.amazon.com/auth/token (access token renewal; the refresh token stays) - * POST api.amazon.com/auth/deregister (sign-out, best-effort) - */ -public final class AmazonAuthClient { - - private static final String TAG = "AmazonAuth"; - static final String REGISTER_URL = "https://api.amazon.com/auth/register"; - static final String REFRESH_URL = "https://api.amazon.com/auth/token"; - static final String DEREGISTER_URL = "https://api.amazon.com/auth/deregister"; - public static final String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"; - static final String APP_NAME = "AGSLauncher for Windows"; - static final String APP_VERSION = "1.0.0"; - static final String DEVICE_TYPE = "A2UMVHOX7UP4V7"; - static final String OS_VERSION = "10.0.19044.0"; - - public static final class RegisterResult { - public String accessToken; - public String refreshToken; - public long expiresIn; - public String name; - /** The serial Amazon registered the device under; the entitlements call hashes this one. */ - public String deviceSerial; - } - - private AmazonAuthClient() {} - - /** Exchanges the PKCE authorization code for bearer tokens; null on failure. */ - public static RegisterResult registerDevice(String authCode, String codeVerifier, String deviceSerial, String clientId) { - try { - JSONObject authData = new JSONObject(); - authData.put("authorization_code", authCode); - authData.put("client_domain", "DeviceLegacy"); - authData.put("client_id", clientId); - authData.put("code_algorithm", "SHA-256"); - authData.put("code_verifier", codeVerifier); - authData.put("use_global_authentication", false); - JSONObject regData = new JSONObject(); - regData.put("app_name", APP_NAME); - regData.put("app_version", APP_VERSION); - regData.put("device_model", "Windows"); - regData.put("device_name", JSONObject.NULL); - regData.put("device_serial", deviceSerial); - regData.put("device_type", DEVICE_TYPE); - regData.put("domain", "Device"); - regData.put("os_version", OS_VERSION); - JSONArray tokenTypes = new JSONArray().put("bearer").put("mac_dms"); - JSONArray extensions = new JSONArray().put("customer_info").put("device_info"); - JSONObject body = new JSONObject(); - body.put("auth_data", authData); - body.put("registration_data", regData); - body.put("requested_extensions", extensions); - body.put("requested_token_type", tokenTypes); - body.put("user_context_map", new JSONObject()); - String response = postJson(REGISTER_URL, body.toString(), null, null, null); - if (response == null) return null; - JSONObject success = new JSONObject(response).getJSONObject("response").getJSONObject("success"); - JSONObject bearer = success.getJSONObject("tokens").getJSONObject("bearer"); - RegisterResult result = new RegisterResult(); - result.accessToken = bearer.getString("access_token"); - result.refreshToken = bearer.getString("refresh_token"); - result.expiresIn = bearer.optLong("expires_in", 3600L); - JSONObject ext = success.optJSONObject("extensions"); - JSONObject customer = ext != null ? ext.optJSONObject("customer_info") : null; - result.name = customer != null ? customer.optString("name", "") : ""; - JSONObject device = ext != null ? ext.optJSONObject("device_info") : null; - String registered = device != null ? device.optString("device_serial_number", "") : ""; - result.deviceSerial = registered.isEmpty() ? deviceSerial : registered; - return result; - } catch (Exception e) { - Log.e(TAG, "registerDevice failed: " + e.getClass().getSimpleName()); - return null; - } - } - - /** A new access token; the refresh token is not returned and stays as it was. */ - public static RegisterResult refreshAccessToken(String refreshToken) { - try { - JSONObject body = new JSONObject(); - body.put("source_token", refreshToken); - body.put("source_token_type", "refresh_token"); - body.put("requested_token_type", "access_token"); - body.put("app_name", APP_NAME); - body.put("app_version", APP_VERSION); - String response = postJson(REFRESH_URL, body.toString(), null, "x-amzn-identity-auth-domain", "api.amazon.com"); - if (response == null) return null; - JSONObject json = new JSONObject(response); - RegisterResult result = new RegisterResult(); - result.accessToken = json.getString("access_token"); - result.refreshToken = refreshToken; - result.expiresIn = json.optLong("expires_in", 3600L); - return result; - } catch (Exception e) { - Log.e(TAG, "refresh failed: " + e.getClass().getSimpleName()); - return null; - } - } - - public static void deregisterDevice(String accessToken) { - try { - JSONObject body = new JSONObject().put("requested_extensions", new JSONArray().put("device_info").put("customer_info")); - postJson(DEREGISTER_URL, body.toString(), accessToken, null, null); - } catch (Exception e) { - Log.w(TAG, "deregister failed (ignored): " + e.getClass().getSimpleName()); - } - } - - static String postJson(String urlStr, String body, String bearerToken, String extraKey, String extraVal) { - try { - HttpURLConnection conn = (HttpURLConnection) new URL(urlStr).openConnection(); - conn.setRequestMethod("POST"); - conn.setConnectTimeout(30000); - conn.setReadTimeout(30000); - conn.setDoOutput(true); - conn.setRequestProperty("User-Agent", USER_AGENT); - conn.setRequestProperty("Content-Type", "application/json"); - conn.setRequestProperty("Accept", "application/json"); - if (bearerToken != null) conn.setRequestProperty("Authorization", "Bearer " + bearerToken); - if (extraKey != null) conn.setRequestProperty(extraKey, extraVal); - try (OutputStream os = conn.getOutputStream()) { os.write(body.getBytes(StandardCharsets.UTF_8)); } - int code = conn.getResponseCode(); - String resp = readStream(code < 400 ? conn.getInputStream() : conn.getErrorStream()); - conn.disconnect(); - if (code < 200 || code >= 300) { Log.e(TAG, "HTTP " + code + " from " + StoreLog.redactUrl(urlStr)); return null; } - return resp; - } catch (Exception e) { - Log.e(TAG, "POST failed: " + StoreLog.redactUrl(urlStr) + " (" + e.getClass().getSimpleName() + ")"); - return null; - } - } - - static String getRequest(String urlStr, String token, String tokenHeader, String extraKey, String extraVal) { - try { - HttpURLConnection conn = (HttpURLConnection) new URL(urlStr).openConnection(); - conn.setRequestMethod("GET"); - conn.setConnectTimeout(30000); - conn.setReadTimeout(120000); - if (token != null && tokenHeader != null) conn.setRequestProperty(tokenHeader, token); - if (extraKey != null) conn.setRequestProperty(extraKey, extraVal); - int code = conn.getResponseCode(); - String resp = readStream(code < 400 ? conn.getInputStream() : conn.getErrorStream()); - conn.disconnect(); - if (code < 200 || code >= 300) { Log.e(TAG, "GET HTTP " + code + " from " + StoreLog.redactUrl(urlStr)); return null; } - return resp; - } catch (Exception e) { - Log.e(TAG, "GET failed: " + StoreLog.redactUrl(urlStr) + " (" + e.getClass().getSimpleName() + ")"); - return null; - } - } - - static String readStream(InputStream is) throws IOException { - if (is == null) return ""; - StringBuilder sb = new StringBuilder(); - try (BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) { - String line; - while ((line = br.readLine()) != null) sb.append(line); - } - return sb.toString(); - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonBackend.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonBackend.kt index 9f16663a53..21f08e7549 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonBackend.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonBackend.kt @@ -2,165 +2,87 @@ package com.droiddeck.launcher.stores.amazon import android.content.Context import android.content.Intent -import android.net.Uri -import android.util.Log -import android.webkit.WebView import com.droiddeck.launcher.stores.CatalogItem import com.droiddeck.launcher.stores.InstalledStoreGame import com.droiddeck.launcher.stores.LoginFlows import com.droiddeck.launcher.stores.Store import com.droiddeck.launcher.stores.StoreBackend -import com.droiddeck.launcher.stores.StoreExe -import com.droiddeck.launcher.stores.StoreGameSidecar import com.droiddeck.launcher.stores.StoreInstallRoot -import com.droiddeck.launcher.stores.StoreInstalls import com.droiddeck.launcher.stores.StoreLoginActivity -import com.droiddeck.launcher.stores.StoreShelves import com.droiddeck.launcher.stores.StoresState import com.droiddeck.launcher.stores.download.DownloadEntry import com.droiddeck.launcher.stores.download.DownloadQueue -import com.droiddeck.launcher.stores.download.DownloadStage -import java.io.File -import java.util.concurrent.atomic.AtomicBoolean +import org.json.JSONObject -/** - * Amazon Games in the Stores section. Amazon has no browsable catalog for third-party clients - - * Prime Gaming's claims live on gaming.amazon.com, signed in - so the Store tab's shelves are cut - * from the account's own library: owned-not-installed as Trending, installed as Your library. - */ object AmazonBackend : StoreBackend { - private const val TAG = "AmazonBackend" override val store: Store = Store.AMAZON - init { LoginFlows.amazonFlow = { LoginFlow() } } + init { + LoginFlows.amazonFlow = { AmazonLogin.create() } + } + + private fun engineMissing(): Boolean { + if (AmazonNative.ready()) return false + StoresState.logLine(AmazonNative.ENGINE_MISSING) + StoresState.post { StoresState.problems[store] = AmazonNative.ENGINE_MISSING } + return true + } override fun signIn(context: Context) { - context.startActivity(Intent(context, StoreLoginActivity::class.java).putExtra(StoreLoginActivity.EXTRA_STORE, store.id).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) + if (engineMissing()) return + context.startActivity( + Intent(context, StoreLoginActivity::class.java) + .putExtra(StoreLoginActivity.EXTRA_STORE, store.id) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK), + ) } override fun signOut(context: Context) { - AmazonCredentialStore.load(context)?.let { Thread({ AmazonAuthClient.deregisterDevice(it.accessToken) }, "amazon-deregister").start() } - AmazonPrefs.get(context).edit().remove("library_cache").remove("library_synced_at").apply() + val app = context.applicationContext + runCatching { + val token = AmazonCredentialStore.load(app)?.accessToken + if (!token.isNullOrEmpty()) { + Thread({ + runCatching { AmazonNative.call("auth.deregister", JSONObject().put("accessToken", token)) } + }, "amazon-deregister").start() + } + } + runCatching { AmazonLibrary.forget(app) } } override fun syncLibrary(context: Context, force: Boolean) { val app = context.applicationContext - Thread({ - // The cache off the main thread; with it on screen a background sync keeps quiet. - val cached = AmazonLibrary.cached(app) - val quiet = cached.isNotEmpty() && !force - StoresState.post { - if (cached.isNotEmpty()) publish(app, cached) - if (!quiet) StoresState.status[store] = "Fetching your library…" - } - val result = AmazonLibrary.sync(app, force) { line -> if (!quiet) StoresState.post { StoresState.status[store] = line } } - StoresState.post { - StoresState.status.remove(store) - when (result) { - is AmazonLibrary.SyncResult.Ok -> { publish(app, result.games); StoresState.problems.remove(store) } - is AmazonLibrary.SyncResult.Failed -> StoresState.problems[store] = result.message - AmazonLibrary.SyncResult.NotLoggedIn -> StoresState.problems[store] = StoresState.notSignedInLine(store) - AmazonLibrary.SyncResult.Throttled -> publish(app, AmazonLibrary.cached(app)) - AmazonLibrary.SyncResult.Busy -> {} - } - } - }, "amazon-sync").start() + Thread({ AmazonLibrary.sync(app, force) }, "amazon-sync").start() } - /** The library and, from it, the shelves. */ - private fun publish(app: Context, games: List<AmazonGame>) { - val items = games.map { AmazonLibrary.toCatalogItem(app, it) } - StoresState.library[store] = com.droiddeck.launcher.stores.mergeItems(StoresState.library[store], items) - val installed = StoresState.installed.filter { it.sidecar.store == store }.map { it.sidecar.id }.toSet() - StoresState.shelves[store] = StoreShelves(trending = items.filter { it.id !in installed }, free = emptyList(), deals = emptyList(), whatsNew = emptyList()) - } - - // Nothing public to fetch; the shelves follow the library sync, which StoresState.open starts - // alongside this. A second sync here only came back Busy and cleared the first one's status. - override fun loadShelves(context: Context, force: Boolean) {} - - override fun install(context: Context, item: CatalogItem, root: File) { + override fun loadShelves(context: Context, force: Boolean) { val app = context.applicationContext - val entitlementId = item.extra["entitlementId"] ?: "" - if (entitlementId.isEmpty()) { StoresState.logLine("Amazon: \"${item.title}\" has no entitlement to download with"); return } - val game = AmazonGame().apply { productId = item.id; this.entitlementId = entitlementId; title = item.title; productSku = item.extra["sku"] ?: ""; heroUrl = item.imageUrl ?: ""; artUrl = item.tallImageUrl ?: "" } - val folder = StoreInstallRoot.folderFor(app, Store.AMAZON, game.productId, game.title, root) - DownloadQueue.enqueue(app, DownloadEntry(store, item.id, item.title, cover = item.imageUrl, bytesTotal = item.sizeBytes, location = StoreInstallRoot.labelFor(app, folder))) { InstallJob(app, game, item, folder) } + AmazonShelves.cached(app)?.let { s -> StoresState.post { withArt(s.art) } } + Thread({ + val shelves = AmazonShelves.featured(app, force) + if (shelves != null) StoresState.post { withArt(shelves.art) } + }, "amazon-shelves").start() + } + + private fun withArt(art: List<String>) { + val s = StoresState.shelves[store] + StoresState.shelves[store] = if (s == null) com.droiddeck.launcher.stores.StoreShelves(art = art) + else com.droiddeck.launcher.stores.StoreShelves(s.whatsNew, s.deals, s.free, s.trending, art) + } + + override fun install(context: Context, item: CatalogItem, root: java.io.File) { + val app = context.applicationContext + if (item.extra["entitlementId"].isNullOrEmpty()) { + StoresState.logLine("amazon: \"${item.title}\" has no entitlement to download with") + return + } + val folder = StoreInstallRoot.folderFor(app, Store.AMAZON, item.id, item.title, root) + val entry = DownloadEntry( + Store.AMAZON, item.id, item.title, cover = item.imageUrl, bytesTotal = item.sizeBytes, + location = StoreInstallRoot.labelFor(app, folder), + ) + DownloadQueue.enqueue(app, entry) { AmazonInstaller(app, item, folder) } } override fun uninstall(context: Context, game: InstalledStoreGame) {} - - private class InstallJob(val app: Context, val game: AmazonGame, val item: CatalogItem, val folder: File) : DownloadQueue.DownloadJob { - private val cancelled = AtomicBoolean(false) - - override fun run(handle: DownloadQueue.JobHandle): String? { - handle.stage(DownloadStage.MANIFEST, "Checking sign-in…") - val token = AmazonCredentialStore.getValidAccessToken(app) ?: throw AmazonDownloadManager.InstallException("Not signed in to Amazon Games") - StoreInstalls.begin(folder, Store.AMAZON, game.productId, game.title, item.tallImageUrl ?: item.imageUrl, item.imageUrl) - var downloading = false - val result = AmazonDownloadManager.install(app, game, token, folder, cancelled, object : AmazonDownloadManager.Callback { - override fun onProgress(message: String, pct: Int) { - when { - message.startsWith("Finishing") -> handle.stage(DownloadStage.INSTALL, message) - message.startsWith("Downloading") && !message.startsWith("Downloading manifest") -> { if (!downloading) { downloading = true; handle.stage(DownloadStage.DOWNLOAD, message) } else handle.progress(-1, -1, message) } - else -> handle.stage(DownloadStage.MANIFEST, message) - } - } - override fun onBytes(done: Long, total: Long, speedBps: Long) { handle.progress(done, total, null, speedBps) } - override fun onLog(line: String) { handle.log(line) } - override fun onSizes(downloadBytes: Long, diskBytes: Long) { handle.diskSize(diskBytes) } - }) ?: return null - if (cancelled.get()) return null - handle.stage(DownloadStage.INSTALL, "Registering with Steam…") - AmazonLibrary.rememberSize(app, game.productId, result.bytes) - AmazonPrefs.get(app).edit().putString("version_${game.productId}", result.versionId).apply() - val spec = AmazonLaunchHelper.buildLaunchSpec(folder, game.title) - val exe = spec.exeRelative.ifEmpty { StoreExe.pick(folder, null, game.title) } - if (exe.isEmpty()) handle.log("amazon: no exe found in ${folder.name}; pick one in Steam settings › Added games") - val env = LinkedHashMap<String, String>() - for (kv in AmazonLaunchHelper.buildFuelEnv(game.entitlementId, game.productSku, com.droiddeck.launcher.stores.StoreAccounts.signedInAs(app, Store.AMAZON)?.takeIf { it != Store.AMAZON.label })) env[kv.substringBefore('=')] = kv.substringAfter('=') - val sidecar = StoreGameSidecar( - Store.AMAZON, game.productId, game.title, exe = exe.ifEmpty { "game.exe" }, args = spec.args, env = env, - installVersion = result.versionId ?: "", installedAt = System.currentTimeMillis(), - cover = item.tallImageUrl ?: item.imageUrl, hero = item.imageUrl, - extra = mapOf("entitlementId" to game.entitlementId, "sku" to game.productSku), - ) - StoreInstalls.complete(app, folder, onStep = { done, steps -> handle.stageProgress(done.toLong(), steps.toLong()) }, sidecar = sidecar) - return folder.path - } - - override fun cancel(deleteFiles: Boolean) { - cancelled.set(true) - if (deleteFiles) StoreInstalls.discard(app, folder, emptyList()) - } - } - - /** Amazon's device sign-in: a PKCE challenge on the sign-in page, the code on the return URL, a device registration for tokens. */ - private class LoginFlow : StoreLoginActivity.Flow { - private val serial = AmazonPkce.generateDeviceSerial() - private val clientId = AmazonPkce.generateClientId(serial) - private val verifier = AmazonPkce.generateCodeVerifier() - override val startUrl: String = "https://www.amazon.com/ap/signin" + - "?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0" + - "&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select" + - "&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select" + - "&openid.mode=checkid_setup&openid.oa2.scope=device_auth_access" + - "&openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.response_type=code" + - "&openid.oa2.code_challenge_method=S256&openid.oa2.client_id=device%3A$clientId" + - "&language=en_US&marketPlaceId=ATVPDKIKX0DER&openid.return_to=https%3A%2F%2Fwww.amazon.com" + - "&openid.pape.max_auth_age=0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0" + - "&openid.assoc_handle=amzn_sonic_games_launcher&pageId=amzn_sonic_games_launcher" + - "&openid.oa2.code_challenge=${AmazonPkce.generateCodeChallenge(verifier)}" - override val userAgent: String get() = AmazonAuthClient.USER_AGENT - override fun isRedirect(url: String): Boolean = url.contains("openid.oa2.authorization_code=") - - override fun finish(activity: StoreLoginActivity, view: WebView, url: String): String? { - val code = Uri.parse(url).getQueryParameter("openid.oa2.authorization_code") - if (code.isNullOrEmpty()) { Log.w(TAG, "login: return URL without a code"); return activity.getString(com.droiddeck.launcher.R.string.stores_login_error_verification) } - val result = AmazonAuthClient.registerDevice(code, verifier, serial, clientId) ?: return activity.getString(com.droiddeck.launcher.R.string.stores_login_error_generic) - AmazonCredentialStore.save(activity, result.accessToken, result.refreshToken, result.deviceSerial ?: serial, clientId, System.currentTimeMillis() + result.expiresIn * 1000L, result.name) - Log.i(TAG, "signed in") - return null - } - } } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonCredentialStore.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonCredentialStore.kt index 95944375df..97973a540e 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonCredentialStore.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonCredentialStore.kt @@ -6,57 +6,102 @@ import com.droiddeck.launcher.stores.Store import com.droiddeck.launcher.stores.StoreAccounts import org.json.JSONObject -/** - * The Amazon sign-in in StoreAccounts' private file: the bearer tokens, the device serial and - * client id the registration was made with (the entitlements call hashes the serial), the expiry. - */ object AmazonCredentialStore { - private const val TAG = "AmazonAuth" + private const val TAG = "AmazonCredentials" + private const val REFRESH_MARGIN_MS = 5 * 60 * 1000L + private val refreshLock = Any() - class Credentials(val accessToken: String, val refreshToken: String?, val deviceSerial: String, val clientId: String, val expiresAt: Long) + const val ACCESS_TOKEN = "access_token" + const val REFRESH_TOKEN = "refresh_token" + const val DEVICE_SERIAL = "device_serial" + const val CLIENT_ID = "client_id" + const val EXPIRES_AT = "expires_at" + const val DISPLAY_NAME = "display_name" - @JvmStatic - fun save(context: Context, accessToken: String, refreshToken: String?, deviceSerial: String, clientId: String, expiresAt: Long, displayName: String?) { - val json = StoreAccounts.read(context, Store.AMAZON) ?: JSONObject() - json.put("access_token", accessToken).put("device_serial", deviceSerial).put("client_id", clientId).put("expires_at", expiresAt) - if (!refreshToken.isNullOrEmpty()) json.put("refresh_token", refreshToken) - if (!displayName.isNullOrEmpty()) json.put("display_name", displayName) - StoreAccounts.write(context, Store.AMAZON, json) + class Account( + val accessToken: String, + val refreshToken: String, + val deviceSerial: String, + val clientId: String, + val expiresAt: Long, + val displayName: String, + ) + + internal fun fromJson(o: JSONObject): Account? { + val access = o.optString(ACCESS_TOKEN, "").ifEmpty { return null } + return Account( + accessToken = access, + refreshToken = o.optString(REFRESH_TOKEN, ""), + deviceSerial = o.optString(DEVICE_SERIAL, ""), + clientId = o.optString(CLIENT_ID, ""), + expiresAt = o.optLong(EXPIRES_AT, 0L), + displayName = o.optString(DISPLAY_NAME, ""), + ) } @JvmStatic - fun load(context: Context): Credentials? { - val json = StoreAccounts.read(context, Store.AMAZON) ?: return null - val token = json.optString("access_token", "").ifEmpty { return null } - return Credentials(token, json.optString("refresh_token", "").ifEmpty { null }, json.optString("device_serial", ""), json.optString("client_id", ""), json.optLong("expires_at", 0L)) - } + fun load(context: Context): Account? = StoreAccounts.read(context.applicationContext, Store.AMAZON)?.let(::fromJson) - @JvmStatic fun isLoggedIn(context: Context): Boolean = load(context) != null - /** A fresh access token whatever the stored expiry says: for a call Amazon refused with the stored one. */ - @JvmStatic - fun refresh(context: Context): String? { - val creds = load(context) ?: return null - val result = AmazonAuthClient.refreshAccessToken(creds.refreshToken ?: return null) ?: return null - save(context, result.accessToken, creds.refreshToken, creds.deviceSerial, creds.clientId, System.currentTimeMillis() + result.expiresIn * 1000L, null) - Log.i(TAG, "token refreshed (forced)") - return result.accessToken + internal fun saveSignIn(context: Context, answer: JSONObject) { + val access = answer.optString(ACCESS_TOKEN, "") + require(access.isNotEmpty()) { "no access token" } + val record = JSONObject() + .put(ACCESS_TOKEN, access) + .put(DEVICE_SERIAL, answer.optString(DEVICE_SERIAL, "")) + .put(CLIENT_ID, answer.optString(CLIENT_ID, "")) + .put(EXPIRES_AT, answer.optLong(EXPIRES_AT, 0L)) + answer.optString(REFRESH_TOKEN, "").takeIf { it.isNotEmpty() }?.let { record.put(REFRESH_TOKEN, it) } + answer.optString(DISPLAY_NAME, "").takeIf { it.isNotEmpty() }?.let { record.put(DISPLAY_NAME, it) } + StoreAccounts.write(context.applicationContext, Store.AMAZON, record) + } + + private fun saveRefreshed(context: Context, before: Account, access: String, expiresAt: Long) { + val app = context.applicationContext + val record = StoreAccounts.read(app, Store.AMAZON) ?: return + record.put(ACCESS_TOKEN, access) + .put(DEVICE_SERIAL, before.deviceSerial) + .put(CLIENT_ID, before.clientId) + .put(EXPIRES_AT, expiresAt) + StoreAccounts.write(app, Store.AMAZON, record) + } + + private fun fresh(a: Account): Boolean = + a.expiresAt - System.currentTimeMillis() > REFRESH_MARGIN_MS || a.refreshToken.isEmpty() + + private fun unexpired(a: Account): String? = + a.accessToken.takeIf { a.expiresAt <= 0 || a.expiresAt > System.currentTimeMillis() } + + private fun refreshLocked(context: Context, a: Account): String? { + if (a.refreshToken.isEmpty()) return null + val answer = AmazonNative.call("auth.refresh", JSONObject().put("refreshToken", a.refreshToken)) + val access = answer?.takeIf { !it.has("error") }?.optString(ACCESS_TOKEN, "").orEmpty() + if (access.isEmpty()) { + Log.w(TAG, "token refresh failed: ${answer?.optString("error").orEmpty().ifEmpty { "no answer" }}") + return null + } + val expiresAt = answer!!.optLong(EXPIRES_AT, System.currentTimeMillis() + 3_600_000L) + saveRefreshed(context, a, access, expiresAt) + return access } - /** A valid access token, refreshed within five minutes of expiry; null when signed out or the refresh failed. */ @JvmStatic fun getValidAccessToken(context: Context): String? { - val creds = load(context) ?: return null - if (creds.expiresAt - System.currentTimeMillis() < 5L * 60L * 1000L && creds.refreshToken != null) { - val result = AmazonAuthClient.refreshAccessToken(creds.refreshToken) - if (result != null) { - save(context, result.accessToken, creds.refreshToken, creds.deviceSerial, creds.clientId, System.currentTimeMillis() + result.expiresIn * 1000L, null) - Log.i(TAG, "token refreshed") - return result.accessToken - } - Log.w(TAG, "token refresh failed; using the stored token") + val current = load(context) ?: return null + if (fresh(current)) return current.accessToken + synchronized(refreshLock) { + val again = load(context) ?: return null + if (fresh(again)) return again.accessToken + return refreshLocked(context, again) ?: unexpired(again) + } + } + + fun refreshNow(context: Context, staleToken: String?): String? { + synchronized(refreshLock) { + val current = load(context) ?: return null + if (staleToken != null && current.accessToken != staleToken) return current.accessToken + return refreshLocked(context, current) } - return creds.accessToken } } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonDownloadManager.java b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonDownloadManager.java deleted file mode 100644 index 82a8b23ea4..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonDownloadManager.java +++ /dev/null @@ -1,288 +0,0 @@ -package com.droiddeck.launcher.stores.amazon; - -import android.content.Context; -import android.util.Log; - -import com.droiddeck.launcher.stores.StoreLog; -import com.droiddeck.launcher.stores.download.StoreDownloadTier; - -import org.json.JSONArray; -import org.json.JSONObject; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.MessageDigest; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicLong; - -/** - * The Amazon Games install pipeline, ported from Bannerlator: GetGameDownload for the download - * root and version, `manifest.proto`, then every file fetched (the native engine when it is - * there, eight Java threads otherwise), SHA-256 checked, written as `.tmp` and renamed. A - * complete file on disk is skipped by size, so a rerun resumes. Blocking; the queue runs it. - */ -public final class AmazonDownloadManager { - - private static final String TAG = "AmazonDownload"; - private static final int MAX_PARALLEL = 8; - private static final int MAX_RETRIES = 3; - private static final long PROGRESS_INTERVAL = 512L * 1024L; - private static final String DOWNLOAD_USER_AGENT = "nile/0.1 Amazon"; - private static final String IN_PROGRESS_MARKER = ".amazon_download_in_progress"; - private static final String COMPLETE_MARKER = ".amazon_download_complete"; - - public interface Callback { - void onProgress(String message, int pct); - default void onBytes(long done, long total, long speedBps) {} - default void onLog(String line) {} - /** What this run fetches and what the game takes on disk. */ - default void onSizes(long downloadBytes, long diskBytes) {} - } - - public static final class Result { - public final String versionId; - public final long bytes; - Result(String versionId, long bytes) { this.versionId = versionId; this.bytes = bytes; } - } - - public static final class InstallException extends Exception { - InstallException(String message) { super(message); } - } - - private AmazonDownloadManager() {} - - /** Installs the game into {@code installDir}; null when cancelled, an exception when it fails. */ - public static Result install(Context ctx, AmazonGame game, String accessToken, File installDir, AtomicBoolean cancel, Callback cb) throws InstallException { - if (game.entitlementId == null || game.entitlementId.isEmpty()) throw new InstallException("This game has no entitlement to download with"); - try { - installDir.mkdirs(); - new File(installDir, IN_PROGRESS_MARKER).createNewFile(); - cb.onProgress("Asking Amazon for the download…", 0); - AmazonApiClient.GameDownloadSpec spec = AmazonApiClient.getGameDownload(accessToken, game.entitlementId); - if (spec == null) throw new InstallException("Amazon gave no download for this game"); - cb.onLog("amazon: version " + spec.versionId); - cb.onProgress("Downloading manifest…", 1); - byte[] manifestBytes = AmazonApiClient.getBytes(AmazonApiClient.appendPath(spec.downloadUrl, "manifest.proto"), accessToken); - if (manifestBytes == null) throw new InstallException("The manifest could not be downloaded"); - AmazonManifest.ParsedManifest manifest = AmazonManifest.parse(manifestBytes); - cb.onLog("amazon: " + manifest.allFiles.size() + " files, " + fmt(manifest.totalInstallSize)); - long usable = installDir.getUsableSpace(); - if (manifest.totalInstallSize > 0 && usable > 0 && manifest.totalInstallSize > usable) - throw new InstallException("Not enough free space: need " + fmt(manifest.totalInstallSize) + ", only " + fmt(usable) + " free"); - cb.onSizes(manifest.totalInstallSize, manifest.totalInstallSize); - cb.onBytes(0, manifest.totalInstallSize, 0); - if (cancel.get()) return null; - - AtomicLong downloaded = new AtomicLong(0); - AtomicLong lastEmit = new AtomicLong(0); - AtomicLong lastSpeedMs = new AtomicLong(System.currentTimeMillis()); - AtomicLong lastSpeedBytes = new AtomicLong(0); - AtomicLong speedBps = new AtomicLong(0); - List<AmazonManifest.ManifestFile> files = manifest.allFiles; - final long total = manifest.totalInstallSize; - - if (AmazonNative.isAvailable()) { - if (!downloadAllNative(ctx, spec.downloadUrl, files, total, installDir, downloaded, lastEmit, lastSpeedMs, lastSpeedBytes, speedBps, cancel, cb)) { - if (cancel.get()) return null; - throw new InstallException("A file failed to download"); - } - } else { - cb.onLog("amazon: engine=built-in (" + MAX_PARALLEL + " threads)"); - ExecutorService pool = Executors.newFixedThreadPool(MAX_PARALLEL, com.droiddeck.launcher.stores.download.DownloadQueue.workerFactory("amazon-dl")); - List<Future<Boolean>> futures = new ArrayList<>(); - for (AmazonManifest.ManifestFile file : files) { - final String dlUrl = spec.downloadUrl; - futures.add(pool.submit(() -> downloadFileWithRetry(file, dlUrl, installDir, downloaded, lastEmit, total, lastSpeedMs, lastSpeedBytes, speedBps, cb, cancel))); - } - pool.shutdown(); - try { - for (Future<Boolean> f : futures) { - if (!f.get()) { - pool.shutdownNow(); - if (cancel.get()) return null; - throw new InstallException("A file failed to download"); - } - } - } catch (InstallException e) { - throw e; - } catch (Exception e) { - pool.shutdownNow(); - throw new InstallException("download pool error: " + e.getClass().getSimpleName()); - } - } - if (cancel.get()) return null; - cb.onProgress("Finishing…", 98); - new File(installDir, IN_PROGRESS_MARKER).delete(); - new File(installDir, COMPLETE_MARKER).createNewFile(); - return new Result(spec.versionId, total); - } catch (InstallException e) { - throw e; - } catch (Exception e) { - Log.w(TAG, "install failed", e); - throw new InstallException(e.getClass().getSimpleName() + (e.getMessage() != null ? ": " + e.getMessage() : "")); - } - } - - /** One entry per manifest file with the exact URL the Java loop would open and the SHA-256 when it would check it. */ - static String buildPlan(List<AmazonManifest.ManifestFile> files, String baseUrl) { - JSONArray arr = new JSONArray(); - try { - for (AmazonManifest.ManifestFile file : files) { - String hashHex = file.hashHex(); - arr.put(new JSONObject().put("relPath", file.unixPath()).put("url", AmazonApiClient.appendPath(baseUrl, "files/" + hashHex)) - .put("size", file.size).put("sha256hex", (file.hashAlgorithm == 0 && file.hashBytes.length > 0) ? hashHex : "")); - } - } catch (Exception e) { - Log.e(TAG, "plan failed", e); - return ""; - } - return arr.toString(); - } - - private static boolean downloadAllNative(Context ctx, String baseUrl, List<AmazonManifest.ManifestFile> files, long totalSize, File installDir, - AtomicLong totalDownloaded, AtomicLong lastEmit, AtomicLong lastSpeedMs, AtomicLong lastSpeedBytes, AtomicLong speedBps, - AtomicBoolean cancel, Callback cb) { - String plan = buildPlan(files, baseUrl); - if (plan.isEmpty()) return false; - StoreDownloadTier tier = StoreDownloadTier.Companion.current(ctx); - int maxWorkers = Math.max(1, Math.min(128, tier.getNetworkWindow())); - int processWorkers = Math.max(Math.max(1, Runtime.getRuntime().availableProcessors() / 2), tier.getProcessWorkers()); - cb.onLog("amazon: engine=native workers=" + maxWorkers + " process_workers=" + processWorkers + " tier=" + tier.getId()); - AmazonNative.Listener listener = new AmazonNative.Listener() { - @Override public void onProgress(long bytesDone, long bytesTotal, long filesDone, long filesTotal) { - totalDownloaded.set(bytesDone); - long emit = lastEmit.get(); - if (bytesDone - emit >= PROGRESS_INTERVAL && lastEmit.compareAndSet(emit, bytesDone)) { - sampleSpeed(bytesDone, lastSpeedMs, lastSpeedBytes, speedBps); - cb.onProgress("Downloading (" + filesDone + "/" + filesTotal + " files)" + speedSuffix(speedBps.get()), (int) (bytesDone * 95L / Math.max(1, totalSize))); - cb.onBytes(bytesDone, totalSize, speedBps.get()); - } - } - @Override public void onLog(String line) { cb.onLog(line); } - @Override public void onComplete(boolean success, String error, long bytesWritten) { - cb.onLog("amazon: complete success=" + success + " bytes=" + bytesWritten + (error.isEmpty() ? "" : " error=" + error)); - } - }; - AmazonNative.RunResult result = AmazonNative.runBlocking(plan, installDir.getAbsolutePath(), "", maxWorkers, processWorkers, cancel::get, listener); - if (result.cancelled) return false; - if (!result.success) { cb.onLog("amazon: engine failed: " + result.error); return false; } - return true; - } - - private static boolean downloadFileWithRetry(AmazonManifest.ManifestFile file, String baseUrl, File installDir, AtomicLong totalDownloaded, AtomicLong lastEmit, long totalSize, - AtomicLong lastSpeedMs, AtomicLong lastSpeedBytes, AtomicLong speedBps, Callback cb, AtomicBoolean cancel) { - File destFile = new File(installDir, file.unixPath()); - File tmpFile = new File(installDir, file.unixPath() + ".tmp"); - if (destFile.exists() && destFile.length() == file.size) { totalDownloaded.addAndGet(file.size); return true; } - String fileUrl = AmazonApiClient.appendPath(baseUrl, "files/" + file.hashHex()); - for (int attempt = 1; attempt <= MAX_RETRIES; attempt++) { - destFile.getParentFile().mkdirs(); - try { - if (!downloadFile(fileUrl, tmpFile, totalDownloaded, lastEmit, totalSize, lastSpeedMs, lastSpeedBytes, speedBps, cb, cancel)) { tmpFile.delete(); return false; } - if (file.hashAlgorithm == 0 && file.hashBytes.length > 0 && !Arrays.equals(sha256(tmpFile), file.hashBytes)) { - cb.onLog("amazon: SHA-256 mismatch for " + file.unixPath()); - tmpFile.delete(); - if (attempt < MAX_RETRIES) { Thread.sleep(1000L << (attempt - 1)); continue; } - return false; - } - if (destFile.exists()) destFile.delete(); - return tmpFile.renameTo(destFile); - } catch (InterruptedException ie) { - Thread.currentThread().interrupt(); - tmpFile.delete(); - return false; - } catch (Exception e) { - cb.onLog("amazon: attempt " + attempt + " failed for " + file.unixPath() + ": " + e.getClass().getSimpleName()); - tmpFile.delete(); - if (attempt < MAX_RETRIES) { try { Thread.sleep(1000L << (attempt - 1)); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); return false; } } - } - } - return false; - } - - /** Streams one file; false = cancelled. */ - private static boolean downloadFile(String urlStr, File tmpFile, AtomicLong totalDownloaded, AtomicLong lastEmit, long totalSize, - AtomicLong lastSpeedMs, AtomicLong lastSpeedBytes, AtomicLong speedBps, Callback cb, AtomicBoolean cancel) throws IOException { - HttpURLConnection conn = (HttpURLConnection) new URL(urlStr).openConnection(); - conn.setConnectTimeout(30000); - conn.setReadTimeout(120000); - conn.setRequestProperty("User-Agent", DOWNLOAD_USER_AGENT); - int code = conn.getResponseCode(); - if (code < 200 || code >= 300) { conn.disconnect(); throw new IOException("HTTP " + code + " " + StoreLog.redactUrl(urlStr)); } - try (InputStream in = conn.getInputStream(); FileOutputStream out = new FileOutputStream(tmpFile)) { - byte[] buf = new byte[65536]; - int n; - while ((n = in.read(buf)) >= 0) { - if (cancel.get()) { conn.disconnect(); return false; } - out.write(buf, 0, n); - long dl = totalDownloaded.addAndGet(n); - long emit = lastEmit.get(); - if (dl - emit >= PROGRESS_INTERVAL && lastEmit.compareAndSet(emit, dl)) { - sampleSpeed(dl, lastSpeedMs, lastSpeedBytes, speedBps); - cb.onProgress("Downloading: " + tmpFile.getName().replace(".tmp", "") + speedSuffix(speedBps.get()), (int) (dl * 95L / Math.max(1, totalSize))); - cb.onBytes(dl, totalSize, speedBps.get()); - } - } - } finally { - conn.disconnect(); - } - return true; - } - - /** The install size from the manifest alone, or -1. Blocking. */ - public static long fetchInstallSizeBytes(String accessToken, String entitlementId) { - try { - AmazonApiClient.GameDownloadSpec spec = AmazonApiClient.getGameDownload(accessToken, entitlementId); - if (spec == null) return -1; - byte[] bytes = AmazonApiClient.getBytes(AmazonApiClient.appendPath(spec.downloadUrl, "manifest.proto"), accessToken); - if (bytes == null) return -1; - AmazonManifest.ParsedManifest m = AmazonManifest.parse(bytes); - return m.totalInstallSize > 0 ? m.totalInstallSize : -1; - } catch (Exception e) { - return -1; - } - } - - public static boolean isInstalled(File installDir) { return new File(installDir, COMPLETE_MARKER).exists(); } - - private static byte[] sha256(File file) throws Exception { - MessageDigest digest = MessageDigest.getInstance("SHA-256"); - try (FileInputStream fis = new FileInputStream(file)) { - byte[] buf = new byte[65536]; - int n; - while ((n = fis.read(buf)) >= 0) digest.update(buf, 0, n); - } - return digest.digest(); - } - - private static void sampleSpeed(long done, AtomicLong lastSpeedMs, AtomicLong lastSpeedBytes, AtomicLong speedBps) { - long nowMs = System.currentTimeMillis(), prevMs = lastSpeedMs.get(); - if (nowMs - prevMs >= 500 && lastSpeedMs.compareAndSet(prevMs, nowMs)) { - long prevB = lastSpeedBytes.getAndSet(done); - long dt = nowMs - prevMs; - if (dt > 0) speedBps.set((done - prevB) * 1000L / dt); - } - } - - private static String speedSuffix(long bps) { - if (bps <= 0) return ""; - return " " + (bps >= 1048576 ? String.format("%.1f MB/s", bps / 1048576.0) : (bps / 1024) + " KB/s"); - } - - private static String fmt(long bytes) { - if (bytes >= 1073741824L) return String.format("%.1f GB", bytes / 1073741824.0); - if (bytes >= 1048576L) return String.format("%.1f MB", bytes / 1048576.0); - return String.format("%.0f KB", bytes / 1024.0); - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonGame.java b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonGame.java deleted file mode 100644 index 891602b682..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonGame.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.droiddeck.launcher.stores.amazon; - -/** - * One Amazon Games library entry. {@code productId} ("amzn1.adg.product.…") names the game, - * {@code entitlementId} (the top-level UUID of GetEntitlements) is what GetGameDownload takes, - * {@code productSku} goes to the game as AMAZON_GAMES_FUEL_PRODUCT_SKU. - */ -public class AmazonGame { - public String productId = ""; - public String entitlementId = ""; - public String title = ""; - /** iconUrl: square art. */ - public String artUrl = ""; - /** backgroundUrl1: the wide background. */ - public String heroUrl = ""; - public String developer = ""; - public String publisher = ""; - public String productSku = ""; - public String versionId = ""; - public boolean isDLC = false; - public String parentProductId = ""; - - /** The id's last segment, for display when there is no title. */ - public String shortId() { - int dot = productId.lastIndexOf('.'); - return (dot >= 0 && dot < productId.length() - 1) ? productId.substring(dot + 1) : productId; - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonInstaller.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonInstaller.kt new file mode 100644 index 0000000000..7eff5fbbe9 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonInstaller.kt @@ -0,0 +1,136 @@ +package com.droiddeck.launcher.stores.amazon + +import android.content.Context +import com.droiddeck.launcher.R +import com.droiddeck.launcher.stores.CatalogItem +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreAccounts +import com.droiddeck.launcher.stores.StoreExe +import com.droiddeck.launcher.stores.StoreGameSidecar +import com.droiddeck.launcher.stores.StoreInstalls +import com.droiddeck.launcher.stores.download.DownloadQueue +import com.droiddeck.launcher.stores.download.DownloadStage +import com.droiddeck.launcher.stores.download.StoreDownloadTier +import org.json.JSONObject +import java.io.File +import java.util.concurrent.atomic.AtomicBoolean +import java.util.concurrent.atomic.AtomicLong + +internal class AmazonInstaller( + private val app: Context, + private val item: CatalogItem, + private val folder: File, +) : DownloadQueue.DownloadJob { + private val cancelled = AtomicBoolean(false) + + override fun run(handle: DownloadQueue.JobHandle): String? { + handle.stage(DownloadStage.MANIFEST, app.getString(R.string.stores_sync_sign_in)) + val token = AmazonCredentialStore.getValidAccessToken(app) ?: throw IllegalStateException("Not signed in to Amazon Games") + val entitlementId = item.extra["entitlementId"].orEmpty() + val sku = item.extra["sku"].orEmpty() + val cover = item.tallImageUrl ?: item.imageUrl + StoreInstalls.begin(folder, Store.AMAZON, item.id, item.title, cover, item.imageUrl) + if (cancelled.get()) return null + + val tier = StoreDownloadTier.current(app) + handle.log("amazon: \"${item.title}\" tier=${tier.id} window=${tier.networkWindow} process_workers=${tier.processWorkers}") + val request = JSONObject() + .put("accessToken", token) + .put("entitlementId", entitlementId) + .put("gameDir", folder.absolutePath) + .put("maxWorkers", tier.networkWindow.coerceIn(1, 128)) + .put("processWorkers", tier.processWorkers) + .put("caBundle", "") + + val shown = AtomicLong(-1) + val downloading = AtomicBoolean(false) + val prefs = AmazonPrefs.get(app) + val listener = object : AmazonNative.InstallListener { + override fun onStatus(text: String) { handle.stage(DownloadStage.MANIFEST, text) } + + override fun onCheck(doneBytes: Long, totalBytes: Long, files: Int, filesTotal: Int) { + handle.stage(DownloadStage.MANIFEST, "Checking files…") + handle.stageProgress(doneBytes, totalBytes, files, filesTotal, bytes = true) + } + + override fun onSizes(pendingBytes: Long, totalBytes: Long) { + handle.diskSize(totalBytes) + } + + override fun onProgress(done: Long, total: Long, files: Int, filesTotal: Int) { + if (downloading.compareAndSet(false, true)) handle.stage(DownloadStage.DOWNLOAD) + while (true) { + val before = shown.get() + if (done < before) return + if (shown.compareAndSet(before, done)) break + } + handle.progress(done, total, "Downloading ($files/$filesTotal files)") + } + + override fun onLog(line: String) { handle.log("amazon: $line") } + + override fun beforeReplace(): Boolean = try { + StoreInstalls.markUpdating(folder) + true + } catch (e: Exception) { + handle.log("amazon: the install record could not be switched to updating (${e.javaClass.simpleName})") + false + } + + override fun onComplete(success: Boolean, cancelled: Boolean, error: String, result: String) = Unit + } + + val outcome = AmazonNative.install(request, listener, cancelled) + if (outcome.cancelled || cancelled.get() && !outcome.success) return null + if (!outcome.success) throw IllegalStateException(outcome.error.ifEmpty { "The Amazon install failed" }) + val result = outcome.result ?: JSONObject() + + handle.stage(DownloadStage.INSTALL, "Finishing…") + val versionId = result.optString("versionId") + val total = result.optLong("totalBytes", 0L) + prefs.edit().apply { + if (total > 0) putLong("size_${item.id}", total) + putString("version_${item.id}", versionId) + }.apply() + + handle.stage(DownloadStage.INSTALL, app.getString(R.string.stores_registering)) + val spec = AmazonNative.call("launch.spec", JSONObject().put("gameDir", folder.absolutePath).put("title", item.title)) + ?: throw IllegalStateException(AmazonNative.ENGINE_MISSING) + spec.optString("warning").takeIf { it.isNotEmpty() && it != "null" }?.let { handle.log("amazon: $it") } + var exe = spec.optString("exe") + if (exe.isEmpty()) exe = StoreExe.pick(folder, null, item.title) + if (exe.isEmpty()) { + handle.log("amazon: no exe found in ${folder.name}; pick one in Steam settings › Added games") + exe = "game.exe" + } else { + handle.log("amazon: exe=$exe (${spec.optString("source").ifEmpty { "picker" }})") + } + val argList = spec.optJSONArray("args") + val args = List(argList?.length() ?: 0) { argList!!.optString(it) }.filter { it.isNotEmpty() } + + val display = StoreAccounts.signedInAs(app, Store.AMAZON).orEmpty() + val envAnswer = AmazonNative.call( + "launch.env", + JSONObject().put("entitlementId", entitlementId).put("sku", sku).put("displayName", display), + )?.optJSONArray("env") ?: throw IllegalStateException(AmazonNative.ENGINE_MISSING) + val env = LinkedHashMap<String, String>() + for (i in 0 until envAnswer.length()) { + val pair = envAnswer.optJSONArray(i) ?: continue + env[pair.optString(0)] = pair.optString(1) + } + + val sidecar = StoreGameSidecar( + Store.AMAZON, item.id, item.title, exe = exe, args = args, env = env, + installVersion = versionId, installedAt = System.currentTimeMillis(), + cover = cover, hero = item.imageUrl, + extra = mapOf("entitlementId" to entitlementId, "sku" to sku), + ) + StoreInstalls.complete(app, folder, sidecar, onStep = { done, steps -> handle.stageProgress(done.toLong(), steps.toLong()) }) + return folder.path + } + + override fun cancel(deleteFiles: Boolean) { + cancelled.set(true) + if (deleteFiles) StoreInstalls.discard(app, folder, emptyList()) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLaunchHelper.java b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLaunchHelper.java deleted file mode 100644 index bc1bba6677..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLaunchHelper.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.droiddeck.launcher.stores.amazon; - -import android.util.Log; - -import org.json.JSONArray; -import org.json.JSONObject; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Pattern; - -/** - * How an installed Amazon game is started: its `fuel.json` names the exe, a working subfolder and - * arguments when the publisher shipped one; otherwise the exe is scored (Unreal shipping binaries - * first, the title's name, never crash handlers or installers). The FuelPump variables the Amazon - * Games Services SDK reads go into the game's environment. - */ -public final class AmazonLaunchHelper { - - private static final String TAG = "AmazonLaunch"; - - public static final class LaunchSpec { - /** The exe relative to the install folder, forward slashes. */ - public String exeRelative = ""; - /** The arguments fuel.json names, in order. */ - public List<String> args = new ArrayList<>(); - } - - private AmazonLaunchHelper() {} - - public static LaunchSpec buildLaunchSpec(File installDir, String gameTitle) { - LaunchSpec spec = new LaunchSpec(); - String fuelCommand = null; - File fuelFile = new File(installDir, "fuel.json"); - if (fuelFile.exists()) { - try { - StringBuilder sb = new StringBuilder(); - try (BufferedReader br = new BufferedReader(new FileReader(fuelFile))) { - String line; - while ((line = br.readLine()) != null) sb.append(line); - } - JSONObject main = new JSONObject(sb.toString()).optJSONObject("Main"); - if (main != null) { - String cmd = main.optString("Command", "").trim(); - if (!cmd.isEmpty()) fuelCommand = cmd; - JSONArray argsArr = main.optJSONArray("Args"); - if (argsArr != null) for (int i = 0; i < argsArr.length(); i++) { - String a = argsArr.optString(i); - if (a != null && !a.isEmpty()) spec.args.add(a); - } - } - } catch (Exception e) { - Log.w(TAG, "fuel.json unreadable; choosing the exe by name"); - } - } - if (fuelCommand != null && new File(installDir, fuelCommand.replace('\\', '/')).isFile()) { - spec.exeRelative = fuelCommand.replace('\\', '/'); - } else { - File chosen = choosePrimaryExe(installDir, gameTitle); - if (chosen != null) spec.exeRelative = relativePath(installDir, chosen); - } - return spec; - } - - /** The FuelPump variables, as KEY=VALUE, for the game's environment. */ - public static String[] buildFuelEnv(String entitlementId, String productSku, String displayName) { - return new String[]{ - "FUEL_DIR=C:\\ProgramData\\Amazon Games Services\\Legacy", - "AMAZON_GAMES_SDK_PATH=C:\\ProgramData\\Amazon Games Services\\AmazonGamesSDK", - "AMAZON_GAMES_FUEL_ENTITLEMENT_ID=" + entitlementId, - "AMAZON_GAMES_FUEL_PRODUCT_SKU=" + productSku, - "AMAZON_GAMES_FUEL_DISPLAY_NAME=" + (displayName == null || displayName.isEmpty() ? "Player" : displayName), - }; - } - - private static final Pattern UE_SHIPPING = Pattern.compile(".*-win(32|64)(-shipping)?\\.exe$", Pattern.CASE_INSENSITIVE); - private static final Pattern UE_BINARIES = Pattern.compile(".*/binaries/win(32|64)/.*\\.exe$", Pattern.CASE_INSENSITIVE); - private static final Pattern GENERIC_NAME = Pattern.compile("^[a-z]\\d{1,3}\\.exe$", Pattern.CASE_INSENSITIVE); - private static final String[] NEGATIVE_KEYWORDS = { "crash", "handler", "viewer", "compiler", "tool", "setup", "unins", "eac", "launcher", "steam" }; - - private static boolean isLikelyStub(File f) { - String n = f.getName().toLowerCase(); - if (GENERIC_NAME.matcher(n).matches()) return true; - if (f.length() < 1_000_000L) return true; - for (String kw : NEGATIVE_KEYWORDS) if (n.contains(kw)) return true; - return false; - } - - static int scoreExe(File f, String gameNameLower) { - int score = 50; - String path = f.getAbsolutePath().replace('\\', '/').toLowerCase(); - if (UE_SHIPPING.matcher(path).matches()) score += 300; - if (UE_BINARIES.matcher(path).find()) score += 250; - String fn = f.getName().toLowerCase(); - String cleanGame = gameNameLower.replaceAll("[^a-z]", ""); - String cleanFile = fn.replaceAll("[^a-z]", ""); - boolean nameMatch = path.contains(gameNameLower) || (cleanGame.length() >= 5 && cleanFile.length() >= 5 && cleanGame.substring(0, 5).equals(cleanFile.substring(0, 5))); - if (nameMatch) score += 100; - for (String kw : NEGATIVE_KEYWORDS) if (path.contains(kw)) { score -= 150; break; } - if (GENERIC_NAME.matcher(fn).matches()) score -= 200; - return score; - } - - static File choosePrimaryExe(File installDir, String gameTitle) { - if (!installDir.isDirectory()) return null; - List<File> all = new ArrayList<>(); - collectExe(installDir, all); - if (all.isEmpty()) return null; - List<File> pool = new ArrayList<>(); - for (File f : all) if (!isLikelyStub(f)) pool.add(f); - if (pool.isEmpty()) pool = all; - String lowerTitle = gameTitle.toLowerCase(); - File best = null; - int bestScore = Integer.MIN_VALUE; - for (File f : pool) { - int s = scoreExe(f, lowerTitle); - if (best == null || s > bestScore || (s == bestScore && f.length() > best.length())) { best = f; bestScore = s; } - } - return best; - } - - private static void collectExe(File dir, List<File> out) { - File[] entries = dir.listFiles(); - if (entries == null) return; - for (File f : entries) { - if (f.isDirectory()) collectExe(f, out); - else if (f.getName().toLowerCase().endsWith(".exe")) out.add(f); - } - } - - private static String relativePath(File base, File absolute) { - String b = base.getAbsolutePath(); - if (!b.endsWith("/")) b += "/"; - String a = absolute.getAbsolutePath(); - return a.startsWith(b) ? a.substring(b.length()) : absolute.getName(); - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLibrary.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLibrary.kt index 197d6a8163..841fe9217a 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLibrary.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLibrary.kt @@ -1,132 +1,208 @@ package com.droiddeck.launcher.stores.amazon import android.content.Context -import android.content.SharedPreferences -import android.util.Log +import com.droiddeck.launcher.R import com.droiddeck.launcher.stores.CatalogItem import com.droiddeck.launcher.stores.Store import com.droiddeck.launcher.stores.StoreNet +import com.droiddeck.launcher.stores.StoreShelves import com.droiddeck.launcher.stores.StoresState +import com.droiddeck.launcher.stores.mergeItems import org.json.JSONArray import org.json.JSONObject -import java.util.concurrent.Callable import java.util.concurrent.Executors +import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean -/** - * The signed-in account's Amazon Games library: the entitlements, DLC folded under their base - * game, cached so the tab paints at once, re-synced when forced or 15 minutes stale. Amazon - * publishes a square icon and a wide background only, so a 2:3 poster per title is backfilled - * from SteamGridDB (a few per pass). Ported from Bannerlator's AmazonLibraryRepo. - */ +data class AmazonGame( + val productId: String, + val entitlementId: String, + val title: String, + val artUrl: String = "", + val heroUrl: String = "", + val developer: String = "", + val publisher: String = "", + val productSku: String = "", + val versionId: String = "", +) + object AmazonLibrary { - private const val TAG = "AmazonLibrary" - private const val CACHE_KEY = "library_cache" - private const val LAST_SYNC_KEY = "library_synced_at" - private const val THROTTLE_MS = 6L * 60L * 60L * 1000L - private const val POSTER_BUDGET = 40 + const val KEY_CACHE = "library_cache" + const val KEY_SYNCED_AT = "library_synced_at" + private const val THROTTLE_MS = 6 * 60 * 60 * 1000L + private const val POSTERS_PER_SYNC = 40 + private const val POSTER_THREADS = 4 + private const val STORE_URL = "https://gaming.amazon.com/home" - private val syncing = AtomicBoolean(false) + private val running = AtomicBoolean(false) + private val store = Store.AMAZON - sealed interface SyncResult { - class Ok(val games: List<AmazonGame>) : SyncResult - class Failed(val message: String) : SyncResult - object NotLoggedIn : SyncResult - object Busy : SyncResult - object Throttled : SyncResult + fun toCacheJson(games: List<AmazonGame>): String = JSONArray().apply { + for (g in games) put( + JSONObject() + .put("productId", g.productId).put("entitlementId", g.entitlementId).put("title", g.title) + .put("artUrl", g.artUrl).put("heroUrl", g.heroUrl).put("developer", g.developer) + .put("publisher", g.publisher).put("productSku", g.productSku).put("versionId", g.versionId), + ) + }.toString() + + fun fromCacheJson(text: String?): List<AmazonGame> { + if (text.isNullOrBlank()) return emptyList() + val array = runCatching { JSONArray(text) }.getOrNull() ?: return emptyList() + val games = (0 until array.length()).mapNotNull { array.optJSONObject(it) }.mapNotNull { o -> + AmazonGame( + productId = o.optString("productId", "").ifEmpty { return@mapNotNull null }, + entitlementId = o.optString("entitlementId", ""), + title = o.optString("title", ""), + artUrl = o.optString("artUrl", ""), + heroUrl = o.optString("heroUrl", ""), + developer = o.optString("developer", ""), + publisher = o.optString("publisher", ""), + productSku = o.optString("productSku", ""), + versionId = o.optString("versionId", ""), + ) + } + return tidy(games) } - fun cached(context: Context): List<AmazonGame> { - val json = AmazonPrefs.get(context).getString(CACHE_KEY, null) ?: return emptyList() - return runCatching { - val arr = JSONArray(json) - val out = ArrayList<AmazonGame>(arr.length()) - for (i in 0 until arr.length()) { - val j = arr.optJSONObject(i) ?: continue - val g = AmazonGame() - g.productId = j.optString("productId", ""); g.entitlementId = j.optString("entitlementId", ""); g.title = j.optString("title", "") - g.artUrl = j.optString("artUrl", ""); g.heroUrl = j.optString("heroUrl", ""); g.developer = j.optString("developer", "") - g.publisher = j.optString("publisher", ""); g.productSku = j.optString("productSku", ""); g.versionId = j.optString("versionId", "") - if (g.productId.isNotEmpty()) out.add(g) - } - out.distinctBy { it.productId }.sortedBy { it.title.lowercase() } - }.getOrDefault(emptyList()) + private fun tidy(games: List<AmazonGame>): List<AmazonGame> = + games.distinctBy { it.productId }.sortedBy { it.title.lowercase() } + + fun cached(context: Context): List<AmazonGame> = fromCacheJson(AmazonPrefs.get(context).getString(KEY_CACHE, null)) + + fun forget(context: Context) { + AmazonPrefs.get(context).edit().remove(KEY_CACHE).remove(KEY_SYNCED_AT).apply() } - fun poster(context: Context, productId: String): String? = AmazonPrefs.get(context).getString("vcover_$productId", null)?.ifBlank { null } - - fun rememberSize(context: Context, productId: String, bytes: Long) { - if (bytes > 0) AmazonPrefs.get(context).edit().putLong("size_$productId", bytes).apply() + fun toCatalogItem(context: Context, game: AmazonGame): CatalogItem { + val prefs = AmazonPrefs.get(context) + val poster = prefs.getString("vcover_${game.productId}", null)?.takeIf { it.isNotBlank() } + val art = game.artUrl.ifEmpty { null } + val hero = game.heroUrl.ifEmpty { null } + val tags = listOf(game.developer, game.publisher.takeIf { it != game.developer }.orEmpty()) + .filter { it.isNotBlank() } + .joinToString(", ") + return CatalogItem( + store = store, + id = game.productId, + title = game.title.ifBlank { game.productId.substringAfterLast('.') }, + imageUrl = hero ?: art, + tallImageUrl = poster ?: art ?: hero, + tags = tags, + developer = game.developer, + owned = true, + sizeBytes = prefs.getLong("size_${game.productId}", 0L).takeIf { it > 0 } ?: 0L, + storeUrl = STORE_URL, + extra = mapOf("entitlementId" to game.entitlementId, "sku" to game.productSku, "version" to ""), + ) } - fun sync(context: Context, force: Boolean = false, onStatus: (String) -> Unit = {}): SyncResult { - if (!syncing.compareAndSet(false, true)) return SyncResult.Busy - try { - val app = context.applicationContext - val p = AmazonPrefs.get(app) - val cachedList = cached(app) - if (!force && cachedList.isNotEmpty() && System.currentTimeMillis() - p.getLong(LAST_SYNC_KEY, 0L) < THROTTLE_MS) { - backfillPosters(p, cachedList, onStatus) - return SyncResult.Throttled - } - onStatus("Checking sign-in…") - val creds = AmazonCredentialStore.load(app) ?: return SyncResult.NotLoggedIn - val token = AmazonCredentialStore.getValidAccessToken(app) ?: return SyncResult.Failed(StoresState.notSignedInLine(Store.AMAZON)) - onStatus("Fetching game list…") - // Refused with the stored token (revoked, or an expiry read wrong): once more on a fresh one. - val all = AmazonApiClient.getEntitlements(token, creds.deviceSerial) - ?: AmazonCredentialStore.refresh(app)?.let { AmazonApiClient.getEntitlements(it, creds.deviceSerial) } - if (all == null) return if (cachedList.isEmpty()) SyncResult.Failed("Amazon Games did not answer for your library: refresh, or sign in again") else SyncResult.Ok(cachedList) - if (all.isEmpty()) return if (cachedList.isEmpty()) SyncResult.Failed("No games found in your Amazon library") else SyncResult.Ok(cachedList) - val games = all.filter { !(it.isDLC && it.parentProductId.isNotEmpty()) }.ifEmpty { all } - .sortedWith { a, b -> a.title.compareTo(b.title, ignoreCase = true) } - for (fresh in games) cachedList.firstOrNull { it.productId == fresh.productId }?.let { fresh.versionId = it.versionId } - saveCache(p, games) - p.edit().putLong(LAST_SYNC_KEY, System.currentTimeMillis()).apply() - backfillPosters(p, games, onStatus) - Log.i(TAG, "sync: entitlements=${all.size} games=${games.size}") - return SyncResult.Ok(games) - } catch (e: Exception) { - Log.w(TAG, "sync failed: ${e.message}") - return SyncResult.Failed(e.message ?: "Sync failed") - } finally { - syncing.set(false) + private fun publish(app: Context, games: List<AmazonGame>) { + val items = games.map { toCatalogItem(app, it) } + StoresState.post { + StoresState.library[store] = mergeItems(StoresState.library[store], items) + val installed = StoresState.installed.filter { it.sidecar.store == store }.map { it.sidecar.id }.toSet() + StoresState.shelves[store] = StoreShelves(trending = items.filterNot { it.id in installed }, art = StoresState.shelves[store]?.art.orEmpty()) } } - private fun backfillPosters(p: SharedPreferences, games: List<AmazonGame>, onStatus: (String) -> Unit) { - val missing = games.filter { it.productId.isNotEmpty() && !p.contains("vcover_${it.productId}") }.take(POSTER_BUDGET) - if (missing.isEmpty()) return - onStatus("Fetching cover art…") - val pool = Executors.newFixedThreadPool(4) - val futures = missing.map { g -> pool.submit(Callable { g.productId to StoreNet.sgdbPoster(g.title) }) } - pool.shutdown() - val ed = p.edit() - for (f in futures) { - val (pid, url) = runCatching { f.get() }.getOrNull() ?: continue - // A miss is recorded as "" so it is not asked again every pass. - ed.putString("vcover_$pid", url) - } - ed.apply() - } - - private fun saveCache(p: SharedPreferences, games: List<AmazonGame>) { - runCatching { - val arr = JSONArray() - for (g in games) arr.put(JSONObject().put("productId", g.productId).put("entitlementId", g.entitlementId).put("title", g.title).put("artUrl", g.artUrl) - .put("heroUrl", g.heroUrl).put("developer", g.developer).put("publisher", g.publisher).put("productSku", g.productSku).put("versionId", g.versionId)) - p.edit().putString(CACHE_KEY, arr.toString()).apply() - } - } - - fun toCatalogItem(context: Context, g: AmazonGame): CatalogItem = CatalogItem( - store = Store.AMAZON, id = g.productId, title = g.title.ifBlank { g.shortId() }, - imageUrl = g.heroUrl.ifBlank { null } ?: g.artUrl.ifBlank { null }, - tallImageUrl = poster(context, g.productId) ?: g.artUrl.ifBlank { null } ?: g.heroUrl.ifBlank { null }, - tags = listOfNotNull(g.developer.ifBlank { null }, g.publisher.ifBlank { null }.takeIf { it != g.developer }).joinToString(", "), - developer = g.developer, owned = true, - sizeBytes = AmazonPrefs.get(context).getLong("size_${g.productId}", 0L), - storeUrl = "https://gaming.amazon.com/home", - extra = mapOf("entitlementId" to g.entitlementId, "sku" to g.productSku, "version" to (g.versionId ?: "")), + private fun gameFrom(o: JSONObject, before: AmazonGame?): AmazonGame = AmazonGame( + productId = o.optString("productId"), + entitlementId = o.optString("entitlementId"), + title = o.optString("title"), + artUrl = o.optString("art"), + heroUrl = o.optString("hero"), + developer = o.optString("developer"), + publisher = o.optString("publisher"), + productSku = o.optString("sku"), + versionId = before?.versionId.orEmpty(), ) + + private fun backfillPosters(app: Context, games: List<AmazonGame>) { + val prefs = AmazonPrefs.get(app) + val todo = games.filter { !prefs.contains("vcover_${it.productId}") }.take(POSTERS_PER_SYNC) + if (todo.isEmpty()) return + val pool = Executors.newFixedThreadPool(POSTER_THREADS) + try { + for (g in todo) pool.execute { + val poster = runCatching { StoreNet.sgdbPoster(g.title) }.getOrDefault("") + prefs.edit().putString("vcover_${g.productId}", poster).apply() + } + } finally { + pool.shutdown() + pool.awaitTermination(5, TimeUnit.MINUTES) + } + } + + private fun entitlements(token: String, serial: String): JSONObject? = + AmazonNative.call("library.entitlements", JSONObject().put("accessToken", token).put("deviceSerial", serial)) + + private fun failed(answer: JSONObject?): Boolean = answer == null || answer.has("error") + + fun sync(context: Context, force: Boolean) { + if (!running.compareAndSet(false, true)) return + val app = context.applicationContext + val prefs = AmazonPrefs.get(app) + val cache = cached(app) + val quiet = cache.isNotEmpty() && !force + fun status(id: Int) { if (!quiet) StoresState.post { StoresState.status[store] = app.getString(id) } } + fun problem(text: String?) { + StoresState.post { + StoresState.status.remove(store) + if (text == null) { + StoresState.problems.remove(store) + } else { + StoresState.problems[store] = text + } + } + } + try { + if (cache.isNotEmpty()) publish(app, cache) + if (!AmazonNative.ready()) return problem(AmazonNative.ENGINE_MISSING) + val syncedAt = prefs.getLong(KEY_SYNCED_AT, 0L) + if (!force && cache.isNotEmpty() && System.currentTimeMillis() - syncedAt in 0 until THROTTLE_MS) { + backfillPosters(app, cache) + publish(app, cache) + return problem(null) + } + + status(R.string.stores_sync_sign_in) + val account = AmazonCredentialStore.load(app) ?: return problem(StoresState.notSignedInLine(store)) + val token = AmazonCredentialStore.getValidAccessToken(app) ?: return problem(StoresState.notSignedInLine(store)) + status(R.string.stores_sync_game_list) + var answer = entitlements(token, account.deviceSerial) + if (failed(answer)) { + StoresState.logLine("amazon: library call failed (${answer?.optString("error").orEmpty().ifEmpty { "no answer" }}); refreshing the session") + AmazonCredentialStore.refreshNow(app, token)?.let { answer = entitlements(it, account.deviceSerial) } + } + val result = answer + when { + result != null && result.optBoolean("signIn", false) -> return problem(StoresState.notSignedInLine(store)) + failed(result) -> { + StoresState.logLine("amazon: library sync failed: ${result?.optString("error").orEmpty().ifEmpty { "no answer" }}") + return problem(if (cache.isEmpty()) app.getString(R.string.stores_sync_amazon_no_answer) else null) + } + } + val list = result!!.optJSONArray("games") ?: JSONArray() + if (list.length() == 0) { + return problem(if (cache.isEmpty()) app.getString(R.string.stores_sync_no_games, store.label) else null) + } + val before = cache.associateBy { it.productId } + val games = tidy( + (0 until list.length()).mapNotNull { list.optJSONObject(it) } + .filter { it.optString("productId").isNotEmpty() } + .map { gameFrom(it, before[it.optString("productId")]) }, + ) + prefs.edit().putString(KEY_CACHE, toCacheJson(games)).putLong(KEY_SYNCED_AT, System.currentTimeMillis()).apply() + StoresState.logLine("amazon: library has ${games.size} games (${result.optInt("total", games.size)} entitlements)") + status(R.string.stores_sync_cover_art) + backfillPosters(app, games) + publish(app, games) + problem(null) + } catch (e: Exception) { + problem(e.message ?: app.getString(R.string.stores_sync_failed)) + } finally { + running.set(false) + } + } } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLogin.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLogin.kt new file mode 100644 index 0000000000..1cc985df3a --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonLogin.kt @@ -0,0 +1,57 @@ +package com.droiddeck.launcher.stores.amazon + +import android.util.Log +import android.webkit.WebView +import com.droiddeck.launcher.R +import com.droiddeck.launcher.stores.StoreLoginActivity +import org.json.JSONObject + +internal class AmazonLogin private constructor( + override val startUrl: String, + override val userAgent: String, + private val marker: String, + private val serial: String, + private val clientId: String, + private val verifier: String, +) : StoreLoginActivity.Flow { + override fun isRedirect(url: String): Boolean = url.contains(marker) + + override fun finish(activity: StoreLoginActivity, view: WebView, url: String): String? { + val answer = AmazonNative.call( + "auth.register", + JSONObject().put("url", url).put("serial", serial).put("clientId", clientId).put("verifier", verifier), + ) + if (answer != null && answer.optBoolean("noCode", false)) { + Log.w(TAG, "the return URL carried no authorization code") + return activity.getString(R.string.stores_login_error_verification) + } + if (answer == null || answer.has("error")) { + Log.w(TAG, "registration failed: ${answer?.optString("error").orEmpty().ifEmpty { "no answer" }}") + return activity.getString(R.string.stores_login_error_generic) + } + return try { + AmazonCredentialStore.saveSignIn(activity, answer) + null + } catch (e: Exception) { + Log.w(TAG, "saving the sign-in failed: ${e.javaClass.simpleName}") + activity.getString(R.string.stores_login_error_generic) + } + } + + companion object { + private const val TAG = "AmazonLogin" + + fun create(): StoreLoginActivity.Flow? { + val start = AmazonNative.call("auth.start") ?: return null + if (start.has("error")) return null + return AmazonLogin( + startUrl = start.optString("startUrl").ifEmpty { return null }, + userAgent = start.optString("userAgent"), + marker = start.optString("redirectMarker").ifEmpty { return null }, + serial = start.optString("serial"), + clientId = start.optString("clientId"), + verifier = start.optString("verifier"), + ) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonManifest.java b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonManifest.java deleted file mode 100644 index 25fb031788..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonManifest.java +++ /dev/null @@ -1,158 +0,0 @@ -package com.droiddeck.launcher.stores.amazon; - -import org.tukaani.xz.LZMAInputStream; -import org.tukaani.xz.XZInputStream; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * Amazon's `manifest.proto`: a big-endian header length, a ManifestHeader protobuf naming the - * compression, then an LZMA (or XZ) body holding the Manifest protobuf - packages of files, each - * with a Windows path, a size and a SHA-256. Read with a tiny protobuf walker; the XZ library the - * app already carries does the decompression. - */ -public final class AmazonManifest { - - public static final class ManifestFile { - public final String path; - public final long size; - /** 0 = SHA-256. */ - public final int hashAlgorithm; - public final byte[] hashBytes; - - ManifestFile(String path, long size, int hashAlgorithm, byte[] hashBytes) { - this.path = path; this.size = size; this.hashAlgorithm = hashAlgorithm; this.hashBytes = hashBytes; - } - - public String unixPath() { return path.replace('\\', '/'); } - - public String hashHex() { - StringBuilder sb = new StringBuilder(); - for (byte b : hashBytes) sb.append(String.format("%02x", b & 0xFF)); - return sb.toString(); - } - } - - public static final class ParsedManifest { - public final List<ManifestFile> allFiles; - public final long totalInstallSize; - - ParsedManifest(List<ManifestFile> files) { - this.allFiles = files; - long total = 0; - for (ManifestFile f : files) total += f.size; - this.totalInstallSize = total; - } - } - - private AmazonManifest() {} - - public static ParsedManifest parse(byte[] data) throws IOException { - if (data == null || data.length < 4) throw new IOException("Manifest too short"); - int headerSize = ByteBuffer.wrap(data, 0, 4).order(ByteOrder.BIG_ENDIAN).getInt(); - if (headerSize < 0 || 4 + headerSize > data.length) throw new IOException("Invalid header size " + headerSize); - byte[] body = Arrays.copyOfRange(data, 4 + headerSize, data.length); - return parseManifest(decompress(body)); - } - - private static byte[] decompress(byte[] body) throws IOException { - if (body.length < 2) return body; - boolean isXz = (body[0] & 0xFF) == 0xFD && (body[1] & 0xFF) == 0x37; - try (InputStream in = isXz ? new XZInputStream(new ByteArrayInputStream(body), -1) : new LZMAInputStream(new ByteArrayInputStream(body), -1)) { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - byte[] buf = new byte[65536]; - int n; - while ((n = in.read(buf)) >= 0) bos.write(buf, 0, n); - return bos.toByteArray(); - } - } - - private static ParsedManifest parseManifest(byte[] bytes) { - List<ManifestFile> files = new ArrayList<>(); - ProtoReader r = new ProtoReader(bytes); - while (r.hasMore()) { - int tag = (int) r.readVarint(); - if ((tag >>> 3) == 1 && (tag & 7) == 2) parsePackage(r.readBytes(), files); else r.skip(tag & 7); - } - return new ParsedManifest(files); - } - - private static void parsePackage(byte[] bytes, List<ManifestFile> out) { - ProtoReader r = new ProtoReader(bytes); - while (r.hasMore()) { - int tag = (int) r.readVarint(); - int field = tag >>> 3, wire = tag & 7; - if (field == 2 && wire == 2) { ManifestFile f = parseFile(r.readBytes()); if (f != null) out.add(f); } - else r.skip(wire); - } - } - - private static ManifestFile parseFile(byte[] bytes) { - String path = ""; - long size = 0L; - int hashAlgo = 0; - byte[] hashValue = new byte[0]; - ProtoReader r = new ProtoReader(bytes); - while (r.hasMore()) { - int tag = (int) r.readVarint(); - int field = tag >>> 3, wire = tag & 7; - if (field == 1 && wire == 2) path = r.readString(); - else if (field == 3 && wire == 0) size = r.readVarint(); - else if (field == 5 && wire == 2) { - ProtoReader hr = new ProtoReader(r.readBytes()); - while (hr.hasMore()) { - int ht = (int) hr.readVarint(); - int hf = ht >>> 3, hw = ht & 7; - if (hf == 1 && hw == 0) hashAlgo = (int) hr.readVarint(); - else if (hf == 2 && hw == 2) hashValue = hr.readBytes(); - else hr.skip(hw); - } - } else r.skip(wire); - } - if (path.isEmpty()) return null; - return new ManifestFile(path, size, hashAlgo, hashValue); - } - - private static final class ProtoReader { - private final byte[] buf; - private int pos; - ProtoReader(byte[] buf) { this.buf = buf; } - boolean hasMore() { return pos < buf.length; } - long readVarint() { - long result = 0; - int shift = 0; - while (pos < buf.length) { - int b = buf[pos++] & 0xFF; - result |= (long) (b & 0x7F) << shift; - if ((b & 0x80) == 0) break; - shift += 7; - } - return result; - } - byte[] readBytes() { - int len = (int) readVarint(); - if (len < 0 || pos + len > buf.length) return new byte[0]; - byte[] out = Arrays.copyOfRange(buf, pos, pos + len); - pos += len; - return out; - } - String readString() { return new String(readBytes(), java.nio.charset.StandardCharsets.UTF_8); } - void skip(int wireType) { - switch (wireType) { - case 0: readVarint(); break; - case 1: pos += 8; break; - case 2: readBytes(); break; - case 5: pos += 4; break; - default: pos = buf.length; break; - } - } - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonManifest.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonManifest.kt new file mode 100644 index 0000000000..522c6fd220 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonManifest.kt @@ -0,0 +1,15 @@ +package com.droiddeck.launcher.stores.amazon + +import java.io.IOException + +class ParsedManifest(@JvmField val totalInstallSize: Long, @JvmField val fileCount: Int) + +object AmazonManifest { + @JvmStatic + @Throws(IOException::class) + fun parse(data: ByteArray): ParsedManifest { + val answer = AmazonNative.inspect(data) ?: throw IOException(AmazonNative.ENGINE_MISSING) + if (answer.has("error")) throw IOException(answer.optString("error")) + return ParsedManifest(answer.optLong("totalBytes", 0L), answer.optInt("files", 0)) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonNative.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonNative.kt index 511dc946f7..cbab62b842 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonNative.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonNative.kt @@ -1,84 +1,119 @@ -// JNI symbols depend on this package path and class name (app/src/main/rust/stores/JNI.md). package com.droiddeck.launcher.stores.amazon import android.util.Log +import com.droiddeck.launcher.BuildConfig import com.droiddeck.launcher.stores.StoresNative +import org.json.JSONObject import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit +import java.util.concurrent.atomic.AtomicBoolean -/** - * The native Amazon file fetcher in `libdroiddeckstores.so`: one streamed GET per manifest file, - * SHA-256 checked, written as `<dest>.tmp` and renamed. The manager keeps manifest, auth, markers - * and post-install; [runBlocking] mirrors the Java loop's shape and polls the cancel probe. - */ object AmazonNative { - const val TAG = "AmazonNative" - private const val CANCEL_POLL_MS = 100L + private const val TAG = "AmazonNative" + private const val CANCEL_POLL_MS = 250L - /** Callbacks from the engine; every method is called on a native thread. */ - interface Listener { - /** Once up front with the resume-skipped credit, then after each committed file; [bytesDone] includes skipped files. */ - fun onProgress(bytesDone: Long, bytesTotal: Long, filesDone: Long, filesTotal: Long) - /** One diagnostic line; the engine itself does not write to logcat. */ - fun onLog(line: String) - /** Exactly once, when the run succeeds, fails or is cancelled. */ - fun onComplete(success: Boolean, error: String, bytesWritten: Long) + const val ENGINE_MISSING = "Amazon Games: the store engine is not available" + + @Volatile private var configured = false + + fun ready(): Boolean { + if (!StoresNative.ensureLoaded()) return false + if (!configured) synchronized(this) { + if (!configured) { + runCatching { nativeConfigure(BuildConfig.VERSION_NAME) } + .onFailure { Log.w(TAG, "configure: ${it.javaClass.simpleName}") } + configured = true + } + } + return true } - fun interface CancelCheck { fun isCancelled(): Boolean } + fun call(op: String, request: JSONObject = JSONObject()): JSONObject? { + if (!ready()) return null + val text = try { + nativeCall(op, request.toString()) + } catch (t: Throwable) { + Log.w(TAG, "$op: ${t.javaClass.simpleName}") + null + } ?: return null + return runCatching { JSONObject(text) }.getOrNull() + } - class RunResult(@JvmField val success: Boolean, @JvmField val cancelled: Boolean, @JvmField val error: String, @JvmField val bytesWritten: Long) + fun fetch(op: String, request: JSONObject): ByteArray? { + if (!ready()) return null + return try { + nativeFetch(op, request.toString()) + } catch (t: Throwable) { + Log.w(TAG, "$op: ${t.javaClass.simpleName}") + null + } + } - @JvmStatic - fun isAvailable(): Boolean = StoresNative.available + fun inspect(manifest: ByteArray, request: JSONObject = JSONObject()): JSONObject? { + if (!ready()) return null + val text = try { + nativeInspect(manifest, request.toString()) + } catch (t: Throwable) { + Log.w(TAG, "inspect: ${t.javaClass.simpleName}") + null + } ?: return null + return runCatching { JSONObject(text) }.getOrNull() + } - /** - * Runs one download to completion. [planJson]: `[{relPath, url, size, sha256hex}]`, every - * manifest file (the engine skips complete ones itself). [maxWorkers] <= 0 = the engine's default. - */ - @JvmStatic - fun runBlocking(planJson: String, installDir: String, caBundlePath: String, maxWorkers: Int, processWorkers: Int, isCancelled: CancelCheck?, listener: Listener): RunResult { - if (!StoresNative.ensureLoaded()) return RunResult(false, false, "engine not built", 0L) - val latch = CountDownLatch(1) - var outcome: RunResult? = null - val bridge = object : Listener { - override fun onProgress(bytesDone: Long, bytesTotal: Long, filesDone: Long, filesTotal: Long) = listener.onProgress(bytesDone, bytesTotal, filesDone, filesTotal) - override fun onLog(line: String) = listener.onLog(line) - override fun onComplete(success: Boolean, error: String, bytesWritten: Long) { - outcome = RunResult(success, false, error, bytesWritten) - listener.onComplete(success, error, bytesWritten) - latch.countDown() + interface InstallListener { + fun onStatus(text: String) + fun onCheck(doneBytes: Long, totalBytes: Long, files: Int, filesTotal: Int) + fun onSizes(pendingBytes: Long, totalBytes: Long) + fun onProgress(done: Long, total: Long, files: Int, filesTotal: Int) + fun onLog(line: String) + fun beforeReplace(): Boolean + fun onComplete(success: Boolean, cancelled: Boolean, error: String, result: String) + } + + class InstallOutcome(val success: Boolean, val cancelled: Boolean, val error: String, val result: JSONObject?) + + fun install(request: JSONObject, events: InstallListener, cancelled: AtomicBoolean): InstallOutcome { + if (!ready()) return InstallOutcome(false, false, ENGINE_MISSING, null) + val done = CountDownLatch(1) + val holder = arrayOfNulls<InstallOutcome>(1) + val bridge = object : InstallListener by events { + override fun onComplete(success: Boolean, cancelled: Boolean, error: String, result: String) { + holder[0] = InstallOutcome(success, cancelled, error, result.takeIf { it.isNotEmpty() }?.let { runCatching { JSONObject(it) }.getOrNull() }) + done.countDown() } } val handle = try { - nativeStart(planJson, installDir, caBundlePath, maxWorkers, processWorkers, bridge) + nativeInstall(request.toString(), bridge) } catch (t: Throwable) { - Log.w(TAG, "nativeStart threw: ${t.javaClass.simpleName}: ${t.message}") - return RunResult(false, false, "nativeStart: ${t.javaClass.simpleName}", 0L) + return InstallOutcome(false, false, "The Amazon install could not start: ${t.javaClass.simpleName}", null) } - if (handle == 0L) return outcome ?: RunResult(false, false, "native start failed", 0L) - var cancelSent = false + if (handle == 0L) return holder[0] ?: InstallOutcome(false, false, "The Amazon install could not start", null) try { - while (!latch.await(CANCEL_POLL_MS, TimeUnit.MILLISECONDS)) { - if (!cancelSent && isCancelled?.isCancelled() == true) { nativeCancel(handle); cancelSent = true } + var forwarded = false + while (true) { + val finished = try { + done.await(CANCEL_POLL_MS, TimeUnit.MILLISECONDS) + } catch (e: InterruptedException) { + cancelled.set(true) + false + } + if (finished) break + if (!forwarded && cancelled.get()) { + nativeCancel(handle) + forwarded = true + } } - } catch (_: InterruptedException) { - Thread.currentThread().interrupt() - if (!cancelSent) { nativeCancel(handle); cancelSent = true } - try { latch.await(30, TimeUnit.SECONDS) } catch (_: InterruptedException) {} } finally { nativeRelease(handle) } - val r = outcome ?: RunResult(false, cancelSent, "no completion", 0L) - return RunResult(r.success && !cancelSent, cancelSent, r.error, r.bytesWritten) + return holder[0] ?: InstallOutcome(false, false, "The Amazon install ended without a result", null) } - @JvmStatic - private external fun nativeStart(planJson: String, installDir: String, caBundlePath: String, maxWorkers: Int, processWorkers: Int, listener: Listener): Long - - @JvmStatic - private external fun nativeCancel(handle: Long) - - @JvmStatic - private external fun nativeRelease(handle: Long) + @JvmStatic private external fun nativeConfigure(appVersion: String) + @JvmStatic private external fun nativeCall(op: String, request: String): String? + @JvmStatic private external fun nativeFetch(op: String, request: String): ByteArray? + @JvmStatic private external fun nativeInspect(manifest: ByteArray, request: String): String? + @JvmStatic private external fun nativeInstall(request: String, listener: InstallListener): Long + @JvmStatic private external fun nativeCancel(handle: Long) + @JvmStatic private external fun nativeRelease(handle: Long) } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonPkce.java b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonPkce.java deleted file mode 100644 index 9d0a064039..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonPkce.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.droiddeck.launcher.stores.amazon; - -import android.util.Base64; - -import java.nio.charset.StandardCharsets; -import java.security.MessageDigest; -import java.security.SecureRandom; -import java.util.UUID; - -/** The PKCE values Amazon's device sign-in takes, generated the way the Amazon Games launcher does. */ -public final class AmazonPkce { - private static final String DEVICE_TYPE = "A2UMVHOX7UP4V7"; - - private AmazonPkce() {} - - /** One per sign-in: a UUID as uppercase hex. */ - public static String generateDeviceSerial() { return UUID.randomUUID().toString().replace("-", "").toUpperCase(); } - - /** hex("serial#DEVICE_TYPE"). */ - public static String generateClientId(String serial) { - byte[] bytes = (serial + "#" + DEVICE_TYPE).getBytes(StandardCharsets.UTF_8); - StringBuilder sb = new StringBuilder(); - for (byte b : bytes) sb.append(String.format("%02x", b & 0xFF)); - return sb.toString(); - } - - public static String generateCodeVerifier() { - byte[] random = new byte[32]; - new SecureRandom().nextBytes(random); - return Base64.encodeToString(random, Base64.URL_SAFE | Base64.NO_PADDING | Base64.NO_WRAP); - } - - public static String generateCodeChallenge(String verifier) { - try { - byte[] hash = MessageDigest.getInstance("SHA-256").digest(verifier.getBytes(StandardCharsets.UTF_8)); - return Base64.encodeToString(hash, Base64.URL_SAFE | Base64.NO_PADDING | Base64.NO_WRAP); - } catch (Exception e) { - throw new RuntimeException("SHA-256 unavailable", e); - } - } - - /** SHA-256 of the input as uppercase hex: the entitlements call's hardwareHash. */ - public static String sha256Upper(String input) { - try { - byte[] hash = MessageDigest.getInstance("SHA-256").digest(input.getBytes(StandardCharsets.UTF_8)); - StringBuilder sb = new StringBuilder(); - for (byte b : hash) sb.append(String.format("%02x", b & 0xFF)); - return sb.toString().toUpperCase(); - } catch (Exception e) { - throw new RuntimeException("SHA-256 unavailable", e); - } - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonPrefs.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonPrefs.kt index 6469b63af2..fd7f3094a1 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonPrefs.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonPrefs.kt @@ -3,8 +3,9 @@ package com.droiddeck.launcher.stores.amazon import android.content.Context import android.content.SharedPreferences -/** Amazon's own records that are not credentials: the library cache, posters, versions. Public for the Java clients. */ object AmazonPrefs { + const val FILE = "stores.amazon" + @JvmStatic - fun get(context: Context): SharedPreferences = context.applicationContext.getSharedPreferences("stores.amazon", Context.MODE_PRIVATE) + fun get(context: Context): SharedPreferences = context.applicationContext.getSharedPreferences(FILE, Context.MODE_PRIVATE) } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonShelves.kt b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonShelves.kt new file mode 100644 index 0000000000..28b584ab5a --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/amazon/AmazonShelves.kt @@ -0,0 +1,92 @@ +package com.droiddeck.launcher.stores.amazon + +import android.content.Context +import android.util.Log +import com.droiddeck.launcher.stores.StoreNet +import com.droiddeck.launcher.stores.StoreShelves +import org.json.JSONArray +import org.json.JSONObject +import java.net.HttpURLConnection +import java.net.URL + +object AmazonShelves { + private const val TAG = "AmazonShelves" + private const val PAGE = "https://luna.amazon.com/claims/home" + private const val GRAPHQL = "https://luna.amazon.com/graphql" + private const val KEY_ART = "store_art" + private const val KEY_ART_AT = "store_art_at" + private const val FRESH_MS = 3 * 60 * 60 * 1000L + private const val QUERY = "query { items(collectionType: FEATURED_CONTENT, pageSize: 50) { items { assets { title " + + "cardMedia { defaultMedia { src1x src2x } } } } } }" + + @Volatile private var memory: StoreShelves? = null + + fun cached(context: Context): StoreShelves? = + memory ?: fromPrefs(AmazonPrefs.get(context).getString(KEY_ART, null))?.also { memory = it } + + fun featured(context: Context, force: Boolean): StoreShelves? { + val prefs = AmazonPrefs.get(context) + if (!force && System.currentTimeMillis() - prefs.getLong(KEY_ART_AT, 0L) in 0 until FRESH_MS) cached(context)?.let { return it } + val art = runCatching { fetch() }.onFailure { Log.w(TAG, "featured: ${it.javaClass.simpleName}") }.getOrNull().orEmpty() + if (art.isEmpty()) return cached(context) + prefs.edit().putString(KEY_ART, JSONArray(art).toString()).putLong(KEY_ART_AT, System.currentTimeMillis()).apply() + Log.i(TAG, "featured art: ${art.size}") + return StoreShelves(art = art).also { memory = it } + } + + private fun fromPrefs(text: String?): StoreShelves? { + val a = runCatching { JSONArray(text ?: return null) }.getOrNull() ?: return null + val art = List(a.length()) { a.optString(it) }.filter { it.isNotEmpty() } + return if (art.isEmpty()) null else StoreShelves(art = art) + } + + private fun fetch(): List<String> { + val (page, cookies) = openPage() ?: return emptyList() + val token = Regex("""name=['"]csrf-key['"] value=['"]([^'"]+)['"]""").find(page)?.groupValues?.get(1) ?: run { + Log.w(TAG, "claims page had no csrf key") + return emptyList() + } + val body = StoreNet.postJson( + GRAPHQL, JSONObject().put("query", QUERY).toString(), + headers = mapOf("client-id" to "CarboniteApp", "csrf-token" to token, "Cookie" to cookies, "Origin" to "https://luna.amazon.com", "Referer" to PAGE), + ) ?: return emptyList() + val items = JSONObject(body).optJSONObject("data")?.optJSONObject("items")?.optJSONArray("items") ?: return emptyList() + return (0 until items.length()).mapNotNull { i -> + val media = items.optJSONObject(i)?.optJSONObject("assets")?.optJSONObject("cardMedia")?.optJSONObject("defaultMedia") + media?.optString("src2x")?.takeIf { it.isNotEmpty() } ?: media?.optString("src1x")?.takeIf { it.isNotEmpty() } + }.distinct() + } + + private fun openPage(): Pair<String, String>? { + val jar = LinkedHashMap<String, String>() + var url = PAGE + repeat(5) { + val conn = (URL(url).openConnection() as HttpURLConnection).apply { + connectTimeout = 20_000 + readTimeout = 20_000 + instanceFollowRedirects = false + setRequestProperty("User-Agent", StoreNet.BROWSER_UA) + setRequestProperty("Accept", "text/html") + if (jar.isNotEmpty()) setRequestProperty("Cookie", jar.entries.joinToString("; ") { "${it.key}=${it.value}" }) + } + try { + val code = conn.responseCode + conn.headerFields["Set-Cookie"].orEmpty().forEach { c -> + val pair = c.substringBefore(';') + val name = pair.substringBefore('=').trim() + if (name.isNotEmpty() && '=' in pair) jar[name] = pair.substringAfter('=') + } + if (code in 300..399) { + url = URL(URL(url), conn.getHeaderField("Location") ?: return null).toString() + return@repeat + } + if (code !in 200..299) { Log.w(TAG, "claims page $code"); return null } + val page = conn.inputStream.bufferedReader().use { it.readText() } + return page to jar.entries.joinToString("; ") { "${it.key}=${it.value}" } + } finally { + runCatching { conn.disconnect() } + } + } + return null + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/download/DownloadModels.kt b/app/src/main/java/com/droiddeck/launcher/stores/download/DownloadModels.kt index 9813f169d3..8683efa065 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/download/DownloadModels.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/download/DownloadModels.kt @@ -2,20 +2,9 @@ package com.droiddeck.launcher.stores.download import com.droiddeck.launcher.stores.Store -/** - * The store-agnostic shape every store's download is projected into, so one queue and one - * Downloads page serve all three. Ported from Bannerlator's download registry, trimmed to what - * this app shows: a stage, one byte pair, speed and ETA, and the handles that drive it. - */ -/** Where a download is. The names are what the Downloads page prints over its stage strip. */ enum class DownloadStage { MANIFEST, DOWNLOAD, VERIFY, INSTALL, DONE } -/** - * QUEUED / RUNNING / PAUSED are the active states (in memory only). INSTALLED is the terminal - * success; FAILED and CANCELLED stay listed for the session so the page can offer a retry or a - * dismissal. - */ enum class DownloadState { QUEUED, RUNNING, PAUSED, INSTALLED, FAILED, CANCELLED } data class DownloadEntry( @@ -25,43 +14,28 @@ data class DownloadEntry( val cover: String? = null, val state: DownloadState = DownloadState.QUEUED, val stage: DownloadStage = DownloadStage.MANIFEST, - /** Bytes landed and the total, as the engine reports them (install size). */ val bytesDone: Long = 0L, val bytesTotal: Long = 0L, - /** Smoothed speed in bytes/s (0 = unknown) and seconds left (-1 = unknown). */ val speedBps: Long = 0L, val etaSeconds: Long = -1L, - /** The engine's current line ("Downloading: data.pak"), shown under the bar. */ val detail: String = "", - /** Where it was installed (INSTALLED) or why it failed (FAILED). */ val installPath: String? = null, val error: String? = null, - /** 1-based place in the queue while QUEUED, else 0. */ val queuePosition: Int = 0, - /** When the entry reached a terminal state, for ordering and ageing out. */ val finishedAt: Long = 0L, val startedAt: Long = 0L, - /** Where it is going: the install target's name ("Internal storage", the card's name). */ val location: String = "", - /** - * The active stage's own progress outside Download (which runs on [bytesDone]/[bytesTotal]): - * an amount ([stageDone] of [stageTotal], bytes or items) and, when it counts files, [stageItems] - * of [stageItemsTotal]. Reset when the stage changes. - */ val stageDone: Long = 0L, val stageTotal: Long = 0L, val stageItems: Int = 0, val stageItemsTotal: Int = 0, - /** What the game takes on disk, when the store has said (the download itself is [bytesTotal], often compressed). */ val diskBytes: Long = 0L, - /** Stages already passed, one bit per [DownloadStage] ordinal; stages can come back (Epic checks files before it fetches). */ val stagesPassed: Int = 0, ) { fun passed(s: DownloadStage): Boolean = state == DownloadState.INSTALLED || (stagesPassed and (1 shl s.ordinal)) != 0 val key: String get() = "${store.id}:$id" val isActive: Boolean get() = state == DownloadState.QUEUED || state == DownloadState.RUNNING || state == DownloadState.PAUSED - /** The active stage's progress, 0..1, or -1 while it has nothing to count yet. */ val stageFraction: Float get() = when { state == DownloadState.INSTALLED || stage == DownloadStage.DONE -> 1f stage == DownloadStage.DOWNLOAD -> if (bytesTotal > 0L) (bytesDone.toDouble() / bytesTotal).toFloat().coerceIn(0f, 1f) else -1f @@ -69,7 +43,6 @@ data class DownloadEntry( stageItemsTotal > 0 -> (stageItems.toFloat() / stageItemsTotal).coerceIn(0f, 1f) else -> -1f } - /** 0..1 for a single bar (a card, the game page): the active stage's progress. */ val fraction: Float get() = stageFraction.coerceAtLeast(0f) val percent: Int get() = (fraction * 100).toInt() } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/download/DownloadQueue.kt b/app/src/main/java/com/droiddeck/launcher/stores/download/DownloadQueue.kt index ac0d585e8d..e2549a3be6 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/download/DownloadQueue.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/download/DownloadQueue.kt @@ -6,53 +6,23 @@ import com.droiddeck.launcher.session.SessionPrefs import com.droiddeck.launcher.stores.StoresState import java.util.concurrent.atomic.AtomicBoolean -/** - * One queue for every store's downloads, [parallel] of them running at a time (1..3, Setup and - * the Downloads page), the rest waiting as data until a slot frees. A store hands in a - * [DownloadJob] - its whole install: manifest, files, verify, post-install - and reports back - * through the job's [JobHandle]; the queue owns the states, the registry row the UI draws and the - * foreground service that keeps the process alive while anything runs. - * - * Pause for these engines is "stop now, keep the files": every store's install skips files that - * are already complete and verified, so resuming is simply running the job again. Cancel removes - * what was downloaded (the job's own cleanup) and the row. - * - * Thread-safe: one [lock] guards the table; jobs run on their own threads, outside it. - */ object DownloadQueue { private const val TAG = "StoreDownloads" - /** The work for one download. [run] blocks until it is over; [cancel] asks a running job to stop. */ interface DownloadJob { - /** Runs the install; returns the install folder's path on success, throws or returns null on failure. */ fun run(handle: JobHandle): String? - /** Stops a running job; [deleteFiles] false keeps what was fetched for a later resume. */ fun cancel(deleteFiles: Boolean) } - /** What a running job reports with. */ class JobHandle internal constructor(val key: String, internal val cancelled: AtomicBoolean) { val isCancelled: Boolean get() = cancelled.get() - /** Enters [stage] (a repeat of the current one only updates the line); a new stage starts its own count from zero. */ fun stage(stage: DownloadStage, detail: String = "") = enter(key, stage, stripSpeed(detail)) - /** - * The active stage's own count outside Download: an amount and, when it counts files, the - * files. [bytes] = the amount is bytes written, so the stage gets its own rate and ETA. - */ fun stageProgress(done: Long, total: Long, items: Int = 0, itemsTotal: Int = 0, bytes: Boolean = false) = stageCount(key, done, total, items, itemsTotal, bytes) - /** The game's size on disk, once the store has said. */ fun diskSize(bytes: Long) = update(key) { if (bytes > 0) it.copy(diskBytes = bytes) else it } - /** - * Bytes so far (negative = unchanged), the total (<= 0 = unchanged), a line. [speedBps] is the - * engine's own figure: a burst rate at the network side, which jumps while the write side - * paces the bar, so it is not what the page shows - the queue measures the install rate - * from the byte deltas itself ([measure]); the engine's figure stays in its log lines. - */ fun progress(bytesDone: Long, bytesTotal: Long, detail: String? = null, @Suppress("UNUSED_PARAMETER") speedBps: Long = -1L) = measure(key, bytesDone, bytesTotal, detail?.let(::stripSpeed)) fun log(line: String) = StoresState.logLine(line) } - /** "Downloading: data.pak 12.3 MB/s" → "Downloading: data.pak": the engine's burst rate is not shown twice. */ private fun stripSpeed(s: String): String = s.replace(Regex("\\s+\\S+ [KMG]B/s\\s*$"), "").trimEnd() private fun enter(key: String, stage: DownloadStage, detail: String) { @@ -61,16 +31,10 @@ object DownloadQueue { val moved = item.entry.stage != stage || item.entry.state != DownloadState.RUNNING transitionLocked(item, stage) item.entry = item.entry.copy(detail = detail.ifEmpty { item.entry.detail }, state = DownloadState.RUNNING) - // A new stage shows at once; a new line within the same stage (one per file) waits its turn. publishLocked(progressOnly = !moved) } } - /** - * Moves an item to [stage] when it is elsewhere: the old stage is marked passed, the new one - * counts from zero, and the measured speed is cleared - the next stage writes or checks, it - * does not fetch, and a stale rate there would read as a download. Caller holds [lock]. - */ private fun transitionLocked(item: Item, stage: DownloadStage) { val e = item.entry if (e.stage == stage) return @@ -81,7 +45,6 @@ object DownloadQueue { ) } - /** How far back the shown speed looks: a few seconds, so the figure settles instead of following each file. */ private const val SPEED_WINDOW_MS = 3000.0 private fun stageCount(key: String, done: Long, total: Long, files: Int, filesTotal: Int, bytes: Boolean) { @@ -96,13 +59,10 @@ object DownloadQueue { } } - /** One sample of the rate behind [done] (bytes so far in this stage), smoothed over [SPEED_WINDOW_MS]. Caller holds [lock]. */ private fun sample(item: Item, done: Long): Long { val now = System.currentTimeMillis() if (item.speedAt == 0L) { item.speedAt = now; item.speedBytes = done; return item.speedEwma.toLong() } val dt = now - item.speedAt - // Sampled no faster than every quarter second, as an exponential average over - // SPEED_WINDOW_MS: one big file landing moves it, it does not define it. if (dt >= 250) { val inst = (done - item.speedBytes).coerceAtLeast(0) * 1000.0 / dt val alpha = 1.0 - Math.exp(-dt / SPEED_WINDOW_MS) @@ -128,8 +88,7 @@ object DownloadQueue { } } - private class Item(var entry: DownloadEntry, val factory: () -> DownloadJob, var job: DownloadJob? = null, val cancelled: AtomicBoolean = AtomicBoolean(false), var pauseRequested: Boolean = false) { - /** The shown speed's state: the last sample's clock and bytes, and the running average (bytes/s). */ + private class Item(var entry: DownloadEntry, val factory: (() -> DownloadJob)? = null, val retry: (() -> Unit)? = null, var job: DownloadJob? = null, val cancelled: AtomicBoolean = AtomicBoolean(false), var pauseRequested: Boolean = false) { var speedAt = 0L var speedBytes = 0L var speedEwma = 0.0 @@ -137,11 +96,13 @@ object DownloadQueue { private val lock = Any() private val items = LinkedHashMap<String, Item>() + private val heldPaused = HashSet<String>() + + fun holdPaused(key: String) = synchronized(lock) { heldPaused.add(key) } private var running = 0 fun parallel(context: Context): Int = SessionPrefs.gameStoresParallel(context) - /** Threads for a store's download pool: background priority, so the UI and its render thread come first. */ @JvmStatic fun workerFactory(name: String): java.util.concurrent.ThreadFactory { val n = java.util.concurrent.atomic.AtomicInteger() @@ -162,16 +123,13 @@ object DownloadQueue { fun isActive(key: String): Boolean = entry(key)?.isActive == true - /** - * Queues a download, or starts it when a slot is free. A key already active is left alone; a - * finished or failed row with the same key is replaced. - */ fun enqueue(context: Context, entry: DownloadEntry, factory: () -> DownloadJob) { val app = context.applicationContext synchronized(lock) { items[entry.key]?.let { if (it.entry.isActive) { Log.i(TAG, "${entry.key}: already queued"); return } } items.remove(entry.key) - items[entry.key] = Item(entry.copy(state = DownloadState.QUEUED, stage = DownloadStage.MANIFEST, startedAt = System.currentTimeMillis()), factory) + val state = if (heldPaused.remove(entry.key)) DownloadState.PAUSED else DownloadState.QUEUED + items[entry.key] = Item(entry.copy(state = state, stage = DownloadStage.MANIFEST, startedAt = System.currentTimeMillis()), factory) renumber() } StoresState.logLine("${entry.store.label}: queued \"${entry.name}\"" + if (entry.bytesTotal > 0) " (${com.droiddeck.launcher.stores.formatBytes(entry.bytesTotal)})" else "") @@ -179,6 +137,32 @@ object DownloadQueue { advance(app) } + /** Immediately records a failed download (e.g. from pre-flight storage check). */ + fun recordFailed(context: Context, entry: DownloadEntry, error: String, retry: (() -> Unit)? = null) { + val app = context.applicationContext + val now = System.currentTimeMillis() + synchronized(lock) { + if (items[entry.key]?.entry?.isActive == true) return + items.remove(entry.key) + heldPaused.remove(entry.key) + items[entry.key] = Item( + entry.copy( + state = DownloadState.FAILED, + error = error, + speedBps = 0, + etaSeconds = -1, + startedAt = now, + finishedAt = now + ), + retry = retry + ) + renumber() + publishLocked() + } + StoresState.logLine("${entry.store.label}: \"${entry.name}\" failed: $error") + StoreDownloadService.ended(app, entry.copy(state = DownloadState.FAILED, error = error), installed = false, gamesKey = null) + } + fun pause(key: String) { val item = synchronized(lock) { items[key] } ?: return synchronized(lock) { @@ -193,14 +177,21 @@ object DownloadQueue { fun resume(context: Context, key: String) { val app = context.applicationContext + val retry: (() -> Unit)? synchronized(lock) { val item = items[key] ?: return if (item.entry.state != DownloadState.PAUSED && item.entry.state != DownloadState.FAILED) return + retry = item.retry + if (retry == null && item.factory == null) return items.remove(key) - items[key] = Item(item.entry.copy(state = DownloadState.QUEUED, speedBps = 0, etaSeconds = -1, error = null, startedAt = System.currentTimeMillis()), item.factory) + if (retry == null) { + items[key] = Item(item.entry.copy(state = DownloadState.QUEUED, speedBps = 0, etaSeconds = -1, error = null, startedAt = System.currentTimeMillis()), item.factory) + } renumber() publishLocked() } + // A preflight retry rechecks storage and enqueues the real backend, never a running placeholder. + if (retry != null) { retry(); return } StoresState.logLine("resumed \"${entry(key)?.name}\"") advance(app) } @@ -224,31 +215,24 @@ object DownloadQueue { item.cancelled.set(true) item.job?.cancel(deleteFiles = true) } else { - // Never started: nothing is on disk, but the job knows where it would have gone. - Thread({ runCatching { item.factory().cancel(deleteFiles = true) } }, "store-dl-cancel").start() + Thread({ runCatching { item.factory?.invoke()?.cancel(deleteFiles = true) } }, "store-dl-cancel").start() } StoresState.logLine("cancelled \"${item.entry.name}\"") StoreDownloadService.finish(app, key) advance(app) - // The row says Cancelled for a moment, then goes; the game reads Install again. Thread({ Thread.sleep(3000); synchronized(lock) { if (items[key]?.entry?.state == DownloadState.CANCELLED) { items.remove(key); publishLocked() } } }, "store-dl-cancelled").start() } - /** - * Clear on a failed or paused row: deletes what it kept exactly as Cancel does (the job's own - * cleanup), then drops the row. An installed or cancelled row is only dropped. - */ fun clear(context: Context, key: String) { val item = synchronized(lock) { items[key] } ?: return if (item.entry.state == DownloadState.RUNNING || item.entry.state == DownloadState.QUEUED) return if (item.entry.state == DownloadState.FAILED || item.entry.state == DownloadState.PAUSED) { - Thread({ runCatching { item.factory().cancel(deleteFiles = true) } }, "store-dl-clear").start() + Thread({ runCatching { item.factory?.invoke()?.cancel(deleteFiles = true) } }, "store-dl-clear").start() } synchronized(lock) { items.remove(key); publishLocked() } StoreDownloadService.finish(context.applicationContext, key) } - /** Drops every finished, failed or cancelled row; files a failed one kept stay (its game page's Clear removes them). */ fun dismissFinished() { synchronized(lock) { items.entries.removeAll { !it.value.entry.isActive } @@ -256,7 +240,6 @@ object DownloadQueue { } } - /** Drops a finished, failed or cancelled row from the list. */ fun dismiss(key: String) { synchronized(lock) { val item = items[key] ?: return @@ -281,18 +264,11 @@ object DownloadQueue { private fun publish(context: Context) { synchronized(lock) { publishLocked() }; StoreDownloadService.sync(context) } - /** At most this often a progress-only change reaches the UI; a state or stage change goes at once. */ private const val PROGRESS_PUBLISH_MS = 250L private var lastPublishAt = 0L private var publishPending = false private val main = android.os.Handler(android.os.Looper.getMainLooper()) - /** - * Newest first: what was started last sits on top, as the preview lists them. Caller holds - * [lock]. Engines report per chunk or per file - hundreds of times a second at full speed - so - * [progressOnly] changes are coalesced to [PROGRESS_PUBLISH_MS]; the UI then recomposes a few - * times a second, not on every callback. - */ private fun publishLocked(progressOnly: Boolean = false) { val now = android.os.SystemClock.uptimeMillis() if (progressOnly) { @@ -306,11 +282,11 @@ object DownloadQueue { } } lastPublishAt = now + if (!progressOnly) SavedQueue.save(items.values.map { it.entry }) val list = items.values.map { it.entry }.sortedByDescending { it.startedAt } StoresState.post { StoresState.publishDownloads(list) } } - /** Starts queued items while slots are free. */ private fun advance(context: Context) { while (true) { val next: Item @@ -328,14 +304,12 @@ object DownloadQueue { } private fun runItem(context: Context, item: Item) { - // Downloads run beside the UI, never ahead of it: background priority for this thread and - // (through [workerFactory]) every pool a store's manager starts. android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND) val handle = JobHandle(item.entry.key, item.cancelled) var result: String? = null var error: String? = null try { - val job = item.factory() + val job = checkNotNull(item.factory).invoke() synchronized(lock) { item.job = job } StoresState.logLine("${item.entry.store.label}: fetching manifest for \"${item.entry.name}\"") result = job.run(handle) @@ -359,7 +333,6 @@ object DownloadQueue { when (item.entry.state) { DownloadState.INSTALLED -> { StoresState.logLine("installed \"${item.entry.name}\" → ${result}") - // The folder is on disk and registered: the Installed tab and the Games list follow. StoresState.notifyLibraryChanged(context) val games = runCatching { com.droiddeck.launcher.frontend.Library.launchableGames(context).firstOrNull { it.gameFiles?.absolutePath == result }?.let { "app:${it.appId}" } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/download/SavedQueue.kt b/app/src/main/java/com/droiddeck/launcher/stores/download/SavedQueue.kt new file mode 100644 index 0000000000..0c9fd0ccb0 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/download/SavedQueue.kt @@ -0,0 +1,96 @@ +package com.droiddeck.launcher.stores.download + +import android.content.Context +import android.util.Log +import com.droiddeck.launcher.stores.CatalogItem +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoresState +import org.json.JSONArray +import org.json.JSONObject +import java.io.File +import java.util.concurrent.Executors + +object SavedQueue { + private const val TAG = "StoreDownloads" + private const val FILE = "store-queue.json" + + private class Wanted(val item: CatalogItem, val root: File?) + + private val wanted = HashMap<String, Wanted>() + private val writer = Executors.newSingleThreadExecutor { r -> Thread(r, "store-queue-save") } + @Volatile private var app: Context? = null + private var restored = false + + private fun key(item: CatalogItem) = "${item.store.id}:${item.id}" + + @Synchronized + fun remember(context: Context, item: CatalogItem, root: File?) { + app = context.applicationContext + wanted[key(item)] = Wanted(item, root) + } + + fun save(entries: List<DownloadEntry>) { + val context = app ?: return + val rows = synchronized(this) { + entries.filter { it.isActive }.mapNotNull { e -> wanted[e.key]?.let { e to it } } + } + val out = JSONArray() + for ((e, w) in rows) out.put(JSONObject().apply { + put("paused", e.state == DownloadState.PAUSED) + put("root", w.root?.absolutePath ?: "") + put("item", itemJson(w.item)) + }) + writer.execute { + runCatching { + val f = File(context.filesDir, FILE) + val tmp = File(context.filesDir, "$FILE.tmp") + tmp.writeText(out.toString()) + tmp.renameTo(f) + }.onFailure { Log.w(TAG, "could not save the queue", it) } + } + } + + fun restore(context: Context) { + synchronized(this) { if (restored) return; restored = true } + val app = context.applicationContext + val rows = runCatching { JSONArray(File(app.filesDir, FILE).readText()) }.getOrNull() + this.app = app + rows ?: return + Thread({ + val back = (0 until rows.length()).mapNotNull { i -> + runCatching { + val o = rows.getJSONObject(i) + Triple(itemOf(o.getJSONObject("item")), o.optString("root").takeIf { it.isNotEmpty() }?.let(::File), o.optBoolean("paused")) + }.getOrNull() + } + if (back.isEmpty()) return@Thread + StoresState.post { + for ((item, root, paused) in back) { + if (DownloadQueue.entry(key(item)) != null) continue + if (paused) DownloadQueue.holdPaused(key(item)) + StoresState.install(app, item, root) + } + } + }, "store-queue-restore").start() + } + + private fun itemJson(i: CatalogItem) = JSONObject().apply { + put("store", i.store.id); put("id", i.id); put("title", i.title) + put("image", i.imageUrl ?: ""); put("tall", i.tallImageUrl ?: "") + put("tags", i.tags); put("developer", i.developer); put("description", i.description) + put("size", i.sizeBytes); put("owned", i.owned) + put("extra", JSONObject(i.extra)) + } + + private fun itemOf(o: JSONObject): CatalogItem { + val extra = o.optJSONObject("extra") + return CatalogItem( + store = Store.byId(o.getString("store")) ?: error("unknown store"), + id = o.getString("id"), title = o.getString("title"), + imageUrl = o.optString("image").ifEmpty { null }, tallImageUrl = o.optString("tall").ifEmpty { null }, + tags = o.optString("tags"), developer = o.optString("developer"), description = o.optString("description"), + owned = o.optBoolean("owned", true), sizeBytes = o.optLong("size"), + extra = extra?.keys()?.asSequence()?.associateWith { extra.getString(it) } ?: emptyMap(), + ) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/download/StoreDownloadService.kt b/app/src/main/java/com/droiddeck/launcher/stores/download/StoreDownloadService.kt index e8c71f2482..a32bceeb69 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/download/StoreDownloadService.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/download/StoreDownloadService.kt @@ -23,21 +23,10 @@ import com.droiddeck.launcher.stores.formatBytes import com.droiddeck.launcher.stores.formatSpeed import java.util.concurrent.ConcurrentHashMap -/** - * Keeps store downloads going with the screen off or the app in the background: a foreground - * service (dataSync) with a notification showing the active download's progress, Pause / Resume - * and a two-step Cancel; a Wi-Fi lock and a partial wake lock while anything is running, so the - * radio and the CPU do not sleep under a multi-gigabyte install; and a notification when a game - * has installed or failed. - * - * [start] is called when a download begins and [finish] when one ends; the service stops itself when - * nothing is running. - */ class StoreDownloadService : Service() { private var wifi: WifiManager.WifiLock? = null private var wake: PowerManager.WakeLock? = null private var wakeAt = 0L - /** The download whose Cancel was tapped once: its actions read Delete / Keep until [confirmUntil]. */ private var confirmKey: String? = null private var confirmUntil = 0L private val main = Handler(Looper.getMainLooper()) @@ -55,7 +44,6 @@ class StoreDownloadService : Service() { when (intent?.action) { ACTION_PAUSE -> key?.let { DownloadQueue.pause(it) - // The progress notification goes with the last running download; this one stays to resume from. pausedNote(this, it) } ACTION_RESUME -> key?.let { @@ -126,11 +114,6 @@ class StoreDownloadService : Service() { runCatching { (getSystemService(NOTIFICATION_SERVICE) as NotificationManager).notify(ID, build()) } } - /** - * While a download runs: a Wi-Fi lock (high-performance before Android 14, low-latency from it, - * where the old mode is deprecated) and a partial wake lock, taken with a timeout and renewed - * as progress comes in rather than held indefinitely. Released as soon as nothing runs. - */ @SuppressLint("WakelockTimeout") private fun locks() { val running = StoresState.latestDownloads.any { it.state == DownloadState.RUNNING } @@ -188,7 +171,6 @@ class StoreDownloadService : Service() { private const val ACTION_CANCEL = "droiddeck.stores.CANCEL" private const val ACTION_DELETE = "droiddeck.stores.DELETE" private const val ACTION_KEEP = "droiddeck.stores.KEEP" - /** MainActivity: which page to open ("stores:downloads", or a Games selection such as "app:<id>"). */ const val EXTRA_NAV = "droiddeck.nav" private val active = ConcurrentHashMap.newKeySet<String>() @Volatile private var instance: StoreDownloadService? = null @@ -212,7 +194,6 @@ class StoreDownloadService : Service() { private fun openDownloads(context: Context, code: Int) = openPage(context, "stores:downloads", code) - /** A download started: the service is up (idempotent). */ fun start(context: Context) { StoresState.latestDownloads.filter { it.state == DownloadState.RUNNING }.forEach { active.add(it.key) } try { @@ -224,17 +205,14 @@ class StoreDownloadService : Service() { } } - /** Progress moved: redraw the notification (StoresState calls it at most once a second). */ fun tick() { instance?.refresh() } - /** The queue changed: redraw the notification. */ fun sync(context: Context) { instance?.refresh() } - /** A download ended: drop it; the service stops with the last one. */ fun finish(context: Context, key: String) { active.remove(key) val inst = instance ?: return @@ -243,7 +221,6 @@ class StoreDownloadService : Service() { private fun pausedId(key: String) = ID + 0x20000 + (key.hashCode() and 0xFFFF) - /** "<game> paused" with Resume, once the progress notification has gone with the service. */ private fun pausedNote(context: Context, key: String) { val entry = StoresState.latestDownloads.firstOrNull { it.key == key } ?: return val i = Intent(context, StoreDownloadService::class.java).setAction(ACTION_RESUME).putExtra(EXTRA_KEY, key) @@ -258,23 +235,25 @@ class StoreDownloadService : Service() { runCatching { context.getSystemService(NotificationManager::class.java)?.notify(pausedId(key), n) } } - /** "<game> installed" (opens it in Games) or "<game> download failed" (opens Downloads); dismissible. */ fun ended(context: Context, entry: DownloadEntry, installed: Boolean, gamesKey: String?) { val app = context.applicationContext channels(app) val code = entry.key.hashCode() - val n = Notification.Builder(app, DONE_CHANNEL) + val builder = Notification.Builder(app, DONE_CHANNEL) .setSmallIcon(if (installed) android.R.drawable.stat_sys_download_done else android.R.drawable.stat_notify_error) .setContentTitle(app.getString(if (installed) R.string.stores_notification_installed else R.string.stores_notification_failed, entry.name)) .setAutoCancel(true) .setContentIntent(if (installed && gamesKey != null) openPage(app, gamesKey, code + 10) else openDownloads(app, code + 11)) - .build() + if (!installed && !entry.error.isNullOrBlank()) { + builder.setContentText(entry.error) + builder.style = Notification.BigTextStyle().bigText(entry.error) + } + val n = builder.build() runCatching { app.getSystemService(NotificationManager::class.java)?.notify(ID + 1 + (code and 0xFFFF), n) } } } } -/** The notification's one line for a download. Pure, for the test. */ object DownloadNotificationText { fun line(d: DownloadEntry, stageName: String, paused: String, queued: String): String { val parts = ArrayList<String>() diff --git a/app/src/main/java/com/droiddeck/launcher/stores/download/StoreDownloadTier.kt b/app/src/main/java/com/droiddeck/launcher/stores/download/StoreDownloadTier.kt index 3b12de899a..765ec8a3dc 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/download/StoreDownloadTier.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/download/StoreDownloadTier.kt @@ -5,21 +5,11 @@ import androidx.annotation.StringRes import com.droiddeck.launcher.R import com.droiddeck.launcher.session.SessionPrefs -/** - * How hard the native download engine may pull: the ceiling of chunk requests it keeps in flight, - * and the inflate / hash / write threads behind them. Three tiers, one app-wide setting (Setup › - * Stores and the Downloads page), read when a download starts so a change applies to the next one. - * - * The windows are the ones the engine was tuned with (16 / 32 / 96 requests): it ramps towards the - * ceiling only while throughput keeps rising, so a slow link settles well below any of them. - */ enum class StoreDownloadTier(val id: String, @StringRes val label: Int, val networkWindow: Int, val decompressPerCore: Double) { BALANCED("balanced", R.string.stores_tier_balanced, 16, 0.4), FAST("fast", R.string.stores_tier_fast, 32, 0.5), MAX("max", R.string.stores_tier_max, 96, 0.8); - /** Inflate / hash / write workers for this device, at least two so a fetch never waits on a single writer. */ - /** Inflate / hash / write threads: by the tier, but two cores always left for the UI (at least 2 workers). */ val processWorkers: Int get() { val cores = Runtime.getRuntime().availableProcessors() return (cores * decompressPerCore).toInt().coerceIn(2, maxOf(2, minOf(32, cores - 2))) diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicAchievements.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicAchievements.kt new file mode 100644 index 0000000000..db85925f18 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicAchievements.kt @@ -0,0 +1,33 @@ +package com.droiddeck.launcher.stores.epic + +import android.content.Context +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreAchievements +import org.json.JSONObject + +object EpicAchievements : StoreAchievements(Store.EPIC.id, Store.EPIC.shortLabel) { + override fun request(context: Context, game: Game): Result { + val namespace = game.extra["namespace"].orEmpty().ifEmpty { return Result.Failed(Reason.NO_SERVICE) } + val token = EpicCredentialStore.getValidAccessToken(context) ?: return Result.Failed(Reason.SIGNED_OUT) + val account = EpicCredentialStore.load(context)?.accountId.orEmpty() + val answer = EpicNative.call( + "achievements", + JSONObject().put("accessToken", token).put("namespace", namespace).put("accountId", account).put("locale", locale()), + ) ?: return Result.Failed(Reason.UNREACHABLE) + val list = answer.optJSONArray("list") ?: return Result.Failed(Reason.UNREACHABLE) + return Result.Found( + (0 until list.length()).mapNotNull { list.optJSONObject(it) }.map { a -> + Achievement( + id = a.optString("id"), + name = a.optString("name"), + description = a.optString("description"), + hidden = a.optBoolean("hidden", false), + unlocked = a.optBoolean("unlocked", false), + unlockedAt = a.optLong("unlockedAt", 0L), + icon = a.optString("icon").ifEmpty { null }, + iconLocked = a.optString("iconLocked").ifEmpty { null }, + ) + }, + ) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicApiClient.java b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicApiClient.java deleted file mode 100644 index 3497d37da8..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicApiClient.java +++ /dev/null @@ -1,196 +0,0 @@ -package com.droiddeck.launcher.stores.epic; - -import android.util.Log; - -import com.droiddeck.launcher.stores.StoreLog; - -import org.json.JSONArray; -import org.json.JSONObject; - -import java.util.ArrayList; -import java.util.List; - -/** - * Epic's library, catalog and launcher-assets services, as the launcher calls them: - * library-service.live.use1a.on.epicgames.com/library/api/public/items (owned items, paginated) - * catalog-public-service-prod06.ol.epicgames.com/catalog/api/shared/namespace/{ns}/bulk/items - * launcher-public-service-prod06.ol.epicgames.com/launcher/api/public/assets/v2/platform/Windows/... - * All with a bearer token. - */ -public final class EpicApiClient { - - private static final String TAG = "EpicApi"; - private static final String LIBRARY_URL = "https://library-service.live.use1a.on.epicgames.com/library/api/public/items?includeMetadata=true"; - private static final String CATALOG_BASE = "https://catalog-public-service-prod06.ol.epicgames.com/catalog/api/shared/namespace"; - private static final String MANIFEST_BASE = "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/public/assets/v2/platform/Windows/namespace"; - private static final String LEGENDARY_UA = "Legendary/0.1.0 (GameNative)"; - - private EpicApiClient() {} - - /** The owned games, every page; Unreal assets, private sandboxes and non-Windows items left out. */ - public static List<EpicGame> getLibraryItems(String accessToken) { - List<EpicGame> result = new ArrayList<>(); - String cursor = null; - do { - try { - String url = LIBRARY_URL + (cursor != null ? "&cursor=" + cursor : ""); - String resp = EpicAuthClient.getRequest(url, accessToken); - if (resp == null) break; - JSONObject json = new JSONObject(resp); - JSONArray records = json.optJSONArray("records"); - if (records == null) break; - for (int i = 0; i < records.length(); i++) { - JSONObject rec = records.getJSONObject(i); - String appName = rec.optString("appName", ""); - if (appName.isEmpty() || appName.equals("1")) continue; - String namespace = rec.optString("namespace", ""); - if ("ue".equals(namespace) || "89efe5924d3d467c839449ab6ab52e7f".equals(namespace)) continue; - if ("PRIVATE".equals(rec.optString("sandboxType", ""))) continue; - JSONArray platforms = rec.optJSONArray("platform"); - if (platforms != null && platforms.length() > 0) { - boolean windows = false; - for (int j = 0; j < platforms.length(); j++) { - String p = platforms.optString(j, ""); - if ("Windows".equals(p) || "Win32".equals(p)) { windows = true; break; } - } - if (!windows) continue; - } - EpicGame game = new EpicGame(); - game.appName = appName; - game.namespace = namespace; - game.catalogItemId = rec.optString("catalogItemId", ""); - result.add(game); - } - JSONObject meta = json.optJSONObject("responseMetadata"); - String next = meta != null ? meta.optString("nextCursor", null) : null; - cursor = (next == null || next.isEmpty() || next.equals(cursor)) ? null : next; - } catch (Exception e) { - Log.e(TAG, "library page failed: " + e.getClass().getSimpleName()); - break; - } - } while (cursor != null); - return result; - } - - /** Fills title, developer, art, description and the DLC flag from the catalog; true on success. */ - public static boolean enrichFromCatalog(String accessToken, EpicGame game) { - if (game.namespace.isEmpty() || game.catalogItemId.isEmpty()) return false; - try { - String url = CATALOG_BASE + "/" + game.namespace + "/bulk/items?id=" + game.catalogItemId + "&includeDLCDetails=true&includeMainGameDetails=true&country=US"; - String resp = getWithLegendaryUA(url, accessToken); - if (resp == null) return false; - JSONObject root = new JSONObject(resp); - JSONObject item = root.optJSONObject(game.catalogItemId); - if (item == null && root.length() > 0) item = root.optJSONObject(root.keys().next()); - if (item == null) return false; - game.title = item.optString("title", game.title.isEmpty() ? game.appName : game.title); - game.developer = item.optString("developer", ""); - game.description = item.optString("description", ""); - game.isDLC = item.has("mainGameItem"); - if (game.isDLC) { - JSONObject main = item.optJSONObject("mainGameItem"); - if (main != null) game.baseGameCatalogItemId = main.optString("id", ""); - } - JSONArray keyImages = item.optJSONArray("keyImages"); - if (keyImages != null) for (int i = 0; i < keyImages.length(); i++) { - JSONObject img = keyImages.getJSONObject(i); - String type = img.optString("type", ""), imgUrl = img.optString("url", ""); - if (imgUrl.isEmpty()) continue; - if ("DieselGameBoxTall".equals(type)) game.artCover = imgUrl; - else if (("DieselGameBox".equals(type) || "Thumbnail".equals(type)) && game.artSquare.isEmpty()) game.artSquare = imgUrl; - } - JSONObject attrs = item.optJSONObject("customAttributes"); - if (attrs != null) { - JSONObject offline = attrs.optJSONObject("CanRunOffline"); - if (offline != null) game.canRunOffline = !"false".equalsIgnoreCase(offline.optString("value", "true")); - } - String rd = item.optString("viewableDate", ""); - if (rd.isEmpty()) rd = item.optString("effectiveDate", ""); - if (!rd.isEmpty()) game.releaseDate = rd; - return true; - } catch (Exception e) { - Log.e(TAG, "catalog enrich failed for " + game.appName + ": " + e.getClass().getSimpleName()); - return false; - } - } - - /** - * The manifest API answer for a game, flattened to {"manifests": [...], "versionId": "..."} as - * the download manager reads it. {@code appName} is the library record's, not the catalog's. - */ - public static String getManifestApiJson(String accessToken, String namespace, String catalogItemId, String appName) { - try { - String url = MANIFEST_BASE + "/" + namespace + "/catalogItem/" + catalogItemId + "/app/" + appName + "/label/Live"; - String resp = getWithLegendaryUA(url, accessToken); - if (resp == null) return null; - JSONObject root = new JSONObject(resp); - JSONArray elements = root.optJSONArray("elements"); - if (elements == null || elements.length() == 0) return null; - JSONObject first = elements.getJSONObject(0); - JSONObject wrapper = new JSONObject(); - wrapper.put("manifests", first.optJSONArray("manifests")); - String ver = first.optString("buildVersion", ""); - if (ver.isEmpty()) ver = first.optString("versionId", ""); - wrapper.put("versionId", ver); - // The sidecar's EOS deployment id, when the app has one. - JSONObject sidecar = first.optJSONObject("sidecar"); - if (sidecar != null) { - String config = sidecar.optString("config", ""); - if (!config.isEmpty()) { - try { wrapper.put("deploymentId", new JSONObject(config).optString("deploymentId", "")); } catch (Exception ignored) {} - } - } - return wrapper.toString(); - } catch (Exception e) { - Log.e(TAG, "manifest API failed for " + appName + ": " + e.getClass().getSimpleName()); - return null; - } - } - - /** `customAttributes.AdditionalCommandLine.value` for the game, "" when it has none, null when the call failed. */ - public static String getAdditionalCommandLine(String accessToken, String namespace, String catalogItemId) { - return getCustomAttribute(accessToken, namespace, catalogItemId, "AdditionalCommandLine"); - } - - /** `customAttributes.<name>.value` for the game (CloudSaveFolder, AdditionalCommandLine), "" when it has none, null when the call failed. */ - public static String getCustomAttribute(String accessToken, String namespace, String catalogItemId, String name) { - try { - String url = CATALOG_BASE + "/" + namespace + "/bulk/items?id=" + catalogItemId + "&country=US"; - String resp = getWithLegendaryUA(url, accessToken); - if (resp == null) return null; - JSONObject root = new JSONObject(resp); - JSONObject item = root.optJSONObject(catalogItemId); - if (item == null && root.length() > 0) item = root.optJSONObject(root.keys().next()); - if (item == null) return ""; - JSONObject attrs = item.optJSONObject("customAttributes"); - if (attrs == null) return ""; - JSONObject attr = attrs.optJSONObject(name); - return attr == null ? "" : attr.optString("value", ""); - } catch (Exception e) { - Log.w(TAG, "catalog attribute " + name + ": " + e.getClass().getSimpleName()); - return null; - } - } - - static String getWithLegendaryUA(String urlStr, String accessToken) { - java.net.HttpURLConnection conn = null; - try { - conn = (java.net.HttpURLConnection) new java.net.URL(urlStr).openConnection(); - conn.setRequestMethod("GET"); - conn.setConnectTimeout(30000); - conn.setReadTimeout(30000); - conn.setRequestProperty("Authorization", "Bearer " + accessToken); - conn.setRequestProperty("User-Agent", LEGENDARY_UA); - int code = conn.getResponseCode(); - java.io.InputStream is = (code < 400) ? conn.getInputStream() : conn.getErrorStream(); - String body = EpicAuthClient.readStream(is); - if (code < 200 || code >= 300) { Log.e(TAG, "GET HTTP " + code + " from " + StoreLog.redactUrl(urlStr)); return null; } - return body; - } catch (Exception e) { - Log.e(TAG, "GET failed: " + StoreLog.redactUrl(urlStr) + " (" + e.getClass().getSimpleName() + ")"); - return null; - } finally { - if (conn != null) conn.disconnect(); - } - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicApiClient.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicApiClient.kt new file mode 100644 index 0000000000..2f0df5eb2d --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicApiClient.kt @@ -0,0 +1,26 @@ +package com.droiddeck.launcher.stores.epic + +import org.json.JSONObject + +object EpicApiClient { + private fun request(token: String, namespace: String, catalogItemId: String) = + JSONObject().put("accessToken", token).put("namespace", namespace).put("catalogItemId", catalogItemId) + + @JvmStatic + fun getManifestApiJson(token: String, namespace: String, catalogItemId: String, appName: String): String? = + EpicNative.call("build.info", request(token, namespace, catalogItemId).put("appName", appName)) + ?.optJSONObject("info")?.toString() + + @JvmStatic + fun getCustomAttribute(token: String, namespace: String, catalogItemId: String, name: String): String? { + val answer = EpicNative.call("catalog.attribute", request(token, namespace, catalogItemId).put("name", name)) ?: return null + if (answer.optBoolean("unknown", false) || !answer.has("value")) return null + return answer.optString("value", "") + } + + internal fun catalogDetails(token: String, namespace: String, catalogItemId: String): JSONObject? = + EpicNative.call("catalog.details", request(token, namespace, catalogItemId))?.optJSONObject("details") + + internal fun exchangeCode(token: String): String? = + EpicNative.call("auth.exchange", JSONObject().put("accessToken", token))?.optString("code", "")?.ifEmpty { null } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicAuthClient.java b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicAuthClient.java deleted file mode 100644 index 959d4302b9..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicAuthClient.java +++ /dev/null @@ -1,181 +0,0 @@ -package com.droiddeck.launcher.stores.epic; - -import android.util.Base64; -import android.util.Log; - -import com.droiddeck.launcher.stores.StoreLog; - -import org.json.JSONObject; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.nio.charset.StandardCharsets; - -/** - * Epic's OAuth2 token endpoint, with the launcher's public client credentials (the ones every - * third-party Epic client uses): - * POST account-public-service-prod03.ol.epicgames.com/account/api/oauth/token - * Basic base64(clientId:clientSecret), form grant_type=authorization_code|refresh_token, token_type=eg1 - * GET .../account/api/oauth/exchange with a bearer token: a short-lived exchange code for a launch. - * Error bodies are never logged: they carry correlation ids and account context. - */ -public final class EpicAuthClient { - - private static final String TAG = "EpicAuth"; - - static final String CLIENT_ID = "34a02cf8f4414e29b15921876da36f9a"; - static final String CLIENT_SECRET = "daafbccc737745039dffe53d94fc76cf"; - private static final String TOKEN_URL = "https://account-public-service-prod03.ol.epicgames.com/account/api/oauth/token"; - private static final String EXCHANGE_URL = "https://account-public-service-prod03.ol.epicgames.com/account/api/oauth/exchange"; - public static final String USER_AGENT = "UELauncher/11.0.1-14907503+++Portal+Release-Live Windows/10.0.19041.1.256.64bit"; - - public static final class TokenResult { - public String accessToken; - public String refreshToken; - public String accountId; - public String displayName; - public long expiresAt; - } - - private EpicAuthClient() {} - - public static TokenResult exchangeCode(String authCode) { - return postToken("grant_type=authorization_code&code=" + authCode + "&token_type=eg1"); - } - - public static TokenResult refreshToken(String refreshToken) { - return postToken("grant_type=refresh_token&refresh_token=" + refreshToken + "&token_type=eg1"); - } - - private static TokenResult postToken(String formBody) { - try { - String creds64 = Base64.encodeToString((CLIENT_ID + ":" + CLIENT_SECRET).getBytes(StandardCharsets.UTF_8), Base64.NO_WRAP); - HttpURLConnection conn = (HttpURLConnection) new URL(TOKEN_URL).openConnection(); - conn.setRequestMethod("POST"); - conn.setConnectTimeout(30000); - conn.setReadTimeout(30000); - conn.setDoOutput(true); - conn.setRequestProperty("Authorization", "Basic " + creds64); - conn.setRequestProperty("User-Agent", USER_AGENT); - conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - byte[] bodyBytes = formBody.getBytes(StandardCharsets.UTF_8); - conn.setRequestProperty("Content-Length", String.valueOf(bodyBytes.length)); - try (OutputStream os = conn.getOutputStream()) { os.write(bodyBytes); } - int code = conn.getResponseCode(); - InputStream is = (code < 400) ? conn.getInputStream() : conn.getErrorStream(); - String resp = readStream(is); - conn.disconnect(); - if (code < 200 || code >= 300) { Log.e(TAG, "token HTTP " + code); return null; } - JSONObject json = new JSONObject(resp); - TokenResult result = new TokenResult(); - result.accessToken = json.optString("access_token", null); - result.refreshToken = json.optString("refresh_token", null); - result.accountId = json.optString("account_id", ""); - result.displayName = json.optString("displayName", ""); - long expiresIn = json.optLong("expires_in", 7200L); - String expiresAtStr = json.optString("expires_at", null); - long expiresAtMs; - if (expiresAtStr != null && !expiresAtStr.isEmpty()) { - try { expiresAtMs = parseIso8601(expiresAtStr); } catch (Exception e) { expiresAtMs = System.currentTimeMillis() + expiresIn * 1000L; } - } else expiresAtMs = System.currentTimeMillis() + expiresIn * 1000L; - result.expiresAt = expiresAtMs; - return result.accessToken != null ? result : null; - } catch (Exception e) { - Log.e(TAG, "token request failed: " + e.getClass().getSimpleName()); - return null; - } - } - - /** A short-lived exchange code for a game launch (-AUTH_PASSWORD); null on any failure. */ - public static String getExchangeCode(String accessToken) { - try { - String resp = getRequest(EXCHANGE_URL, accessToken); - // getRequest has logged the HTTP status; the code itself is never logged. - if (resp == null) { Log.i(TAG, "exchange code: no answer"); return null; } - return new JSONObject(resp).optString("code", null); - } catch (Exception e) { - Log.e(TAG, "exchange code failed: " + e.getClass().getSimpleName()); - return null; - } - } - - /** Authorized GET; the body or null. */ - public static String getRequest(String urlStr, String accessToken) { - HttpURLConnection conn = null; - try { - conn = (HttpURLConnection) new URL(urlStr).openConnection(); - conn.setRequestMethod("GET"); - conn.setConnectTimeout(30000); - conn.setReadTimeout(30000); - conn.setRequestProperty("Authorization", "Bearer " + accessToken); - conn.setRequestProperty("User-Agent", USER_AGENT); - int code = conn.getResponseCode(); - InputStream is = (code < 400) ? conn.getInputStream() : conn.getErrorStream(); - String resp = readStream(is); - if (code < 200 || code >= 300) { Log.e(TAG, "GET HTTP " + code + " from " + StoreLog.redactUrl(urlStr)); return null; } - return resp; - } catch (Exception e) { - Log.e(TAG, "GET failed: " + StoreLog.redactUrl(urlStr) + " (" + e.getClass().getSimpleName() + ")"); - return null; - } finally { - if (conn != null) conn.disconnect(); - } - } - - /** Authorized GET of raw bytes (the manifest binary). */ - public static byte[] getBytes(String urlStr, String accessToken) { - HttpURLConnection conn = null; - try { - conn = (HttpURLConnection) new URL(urlStr).openConnection(); - conn.setRequestMethod("GET"); - conn.setConnectTimeout(30000); - conn.setReadTimeout(120000); - if (accessToken != null) conn.setRequestProperty("Authorization", "Bearer " + accessToken); - conn.setRequestProperty("User-Agent", USER_AGENT); - int code = conn.getResponseCode(); - if (code < 200 || code >= 300) { Log.e(TAG, "bytes HTTP " + code + " from " + StoreLog.redactUrl(urlStr)); return null; } - return readAllBytes(conn.getInputStream()); - } catch (Exception e) { - Log.e(TAG, "bytes failed: " + StoreLog.redactUrl(urlStr) + " (" + e.getClass().getSimpleName() + ")"); - return null; - } finally { - if (conn != null) conn.disconnect(); - } - } - - static byte[] readAllBytes(InputStream in) throws IOException { - java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream(); - byte[] buf = new byte[131072]; - int n; - while ((n = in.read(buf)) != -1) out.write(buf, 0, n); - return out.toByteArray(); - } - - static String readStream(InputStream is) throws IOException { - if (is == null) return ""; - StringBuilder sb = new StringBuilder(); - try (BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) { - String line; - while ((line = br.readLine()) != null) sb.append(line); - } - return sb.toString(); - } - - /** "2026-03-29T12:00:00.000Z" to epoch millis, without java.time. */ - private static long parseIso8601(String s) { - int year = Integer.parseInt(s.substring(0, 4)); - int month = Integer.parseInt(s.substring(5, 7)); - int day = Integer.parseInt(s.substring(8, 10)); - int hour = Integer.parseInt(s.substring(11, 13)); - int minute = Integer.parseInt(s.substring(14, 16)); - int second = Integer.parseInt(s.substring(17, 19)); - long jd = 367L * year - (7 * (year + (month + 9) / 12)) / 4 + (275 * month) / 9 + day + 1721013L; - long epochDays = jd - 2440588L; - return epochDays * 86400000L + hour * 3600000L + minute * 60000L + second * 1000L; - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicBackend.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicBackend.kt index b14b4fb50f..316cabb656 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicBackend.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicBackend.kt @@ -2,63 +2,61 @@ package com.droiddeck.launcher.stores.epic import android.content.Context import android.content.Intent -import android.util.Log -import android.webkit.WebView +import com.droiddeck.launcher.R import com.droiddeck.launcher.stores.CatalogItem import com.droiddeck.launcher.stores.EpicLaunchSupport import com.droiddeck.launcher.stores.InstalledStoreGame import com.droiddeck.launcher.stores.LoginFlows import com.droiddeck.launcher.stores.Store import com.droiddeck.launcher.stores.StoreBackend -import com.droiddeck.launcher.stores.StoreExe -import com.droiddeck.launcher.stores.StoreGameSidecar import com.droiddeck.launcher.stores.StoreInstallRoot -import com.droiddeck.launcher.stores.StoreInstalls import com.droiddeck.launcher.stores.StoreLoginActivity -import com.droiddeck.launcher.stores.StoreShelves import com.droiddeck.launcher.stores.StoresState import com.droiddeck.launcher.stores.download.DownloadEntry import com.droiddeck.launcher.stores.download.DownloadQueue -import com.droiddeck.launcher.stores.download.DownloadStage -import org.json.JSONObject -import java.io.File -import java.util.concurrent.atomic.AtomicBoolean +import com.droiddeck.launcher.stores.mergeItems -/** Epic Games in the Stores section: sign-in, the library, the public store, installs and the per-launch sign-in code. */ object EpicBackend : StoreBackend, EpicLaunchSupport { - private const val TAG = "EpicBackend" override val store: Store = Store.EPIC - init { LoginFlows.epicFlow = { LoginFlow } } + init { + LoginFlows.epicFlow = { EpicLogin.create() } + } override fun signIn(context: Context) { - context.startActivity(Intent(context, StoreLoginActivity::class.java).putExtra(StoreLoginActivity.EXTRA_STORE, store.id).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) + context.startActivity( + Intent(context, StoreLoginActivity::class.java) + .putExtra(StoreLoginActivity.EXTRA_STORE, store.id) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK), + ) } override fun signOut(context: Context) { - EpicPrefs.get(context).edit().remove("library_cache").remove("library_synced_at").apply() + runCatching { EpicLibrary.forget(context) } + runCatching { EpicClient.signOut(context) } + EpicClient.forgetWebSignIn() } override fun syncLibrary(context: Context, force: Boolean) { val app = context.applicationContext Thread({ - // The cache off the main thread; with it on screen a background sync keeps quiet. val cached = EpicLibrary.cached(app).map { EpicLibrary.toCatalogItem(app, it) } val quiet = cached.isNotEmpty() && !force StoresState.post { - if (cached.isNotEmpty()) StoresState.library[store] = com.droiddeck.launcher.stores.mergeItems(StoresState.library[store], cached) - if (!quiet) StoresState.status[store] = "Fetching your library…" + if (cached.isNotEmpty()) StoresState.library[store] = mergeItems(StoresState.library[store], cached) + if (!quiet) StoresState.status[store] = app.getString(R.string.stores_sync_library) } val result = EpicLibrary.sync(app, force) { line -> if (!quiet) StoresState.post { StoresState.status[store] = line } } StoresState.post { StoresState.status.remove(store) when (result) { is EpicLibrary.SyncResult.Ok -> { - StoresState.library[store] = com.droiddeck.launcher.stores.mergeItems(StoresState.library[store], result.games.map { EpicLibrary.toCatalogItem(app, it) }); StoresState.problems.remove(store) + StoresState.library[store] = mergeItems(StoresState.library[store], result.games.map { EpicLibrary.toCatalogItem(app, it) }) + StoresState.problems.remove(store) } is EpicLibrary.SyncResult.Failed -> StoresState.problems[store] = result.message EpicLibrary.SyncResult.NotLoggedIn -> StoresState.problems[store] = StoresState.notSignedInLine(store) - EpicLibrary.SyncResult.Throttled -> if (!StoresState.library.containsKey(store)) StoresState.library[store] = com.droiddeck.launcher.stores.mergeItems(StoresState.library[store], cached) + EpicLibrary.SyncResult.Throttled -> if (!StoresState.library.containsKey(store)) StoresState.library[store] = cached EpicLibrary.SyncResult.Busy -> {} } } @@ -67,133 +65,33 @@ object EpicBackend : StoreBackend, EpicLaunchSupport { override fun loadShelves(context: Context, force: Boolean) { val app = context.applicationContext - EpicStoreCatalog.cachedFeatured(app)?.let { StoresState.post { StoresState.shelves[store] = markOwned(it) } } + EpicShelves.cached(app)?.let { s -> StoresState.post { StoresState.shelves[store] = EpicShelves.markOwned(s, StoresState.library[store]) } } Thread({ - val shelves = EpicStoreCatalog.featured(app, force) - StoresState.post { if (shelves != null) StoresState.shelves[store] = markOwned(shelves) } + val shelves = runCatching { EpicShelves.featured(app, force) }.getOrNull() + if (shelves != null) StoresState.post { StoresState.shelves[store] = EpicShelves.markOwned(shelves, StoresState.library[store]) } }, "epic-shelves").start() } - /** Store offers whose catalog item is in the library are owned: their cards offer Install under the library's id. */ - private fun markOwned(s: StoreShelves): StoreShelves { - val owned = StoresState.library[store] ?: return s - val byCatalogItem = owned.associateBy { it.extra["catalogItemId"] ?: "" } - fun mark(l: List<CatalogItem>) = l.map { i -> - val match = i.extra["items"]?.split(',')?.firstNotNullOfOrNull { byCatalogItem[it] } - if (match != null) match.copy(imageUrl = i.imageUrl ?: match.imageUrl, tallImageUrl = i.tallImageUrl ?: match.tallImageUrl) else i - } - return StoreShelves(mark(s.whatsNew), mark(s.deals), mark(s.free), mark(s.trending)) - } - - override fun install(context: Context, item: CatalogItem, root: File) { + override fun install(context: Context, item: CatalogItem, root: java.io.File) { val app = context.applicationContext - val namespace = item.extra["namespace"] ?: "" - val catalogItemId = item.extra["catalogItemId"] ?: "" - if (namespace.isEmpty() || catalogItemId.isEmpty()) { StoresState.logLine("Epic: \"${item.title}\" is not in your library"); return } + if (item.extra["namespace"].isNullOrEmpty() || item.extra["catalogItemId"].isNullOrEmpty()) { + StoresState.logLine("Epic: \"${item.title}\" is not in your library") + return + } val folder = StoreInstallRoot.folderFor(app, Store.EPIC, item.id, item.title, root) - val entry = DownloadEntry(store, item.id, item.title, cover = item.imageUrl, bytesTotal = item.sizeBytes, location = StoreInstallRoot.labelFor(app, folder)) - DownloadQueue.enqueue(app, entry) { InstallJob(app, item, namespace, catalogItemId, folder) } + val entry = DownloadEntry( + Store.EPIC, item.id, item.title, cover = item.imageUrl, bytesTotal = item.sizeBytes, + location = StoreInstallRoot.labelFor(app, folder), + ) + DownloadQueue.enqueue(app, entry) { EpicInstaller(app, item, folder) } } override fun uninstall(context: Context, game: InstalledStoreGame) {} - /** A fresh exchange code for the signed-in account; null when signed out or offline. Blocking. */ override fun exchangeCode(context: Context): String? { val token = EpicCredentialStore.getValidAccessToken(context) ?: return null - return EpicAuthClient.getExchangeCode(token) + return EpicApiClient.exchangeCode(token) } - /** The access token is past its time and the refresh just failed: only a new sign-in helps. */ override fun signInExpired(context: Context): Boolean = EpicCredentialStore.expired(context) - - private class InstallJob(val app: Context, val item: CatalogItem, val namespace: String, val catalogItemId: String, val folder: File) : DownloadQueue.DownloadJob { - private val cancelled = AtomicBoolean(false) - // On a card the in-flight chunks go to the app's cache instead: the card's write rate paces - // the whole install, and chunks are read back once at assembly. Internal installs keep the - // cache beside the game. A resume keeps whichever cache the stopped run filled: a - // `.chunks` already beside the game is reused, not fetched again into the scratch folder. - private val scratch: File? = if (StoreInstallRoot.isRemovable(app, folder) && !hasChunks(File(folder, ".chunks"))) StoreInstallRoot.scratchDir(app, Store.EPIC, item.id) else null - - private fun hasChunks(dir: File): Boolean = dir.isDirectory && (dir.list()?.isNotEmpty() == true) - - override fun run(handle: DownloadQueue.JobHandle): String? { - handle.stage(DownloadStage.MANIFEST, "Checking sign-in…") - val token = EpicCredentialStore.getValidAccessToken(app) ?: throw EpicDownloadManager.InstallException("Not signed in to Epic Games") - StoreInstalls.begin(folder, Store.EPIC, item.id, item.title, item.tallImageUrl ?: item.imageUrl, item.imageUrl) - if (scratch == null && hasChunks(File(folder, ".chunks"))) handle.log("epic: resuming \"${item.title}\" with the chunks already beside it") - val manifestJson = EpicApiClient.getManifestApiJson(token, namespace, catalogItemId, item.id) - ?: throw EpicDownloadManager.InstallException("The manifest could not be fetched") - val tags = EpicInstallTags.tagsForDevice() - var downloading = false - val result = EpicDownloadManager.install(app, manifestJson, folder.path, scratch?.path ?: "", tags, cancelled, object : EpicDownloadManager.Callback { - override fun onProgress(message: String, pct: Int) { - when { - message.startsWith("Writing") || message.startsWith("Complete") -> handle.stage(DownloadStage.INSTALL, message) - message.startsWith("Downloading chunks") -> { if (!downloading) { downloading = true; handle.stage(DownloadStage.DOWNLOAD, message) } else handle.progress(-1, -1, message) } - message.startsWith("Checking") -> handle.stage(DownloadStage.MANIFEST, message) - else -> handle.stage(DownloadStage.MANIFEST, message) - } - } - override fun onBytes(done: Long, total: Long, speedBps: Long) { handle.progress(done, total, null, speedBps) } - override fun onLog(line: String) { handle.log(line) } - override fun onSizes(downloadBytes: Long, diskBytes: Long) { - handle.diskSize(diskBytes) - EpicLibrary.rememberSize(app, item.id, diskBytes) - } - override fun onStage(stage: String, done: Long, total: Long, items: Int, itemsTotal: Int) { - handle.stage(when (stage) { "check" -> DownloadStage.MANIFEST; "verify" -> DownloadStage.VERIFY; else -> DownloadStage.INSTALL }) - handle.stageProgress(done, total, items, itemsTotal, bytes = stage == "install") - } - }) ?: return null - if (cancelled.get()) return null - handle.stage(DownloadStage.INSTALL, "Registering with Steam…") - EpicLibrary.rememberSize(app, item.id, result.bytes) - val deploymentId = runCatching { JSONObject(manifestJson).optString("deploymentId", "") }.getOrDefault("") - val exe = StoreExe.pick(folder, result.launchExe, item.title) - if (exe.isEmpty()) handle.log("epic: no exe found in ${folder.name}; pick one in Steam settings › Added games") - val args = EpicLaunchData.arguments(app, token, item.id, namespace, catalogItemId, deploymentId) - val sidecar = StoreGameSidecar( - Store.EPIC, item.id, item.title, exe = exe.ifEmpty { "game.exe" }, args = args, - installVersion = result.buildVersion, installedAt = System.currentTimeMillis(), - cover = item.tallImageUrl ?: item.imageUrl, hero = item.imageUrl, - // Both kept even when empty: the manifest was read, and names no prerequisite. - extra = EpicLaunchData.extras(item.id, namespace, catalogItemId, deploymentId) + mapOf( - com.droiddeck.launcher.frontend.WinCompSources.EPIC_PREREQ_PATH to result.prereqPath, - com.droiddeck.launcher.frontend.WinCompSources.EPIC_PREREQ_NAME to result.prereqName, - ) + (if (result.prereqRead) mapOf(com.droiddeck.launcher.frontend.WinCompSources.LIST_READ to "1") else emptyMap()), - ) - StoreInstalls.complete(app, folder, sidecar) - return folder.path - } - - override fun cancel(deleteFiles: Boolean) { - cancelled.set(true) - if (deleteFiles) StoreInstalls.discard(app, folder, listOfNotNull(File(folder, ".chunks"), scratch, StoreInstallRoot.scratchDir(app, Store.EPIC, item.id))) - } - } - - /** - * Epic's web sign-in: the login page redirects to a JSON page carrying an authorization code, - * read out of the document and exchanged for tokens. - */ - private object LoginFlow : StoreLoginActivity.Flow { - private const val REDIRECT = "https://www.epicgames.com/id/api/redirect" - override val startUrl: String = "https://www.epicgames.com/id/login?redirectUrl=https%3A%2F%2Fwww.epicgames.com%2Fid%2Fapi%2Fredirect%3FclientId%3D${EpicAuthClient.CLIENT_ID}%26responseType%3Dcode" - override val userAgent: String get() = EpicAuthClient.USER_AGENT - override val readsPage: Boolean get() = true - override fun isRedirect(url: String): Boolean = url.startsWith(REDIRECT) - - override fun finish(activity: StoreLoginActivity, view: WebView, url: String): String? { - // The document's text comes JSON-quoted from evaluateJavascript. - var text = url - if (text.startsWith("\"")) text = text.substring(1, text.length - 1) - text = text.replace("\\n", "").replace("\\r", "").replace("\\\"", "\"") - val code = Regex("\"authorizationCode\":\"([^\"]+)\"").find(text)?.groupValues?.get(1) - if (code.isNullOrEmpty()) { Log.w(TAG, "login: no authorization code on the redirect page"); return activity.getString(com.droiddeck.launcher.R.string.stores_login_error_verification) } - val result = EpicAuthClient.exchangeCode(code) ?: return activity.getString(com.droiddeck.launcher.R.string.stores_login_error_generic) - EpicCredentialStore.save(activity, result) - Log.i(TAG, "signed in") - return null - } - } } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicClient.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicClient.kt new file mode 100644 index 0000000000..a1bad46229 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicClient.kt @@ -0,0 +1,427 @@ +package com.droiddeck.launcher.stores.epic + +import android.content.Context +import android.content.Intent +import android.net.Uri +import android.util.Log +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue +import com.droiddeck.launcher.R +import com.droiddeck.launcher.frontend.AddedGames +import com.droiddeck.launcher.frontend.Library +import com.droiddeck.launcher.runtime.LinuxRuntime +import com.droiddeck.launcher.session.SessionPrefs +import com.droiddeck.launcher.session.SessionService +import com.droiddeck.launcher.session.SessionState +import com.droiddeck.launcher.storage.SteamStorage +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreGameSidecar +import com.droiddeck.launcher.stores.StoreInstallRoot +import com.droiddeck.launcher.stores.StoreLog +import com.droiddeck.launcher.stores.StoreLoginActivity +import com.droiddeck.launcher.stores.StoresState +import com.droiddeck.launcher.stores.download.DownloadEntry +import com.droiddeck.launcher.stores.download.DownloadQueue +import com.droiddeck.launcher.stores.SteamLiveShortcuts +import org.json.JSONObject +import java.io.File +import java.net.HttpURLConnection +import java.net.URL +import java.util.concurrent.Executors +import java.util.zip.CRC32 + +object EpicClient { + private const val TAG = "EpicClient" + const val DOWNLOAD_ID = "epic-games-launcher" + const val DOWNLOAD_KEY = "epic:$DOWNLOAD_ID" + const val PROGRAM = "/usr/local/bin/droiddeck-epic" + const val PLAYING = "epic-playing" + const val STEAM_LAUNCHER = "/usr/local/bin/droiddeck-epic-steam" + const val OPEN = "epic-open" + const val FOCUSED_APP = "steam-focused-app" + private const val STEAM_DIR = "/usr/local/bin" + private const val SETTINGS = "settings/app-settings.json" + private const val STOCK_INSTALL_DIR = "/root/Games" + private const val FEX_DIR = "FEX-Emu" + private val FEX_PREFIXES = listOf("usr/", "", "files/usr/", "files/") + private const val FEX_WANTED = "root/.config/droiddeck/fex-wanted" + private const val ICON = "epic-games-launcher.png" + const val LAUNCHER_APP_ID = 0 + private const val PREF_CHECKED = "client_checked_at" + private const val CHECK_EVERY_MS = 6 * 60 * 60 * 1000L + private const val IMPORT_EVERY_MS = 15_000L + private const val STATE = "root/.local/share/droiddeck-epic" + private const val DATA = "root/.local/share/com.epicgames.eglv2" + private const val AUTH = "auth/auth.json" + private const val SIGNED_OUT = "signed-out" + private const val AUTO_SIGN_IN = "auto-sign-in" + private val UNINSTALL_PATHS = listOf("current.json", "app", "runtime", "downloads", "bin", "fex", "run", "logs", "status.json", "instance.json") + private const val COOKIE_DOMAIN = ".epicgames.com" + private val COOKIE_PATHS = listOf("/", "/id") + private val COOKIE_URLS = listOf( + "https://www.epicgames.com/id/login", "https://www.epicgames.com/", "https://epicgames.com/", + "https://store.epicgames.com/", "https://accounts.epicgames.com/", "https://launcher.store.epicgames.com/", + ) + private val work = Executors.newSingleThreadExecutor { r -> Thread(r, "epic-client") } + @Volatile private var importedAt = 0L + + data class Status( + val installed: Boolean = false, + val version: String? = null, + val runtimeVersion: String? = null, + ) + + var status by mutableStateOf(Status()) + private set + + fun stateDir(context: Context): File = File(LinuxRuntime.rootDir(context), STATE) + + fun dataDir(context: Context): File = File(LinuxRuntime.rootDir(context), DATA) + + fun downloadsDir(context: Context): File = File(stateDir(context), "downloads") + + fun guestPath(context: Context, file: File): String? { + val root = LinuxRuntime.rootDir(context).absolutePath + val path = file.absolutePath + return if (path.startsWith("$root/")) "/" + path.removePrefix("$root/") else null + } + + private fun ready(dir: File): Boolean = File(dir, ".droiddeck-ready").isFile + + internal fun canHandOff(context: Context): Boolean = EpicCredentialStore.isLoggedIn(context.applicationContext) + + fun signOut(context: Context): Boolean { + val app = context.applicationContext + val auth = File(dataDir(app), AUTH) + val signedIn = launcherSignedIn(auth) + if (signedIn) runCatching { File(stateDir(app), SIGNED_OUT).writeText("${System.currentTimeMillis() / 1000}\n") } + auth.delete() + File(stateDir(app), AUTO_SIGN_IN).delete() + Log.i(TAG, if (signedIn) "signed the Epic Games Launcher out too" else "the Epic Games Launcher was already signed out") + return signedIn + } + + internal fun launcherSignedIn(auth: File): Boolean = + runCatching { JSONObject(auth.readText()).optJSONObject("prod")?.optString("refresh_token").orEmpty().isNotEmpty() }.getOrDefault(false) + + fun forgetWebSignIn() { + android.os.Handler(android.os.Looper.getMainLooper()).post { + runCatching { + val cookies = android.webkit.CookieManager.getInstance() + var cleared = 0 + for (url in COOKIE_URLS) { + val lines = expiredCookies(cookies.getCookie(url), Uri.parse(url).host) + for (line in lines) cookies.setCookie(url, line) + cleared += lines.size + } + cookies.flush() + Log.i(TAG, "cleared the Epic web sign-in ($cleared cookie lines)") + }.onFailure { Log.w(TAG, "could not clear the Epic web sign-in: ${it.javaClass.simpleName}") } + } + } + + internal fun expiredCookies(header: String?, host: String? = null): List<String> { + val domains = listOfNotNull(COOKIE_DOMAIN, host?.takeIf { it.endsWith(COOKIE_DOMAIN) }) + return header.orEmpty().split(';').map { it.substringBefore('=').trim() }.filter { it.isNotEmpty() }.distinct() + .flatMap { name -> + COOKIE_PATHS.flatMap { path -> + listOf("$name=; Max-Age=0; Path=$path; Secure") + domains.map { "$name=; Max-Age=0; Path=$path; Secure; Domain=$it" } + } + } + } + + fun read(context: Context): Status { + val app = context.applicationContext + if (!LinuxRuntime.isInstalled(app)) return Status() + val state = stateDir(app) + val current = runCatching { JSONObject(File(state, "current.json").readText()) }.getOrNull() + val version = current?.optString("app")?.ifEmpty { null } + val runtimeVersion = current?.optString("runtime")?.ifEmpty { null } + val installed = version != null && runtimeVersion != null && + ready(File(state, "app/$version")) && ready(File(state, "runtime/$runtimeVersion")) + return Status(installed, version, runtimeVersion) + } + + fun refresh(context: Context) { + val app = context.applicationContext + work.execute { + val next = runCatching { read(app) }.getOrNull() ?: return@execute + if (next.installed && System.currentTimeMillis() - importedAt >= IMPORT_EVERY_MS) { + importedAt = System.currentTimeMillis() + runCatching { EpicClientLibrary.importClientGames(app) } + .onFailure { Log.w(TAG, "client library scan failed: ${it.javaClass.simpleName}") } + } + StoresState.post { if (status != next) status = next } + } + } + + fun ensure(context: Context) { + val app = context.applicationContext + if (!LinuxRuntime.isInstalled(app)) { refresh(app); return } + work.execute { + val before = read(app) + StoresState.post { if (status != before) status = before } + if (DownloadQueue.isActive(DOWNLOAD_KEY) || !before.installed) return@execute + syncLibrary(app) + val prefs = EpicPrefs.get(app) + val now = System.currentTimeMillis() + if (now - prefs.getLong(PREF_CHECKED, 0L) < CHECK_EVERY_MS) return@execute + val latest = EpicClientSources.launcher()?.version + prefs.edit().putLong(PREF_CHECKED, if (latest != null) now else 0L).apply() + val after = read(app) + StoresState.post { if (status != after) status = after } + if (updateWanted(after, latest)) StoresState.post { enqueue(app) } + } + } + + internal fun updateWanted(current: Status, latest: String?): Boolean = + current.installed && latest != null && latest != current.version + + @Volatile var uninstalling = false + + fun install(context: Context) { + val app = context.applicationContext + if (status.installed || uninstalling) return + enqueue(app) + } + + private fun syncLibrary(app: Context) { + if (launcherRunning(app)) return + EpicClientLibrary.sync(app) + } + + private fun enqueue(app: Context) { + if (DownloadQueue.isActive(DOWNLOAD_KEY)) return + val entry = DownloadEntry( + Store.EPIC, DOWNLOAD_ID, app.getString(R.string.epic_client_title), + location = StoreInstallRoot.labelFor(app, stateDir(app)), + ) + DownloadQueue.enqueue(app, entry) { EpicClientInstaller(app) } + } + + internal fun installed(context: Context) { + val app = context.applicationContext + EpicPrefs.get(app).edit().putLong(PREF_CHECKED, System.currentTimeMillis()).apply() + refresh(app) + work.execute { syncLibrary(app) } + } + + fun libraryChanged(context: Context) { + val app = context.applicationContext + work.execute { if (read(app).installed) syncLibrary(app) } + } + + val shortcutAppId: Long = CRC32().apply { update("\"$STEAM_LAUNCHER\"${Library.EPIC_LAUNCHER_NAME}".toByteArray()) }.value or 0x80000000L + + fun gameId(appId: Long): String = java.lang.Long.toUnsignedString((appId shl 32) or 0x02000000L) + + fun steamListing(context: Context): JSONObject? { + val current = read(context) + if (!current.installed) return null + val entry = JSONObject().put("name", Library.EPIC_LAUNCHER_NAME).put("exe", STEAM_LAUNCHER).put("folder", STEAM_DIR) + .put("dir", STEAM_DIR).put("appid", shortcutAppId).put("seen", 0).put("native", true) + icon(context, current.version)?.let { guestPath(context, it) }?.let { entry.put("art", JSONObject().put("icon", it)) } + return entry + } + + fun steamLauncherId(context: Context): Long? = + SteamLiveShortcuts.ensure(context, Library.EPIC_LAUNCHER_NAME, STEAM_LAUNCHER, STEAM_DIR, compat = false, appId = shortcutAppId) + + fun icon(context: Context, version: String?): File? = + version?.let { File(stateDir(context), "app/$it/$ICON") }?.takeIf(File::isFile) + + fun launcherEntry(context: Context, name: String, current: Status = status, art: File? = icon(context, current.version)): Library.SteamGame? { + if (!current.installed) return null + return Library.SteamGame( + appId = LAUNCHER_APP_ID, name = name, art = art, library = Library.EPIC_LAUNCHER, + gameId = LAUNCHER_APP_ID.toLong(), source = Store.EPIC.id, + ) + } + + fun withLauncher(games: List<Library.SteamGame>, launcher: Library.SteamGame?): List<Library.SteamGame> { + if (launcher == null) return games + val at = games.indexOfFirst { it.source == Store.EPIC.id }.takeIf { it >= 0 } ?: games.size + return games.subList(0, at) + launcher + games.subList(at, games.size) + } + + private fun steamSession(): Boolean = + SessionState.running && !SessionState.stopRequested && SessionState.mode == SessionService.MODE_STEAM + + fun launcherSession(): Boolean = + SessionState.running && !SessionState.stopRequested && SessionState.mode == SessionService.MODE_RUN && + SessionState.program == com.droiddeck.launcher.session.NoSteamLaunch.EPIC + + fun uninstall(context: Context): Boolean { + val app = context.applicationContext + val state = stateDir(app) + com.droiddeck.launcher.stores.download.DownloadQueue.clear(app, DOWNLOAD_KEY) + val removed = UNINSTALL_PATHS.map { File(state, it) } + .map { com.droiddeck.launcher.runtime.RuntimeFileTree.deleteWhatCan(it, null) } + .all { it } + val next = read(app) + StoresState.post { status = next } + Log.i(TAG, if (removed) "uninstalled the Epic Games Launcher" else "could not remove every Epic Games Launcher file") + return removed && !next.installed + } + + fun launcherRunning(context: Context): Boolean = + (steamSession() || launcherSession()) && File(LinuxRuntime.sessionRoot(context), OPEN).exists() + + fun launcherFocused(context: Context): Boolean { + val root = LinuxRuntime.sessionRoot(context) + if (launcherSession()) return File(root, OPEN).exists() + if (!steamSession()) return false + val open = runCatching { File(root, OPEN).readText().trim() }.getOrNull() ?: return false + val focused = runCatching { File(root, FOCUSED_APP).readText().trim() }.getOrNull() ?: return false + return focused == (open.takeIf { it.length > 1 && it.all(Char::isDigit) } ?: shortcutAppId.toString()) + } + + fun playing(context: Context): Boolean = File(LinuxRuntime.sessionRoot(context), PLAYING).exists() + + fun fexReady(context: Context): Boolean { + val usr = File(LinuxRuntime.rootDir(context), "usr/bin") + if (File(usr, "FEXServer").isFile && fexBinary(usr)) return true + return Library.steamLibraries(context).any { (library, _) -> + val manifest = File(library, "steamapps/appmanifest_${SteamStorage.FEX}.acf") + val dir = runCatching { SteamStorage.parseManifest(manifest, manifest.readText())?.installDir }.getOrNull() + val roots = listOf(library, com.droiddeck.launcher.session.SecondaryLibrary.privateRoot(context.filesDir, library)) + listOfNotNull(dir, FEX_DIR).distinct().any { name -> + roots.any { root -> + val tool = File(root, "steamapps/common/$name") + FEX_PREFIXES.any { fexBinary(File(tool, "${it}bin")) } + } + } + } + } + + private fun fexBinary(bin: File): Boolean = File(bin, "FEX").isFile || File(bin, "FEXInterpreter").isFile + + fun requestFex(context: Context) { + runCatching { + File(LinuxRuntime.rootDir(context), FEX_WANTED).apply { parentFile?.mkdirs() }.writeText("1\n") + }.onFailure { Log.w(TAG, "could not ask Steam for FEX: ${it.javaClass.simpleName}") } + } + + fun prepareInstallDir(context: Context): String? { + val app = context.applicationContext + val dirs = StoreInstallRoot.targets(app).mapNotNull { t -> + val folder = StoreInstallRoot.storeDir(t.root, Store.EPIC) + AddedGames.guestPath(app, folder)?.let { t.root.absolutePath to (folder to it) } + }.toMap() + if (dirs.isEmpty()) return null + val chosen = dirs[SessionPrefs.storesInstallTarget(app)] ?: dirs[StoreInstallRoot.internalRoot(app).absolutePath] ?: dirs.values.first() + val file = File(dataDir(app), SETTINGS) + val settings = runCatching { JSONObject(file.readText()) }.getOrNull() ?: JSONObject() + val current = settings.optString("defaultInstallDir").trimEnd('/') + if (current.isNotEmpty() && current != STOCK_INSTALL_DIR && dirs.values.none { it.second == current } && !(current.endsWith("/${Store.EPIC.shortLabel}") && (current.startsWith("/mnt/droiddeck-") || current.startsWith("/root/Storage/")))) return current + if (!chosen.first.isDirectory && !chosen.first.mkdirs()) return null + if (current == chosen.second) return current + return runCatching { + file.parentFile?.mkdirs() + val staged = File(file.path + ".tmp") + staged.writeText(settings.put("defaultInstallDir", chosen.second).toString(2)) + check(staged.renameTo(file)) + Log.i(TAG, "the Epic Games Launcher installs games to ${chosen.second}") + chosen.second + }.onFailure { Log.w(TAG, "could not set the launcher's install folder: ${it.javaClass.simpleName}") }.getOrNull() + } + + fun playInSteam(context: Context, id: String): JSONObject { + if (!steamSession()) return failed("no-steam") + runCatching { EpicClientLibrary.importClientGames(context) }.onFailure { Log.w(TAG, "client library scan failed: ${it.javaClass.simpleName}") } + val game = steamShortcut(AddedGames.scan(context), id) ?: return failed("not-registered") + if (com.droiddeck.launcher.session.NoSteamLaunch.enabled(context, com.droiddeck.launcher.session.NoSteamLaunch.settingsId(game))) return failed("no-steam-game") + if (!AddedGames.inSteam(context, game.appId) || SteamLiveShortcuts.known(context, game.appId) == false) return failed("not-in-steam") + if (!SessionService.launchGame(context, gameId(game.appId))) return failed("busy") + Log.i(TAG, "the Epic Games Launcher hands $id to Steam as ${gameId(game.appId)}") + return JSONObject().put("ok", true) + } + + fun runSteamGame(context: Context, id: String): JSONObject { + if (!com.droiddeck.launcher.frontend.GameLaunchLink.validId(id)) return failed("bad-id") + if (!steamSession()) return failed("no-steam") + if (!SessionService.launchGame(context, id)) return failed("busy") + Log.i(TAG, "the Epic Games Launcher hands Steam game $id to Steam") + return JSONObject().put("ok", true) + } + + private fun failed(reason: String): JSONObject = JSONObject().put("ok", false).put("reason", reason) + + internal fun steamShortcut(games: List<AddedGames.Game>, id: String): AddedGames.Game? = + games.firstOrNull { it.source == Store.EPIC.id && it.storeId == id } + + fun redirectOf(url: String): String? { + val uri = runCatching { Uri.parse(url) }.getOrNull() ?: return null + if (uri.scheme != "https" || uri.host !in SIGN_IN_HOSTS || uri.path?.startsWith("/id/authorize") != true) return null + val redirect = runCatching { uri.getQueryParameter("redirect_uri") }.getOrNull() ?: return null + return redirect.takeIf { loopback(it) } + } + + fun loopback(url: String): Boolean { + val uri = runCatching { Uri.parse(url) }.getOrNull() ?: return false + return uri.scheme == "http" && uri.host in LOOPBACK && uri.port in 1..65535 && uri.userInfo == null + } + + fun signIn(context: Context, url: String, auto: Boolean): Boolean { + if (redirectOf(url) == null) return false + context.startActivity( + Intent(context, StoreLoginActivity::class.java) + .putExtra(StoreLoginActivity.EXTRA_STORE, Store.EPIC.id) + .putExtra(StoreLoginActivity.EXTRA_CLIENT_URL, if (auto) withoutAccountPrompt(url) else url) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK), + ) + Log.i(TAG, "sign-in for the Epic Games Launcher: ${StoreLog.redactUrl(url)}") + return true + } + + internal fun withoutAccountPrompt(url: String): String { + val query = url.substringAfter('?', "") + if (query.isEmpty()) return url + val kept = query.split('&').filter { it != "prompt=select_account" } + if (kept.size == query.split('&').size) return url + return url.substringBefore('?') + if (kept.isEmpty()) "" else "?" + kept.joinToString("&") + } + + fun deliver(url: String): Boolean { + if (!loopback(url)) return false + var conn: HttpURLConnection? = null + return try { + conn = (URL(url).openConnection(java.net.Proxy.NO_PROXY) as HttpURLConnection).apply { + connectTimeout = 10_000 + readTimeout = 15_000 + instanceFollowRedirects = false + } + val code = conn.responseCode + runCatching { (if (code < 400) conn.inputStream else conn.errorStream)?.use { it.readBytes() } } + Log.i(TAG, "sign-in handed to the launcher: HTTP $code") + code in 200..399 + } catch (e: Exception) { + Log.w(TAG, "the launcher's sign-in listener did not answer: ${e.javaClass.simpleName}") + false + } finally { + runCatching { conn?.disconnect() } + } + } + + internal fun loginFlow(url: String): StoreLoginActivity.Flow? { + val redirect = redirectOf(url) ?: return null + val agent = runCatching { EpicNative.call("auth.config")?.optString("webViewUserAgent") }.getOrNull()?.ifEmpty { null } + return ClientLogin(url, redirect, agent ?: StoreLoginActivity.CHROME_UA) + } + + private class ClientLogin( + override val startUrl: String, + private val redirect: String, + override val userAgent: String, + ) : StoreLoginActivity.Flow { + override fun isRedirect(url: String): Boolean = + url == redirect || url.startsWith("$redirect?") || url.startsWith("$redirect#") + + override fun finish(activity: StoreLoginActivity, view: android.webkit.WebView, url: String): String? = + if (deliver(url)) null else activity.getString(R.string.epic_client_sign_in_failed) + } + + private val SIGN_IN_HOSTS = setOf("www.epicgames.com", "epicgames.com") + private val LOOPBACK = setOf("127.0.0.1", "localhost") +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicClientInstaller.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicClientInstaller.kt new file mode 100644 index 0000000000..12116732cf --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicClientInstaller.kt @@ -0,0 +1,357 @@ +package com.droiddeck.launcher.stores.epic + +import android.content.Context +import com.droiddeck.launcher.R +import com.droiddeck.launcher.runtime.GuestCommand +import com.droiddeck.launcher.runtime.LinuxRuntime +import com.droiddeck.launcher.stores.StoreInstallRoot +import com.droiddeck.launcher.stores.download.DownloadQueue +import com.droiddeck.launcher.stores.download.DownloadStage +import com.droiddeck.launcher.stores.formatBytes +import org.json.JSONObject +import java.io.File +import java.io.FileOutputStream +import java.io.IOException +import java.io.RandomAccessFile +import java.net.HttpURLConnection +import java.net.URI +import java.net.URL +import java.net.URLDecoder +import java.security.MessageDigest +import java.util.concurrent.atomic.AtomicBoolean + +internal object EpicClientSources { + const val LAUNCHER_URL = "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncher-x86_64.AppImage" + const val LAUNCHER_FILE = "EpicGamesLauncher-x86_64.AppImage" + const val RUNTIME_BASE = "https://repo.steampowered.com/steamrt4/images/" + const val RUNTIME_FILE = "com.valvesoftware.SteamRuntime.Platform-amd64,i386-steamrt4-runtime.tar.gz" + const val GLES_URL = "https://deb.debian.org/debian/pool/main/libg/libglvnd/libgles2_1.7.0-1+b2_amd64.deb" + const val GLES_FILE = "libgles2_1.7.0-1+b2_amd64.deb" + const val GLES_SHA256 = "e12c18aa77939d122ee1dea520ba0440b97dc19200b7396e03dff03a3ece74c1" + const val USER_AGENT = "DroidDeck" + private val VERSION = Regex("[A-Za-z0-9._+-]{1,64}") + private val SUM = Regex("^([0-9a-fA-F]{64})\\s+\\*?(.+)$") + + class Source(val url: String, val version: String, val sha256: String? = null) + + fun launcher(): Source? { + val location = redirect(LAUNCHER_URL) ?: return null + val version = launcherVersion(location) ?: return null + return Source(location, version) + } + + fun launcherVersion(location: String): String? { + val uri = runCatching { URI(location) }.getOrNull() ?: return null + if (uri.scheme != "https") return null + val raw = Regex("/Builds/EGLv2/([^/]+)/Linux/").find(uri.rawPath ?: return null)?.groupValues?.get(1) ?: return null + val version = runCatching { URLDecoder.decode(raw.replace("+", "%2B"), "UTF-8") }.getOrNull() ?: return null + return version.takeIf { VERSION.matches(it) && it != "." && it != ".." } + } + + fun runtime(): Source? { + val version = text(RUNTIME_BASE + "latest-public-stable/VERSION.txt")?.trim()?.takeIf { VERSION.matches(it) && it.startsWith("4.") } ?: return null + val sums = text("$RUNTIME_BASE$version/SHA256SUMS") ?: return null + val sha = sha256For(sums, RUNTIME_FILE) ?: return null + return Source("$RUNTIME_BASE$version/" + RUNTIME_FILE.replace(",", "%2C"), version, sha) + } + + fun gles(): Source = Source(GLES_URL, "1.7.0-1+b2", GLES_SHA256) + + fun sha256For(sums: String, file: String): String? = sums.lineSequence() + .mapNotNull { SUM.find(it.trim()) } + .firstOrNull { it.groupValues[2].trim() == file } + ?.groupValues?.get(1)?.lowercase() + + private fun redirect(url: String): String? { + var conn: HttpURLConnection? = null + return try { + conn = (URL(url).openConnection() as HttpURLConnection).apply { + instanceFollowRedirects = false + connectTimeout = 20_000 + readTimeout = 20_000 + setRequestProperty("User-Agent", USER_AGENT) + } + val code = conn.responseCode + val location = conn.getHeaderField("Location") + if (code in 300..399 && location != null) URI(url).resolve(location).toString() else null + } catch (e: Exception) { + null + } finally { + runCatching { conn?.disconnect() } + } + } + + private fun text(url: String): String? { + var conn: HttpURLConnection? = null + return try { + conn = (URL(url).openConnection() as HttpURLConnection).apply { + connectTimeout = 20_000 + readTimeout = 30_000 + setRequestProperty("User-Agent", USER_AGENT) + } + if (conn.responseCode != 200) null else conn.inputStream.use { it.readBytes().toString(Charsets.UTF_8) } + } catch (e: Exception) { + null + } finally { + runCatching { conn?.disconnect() } + } + } + + private val PART_MIB = longArrayOf(5, 8, 10, 15, 16, 25, 32, 50, 64, 100, 128, 256, 512) + + fun etagMatches(file: File, etag: String): Boolean? { + val m = Regex("^(?:W/)?\"?([0-9a-fA-F]{32})(?:-(\\d+))?\"?$").matchEntire(etag.trim()) ?: return null + if (etag.trim().startsWith("W/")) return null + val want = m.groupValues[1].lowercase() + val count = m.groupValues[2].toLongOrNull() ?: return hex(digest(file, "MD5", 0L, file.length())) == want + val size = file.length() + val candidates = PART_MIB.map { it shl 20 }.filter { (size + it - 1) / it == count } + if (candidates.isEmpty()) return null + return candidates.any { multipart(file, it) == want } + } + + private fun multipart(file: File, partSize: Long): String { + val outer = MessageDigest.getInstance("MD5") + var start = 0L + val size = file.length() + while (start < size) { + val end = minOf(size, start + partSize) + outer.update(digest(file, "MD5", start, end)) + start = end + } + return hex(outer.digest()) + } + + fun sha256(file: File): String = hex(digest(file, "SHA-256", 0L, file.length())) + + private fun digest(file: File, algorithm: String, start: Long, end: Long): ByteArray { + val md = MessageDigest.getInstance(algorithm) + RandomAccessFile(file, "r").use { raf -> + raf.seek(start) + val buf = ByteArray(1 shl 20) + var left = end - start + while (left > 0) { + val n = raf.read(buf, 0, minOf(buf.size.toLong(), left).toInt()) + if (n < 0) break + md.update(buf, 0, n) + left -= n + } + } + return md.digest() + } + + private fun hex(bytes: ByteArray): String = bytes.joinToString("") { "%02x".format(it) } + + fun isAppImage(file: File): Boolean = runCatching { + RandomAccessFile(file, "r").use { raf -> + val head = ByteArray(11) + raf.readFully(head) + head[0] == 0x7f.toByte() && head[1] == 'E'.code.toByte() && head[2] == 'L'.code.toByte() && head[3] == 'F'.code.toByte() && + head[8] == 'A'.code.toByte() && head[9] == 'I'.code.toByte() && head[10] == 2.toByte() + } + }.getOrDefault(false) +} + +internal class EpicClientInstaller(private val app: Context) : DownloadQueue.DownloadJob { + private val cancelled = AtomicBoolean(false) + @Volatile private var connection: HttpURLConnection? = null + + private class Part(val url: String, val file: File, val sha256: String?, val appImage: Boolean) { + var size = -1L + var mismatch: String? = null + } + + override fun run(handle: DownloadQueue.JobHandle): String? { + handle.stage(DownloadStage.MANIFEST, app.getString(R.string.epic_client_checking)) + if (!LinuxRuntime.isInstalled(app)) throw IllegalStateException(app.getString(R.string.epic_client_no_runtime)) + val launcher = EpicClientSources.launcher() ?: throw IllegalStateException(app.getString(R.string.epic_client_unreachable)) + val runtime = EpicClientSources.runtime() ?: throw IllegalStateException(app.getString(R.string.epic_client_unreachable)) + if (cancelled.get()) return null + val state = EpicClient.stateDir(app) + val before = EpicClient.read(app) + val needApp = !(before.version == launcher.version && File(state, "app/${launcher.version}/.droiddeck-ready").isFile) + val needRuntime = !(before.runtimeVersion == runtime.version && File(state, "runtime/${runtime.version}/.droiddeck-ready").isFile) + val dir = EpicClient.downloadsDir(app).apply { mkdirs() } + val gles = EpicClientSources.gles() + val parts = buildList { + if (needApp) add(Part(launcher.url, File(dir, "${launcher.version}-${EpicClientSources.LAUNCHER_FILE}"), null, true)) + if (needRuntime) { + add(Part(runtime.url, File(dir, "steamrt4-${runtime.version}.tar.gz"), runtime.sha256, false)) + add(Part(gles.url, File(dir, EpicClientSources.GLES_FILE), gles.sha256, false)) + } + } + val keep = parts.flatMap { listOf(it.file.name, it.file.name + PARTIAL, it.file.name + TAG) }.toSet() + dir.listFiles()?.forEach { if (it.name !in keep) it.deleteRecursively() } + if (parts.isNotEmpty()) { + parts.forEach { it.size = length(it.url) } + val total = parts.sumOf { it.size.coerceAtLeast(0L) } + val have = parts.sumOf { p -> if (p.file.isFile) p.file.length() else File(p.file.path + PARTIAL).length() } + val needed = (total - have).coerceAtLeast(0L) + (if (needApp) APP_ROOM else 0L) + (if (needRuntime) RUNTIME_ROOM else 0L) + val free = StoreInstallRoot.availableBytes(state) + if (StoreInstallRoot.insufficientSpace(needed, free)) { + throw IllegalStateException(app.getString(R.string.stores_storage_insufficient, formatBytes(needed), formatBytes(free))) + } + var base = 0L + for (part in parts) { + fetch(part, handle, base, total) + if (cancelled.get()) return null + base += part.size.coerceAtLeast(part.file.length()) + } + } + if (cancelled.get()) return null + handle.stage(DownloadStage.INSTALL, app.getString(R.string.epic_client_unpacking)) + val argv = mutableListOf(EpicClient.PROGRAM, "install", "--app-version", launcher.version, "--runtime-version", runtime.version) + fun guest(file: File) = EpicClient.guestPath(app, file) ?: throw IllegalStateException(app.getString(R.string.epic_client_unpack_failed, file.name)) + if (needApp) argv += listOf("--app", guest(parts[0].file)) + if (needRuntime) argv += listOf("--runtime", guest(parts[parts.size - 2].file), "--gles", guest(parts[parts.size - 1].file)) + var answer: JSONObject? = null + val code = GuestCommand.run(app, argv, fakeRoot = true, logName = "epic-client") { line -> + if (line.startsWith("{")) runCatching { JSONObject(line) }.getOrNull()?.let { answer = it } + } + val result = answer + if (code != 0 || result?.optBoolean("installed") != true) { + val reason = result?.optString("reason")?.ifEmpty { null } ?: "exit $code" + throw IllegalStateException(app.getString(R.string.epic_client_unpack_failed, reason)) + } + parts.forEach { it.file.delete() } + handle.log("Epic Games Launcher ${launcher.version} installed (runtime ${runtime.version})") + EpicClient.installed(app) + return state.absolutePath + } + + override fun cancel(deleteFiles: Boolean) { + cancelled.set(true) + runCatching { connection?.disconnect() } + if (deleteFiles) EpicClient.downloadsDir(app).deleteRecursively() + } + + private fun length(url: String): Long { + var conn: HttpURLConnection? = null + return try { + conn = (URL(url).openConnection() as HttpURLConnection).apply { + requestMethod = "HEAD" + connectTimeout = 20_000 + readTimeout = 20_000 + setRequestProperty("User-Agent", EpicClientSources.USER_AGENT) + setRequestProperty("Accept-Encoding", "identity") + } + if (conn.responseCode == 200) conn.contentLengthLong else -1L + } catch (e: Exception) { + -1L + } finally { + runCatching { conn?.disconnect() } + } + } + + private fun fetch(part: Part, handle: DownloadQueue.JobHandle, base: Long, total: Long) { + if (part.file.isFile && (part.size <= 0 || part.file.length() == part.size)) { + handle.progress(base + part.file.length(), total) + return + } + part.file.delete() + val partial = File(part.file.path + PARTIAL) + val tag = File(part.file.path + TAG) + var attempt = 0 + while (true) { + if (cancelled.get()) return + try { + transfer(part, partial, tag, handle, base, total) + if (cancelled.get()) return + verify(part, partial, runCatching { tag.readText().trim() }.getOrDefault("")) + if (!partial.renameTo(part.file)) throw IOException("could not keep ${part.file.name}") + tag.delete() + return + } catch (e: IOException) { + if (cancelled.get()) return + attempt++ + handle.log("Epic Games Launcher: ${part.file.name} attempt $attempt: ${e.message ?: e.javaClass.simpleName}") + if (attempt >= ATTEMPTS) throw IllegalStateException(app.getString(R.string.epic_client_download_failed, e.message ?: e.javaClass.simpleName)) + val until = System.currentTimeMillis() + (2_000L shl (attempt - 1)).coerceAtMost(30_000L) + while (System.currentTimeMillis() < until && !cancelled.get()) Thread.sleep(100) + } + } + } + + private fun transfer(part: Part, partial: File, tag: File, handle: DownloadQueue.JobHandle, base: Long, total: Long) { + val have = if (partial.isFile) partial.length() else 0L + if (part.size > 0 && have > part.size) { partial.delete(); tag.delete(); throw IOException("partial file larger than the download") } + if (part.size > 0 && have == part.size) return + val etag = runCatching { tag.readText().trim() }.getOrDefault("") + val conn = (URL(part.url).openConnection() as HttpURLConnection).apply { + connectTimeout = 20_000 + readTimeout = 30_000 + setRequestProperty("User-Agent", EpicClientSources.USER_AGENT) + setRequestProperty("Accept-Encoding", "identity") + if (have > 0) { + setRequestProperty("Range", "bytes=$have-") + if (etag.isNotEmpty()) setRequestProperty("If-Range", etag) + } + } + connection = conn + try { + val code = conn.responseCode + val append = when (code) { + 206 -> { + val start = Regex("bytes (\\d+)-").find(conn.getHeaderField("Content-Range") ?: "")?.groupValues?.get(1)?.toLongOrNull() + if (start != have) throw IOException("the server resumed at the wrong place") + true + } + 200 -> false + 416 -> { partial.delete(); tag.delete(); throw IOException("HTTP 416") } + else -> throw IOException("HTTP $code") + } + val served = conn.getHeaderField("ETag")?.takeIf { it.isNotBlank() } + if (served != null) tag.writeText(served) else if (!append) tag.delete() + val length = conn.contentLengthLong + if (length > 0) { + val full = if (append) have + length else length + if (part.size > 0 && full != part.size) throw IOException("the download changed size") + part.size = full + } + var done = if (append) have else 0L + conn.inputStream.use { input -> + FileOutputStream(partial, append).use { out -> + val buf = ByteArray(256 * 1024) + while (!cancelled.get()) { + val n = input.read(buf) + if (n < 0) break + out.write(buf, 0, n) + done += n + handle.progress(base + done, total) + } + out.fd.sync() + } + } + if (!cancelled.get() && part.size > 0 && done != part.size) throw IOException("the download ended early") + } finally { + connection = null + runCatching { conn.disconnect() } + } + } + + private fun verify(part: Part, file: File, etag: String) { + if (part.size > 0 && file.length() != part.size) { file.delete(); throw IOException("wrong size") } + part.sha256?.let { want -> + if (EpicClientSources.sha256(file) != want) { file.delete(); throw IOException("checksum mismatch") } + } + if (part.appImage) { + if (!EpicClientSources.isAppImage(file)) { file.delete(); throw IOException("not an AppImage") } + if (EpicClientSources.etagMatches(file, etag) == false) { + val seen = EpicClientSources.sha256(file) + if (part.mismatch != seen) { + part.mismatch = seen + file.delete() + throw IOException("checksum mismatch") + } + } + } + } + + private companion object { + const val PARTIAL = ".part" + const val TAG = ".etag" + const val ATTEMPTS = 6 + const val APP_ROOM = 600L shl 20 + const val RUNTIME_ROOM = 560L shl 20 + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicClientLibrary.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicClientLibrary.kt new file mode 100644 index 0000000000..8521a90f5d --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicClientLibrary.kt @@ -0,0 +1,410 @@ +package com.droiddeck.launcher.stores.epic + +import android.content.Context +import android.util.Log +import com.droiddeck.launcher.frontend.AddedExes +import com.droiddeck.launcher.frontend.AddedGames +import com.droiddeck.launcher.frontend.AddedGamesPublisher +import com.droiddeck.launcher.runtime.LinuxRuntime +import com.droiddeck.launcher.session.GameStorage +import com.droiddeck.launcher.session.SessionPrefs +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreGameSidecar +import com.droiddeck.launcher.stores.StoreInstallRoot +import com.droiddeck.launcher.stores.StoreLaunch +import com.droiddeck.launcher.stores.SteamLiveShortcuts +import org.json.JSONArray +import org.json.JSONObject +import java.io.File +import java.security.MessageDigest + +internal object EpicClientLibrary { + private const val TAG = "EpicClientLibrary" + private const val V1 = "root/.local/share/Epic" + private const val NO_GUID = "00000000000000000000000000000000" + + class Install( + val appName: String, + val namespace: String, + val catalogItemId: String, + val title: String, + val version: String, + val exe: String, + val location: String, + val folder: File, + val deploymentId: String, + val size: Long, + ) { + val signature: String get() = "$location|$version|$exe" + } + + fun manifestsDir(context: Context): File = File(LinuxRuntime.rootDir(context), "$V1/EpicGamesLauncher/Data/Manifests") + + fun aggregateFile(context: Context): File = File(LinuxRuntime.rootDir(context), "$V1/UnrealEngineLauncher/LauncherInstalled.dat") + + fun installationsFile(context: Context): File = File(EpicClient.dataDir(context), "installations.jsonl") + + fun importMarker(context: Context): File = File(EpicClient.dataDir(context), "import-scan/imported.json") + + private fun ledgerFile(context: Context): File = File(EpicClient.stateDir(context), "registered.json") + private fun importsFile(context: Context): File = File(EpicClient.stateDir(context), "client-imports.json") + + fun guid(appName: String): String = + MessageDigest.getInstance("MD5").digest("droiddeck-epic:$appName".toByteArray(Charsets.UTF_8)) + .joinToString("") { "%02X".format(it) } + + fun installs(context: Context): List<Install> { + val app = context.applicationContext + val prefs = EpicPrefs.get(app) + return StoreInstallRoot.gameFolders(app).mapNotNull { folder -> + val sidecar = StoreGameSidecar.read(folder) ?: return@mapNotNull null + if (sidecar.store != Store.EPIC || !sidecar.isInstalled || sidecar.exe.isEmpty() || + sidecar.extra["clientManaged"] == "true") return@mapNotNull null + val namespace = sidecar.extra["namespace"].orEmpty() + val item = sidecar.extra["catalogItemId"].orEmpty() + if (namespace.isEmpty() || item.isEmpty()) return@mapNotNull null + val location = AddedGames.guestPath(app, folder) ?: return@mapNotNull null + Install( + sidecar.id, namespace, item, sidecar.title, sidecar.installVersion, sidecar.exe, location, folder, + sidecar.extra["deploymentId"].orEmpty(), prefs.getLong("size_${sidecar.id}", 0L), + ) + }.distinctBy { it.appName } + } + + fun item(install: Install, tags: List<String>, ownership: Boolean): JSONObject { + val guid = guid(install.appName) + val store = "${install.location}/.egstore" + return JSONObject() + .put("FormatVersion", 0) + .put("bIsIncompleteInstall", false) + .put("LaunchCommand", "") + .put("LaunchExecutable", install.exe) + .put("ManifestLocation", store) + .put("ManifestHash", "") + .put("bIsApplication", true) + .put("bIsExecutable", true) + .put("bIsManaged", false) + .put("bNeedsValidation", false) + .put("bRequiresAuth", true) + .put("bAllowMultipleInstances", false) + .put("bCanRunOffline", false) + .put("bAllowUriCmdArgs", false) + .put("bLaunchElevated", false) + .put("BaseURLs", JSONArray()) + .put("BuildLabel", "Live") + .put("AppCategories", JSONArray(listOf("public", "games", "applications"))) + .put("ChunkDbs", JSONArray()) + .put("CompatibleApps", JSONArray()) + .put("DisplayName", install.title) + .put("InstallationGuid", guid) + .put("InstallLocation", install.location) + .put("InstallSessionId", guid) + .put("InstallTags", JSONArray(tags)) + .put("InstallComponents", JSONArray()) + .put("HostInstallationGuid", NO_GUID) + .put("PrereqIds", JSONArray()) + .put("PrereqSHA1Hash", "") + .put("LastPrereqSucceededSHA1Hash", "") + .put("StagingLocation", "$store/bps") + .put("TechnicalType", "games") + .put("VaultThumbnailUrl", "") + .put("VaultTitleText", "") + .put("InstallSize", install.size) + .put("MainWindowProcessName", "") + .put("ProcessNames", JSONArray()) + .put("BackgroundProcessNames", JSONArray()) + .put("IgnoredProcessNames", JSONArray()) + .put("DlcProcessNames", JSONArray()) + .put("MandatoryAppFolderName", install.folder.name) + .put("OwnershipToken", if (ownership) "true" else "false") + .put("SidecarConfigRevision", 0) + .put("SidecarDeploymentId", install.deploymentId) + .put("CatalogNamespace", install.namespace) + .put("CatalogItemId", install.catalogItemId) + .put("AppName", install.appName) + .put("AppVersionString", install.version) + .put("MainGameCatalogNamespace", install.namespace) + .put("MainGameCatalogItemId", install.catalogItemId) + .put("MainGameAppName", install.appName) + .put("AllowedUriEnvVars", JSONArray()) + } + + internal fun aggregateFromManifests(manifests: File, installs: List<Install>, previous: JSONObject? = null): JSONObject { + val entries = linkedMapOf<String, JSONObject>() + val old = previous?.optJSONArray("InstallationList") + if (old != null) for (index in 0 until old.length()) { + val entry = old.optJSONObject(index) ?: continue + val appName = entry.optString("AppName").ifEmpty { entry.optString("ArtifactId") } + if (appName.isNotEmpty()) entries[appName] = entry + } + manifests.listFiles { file -> file.isFile && file.extension == "item" } + .orEmpty().sortedBy { it.name }.forEach { file -> + val item = runCatching { JSONObject(file.readText()) }.getOrNull() ?: return@forEach + if (item.optBoolean("bIsIncompleteInstall", true)) return@forEach + val appName = item.optString("AppName") + val location = item.optString("InstallLocation") + val namespace = item.optString("CatalogNamespace") + val catalogItem = item.optString("CatalogItemId") + if (appName.isEmpty() || location.isEmpty() || namespace.isEmpty() || catalogItem.isEmpty()) return@forEach + entries[appName] = JSONObject().put("InstallLocation", location).put("NamespaceId", namespace) + .put("ItemId", catalogItem).put("ArtifactId", appName).put("AppVersion", item.optString("AppVersionString")) + .put("AppName", appName) + } + installs.forEach { install -> + entries[install.appName] = JSONObject().put("InstallLocation", install.location).put("NamespaceId", install.namespace) + .put("ItemId", install.catalogItemId).put("ArtifactId", install.appName).put("AppVersion", install.version) + .put("AppName", install.appName) + } + return JSONObject().put("InstallationList", JSONArray(entries.values.toList())) + } + + internal fun executableRelative(installLocation: String, executable: String): String? { + val location = installLocation.trimEnd('/') + val path = executable.replace('\\', '/').trim() + val raw = when { + path.startsWith("$location/") -> path.removePrefix("$location/") + path.startsWith('/') -> return null + else -> path.removePrefix("./") + } + if (location.isEmpty() || !location.startsWith('/') || raw.isEmpty() || + !raw.endsWith(".exe", ignoreCase = true) || raw.split('/').any { it.isEmpty() || it == "." || it == ".." } || raw.contains(':')) return null + return raw + } + + private fun hostFolder(context: Context, guest: String): File? { + if (!guest.startsWith('/') || guest.split('/').any { it == ".." }) return null + val mounts = mutableListOf<Pair<String, String>>() + SessionPrefs.gameFolderBinds(context).forEach { (host, path) -> mounts += path.trimEnd('/') to host } + StoreInstallRoot.externalRoots(context).forEach { (host, path) -> mounts += path.trimEnd('/') to host.absolutePath } + GameStorage.effective(context)?.let { mounts += "/mnt/droiddeck-sd" to it.path } + SessionPrefs.romsDir(context).takeIf { it.isNotEmpty() }?.let { mounts += "/root/ROMs" to it } + mounts.sortedByDescending { it.first.length }.forEach { (mount, host) -> + if (guest == mount || guest.startsWith("$mount/")) { + val suffix = guest.removePrefix(mount).trimStart('/') + return File(host, suffix).takeIf { it.isDirectory && AddedGames.guestPath(context, it)?.trimEnd('/') == guest.trimEnd('/') } + } + } + val root = LinuxRuntime.rootDir(context) + if (guest == "/") return root + return File(root, guest.removePrefix("/")).takeIf { it.isDirectory && AddedGames.guestPath(context, it)?.trimEnd('/') == guest.trimEnd('/') } + } + + @Synchronized + internal fun importClientGames(context: Context): Boolean { + val app = context.applicationContext + val manifests = manifestsDir(app) + val before = runCatching { JSONObject(importsFile(app).readText()) }.getOrDefault(JSONObject()) + val after = JSONObject() + val imported = ArrayList<AddedGames.Game>() + val addedExes = AddedExes.list(app) + var changed = false + var scanComplete = true + val items = LinkedHashMap<String, JSONObject>() + manifests.listFiles { file -> file.isFile && file.extension == "item" } + .orEmpty().sortedBy { it.name }.forEach { file -> + val item = runCatching { JSONObject(file.readText()) }.getOrNull() + if (item == null) scanComplete = false else items[item.optString("AppName").trim()] = item + } + val (records, readable) = clientInstallations(installationsFile(app)) + if (!readable) scanComplete = false + if (records.isNotEmpty()) { + val titles = runCatching { EpicLibrary.cached(app).associate { it.appName to it.title } }.getOrDefault(emptyMap()) + for (record in records) { + val appName = record.optString("artifactId").trim() + if (appName.isNotEmpty()) items[appName] = manifestOf(record, titles[appName]) + } + } + items.values.forEach { item -> + val appName = item.optString("AppName").trim() + if (item.optBoolean("bIsIncompleteInstall", true)) { + before.optJSONObject(appName)?.let { after.put(appName, it) } + return@forEach + } + val namespace = item.optString("CatalogNamespace").trim() + val catalogItem = item.optString("CatalogItemId").trim() + val location = item.optString("InstallLocation").trimEnd('/') + val exe = executableRelative(location, item.optString("LaunchExecutable")) + if (appName.isEmpty() || namespace.isEmpty() || catalogItem.isEmpty() || exe == null) { + before.optJSONObject(appName)?.let { after.put(appName, it) } + return@forEach + } + val folder = hostFolder(app, location)?.takeIf { it.isDirectory } + if (folder == null) { before.optJSONObject(appName)?.let { after.put(appName, it) }; return@forEach } + val executable = File(folder, exe) + if (!executable.isFile || !runCatching { executable.canonicalPath.startsWith(folder.canonicalPath + File.separator) }.getOrDefault(false)) { + before.optJSONObject(appName)?.let { after.put(appName, it) } + return@forEach + } + val existing = StoreGameSidecar.read(folder) + if (existing != null && (existing.store != Store.EPIC || existing.id != appName || existing.extra["clientManaged"] != "true")) { + before.optJSONObject(appName)?.let { after.put(appName, it) } + return@forEach + } + val previous = before.optJSONObject(appName) + if (previous != null && previous.optString("folder") != folder.path) { + val oldFolder = File(previous.optString("folder")) + StoreGameSidecar.read(oldFolder)?.takeIf { it.store == Store.EPIC && it.extra["clientManaged"] == "true" }?.let { + StoreGameSidecar.file(oldFolder).delete() + File(oldFolder, StoreLaunch.LAUNCHER).delete() + } + AddedExes.drop(app, oldFolder.path) + SessionPrefs.addedGameStoredAppId(app, oldFolder.path)?.let { SteamLiveShortcuts.remove(app, it) } + changed = true + } + val next = 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, + extra = mapOf("namespace" to namespace, "catalogItemId" to catalogItem, + "deploymentId" to item.optString("SidecarDeploymentId"), "clientManaged" to "true"), + epic = existing?.epic ?: com.droiddeck.launcher.stores.EpicOptions(), + cloud = existing?.cloud ?: true, + launcher = StoreLaunch.LAUNCHER, + ) + 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)) { + StoreLaunch.writeLauncher(folder, next) + next.write(folder) + } + if (addedExes.none { it.folder == folder.path && it.exe == executable.path && !it.picked }) { + AddedExes.put(app, AddedExes.Entry(folder.path, executable.path, picked = false)) + changed = true + } + val game = AddedGames.single(app, folder.path) + if (game != null) imported += game + after.put(appName, JSONObject().put("folder", folder.path).put("exe", executable.path)) + if (sidecarChanged || before.optJSONObject(appName)?.optString("folder") != folder.path || + before.optJSONObject(appName)?.optString("exe") != executable.path || + existing?.installVersion != next.installVersion) changed = true + } + for (name in before.keys().asSequence().toList()) { + if (after.has(name)) continue + if (!scanComplete) { before.optJSONObject(name)?.let { after.put(name, it) }; continue } + val record = before.optJSONObject(name) ?: continue + val folder = File(record.optString("folder")) + val sidecar = StoreGameSidecar.read(folder) + if (sidecar?.store == Store.EPIC && sidecar.extra["clientManaged"] == "true") { + StoreGameSidecar.file(folder).delete() + File(folder, StoreLaunch.LAUNCHER).delete() + } + AddedExes.drop(app, folder.path) + SessionPrefs.addedGameStoredAppId(app, folder.path)?.let { SteamLiveShortcuts.remove(app, it) } + changed = true + } + if (changed) { + write(importsFile(app), after.toString(2)) + AddedGamesPublisher.later(app) { + SteamLiveShortcuts.sync(app, (imported + AddedGames.scan(app).filter { it.source == Store.EPIC.id }).distinctBy { it.guestExe }) { it.source == Store.EPIC.id } + com.droiddeck.launcher.stores.StoresState.notifyLibraryChanged(app) + } + } + return changed + } + + internal fun clientInstallations(file: File): Pair<List<JSONObject>, Boolean> { + if (!file.isFile) return emptyList<JSONObject>() to true + val lines = runCatching { file.readLines() }.getOrNull() ?: return emptyList<JSONObject>() to false + val latest = LinkedHashMap<String, JSONObject>() + var readable = true + for (line in lines) { + if (line.isBlank()) continue + val value = runCatching { JSONObject(line) }.getOrNull() + if (value == null) { readable = false; continue } + val key = value.optString("installationId").ifEmpty { value.optString("artifactId") } + if (key.isEmpty()) continue + latest.remove(key) + if (!value.optBoolean("deleted")) latest[key] = value + } + return latest.values.toList() to readable + } + + internal fun manifestOf(record: JSONObject, title: String?): JSONObject { + val dir = record.optString("dir").trimEnd('/') + val complete = record.optBoolean("complete", false) && record.optString("platform") == "Windows" + return JSONObject() + .put("AppName", record.optString("artifactId").trim()) + .put("CatalogNamespace", record.optString("namespace")) + .put("CatalogItemId", record.optString("itemId")) + .put("InstallLocation", dir) + .put("LaunchExecutable", record.optString("launchExecutable")) + .put("AppVersionString", record.optString("version")) + .put("SidecarDeploymentId", record.optJSONObject("sidecar")?.optString("deploymentId").orEmpty()) + .put("DisplayName", title?.takeIf(String::isNotBlank) ?: dir.substringAfterLast('/')) + .put("bIsIncompleteInstall", !complete) + } + + @Synchronized + fun sync(context: Context): Boolean { + val app = context.applicationContext + if (!LinuxRuntime.isInstalled(app)) return false + runCatching { importClientGames(app) }.onFailure { Log.w(TAG, "client library scan failed: ${it.javaClass.simpleName}") } + val list = installs(app) + val manifests = manifestsDir(app) + val ledgerFile = ledgerFile(app) + val before = runCatching { JSONObject(ledgerFile.readText()) }.getOrDefault(JSONObject()) + val after = JSONObject() + val tags = runCatching { EpicInstallTags.tagsForDevice() }.getOrDefault(emptyList()) + val token by lazy { runCatching { EpicCredentialStore.getValidAccessToken(app) }.getOrNull() } + var changed = false + try { + manifests.mkdirs() + for (install in list) { + val guid = guid(install.appName) + val known = before.optJSONObject(install.appName) + val ownership = known?.takeIf { it.has("ownership") }?.optBoolean("ownership") + ?: token?.let { ownershipToken(it, install) } + if (known?.optString("signature") != install.signature) changed = true + 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) } + } + for (name in before.keys().asSequence().toList()) { + if (after.has(name)) continue + File(manifests, guid(name) + ".item").delete() + changed = true + } + val aggregate = aggregateFile(app) + val previous = runCatching { JSONObject(aggregate.readText()) }.getOrNull() + write(aggregate, aggregateFromManifests(manifests, list, previous).toString(2)) + write(ledgerFile, after.toString(2)) + if (changed && importMarker(app).delete()) Log.i(TAG, "the launcher rescans installed games at its next start") + } catch (e: Exception) { + Log.w(TAG, "registration failed: ${e.javaClass.simpleName}: ${e.message}") + } + return changed + } + + private fun ownershipToken(token: String, install: Install): Boolean? = + runCatching { EpicApiClient.getCustomAttribute(token, install.namespace, install.catalogItemId, "OwnershipToken") } + .getOrNull()?.trim()?.lowercase()?.let { it == "true" } + + private fun egstore(install: Install, guid: String, token: () -> String?) { + val dir = File(install.folder, ".egstore") + dir.mkdirs() + write( + File(dir, "$guid.mancpn"), + JSONObject().put("FormatVersion", 0).put("AppName", install.appName).put("CatalogItemId", install.catalogItemId) + .put("CatalogNamespace", install.namespace).toString(2), + ) + val manifest = File(dir, "$guid.manifest") + if (manifest.isFile && manifest.length() > 0) return + val access = token() ?: return + val info = EpicApiClient.getManifestApiJson(access, install.namespace, install.catalogItemId, install.appName) ?: return + val build = runCatching { JSONObject(info).optString("buildVersion") }.getOrDefault("") + if (install.version.isNotEmpty() && build != install.version) return + val bytes = EpicDownloadManager.downloadManifest(info, EpicDownloadManager.parseCdnUrls(info)) ?: return + val tmp = File(dir, "$guid.manifest.tmp") + tmp.writeBytes(bytes) + if (!tmp.renameTo(manifest)) tmp.delete() + } + + private fun write(file: File, text: String) { + if (runCatching { file.readText() }.getOrNull() == text) return + file.parentFile?.mkdirs() + val tmp = File(file.parentFile, file.name + ".tmp") + tmp.writeText(text) + if (!tmp.renameTo(file)) { file.delete(); if (!tmp.renameTo(file)) throw java.io.IOException("could not write ${file.name}") } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicCredentialStore.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicCredentialStore.kt index abf545ae13..e261203bd0 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicCredentialStore.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicCredentialStore.kt @@ -6,56 +6,103 @@ import com.droiddeck.launcher.stores.Store import com.droiddeck.launcher.stores.StoreAccounts import org.json.JSONObject -/** - * The Epic sign-in in StoreAccounts' private file: access and refresh tokens, the account id and - * display name (the launch arguments carry both), the expiry. Refreshed when within five minutes - * of expiring. - */ object EpicCredentialStore { - private const val TAG = "EpicAuth" + private const val TAG = "EpicCredentials" + private const val REFRESH_MARGIN_MS = 5 * 60 * 1000L + private val refreshLock = Any() - class Credentials(val accessToken: String, val refreshToken: String?, val accountId: String, val displayName: String, val expiresAt: Long) + data class Credentials( + val accessToken: String, + val refreshToken: String?, + val accountId: String, + val displayName: String, + val expiresAt: Long, + ) - @JvmStatic - fun save(context: Context, result: EpicAuthClient.TokenResult) { - val json = JSONObject().put("access_token", result.accessToken).put("account_id", result.accountId ?: "") - .put("display_name", result.displayName ?: "").put("expires_at", result.expiresAt) - if (!result.refreshToken.isNullOrEmpty()) json.put("refresh_token", result.refreshToken) - StoreAccounts.write(context, Store.EPIC, json) + class TokenResult( + val accessToken: String, + val refreshToken: String?, + val accountId: String?, + val displayName: String?, + val expiresAt: Long, + ) { + companion object { + fun from(json: JSONObject): TokenResult? { + if (json.has("error")) return null + val access = json.optString("access_token", "").ifEmpty { return null } + return TokenResult( + access, + json.optString("refresh_token", "").ifEmpty { null }, + json.optString("account_id", "").ifEmpty { null }, + json.optString("display_name", "").ifEmpty { null }, + json.optLong("expires_at", 0L), + ) + } + } + } + + internal fun fromJson(o: JSONObject): Credentials? { + val access = o.optString("access_token", "").ifEmpty { return null } + return Credentials( + accessToken = access, + refreshToken = o.optString("refresh_token", "").ifEmpty { null }, + accountId = o.optString("account_id", ""), + displayName = o.optString("display_name", ""), + expiresAt = o.optLong("expires_at", 0L), + ) + } + + internal fun toJson(c: Credentials): JSONObject = JSONObject().apply { + put("access_token", c.accessToken) + c.refreshToken?.takeIf { it.isNotEmpty() }?.let { put("refresh_token", it) } + put("account_id", c.accountId) + put("display_name", c.displayName) + put("expires_at", c.expiresAt) } @JvmStatic - fun load(context: Context): Credentials? { - val json = StoreAccounts.read(context, Store.EPIC) ?: return null - val token = json.optString("access_token", "").ifEmpty { return null } - return Credentials(token, json.optString("refresh_token", "").ifEmpty { null }, json.optString("account_id", ""), json.optString("display_name", ""), json.optLong("expires_at", 0L)) + fun load(context: Context): Credentials? = StoreAccounts.read(context.applicationContext, Store.EPIC)?.let(::fromJson) + + fun save(context: Context, result: TokenResult, merge: Boolean = true) { + val before = if (merge) load(context) else null + val next = Credentials( + accessToken = result.accessToken, + refreshToken = result.refreshToken ?: before?.refreshToken, + accountId = result.accountId ?: before?.accountId.orEmpty(), + displayName = result.displayName ?: before?.displayName.orEmpty(), + expiresAt = result.expiresAt, + ) + StoreAccounts.write(context.applicationContext, Store.EPIC, toJson(next)) } - @JvmStatic fun isLoggedIn(context: Context): Boolean = load(context) != null - /** A valid access token, refreshed when within five minutes of expiry; null when signed out or the refresh failed. */ - @JvmStatic - /** The stored access token is past its expiry (a refresh, if one was tried, did not replace it). */ fun expired(context: Context): Boolean { - val creds = load(context) ?: return false - return creds.expiresAt in 1 until System.currentTimeMillis() + val c = load(context) ?: return false + return c.expiresAt > 0 && c.expiresAt < System.currentTimeMillis() } + private fun fresh(c: Credentials): Boolean = + c.expiresAt - System.currentTimeMillis() > REFRESH_MARGIN_MS || c.refreshToken.isNullOrEmpty() + + private fun unexpired(c: Credentials): String? = + c.accessToken.takeIf { c.expiresAt <= 0 || c.expiresAt > System.currentTimeMillis() } + + @JvmStatic fun getValidAccessToken(context: Context): String? { - val creds = load(context) ?: return null - if (creds.expiresAt - System.currentTimeMillis() < 5L * 60L * 1000L && creds.refreshToken != null) { - val result = EpicAuthClient.refreshToken(creds.refreshToken) - if (result != null) { - if (result.refreshToken.isNullOrEmpty()) result.refreshToken = creds.refreshToken - if (result.accountId.isNullOrEmpty()) result.accountId = creds.accountId - if (result.displayName.isNullOrEmpty()) result.displayName = creds.displayName - save(context, result) - Log.i(TAG, "token refreshed") - return result.accessToken + val current = load(context) ?: return null + if (fresh(current)) return current.accessToken + synchronized(refreshLock) { + val again = load(context) ?: return null + if (fresh(again)) return again.accessToken + val answer = EpicNative.call("auth.refresh", JSONObject().put("refreshToken", again.refreshToken)) + val result = answer?.let(TokenResult::from) + if (result == null) { + Log.w(TAG, "token refresh failed: ${answer?.optString("error").orEmpty().ifEmpty { "no answer" }}") + return unexpired(again) } - Log.w(TAG, "token refresh failed; using the stored token") + save(context, result) + return result.accessToken } - return creds.accessToken } } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicDownloadManager.java b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicDownloadManager.java deleted file mode 100644 index 5d178e74e8..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicDownloadManager.java +++ /dev/null @@ -1,846 +0,0 @@ -package com.droiddeck.launcher.stores.epic; - -import android.content.Context; -import android.util.Log; - -import com.droiddeck.launcher.stores.StoreLog; -import com.droiddeck.launcher.stores.download.StoreDownloadTier; - -import org.json.JSONArray; -import org.json.JSONObject; - -import java.io.BufferedOutputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.charset.StandardCharsets; -import java.security.MessageDigest; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; -import java.util.zip.Inflater; - -/** - * The Epic install pipeline, ported from Bannerlator's EpicDownloadManager: the manifest API's CDN - * list, the manifest binary (ChunksV4, or the older JSON form), the files narrowed to the base - * set plus the device's language, a delta pass that skips files already on disk with the right - * size and SHA-1, the chunk fetch into `.chunks/<GUID>` (the native engine when it is there, the - * Java pool otherwise), and the assembly of files from those chunks. - * - * Chunk URLs carry no auth tokens; the subfolder is the decimal group number; the Cloudflare - * mirror is skipped (it refuses chunks). Blocking; the download queue runs it on its own thread. - */ -public final class EpicDownloadManager { - - private static final String TAG = "EpicDownload"; - private static final String UA = EpicAuthClient.USER_AGENT; - - public interface Callback { - void onProgress(String message, int pct); - default void onBytes(long done, long total, long speedBps) {} - default void onLog(String line) {} - /** - * The active stage's own count: {@code stage} is "check" (the files already there, before - * anything is fetched), "verify" or "install" (bytes written), {@code done} of - * {@code total} an amount (bytes, or items when there are no bytes), {@code items} of - * {@code itemsTotal} the files, when it counts files. - */ - default void onStage(String stage, long done, long total, int items, int itemsTotal) {} - /** What this run fetches (compressed) and what the game takes on disk. */ - default void onSizes(long downloadBytes, long diskBytes) {} - } - - private EpicDownloadManager() {} - - public static final class CdnUrl { - public final String baseUrl, cloudDir, authParams; - CdnUrl(String baseUrl, String cloudDir, String authParams) { this.baseUrl = baseUrl; this.cloudDir = cloudDir; this.authParams = authParams; } - } - - public static final class ChunkInfo { - public int[] guid = new int[4]; - public long hash; - public byte[] sha1; - public int groupNum; - public int windowSize; - public long fileSize; - public String guidStr() { return String.format("%08X%08X%08X%08X", guid[0], guid[1], guid[2], guid[3]); } - public String getPath(String chunkDir) { return chunkDir + "/" + String.format("%02d", groupNum) + "/" + String.format("%016X", hash) + "_" + guidStr() + ".chunk"; } - } - - public static final class ChunkPart { - public int[] guid = new int[4]; - public int offset, size; - public String guidStr() { return String.format("%08X%08X%08X%08X", guid[0], guid[1], guid[2], guid[3]); } - } - - public static final class FileInfo { - public String filename = ""; - public List<ChunkPart> parts = new ArrayList<>(); - public List<String> installTags = new ArrayList<>(); - public byte[] sha1 = null; - public long fileSize() { long t = 0; for (ChunkPart p : parts) t += (p.size & 0xFFFFFFFFL); return t; } - } - - /** The parsed manifest: its chunks, files, and from the meta block the exe the launcher starts. */ - public static final class Manifest { - public String chunkDir = "ChunksV4"; - public List<ChunkInfo> uniqueChunks = new ArrayList<>(); - public List<FileInfo> files = new ArrayList<>(); - public String launchExe = ""; - public String launchCommand = ""; - public String buildVersion = ""; - /** The prerequisite the launcher runs first (UE4PrereqSetup_x64.exe...): what it is called and its path in the install. */ - public String prereqName = ""; - public String prereqPath = ""; - /** The prerequisite fields were read (an empty name and path then mean the build names none). */ - public boolean prereqRead = false; - public List<CdnUrl> cdnUrls = new ArrayList<>(); - } - - /** What an install leaves for the sidecar. */ - public static final class Result { - public final String launchExe; - public final String buildVersion; - public final long bytes; - /** The manifest's prerequisite, for Windows components; "" when it names none. */ - public String prereqName = ""; - public String prereqPath = ""; - Result(String launchExe, String buildVersion, long bytes) { this.launchExe = launchExe; this.buildVersion = buildVersion; this.bytes = bytes; } - public boolean prereqRead = false; - Result withPrereq(Manifest m) { prereqName = m.prereqName; prereqPath = m.prereqPath; prereqRead = m.prereqRead; return this; } - } - - public static final class InstallException extends Exception { - InstallException(String message) { super(message); } - } - - /** - * Installs the app the manifest API JSON describes into {@code installDir}. {@code installTags} - * null = every file. {@code chunkCacheDirPath} "" keeps the chunk cache beside the game - * ({@code <installDir>/.chunks}); a path puts it there instead - the app's cache when the game - * goes to a card. Returns null when cancelled; throws when it fails. - */ - public static Result install(Context ctx, String manifestApiJson, String installDirPath, String chunkCacheDirPath, List<String> installTags, AtomicBoolean cancel, Callback cb) throws InstallException { - try { - if (cancel.get()) return null; - cb.onProgress("Reading CDN list…", 0); - List<CdnUrl> cdnUrls = parseCdnUrls(manifestApiJson); - if (cdnUrls.isEmpty()) throw new InstallException("No CDN in the manifest answer"); - for (CdnUrl c : cdnUrls) cb.onLog("epic: CDN " + c.baseUrl + " auth=" + (c.authParams.isEmpty() ? "no" : "yes")); - cb.onProgress("Downloading manifest…", 0); - byte[] manifestBytes = downloadManifest(manifestApiJson, cdnUrls); - if (manifestBytes == null) throw new InstallException("The manifest could not be downloaded"); - if (cancel.get()) return null; - cb.onProgress("Parsing manifest…", 0); - Manifest manifest = parseManifest(manifestBytes); - if (manifest == null) throw new InstallException("The manifest could not be parsed"); - manifest.cdnUrls = cdnUrls; - cb.onLog("epic: chunkDir=" + manifest.chunkDir + " chunks=" + manifest.uniqueChunks.size() + " files=" + manifest.files.size() + " exe=" + manifest.launchExe); - - File installDir = new File(installDirPath); - installDir.mkdirs(); - // "" = the cache beside the game; a path = the scratch cache (the app's own storage when - // the game goes to a card). The engine and the Java loops read the same value. - final String cachePath = chunkCacheDirPath == null ? "" : chunkCacheDirPath; - final File chunkCacheDir = cachePath.isEmpty() ? new File(installDir, ".chunks") : new File(cachePath); - chunkCacheDir.mkdirs(); - - List<FileInfo> selected = resolveInstallFiles(manifest, installTags); - cb.onLog("epic: " + selected.size() + "/" + manifest.files.size() + " files for tags " + (installTags == null ? "(all)" : installTags.toString())); - long installBytes = 0; - for (FileInfo f : selected) installBytes += f.fileSize(); - final long planned = installBytes; - // Free space is checked after the delta pass, against what is still missing (below). - - cb.onProgress("Checking files…", 0); - List<FileInfo> pending = new ArrayList<>(selected.size()); - int checked = 0, good = 0; - long checkedBytes = 0; - cb.onStage("check", 0, installBytes, 0, selected.size()); - for (FileInfo f : selected) { - if (cancel.get()) return null; - File out = new File(installDir, f.filename.replace("\\", "/")); - if (fileExistsWithCorrectHash(out, f.fileSize(), f.sha1)) good++; else pending.add(f); - checked++; - checkedBytes += f.fileSize(); - if ((checked & 15) == 0 || checked == selected.size()) cb.onStage("check", checkedBytes, installBytes, checked, selected.size()); - if ((checked & 63) == 0) cb.onProgress("Checking files… (" + checked + "/" + selected.size() + ")", 0); - } - cb.onLog("epic: delta " + good + " up to date, " + pending.size() + " to download"); - if (pending.isEmpty()) { - deleteDir(chunkCacheDir); - cb.onProgress("Complete", 100); - return new Result(manifest.launchExe, manifest.buildVersion, planned).withPrereq(manifest); - } - List<ChunkInfo> needed = uniqueChunksForFiles(manifest, pending); - // The cache holds whole chunk windows (~1 MiB each), and a window is shared with files - // this device does not install (other tags, other builds' data): the cache is often - // larger than the game itself (Metalstorm: 9.1 GB of chunks for 4.4 GB of files). Both - // have to fit at once until assembly, so the check counts both, on their own volumes. - long cacheMissing = 0, pendingBytes = 0; - for (ChunkInfo c : needed) if (!new File(chunkCacheDir, c.guidStr()).isFile()) cacheMissing += Math.max(c.windowSize, 1); - for (FileInfo f : pending) pendingBytes += f.fileSize(); - if (cachePath.isEmpty()) { - long free = installDir.getUsableSpace(); - if (free > 0 && cacheMissing + pendingBytes > free) throw new InstallException("Not enough free space: need " + fmt(cacheMissing + pendingBytes) + " (" + fmt(pendingBytes) + " of game files + " + fmt(cacheMissing) + " of download cache), only " + fmt(free) + " free"); - } else { - long freeCache = chunkCacheDir.getUsableSpace(), freeGame = installDir.getUsableSpace(); - if (freeCache > 0 && cacheMissing > freeCache) throw new InstallException("Not enough internal space for the download cache: need " + fmt(cacheMissing) + ", only " + fmt(freeCache) + " free"); - if (freeGame > 0 && pendingBytes > freeGame) throw new InstallException("Not enough free space: need " + fmt(pendingBytes) + ", only " + fmt(freeGame) + " free"); - } - cb.onLog("epic: cache " + (cachePath.isEmpty() ? "beside the game" : "scratch") + ", " + fmt(cacheMissing) + " to fetch for " + fmt(pendingBytes) + " of files"); - long totalBytes = 0; - for (ChunkInfo c : needed) totalBytes += Math.max(c.fileSize, 1); - final long fTotalBytes = totalBytes; - final int totalChunks = needed.size(); - final AtomicLong completedBytes = new AtomicLong(0); - final AtomicInteger completedCount = new AtomicInteger(0); - final AtomicInteger failCount = new AtomicInteger(0); - final AtomicLong lastSpeedMs = new AtomicLong(System.currentTimeMillis()); - final AtomicLong lastSpeedBytes = new AtomicLong(0); - final AtomicLong speedBps = new AtomicLong(0); - cb.onSizes(fTotalBytes, planned); - cb.onBytes(0, fTotalBytes, 0); - cb.onLog("epic: " + fmt(fTotalBytes) + " in " + totalChunks + " chunks"); - - boolean javaPool = true; - final int[] pendingIdx = pendingIndices(manifest, pending); - boolean engine = com.droiddeck.launcher.stores.StoresNative.INSTANCE.getAvailable() && pendingIdx != null; - if (engine) { - NativeOutcome r = runNativePool(ctx, manifestBytes, pendingIdx, needed, fTotalBytes, installDirPath, cachePath, cdnUrls, cancel, cb, - completedBytes, completedCount, lastSpeedMs, lastSpeedBytes, speedBps); - if (r.started) { - javaPool = false; - if (r.cancelled) return null; - if (!r.success) { cb.onLog("epic: engine failed: " + r.error); failCount.incrementAndGet(); } - } else cb.onLog("epic: engine not started (" + r.error + "); using the built-in pool"); - } - if (javaPool) { - cb.onLog("epic: engine=built-in (8 threads)"); - ExecutorService pool = Executors.newFixedThreadPool(8, com.droiddeck.launcher.stores.download.DownloadQueue.workerFactory("epic-dl")); - for (ChunkInfo chunk : needed) { - final ChunkInfo fc = chunk; - pool.submit(() -> { - if (cancel.get()) return; - File cached = new File(chunkCacheDir, fc.guidStr()); - if (!cached.exists() && !downloadChunkStreaming(fc, manifest.chunkDir, cdnUrls, cached)) { - cb.onLog("FAIL chunk=" + fc.guidStr()); - failCount.incrementAndGet(); - return; - } - long done = completedBytes.addAndGet(Math.max(fc.fileSize, 1)); - int cnt = completedCount.incrementAndGet(); - sampleSpeed(done, lastSpeedMs, lastSpeedBytes, speedBps); - cb.onProgress("Downloading chunks (" + cnt + "/" + totalChunks + ")" + speedSuffix(speedBps.get()), (int) (done * 80L / Math.max(1, fTotalBytes))); - cb.onBytes(done, fTotalBytes, speedBps.get()); - }); - } - pool.shutdown(); - try { - while (!pool.awaitTermination(250, TimeUnit.MILLISECONDS)) { - if (cancel.get()) { pool.shutdownNow(); pool.awaitTermination(5, TimeUnit.SECONDS); return null; } - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - pool.shutdownNow(); - throw new InstallException("interrupted"); - } - } - if (cancel.get()) return null; - if (failCount.get() > 0) throw new InstallException(failCount.get() + " chunk(s) failed to download"); - - // The engine's assembler when it starts (it drops each chunk after its last use and the - // cache at the end); the loop below when it does not. - if (engine) { - NativeOutcome r = runNativeAssembly(manifestBytes, pendingIdx, pending.size(), installDirPath, cachePath, cancel, cb); - if (r.started) { - if (r.cancelled) return null; - if (!r.success) throw new InstallException(r.error.isEmpty() ? "assembly failed" : r.error); - cb.onProgress("Complete", 100); - return new Result(manifest.launchExe, manifest.buildVersion, planned).withPrereq(manifest); - } - cb.onLog("epic: assembler not started (" + r.error + "); writing the files here"); - } - int totalFiles = pending.size(), doneFiles = 0; - long writtenBytes = 0, writeTotal = 0; - for (FileInfo f : pending) writeTotal += f.fileSize(); - for (FileInfo file : pending) { - if (cancel.get()) return null; - String relPath = file.filename.replace("\\", "/"); - File outFile = new File(installDir, relPath); - File parent = outFile.getParentFile(); - if (parent != null) parent.mkdirs(); - cb.onProgress("Writing: " + (relPath.contains("/") ? relPath.substring(relPath.lastIndexOf('/') + 1) : relPath), 80 + (int) (doneFiles * 20L / totalFiles)); - try (FileOutputStream fos = new FileOutputStream(outFile); BufferedOutputStream bos = new BufferedOutputStream(fos, 65536)) { - for (ChunkPart part : file.parts) { - File cachedChunk = new File(chunkCacheDir, part.guidStr()); - if (!cachedChunk.exists()) throw new InstallException("Missing chunk " + part.guidStr() + " for " + relPath); - byte[] data = readFile(cachedChunk); - bos.write(data, part.offset, part.size); - } - } - doneFiles++; - writtenBytes += file.fileSize(); - cb.onStage("install", writtenBytes, writeTotal, doneFiles, totalFiles); - } - deleteDir(chunkCacheDir); - cb.onProgress("Complete", 100); - return new Result(manifest.launchExe, manifest.buildVersion, planned).withPrereq(manifest); - } catch (InstallException e) { - throw e; - } catch (Exception e) { - Log.w(TAG, "install failed", e); - throw new InstallException(e.getClass().getSimpleName() + (e.getMessage() != null ? ": " + e.getMessage() : "")); - } - } - - private static final class NativeOutcome { boolean started, success, cancelled; String error = ""; } - - /** The pending files as indices into the manifest's file list, what both native runs take; null when one is not in it. */ - private static int[] pendingIndices(Manifest manifest, List<FileInfo> pending) { - java.util.IdentityHashMap<FileInfo, Integer> index = new java.util.IdentityHashMap<>(); - for (int i = 0; i < manifest.files.size(); i++) index.put(manifest.files.get(i), i); - int[] pendingIdx = new int[pending.size()]; - for (int i = 0; i < pending.size(); i++) { - Integer k = index.get(pending.get(i)); - if (k == null) return null; - pendingIdx[i] = k; - } - return pendingIdx; - } - - /** The native chunk pool on the same counters; never throws. */ - private static NativeOutcome runNativePool(Context ctx, byte[] manifestBytes, int[] pendingIdx, List<ChunkInfo> needed, long totalBytes, - String installDirPath, String cachePath, List<CdnUrl> cdnUrls, AtomicBoolean cancel, Callback cb, - AtomicLong completedBytes, AtomicInteger completedCount, AtomicLong lastSpeedMs, AtomicLong lastSpeedBytes, AtomicLong speedBps) { - NativeOutcome r = new NativeOutcome(); - try { - String[] prefixes = new String[cdnUrls.size()]; - for (int i = 0; i < cdnUrls.size(); i++) prefixes[i] = cdnUrls.get(i).baseUrl + cdnUrls.get(i).cloudDir; - final int totalChunks = needed.size(); - StoreDownloadTier tier = StoreDownloadTier.Companion.current(ctx); - int workers = Math.max(1, Math.min(128, tier.getNetworkWindow())); - int process = Math.max(2, tier.getProcessWorkers()); - cb.onLog("epic: engine=native workers=" + workers + " process_workers=" + process + " tier=" + tier.getId() + (cachePath.isEmpty() ? "" : " cache=scratch")); - EpicNative.Result res = EpicNative.run(manifestBytes, installDirPath, cachePath, prefixes, pendingIdx, totalChunks, totalBytes, "", workers, process, cancel, - new EpicNative.Listener() { - @Override public void onPlan(int chunksTotal, long bytesTotal, String chunkDir) { cb.onLog("epic: plan chunks=" + chunksTotal + " bytes=" + bytesTotal + " dir=" + chunkDir); } - @Override public void onProgress(long bytesDone, long bytesTotal, int chunksDone, int chunksTotal) { - completedBytes.set(bytesDone); - completedCount.set(chunksDone); - sampleSpeed(bytesDone, lastSpeedMs, lastSpeedBytes, speedBps); - cb.onProgress("Downloading chunks (" + chunksDone + "/" + totalChunks + ")" + speedSuffix(speedBps.get()), (int) (bytesDone * 80L / Math.max(1, totalBytes))); - cb.onBytes(bytesDone, totalBytes, speedBps.get()); - } - @Override public void onLog(String line) { cb.onLog(line); } - @Override public void onComplete(boolean success, String error, long bytesCredited) {} - }); - r.started = res.started; r.success = res.success; r.cancelled = res.cancelled; r.error = res.error == null ? "" : res.error; - } catch (Throwable t) { - r.started = false; - r.error = t.getClass().getSimpleName() + ": " + t.getMessage(); - } - return r; - } - - /** The native assembler: the pending files written from the cache, the cache removed on success; never throws. */ - private static NativeOutcome runNativeAssembly(byte[] manifestBytes, int[] pendingIdx, int totalFiles, String installDirPath, String cachePath, AtomicBoolean cancel, Callback cb) { - NativeOutcome r = new NativeOutcome(); - try { - cb.onLog("epic: assembler=native files=" + totalFiles + (cachePath.isEmpty() ? "" : " cache=scratch")); - EpicNative.Result res = EpicNative.assemble(manifestBytes, installDirPath, cachePath, pendingIdx, cancel, new EpicNative.Listener() { - @Override public void onPlan(int chunksTotal, long bytesTotal, String chunkDir) {} - @Override public void onProgress(long bytesDone, long bytesTotal, int done, int total) { - cb.onStage("install", bytesDone, bytesTotal, done, Math.max(total, totalFiles)); - cb.onProgress("Writing files (" + done + "/" + Math.max(total, totalFiles) + ")", 80 + (int) (done * 20L / Math.max(1, Math.max(total, totalFiles)))); - } - @Override public void onLog(String line) { cb.onLog(line); } - @Override public void onComplete(boolean success, String error, long bytes) {} - }); - r.started = res.started; r.success = res.success; r.cancelled = res.cancelled; r.error = res.error == null ? "" : res.error; - } catch (Throwable t) { - r.started = false; - r.error = t.getClass().getSimpleName() + ": " + t.getMessage(); - } - return r; - } - - // ---- CDN list and manifest download --------------------------------------------------------- - - public static List<CdnUrl> parseCdnUrls(String json) { - List<CdnUrl> result = new ArrayList<>(); - try { - JSONArray manifests = new JSONObject(json).optJSONArray("manifests"); - if (manifests == null) return result; - for (int i = 0; i < manifests.length(); i++) { - JSONObject m = manifests.optJSONObject(i); - if (m == null) continue; - String uri = m.optString("uri", ""); - int buildsIdx = uri.indexOf("/Builds"); - if (buildsIdx < 0) continue; - String baseUrl = uri.substring(0, buildsIdx); - if (!baseUrl.startsWith("http") || baseUrl.contains("cloudflare.epicgamescdn.com")) continue; - String afterBase = uri.substring(buildsIdx); - int q = afterBase.indexOf('?'); - if (q >= 0) afterBase = afterBase.substring(0, q); - int lastSlash = afterBase.lastIndexOf('/'); - if (lastSlash < 0) continue; - String cloudDir = afterBase.substring(0, lastSlash); - StringBuilder auth = new StringBuilder(); - JSONArray params = m.optJSONArray("queryParams"); - if (params != null) for (int j = 0; j < params.length(); j++) { - JSONObject p = params.optJSONObject(j); - if (p == null) continue; - auth.append(auth.length() == 0 ? "?" : "&").append(p.optString("name")).append('=').append(p.optString("value")); - } - result.add(new CdnUrl(baseUrl, cloudDir, auth.toString())); - } - } catch (Exception e) { - Log.e(TAG, "CDN parse: " + e.getClass().getSimpleName()); - } - return result; - } - - /** The manifest binary from the first CDN that serves it; the auth query goes on this URL only. */ - public static byte[] downloadManifest(String json, List<CdnUrl> cdnUrls) { - try { - JSONArray manifests = new JSONObject(json).optJSONArray("manifests"); - if (manifests == null || manifests.length() == 0) return null; - String firstUri = manifests.getJSONObject(0).optString("uri", ""); - String uriPath = firstUri.contains("?") ? firstUri.substring(0, firstUri.indexOf('?')) : firstUri; - int lastSlash = uriPath.lastIndexOf('/'); - if (lastSlash < 0) return null; - String manifestFilename = uriPath.substring(lastSlash + 1); - for (CdnUrl cdn : cdnUrls) { - byte[] bytes = downloadBytes(cdn.baseUrl + cdn.cloudDir + "/" + manifestFilename + cdn.authParams); - if (bytes != null && bytes.length > 4) return bytes; - } - } catch (Exception e) { - Log.e(TAG, "manifest download: " + e.getClass().getSimpleName()); - } - return null; - } - - // ---- manifest parsing ----------------------------------------------------------------------- - - public static Manifest parseManifest(byte[] bytes) { - try { - ByteBuffer buf = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); - int magic = buf.getInt(); - if (magic != 0x44BEC00C) return parseJsonManifest(bytes); - int headerSize = buf.getInt(); - int sizeUncompressed = buf.getInt(); - buf.getInt(); - buf.position(buf.position() + 20); - int storedAs = buf.get() & 0xFF; - int version = buf.getInt(); - String chunkDir = version >= 15 ? "ChunksV4" : version >= 6 ? "ChunksV3" : version >= 3 ? "ChunksV2" : "Chunks"; - buf.position(headerSize); - byte[] body = new byte[buf.remaining()]; - buf.get(body); - if ((storedAs & 1) != 0) { - Inflater inflater = new Inflater(); - inflater.setInput(body); - byte[] decomp = new byte[sizeUncompressed]; - int got = inflater.inflate(decomp); - inflater.end(); - if (got != sizeUncompressed) { Log.e(TAG, "manifest inflate size mismatch"); return null; } - body = decomp; - } - ByteBuffer b = ByteBuffer.wrap(body).order(ByteOrder.LITTLE_ENDIAN); - Manifest m = new Manifest(); - m.chunkDir = chunkDir; - // ManifestMeta: the launch exe and build version live here; the rest is skipped by size. - int metaStart = b.position(); - int metaSize = b.getInt(); - try { - b.get(); // data version - b.getInt(); // feature level - b.get(); // isFileData - b.getInt(); // app id - readFString(b); // app name - m.buildVersion = readFString(b); - m.launchExe = readFString(b).replace('\\', '/'); - m.launchCommand = readFString(b); - // PrereqIds (an array), PrereqName, PrereqPath, PrereqArgs. - int prereqIds = b.getInt(); - for (int i = 0; i < prereqIds && i < 64; i++) readFString(b); - m.prereqName = readFString(b); - m.prereqPath = readFString(b).replace('\\', '/'); - readFString(b); // PrereqArgs - m.prereqRead = true; - } catch (Exception e) { - Log.w(TAG, "manifest meta: " + e.getClass().getSimpleName()); - } - b.position(metaStart + metaSize); - - int cdlStart = b.position(); - int cdlSize = b.getInt(); - b.get(); - int chunkCount = b.getInt(); - List<ChunkInfo> chunks = new ArrayList<>(chunkCount); - for (int i = 0; i < chunkCount; i++) chunks.add(new ChunkInfo()); - for (ChunkInfo c : chunks) { c.guid[0] = b.getInt(); c.guid[1] = b.getInt(); c.guid[2] = b.getInt(); c.guid[3] = b.getInt(); } - for (ChunkInfo c : chunks) c.hash = b.getLong(); - for (ChunkInfo c : chunks) { c.sha1 = new byte[20]; b.get(c.sha1); } - for (ChunkInfo c : chunks) c.groupNum = b.get() & 0xFF; - for (ChunkInfo c : chunks) c.windowSize = b.getInt(); - for (ChunkInfo c : chunks) c.fileSize = b.getLong(); - b.position(cdlStart + cdlSize); - - int fmlStart = b.position(); - int fmlSize = b.getInt(); - b.get(); - int fileCount = b.getInt(); - List<FileInfo> files = new ArrayList<>(fileCount); - for (int i = 0; i < fileCount; i++) files.add(new FileInfo()); - for (FileInfo f : files) f.filename = readFString(b); - for (int i = 0; i < fileCount; i++) readFString(b); - for (FileInfo f : files) { f.sha1 = new byte[20]; b.get(f.sha1); } - b.position(b.position() + fileCount); - for (int i = 0; i < fileCount; i++) { - int tagCount = b.getInt(); - for (int j = 0; j < tagCount; j++) { String tag = readFString(b); if (tag != null && !tag.isEmpty()) files.get(i).installTags.add(tag); } - } - for (FileInfo f : files) { - int partCount = b.getInt(); - for (int j = 0; j < partCount; j++) { - int partStart = b.position(); - int partStructSize = b.getInt(); - ChunkPart part = new ChunkPart(); - part.guid[0] = b.getInt(); part.guid[1] = b.getInt(); part.guid[2] = b.getInt(); part.guid[3] = b.getInt(); - part.offset = b.getInt(); part.size = b.getInt(); - f.parts.add(part); - b.position(partStart + partStructSize); - } - } - b.position(fmlStart + fmlSize); - Map<String, ChunkInfo> seen = new LinkedHashMap<>(chunkCount * 2); - for (ChunkInfo c : chunks) seen.put(c.guidStr(), c); - m.uniqueChunks = new ArrayList<>(seen.values()); - m.files = files; - return m; - } catch (Exception e) { - Log.e(TAG, "manifest parse: " + e.getClass().getSimpleName()); - return null; - } - } - - private static Manifest parseJsonManifest(byte[] bytes) { - try { - JSONObject root = new JSONObject(new String(bytes, StandardCharsets.UTF_8)); - int manifestVersion = 0; - try { manifestVersion = Integer.parseInt(root.optString("ManifestFileVersion", "0")); } catch (NumberFormatException ignored) {} - Manifest m = new Manifest(); - m.chunkDir = manifestVersion >= 15 ? "ChunksV4" : manifestVersion >= 6 ? "ChunksV3" : manifestVersion >= 3 ? "ChunksV2" : "ChunksV4"; - m.launchExe = root.optString("LaunchExe", "").replace('\\', '/'); - m.launchCommand = root.optString("LaunchCommand", ""); - m.buildVersion = root.optString("BuildVersionString", ""); - m.prereqName = root.optString("PrereqName", ""); - m.prereqPath = root.optString("PrereqPath", "").replace('\\', '/'); - m.prereqRead = true; - JSONObject chunkHashList = root.optJSONObject("ChunkHashList"); - JSONObject dataGroupList = root.optJSONObject("DataGroupList"); - JSONObject chunkFilesizeList = root.optJSONObject("ChunkFilesizeList"); - if (chunkHashList == null) return null; - Map<String, ChunkInfo> chunkMap = new LinkedHashMap<>(); - Iterator<String> keys = chunkHashList.keys(); - while (keys.hasNext()) { - String guidHex = keys.next(); - if (guidHex.length() < 32) continue; - ChunkInfo c = new ChunkInfo(); - for (int k = 0; k < 4; k++) c.guid[k] = (int) Long.parseLong(guidHex.substring(k * 8, k * 8 + 8), 16); - String hashHex = chunkHashList.getString(guidHex); - if (hashHex != null && hashHex.length() >= 16) { try { c.hash = Long.parseUnsignedLong(hashHex.substring(0, 16), 16); } catch (Exception ignored) {} } - if (dataGroupList != null) { try { c.groupNum = Integer.parseInt(dataGroupList.optString(guidHex, "0")); } catch (NumberFormatException ignored) {} } - if (chunkFilesizeList != null) { try { c.fileSize = Long.parseLong(chunkFilesizeList.optString(guidHex, "0"), 16); } catch (NumberFormatException ignored) {} } - chunkMap.put(guidHex, c); - } - JSONArray fileList = root.optJSONArray("FileManifestList"); - if (fileList == null) return null; - List<FileInfo> files = new ArrayList<>(fileList.length()); - for (int i = 0; i < fileList.length(); i++) { - JSONObject fo = fileList.getJSONObject(i); - FileInfo fi = new FileInfo(); - fi.filename = fo.optString("Filename", ""); - JSONArray tags = fo.optJSONArray("InstallTags"); - if (tags != null) for (int t = 0; t < tags.length(); t++) { String tag = tags.optString(t, ""); if (!tag.isEmpty()) fi.installTags.add(tag); } - JSONArray parts = fo.optJSONArray("FileChunkParts"); - if (parts != null) for (int j = 0; j < parts.length(); j++) { - JSONObject po = parts.getJSONObject(j); - ChunkPart part = new ChunkPart(); - String g = po.optString("Guid", ""); - if (g.length() >= 32) for (int k = 0; k < 4; k++) part.guid[k] = (int) Long.parseLong(g.substring(k * 8, k * 8 + 8), 16); - try { part.offset = Integer.parseInt(po.optString("Offset", "0")); } catch (NumberFormatException ignored) {} - try { part.size = Integer.parseInt(po.optString("Size", "0")); } catch (NumberFormatException ignored) {} - fi.parts.add(part); - } - files.add(fi); - } - m.uniqueChunks = new ArrayList<>(chunkMap.values()); - m.files = files; - return m; - } catch (Exception e) { - Log.e(TAG, "json manifest parse: " + e.getClass().getSimpleName()); - return null; - } - } - - public static String readFString(ByteBuffer buf) { - int length = buf.getInt(); - if (length == 0) return ""; - if (length < 0) { - int chars = (-length) - 1; - byte[] bytes = new byte[chars * 2]; - buf.get(bytes); - buf.getShort(); - return new String(bytes, StandardCharsets.UTF_16LE); - } - byte[] bytes = new byte[length - 1]; - buf.get(bytes); - buf.get(); - return new String(bytes, StandardCharsets.US_ASCII); - } - - // ---- chunk fetch (the built-in pool) -------------------------------------------------------- - - public static byte[] downloadBytes(String urlStr) { - HttpURLConnection conn = null; - try { - conn = (HttpURLConnection) new URL(urlStr).openConnection(); - conn.setConnectTimeout(30000); - conn.setReadTimeout(60000); - conn.setRequestProperty("User-Agent", UA); - if (conn.getResponseCode() != 200) { Log.w(TAG, "HTTP " + conn.getResponseCode() + " for " + StoreLog.redactUrl(urlStr)); return null; } - return EpicAuthClient.readAllBytes(conn.getInputStream()); - } catch (Exception e) { - Log.w(TAG, "download error [" + StoreLog.redactUrl(urlStr) + "]: " + e.getClass().getSimpleName()); - return null; - } finally { - if (conn != null) conn.disconnect(); - } - } - - /** One chunk streamed from the first CDN that serves it, SHA-1 checked, published by rename. */ - private static boolean downloadChunkStreaming(ChunkInfo chunk, String chunkDir, List<CdnUrl> cdnUrls, File outFile) { - String chunkPath = chunk.getPath(chunkDir); - File tmp = new File(outFile.getPath() + ".part"); - tmp.delete(); - for (CdnUrl cdn : cdnUrls) { - HttpURLConnection conn = null; - try { - conn = (HttpURLConnection) new URL(cdn.baseUrl + cdn.cloudDir + "/" + chunkPath).openConnection(); - conn.setConnectTimeout(30000); - conn.setReadTimeout(60000); - conn.setRequestProperty("User-Agent", UA); - if (conn.getResponseCode() != 200) { conn.disconnect(); continue; } - MessageDigest sha = null; - if (chunk.sha1 != null && chunk.sha1.length == 20) { - boolean allZero = true; - for (byte x : chunk.sha1) if (x != 0) { allZero = false; break; } - if (!allZero) { try { sha = MessageDigest.getInstance("SHA-1"); } catch (Exception ignored) {} } - } - try (InputStream in = conn.getInputStream(); FileOutputStream fos = new FileOutputStream(tmp)) { - byte[] hdrBuf = new byte[41]; - readFully(in, hdrBuf); - ByteBuffer hdr = ByteBuffer.wrap(hdrBuf).order(ByteOrder.LITTLE_ENDIAN); - if (hdr.getInt() != 0xB1FE3AA2) { Log.w(TAG, "bad chunk magic"); continue; } - hdr.getInt(); - int headerSize = hdr.getInt(); - int compressedSize = hdr.getInt(); - hdr.position(hdr.position() + 24); - int storedAs = hdr.get() & 0xFF; - if (headerSize > 41) skipFully(in, headerSize - 41); - byte[] iobuf = new byte[131072]; - if ((storedAs & 1) != 0) { - Inflater inflater = new Inflater(); - byte[] obuf = new byte[131072]; - int remaining = compressedSize; - try { - while (remaining > 0 && !inflater.finished()) { - if (inflater.needsInput()) { - int n = in.read(iobuf, 0, Math.min(iobuf.length, remaining)); - if (n <= 0) break; - remaining -= n; - inflater.setInput(iobuf, 0, n); - } - int out = inflater.inflate(obuf); - if (out > 0) { fos.write(obuf, 0, out); if (sha != null) sha.update(obuf, 0, out); } - } - int out; - while ((out = inflater.inflate(obuf)) > 0) { fos.write(obuf, 0, out); if (sha != null) sha.update(obuf, 0, out); } - } finally { - inflater.end(); - } - } else { - int remaining = compressedSize; - while (remaining > 0) { - int n = in.read(iobuf, 0, Math.min(iobuf.length, remaining)); - if (n <= 0) break; - fos.write(iobuf, 0, n); - if (sha != null) sha.update(iobuf, 0, n); - remaining -= n; - } - } - } - if (sha != null && !MessageDigest.isEqual(sha.digest(), chunk.sha1)) { tmp.delete(); conn.disconnect(); continue; } - if (!tmp.renameTo(outFile)) { tmp.delete(); conn.disconnect(); continue; } - conn.disconnect(); - return true; - } catch (Exception e) { - tmp.delete(); - if (conn != null) conn.disconnect(); - } - } - tmp.delete(); - Log.e(TAG, "every CDN failed for chunk " + chunk.guidStr()); - return false; - } - - private static void readFully(InputStream in, byte[] buf) throws IOException { - int off = 0; - while (off < buf.length) { int n = in.read(buf, off, buf.length - off); if (n < 0) throw new IOException("stream ended"); off += n; } - } - - private static void skipFully(InputStream in, int count) throws IOException { - byte[] skip = new byte[Math.min(count, 4096)]; - int remaining = count; - while (remaining > 0) { int n = in.read(skip, 0, Math.min(skip.length, remaining)); if (n < 0) throw new IOException("stream ended"); remaining -= n; } - } - - // ---- selection and verification ------------------------------------------------------------- - - public static List<FileInfo> getRequiredInstallFiles(Manifest manifest) { - List<FileInfo> required = new ArrayList<>(); - for (FileInfo f : manifest.files) if (f.installTags.isEmpty()) required.add(f); - return required.isEmpty() ? new ArrayList<>(manifest.files) : required; - } - - /** Base files plus any file carrying one of the tags; null tags = every file; nothing matched = base only. */ - public static List<FileInfo> resolveInstallFiles(Manifest manifest, List<String> selectedTags) { - if (selectedTags == null) return new ArrayList<>(manifest.files); - if (selectedTags.isEmpty()) return getRequiredInstallFiles(manifest); - Set<String> want = new LinkedHashSet<>(selectedTags); - List<FileInfo> out = new ArrayList<>(); - for (FileInfo f : manifest.files) { - if (f.installTags.isEmpty()) { out.add(f); continue; } - for (String t : f.installTags) if (want.contains(t)) { out.add(f); break; } - } - return out.isEmpty() ? getRequiredInstallFiles(manifest) : out; - } - - public static List<ChunkInfo> uniqueChunksForFiles(Manifest manifest, List<FileInfo> files) { - Map<String, ChunkInfo> byGuid = new LinkedHashMap<>(); - for (ChunkInfo c : manifest.uniqueChunks) byGuid.put(c.guidStr(), c); - Set<String> seen = new LinkedHashSet<>(); - List<ChunkInfo> chunks = new ArrayList<>(); - for (FileInfo f : files) for (ChunkPart p : f.parts) { String g = p.guidStr(); if (seen.add(g)) { ChunkInfo c = byGuid.get(g); if (c != null) chunks.add(c); } } - return chunks; - } - - public static boolean fileExistsWithCorrectHash(File outputFile, long expectedSize, byte[] expectedHash) { - if (outputFile == null || !outputFile.exists() || outputFile.length() != expectedSize) return false; - if (expectedHash == null || expectedHash.length != 20) return false; - boolean allZero = true; - for (byte x : expectedHash) if (x != 0) { allZero = false; break; } - if (allZero) return false; - try (FileInputStream fis = new FileInputStream(outputFile)) { - MessageDigest digest = MessageDigest.getInstance("SHA-1"); - byte[] buf = new byte[64 * 1024]; - int n; - while ((n = fis.read(buf)) != -1) digest.update(buf, 0, n); - return MessageDigest.isEqual(digest.digest(), expectedHash); - } catch (Exception e) { - return false; - } - } - - /** The manifest's prerequisite as {name, path}, from the manifest alone; null on failure. Blocking. */ - public static String[] fetchPrereq(String manifestApiJson) { - try { - List<CdnUrl> cdnUrls = parseCdnUrls(manifestApiJson); - if (cdnUrls.isEmpty()) return null; - byte[] bytes = downloadManifest(manifestApiJson, cdnUrls); - if (bytes == null) return null; - Manifest m = parseManifest(bytes); - if (m == null || !m.prereqRead) { Log.w(TAG, "manifest prerequisite not read"); return null; } - Log.i(TAG, "manifest " + m.buildVersion + ": " + m.files.size() + " files, prerequisite " + (m.prereqName.isEmpty() && m.prereqPath.isEmpty() ? "none" : m.prereqName + " (" + m.prereqPath + ")")); - return new String[] { m.prereqName, m.prereqPath }; - } catch (Exception e) { - return null; - } - } - - /** The install size for the tags (null = every file), from the manifest alone; -1 on failure. Blocking. */ - public static long fetchInstallSizeBytes(String manifestApiJson, List<String> installTags) { - try { - List<CdnUrl> cdnUrls = parseCdnUrls(manifestApiJson); - if (cdnUrls.isEmpty()) return -1; - byte[] bytes = downloadManifest(manifestApiJson, cdnUrls); - if (bytes == null) return -1; - Manifest m = parseManifest(bytes); - if (m == null) return -1; - long total = 0; - for (FileInfo f : resolveInstallFiles(m, installTags)) total += Math.max(f.fileSize(), 0); - return total > 0 ? total : -1; - } catch (Exception e) { - return -1; - } - } - - // ---- helpers -------------------------------------------------------------------------------- - - static byte[] readFile(File f) throws IOException { - try (FileInputStream fis = new FileInputStream(f)) { - byte[] data = new byte[(int) f.length()]; - int off = 0; - while (off < data.length) { int r = fis.read(data, off, data.length - off); if (r < 0) break; off += r; } - return data; - } - } - - static void deleteDir(File dir) { - if (!dir.exists()) return; - File[] files = dir.listFiles(); - if (files != null) for (File f : files) { if (f.isDirectory()) deleteDir(f); else f.delete(); } - dir.delete(); - } - - private static void sampleSpeed(long done, AtomicLong lastSpeedMs, AtomicLong lastSpeedBytes, AtomicLong speedBps) { - long nowMs = System.currentTimeMillis(), prevMs = lastSpeedMs.get(); - if (nowMs - prevMs >= 500 && lastSpeedMs.compareAndSet(prevMs, nowMs)) { - long prevB = lastSpeedBytes.getAndSet(done); - long dt = nowMs - prevMs; - if (dt > 0) speedBps.set((done - prevB) * 1000L / dt); - } - } - - private static String speedSuffix(long bps) { - if (bps <= 0) return ""; - return " " + (bps >= 1048576 ? String.format("%.1f MB/s", bps / 1048576.0) : (bps / 1024) + " KB/s"); - } - - private static String fmt(long bytes) { - if (bytes >= 1073741824L) return String.format("%.1f GB", bytes / 1073741824.0); - if (bytes >= 1048576L) return String.format("%.1f MB", bytes / 1048576.0); - return String.format("%.0f KB", bytes / 1024.0); - } -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicDownloadManager.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicDownloadManager.kt new file mode 100644 index 0000000000..4595c1938c --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicDownloadManager.kt @@ -0,0 +1,76 @@ +package com.droiddeck.launcher.stores.epic + +import org.json.JSONArray +import org.json.JSONObject + +class EpicCdn(val base: String, val dir: String, val auth: String) + +class EpicManifest internal constructor( + internal val bytes: ByteArray, + val files: List<FileEntry>, + val buildVersion: String, + val launchExe: String, + val prereqName: String, + val prereqPath: String, + val prereqRead: Boolean, +) { + class FileEntry(val path: String, private val size: Long, val tags: List<String>) { + fun fileSize(): Long = size + } +} + +object EpicDownloadManager { + private fun info(json: String): JSONObject? = runCatching { JSONObject(json) }.getOrNull() + + @JvmStatic + fun parseCdnUrls(json: String): List<EpicCdn> { + val info = info(json) ?: return emptyList() + val list = EpicNative.call("build.cdns", JSONObject().put("info", info))?.optJSONArray("cdns") ?: return emptyList() + return (0 until list.length()).mapNotNull { list.optJSONObject(it) }.map { + EpicCdn(it.optString("base"), it.optString("dir"), it.optString("auth")) + } + } + + @JvmStatic + fun downloadManifest(json: String, cdns: List<EpicCdn>): ByteArray? { + val info = info(json) ?: return null + if (cdns.isEmpty()) return null + val list = JSONArray() + cdns.forEach { list.put(JSONObject().put("base", it.base).put("dir", it.dir).put("auth", it.auth)) } + return EpicNative.fetch("manifest.download", JSONObject().put("info", info).put("cdns", list)) + } + + @JvmStatic + fun parseManifest(bytes: ByteArray): EpicManifest? { + val summary = EpicNative.inspect(bytes, JSONObject().put("op", "summary")) ?: return null + if (summary.has("error")) return null + val list = summary.optJSONArray("files") ?: return null + val files = (0 until list.length()).mapNotNull { list.optJSONObject(it) }.map { f -> + val tags = f.optJSONArray("tags") + EpicManifest.FileEntry(f.optString("path"), f.optLong("size", 0L), List(tags?.length() ?: 0) { tags!!.optString(it) }) + } + return EpicManifest( + bytes, files, + buildVersion = summary.optString("buildVersion"), + launchExe = summary.optString("launchExe"), + prereqName = summary.optString("prereqName"), + prereqPath = summary.optString("prereqPath"), + prereqRead = summary.optBoolean("prereqRead", false), + ) + } + + @JvmStatic + fun resolveInstallFiles(manifest: EpicManifest, tags: List<String>): List<EpicManifest.FileEntry> { + val answer = EpicNative.inspect(manifest.bytes, JSONObject().put("op", "select").put("tags", JSONArray(tags))) ?: return emptyList() + val indices = answer.optJSONArray("indices") ?: return emptyList() + return (0 until indices.length()).mapNotNull { manifest.files.getOrNull(indices.optInt(it, -1)) } + } + + @JvmStatic + fun fetchPrereq(json: String): Array<String>? { + val info = info(json) ?: return null + val answer = EpicNative.call("build.prereq", JSONObject().put("info", info)) ?: return null + if (answer.has("error") || !answer.optBoolean("read", false)) return null + return arrayOf(answer.optString("name"), answer.optString("path")) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicGame.java b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicGame.java deleted file mode 100644 index 2cb9c7fb36..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicGame.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.droiddeck.launcher.stores.epic; - -/** - * One Epic Games library entry. {@code appName} is the launcher's app slug (the manifest URL and - * the launch arguments take it), {@code namespace} the product's sandbox, {@code catalogItemId} - * the catalog UUID; the three together address every Epic API call for the game. - */ -public class EpicGame { - public String appName = ""; - public String namespace = ""; - public String catalogItemId = ""; - public String title = ""; - public String developer = ""; - public String description = ""; - /** DieselGameBoxTall: the tall portrait art. */ - public String artCover = ""; - /** DieselGameBox or Thumbnail. */ - public String artSquare = ""; - public String version = ""; - public long installSize = 0L; - public boolean canRunOffline = true; - public boolean isDLC = false; - public String baseGameCatalogItemId = ""; - public String releaseDate = ""; -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicInstallTags.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicInstallTags.kt index dcb178d505..8d1018c540 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicInstallTags.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicInstallTags.kt @@ -1,44 +1,24 @@ package com.droiddeck.launcher.stores.epic +import org.json.JSONObject import java.util.Locale -/** - * Epic tags a manifest's files by language so a client installs the base files plus one language - * instead of every language. The table (the launcher's tag names per language) is Legendary's; - * the language is the device's locale, English when it is not one Epic ships. - */ object EpicInstallTags { - private val LANGUAGE_TO_TAGS: Map<String, List<String>> = mapOf( - "ar" to listOf("Arabic", "ar"), "bg" to listOf("Bulgarian", "bg-BG", "bg"), - "zh-Hans" to listOf("Chinese", "ChineseSimplified", "zh-Hans", "zh_Hans", "zh"), "zh-Hant" to listOf("ChineseTraditional", "zh-Hant", "zh_Hant"), - "cs" to listOf("Czech", "cs-CZ", "cs"), "da" to listOf("Danish", "da-DK", "da"), "nl" to listOf("Dutch", "nl-NL", "nl"), - "en" to listOf("English", "en-US", "en"), "fi" to listOf("Finnish", "fi-FI", "fi"), "fr" to listOf("French", "fr-FR", "fr"), - "de" to listOf("German", "de-DE", "de"), "el" to listOf("Greek", "el-GR", "el"), "hu" to listOf("Hungarian", "hu-HU", "hu"), - "it" to listOf("Italian", "it-IT", "it"), "ja" to listOf("Japanese", "ja-JP", "ja"), "ko" to listOf("Korean", "ko-KR", "ko"), - "no" to listOf("Norwegian", "nb-NO", "no"), "pl" to listOf("Polish", "pl-PL", "pl"), "pt" to listOf("Portuguese", "pt-PT", "pt"), - "pt-BR" to listOf("PortugueseBrazilian", "Brazilian", "pt-BR", "br"), "ro" to listOf("Romanian", "ro-RO", "ro"), - "ru" to listOf("Russian", "ru-RU", "ru"), "es" to listOf("Spanish", "es-ES", "es"), "es-419" to listOf("SpanishLatinAmerica", "Latam", "es-MX", "es_mx"), - "sv" to listOf("Swedish", "sv-SE", "sv"), "th" to listOf("Thai", "th-TH", "th"), "tr" to listOf("Turkish", "tr-TR", "tr"), - "uk" to listOf("Ukrainian", "uk-UA", "uk"), "vi" to listOf("Vietnamese", "vi-VN", "vi"), - ) + private class Answer(val locale: Locale, val tags: List<String>, val launchLocale: String) - private fun key(locale: Locale): String? { - val l = locale.language.lowercase(Locale.ROOT) - val r = locale.country.uppercase(Locale.ROOT) - return when (l) { - "zh" -> if (r == "TW" || r == "HK" || r == "MO") "zh-Hant" else "zh-Hans" - "pt" -> if (r == "BR") "pt-BR" else "pt" - "es" -> if (r == "ES" || r.isEmpty()) "es" else "es-419" - "nb", "nn" -> "no" - else -> if (LANGUAGE_TO_TAGS.containsKey(l)) l else null - } + @Volatile private var last: Answer? = null + + private fun current(): Answer? { + val locale = Locale.getDefault() + last?.takeIf { it.locale == locale }?.let { return it } + val answer = EpicNative.call("locale", JSONObject().put("language", locale.language).put("region", locale.country)) ?: return null + val list = answer.optJSONArray("tags") + val tags = List(list?.length() ?: 0) { list!!.optString(it) }.filter { it.isNotEmpty() } + return Answer(locale, tags, answer.optString("launchLocale", "en").ifEmpty { "en" }).also { last = it } } - /** The install tags for the device's language; English when Epic has no tags for it. Never empty. */ @JvmStatic - fun tagsForDevice(): List<String> = LANGUAGE_TO_TAGS[key(Locale.getDefault()) ?: "en"] ?: LANGUAGE_TO_TAGS.getValue("en") + fun tagsForDevice(): List<String> = current()?.tags ?: emptyList() - /** The two-letter code handed to the game as -epiclocale; "en" when the language is not one Epic knows. */ - @JvmStatic - fun localeCodeForDevice(): String = key(Locale.getDefault())?.substringBefore('-') ?: "en" + fun launchLocale(): String = current()?.launchLocale ?: "en" } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicInstaller.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicInstaller.kt new file mode 100644 index 0000000000..ee6a2181d0 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicInstaller.kt @@ -0,0 +1,144 @@ +package com.droiddeck.launcher.stores.epic + +import android.content.Context +import com.droiddeck.launcher.R +import com.droiddeck.launcher.frontend.WinCompSources +import com.droiddeck.launcher.stores.CatalogItem +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreExe +import com.droiddeck.launcher.stores.StoreGameSidecar +import com.droiddeck.launcher.stores.StoreInstallRoot +import com.droiddeck.launcher.stores.StoreInstalls +import com.droiddeck.launcher.stores.download.DownloadQueue +import com.droiddeck.launcher.stores.download.DownloadStage +import com.droiddeck.launcher.stores.download.StoreDownloadTier +import org.json.JSONArray +import org.json.JSONObject +import java.io.File +import java.util.concurrent.atomic.AtomicBoolean +import java.util.concurrent.atomic.AtomicLong + +internal class EpicInstaller( + private val app: Context, + private val item: CatalogItem, + private val folder: File, +) : DownloadQueue.DownloadJob { + private val cancelled = AtomicBoolean(false) + private val namespace = item.extra["namespace"].orEmpty() + private val catalogItemId = item.extra["catalogItemId"].orEmpty() + + private fun scratch(): File = StoreInstallRoot.scratchDir(app, Store.EPIC, item.id) + + override fun run(handle: DownloadQueue.JobHandle): String? { + handle.stage(DownloadStage.MANIFEST, app.getString(R.string.stores_sync_sign_in)) + val token = EpicCredentialStore.getValidAccessToken(app) ?: throw IllegalStateException("Not signed in to Epic Games") + val cover = item.tallImageUrl ?: item.imageUrl + StoreInstalls.begin(folder, Store.EPIC, item.id, item.title, cover, item.imageUrl) + if (cancelled.get()) return null + + handle.stage(DownloadStage.MANIFEST, "Reading the build list…") + val info = EpicApiClient.getManifestApiJson(token, namespace, catalogItemId, item.id) + ?: throw IllegalStateException("The manifest could not be fetched") + if (cancelled.get()) return null + + val tier = StoreDownloadTier.current(app) + val request = JSONObject() + .put("info", JSONObject(info)) + .put("gameDir", folder.absolutePath) + .put("scratchDir", if (StoreInstallRoot.isRemovable(app, folder)) scratch().absolutePath else "") + .put("storageLabel", StoreInstallRoot.labelFor(app, folder)) + .put("tags", JSONArray(EpicInstallTags.tagsForDevice())) + .put("maxWorkers", tier.networkWindow.coerceIn(1, 128)) + .put("processWorkers", tier.processWorkers) + .put("caBundle", "") + + val shown = AtomicLong(-1) + val installing = AtomicBoolean(false) + val prefs = EpicPrefs.get(app) + val listener = object : EpicNative.InstallListener { + override fun onStatus(text: String) { handle.stage(DownloadStage.MANIFEST, text) } + + override fun onCheck(doneBytes: Long, totalBytes: Long, files: Int, filesTotal: Int) { + handle.stage(DownloadStage.MANIFEST, "Checking files…") + handle.stageProgress(doneBytes, totalBytes, files, filesTotal) + } + + override fun onSizes(pendingBytes: Long, diskBytes: Long) { + handle.diskSize(diskBytes) + if (diskBytes > 0) prefs.edit().putLong("size_${item.id}", diskBytes).apply() + } + + override fun onProgress(written: Long, total: Long, files: Int, filesTotal: Int) { + if (installing.get()) return + while (true) { + val before = shown.get() + if (written < before) return + if (shown.compareAndSet(before, written)) break + } + handle.progress(written, total, "Downloading chunks ($files/$filesTotal files)") + } + + override fun onInstall(done: Long, total: Long, files: Int, filesTotal: Int) { + installing.set(true) + handle.stage(DownloadStage.INSTALL) + handle.stageProgress(done, total, files, filesTotal, bytes = true) + } + + override fun onLog(line: String) { handle.log("epic: $line") } + + override fun beforeReplace(): Boolean = try { + StoreInstalls.markUpdating(folder) + true + } catch (e: Exception) { + handle.log("epic: the install record could not be switched to updating (${e.javaClass.simpleName})") + false + } + + override fun onComplete(success: Boolean, cancelled: Boolean, error: String, result: String) = Unit + } + + val outcome = EpicNative.install(request, listener, cancelled) + if (outcome.cancelled || cancelled.get() && !outcome.success) return null + if (!outcome.success) throw IllegalStateException(outcome.error.ifEmpty { "Native Epic install failed" }) + val result = outcome.result ?: JSONObject() + + handle.stage(DownloadStage.INSTALL, app.getString(R.string.stores_registering)) + val picked = StoreExe.pick(folder, result.optString("launchExe"), item.title) + if (picked.isEmpty()) handle.log("epic: no exe found in ${folder.name}; pick one in Steam settings › Added games") + val creds = EpicCredentialStore.load(app) + val additional = EpicApiClient.getCustomAttribute(token, namespace, catalogItemId, "AdditionalCommandLine").orEmpty() + val deployment = result.optString("deploymentId") + val argsAnswer = EpicNative.call( + "launch.args", + JSONObject().put("displayName", creds?.displayName.orEmpty()).put("accountId", creds?.accountId.orEmpty()) + .put("namespace", namespace).put("locale", EpicInstallTags.launchLocale()).put("appName", item.id) + .put("deploymentId", deployment).put("additional", additional), + ) + val argList = argsAnswer?.optJSONArray("args") + val args = List(argList?.length() ?: 0) { argList!!.optString(it) }.filter { it.isNotEmpty() } + + val extra = LinkedHashMap<String, String>() + extra["appName"] = item.id + extra["namespace"] = namespace + extra["catalogItemId"] = catalogItemId + if (deployment.isNotEmpty()) extra["deploymentId"] = deployment + extra[WinCompSources.EPIC_PREREQ_PATH] = result.optString("prereqPath") + extra[WinCompSources.EPIC_PREREQ_NAME] = result.optString("prereqName") + if (result.optBoolean("prereqRead", false)) extra[WinCompSources.LIST_READ] = "1" + + val sidecar = StoreGameSidecar( + Store.EPIC, item.id, item.title, exe = picked.ifEmpty { "game.exe" }, args = args, + installVersion = result.optString("buildVersion"), installedAt = System.currentTimeMillis(), + cover = cover, hero = item.imageUrl, extra = extra, + ) + StoreInstalls.complete(app, folder, sidecar, onStep = { done, steps -> handle.stageProgress(done.toLong(), steps.toLong()) }) + val disk = result.optLong("diskBytes", 0L) + if (disk > 0) prefs.edit().putLong("size_${item.id}", disk).apply() + return folder.path + } + + override fun cancel(deleteFiles: Boolean) { + cancelled.set(true) + if (deleteFiles) StoreInstalls.discard(app, folder, listOf(File(folder, ".chunks"), scratch())) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLaunchData.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLaunchData.kt deleted file mode 100644 index 6119bda75e..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLaunchData.kt +++ /dev/null @@ -1,55 +0,0 @@ -package com.droiddeck.launcher.stores.epic - -import android.content.Context -import android.util.Log -import com.droiddeck.launcher.stores.StoreGameSidecar - -/** - * What an Epic game's launch line needs beyond the exe, built once at install time into the - * sidecar's arguments: the portal and identity arguments every EOS title expects - * (`-EpicPortal -epicusername -epicuserid -epicsandboxid -epiclocale -epicapp -epicenv=Prod`), the - * deployment id when the app has an EOS sidecar, and the extra flags Epic ships for the title - * (`AdditionalCommandLine`). The sign-in triple (`-AUTH_LOGIN/-AUTH_PASSWORD/-AUTH_TYPE`) is not - * here: the exchange code lives minutes, so the launcher .bat takes it from a file the app writes - * right before a launch (StoreLaunch.prepare). - * - * The EOS overlay is never provisioned: nothing points the game's EOS SDK at an overlay component. - */ -object EpicLaunchData { - private const val TAG = "EpicLaunch" - - /** The static launch arguments for [appName] in [namespace]. Blocking: one catalog call for the extra flags. */ - fun arguments(context: Context, token: String?, appName: String, namespace: String, catalogItemId: String, deploymentId: String): List<String> { - val creds = EpicCredentialStore.load(context) - val displayName = creds?.displayName?.takeIf { it.isNotEmpty() } ?: "EpicUser" - val accountId = creds?.accountId?.takeIf { it.isNotEmpty() } ?: "0" - val args = ArrayList<String>() - args += "-EpicPortal" - args += "-epicusername=\"${sanitize(displayName).replace("\"", "")}\"" - args += "-epicuserid=${sanitize(accountId)}" - args += "-epicsandboxid=${sanitize(namespace)}" - args += "-epiclocale=${EpicInstallTags.localeCodeForDevice()}" - args += "-epicapp=${sanitize(appName)}" - args += "-epicenv=Prod" - if (deploymentId.isNotEmpty()) args += "-epicdeploymentid=${sanitize(deploymentId)}" - if (token != null && catalogItemId.isNotEmpty()) { - val extra = EpicApiClient.getAdditionalCommandLine(token, namespace, catalogItemId) - if (!extra.isNullOrBlank()) { - val clean = extra.filter { it >= ' ' && it != '\u007f' }.trim() - if (clean.isNotEmpty()) { args += clean; Log.i(TAG, "$appName: extra command line present") } - } - } - return args - } - - /** The sidecar's identifiers the launcher reads back. */ - fun extras(appName: String, namespace: String, catalogItemId: String, deploymentId: String): Map<String, String> = buildMap { - put("appName", appName); put("namespace", namespace); put("catalogItemId", catalogItemId) - if (deploymentId.isNotEmpty()) put("deploymentId", deploymentId) - } - - /** True when [sidecar] is an Epic install that can take a sign-in code. */ - fun wantsExchangeCode(sidecar: StoreGameSidecar): Boolean = sidecar.store == com.droiddeck.launcher.stores.Store.EPIC - - private fun sanitize(s: String): String = s.replace("\n", "").replace("\r", "").replace("\u0000", "") -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLibrary.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLibrary.kt index 5b623828c1..be665881b8 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLibrary.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLibrary.kt @@ -1,119 +1,180 @@ package com.droiddeck.launcher.stores.epic import android.content.Context -import android.content.SharedPreferences -import android.util.Log +import com.droiddeck.launcher.R import com.droiddeck.launcher.stores.CatalogItem import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.cleanStoreText import org.json.JSONArray import org.json.JSONObject +import java.net.URLEncoder import java.util.concurrent.atomic.AtomicBoolean -/** - * The signed-in account's Epic library: the library service's records, each enriched from the - * catalog (title, art, DLC flag), cached so the tab paints at once and re-synced when forced or - * 15 minutes stale. DLC entries are folded away under their base game. Ported from Bannerlator's - * EpicLibraryRepo. - */ +data class EpicGame( + val appName: String, + val namespace: String, + val catalogItemId: String, + val title: String, + val artCover: String = "", + val artSquare: String = "", + val developer: String = "", + val description: String = "", + val version: String = "", + val installSize: Long = 0L, + val canRunOffline: Boolean = true, + val releaseDate: String = "", + val publisher: String = "", + val isDlc: Boolean = false, +) + object EpicLibrary { - private const val TAG = "EpicLibrary" - private const val CACHE_KEY = "library_cache" - private const val LAST_SYNC_KEY = "library_synced_at" - private const val THROTTLE_MS = 6L * 60L * 60L * 1000L + const val KEY_CACHE = "library_cache" + const val KEY_SYNCED_AT = "library_synced_at" + private const val THROTTLE_MS = 6 * 60 * 60 * 1000L + private const val MAX_SIZE = 1L shl 40 - private val syncing = AtomicBoolean(false) - - sealed interface SyncResult { - class Ok(val games: List<EpicGame>) : SyncResult - class Failed(val message: String) : SyncResult - object NotLoggedIn : SyncResult - object Busy : SyncResult - object Throttled : SyncResult + sealed class SyncResult { + class Ok(val games: List<EpicGame>) : SyncResult() + class Failed(val message: String) : SyncResult() + object NotLoggedIn : SyncResult() + object Throttled : SyncResult() + object Busy : SyncResult() } - fun cached(context: Context): List<EpicGame> { - val json = EpicPrefs.get(context).getString(CACHE_KEY, null) ?: return emptyList() - return runCatching { - val arr = JSONArray(json) - val list = ArrayList<EpicGame>(arr.length()) - for (i in 0 until arr.length()) { - val j = arr.optJSONObject(i) ?: continue - val g = EpicGame() - g.appName = j.optString("appName", ""); g.namespace = j.optString("namespace", ""); g.catalogItemId = j.optString("catalogItemId", "") - g.title = j.optString("title", ""); g.artCover = j.optString("artCover", ""); g.artSquare = j.optString("artSquare", "") - g.developer = j.optString("developer", ""); g.description = j.optString("description", ""); g.version = j.optString("version", "") - g.installSize = j.optLong("installSize", 0L).let { if (it > 1_099_511_627_776L) 0L else it } - g.canRunOffline = j.optBoolean("canRunOffline", true) - if (g.appName.isNotEmpty()) list.add(g) - } - list.distinctBy { it.appName }.sortedBy { it.title.lowercase() } - }.getOrDefault(emptyList()) + private val running = AtomicBoolean(false) + + fun toCacheJson(games: List<EpicGame>): String = JSONArray().apply { + for (g in games) put( + JSONObject() + .put("appName", g.appName).put("namespace", g.namespace).put("catalogItemId", g.catalogItemId) + .put("title", g.title).put("artCover", g.artCover).put("artSquare", g.artSquare) + .put("developer", g.developer).put("description", g.description).put("version", g.version) + .put("installSize", g.installSize).put("canRunOffline", g.canRunOffline) + .put("releaseDate", g.releaseDate).put("publisher", g.publisher), + ) + }.toString() + + fun fromCacheJson(text: String?): List<EpicGame> { + if (text.isNullOrBlank()) return emptyList() + val array = runCatching { JSONArray(text) }.getOrNull() ?: return emptyList() + val games = (0 until array.length()).mapNotNull { array.optJSONObject(it) }.mapNotNull { o -> + val appName = o.optString("appName", "").ifEmpty { return@mapNotNull null } + EpicGame( + appName = appName, + namespace = o.optString("namespace", ""), + catalogItemId = o.optString("catalogItemId", ""), + title = o.optString("title", "").ifEmpty { appName }, + artCover = o.optString("artCover", ""), + artSquare = o.optString("artSquare", ""), + developer = o.optString("developer", ""), + description = o.optString("description", ""), + version = o.optString("version", ""), + installSize = o.optLong("installSize", 0L).takeIf { it in 0..MAX_SIZE } ?: 0L, + canRunOffline = o.optBoolean("canRunOffline", true), + releaseDate = o.optString("releaseDate", ""), + publisher = o.optString("publisher", ""), + ) + } + return tidy(games) } - /** Remembers a game's install size once the manifest said it, for the Install button. */ - fun rememberSize(context: Context, appName: String, bytes: Long) { - if (bytes <= 0) return - val p = EpicPrefs.get(context) - p.edit().putLong("size_$appName", bytes).apply() + private fun tidy(games: List<EpicGame>): List<EpicGame> = + games.distinctBy { it.appName }.sortedBy { it.title.lowercase() } + + fun cached(context: Context): List<EpicGame> = fromCacheJson(EpicPrefs.get(context).getString(KEY_CACHE, null)) + + fun forget(context: Context) { + EpicPrefs.get(context).edit().remove(KEY_CACHE).remove(KEY_SYNCED_AT).apply() } - fun sync(context: Context, force: Boolean = false, onStatus: (String) -> Unit = {}): SyncResult { - if (!syncing.compareAndSet(false, true)) return SyncResult.Busy + fun toCatalogItem(context: Context, game: EpicGame): CatalogItem { + val prefs = EpicPrefs.get(context) + val wide = game.artSquare.ifEmpty { null } + val tall = game.artCover.ifEmpty { null } + val title = game.title.ifEmpty { game.appName } + return CatalogItem( + store = Store.EPIC, + id = game.appName, + title = title, + imageUrl = wide ?: tall, + tallImageUrl = tall ?: wide, + developer = game.developer, + publisher = game.publisher, + releaseDate = game.releaseDate.ifEmpty { prefs.getString("release_${game.appName}", "").orEmpty() }, + description = cleanStoreText(game.description), + owned = true, + sizeBytes = prefs.getLong("size_${game.appName}", 0L).takeIf { it > 0 } ?: game.installSize, + storeUrl = "https://store.epicgames.com/en-US/browse?q=" + URLEncoder.encode(title, "UTF-8"), + extra = mapOf("namespace" to game.namespace, "catalogItemId" to game.catalogItemId, "version" to game.version), + ) + } + + internal fun gameFrom(record: JSONObject, details: JSONObject?, before: EpicGame?): EpicGame { + val appName = record.optString("appName") + val d = details ?: JSONObject() + fun pick(key: String, fallback: String) = d.optString(key, "").ifEmpty { fallback } + return EpicGame( + appName = appName, + namespace = record.optString("namespace"), + catalogItemId = record.optString("catalogItemId"), + title = pick("title", before?.title?.takeIf { it != appName } ?: appName), + artCover = pick("tall", before?.artCover.orEmpty()), + artSquare = pick("wide", before?.artSquare.orEmpty()), + developer = pick("developer", before?.developer.orEmpty()), + description = pick("description", before?.description.orEmpty()), + version = before?.version.orEmpty(), + installSize = before?.installSize ?: 0L, + canRunOffline = if (details != null) d.optBoolean("canRunOffline", true) else before?.canRunOffline ?: true, + releaseDate = pick("releaseDate", before?.releaseDate.orEmpty()), + publisher = pick("publisher", before?.publisher.orEmpty()), + isDlc = d.optBoolean("dlc", false), + ) + } + + internal fun visible(games: List<EpicGame>): List<EpicGame> { + val base = games.filterNot { it.isDlc } + return tidy(if (base.isEmpty()) games else base) + } + + fun sync(context: Context, force: Boolean, status: (String) -> Unit): SyncResult { + if (!running.compareAndSet(false, true)) return SyncResult.Busy try { val app = context.applicationContext - val p = EpicPrefs.get(app) - val cachedList = cached(app) - val lastSync = p.getLong(LAST_SYNC_KEY, 0L) - if (!force && cachedList.isNotEmpty() && System.currentTimeMillis() - lastSync < THROTTLE_MS) return SyncResult.Throttled - onStatus("Checking sign-in…") + val prefs = EpicPrefs.get(app) + val cache = cached(app) + status(app.getString(R.string.stores_sync_sign_in)) + if (!EpicCredentialStore.isLoggedIn(app)) return SyncResult.NotLoggedIn + val syncedAt = prefs.getLong(KEY_SYNCED_AT, 0L) + if (!force && cache.isNotEmpty() && System.currentTimeMillis() - syncedAt in 0 until THROTTLE_MS) return SyncResult.Throttled val token = EpicCredentialStore.getValidAccessToken(app) ?: return SyncResult.NotLoggedIn - onStatus("Fetching game list…") - val raw = EpicApiClient.getLibraryItems(token) - if (raw.isNullOrEmpty()) return if (cachedList.isEmpty()) SyncResult.Failed("No games found in your Epic library") else SyncResult.Ok(cachedList) - val total = raw.size - var done = 0 - for (game in raw) { - EpicApiClient.enrichFromCatalog(token, game) - if (game.releaseDate.isNotEmpty()) p.edit().putString("release_${game.appName}", game.releaseDate).apply() - done++ - if (done % 5 == 0) onStatus("Loading game details… ($done/$total)") + + status(app.getString(R.string.stores_sync_game_list)) + val answer = EpicNative.call("library.owned", JSONObject().put("accessToken", token)) + ?: return SyncResult.Failed(app.getString(R.string.stores_sync_failed)) + if (answer.optBoolean("signIn", false)) return SyncResult.NotLoggedIn + if (answer.has("error")) return SyncResult.Failed(answer.optString("error").ifEmpty { app.getString(R.string.stores_sync_failed) }) + val records = answer.optJSONArray("records") ?: JSONArray() + if (records.length() == 0) { + return if (cache.isNotEmpty()) SyncResult.Ok(cache) + else SyncResult.Failed(app.getString(R.string.stores_sync_no_games, Store.EPIC.label)) } - val main = raw.filter { !it.isDLC } - val display = (if (main.isEmpty()) raw else main).distinctBy { it.appName }.sortedWith { a, b -> a.title.compareTo(b.title, ignoreCase = true) } - for (fresh in display) { - val old = cachedList.firstOrNull { it.appName == fresh.appName } ?: continue - fresh.version = old.version - fresh.installSize = old.installSize + + val before = cache.associateBy { it.appName } + val total = records.length() + val games = ArrayList<EpicGame>(total) + for (i in 0 until total) { + val record = records.optJSONObject(i) ?: continue + if (i % 5 == 0) status(app.getString(R.string.stores_sync_details, i, total)) + val details = EpicApiClient.catalogDetails(token, record.optString("namespace"), record.optString("catalogItemId")) + games += gameFrom(record, details, before[record.optString("appName")]) } - saveCache(p, display) - p.edit().putLong(LAST_SYNC_KEY, System.currentTimeMillis()).apply() - Log.i(TAG, "sync: raw=${raw.size} shown=${display.size}") - return SyncResult.Ok(display) + val shown = visible(games) + prefs.edit().putString(KEY_CACHE, toCacheJson(shown)).putLong(KEY_SYNCED_AT, System.currentTimeMillis()).apply() + return SyncResult.Ok(shown) } catch (e: Exception) { - Log.w(TAG, "sync failed: ${e.message}") - return SyncResult.Failed(e.message ?: "Sync failed") + return SyncResult.Failed(e.message ?: context.getString(R.string.stores_sync_failed)) } finally { - syncing.set(false) + running.set(false) } } - - private fun saveCache(prefs: SharedPreferences, games: List<EpicGame>) { - runCatching { - val arr = JSONArray() - for (g in games) arr.put(JSONObject().put("appName", g.appName).put("namespace", g.namespace).put("catalogItemId", g.catalogItemId) - .put("title", g.title).put("artCover", g.artCover).put("artSquare", g.artSquare).put("developer", g.developer) - .put("description", g.description).put("version", g.version).put("installSize", g.installSize).put("canRunOffline", g.canRunOffline)) - prefs.edit().putString(CACHE_KEY, arr.toString()).apply() - } - } - - fun toCatalogItem(context: Context, g: EpicGame): CatalogItem = CatalogItem( - store = Store.EPIC, id = g.appName, title = g.title.ifBlank { g.appName }, - imageUrl = g.artSquare.ifBlank { null } ?: g.artCover.ifBlank { null }, - tallImageUrl = g.artCover.ifBlank { null } ?: g.artSquare.ifBlank { null }, - developer = g.developer, description = com.droiddeck.launcher.stores.cleanStoreText(g.description), owned = true, - sizeBytes = EpicPrefs.get(context).getLong("size_${g.appName}", g.installSize), - storeUrl = "https://store.epicgames.com/en-US/browse?q=${java.net.URLEncoder.encode(g.title, "UTF-8")}", - extra = mapOf("namespace" to g.namespace, "catalogItemId" to g.catalogItemId, "version" to (g.version ?: "")), - ) } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLogin.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLogin.kt new file mode 100644 index 0000000000..ff804a85e3 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicLogin.kt @@ -0,0 +1,49 @@ +package com.droiddeck.launcher.stores.epic + +import android.util.Log +import android.webkit.WebView +import com.droiddeck.launcher.R +import com.droiddeck.launcher.stores.StoreLoginActivity +import org.json.JSONObject + +internal class EpicLogin private constructor( + override val startUrl: String, + override val userAgent: String, + private val redirectPrefix: String, +) : StoreLoginActivity.Flow { + override val readsPage: Boolean get() = true + + override fun isRedirect(url: String): Boolean = url.startsWith(redirectPrefix) + + override fun finish(activity: StoreLoginActivity, view: WebView, url: String): String? { + val code = EpicNative.call("auth.codeFromPage", JSONObject().put("text", url))?.optString("code", "").orEmpty() + if (code.isEmpty()) { + Log.w(TAG, "the redirect page carried no authorization code") + return activity.getString(R.string.stores_login_error_verification) + } + val answer = EpicNative.call("auth.signIn", JSONObject().put("code", code)) + val tokens = answer?.let(EpicCredentialStore.TokenResult::from) + if (tokens == null) { + Log.w(TAG, "code exchange failed: ${answer?.optString("error").orEmpty().ifEmpty { "no answer" }}") + return activity.getString(R.string.stores_login_error_generic) + } + return try { + EpicCredentialStore.save(activity, tokens, merge = false) + null + } catch (e: Exception) { + Log.w(TAG, "saving the sign-in failed: ${e.javaClass.simpleName}") + activity.getString(R.string.stores_login_error_generic) + } + } + + companion object { + private const val TAG = "EpicLogin" + + fun create(): StoreLoginActivity.Flow? { + val config = EpicNative.call("auth.config") ?: return null + val start = config.optString("startUrl").ifEmpty { return null } + val prefix = config.optString("redirectPrefix").ifEmpty { return null } + return EpicLogin(start, config.optString("webViewUserAgent"), prefix) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicNative.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicNative.kt index 59849fd605..2cf02a3bb8 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicNative.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicNative.kt @@ -1,117 +1,130 @@ -// JNI symbols depend on this package path and class name (app/src/main/rust/stores/JNI.md). package com.droiddeck.launcher.stores.epic import android.util.Log +import com.droiddeck.launcher.BuildConfig import com.droiddeck.launcher.stores.StoresNative +import org.json.JSONObject import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean -import java.util.concurrent.atomic.AtomicReference -/** - * The native half of an Epic install in `libdroiddeckstores.so`: [run] fills the chunk cache with - * verified, decompressed chunks for the files the manager says are pending, [assemble] writes those - * files from the cache. Everything around them (manifest, install tags, delta pass, post-install) - * stays in the manager. - * - * The cache is `<installDir>/.chunks` when `chunkCacheDir` is `""`, else the scratch folder given - - * the app's own cache when the game installs to a card, where the assembler drops each chunk right - * after its last use and the folder at the end. Both calls take the same value for one install. - * - * Both block like the Java loops they replace and poll [AtomicBoolean] `cancel` every 250 ms: on - * cancel they flip the native flag, wait up to 5 s for the run to wind down, then return. - */ object EpicNative { private const val TAG = "EpicNative" + private const val CANCEL_POLL_MS = 250L - /** Callbacks from a native run; every method is called on a native thread. One interface serves both runs. */ - interface Listener { - /** Fetch only, once before any fetch: the plan the engine derived (the manager cross-checks it). */ - fun onPlan(chunksTotal: Int, bytesTotal: Long, chunkDir: String) - /** Fetch: per accounted chunk (cached-skip or fetched), done/total = chunks. Assembly: per file written, done/total = files. */ - fun onProgress(bytesDone: Long, bytesTotal: Long, done: Int, total: Int) - /** Engine log line (already in logcat under `EpicNative`). */ - fun onLog(line: String) - /** Terminal. Fetch: bytes credited; assembly: bytes written. */ - fun onComplete(success: Boolean, error: String, bytes: Long) - } + @Volatile private var configured = false - /** Outcome of a run. `started == false`: nothing happened on disk, the caller runs its own loop. */ - class Result( - @JvmField val started: Boolean, @JvmField val success: Boolean, @JvmField val cancelled: Boolean, - @JvmField val error: String, @JvmField val bytes: Long, @JvmField val done: Int, @JvmField val total: Int, - ) - - private class Completion(val success: Boolean, val error: String, val bytes: Long) - - /** The fetch: chunks for [pendingFileIdx] into the cache. */ - @JvmStatic - fun run( - manifest: ByteArray, installDir: String, chunkCacheDir: String, cdnPrefixes: Array<String>, pendingFileIdx: IntArray, expectedChunks: Int, expectedBytes: Long, - caBundlePath: String, maxWorkers: Int, processWorkers: Int, cancel: AtomicBoolean?, listener: Listener, - ): Result = drive("nativeStart", cancel, listener) { inner -> - nativeStart(manifest, installDir, chunkCacheDir, cdnPrefixes, pendingFileIdx, expectedChunks, expectedBytes, caBundlePath, maxWorkers, processWorkers, inner) - } - - /** The assembly: the files [fileIdx] written from the cache, the cache removed on success. */ - @JvmStatic - fun assemble(manifest: ByteArray, installDir: String, chunkCacheDir: String, fileIdx: IntArray, cancel: AtomicBoolean?, listener: Listener): Result = - drive("nativeAssemble", cancel, listener) { inner -> nativeAssemble(manifest, installDir, chunkCacheDir, fileIdx, inner) } - - private fun drive(what: String, cancel: AtomicBoolean?, listener: Listener, start: (Listener) -> Long): Result { - if (!StoresNative.ensureLoaded()) return Result(false, false, false, "engine not built", 0L, 0, 0) - val latch = CountDownLatch(1) - val completion = AtomicReference<Completion?>(null) - val doneRef = AtomicReference(0) - val totalRef = AtomicReference(0) - val inner = object : Listener { - override fun onPlan(chunksTotal: Int, bytesTotal: Long, chunkDir: String) { totalRef.set(chunksTotal); listener.onPlan(chunksTotal, bytesTotal, chunkDir) } - override fun onProgress(bytesDone: Long, bytesTotal: Long, done: Int, total: Int) { doneRef.set(done); totalRef.set(total); listener.onProgress(bytesDone, bytesTotal, done, total) } - override fun onLog(line: String) = listener.onLog(line) - override fun onComplete(success: Boolean, error: String, bytes: Long) { - completion.set(Completion(success, error, bytes)) - latch.countDown() - runCatching { listener.onComplete(success, error, bytes) } + fun ready(): Boolean { + if (!StoresNative.ensureLoaded()) return false + if (!configured) synchronized(this) { + if (!configured) { + runCatching { nativeConfigure(BuildConfig.VERSION_NAME) } + .onFailure { Log.w(TAG, "configure: ${it.javaClass.simpleName}") } + configured = true } } - val handle: Long = try { - start(inner) + return true + } + + fun call(op: String, request: JSONObject = JSONObject()): JSONObject? { + if (!ready()) return null + val text = try { + nativeCall(op, request.toString()) } catch (t: Throwable) { - Log.w(TAG, "engine unavailable: ${t.javaClass.simpleName}: ${t.message}") - return Result(false, false, false, "$what: ${t.javaClass.simpleName}", 0L, 0, 0) + Log.w(TAG, "$op: ${t.javaClass.simpleName}") + null + } ?: return null + return runCatching { JSONObject(text) }.getOrNull() + } + + fun fetch(op: String, request: JSONObject): ByteArray? { + if (!ready()) return null + return try { + nativeFetch(op, request.toString()) + } catch (t: Throwable) { + Log.w(TAG, "$op: ${t.javaClass.simpleName}") + null } - if (handle == 0L) return Result(false, false, false, completion.get()?.error ?: "not started", 0L, 0, totalRef.get()) - var cancelSent = false + } + + fun send(op: String, request: JSONObject, body: ByteArray): JSONObject? { + if (!ready()) return null + val text = try { + nativeSend(op, request.toString(), body) + } catch (t: Throwable) { + Log.w(TAG, "$op: ${t.javaClass.simpleName}") + null + } ?: return null + return runCatching { JSONObject(text) }.getOrNull() + } + + fun inspect(manifest: ByteArray, request: JSONObject): JSONObject? { + if (!ready()) return null + val text = try { + nativeInspect(manifest, request.toString()) + } catch (t: Throwable) { + Log.w(TAG, "inspect: ${t.javaClass.simpleName}") + null + } ?: return null + return runCatching { JSONObject(text) }.getOrNull() + } + + interface InstallListener { + fun onStatus(text: String) + fun onCheck(doneBytes: Long, totalBytes: Long, files: Int, filesTotal: Int) + fun onSizes(pendingBytes: Long, diskBytes: Long) + fun onProgress(written: Long, total: Long, files: Int, filesTotal: Int) + fun onInstall(done: Long, total: Long, files: Int, filesTotal: Int) + fun onLog(line: String) + fun beforeReplace(): Boolean + fun onComplete(success: Boolean, cancelled: Boolean, error: String, result: String) + } + + class InstallOutcome(val success: Boolean, val cancelled: Boolean, val error: String, val result: JSONObject?) + + fun install(request: JSONObject, events: InstallListener, cancelled: AtomicBoolean): InstallOutcome { + if (!ready()) return InstallOutcome(false, false, "Native Epic install failed: the store engine is not available", null) + val done = CountDownLatch(1) + val holder = arrayOfNulls<InstallOutcome>(1) + val bridge = object : InstallListener by events { + override fun onComplete(success: Boolean, cancelled: Boolean, error: String, result: String) { + holder[0] = InstallOutcome(success, cancelled, error, result.takeIf { it.isNotEmpty() }?.let { runCatching { JSONObject(it) }.getOrNull() }) + done.countDown() + } + } + val handle = try { + nativeInstall(request.toString(), bridge) + } catch (t: Throwable) { + return InstallOutcome(false, false, "Native Epic install failed: ${t.javaClass.simpleName}", null) + } + if (handle == 0L) return holder[0] ?: InstallOutcome(false, false, "Native Epic install failed: the install could not start", null) try { - while (!latch.await(250, TimeUnit.MILLISECONDS)) { - if (cancel != null && cancel.get()) { + var forwarded = false + while (true) { + val finished = try { + done.await(CANCEL_POLL_MS, TimeUnit.MILLISECONDS) + } catch (e: InterruptedException) { + cancelled.set(true) + false + } + if (finished) break + if (!forwarded && cancelled.get()) { nativeCancel(handle) - cancelSent = true - latch.await(5, TimeUnit.SECONDS) - break + forwarded = true } } } finally { nativeRelease(handle) } - val c = completion.get() - val success = !cancelSent && c != null && c.success - val error = when { cancelSent -> "cancelled"; c == null -> "no completion"; else -> c.error } - return Result(true, success, cancelSent, error, c?.bytes ?: 0L, doneRef.get(), totalRef.get()) + return holder[0] ?: InstallOutcome(false, false, "Native Epic install failed: no result", null) } - @JvmStatic - private external fun nativeStart( - manifest: ByteArray, installDir: String, chunkCacheDir: String, cdnPrefixes: Array<String>, pendingFileIdx: IntArray, expectedChunks: Int, expectedBytes: Long, - caBundlePath: String, maxWorkers: Int, processWorkers: Int, listener: Listener, - ): Long - - @JvmStatic - private external fun nativeAssemble(manifest: ByteArray, installDir: String, chunkCacheDir: String, fileIdx: IntArray, listener: Listener): Long - - @JvmStatic - private external fun nativeCancel(handle: Long) - - @JvmStatic - private external fun nativeRelease(handle: Long) + @JvmStatic private external fun nativeConfigure(appVersion: String) + @JvmStatic private external fun nativeCall(op: String, request: String): String? + @JvmStatic private external fun nativeFetch(op: String, request: String): ByteArray? + @JvmStatic private external fun nativeSend(op: String, request: String, body: ByteArray): String? + @JvmStatic private external fun nativeInspect(manifest: ByteArray, request: String): String? + @JvmStatic private external fun nativeInstall(request: String, listener: InstallListener): Long + @JvmStatic private external fun nativeCancel(handle: Long) + @JvmStatic private external fun nativeRelease(handle: Long) } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicPrefs.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicPrefs.kt index ae2bfadb34..e1556aaa58 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicPrefs.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicPrefs.kt @@ -3,12 +3,9 @@ package com.droiddeck.launcher.stores.epic import android.content.Context import android.content.SharedPreferences -/** - * Epic's own records that are not credentials: the library cache, each game's release date, the - * cached deployment id and extra command line a launch needs. App-private preferences; the sign-in - * lives in StoreAccounts. Public: the Java clients read it too. - */ object EpicPrefs { + const val FILE = "stores.epic" + @JvmStatic - fun get(context: Context): SharedPreferences = context.applicationContext.getSharedPreferences("stores.epic", Context.MODE_PRIVATE) + fun get(context: Context): SharedPreferences = context.applicationContext.getSharedPreferences(FILE, Context.MODE_PRIVATE) } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicSaveSync.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicSaveSync.kt new file mode 100644 index 0000000000..b23dfbc132 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicSaveSync.kt @@ -0,0 +1,45 @@ +package com.droiddeck.launcher.stores.epic + +import com.droiddeck.launcher.stores.CloudFile +import org.json.JSONArray +import org.json.JSONObject +import java.io.IOException + +object EpicSaveSync { + private fun base(token: String, accountId: String, appName: String) = + JSONObject().put("accessToken", token).put("accountId", accountId).put("appName", appName) + + fun list(token: String, accountId: String, appName: String): List<CloudFile> { + val answer = EpicNative.call("cloud.list", base(token, accountId, appName)) ?: throw IOException("Epic cloud is unavailable") + if (answer.has("error")) throw IOException(answer.optString("error")) + val files = answer.optJSONArray("files") ?: return emptyList() + return (0 until files.length()).mapNotNull { files.optJSONObject(it) }.map { f -> + CloudFile( + f.optString("name"), + f.optLong("modified", -1L), + md5 = f.optString("hash").ifEmpty { null }, + readLink = f.optString("readLink").ifEmpty { null }, + ) + } + } + + fun read(file: CloudFile): Pair<ByteArray, Long> { + val link = file.readLink ?: throw IOException("no download link for ${file.name}") + val bytes = EpicNative.fetch("cloud.read", JSONObject().put("url", link)) ?: throw IOException("Epic cloud download failed") + return bytes to file.modifiedMs + } + + fun write(token: String, accountId: String, appName: String, files: Map<String, ByteArray>): Map<String, Long> { + if (files.isEmpty()) return emptyMap() + val answer = EpicNative.call("cloud.writeLinks", base(token, accountId, appName).put("names", JSONArray(files.keys.toList()))) + ?: throw IOException("Epic cloud is unavailable") + if (answer.has("error")) throw IOException(answer.optString("error")) + val links = answer.optJSONObject("links") ?: JSONObject() + return files.mapValues { (name, data) -> + val link = links.optString(name, "").ifEmpty { throw IOException("no upload link for $name") } + val sent = EpicNative.send("cloud.write", JSONObject().put("url", link), data) ?: throw IOException("Epic cloud upload failed") + if (sent.has("error")) throw IOException(sent.optString("error")) + -1L + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicSaveTemplate.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicSaveTemplate.kt new file mode 100644 index 0000000000..41af522d82 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicSaveTemplate.kt @@ -0,0 +1,31 @@ +package com.droiddeck.launcher.stores.epic + +object EpicSaveTemplate { + enum class Root { INSTALL_DIR, USER_PROFILE, DOCUMENTS, SAVED_GAMES, LOCAL_APPDATA, ROAMING_APPDATA } + + class Parsed(val root: Root, val rest: String) + + private val ROOTS = mapOf( + "installdir" to Root.INSTALL_DIR, + "userprofile" to Root.USER_PROFILE, + "userdir" to Root.DOCUMENTS, + "usersavedgames" to Root.SAVED_GAMES, + "appdata" to Root.LOCAL_APPDATA, + "localappdata" to Root.LOCAL_APPDATA, + "roamingappdata" to Root.ROAMING_APPDATA, + ) + + private val LEAD = Regex("^\\{([A-Za-z]+)\\}") + private val EPIC_ID = Regex("\\{EpicId\\}", RegexOption.IGNORE_CASE) + private val APP_NAME = Regex("\\{AppName\\}", RegexOption.IGNORE_CASE) + + fun parse(template: String, accountId: String, appName: String): Parsed? { + val norm = template.replace('\\', '/').trim() + val match = LEAD.find(norm) ?: return null + val root = ROOTS[match.groupValues[1].lowercase()] ?: return null + val rest = norm.substring(match.value.length) + .replace(EPIC_ID) { accountId } + .replace(APP_NAME) { appName } + return Parsed(root, rest) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicShelves.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicShelves.kt new file mode 100644 index 0000000000..b0dc3c0afe --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicShelves.kt @@ -0,0 +1,118 @@ +package com.droiddeck.launcher.stores.epic + +import android.content.Context +import com.droiddeck.launcher.stores.CatalogItem +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreShelves +import com.droiddeck.launcher.stores.cleanStoreText +import com.droiddeck.launcher.stores.matureByTags +import org.json.JSONArray +import org.json.JSONObject +import java.util.Locale + +object EpicShelves { + const val KEY_FEATURED = "store_featured" + const val KEY_FEATURED_AT = "store_featured_at" + private const val FRESH_MS = 3 * 60 * 60 * 1000L + private val SHELF_KEYS = listOf("new", "deals", "free", "trending") + + @Volatile private var memory: StoreShelves? = null + @Volatile private var memoryAt = 0L + + private fun fresh(at: Long) = System.currentTimeMillis() - at in 0 until FRESH_MS + + fun itemFrom(o: JSONObject): CatalogItem? { + val id = o.optString("id", "").ifEmpty { return null } + val title = o.optString("title", "").ifEmpty { return null } + val extra = LinkedHashMap<String, String>() + o.optJSONObject("extra")?.let { e -> e.keys().forEach { k -> extra[k] = e.optString(k) } } + val mature = if (o.has("mature")) o.optBoolean("mature") else { + val tags = o.optJSONArray("allTags") + matureByTags(List(tags?.length() ?: 0) { tags!!.optString(it) }) + } + return CatalogItem( + store = Store.EPIC, id = id, title = title, + imageUrl = o.optString("image", "").ifEmpty { null }, + tallImageUrl = o.optString("tall", "").ifEmpty { null }, + tags = o.optString("tags", ""), + isFree = o.optBoolean("free", false), + hasPrice = o.optBoolean("hasPrice", false), + finalPrice = o.optString("final", ""), + originalPrice = o.optString("orig", ""), + discountPercent = o.optInt("disc", 0), + storeUrl = o.optString("url", ""), + developer = o.optString("dev", ""), + publisher = o.optString("pub", ""), + releaseDate = o.optString("rel", ""), + description = cleanStoreText(o.optString("desc", "")), + extra = extra, + mature = mature, + ) + } + + fun itemJson(i: CatalogItem): JSONObject = JSONObject() + .put("id", i.id).put("title", i.title).put("image", i.imageUrl ?: "").put("tall", i.tallImageUrl ?: "") + .put("tags", i.tags).put("free", i.isFree).put("hasPrice", i.hasPrice).put("final", i.finalPrice) + .put("orig", i.originalPrice).put("disc", i.discountPercent).put("url", i.storeUrl).put("dev", i.developer) + .put("pub", i.publisher).put("rel", i.releaseDate).put("desc", i.description) + .put("extra", JSONObject(i.extra as Map<*, *>)).put("mature", i.mature) + + fun fromJson(text: String?): StoreShelves? { + if (text.isNullOrBlank()) return null + val o = runCatching { JSONObject(text) }.getOrNull() ?: return null + fun shelf(key: String): List<CatalogItem> { + val a = o.optJSONArray(key) ?: return emptyList() + return (0 until a.length()).mapNotNull { a.optJSONObject(it) }.mapNotNull(::itemFrom).distinctBy { it.id } + } + val art = o.optJSONArray("art")?.let { a -> List(a.length()) { a.optString(it) }.filter { it.isNotEmpty() } }.orEmpty() + val s = StoreShelves(shelf("new"), shelf("deals"), shelf("free"), shelf("trending"), art) + return if (s.isEmpty && art.isEmpty()) null else s + } + + fun toJson(s: StoreShelves): String = JSONObject().apply { + listOf(s.whatsNew, s.deals, s.free, s.trending).zip(SHELF_KEYS).forEach { (items, key) -> + put(key, JSONArray().apply { items.forEach { put(itemJson(it)) } }) + } + put("art", JSONArray(s.art)) + }.toString() + + fun cached(context: Context): StoreShelves? = + memory ?: fromJson(EpicPrefs.get(context).getString(KEY_FEATURED, null))?.also { memory = it } + + fun featured(context: Context, force: Boolean): StoreShelves? { + val prefs = EpicPrefs.get(context) + if (!force) { + memory?.takeIf { fresh(memoryAt) }?.let { return it } + if (fresh(prefs.getLong(KEY_FEATURED_AT, 0L))) fromJson(prefs.getString(KEY_FEATURED, null))?.let { + memory = it; memoryAt = prefs.getLong(KEY_FEATURED_AT, 0L); return it + } + } + val country = Locale.getDefault().country.takeIf { it.length == 2 && it.all(Char::isLetter) }?.uppercase() ?: "US" + val answer = EpicNative.call("shop.shelves", JSONObject().put("country", country)) + val shelves = fromJson(answer?.toString()) + if (shelves == null) return fromJson(prefs.getString(KEY_FEATURED, null)) + val now = System.currentTimeMillis() + prefs.edit().putString(KEY_FEATURED, toJson(shelves)).putLong(KEY_FEATURED_AT, now).apply() + memory = shelves + memoryAt = now + return shelves + } + + fun markOwned(s: StoreShelves, library: List<CatalogItem>?): StoreShelves { + if (library.isNullOrEmpty()) return s + val byCatalogId = HashMap<String, CatalogItem>() + for (item in library) item.extra["catalogItemId"]?.takeIf { it.isNotEmpty() }?.let { byCatalogId[it] = item } + fun mark(list: List<CatalogItem>) = list.map { shelf -> + val owned = shelf.extra["items"].orEmpty().split(',').map { it.trim() }.firstNotNullOfOrNull { byCatalogId[it] } + ?: return@map shelf + owned.copy( + imageUrl = shelf.imageUrl ?: owned.imageUrl, + tallImageUrl = shelf.tallImageUrl ?: owned.tallImageUrl, + developer = owned.developer.ifBlank { shelf.developer }, + publisher = owned.publisher.ifBlank { shelf.publisher }, + releaseDate = owned.releaseDate.ifBlank { shelf.releaseDate }, + ) + } + return StoreShelves(mark(s.whatsNew), mark(s.deals), mark(s.free), mark(s.trending), s.art) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicStoreCatalog.kt b/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicStoreCatalog.kt deleted file mode 100644 index 6d4f2d95c5..0000000000 --- a/app/src/main/java/com/droiddeck/launcher/stores/epic/EpicStoreCatalog.kt +++ /dev/null @@ -1,225 +0,0 @@ -package com.droiddeck.launcher.stores.epic - -import android.content.Context -import android.util.Log -import com.droiddeck.launcher.stores.CatalogItem -import com.droiddeck.launcher.stores.Store -import com.droiddeck.launcher.stores.StoreNet -import com.droiddeck.launcher.stores.StoreShelves -import org.json.JSONArray -import org.json.JSONObject -import java.text.SimpleDateFormat -import java.util.Date -import java.util.Locale -import java.util.TimeZone -import java.util.concurrent.ConcurrentHashMap - -/** - * The Epic Games Store catalog through the GraphQL endpoint the store website uses - * (`store.epicgames.com/graphql`, which wants a browser User-Agent): `Catalog.searchStore` with - * the base-game category, sorted by price / release date / relevance, on sale or free. Elements - * carry the offer id, the namespace, the catalog item ids (what the library records, so ownership - * is matched on those), key images and pre-formatted prices. "Free this week" comes from the - * static `freeGamesPromotions` feed. - */ -object EpicStoreCatalog { - private const val TAG = "EpicStore" - private const val GRAPHQL = "https://store.epicgames.com/graphql" - private const val PROMOS = "https://store-site-backend-static-ipv4.ak.epicgames.com/freeGamesPromotions" - private const val FEATURED_TTL_MS = 3 * 60 * 60 * 1000L - private const val SEARCH_TTL_MS = 5 * 60 * 1000L - private const val KEY_FEATURED = "store_featured" - - private const val ELEMENT_FIELDS = - "title id namespace description effectiveDate releaseDate offerType productSlug urlSlug " + - "items{id namespace} keyImages{type url} seller{name} tags{name} " + - "catalogNs{mappings(pageType:\"productHome\"){pageSlug pageType}} " + - "price(country:\$country){totalPrice{discountPrice originalPrice discount currencyCode " + - "fmtPrice(locale:\$locale){originalPrice discountPrice}}}" - - private class Cached<T>(val value: T, val at: Long) - private var featuredCache: Cached<StoreShelves>? = null - private val searchCache = ConcurrentHashMap<String, Cached<List<CatalogItem>>>() - - private fun country(): String = Locale.getDefault().country.takeIf { it.length == 2 }?.uppercase(Locale.ROOT) ?: "US" - - private fun nowIso(): String { - val f = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US) - f.timeZone = TimeZone.getTimeZone("UTC") - return f.format(Date()) - } - - private fun searchStore(count: Int, keywords: String? = null, sortBy: String = "relevancy", sortDir: String = "DESC", onSale: Boolean? = null, freeGame: Boolean? = null, releasedOnly: Boolean = false): List<CatalogItem> { - val args = StringBuilder("category:\"games/edition/base\",count:\$count,country:\$country,locale:\$locale,sortBy:\$sortBy,sortDir:\$sortDir,allowCountries:\$country") - if (keywords != null) args.append(",keywords:\$keywords") - if (onSale != null) args.append(",onSale:$onSale") - if (freeGame != null) args.append(",freeGame:$freeGame") - if (releasedOnly) args.append(",releaseDate:\"[,${nowIso()}]\"") - val query = "query q(\$count:Int,\$country:String!,\$locale:String,\$sortBy:String,\$sortDir:String" + - (if (keywords != null) ",\$keywords:String" else "") + "){Catalog{searchStore($args){elements{$ELEMENT_FIELDS} paging{total}}}}" - val vars = JSONObject().put("count", count).put("country", country()).put("locale", "en-US").put("sortBy", sortBy).put("sortDir", sortDir) - if (keywords != null) vars.put("keywords", keywords) - val resp = StoreNet.postJson(GRAPHQL, JSONObject().put("query", query).put("variables", vars).toString()) ?: return emptyList() - val elements = runCatching { JSONObject(resp).optJSONObject("data")?.optJSONObject("Catalog")?.optJSONObject("searchStore")?.optJSONArray("elements") } - .onFailure { Log.w(TAG, "searchStore parse failed: ${it.message}") }.getOrNull() ?: return emptyList() - return parseElements(elements) - } - - private fun parseElements(arr: JSONArray): List<CatalogItem> { - val out = ArrayList<CatalogItem>(arr.length()) - for (i in 0 until arr.length()) arr.optJSONObject(i)?.let { e -> parseElement(e)?.let { out.add(it) } } - return out.distinctBy { it.id } - } - - fun parseElement(e: JSONObject): CatalogItem? { - val id = e.optString("id", "") - val title = e.optString("title", "") - if (id.isEmpty() || title.isEmpty()) return null - val ns = e.optString("namespace", "") - var wide: String? = null; var tall: String? = null; var thumb: String? = null - e.optJSONArray("keyImages")?.let { imgs -> - for (k in 0 until imgs.length()) { - val img = imgs.optJSONObject(k) ?: continue - val url = img.optString("url", "") - if (url.isBlank()) continue - // The opaque box images first; the logo variants are transparent and never used. - when (img.optString("type", "")) { - "DieselGameBox" -> wide = url - "OfferImageWide", "DieselStoreFrontWide" -> if (wide == null) wide = url - "DieselGameBoxTall" -> tall = url - "OfferImageTall", "DieselStoreFrontTall" -> if (tall == null) tall = url - "Thumbnail" -> if (thumb == null) thumb = url - } - } - } - val price = e.optJSONObject("price")?.optJSONObject("totalPrice") - val original = price?.optLong("originalPrice", -1L) ?: -1L - val discounted = price?.optLong("discountPrice", -1L) ?: -1L - val fmt = price?.optJSONObject("fmtPrice") - val fmtOriginal = fmt?.optString("originalPrice", "").orEmpty() - val fmtDiscount = fmt?.optString("discountPrice", "").orEmpty() - val hasPrice = original >= 0 && discounted >= 0 - val isFree = hasPrice && discounted == 0L - val discountPct = if (hasPrice && original > 0 && discounted < original) ((original - discounted) * 100 / original).toInt() else 0 - val finalPrice = when { isFree -> "Free"; fmtDiscount.isNotBlank() && fmtDiscount != "0" -> fmtDiscount; else -> fmtOriginal } - val tagLine = buildList { - e.optJSONArray("tags")?.let { tags -> for (t in 0 until tags.length()) { val n = tags.optJSONObject(t)?.optString("name").orEmpty(); if (n.isNotBlank() && n != "Windows" && size < 3) add(n) } } - }.joinToString(", ") - // Epic's public store GraphQL has no age rating on an offer (no ageGatings/ratings field on - // CatalogOffer or StoreConfig); only a content tag, if Epic sets one, can mark it. - val allTags = buildList { e.optJSONArray("tags")?.let { t -> for (k in 0 until t.length()) t.optJSONObject(k)?.optString("name")?.let { add(it) } } } - val itemIds = buildList { - e.optJSONArray("items")?.let { items -> for (j in 0 until items.length()) items.optJSONObject(j)?.optString("id")?.takeIf { it.isNotBlank() }?.let { add(it) } } - } - val slug = pageSlugOf(e) - val storeUrl = if (slug.isNotBlank()) "https://store.epicgames.com/en-US/p/$slug" else "https://store.epicgames.com/en-US/browse?q=${java.net.URLEncoder.encode(title, "UTF-8")}" - return CatalogItem( - store = Store.EPIC, id = id, title = title, imageUrl = wide ?: thumb, tallImageUrl = tall ?: thumb, tags = tagLine, - isFree = isFree, hasPrice = hasPrice, finalPrice = finalPrice, originalPrice = if (discountPct > 0) fmtOriginal else "", discountPercent = discountPct, - storeUrl = storeUrl, developer = e.optJSONObject("seller")?.optString("name", "").orEmpty(), - releaseDate = e.optString("releaseDate", e.optString("effectiveDate", "")), description = com.droiddeck.launcher.stores.cleanStoreText(e.optString("description", "")), - extra = buildMap { put("namespace", ns); if (itemIds.isNotEmpty()) put("items", itemIds.joinToString(",")); if (slug.isNotBlank()) put("slug", slug) }, - mature = com.droiddeck.launcher.stores.matureByTags(allTags), - ) - } - - private fun pageSlugOf(e: JSONObject): String { - e.optJSONObject("catalogNs")?.optJSONArray("mappings")?.let { m -> - for (i in 0 until m.length()) { val map = m.optJSONObject(i) ?: continue; if (map.optString("pageType") == "productHome") { val s = map.optString("pageSlug", ""); if (s.isNotBlank()) return s } } - } - var slug = e.optString("productSlug", "") - if (slug == "null") slug = "" - return slug.removeSuffix("/home") - } - - /** The Store tab's shelves: this week's giveaways as Free, sales as Deals, newest releases, trending = free-to-play picks. Blocking. */ - fun featured(context: Context, force: Boolean = false): StoreShelves? { - val now = System.currentTimeMillis() - featuredCache?.let { if (!force && now - it.at < FEATURED_TTL_MS) return it.value } - // Shelves saved on an earlier run are as good while they are young: shown, not fetched again. - if (!force && now - EpicPrefs.get(context).getLong("store_featured_at", 0L) < FEATURED_TTL_MS) cachedFeatured(context)?.let { return it } - val freeNow = fetchPromos() - val onSale = searchStore(24, sortBy = "currentPrice", sortDir = "ASC", onSale = true).filter { it.discountPercent > 0 } - val newest = searchStore(24, sortBy = "releaseDate", sortDir = "DESC", releasedOnly = true) - val freeToPlay = searchStore(24, sortBy = "relevancy", sortDir = "DESC", freeGame = true) - val result = StoreShelves(whatsNew = newest, deals = onSale, free = (freeNow + freeToPlay).distinctBy { it.id }, trending = searchStore(24, sortBy = "relevancy", sortDir = "DESC", releasedOnly = true)) - if (!result.isEmpty) { - featuredCache = Cached(result, now) - persist(context, result) - Log.i(TAG, "shelves: freeNow=${freeNow.size} sale=${onSale.size} new=${newest.size} f2p=${freeToPlay.size}") - return result - } - Log.w(TAG, "every store feed came back empty; using the on-disk mirror") - return loadPersisted(context) - } - - fun cachedFeatured(context: Context): StoreShelves? = featuredCache?.value ?: loadPersisted(context) - - fun search(query: String): List<CatalogItem> { - val term = query.trim() - if (term.length < 2) return emptyList() - val key = term.lowercase(Locale.ROOT) - val now = System.currentTimeMillis() - searchCache[key]?.let { if (now - it.at < SEARCH_TTL_MS) return it.value } - val results = searchStore(30, keywords = term) - searchCache[key] = Cached(results, now) - return results - } - - /** This week's giveaway titles (100% off right now). */ - private fun fetchPromos(): List<CatalogItem> { - val body = StoreNet.get("$PROMOS?locale=en-US&country=${country()}&allowCountries=${country()}") ?: return emptyList() - return runCatching { - val elements = JSONObject(body).optJSONObject("data")?.optJSONObject("Catalog")?.optJSONObject("searchStore")?.optJSONArray("elements") ?: JSONArray() - val out = ArrayList<CatalogItem>() - for (i in 0 until elements.length()) { - val el = elements.optJSONObject(i) ?: continue - val current = el.optJSONObject("promotions")?.optJSONArray("promotionalOffers") - if (current == null || current.length() == 0) continue - val inner = current.optJSONObject(0)?.optJSONArray("promotionalOffers") ?: continue - if (inner.length() == 0) continue - val discount = inner.optJSONObject(0)?.optJSONObject("discountSetting") - if (discount == null || discount.optInt("discountPercentage", -1) != 0) continue - val end = inner.optJSONObject(0)?.optString("endDate", "").orEmpty() - val base = parseElement(el) ?: continue - out.add(base.copy(isFree = true, hasPrice = true, finalPrice = "Free", originalPrice = base.originalPrice.ifBlank { - el.optJSONObject("price")?.optJSONObject("totalPrice")?.optJSONObject("fmtPrice")?.optString("originalPrice", "").orEmpty() - }, discountPercent = 100, tags = if (end.length >= 10) "Free until ${end.take(10)}" else base.tags)) - } - out.distinctBy { it.id } - }.onFailure { Log.w(TAG, "promos parse failed: ${it.message}") }.getOrDefault(emptyList()) - } - - private fun itemToJson(i: CatalogItem): JSONObject = JSONObject().apply { - put("id", i.id); put("title", i.title); put("image", i.imageUrl ?: ""); put("tall", i.tallImageUrl ?: ""); put("tags", i.tags) - put("free", i.isFree); put("hasPrice", i.hasPrice); put("final", i.finalPrice); put("orig", i.originalPrice); put("disc", i.discountPercent) - put("url", i.storeUrl); put("dev", i.developer); put("rel", i.releaseDate); put("desc", i.description); put("extra", JSONObject(i.extra as Map<*, *>)) - if (i.mature) put("mature", true) - } - - private fun itemFromJson(o: JSONObject): CatalogItem { - val extra = HashMap<String, String>() - o.optJSONObject("extra")?.let { e -> e.keys().forEach { k -> extra[k] = e.optString(k) } } - return CatalogItem( - store = Store.EPIC, id = o.optString("id"), title = o.optString("title"), imageUrl = o.optString("image").ifBlank { null }, tallImageUrl = o.optString("tall").ifBlank { null }, - tags = o.optString("tags"), isFree = o.optBoolean("free"), hasPrice = o.optBoolean("hasPrice"), finalPrice = o.optString("final"), originalPrice = o.optString("orig"), - discountPercent = o.optInt("disc"), storeUrl = o.optString("url"), developer = o.optString("dev"), releaseDate = o.optString("rel"), description = o.optString("desc"), extra = extra, - mature = o.optBoolean("mature"), - ) - } - - private fun listToJson(l: List<CatalogItem>) = JSONArray().apply { l.forEach { put(itemToJson(it)) } } - private fun listFromJson(a: JSONArray?): List<CatalogItem> = if (a == null) emptyList() else List(a.length()) { a.optJSONObject(it) }.filterNotNull().map(::itemFromJson) - - private fun persist(context: Context, f: StoreShelves) { - runCatching { - EpicPrefs.get(context).edit().putString(KEY_FEATURED, JSONObject().put("new", listToJson(f.whatsNew)).put("deals", listToJson(f.deals)).put("free", listToJson(f.free)).put("trending", listToJson(f.trending)).toString()).putLong("store_featured_at", System.currentTimeMillis()).apply() - } - } - - private fun loadPersisted(context: Context): StoreShelves? = runCatching { - val s = EpicPrefs.get(context).getString(KEY_FEATURED, null) ?: return null - val o = JSONObject(s) - StoreShelves(listFromJson(o.optJSONArray("new")), listFromJson(o.optJSONArray("deals")), listFromJson(o.optJSONArray("free")), listFromJson(o.optJSONArray("trending"))).takeIf { !it.isEmpty } - }.getOrNull() -} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogAchievements.kt b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogAchievements.kt new file mode 100644 index 0000000000..cc3bd077af --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogAchievements.kt @@ -0,0 +1,80 @@ +package com.droiddeck.launcher.stores.gog + +import android.content.Context +import android.util.Log +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreAchievements +import com.droiddeck.launcher.stores.StoreLog +import com.droiddeck.launcher.stores.StoreNet +import org.json.JSONObject +import java.net.HttpURLConnection +import java.net.URL +import java.util.zip.InflaterInputStream + +object GogAchievements : StoreAchievements(Store.GOG.id, Store.GOG.shortLabel) { + private const val TAG = "GogAchievements" + + override fun request(context: Context, game: Game): Result { + val galaxy = GogAuth.validToken(context) ?: return Result.Failed(Reason.SIGNED_OUT) + val (clientId, clientSecret) = client(context, game.id, galaxy) ?: return Result.Failed(Reason.NO_SERVICE) + val scoped = GogAuth.gameToken(context, clientId, clientSecret) ?: return Result.Failed(Reason.UNREACHABLE) + val body = StoreNet.get( + "https://gameplay.gog.com/clients/$clientId/users/${scoped.userId}/achievements", + bearer = scoped.accessToken, userAgent = GogAuth.GALAXY_UA, headers = mapOf("X-Gog-Lc" to locale()), + ) ?: return Result.Failed(Reason.UNREACHABLE) + val items = body.takeIf { it.isNotBlank() }?.let(::JSONObject)?.optJSONArray("items") ?: return Result.Found(emptyList()) + val out = ArrayList<Achievement>() + for (i in 0 until items.length()) { + val item = items.optJSONObject(i) ?: continue + val id = item.optString("achievement_key").ifEmpty { item.optString("achievement_id") } + if (id.isEmpty()) continue + val date = item.optString("date_unlocked").takeIf { it.isNotBlank() && it != "null" } + out += Achievement( + id = id, + name = item.optString("name").ifEmpty { id }, + description = item.optString("description"), + hidden = !item.optBoolean("visible", true), + unlocked = date != null, + unlockedAt = date?.let(::epochSeconds) ?: 0, + icon = item.optString("image_url_unlocked").ifEmpty { item.optString("image_url_locked") }.ifEmpty { null }, + iconLocked = item.optString("image_url_locked").ifEmpty { null }, + ) + } + return Result.Found(out) + } + + private fun client(context: Context, productId: String, token: String): Pair<String, String>? { + val prefs = GogPrefs.get(context) + val savedId = prefs.getString("client_id_$productId", null)?.ifEmpty { null } + val savedSecret = prefs.getString("client_secret_$productId", null)?.ifEmpty { null } + if (savedId != null && savedSecret != null) return savedId to savedSecret + val builds = StoreNet.get("https://content-system.gog.com/products/$productId/os/windows/builds?generation=2", bearer = token) + ?.let(::JSONObject) ?: return null + val link = builds.optJSONArray("items")?.optJSONObject(0)?.optString("link")?.ifEmpty { null } ?: return null + val manifest = bytes(link, token)?.let { JSONObject(inflate(it)) } ?: return null + val id = manifest.optString("clientId").ifEmpty { return null } + val secret = manifest.optString("clientSecret").ifEmpty { return null } + prefs.edit().putString("client_id_$productId", id).putString("client_secret_$productId", secret).apply() + return id to secret + } + + private fun bytes(url: String, bearer: String): ByteArray? { + var conn: HttpURLConnection? = null + return try { + conn = (URL(url).openConnection() as HttpURLConnection).apply { + connectTimeout = 20_000; readTimeout = 20_000 + setRequestProperty("Authorization", "Bearer $bearer") + } + if (conn.responseCode !in 200..299) null else conn.inputStream.use { it.readBytes() } + } catch (e: Exception) { + Log.w(TAG, "GET failed ${StoreLog.redactUrl(url)}: ${e.javaClass.simpleName}") + null + } finally { + runCatching { conn?.disconnect() } + } + } + + private fun inflate(data: ByteArray): String = + if (data.isNotEmpty() && data[0] == '{'.code.toByte()) String(data, Charsets.UTF_8) + else InflaterInputStream(data.inputStream()).use { String(it.readBytes(), Charsets.UTF_8) } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogAuth.kt b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogAuth.kt index d889674d1f..2de0880bd1 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogAuth.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogAuth.kt @@ -10,19 +10,12 @@ import org.json.JSONObject import java.net.HttpURLConnection import java.net.URL -/** - * The GOG sign-in: the token the OAuth page hands back, kept in StoreAccounts' private file, - * refreshed through auth.gog.com when it has expired (the client id and secret are GOG Galaxy's - * own, public ones, as every third-party GOG client uses). Nothing here is ever logged: the token - * endpoint's URL itself carries the secret and the refresh token. - */ object GogAuth { private const val TAG = "GogAuth" private const val CLIENT_ID = "46899977096215655" private const val CLIENT_SECRET = "9d85c43b1482497dbbce61f6e4aa173a433796eeae2ca8c5f6129f2dc4de46d9" private const val TOKEN_URL = "https://auth.gog.com/token?client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&grant_type=refresh_token&refresh_token=" - /** The login page, as GOG Galaxy opens it: an implicit grant that returns the token in the redirect's fragment. */ const val AUTH_URL = "https://auth.gog.com/auth?client_id=$CLIENT_ID" + "&redirect_uri=https%3A%2F%2Fembed.gog.com%2Fon_login_success%3Forigin%3Dclient&response_type=token&layout=client2" const val REDIRECT_PREFIX = "https://embed.gog.com/on_login_success" @@ -32,8 +25,12 @@ object GogAuth { fun isSignedIn(context: Context): Boolean = StoreAccounts.read(context, Store.GOG)?.optString("access_token", "")?.isNotEmpty() == true - /** Saves a fresh sign-in and looks the account's name up for the chip. Blocking. */ - fun saveLogin(context: Context, accessToken: String, refreshToken: String?, userId: String?) { + fun saveLogin(context: Context, accessToken: String, refreshToken: String?, userId: String?) = GogComet.replaceAccount { + saveAccount(context, accessToken, refreshToken, userId) + } + + @Synchronized + private fun saveAccount(context: Context, accessToken: String, refreshToken: String?, userId: String?) { var username = "" runCatching { val body = StoreNet.get("https://embed.gog.com/userData.json", bearer = accessToken, userAgent = GALAXY_UA) @@ -47,11 +44,10 @@ object GogAuth { Log.i(TAG, "signed in") } - /** The raw stored token, expired or not; null when signed out. */ fun storedToken(context: Context): String? = StoreAccounts.read(context, Store.GOG)?.optString("access_token", "")?.ifEmpty { null } - /** A usable access token, refreshed when the recorded login time says it has expired; null when signed out or the refresh failed. */ @JvmStatic + @Synchronized fun validToken(context: Context): String? { val json = StoreAccounts.read(context, Store.GOG) ?: return null val token = json.optString("access_token", "").ifEmpty { return null } @@ -61,8 +57,8 @@ object GogAuth { return if (loginTime == 0L || now >= loginTime + expiresIn - 60) refresh(context) else token } - /** Refreshes the access token; the new one, or null on any failure. Blocking. */ @JvmStatic + @Synchronized fun refresh(context: Context): String? { val json = StoreAccounts.read(context, Store.GOG) ?: return null val refreshToken = json.optString("refresh_token", "").ifEmpty { return null } @@ -79,7 +75,6 @@ object GogAuth { StoreAccounts.write(context, Store.GOG, json) access } catch (e: Exception) { - // Not the throwable: HttpURLConnection's messages echo the URL, which embeds the secrets. Log.w(TAG, "refresh failed: ${e.javaClass.simpleName}") null } finally { @@ -87,7 +82,49 @@ object GogAuth { } } - /** Hosts the GOG login page hands off to for a social sign-in; they refuse an embedded browser's identity. */ + @Synchronized + fun cometCredentials(context: Context): JSONObject? { + val access = validToken(context) ?: return null + val saved = StoreAccounts.read(context, Store.GOG) ?: return null + val refresh = saved.optString("refresh_token").ifEmpty { return null } + var user = saved.optString("user_id") + var username = saved.optString("username") + if (!user.matches(Regex("[0-9]+")) || username.isEmpty()) { + val body = StoreNet.get("https://embed.gog.com/userData.json", bearer = access, userAgent = GALAXY_UA, timeoutMs = 5_000) ?: return null + val info = runCatching { JSONObject(body) }.getOrNull() ?: return null + user = info.optString("galaxyUserId", info.optString("userId", user)) + username = info.optString("username", username) + if (!user.matches(Regex("[0-9]+")) || username.isEmpty()) return null + saved.put("user_id", user).put("username", username) + StoreAccounts.write(context, Store.GOG, saved) + } + return JSONObject().put("access_token", access).put("refresh_token", refresh) + .put("user_id", user).put("username", username) + } + + class GameToken(val accessToken: String, val userId: String) + + fun gameToken(context: Context, clientId: String, clientSecret: String): GameToken? { + val json = StoreAccounts.read(context, Store.GOG) ?: return null + val refresh = json.optString("refresh_token", "").ifEmpty { return null } + var conn: HttpURLConnection? = null + return try { + val enc = { s: String -> java.net.URLEncoder.encode(s, "UTF-8") } + conn = (URL("https://auth.gog.com/token?client_id=${enc(clientId)}&client_secret=${enc(clientSecret)}&grant_type=refresh_token&refresh_token=${enc(refresh)}") + .openConnection() as HttpURLConnection).apply { connectTimeout = 15_000; readTimeout = 15_000 } + conn.setRequestProperty("User-Agent", "GOG Galaxy") + if (conn.responseCode != 200) { Log.w(TAG, "game token: HTTP ${conn.responseCode}"); return null } + val o = JSONObject(conn.inputStream.bufferedReader().readText()) + val access = o.optString("access_token").ifEmpty { return null } + GameToken(access, o.optString("user_id").ifEmpty { json.optString("user_id") }) + } catch (e: Exception) { + Log.w(TAG, "game token failed: ${e.javaClass.simpleName}") + null + } finally { + runCatching { conn?.disconnect() } + } + } + fun isIdentityProviderHost(host: String?): Boolean { val h = host?.lowercase() ?: return false return h == "google.com" || h.endsWith(".google.com") || h == "youtube.com" || h.endsWith(".youtube.com") || diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogBackend.kt b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogBackend.kt index bf175dd6ac..1003921c04 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogBackend.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogBackend.kt @@ -17,7 +17,6 @@ import com.droiddeck.launcher.stores.download.DownloadStage import java.io.File import java.util.concurrent.atomic.AtomicBoolean -/** GOG in the Stores section: sign-in, the library, the public shelves, installs. */ object GogBackend : StoreBackend { override val store: Store = Store.GOG @@ -32,13 +31,11 @@ object GogBackend : StoreBackend { override fun syncLibrary(context: Context, force: Boolean) { val app = context.applicationContext Thread({ - // The cache first, so the tab has something while the sync runs; read here, not on the - // main thread. With a cache on screen a background sync keeps quiet: only Refresh shows its bar. val cached = GogLibrary.cached(app).map { GogLibrary.toCatalogItem(app, it) } val quiet = cached.isNotEmpty() && !force StoresState.post { if (cached.isNotEmpty()) StoresState.library[store] = com.droiddeck.launcher.stores.mergeItems(StoresState.library[store], cached) - if (!quiet) StoresState.status[store] = "Fetching your library…" + if (!quiet) StoresState.status[store] = app.getString(com.droiddeck.launcher.R.string.stores_sync_library) } val result = GogLibrary.sync(app, force) { line -> if (!quiet) StoresState.post { StoresState.status[store] = line } } StoresState.post { @@ -62,16 +59,15 @@ object GogBackend : StoreBackend { }, "gog-shelves").start() } - /** The shelves with the library's titles marked owned, so their cards offer Install. */ private fun markOwned(s: com.droiddeck.launcher.stores.StoreShelves): com.droiddeck.launcher.stores.StoreShelves { val owned = StoresState.library[store]?.associateBy { it.id } ?: return s fun mark(l: List<CatalogItem>) = l.map { i -> owned[i.id]?.let { o -> i.copy(owned = true, sizeBytes = o.sizeBytes) } ?: i } - return com.droiddeck.launcher.stores.StoreShelves(mark(s.whatsNew), mark(s.deals), mark(s.free), mark(s.trending)) + return com.droiddeck.launcher.stores.StoreShelves(mark(s.whatsNew), mark(s.deals), mark(s.free), mark(s.trending), s.art) } override fun install(context: Context, item: CatalogItem, root: File) { val app = context.applicationContext - val game = GogGame(item.id, item.title, item.imageUrl ?: "", item.description, item.developer, item.tags, 2, item.tallImageUrl) + val game = GogGame(item.id, item.title, item.imageUrl ?: "", item.description, item.developer, item.tags, 2, item.tallImageUrl, item.releaseDate, item.publisher) val folder = StoreInstallRoot.folderFor(app, Store.GOG, game.gameId, game.title, root) val entry = DownloadEntry(store, item.id, item.title, cover = item.imageUrl, bytesTotal = item.sizeBytes, location = StoreInstallRoot.labelFor(app, folder)) DownloadQueue.enqueue(app, entry) { InstallJob(app, game, item, folder) } @@ -79,7 +75,6 @@ object GogBackend : StoreBackend { override fun uninstall(context: Context, game: InstalledStoreGame) {} - /** One GOG install, as the queue runs it. */ private class InstallJob(val app: Context, val game: GogGame, val item: CatalogItem, val folder: File) : DownloadQueue.DownloadJob { private val cancelled = AtomicBoolean(false) @@ -106,12 +101,11 @@ object GogBackend : StoreBackend { } }, cancelled) ?: return null if (cancelled.get()) return null - handle.stage(DownloadStage.INSTALL, "Registering with Steam…") + handle.stage(DownloadStage.INSTALL, app.getString(com.droiddeck.launcher.R.string.stores_registering)) val sidecar = StoreGameSidecar( Store.GOG, game.gameId, game.title, exe = result.exeRelative.ifEmpty { "" }, installVersion = result.buildId, installedAt = System.currentTimeMillis(), cover = item.tallImageUrl ?: item.imageUrl, hero = item.imageUrl, - // Kept even when empty: the build was read, and lists none. extra = mapOf(com.droiddeck.launcher.frontend.WinCompSources.GOG_DEPENDENCIES to result.dependencies.joinToString(",")) + (if (result.dependenciesRead) mapOf(com.droiddeck.launcher.frontend.WinCompSources.LIST_READ to "1") else emptyMap()), ) diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogComet.kt b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogComet.kt new file mode 100644 index 0000000000..6241778218 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogComet.kt @@ -0,0 +1,184 @@ +package com.droiddeck.launcher.stores.gog + +import android.content.Context +import android.os.Environment +import android.util.Log +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue +import com.droiddeck.launcher.runtime.LinuxRuntime +import com.droiddeck.launcher.session.SessionEvents +import com.droiddeck.launcher.session.SessionPrefs +import com.droiddeck.launcher.session.SessionState +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.AchievementNotifications +import com.droiddeck.launcher.stores.StoreAchievements +import com.droiddeck.launcher.stores.StoreAccounts +import com.droiddeck.launcher.stores.StoreGameSidecar +import com.droiddeck.launcher.stores.StoreInstallRoot +import com.droiddeck.launcher.stores.StoresState +import org.json.JSONObject +import java.io.File +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit + +object GogComet { + private const val TAG = "GogComet" + private const val BIN = "/usr/local/lib/droiddeck-comet/comet" + private val lock = Any() + @Volatile private var process: Process? = null + private var pid = -1 + private var started: String? = null + private var account = "" + private var session: String? = null + private var accepting = false + private var generation: String? = null + @Volatile private var gamesByClient: Map<String, StoreGameSidecar> = emptyMap() + var status by mutableStateOf("off") + private set + + fun enabled(context: Context) = GogPrefs.get(context).getBoolean("achievements", false) + + fun setEnabled(context: Context, on: Boolean) { + GogPrefs.get(context).edit().putBoolean("achievements", on).apply() + + } + + fun begin() = synchronized(lock) { + stopLocked() + accepting = true + generation = SessionState.sessionId + AchievementNotifications.begin(generation) + } + + fun replaceAccount(change: () -> Unit) = synchronized(lock) { + stopLocked() + AchievementNotifications.begin(generation) + change() + } + + fun stop() = synchronized(lock) { + stopLocked() + } + + fun end(expected: String?) = synchronized(lock) { + if (generation == expected) { + accepting = false + stopLocked() + AchievementNotifications.end(expected) + generation = null + } + } + + private fun report(value: String) { + StoresState.post { status = value } + Log.i(TAG, value) + SessionEvents.record("gog.achievements", mapOf("status" to value)) + } + + private fun publishPolicy(context: Context): File { + val dir = File(context.filesDir, "gog-achievements").apply { mkdirs() } + val games = if (!enabled(context)) emptyMap() else StoreInstallRoot.gameFolders(context).mapNotNull { folder -> + val game = StoreGameSidecar.read(folder) ?: return@mapNotNull null + if (game.store != Store.GOG || !game.achievements) return@mapNotNull null + val client = GogPrefs.get(context).getString("client_id_${game.id}", null) + ?: runCatching { JSONObject(File(folder, "goggame-${game.id}.info").readText()).optString("clientId") }.getOrNull() + client?.takeIf { it.matches(Regex("[0-9]+")) }?.let { it to game } + }.toMap() + gamesByClient = games + val file = File(dir, "clients.json") + val tmp = File(dir, "clients.json.tmp") + tmp.writeText(org.json.JSONArray(games.keys.toList()).toString()) + check(tmp.renameTo(file)) + return file + } + + fun prepare(context: Context, id: String): JSONObject = synchronized(lock) { + fun reply(ready: Boolean, reason: String): JSONObject { + report(reason) + return JSONObject().put("ok", ready).put("ready", ready).put("reason", reason) + } + if (!accepting || !SessionState.running || generation != SessionState.sessionId) return reply(false, "no-session") + val folder = StoreInstallRoot.gameFolders(context).firstOrNull { f -> StoreGameSidecar.read(f)?.let { it.store == Store.GOG && it.id == id } == true } + val sidecar = folder?.let { StoreGameSidecar.read(it) } + if (sidecar?.store != Store.GOG || sidecar.id != id) return reply(false, "no-game") + val policy = publishPolicy(context) + if (!enabled(context) || !sidecar.achievements) return reply(false, "off") + val credentials = GogAuth.cometCredentials(context) ?: return reply(false, + if (StoreAccounts.isUnavailable(Store.GOG)) "credentials-unavailable" + else if (StoreAccounts.read(context, Store.GOG)?.optString("refresh_token").isNullOrEmpty()) "sign-in-needed" else "credentials-unavailable") + if (!SessionState.running || generation != SessionState.sessionId) return reply(false, "no-session") + val user = credentials.getString("user_id") + if (process?.isAlive == true && account == user && session == SessionState.sessionId && identity(pid) == started) { + return JSONObject().put("ok", true).put("ready", true).put("reason", "ready") + } + stopLocked() + if (!File(LinuxRuntime.rootDir(context), BIN.removePrefix("/")).isFile) return reply(false, "not-installed") + val data = File(context.filesDir, "gog-achievements").apply { mkdirs() } + val ready = CountDownLatch(1) + val command = LinuxRuntime.command(context, null, null, Environment.getExternalStorageDirectory(), + listOf("/usr/bin/env", "HOME=/root", "XDG_DATA_HOME=${data.path}/data", "XDG_CONFIG_HOME=${data.path}/config", "COMET_LOG=off", "COMET_ALLOWED_CLIENTS=${policy.path}", BIN, "--credentials-stdin")) + val pb = ProcessBuilder(command).redirectErrorStream(true) + pb.environment().apply { + remove("LD_PRELOAD"); remove("LD_AUDIT"); remove("LD_LIBRARY_PATH") + put("PROOT_LOADER", LinuxRuntime.prootLoader(context).path) + put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(context).path) + if (SessionPrefs.prootNoSeccomp(context)) put("PROOT_NO_SECCOMP", "1") + LinuxRuntime.prootLibraryPath(context).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) } + } + try { + val child = pb.start() + process = child; account = user; session = SessionState.sessionId + Thread({ + runCatching { child.inputStream.bufferedReader().useLines { lines -> lines.forEach { line -> + when { + line.startsWith("DROIDDECK_COMET_READY:") -> { + val childPid = line.substringAfter(':').toIntOrNull() ?: -1 + if (childPid > 1 && process === child) { + pid = childPid; started = identity(childPid); ready.countDown() + } + } + line.startsWith("DROIDDECK_COMET_UNLOCKED:") -> if (process === child) { + val event = runCatching { JSONObject(line.substringAfter(':')) }.getOrNull() + val game = event?.optString("client_id")?.let { gamesByClient[it] } + val unlock = event?.let { AchievementNotifications.parse(it, game?.title.orEmpty()) } + val owner = session + if (game != null && unlock != null && owner != null && owner == SessionState.sessionId && SessionState.running) { + report("unlocked-locally") + AchievementNotifications.unlock(owner, unlock) + SessionEvents.record("achievement.unlocked", mapOf("store" to "gog", "gameId" to game.id, "achievementId" to unlock.id)) + } + } + line == "DROIDDECK_COMET_PENDING" -> if (process === child) report("pending-upload") + line.startsWith("DROIDDECK_COMET_UPLOADED:") -> if (process === child && line.substringAfter(':').toIntOrNull()?.let { it > 0 } == true) { report("uploaded"); StoresState.post { StoreAchievements.invalidate() } } + } + } } } + if (process === child) report("service-unavailable") + ready.countDown() + }, "gog-comet-output").start() + child.outputStream.bufferedWriter().use { it.write(credentials.toString()) } + if (!ready.await(5, TimeUnit.SECONDS) || pid <= 1 || started == null || !child.isAlive) { + stopLocked(); return reply(false, "service-unavailable") + } + reply(true, "ready") + } catch (e: Exception) { + stopLocked() + reply(false, "service-unavailable") + } + } + + private fun identity(pid: Int): String? = if (pid <= 1) null else runCatching { + File("/proc/$pid/stat").readText().substringAfterLast(") ").split(' ')[19] + }.getOrNull() + + private fun stopLocked() { + val child = process ?: return + if (started != null && identity(pid) == started) android.os.Process.sendSignal(pid, 2) + if (!child.waitFor(5, TimeUnit.SECONDS)) { + if (started != null && identity(pid) == started) android.os.Process.sendSignal(pid, 15) + child.destroy() + } + process = null; pid = -1; started = null; account = ""; session = null + report("stopped") + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogDownloadManager.java b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogDownloadManager.java index a8bd89a807..b61af1e96c 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogDownloadManager.java +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogDownloadManager.java @@ -36,68 +36,36 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.zip.GZIPInputStream; import java.util.zip.Inflater; -/** - * The GOG install pipeline, ported from Bannerlator's GogDownloadManager and made blocking: the - * download queue runs {@link #install} on its own thread and reads progress through {@link Callback}. - * - * Gen 2: builds → build manifest → depot manifests (base product, matching language) → secure - * link → per file: chunks fetched, inflated, MD5-checked, assembled (the native engine when it is - * there, else the Java pool here). Gen 1: build manifest → per-file Range GET. Neither available: - * the product's Windows installer is downloaded as a file to run once. - * - * Resume and repair come from the per-file size + MD5 check: a complete file is skipped, a damaged - * one re-fetched. Nothing here writes outside the install folder; URLs are only logged redacted. - */ public final class GogDownloadManager { private static final String TAG = "GogDownload"; private static final int TIMEOUT = 30_000; private static final String MARKER = "_gog_manifest.json"; - /** Progress out of a running install. Every method is called on the install's thread. */ public interface Callback { - /** A new phase or file, as text, with the install's overall percentage. */ void onProgress(String message, int pct); - /** Bytes landed against the planned total, and the current speed (0 = unknown). */ default void onBytes(long done, long total, long speedBps) {} - /** A diagnostic line for the engine log. */ default void onLog(String line) {} - /** What this run fetches and what the game takes on disk. */ default void onSizes(long downloadBytes, long diskBytes) {} - /** - * The active stage's own count: {@code stage} is "verify" or "install", {@code done} of - * {@code total} an amount (bytes, or items when there are no bytes), {@code items} of - * {@code itemsTotal} the files, when it counts files. - */ default void onStage(String stage, long done, long total, int items, int itemsTotal) {} } - /** What an install leaves behind for the sidecar. */ public static final class Result { - /** The chosen exe, relative to the install folder (forward slashes), or "" when none was found. */ public final String exeRelative; public final String buildId; public final long bytes; - /** The build manifest's "dependencies" (GOG's redistributable ids: MSVC2017_x64, DirectX...), for Windows components. */ public List<String> dependencies = new ArrayList<>(); - /** The dependencies come from a gen2 build manifest read whole (gen1 builds and installers have none). */ public boolean dependenciesRead = false; Result(String exeRelative, String buildId, long bytes) { this.exeRelative = exeRelative; this.buildId = buildId; this.bytes = bytes; } } - /** Thrown for every way an install can fail; the message is what the Downloads page shows. */ public static final class InstallException extends Exception { InstallException(String message) { super(message); } } private GogDownloadManager() {} - /** - * Installs {@code game} into {@code installPath}. Blocks until done; {@code cancelled} set from - * another thread stops it at the next file boundary (what was written stays for a resume). - * Returns null when cancelled. - */ public static Result install(Context ctx, GogGame game, File installPath, Callback cb, AtomicBoolean cancelled) throws InstallException { cb.onProgress("Checking sign-in…", 0); String token = GogAuth.validToken(ctx); @@ -127,7 +95,6 @@ public final class GogDownloadManager { return runInstaller(ctx, game, token, installPath, cb, cancelled); } - // ---- gen2 ----------------------------------------------------------------------------------- private static final class Gen2Outcome { Result result; String error; boolean hardStop; @@ -148,14 +115,10 @@ public final class GogDownloadManager { tempExe = products.getJSONObject(0).optString("temp_executable", null); if (tempExe != null && tempExe.isEmpty()) tempExe = null; } - // The build manifest lists every product's depots (base + DLC), each tagged by productId; - // the base install takes the base product's only, under a secure link scoped to it. String baseProductId = manifest.optString("baseProductId", null); if ((baseProductId == null || baseProductId.isEmpty()) && products != null && products.length() > 0) baseProductId = products.getJSONObject(0).optString("productId", null); if (baseProductId == null || baseProductId.isEmpty()) baseProductId = game.gameId; - // The build's required redistributables (MSVC, DirectX, ...): logged, and kept in the - // sidecar, where Windows components take them as this game's list (WinCompSources). JSONArray deps = manifest.optJSONArray("dependencies"); List<String> dependencies = new ArrayList<>(); if (deps != null) for (int i = 0; i < deps.length(); i++) { String d = deps.optString(i, ""); if (!d.isEmpty()) dependencies.add(d); } @@ -189,15 +152,15 @@ public final class GogDownloadManager { installPath.mkdirs(); long plannedBytes = 0; for (DepotFile df : files) plannedBytes += df.totalSize; - if (plannedBytes > 0) { - long usable = installPath.getUsableSpace(); - if (usable > 0 && plannedBytes > usable) { + long remainingBytes = remainingInstallBytes(files, installPath); + if (remainingBytes > 0) { + long usable = com.droiddeck.launcher.stores.StoreInstallRoot.availableBytes(installPath); + if (com.droiddeck.launcher.stores.StoreInstallRoot.insufficientSpace(remainingBytes, usable)) { out.hardStop = true; - out.error = "Not enough free space: need " + formatBytes(plannedBytes) + ", only " + formatBytes(usable) + " free"; + out.error = "Not enough free space: need " + formatBytes(remainingBytes) + ", only " + formatBytes(usable) + " free"; return out; } } - // Largest first: the biggest archives start first and small files fill the tail. Collections.sort(files, (a, b) -> Long.compare(b.totalSize, a.totalSize)); final int total = files.size(); @@ -264,7 +227,6 @@ public final class GogDownloadManager { deleteCounted(new File(installPath, ".gog_chunks"), cb); String clientId = manifest.optString("clientId", null); if (clientId != null && !clientId.isEmpty()) GogPrefs.get(ctx).edit().putString("client_id_" + game.gameId, clientId).apply(); - // The game's own client secret: cloud saves need a token issued to the game's client. String clientSecret = manifest.optString("clientSecret", null); if (clientSecret != null && !clientSecret.isEmpty()) GogPrefs.get(ctx).edit().putString("client_secret_" + game.gameId, clientSecret).apply(); out.result = new Result(pickExe(installPath, tempExe, game.title), gm.buildId, planned); @@ -282,7 +244,6 @@ public final class GogDownloadManager { Gen2Manifest(JSONObject manifest, String buildId) { this.manifest = manifest; this.buildId = buildId; } } - /** The first Windows build's manifest, inflated and parsed; null on any failure. */ private static Gen2Manifest resolveGen2Manifest(String buildsJson, String token, Callback cb) { try { JSONArray items = new JSONObject(buildsJson).optJSONArray("items"); @@ -309,7 +270,6 @@ public final class GogDownloadManager { } } - /** English or every-language depots; GOG tags the rest by language code. */ private static boolean languageCompatible(JSONObject depot) { JSONArray languages = depot.optJSONArray("languages"); if (languages == null || languages.length() == 0) return true; @@ -317,7 +277,6 @@ public final class GogDownloadManager { return s.contains("*") || s.contains("en-US") || s.contains("\"en\"") || s.contains("english"); } - // ---- gen1 ----------------------------------------------------------------------------------- private static final class Gen1Outcome { Result result; String error; } @@ -420,9 +379,7 @@ public final class GogDownloadManager { } } - // ---- installer fallback --------------------------------------------------------------------- - /** Games with no content-system builds: the Windows installer, as one file, to run once in Proton. */ private static Result runInstaller(Context ctx, GogGame game, String token, File installPath, Callback cb, AtomicBoolean cancelled) throws InstallException { try { String productJson = httpGet("https://api.gog.com/products/" + game.gameId + "?expand=downloads", token); @@ -526,13 +483,7 @@ public final class GogDownloadManager { } } - // ---- native engine -------------------------------------------------------------------------- - /** - * Drives the native engine for one fetch loop, producing what the Java pool produces: the same - * counters, progress strings and percentages. A secure-link expiry (the run dying on - * 401/403/404/500) refreshes the link and re-runs for the files not yet done. - */ private static void runNativeEngine(Context ctx, int kind, String verifiedMsg, List<String> depotJsons, File installPath, AtomicReference<String> cdnBaseRef, String secureLinkUrl, String token, AtomicInteger cdnRefreshCount, int maxCdnRefresh, int maxWorkers, int processWorkers, @@ -542,7 +493,6 @@ public final class GogDownloadManager { StoreDownloadTier tier = StoreDownloadTier.Companion.current(ctx); int workers = Math.max(1, Math.min(128, tier.getNetworkWindow())); int process = Math.max(16, Math.max(processWorkers, tier.getProcessWorkers())); - // The tier's window goes to the engine as its ceiling (Max = 96); the per-host spread is the engine's. cb.onLog("gog: plan kind=" + kind + " files=" + total + " bytes=" + planned + " window=" + workers + " process_workers=" + process + " tier=" + tier.getId() + " engine=native"); final String[] manifests = depotJsons.toArray(new String[0]); final java.util.Set<String> donePaths = java.util.concurrent.ConcurrentHashMap.newKeySet(); @@ -554,9 +504,6 @@ public final class GogDownloadManager { final AtomicBoolean okRef = new AtomicBoolean(false); final AtomicBoolean linkExpiryRef = new AtomicBoolean(false); final AtomicReference<String> errRef = new AtomicReference<>(""); - // The bar between file completions: what earlier runs counted, plus the files this run - // skipped as already verified (the engine credits those no bytes), plus the engine's own - // byte count, which includes the files still in flight. Never shown going back. final long runStart = totalBytes.get(); final AtomicLong verifiedInRun = new AtomicLong(0); final AtomicLong shownBytes = new AtomicLong(runStart); @@ -583,7 +530,6 @@ public final class GogDownloadManager { okRef.set(success); linkExpiryRef.set(linkExpiry); errRef.set(error == null ? "" : error); latch.countDown(); } }; - // Every CDN of the set: the engine spreads its window across the hosts (JNI.md). String[] bases = (base == null || base.isEmpty()) ? new String[0] : base.split("\n"); if (run == 1) cb.onLog("gog: " + bases.length + " CDN host(s) offered"); long handle = GogNative.start(kind, manifests, bases, installPath.getAbsolutePath(), donePaths.toArray(new String[0]), "", @@ -611,7 +557,6 @@ public final class GogDownloadManager { } } - // ---- gen2 helpers (shared with the Java pool) ----------------------------------------------- private static void parseDepotManifest(String json, List<DepotFile> out) { try { @@ -675,17 +620,11 @@ public final class GogDownloadManager { return tmpFile.renameTo(outFile); } - /** - * Every CDN the secure link offers, as one value - their bases, one per line - so the set is - * refreshed (and compared on expiry) as a whole. GOG answers with several hosts in {@code urls[]}; - * taking only the first left every request on one host. - */ private static String parseCdnUrl(String json) { java.util.List<String> all = parseCdnUrls(json); return all.isEmpty() ? null : String.join("\n", all); } - /** The CDN bases of a secure_link answer, in the order GOG gives them. */ static java.util.List<String> parseCdnUrls(String json) { java.util.List<String> out = new ArrayList<>(); if (json == null) return out; @@ -712,13 +651,11 @@ public final class GogDownloadManager { private static final AtomicInteger CDN_TURN = new AtomicInteger(); - /** One of the set's CDNs, in turn, so the Java pool spreads its requests over all of them. */ static String pickCdn(String set) { String[] all = set.split("\n"); return all[Math.floorMod(CDN_TURN.getAndIncrement(), all.length)]; } - /** The first CDN of the set - what a caller that takes a single base gets. */ static String firstCdn(String set) { int nl = set.indexOf('\n'); return nl < 0 ? set : set.substring(0, nl); @@ -768,7 +705,6 @@ public final class GogDownloadManager { static byte[] fetchBytes(String url, String token) { return fetchBytesEx(url, token).body; } - /** gzip or zlib detected by magic, else the bytes as UTF-8. */ static String decompressBytes(byte[] data) { if (data == null || data.length < 2) return null; try { @@ -840,7 +776,6 @@ public final class GogDownloadManager { } } - /** The chunk path goes before the query string so the secure link's token survives. */ private static String buildChunkUrl(String base, String chunkPath) { int q = base.indexOf('?'); return q >= 0 ? base.substring(0, q) + "/" + chunkPath + base.substring(q) : base + "/" + chunkPath; @@ -946,7 +881,6 @@ public final class GogDownloadManager { private static String baseName(String path) { return path.contains("/") ? path.substring(path.lastIndexOf('/') + 1) : path; } - /** Download-pool threads for the built-in loop: cores times two, between 6 and 16. */ private static int downloadThreads() { int threads = Runtime.getRuntime().availableProcessors() * 2; return Math.max(6, Math.min(16, threads)); @@ -956,7 +890,6 @@ public final class GogDownloadManager { try (FileOutputStream fos = new FileOutputStream(f)) { fos.write(data); } } - /** Removes the chunk cache, counting its files as the Install stage's progress (a large cache takes a while). */ private static void deleteCounted(File dir, Callback cb) { File[] files = dir.listFiles(); if (files == null) { dir.delete(); return; } @@ -976,10 +909,6 @@ public final class GogDownloadManager { dir.delete(); } - /** - * The exe to run, relative to the install folder: the manifest's hint when present, else the - * candidate named most like the title, else the shallowest. "" when the folder has none. - */ static String pickExe(File installPath, String tempExe, String title) { if (tempExe != null) { File hinted = new File(installPath, tempExe); @@ -1018,7 +947,16 @@ public final class GogDownloadManager { for (File f : files) if (f.isDirectory()) collectExeRecursive(f, out); } - private static final class DepotFile { + static long remainingInstallBytes(List<DepotFile> files, File installPath) { + long remaining = 0; + for (DepotFile file : files) { + File output = new File(installPath, file.relativePath); + if (!fileVerified(output, file.totalSize, file.md5)) remaining += file.totalSize; + } + return remaining; + } + + static final class DepotFile { final String relativePath; final List<ChunkRef> chunks = new ArrayList<>(); String md5; @@ -1038,12 +976,6 @@ public final class GogDownloadManager { Gen1File(String path, String url, long offset, long size) { this.path = path; this.url = url; this.offset = offset; this.size = size; } } - /** The install size of the Windows build (English / all-language depots), or -1. Blocking. */ - /** - * The "dependencies" of the build [buildId] of [gameId] (else the newest Windows build), from - * its build manifest alone: no game file is fetched. Null when the builds or the manifest - * could not be had; empty when the build lists none. Blocking. - */ public static List<String> fetchDependencies(String gameId, String buildId, String token) { try { String buildsUrl = "https://content-system.gog.com/products/" + gameId + "/os/windows/builds?generation=2"; @@ -1067,7 +999,6 @@ public final class GogDownloadManager { String manifestStr = decompressBytes(raw); if (manifestStr == null) return null; JSONObject manifest = new JSONObject(manifestStr); - // A manifest without depots is not one this reads right: no list rather than an empty one. JSONArray depots = manifest.optJSONArray("depots"); if (depots == null) { Log.w(TAG, "gog: build manifest for " + gameId + " has no depots; keys " + manifest.names()); return null; } JSONArray deps = manifest.optJSONArray("dependencies"); @@ -1124,6 +1055,5 @@ public final class GogDownloadManager { return String.format("%.2f GB", bytes / (1024.0 * 1024 * 1024)); } - /** Keeps the import used: every URL a log line names goes through here. */ static String safe(String url) { return StoreLog.redactUrl(url); } } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogGame.java b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogGame.java index 63dbab9c74..fef9876d0c 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogGame.java +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogGame.java @@ -1,6 +1,5 @@ package com.droiddeck.launcher.stores.gog; -/** One GOG game as the library cache holds it. */ public class GogGame { public final String gameId; public final String title; @@ -8,13 +7,13 @@ public class GogGame { public final String description; public final String developer; public final String category; - /** Content-system generation of the Windows build: 1 or 2 (0 = unknown). */ public final int generation; - /** gamesdb.gog.com 2:3 box art, or null when the lookup found none. */ public final String verticalCover; + public final String releaseDate; + public final String publisher; public GogGame(String gameId, String title, String imageUrl, String description, String developer, - String category, int generation, String verticalCover) { + String category, int generation, String verticalCover, String releaseDate, String publisher) { this.gameId = gameId; this.title = title; this.imageUrl = imageUrl; @@ -23,5 +22,7 @@ public class GogGame { this.category = category; this.generation = generation; this.verticalCover = verticalCover; + this.releaseDate = releaseDate; + this.publisher = publisher; } } diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogLibrary.kt b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogLibrary.kt index 778f972a43..61fae1a40f 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogLibrary.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogLibrary.kt @@ -3,6 +3,7 @@ package com.droiddeck.launcher.stores.gog import android.content.Context import android.content.SharedPreferences import android.util.Log +import com.droiddeck.launcher.R import com.droiddeck.launcher.stores.CatalogItem import com.droiddeck.launcher.stores.Store import com.droiddeck.launcher.stores.StoreNet @@ -13,18 +14,10 @@ import java.util.concurrent.Callable import java.util.concurrent.Executors import java.util.concurrent.atomic.AtomicBoolean -/** - * The signed-in account's GOG library: the owned ids from embed.gog.com, each product's details - * from api.gog.com, and a cache so the tab paints at once. A sync fetches only what the cache - * lacks unless forced or 15 minutes stale. Ported from Bannerlator's GogLibraryRepo. - */ object GogLibrary { private const val TAG = "GogLibrary" - // v2: the card art moved from the store page's backdrop to the Galaxy library art; an older cache is re-fetched. private const val CACHE_KEY = "library_cache_v2" private const val LAST_SYNC_KEY = "library_synced_at" - // Owned products that are not Windows games (DLC, films, soundtracks, other platforms): never in - // the cache, so without this every sync would fetch each of them again. private const val SKIPPED_KEY = "library_skipped" private const val THROTTLE_MS = 6L * 60L * 60L * 1000L @@ -37,7 +30,6 @@ object GogLibrary { object Busy : SyncResult } - /** The cached library, alphabetical; empty until the first sync. */ fun cached(context: Context): List<GogGame> { val json = GogPrefs.get(context).getString(CACHE_KEY, null) ?: return emptyList() return runCatching { @@ -45,33 +37,32 @@ object GogLibrary { (0 until arr.length()).mapNotNull { i -> val o = arr.optJSONObject(i) ?: return@mapNotNull null GogGame(o.optString("gameId", ""), o.optString("title", ""), o.optString("imageUrl", ""), cleanStoreText(o.optString("description", "")), - o.optString("developer", ""), o.optString("category", ""), o.optInt("generation", 1), o.optString("verticalCover", "").ifEmpty { null }) + o.optString("developer", ""), o.optString("category", ""), o.optInt("generation", 1), o.optString("verticalCover", "").ifEmpty { null }, + o.optString("releaseDate", ""), o.optString("publisher", "")) }.filter { it.gameId.isNotEmpty() }.sortedBy { it.title.lowercase() } }.getOrDefault(emptyList()) } fun sizeOf(context: Context, gameId: String): Long = GogPrefs.get(context).getLong("size_$gameId", 0L) - /** Owned ids diffed against the cache; fetches what is new, or everything when forced / empty / stale. Blocking. */ fun sync(context: Context, force: Boolean = false, onStatus: (String) -> Unit = {}): SyncResult { if (!syncing.compareAndSet(false, true)) return SyncResult.Busy try { val app = context.applicationContext val p = GogPrefs.get(app) val token = GogAuth.validToken(app) ?: return SyncResult.NotLoggedIn - onStatus("Fetching game list…") + onStatus(app.getString(R.string.stores_sync_game_list)) val gamesJson = StoreNet.get("https://embed.gog.com/user/data/games", bearer = token, userAgent = GogAuth.GALAXY_UA) - ?: return SyncResult.Failed("Couldn't reach GOG") + ?: return SyncResult.Failed(app.getString(R.string.stores_sync_gog_unreachable)) val ids = ArrayList<String>() val parsed = runCatching { val owned = JSONObject(gamesJson).optJSONArray("owned") if (owned != null) for (i in 0 until owned.length()) { val id = owned.optLong(i).toString() - // 1801418160 is GOG's own "Galaxy" entry, in every library. if (id != "1801418160" && id != "0") ids.add(id) } }.isSuccess - if (!parsed) return SyncResult.Failed("Error parsing library") + if (!parsed) return SyncResult.Failed(app.getString(R.string.stores_sync_gog_unreadable)) val ownedSet = ids.toHashSet() val cachedList = cached(app) @@ -91,7 +82,7 @@ object GogLibrary { saveCache(p, list) return SyncResult.Ok(list.sortedBy { it.title.lowercase() }, 0) } - onStatus("Syncing ${idsToFetch.size} game${if (idsToFetch.size == 1) "" else "s"}…") + onStatus(app.resources.getQuantityString(R.plurals.stores_sync_games, idsToFetch.size, idsToFetch.size)) val pool = Executors.newFixedThreadPool(5) val futures = idsToFetch.map { id -> pool.submit(Callable<GogGame?> { fetchGame(p, id, token, skipped) }) } pool.shutdown() @@ -99,7 +90,7 @@ object GogLibrary { for ((idx, f) in futures.withIndex()) { val g = runCatching { f.get() }.getOrNull() if (g != null) { merged[g.gameId] = g; fetched++ } - if ((idx + 1) % 5 == 0) onStatus("Syncing… ${idx + 1}/${futures.size}") + if ((idx + 1) % 5 == 0) onStatus(app.getString(R.string.stores_sync_progress, idx + 1, futures.size)) } val finalList = merged.values.toList() saveCache(p, finalList) @@ -110,15 +101,13 @@ object GogLibrary { return SyncResult.Ok(finalList.sortedBy { it.title.lowercase() }, fetched) } catch (e: Exception) { Log.w(TAG, "sync failed: ${e.message}") - return SyncResult.Failed(e.message ?: "Sync failed") + return SyncResult.Failed(e.message ?: context.getString(R.string.stores_sync_failed)) } finally { syncing.set(false) } } - /** One product's details, or null for anything that is not a Windows game (DLC, movies, other platforms). */ private fun fetchGame(prefs: SharedPreferences, id: String, token: String, skipped: MutableSet<String>): GogGame? { - // Not a game this app installs: remembered, so the next sync does not ask again. fun skip(): GogGame? { skipped.add(id); return null } try { val productJson = StoreNet.get("https://api.gog.com/products/$id?expand=downloads,description", bearer = token) ?: return null @@ -129,10 +118,6 @@ object GogLibrary { var title = prod.optJSONObject("title")?.optString("*") if (title.isNullOrEmpty()) title = prod.optString("title") if (title.isNullOrEmpty()) return skip() - // Card art from the v2 game record, the way the Galaxy client draws its library: the dark - // Galaxy background for the wide card and the box art for the tall one. The product's - // `images.background` is the store page's fade-out backdrop (it ends in white on a - // card) and is never used; the logo or icon is the last resort. val images = prod.optJSONObject("images") var imageUrl = "" var boxArt = "" @@ -143,12 +128,17 @@ object GogLibrary { } if (imageUrl.isEmpty()) imageUrl = images?.optString("logo2x", "") ?: "" if (imageUrl.isEmpty()) imageUrl = images?.optString("icon", "") ?: "" - // The account endpoint hands back template keys for some products; the v2 record's text - // is tried next, and when that is a template too the game simply has no description. val desc = cleanStoreText(prod.optJSONObject("description")?.optString("lead", "")) .ifEmpty { cleanStoreText(v2?.optString("overview", "")) } .ifEmpty { cleanStoreText(v2?.optString("description", "")) } - val developer = prod.optJSONObject("developers")?.optString("name", "") ?: prod.optString("developer", "") + val embedded = v2?.optJSONObject("_embedded") + fun names(key: String) = embedded?.optJSONArray(key) + ?.let { arr -> (0 until arr.length()).mapNotNull { arr.optJSONObject(it)?.optString("name")?.takeIf(String::isNotBlank) } } + ?.joinToString(", ").orEmpty() + val developer = names("developers") + val publisher = embedded?.optJSONObject("publisher")?.optString("name")?.takeIf(String::isNotBlank) ?: names("publishers") + val releaseDate = listOf(embedded?.optJSONObject("product")?.optString("globalReleaseDate"), prod.optString("release_date")) + .firstOrNull { !it.isNullOrBlank() && it != "null" }.orEmpty() val genres = prod.optJSONArray("genres") val category = if (genres != null && genres.length() > 0) genres.optJSONObject(0)?.optString("name", "") ?: "" else "" @@ -164,9 +154,7 @@ object GogLibrary { if (maxGen > 0) generation = maxGen } } - val ed = prefs.edit().putInt("gen_$id", generation) - prod.optString("release_date", "").takeIf { it.isNotEmpty() }?.let { ed.putString("release_$id", it) } - ed.apply() + prefs.edit().putInt("gen_$id", generation).apply() if (prefs.getLong("size_$id", -1L) <= 0) { val size = GogDownloadManager.fetchInstallSizeBytes(id, token) if (size > 0) prefs.edit().putLong("size_$id", size).apply() @@ -182,7 +170,7 @@ object GogLibrary { verticalCover = fetchVerticalCover(id).ifEmpty { StoreNet.sgdbPoster(title) } } if (!verticalCover.isNullOrEmpty()) prefs.edit().putString("vcover_$id", verticalCover).apply() - return GogGame(id, title, GogStoreCatalog.absolutize(imageUrl), desc, developer, category, generation, verticalCover?.ifEmpty { null }) + return GogGame(id, title, GogStoreCatalog.absolutize(imageUrl), desc, developer, category, generation, verticalCover?.ifEmpty { null }, releaseDate, publisher) } catch (_: Exception) { return null } @@ -203,19 +191,19 @@ object GogLibrary { val arr = JSONArray() for (g in games) { arr.put(JSONObject().put("gameId", g.gameId).put("title", g.title).put("imageUrl", g.imageUrl).put("description", g.description) - .put("developer", g.developer).put("category", g.category).put("generation", g.generation) + .put("developer", g.developer).put("category", g.category).put("generation", g.generation).put("releaseDate", g.releaseDate).put("publisher", g.publisher) .apply { if (!g.verticalCover.isNullOrEmpty()) put("verticalCover", g.verticalCover) }) } prefs.edit().putString(CACHE_KEY, arr.toString()).apply() } } - /** A cached game as the page's card. */ fun toCatalogItem(context: Context, g: GogGame): CatalogItem = CatalogItem( store = Store.GOG, id = g.gameId, title = g.title, imageUrl = GogStoreCatalog.absolutize(g.imageUrl).ifBlank { null }, tallImageUrl = GogStoreCatalog.absolutize(g.verticalCover ?: g.imageUrl).ifBlank { null }, - tags = g.category, developer = g.developer, description = g.description, owned = true, + tags = g.category, developer = g.developer, publisher = g.publisher, description = g.description, owned = true, + releaseDate = g.releaseDate.ifEmpty { GogPrefs.get(context).getString("release_${g.gameId}", "").orEmpty() }, sizeBytes = sizeOf(context, g.gameId), storeUrl = "https://www.gog.com/en/game/${g.gameId}", ) diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogNative.kt b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogNative.kt index 0922eda9af..f8ab86b14f 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogNative.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogNative.kt @@ -1,52 +1,27 @@ -// JNI symbols depend on this package path and class name (app/src/main/rust/stores/JNI.md). package com.droiddeck.launcher.stores.gog import android.util.Log import com.droiddeck.launcher.stores.StoresNative -/** - * The native GOG download engine in `libdroiddeckstores.so`: the gen2 chunk loop (depot manifests - * → chunk fetch + inflate + MD5 → assembled files) and the gen1 range loop. One [start] is one - * download loop; the manager owns everything before and after it. Method names and signatures - * are Bannerlator's `BlGogDownload`, only the package and class changed. - */ object GogNative { private const val TAG = "GogNative" - /** gen2: depot manifests → chunk fetch + inflate + MD5 (base install, DLC, dependencies). */ const val KIND_GEN2_CHUNKS = 0 - /** gen1: build manifest → per-file HTTP Range GET streamed to disk. */ const val KIND_GEN1_RANGES = 1 - /** Callbacks from the engine; every method runs on a native thread. */ interface Listener { - /** - * One file reached its final state. [verified] = resume-skip (existing file passed size+MD5; - * no bytes credited); otherwise a freshly assembled, verified and renamed file ([fileBytes] - * = its decompressed size). [filesDone] counts both; [bytesDone] counts assembled bytes only. - */ fun onProgress(bytesDone: Long, bytesTotal: Long, filesDone: Int, filesTotal: Int, file: String, fileBytes: Long, verified: Boolean) - /** - * Byte progress between file completions, every 250 ms while fetching (and once at the end): - * assembled bytes plus what the files in flight have so far. Drives the bar and the speed. - */ fun onBytes(bytesDone: Long, bytesTotal: Long) - /** Engine diagnostics (already in logcat under `GogNative`). */ fun onLog(line: String) - /** - * Exactly once per [start] that returned a non-zero handle. [linkExpiry] = the run died on an - * HTTP 401/403/404/500, the codes an expired secure link returns: refresh it and run again. - */ fun onComplete(success: Boolean, cancelled: Boolean, linkExpiry: Boolean, error: String, bytesWritten: Long, filesDone: Int) } @Volatile private var available: Boolean? = null - /** True when the library loads and the GOG exports bind. Cached after the first call. */ @JvmStatic fun isAvailable(): Boolean { available?.let { return it } @@ -60,10 +35,6 @@ object GogNative { return ok } - /** - * Starts one download loop on a native thread; returns its handle (0 = not started, no - * callbacks). See JNI.md for the parameters; they are what the manager already holds. - */ @JvmStatic fun start( kind: Int, depotManifests: Array<String>, cdnBases: Array<String>, installDir: String, skipPaths: Array<String>, @@ -78,14 +49,12 @@ object GogNative { } } - /** Requests cancellation; `onComplete(cancelled = true)` follows. Idempotent; 0 is a no-op. */ @JvmStatic fun cancel(handle: Long) { if (handle == 0L) return runCatching { nativeCancel(handle) } } - /** Releases the handle, once, after `onComplete`. */ @JvmStatic fun release(handle: Long) { if (handle == 0L) return diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogPrefs.kt b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogPrefs.kt index b5a3af6cb9..f67e26cba4 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogPrefs.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogPrefs.kt @@ -3,12 +3,6 @@ package com.droiddeck.launcher.stores.gog import android.content.Context import android.content.SharedPreferences -/** - * GOG's own records that are not credentials: the library cache, per-game facts the sync learnt - * (generation, release date, size, cover), a build's client id. App-private preferences; the - * sign-in itself lives in StoreAccounts. Public, not internal: the Java download manager reads it - * and Kotlin mangles internal members' names for Java. - */ object GogPrefs { @JvmStatic fun get(context: Context): SharedPreferences = context.applicationContext.getSharedPreferences("stores.gog", Context.MODE_PRIVATE) diff --git a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogStoreCatalog.kt b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogStoreCatalog.kt index bad1caff4f..7ec7454cba 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/gog/GogStoreCatalog.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/gog/GogStoreCatalog.kt @@ -14,19 +14,11 @@ import java.util.Currency import java.util.Locale import java.util.concurrent.ConcurrentHashMap -/** - * GOG's public catalog - the same unauthenticated service the gog.com store page uses: - * `catalog.gog.com/v1/catalog?order=desc:trending&productType=in:game,pack&...` with `discounted`, - * `price=between:0,0` and `query=like:` filters. Products carry pre-formatted prices and a - * discount string; Windows-only titles are kept. Cached in-process (shelves 30 min, searches - * 5 min) and the last good shelves mirrored to prefs so the tab paints offline too. - */ object GogStoreCatalog { private const val TAG = "GogStore" private const val CATALOG = "https://catalog.gog.com/v1/catalog" private const val FEATURED_TTL_MS = 3 * 60 * 60 * 1000L private const val SEARCH_TTL_MS = 5 * 60 * 1000L - // v2: entries carry the mature mark; an older cache would show everything until it aged out. private const val KEY_FEATURED = "store_featured_v2" private val supportedCurrencies = setOf( @@ -48,7 +40,6 @@ object GogStoreCatalog { private fun baseQuery(limit: Int, order: String, extra: String = ""): String = "$CATALOG?limit=$limit&order=$order&productType=in:game,pack&page=1&countryCode=${country()}&locale=en-US¤cyCode=${currency()}$extra" - /** GET the catalog; on a refusal of the locale's currency, retry as US / USD. */ private fun fetchProducts(url: String): List<CatalogItem> { var body = StoreNet.get(url) if (body == null && !url.contains("countryCode=US&locale=en-US¤cyCode=USD")) { @@ -57,11 +48,9 @@ object GogStoreCatalog { return if (body == null) emptyList() else parseProducts(body) } - /** The Store tab's shelves. Null only when every feed failed and nothing is cached. Blocking. */ fun featured(context: Context, force: Boolean = false): StoreShelves? { val now = System.currentTimeMillis() featuredCache?.let { if (!force && now - it.at < FEATURED_TTL_MS) return it.value } - // Shelves saved on an earlier run are as good while they are young: shown, not fetched again. if (!force && now - GogPrefs.get(context).getLong("store_featured_at", 0L) < FEATURED_TTL_MS) cachedFeatured(context)?.let { return it } val trending = fetchProducts(baseQuery(24, "desc:trending")) val newest = fetchProducts(baseQuery(40, "desc:releaseDate")).filter { !isFuture(it.releaseDate) }.take(24) @@ -105,7 +94,6 @@ object GogStoreCatalog { val id = p.optString("id", "") val title = p.optString("title", "") if (id.isEmpty() || title.isEmpty()) return null - // Windows only: the app cannot run anything else. val os = p.optJSONArray("operatingSystems") if (os != null && os.length() > 0) { var windows = false @@ -133,17 +121,13 @@ object GogStoreCatalog { finalPrice = finalStr, originalPrice = if (discount > 0) baseStr else "", discountPercent = if (discount > 0 && baseStr.isNotBlank()) discount else 0, storeUrl = storeLink, developer = p.optJSONArray("developers")?.optString(0, "").orEmpty(), + publisher = p.optJSONArray("publishers")?.optString(0, "").orEmpty(), releaseDate = p.optString("releaseDate", ""), extra = buildMap { if (slug.isNotBlank()) put("slug", slug) }, mature = mature, ) } - /** - * GOG's own data: `ratings[]` carries each system's age (`esrbRating` 17, `pegiRating` 18, - * `uskRating` 18, `gogRating` 18, ...) and `tags[]` its content tags (`mature`, `nsfw`, - * `sexual-content`, `nudity`). The catalog has no filter for either, so this is client-side. - */ fun isMature(p: JSONObject): Boolean { val ages = ArrayList<Int>() p.optJSONArray("ratings")?.let { r -> for (i in 0 until r.length()) r.optJSONObject(i)?.optString("ageRating")?.toIntOrNull()?.let { ages.add(it) } } @@ -152,14 +136,12 @@ object GogStoreCatalog { return com.droiddeck.launcher.stores.matureByAge(ages) || com.droiddeck.launcher.stores.matureByTags(tags) } - /** GOG returns protocol-relative `//images…` URLs in a few places. */ @JvmStatic fun absolutize(url: String?): String { if (url.isNullOrBlank()) return "" return if (url.startsWith("//")) "https:$url" else url } - /** "YYYY.MM.DD" later than today: a pre-order, kept out of What's new. */ private fun isFuture(date: String): Boolean { if (date.length < 10) return false val parts = date.substring(0, 10).split('.', '-') @@ -175,7 +157,7 @@ object GogStoreCatalog { private fun itemToJson(i: CatalogItem): JSONObject = JSONObject().apply { put("id", i.id); put("title", i.title); put("image", i.imageUrl ?: ""); put("tall", i.tallImageUrl ?: "") put("tags", i.tags); put("free", i.isFree); put("hasPrice", i.hasPrice); put("final", i.finalPrice); put("orig", i.originalPrice) - put("disc", i.discountPercent); put("url", i.storeUrl); put("dev", i.developer); put("rel", i.releaseDate) + put("disc", i.discountPercent); put("url", i.storeUrl); put("dev", i.developer); put("pub", i.publisher); put("rel", i.releaseDate) if (i.mature) put("mature", true) } @@ -184,7 +166,7 @@ object GogStoreCatalog { imageUrl = o.optString("image").ifBlank { null }, tallImageUrl = o.optString("tall").ifBlank { null }, tags = o.optString("tags"), isFree = o.optBoolean("free"), hasPrice = o.optBoolean("hasPrice"), finalPrice = o.optString("final"), originalPrice = o.optString("orig"), discountPercent = o.optInt("disc"), - storeUrl = o.optString("url"), developer = o.optString("dev"), releaseDate = o.optString("rel"), + storeUrl = o.optString("url"), developer = o.optString("dev"), publisher = o.optString("pub"), releaseDate = o.optString("rel"), mature = o.optBoolean("mature"), ) diff --git a/app/src/main/java/com/droiddeck/launcher/ui/AchievementNotificationOverlay.kt b/app/src/main/java/com/droiddeck/launcher/ui/AchievementNotificationOverlay.kt new file mode 100644 index 0000000000..828c1cd996 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/AchievementNotificationOverlay.kt @@ -0,0 +1,96 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.slideInVertically +import androidx.compose.animation.slideOutVertically +import androidx.compose.foundation.background +import androidx.compose.foundation.border +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.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.shape.RoundedCornerShape +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.layout.ContentScale +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import coil.compose.AsyncImage +import com.droiddeck.launcher.R +import com.droiddeck.launcher.session.SessionEvents +import com.droiddeck.launcher.stores.AchievementNotifications +import kotlinx.coroutines.delay + +@Composable +internal fun AchievementNotificationOverlay() { + val unlock = AchievementNotifications.pending.firstOrNull() + var visible by remember(unlock) { mutableStateOf(false) } + LaunchedEffect(unlock) { + if (unlock == null) return@LaunchedEffect + visible = true + SessionEvents.record("achievement.notification-shown", mapOf("achievementId" to unlock.id)) + delay(5_000) + visible = false + delay(Motion.ms(220).toLong()) + AchievementNotifications.dismiss(unlock) + } + Box(Modifier.fillMaxSize().padding(20.dp), contentAlignment = Alignment.BottomEnd) { + AnimatedVisibility( + visible, enter = fadeIn(Motion.tw(220)) + slideInVertically(Motion.tw(300)) { it / 2 }, + exit = fadeOut(Motion.tw(180)) + slideOutVertically(Motion.tw(220)) { it / 3 }, + ) { if (unlock != null) AchievementNotificationCard(unlock) } + } +} + +@Composable +private fun AchievementNotificationCard(unlock: AchievementNotifications.Unlock) { + val pal = LocalPalette.current + val shape = RoundedCornerShape(16.dp) + Row( + Modifier.widthIn(max = 360.dp).clip(shape).background(pal.surface.copy(alpha = 0.97f)) + .border(1.dp, pal.signal.copy(alpha = 0.65f), shape).padding(14.dp) + .testTag("achievement-notification"), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + Box(Modifier.size(48.dp).clip(RoundedCornerShape(10.dp)).background(pal.surfaceVariant), contentAlignment = Alignment.Center) { + Trophy(26.dp, description = null) + if (unlock.icon != null) AsyncImage(unlock.icon, null, contentScale = ContentScale.Crop, modifier = Modifier.fillMaxSize()) + } + Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(3.dp)) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(5.dp)) { + Trophy(13.dp, description = null) + Text(stringResource(R.string.achievement_unlocked).uppercase(), fontSize = 10.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 0.8.sp, color = pal.signal) + } + Text(unlock.name, color = pal.onBackground, fontSize = 15.sp, fontWeight = FontWeight.Bold, maxLines = 2, overflow = TextOverflow.Ellipsis) + if (unlock.game.isNotBlank()) Text(unlock.game, color = pal.onSurfaceVariant, fontSize = 12.sp, maxLines = 1, overflow = TextOverflow.Ellipsis) + } + } +} + +@Preview(widthDp = 420, heightDp = 150) +@Composable +private fun AchievementNotificationPreview() = DroidDeckTheme { + Box(Modifier.padding(20.dp)) { + AchievementNotificationCard(AchievementNotifications.Unlock("1", "first", "First Steps", "", null, "Hollow Valley")) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/AddAppDialog.kt b/app/src/main/java/com/droiddeck/launcher/ui/AddAppDialog.kt index 31b8f46d6c..bc9618c965 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/AddAppDialog.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/AddAppDialog.kt @@ -111,10 +111,8 @@ private enum class AddSource(val label: Int, val hint: Int) { private val ICON_TYPES = listOf("png", "jpg", "jpeg", "webp") private val FieldShape = RoundedCornerShape(8.dp) -/** What an icon choice shows: a picked file, or a suggestion's link. */ private fun iconModel(ref: String): Any = if (ref.startsWith("https://")) ref else File(ref) -/** The Desktop page's Add: a script, an AppImage, a GitHub release or a Flatpak, with a name and icon. */ @Composable internal fun AddAppDialog(runtimeReady: Boolean, onDismiss: () -> Unit, onAdd: (UserApps.Request, String) -> Unit) { val ctx = LocalContext.current @@ -159,7 +157,6 @@ internal fun AddAppDialog(runtimeReady: Boolean, onDismiss: () -> Unit, onAdd: ( val busy = UserAppsState.working val tabFocus = remember { AddSource.entries.map { FocusRequester() } } val inputMode = LocalInputModeManager.current.inputMode - // Once, as it opens: typing a name switches the input mode too, and must keep its field. LaunchedEffect(Unit) { if (inputMode == InputMode.Keyboard) { repeat(2) { androidx.compose.runtime.withFrameNanos { } } @@ -240,10 +237,6 @@ internal fun AddAppDialog(runtimeReady: Boolean, onDismiss: () -> Unit, onAdd: ( } } -/** - * An added app's name and icon, changed on its page. [icon]: null keeps the current one, "" goes - * back to the default, else a picked file or a suggestion. - */ @Composable internal fun EditAppDialog(app: UserApps.App, onDismiss: () -> Unit, onSave: (String, String?, String?) -> Unit) { val ctx = LocalContext.current @@ -299,7 +292,6 @@ internal fun EditAppDialog(app: UserApps.App, onDismiss: () -> Unit, onSave: (St } } -/** Open from the first frame; [onDismiss] once the closing animation has run. */ @Composable internal fun rememberShown(onDismiss: () -> Unit): MutableTransitionState<Boolean> { val shown = remember { MutableTransitionState(false).apply { targetState = true } } @@ -307,25 +299,17 @@ internal fun rememberShown(onDismiss: () -> Unit): MutableTransitionState<Boolea return shown } -/** - * The card both dialogs sit in, sized to fit a landscape handheld without scrolling: it scales in - * like the app's menus, rises above the keyboard, and closes on a tap outside or B. - */ @Composable internal fun AppDialog( shown: MutableTransitionState<Boolean>, close: () -> Unit, label: String, wide: Boolean, modifier: Modifier = Modifier, maxWidth: Dp? = null, - /** [width] fixed, else as wide as its content when [fitContent], else as wide as it may be. */ width: Dp? = null, fitContent: Boolean = false, - /** What B / Back does, when not [close] (a picker goes up a folder first). */ back: (() -> Unit)? = null, content: @Composable ColumnScope.() -> Unit, ) { val pal = LocalPalette.current - // The page's ring stays out of sight behind it. VeilRing() Dialog(onDismissRequest = back ?: close, properties = DialogProperties(usePlatformDefaultWidth = false, decorFitsSystemWindows = false)) { - // The page's focus memory stays the page's: nothing in here is a place to come back to. CompositionLocalProvider(LocalFrontFocus provides null) { Box( contentAlignment = Alignment.Center, @@ -368,7 +352,6 @@ internal fun AppDialog( } } -/** The eyebrow and title, with [trailing] (the tabs) beside them when there is room, else under them. */ @Composable internal fun DialogHeader(eyebrow: String, title: String, trailing: (@Composable () -> Unit)? = null) { val heading = @Composable { @@ -391,7 +374,6 @@ internal fun DialogHeader(eyebrow: String, title: String, trailing: (@Composable } } -/** Side by side and of one height on a wide card, stacked on a narrow one. */ @Composable private fun Columns(first: @Composable ColumnScope.() -> Unit, second: @Composable ColumnScope.() -> Unit) { Rise(1) { @@ -407,7 +389,6 @@ private fun Columns(first: @Composable ColumnScope.() -> Unit, second: @Composab } } -/** A titled inset of the card; it fills the height its column is given. */ @Composable private fun Panel(title: String, content: @Composable ColumnScope.() -> Unit) { val colors = MaterialTheme.colorScheme @@ -421,7 +402,6 @@ private fun Panel(title: String, content: @Composable ColumnScope.() -> Unit) { } } -/** Why the main button is off (or nothing), then Cancel and the main button, at the card's foot. */ @Composable internal fun DialogFooter(note: String?, confirm: String, enabled: Boolean, onCancel: () -> Unit, onConfirm: () -> Unit) { val lineColor = LocalPalette.current.line @@ -446,7 +426,6 @@ private fun hideKeyboard(view: View) { ?.hideSoftInputFromWindow(view.windowToken, 0) } -/** The app's text field, with what is wrong with its value under it. */ @Composable private fun CheckedField(value: String, onChange: (String) -> Unit, label: String, placeholder: String, problem: String?) { val view = LocalView.current @@ -468,7 +447,6 @@ private fun NameField(name: String, onName: (String) -> Unit, placeholder: Strin ) } -/** The app as the Desktop page will show it: its icon, its name ([name] null: not known yet) and kind. */ @Composable private fun AppPreview(icon: Any?, glyph: ImageVector, name: String?, kind: String) { val colors = MaterialTheme.colorScheme @@ -493,7 +471,6 @@ private fun AppPreview(icon: Any?, glyph: ImageVector, name: String?, kind: Stri } } -/** The icon's picker and [clear] (a label and what it does). */ @Composable private fun IconActions(onChoose: () -> Unit, clear: Pair<Int, () -> Unit>?) { Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { @@ -504,7 +481,6 @@ private fun IconActions(onChoose: () -> Unit, clear: Pair<Int, () -> Unit>?) { } } -/** Icons found in [repo], looked up off the main thread once the name has settled; [selected] is ringed. */ @Composable private fun IconSuggestions(repo: String, selected: String?, onPick: (String) -> Unit) { val found by produceState<List<String>?>(null, repo) { @@ -537,7 +513,6 @@ private fun SuggestedIcon(url: String, selected: Boolean, onClick: () -> Unit) { .controllerConfirm(onClick = onClick), ) { AsyncImage(model = ImageRequest.Builder(LocalContext.current).data(url).crossfade(true).build(), contentDescription = stringResource(R.string.add_app_icon), contentScale = ContentScale.Fit, modifier = Modifier.size(34.dp)) - // The chosen one is ticked; the ring stays with focus. if (selected) Box( contentAlignment = Alignment.Center, modifier = Modifier.align(Alignment.TopEnd).padding(2.dp).size(14.dp).clip(androidx.compose.foundation.shape.CircleShape).background(pal.signal), @@ -545,7 +520,6 @@ private fun SuggestedIcon(url: String, selected: Boolean, onClick: () -> Unit) { } } -/** The chosen file, or none yet, laid out like the app's text fields, with the button that picks it. */ @Composable private fun FileRow(path: String?, onChoose: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -567,7 +541,6 @@ private fun FileRow(path: String?, onChoose: () -> Unit) { } } -/** Whether the script's folder will be linked or copied in, worked out off the main thread. */ @Composable private fun FolderNote(scriptPath: String) { var plan by remember(scriptPath) { mutableStateOf<UserApps.ScriptPlan?>(null) } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/AddedGameEditor.kt b/app/src/main/java/com/droiddeck/launcher/ui/AddedGameEditor.kt index 1822ee5279..cec6c7a426 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/AddedGameEditor.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/AddedGameEditor.kt @@ -22,6 +22,8 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Close import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.outlined.Image +import androidx.compose.material.icons.outlined.Search +import androidx.compose.material.icons.outlined.Tune import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -40,6 +42,7 @@ import androidx.compose.ui.focus.FocusRequester import androidx.compose.ui.focus.focusRequester import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalConfiguration +import android.content.Context import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.res.stringResource @@ -56,15 +59,18 @@ import com.droiddeck.launcher.R import com.droiddeck.launcher.frontend.AddedGameArt import com.droiddeck.launcher.frontend.AddedGameEdits import com.droiddeck.launcher.frontend.AddedGames +import com.droiddeck.launcher.frontend.LogoPosition +import com.droiddeck.launcher.frontend.SteamGameArt +import com.droiddeck.launcher.frontend.SteamGridDb import com.droiddeck.launcher.session.SessionPrefs import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import java.io.File -/** Each art slot's thumbnail, in its true shape: width, height, corner. */ private fun AddedGameArt.Slot.shape(): Triple<Dp, Dp, Dp> = when (this) { AddedGameArt.Slot.COVER -> Triple(28.dp, 41.dp, 5.dp) + AddedGameArt.Slot.WIDE -> Triple(60.dp, 28.dp, 5.dp) AddedGameArt.Slot.BACKGROUND -> Triple(60.dp, 34.dp, 5.dp) AddedGameArt.Slot.LOGO -> Triple(60.dp, 26.dp, 5.dp) AddedGameArt.Slot.ICON -> Triple(30.dp, 30.dp, 7.dp) @@ -74,6 +80,7 @@ private fun AddedGameArt.Slot.shape(): Triple<Dp, Dp, Dp> = when (this) { private fun AddedGameArt.Slot.label(): String = stringResource( when (this) { AddedGameArt.Slot.COVER -> R.string.art_cover + AddedGameArt.Slot.WIDE -> R.string.art_wide_cover AddedGameArt.Slot.BACKGROUND -> R.string.art_background AddedGameArt.Slot.LOGO -> R.string.art_logo AddedGameArt.Slot.ICON -> R.string.art_icon @@ -92,7 +99,6 @@ private fun artSourceLabel(source: String): String = stringResource( }, ) -/** A thumbnail of [model] (a file or URL) in [slot]'s shape, scaled by [scale]. */ @Composable private fun SlotThumb(slot: AddedGameArt.Slot, model: Any?, scale: Float = 1f, selected: Boolean = false) { val pal = LocalPalette.current @@ -110,7 +116,6 @@ private fun SlotThumb(slot: AddedGameArt.Slot, model: Any?, scale: Float = 1f, s } } -/** A row of the editor: a label column, then the value. */ @Composable private fun FieldRow(label: String, focus: FocusRequester? = null, onClick: () -> Unit, value: @Composable () -> Unit) { ListRow(focus = focus, onClick = onClick) { @@ -119,20 +124,13 @@ private fun FieldRow(label: String, focus: FocusRequester? = null, onClick: () - } } -/** Where the editor opens: its game's folder, straight on Target, and whether it came from the added-games summary. */ internal class EditRequest(val folder: String, val openTarget: Boolean, val fromSummary: Boolean, val preview: EditPreview) -/** - * What the editor shows on its first frame, from what the page already has (the game's row, or - * the summary's); the rest (the ranked exes, where each piece of art came from) follows. - * [exeName] / [startIn] null = not known yet. - */ internal class EditPreview( val name: String, val exeName: String?, val startIn: String?, val launchOptions: String, val art: Map<AddedGameArt.Slot, File?>, ) { companion object { - /** From the Games tab's row for [game] and the few preferences the edits keep. */ fun of(context: android.content.Context, game: com.droiddeck.launcher.frontend.Library.SteamGame, folder: String): EditPreview { val exe = SessionPrefs.addedGameExe(context, folder).ifEmpty { com.droiddeck.launcher.frontend.AddedExes.list(context).firstOrNull { it.folder == folder && it.picked }?.exe.orEmpty() @@ -144,28 +142,141 @@ internal class EditPreview( ) } - /** From a summary row's game and its cover. */ fun of(game: AddedGames.Game, cover: File?) = EditPreview( game.name, game.exe.name, game.guestDir.substringAfterLast('/'), game.launchOptions, mapOf(AddedGameArt.Slot.COVER to cover), ) } } -/** A small spinner where a value is still being read. */ +internal class ArtTarget( + val name: String, + val chosenRef: (Context, AddedGameArt.Slot) -> String, + val choices: (Context, AddedGameArt.Slot) -> AddedGameArt.Choices, + val set: (Context, AddedGameArt.Slot, AddedGameArt.Option) -> Boolean, + val reset: (Context, AddedGameArt.Slot) -> Unit, + val position: (Context) -> LogoPosition.Value?, + val setPosition: (Context, LogoPosition.Value?) -> Boolean, +) { + companion object { + fun of(game: AddedGames.Game) = ArtTarget( + game.name, + { c, slot -> AddedGameArt.chosenSource(c, game, slot).second }, + { c, slot -> AddedGameArt.choices(c, game, slot) }, + { c, slot, option -> AddedGameEdits.setArt(c, game.folder.path, slot, option) }, + { c, slot -> AddedGameEdits.resetArt(c, game.folder.path, slot) }, + { c -> AddedGameEdits.logoPosition(c, game.folder.path) }, + { c, value -> AddedGameEdits.setLogoPosition(c, game.folder.path, value) }, + ) + + fun of(game: com.droiddeck.launcher.frontend.Library.SteamGame) = ArtTarget( + game.name, + { c, slot -> SteamGameArt.chosenSource(c, game.appId, slot).second }, + { c, slot -> SteamGameArt.choices(c, game, slot) }, + { c, slot, option -> SteamGameArt.choose(c, game, slot, option) }, + { c, slot -> SteamGameArt.reset(c, game, slot) }, + { c -> SteamGameArt.position(c, game) }, + { c, value -> SteamGameArt.setPosition(c, game, value) }, + ) + } +} + +@Composable +internal fun SteamGameArtEditor( + game: com.droiddeck.launcher.frontend.Library.SteamGame, onClose: () -> Unit, onChanged: () -> Unit, +) { + val target = remember(game.appId) { ArtTarget.of(game) } + ArtOnlyEditor(game.name, target, game, { SteamGameArt.describe(it, game) }, onClose, onChanged) +} + +@Composable +internal fun StoreGameArtEditor(folder: String, name: String, onClose: () -> Unit, onChanged: () -> Unit) { + val app = LocalContext.current.applicationContext + var game by remember(folder) { mutableStateOf<AddedGames.Game?>(null) } + LaunchedEffect(folder) { game = withContext(Dispatchers.IO) { AddedGameEdits.game(app, folder) } } + val g = game + val target = remember(g?.appId) { g?.let { ArtTarget.of(it) } } + ArtOnlyEditor(name, target, g, { c -> g?.let { AddedGameArt.describe(c, it) }.orEmpty() }, onClose, onChanged) +} + +@Composable +private fun ArtOnlyEditor( + name: String, target: ArtTarget?, refresh: Any?, describe: (Context) -> List<AddedGameArt.SlotState>, + onClose: () -> Unit, onChanged: () -> Unit, +) { + val app = LocalContext.current.applicationContext + val colors = MaterialTheme.colorScheme + val shown = rememberShown(onClose) + val close = { shown.targetState = false } + var version by remember { mutableIntStateOf(0) } + var arts by remember { mutableStateOf<List<AddedGameArt.SlotState>>(emptyList()) } + var artSlot by remember { mutableStateOf<AddedGameArt.Slot?>(null) } + var logoOpen by remember { mutableStateOf(false) } + val position = rememberLogoPosition(target, version) + LaunchedEffect(version, refresh) { if (target != null) arts = withContext(Dispatchers.IO) { describe(app) } } + val first = remember { FocusRequester() } + LaunchedEffect(Unit) { focusWithinFrames({ false }) { first } } + AppDialog(shown, close, "artEditor", wide = false, maxWidth = 460.dp) { + DialogTitleRow(name, onClose = close) + val maxHeight = (LocalConfiguration.current.screenHeightDp * 0.72f).dp + Column( + verticalArrangement = Arrangement.spacedBy(6.dp), + modifier = Modifier.fillMaxWidth().heightIn(max = maxHeight).verticalScroll(rememberScrollState()), + ) { + Text(stringResource(R.string.edit_artwork), fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(start = 4.dp, top = 2.dp)) + for (slot in AddedGameArt.Slot.values()) key(slot) { + val state = arts.firstOrNull { it.slot == slot } + FieldRow(slot.label(), focus = if (slot == AddedGameArt.Slot.COVER) first else null, onClick = { if (target != null) artSlot = slot }) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) { + SlotThumb(slot, state?.file) + if (state != null) ValueText(artSourceLabel(state.source), muted = true) else Loading() + } + } + } + PickerRow(Icons.Outlined.Tune, stringResource(R.string.art_adjust_logo), logoPositionSummary(position?.value), enabled = target != null && position != null) { logoOpen = true } + } + } + val chosen = target ?: return + artSlot?.let { slot -> + ArtChooserDialog(chosen, slot, arts.firstOrNull { it.slot == slot }, onBack = { artSlot = null }, onCloseAll = { artSlot = null; close() }) { version++; onChanged() } + } + val loaded = position + if (logoOpen && loaded != null) LogoPositionHost(chosen, arts, loaded, onBack = { logoOpen = false }, onCloseAll = { logoOpen = false; close() }) { version++; onChanged() } +} + +/** The position as last read; null until it has been read, so the screen never opens on a guess and saves it over the real one. */ +private class LoadedPosition(val value: LogoPosition.Value?) + +@Composable +private fun rememberLogoPosition(target: ArtTarget?, version: Int): LoadedPosition? { + val app = LocalContext.current.applicationContext + var position by remember(target) { mutableStateOf<LoadedPosition?>(null) } + LaunchedEffect(target, version) { + position = if (target == null) null else withContext(Dispatchers.IO) { LoadedPosition(runCatching { target.position(app) }.getOrNull()) } + } + return position +} + +/** The "Adjust logo" screen for [target], over the game's background and logo as they are now. */ +@Composable +private fun LogoPositionHost( + target: ArtTarget, arts: List<AddedGameArt.SlotState>, start: LoadedPosition, + onBack: () -> Unit, onCloseAll: () -> Unit, onChanged: () -> Unit, +) { + fun file(slot: AddedGameArt.Slot) = arts.firstOrNull { it.slot == slot }?.file + LogoPositionDialog( + target, hero = file(AddedGameArt.Slot.BACKGROUND) ?: file(AddedGameArt.Slot.WIDE), logo = file(AddedGameArt.Slot.LOGO), start = start.value, + onBack = onBack, onCloseAll = onCloseAll, onChanged = onChanged, + ) +} + @Composable private fun Loading() { androidx.compose.material3.CircularProgressIndicator(Modifier.size(14.dp), strokeWidth = 2.dp) } -/** - * An added game's editor, Steam's non-Steam Properties in the app: Name, Target (the ranked exes, - * "?" where nothing clearly won, Other exe…), Start in, Launch options, the four pieces of art, and - * Remove (two presses; the files stay). Every change goes through the game's own Steam shortcut. - */ @Composable internal fun AddedGameEditor( request: EditRequest, onBack: () -> Unit, onClose: () -> Unit, onChanged: () -> Unit, - /** Remove pressed twice: the game's folder, its shortcut appid when known, its name. */ onRemove: (folder: String, appId: Long?, name: String) -> Unit, ) { val ctx = LocalContext.current @@ -184,6 +295,9 @@ internal fun AddedGameEditor( var editing by remember { mutableStateOf<String?>(null) } var otherExe by remember { mutableStateOf(false) } var artSlot by remember { mutableStateOf<AddedGameArt.Slot?>(null) } + var logoOpen by remember { mutableStateOf(false) } + val artTarget = remember(game?.appId) { game?.let { ArtTarget.of(it) } } + val position = rememberLogoPosition(artTarget, version) var unreachable by remember { mutableStateOf(false) } LaunchedEffect(version) { withContext(Dispatchers.IO) { @@ -257,10 +371,10 @@ internal fun AddedGameEditor( } } } + PickerRow(Icons.Outlined.Tune, stringResource(R.string.art_adjust_logo), logoPositionSummary(position?.value), enabled = g != null && position != null) { logoOpen = true } RemoveRow(armed) { if (!armed) armed = true else { armed = false - // At once: the page drops the game and the rest runs off this dialog's life. onRemove(folder, game?.appId, game?.name ?: preview.name) if (request.fromSummary) onBack() close() @@ -300,11 +414,13 @@ internal fun AddedGameEditor( }) artSlot?.let { slot -> val current = arts.firstOrNull { it.slot == slot } - ArtChooserDialog(g, slot, current, onBack = { artSlot = null }, onCloseAll = { artSlot = null; close() }) { version++; onChanged() } + ArtChooserDialog(ArtTarget.of(g), slot, current, onBack = { artSlot = null }, onCloseAll = { artSlot = null; close() }) { version++; onChanged() } } + val logoTarget = artTarget + val loaded = position + if (logoOpen && logoTarget != null && loaded != null) LogoPositionHost(logoTarget, arts, loaded, onBack = { logoOpen = false }, onCloseAll = { logoOpen = false; close() }) { version++; onChanged() } } -/** Start in as a path on the device: the override mapped back under the game's folder, else the exe's folder. */ private fun hostPath(context: android.content.Context, game: AddedGames.Game): String { val folderGuest = AddedGames.guestPath(context, game.folder) ?: return game.exe.parentFile?.path.orEmpty() return when { @@ -322,7 +438,6 @@ private fun ValueText(text: String, muted: Boolean = false) { ) } -/** "Remove" in red; pressed once it asks, a second press within four seconds removes. */ @Composable private fun RemoveRow(armed: Boolean, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -344,7 +459,6 @@ private fun RemoveRow(armed: Boolean, onClick: () -> Unit) { } } -/** One line of text in a compact dialog: [title] and a red X, the field, OK. */ @Composable internal fun TextEntryDialog(title: String, initial: String, onDismiss: () -> Unit, onSave: (String) -> Unit) { val shown = rememberShown(onDismiss) @@ -365,15 +479,10 @@ internal fun TextEntryDialog(title: String, initial: String, onDismiss: () -> Un } } -/** - * The art chooser for one [slot]: back, the slot's name and a red X; the images grouped by where - * they come from (the game's folder, Steam, SteamGridDB, fetched as it opens), the current one - * outlined, a tap applies it; "Pick image…" and "Reset to automatic". - */ @OptIn(ExperimentalLayoutApi::class) @Composable private fun ArtChooserDialog( - game: AddedGames.Game, slot: AddedGameArt.Slot, current: AddedGameArt.SlotState?, + target: ArtTarget, slot: AddedGameArt.Slot, current: AddedGameArt.SlotState?, onBack: () -> Unit, onCloseAll: () -> Unit, onChanged: () -> Unit, ) { val ctx = LocalContext.current @@ -383,16 +492,24 @@ private fun ArtChooserDialog( val shown = rememberShown(onBack) val back = { shown.targetState = false } var options by remember { mutableStateOf<List<AddedGameArt.Option>?>(null) } + var sgdb by remember { mutableStateOf(SteamGridDb.Status.OK) } var picking by remember { mutableStateOf(false) } - val chosenRef = remember(current) { AddedGameArt.chosenSource(app, game, slot).second } - LaunchedEffect(slot) { options = withContext(Dispatchers.IO) { runCatching { AddedGameArt.options(app, game, slot) }.getOrDefault(emptyList()) } } + var searching by remember { mutableStateOf(false) } + val chosenRef = remember(current) { target.chosenRef(app, slot) } + LaunchedEffect(slot) { + val found = withContext(Dispatchers.IO) { runCatching { target.choices(app, slot) }.getOrNull() } + options = found?.options ?: emptyList() + sgdb = found?.sgdb ?: SteamGridDb.Status.SERVER + } val first = remember { FocusRequester() } LaunchedEffect(Unit) { focusWithinFrames({ false }) { first } } val apply: (AddedGameArt.Option) -> Unit = { option -> scope.launch { - withContext(Dispatchers.IO) { AddedGameEdits.setArt(app, game.folder.path, slot, option) } - onChanged() - back() + val saved = withContext(Dispatchers.IO) { target.set(app, slot, option) } + if (saved) { + onChanged() + back() + } } } val slotName = slot.label() @@ -421,11 +538,13 @@ private fun ArtChooserDialog( } } } + if (sgdb != SteamGridDb.Status.OK) SgdbNote(sgdb) } + PickerRow(Icons.Outlined.Search, stringResource(R.string.art_search_sgdb), null) { searching = true } PickerRow(Icons.Outlined.Image, stringResource(R.string.art_pick_image), null, focus = if (opts?.isEmpty() != false) first else null) { picking = true } PickerRow(null, stringResource(R.string.art_reset), null) { scope.launch { - withContext(Dispatchers.IO) { AddedGameEdits.resetArt(app, game.folder.path, slot) } + withContext(Dispatchers.IO) { target.reset(app, slot) } onChanged() back() } @@ -435,6 +554,117 @@ private fun ArtChooserDialog( if (picking) ExePickerDialog(stringResource(R.string.art_pick_title, slotName), kind = PickKind.IMAGE, onDismiss = { picking = false }, onPick = { file -> apply(AddedGameArt.Option(AddedGameArt.FILE, file.path, file.path)) }) + if (searching) SgdbSearchDialog( + target, slot, current, + onBack = { searching = false }, onCloseAll = { searching = false; onCloseAll() }, onPick = apply, + ) +} + +@Composable +private fun SgdbNote(status: SteamGridDb.Status) { + val colors = MaterialTheme.colorScheme + val quiet = status == SteamGridDb.Status.NO_KEY || status == SteamGridDb.Status.NO_GAME + Text( + stringResource( + when (status) { + SteamGridDb.Status.NO_KEY -> R.string.art_sgdb_no_key + SteamGridDb.Status.BAD_KEY -> R.string.art_sgdb_bad_key + SteamGridDb.Status.LIMIT -> R.string.art_sgdb_limit + SteamGridDb.Status.OFFLINE -> R.string.art_sgdb_offline + SteamGridDb.Status.NO_GAME -> R.string.art_sgdb_no_game + else -> R.string.art_sgdb_server + }, + ), + fontSize = 12.sp, color = if (quiet) colors.onSurfaceVariant else colors.error, modifier = Modifier.padding(start = 2.dp, top = 4.dp), + ) +} + +@OptIn(ExperimentalLayoutApi::class) +@Composable +private fun SgdbSearchDialog( + target: ArtTarget, slot: AddedGameArt.Slot, current: AddedGameArt.SlotState?, + onBack: () -> Unit, onCloseAll: () -> Unit, onPick: (AddedGameArt.Option) -> Unit, +) { + val app = LocalContext.current.applicationContext + val colors = MaterialTheme.colorScheme + val scope = rememberCoroutineScope() + val shown = rememberShown(onBack) + val back = { shown.targetState = false } + var query by remember { mutableStateOf(target.name) } + var matches by remember { mutableStateOf<List<SteamGridDb.Game>?>(null) } + var picked by remember { mutableStateOf<SteamGridDb.Game?>(null) } + var images by remember { mutableStateOf<List<AddedGameArt.Option>>(emptyList()) } + var busy by remember { mutableStateOf(true) } + var status by remember { mutableStateOf(SteamGridDb.Status.OK) } + val chosenRef = remember(current) { target.chosenRef(app, slot) } + val slotName = slot.label() + val showImages: (SteamGridDb.Game) -> Unit = { found -> + scope.launch { + picked = found + images = emptyList() + busy = true + status = SteamGridDb.Status.OK + val result = withContext(Dispatchers.IO) { AddedGameArt.gameImages(app, found.id, slot) } + images = result.items + status = result.status + busy = false + } + } + val search: () -> Unit = { + scope.launch { + busy = true + picked = null + status = SteamGridDb.Status.OK + val result = withContext(Dispatchers.IO) { AddedGameArt.searchGames(app, query) } + matches = result.items + status = result.status + busy = false + val sure = result.items.firstOrNull { AddedGameArt.nameMatch(query, it.name) == 3 } ?: result.items.singleOrNull() + if (sure != null) showImages(sure) + } + } + LaunchedEffect(Unit) { search() } + AppDialog(shown, back, "sgdbSearch", wide = false, maxWidth = 460.dp) { + DialogTitleRow(stringResource(R.string.art_sgdb_title, slotName), onClose = { onCloseAll() }, leading = { + SmallIconButton(Icons.AutoMirrored.Filled.ArrowBack, stringResource(R.string.common_back), colors.onBackground, onClick = back) + }) + androidx.compose.material3.OutlinedTextField( + query, { query = it }, singleLine = true, modifier = Modifier.fillMaxWidth(), + label = { Text(stringResource(R.string.art_sgdb_search_label)) }, + keyboardActions = androidx.compose.foundation.text.KeyboardActions(onSearch = { search() }), + keyboardOptions = androidx.compose.foundation.text.KeyboardOptions(imeAction = androidx.compose.ui.text.input.ImeAction.Search), + ) + val maxHeight = (LocalConfiguration.current.screenHeightDp * 0.6f).dp + Column( + verticalArrangement = Arrangement.spacedBy(8.dp), + modifier = Modifier.fillMaxWidth().heightIn(max = maxHeight).verticalScroll(rememberScrollState()), + ) { + if (status != SteamGridDb.Status.OK) SgdbNote(status) + val chosenGame = picked + val list = matches.orEmpty() + if (chosenGame == null) { + for (match in list) key(match.id) { PickerRow(null, match.name, null) { showImages(match) } } + if (matches != null && list.isEmpty() && !busy && status == SteamGridDb.Status.OK) { + Text(stringResource(R.string.art_sgdb_none), fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(start = 2.dp, top = 4.dp)) + } + } else { + Text(chosenGame.name, fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(start = 2.dp, top = 4.dp)) + FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) { + for (option in images) key(option.full) { + ArtOption( + slot, option, selected = current?.chosen == true && option.full == chosenRef, focus = null, + description = "${artSourceLabel(AddedGameArt.SGDB)} $slotName", + ) { onPick(option) } + } + } + if (images.isEmpty() && !busy && status == SteamGridDb.Status.OK) { + Text(stringResource(R.string.art_sgdb_none), fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(start = 2.dp, top = 4.dp)) + } + if (list.size > 1) PickerRow(null, stringResource(R.string.art_sgdb_other_games), null) { picked = null } + } + if (busy) androidx.compose.material3.LinearProgressIndicator(Modifier.fillMaxWidth().padding(vertical = 8.dp)) + } + } } @Composable @@ -456,12 +686,6 @@ private fun ArtOption(slot: AddedGameArt.Slot, option: AddedGameArt.Option, sele } } -/** - * After "Add all games in this folder": how many were added and how many were there already, then - * one row per added game (cover, name, exe, "?" where unsure); a row opens that game's editor. - * [games] are the added games as the add left them, shown at once; the rows then follow edits and - * removals, and the covers arrive. - */ @Composable internal fun AddedGamesSummaryDialog( games: List<AddedGames.Game>, already: Int, checking: String? = null, @@ -478,8 +702,6 @@ internal fun AddedGamesSummaryDialog( var gone by remember { mutableStateOf(emptySet<String>()) } var armed by remember { mutableStateOf<String?>(null) } LaunchedEffect(armed) { if (armed != null) { kotlinx.coroutines.delay(4_000); armed = null } } - // Rows show as the games arrive; each is refreshed once (current name and exe, a removed one - // dropped) and gets its cover, without redoing the ones already done when more arrive. var resolved by remember { mutableStateOf(emptyMap<String, Pair<AddedGames.Game, File?>?>()) } LaunchedEffect(games) { for (old in games) { @@ -534,7 +756,6 @@ internal fun AddedGamesSummaryDialog( } } -/** A summary row's red X: the first press arms it (filled), a second within 4 s removes the game. */ @Composable private fun RemoveX(armed: Boolean, description: String, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme diff --git a/app/src/main/java/com/droiddeck/launcher/ui/AppScale.kt b/app/src/main/java/com/droiddeck/launcher/ui/AppScale.kt index 806ef22cd9..bbdb62c196 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/AppScale.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/AppScale.kt @@ -10,7 +10,6 @@ internal fun scaledAppDensity(base: Density, percent: Int): Density { return if (scale == 1f) base else Density(base.density * scale, base.fontScale) } -/** Responsive layouts and popup height limits must see the same dp space as the scaled UI. */ internal fun scaledAppConfiguration(base: Configuration, percent: Int): Configuration { val scale = AppUiPrefs.normalizeScale(percent) / 100f if (scale == 1f) return base diff --git a/app/src/main/java/com/droiddeck/launcher/ui/ComponentsPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/ComponentsPage.kt index e80156695e..d50a45c4ea 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/ComponentsPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/ComponentsPage.kt @@ -37,6 +37,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Delete import androidx.compose.material.icons.outlined.Refresh import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.AlertDialog import androidx.compose.material3.Icon import androidx.compose.material3.LinearProgressIndicator import androidx.compose.material3.MaterialTheme @@ -55,6 +56,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.focus.FocusRequester +import androidx.compose.ui.focus.focusProperties import androidx.compose.ui.focus.focusRequester import androidx.compose.ui.focus.onFocusChanged import androidx.compose.ui.geometry.Offset @@ -80,47 +82,53 @@ import com.droiddeck.launcher.session.ComponentsManager import com.droiddeck.launcher.session.ComponentsManager.CatalogItem import com.droiddeck.launcher.session.ComponentsManager.Snapshot import kotlinx.coroutines.delay +import androidx.compose.foundation.layout.widthIn +import androidx.compose.runtime.rememberCoroutineScope +import com.droiddeck.launcher.core.FexPreset +import com.droiddeck.launcher.core.GameEnvironment +import com.droiddeck.launcher.frontend.Library +import com.droiddeck.launcher.session.GameEnvironmentStore +import com.droiddeck.launcher.session.GameProfileManager +import com.droiddeck.launcher.session.ProtonDefault +import com.droiddeck.launcher.session.WinComponents +import kotlinx.coroutines.CancellationException +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import java.text.DateFormat import java.util.Date -/** The Components page's layer for the GPU drivers, under every Proton's. */ const val GPU_TAB = "gpu" -/** The Components page's layer for the Proton itself, the one the indented layers belong to. */ const val PROTON_TAB = "proton" -/** The stack's layers, top to bottom: LB / RB and the d-pad walk them in this order. */ -internal val LAYERS = listOf(PROTON_TAB, "dxvk", "vkd3d", "fex", GPU_TAB) +internal val LAYERS = listOf(GPU_TAB, PROTON_TAB, "dxvk", "vkd3d", "fex") -/** The layer [by] steps from [current] (LB -1, RB +1), wrapping round the stack. */ internal fun layerStep(current: String, by: Int): String { val i = LAYERS.indexOf(current).coerceAtLeast(0) return LAYERS[((i + by) % LAYERS.size + LAYERS.size) % LAYERS.size] } -/** One installed row: a Proton's original bundle (one per Proton build) or a stored package. */ private class InstalledItem( val name: String, val detail: String, val tag: String, val selected: Boolean, val removable: Boolean, - /** Stored package file, or null for an original. */ val file: String?, - /** The Proton build an original belongs to. */ val protonVersion: String?, ) +private data class ProfileEditorState( + val environment: GameEnvironment.Config, + val protonChoice: ProtonDefault.GameChoice?, + val protonId: String?, + val components: Map<String, String>, +) + private val GOLD = Color(0xFFF2C66D) private val QUEUED = Color(0xFFFFB86B) private val ROW_SHAPE = RoundedCornerShape(10.dp) private val LAYER_SHAPE = RoundedCornerShape(12.dp) -/** - * Everything a game runs on, as one stack: the Proton, its DXVK, VKD3D-Proton and FEX indented - * under it because they belong to it, then the GPU drivers that every Proton shares. One selection - * glides along the stack (LB / RB, or the d-pad in it); beside it a detail frame that never moves - - * what is in use, what is installed and what is available, and what else can be done - only its - * rows trade places. A swap is asked for by stepping out of its row, and the row flies home to its - * layer. On a narrow page the stack is the page, and a layer's detail floods out of its card. - */ +@OptIn(androidx.compose.ui.ExperimentalComposeUiApi::class) @Composable fun ComponentsPage( snapshot: Snapshot?, @@ -142,14 +150,14 @@ fun ComponentsPage( onRefresh: () -> Unit, onImport: () -> Unit, onBack: () -> Unit, + games: List<Library.SteamGame> = emptyList(), + generalFexPreset: String = "", + onGeneralFexPreset: (String) -> Unit = {}, requestInitialFocus: Boolean = true, - /** The GPU drivers layer ([GPU_TAB]): what it shows and does. */ gpu: GpuDriversState = GpuDriversState(), gpuActions: GpuDriversActions = GpuDriversActions(), - /** The Proton layer ([PROTON_TAB]): the Protons DroidDeck can install, and installing them. */ protons: ProtonsState = ProtonsState(), protonActions: ProtonsActions = ProtonsActions(), - /** The Proton layer's options for every Proton (sync, FEX preset, SSBS, environment). */ protonOptions: @Composable () -> Unit = {}, ) { val colors = MaterialTheme.colorScheme @@ -160,16 +168,217 @@ fun ComponentsPage( val inputMode = LocalInputModeManager.current val layer = if (comp in LAYERS) comp else GPU_TAB BackHandler(onBack = onBack) + var scopeMenu by remember { mutableStateOf(false) } + var selectedGameKey by remember { mutableStateOf<String?>(null) } + var fexMenu by remember { mutableStateOf(false) } + var gameProtonMenu by remember { mutableStateOf(false) } + var gameProtonId by remember { mutableStateOf<String?>(null) } + var gameProtonChoice by remember { mutableStateOf<ProtonDefault.GameChoice?>(null) } + var gameComponents by remember { mutableStateOf<Map<String, String>>(emptyMap()) } + var gameComponentMenu by remember { mutableStateOf<String?>(null) } + var environmentEditor by remember { mutableStateOf(false) } + var winComponentsOpen by remember { mutableStateOf<Boolean?>(null) } + var winComponentsRevision by remember { mutableStateOf(0) } + var environment by remember { mutableStateOf<GameEnvironment.Config?>(null) } + var profileLoading by remember { mutableStateOf(false) } + var profileLoadGeneration by remember { mutableStateOf(0L) } + var environmentBusy by remember { mutableStateOf(false) } + var environmentError by remember { mutableStateOf(false) } + var profileNotice by remember { mutableStateOf<String?>(null) } + var confirm by remember { mutableStateOf<Pair<String, () -> Unit>?>(null) } + var confirmTitle by remember { mutableStateOf("") } + var confirmVerb by remember { mutableStateOf(R.string.comp_swap) } + fun ask(title: String, body: String, verb: Int, action: () -> Unit) { + confirmTitle = title + confirmVerb = verb + confirm = body to action + } + val coroutine = rememberCoroutineScope() + val selectedGame = games.firstOrNull { it.profileKey == selectedGameKey } + LaunchedEffect(Unit) { + runCatching { withContext(Dispatchers.IO) { GameEnvironmentStore.read(ctx) } } + .onSuccess { environment = it } + .onFailure { environmentError = true } + } + LaunchedEffect(games, selectedGameKey) { + if (selectedGameKey != null && games.none { it.profileKey == selectedGameKey }) selectedGameKey = null + } + LaunchedEffect(selectedGame?.profileKey, snapshot) { + profileLoadGeneration++ + val generation = profileLoadGeneration + val game = selectedGame + profileNotice = null + environmentError = false + gameProtonChoice = null + gameProtonId = null + gameComponents = emptyMap() + gameProtonMenu = false + gameComponentMenu = null + fexMenu = false + if (game == null) { + profileLoading = false + return@LaunchedEffect + } + profileLoading = true + try { + val (choice, id, components) = withContext(Dispatchers.IO) { + val choice = ProtonDefault.gameChoice(ctx, game.profileKey) + Triple( + choice, + ProtonDefault.gameSelectedId(ctx, game.profileKey, snapshot?.protons.orEmpty().map { it.proton }), + ComponentsManager.gameComponents(ctx, game.profileKey), + ) + } + if (profileLoadGeneration == generation && selectedGameKey == game.profileKey) { + gameProtonChoice = choice + gameProtonId = id + gameComponents = components + } + } catch (error: CancellationException) { + throw error + } catch (error: Exception) { + if (profileLoadGeneration == generation && selectedGameKey == game.profileKey) { + environmentError = true + profileNotice = ctx.getString( + R.string.comp_game_load_failed, + game.name, + error.message ?: error.javaClass.simpleName, + ) + } + } finally { + if (profileLoadGeneration == generation) profileLoading = false + } + } + fun setGameFexPreset(preset: String?) { + val game = selectedGame ?: return + environmentBusy = true + profileNotice = null + coroutine.launch { + runCatching { + withContext(Dispatchers.IO) { + GameEnvironmentStore.setGameFexPreset(ctx, game.profileKey, preset) + } + }.onSuccess { saved -> + environment = saved + if (selectedGameKey == game.profileKey) { + environmentError = false + profileNotice = ctx.getString(R.string.comp_game_saved_next, game.name) + } + }.onFailure { + if (selectedGameKey == game.profileKey) { + environmentError = true + profileNotice = ctx.getString(R.string.comp_game_save_failed, it.message ?: it.javaClass.simpleName) + } + } + environmentBusy = false + } + } + fun setGameProton(id: String?) { + val game = selectedGame ?: return + val proton = id?.let { wanted -> snapshot?.protons?.firstOrNull { it.proton.id == wanted }?.proton } + environmentBusy = true + profileNotice = null + coroutine.launch { + runCatching { withContext(Dispatchers.IO) { ProtonDefault.requestGame(ctx, game.profileKey, proton) } } + .onSuccess { outcome -> + if (selectedGameKey == game.profileKey) { + gameProtonChoice = proton?.let { ProtonDefault.GameChoice(it.valve, it.dir.name) } + gameProtonId = id + environmentError = false + profileNotice = ctx.getString( + when (outcome) { + ProtonDefault.Outcome.LIVE -> R.string.comp_game_proton_live + ProtonDefault.Outcome.NEXT_START -> R.string.comp_game_proton_next + ProtonDefault.Outcome.NOT_RUNNABLE -> R.string.comp_game_proton_not_runnable + }, + game.name, + ) + } + } + .onFailure { + if (selectedGameKey == game.profileKey) { + environmentError = true + profileNotice = ctx.getString(R.string.comp_game_save_failed, it.message ?: it.javaClass.simpleName) + } + } + environmentBusy = false + } + } + fun setGameComponent(comp: String, file: String?) { + val game = selectedGame ?: return + environmentBusy = true + profileNotice = null + coroutine.launch { + runCatching { withContext(Dispatchers.IO) { ComponentsManager.setGameComponent(ctx, game.profileKey, comp, file) } } + .onSuccess { + val components = ComponentsManager.gameComponents(ctx, game.profileKey) + if (selectedGameKey == game.profileKey) { + gameComponents = components + environmentError = false + profileNotice = ctx.getString(R.string.comp_game_saved_next, game.name) + } + } + .onFailure { + if (selectedGameKey == game.profileKey) { + environmentError = true + profileNotice = ctx.getString(R.string.comp_game_save_failed, it.message ?: it.javaClass.simpleName) + } + } + environmentBusy = false + } + } + fun resetGameProfile() { + val game = selectedGame ?: return + environmentBusy = true + profileNotice = null + coroutine.launch { + runCatching { + withContext(Dispatchers.IO) { + val resetFailure = runCatching { GameProfileManager.reset(ctx, game.profileKey) }.exceptionOrNull() + val config = GameEnvironmentStore.read(ctx) + val choice = ProtonDefault.gameChoice(ctx, game.profileKey) + val id = ProtonDefault.gameSelectedId( + ctx, + game.profileKey, + snapshot?.protons.orEmpty().map { it.proton }, + ) + val components = ComponentsManager.gameComponents(ctx, game.profileKey) + ProfileEditorState(config, choice, id, components) to resetFailure + } + }.onSuccess { (state, resetFailure) -> + environment = state.environment + if (selectedGameKey == game.profileKey) { + gameProtonChoice = state.protonChoice + gameProtonId = state.protonId + gameComponents = state.components + winComponentsRevision++ + environmentError = resetFailure != null + profileNotice = if (resetFailure == null) { + ctx.getString(R.string.comp_game_reset_done, game.name) + } else { + ctx.getString( + R.string.comp_game_reset_failed, + resetFailure.message ?: resetFailure.javaClass.simpleName, + ) + } + } + }.onFailure { + if (selectedGameKey == game.profileKey) { + environmentError = true + profileNotice = ctx.getString(R.string.comp_game_reset_failed, it.message ?: it.javaClass.simpleName) + } + } + environmentBusy = false + } + } val views = snapshot?.protons ?: emptyList() val view = views.firstOrNull { it.proton.id == protonId } ?: views.firstOrNull() - // Where things sit, root px: each layer card, each row (for a swap's dot), the page itself. val cardsAt = remember { mutableStateMapOf<String, Rect>() } val rowsAt = remember { HashMap<String, Rect>() } var stackAt by remember { mutableStateOf(Offset.Zero) } var pageAt by remember { mutableStateOf(Offset.Zero) } - // A layer card pops and rings as a swap's dot lands on it, and rings as a hop arrives on it. val landed = remember { mutableStateMapOf<String, Int>() } val rings = remember { mutableStateMapOf<String, Int>() } fun land(l: String) { landed[l] = (landed[l] ?: 0) + 1; rings[l] = (rings[l] ?: 0) + 1 } @@ -177,24 +386,20 @@ fun ComponentsPage( LaunchedEffect(Hops.arrived) { if (Hops.arrived == arrivedSeen[0]) return@LaunchedEffect arrivedSeen[0] = Hops.arrived - // Once the page has flooded in from the rail. delay(Motion.ms(700).toLong()) rings[layer] = (rings[layer] ?: 0) + 1 } - /** The row at [key] squashes into a dot and flies home to [to]'s card, which pops on landing. */ fun flyHome(key: String, to: String) { val from = rowsAt[key] ?: return land(to) Flights.fly(Flight(from, to = { cardsAt[to]?.center }, onLand = { land(to) })) } - // A confirm stepping out of the row that asked: right of a left-column row, left of a right one. fun ask(key: String, right: Boolean, title: String, note: String, verb: String, danger: Boolean, face: String = "", then: () -> Unit) { val at = rowsAt[key] ?: return then() val cancel = ctx.getString(R.string.common_cancel) Steps.ask(StepAsk( anchor = at, side = if (right) StepSide.Left else StepSide.Right, accent = if (danger) colors.error else pal.signal, pillCorner = 10.dp, items = 3, maxWidth = 340.dp, - // The row's own name rides on top, as the pull's handle. handle = { Box(Modifier.fillMaxSize().padding(start = 46.dp, end = 14.dp), contentAlignment = Alignment.CenterStart) { Text(face, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = if (danger) colors.error else pal.signal, maxLines = 2, overflow = TextOverflow.Ellipsis) @@ -210,20 +415,20 @@ fun ComponentsPage( }) } - // The runtime and display drivers on their own pages, flooding out of the link that opens them. var driverPage by remember { mutableStateOf<String?>(null) } var driverShown by remember { mutableStateOf<String?>(null) } var driverLeaving by remember { mutableStateOf(false) } var driverFrom by remember { mutableStateOf<Origin?>(null) } + val slotFocus = remember { mapOf(SLOT_DISPLAY to FocusRequester(), SLOT_RUNTIME to FocusRequester()) } LaunchedEffect(driverPage) { val d = driverPage if (d != null) { driverLeaving = false; driverShown = d } - else if (driverShown != null) { + else driverShown?.let { closed -> if (driverFrom != null) { driverLeaving = true; delay(Motion.ms(PAGE_RETURN_MS).toLong()) } driverShown = null; driverLeaving = false; driverFrom = null + if (inputMode.inputMode == InputMode.Keyboard) focusSoon { slotFocus.getValue(closed) } } } - // Narrow: a layer's detail floods out of its card, and B draws it back in. var narrowOpen by rememberSaveable { mutableStateOf<String?>(null) } var narrowShown by remember { mutableStateOf<String?>(null) } var narrowLeaving by remember { mutableStateOf(false) } @@ -239,27 +444,23 @@ fun ComponentsPage( BackHandler(enabled = driverPage != null || narrowOpen != null) { if (driverPage != null) driverPage = null else narrowOpen = null } - // Leaving the page: nothing stays stepped out of a row that is no longer on screen. androidx.compose.runtime.DisposableEffect(Unit) { onDispose { Steps.drop() } } val checked = if (catalogAt > 0) DateFormat.getTimeInstance(DateFormat.SHORT).format(Date(catalogAt * 1000)) else stringResource(R.string.comp_never) val firstRow = remember { FocusRequester() } val layerFocus = remember { LAYERS.associateWith { FocusRequester() } } - // Arrived (from the rail, a hop, a game's card): a pad starts on the chosen layer. LaunchedEffect(requestInitialFocus) { - if (!requestInitialFocus || inputMode.inputMode != InputMode.Keyboard) return@LaunchedEffect + if (!requestInitialFocus || selectedGame != null || inputMode.inputMode != InputMode.Keyboard) return@LaunchedEffect delay(Motion.ms(200).toLong()) focusSoon { layerFocus.getValue(layer) } } var travel by remember { mutableIntStateOf(1) } - // LB / RB (taken by the activity before the page sees them): a pad anywhere on the page goes to - // the new layer's card, so one on a row - which leaves with its layer - is never left with nothing. var pageFocused by remember { mutableStateOf(false) } val seenLayer = remember { arrayOf(layer) } LaunchedEffect(layer) { if (seenLayer[0] == layer) return@LaunchedEffect seenLayer[0] = layer - if (!pageFocused || inputMode.inputMode != InputMode.Keyboard) return@LaunchedEffect + if (selectedGame != null || !pageFocused || inputMode.inputMode != InputMode.Keyboard) return@LaunchedEffect if (narrowOpen != null) runCatching { firstRow.requestFocus() } else focusSoon { layerFocus.getValue(layer) } } @@ -267,20 +468,9 @@ fun ComponentsPage( if (l != layer) { travel = if (LAYERS.indexOf(l) > LAYERS.indexOf(layer)) 1 else -1; onComp(l) } } - // ---- one layer's detail, a slot at a time ------------------------------------------------------ val compState = { l: String -> view?.components?.get(l) } val bar: @Composable (String) -> Unit = { l -> when (l) { - GPU_TAB -> { - val active = gpu.activePair - InUseBar( - queued = gpu.busy != null, - sentence = (active?.let { "${it.name} ${it.version}" } ?: gpu.activeBundle ?: stringResource(R.string.gpu_builtin)) - .let { if (gpu.auto) stringResource(R.string.gpu_bar_auto, it) else it }, - note = if (gpu.busy != null) (if (gpu.percent >= 0) "${gpu.percent}%" else "…") - else gpu.autoStatus.ifEmpty { if (active != null || gpu.activeBundle != null) "" else gpu.pairs.firstOrNull { it.recommended }?.let { stringResource(R.string.gpu_recommended_for, it.name) } ?: stringResource(R.string.gpu_refresh_hint) }, - ) - } PROTON_TAB -> InUseBar( queued = false, sentence = view?.let { stringResource(R.string.comp_proton_bar, it.proton.name) } ?: stringResource(R.string.comp_no_proton), @@ -304,58 +494,26 @@ fun ComponentsPage( } } - // Installed and Available, as (title, rows) for a layer; [right] says which column it is in. - var showAllPairs by rememberSaveable { mutableStateOf(false) } val installedTitle: @Composable (String) -> String = { l -> when (l) { - GPU_TAB -> stringResource(R.string.comp_installed_count, 1 + gpu.pairs.count { it.installed && (it.suits || showAllPairs) }) PROTON_TAB -> stringResource(R.string.comp_installed_count, views.size) else -> stringResource(R.string.comp_installed_count, installedFor(l, view, snapshot).size) } } val availableTitle: @Composable (String) -> String = { l -> when (l) { - GPU_TAB -> stringResource(R.string.comp_available_count, gpu.pairs.count { !it.installed && it.complete && (it.suits || showAllPairs) }) - PROTON_TAB -> stringResource(R.string.comp_available_count, protons.rows.count { it.installed == null }) + PROTON_TAB -> stringResource(R.string.comp_available_count, protons.rows.count { it.installed == null || it.update != null }) else -> stringResource(R.string.comp_nightlies_count, availableFor(l, catalog, snapshot).size) } } val installedRows: @Composable ColumnScope.(String, Boolean) -> Unit = { l, right -> when (l) { - GPU_TAB -> { - val autoKey = "gpu:auto" - ChoiceLine( - stringResource(R.string.common_auto), stringResource(R.string.gpu_auto_keeps), gpu.auto, removable = false, - modifier = Modifier.focusRequester(firstRow).trackRow(autoKey, rowsAt), - onSelect = { - if (gpu.auto) return@ChoiceLine - ask(autoKey, right, ctx.getString(R.string.gpu_use_title, ctx.getString(R.string.common_auto)), ctx.getString(R.string.gpu_auto_hint), ctx.getString(R.string.common_use), false, ctx.getString(R.string.common_auto)) { - gpuActions.onAuto(true); flyHome(autoKey, GPU_TAB) - } - }, - ) - for (p in gpu.pairs.filter { it.installed && (it.suits || showAllPairs) }) { - val key = "gpu:${p.key}" - ChoiceLine( - p.name, "${p.version} · ${p.detail}", !gpu.auto && p.active, removable = false, - badge = if (p.recommended) stringResource(R.string.gpu_recommended_caps) else null, - progress = if (gpu.busy == p.key) gpu.percent else null, - modifier = Modifier.trackRow(key, rowsAt), - onSelect = { - if (!gpu.auto && p.active || gpu.busy != null) return@ChoiceLine - ask(key, right, ctx.getString(R.string.gpu_use_title, p.name), "${p.version} · ${p.detail}", ctx.getString(R.string.common_use), false, p.name) { - gpuActions.onAuto(false); gpuActions.onPair(p.key); flyHome(key, GPU_TAB) - } - }, - ) - } - } PROTON_TAB -> { if (views.isEmpty()) EmptyLine(stringResource(if (snapshot == null) R.string.comp_reading else R.string.comp_no_proton)) views.forEachIndexed { i, v -> val key = "proton:${v.proton.id}" val swaps = v.components.values.count { it.activeFile != null } - val extra = protons.rows.firstOrNull { it.installed == v.proton.dir.name } + val extra = protons.rows.firstOrNull { v.proton.dir.name in it.installedAll } val removable = extra != null && protons.busyId == null && protons.runtimeReady && !protons.sessionRunning ChoiceLine( v.proton.name, @@ -365,8 +523,8 @@ fun ComponentsPage( modifier = (if (i == 0) Modifier.focusRequester(firstRow) else Modifier).trackRow(key, rowsAt), onSelect = { if (v.proton.id != view?.proton?.id) { onProton(v.proton.id); flyHome(key, PROTON_TAB) } }, onDelete = { - if (extra != null) ask(key, right, ctx.getString(R.string.proton_remove_title, v.proton.name), "", ctx.getString(R.string.store_remove), true, v.proton.name) { - protonActions.onRemove(extra.id) + if (extra != null) ask(key, right, ctx.getString(R.string.proton_remove_title, v.proton.name), ctx.getString(R.string.proton_remove_body), ctx.getString(R.string.store_remove), true, v.proton.name) { + protonActions.onRemove(extra.id, v.proton.dir.name) } }, ) @@ -404,26 +562,21 @@ fun ComponentsPage( } val availableRows: @Composable ColumnScope.(String) -> Unit = { l -> when (l) { - GPU_TAB -> { - val shown = gpu.pairs.filter { !it.installed && it.complete && (it.suits || showAllPairs) } - if (shown.isEmpty()) EmptyLine(stringResource(if (gpu.checking) R.string.gpu_checking else R.string.gpu_none_listed)) - for (p in shown) GetLine( - p.name, "${p.version} · ${p.detail}", progress = if (gpu.busy == p.key) gpu.percent else null, enabled = gpu.busy == null, - badge = if (p.recommended) stringResource(R.string.gpu_recommended_caps) else null, - ) { gpuActions.onAuto(false); gpuActions.onPair(p.key) } - if (gpu.pairs.any { !it.suits }) Box(Modifier.padding(horizontal = 6.dp, vertical = 4.dp)) { - FocusText(stringResource(if (showAllPairs) R.string.gpu_hide_other else R.string.gpu_show_other), pal.signal) { showAllPairs = !showAllPairs } - } - } PROTON_TAB -> { - val rows = protons.rows.filter { it.installed == null } + val rows = protons.rows.filter { it.installed == null || it.update != null } if (rows.isEmpty()) EmptyLine(stringResource(R.string.comp_nothing_new)) for (row in rows) GetLine( - row.name, if (row.queued) stringResource(R.string.proton_queued) else stringResource(R.string.proton_not_installed), + row.name, + when { + row.update != null -> stringResource(R.string.proton_update_available, row.update) + row.queued -> stringResource(R.string.proton_queued) + else -> stringResource(R.string.proton_not_installed) + }, progress = if (protons.busyId == row.id) protons.percent else null, stage = if (protons.busyId == row.id) protons.stage else null, enabled = protons.busyId == null && protons.runtimeReady && !protons.sessionRunning, onCancel = if (row.queued && protons.busyId == null && !protons.sessionRunning) ({ protonActions.onCancel(row.id) }) else null, + action = if (row.update != null) stringResource(R.string.common_update) else null, ) { protonActions.onInstall(row.id) } } else -> { @@ -439,29 +592,21 @@ fun ComponentsPage( val actions: @Composable (String) -> Unit = { l -> Row(horizontalArrangement = Arrangement.spacedBy(14.dp), verticalAlignment = Alignment.CenterVertically) { when (l) { - GPU_TAB -> { - SmallButton(stringResource(R.string.comp_import_zip), onClick = gpuActions.onImportZip) - var at by remember { mutableStateOf<Rect?>(null) } - Box(Modifier.onGloballyPositioned { at = it.boundsInRoot() }) { - FocusText(stringResource(R.string.gpu_separately) + " ›", pal.signal) { - val from = at - val title = ctx.getString(R.string.gpu_separately) - if (from == null) { driverPage = "rt"; return@FocusText } - Steps.ask(StepAsk(anchor = from, side = StepSide.Right, accent = pal.signal, pillCorner = 10.dp, items = 3, handle = {}) { - StepTitle(title) - StepList { - StepChoice(ctx.getString(R.string.comp_runtime_driver), enabled = open, modifier = Modifier.fillMaxWidth().stepItem(1).focusRequester(first)) { - Steps.fold(); driverFrom = Origin(from.translate(-pageAt), 10f * density.density); driverPage = "rt" - } - StepChoice(ctx.getString(R.string.comp_display_driver), enabled = open, modifier = Modifier.fillMaxWidth().stepItem(2)) { - Steps.fold(); driverFrom = Origin(from.translate(-pageAt), 10f * density.density); driverPage = "panel" - } - } - }) + PROTON_TAB -> { + val idle = protons.busyId == null && protons.runtimeReady && !protons.sessionRunning + for (row in protons.rows.filter { it.installedAll.size > 1 }) { + val key = "older:${row.id}" + val older = row.installedAll.dropLast(1) + Box(Modifier.trackRow(key, rowsAt)) { + FocusText(stringResource(R.string.proton_remove_older, row.name), if (idle) pal.signal else colors.onSurfaceVariant) { + if (!idle) return@FocusText + ask(key, false, ctx.getString(R.string.proton_remove_older, row.name) + "?", + ctx.getString(R.string.proton_remove_older_body, older.joinToString(", ")), + ctx.getString(R.string.store_remove), true, row.name) { protonActions.onRemoveOlder(row.id) } + } } } } - PROTON_TAB -> {} else -> { SmallButton(stringResource(R.string.comp_import_wcp), onClick = onImport) val st = compState(l) @@ -482,15 +627,22 @@ fun ComponentsPage( } } - // ---- the frame ------------------------------------------------------------------------------ val detail: @Composable (String, Boolean) -> Unit = { l, narrowPage -> androidx.compose.foundation.layout.BoxWithConstraints(Modifier.fillMaxSize()) { - // Two columns while each gets room for a row's name and its Get; one under the other below that. val single = narrowPage || maxWidth < 600.dp - Column(Modifier.fillMaxSize()) { - // The in-use bar keeps its place; only its words change. + if (l == GPU_TAB) GpuDriversBody(gpu, gpuActions, single, firstRow, slotFocus) { slot, at -> + driverFrom = Origin(at.translate(-pageAt), 10f * density.density); driverPage = slot + } + else Column(Modifier.fillMaxSize()) { AnimatedContent(l, transitionSpec = { fadeIn(Motion.tw(240)) togetherWith fadeOut(Motion.tw(160)) }, label = "inUse") { k -> bar(k) } - Column(Modifier.weight(1f).fillMaxWidth().verticalScroll(rememberScrollState()).padding(top = 12.dp, bottom = 16.dp)) { + val detailScroll = androidx.compose.runtime.key(l) { rememberScrollState() } + Column(Modifier.weight(1f).fillMaxWidth().verticalScroll(detailScroll).padding(top = 12.dp, bottom = 16.dp)) { + if (l == PROTON_TAB) { + if (!protons.runtimeReady) EmptyLine(stringResource(R.string.content_needs_runtime)) + if (protons.sessionRunning) EmptyLine(stringResource(R.string.proton_stop_first)) + SettingsGroup(stringResource(R.string.comp_for_every_proton)) { protonOptions() } + Spacer(Modifier.height(12.dp)) + } val slide: @Composable (@Composable (String) -> Unit) -> Unit = { body -> AnimatedContent( l, @@ -512,11 +664,22 @@ fun ComponentsPage( Column(Modifier.weight(1f)) { slide { k -> RowGroup(availableTitle(k)) { availableRows(k) } } } } Box(Modifier.padding(top = 14.dp)) { slide { k -> actions(k) } } + if (l == "fex") { + SettingsGroup(stringResource(R.string.fex_preset_title)) { + SettingsRow(stringResource(R.string.fex_preset_title), null) { + FexPresetChip( + preset = generalFexPreset, + inherited = false, + open = fexMenu, + enabled = true, + onToggle = { fexMenu = !fexMenu }, + onDismiss = { fexMenu = false }, + onPick = { it?.let(onGeneralFexPreset) }, + ) + } + } + } if (l == PROTON_TAB) { - Spacer(Modifier.height(10.dp)) - if (!protons.runtimeReady) EmptyLine(stringResource(R.string.content_needs_runtime)) - if (protons.sessionRunning) EmptyLine(stringResource(R.string.proton_stop_first)) - SettingsGroup(stringResource(R.string.comp_for_every_proton)) { protonOptions() } Spacer(Modifier.height(12.dp)) Note(stringResource(R.string.comp_about_text)) } @@ -528,9 +691,11 @@ fun ComponentsPage( Box(Modifier.fillMaxSize().onGloballyPositioned { pageAt = it.positionInRoot() }.onFocusChanged { pageFocused = it.hasFocus }) { Column( Modifier.fillMaxSize().padding(horizontal = if (narrow) 16.dp else 22.dp, vertical = if (narrow) 12.dp else 18.dp) - .bumpers(onPrevious = { pick(layerStep(layer, -1)) }, onNext = { pick(layerStep(layer, 1)) }), + .then(if (selectedGame == null) Modifier.bumpers( + onPrevious = { pick(layerStep(layer, -1)) }, + onNext = { pick(layerStep(layer, 1)) }, + ) else Modifier), ) { - // ---- header: the title, the device, when the lists were checked and the one refresh ---- Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier.fillMaxWidth()) { Text(stringResource(R.string.comp_title), fontSize = if (narrow) 22.sp else 26.sp, fontWeight = FontWeight.Bold, color = colors.onBackground, maxLines = 1) if (!narrow) DeviceChip(gpu) @@ -547,33 +712,108 @@ fun ComponentsPage( } if (narrow) Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(top = 6.dp)) { DeviceChip(gpu) } Spacer(Modifier.height(14.dp)) - Row(Modifier.weight(1f).fillMaxWidth()) { - // ---- the stack ---- - Box( - (if (narrow) Modifier.fillMaxWidth() else Modifier.width(250.dp)).fillMaxHeight() - .onGloballyPositioned { stackAt = it.positionInRoot() }, + if (games.isNotEmpty()) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), + modifier = Modifier.fillMaxWidth().padding(bottom = 10.dp), ) { - val tint = rememberUpdatedState(pal.signal) - val local = cardsAt[layer]?.translate(-stackAt) - ChipGlide(LAYERS.indexOf(layer), local, tint, GlideAxis.Vertical, corner = 12.dp) - Stack( - layer, view, gpu, focus = layerFocus, landed = landed, rings = rings, - onPlaced = { l, r -> cardsAt[l] = r }, - onFocus = { l -> pick(l) }, - onOpen = { l -> - pick(l) - if (narrow) narrowOpen = l - else runCatching { firstRow.requestFocus() } - }, - ) + Text(stringResource(R.string.comp_profile), fontSize = 14.sp, color = colors.onSurfaceVariant) + Box(Modifier.weight(1f, fill = false)) { + ValueChip( + selectedGame?.name ?: stringResource(R.string.comp_scope_general), + scopeMenu, + modifier = Modifier.widthIn(max = 320.dp).heightIn(min = 44.dp), + ) { scopeMenu = !scopeMenu } + AnchoredMenu( + scopeMenu, + onDismiss = { scopeMenu = false }, + title = stringResource(R.string.comp_profile_configure), + ) { first -> + MenuItem( + stringResource(R.string.comp_scope_general), + checked = selectedGame == null, + detail = stringResource(R.string.comp_scope_general_detail), + focusRequester = first, + ) { + selectedGameKey = null + scopeMenu = false + } + games.sortedBy { it.name.lowercase() }.forEach { game -> + MenuItem(game.name, checked = selectedGameKey == game.profileKey) { + selectedGameKey = game.profileKey + scopeMenu = false + } + } + } + } } - if (!narrow) { - Spacer(Modifier.width(16.dp)) - Box(Modifier.weight(1f).fillMaxHeight()) { detail(layer, false) } + } + + if (selectedGame != null) { + GameComponentOverrides( + game = selectedGame, + config = environment, + generalFexPreset = generalFexPreset, + generalProton = view?.proton, + protons = views.map { it.proton }, + protonId = gameProtonId, + protonChoice = gameProtonChoice, + packages = snapshot?.packages.orEmpty(), + componentChoices = gameComponents, + componentMenu = gameComponentMenu, + protonMenu = gameProtonMenu, + fexMenu = fexMenu, + busy = environmentBusy || profileLoading, + error = environmentError, + notice = profileNotice, + winComponentsRevision = winComponentsRevision, + onFexMenu = { fexMenu = it }, + onFexPreset = ::setGameFexPreset, + onProtonMenu = { gameProtonMenu = it }, + onProton = ::setGameProton, + onComponentMenu = { gameComponentMenu = it }, + onComponent = ::setGameComponent, + onEnvironment = { environmentEditor = true }, + onWinComponents = { winComponentsOpen = false }, + onReset = { + ask( + ctx.getString(R.string.comp_game_reset_title, selectedGame.name), + ctx.getString(R.string.comp_game_reset_body), + R.string.comp_game_reset, + ::resetGameProfile, + ) + }, + modifier = Modifier.weight(1f).fillMaxWidth(), + ) + } else { + Row(Modifier.weight(1f).fillMaxWidth()) { + Box( + (if (narrow) Modifier.fillMaxWidth() else Modifier.width(250.dp)).fillMaxHeight() + .onGloballyPositioned { stackAt = it.positionInRoot() } + .focusProperties { enter = { layerFocus.getValue(layer) } }.focusGroup(), + ) { + val tint = rememberUpdatedState(pal.signal) + val local = cardsAt[layer]?.translate(-stackAt) + Stack( + layer, view, gpu, focus = layerFocus, landed = landed, rings = rings, + onPlaced = { l, r -> cardsAt[l] = r }, + onFocus = { l -> pick(l) }, + onOpen = { l -> + pick(l) + if (narrow) narrowOpen = l + else runCatching { firstRow.requestFocus() } + }, + ) + ChipGlide(LAYERS.indexOf(layer), local, tint, GlideAxis.Vertical, corner = 12.dp) + } + if (!narrow) { + Spacer(Modifier.width(16.dp)) + Box(Modifier.weight(1f).fillMaxHeight()) { detail(layer, false) } + } } } } - // Narrow: the layer's detail over the stack, out of its card. narrowShown?.let { l -> val from = cardsAt[l]?.let { Origin(it.translate(-pageAt), 12f * density.density) } val body: @Composable () -> Unit = { @@ -588,21 +828,20 @@ fun ComponentsPage( } if (from == null) body() else PageFlood(from, narrowLeaving) { body() } } - // The runtime or display driver on its own page. driverShown?.let { d -> val body: @Composable () -> Unit = { Box(Modifier.fillMaxSize().background(colors.background).pointerInput(Unit) { detectTapGestures { } }) { - if (d == "rt") DriverPage( + if (d == SLOT_RUNTIME) DriverPage( title = stringResource(R.string.comp_runtime_driver), hint = stringResource(R.string.comp_runtime_driver_hint), rows = gpu.linuxRows, selected = gpu.linuxSelected, downloads = gpu.linuxDownloads, - status = gpu.releaseStatus, checking = gpu.checking, importLabel = stringResource(R.string.comp_import_turnip), canRestore = false, + status = gpu.releaseStatus, checking = gpu.checking, checkedAt = gpu.checkedAt, importLabel = stringResource(R.string.comp_import_turnip), canRestore = false, onSelect = gpuActions.onSelectLinux, onDelete = gpuActions.onRemoveLinux, onRefresh = gpuActions.onRefresh, onDownload = gpuActions.onDownloadDriver, onImport = gpuActions.onImportLinux, onRestore = {}, onBack = { driverPage = null }, ) else DriverPage( title = stringResource(R.string.comp_display_driver), hint = stringResource(R.string.comp_display_driver_hint), rows = gpu.androidRows, selected = gpu.androidSelected, downloads = gpu.androidDownloads, - status = gpu.releaseStatus, checking = gpu.checking, importLabel = stringResource(R.string.comp_import_adrenotools), + status = gpu.releaseStatus, checking = gpu.checking, checkedAt = gpu.checkedAt, importLabel = stringResource(R.string.comp_import_adrenotools), canRestore = gpu.canRestoreBundled, onSelect = gpuActions.onSelectAndroid, onDelete = gpuActions.onRemoveAndroid, onRefresh = gpuActions.onRefresh, onDownload = gpuActions.onDownloadDriver, onImport = gpuActions.onImportAndroid, onRestore = gpuActions.onRestoreBundled, @@ -614,9 +853,51 @@ fun ComponentsPage( if (from == null) body() else PageFlood(from, driverLeaving) { body() } } } + confirm?.let { (body, action) -> + AlertDialog( + onDismissRequest = { confirm = null }, + title = { Text(confirmTitle) }, + text = { Text(body, fontSize = 14.sp) }, + confirmButton = { + val del = confirmVerb == R.string.common_delete || confirmVerb == R.string.comp_game_reset + FocusText(stringResource(confirmVerb), if (del) colors.error else pal.signal) { confirm = null; action() } + }, + dismissButton = { + val cancelFocus = remember { FocusRequester() } + LaunchedEffect(Unit) { runCatching { cancelFocus.requestFocus() } } + FocusText(stringResource(R.string.common_cancel), colors.onBackground, modifier = Modifier.focusRequester(cancelFocus)) { confirm = null } + }, + ) + } + if (environmentEditor && selectedGame != null) { + GameEnvironmentEditor( + byPad = androidx.compose.ui.platform.LocalInputModeManager.current.inputMode == androidx.compose.ui.input.InputMode.Keyboard, + initialScope = selectedGame.profileKey, + ) { + environmentEditor = false + coroutine.launch { + runCatching { withContext(Dispatchers.IO) { GameEnvironmentStore.read(ctx) } } + .onSuccess { environment = it; environmentError = false } + .onFailure { environmentError = true } + } + } + } + val winOpen = winComponentsOpen + if (winOpen != null && selectedGame != null) { + WinComponentsDialog( + selectedGame.profileKey, + selectedGame.name, + selectedGame.gameFiles, + winOpen, + compat = selectedGame.protonPrefix, + steamAppId = selectedGame.appId.takeIf { selectedGame.library != Library.ADDED }, + ) { + winComponentsOpen = null + winComponentsRevision++ + } + } } -/** The Installed rows of one component layer for the Proton the page shows. */ @Composable private fun installedFor(l: String, view: ComponentsManager.ProtonView?, snapshot: Snapshot?): List<InstalledItem> { view ?: return emptyList() @@ -635,7 +916,6 @@ private fun installedFor(l: String, view: ComponentsManager.ProtonView?, snapsho } } -/** The Nightlies of one component layer that are not stored yet. */ private fun availableFor(l: String, catalog: List<CatalogItem>, snapshot: Snapshot?): List<CatalogItem> { val stored = (snapshot?.packages ?: emptyList()).map { it.file }.toSet() return catalog.filter { it.comp == l && ComponentsManager.safeName(it.file) !in stored } @@ -648,14 +928,8 @@ private fun LayerTitle(l: String): String = when (l) { else -> ComponentsManager.LABEL[l] ?: l } -/** Records where a row sits, for the confirm that steps out of it and the dot that flies from it. */ private fun Modifier.trackRow(key: String, into: HashMap<String, Rect>): Modifier = onGloballyPositioned { into[key] = it.boundsInRoot() } -/** - * The stack: a heading over the Proton and the three layers that belong to it (indented, on a - * line), then a heading over the GPU drivers that every Proton shares. Each card is a layer's name - * and what it is set to; a dot marks a layer swapped away from its original. - */ @Composable private fun Stack( layer: String, view: ComponentsManager.ProtonView?, gpu: GpuDriversState, @@ -670,7 +944,7 @@ private fun Stack( LayerCard( title = LayerTitle(l), value = when (l) { - GPU_TAB -> if (gpu.auto) auto else gpu.activePair?.name ?: gpu.activeBundle ?: auto + GPU_TAB -> gpuCardValue(gpu, auto) PROTON_TAB -> (view?.proton?.name ?: "") + " ▾" else -> st?.let { if (it.activeFile == null) original else it.inUse } ?: "" }, @@ -682,6 +956,9 @@ private fun Stack( ) } Column(Modifier.fillMaxWidth().verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(3.dp)) { + StackHeading(stringResource(R.string.comp_this_device)) + card(GPU_TAB) + Spacer(Modifier.height(6.dp)) StackHeading(stringResource(R.string.comp_this_proton)) card(PROTON_TAB) Row(Modifier.fillMaxWidth().height(IntrinsicSize.Min)) { @@ -690,9 +967,6 @@ private fun Stack( card("dxvk"); card("vkd3d"); card("fex") } } - Spacer(Modifier.height(6.dp)) - StackHeading(stringResource(R.string.comp_every_proton)) - card(GPU_TAB) } } @@ -704,7 +978,6 @@ private fun StackHeading(text: String) { ) } -/** One layer: 40dp to see, 44 to touch; its name, what it is set to, and a dot when it is swapped. */ @Composable private fun LayerCard( title: String, value: String, swapped: Boolean, selected: Boolean, landed: Int, ring: Int, @@ -714,14 +987,16 @@ private fun LayerCard( val pal = LocalPalette.current val src = remember { MutableInteractionSource() } val hot = rememberHot(src) + val under = selected && androidx.compose.ui.platform.LocalInputModeManager.current.inputMode != androidx.compose.ui.input.InputMode.Keyboard Box(Modifier.fillMaxWidth().heightIn(min = 44.dp), contentAlignment = Alignment.Center) { Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp), modifier = modifier.fillMaxWidth().height(40.dp) .landingPop(landed).pulseRing(ring, pal.signal) .clip(LAYER_SHAPE) - .background(if (selected) Color.Transparent else colors.surface) - .glideBorder(hot, LAYER_SHAPE, pal.signal, if (selected) Color.Transparent else pal.line) + .background(if (under) Color.Transparent else colors.surface) + .shownBar(selected, pal.signal, vertical = true) + .glideBorder(hot, LAYER_SHAPE, pal.signal, if (under) Color.Transparent else pal.line) .onFocusChanged { if (it.isFocused) onFocus() } .hoverable(src).clickable(interactionSource = src, indication = null, role = Role.Tab, onClick = onClick) .controllerConfirm(onClick = onClick) @@ -730,7 +1005,6 @@ private fun LayerCard( if (swapped) Box(Modifier.size(7.dp).clip(CircleShape).background(pal.signal)) Text(title, fontSize = 13.5.sp, fontWeight = FontWeight.Bold, color = if (selected || hot) colors.onBackground else colors.onSurfaceVariant, maxLines = 1) Spacer(Modifier.weight(1f)) - // The value ticks over as a swap lands. AnimatedContent( value, transitionSpec = { (slideInVertically(Motion.tw(260)) { it / 2 } + fadeIn(Motion.tw(260))) togetherWith (slideOutVertically(Motion.tw(160)) { -it / 2 } + fadeOut(Motion.tw(160))) }, @@ -740,7 +1014,6 @@ private fun LayerCard( } } -/** What is in use for the layer: a dot (green, or amber while a change waits), a sentence, and a note or Cancel. */ @Composable private fun InUseBar(queued: Boolean, sentence: String, note: String, onCancel: (() -> Unit)? = null) { val colors = MaterialTheme.colorScheme @@ -757,7 +1030,6 @@ private fun InUseBar(queued: Boolean, sentence: String, note: String, onCancel: } } -/** A titled column of rows. */ @Composable private fun RowGroup(title: String, content: @Composable ColumnScope.() -> Unit) { val colors = MaterialTheme.colorScheme @@ -776,6 +1048,253 @@ private fun EmptyLine(text: String) { Text(text, fontSize = 13.sp, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(horizontal = 14.dp, vertical = 12.dp)) } +@Composable +private fun GameComponentOverrides( + game: Library.SteamGame, + config: GameEnvironment.Config?, + generalFexPreset: String, + generalProton: ComponentsManager.Proton?, + protons: List<ComponentsManager.Proton>, + protonId: String?, + protonChoice: ProtonDefault.GameChoice?, + packages: List<ComponentsManager.Package>, + componentChoices: Map<String, String>, + componentMenu: String?, + protonMenu: Boolean, + fexMenu: Boolean, + busy: Boolean, + error: Boolean, + notice: String?, + winComponentsRevision: Int, + onFexMenu: (Boolean) -> Unit, + onFexPreset: (String?) -> Unit, + onProtonMenu: (Boolean) -> Unit, + onProton: (String?) -> Unit, + onComponentMenu: (String?) -> Unit, + onComponent: (String, String?) -> Unit, + onEnvironment: () -> Unit, + onWinComponents: () -> Unit, + onReset: () -> Unit, + modifier: Modifier = Modifier, +) { + val context = LocalContext.current + val override = config?.let { GameEnvironment.gameFexPreset(it, game.profileKey) } + val proton = protons.firstOrNull { it.id == protonId } + val effectiveProton = if (protonChoice == null) generalProton else proton + val picks = remember(game.profileKey, winComponentsRevision) { WinComponents.picks(context, game.profileKey) } + Column( + verticalArrangement = Arrangement.spacedBy(14.dp), + modifier = modifier.verticalScroll(rememberScrollState()).padding(top = 14.dp, bottom = 16.dp), + ) { + Text( + stringResource(R.string.comp_game_hint), + fontSize = 13.sp, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + SettingsGroup(stringResource(R.string.fex_preset_title)) { + SettingsRow( + stringResource(R.string.comp_game_fex), + stringResource(if (override == null) R.string.comp_game_fex_inherited else R.string.comp_game_fex_override), + ) { + FexPresetChip( + preset = override ?: generalFexPreset, + inherited = override == null, + open = fexMenu, + enabled = config != null && !busy, + allowInheritance = true, + onToggle = { onFexMenu(!fexMenu) }, + onDismiss = { onFexMenu(false) }, + onPick = onFexPreset, + ) + } + GamePackageRow( + comp = "fex", + packages = packages, + selectedFile = componentChoices["fex"], + open = componentMenu == "fex", + busy = busy, + onMenu = onComponentMenu, + onPick = onComponent, + ) + } + SettingsGroup(stringResource(R.string.comp_game_compatibility)) { + SettingsRow( + stringResource(R.string.comp_proton), + stringResource(if (protonChoice == null) R.string.comp_game_proton_inherited else R.string.comp_game_proton_override), + ) { + Box { + ValueChip( + proton?.name ?: protonChoice?.dir ?: stringResource(R.string.comp_game_use_general), + protonMenu, + enabled = protons.isNotEmpty() && !busy, + modifier = Modifier.widthIn(max = 280.dp), + ) { onProtonMenu(!protonMenu) } + AnchoredMenu( + protonMenu, + onDismiss = { onProtonMenu(false) }, + title = stringResource(R.string.comp_proton), + ) { first -> + MenuItem( + stringResource(R.string.comp_game_use_general), + checked = protonChoice == null, + focusRequester = first, + ) { onProton(null); onProtonMenu(false) } + protons.forEach { option -> + MenuItem(option.name, checked = proton?.id == option.id) { + onProton(option.id) + onProtonMenu(false) + } + } + } + } + } + GamePackageRow( + comp = "dxvk", + packages = packages, + selectedFile = componentChoices["dxvk"], + open = componentMenu == "dxvk", + busy = busy, + proton = effectiveProton, + onMenu = onComponentMenu, + onPick = onComponent, + onRuntimeOptions = onEnvironment, + ) + GamePackageRow( + comp = "vkd3d", + packages = packages, + selectedFile = componentChoices["vkd3d"], + open = componentMenu == "vkd3d", + busy = busy, + proton = effectiveProton, + onMenu = onComponentMenu, + onPick = onComponent, + onRuntimeOptions = onEnvironment, + ) + SettingsRow( + stringResource(R.string.game_env_title), + stringResource(R.string.comp_game_environment_other_hint), + ) { + SecondaryButton(stringResource(R.string.game_env_edit), enabled = !busy, onClick = onEnvironment) + } + SettingsRow( + stringResource(R.string.wincomp_title), + if (picks.isEmpty()) stringResource(R.string.wincomp_card_none) + else picks.joinToString(", ") { com.droiddeck.launcher.session.WinComponentNames.of(it) }, + ) { + SecondaryButton(stringResource(R.string.game_env_edit), onClick = onWinComponents) + } + } + notice?.let { + Text( + it, + fontSize = 13.sp, + color = if (error) MaterialTheme.colorScheme.error else LocalPalette.current.good, + ) + } + if (error && notice == null) Text(stringResource(R.string.game_env_error), fontSize = 13.sp, color = MaterialTheme.colorScheme.error) + if (!busy) { + FocusText( + stringResource(R.string.comp_game_reset), + MaterialTheme.colorScheme.error, + onClick = onReset, + ) + } + if (busy) LinearProgressIndicator(Modifier.fillMaxWidth()) + } +} + +@Composable +private fun GamePackageRow( + comp: String, + packages: List<ComponentsManager.Package>, + selectedFile: String?, + open: Boolean, + busy: Boolean, + proton: ComponentsManager.Proton? = null, + onMenu: (String?) -> Unit, + onPick: (String, String?) -> Unit, + onRuntimeOptions: (() -> Unit)? = null, +) { + val choices = packages.filter { it.comp == comp } + val selected = choices.firstOrNull { it.file == selectedFile } + val title = ComponentsManager.LABEL[comp] ?: comp + SettingsRow( + title, + if (selected == null) { + if (proton == null) stringResource(R.string.comp_game_component_general) + else stringResource(R.string.comp_game_component_runtime, proton.name) + } else stringResource(R.string.comp_game_component_override, selected.version), + ) { + Row(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically) { + Box { + ValueChip( + selected?.version ?: stringResource(R.string.comp_game_use_general), + open, + enabled = !busy, + modifier = Modifier.widthIn(max = 240.dp), + ) { onMenu(if (open) null else comp) } + AnchoredMenu(open, onDismiss = { onMenu(null) }, title = title) { first -> + MenuItem( + stringResource(R.string.comp_game_use_general), + checked = selected == null, + focusRequester = first, + ) { onPick(comp, null); onMenu(null) } + choices.forEach { option -> + MenuItem(option.version, checked = option.file == selectedFile, detail = option.description) { + onPick(comp, option.file) + onMenu(null) + } + } + } + } + if (onRuntimeOptions != null) { + SecondaryButton(stringResource(R.string.comp_game_runtime_options), enabled = !busy, onClick = onRuntimeOptions) + } + } + } +} + +@Composable +internal fun FexPresetChip( + preset: String, + inherited: Boolean, + open: Boolean, + enabled: Boolean, + onToggle: () -> Unit, + onDismiss: () -> Unit, + onPick: (String?) -> Unit, + allowInheritance: Boolean = false, + modifier: Modifier = Modifier, +) { + val chosen = FexPreset.all.firstOrNull { it.id == preset } + val label = when { + preset == GameEnvironment.CUSTOM_FEX_PRESET -> stringResource(R.string.comp_game_fex_custom) + chosen == null -> stringResource(FexPreset.byId("").label) + inherited -> stringResource(R.string.comp_game_use_general) + else -> stringResource(chosen.label) + } + Box { + ValueChip(label, open, enabled = enabled, modifier = modifier.widthIn(max = 260.dp), onClick = onToggle) + AnchoredMenu(open && enabled, onDismiss = onDismiss, title = stringResource(R.string.fex_preset_title)) { first -> + if (allowInheritance) { + MenuItem( + stringResource(R.string.comp_game_use_general), + checked = inherited, + focusRequester = first, + ) { onPick(null); onDismiss() } + } + FexPreset.all.forEachIndexed { index, option -> + MenuItem( + stringResource(option.label), + checked = !inherited && option.id == preset, + detail = stringResource(option.detail), + focusRequester = if (index == 0 && !allowInheritance) first else null, + ) { onPick(option.id); onDismiss() } + } + } + } +} + @Composable internal fun ToolIcon(icon: ImageVector, description: String, busy: Boolean = false, enabled: Boolean = true, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -795,10 +1314,6 @@ internal fun ToolIcon(icon: ImageVector, description: String, busy: Boolean = fa } } -/** - * A small button. Resting: grey outline (blue text when [accent]). Focused or hovered: a solid blue - * fill with an outline in the text colour - unmistakable in a column of identical buttons. - */ @Composable private fun SmallButton(text: String, enabled: Boolean = true, accent: Boolean = false, modifier: Modifier = Modifier, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -843,10 +1358,6 @@ private fun Tag(text: String) { ) } -/** - * One installed choice: a radio for the one in use, its name and detail, and a trash at the right - * of the ones that can go. [progress] shows a download for it in place of the tag. - */ @Composable private fun ChoiceLine( name: String, detail: String, selected: Boolean, removable: Boolean, @@ -883,10 +1394,8 @@ private fun ChoiceLine( } DetailLine(detail, badge) } - // The radio says which is in use; a download in flight shows where a tag would. if (progress != null) ProgressBit(progress) } - // The trash column is always there (empty when the row can't be deleted) so rows line up. if (!removable) Spacer(Modifier.padding(end = 6.dp).size(44.dp)) else { val delSrc = remember { MutableInteractionSource() } @@ -904,11 +1413,10 @@ private fun ChoiceLine( Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line)) } -/** One thing not installed yet: its name and detail, and Get - its download shown in the row once started. */ @Composable private fun GetLine( name: String, detail: String, progress: Int?, enabled: Boolean, - badge: String? = null, stage: String? = null, onCancel: (() -> Unit)? = null, onGet: () -> Unit, + badge: String? = null, stage: String? = null, onCancel: (() -> Unit)? = null, action: String? = null, onGet: () -> Unit, ) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current @@ -923,13 +1431,12 @@ private fun GetLine( if (progress != null) ProgressBit(progress) else { if (onCancel != null) FocusText(stringResource(R.string.proton_cancel_queued), pal.signal, onClick = onCancel) - SmallButton(stringResource(R.string.comp_get), enabled = enabled, accent = true, onClick = onGet) + SmallButton(action ?: stringResource(R.string.comp_get), enabled = enabled, accent = true, onClick = onGet) } } Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line)) } -/** A row's second line, led by [badge] (Recommended) in green when there is one. */ @Composable private fun DetailLine(detail: String, badge: String?) { val colors = MaterialTheme.colorScheme @@ -957,16 +1464,12 @@ private fun ProgressBit(progress: Int) { } } -/** - * The GPU and how far it is supported, as a chip: a green dot and "<GPU> · tested", amber when it - * is not. A steps the device's full details out of it, with the copy for a bug report. - */ @Composable private fun DeviceChip(s: GpuDriversState) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current - val tint = if (s.supported && !s.unsupported) pal.good else AttentionAmber - val label = stringResource( + val tint = if (s.supported && !s.unsupported && !s.display.pending) pal.good else AttentionAmber + val label = if (s.display.pending) stringResource(R.string.gpu_chip_restart, s.gpuName) else stringResource( when { s.unsupported -> R.string.comp_device_unsupported s.supported -> R.string.comp_device_tested @@ -1001,7 +1504,6 @@ private fun DeviceChip(s: GpuDriversState) { ) { face() } } -/** What the Proton layer installs: the Protons DroidDeck can download, and one being installed. */ class ProtonsState( val rows: List<ProtonRow> = emptyList(), val busyId: String? = null, @@ -1014,8 +1516,21 @@ class ProtonsState( class ProtonsActions( val onInstall: (String) -> Unit = {}, val onCancel: (String) -> Unit = {}, - val onRemove: (String) -> Unit = {}, + val onRemove: (String, String) -> Unit = { _, _ -> }, + val onRemoveOlder: (String) -> Unit = {}, ) -/** A Proton DroidDeck can install, and the folder it is installed as (null when it is not). */ -class ProtonRow(val id: String, val name: String, val installed: String?, val queued: Boolean) +class ProtonRow( + val id: String, val name: String, val installed: String?, val queued: Boolean, + val installedAll: List<String> = listOfNotNull(installed), val update: String? = null, +) + +@Composable +private fun gpuCardValue(gpu: GpuDriversState, auto: String): String { + val value = when (gpu.mode) { + GPU_MODE_AUTO -> gpu.activePair?.name?.let { stringResource(R.string.drivers_summary, auto, it) } ?: auto + else -> gpu.activePair?.name?.takeIf { gpu.mode == GPU_MODE_PAIR } + ?: if (gpu.display.name == gpu.runtime.name) gpu.display.name else stringResource(R.string.gpu_summary_mix, gpu.display.name, gpu.runtime.name) + } + return if (gpu.display.pending) stringResource(R.string.gpu_summary_restart, value) else value +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/ControllerSettings.kt b/app/src/main/java/com/droiddeck/launcher/ui/ControllerSettings.kt index 40cb450768..ff39fb00f3 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/ControllerSettings.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/ControllerSettings.kt @@ -29,6 +29,7 @@ class ControllerActions( val onQamButton: (Boolean) -> Unit, val onKeyboardButton: (Boolean) -> Unit, val onSelectSteam: (Boolean) -> Unit, + val onJoyConVr: (Boolean) -> Unit, val onEditLayout: () -> Unit, val onResetLayout: () -> Unit, val onMapping: () -> Unit, @@ -72,6 +73,7 @@ fun ColumnScope.ControllerRows(host: MenuHost, oscMode: String, c: ControllerPre ToggleRow(host, "controller-qam", stringResource(R.string.ctrl_qam_button), null, c.qamButton, onChange = a.onQamButton) ToggleRow(host, "controller-keyboard", stringResource(R.string.ctrl_keyboard_button), null, c.keyboardButton, onChange = a.onKeyboardButton) ToggleRow(host, "controller-select-steam", stringResource(R.string.ctrl_select_steam), stringResource(R.string.ctrl_select_steam_hint), c.selectSteam, onChange = a.onSelectSteam) + ToggleRow(host, "controller-joycon-vr", stringResource(R.string.ctrl_joycon_vr), stringResource(R.string.ctrl_joycon_vr_hint), c.joyConVr, onChange = a.onJoyConVr) SettingsRow(stringResource(R.string.ctrl_layout), if (c.customLayout) stringResource(R.string.ctrl_layout_custom) else stringResource(R.string.ctrl_layout_default)) { Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) { SecondaryButton(stringResource(R.string.ctrl_edit)) { a.onEditLayout() } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/CursorOverlay.kt b/app/src/main/java/com/droiddeck/launcher/ui/CursorOverlay.kt index 6b527c97c2..8f883c24c4 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/CursorOverlay.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/CursorOverlay.kt @@ -11,11 +11,6 @@ import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.Path import androidx.compose.ui.graphics.drawscope.Stroke -/** - * The session's pointer. [image]: the program's own cursor (wl_pointer.set_cursor - labwc's resize - * arrows, a text field's I-beam), in session pixels, drawn [imageScale] times larger with its hotspot - * ([hotX], [hotY]) on [position]; null = the program has not set one, and the built-in arrow is drawn. - */ @Composable fun CursorOverlay( position: Offset, visible: Boolean, scale: Float, diff --git a/app/src/main/java/com/droiddeck/launcher/ui/DeckControlsPanel.kt b/app/src/main/java/com/droiddeck/launcher/ui/DeckControlsPanel.kt index 4bee3b6a83..b030632fc6 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/DeckControlsPanel.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/DeckControlsPanel.kt @@ -27,16 +27,6 @@ import kotlin.math.atan2 import kotlin.math.hypot import kotlin.math.min -/** - * The Steam Deck controller's back grips and trackpads, on the second screen. - * - * Four tabs: the grips as a 2x2 grid (left grips on the left, upper above lower, as they sit on a - * Deck); either trackpad on its own with a bar to click it; and both trackpads with the grips in a - * row beneath. Given the [pad] (the unfolded screen's panel), a fifth: a whole gamepad, each side - * an analog stick or a trackpad as the player picks. A trackpad clicks from its bar or from a second finger while the first is down. - * Drawn for OLED: true black, with outlines rather than filled surfaces, and the Steam blue only - * where something is being touched. - */ @SuppressLint("ViewConstructor") class DeckControlsPanel( context: Context, @@ -61,8 +51,6 @@ class DeckControlsPanel( override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { super.onSizeChanged(w, h, oldw, oldh) - // Held flat the gamepad has no Panels button, so another tab would have no way back: - // turning the phone from upright onto its side returns to the gamepad. if (pad != null && selectedWithPad != Tab.GAMEPAD && !GamepadGeometry.tall(w.toFloat(), h.toFloat())) { post { if (selectedWithPad != Tab.GAMEPAD) select(Tab.GAMEPAD) } } @@ -115,7 +103,6 @@ class DeckControlsPanel( view.setTextColor(if (on) ON_ACCENT else TEXT_DIM) } content.removeAllViews() - // The gamepad needs every row of the panel; held upright its Panels button brings the tabs back. topBar.visibility = if (tab == Tab.GAMEPAD) View.GONE else View.VISIBLE content.addView( when (tab) { @@ -159,7 +146,6 @@ class DeckControlsPanel( addView(TrackpadView(context, right = true), LayoutParams(0, LayoutParams.MATCH_PARENT, 1f).apply { leftMargin = dp(6) }) } addView(pads, LayoutParams(LayoutParams.MATCH_PARENT, 0, 1f).apply { bottomMargin = dp(12) }) - // Mirrored, as hands hold them: the upper grips outside, the lower ones in the middle. val grips = LinearLayout(context).apply { orientation = HORIZONTAL val row = listOf("L4" to DeckControls.L4, "L5" to DeckControls.L5, "R5" to DeckControls.R5, "R4" to DeckControls.R4) @@ -173,15 +159,6 @@ class DeckControlsPanel( addView(grips, LayoutParams(LayoutParams.MATCH_PARENT, dp(84))) } - /** - * A whole pad, placed for two thumbs rather than in columns (see [GamepadGeometry]): on each side - * a surface where the thumb rests - most of play is on the sticks or trackpads - and a short - * slide inward along its arc, the d-pad on the left and the face buttons on the right; the bumpers and triggers above, at the top of the arc; View, Steam, QAM and Menu in the - * middle, which a thumb only reaches on purpose. Each surface is an analog stick or a Steam - * trackpad, switched from its corner and remembered (SessionPrefs.gamepadSurface). Its tab bar - * is hidden; held upright, a Panels button brings the other tabs back, and held flat there is no - * room for one. - */ private fun gamepad(pad: PadBridge): View = GamepadLayout(context).apply { fun pill(label: String, write: (PadState, Boolean) -> Unit) = PadButton(context, pad, label, write) place(surfaceSlot(pad, right = false), GamepadGeometry.Slot.LEFT_MAIN) @@ -215,13 +192,11 @@ class DeckControlsPanel( } } - /** One side's stick or trackpad, with a chip in its outer corner that swaps the two. */ private fun surfaceSlot(pad: PadBridge, right: Boolean): View = FrameLayout(context).apply { val slot = this fun show() { slot.removeAllViews() val stick = SessionPrefs.gamepadSurface(context, right) == SessionPrefs.SURFACE_STICK - // No caption: the switch in its corner says which it is. slot.addView(if (stick) StickView(context, pad, right) else TrackpadView(context, right, captioned = false), FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT)) val chip = TextView(context).apply { @@ -239,7 +214,6 @@ class DeckControlsPanel( show() } } - // In the corner away from the thumb, so play does not swap it by accident. slot.addView(chip, FrameLayout.LayoutParams(dp(30), dp(30), (if (right) Gravity.START else Gravity.END) or Gravity.TOP).apply { setMargins(dp(6), dp(6), dp(6), dp(6)) }) } @@ -280,7 +254,6 @@ class DeckControlsPanel( private fun dp(value: Int): Int = (value * resources.displayMetrics.density + 0.5f).toInt() - /** A surface drawn the same way everywhere on the panel; pressed, it lights up in the accent. */ private abstract class Surface(context: Context) : View(context) { protected val density = resources.displayMetrics.density protected val rect = RectF() @@ -307,7 +280,6 @@ class DeckControlsPanel( } } - /** A held button: down while a finger is on it. */ private open class HoldButton( context: Context, private val label: String, @@ -353,10 +325,6 @@ class DeckControlsPanel( private class ClickBar(context: Context, right: Boolean) : HoldButton(context, context.getString(R.string.deck_click), if (right) context.getString(R.string.deck_right_trackpad) else context.getString(R.string.deck_left_trackpad), { DeckControls.setClick(right, it) }) - /** - * One trackpad: where the first finger is, as the Deck reports it (-1..1, y up), and a click - * while a second finger is down. - */ private class TrackpadView(context: Context, private val right: Boolean, private val captioned: Boolean = true) : Surface(context) { private var touching = false private var clicked = false @@ -396,7 +364,6 @@ class DeckControlsPanel( } MotionEvent.ACTION_POINTER_DOWN -> click(true) MotionEvent.ACTION_POINTER_UP -> { - // The finger that lifted may be the first; the pad follows whichever stays. val stays = if (event.actionIndex == 0) 1 else 0 touch(event.getX(stays), event.getY(stays)) click(event.pointerCount - 1 > 1) @@ -428,7 +395,6 @@ class DeckControlsPanel( } } - /** A pad button held while a finger is on it, written into the shared pad as the on-screen pad does. */ private class PadButton( context: Context, private val pad: PadBridge, @@ -441,11 +407,6 @@ class DeckControlsPanel( } } - /** - * An analog stick that centres where the thumb lands, so it is never missed: the knob follows - * the finger from there out to the ring. Tapping it again and holding (within [CLICK_MS]) is - * the stick's click - L3 or R3 - for as long as the thumb stays down. - */ private class StickView(context: Context, private val pad: PadBridge, private val right: Boolean) : Surface(context) { private var touching = false private var clicking = false @@ -475,7 +436,6 @@ class DeckControlsPanel( val r = reach().coerceAtLeast(1f) when (event.actionMasked) { MotionEvent.ACTION_DOWN -> { - // Centred where the thumb lands, but kept far enough in for the ring to fit. originX = event.x.coerceIn(r, (width - r).coerceAtLeast(r)) originY = event.y.coerceIn(r, (height - r).coerceAtLeast(r)) touching = true @@ -525,10 +485,9 @@ class DeckControlsPanel( } } - /** The d-pad: the direction is the finger's angle from the centre, diagonals included. */ private class DirectionPad(context: Context, private val pad: PadBridge) : View(context) { private val density = resources.displayMetrics.density - private var held = 0 // bits: 1 up, 2 right, 4 down, 8 left + private var held = 0 private val arm = Paint(Paint.ANTI_ALIAS_FLAG) private val rect = RectF() @@ -558,7 +517,6 @@ class DeckControlsPanel( val dx = event.getX(0) - width / 2f val dy = event.getY(0) - height / 2f if (hypot(dx, dy) < min(width, height) * 0.08f) 0 else { - // Eight sectors of 45 degrees, starting with right and going clockwise. val sector = ((Math.toDegrees(atan2(dy.toDouble(), dx.toDouble())) + 360 + 22.5) % 360 / 45).toInt() intArrayOf(2, 2 or 4, 4, 4 or 8, 8, 8 or 1, 1, 1 or 2)[sector] } @@ -585,7 +543,6 @@ class DeckControlsPanel( } } - /** A, B, X and Y in a diamond, as on a Deck; several fingers can hold several at once. */ private class FaceButtons(context: Context, private val pad: PadBridge) : View(context) { private val buttons = listOf(PadState.Y to "Y", PadState.B to "B", PadState.A to "A", PadState.X to "X") private var held = emptySet<Int>() @@ -595,7 +552,6 @@ class DeckControlsPanel( typeface = Typeface.create(Typeface.DEFAULT, Typeface.BOLD) } - /** Top, right, bottom, left - the centre of each, and the radius of all. */ private fun layout(): Pair<List<Pair<Float, Float>>, Float> { val cx = width / 2f val cy = height / 2f @@ -626,7 +582,6 @@ class DeckControlsPanel( if (event.actionMasked == MotionEvent.ACTION_POINTER_UP && p == event.actionIndex) continue val x = event.getX(p) val y = event.getY(p) - // The nearest button within reach, so a thumb between two still lands on one. val nearest = centres.indices.minByOrNull { hypot(centres[it].first - x, centres[it].second - y) } ?: continue if (hypot(centres[nearest].first - x, centres[nearest].second - y) <= radius * 1.6f) now.add(buttons[nearest].first) } @@ -649,7 +604,6 @@ class DeckControlsPanel( } } - /** Lays its controls out where [GamepadGeometry] puts them for the panel's size. */ private class GamepadLayout(context: Context) : ViewGroup(context) { private val slots = LinkedHashMap<View, GamepadGeometry.Slot>() @@ -686,12 +640,9 @@ class DeckControlsPanel( } companion object { - /** A second press on a stick this soon after the last is its click (L3, R3). */ private const val CLICK_MS = 300L - /** The tab last shown, kept for the session so reopening the panel lands where it was. */ private var selected = Tab.BOTH - /** The same for the unfolded screen's panel, which opens on the gamepad. */ private var selectedWithPad = Tab.GAMEPAD private const val CORNER = 20f diff --git a/app/src/main/java/com/droiddeck/launcher/ui/DesktopPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/DesktopPage.kt index 9d52bdf50a..e1068a53cb 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/DesktopPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/DesktopPage.kt @@ -93,12 +93,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -// The Desktop tab in the Steam tab's shape: a tilted wall of little windows behind the word and -// one big Open desktop, with Play's lip and lifted sheet under it (Display, Controls, Session and -// Files). Under the hero the page scrolls to two shelves - the apps that run in the desktop, and -// what can be added - and the hero folds into a slim header as it goes. -/** The desktop's own chips: its session settings, then Files. */ private val DESKTOP_TABS = modeSheetTabs(steam = false) + SheetTab.FILES @Composable @@ -108,7 +103,6 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie val narrow = LocalNarrowPane.current val colors = MaterialTheme.colorScheme LaunchedEffect(Unit) { UserAppsState.refresh(ctx) } - // Flathub's installed apps sit with the others on the dock. LaunchedEffect(s.ready) { com.droiddeck.launcher.store.StoreState.refresh(ctx) } val installed = s.emulators.filter { it.installed } val apps = UserAppsState.items @@ -116,14 +110,11 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie val mode = SessionService.MODE_DESKTOP val tabs = DESKTOP_TABS.map { it to sheetTabLabel(it) } val open = if (s.desktopInstalled) stringResource(R.string.content_open_desktop) else stringResource(R.string.content_install_open_desktop) - // Opened from a card: the page floods out of it, its picture on the tile. fun openFrom(at: Rect?, art: Any?, page: String) { at?.let { PageOrigin.mark(Origin(it, 16f * density.density, art = art)) } onSelect(page) } - // The Steam tab's shape, the whole pane: the dock of apps along the top of the wall, the word - // and Open desktop at the foot, and nothing under the settings sheet but the hero itself. LiftHero( key = "desktop", tabs = tabs, onOpen = a.onDesktopSettings, onPrimary = a.onDesktop, @@ -134,15 +125,12 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie }, scrim = { lifted -> WallFade() - // Over the fades, so the cards read at full strength; gone as the sheet lifts, so - // nothing but the wall is behind it. Box(Modifier.graphicsLayer { val v = lifted(); alpha = 1f - v; translationY = -12.dp.toPx() * v }) { DesktopDock(s, a, installed, apps, openFrom = ::openFrom) } }, words = { Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - // The word at the wordmark's size. Text( stringResource(R.string.rail_desktop), fontSize = if (narrow) 30.sp else 42.sp, lineHeight = if (narrow) 34.sp else 46.sp, fontWeight = FontWeight.Black, color = colors.onBackground, @@ -151,13 +139,10 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie } }, button = { click -> - // Enabled without a runtime or the desktop: the session's loading screen installs them first. PrimaryButton(open, enabled = !s.busy, main = true, large = true, icon = Icons.Outlined.DesktopWindows, onClick = click) }, beside = { - // Flathub, whose apps run in the desktop: its storefront floods out of this button. HeroIconButton(Icons.Outlined.Storefront, stringResource(R.string.flathub_name), FlathubTeal, "desktop:flathub") { at -> openFrom(at, null, "store") } - // Add your own app or game. HeroIconButton(Icons.Filled.Add, stringResource(R.string.user_apps_add), null, "desktop:add") { if (!s.busy) adding = true } }, rows = { tab -> @@ -168,11 +153,6 @@ 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) } } -/** - * The dock along the top of the Desktop hero: what runs in the desktop (emulators installed, apps - * added, Flathub's installed apps), then the emulators that can be added - one - * row of cards that scrolls sideways, over the wall. It sinks back with the wall as the sheet lifts. - */ @Composable private fun DesktopDock( s: FrontEndState, a: FrontEndActions, installed: List<Library.Emulator>, apps: List<UserApps.App>, @@ -184,14 +164,12 @@ private fun DesktopDock( val available = s.emulators.filter { !it.installed } val flatpaks = com.droiddeck.launcher.store.StoreState.installed val keys = installed.map { "emu:${it.id}" } + apps.map { "user:${it.key}" } + flatpaks.map { "flatpak:${it.id}" } - // Where the last of your apps sits, for a new emulator's dot to land after it. var lastAt by remember { mutableStateOf<Rect?>(null) } var dockAt by remember { mutableStateOf<Rect?>(null) } val seen = remember { mutableSetOf<String>() } val mounted = remember { booleanArrayOf(false) } LaunchedEffect(Unit) { mounted[0] = true } val scroll = rememberScrollState() - // Nothing yet (the emulators' catalog still on its way): no heading over an empty row. if (keys.isEmpty() && available.isEmpty() && UserAppsState.working == null && UserAppsState.lastError == null) return Column(Modifier.fillMaxWidth().padding(top = if (narrow) 14.dp else 22.dp)) { Text( @@ -205,7 +183,6 @@ private fun DesktopDock( ) { keys.forEachIndexed { i, k -> key(k) { - // A card that arrives after the dock is up (an emulator just installed) opens in. val state = remember { MutableTransitionState(!mounted[0] || k in seen) }.apply { targetState = true } LaunchedEffect(Unit) { seen += k } AnimatedVisibility(state, enter = expandHorizontally(Motion.sp(0.75f)) + fadeIn(Motion.tw(300, 80))) { @@ -224,7 +201,6 @@ private fun DesktopDock( k, flatpak.name, flatpak.summary ?: stringResource(R.string.flathub_name), art = flatpak.icon ?: com.droiddeck.launcher.store.FlathubApi.iconUrl(flatpak.id), first = i == 0, ) { at -> - // Its page on Flathub: open, update or remove it there. com.droiddeck.launcher.store.StoreState.openRequest = flatpak.id openFrom(at, flatpak.icon, "store") } else if (app != null) DesktopCard(k, app.name, stringResource(app.kind.label()), art = app.icon, fallback = if (app.kind == UserApps.Kind.SCRIPT) Icons.Outlined.Terminal else Icons.Outlined.Apps, first = i == 0) { at -> @@ -234,7 +210,6 @@ private fun DesktopDock( } } } - // Between yours and what can be added: a thin rule. if (keys.isNotEmpty()) Box(Modifier.padding(horizontal = 4.dp).width(1.dp).height(120.dp).background(pal.line2)) available.forEach { e -> key(e.id) { @@ -247,8 +222,6 @@ private fun DesktopDock( art = e.iconRes, badge = if (busyHere) null else stringResource(R.string.comp_get), progress = if (busyHere) s.packagePercent else null, first = keys.isEmpty() && e == available.first(), ) { at -> - // Get installs it there and then, and a dot flies to where its card will be; - // when it cannot (no runtime, a session running), its page says why. if (canGet && pkg != null && at != null) { a.onInstallPackage(pkg.id) val end = lastAt @@ -268,10 +241,6 @@ private fun DesktopDock( } } -/** - * A square button the big one's height beside it on the hero: an icon in [tint] (the palette's - * signal when null). [onClick] gets its bounds, for a page to flood out of. - */ @Composable private fun HeroIconButton(icon: androidx.compose.ui.graphics.vector.ImageVector, description: String, tint: Color?, id: String, onClick: (Rect?) -> Unit) { val colors = MaterialTheme.colorScheme @@ -295,10 +264,6 @@ private fun HeroIconButton(icon: androidx.compose.ui.graphics.vector.ImageVector ) { Icon(icon, null, tint = accent, modifier = Modifier.size(26.dp)) } } -/** - * The hero's wall: little windows tilted and drifting as Steam's capsules do, each a window with a - * bar along its foot and an emulator's or app's icon inside; blank windows when there are none. - */ @Composable private fun DesktopWall(icons: List<Any>) { val pal = LocalPalette.current @@ -308,11 +273,6 @@ private fun DesktopWall(icons: List<Any>) { } } -/** - * One thing that runs in the desktop: its icon over a blurred, darkened copy of itself, a status on - * the art (Get, or how far an install is), and under it its name on up to two lines and what it - * is. [onClick] gets the art's bounds, for a page to flood out of or a dot to fly from. - */ @Composable private fun DesktopCard( key: String, name: String, detail: String, art: Any?, @@ -384,10 +344,6 @@ private fun DesktopCard( } } -/** - * The desktop sheet's Files chip: the file manager and the ROMs folder (both from Setup's old - * tools), how much the desktop takes, and Uninstall - its only home - which asks in red first. - */ @Composable private fun DesktopFiles(s: FrontEndState, a: FrontEndActions) { val ctx = LocalContext.current @@ -408,7 +364,6 @@ private fun DesktopFiles(s: FrontEndState, a: FrontEndActions) { } } -/** Uninstall the desktop: are you sure steps out of it in red, Keep first and focused. */ @Composable private fun UninstallDesktop(enabled: Boolean, onUninstall: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -435,7 +390,6 @@ private fun UninstallDesktop(enabled: Boolean, onUninstall: () -> Unit) { } } -/** The add or remove under way, or why the last one failed. */ @Composable private fun UserAppsProgressLine() { val colors = MaterialTheme.colorScheme diff --git a/app/src/main/java/com/droiddeck/launcher/ui/DriverPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/DriverPage.kt index 8da7609544..bfdde089a6 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/DriverPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/DriverPage.kt @@ -3,6 +3,7 @@ package com.droiddeck.launcher.ui import com.droiddeck.launcher.R import androidx.compose.ui.res.stringResource import androidx.activity.compose.BackHandler +import androidx.compose.foundation.focusGroup import androidx.compose.foundation.background import androidx.compose.foundation.hoverable import androidx.compose.foundation.interaction.MutableInteractionSource @@ -42,6 +43,11 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.focus.onFocusChanged +import androidx.compose.ui.input.InputMode +import androidx.compose.ui.platform.LocalInputModeManager +import androidx.compose.runtime.snapshotFlow +import kotlinx.coroutines.flow.first import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontWeight @@ -49,13 +55,6 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -/** - * One driver list as a full page - the Runtime driver or the Display driver - opened from the - * session's settings page. Installed drivers are picked by tapping the row and each carries a trash - * can (the "Auto"/"Runtime default" row is a setting, not a driver, so it has none); what the last - * check of the release repos found is offered below; the refresh button beside the title is the - * only thing that goes online. - */ @Composable fun DriverPage( title: String, @@ -66,6 +65,7 @@ fun DriverPage( status: String, checking: Boolean, importLabel: String, + checkedAt: Long = Long.MAX_VALUE, canRestore: Boolean, onSelect: (String) -> Unit, onDelete: (String) -> Unit, @@ -79,16 +79,24 @@ fun DriverPage( val colors = MaterialTheme.colorScheme val pal = LocalPalette.current var confirm by remember { mutableStateOf<DriverRow?>(null) } - // Back (the controller's B too) closes this page only, back to the session's settings. BackHandler(onBack = onBack) - // D-pad: up from the first driver lands on refresh; the page opens with the driver in use focused. + LaunchedEffect(Unit) { + if (!checking && System.currentTimeMillis() - checkedAt > 6 * 3_600_000L) onRefresh() + } val refreshFocus = remember { FocusRequester() } val selectedFocus = remember { FocusRequester() } - LaunchedEffect(Unit) { runCatching { selectedFocus.requestFocus() } } + val inputMode = LocalInputModeManager.current + var pageFocused by remember { mutableStateOf(false) } + LaunchedEffect(inputMode.inputMode) { + if (inputMode.inputMode != InputMode.Keyboard) return@LaunchedEffect + snapshotFlow { Steps.step }.first { it == null } + focusWithinFrames({ pageFocused }) { selectedFocus } + } val refreshSrc = remember { MutableInteractionSource() } val refreshHot = refreshSrc.collectIsFocusedAsState().value || refreshSrc.collectIsHoveredAsState().value SettingsPage( host, title = title, onBack = onBack, lede = "$hint\n$status", + modifier = Modifier.onFocusChanged { pageFocused = it.hasFocus }.focusGroup(), action = { Box( contentAlignment = Alignment.Center, @@ -148,7 +156,6 @@ fun DriverPage( fontSize = 13.sp, ) }, - // Opens on Cancel, so a stray A press on a controller never deletes anything. confirmButton = { FocusText(stringResource(R.string.common_delete), colors.error) { confirm = null; onDelete(row.id) } }, dismissButton = { val cancelFocus = remember { FocusRequester() } @@ -166,10 +173,6 @@ private fun InstalledRow(row: DriverRow, selected: Boolean, onSelect: () -> Unit val src = remember { MutableInteractionSource() } val hot = src.collectIsFocusedAsState().value || src.collectIsHoveredAsState().value val shape = RoundedCornerShape(10.dp) - // Two focus targets side by side - the driver itself, and its trash can - so a controller's - // d-pad right reaches the trash can and left comes back. (Inside one clickable row the trash - // can was a child of the focused area and "right" had nowhere to go.) The row's outline still - // follows the driver part, so it looks the same. val mainFocus = remember { FocusRequester() } val delFocus = remember { FocusRequester() } Row( @@ -222,7 +225,6 @@ private fun InstalledRow(row: DriverRow, selected: Boolean, onSelect: () -> Unit Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line)) } -/** A text button that shows where controller focus is: an outline in its own colour. */ @Composable internal fun FocusText(text: String, color: Color, modifier: Modifier = Modifier, onClick: () -> Unit) { val src = remember { MutableInteractionSource() } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/DropSheet.kt b/app/src/main/java/com/droiddeck/launcher/ui/DropSheet.kt new file mode 100644 index 0000000000..317d9b0ce4 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/DropSheet.kt @@ -0,0 +1,484 @@ +package com.droiddeck.launcher.ui + +import android.view.KeyEvent +import androidx.activity.compose.BackHandler +import androidx.compose.animation.AnimatedContent +import androidx.compose.animation.core.Animatable +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.slideInHorizontally +import androidx.compose.animation.slideOutHorizontally +import androidx.compose.animation.togetherWith +import androidx.compose.foundation.Canvas +import androidx.compose.foundation.LocalIndication +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.focusGroup +import androidx.compose.foundation.gestures.detectTapGestures +import androidx.compose.foundation.hoverable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraintsScope +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Close +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.rememberUpdatedState +import androidx.compose.runtime.setValue +import androidx.compose.runtime.withFrameNanos +import androidx.compose.ui.Alignment +import androidx.compose.ui.ExperimentalComposeUiApi +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.focus.FocusDirection +import androidx.compose.ui.focus.FocusRequester +import androidx.compose.ui.focus.focusProperties +import androidx.compose.ui.focus.focusRequester +import androidx.compose.ui.focus.onFocusChanged +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.geometry.Rect +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Path +import androidx.compose.ui.graphics.drawscope.Stroke +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.graphics.lerp +import androidx.compose.ui.input.InputMode +import androidx.compose.ui.input.key.onPreviewKeyEvent +import androidx.compose.ui.input.nestedscroll.NestedScrollConnection +import androidx.compose.ui.input.nestedscroll.NestedScrollSource +import androidx.compose.ui.input.nestedscroll.nestedScroll +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.layout.boundsInParent +import androidx.compose.ui.layout.onGloballyPositioned +import androidx.compose.ui.layout.onSizeChanged +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.LocalInputModeManager +import androidx.compose.ui.platform.testTag +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.Velocity +import androidx.compose.ui.unit.dp +import androidx.compose.ui.util.lerp +import androidx.compose.ui.zIndex +import com.droiddeck.launcher.R +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Job +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch +import kotlin.math.roundToInt + +private const val DROP_PIECES = 12 + +internal class DropSheetState(private val scope: CoroutineScope) { + var open by mutableStateOf(false) + var shown by mutableStateOf(false) + var lipBack by mutableStateOf(false) + var tab by mutableStateOf(0) + var travel by mutableStateOf(1) + var settledByDrag = false + var engaged = false + private set + val pull = Animatable(0f) + val lift = Animatable(0f) + val ride = Animatable(0f) + val sink = Animatable(0f) + val hot = Animatable(1f) + val lipShow = Animatable(0f) + val lipGone = Animatable(0f) + val pieces = List(DROP_PIECES) { Animatable(0f) } + var travelPx = 1f + private var from = 0f + var progress = 0f + private set + private var dragJob: Job? = null + + fun cancelDrag() { + dragJob?.cancel() + dragJob = null + } + + fun reset() { + cancelDrag() + engaged = false + settledByDrag = false + open = false + shown = false + lipBack = false + scope.launch { + listOf(pull, lift, ride, sink, lipGone).forEach { it.snapTo(0f) } + pieces.forEach { it.snapTo(0f) } + hot.snapTo(1f) + } + } + + fun beginDrag() { + cancelDrag() + settledByDrag = false + engaged = true + from = if (open) 1f else 0f + progress = from + if (!open) shown = true + } + + fun drag(dy: Float) = follow((progress + dy / travelPx).coerceIn(0f, 1.04f)) + + fun follow(p: Float) { + progress = p + scope.launch { + lift.snapTo(p); ride.snapTo(p); sink.snapTo(p.coerceIn(0f, 1f)); hot.snapTo(0f) + lipGone.snapTo(1f) + pieces.forEach { it.snapTo(p.coerceIn(0f, 1f)) } + } + } + + fun settle(v: Float, flick: Float) { + engaged = false + val opens = when { + v > flick -> true + v < -flick -> false + from > 0.5f -> progress > 0.7f + else -> progress > 0.3f + } + settledByDrag = true + cancelDrag() + dragJob = scope.launch { + val to = if (opens) 1f else 0f + coroutineScope { + launch { lift.animateTo(to, Motion.sp(if (opens) 0.7f else 1f, 380f)) } + launch { ride.animateTo(to, Motion.sp(if (opens) 0.7f else 0.55f, if (opens) 380f else 300f)) } + launch { sink.animateTo(to, Motion.tw(220)) } + pieces.forEachIndexed { i, piece -> launch { if (opens) delay(Motion.ms(i * 35).toLong()); piece.animateTo(to, Motion.tw(if (opens) 200 else 90)) } } + } + if (!opens) { shown = false; lipGone.snapTo(0f); hot.snapTo(1f); lipBack = false } + } + if (open != opens) open = opens else settledByDrag = false + } +} + +@Composable +internal fun rememberDropSheetState(): DropSheetState { + val scope = rememberCoroutineScope() + return remember { DropSheetState(scope) } +} + +@OptIn(ExperimentalComposeUiApi::class, androidx.compose.animation.ExperimentalAnimationApi::class) +@Composable +internal fun BoxWithConstraintsScope.DropSheet( + state: DropSheetState, + tabs: List<Pair<String, String>>, + covered: () -> Float = { 0f }, + button: @Composable (enabled: Boolean) -> Unit, + rows: @Composable (tab: String) -> Unit, +) { + val density = LocalDensity.current + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val inputMode = LocalInputModeManager.current + val narrow = LocalNarrowPane.current + val chipFocus = remember(tabs.size) { List(tabs.size) { FocusRequester() } } + val buttonFocus = remember { FocusRequester() } + val leftForButton = remember { booleanArrayOf(false) } + var rest by remember { mutableStateOf<Rect?>(null) } + val openState = rememberUpdatedState(state.open) + if (state.tab > tabs.lastIndex) state.tab = 0 + fun focusButton() { if (inputMode.inputMode == InputMode.Keyboard) runCatching { buttonFocus.requestFocus() } } + fun close() { + if (!state.open) return + state.open = false + focusButton() + } + val lifecycle = androidx.compose.ui.platform.LocalLifecycleOwner.current.lifecycle + DisposableEffect(lifecycle) { + val obs = androidx.lifecycle.LifecycleEventObserver { _, e -> + if (e == androidx.lifecycle.Lifecycle.Event.ON_STOP && (state.open || state.shown || state.engaged)) state.reset() + } + lifecycle.addObserver(obs) + onDispose { lifecycle.removeObserver(obs) } + } + LaunchedEffect(state.open) { + if (state.settledByDrag) { + state.settledByDrag = false + if (state.open) { + if (inputMode.inputMode == InputMode.Keyboard) { withFrameNanos { }; runCatching { chipFocus[state.tab].requestFocus() } } + } else focusButton() + return@LaunchedEffect + } + if (state.engaged) return@LaunchedEffect + state.cancelDrag() + if (state.open) { + state.lipBack = false + state.shown = true + coroutineScope { + launch { state.pull.animateTo(24f, Motion.sp(0.7f, 380f)) } + launch { state.sink.animateTo(1f, Motion.tw(260)) } + launch { + delay(Motion.ms(120).toLong()) + launch { state.lipGone.animateTo(1f, Motion.tw(140)) } + launch { state.pull.animateTo(0f, Motion.sp(1f, 500f)) } + launch { state.lift.animateTo(1f, Motion.sp(0.7f, 380f)) } + launch { state.ride.animateTo(1f, Motion.sp(0.7f, 380f)) } + launch { state.hot.snapTo(1f); delay(Motion.ms(100).toLong()); state.hot.animateTo(0f, Motion.tw(200)) } + } + state.pieces.forEachIndexed { i, p -> launch { delay(Motion.ms(120 + 260 + i * 55).toLong()); p.animateTo(1f, Motion.tw(220)) } } + if (inputMode.inputMode == InputMode.Keyboard) launch { + delay(Motion.ms(300).toLong()) + withFrameNanos { } + runCatching { chipFocus[state.tab].requestFocus() } + } + } + } else if (state.shown) { + coroutineScope { + state.pieces.forEach { launch { it.animateTo(0f, Motion.tw(90)) } } + launch { delay(Motion.ms(60).toLong()); state.lift.animateTo(0f, Motion.sp(1f, 380f)) } + launch { delay(Motion.ms(100).toLong()); state.ride.animateTo(0f, Motion.sp(0.55f, 300f)) } + launch { state.sink.animateTo(0f, Motion.tw(300)) } + launch { delay(Motion.ms(420).toLong()); state.lipGone.snapTo(0f); state.lipBack = true } + } + state.shown = false + state.lipBack = false + state.lipGone.snapTo(0f) + state.hot.snapTo(1f) + } else { + listOf(state.pull, state.sink, state.lift, state.ride, state.lipGone).forEach { it.snapTo(0f) } + state.pieces.forEach { it.snapTo(0f) } + state.hot.snapTo(1f) + } + } + BackHandler(enabled = state.open) { close() } + if (state.ride.isRunning || (state.shown && !state.open)) VeilRing() + + val lipWanted = !state.open && (!state.shown || state.lipBack) && covered() < 0.5f + LaunchedEffect(lipWanted) { + if (lipWanted) { + if (!state.lipBack) delay(Motion.ms(160).toLong()) + state.lipShow.animateTo(1f, Motion.tw(220)) + } else { + delay(Motion.ms(140).toLong()) + state.lipShow.animateTo(0f, Motion.tw(220)) + } + } + + val flick = with(density) { 600.dp.toPx() } + val rowsPush = remember(state) { + object : NestedScrollConnection { + override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset { + if (!state.engaged || available.y <= 0f) return Offset.Zero + val before = state.progress + state.follow((before + available.y / state.travelPx).coerceAtMost(1f)) + return Offset(0f, (state.progress - before) * state.travelPx) + } + override fun onPostScroll(consumed: Offset, available: Offset, source: NestedScrollSource): Offset { + if (available.y >= 0f || source != NestedScrollSource.Drag || !openState.value) return Offset.Zero + if (!state.engaged) state.beginDrag() + state.follow((state.progress + available.y / state.travelPx).coerceIn(0f, 1f)) + return available + } + override suspend fun onPreFling(available: Velocity): Velocity { + if (!state.engaged) return Velocity.Zero + state.settle(available.y, flick) + return available + } + } + } + + val w = constraints.maxWidth.toFloat() + val h = constraints.maxHeight.toFloat() + val inset = with(density) { 12.dp.toPx() } + val edge = with(density) { 3.dp.toPx() } + val buttonH = rest?.height ?: with(density) { 56.dp.toPx() } + val openBottom = h - sheetTop(h, buttonH, with(density) { 16.dp.toPx() }, edge) + val lower = rest?.let { (openBottom - edge - buttonH / 2f) - it.top } ?: 0f + state.travelPx = openBottom.coerceAtLeast(1f) + + if (state.shown || state.open) Box( + Modifier.fillMaxSize() + .graphicsLayer { alpha = state.sink.value }.background(Color.Black.copy(alpha = 0.42f)) + .focusProperties { canFocus = false } + .clickable(interactionSource = remember { MutableInteractionSource() }, indication = null, enabled = state.open) { close() }, + ) + + if (state.shown) { + val bottom = lerp(0f, openBottom, state.lift.value) + val sheetLeft = inset + val sheetRight = w - inset + val corner = with(density) { 18.dp.toPx() } + val rim = with(density) { 1.4.dp.toPx() } + val path = remember { Path() } + val rimPath = remember { Path() } + Canvas(Modifier.fillMaxSize()) { + val t = -corner + rimPath.reset() + rimPath.moveTo(sheetLeft, t) + rimPath.lineTo(sheetLeft, bottom - corner) + rimPath.arcTo(Rect(sheetLeft, bottom - 2 * corner, sheetLeft + 2 * corner, bottom), 180f, -90f, false) + rimPath.lineTo(sheetRight - corner, bottom) + rimPath.arcTo(Rect(sheetRight - 2 * corner, bottom - 2 * corner, sheetRight, bottom), 90f, -90f, false) + rimPath.lineTo(sheetRight, t) + path.reset() + path.addPath(rimPath) + path.close() + drawPath(path, lerp(colors.surface, pal.signal, 0.22f * state.hot.value)) + drawPath(rimPath, pal.signal.copy(alpha = lerp(0.55f, 0.9f, state.hot.value)), style = Stroke(rim)) + } + val pill = rest?.translate(0f, lower) + val sheetW = sheetRight - sheetLeft + val chipsH = with(density) { 44.dp.toPx() } + val closeW = with(density) { 64.dp.toPx() } + val chipsBottom = with(density) { + if (narrow && pill != null) pill.top - 10.dp.toPx() else openBottom - 14.dp.toPx() + } + val chipsTop = chipsBottom - chipsH + val chipsLeft = with(density) { + if (narrow || pill == null) 16.dp.toPx() else pill.right - sheetLeft + 20.dp.toPx() + } + val chipsRight = sheetW - closeW + val rowsBottom = chipsTop - with(density) { 8.dp.toPx() } + Box( + Modifier + .offset { IntOffset(sheetLeft.roundToInt(), (bottom - openBottom).roundToInt()) } + .size(with(density) { sheetW.toDp() }, with(density) { openBottom.toDp() }) + .pointerInput(Unit) { detectTapGestures { } } + .controllerBack { close() } + .bumpers( + onPrevious = { if (state.tab > 0) { state.travel = -1; state.tab--; runCatching { chipFocus[state.tab].requestFocus() } } }, + onNext = { if (state.tab < tabs.lastIndex) { state.travel = 1; state.tab++; runCatching { chipFocus[state.tab].requestFocus() } } }, + ) + .focusProperties { + exit = { dir -> + if (!openState.value) FocusRequester.Default + else if (dir == FocusDirection.Left) { leftForButton[0] = true; buttonFocus } + else FocusRequester.Cancel + } + } + .focusGroup(), + ) { + Box( + Modifier + .nestedScroll(rowsPush) + .fillMaxWidth() + .height(with(density) { rowsBottom.coerceAtLeast(0f).toDp() }), + ) { + AnimatedContent( + targetState = state.tab.coerceIn(0, tabs.lastIndex.coerceAtLeast(0)), + transitionSpec = { + val d = state.travel + val shift = with(density) { 24.dp.roundToPx() } + (slideInHorizontally(Motion.tw(240)) { shift * d } + fadeIn(Motion.tw(240))) + .togetherWith(slideOutHorizontally(Motion.tw(240)) { -shift * d } + fadeOut(Motion.tw(240))) + }, + label = "dropTab", + ) { t -> + val leaving = transition.targetState == androidx.compose.animation.EnterExitState.PostExit + val leavingNow = rememberUpdatedState(leaving) + CompositionLocalProvider(LocalSheetBeat provides remember { SheetBeat(state.pieces) }) { + Column( + Modifier.fillMaxSize() + .focusProperties { enter = { if (leavingNow.value) FocusRequester.Cancel else FocusRequester.Default } } + .focusGroup() + .verticalScroll(rememberScrollState()) + .padding(start = 16.dp, end = 16.dp, top = 8.dp, bottom = 8.dp), + ) { tabs.getOrNull(t)?.let { rows(it.first) } } + } + } + } + Box( + Modifier + .offset { IntOffset(chipsLeft.roundToInt(), chipsTop.roundToInt()) } + .zIndex(1f) + .width(with(density) { (chipsRight - chipsLeft).coerceAtLeast(0f).toDp() }) + .graphicsLayer { val v = state.pieces[0].value; alpha = v; translationY = (1f - v) * -6.dp.toPx() } + .onPreviewKeyEvent { e -> + val k = e.nativeKeyEvent + if (k.keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { if (k.action == KeyEvent.ACTION_DOWN) close(); true } else false + }, + ) { + SheetChips(tabs.map { it.second }, state.tab, chipFocus, width = LocalSheetChipWidth.current) { i -> state.travel = if (i > state.tab) 1 else -1; state.tab = i } + } + val closeSource = remember { MutableInteractionSource() } + val closeHot = rememberHot(closeSource) + Box( + contentAlignment = Alignment.Center, + modifier = Modifier + .offset { IntOffset((sheetW - 52.dp.toPx()).roundToInt(), chipsTop.roundToInt()) } + .zIndex(1f).size(44.dp).testTag("drop-close") + .clip(CircleShape).glideBorder(closeHot, CircleShape, pal.signal) + .hoverable(closeSource) + .clickable(interactionSource = closeSource, indication = LocalIndication.current, enabled = state.open, role = Role.Button) { close() } + .controllerConfirm(enabled = state.open) { close() }, + ) { Icon(Icons.Filled.Close, stringResource(R.string.common_close), tint = colors.onSurfaceVariant, modifier = Modifier.size(20.dp)) } + } + } + + val enabled = covered() < 0.5f + val sideInset = if (narrow) 20.dp else 44.dp + val play = LocalPlayRect.current + Box( + Modifier + .offset { IntOffset(play?.left?.roundToInt() ?: sideInset.roundToPx(), sideInset.roundToPx()) } + .then(if (play != null) Modifier.width(with(density) { play.width.toDp() }) else Modifier) + .onGloballyPositioned { rest = it.boundsInParent() } + .graphicsLayer { translationY = lower * state.ride.value; alpha = 1f - covered() } + .zIndex(2f) + .focusRequester(buttonFocus) + .focusProperties { canFocus = enabled } + .onFocusChanged { + if (it.hasFocus && leftForButton[0]) { leftForButton[0] = false; if (openState.value) close() } + } + .onPreviewKeyEvent { e -> + val k = e.nativeKeyEvent + if (k.keyCode != KeyEvent.KEYCODE_DPAD_UP && !(state.open && k.keyCode == KeyEvent.KEYCODE_DPAD_RIGHT)) false + else { + if (k.action == KeyEvent.ACTION_DOWN && k.repeatCount == 0) { + if (state.open) runCatching { chipFocus[state.tab].requestFocus() } else if (enabled) state.open = true + } + true + } + }, + ) { button(enabled) } + + val r0 = rest + if (r0 != null && (state.lipShow.value > 0.01f || state.pull.value > 0.5f)) { + var handleSize by remember { mutableStateOf(androidx.compose.ui.unit.IntSize.Zero) } + val lipH = 32.dp + state.pull.value.dp + val drop = { if (!state.open && enabled) state.open = true } + val settingsLabel = stringResource(R.string.drawer_page_settings) + Box( + contentAlignment = Alignment.BottomCenter, + modifier = Modifier + .offset { IntOffset((r0.center.x - handleSize.width / 2f).roundToInt(), (r0.top + lower * state.ride.value - handleSize.height + (1f - state.lipShow.value) * 8.dp.toPx()).roundToInt()) } + .onSizeChanged { handleSize = it } + .graphicsLayer { alpha = state.lipShow.value * (1f - state.lipGone.value) * (1f - covered()) } + .zIndex(2f) + .heightIn(min = 44.dp).testTag("drop-open") + .semantics { contentDescription = settingsLabel } + .focusProperties { canFocus = false } + .clickable(interactionSource = remember { MutableInteractionSource() }, indication = null, role = Role.Button, onClick = drop), + ) { + Handle(lipH, above = true) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/EmptyLibrary.kt b/app/src/main/java/com/droiddeck/launcher/ui/EmptyLibrary.kt index a605c38e9c..4b8de6520f 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/EmptyLibrary.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/EmptyLibrary.kt @@ -45,41 +45,26 @@ import kotlin.math.max import kotlin.math.min import kotlin.math.sin -/** - * The Steam tab with nothing installed. The blank wall drifts as the full one does, and the - * DroidDeck mark wanders over it, bouncing off the page's edges and off [avoid] (the words and - * buttons) like an idle DVD logo, carrying a clearing in the wall with it. On arrival its outline - * traces in, the D fills, and the ball pops toward the viewer, flips twice and slams back into its - * socket; the ring the slam sends out fills each blank capsule it reaches. Poking the ball plays - * the pop again, without the mark stopping. [fade] is drawn over the wall and under the mark. - */ @Composable -internal fun EmptyLibrary(avoid: Rect?, fade: @Composable () -> Unit) { +internal fun EmptyLibrary(avoid: Rect?, wall: (@Composable () -> Unit)? = null, fade: @Composable () -> Unit) { val clock = rememberMarkClock(avoid) Box(Modifier.fillMaxSize().onSizeChanged { clock.page = Size(it.width.toFloat(), it.height.toFloat()) }) { - EmptyWall(clock) + if (wall != null) wall() else EmptyWall(clock) fade() Mark(clock) } } -// The trace and fill, in ms from arrival. private const val TRACE_MS = 1250f private const val FILL_FROM = 450f -// The ball's timeline: its fade-in, pop, flip and slam, the ripple and the capsules it lights. private const val POP_FROM = 900f private const val IMPACT = 2200f private const val RIPPLE_MS = 1250f private const val HIT_MS = 900f private const val END = 3600f -// Where a poke restarts the ball's timeline: just before the wind-up. private const val POKE = 880f private const val DRIFT_MS = 75_000f -/** - * Time into the mark's arrival, into the ball's timeline (a poke restarts only that), into the - * wall's drift, and where the mark is on the page and where its last slam landed. - */ private class MarkClock { var intro by mutableFloatStateOf(0f) var ball by mutableFloatStateOf(0f) @@ -107,7 +92,6 @@ private fun rememberMarkClock(avoid: Rect?): MarkClock { if (clock.page == Size.Zero) { withFrameMillis { }; continue } val f = MarkFrame(clock.page, Offset.Zero) if (clock.at == Offset.Unspecified) clock.at = Offset(clock.page.width * 0.64f, clock.page.height * 0.42f) - // Animations off in the system settings: the finished mark, still, on a still wall. if (Motion.scale == 0f) { clock.intro = END clock.ball = END @@ -123,7 +107,6 @@ private fun rememberMarkClock(avoid: Rect?): MarkClock { val before = clock.ball clock.ball += dt - // Drift, bouncing off the page edges and off whatever it should keep clear of. var x = clock.at.x + vx * dt / 1000f var y = clock.at.y + vy * dt / 1000f val hw = f.halfWidth @@ -152,10 +135,6 @@ private fun rememberMarkClock(avoid: Rect?): MarkClock { return clock } -/** - * The mark on a page of [size], centred on [centre]: about a third of the page tall. [k] scales - * the timeline's distances, which were drawn on a 460px mark. - */ private class MarkFrame(size: Size, val centre: Offset) { val height = min(size.height * 0.3f, size.width * 0.28f * LogoShape.HEIGHT / LogoShape.WIDTH) val s = height / LogoShape.HEIGHT @@ -180,11 +159,9 @@ private val HitEase = CubicBezierEasing(0.2f, 0.7f, 0.3f, 1f) private fun clamp01(v: Float) = v.coerceIn(0f, 1f) private fun mix(a: Float, b: Float, t: Float) = a + (b - a) * t -/** One stretch of a keyframed value: [from] to [to] while [p] runs from [a] to [b]. */ private fun span(p: Float, a: Float, b: Float, from: Float, to: Float, ease: Easing) = mix(from, to, ease.transform(clamp01((p - a) / (b - a)))) -/** When the ripple's edge reaches [progress] of its way out, as a share of the ripple's time. */ private val rippleTime: FloatArray = FloatArray(257) { RippleEase.transform(it / 256f) } private fun rippleReaches(progress: Float): Float { var lo = 0 @@ -196,14 +173,12 @@ private fun rippleReaches(progress: Float): Float { return lo / 256f } -/** How lit a capsule the ripple reached [since] ms ago is: up fast, then fading back. */ private fun hitAmount(since: Float): Float { if (since < 0f || since > HIT_MS) return 0f val p = since / HIT_MS return if (p < 0.14f) HitEase.transform(p / 0.14f) else 1f - HitEase.transform((p - 0.14f) / 0.86f) } -/** The blank wall: the same tilted, drifting columns as [CapsuleWall], each capsule lit as the ripple passes. */ @Composable private fun EmptyWall(clock: MarkClock) { val pal = LocalPalette.current @@ -239,7 +214,6 @@ private fun EmptyWall(clock: MarkClock) { val dy = if (c % 2 == 0) -shift else shift - run for (i in 0 until perRun * 2) { val y = top + i * (capH + gap) + dy - // The capsule's centre on the page, out of the wall's tilt. val lx = x + capW / 2 - pivot.x val ly = y + capH / 2 - pivot.y val sx = pivot.x + lx * cs + ly * sn @@ -266,7 +240,6 @@ private fun EmptyWall(clock: MarkClock) { } } } - // The clearing the mark carries with it. drawRect( Brush.radialGradient( 0f to bg, 255f / 420f to bg, 330f / 420f to bg.copy(alpha = 0.7f), 1f to Color.Transparent, @@ -276,7 +249,6 @@ private fun EmptyWall(clock: MarkClock) { } } -/** The mark, its ball's pop and flip, and the ring the slam sends out. */ @Composable private fun Mark(clock: MarkClock) { val pal = LocalPalette.current @@ -303,7 +275,6 @@ private fun Mark(clock: MarkClock) { val t = clock.ball val intro = clock.intro - // The ripple, from where the slam landed, under the mark. if (clock.slam != Offset.Unspecified && t in IMPACT..IMPACT + RIPPLE_MS) { val p = (t - IMPACT) / RIPPLE_MS val alpha = if (p < 0.7f) mix(0.9f, 0.35f, p / 0.7f) else mix(0.35f, 0f, (p - 0.7f) / 0.3f) @@ -323,7 +294,6 @@ private fun Mark(clock: MarkClock) { } else 0f translate(0f, shake) { - // The D, as flat raised slabs with a solid edge underneath. val fill = Out.transform(clamp01((intro - FILL_FROM) / 450f)) if (fill > 0f) { val lift = 8f * k * (1f - fill) @@ -338,7 +308,6 @@ private fun Mark(clock: MarkClock) { drawPath(right, ink.copy(alpha = fill)) } - // The trace around both halves on arrival, the GameCube nod. if (intro < TRACE_MS) { val drawn = TraceEase.transform(clamp01(intro / 775f)) val alpha = if (intro < 775f) 1f else 1f - (intro - 775f) / 475f @@ -352,7 +321,6 @@ private fun Mark(clock: MarkClock) { } } - // The ball. val shown = Out.transform(clamp01((intro - 650f) / 300f)) if (shown > 0f) { val p = (t - POP_FROM) / (IMPACT - POP_FROM) @@ -366,7 +334,6 @@ private fun Mark(clock: MarkClock) { val q = clamp01((pop - 1f) / 0.6f) val bob = if (t > END) -4f * k * (0.5f - 0.5f * cos(2f * PI.toFloat() * (t - END) / 5200f)) else 0f - // Its shadow stays on the slabs, spreading and softening as the ball rises. val blur = mix(10f, 28f, q) * k val sr = f.ball * 0.93f * mix(1f, 1.4f, q) val dark = Color.Black.copy(alpha = mix(0.6f, 0.25f, q) * shown) @@ -396,7 +363,6 @@ private fun Mark(clock: MarkClock) { } } - // The flash where it lands. if (t in IMPACT..IMPACT + 420f) { val p = Out.transform((t - IMPACT) / 420f) drawCircle(pal.signal.copy(alpha = 1f - p), (f.ball + 6f * k) * mix(1f, 1.4f, p), f.centre, style = Stroke(max(4f * k, 2.dp.toPx()))) @@ -405,10 +371,6 @@ private fun Mark(clock: MarkClock) { } } -/** - * The ball as a coin of [thick]ness turned [deg] about its vertical axis: flat faces in the logo's - * blue, and between them a solid rim that shows as it turns edge-on. - */ private fun DrawScope.coin(c: Offset, r: Float, thick: Float, deg: Float, face: Color, rim: Color) { val a = Math.toRadians(deg.toDouble()) val cs = cos(a).toFloat() diff --git a/app/src/main/java/com/droiddeck/launcher/ui/ExePickerDialog.kt b/app/src/main/java/com/droiddeck/launcher/ui/ExePickerDialog.kt index cda22fc69d..901bf64850 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/ExePickerDialog.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/ExePickerDialog.kt @@ -62,13 +62,11 @@ import com.droiddeck.launcher.session.GameStorage import com.droiddeck.launcher.stores.formatBytes import java.io.File -/** What a picker lists besides folders. */ internal enum class PickKind(val extensions: Set<String>) { EXE(setOf("exe")), IMAGE(setOf("png", "jpg", "jpeg", "webp", "ico")), } -/** A place a file can be picked from: internal storage or a card, at its root. */ internal class PickVolume(val root: File, val label: String, val removable: Boolean) { val free: Long get() = runCatching { StatFs(root.path).availableBytes }.getOrDefault(0L) } @@ -79,15 +77,10 @@ internal fun pickVolumes(context: Context): List<PickVolume> = File(o.path.substringBefore("/Android/")).takeIf { it.isDirectory }?.let { PickVolume(it, o.name, removable = true) } }.distinctBy { it.root.absolutePath } -/** A folder in a listing; [readable] false = shown greyed, not opened. */ internal class PickFolder(val dir: File, val readable: Boolean) internal class PickListing(val folders: List<PickFolder>, val files: List<File>) -/** - * Every folder of [dir] (dot-folders left out, the unreadable ones marked), then the files [kind] - * takes; each A-Z. - */ internal fun pickListing(dir: File, kind: PickKind): PickListing { val all = dir.listFiles()?.filter { !it.name.startsWith(".") }.orEmpty().sortedBy { it.name.lowercase() } return PickListing( @@ -96,13 +89,6 @@ internal fun pickListing(dir: File, kind: PickKind): PickListing { ) } -/** - * The compact in-app file picker: [title] and a red X on one line; the storage rows (internal - * storage, each card, free space); inside one, its root first, a breadcrumb, "..", every folder - * and the [kind] files, scrolling in the dialog. Its width is what the first step needed and stays; - * long names are cut short. B / Back goes up a folder, and closes from the storage rows. [start] - * opens in a folder. [onAddAll] adds a row on top of a folder with subfolders. - */ @Composable internal fun ExePickerDialog( title: String, kind: PickKind = PickKind.EXE, start: File? = null, @@ -165,7 +151,6 @@ internal fun ExePickerDialog( } } -/** A compact dialog's title line: [leading] (a back arrow), the title, a small red X. */ @Composable internal fun DialogTitleRow(title: String, onClose: () -> Unit, leading: (@Composable () -> Unit)? = null) { Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp), modifier = Modifier.fillMaxWidth()) { @@ -175,7 +160,6 @@ internal fun DialogTitleRow(title: String, onClose: () -> Unit, leading: (@Compo } } -/** A 32 dp icon button for a dialog's title line. */ @Composable internal fun SmallIconButton(icon: ImageVector, description: String, tint: androidx.compose.ui.graphics.Color, onClick: () -> Unit) { val src = remember { MutableInteractionSource() } @@ -193,7 +177,6 @@ internal fun SmallIconButton(icon: ImageVector, description: String, tint: andro } } -/** One row of a compact dialog's list, the Install dialog's style: [content] laid out in a row. */ @Composable internal fun ListRow( enabled: Boolean = true, accent: Boolean = false, tall: Boolean = false, focus: FocusRequester? = null, @@ -217,7 +200,6 @@ internal fun ListRow( ) { content(hot) } } -/** A list row with an icon, a name (cut short when long) and a detail on the right. */ @Composable internal fun PickerRow( icon: ImageVector?, name: String, detail: String?, tall: Boolean = false, file: Boolean = false, accent: Boolean = false, diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FitText.kt b/app/src/main/java/com/droiddeck/launcher/ui/FitText.kt index 77bdbcadac..5935931da3 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FitText.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FitText.kt @@ -16,12 +16,6 @@ import androidx.compose.ui.unit.Constraints import androidx.compose.ui.unit.TextUnit import androidx.compose.ui.unit.sp -/** - * One line of text in a slot of fixed width - a rail label, a key cap - set as large as - * [maxSize] when it fits and smaller, down to [minSize], when it does not. Labels are as long as - * their language makes them ("Components" is "コンポーネント", "Componentes", "구성 요소"), so a - * fixed size cuts some of them off; below [minSize] the end is ellipsized rather than clipped. - */ @Composable fun FitText( text: String, diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FocusGlide.kt b/app/src/main/java/com/droiddeck/launcher/ui/FocusGlide.kt index ac8ba10850..0bc1ccc472 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FocusGlide.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FocusGlide.kt @@ -3,7 +3,6 @@ package com.droiddeck.launcher.ui import android.view.View import androidx.compose.animation.animateColorAsState import androidx.compose.animation.core.Animatable -import androidx.compose.animation.core.AnimationSpec import androidx.compose.animation.core.FastOutSlowInEasing import androidx.compose.foundation.border import androidx.compose.foundation.layout.Box @@ -23,6 +22,7 @@ import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.runtime.withFrameNanos import androidx.compose.ui.Modifier import androidx.compose.ui.draw.drawWithContent +import androidx.compose.ui.focus.focusRequester import androidx.compose.ui.geometry.CornerRadius import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Rect @@ -48,25 +48,19 @@ import kotlin.math.abs import kotlin.math.hypot import kotlinx.coroutines.coroutineScope -// One focus ring for a whole screen that slides from control to control. When focus moves, the -// edge on the side it is heading springs ahead and the trailing edge catches up a beat later, so -// the ring stretches like a drop and snaps into the new control's shape. -/** A control that can show the ring: where it is and what its ring looks like there. */ internal class GlideSource { var coords: LayoutCoordinates? = null var shape: Shape by mutableStateOf<Shape>(androidx.compose.ui.graphics.RectangleShape) var color by mutableStateOf(Color.Transparent) var width by mutableStateOf(2.dp) + val requester = androidx.compose.ui.focus.FocusRequester() } internal class FocusGlide(val view: View) { var host: LayoutCoordinates? = null - /** Controls that are hot, the latest last: focus and a hovering pointer can each hold one. */ val hot = mutableStateListOf<GlideSource>() - /** Bumped when the current control moves (a scroll, a relayout). */ var moves by mutableIntStateOf(0) - /** Off while a page floods in or out (PageFlood); back on, it appears on whatever has focus. */ var hidden by mutableStateOf(false) val current: GlideSource? get() = hot.lastOrNull() @@ -75,7 +69,6 @@ internal class FocusGlide(val view: View) { fun release(s: GlideSource) { hot.remove(s) } fun moved(s: GlideSource) { if (hot.lastOrNull() === s) moves++ } - /** [s]'s bounds in the host, cut to what is on screen; null when it is not laid out or is scrolled away. */ fun boundsOf(s: GlideSource): Rect? { val h = host ?: return null val c = s.coords ?: return null @@ -87,12 +80,10 @@ internal class FocusGlide(val view: View) { internal val LocalFocusGlide = staticCompositionLocalOf<FocusGlide?> { null } -/** Floods on screen (a launch, a stop, the return from one): every ring keeps out of the way of them. */ internal object RingVeil { var count by mutableIntStateOf(0) } -/** Keeps the focus ring off while this is in the composition. */ @Composable internal fun VeilRing() { DisposableEffect(Unit) { @@ -108,11 +99,6 @@ private fun cornerOf(shape: Shape, size: Size, dir: LayoutDirection, density: De is Outline.Generic -> minOf(size.width, size.height) / 2f } -/** - * A control's outline: [restColor] at [restWidth] always, and [hotColor] at [hotWidth] while [hot]. - * Under a [FocusGlideHost] the hot outline is the host's one sliding ring; elsewhere (a dialog, a - * popup, a screen with no host) it is drawn here, as a plain border. - */ @Composable internal fun Modifier.glideBorder( hot: Boolean, @@ -135,47 +121,41 @@ internal fun Modifier.glideBorder( onDispose { glide.release(src) } } val base = if (restColor.alpha > 0f) border(restWidth, restColor, shape) else this - return base.onGloballyPositioned { src.coords = it; glide.moved(src) } + return base.focusRequester(src.requester).onGloballyPositioned { src.coords = it; glide.moved(src) } } -/** Leading edge on a focus move: quick and a little loose. */ -private fun lead(): AnimationSpec<Float> = Motion.sp(0.62f, 700f) -/** Trailing edge: slower, settles without a bounce to speak of. */ -private fun trail(): AnimationSpec<Float> = Motion.sp(0.78f, 360f) -/** Following a control that moves under the ring (a scroll): tight, no wobble. */ -private fun follow(): AnimationSpec<Float> = Motion.sp(1f, 2400f) +private class Edge(val damping: Float, val stiffness: Float) + +private fun lead() = Edge(0.62f, 700f) +private fun trail() = Edge(0.78f, 360f) +private fun follow() = Edge(1f, 2400f) -/** How long after a focus move the ring keeps its stretchy springs and keeps checking where it is. */ private const val SETTLE_MS = 450L -/** How long the control must stand still before the ring stops checking where it is. */ private const val STILL_MS = 120L -/** The longest the ring keeps checking after a move, for a control that never stands still. */ private const val TRACK_MAX_MS = 2_000L -/** Moves closer together than this are a held direction: the ring runs along as one, no stretch. */ +private const val RING_FILL = 0.14f + private const val REPEAT_MS = 180L -/** A move further than this goes as a droplet: pinched to a drop, carried across, opened onto the control. */ private val FAR = 360.dp -/** - * Hosts the sliding focus ring for everything inside it. The ring is drawn over [content], in the - * host's space, so put the host inside anything that moves as a whole (a sheet that slides in). - */ @Composable internal fun FocusGlideHost(modifier: Modifier = Modifier, content: @Composable () -> Unit) { val view = LocalView.current val density = LocalDensity.current val dir = LocalLayoutDirection.current val glide = remember(view) { FocusGlide(view) } - val edges = remember { List(4) { Animatable(0f) } } // left, top, right, bottom + val edges = remember { List(4) { Animatable(0f) } } val corner = remember { Animatable(0f) } - /** How solid the ring is: 1 while it travels as a drop, 0 (an outline) on a control. */ val solid = remember { Animatable(0f) } val alpha = remember { Animatable(0f) } val scope = rememberCoroutineScope() - // An edge each, the corner, and a droplet carrying all of them. - val jobs = remember { arrayOfNulls<Job>(6) } + val jobs = remember { arrayOfNulls<Job>(8) } + val target = remember { FloatArray(4) } + val vel = remember { FloatArray(4) } + val springs = remember { Array(4) { follow() } } + val startAt = remember { LongArray(4) } val cur = glide.current var lastColor by remember { mutableStateOf(Color.Transparent) } if (cur != null) lastColor = cur.color @@ -186,23 +166,51 @@ internal fun FocusGlideHost(modifier: Modifier = Modifier, content: @Composable LaunchedEffect(glide, Motion.scale) { var shown: GlideSource? = null var movedAt = 0L - var dirSpecs: List<AnimationSpec<Float>> = List(4) { follow() } + var dirSpecs: List<Edge> = List(4) { follow() } var delays = LongArray(4) var lastMove = 0L - fun go(i: Int, v: Float, spec: AnimationSpec<Float>, wait: Long) { - // A drop cut short by another move turns back into an outline on the way. - if (jobs[5]?.isActive == true || solid.targetValue > 0f) scope.launch { solid.animateTo(0f, Motion.tw(120)) } - jobs[5]?.cancel() - // Picks up the speed it is going at: restarting from rest on every step of a held - // direction is what made it stutter. - val speed = edges[i].velocity - jobs[i]?.cancel() - jobs[i] = scope.launch { - if (wait > 0) delay(Motion.ms(wait.toInt()).toLong()) - edges[i].animateTo(v, spec, initialVelocity = if (wait > 0) 0f else speed) + fun go(i: Int, v: Float, spec: Edge, wait: Long) { + if (jobs[5]?.isActive == true || solid.targetValue > 0f) { + jobs[5]?.cancel() + jobs[6]?.cancel() + jobs[6] = scope.launch { solid.animateTo(0f, Motion.tw(120)) } + } + val chasing = jobs[7]?.isActive == true + jobs[i]?.let { if (it.isActive) { it.cancel(); vel[i] = edges[i].velocity } } + if (!chasing) for (j in 0..3) if (jobs[j]?.isActive != true) vel[j] = edges[j].velocity + target[i] = v + springs[i] = spec + startAt[i] = System.nanoTime() + Motion.ms(wait.toInt()) * 1_000_000L + if (chasing) return + jobs[7] = scope.launch { + var last = withFrameNanos { it } + while (true) { + val frame = withFrameNanos { it } + val dt = ((frame - last) / 1e9f).coerceAtMost(0.1f) / Motion.scale.coerceAtLeast(0.01f) + last = frame + val now = System.nanoTime() + var settled = true + for (j in 0..3) { + if (now < startAt[j]) { settled = false; continue } + val k = springs[j].stiffness + val c = 2f * springs[j].damping * kotlin.math.sqrt(k) + var x = edges[j].value + var u = vel[j] + var left = dt + while (left > 0f) { + val h = minOf(left, 0.004f) + u += (-k * (x - target[j]) - c * u) * h + x += u * h + left -= h + } + if (abs(x - target[j]) < 0.3f && abs(u) < 3f) { x = target[j]; u = 0f } else settled = false + vel[j] = u + edges[j].snapTo(x) + } + if (settled) break + } } } - /** Pinch into a solid dot where it is, carry it over, and open it into [b] as it arrives. */ fun droplet(s: GlideSource, b: Rect) { jobs.forEach { it?.cancel() } val size = s.coords?.size?.let { Size(it.width.toFloat(), it.height.toFloat()) } ?: b.size @@ -211,19 +219,15 @@ internal fun FocusGlideHost(modifier: Modifier = Modifier, content: @Composable val r = with(density) { 6.dp.toPx() } fun dot(c: Offset) = listOf(c.x - r, c.y - r, c.x + r, c.y + r) val here = Offset((edges[0].value + edges[2].value) / 2f, (edges[1].value + edges[3].value) / 2f) - // Pinch into a solid drop where it is. coroutineScope { launch { solid.animateTo(1f, Motion.tw(80)) } launch { corner.animateTo(r, Motion.tw(90)) } dot(here).forEachIndexed { i, v -> launch { edges[i].animateTo(v, Motion.tw(90)) } } } - // Across as a dot, every edge together, on a timed ease, steering each frame for - // where the control is now: one still rising into place is met where it ends up. val distance = hypot(b.center.x - here.x, b.center.y - here.y) / density.density val travel = (180 + distance * 0.12f).toInt().coerceIn(220, 380) val p = Animatable(0f) val flight = launch { p.animateTo(1f, Motion.tw(travel, easing = FastOutSlowInEasing)) } - // Takes the control's shape as it arrives, not after: no resting as a dot. while (flight.isActive && p.value < 0.78f) { val to = (glide.boundsOf(s) ?: b).center dot(Offset(here.x + (to.x - here.x) * p.value, here.y + (to.y - here.y) * p.value)).forEachIndexed { i, v -> edges[i].snapTo(v) } @@ -267,9 +271,9 @@ internal fun FocusGlideHost(modifier: Modifier = Modifier, content: @Composable return@collectLatest } if (src == null) { - // Focus passing between two controls can let go of one a moment before the next - // takes it: wait a beat, so that reads as a move and not a fade out and back in. delay(60) + jobs.forEach { it?.cancel() } + solid.snapTo(0f) scope.launch { alpha.animateTo(0f, Motion.tw(140)) } shown = null return@collectLatest @@ -291,17 +295,15 @@ internal fun FocusGlideHost(modifier: Modifier = Modifier, content: @Composable shown = src first = false if (!wasShowing) { - // Appearing: a hair bigger, pulled in onto the control as it fades up. val out = with(density) { 3.dp.toPx() } val grown = listOf(b.left - out, b.top - out, b.right + out, b.bottom + out) jobs.forEach { it?.cancel() } scope.launch { solid.snapTo(0f); edges.forEachIndexed { i, e -> e.snapTo(grown[i]) } }.join() - dirSpecs = List(4) { Motion.sp(0.6f, 700f) } + dirSpecs = List(4) { Edge(0.6f, 700f) } delays = LongArray(4) cornerTo(src, b, snap = true) scope.launch { alpha.animateTo(1f, Motion.tw(140)) } } else { - // Moving: the edges on the side it is heading lead. val dx = b.center.x - (edges[0].value + edges[2].value) / 2f val dy = b.center.y - (edges[1].value + edges[3].value) / 2f val horizontal = abs(dx) >= abs(dy) @@ -314,9 +316,8 @@ internal fun FocusGlideHost(modifier: Modifier = Modifier, content: @Composable dropped = !held && hypot(dx, dy) > with(density) { FAR.toPx() } if (dropped) droplet(src, b) else { - // A held direction runs along as one piece; a single press stretches. - dirSpecs = if (held) List(4) { Motion.sp(0.9f, 900f) } - else List(4) { i -> when (i) { leadIdx -> lead(); trailIdx -> trail(); else -> Motion.sp(0.7f, 520f) } } + dirSpecs = if (held) List(4) { Edge(0.9f, 900f) } + else List(4) { i -> when (i) { leadIdx -> lead(); trailIdx -> trail(); else -> Edge(0.7f, 520f) } } delays = LongArray(4) { i -> if (i == trailIdx && !held) 30L else 0L } cornerTo(src, b, snap = false) } @@ -325,15 +326,11 @@ internal fun FocusGlideHost(modifier: Modifier = Modifier, content: @Composable if (!dropped) listOf(b.left, b.top, b.right, b.bottom).forEachIndexed { i, v -> go(i, v, dirSpecs[i], delays[i]) } last = b } else if (b != last && jobs[5]?.isActive != true) { - // It moved under the ring: keep the stretch while the move is fresh, else follow. val fresh = (System.nanoTime() - movedAt) / 1_000_000 < SETTLE_MS listOf(b.left, b.top, b.right, b.bottom).forEachIndexed { i, v -> go(i, v, if (fresh) dirSpecs[i] else follow(), 0L) } if (last == null) scope.launch { alpha.animateTo(1f, Motion.tw(120)) } last = b } - // Layer animations (a tile growing, a row sliding, a page rising in) move it without - // a relayout, so look again each frame until it has stood still a moment: a fixed - // window let the ring park mid-rise and jump over when something next laid out. val now = System.nanoTime() val settled = (now - start) / 1_000_000 > SETTLE_MS && (now - stillSince) / 1_000_000 > STILL_MS if (settled || (now - start) / 1_000_000 > TRACK_MAX_MS) break @@ -359,10 +356,16 @@ internal fun FocusGlideHost(modifier: Modifier = Modifier, content: @Composable color, topLeft = Offset(l, t), size = Size(r - l, b - t), cornerRadius = CornerRadius(corner.value), alpha = a * f, ) - if (f < 0.99f) drawRoundRect( - color, topLeft = Offset(l + w / 2f, t + w / 2f), size = Size(sw, sh), - cornerRadius = CornerRadius(rad), style = Stroke(w), alpha = a, - ) + if (f < 0.99f) { + drawRoundRect( + color, topLeft = Offset(l + w / 2f, t + w / 2f), size = Size(sw, sh), + cornerRadius = CornerRadius(rad), alpha = a * (1f - f) * RING_FILL, + ) + drawRoundRect( + color, topLeft = Offset(l + w / 2f, t + w / 2f), size = Size(sw, sh), + cornerRadius = CornerRadius(rad), style = Stroke(w), alpha = a, + ) + } }, ) { CompositionLocalProvider(LocalFocusGlide provides glide) { content() } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FrameGenMenu.kt b/app/src/main/java/com/droiddeck/launcher/ui/FrameGenMenu.kt index 1ec0fbfad1..816177bc19 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FrameGenMenu.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FrameGenMenu.kt @@ -8,11 +8,6 @@ import com.droiddeck.launcher.R import com.droiddeck.launcher.gpu.FrameGen import com.droiddeck.launcher.gpu.Lossless -/** - * The frame generation picker, anchored to whatever opened it (host key "fg"). One copy for Setup, - * a game's launch settings and the session drawer, so they say the same thing. Importing a - * Lossless.dll is offered once the account is known to own Lossless Scaling. - */ @Composable internal fun FrameGenMenu( host: MenuHost, mode: FrameGen.Mode, lossless: Lossless.State, diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndArt.kt b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndArt.kt index 992e337a6a..85386ca935 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndArt.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndArt.kt @@ -59,13 +59,10 @@ import java.io.File import androidx.compose.ui.layout.boundsInRoot import androidx.compose.ui.layout.onGloballyPositioned -// Cover art: posters, the art grid and its tiles. -/** Where each art tile sits, root px, by its key: a page opened from one floods out of it. */ internal object TileBounds { val at = HashMap<String, androidx.compose.ui.geometry.Rect>() - /** The page about to open came from tile [key] (its art or icon for the flood), if it is on screen. */ fun mark(key: String, art: Any?, corner: Float) { at[key]?.let { PageOrigin.mark(Origin(it, corner, art = art)) } } @@ -97,12 +94,8 @@ internal fun Poster(art: File?, name: String, modifier: Modifier) { @Composable internal fun ArtGrid(tiles: List<Tile>, wide: Boolean = false) { val square = tiles.isNotEmpty() && tiles.all { it.art == null && (it.iconRes != null || it.iconBitmap != null) } - // Big enough to recognise a game by its art and read its name under it; icon tiles are squares. val minSize = if (square) 76.dp else if (wide) 120.dp else 96.dp val gap = 12.dp - // Laid out whole, not lazily: the pad's focus search only finds tiles that exist, and a lazy - // grid composes only the rows on screen, so a press towards the next row bounced back among - // the visible tiles. A few hundred tiles lay out fine; the page's scroll follows the focused one. BoxWithConstraints(modifier = Modifier.fillMaxWidth()) { val avail = maxWidth - 8.dp val cols = ((avail + gap) / (minSize + gap)).toInt().coerceAtLeast(1) @@ -152,10 +145,6 @@ private fun GameTile(t: Tile, wide: Boolean, square: Boolean, src: MutableIntera } } -/** - * Art for a portrait (2:3) tile. Box art fills it; wide art - a PS3 disc's ICON0, a game's header - - * is shown whole over a blurred, darkened copy of itself instead of losing its sides to the crop. - */ @Composable private fun CoverImage(art: File, modifier: Modifier) { var wideArt by remember(art) { mutableStateOf(false) } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndContent.kt b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndContent.kt index 7649678600..db68502260 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndContent.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndContent.kt @@ -99,7 +99,6 @@ import com.droiddeck.launcher.runtime.UserApps import com.droiddeck.launcher.store.UserAppsState import java.io.File -// The front end's right-hand pane and the page it shows: backdrop, desktop card and emulators. @OptIn(androidx.compose.animation.ExperimentalAnimationApi::class) @Composable @@ -119,35 +118,25 @@ internal fun Pane( } Backdrop(backdropArt) val pal = LocalPalette.current - // Pages keep drawing while they leave, so one can fold away instead of blinking out. val pages = remember { HashMap<String, @Composable () -> Unit>() } - // Pages opened from a control (the cog), with where that control sat, in this pane's coordinates. val origins = remember { HashMap<String, Origin>() } val paneAt = remember { arrayOf(Offset.Zero) } val livePage by rememberUpdatedState(s.pageKey) - // Picking another game changes the detail beside the list, not the whole page. val railContent = if (selected.startsWith("app:")) "games" else selected val target = if (page != null && s.pageKey != null) s.pageKey else railContent - // The game the Games page shows. It must outlive the selection: while the page animates out, - // drawing it with what is selected now (another rail item) turned it into a copy of that page. val gameShown = remember { arrayOf("games") } if (selected == "games" || selected.startsWith("app:")) gameShown[0] = selected - // What the pane showed before this change: the content a page opened over belongs to it. val before = remember { arrayOf(target) } if (page != null && s.pageKey != null) { pages[s.pageKey] = page if (s.pageKey !in origins) PageOrigin.take()?.let { o -> - // A hop's page came out of its own rail item, and is that item's content. origins[s.pageKey] = inPane(o.translate(-paneAt[0])).let { if (it.owner == null) it.ownedBy(railContent) else it } } } else if (target != before[0] && target !in origins) { - // A section's own page opened from a control in it (an emulator's card, a ROM's) floods - // out of that control and belongs to what was showing; a hop's comes out of its rail item. PageOrigin.take()?.let { o -> origins[target] = inPane(o.translate(-paneAt[0])).let { if (it.owner == null) it.ownedBy(before[0]) else it } } } before[0] = target val targetNow by rememberUpdatedState(target) - // A page leaving through a hop's link is not coming back to its control. val leave = if (Hops.linking) PageLeave.Link else PageLeave.Ordinary LaunchedEffect(target) { Hops.linking = false } AnimatedContent( @@ -155,16 +144,13 @@ internal fun Pane( modifier = Modifier.onGloballyPositioned { paneAt[0] = it.positionInRoot() }, transitionSpec = { when { - // Into a page from its control: the control floods the pane (PageFlood) as it sinks back. targetState in origins -> (fadeIn(Motion.tw(120))) .togetherWith(fadeOut(Motion.tw(320, 80)) + scaleOut(Motion.tw(480), targetScale = 0.95f)) .apply { targetContentZIndex = 1f } - // Back out of it: the flood draws back into the control as the pane comes forward again. initialState in origins && pageExit(origins[initialState]?.owner, targetState, leave) == PageExit.Drain -> (fadeIn(Motion.tw(300, 100)) + scaleIn(Motion.tw(460, 40), initialScale = 0.95f)) .togetherWith(ExitTransition.None) .apply { targetContentZIndex = -1f } - // Away to something else: the control is not coming back, so the page sinks with the pane. initialState in origins -> (fadeIn(Motion.tw(300, 80)) + slideInVertically(Motion.tw(420, 80)) { it / 24 }) .togetherWith(fadeOut(Motion.tw(170)) + scaleOut(Motion.tw(170), targetScale = 0.95f)) .apply { targetContentZIndex = 1f } @@ -177,8 +163,6 @@ internal fun Pane( ) { key -> val drawn = (if (page != null && key == s.pageKey) page else pages[key]) ?: { Content(s, if (key == "games") gameShown[0] else key, a, Modifier.fillMaxSize(), onSelect, onAndroidAppClick, onOpenDeveloperOptions, onRequestWirelessAdb) } - // A hop leaving this content: it sinks back as the dot leaves it (and comes forward - // again, freshly drawn, when the hop is undone). val hopSink by androidx.compose.animation.core.animateFloatAsState( if (Hops.sinking == key) 1f else 0f, Motion.tw(260), label = "hopSink", ) @@ -190,16 +174,13 @@ internal fun Pane( val from = origins[key] if (from == null) shown() else { - // The control's own picture (a card's art, an emulator's icon) on the tile as it grows. val art = when (val m = from.art) { null -> null is Int -> androidx.compose.ui.res.painterResource(m) else -> coil.compose.rememberAsyncImagePainter(m) } val leaving = transition.targetState == EnterExitState.PostExit - // Settled as the page starts to leave, from what is coming in, not from where it came in. val drains = remember(leaving) { !leaving || pageExit(from.owner, target, leave) == PageExit.Drain } - // Keeps a leaving page on screen while its flood draws back into the control. transition.animateFloat( transitionSpec = { if (targetState == EnterExitState.PostExit && drains) Motion.tw(PAGE_RETURN_MS) else snap() }, label = "pageReturn", @@ -212,11 +193,6 @@ internal fun Pane( } } -/** - * An origin left of the pane (a rail item a hop flew to) starts half inside it, at the item's - * height: the page swells out of the pane's edge beside the item. Wholly outside, its tile was a - * bar that raced across from the far edge. - */ internal fun inPane(o: Origin): Origin = if (o.bounds.right > 0f) o else o.translate(Offset(-o.bounds.right + o.bounds.width / 2f, 0f)) @@ -225,8 +201,6 @@ private fun Backdrop(art: File?) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current Crossfade(targetState = art, animationSpec = Motion.tw(700), label = "backdrop") { a -> - // A game's own art, blurred, where it has some; otherwise the plain ground with one quiet - // glow of the theme's signal colour - a colour per title hash read as noise. if (a != null && Build.VERSION.SDK_INT >= 31) { Box(modifier = Modifier.fillMaxSize().alpha(0.26f).blur(70.dp)) { AsyncImage(model = a, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.fillMaxSize().graphicsLayer { scaleX = 1.5f; scaleY = 1.5f }) @@ -257,7 +231,6 @@ private fun Content( val density = androidx.compose.ui.platform.LocalDensity.current.density val padH = if (narrow) 16.dp else 22.dp val padV = if (narrow) 12.dp else 18.dp - // Setup scrolls inside itself, under its tabs. if (selected == "setup") { Column(modifier = modifier.padding(horizontal = padH, vertical = padV)) { SetupPanel(s, a, onOpenDeveloperOptions, onRequestWirelessAdb) @@ -268,33 +241,26 @@ private fun Content( UpdatesPage(s, a, modifier.padding(horizontal = padH, vertical = padV)) return } - // Steam is a full-bleed wall of the library with Play over it. if (selected == "steam") { SteamHome(s, a, modifier) return } - // The Store scrolls and navigates inside itself (its tabs and an app's page). if (selected == "store") { StorePage(s, a, modifier) return } - // Stores (GOG, Epic, Amazon) takes the whole pane: chips, shelves and a game's page inside it. if (selected == "stores") { StoresPage(s, a, modifier) return } - // The Games tab lays out its own list and detail. if (selected == "games" || selected.startsWith("app:")) { GamesPage(s, a, selected, onSelect, modifier) return } - // Desktop is the Steam tab's shape: a hero with its lifted sheet, and shelves under it. if (selected == "desktop") { DesktopPage(s, a, modifier, onSelect) return } - // Every other page scrolls as one - header, hero and grid - so a short screen reaches the grid - // instead of showing a sliver of it under a fixed hero. A focused tile scrolls itself into view. Column(modifier = modifier.verticalScroll(rememberScrollState()).padding(horizontal = padH, vertical = padV)) { when { selected == "android-apps" && s.isHomeApp -> { @@ -322,7 +288,6 @@ private fun Content( if (e == null) Note(stringResource(R.string.content_not_installed)) else { val pkgId = Library.packageId(e.id) val pkg = pkgId?.let { id -> s.packages?.firstOrNull { it.id == id } } - // Out of its card on Desktop, with the card's icon; B draws it back in. Rise(1) { Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(16.dp), @@ -367,8 +332,6 @@ private fun Content( } else Rise(5, Modifier.fillMaxWidth()) { Column { - // RetroArch's games come from many systems: chips filter them, one - // selection gliding between them. val systems = remember(e.games) { e.games.map { romSystem(it) }.distinct() } var system by rememberSaveable(e.id) { mutableStateOf<String?>(null) } if (systems.size > 1) Box(Modifier.padding(top = 10.dp)) { @@ -467,7 +430,6 @@ internal fun UserApps.Kind.label() = when (this) { UserApps.Kind.FLATPAK -> R.string.user_apps_kind_flatpak } -/** An added app's icon: its own, or the kind's when it has none. */ @Composable private fun UserAppIcon(app: UserApps.App, size: Int) { if (app.icon != null) AppIcon(app.icon, app.name, size) @@ -482,7 +444,6 @@ private fun UserAppIcon(app: UserApps.App, size: Int) { } } -/** The add or remove under way, or why the last one failed. */ @Composable private fun UserAppsProgress() { val colors = MaterialTheme.colorScheme @@ -501,7 +462,6 @@ private fun UserAppsProgress() { } } -/** An added app's page: open it, change its name and icon, update one added from GitHub, or remove it (asked first). */ @Composable private fun UserAppPage(app: UserApps.App, s: FrontEndState, a: FrontEndActions, onSelect: (String) -> Unit) { val colors = MaterialTheme.colorScheme @@ -556,7 +516,6 @@ private fun UserAppPage(app: UserApps.App, s: FrontEndState, a: FrontEndActions, } } -/** Remove, which asks first: are you sure steps out of it in red, Keep first and focused. */ @Composable private fun RemoveAppButton(app: UserApps.App, enabled: Boolean, onRemove: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -581,7 +540,6 @@ private fun RemoveAppButton(app: UserApps.App, enabled: Boolean, onRemove: () -> } } -/** Looks up a newer release of an app added from GitHub, then installs it. */ @Composable private fun UpdateButton(app: UserApps.App, s: FrontEndState) { val ctx = LocalContext.current @@ -604,13 +562,8 @@ private fun UpdateButton(app: UserApps.App, s: FrontEndState) { } } -/** - * One emulator: its icon, system and games. One not yet installed says so in words and keeps full - * contrast - dimming it read as disabled rather than one press from installing. - */ @Composable private fun systemLabel(e: Library.Emulator): String = if (e.systemRes != 0) stringResource(e.systemRes) else e.system.replaceFirstChar { it.uppercase() } -/** The system a ROM belongs to: the folder it sits in under the ROMs folder. */ private fun romSystem(rom: Library.Rom): String = rom.hostPath.parentFile?.name.orEmpty() diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndGames.kt b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndGames.kt index 0acb72b5d1..6793488780 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndGames.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndGames.kt @@ -59,31 +59,46 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import coil.compose.AsyncImage import com.droiddeck.launcher.frontend.Library +import com.droiddeck.launcher.stores.epic.EpicClient import kotlinx.coroutines.launch -// The Games page: the list, the hero for the selected game and its labels. -/** - * The Games tab: installed Steam games down the left, most recently played first, and the one - * picked beside them - its banner, Launch and the launch settings. One game skips the list. - */ @Composable internal fun GamesPage(s: FrontEndState, a: FrontEndActions, selected: String, onSelect: (String) -> Unit, modifier: Modifier) { - val games = remember(s.steamGames) { s.steamGames.sortedByDescending { it.lastPlayed } } + val pageContext = androidx.compose.ui.platform.LocalContext.current + LaunchedEffect(Unit) { EpicClient.refresh(pageContext) } + val launcherName = stringResource(R.string.epic_client_title) + val epic = EpicClient.status + val launcherArt by androidx.compose.runtime.produceState<java.io.File?>(null, epic.version) { + value = kotlinx.coroutines.withContext(kotlinx.coroutines.Dispatchers.IO) { EpicClient.icon(pageContext, epic.version) } + } + val games = remember(s.steamGames, s.shortcutPicker, epic, launcherName, launcherArt) { + val sorted = s.steamGames.sortedByDescending { it.lastPlayed } + if (s.shortcutPicker) sorted else EpicClient.withLauncher(sorted, EpicClient.launcherEntry(pageContext, launcherName, epic, launcherArt)) + } + val gameCount = games.count { it.library != Library.EPIC_LAUNCHER } val narrow = LocalNarrowPane.current val current = games.firstOrNull { "app:${it.appId}" == selected } ?: games.firstOrNull() - GamesDialogs(a) + GamesDialogs(a, s.steamGames) val onAdd: (() -> Unit)? = if (s.shortcutPicker) null else ({ GamesDialogState.adding = true }) - val pageContext = androidx.compose.ui.platform.LocalContext.current + val launch: (Library.SteamGame) -> Unit = { g -> if (g.library == Library.EPIC_LAUNCHER) a.onEpicLauncher() else a.onSteamGame(g) } val onEdit: (Library.SteamGame) -> Unit = { g -> g.gameFiles?.let { GamesDialogState.editing = EditRequest(it.path, openTarget = false, fromSummary = false, preview = EditPreview.of(pageContext, g, it.path)) } } - if (current == null) { + if (current == null || gameCount == 0) { Column(modifier = modifier.padding(horizontal = if (narrow) 16.dp else 22.dp, vertical = if (narrow) 12.dp else 18.dp)) { - Rise(0) { PageHeader(stringResource(R.string.content_games)) { onAdd?.let { AddGameButton(it) } } } + Rise(0) { + PageHeader(stringResource(R.string.content_games)) { + if (s.steamGamesX64) ClientTag() + onAdd?.let { AddGameButton(it) } + } + } Rise(1) { Note(stringResource(if (s.shortcutPicker && s.shortcutLibraryScanning) R.string.game_shortcut_scanning else R.string.games_empty)) } if (!s.shortcutPicker) Rise(2) { - Actions { PrimaryButton(stringResource(R.string.games_play_steam), enabled = !s.busy, main = true, icon = Icons.Filled.PlayArrow, modifier = Modifier.padding(top = 12.dp).testTag("play-steam"), onClick = a.onPlay) } + Actions { + PrimaryButton(stringResource(R.string.games_play_steam), enabled = !s.busy, main = true, icon = Icons.Filled.PlayArrow, modifier = Modifier.padding(top = 12.dp).testTag("play-steam"), onClick = a.onPlay) + games.firstOrNull { it.library == Library.EPIC_LAUNCHER }?.let { SecondaryButton(it.name, enabled = !s.busy, modifier = Modifier.padding(top = 12.dp)) { a.onEpicLauncher() } } + } } GameFileFolderActions(s, a) } @@ -92,12 +107,12 @@ internal fun GamesPage(s: FrontEndState, a: FrontEndActions, selected: String, o val host = rememberMenuHost() if (games.size == 1) { Column(modifier = modifier.verticalScroll(rememberScrollState()).padding(horizontal = if (narrow) 16.dp else 22.dp, vertical = if (narrow) 12.dp else 18.dp)) { - if (onAdd != null) Rise(0) { GamesHeader(1, onAdd, Modifier.padding(bottom = 10.dp)) } + if (onAdd != null) Rise(0) { GamesHeader(gameCount, s.steamGamesX64, onAdd, Modifier.padding(bottom = 10.dp)) } Rise(0) { Row(verticalAlignment = Alignment.Bottom) { GameHero(current, Modifier.weight(1f).heightIn(min = if (narrow) 190.dp else 250.dp)) { GameHeroCopy(current, if (narrow) 28.sp else 38.sp) - GameActions(current, s, a, onEdit) + GameActions(current, s, a, onEdit, launch) } if (!narrow) Poster(current.art, current.name, Modifier.width(168.dp)) } @@ -110,7 +125,7 @@ internal fun GamesPage(s: FrontEndState, a: FrontEndActions, selected: String, o } val pal = LocalPalette.current Row(modifier = modifier) { - GameList(games, current, onSelect = { onSelect("app:${it.appId}") }, onLaunch = { a.onSteamGame(it) }, onAdd = onAdd, + GameList(games, gameCount, s.steamGamesX64, current, onSelect = { onSelect("app:${it.appId}") }, onLaunch = launch, onAdd = onAdd, modifier = Modifier.width(if (narrow) 168.dp else 250.dp).fillMaxHeight()) Box(Modifier.width(1.dp).fillMaxHeight().background(pal.line)) Column( @@ -119,7 +134,7 @@ internal fun GamesPage(s: FrontEndState, a: FrontEndActions, selected: String, o ) { GameHero(current, Modifier.fillMaxWidth().heightIn(min = if (narrow) 170.dp else 200.dp)) { GameHeroCopy(current, if (narrow) 24.sp else 32.sp) - GameActions(current, s, a, onEdit) + GameActions(current, s, a, onEdit, launch) } SectionTitle(stringResource(R.string.games_launch_settings), null) LaunchSettings(s, a, host, current) @@ -147,24 +162,45 @@ private fun GameFileFolderActions(s: FrontEndState, a: FrontEndActions) { @Composable -private fun GameActions(g: Library.SteamGame, s: FrontEndState, a: FrontEndActions, onEdit: (Library.SteamGame) -> Unit) { +private fun GameActions(g: Library.SteamGame, s: FrontEndState, a: FrontEndActions, onEdit: (Library.SteamGame) -> Unit, launch: (Library.SteamGame) -> Unit) { Actions { - PrimaryButton(stringResource(if (s.shortcutPicker) R.string.game_shortcut_choose else R.string.games_launch), enabled = !s.busy, main = true, icon = Icons.Filled.PlayArrow) { a.onSteamGame(g) } + PrimaryButton(stringResource(if (s.shortcutPicker) R.string.game_shortcut_choose else R.string.games_launch), enabled = !s.busy, main = true, icon = Icons.Filled.PlayArrow) { launch(g) } + if (g.library == Library.EPIC_LAUNCHER) { + if (!s.shortcutPicker) UninstallEpicLauncher(s, a) + BusyChip(s) + return@Actions + } g.gameFiles?.takeIf { it.isDirectory }?.let { dir -> SecondaryButton(stringResource(R.string.games_files), compact = true) { a.onBrowseFiles(dir) } } g.protonPrefix?.takeIf { it.isDirectory }?.let { dir -> SecondaryButton(stringResource(R.string.games_prefix), compact = true) { a.onBrowseFiles(dir) } - // Only games added to the library; Steam titles keep their saves with Steam Cloud. if (g.library == Library.ADDED) ManageSaves(g, dir, a) } if (!s.shortcutPicker) GameShortcutMenu(g, a) - // A game added in DroidDeck (Custom): its editor, Steam's Properties for a non-Steam game. if (!s.shortcutPicker && g.library == Library.ADDED && g.source == Library.ADDED && g.gameFiles != null) EditGameButton { onEdit(g) } + else if (!s.shortcutPicker && g.library != Library.ADDED && g.source == Library.SOURCE_STEAM) EditGameButton { GamesDialogState.steamArt = g } + else if (!s.shortcutPicker && g.library == Library.ADDED && g.source != Library.ADDED && g.gameFiles != null) EditGameButton { GamesDialogState.storeArt = g } BusyChip(s) } } +@Composable +private fun UninstallEpicLauncher(s: FrontEndState, a: FrontEndActions) { + var asking by remember { androidx.compose.runtime.mutableStateOf(false) } + SecondaryButton(stringResource(R.string.common_uninstall), enabled = !s.busy, compact = true) { asking = true } + if (asking) { + val body = stringResource(R.string.epic_client_uninstall_body) + ConfirmDialog( + title = stringResource(R.string.stores_uninstall_title, stringResource(R.string.epic_client_title)), + text = if (s.sessionRunning) body + "\n\n" + stringResource(R.string.epic_client_uninstall_stops) else body, + confirm = stringResource(R.string.common_uninstall), + onConfirm = { a.onUninstallEpicLauncher() }, + onDismiss = { asking = false }, + ) + } +} + @Composable private fun GameShortcutMenu(g: Library.SteamGame, a: FrontEndActions) { var open by remember(g.gameId) { androidx.compose.runtime.mutableStateOf(false) } @@ -184,10 +220,6 @@ private fun GameShortcutMenu(g: Library.SteamGame, a: FrontEndActions) { } } -/** - * Manage saves: import a GameHub or Winlator save zip into this game's prefix, export its saves as - * either, or open the save folder found for it. The saves are looked for when the menu opens. - */ @Composable private fun ManageSaves(g: Library.SteamGame, prefix: java.io.File, a: FrontEndActions) { var open by remember(g.gameId) { androidx.compose.runtime.mutableStateOf(false) } @@ -211,7 +243,6 @@ private fun ManageSaves(g: Library.SteamGame, prefix: java.io.File, a: FrontEndA } } Box { - // A GOG or Epic game's saves are its cloud saves: the one place for them, named so. val cloudGame = com.droiddeck.launcher.stores.Store.byId(g.source).let { it == com.droiddeck.launcher.stores.Store.GOG || it == com.droiddeck.launcher.stores.Store.EPIC } val label = stringResource(if (cloudGame) R.string.store_cloud_saves else R.string.games_manage_saves) SecondaryButton(label, compact = true) { open = !open } @@ -235,12 +266,6 @@ private fun ManageSaves(g: Library.SteamGame, prefix: java.io.File, a: FrontEndA } } -/** - * A GOG or Epic game's cloud saves: the Cloud saves switch, Upload and Download - three rows from - * the first frame, so nothing moves under the pad while the cloud is checked. Until the check is - * back the two actions are disabled and read "…"; then only their subtitles change: the last sync, - * "No cloud saves", or a conflict, when Upload and Download become Keep local and Keep cloud. - */ @Composable private fun CloudRows(g: Library.SteamGame, open: Boolean, first: androidx.compose.ui.focus.FocusRequester) { val store = com.droiddeck.launcher.stores.Store.byId(g.source)?.takeIf { it != com.droiddeck.launcher.stores.Store.AMAZON } ?: return @@ -253,7 +278,6 @@ private fun CloudRows(g: Library.SteamGame, open: Boolean, first: androidx.compo runCatching { com.droiddeck.launcher.stores.CloudSaves.status(context, store, id) }.getOrNull() } } - // The game's own switch (sidecar "cloud"), known locally: right from the first frame. val folder = g.gameFiles var enabled by remember(g.gameId, open) { androidx.compose.runtime.mutableStateOf(folder?.let { com.droiddeck.launcher.stores.StoreGameSidecar.read(it)?.cloud } ?: true) } val st = status @@ -285,17 +309,14 @@ private fun CloudRows(g: Library.SteamGame, open: Boolean, first: androidx.compo st.lastSync > 0 -> stringResource(R.string.cloud_last_sync, android.text.format.DateUtils.getRelativeTimeSpanString(st.lastSync).toString()) else -> stringResource(R.string.cloud_never) } - // A conflict turns the two actions into its two answers; the rows stay where they are. MenuItem(stringResource(if (conflict) R.string.cloud_keep_local else R.string.cloud_upload), checked = false, enabled = ready, detail = summary) { sync(up = true, force = conflict) } MenuItem(stringResource(if (conflict) R.string.cloud_keep_cloud else R.string.cloud_download), checked = false, enabled = ready, detail = if (st == null || busy != null) pending else null) { sync(up = false, force = conflict) } } -/** When it was last played (or where it is, if never) over its name, then room for Launch. */ @Composable private fun ColumnScope.GameHeroCopy(g: Library.SteamGame, titleSize: androidx.compose.ui.unit.TextUnit) { Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { SourceChip(g.source) - // A Custom game's chip already says what its eyebrow would; the line then stays empty. val eyebrow = lastPlayedText(g.lastPlayed) ?: libraryLabel(g) if (eyebrow.isNotEmpty()) Text( eyebrow.uppercase(), @@ -312,18 +333,15 @@ private fun ColumnScope.GameHeroCopy(g: Library.SteamGame, titleSize: androidx.c @Composable private fun GameList( - games: List<Library.SteamGame>, current: Library.SteamGame, + games: List<Library.SteamGame>, count: Int, x64: Boolean, current: Library.SteamGame, onSelect: (Library.SteamGame) -> Unit, onLaunch: (Library.SteamGame) -> Unit, onAdd: (() -> Unit)?, modifier: Modifier, ) { val colors = MaterialTheme.colorScheme - // Laid out whole, as the art grid is: the pad's focus search only finds rows that exist. Column( verticalArrangement = Arrangement.spacedBy(2.dp), modifier = modifier.verticalScroll(rememberScrollState()).padding(start = 12.dp, end = 10.dp, top = 16.dp, bottom = 16.dp), ) { - GamesHeader(games.size, onAdd, Modifier.padding(start = 6.dp, bottom = 10.dp)) - // A game that arrives while the list is up (Steam installed it in the session that just - // ended, or it was added) eases in; the ones there when the page opened are simply there. + GamesHeader(count, x64, onAdd, Modifier.padding(start = 6.dp, bottom = 10.dp)) val seen = remember { HashSet<Int>() } var settled by remember { androidx.compose.runtime.mutableStateOf(false) } for (g in games) key(g.appId) { @@ -338,33 +356,38 @@ private fun GameList( } } -/** "Games N", and the + that adds a game from its .exe beside it ([onAdd] null: no +). */ @Composable -private fun GamesHeader(count: Int, onAdd: (() -> Unit)?, modifier: Modifier) { +private fun GamesHeader(count: Int, x64: Boolean, onAdd: (() -> Unit)?, modifier: Modifier) { val colors = MaterialTheme.colorScheme - Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp), modifier = modifier) { - Text(stringResource(R.string.content_games), fontSize = 22.sp, fontWeight = FontWeight.Bold, color = colors.onBackground, maxLines = 1) - Text(count.toString(), fontSize = 13.sp, color = colors.onSurfaceVariant) - if (onAdd != null) AddGameButton(onAdd) + val narrow = LocalNarrowPane.current + Column(modifier) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Text(stringResource(R.string.content_games), fontSize = 22.sp, fontWeight = FontWeight.Bold, color = colors.onBackground, maxLines = 1) + Text(count.toString(), fontSize = 13.sp, color = colors.onSurfaceVariant) + if (x64 && !narrow) ClientTag() + if (onAdd != null) AddGameButton(onAdd) + } + if (x64 && narrow) Box(Modifier.padding(top = 4.dp)) { ClientTag() } } } -/** - * The Games tab's dialogs, one at a time: the + picker, the summary after "Add all games in this - * folder", and a game's editor (from the page's ✎ or a summary row, with back to the summary). - */ +@Composable +private fun ClientTag() { + Box(Modifier.testTag("games-client-x64")) { StateChip(stringResource(R.string.mode_client_arch_x64), ChipTone.PLAIN) } +} + internal object GamesDialogState { var adding by androidx.compose.runtime.mutableStateOf(false) var summary by androidx.compose.runtime.mutableStateOf<Pair<List<com.droiddeck.launcher.frontend.AddedGames.Game>, Int>?>(null) var editing by androidx.compose.runtime.mutableStateOf<EditRequest?>(null) - /** The subfolder "Add all games in this folder" is looking at; null when it is done. */ var checking by androidx.compose.runtime.mutableStateOf<String?>(null) - /** The summary an editor opened from it goes back to. */ + var steamArt by androidx.compose.runtime.mutableStateOf<Library.SteamGame?>(null) + var storeArt by androidx.compose.runtime.mutableStateOf<Library.SteamGame?>(null) var behindEditor: Pair<List<com.droiddeck.launcher.frontend.AddedGames.Game>, Int>? = null } @Composable -private fun GamesDialogs(a: FrontEndActions) { +private fun GamesDialogs(a: FrontEndActions, games: List<Library.SteamGame>) { val ctx = androidx.compose.ui.platform.LocalContext.current val scope = androidx.compose.runtime.rememberCoroutineScope() val st = GamesDialogState @@ -398,6 +421,13 @@ private fun GamesDialogs(a: FrontEndActions) { a.onAddedGameRemoved(folder, appId, name) }, onDismiss = { st.summary = null; st.checking = null }) } + st.steamArt?.let { game -> + SteamGameArtEditor(games.firstOrNull { it.appId == game.appId && it.library != Library.ADDED } ?: game, onClose = { st.steamArt = null }, onChanged = { a.onSteamGameArtChanged(game.appId) }) + } + st.storeArt?.let { game -> + val folder = game.gameFiles?.path + if (folder != null) StoreGameArtEditor(folder, game.name, onClose = { st.storeArt = null }, onChanged = { a.onAddedGamesChanged(listOf(folder)) }) + } st.editing?.let { request -> AddedGameEditor( request, @@ -409,7 +439,6 @@ private fun GamesDialogs(a: FrontEndActions) { } } -/** The ✎ on a Custom game's page: icon only. */ @Composable private fun EditGameButton(onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -419,8 +448,8 @@ private fun EditGameButton(onClick: () -> Unit) { val label = stringResource(R.string.common_edit) Box( contentAlignment = Alignment.Center, - modifier = Modifier.paneItem("game:edit").size(40.dp).clip(Shape12) - .background(if (hot) pal.signal.copy(alpha = 0.18f) else colors.surface.copy(alpha = 0.55f)) + modifier = Modifier.paneItem("game:edit").downToFirstTile().size(44.dp).clip(Shape12) + .background(if (hot) pal.signal.copy(alpha = 0.14f) else Color.White.copy(alpha = 0.03f)) .glideBorder(hot, Shape12, pal.signal, pal.line2) .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = androidx.compose.ui.semantics.Role.Button, onClick = onClick) .controllerConfirm(onClick = onClick) @@ -430,7 +459,6 @@ private fun EditGameButton(onClick: () -> Unit) { } } -/** A round + that opens the .exe picker. */ @Composable private fun AddGameButton(onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -452,7 +480,6 @@ private fun AddGameButton(onClick: () -> Unit) { } } -/** Fades and slides a row in once when [arriving]; nothing for one already there (or with animations off). */ @Composable internal fun Modifier.arriveIn(arriving: Boolean): Modifier { val t = remember { androidx.compose.animation.core.Animatable(if (arriving) 0f else 1f) } @@ -460,7 +487,6 @@ internal fun Modifier.arriveIn(arriving: Boolean): Modifier { return graphicsLayer { alpha = t.value; translationY = (1f - t.value) * 12.dp.toPx() } } -/** One game in the list. Moving onto it with the pad shows it; A launches it, a tap only shows it. */ @Composable private fun GameRow(g: Library.SteamGame, selected: Boolean, onSelect: () -> Unit, onLaunch: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -484,11 +510,11 @@ private fun GameRow(g: Library.SteamGame, selected: Boolean, onSelect: () -> Uni } Column(modifier = Modifier.weight(1f)) { Text(g.name, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) - // Where it came from beside when it was played: a store's games sit among Steam's own. Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) { SourceChip(g.source, small = true) Text( - playedSpan(g.lastPlayed)?.replaceFirstChar { it.uppercase() } ?: stringResource(R.string.games_never_played), + if (g.library == Library.EPIC_LAUNCHER) libraryLabel(g) + else playedSpan(g.lastPlayed)?.replaceFirstChar { it.uppercase() } ?: stringResource(R.string.games_never_played), fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis, ) } @@ -496,7 +522,6 @@ private fun GameRow(g: Library.SteamGame, selected: Boolean, onSelect: () -> Uni } } -/** A page's title, with room at its right for controls or status. */ @Composable internal fun PageHeader(title: String, trailing: @Composable RowScope.() -> Unit = {}) { Row( @@ -511,13 +536,11 @@ internal fun PageHeader(title: String, trailing: @Composable RowScope.() -> Unit } } -/** Why a launch button is greyed out: the runtime is being worked on. Nothing when it is not. */ @Composable internal fun BusyChip(s: FrontEndState) { if (s.busy) ActionChip(if (s.percent >= 0) stringResource(R.string.games_runtime_busy_percent, s.percent) else s.stage, ok = false) } -/** Whether Steam can start, said where Play is rather than only in Setup. */ @Composable internal fun RuntimeChip(s: FrontEndState) = when { s.busy -> Chip(if (s.percent >= 0) stringResource(R.string.setup_runtime_progress, s.stage, s.percent) else s.stage, ok = false) @@ -527,12 +550,10 @@ internal fun RuntimeChip(s: FrontEndState) = when { else -> Chip(stringResource(R.string.games_runtime_ready), ok = true) } -/** "Last played 3 days ago" from Steam's unix seconds; null for a game never played. */ @Composable private fun lastPlayedText(lastPlayed: Long): String? = playedSpan(lastPlayed)?.let { stringResource(R.string.games_last_played, it.replaceFirstChar { c -> c.lowercase() }) } -/** "3 days ago" from Steam's unix seconds; null for a game never played. */ private fun playedSpan(lastPlayed: Long): String? { if (lastPlayed <= 0L) return null return android.text.format.DateUtils.getRelativeTimeSpanString( @@ -540,27 +561,19 @@ private fun playedSpan(lastPlayed: Long): String? { ).toString() } -/** - * Where a never-played game lives, beside its source chip: Steam's library, the Games storage for - * a store install (the chip names the store), "Custom game" for a folder the user added. - */ @Composable private fun libraryLabel(g: Library.SteamGame): String = when { + g.library == Library.EPIC_LAUNCHER -> EpicClient.status.version?.substringBefore('+')?.let { stringResource(R.string.epic_client_version, it) } ?: "" g.library != Library.ADDED -> if (g.library == "internal") stringResource(R.string.games_internal) else g.library g.source != Library.ADDED -> stringResource(R.string.games_store_storage) else -> "" } -/** - * A game's wide banner: Steam's hero art where the client cached one, else its capsule blurred to - * fill the width. The copy sits bottom-left over a scrim of the ground colour so it always reads; - * the art takes the banner's size, so a banner given a minimum height grows to fit its copy. - */ @Composable private fun GameHero(g: Library.SteamGame, modifier: Modifier, content: @Composable ColumnScope.() -> Unit) { val colors = MaterialTheme.colorScheme Box(modifier = modifier.clip(Shape16).background(artBrush(hueOf(g.name)))) { - val image = g.hero ?: g.art + val image = g.hero ?: g.art.takeIf { g.library != Library.EPIC_LAUNCHER } if (image != null) AsyncImage( model = image, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.matchParentSize() diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndRail.kt b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndRail.kt index 16290a1ec7..c5a0c6866e 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndRail.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndRail.kt @@ -82,14 +82,9 @@ import androidx.compose.ui.layout.boundsInRoot import androidx.compose.ui.layout.onGloballyPositioned import com.droiddeck.launcher.core.PhantomProcessLimit -// The front end's side rail: the page list and the resume entry under it. internal val AttentionAmber = Color(0xFFFFB547) -/** - * The launcher's sections, always on screen down the left edge: the app is landscape-only, so the - * width a hamburger menu would save is better spent keeping every section one press away. - */ @Composable internal fun SideRail( s: FrontEndState, selected: String, @@ -97,7 +92,6 @@ internal fun SideRail( ) { val colors = MaterialTheme.colorScheme val compact = LocalConfiguration.current.screenHeightDp < 420 - // Under 600dp wide (4:3 and square screens) the labels would cost a fifth of the width. val iconOnly = isNarrowScreen() val setupNeedsAttention = !s.ready || (s.available != null && s.available != s.installed) || PhantomProcessLimit.blocksSteam(s.phantomProcessStatus) @@ -105,27 +99,22 @@ internal fun SideRail( horizontalAlignment = Alignment.CenterHorizontally, modifier = modifier.width(if (iconOnly) 64.dp else 92.dp).background(colors.surface).padding(vertical = if (compact) 8.dp else 12.dp), ) { - // Every section on screen at once: items shrink (to 44dp, still a touch target) before the rail scrolls. - val count = 7 + (if (s.isHomeApp) 1 else 0) + val count = 6 + (if (s.gameStoresEnabled) 1 else 0) + (if (s.isHomeApp) 1 else 0) BoxWithConstraints(Modifier.weight(1f).fillMaxWidth()) { val fit = (maxHeight / count - 4.dp).coerceIn(44.dp, if (iconOnly) 48.dp else if (compact) 52.dp else 60.dp) - // A hop in flight moves the selection ahead of the page it is bringing. val shown = Hops.railPreview ?: selected val keys = buildList { add("steam"); add("games") - add("stores") + if (s.gameStoresEnabled) add("stores") add("desktop") add("components") if (s.isHomeApp) add("android-apps") add("setup"); add("updates") } - // Where each item sits in the column, for the selection that glides between them. val bounds = remember { androidx.compose.runtime.mutableStateMapOf<String, androidx.compose.ui.geometry.Rect>() } val tint = androidx.compose.runtime.rememberUpdatedState(LocalPalette.current.signal) var railAt by remember { mutableStateOf(androidx.compose.ui.geometry.Offset.Zero) } Box(Modifier.fillMaxSize().verticalScroll(rememberScrollState()).onGloballyPositioned { railAt = it.boundsInRoot().topLeft }) { - // One selection for the whole rail, under the items: it glides from item to item as the - // chips' does, its leading edge first, and a jump of more than one item goes as a drop. if (shown in keys) ChipGlide(keys.indexOf(shown), bounds[shown]?.translate(-railAt), tint, GlideAxis.Vertical, corner = 14.dp, fill = 0.14f, outline = 0f) Column( horizontalAlignment = Alignment.CenterHorizontally, @@ -133,22 +122,16 @@ internal fun SideRail( modifier = Modifier.fillMaxWidth(), ) { val place: (String) -> Modifier = { key -> - // In root px: an item that comes and goes sits in its own wrapper, not the column. Modifier.onGloballyPositioned { bounds[key] = it.boundsInRoot() Hops.railBounds[key] = it.boundsInRoot() } } RailItem(stringResource(R.string.rail_steam), Icons.Outlined.SportsEsports, "steam", shown == "steam", compact, iconOnly, fit, place = place, onFocus = { onFocusSelect("steam") }) { onSelect("steam") } - // Always there, so the items below it never move; an empty library says how to fill it. RailItem(stringResource(R.string.rail_games), Icons.Outlined.VideoLibrary, "games", shown == "games", compact, iconOnly, fit, place = place, onFocus = { onFocusSelect("games") }) { onSelect("games") } - // The game stores, right under Games: what they install lands there. Its badge counts - // the downloads in flight, so a download started here is never out of sight. - // A section switched on in Setup comes in as the rail's own entrance; off, it folds away. - RailItem(stringResource(R.string.rail_stores), Icons.Outlined.LocalMall, "stores", shown == "stores", compact, iconOnly, fit, count = s.storeDownloadsActive, place = place, onFocus = { onFocusSelect("stores") }) { onSelect("stores") } + if (s.gameStoresEnabled) RailItem(stringResource(R.string.rail_stores), Icons.Outlined.LocalMall, "stores", shown == "stores", compact, iconOnly, fit, count = s.storeDownloadsActive, place = place, onFocus = { onFocusSelect("stores") }) { onSelect("stores") } RailItem(stringResource(R.string.rail_desktop), Icons.Outlined.DesktopWindows, "desktop", shown == "desktop", compact, iconOnly, fit, place = place, onFocus = { onFocusSelect("desktop") }) { onSelect("desktop") } RailItem(stringResource(R.string.rail_components), Icons.Outlined.Layers, "components", shown == "components", compact, iconOnly, fit, place = place, onFocus = { onFocusSelect("components") }) { onSelect("components") } - // Home mode's extra section goes last, so it shifts nothing above it. if (s.isHomeApp) RailItem(stringResource(R.string.rail_apps), Icons.Outlined.Apps, "android-apps", shown == "android-apps", compact, iconOnly, fit, place = place, onFocus = { onFocusSelect("android-apps") }) { onSelect("android-apps") } RailItem(stringResource(R.string.rail_setup), Icons.Outlined.Tune, "setup", shown == "setup", compact, iconOnly, fit, badge = setupNeedsAttention, place = place, onFocus = { onFocusSelect("setup") }) { onSelect("setup") } RailItem(stringResource(R.string.rail_updates), Icons.Outlined.SystemUpdate, "updates", shown == "updates", compact, iconOnly, fit, badge = s.updates.hasUpdate, place = place, onFocus = { onFocusSelect("updates") }) { onSelect("updates") } @@ -169,9 +152,7 @@ internal fun SideRail( private fun RailItem( label: String, icon: ImageVector, key: String, current: Boolean, compact: Boolean, iconOnly: Boolean, height: Dp, badge: Boolean = false, - /** A number on the item (downloads in flight); 0 shows nothing. */ count: Int = 0, - /** Reports where the item sits, for the rail's gliding selection and a hop's dot. */ place: (String) -> Modifier = { Modifier }, onFocus: () -> Unit = {}, onClick: () -> Unit, ) { @@ -193,7 +174,6 @@ private fun RailItem( if (current) pal.signal else if (focused || hovered) colors.onBackground else colors.onSurfaceVariant, Motion.tw(220), label = "railFg", ) - // The selected look is the rail's glide under the item, so the item draws only hover here. val fill by animateColorAsState( if (current) Color.Transparent else if (focused || hovered) Color.White.copy(alpha = 0.05f) else Color.Transparent, Motion.tw(220), label = "railFill", @@ -205,7 +185,6 @@ private fun RailItem( .then(if (frontFocus != null) Modifier.focusRequester(frontFocus.railFor(key)) else Modifier) .testTag("rail-$key") .then(place(key)) - // Pops as a hop's dot lands on it. .landingPop(Hops.railLanded[key] ?: 0) .graphicsLayer { scaleX = scale; scaleY = scale } .size(width = if (iconOnly) 52.dp else 80.dp, height = height) @@ -228,14 +207,12 @@ private fun RailItem( if (count > 0) Text( if (count > 9) "9+" else count.toString(), fontSize = 10.sp, fontWeight = FontWeight.Bold, color = pal.onSignal, maxLines = 1, - // Pops with the Downloads chip's count as an install's dot lands there. modifier = Modifier.align(Alignment.TopEnd).padding(top = if (iconOnly) 4.dp else 6.dp, end = if (iconOnly) 5.dp else 12.dp) .landingPop().clip(RoundedCornerShape(8.dp)).background(pal.signal).padding(horizontal = 5.dp, vertical = 1.dp), ) } } -/** The running session, one press from anywhere in the launcher. */ @Composable private fun ResumeRailItem(name: String, compact: Boolean, iconOnly: Boolean, onResume: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -246,7 +223,6 @@ private fun ResumeRailItem(name: String, compact: Boolean, iconOnly: Boolean, on val resumeDescription = stringResource(R.string.rail_resume_named, name) val pulse = rememberInfiniteTransition(label = "pulse") val ringScale by pulse.animateFloat(0.4f, 1.6f, infiniteRepeatable(tween(1600, easing = Motion.Ease), RepeatMode.Restart), label = "ring") - // Animations off: the live dot alone, no pulsing ring. val still = Motion.scale == 0f Column( horizontalAlignment = Alignment.CenterHorizontally, @@ -266,7 +242,6 @@ private fun ResumeRailItem(name: String, compact: Boolean, iconOnly: Boolean, on if (!still) Box(modifier = Modifier.size(14.dp).graphicsLayer { scaleX = ringScale; scaleY = ringScale; alpha = (1.6f - ringScale) / 1.2f }.border(1.5.dp, pal.good, CircleShape)) Box(modifier = Modifier.size(7.dp).clip(CircleShape).background(pal.good)) } - // Icons only: the live dot alone says something is running; its description says what. if (!iconOnly) { Text(stringResource(R.string.resume_session), fontSize = 12.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, softWrap = false) Text(name, fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis) diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndScreen.kt b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndScreen.kt index c148362eb1..543778b344 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndScreen.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndScreen.kt @@ -77,6 +77,7 @@ import com.droiddeck.launcher.frontend.Library import com.droiddeck.launcher.gpu.FrameGen import com.droiddeck.launcher.gpu.Lossless import com.droiddeck.launcher.input.SecondScreenDisplay +import com.droiddeck.launcher.core.DownloadSource import com.droiddeck.launcher.core.PhantomProcessLimit import com.droiddeck.launcher.core.PhantomProcessStatus import com.droiddeck.launcher.session.SessionPrefs @@ -97,9 +98,10 @@ class FrontEndState( val frameGenLabel: String, val romsDir: String?, val logsEnabled: Boolean, - /** Setup's Debugging tools toggle (AgentAccess): off unless the user turns it on. */ + val vacDiagnostics: Boolean = false, val agentCommands: Boolean = false, val steamGames: List<Library.SteamGame>, + val steamGamesX64: Boolean = false, val emulators: List<Library.Emulator>, val running: String?, val frameGen: FrameGen.Mode = FrameGen.Mode.OFF, @@ -109,7 +111,6 @@ class FrontEndState( val gameSyncFolder: String? = null, val pageKey: String? = null, val theme: String = Themes.GRAPHITE, - /** The language picked in Setup, or AppLanguage.SYSTEM to follow the system. */ val language: String = "", val appScale: Int = com.droiddeck.launcher.core.AppUiPrefs.DEFAULT_SCALE, val isHomeApp: Boolean = false, @@ -133,54 +134,50 @@ class FrontEndState( val showPhantomGate: Boolean = false, val orientation: Int = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE, val launcherFullscreen: Boolean = true, + val downloadSource: String = DownloadSource.MODE_AUTO, + val downloadMirror: String = "", + val downloadPrefix: String = "", val animationsEnabled: Boolean = true, - /** Setup › Stores: the download engine's speed tier (stores/download/StoreDownloadTier ids). */ + val gameStoresEnabled: Boolean = true, val gameStoresSpeedTier: String = "fast", - /** Setup › Stores: the tab a signed-in store opens on (SessionPrefs.STORES_OPEN_LIBRARY / STORE). */ val storesOpenTab: String = SessionPrefs.STORES_OPEN_LIBRARY, - /** A page to open once: "stores:downloads", or a selection such as "app:<id>" (a notification's tap). */ val navigate: String? = null, - /** Setup: art for added games is fetched; the user has a SteamGridDB key of their own. */ val addedGamesArt: Boolean = true, val sgdbUserKey: Boolean = false, val storesShowMature: Boolean = false, - /** Downloads queued, running or paused across the three stores; the rail item's badge. */ + val storesSort: String = SessionPrefs.STORES_SORTS.first(), + val storesView: String = SessionPrefs.STORES_VIEWS.first(), val storeDownloadsActive: Int = 0, - /** The Updates page: DroidDeck's own builds and the channel followed. */ val updates: UpdatesState = UpdatesState(), ) class FrontEndActions( val onPlay: () -> Unit, + val onPlaySteamVr: () -> Unit = {}, val onPlayDesktopUi: () -> Unit, + val onSteamUrl: (String) -> Unit = {}, val onSteamGame: (Library.SteamGame) -> Unit, val onGameShortcut: (Library.SteamGame) -> Unit = {}, val onExportGameFile: (Library.SteamGame) -> Unit = {}, val onSyncGameFiles: () -> Unit = {}, - /** The Games tab's +: the .exe picked in its dialog, to add as a game. */ val onAddGameExe: (path: String) -> Unit = {}, - /** These added games (by folder) were added or edited: the Games tab updates just them. */ val onAddedGamesChanged: (folders: List<String>) -> Unit = {}, - /** An added game removed in its editor: off the Games tab at once, out of Steam after. */ + val onSteamGameArtChanged: (appId: Int) -> Unit = {}, val onAddedGameRemoved: (folder: String, appId: Long?, name: String) -> Unit = { _, _, _ -> }, - /** Setup's Artwork switch and the user's SteamGridDB API key ("" removes it). */ val onAddedGamesArt: (Boolean) -> Unit = {}, val onSgdbKey: (String) -> Unit = {}, val onStopGameFileSync: () -> Unit = {}, val onCopyGameLink: (Library.SteamGame) -> Unit = {}, + val onEpicLauncher: () -> Unit = {}, + val onUninstallEpicLauncher: () -> Unit = {}, val onDesktop: () -> Unit, val onEmulator: (Library.Emulator) -> Unit, - /** A Flatpak app by id and name, from the Store. */ val onFlatpakApp: (String, String) -> Unit = { _, _ -> }, - /** An app added on the Desktop page. */ val onUserApp: (com.droiddeck.launcher.runtime.UserApps.App) -> Unit = {}, val onRom: (Library.Rom) -> Unit, val onResume: () -> Unit, - /** Reads Steam's session settings for its lifted sheet (under Play). */ val onSteamSettings: () -> Unit, - /** Reads the desktop's session settings for its lifted sheet (under Open desktop). */ val onDesktopSettings: () -> Unit, - /** A lifted sheet's rows for one tab of [mode]'s settings, as last read. */ val modeSheet: @Composable (mode: String, tab: String, extras: SheetExtras) -> Unit = { _, _, _ -> }, val onRemoveDesktop: () -> Unit = {}, val onInstallPackage: (String) -> Unit, @@ -189,11 +186,8 @@ class FrontEndActions( val onFrameGenPick: (FrameGen.Mode) -> Unit, val onImportLossless: () -> Unit, val onProtons: () -> Unit, - /** The Components page: FEX / DXVK / VKD3D-Proton per Proton. */ val onComponents: (focusContent: Boolean) -> Unit, - /** The Components page on one layer ([GPU_TAB], a component id): a hop's destination. */ val onComponentsTab: (String) -> Unit = {}, - /** A game page's Manage saves: import a save zip into this game, or export its saves in a layout. */ val onSaveImport: (Library.SteamGame) -> Unit = {}, val onSaveExport: (Library.SteamGame, com.droiddeck.launcher.session.GameSaves.Layout) -> Unit = { _, _ -> }, val onPerformance: () -> Unit, @@ -201,9 +195,11 @@ class FrontEndActions( val onFiles: () -> Unit, val onBrowseFiles: (File) -> Unit = {}, val onLogs: () -> Unit, + val onVacDiagnostics: () -> Unit = {}, val onAgentCommands: () -> Unit = {}, val onShareLogs: () -> Unit = {}, val onClearLogs: () -> Unit = {}, + val onResetSettings: () -> Unit = {}, val onOffline: () -> Unit, val onPageBack: () -> Unit = {}, val onTheme: (String) -> Unit = {}, @@ -212,11 +208,16 @@ class FrontEndActions( val onOrientation: (Int) -> Unit = {}, val onLauncherFullscreen: (Boolean) -> Unit = {}, val onAnimationsEnabled: (Boolean) -> Unit = {}, + val onDownloadSource: (String) -> Unit = {}, + val onDownloadMirror: (String) -> Unit = {}, + val onDownloadPrefix: (String) -> Unit = {}, + val onGameStoresEnabled: (Boolean) -> Unit = {}, val onGameStoresSpeedTier: (String) -> Unit = {}, val onStoresOpenTab: (String) -> Unit = {}, val onNavigated: () -> Unit = {}, val onStoresShowMature: (Boolean) -> Unit = {}, - /** The Games list rebuilt now: a store install or removal changed what is on disk. */ + val onStoresSort: (String) -> Unit = {}, + val onStoresView: (String) -> Unit = {}, val onLibraryChanged: () -> Unit = {}, val onHomeApp: () -> Unit = {}, val onHomeScreen: (Boolean) -> Unit = {}, @@ -239,15 +240,12 @@ class FrontEndActions( internal object Motion { var scale by mutableStateOf(1f) private set - /** App animations can be disabled independently; Android's "Remove animations" always wins. */ fun refresh(context: android.content.Context) { scale = if (SessionPrefs.animationsEnabled(context)) Settings.Global.getFloat(context.contentResolver, Settings.Global.ANIMATOR_DURATION_SCALE, 1f) else 0f } val Ease = CubicBezierEasing(0.2f, 0.8f, 0.2f, 1f) - /** A wall-clock wait (a coroutine delay) scaled as the animations around it are. Compose already - * scales its own animation clock by the same setting, so animation specs take unscaled times. */ fun ms(base: Int) = (base * scale).roundToInt() fun <T> tw(base: Int, delay: Int = 0, easing: Easing = Ease): FiniteAnimationSpec<T> = if (scale == 0f) snap() else tween(base, delay, easing) fun <T> sp(damping: Float = 0.7f, stiffness: Float = Spring.StiffnessMediumLow): FiniteAnimationSpec<T> = @@ -302,26 +300,15 @@ internal fun Modifier.shine(trigger: Boolean, strength: Float = 0.22f): Modifier } } -/** - * Controller focus on the front end: each rail item's requester and the page's main button (Play, - * Open desktop, Open <emulator>, Launch...). The pane leaves, to the left, for the selected rail - * item - whatever tile or button it leaves from - and remembers that control, so coming back in - * lands on it again; a page not yet visited enters on its main button. - */ internal class FrontFocus { val rail = HashMap<String, FocusRequester>() val primary = FocusRequester() var primaryAttached by mutableStateOf(0) var focusedRail by mutableStateOf<String?>(null) fun railFor(key: String): FocusRequester = rail.getOrPut(key) { FocusRequester() } - // The pane's controls by id (a tile's key, a button's label), how many of each are on screen, - // and the last one focused. val items = HashMap<String, FocusRequester>() val attached = HashMap<String, Int>() - // State, so the controller hints follow it: A launches from a game row but selects elsewhere. var last by mutableStateOf<String?>(null) - // The first tile of the page's grid: Down from the page's buttons goes to it, not to whichever - // tile happens to sit under the button. val firstTile = FocusRequester() var firstTileAttached = 0 fun paneEntry(): FocusRequester { @@ -336,14 +323,13 @@ internal class FrontFocus { companion object { const val PRIMARY = "\u0000primary" } } -/** Down from this button goes to the first tile of the page's grid, when there is one. */ @Composable internal fun Modifier.downToFirstTile(): Modifier { + if (LocalSheetBeat.current != null) return this val ff = LocalFrontFocus.current ?: return this return this.focusProperties { down = if (ff.firstTileAttached > 0) ff.firstTile else FocusRequester.Default } } -/** Marks the first tile of the page's grid. */ @Composable internal fun Modifier.firstTile(): Modifier { val ff = LocalFrontFocus.current ?: return this @@ -354,7 +340,6 @@ internal fun Modifier.firstTile(): Modifier { return this.focusRequester(ff.firstTile) } -/** Lets the pane come back to this control: it is remembered when focused. */ @Composable internal fun Modifier.paneItem(id: String): Modifier { val ff = LocalFrontFocus.current ?: return this @@ -368,14 +353,8 @@ internal fun Modifier.paneItem(id: String): Modifier { internal val LocalFrontFocus = staticCompositionLocalOf<FrontFocus?> { null } -/** The pane's exit animation (170ms) and a frame's margin: a new page is in after this. */ private const val PAGE_EXIT_MS = 200 -/** - * Asks [target] for focus once a frame until [done] (or a focus request lands), for at most half a - * second: a control can take focus only once it is laid out, and that is a frame or two, not a - * fixed number of milliseconds. - */ internal suspend fun focusWithinFrames(done: () -> Boolean, target: () -> FocusRequester) { repeat(30) { androidx.compose.runtime.withFrameNanos { } @@ -384,11 +363,6 @@ internal suspend fun focusWithinFrames(done: () -> Boolean, target: () -> FocusR } } -/** - * Asks [target] for focus on the next frames until a request lands (a control can take focus only - * once it is laid out), for at most half a second; then leaves focus alone, so a press right after - * is never pulled back. - */ internal suspend fun focusSoon(target: () -> FocusRequester) { repeat(30) { androidx.compose.runtime.withFrameNanos { } @@ -409,7 +383,11 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com LaunchedEffect(s.shortcutPicker) { if (s.shortcutPicker) selected = "games" } LaunchedEffect(s.navigate) { val target = s.navigate ?: return@LaunchedEffect - if (target == "stores:downloads") { com.droiddeck.launcher.stores.StoresState.openDownloads = true; selected = "stores" } else selected = target + when (target) { + "stores:downloads" -> { com.droiddeck.launcher.stores.StoresState.openDownloads = true; selected = "stores" } + "components" -> a.onComponents(true) + else -> selected = target + } a.onNavigated() } var showWirelessAdbFix by rememberSaveable { mutableStateOf(false) } @@ -437,20 +415,15 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com } } } - // A page reached by a hop goes back the way it came; any other page just closes. val pageBack = { if (!Hops.back(a.onPageBack)) a.onPageBack() } BackHandler(enabled = !processSettingsPageVisible && s.pageKey != null && page != null) { pageBack() } - // Left any other way, the hop's page has no way back to keep. LaunchedEffect(s.pageKey, selected) { Hops.forget(s.pageKey ?: selected) } - // A section reached by a hop (Desktop's Flathub card to the Store) goes back the way it came. BackHandler(enabled = !processSettingsPageVisible && s.pageKey == null && Hops.origin?.page == selected) { val rail = Hops.origin?.rail ?: return@BackHandler Hops.back { selected = rail } } val density = androidx.compose.ui.platform.LocalDensity.current.density remember(density) { Hops.density = density; true } - // Back (and B) from a ROM, an emulator, an added app or Flathub steps out one level instead - // of leaving the app: a ROM -> its emulator, the others -> Desktop. BackHandler( enabled = !processSettingsPageVisible && (s.pageKey == null || page == null) && (selected.startsWith("emu:") || selected.startsWith("rom:") || selected.startsWith("user:") || selected == "store"), @@ -458,38 +431,33 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com selected = if (selected.startsWith("rom:")) "emu:" + selected.removePrefix("rom:").substringBefore(':') else "desktop" } LaunchedEffect(s.isHomeApp) { if (!s.isHomeApp && selected == "android-apps") selected = "steam" } - // The last game uninstalled leaves the Games tab on its empty state. LaunchedEffect(s.steamGames.isEmpty()) { if (s.steamGames.isEmpty() && selected.startsWith("app:")) selected = "games" } remember { Motion.refresh(ctx); true } val railSelection = when { - // A hop's page belongs to the rail item it flew to. Hops.origin != null && s.pageKey == Hops.origin?.page -> Hops.origin!!.dest - // Performance opens from Play's sheet, and is Steam's. s.pageKey == "performance" -> "steam" s.pageKey == "controller-mapping" -> "setup" selected.startsWith("app:") -> "games" - // Flathub is a page of Desktop's, as an emulator's is. selected.startsWith("emu:") || selected.startsWith("rom:") || selected.startsWith("user:") || selected == "store" -> "desktop" else -> s.pageKey ?: selected } - // Bumped each time a rail item is picked, so a controller moves on into the new page. var railPicks by remember { mutableStateOf(0) } val showRailPage: (String, Boolean) -> Unit = { key, focusContent -> - // Components is a full page like Protons or Performance, opened over the current rail - // selection rather than replacing it. if (key == "components") a.onComponents(focusContent) else { if (s.pageKey != null) a.onPageBack() - // Another section: no way back to keep, and no sheet to put back. Hops.origin = null Hops.restore = null Hops.sinking = null selected = key } } + LaunchedEffect(com.droiddeck.launcher.storage.StorageState.openRequests) { + if (com.droiddeck.launcher.storage.StorageState.openPending) showRailPage("setup", true) + } val onRailFocus: (String) -> Unit = { key -> if (key != railSelection) showRailPage(key, false) } @@ -499,25 +467,19 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com } val inputModeManager = LocalInputModeManager.current val window = LocalWindowInfo.current + val androidContext = androidx.compose.ui.platform.LocalContext.current var anyFocused by remember { mutableStateOf(false) } Box( modifier = Modifier.fillMaxSize().background(colors.background) .windowInsetsPadding(if (s.launcherFullscreen) WindowInsets.displayCutout else WindowInsets.systemBars) .onFocusChanged { anyFocused = it.hasFocus }, ) { - // Start controllers on the current page's main action, else on the rail. LaunchedEffect(processSettingsPageVisible) { if (processSettingsPageVisible) return@LaunchedEffect snapshotFlow { window.isWindowFocused }.first { it } if (inputModeManager.inputMode != InputMode.Keyboard) inputModeManager.requestInputMode(InputMode.Keyboard) focusWithinFrames({ anyFocused }) { if (frontFocus.primaryAttached > 0) frontFocus.primary else frontFocus.railFor(railSelection) } } - // A tile or button that opens a page goes away with the page it was on, and focus with it; - // the pad then had nothing to move from (a press landed back on the rail's first item). So - // once the new page is in, a controller lands on its main button. - // Backing out of a page: it stays on screen while it leaves (and holds focus there), so hand - // focus back now to the control it was opened from. Not when the page closed because - // another rail item was picked: focus is on the rail then, and stays there. var openPage by remember { mutableStateOf<String?>(null) } LaunchedEffect(s.pageKey) { val closed = openPage != null && s.pageKey == null @@ -528,17 +490,22 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com } LaunchedEffect(selected, s.pageKey, processSettingsPageVisible) { if (processSettingsPageVisible) return@LaunchedEffect - // Past the old page's exit (170ms), then the first frame the new page takes focus. kotlinx.coroutines.delay(Motion.ms(PAGE_EXIT_MS).toLong()) - if (anyFocused || inputModeManager.inputMode != InputMode.Keyboard) return@LaunchedEffect + if (inputModeManager.inputMode != InputMode.Keyboard) return@LaunchedEffect + if (s.pageKey == "performance") { + val back = "back:${androidContext.getString(R.string.mode_back)}" + focusWithinFrames({ frontFocus.last == back && anyFocused && frontFocus.focusedRail == null }) { + frontFocus.items[back] ?: FocusRequester.Default + } + return@LaunchedEffect + } + if (anyFocused) return@LaunchedEffect focusWithinFrames({ anyFocused }) { if (frontFocus.primaryAttached > 0) frontFocus.primary else frontFocus.railFor(railSelection) } } - // A rail item picked with a controller moves on into its page, once the page is in. LaunchedEffect(railPicks) { if (railPicks == 0 || processSettingsPageVisible) return@LaunchedEffect kotlinx.coroutines.delay(Motion.ms(PAGE_EXIT_MS).toLong()) if (inputModeManager.inputMode != InputMode.Keyboard) return@LaunchedEffect - // Waits for the new page's main button rather than a fixed guess at how long it takes. withTimeoutOrNull(1_000) { snapshotFlow { frontFocus.primaryAttached > 0 }.first { it } } ?: return@LaunchedEffect focusWithinFrames({ frontFocus.focusedRail == null && anyFocused }) { frontFocus.paneEntry() } } @@ -548,9 +515,6 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com val railFocus = Modifier .focusProperties { enter = { frontFocus.railFor(railSelection) } } .focusGroup() - // Back from a hop onto a surface that is not a sheet (a game's Components card, Desktop's - // Flathub card): focus - // goes back to the control that asked, once the page has gone. LaunchedEffect(Hops.restore) { val r = Hops.restore ?: return@LaunchedEffect if (r.surface == HOP_SURFACE_SHEET) return@LaunchedEffect @@ -580,9 +544,7 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com } } - // Dots on their way somewhere: a hop to another section and back, a swap flying home. FlightsLayer(screenAt) - // A confirm stepping out of the control that asked for it. StepsLayer(screenAt) appToChooseDisplay?.let { app -> @@ -647,11 +609,9 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com } } val hasBackTarget = (s.pageKey != null && page != null) || - // A section reached by a hop goes back to where it came from, not to the rail. (s.pageKey == null && Hops.origin?.page == selected) || ((s.pageKey == null || page == null) && (selected.startsWith("emu:") || selected.startsWith("rom:") || selected.startsWith("user:") || selected == "store")) - // At the top of a section, Back goes to the rail - the launcher itself is never backed out of. BackHandler(enabled = !processSettingsPageVisible && !hasBackTarget) { if (inputModeManager.inputMode != InputMode.Keyboard) inputModeManager.requestInputMode(InputMode.Keyboard) runCatching { frontFocus.railFor(railSelection).requestFocus() } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndSetup.kt b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndSetup.kt index dfab93aa91..359450daee 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndSetup.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndSetup.kt @@ -75,17 +75,19 @@ import androidx.compose.ui.layout.boundsInRoot import androidx.compose.ui.layout.onGloballyPositioned import com.droiddeck.launcher.core.AppLanguage import com.droiddeck.launcher.core.DeviceSupport +import com.droiddeck.launcher.core.DownloadSource import com.droiddeck.launcher.core.PhantomProcessLimit import com.droiddeck.launcher.core.PhantomProcessStatus import com.droiddeck.launcher.session.SessionPrefs import com.droiddeck.launcher.stores.download.StoreDownloadTier import com.droiddeck.launcher.R -// The Setup page: runtime and device checks, tools, frame generation and launch settings. private enum class CheckState { OK, WARN, BUSY } -/** One requirement in Setup's system check: a status mark, what it is, and at most one action. */ +private const val STORAGE_TAB = 3 +private const val GLASSES_TAB = 5 + @Composable private fun CheckRow(state: CheckState, title: String, detail: String?, divider: Boolean = true, action: (@Composable () -> Unit)? = null) { val colors = MaterialTheme.colorScheme @@ -159,7 +161,6 @@ internal fun SetupPanel( } val colors = MaterialTheme.colorScheme val pal = LocalPalette.current - // Tested hardware passes; an Adreno below it (a 610, say) warns rather than claiming support. val gpu = remember { com.droiddeck.launcher.gpu.GpuInfo.detect() } val gpuOk = gpu.support == com.droiddeck.launcher.gpu.GpuInfo.Support.TESTED val gpuName = remember { DeviceSupport.gpuName(ctx) } @@ -167,16 +168,26 @@ internal fun SetupPanel( val signedIn = s.offlineAccount != null var showLimitDetails by rememberSaveable { mutableStateOf(false) } var editSgdbKey by remember { mutableStateOf(false) } + var editDownloadPrefix by remember { mutableStateOf(false) } if (editSgdbKey) SgdbKeyDialog(s.sgdbUserKey, onSave = { a.onSgdbKey(it); editSgdbKey = false }, onDismiss = { editSgdbKey = false }) - // Four tabs by scope, a chip row with one gliding selection; LB and RB turn them from - // anywhere on the page. Build and credits are on the Updates page. - val tabs = listOf(stringResource(R.string.setup_tab_overview), stringResource(R.string.setup_tab_controller), stringResource(R.string.setup_tab_launcher), stringResource(R.string.setup_tab_diagnostics)) + + if (editDownloadPrefix) TextEntryDialog( + stringResource(R.string.setup_download_prefix), s.downloadPrefix, + onDismiss = { editDownloadPrefix = false }, + onSave = { a.onDownloadPrefix(it); editDownloadPrefix = false }, + ) + val tabs = listOf(stringResource(R.string.setup_tab_overview), stringResource(R.string.setup_tab_controller), stringResource(R.string.setup_tab_launcher), stringResource(R.string.setup_tab_storage), stringResource(R.string.setup_tab_diagnostics), stringResource(R.string.setup_tab_glasses)) var tab by rememberSaveable { mutableStateOf(0) } - val chipFocus = remember { List(4) { FocusRequester() } } + val chipFocus = remember { List(tabs.size) { FocusRequester() } } var tabTurned by remember { mutableStateOf(false) } val pick: (Int) -> Unit = { i -> tab = i; tabTurned = true } val inputModeManager = LocalInputModeManager.current - // The control a controller was on went with the old tab: it lands on the new tab's chip. + LaunchedEffect(com.droiddeck.launcher.storage.StorageState.openRequests) { + if (com.droiddeck.launcher.storage.StorageState.openPending) { + com.droiddeck.launcher.storage.StorageState.openPending = false + tab = STORAGE_TAB + } + } LaunchedEffect(tab) { if (tabTurned && inputModeManager.inputMode == InputMode.Keyboard) { androidx.compose.runtime.withFrameNanos { } @@ -196,7 +207,7 @@ internal fun SetupPanel( ), ) { PageHeader(stringResource(R.string.setup_title)) { - Box(Modifier.weight(1f)) { SheetChips(tabs, tab, chipFocus, pick) } + Box(Modifier.weight(1f)) { SheetChips(tabs, tab, chipFocus, onPick = pick) } } Column(modifier = Modifier.weight(1f).fillMaxWidth().verticalScroll(rememberScrollState()).padding(bottom = 24.dp)) { when (tab) { @@ -260,8 +271,6 @@ internal fun SetupPanel( } } AnimatedVisibility(showLimitDetails, enter = expandVertically(Motion.sp(1f)) + fadeIn(Motion.sp(1f)), exit = shrinkVertically(Motion.sp(1f)) + fadeOut(Motion.sp(1f))) { - // One sentence and at most three buttons. The computer route and its - // raw command live on the full page Wireless debugging opens. Column(modifier = Modifier.fillMaxWidth().padding(start = 56.dp, end = 14.dp, top = 4.dp, bottom = 10.dp)) { Text( if (limitBlocks) PhantomProcessLimit.gateInstructions(ctx, s.phantomProcessStatus) @@ -298,7 +307,6 @@ internal fun SetupPanel( ) } val all = listOf(gpuCheck, runtimeCheck, limitCheck, accountCheck) - // Everything passes: one line says so, and Details opens the checks in place. ReadinessCard( passing, checks.size, listOfNotNull( @@ -312,7 +320,6 @@ internal fun SetupPanel( val shownChecks = all.filterIndexed { i, _ -> checks[i] } shownChecks.forEachIndexed { i, check -> check(i < shownChecks.lastIndex) } } - // Each check that warns is its own card, its Fix it as it always was. if (passing < checks.size) { SectionTitle(stringResource(R.string.setup_needs_you), null) Column(verticalArrangement = Arrangement.spacedBy(10.dp)) { @@ -321,14 +328,6 @@ internal fun SetupPanel( } } } - SettingsGroup(stringResource(R.string.setup_account)) { - accountCheck(true) - ToggleRow( - host, "offline", stringResource(R.string.setup_offline), - s.offlineAccount?.let { if (it.isEmpty()) stringResource(R.string.setup_signed_in_unnamed) else stringResource(R.string.setup_signed_in, it) } ?: stringResource(R.string.setup_sign_in_first), - s.offline, enabled = s.offlineAccount != null, - ) { a.onOffline() } - } SettingsGroup(stringResource(R.string.setup_runtime)) { runtimeCheck(false) } } 1 -> { @@ -366,6 +365,7 @@ internal fun SetupPanel( ToggleRow(host, "launcher-animations", stringResource(R.string.setup_animations), null, s.animationsEnabled, onChange = a.onAnimationsEnabled) LanguageRow(host, s.language, a.onLanguage) + ToggleRow(host, "show-stores", stringResource(R.string.setup_stores), null, s.gameStoresEnabled, onChange = a.onGameStoresEnabled) } } val device: @Composable () -> Unit = { @@ -399,31 +399,60 @@ internal fun SetupPanel( ) } } - // Two columns on a wide page: how it looks; this device and the library's art. + val download: @Composable () -> Unit = { + SettingsGroup(stringResource(R.string.setup_group_download)) { + ChoiceRow( + host, "download-source", stringResource(R.string.setup_download_source), null, + listOf( + DownloadSource.MODE_AUTO to stringResource(R.string.setup_download_source_auto), + DownloadSource.MODE_DIRECT to stringResource(R.string.setup_download_source_direct), + DownloadSource.MODE_MIRROR to stringResource(R.string.setup_download_source_mirror), + DownloadSource.MODE_CUSTOM to stringResource(R.string.setup_download_source_custom), + ), + s.downloadSource, onPick = a.onDownloadSource, + ) + if (s.downloadSource == DownloadSource.MODE_MIRROR) { + ChoiceRow( + host, "download-mirror", stringResource(R.string.setup_download_mirror), null, + DownloadSource.MIRRORS.map { it.host to it.host }, + s.downloadMirror, onPick = a.onDownloadMirror, + ) + } + if (s.downloadSource == DownloadSource.MODE_CUSTOM) { + ActionRow( + stringResource(R.string.setup_download_prefix), + s.downloadPrefix.takeIf { it.isNotEmpty() }, + stringResource(R.string.mode_sgdb_edit), + onClick = { editDownloadPrefix = true }, + ) + } + } + } if (wide) Row(horizontalArrangement = Arrangement.spacedBy(16.dp), verticalAlignment = Alignment.Top) { Column(Modifier.weight(1f)) { look() } - Column(Modifier.weight(1f)) { device(); art() } - } else { look(); device(); art() } + Column(Modifier.weight(1f)) { device(); art(); download() } + } else { look(); device(); art(); download() } } - 3 -> { + STORAGE_TAB -> StoragePanel(s, a) + 4 -> { SettingsGroup(stringResource(R.string.setup_tab_diagnostics)) { ToggleRow(host, "logs", stringResource(R.string.setup_logs), stringResource(R.string.setup_logs_hint), s.logsEnabled) { a.onLogs() } + ToggleRow(host, "vacdiag", stringResource(R.string.setup_vac_diag), stringResource(R.string.setup_vac_diag_hint), s.vacDiagnostics) { a.onVacDiagnostics() } ToggleRow(host, "agent-commands", stringResource(R.string.setup_agent_commands), null, s.agentCommands) { a.onAgentCommands() } ActionRow(stringResource(R.string.setup_latest_logs), stringResource(R.string.drawer_logs_hint), stringResource(R.string.drawer_share_logs), a.onShareLogs, progress = com.droiddeck.launcher.session.SessionLogShare.progress) ActionRow(stringResource(R.string.setup_saved_logs), stringResource(R.string.setup_saved_logs_hint, com.droiddeck.launcher.session.SessionPaths.KEEP_SESSIONS), stringResource(R.string.setup_clear_logs), a.onClearLogs) + ActionRow(stringResource(R.string.setup_reset_settings), stringResource(R.string.setup_reset_settings_hint), + stringResource(R.string.setup_reset_settings_button), a.onResetSettings) } } + GLASSES_TAB -> GlassesSetupPanel() } } } } } -/** - * The checks as one card while they all pass: a ring with how many pass, "Ready to play" and one - * line of what that means, and a Details chip that opens the checks themselves in place ([checks]). - */ @Composable private fun ReadinessCard(passing: Int, total: Int, line: String, open: Boolean, onDetails: () -> Unit, checks: @Composable () -> Unit) { val colors = MaterialTheme.colorScheme @@ -465,29 +494,22 @@ private fun FrameGenMenu(s: FrontEndState, a: FrontEndActions, host: MenuHost) { FrameGenMenu(host, s.frameGen, s.lossless, a.onFrameGenPick, a.onImportLossless) } -/** - * What shapes a launch, beside the game rather than three screens away in Setup. They are the - * app-wide settings - each card opens the same page or menu Setup does. - */ @Composable internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost, game: com.droiddeck.launcher.frontend.Library.SteamGame? = null) { - // Three across, two on a narrow page; each row's cards share one height. val columns = if (LocalNarrowPane.current) 2 else 3 val controller = a.controller val context = androidx.compose.ui.platform.LocalContext.current val inputMode = androidx.compose.ui.platform.LocalInputModeManager.current - // The game's prefix is compatdata/<id>, as droiddeck-game-env reads it: a Steam title's appid, an - // added game's shortcut appid (unsigned). Recommended scans the game's own folder either way. - val wincompKey = game?.let { - if (it.library == com.droiddeck.launcher.frontend.Library.ADDED) Integer.toUnsignedString(it.appId) - else it.appId.takeIf { id -> id > 0 }?.toString() - } + val wincompKey = game?.takeIf { it.library == com.droiddeck.launcher.frontend.Library.ADDED || it.appId > 0 }?.profileKey var wincompOpen by remember(wincompKey) { mutableStateOf<Boolean?>(null) } val wincompPicks = remember(wincompKey, wincompOpen) { wincompKey?.let { com.droiddeck.launcher.session.WinComponents.picks(context, it) }.orEmpty() } - val cards = buildList<@Composable (Modifier) -> Unit> { + val steamScope = game?.let { com.droiddeck.launcher.session.NoSteamLaunch.scope(it) } + val steamCard: (@Composable (Modifier) -> Unit)? = if (game != null && steamScope != null) { m -> + Box(m) { GameSettingsCard(host, game, steamScope) } + } else null + val cards = if (game?.library == com.droiddeck.launcher.frontend.Library.EPIC_LAUNCHER) listOfNotNull(steamCard) else buildList<@Composable (Modifier) -> Unit> { add { m -> val back = stringResource(R.string.hop_from_games) - // Components is its own section: the card hops there, and B on it comes back here. SettingCard(stringResource(R.string.setup_card_components), stringResource(R.string.setup_card_components_hint), "card:components", m.hopSource("card:components")) { val at = Hops.sources["card:components"] if (at == null) a.onComponents(true) @@ -503,10 +525,8 @@ internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost } } if (controller != null) add { m -> SettingCard(stringResource(R.string.setup_card_controls), stringResource(R.string.setup_card_controls_hint), "card:controls", m, controller.onMapping) } - // An Epic game's own launch choices, kept in its sidecar so a launch from the Steam client - // honours them too (droiddeck-store-launch reads the same file). - // Epic's launch choices; cloud saves live in the game's Cloud saves view, so a GOG game has no card. - val cardStore = com.droiddeck.launcher.stores.Store.byId(game?.source.orEmpty())?.takeIf { it == com.droiddeck.launcher.stores.Store.EPIC } + if (steamCard != null) add(steamCard) + val cardStore = com.droiddeck.launcher.stores.Store.byId(game?.source.orEmpty())?.takeIf { it == com.droiddeck.launcher.stores.Store.EPIC || it == com.droiddeck.launcher.stores.Store.GOG } if (cardStore != null && game?.gameFiles != null) add { m -> Box(m) { StoreLaunchCard(host, game.gameFiles!!, cardStore) @@ -536,10 +556,124 @@ internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost } } -/** Epic's account page behind its sign-in: signing in there presents any step the account still owes. */ +@Composable +private fun GameSettingsCard(host: MenuHost, game: com.droiddeck.launcher.frontend.Library.SteamGame, scope: String) { + val appContext = androidx.compose.ui.platform.LocalContext.current.applicationContext + val colors = MaterialTheme.colorScheme + var config by remember(scope) { mutableStateOf(runCatching { com.droiddeck.launcher.session.GameEnvironmentStore.read(appContext) }.getOrNull()) } + var saving by remember(scope) { mutableStateOf(false) } + val current = config + val noSteam = current != null && com.droiddeck.launcher.core.GameEnvironment.gameNoSteam(current, scope) + val fex = current?.let { runCatching { com.droiddeck.launcher.core.GameEnvironment.gameFexPreset(it, scope) }.getOrNull() } + val sync = current?.let { runCatching { com.droiddeck.launcher.core.GameEnvironment.gameSync(it, scope) }.getOrNull() } + val ready = current != null && !saving + val launcher = game.library == com.droiddeck.launcher.frontend.Library.EPIC_LAUNCHER + fun save(change: (android.content.Context) -> com.droiddeck.launcher.core.GameEnvironment.Config?) { + if (saving) return + saving = true + Thread({ + val written = runCatching { change(appContext) } + .onFailure { android.util.Log.w("GameSettingsCard", "could not save the settings of $scope: ${it.message}") }.getOrNull() + val next = written ?: runCatching { com.droiddeck.launcher.session.GameEnvironmentStore.read(appContext) }.getOrNull() + com.droiddeck.launcher.stores.StoresState.post { + config = next + saving = false + } + }, "game-settings").start() + } + val key = "game-settings" + val fexKey = "game-settings-fex" + val syncKey = "game-settings-sync" + val syncLabels = mapOf( + com.droiddeck.launcher.session.SessionPrefs.SYNC_NTSYNC to stringResource(R.string.sync_backend_ntsync), + com.droiddeck.launcher.session.SessionPrefs.SYNC_FSYNC to stringResource(R.string.sync_backend_fsync), + com.droiddeck.launcher.session.SessionPrefs.SYNC_ESYNC to stringResource(R.string.sync_backend_esync), + com.droiddeck.launcher.session.SessionPrefs.SYNC_WINESERVER to stringResource(R.string.sync_backend_wineserver), + ) + val appSync = syncLabels[com.droiddeck.launcher.session.SessionPrefs.syncBackend(appContext)] + val useDefault = stringResource(R.string.comp_game_use_general) + val custom = stringResource(R.string.comp_game_fex_custom) + val customSync = stringResource(R.string.game_sync_custom) + val resetDone = stringResource(R.string.comp_game_reset_done, game.name) + SettingCard(stringResource(R.string.game_settings_card), stringResource(if (noSteam) R.string.game_steam_without else R.string.game_steam_with), "card:$key", Modifier.fillMaxSize()) { + host.open = if (host.open == key) null else key + } + AnchoredMenu(host.open == key, onDismiss = { if (host.open == key) host.open = null }, title = stringResource(R.string.game_settings_menu_title, game.name)) { first -> + MenuItem(stringResource(R.string.game_no_steam_title), checked = noSteam, enabled = ready, + detail = stringResource(R.string.game_no_steam_detail), focusRequester = first) { + val on = !noSteam + save { com.droiddeck.launcher.session.GameEnvironmentStore.setGameNoSteam(it, scope, on) } + } + if (!launcher) { + val chosen = com.droiddeck.launcher.core.FexPreset.all.firstOrNull { it.id == fex } + MenuItem( + stringResource(R.string.fex_preset_title), checked = false, enabled = ready, + detail = when { + fex == null -> useDefault + chosen == null -> custom + else -> stringResource(chosen.label) + }, + trailing = { Text("›", fontSize = 16.sp, color = colors.onSurfaceVariant) }, + ) { host.open = fexKey } + MenuItem( + stringResource(R.string.sync_backend_title), checked = false, enabled = ready, + detail = when (sync) { + null -> useDefault + com.droiddeck.launcher.core.GameEnvironment.CUSTOM_SYNC -> customSync + else -> syncLabels[sync] + }, + trailing = { Text("›", fontSize = 16.sp, color = colors.onSurfaceVariant) }, + ) { host.open = syncKey } + } + MenuItem(stringResource(R.string.game_settings_default), checked = false, enabled = ready, + detail = stringResource(R.string.game_settings_default_detail)) { + save { + val failure = runCatching { com.droiddeck.launcher.session.GameProfileManager.reset(it, scope) }.exceptionOrNull() + com.droiddeck.launcher.stores.StoresState.post { + android.widget.Toast.makeText( + it, + if (failure == null) resetDone else it.getString(R.string.comp_game_reset_failed, failure.message.orEmpty()), + android.widget.Toast.LENGTH_SHORT, + ).show() + } + null + } + } + } + AnchoredMenu(host.open == fexKey, onDismiss = { if (host.open == fexKey) host.open = null }, title = stringResource(R.string.fex_preset_title)) { first -> + MenuItem(useDefault, checked = fex == null, enabled = ready, focusRequester = first) { + host.open = key + save { com.droiddeck.launcher.session.GameEnvironmentStore.setGameFexPreset(it, scope, null) } + } + if (fex == com.droiddeck.launcher.core.GameEnvironment.CUSTOM_FEX_PRESET) { + MenuItem(custom, checked = true, enabled = false) {} + } + com.droiddeck.launcher.core.FexPreset.all.forEach { option -> + MenuItem(stringResource(option.label), checked = fex == option.id, enabled = ready, detail = stringResource(option.detail)) { + host.open = key + save { com.droiddeck.launcher.session.GameEnvironmentStore.setGameFexPreset(it, scope, option.id) } + } + } + } + AnchoredMenu(host.open == syncKey, onDismiss = { if (host.open == syncKey) host.open = null }, title = stringResource(R.string.sync_backend_title)) { first -> + MenuItem(useDefault, checked = sync == null, enabled = ready, detail = appSync, focusRequester = first) { + host.open = key + save { com.droiddeck.launcher.session.GameEnvironmentStore.setGameSync(it, scope, null) } + } + if (sync == com.droiddeck.launcher.core.GameEnvironment.CUSTOM_SYNC) { + MenuItem(customSync, checked = true, enabled = false) {} + } + com.droiddeck.launcher.core.GameEnvironment.syncBackends.forEach { option -> + MenuItem(syncLabels.getValue(option), checked = sync == option, enabled = ready) { + host.open = key + save { com.droiddeck.launcher.session.GameEnvironmentStore.setGameSync(it, scope, option) } + } + } + } +} + private const val EPIC_RESOLVE_URL = "https://www.epicgames.com/id/login?redirectUrl=https%3A%2F%2Fwww.epicgames.com%2Faccount%2Fpersonal" -/** The Epic card: the sign-in and offline switches, read from and written to the game's sidecar, and Resolve Epic sign-in. */ @Composable private fun StoreLaunchCard(host: MenuHost, folder: java.io.File, store: com.droiddeck.launcher.stores.Store) { val appContext = androidx.compose.ui.platform.LocalContext.current.applicationContext @@ -547,12 +681,17 @@ private fun StoreLaunchCard(host: MenuHost, folder: java.io.File, store: com.dro val options = sidecar?.epic ?: com.droiddeck.launcher.stores.EpicOptions() val epic = store == com.droiddeck.launcher.stores.Store.EPIC val key = "store-" + store.id - val value = buildList { + val value = if (!epic) stringResource(when { + !com.droiddeck.launcher.stores.gog.GogComet.enabled(appContext) || sidecar?.achievements == false -> R.string.gog_achievements_off + com.droiddeck.launcher.stores.gog.GogComet.status == "sign-in-needed" -> R.string.gog_achievements_signin + com.droiddeck.launcher.stores.gog.GogComet.status in listOf("service-unavailable", "credentials-unavailable", "not-installed") -> R.string.gog_achievements_unavailable + com.droiddeck.launcher.stores.gog.GogComet.status == "uploaded" -> R.string.gog_achievements_uploaded + com.droiddeck.launcher.stores.gog.GogComet.status == "pending-upload" || com.droiddeck.launcher.stores.gog.GogComet.status == "unlocked-locally" -> R.string.gog_achievements_pending + else -> R.string.gog_achievements_on + }) else buildList { if (epic && options.offline) add(stringResource(R.string.epic_card_offline)) else if (epic && options.eos) add(stringResource(R.string.epic_card_eos)) }.ifEmpty { listOf(stringResource(R.string.epic_card_none)) }.joinToString(" · ") - // Each switch goes straight to the sidecar on disk - both launch paths read it there - and the - // card shows what was read back, so a write that did not take is never shown as done. fun set(change: (com.droiddeck.launcher.stores.EpicOptions) -> com.droiddeck.launcher.stores.EpicOptions) { Thread({ val written = runCatching { com.droiddeck.launcher.stores.StoreGameSidecar.updateEpic(folder, change) } @@ -566,13 +705,21 @@ private fun StoreLaunchCard(host: MenuHost, folder: java.io.File, store: com.dro host.open = if (host.open == key) null else key } AnchoredMenu(host.open == key, onDismiss = { if (host.open == key) host.open = null }, title = store.shortLabel) { first -> + if (!epic) { + MenuItem(stringResource(R.string.gog_achievements), checked = sidecar?.achievements != false, focusRequester = first, + detail = if (!com.droiddeck.launcher.stores.gog.GogComet.enabled(appContext)) stringResource(R.string.gog_achievements_enable_store) else null) { + val on = sidecar?.achievements == false + Thread({ + val written = runCatching { com.droiddeck.launcher.stores.StoreGameSidecar.updateAchievements(folder, on) }.getOrNull() + com.droiddeck.launcher.stores.StoresState.post { sidecar = written ?: sidecar } + }, "gog-game-achievements").start() + } + } if (epic) { MenuItem(stringResource(R.string.epic_eos), checked = options.eos, focusRequester = first) { set { it.copy(eos = !it.eos) } } MenuItem(stringResource(R.string.epic_offline), checked = options.offline) { set { it.copy(offline = !it.offline) } } } if (epic) { - // Epic asks some accounts to accept something once (privacy policy, EULA) before a game may - // sign in - EOS's "corrective action". Signing in on Epic's site shows it. MenuItem(stringResource(R.string.epic_resolve), checked = false) { host.open = null runCatching { @@ -607,10 +754,6 @@ private fun SettingCard(label: String, value: String, id: String, modifier: Modi } } -/** - * The app's language: "System default" (what Android uses, named in brackets) or one of the - * languages the app ships, each in its own script. Steam is set to the same language when it starts. - */ @Composable private fun LanguageRow(host: MenuHost, chosen: String, onPick: (String) -> Unit) { val context = androidx.compose.ui.platform.LocalContext.current diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndWidgets.kt b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndWidgets.kt index 20c6871ee1..c6296300e0 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndWidgets.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndWidgets.kt @@ -22,6 +22,7 @@ import androidx.compose.foundation.interaction.collectIsHoveredAsState import androidx.compose.foundation.interaction.collectIsPressedAsState import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.FlowRow import androidx.compose.foundation.layout.Row @@ -38,6 +39,7 @@ import androidx.compose.material.icons.filled.ChevronLeft import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.Icon +import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -57,12 +59,13 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.semantics.Role import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.rememberTextMeasurer import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -// Small building blocks shared by the front end's pages: text styles, chips and buttons. internal val Shape14 = RoundedCornerShape(14.dp) @@ -93,7 +96,6 @@ internal fun SectionTitle(t: String, detail: String?) { @Composable internal fun Note(t: String) = Text(t, fontSize = 13.sp, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.fillMaxWidth().clip(Shape12).background(MaterialTheme.colorScheme.surface).border(1.dp, LocalPalette.current.line2, Shape12).padding(12.dp)) -/** A page's buttons: they wrap onto a second line rather than run off a narrow page. */ @OptIn(ExperimentalLayoutApi::class) @Composable internal fun Actions(content: @Composable () -> Unit) = FlowRow( @@ -101,13 +103,11 @@ internal fun Actions(content: @Composable () -> Unit) = FlowRow( verticalArrangement = Arrangement.spacedBy(10.dp), ) { content() } -/** A status chip in a row of buttons, centred on their height. */ @Composable internal fun ActionChip(t: String, ok: Boolean) = Box(contentAlignment = Alignment.Center, modifier = Modifier.heightIn(min = 44.dp)) { Chip(t, ok) } internal val Shape16 = RoundedCornerShape(16.dp) -/** One level up, as Back and B do: a real button, big enough to hit ([compact]: for the tightest layouts). */ @Composable internal fun BackLink(label: String, compact: Boolean = false, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -150,14 +150,13 @@ internal fun PrimaryButton( main: Boolean = false, compact: Boolean = false, modifier: Modifier = Modifier, - /** The Steam tab's own Play: bigger than any other button on a page. */ large: Boolean = false, icon: ImageVector? = null, + fill: Boolean = false, onClick: () -> Unit, ) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current - // The page's main button is where the pane is entered from the rail. val frontFocus = if (main) LocalFrontFocus.current else null if (frontFocus != null) DisposableEffect(Unit) { frontFocus.primaryAttached++ @@ -169,49 +168,56 @@ internal fun PrimaryButton( val pressed by src.collectIsPressedAsState() val scale by animateFloatAsState(if (pressed) 0.955f else if (hot) 1.02f else 1f, Motion.sp(0.5f, Spring.StiffnessMedium), label = "btnScale") val lift by animateFloatAsState(if (hot) 14f else 6f, Motion.tw(300), label = "btnLift") - // Where it sits, so a session it starts can grow out of it (LaunchFlood). val placed = remember { arrayOfNulls<androidx.compose.ui.layout.LayoutCoordinates>(1) } Row( - verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = if (fill) Arrangement.spacedBy(8.dp, Alignment.CenterHorizontally) else Arrangement.spacedBy(8.dp), modifier = modifier.then(track) .onGloballyPositioned { placed[0] = it } - // 48dp to touch on a handheld; compact rows keep 44. .heightIn(min = if (compact) 44.dp else 48.dp) .then(if (frontFocus != null) Modifier.focusRequester(frontFocus.primary).onFocusChanged { if (it.isFocused) frontFocus.last = FrontFocus.PRIMARY } else Modifier) .graphicsLayer { alpha = if (LaunchOrigin.flooding === placed) 0f else 1f; scaleX = scale; scaleY = scale; shadowElevation = if (enabled) lift.dp.toPx() else 0f; shape = Shape12; clip = false; ambientShadowColor = pal.signal; spotShadowColor = pal.signal } .clip(Shape12) .background(if (enabled) Brush.linearGradient(listOf(colors.primary, pal.primary2)) else Brush.linearGradient(listOf(colors.surfaceVariant, colors.surfaceVariant))) .shine(hot, 0.45f) - // Off, its fill can match the surface it sits on: the outline keeps it a button. .then(if (enabled) Modifier else Modifier.border(1.dp, pal.line2, Shape12)) - // The grow and shine alone barely show on the light fill: outline it when a - // controller is on it, as the other controls are. .glideBorder(hot, Shape12, pal.signal) .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, enabled = enabled) { placed[0]?.takeIf { it.isAttached }?.let { LaunchOrigin.mark(it.boundsInRoot(), placed) } onClick() } .padding( - start = if (large) 20.dp else if (compact) 10.dp else if (icon != null) 14.dp else 18.dp, - end = if (large) 26.dp else if (compact) 10.dp else 18.dp, + start = if (fill) 12.dp else if (large) 20.dp else if (compact) 10.dp else if (icon != null) 14.dp else 18.dp, + end = if (fill) 12.dp else if (large) 26.dp else if (compact) 10.dp else 18.dp, top = if (large) 16.dp else if (compact) 7.dp else 11.dp, bottom = if (large) 16.dp else if (compact) 7.dp else 11.dp, ), ) { val fg = if (enabled) colors.onPrimary else colors.onSurfaceVariant if (icon != null) Icon(icon, contentDescription = null, tint = fg, modifier = Modifier.size(if (large) 20.dp else 17.dp)) - Text( - text, fontSize = if (large) 17.sp else if (compact) 12.sp else 15.sp, - fontWeight = if (large) FontWeight.Bold else FontWeight.SemiBold, letterSpacing = 0.5.sp, color = fg, maxLines = 1, - ) + val style = LocalTextStyle.current.merge(TextStyle( + fontSize = if (large) 17.sp else if (compact) 12.sp else 15.sp, + fontWeight = if (large) FontWeight.Bold else FontWeight.SemiBold, letterSpacing = 0.5.sp, color = fg, + )) + if (fill) FittedLabel(text, style, Modifier.weight(1f, fill = false)) + else Text(text, style = style, maxLines = 1) + } +} + +@Composable +private fun FittedLabel(text: String, style: TextStyle, modifier: Modifier = Modifier) { + BoxWithConstraints(modifier) { + val measurer = rememberTextMeasurer() + val max = constraints.maxWidth + val size = remember(text, style, max) { + var size = style.fontSize + while (size.value > 10f && measurer.measure(text, style.copy(fontSize = size), maxLines = 1, softWrap = false).size.width > max) size = (size.value - 0.5f).sp + size + } + Text(text, style = style.copy(fontSize = size), maxLines = 1, softWrap = false) } } -/** - * [label] while idle; while [progress] is set, a spinner and how far along it is in its place. - * The label stays laid out underneath, invisible, so the button keeps its width. The spinner - * turns until there is a first figure to show. - */ @Composable internal fun ProgressLabel(label: @Composable (Modifier) -> Unit, progress: Float?, fontSize: androidx.compose.ui.unit.TextUnit = 15.sp) { val pal = LocalPalette.current @@ -253,7 +259,6 @@ internal fun Cog(size: androidx.compose.ui.unit.Dp = 48.dp, onClick: () -> Unit) val colors = MaterialTheme.colorScheme val src = remember { MutableInteractionSource() } val hot = rememberHot(src) - // A press spins it on a half turn as the page it opens blooms out of it (PageOrigin). var spins by remember { mutableIntStateOf(0) } val rot by animateFloatAsState((if (hot) 90f else 0f) + spins * 180f, Motion.sp(0.55f), label = "cog") val pal = LocalPalette.current diff --git a/app/src/main/java/com/droiddeck/launcher/ui/GameEnvironmentEditor.kt b/app/src/main/java/com/droiddeck/launcher/ui/GameEnvironmentEditor.kt index 3ca96d6c0b..7557eb2495 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/GameEnvironmentEditor.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/GameEnvironmentEditor.kt @@ -48,14 +48,14 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -// Environment variables for Proton games: one shared profile and one per game, in the app's own -// dialog, with each variable's actions in a menu off its value as everywhere else. @Composable -fun GameEnvironmentRow(modifier: Modifier = Modifier, showHint: Boolean = true) { +fun GameEnvironmentRow( + modifier: Modifier = Modifier, + showHint: Boolean = true, + initialScope: String = "", +) { var open by remember { mutableStateOf(false) } - // Opened with a pad, the editor starts with focus in it; the dialog is a window of its own and - // would otherwise give the pad nothing to move from. var byPad by remember { mutableStateOf(false) } val inputMode = LocalInputModeManager.current SettingsRow(stringResource(R.string.game_env_title), if (showHint) stringResource(R.string.game_env_hint) else null) { @@ -64,10 +64,9 @@ fun GameEnvironmentRow(modifier: Modifier = Modifier, showHint: Boolean = true) open = true } } - if (open) GameEnvironmentEditor(byPad) { open = false } + if (open) GameEnvironmentEditor(byPad, initialScope) { open = false } } -/** With a pad driving, focus [target] once the dialog is laid out, and keep the dialog in pad mode. */ @OptIn(androidx.compose.ui.ExperimentalComposeUiApi::class) @Composable internal fun PadFocus(byPad: Boolean, target: FocusRequester) { @@ -81,19 +80,19 @@ internal fun PadFocus(byPad: Boolean, target: FocusRequester) { } @Composable -private fun GameEnvironmentEditor(byPad: Boolean, onClose: () -> Unit) { +internal fun GameEnvironmentEditor(byPad: Boolean, initialScope: String = "", onClose: () -> Unit) { val context = LocalContext.current val coroutine = rememberCoroutineScope() val shown = rememberShown(onClose) val close = { shown.targetState = false } var config by remember { mutableStateOf<GameEnvironment.Config?>(null) } var games by remember { mutableStateOf(emptyList<Pair<String, String>>()) } - var scope by remember { mutableStateOf("") } + var scope by remember { mutableStateOf(initialScope) } var otherId by remember { mutableStateOf<String?>(null) } var menu by remember { mutableStateOf<String?>(null) } var busy by remember { mutableStateOf(false) } var error by remember { mutableStateOf(false) } - var editing by remember { mutableStateOf<Pair<String, String>?>(null) } + var editing by remember { mutableStateOf<EnvironmentVariableEdit?>(null) } val preset = SessionPrefs.fexPreset(context) val forceSsbs = SessionPrefs.forceSsbs(context) val firstFocus = remember { FocusRequester() } @@ -124,7 +123,6 @@ private fun GameEnvironmentEditor(byPad: Boolean, onClose: () -> Unit) { PadFocus(byPad, firstFocus) DialogHeader(stringResource(R.string.game_env_eyebrow), stringResource(R.string.game_env_title)) Small(stringResource(R.string.game_env_applies)) - // Which profile: everything shared, or one game's. Panel { Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), @@ -168,8 +166,7 @@ private fun GameEnvironmentEditor(byPad: Boolean, onClose: () -> Unit) { VariableRow( name, value, inherited = !own.containsKey(name), open = menu == "var:$name", enabled = !busy, onToggle = { menu = if (menu == "var:$name") null else "var:$name" }, onDismiss = { if (menu == "var:$name") menu = null }, - onEdit = { menu = null; editByPad = dialogInput.inputMode == InputMode.Keyboard; editing = name to (value ?: "") }, - // A value set here or inherited can be switched off for this profile; one set here can go back to inheriting. + onEdit = { menu = null; editByPad = dialogInput.inputMode == InputMode.Keyboard; editing = EnvironmentVariableEdit(scope, profileName, name, value ?: "") }, onUnset = if (value != null) ({ menu = null; save(current.withEntries(scope, own + (name to null))) }) else null, onRestore = if (own.containsKey(name)) ({ menu = null; save(current.withEntries(scope, own - name)) }) else null, shared = scope.isEmpty(), @@ -178,16 +175,14 @@ private fun GameEnvironmentEditor(byPad: Boolean, onClose: () -> Unit) { } } if (busy) LinearProgressIndicator(Modifier.fillMaxWidth()) - // Footer: add a variable, reset the profile, done. Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier.padding(top = 4.dp)) { - // Only once the settings are in: a button drawn disabled first comes up without its box. if (current != null) Box { SecondaryButton(stringResource(R.string.game_env_add), enabled = !busy) { menu = if (menu == "add") null else "add" } AnchoredMenu(menu == "add", onDismiss = { if (menu == "add") menu = null }, title = stringResource(R.string.game_env_add)) { first -> for ((i, option) in GameEnvironmentOptions.all.withIndex()) MenuItem(option.name, checked = false, focusRequester = if (i == 0) first else null) { - menu = null; editByPad = dialogInput.inputMode == InputMode.Keyboard; editing = option.name to option.value + menu = null; editByPad = dialogInput.inputMode == InputMode.Keyboard; editing = EnvironmentVariableEdit(scope, profileName, option.name, option.value) } - MenuItem(stringResource(R.string.game_env_custom), checked = false) { menu = null; editByPad = dialogInput.inputMode == InputMode.Keyboard; editing = "" to "" } + MenuItem(stringResource(R.string.game_env_custom), checked = false) { menu = null; editByPad = dialogInput.inputMode == InputMode.Keyboard; editing = EnvironmentVariableEdit(scope, profileName, "", "") } } } if (current != null && current.entries(scope).isNotEmpty()) FocusText(stringResource(R.string.game_env_reset), LocalPalette.current.signal) { @@ -197,25 +192,25 @@ private fun GameEnvironmentEditor(byPad: Boolean, onClose: () -> Unit) { PrimaryButton(stringResource(R.string.game_env_done), enabled = !busy, onClick = close) } } - editing?.let { (name, value) -> - VariableDialog(name, value, profileName, editByPad, onDismiss = { editing = null }) { key, content -> + editing?.let { edit -> + VariableDialog(edit.name, edit.value, edit.profileName, editByPad, onDismiss = { editing = null }) { key, content -> config?.let { - val entries = it.entries(scope).toMutableMap() - if (name.isNotEmpty() && name != key) entries[name] = null + val entries = it.entries(edit.scope).toMutableMap() + if (edit.name.isNotEmpty() && edit.name != key) entries[edit.name] = null entries[key] = content - save(it.withEntries(scope, entries)) + save(it.withEntries(edit.scope, entries)) } editing = null } } } -/** The panel the profile and the variables sit in, as a settings group does. */ +private data class EnvironmentVariableEdit(val scope: String, val profileName: String, val name: String, val value: String) + @Composable private fun Panel(content: @Composable androidx.compose.foundation.layout.ColumnScope.() -> Unit) = Column(Modifier.fillMaxWidth().clip(Shape14).background(MaterialTheme.colorScheme.surface).border(1.dp, LocalPalette.current.line, Shape14), content = content) -/** One variable: its name, what it is set to (and whether that comes from the shared profile), and a menu of what to do with it. */ @Composable private fun VariableRow( name: String, value: String?, inherited: Boolean, open: Boolean, enabled: Boolean, shared: Boolean, @@ -293,7 +288,6 @@ private fun VariableValueEditor(name: String, value: String, onChange: (String) var open by remember(name) { mutableStateOf(false) } var custom by remember(name) { mutableStateOf(option == null || value !in option.choices && option.type != GameEnvironmentOptions.Type.MULTIPLE) } when { - // On/off variables pick from their two values like any other choice: one way to set a value. option != null && option.choices.isNotEmpty() -> { SettingsRow(stringResource(R.string.game_env_value), null, highlighted = open) { Box { diff --git a/app/src/main/java/com/droiddeck/launcher/ui/GamepadGeometry.kt b/app/src/main/java/com/droiddeck/launcher/ui/GamepadGeometry.kt index 242f909377..466d57aecd 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/GamepadGeometry.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/GamepadGeometry.kt @@ -2,32 +2,14 @@ package com.droiddeck.launcher.ui import kotlin.math.min -/** - * Where the unfolded screen's gamepad puts each control, for a panel of a given size: plain - * numbers, so the layout is tested without a device (GamepadGeometryTest). - * - * Each thumb pivots at its bottom corner; its main control (a stick or trackpad) sits where it - * rests, diagonally in from the corner, and the right side mirrors the left. - * - * A wide strip (a foldable held flat as a tablet): the second control - the d-pad, the face - * buttons - a slide inward along the arc, the shoulders above, and View, Steam, QAM and Menu - * between the arcs. The reach R is the strip's height, or a third of its width. - * - * A tall panel (held upright): the second control a slide up the arc instead, the shoulders above - * that, View, Steam, QAM and Menu between the two sticks, and Panels - the Deck controls' other - * tabs - between the shoulders. Each side's column S is half the width, or as much as the height - * holds. A wide strip has no room for Panels and leaves it out. - */ object GamepadGeometry { enum class Slot { LEFT_MAIN, LEFT_SECOND, RIGHT_MAIN, RIGHT_SECOND, LEFT_OUTER_SHOULDER, LEFT_INNER_SHOULDER, RIGHT_INNER_SHOULDER, RIGHT_OUTER_SHOULDER, VIEW, STEAM, QAM, MENU, - /** The Deck controls' other tabs: on a tall panel only. */ PANELS, } - /** A control's box: its centre and size, in pixels. */ data class Box(val cx: Float, val cy: Float, val width: Float, val height: Float) { val left get() = cx - width / 2f val top get() = cy - height / 2f @@ -38,19 +20,15 @@ object GamepadGeometry { left < other.right && other.left < right && top < other.bottom && other.top < bottom } - /** The middle buttons, in a row in this order; two by two as on a Deck, View and Menu above Steam and QAM. */ private val middle = listOf(Slot.VIEW, Slot.STEAM, Slot.QAM, Slot.MENU) private val twoByTwo = mapOf(Slot.VIEW to 0, Slot.MENU to 1, Slot.STEAM to 2, Slot.QAM to 3) - /** A panel this shape is laid out as a tall panel (held upright), which has room for Panels; - * anything flatter is a wide strip. */ fun tall(w: Float, h: Float): Boolean = h >= w * 0.45f fun layout(w: Float, h: Float, density: Float): Map<Slot, Box> { if (w <= 0f || h <= 0f) return emptyMap() val pad = 8 * density val buttonH = 40 * density - // A row needs its buttons comfortable; two by two will take them a little narrower. val rowButton = 64 * density val gridButton = 48 * density val gutter = 8 * density @@ -75,14 +53,12 @@ object GamepadGeometry { val mainTop = h - reach * 0.40f - main / 2f val shoulderW = reach * 0.36f val shoulderH = (reach * 0.16f).coerceAtLeast(buttonH) - // Above the main controls, never over them, and inside the panel. val shoulderY = min(h - reach * 0.94f + shoulderH / 2f, mainTop - gutter - shoulderH / 2f) .coerceAtLeast(pad + shoulderH / 2f) pair(Slot.LEFT_MAIN, Slot.RIGHT_MAIN, reach * 0.40f, h - reach * 0.40f, main, main) pair(Slot.LEFT_SECOND, Slot.RIGHT_SECOND, reach * 1.03f, h - reach * 0.30f, second, second) pair(Slot.LEFT_OUTER_SHOULDER, Slot.RIGHT_OUTER_SHOULDER, reach * 0.22f, shoulderY, shoulderW, shoulderH) pair(Slot.LEFT_INNER_SHOULDER, Slot.RIGHT_INNER_SHOULDER, reach * 0.62f, shoulderY, shoulderW, shoulderH) - // Between the arcs: in a row if they fit, else two by two, else one above another. val gap = w - 2 * reach * 1.32f val columns = when { gap >= middle.size * rowButton -> middle.size @@ -102,12 +78,10 @@ object GamepadGeometry { pair(Slot.LEFT_SECOND, Slot.RIGHT_SECOND, side * 0.74f, secondCy, second, second) pair(Slot.LEFT_OUTER_SHOULDER, Slot.RIGHT_OUTER_SHOULDER, side * 0.20f, shoulderY, shoulderW, shoulderH) pair(Slot.LEFT_INNER_SHOULDER, Slot.RIGHT_INNER_SHOULDER, side * 0.57f, shoulderY, shoulderW, shoulderH) - // Between the two sticks at the bottom: two by two, or one above another. val gap = w - 2 * (side * 0.40f + main / 2f) val columns = if (gap >= 2 * gridButton) 2 else 1 val rows = (middle.size + columns - 1) / columns middleGrid(columns, gap - 2 * gutter, h - pad - rows * buttonH - (rows - 1) * 10 * density) - // Between the inner shoulders, where it fits. val panelsW = min(112 * density, w - 2 * (side * 0.57f + shoulderW / 2f) - 2 * gutter) if (panelsW >= buttonH) boxes[Slot.PANELS] = Box(w / 2f, shoulderY, panelsW, buttonH) } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/GlassesCalibrationControls.kt b/app/src/main/java/com/droiddeck/launcher/ui/GlassesCalibrationControls.kt new file mode 100644 index 0000000000..1f53c272dc --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/GlassesCalibrationControls.kt @@ -0,0 +1,64 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.foundation.layout.Column +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.LinearProgressIndicator +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.* +import androidx.compose.ui.res.stringResource +import com.droiddeck.launcher.R +import com.droiddeck.launcher.glasses.CalibrationPhase +import com.droiddeck.launcher.glasses.GlassesCalibrationState + +@Composable +internal fun GlassesCalibrationControls( + state: GlassesCalibrationState, + onStart: () -> Unit, + onCancel: () -> Unit, + onReset: () -> Unit, + onDone: () -> Unit, +) { + var shown by remember { mutableStateOf(false) } + var reset by remember { mutableStateOf(false) } + val cancel by rememberUpdatedState(onCancel) + DisposableEffect(Unit) { onDispose { cancel() } } + ActionRow(stringResource(R.string.glasses_calibration), + stringResource(if (state.saved) R.string.glasses_calibration_saved_hint else R.string.glasses_calibration_hint), + stringResource(R.string.glasses_calibration_open), { onCancel(); shown = true }) + if (state.saved && !state.running) ActionRow(stringResource(R.string.glasses_calibration_reset), null, + stringResource(R.string.glasses_calibration_reset_button), { reset = true }) + if (reset) AlertDialog( + onDismissRequest = { reset = false }, + title = { Text(stringResource(R.string.glasses_calibration_reset)) }, + text = { Text(stringResource(R.string.glasses_calibration_reset_hint)) }, + confirmButton = { TextButton(onClick = { onReset(); reset = false }) { Text(stringResource(R.string.glasses_calibration_reset_button)) } }, + dismissButton = { TextButton(onClick = { reset = false }) { Text(stringResource(R.string.common_cancel)) } }, + ) + if (shown) AlertDialog( + onDismissRequest = { onCancel(); shown = false }, + title = { Text(stringResource(R.string.glasses_calibration)) }, + text = { Column { + Text(stringResource(when (state.phase) { + CalibrationPhase.IDLE -> R.string.glasses_calibration_instructions + CalibrationPhase.SETTLING -> R.string.glasses_calibration_settling + CalibrationPhase.COLLECTING -> R.string.glasses_calibration_collecting + CalibrationPhase.MOVING -> R.string.glasses_calibration_moving + CalibrationPhase.TURN_OVER -> R.string.glasses_calibration_turn_over + CalibrationPhase.SAVED -> R.string.glasses_calibration_complete + CalibrationPhase.FAILED -> R.string.glasses_calibration_failed + })) + if (state.running) { + LinearProgressIndicator(progress = { state.progress / 100f }) + Text("${state.progress}%") + } + } }, + confirmButton = { + if (!state.running) TextButton(onClick = { + if (state.phase == CalibrationPhase.SAVED) { onDone(); onCancel(); shown = false } + else onStart() + }) { Text(stringResource(if (state.phase == CalibrationPhase.SAVED) R.string.glasses_calibration_done else R.string.glasses_calibration_start)) } + }, + dismissButton = { TextButton(onClick = { onCancel(); shown = false }) { Text(stringResource(R.string.common_cancel)) } }, + ) +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/GlassesPanel.kt b/app/src/main/java/com/droiddeck/launcher/ui/GlassesPanel.kt new file mode 100644 index 0000000000..0d06087307 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/GlassesPanel.kt @@ -0,0 +1,374 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsPressedAsState +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.Spacer +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.displayCutout +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.windowInsetsPadding +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.draw.clip +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.semantics.Role +import androidx.compose.ui.unit.IntOffset +import androidx.compose.ui.unit.sp +import androidx.compose.runtime.getValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp +import androidx.compose.runtime.collectAsState +import com.droiddeck.launcher.R +import com.droiddeck.launcher.glasses.Glasses +import com.droiddeck.launcher.glasses.GlassesRendering +import com.droiddeck.launcher.glasses.GlassesDisplayModes +import com.droiddeck.launcher.glasses.GlassesDisplayProfile +import com.droiddeck.launcher.glasses.GlassesSettings +import com.droiddeck.launcher.glasses.GlassesState +import android.content.Intent +import androidx.compose.ui.platform.LocalContext +import com.droiddeck.launcher.glasses.SpatialTracking +import com.droiddeck.launcher.glasses.SpatialMeasurements +import com.droiddeck.launcher.handtracking.HandTracking +import java.util.Locale + +internal val GlassesIcon: ImageVector by lazy { + ImageVector.Builder("Glasses", 24.dp, 24.dp, 24f, 24f).apply { + path(fill = null, stroke = SolidColor(Color.Black), strokeLineWidth = 1.8f, strokeLineCap = StrokeCap.Round, strokeLineJoin = StrokeJoin.Round) { + moveTo(2.5f, 10f); lineTo(21.5f, 10f) + moveTo(3.2f, 10f); lineTo(3.8f, 15.2f); quadTo(4f, 17f, 6f, 17f); lineTo(8.6f, 17f); quadTo(10.2f, 17f, 10.6f, 15.4f); lineTo(11.2f, 12.6f) + quadTo(12f, 11.6f, 12.8f, 12.6f); lineTo(13.4f, 15.4f); quadTo(13.8f, 17f, 15.4f, 17f); lineTo(18f, 17f); quadTo(20f, 17f, 20.2f, 15.2f); lineTo(20.8f, 10f) + moveTo(2.5f, 10f); lineTo(1.8f, 7.6f) + moveTo(21.5f, 10f); lineTo(22.2f, 7.6f) + } + }.build() +} + +@Composable +internal fun rememberGlasses(): Pair<GlassesState, GlassesSettings> { + val g by Glasses.state.collectAsState() + val s by Glasses.settings.collectAsState() + return g to s +} + +internal object GlassesTab { + const val DISPLAY = "display" + const val VR = "vr" + const val HARDWARE = "hardware" + const val TRACKING = "tracking" +} + +@Composable +internal fun glassesTabs(g: GlassesState): List<Pair<String, String>> = buildList { + add(GlassesTab.DISPLAY to stringResource(R.string.glasses_display)) + if (g.canControl || g.hasDisplay) add(GlassesTab.VR to stringResource(R.string.glasses_vr)) + if (g.canControl) { + add(GlassesTab.TRACKING to stringResource(R.string.glasses_tracking)) + if (g.hardwareControls) add(GlassesTab.HARDWARE to stringResource(R.string.glasses_hardware)) + } +} + +@Composable +internal fun GlassesGroups( + host: MenuHost, + g: GlassesState, + s: GlassesSettings, + track: (String) -> Modifier = { Modifier }, + onRecenter: (() -> Unit)? = null, + inSession: Boolean = true, + outputActive: Boolean = inSession, + steamVrRunning: Boolean = false, + tab: String? = null, + steamVr: @Composable () -> Unit = {}, +) { + val display = tab == null || tab == GlassesTab.DISPLAY + val vr = tab == null || tab == GlassesTab.VR + val picture = GlassesRendering.picture(s, g.sbs, steamVrRunning) + val usesGlasses = GlassesRendering.usesGlasses(g, outputActive, steamVrRunning) + val spatialTracking = g.spatialConnected && s.positionalTracking + val spatialVr = spatialTracking && usesGlasses && steamVrRunning + val flatPicture = picture == GlassesRendering.Picture.FLAT || picture == GlassesRendering.Picture.DUPLICATED + val virtualScreen = usesGlasses && picture == GlassesRendering.Picture.VIRTUAL_SCREEN + val directView = usesGlasses && picture == GlassesRendering.Picture.STEREO + val menuScreen = !inSession && g.usable && s.gameOnGlasses && s.screen3dof + if (g.canControl && onRecenter != null && s.headTracking && (virtualScreen || menuScreen || (directView && steamVrRunning))) { + SettingsGroup(stringResource(R.string.glasses_quick_actions), compact = true) { + ActionRow(stringResource(R.string.glasses_recenter), + if (virtualScreen || menuScreen) stringResource(R.string.glasses_recenter_screen_hint) else null, + stringResource(R.string.cardboard_recenter_button), onRecenter) + } + } + if (display) SettingsGroup(g.model) { + if (g.experimental) SettingsRow(stringResource(R.string.glasses_control), stringResource(R.string.glasses_xreal_experimental)) {} + val status = if (g.hasDisplay) stringResource(R.string.glasses_status, g.width, g.height, kotlin.math.round(g.hz).toInt(), + stringResource(if (g.sbs) R.string.glasses_mode_3d else R.string.glasses_mode_2d)) else null + when { + g.noSignal -> SettingsRow(stringResource(R.string.glasses_output), stringResource(R.string.glasses_no_signal)) {} + !g.controllable -> { + if (status != null) SettingsRow(stringResource(R.string.glasses_output), status) {} + SettingsRow(stringResource(R.string.glasses_control), g.controlError ?: stringResource(R.string.glasses_no_control)) {} + } + g.permission == Glasses.Permission.ASKING -> + SettingsRow(stringResource(R.string.glasses_control), stringResource(R.string.glasses_asking)) {} + !g.connected -> ActionRow(stringResource(R.string.glasses_control), + g.controlError ?: stringResource(if (g.permission == Glasses.Permission.DENIED) R.string.glasses_denied else R.string.glasses_allow_hint), + stringResource(R.string.glasses_allow), { Glasses.requestControl() }) + status != null -> SettingsRow(stringResource(R.string.glasses_output), status) {} + } + ToggleRow(host, "glasses-game", stringResource(R.string.glasses_game_on), stringResource(R.string.glasses_game_on_hint), + s.gameOnGlasses, chipModifier = track("glasses-game")) { Glasses.setGameOnGlasses(it) } + } + if (display && g.canControl && (inSession || g.sbs || g.sbsSupport == GlassesState.SBS_FAILS)) { + SettingsGroup(stringResource(R.string.glasses_display_mode)) { + if (g.sbsSupport == GlassesState.SBS_FAILS && !g.sbs) { + ActionRow(stringResource(R.string.glasses_3d), stringResource(R.string.glasses_3d_failed), + stringResource(R.string.stores_dl_retry), { Glasses.set3d(true) }) + } else ToggleRow(host, "glasses-3d", stringResource(R.string.glasses_3d), stringResource(R.string.glasses_3d_hint), + g.sbs, chipModifier = track("glasses-3d")) { Glasses.set3d(it) } + } + } + if (display && g.canControl) { + val profiles = if (inSession) listOf(GlassesDisplayModes.profile(g.sbs, false)) + else listOf(GlassesDisplayProfile.TWO_D, GlassesDisplayProfile.THREE_D) + for (profile in profiles) SettingsGroup(stringResource(if (profile == GlassesDisplayProfile.TWO_D) + R.string.glasses_output_2d else R.string.glasses_output_3d)) { + GlassesResolutionRow(host, g, s, profile, track) + if ((profile == GlassesDisplayProfile.THREE_D) == g.sbs) GlassesRefreshRow(host, g, s, track) + } + } + if (display && (g.canControl || g.hasDisplay)) SettingsGroup(stringResource(R.string.glasses_picture_group)) { + ChoiceRow(host, "glasses-picture", stringResource(R.string.glasses_picture), stringResource(R.string.glasses_picture_hint), + listOf( + GlassesSettings.PICTURE_AUTO to stringResource(R.string.glasses_picture_auto), + GlassesSettings.PICTURE_SCREEN to stringResource(R.string.glasses_picture_screen), + GlassesSettings.PICTURE_SBS to stringResource(R.string.glasses_picture_sbs), + ), s.picture3d, chipModifier = track("glasses-picture")) { Glasses.setPicture3d(it) } + if (g.canControl && g.supportsScreen3dof) ToggleRow(host, "glasses-3dof", + stringResource(if (g.spatialConnected && s.positionalTracking) R.string.glasses_6dof else R.string.glasses_3dof), + stringResource(R.string.glasses_3dof_hint), s.screen3dof, chipModifier = track("glasses-3dof")) { Glasses.set3dof(it) } + when { + !inSession -> SettingsRow(stringResource(R.string.glasses_picture_screen), stringResource(R.string.glasses_screen_app_wide)) {} + !usesGlasses -> SettingsRow(stringResource(R.string.glasses_picture_screen), stringResource(R.string.glasses_screen_no_output)) {} + flatPicture -> ActionRow( + stringResource(R.string.glasses_picture_screen), stringResource(R.string.glasses_screen_flat_hint), + stringResource(R.string.glasses_screen_use), { Glasses.setPicture3d(GlassesSettings.PICTURE_SCREEN) }) + directView -> SettingsRow(stringResource(R.string.glasses_picture_screen), + stringResource(if (steamVrRunning) R.string.glasses_screen_direct_hint else R.string.glasses_screen_sbs_hint)) {} + } + if (virtualScreen || (!inSession && s.picture3d != GlassesSettings.PICTURE_SBS)) { + SliderRow(stringResource(R.string.glasses_screen_size), null, s.screenWidthDm, 5..60, step = 1, + format = { SpatialMeasurements.distance(it / 10f) }, modifier = track("glasses-width")) { Glasses.setScreenWidthDm(it) } + SliderRow(stringResource(R.string.glasses_screen_distance), null, s.screenDistanceDm, 5..100, step = 1, + format = { SpatialMeasurements.distance(it / 10f) }, modifier = track("glasses-distance")) { Glasses.setScreenDistanceDm(it) } + } + } + if (vr && (g.canControl || g.hasDisplay)) SettingsGroup(stringResource(R.string.cardboard_steamvr)) { + steamVr() + ToggleRow(host, "glasses-auto3d", stringResource(R.string.glasses_auto3d), stringResource(R.string.glasses_auto3d_hint), + s.auto3d, chipModifier = track("glasses-auto3d")) { Glasses.setAuto3d(it) } + if (g.canControl) { + GlassesResolutionRow(host, g, s, GlassesDisplayProfile.VR, track) + if (steamVrRunning && tab != null) GlassesRefreshRow(host, g, s, track) + } + SliderRow(stringResource(R.string.glasses_vr_fov), stringResource(R.string.glasses_vr_fov_hint), s.vrFovDeg, + GlassesSettings.VR_FOV_MIN..GlassesSettings.VR_FOV_MAX, step = 1, + format = { "$it°" }, modifier = track("glasses-vr-fov")) { Glasses.setVrFovDeg(it) } + } + if ((tab == null || tab == GlassesTab.TRACKING) && g.canControl) { + SettingsGroup(stringResource(R.string.glasses_head_tracking)) { + val trackingHint = when { + inSession && !usesGlasses -> R.string.glasses_screen_no_output + spatialVr -> R.string.glasses_head_tracking_spatial_vr_hint + spatialTracking -> R.string.glasses_head_tracking_spatial_hint + inSession && flatPicture -> R.string.glasses_tracking_flat_hint + inSession && directView && !steamVrRunning -> R.string.glasses_tracking_sbs_hint + else -> R.string.glasses_head_tracking_hint + } + ToggleRow(host, "glasses-tracking", stringResource(R.string.glasses_head_tracking), stringResource(trackingHint), + s.headTracking || spatialVr, enabled = !spatialVr, + chipModifier = track("glasses-tracking")) { Glasses.setHeadTracking(it) } + } + val calibration by Glasses.calibration.collectAsState() + if (calibration.supported) SettingsGroup(stringResource(R.string.glasses_calibration)) { + GlassesCalibrationControls(calibration, + onStart = Glasses::startCalibration, onCancel = Glasses::cancelCalibration, + onReset = Glasses::resetCalibration, onDone = { onRecenter?.invoke() }) + } + } + if ((tab == null || tab == GlassesTab.HARDWARE) && g.canControl && g.hardwareControls) SettingsGroup(stringResource(R.string.glasses_hardware)) { + if (g.brightnessMax > 0) SliderRow(stringResource(R.string.glasses_brightness), null, g.brightness.coerceAtLeast(0), 0..g.brightnessMax, step = 1, + modifier = track("glasses-brightness")) { Glasses.setBrightness(it) } + if (g.volumeMax > 0) SliderRow(stringResource(R.string.glasses_volume), null, g.volume.coerceAtLeast(0), 0..g.volumeMax, step = 1, + modifier = track("glasses-volume")) { Glasses.setVolume(it) } + if (g.hasSunblock) ToggleRow(host, "glasses-sunblock", stringResource(R.string.glasses_sunblock), stringResource(R.string.glasses_sunblock_hint), + g.sunblock, chipModifier = track("glasses-sunblock")) { Glasses.setSunblock(it) } + } + val context = androidx.compose.ui.platform.LocalContext.current + val hands by HandTracking.settings.collectAsState() + androidx.compose.runtime.LaunchedEffect(Unit) { HandTracking.load(context) } + if ((tab == null || tab == GlassesTab.TRACKING) && g.canControl) { + if (g.spatialConnected) { + SettingsGroup(stringResource(R.string.glasses_experimental)) { + val spatial by SpatialTracking.status.collectAsState() + ToggleRow(host, "glasses-position", stringResource(R.string.glasses_position), stringResource(R.string.glasses_position_hint), + s.positionalTracking, chipModifier = track("glasses-position")) { Glasses.setPositionalTracking(it) } + if (s.positionalTracking) { + SettingsRow(stringResource(R.string.glasses_tracking_status), spatial.message) {} + SliderRow(stringResource(R.string.glasses_eye_height), null, s.eyeHeightCm, 50..250, step = 1, + format = SpatialMeasurements::height, modifier = track("glasses-eye-height")) { Glasses.setEyeHeight(it) } + ActionRow(stringResource(R.string.glasses_floor), null, stringResource(R.string.glasses_floor_set), Glasses::setSpatialFloor) + HandCalibrationStatus(spatial) + ActionRow(stringResource(R.string.glasses_spatial_setup), stringResource(R.string.glasses_spatial_setup_hint), + stringResource(R.string.glasses_spatial_open), { context.startActivity(Intent(context, SpatialTrackingActivity::class.java)) }) + ToggleRow(host, "glasses-hands", stringResource(R.string.glasses_hands), stringResource(R.string.glasses_hands_hint), + s.handControllers, chipModifier = track("glasses-hands")) { Glasses.setHandControllers(it) } + if (s.handControllers) ToggleRow(host, "glasses-steady-hand-aim", + stringResource(R.string.glasses_steady_hand_aim), stringResource(R.string.glasses_steady_hand_aim_hint), + s.steadyHandAim, chipModifier = track("glasses-steady-hand-aim")) { Glasses.setSteadyHandAim(it) } + } + ToggleRow(host, "glasses-joycons", stringResource(R.string.glasses_joycons), + stringResource(if (s.positionalTracking) R.string.glasses_joycons_hint else R.string.glasses_joycons_requires_position), + s.joyConTracking, enabled = s.positionalTracking, chipModifier = track("glasses-joycons")) { Glasses.setJoyConTracking(it) } + } + } + if (hands.usable) SettingsGroup(stringResource(R.string.phone_camera_tracking_group)) { + HandCameraRows(host, track, inSession) + } + } + +} + +@Composable +private fun GlassesResolutionRow(host: MenuHost, g: GlassesState, s: GlassesSettings, + profile: GlassesDisplayProfile, track: (String) -> Modifier) { + val label = when (profile) { + GlassesDisplayProfile.TWO_D -> R.string.glasses_resolution_2d + GlassesDisplayProfile.THREE_D -> R.string.glasses_resolution_3d + GlassesDisplayProfile.VR -> R.string.glasses_resolution_vr + } + val choices = listOf("" to stringResource(if (profile == GlassesDisplayProfile.VR) + R.string.glasses_resolution_inherit else R.string.glasses_resolution_auto)) + + g.resolutions.map { it.key to "${it.width} × ${it.height}" } + val saved = GlassesDisplayModes.choice(s, profile) + val key = "glasses-resolution-${profile.name.lowercase()}" + ChoiceRow(host, key, stringResource(label), stringResource(R.string.glasses_resolution_hint), choices, + saved.takeIf { value -> choices.any { it.first == value } } ?: "", + enabled = !g.switching3d, chipModifier = track(key)) { Glasses.setResolution(profile, it) } +} + +@Composable +private fun GlassesRefreshRow(host: MenuHost, g: GlassesState, s: GlassesSettings, track: (String) -> Modifier) { + val rates = GlassesRendering.refreshRates(s, g).map { it to "$it Hz" } + val hint = if (g.supports30Hz && !s.gameOnGlasses) stringResource(R.string.glasses_refresh_30_hint) else null + val label = stringResource(if (g.sbs) R.string.glasses_3d_refresh else R.string.glasses_refresh) + if (rates.size > 1) { + val key = if (g.sbs) "glasses-3d-hz" else "glasses-hz" + ChoiceRow(host, key, label, hint, rates, GlassesRendering.outputHz(s, g), + enabled = !g.switching3d, chipModifier = track(key)) { + if (g.sbs) Glasses.setSbsHz(it) else Glasses.setRefreshHz(it) + } + } else SettingsRow(label, hint ?: "${rates.single().first} Hz") {} +} + +private fun padButtonColors(tint: Int, opacity: Int, pressed: Boolean): Pair<Color, Color> { + val base = Color(tint) + val alpha = opacity.coerceIn(0, 100) / 100f + fun light(a: Int, f: Float) = Color(base.red + (1 - base.red) * f, base.green + (1 - base.green) * f, base.blue + (1 - base.blue) * f, a * alpha / 255f) + return Color(base.red * 0.12f, base.green * 0.12f, base.blue * 0.12f, 190 / 255f) to (if (pressed) light(230, 0.7f) else light(150, 0.25f)) +} + +@Composable +internal fun GlassesCornerButton(slot: Int, tint: Int, opacity: Int, onClick: () -> Unit) { + val density = androidx.compose.ui.platform.LocalDensity.current + androidx.compose.foundation.layout.BoxWithConstraints( + Modifier.fillMaxSize().windowInsetsPadding(WindowInsets.displayCutout), + ) { + val x = if (slot < 0) maxWidth / 2 + 56.dp else 34.dp + 56.dp * slot + val bottom = if (slot < 0) 44.dp else 34.dp + val source = remember { MutableInteractionSource() } + val pressed by source.collectIsPressedAsState() + val (fill, line) = padButtonColors(tint, opacity, pressed) + Box( + contentAlignment = Alignment.Center, + modifier = Modifier + .offset { with(density) { IntOffset((x - 18.dp).roundToPx(), (maxHeight - bottom - 18.dp).roundToPx()) } } + .size(36.dp) + .clip(CircleShape) + .background(fill) + .border(1.5.dp, line, CircleShape) + .clickable(interactionSource = source, indication = null, role = Role.Button, onClick = onClick) + .testTag("glasses-button"), + ) { + Icon(GlassesIcon, stringResource(R.string.glasses_open), tint = line, modifier = Modifier.size(22.dp)) + } + } +} + +@Composable +internal fun GlassesRecenterButton(tint: Int, opacity: Int, onRecenterJoyCons: (() -> Unit)? = null, onClick: () -> Unit) { + Box( + Modifier.fillMaxSize().windowInsetsPadding(WindowInsets.displayCutout).padding(top = 12.dp), + contentAlignment = Alignment.TopCenter, + ) { + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + GlassesRecenterAction(stringResource(R.string.glasses_recenter_button), "glasses-recenter", tint, opacity, onClick) + if (onRecenterJoyCons != null) GlassesRecenterAction( + stringResource(R.string.glasses_recenter_joycons_button), "glasses-recenter-joycons", tint, opacity, onRecenterJoyCons) + } + } +} + +@Composable +private fun GlassesRecenterAction(label: String, tag: String, tint: Int, opacity: Int, onClick: () -> Unit) { + val source = remember { MutableInteractionSource() } + val pressed by source.collectIsPressedAsState() + val (fill, line) = padButtonColors(tint, opacity, pressed) + val shape = RoundedCornerShape(50) + Box( + contentAlignment = Alignment.Center, + modifier = Modifier + .height(36.dp) + .clip(shape) + .background(fill) + .border(1.5.dp, line, shape) + .clickable(interactionSource = source, indication = null, role = Role.Button, onClick = onClick) + .padding(horizontal = 18.dp) + .testTag(tag), + ) { + Text(label, color = line, fontSize = 14.sp) + } +} + +@Composable +internal fun GlassesPlayingHint(model: String) { + Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Icon(GlassesIcon, null, tint = Color.White.copy(alpha = 0.35f), modifier = Modifier.size(56.dp)) + Spacer(Modifier.height(10.dp)) + Text(stringResource(R.string.glasses_playing, model), color = Color.White.copy(alpha = 0.45f), fontSize = 15.sp) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/GlassesSetupPanel.kt b/app/src/main/java/com/droiddeck/launcher/ui/GlassesSetupPanel.kt new file mode 100644 index 0000000000..8b2378ae4d --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/GlassesSetupPanel.kt @@ -0,0 +1,38 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp +import com.droiddeck.launcher.R +import com.droiddeck.launcher.glasses.GlassesMenuMirror + +@Composable +internal fun GlassesSetupPanel() { + val (glasses, settings) = rememberGlasses() + val host = rememberMenuHost() + val tabs = glassesTabs(glasses) + var selectedTab by rememberSaveable { mutableStateOf(GlassesTab.DISPLAY) } + val tab = selectedTab.takeIf { selected -> tabs.any { it.first == selected } } ?: GlassesTab.DISPLAY + LaunchedEffect(tab, glasses.present, glasses.canControl, glasses.model) { host.open = null } + + Column(Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(12.dp)) { + Note(stringResource(R.string.setup_glasses_scope)) + if (!glasses.present && !glasses.hasDisplay && !glasses.canControl) { + Note(stringResource(R.string.setup_glasses_connect)) + } else { + SegmentedTabs(tabs, tab, modifier = Modifier.fillMaxWidth(), + tabModifier = { Modifier.testTag("setup-glasses-tab-$it") }) { selectedTab = it } + GlassesGroups(host, glasses, settings, onRecenter = GlassesMenuMirror::recenter, inSession = false, tab = tab) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/GpuDriversPanel.kt b/app/src/main/java/com/droiddeck/launcher/ui/GpuDriversPanel.kt index eec0f20875..47905485db 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/GpuDriversPanel.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/GpuDriversPanel.kt @@ -2,7 +2,20 @@ package com.droiddeck.launcher.ui import com.droiddeck.launcher.R import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.focusGroup +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.layout.LayoutCoordinates +import androidx.compose.ui.layout.boundsInRoot +import androidx.compose.ui.layout.onGloballyPositioned +import androidx.compose.ui.geometry.Rect import androidx.compose.foundation.focusable +import androidx.compose.ui.focus.focusProperties +import androidx.compose.foundation.layout.IntrinsicSize +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material.icons.outlined.Monitor +import androidx.compose.material.icons.outlined.Refresh +import androidx.compose.material.icons.outlined.SportsEsports import androidx.compose.material.icons.outlined.ExpandLess import androidx.compose.material.icons.outlined.ExpandMore import androidx.compose.runtime.LaunchedEffect @@ -58,24 +71,36 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.compose.foundation.rememberScrollState +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.focus.onFocusChanged +import kotlinx.coroutines.launch import androidx.compose.foundation.verticalScroll import androidx.compose.ui.focus.FocusRequester import androidx.compose.ui.focus.focusRequester -/** One matched driver pair in the list (DriverPairs), and what this device makes of it. */ class PairRow( val key: String, val name: String, val version: String, val detail: String, val recommended: Boolean, - /** Built for this GPU's family; the others only show when asked. */ val suits: Boolean, val complete: Boolean, val installed: Boolean, val active: Boolean, ) +const val GPU_MODE_AUTO = "auto" +const val GPU_MODE_PAIR = "pair" +const val GPU_MODE_MIX = "mix" + +class DriverSlot( + val name: String = "", + val source: String = "", + val pending: Boolean = false, + val status: String = "", +) + class GpuDriversState( val gpuName: String = "", val gpuFamily: String = "", @@ -85,13 +110,11 @@ class GpuDriversState( val unsupported: Boolean = false, val auto: Boolean = true, val pairs: List<PairRow> = emptyList(), - /** The pair key being installed, and how far along (-1 = unknown). */ val busy: String? = null, val percent: Int = -1, val autoStatus: String = "", val releaseStatus: String = "", val checking: Boolean = false, - // Advanced: each driver on its own. val linuxRows: List<DriverRow> = emptyList(), val linuxSelected: String = "", val androidRows: List<DriverRow> = emptyList(), @@ -99,10 +122,13 @@ class GpuDriversState( val linuxDownloads: List<DownloadRow> = emptyList(), val androidDownloads: List<DownloadRow> = emptyList(), val canRestoreBundled: Boolean = false, - /** The Android + Linux bundle both drivers are set to ("DD-Turnip 0.1.0"), or null. */ val activeBundle: String? = null, + val mode: String = GPU_MODE_AUTO, + val display: DriverSlot = DriverSlot(), + val runtime: DriverSlot = DriverSlot(), + val canRestart: Boolean = true, + val checkedAt: Long = 0L, ) { - /** The pair both drivers are set to, if they make one. */ val activePair: PairRow? get() = pairs.firstOrNull { it.active } } @@ -117,16 +143,12 @@ class GpuDriversActions( val onDownloadDriver: (String) -> Unit = {}, val onImportLinux: () -> Unit = {}, val onImportAndroid: () -> Unit = {}, - /** The tab's own import: a bundle, or a single driver of either kind. */ val onImportZip: () -> Unit = {}, val onRestoreBundled: () -> Unit = {}, + val onMode: (String) -> Unit = {}, + val onRestart: () -> Unit = {}, ) -/** - * Everything about the chip - SoC, GPU, CPU, memory, system, the phone's own Vulkan driver, the - * drivers in use - gathered once, off the main thread, with a button that copies it for a bug - * report. Stepped out of the Components page's device chip; [first] is where a pad starts. - */ @Composable internal fun DeviceDetails(first: FocusRequester) { val colors = MaterialTheme.colorScheme @@ -159,7 +181,6 @@ internal fun DeviceDetails(first: FocusRequester) { } } -/** One part of the device details: its title, then label/value rows. Focusable, so the d-pad walks the list. */ @Composable private fun DeviceInfoSection(section: DeviceInfo.Section) { val colors = MaterialTheme.colorScheme @@ -181,3 +202,257 @@ private fun DeviceInfoSection(section: DeviceInfo.Section) { } } } + +private const val STALE_MS = 6 * 3_600_000L + +@OptIn(androidx.compose.ui.ExperimentalComposeUiApi::class) +@Composable +internal fun GpuDriversBody( + gpu: GpuDriversState, + actions: GpuDriversActions, + single: Boolean, + first: FocusRequester, + slotFocus: Map<String, FocusRequester>, + onOpenSlot: (String, Rect) -> Unit, +) { + LaunchedEffect(Unit) { + if (!gpu.checking && gpu.busy == null && System.currentTimeMillis() - gpu.checkedAt > STALE_MS) actions.onRefresh() + } + val scroll = rememberScrollState() + val scope = rememberCoroutineScope() + val placed = remember { arrayOfNulls<LayoutCoordinates>(2) } + // Focusing the top mode shows as much of the in-use card above it as fits, without hiding the mode itself. + val revealCard = { + val (viewport, top) = placed + if (viewport != null && top != null && viewport.isAttached && top.isAttached) scope.launch { + val bottom = viewport.localPositionOf(top, Offset(0f, top.size.height.toFloat())).y + scroll.value + scroll.animateScrollTo((bottom - viewport.size.height).toInt().coerceAtLeast(0)) + } + } + Column( + verticalArrangement = Arrangement.spacedBy(14.dp), + modifier = Modifier.fillMaxSize().onGloballyPositioned { placed[0] = it }.verticalScroll(scroll).padding(bottom = 16.dp) + .focusProperties { enter = { first } }.focusGroup(), + ) { + InUseCard(gpu, actions, first) + PanelHeading(stringResource(R.string.gpu_mode_title)) + val modes = listOf( + Triple(GPU_MODE_AUTO, R.string.common_auto, R.string.gpu_mode_auto_detail), + Triple(GPU_MODE_PAIR, R.string.gpu_mode_pair, R.string.gpu_mode_pair_detail), + Triple(GPU_MODE_MIX, R.string.gpu_mode_mix, R.string.gpu_mode_mix_detail), + ) + val choice: @Composable (Int, Modifier) -> Unit = { i, mod -> + val (id, title, detail) = modes[i] + PanelRow( + stringResource(title), stringResource(detail), gpu.mode == id, + modifier = mod.then(if (gpu.mode == id) Modifier.focusRequester(first) else Modifier) + .then(if (i == 0) Modifier.onGloballyPositioned { placed[1] = it }.onFocusChanged { if (it.isFocused) revealCard() } else Modifier), + onClick = { if (gpu.mode != id) actions.onMode(id) }, + ) + } + if (single) Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { modes.indices.forEach { choice(it, Modifier) } } + else Row(horizontalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier.fillMaxWidth().height(IntrinsicSize.Min)) { + modes.indices.forEach { choice(it, Modifier.weight(1f).fillMaxHeight()) } + } + when (gpu.mode) { + GPU_MODE_AUTO -> AutoBody(gpu) + GPU_MODE_PAIR -> PairBody(gpu, actions) + else -> MixBody(single, actions, slotFocus, onOpenSlot) + } + } +} + +@Composable +private fun InUseCard(gpu: GpuDriversState, actions: GpuDriversActions, first: FocusRequester) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val shape = RoundedCornerShape(14.dp) + Column( + verticalArrangement = Arrangement.spacedBy(10.dp), + modifier = Modifier.fillMaxWidth().clip(shape).background(colors.surface).border(1.dp, pal.line, shape).padding(horizontal = 16.dp, vertical = 12.dp), + ) { + SlotLine(Icons.Outlined.Monitor, stringResource(R.string.comp_display_driver), gpu.display) + Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line)) + SlotLine(Icons.Outlined.SportsEsports, stringResource(R.string.comp_runtime_driver), gpu.runtime) + if (gpu.busy != null) LinearProgressIndicator( + progress = { (gpu.percent.coerceAtLeast(0)) / 100f }, modifier = Modifier.fillMaxWidth(), + ) + if (gpu.display.pending) RestartBanner(gpu.display.name, gpu.canRestart, first, actions.onRestart) + } +} + +@Composable +private fun SlotLine(icon: ImageVector, label: String, slot: DriverSlot) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) { + Box(contentAlignment = Alignment.Center, modifier = Modifier.size(40.dp).clip(RoundedCornerShape(10.dp)).background(colors.surfaceVariant)) { + Icon(icon, contentDescription = null, tint = colors.onBackground, modifier = Modifier.size(20.dp)) + } + Column(Modifier.weight(1f)) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Text(label, fontSize = 12.5.sp, color = colors.onSurfaceVariant) + Pill(slot.source, pal.line2.copy(alpha = 0.6f), colors.onBackground) + } + Text(slot.name, fontSize = 16.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + if (slot.status.isNotEmpty()) Text( + slot.status, fontSize = 12.5.sp, color = if (slot.pending) AttentionAmber else colors.onSurfaceVariant, + modifier = Modifier.padding(top = 2.dp), + ) + } + } +} + +@Composable +private fun RestartBanner(target: String, canRestart: Boolean, afterLater: FocusRequester, onRestart: () -> Unit) { + var later by rememberSaveable(target) { mutableStateOf(false) } + if (later) return + val shape = RoundedCornerShape(12.dp) + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), + modifier = Modifier.fillMaxWidth().clip(shape).background(AttentionAmber.copy(alpha = 0.12f)) + .border(1.dp, AttentionAmber.copy(alpha = 0.45f), shape).padding(horizontal = 12.dp, vertical = 8.dp), + ) { + Icon(Icons.Outlined.Refresh, contentDescription = null, tint = AttentionAmber, modifier = Modifier.size(20.dp)) + Text( + stringResource(if (canRestart) R.string.gpu_restart_banner else R.string.gpu_restart_blocked), + fontSize = 13.5.sp, color = MaterialTheme.colorScheme.onBackground, modifier = Modifier.weight(1f), + ) + FocusText(stringResource(R.string.gpu_restart_later), MaterialTheme.colorScheme.onBackground) { + runCatching { afterLater.requestFocus() } + later = true + } + if (canRestart) FocusText(stringResource(R.string.gpu_restart_now), AttentionAmber, onClick = onRestart) + } +} + +@Composable +private fun AutoBody(gpu: GpuDriversState) { + val colors = MaterialTheme.colorScheme + Column(verticalArrangement = Arrangement.spacedBy(10.dp)) { + PanelTitle( + stringResource(if (gpu.activePair != null) R.string.gpu_auto_title else R.string.gpu_auto_builtin_title, gpu.gpuName), + stringResource(R.string.gpu_auto_reason, gpu.gpuFamily), + ) + gpu.activePair?.let { p -> PanelRow(p.name, "${p.version} · ${p.detail}", selected = true, onClick = null) } + if (gpu.autoStatus.isNotEmpty()) Text(gpu.autoStatus, fontSize = 13.sp, color = colors.onSurfaceVariant) + } +} + +@Composable +private fun PairBody(gpu: GpuDriversState, actions: GpuDriversActions) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + var showAll by rememberSaveable { mutableStateOf(false) } + Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { + PanelTitle(stringResource(R.string.gpu_pair_title), stringResource(R.string.gpu_pair_hint)) + val rows = gpu.pairs.filter { (it.installed || it.complete) && (it.suits || showAll) } + if (rows.isEmpty()) Text( + stringResource(if (gpu.checking) R.string.gpu_checking else R.string.gpu_none_listed), + fontSize = 13.sp, color = colors.onSurfaceVariant, + ) + for (p in rows) PanelRow( + p.name, "${p.version} · ${p.detail}", selected = p.active, + badge = if (p.recommended) stringResource(R.string.gpu_autos_pick) else null, + trailing = when { + gpu.busy == p.key -> "${gpu.percent.coerceAtLeast(0)}%" + p.installed -> stringResource(R.string.gpu_installed) + else -> stringResource(R.string.common_download) + }, + enabled = gpu.busy == null, + onClick = { if (!p.active) actions.onPair(p.key) }, + ) + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + if (gpu.pairs.any { !it.suits }) FocusText(stringResource(if (showAll) R.string.gpu_hide_other else R.string.gpu_show_other), pal.signal) { showAll = !showAll } + FocusText(stringResource(R.string.comp_import_zip), pal.signal, onClick = actions.onImportZip) + } + } +} + +@Composable +private fun MixBody(single: Boolean, actions: GpuDriversActions, slotFocus: Map<String, FocusRequester>, onOpenSlot: (String, Rect) -> Unit) { + val pal = LocalPalette.current + Column(verticalArrangement = Arrangement.spacedBy(10.dp)) { + PanelTitle(stringResource(R.string.gpu_mix_title), stringResource(R.string.gpu_mix_hint)) + val at = remember { mutableMapOf<String, Rect>() } + val slotButton: @Composable (String, Int, Modifier) -> Unit = { slot, label, mod -> + SecondaryButton( + stringResource(label), + modifier = mod.focusRequester(slotFocus.getValue(slot)).onGloballyPositioned { at[slot] = it.boundsInRoot() }, + ) { onOpenSlot(slot, at[slot] ?: Rect.Zero) } + } + val buttons: @Composable (Modifier) -> Unit = { mod -> + slotButton(SLOT_DISPLAY, R.string.gpu_change_display, mod) + slotButton(SLOT_RUNTIME, R.string.gpu_change_runtime, mod) + } + if (single) Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { buttons(Modifier.fillMaxWidth()) } + else Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) { buttons(Modifier.weight(1f)) } + FocusText(stringResource(R.string.comp_import_zip), pal.signal, onClick = actions.onImportZip) + } +} + +internal const val SLOT_DISPLAY = "panel" +internal const val SLOT_RUNTIME = "rt" + +@Composable +private fun PanelHeading(text: String) { + Text(text.uppercase(), fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.5.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) +} + +@Composable +private fun PanelTitle(title: String, hint: String) { + Column(verticalArrangement = Arrangement.spacedBy(3.dp), modifier = Modifier.padding(top = 4.dp)) { + Text(title, fontSize = 18.sp, fontWeight = FontWeight.SemiBold, color = MaterialTheme.colorScheme.onBackground) + Text(hint, fontSize = 13.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + } +} + +@Composable +private fun Pill(text: String, fill: Color, ink: Color) { + if (text.isEmpty()) return + Text( + text, fontSize = 11.sp, fontWeight = FontWeight.Bold, letterSpacing = 0.8.sp, color = ink, maxLines = 1, + modifier = Modifier.clip(RoundedCornerShape(6.dp)).background(fill).padding(horizontal = 7.dp, vertical = 3.dp), + ) +} + +@Composable +private fun PanelRow( + title: String, + detail: String, + selected: Boolean, + modifier: Modifier = Modifier, + badge: String? = null, + trailing: String? = null, + enabled: Boolean = true, + onClick: (() -> Unit)?, +) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val src = remember { MutableInteractionSource() } + val hot = rememberHot(src) + val shape = RoundedCornerShape(12.dp) + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), + modifier = modifier.fillMaxWidth().heightIn(min = 56.dp).clip(shape) + .background(if (hot) pal.signal.copy(alpha = 0.14f) else if (selected) pal.signal.copy(alpha = 0.08f) else colors.surface) + .glideBorder(hot, shape, pal.signal, if (selected) pal.signal.copy(alpha = 0.7f) else pal.line) + .then( + if (onClick != null) Modifier.hoverable(src) + .clickable(interactionSource = src, indication = null, enabled = enabled, role = Role.RadioButton, onClick = onClick) + else Modifier, + ) + .padding(horizontal = 14.dp, vertical = 10.dp), + ) { + Box( + contentAlignment = Alignment.Center, + modifier = Modifier.size(20.dp).border(2.dp, if (selected) pal.signal else colors.onSurfaceVariant, CircleShape), + ) { if (selected) Box(Modifier.size(10.dp).background(pal.signal, CircleShape)) } + Column(Modifier.weight(1f)) { + Text(title, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = if (selected) pal.signal else colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + if (detail.isNotEmpty()) Text(detail, fontSize = 12.5.sp, color = colors.onSurfaceVariant, maxLines = 2, overflow = TextOverflow.Ellipsis) + } + if (badge != null) Pill(badge, pal.signal.copy(alpha = 0.16f), pal.signal) + if (trailing != null) Text(trailing, fontSize = 13.sp, color = colors.onSurfaceVariant, maxLines = 1) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/HandCameraUi.kt b/app/src/main/java/com/droiddeck/launcher/ui/HandCameraUi.kt new file mode 100644 index 0000000000..86b2aa3924 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/HandCameraUi.kt @@ -0,0 +1,346 @@ +package com.droiddeck.launcher.ui + +import android.Manifest +import android.content.Intent +import android.net.Uri +import android.provider.Settings +import android.speech.tts.TextToSpeech +import androidx.activity.compose.rememberLauncherForActivityResult +import androidx.activity.result.contract.ActivityResultContracts +import androidx.compose.foundation.Canvas +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +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.Spacer +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.selection.selectable +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.RadioButton +import androidx.compose.material3.RadioButtonDefaults +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +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.rememberUpdatedState +import androidx.compose.runtime.saveable.rememberSaveable +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.geometry.Offset +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.asImageBitmap +import androidx.compose.ui.graphics.drawscope.DrawScope +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalLifecycleOwner +import androidx.compose.ui.platform.testTag +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 androidx.compose.ui.window.Dialog +import androidx.compose.ui.window.DialogProperties +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleEventObserver +import com.droiddeck.launcher.R +import com.droiddeck.launcher.handtracking.Advice +import com.droiddeck.launcher.handtracking.BodyPose +import com.droiddeck.launcher.handtracking.HandCamera +import com.droiddeck.launcher.handtracking.HandTracking +import com.droiddeck.launcher.handtracking.Landmark +import com.droiddeck.launcher.handtracking.TrackingCameras +import kotlinx.coroutines.delay +import java.util.Locale + +@Composable +internal fun HandCameraHost(check: Boolean?, onAskPermission: () -> Unit, onPlay: () -> Unit, onClose: () -> Unit) { + if (!HandTracking.supported) return + val context = LocalContext.current + val (glasses, tracking) = rememberGlasses() + val settings by HandTracking.settings.collectAsState() + LaunchedEffect(Unit) { HandTracking.load(context) } + var prompted by rememberSaveable { mutableStateOf(false) } + if (!prompted && !glasses.usesSpatialControllers(tracking) && + HandTracking.shouldAsk(settings, glasses.present && glasses.canControl)) { + HandCameraPrompt(settings.sides, + onAllow = { side -> + prompted = true + HandTracking.allow(context, side) + if (!HandTracking.permitted(context)) onAskPermission() + }, + onNotNow = { + prompted = true + HandTracking.decline(context) + }) + } + val requests by HandTracking.checkRequests.collectAsState() + var handled by remember { mutableStateOf(requests) } + val fromSettings = requests != handled + if (check != null || fromSettings) { + PlacementCheck(settings, play = check == true && !fromSettings, + onPlay = { handled = requests; onPlay() }, + onClose = { handled = requests; onClose() }) + } +} + +@Composable +internal fun HandCameraPrompt(sides: Set<String>, onAllow: (String?) -> Unit, onNotNow: () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val choose = sides.size > 1 + var side by remember { mutableStateOf(TrackingCameras.REAR) } + AlertDialog( + onDismissRequest = onNotNow, + modifier = Modifier.testTag("hand-camera-prompt"), + title = { Text(stringResource(R.string.hand_camera_prompt_title)) }, + text = { + Column(Modifier.verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(10.dp)) { + Text(stringResource(R.string.hand_camera_prompt_body), fontSize = 14.sp) + if (choose) listOf( + Triple(TrackingCameras.REAR, R.string.hand_camera_rear, R.string.hand_camera_rear_hint), + Triple(TrackingCameras.FRONT, R.string.hand_camera_front, R.string.hand_camera_front_hint), + ).forEach { (id, label, hint) -> + Row( + verticalAlignment = Alignment.CenterVertically, + modifier = Modifier.fillMaxWidth().clip(RoundedCornerShape(8.dp)) + .selectable(side == id, role = Role.RadioButton) { side = id } + .testTag("hand-camera-$id") + .padding(vertical = 4.dp), + ) { + RadioButton(side == id, onClick = null, + colors = RadioButtonDefaults.colors(selectedColor = pal.signal, unselectedColor = colors.onSurfaceVariant)) + Column(Modifier.padding(start = 10.dp)) { + Text(stringResource(label), fontSize = 15.sp, color = colors.onBackground) + Text(stringResource(hint), fontSize = 13.sp, color = colors.onSurfaceVariant) + } + } + } + } + }, + confirmButton = { + TextButton(onClick = { onAllow(if (choose) side else null) }, modifier = Modifier.testTag("hand-camera-allow")) { + Text(stringResource(R.string.hand_camera_allow)) + } + }, + dismissButton = { + TextButton(onClick = onNotNow, modifier = Modifier.testTag("hand-camera-not-now")) { Text(stringResource(R.string.hand_camera_not_now)) } + }, + ) +} + +@Composable +internal fun HandCameraRows(host: MenuHost, track: (String) -> Modifier, inSession: Boolean) { + if (!HandTracking.supported) return + val context = LocalContext.current + val lifecycle = LocalLifecycleOwner.current.lifecycle + DisposableEffect(lifecycle) { + HandTracking.load(context) + val watch = LifecycleEventObserver { _, event -> if (event == Lifecycle.Event.ON_RESUME) HandTracking.refreshPermission(context) } + lifecycle.addObserver(watch) + onDispose { lifecycle.removeObserver(watch) } + } + val s by HandTracking.settings.collectAsState() + if (!s.usable) return + var denied by remember { mutableStateOf(false) } + val ask = rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) { granted -> + HandTracking.refreshPermission(context) + denied = !granted + } + ToggleRow(host, "hand-camera", stringResource(R.string.phone_camera_tracking_setting), stringResource(R.string.hand_camera_setting_hint), + s.enabled, chipModifier = track("hand-camera")) { on -> + HandTracking.setEnabled(context, on) + if (on && !s.permitted) ask.launch(Manifest.permission.CAMERA) + } + if (!s.enabled) return + if (s.sides.size > 1) ChoiceRow(host, "hand-camera-side", stringResource(R.string.hand_camera_choice), null, + listOf(TrackingCameras.REAR to stringResource(R.string.hand_camera_rear), TrackingCameras.FRONT to stringResource(R.string.hand_camera_front)), + s.side ?: TrackingCameras.REAR, chipModifier = track("hand-camera-side")) { HandTracking.setSide(context, it) } + when { + !s.permitted && denied -> ActionRow(stringResource(R.string.hand_camera_access), stringResource(R.string.hand_camera_access_denied), + stringResource(R.string.hand_camera_open_settings), { + context.startActivity(Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.fromParts("package", context.packageName, null)) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) + }) + !s.permitted -> ActionRow(stringResource(R.string.hand_camera_access), stringResource(R.string.hand_camera_access_hint), + stringResource(R.string.hand_camera_allow_button), { ask.launch(Manifest.permission.CAMERA) }) + !inSession -> ActionRow(stringResource(R.string.hand_camera_placement), stringResource(R.string.hand_camera_placement_hint), + stringResource(R.string.hand_camera_check), { HandTracking.requestCheck() }) + } +} + +@Composable +private fun PlacementCheck(settings: HandTracking.Settings, play: Boolean, onPlay: () -> Unit, onClose: () -> Unit) { + val context = LocalContext.current + val side = settings.side + val camera = remember(side) { HandCamera(context, null, preview = true) } + DisposableEffect(camera) { + camera.start(side) + onDispose { camera.stop() } + } + val view by camera.view.collectAsState() + val failed by camera.failed.collectAsState() + val front = view?.front ?: (TrackingCameras.pick(HandTracking.cameras(context), side)?.front == true) + val advice = when { + failed -> null + else -> view?.advice ?: Advice.STARTING + } + val adviceText = stringResource(advice?.let(::adviceLabel) ?: R.string.hand_camera_failed) + val start by rememberUpdatedState(onPlay) + if (play) LaunchedEffect(advice == Advice.GOOD) { + if (advice == Advice.GOOD) { + delay(GOOD_HOLD_MS) + start() + } + } + if (!front) SpokenAdvice(advice, adviceText) + Dialog(onDismissRequest = onClose, properties = DialogProperties(usePlatformDefaultWidth = false, decorFitsSystemWindows = false)) { + PlacementCheckContent(view, front, advice, adviceText, play, switchable = settings.sides.size > 1, + onSwitch = { HandTracking.setSide(context, if (front) TrackingCameras.REAR else TrackingCameras.FRONT) }, + onPlay = onPlay, onClose = onClose) + } +} + +@Composable +internal fun PlacementCheckContent( + view: HandCamera.View?, + front: Boolean, + advice: Advice?, + adviceText: String, + play: Boolean, + switchable: Boolean, + onSwitch: () -> Unit, + onPlay: () -> Unit, + onClose: () -> Unit, +) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + Row( + horizontalArrangement = Arrangement.spacedBy(24.dp), + modifier = Modifier.fillMaxSize().background(pal.background).padding(24.dp).testTag("hand-camera-check"), + ) { + Box(Modifier.weight(1.3f).fillMaxHeight(), contentAlignment = Alignment.Center) { CameraPreview(view) } + Column(Modifier.weight(1f).fillMaxHeight().verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(14.dp)) { + Text(stringResource(R.string.hand_camera_check_title), fontSize = 22.sp, fontWeight = FontWeight.Bold, color = colors.onBackground) + Text(stringResource(if (front) R.string.hand_camera_how_front else R.string.hand_camera_how_rear), fontSize = 15.sp, color = colors.onSurfaceVariant) + Text(adviceText, fontSize = 19.sp, fontWeight = FontWeight.SemiBold, + color = if (advice == Advice.GOOD) pal.good else colors.onBackground, modifier = Modifier.testTag("hand-camera-advice")) + Spacer(Modifier.heightIn(min = 8.dp)) + Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) { + if (switchable) SecondaryButton(stringResource(R.string.hand_camera_switch), compact = true, onClick = onSwitch) + if (play) { + SecondaryButton(stringResource(R.string.hand_camera_skip), compact = true, modifier = Modifier.testTag("hand-camera-skip"), onClick = onPlay) + SecondaryButton(stringResource(R.string.common_cancel), compact = true, onClick = onClose) + } else { + SecondaryButton(stringResource(R.string.hand_camera_done), compact = true, modifier = Modifier.testTag("hand-camera-done"), onClick = onClose) + } + } + } + } +} + +@Composable +private fun CameraPreview(view: HandCamera.View?) { + val pal = LocalPalette.current + val shape = RoundedCornerShape(16.dp) + if (view == null) { + Box(Modifier.fillMaxWidth().aspectRatio(4f / 3f).clip(shape).background(pal.surface), contentAlignment = Alignment.Center) { + CircularProgressIndicator(color = pal.signal, modifier = Modifier.size(36.dp)) + } + return + } + val image = remember(view) { view.image.asImageBitmap() } + Box(Modifier.aspectRatio(view.image.width.toFloat() / view.image.height).clip(shape)) { + Image(image, null, contentScale = ContentScale.FillBounds, + modifier = Modifier.fillMaxSize().graphicsLayer { if (view.front) scaleX = -1f }) + Canvas(Modifier.fillMaxSize()) { drawSkeleton(view.landmarks, view.front, pal.signal, pal.good) } + } +} + +private fun DrawScope.drawSkeleton(marks: List<Landmark>?, mirrored: Boolean, line: Color, hand: Color) { + if (marks == null || marks.size <= BodyPose.RIGHT_HIP) return + fun at(i: Int) = Offset((if (mirrored) 1f - marks[i].x else marks[i].x) * size.width, marks[i].y * size.height) + fun seen(i: Int) = marks[i].visibility >= BodyPose.MIN_VISIBILITY + val width = size.minDimension / 120f + for ((a, b) in BONES) if (seen(a) && seen(b)) drawLine(line, at(a), at(b), strokeWidth = width, cap = StrokeCap.Round) + for (i in JOINTS) if (seen(i)) drawCircle(line, width * 1.2f, at(i)) + for (wrist in listOf(BodyPose.LEFT_WRIST, BodyPose.RIGHT_WRIST)) { + if (!seen(wrist)) continue + val grip = (at(wrist) + at(wrist + 2) + at(wrist + 4)) / 3f + drawCircle(hand.copy(alpha = 0.35f), width * 5f, grip) + drawCircle(hand, width * 2.2f, grip) + } +} + +@Composable +private fun SpokenAdvice(advice: Advice?, text: String) { + val context = LocalContext.current + var ready by remember { mutableStateOf(false) } + val speech = remember { + var engine: TextToSpeech? = null + engine = TextToSpeech(context.applicationContext) { status -> + if (status == TextToSpeech.SUCCESS) { + engine?.language = Locale.getDefault() + ready = true + } + } + engine + } + DisposableEffect(speech) { onDispose { speech.shutdown() } } + LaunchedEffect(advice, ready) { + if (!ready || advice == null || advice == Advice.STARTING) return@LaunchedEffect + delay(SPEAK_AFTER_MS) + while (true) { + speech.speak(text, TextToSpeech.QUEUE_FLUSH, null, "hand-camera") + if (advice == Advice.GOOD) break + delay(SPEAK_AGAIN_MS) + } + } +} + +private fun adviceLabel(advice: Advice): Int = when (advice) { + Advice.STARTING -> R.string.hand_camera_starting + Advice.STAND_UP -> R.string.hand_camera_stand_up + Advice.UPRIGHT -> R.string.hand_camera_upright + Advice.NOT_SEEN -> R.string.hand_camera_not_seen + Advice.MOVE_BACK -> R.string.hand_camera_move_back + Advice.MOVE_CLOSER -> R.string.hand_camera_move_closer + Advice.SHOW_HANDS -> R.string.hand_camera_show_hands + Advice.GOOD -> R.string.hand_camera_good +} + +private val BONES = listOf( + BodyPose.LEFT_SHOULDER to BodyPose.RIGHT_SHOULDER, + BodyPose.LEFT_SHOULDER to BodyPose.LEFT_ELBOW, BodyPose.LEFT_ELBOW to BodyPose.LEFT_WRIST, + BodyPose.RIGHT_SHOULDER to BodyPose.RIGHT_ELBOW, BodyPose.RIGHT_ELBOW to BodyPose.RIGHT_WRIST, + BodyPose.LEFT_SHOULDER to BodyPose.LEFT_HIP, BodyPose.RIGHT_SHOULDER to BodyPose.RIGHT_HIP, BodyPose.LEFT_HIP to BodyPose.RIGHT_HIP, + BodyPose.NOSE to BodyPose.LEFT_EYE, BodyPose.NOSE to BodyPose.RIGHT_EYE, + BodyPose.LEFT_EYE to BodyPose.LEFT_EAR, BodyPose.RIGHT_EYE to BodyPose.RIGHT_EAR, +) +private val JOINTS = listOf(BodyPose.NOSE, BodyPose.LEFT_SHOULDER, BodyPose.RIGHT_SHOULDER, BodyPose.LEFT_ELBOW, BodyPose.RIGHT_ELBOW, + BodyPose.LEFT_HIP, BodyPose.RIGHT_HIP) +private const val GOOD_HOLD_MS = 1200L +private const val SPEAK_AFTER_MS = 1200L +private const val SPEAK_AGAIN_MS = 6000L diff --git a/app/src/main/java/com/droiddeck/launcher/ui/Hop.kt b/app/src/main/java/com/droiddeck/launcher/ui/Hop.kt index a5ee4c8f2d..8260bf40e8 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/Hop.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/Hop.kt @@ -29,17 +29,6 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.droiddeck.launcher.R -// A link from a control in one section to a page in another (the Play sheet's Graphics drivers, -// a game's Components card): the control squashes into a dot that flies to the destination's rail -// item, the rail's selection glides there as it passes the top of its arc, and the page floods -// out of the rail item once it lands. B on that page flies the dot back and puts the source -// surface back as it was, focus on the control that asked. - -/** - * Where a hop came from: the rail item that was showing ([rail]), the surface on it (a sheet, the - * Games page) and its tab, the control's key and its root bounds, and the words for the way back. - * [page] is the page key the hop opened, so leaving it any other way forgets the way back. - */ internal class HopOrigin( val rail: String, val surface: String, @@ -51,46 +40,29 @@ internal class HopOrigin( val page: String, ) -/** The surfaces a hop can start from and come back to. */ internal const val HOP_SURFACE_GAMES = "games" internal const val HOP_SURFACE_DESKTOP = "desktop" internal const val HOP_SURFACE_SHEET = "sheet" internal object Hops { - /** The hop the page on screen was reached by, while B can still undo it. */ var origin by mutableStateOf<HopOrigin?>(null) - /** The pane content a hop is leaving (a rail key): it sinks back as the dot leaves it. */ var sinking by mutableStateOf<String?>(null) - /** Set while a hop's dot is flying: the rail item its selection has already glided to. */ var railPreview by mutableStateOf<String?>(null) - /** - * Set as a page leaves through a hop (either way), so the pane sinks it rather than draining - * it; the pane clears it once the change has started. - */ var linking by mutableStateOf(false) - /** A surface to put back as it was (a sheet re-lifted on its tab), once, and the control to focus. */ var restore by mutableStateOf<HopOrigin?>(null) - /** Per rail item, bumped when a dot lands on it: the item pops. */ val railLanded = mutableStateMapOf<String, Int>() - /** Bumped when a hop's page has flooded in: its target (a layer card) sends out one ring. */ var arrived by mutableIntStateOf(0) - /** Where each rail item sits, root px. */ val railBounds = HashMap<String, Rect>() - /** Where each control that can start a hop sits, root px. */ val sources = HashMap<String, Rect>() - /** - * Hops from the control at [origin].bounds to [origin].dest: [go] opens the page there once the dot lands. - * With animations off there is no dot and no flood, only the page. - */ fun go(origin: HopOrigin, go: () -> Unit) { val railAt = railBounds[origin.dest] val finish: () -> Unit = { @@ -103,7 +75,6 @@ internal object Hops { arrived++ } if (railAt == null || Motion.scale == 0f) { finish(); return } - // The surface the control is on sinks as its dot leaves, and stays down as it goes. sinking = origin.rail Flights.fly(Flight( origin.bounds, to = { railAt.center }, @@ -112,10 +83,6 @@ internal object Hops { )) } - /** - * B on a page reached by a hop: the page sinks, the source surface comes back as it was, and - * the dot flies home from the rail item to the control. False when there is no hop to undo. - */ fun back(close: () -> Unit): Boolean { val o = origin ?: return false origin = null @@ -133,26 +100,18 @@ internal object Hops { return true } - /** The page the hop opened has gone some other way: there is no way back to keep. */ fun forget(pageKey: String?) { val o = origin ?: return if (pageKey != o.page) { origin = null; sinking = null } } - /** Screen density, for the rail item's corner; set by the front end. */ var density = 1f } -/** Shows a rail section directly (no page closing, nothing forgotten): what a hop's way back calls. */ internal val LocalShowSection = androidx.compose.runtime.staticCompositionLocalOf<(String) -> Unit> { {} } -/** Remembers where this control sits, so a hop from it can fly from it and back to it. */ internal fun Modifier.hopSource(key: String): Modifier = onGloballyPositioned { Hops.sources[key] = it.boundsInRoot() } -/** - * "B · back to <source>" at the right of a page's header while it was reached by a hop; a tap is B. - * Nothing when it was not. - */ @Composable internal fun HopBackChip(onBack: () -> Unit) { val o = Hops.origin ?: return diff --git a/app/src/main/java/com/droiddeck/launcher/ui/LaunchFlood.kt b/app/src/main/java/com/droiddeck/launcher/ui/LaunchFlood.kt index 1ede5c0084..0f912aa7af 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/LaunchFlood.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/LaunchFlood.kt @@ -44,25 +44,15 @@ import java.lang.ref.WeakReference import kotlin.math.PI import kotlin.math.sin -// Starting a session from a blue button: the button grows until the page is its blue, and the -// loading screen opens on that blue and gathers it into the ball of the throbber. -// Stopping one from the drawer runs it the other way: Stop grows until the page is blue, and the -// front end opens on that blue and draws it back down into the button the session came from. -// Any other way out (backing out of the loading screen, closing the ended screen, the session -// ending) spreads the blue back out of the throbber's ball instead (FloodSpread). -/** Carries the flood's colour to the session, which opens on it. */ const val EXTRA_FLOOD = "com.droiddeck.launcher.FLOOD" -/** Where the last pressed blue button sat, so a session started by it can grow out of it. */ internal object LaunchOrigin { private var bounds: Rect? = null private var button: Any? = null private var at = 0L - /** The last button a session was started from, for a stop to return into. */ private var last: WeakReference<Any>? = null - /** The button a flood is growing out of: it steps aside so only the flood shows. */ var flooding by mutableStateOf<Any?>(null) fun mark(r: Rect, key: Any) { @@ -72,10 +62,6 @@ internal object LaunchOrigin { at = SystemClock.uptimeMillis() } - /** - * Where the button the running session was started from sits now, if it is still on screen; - * it hides for the return, as for the flood. - */ fun takeReturn(): Rect? { val key = last?.get() as? Array<*> ?: return null val c = key.getOrNull(0) as? LayoutCoordinates ?: return null @@ -84,7 +70,6 @@ internal object LaunchOrigin { return c.boundsInRoot() } - /** The button behind a launch starting now, if one was pressed just before; it hides for the flood. */ fun take(): Rect? { val b = bounds?.takeIf { SystemClock.uptimeMillis() - at < 1_500 } if (b != null) flooding = button @@ -94,7 +79,6 @@ internal object LaunchOrigin { } } -/** A session stopped behind a flood: the blue the front end opens on, for a few seconds. */ internal object QuitFlood { private var color: Int? = null private var at = 0L @@ -111,7 +95,6 @@ internal object QuitFlood { } } -/** The page a flood grows over, sinking back a touch as it is covered; [progress] is the flood's. */ @Composable internal fun FloodBehind(progress: () -> Float, content: @Composable () -> Unit) { Box(Modifier.fillMaxSize().graphicsLayer { val k = sinkScale(progress()); scaleX = k; scaleY = k }) { content() } @@ -121,19 +104,10 @@ private fun sinkScale(progress: Float) = 1f - 0.04f * progress private val Gather = CubicBezierEasing(0.6f, 0f, 0.15f, 1f) -/** - * The pressed button, [from] in root px, stretching out to cover the page. Each edge rides its own - * loose spring: the ones with furthest to go set off first and quickest, the ones near the page's - * edge lag and then snap after them, so it pulls like something elastic rather than zooming. It - * goes blobby in flight, its gradient settles into the flat blue of the ball, and [onProgress] - * (0 to 1) lets the page behind sink a little. Calls [onCovered] once nothing but blue shows. - * Swallows touches while it runs. - */ @Composable internal fun LaunchFlood( from: Rect, onProgress: (Float) -> Unit, - /** The button's own colours, where it is not the page's blue one (a red Stop). */ fromColors: Pair<Color, Color>? = null, cornerAtRest: Dp = 12.dp, onCovered: () -> Unit, @@ -142,10 +116,6 @@ internal fun LaunchFlood( val pal = LocalPalette.current val start = fromColors ?: (colors.primary to pal.primary2) VeilRing() - // Left, top, right, bottom: 0 on the button, 1 on the page's edge. Springs overshoot past the - // edge, off the page, so the wobble is felt in the pull. An underdamped spring then swings back - // short of the edge (about 3% at this damping), so once an edge has reached the page's it holds - // there, or the page would show through in a sliver while the next screen opens. val edges = remember { List(4) { Animatable(0f) } } val reached = remember { BooleanArray(4) } fun edge(i: Int) = edges[i].value.let { if (reached[i]) maxOf(it, 1f) else it } @@ -174,7 +144,6 @@ internal fun LaunchFlood( } } } - // Covered once every edge has reached the page's. snapshotFlow { (0 until 4).all { edge(it) >= 1f } }.first { it } covered() runs.forEach { it.join() } @@ -185,15 +154,9 @@ internal fun LaunchFlood( } } -/** - * The flood from a button at [from] with its edges [v] of the way to the page's (left, top, right, - * bottom): the button sinking with the page behind, blobby in flight, its colours [start] giving - * way to the flat [signal] in the first half. - */ private fun DrawScope.drawFlood(from: Rect, v: List<Float>, start: Pair<Color, Color>, signal: Color, cornerAtRest: Float) { val (l, t, r, b) = v val mean = v.sumOf { it.coerceIn(0f, 1f).toDouble() }.toFloat() / 4f - // The button sinks with the page behind (FloodBehind), so the flood leaves from where it is now. val k = sinkScale(mean) val cx = size.width / 2f val cy = size.height / 2f @@ -203,10 +166,8 @@ private fun DrawScope.drawFlood(from: Rect, v: List<Float>, start: Pair<Color, C val bottom = lerp(cy + (from.bottom - cy) * k, size.height, b) val w = (right - left).coerceAtLeast(0f) val h = (bottom - top).coerceAtLeast(0f) - // A button's corners at rest, a blob in flight, square once it fills the page. val blob = sin(PI * mean).toFloat().coerceAtLeast(0f) val corner = lerp(cornerAtRest * (1f - mean), minOf(w, h) * 0.42f, blob) - // The button's gradient gives way to the ball's flat blue in the first half. val mix = (mean * 2f).coerceAtMost(1f) val brush = Brush.linearGradient( listOf(lerp(start.first, signal, mix), lerp(start.second, signal, mix)), @@ -215,12 +176,6 @@ private fun DrawScope.drawFlood(from: Rect, v: List<Float>, start: Pair<Color, C drawRoundRect(brush, topLeft = Offset(left, top), size = Size(w, h), cornerRadius = CornerRadius(corner)) } -/** - * The front end's first frames after a stop: the page in [flood] after a beat, drawn back down - * into the button at [to] (root px, measured before the page sank) on critically damped springs, - * the far edges first, so it sets down on the button without a bounce. [onProgress] (1 to 0) lets - * the page behind rise back. No button to return to: the blue fades. Calls [onLanded] at the end. - */ @Composable internal fun FloodReturn(flood: Color, to: Rect?, onProgress: (Float) -> Unit, onLanded: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -234,7 +189,6 @@ internal fun FloodReturn(flood: Color, to: Rect?, onProgress: (Float) -> Unit, o LaunchedEffect(page != Size.Zero) { if (page == Size.Zero) return@LaunchedEffect progress(1f) - // A beat of plain blue first, so the change of screen does not read as a cut. delay(Motion.ms(220).toLong()) if (to == null || Motion.scale == 0f) { fade.animateTo(0f, Motion.tw(240, easing = FastOutSlowInEasing)) @@ -262,10 +216,6 @@ internal fun FloodReturn(flood: Color, to: Rect?, onProgress: (Float) -> Unit, o } } -/** - * The session's first frames: the page in [flood], drawing in to a circle over [ball] (centre and - * radius in root px, once the throbber is laid out) that lands the size of it. Calls [onLanded] then. - */ @Composable internal fun FloodGather(flood: Color, ball: Pair<Offset, Float>?, onLanded: () -> Unit) { val gather = remember { Animatable(0f) } @@ -275,7 +225,6 @@ internal fun FloodGather(flood: Color, ball: Pair<Offset, Float>?, onLanded: () LaunchedEffect(ball != null) { if (ball == null || started) return@LaunchedEffect started = true - // A beat of plain blue first, so the change of screen does not read as a cut. delay(Motion.ms(90).toLong()) gather.animateTo(1f, Motion.tw(640, easing = Gather)) landed() @@ -292,18 +241,12 @@ internal fun FloodGather(flood: Color, ball: Pair<Offset, Float>?, onLanded: () } } -/** Where the loading screen's throbber ball sits now (centre and radius, root px), for a flood leaving from it. */ internal object ThrobberSpot { var ball: Pair<Offset, Float>? = null } private val Spread = CubicBezierEasing(0.7f, 0f, 0.4f, 1f) -/** - * Leaving a session: [flood] spreading out of [ball] (centre and radius in root px; the middle of - * the screen when there is none) until it covers the screen, the way FloodGather drew it in. Calls - * [onCovered] then, for the front end to open on the same blue. Swallows touches while it runs. - */ @Composable internal fun FloodSpread(flood: Color, ball: Pair<Offset, Float>?, onCovered: () -> Unit) { VeilRing() diff --git a/app/src/main/java/com/droiddeck/launcher/ui/Layout.kt b/app/src/main/java/com/droiddeck/launcher/ui/Layout.kt index 3ddef26c31..9777ee83b2 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/Layout.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/Layout.kt @@ -5,16 +5,11 @@ import androidx.compose.runtime.compositionLocalOf import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.unit.dp -// Sizes that decide how the launcher reflows on 4:3 and square screens (480x360 or 480x480 dp) as -// well as on the 16:9 ones it was first laid out for. -/** A page narrower than this reflows: settings rows stack, grids drop columns, posters go. */ val NarrowPaneWidth = 520.dp -/** Whether the page being drawn is narrow - the pane beside the rail on a 4:3 or square screen. */ val LocalNarrowPane = compositionLocalOf { false } -/** Too narrow a screen for a labelled rail: the rail shows icons only. */ @Composable internal fun isNarrowScreen(): Boolean = LocalConfiguration.current.screenWidthDp < 600 diff --git a/app/src/main/java/com/droiddeck/launcher/ui/LiftSheet.kt b/app/src/main/java/com/droiddeck/launcher/ui/LiftSheet.kt index 60667ee922..01240610dd 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/LiftSheet.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/LiftSheet.kt @@ -23,6 +23,7 @@ import androidx.compose.foundation.interaction.collectIsHoveredAsState import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.BoxWithConstraintsScope import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -37,10 +38,15 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.horizontalScroll +import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Close +import androidx.compose.material.icons.filled.KeyboardArrowDown import androidx.compose.material.icons.filled.KeyboardArrowUp +import androidx.compose.ui.platform.testTag +import kotlinx.coroutines.Job import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text @@ -48,6 +54,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.compositionLocalOf import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateMapOf import androidx.compose.runtime.mutableStateOf @@ -77,6 +84,7 @@ import androidx.compose.ui.geometry.RoundRect import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Path import androidx.compose.ui.graphics.drawscope.Stroke +import androidx.compose.ui.graphics.drawscope.scale import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.graphics.lerp import androidx.compose.ui.input.InputMode @@ -98,6 +106,7 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.isSpecified import androidx.compose.ui.unit.sp import androidx.compose.ui.util.lerp import com.droiddeck.launcher.R @@ -106,14 +115,7 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.launch import kotlin.math.roundToInt -// Play's settings, lifted out from under Play instead of opened on a page of their own. At rest a -// lip tucks out under Play and says what it will do. Down (or a pull up, or a tap on the lip) -// stretches the lip, the wall sinks back, and a sheet rises from the pane's foot with Play riding -// its top edge as the handle - StepOut's move, with the pane for a box. B, Up from the chips or a -// tap above folds it away; A on Play launches straight from it, the sheet folding into the pill -// before the launch flood. Open desktop does the same with the desktop's settings. -/** The sheets' tabs (their chips), by id. */ internal object SheetTab { const val DISPLAY = "display" const val CONTROLS = "controls" @@ -124,33 +126,32 @@ internal object SheetTab { const val FILES = "files" } -/** - * Where the open sheet's top edge sits in a pane [paneH] tall (px), for a button [buttonH] tall - * riding it: 82dp down a 360dp pane, the same share of any other, and never so high that the - * button's top comes closer than [minAbove] to the pane's. [ride] is how far below the edge the - * button's centre sits. - */ internal fun sheetTop(paneH: Float, buttonH: Float, minAbove: Float, ride: Float): Float = - maxOf(paneH * 82f / 360f, minAbove + buttonH / 2f - ride) + maxOf(paneH * 60f / 360f, minAbove + buttonH / 2f - ride) -/** A finger's hold on the sheet: where it started (0 rest, 1 open), where it is, whether it has it. */ private class SheetDrag { var from = 0f var progress = 0f var engaged = false } -/** One piece of the sheet's rows fades and rises in on its own beat (a settings group asks for its index). */ internal class SheetBeat(private val pieces: List<Animatable<Float, AnimationVector1D>>) { private var next = 1 fun take(): Int = next++ fun value(i: Int): Float = pieces[i.coerceIn(0, pieces.lastIndex)].value } -/** The sheet whose rows are being laid out, so each settings group can take its beat. */ internal val LocalSheetBeat = staticCompositionLocalOf<SheetBeat?> { null } -/** A settings group's piece of the sheet's entrance; nothing outside a sheet. */ +internal val LocalSheetChipWidth = compositionLocalOf { Dp.Unspecified } + +internal val LocalPlayRect = compositionLocalOf<Rect?> { null } + +private val ChipGap = 6.dp + +internal fun sheetChipWidth(row: Dp, count: Int): Dp = + if (count > 0 && row / count >= 96.dp) (row - ChipGap * (count - 1)) / count else 0.dp + @Composable internal fun Modifier.sheetPiece(): Modifier { val beat = LocalSheetBeat.current ?: return this @@ -168,13 +169,6 @@ private val ChipsTop = 14.dp private val RowsTop = 54.dp private const val PIECES = 12 -/** - * A hero with one big button and the sheet that lifts out from under it. [key] names the sheet - * (a hop comes back to it, the lip remembers what it said); [tabs] are its chips (id to label) and - * [rows] what each holds. [background] sinks and [words] fade as it opens. [button] draws the - * button itself with the click it should make; [onPrimary] is what that click does once the - * sheet is out of the way. [onOpen] reads the settings the rows show. - */ @OptIn(ExperimentalComposeUiApi::class, androidx.compose.animation.ExperimentalAnimationApi::class) @Composable internal fun LiftHero( @@ -183,29 +177,18 @@ internal fun LiftHero( onOpen: () -> Unit, onPrimary: () -> Unit, background: @Composable () -> Unit, - /** - * Drawn over [background] at the pane's own size: the wall's fades, which must not sink with - * it. Given how far the sheet is up (0 to 1), for anything there that should give way to it. - */ scrim: @Composable (lifted: () -> Float) -> Unit = {}, words: @Composable () -> Unit, - /** - * Buttons beside the big one (Desktop's Flathub and +). They stay where they are and fade as - * the sheet lifts: only the big button rides it. - */ beside: @Composable () -> Unit = {}, button: @Composable (onClick: () -> Unit) -> Unit, rows: @Composable (tab: String) -> Unit, modifier: Modifier = Modifier, - /** - * Down on the button lifts the sheet (Play). False: Down goes to the lip, which A lifts, and Down - * from the lip goes on past it to what is under the hero (Desktop's shelves). - */ downOpens: Boolean = true, - /** Told when the sheet starts to lift (true) and once it has gone (false). */ onOpenChange: (Boolean) -> Unit = {}, start: Dp = 44.dp, bottom: Dp = 44.dp, + drop: DropSheetState? = null, + overlay: @Composable BoxWithConstraintsScope.(lifted: () -> Float) -> Unit = {}, ) { val density = LocalDensity.current val inputMode = LocalInputModeManager.current @@ -213,7 +196,6 @@ internal fun LiftHero( val pal = LocalPalette.current val ff = LocalFrontFocus.current val narrow = LocalNarrowPane.current - // Held as states too, so the sheet's focus rule reads what they are now, not at the last composition. val openState = remember { mutableStateOf(false) } var open by openState var shown by remember { mutableStateOf(false) } @@ -221,13 +203,11 @@ internal fun LiftHero( var launching by launchingState var tab by remember { mutableStateOf(0) } var travel by remember { mutableStateOf(1) } - // The control to focus once a sheet put back by a hop's B has lifted, instead of the first chip. var focusOnLift by remember { mutableStateOf<String?>(null) } - // Set as the sheet closes and Play lands: the lip may come back before the sheet has quite gone. var lipBack by remember { mutableStateOf(false) } - // Set as a finger's drag lets go: the sheet is already where it is going. var dragSettled by remember { mutableStateOf(false) } val scope = androidx.compose.runtime.rememberCoroutineScope() + var dragJob by remember { mutableStateOf<Job?>(null) } val onOpenNow = rememberUpdatedState(onOpen) val pull = remember { Animatable(0f) } val sink = remember { Animatable(0f) } @@ -243,16 +223,15 @@ internal fun LiftHero( val playSrc = remember { MutableInteractionSource() } val playHovered by playSrc.collectIsHoveredAsState() var playFocused by remember { mutableStateOf(false) } + val leftForPlay = remember { booleanArrayOf(false) } var heroAt by remember { mutableStateOf(Offset.Zero) } var rest by remember { mutableStateOf<Rect?>(null) } fun focusPlay() { if (ff != null && inputMode.inputMode == InputMode.Keyboard) runCatching { ff.primary.requestFocus() } } fun close() { if (!open) return - // Focus leaves the rows before they go; the sheet lets it go once it is closing. open = false focusPlay() } - // Back from a hop the sheet started (or a page it opened): put it back as it was. LaunchedEffect(Unit) { val r = Hops.restore ?: return@LaunchedEffect if (r.surface != HOP_SURFACE_SHEET || r.rail != key) return@LaunchedEffect @@ -261,7 +240,6 @@ internal fun LiftHero( focusOnLift = r.control open = true } - // Launched: the session covers the screen, and the sheet is put away under it. val lifecycle = androidx.compose.ui.platform.LocalLifecycleOwner.current.lifecycle DisposableEffect(lifecycle) { val obs = androidx.lifecycle.LifecycleEventObserver { _, e -> @@ -273,8 +251,8 @@ internal fun LiftHero( onDispose { lifecycle.removeObserver(obs) } } LaunchedEffect(open, launching) { + if (!dragSettled) { dragJob?.cancel(); dragJob = null } if (dragSettled) { - // A finger brought it here and has already animated it: only what opening needs. dragSettled = false if (open) { if (inputMode.inputMode == InputMode.Keyboard) { withFrameNanos { }; runCatching { chipFocus[tab].requestFocus() } } @@ -287,10 +265,8 @@ internal fun LiftHero( onOpen() fold.snapTo(0f); foldTop.snapTo(0f) coroutineScope { - // Pull: the lip stretches down as the wall sinks back and dims. launch { pull.animateTo(24f, Motion.sp(0.7f, 380f)) } launch { sink.animateTo(1f, Motion.tw(260)) } - // Lift: the sheet rises with Play riding its top edge; the lip lets go. launch { delay(Motion.ms(120).toLong()) launch { lipGone.animateTo(1f, Motion.tw(140)) } @@ -299,7 +275,6 @@ internal fun LiftHero( launch { ride.animateTo(1f, Motion.sp(0.7f, 380f)) } launch { hot.snapTo(1f); delay(Motion.ms(100).toLong()); hot.animateTo(0f, Motion.tw(200)) } } - // Each piece on its beat from the Lift, as the reel has it: 260ms + 55ms a piece after it starts. pieces.forEachIndexed { i, p -> launch { delay(Motion.ms(120 + 260 + i * 55).toLong()); p.animateTo(1f, Motion.tw(220)) } } if (inputMode.inputMode == InputMode.Keyboard) launch { val control = focusOnLift @@ -311,7 +286,6 @@ internal fun LiftHero( } } } else if (launching) { - // Play from the sheet: the rows go, the sheet folds into the pill, then the launch. coroutineScope { pieces.forEach { launch { it.animateTo(0f, Motion.tw(90)) } } launch { delay(Motion.ms(60).toLong()); fold.animateTo(1f, Motion.sp(1f, 420f)) } @@ -319,8 +293,6 @@ internal fun LiftHero( } shown = false onPrimary() - // The session covers the screen and the sheet is put away under it (ON_STOP). If - // nothing started, put it away anyway. delay(3_000) launching = false } else if (shown) { @@ -329,7 +301,6 @@ internal fun LiftHero( launch { delay(Motion.ms(60).toLong()); lift.animateTo(0f, Motion.sp(1f, 380f)) } launch { delay(Motion.ms(100).toLong()); ride.animateTo(0f, Motion.sp(0.55f, 300f)) } launch { sink.animateTo(0f, Motion.tw(300)) } - // The lip tucks back under Play as it lands, not once every spring has settled. launch { delay(Motion.ms(420).toLong()); lipGone.snapTo(0f); lipBack = true } } shown = false @@ -337,25 +308,23 @@ internal fun LiftHero( lipGone.snapTo(0f) hot.snapTo(1f) } else { - // Snapped shut under a session: everything back at rest, no animation. listOf(pull, sink, lift, ride, lipGone, fold, foldTop).forEach { it.snapTo(0f) } pieces.forEach { it.snapTo(0f) } hot.snapTo(1f) } } BackHandler(enabled = open && !launching) { close() } + if (ride.isRunning || (shown && !open)) VeilRing() val openNow = open || shown LaunchedEffect(openNow) { onOpenChange(openNow) } - // The lip: there while Play has a pad or a pointer on it, or always with touch alone. val touchOnly = inputMode.inputMode == InputMode.Touch val lipFocus = remember { FocusRequester() } val settingsLabel = stringResource(R.string.drawer_page_settings) var lipFocused by remember { mutableStateOf(false) } - val lipWanted = !open && (!shown || lipBack) && (playFocused || playHovered || touchOnly || lipFocused) + val lipWanted = !open && (!shown || lipBack) && (playFocused || playHovered || touchOnly || lipFocused) && drop?.let { it.open || it.shown } != true LaunchedEffect(lipWanted) { if (lipWanted) { - // Back from the sheet it comes straight away; otherwise a beat after Play has focus. if (!lipBack) delay(Motion.ms(160).toLong()) lipShow.animateTo(1f, Motion.tw(220)) } else { @@ -364,10 +333,8 @@ internal fun LiftHero( } } - // How far the sheet travels, for a finger's drag to follow: set once the hero is measured. val travelPx = remember { floatArrayOf(1f) } val drag = remember { SheetDrag() } - /** The sheet [p] of the way up (0 at rest, 1 open) under a finger. */ fun follow(p: Float) { drag.progress = p scope.launch { @@ -376,8 +343,9 @@ internal fun LiftHero( pieces.forEach { it.snapTo(p.coerceIn(0f, 1f)) } } } - /** A finger takes the sheet where it is: up from rest, or down from open. */ fun beginDrag() { + dragJob?.cancel(); dragJob = null + dragSettled = false drag.engaged = true drag.from = if (open) 1f else 0f drag.progress = drag.from @@ -387,10 +355,6 @@ internal fun LiftHero( onOpenNow.value() } } - /** - * The finger lets go with [v] px/s (up negative): a flick goes the way it was flicked; a slow - * drag stays once it is a third of the way from where it started. - */ fun settleDrag(v: Float) { drag.engaged = false val flick = with(density) { 600.dp.toPx() } @@ -401,7 +365,8 @@ internal fun LiftHero( else -> drag.progress > 0.3f } dragSettled = true - scope.launch { + dragJob?.cancel() + dragJob = scope.launch { val to = if (opens) 1f else 0f coroutineScope { launch { lift.animateTo(to, Motion.sp(if (opens) 0.7f else 1f, 380f)) } @@ -413,8 +378,6 @@ internal fun LiftHero( } if (open != opens) open = opens else dragSettled = false } - // Pulled down past the top of the rows, the sheet itself comes down with the finger; up again - // before letting go, it goes back up before the rows scroll. val rowsPull = remember { object : androidx.compose.ui.input.nestedscroll.NestedScrollConnection { override fun onPreScroll(available: Offset, source: androidx.compose.ui.input.nestedscroll.NestedScrollSource): Offset { @@ -438,22 +401,35 @@ internal fun LiftHero( } BoxWithConstraints( modifier.fillMaxSize().onGloballyPositioned { heroAt = it.boundsInRoot().topLeft } - // A swipe anywhere on the hero moves the sheet under the finger - up from rest, down - // when open - and lets go open or shut by how far it went and how fast. A swipe that - // starts the wrong way (down at rest) is left alone, for the page under it. - .pointerInput(Unit) { + .pointerInput(drop) { val tracker = androidx.compose.ui.input.pointer.util.VelocityTracker() var decided = false + val dropFlick = 600.dp.toPx() detectVerticalDragGestures( onDragStart = { tracker.resetTracking(); decided = false; drag.engaged = false }, - onDragEnd = { if (drag.engaged) settleDrag(tracker.calculateVelocity().y) }, - onDragCancel = { if (drag.engaged) settleDrag(0f) }, + onDragEnd = { + if (drag.engaged) settleDrag(tracker.calculateVelocity().y) + else if (drop?.engaged == true) drop.settle(tracker.calculateVelocity().y, dropFlick) + }, + onDragCancel = { + if (drag.engaged) settleDrag(0f) + else if (drop?.engaged == true) drop.settle(0f, dropFlick) + }, ) { change, amount -> if (launching) return@detectVerticalDragGestures if (!decided) { decided = true - // Up at rest opens; down when open closes. Anything else is not for the sheet. - if (if (open) amount > 0f else amount < 0f) beginDrag() + when { + drop != null && (drop.open || drop.shown) -> if (drop.open && amount < 0f) drop.beginDrag() + open || shown || amount < 0f -> if (if (open) amount > 0f else amount < 0f) beginDrag() + drop != null && amount > 0f -> drop.beginDrag() + } + } + if (drop?.engaged == true) { + change.consume() + tracker.addPosition(change.uptimeMillis, change.position) + drop.drag(amount) + return@detectVerticalDragGestures } if (!drag.engaged) return@detectVerticalDragGestures change.consume() @@ -468,17 +444,18 @@ internal fun LiftHero( val restRect = rest?.translate(-heroAt) val buttonH = restRect?.height ?: with(density) { 56.dp.toPx() } val openTop = sheetTop(h, buttonH, with(density) { 16.dp.toPx() }, with(density) { 3.dp.toPx() }) - // Play's raised place: its centre 3dp under the sheet's edge, same left inset. val raise = restRect?.let { (openTop + with(density) { 3.dp.toPx() } - buttonH / 2f) - it.top } ?: 0f travelPx[0] = (h - openTop).coerceAtLeast(1f) + val pill = restRect?.translate(0f, raise) + val chipsX = with(density) { + if (narrow || pill == null) 16.dp.toPx() else pill.right + 20.dp.toPx() - inset + } + val chipWidth = with(density) { sheetChipWidth((w - 2 * inset - chipsX - 64.dp.toPx()).coerceAtLeast(0f).toDp(), tabs.size) } - // The wall behind sinks back about the pane's centre. val foot = h - Box(Modifier.fillMaxSize().clipToBounds().graphicsLayer { val k = 1f - 0.05f * sink.value; scaleX = k; scaleY = k }) { background() } - // The fades stay put: scaled with the wall they stopped short of the pane's edges and left - // a bright band of unfaded wall down the side and along the top. + val wallSink = { maxOf(sink.value, drop?.sink?.value ?: 0f) } + Box(Modifier.fillMaxSize().clipToBounds().graphicsLayer { val k = 1f - 0.05f * wallSink(); scaleX = k; scaleY = k }) { background() } scrim { sink.value } - // The dim; a tap on it (above the sheet) folds the sheet away. if (shown || open) Box( Modifier.fillMaxSize() .graphicsLayer { alpha = sink.value }.background(Color.Black.copy(alpha = 0.42f)) @@ -486,7 +463,6 @@ internal fun LiftHero( .clickable(interactionSource = remember { MutableInteractionSource() }, indication = null, enabled = open && !launching) { close() }, ) - // The sheet: inset at the sides, rounded at the top, no bottom edge - the pane's foot is its foot. if (shown) { val top = lerp(foot, openTop, lift.value) val sheetLeft = inset @@ -495,7 +471,6 @@ internal fun LiftHero( val rimPath = remember { Path() } val corner = with(density) { SheetCorner.toPx() } val rim = with(density) { 1.4.dp.toPx() } - val pill = restRect?.translate(0f, raise) Canvas(Modifier.fillMaxSize()) { val f = fold.value val ft = foldTop.value @@ -512,7 +487,6 @@ internal fun LiftHero( val rimColor = pal.signal.copy(alpha = lerp(0.55f, 0.9f, hot.value)) if (ft > 0f) drawPath(path, rimColor, style = Stroke(rim)) else { - // Sides and top only: the sheet runs on under the pane's foot. rimPath.reset() rimPath.moveTo(l, b) rimPath.lineTo(l, t + c) @@ -523,40 +497,28 @@ internal fun LiftHero( drawPath(rimPath, rimColor, style = Stroke(rim)) } } - // What the sheet holds: the chips to the right of Play, the rows under them. - val chipsX = with(density) { - if (narrow || pill == null) 16.dp.toPx() else pill.right + 20.dp.toPx() - sheetLeft - } val chipsY = with(density) { if (narrow && pill != null) (pill.bottom - openTop) + 10.dp.toPx() else ChipsTop.toPx() } - // The rows start under the chips, which are 44dp to touch: from 54dp they ran under the - // chips' feet and, scrolled, covered them. val rowsY = with(density) { maxOf(RowsTop.toPx(), chipsY + 52.dp.toPx()) } val sheetW = sheetRight - sheetLeft Box( Modifier .offset { IntOffset(sheetLeft.roundToInt(), top.roundToInt()) } .size(with(density) { sheetW.toDp() }, with(density) { (foot - openTop).coerceAtLeast(0f).toDp() }) - // Touches on the sheet stay on it; none reach the dim behind. .pointerInput(Unit) { detectTapGestures { } } .controllerBack { close() } .bumpers( - // LB / RB: focus goes to the new tab's chip, so a pad on a row (which goes with - // its tab) is never left with nothing. onPrevious = { if (tab > 0) { travel = -1; tab--; runCatching { chipFocus[tab].requestFocus() } } }, onNext = { if (tab < tabs.lastIndex) { travel = 1; tab++; runCatching { chipFocus[tab].requestFocus() } } }, ) - // A pad stays in the sheet until it folds; Left from it reaches Play, the handle. - .focusProperties { exit = { dir -> if (!openState.value || launchingState.value) FocusRequester.Default else if (dir == FocusDirection.Left && ff != null) ff.primary else FocusRequester.Cancel } } + .focusProperties { exit = { dir -> if (!openState.value || launchingState.value) FocusRequester.Default else if (dir == FocusDirection.Left && ff != null) { leftForPlay[0] = true; ff.primary } else FocusRequester.Cancel } } .focusGroup(), ) { Box( Modifier .offset { IntOffset(chipsX.roundToInt(), chipsY.roundToInt()) } - // Over the rows, whatever they scroll under them. .zIndex(1f) - .width(with(density) { (sheetW - chipsX - 16.dp.toPx()).coerceAtLeast(0f).toDp() }) + .width(with(density) { (sheetW - chipsX - 64.dp.toPx()).coerceAtLeast(0f).toDp() }) .graphicsLayer { val v = pieces[0].value; alpha = v; translationY = (1f - v) * 6.dp.toPx() } - // Up from the chips folds the sheet (a finger drags it down, see the hero's drag). .onPreviewKeyEvent { e -> val k = e.nativeKeyEvent if (k.keyCode == KeyEvent.KEYCODE_DPAD_UP) { if (k.action == KeyEvent.ACTION_DOWN) close(); true } else false @@ -586,8 +548,6 @@ internal fun LiftHero( CompositionLocalProvider(LocalSheetBeat provides remember { SheetBeat(pieces) }) { Column( Modifier.fillMaxSize() - // Focus never lands in rows on their way out. Same group always, only - // its rule changes (canFocus here made the scroll's own group a stop). .focusProperties { enter = { if (leavingNow.value) FocusRequester.Cancel else FocusRequester.Default } } .focusGroup() .verticalScroll(rememberScrollState()) @@ -596,19 +556,33 @@ internal fun LiftHero( } } } + val closeSource = remember { MutableInteractionSource() } + val closeHot = rememberHot(closeSource) + Box( + contentAlignment = Alignment.Center, + modifier = Modifier + .offset { IntOffset((sheetW - 52.dp.toPx()).roundToInt(), chipsY.roundToInt()) } + .zIndex(1f).size(44.dp).testTag("sheet-close") + .clip(CircleShape).glideBorder(closeHot, CircleShape, pal.signal) + .hoverable(closeSource) + .clickable(interactionSource = closeSource, indication = LocalIndication.current, enabled = open && !launching, role = Role.Button) { close() } + .controllerConfirm(enabled = open && !launching) { close() }, + ) { Icon(Icons.Filled.Close, stringResource(R.string.common_close), tint = colors.onSurfaceVariant, modifier = Modifier.size(20.dp)) } } } - // The words and the button, where they always were; the button rides the sheet's edge. Column(Modifier.align(Alignment.BottomStart).padding(start = start, bottom = bottom, end = 20.dp)) { - Box(Modifier.graphicsLayer { alpha = 1f - sink.value }) { words() } + Box(Modifier.graphicsLayer { alpha = 1f - wallSink() }) { words() } Spacer(Modifier.height(18.dp)) Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) { Box( Modifier .onGloballyPositioned { rest = it.boundsInRoot() } - .graphicsLayer { translationY = raise * ride.value } - .onFocusChanged { playFocused = it.hasFocus } + .graphicsLayer { translationY = raise * ride.value; alpha = 1f - (drop?.sink?.value ?: 0f) } + .onFocusChanged { + if (it.hasFocus && leftForPlay[0]) { leftForPlay[0] = false; if (openState.value && !launchingState.value) close() } + playFocused = it.hasFocus + } .hoverable(playSrc) .onPreviewKeyEvent { e -> val k = e.nativeKeyEvent @@ -628,30 +602,26 @@ internal fun LiftHero( if (open || shown) { launching = true; open = false } else onPrimary() } } - // Gone with the words while the sheet is up; nothing a pad or a finger can reach then. val besideShown = !(open || shown) Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), - modifier = Modifier.graphicsLayer { alpha = 1f - sink.value } + modifier = Modifier.graphicsLayer { alpha = 1f - wallSink() } .focusProperties { canFocus = besideShown }, ) { if (besideShown || sink.value < 0.99f) beside() } } } - // The lip, under Play: stretched by the pull, gone as the sheet lifts. val r0 = restRect - // A lip a pad can reach stays composed (unseen at rest) so Down always has it to land on. if (r0 != null && (lipShow.value > 0.01f || pull.value > 0.5f || (!downOpens && !open && !shown))) { var handleW by remember { mutableStateOf(0f) } - val lipH = 22.dp + pull.value.dp + val lipH = 32.dp + pull.value.dp val lift = { if (!open) open = true } Box( Modifier .offset { IntOffset((r0.center.x - handleW / 2f).roundToInt(), (r0.bottom + raise * ride.value + (lipShow.value - 1f) * 8.dp.toPx()).roundToInt()) } .onSizeChanged { handleW = it.width.toFloat() } - .graphicsLayer { alpha = lipShow.value * (1f - lipGone.value) } - // 44dp to touch; the tab itself is the top 22. - .heightIn(min = 44.dp) + .graphicsLayer { alpha = lipShow.value * (1f - lipGone.value) * (1f - (drop?.sink?.value ?: 0f)) } + .heightIn(min = 44.dp).testTag("sheet-open") .semantics { contentDescription = settingsLabel } .then( if (downOpens) Modifier.focusProperties { canFocus = false } @@ -664,21 +634,17 @@ internal fun LiftHero( } } } + CompositionLocalProvider(LocalSheetChipWidth provides chipWidth, LocalPlayRect provides restRect) { overlay { sink.value } } } } -/** - * The sheet's handle, tucked under Play: "Settings" and a chevron that bobs up every so often, - * saying there is a drawer to pull up. Still with animations off. - */ @Composable -private fun Handle(height: Dp) { +internal fun Handle(height: Dp, above: Boolean = false) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current - val shape = RoundedCornerShape(bottomStart = 12.dp, bottomEnd = 12.dp) + val shape = if (above) RoundedCornerShape(topStart = 12.dp, topEnd = 12.dp) else RoundedCornerShape(bottomStart = 12.dp, bottomEnd = 12.dp) val still = Motion.scale == 0f val bob = androidx.compose.animation.core.rememberInfiniteTransition(label = "handle") - // A quick lift and settle, then a rest: a nudge, not a pulse. val lift by bob.animateFloat( 0f, 0f, androidx.compose.animation.core.infiniteRepeatable( @@ -695,19 +661,18 @@ private fun Handle(height: Dp) { Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp), modifier = Modifier.height(height).clip(shape).background(colors.surface) - .drawBorderSidesAndFoot(pal.line, 12.dp) + .drawBorderSidesAndFoot(pal.line, 12.dp, flip = above) .padding(start = 14.dp, end = 10.dp), ) { - Text(stringResource(R.string.drawer_page_settings), fontSize = 12.sp, fontWeight = FontWeight.SemiBold, color = colors.onSurfaceVariant, maxLines = 1) + Text(stringResource(R.string.drawer_page_settings), fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.onSurfaceVariant, maxLines = 1) Icon( - Icons.Filled.KeyboardArrowUp, null, tint = colors.onSurfaceVariant, - modifier = Modifier.size(16.dp).graphicsLayer { translationY = if (still) 0f else -3.dp.toPx() * lift }, + if (above) Icons.Filled.KeyboardArrowDown else Icons.Filled.KeyboardArrowUp, null, tint = colors.onSurfaceVariant, + modifier = Modifier.size(16.dp).graphicsLayer { translationY = if (still) 0f else (if (above) 3.dp else -3.dp).toPx() * lift }, ) } } -/** A 1dp outline down the sides and along the foot, none along the top (the lip tucks under Play). */ -private fun Modifier.drawBorderSidesAndFoot(color: Color, corner: Dp): Modifier = +private fun Modifier.drawBorderSidesAndFoot(color: Color, corner: Dp, flip: Boolean = false): Modifier = this.drawWithContent { drawContent() val c = corner.toPx() @@ -720,38 +685,46 @@ private fun Modifier.drawBorderSidesAndFoot(color: Color, corner: Dp): Modifier arcTo(Rect(size.width - 2 * c, size.height - 2 * c + sw / 2, size.width - sw / 2, size.height - sw / 2), 90f, -90f, false) lineTo(size.width - sw / 2, 0f) } - drawPath(p, color, style = Stroke(sw)) + if (flip) scale(1f, -1f) { drawPath(p, color, style = Stroke(sw)) } else drawPath(p, color, style = Stroke(sw)) } -/** - * The sheet's chips: equal capsules with one selection gliding under them (the stores' chip row), - * LB and RB a chip at a time, a tap or A on a far one a hop as a drop. [first] takes focus as the - * sheet opens. Too narrow for equal chips, the row scrolls. - */ +@OptIn(ExperimentalComposeUiApi::class) @Composable -internal fun SheetChips(labels: List<String>, selected: Int, focus: List<FocusRequester>? = null, onPick: (Int) -> Unit) { +internal fun SheetChips( + labels: List<String>, + selected: Int, + focus: List<FocusRequester>? = null, + width: Dp = Dp.Unspecified, + onPick: (Int) -> Unit, +) { val pal = LocalPalette.current val bounds = remember { mutableStateMapOf<Int, Rect>() } val tint = rememberUpdatedState(pal.signal) - // Each chip its own requester: one moved from chip to chip under a focused chip lost the ring. val chips = focus ?: remember(labels.size) { List(labels.size) { FocusRequester() } } var within by remember { mutableStateOf(false) } - // LB / RB with a pad on the chips: focus goes with the selection. LaunchedEffect(selected) { if (within) runCatching { chips[selected].requestFocus() } } - BoxWithConstraints(Modifier.fillMaxWidth().onFocusChanged { within = it.hasFocus }) { - val equal = maxWidth / labels.size.coerceAtLeast(1) >= 96.dp + BoxWithConstraints( + Modifier.fillMaxWidth().onFocusChanged { within = it.hasFocus }, + contentAlignment = Alignment.CenterStart, + ) { + val equal = !width.isSpecified && maxWidth / labels.size.coerceAtLeast(1) >= 96.dp + val least = if (width.isSpecified) maxOf(width, 64.dp) else 64.dp val scroll = rememberScrollState() - // Room inside the scroll for the focus ring, which the scroll's clip would otherwise cut. Box(if (equal) Modifier.fillMaxWidth() else Modifier.edgeFade(scroll).horizontalScroll(scroll).padding(3.dp)) { - ChipGlide(selected, bounds[selected], tint) - Row(horizontalArrangement = Arrangement.spacedBy(6.dp), modifier = if (equal) Modifier.fillMaxWidth() else Modifier) { + Row( + horizontalArrangement = Arrangement.spacedBy(ChipGap), + modifier = (if (equal) Modifier.fillMaxWidth() else Modifier) + .focusProperties { enter = { chips.getOrNull(selected) ?: FocusRequester.Default } } + .focusGroup(), + ) { labels.forEachIndexed { i, label -> - val m = (if (equal) Modifier.weight(1f) else Modifier.widthIn(min = 64.dp)) + val m = (if (equal) Modifier.weight(1f) else Modifier.widthIn(min = least)) .onGloballyPositioned { bounds[i] = it.boundsInParent() } .focusRequester(chips[i]) - SheetChip(label, i == selected, m) { onPick(i) } + SheetChip(label, i == selected, m.onFocusChanged { if (it.isFocused && i != selected) onPick(i) }) { onPick(i) } } } + ChipGlide(selected, bounds[selected], tint) } } } @@ -763,11 +736,13 @@ private fun SheetChip(label: String, on: Boolean, modifier: Modifier, onClick: ( val src = remember { MutableInteractionSource() } val hot = rememberHot(src) val shape = RoundedCornerShape(99.dp) + val under = on && LocalInputModeManager.current.inputMode != InputMode.Keyboard Box( contentAlignment = Alignment.Center, modifier = modifier.heightIn(min = 44.dp).clip(shape) - .background(if (on) Color.Transparent else colors.surfaceVariant.copy(alpha = 0.5f)) - .glideBorder(hot, shape, pal.signal, if (on) Color.Transparent else pal.line) + .background(if (under) Color.Transparent else colors.surfaceVariant.copy(alpha = 0.5f)) + .shownBar(on, pal.signal) + .glideBorder(hot, shape, pal.signal, if (under) Color.Transparent else pal.line) .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = Role.Tab, onClick = onClick) .controllerConfirm(onClick = onClick) .padding(horizontal = 14.dp, vertical = 8.dp), @@ -776,10 +751,6 @@ private fun SheetChip(label: String, on: Boolean, modifier: Modifier, onClick: ( } } -/** - * A read-only line that is a link: [title], [value] under it, and "[link] ↗" at the right in the - * signal blue - not a picker, so no value box. A (or a tap) follows it. [id] is its focus key. - */ @Composable internal fun LinkRow(title: String, value: String, link: String, id: String, arrow: String = "↗", onClick: () -> Unit) { val colors = MaterialTheme.colorScheme diff --git a/app/src/main/java/com/droiddeck/launcher/ui/LogoPositionDialog.kt b/app/src/main/java/com/droiddeck/launcher/ui/LogoPositionDialog.kt new file mode 100644 index 0000000000..7e42aab512 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/LogoPositionDialog.kt @@ -0,0 +1,188 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +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.BoxWithConstraints +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.ArrowBack +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +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.graphics.Color +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.semantics.Role +import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.selected +import androidx.compose.ui.semantics.semantics +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import coil.compose.AsyncImage +import com.droiddeck.launcher.R +import com.droiddeck.launcher.frontend.LogoPosition +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.io.File + +/** Steam's library hero is 3840 x 1240, so the preview keeps that shape. */ +private const val HERO_RATIO = 3840f / 1240f + +/** The gap Steam leaves between the pinned logo and the edge of the hero, as a share of the hero's width. */ +private const val EDGE = 0.03f + +@Composable +private fun LogoPosition.Pin.label(): String = stringResource( + when (this) { + LogoPosition.Pin.UPPER_LEFT -> R.string.logo_pos_upper_left + LogoPosition.Pin.UPPER_CENTER -> R.string.logo_pos_upper_center + LogoPosition.Pin.CENTER -> R.string.logo_pos_center + LogoPosition.Pin.BOTTOM_LEFT -> R.string.logo_pos_bottom_left + LogoPosition.Pin.BOTTOM_CENTER -> R.string.logo_pos_bottom_center + }, +) + +private fun LogoPosition.Pin.alignment(): Alignment = when (this) { + LogoPosition.Pin.UPPER_LEFT -> Alignment.TopStart + LogoPosition.Pin.UPPER_CENTER -> Alignment.TopCenter + LogoPosition.Pin.CENTER -> Alignment.Center + LogoPosition.Pin.BOTTOM_LEFT -> Alignment.BottomStart + LogoPosition.Pin.BOTTOM_CENTER -> Alignment.BottomCenter +} + +@Composable +internal fun logoPositionSummary(value: LogoPosition.Value?): String = + if (value == null) stringResource(R.string.logo_pos_default) else "${value.pin.label()} · ${value.widthPct}%" + +/** + * Where a game's logo sits on its background in Steam's library: the logo box is [Value.widthPct] x [Value.heightPct] of the + * background, pinned to one of five places, and the logo is drawn as large as fits in it. + */ +@Composable +private fun LogoPreview(hero: File?, logo: File?, value: LogoPosition.Value) { + val shape = RoundedCornerShape(10.dp) + BoxWithConstraints(Modifier.fillMaxWidth().aspectRatio(HERO_RATIO).clip(shape).background(Color(0xFF0E1218)).border(1.dp, LocalPalette.current.line, shape)) { + if (hero != null) AsyncImage(model = hero, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.fillMaxSize()) + if (logo != null) { + val edge = maxWidth * EDGE + Box( + Modifier.align(value.pin.alignment()).padding(edge) + .size((maxWidth - edge * 2) * (value.widthPct / 100f), (maxHeight - edge * 2) * (value.heightPct / 100f)), + ) { + AsyncImage(model = logo, contentDescription = null, contentScale = ContentScale.Fit, alignment = value.pin.alignment(), modifier = Modifier.fillMaxSize()) + } + } + } +} + +@Composable +private fun PinChip(label: String, selected: Boolean, onClick: () -> Unit) { + val pal = LocalPalette.current + val colors = MaterialTheme.colorScheme + val src = remember { MutableInteractionSource() } + val hot = rememberHot(src) + val shape = RoundedCornerShape(8.dp) + Box( + contentAlignment = Alignment.Center, + modifier = Modifier.clip(shape) + .background(if (selected) pal.signal.copy(alpha = 0.14f) else Color.White.copy(alpha = 0.03f)) + .border(if (selected) 2.dp else 1.dp, if (selected) pal.signal else pal.line, shape) + .glideBorder(hot, shape, pal.signal) + .hoverable(src) + .clickable(interactionSource = src, indication = androidx.compose.foundation.LocalIndication.current, role = Role.RadioButton, onClick = onClick) + .controllerConfirm(onClick = onClick) + .semantics { contentDescription = label; this.selected = selected } + .padding(horizontal = 12.dp, vertical = 9.dp), + ) { + Text(label, fontSize = 13.sp, fontWeight = if (selected) FontWeight.SemiBold else FontWeight.Normal, color = colors.onBackground, maxLines = 1) + } +} + +/** The "Adjust logo" screen: the game's background with its logo on it, where to pin the logo and how large to draw it. */ +@OptIn(ExperimentalLayoutApi::class) +@Composable +internal fun LogoPositionDialog( + target: ArtTarget, hero: File?, logo: File?, start: LogoPosition.Value?, + onBack: () -> Unit, onCloseAll: () -> Unit, onChanged: () -> Unit, +) { + val app = LocalContext.current.applicationContext + val colors = MaterialTheme.colorScheme + val scope = rememberCoroutineScope() + val shown = rememberShown(onBack) + val back = { shown.targetState = false } + var value by remember { mutableStateOf(start ?: LogoPosition.DEFAULT) } + var failed by remember { mutableStateOf(false) } + var busy by remember { mutableStateOf(false) } + val save: (LogoPosition.Value?) -> Unit = { next -> + if (!busy) { + busy = true + scope.launch { + val saved = withContext(Dispatchers.IO) { runCatching { target.setPosition(app, next) }.getOrDefault(false) } + busy = false + failed = !saved + if (saved) { + onChanged() + back() + } + } + } + } + AppDialog(shown, back, "logoPosition", wide = false, maxWidth = 460.dp) { + DialogTitleRow(stringResource(R.string.art_adjust_logo), onClose = onCloseAll, leading = { + SmallIconButton(Icons.AutoMirrored.Filled.ArrowBack, stringResource(R.string.common_back), colors.onBackground, onClick = back) + }) + val maxHeight = (LocalConfiguration.current.screenHeightDp * 0.72f).dp + Column( + verticalArrangement = Arrangement.spacedBy(10.dp), + modifier = Modifier.fillMaxWidth().heightIn(max = maxHeight).verticalScroll(rememberScrollState()), + ) { + LogoPreview(hero, logo, value) + Text( + stringResource(if (logo == null) R.string.logo_pos_no_logo else R.string.logo_pos_hint), + fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(horizontal = 2.dp), + ) + Text(stringResource(R.string.logo_pos_position), fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(start = 2.dp, top = 2.dp)) + FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) { + for (pin in LogoPosition.Pin.values()) PinChip(pin.label(), pin == value.pin) { value = value.copy(pin = pin) } + } + ValueSlider( + value.widthPct, LogoPosition.MIN_PCT..LogoPosition.MAX_PCT, step = 1, enabled = true, label = stringResource(R.string.logo_pos_size), + format = { "$it%" }, + ) { value = LogoPosition.sized(value.pin, it) } + if (failed) Text(stringResource(R.string.logo_pos_failed), fontSize = 12.sp, color = colors.error, modifier = Modifier.padding(horizontal = 2.dp)) + Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.End)) { + SecondaryButton(stringResource(R.string.logo_pos_reset), enabled = !busy, compact = true) { save(null) } + PrimaryButton(stringResource(R.string.logo_pos_save), enabled = !busy, compact = true) { save(value) } + } + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/MainScreen.kt b/app/src/main/java/com/droiddeck/launcher/ui/MainScreen.kt index 3d97ca656d..ac9a0524a2 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/MainScreen.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/MainScreen.kt @@ -2,17 +2,29 @@ package com.droiddeck.launcher.ui import com.droiddeck.launcher.R import androidx.compose.ui.res.stringResource +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.width import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.selection.toggleable import androidx.compose.foundation.verticalScroll import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Checkbox import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable +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.semantics.Role import androidx.compose.ui.unit.dp import com.droiddeck.launcher.HomeApp import com.droiddeck.launcher.input.SecondScreenDisplay @@ -53,3 +65,31 @@ fun ConfirmDialog(title: String, text: String, confirm: String, onConfirm: () -> dismissButton = { TextButton(onClick = onDismiss) { Text(stringResource(R.string.common_cancel)) } }, ) } + +@Composable +fun ResetSettingsDialog(onConfirm: (gameProfiles: Boolean) -> Unit, onDismiss: () -> Unit) { + var gameProfiles by remember { mutableStateOf(false) } + AlertDialog( + onDismissRequest = onDismiss, + title = { Text(stringResource(R.string.setup_reset_settings_title)) }, + text = { + Column(verticalArrangement = Arrangement.spacedBy(12.dp)) { + Text(stringResource(R.string.setup_reset_settings_body)) + Row( + Modifier.fillMaxWidth().toggleable(gameProfiles, role = Role.Checkbox) { gameProfiles = it }, + verticalAlignment = Alignment.CenterVertically, + ) { + Checkbox(checked = gameProfiles, onCheckedChange = null) + Spacer(Modifier.width(8.dp)) + Text(stringResource(R.string.setup_reset_settings_profiles), style = MaterialTheme.typography.bodyMedium) + } + } + }, + confirmButton = { + TextButton(onClick = { onDismiss(); onConfirm(gameProfiles) }) { + Text(stringResource(R.string.setup_reset_settings_button), color = MaterialTheme.colorScheme.error) + } + }, + dismissButton = { TextButton(onClick = onDismiss) { Text(stringResource(R.string.common_cancel)) } }, + ) +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/ModeSettingsDialog.kt b/app/src/main/java/com/droiddeck/launcher/ui/ModeSettingsDialog.kt index 5aaf9f8415..0fb34d6634 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/ModeSettingsDialog.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/ModeSettingsDialog.kt @@ -27,21 +27,19 @@ import androidx.compose.ui.layout.boundsInRoot import androidx.compose.ui.layout.onGloballyPositioned import com.droiddeck.launcher.core.FexPreset import com.droiddeck.launcher.runtime.DeckyManager +import com.droiddeck.launcher.session.BootMovie import com.droiddeck.launcher.session.SessionPrefs import com.droiddeck.launcher.session.SessionService -/** [tag] is shown beside the name: [BUNDLED], [DOWNLOADED], [IMPORTED], or "" for Auto / Runtime default. */ class DriverRow(val id: String, val name: String, val detail: String, val removable: Boolean, val tag: String = "") { companion object { const val BUNDLED = "BUNDLED" const val DOWNLOADED = "DOWNLOADED" const val IMPORTED = "IMPORTED" - /** One half of an Android + Linux bundle: picked and deleted together with the other. */ const val BUNDLE = "ANDROID + LINUX" } } -/** A [DriverRow.tag] as shown, in the app's language. */ @Composable internal fun driverTagLabel(tag: String): String = when (tag) { DriverRow.BUNDLED -> stringResource(R.string.driver_tag_bundled) @@ -51,7 +49,6 @@ internal fun driverTagLabel(tag: String): String = when (tag) { else -> tag } -/** A release driver (Banners-Turnip, WinNative) that is not installed yet; [key] is its asset name. */ class DownloadRow(val key: String, val label: String, val detail: String, val progress: Int? = null) class ModeSettings( @@ -60,57 +57,50 @@ class ModeSettings( val panelSize: Pair<Int, Int> = 1280 to 720, val hdr: Boolean, val hdrReason: String?, - /** The GPU drivers in use, as the row that opens them on the Components page says it. */ - /** The drivers line; null shows Auto. */ val gpuDrivers: String? = null, - /** Frames per second the session is capped at; 0 = none. */ val fpsLimit: Int = 0, val upscaler: Int = 0, val upscaleSharpness: Int = 75, val touchMode: String, val suspendPolicy: String, val steamDownloadsInBackground: Boolean = false, + val zramCompression: Boolean? = null, + val zramSupported: Boolean? = null, val pipSupported: Boolean = false, val pipAutoEnter: Boolean = false, - /** Steam only. */ val oscMode: String?, - /** Steam only: whether single and double Back actions are swapped. */ val backActionsInverted: Boolean = false, val directAudio: Boolean?, val mic: Boolean?, val gameStorage: String? = null, val storageOptions: List<com.droiddeck.launcher.session.GameStorage.Option> = emptyList(), - /** Steam only: record allocation and sampled storage timings in the next session's Share logs. */ val storageDiagnostics: Boolean = false, val fexPreset: String? = null, - /** Steam only: Force SSBS for Proton games (SessionPrefs.forceSsbs). */ val forceSsbs: Boolean = false, - /** Steam only: SessionPrefs.SYNC_* chosen for Proton games; null outside Steam. */ val syncBackend: String? = null, + val picturePosition: String? = null, val stretch16x9: Boolean? = null, + val steamClientArch: String? = null, val steamRepairQueued: Boolean = false, - /** Steam: the QAM's performance overlay (mangoapp) is started. */ val mangoapp: Boolean = true, - /** Steam only: what the pad is to the client (SessionPrefs.CONTROLLER_*); null outside Steam. */ val steamController: String? = null, - /** Unfolded controls (Steam only; null hides the row). */ val unfoldedControls: Boolean? = null, - /** Steam only: start a Steam session when DroidDeck opens. */ val runSteamAtStartup: Boolean = false, - /** Null outside Steam; the saved choice is separate from Android's access and device switch. */ + val bootMovie: String? = null, + val bootMovieSound: Boolean = true, + val bootMovieCustomName: String? = null, + val bootMovieImporting: Boolean = false, + val bootMovieProgress: Int = -1, val wifiDiscovery: Boolean? = null, val wifiDiscoveryPermission: Boolean = false, val wifiDiscoveryLocation: Boolean = false, val wifiDiscoveryAsked: Boolean = false, val wifiDiscoveryBlocked: Boolean = false, - /** Latest Banners-Turnip release: what each driver menu offers to download, and the refresh line. */ - /** Steam only: Decky Loader is managed from the Steam session settings. */ val deckyInstalled: String? = null, val deckyLatestRelease: DeckyManager.Release? = null, val deckyChecking: Boolean = false, val deckyStage: String? = null, val deckyPercent: Int = -1, - /** The stage is the Decky plugin's binary download. */ val deckyDownloadingBinary: Boolean = false, val deckyEnabled: Boolean = false, val deckySessionRunning: Boolean = false, @@ -119,7 +109,6 @@ class ModeSettings( class ModeSettingsActions( val onResolution: (String) -> Unit, val onHdr: (Boolean) -> Unit, - /** Opens the GPU drivers on the Components page: they are shared by every session. */ val onGpuDrivers: () -> Unit = {}, val onFpsLimit: (Int) -> Unit = {}, val onUpscaler: (Int) -> Unit = {}, @@ -127,6 +116,7 @@ class ModeSettingsActions( val onTouch: (String) -> Unit, val onSuspendPolicy: (String) -> Unit, val onSteamDownloadsInBackground: (Boolean) -> Unit = {}, + val onZramCompression: (Boolean) -> Unit = {}, val onPipAutoEnter: (Boolean) -> Unit = {}, val onOsc: (String) -> Unit, val onBackActionsInverted: (Boolean) -> Unit = {}, @@ -138,12 +128,18 @@ class ModeSettingsActions( val onFexPreset: (String) -> Unit = {}, val onForceSsbs: (Boolean) -> Unit = {}, val onSyncBackend: (String) -> Unit = {}, + val onPicturePosition: (String) -> Unit = {}, val onStretch16x9: (Boolean) -> Unit = {}, val onSteamRepair: () -> Unit = {}, + val onSteamClientArch: (String) -> Unit = {}, val onMangoapp: (Boolean) -> Unit = {}, val onSteamController: (String) -> Unit = {}, val onUnfoldedControls: (Boolean) -> Unit = {}, val onRunSteamAtStartup: (Boolean) -> Unit = {}, + val onBootMovie: (String) -> Unit = {}, + val onBootMovieSound: (Boolean) -> Unit = {}, + val onImportBootMovie: () -> Unit = {}, + val onRemoveBootMovie: () -> Unit = {}, val onWifiDiscovery: (Boolean) -> Unit = {}, val onWifiDiscoverySettings: () -> Unit = {}, val onDeckyInstall: (DeckyManager.Release) -> Unit = {}, @@ -154,15 +150,33 @@ class ModeSettingsActions( val onDismiss: () -> Unit, ) -/** - * The chips of a mode's lifted sheet, in order: Steam's six; the desktop's Display, Controls and - * Session (its Files chip is the Desktop page's own). - */ +/** "2610 r3" from droiddeck-steam-x64's FEX_TAG line (fex-2610-r3), the build the x86-64 client downloads. */ +internal fun fexVersionOf(script: String): String? = + Regex("""(?m)^FEX_TAG=(fex-\d+-r\d+)\s*$""").find(script)?.let { fexVersionOfTag(it.groupValues[1]) } + +/** "2610 r5" from a tag such as fex-2610-r5. */ +internal fun fexVersionOfTag(tag: String): String? = + Regex("""fex-(\d+)-r(\d+)""").matchEntire(tag.trim())?.let { "${it.groupValues[1]} r${it.groupValues[2]}" } + +/** The build installed in the runtime, else the one fex.json names, else the one the launcher pins. */ +@Composable +private fun x64FexVersion(context: android.content.Context): String? = remember { + val root = com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context) + runCatching { java.io.File(root, "usr/local/share/fex-emu/.droiddeck-tag").readText() }.getOrNull()?.let(::fexVersionOfTag) + ?: com.droiddeck.launcher.session.FexCatalog.cached(context)?.tag?.let(::fexVersionOfTag) + ?: runCatching { + context.assets.open("linuxfs/usr/local/bin/droiddeck-steam-x64").bufferedReader().use { fexVersionOf(it.readText()) } + }.getOrNull() +} + +@Composable +private fun clientArchHint(hint: String, fex: String?): String = + if (fex == null) hint else hint + " " + stringResource(R.string.mode_client_arch_fex, fex) + internal fun modeSheetTabs(steam: Boolean): List<String> = - if (steam) listOf(SheetTab.DISPLAY, SheetTab.CONTROLS, SheetTab.AUDIO, SheetTab.SESSION, SheetTab.LIBRARY, SheetTab.STEAM) + if (steam) listOf(SheetTab.STEAM, SheetTab.DISPLAY, SheetTab.CONTROLS, SheetTab.AUDIO, SheetTab.SESSION, SheetTab.LIBRARY) else listOf(SheetTab.DISPLAY, SheetTab.CONTROLS, SheetTab.SESSION) -/** A sheet tab's chip label. */ @Composable internal fun sheetTabLabel(tab: String): String = when (tab) { SheetTab.DISPLAY -> stringResource(R.string.drawer_page_display) @@ -174,17 +188,13 @@ internal fun sheetTabLabel(tab: String): String = when (tab) { else -> stringResource(R.string.setup_tool_files) } -/** - * Rows the front end adds to a sheet's tabs: frame generation (Display), Performance (Session) and - * the Graphics drivers link to Components (Display, given the drivers' summary). - */ class SheetExtras( val frameGen: @Composable () -> Unit = {}, val performance: @Composable () -> Unit = {}, val drivers: @Composable (summary: String?) -> Unit = {}, + val account: @Composable (host: MenuHost) -> Unit = {}, ) -/** One tab of a mode's lifted sheet: the rows the settings page had, grouped by what they are for. */ @Composable fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras: SheetExtras = SheetExtras()) { val steam = s.mode == SessionService.MODE_STEAM @@ -194,6 +204,13 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras: val displaySize = com.droiddeck.launcher.session.SessionDisplay.resolveChoice(s.panelSize, s.resolution) SettingsGroup(stringResource(R.string.display_session)) { ResolutionRow(host, s.resolution, s.panelSize, a.onResolution) + s.picturePosition?.let { position -> + ChoiceRow(host, "picture-position", stringResource(R.string.display_picture_position), null, + listOf("top" to stringResource(R.string.display_position_top), + "bottom" to stringResource(R.string.display_position_bottom), + "center" to stringResource(R.string.display_position_center)), + position, onPick = a.onPicturePosition) + } if (s.stretch16x9 != null && (com.droiddeck.launcher.session.SessionDisplay.canStretch16x9(s.panelSize) || com.droiddeck.launcher.session.SessionDisplay.canStretch16x9(displaySize))) { val canStretch = com.droiddeck.launcher.session.SessionDisplay.canStretch16x9(displaySize) @@ -301,6 +318,21 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras: stringResource(R.string.mode_background_downloads_hint), s.steamDownloadsInBackground, onChange = a.onSteamDownloadsInBackground, ) + if (s.zramCompression != null) ToggleRow( + host, "zram", stringResource(R.string.mode_zram), + stringResource(if (s.zramSupported == false) R.string.mode_zram_unsupported else R.string.mode_zram_hint), + s.zramCompression && s.zramSupported != false, enabled = s.zramSupported == true, + onChange = a.onZramCompression, + ) + if (s.syncBackend != null) ChoiceRow( + host, "sync", stringResource(R.string.sync_backend_title), stringResource(R.string.sync_backend_hint), + listOf( + SessionPrefs.SYNC_NTSYNC to stringResource(R.string.sync_backend_ntsync), + SessionPrefs.SYNC_FSYNC to stringResource(R.string.sync_backend_fsync), + SessionPrefs.SYNC_ESYNC to stringResource(R.string.sync_backend_esync), + SessionPrefs.SYNC_WINESERVER to stringResource(R.string.sync_backend_wineserver), + ), s.syncBackend, onPick = a.onSyncBackend, + ) } if (s.pipSupported) SettingsGroup(stringResource(R.string.pip_title)) { ToggleRow(host, "pip-auto", stringResource(R.string.pip_auto), null, @@ -318,7 +350,6 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras: if (tab == SheetTab.LIBRARY && steam) { if (s.gameStorage != null) SettingsGroup(stringResource(R.string.mode_storage)) { val custom = s.gameStorage.isNotEmpty() && s.gameStorage != "off" && s.storageOptions.none { it.path == s.gameStorage } - // Each choice: its path, its menu line, the chip's shorter line, and the label it is saved with. class StorageChoice(val path: String, val label: String, val chip: String, val saved: String) val internal = stringResource(R.string.mode_storage_internal) val options = buildList { @@ -360,6 +391,7 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras: } } if (tab == SheetTab.STEAM && steam) { + extras.account(host) SettingsGroup(stringResource(R.string.mode_decky)) { val updateAvailable = s.deckyInstalled != null && s.deckyLatestRelease != null && s.deckyInstalled != s.deckyLatestRelease.tag @@ -428,6 +460,47 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras: ) { SecondaryButton(stringResource(R.string.mode_steam_repair_button), enabled = !s.steamRepairQueued, onClick = a.onSteamRepair) } + if (s.steamClientArch != null) ChoiceRow( + host, "clientArch", stringResource(R.string.mode_client_arch), + clientArchHint(stringResource(R.string.common_applies_next_session), x64FexVersion(LocalContext.current)), + listOf("arm64" to stringResource(R.string.mode_client_arch_arm64), "x86_64" to stringResource(R.string.mode_client_arch_x64)), s.steamClientArch, + onPick = a.onSteamClientArch, + ) + } + if (s.bootMovie != null) SettingsGroup(stringResource(R.string.boot_movie)) { + ChoiceRow( + host, "boot-movie", stringResource(R.string.boot_movie_video), stringResource(R.string.common_applies_next_session), + buildList { + add(BootMovie.DROIDDECK_30 to stringResource(R.string.boot_movie_droiddeck, 30)) + add(BootMovie.DROIDDECK_60 to stringResource(R.string.boot_movie_droiddeck, 60)) + s.bootMovieCustomName?.let { add(BootMovie.CUSTOM to it) } + }, s.bootMovie, + note = stringResource(R.string.boot_movie_note), onPick = a.onBootMovie, + ) + ToggleRow( + host, "boot-movie-sound", stringResource(R.string.boot_movie_sound), + stringResource(R.string.common_applies_next_session), s.bootMovieSound, onChange = a.onBootMovieSound, + ) + SettingsRow( + stringResource(R.string.boot_movie_custom), + stringResource(R.string.boot_movie_custom_hint, (BootMovie.MAX_BYTES shr 20).toInt(), BootMovie.MAX_CONVERT_SECONDS), + ) { + Row(horizontalArrangement = androidx.compose.foundation.layout.Arrangement.spacedBy(6.dp)) { + SecondaryButton( + when { + s.bootMovieProgress >= 0 -> stringResource(R.string.boot_movie_converting, s.bootMovieProgress) + s.bootMovieImporting -> stringResource(R.string.common_working) + else -> stringResource(R.string.boot_movie_import) + }, + enabled = !s.bootMovieImporting, + progress = s.bootMovieProgress.takeIf { it >= 0 }?.let { it / 100f }, + onClick = a.onImportBootMovie, + ) + if (s.bootMovieCustomName != null) SecondaryButton( + stringResource(R.string.boot_movie_remove), enabled = !s.bootMovieImporting, onClick = a.onRemoveBootMovie, + ) + } + } } if (s.wifiDiscovery != null) SettingsGroup(stringResource(R.string.mode_network)) { val hint = when { @@ -464,17 +537,13 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras: ) } -/** - * The options that apply to every Proton - how Wine syncs, FEX's preset, Force SSBS and the games' - * environment - for the Components page's Proton layer. - */ @Composable internal fun ProtonOptions( syncBackend: String, fexPreset: String, forceSsbs: Boolean, onSyncBackend: (String) -> Unit, onFexPreset: (String) -> Unit, onForceSsbs: (Boolean) -> Unit, ) { val host = rememberMenuHost() - SettingsRow(stringResource(R.string.sync_backend_title), stringResource(R.string.sync_backend_hint)) { + SettingsRow(stringResource(R.string.sync_backend_title), stringResource(R.string.sync_backend_hint), stacked = true) { SegmentedTabs( listOf( SessionPrefs.SYNC_NTSYNC to stringResource(R.string.sync_backend_ntsync), @@ -494,10 +563,6 @@ internal fun ProtonOptions( GameEnvironmentRow() } -/** - * Uninstall for Decky Loader: are you sure steps out of it in red, Cancel first, so a stray A - * costs nothing. - */ @Composable private fun DeckyUninstall(enabled: Boolean, onUninstall: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -524,8 +589,6 @@ private fun DeckyUninstall(enabled: Boolean, onUninstall: () -> Unit) { } } -/** Width × height for the session, with the common handheld shapes one tap away. */ -/** Entry for the user's SteamGridDB API key; the saved key is never shown back. */ @Composable internal fun SgdbKeyDialog(hasKey: Boolean, onSave: (String) -> Unit, onDismiss: () -> Unit) { var key by remember { mutableStateOf("") } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/PackageRow.kt b/app/src/main/java/com/droiddeck/launcher/ui/PackageRow.kt index 2bf44f30c0..20abe70a39 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/PackageRow.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/PackageRow.kt @@ -1,6 +1,5 @@ package com.droiddeck.launcher.ui -/** Package metadata shown on an emulator's own detail page. */ class PackageRow( val id: String, val kind: String, diff --git a/app/src/main/java/com/droiddeck/launcher/ui/PageFlood.kt b/app/src/main/java/com/droiddeck/launcher/ui/PageFlood.kt index 91a8eaa606..e0e95343d7 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/PageFlood.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/PageFlood.kt @@ -30,7 +30,9 @@ import androidx.compose.ui.graphics.drawscope.clipPath import androidx.compose.ui.graphics.drawscope.translate import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.layout.onSizeChanged +import androidx.compose.ui.layout.positionInRoot import androidx.compose.ui.unit.dp import androidx.compose.ui.util.lerp import kotlinx.coroutines.coroutineScope @@ -40,38 +42,20 @@ import kotlinx.coroutines.launch import kotlin.math.PI import kotlin.math.sin -// A page opened from a control (the cog beside Play) grows out of it as a session grows out of -// Play (LaunchFlood): the control stretches out over the pane on loose springs, the far edges -// first, and the page rises into it once it is covered. Back draws it down into the control again. -/** - * Where a page opened from: the control's bounds and corner radius, in px, and the rail item that - * was showing it ([owner]), so the page only draws back into it when that content returns. [art] - * is the control's picture for the tile (a drawable id, or an image Coil loads), if it has one. - */ internal class Origin(val bounds: Rect, val corner: Float, val owner: String? = null, val art: Any? = null) { fun translate(by: Offset) = Origin(bounds.translate(by), corner, owner, art) fun ownedBy(key: String) = Origin(bounds, corner, key, art) } -/** How a page that opened from a control leaves. */ internal enum class PageExit { - /** Back into the control it came from, which is on screen again. */ Drain, - /** Out through a link into another section, which takes the page there itself. */ Hop, - /** Away with the pane, as any page goes: the control it came from is not coming back. */ Sink, } -/** Why a page is leaving: an ordinary change of page, or a link into another section. */ internal enum class PageLeave { Ordinary, Link } -/** - * The exit for a page opened from a control on [owner]'s content, leaving for [incoming]. It only - * draws back into the control when the content that control belongs to is what comes back; a page - * left for another rail item or another page drained into a control that was no longer there. - */ internal fun pageExit(owner: String?, incoming: String, leave: PageLeave): PageExit = when { owner != null && incoming == owner -> PageExit.Drain leave == PageLeave.Link -> PageExit.Hop @@ -82,45 +66,37 @@ internal object PageOrigin { private var origin: Origin? = null private var at = 0L - /** The control a page is about to open from, in root coordinates. */ fun mark(o: Origin) { origin = o at = SystemClock.uptimeMillis() } - /** The control just pressed, once: stale after a second, so a page opened another way never floods. */ fun take(): Origin? = origin.takeIf { SystemClock.uptimeMillis() - at < 1_000 }.also { origin = null } } -/** How long a leaving page is kept for its flood to draw back into the control. */ internal const val PAGE_RETURN_MS = 900 -/** - * [content], a page that opened from the control at [from] (in this element's coordinates): the - * control's tile stretching over it until covered, then the page rising in as the tile fades. - * Once [leaving], the reverse: the tile comes back over the page and draws down into the control. - * A page that [sinks] instead goes with the pane and draws no tile at all. - * The focus ring stays out of it until it is done. - */ @Composable internal fun PageFlood( from: Origin, leaving: Boolean, - /** What the tile shows instead of the control's fill: a game card's art, cropped to the tile as it grows. */ art: Painter? = null, sinks: Boolean = false, + onto: (() -> Rect?)? = null, + ontoCorner: androidx.compose.ui.unit.Dp = 0.dp, content: @Composable () -> Unit, ) { val pal = LocalPalette.current val glide = LocalFocusGlide.current - // Left, top, right, bottom: 0 on the control, 1 on the pane's edge. val edges = remember { List(4) { Animatable(0f) } } val shown = remember { Animatable(0f) } val tile = remember { Animatable(1f) } var size by remember { mutableStateOf(Size.Zero) } + var at by remember { mutableStateOf(Offset.Zero) } + var target by remember { mutableStateOf<Rect?>(null) } + val density = androidx.compose.ui.platform.LocalDensity.current LaunchedEffect(size != Size.Zero, leaving, sinks) { if (sinks) { - // Whatever the flood in was doing, the page is shown whole and leaves with the pane. tile.snapTo(0f) shown.snapTo(1f) glide?.hidden = false @@ -128,6 +104,27 @@ internal fun PageFlood( } if (size == Size.Zero) return@LaunchedEffect glide?.hidden = true + target = onto?.let { get -> + kotlinx.coroutines.withTimeoutOrNull(300) { snapshotFlow { get() }.first { it != null } } + }?.translate(-at)?.takeIf { it.height > 1f && it.overlaps(Rect(Offset.Zero, size)) } + if (target != null) { + coroutineScope { + if (!leaving) { + val runs = edges.map { launch { it.animateTo(1f, Motion.sp(0.85f, 320f)) } } + snapshotFlow { edges.all { it.value >= 0.9f } }.first { it } + launch { shown.animateTo(1f, Motion.tw(240)) } + launch { delay(Motion.ms(140).toLong()); tile.animateTo(0f, Motion.tw(220)) } + runs.forEach { it.join() } + } else { + launch { shown.animateTo(0f, Motion.tw(160)) } + tile.animateTo(1f, Motion.tw(120)) + edges.map { launch { it.animateTo(0f, Motion.sp(0.9f, 320f)) } }.forEach { it.join() } + tile.animateTo(0f, Motion.tw(120)) + } + } + glide?.hidden = false + return@LaunchedEffect + } val b = from.bounds val travel = listOf(b.left, b.top, size.width - b.right, size.height - b.bottom).map { it.coerceAtLeast(0f) } val far = travel.max().coerceAtLeast(1f) @@ -160,39 +157,46 @@ internal fun PageFlood( glide?.hidden = false } DisposableEffect(Unit) { onDispose { glide?.hidden = false } } - Box(Modifier.fillMaxSize().clipToBounds().onSizeChanged { size = Size(it.width.toFloat(), it.height.toFloat()) }) { - Box(Modifier.fillMaxSize().graphicsLayer { alpha = shown.value; translationY = (1f - shown.value) * 14.dp.toPx() }) { content() } + Box( + Modifier.fillMaxSize().clipToBounds().onSizeChanged { size = Size(it.width.toFloat(), it.height.toFloat()) } + .onGloballyPositioned { at = it.positionInRoot() }, + ) { + val rise = if (onto != null) 0f else 1f + Box(Modifier.fillMaxSize().graphicsLayer { alpha = shown.value; translationY = (1f - shown.value) * 14.dp.toPx() * rise }) { content() } + val onCorner = with(density) { ontoCorner.toPx() } Canvas(Modifier.fillMaxSize()) { - if (tile.value > 0.01f) drawTile(from, edges.map { it.value }, pal.surface, pal.line2, tile.value, art) + if (tile.value > 0.01f) drawTile(from, edges.map { it.value }, pal.surface, pal.line2, tile.value, art, target, onCorner) } } } -/** - * The control's tile with its edges [v] of the way to the pane's (left, top, right, bottom): - * sinking with the page behind, blobby in flight, square once it fills the pane. - */ -private fun DrawScope.drawTile(from: Origin, v: List<Float>, fill: Color, line: Color, alpha: Float, art: Painter? = null) { +private fun DrawScope.drawTile( + from: Origin, v: List<Float>, fill: Color, line: Color, alpha: Float, art: Painter? = null, + to: Rect? = null, toCorner: Float = 0f, +) { val (l, t, r, b) = v val mean = v.sumOf { it.coerceIn(0f, 1f).toDouble() }.toFloat() / 4f - // The control sinks with the page behind it (scaled to 0.95 about the pane's centre). - val k = 1f - 0.05f * mean - val cx = size.width / 2f - val cy = size.height / 2f val f = from.bounds - val left = lerp(cx + (f.left - cx) * k, 0f, l) - val top = lerp(cy + (f.top - cy) * k, 0f, t) - val right = lerp(cx + (f.right - cx) * k, size.width, r) - val bottom = lerp(cy + (f.bottom - cy) * k, size.height, b) + val left: Float; val top: Float; val right: Float; val bottom: Float + if (to != null) { + left = lerp(f.left, to.left, l); top = lerp(f.top, to.top, t) + right = lerp(f.right, to.right, r); bottom = lerp(f.bottom, to.bottom, b) + } else { + val k = 1f - 0.05f * mean + val cx = size.width / 2f + val cy = size.height / 2f + left = lerp(cx + (f.left - cx) * k, 0f, l) + top = lerp(cy + (f.top - cy) * k, 0f, t) + right = lerp(cx + (f.right - cx) * k, size.width, r) + bottom = lerp(cy + (f.bottom - cy) * k, size.height, b) + } val w = (right - left).coerceAtLeast(0f) val h = (bottom - top).coerceAtLeast(0f) - val blob = sin(PI * mean).toFloat().coerceAtLeast(0f) - val corner = lerp(from.corner * (1f - mean), minOf(w, h) * 0.42f, blob) + val corner = if (to != null) lerp(from.corner, toCorner, mean).coerceAtMost(minOf(w, h) / 2f) + else lerp(from.corner * (1f - mean), minOf(w, h) * 0.42f, sin(PI * mean).toFloat().coerceAtLeast(0f)) drawRoundRect(fill, Offset(left, top), Size(w, h), CornerRadius(corner), alpha = alpha) val pic = art?.intrinsicSize?.takeIf { it.isSpecified && it.width > 0f && it.height > 0f } if (art != null && pic != null && w > 0f && h > 0f) { - // The art covers the tile at every size (a centre crop), so a portrait card opens into the - // wide pane without stretching. val k = maxOf(w / pic.width, h / pic.height) val dw = pic.width * k val dh = pic.height * k @@ -200,7 +204,6 @@ private fun DrawScope.drawTile(from: Origin, v: List<Float>, fill: Color, line: translate(left + (w - dw) / 2f, top + (h - dh) / 2f) { with(art) { draw(Size(dw, dh), alpha = alpha) } } } } - // The control's outline, kept while it is still the size of one. val edge = (1f - mean * 3f).coerceIn(0f, 1f) if (edge > 0f) drawRoundRect(line, Offset(left, top), Size(w, h), CornerRadius(corner), alpha = alpha * edge, style = Stroke(1.dp.toPx())) } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/PcKeyboard.kt b/app/src/main/java/com/droiddeck/launcher/ui/PcKeyboard.kt index e4450662d1..0567319f30 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/PcKeyboard.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/PcKeyboard.kt @@ -54,16 +54,6 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -/** - * A PC keyboard on screen: every key is a physical key (a Linux evdev code) pressed and released - * on the session's wl_keyboard, as a USB keyboard would - Esc, the function row, Ctrl, Alt, Super, - * the arrows and the editing block included, none of which the Android keyboard can send. - * - * A key goes down when a finger lands on it and up when it lifts, so holding one repeats it the way - * the program's own key repeat does. Ctrl, Shift, Alt and Super are sticky: one tap holds the - * modifier for the next key, a second tap locks it, a third lets it go. A controller moves over the - * keys with the d-pad and presses with A. - */ private data class PcKey(val label: String, val code: Int, val weight: Float = 1f, val shifted: String? = null, @StringRes val labelRes: Int = 0) private fun k(label: String, code: Int, weight: Float = 1f, shifted: String? = null) = PcKey(label, code, weight, shifted) @@ -110,7 +100,6 @@ private const val MOD_LOCKED = 2 @Composable fun PcKeyboard( - /** evdev code, pressed. */ sendKey: (Int, Boolean) -> Unit, onAndroidKeyboard: () -> Unit, onClose: () -> Unit, @@ -142,21 +131,17 @@ fun PcKeyboard( if (key.code == 58) capsOn = !capsOn releaseOnceModifiers() } - // Nothing is left held when the keyboard goes away. androidx.compose.runtime.DisposableEffect(Unit) { onDispose { for ((code, state) in mods.toMap()) if (state != MOD_OFF) sendKey(code, false) } } LaunchedEffect(Unit) { runCatching { firstKey.requestFocus() } } BoxWithConstraints(Modifier.fillMaxSize(), contentAlignment = Alignment.BottomCenter) { - // Slightly under half the screen, header included, so the program stays in view above it: - // six rows share what is left of 47% after the header, the gaps and the padding. val rowHeight = ((maxHeight * 0.47f - 24.dp - 3.dp * 6 - 10.dp) / 6).coerceIn(24.dp, 44.dp) Box( Modifier.fillMaxWidth() .background(Color(0xE6101418), RoundedCornerShape(topStart = 14.dp, topEnd = 14.dp)) .border(1.dp, pal.line2, RoundedCornerShape(topStart = 14.dp, topEnd = 14.dp)) - // Touches on the keyboard stop here; the program underneath never sees them. .pointerInput(Unit) { awaitEachGesture { awaitFirstDown().consume(); waitForUpOrCancellation()?.consume() } } .padding(horizontal = 8.dp, vertical = 5.dp), ) { @@ -221,7 +206,6 @@ private fun RowScope.KeyCap( down = false; onUp() } } - // A controller: A (or the d-pad's centre) is the finger. .onPreviewKeyEvent { e -> val kc = e.key.nativeKeyCode if (kc != KeyEvent.KEYCODE_BUTTON_A && kc != KeyEvent.KEYCODE_DPAD_CENTER && kc != KeyEvent.KEYCODE_ENTER) return@onPreviewKeyEvent false diff --git a/app/src/main/java/com/droiddeck/launcher/ui/ResolutionRow.kt b/app/src/main/java/com/droiddeck/launcher/ui/ResolutionRow.kt index 2af914e4dc..5a0b88daaf 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/ResolutionRow.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/ResolutionRow.kt @@ -10,7 +10,6 @@ import androidx.compose.ui.res.stringResource import com.droiddeck.launcher.R import com.droiddeck.launcher.session.SessionDisplay -/** Pre-session resolution choice, applied when the session starts. */ @Composable fun ResolutionRow( host: MenuHost, choice: String, panel: Pair<Int, Int>, onPick: (String) -> Unit, diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SecondScreenPresentation.kt b/app/src/main/java/com/droiddeck/launcher/ui/SecondScreenControls.kt similarity index 89% rename from app/src/main/java/com/droiddeck/launcher/ui/SecondScreenPresentation.kt rename to app/src/main/java/com/droiddeck/launcher/ui/SecondScreenControls.kt index 92cb32117f..908b00e0a0 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/SecondScreenPresentation.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/SecondScreenControls.kt @@ -1,21 +1,17 @@ package com.droiddeck.launcher.ui import com.droiddeck.launcher.R -import android.app.Presentation import android.content.ClipboardManager import android.content.Context import android.graphics.Canvas import android.graphics.Color -import android.os.Bundle import android.util.Log -import android.view.Display import android.view.Gravity import android.view.KeyEvent import android.view.MotionEvent import android.view.View import android.view.ViewGroup import android.view.ViewConfiguration -import android.view.WindowManager import android.view.inputmethod.InputMethodManager import android.widget.Button import android.widget.FrameLayout @@ -23,6 +19,7 @@ import android.widget.HorizontalScrollView import android.widget.LinearLayout import android.widget.TextView import com.droiddeck.launcher.input.KeyboardHost +import com.droiddeck.launcher.input.PadBridge import com.droiddeck.launcher.input.PointerGestures import com.droiddeck.launcher.input.SecondScreenMode import com.droiddeck.launcher.input.TouchpadGestures @@ -36,22 +33,18 @@ import com.termux.terminal.TerminalSessionClient import com.termux.view.TerminalView import com.termux.view.TerminalViewClient -/** Touch controls drawn on a second Android display while the compositor remains on the main one. */ -class SecondScreenPresentation( +internal class SecondScreenControls( + context: Context, private val sessionActivity: SessionActivity, - display: Display, private val sendPointer: (x: Float, y: Float, width: Float, height: Float) -> Unit, private val sendButton: (button: Int, pressed: Boolean) -> Unit, private val sendWheel: (steps: Int) -> Unit, private val onSteamMenu: () -> Unit, private val onQam: () -> Unit, private val onClose: () -> Unit, -) : Presentation(sessionActivity, display) { - private val root = LinearLayout(context).apply { - orientation = LinearLayout.VERTICAL - setBackgroundColor(Color.rgb(15, 18, 22)) - isFocusableInTouchMode = true - } + private val pad: PadBridge? = null, +) : LinearLayout(context) { + private val root get() = this private var currentMode = SecondScreenMode.NONE private var keyboardHost: KeyboardHost? = null private var terminalSession: TerminalSession? = null @@ -59,36 +52,22 @@ class SecondScreenPresentation( private var terminalPid = -1 private var ctrlActive = false private var altActive = false - private var created = false - init { - setCancelable(false) - setCanceledOnTouchOutside(false) - setOnDismissListener { closeTerminal() } - } - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - created = true - window?.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) - window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) - setContentView(root) - applyImmersiveMode() - renderMode() + orientation = VERTICAL + setBackgroundColor(Color.rgb(15, 18, 22)) + isFocusableInTouchMode = true } fun showMode(mode: SecondScreenMode) { - if (currentMode == mode && isShowing) return + if (currentMode == mode) return currentMode = mode - if (created) renderMode() + renderMode() } - /** Releases the auxiliary Linux shell before the window is dismissed. */ fun closeControls() { closeTerminal() keyboardHost?.hide() keyboardHost = null - dismiss() } override fun dispatchKeyEvent(event: KeyEvent): Boolean { @@ -98,14 +77,6 @@ class SecondScreenPresentation( return super.dispatchKeyEvent(event) } - override fun onWindowFocusChanged(hasFocus: Boolean) { - super.onWindowFocusChanged(hasFocus) - if (hasFocus) { - applyImmersiveMode() - sessionActivity.refreshClipboard() - } - } - private fun renderMode() { keyboardHost?.hide() keyboardHost = null @@ -116,7 +87,7 @@ class SecondScreenPresentation( when (currentMode) { SecondScreenMode.KEYBOARD_TRACKPAD -> renderKeyboardAndTrackpad() SecondScreenMode.TERMINAL -> renderTerminal() - SecondScreenMode.DECK_CONTROLS -> root.addView(DeckControlsPanel(context, onClose, onSteamMenu, onQam), weightParams()) + SecondScreenMode.DECK_CONTROLS -> root.addView(DeckControlsPanel(context, onClose, onSteamMenu, onQam, pad), weightParams()) SecondScreenMode.NONE -> Unit } } @@ -291,16 +262,6 @@ class SecondScreenPresentation( private fun weightParams() = LinearLayout.LayoutParams(-1, 0, 1f) - private fun applyImmersiveMode() { - @Suppress("DEPRECATION") - window?.decorView?.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY - or View.SYSTEM_UI_FLAG_FULLSCREEN - or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION - or View.SYSTEM_UI_FLAG_LAYOUT_STABLE - or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN - or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) - } - private inner class TrackpadView(context: Context) : View(context) { private val gestures = TouchpadGestures(ViewConfiguration.get(context).scaledTouchSlop.toFloat(), object : PointerGestures.Listener { diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SecondScreenWindow.kt b/app/src/main/java/com/droiddeck/launcher/ui/SecondScreenWindow.kt new file mode 100644 index 0000000000..55efd2a006 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/SecondScreenWindow.kt @@ -0,0 +1,139 @@ +package com.droiddeck.launcher.ui + +import android.app.Activity +import android.app.ActivityOptions +import android.content.Intent +import android.os.Bundle +import android.view.Display +import android.view.View +import android.view.WindowManager +import com.droiddeck.launcher.SessionActivity +import com.droiddeck.launcher.input.PadBridge +import com.droiddeck.launcher.input.SecondScreenMode +import com.droiddeck.launcher.session.SessionState +import java.lang.ref.WeakReference +import java.util.concurrent.atomic.AtomicLong + +class SecondScreenWindow( + private val sessionActivity: SessionActivity, + val display: Display, + private val sendPointer: (Float, Float, Float, Float) -> Unit, + private val sendButton: (Int, Boolean) -> Unit, + private val sendWheel: (Int) -> Unit, + private val onSteamMenu: () -> Unit, + private val onQam: () -> Unit, + private val onClose: () -> Unit, + private val pad: PadBridge? = null, +) { + private val token = tokens.incrementAndGet() + private var activity = WeakReference<SecondScreenActivity>(null) + private var controls: SecondScreenControls? = null + private var mode = SecondScreenMode.NONE + private var launching = false + private var closed = false + val window get() = activity.get()?.window + val isShowing get() = !closed && (launching || activity.get()?.isFinishing == false) + + fun show() { + if (isShowing || closed) return + owners[token] = WeakReference(this) + launching = true + try { + val intent = Intent(sessionActivity, SecondScreenActivity::class.java) + .putExtra(OWNER, token) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_MULTIPLE_TASK) + sessionActivity.startActivity(intent, ActivityOptions.makeBasic().setLaunchDisplayId(display.displayId).toBundle()) + } catch (error: Exception) { + launching = false + owners.remove(token) + throw error + } + } + + fun showMode(mode: SecondScreenMode) { + this.mode = mode + controls?.showMode(mode) + } + + fun closeControls() { + closed = true + launching = false + owners.remove(token) + controls?.closeControls() + controls = null + activity.get()?.finishAndRemoveTask() + activity.clear() + } + + internal fun attach(host: SecondScreenActivity): View { + controls?.closeControls() + activity = WeakReference(host) + launching = false + return SecondScreenControls(host, sessionActivity, sendPointer, sendButton, sendWheel, + onSteamMenu, onQam, onClose, pad).also { + controls = it + it.showMode(mode) + } + } + + internal fun detach(host: SecondScreenActivity) { + if (activity.get() !== host) return + controls?.closeControls() + controls = null + activity.clear() + if (host.isFinishing && !closed) onClose() + } + + internal fun refreshClipboard() = sessionActivity.refreshClipboard() + + companion object { + private const val OWNER = "secondScreenOwner" + private val tokens = AtomicLong() + private val owners = mutableMapOf<Long, WeakReference<SecondScreenWindow>>() + internal fun find(intent: Intent): SecondScreenWindow? = + owners[intent.getLongExtra(OWNER, 0)]?.get()?.takeUnless { it.closed } + } +} + +class SecondScreenActivity : Activity() { + private var owner: SecondScreenWindow? = null + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + val host = SecondScreenWindow.find(intent) + if (host == null || !SessionState.running) { + finishAndRemoveTask() + return + } + owner = host + window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) + setContentView(host.attach(this)) + applyImmersiveMode() + } + + override fun onWindowFocusChanged(hasFocus: Boolean) { + super.onWindowFocusChanged(hasFocus) + if (hasFocus) { + applyImmersiveMode() + owner?.refreshClipboard() + } + } + + @Deprecated("Back is handled by the session controls") + override fun onBackPressed() = Unit + + override fun onDestroy() { + owner?.detach(this) + owner = null + super.onDestroy() + } + + private fun applyImmersiveMode() { + @Suppress("DEPRECATION") + window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY + or View.SYSTEM_UI_FLAG_FULLSCREEN or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SessionDrawerPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/SessionDrawerPage.kt index 0955651cc2..fb123fbd85 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/SessionDrawerPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/SessionDrawerPage.kt @@ -1,17 +1,20 @@ package com.droiddeck.launcher.ui -/** Stable page identities keep focus and scroll positions when a secondary display comes and goes. */ internal enum class SessionDrawerPage(val firstControl: String) { CONTROLLER("touch"), + GLASSES("glasses-game"), SECOND_SCREEN("second-screen:none"), DISPLAY("hud"), EFFECTS("look"), + VR("steamvr"), GAMES("anisotropy"), SESSION("suspend"), } -internal fun sessionDrawerPages(hasSecondScreen: Boolean): List<SessionDrawerPage> = - SessionDrawerPage.entries.filter { hasSecondScreen || it != SessionDrawerPage.SECOND_SCREEN } +internal fun sessionDrawerPages(hasSecondScreen: Boolean, hasGlasses: Boolean = false): List<SessionDrawerPage> = + SessionDrawerPage.entries.filter { + (hasSecondScreen || it != SessionDrawerPage.SECOND_SCREEN) && (hasGlasses || it != SessionDrawerPage.GLASSES) + } internal fun List<SessionDrawerPage>.step(current: SessionDrawerPage, direction: Int): SessionDrawerPage { val index = indexOf(current).coerceAtLeast(0) diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SessionLoading.kt b/app/src/main/java/com/droiddeck/launcher/ui/SessionLoading.kt index 3cf190efec..3cb47b0708 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/SessionLoading.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/SessionLoading.kt @@ -76,7 +76,6 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.style.LineHeightStyle import androidx.compose.ui.text.style.TextOverflow -// The session's loading screen, its paused screen and the HUD text style. @Composable fun HudText(text: String) { @@ -94,7 +93,6 @@ fun HudText(text: String) { } } -/** One line of the loading screen's checklist; [detail] is what it says while it is the one running. */ private class LoadStage(@androidx.annotation.StringRes val label: Int, @androidx.annotation.StringRes val detail: Int) private fun loadStages(steam: Boolean): List<LoadStage> = if (steam) listOf( @@ -108,11 +106,6 @@ private fun loadStages(steam: Boolean): List<LoadStage> = if (steam) listOf( LoadStage(R.string.load_opening, R.string.load_opening_detail), ) -/** - * The checklist stage a loading line's [topic] belongs to, -1 when it says nothing about the stage. - * The lines are the session script's "== STEP" milestones and the installer's own progress; they - * arrive in order, and the screen never steps back. - */ private fun stageOf(topic: LoadingState.Topic, steam: Boolean): Int = when (topic) { LoadingState.Topic.RUNTIME -> 0 LoadingState.Topic.SESSION -> 1 @@ -125,15 +118,12 @@ private fun stageOf(topic: LoadingState.Topic, steam: Boolean): Int = when (topi @Composable fun LoadingOverlay( step: String, percent: Int, elapsed: String, hint: String, ended: Boolean, - /** What [step] is about, and whether it is a download or install line worth showing as it is (see [LoadingState]). */ topic: LoadingState.Topic, readable: Boolean, title: String = stringResource(R.string.load_starting_steam), steam: Boolean = true, onCancel: (() -> Unit)? = null, - /** An ended session's exit status and log path, shown small under the advice. */ endedDetail: String? = null, onRetry: (() -> Unit)? = null, onShareLogs: (() -> Unit)? = null, onClose: (() -> Unit)? = null, - /** The blue the page opens on when a button flooded to it, gathered into the throbber's ball. */ flood: Color? = null, onFlooded: () -> Unit = {}, ) { @@ -148,7 +138,6 @@ fun LoadingOverlay( val active = reached.coerceAtMost(stages.lastIndex) val detail = if (percent >= 0 || readable) step.replaceFirstChar { it.uppercase() } else stringResource(stages[active].detail) val context = LocalContext.current - // The Steam tab's wall behind it, dimmed and slowed: starting Steam reads as the same place settling in. val games by produceState(emptyList<Library.SteamGame>()) { value = withContext(Dispatchers.IO) { runCatching { Library.steamGames(context).sortedByDescending { it.lastPlayed } }.getOrDefault(emptyList()) } } @@ -176,7 +165,6 @@ fun LoadingOverlay( horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier.align(Alignment.Center).verticalScroll(rememberScrollState()).padding(horizontal = 32.dp, vertical = 24.dp), ) { - // Held on the plain D while the flood gathers, and started fresh when it lands. key(flood == null) { LogoThrobber( Modifier.width(if (ended) 88.dp else 110.dp).onGloballyPositioned { ball = throbberBall(it.boundsInRoot()).also { b -> ThrobberSpot.ball = b } }, @@ -211,7 +199,6 @@ fun LoadingOverlay( } } -/** What to do about an ended session: nothing leaves on a timer, and the pad starts on Try again. */ @Composable private fun EndedActions(onRetry: (() -> Unit)?, onShareLogs: (() -> Unit)?, onClose: (() -> Unit)?) { val first = remember { FocusRequester() } @@ -229,7 +216,6 @@ private fun EndedActions(onRetry: (() -> Unit)?, onShareLogs: (() -> Unit)?, onC } } -/** One segment per stage: done ones filled, the current one filling (or running, with no percent). */ @Composable private fun LoadSegments(count: Int, active: Int, percent: Int, modifier: Modifier = Modifier) { val pal = LocalPalette.current @@ -257,7 +243,6 @@ private fun LoadSegments(count: Int, active: Int, percent: Int, modifier: Modifi } } -/** Cancel as the pad's B, in the corner; a tap works too. */ @Composable private fun CancelHint(onCancel: () -> Unit, modifier: Modifier = Modifier) { val colors = MaterialTheme.colorScheme @@ -281,7 +266,6 @@ private fun CancelHint(onCancel: () -> Unit, modifier: Modifier = Modifier) { } } -/** A session paused in the background, ready to pick up where it left off. */ @Composable fun SessionPausedOverlay(title: String = stringResource(R.string.load_steam_paused), onResume: () -> Unit) { val colors = MaterialTheme.colorScheme diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SessionOverlay.kt b/app/src/main/java/com/droiddeck/launcher/ui/SessionOverlay.kt index 893bc3cd91..4d4cdbabad 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/SessionOverlay.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/SessionOverlay.kt @@ -18,6 +18,7 @@ import androidx.compose.ui.input.key.type import androidx.compose.ui.layout.LayoutCoordinates import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.IntSize import kotlin.math.roundToInt @@ -72,6 +73,7 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.ScrollState import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.LinearProgressIndicator import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text @@ -88,6 +90,9 @@ import com.droiddeck.launcher.HomeApp import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.animateColorAsState import androidx.compose.animation.core.Spring +import com.droiddeck.launcher.core.GameEnvironment +import com.droiddeck.launcher.session.ProfileValue +import com.droiddeck.launcher.session.SelectedGameProfile import androidx.compose.animation.core.animateFloatAsState import androidx.compose.ui.draw.rotate import androidx.compose.ui.semantics.stateDescription @@ -132,6 +137,8 @@ import com.droiddeck.launcher.core.TextureFiltering import com.droiddeck.launcher.gpu.FrameGen import com.droiddeck.launcher.gpu.Lossless import com.droiddeck.launcher.gpu.ScreenEffectLooks +import com.droiddeck.launcher.gpu.Cardboard +import com.droiddeck.launcher.gpu.SteamVr import com.droiddeck.launcher.gpu.ScreenEffects import com.droiddeck.launcher.session.SessionPrefs import com.droiddeck.launcher.session.ComponentsManager @@ -142,8 +149,10 @@ import java.util.Locale private val SessionDrawerPage.title: Int get() = when (this) { SessionDrawerPage.CONTROLLER -> R.string.drawer_page_controller + SessionDrawerPage.GLASSES -> R.string.drawer_page_glasses SessionDrawerPage.SECOND_SCREEN -> R.string.drawer_second_screen SessionDrawerPage.DISPLAY -> R.string.drawer_page_display + SessionDrawerPage.VR -> R.string.vr_title SessionDrawerPage.EFFECTS -> R.string.drawer_page_effects SessionDrawerPage.GAMES -> R.string.game_settings_title SessionDrawerPage.SESSION -> R.string.mode_session @@ -151,8 +160,10 @@ private val SessionDrawerPage.title: Int get() = when (this) { private val SessionDrawerPage.icon get() = when (this) { SessionDrawerPage.CONTROLLER -> Icons.Outlined.SportsEsports + SessionDrawerPage.GLASSES -> GlassesIcon SessionDrawerPage.SECOND_SCREEN -> Icons.Outlined.ScreenShare SessionDrawerPage.DISPLAY -> Icons.Outlined.DesktopWindows + SessionDrawerPage.VR -> VrHeadsetIcon SessionDrawerPage.EFFECTS -> Icons.Outlined.AutoFixHigh SessionDrawerPage.GAMES -> Icons.Outlined.Layers SessionDrawerPage.SESSION -> Icons.Outlined.Settings @@ -173,16 +184,13 @@ private class DrawerFocus { } else if (focused == key) focused = null } - /** Where focus was last on [page], if anywhere. */ fun target(page: SessionDrawerPage) = last[page] fun request(key: String) = runCatching { requester(key).requestFocus() } fun forget(page: SessionDrawerPage) { last.remove(page) } } -/** Everything the drawer shows and does. */ class DrawerActions( val steam: Boolean, - /** The drawer's heading: the emulator for a program from the rail, else Steam or Desktop. */ val title: String? = null, val isHomeApp: Boolean, val androidApps: List<HomeApp.LaunchableApp>, @@ -194,7 +202,6 @@ class DrawerActions( val suspendPolicy: String, val steamDownloadsInBackground: Boolean = false, val backActionsInverted: Boolean, - /** What the pad is to Steam (SessionPrefs.CONTROLLER_*), switched live; null hides the row. */ val padType: String? = null, val onPadType: (String) -> Unit = {}, val touchMode: String, @@ -202,25 +209,28 @@ class DrawerActions( val fexPreset: String, val upscaler: Int = 0, val upscaleSharpness: Int = 75, - /** The compositor's post chain (gpu/ScreenEffects), changed live. */ val effects: ScreenEffects = ScreenEffects.OFF, - /** Texture filtering for DirectX 9-11 games (core/TextureFiltering); lands on their next launch. */ - val textureAnisotropy: Int = 0, - val textureLodBias: String = TextureFiltering.LOD_BIAS_OFF, + val cardboard: Cardboard = Cardboard.OFF, + val cardboardSensor: Boolean = false, + val steamVr: SteamVr.Status? = null, + val glassesPresent: Boolean = false, + val glassesOutput: Boolean = false, + val immersiveSteamVr: Boolean = false, + val textureAnisotropy: Int? = 0, + val textureLodBias: String? = TextureFiltering.LOD_BIAS_OFF, val secondScreenMode: SecondScreenMode, val secondScreenDisplays: List<SecondScreenDisplay>, val selectedSecondScreenDisplay: Int, val onHud: (Boolean) -> Unit, val onFrameGenPick: (FrameGen.Mode) -> Unit, val onImportLossless: () -> Unit, - /** The Android keyboard (text, turned into key presses). */ val onKeyboard: () -> Unit, - /** The on-screen PC keyboard: real keys, Esc, F1-F12, Ctrl, Alt... */ val onHardwareKeyboard: () -> Unit, val onSteamMenu: (() -> Unit)?, val onQam: (() -> Unit)?, + val onAchievements: (() -> Unit)? = null, + val achievementsProgress: Pair<Int, Int>? = null, val onOsc: (String) -> Unit, - /** Edits the Steam touch layout of the game in front, when Steam's controls are up. */ val onEditSteamTouch: (() -> Unit)? = null, val controller: com.droiddeck.launcher.input.ControllerPrefs.Settings? = null, val onRumble: (Boolean) -> Unit = {}, @@ -230,13 +240,21 @@ class DrawerActions( val onSuspendPolicy: (String) -> Unit, val onSteamDownloadsInBackground: (Boolean) -> Unit = {}, val onBackActionsInverted: (Boolean) -> Unit, + val lowLatencyController: Boolean = false, + val lowLatencyTouch: Boolean = false, + val onLowLatencyController: (Boolean) -> Unit = {}, + val onLowLatencyTouch: (Boolean) -> Unit = {}, val onTouch: (String) -> Unit, val onFexPreset: (String) -> Unit, val onUpscaler: (Int) -> Unit = {}, val onUpscaleSharpness: (Int) -> Unit = {}, val onEffects: (ScreenEffects) -> Unit = {}, - val onTextureAnisotropy: (Int) -> Unit = {}, - val onTextureLodBias: (String) -> Unit = {}, + val onCardboard: (Cardboard) -> Unit = {}, + val onCardboardRecenter: () -> Unit = {}, + val onGlassesRecenter: () -> Unit = {}, + val onSteamVr: (String) -> Unit = {}, + val onTextureAnisotropy: (Int?) -> Unit = {}, + val onTextureLodBias: (String?) -> Unit = {}, val onSecondScreenMode: (SecondScreenMode) -> Unit, val onSecondScreenDisplay: (Int) -> Unit, val onLaunchAndroidApp: (HomeApp.LaunchableApp, Int?) -> Unit, @@ -245,31 +263,53 @@ class DrawerActions( val pipAutoEnter: Boolean = false, val onPip: () -> Unit = {}, val onPipAutoEnter: (Boolean) -> Unit = {}, - /** Unfolded controls (on a foldable; null hides the row). */ val unfoldedControls: Boolean? = null, val onUnfoldedControls: (Boolean) -> Unit = {}, val onShareLogs: () -> Unit, val onStop: () -> Unit, - /** Stop with the dialog's button's bounds on screen, for the flood to grow out of; null falls back to [onStop]. */ val onStopFrom: ((androidx.compose.ui.geometry.Rect?) -> Unit)? = null, val onClose: () -> Unit, - /** Games tab: every Proton with what it uses; null until first read. */ val components: ComponentsManager.Snapshot? = null, - /** Re-reads the Protons (and runs swaps that waited for a game to close). */ val onComponentsRefresh: () -> Unit = {}, - /** Swaps [value] ("orig:<build>" or a stored package file) into a Proton's component. */ + val componentCatalog: List<ComponentsManager.CatalogItem> = emptyList(), + val componentCatalogAt: Long = 0, + val componentCatalogChecking: Boolean = false, + val componentDownloads: Map<String, Int> = emptyMap(), + val componentDownloadRevision: Long = 0, + val onComponentCatalogRefresh: () -> Unit = {}, + val onComponentDownload: (ComponentsManager.CatalogItem) -> Unit = {}, + val gameProfiles: List<Pair<Long, String>> = emptyList(), + val selectedGameProfileId: Long? = null, + val selectedGameProfile: SelectedGameProfile? = null, + val gameProfilesLoaded: Boolean = false, + val gameProfileRefreshFailed: Boolean = false, + val onSelectedGameProfile: (Long?) -> Unit = {}, + val onGameProfilesPageOpened: () -> Unit = {}, + val onSelectedGameProfileRefresh: () -> Unit = {}, + val gameFexPresetSaving: Boolean = false, + val onGameFexPreset: (Long, String?) -> Unit = { _, _ -> }, + val gameNoSteamSaving: Boolean = false, + val onGameNoSteam: (Long, Boolean) -> Unit = { _, _ -> }, val onComponentSwap: (protonId: String, comp: String, value: String) -> Unit = { _, _, _ -> }, + val onGameComponent: (appId: Long, comp: String, file: String?) -> Unit = { _, _, _ -> }, + val defaultProtonId: String? = null, + val onDefaultProton: (protonId: String) -> Unit = {}, + val onGameProton: (appId: Long, protonId: String?) -> Unit = { _, _ -> }, ) @OptIn(ExperimentalComposeUiApi::class) @Composable internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, controllerActive: Boolean, onPageChange: (SessionDrawerPage) -> Unit, a: DrawerActions) { - val pages = sessionDrawerPages(a.steam && a.secondScreenDisplays.isNotEmpty()) + val pages = sessionDrawerPages(a.steam && a.secondScreenDisplays.isNotEmpty(), a.glassesPresent) val page = requestedPage.takeIf { it in pages } ?: SessionDrawerPage.CONTROLLER LaunchedEffect(requestedPage, pages) { if (page != requestedPage) onPageChange(page) } val colors = MaterialTheme.colorScheme val pal = LocalPalette.current val host = rememberMenuHost() + val (glasses, glassesSettings) = rememberGlasses() + val glassesPages = glassesTabs(glasses) + var selectedGlassesTab by rememberSaveable { mutableStateOf(GlassesTab.DISPLAY) } + val glassesTab = selectedGlassesTab.takeIf { key -> glassesPages.any { it.first == key } } ?: GlassesTab.DISPLAY var androidAppsExpanded by rememberSaveable { mutableStateOf(false) } var advancedEffectsExpanded by rememberSaveable { mutableStateOf(false) } var appToChooseDisplay by remember { mutableStateOf<HomeApp.LaunchableApp?>(null) } @@ -277,6 +317,10 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont var sheetCoords by remember { mutableStateOf<LayoutCoordinates?>(null) } var stopCoords by remember { mutableStateOf<LayoutCoordinates?>(null) } val pageScroll = remember { SessionDrawerPage.entries.associateWith { ScrollState(0) } } + LaunchedEffect(glassesTab) { + if (page == SessionDrawerPage.GLASSES) host.open = null + pageScroll.getValue(SessionDrawerPage.GLASSES).scrollTo(0) + } val veil by animateFloatAsState(if (open) 1f else 0f, Motion.tw(260), label = "veil") val focus = remember { DrawerFocus() } val inputModeManager = LocalInputModeManager.current @@ -286,14 +330,24 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont } BackHandler(enabled = open && confirmStop) { confirmStop = false } LaunchedEffect(page) { host.open = null; appToChooseDisplay = null } - LaunchedEffect(open, page) { if (open && page == SessionDrawerPage.GAMES) a.onComponentsRefresh() } + LaunchedEffect(a.selectedGameProfileId) { + if (host.open == "fex") host.open = null + } + LaunchedEffect(open, page, a.componentDownloadRevision) { + if (open && page == SessionDrawerPage.GAMES) { + a.onGameProfilesPageOpened() + a.onComponentsRefresh() + while (true) { + a.onSelectedGameProfileRefresh() + delay(1_000) + } + } + } LaunchedEffect(open, controllerActive) { if (open && !controllerActive) focusManager.clearFocus(force = true) } - // The page focus was last put on: turning to another (LB, RB, a tab) starts it at its first - // option; anything else (a menu closing, the drawer opening again) goes back where it was. var focusedPage by remember { mutableStateOf(page) } - LaunchedEffect(open, page, controllerActive, host.open, appToChooseDisplay, confirmStop) { + LaunchedEffect(open, page, glassesTab, controllerActive, host.open, appToChooseDisplay, confirmStop) { if (!open) { host.open = null confirmStop = false @@ -302,8 +356,11 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont if (host.open != null || appToChooseDisplay != null || confirmStop) return@LaunchedEffect val turned = page != focusedPage focusedPage = page - // The page's top control: on Session that is Android apps, when it is shown. - val first = if (page == SessionDrawerPage.SESSION && a.isHomeApp) "apps" else page.firstControl + val first = when { + page == SessionDrawerPage.GLASSES -> "glasses-tab-$glassesTab" + page == SessionDrawerPage.SESSION && a.isHomeApp -> "apps" + else -> page.firstControl + } if (turned) focus.forget(page) val target = focus.target(page) ?: first repeat(24) { @@ -320,8 +377,6 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont .clickable(interactionSource = remember { MutableInteractionSource() }, indication = null) { host.open = null; a.onClose() }, ) androidx.compose.foundation.layout.BoxWithConstraints(modifier = Modifier.fillMaxSize().exposeTestTags(), contentAlignment = Alignment.CenterEnd) { - // A 4:3 or near-square screen (under 440dp tall) gets tighter padding and a shorter tab row, - // so the settings keep most of the height; a narrow one keeps some of the game in view. val short = maxHeight < 440.dp val sheetWidth = minOf(360.dp, maxWidth * 0.92f) AnimatedVisibility( @@ -376,6 +431,11 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont } StopSessionButton(modifier = focus.track(page, "stop").onGloballyPositioned { stopCoords = it }) { host.open = null; confirmStop = true } } + a.onAchievements?.let { show -> + DrawerAchievementsRow(a.achievementsProgress, Modifier.padding(top = if (short) 6.dp else 10.dp).then(focus.track(page, "achievements"))) { + host.open = null; show() + } + } Row( verticalAlignment = Alignment.CenterVertically, @@ -389,6 +449,10 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont host.open = null; onPageChange(pages.step(page, 1)) } } + if (page == SessionDrawerPage.GLASSES) SegmentedTabs( + glassesPages, glassesTab, modifier = Modifier.fillMaxWidth().padding(top = 8.dp), + tabModifier = { key -> focus.track(page, "glasses-tab-$key").testTag("glasses-tab-$key") }, + ) { selectedGlassesTab = it } Column( modifier = Modifier.weight(1f).fillMaxWidth().verticalScroll(pageScroll.getValue(page)), ) { CompositionLocalProvider(LocalChipMinWidth provides 120.dp) { @@ -420,6 +484,10 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont ScreenEffectsGroup(host, a, advancedEffectsExpanded, onAdvancedToggle = { advancedEffectsExpanded = !advancedEffectsExpanded }) { key -> focus.track(page, key) } } + SessionDrawerPage.VR -> { + SteamVrGroup(a) { key -> focus.track(page, key) } + if (!a.glassesOutput) CardboardGroup(host, a) { key -> focus.track(page, key) } + } SessionDrawerPage.CONTROLLER -> { SettingsGroup(stringResource(R.string.drawer_page_controller)) { a.padType?.let { type -> @@ -437,7 +505,6 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont ChoiceRow(host, "osc", stringResource(R.string.mode_osc), null, if (a.steam) listOf(SessionPrefs.OSC_AUTO to stringResource(R.string.common_auto), SessionPrefs.OSC_ALWAYS to stringResource(R.string.common_always), SessionPrefs.OSC_STEAM_TOUCH to stringResource(R.string.osc_steam_touch), SessionPrefs.OSC_STEAM_QAM to stringResource(R.string.mode_osc_qam), SessionPrefs.OSC_NEVER to stringResource(R.string.common_never)) else listOf(SessionPrefs.OSC_AUTO to stringResource(R.string.common_auto), SessionPrefs.OSC_ALWAYS to stringResource(R.string.common_always), SessionPrefs.OSC_NEVER to stringResource(R.string.common_never)), - // Steam's touch controller is Steam's alone; elsewhere that choice behaves as Auto. if (!a.steam && a.oscMode == SessionPrefs.OSC_STEAM_TOUCH) SessionPrefs.OSC_AUTO else a.oscMode, chipModifier = focus.track(page, "osc"), onPick = a.onOsc) a.onEditSteamTouch?.let { edit -> @@ -464,6 +531,14 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont stringResource(R.string.unfolded_controls_hint), a.unfoldedControls, chipModifier = focus.track(page, "unfolded-controls"), onChange = a.onUnfoldedControls) } + SettingsGroup(stringResource(R.string.drawer_latency)) { + ToggleRow(host, "low-latency-controller", stringResource(R.string.drawer_low_latency_controller), + stringResource(R.string.drawer_low_latency_controller_hint), a.lowLatencyController, + chipModifier = focus.track(page, "low-latency-controller"), onChange = a.onLowLatencyController) + ToggleRow(host, "low-latency-touch", stringResource(R.string.drawer_low_latency_touch), + stringResource(R.string.drawer_low_latency_touch_hint), a.lowLatencyTouch, + chipModifier = focus.track(page, "low-latency-touch"), onChange = a.onLowLatencyTouch) + } SettingsGroup(stringResource(R.string.drawer_keyboard)) { Row(horizontalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.fillMaxWidth().padding(8.dp)) { DrawerOutlineButton(stringResource(R.string.drawer_pc_keyboard), modifier = Modifier.weight(1f).height(48.dp).then(focus.track(page, "hardware"))) { @@ -478,17 +553,37 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont SessionDrawerPage.SECOND_SCREEN -> { SecondScreenGroup(host, a) { key -> focus.track(page, key) } } + SessionDrawerPage.GLASSES -> { + GlassesGroups(host, glasses, glassesSettings, { key -> focus.track(page, key) }, onRecenter = a.onGlassesRecenter, + tab = glassesTab, outputActive = a.glassesOutput, steamVrRunning = a.steamVr == SteamVr.Status.RUNNING, + steamVr = { SteamVrRow(a) }) + } SessionDrawerPage.GAMES -> { + if (a.steam) SelectedGameProfileGroup(host, a) { key -> focus.track(page, key) } Text(stringResource(R.string.fex_next_launch), fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(horizontal = 14.dp, vertical = 8.dp)) TextureFilteringGroup(host, a) { key -> focus.track(page, key) } if (a.steam) SettingsGroup(stringResource(R.string.game_settings_title)) { - ChoiceRow(host, "fex", stringResource(R.string.fex_preset_title), null, - FexPreset.all.map { it.id to stringResource(it.label) }, a.fexPreset, - chipModifier = focus.track(page, "fex"), onPick = a.onFexPreset) - GameEnvironmentRow(modifier = focus.track(page, "game-env"), showHint = false) + DrawerFexPresetRow(host, a, focus.track(page, "fex")) + DrawerNoSteamRow(host, a, focus.track(page, "no-steam")) + GameEnvironmentRow( + modifier = focus.track(page, "game-env"), + showHint = false, + initialScope = a.selectedGameProfileId?.toString().orEmpty(), + ) } ComponentsDrawerPage(host, a) { key -> focus.track(page, key) } + ComponentDownloadsDrawerGroup( + host = host, + catalog = a.componentCatalog, + catalogAt = a.componentCatalogAt, + checking = a.componentCatalogChecking, + packages = a.components?.packages.orEmpty(), + downloads = a.componentDownloads, + onRefresh = a.onComponentCatalogRefresh, + onDownload = a.onComponentDownload, + track = { key -> focus.track(page, key) }, + ) } SessionDrawerPage.SESSION -> { if (a.isHomeApp) SettingsGroup(stringResource(R.string.drawer_android_apps)) { @@ -658,7 +753,6 @@ private fun StopSessionButton(modifier: Modifier = Modifier, onClick: () -> Unit } } -/** A compact shortcut into Steam, sharing the header with Stop. */ @Composable private fun SteamActionPill( description: String, icon: androidx.compose.ui.graphics.vector.ImageVector, modifier: Modifier, @@ -683,7 +777,6 @@ private fun SteamActionPill( } } -/** A bumper as a keycap, 44dp to touch; LB / RB on the pad turn the page too. */ @Composable private fun DrawerBumper(label: String, description: String, modifier: Modifier = Modifier, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -707,13 +800,6 @@ private fun DrawerBumper(label: String, description: String, modifier: Modifier } } -/** - * The drawer's page tabs, QAM-style: one icon per page standing in a line in page order. The - * selected one steps forward - full size, bright, a soft glow - while the others step back to - * a little smaller and fade, and the whole line leans a little toward the selection. LB / RB still turn - * the page (the buttons beside it and the pad's bumpers); a tab can be tapped or picked with the - * pad like the dots it replaces. - */ @Composable private fun DrawerPageTabs(page: SessionDrawerPage, pages: List<SessionDrawerPage>, modifier: Modifier = Modifier, compact: Boolean = false, onSelect: (SessionDrawerPage) -> Unit) { val colors = MaterialTheme.colorScheme @@ -727,9 +813,6 @@ private fun DrawerPageTabs(page: SessionDrawerPage, pages: List<SessionDrawerPag modifier = modifier.height(if (compact) 44.dp else 64.dp).clipToBounds(), ) { val tab = if (compact) 36f else 44f - // Fit the line to the room between LB and RB. Worst case is an end tab selected: full size - // ([tab] dp) and pushed outward by the lean, which scales with the spacing. So - // (count-1) * spacing * (1 + lean/spacingMax) + tab <= width val spacing = ((maxWidth.value - tab) / ((count - 1) * (1f + DRAWER_TAB_LEAN_DP / DRAWER_TAB_SPACING_DP))).coerceIn(24f, DRAWER_TAB_SPACING_DP) val leanStep = DRAWER_TAB_LEAN_DP * spacing / DRAWER_TAB_SPACING_DP val lean by animateFloatAsState(-(selectedIndex - middle) * leanStep, motion, label = "tabLean") @@ -770,10 +853,8 @@ private fun DrawerPageTabs(page: SessionDrawerPage, pages: List<SessionDrawerPag } } -/** The Look row's value when the rows below match no Look. */ private const val LOOK_CUSTOM = "custom" -/** Presets and simple effects first; detailed adjustments stay behind Advanced. */ @Composable private fun ScreenEffectsGroup( host: MenuHost, a: DrawerActions, advancedExpanded: Boolean, onAdvancedToggle: () -> Unit, @@ -838,7 +919,80 @@ private fun ScreenEffectsGroup( } } -/** Secondary-display modes are mutually exclusive and apply immediately. */ +@Composable +private fun CardboardGroup(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) { + val c = a.cardboard + SettingsGroup(stringResource(R.string.cardboard_title)) { + ToggleRow(host, "cardboard", stringResource(R.string.cardboard_mode), stringResource(R.string.cardboard_mode_hint), + c.enabled, chipModifier = track("cardboard")) { a.onCardboard(c.copy(enabled = it)) } + if (!c.enabled) return@SettingsGroup + ChoiceRow(host, "cardboard-source", stringResource(R.string.cardboard_source), null, + listOf(Cardboard.SOURCE_SCREEN to stringResource(R.string.cardboard_source_screen), + Cardboard.SOURCE_SBS to stringResource(R.string.cardboard_source_sbs)), + c.source, chipModifier = track("cardboard-source")) { a.onCardboard(c.copy(source = it)) } + ChoiceRow(host, "cardboard-viewer", stringResource(R.string.cardboard_viewer), null, + listOf(Cardboard.Viewer.CARDBOARD_V2.id to stringResource(R.string.cardboard_viewer_v2), + Cardboard.Viewer.CARDBOARD_V1.id to stringResource(R.string.cardboard_viewer_v1), + Cardboard.Viewer.NONE.id to stringResource(R.string.cardboard_viewer_none)), + c.viewer, chipModifier = track("cardboard-viewer")) { a.onCardboard(c.copy(viewer = it)) } + SliderRow(stringResource(R.string.cardboard_ipd), null, c.ipdMm, 50..80, step = 1, + format = { "$it mm" }, modifier = track("cardboard-ipd")) { a.onCardboard(c.copy(ipdMm = it)) } + if (c.source == Cardboard.SOURCE_SCREEN) { + SliderRow(stringResource(R.string.cardboard_screen_width), null, c.screenWidthDm, 5..200, step = 5, + format = { String.format(Locale.US, "%.1f m", it / 10f) }, modifier = track("cardboard-width")) { a.onCardboard(c.copy(screenWidthDm = it)) } + SliderRow(stringResource(R.string.cardboard_screen_distance), null, c.screenDistanceDm, 5..200, step = 5, + format = { String.format(Locale.US, "%.1f m", it / 10f) }, modifier = track("cardboard-distance")) { a.onCardboard(c.copy(screenDistanceDm = it)) } + } + ToggleRow(host, "cardboard-tracking", stringResource(R.string.cardboard_head_tracking), + if (a.cardboardSensor) null else stringResource(R.string.cardboard_no_sensor), + c.headTracking && a.cardboardSensor, enabled = a.cardboardSensor, chipModifier = track("cardboard-tracking")) { + a.onCardboard(c.copy(headTracking = it)) + } + if (c.headTracking && a.cardboardSensor) + ActionRow(stringResource(R.string.cardboard_recenter), null, stringResource(R.string.cardboard_recenter_button), a.onCardboardRecenter) + } +} + +@Composable +private fun SteamVrGroup(a: DrawerActions, track: (String) -> Modifier) { + SettingsGroup(stringResource(R.string.steamvr_title)) { + val vrLabel = stringResource(R.string.cardboard_steamvr) + val enterLabel = stringResource(if (a.immersiveSteamVr) R.string.steamvr_enter else R.string.cardboard_steamvr_start) + @Composable fun button(label: String, text: String, action: String) { + SettingsRow(label, null) { + SecondaryButton(text, modifier = track("steamvr"), onClick = { a.onSteamVr(action) }) + } + } + when (a.steamVr) { + SteamVr.Status.NOT_INSTALLED -> button(vrLabel, stringResource(R.string.cardboard_steamvr_install), "install") + SteamVr.Status.INSTALLING -> SettingsRow(vrLabel, stringResource(R.string.cardboard_steamvr_installing)) {} + SteamVr.Status.READY -> button(vrLabel, enterLabel, "start") + SteamVr.Status.RUNNING -> { + if (a.immersiveSteamVr) button(vrLabel, enterLabel, "start") + SettingsRow(vrLabel, null) { + SecondaryButton(stringResource(R.string.cardboard_steamvr_stop), + modifier = track(if (a.immersiveSteamVr) "steamvr-stop" else "steamvr"), onClick = { a.onSteamVr("stop") }) + } + } + SteamVr.Status.UNAVAILABLE -> SettingsRow(vrLabel, stringResource(R.string.cardboard_steamvr_unavailable)) {} + null -> SettingsRow(vrLabel, stringResource(R.string.steamvr_checking)) {} + } + } +} + +@Composable +private fun SteamVrRow(a: DrawerActions) { + val vrLabel = stringResource(R.string.cardboard_steamvr) + when (a.steamVr) { + SteamVr.Status.NOT_INSTALLED -> ActionRow(vrLabel, null, stringResource(R.string.cardboard_steamvr_install), { a.onSteamVr("install") }) + SteamVr.Status.INSTALLING -> SettingsRow(vrLabel, stringResource(R.string.cardboard_steamvr_installing)) {} + SteamVr.Status.READY -> ActionRow(vrLabel, null, stringResource(R.string.cardboard_steamvr_start), { a.onSteamVr("start") }) + SteamVr.Status.RUNNING -> ActionRow(vrLabel, null, stringResource(R.string.cardboard_steamvr_stop), { a.onSteamVr("stop") }) + SteamVr.Status.UNAVAILABLE -> SettingsRow(vrLabel, stringResource(R.string.cardboard_steamvr_unavailable)) {} + null -> {} + } +} + @Composable private fun SecondScreenGroup(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) { val colors = MaterialTheme.colorScheme @@ -874,25 +1028,199 @@ private fun SecondScreenGroup(host: MenuHost, a: DrawerActions, track: (String) } } -/** Texture filtering on the Games page: DXVK options for the next DirectX 9-11 launch. */ +@Composable +private fun DrawerFexPresetRow(host: MenuHost, a: DrawerActions, modifier: Modifier) { + val appId = a.selectedGameProfileId + val profile = a.selectedGameProfile?.takeIf { it.appId == appId } + val inherited = profile?.fexPreset?.inherited == true + val hint = if (profile == null) null else stringResource( + if (inherited) R.string.comp_game_fex_inherited else R.string.comp_game_fex_override, + ) + SettingsRow(stringResource(R.string.fex_preset_title), hint, highlighted = host.open == "fex") { + if (appId != null && profile == null) { + ValueChip("-", false, enabled = false, modifier = modifier) {} + } else { + FexPresetChip( + preset = profile?.fexPreset?.value ?: a.fexPreset, + inherited = inherited, + open = host.open == "fex", + enabled = !a.gameFexPresetSaving, + onToggle = { host.open = if (host.open == "fex") null else "fex" }, + onDismiss = { if (host.open == "fex") host.open = null }, + onPick = { preset -> + if (appId == null) { + preset?.let(a.onFexPreset) + } else { + a.onGameFexPreset(appId, preset) + } + }, + allowInheritance = appId != null, + modifier = modifier, + ) + } + } +} + +@Composable +private fun DrawerNoSteamRow(host: MenuHost, a: DrawerActions, modifier: Modifier) { + val appId = a.selectedGameProfileId ?: return + val profile = a.selectedGameProfile?.takeIf { it.appId == appId } ?: return + ToggleRow( + host, "no-steam", stringResource(R.string.game_no_steam_title), stringResource(R.string.game_no_steam_detail), + profile.startWithoutSteam, enabled = !a.gameNoSteamSaving, chipModifier = modifier, + ) { on -> a.onGameNoSteam(appId, on) } +} + @Composable private fun TextureFilteringGroup(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) { + val inherited = a.selectedGameProfileId != null + val anisotropyChoices: List<Pair<Int?, String>> = + (if (inherited) listOf(null to stringResource(R.string.comp_game_use_general)) else emptyList()) + + SessionPrefs.textureAnisotropyChoices(LocalContext.current).map { (value, label) -> value as Int? to label } + val lodBiasChoices: List<Pair<String?, String>> = + (if (inherited) listOf(null to stringResource(R.string.comp_game_use_general)) else emptyList()) + + SessionPrefs.textureLodBiasChoices(LocalContext.current).map { (value, label) -> value as String? to label } SettingsGroup(stringResource(R.string.drawer_texture)) { ChoiceRow(host, "anisotropy", stringResource(R.string.drawer_anisotropy), null, - SessionPrefs.textureAnisotropyChoices(LocalContext.current), a.textureAnisotropy, chipModifier = track("anisotropy"), onPick = a.onTextureAnisotropy) + anisotropyChoices, a.textureAnisotropy, chipModifier = track("anisotropy"), onPick = a.onTextureAnisotropy) ChoiceRow(host, "texture-sharpness", stringResource(R.string.drawer_texture_sharpness), null, - SessionPrefs.textureLodBiasChoices(LocalContext.current), a.textureLodBias, note = stringResource(R.string.drawer_texture_sharpness_note), + lodBiasChoices, a.textureLodBias, note = stringResource(R.string.drawer_texture_sharpness_note), chipModifier = track("texture-sharpness"), onPick = a.onTextureLodBias) } } private fun signed(v: Int) = if (v > 0) "+$v" else "$v" -/** - * The Games tab's components: quick swaps between what is already installed, per Proton. A swap - * into the Proton a running game uses waits until that game closes; downloading, importing and - * deleting stay on the Components page in the app. - */ +@Composable +private fun SelectedGameProfileGroup(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) { + val colors = MaterialTheme.colorScheme + val options: List<Pair<Long?, String>> = listOf(null to stringResource(R.string.comp_scope_general)) + + a.gameProfiles.map { (id, name) -> Pair(id, name) } + val profile = a.selectedGameProfile + SettingsGroup(stringResource(R.string.drawer_selected_profile)) { + DrawerStackedChoice( + host = host, + key = "game-profile", + label = stringResource(R.string.comp_profile), + hint = if (a.selectedGameProfileId == null) stringResource(R.string.comp_scope_general_detail) + else stringResource(R.string.drawer_profile_inspect_hint), + options = options, + selected = a.selectedGameProfileId, + chipModifier = track("game-profile"), + onPick = a.onSelectedGameProfile, + ) + if (a.gameProfileRefreshFailed) { + Text( + stringResource( + if (a.gameProfilesLoaded) { + R.string.drawer_profile_refresh_failed_stale + } else { + R.string.drawer_profile_refresh_failed_initial + }, + ), + fontSize = 13.sp, + color = colors.error, + modifier = Modifier.padding(horizontal = 14.dp, vertical = 8.dp), + ) + } + if (a.selectedGameProfileId == null) return@SettingsGroup + if (profile == null) { + if (!a.gameProfileRefreshFailed) Text( + stringResource(R.string.drawer_selected_profile_none), + fontSize = 13.sp, + color = colors.onSurfaceVariant, + modifier = Modifier.padding(14.dp), + ) + return@SettingsGroup + } + val hasOverrides = profile.hasOverrides || + a.textureAnisotropy != null || + a.textureLodBias != null + Column(modifier = Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 11.dp)) { + Text( + stringResource( + if (hasOverrides) R.string.drawer_profile_custom + else R.string.drawer_profile_default, + ), + fontSize = 12.sp, + color = colors.onSurfaceVariant, + modifier = Modifier.padding(bottom = if (hasOverrides) 5.dp else 0.dp), + ) + if (!profile.fexPreset.inherited) { + ProfileSummaryRow(stringResource(R.string.comp_game_fex), fexProfileLabel(profile.fexPreset)) + } + if (!profile.proton.inherited) { + ProfileSummaryRow(stringResource(R.string.comp_proton), profileValueLabel(profile.proton)) + } + for (component in ComponentsManager.COMPONENTS) { + val value = profile.components.getValue(component) + if (!value.inherited) { + ProfileSummaryRow(ComponentsManager.LABEL.getValue(component), profileValueLabel(value)) + } + } + if (profile.startWithoutSteam) { + ProfileSummaryRow(stringResource(R.string.game_no_steam_title), stringResource(R.string.game_no_steam_on)) + } + if (profile.environmentOverrides > 0) { + ProfileSummaryRow( + stringResource(R.string.game_env_title), + pluralStringResource( + R.plurals.drawer_profile_environment_overrides, + profile.environmentOverrides, + profile.environmentOverrides, + ), + ) + } + if (profile.windowsComponentNames.isNotEmpty()) { + ProfileSummaryRow( + stringResource(R.string.wincomp_title), + profile.windowsComponentNames.joinToString(", "), + ) + } + a.textureAnisotropy?.let { value -> + ProfileSummaryRow( + stringResource(R.string.drawer_anisotropy), + SessionPrefs.textureAnisotropyChoices(LocalContext.current) + .firstOrNull { it.first == value }?.second.orEmpty(), + ) + } + a.textureLodBias?.let { value -> + ProfileSummaryRow( + stringResource(R.string.drawer_texture_sharpness), + SessionPrefs.textureLodBiasChoices(LocalContext.current) + .firstOrNull { it.first == value }?.second.orEmpty(), + ) + } + } + } +} + +@Composable +private fun fexProfileLabel(value: ProfileValue): String { + return when (value.value) { + GameEnvironment.CUSTOM_FEX_PRESET -> stringResource(R.string.comp_game_fex_custom) + else -> stringResource(FexPreset.byId(value.value).label) + } +} + +@Composable +private fun profileValueLabel(value: ProfileValue) = + value.value.ifEmpty { stringResource(R.string.comp_no_proton_short) } + +@Composable +private fun ProfileSummaryRow(label: String, value: String) { + Row(modifier = Modifier.fillMaxWidth().padding(top = 3.dp)) { + Text(label, fontSize = 12.sp, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.width(96.dp)) + Text( + value, + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onBackground, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + } +} + @Composable private fun ComponentsDrawerPage(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) { val colors = MaterialTheme.colorScheme @@ -903,10 +1231,68 @@ private fun ComponentsDrawerPage(host: MenuHost, a: DrawerActions, track: (Strin } return } + val gameProfile = a.selectedGameProfileId?.let { appId -> + a.selectedGameProfile?.takeIf { it.appId == appId } + } + if (a.selectedGameProfileId != null) { + if (gameProfile == null) { + SettingsGroup(stringResource(R.string.drawer_page_components)) { + Text( + stringResource(R.string.comp_reading), + fontSize = 13.sp, + color = colors.onSurfaceVariant, + modifier = Modifier.padding(14.dp), + ) + } + return + } + SettingsGroup(stringResource(R.string.drawer_page_components)) { + DrawerStackedChoice( + host = host, + key = "game-cmp-proton", + label = stringResource(R.string.comp_proton), + hint = if (gameProfile.proton.inherited && gameProfile.proton.value.isNotEmpty()) { + stringResource(R.string.drawer_component_inherited, gameProfile.proton.value) + } else { + null + }, + options = listOf<Pair<String?, String>>(null to stringResource(R.string.comp_game_use_general)) + + snap.protons.map { it.proton.id to it.proton.name }, + selected = if (gameProfile.proton.inherited) null else gameProfile.protonId, + chipModifier = track("cmp-proton"), + onPick = { id -> a.onGameProton(gameProfile.appId, id) }, + ) + for (comp in ComponentsManager.COMPONENTS) { + val value = gameProfile.components.getValue(comp) + val options: List<Pair<String?, String>> = + listOf(null to stringResource(R.string.comp_game_use_general)) + + snap.packages.filter { it.comp == comp }.map { it.file to it.version } + DrawerStackedChoice( + host = host, + key = "game-cmp-$comp", + label = ComponentsManager.LABEL.getValue(comp), + hint = if (value.inherited) { + stringResource(R.string.drawer_component_inherited, value.value) + } else { + null + }, + options = options, + selected = gameProfile.componentFiles[comp], + chipModifier = track("cmp-$comp"), + onPick = { file -> a.onGameComponent(gameProfile.appId, comp, file) }, + ) + } + } + Text( + stringResource(R.string.drawer_game_components_note, gameProfile.name), + fontSize = 12.sp, + color = colors.onSurfaceVariant, + modifier = Modifier.padding(horizontal = 4.dp, vertical = 12.dp), + ) + return + } val running = snap.protons.filter { it.inUseByGame } - var pick by rememberSaveable { mutableStateOf<String?>(null) } - val view = snap.protons.firstOrNull { it.proton.id == pick } ?: running.firstOrNull() ?: snap.protons.firstOrNull() - // Focusable, so the pad can climb from the Proton box up to it and the page scrolls it into view. + val view = snap.protons.firstOrNull { it.proton.id == a.defaultProtonId } ?: running.firstOrNull() ?: snap.protons.firstOrNull() SettingsGroup(stringResource(R.string.drawer_running_now)) { val src = remember { MutableInteractionSource() } val hot = src.collectIsFocusedAsState().value @@ -947,7 +1333,7 @@ private fun ComponentsDrawerPage(host: MenuHost, a: DrawerActions, track: (Strin view.reappliedAt.takeIf { it > 0 }?.let { stringResource(R.string.drawer_reapplied, java.text.DateFormat.getTimeInstance(java.text.DateFormat.SHORT).format(java.util.Date(it * 1000))) }, ).joinToString(" · "), snap.protons.map { it.proton.id to it.proton.name }, p.id, - chipModifier = track("cmp-proton"), onPick = { pick = it }, + chipModifier = track("cmp-proton"), onPick = { if (it != p.id) a.onDefaultProton(it) }, ) val originalLabel = stringResource(R.string.drawer_original) val build = ComponentsManager.safeName(p.version) @@ -961,7 +1347,6 @@ private fun ComponentsDrawerPage(host: MenuHost, a: DrawerActions, track: (Strin val shown = options.firstOrNull { it.first == current }?.second DrawerStackedChoice( host, "cmp-$comp", ComponentsManager.LABEL.getValue(comp), - // The box already shows the choice: only say more when there is more to say. st.queued?.let { stringResource(R.string.comp_next_queued, it) } ?: st.inUse.takeIf { it != shown }, options, current, note = if (view.inUseByGame) stringResource(R.string.comp_waits_long) else stringResource(R.string.comp_applies_long), @@ -976,10 +1361,83 @@ private fun ComponentsDrawerPage(host: MenuHost, a: DrawerActions, track: (Strin ) } -/** - * A choice for the drawer's narrow column: label, then the box across the full width, then the - * detail underneath - so a long Proton or package name never squeezes the text beside it. - */ +@Composable +internal fun ComponentDownloadsDrawerGroup( + host: MenuHost, + catalog: List<ComponentsManager.CatalogItem>, + catalogAt: Long, + checking: Boolean, + packages: List<ComponentsManager.Package>, + downloads: Map<String, Int>, + onRefresh: () -> Unit, + onDownload: (ComponentsManager.CatalogItem) -> Unit, + track: (String) -> Modifier = { Modifier }, +) { + val colors = MaterialTheme.colorScheme + val installed = packages.map { it.file }.toSet() + SettingsGroup(stringResource(R.string.drawer_component_downloads)) { + Text(stringResource(R.string.drawer_component_downloads_hint), fontSize = 12.sp, + color = colors.onSurfaceVariant, modifier = Modifier.padding(horizontal = 14.dp, vertical = 8.dp)) + SettingsRow(stringResource(R.string.comp_nightlies_checked, + if (catalogAt > 0) java.text.DateFormat.getTimeInstance(java.text.DateFormat.SHORT) + .format(java.util.Date(catalogAt * 1000)) else stringResource(R.string.comp_never)), null, stacked = true) { + ValueChip(stringResource(if (checking) R.string.common_checking else R.string.stores_refresh), + false, enabled = !checking, modifier = track("cmp-download-refresh"), onClick = onRefresh) + } + for (comp in ComponentsManager.COMPONENTS) { + val key = "cmp-download-$comp" + val items = catalog.filter { it.comp == comp } + val open = host.open == key + Column(Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 10.dp)) { + Text(ComponentsManager.LABEL.getValue(comp), fontSize = 15.sp, + fontWeight = FontWeight.SemiBold, color = colors.onBackground) + Box(Modifier.fillMaxWidth().padding(top = 6.dp)) { + ValueChip(stringResource(R.string.drawer_component_choose_download), open, + enabled = items.isNotEmpty(), modifier = track(key).fillMaxWidth()) { + host.open = if (open) null else key + } + AnchoredMenu(open, onDismiss = { if (host.open == key) host.open = null }, + title = ComponentsManager.LABEL.getValue(comp)) { firstItemFocus -> + val firstAvailable = items.firstOrNull { ComponentsManager.safeName(it.file) !in installed && it.file !in downloads } + items.forEach { item -> + val stored = ComponentsManager.safeName(item.file) in installed + val progress = downloads[item.file] + MenuItem(item.file.removeSuffix(".wcp"), checked = stored, + enabled = !stored && progress == null, + detail = when { + stored -> stringResource(R.string.wincomp_downloaded) + progress != null -> if (progress < 0) stringResource(R.string.wincomp_downloading, item.file.removeSuffix(".wcp")) else "$progress%" + else -> item.release + " · " + stringResource(R.string.common_size_mb, item.size / 1048576.0) + }, + focusRequester = if (item == firstAvailable) firstItemFocus else null, + ) { + onDownload(item) + host.open = null + } + } + } + } + } + } + if (catalog.isEmpty() && !checking) Text( + stringResource(if (catalogAt == 0L) R.string.comp_refresh_to_list else R.string.comp_nothing_new), + fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(14.dp), + ) + for ((file, progress) in downloads) { + Column(Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 8.dp)) { + Text(stringResource(R.string.wincomp_downloading, file.removeSuffix(".wcp")), + fontSize = 12.sp, color = colors.onSurfaceVariant) + if (progress < 0) LinearProgressIndicator(modifier = Modifier.fillMaxWidth().padding(top = 4.dp)) + else { + Text("$progress%", fontSize = 12.sp, color = colors.onSurfaceVariant) + LinearProgressIndicator(progress = { progress / 100f }, + modifier = Modifier.fillMaxWidth().padding(top = 4.dp)) + } + } + } + } +} + @Composable private fun <T> DrawerStackedChoice( host: MenuHost, key: String, label: String, hint: String?, @@ -1013,7 +1471,6 @@ private fun <T> DrawerStackedChoice( Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line)) } -/** A close row of icons: inactive tabs stay legible while the active tab leads. */ private const val DRAWER_TAB_SPACING_DP = 48f private const val DRAWER_TAB_LEAN_DP = 8f @@ -1022,18 +1479,11 @@ private const val DRAWER_TAB_SIDE_SCALE = 0.8f private const val DRAWER_TAB_SIDE_ALPHA = 0.8f -/** Room between the Stop pill and the box that steps out under it: the pull. */ private val StepPull = 6.dp private val StepBoxCorner = 16.dp private val StepFillet = 10.dp private val StepBoxMaxWidth = 264.dp -/** - * Stop's confirm, grown out of the Stop pill at [pill] (px, in the sheet): a pull the pill's width - * drops out of it and a wider box steps out to the left under it for the choices, right edges - * flush, so Stop lands under the pill. Cancel, B and a tap outside fold it back into the pill, - * width first. [onStop] gets Stop's bounds on screen for the flood. - */ @Composable private fun StopConfirm( open: Boolean, @@ -1049,7 +1499,6 @@ private fun StopConfirm( val tint = remember { Animatable(0f) } val dim = remember { Animatable(0f) } val items = remember { List(3) { Animatable(0f) } } - // Composed from the first open until it has folded back into the pill. var shown by remember { mutableStateOf(false) } var grown by remember { mutableStateOf(false) } var content by remember { mutableStateOf<IntSize?>(null) } @@ -1103,7 +1552,6 @@ private fun StopConfirm( val p = pill ?: return Box(Modifier.fillMaxSize()) { - // The rest of the sheet dims behind it, and a tap there cancels. Box( Modifier.fillMaxSize().graphicsLayer { alpha = dim.value }.background(Color(0x59000000)) .clickable(interactionSource = remember { MutableInteractionSource() }, indication = null, enabled = open, onClick = onCancel), @@ -1120,7 +1568,6 @@ private fun StopConfirm( drawPath(path, lerp(hotFill, restFill, tint.value)) drawPath(path, colors.error.copy(alpha = lerp(0.9f, 0.55f, tint.value)), style = Stroke(rim)) } - // The pill's label rides on top, as the pull's handle. Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp), modifier = Modifier.offset { IntOffset(p.left.roundToInt(), p.top.roundToInt()) } @@ -1138,7 +1585,6 @@ private fun StopConfirm( .onSizeChanged { if (content != it) content = it } .controllerBack(onCancel) .onPreviewKeyEvent { e -> - // Keep a controller in here, as the dialog's own window used to. if (e.type != KeyEventType.KeyDown) return@onPreviewKeyEvent false when (e.key) { Key.DirectionUp, Key.DirectionDown -> true @@ -1177,7 +1623,6 @@ private fun StopConfirm( } } -/** One of the confirm's two choices: a capsule that fills when focused; Stop in the danger red. */ @Composable private fun ConfirmChoice(label: String, danger: Boolean, enabled: Boolean, modifier: Modifier = Modifier, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SettingsWidgets.kt b/app/src/main/java/com/droiddeck/launcher/ui/SettingsWidgets.kt index c94818f0d5..8db2cc793b 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/SettingsWidgets.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/SettingsWidgets.kt @@ -62,6 +62,7 @@ import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -98,6 +99,7 @@ import androidx.compose.ui.text.style.TextAlign import kotlin.math.roundToInt import androidx.compose.ui.input.InputMode import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalInputModeManager import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow @@ -115,7 +117,6 @@ import androidx.compose.ui.window.PopupProperties private val RowShape = RoundedCornerShape(12.dp) private val GroupShape = RoundedCornerShape(14.dp) -/** Whether a pad's A is held right now, as the activity sees it: a focus move waits for its release. */ internal object HeldKeys { @Volatile var confirm = false } @@ -140,7 +141,6 @@ internal fun Modifier.controllerBack(onBack: () -> Unit): Modifier = onPreviewKe } } -/** LB and RB turn a page's tabs; the keys are taken whenever focus is anywhere inside [this]. */ internal fun Modifier.bumpers(onPrevious: () -> Unit, onNext: () -> Unit): Modifier = onPreviewKeyEvent { event -> val keyEvent = event.nativeKeyEvent val previous = keyEvent.keyCode == KeyEvent.KEYCODE_BUTTON_L1 @@ -152,11 +152,6 @@ internal fun Modifier.bumpers(onPrevious: () -> Unit, onNext: () -> Unit): Modif } } -/** - * A page's tabs with the pad's bumpers drawn beside them. The host turns them with LB/RB (see - * [bumpers]); the keycaps are for touch and stay out of the d-pad's path. The row scrolls sideways - * when a narrow page cannot fit every tab. - */ @OptIn(androidx.compose.foundation.ExperimentalFoundationApi::class) @Composable internal fun TabStrip( @@ -166,8 +161,6 @@ internal fun TabStrip( val colors = MaterialTheme.colorScheme val pal = LocalPalette.current val shape = RoundedCornerShape(12.dp) - // Tabs that overflow (long labels on a small phone) first close up; only what still does not - // fit scrolls. Once tight the row stays tight, so it cannot flip back and forth. val scroll = rememberScrollState() var tight by remember(tabs) { mutableStateOf(false) } LaunchedEffect(scroll.maxValue) { if (scroll.maxValue in 1 until Int.MAX_VALUE) tight = true } @@ -184,7 +177,6 @@ internal fun TabStrip( val hot = src.collectIsFocusedAsState().value || src.collectIsHoveredAsState().value val pick = { onSelect(i) } val tabShape = RoundedCornerShape(9.dp) - // The chosen tab scrolls fully into view, so one at the end is not left cut off. val reveal = remember { androidx.compose.foundation.relocation.BringIntoViewRequester() } if (on) LaunchedEffect(Unit) { reveal.bringIntoView() } Text( @@ -207,7 +199,6 @@ internal fun TabStrip( } } -/** A bumper drawn as a keycap, 44dp to touch; the pad presses the real one. */ @Composable private fun BumperKey(label: String, description: String, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -228,7 +219,6 @@ private fun BumperKey(label: String, description: String, onClick: () -> Unit) { } } -/** The narrowest a setting's value box gets; the session menu's sheet sets it lower. */ val LocalChipMinWidth = androidx.compose.runtime.compositionLocalOf { 150.dp } class MenuHost { @@ -238,7 +228,6 @@ class MenuHost { @Composable fun rememberMenuHost(): MenuHost = remember { MenuHost() } -/** Under the anchor with left edges aligned, kept on screen: a dropdown that belongs to a tab. */ private class BelowStartProvider(private val gap: Int) : PopupPositionProvider { override fun calculatePosition(anchorBounds: IntRect, windowSize: IntSize, layoutDirection: LayoutDirection, popupContentSize: IntSize): IntOffset { var x = anchorBounds.left @@ -265,7 +254,6 @@ private class BelowEndProvider(private val gap: Int) : PopupPositionProvider { @Composable fun AnchoredMenu( open: Boolean, onDismiss: () -> Unit, title: String? = null, note: String? = null, - /** A tab's dropdown: under its anchor, left edges aligned, as wide as its entries (within [minWidth]..260 dp). */ compact: Boolean = false, minWidth: androidx.compose.ui.unit.Dp = 120.dp, content: @Composable ColumnScope.(FocusRequester) -> Unit, ) { @@ -281,19 +269,20 @@ fun AnchoredMenu( android.util.Log.i("AnchoredMenu", "requested first option focus") } } - val gap = with(LocalDensity.current) { 6.dp.roundToPx() } + val density = LocalDensity.current + val configuration = LocalConfiguration.current + val gap = with(density) { 6.dp.roundToPx() } val provider = remember(gap, compact) { if (compact) BelowStartProvider(gap) else BelowEndProvider(gap) } val colors = MaterialTheme.colorScheme val pal = LocalPalette.current Popup(popupPositionProvider = provider, onDismissRequest = onDismiss, properties = PopupProperties(focusable = true)) { + CompositionLocalProvider(LocalDensity provides density, LocalConfiguration provides configuration) { AnimatedVisibility( visibleState = state, enter = fadeIn(Motion.tw(180)) + scaleIn(Motion.sp(0.7f), initialScale = 0.94f, transformOrigin = TransformOrigin(if (compact) 0f else 1f, 0f)), exit = fadeOut(Motion.tw(140)) + scaleOut(Motion.tw(140), targetScale = 0.96f, transformOrigin = TransformOrigin(if (compact) 0f else 1f, 0f)), label = "menu", ) { - // A long list (a driver menu with its downloads) must not run off the screen: the menu is - // capped at most of the window's height and its entries scroll under the fixed title. val maxHeight = (androidx.compose.ui.platform.LocalConfiguration.current.screenHeightDp * 0.86f).dp Column( modifier = Modifier @@ -310,8 +299,6 @@ fun AnchoredMenu( title.uppercase(), fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.5.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(start = 10.dp, top = 6.dp, bottom = 6.dp), ) - // While entries remain below the fold the list fades out at the bottom over a down - // arrow, so a short screen (a phone in landscape) shows that the menu goes on. val scroll = rememberScrollState() Box(Modifier.weight(1f, fill = false)) { Column( @@ -345,6 +332,7 @@ fun AnchoredMenu( } } } + } } } @@ -360,7 +348,6 @@ fun MenuItem( val src = remember { MutableInteractionSource() } val hot = src.collectIsFocusedAsState().value || src.collectIsHoveredAsState().value val shift by animateFloatAsState(if (hot) 2f else 0f, Motion.sp(0.5f), label = "miShift") - // A menu taller than the screen opens scrolled to the current choice, not past it. val reveal = remember { androidx.compose.foundation.relocation.BringIntoViewRequester() } if (checked) LaunchedEffect(Unit) { reveal.bringIntoView() } Row( @@ -423,7 +410,6 @@ fun ValueChip(text: String, open: Boolean, enabled: Boolean = true, modifier: Mo fun SettingsGroup(title: String, compact: Boolean = false, content: @Composable ColumnScope.() -> Unit) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current - // In a lifted sheet each group fades and rises in on its own beat. Column(Modifier.fillMaxWidth().sheetPiece()) { Row( verticalAlignment = Alignment.CenterVertically, @@ -437,13 +423,8 @@ fun SettingsGroup(title: String, compact: Boolean = false, content: @Composable } } -/** - * One setting: its label and [hint] with the [control] beside them. [hintLines] fixes the hint to - * that many lines, for a hint that changes with the value - the row keeps its height, so the rows - * under it stay put. - */ @Composable -fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hintLines: Int? = null, control: @Composable () -> Unit) { +fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hintLines: Int? = null, stacked: Boolean = false, control: @Composable () -> Unit) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current val bg by animateColorAsState(if (highlighted) pal.signal.copy(alpha = 0.10f) else Color.Transparent, Motion.tw(200), label = "rowBg") @@ -451,8 +432,7 @@ fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hint Text(hint ?: "", fontSize = size, color = colors.onSurfaceVariant, modifier = Modifier.padding(top = 2.dp), minLines = hintLines ?: 1, maxLines = hintLines ?: Int.MAX_VALUE, overflow = TextOverflow.Ellipsis) } - // A narrow page stacks the control under its label, so neither squeezes the other. - if (LocalNarrowPane.current) Column( + if (stacked || LocalNarrowPane.current) Column( modifier = Modifier.fillMaxWidth().background(bg).padding(start = 14.dp, end = 14.dp, top = 11.dp, bottom = 12.dp), ) { Text(label, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground) @@ -475,9 +455,7 @@ fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hint fun <T> ChoiceRow( host: MenuHost, key: String, label: String, hint: String?, options: List<Pair<T, String>>, selected: T, enabled: Boolean = true, note: String? = null, - /** For the box itself - a page's FocusRequester for its first control. */ chipModifier: Modifier = Modifier, - /** See SettingsRow: a fixed height for a hint that changes with the choice. */ hintLines: Int? = null, onPick: (T) -> Unit, ) { @@ -497,7 +475,6 @@ fun <T> ChoiceRow( } } -/** A small "?" beside a value the app guessed and is not sure of; [description] says what to check. */ @Composable fun UncertainMark(description: String) { val colors = MaterialTheme.colorScheme @@ -516,7 +493,6 @@ fun ToggleRow(host: MenuHost, key: String, label: String, hint: String?, checked ToggleSwitch(checked, enabled, label, chipModifier.testTag("setting-$key")) { host.open = null; onChange(it) } } -/** An on/off switch: one tap or one A press flips it, where a menu of On and Off took three. */ @Composable fun ToggleSwitch(checked: Boolean, enabled: Boolean = true, label: String? = null, modifier: Modifier = Modifier, onChange: (Boolean) -> Unit) { val colors = MaterialTheme.colorScheme @@ -529,7 +505,6 @@ fun ToggleSwitch(checked: Boolean, enabled: Boolean = true, label: String? = nul val onLabel = stringResource(R.string.widgets_on) val offLabel = stringResource(R.string.widgets_off) val shape = RoundedCornerShape(99.dp) - // 48dp tall to touch; the visible track sits inside it. Box( contentAlignment = Alignment.Center, modifier = modifier @@ -554,11 +529,6 @@ fun ToggleSwitch(checked: Boolean, enabled: Boolean = true, label: String? = nul } } -/** - * A bounded value as a track: the d-pad's left and right step it by [step] (held, it keeps - * going), a finger drags or taps it, and [format] prints the value beside it. [modifier] goes on - * the focusable part, for a page's focus tracking. - */ @Composable fun SliderRow( label: String, hint: String?, value: Int, range: IntRange, step: Int = 1, enabled: Boolean = true, @@ -591,7 +561,6 @@ fun ValueSlider( var trackPx by remember { mutableIntStateOf(0) } val text = format(value) val shape = RoundedCornerShape(8.dp) - // Preserve off-grid preset values until the user adjusts; every input snaps to the same step. fun stepped(v: Int) = (((v - range.first).toFloat() / step).roundToInt() * step + range.first).coerceIn(range.first, range.last) fun fromX(x: Float) { val width = trackPx - 2 * thumbInset @@ -611,7 +580,6 @@ fun ValueSlider( val left = keyEvent.keyCode == KeyEvent.KEYCODE_DPAD_LEFT if (!left && keyEvent.keyCode != KeyEvent.KEYCODE_DPAD_RIGHT) false else { - // Repeated key-down events let a held direction keep adjusting. if (enabled && keyEvent.action == KeyEvent.ACTION_DOWN) { val next = stepped(value + if (left) -step else step) if (next != value) currentOnChange(next) @@ -691,13 +659,10 @@ fun SettingsPage( onBack: () -> Unit, eyebrow: String? = null, lede: String? = null, - /** A small control at the right of the title (the driver pages' refresh button). */ action: (@Composable () -> Unit)? = null, - /** Pass one held above the page to keep its scroll position across a page opened over it. */ scroll: androidx.compose.foundation.ScrollState? = null, scrollContent: Boolean = true, compactLayout: Boolean = false, - /** Fixed controls below the title, or beside Back when the title is omitted. */ header: (@Composable () -> Unit)? = null, modifier: Modifier = Modifier, content: @Composable ColumnScope.() -> Unit, @@ -725,7 +690,6 @@ fun SettingsPage( } } } else if (narrow) { - // Back and the title share one line: a 4:3 screen has no height to spare. Rise(0) { Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), @@ -796,13 +760,9 @@ fun SettingsPage( } } -/** - * A short row of tabs with one chosen: a pill in the signal blue slides under the choice and its - * label turns to sit on it. Left and right move between tabs; a tap or A picks one. [selected] - * null leaves no tab chosen. - */ @Composable -fun <T> SegmentedTabs(options: List<Pair<T, String>>, selected: T?, modifier: Modifier = Modifier, onPick: (T) -> Unit) { +fun <T> SegmentedTabs(options: List<Pair<T, String>>, selected: T?, modifier: Modifier = Modifier, + tabModifier: (T) -> Modifier = { Modifier }, onPick: (T) -> Unit) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current val index = options.indexOfFirst { it.first == selected } @@ -839,7 +799,7 @@ fun <T> SegmentedTabs(options: List<Pair<T, String>>, selected: T?, modifier: Mo val pick = { onPick(value) } Box( contentAlignment = Alignment.Center, - modifier = Modifier.width(segment).fillMaxHeight() + modifier = tabModifier(value).width(segment).fillMaxHeight() .clip(pillShape) .glideBorder(hot, pillShape, if (chosen) pal.onSignal else pal.signal) .semantics { role = Role.Tab; this.selected = chosen } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SharedMotion.kt b/app/src/main/java/com/droiddeck/launcher/ui/SharedMotion.kt index 4d01f20da4..aa37d5f48d 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/SharedMotion.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/SharedMotion.kt @@ -13,8 +13,10 @@ import androidx.compose.runtime.key import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberUpdatedState import androidx.compose.ui.Modifier import androidx.compose.ui.geometry.CornerRadius +import androidx.compose.ui.draw.drawWithContent import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Rect import androidx.compose.ui.geometry.Size @@ -35,19 +37,9 @@ import kotlin.math.abs import kotlin.math.atan2 import kotlin.math.sin -// The moves the stores made first, for any section: one selection shape that glides along a row -// (or down a column) of choices, and a pressed control that squashes into a dot and flies home. -/** Which way a [ChipGlide]'s choices run. */ internal enum class GlideAxis { Horizontal, Vertical } -/** - * The selection under a row of chips: [at] (in the row) of chip [index], in [tint]. A move to the - * next chip stretches it - the leading edge on the focus ring's lead spring, the trailing one a - * beat later on its trail spring - and a hop past a chip pinches it to a drop, carries it and - * opens it. [axis] runs it down a column instead (the rail, a stack of layers). [corner] is the - * chips' own corner; null draws a capsule. [fill] and [outline] are the resting alphas. - */ @Composable internal fun BoxScope.ChipGlide( index: Int, @@ -57,17 +49,22 @@ internal fun BoxScope.ChipGlide( corner: Dp? = null, fill: Float = 0.16f, outline: Float = 0.7f, + visible: Boolean = true, ) { val density = androidx.compose.ui.platform.LocalDensity.current - // The two edges along the axis (left and right, or top and bottom), and the two across it. val start = remember { Animatable(Float.NaN) } val end = remember { Animatable(0f) } val pinch = remember { Animatable(0f) } + val pad = androidx.compose.ui.platform.LocalInputModeManager.current.inputMode == androidx.compose.ui.input.InputMode.Keyboard + @Suppress("NAME_SHADOWING") val visible = visible && !pad + val shown = remember { Animatable(if (visible) 1f else 0f) } + val visibleNow = rememberUpdatedState(visible) + LaunchedEffect(visible) { shown.animateTo(if (visible) 1f else 0f, Motion.tw(if (visible) 160 else 120)) } val crossStart = remember { mutableStateOf(0f) } val crossEnd = remember { mutableStateOf(0f) } val was = remember { intArrayOf(-1) } val vertical = axis == GlideAxis.Vertical - LaunchedEffect(index, at) { + LaunchedEffect(index, at, Motion.scale) { val b = at ?: return@LaunchedEffect val s = if (vertical) b.top else b.left val e = if (vertical) b.bottom else b.right @@ -76,18 +73,18 @@ internal fun BoxScope.ChipGlide( val from = was[0] was[0] = index if (start.value.isNaN() || from == index || from < 0 || Motion.scale == 0f) { + start.snapTo(s); end.snapTo(e); pinch.snapTo(0f) + if (visibleNow.value) shown.snapTo(1f) + return@LaunchedEffect + } + if (!visibleNow.value || shown.value < 0.5f) { start.snapTo(s); end.snapTo(e); pinch.snapTo(0f) return@LaunchedEffect } coroutineScope { - if (abs(index - from) > 1) { - // Too far to stretch: pinch into a drop where it is, carry it over, open it there. - pinch.animateTo(1f, Motion.tw(90)) - val l = launch { start.animateTo(s, Motion.sp(0.7f, 380f)) } - val r = launch { end.animateTo(e, Motion.sp(0.7f, 380f)) } - l.join(); r.join() - pinch.animateTo(0f, Motion.sp(0.6f, 500f)) - } else { + run { + launch { pinch.animateTo(0f, Motion.sp(0.6f, 500f)) } + launch { shown.animateTo(1f, Motion.tw(120)) } val forward = index > from val (lead, trail) = if (forward) end to start else start to end val leadTo = if (forward) e else s @@ -105,25 +102,36 @@ internal fun BoxScope.ChipGlide( val size = shape.size val round = minOf(size.width, size.height) / 2f val r = CornerRadius(corner?.let { lerp(minOf(with(density) { it.toPx() }, round), round, p) } ?: round) - // A drop in flight is solid; on a chip it is the chip's tinted fill and outline. - drawRoundRect(tint.value.copy(alpha = lerp(fill, 0.9f, p)), at0, size, r) + val a = shown.value + drawRoundRect(tint.value.copy(alpha = lerp(fill, 0.9f, p) * a), at0, size, r) if (outline > 0f) { - // Inside the chip's edge: a stroke on it would lose its outer half to a scrolling row's clip. val w = with(density) { 1.dp.toPx() } val inset = w / 2f drawRoundRect( - tint.value.copy(alpha = outline * (1f - p)), at0 + Offset(inset, inset), Size(size.width - w, size.height - w), + tint.value.copy(alpha = outline * (1f - p) * a), at0 + Offset(inset, inset), Size(size.width - w, size.height - w), CornerRadius((r.x - inset).coerceAtLeast(0f)), style = Stroke(w), ) } } } -/** - * Where a glide's shape is: its edges along the axis at [start] and [end] (either order), across - * it from [crossStart] to [crossEnd], pinched [pinch] of the way (0 to 1) into a drop [drop] each - * side of its centre. [vertical] runs the axis down instead of across. - */ +@Composable +internal fun Modifier.shownBar(on: Boolean, color: Color, vertical: Boolean = false): Modifier { + val shown = androidx.compose.animation.core.animateFloatAsState(if (on) 1f else 0f, Motion.tw(if (on) 140 else 100), label = "shownBar").value + return drawWithContent { + drawContent() + if (shown <= 0.01f) return@drawWithContent + val t = 3.dp.toPx() + if (vertical) { + val l = size.height * 0.5f + drawRect(color, Offset(0f, (size.height - l) / 2f), Size(t, l), alpha = shown) + } else { + val w = size.width * 0.36f + drawRect(color, Offset((size.width - w) / 2f, size.height - t), Size(w, t), alpha = shown) + } + } +} + internal fun glideShape(start: Float, end: Float, crossStart: Float, crossEnd: Float, pinch: Float, drop: Float, vertical: Boolean): Rect { val a0 = minOf(start, end) val a1 = maxOf(start, end) @@ -136,11 +144,6 @@ internal fun glideShape(start: Float, end: Float, crossStart: Float, crossEnd: F return if (vertical) Rect(c0, s0, c1, s1) else Rect(s0, c0, s1, c1) } -/** - * A dot on its way somewhere: from the control at [from] (root px) to the point [to] gives (root - * px, asked each frame, so a target that moves is followed). [color] null is the palette's signal - * blue. [onHalf] runs as it passes the top of its arc, [onLand] once it lands. - */ internal class Flight( val from: Rect, val to: Density.() -> Offset?, @@ -153,27 +156,20 @@ internal class Flight( private companion object { var next = 0L } } -/** Dots flying anywhere outside the Stores page (which keeps its own): a hop, a swap, a toggle. */ internal object Flights { val all = mutableStateListOf<Flight>() - /** Sends [f], or with animations off just runs its ends. */ fun fly(f: Flight) { if (Motion.scale == 0f) { f.onHalf(); f.onLand(); return } all += f } } -/** [Flights] drawn over everything, in the space of an element at [origin] (root px). */ @Composable internal fun FlightsLayer(origin: Offset) { for (f in Flights.all.toList()) key(f.id) { FlightDot(f, origin) { Flights.all.remove(f) } } } -/** - * One dot: the control squashes into a 14dp dot (width first, a little bloop), which then flies - * on an arc to its target, stretched along its path like the focus ring's drop. - */ @Composable internal fun FlightDot(f: Flight, origin: Offset, onDone: () -> Unit) { val pal = LocalPalette.current @@ -195,7 +191,6 @@ internal fun FlightDot(f: Flight, origin: Offset, onDone: () -> Unit) { val b = (f.to(this) ?: return@Canvas) - origin val v = t.value if (v < 1f) { - // Squash: the width goes first, then the height, into the dot; a bloop at the end. val w = lerp(from.width, 2 * r, (v * 1.4f).coerceAtMost(1f)) val h = lerp(from.height, 2 * r, ((v - 0.25f) / 0.75f).coerceIn(0f, 1f)) val k = 1f - 0.15f * sin(PI * v).toFloat() @@ -217,10 +212,6 @@ internal fun FlightDot(f: Flight, origin: Offset, onDone: () -> Unit) { } } -/** - * A row that scrolls sideways fades out at an edge it has more past, instead of slicing a pill or - * a card through: the content's own alpha, so whatever is behind the row shows through. - */ internal fun Modifier.edgeFade(scroll: androidx.compose.foundation.ScrollState, width: Dp = 28.dp): Modifier = this.graphicsLayer { compositingStrategy = androidx.compose.ui.graphics.CompositingStrategy.Offscreen } .drawWithContent { diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SheetRows.kt b/app/src/main/java/com/droiddeck/launcher/ui/SheetRows.kt index ac6364a2a0..2b2ecf9048 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/SheetRows.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/SheetRows.kt @@ -5,10 +5,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource import com.droiddeck.launcher.R -// The rows the lifted sheets add to what the session settings already had: frame generation, -// Performance and the link to the GPU drivers on Components. -/** Frame generation, moved here from Setup: it is how Play's games are drawn. */ @Composable internal fun FrameGenGroup(s: FrontEndState, a: FrontEndActions) { val host = rememberMenuHost() @@ -22,10 +19,6 @@ internal fun FrameGenGroup(s: FrontEndState, a: FrontEndActions) { } } -/** - * Performance (CPU core assignment), opened from the sheet's Session chip: its page floods out of - * this row, and Back draws it into the row again with the sheet lifted where it was. - */ @Composable internal fun PerformanceLink(a: FrontEndActions, rail: String, tab: String) { val id = "sheet:performance" @@ -41,10 +34,6 @@ internal fun PerformanceLink(a: FrontEndActions, rail: String, tab: String) { } } -/** - * The GPU drivers in use, read only, and a link to where they are set: A hops to Components with - * the GPU drivers layer chosen, and B there comes back to this row. - */ @Composable internal fun DriversLink(a: FrontEndActions, summary: String?, rail: String, back: String) { val id = "sheet:gpu-drivers" diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SpatialTrackingActivity.kt b/app/src/main/java/com/droiddeck/launcher/ui/SpatialTrackingActivity.kt new file mode 100644 index 0000000000..76539855d9 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/SpatialTrackingActivity.kt @@ -0,0 +1,258 @@ +package com.droiddeck.launcher.ui + +import android.os.Bundle +import android.os.CancellationSignal +import android.os.ParcelFileDescriptor +import android.print.* +import android.graphics.Bitmap +import android.graphics.pdf.PdfDocument +import android.graphics.Rect +import android.graphics.RectF +import android.graphics.Color +import android.graphics.Paint +import android.text.Layout +import android.text.StaticLayout +import android.text.TextPaint +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.* +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.asImageBitmap +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import com.droiddeck.launcher.R +import com.droiddeck.launcher.core.AppUiPrefs +import com.droiddeck.launcher.glasses.CalibrationDistance +import com.droiddeck.launcher.glasses.Glasses +import com.droiddeck.launcher.glasses.SpatialCalibrationProgress +import com.droiddeck.launcher.glasses.SpatialTracking +import com.droiddeck.launcher.glasses.SpatialTrackingStatus +import com.droiddeck.launcher.glasses.StereoCalibrator +import kotlinx.coroutines.delay +import org.opencv.android.OpenCVLoader +import org.opencv.android.Utils +import org.opencv.core.Mat +import org.opencv.core.Size + +class SpatialTrackingActivity : ComponentActivity() { + override fun attachBaseContext(newBase: android.content.Context) { + super.attachBaseContext(newBase) + com.droiddeck.launcher.core.AppLanguage.applyTo(this, newBase) + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + if (!Glasses.state.value.spatialConnected) { finish(); return } + requestedOrientation = com.droiddeck.launcher.session.SessionPrefs.orientation(this) + setContent { + DroidDeckTheme(appScale = AppUiPrefs.scale(this)) { + val glasses by Glasses.state.collectAsState() + if (!glasses.spatialConnected) { + LaunchedEffect(Unit) { SpatialTracking.diagnostics(false); finish() } + return@DroidDeckTheme + } + var preview by remember { mutableStateOf<Bitmap?>(null) } + var message by remember { mutableStateOf("") } + var progress by remember { mutableStateOf(SpatialCalibrationProgress()) } + var gpu by remember { mutableStateOf(SpatialTracking.gpuEnabled()) } + var lite by remember { mutableStateOf(SpatialTracking.handLiteEnabled()) } + var halfRate by remember { mutableStateOf(SpatialTracking.handHalfRateEnabled()) } + var adaptive by remember { mutableStateOf(SpatialTracking.handAdaptiveInputEnabled()) } + val status by SpatialTracking.status.collectAsState() + LaunchedEffect(Unit) { + while(true) { + SpatialTracking.refreshStatus() + preview = SpatialTracking.diagnosticFrame() + message = SpatialTracking.diagnosticMessage() + progress = SpatialTracking.calibrationProgress() + gpu = SpatialTracking.gpuEnabled() + lite = SpatialTracking.handLiteEnabled() + halfRate = SpatialTracking.handHalfRateEnabled() + adaptive = SpatialTracking.handAdaptiveInputEnabled() + delay(200) + } + } + SpatialSetupScreen(status, progress, preview, message, SpatialSetupActions( + recenter = { SpatialTracking.recenter(false) }, restart = Glasses::restartSpatialTracking, + print = ::printBoard, start = SpatialTracking::calibrationStart, + capture = SpatialTracking::calibrationCapture, solve = SpatialTracking::calibrationSolve, + validate = SpatialTracking::calibrationValidate, gpu = SpatialTracking::setGpu, + lite = SpatialTracking::setHandModel, halfRate = SpatialTracking::setHandHalfRate, + adaptive = SpatialTracking::setHandAdaptiveInput, + saveFrame = SpatialTracking::captureDiagnostic, done = { finish() }), gpu, lite, halfRate, adaptive) + } + } + } + override fun onResume() { + super.onResume() + if (Glasses.state.value.spatialConnected) SpatialTracking.diagnostics(true) else finish() + } + override fun onPause() { SpatialTracking.diagnostics(false);super.onPause() } + private fun printBoard() { + if(!OpenCVLoader.initLocal()) return + val c=StereoCalibrator(this);val mat=Mat() + c.board.generateImage(Size(1500.0,2100.0),mat,0,1) + val bitmap=Bitmap.createBitmap(1500,2100,Bitmap.Config.ARGB_8888) + Utils.matToBitmap(mat,bitmap);mat.release();c.close() + val manager=getSystemService(PRINT_SERVICE) as PrintManager + manager.print(getString(R.string.spatial_print_job),object:PrintDocumentAdapter() { + override fun onLayout(old: PrintAttributes?, new: PrintAttributes, signal: CancellationSignal, callback: LayoutResultCallback, extras: Bundle?) { + callback.onLayoutFinished(PrintDocumentInfo.Builder("droiddeck-charuco.pdf").setPageCount(1).setContentType(PrintDocumentInfo.CONTENT_TYPE_DOCUMENT).build(),true) + } + override fun onWrite(pages: Array<out PageRange>, destination: ParcelFileDescriptor, signal: CancellationSignal, callback: WriteResultCallback) { + if(signal.isCanceled) { callback.onWriteCancelled();return } + try { + val pdf=PdfDocument() + try { + val page=pdf.startPage(PdfDocument.PageInfo.Builder(595,842,1).create()) + val scale=72f/25.4f + page.canvas.drawBitmap(bitmap,Rect(0,0,1500,2100),RectF(30*scale,35*scale,180*scale,245*scale),null) + val ink = Paint(Paint.ANTI_ALIAS_FLAG).apply { color = Color.BLACK; textSize = 11f; textAlign = Paint.Align.CENTER } + printText(page.canvas, getString(R.string.spatial_print_title), 12*scale, ink) + ink.textSize = 9f + printText(page.canvas, getString(R.string.spatial_print_scale), 21*scale, ink) + printText(page.canvas, getString(R.string.spatial_print_stationary), 254*scale, ink) + page.canvas.drawLine(55*scale, 270*scale, 155*scale, 270*scale, ink) + page.canvas.drawLine(55*scale, 268*scale, 55*scale, 272*scale, ink) + page.canvas.drawLine(155*scale, 268*scale, 155*scale, 272*scale, ink) + printText(page.canvas, getString(R.string.spatial_print_check), 276*scale, ink) + pdf.finishPage(page) + java.io.FileOutputStream(destination.fileDescriptor).use { pdf.writeTo(it) } + } finally { pdf.close() } + callback.onWriteFinished(arrayOf(PageRange.ALL_PAGES)) + } catch(e: Exception) { callback.onWriteFailed(e.message) } + } + override fun onFinish() { bitmap.recycle() } + },PrintAttributes.Builder().setMediaSize(PrintAttributes.MediaSize.ISO_A4).setColorMode(PrintAttributes.COLOR_MODE_MONOCHROME) + .setMinMargins(PrintAttributes.Margins.NO_MARGINS).build()) + } + + private fun printText(canvas: android.graphics.Canvas, text: String, y: Float, ink: Paint) { + val paint = TextPaint(ink).apply { textAlign = Paint.Align.LEFT } + val layout = StaticLayout.Builder.obtain(text, 0, text.length, paint, 535) + .setAlignment(Layout.Alignment.ALIGN_CENTER).setIncludePad(false).build() + val saved = canvas.save() + canvas.translate(30f, y) + layout.draw(canvas) + canvas.restoreToCount(saved) + } +} + +internal data class SpatialSetupActions( + val recenter: () -> Unit = {}, val restart: () -> Unit = {}, val print: () -> Unit = {}, + val start: () -> Unit = {}, val capture: () -> Unit = {}, val solve: () -> Unit = {}, + val validate: (Float) -> Unit = {}, val gpu: (Boolean) -> Unit = {}, + val lite: (Boolean) -> Unit = {}, val halfRate: (Boolean) -> Unit = {}, + val adaptive: (Boolean) -> Unit = {}, + val saveFrame: () -> Unit = {}, val done: () -> Unit = {}, +) + +@Composable +internal fun SpatialSetupScreen( + status: SpatialTrackingStatus, progress: SpatialCalibrationProgress, preview: Bitmap?, message: String, + actions: SpatialSetupActions, gpu: Boolean = false, lite: Boolean = false, halfRate: Boolean = true, + adaptive: Boolean = true, +) { + val host = rememberMenuHost() + var distance by rememberSaveable { mutableStateOf(CalibrationDistance.INCHES_12) } + var diagnostics by rememberSaveable { mutableStateOf(false) } + var confirmRestart by remember { mutableStateOf(false) } + val ready = status.trackingValid && status.synchronized && !progress.solving && !progress.validating + Surface(Modifier.fillMaxSize().systemBarsPadding(), color = MaterialTheme.colorScheme.background) { + BoxWithConstraints(Modifier.fillMaxSize()) { + CompositionLocalProvider(LocalNarrowPane provides (maxWidth < NarrowPaneWidth)) { + SettingsPage(host, null, actions.done, compactLayout = true, + modifier = Modifier.testTag("spatial-setup-page"), header = { + Text(stringResource(R.string.spatial_title), style = MaterialTheme.typography.titleLarge, + maxLines = 1, overflow = TextOverflow.Ellipsis) + }) { + SettingsGroup(stringResource(R.string.glasses_tracking)) { + SettingsRow(stringResource(R.string.glasses_head_tracking), status.message.ifEmpty { stringResource(R.string.spatial_disabled) }, stacked = true) { + SecondaryButton(if (status.recenterPending) stringResource(R.string.spatial_wait_tracking) else stringResource(R.string.cardboard_recenter_button), + enabled = !status.recenterPending, onClick = actions.recenter) + } + preview?.let { + Image(it.asImageBitmap(), stringResource(R.string.spatial_cameras_description), + Modifier.fillMaxWidth().padding(12.dp).aspectRatio(it.width.toFloat() / it.height)) + } + SettingsRow(stringResource(R.string.spatial_camera_sync), if (status.synchronized) stringResource(R.string.spatial_ready) else + stringResource(R.string.spatial_sync_hint)) {} + } + SettingsGroup(stringResource(R.string.spatial_prepare)) { + ActionRow(stringResource(R.string.spatial_print_actual), stringResource(R.string.spatial_print_hint), + stringResource(R.string.spatial_print), actions.print) + } + SettingsGroup(stringResource(R.string.spatial_capture_group)) { + SettingsRow(stringResource(R.string.spatial_board_stationary), stringResource(R.string.spatial_capture_hint), stacked = true) { + SecondaryButton(stringResource(R.string.spatial_start), enabled = ready, onClick = actions.start) + } + SettingsRow(stringResource(R.string.spatial_views_count, progress.views), when { + !status.trackingValid -> stringResource(R.string.spatial_capture_paused, status.message) + !status.synchronized -> stringResource(R.string.spatial_wait_sync) + !progress.collecting -> progress.captureMessage ?: stringResource(R.string.spatial_start_hint) + else -> progress.captureMessage ?: stringResource(R.string.spatial_views_hint) + }, stacked = true) { + SecondaryButton(if (progress.capturing) stringResource(R.string.spatial_capturing) else stringResource(R.string.spatial_capture), + enabled = ready && progress.collecting && !progress.capturing, onClick = actions.capture) + } + SettingsRow(stringResource(R.string.spatial_alignment), message, stacked = true) { + SecondaryButton(if (progress.solving) stringResource(R.string.spatial_calculating) else stringResource(R.string.spatial_calculate), + enabled = !progress.solving && !progress.validating && progress.views >= 24, onClick = actions.solve) + } + } + SettingsGroup(stringResource(R.string.spatial_distance_group)) { + ChoiceRow(host, "calibration-distance", stringResource(R.string.spatial_distance), stringResource(R.string.spatial_distance_hint), + CalibrationDistance.entries.map { it to stringResource(it.labelRes) }, distance, onPick = { distance = it }) + SettingsRow(stringResource(R.string.spatial_camera_board_distance), progress.validationMessage ?: + stringResource(R.string.spatial_measure_hint, stringResource(distance.labelRes)), stacked = true) { + SecondaryButton(if(progress.validating) stringResource(R.string.spatial_checking_distance) else stringResource(R.string.spatial_validate), + enabled = ready && progress.fitted, onClick = { actions.validate(distance.meters) }) + } + HandCalibrationStatus(status) + SettingsRow(stringResource(R.string.glasses_hands_group), status.handStatus.ifEmpty { stringResource(R.string.spatial_hands_off) }) {} + } + SettingsGroup(stringResource(R.string.spatial_diagnostics)) { + ToggleRow(host, "spatial-diagnostics", stringResource(R.string.spatial_show_diagnostics), stringResource(R.string.spatial_diagnostics_hint), diagnostics) { diagnostics = it } + if (diagnostics) { + SettingsRow(stringResource(R.string.spatial_camera_timing), stringResource(R.string.spatial_timing_values, status.cameraHz, status.frameAgeMs, status.processingMs)) {} + SettingsRow(stringResource(R.string.spatial_hand_input), if (status.cameraHz > 0) + stringResource(R.string.spatial_input_values, status.cameraHz*status.cameraCopyPermille/1000f, status.cameraCopyPermille/10f) + else stringResource(R.string.spatial_wait_timing)) {} + SettingsRow(stringResource(R.string.spatial_frames), stringResource(R.string.spatial_frame_counts, status.frames, status.dropped, status.rateLimitedFrames)) {} + ToggleRow(host, "spatial-gpu", stringResource(R.string.spatial_gpu), stringResource(R.string.spatial_gpu_hint), gpu, onChange = actions.gpu) + ToggleRow(host, "spatial-lite", stringResource(R.string.spatial_lite), stringResource(R.string.spatial_lite_hint), lite, onChange = actions.lite) + ToggleRow(host, "spatial-adaptive-rate", stringResource(R.string.spatial_adaptive), stringResource(R.string.spatial_adaptive_hint), adaptive, onChange = actions.adaptive) + if (!adaptive) ToggleRow(host, "spatial-half-rate", stringResource(R.string.spatial_half_rate), stringResource(R.string.spatial_half_rate_hint), halfRate, onChange = actions.halfRate) + ActionRow(stringResource(R.string.spatial_diagnostic_capture), stringResource(R.string.spatial_diagnostic_capture_hint), stringResource(R.string.spatial_save_frame), actions.saveFrame) + ActionRow(stringResource(R.string.spatial_restart_tracking), stringResource(R.string.spatial_restart_hint), stringResource(R.string.spatial_restart), { confirmRestart = true }) + } + } + Spacer(Modifier.height(16.dp)) + SecondaryButton(stringResource(R.string.setup_check_done), onClick = actions.done) + } + } + } + } + if (confirmRestart) AlertDialog( + onDismissRequest = { confirmRestart = false }, title = { Text(stringResource(R.string.spatial_restart_title)) }, + text = { Text(stringResource(R.string.spatial_restart_confirm)) }, + confirmButton = { TextButton(onClick = { confirmRestart = false; actions.restart() }) { Text(stringResource(R.string.spatial_restart)) } }, + dismissButton = { TextButton(onClick = { confirmRestart = false }) { Text(stringResource(R.string.common_cancel)) } }, + ) +} + +@Composable +internal fun HandCalibrationStatus(status: SpatialTrackingStatus) { + val (label, hint) = when { + status.calibrationSource == "luma-ultra-base" -> R.string.glasses_hands_base to R.string.glasses_hands_base_hint + status.calibrationVerified -> R.string.glasses_hands_calibration_verified to R.string.glasses_hands_ready_hint + else -> R.string.glasses_hands_calibration_required to R.string.glasses_hands_calibration_required_hint + } + SettingsRow(stringResource(label), stringResource(hint)) {} +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SteamHome.kt b/app/src/main/java/com/droiddeck/launcher/ui/SteamHome.kt index 5b65d2202d..5dafd24280 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/SteamHome.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/SteamHome.kt @@ -1,6 +1,7 @@ package com.droiddeck.launcher.ui import androidx.compose.ui.platform.testTag +import androidx.compose.foundation.layout.fillMaxWidth import com.droiddeck.launcher.R import androidx.compose.ui.res.stringResource import androidx.compose.animation.core.FastOutSlowInEasing @@ -32,6 +33,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.produceState import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.geometry.Rect @@ -47,6 +49,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.unit.dp import com.droiddeck.launcher.frontend.Library +import com.droiddeck.launcher.glasses.GlassesMenuMirror import androidx.compose.foundation.layout.width import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.key @@ -66,24 +69,25 @@ import coil.request.ImageRequest import coil.size.Scale import coil.transform.RoundedCornersTransformation import kotlin.math.roundToInt +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext -/** From this many games the Steam tab is a wall; fewer would only repeat the same covers. */ private const val WALL_MIN_GAMES = 4 +private const val WALL_DISTINCT = 40 private const val DRIFT_STEP_NS = 15_000_000L -/** - * The Steam tab: the library as a slowly drifting, tilted wall of capsules (a few games instead - * lean on their own; none, the DroidDeck mark wandering a blank wall), and over it the wordmark and the one thing to do here - - * Play. Everything about a single game lives on the Games tab. - */ @Composable internal fun SteamHome(s: FrontEndState, a: FrontEndActions, modifier: Modifier) { - // A fixed order, ties included: the wall places each game by its position, so an order that - // came out differently from one read of the library to the next moved every capsule. + val ctx = androidx.compose.ui.platform.LocalContext.current + LaunchedEffect(Unit) { com.droiddeck.launcher.frontend.SteamFeatured.load(ctx) } + val featured = com.droiddeck.launcher.frontend.SteamFeatured.games + val signedIn = s.offlineAccount != null + val owned by produceState(emptyList<Pair<Int, java.io.File>>(), signedIn) { + value = if (!signedIn) emptyList() else withContext(Dispatchers.IO) { runCatching { Library.steamLibraryArt(ctx).shuffled() }.getOrDefault(emptyList()) } + } val games = remember(s.steamGames) { s.steamGames.sortedWith(compareByDescending<Library.SteamGame> { it.lastPlayed }.thenBy { it.gameId }) } val narrow = LocalNarrowPane.current - // Where the words and buttons sit, for the empty library's wandering mark to keep off. var words by remember { mutableStateOf<Rect?>(null) } val mode = com.droiddeck.launcher.session.SessionService.MODE_STEAM val tabs = modeSheetTabs(steam = true).map { it to sheetTabLabel(it) } @@ -92,19 +96,46 @@ internal fun SteamHome(s: FrontEndState, a: FrontEndActions, modifier: Modifier) frameGen = { FrameGenGroup(s, a) }, performance = { PerformanceLink(a, "steam", SheetTab.SESSION) }, drivers = { summary -> DriversLink(a, summary, "steam", back) }, + account = { host -> + SettingsGroup(stringResource(R.string.setup_account)) { + ToggleRow( + host, "offline", stringResource(R.string.setup_offline), + s.offlineAccount?.let { if (it.isEmpty()) stringResource(R.string.setup_signed_in_unnamed) else stringResource(R.string.setup_signed_in, it) } ?: stringResource(R.string.setup_sign_in_first), + s.offline, enabled = s.offlineAccount != null, + ) { a.onOffline() } + } + }, ) + val (glasses, glassesSettings) = rememberGlasses() + val headset = glasses.present && glasses.canControl + val drop = rememberDropSheetState() + LaunchedEffect(headset) { if (!headset && (drop.open || drop.shown)) drop.reset() } LiftHero( key = "steam", tabs = tabs, + drop = drop.takeIf { headset }, + overlay = { lifted -> + if (headset) DropSheet( + drop, glassesTabs(glasses), covered = lifted, + button = { enabled -> + PrimaryButton(stringResource(R.string.games_play_steamvr), enabled = !s.busy && glasses.usable, large = true, icon = Icons.Filled.PlayArrow, fill = true, + modifier = Modifier.fillMaxWidth().testTag("play-steamvr")) { if (enabled) { drop.open = false; a.onPlaySteamVr() } } + }, + ) { tab -> + GlassesGroups(rememberMenuHost(), glasses, glassesSettings, + onRecenter = GlassesMenuMirror::recenter, inSession = false, tab = tab) + } + }, onOpen = a.onSteamSettings, onPrimary = a.onPlay, modifier = modifier.clipToBounds(), start = if (narrow) 20.dp else 44.dp, bottom = if (narrow) 20.dp else 44.dp, background = { when { - // The mark wanders over this fade, so it sinks with the wall: drawn a little oversized, - // it still reaches the pane's edges at the sink's 0.95. - games.isEmpty() -> EmptyLibrary(avoid = words) { Box(Modifier.fillMaxSize().graphicsLayer { scaleX = 1.06f; scaleY = 1.06f }) { WallFade() } } + games.isEmpty() -> EmptyLibrary( + avoid = words, + wall = if (owned.isEmpty() && featured.isEmpty()) null else { { CapsuleWall(emptyList(), owned = owned, featured = featured) } }, + ) { Box(Modifier.fillMaxSize().graphicsLayer { scaleX = 1.06f; scaleY = 1.06f }) { WallFade() } } games.size < WALL_MIN_GAMES -> CapsuleFan(games) - else -> CapsuleWall(games) + else -> CapsuleWall(games, owned = owned, featured = featured) } }, scrim = { if (games.size >= WALL_MIN_GAMES) WallFade() }, @@ -114,19 +145,16 @@ internal fun SteamHome(s: FrontEndState, a: FrontEndActions, modifier: Modifier) modifier = Modifier.onPlaced { words = it.boundsInParent() }, ) { Wordmark(if (narrow) 30.dp else 40.dp) - // Said only when something stands between Play and Steam; a ready runtime needs no words. if (s.busy || !s.ready || (s.available != null && s.available != s.installed)) RuntimeChip(s) } }, button = { click -> - // Enabled without a runtime: the session's loading screen installs it first. PrimaryButton(stringResource(R.string.games_play_steam), enabled = !s.busy, main = true, large = true, icon = Icons.Filled.PlayArrow, modifier = Modifier.testTag("play-steam"), onClick = click) }, rows = { tab -> a.modeSheet(mode, tab, extras) }, ) } -/** The wall fades out behind the words, and toward the bottom where the buttons sit. */ @Composable internal fun WallFade() { val colors = MaterialTheme.colorScheme @@ -143,53 +171,45 @@ internal fun WallFade() { Box(Modifier.fillMaxSize().background(Brush.verticalGradient(0.55f to Color.Transparent, 1f to colors.background.copy(alpha = 0.9f)))) } -/** - * Columns of capsules tilted a few degrees, alternate columns drifting up and down. Each column - * holds its run of covers twice and moves by exactly one run, so the loop has no seam. An empty - * library draws the same wall in blank capsules, slower. - */ @Composable internal fun CapsuleWall( games: List<Library.SteamGame>, driftMs: Int = if (games.isEmpty()) 75_000 else 40_000, modifier: Modifier = Modifier, + owned: List<Pair<Int, java.io.File>> = emptyList(), + featured: List<com.droiddeck.launcher.frontend.SteamFeatured.Game> = emptyList(), ) { val pal = LocalPalette.current val blank = remember(pal) { WallCapsule(Brush.linearGradient(listOf(pal.surface, pal.background)), edge = pal.line) } - TiltedWall(games.size, driftMs, modifier) { i -> if (games.isEmpty()) blank else WallCapsule(artBrush(hueOf(games[i].name)), games[i].art) } + val padding = remember(games, owned, featured) { + val shown = games.map { it.appId }.toMutableSet() + val library = owned.filter { shown.add(it.first) }.map { (id, art) -> id.toString() to art } + val store = if (owned.isEmpty()) featured.filter { shown.add(it.appId) }.map { it.name to it.art } else emptyList() + (library + store).take((WALL_DISTINCT - games.size).coerceAtLeast(0)) + } + TiltedWall(games.size + padding.size, driftMs, modifier) { i -> + when { + i < games.size -> WallCapsule(artBrush(hueOf(games[i].name)), games[i].art) + i - games.size < padding.size -> padding[i - games.size].let { (seed, art) -> WallCapsule(artBrush(hueOf(seed)), art) } + else -> blank + } + } } -/** - * One capsule of a [TiltedWall]: its ground, the art laid over it once loaded, and an outline. A - * tile that is an app rather than a cover carries an [icon] instead (a drawable id or an image), - * drawn whole at the tile's centre, and a window's [bar] along its foot. - */ internal class WallCapsule(val ground: Brush, val art: Any? = null, val edge: Color? = null, val icon: Any? = null, val bar: Color? = null) -/** - * [CapsuleWall]'s tilted, drifting columns for any [count] of capsules; [capsule] describes number i - * (0 until [count], or 0 for each blank one when [count] is 0). Each column is one drawing with the - * covers' corners cut into their bitmaps: a rounded clip under the tilt is rasterised on the CPU, - * for every capsule on every frame. - */ @Composable internal fun TiltedWall( count: Int, driftMs: Int, modifier: Modifier = Modifier, - /** One tile's size, the gap between tiles and their corner: portrait capsules unless a wall says otherwise. */ capW: androidx.compose.ui.unit.Dp = 112.dp, capH: androidx.compose.ui.unit.Dp = 168.dp, gap: androidx.compose.ui.unit.Dp = 14.dp, corner: androidx.compose.ui.unit.Dp = 10.dp, capsule: (index: Int) -> WallCapsule, ) { - // Animations off in the system settings: a still wall. val still = Motion.scale == 0f - // The wall moves a few pixels a step. Stepped on frames at most every 15 ms it looks the same as - // stepped on every frame, which on a 120 Hz screen drew it twice as often. The phase advances by - // the time since the last step over the period now, so a period that changes (Flathub's wall - // slowing while it sets up) changes the speed without the wall jumping. val drift = remember { mutableFloatStateOf(0f) } val period = androidx.compose.runtime.rememberUpdatedState(driftMs) if (!still) LaunchedEffect(Unit) { @@ -204,7 +224,6 @@ internal fun TiltedWall( } val density = LocalDensity.current BoxWithConstraints(modifier.fillMaxSize()) { - // Centred on the page and big enough that, once tilted, it still covers every corner. val tilt = Math.toRadians(13.0) val cos = kotlin.math.cos(tilt).toFloat() val sin = kotlin.math.sin(tilt).toFloat() @@ -253,7 +272,6 @@ internal fun TiltedWall( } } -/** A cover sized for a capsule, its corners already cut, so it draws without a clip. */ @Composable private fun rememberCapsuleArt(model: Any, size: Size, radius: Float): Painter { val context = LocalContext.current @@ -267,7 +285,6 @@ private fun rememberCapsuleArt(model: Any, size: Size, radius: Float): Painter { ) } -/** An app's icon for a wall tile: a bundled drawable, or an image Coil loads. */ @Composable private fun rememberIcon(model: Any): Painter = if (model is Int) androidx.compose.ui.res.painterResource(model) else rememberAsyncImagePainter(model) @@ -276,7 +293,6 @@ private fun DrawScope.drawCapsule(look: WallCapsule, art: Painter?, radius: Floa drawRoundRect(look.ground, size = size, cornerRadius = CornerRadius(radius)) look.bar?.let { drawRect(it, Offset(0f, size.height - barH), Size(size.width, barH)) } if (art != null && look.icon != null) { - // An app's icon whole at the tile's centre (above a window's bar), not cropped over it. val side = minOf(size.width, size.height - (if (look.bar != null) barH else 0f)) * 0.5f val cy = (size.height - (if (look.bar != null) barH else 0f)) / 2f translate((size.width - side) / 2f, cy - side / 2f) { with(art) { draw(Size(side, side)) } } @@ -286,7 +302,6 @@ private fun DrawScope.drawCapsule(look: WallCapsule, art: Painter?, radius: Floa } } -/** One to three games, each a large capsule leaning on the others and floating a little. */ @Composable private fun CapsuleFan(games: List<Library.SteamGame>) { val pal = LocalPalette.current @@ -296,7 +311,6 @@ private fun CapsuleFan(games: List<Library.SteamGame>) { transition.animateFloat(0f, 1f, infiniteRepeatable(tween(ms, easing = FastOutSlowInEasing), RepeatMode.Reverse), label = "float") } val still = Motion.scale == 0f - // Where each sits (share of the page), its height (share of the page's) and its lean; front first. val slots = listOf( FanSlot(0.54f, 0.14f, 0.62f, -9f), FanSlot(0.70f, 0.24f, 0.56f, 5f), diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StepOut.kt b/app/src/main/java/com/droiddeck/launcher/ui/StepOut.kt index 624176b519..3791fb7820 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StepOut.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StepOut.kt @@ -7,12 +7,18 @@ import androidx.compose.foundation.LocalIndication import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.focusGroup +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll 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.BoxWithConstraints import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.IntrinsicSize +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize @@ -20,6 +26,7 @@ import androidx.compose.foundation.layout.heightIn import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Icon @@ -63,17 +70,7 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.launch import kotlin.math.roundToInt -// End session's confirm, for any control: a pull drops out of the control and a wider box steps -// out under it for the choices, one edge flush with the control. Stop draws it from its pill on -// the drawer; the stores draw it from Install, the Library tab and a download's cancel. -/** - * The stair-step outline: the pill [p] on top, a box under it from [left] to the pill's right edge - * and down to [bottom], the pull between them [pullTop] (the box's top). Right edges are flush and - * the inside corner where the pull meets the box is rounded the other way. While the box is still - * no wider than the pill it is just the pill, stretched down. [pillCorner] is the control's own - * corner: a pill's is half its height. - */ internal fun stepPath( path: Path, p: Rect, left: Float, bottom: Float, pullTop: Float, box: Float, fillet: Float, pillCorner: Float = minOf(p.height / 2f, p.width / 2f), @@ -89,8 +86,9 @@ internal fun stepPath( val rbr = minOf(box, (pb - tt) / 2f) val rbl = minOf(lerpF(minOf(box, (pb - tt) / 2f), minOf(box, h / 2f), (sw / box).coerceIn(0f, 1f)), (r - l) / 2f) val rpl = minOf(box, sw / 2f, h / 2f) - val f = minOf(fillet, sw / 2f) val yl = minOf(pt + rpl, pb - rbl) + val sy = yl - rpl + val f = minOf(fillet, sw / 2f, (sy - tt - rt).coerceAtLeast(0f)) fun corner(rect: Rect, start: Float, sweep: Float, endX: Float, endY: Float) { if (rect.width < 0.5f) path.lineTo(endX, endY) else path.arcTo(rect, start, sweep, false) } @@ -102,21 +100,18 @@ internal fun stepPath( path.lineTo(l + rbl, pb) corner(Rect(l, pb - 2 * rbl, l + 2 * rbl, pb), 90f, 90f, l, pb - rbl) path.lineTo(l, yl) - corner(Rect(l, pt, l + 2 * rpl, pt + 2 * rpl), 180f, 90f, l + rpl, pt) - path.lineTo(tl - f, pt) - corner(Rect(tl - 2 * f, pt - 2 * f, tl, pt), 90f, -90f, tl, pt - f) + corner(Rect(l, sy, l + 2 * rpl, sy + 2 * rpl), 180f, 90f, l + rpl, sy) + path.lineTo(tl - f, sy) + corner(Rect(tl - 2 * f, sy - 2 * f, tl, sy), 90f, -90f, tl, sy - f) path.lineTo(tl, tt + rt) corner(Rect(tl, tt, tl + 2 * rt, tt + 2 * rt), 180f, 90f, tl + rt, tt) path.close() } -/** [stepPath] for a box that steps out to the right of the pill, out to [right], left edges flush. */ internal fun stepPathRight( path: Path, p: Rect, right: Float, bottom: Float, pullTop: Float, box: Float, fillet: Float, pillCorner: Float = minOf(p.height / 2f, p.width / 2f), ) { - // Drawn as the left-hand outline about the pill's centre, which maps the pill onto itself, - // then mirrored back: x -> (p.left + p.right) - x. val axis = p.left + p.right stepPath(path, p, axis - right, bottom, pullTop, box, fillet, pillCorner) path.transform(Matrix().apply { this[0, 0] = -1f; this[3, 0] = axis }) @@ -124,17 +119,12 @@ internal fun stepPathRight( private fun lerpF(a: Float, b: Float, t: Float) = a + (b - a) * t -/** Which way the box steps out of its control. */ internal enum class StepSide { - /** Out to the left, right edges flush (a control at the right: Stop, a row's cancel). */ Left, - /** Out to the right, left edges flush (a control at the left: Install, a tab). */ Right, } -/** The choices' side of a [StepOut]: each piece fades in on its own beat, and [first] takes focus. */ -internal class StepOutScope(private val items: List<Animatable<Float, AnimationVector1D>>, val first: FocusRequester, val open: Boolean) { - /** Piece [i] (0 first) of the box: it fades and rises in after the box has stepped out. */ +internal class StepOutScope(private val items: List<Animatable<Float, AnimationVector1D>>, val first: FocusRequester, val open: Boolean, val maxHeight: Dp) { fun Modifier.stepItem(i: Int): Modifier = graphicsLayer { val v = items[i.coerceIn(0, items.lastIndex)].value alpha = v @@ -142,17 +132,10 @@ internal class StepOutScope(private val items: List<Animatable<Float, AnimationV } } -/** Room between the control and the box that steps out under it: the pull. */ private val OutPull = 6.dp private val OutBoxCorner = 16.dp private val OutFillet = 10.dp -/** - * A confirm or a short list grown out of the control at [pill] (px, in this element's space, which - * should fill the screen area it may cover): a pull the control's width drops out of it, then a - * box steps out to [side] for [content]. [onDismiss] (B, a tap outside) asks to fold it; it folds - * back width first once [open] is false, then [onClosed]. Exactly StopConfirm's springs. - */ @OptIn(ExperimentalComposeUiApi::class) @Composable internal fun StepOut( @@ -179,19 +162,24 @@ internal fun StepOut( var grown by remember { mutableStateOf(false) } var measured by remember { mutableStateOf<IntSize?>(null) } val first = remember { FocusRequester() } + val glide = LocalFocusGlide.current + val opener = remember { arrayOfNulls<GlideSource>(1) } + val openNow = androidx.compose.runtime.rememberUpdatedState(open) + var moving by remember { mutableStateOf(false) } + if (moving) VeilRing() val pull = with(density) { OutPull.toPx() } val corner = pillCorner?.let { with(density) { it.toPx() } } ?: minOf(pill.height, pill.width) / 2f BoxWithConstraints(Modifier.fillMaxSize()) { val hostWidth = constraints.maxWidth.toFloat() val hostHeight = constraints.maxHeight.toFloat() - // No room under the control (a row near the foot of the screen): it steps out upward - // instead, the same outline mirrored about the control. + val availableHeight = with(density) { + maxOf(hostHeight - pill.bottom - pull, pill.top - pull).coerceAtLeast(44.dp.toPx()).toDp() + } val up = measured?.let { pill.bottom + pull + it.height > hostHeight && pill.top - pull - it.height >= 0f } ?: false val room = if (side == StepSide.Left) pill.right else hostWidth - pill.left val maxW = with(density) { maxWidth.toPx() }.coerceAtMost(room).coerceAtLeast(pill.width) LaunchedEffect(open, measured) { - // Asked to close before it ever measured: nothing to fold. if (!open && !grown) { onClosed(); return@LaunchedEffect } val c = measured ?: return@LaunchedEffect val rest = if (side == StepSide.Left) pill.left else pill.right @@ -199,6 +187,7 @@ internal fun StepOut( val boxBottom = pill.bottom + pull + c.height if (open) { if (!grown) { + opener[0] = glide?.current edge.snapTo(rest); bottom.snapTo(pill.bottom); tint.snapTo(0f) pieces.forEach { it.snapTo(0f) } grown = true @@ -206,8 +195,10 @@ internal fun StepOut( coroutineScope { launch { dim.animateTo(1f, Motion.tw(260)) } launch { tint.animateTo(1f, Motion.tw(200)) } - launch { bottom.animateTo(boxBottom, Motion.sp(0.7f, 380f)) } - launch { delay(Motion.ms(110).toLong()); edge.animateTo(out, Motion.sp(0.55f, 300f)) } + moving = true + val down = launch { bottom.animateTo(boxBottom, Motion.sp(0.8f, 380f)) } + val across = launch { edge.animateTo(out, Motion.sp(0.8f, 380f)) } + launch { down.join(); across.join(); moving = false } pieces.forEachIndexed { i, a -> launch { delay(Motion.ms(260 + i * 55).toLong()); a.animateTo(1f, Motion.tw(220)) } } @@ -218,23 +209,25 @@ internal fun StepOut( } } } else { + opener[0]?.let { o -> if (inputMode.inputMode == InputMode.Keyboard) runCatching { o.requester.requestFocus() } } + opener[0] = null coroutineScope { pieces.forEach { launch { it.animateTo(0f, Motion.tw(90)) } } launch { delay(Motion.ms(60).toLong()); dim.animateTo(0f, Motion.tw(300)) } - launch { delay(Motion.ms(60).toLong()); edge.animateTo(rest, Motion.sp(1f, 420f)) } - launch { delay(Motion.ms(160).toLong()); bottom.animateTo(pill.bottom, Motion.sp(1f, 380f)) } + moving = true + launch { delay(Motion.ms(60).toLong()); edge.animateTo(rest, Motion.tw(240)) } + launch { delay(Motion.ms(60).toLong()); bottom.animateTo(pill.bottom, Motion.tw(240)) } launch { delay(Motion.ms(200).toLong()); tint.animateTo(0f, Motion.tw(200)) } } grown = false + moving = false onClosed() } } - // Opened by touch and then answered with a pad: the pad starts in the box, not behind it. LaunchedEffect(open, grown, inputMode.inputMode) { if (open && grown && inputMode.inputMode == InputMode.Keyboard) { withFrameNanos { }; runCatching { first.requestFocus() } } } - // The rest of the screen dims behind it, and a tap there folds it. Never a pad's stop. Box( Modifier.fillMaxSize().graphicsLayer { alpha = dim.value }.background(Color(0x59000000)) .focusProperties { canFocus = false } @@ -251,10 +244,19 @@ internal fun StepOut( if (side == StepSide.Left) stepPath(path, pill, edge.value, bottom.value, pill.bottom + pull, boxCorner, fillet, corner) else stepPathRight(path, pill, edge.value, bottom.value, pill.bottom + pull, boxCorner, fillet, corner) if (up) path.transform(Matrix().apply { this[1, 1] = -1f; this[3, 1] = pill.top + pill.bottom }) - drawPath(path, lerp(hotFill, restFill, tint.value)) - drawPath(path, accent.copy(alpha = lerpF(0.9f, 0.55f, tint.value)), style = Stroke(rim)) + val a = measured?.let { c -> + val rest = if (side == StepSide.Left) pill.left else pill.right + val out = if (side == StepSide.Left) (pill.right - c.width).coerceAtLeast(0f) else (pill.left + c.width).coerceAtMost(hostWidth) + val down = pill.bottom + pull + c.height - pill.bottom + val across = kotlin.math.abs(out - rest) + val fd = if (down < 1f) 1f else (bottom.value - pill.bottom) / down + val fa = if (across < 1f) 1f else kotlin.math.abs(edge.value - rest) / across + ((minOf(fd, fa) - 0.1f) / 0.3f).coerceIn(0f, 1f) + } ?: 0f + if (a <= 0.01f) return@Canvas + drawPath(path, lerp(hotFill, restFill, tint.value), alpha = a) + drawPath(path, accent.copy(alpha = lerpF(0.9f, 0.55f, tint.value) * a), style = Stroke(rim)) } - // The control's label rides on top, as the pull's handle. if (grown) Box( contentAlignment = Alignment.Center, modifier = Modifier.offset { IntOffset(pill.left.roundToInt(), pill.top.roundToInt()) } @@ -265,20 +267,17 @@ internal fun StepOut( modifier = Modifier .offset { IntOffset(x.roundToInt(), (if (up) pill.top - pull - (measured?.height ?: 0) else pill.bottom + pull).roundToInt()) } .widthIn(min = with(density) { pill.width.toDp() }, max = with(density) { maxW.toDp() }) + .heightIn(max = availableHeight) .onSizeChanged { if (measured != it) measured = it } .controllerBack(onDismiss) - // A pad stays in the box until it is answered or folded, as it did in Stop's dialog. - .focusProperties { exit = { FocusRequester.Cancel } } + .focusProperties { exit = { if (openNow.value) FocusRequester.Cancel else FocusRequester.Default } } .focusGroup() + .verticalScroll(rememberScrollState()) .padding(start = 14.dp, end = 14.dp, top = 12.dp, bottom = 12.dp), - ) { StepOutScope(pieces, first, open).content() } + ) { StepOutScope(pieces, first, open, availableHeight).content() } } } -/** - * One choice in a [StepOut]: a capsule that fills when focused, like Stop's Cancel and Stop. [danger] - * draws it in red; [icon] and [trailing] make it a row (a place to install to and its free space). - */ @Composable internal fun StepChoice( label: String, @@ -315,7 +314,39 @@ internal fun StepChoice( } } -/** A [StepOut]'s heading line, the first piece to fade in. */ +@Composable +internal fun StepTile( + label: String, + icon: ImageVector, + modifier: Modifier = Modifier, + detail: String? = null, + warning: Boolean = false, + enabled: Boolean = true, + onClick: () -> Unit, +) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val src = remember { MutableInteractionSource() } + val hot = rememberHot(src) + val shape = RoundedCornerShape(18.dp) + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), + modifier = modifier.width(184.dp).height(IntrinsicSize.Min).clip(shape) + .background(if (hot) pal.signal.copy(alpha = 0.14f) else colors.surface.copy(alpha = 0.5f)) + .glideBorder(hot, shape, pal.signal, pal.line) + .hoverable(src) + .clickable(interactionSource = src, indication = LocalIndication.current, enabled = enabled, role = Role.Button, onClick = onClick) + .controllerConfirm(enabled = enabled, onClick = onClick) + .padding(horizontal = 12.dp, vertical = 10.dp), + ) { + Icon(icon, null, tint = if (hot) pal.signal else colors.onBackground, modifier = Modifier.fillMaxHeight().aspectRatio(1f)) + Column(verticalArrangement = Arrangement.spacedBy(2.dp)) { + Text(label, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + if (detail != null) Text(detail, fontSize = 12.sp, color = if (warning) colors.error else colors.onSurfaceVariant, maxLines = 2) + } + } +} + @Composable internal fun StepOutScope.StepTitle(text: String) { Text( @@ -324,7 +355,6 @@ internal fun StepOutScope.StepTitle(text: String) { ) } -/** The choices of a [StepOut] stacked, each the box's width. */ @Composable internal fun StepList(content: @Composable ColumnScope.() -> Unit) { Column(verticalArrangement = Arrangement.spacedBy(6.dp), content = content) diff --git a/app/src/main/java/com/droiddeck/launcher/ui/Steps.kt b/app/src/main/java/com/droiddeck/launcher/ui/Steps.kt index d0b9369a3f..18a4b9703c 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/Steps.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/Steps.kt @@ -7,12 +7,8 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.ui.geometry.Offset -// The front end's confirms and short lists, each stepping out of the control that asked for it -// (StepOut): a sheet's Uninstall, a Components swap, a remove. The Stores page keeps its own, in -// StoresMotion; everything else asks here and is drawn over the whole screen. internal object Steps { - /** The confirm or list stepping out of a control now, and whether it is open. */ var step by mutableStateOf<StepAsk?>(null) private set var open by mutableStateOf(false) @@ -24,10 +20,8 @@ internal object Steps { open = true } - /** Folds the current one back into its control. */ fun fold() { open = false } - /** Drops it at once: the control it came from has gone. */ fun drop() { step?.let { step = null; it.onDismiss() } open = false @@ -39,11 +33,9 @@ internal object Steps { } } -/** [Steps] drawn over an element at [origin] (root px) that fills the screen. */ @Composable internal fun StepsLayer(origin: Offset) { val ask = Steps.step ?: return - // Back (B, or the system's) folds what is stepped out, before it reaches the page under it. androidx.activity.compose.BackHandler(enabled = Steps.open) { Steps.fold() } key(ask) { StepOut( diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoragePage.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoragePage.kt new file mode 100644 index 0000000000..7c1e45ffa4 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoragePage.kt @@ -0,0 +1,859 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.animation.core.Spring +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.foundation.LocalIndication +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.hoverable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsFocusedAsState +import androidx.compose.foundation.interaction.collectIsHoveredAsState +import androidx.compose.foundation.interaction.collectIsPressedAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.IntrinsicSize +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.foundation.relocation.bringIntoViewRequester +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Check +import androidx.compose.material.icons.filled.ChevronRight +import androidx.compose.material.icons.outlined.Extension +import androidx.compose.material.icons.outlined.Folder +import androidx.compose.material.icons.outlined.Layers +import androidx.compose.material.icons.outlined.Lock +import androidx.compose.material.icons.outlined.Monitor +import androidx.compose.material.icons.outlined.SaveAlt +import androidx.compose.material.icons.outlined.ShoppingBag +import androidx.compose.material.icons.outlined.Storage +import androidx.compose.material.icons.outlined.VideogameAsset +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.Icon +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.saveable.rememberSaveable +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.focus.FocusRequester +import androidx.compose.ui.focus.focusRequester +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.pluralStringResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.semantics.Role +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import coil.compose.AsyncImage +import com.droiddeck.launcher.R +import com.droiddeck.launcher.session.SessionPrefs +import com.droiddeck.launcher.storage.Bucket +import com.droiddeck.launcher.storage.CleanItem +import com.droiddeck.launcher.storage.ComponentUsage +import com.droiddeck.launcher.storage.GameUsage +import com.droiddeck.launcher.storage.StorageReport +import com.droiddeck.launcher.storage.StorageState +import com.droiddeck.launcher.storage.ToolReason +import com.droiddeck.launcher.storage.ToolState +import com.droiddeck.launcher.storage.ToolUsage +import java.text.DateFormat +import java.util.Date + +private val BucketColors = mapOf( + Bucket.GAMES to Color(0xFF4B9CF5), + Bucket.GAME_DATA to Color(0xFF8F7CF6), + Bucket.TOOLS to Color(0xFF3FC1C9), + Bucket.COMPONENTS to Color(0xFF9BD65B), + Bucket.STORES to Color(0xFFF0B44C), + Bucket.DESKTOP to Color(0xFFE57FB1), + Bucket.SYSTEM to Color(0xFF7D8796), + Bucket.DROIDDECK to Color(0xFF6FD08C), +) +private val OtherApps = Color(0xFF3A3F48) +private val Shape22 = RoundedCornerShape(18.dp) + +private fun gb(bytes: Long) = StorageState.format(bytes) +private const val ONE_MB = 1024L * 1024 + +@OptIn(androidx.compose.foundation.ExperimentalFoundationApi::class) +@Composable +internal fun StoragePanel(s: FrontEndState, a: FrontEndActions) { + val ctx = LocalContext.current + var view by remember { mutableStateOf("overview") } + var cleanup by remember { mutableStateOf(false) } + val report = StorageState.report + LaunchedEffect(Unit) { StorageState.refresh(ctx) } + LaunchedEffect(s.sessionRunning) { if (!s.sessionRunning) StorageState.refresh(ctx, force = report != null) } + if (report == null) { + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp), + modifier = Modifier.fillMaxWidth().padding(top = 8.dp).clip(Shape14).background(MaterialTheme.colorScheme.surface) + .border(1.dp, LocalPalette.current.line, Shape14).padding(18.dp), + ) { + CircularProgressIndicator(strokeWidth = 3.dp, modifier = Modifier.size(28.dp), color = LocalPalette.current.signal) + Column { + Text(stringResource(R.string.storage_measuring), fontSize = 16.sp, fontWeight = FontWeight.SemiBold, color = MaterialTheme.colorScheme.onBackground) + Text(stringResource(R.string.storage_measuring_hint), fontSize = 13.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + } + } + return + } + if (cleanup) CleanUpDialog(report, s.sessionRunning) { cleanup = false } + val top = remember { androidx.compose.foundation.relocation.BringIntoViewRequester() } + LaunchedEffect(view) { + StorageState.lastFreed = null + StorageState.lastError = null + runCatching { top.bringIntoView() } + } + Box(Modifier.fillMaxWidth().height(1.dp).bringIntoViewRequester(top)) + when (view) { + "games" -> GamesView(report, s.sessionRunning, a) { view = "overview" } + "data" -> GameDataView(report, s.sessionRunning) { view = "overview" } + "components" -> ComponentsView(report, s.sessionRunning) { view = "overview" } + "desktop" -> DesktopView(report, s.sessionRunning) { view = "overview" } + "tools" -> ToolsView(report, s.sessionRunning) { view = "overview" } + else -> Overview(report, s.sessionRunning, onCleanUp = { cleanup = true }, onOpen = { view = it }) + } +} + +@OptIn(ExperimentalLayoutApi::class) +@Composable +private fun Overview(report: StorageReport, sessionRunning: Boolean, onCleanUp: () -> Unit, onOpen: (String) -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val wide = !LocalNarrowPane.current + val used = report.total - report.free + val safe = StorageState.safeBytes(report) + val low = report.free < StorageState.LOW_SPACE_BYTES + ActionStatus() + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(18.dp), + modifier = Modifier.fillMaxWidth().padding(top = 8.dp).clip(Shape14).background(colors.surface).border(1.dp, pal.line, Shape14) + .padding(horizontal = 18.dp, vertical = 14.dp), + ) { + Column(Modifier.weight(1f)) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Text(stringResource(R.string.storage_internal), fontSize = 17.sp, fontWeight = FontWeight.Bold, color = colors.onBackground) + Text("· " + stringResource(R.string.storage_used_of, gb(used), gb(report.total)), fontSize = 15.sp, color = colors.onSurfaceVariant) + Pill(stringResource(R.string.storage_free, gb(report.free)), if (low) AttentionAmber else pal.good) + } + val time = DateFormat.getTimeInstance(DateFormat.SHORT).format(Date(report.at)) + Text( + stringResource(R.string.storage_droiddeck_uses, gb(report.droiddeck), time) + + if (StorageState.scanning) " · " + stringResource(R.string.storage_rescanning) else "", + fontSize = 13.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(top = 2.dp), + ) + UsageBar(report, Modifier.padding(top = 12.dp, bottom = 10.dp)) + FlowRow(horizontalArrangement = Arrangement.spacedBy(14.dp), verticalArrangement = Arrangement.spacedBy(4.dp)) { + Bucket.entries.forEach { Legend(BucketColors.getValue(it), bucketLabel(it)) } + Legend(OtherApps, stringResource(R.string.storage_other_apps)) + } + } + Box(Modifier.width(1.dp).height(120.dp).background(pal.line)) + Column(Modifier.widthIn(min = 170.dp, max = 210.dp)) { + Text(stringResource(R.string.storage_safe_now), fontSize = 13.sp, color = colors.onSurfaceVariant) + Text(gb(safe), fontSize = 26.sp, fontWeight = FontWeight.Bold, color = if (safe > 0) pal.good else colors.onBackground) + Text(stringResource(R.string.storage_safe_hint), fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(bottom = 10.dp)) + PrimaryButton(stringResource(R.string.storage_clean_up), enabled = !sessionRunning && !StorageState.cleaning, compact = true, onClick = onCleanUp) + } + } + if (sessionRunning) { + Spacer(Modifier.height(8.dp)) + Note(stringResource(R.string.storage_session_running)) + } + SectionTitle(stringResource(R.string.storage_where), null) + val unused = report.unusedTools.sumOf { it.bytes } + val tiles = listOf<@Composable (Modifier) -> Unit>( + { m -> + BucketCard(Bucket.GAMES, Icons.Outlined.VideogameAsset, stringResource(R.string.storage_games), + pluralStringResource(R.plurals.storage_games_installed, report.games.size, report.games.size) + + if (report.gamesOnSd > 0) " · " + pluralStringResource(R.plurals.storage_games_on_sd, report.gamesOnSd, report.gamesOnSd) else "", + report.buckets.getValue(Bucket.GAMES), m) { onOpen("games") } + }, + { m -> + BucketCard(Bucket.GAME_DATA, Icons.Outlined.SaveAlt, stringResource(R.string.storage_game_data), + stringResource(R.string.storage_game_data_hint, gb(report.prefixes), gb(report.workshop), gb(report.shaders)), + report.buckets.getValue(Bucket.GAME_DATA), m) { onOpen("data") } + }, + { m -> + BucketCard(Bucket.TOOLS, Icons.Outlined.Layers, stringResource(R.string.storage_tools), + if (unused > 0) stringResource(R.string.storage_tools_unused, gb(unused)) else pluralStringResource(R.plurals.storage_tools_count, report.tools.size, report.tools.size), + report.buckets.getValue(Bucket.TOOLS), m, attention = unused > 0) { onOpen("tools") } + }, + { m -> + val unusedComponents = report.unusedComponents.sumOf { it.bytes } + BucketCard(Bucket.COMPONENTS, Icons.Outlined.Extension, stringResource(R.string.storage_components), + if (unusedComponents > 0) stringResource(R.string.storage_tools_unused, gb(unusedComponents)) + else pluralStringResource(R.plurals.storage_components_count, report.components.size, report.components.size), + report.buckets.getValue(Bucket.COMPONENTS), m, attention = unusedComponents > 0) { onOpen("components") } + }, + { m -> + BucketCard(Bucket.STORES, Icons.Outlined.ShoppingBag, stringResource(R.string.storage_stores), + stringResource(R.string.storage_stores_hint), report.buckets.getValue(Bucket.STORES), m) + }, + { m -> + BucketCard(Bucket.DESKTOP, Icons.Outlined.Monitor, stringResource(R.string.storage_desktop), + pluralStringResource(R.plurals.storage_desktop_apps, report.flatpakApps.size, report.flatpakApps.size) + + " · " + stringResource(R.string.storage_desktop_shared, gb(report.flatpakRuntimes + report.flatpakCache)), + report.buckets.getValue(Bucket.DESKTOP), m) { onOpen("desktop") } + }, + { m -> + BucketCard(Bucket.SYSTEM, Icons.Outlined.Storage, stringResource(R.string.storage_system), + stringResource(R.string.storage_system_hint), report.buckets.getValue(Bucket.SYSTEM), m, locked = true) + }, + { m -> + BucketCard(Bucket.DROIDDECK, Icons.Outlined.Folder, stringResource(R.string.storage_app_data), + stringResource(R.string.storage_app_data_hint, gb(report.logBytes)), report.buckets.getValue(Bucket.DROIDDECK), m) + }, + ) + val columns = if (wide) 2 else 1 + Column(verticalArrangement = Arrangement.spacedBy(10.dp)) { + tiles.chunked(columns).forEach { row -> + Row(horizontalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier.fillMaxWidth().height(IntrinsicSize.Min)) { + row.forEach { it(Modifier.weight(1f).fillMaxHeight()) } + repeat(columns - row.size) { Spacer(Modifier.weight(1f)) } + } + } + } +} + +@Composable +private fun bucketLabel(bucket: Bucket) = stringResource(when (bucket) { + Bucket.GAMES -> R.string.storage_legend_games + Bucket.GAME_DATA -> R.string.storage_legend_data + Bucket.TOOLS -> R.string.storage_legend_tools + Bucket.COMPONENTS -> R.string.storage_legend_components + Bucket.STORES -> R.string.storage_legend_stores + Bucket.DESKTOP -> R.string.storage_legend_desktop + Bucket.SYSTEM -> R.string.storage_legend_system + Bucket.DROIDDECK -> R.string.storage_legend_app +}) + +@Composable +private fun UsageBar(report: StorageReport, modifier: Modifier) { + val total = report.total.coerceAtLeast(1).toFloat() + val other = (report.total - report.free - report.droiddeck).coerceAtLeast(0) + Row(modifier.fillMaxWidth().height(14.dp).clip(RoundedCornerShape(7.dp)).background(Color(0xFF0A0C0F))) { + Bucket.entries.forEach { b -> + val v = report.buckets.getValue(b) + if (v > 0) Box(Modifier.weight(v / total).fillMaxHeight().background(BucketColors.getValue(b))) + } + if (other > 0) Box(Modifier.weight(other / total).fillMaxHeight().background(OtherApps)) + if (report.free > 0) Spacer(Modifier.weight(report.free / total)) + } +} + +@Composable +private fun Legend(color: Color, label: String) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) { + Box(Modifier.size(9.dp).clip(RoundedCornerShape(3.dp)).background(color)) + Text(label, fontSize = 12.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + } +} + +@Composable +private fun Pill(text: String, color: Color) { + Text( + text, fontSize = 11.sp, fontWeight = FontWeight.SemiBold, color = color, maxLines = 1, + modifier = Modifier.clip(RoundedCornerShape(8.dp)).background(color.copy(alpha = 0.16f)).padding(horizontal = 7.dp, vertical = 2.dp), + ) +} + +@Composable +private fun BucketCard( + bucket: Bucket, icon: ImageVector, title: String, detail: String, bytes: Long, modifier: Modifier, + attention: Boolean = false, locked: Boolean = false, onClick: (() -> Unit)? = null, +) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val src = remember { MutableInteractionSource() } + val hot = rememberHot(src) && onClick != null + val pressed by src.collectIsPressedAsState() + val scale by animateFloatAsState(if (pressed) 0.97f else 1f, Motion.sp(0.5f, Spring.StiffnessMedium), label = "bucketScale") + val tint = BucketColors.getValue(bucket) + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp), + modifier = modifier.paneItem("storage:${bucket.name}") + .graphicsLayer { scaleX = scale; scaleY = scale } + .clip(Shape14) + .background(if (hot) pal.signal.copy(alpha = 0.10f) else colors.surface) + .glideBorder(hot, Shape14, pal.signal, pal.line) + .then(if (onClick != null) Modifier.hoverable(src) + .clickable(interactionSource = src, indication = LocalIndication.current, role = Role.Button, onClick = onClick) + .controllerConfirm(onClick = onClick) else Modifier.hoverable(src)) + .heightIn(min = 64.dp) + .padding(horizontal = 14.dp, vertical = 10.dp), + ) { + Box(contentAlignment = Alignment.Center, modifier = Modifier.size(36.dp).clip(RoundedCornerShape(10.dp)).background(tint)) { + Icon(icon, contentDescription = null, tint = Color(0xFF0B0D10), modifier = Modifier.size(20.dp)) + } + Column(Modifier.weight(1f)) { + Text(title, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + Text(detail, fontSize = 12.5.sp, color = if (attention) AttentionAmber else colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis) + } + Text(gb(bytes), fontSize = 16.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground) + when { + locked -> Icon(Icons.Outlined.Lock, contentDescription = null, tint = colors.onSurfaceVariant, modifier = Modifier.size(16.dp)) + onClick != null -> Icon(Icons.Filled.ChevronRight, contentDescription = null, tint = if (hot) pal.signal else colors.onSurfaceVariant, modifier = Modifier.size(18.dp)) + else -> Spacer(Modifier.width(16.dp)) + } + } +} + +@Composable +private fun CleanUpDialog(report: StorageReport, sessionRunning: Boolean, onDismiss: () -> Unit) { + val ctx = LocalContext.current + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val available = CleanItem.entries.filter { StorageState.bytes(report, it) > 0 } + var picked by remember { mutableStateOf(available.filter { it in StorageState.SAFE }.toSet()) } + val total = picked.sumOf { StorageState.bytes(report, it) } + val first = remember { FocusRequester() } + LaunchedEffect(Unit) { runCatching { first.requestFocus() } } + AlertDialog( + properties = androidx.compose.ui.window.DialogProperties(usePlatformDefaultWidth = false), + modifier = Modifier.fillMaxWidth(0.62f).widthIn(min = 420.dp, max = 760.dp), + onDismissRequest = { if (!StorageState.cleaning) onDismiss() }, + title = { Text(stringResource(R.string.storage_clean_up_title)) }, + text = { + Column(Modifier.verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(8.dp)) { + Text(stringResource(R.string.storage_clean_up_lede), fontSize = 13.sp, color = colors.onSurfaceVariant) + if (available.isEmpty()) Text(stringResource(R.string.storage_nothing_to_clean), fontSize = 14.sp, color = colors.onBackground) + available.forEachIndexed { i, item -> + val on = item in picked + CleanRow( + item, report, on, if (i == 0) Modifier.focusRequester(first) else Modifier, + ) { picked = if (on) picked - item else picked + item } + } + Text( + stringResource(R.string.storage_selected, gb(total), gb(report.free), gb(report.free + total)), + fontSize = 13.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(top = 4.dp), + ) + if (StorageState.cleaning) Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) { + CircularProgressIndicator(strokeWidth = 2.dp, modifier = Modifier.size(16.dp), color = pal.signal) + Text(stringResource(R.string.storage_cleaning), fontSize = 13.sp, color = colors.onBackground) + } + } + }, + confirmButton = { + if (picked.isNotEmpty() && !sessionRunning && !StorageState.cleaning) { + FocusText(stringResource(R.string.storage_free_button, gb(total)), pal.signal) { + StorageState.clean(ctx, picked) { onDismiss() } + } + } + }, + dismissButton = { + FocusText(stringResource(R.string.common_cancel), colors.onBackground) { if (!StorageState.cleaning) onDismiss() } + }, + ) +} + +@Composable +private fun CleanRow(item: CleanItem, report: StorageReport, on: Boolean, modifier: Modifier, onToggle: () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val src = remember { MutableInteractionSource() } + val hot = src.collectIsFocusedAsState().value || src.collectIsHoveredAsState().value + val unsureCount = report.leftovers.count { !it.safe } + val safeCount = report.leftovers.count { it.safe } + val oldTools = report.unusedTools.filter { it.reason != ToolReason.CUSTOM } + val custom = report.unusedTools.filter { it.reason == ToolReason.CUSTOM } + val unusedLabels = report.unusedComponents.map { componentLabel(it) } + val (title, detail, tag) = when (item) { + CleanItem.OLD_TOOLS -> Triple(stringResource(R.string.storage_item_runtimes), oldTools.joinToString(", ") { it.name }, 0) + CleanItem.LEFTOVERS -> Triple(stringResource(R.string.storage_item_leftovers), pluralStringResource(R.plurals.storage_item_leftovers_detail, safeCount, safeCount), 0) + CleanItem.LEFTOVERS_UNSURE -> Triple(stringResource(R.string.storage_item_leftovers_unsure), pluralStringResource(R.plurals.storage_item_leftovers_unsure_detail, unsureCount, unsureCount), 2) + CleanItem.LOGS -> Triple(stringResource(R.string.storage_item_logs), stringResource(R.string.storage_item_logs_detail), 0) + CleanItem.UNUSED_CUSTOM -> Triple(custom.joinToString(", ") { it.name }, stringResource(R.string.storage_item_custom_detail), 1) + CleanItem.UNUSED_COMPONENTS -> Triple(stringResource(R.string.storage_item_components), unusedLabels.joinToString(", "), 1) + CleanItem.SHADERS -> Triple(stringResource(R.string.storage_item_shaders), stringResource(R.string.storage_item_shaders_detail), 2) + } + val shape = RoundedCornerShape(12.dp) + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), + modifier = modifier.fillMaxWidth().clip(shape) + .background(if (hot) pal.signal.copy(alpha = 0.10f) else colors.surfaceVariant.copy(alpha = 0.5f)) + .glideBorder(hot, shape, pal.signal, pal.line) + .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = Role.Checkbox, onClick = onToggle) + .controllerConfirm(onClick = onToggle) + .padding(horizontal = 12.dp, vertical = 9.dp), + ) { + Box( + contentAlignment = Alignment.Center, + modifier = Modifier.size(22.dp).clip(RoundedCornerShape(6.dp)) + .background(if (on) pal.signal else Color.Transparent) + .border(2.dp, if (on) pal.signal else colors.onSurfaceVariant, RoundedCornerShape(6.dp)), + ) { if (on) Icon(Icons.Filled.Check, contentDescription = null, tint = Color.White, modifier = Modifier.size(16.dp)) } + Column(Modifier.weight(1f)) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Text(title, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f, fill = false)) + when (tag) { + 0 -> Pill(stringResource(R.string.storage_tag_safe), pal.good) + 1 -> Pill(stringResource(R.string.storage_tag_unused), colors.onSurfaceVariant) + else -> Pill(stringResource(if (item == CleanItem.SHADERS) R.string.storage_tag_stutter else R.string.storage_tag_saves), AttentionAmber) + } + } + Text(detail, fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 2, overflow = TextOverflow.Ellipsis) + } + Text(gb(StorageState.bytes(report, item)), fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground) + } +} + +@Composable +private fun SubHeader(title: String, detail: String, onBack: () -> Unit, trailing: @Composable () -> Unit = {}) { + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), + modifier = Modifier.fillMaxWidth().padding(top = 6.dp, bottom = 8.dp).controllerBack(onBack), + ) { + BackLink(stringResource(R.string.storage_back), compact = true, onClick = onBack) + Column(Modifier.weight(1f)) { + Text(title, fontSize = 20.sp, fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + Text(detail, fontSize = 13.sp, color = MaterialTheme.colorScheme.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis) + } + trailing() + } +} + +@Composable +private fun GamesView(report: StorageReport, sessionRunning: Boolean, a: FrontEndActions, onBack: () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + var sort by rememberSaveable { mutableStateOf(0) } + var confirm by remember { mutableStateOf<GameUsage?>(null) } + val games = when (sort) { + 1 -> report.games.sortedBy { if (it.lastPlayed == 0L) Long.MIN_VALUE else it.lastPlayed } + 2 -> report.games.filter { !it.internal } + else -> report.games + } + val max = report.games.maxOfOrNull { it.total }?.coerceAtLeast(1) ?: 1 + SubHeader(stringResource(R.string.storage_games), stringResource(R.string.storage_games_with_data, gb(report.games.sumOf { it.total })), onBack) + Box(Modifier.fillMaxWidth().padding(bottom = 10.dp)) { + SheetChips(listOf(stringResource(R.string.storage_sort_largest), stringResource(R.string.storage_sort_least_played), stringResource(R.string.storage_sort_sd)), sort, null) { sort = it } + } + if (sessionRunning) { Note(stringResource(R.string.storage_session_running)); Spacer(Modifier.height(8.dp)) } + Column(Modifier.fillMaxWidth().clip(Shape14).background(colors.surface).border(1.dp, pal.line, Shape14)) { + if (games.isEmpty()) Text(stringResource(R.string.storage_no_games), fontSize = 14.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(16.dp)) + games.forEachIndexed { i, g -> + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp), + modifier = Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 8.dp), + ) { + Box(Modifier.size(42.dp).clip(RoundedCornerShape(8.dp)).background(artBrush(hueOf(g.name)))) { + if (g.art != null) AsyncImage(model = g.art, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.size(42.dp)) + } + Column(Modifier.weight(1.3f)) { + Text(gameName(g), fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + Text( + listOfNotNull( + g.library.takeIf { !g.internal }, + if (g.lastPlayed > 0) stringResource(R.string.storage_played, DateFormat.getDateInstance(DateFormat.MEDIUM).format(Date(g.lastPlayed * 1000))) else stringResource(R.string.storage_never_played), + ).joinToString(" · "), + fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis, + ) + } + Column(Modifier.weight(1f)) { + Row(Modifier.fillMaxWidth().height(8.dp).clip(RoundedCornerShape(4.dp)).background(Color(0xFF0A0C0F))) { + listOf(g.game to BucketColors.getValue(Bucket.GAMES), g.prefix to BucketColors.getValue(Bucket.GAME_DATA), (g.shaders + g.workshop) to Color(0xFFC5B8FF)) + .forEach { (v, c) -> if (v > 0) Box(Modifier.weight(v.toFloat() / max).fillMaxHeight().background(c)) } + val rest = max - g.total + if (rest > 0) Spacer(Modifier.weight(rest.toFloat() / max)) + } + Text( + stringResource(R.string.storage_game_parts, gb(g.game), gb(g.data)), + fontSize = 11.5.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(top = 3.dp), maxLines = 1, + ) + } + Text(gb(g.total), fontSize = 16.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, modifier = Modifier.widthIn(min = 72.dp)) + SecondaryButton(stringResource(R.string.storage_uninstall), compact = true, enabled = !sessionRunning) { confirm = g } + } + if (i < games.lastIndex) Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line)) + } + } + Spacer(Modifier.height(8.dp)) + Note(stringResource(R.string.storage_games_note)) + confirm?.let { g -> + // steam://uninstall reaches only the session's client, the selected one. + val otherClient = g.x64 != (SessionPrefs.steamClientArch(LocalContext.current) == "x86_64") + if (otherClient) AlertDialog( + onDismissRequest = { confirm = null }, + title = { Text(stringResource(R.string.storage_uninstall_title, gameName(g))) }, + text = { Text(stringResource(if (g.x64) R.string.storage_uninstall_in_x64 else R.string.storage_uninstall_in_arm64), fontSize = 14.sp) }, + confirmButton = { + val ok = remember { FocusRequester() } + LaunchedEffect(Unit) { runCatching { ok.requestFocus() } } + FocusText(stringResource(R.string.common_ok), pal.signal, modifier = Modifier.focusRequester(ok)) { confirm = null } + }, + ) else AlertDialog( + onDismissRequest = { confirm = null }, + title = { Text(stringResource(R.string.storage_uninstall_title, gameName(g))) }, + text = { Text(stringResource(R.string.storage_uninstall_body, gb(g.game)), fontSize = 14.sp) }, + confirmButton = { FocusText(stringResource(R.string.storage_open_steam), pal.signal) { confirm = null; a.onSteamUrl("steam://uninstall/${g.appId}") } }, + dismissButton = { + val cancel = remember { FocusRequester() } + LaunchedEffect(Unit) { runCatching { cancel.requestFocus() } } + FocusText(stringResource(R.string.common_cancel), colors.onBackground, modifier = Modifier.focusRequester(cancel)) { confirm = null } + }, + ) + } +} + +@Composable +private fun gameName(g: GameUsage): String = if (g.x64) stringResource(R.string.storage_game_x64, g.name) else g.name + +@Composable +private fun ToolsView(report: StorageReport, sessionRunning: Boolean, onBack: () -> Unit) { + val ctx = LocalContext.current + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + var confirm by remember { mutableStateOf<ToolUsage?>(null) } + var confirmAll by remember { mutableStateOf(false) } + val unused = report.unusedTools + val inUse = report.tools.filter { it.state != ToolState.UNUSED } + SubHeader( + stringResource(R.string.storage_tools), + stringResource(R.string.storage_tools_detail, gb(report.tools.sumOf { it.bytes }), gb(unused.sumOf { it.bytes })), onBack, + ) { + if (unused.isNotEmpty()) PrimaryButton(stringResource(R.string.storage_remove_unused, gb(unused.sumOf { it.bytes })), compact = true, + enabled = !sessionRunning && !StorageState.cleaning) { confirmAll = true } + } + if (sessionRunning) { Note(stringResource(R.string.storage_session_running)); Spacer(Modifier.height(4.dp)) } + SectionTitle(stringResource(R.string.storage_in_use), null) + ToolList(inUse, sessionRunning) { } + if (unused.isNotEmpty()) { + SectionTitle(stringResource(R.string.storage_not_used), null) + ToolList(unused, sessionRunning) { confirm = it } + } + confirm?.let { t -> + AlertDialog( + onDismissRequest = { confirm = null }, + title = { Text(stringResource(R.string.storage_remove_title, t.name)) }, + text = { Text(toolDetail(t) + "\n\n" + stringResource(R.string.storage_remove_body, gb(t.bytes)), fontSize = 14.sp) }, + confirmButton = { FocusText(stringResource(R.string.storage_remove), colors.error) { confirm = null; StorageState.removeTool(ctx, t) { } } }, + dismissButton = { + val cancel = remember { FocusRequester() } + LaunchedEffect(Unit) { runCatching { cancel.requestFocus() } } + FocusText(stringResource(R.string.common_cancel), colors.onBackground, modifier = Modifier.focusRequester(cancel)) { confirm = null } + }, + ) + } + if (confirmAll) AlertDialog( + onDismissRequest = { confirmAll = false }, + title = { Text(stringResource(R.string.storage_remove_unused, gb(unused.sumOf { it.bytes }))) }, + text = { Text(unused.joinToString("\n") { "• " + it.name + " " + gb(it.bytes) }, fontSize = 14.sp) }, + confirmButton = { + FocusText(stringResource(R.string.storage_remove), colors.error) { + confirmAll = false + StorageState.clean(ctx, setOf(CleanItem.OLD_TOOLS, CleanItem.UNUSED_CUSTOM)) { } + } + }, + dismissButton = { + val cancel = remember { FocusRequester() } + LaunchedEffect(Unit) { runCatching { cancel.requestFocus() } } + FocusText(stringResource(R.string.common_cancel), colors.onBackground, modifier = Modifier.focusRequester(cancel)) { confirmAll = false } + }, + ) + if (StorageState.cleaning) Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier.padding(top = 10.dp)) { + CircularProgressIndicator(strokeWidth = 2.dp, modifier = Modifier.size(16.dp), color = pal.signal) + Text(stringResource(R.string.storage_cleaning), fontSize = 13.sp, color = colors.onBackground) + } +} + +@Composable +private fun toolDetail(t: ToolUsage): String = when (t.reason) { + ToolReason.DEFAULT_PROTON -> stringResource(R.string.storage_tool_default_proton) + ToolReason.PROTON -> stringResource(R.string.storage_tool_proton) + ToolReason.FEX_RUNTIME -> stringResource(R.string.storage_tool_fex_runtime) + ToolReason.ARM_RUNTIME -> stringResource(R.string.storage_tool_arm_runtime) + ToolReason.REDISTRIBUTABLES -> stringResource(R.string.storage_tool_redist) + ToolReason.FEX -> stringResource(R.string.storage_tool_fex) + ToolReason.STEAM_TOOL -> stringResource(R.string.storage_tool_steam) + ToolReason.OLD_RUNTIME -> stringResource(R.string.storage_tool_old_runtime) + ToolReason.X86_PROTON -> stringResource(R.string.storage_tool_x86_proton) + ToolReason.CUSTOM_UNKNOWN -> stringResource(R.string.storage_tool_custom_unknown) + ToolReason.X64_CLIENT -> stringResource(R.string.storage_tool_x64_client) + ToolReason.CUSTOM -> when { + t.isDefault -> stringResource(R.string.storage_tool_custom_default) + t.games > 0 -> pluralStringResource(R.plurals.storage_tool_custom_games, t.games, t.games) + else -> stringResource(R.string.storage_tool_custom_unused) + } +} + +@Composable +private fun ToolList(tools: List<ToolUsage>, sessionRunning: Boolean, onRemove: (ToolUsage) -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + Column(Modifier.fillMaxWidth().clip(Shape14).background(colors.surface).border(1.dp, pal.line, Shape14)) { + tools.forEachIndexed { i, t -> + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), + modifier = Modifier.fillMaxWidth().heightIn(min = 56.dp).padding(horizontal = 14.dp, vertical = 8.dp), + ) { + Column(Modifier.weight(1f)) { + Text(t.name, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + Text(toolDetail(t), fontSize = 12.5.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis) + } + when (t.state) { + ToolState.IN_USE -> Pill(if (t.isDefault) stringResource(R.string.storage_tag_default) else pluralStringResource(R.plurals.storage_tag_games, t.games, t.games), pal.signal) + ToolState.REQUIRED -> Pill(stringResource(R.string.storage_tag_required), colors.onSurfaceVariant) + ToolState.UNUSED -> Pill(stringResource(R.string.storage_tag_not_used), AttentionAmber) + } + Text(gb(t.bytes), fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, modifier = Modifier.widthIn(min = 70.dp)) + if (t.state == ToolState.UNUSED) SecondaryButton(stringResource(R.string.storage_remove), compact = true, enabled = !sessionRunning && !StorageState.cleaning) { onRemove(t) } + else Icon(Icons.Outlined.Lock, contentDescription = null, tint = colors.onSurfaceVariant, modifier = Modifier.size(16.dp)) + } + if (i < tools.lastIndex) Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line)) + } + } +} + +@Composable +internal fun LowSpaceDialog(free: Long, onFreeUp: () -> Unit, onPlay: () -> Unit, onDismiss: () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val report = StorageState.report + val focus = remember { FocusRequester() } + LaunchedEffect(Unit) { runCatching { focus.requestFocus() } } + AlertDialog( + onDismissRequest = onDismiss, + title = { Text(stringResource(R.string.storage_low_title, gb(free))) }, + text = { + Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { + Text(stringResource(R.string.storage_low_body), fontSize = 14.sp) + if (report != null && StorageState.safeBytes(report) > 0) Text( + stringResource(R.string.storage_low_safe, gb(StorageState.safeBytes(report))), fontSize = 13.sp, color = pal.good, + ) + } + }, + confirmButton = { FocusText(stringResource(R.string.storage_free_up), pal.signal, modifier = Modifier.focusRequester(focus), onClick = onFreeUp) }, + dismissButton = { FocusText(stringResource(R.string.storage_play_anyway), colors.onBackground, onClick = onPlay) }, + ) +} + +@Composable +private fun ActionStatus() { + val pal = LocalPalette.current + val colors = MaterialTheme.colorScheme + when { + StorageState.cleaning -> Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), + modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp).clip(Shape14).background(colors.surface).border(1.dp, pal.line, Shape14).padding(12.dp), + ) { + CircularProgressIndicator(strokeWidth = 2.dp, modifier = Modifier.size(16.dp), color = pal.signal) + Text(StorageState.progress ?: stringResource(R.string.storage_cleaning), fontSize = 13.sp, color = colors.onBackground) + } + StorageState.lastError != null -> { Note(stringResource(R.string.storage_failed, StorageState.lastError ?: "")); Spacer(Modifier.height(8.dp)) } + StorageState.lastFreed != null -> { Note(stringResource(R.string.storage_freed, gb(StorageState.lastFreed ?: 0))); Spacer(Modifier.height(8.dp)) } + } +} + +@Composable +private fun componentLabel(c: ComponentUsage): String { + val name = com.droiddeck.launcher.session.ComponentsManager.LABEL[c.comp] ?: c.comp + return if (c.packageFile != null) "$name ${c.version}" + else stringResource(R.string.storage_component_original, name, c.protonName ?: c.protonId.orEmpty()) +} + +@Composable +private fun ListCard(content: @Composable () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + Column(Modifier.fillMaxWidth().clip(Shape14).background(colors.surface).border(1.dp, pal.line, Shape14)) { content() } +} + +@Composable +private fun ItemRow(title: String, detail: String?, bytes: Long, last: Boolean, pill: (@Composable () -> Unit)? = null, action: (@Composable () -> Unit)? = null) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), + modifier = Modifier.fillMaxWidth().heightIn(min = 56.dp).padding(horizontal = 14.dp, vertical = 8.dp), + ) { + Column(Modifier.weight(1f)) { + Text(title, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + if (detail != null) Text(detail, fontSize = 12.5.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis) + } + pill?.invoke() + Text(gb(bytes), fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, modifier = Modifier.widthIn(min = 70.dp)) + action?.invoke() + } + if (!last) Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line)) +} + +@Composable +private fun ConfirmDialog(title: String, body: String, confirm: String, danger: Boolean = true, onConfirm: () -> Unit, onDismiss: () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + AlertDialog( + onDismissRequest = onDismiss, + title = { Text(title) }, + text = { Text(body, fontSize = 14.sp) }, + confirmButton = { FocusText(confirm, if (danger) colors.error else pal.signal) { onDismiss(); onConfirm() } }, + dismissButton = { + val cancel = remember { FocusRequester() } + LaunchedEffect(Unit) { runCatching { cancel.requestFocus() } } + FocusText(stringResource(R.string.common_cancel), colors.onBackground, modifier = Modifier.focusRequester(cancel), onClick = onDismiss) + }, + ) +} + +@Composable +private fun GameDataView(report: StorageReport, sessionRunning: Boolean, onBack: () -> Unit) { + val ctx = LocalContext.current + val busy = sessionRunning || StorageState.cleaning + var confirm by remember { mutableStateOf<com.droiddeck.launcher.storage.Leftover?>(null) } + SubHeader(stringResource(R.string.storage_game_data), stringResource(R.string.storage_game_data_hint, gb(report.prefixes), gb(report.workshop), gb(report.shaders)), onBack) + ActionStatus() + if (sessionRunning) { Note(stringResource(R.string.storage_session_running)); Spacer(Modifier.height(4.dp)) } + val games = report.games.filter { it.data >= ONE_MB }.sortedByDescending { it.data } + SectionTitle(stringResource(R.string.storage_data_installed), gb(games.sumOf { it.data })) + ListCard { + if (games.isEmpty()) Text(stringResource(R.string.storage_no_games), fontSize = 14.sp, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(16.dp)) + games.forEachIndexed { i, g -> + ItemRow( + gameName(g), stringResource(R.string.storage_data_parts, gb(g.prefix), gb(g.shaders), gb(g.workshop)), g.data, i == games.lastIndex, + action = { SecondaryButton(stringResource(R.string.storage_clear_shaders), compact = true, enabled = !busy && g.shaders >= ONE_MB) { StorageState.clearShaders(ctx, g.appId, g.x64) } }, + ) + } + } + val leftovers = report.leftovers.sortedByDescending { it.bytes } + if (!report.leftoversChecked) { + SectionTitle(stringResource(R.string.storage_data_leftovers), null) + Note(stringResource(R.string.storage_leftovers_unchecked)) + } + if (leftovers.isNotEmpty()) { + SectionTitle(stringResource(R.string.storage_data_leftovers), gb(leftovers.sumOf { it.bytes })) + val safe = leftovers.filter { it.safe } + ListCard { + if (safe.isNotEmpty()) ItemRow( + pluralStringResource(R.plurals.storage_item_leftovers_detail, safe.size, safe.size), null, safe.sumOf { it.bytes }, leftovers.none { !it.safe }, + pill = { Pill(stringResource(R.string.storage_tag_safe), LocalPalette.current.good) }, + action = { SecondaryButton(stringResource(R.string.storage_remove), compact = true, enabled = !busy) { StorageState.clean(ctx, setOf(CleanItem.LEFTOVERS)) { } } }, + ) + val unsure = leftovers.filter { !it.safe } + unsure.forEachIndexed { i, l -> + ItemRow( + stringResource(R.string.storage_steam_app, l.appId), stringResource(R.string.storage_leftover_unsure_detail), l.bytes, i == unsure.lastIndex, + pill = { Pill(stringResource(R.string.storage_tag_saves), AttentionAmber) }, + action = { SecondaryButton(stringResource(R.string.storage_remove), compact = true, enabled = !busy) { confirm = l } }, + ) + } + } + } + if (report.otherPrefixes > 0) { + SectionTitle(stringResource(R.string.storage_data_other), null) + ListCard { ItemRow(stringResource(R.string.storage_data_other_title), stringResource(R.string.storage_data_other_detail), report.otherPrefixes, true) } + } + confirm?.let { l -> + ConfirmDialog( + stringResource(R.string.storage_remove_title, stringResource(R.string.storage_steam_app, l.appId)), + stringResource(R.string.storage_leftover_confirm, gb(l.bytes)), stringResource(R.string.storage_remove), + onConfirm = { StorageState.removeLeftover(ctx, l) }, onDismiss = { confirm = null }, + ) + } +} + +@Composable +private fun ComponentsView(report: StorageReport, sessionRunning: Boolean, onBack: () -> Unit) { + val ctx = LocalContext.current + val pal = LocalPalette.current + val colors = MaterialTheme.colorScheme + val busy = sessionRunning || StorageState.cleaning + var confirm by remember { mutableStateOf<ComponentUsage?>(null) } + val unused = report.unusedComponents + SubHeader(stringResource(R.string.storage_components), + stringResource(R.string.storage_tools_detail, gb(report.components.sumOf { it.bytes }), gb(unused.sumOf { it.bytes })), onBack) { + if (unused.isNotEmpty()) PrimaryButton(stringResource(R.string.storage_remove_unused, gb(unused.sumOf { it.bytes })), compact = true, enabled = !busy) { + StorageState.clean(ctx, setOf(CleanItem.UNUSED_COMPONENTS)) { } + } + } + ActionStatus() + if (sessionRunning) { Note(stringResource(R.string.storage_session_running)); Spacer(Modifier.height(4.dp)) } + val packages = report.components.filter { it.packageFile != null } + val originals = report.components.filter { it.packageFile == null } + SectionTitle(stringResource(R.string.storage_components_packages), null) + ListCard { + if (packages.isEmpty()) Text(stringResource(R.string.storage_components_none), fontSize = 14.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(16.dp)) + packages.forEachIndexed { i, c -> + ItemRow(componentLabel(c), stringResource(if (c.inUse) R.string.storage_component_in_use else R.string.storage_component_unused), c.bytes, i == packages.lastIndex, + pill = { Pill(stringResource(if (c.inUse) R.string.storage_tag_in_use else R.string.storage_tag_not_used), if (c.inUse) pal.signal else AttentionAmber) }, + action = { if (!c.inUse) SecondaryButton(stringResource(R.string.storage_remove), compact = true, enabled = !busy) { confirm = c } }) + } + } + if (originals.isNotEmpty()) { + SectionTitle(stringResource(R.string.storage_components_originals), null) + ListCard { + originals.forEachIndexed { i, c -> + ItemRow(componentLabel(c), c.version + " · " + stringResource(if (c.inUse) R.string.storage_original_kept else R.string.storage_original_old), c.bytes, i == originals.lastIndex, + pill = { Pill(stringResource(if (c.inUse) R.string.storage_tag_required else R.string.storage_tag_not_used), if (c.inUse) colors.onSurfaceVariant else AttentionAmber) }, + action = { if (!c.inUse) SecondaryButton(stringResource(R.string.storage_remove), compact = true, enabled = !busy) { confirm = c } }) + } + } + } + Spacer(Modifier.height(8.dp)) + Note(stringResource(R.string.storage_components_note)) + confirm?.let { c -> + ConfirmDialog(stringResource(R.string.storage_remove_title, componentLabel(c)), + stringResource(if (c.packageFile != null) R.string.storage_component_confirm else R.string.storage_original_confirm, gb(c.bytes)), + stringResource(R.string.storage_remove), onConfirm = { StorageState.removeComponent(ctx, c) }, onDismiss = { confirm = null }) + } +} + +@Composable +private fun DesktopView(report: StorageReport, sessionRunning: Boolean, onBack: () -> Unit) { + val ctx = LocalContext.current + val busy = sessionRunning || StorageState.cleaning + var confirm by remember { mutableStateOf<com.droiddeck.launcher.storage.FlatpakUsage?>(null) } + var confirmPrune by remember { mutableStateOf(false) } + SubHeader(stringResource(R.string.storage_desktop), stringResource(R.string.storage_desktop_detail, gb(report.flatpak)), onBack) { + PrimaryButton(stringResource(R.string.storage_desktop_prune), compact = true, enabled = !busy && report.flatpakRuntimes + report.flatpakCache >= ONE_MB) { confirmPrune = true } + } + ActionStatus() + if (sessionRunning) { Note(stringResource(R.string.storage_session_running)); Spacer(Modifier.height(4.dp)) } + SectionTitle(stringResource(R.string.storage_desktop_apps_title), null) + ListCard { + if (report.flatpakApps.isEmpty()) Text(stringResource(R.string.storage_desktop_none), fontSize = 14.sp, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(16.dp)) + report.flatpakApps.forEachIndexed { i, app -> + ItemRow(app.name, app.id, app.bytes, i == report.flatpakApps.lastIndex, + action = { SecondaryButton(stringResource(R.string.storage_uninstall), compact = true, enabled = !busy) { confirm = app } }) + } + } + SectionTitle(stringResource(R.string.storage_desktop_shared_title), null) + ListCard { + ItemRow(stringResource(R.string.storage_desktop_runtimes), stringResource(R.string.storage_desktop_runtimes_detail), report.flatpakRuntimes, false) + ItemRow(stringResource(R.string.storage_desktop_cache), stringResource(R.string.storage_desktop_cache_detail), report.flatpakCache, true) + } + confirm?.let { app -> + ConfirmDialog(stringResource(R.string.storage_uninstall_title, app.name), stringResource(R.string.storage_flatpak_uninstall_body, gb(app.bytes)), + stringResource(R.string.storage_uninstall), onConfirm = { StorageState.uninstallFlatpak(ctx, app.id) }, onDismiss = { confirm = null }) + } + if (confirmPrune) ConfirmDialog(stringResource(R.string.storage_desktop_prune), stringResource(R.string.storage_desktop_prune_body), + stringResource(R.string.storage_desktop_prune), danger = false, onConfirm = { StorageState.pruneFlatpak(ctx) }, onDismiss = { confirmPrune = false }) +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoreAchievementsUi.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoreAchievementsUi.kt new file mode 100644 index 0000000000..e0d5099a74 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoreAchievementsUi.kt @@ -0,0 +1,451 @@ +package com.droiddeck.launcher.ui + +import androidx.activity.compose.BackHandler +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.core.MutableTransitionState +import androidx.compose.animation.fadeIn +import androidx.compose.animation.slideInHorizontally +import androidx.compose.foundation.border +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.ui.text.SpanStyle +import androidx.compose.ui.text.buildAnnotatedString +import androidx.compose.ui.text.withStyle +import androidx.compose.ui.window.Dialog +import androidx.compose.ui.window.DialogProperties +import androidx.compose.foundation.LocalIndication +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.focusable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsFocusedAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.EmojiEvents +import androidx.compose.material3.Icon +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.runtime.withFrameNanos +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import androidx.compose.ui.draw.clip +import androidx.compose.ui.focus.FocusRequester +import androidx.compose.ui.focus.focusRequester +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import coil.compose.AsyncImage +import com.droiddeck.launcher.R +import com.droiddeck.launcher.stores.StoreAchievements +import com.droiddeck.launcher.stores.StoreAchievements.Achievement +import com.droiddeck.launcher.stores.StoreAchievements.Reason +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import java.text.DateFormat +import java.util.Date + +private val TrophyGold = Color(0xFFF5C542) + +internal class AchievementsState(val list: List<Achievement>?, val reason: Reason?, val reading: Boolean) { + val done: Int get() = list?.count { it.unlocked } ?: 0 + val all: Boolean get() = !list.isNullOrEmpty() && list.all { it.unlocked } + + companion object { val READING = AchievementsState(null, null, true) } +} + +@Composable +internal fun rememberAchievements(game: StoreAchievements.Game?): AchievementsState? { + val ctx = LocalContext.current.applicationContext + var state by remember(game) { mutableStateOf(if (game == null) null else AchievementsState.READING) } + LaunchedEffect(game, StoreAchievements.revision) { + if (game == null) return@LaunchedEffect + val source = StoreAchievements.forSource(game.source) ?: return@LaunchedEffect + val cached = withContext(Dispatchers.IO) { source.cached(ctx, game) } + if (cached != null) state = AchievementsState(cached, null, true) + state = when (val r = withContext(Dispatchers.IO) { source.fetch(ctx, game) }) { + is StoreAchievements.Result.Found -> AchievementsState(r.list, null, false) + is StoreAchievements.Result.Failed -> AchievementsState(cached, r.reason, false) + } + } + return state +} + +@Composable +internal fun achievementsNote(state: AchievementsState, label: String): String? = when { + !state.list.isNullOrEmpty() -> null + state.reading -> stringResource(R.string.achievements_reading) + state.reason == Reason.SIGNED_OUT -> stringResource(R.string.achievements_signed_out, label) + state.reason == Reason.UNREACHABLE -> stringResource(R.string.achievements_unreachable, label) + else -> stringResource(R.string.achievements_none, label) +} + +@Composable +internal fun Trophy(size: Dp = 18.dp, modifier: Modifier = Modifier, description: String? = stringResource(R.string.achievements_all)) { + Icon(Icons.Filled.EmojiEvents, description, modifier.size(size), tint = TrophyGold) +} + +@Composable +internal fun AchievementsProgress(state: AchievementsState, compact: Boolean = false) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val list = state.list ?: return + if (list.isEmpty()) return + Column(verticalArrangement = Arrangement.spacedBy(if (compact) 6.dp else 8.dp)) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) { + Text(stringResource(R.string.achievements_count, state.done, list.size), fontSize = 13.sp, color = colors.onSurfaceVariant) + if (state.all) Trophy(16.dp) + } + LinearProgressIndicator( + progress = { state.done / list.size.toFloat() }, + color = pal.signal, trackColor = pal.line, + modifier = Modifier.fillMaxWidth().height(4.dp).clip(RoundedCornerShape(2.dp)), + ) + } +} + +@Composable +private fun AchievementGroupLabel(label: String) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier.fillMaxWidth().padding(top = 6.dp, bottom = 2.dp)) { + Text(label.uppercase(), fontSize = 11.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.2.sp, color = colors.onSurfaceVariant) + Box(Modifier.weight(1f).height(1.dp).background(pal.line)) + } +} + +private fun groups(list: List<Achievement>): List<Pair<Int, List<Achievement>>> = listOf( + R.string.achievements_group_unlocked to list.filter { it.unlocked }.sortedByDescending { it.unlockedAt }, + R.string.achievements_group_locked to list.filter { !it.unlocked && !it.hidden }, + R.string.achievements_group_hidden to list.filter { !it.unlocked && it.hidden }, +).filter { it.second.isNotEmpty() } + +@Composable +private fun AchievementIcon(a: Achievement, size: Dp) { + Box(Modifier.size(size).clip(RoundedCornerShape(8.dp)).background(LocalPalette.current.surfaceVariant)) { + val url = if (a.unlocked) a.icon else a.iconLocked ?: a.icon + if (url != null) AsyncImage( + model = url, contentDescription = null, contentScale = ContentScale.Crop, + modifier = Modifier.fillMaxSize().alpha(if (a.unlocked) 1f else 0.55f), + ) + } +} + +@Composable +internal fun AchievementRow(a: Achievement, compact: Boolean, modifier: Modifier = Modifier) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val interaction = remember { MutableInteractionSource() } + val hot = interaction.collectIsFocusedAsState().value + val shape = RoundedCornerShape(12.dp) + val secret = a.hidden && !a.unlocked + val icon = if (compact) 36.dp else 48.dp + Row( + verticalAlignment = Alignment.CenterVertically, + modifier = modifier.fillMaxWidth().clip(shape) + .background(if (hot) pal.signal.copy(alpha = 0.10f) else colors.surface) + .glideBorder(hot, shape, pal.signal, pal.line) + .focusable(interactionSource = interaction) + .padding(if (compact) 8.dp else 10.dp), + ) { + AchievementIcon(a, icon) + Spacer(Modifier.width(12.dp)) + Column(Modifier.weight(1f)) { + Text( + if (secret) stringResource(R.string.achievements_hidden) else a.name, + fontSize = if (compact) 14.sp else 15.sp, fontWeight = FontWeight.SemiBold, + color = if (a.unlocked) colors.onBackground else colors.onSurfaceVariant, + maxLines = if (compact) 1 else 2, overflow = TextOverflow.Ellipsis, + ) + val desc = if (secret) stringResource(R.string.achievements_hidden_detail) else a.description + if (desc.isNotEmpty()) Text( + desc, fontSize = if (compact) 12.sp else 13.sp, lineHeight = if (compact) 16.sp else 18.sp, + color = colors.onSurfaceVariant, maxLines = if (compact) 1 else 3, overflow = TextOverflow.Ellipsis, + ) + } + if (a.unlocked && a.unlockedAt > 0) { + Spacer(Modifier.width(10.dp)) + Text( + DateFormat.getDateInstance(DateFormat.MEDIUM).format(Date(a.unlockedAt * 1000)), + fontSize = 12.sp, fontWeight = FontWeight.Medium, color = pal.signal, + ) + } + } +} + +@Composable +internal fun StoreAchievementsCard(game: StoreAchievements.Game, title: String, modifier: Modifier = Modifier) { + val label = StoreAchievements.forSource(game.source)?.label ?: return + val state = rememberAchievements(game) ?: return + var open by remember { mutableStateOf(false) } + StoreAchievementsCardContent(label, state, modifier) { open = true } + if (open) { + VeilRing() + Dialog(onDismissRequest = { open = false }, properties = DialogProperties(usePlatformDefaultWidth = false, decorFitsSystemWindows = false)) { + CompositionLocalProvider(LocalFrontFocus provides null) { + SessionAchievementsPanel(label, state, title, veil = Color.Transparent, floating = true, onClose = { open = false }) + } + } + } +} + +@Composable +internal fun StoreAchievementsCardContent(label: String, state: AchievementsState, modifier: Modifier = Modifier, onOpen: () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val list = state.list + if (list.isNullOrEmpty() && !state.reading && state.reason != Reason.SIGNED_OUT && state.reason != Reason.UNREACHABLE) return + val shape = RoundedCornerShape(16.dp) + Column( + verticalArrangement = Arrangement.spacedBy(10.dp), + modifier = modifier.clip(shape).background(colors.surface).border(1.dp, pal.line, shape).padding(horizontal = 16.dp, vertical = 12.dp), + ) { + Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth()) { + Text(stringResource(R.string.achievements_title).uppercase(), fontSize = 11.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.2.sp, color = colors.onSurfaceVariant, modifier = Modifier.weight(1f)) + if (!list.isNullOrEmpty()) { + if (state.all) Trophy(16.dp, Modifier.padding(end = 6.dp)) + Text( + buildAnnotatedString { + withStyle(SpanStyle(fontSize = 18.sp, fontWeight = FontWeight.Bold, color = colors.onBackground)) { append("${state.done}") } + append(" / ${list.size}") + }, + fontSize = 13.sp, color = colors.onSurfaceVariant, + ) + } + } + if (list.isNullOrEmpty()) { + Text(achievementsNote(state, label).orEmpty(), fontSize = 13.sp, color = colors.onSurfaceVariant) + return@Column + } + LinearProgressIndicator( + progress = { state.done / list.size.toFloat() }, + color = pal.signal, trackColor = pal.line, + modifier = Modifier.fillMaxWidth().height(4.dp).clip(RoundedCornerShape(2.dp)), + ) + BoxWithConstraints(Modifier.fillMaxWidth()) { + val size = 40.dp + val gap = 8.dp + val fit = ((maxWidth + gap) / (size + gap)).toInt().coerceAtLeast(1) + val ordered = groups(list).flatMap { it.second } + val shown = if (ordered.size <= fit) ordered else ordered.take(fit - 1) + Row(horizontalArrangement = Arrangement.spacedBy(gap)) { + for (a in shown) AchievementIcon(a, size) + if (shown.size < ordered.size) Box(contentAlignment = Alignment.Center, modifier = Modifier.size(size).clip(RoundedCornerShape(8.dp)).background(pal.surfaceVariant)) { + Text("+${ordered.size - shown.size}", fontSize = 13.sp, fontWeight = FontWeight.Bold, color = colors.onSurfaceVariant, maxLines = 1) + } + } + } + SecondaryButton(stringResource(R.string.achievements_show_all, list.size), compact = true, onClick = onOpen) + } +} + +private fun LazyListScope.achievementItems(list: List<Achievement>, compact: Boolean, first: FocusRequester, labels: Boolean = true) { + var index = 0 + for ((label, group) in groups(list)) { + if (labels) item(key = "group-$label") { AchievementGroupLabel(stringResource(label, group.size)) } + val offset = index + itemsIndexed(group, key = { _, a -> "a-" + a.id }) { i, a -> + AchievementRow(a, compact, if (offset + i == 0) Modifier.focusRequester(first) else Modifier) + } + index += group.size + } +} + +@Composable +internal fun SessionAchievements(game: StoreAchievements.Game, title: String?, onClose: () -> Unit) { + val label = StoreAchievements.forSource(game.source)?.label.orEmpty() + SessionAchievementsPanel(label, rememberAchievements(game) ?: AchievementsState.READING, title, onClose = onClose) +} + +@Composable +internal fun SessionAchievementsPanel(label: String, state: AchievementsState, title: String?, veil: Color = Color.Black.copy(alpha = 0.45f), floating: Boolean = false, onClose: () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + BackHandler(onBack = onClose) + val kinds = remember(state.list) { + val list = state.list.orEmpty() + val split = groups(list) + if (split.size < 2) emptyList() else listOf(R.string.stores_tab_all to list) + split + } + var pick by remember { mutableIntStateOf(0) } + if (pick >= kinds.size) pick = 0 + val slide = remember { MutableTransitionState(false).apply { targetState = true } } + BoxWithConstraints( + Modifier.fillMaxSize().background(veil) + .clickable(interactionSource = remember { MutableInteractionSource() }, indication = null, onClick = onClose), + contentAlignment = Alignment.CenterEnd, + ) { + val short = maxHeight < 440.dp + AnimatedVisibility(slide, enter = slideInHorizontally(Motion.sp(0.8f)) { it } + fadeIn(Motion.tw(160)), label = "achievementsPanel") { + Column( + (if (floating) Modifier.padding(12.dp).fillMaxHeight().width(minOf(420.dp, maxWidth * 0.92f)).clip(RoundedCornerShape(20.dp)) + .background(pal.background).border(1.dp, pal.line2, RoundedCornerShape(20.dp)) + else Modifier.fillMaxHeight().width(minOf(420.dp, maxWidth * 0.92f)).background(pal.background.copy(alpha = 0.97f))) + .clickable(interactionSource = remember { MutableInteractionSource() }, indication = null) {} + .controllerBack(onClose) + .then(if (kinds.isEmpty()) Modifier else Modifier.bumpers({ pick = (pick + kinds.size - 1) % kinds.size }, { pick = (pick + 1) % kinds.size })) + .padding(if (short) 12.dp else 16.dp), + ) { + Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth()) { + Column(Modifier.weight(1f)) { + Text(stringResource(R.string.achievements_title), fontSize = if (short) 18.sp else 20.sp, fontWeight = FontWeight.Bold, color = colors.onBackground) + if (title != null) Text(title, fontSize = 13.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis) + } + state.list?.takeIf { it.isNotEmpty() }?.let { list -> + if (state.all) Trophy(20.dp, Modifier.padding(end = 6.dp)) + Text(stringResource(R.string.achievements_count_short, state.done, list.size), fontSize = 16.sp, fontWeight = FontWeight.SemiBold, color = pal.signal) + } + } + val list = state.list + if (list.isNullOrEmpty()) { + Text(achievementsNote(state, label).orEmpty(), fontSize = 13.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(top = 14.dp)) + } else { + LinearProgressIndicator( + progress = { state.done / list.size.toFloat() }, + color = pal.signal, trackColor = pal.line, + modifier = Modifier.padding(top = if (short) 6.dp else 10.dp).fillMaxWidth().height(4.dp).clip(RoundedCornerShape(2.dp)), + ) + if (kinds.isNotEmpty()) TabStrip( + kinds.map { (name, group) -> if (name == R.string.stores_tab_all) stringResource(name) + " · " + group.size else stringResource(name, group.size) }, + pick, { pick = it }, Modifier.padding(top = if (short) 8.dp else 12.dp), + ) + val first = remember { FocusRequester() } + val shown = kinds.getOrNull(pick)?.second ?: list + LazyColumn( + Modifier.weight(1f).padding(top = 6.dp), + contentPadding = PaddingValues(vertical = 6.dp), + verticalArrangement = Arrangement.spacedBy(6.dp), + ) { achievementItems(shown, short, first, labels = pick == 0) } + LaunchedEffect(list.isNotEmpty(), pick) { + withFrameNanos {} + runCatching { first.requestFocus() } + } + } + } + } + } +} + +@Composable +internal fun DrawerAchievementsRow(progress: Pair<Int, Int>?, modifier: Modifier = Modifier, onClick: () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val interaction = remember { MutableInteractionSource() } + val hot = interaction.collectIsFocusedAsState().value + val shape = RoundedCornerShape(12.dp) + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(10.dp), + modifier = modifier.fillMaxWidth().height(44.dp).clip(shape) + .background(if (hot) pal.signal.copy(alpha = 0.14f) else colors.surface) + .glideBorder(hot, shape, pal.signal, pal.line) + .clickable(interactionSource = interaction, indication = LocalIndication.current, onClick = onClick) + .controllerConfirm(onClick = onClick) + .padding(horizontal = 12.dp), + ) { + val all = progress != null && progress.second > 0 && progress.first == progress.second + Icon(Icons.Filled.EmojiEvents, null, tint = if (all) TrophyGold else if (hot) pal.signal else colors.onSurfaceVariant, modifier = Modifier.size(20.dp)) + Text(stringResource(R.string.achievements_title), fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, modifier = Modifier.weight(1f)) + if (progress != null && progress.second > 0) { + Text(stringResource(R.string.achievements_count_short, progress.first, progress.second), fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = pal.signal) + } + } +} + + +private val previewList = listOf( + Achievement("first", "First Steps", "Finish the tutorial.", hidden = false, unlocked = true, unlockedAt = 1_759_000_000, icon = null, iconLocked = null), + Achievement("boss", "Giant Slayer", "Defeat the warden of the old keep without taking damage.", hidden = false, unlocked = true, unlockedAt = 1_760_100_000, icon = null, iconLocked = null), + Achievement("collector", "Collector", "Find every relic in the valley.", hidden = false, unlocked = false, unlockedAt = 0, icon = null, iconLocked = null), + Achievement("secret", "The Last Door", "Open it.", hidden = true, unlocked = false, unlockedAt = 0, icon = null, iconLocked = null), +) + +@Composable +private fun PreviewSurface(content: @Composable () -> Unit) { + DroidDeckTheme(theme = Themes.GRAPHITE) { + Box(Modifier.fillMaxSize().background(LocalPalette.current.background).padding(16.dp)) { content() } + } +} + +@Preview(name = "Store page section", widthDp = 800, heightDp = 600) +@Composable +private fun StoreAchievementsSectionPreview() = PreviewSurface { + Column(Modifier.width(340.dp)) { StoreAchievementsCardContent("GOG", AchievementsState(previewList, null, false)) {} } +} + +@Preview(name = "Store page section, signed out", widthDp = 800, heightDp = 200) +@Composable +private fun StoreAchievementsSectionSignedOutPreview() = PreviewSurface { + Column(Modifier.width(340.dp)) { StoreAchievementsCardContent("Epic", AchievementsState(null, Reason.SIGNED_OUT, false)) {} } +} + +@Preview(name = "Session panel", widthDp = 800, heightDp = 500) +@Composable +private fun SessionAchievementsPanelPreview() = DroidDeckTheme(theme = Themes.GRAPHITE) { + SessionAchievementsPanel("Epic", AchievementsState(previewList, null, false), "Hollow Valley", onClose = {}) +} + +@Preview(name = "Session panel, 4:3", widthDp = 560, heightDp = 420) +@Composable +private fun SessionAchievementsPanelShortPreview() = DroidDeckTheme(theme = Themes.GRAPHITE) { + SessionAchievementsPanel("GOG", AchievementsState(previewList.map { + Achievement(it.id, it.name, it.description, it.hidden, true, 1_760_000_000, null, null) + }, null, false), "Hollow Valley", onClose = {}) +} + +@Preview(name = "Session panel, offline", widthDp = 800, heightDp = 500) +@Composable +private fun SessionAchievementsPanelOfflinePreview() = DroidDeckTheme(theme = Themes.GRAPHITE) { + SessionAchievementsPanel("GOG", AchievementsState(null, Reason.UNREACHABLE, false), "Hollow Valley", onClose = {}) +} + +@Preview(name = "Drawer row", widthDp = 360, heightDp = 160) +@Composable +private fun DrawerAchievementsRowPreview() = PreviewSurface { + Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { + DrawerAchievementsRow(2 to 4) {} + DrawerAchievementsRow(4 to 4) {} + DrawerAchievementsRow(null) {} + } +} + +@Preview(name = "Rows", widthDp = 480, heightDp = 300) +@Composable +private fun AchievementRowPreview() = PreviewSurface { + Column(verticalArrangement = Arrangement.spacedBy(6.dp)) { + AchievementsProgress(AchievementsState(previewList, null, false)) + for (a in previewList) AchievementRow(a, compact = false) + AchievementRow(previewList[0], compact = true) + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoreChips.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoreChips.kt index 410d44e997..ec12d19aff 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StoreChips.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoreChips.kt @@ -17,16 +17,12 @@ import com.droiddeck.launcher.R import com.droiddeck.launcher.frontend.Library import com.droiddeck.launcher.stores.Store -// Where a game came from, as a small coloured chip: Steam, one of the stores, or an added folder. -/** Flathub's own accent, as each store has one, and the ink that reads on it. */ internal val FlathubTeal = Color(0xFF3FB8AF) internal val FlathubInk = Color(0xFF04211F) -/** The Store rail section's source id, for its colours. */ internal const val FLATHUB = "flathub" -/** The chip's colours per source: a tinted ground and a readable ink on it, one pair per store. */ internal class SourceColours(val fill: Color, val ink: Color, val dot: Color) internal fun sourceColours(source: String): SourceColours = when (source) { @@ -47,7 +43,6 @@ internal fun sourceLabel(source: String): String = when (source) { else -> stringResource(R.string.source_added) } -/** The source chip itself; [small] for a list row, the regular size for a hero or a card. */ @Composable internal fun SourceChip(source: String, small: Boolean = false, modifier: Modifier = Modifier) { val c = sourceColours(source) @@ -59,7 +54,6 @@ internal fun SourceChip(source: String, small: Boolean = false, modifier: Modifi ) } -/** A status chip in the stores' colours: green for done ("Installed"), blue for busy, amber for a warning. */ @Composable internal fun StateChip(text: String, tone: ChipTone, small: Boolean = false) { val pal = LocalPalette.current diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoreGameFacts.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoreGameFacts.kt new file mode 100644 index 0000000000..5a770942a0 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoreGameFacts.kt @@ -0,0 +1,327 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.ExitTransition +import androidx.compose.animation.core.FastOutSlowInEasing +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.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.foundation.LocalIndication +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +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.ExperimentalLayoutApi +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.OpenInNew +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +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.alpha +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +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.text.SpanStyle +import androidx.compose.ui.text.buildAnnotatedString +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.text.withStyle +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.droiddeck.launcher.R +import com.droiddeck.launcher.stores.GameFacts +import com.droiddeck.launcher.stores.Lookup +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext + + +internal class GameScores(val metacritic: Lookup<GameFacts.Metacritic>, val hltb: Lookup<GameFacts.Hltb>) + +@Composable +internal fun rememberGameScores(title: String?): GameScores { + val ctx = LocalContext.current.applicationContext + var metacritic by remember(title) { mutableStateOf(title?.let { GameFacts.peekMetacritic(it) } ?: if (title == null) Lookup.None else Lookup.Pending) } + var hltb by remember(title) { mutableStateOf(title?.let { GameFacts.peekHltb(it) } ?: if (title == null) Lookup.None else Lookup.Pending) } + LaunchedEffect(title) { + if (title == null) return@LaunchedEffect + launch { metacritic = withContext(Dispatchers.IO) { GameFacts.metacritic(ctx, title) }?.let { Lookup.Found(it) } ?: Lookup.None } + launch { hltb = withContext(Dispatchers.IO) { GameFacts.hltb(ctx, title) }?.let { Lookup.Found(it) } ?: Lookup.None } + } + return GameScores(metacritic, hltb) +} + +@Composable +internal fun HeroScores(scores: GameScores, modifier: Modifier = Modifier) { + Row(verticalAlignment = Alignment.CenterVertically, modifier = modifier) { + Looked(scores.metacritic, exit = fadeOut()) { lookup -> + val found = (lookup as? Lookup.Found)?.value + HeroStat(stringResource(R.string.stores_fact_metacritic), found?.url) { + if (found != null) MetacriticBadge(found.score) else Placeholder(BadgeHeight) + } + } + Looked(scores.hltb, exit = fadeOut()) { lookup -> + val found = (lookup as? Lookup.Found)?.value + val lead = found?.let { hltbRuns(it).firstOrNull() } + HeroStat(lead?.second ?: stringResource(R.string.stores_hltb_main), found?.url) { + if (lead != null) Text(hltbTime(lead.first), fontSize = 26.sp, lineHeight = 28.sp, fontWeight = FontWeight.Bold, color = Color.White, maxLines = 1) + else Placeholder(64.dp) + } + } + } +} + +@Composable +private fun HeroStat(label: String, link: String?, value: @Composable () -> Unit) { + val pal = LocalPalette.current + val src = remember { MutableInteractionSource() } + val hot = link != null && rememberHot(src) + Row(verticalAlignment = Alignment.CenterVertically) { + Box(Modifier.padding(horizontal = 6.dp).width(1.dp).height(44.dp).background(Color.White.copy(alpha = 0.18f))) + Column( + horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(6.dp), + modifier = Modifier.then(linkSurface(label, link, src, hot, StatShape, hotFill = Color.Black.copy(alpha = 0.45f))).widthIn(min = 96.dp).padding(horizontal = 14.dp, vertical = 8.dp), + ) { + Box(contentAlignment = Alignment.Center, modifier = Modifier.height(BadgeHeight)) { value() } + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) { + val tint = Color.White.copy(alpha = if (hot) 1f else 0.78f) + Text(label.uppercase(), fontSize = 10.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.sp, color = tint, maxLines = 1) + if (link != null) Icon(Icons.AutoMirrored.Filled.OpenInNew, contentDescription = null, tint = tint, modifier = Modifier.size(10.dp)) + } + } + } +} + +@OptIn(ExperimentalLayoutApi::class) +@Composable +internal fun StoreGameFacts(developer: String, publisher: String, releaseDate: String, scores: GameScores, scoresInHero: Boolean, modifier: Modifier = Modifier) { + val pal = LocalPalette.current + val colors = MaterialTheme.colorScheme + val released = remember(releaseDate) { GameFacts.releaseLabel(releaseDate) } + val publishedBy = publisher.takeUnless { it.isBlank() || it.trim().equals(developer.trim(), ignoreCase = true) } + val rest = listOfNotNull(publishedBy, released) + val credits = if (developer.isBlank() && rest.isEmpty()) null else buildAnnotatedString { + if (developer.isNotBlank()) withStyle(SpanStyle(color = colors.onBackground, fontWeight = FontWeight.SemiBold)) { append(developer) } + rest.forEachIndexed { i, part -> append(if (i == 0 && developer.isBlank()) part else " · $part") } + } + val hltbHere = scores.hltb.let { it is Lookup.Pending || (it as? Lookup.Found)?.value?.let { t -> hltbRuns(t).size > if (scoresInHero) 1 else 0 } == true } + val scoreHere = !scoresInHero && scores.metacritic != Lookup.None + if (credits == null && !hltbHere && !scoreHere) return + val links: @Composable () -> Unit = { + FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalArrangement = Arrangement.spacedBy(4.dp)) { + if (!scoresInHero) Looked(scores.metacritic, exit = fadeOut()) { lookup -> + val found = (lookup as? Lookup.Found)?.value + if (found != null) LineLink(stringResource(R.string.stores_fact_metacritic), found.url) { MetacriticBadge(found.score, small = true) } + else Placeholder(BadgeHeight) + } + if (hltbHere) Looked(scores.hltb, exit = fadeOut()) { lookup -> + val found = (lookup as? Lookup.Found)?.value + if (found != null) LineLink(stringResource(R.string.stores_fact_hltb), found.url) { + for ((secs, what) in hltbRuns(found).drop(if (scoresInHero) 1 else 0)) Text( + buildAnnotatedString { + withStyle(SpanStyle(color = colors.onBackground, fontWeight = FontWeight.SemiBold, fontSize = 15.sp)) { append(hltbTime(secs)) } + append(" ") + append(what) + }, + fontSize = 13.sp, color = pal.onSurfaceVariant, maxLines = 1, + ) + } + else Placeholder(160.dp) + } + } + } + Column(modifier.fillMaxWidth().padding(top = 12.dp)) { + val creditsText: @Composable (Modifier) -> Unit = { m -> + if (credits != null) Text(credits, fontSize = 14.sp, color = pal.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = m) + } + if (scoresInHero) Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(16.dp), modifier = Modifier.fillMaxWidth().heightIn(min = 40.dp)) { + creditsText(Modifier.weight(1f)) + links() + } else Column(verticalArrangement = Arrangement.spacedBy(6.dp)) { + creditsText(Modifier) + links() + } + Box(Modifier.padding(top = 8.dp).fillMaxWidth().height(1.dp).background(pal.line)) + } +} + +@Composable +private fun LineLink(label: String, link: String, content: @Composable () -> Unit) { + val pal = LocalPalette.current + val src = remember { MutableInteractionSource() } + val hot = rememberHot(src) + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp), + modifier = Modifier.then(linkSurface(label, link, src, hot, LinkShape)).padding(horizontal = 10.dp, vertical = 6.dp), + ) { + content() + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) { + Text(label, fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = pal.signal, maxLines = 1) + Icon(Icons.AutoMirrored.Filled.OpenInNew, contentDescription = null, tint = pal.signal, modifier = Modifier.size(12.dp)) + } + } +} + +@Composable +private fun <T> Looked(lookup: Lookup<T>, exit: ExitTransition, content: @Composable (Lookup<T>) -> Unit) { + var shown by remember { mutableStateOf(lookup) } + if (lookup != Lookup.None) shown = lookup + AnimatedVisibility(visible = lookup != Lookup.None, enter = fadeIn(), exit = fadeOut() + exit) { content(shown) } +} + +private val StatShape = RoundedCornerShape(12.dp) +private val LinkShape = RoundedCornerShape(10.dp) +private val BadgeHeight = 32.dp + +@Composable +private fun linkSurface(label: String, link: String?, src: MutableInteractionSource, hot: Boolean, shape: RoundedCornerShape, hotFill: Color? = null): Modifier { + if (link == null) return Modifier + val pal = LocalPalette.current + val ctx = LocalContext.current + val open = { openUrl(ctx, link) } + return Modifier.paneItem("fact:$label").clip(shape) + .background(if (hot) hotFill ?: pal.signal.copy(alpha = 0.16f) else Color.Transparent) + .glideBorder(hot, shape, pal.signal, restColor = Color.Transparent) + .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = Role.Button, onClick = open) + .controllerConfirm(onClick = open) +} + +@Composable +private fun hltbRuns(t: GameFacts.Hltb): List<Pair<Int, String>> = listOf( + t.main to stringResource(R.string.stores_hltb_main), + t.extras to stringResource(R.string.stores_hltb_extras), + t.completionist to stringResource(R.string.stores_hltb_completionist), +).filter { it.first > 0 } + +@Composable +private fun hltbTime(secs: Int): String = + GameFacts.hours(secs)?.let { stringResource(R.string.stores_hltb_hours, it) } ?: stringResource(R.string.stores_hltb_minutes, maxOf(1, secs / 60)) + +internal fun metacriticColour(score: Int): Color = when { + score >= 75 -> Color(0xFF66CC33) + score >= 50 -> Color(0xFFFFCC33) + else -> Color(0xFFFF6874) +} + +@Composable +private fun MetacriticBadge(score: Int, small: Boolean = false) { + val height = if (small) 24.dp else BadgeHeight + Box(contentAlignment = Alignment.Center, modifier = Modifier.height(height).widthIn(min = height + 6.dp).clip(RoundedCornerShape(if (small) 6.dp else 8.dp)).background(metacriticColour(score)).padding(horizontal = 6.dp)) { + Text("$score", fontSize = if (small) 13.sp else 17.sp, fontWeight = FontWeight.Black, color = Color(0xFF0A0B0D), maxLines = 1) + } +} + +@Composable +private fun Placeholder(width: Dp) { + val pulse by rememberInfiniteTransition(label = "fact").animateFloat( + 0.35f, 0.8f, infiniteRepeatable(tween(900, easing = FastOutSlowInEasing), RepeatMode.Reverse), label = "pulse", + ) + Box(Modifier.width(width).height(16.dp).alpha(pulse).clip(RoundedCornerShape(5.dp)).background(LocalPalette.current.line2)) +} + + +private val previewScores = GameScores( + Lookup.Found(GameFacts.Metacritic(93, "https://www.metacritic.com/game/the-witcher-3-wild-hunt/")), + Lookup.Found(GameFacts.Hltb(main = 186_070, extras = 373_519, completionist = 630_794, url = "https://howlongtobeat.com/game/10270")), +) + +private fun previewScore(score: Int) = Lookup.Found(GameFacts.Metacritic(score, "https://www.metacritic.com/")) + +@Composable +private fun FactsPreview(theme: String = Themes.GRAPHITE, narrow: Boolean = false, content: @Composable () -> Unit) { + DroidDeckTheme(theme = theme) { + CompositionLocalProvider(LocalNarrowPane provides narrow) { + Box(Modifier.fillMaxSize().background(LocalPalette.current.background).padding(16.dp)) { + Column(Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(4.dp)) { content() } + } + } + } +} + +@Composable +private fun PreviewCaption(text: String) = Text(text, fontSize = 11.sp, color = LocalPalette.current.onSurfaceVariant, modifier = Modifier.padding(top = 8.dp)) + +@Composable +private fun PreviewHero(title: String, scores: GameScores) { + Box(Modifier.fillMaxWidth().height(180.dp).clip(Shape16).background(artBrush(hueOf(title)))) { + Box(Modifier.matchParentSize().background(Brush.horizontalGradient(0.45f to Color.Transparent, 1f to Color.Black.copy(alpha = 0.6f)))) + Column(verticalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.align(Alignment.BottomStart).padding(horizontal = 22.dp, vertical = 18.dp)) { + Text(stringResource(R.string.stores_eyebrow_library).uppercase(), fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.2.sp, color = LocalPalette.current.signal) + Text(title, fontSize = 30.sp, fontWeight = FontWeight.Black, color = MaterialTheme.colorScheme.onBackground) + } + HeroScores(scores, Modifier.align(Alignment.BottomEnd).padding(end = 16.dp, bottom = 18.dp)) + } +} + +@Preview(name = "Game page, all found", widthDp = 800, heightDp = 320) +@Composable +private fun FactsFoundPreview() = FactsPreview { + PreviewHero("The Witcher 3: Wild Hunt", previewScores) + StoreGameFacts("CD PROJEKT RED", "CD PROJEKT RED", "2015-05-19T00:00:00+02:00", previewScores, scoresInHero = true) +} + +@Preview(name = "Game page, looking up", widthDp = 800, heightDp = 320) +@Composable +private fun FactsPendingPreview() = FactsPreview { + val pending = GameScores(Lookup.Pending, Lookup.Pending) + PreviewHero("Hades", pending) + StoreGameFacts("Supergiant Games", "Supergiant Games", "2020.09.17", pending, scoresInHero = true) +} + +@Preview(name = "Facts line, mixed", widthDp = 800, heightDp = 420) +@Composable +private fun FactsMixedPreview() = FactsPreview { + PreviewCaption("Another studio's publisher; times still coming") + StoreGameFacts("New World Computing", "Ubisoft", "1999-02-28", GameScores(previewScore(87), Lookup.Pending), scoresInHero = true) + PreviewCaption("No times: credits only") + StoreGameFacts("Mane6", "Maximum Entertainment", "2022-12-19T16:00:00.000Z", GameScores(previewScore(68), Lookup.None), scoresInHero = true) + PreviewCaption("Only a main-story time, which the hero shows: credits only") + StoreGameFacts("Tiny Indie Studio", "", "2019-11-05", GameScores(previewScore(42), Lookup.Found(GameFacts.Hltb(main = 2_400, extras = 0, completionist = 0, url = "https://howlongtobeat.com/"))), scoresInHero = true) + PreviewCaption("Epic's no-date placeholder (2099) is not shown") + StoreGameFacts("Studio", "", "2099-01-01T00:00:00.000Z", GameScores(previewScore(81), Lookup.None), scoresInHero = true) +} + +@Preview(name = "Facts, narrow pane", widthDp = 420, heightDp = 200) +@Composable +private fun FactsNarrowPreview() = FactsPreview(narrow = true) { + StoreGameFacts("CD PROJEKT RED", "CD PROJEKT RED", "2015-05-19T00:00:00+02:00", previewScores, scoresInHero = false) +} + +@Preview(name = "Game page, Paper theme", widthDp = 800, heightDp = 320) +@Composable +private fun FactsPaperPreview() = FactsPreview(theme = Themes.PAPER) { + PreviewHero("The Witcher 3: Wild Hunt", previewScores) + StoreGameFacts("CD PROJEKT RED", "CD PROJEKT RED", "2015-05-19T00:00:00+02:00", previewScores, scoresInHero = true) +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoreGridNavigation.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoreGridNavigation.kt new file mode 100644 index 0000000000..d019bc0098 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoreGridNavigation.kt @@ -0,0 +1,6 @@ +package com.droiddeck.launcher.ui + +internal fun storeGridNeighbor(index: Int, count: Int, columns: Int, direction: Int): Int? { + if (index !in 0 until count || columns < 1 || direction !in listOf(-1, 1)) return null + return (index + columns * direction).takeIf { it in 0 until count } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StorePage.kt b/app/src/main/java/com/droiddeck/launcher/ui/StorePage.kt index 87eaaa92ce..0facc0c070 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StorePage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StorePage.kt @@ -70,6 +70,7 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.clipToBounds import androidx.compose.ui.draw.drawBehind import androidx.compose.ui.focus.focusRequester +import androidx.compose.ui.focus.focusProperties import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Rect import androidx.compose.ui.graphics.Brush @@ -85,7 +86,10 @@ import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.layout.positionInRoot import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalInputModeManager +import androidx.compose.ui.platform.LocalSoftwareKeyboardController +import androidx.compose.ui.platform.LocalView import androidx.compose.ui.res.stringResource import androidx.compose.ui.semantics.Role import androidx.compose.ui.semantics.contentDescription @@ -102,20 +106,13 @@ import com.droiddeck.launcher.store.FlathubApi import com.droiddeck.launcher.store.StoreState import kotlinx.coroutines.delay -// The Store rail section: Flathub's apps for this device's architecture, installed into the -// Linux runtime with Flatpak, and the ones already installed - in the stores' style, in Flathub's -// teal. Until Flatpak is set up it is the stores' sign-in hero: a wall of real app icons, one word, -// one button that becomes its own progress. Then a chip row, shelves of square cards that flood -// open into an app's page, and installs that fly home to the Installed chip. private const val MODE_DISCOVER = "discover" private const val MODE_INSTALLED = "installed" private const val MODE_UPDATES = "updates" -/** One app as a card shows it: Flathub's summary or what Flatpak says is installed. */ private class CardApp(val id: String, val name: String, val icon: Any?, val summary: String? = null, val verified: Boolean = false) -/** Where the Installed chip is, for an install's dot to land in, and how many have landed. */ private object FlathubMotion { var installedChip: Rect? = null var landed by mutableIntStateOf(0) @@ -127,8 +124,6 @@ internal fun StorePage(s: FrontEndState, a: FrontEndActions, modifier: Modifier) LaunchedEffect(s.ready) { StoreState.refresh(ctx) } LaunchedEffect(Unit) { StoreState.loadSections() } FlathubTheme { - // The storefront takes over from the hero once Flatpak is ready: the setup rail rings - // once, then the hero sinks away and the storefront rises. var front by remember { mutableStateOf(StoreState.ready && s.ready) } var ring by remember { mutableIntStateOf(0) } LaunchedEffect(StoreState.ready, s.ready) { @@ -152,11 +147,6 @@ internal fun StorePage(s: FrontEndState, a: FrontEndActions, modifier: Modifier) } } -/** - * Flatpak is not set up yet: the stores' sign-in shape in teal. A tilted wall of the popular apps' - * icons (Flathub's public pages need no Flatpak) drifts behind, fading toward the words; one big - * button sets it up, and stretches into its own progress while it does. - */ @Composable private fun FlathubHero(s: FrontEndState, ring: Int) { val ctx = LocalContext.current @@ -170,7 +160,6 @@ private fun FlathubHero(s: FrontEndState, ring: Int) { BoxWithConstraints(Modifier.fillMaxSize().padding(horizontal = if (narrow) 14.dp else 22.dp, vertical = if (narrow) 10.dp else 14.dp)) { val shape = RoundedCornerShape(20.dp) Box(Modifier.fillMaxWidth().height(maxHeight.coerceAtLeast(320.dp)).clip(shape).background(colors.background).border(1.dp, pal.line, shape)) { - // Slower while it sets up, as the empty wall drifts. androidx.compose.animation.Crossfade(icons, animationSpec = Motion.tw(600), label = "flathubWall") { tiles -> val ground = Brush.linearGradient(listOf(Color(0xFF0B2E2B), Color(0xFF0B2E2B))) val edge = FlathubTeal.copy(alpha = 0.18f) @@ -213,11 +202,6 @@ private fun FlathubHero(s: FrontEndState, ring: Int) { } } -/** - * Set up Flathub, and its own progress: while it sets up the button springs out to the full width - * and fills in teal from the left with how far it is, the stage and the figure inside it. Without - * a runtime it says what is missing instead. - */ @Composable private fun SetupButton(s: FrontEndState, busy: Boolean, full: Dp, ring: Int, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -236,7 +220,6 @@ private fun SetupButton(s: FrontEndState, busy: Boolean, full: Dp, ring: Int, on } return } - // A pad keeps its place on the rail that took the button's. if (ff != null) LaunchedEffect(Unit) { if (inputMode.inputMode == InputMode.Keyboard) focusSoon { ff.primary } } val width = androidx.compose.ui.unit.lerp(restW.coerceAtLeast(120.dp), full, grow) val shape = RoundedCornerShape(12.dp) @@ -265,10 +248,10 @@ private fun SetupButton(s: FrontEndState, busy: Boolean, full: Dp, ring: Int, on } } -// ---- storefront ------------------------------------------------------------------------------------ +@OptIn(androidx.compose.ui.ExperimentalComposeUiApi::class) @Composable -private fun Storefront(s: FrontEndState, a: FrontEndActions) { +internal fun Storefront(s: FrontEndState, a: FrontEndActions) { val ctx = LocalContext.current val narrow = LocalNarrowPane.current val colors = MaterialTheme.colorScheme @@ -280,9 +263,7 @@ private fun Storefront(s: FrontEndState, a: FrontEndActions) { var openApp by rememberSaveable { mutableStateOf<String?>(null) } val updates = StoreState.updates if (mode == MODE_UPDATES && updates.isEmpty()) mode = MODE_INSTALLED - // Once a session is plenty: the Updates chip shows itself when there is something to update. LaunchedEffect(StoreState.ready) { if (StoreState.ready && !StoreState.updatesChecked && !StoreState.checkingUpdates) StoreState.checkUpdates(ctx) } - // A search runs a beat after typing stops, or as a category is picked. LaunchedEffect(query, category) { if (query.isBlank() && category == null) { StoreState.clearSearch(); return@LaunchedEffect } delay(350) @@ -290,7 +271,9 @@ private fun Storefront(s: FrontEndState, a: FrontEndActions) { } val ff = LocalFrontFocus.current val inputMode = LocalInputModeManager.current - // Cards, where they are, for the page that opens from one. + val focusManager = LocalFocusManager.current + val keyboard = LocalSoftwareKeyboardController.current + val view = LocalView.current val cards = remember { HashMap<String, Rect>() } var viewportAt by remember { mutableStateOf(Offset.Zero) } var detail by remember { mutableStateOf<String?>(null) } @@ -300,6 +283,9 @@ private fun Storefront(s: FrontEndState, a: FrontEndActions) { LaunchedEffect(openApp) { val id = openApp if (id != null) { + focusManager.clearFocus(force = true) + view.findFocus()?.clearFocus() + keyboard?.hide() detailFrom = cards[id]?.let { Origin(it.translate(-viewportAt), 16f * density.density) } leaving = false detail = id @@ -310,20 +296,17 @@ private fun Storefront(s: FrontEndState, a: FrontEndActions) { detail = null; leaving = false; detailFrom = null } } - // Back on the grid: focus goes to the card the page came from. LaunchedEffect(detail) { if (detail != null || inputMode.inputMode != InputMode.Keyboard || ff == null) return@LaunchedEffect val id = lastApp ?: return@LaunchedEffect ff.items["tile:store:$id"]?.let { req -> focusSoon { req } } } BackHandler(enabled = openApp != null) { openApp = null } - // An app's card on Desktop asked for its page. LaunchedEffect(StoreState.openRequest) { StoreState.openRequest?.let { openApp = it; StoreState.openRequest = null } } val covering = detail != null && !leaving val sink by animateFloatAsState(if (covering) 0.95f else 1f, if (covering) Motion.tw(480) else Motion.tw(460, 40), label = "flathubSink") val fade by animateFloatAsState(if (covering) 0f else 1f, if (covering) Motion.tw(320, 80) else Motion.tw(300, 100), label = "flathubFade") val modes = buildList { add(MODE_DISCOVER); add(MODE_INSTALLED); if (updates.isNotEmpty()) add(MODE_UPDATES) } - // LB / RB with a pad: focus goes to the new mode's chip; the cards it was on leave with the old mode. val seenMode = remember { arrayOf(mode) } LaunchedEffect(mode) { if (seenMode[0] == mode) return@LaunchedEffect @@ -341,7 +324,6 @@ private fun Storefront(s: FrontEndState, a: FrontEndActions) { ) { Rise(0) { Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) { - // A page of Desktop's: the way back to it, for a finger (B does the same). val show = LocalShowSection.current BackLink(stringResource(R.string.rail_desktop), compact = true) { show("desktop") } Box(Modifier.weight(1f)) { FlathubChips(mode, modes, StoreState.installed.size, updates.size) { mode = it } } @@ -350,7 +332,10 @@ private fun Storefront(s: FrontEndState, a: FrontEndActions) { Spacer(Modifier.height(8.dp)) Box(Modifier.weight(1f).fillMaxWidth().clipToBounds().onGloballyPositioned { viewportAt = it.positionInRoot() }) { Column( - Modifier.fillMaxSize().graphicsLayer { scaleX = sink; scaleY = sink; alpha = fade }.verticalScroll(rememberScrollState()).padding(bottom = 16.dp), + Modifier.fillMaxSize().focusProperties { + enter = { if (detail == null) androidx.compose.ui.focus.FocusRequester.Default else androidx.compose.ui.focus.FocusRequester.Cancel } + }.focusGroup() + .graphicsLayer { scaleX = sink; scaleY = sink; alpha = fade }.verticalScroll(rememberScrollState()).padding(bottom = 16.dp), ) { val open: (String) -> Unit = { openApp = it } when (mode) { @@ -370,7 +355,6 @@ private fun Storefront(s: FrontEndState, a: FrontEndActions) { } if (from == null) body() else { - // The card's own icon, cropped over the tile as it grows: the page arrives in the app's colour. val art = coil.compose.rememberAsyncImagePainter( remember(icon) { coil.request.ImageRequest.Builder(ctx).data(icon).size(256, 256).build() }, ) @@ -381,10 +365,6 @@ private fun Storefront(s: FrontEndState, a: FrontEndActions) { } } -/** - * Discover, Installed (with its count) and Updates (when there are any): one selection glides under - * them in teal; the Installed count pops as an install's dot lands in it. - */ @Composable private fun FlathubChips(mode: String, modes: List<String>, installed: Int, updates: Int, onPick: (String) -> Unit) { val pal = LocalPalette.current @@ -392,7 +372,6 @@ private fun FlathubChips(mode: String, modes: List<String>, installed: Int, upda val bounds = remember { mutableStateMapOf<String, Rect>() } val tint = rememberUpdatedState(pal.signal) Box(Modifier.fillMaxWidth()) { - ChipGlide(modes.indexOf(mode), bounds[mode], tint) Row(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth()) { for (m in modes) { key(m) { @@ -400,6 +379,7 @@ private fun FlathubChips(mode: String, modes: List<String>, installed: Int, upda val hot = rememberHot(src) val shape = RoundedCornerShape(99.dp) val on = m == mode + val under = on && androidx.compose.ui.platform.LocalInputModeManager.current.inputMode != androidx.compose.ui.input.InputMode.Keyboard Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.CenterHorizontally), modifier = Modifier.weight(1f).paneItem("flathub:$m") @@ -408,8 +388,9 @@ private fun FlathubChips(mode: String, modes: List<String>, installed: Int, upda if (m == MODE_INSTALLED) FlathubMotion.installedChip = it.boundsInRoot() } .heightIn(min = 44.dp).clip(shape) - .background(if (on) Color.Transparent else colors.surface) - .glideBorder(hot, shape, pal.signal, if (on) Color.Transparent else pal.line) + .background(if (under) Color.Transparent else colors.surface) + .shownBar(on, pal.signal) + .glideBorder(hot, shape, pal.signal, if (under) Color.Transparent else pal.line) .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = Role.Tab) { onPick(m) } .controllerConfirm { onPick(m) } .padding(horizontal = 12.dp, vertical = 8.dp), @@ -428,13 +409,10 @@ private fun FlathubChips(mode: String, modes: List<String>, installed: Int, upda } } } + ChipGlide(modes.indexOf(mode), bounds[mode], tint) } } -/** - * The card width for a width: room for a name on two lines and a two-line summary under the art, - * so a long name wraps instead of being cut to a few letters. - */ private fun cardSize(width: Dp): Dp = when { width >= 700.dp -> 164.dp width >= 480.dp -> 148.dp @@ -450,7 +428,6 @@ private fun Discover( ModeHeader( stringResource(R.string.store_tab_discover), query, onQuery, stringResource(R.string.store_search_placeholder), ) { - // The categories as small pills, at the right of the header. val pills = rememberScrollState() Row( horizontalArrangement = Arrangement.spacedBy(6.dp), @@ -509,7 +486,6 @@ private fun UpdatesMode(cards: HashMap<String, Rect>, onOpen: (String) -> Unit) Rise(2) { CardGrid(apps.map { CardApp(it.id, it.name, it.icon ?: StoreState.details[it.id]?.icon ?: FlathubApi.iconUrl(it.id), it.summary) }, cards, onOpen) } } -/** A horizontal row of cards under a title, the stores' shelf; nothing while it is empty. */ @Composable private fun Shelf(title: String, apps: List<CardApp>?, first: Boolean, cards: HashMap<String, Rect>, onOpen: (String) -> Unit) { val colors = MaterialTheme.colorScheme @@ -526,7 +502,6 @@ private fun Shelf(title: String, apps: List<CardApp>?, first: Boolean, cards: Ha } } -/** The Installed and Updates modes, and search: a grid of the same cards. */ @Composable private fun CardGrid(apps: List<CardApp>, cards: HashMap<String, Rect>, onOpen: (String) -> Unit) { BoxWithConstraints(Modifier.fillMaxWidth().padding(top = 10.dp)) { @@ -542,11 +517,6 @@ private fun CardGrid(apps: List<CardApp>, cards: HashMap<String, Rect>, onOpen: } } -/** - * One app: its icon over a blurred, darkened copy of itself (darkened only, before Android 12), - * with one status on the art - Get, ✓, or how far an install is - and under it the name, on two - * lines if it needs them, and what the app is. - */ @Composable private fun AppCard(app: CardApp, size: Dp, first: Boolean, cards: HashMap<String, Rect>, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -575,7 +545,6 @@ private fun AppCard(app: CardApp, size: Dp, first: Boolean, cards: HashMap<Strin .clip(RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp)).background(Color(0xFF0B2E2B)), ) { if (app.icon != null) { - // The icon's own colour, blurred and darkened, as the card's ground. AsyncImage( model = app.icon, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.fillMaxSize().graphicsLayer { scaleX = 1.8f; scaleY = 1.8f; alpha = 0.55f } @@ -584,7 +553,6 @@ private fun AppCard(app: CardApp, size: Dp, first: Boolean, cards: HashMap<Strin Box(Modifier.fillMaxSize().background(Color.Black.copy(alpha = 0.35f))) AsyncImage(model = app.icon, contentDescription = null, contentScale = ContentScale.Fit, modifier = Modifier.size(artH * 0.62f)) } else Icon(Icons.Outlined.Apps, null, tint = colors.onSurfaceVariant, modifier = Modifier.size(artH * 0.5f)) - // One status, on the art: what A on the card leads to. Box(Modifier.align(Alignment.TopEnd).padding(6.dp)) { when { busy -> Box(Modifier.clip(RoundedCornerShape(99.dp)).background(Color.Black.copy(alpha = 0.55f)).padding(4.dp)) { @@ -613,7 +581,6 @@ private fun AppCard(app: CardApp, size: Dp, first: Boolean, cards: HashMap<Strin ) if (app.verified) Icon(Icons.Outlined.Verified, stringResource(R.string.store_verified), tint = pal.signal, modifier = Modifier.padding(top = 2.dp).size(13.dp)) } - // Two lines kept for the summary even when it is short, so cards in a row line up. Text( app.summary.orEmpty(), fontSize = 12.sp, lineHeight = 15.sp, color = colors.onSurfaceVariant, minLines = 2, maxLines = 2, overflow = TextOverflow.Ellipsis, modifier = Modifier.padding(top = 3.dp), @@ -622,11 +589,6 @@ private fun AppCard(app: CardApp, size: Dp, first: Boolean, cards: HashMap<Strin } } -/** - * An app's page, flooded out of its card: its icon, name and what it is, one action (Install or - * Open, with Update beside it when there is one) and Website; then its screenshots and details. - * Install flies a dot to the Installed chip; Remove asks by stepping out of its button, in red. - */ @Composable private fun AppDetail(s: FrontEndState, a: FrontEndActions, id: String, onBack: () -> Unit) { val ctx = LocalContext.current @@ -668,7 +630,6 @@ private fun AppDetail(s: FrontEndState, a: FrontEndActions, id: String, onBack: enabled = StoreState.busy == null && s.ready && (d == null || d.arches.isEmpty() || "aarch64" in d.arches), ) { StoreState.install(ctx, id, name) - // The button squashes into a dot that flies to the Installed chip, whose count pops. val from = at if (from != null) Flights.fly(Flight(from, to = { FlathubMotion.installedChip?.center }, onLand = { FlathubMotion.landed++ })) else FlathubMotion.landed++ @@ -729,7 +690,6 @@ private fun AppDetail(s: FrontEndState, a: FrontEndActions, id: String, onBack: } } -/** Remove, which asks first: are you sure steps out of it in red, Keep first, so a stray A costs nothing. */ @Composable private fun RemoveButton(id: String, name: String, enabled: Boolean) { val ctx = LocalContext.current @@ -754,7 +714,6 @@ private fun RemoveButton(id: String, name: String, enabled: Boolean) { } } -/** A small text action at the right of a header. */ @Composable private fun SmallLink(text: String, enabled: Boolean = true, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -770,7 +729,6 @@ private fun SmallLink(text: String, enabled: Boolean = true, onClick: () -> Unit ) } -/** An app's icon from Flathub (a URL) or from its installed files; a placeholder until it loads. */ @Composable internal fun AppIcon(model: Any?, name: String, size: Int) { val colors = MaterialTheme.colorScheme @@ -780,7 +738,6 @@ internal fun AppIcon(model: Any?, name: String, size: Int) { } } -/** A category pill: small, focusable, and filled when it is the one in use. */ @Composable private fun PillButton(label: String, selected: Boolean, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoresDetail.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoresDetail.kt index a8f823c0ac..f6bc614b9d 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StoresDetail.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoresDetail.kt @@ -1,8 +1,20 @@ package com.droiddeck.launcher.ui +import androidx.compose.ui.focus.focusRequester import androidx.compose.ui.layout.boundsInRoot import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.foundation.background +import androidx.compose.foundation.focusable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.gestures.animateScrollBy +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.input.key.onPreviewKeyEvent +import kotlinx.coroutines.launch import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -25,109 +37,224 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.layout.onSizeChanged +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import coil.compose.AsyncImage import com.droiddeck.launcher.R import com.droiddeck.launcher.stores.CatalogItem import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreAchievements import com.droiddeck.launcher.stores.StoresState import com.droiddeck.launcher.stores.download.DownloadState import com.droiddeck.launcher.stores.formatBytes -// A store game's own page: hero, the one main action, how it is launched and where it lives. @Composable -internal fun StoreGameDetail(store: Store, key: String, s: FrontEndState, a: FrontEndActions, onBack: () -> Unit) { +internal fun StoreGameDetail(store: Store, key: String, s: FrontEndState, a: FrontEndActions, lead: androidx.compose.ui.focus.FocusRequester, onBack: () -> Unit) { + val leadOn = Modifier.focusRequester(lead) val ctx = LocalContext.current val colors = MaterialTheme.colorScheme val pal = LocalPalette.current val narrow = LocalNarrowPane.current + val stacked = narrow || LocalConfiguration.current.screenWidthDp < 700 val id = key.substringAfter(':') val item = (StoresState.library[store].orEmpty() + StoresState.shelves[store]?.all.orEmpty()).firstOrNull { it.id == id } val installed = StoresState.installedGame(store, id) - val download = StoresState.download("${store.id}:$id")?.takeIf { it.isActive } - // Removal asks twice: one stray press of A should not cost a download. - var confirmRemove by remember(key) { mutableStateOf(false) } - LaunchedEffect(confirmRemove) { if (confirmRemove) { kotlinx.coroutines.delay(4000); confirmRemove = false } } + val rawDownload = StoresState.download("${store.id}:$id") + val download = rawDownload?.takeIf { it.isActive } + val failedDownload = rawDownload?.takeIf { it.state == DownloadState.FAILED } val title = item?.title ?: installed?.sidecar?.title ?: id Rise(0) { - Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), modifier = Modifier.padding(bottom = 12.dp)) { - BackLink(store.label, compact = true, onClick = onBack) - SourceChip(store.id) - } + Box(Modifier.padding(bottom = 12.dp)) { BackLink(stringResource(R.string.common_back), compact = true, onClick = onBack) } } - Rise(1) { - Box(Modifier.fillMaxWidth().heightIn(min = if (narrow) 150.dp else 180.dp).clip(Shape16).background(artBrush(hueOf(title)))) { + val scores = if (store == Store.GOG || store == Store.EPIC) rememberGameScores(title.takeIf { it != id }) else null + val hero: @Composable () -> Unit = { + androidx.compose.runtime.DisposableEffect(Unit) { onDispose { StoresMotion.heroAt = null } } + Box( + Modifier.fillMaxWidth().heightIn(min = if (narrow) 150.dp else 180.dp) + .onGloballyPositioned { StoresMotion.heroAt = it.boundsInRoot() } + .clip(Shape16).background(artBrush(hueOf(title))), + ) { val art = item?.imageUrl ?: installed?.sidecar?.hero ?: installed?.sidecar?.cover if (art != null) AsyncImage(model = art, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.matchParentSize()) Spacer(Modifier.matchParentSize().background(Brush.horizontalGradient(0f to colors.background.copy(alpha = 0.94f), 0.5f to colors.background.copy(alpha = 0.55f), 1f to Color.Transparent))) + if (scores != null && !stacked) { + Spacer(Modifier.matchParentSize().background(Brush.horizontalGradient(0.45f to Color.Transparent, 1f to colors.background.copy(alpha = 0.75f)))) + HeroScores(scores, Modifier.align(Alignment.BottomEnd).padding(end = 16.dp, bottom = 18.dp)) + } Column(verticalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.align(Alignment.BottomStart).padding(horizontal = 22.dp, vertical = 18.dp)) { - // An install names where it went (internal storage, the card), a download where it is going. val state = when { installed != null -> stringResource(R.string.stores_eyebrow_installed) + " · " + com.droiddeck.launcher.stores.StoreInstallRoot.labelFor(ctx, installed.folder) download != null && download.location.isNotBlank() -> stringResource(R.string.stores_eyebrow_library) + " · " + download.location + failedDownload != null && failedDownload.location.isNotBlank() -> stringResource(R.string.stores_eyebrow_library) + " · " + failedDownload.location item?.owned == true -> stringResource(R.string.stores_eyebrow_library) else -> stringResource(R.string.stores_eyebrow_store) } val size = (item?.sizeBytes ?: 0L).takeIf { it > 0 }?.let { " · " + formatBytes(it) } ?: "" Text((state + size).uppercase(), fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.2.sp, color = pal.signal) Text(title, fontSize = if (narrow) 24.sp else 30.sp, lineHeight = if (narrow) 27.sp else 33.sp, fontWeight = FontWeight.Black, color = colors.onBackground, maxLines = 2, overflow = TextOverflow.Ellipsis) + if (!failedDownload?.error.isNullOrBlank()) { + Text( + failedDownload!!.error!!, + fontSize = 13.sp, + lineHeight = 17.sp, + fontWeight = FontWeight.Medium, + color = colors.error, + maxLines = 3, + overflow = TextOverflow.Ellipsis + ) + } Actions { when { installed != null -> { - // Launching, the prefix and the files belong to the Games tab, where every - // installed game has them; here an install only says it is in Steam and - // offers the one thing Games does not: removing it. ActionChip(stringResource(R.string.stores_in_steam), ok = true) - SecondaryButton(if (confirmRemove) stringResource(R.string.stores_uninstall_confirm) else stringResource(R.string.stores_uninstall), enabled = download == null) { - if (!confirmRemove) confirmRemove = true - else { confirmRemove = false; StoresState.uninstall(ctx, installed) { StoresState.refresh(ctx); a.onLibraryChanged() }; onBack() } + val gone = StoresState.uninstalling["${store.id}:$id"] + if (gone != null) SecondaryButton(stringResource(R.string.stores_uninstalling), enabled = false, progress = gone) {} + else UninstallButton(title, installed, enabled = download == null, modifier = leadOn) { + StoresState.uninstall(ctx, installed) { StoresState.refresh(ctx); a.onLibraryChanged() } } } download != null -> { ActionChip(downloadLabel(download), ok = false) - if (download.state != DownloadState.PAUSED) SecondaryButton(stringResource(R.string.stores_dl_pause)) { com.droiddeck.launcher.stores.download.DownloadQueue.pause(download.key) } - else PrimaryButton(stringResource(R.string.stores_dl_resume), main = true) { com.droiddeck.launcher.stores.download.DownloadQueue.resume(ctx, download.key) } + if (download.state != DownloadState.PAUSED) SecondaryButton(stringResource(R.string.stores_dl_pause), modifier = leadOn) { com.droiddeck.launcher.stores.download.DownloadQueue.pause(download.key) } + else PrimaryButton(stringResource(R.string.stores_dl_resume), main = true, modifier = leadOn) { com.droiddeck.launcher.stores.download.DownloadQueue.resume(ctx, download.key) } ConfirmButton(stringResource(R.string.stores_dl_cancel), stringResource(R.string.stores_dl_cancel_confirm)) { com.droiddeck.launcher.stores.download.DownloadQueue.cancel(ctx, download.key) } } + failedDownload != null -> { + ActionChip(stringResource(R.string.stores_dl_failed), ok = false) + PrimaryButton(stringResource(R.string.stores_dl_resume), main = true, modifier = leadOn) { + if (item != null) StoresState.requestInstall(ctx, item) + else com.droiddeck.launcher.stores.download.DownloadQueue.retry(ctx, failedDownload.key) + } + ConfirmButton(stringResource(R.string.stores_dl_clear), stringResource(R.string.stores_dl_cancel_confirm), compact = true) { + com.droiddeck.launcher.stores.download.DownloadQueue.clear(ctx, failedDownload.key) + } + } item?.owned == true && StoresState.isUnfinished(item) -> { - InstallButton(stringResource(R.string.stores_resume_install)) { StoresState.requestInstall(ctx, item) } + InstallButton(stringResource(R.string.stores_resume_install), leadOn) { StoresState.requestInstall(ctx, item) } ConfirmButton(stringResource(R.string.stores_dl_clear), stringResource(R.string.stores_dl_cancel_confirm), compact = true) { StoresState.clearUnfinished(ctx, item) } } item?.owned == true -> InstallButton( if (item.sizeBytes > 0) stringResource(R.string.stores_install_size, formatBytes(item.sizeBytes)) else stringResource(R.string.stores_install), + leadOn, ) { StoresState.requestInstall(ctx, item) } - item != null && item.isFree -> PrimaryButton(stringResource(R.string.stores_get_free), main = true) { openStoreUrl(ctx, item) } - item != null -> PrimaryButton(if (item.hasPrice && item.finalPrice.isNotBlank()) stringResource(R.string.stores_buy_price, item.finalPrice) else stringResource(R.string.stores_view_on, store.shortLabel), main = true) { openStoreUrl(ctx, item) } + item != null && item.isFree -> PrimaryButton(stringResource(R.string.stores_get_free), main = true, modifier = leadOn) { openStoreUrl(ctx, item) } + item != null -> PrimaryButton(if (item.hasPrice && item.finalPrice.isNotBlank()) stringResource(R.string.stores_buy_price, item.finalPrice) else stringResource(R.string.stores_view_on, store.shortLabel), main = true, modifier = leadOn) { openStoreUrl(ctx, item) } } BusyChip(s) } } } } - // Plain text only, and nothing at all when the store sent a template key instead of words. - // A description that is only the title again (some stores fill it so) is no description. + if (StoresMotion.heroLands) hero() else Rise(1) { hero() } + if (scores != null) Rise(2) { + val listed = StoresState.shelves[store]?.all.orEmpty().firstOrNull { it.id == id } + val developer = item?.developer?.ifBlank { null } ?: listed?.developer.orEmpty() + val publisher = item?.publisher?.ifBlank { null } ?: listed?.publisher.orEmpty() + val releaseDate = item?.releaseDate?.ifBlank { null } ?: listed?.releaseDate.orEmpty() + StoreGameFacts(developer, publisher, releaseDate, scores, scoresInHero = !stacked) + } val description = item?.let { com.droiddeck.launcher.stores.cleanStoreText(it.description) }.orEmpty() .takeUnless { it.trim().equals(title.trim(), ignoreCase = true) }.orEmpty() - if (description.isNotBlank()) Rise(2) { - Text(description, fontSize = 13.sp, lineHeight = 19.sp, color = colors.onSurfaceVariant, maxLines = 6, overflow = TextOverflow.Ellipsis, modifier = Modifier.padding(top = 12.dp)) + val achievements = remember(store, id, item?.owned, installed) { + when { + StoreAchievements.forSource(store.id) == null -> null + item?.owned == true -> StoreAchievements.Game.of(item) + installed != null -> StoreAchievements.Game.of(installed.sidecar) + else -> null + } + } + if (description.isNotBlank() || achievements != null) Rise(3) { + val about: @Composable (Modifier, Dp) -> Unit = { m, h -> if (description.isNotBlank()) StoreAbout(description, h, m) } + val card: @Composable (Modifier) -> Unit = { m -> if (achievements != null) StoreAchievementsCard(achievements, title, m) } + if (stacked) Column(verticalArrangement = Arrangement.spacedBy(14.dp), modifier = Modifier.fillMaxWidth().padding(top = 14.dp)) { + about(Modifier.fillMaxWidth(), AboutHeight) + card(Modifier.fillMaxWidth()) + } else Row(horizontalArrangement = Arrangement.spacedBy(24.dp), modifier = Modifier.fillMaxWidth().padding(top = 14.dp)) { + val density = LocalDensity.current + var cardHeight by remember { mutableStateOf<Dp?>(null) } + about(Modifier.weight(1f), cardHeight ?: AboutHeight) + card(Modifier.width(340.dp).onSizeChanged { cardHeight = with(density) { it.height.toDp() } }) + } } } -/** - * Install (or Resume install) that says where it sits when pressed: where to install grows out of - * it, and the download it starts leaves it as a dot for the Downloads chip. - */ +private val AboutHeight = 150.dp + @Composable -private fun InstallButton(label: String, onInstall: () -> Unit) { +private fun StoreAbout(text: String, height: Dp, modifier: Modifier = Modifier) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val scroll = rememberScrollState() + val scope = rememberCoroutineScope() + val src = remember { MutableInteractionSource() } + val more = scroll.maxValue > 0 + val hot = more && rememberHot(src) + val shape = RoundedCornerShape(12.dp) + Box( + modifier.heightIn(max = height).clip(shape) + .glideBorder(hot, shape, pal.signal, restColor = Color.Transparent) + .then(if (more) Modifier.paneItem("about") else Modifier) + .focusable(enabled = more, interactionSource = src) + .onPreviewKeyEvent { e -> + val step = when (e.nativeKeyEvent.keyCode) { + android.view.KeyEvent.KEYCODE_DPAD_DOWN -> if (scroll.value < scroll.maxValue) 120f else return@onPreviewKeyEvent false + android.view.KeyEvent.KEYCODE_DPAD_UP -> if (scroll.value > 0) -120f else return@onPreviewKeyEvent false + else -> return@onPreviewKeyEvent false + } + if (e.nativeKeyEvent.action == android.view.KeyEvent.ACTION_DOWN) scope.launch { scroll.animateScrollBy(step) } + true + }, + ) { + Text(text, fontSize = 14.sp, lineHeight = 21.sp, color = colors.onSurfaceVariant, modifier = Modifier.verticalScroll(scroll).padding(horizontal = 10.dp, vertical = 6.dp)) + if (scroll.value < scroll.maxValue) Box( + Modifier.align(Alignment.BottomCenter).fillMaxWidth().height(28.dp) + .background(Brush.verticalGradient(listOf(Color.Transparent, colors.background))), + ) + } +} + +@Composable +private fun UninstallButton(title: String, game: com.droiddeck.launcher.stores.InstalledStoreGame, enabled: Boolean, modifier: Modifier = Modifier, onUninstall: () -> Unit) { + val colors = MaterialTheme.colorScheme + val placed = remember { arrayOfNulls<androidx.compose.ui.layout.LayoutCoordinates>(1) } + val heading = stringResource(R.string.stores_uninstall_title, title) + val size = com.droiddeck.launcher.stores.StoreSizes.onDisk["${game.sidecar.store.id}:${game.sidecar.id}"] + val body = if (size != null && size > 0) stringResource(R.string.stores_uninstall_body_size, formatBytes(size)) else stringResource(R.string.stores_uninstall_body) + val keep = stringResource(R.string.stores_notification_keep) + val remove = stringResource(R.string.stores_uninstall) + Box(Modifier.onGloballyPositioned { placed[0] = it }) { + SecondaryButton(remove, enabled = enabled, modifier = modifier) { + val at = placed[0]?.takeIf { it.isAttached }?.boundsInRoot() ?: return@SecondaryButton + var confirmed = false + StoresMotion.ask(StepAsk(anchor = at, side = StepSide.Right, accent = colors.error, items = 3, pillCorner = 12.dp, maxWidth = 340.dp, + onDismiss = { if (confirmed) onUninstall() }, handle = { + Text(remove, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.error, maxLines = 1) + }) { + StepTitle(heading) + Text(body, fontSize = 13.sp, lineHeight = 18.sp, color = colors.onSurfaceVariant, modifier = Modifier.stepItem(1).padding(start = 4.dp, bottom = 12.dp)) + Row(horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.End), modifier = Modifier.fillMaxWidth().stepItem(2)) { + StepChoice(keep, enabled = open, modifier = Modifier.focusRequester(first)) { StoresMotion.fold() } + StepChoice(remove, danger = true, enabled = open) { confirmed = true; StoresMotion.fold() } + } + }) + } + } +} + +@Composable +private fun InstallButton(label: String, modifier: Modifier = Modifier, onInstall: () -> Unit) { val placed = remember { arrayOfNulls<androidx.compose.ui.layout.LayoutCoordinates>(1) } Box(Modifier.onGloballyPositioned { placed[0] = it }) { - PrimaryButton(label, main = true) { + PrimaryButton(label, main = true, modifier = modifier) { StoresMotion.markInstall(placed[0]?.takeIf { it.isAttached }?.boundsInRoot(), label) onInstall() } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoresDownloads.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoresDownloads.kt index 8f902df1c5..e611305015 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StoresDownloads.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoresDownloads.kt @@ -48,6 +48,7 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.focusGroup import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.Column @@ -88,22 +89,14 @@ import com.droiddeck.launcher.stores.download.DownloadQueue import com.droiddeck.launcher.stores.download.DownloadStage import com.droiddeck.launcher.stores.download.DownloadState import com.droiddeck.launcher.stores.download.StoreDownloadTier +import com.droiddeck.launcher.stores.epic.EpicClient import com.droiddeck.launcher.stores.formatBytes import com.droiddeck.launcher.stores.formatSpeed -// The Downloads chip: one queue for the three stores, its settings and the engine log. @Composable internal fun StoresDownloadsPane(s: FrontEndState, a: FrontEndActions) { - BoxWithConstraints(Modifier.fillMaxWidth()) { - val wide = maxWidth >= 700.dp - val list: @Composable () -> Unit = { DownloadList(s, a) } - val side: @Composable () -> Unit = { DownloadSettings(s, a) } - if (wide) Row(horizontalArrangement = Arrangement.spacedBy(24.dp)) { - Box(Modifier.weight(3f)) { list() } - Box(Modifier.weight(2f)) { side() } - } else Column { list(); side() } - } + DownloadList(s, a) } @Composable @@ -112,22 +105,26 @@ private fun DownloadList(s: FrontEndState, a: FrontEndActions) { val pal = LocalPalette.current val scope = rememberCoroutineScope() val entries = StoresState.downloads - // Clearing: the finished rows go into the divider's X one by one, bottom first, and only then - // leave the queue. var clearing by remember { mutableStateOf(false) } - // Under way on top; finished below a line whose X clears them all (rows only - a failed - // download's kept files stay until its game page's Clear). - val (active, finished) = entries.partition { it.isActive } + val (active, finished) = entries.partition { it.isActive }.let { (on, off) -> + on.sortedWith(compareBy<DownloadEntry>({ when (it.state) { DownloadState.RUNNING -> 0; DownloadState.PAUSED -> 1; else -> 2 } }, { it.queuePosition })) to off + } val finishedShown = if (clearing) emptyList() else finished + val queued = entries.mapTo(HashSet()) { it.key } + val ctx = LocalContext.current + val missing = StoresState.unfinished.map { it.store }.filter { StoresState.library[it] == null }.toSet() + LaunchedEffect(missing) { missing.forEach { StoresState.backend(it)?.syncLibrary(ctx, false) } } + val interrupted = StoresState.unfinished.mapNotNull { u -> + StoresState.library[u.store]?.firstOrNull { + u.id == it.id || (u.id == null && u.folder.name == com.droiddeck.launcher.stores.StoreInstallRoot.folderName(it.title, it.id)) + } + }.filter { "${it.store.id}:${it.id}" !in queued }.distinctBy { "${it.store.id}:${it.id}" } Column(verticalArrangement = Arrangement.spacedBy(10.dp)) { - AnimatedVisibility(entries.isEmpty(), enter = fadeIn(Motion.tw(300, 300)), exit = fadeOut(Motion.tw(120))) { + AnimatedVisibility(entries.isEmpty() && interrupted.isEmpty(), enter = fadeIn(Motion.tw(300, 300)), exit = fadeOut(Motion.tw(120))) { Box(Modifier.fillMaxWidth().padding(vertical = 40.dp), contentAlignment = Alignment.Center) { Text(stringResource(R.string.stores_downloads_empty), fontSize = 13.sp, color = colors.onSurfaceVariant) } } - // The list changes only when rows come, go or change state; each row reads its own progress. - // A row pours out of the count's side (the right), and leaves the way it came; one that - // installed stays a beat for its bar to gather into Play first. AnimatedRows( active, key = { it.key }, enter = { i, later -> @@ -141,6 +138,11 @@ private fun DownloadList(s: FrontEndState, a: FrontEndActions) { else shrinkHorizontally(Motion.tw(260), shrinkTowards = Alignment.End) + shrinkVertically(Motion.tw(300, 120)) + fadeOut(Motion.tw(200, 80)) }, ) { row, _ -> DownloadCard(StoresState.download(row.key) ?: row, s, a) } + AnimatedRows( + interrupted, key = { "${it.store.id}:${it.id}" }, + enter = { i, _ -> fadeIn(Motion.tw(300, 60 * i.coerceAtMost(5))) + expandVertically(Motion.tw(260)) }, + exit = { _, _, _ -> fadeOut(Motion.tw(160)) + shrinkVertically(Motion.tw(220, 60)) }, + ) { item, _ -> InterruptedRow(item) } AnimatedVisibility( finishedShown.isNotEmpty(), enter = expandVertically(Motion.tw(260)) + fadeIn(Motion.tw(220)), @@ -163,9 +165,7 @@ private fun DownloadList(s: FrontEndState, a: FrontEndActions) { } AnimatedRows( finishedShown, key = { it.key }, - // One that just finished joins after its row above has gathered; the rest are simply there. enter = { i, later -> if (later) expandVertically(Motion.tw(300, GATHER_HOLD_MS)) + fadeIn(Motion.tw(220, GATHER_HOLD_MS + 50)) else fadeIn(Motion.tw(300, 60 * i.coerceAtMost(5))) }, - // Into the X at the top right, bottom row first. exit = { _, i, n -> val wait = 60 * (n - 1 - i).coerceIn(0, 8) scaleOut(Motion.tw(220, wait), targetScale = 0.2f, transformOrigin = TransformOrigin(1f, 0f)) + @@ -178,28 +178,49 @@ private fun DownloadList(s: FrontEndState, a: FrontEndActions) { } } -/** How long a row that installed holds for its bar to gather into Play before it moves under the line. */ +@Composable +private fun InterruptedRow(item: com.droiddeck.launcher.stores.CatalogItem) { + val ctx = LocalContext.current + ArtStrip(item.imageUrl ?: item.tallImageUrl, item.title) { + Text(item.title, fontSize = 13.sp, fontWeight = FontWeight.Bold, color = Color.White, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f, fill = false)) + SourceChip(item.store.id, small = true) + Text(stringResource(R.string.stores_dl_interrupted), fontSize = 12.sp, color = Color(0xFFFFC24D), maxLines = 1) + Spacer(Modifier.weight(1f)) + RoundAction(Icons.Filled.PlayArrow, stringResource(R.string.stores_dl_resume), primary = true) { StoresState.requestInstall(ctx, item) } + CancelAction { StoresState.clearUnfinished(ctx, item) } + } +} + private const val GATHER_HOLD_MS = 900 -/** A finished download: its name and store, and Play when it installed - blooming out of a dot when it just did. */ +@Composable +private fun ArtStrip(cover: String?, name: String, content: @Composable androidx.compose.foundation.layout.RowScope.() -> Unit) { + val pal = LocalPalette.current + Box(Modifier.fillMaxWidth().heightIn(min = 60.dp).clip(Shape12).background(Color(0xFF101318)).border(1.dp, pal.line, Shape12)) { + if (!cover.isNullOrEmpty()) AsyncImage(model = cover, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.matchParentSize()) + else Spacer(Modifier.matchParentSize().background(artBrush(hueOf(name)))) + Spacer(Modifier.matchParentSize().background(Brush.horizontalGradient(0f to Color.Black.copy(alpha = 0.92f), 0.5f to Color.Black.copy(alpha = 0.72f), 1f to Color.Black.copy(alpha = 0.2f)))) + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), + modifier = Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 8.dp), content = content, + ) + } +} + @Composable private fun FinishedRow(d: DownloadEntry, s: FrontEndState, a: FrontEndActions, bloom: Boolean = false) { val ctx = LocalContext.current - val colors = MaterialTheme.colorScheme - Row( - verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), - modifier = Modifier.fillMaxWidth().clip(Shape12).background(colors.surface).padding(horizontal = 12.dp, vertical = 6.dp), - ) { - Text(d.name, fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f, fill = false)) + ArtStrip(d.cover, d.name) { + Text(d.name, fontSize = 13.sp, fontWeight = FontWeight.Bold, color = Color.White, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f, fill = false)) SourceChip(d.store.id, small = true) - Text(stringResource(if (d.state == DownloadState.INSTALLED) R.string.stores_installed_chip else R.string.stores_dl_cancelled), fontSize = 11.sp, color = colors.onSurfaceVariant, maxLines = 1, modifier = Modifier.weight(1f)) + Text(stringResource(if (d.state == DownloadState.INSTALLED) R.string.stores_installed_chip else R.string.stores_dl_cancelled), fontSize = 12.sp, color = Color.White.copy(alpha = 0.72f), maxLines = 1) + Spacer(Modifier.weight(1f)) if (d.state == DownloadState.INSTALLED) Box(Modifier.bloomIn(bloom, GATHER_HOLD_MS + 150)) { - RoundAction(Icons.Filled.PlayArrow, stringResource(R.string.stores_play), primary = true) { launchStoreGame(ctx, d.store, d.id, s, a) } + RoundAction(Icons.Filled.PlayArrow, stringResource(R.string.stores_play), primary = true) { if (d.key == EpicClient.DOWNLOAD_KEY) a.onEpicLauncher() else launchStoreGame(ctx, d.store, d.id, s, a) } } } } -/** Grows out of a dot (sp 0.5 / 300) after [waitMs], when [on]; otherwise just there. */ private fun Modifier.bloomIn(on: Boolean, waitMs: Int): Modifier = composed { val k = remember { Animatable(if (on && Motion.scale > 0f) 0f else 1f) } LaunchedEffect(Unit) { @@ -211,10 +232,6 @@ private fun Modifier.bloomIn(on: Boolean, waitMs: Int): Modifier = composed { graphicsLayer { scaleX = k.value; scaleY = k.value; alpha = k.value.coerceIn(0f, 1f) } } -/** - * A row's action as a round icon button - the label is its description - sized like the old - * compact buttons and focusable by pad. [primary] fills it with the accent, [danger] in red. - */ @Composable internal fun RoundAction( icon: androidx.compose.ui.graphics.vector.ImageVector, description: String, primary: Boolean = false, danger: Boolean = false, @@ -236,10 +253,6 @@ internal fun RoundAction( ) { androidx.compose.material3.Icon(icon, description, tint = tint, modifier = Modifier.size(size * 0.5f)) } } -/** - * Cancel as End session's confirm: the X drops a pull and Keep and Delete step out to its left, - * in red. Keep's rim runs out the four seconds after which it folds back by itself. - */ @Composable private fun CancelAction(onDelete: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -255,7 +268,6 @@ private fun CancelAction(onDelete: () -> Unit) { ) { val left = remember { Animatable(1f) } LaunchedEffect(Unit) { - // Wall-clock seconds, as before; the rim follows them when animations run. if (Motion.scale > 0f) launch { left.animateTo(0f, androidx.compose.animation.core.tween((CANCEL_HOLD_MS / Motion.scale).toInt(), easing = LinearEasing)) } delay(CANCEL_HOLD_MS.toLong()) StoresMotion.fold() @@ -271,7 +283,6 @@ private fun CancelAction(onDelete: () -> Unit) { private const val CANCEL_HOLD_MS = 4000 -/** A capsule's outline drawn for [left] (1 to 0) of its length, clockwise from the top centre: time running out. */ private fun Modifier.timeRim(left: () -> Float, color: Color): Modifier = drawWithContent { drawContent() val v = left() @@ -295,12 +306,11 @@ private fun Modifier.timeRim(left: () -> Float, color: Color): Modifier = drawWi @Composable private fun DownloadCard(d: DownloadEntry, s: FrontEndState, a: FrontEndActions) { val ctx = LocalContext.current + val colors = MaterialTheme.colorScheme val pal = LocalPalette.current val narrow = LocalNarrowPane.current val ink = Color.White val dim = Color.White.copy(alpha = 0.72f) - // The game's wide art is the row: cropped to it, a dark wash from the left so the copy reads - // in white there, the art clear on the right. Box(Modifier.fillMaxWidth().heightIn(min = 88.dp).clip(Shape12).background(Color(0xFF101318)).border(1.dp, pal.line, Shape12)) { if (!d.cover.isNullOrEmpty()) AsyncImage(model = d.cover, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.matchParentSize()) else Spacer(Modifier.matchParentSize().background(artBrush(hueOf(d.name)))) @@ -318,8 +328,11 @@ private fun DownloadCard(d: DownloadEntry, s: FrontEndState, a: FrontEndActions) val meta = when (d.state) { DownloadState.INSTALLED -> stringResource(R.string.stores_installed_chip) DownloadState.CANCELLED -> stringResource(R.string.stores_dl_cancelled) - // The reason is in the engine log; the row only says what is kept for Resume. - DownloadState.FAILED -> if (d.bytesDone > 0) stringResource(R.string.stores_dl_failed_kept, formatBytes(d.bytesDone)) else stringResource(R.string.stores_dl_failed) + DownloadState.FAILED -> { + if (!d.error.isNullOrBlank()) stringResource(R.string.stores_dl_failed_reason, d.error) + else if (d.bytesDone > 0) stringResource(R.string.stores_dl_failed_kept, formatBytes(d.bytesDone)) + else stringResource(R.string.stores_dl_failed) + } DownloadState.PAUSED -> stringResource(R.string.stores_dl_paused) DownloadState.QUEUED -> if (d.queuePosition > 0) stringResource(R.string.stores_dl_queued_at, d.queuePosition) else stringResource(R.string.stores_dl_queued) DownloadState.RUNNING -> { @@ -331,14 +344,14 @@ private fun DownloadCard(d: DownloadEntry, s: FrontEndState, a: FrontEndActions) } } } - Text(meta, fontSize = 12.sp, color = dim, maxLines = 2, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f, fill = false)) + val metaColor = if (d.state == DownloadState.FAILED) colors.error else dim + Text(meta, fontSize = 12.sp, color = metaColor, maxLines = 2, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f, fill = false)) if (d.state == DownloadState.RUNNING && (d.stage == DownloadStage.DOWNLOAD || d.stage == DownloadStage.INSTALL) && d.speedBps > 0) { Text(formatSpeed(d.speedBps), fontSize = 12.sp, color = dim, maxLines = 1) if (d.etaSeconds >= 0) Text(eta(d.etaSeconds), fontSize = 12.sp, color = dim, maxLines = 1) } } } - // The row's actions on the right, over the art: icons, their labels as descriptions. Row(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically) { when (d.state) { DownloadState.RUNNING, DownloadState.QUEUED -> { @@ -349,10 +362,12 @@ private fun DownloadCard(d: DownloadEntry, s: FrontEndState, a: FrontEndActions) RoundAction(Icons.Filled.PlayArrow, stringResource(R.string.stores_dl_resume), primary = true) { DownloadQueue.resume(ctx, d.key) } CancelAction { DownloadQueue.cancel(ctx, d.key) } } - DownloadState.FAILED -> RoundAction(Icons.Filled.Refresh, stringResource(R.string.stores_dl_resume), primary = true) { DownloadQueue.retry(ctx, d.key) } - // Just installed (this row is on its way under the line): Play blooms where the bar gathered. + DownloadState.FAILED -> { + RoundAction(Icons.Filled.Refresh, stringResource(R.string.stores_dl_resume), primary = true) { DownloadQueue.retry(ctx, d.key) } + CancelAction { DownloadQueue.clear(ctx, d.key) } + } DownloadState.INSTALLED -> Box(Modifier.bloomIn(true, 420)) { - RoundAction(Icons.Filled.PlayArrow, stringResource(R.string.stores_play), primary = true) { launchStoreGame(ctx, d.store, d.id, s, a) } + RoundAction(Icons.Filled.PlayArrow, stringResource(R.string.stores_play), primary = true) { if (d.key == EpicClient.DOWNLOAD_KEY) a.onEpicLauncher() else launchStoreGame(ctx, d.store, d.id, s, a) } } DownloadState.CANCELLED -> {} } @@ -361,13 +376,6 @@ private fun DownloadCard(d: DownloadEntry, s: FrontEndState, a: FrontEndActions) } } -/** - * One segment per stage - Manifest, Download, Verify, Install - equal widths: a passed or skipped - * stage full, the active one filling with its own progress (a sliver while it has nothing to count), - * the rest empty. Fills ride a spring; a stage that completes swells and settles (the bloop); a - * paused one breathes; and once the download has installed the four gather into one green line - * that draws up into a dot, where Play blooms. - */ @Composable private fun StageBar(d: DownloadEntry) { val pal = LocalPalette.current @@ -378,8 +386,6 @@ private fun StageBar(d: DownloadEntry) { val fills = stages.mapIndexed { i, st -> when { actives[i] -> d.stageFraction.let { if (it < 0f) 0.04f else it } - // A stage a store skips or folds into another (Epic checks chunks while it fetches, - // Amazon writes while it downloads) reads complete once a later one has started. d.passed(st) || st.ordinal < d.stage.ordinal || d.stage == DownloadStage.DONE -> 1f else -> 0f } @@ -408,7 +414,6 @@ private fun StageBar(d: DownloadEntry) { val cy = size.height / 2f val g = gather.value if (g < 0.5f) { - // The segments: the gaps close and every fill turns done-green as the gather starts. val join = (g * 2f).coerceIn(0f, 1f) val gap = 3.dp.toPx() * (1f - join) val segW = (size.width - gap * 3f) / 4f @@ -416,6 +421,7 @@ private fun StageBar(d: DownloadEntry) { val x = i * (segW + gap) drawRoundRect(colors.surfaceVariant, Offset(x, cy - h / 2f), Size(segW, h), CornerRadius(h / 2f)) val base = when { + d.state == DownloadState.FAILED -> colors.error done[i] -> pal.good actives[i] && paused -> pausedColor.copy(alpha = breath) actives[i] && stages[i] == DownloadStage.VERIFY -> verifyColor @@ -428,7 +434,6 @@ private fun StageBar(d: DownloadEntry) { ) } } else { - // One line drawing up into a dot at its right end. val p = ((g - 0.5f) * 2f).coerceIn(0f, 1f) val dot = 10.dp.toPx() val left = androidx.compose.ui.util.lerp(0f, size.width - dot, p) @@ -438,7 +443,6 @@ private fun StageBar(d: DownloadEntry) { } } -/** 1, or while [on] (and animations run), an alpha going 1 → 0.5 → 1 over the rail's live-dot period. */ @Composable private fun breathing(on: Boolean): Float { if (!on || Motion.scale == 0f) return 1f @@ -453,22 +457,6 @@ private fun eta(seconds: Long): String = when { else -> "~${seconds / 3600} h ${(seconds % 3600) / 60} m" } -/** The queue's settings beside it: speed tier, downloads at a time, and the engine log. */ -@Composable -private fun DownloadSettings(s: FrontEndState, a: FrontEndActions) { - val ctx = LocalContext.current - val colors = MaterialTheme.colorScheme - val pal = LocalPalette.current - SectionTitle(stringResource(R.string.stores_download_manager), null) - Column(verticalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.fillMaxWidth().clip(Shape12).background(colors.surface).border(1.dp, pal.line, Shape12).padding(horizontal = 14.dp, vertical = 10.dp)) { - DownloadControls(s, a) - } -} - -/** - * The queue's two knobs on one line - the speed tier on the left, downloads at a time on the - * right; the same control sits in the cog's popup. A narrow page puts them on two tight lines. - */ @Composable internal fun DownloadControls(s: FrontEndState, a: FrontEndActions) { val ctx = LocalContext.current @@ -492,37 +480,35 @@ internal fun DownloadControls(s: FrontEndState, a: FrontEndActions) { } } -/** - * The chip row's cog: the section's own settings stepped out of it - which tab a store opens on, - * mature titles, the speed tier and how many at once, and the download engine. Their only home; - * Setup no longer repeats them. Every install is added to Steam; that is not a choice. [s] is - * read live, so a change shows at once in what is stepped out. - */ internal fun storesSettingsStep(at: Rect, s: androidx.compose.runtime.State<FrontEndState>, a: FrontEndActions, accent: androidx.compose.ui.graphics.Color): StepAsk = StepAsk( - anchor = at, side = StepSide.Left, accent = accent, items = 3, maxWidth = 440.dp, + anchor = at, side = StepSide.Left, accent = accent, items = 2, maxWidth = 440.dp, handle = { androidx.compose.material3.Icon(androidx.compose.material.icons.Icons.Filled.Settings, null, tint = accent, modifier = Modifier.size(20.dp)) }, ) { StepTitle(stringResource(R.string.stores_settings_eyebrow)) Column( - Modifier.stepItem(1).fillMaxWidth().heightIn(max = 340.dp).verticalScroll(rememberScrollState()), + Modifier.stepItem(1).fillMaxWidth().heightIn(max = minOf(340.dp, (maxHeight - 64.dp).coerceAtLeast(44.dp))).verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(6.dp), ) { val st = s.value - SettingsRow(stringResource(R.string.setup_stores_open_on), null) { - SegmentedTabs( + SettingsRow(stringResource(R.string.setup_stores_open_on), null, stacked = true) { + Box(Modifier.focusRequester(first).focusGroup()) { SegmentedTabs( listOf(SessionPrefs.STORES_OPEN_LIBRARY to stringResource(R.string.stores_tab_library), SessionPrefs.STORES_OPEN_STORE to stringResource(R.string.stores_tab_store)), st.storesOpenTab, - ) { a.onStoresOpenTab(it) } + ) { a.onStoresOpenTab(it) } } } SettingsRow(stringResource(R.string.stores_show_mature), null) { ToggleSwitch(st.storesShowMature, label = stringResource(R.string.stores_show_mature)) { a.onStoresShowMature(it) } } - // The queue's two knobs as one compact row, the same control the Downloads page has. Column(Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 11.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) { DownloadControls(st, a) } + val context = androidx.compose.ui.platform.LocalContext.current + var gogAchievements by androidx.compose.runtime.remember { androidx.compose.runtime.mutableStateOf(com.droiddeck.launcher.stores.gog.GogComet.enabled(context)) } + SettingsRow(stringResource(R.string.gog_achievements), stringResource(R.string.gog_achievements_hint)) { + ToggleSwitch(gogAchievements, label = stringResource(R.string.gog_achievements)) { + gogAchievements = it + com.droiddeck.launcher.stores.gog.GogComet.setEnabled(context, it) + } + } StoresEngineRow() } - Row(horizontalArrangement = Arrangement.End, modifier = Modifier.fillMaxWidth().stepItem(2).padding(top = 8.dp)) { - StepChoice(stringResource(R.string.common_ok), enabled = open, modifier = Modifier.focusRequester(first)) { StoresMotion.fold() } - } } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoresInstallDialog.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoresInstallDialog.kt index e7d645a033..565b5cc9a1 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StoresInstallDialog.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoresInstallDialog.kt @@ -11,8 +11,13 @@ 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.layout.IntrinsicSize +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.Folder import androidx.compose.material.icons.outlined.SdCard import androidx.compose.material.icons.outlined.Smartphone import androidx.compose.material3.Icon @@ -40,11 +45,6 @@ import com.droiddeck.launcher.stores.StoreInstallRoot import com.droiddeck.launcher.stores.StoresState import com.droiddeck.launcher.stores.formatBytes -/** - * "Install <game>:" over one row per place - internal storage, the card - each the action - * itself: icon, name, free space. Asked only when a card is there. The row picked last time - * starts focused, so a pad confirms the usual place with one press; nothing is chosen for the user. - */ @Composable internal fun InstallWhereDialog(item: CatalogItem, onDismiss: () -> Unit) { val ctx = LocalContext.current @@ -56,7 +56,7 @@ internal fun InstallWhereDialog(item: CatalogItem, onDismiss: () -> Unit) { val defaultIndex = targets.indexOfFirst { it.root.absolutePath == remembered }.coerceAtLeast(0) val focus = remember { List(targets.size) { FocusRequester() } } LaunchedEffect(Unit) { focusWithinFrames({ false }) { focus[defaultIndex] } } - AppDialog(shown, close, "installWhere", wide = false, maxWidth = 440.dp) { + AppDialog(shown, close, "installWhere", wide = false, maxWidth = if (targets.size > 2) 600.dp else 440.dp) { Rise(0) { Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth()) { Text( @@ -70,12 +70,23 @@ internal fun InstallWhereDialog(item: CatalogItem, onDismiss: () -> Unit) { } } Rise(1) { - Column(verticalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.fillMaxWidth()) { + Row(horizontalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.fillMaxWidth()) { targets.forEachIndexed { i, t -> + val needed = com.droiddeck.launcher.stores.StoreInstallRoot.estimatedBytesNeeded(item) + val freeBytes = t.freeBytes + val isLow = com.droiddeck.launcher.stores.StoreInstallRoot.insufficientSpace(needed, freeBytes) + val freeText = if (freeBytes < 0L) { + stringResource(R.string.stores_target_free_unknown) + } else if (isLow) { + stringResource(R.string.stores_storage_low, formatBytes(freeBytes), formatBytes(needed)) + } else { + stringResource(R.string.stores_target_free, formatBytes(freeBytes)) + } TargetRow( label = if (t.removable) t.label else stringResource(R.string.stores_target_internal), - free = stringResource(R.string.stores_target_free, formatBytes(t.freeBytes)), - removable = t.removable, focus = focus[i], + free = freeText, + removable = t.removable, folder = t.folder, focus = focus[i], + warning = isLow, modifier = Modifier.weight(1f), ) { SessionPrefs.setStoresInstallTarget(ctx, t.root.absolutePath) StoresState.install(ctx, item, t.root) @@ -88,22 +99,24 @@ internal fun InstallWhereDialog(item: CatalogItem, onDismiss: () -> Unit) { } @Composable -private fun TargetRow(label: String, free: String, removable: Boolean, focus: FocusRequester, onPick: () -> Unit) { +private fun TargetRow(label: String, free: String, removable: Boolean, folder: Boolean, focus: FocusRequester, modifier: Modifier, warning: Boolean = false, onPick: () -> Unit) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current val src = remember { MutableInteractionSource() } val hot = rememberHot(src) Row( - verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp), - modifier = Modifier.fillMaxWidth().focusRequester(focus).clip(Shape12) + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp), + modifier = modifier.height(IntrinsicSize.Min).focusRequester(focus).clip(Shape12) .background(if (hot) pal.signal.copy(alpha = 0.14f) else colors.surface.copy(alpha = 0.6f)) .glideBorder(hot, Shape12, pal.signal, pal.line) .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = Role.Button, onClick = onPick) .controllerConfirm(onClick = onPick) - .padding(horizontal = 14.dp, vertical = 10.dp), + .padding(horizontal = 12.dp, vertical = 10.dp), ) { - Icon(if (removable) Icons.Outlined.SdCard else Icons.Outlined.Smartphone, null, tint = if (hot) pal.signal else colors.onBackground, modifier = Modifier.size(22.dp)) - Text(label, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f)) - Text(free, fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 1) + Icon(if (folder) Icons.Outlined.Folder else if (removable) Icons.Outlined.SdCard else Icons.Outlined.Smartphone, null, tint = if (hot) pal.signal else colors.onBackground, modifier = Modifier.fillMaxHeight().aspectRatio(1f)) + Column(verticalArrangement = Arrangement.spacedBy(2.dp)) { + Text(label, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + Text(free, fontSize = 12.sp, color = if (warning) colors.error else colors.onSurfaceVariant, maxLines = 2) + } } } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoresMotion.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoresMotion.kt index 9f216ebdaf..3d5ba671ca 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StoresMotion.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoresMotion.kt @@ -47,13 +47,8 @@ import kotlin.math.atan2 import kotlin.math.max import kotlin.math.sin -// The Stores section's moves, in the launcher's own vocabulary: an install bloops into a dot that -// flies to the Downloads chip, sign-in floods in the store's colour and comes home to the chip's -// dot, and the confirms step out of the control that asked (StepOut). Everything here is in root -// coordinates; the Stores page draws it in its own space. internal object StoresMotion { - /** The Install (or Resume install) button last pressed, its label and when: a download that starts soon after flies from it. */ var installFrom: Rect? = null private set var installLabel: String = "" @@ -66,28 +61,21 @@ internal object StoresMotion { installAt = SystemClock.uptimeMillis() } - /** The button just pressed, if it was pressed in the last few seconds; not consumed. */ fun recentInstall(): Rect? = installFrom.takeIf { SystemClock.uptimeMillis() - installAt < 5_000 } - /** The button a download that just started came from, once; stale after 20 s (a slow manifest). */ fun takeInstall(): Rect? = installFrom.takeIf { SystemClock.uptimeMillis() - installAt < 20_000 }.also { installAt = 0L } - /** Where the Downloads chip sits, for a download's dot to land in. */ var downloadsChip by mutableStateOf<Rect?>(null) - /** Bumped each time a dot lands: the chip's count and the rail's badge pop on it. */ var landed by mutableIntStateOf(0) - /** Dots in flight to the Downloads chip. */ val flights = mutableStateListOf<Flight>() fun fly(from: Rect) { if (Motion.scale == 0f || downloadsChip == null) { landed++; return } - // The count sits at the chip's right end. flights += Flight(from, to = { downloadsChip?.let { Offset(it.right - 22.dp.toPx(), it.center.y) } }, onLand = { landed++ }) } - /** The confirm or list stepping out of a control on the Stores page now, and whether it is open. */ var step by mutableStateOf<StepAsk?>(null) private set var stepOpen by mutableStateOf(false) @@ -99,14 +87,12 @@ internal object StoresMotion { stepOpen = true } - /** Drops whatever is stepped out or flooding, at once: the page it belonged to has gone. */ fun drop() { step?.let { step = null; it.onDismiss() } stepOpen = false signIn = null } - /** Folds the current one back into its control. */ fun fold() { stepOpen = false } internal fun closed(a: StepAsk) { @@ -114,18 +100,18 @@ internal object StoresMotion { a.onDismiss() } - /** A store's sign-in flooding the page, or draining back out of it. */ var signIn by mutableStateOf<SignInFlood?>(null) - /** Per store, bumped to send its chip's dot one pulse ring (signed in, picked). */ val pulses = androidx.compose.runtime.mutableStateMapOf<Store, Int>() fun pulse(store: Store) { pulses[store] = (pulses[store] ?: 0) + 1 } - /** Where each store's dot sits on its chip, for a sign-in to come home to. */ val dots = HashMap<Store, Rect>() - /** The card a game page is about to open from. */ + var heroAt by mutableStateOf<Rect?>(null) + + var heroLands by mutableStateOf(false) + private var card: CardMark? = null private var cardAt = 0L @@ -134,17 +120,11 @@ internal object StoresMotion { cardAt = SystemClock.uptimeMillis() } - /** The card game [key] was just opened from, once; a page opened another way shows without a flood. */ fun takeCard(key: String): CardMark? = card?.takeIf { it.key == key && SystemClock.uptimeMillis() - cardAt < 1_000 }.also { card = null } } -/** A game card at [bounds] (root px) with corner [corner] (px) and its art, for the page it opens to flood out of. */ internal class CardMark(val key: String, val bounds: Rect, val corner: Float, val art: String?) -/** - * A confirm or short list for [StepOut] on the Stores page, asked by a control that sits at [anchor] - * (root px). [content] gets a close that folds it; [onDismiss] runs once it has folded, however. - */ internal class StepAsk( val anchor: Rect, val side: StepSide, @@ -158,22 +138,15 @@ internal class StepAsk( ) internal class SignInFlood(val store: Store, val from: Rect, val start: Color, val color: Color) { - /** Covered and handed to the login page; waiting for the page to come back. */ var away by mutableStateOf(false) - /** Back from the login page: draining into [to]. */ var drainTo by mutableStateOf<Rect?>(null) } -/** The dots flying to the Downloads chip, drawn over the page whose root offset is [origin]. */ @Composable internal fun FlightLayer(origin: Offset) { for (f in StoresMotion.flights.toList()) key(f.id) { FlightDot(f, origin) { StoresMotion.flights.remove(f) } } } -/** - * Pops (1.3 to 1, with one ring) each time [trigger] changes: by default each time a download's - * dot lands, for the count on the chip and the rail; any other landing passes its own count. - */ internal fun Modifier.landingPop(trigger: Int = StoresMotion.landed): Modifier = composed { val pal = LocalPalette.current val scale = remember { Animatable(1f) } @@ -195,11 +168,6 @@ internal fun Modifier.landingPop(trigger: Int = StoresMotion.landed): Modifier = }.graphicsLayer { scaleX = scale.value; scaleY = scale.value } } -/** - * A pressed button in [start] stretching out over this element in [color] (LaunchFlood's move: - * each edge on its own loose spring, the furthest first, blobby in flight). [from] is in this - * element's px. Calls [onCovered] once, when nothing but [color] shows; then holds. - */ @Composable internal fun ColorFlood(from: Rect, start: Color, color: Color, onCovered: () -> Unit) { val edges = remember { List(4) { Animatable(0f) } } @@ -214,7 +182,6 @@ internal fun ColorFlood(from: Rect, start: Color, color: Color, onCovered: () -> val lead = travel[i] / far launch { delay(Motion.ms((120 * (1f - lead)).toInt()).toLong()) - // Overshoots past the edge, off the element, so the wobble is felt in the pull. edge.animateTo(1f, if (Motion.scale == 0f) Motion.sp() else spring(dampingRatio = 0.48f, stiffness = lerp(110f, 190f, lead))) { if (value >= 1f) reached[i] = true } @@ -231,10 +198,6 @@ internal fun ColorFlood(from: Rect, start: Color, color: Color, onCovered: () -> } } -/** - * [color] over the whole element drawing down into [to] (px, here), critically damped, the near - * edges first (PageFlood's way back), then fading out on it; [onDone] after. - */ @Composable internal fun ColorDrain(color: Color, to: Rect, toCorner: Float, onDone: () -> Unit) { val edges = remember { List(4) { Animatable(1f) } } @@ -264,7 +227,6 @@ internal fun ColorDrain(color: Color, to: Rect, toCorner: Float, onDone: () -> U private fun Modifier.onSizeChangedCompat(onSize: (Size) -> Unit) = onSizeChanged { onSize(Size(it.width.toFloat(), it.height.toFloat())) } -/** A rect from [r] with its edges [v] of the way to this scope's (left, top, right, bottom): blobby in flight. */ private fun DrawScope.drawFloodShape(r: Rect, restCorner: Float, v: List<Float>, color: Color) { val left = lerp(r.left, 0f, v[0]) val top = lerp(r.top, 0f, v[1]) @@ -278,7 +240,6 @@ private fun DrawScope.drawFloodShape(r: Rect, restCorner: Float, v: List<Float>, drawRoundRect(color, Offset(left, top), Size(w, h), CornerRadius(corner)) } -/** Sends one pulse ring out of a dot each time [trigger] changes after the first composition. */ internal fun Modifier.pulseRing(trigger: Int, color: Color): Modifier = composed { val ring = remember { Animatable(1f) } val seen = remember { intArrayOf(trigger) } @@ -297,11 +258,6 @@ internal fun Modifier.pulseRing(trigger: Int, color: Color): Modifier = composed } } -/** - * [items] in a column where a row that comes enters with [enter] and a row that goes stays on to - * leave with [exit] (a Column has no item animations of its own). [content] gets the row and - * whether it came after the list was first shown. - */ @Composable internal fun <T> AnimatedRows( items: List<T>, @@ -316,7 +272,6 @@ internal fun <T> AnimatedRows( val later = remember { mutableMapOf<Any, Boolean>() } val mounted = remember { booleanArrayOf(false) } val now = items.associateBy(key) - // Keep a leaving row where it was among the ones that stay. val merged = ArrayList<Any>() var j = 0 for (k in now.keys) { diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoresPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoresPage.kt index 27c6d7ff17..e9c0e39ac6 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StoresPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoresPage.kt @@ -12,6 +12,7 @@ import androidx.compose.animation.togetherWith import androidx.compose.animation.core.Animatable import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material.icons.outlined.Folder import androidx.compose.material.icons.outlined.SdCard import androidx.compose.material.icons.outlined.Smartphone import androidx.compose.runtime.CompositionLocalProvider @@ -27,11 +28,16 @@ import androidx.compose.ui.layout.boundsInParent import androidx.compose.ui.layout.boundsInRoot import androidx.compose.ui.layout.positionInRoot import com.droiddeck.launcher.stores.StoreInstallRoot +import com.droiddeck.launcher.stores.epic.EpicClient import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.launch import androidx.compose.ui.layout.boundsInWindow import androidx.compose.ui.layout.onGloballyPositioned +import android.view.KeyEvent +import androidx.compose.ui.input.key.onPreviewKeyEvent +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.draw.drawWithContent import androidx.compose.ui.draw.drawBehind @@ -81,6 +87,11 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Check import androidx.compose.material.icons.filled.Search import androidx.compose.material.icons.automirrored.filled.Login +import androidx.compose.material.icons.filled.GridView +import androidx.compose.material.icons.filled.Sort +import androidx.compose.material.icons.filled.ViewList +import com.droiddeck.launcher.stores.sortCatalogItems +import com.droiddeck.launcher.stores.retainCatalogOrder import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.basicMarquee import androidx.compose.material.icons.filled.PlayArrow @@ -91,6 +102,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.SideEffect import androidx.compose.runtime.State import androidx.compose.runtime.getValue import androidx.compose.runtime.key @@ -128,25 +140,20 @@ import com.droiddeck.launcher.stores.StoresState import com.droiddeck.launcher.stores.download.DownloadStage import com.droiddeck.launcher.stores.download.DownloadState import com.droiddeck.launcher.stores.formatBytes +import java.util.concurrent.CompletableFuture +import kotlin.coroutines.resume +import kotlin.coroutines.resumeWithException +import kotlinx.coroutines.suspendCancellableCoroutine -// The Stores section: GOG, Epic Games and Amazon Games libraries and storefronts, and one -// download queue for the three, in a single full-width pane. -/** The chip row's fourth entry, beside the three stores. */ private const val DOWNLOADS = "downloads" private val TABS = listOf("store", "library", "installed") -/** - * The modes a store has, picked from its chip (A steps them out of it) or cycled with LB / RB: - * Store, Library and Installed. Amazon has no public catalog, so no Store. - */ internal fun tabsFor(store: Store?): List<String> = if (store == Store.AMAZON) TABS.drop(1) else TABS -/** [tab] if [store] has it, else Library (the open-on Store choice on Amazon falls back there). */ internal fun tabFor(store: Store?, tab: String): String = if (tab in tabsFor(store)) tab else "library" -/** What the pane under the chips shows: a store's tab (signed in or not) or the downloads. */ private data class PaneKey(val chip: String, val tab: String, val signedIn: Boolean) @OptIn(androidx.compose.ui.ExperimentalComposeUiApi::class, androidx.compose.animation.ExperimentalAnimationApi::class) @@ -160,43 +167,43 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier var tab by rememberSaveable { mutableStateOf(if (SessionPrefs.storesOpenTab(ctx) == SessionPrefs.STORES_OPEN_STORE) "store" else "library") } var query by rememberSaveable { mutableStateOf("") } var openGame by rememberSaveable { mutableStateOf<String?>(null) } - // The cog's settings read the front end's state live while stepped out. val liveState = androidx.compose.runtime.rememberUpdatedState(s) LaunchedEffect(StoresState.openDownloads) { if (StoresState.openDownloads) { chip = DOWNLOADS; StoresState.openDownloads = false } } val store = Store.byId(chip) - // A tab this store does not have (Store or All on Amazon) reads as Library. val shownTab = tabFor(store, tab) val pane = PaneKey( chip, if (store == null) "" else shownTab, store == null || (StoresState.isSignedIn(store) && StoresState.expired[store] != true), ) - // Incoming and outgoing panes must not share a scroll state while both are on screen. val grids = remember { HashMap<PaneKey, LazyGridState>() } val grid = grids.getOrPut(pane) { LazyGridState() } LaunchedEffect(Unit) { StoresState.refresh(ctx) } - // A store the account is signed into fills itself when its chip is on screen. + val lifecycle = androidx.compose.ui.platform.LocalLifecycleOwner.current.lifecycle + LaunchedEffect(chip) { + if (chip == Store.EPIC.id) { + EpicClient.ensure(ctx) + while (true) { + delay(5_000) + if (lifecycle.currentState.isAtLeast(androidx.lifecycle.Lifecycle.State.RESUMED)) EpicClient.refresh(ctx) + } + } + } LaunchedEffect(chip, StoresState.accounts[store]) { if (store != null && StoresState.isSignedIn(store)) StoresState.open(ctx, store) } - // A pad's focus sits on something the page is about to replace - the card that opens a game, - // a tab's contents - and would be lost with it, leaving the next press to land on the rail. - // Each move says where focus goes next: into the game page's main action, back to the card - // it was opened from, or onto the first card of a tab or store just picked. val ff = LocalFrontFocus.current val inputMode = androidx.compose.ui.platform.LocalInputModeManager.current var focusMove by remember { mutableStateOf<Pair<String, Int>?>(null) } var lastOpened by remember { mutableStateOf<String?>(null) } + 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 closeGame() { openGame = null; move("card") } fun switchTab(to: String) { tab = to; move("first") } - // Picking a chip opens the tab Setup says (Library or Store); a tab the user switches to - // afterwards stays until another chip is picked. val pickChip: (String) -> Unit = { id -> chip = id; openGame = null; query = "" if (id != DOWNLOADS) tab = tabFor(Store.byId(id), if (s.storesOpenTab == SessionPrefs.STORES_OPEN_STORE) "store" else "library") move("first") } - // A pad moving along the chips shows each store it stops on, without A: a beat after it - // settles, so sweeping past two chips does not open both. Focus stays on the chip. var focusedChip by remember { mutableStateOf<String?>(null) } LaunchedEffect(focusedChip) { val id = focusedChip ?: return@LaunchedEffect @@ -206,20 +213,15 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier if (id != DOWNLOADS) tab = tabFor(Store.byId(id), if (s.storesOpenTab == SessionPrefs.STORES_OPEN_STORE) "store" else "library") } } - // A store's chip steps its modes out of itself (End session's shape, in the store's colour); - // picking one shows that store in it. A store not signed in has none: its chip just opens it. val pal = LocalPalette.current fun openModes(st: Store, at: Rect?) { - // Another store's chip (a tap; a pad's focus has already shown it): that store. if (chip != st.id) { pickChip(st.id); return } - // Not signed in: nothing to pick, so A goes on to its Sign in. if (at == null || !StoresState.isSignedIn(st) || StoresState.expired[st] == true) { move("first"); return } val modes = tabsFor(st) val current = if (chip == st.id) shownTab else null var picked = false StoresMotion.ask(StepAsk( anchor = at, side = StepSide.Right, accent = storePalette(pal, st).signal, items = modes.size, - // Folded: focus goes to the first card of what was picked, or back to the chip. onDismiss = { move(if (picked) "first" else "item:storechip:${st.id}") }, handle = { ChipLabel(st, MaterialTheme.colorScheme.onBackground) }, ) { @@ -251,37 +253,35 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier BackHandler(enabled = openGame != null) { closeGame() } val scroll = rememberScrollState() val detailScroll = rememberScrollState() - // A store or tab just picked starts at the top. Closing a game page leaves the grid where it - // was, so the page draws back into the card it came from and focus lands on it. LaunchedEffect(chip, tab) { scroll.scrollTo(0); grid.scrollToItem(0) } LaunchedEffect(openGame) { detailScroll.scrollTo(0) } LaunchedEffect(focusMove, openGame) { if (inputMode.inputMode != androidx.compose.ui.input.InputMode.Keyboard || ff == null) return@LaunchedEffect - // Looked up each frame, and asked again until focus is really there: what it goes to (the - // game page's action, the card under it) is composed and placed a frame or two after the - // move that asks for it, and a request before then is dropped without a word. - // A mode with nothing in it (Installed, none installed) has no first card: after a few - // frames focus goes to the store's chip rather than falling back to the rail. var frames = 0 fun attached(id: String) = (ff.attached[id] ?: 0) > 0 fun target(): Pair<androidx.compose.ui.focus.FocusRequester, String?>? { val kind = focusMove?.first return when { - openGame != null -> if (ff.primaryAttached > 0) ff.primary to FrontFocus.PRIMARY - else "back:${store?.label}".let { id -> ff.items[id]?.takeIf { attached(id) }?.let { it to id } } kind == "card" -> lastOpened?.let { "card:$it" }?.let { id -> ff.items[id]?.takeIf { attached(id) }?.let { it to id } } ?: ff.firstTile.takeIf { ff.firstTileAttached > 0 }?.let { it to null } kind == "first" -> ff.firstTile.takeIf { ff.firstTileAttached > 0 }?.let { it to null } - // A store not signed in: its Sign in. ?: ff.primary.takeIf { ff.primaryAttached > 0 }?.let { it to FrontFocus.PRIMARY } ?: "storechip:$chip".let { id -> ff.items[id]?.takeIf { ++frames > 12 && attached(id) }?.let { it to id } } kind?.startsWith("item:") == true -> kind.removePrefix("item:").let { id -> ff.items[id]?.takeIf { attached(id) }?.let { it to id } } else -> null } } - // The press that asked for this move must not land on where focus goes: its release - // would press that too (A on a chip went on to Sign in). Wait for A to come up. repeat(60) { if (!HeldKeys.confirm) return@repeat; androidx.compose.runtime.withFrameNanos { } } + if (openGame != null) { + val back = "back:${ctx.getString(R.string.common_back)}" + repeat(45) { n -> + androidx.compose.runtime.withFrameNanos { } + if (detailFocused) return@LaunchedEffect + val req = if (n < 20) heroFocus else ff.items[back]?.takeIf { attached(back) } ?: heroFocus + runCatching { req.requestFocus() } + } + return@LaunchedEffect + } repeat(45) { androidx.compose.runtime.withFrameNanos { } val (req, id) = target() ?: return@repeat @@ -290,9 +290,6 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier } } - // The game page is a layer over the grid: it floods out of the card it was opened from (the - // cog's PageFlood, carrying the card's art), and Back draws it into that card again. [detail] - // outlives [openGame] while it draws back. var detail by remember { mutableStateOf<String?>(null) } var leaving by remember { mutableStateOf(false) } var detailFrom by remember { mutableStateOf<Origin?>(null) } @@ -307,6 +304,7 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier val mark = StoresMotion.takeCard(g) detailFrom = mark?.let { Origin(it.bounds.translate(-viewportAt), it.corner) } detailArt = mark?.art + StoresMotion.heroLands = mark != null leaving = false detail = g } else if (detail != null) { @@ -332,9 +330,6 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier onNext = { if (openGame == null && chip != DOWNLOADS) { val t = tabsFor(store); switchTab(t[(t.indexOf(shownTab) + 1) % t.size]) } }, ), ) { - // The chip row stays put and paints nothing - the page's background shows through it. What - // scrolls is clipped at the row's lower edge and, once scrolled, faded out there: the - // content's own alpha, not a colour laid over it. Box(Modifier.fillMaxWidth().padding(bottom = 8.dp)) { StoreTheme(Store.byId(focusedChip ?: chip)) { Rise(0) { StoreChips(chip, focusedChip, s.storeDownloadsActive, onStore = { st, at -> openModes(st, at) }, onDownloads = { if (chip != DOWNLOADS) pickChip(DOWNLOADS) else move("first") }, @@ -357,16 +352,11 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier ) }, ) { - // Under a game page the grid stays composed - its scroll and the card to come back to - // stay put - but sinks away, and a pad can neither reach it nor be sent to it. Once the - // page starts drawing back the grid takes focus again, so it lands on the card at once. val gridFocus = if (covering) null else ff CompositionLocalProvider(LocalFrontFocus provides gridFocus) { Column( modifier = Modifier.fillMaxSize() .graphicsLayer { scaleX = gridScale; scaleY = gridScale; alpha = gridAlpha } - // Always the same group, only its rule changes: a focus group added around - // the card that has focus leaves the focus tree refusing every request after. .focusProperties { enter = { if (coveringNow.value) androidx.compose.ui.focus.FocusRequester.Cancel else androidx.compose.ui.focus.FocusRequester.Default } } .focusGroup(), ) { @@ -376,29 +366,20 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier transitionSpec = { val sameStore = initialState.chip == targetState.chip && initialState.signedIn == targetState.signedIn (if (sameStore && initialState.tab != targetState.tab) { - // LB / RB: the tab's contents leave the way the bumper points and the - // next tab's come in from the other side, the column nearest leading. val dir = if (TABS.indexOf(targetState.tab) > TABS.indexOf(initialState.tab)) 1 else -1 (slideInHorizontally(Motion.sp(0.7f, Spring.StiffnessMediumLow)) { it / 6 * dir } + fadeIn(Motion.tw(220, 60))) .togetherWith(slideOutHorizontally(Motion.tw(170)) { -it / 6 * dir } + fadeOut(Motion.tw(170)) + scaleOut(Motion.tw(170), targetScale = 0.97f)) } else { - // Another store: the shelf sinks away, the next rises in (the pane's own move). (fadeIn(Motion.tw(300, 80)) + slideInVertically(Motion.tw(420, 80)) { it / 24 }) .togetherWith(fadeOut(Motion.tw(170)) + scaleOut(Motion.tw(170), targetScale = 0.97f)) }).using(SizeTransform(clip = false)) }, label = "storesPane", ) { k -> - // What is leaving is not where a pad's next move should land. val outgoing = transition.targetState == androidx.compose.animation.EnterExitState.PostExit CompositionLocalProvider(LocalFrontFocus provides if (outgoing) null else LocalFrontFocus.current) { - // AnimatedContent stacks its child in a Box: the pane's rows need their own column. - // A pad moving while the pane changes must land on what is coming, not on - // what is leaving: focus there vanishes with it. Same group always, only - // its rule changes (adding one around focus breaks the focus tree). val leavingNow = androidx.compose.runtime.rememberUpdatedState(outgoing) val st = Store.byId(k.chip) - // Keep the outgoing pane's palette stable while the next store comes in. StoreTheme(st) { Column( Modifier.fillMaxSize() @@ -408,7 +389,6 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier when { k.chip == DOWNLOADS -> Column(Modifier.fillMaxWidth().verticalScroll(scroll).padding(top = 4.dp, bottom = 16.dp)) { StoresDownloadsPane(s, a) } st == null -> {} - // Signed out, or a sign-in that ran out (a launch could not get its code): sign in again. !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) }) } @@ -422,22 +402,21 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier val detailStore = Store.byId(key.substringBefore(':')) ?: store StoreTheme(detailStore) { val body: @Composable () -> Unit = { - // One focus group, so the pad walks the page's own controls - back, the hero's - // actions - and reaches the rail only with Left from them. It takes every touch, - // so nothing reaches the grid under it. Column( Modifier.fillMaxSize().pointerInput(Unit) { detectTapGestures { } } .verticalScroll(detailScroll).padding(top = 4.dp, bottom = 16.dp), ) { - if (detailStore != null) Column(Modifier.fillMaxWidth().focusGroup()) { StoreGameDetail(detailStore, key, s, a, onBack = { closeGame() }) } + if (detailStore != null) Column( + Modifier.fillMaxWidth() + .onFocusChanged { detailFocused = it.hasFocus } + .focusProperties { exit = { if (coveringNow.value) androidx.compose.ui.focus.FocusRequester.Cancel else androidx.compose.ui.focus.FocusRequester.Default } } + .focusGroup(), + ) { StoreGameDetail(detailStore, key, s, a, heroFocus, onBack = { closeGame() }) } } } val from = detailFrom if (from == null) body() else { - // Sized up front: the flood draws the art only once it knows its size, and a painter - // left to take its size from drawing would never load. The card's own bitmap stands - // in from the memory cache until the full one is decoded. val art = detailArt?.let { url -> coil.compose.rememberAsyncImagePainter( remember(url) { @@ -446,29 +425,25 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier }, ) } - PageFlood(from, leaving, art) { body() } + PageFlood(from, leaving, art, onto = { StoresMotion.heroAt }, ontoCorner = 16.dp) { body() } } } } } } - // Over the whole page: an install's dot on its way to Downloads, a confirm stepping out of the - // control that asked for it, and a sign-in's flood. FlightLayer(hostAt) StoresMotion.step?.let { ask -> key(ask) { StepOut( open = StoresMotion.stepOpen, pill = ask.anchor.translate(-hostAt), side = ask.side, accent = ask.accent, onDismiss = { StoresMotion.fold() }, onClosed = { StoresMotion.closed(ask) }, - pillCorner = ask.pillCorner, items = ask.items, handle = ask.handle, content = ask.content, + pillCorner = ask.pillCorner, maxWidth = ask.maxWidth, items = ask.items, handle = ask.handle, content = ask.content, ) } } SignInFloodLayer(hostAt) } - // Leaving the section: nothing stays stepped out of a control that is no longer on screen. androidx.compose.runtime.DisposableEffect(Unit) { onDispose { StoresMotion.drop() } } - // An install that started from a button here flies from it to the Downloads chip. val activeKeys = StoresState.downloads.filter { it.isActive }.map { it.key }.toSet() val seenActive = remember { mutableSetOf<String>().also { it.addAll(activeKeys) } } LaunchedEffect(activeKeys) { @@ -479,10 +454,6 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier StoresState.pendingInstall?.let { item -> InstallWhere(item) } } -/** - * "Install <game>:" with a row per place, grown out of the Install button that asked (End - * session's step-out, in blue); the plain dialog when that button is not on screen. - */ @Composable private fun InstallWhere(item: CatalogItem) { val ctx = LocalContext.current @@ -498,21 +469,32 @@ private fun InstallWhere(item: CatalogItem) { val defaultIndex = targets.indexOfFirst { it.root.absolutePath == remembered }.coerceAtLeast(0) StoresMotion.ask(StepAsk( anchor = from, side = StepSide.Right, accent = pal.signal, pillCorner = 12.dp, items = 1 + targets.size, + maxWidth = (28 + 192 * targets.size - 8).dp, onDismiss = { if (StoresState.pendingInstall === item) StoresState.pendingInstall = null }, handle = { Text(label, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = pal.signal, maxLines = 1) }, ) { StepTitle(title) - StepList { + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { targets.forEachIndexed { i, t -> - StepChoice( + val needed = com.droiddeck.launcher.stores.StoreInstallRoot.estimatedBytesNeeded(item) + val freeBytes = t.freeBytes + val isLow = com.droiddeck.launcher.stores.StoreInstallRoot.insufficientSpace(needed, freeBytes) + val trailingText = if (freeBytes < 0L) { + stringResource(R.string.stores_target_free_unknown) + } else if (isLow) { + stringResource(R.string.stores_storage_low, formatBytes(freeBytes), formatBytes(needed)) + } else { + stringResource(R.string.stores_target_free, formatBytes(freeBytes)) + } + StepTile( label = if (t.removable) t.label else internalLabel, - icon = if (t.removable) androidx.compose.material.icons.Icons.Outlined.SdCard else androidx.compose.material.icons.Icons.Outlined.Smartphone, - trailing = stringResource(R.string.stores_target_free, formatBytes(t.freeBytes)), + icon = if (t.folder) androidx.compose.material.icons.Icons.Outlined.Folder else if (t.removable) androidx.compose.material.icons.Icons.Outlined.SdCard else androidx.compose.material.icons.Icons.Outlined.Smartphone, + detail = trailingText, + warning = isLow, enabled = open, - modifier = Modifier.fillMaxWidth().stepItem(1 + i).then(if (i == defaultIndex) Modifier.focusRequester(first) else Modifier), + modifier = Modifier.stepItem(1 + i).then(if (i == defaultIndex) Modifier.focusRequester(first) else Modifier), ) { SessionPrefs.setStoresInstallTarget(ctx, t.root.absolutePath) - // The fold and the dot leave together: the download it starts flies from Install. StoresMotion.markInstall(from, label) StoresState.install(ctx, item, t.root) StoresMotion.fold() @@ -523,7 +505,6 @@ private fun InstallWhere(item: CatalogItem) { } } -/** A sign-in's flood: out of the button in the store's colour, and home again once the login page closes. */ @Composable private fun SignInFloodLayer(hostAt: Offset) { val f = StoresMotion.signIn ?: return @@ -532,7 +513,6 @@ private fun SignInFloodLayer(hostAt: Offset) { val density = androidx.compose.ui.platform.LocalDensity.current key(f) { var paused by remember { mutableStateOf(false) } - // Signed in: into the store's dot on its chip. Not (closed, or it failed): back into the button. fun back() { if (f.drainTo == null) f.drainTo = if (StoresState.isSignedIn(f.store)) StoresMotion.dots[f.store] ?: f.from else f.from } androidx.compose.runtime.DisposableEffect(lifecycle) { val obs = androidx.lifecycle.LifecycleEventObserver { _, e -> @@ -542,7 +522,6 @@ private fun SignInFloodLayer(hostAt: Offset) { lifecycle.addObserver(obs) onDispose { lifecycle.removeObserver(obs) } } - // The store had no login page to open: nothing will come back, so drain now. LaunchedEffect(f.away) { if (f.away) { delay(1_500); if (!paused) back() } } val to = f.drainTo if (to == null) ColorFlood(f.from.translate(-hostAt), f.start, f.color) { @@ -561,26 +540,19 @@ private fun SignInFloodLayer(hostAt: Offset) { } } -// ---- the chip row ------------------------------------------------------------------------------- -/** - * Four equal chips - the stores with a signed-in dot, Downloads with its count - and the cog. The - * selection is one shape that belongs to the row, not each chip's background: it glides from chip - * to chip like the focus ring, its leading edge first, tinted in the store's colour, and a hop - * past a chip goes as a drop. - */ @Composable private fun StoreChips( selected: String, focused: String?, active: Int, onStore: (Store, Rect?) -> Unit, onDownloads: () -> Unit, onSettings: (Rect?) -> Unit, - /** The chip a pad's focus is on (null when it leaves the row): the page shows that store. */ onFocusChip: (String?) -> Unit, ) { val pal = LocalPalette.current val keys = Store.entries.map { it.id } + DOWNLOADS val bounds = remember { androidx.compose.runtime.mutableStateMapOf<String, Rect>() } val rootBounds = remember { HashMap<String, Rect>() } - // The fill travels with focus; only the expensive pane change waits for the debounce. val highlighted = focused ?: selected + val inputMode = androidx.compose.ui.platform.LocalInputModeManager.current.inputMode + val fillShown = inputMode != androidx.compose.ui.input.InputMode.Keyboard val tint = androidx.compose.animation.animateColorAsState( Store.byId(highlighted)?.let { sourceColours(it.id).dot } ?: pal.signal, Motion.tw(160), label = "chipTint", ) @@ -589,22 +561,14 @@ private fun StoreChips( for (store in Store.entries) { val signedIn = StoresState.isSignedIn(store) && StoresState.expired[store] != true StoreChip( - label = store.shortLabel, on = selected == store.id, key = store.id, + label = store.shortLabel, on = selected == store.id, under = fillShown && highlighted == store.id, key = store.id, mark = sourceColours(store.id).dot, modifier = Modifier.weight(1f).onGloballyPositioned { bounds[store.id] = it.boundsInParent(); rootBounds[store.id] = it.boundsInRoot() }, lead = { val c = sourceColours(store.id) - // A store's dot pulses once when it is picked signed in, and when a sign-in lands. - var picked by remember { mutableStateOf(0) } - val on = selected == store.id - val wasOn = remember { booleanArrayOf(on) } - LaunchedEffect(on) { - if (on && !wasOn[0] && signedIn) picked++ - wasOn[0] = on - } Box( Modifier.size(12.dp) .onGloballyPositioned { StoresMotion.dots[store] = it.boundsInRoot() } - .pulseRing(picked + (StoresMotion.pulses[store] ?: 0), c.dot), + .pulseRing(StoresMotion.pulses[store] ?: 0, c.dot), ) { Box(Modifier.matchParentSize().clip(CircleShape).background(c.dot).alpha(if (signedIn) 1f else 0.35f)) } }, description = store.label + if (signedIn) "" else " " + stringResource(R.string.stores_chip_signed_out), @@ -612,7 +576,7 @@ private fun StoreChips( ) { onStore(store, rootBounds[store.id]) } } StoreChip( - label = stringResource(R.string.stores_tab_downloads), on = selected == DOWNLOADS, key = DOWNLOADS, + label = stringResource(R.string.stores_tab_downloads), on = selected == DOWNLOADS, under = fillShown && highlighted == DOWNLOADS, key = DOWNLOADS, mark = pal.signal, modifier = Modifier.weight(1f).onGloballyPositioned { bounds[DOWNLOADS] = it.boundsInParent() StoresMotion.downloadsChip = it.boundsInRoot() @@ -626,14 +590,13 @@ private fun StoreChips( IconChip(Icons.Filled.Settings, stringResource(R.string.stores_settings)) { onSettings(cogAt) } } } - // Over the chips: the fill is translucent, and the other chips' rest fill would hide it in flight. - ChipGlide(keys.indexOf(highlighted), bounds[highlighted], tint) + ChipGlide(keys.indexOf(highlighted), bounds[highlighted], tint, visible = fillShown) } } @Composable private fun StoreChip( - label: String, on: Boolean, key: String, modifier: Modifier, lead: @Composable () -> Unit, + label: String, on: Boolean, under: Boolean, key: String, mark: Color, modifier: Modifier, lead: @Composable () -> Unit, trail: (@Composable () -> Unit)? = null, description: String? = null, onFocused: (String?) -> Unit = {}, onClick: () -> Unit, ) { @@ -646,7 +609,12 @@ private fun StoreChip( val scale by animateFloatAsState(if (pressed) 0.95f else 1f, Motion.sp(0.5f, Spring.StiffnessMedium), label = "chipScale") val shape = RoundedCornerShape(99.dp) val ink = if (on) colors.onBackground else if (hot) colors.onBackground else colors.onSurfaceVariant - // The selected look is the row's glide under the chip, so a chip here draws only its rest state. + var picked by remember { mutableStateOf(0) } + val wasOn = remember { booleanArrayOf(on) } + LaunchedEffect(on) { + if (on && !wasOn[0]) picked++ + wasOn[0] = on + } Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.CenterHorizontally), modifier = modifier.paneItem("storechip:$key") @@ -655,20 +623,22 @@ private fun StoreChip( else if (!f.isFocused) onFocused(null) } .heightIn(min = 44.dp).graphicsLayer { scaleX = scale; scaleY = scale }.clip(shape) - .background(if (on) Color.Transparent else colors.surface) - .glideBorder(hot, shape, pal.signal, if (on) Color.Transparent else pal.line) + .background(if (under) Color.Transparent else colors.surface) + .shownBar(on, mark) + .glideBorder(hot, shape, pal.signal, if (under) Color.Transparent else pal.line) .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = Role.Tab, onClick = onClick) .controllerConfirm(onClick = onClick) .then(if (description != null) Modifier.semantics { contentDescription = description } else Modifier) .padding(horizontal = 12.dp, vertical = 8.dp), ) { - androidx.compose.runtime.CompositionLocalProvider(androidx.compose.material3.LocalContentColor provides ink) { lead() } + androidx.compose.runtime.CompositionLocalProvider(androidx.compose.material3.LocalContentColor provides ink) { + Box(Modifier.pulseRing(picked, mark), contentAlignment = Alignment.Center) { lead() } + } Text(label, fontSize = 13.sp, fontWeight = FontWeight.Bold, color = ink, maxLines = 1, overflow = TextOverflow.Ellipsis) trail?.invoke() } } -/** The chip row's cog: icon only, the chips' height; opens the section's settings. */ @Composable private fun IconChip(icon: androidx.compose.ui.graphics.vector.ImageVector, description: String, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -689,18 +659,11 @@ internal fun CountPill(count: Int) { val pal = LocalPalette.current Text( count.toString(), fontSize = 11.sp, fontWeight = FontWeight.Bold, color = pal.onSignal, maxLines = 1, - // Pops as an install's dot lands in it. modifier = Modifier.landingPop().clip(RoundedCornerShape(8.dp)).background(pal.signal).padding(horizontal = 6.dp, vertical = 1.dp), ) } -// ---- sign-in ----------------------------------------------------------------------------------- -/** - * No account for this store yet: the Steam tab's shape in the store's colour. A tilted wall of the - * store's own games drifts behind (its public storefront; blank capsules in its colour when it has - * none), fading out toward the words, and Sign in sits large at the foot. [height] is the pane's. - */ @Composable private fun SignInCard(store: Store, height: Dp) { val ctx = LocalContext.current @@ -708,33 +671,35 @@ private fun SignInCard(store: Store, height: Dp) { val pal = LocalPalette.current val narrow = LocalNarrowPane.current val c = sourceColours(store.id) - // The storefront needs no account; it is what the wall is made of. LaunchedEffect(store) { StoresState.preview(ctx, store) } - // A handful of games would repeat down every column: under eight, the blank wall in its colour. val art = remember(StoresState.shelves[store]) { - StoresState.shelves[store]?.all.orEmpty().filter { !it.mature }.mapNotNull { it.tallImageUrl ?: it.imageUrl }.distinct().take(48) - .takeIf { it.size >= 8 }.orEmpty() + val shelves = StoresState.shelves[store] + val urls = (shelves?.art?.takeIf { it.isNotEmpty() } + ?: shelves?.all.orEmpty().filter { !it.mature && !it.owned }.mapNotNull { it.tallImageUrl ?: it.imageUrl }).distinct().take(48) + when { + urls.size >= 8 -> urls + urls.size >= 4 -> urls + urls.drop(urls.size / 2) + urls.take(urls.size / 2) + else -> emptyList() + } } val shape = RoundedCornerShape(20.dp) val blank = WallCapsule(Brush.linearGradient(listOf(c.fill, colors.background)), edge = c.dot.copy(alpha = 0.22f)) val ground = SolidColor(c.fill) - Box(Modifier.fillMaxWidth().height(height.coerceAtLeast(320.dp)).clip(shape).background(colors.background).border(1.dp, pal.line, shape)) { - // The storefront arrives a moment after the page: its wall fades in over the blank one. - androidx.compose.animation.Crossfade(art, animationSpec = Motion.tw(600), label = "signInWall") { tiles -> + Box(Modifier.fillMaxWidth().heightIn(min = height.coerceAtLeast(0.dp)).clip(shape).background(colors.background).border(1.dp, pal.line, shape)) { + androidx.compose.animation.Crossfade(art, animationSpec = Motion.tw(600), label = "signInWall", modifier = Modifier.matchParentSize()) { tiles -> TiltedWall(tiles.size, if (tiles.isEmpty()) 75_000 else 50_000) { i -> if (tiles.isEmpty()) blank else WallCapsule(ground, tiles[i]) } } - // The wall gives way to the words: dark at the left and the foot, and the store's glow under them. Box( - Modifier.fillMaxSize().background( + Modifier.matchParentSize().background( Brush.horizontalGradient( 0f to colors.background.copy(alpha = 0.97f), 0.45f to colors.background.copy(alpha = 0.9f), 0.78f to colors.background.copy(alpha = 0.35f), 1f to colors.background.copy(alpha = 0.15f), ), ), ) - Box(Modifier.fillMaxSize().background(Brush.verticalGradient(0.5f to Color.Transparent, 1f to colors.background.copy(alpha = 0.92f)))) + Box(Modifier.matchParentSize().background(Brush.verticalGradient(0.5f to Color.Transparent, 1f to colors.background.copy(alpha = 0.92f)))) Box( - Modifier.fillMaxSize().drawBehind { + Modifier.matchParentSize().drawBehind { drawRect(Brush.radialGradient(listOf(c.dot.copy(alpha = 0.22f), Color.Transparent), center = Offset(size.width * 0.16f, size.height * 0.9f), radius = size.height * 0.75f)) }, ) @@ -754,10 +719,6 @@ private fun SignInCard(store: Store, height: Dp) { } } -/** - * Sign in: the button floods the page in the store's colour (LaunchFlood's move), the login page - * opens on that colour, and the flood comes home into the store's dot once it closes. - */ @Composable private fun SignInButton(store: Store, large: Boolean = false) { val ctx = LocalContext.current @@ -772,7 +733,6 @@ private fun SignInButton(store: Store, large: Boolean = false) { } } -/** A square in the store's colour with its name on it: the stores ship no logo this app may bundle. */ @Composable internal fun StoreLogo(store: Store, size: Dp) { val c = sourceColours(store.id) @@ -781,7 +741,6 @@ internal fun StoreLogo(store: Store, size: Dp) { } } -// ---- storefront -------------------------------------------------------------------------------- @Composable private fun Storefront( @@ -793,43 +752,134 @@ private fun Storefront( val colors = MaterialTheme.colorScheme val library = StoresState.library[store] ?: emptyList() val shelves = StoresState.shelves[store] - // The Installed tab, its count and every card's installed mark come from the installs on disk. val installedItems = remember(StoresState.installed, library) { com.droiddeck.launcher.stores.installedCards(store, StoresState.installed, library) } val installedKeys = remember(installedItems) { installedItems.map { it.id }.toSet() + StoresState.installed.filter { it.sidecar.store == store }.map { it.sidecar.id } } val q = query.trim().lowercase() fun matches(i: CatalogItem) = q.isEmpty() || i.title.lowercase().contains(q) - // The storefront leaves out what the store rates or tags as adult unless the user shows it; owned games always show. fun shown(i: CatalogItem) = s.storesShowMature || !i.mature || i.owned fun shelf(l: List<CatalogItem>?) = l?.filter(::shown) - // The Store tab's search: the catalog the shelves brought and the library, each title once. val everything = remember(library, shelves) { (library + (shelves?.all ?: emptyList())).distinctBy { it.id } } - // Installed is a mode of its own now, picked from the store's chip like Store and Library. val installedOnly = tab == "installed" - // Until the cache is read (a moment, off the main thread) there is nothing to count or to say is missing. val loaded = StoresState.library.containsKey(store) val showGrid = tab != "store" || q.isNotEmpty() - val visible = remember(library, installedItems, everything, tab, q, s.storesShowMature) { + val sort = s.storesSort + val lastPlayedFor = remember(s.steamGames) { + val byKey = s.steamGames.associate { "${it.source}:${it.storeId}" to it.lastPlayed } + val lookup: (CatalogItem) -> Long = { i -> byKey[i.key] ?: 0L } + lookup + } + val installedAtFor = remember(StoresState.installed) { + val byKey = StoresState.installed.associate { "${it.sidecar.store.id}:${it.sidecar.id}" to it.sidecar.installedAt } + val lookup: (CatalogItem) -> Long = { i -> byKey[i.key] ?: 0L } + lookup + } + val isSizeSort = (tab == "library" || tab == "installed") && (sort == "sizeAsc" || sort == "sizeDesc") + val candidates = remember(library, installedItems, everything, tab, q, s.storesShowMature) { when (tab) { "library" -> library.filter(::matches) "installed" -> installedItems.filter(::matches) 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) } + val sizeSortPending = isSizeSort && resolvedSizeSortKey != candidateKeys + var stableVisible by remember(store, tab) { mutableStateOf(emptyList<CatalogItem>()) } + val resolvedSizes = when { + !isSizeSort -> emptyMap<String, Long>() + installedOnly -> com.droiddeck.launcher.stores.StoreSizes.onDisk.toMap() + else -> com.droiddeck.launcher.stores.StoreSizes.known.toMap() + } + val sizeFor = remember(resolvedSizes, installedOnly) { + val resolved = resolvedSizes + val lookup: (CatalogItem) -> Long = { item -> + resolved[item.key] ?: if (installedOnly) 0L else item.sizeBytes + } + lookup + } + val sortedVisible = remember(candidates, tab, sort, lastPlayedFor, installedAtFor, sizeFor) { + if (tab == "library" || tab == "installed") + sortCatalogItems(candidates, sort, lastPlayed = lastPlayedFor, installedAt = installedAtFor, size = sizeFor) + else candidates + } + val visible = remember(sizeSortPending, candidates, stableVisible, sortedVisible) { + if (sizeSortPending) retainCatalogOrder(candidates, stableVisible) else sortedVisible + } + SideEffect { + if (!sizeSortPending && stableVisible != sortedVisible) stableVisible = sortedVisible + } + LaunchedEffect(store, tab, sort, candidates, candidateKeys) { + if (!isSizeSort || resolvedSizeSortKey == candidateKeys) return@LaunchedEffect + val requests = candidates.map { item -> + val future: CompletableFuture<Long?> = if (tab == "installed") { + StoresState.installedGame(store, item.id)?.let { + com.droiddeck.launcher.stores.StoreSizes.resolveDisk(ctx, item.key, it) + } ?: CompletableFuture.completedFuture<Long?>(null) + } else { + com.droiddeck.launcher.stores.StoreSizes.resolve(ctx, item) + } + item to future + } + CompletableFuture.allOf(*requests.map { it.second }.toTypedArray()).await() + requests.forEach { (item, future) -> + val bytes = future.getNow(null) ?: return@forEach + if (tab == "installed") com.droiddeck.launcher.stores.StoreSizes.onDisk[item.key] = bytes + else if (item.owned && item.sizeBytes <= 0) com.droiddeck.launcher.stores.StoreSizes.known[item.key] = bytes + } + resolvedSizeSortKey = candidateKeys + } val empty = stringResource(when { installedOnly -> R.string.stores_installed_empty tab == "library" && library.isEmpty() && StoresState.status[store] != null -> R.string.stores_library_loading else -> R.string.stores_nothing_matches }) - // A lazy item can be recomposed or prefetched out of order; the first grid card is identified - // by its key, rather than whichever happens to compose first. var firstPlaced = false + var columns by remember { mutableIntStateOf(1) } + val density = androidx.compose.ui.platform.LocalDensity.current + val focus = LocalFrontFocus.current + val scope = rememberCoroutineScope() + val headerItems = 1 + (if (sizeSortPending) 1 else 0) + + (if (StoresState.status[store] != null) 1 else 0) + (if (StoresState.problems[store] != null) 1 else 0) + val listMode = s.storesView == "list" && (tab == "library" || tab == "installed") val card: @Composable (CatalogItem) -> Unit = { item -> val first = if (showGrid) item.key == visible.firstOrNull()?.key else !firstPlaced firstPlaced = true - GameCard(item, store, s, a, installedKeys, onOpen, first) + val navigation = if (!showGrid || focus == null) Modifier else Modifier.onPreviewKeyEvent { event -> + val key = event.nativeKeyEvent + val direction = when (key.keyCode) { + KeyEvent.KEYCODE_DPAD_DOWN -> 1 + KeyEvent.KEYCODE_DPAD_UP -> -1 + else -> 0 + } + val index = visible.indexOfFirst { it.key == item.key } + val next = storeGridNeighbor(index, visible.size, if (listMode) 1 else columns, direction) + when { + direction == 0 || index < 0 -> false + next == null -> direction > 0 + else -> { + if (key.action == KeyEvent.ACTION_DOWN) { + val target = "card:${visible[next].key}" + val targetIndex = headerItems + next + val visibleTarget = grid.layoutInfo.visibleItemsInfo.any { it.index == targetIndex } + if (!visibleTarget || (focus.attached[target] ?: 0) == 0 || + runCatching { focus.items.getValue(target).requestFocus() }.isFailure) scope.launch { + grid.scrollToItem(targetIndex) + focusWithinFrames({ focus.last == target }) { focus.items[target] ?: androidx.compose.ui.focus.FocusRequester.Default } + } + } + true + } + } + } + if (listMode) GameListRow(item, store, installedKeys, onOpen, first, navigation) + else GameCard(item, store, s, a, installedKeys, onOpen, first, navigation) } LazyVerticalGrid( - columns = GridCells.Adaptive(CardWidth), state = grid, modifier = Modifier.fillMaxSize(), + columns = if (listMode) GridCells.Fixed(1) else GridCells.Adaptive(CardWidth), state = grid, modifier = Modifier.fillMaxSize().focusGroup().onSizeChanged { + val gap = with(density) { 10.dp.roundToPx() } + val minimum = with(density) { (if (listMode) CardWidth * 2 else CardWidth).roundToPx() } + columns = ((it.width + gap) / (minimum + gap)).toInt().coerceAtLeast(1) + }, horizontalArrangement = Arrangement.spacedBy(10.dp), verticalArrangement = Arrangement.spacedBy(10.dp), contentPadding = PaddingValues(top = 4.dp, bottom = 16.dp), ) { @@ -849,13 +899,29 @@ private fun Storefront( else -> stringResource(R.string.stores_search_library) }, ) { - // A purchase made elsewhere shows on a refresh; otherwise the library refreshes itself every six hours. + if (tab == "library" || tab == "installed") { + SortButton(s, a) + ViewButton(s, a) + } + if (store == Store.EPIC) SmallTextButton(stringResource(R.string.epic_client_title)) { + if (EpicClient.status.installed) a.onEpicLauncher() + else { EpicClient.install(ctx); StoresState.openDownloads = true } + } SmallTextButton(stringResource(R.string.stores_refresh)) { StoresState.open(ctx, store, force = true) } val name = StoresState.accounts[store] ?: "" SignOutButton(store, name) } } } + if (sizeSortPending) item(key = "size-sort-progress", span = { GridItemSpan(maxLineSpan) }) { + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp), + modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp), + ) { + androidx.compose.material3.LinearProgressIndicator(Modifier.weight(1f).height(3.dp)) + Text(stringResource(R.string.store_section_loading), fontSize = 11.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + } + } StoresState.status[store]?.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) } } } } when (tab) { @@ -881,15 +947,18 @@ private fun Storefront( } } -/** - * What the store is showing (Store, Library, Installed), a magnifier beside it that opens into the - * search field across the row, and [trailing] (the account) at the right, over a rule. - */ +private suspend fun <T> CompletableFuture<T>.await(): T = + suspendCancellableCoroutine { continuation -> + whenComplete { value, error -> + if (error == null) continuation.resume(value) + else continuation.resumeWithException(error) + } + } + @Composable internal fun ModeHeader(title: String, query: String, onQuery: (String) -> Unit, placeholder: String, trailing: @Composable () -> Unit) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current - // Open while it holds a query; an empty field closes again once focus leaves it. var searching by remember { mutableStateOf(query.isNotEmpty()) } val open by animateFloatAsState(if (searching) 1f else 0f, Motion.sp(0.75f, 420f), label = "searchOpen") Column(Modifier.fillMaxWidth()) { @@ -900,7 +969,6 @@ internal fun ModeHeader(title: String, query: String, onQuery: (String) -> Unit, ) BoxWithConstraints(Modifier.weight(1f), contentAlignment = Alignment.CenterStart) { if (searching || open > 0.01f) { - // The field grows out of the magnifier, the row's width at most. val w = androidx.compose.ui.unit.lerp(44.dp, maxWidth.coerceAtMost(520.dp), open) Box(Modifier.width(w).graphicsLayer { alpha = (open * 1.6f).coerceAtMost(1f) }) { AdbTextField( @@ -917,7 +985,6 @@ internal fun ModeHeader(title: String, query: String, onQuery: (String) -> Unit, } } -/** A store chip's face: its dot and short name, for what steps out of it to carry. */ @Composable private fun ChipLabel(store: Store, ink: Color) { Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { @@ -926,7 +993,6 @@ private fun ChipLabel(store: Store, ink: Color) { } } -/** The page's accent in [store]'s own colour (GOG purple, Epic white, Amazon orange); [base] for none. */ internal fun storePalette(base: Palette, store: Store?): Palette { val (accent, deep) = when (store) { Store.GOG -> Color(0xFFC25BC8) to Color(0xFF9A3FA1) @@ -942,14 +1008,12 @@ internal fun storePalette(base: Palette, store: Store?): Palette { ) } -/** The Store section's accent: Flathub's teal, with its dark ink on it. */ internal fun flathubPalette(base: Palette): Palette = Palette( base.id, base.label, base.detail, base.background, base.surface, base.surfaceVariant, base.line, base.line2, base.onBackground, base.onSurfaceVariant, primary = FlathubTeal, primary2 = Color(0xFF2E958D), onPrimary = FlathubInk, signal = FlathubTeal, good = base.good, error = base.error, ) -/** [content] with the focus ring, buttons, step-outs and the chip glide in Flathub's teal. */ @Composable internal fun FlathubTheme(content: @Composable () -> Unit) { val base = LocalPalette.current @@ -958,12 +1022,10 @@ internal fun FlathubTheme(content: @Composable () -> Unit) { CompositionLocalProvider(LocalPalette provides p) { MaterialTheme(colorScheme = scheme, typography = MaterialTheme.typography, content = content) } } -/** [content] with the focus ring, buttons and step-outs in [store]'s colour. */ @Composable internal fun StoreTheme(store: Store?, content: @Composable () -> Unit) { val base = LocalPalette.current val p = remember(base, store) { storePalette(base, store) } - // Downloads uses the base palette, but the provider stays in the same focus tree. val scheme = MaterialTheme.colorScheme.copy(primary = p.primary, onPrimary = p.onPrimary) CompositionLocalProvider(LocalPalette provides p) { MaterialTheme(colorScheme = scheme, typography = MaterialTheme.typography, content = content) } } @@ -982,10 +1044,126 @@ private fun SmallTextButton(text: String, key: String = text, onClick: () -> Uni ) } -/** - * "<account> · sign out", which asks first: are you sure steps out of it (End session's shape, in - * red), Stay signed in first, so a stray A costs nothing. - */ +@Composable +private fun HeaderIconButton(description: String, icon: androidx.compose.ui.graphics.vector.ImageVector, key: String, onClick: () -> Unit) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val src = remember { MutableInteractionSource() } + val hot = rememberHot(src) + Box( + contentAlignment = Alignment.Center, + modifier = Modifier.paneItem("btn:$key").size(32.dp).clip(CircleShape).background(if (hot) pal.signal.copy(alpha = 0.14f) else Color.Transparent) + .glideBorder(hot, CircleShape, pal.signal) + .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = Role.Button, onClick = onClick) + .controllerConfirm(onClick = onClick), + ) { Icon(icon, description, tint = if (hot) pal.signal else colors.onSurfaceVariant, modifier = Modifier.size(18.dp)) } +} + +@Composable +private fun SortButton(s: FrontEndState, a: FrontEndActions) { + val pal = LocalPalette.current + val title = stringResource(R.string.stores_sort) + var at by remember { mutableStateOf<Rect?>(null) } + Box(Modifier.onGloballyPositioned { at = it.boundsInRoot() }) { + HeaderIconButton(title, Icons.Filled.Sort, "sort") { + val from = at ?: return@HeaderIconButton + StoresMotion.ask(StepAsk( + anchor = from, side = StepSide.Left, accent = pal.signal, pillCorner = 8.dp, items = SessionPrefs.STORES_SORTS.size, + onDismiss = {}, + handle = { Text(title, fontSize = 12.sp, fontWeight = FontWeight.SemiBold, color = pal.signal, maxLines = 1, overflow = TextOverflow.Ellipsis) }, + ) { + StepTitle(title) + StepList { + SessionPrefs.STORES_SORTS.forEachIndexed { i, sort -> + val label = when (sort) { + "lastPlayed" -> stringResource(R.string.stores_sort_last_played) + "recentlyInstalled" -> stringResource(R.string.stores_sort_recently_installed) + "titleAsc" -> stringResource(R.string.stores_sort_title_asc) + "titleDesc" -> stringResource(R.string.stores_sort_title_desc) + "sizeDesc" -> stringResource(R.string.stores_sort_size_desc) + "sizeAsc" -> stringResource(R.string.stores_sort_size_asc) + else -> stringResource(R.string.stores_sort_release_date) + } + StepChoice( + label, selected = sort == s.storesSort, enabled = open, + modifier = Modifier.fillMaxWidth().stepItem(i) + .then(if (sort == s.storesSort) Modifier.focusRequester(first) else Modifier), + ) { + a.onStoresSort(sort) + StoresMotion.fold() + } + } + } + }) + } + } +} + +@Composable +private fun ViewButton(s: FrontEndState, a: FrontEndActions) { + val list = s.storesView == "list" + HeaderIconButton( + if (list) stringResource(R.string.stores_view_cards) else stringResource(R.string.stores_view_list), + if (list) Icons.Filled.GridView else Icons.Filled.ViewList, + "view", + ) { a.onStoresView(if (list) "cards" else "list") } +} + +@Composable +private fun GameListRow( + item: CatalogItem, store: Store, installedKeys: Set<String>, onOpen: (String) -> Unit, + first: Boolean = false, navigation: Modifier = Modifier, +) { + val colors = MaterialTheme.colorScheme + val pal = LocalPalette.current + val src = remember { MutableInteractionSource() } + val hot = rememberHot(src) + val installed = item.id in installedKeys + val download = StoresState.download("${store.id}:${item.id}")?.takeIf { it.isActive } + if (installed) { + val ctx = LocalContext.current + val game = StoresState.installedGame(store, item.id) + if (game != null) androidx.compose.runtime.LaunchedEffect(item.key) { com.droiddeck.launcher.stores.StoreSizes.requestDisk(ctx, item.key, game) } + } + val placed = remember { arrayOfNulls<androidx.compose.ui.layout.LayoutCoordinates>(1) } + val corner = with(androidx.compose.ui.platform.LocalDensity.current) { 10.dp.toPx() } + val open = { + placed[0]?.takeIf { it.isAttached }?.let { StoresMotion.markCard(CardMark(item.key, it.boundsInRoot(), corner, item.imageUrl ?: item.tallImageUrl)) } + onOpen(item.key) + } + val meta = listOfNotNull( + item.developer.takeIf { it.isNotBlank() }, + item.releaseDate.take(4).takeIf { it.length == 4 }, + when { + installed -> { + val bytes = com.droiddeck.launcher.stores.StoreSizes.onDisk[item.key] + ?: com.droiddeck.launcher.stores.StoreSizes.size(item).takeIf { it > 0 } ?: 0L + formatBytes(bytes).takeIf { it.isNotEmpty() } + } + item.isFree -> stringResource(R.string.stores_free) + item.isDiscounted -> "-${item.discountPercent}%" + item.hasPrice -> item.finalPrice.takeIf { it.isNotBlank() } + else -> null + }, + ) + Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp), + modifier = Modifier.fillMaxWidth().heightIn(min = 64.dp).then(navigation).paneItem("card:${item.key}") + .then(if (first) Modifier.firstTile() else Modifier) + .clip(RoundedCornerShape(10.dp)).glideBorder(hot, RoundedCornerShape(10.dp), pal.signal, pal.line) + .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, onClick = open).controllerConfirm(onClick = open) + .padding(horizontal = 10.dp, vertical = 8.dp), + ) { + CardArt(item, Modifier.width(96.dp).height(54.dp).clip(RoundedCornerShape(8.dp))) + Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) { + Text(item.title, fontSize = 14.sp, fontWeight = FontWeight.Bold, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) + Text(meta.joinToString(" · "), fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis) + } + if (installed) Icon(Icons.Filled.Check, stringResource(R.string.stores_installed_chip), tint = pal.good, modifier = Modifier.size(16.dp)) + else if (download != null) Text("${download.percent}%", fontSize = 11.sp, fontWeight = FontWeight.Bold, color = pal.signal, maxLines = 1) + } +} + @Composable private fun SignOutButton(store: Store, name: String) { val ctx = LocalContext.current @@ -1015,7 +1193,6 @@ private fun SignOutButton(store: Store, name: String) { } } -/** The header's magnifier: a round button the search field opens out of. */ @Composable internal fun SearchIcon(description: String, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme @@ -1031,7 +1208,6 @@ internal fun SearchIcon(description: String, onClick: () -> Unit) { ) { Icon(Icons.Filled.Search, description, tint = if (hot) pal.signal else colors.onSurfaceVariant, modifier = Modifier.size(20.dp)) } } -/** A horizontal row of cards under a title; nothing at all when the list is empty or not here yet. */ @Composable private fun Shelf(title: String, items: List<CatalogItem>?, card: @Composable (CatalogItem) -> Unit) { if (items.isNullOrEmpty()) return @@ -1042,7 +1218,6 @@ private fun Shelf(title: String, items: List<CatalogItem>?, card: @Composable (C } } -/** Only visible cards (and the grid's prefetch) compose; [empty] spans the row when there are none. */ private fun LazyGridScope.storeGrid(games: List<CatalogItem>, empty: String, card: @Composable (CatalogItem) -> Unit) { if (games.isEmpty()) item(key = "empty", span = { GridItemSpan(maxLineSpan) }) { Box(Modifier.padding(vertical = 32.dp).fillMaxWidth(), contentAlignment = Alignment.Center) { @@ -1052,21 +1227,10 @@ private fun LazyGridScope.storeGrid(games: List<CatalogItem>, empty: String, car else items(games, key = { it.key }, contentType = { "game" }) { card(it) } } -/** - * A card's least width: shelf cards are this wide and a grid fits as many columns as the width - * allows at it (the columns then share the leftover), so a display-density setting changes the - * column count rather than the cards' size. 25% under the first 150 dp: five columns where there - * were four on the Pocket FIT. - */ private val CardWidth = 112.dp -/** - * One title: its wide art, the title, a price or status line and one button that says the one - * thing to do next - Install with its size, Play, the download's progress, Get for free, or View - * on the store. Tapping the card itself opens the game's page. - */ @Composable -private fun GameCard(item: CatalogItem, store: Store, s: FrontEndState, a: FrontEndActions, installedKeys: Set<String>, onOpen: (String) -> Unit, first: Boolean = false) { +private fun GameCard(item: CatalogItem, store: Store, s: FrontEndState, a: FrontEndActions, installedKeys: Set<String>, onOpen: (String) -> Unit, first: Boolean = false, navigation: Modifier = Modifier) { val ctx = LocalContext.current val colors = MaterialTheme.colorScheme val pal = LocalPalette.current @@ -1076,14 +1240,12 @@ private fun GameCard(item: CatalogItem, store: Store, s: FrontEndState, a: Front val scale by animateFloatAsState(if (pressed) 0.985f else 1f, Motion.sp(0.5f, Spring.StiffnessMedium), label = "cardScale") val installed = item.id in installedKeys val download = StoresState.download("${store.id}:${item.id}")?.takeIf { it.isActive } - // Where it sits, so the game page can flood out of it (and draw back into it). val placed = remember { arrayOfNulls<androidx.compose.ui.layout.LayoutCoordinates>(1) } val corner = with(androidx.compose.ui.platform.LocalDensity.current) { 10.dp.toPx() } val open = { placed[0]?.takeIf { it.isAttached }?.let { StoresMotion.markCard(CardMark(item.key, it.boundsInRoot(), corner, item.imageUrl ?: item.tallImageUrl)) } onOpen(item.key) } - // A size the library did not give is looked up once the card is on screen or close to it. val screen = with(androidx.compose.ui.platform.LocalDensity.current) { androidx.compose.ui.platform.LocalConfiguration.current.screenHeightDp.dp.toPx() } val ahead = screen / 2 Column( @@ -1095,7 +1257,7 @@ private fun GameCard(item: CatalogItem, store: Store, s: FrontEndState, a: Front if (b.bottom > -ahead && b.top < screen + ahead && b.width > 0f) com.droiddeck.launcher.stores.StoreSizes.request(ctx, item) } } - .paneItem("card:${item.key}").then(if (first) Modifier.firstTile() else Modifier).graphicsLayer { scaleX = scale; scaleY = scale } + .then(navigation).paneItem("card:${item.key}").then(if (first) Modifier.firstTile() else Modifier).graphicsLayer { scaleX = scale; scaleY = scale } .clip(RoundedCornerShape(10.dp)).glideBorder(hot, RoundedCornerShape(10.dp), pal.signal, pal.line) .hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, onClick = open).controllerConfirm(onClick = open), ) { @@ -1103,7 +1265,6 @@ private fun GameCard(item: CatalogItem, store: Store, s: FrontEndState, a: Front } } -/** A store's sync as a thin bar and its count ("25/55"); a moving bar when it has no count yet. */ @Composable private fun SyncBar(line: String) { val count = Regex("(\\d+)\\s*/\\s*(\\d+)").find(line) @@ -1118,14 +1279,8 @@ private fun SyncBar(line: String) { } } -/** How tall the card's one line is, over the blurred foot of its art. */ private val CardStrip = 26.dp -/** - * The card is its art: sharp above, and under the one line a blurred, darkened copy of the same - * picture, placed so the two meet without a seam. Blur needs API 31; below it the copy is only - * darkened, more strongly. - */ @OptIn(androidx.compose.foundation.ExperimentalFoundationApi::class) @Composable private fun CardFace(item: CatalogItem, download: com.droiddeck.launcher.stores.download.DownloadEntry?, hot: Boolean, marker: @Composable () -> Unit) { @@ -1145,7 +1300,6 @@ private fun CardFace(item: CatalogItem, download: com.droiddeck.launcher.stores. verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp), modifier = Modifier.matchParentSize().padding(horizontal = 8.dp), ) { - // A title too long for the strip scrolls through while the card has focus. Text( item.title, fontSize = 11.sp, fontWeight = FontWeight.Bold, color = Color.White, maxLines = 1, overflow = if (hot) TextOverflow.Clip else TextOverflow.Ellipsis, @@ -1154,7 +1308,6 @@ private fun CardFace(item: CatalogItem, download: com.droiddeck.launcher.stores. marker() } } - // A soft edge where the sharp art meets the strip. Spacer(Modifier.align(Alignment.BottomCenter).padding(bottom = CardStrip).fillMaxWidth().height(14.dp).background(Brush.verticalGradient(0f to Color.Transparent, 1f to Color.Black.copy(alpha = 0.35f)))) if (download != null) Box(Modifier.align(Alignment.BottomCenter).padding(start = 6.dp, end = 6.dp, bottom = CardStrip + 5.dp)) { ProgressBarThin(download.fraction, paused = download.state == DownloadState.PAUSED, verify = download.stage == DownloadStage.VERIFY) @@ -1163,14 +1316,12 @@ private fun CardFace(item: CatalogItem, download: com.droiddeck.launcher.stores. } } -/** The card's right-hand value: done, resume, progress, size, or the price. */ @Composable private fun CardMarker(item: CatalogItem, installed: Boolean, download: com.droiddeck.launcher.stores.download.DownloadEntry?) { val colors = MaterialTheme.colorScheme val pal = LocalPalette.current val small = 10.sp when { - // Installed: its size on disk and a small check after it. installed -> Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(3.dp)) { val ctx = LocalContext.current val game = StoresState.installedGame(item.store, item.id) @@ -1180,7 +1331,6 @@ private fun CardMarker(item: CatalogItem, installed: Boolean, download: com.droi } download != null -> Text("${download.percent}%", fontSize = small, fontWeight = FontWeight.Bold, color = pal.signal, maxLines = 1) item.owned && StoresState.isUnfinished(item) -> Text(stringResource(R.string.stores_resume), fontSize = small, fontWeight = FontWeight.Bold, color = pal.signal, maxLines = 1) - // The size in the title's own type; nothing until it is known. item.owned -> com.droiddeck.launcher.stores.StoreSizes.size(item).takeIf { it > 0 }?.let { Text(formatBytes(it), fontSize = 11.sp, fontWeight = FontWeight.Bold, color = Color.White, maxLines = 1) } item.isFree -> Text(stringResource(R.string.stores_free), fontSize = small, fontWeight = FontWeight.Bold, color = pal.good, maxLines = 1) item.isDiscounted -> Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) { @@ -1195,8 +1345,6 @@ private fun CardMarker(item: CatalogItem, installed: Boolean, download: com.droi internal fun CardArt(item: CatalogItem, modifier: Modifier) { val url = item.imageUrl ?: item.tallImageUrl val colors = MaterialTheme.colorScheme - // A dark ground under the image, so art with transparency never ends in white, and a quiet - // fade into the card's surface at the foot. Box(modifier.background(colors.surfaceVariant).then(if (url == null) Modifier.background(artBrush(hueOf(item.title))) else Modifier)) { if (url != null) AsyncImage(model = url, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.matchParentSize()) else Text(item.title, fontSize = 10.sp, fontWeight = FontWeight.Black, color = Color.White, maxLines = 3, overflow = TextOverflow.Ellipsis, modifier = Modifier.align(Alignment.BottomStart).padding(6.dp)) @@ -1209,8 +1357,6 @@ internal fun ProgressBarThin(fraction: Float, paused: Boolean = false, verify: B val pal = LocalPalette.current val colors = MaterialTheme.colorScheme val fill = when { done -> pal.good; paused -> Color(0xFFFFC24D); verify -> Color(0xFF9B6DFF); else -> pal.signal } - // The fill glides to each new value over a quarter second - progress arrives a few times a second - // and in steps - and is read only while drawing, so the bar animates without relayout. val shown = androidx.compose.animation.core.animateFloatAsState( fraction.coerceIn(0f, 1f), androidx.compose.animation.core.tween(250, easing = androidx.compose.animation.core.LinearEasing), label = "bar", ) @@ -1227,7 +1373,6 @@ internal fun downloadLabel(d: com.droiddeck.launcher.stores.download.DownloadEnt else -> if (d.stageFraction >= 0f) stringResource(R.string.stores_dl_active_percent, activeStageLabel(d), d.percent) else activeStageLabel(d) } -/** The active stage as the row and the page name it: Checking (files already there), Downloading, Verifying, Installing. */ @Composable internal fun activeStageLabel(d: com.droiddeck.launcher.stores.download.DownloadEntry): String = when (d.stage) { DownloadStage.MANIFEST -> if (d.stageItemsTotal > 0) stringResource(R.string.stores_stage_checking) else stringResource(R.string.stores_stage_manifest) @@ -1237,7 +1382,6 @@ internal fun activeStageLabel(d: com.droiddeck.launcher.stores.download.Download DownloadStage.DONE -> stringResource(R.string.stores_stage_done) } -/** Two taps: the first arms it ([confirm] shows), the second acts; it disarms itself after a few seconds. */ @Composable internal fun ConfirmButton(label: String, confirm: String, compact: Boolean = false, onConfirm: () -> Unit) { var armed by remember { mutableStateOf(false) } @@ -1254,16 +1398,13 @@ internal fun stageLabel(stage: DownloadStage): String = when (stage) { DownloadStage.DONE -> stringResource(R.string.stores_stage_done) } -/** The game's web page, in the device's browser: this app buys nothing and claims nothing itself. */ -internal fun openStoreUrl(ctx: android.content.Context, item: CatalogItem) { - val url = item.storeUrl.ifBlank { return } +internal fun openStoreUrl(ctx: android.content.Context, item: CatalogItem) = openUrl(ctx, item.storeUrl) + +internal fun openUrl(ctx: android.content.Context, url: String) { + if (url.isBlank()) return runCatching { ctx.startActivity(android.content.Intent(android.content.Intent.ACTION_VIEW, android.net.Uri.parse(url)).addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK)) } } -/** - * Launches an installed store game the way the Games tab does: through its Steam shortcut. The - * shortcut exists once the client has (re)started since the install; until then the user is told. - */ internal fun launchStoreGame(ctx: android.content.Context, store: Store, id: String, s: FrontEndState, a: FrontEndActions) { val game = s.steamGames.firstOrNull { it.source == store.id && it.storeId == id } if (game == null) { diff --git a/app/src/main/java/com/droiddeck/launcher/ui/StoresWidgets.kt b/app/src/main/java/com/droiddeck/launcher/ui/StoresWidgets.kt index b6d15dc61c..c2580a3291 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/StoresWidgets.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/StoresWidgets.kt @@ -5,15 +5,13 @@ import androidx.compose.ui.res.stringResource import com.droiddeck.launcher.R import com.droiddeck.launcher.stores.StoresNative -// Controls the Stores section and its Setup group share. -/** Whether the native download engine is in this build, said where the stores are turned on. */ @Composable internal fun StoresEngineRow() { val version = StoresNative.version SettingsRow( stringResource(R.string.setup_stores_engine), - version, + null, ) { Chip(if (version != null) stringResource(R.string.setup_stores_engine_chip_ready) else stringResource(R.string.setup_stores_engine_chip_missing), ok = version != null) } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/TestTags.kt b/app/src/main/java/com/droiddeck/launcher/ui/TestTags.kt index 12c5ee390a..4e69a22649 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/TestTags.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/TestTags.kt @@ -5,10 +5,5 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.semantics.semantics import androidx.compose.ui.semantics.testTagsAsResourceId -/** - * Compose test tags as Android resource ids below this node, so UI Automator (`uiautomator dump`, - * droiddeckctl ui-dump) sees stable ids such as `rail-steam` or `setting-logs` rather than only - * labels that change with the language. Tags are named in docs/agent-control.md. - */ @OptIn(ExperimentalComposeUiApi::class) fun Modifier.exposeTestTags(): Modifier = semantics { testTagsAsResourceId = true } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/Theme.kt b/app/src/main/java/com/droiddeck/launcher/ui/Theme.kt index a7c62ac737..86980362f4 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/Theme.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/Theme.kt @@ -42,7 +42,7 @@ object Themes { PAPER, R.string.theme_paper, R.string.theme_paper_detail, background = Color(0xFF000000), surface = Color(0xFF0F0F10), surfaceVariant = Color(0xFF191A1C), line = Color(0xFF262729), line2 = Color(0xFF343638), onBackground = Color(0xFFF9F9F9), onSurfaceVariant = Color(0xFF8E9196), - primary = Color(0xFFF9F9F9), primary2 = Color(0xFFD9DADD), onPrimary = Color(0xFF000000), signal = Color(0xFF136CE0), + primary = Color(0xFFF9F9F9), primary2 = Color(0xFFD9DADD), onPrimary = Color(0xFF000000), signal = Color(0xFFF9F9F9), good = Color(0xFF4CD37F), ), Palette( @@ -66,10 +66,6 @@ object Themes { val LocalPalette = staticCompositionLocalOf { Themes.byId(Themes.GRAPHITE) } -/** - * Text and icons drawn on a [Palette.signal] fill: near-black where the blue is light enough that - * white would not read (Graphite's #1A9FFF gives white 2.8:1), white where it is deep. - */ val Palette.onSignal: Color get() = if (signal.luminance() > 0.18f) Color(0xFF03111F) else Color.White @Composable diff --git a/app/src/main/java/com/droiddeck/launcher/ui/Throbber.kt b/app/src/main/java/com/droiddeck/launcher/ui/Throbber.kt index c08188bd8f..9e77f15047 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/Throbber.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/Throbber.kt @@ -20,17 +20,12 @@ import kotlin.math.cos import kotlin.math.sin import kotlin.math.sqrt -/** - * The DroidDeck mark as the loading indicator. Every loop the D's square half bends into an arc, - * the ring they make turns once around the ball, and the half straightens back into the D. - */ @Composable internal fun LogoThrobber(modifier: Modifier = Modifier, running: Boolean = true) { val ink = MaterialTheme.colorScheme.onBackground val ball = LocalPalette.current.signal val loop = rememberInfiniteTransition(label = "throbber") .animateFloat(0f, 1f, infiniteRepeatable(tween(LOOP_MS, easing = LinearEasing)), label = "loop") - // Animations off in the system settings, or nothing running: the plain D. val still = !running || Motion.scale == 0f val left = remember { Path() } val right = remember { Path() } @@ -64,7 +59,6 @@ internal fun LogoThrobber(modifier: Modifier = Modifier, running: Boolean = true } } -/** The ball of a throbber laid out in [bounds]: its centre and its radius, at rest. */ internal fun throbberBall(bounds: androidx.compose.ui.geometry.Rect): Pair<Offset, Float> { val s = bounds.width / LogoShape.WIDTH return Offset(bounds.left + (LogoShape.CX - LogoShape.LEFT) * s, bounds.top + LogoShape.CY * s) to LogoShape.BALL * s @@ -74,12 +68,6 @@ private const val LOOP_MS = 1900 private val Settle = CubicBezierEasing(0.5f, 0f, 0.3f, 1f) private val Turn = CubicBezierEasing(0.65f, 0f, 0.35f, 1f) -/** - * The logo's geometry in its SVG's own units (viewBox -55.98 0 239.92 223.72): a D of a square - * left side and a round right side, cut by a ring around the ball and split top and bottom. - * The left half is sampled along rays from the centre so it can bend, point for point, into the - * mirror of the right half's arc. - */ internal object LogoShape { const val LEFT = -55.98f const val WIDTH = 239.92f @@ -97,7 +85,6 @@ internal object LogoShape { private fun at(a: Double, r: Float) = Pt((CX + r * cos(a)).toFloat(), (CY + r * sin(a)).toFloat()) private fun angle(x: Float, y: Float) = atan2((y - CY).toDouble(), (x - CX).toDouble()) - // Angles taken the long way round, through the left: from about -94 degrees down to -266. private fun leftward(a: Double) = if (a < 0) a else a - 2 * Math.PI private val rays: List<Double> = run { @@ -105,7 +92,6 @@ internal object LogoShape { val topCorner = angle(SQUARE_X, 0f) val bottomCorner = leftward(angle(SQUARE_X, HEIGHT)) val bottom = leftward(angle(SPLIT_LEFT, HEIGHT)) - // The corners are rays of their own, so the square half keeps sharp corners. fun span(a: Double, b: Double, n: Int) = List(n) { i -> a + (b - a) * i / (n - 1) } span(top, topCorner, 9).dropLast(1) + span(topCorner, bottomCorner, 25).dropLast(1) + span(bottomCorner, bottom, 9) } @@ -148,7 +134,6 @@ internal object LogoShape { List(40) { i -> at(innerFrom + (innerTo - innerFrom) * i / 39, INNER) } } - /** The left half, [bend] of the way from the square D side (0) to the arc (1). */ fun left(path: Path, bend: Float, px: (Float, Float) -> Offset) { path.reset() square.forEachIndexed { i, q -> diff --git a/app/src/main/java/com/droiddeck/launcher/ui/TrackingRecoveryView.kt b/app/src/main/java/com/droiddeck/launcher/ui/TrackingRecoveryView.kt new file mode 100644 index 0000000000..44c53a670c --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/TrackingRecoveryView.kt @@ -0,0 +1,84 @@ +package com.droiddeck.launcher.ui + +import android.content.Context +import android.graphics.Canvas +import android.graphics.Paint +import android.graphics.Typeface +import android.text.Layout +import android.text.StaticLayout +import android.text.TextPaint +import android.view.View +import androidx.compose.ui.graphics.toArgb +import com.droiddeck.launcher.R +import com.droiddeck.launcher.glasses.TrackingRecovery +import com.droiddeck.launcher.session.SessionPrefs + +internal class TrackingRecoveryView(context: Context) : View(context) { + private var recovery: TrackingRecovery? = null + private var stereo = false + private var palette = Themes.byId(SessionPrefs.theme(context)) + private val paint = Paint(Paint.ANTI_ALIAS_FLAG) + private var blocks = emptyList<StaticLayout>() + + init { + visibility = GONE + isClickable = true + importantForAccessibility = IMPORTANT_FOR_ACCESSIBILITY_YES + } + + fun update(state: TrackingRecovery?, stereo: Boolean, palette: Palette = Themes.byId(SessionPrefs.theme(context))) { + if (recovery == state && this.stereo == stereo && this.palette == palette) return + recovery = state + this.stereo = stereo + this.palette = palette + visibility = if (state == null) GONE else VISIBLE + blocks = state?.let { + val (title, body, help) = when (it) { + TrackingRecovery.DISCONNECTED -> Triple(R.string.tracking_recovery_disconnected, R.string.tracking_recovery_connect, R.string.tracking_recovery_usb_help) + TrackingRecovery.LOST -> Triple(R.string.tracking_recovery_lost, R.string.tracking_recovery_look, R.string.tracking_recovery_restart_help) + TrackingRecovery.RECENTER -> Triple(R.string.tracking_recovery_recenter, R.string.tracking_recovery_recenter_steps, R.string.tracking_recovery_recenter_help) + TrackingRecovery.STABILIZING -> Triple(R.string.tracking_recovery_stabilizing, R.string.tracking_recovery_hold, R.string.tracking_recovery_automatic) + } + val text = listOf(context.getString(R.string.glasses_head_tracking), context.getString(title), context.getString(body), context.getString(help)) + contentDescription = text.joinToString(". ") + text.mapIndexed { index, value -> + val ink = TextPaint(Paint.ANTI_ALIAS_FLAG).apply { + textSize = floatArrayOf(16f, 38f, 24f, 19f)[index] + color = (when (index) { 0 -> palette.primary; 3 -> palette.onSurfaceVariant; else -> palette.onBackground }).toArgb() + typeface = if (index < 2) Typeface.create("sans-serif-medium", Typeface.NORMAL) else Typeface.create("sans-serif", Typeface.NORMAL) + } + StaticLayout.Builder.obtain(value, 0, value.length, ink, 660) + .setAlignment(Layout.Alignment.ALIGN_NORMAL).setIncludePad(false).setLineSpacing(4f, 1f).build() + } + } ?: emptyList() + if (state == null) contentDescription = null + invalidate() + } + + override fun onDraw(canvas: Canvas) { + super.onDraw(canvas) + if (recovery == null) return + canvas.drawColor(palette.background.toArgb()) + val eyes = if (stereo) 2 else 1 + val eyeWidth = width.toFloat() / eyes + val gaps = floatArrayOf(14f, 24f, 32f, 0f) + val cardHeight = blocks.sumOf { it.height } + gaps.sum() + 80f + val scale = minOf(eyeWidth / 860f, height / (cardHeight + 120f)) + repeat(eyes) { eye -> + val saved = canvas.save() + canvas.clipRect(eye * eyeWidth, 0f, (eye + 1) * eyeWidth, height.toFloat()) + canvas.translate(eye * eyeWidth + (eyeWidth - 740f * scale) / 2f, (height - cardHeight * scale) / 2f) + canvas.scale(scale, scale) + paint.style = Paint.Style.FILL; paint.color = palette.surface.toArgb() + canvas.drawRoundRect(0f, 0f, 740f, cardHeight, 24f, 24f, paint) + paint.style = Paint.Style.STROKE; paint.strokeWidth = 1.5f; paint.color = palette.line.toArgb() + canvas.drawRoundRect(0f, 0f, 740f, cardHeight, 24f, 24f, paint) + canvas.translate(40f, 40f) + blocks.forEachIndexed { index, block -> + block.draw(canvas) + canvas.translate(0f, block.height + gaps[index]) + } + canvas.restoreToCount(saved) + } + } +} diff --git a/app/src/main/java/com/droiddeck/launcher/ui/UpdatesPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/UpdatesPage.kt index ff66133652..a44f5ca19e 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/UpdatesPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/UpdatesPage.kt @@ -68,16 +68,13 @@ import com.droiddeck.launcher.update.AppUpdates.Follow import com.droiddeck.launcher.update.AppUpdates.Offer import com.droiddeck.launcher.update.AppUpdates.Release -/** The Updates page: the latest build of each channel, the one followed, and an update in progress. */ class UpdatesState( val catalog: AppUpdates.Catalog? = null, val follow: Follow = Follow(Channel.STABLE), val checking: Boolean = false, val error: String? = null, - /** "Downloading", "Installing", ... while an update is under way; [percent] is -1 when unknown. */ val stage: String? = null, val percent: Int = -1, - /** Explain "Install unknown apps" before sending the user to it. */ val askPermission: Boolean = false, ) { val hasUpdate: Boolean get() = AppUpdates.hasUpdate(catalog, follow) @@ -99,14 +96,11 @@ internal fun UpdatesPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie val colors = MaterialTheme.colorScheme Column(modifier = modifier) { PageHeader(stringResource(R.string.upd_title)) { - // The build that is running, beside the title where it is always in view. Text( stringResource(R.string.upd_build, me.version, s.buildLabel), fontSize = 12.5.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f).padding(top = 6.dp), ) val checked = u.catalog?.checkedAt?.takeIf { it > 0 } - // The relative time comes capitalized to stand alone (Spanish "Hace 5 minutos"); here it - // ends a sentence. if (!LocalNarrowPane.current) Text( if (u.checking) stringResource(R.string.common_checking) else if (checked != null) stringResource(R.string.upd_checked, ago(checked).replaceFirstChar { it.lowercase() }) else stringResource(R.string.upd_not_checked), fontSize = 13.sp, color = colors.onSurfaceVariant, @@ -114,9 +108,6 @@ internal fun UpdatesPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie ToolIcon(Icons.Outlined.Refresh, stringResource(R.string.store_check_updates), busy = u.checking, enabled = !u.checking && u.stage == null, onClick = ua.onCheck) } BoxWithConstraints(Modifier.weight(1f).fillMaxWidth()) { - // Landscape has the width for channels and status side by side; a narrow pane, or a small - // phone's (where each channel's name and date would be cut to a word), stacks them. The - // Thor's top screen leaves about 690dp here and keeps them side by side. val stacked = LocalNarrowPane.current || maxWidth < 600.dp Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(bottom = 8.dp)) { if (stacked) { @@ -125,7 +116,6 @@ internal fun UpdatesPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie ChannelLabel() ChannelPicker(u, ua) } else { - // The label sits over both columns, so the status card lines up with the first channel. ChannelLabel() Row(horizontalArrangement = Arrangement.spacedBy(18.dp)) { Box(Modifier.weight(1f)) { ChannelPicker(u, ua) } @@ -148,7 +138,6 @@ internal fun UpdatesPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie ) } -/** Where things stand, as a system updater says it: a status line, what you'd get, and one button. */ @Composable private fun StatusPanel(s: FrontEndState, u: UpdatesState, ua: UpdatesActions, me: AppUpdates.Installed) { val colors = MaterialTheme.colorScheme @@ -216,7 +205,6 @@ private fun StatusPanel(s: FrontEndState, u: UpdatesState, ua: UpdatesActions, m } } -/** The change and its notes, two lines each; More opens the rest when either is cut short. */ @Composable private fun ReleaseNotes(title: String, notes: String, key: String) { val colors = MaterialTheme.colorScheme @@ -246,7 +234,6 @@ private fun ReleaseNotes(title: String, notes: String, key: String) { } } -/** The headline for a build on offer: "DroidDeck 0.3.0", "New Preview build", "PR #93 test build". */ @Composable private fun newBuild(f: Follow, r: Release) = when (f.channel) { Channel.STABLE -> stringResource(R.string.upd_new_stable, r.version ?: r.tag) @@ -254,14 +241,12 @@ private fun newBuild(f: Follow, r: Release) = when (f.channel) { Channel.TEST -> stringResource(R.string.upd_new_test, r.pr) } -/** A PR title as a sentence: "fix(steam): keep the client alive" -> "Keep the client alive". */ private fun changeTitle(t: String): String = t.replace(Regex("""^[a-z]+(\([^)]*\))?!?:\s*"""), "").replaceFirstChar { it.uppercase() } @Composable private fun megabytes(bytes: Long) = stringResource(R.string.upd_mb, ((bytes + 524_288) / 1_048_576).toInt()) -/** The three channels as cards to pick from; Test builds opens its list of PRs under it. */ @Composable private fun ChannelLabel() { Text( @@ -297,7 +282,6 @@ private fun ChannelPicker(u: UpdatesState, ua: UpdatesActions) { } } -/** Read-only Preview history below the status card action; only the latest build is installable. */ @Composable private fun PreviewHistory(catalog: AppUpdates.Catalog?, me: AppUpdates.Installed) { val history = catalog?.let { AppUpdates.previewHistory(it, me) } ?: return @@ -363,8 +347,6 @@ private fun ChannelCard( val pal = LocalPalette.current val src = remember { MutableInteractionSource() } val hot = rememberHot(src) - // Focus shows at once, as on the Components page: no ripple, no fade. Selection is the radio - // dot, never a ring of its own: the ring is only ever focus. val fill = if (hot) pal.signal.copy(alpha = 0.14f) else Color.Transparent Row( verticalAlignment = Alignment.CenterVertically, @@ -391,7 +373,6 @@ private fun ChannelCard( } } -/** The one mark of a chosen option: a filled dot in a ring, beside it. */ @Composable private fun RadioDot(selected: Boolean, size: androidx.compose.ui.unit.Dp = 22.dp) { val pal = LocalPalette.current @@ -400,7 +381,6 @@ private fun RadioDot(selected: Boolean, size: androidx.compose.ui.unit.Dp = 22.d } } -/** One test build under Test builds: its PR, what it fixes, and how fresh it is. */ @Composable private fun TestRow(t: Release, selected: Boolean, onClick: () -> Unit) { val colors = MaterialTheme.colorScheme diff --git a/app/src/main/java/com/droiddeck/launcher/ui/VrHeadsetIcon.kt b/app/src/main/java/com/droiddeck/launcher/ui/VrHeadsetIcon.kt new file mode 100644 index 0000000000..4a2c7737c8 --- /dev/null +++ b/app/src/main/java/com/droiddeck/launcher/ui/VrHeadsetIcon.kt @@ -0,0 +1,17 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.StrokeJoin +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.addPathNodes +import androidx.compose.ui.unit.dp + +internal val VrHeadsetIcon: ImageVector = ImageVector.Builder("VrHeadset", 24.dp, 24.dp, 24f, 24f).apply { + for (d in listOf( + "M5,8H19A3,3 0 0 1 22,11V15A3,3 0 0 1 19,18H15.6L14.1,15.6A2.4,2.4 0 0 0 9.9,15.6L8.4,18H5A3,3 0 0 1 2,15V11A3,3 0 0 1 5,8Z", + "M7,8V6.5A1.5,1.5 0 0 1 8.5,5H15.5A1.5,1.5 0 0 1 17,6.5V8", + )) addPath(addPathNodes(d), stroke = SolidColor(Color.Black), strokeLineWidth = 1.8f, + strokeLineCap = StrokeCap.Round, strokeLineJoin = StrokeJoin.Round) +}.build() diff --git a/app/src/main/java/com/droiddeck/launcher/ui/WinComponentsEditor.kt b/app/src/main/java/com/droiddeck/launcher/ui/WinComponentsEditor.kt index bfd227952f..155c6e9b27 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/WinComponentsEditor.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/WinComponentsEditor.kt @@ -52,15 +52,9 @@ import androidx.compose.runtime.withFrameNanos import kotlinx.coroutines.withContext import java.io.File -// Windows components for one added game, Bannerlator's list: what the game's folder suggests first, -// then everything that installs here, then the ones that need a Windows installer (not yet). Each -// one is a switch, downloaded the first time it is turned on for any game; the launch puts the -// picked ones into the game's prefix (droiddeck-wincomponents). -/** Bannerlator's detector names installers; here the DLL-copy twin is the one that installs. */ private fun installable(name: String, all: Map<String, WinComponents.Component>): String = WinComponents.installable(name, all) -/** A store as a list's owner names it in a reason line. */ @Composable private fun originName(origin: String): String = stringResource( when (origin) { @@ -71,7 +65,6 @@ private fun originName(origin: String): String = stringResource( }, ) -/** Why a component was turned on by itself, from [WinComponents.AutoReason] (args: what the list called it, then the origin's own). */ @Composable private fun autoReason(r: WinComponents.AutoReason): String = when (r.kind) { WinCompSources.Origin.STEAM.name -> stringResource(R.string.wincomp_auto_steam, r.args.getOrElse(1) { "" }, r.args.getOrElse(2) { "" }, r.args.getOrElse(3) { "" }) @@ -81,7 +74,6 @@ private fun autoReason(r: WinComponents.AutoReason): String = when (r.kind) { else -> "" } -/** The reason line of a finding that is only recommended. */ @Composable private fun findingReason(f: WinCompSources.Finding): String = when (f.origin) { WinCompSources.Origin.FOLDER -> stringResource( @@ -96,9 +88,7 @@ private fun findingReason(f: WinCompSources.Finding): String = when (f.origin) { @Composable internal fun WinComponentsDialog( appKey: String, gameName: String, gameDir: File?, byPad: Boolean, - /** compatdata/<id>: what the prefix already has. [steamAppId]: a Steam title, whose appmanifest lists Steam's own redists. */ compat: File? = null, steamAppId: Int? = null, - /** The game as the Games tab has it: its source decides whose list is trusted ([WinCompSources]). */ game: com.droiddeck.launcher.frontend.Library.SteamGame? = null, onClose: () -> Unit, ) { @@ -106,33 +96,22 @@ internal fun WinComponentsDialog( val coroutine = rememberCoroutineScope() val shown = rememberShown(onClose) val close = { shown.targetState = false } - // null while the catalog loads; empty when it could not be had. var catalog by remember { mutableStateOf<Map<String, WinComponents.Component>?>(null) } var offline by remember { mutableStateOf(false) } var findings by remember { mutableStateOf(emptyList<WinCompSources.Finding>()) } - // Whether the game's list has been worked out at least once (kept from an earlier time counts). var findingsKnown by remember { mutableStateOf(game == null) } - // "Loading the components" only when the catalog takes a while. var slowCatalog by remember { mutableStateOf(false) } LaunchedEffect(Unit) { kotlinx.coroutines.delay(300); slowCatalog = true } var installed by remember { mutableStateOf(emptySet<String>()) } - // Detector names (oalinst, physx...) already in the prefix from elsewhere. var present by remember { mutableStateOf(emptySet<String>()) } var selection by remember { mutableStateOf(WinComponents.selection(context, appKey)) } val picks = selection.effective - // The row being worked on: its id, the latest progress (a dependency's while that installs - // first), and whether it is turning off rather than on. The row greys out and shows the bar - // the moment the switch is pressed, and only that row; the rest of the page stays as it is. var busyId by remember { mutableStateOf<String?>(null) } var progress by remember { mutableStateOf<WinComponents.Progress?>(null) } var reverting by remember { mutableStateOf(false) } var error by remember { mutableStateOf<String?>(null) } - // The component the error is about, so it shows on its own row and not only at the bottom. var failed by remember { mutableStateOf<String?>(null) } var showWaiting by remember { mutableStateOf(false) } - // Done holds focus while the list loads, then the top switch takes it - opened by touch or by - // pad, so the d-pad always has somewhere to start; LB and RB jump between the sections, since - // the full list runs past sixty switches. val recFocus = remember { FocusRequester() } val recFocusAfterAuto = remember { FocusRequester() } val activeFocus = remember { FocusRequester() } @@ -145,10 +124,7 @@ internal fun WinComponentsDialog( LaunchedEffect(Unit) { val (entries, found) = withContext(Dispatchers.IO) { val list = WinComponents.fetch(context) - // The source's list first (and what it turns on by itself, already installed), then the folder scan. if (game != null) { - // The list kept from last time, at once; it is worked out again (and its components - // queued) on the background worker, which this page then follows. com.droiddeck.launcher.frontend.AutoComponents.queueGame(context, game, asked = true) val kept = com.droiddeck.launcher.frontend.AutoComponents.cachedFindings(context, appKey) if (kept != null) findingsKnown = true @@ -166,11 +142,7 @@ internal fun WinComponentsDialog( present = withContext(Dispatchers.IO) { PrefixInstalledDetector.detect(compat) } installed = withContext(Dispatchers.IO) { WinComponents.installedIds(context).toSet() } } - /** The user's own switch for [id]: kept apart from what was turned on by itself, and over it. */ - // Automatic picks still downloading show on their rows; when one lands the page reads the picks again. val autoDownloading by com.droiddeck.launcher.frontend.AutoComponents.downloading.collectAsState() - // Without a network a component not downloaded yet cannot be turned on; the rows say so and - // come back the moment the network does. val online = rememberOnline() val autoChanges by com.droiddeck.launcher.frontend.AutoComponents.changes.collectAsState() val pendingGames by com.droiddeck.launcher.frontend.AutoComponents.pendingGames.collectAsState() @@ -186,14 +158,10 @@ internal fun WinComponentsDialog( coroutine.launch(Dispatchers.IO) { WinComponents.setUser(context, appKey, id, on) } } fun toggle(id: String, on: Boolean) { - // Switches stay enabled during a download - a disabled one drops the pad's focus - so a press - // then is ignored here; the busy row is greyed instead. if (busyId != null) return error = null failed = null if (!on) { - // Turning off is a saved pick, quick, but the row greys out until it is written so the - // press is seen to land; the files leave the prefix at the game's next launch. busyId = id; reverting = true; progress = null selection = WinComponents.Selection(selection.auto, selection.user + (id to false)) coroutine.launch { @@ -219,21 +187,12 @@ internal fun WinComponentsDialog( } val all = catalog - // The first data is in: rows that show up from now on ease in. var arrived by remember { mutableStateOf(false) } LaunchedEffect(all != null && findingsKnown) { if (all != null && findingsKnown) { withFrameNanos { }; arrived = true } } val here = if (all == null) emptySet() else present.map { installable(it, all) }.toSet() fun supportOf(id: String): Support = all?.get(id)?.let { WinComponents.support(it, all) } ?: if (id in installed) Support.READY else Support.UNSUPPORTED - // Turned on by itself for this game, each with its reason; then what is only recommended (the - // folder scan, a name match, an auto pick that cannot install here); then what the lists name - // that is no component here, by its own name. - // Still being worked out on the background worker: the page says so instead of "nothing found". - // Only before the game's list has ever been worked out: a list kept from before shows at once and - // is checked again quietly, its changes easing in. val checking = game != null && !findingsKnown - // Automatic picks on their way (queued or downloading) sit in their section already, with - // their progress, and settle there when they land. val turningOn = if (all == null) emptyMap() else findings.filter { it.auto && it.component != null } .associateBy { installable(it.component!!, all) } .filterKeys { it !in selection.auto && selection.user[it] != false && (it in pendingComponents || it in autoDownloading) } @@ -244,10 +203,6 @@ internal fun WinComponentsDialog( val suggestions = findings.filter { it.component == null }.distinctBy { it.origin to it.original } val ready = all.orEmpty().values.filter { WinComponents.support(it, all.orEmpty()) == Support.READY }.map { it.name } val extra = (installed + picks).filter { all?.containsKey(it) != true } - // What is turned on for this game gets its own section under the recommendations, which stay - // where they are; the rest of the list is everything else, so a component turned off goes back - // to its place in the alphabet. A component is listed once: the recommendations are left out - // of the full list too. val recSet = recIds.map { installable(it.component!!, all.orEmpty()) }.toSet() + autoIds val active = picks.filter { it !in recSet && (all?.containsKey(it) == true || it in installed) }.distinct() .sortedBy { WinComponentNames.of(it).lowercase() } @@ -263,12 +218,10 @@ internal fun WinComponentsDialog( runCatching { sections[section].requestFocus() } } LaunchedEffect(all != null) { - // The dialog's window starts in touch mode, where a switch cannot hold focus at all. inputMode.requestInputMode(InputMode.Keyboard) section = 0 val target = if (all == null) doneFocus else sections.first() switchFocused = false - // It animates in and the list composes over a few frames: ask until the switch has it. repeat(60) { withFrameNanos { } runCatching { target.requestFocus() } @@ -296,7 +249,6 @@ internal fun WinComponentsDialog( support == Support.UNSUPPORTED -> stringResource(R.string.wincomp_unsupported) else -> null } - // The catalog key stays in the detail: it is what a log or a bug report names. val detail = listOfNotNull(reason, c?.description?.takeIf { it.isNotEmpty() }, status, id).joinToString(" · ") val offlineHere = !online && id !in installed val usable = support == Support.READY && !offlineHere @@ -323,13 +275,11 @@ internal fun WinComponentsDialog( .onFocusChanged { if (it.isFocused) switchFocused = true }, ) { on -> toggle(id, on) } } - /** The section's requester goes to its first switch that can take focus. */ fun firstUsable(ids: List<String>, focus: FocusRequester): (String) -> FocusRequester? { val first = ids.firstOrNull { supportOf(it) == Support.READY } return { id -> focus.takeIf { id == first } } } - // The lists only once the catalog is in, faded in once: no half list counted before it. androidx.compose.animation.AnimatedVisibility( visible = all != null, enter = androidx.compose.animation.fadeIn(Motion.tw(220)), @@ -429,7 +379,6 @@ internal fun WinComponentsDialog( } } -/** Once the page has its first data ([arrived]), a row that shows up eases in; the first ones are simply there. */ @Composable private fun Arrive(arrived: Boolean, content: @Composable () -> Unit) { val state = remember { androidx.compose.animation.core.MutableTransitionState(!arrived) }.apply { targetState = true } @@ -442,7 +391,6 @@ private fun Arrive(arrived: Boolean, content: @Composable () -> Unit) { ) { content() } } -/** Whether the default network is there and validated, followed live. */ @Composable private fun rememberOnline(): Boolean { val context = LocalContext.current @@ -474,12 +422,6 @@ private fun Panel(content: @Composable androidx.compose.foundation.layout.Column private fun Divider() = Box(Modifier.fillMaxWidth().padding(horizontal = 14.dp).heightIn(min = 1.dp, max = 1.dp).background(LocalPalette.current.line)) -/** - * One component: name, detail and its switch; while [busy] the row is greyed and a thin bar runs - * across it with [caption] above (the download, then the install, each 0..100 as [percent], or - * indeterminate at -1). The switch stays enabled while busy so a pad's focus does not drop; the - * press is ignored by the caller instead. - */ @Composable private fun ComponentRow( name: String, detail: String, checked: Boolean, enabled: Boolean, dim: Boolean, busy: Boolean = false, diff --git a/app/src/main/java/com/droiddeck/launcher/ui/WirelessAdbFixPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/WirelessAdbFixPage.kt index f934ac8bad..8117c3ee5e 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/WirelessAdbFixPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/WirelessAdbFixPage.kt @@ -358,7 +358,6 @@ internal fun AdbTextField( onFocusChange: (Boolean) -> Unit = {}, onNext: (() -> Unit)? = null, onDone: (() -> Unit)? = null, - /** Takes focus (and the keyboard) once, as soon as it is shown: a field that opened on request. */ focusOnShow: Boolean = false, ) { val context = LocalContext.current diff --git a/app/src/main/java/com/droiddeck/launcher/ui/Wordmark.kt b/app/src/main/java/com/droiddeck/launcher/ui/Wordmark.kt index 48af1ea265..c0aefad254 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/Wordmark.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/Wordmark.kt @@ -17,10 +17,6 @@ import androidx.compose.ui.semantics.semantics import androidx.compose.ui.unit.Dp import com.droiddeck.launcher.R -/** - * The DroidDeck wordmark from the README banner (artwork/droiddeck-banner-*.svg): the mark - * standing in as the D, then "roidDeck". Letters and D in the theme's ink, the ball in its blue. - */ @Composable internal fun Wordmark(height: Dp, modifier: Modifier = Modifier) { val ink = MaterialTheme.colorScheme.onBackground @@ -34,7 +30,6 @@ internal fun Wordmark(height: Dp, modifier: Modifier = Modifier) { scale(k, k, Offset.Zero) { translate(-BOX_X, -BOX_Y) { drawPath(letters, ink) - // The mark's placement in the banner: translate(239.135 123.36) scale(0.527445) translate(31.98 0). translate(239.135f, 123.36f) { scale(MARK_SCALE, MARK_SCALE, Offset.Zero) { translate(31.98f, 0f) { @@ -49,7 +44,6 @@ internal fun Wordmark(height: Dp, modifier: Modifier = Modifier) { } } -// The banner's own units: the wordmark spans x 239.135..1040.7 and y 120.02..243.2. private const val BOX_X = 239.135f private const val BOX_Y = 120.02f private const val BOX_W = 1040.7f - 239.135f diff --git a/app/src/main/java/com/droiddeck/launcher/update/AppUpdates.kt b/app/src/main/java/com/droiddeck/launcher/update/AppUpdates.kt index fc6a4f02c1..222d308590 100644 --- a/app/src/main/java/com/droiddeck/launcher/update/AppUpdates.kt +++ b/app/src/main/java/com/droiddeck/launcher/update/AppUpdates.kt @@ -3,8 +3,10 @@ package com.droiddeck.launcher.update import android.content.Context import android.content.pm.PackageManager import android.os.Build +import android.util.Log import com.droiddeck.launcher.BuildConfig import com.droiddeck.launcher.R +import com.droiddeck.launcher.core.DownloadSource import org.json.JSONArray import org.json.JSONObject import java.io.IOException @@ -12,14 +14,8 @@ import java.net.HttpURLConnection import java.net.URL import java.security.MessageDigest -/** - * DroidDeck's published builds. CI turns GitHub Releases into one static catalog in DroidDeck-CI; - * the app consumes that contract instead of inferring channels from tags and release-note prose. - * - * [Channel.NIGHTLY] is intentionally kept as the internal enum/pref value for upgrades from older - * DroidDeck versions. The channel is presented to users as Preview. - */ object AppUpdates { + private const val TAG = "AppUpdates" private const val REPO = "Droid-Deck/DroidDeck" private const val CI_REPO = "Droid-Deck/DroidDeck-CI" private const val CATALOG_URL = "https://raw.githubusercontent.com/$CI_REPO/main/catalog.json" @@ -164,7 +160,6 @@ object AppUpdates { r.commit.startsWith(me.commit, ignoreCase = true) } - /** Recent Preview changes relative to a CI-installed commit, when its position is known. */ fun previewHistory(catalog: Catalog, me: Installed = installed()): PreviewHistory? { if (!me.ciBuild || catalog.recentPreviews.isEmpty()) return null val stable = catalog.stable @@ -195,14 +190,12 @@ object AppUpdates { (installed.length < 40 && published.startsWith(installed, ignoreCase = true)) } - /** Why Android cannot install this published build over [me], before downloading anything. */ fun installBlock(r: Release, me: Installed = installed()): InstallBlock? = when { r.apk == null -> InstallBlock(R.string.upd_block_no_apk) r.apk.versionCode < me.versionCode -> InstallBlock(R.string.upd_block_version_code, r.apk.versionCode, me.versionCode) else -> null } - /** Why Android would refuse a build, as a line for the user. */ class InstallBlock(@androidx.annotation.StringRes val text: Int, private vararg val args: Any) { fun message(context: Context): String = context.getString(text, *args) } @@ -222,7 +215,6 @@ object AppUpdates { } fun setFollow(context: Context, follow: Follow) { - // Keep "nightly" on disk so an older DroidDeck still understands the preference after rollback. val value = if (follow.channel == Channel.TEST) "test:${follow.pr}" else follow.channel.name.lowercase() prefs(context).edit().putString(KEY_CHANNEL, value).apply() @@ -245,11 +237,9 @@ object AppUpdates { return runCatching { readCachedCatalog(JSONObject(raw)) }.getOrNull() } - /** One static request, rather than several unauthenticated GitHub API requests. */ fun refresh(context: Context): Catalog { val checkedAt = System.currentTimeMillis() val published = JSONObject(get(context, "$CATALOG_URL?checked=$checkedAt")) - // Its checks say why in English; the user gets that inside a sentence in the app's language. val catalog = try { readPublishedCatalog(published, context.packageName, checkedAt) } catch (e: IOException) { @@ -366,7 +356,24 @@ object AppUpdates { } private fun get(context: Context, url: String): String { - val c = URL(url).openConnection() as HttpURLConnection + val sources = DownloadSource.candidates(url) + var last: IOException? = null + for ((index, source) in sources.withIndex()) { + try { + val body = get(context, source, url) + DownloadSource.succeeded(source) + return body + } catch (e: IOException) { + last = e + if (index < sources.lastIndex) Log.i(TAG, "retrying $url via $source") + } + } + DownloadSource.failed() + throw last ?: IOException(context.getString(R.string.appupd_http, 0)) + } + + private fun get(context: Context, source: String, url: String): String { + val c = URL(source).openConnection() as HttpURLConnection c.connectTimeout = 15_000 c.readTimeout = 20_000 c.setRequestProperty("Accept", "application/json") diff --git a/app/src/main/java/com/droiddeck/launcher/update/SelfInstaller.kt b/app/src/main/java/com/droiddeck/launcher/update/SelfInstaller.kt index 4700302e26..581606f7cf 100644 --- a/app/src/main/java/com/droiddeck/launcher/update/SelfInstaller.kt +++ b/app/src/main/java/com/droiddeck/launcher/update/SelfInstaller.kt @@ -10,60 +10,30 @@ import android.os.Build import android.provider.Settings import com.droiddeck.launcher.BuildConfig import com.droiddeck.launcher.R +import com.droiddeck.launcher.core.Downloader import com.droiddeck.launcher.core.FileUtils import com.droiddeck.launcher.core.Hashes import java.io.File -import java.io.FileOutputStream import java.io.IOException -import java.net.HttpURLConnection -import java.net.URL import java.security.MessageDigest -/** - * Installs one of DroidDeck's own builds over itself: download into the cache, check the file - * against GitHub's sha256, then hand it to PackageInstaller. Android shows its own "Update this - * app?" prompt, and the app is restarted on the new build. - */ object SelfInstaller { - /** The broadcast PackageInstaller answers on; the launcher registers for it while it is open. */ const val ACTION_STATUS = "com.droiddeck.launcher.update.INSTALL_STATUS" - /** Android lets an app install packages only once the user allows it in "Install unknown apps". */ fun canInstall(context: Context): Boolean = Build.VERSION.SDK_INT < 26 || context.packageManager.canRequestPackageInstalls() fun permissionIntent(context: Context): Intent = Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES, Uri.parse("package:${context.packageName}")) - /** Downloads [apk] into the cache and checks it; a download left from before is replaced. */ fun download(context: Context, apk: AppUpdates.Apk, progress: (Int) -> Unit): File { val dir = File(context.cacheDir, "updates") - FileUtils.delete(dir) + dir.listFiles()?.forEach { if (it.name != apk.name) FileUtils.delete(it) } dir.mkdirs() val target = File(dir, apk.name) - val c = URL(apk.url).openConnection() as HttpURLConnection - c.connectTimeout = 15_000 - c.readTimeout = 60_000 - c.setRequestProperty("User-Agent", "DroidDeck-app") - c.instanceFollowRedirects = true + val ok = Downloader.downloadFile(apk.url, target, true, apk.sha256) { f -> progress(if (f < 0) -1 else (f * 100).toInt()) } + if (!ok) throw IOException(context.getString(R.string.selfinst_download_failed)) try { - if (c.responseCode != 200) throw IOException(context.getString(R.string.selfinst_http, c.responseCode)) - val total = c.contentLengthLong.takeIf { it > 0 } ?: apk.size - c.inputStream.use { input -> - FileOutputStream(target).use { out -> - val buf = ByteArray(1 shl 16) - var done = 0L - var last = -1 - while (true) { - val r = input.read(buf) - if (r <= 0) break - out.write(buf, 0, r) - done += r - val pct = if (total > 0) (done * 100 / total).toInt() else -1 - if (pct != last) { last = pct; progress(pct) } - } - } - } if (apk.size > 0 && target.length() != apk.size) { throw IOException(context.getString(R.string.selfinst_size_mismatch)) } @@ -71,16 +41,13 @@ object SelfInstaller { throw IOException(context.getString(R.string.selfinst_checksum_mismatch)) } validateDownloaded(context, target, apk) - return target } catch (e: Exception) { FileUtils.delete(target) throw e - } finally { - c.disconnect() } + return target } - /** Inspect the actual downloaded APK before giving it to Android's installer. */ private fun validateDownloaded(context: Context, file: File, apk: AppUpdates.Apk) { if (apk.packageName != context.packageName) { throw IOException(context.getString(R.string.selfinst_wrong_package, apk.packageName, context.packageName)) @@ -108,8 +75,6 @@ object SelfInstaller { throw IOException(context.getString(R.string.selfinst_downgrade, code, BuildConfig.VERSION_CODE)) } - // Before Android 9 this lineage intentionally presents the public legacy test key. Android - // 9+ understands the v3 hand-over and must see DroidDeck's private release key as current. if (Build.VERSION.SDK_INT >= 28) { val signing = info.signingInfo ?: throw IOException(context.getString(R.string.selfinst_no_signing)) val digests = signing.apkContentsSigners.orEmpty().map { cert -> @@ -122,13 +87,11 @@ object SelfInstaller { } } - /** Writes [apk] into an install session and commits it; the answer comes as an [ACTION_STATUS] broadcast. */ fun install(context: Context, apk: File) { val installer = context.packageManager.packageInstaller val params = PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL).apply { setAppPackageName(context.packageName) setSize(apk.length()) - // Skips Android's prompt where it allows that (the app installed its current build itself). if (Build.VERSION.SDK_INT >= 31) setRequireUserAction(PackageInstaller.SessionParams.USER_ACTION_NOT_REQUIRED) } val id = installer.createSession(params) @@ -145,7 +108,6 @@ object SelfInstaller { } } - /** What went wrong, in words for the user, from PackageInstaller's status and message. */ fun describeFailure(context: Context, status: Int, message: String?): String = when { message?.contains("VERSION_DOWNGRADE") == true -> context.getString(R.string.upd_fail_downgrade) status == PackageInstaller.STATUS_FAILURE_CONFLICT || message?.contains("UPDATE_INCOMPATIBLE") == true -> diff --git a/app/src/main/java/com/droiddeck/launcher/wayland/CompositorHost.kt b/app/src/main/java/com/droiddeck/launcher/wayland/CompositorHost.kt index 797ae84699..bb466c1330 100644 --- a/app/src/main/java/com/droiddeck/launcher/wayland/CompositorHost.kt +++ b/app/src/main/java/com/droiddeck/launcher/wayland/CompositorHost.kt @@ -4,15 +4,14 @@ import android.view.Choreographer import android.view.Surface import com.droiddeck.launcher.session.SessionState -/** - * The compositor is a process-wide thing, not an activity's: it is started once, keeps running - * while the session does, and merely swaps the Surface it presents into as the activity comes and - * goes. An activity that started it again on re-creation would be starting a second compositor on - * a socket the first one owns. - */ object CompositorHost { @Volatile private var started = false + + @Volatile + var displayChoice: String? = null + + @Volatile private var vsyncRunning = false private val vsync = object : Choreographer.FrameCallback { @@ -22,7 +21,6 @@ object CompositorHost { } } - /** True when this call was the one that started the compositor. */ @Synchronized fun startOrAttach( surface: Surface, @@ -36,10 +34,6 @@ object CompositorHost { fpsLimit: Int, ): Boolean { pace(refreshHz, fpsLimit) - // The compositor outlives sessions, and the next one may be on the other screen of a dual-screen - // device: gamescope reads the size from the toplevel configure and the wl_output mode when it - // connects, and kept the first session's (the Thor's 1920x1080 top screen letterboxed the bottom - // one's session to 16:9). A running session keeps the size it was started at. if (!SessionState.running) WaylandCompositor.nativeSetOutputSize(outputWidth, outputHeight) if (started) { attached = surface @@ -47,7 +41,7 @@ object CompositorHost { resumeVsync() return false } - WaylandCompositor.nativeSetOutputRefreshRate(refreshHz) + com.droiddeck.launcher.gpu.TpUbwcHint.applyToProcess() WaylandCompositor.nativeStartWithSurface( surface, xdgRuntimeDir, driverPath, libraryName, nativeLibDir, ) @@ -57,34 +51,21 @@ object CompositorHost { return true } - /** - * The session's frame cap, on every attach: the compositor outlives sessions, and the next one - * may have a different cap. The release pacer hands a game one buffer back per capped frame - * (per refresh without a cap), and the zero-copy layer votes for the same cadence. Left at 0 - * the vote is inferred from the rate already being achieved, and on a phone whose vendor picks - * clocks from that a session that has been slowed reads as one that wants to be. (WinNative, - * WaylandSession.) - */ private fun pace(refreshHz: Float, fpsLimit: Int) { WaylandCompositor.nativeSetFpsLimit(fpsLimit) WaylandCompositor.nativeSetLayerFrameRate(if (fpsLimit > 0) fpsLimit.toFloat() else refreshHz) + WaylandCompositor.nativeSetOutputRefreshRate(refreshHz) + SessionState.refreshHz = refreshHz + } + + @Synchronized + fun updatePacing(refreshHz: Float, fpsLimit: Int) { + if (started) pace(refreshHz, fpsLimit) } - /** - * The Surface changed size under the compositor (a foldable opening or closing). Android does - * not always recreate the Surface for that, and a swapchain built for the old size keeps - * presenting: the system then scales those buffers onto the new window, which on a Fold showed - * a 16:9 picture stretched to the square panel. Rebinding the window rebuilds the swapchain at - * the new size, and the scale mode letterboxes as it should. - */ @Synchronized fun resize(surface: Surface, rearm: () -> Unit) { if (!started) return - // Frame generation does not live through a resize: its ring, its effects chain and its - // multi-present pacing were all built against the old extent, and on a Fold the picture - // came back stretched with an engine on and right with it off. Disarmed, the window is - // rebound and the swapchain rebuilt; the caller re-arms once that has settled, and every - // engine-side object is made again for the new size. WaylandCompositor.nativeSetFrameGenArmed(false, 0, 0) WaylandCompositor.nativeLog("screen", "surface resized: rebinding the window, frame generation re-armed after") WaylandCompositor.nativeSetSurface(null) @@ -93,12 +74,6 @@ object CompositorHost { android.os.Handler(android.os.Looper.getMainLooper()).postDelayed(rearm, 600) } - /** - * The window the guest presents through has changed (the Steam menu opening or closing over a - * fullscreen game swaps gamescope between forwarding the game's own buffers and its composited - * output). The engine's ring and history straddle that switch and come back wrong-sized - a - * game shown as a strip in a corner - so it is disarmed and re-armed against the new window. - */ fun rearmFrameGen(rearm: () -> Unit) { if (!started) return WaylandCompositor.nativeSetFrameGenArmed(false, 0, 0) @@ -106,19 +81,16 @@ object CompositorHost { android.os.Handler(android.os.Looper.getMainLooper()).postDelayed(rearm, 600) } - /** - * The activity is going away. The compositor keeps running with nothing to present into - - * the guest carries on, and its next frames land on the Surface the next activity brings. - */ - /** The Surface the compositor presents on; only its own owner may take it away. */ private var attached: Surface? = null - /** - * Only for the Surface that is attached. When one session hands over to the next (the - * desktop's Steam launchers), the new activity attaches its Surface before the old one is - * destroyed - and the old one's surfaceDestroyed then arrived here and took the new Surface - * away: gamescope's frames came in by the thousand and nothing reached the screen. - */ + @Synchronized + fun attachXr() { + check(started) { "DroidDeck compositor is not running" } + pauseVsync() + attached = null + WaylandCompositor.nativeSetSurface(null) + } + @Synchronized fun detach(surface: Surface?) { if (!started) return @@ -128,7 +100,6 @@ object CompositorHost { WaylandCompositor.nativeSetSurface(null) } - /** Frames are only worth drawing while a Surface is attached. */ private fun resumeVsync() { if (vsyncRunning) return vsyncRunning = true @@ -139,10 +110,6 @@ object CompositorHost { vsyncRunning = false } - /** - * A new session behind a compositor that has already presented: the first-frame notice is - * one-shot in native code, so it is re-armed here or the loading panel would never leave. - */ fun newSession() { if (started) WaylandCompositor.nativeResetFirstFrame() } diff --git a/app/src/main/java/com/droiddeck/launcher/wayland/HdrSupport.kt b/app/src/main/java/com/droiddeck/launcher/wayland/HdrSupport.kt index 714746d209..91f408d916 100644 --- a/app/src/main/java/com/droiddeck/launcher/wayland/HdrSupport.kt +++ b/app/src/main/java/com/droiddeck/launcher/wayland/HdrSupport.kt @@ -6,12 +6,6 @@ import android.view.Display import android.view.WindowManager import com.droiddeck.launcher.R -/** - * What the panel says about HDR, read from android.view.Display: the gate the compositor's HDR10 - * output sits behind (droiddeck_color.h). A property of the display, not the device - and the - * settings screen greys the HDR switch out with the reason when it is not there, rather than - * offering a switch that a session would then silently ignore. - */ class HdrProbe( val hdr10: Boolean, val formats: String, @@ -22,13 +16,12 @@ class HdrProbe( val ratio: Float, val displayId: Int, val name: String, - /** Why HDR cannot be offered, or null when it can. */ val reason: String?, ) object HdrSupport { - fun probe(context: Context): HdrProbe { - val display: Display? = if (Build.VERSION.SDK_INT >= 30) { + fun probe(context: Context, output: Display? = null): HdrProbe { + val display: Display? = output ?: if (Build.VERSION.SDK_INT >= 30) { try { context.display } catch (e: Exception) { null } } else { @Suppress("DEPRECATION") diff --git a/app/src/main/java/com/droiddeck/launcher/wayland/WaylandCompositor.java b/app/src/main/java/com/droiddeck/launcher/wayland/WaylandCompositor.java index f5b369d069..e15d809981 100644 --- a/app/src/main/java/com/droiddeck/launcher/wayland/WaylandCompositor.java +++ b/app/src/main/java/com/droiddeck/launcher/wayland/WaylandCompositor.java @@ -2,15 +2,6 @@ package com.droiddeck.launcher.wayland; import android.view.Surface; -/** - * Embedded Wayland compositor (experimental parallel display runtime). - * - * Brings up a libwayland-server compositor in-process so games launched through - * Wine's winewayland.drv can present into it (companion to the winewayland Proton - * build). Committed frames (dmabufs from winewayland's Vulkan WSI) are composited - * onto the given Surface via the native Vulkan present backend. Not on the default - * X11 path. - */ public final class WaylandCompositor { static { System.loadLibrary("droiddeckwayland"); @@ -20,35 +11,21 @@ public final class WaylandCompositor { private static volatile Runnable firstFrameListener; - /** Register a callback fired once, when the compositor presents the first client - * frame to the output Surface. Used to dismiss the launch overlay in wayland mode - * (there is no XServer window-content hook). Runs on the compositor thread - the - * listener must marshal to the UI thread itself. */ public static void setFirstFrameListener(Runnable r) { firstFrameListener = r; } public static synchronized void clearFirstFrameListener(Runnable r) { if (firstFrameListener == r) firstFrameListener = null; } - /** Invoked from native (droiddeck_on_first_frame) on the first present. */ @SuppressWarnings("unused") static void onFirstFramePresented() { Runnable r = firstFrameListener; if (r != null) r.run(); } - /** The in-game performance HUD's feed in wayland mode (X11 binds the HUD to the window - * carrying _MESA_DRV and counts X presents; there is no X server here). */ public interface GameListener { - /** A window started presenting GPU frames ({@code window} describes it; {@code gpuName} is the - * compositor's GPU), or {@code window == null} when that window closed. Compositor thread. */ void onGameSurface(String window, String gpuName); - /** One GPU frame from that window. Compositor thread - keep it cheap. */ void onGameFrame(); - /** The program behind that window, right after {@link #onGameSurface}: its Linux pid (the - * Wayland client's credentials) and executable name ({@code ""} when unknown). The app arms its - * launch-time CPU affinity on it - on X11 that comes from window events, which a Wayland session - * has none of. Compositor thread - marshal to the UI thread. */ default void onGameProgram(int pid, String program) {} } @@ -60,7 +37,6 @@ public final class WaylandCompositor { if (gameListener == l) gameListener = null; } - /** Invoked from native (droiddeck_on_game_surface). */ @SuppressWarnings("unused") static void onGameSurface(String window, String gpuName) { GameListener l = gameListener; @@ -69,23 +45,23 @@ public final class WaylandCompositor { private static volatile long lastFrameNanos; private static volatile long frameIntervalNanos; + private static volatile long gameFrames; // written by the compositor thread only + + /** Frames the game has presented since the app started; the rate is the difference over time. */ + public static long gameFrameCount() { return gameFrames; } - /** - * How long frames are taking to arrive right now, in ms, or -1 before the first: the smoothed - * interval, or the time since the last frame when that is longer (a session that has stalled). - */ public static long recentFrameIntervalMs() { long last = lastFrameNanos; if (last == 0) return -1; return Math.max(frameIntervalNanos, System.nanoTime() - last) / 1_000_000; } - /** Invoked from native (droiddeck_on_game_frame) for every frame of the HUD's window. */ @SuppressWarnings("unused") static void onGameFrame() { long now = System.nanoTime(); long previous = lastFrameNanos; lastFrameNanos = now; + gameFrames++; if (previous != 0) { long interval = now - previous; long smoothed = frameIntervalNanos; @@ -95,19 +71,13 @@ public final class WaylandCompositor { if (l != null) l.onGameFrame(); } - /** Invoked from native (droiddeck_on_game_program) once per game window that starts presenting. */ @SuppressWarnings("unused") static void onGameProgram(int pid, String program) { GameListener l = gameListener; if (l != null) l.onGameProgram(pid, program != null ? program : ""); } - /** Pointer lock (zwp_pointer_constraints_v1) state, for the app's input path. */ public interface PointerLockListener { - /** A program locked the pointer ({@code locked}): the app must feed the compositor deltas - * (scene input type 6) instead of absolute positions. When the lock ends, {@code x,y} is - * where the pointer now is (scene = virtual-desktop coordinates) for the app to re-sync - * its own pointer to. Compositor thread. */ void onPointerLock(boolean locked, int x, int y); } @@ -115,21 +85,17 @@ public final class WaylandCompositor { public static void setPointerLockListener(PointerLockListener l) { pointerLockListener = l; } - /** Unhooks {@code l} only if it is still the listener, so a finishing activity never unhooks its successor's. */ public static void clearPointerLockListener(PointerLockListener l) { if (pointerLockListener == l) pointerLockListener = null; } - /** Invoked from native (droiddeck_on_pointer_lock). */ @SuppressWarnings("unused") static void onPointerLock(boolean locked, int x, int y) { PointerLockListener l = pointerLockListener; if (l != null) l.onPointerLock(locked, x, y); } - /** Clipboard text a program in the guest copied (wl_data_device / zwlr_data_control). */ public interface ClipboardListener { - /** {@code text} is what the guest put on its clipboard. Compositor thread. */ void onGuestClipboardText(String text); } @@ -139,23 +105,17 @@ public final class WaylandCompositor { public static boolean isClipboardListener(ClipboardListener l) { return clipboardListener == l; } - /** A replaced activity must not unhook the clipboard listener of its successor. */ public static void clearClipboardListener(ClipboardListener l) { if (clipboardListener == l) clipboardListener = null; } - /** Invoked from native (droiddeck_on_clipboard_text) with UTF-8 bytes. */ @SuppressWarnings("unused") static void onClipboardText(byte[] utf8) { ClipboardListener l = clipboardListener; if (l != null && utf8 != null) l.onGuestClipboardText(new String(utf8, java.nio.charset.StandardCharsets.UTF_8)); } - /** Text input (zwp_text_input_v3) state: a program accepts IME text, or stopped. */ public interface TextInputListener { - /** {@code enabled}: {@code program} (its exe name) accepts IME text; {@code x,y,w,h} is its caret - * rectangle in scene (virtual desktop) pixels, all 0 until the program positions one. Compositor - * thread. */ void onTextInput(boolean enabled, String program, int x, int y, int w, int h); } @@ -163,7 +123,6 @@ public final class WaylandCompositor { public static void setTextInputListener(TextInputListener l) { textInputListener = l; } - /** Invoked from native (droiddeck_on_text_input). */ @SuppressWarnings("unused") static void onTextInput(boolean enabled, String program, int x, int y, int w, int h) { TextInputListener l = textInputListener; @@ -174,16 +133,12 @@ public final class WaylandCompositor { return s == null ? new byte[0] : s.getBytes(java.nio.charset.StandardCharsets.UTF_8); } - /** Android's clipboard text becomes the guest's selection ({@code null}/empty clears it). Any thread. */ public static void setClipboardText(String text) { nativeSetClipboardText(utf8(text)); } - /** Commit soft-keyboard text to the program accepting text input. Any thread. */ public static void textInputCommit(String text) { if (text != null && !text.isEmpty()) nativeTextInputCommit(utf8(text)); } - /** Composing (pre-edit) text with the caret at character index {@code cursor} (-1 = end); empty clears. */ public static void textInputPreedit(String text, int cursor) { nativeTextInputPreedit(utf8(text), cursor, cursor); } - /** The IME deleted {@code before} characters before and {@code after} after the caret. */ public static void textInputDelete(int before, int after) { nativeTextInputDelete(before, after); } private static native void nativeSetClipboardText(byte[] utf8); @@ -191,104 +146,47 @@ public final class WaylandCompositor { private static native void nativeTextInputPreedit(byte[] utf8, int cursorBegin, int cursorEnd); private static native void nativeTextInputDelete(int before, int after); - /** Start the compositor headless (no output window) - bring-up tests only. */ public static native void nativeStart(String xdgRuntimeDir); - /** Start the compositor rendering to {@code surface}. XDG_RUNTIME_DIR = an - * app-writable dir for the wayland socket (e.g. context.getFilesDir()). - * driverPath/libraryName/nativeLibDir select the Turnip driver via adrenotools - * (all null -> system libvulkan, which can't do dmabuf import). */ public static native void nativeStartWithSurface(Surface surface, String xdgRuntimeDir, String driverPath, String libraryName, String nativeLibDir); - /** Replace/clear the output window when the SurfaceView is (re)created/destroyed. */ public static native void nativeSetSurface(Surface surface); + public static native boolean nativeWaitSurface(int timeoutMs); - /** Inject a pointer event into the compositor (from the SurfaceView touch listener). - * action: 0=down, 1=move, 2=up. x/y in compositor output space (0..1919, 0..1079). */ public static native void nativeSendPointer(int action, int x, int y); public static native void nativeSendTouch(int action, int pointerId, int x, int y); - /** - * The client's pointer image, straight from wl_pointer.set_cursor (labwc's resize arrows, a text - * field's I-beam). out = [serial, hidden, w, h, hotspotX, hotspotY, ARGB8888 pixels...]; returns - * the number of ints written, or 0 if {@code out} is too small. Serial 0 = the client has not - * set one yet; [1] = 1 means it asked for NO pointer. - */ public static native int nativeCursorSnapshot(int[] out); - /** The serial {@link #nativeCursorSnapshot} would report, without copying the image. */ public static native int nativeCursorSerial(); - /** Enough for the header plus a 256x256 cursor, the largest the compositor snapshots. */ public static final int CURSOR_BUF_INTS = 6 + 256 * 256; - /** Inject a key event. evdev = Linux input keycode (KEY_A=30…); state: 1=down, 0=up. */ public static native void nativeSendKey(int evdev, int state); - /** One screen refresh (Choreographer frame callback). The compositor draws the newest state - * once per tick, so games run unthrottled and the screen shows their latest frame. */ public static native void nativeVsync(long frameTimeNanos); - /** The compositor thread's Linux tid, or 0 before it has started. */ public static native int nativeCompositorTid(); - /** Shortcut launches: don't draw explorer's windows (desktop, taskbar, Start menu), matching the - * X11 renderer's unviewable "explorer.exe". Set before the compositor starts. */ public static native void nativeSetHideShell(boolean hide); - /** The panel's refresh rate in Hz, advertised on the Wayland output so Wine's display modes - * carry the real rate (games that insist on their saved 144 Hz mode find it, as on X11). - * Set before the compositor starts. */ public static native void nativeSetOutputRefreshRate(float hz); - /** Show a single fullscreen window on its own Android layer (SurfaceControl) instead of blitting - * it into the compositor's swapchain. DROIDDECK_WAYLAND_ZERO_COPY=1 in the container's environment - * variables is the launch default; see waylandcomp/ZERO_COPY_SPIKE.md. - * - * Live and thread-safe: before the compositor starts this is the initial state, and afterwards - * the call is marshalled onto the compositor thread, which flips the state, tells every bound - * game over banner_ahb_v1.mode to rebuild its swapchain for it, and redraws. The switch is one - * frame's worth of latency; the picture never goes black, because the old swapchain's buffers - * keep being shown until the game has replaced them. */ public static native void nativeSetZeroCopy(boolean on); - /** Zero-copy frames the compositor presented in its LAST completed 10 s stats window (the - * "| N zero-copy frames" figure of its session-log stats line); 0 while zero-copy is off or - * before the first window closes. Read-only, any thread - the in-game drawer polls it. */ public static native int nativeZeroCopyFrames(); - /** Milliseconds since the compositor last put a game frame on the display layer without a copy; - * -1 if it never has this session. Unlike nativeZeroCopyFrames this updates on every such frame - * rather than once per 10 s window, so the drawer can tell "switching..." from "running" within - * a frame or two of the live toggle. Read-only, any thread. */ public static native int nativeZeroCopyLastFrameAgeMs(); - /** Compressed (UBWC) game buffers: the compositor advertises DRM_FORMAT_MOD_QCOM_COMPRESSED next to - * LINEAR on zwp_linux_dmabuf_v1 for every format its driver can import that way, so the game's - * Turnip allocates compressed swapchain images instead of resolving every frame to a linear copy. - * Default on; DROIDDECK_WAYLAND_UBWC=0 in the container's environment variables turns it off (A/B). - * Set before the compositor starts. */ public static native void nativeSetUbwc(boolean on); - /** Debug: advertise no DRM device (main device 0:0) in the dma-buf feedback, as a phone that - * exposes no /dev/dri node to apps does. DROIDDECK_WAYLAND_NO_RENDER_NODE=1 in the container's or - * shortcut's environment variables. Set before the compositor starts. */ public static native void nativeSetNoRenderNode(boolean on); - /** VRR / refresh-rate matching: mirror the panel refresh-rate vote the activity puts on the - * compositor's SurfaceView onto the game's own SurfaceControl layer. Under zero-copy the game's - * frames go straight onto that layer and never reach the app's surface, so the surface vote alone - * does not tell SurfaceFlinger the game's cadence. Same rate and compatibility as - * {@code Surface.setFrameRate}; {@code 0} clears the vote. Callable any time from any thread; the - * compositor applies it on its next layer transaction and writes one `layer` line per change to - * the session log. A no-op on Android versions without {@code ASurfaceTransaction_setFrameRate}. */ public static native void nativeSetLayerFrameRate(float hz); - /** Where the compositor was told to write its log, for the session collector; null if it was - * left to choose. Set before the compositor starts - it opens the file once, at start. */ private static volatile java.io.File sessionLogFile; public static void setSessionLogFile(java.io.File file) { @@ -299,219 +197,121 @@ public final class WaylandCompositor { return sessionLogFile; } - /** Write one line into the compositor's session log (Download/Wayland-logs) under the "display" - * area, from Java. Used for facts the platform knows and the native side does not - the panel's - * HDR capability, which lives behind android.view.Display. Safe before the compositor thread is - * up (the line then only reaches logcat) and safe after it has gone. */ public static native void nativeLogDisplay(String message); - /** The same under the "perf" area (e.g. the CPU cores Prefer Big Cores picked). Same safety. */ public static native void nativeLogPerf(String message); - /** The container's screen size, advertised as the Wayland output's mode so Wine's display-mode - * list stops at the desktop size, as the X server's does on X11. Set before the compositor starts. */ public static native void nativeSetOutputSize(int width, int height); - /** A new output size for a running compositor ("Follow screen": a foldable opening or closing). - * The compositor thread re-sends the wl_output mode and an xdg_toplevel configure to every - * client, and gamescope / the desktop's KWin resize their output to it. Any thread. */ + public static native boolean nativeGamePictureRect(float[] out); + public static native void nativeResizeOutput(int width, int height); - /** Re-arms the one-shot first-frame notice, for a new session under a compositor that has - * already presented a previous one. */ public static native void nativeResetFirstFrame(); - // ── HDR10 output, round 1 (waylandcomp/src/droiddeck_color.h, wl_color_mgmt.c) ───────────────── - // Opt-in: DROIDDECK_WAYLAND_HDR=1 in the container's or shortcut's env vars. The compositor offers - // games HDR10 (wp_color_manager_v1 + 10-bit buffers, frames tagged BT2020_PQ on the game's own - // display layer) only when the game's display lists HDR10 as well; otherwise nothing changes and - // the session log says why. Not the drawer's "HDR" effect, which is an SDR bloom/contrast filter. - /** HDR_MODE_OFF / HDR_MODE_ON (DROIDDECK_WAYLAND_HDR=1) / HDR_MODE_FORCE (=force: skip the display - * check, for testing the negotiation on an SDR panel). */ public static final int HDR_MODE_OFF = 0, HDR_MODE_ON = 1, HDR_MODE_FORCE = 2; - /** The opt-in: mode, where it came from ("container env" / "shortcut env"), whether DXVK_HDR=1 is - * in the game's environment, and whether the app turned zero-copy on for this session because HDR - * needs it. Set before the compositor starts. */ public static native void nativeSetHdrRequest(int mode, String source, boolean dxvkHdr, boolean zeroCopyForced); - /** The game's display as {@code android.view.Display} reports it. Before the compositor starts (it - * feeds the gate) and again whenever it changes (logged; the gate is decided once per session). */ public static native void nativeSetHdrDisplay(int displayId, String name, String formats, boolean hdr10, float maxLuminance, float maxAverageLuminance, float minLuminance, boolean hdrSdrRatioAvailable, float hdrSdrRatio, int apiLevel); - /** One {@code Display.getHdrSdrRatio()} reading ({@code < 0} = not available); {@code listener} = it - * came from the display's ratio listener rather than the periodic sampler. Any thread. */ public static native void nativeHdrSdrRatioSample(float ratio, boolean listener); - /** Milliseconds since an HDR frame last reached a display layer; -1 = none this session. Any thread. */ public static native int nativeHdrLastFrameAgeMs(); - /** -1 = the compositor has not decided the HDR gate yet, 0 = closed, 1 = open. Any thread. */ public static native int nativeHdrGateState(); - /** The session is ending: the compositor writes its "HDR on screen: …" summary line. Once. */ public static native void nativeHdrSessionEnd(); - /** True while HDR frames are really on screen: frames tagged BT2020_PQ reached the display in the - * last 1.5 s and, where the display reports an HDR/SDR ratio, it is above 1 (the HUD's badge). */ public static native boolean nativeHdrOnScreen(); - /** One "color" line in the session log, from Java (the HDR environment, the DXVK warning). */ public static native void nativeLogColor(String message); - /** One line in the session log under {@code area} (the log's 9-character column: "gpu", "nvapi"), - * from Java: launch facts the app decides (the GPU name spoof, the Unreal Engine HDR mode). Like - * {@link #nativeLogDisplay}, safe before the session file exists (the line is written when it - * opens) and after it has gone. */ public static native void nativeLog(String area, String message); - /** Nits at which SDR content is placed when the compositor composes an HDR picture (a window over - * an HDR game, the desktop around a windowed one). Default 203 (BT.2408). Before the start. */ public static native void nativeSetHdrSdrWhite(float nits); - /** The in-game drawer's HDR output switch (only meaningful while the HDR gate is open; per session, - * starts on). On = the game's HDR frames go to the display as HDR; off = the same frames are shown - * tone-mapped to SDR. Live, any thread (queued to the compositor, which logs the flip); the game is - * told nothing - DXVK_HDR and the colour-manager offer were decided at launch. */ public static native void nativeSetHdrOutput(boolean on); - /** The HDR output switch's current state (any thread). */ public static native boolean nativeHdrOutput(); - /** True while an HDR game's frames are being shown tone-mapped to SDR (the last one under 1.5 s ago). */ public static native boolean nativeHdrToneMappedOnScreen(); - /** 0 = no HDR frames on screen (or not confirmed yet), 1 = HDR frames on screen with HDR headroom, - * 2 = HDR frames on screen but the display has given them no headroom (HDR/SDR ratio 1.00) for 5 s - * or more - the brightness slider at maximum, or a screen recording (Android turns HDR headroom off - * while the screen is recorded). The HUD badge and the drawer's HDR row. */ public static native int nativeHdrState(); - /** Device evidence beside the HDR/SDR headroom, HDR sessions only (any thread): PowerManager thermal - * status (0..6, -1 unknown) and getThermalHeadroom(10) (NaN / negative = not available), and - * Settings.System SCREEN_BRIGHTNESS (0..255, -1 unknown) + SCREEN_BRIGHTNESS_MODE (1 auto, 0 manual, - * -1 unknown). The compositor logs changes of status and brightness and puts the values on every - * no-headroom line, the 10 s HDR line and the verdict. */ public static native void nativeHdrEnvSample(int thermalStatus, float thermalHeadroom, int brightness, int brightnessMode); - /** Display.getHighestHdrSdrRatio() (Android 16+), <= 0 = not reported: the display's own ceiling, capped - * into the headroom request and logged in the verdict. Any thread. */ public static native void nativeSetHdrHighestRatio(float ratio); - /** The HDR headroom the SCREEN surface should ask for while HDR frames go through the HDR10 swapchain - * (frame generation), 0 = none; the app applies it (SurfaceView.setDesiredHdrHeadroom, API 35). */ public static native float nativeHdrScreenHeadroom(); - /** Why that value ("content peak 1207 nits (max CLL) / SDR 203 ..."), for the log line. */ public static native String nativeHdrScreenHeadroomWhy(); - /** What the app asked for on the screen surface: > 0 the ratio, 0 cleared, -1 not possible (< Android 15). */ public static native void nativeHdrNoteHeadroomRequest(float ratio); - /** Fullscreen mode ({@code Container.FULLSCREEN_OFF/FIT/STRETCH/FILL/INTEGER}) and screen alignment - * ({@code Container.ALIGN_CENTER/TOP/BOTTOM}): how the compositor fits the desktop onto the screen, - * with the same arithmetic as {@code ViewTransformation} (which maps touch input), so the picture and - * the pointer agree. OFF and FIT both letterbox. Callable any time; the next frame uses it. */ public static native void nativeSetScaleMode(int fullscreenMode, int screenAlignment); - // ---- Screen effects: the X11 Vulkan renderer's post chain, run by the compositor between the - // composited scene and the output blit (waylandcomp/src/effects_chain.c). Same modes, ranges and - // pass order as VulkanRenderer's setters, so a saved preset looks the same on both backends. - // Callable any time from any thread; the compositor applies them on its next frame and writes - // one `effects` line to the session log per change. While any effect is on, a zero-copy - // (layer-mode) game is presented through the compositor pass instead. - /** Scaling mode: 0=None 1=Linear 2=Nearest 3=SGSR 4=FSR 5=FSR Fit 6=Sharpen 7=NIS 8=SGSR HQ. - * Resizes the scene to its mapped output size (there is no render scale on Wayland). */ public static native void nativeSetUpscaler(int mode); - /** The upscaler's own sharpness slider 0..100 (RCAS lobe scale, SGSR edge 0.5..4.5, NIS). */ public static native void nativeSetUpscaleSharpness(int sharpness); - /** AMD CAS sharpen toggle + level 0..100 (0 = the pass is off). */ public static native void nativeSetCas(boolean enabled, int sharpness); - /** Fake-HDR toggle. */ public static native void nativeSetHdr(boolean enabled); - /** Terminal debanding toggle + strength 0..200 (100 = 1 LSB). */ public static native void nativeSetDeband(boolean enabled, int strength); - /** Colour grade in the drawer's slider units (brightness/contrast -100..100, gamma 0.5..3.0, - * saturation 0..200 percent; 0/0/1/100 = neutral, pass off) plus the FXAA / Toon / CRT / NTSC - * toggles - the same signature as {@code VulkanRenderer.setScreenEffects}. */ public static native void nativeSetScreenEffects(float brightness, float contrast, float gamma, float saturation, boolean fxaa, boolean toon, boolean crt, boolean ntsc); - /** The Look the controls currently match ({@code null} = Custom); only named in the log line. */ public static native void nativeSetLookName(String name); - /** The in-game FPS limiter: frames per second, 0 = unlimited. Paces when replaced buffers go - * back to the game, like the X11 IdleNotify pacer, so the game itself slows to the cap. */ + public static native void nativeSetCardboard(boolean enabled, int source, float ipdM, float screenDistM, + float screenWidthM, float k1, float k2, float fovDeg, + float lensInset, float chroma, boolean mono, float displayHz); + + public static native void nativeSetCardboardPose(float[] rotation, boolean live); + public static native void nativeSetCardboardSpatialPose(float[] rotation, float[] position, boolean live); + public static native boolean nativeSetSpatialFile(String path); + public static native void nativePublishSpatial(java.nio.ByteBuffer snapshot); + + public static native void nativeSetCardboardPoseFile(String path); + public static native void nativeSetFpsLimit(int fps); - /** KGSL power control off (true: the GPU held at its top clock) or back on. Device-wide and - * outlives the process; see {@code GpuClockPin}. A no-op without /dev/kgsl-3d0. */ public static native void nativeSetGpuTurbo(boolean on); - /** setpriority() on one of our own processes or threads, only ever raising it (no cgroup move, - * unlike android.os.Process.setThreadPriority). Returns the nice it is left at; 100 = unknown. */ public static native int nativeRaisePriority(int tid, int nice); - /** Inject the app's X-server input in scene (virtual desktop) pixels. type 2 = move to a,b; - * 3 = evdev button a (BTN_LEFT=0x110…) pressed (b=1) or released (b=0); 4 = a wheel steps, - * negative = up. */ public static native void nativeSendSceneInput(int type, int a, int b); - // ── Frame generation (waylandcomp/src/framegen_bridge.c) ───────────────────────────────── - // LSFG Native and Win-FG Native run inside the compositor's Turnip device, the same engines - // the X11 VulkanRenderer hosts. Every setter only stores a value; the compositor thread applies - // it on its next frame, so they are safe from any thread and before the compositor starts. - // bionic-fg (the guest-side win-fg layer) is X11-only and has no Wayland counterpart. public static final int FG_ENGINE_LSFG = 0, FG_ENGINE_WINFG = 1; - /** Which native engine generates: {@link #FG_ENGINE_LSFG} or {@link #FG_ENGINE_WINFG}. */ public static native void nativeSetFrameGenEngine(int kind); - /** Arm (multiplier 2..4: one real frame plus multiplier-1 interpolated ones per game frame) or - * disarm. A targetFps above 0 makes LSFG adaptive instead: it generates 0..3 frames per game - * frame, whatever reaches that rate. Generated frames are presented ahead of the real frame - * on consecutive vblanks. */ public static native void nativeSetFrameGenArmed(boolean armed, int multiplier, int targetFps); - /** LSFG Native: the SPIR-V cache built from the user's Lossless.dll ({@code Lossless.cacheFile}). */ public static native void nativeSetLsfgCachePath(String path); - /** Flow scale (0.25-1.0) and the panel's real refresh rate (the pacer never generates above it). */ public static native void nativeSetFrameGenTuning(float flowScale, float refreshHz); - /** Win-FG Native only: interpolation model (3/4) and performance preset (0..2). */ public static native void nativeSetWinFgTuning(int model, int perfPreset); - /** Same codes as {@code VulkanRenderer.getFrameGenProblem()}: -1 not known yet (the compositor's - * device is not up), 0 fine, 1 the driver lacks what the selected engine needs - * ({@link #nativeFrameGenCapsReason()} says what), 2 the engine failed to start. */ public static native int nativeFrameGenProblem(); public static native String nativeFrameGenCapsReason(); - /** Same shape as {@code VulkanRenderer.getFrameGenStats()}: {generations trusted, generations - * planned, real fps, presented fps (generated frames included), thermal (-1 = none), - * GPU ms per generated frame (-1 = unknown)}. */ public static native float[] nativeFrameGenStats(); - /** Relative pointer motion by dx,dy scene pixels (the Relative Mouse / captured-mouse path): - * while a program holds a pointer lock this is what it receives as relative_motion; otherwise - * the compositor moves its pointer by the delta. */ public static void sendPointerDelta(int dx, int dy) { if (dx == 0 && dy == 0) return; nativeSendSceneInput(6, dx * 256, dy * 256); } - /** As {@link #sendPointerDelta(int, int)}, keeping a captured mouse's fractions of a pixel. */ public static void sendPointerDelta(float dx, float dy) { int x = Math.round(dx * 256f), y = Math.round(dy * 256f); if (x == 0 && y == 0) return; diff --git a/app/src/main/res/anim/session_hold.xml b/app/src/main/res/anim/session_hold.xml index 60e4638f6f..8a828450ed 100644 --- a/app/src/main/res/anim/session_hold.xml +++ b/app/src/main/res/anim/session_hold.xml @@ -1,3 +1,2 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- The front end stays put while the session slides over or off it. --> <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:fromAlpha="1" android:toAlpha="1" android:duration="380" /> diff --git a/app/src/main/res/anim/session_rise.xml b/app/src/main/res/anim/session_rise.xml index 7aa0b70744..57f4afd239 100644 --- a/app/src/main/res/anim/session_rise.xml +++ b/app/src/main/res/anim/session_rise.xml @@ -1,5 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- The session surface rises over the front end. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/decelerate_cubic"> <translate android:fromYDelta="100%p" android:toYDelta="0" android:duration="380" /> <alpha android:fromAlpha="0.6" android:toAlpha="1" android:duration="380" /> diff --git a/app/src/main/res/anim/session_sink.xml b/app/src/main/res/anim/session_sink.xml index 6854de13de..e5f80c5aad 100644 --- a/app/src/main/res/anim/session_sink.xml +++ b/app/src/main/res/anim/session_sink.xml @@ -1,5 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Leaving a session: the surface sinks back down to reveal the front end. --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:interpolator/accelerate_cubic"> <translate android:fromYDelta="0" android:toYDelta="100%p" android:duration="320" /> </set> diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml new file mode 100644 index 0000000000..8b5c45a08a --- /dev/null +++ b/app/src/main/res/values-ar/strings.xml @@ -0,0 +1,2987 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">توقفت رسومات SteamVR</string> + <string name="steamvr_recovery_countdown">سيُعاد تشغيل DroidDeck خلال %1$d ثانية لإعادة ضبط الرسومات وإعادة فتح SteamVR. ستُغلق لعبتك الجارية، ولا يمكن استعادة التقدم غير المحفوظ.</string> + <string name="steamvr_recovery_repeated">عاد خلل الرسومات بعد إعادة تشغيل حديثة. تم إيقاف الاسترداد التلقائي مؤقتًا لتجنّب تكراره بلا نهاية. ستؤدي إعادة التشغيل إلى إغلاق لعبتك، ولا يمكن استعادة التقدم غير المحفوظ.</string> + <string name="steamvr_recovery_restart">إعادة التشغيل الآن</string> + <string name="steamvr_recovery_cancel">إبقاؤه مفتوحًا</string> + <string name="steamvr_recovery_restarting">جارٍ إعادة ضبط الرسومات وإعادة فتح SteamVR…</string> + <string name="steamvr_recovery_failed">تعذّر على DroidDeck إعادة التشغيل تلقائيًا. أغلق التطبيق تمامًا، ثم أعد فتحه.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>يُنزَّل Steam عند التشغيل الأول. قد يستغرق ذلك بضع دقائق.</item> + <item>افتراضيًا، يؤدي الخروج من التطبيق إلى إيقاف Steam مؤقتًا، ويُستأنف من حيث توقف عند عودتك.</item> + <item>تظهر وحدة التحكم لديك كوحدة تحكم Xbox 360. وإلا، فاستخدم عناصر التحكم على الشاشة.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>يُعَدّ سطح المكتب عند التشغيل الأول. قد يستغرق ذلك بضع دقائق.</item> + <item>افتراضيًا، يؤدي الخروج من التطبيق إلى إيقاف الجلسة مؤقتًا، وتُستأنف من حيث توقفت عند عودتك.</item> + <item>يعمل اللمس كلوحة لمس: اسحب لتحريك المؤشر، وانقر لتنفيذ نقرة.</item> + <item>تظهر وحدة التحكم لديك كوحدة تحكم Xbox 360. وإلا، فاستخدم عناصر التحكم على الشاشة.</item> + </string-array> + <string name="session_channel">الجلسة</string> + <string name="session_channel_description">يظهر أثناء فتح جلسة Steam أو جلسة سطح المكتب</string> + <string name="session_notification">Steam قيد التشغيل</string> + <string name="session_notification_downloads">يجري تنزيل في Steam</string> + <string name="session_notification_paused">الجلسة متوقفة مؤقتًا - انقر على «استئناف» عندما تكون مستعدًا</string> + <string name="resume_session">استئناف</string> + <string name="suspend_now">تعليق الآن</string> + <string name="stop_session">إيقاف الجلسة</string> + <string name="frame_gen_title">توليد الإطارات</string> + <string name="frame_gen_hint">اختر وضع توليد الإطارات</string> + <string name="frame_gen_off">إيقاف</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG تكيّفي %1$d</string> + <string name="lsfg_needs_steam">يتطلب Lossless Scaling على Steam</string> + <string name="lsfg_needs_install">ثبّت Lossless Scaling في Steam أو استورد Lossless.dll</string> + <string name="lsfg_import">استيراد Lossless.dll…</string> + <string name="lsfg_using_steam">يتم استخدام النسخة الموجودة في Steam</string> + <string name="lsfg_using_import">يتم استخدام نسخة مستوردة</string> + <string name="lsfg_pick_title">اختر Lossless.dll</string> + <string name="lsfg_imported">تم استيراد Lossless.dll</string> + <string name="lsfg_import_unchanged">ملف Lossless.dll هذا قيد الاستخدام بالفعل</string> + <string name="lsfg_import_not_owned">حساب Steam هذا لا يملك Lossless Scaling</string> + <string name="lsfg_import_invalid">هذا الملف ليس Lossless.dll الخاص بـ Lossless Scaling</string> + <string name="lsfg_import_failed">تعذّر تجهيز LSFG من ملف Lossless.dll هذا</string> + <string name="lsfg_problem_missing">يتطلب LSFG برنامج Lossless Scaling من Steam أو ملف Lossless.dll مستوردًا</string> + <string name="lsfg_problem_failed">تعذّر على LSFG تجهيز أدوات التظليل من Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: غير مدعوم</string> + <string name="hud_fg_failed">%1$s: فشل المحرك</string> + <string name="hud_fg_needs_lossless">%1$s: يتطلب Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · جارٍ البدء</string> + <string name="second_library_import_hint">يضيف مكتبة Steam ويفحصها بحثًا عن ألعاب Windows. تستخدم الألعاب المملوكة إدخالاتها في Steam، ويتحول الباقي إلى اختصارات لألعاب من خارج Steam.</string> + <string name="game_env_title">بيئة اللعبة</string> + <string name="game_env_hint">متغيرات البيئة لألعاب Proton.</string> + <string name="game_env_edit">تعديل</string> + <string name="game_env_shared">جميع ألعاب Proton</string> + <string name="game_env_scope">ملف التعريف</string> + <string name="game_env_app_id">معرّف تطبيق Steam</string> + <string name="game_env_open">فتح</string> + <string name="game_env_profile">اللعبة %1$s</string> + <string name="game_env_add">إضافة متغير</string> + <string name="game_env_name">اسم المتغير</string> + <string name="game_env_value">القيمة</string> + <string name="game_env_save">حفظ</string> + <string name="game_env_remove">إزالة</string> + <string name="game_env_restore">استعادة الوراثة</string> + <string name="game_env_reset">مسح تجاوزات البيئة</string> + <string name="game_env_unset">إلغاء التعيين لملف التعريف هذا</string> + <string name="game_env_empty">لم يتم تعيين أي متغيرات.</string> + <string name="game_env_inherited">موروث</string> + <string name="game_env_custom">متغير مخصّص</string> + <string name="game_env_error">تعذّر التحميل أو الحفظ. تحقق من مساحة التخزين المتاحة وحاول مرة أخرى.</string> + <string name="game_env_invalid">استخدم اسمًا صالحًا وقيمة لا تتجاوز 8192 حرفًا.</string> + <string name="game_env_unused">لا يقرأ وقت تشغيل Proton القياسي هذا المتغير.</string> + <string name="game_env_loading">جارٍ التحميل…</string> + <string name="game_env_feature">تجاوز مستوى ميزات D3D12. تُبلغ القيمة 12_2 عن إمكانات DirectX 12 Ultimate، وقد تفشل الميزات غير المدعومة. اتركه دون تعيين للاكتشاف التلقائي.</string> + <string name="game_env_shader">تجاوز نموذج أدوات التظليل في D3D12. تتطلب القيمة 6_9 إصدارًا حديثًا بما يكفي من VKD3D وميزات GPU مطابقة. اتركه دون تعيين للاكتشاف التلقائي.</string> + <string name="game_env_cache">أبقِ التخزين المؤقت لأدوات التظليل في Mesa مفعّلًا لتقليل تكرار التجميع. القيمة false تفعّل التخزين المؤقت.</string> + <string name="game_env_cache_size">الحد الأقصى لحجم ذاكرة التخزين المؤقت لأدوات التظليل في Mesa، مثل 1G. تستهلك ذاكرة التخزين المؤقت الأكبر مساحة تخزين أكثر.</string> + <string name="game_env_vkd3d_config">خيارات VKD3D لـ D3D12. يعطّل nodxr تتبع الأشعة؛ استخدمه فقط للعبة تحتاج إليه.</string> + <string name="game_env_proton_log">اضبطه على 1 للحصول على سجل تشخيص Proton. قد يقلل التسجيل من الأداء ويستهلك مساحة التخزين.</string> + <string name="game_env_wined3d">اضبطه على 1 لاستخدام WineD3D المعتمد على OpenGL بدلًا من DXVK لاختبار توافق D3D9–11.</string> + <string name="game_env_no_ntsync">اضبطه على 1 لإبعاد هذه اللعبة عن ntsync (droiddeck-ntsync أو برنامج تشغيل في النواة)؛ فتستخدم droiddeck-esync حيث تتوفر حزمة، وإلا droiddeck-fsync.</string> + <string name="game_env_no_esync">اضبطه على 1 لإيقاف droiddeck-esync لهذه اللعبة؛ فتستخدم droiddeck-fsync بدلًا منه، أو droiddeck-ntsync إذا كان fsync متوقفًا أيضًا.</string> + <string name="game_env_no_fsync">اضبطه على 1 لإبعاد هذه اللعبة عن droiddeck-fsync؛ فتستخدم droiddeck-esync حيث تتوفر حزمة، وإلا droiddeck-ntsync.</string> + <string name="game_env_fsync_first">اضبطه على 1 لتشغيل هذه اللعبة على droiddeck-fsync، أو على 0 لتقديم droiddeck-esync حيث تتوفر حزمة تناسب إصدار Proton الخاص بها.</string> + <string name="game_env_xalia">اضبطه على 0 لتعطيل مساعد التنقل بوحدة التحكم في Proton لهذه اللعبة.</string> + <string name="game_env_hud">تراكب DXVK لـ D3D9–11. القيمة fps تعرض معدل الإطارات، وتركه دون تعيين يخفيه.</string> + <string name="game_env_dxvk_config">إعدادات DXVK مفصولة بفواصل منقوطة. تستخدم الإصدارات الحديثة dxvk.maxFrameRate لتحديد الإطارات؛ يُفضَّل استخدام محدِّد الإطارات الخاص بالجلسة للعب العادي.</string> + <string name="game_env_vkd3d_limit">حد معدل الإطارات في D3D12. القيمة 0 تلغي الحد.</string> + <string name="game_env_glthread">تعدد مؤشرات الترابط في OpenGL ضمن Mesa. قد تساعد القيمة true ألعاب OpenGL المقيدة بأداء CPU؛ جرّبها لكل لعبة.</string> + <string name="sync_backend_title">مزامنة Wine</string> + <string name="sync_backend_hint">طريقة إبقاء الألعاب لمؤشرات الترابط متزامنة. يُطبَّق في الجلسة التالية.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">إعداد FEX المسبق</string> + <string name="fex_next_launch">يُطبَّق عند التشغيل التالي للعبة.</string> + <string name="game_settings_title">الألعاب</string> + <string name="fex_default_label">إعدادات FEX الافتراضية</string> + <string name="fex_default_detail">يستخدم إعدادات FEX الافتراضية.</string> + <string name="fex_stability_label">الثبات</string> + <string name="fex_stability_detail">الإعدادات الأكثر أمانًا والأبطأ.</string> + <string name="fex_compatibility_label">التوافق</string> + <string name="fex_compatibility_detail">TSO كامل مع multiblock.</string> + <string name="fex_intermediate_label">متوسط</string> + <string name="fex_intermediate_detail">TSO متوازن مع دقة x87 مخفّضة.</string> + <string name="fex_performance_label">الأداء</string> + <string name="fex_performance_detail">TSO معطّل بالكامل؛ مع multiblock.</string> + <string name="fex_performance_tso_label">الأداء + TSO</string> + <string name="fex_performance_tso_detail">إعدادات «الأداء» مع تفعيل TSO الرئيسي.</string> + <string name="fex_extreme_label">فائق</string> + <string name="fex_extreme_detail">يعطّل فحوص التعليمات البرمجية ذاتية التعديل. قد تتعطل الألعاب التي تستخدم JIT وأنظمة DRM.</string> + <string name="fex_extreme_tso_label">فائق + TSO</string> + <string name="fex_extreme_tso_detail">إعدادات «فائق» مع تفعيل TSO الرئيسي.</string> + <string name="fex_extreme_gn_label">فائق-gn</string> + <string name="fex_extreme_gn_detail">«الأداء» مع تلميحات TSC والبيانات الوصفية. جرّبه قبل «فائق».</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">«الأداء» مع فحوص كاملة للتعليمات البرمجية وإخفاء بت hypervisor.</string> + <string name="game_env_custom_value">قيمة مخصّصة</string> + <string name="game_env_select_value">اختر قيمة</string> + <string name="user_apps_section">المحاكيات والتطبيقات</string> + <string name="user_apps_add">إضافة</string> + <string name="user_apps_add_detail">تطبيقك أو لعبتك الخاصة</string> + <string name="user_apps_kind_script">نص برمجي</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">جارٍ البدء…</string> + <string name="user_apps_added">تمت إضافة %1$s</string> + <string name="user_apps_removed">تمت إزالة %1$s</string> + <string name="user_apps_back">سطح المكتب</string> + <string name="user_apps_gone">لم يعد هذا التطبيق موجودًا. اختره مجددًا من سطح المكتب.</string> + <string name="user_apps_open">فتح %1$s</string> + <string name="user_apps_remove">إزالة</string> + <string name="user_apps_remove_confirm">اضغط مجددًا للإزالة</string> + <string name="user_apps_stop_session">أوقف الجلسة لتتمكن من الإزالة</string> + <string name="user_apps_script_linked">يشغّل %1$s من مجلده، المرتبط بالجلسة في مكانه. لا تؤثر إزالة التطبيق على ذلك المجلد.</string> + <string name="user_apps_script_copied">يشغّل %1$s من نسخة من مجلده داخل DroidDeck. تؤدي إزالة التطبيق إلى حذف النسخة، لا الأصل.</string> + <string name="user_apps_runtime_required">ثبّت بيئة تشغيل Linux أولًا</string> + <string name="user_apps_file_gone">لم يعد الملف موجودًا</string> + <string name="user_apps_no_space">لا توجد مساحة كافية: يتطلب نسخ المجلد %1$s</string> + <string name="user_apps_copying">جارٍ نسخ %1$s</string> + <string name="user_apps_failed">تعذّرت إضافة التطبيق</string> + <string name="user_apps_github_checking">جارٍ البحث عن إصدار من %1$s</string> + <string name="user_apps_github_unreachable">تعذّرت قراءة إصدارات %1$s</string> + <string name="user_apps_github_no_appimage">لا يحتوي أي إصدار من %1$s على AppImage لـ ARM64 أو x86_64</string> + <string name="user_apps_downloading">جارٍ تنزيل %1$s</string> + <string name="user_apps_download_failed">فشل التنزيل</string> + <string name="user_apps_update_failed">تعذّر تحديث التطبيق</string> + <string name="user_apps_icon_failed">تعذّرت قراءة هذا الرمز</string> + <string name="user_apps_saved">تم حفظ %1$s</string> + <string name="user_apps_edit">تعديل</string> + <string name="user_apps_check_updates">البحث عن تحديثات</string> + <string name="user_apps_checking_updates">جارٍ البحث عن تحديثات…</string> + <string name="user_apps_update_to">التحديث إلى %1$s</string> + <string name="user_apps_up_to_date">محدَّث · %1$s</string> + <string name="user_apps_updated">تم تحديث %1$s</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">إضافة تطبيق</string> + <string name="add_app_tab_script">نص برمجي</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">ملف ‎.sh. يعمل من مجلده الخاص، بملء الشاشة ضمن gamescope.</string> + <string name="add_app_appimage_hint">ملف AppImage لـ ARM64 (aarch64)، أو لـ x86_64 يعمل عبر FEX. يُفَك ضمن بيئة تشغيل Linux مرة واحدة.</string> + <string name="add_app_github_hint">يثبّت ملف AppImage لـ ARM64 من أحدث إصدار في المستودع، أو ملف x86_64 عبر FEX.</string> + <string name="app_fex_title">استخدام FEX</string> + <string name="app_fex_auto">تلقائي</string> + <string name="app_fex_on">تشغيل</string> + <string name="app_fex_off">إيقاف</string> + <string name="app_fex_hint">يشغّل FEX برامج Linux المخصصة لـ x86 على جهاز ARM64 هذا. يستخدمه الخيار «تلقائي» عندما يكون البرنامج مبنيًا لـ x86.</string> + <string name="app_fex_x86">%1$s عبر FEX</string> + <string name="app_fex_not_ready">هذا البرنامج مبني لأجهزة كمبيوتر %1$s ويعمل عبر FEX، الذي لم يتم إعداده بعد. افتح Steam مرة واحدة أثناء تسجيل الدخول: سيجعله DroidDeck يُنزّل FEX وSteam Linux Runtime اللازمة، ثم يُفتح هذا البرنامج.</string> + <string name="session_end_program">هذا البرنامج</string> + <string name="session_end_fex_missing">%1$s مبني لأجهزة كمبيوتر x86 ويعمل عبر FEX، الذي لم يتم تثبيته بعد. شغّل Steam مرة واحدة أثناء تسجيل الدخول ودعه يُنزّل FEX وSteam Linux Runtime، ثم شغّل هذا البرنامج مجددًا.</string> + <string name="add_app_flatpak_hint">معرّف تطبيق على Flathub أو صفحته على Flathub. يُعَدّ Flatpak أولًا إن لم يكن مُعدًّا بعد.</string> + <string name="add_app_file">الملف</string> + <string name="add_app_no_file">لم يتم اختيار ملف</string> + <string name="add_app_choose_file">اختيار ملف</string> + <string name="add_app_change_file">تغيير</string> + <string name="add_app_pick_script">اختر نصًا برمجيًا</string> + <string name="add_app_pick_appimage">اختر ملف AppImage</string> + <string name="add_app_pick_icon">اختر رمزًا</string> + <string name="add_app_repository">المستودع</string> + <string name="add_app_repository_placeholder">owner/repo أو رابط github.com</string> + <string name="add_app_repository_invalid">ليس مستودع GitHub</string> + <string name="add_app_flatpak_id">معرّف التطبيق</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">ليس معرّف تطبيق على Flathub</string> + <string name="add_app_flatpak_bundle_hint">أو ملف ‎.flatpak لتطبيق غير متوفر على Flathub.</string> + <string name="add_app_pick_flatpak">اختر ملف ‎.flatpak</string> + <string name="add_app_source">المصدر</string> + <string name="add_app_appearance">على سطح المكتب</string> + <string name="add_app_preview_name">تطبيق جديد</string> + <string name="add_app_name">الاسم</string> + <string name="add_app_name_placeholder">من التطبيق</string> + <string name="add_app_icon">الرمز</string> + <string name="add_app_icon_default">الرمز الافتراضي</string> + <string name="add_app_choose_icon">اختيار رمز</string> + <string name="add_app_clear_icon">مسح</string> + <string name="add_app_icon_suggestions">من المستودع</string> + <string name="add_app_icon_searching">جارٍ البحث عن رموز…</string> + <string name="add_app_icon_reset">الافتراضي</string> + <string name="edit_app_title">تعديل %1$s</string> + <string name="edit_app_save">حفظ</string> + <string name="add_app_checking_folder">جارٍ فحص المجلد…</string> + <string name="add_app_folder_linked">مجلده مرتبط بالجلسة: %1$s</string> + <string name="add_app_folder_copied">يحتوي مجلده على برامج Linux لا يمكن تشغيلها من مساحة التخزين المشتركة، لذا يُنسخ إلى DroidDeck (%1$s).</string> + <string name="add_app_confirm">إضافة</string> + <string name="add_app_cancel">إلغاء</string> + <string name="add_app_runtime_required">ثبّت بيئة تشغيل Linux من «الإعداد» أولًا.</string> + <string name="add_app_busy">انتظر حتى ينتهي %1$s.</string> + <string name="steam_compat_label">متوافق</string> + <string name="proton_compatible_note">الإصدارات التي تحمل العلامة «%1$s» في قائمة «التوافق» في Steam تتضمن إصلاحات البادئة من DroidDeck وتشغّل الألعاب هنا. الإصدار الافتراضي هو Proton Experimental ARM64 (%1$s)، أو Proton 11.0 ARM64 (%1$s) بعد تثبيت هذا الإصدار الأحدث. لا يمكن لإدخالات Proton الخاصة بـ Valve التي لا تحمل العلامة تشغيل أي لعبة على هذا الجهاز.</string> + <string name="proton_installed_compatible">مثبّت %1$s · %2$s</string> + <string name="common_cancel">إلغاء</string> + <string name="common_auto">تلقائي</string> + <string name="common_never">أبدًا</string> + <string name="common_always">دائمًا</string> + <string name="common_uninstall">إلغاء التثبيت</string> + <string name="common_check">تحقق</string> + <string name="common_update">تحديث</string> + <string name="common_checking">جارٍ التحقق…</string> + <string name="common_working">جارٍ التنفيذ…</string> + <string name="common_forget">نسيان</string> + <string name="common_add_ellipsis">إضافة…</string> + <string name="common_use">استخدام</string> + <string name="common_applies_next_session">يُطبَّق في الجلسة التالية.</string> + <string name="mode_steam_title">جلسة Steam</string> + <string name="mode_desktop_title">جلسة سطح المكتب</string> + <string name="mode_display">الشاشة</string> + <string name="mode_resolution">دقة الشاشة</string> + <string name="mode_res_720">حتى 720p</string> + <string name="mode_res_900">حتى 900p</string> + <string name="mode_res_1080">حتى 1080p</string> + <string name="mode_res_native">الأصلية</string> + <string name="mode_res_default">%1$s (افتراضي)</string> + <string name="mode_res_custom_value">مخصّصة · %1$d×%2$d</string> + <string name="mode_res_custom">مخصّصة…</string> + <string name="mode_res_note">قد تجعل دقة 720p القوائم أسرع استجابة.</string> + <string name="mode_ratio">نسبة أبعاد الشاشة</string> + <string name="mode_ratio_custom">تحددها الدقة المخصّصة.</string> + <string name="mode_ratio_auto">يستخدم الخيار «تلقائي» نسبة 16:9 على الأقل.</string> + <string name="mode_fps">حد الإطارات</string> + <string name="mode_fps_note">يحدّ الجلسة بأكملها. تنتقل الشاشة إلى معدل تحديث يكون من مضاعفات الحد.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">إخراج HDR10</string> + <string name="mode_hdr_unavailable">غير متاح: %1$s.</string> + <string name="mode_hdr_restart">أعد تشغيل التطبيق لتطبيق التغيير.</string> + <string name="mode_drivers">برامج التشغيل</string> + <string name="mode_gpu_drivers">برامج تشغيل GPU</string> + <string name="mode_gpu_drivers_hint">مشتركة بين Steam وسطح المكتب. يتم ضبطها في صفحة «المكوّنات».</string> + <string name="mode_touch_controls">اللمس وعناصر التحكم</string> + <string name="mode_touch">اللمس</string> + <string name="mode_touch_touchpad">لوحة اللمس</string> + <string name="mode_touch_direct">مباشر</string> + <string name="mode_touch_note">تلقائي: لوحة لمس على سطح المكتب، ولمس مباشر في Steam.</string> + <string name="mode_osc">عناصر التحكم على الشاشة</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">يعرض الخيار «تلقائي» عناصر التحكم عند عدم توصيل وحدة تحكم.</string> + <string name="osc_steam_touch">لمس Steam (تجريبي)</string> + <string name="osc_style_next_session">تبدأ عناصر التحكم باللمس من Steam مع جلسة Steam التالية</string> + <string name="osc_steam_layout">تخطيط لمس Steam</string> + <string name="osc_steam_layout_hint">انقل عناصر التحكم باللمس لهذه اللعبة أو غيّر حجمها أو أخفها؛ ويتم الحفظ في Steam</string> + <string name="mode_controller">وحدة التحكم</string> + <string name="mode_controller_hint">كيف يرى Steam وحدة التحكم لديك. يُطبَّق في الجلسة التالية.</string> + <string name="mode_controller_deck">وحدة تحكم Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">وحدة تحكم Xbox 360</string> + <string name="mode_controller_note">Deck: زر «الوصول السريع» والجيروسكوب. Steam Controller: الشيء نفسه، مع استشعار القبضة على الأزرار الخلفية. DualShock 4 وDualSense: الجيروسكوب، ولوحتا التتبع كلوحة اللمس الخاصة بها. Xbox 360: افتح «الوصول السريع» باستخدام Guide+A.</string> + <string name="mode_back">زر الرجوع</string> + <string name="back_menu_then_qam">القائمة ← الوصول السريع</string> + <string name="back_qam_then_menu">الوصول السريع ← القائمة</string> + <string name="mode_session">الجلسة</string> + <string name="mode_suspend">السلوك في الخلفية</string> + <string name="mode_suspend_hint">عند إخفاء التطبيق أو انطفاء الشاشة.</string> + <string name="mode_suspend_manual">يدوي</string> + <string name="mode_suspend_native">أصلي</string> + <string name="mode_suspend_steam_note">«تلقائي» يوقف مؤقتًا ويستأنف عند الظهور. «أصلي» يجهّز Steam للسكون أولًا. «يدوي» ينتظر الضغط على «استئناف». «أبدًا» يُبقيه قيد التشغيل.</string> + <string name="mode_background_downloads">مواصلة التنزيلات</string> + <string name="mode_background_downloads_hint">تأخير التعليق في الخلفية أثناء قيام Steam بالتنزيل.</string> + <string name="mode_zram">ضغط zRAM</string> + <string name="mode_zram_hint">أثناء تشغيل اللعبة يتم ضغط ذاكرة عميل Steam إلى zram في الجهاز، فتحصل اللعبة على ذاكرة RAM أكبر. يسري عند تشغيل Steam في المرة القادمة.</string> + <string name="mode_zram_unsupported">غير متاح: لا يحتوي هذا الجهاز على zram أو swap، أو أن النواة أقدم من 5.4.</string> + <string name="mode_suspend_note">«تلقائي» يوقف مؤقتًا في الخلفية ويستأنف عند الظهور. «يدوي» ينتظر الضغط على «استئناف». «أبدًا» يُبقيه قيد التشغيل.</string> + <string name="mode_startup">بدء التشغيل</string> + <string name="mode_steam_startup">تشغيل Steam مع DroidDeck</string> + <string name="mode_steam_startup_hint">يفتح جلسة Steam عند تشغيل DroidDeck.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">جارٍ البحث عن إصدارات…</string> + <string name="mode_decky_ready">جاهز لتثبيت %1$s.</string> + <string name="mode_decky_none">لم يتم العثور على إصدار متوافق. حاول مرة أخرى لاحقًا.</string> + <string name="mode_decky_installed">مثبّت · %1$s</string> + <string name="mode_decky_update">يتوفر تحديث · %1$s</string> + <string name="mode_decky_current">محدَّث · %1$s</string> + <string name="mode_decky_loader">المُحمِّل</string> + <string name="mode_decky_install_latest">تثبيت أحدث إصدار</string> + <string name="mode_decky_on">يبدأ مع Steam. أثناء تفعيله، قد تتمكن التطبيقات الأخرى على هذا الجهاز من التحكم في Steam.</string> + <string name="mode_decky_off">متوقف. يبقى منفذ تصحيح الأخطاء عن بُعد في Steam مغلقًا.</string> + <string name="mode_decky_remove_title">هل تريد إلغاء تثبيت Decky Loader؟</string> + <string name="mode_decky_remove_text">يزيل المُحمِّل. يتم الاحتفاظ بالمكونات الإضافية والإعدادات.</string> + <string name="mode_client">العميل</string> + <string name="mode_mangoapp">تراكب الأداء</string> + <string name="mode_mangoapp_hint">أوقفه إذا تعطلت الألعاب أو أصبحت شاشتها سوداء في وضع Deck. يُطبَّق في الجلسة التالية.</string> + <string name="mode_steam_repair">إصلاح عميل Steam</string> + <string name="mode_steam_repair_hint">يُنزّل عميل Steam مجددًا في المرة التالية التي يبدأ فيها Steam. استخدمه إذا بقي Steam على شاشة التحميل. يتم الاحتفاظ بالألعاب وتسجيل الدخول والإعدادات.</string> + <string name="mode_steam_repair_queued">سيتم تنزيل عميل Steam مجددًا في المرة التالية التي يبدأ فيها Steam.</string> + <string name="mode_steam_repair_button">إصلاح</string> + <string name="mode_added_art">الصور الفنية</string> + <string name="mode_sgdb_key">مفتاح API لـ SteamGridDB</string> + <string name="mode_sgdb_key_yours">مفتاحك</string> + <string name="mode_sgdb_edit">تعديل…</string> + <string name="mode_added_art_hint">يملأ الصور الناقصة من Steam، ثم من SteamGridDB. تكون الأولوية لملفات cover.jpg أو hero.jpg أو logo.png أو icon.png الخاصة بك في مجلد اللعبة.</string> + <string name="summary_remove_game">إزالة %1$s</string> + <string name="mode_added_remove_confirm">إزالة؟</string> + <string name="games_add">إضافة لعبة</string> + <string name="games_add_title">إضافة لعبة:</string> + <string name="games_pick_exe_title">اختر ملف exe:</string> + <string name="games_add_unreachable">هذا الموقع غير متاح في الجلسة</string> + <string name="mode_added_exe_check">فحص ملف exe هذا</string> + <string name="wincomp_title">مكوّنات Windows</string> + <string name="wincomp_pad_hint">يتنقل LB / RB بين الأقسام.</string> + <string name="wincomp_card_none">لا شيء</string> + <string name="wincomp_applies">ملفات DLL لنظام Windows لا يتضمنها Proton، من قائمة المكوّنات. فعّل ما تحتاجه هذه اللعبة منها: توضع في مجلد Windows الخاص باللعبة، وليس في ملفاتها أبدًا، وتبقى مهما كان إصدار Proton الذي تعمل عليه.</string> + <string name="wincomp_offline">تعذّر الوصول إلى قائمة المكوّنات. لا يزال بالإمكان تبديل المكوّنات التي تم تنزيلها بالفعل.</string> + <string name="wincomp_recommended">موصى بها لهذه اللعبة</string> + <string name="wincomp_checking">جارٍ التحقق مما تحتاجه هذه اللعبة…</string> + <string name="wincomp_when_online">متاح عند الاتصال بالإنترنت</string> + <plurals name="wincomp_turning_on"> + <item quantity="zero">جارٍ تفعيل %1$d مكوّن…</item> + <item quantity="one">جارٍ تفعيل مكوّن واحد…</item> + <item quantity="two">جارٍ تفعيل مكوّنين…</item> + <item quantity="few">جارٍ تفعيل %1$d مكوّنات…</item> + <item quantity="many">جارٍ تفعيل %1$d مكوّنًا…</item> + <item quantity="other">جارٍ تفعيل %1$d مكوّن…</item> + </plurals> + <string name="wincomp_auto_section">مفعّلة لهذه اللعبة</string> + <string name="wincomp_auto_steam">يثبّت Steam %1$s مع %2$s (التطبيق %3$s)</string> + <string name="wincomp_auto_gog">من قائمة GOG لهذه اللعبة</string> + <string name="wincomp_auto_epic">من متطلبات Epic المسبقة لهذه اللعبة</string> + <string name="wincomp_auto_amazon">من خطوات التثبيت في Amazon لهذه اللعبة</string> + <string name="wincomp_steam_by_name">يثبّت Steam %1$s مع التطبيق %2$s، بالمطابقة حسب الاسم</string> + <string name="wincomp_suggestions">مُدرجة أيضًا</string> + <string name="wincomp_suggestion_reason">مُدرج من %1$s؛ ليس مكوّنًا هنا</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">تأتي اللعبة مع %1$s</string> + <string name="wincomp_found_shipped">تحتوي اللعبة على %1$s (غالبًا يعمل كما هو)</string> + <string name="wincomp_already_here">موجود بالفعل في هذه اللعبة</string> + <string name="wincomp_no_recommendation">لا شيء في مجلد اللعبة يشير إلى مكوّن.</string> + <string name="wincomp_active">مثبّتة لهذه اللعبة (%1$d)</string> + <string name="wincomp_all">جميع المكوّنات (%1$d)</string> + <string name="wincomp_installers">تتطلب مثبّت Windows (%1$d)</string> + <string name="wincomp_installers_note">هذه برامج إعداد مستقلة لا تحتوي على حزمة يمكن تفكيكها، ولا يوجد بعد تسجيل لما تثبّته. معظمها بيئات تشغيل قديمة يحل محلها بالفعل Mono المضمّن في Proton، وتُضاف التسجيلات عند إنشائها.</string> + <string name="wincomp_show">إظهار</string> + <string name="wincomp_hide">إخفاء</string> + <string name="wincomp_needs_installer">يشغّل برنامج الإعداد الخاص به (لا يوجد تسجيل بعد)</string> + <string name="wincomp_unsupported">غير مدعوم هنا بعد</string> + <string name="wincomp_loading">جارٍ تحميل المكوّنات…</string> + <string name="wincomp_failed">تعذّر التثبيت: %1$s</string> + <string name="wincomp_downloaded">تم التنزيل</string> + <string name="wincomp_downloading">جارٍ تنزيل %1$s</string> + <string name="wincomp_installing">جارٍ التثبيت: %1$s</string> + <string name="wincomp_reverting">جارٍ التعطيل…</string> + <string name="wincomp_download_size">تنزيل بحجم %1$s</string> + <string name="wincomp_next_launch">يسري مفعوله في المرة التالية التي تبدأ فيها اللعبة.</string> + <string name="mode_stretch169">تمديد ألعاب 16:9</string> + <string name="mode_stretch169_hint">على الشاشات الأقرب إلى الشكل المربع من 16:9، يمدّ الألعاب لملء الشاشة بدلًا من عرض أشرطة. يُطبَّق في الجلسة التالية.</string> + <string name="mode_audio">الصوت</string> + <string name="mode_directaudio">DirectAudio للألعاب</string> + <string name="mode_directaudio_hint">يتجاوز PulseAudio لتقليل زمن الاستجابة.</string> + <string name="mode_mic">الميكروفون</string> + <string name="mode_mic_hint">للدردشة الصوتية.</string> + <string name="mode_network">الشبكة</string> + <string name="mode_wifi_discovery">اكتشاف Wi-Fi</string> + <string name="mode_wifi_discovery_hint">عرض أسماء شبكات Wi-Fi والشبكات القريبة في Steam.</string> + <string name="mode_wifi_location_off">خدمات الموقع متوقفة.</string> + <string name="mode_wifi_permission_denied">لم يتم منح إذن الموقع.</string> + <string name="mode_wifi_open_settings">فتح الإعدادات</string> + <string name="mode_wifi_continue">متابعة</string> + <string name="mode_wifi_explain_title">هل تريد تفعيل اكتشاف Wi-Fi؟</string> + <string name="mode_wifi_explain_text">يتطلب Android إذن الموقع لقراءة أسماء شبكات Wi-Fi واكتشاف الشبكات القريبة. يستخدم DroidDeck هذا الإذن لعرض تلك الشبكات في Steam. نحن لا نتتبع موقعك. يعمل الوصول إلى الإنترنت بدون هذا الإذن.</string> + <string name="mode_storage">تخزين الألعاب</string> + <string name="mode_storage_auto">تلقائي - بطاقة SD عند توفرها، بالإضافة إلى مجلدات Games لديك</string> + <string name="mode_storage_auto_none">تلقائي - مجلدات Games لديك، بالإضافة إلى بطاقة SD عند توفرها (غير موجودة حاليًا)</string> + <string name="mode_storage_internal">مساحة التخزين الداخلية فقط</string> + <string name="mode_storage_folder">المجلد: %1$s</string> + <string name="mode_second_library">مكتبة ثانية</string> + <string name="mode_storage_note">قد تتقطع الألعاب التي تحمّل ملفاتها باستمرار من بطاقة SD أو من مساحة التخزين المشتركة.</string> + <string name="mode_storage_diagnostics">تشخيص التخزين</string> + <string name="mode_storage_diagnostics_hint">يسجّل نتائج تخصيص المساحة وعينات من توقيتات التخزين في «مشاركة السجلات». قد يبطئ عمليات التثبيت أثناء تفعيله. يُطبَّق في الجلسة التالية.</string> + <string name="mode_choose_folder">اختيار مجلد…</string> + <string name="mode_custom_res_title">دقة مخصّصة</string> + <string name="mode_custom_res_text">تحل محل الحد والنسبة. يُعرض الحجم غير المطابق للشاشة مع أشرطة.</string> + <string name="mode_width">العرض</string> + <string name="mode_height">الارتفاع</string> + <string name="mode_custom_res_range">بين ‎320×240‎ و‎3840×2160‎.</string> + <plurals name="mode_added_count"> + <item quantity="zero">%1$d لعبة</item> + <item quantity="one">لعبة واحدة</item> + <item quantity="two">لعبتان</item> + <item quantity="few">%1$d ألعاب</item> + <item quantity="many">%1$d لعبة</item> + <item quantity="other">%1$d لعبة</item> + </plurals> + <string name="common_ok">حسنًا</string> + <string name="common_delete">حذف</string> + <string name="common_restore">استعادة</string> + <string name="common_download">تنزيل</string> + <string name="common_delete_named">حذف %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">برنامج تشغيل بيئة التشغيل</string> + <string name="comp_runtime_driver_hint">يستخدمه Steam والألعاب وسطح المكتب. يُطبَّق في الجلسة التالية.</string> + <string name="comp_import_turnip">استيراد ملف zip لـ Turnip…</string> + <string name="comp_display_driver">برنامج تشغيل العرض</string> + <string name="comp_display_driver_hint">يرسم الإطارات على الشاشة في كلا الوضعين. أعد تشغيل التطبيق لتطبيق التغيير.</string> + <string name="comp_import_adrenotools">استيراد ملف zip لـ AdrenoTools…</string> + <string name="comp_never">لم يتم بعد</string> + <string name="comp_nightlies_checked">آخر فحص للإصدارات الليلية: %1$s</string> + <string name="comp_title">المكوّنات</string> + <string name="comp_about">حول المكوّنات</string> + <string name="comp_check_drivers">البحث عن برامج تشغيل جديدة</string> + <string name="comp_check_nightlies">البحث عن حزم جديدة في الإصدارات الليلية</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">يشغّل Proton المختار هنا كل لعبة لم تختر إصدارها الخاص في Steam، ويظهر هنا أيضًا أي تغيير يتم في Steam. يستبدل Steam إصدار Proton من Valve عند تحديثه، ويُحتفظ بالملفات الأصلية لكل إصدار.</string> + <string name="comp_scope">التهيئة</string> + <string name="comp_profile_configure">تهيئة ملف التعريف</string> + <string name="comp_profile">ملف التعريف</string> + <string name="comp_scope_general">ملف التعريف الافتراضي</string> + <string name="comp_scope_general_detail">تستخدمه تلقائيًا الألعاب التي ليست لها تجاوزات.</string> + <string name="comp_profile_game_detail">إعدادات محفوظة تُستخدم تلقائيًا عند تشغيل %1$s.</string> + <string name="comp_game_hint">اختر فقط الإعدادات التي تحتاجها هذه اللعبة. يواصل كل ما عداها استخدام ملف التعريف الافتراضي.</string> + <string name="comp_game_fex">إعداد FEX المسبق</string> + <string name="comp_game_fex_inherited">يتم استخدام الإعداد المسبق لملف التعريف الافتراضي.</string> + <string name="comp_game_fex_override">تم حفظ إعداد مسبق مخصّص لهذه اللعبة.</string> + <string name="comp_game_fex_custom">متغيرات FEX المخصّصة</string> + <string name="comp_game_use_general">استخدام الافتراضي</string> + <string name="comp_game_compatibility">توافق اللعبة</string> + <string name="comp_game_environment_hint">خيارات البيئة لـ Proton وDXVK وVKD3D والمزامنة لهذه اللعبة.</string> + <string name="comp_game_proton_inherited">يتم استخدام Proton من ملف التعريف الافتراضي.</string> + <string name="comp_game_proton_override">تم حفظ Proton مخصّص لهذه اللعبة عبر تعيين التوافق في Steam.</string> + <string name="comp_no_proton_short">بدون Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">يستخدم حزمة ملف التعريف الافتراضي من %1$s ما لم تحدد هذه اللعبة حزمة أخرى.</string> + <string name="comp_game_component_general">يستخدم حزمة المكوّنات من ملف التعريف الافتراضي.</string> + <string name="comp_game_component_override">يستخدم %1$s لهذه اللعبة فقط.</string> + <string name="comp_game_runtime_options">خيارات بيئة التشغيل</string> + <string name="comp_game_environment_other_hint">خيارات بيئة أخرى لكل لعبة لـ Proton وDXVK وVKD3D-Proton والمزامنة.</string> + <string name="comp_game_saved_next">تم حفظ ملف تعريف %1$s للتشغيل التالي للعبة.</string> + <string name="game_no_steam_title">بدء اللعبة بدون Steam</string> + <string name="game_no_steam_detail">يفتحها في Proton/FEX بدون عميل Steam؛ ميزات Steam معطّلة.</string> + <string name="game_no_steam_on">تشغيل</string> + <string name="game_steam_with">يبدأ مع Steam</string> + <string name="game_steam_without">يبدأ بدون Steam</string> + <string name="game_settings_card">الإعدادات</string> + <string name="game_settings_menu_title">إعدادات %1$s</string> + <string name="game_settings_default">الافتراضي</string> + <string name="game_settings_default_detail">يعيد كل ما تم تغييره لهذه اللعبة إلى إعدادات التطبيق.</string> + <string name="game_sync_custom">متغيرات مزامنة مخصصة</string> + <string name="comp_game_proton_live">تم حفظ اختيار Proton لـ %1$s وهو متاح في Steam الآن.</string> + <string name="comp_game_proton_next">تم حفظ اختيار Proton لـ %1$s. أعد تشغيل Steam قبل تشغيل اللعبة.</string> + <string name="comp_game_proton_not_runnable">لا يمكن لـ %1$s استخدام Proton المحدد على هذا الجهاز.</string> + <string name="comp_game_load_failed">تعذّر تحميل ملف تعريف %1$s: %2$s</string> + <string name="comp_game_save_failed">تعذّر حفظ ملف تعريف اللعبة: %1$s</string> + <string name="comp_game_reset">إعادة تعيين ملف تعريف اللعبة</string> + <string name="comp_game_reset_title">هل تريد إعادة تعيين ملف تعريف %1$s؟</string> + <string name="comp_game_reset_body">هل تريد إزالة تجاوزات Proton وFEX وحزمة المكوّنات والبيئة وتصفية الأنسجة ومكوّنات Windows لهذه اللعبة؟ ستستخدم ملف التعريف الافتراضي.</string> + <string name="comp_game_reset_done">يستخدم %1$s الآن ملف التعريف الافتراضي.</string> + <string name="comp_game_reset_failed">تعذّرت إعادة تعيين ملف تعريف اللعبة بالكامل: %1$s</string> + <string name="comp_default_live">يشغّل %1$s الآن كل لعبة لم تختر إصدار Proton الخاص بها في Steam.</string> + <string name="comp_default_next">سيشغّل %1$s كل لعبة لم تختر إصدار Proton الخاص بها، بدءًا من المرة التالية التي يبدأ فيها Steam.</string> + <string name="comp_default_not_runnable">لا يمكن لـ %1$s تشغيل الألعاب هنا، لذا لا يمكن أن يكون الافتراضي.</string> + <string name="comp_default_failed">تعذّر حفظ Proton الافتراضي: %1$s</string> + <string name="comp_swapped">%1$s · تم تبديل %2$d</string> + <string name="comp_all_original">%1$s · الكل أصلي</string> + <string name="comp_game_running_suffix">%1$s · لعبة قيد التشغيل</string> + <string name="comp_esync_pack">%1$s · حزمة droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · لا توجد حزمة droiddeck-esync بعد</string> + <string name="comp_esync_builtin">%1$s · esync مضمّن، لا حاجة إلى حزمة</string> + <string name="comp_gpu_drivers">برامج تشغيل GPU</string> + <string name="comp_reapplied">%1$s · أُعيد تطبيقه عند التشغيل %2$s</string> + <string name="comp_next_queued">التالي: %1$s · بعد إغلاق اللعبة</string> + <string name="comp_in_use">%1$s قيد الاستخدام: %2$s</string> + <string name="comp_waits">ينتظر حتى تُغلق اللعبة</string> + <string name="comp_applies_next_game">يُطبَّق في المرة التالية التي تبدأ فيها لعبة</string> + <string name="comp_import_zip">استيراد ملف ‎.zip</string> + <string name="comp_reading">جارٍ قراءة إصدارات Proton…</string> + <string name="comp_no_proton">لم يتم تثبيت أي إصدار من Proton بعد. شغّل Steam مرة واحدة لتنزيل Proton لـ ARM64، أو أضف GE-Proton أو CachyOS أو DroidDeck-Proton من «الإعداد».</string> + <string name="comp_original">الأصلي · %1$s</string> + <string name="comp_this_build">%1$s · هذا الإصدار</string> + <string name="comp_earlier_build">%1$s · إصدار سابق</string> + <string name="comp_installed_count">مثبّتة · %1$d</string> + <string name="comp_nothing_stored">لا يوجد شيء مخزّن لـ %1$s بعد. تُحفظ ملفات Proton هذا الخاصة به كنسخة أصلية.</string> + <string name="comp_waits_long">هناك لعبة تعمل على Proton هذا، لذا سينتظر هذا حتى تُغلق.</string> + <string name="comp_applies_long">يُطبَّق في المرة التالية التي تبدأ فيها لعبة.</string> + <string name="comp_swap_title">هل تريد تبديل %1$s؟</string> + <string name="comp_swap_body">هل تريد وضع %1$s في %2$s؟ تبقى ملفاته الأصلية محفوظة. %3$s</string> + <string name="comp_restore_title">هل تريد استعادة %1$s؟</string> + <string name="comp_restore_body">هل تريد إعادة النسخة الأصلية من %1$s إلى %2$s؟ %3$s</string> + <string name="comp_delete_package_body">يزيل الحزمة من التطبيق. يمكنك تنزيلها مجددًا.</string> + <string name="comp_delete_original_title">هل تريد حذف هذه النسخة الأصلية؟</string> + <string name="comp_delete_original_body">هذه النسخة الأصلية من %1$s تعود إلى إصدار سابق من %2$s. يتم دائمًا الاحتفاظ بالنسخة الأصلية للإصدار الحالي.</string> + <string name="comp_nightlies_count">في الإصدارات الليلية · %1$d</string> + <string name="comp_refresh_to_list">حدّث لعرض الحزم في الإصدارات الليلية.</string> + <string name="comp_nothing_new">لا جديد منذ آخر فحص.</string> + <string name="comp_import_wcp">استيراد ملف ‎.wcp</string> + <string name="comp_restore_original">استعادة النسخة الأصلية لـ Proton هذا</string> + <string name="comp_restore_original_body">هل تريد إعادة %2$s الأصلي الخاص بـ %1$s؟</string> + <string name="comp_swap">تبديل</string> + <string name="comp_about_text">FEX وDXVK وVKD3D-Proton لكل إصدار من Proton يشغّل به Steam الألعاب.\n\nاختر صفًا مثبّتًا لتبديله. يُطبَّق في المرة التالية التي تبدأ فيها لعبة، أو بعد إغلاق اللعبة قيد التشغيل.\n\nيُعاد التحقق من اختياراتك قبل كل تشغيل وتُستعاد إذا غيّرها أي شيء. يُحتفظ بالملفات الأصلية لكل إصدار من Proton، لذا لا تضيع أبدًا مع تحديثات Steam.</string> + <string name="comp_tag_original">أصلي</string> + <string name="comp_tag_in_use">قيد الاستخدام</string> + <string name="comp_tag_new">جديد</string> + <string name="comp_tag_stored">مخزّن</string> + <string name="perf_title">الأداء</string> + <string name="perf_lede">أنوية CPU وإصلاحات الجلسة واسم المضيف. يُطبَّق في الجلسة التالية.</string> + <string name="perf_client_cores_group">أنوية عميل Steam</string> + <string name="perf_override">تجاوز اختيار Steam للأنوية</string> + <string name="perf_override_hint">يثبّت Steam ومساعد واجهته وgamescope على الأنوية أدناه.</string> + <string name="perf_client_cores">أنوية العميل</string> + <string name="perf_client_cores_on">الأنوية المخصّصة لـ Steam.</string> + <string name="perf_client_cores_off">فعّل التجاوز لتتمكن من الاختيار.</string> + <string name="perf_game_cores_group">أنوية الألعاب</string> + <string name="perf_game_cores">أنوية الألعاب</string> + <string name="perf_game_cores_hint">الأنوية المخصّصة للألعاب. عند تحديدها جميعًا، يوزّع Android المهام بحرية.</string> + <string name="perf_client_ui">واجهة العميل</string> + <string name="perf_glthread">GL متعدد مؤشرات الترابط</string> + <string name="perf_glthread_hint">قد يجعل قوائم Steam أسرع استجابة.</string> + <string name="perf_zink">Zink: الواصفات المؤجلة</string> + <string name="perf_zink_hint">موصى به لبرامج التشغيل التي لا تدعم مخازن الواصفات.</string> + <string name="perf_noglerror">تخطي فحوص أخطاء GL</string> + <string name="perf_noglerror_hint">يوقف التحقق من GL عند كل استدعاء.</string> + <string name="perf_gsrealtime">gamescope: طابور GPU بأولوية الوقت الفعلي</string> + <string name="perf_gsrealtime_hint">يعطي الأولوية لعمل GPU الخاص بالمُركِّب. قد يحسّن انتظام الإطارات على حساب أداء الألعاب قليلًا.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">تثبيت GPU على أعلى تردد له</string> + <string name="perf_gpuclock_hint">لـ Adreno فقط. تقطّع أقل، مع استهلاك أكبر للبطارية والحرارة.</string> + <string name="perf_fixes">إصلاحات الجلسة</string> + <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_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> + <string name="perf_esync_hint">تنتظر مؤشرات ترابط Windows في اللعبة بعضها بعضًا عبر eventfd والذاكرة المشتركة، بدلًا من رحلات ذهاب وعودة عبر wineserver. يستخدم حزمة droiddeck-esync مُعدّة لإصدار Proton ذاك بالضبط؛ وتُجلَب الحزم تلقائيًا. وإلى أن تتوفر حزمة لإصدار Proton جديد، يحل droiddeck-fsync محله. يُطبَّق في الجلسة التالية.</string> + <string name="perf_xalia_hint">يعطّل مساعد التنقّل بوحدة التحكم في Proton، الذي يستهلك CPU في كل لعبة.</string> + <string name="perf_seccomp">تشغيل proot بلا seccomp</string> + <string name="perf_seccomp_hint">قد يُصلح أخطاء استدعاءات النظام (syscall) الناقصة على بعض الأنوية. قد يقلّل الأداء.</string> + <string name="perf_fastpath">مسار proot السريع</string> + <string name="perf_fastpath_needs_seccomp">يحتاج إلى مرشّح seccomp في proot.</string> + <string name="perf_fastpath_hint">عمليات بحث أسرع عن الملفات وتقطّع أقل. أوقفه إذا تعذّر على برنامج العثور على ملفاته.</string> + <string name="perf_identity">هوية الجلسة</string> + <string name="perf_hostname">اسم المضيف</string> + <string name="perf_hostname_hint">الاسم الذي يراه Steam لهذا الجهاز. اتركه خاليًا للاستعادة إلى %1$s.</string> + <string name="perf_hostname_invalid">أحرف وأرقام وشرطات داخلية فقط، حتى 63 حرفًا.</string> + <string name="perf_phantom_warning">Android مهيَّأ لإنهاء هذه الجلسة</string> + <string name="driver_installed">مثبّت</string> + <string name="driver_available">متاح للتنزيل</string> + <string name="driver_nothing_new">لا جديد منذ آخر تحقّق.</string> + <string name="driver_restore_builtin">استعادة برامج التشغيل المدمجة</string> + <string name="driver_delete_builtin">مدمج في التطبيق: هذا يزيل ملفاته غير المضغوطة ويخفيه. «استعادة برامج التشغيل المدمجة» يعيده.</string> + <string name="driver_delete_bundle">نصف حزمة Android + Linux: تُزال كلا النصفين. يرجع برنامج التشغيل قيد الاستخدام إلى الافتراضي.</string> + <string name="driver_delete_plain">تُزال ملفاته من التطبيق.</string> + <string name="driver_delete_in_use">تُزال ملفاته. إنه قيد الاستخدام، فيتولى الافتراضي مكانه.</string> + <string name="drawer_page_display">العرض</string> + <string name="drawer_page_effects">المؤثرات</string> + <string name="drawer_page_controls">عناصر التحكم</string> + <string name="drawer_page_components">المكوّنات</string> + <string name="drawer_page_controller">وحدة التحكم</string> + <string name="drawer_page_settings">الإعدادات</string> + <string name="drawer_page_desc">صفحة %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">سطح المكتب</string> + <string name="drawer_steam_menu">قائمة Steam</string> + <string name="drawer_quick_access">الوصول السريع</string> + <string name="drawer_open_qam">فتح قائمة الوصول السريع</string> + <string name="drawer_prev_page">الصفحة السابقة</string> + <string name="drawer_next_page">الصفحة التالية</string> + <string name="drawer_hud">واجهة الأداء</string> + <string name="drawer_scaling">وضع التحجيم</string> + <string name="drawer_scaling_sharpness">حدة التحجيم</string> + <string name="drawer_effects">مؤثرات الشاشة</string> + <string name="drawer_effects_hint">فوري. يستهلك وقت GPU قليلًا أثناء تفعيل أي مؤثر.</string> + <string name="drawer_look">الإعدادات المسبقة</string> + <string name="drawer_look_custom">مخصّص</string> + <string name="drawer_effects_advanced">متقدّم</string> + <string name="widgets_expanded">موسّع</string> + <string name="widgets_collapsed">مصغّر</string> + <string name="drawer_cas">الحدة (CAS)</string> + <string name="drawer_cas_level">مستوى الحدة</string> + <string name="drawer_fake_hdr">HDR مزيّف</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">تشغيل SteamVR</string> + <string name="steamvr_checking">جارٍ التحقق من SteamVR…</string> + <string name="drawer_deband">إزالة التدرّج اللوني</string> + <string name="drawer_deband_strength">قوة إزالة التدرّج اللوني</string> + <string name="drawer_brightness">السطوع</string> + <string name="drawer_contrast">التباين</string> + <string name="drawer_gamma">غاما</string> + <string name="drawer_saturation">التشبّع</string> + <string name="drawer_fxaa">FXAA (تنعيم الحواف)</string> + <string name="drawer_toon">الحدود الكرتونية</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">تصفية الملمس</string> + <string name="drawer_texture_hint">ألعاب DirectX 9–11، من تشغيلها التالي.</string> + <string name="drawer_anisotropy">التصفية اللامتجانسة</string> + <string name="drawer_texture_sharpness">حدة الملمس</string> + <string name="drawer_texture_sharpness_note">انحياز mip سالب: ملمس أكثر حدة مع بعض التلألؤ. يطابق الخيار «تلقائي» مقدار تكبير الجلسة إلى الشاشة.</string> + <string name="drawer_touch_auto">تلقائي (%1$s)</string> + <string name="drawer_keyboard">لوحة المفاتيح</string> + <string name="drawer_latency">زمن الاستجابة</string> + <string name="drawer_low_latency_controller">وحدة تحكم بزمن استجابة منخفض</string> + <string name="drawer_low_latency_controller_hint">تبلغ وحدة التحكم بمعدل 1000 هرتز بدلًا من 250 هرتز. استهلاك معالج أعلى قليلًا.</string> + <string name="drawer_low_latency_touch">لمس بزمن استجابة منخفض</string> + <string name="drawer_low_latency_touch_hint">تتجاوز اللمسات تجميع الإطارات، فيعمل اللمس في Steam بمعدل 1000 هرتز. استهلاك معالج أعلى قليلًا.</string> + <string name="drawer_pc_keyboard">لوحة مفاتيح الكمبيوتر</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">الشاشة الثانية</string> + <string name="drawer_second_screen_mode">الوضع</string> + <string name="drawer_second_screen_shows">يعرض</string> + <string name="drawer_android_apps">تطبيقات Android</string> + <string name="drawer_launch_app">تشغيل تطبيق</string> + <string name="common_hide">إخفاء</string> + <string name="common_show">إظهار</string> + <string name="drawer_no_apps">لا تطبيقات قابلة للتشغيل</string> + <string name="drawer_session_behavior">سلوك الجلسة</string> + <string name="drawer_suspend_hint">يُطبَّق الآن وعلى الجلسات القادمة في هذا الوضع.</string> + <string name="drawer_next_session">الجلسة التالية</string> + <string name="drawer_support">الدعم</string> + <string name="drawer_logs">سجلات الجلسة</string> + <string name="drawer_logs_hint">أرفقها بتقرير خلل</string> + <string name="drawer_share_logs">مشاركة السجلات</string> + <string name="drawer_background">الخلفية</string> + <string name="drawer_stop">إيقاف</string> + <string name="drawer_stop_title">إيقاف الجلسة؟</string> + <string name="drawer_running_now">قيد التشغيل الآن</string> + <string name="drawer_no_game">لا توجد لعبة قيد التشغيل على Proton</string> + <string name="drawer_selected_profile">ملف تعريف اللعبة</string> + <string name="drawer_selected_profile_none">تفاصيل ملف التعريف غير متاحة بعد.</string> + <string name="drawer_profile_refresh_failed_initial">تعذّر تحميل ملفات تعريف الألعاب. تتم إعادة المحاولة تلقائيًا.</string> + <string name="drawer_profile_refresh_failed_stale">تعذّر تحديث ملفات تعريف الألعاب. تُعرَض آخر بيانات متاحة؛ وتتم إعادة المحاولة تلقائيًا.</string> + <string name="drawer_profile_inspect_hint">عرض وتعديل الإعدادات المحفوظة المستخدَمة في التشغيل التالي.</string> + <string name="drawer_profile_default">استخدام ملف التعريف الافتراضي</string> + <string name="drawer_profile_custom">ملف تعريف مخصّص</string> + <string name="drawer_component_inherited">استخدام %1$s من ملف التعريف الافتراضي.</string> + <string name="drawer_game_components_note">تُحفَظ التغييرات في ملف تعريف %1$s وتُطبَّق عند تشغيل اللعبة التالي.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="zero">لا تجاوزات للعبة</item> + <item quantity="one">تجاوز واحد للعبة</item> + <item quantity="two">تجاوزان للعبة</item> + <item quantity="few">%1$d تجاوزات للعبة</item> + <item quantity="many">%1$d تجاوزًا للعبة</item> + <item quantity="other">%1$d تجاوز للعبة</item> + </plurals> + <string name="drawer_no_proton">لم يتم تثبيت أي Proton بعد.</string> + <string name="drawer_game_running">لعبة قيد التشغيل</string> + <string name="drawer_reapplied">أُعيد تطبيقه عند التشغيل %1$s</string> + <string name="drawer_original">الأصلي</string> + <string name="drawer_components_note">الاستيراد والحذف من صفحة «المكوّنات».</string> + <string name="setup_check_done">تم</string> + <string name="setup_check_warn">يحتاج إلى انتباه</string> + <string name="setup_check_busy">قيد التنفيذ</string> + <string name="setup_limit_adb_failed">تحقّق من عنوان IP والمنفذ في تصحيح الأخطاء اللاسلكي، أو أعد الإقران إذا أزال Android هذا الجهاز.</string> + <string name="setup_install">تثبيت</string> + <string name="setup_manage">إدارة</string> + <string name="setup_tab_overview">نظرة عامة</string> + <string name="setup_tab_controller">وحدة التحكم</string> + <string name="setup_tab_session">الجلسة</string> + <string name="setup_tab_launcher">المشغّل</string> + <string name="setup_title">الإعداد</string> + <string name="setup_all_set">● الكل جاهز</string> + <string name="setup_n_ready">%1$d من %2$d جاهز</string> + <string name="setup_system_check">فحص النظام</string> + <string name="setup_gpu_supported">الجهاز مدعوم</string> + <string name="setup_gpu_untested">GPU غير مُختبَر</string> + <string name="setup_gpu_unsupported">GPU غير مدعوم</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">يحتاج Steam إلى برنامج تشغيل Adreno؛ قد يعرض %1$s شاشة سوداء</string> + <string name="setup_runtime">بيئة تشغيل Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">غير مثبّت · نحو 3 GB، يُثبَّت عند أول تشغيل</string> + <string name="setup_installed">مثبّت</string> + <string name="setup_runtime_update">%1$s · يتوفر تحديث</string> + <string name="setup_runtime_current">%1$s · محدَّث</string> + <string name="setup_limit">حد العمليات الفرعية</string> + <string name="setup_limit_on">مفعَّل · قد يُغلق Android تطبيق Steam. إيقافه يستغرق دقيقة.</string> + <string name="setup_limit_unset">غير مُحدَّد · قد يُغلق Android تطبيق Steam. إيقافه يستغرق دقيقة.</string> + <string name="setup_limit_unknown">تعذّر التحقّق منه · إيقافه يستغرق دقيقة.</string> + <string name="setup_fix_it">إصلاح</string> + <string name="setup_details">التفاصيل</string> + <string name="setup_dev_options">خيارات المطوّرين</string> + <string name="setup_use_wireless">استخدام تصحيح الأخطاء اللاسلكي</string> + <string name="setup_check_again">التحقّق مرة أخرى</string> + <string name="setup_limit_turn_on">تفعيل الحد</string> + <string name="setup_account">حساب Steam</string> + <string name="setup_signed_in_offline">تم تسجيل الدخول باسم %1$s · وضع عدم الاتصال</string> + <string name="setup_signed_in">تم تسجيل الدخول باسم %1$s</string> + <string name="setup_sign_in">اضغط على «تشغيل» وسجّل الدخول إلى Steam</string> + <string name="setup_tools">الأدوات</string> + <string name="setup_controller">وحدة التحكم</string> + <string name="setup_controller_unavailable">إعدادات وحدة التحكم غير متاحة.</string> + <string name="setup_session">الجلسة</string> + <string name="setup_logs">سجلات الجلسة</string> + <string name="setup_logs_hint">تُحفَظ بعد كل جلسة</string> + <string name="setup_agent_commands">أدوات تصحيح الأخطاء</string> + <string name="setup_latest_logs">أحدث سجلات الجلسة</string> + <string name="setup_saved_logs">سجلات الجلسة المحفوظة</string> + <string name="setup_saved_logs_hint">يحتفظ بأحدث %1$d</string> + <string name="setup_clear_logs">مسح السجلات</string> + <string name="setup_reset_settings">إعادة تعيين كل الإعدادات</string> + <string name="setup_reset_settings_hint">إرجاع كل إعداد إلى قيمته الافتراضية</string> + <string name="setup_reset_settings_button">إعادة تعيين</string> + <string name="setup_reset_settings_title">إعادة تعيين كل الإعدادات؟</string> + <string name="setup_reset_settings_body">تعود إعدادات الصورة والأداء ووحدة التحكم والمظهر واللغة والمشغّل إلى الافتراضي. تبقى ألعابك وتسجيل الدخول إلى Steam وحسابات المتاجر وبرامج التشغيل المنزّلة ومجلدات التخزين.</string> + <string name="setup_reset_settings_profiles">إعادة تعيين ملفات تعريف الألعاب أيضًا (Proton وFEX والمكوّنات وبيئة التشغيل لكل لعبة، وبيئة ملف التعريف الافتراضي)</string> + <string name="setup_reset_settings_session_running">أوقف الجلسة قبل إعادة تعيين الإعدادات.</string> + <string name="setup_reset_settings_partial">أُعيد تعيين الإعدادات، لكن ليس كلها. التفاصيل في السجلات.</string> + <string name="setup_offline">وضع عدم الاتصال</string> + <string name="setup_sign_in_first">سجّل الدخول إلى Steam أولًا</string> + <string name="setup_launcher">المشغّل</string> + <string name="setup_language">اللغة</string> + <string name="setup_language_hint">يستخدمها Steam أيضًا، من المرة التالية التي يبدأ فيها.</string> + <string name="setup_language_system">الافتراضي للنظام (%1$s)</string> + <string name="setup_language_system_short">الافتراضي للنظام</string> + <string name="setup_app_scale">تحجيم التطبيق</string> + <string name="setup_app_scale_hint">نصوص DroidDeck وعناصر التحكم فيه</string> + <string name="setup_app_scale_default">%1$d%% (افتراضي)</string> + <string name="setup_theme">المظهر</string> + <string name="setup_theme_hint">مظهر المشغّل</string> + <string name="setup_home">استخدام كشاشة رئيسية</string> + <string name="setup_home_on">يمكن أن يكون DroidDeck تطبيق الشاشة الرئيسية</string> + <string name="setup_home_off">لا يُعرَض DroidDeck أبدًا كتطبيق للشاشة الرئيسية</string> + <string name="setup_orientation">الاتجاه</string> + <string name="setup_orientation_auto">أفقي تلقائي</string> + <string name="setup_orientation_landscape">أفقي</string> + <string name="setup_orientation_reverse">أفقي معكوس</string> + <string name="setup_fullscreen">ملء الشاشة</string> + <string name="setup_fullscreen_on">يخفي شريطي الحالة والتنقّل في Android</string> + <string name="setup_fullscreen_off">يعرض شريطي الحالة والتنقّل في Android</string> + <string name="setup_default_home">تطبيق الشاشة الرئيسية الافتراضي</string> + <string name="setup_choose_home">اختيار تطبيق للشاشة الرئيسية</string> + <string name="setup_choose">اختيار</string> + <string name="setup_linux_apps">تطبيقات Linux (تجريبي)</string> + <string name="setup_tool_files">الملفات</string> + <string name="setup_tool_files_hint">تصفّح الملفات وإدارتها</string> + <string name="setup_tool_protons">إصدارات Proton</string> + <string name="setup_tool_protons_hint">تثبيت إصدارات Proton لـ ARM64</string> + <string name="setup_tool_performance">الأداء</string> + <string name="setup_tool_performance_hint">تخصيص أنوية CPU</string> + <string name="setup_tool_roms">مجلد ROMs</string> + <string name="setup_tool_roms_hint">حيث تُخزَّن ألعاب المحاكيات</string> + <string name="setup_card_components">المكوّنات</string> + <string name="setup_card_components_hint">FEX، DXVK، VKD3D</string> + <string name="setup_card_controls">عناصر التحكم</string> + <string name="setup_card_controls_hint">تعيين الأزرار</string> + <string name="store_tab_discover">استكشاف</string> + <string name="store_tab_search">البحث</string> + <string name="store_tab_installed">المثبّتة</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">المتجر</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak جاهز</string> + <string name="store_needs_runtime">ثبّت بيئة تشغيل Linux من «الإعداد» أولًا.</string> + <string name="store_setup_title">إعداد Flatpak</string> + <string name="store_setup_text">يضيف Flatpak ويصله بـ Flathub (نحو 20 MB). يُنزِّل أول تطبيق بيئة تشغيله أيضًا.</string> + <string name="store_setting_up">جارٍ الإعداد…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">التحديثات</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">جارٍ البدء…</string> + <string name="store_categories">الفئات</string> + <string name="store_unreachable">تعذّر الوصول إلى Flathub. تحقّق من اتصالك وحاول مرة أخرى.</string> + <string name="store_try_again">إعادة المحاولة</string> + <string name="store_search_label">البحث في Flathub</string> + <string name="store_search_placeholder">Firefox، ألعاب، محاكيات…</string> + <string name="store_search">بحث</string> + <string name="store_all">الكل</string> + <string name="store_searching">جارٍ البحث…</string> + <string name="store_search_hint">ابحث بالاسم أو اختر فئة. تُعرَض تطبيقات ARM64 فقط.</string> + <string name="store_no_results">لا توجد تطبيقات ARM64 على Flathub تطابق ذلك.</string> + <string name="store_results">النتائج</string> + <string name="store_check_updates">التحقّق من التحديثات</string> + <string name="store_update_all">تحديث الكل (%1$d)</string> + <string name="store_all_current">● كل شيء محدَّث</string> + <string name="store_no_apps">لا تطبيقات حتى الآن. ابحث عنها ضمن «استكشاف» أو «البحث».</string> + <string name="store_setup_first_note">أعدّ Flatpak لتثبيت التطبيقات.</string> + <string name="store_update_available_prefix">تحديث متاح · %1$s</string> + <string name="store_open">فتح</string> + <string name="store_details">التفاصيل</string> + <string name="store_remove">إزالة</string> + <string name="store_press_again">اضغط مرة أخرى للإزالة</string> + <string name="store_installing">جارٍ التثبيت…</string> + <string name="store_install">تثبيت</string> + <string name="store_setup_first">أعدّ Flatpak أولًا</string> + <string name="store_download_size">تنزيل %1$s</string> + <string name="store_installed_chip">● مثبَّت</string> + <string name="store_details_failed">تعذّر تحميل صفحة هذا التطبيق على Flathub.</string> + <string name="store_loading">جارٍ التحميل من Flathub…</string> + <string name="store_no_arm">لا يوجد إصدار ARM64 على Flathub، لذا لا يمكن تثبيته هنا.</string> + <string name="store_screenshots">لقطات الشاشة</string> + <string name="store_about">حول</string> + <string name="store_app_id">معرّف التطبيق</string> + <string name="store_license">الترخيص</string> + <string name="store_runtime">بيئة التشغيل</string> + <string name="store_installed_size">حجم التثبيت</string> + <string name="store_installed_size_value">%1$s (مع بيئة التشغيل المشتركة)</string> + <string name="store_website">الموقع الإلكتروني</string> + <string name="store_verified">موثّق</string> + <string name="upd_title">التحديثات</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">تم التحقّق %1$s</string> + <string name="upd_not_checked">لم يتم التحقّق بعد</string> + <string name="upd_perm_title">اسمح لـ DroidDeck بتحديث نفسه</string> + <string name="upd_perm_text">في الشاشة التالية، فعِّل «السماح من هذا المصدر» ثم عُد. يستمر التحديث تلقائيًا.</string> + <string name="upd_open_settings">فتح الإعدادات</string> + <string name="upd_not_now">ليس الآن</string> + <string name="upd_signed_status">توقيع مختلف</string> + <string name="upd_signed_headline">لا يمكن التحديث مباشرة</string> + <string name="upd_signed_detail">هذه النسخة غير موقَّعة بمفتاح إصدار DroidDeck، فلا يمكن تثبيت التحديثات فوقها. أزل تثبيتها للتبديل.</string> + <string name="upd_available">تحديث متاح</string> + <string name="upd_blocked_status">لا يمكن التثبيت</string> + <string name="upd_switch">جاهز للتبديل</string> + <string name="upd_ahead_status">متقدّم على المستقر</string> + <string name="upd_ahead_headline">أنت متقدّم على الإصدار المستقر</string> + <string name="upd_ahead_detail">هذا الإصدار أحدث من آخر إصدار مستقر. ستنتقل إلى الإصدار المستقر مع إصداره التالي.</string> + <string name="upd_gone_status">انتهى الاختبار</string> + <string name="upd_gone_headline">انتهى هذا الاختبار</string> + <string name="upd_gone_detail">تم دمج إصلاحه أو التخلي عنه. تابع إصدار المعاينة للحصول على أحدث الإصلاحات.</string> + <string name="upd_current_status">محدَّث</string> + <string name="upd_current_headline">لديك أحدث إصدار %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">تحديث%1$s</string> + <string name="upd_install_button">تثبيت%1$s</string> + <string name="upd_install_anyway">تثبيت الإصدار المستقر %1$s رغم ذلك</string> + <string name="upd_follow_preview">متابعة إصدار المعاينة</string> + <string name="upd_stop_session">أوقف الجلسة قيد التشغيل للتحديث.</string> + <string name="upd_less">أقل</string> + <string name="upd_more">أكثر</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">إصدار معاينة جديد</string> + <string name="upd_new_test">إصدار اختبار PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">قناة التحديث</string> + <string name="upd_stable">المستقر</string> + <string name="upd_stable_hint">إصدارات مُختبَرة، تناسب معظم المستخدمين</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">المعاينة</string> + <string name="upd_preview_hint">أحدث الإصلاحات، قبل الإصدار المستقر</string> + <string name="upd_preview_current">محدَّث</string> + <string name="upd_tests">إصدارات الاختبار</string> + <string name="upd_tests_hint">جرّب إصلاحًا قبل إصداره رسميًا</string> + <string name="upd_tests_none">لا شيء حاليًا</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">لم يُبنَ لهذه النسخة من DroidDeck</string> + <string name="upd_updated">تم التحديث %1$s</string> + <string name="upd_test_name">اختبار PR #%1$d</string> + <string name="upd_while_ago">منذ فترة</string> + <string name="upd_just_now">منذ لحظات</string> + <plurals name="upd_tests_count"> + <item quantity="zero">لا شيء للتجربة</item> + <item quantity="one">واحد للتجربة</item> + <item quantity="two">اثنان للتجربة</item> + <item quantity="few">%1$d للتجربة</item> + <item quantity="many">%1$d للتجربة</item> + <item quantity="other">%1$d للتجربة</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="zero">التغييرات منذ إصدارك · غير متأخر</item> + <item quantity="one">التغييرات منذ إصدارك · متأخر بإصدار واحد</item> + <item quantity="two">التغييرات منذ إصدارك · متأخر بإصدارين</item> + <item quantity="few">التغييرات منذ إصدارك · متأخر بـ%1$d إصدارات</item> + <item quantity="many">التغييرات منذ إصدارك · متأخر بـ%1$d إصدارًا</item> + <item quantity="other">التغييرات منذ إصدارك · متأخر بـ%1$d إصدار</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="zero">آخر التغييرات · لا إصدارات جديدة</item> + <item quantity="one">آخر التغييرات · إصدار واحد</item> + <item quantity="two">آخر التغييرات · إصداران</item> + <item quantity="few">آخر التغييرات · %1$d إصدارات</item> + <item quantity="many">آخر التغييرات · %1$d إصدارًا</item> + <item quantity="other">آخر التغييرات · %1$d إصدار</item> + </plurals> + <string name="gate_title">إعداد واحد في Android يجب تغييره</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">يوقف Android التطبيقات التي تبدأ عمليات خلفية كثيرة، وSteam يبدأ عشرات منها. وإلى أن يتغيّر هذا، تُغلَق الألعاب دون أي خطأ.</string> + <string name="gate_fix_for_me">إصلاحه لي</string> + <string name="gate_toggle_steps">فعِّل «إيقاف القيود المفروضة على العمليات الثانوية»، ثم عُد. اترك خيارات المطوّرين مفعّلة، وإلا سيُعاد تعطيل المفتاح.</string> + <string name="gate_open_dev">فتح خيارات المطوّرين</string> + <string name="gate_no_toggle">لا يحتوي إصدار Android هذا على مفتاح لذلك، لذا يغيّره DroidDeck عبر تصحيح الأخطاء اللاسلكي. يستغرق نحو دقيقة، ولا يحتاج إلى جهاز كمبيوتر.</string> + <string name="gate_needs_wifi">يحتاج تصحيح الأخطاء اللاسلكي إلى Wi-Fi. تعمل أي شبكة؛ فهو لا يحتاج إلى اتصال بالإنترنت.</string> + <string name="gate_needs_notifications">يظهر رمز الإقران في إشعار. فعِّل الإشعارات لـ DroidDeck، أو استخدم «طرق أخرى».</string> + <string name="gate_allow_notifications">السماح بالإشعارات</string> + <string name="gate_step1">افتح الإعدادات ← خيارات المطوّرين ← تصحيح الأخطاء اللاسلكي وفعِّله</string> + <string name="gate_step2">اضغط على «إقران جهاز برمز إقران»</string> + <string name="gate_step3">أدخل الرمز في إشعار DroidDeck</string> + <string name="gate_waiting">في انتظار نافذة الإقران المنبثقة…</string> + <string name="gate_code_needed">تم العثور على النافذة المنبثقة. أدخل رمزها في الإشعار.</string> + <string name="gate_status">الحالة</string> + <string name="gate_polling">يتم التحقّق كل ثانيتين. تُغلَق هذه الصفحة عند إيقافه.</string> + <string name="gate_other_ways">طرق أخرى</string> + <string name="gate_other_toggle">تصحيح الأخطاء اللاسلكي، عنوان يدوي، ADB من كمبيوتر</string> + <string name="gate_other_no_toggle">عنوان يدوي، ADB من كمبيوتر، خيارات المطوّرين</string> + <string name="gate_use_wireless_instead">استخدام تصحيح الأخطاء اللاسلكي بدلًا من ذلك</string> + <string name="gate_some_roms">تضيف بعض إصدارات ROM هذا المفتاح رغم ذلك. ابحث عن «العمليات الفرعية» في خيارات المطوّرين.</string> + <string name="gate_manual_hint">إذا لم ينجح الإشعار، أدخل عنوان النافذة المنبثقة ورمزها بنفسك.</string> + <string name="gate_enter_manually">إدخال العنوان يدويًا</string> + <string name="gate_from_computer">من جهاز كمبيوتر يحتوي على ADB:</string> + <string name="gate_copy_command">نسخ الأمر</string> + <string name="gate_choose_display">اختر الشاشة التي ستُفتَح فيها إعدادات Android.</string> + <string name="gate_main_screen">الشاشة الرئيسية</string> + <string name="wadb_finding_port">تم الإقران. جارٍ البحث عن منفذ تصحيح الأخطاء اللاسلكي…</string> + <string name="wadb_enter_port">تم الإقران. أدخل المنفذ من الإعدادات.</string> + <string name="wadb_applying">تم العثور على الجهاز. جارٍ تطبيق الإعداد…</string> + <string name="wadb_apply_failed">تعذّر التطبيق تلقائيًا. تحقّق من العنوان أدناه وأعد المحاولة. %1$s</string> + <string name="wadb_title_wireless">تصحيح الأخطاء اللاسلكي</string> + <string name="wadb_title_done">تم تحديث حد العمليات الفرعية</string> + <string name="wadb_title">تغيير حد العمليات الفرعية</string> + <string name="wadb_lede_compact0">إذا كان هذا الخيار غير متاح، فأقرن عبر تصحيح الأخطاء اللاسلكي.</string> + <string name="wadb_lede_compact1">تم الإقران. تحقّق من عنوان IP والمنفذ في تصحيح الأخطاء اللاسلكي.</string> + <string name="wadb_lede_done">تم تحديث حد العمليات الفرعية.</string> + <string name="wadb_lede0">استخدم الخطوة 2 إذا لم يكن في خيارات المطوّرين إعداد للعمليات الفرعية. افتح خيارات المطوّرين ← تصحيح الأخطاء اللاسلكي ← إقران جهاز برمز إقران.</string> + <string name="wadb_lede1">تم الإقران. استخدم العنوان أدناه، أو حدِّثه من تصحيح الأخطاء اللاسلكي ← عنوان IP والمنفذ.</string> + <string name="wadb_lede_done_long">تم تحديث حد العمليات الفرعية عبر تصحيح الأخطاء اللاسلكي.</string> + <string name="wadb_confirmed_on">أكّد Android أن الحد مفعّل.</string> + <string name="wadb_confirmed_off">أكّد Android أن الحد معطّل.</string> + <string name="wadb_pair_group">2 · إقران تصحيح الأخطاء اللاسلكي</string> + <string name="wadb_pair_address">عنوان IP ومنفذ النافذة المنبثقة للإقران</string> + <string name="wadb_pin">رمز الإقران (PIN)</string> + <string name="wadb_pin_placeholder">6 أرقام</string> + <string name="wadb_pair">إقران</string> + <string name="wadb_apply_group">2 · التطبيق عبر تصحيح الأخطاء اللاسلكي</string> + <string name="wadb_connect_address">عنوان IP ومنفذ الاتصال</string> + <string name="wadb_pair_again">إقران مرة أخرى</string> + <string name="wadb_turn_off">إيقاف الحد</string> + <string name="wadb_other_ways">طرق أخرى لتغييره</string> + <string name="wadb_dev_try_first">1 · خيارات المطوّرين (جرّب هذا أولًا)</string> + <string name="wadb_restrict_on">عطِّل «إيقاف القيود المفروضة على العمليات الثانوية».</string> + <string name="wadb_restrict_off">فعِّل «إيقاف القيود المفروضة على العمليات الثانوية».</string> + <string name="wadb_computer_last">3 · ADB من كمبيوتر (كخيار أخير)</string> + <string name="wadb_only_if">فقط إذا كان تصحيح الأخطاء اللاسلكي غير متاح.</string> + <string name="wadb_computer_group">3 · ADB من كمبيوتر (كخيار أخير)</string> + <string name="ctrl_osc_hint">متى تظهر عناصر التحكم باللمس في الجلسة</string> + <string name="ctrl_color">اللون</string> + <string name="ctrl_color_hint">درجة لون الأزرار على الشاشة</string> + <string name="ctrl_custom">مخصّص</string> + <string name="ctrl_opacity">العتامة</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">حجم الأزرار</string> + <string name="ctrl_size_hint" formatted="false">100% هو الحجم القياسي</string> + <string name="ctrl_stick_click">ضغط العصا</string> + <string name="ctrl_stick_click_hint">انقر مرتين مع الاستمرار على عصا للحصول على L3 أو R3</string> + <string name="ctrl_adaptive">عصي تكيّفية</string> + <string name="ctrl_rumble">اهتزاز اللعبة</string> + <string name="ctrl_steam_button">زر Steam</string> + <string name="ctrl_qam_button">زر QAM</string> + <string name="ctrl_keyboard_button">زر لوحة المفاتيح</string> + <string name="ctrl_select_steam">اضغط على Select لفتح قائمة Steam</string> + <string name="ctrl_select_steam_hint">بدلًا من View/Select.</string> + <string name="ctrl_joycon_vr">أجهزة Joy-Con كوحدات تحكم VR</string> + <string name="ctrl_joycon_vr_hint">أثناء تشغيل SteamVR، يصبح كل Joy-Con يدًا. وجّهه إلى الأمام واضغط مطولًا على Home أو Capture لإعادة توسيطه.</string> + <string name="setup_animations">الرسوم المتحركة</string> + <string name="ctrl_adaptive_hint">تظهر العصي حيث تلمس وتُخفى عند الرفع</string> + <string name="ctrl_layout">التخطيط</string> + <string name="ctrl_layout_custom">تم حفظ مواضع مخصّصة</string> + <string name="ctrl_layout_default">مهيّأ لهذه الشاشة</string> + <string name="ctrl_edit">تعديل</string> + <string name="ctrl_reset">إعادة ضبط</string> + <string name="ctrl_mapping">تعيين الأزرار</string> + <string name="ctrl_mapping_default">يرسل كل زر إدخاله الخاص</string> + <string name="ctrl_mapping_count">تمت إعادة تعيين %1$d من %2$d أزرار</string> + <string name="ctrl_configure">ضبط</string> + <string name="ctrl_reset_all">إعادة ضبط وحدة التحكم</string> + <string name="ctrl_reset_all_hint">يستعيد كل إعدادات وحدة التحكم والتخطيط</string> + <string name="ctrl_mapping_lede">ما يرسله كل زر على الشاشة إلى اللعبة. يؤدي إخفاؤه إلى إزالة الزر.</string> + <string name="ctrl_onscreen_buttons">أزرار الشاشة</string> + <string name="ctrl_defaults">الافتراضية</string> + <string name="ctrl_reset_mapping">إعادة ضبط التعيين</string> + <string name="content_android_apps">تطبيقات Android</string> + <string name="content_apps_count">%1$d تطبيق</string> + <string name="content_no_android_apps">لم يتم العثور على تطبيقات Android قابلة للتشغيل.</string> + <string name="content_desktop_installed">● سطح المكتب مثبّت</string> + <string name="content_desktop_first_open">يُثبَّت عند أول فتح</string> + <string name="content_available">متاح للتثبيت</string> + <string name="content_not_installed">غير مثبّت.</string> + <string name="content_not_installed_suffix">%1$s · غير مثبّت</string> + <string name="content_open_named">فتح %1$s</string> + <string name="content_games">الألعاب</string> + <string name="content_choose_roms">اختر مجلد ROMs.</string> + <string name="content_retroarch_roms">تصفّح إلى /root/ROMs في RetroArch.</string> + <string name="content_add_roms">أضف ألعاب %1$s إلى ROMs/%2$s.</string> + <string name="content_install_named">تثبيت %1$s</string> + <string name="content_stop_to_install">أوقف الجلسة للتثبيت</string> + <string name="content_runtime_required">بيئة التشغيل مطلوبة</string> + <string name="content_loading_details">جارٍ تحميل تفاصيل التثبيت…</string> + <string name="content_details_unavailable">تفاصيل التثبيت غير متاحة. حاول مرة أخرى لاحقًا.</string> + <string name="content_needs_runtime">ثبّت بيئة تشغيل Linux من «الإعداد» أولًا.</string> + <string name="content_stop_first">أوقف الجلسة قيد التشغيل لتثبيت تطبيقات سطح المكتب.</string> + <string name="content_install_into">يثبّت %1$s في سطح مكتب Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">يؤدي إخفاؤه إلى إزالته من سطح المكتب. تبقى ملفاته في بيئة تشغيل Linux.</string> + <string name="content_rom_gone">لم تعد هذه اللعبة موجودة في مجلد ROMs.</string> + <string name="content_desktop_system">سطح المكتب · %1$s</string> + <string name="content_launch_in">تشغيل في %1$s</string> + <string name="content_also_in">أيضًا في %1$s</string> + <string name="content_page_gone">لم تعد هذه الصفحة موجودة. اختر قسمًا من القائمة على اليسار.</string> + <string name="content_open_desktop">فتح سطح المكتب</string> + <string name="content_install_open_desktop">تثبيت وفتح سطح المكتب</string> + <string name="desktop_remove_title">إلغاء تثبيت سطح المكتب</string> + <string name="desktop_remove_text">إزالة سطح المكتب والتطبيقات المرفقة به. الاحتفاظ بالألعاب والتطبيقات المُضافة والإعدادات والمكتبات المشتركة.</string> + <string name="desktop_removing">جارٍ إزالة سطح المكتب</string> + <string name="desktop_removed">تمت إزالة سطح المكتب</string> + <string name="desktop_cleaning_legacy">جارٍ إزالة ملفات LXQt القديمة</string> + <string name="desktop_removal_unknown">حدِّث DroidDeck قبل إزالة إصدار سطح المكتب هذا.</string> + <string name="content_linux_desktop">سطح مكتب Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma وFirefox ومحاكياتك</string> + <string name="games_empty">الألعاب التي تثبّتها في Steam تظهر هنا بعد الجلسة.</string> + <string name="games_play_steam">تشغيل Steam</string> + <string name="games_play_steamvr">تشغيل SteamVR</string> + <string name="games_launch_settings">إعدادات التشغيل</string> + <string name="games_launch">تشغيل</string> + <string name="games_files">ملفات اللعبة</string> + <string name="games_prefix">بادئة Proton</string> + <string name="games_saves_looking">جارٍ البحث عن الحفظ…</string> + <string name="games_saves_none">لم يتم العثور على مجلد حفظ بالاسم. يأخذ التصدير مجلد المستخدم بالكامل.</string> + <string name="games_saves_folders">%1$d مجلدات حفظ</string> + <string name="games_saves_summary">%1$s · %2$d ملفات · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">إدارة الحفظ</string> + <string name="games_saves">حفظ اللعبة</string> + <string name="games_import_saves">استيراد الحفظ…</string> + <string name="games_export_gamehub">تصدير بصيغة GameHub المضغوطة…</string> + <string name="games_export_winlator">تصدير بصيغة Winlator المضغوطة…</string> + <string name="games_open_save_folder">فتح مجلد الحفظ</string> + <string name="games_never_played">لم يتم تشغيلها أبدًا</string> + <string name="games_runtime_busy_percent">بيئة التشغيل مشغولة · %1$d%%</string> + <string name="games_runtime_busy">بيئة التشغيل مشغولة</string> + <string name="games_runtime_first_play">تُثبَّت بيئة التشغيل عند أول تشغيل</string> + <string name="games_runtime_update">يتوفر تحديث لبيئة التشغيل</string> + <string name="games_runtime_ready">● بيئة التشغيل جاهزة</string> + <string name="games_last_played">آخر تشغيل %1$s</string> + <string name="games_internal">التخزين الداخلي</string> + <string name="games_added">لعبة مُضافة</string> + <string name="games_custom">لعبة مخصّصة</string> + <string name="games_store_storage">تخزين الألعاب</string> + <string name="gpu_auto_hint">أفضل زوج لهذا GPU، يُحافَظ على تحديثه</string> + <string name="gpu_manual_hint">اختر زوجًا بنفسك</string> + <string name="gpu_checking">جارٍ البحث عن برامج التشغيل…</string> + <string name="gpu_none_listed">لا توجد برامج تشغيل مُدرَجة حتى الآن. حدِّث للبحث عنها.</string> + <string name="gpu_hide_other">إخفاء برامج التشغيل لوحدات GPU الأخرى</string> + <string name="gpu_show_other">إظهار برامج التشغيل لوحدات GPU الأخرى</string> + <string name="gpu_advanced">متقدّم</string> + <string name="gpu_set_with_display">يُضبَط مع برنامج تشغيل العرض معًا: يحمل %1$s كلاهما.</string> + <string name="gpu_set_with_runtime">يُضبَط مع برنامج تشغيل بيئة التشغيل معًا: يحمل %1$s كلاهما.</string> + <string name="gpu_runtime_hint">يُستخدَم في الألعاب وسطح المكتب.</string> + <string name="gpu_runtime_default">الافتراضي لبيئة التشغيل</string> + <string name="gpu_auto_by_gpu">تلقائي - يُحدَّد بحسب GPU</string> + <string name="gpu_manage">تنزيل أو استيراد أو حذف…</string> + <string name="gpu_in_use_caps">قيد الاستخدام</string> + <string name="gpu_builtin">برامج التشغيل المدمجة في DroidDeck</string> + <string name="gpu_matched_pair">يتم ضبط برنامجَي تشغيل بيئة التشغيل والعرض معًا كزوج متطابق.</string> + <string name="gpu_recommended_for">المُستحسَن لهذا GPU: ‏%1$s.</string> + <string name="gpu_refresh_hint">حدِّث للبحث عن برامج تشغيل لهذا GPU.</string> + <string name="gpu_recommended_caps">مُستحسَن</string> + <string name="gpu_unavailable">غير متاح</string> + <string name="load_runtime">بيئة تشغيل Linux</string> + <string name="load_runtime_detail">جارٍ تجهيز بيئة تشغيل Linux</string> + <string name="load_session">الجلسة</string> + <string name="load_session_detail">بدء تشغيل العرض والصوت</string> + <string name="load_steam">عميل Steam</string> + <string name="load_steam_detail">التحقّق من Steam وأدوات التوافق الخاصة به</string> + <string name="load_opening_steam">جارٍ فتح Steam</string> + <string name="load_opening_steam_detail">في انتظار أول إطار من Steam</string> + <string name="load_desktop">سطح المكتب</string> + <string name="load_desktop_detail">جارٍ تجهيز سطح المكتب</string> + <string name="load_opening">جارٍ الفتح</string> + <string name="load_opening_detail">في انتظار الإطار الأول</string> + <string name="load_starting_steam">جارٍ تشغيل Steam</string> + <string name="load_ended">انتهت الجلسة</string> + <string name="load_step">الخطوة %1$d من %2$d</string> + <string name="load_steam_paused">تم إيقاف Steam مؤقتًا</string> + <string name="deck_tab_grips">المقابض</string> + <string name="deck_tab_left">اللوحة اليسرى</string> + <string name="deck_tab_right">اللوحة اليمنى</string> + <string name="deck_tab_both">كلتاهما</string> + <string name="deck_tab_gamepad">يد التحكّم</string> + <string name="deck_surface_stick">عصا التحكّم</string> + <string name="deck_surface_trackpad">لوحة اللمس</string> + <string name="deck_surface_switch">التبديل بين عصا التحكّم ولوحة اللمس</string> + <string name="deck_more_controls">المزيد من عناصر تحكّم Deck</string> + <string name="deck_panels">اللوحات</string> + <string name="deck_close">إغلاق عناصر التحكّم على الشاشة الثانية</string> + <string name="deck_open_steam_menu">فتح قائمة Steam</string> + <string name="deck_left_upper">يسار · علوي</string> + <string name="deck_left_lower">يسار · سفلي</string> + <string name="deck_right_upper">يمين · علوي</string> + <string name="deck_right_lower">يمين · سفلي</string> + <string name="deck_click">نقر</string> + <string name="deck_right_trackpad">لوحة اللمس اليمنى</string> + <string name="deck_left_trackpad">لوحة اللمس اليسرى</string> + <string name="second_trackpad">لوحة اللمس</string> + <string name="second_show_keyboard">إظهار لوحة المفاتيح</string> + <string name="second_hide_keyboard">إخفاء لوحة المفاتيح</string> + <string name="second_terminal">الوحدة الطرفية لـ Linux</string> + <string name="second_terminal_not_ready">جلسة Linux ليست جاهزة للوحدة الطرفية بعد.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">الألعاب</string> + <string name="rail_desktop">سطح المكتب</string> + <string name="rail_store">المتجر</string> + <string name="rail_components">المكوّنات</string> + <string name="rail_apps">التطبيقات</string> + <string name="rail_setup">الإعداد</string> + <string name="rail_updates">التحديثات</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">استئناف %1$s</string> + <string name="roms_text">يظهر باسم /root/ROMs في كل جلسة. مساحة التخزين الداخلية متاحة في /root/Storage.</string> + <string name="roms_none">لم يتم اختيار مجلد</string> + <string name="roms_applies">يُطبَّق في الجلسة التالية. بطاقات SD مدعومة.</string> + <string name="roms_choose">اختيار مجلد</string> + <string name="roms_change">تغيير المجلد</string> + <string name="proton_lede">ثبِّت إصدار Proton لمعالجات ARM64، ثم اختره لكل لعبة من Steam → الخصائص → التوافق.</string> + <string name="proton_stop_first">أوقِف الجلسة الجارية لتثبيت أداة توافق أو إزالتها.</string> + <string name="proton_available">الإصدارات المتاحة</string> + <string name="proton_installed">مثبَّت: %1$s</string> + <string name="proton_queued">معلَّق من طلب سابق</string> + <string name="proton_not_installed">غير مثبَّت</string> + <string name="proton_update_available">يتوفّر تحديث → %1$s</string> + <string name="proton_remove_older">إزالة الإصدارات القديمة من %1$s</string> + <string name="proton_remove_older_body">سيتم حذف %1$s. يجب تحويل الألعاب المضبوطة على هذه الإصدارات إلى إصدار Proton آخر.</string> + <string name="proton_remove_body">يجب تحويل الألعاب المضبوطة على هذا الإصدار إلى إصدار Proton آخر.</string> + <string name="proton_install_now">التثبيت الآن</string> + <string name="proton_cancel_queued">إلغاء الطلب المعلَّق</string> + <string name="pckb_android">لوحة مفاتيح Android</string> + <string name="pckb_hide">إخفاء ✕</string> + <string name="main_launch_named">تشغيل %1$s</string> + <string name="main_choose_screen">اختر شاشة. الشاشة الثانوية: %1$s.</string> + <string name="main_secondary_gone">لم تعد الشاشة الثانوية متاحة.</string> + <string name="main_primary">الشاشة الأساسية</string> + <string name="main_secondary">الشاشة الثانوية</string> + <string name="widgets_prev_tab">علامة التبويب السابقة</string> + <string name="widgets_next_tab">علامة التبويب التالية</string> + <string name="widgets_on">مفعَّل</string> + <string name="widgets_all_n">الكل %1$d</string> + <string name="widgets_none">لا شيء</string> + <string name="widgets_n_of_m">%1$d من %2$d</string> + <string name="widgets_off">غير مفعَّل</string> + <string name="screen_bottom">الشاشة السفلية</string> + <string name="game_env_applies">يُطبَّق عند تشغيل اللعبة في المرة التالية. ملف تعريف اللعبة له الأولوية على الملف المشترك.</string> + <string name="game_env_other">لعبة أخرى حسب معرّف التطبيق…</string> + <string name="game_env_done">تم</string> + <string name="game_env_default">الافتراضي</string> + <string name="game_env_off">غير مفعَّل</string> + <string name="game_env_change">تغيير…</string> + <string name="game_env_change_title">تغيير المتغيّر</string> + <string name="game_env_restore_default">العودة إلى الافتراضي</string> + <string name="game_env_eyebrow">ألعاب Proton</string> + <string name="pip_title">نافذة ضمن النافذة</string> + <string name="pip_auto">الدخول تلقائيًا إلى وضع نافذة ضمن النافذة</string> + <string name="unfolded_controls">عناصر التحكّم على الشاشة غير المطوية</string> + <string name="unfolded_controls_hint">عند فتح الجهاز، تظهر اللعبة فوق لوحتَي اللمس والمقابض الخلفية بأسلوب Steam Deck. وعند طيّه، تُعرض اللعبة بملء الشاشة.</string> + <string name="pip_suspended">معلَّقة</string> + <string name="pip_not_ready">تتوفّر ميزة نافذة ضمن النافذة عندما تصبح الجلسة جاهزة.</string> + <string name="pip_permission">اسمح بميزة نافذة ضمن النافذة لتطبيق DroidDeck في إعدادات Android.</string> + <string name="pip_unavailable">تعذّر على Android فتح نافذة ضمن النافذة.</string> + <string name="game_shortcut">اختصار</string> + <string name="game_shortcut_add">إضافة إلى الشاشة الرئيسية</string> + <string name="game_shortcut_choose">اختيار لعبة</string> + <string name="game_shortcut_scanning">جارٍ البحث عن الألعاب المثبَّتة…</string> + <string name="game_link_copy">نسخ رابط التشغيل</string> + <string name="game_link_copied">تم نسخ رابط التشغيل</string> + <string name="game_shortcut_unsupported">لا يمكن لتطبيق الشاشة الرئيسية هذا إضافة اختصارات. استخدِم «نسخ رابط التشغيل» بدلاً من ذلك.</string> + <string name="game_link_invalid">رابط تشغيل اللعبة غير صالح.</string> + <string name="game_link_missing">لم تعد هذه اللعبة في مكتبة DroidDeck.</string> + <string name="game_link_session_busy">أوقِف الجلسة الحالية قبل تشغيل لعبة Steam.</string> + <string name="game_link_failed">تعذّر إرسال اللعبة إلى Steam. حاوِل تشغيلها مرة أخرى.</string> + <string name="setup_retry_removal">إعادة محاولة الإزالة</string> + <string name="runtime_removing">جارٍ الإزالة</string> + <string name="runtime_removal_incomplete">لم تكتمل الإزالة</string> + <string name="game_file_export">تصدير ملف اللعبة</string> + <string name="game_file_sync">مزامنة كل ملفات الألعاب مع مجلد</string> + <string name="game_file_stop_sync">إيقاف مزامنة ملفات الألعاب</string> + <string name="game_file_folder">اختر مجلدًا لملفات الألعاب الخاصة بالواجهات الأمامية</string> + <string name="game_file_exported">تم حفظ ملفات الألعاب في %1$s</string> + <string name="game_frontend_files">ملفات الواجهة الأمامية</string> + + <string name="main_wait_runtime">انتظر حتى تنتهي عملية بيئة التشغيل</string> + <string name="main_wait_proton_install">انتظر حتى ينتهي تثبيت أداة التوافق</string> + <string name="main_wait_desktop_install">انتظر حتى ينتهي تثبيت تطبيق سطح المكتب</string> + <string name="main_wait_install_game">انتظر حتى ينتهي التثبيت قبل تشغيل لعبة</string> + <string name="main_saves_close_session">أغلِق جلسة Steam أولاً حتى لا تحفظ اللعبة فوق الملفات المستورَدة</string> + <string name="main_saves_importing">الاستيراد إلى %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="zero">لم يتم استيراد أي ملف من %2$s إلى %3$s</item> + <item quantity="one">تم استيراد ملف واحد من %2$s إلى %3$s</item> + <item quantity="two">تم استيراد ملفين من %2$s إلى %3$s</item> + <item quantity="few">تم استيراد %1$d ملفات من %2$s إلى %3$s</item> + <item quantity="many">تم استيراد %1$d ملفًا من %2$s إلى %3$s</item> + <item quantity="other">تم استيراد %1$d ملف من %2$s إلى %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="zero">لم يتم استيراد أي ملف من %2$s إلى %3$s. تم نسخ ملفات الحفظ القديمة احتياطيًا إلى Download/DroidDeck/Saves/backups</item> + <item quantity="one">تم استيراد ملف واحد من %2$s إلى %3$s. تم نسخ ملفات الحفظ القديمة احتياطيًا إلى Download/DroidDeck/Saves/backups</item> + <item quantity="two">تم استيراد ملفين من %2$s إلى %3$s. تم نسخ ملفات الحفظ القديمة احتياطيًا إلى Download/DroidDeck/Saves/backups</item> + <item quantity="few">تم استيراد %1$d ملفات من %2$s إلى %3$s. تم نسخ ملفات الحفظ القديمة احتياطيًا إلى Download/DroidDeck/Saves/backups</item> + <item quantity="many">تم استيراد %1$d ملفًا من %2$s إلى %3$s. تم نسخ ملفات الحفظ القديمة احتياطيًا إلى Download/DroidDeck/Saves/backups</item> + <item quantity="other">تم استيراد %1$d ملف من %2$s إلى %3$s. تم نسخ ملفات الحفظ القديمة احتياطيًا إلى Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">اختر ملف zip لملفات حفظ %1$s</string> + <string name="main_saves_exporting">تصدير %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="zero">لم يتم تصدير أي ملف على هيئة %2$s: %3$s</item> + <item quantity="one">تم تصدير ملف واحد على هيئة %2$s: %3$s</item> + <item quantity="two">تم تصدير ملفين على هيئة %2$s: %3$s</item> + <item quantity="few">تم تصدير %1$d ملفات على هيئة %2$s: %3$s</item> + <item quantity="many">تم تصدير %1$d ملفًا على هيئة %2$s: %3$s</item> + <item quantity="other">تم تصدير %1$d ملف على هيئة %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">اختر مكان حفظ %1$s (%2$s)</string> + <string name="main_action_failed">فشل %1$s: %2$s</string> + <string name="main_no_logs_yet">لا توجد سجلات جلسات بعد: شغِّل جلسة أولاً.</string> + <string name="main_no_logs_to_clear">لا توجد سجلات جلسات لمحوها.</string> + <plurals name="main_logs_cleared"> + <item quantity="zero">لم يتم محو أي مجلد لسجلات الجلسات.</item> + <item quantity="one">تم محو مجلد واحد لسجلات الجلسات.</item> + <item quantity="two">تم محو مجلدين لسجلات الجلسات.</item> + <item quantity="few">تم محو %1$d مجلدات لسجلات الجلسات.</item> + <item quantity="many">تم محو %1$d مجلدًا لسجلات الجلسات.</item> + <item quantity="other">تم محو %1$d مجلد لسجلات الجلسات.</item> + </plurals> + <string name="main_wadb_pair_failed">فشل الإقران عبر تصحيح الأخطاء اللاسلكي</string> + <string name="main_wadb_command_failed">فشل أمر تصحيح الأخطاء اللاسلكي</string> + <string name="main_wadb_unavailable">تصحيح الأخطاء اللاسلكي غير متاح</string> + <string name="main_adb_copied">تم نسخ أمر ADB</string> + <string name="main_pick_roms">اختر مجلد ROMs</string> + <string name="main_non_adreno_title">وحدة GPU ليست من نوع Adreno</string> + <string name="main_non_adreno_text">يدعم Turnip وحدات GPU من نوع Adreno. على %1$s، قد يعرض Steam شاشة سوداء. حجم التنزيل: %2$.0f MB.</string> + <string name="main_install_anyway">التثبيت على أي حال</string> + <string name="main_remove_runtime_title">إزالة بيئة تشغيل Linux</string> + <string name="main_remove_runtime_text">سيؤدي هذا إلى حذف بيئة التشغيل وعميل Steam بداخلها وكل لعبة مثبَّتة فيها.</string> + <string name="main_applied">تم التطبيق: %1$s</string> + <string name="android_app_open_failed_primary">تعذّر فتح %1$s على الشاشة الأساسية</string> + <string name="android_app_open_failed_on">تعذّر فتح %1$s على %2$s</string> + <string name="android_app_open_failed_display">تعذّر فتح %1$s على الشاشة %2$d</string> + <string name="comp_busy_importing">الاستيراد</string> + <string name="comp_busy_swapping">التبديل</string> + <string name="comp_busy_restoring">الاستعادة</string> + <string name="comp_busy_cancelling">الإلغاء</string> + <string name="comp_busy_deleting">الحذف</string> + <string name="comp_cannot_read">تتعذّر قراءة الملف</string> + <string name="comp_imported">تم استيراد %1$s</string> + <string name="comp_swap_cancelled">تم إلغاء التبديل المنتظَر.</string> + <string name="comp_pick_wcp">اختر حزمة مكوّن (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">تعذّر الوصول إلى إصدارات Nightlies</string> + <string name="comp_stored">تم تخزين %1$s</string> + <string name="comp_download_failed">فشل التنزيل: %1$s</string> + <string name="drivers_pick_linux">اختر برنامج تشغيل لبيئة Linux (ملف zip بلاحقة -Linux أو حزمة Android + Linux)</string> + <string name="drivers_pick_android">اختر برنامج تشغيل العرض (ملف zip من AdrenoTools أو حزمة Android + Linux)</string> + <string name="drivers_pick_any">اختر ملف zip لبرنامج تشغيل أو حزمة Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">جارٍ إزالة %1$s…</string> + <string name="main_forgetting_named">جارٍ نسيان %1$s…</string> + <string name="main_pick_game_storage">اختر مجلد تخزين الألعاب</string> + <string name="main_pick_decky_zip">اختر ملف ZIP لإضافة Decky</string> + <string name="main_storage_not_usable">غير صالح للاستخدام: %1$s</string> + <string name="main_running_program">برنامج</string> + <string name="main_removing_runtime">جارٍ إزالة بيئة تشغيل Linux</string> + <string name="main_settings_main_screen">تعذّر فتح الإعدادات على الشاشة السفلية، لذا فُتحت على الشاشة الأساسية.</string> + <string name="main_open_dev_options">افتح خيارات المطوّرين في الإعدادات</string> + + <string name="upd_unknown_apps_failed">تعذّر فتح إعداد «تثبيت التطبيقات غير المعروفة» في Android</string> + <string name="upd_couldnt_check">تعذّر التحقّق: %1$s</string> + <string name="upd_no_download">لا يتوفّر لهذا الإصدار ملف تنزيل لهذه النسخة من DroidDeck</string> + <string name="upd_stop_first">أوقِف الجلسة الجارية أولاً، ثم حدِّث</string> + <string name="upd_stage_downloading">جارٍ التنزيل</string> + <string name="upd_stage_installing">جارٍ التثبيت</string> + <string name="upd_stage_confirm">في انتظار تأكيدك</string> + <string name="upd_failed">فشل التحديث</string> + <string name="upd_not_offered">لم يعرض Android تثبيت التحديث</string> + + <string name="decky_install_failed">فشل تثبيت Decky: %1$s</string> + <string name="decky_plugin_starting">جارٍ بدء استيراد الإضافة…</string> + <string name="decky_plugin_failed">فشل استيراد الإضافة: %1$s</string> + <string name="decky_plugin_installed">تم تثبيت الإضافة. أعِد تشغيل Steam لتحميلها.</string> + + <string name="drivers_not_checked">لم يتم التحقّق بعد - انقر على «تحديث» للبحث عن برامج تشغيل جديدة</string> + <string name="drivers_bundle_sets_display">Android + Linux: يضبط برنامج تشغيل العرض معه</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: يضبط برنامج تشغيل بيئة Linux معه</string> + <string name="drivers_runtime_builtin">Turnip المدمج في بيئة التشغيل</string> + <string name="drivers_system_vulkan">Vulkan الخاص بالنظام: لا يوجد إصدار مضمَّن لوحدة GPU هذه</string> + <string name="drivers_bundled">%1$s (مضمَّن)</string> + <string name="drivers_manual">يدوي</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">نُشر أحد الجزأين فقط حاليًا</string> + <string name="drivers_pair_size">%1$.0f MB للاثنين</string> + <string name="drivers_none_to_set">لا توجد برامج تشغيل لضبطها: %1$s</string> + <string name="drivers_checking_latest">جارٍ البحث عن أحدث برامج التشغيل…</string> + <string name="drivers_up_to_date_check_failed">محدَّث (تعذّر التحقّق: %1$s)</string> + <string name="drivers_recommended_unpublished">برامج التشغيل المقترحة غير منشورة حاليًا</string> + <string name="drivers_downloading_pair">جارٍ تنزيل %1$s %2$s…</string> + <string name="drivers_updated_to">تم التحديث إلى %1$s %2$s.</string> + <string name="drivers_updated_to_restart">تم التحديث إلى %1$s %2$s. يُطبَّق برنامج تشغيل العرض بعد إعادة تشغيل DroidDeck.</string> + <string name="drivers_auto_waits_for_session">تنتظر تحديثات برامج التشغيل توقف الجلسة.</string> + <string name="drivers_auto_waits_for_network">سيتم تنزيل %1$s %2$s بعد إيقاف بيانات الجوال وتوفير البطارية.</string> + <string name="drivers_skipping_bad">لم يبدأ %1$s %2$s أي جلسة هنا، لذا يبقى الوضع التلقائي على برامج التشغيل التي بدأت.</string> + <string name="drivers_rolled_back">فشل %1$s في بدء الجلسة مرتين، لذا رجع الوضع التلقائي إلى برامج التشغيل التي عملت.</string> + <string name="drivers_switched_to">تم التبديل إلى %1$s %2$s.</string> + <string name="drivers_switched_to_restart">تم التبديل إلى %1$s %2$s. يُطبَّق برنامج تشغيل العرض بعد إعادة تشغيل DroidDeck.</string> + <string name="drivers_using">يتم استخدام %1$s %2$s.</string> + <string name="drivers_using_restart">يتم استخدام %1$s %2$s. يُطبَّق برنامج تشغيل العرض بعد إعادة تشغيل DroidDeck.</string> + <string name="drivers_using_quest">يُستخدم برنامج تشغيل الصورة المرفق مع Quest وبيئة التشغيل الافتراضية.</string> + <string name="drivers_using_quest_restart">يُستخدم برنامج تشغيل الصورة المرفق مع Quest وبيئة التشغيل الافتراضية. يسري برنامج تشغيل الصورة بعد إعادة تشغيل DroidDeck.</string> + <string name="drivers_not_a_driver">ليس ملف zip لبرنامج تشغيل: ليس برنامج تشغيل AdrenoTools ولا Turnip بلاحقة -Linux ولا حزمة Android + Linux</string> + <string name="drivers_import_failed">فشل الاستيراد: %1$s</string> + <string name="drivers_imported_unnamed">برنامج تشغيل مستورَد</string> + <string name="drivers_using_bundle">يتم استخدام %1$s كبرنامج تشغيل لبيئة Linux وللعرض معًا.</string> + <string name="drivers_using_bundle_restart">يتم استخدام %1$s كبرنامج تشغيل لبيئة Linux وللعرض معًا. يُطبَّق برنامج تشغيل العرض بعد إعادة تشغيل DroidDeck.</string> + <string name="drivers_deleted_bundle">تم حذف %1$s (كلا برنامجَي التشغيل)</string> + <string name="drivers_deleted">تم حذف %1$s</string> + <string name="drivers_release_status">الأحدث: %1$s · آخر تحقّق %2$s</string> + <string name="drivers_release_status_failed">الأحدث: %1$s · تعذّر الوصول إلى %2$s · آخر تحقّق %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="zero">منذ %1$d دقيقة</item> + <item quantity="one">منذ دقيقة واحدة</item> + <item quantity="two">منذ دقيقتين</item> + <item quantity="few">منذ %1$d دقائق</item> + <item quantity="many">منذ %1$d دقيقة</item> + <item quantity="other">منذ %1$d دقيقة</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="zero">منذ %1$d ساعة</item> + <item quantity="one">منذ ساعة واحدة</item> + <item quantity="two">منذ ساعتين</item> + <item quantity="few">منذ %1$d ساعات</item> + <item quantity="many">منذ %1$d ساعة</item> + <item quantity="other">منذ %1$d ساعة</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="zero">منذ %1$d يوم</item> + <item quantity="one">منذ يوم واحد</item> + <item quantity="two">منذ يومين</item> + <item quantity="few">منذ %1$d أيام</item> + <item quantity="many">منذ %1$d يومًا</item> + <item quantity="other">منذ %1$d يوم</item> + </plurals> + <string name="drivers_checking_sources">جارٍ التحقّق من Banners-Turnip وWinNative وDroidDeck…</string> + <string name="drivers_check_failed">فشل التحقّق</string> + <string name="drivers_installed_pick_either">تم تثبيت %1$s - اختره من أيٍّ من القائمتين لضبط برنامجَي التشغيل معًا</string> + <string name="drivers_installed_pick">تم تثبيت %1$s - اختره من القائمة</string> + + <string name="session_wait_removal">انتظر حتى تنتهي إزالة بيئة التشغيل</string> + <string name="session_title_game">لعبة</string> + <string name="session_touch_auto_touchpad">لوحة اللمس</string> + <string name="session_touch_auto_direct">مباشر</string> + <string name="session_swap_failed">فشل التبديل: %1$s</string> + <string name="session_profile_save_failed">فشل حفظ ملف التعريف: %1$s</string> + <string name="session_desktop_paused">تم إيقاف سطح المكتب مؤقتًا</string> + <string name="session_named_paused">تم إيقاف %1$s مؤقتًا</string> + <string name="session_program_paused">تم إيقاف البرنامج مؤقتًا</string> + <string name="session_starting_desktop">جارٍ تشغيل سطح المكتب</string> + <string name="session_starting_named">جارٍ تشغيل %1$s</string> + <string name="session_starting_program">جارٍ تشغيل البرنامج</string> + <string name="session_no_logs">لا توجد سجلات لهذه الجلسة.</string> + <string name="session_logs_archive_failed">تعذّر إنشاء أرشيف سجلات الجلسة.</string> + <string name="session_logs_share_failed">تعذّرت مشاركة سجلات الجلسة.</string> + <string name="session_starting_session">جارٍ بدء الجلسة…</string> + <string name="session_runtime_downloading">جارٍ تنزيل بيئة تشغيل Linux</string> + <string name="session_runtime_downloading_mb">جارٍ تنزيل بيئة تشغيل Linux · %1$d من %2$d MB</string> + <string name="session_runtime_checking">جارٍ فحص بيئة تشغيل Linux</string> + <string name="session_runtime_unpacking">جارٍ فك ضغط بيئة تشغيل Linux</string> + <string name="session_desktop_downloading">جارٍ تنزيل سطح المكتب</string> + <string name="session_desktop_downloading_mb">جارٍ تنزيل سطح المكتب · %1$d من %2$d MB</string> + <string name="session_desktop_checking">جارٍ فحص سطح المكتب</string> + <string name="session_desktop_unpacking">جارٍ فك ضغط سطح المكتب</string> + <string name="session_proton_downloading">جارٍ تنزيل Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">جارٍ تنزيل Proton Experimental (ARM64) · %1$d من %2$d MB</string> + <string name="session_proton_checking">جارٍ فحص Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">جارٍ فك ضغط Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">تعذّر الوصول إلى كتالوج بيئة التشغيل. تحقَّق من الاتصال واضغط على «تشغيل» مرة أخرى.</string> + <string name="session_runtime_install_failed">لم يتم تثبيت بيئة تشغيل Linux. تحقَّق من بيئة التشغيل في «الإعداد» واضغط على «تشغيل» مرة أخرى.</string> + <string name="session_desktop_install_failed">لم يتم تثبيت سطح المكتب (%1$s). تحقَّق من الاتصال واضغط على «سطح المكتب» مرة أخرى.</string> + <string name="session_ended_named">توقّف %1$s بشكل غير متوقَّع. شارِك السجلات مع بلاغ عن الخطأ، أو حاوِل مرة أخرى.</string> + <string name="session_ended_program">توقّف البرنامج بشكل غير متوقَّع. شارِك السجلات مع بلاغ عن الخطأ، أو حاوِل مرة أخرى.</string> + <string name="session_ended_desktop">توقّف سطح المكتب بشكل غير متوقَّع. شارِك السجلات مع بلاغ عن الخطأ، أو حاوِل مرة أخرى.</string> + <string name="session_ended_detail">حالة الخروج %1$d · %2$s</string> + <string name="session_ended_no_log">لا يوجد سجل</string> + <plurals name="session_hint_enosys"> + <item quantity="zero">يُظهر السجل %1$d خطأ من نوع «Function not implemented»: تسريع seccomp في proot يتسبّب في فشل أداة مساعدة على هذا الجهاز. جرِّب %2$s → «%3$s» (أو «%4$s») وابدأ من جديد.</item> + <item quantity="one">يُظهر السجل خطأً واحدًا من نوع «Function not implemented»: تسريع seccomp في proot يتسبّب في فشل أداة مساعدة على هذا الجهاز. جرِّب %2$s → «%3$s» (أو «%4$s») وابدأ من جديد.</item> + <item quantity="two">يُظهر السجل خطأين من نوع «Function not implemented»: تسريع seccomp في proot يتسبّب في فشل أداة مساعدة على هذا الجهاز. جرِّب %2$s → «%3$s» (أو «%4$s») وابدأ من جديد.</item> + <item quantity="few">يُظهر السجل %1$d أخطاء من نوع «Function not implemented»: تسريع seccomp في proot يتسبّب في فشل أداة مساعدة على هذا الجهاز. جرِّب %2$s → «%3$s» (أو «%4$s») وابدأ من جديد.</item> + <item quantity="many">يُظهر السجل %1$d خطأً من نوع «Function not implemented»: تسريع seccomp في proot يتسبّب في فشل أداة مساعدة على هذا الجهاز. جرِّب %2$s → «%3$s» (أو «%4$s») وابدأ من جديد.</item> + <item quantity="other">يُظهر السجل %1$d خطأ من نوع «Function not implemented»: تسريع seccomp في proot يتسبّب في فشل أداة مساعدة على هذا الجهاز. جرِّب %2$s → «%3$s» (أو «%4$s») وابدأ من جديد.</item> + </plurals> + + <string name="mode_decky_plugins">الإضافات</string> + <string name="mode_decky_plugins_hint">ثبِّت ملف ZIP لإضافة في جلسة Steam التالية.</string> + <string name="mode_decky_plugin_downloading">جارٍ التنزيل…</string> + <string name="mode_decky_plugin_install_zip">التثبيت من ملف ZIP</string> + <string name="store_cat_games">الألعاب</string> + <string name="store_cat_audio_video">الصوت والفيديو</string> + <string name="store_cat_graphics">الرسومات</string> + <string name="store_cat_internet">الإنترنت</string> + <string name="store_cat_office">الأدوات المكتبية</string> + <string name="store_cat_developer">التطوير</string> + <string name="store_cat_education">التعليم</string> + <string name="store_cat_science">العلوم</string> + <string name="store_cat_system">النظام</string> + <string name="store_cat_utilities">الأدوات المساعدة</string> + <string name="store_section_popular">الشائعة</string> + <string name="store_section_trending">الرائجة</string> + <string name="store_section_new">الجديدة</string> + <string name="store_section_updated">المحدَّثة</string> + <string name="store_section_loading">جارٍ التحميل…</string> + <string name="store_flatpak_setup">إعداد Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">تعذّر البحث عن تحديثات على Flathub</string> + <string name="content_rom_installed">مثبَّتة</string> + <string name="content_rom_folder">مجلد</string> + <string name="theme_graphite">غرافيت</string> + <string name="theme_graphite_detail">أسطح بلون الغرافيت، مع أزرق كرة الشعار لكل عنصر محدَّد أو مُركَّز عليه أو مضغوط.</string> + <string name="theme_paper">ورق على أسود</string> + <string name="theme_paper_detail">الأبيض هو اللون الأساسي، وأزرق الأيقونة هو لون الإشارة للخطوط والحلقات والنقاط.</string> + <string name="theme_icon_blue">أزرق الأيقونة</string> + <string name="theme_icon_blue_detail">خلفية سوداء ونص أبيض، والأزرق لكل عنصر محدَّد أو مُركَّز عليه أو مضغوط.</string> + <string name="theme_electric">كحلي كهربائي</string> + <string name="theme_electric_detail">أزرق أكثر سطوعًا، على أسطح تميل إلى الكحلي بدلاً من الرمادي.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">مسافة</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">ثبِّت بيئة التشغيل أولاً</string> + <string name="game_sync_err_steam_library">مكتبة Steam غير متاحة</string> + <string name="game_sync_err_previous_sd">مكتبة SD السابقة غير متاحة</string> + <string name="game_sync_err_game_storage">مساحة تخزين الألعاب غير متاحة</string> + <string name="game_sync_err_added_games">مجلد الألعاب المضافة غير متاح</string> + <string name="game_sync_err_manifests">ملفات البيان في Steam غير متاحة</string> + <string name="content_system_many">أنظمة متعددة</string> + <string name="fm_drive_internal">التخزين الداخلي</string> + <string name="fm_drive_linux">نظام Linux</string> + <string name="fm_drive_sd">بطاقة SD</string> + <string name="fm_drive_storage">التخزين</string> + <string name="fm_select">تحديد</string> + <string name="fm_properties">الخصائص</string> + <string name="fm_favorite_add">إضافة إلى المفضّلة</string> + <string name="fm_favorite_remove">إزالة من المفضّلة</string> + <string name="fm_rename">إعادة التسمية</string> + <string name="fm_copy">نسخ</string> + <string name="fm_cut">قص</string> + <string name="fm_actions">الإجراءات</string> + <string name="fm_favorites">المفضّلة</string> + <string name="fm_pin_current">تثبيت المجلد الحالي</string> + <string name="fm_no_favorites">لا توجد عناصر مفضّلة بعد - ثبِّت مجلدًا من قائمته ⋮ للعودة إليه بسرعة.</string> + <string name="fm_unpin_favorite">إزالة من المفضّلة</string> + <string name="fm_size_zero">0 بايت</string> + <string name="fm_unit_bytes">بايت</string> + <string name="fm_prop_location">الموقع</string> + <string name="fm_prop_type">النوع</string> + <string name="fm_prop_size">الحجم</string> + <string name="fm_prop_modified">تاريخ التعديل</string> + <string name="fm_type_folder">مجلد</string> + <string name="fm_type_file">ملف</string> + <string name="fm_type_ext_file">ملف %1$s</string> + <string name="fm_read_only">للقراءة فقط</string> + <string name="fm_read_only_hint">يمنع الألعاب (وWine) من استبدال هذا الملف أو حذفه.</string> + <string name="fm_read_only_failed">تعذّر تغيير «للقراءة فقط»</string> + <string name="fm_hidden">مخفي</string> + <string name="fm_hidden_unsupported">لا تدعم وحدة التخزين هذه علامة الإخفاء.</string> + <string name="fm_hidden_hint">يجعل الملف مخفيًا في Windows (سمة الإخفاء في Wine).</string> + <string name="fm_hidden_failed">تعذّر تغيير «مخفي» على وحدة التخزين هذه</string> + <string name="fm_done">تم</string> + <string name="fm_op_deleting">جارٍ الحذف...</string> + <string name="fm_delete_failed">فشل الحذف</string> + <string name="fm_op_moving">جارٍ النقل...</string> + <string name="fm_op_copying">جارٍ النسخ...</string> + <string name="fm_op_moving_item">جارٍ النقل - %1$s</string> + <string name="fm_op_copying_item">جارٍ النسخ - %1$s</string> + <string name="fm_op_moving_batch">جارٍ النقل %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">جارٍ النسخ %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">اكتمل %1$d، وفشل %2$d</string> + <string name="fm_paste_skipped">اكتمل %1$d، وتم تخطّي %2$d</string> + <plurals name="fm_paste_moved"> + <item quantity="zero">لم يتم نقل أي عنصر</item> + <item quantity="one">تم نقل عنصر واحد</item> + <item quantity="two">تم نقل عنصرين</item> + <item quantity="few">تم نقل %1$d عناصر</item> + <item quantity="many">تم نقل %1$d عنصرًا</item> + <item quantity="other">تم نقل %1$d عنصر</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="zero">لم يتم نسخ أي عنصر</item> + <item quantity="one">تم نسخ عنصر واحد</item> + <item quantity="two">تم نسخ عنصرين</item> + <item quantity="few">تم نسخ %1$d عناصر</item> + <item quantity="many">تم نسخ %1$d عنصرًا</item> + <item quantity="other">تم نسخ %1$d عنصر</item> + </plurals> + <string name="fm_already_exists">«%1$s» موجود بالفعل</string> + <string name="fm_op_renaming">جارٍ إعادة التسمية...</string> + <string name="fm_rename_failed">فشلت إعادة التسمية</string> + <string name="fm_op_creating_folder">جارٍ إنشاء المجلد...</string> + <string name="fm_create_folder_failed">تعذّر إنشاء المجلد</string> + <string name="fm_new_folder">مجلد جديد</string> + <string name="fm_folder_name">اسم المجلد</string> + <string name="fm_create">إنشاء</string> + <string name="fm_new_name">الاسم الجديد</string> + <string name="fm_delete_title">هل تريد الحذف؟</string> + <string name="fm_delete_text">هل تريد حذف «%1$s» نهائيًا؟</string> + <plurals name="fm_delete_items_title"> + <item quantity="zero">هل تريد حذف %1$d عنصر؟</item> + <item quantity="one">هل تريد حذف عنصر واحد؟</item> + <item quantity="two">هل تريد حذف عنصرين؟</item> + <item quantity="few">هل تريد حذف %1$d عناصر؟</item> + <item quantity="many">هل تريد حذف %1$d عنصرًا؟</item> + <item quantity="other">هل تريد حذف %1$d عنصر؟</item> + </plurals> + <string name="fm_cannot_undo">لا يمكن التراجع عن هذا الإجراء.</string> + <plurals name="fm_and_more"> + <item quantity="zero">…و%1$d عنصر آخر</item> + <item quantity="one">…وعنصر آخر</item> + <item quantity="two">…وعنصران آخران</item> + <item quantity="few">…و%1$d عناصر أخرى</item> + <item quantity="many">…و%1$d عنصرًا آخر</item> + <item quantity="other">…و%1$d عنصر آخر</item> + </plurals> + <string name="fm_op_deleting_batch">جارٍ الحذف %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="zero">تعذّر حذف %1$d عنصر</item> + <item quantity="one">تعذّر حذف عنصر واحد</item> + <item quantity="two">تعذّر حذف عنصرين</item> + <item quantity="few">تعذّر حذف %1$d عناصر</item> + <item quantity="many">تعذّر حذف %1$d عنصرًا</item> + <item quantity="other">تعذّر حذف %1$d عنصر</item> + </plurals> + <string name="fm_conflict_merge_hint">«دمج» يضيف الملفات ويستبدلها داخل المجلد الموجود.</string> + <string name="fm_conflict_overwrite_hint">«استبدال» يحلّ محلّ الملف الموجود.</string> + <string name="fm_conflict_apply_all">التطبيق على كل التعارضات</string> + <string name="fm_conflict_merge">دمج</string> + <string name="fm_conflict_overwrite">استبدال</string> + <string name="fm_conflict_keep_both">الاحتفاظ بالاثنين</string> + <string name="fm_conflict_skip">تخطّي</string> + <string name="fm_select_this_folder">اختيار هذا المجلد</string> + <string name="fm_back">رجوع</string> + <string name="fm_drive_not_readable">تم تركيب %1$s لكن تتعذّر قراءته حاليًا</string> + <string name="fm_list_view">عرض القائمة</string> + <string name="fm_grid_view">عرض الشبكة</string> + <string name="fm_search">بحث</string> + <string name="fm_sort">ترتيب</string> + <string name="fm_sort_name">الاسم</string> + <string name="fm_sort_date">تاريخ التعديل</string> + <string name="fm_rows_comfortable">صفوف واسعة</string> + <string name="fm_rows_compact">صفوف مضغوطة</string> + <string name="fm_hide_hidden">إخفاء الملفات المخفية</string> + <string name="fm_show_hidden">إظهار الملفات المخفية</string> + <string name="fm_hide_favorites">إخفاء المفضّلة</string> + <string name="fm_show_favorites">إظهار المفضّلة</string> + <string name="fm_filter_folder">تصفية هذا المجلد</string> + <string name="fm_free_space">%1$s متاحة</string> + <string name="fm_selected_count">تم تحديد %1$d</string> + <string name="fm_select_none">لا شيء</string> + <string name="fm_select_all">الكل</string> + <string name="fm_paste">لصق</string> + <plurals name="fm_items"> + <item quantity="zero">لا عناصر</item> + <item quantity="one">عنصر واحد</item> + <item quantity="two">عنصران</item> + <item quantity="few">%1$d عناصر</item> + <item quantity="many">%1$d عنصرًا</item> + <item quantity="other">%1$d عنصر</item> + </plurals> + <string name="fm_paste_here">لصق %1$s هنا</string> + <string name="fm_paste_move_here">لصق %1$s هنا (نقل)</string> + <string name="fm_rail_title">الملفات</string> + <string name="fm_rail_storage">التخزين</string> + <string name="fm_rail_quick">وصول سريع</string> + <string name="fm_rail_favorites">المفضّلة</string> + <string name="fm_rail_downloads">التنزيلات</string> + <string name="fm_rail_downloads_short">تنزيلات</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">سجلات الجلسات</string> + <string name="fm_rail_pictures">الصور</string> + <string name="fm_favorite_added">تمت إضافة «%1$s» إلى المفضّلة</string> + <string name="fm_favorite_removed">تمت إزالة «%1$s» من المفضّلة</string> + <string name="fm_empty_directory">المجلد فارغ</string> + <string name="fm_up_one_level">الانتقال لمستوى أعلى</string> + <string name="fm_choose_folder">اختر مجلدًا</string> + <string name="fm_choose_file">اختر ملفًا</string> + <string name="ctrl_tint_steam_blue">أزرق Steam</string> + <string name="ctrl_tint_sky">سماوي</string> + <string name="ctrl_tint_white">أبيض</string> + <string name="ctrl_tint_violet">بنفسجي</string> + <string name="ctrl_tint_green">أخضر</string> + <string name="ctrl_tint_amber">كهرماني</string> + <string name="ctrl_tint_red">أحمر</string> + <string name="ctrl_tint_pink">وردي</string> + <string name="ctrl_button_a">الزر A</string> + <string name="ctrl_button_b">الزر B</string> + <string name="ctrl_button_x">الزر X</string> + <string name="ctrl_button_y">الزر Y</string> + <string name="ctrl_button_lb">الزر الكتفي الأيسر</string> + <string name="ctrl_button_rb">الزر الكتفي الأيمن</string> + <string name="ctrl_button_lt">الزناد الأيسر</string> + <string name="ctrl_button_rt">الزناد الأيمن</string> + <string name="ctrl_button_view">زر العرض</string> + <string name="ctrl_button_menu">زر القائمة</string> + <string name="ctrl_target_view">العرض</string> + <string name="ctrl_target_menu">القائمة</string> + <string name="ctrl_target_up">لوحة الاتجاهات لأعلى</string> + <string name="ctrl_target_down">لوحة الاتجاهات لأسفل</string> + <string name="ctrl_target_left">لوحة الاتجاهات لليسار</string> + <string name="ctrl_target_right">لوحة الاتجاهات لليمين</string> + <string name="ctrl_target_hidden">مخفي</string> + <string name="ctrl_editor_drag">اسحب للنقل</string> + <string name="ctrl_editor_snap">محاذاة</string> + <string name="ctrl_editor_save">حفظ</string> + <string name="second_mode_none">لا شيء</string> + <string name="second_mode_keyboard_trackpad">لوحة المفاتيح + لوحة اللمس</string> + <string name="second_mode_terminal">الوحدة الطرفية</string> + <string name="second_mode_deck_controls">مقابض Deck + لوحتا اللمس</string> + + <string name="rtinst_removing">جارٍ إزالة بيئة تشغيل Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="zero">جارٍ إزالة بيئة تشغيل Linux · %1$d عنصر</item> + <item quantity="one">جارٍ إزالة بيئة تشغيل Linux · عنصر واحد</item> + <item quantity="two">جارٍ إزالة بيئة تشغيل Linux · عنصران</item> + <item quantity="few">جارٍ إزالة بيئة تشغيل Linux · %1$d عناصر</item> + <item quantity="many">جارٍ إزالة بيئة تشغيل Linux · %1$d عنصرًا</item> + <item quantity="other">جارٍ إزالة بيئة تشغيل Linux · %1$d عنصر</item> + </plurals> + <string name="rtinst_removed">تمت إزالة بيئة تشغيل Linux</string> + <string name="rtinst_removal_failed">تعذّر إكمال إزالة بيئة تشغيل Linux. أعِد محاولة الإزالة في «الإعداد».</string> + <string name="rtinst_removing_leftovers">جارٍ إزالة بقايا بيئة التشغيل</string> + <string name="rtinst_downloading">جارٍ التنزيل</string> + <string name="rtinst_verifying">جارٍ التحقّق</string> + <string name="rtinst_extracting">جارٍ الاستخراج</string> + <string name="rtinst_channel_description">يظهر أثناء تثبيت بيئة تشغيل Linux أو إزالتها</string> + <string name="rtinst_title_installing">جارٍ تثبيت بيئة تشغيل Linux</string> + <string name="rtinst_title_removing">جارٍ إزالة بيئة تشغيل Linux</string> + + <string name="deskpkg_runtime_missing">بيئة تشغيل Linux غير مثبَّتة</string> + <string name="deskpkg_no_checksum">لا يتضمّن الكتالوج مجموعًا اختباريًا لـ %1$s</string> + <string name="deskpkg_checksum_mismatch">المجموع الاختباري غير مطابق - لم يتم تغيير أي شيء</string> + <string name="deskpkg_installing">جارٍ تثبيت %1$s</string> + <string name="deskpkg_place_failed">تعذّر وضع ملف AppImage في مكانه</string> + <string name="deskpkg_extract_failed">فشل الاستخراج</string> + <string name="deskpkg_install_failed">فشل التثبيت</string> + + <string name="flatpakmgr_setup_failed">فشل إعداد Flatpak (رمز الخروج %1$d)</string> + <string name="flatpakmgr_setup_unfinished">لم يكتمل إعداد Flatpak</string> + <string name="flatpakmgr_busy">هناك مهمة أخرى للمتجر قيد التشغيل</string> + <string name="flatpakmgr_not_ready">أعِدّ Flatpak أولاً</string> + <string name="flatpakmgr_starting">جارٍ البدء</string> + <string name="flatpakmgr_exit_status">خرج Flatpak بالحالة %1$d</string> + <string name="flatpakmgr_installing">جارٍ تثبيت %1$s</string> + <string name="flatpakmgr_updating">جارٍ تحديث %1$s</string> + <string name="flatpakmgr_removing">جارٍ إزالة %1$s</string> + <string name="flatpakmgr_installing_step">جارٍ تثبيت %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">جارٍ تحديث %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">جارٍ إزالة %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">الترجمات</string> + <string name="flatpakmgr_ref_graphics_drivers">برامج تشغيل الرسومات</string> + <string name="flatpakmgr_ref_media_codecs">برامج ترميز الوسائط</string> + <string name="flatpakmgr_ref_runtime">بيئة تشغيل %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">بيئة تشغيل %1$s %2$s</string> + + <string name="appimg_too_small">الملف أصغر من أن يكون AppImage</string> + <string name="appimg_unreadable">تتعذّر قراءة الملف: %1$s</string> + <string name="appimg_not_linux">هذا ليس AppImage (ليس برنامج Linux)</string> + <string name="appimg_wrong_arch">ملف AppImage هذا غير مُعَدّ لمعالجات ARM64 (aarch64) ولا لأجهزة الكمبيوتر x86</string> + <string name="appimg_not_appimage">هذا برنامج Linux لكنه ليس AppImage</string> + <string name="appimg_wrong_type">لا يمكن استيراد سوى ملفات AppImage من النوع 2 (هذا الملف من النوع %1$d)</string> + <string name="appimg_no_space_import">لا توجد مساحة خالية كافية: يتطلّب الاستيراد نحو %1$s</string> + <string name="appimg_no_space_update">لا توجد مساحة خالية كافية: يتطلّب التحديث نحو %1$s</string> + <string name="appimg_import_failed">فشل الاستيراد</string> + <string name="appimg_gone">لم يعد ملف AppImage هذا موجودًا</string> + <string name="appimg_update_failed">فشل التحديث</string> + <string name="appimg_extracting">جارٍ استخراج %1$s</string> + <string name="appimg_extract_failed">تعذّر استخراج ملف AppImage</string> + <string name="appimg_extract_failed_detail">تعذّر استخراج ملف AppImage: %1$s</string> + + <string name="deckymgr_stop_session_loader">أوقِف الجلسة النشطة قبل تثبيت Decky Loader</string> + <string name="deckymgr_download_failed">فشل تنزيل Decky Loader</string> + <string name="deckymgr_size_mismatch">حجم Decky Loader غير مطابق لبيانات الإصدار الوصفية</string> + <string name="deckymgr_checksum_download_failed">تعذّر تنزيل المجموع الاختباري للإصدار</string> + <string name="deckymgr_checksum_missing">المجموع الاختباري للإصدار غير متوفّر</string> + <string name="deckymgr_checksum_invalid">المجموع الاختباري للإصدار غير صالح</string> + <string name="deckymgr_checksum_mismatch">عدم تطابق المجموع الاختباري لـ Decky Loader</string> + <string name="deckymgr_not_elf">ملف الإصدار ليس ملفًا تنفيذيًا متوافقًا بنظام Linux 64 بت</string> + <string name="deckymgr_session_started_loader">بدأت جلسة خلال التنزيل، أوقفها قبل تثبيت Decky Loader</string> + <string name="deckymgr_loader_not_executable">تعذّر وضع علامة قابل للتنفيذ على PluginLoader</string> + <string name="deckymgr_cef_failed">تعذّر تفعيل تصحيح الأخطاء عن بُعد لـ Steam CEF</string> + <string name="deckymgr_stage_failed">تعذّر تجهيز PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">تعذّر الحفاظ على PluginLoader الحالي</string> + <string name="deckymgr_loader_activate_failed">تعذّر تفعيل PluginLoader الجديد</string> + <string name="deckymgr_stop_session_plugin">أوقِف الجلسة النشطة قبل تثبيت إضافة</string> + <string name="deckymgr_loader_required">ثبِّت Decky Loader قبل استيراد إضافة</string> + <string name="deckymgr_zip_unreadable">تعذّرت قراءة ملف ZIP المحدَّد</string> + <string name="deckymgr_plugins_dir_failed">تعذّر إنشاء مجلد إضافات Decky</string> + <string name="deckymgr_extracting_zip">جارٍ استخراج ملف ZIP للإضافة</string> + <string name="deckymgr_zip_one_folder">يجب أن يحتوي ملف ZIP للإضافة على مجلد إضافة واحد في المستوى الأعلى</string> + <string name="deckymgr_zip_missing_files">ملف ZIP للإضافة يفتقد plugin.json أو package.json أو dist/index.js</string> + <string name="deckymgr_plugin_name_missing">اسم الإضافة غير متوفّر</string> + <string name="deckymgr_session_started_plugin">بدأت جلسة خلال التثبيت، أوقفها قبل تثبيت إضافة</string> + <string name="deckymgr_plugin_installed">تم تثبيت الإضافة · أعِد تشغيل Steam لتحميلها</string> + <string name="deckymgr_plugin_install_failed">فشل تثبيت ملف ZIP للإضافة</string> + <string name="deckymgr_zip_too_many">يحتوي ملف ZIP للإضافة على عدد كبير جدًا من العناصر</string> + <string name="deckymgr_zip_invalid_path">يحتوي ملف ZIP للإضافة على مسار غير صالح</string> + <string name="deckymgr_zip_duplicate_paths">يحتوي ملف ZIP للإضافة على مسارات مكرَّرة</string> + <string name="deckymgr_zip_unsafe_path">يحتوي ملف ZIP للإضافة على مسار غير آمن</string> + <string name="deckymgr_folder_failed">تعذّر إنشاء مجلد الإضافة</string> + <string name="deckymgr_zip_too_large">يتجاوز ملف ZIP للإضافة بعد الاستخراج الحدّ البالغ 1 GiB</string> + <string name="deckymgr_bundled_not_executable">تعذّر وضع علامة قابل للتنفيذ على الملف الثنائي المرفَق للإضافة</string> + <string name="deckymgr_remote_entry_invalid">عنصر remote_binary غير صالح</string> + <string name="deckymgr_remote_name_invalid">اسم الملف الثنائي البعيد غير صالح</string> + <string name="deckymgr_remote_url_https">يجب أن يستخدم رابط الملف الثنائي البعيد بروتوكول HTTPS</string> + <string name="deckymgr_remote_hash_invalid">تجزئة SHA-256 غير صالحة للملف الثنائي البعيد %1$s</string> + <string name="deckymgr_bin_dir_failed">تعذّر إنشاء مجلد bin للإضافة</string> + <string name="deckymgr_downloading_binary">جارٍ تنزيل الملف الثنائي للإضافة · %1$s</string> + <string name="deckymgr_binary_download_failed">تعذّر تنزيل الملف الثنائي للإضافة %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">عدم تطابق المجموع الاختباري للملف الثنائي للإضافة · %1$s</string> + <string name="deckymgr_binary_not_executable">تعذّر وضع علامة قابل للتنفيذ على الملف الثنائي للإضافة · %1$s</string> + <string name="deckymgr_binary_replace_failed">تعذّر استبدال الملف الثنائي للإضافة · %1$s</string> + <string name="deckymgr_binary_install_failed">تعذّر تثبيت الملف الثنائي للإضافة · %1$s</string> + <string name="deckymgr_folder_taken">مجلد الإضافة يخصّ إضافة أخرى</string> + <string name="deckymgr_preserve_failed">تعذّر الحفاظ على الإضافة الحالية</string> + <string name="deckymgr_activate_failed">تعذّر تفعيل الإضافة المستورَدة</string> + <string name="deckymgr_settings_failed">تعذّر تحديث إعدادات إضافات Decky</string> + <string name="deckymgr_restore_failed">تعذّر استعادة الإضافة الحالية</string> + + <string name="adbfix_save_failed">تعذّر حفظ هوية تصحيح الأخطاء اللاسلكي</string> + <string name="adbfix_command_failed">فشل أمر ADB (%1$d)</string> + <string name="adbfix_not_confirmed">لم يؤكّد Android تغيير حدّ العمليات الفرعية: %1$s</string> + <string name="adbfix_no_pairing">لا يوجد إقران محفوظ لتصحيح الأخطاء اللاسلكي</string> + <string name="adbfix_enter_address">أدخِل عنوان IP الحالي ورقم المنفذ لتصحيح الأخطاء اللاسلكي</string> + + <string name="adbpair_timed_out">انتهت مهلة انتظار النافذة المنبثقة للإقران. حاوِل مرة أخرى من DroidDeck.</string> + <string name="adbpair_discovery_failed_code">تعذّر البحث عن النافذة المنبثقة للإقران (%1$d). تحقَّق من تفعيل Wi-Fi.</string> + <string name="adbpair_discovery_failed">تعذّر البحث عن النافذة المنبثقة للإقران: %1$s</string> + <string name="adbpair_six_digits">أدخِل الأرقام الستة كاملةً للرمز</string> + <string name="adbpair_pairing">جارٍ الإقران…</string> + <string name="adbpair_code_rejected">لم ينجح هذا الرمز. افتح النافذة المنبثقة للإقران مرة أخرى وأدخِل رمزها الجديد.</string> + <string name="adbpair_connecting">تم الإقران. جارٍ الاتصال…</string> + <string name="adbpair_port_not_found">تم الإقران، لكن لم يتم العثور على منفذ تصحيح الأخطاء اللاسلكي. اترك تصحيح الأخطاء اللاسلكي مفعَّلاً وحاوِل مرة أخرى.</string> + <string name="adbpair_applying">جارٍ تطبيق الإعداد…</string> + <string name="adbpair_command_failed">فشل أمر تصحيح الأخطاء اللاسلكي</string> + <string name="adbpair_channel_name">إعداد تصحيح الأخطاء اللاسلكي</string> + <string name="adbpair_channel_description">يطلب رمز إقران تصحيح الأخطاء اللاسلكي أثناء فتح الإعدادات</string> + <string name="adbpair_title_pair">إقران تصحيح الأخطاء اللاسلكي</string> + <string name="adbpair_waiting_text">فعِّل تصحيح الأخطاء اللاسلكي، ثم اضغط على «إقران الجهاز برمز الإقران».</string> + <string name="adbpair_waiting_long">فعِّل تصحيح الأخطاء اللاسلكي، ثم اضغط على «إقران الجهاز برمز الإقران». ابقَ في الإعدادات: يُكتب الرمز في هذا الإشعار.</string> + <string name="adbpair_code_label">رمز الإقران المكوَّن من 6 أرقام</string> + <string name="adbpair_code_hint">اضغط على «إدخال الرمز» وأدخِل الأرقام الستة الظاهرة في الإعدادات.</string> + <string name="adbpair_title_code">أدخِل رمز إقران Wi-Fi</string> + <string name="adbpair_title_retry">أعِد تجربة الرمز</string> + <string name="adbpair_enter_code">إدخال الرمز</string> + <string name="adbpair_title_working">جارٍ إعداد Steam</string> + <string name="adbpair_title_done">Steam جاهز</string> + <string name="adbpair_done_text">اضغط للعودة إلى DroidDeck. يمكنك إيقاف تصحيح الأخطاء اللاسلكي الآن.</string> + <string name="adbpair_title_failed">توقَّف إعداد تصحيح الأخطاء اللاسلكي</string> + + <string name="selfinst_download_failed">فشل التنزيل</string> + <string name="selfinst_size_mismatch">حجم التنزيل غير مطابق لملف APK المنشور، وتم تجاهله - حاوِل مرة أخرى</string> + <string name="selfinst_checksum_mismatch">التنزيل غير مطابق لمجموعه الاختباري، وتم تجاهله - حاوِل مرة أخرى</string> + <string name="selfinst_wrong_package">التحديث مخصَّص لحزمة Android %1$s، لا %2$s</string> + <string name="selfinst_metadata_signer">بيانات التحديث الوصفية لا تذكر مفتاح توقيع إصدار DroidDeck</string> + <string name="selfinst_unreadable">تعذّر على Android قراءة ملف APK الذي تم تنزيله</string> + <string name="selfinst_apk_wrong_package">ملف APK الذي تم تنزيله مخصَّص لـ %1$s، لا %2$s</string> + <string name="selfinst_version_mismatch">يشير ملف APK الذي تم تنزيله إلى versionCode %1$d، لا %2$d المنشور</string> + <string name="selfinst_downgrade">لن يثبِّت Android versionCode %1$d فوق %2$d المثبَّت</string> + <string name="selfinst_no_signing">ملف APK الذي تم تنزيله لا يحمل معلومات توقيع</string> + <string name="selfinst_wrong_signer">ملف APK الذي تم تنزيله غير موقَّع بمفتاح إصدار DroidDeck</string> + <string name="appupd_http">استجاب كتالوج التحديثات بـ HTTP %1$d</string> + + <string name="loadstate_starting">جارٍ بدء الجلسة…</string> + <string name="loadstate_elapsed">%1$d:%2$02d منقضية · لا تزال جارية</string> + <string name="loadstate_steam_update">جارٍ تنزيل تحديث عميل Steam · %1$d%%</string> + <string name="loadstate_steam_client">جارٍ تنزيل عميل Steam · %1$s</string> + + <string name="pextra_busy">يوجد تثبيت لأداة توافق قيد التنفيذ بالفعل</string> + <string name="pextra_stop_session">أوقِف الجلسة النشطة قبل تثبيت أدوات التوافق</string> + <string name="pextra_no_release">تعذّر العثور على إصدار ARM64 لـ %1$s</string> + <string name="pextra_no_space">يلزم توفُّر 4 GB على الأقل بالإضافة إلى حجم التنزيل لتثبيت %1$s</string> + <string name="pextra_downloading">جارٍ تنزيل %1$s %2$s</string> + <string name="pextra_retrying">جارٍ إعادة محاولة التنزيل · المحاولة %1$d من %2$d</string> + <string name="pextra_interrupted">انقطع التنزيل</string> + <string name="pextra_download_failed">فشل التنزيل؛ تم الاحتفاظ بالملف الجزئي لإتاحة استئنافه عند إعادة المحاولة</string> + <string name="pextra_too_big">تجاوز التنزيل حجم الإصدار وتم حذفه</string> + <string name="pextra_incomplete">لم يكتمل التنزيل؛ تم الاحتفاظ بالملف الجزئي لإعادة محاولة قابلة للاستئناف</string> + <string name="pextra_verifying">جارٍ التحقّق من التنزيل</string> + <string name="pextra_checksum_unreadable">تعذّرت قراءة المجموع الاختباري للإصدار؛ حاوِل مرة أخرى</string> + <string name="pextra_no_checksum">لا ينشر %1$s %2$s مجموعًا اختباريًا؛ لم يتم تثبيت أي شيء</string> + <string name="pextra_checksum_mismatch">عدم تطابق المجموع الاختباري؛ تم حذف التنزيل</string> + <string name="pextra_session_started">بدأت جلسة خلال التنزيل، أوقفها قبل تثبيت أدوات التوافق</string> + <string name="pextra_installing">جارٍ تثبيت %1$s</string> + <string name="pextra_install_failed">فشل تثبيت %1$s (حالة الخروج %2$d)</string> + <string name="pextra_could_not_install">تعذّر تثبيت %1$s</string> + <string name="esync_fetching">جارٍ جلب حزمة droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">مع أدوات Linux المساعدة</string> + <string name="cmgr_fex_dlls_only">ملفات DLL فقط</string> + <string name="cmgr_original_proton_updated">الأصلي (تم تحديث Proton منذ آخر تبديل)</string> + <string name="cmgr_changed_outside">تم تغييره خارج المكوّنات</string> + <string name="cmgr_not_present">غير موجود</string> + <string name="cmgr_original_version">الأصلي %1$s</string> + <string name="cmgr_original_from">الأصلي من %1$s</string> + <string name="cmgr_swap_queued">سينتقل %1$s %2$s إلى %3$s عند إغلاق اللعبة التي تعمل عليه.</string> + <string name="cmgr_swap_done">أصبح %1$s %2$s الآن في %3$s. يُطبَّق عند تشغيل لعبة في المرة التالية.</string> + <string name="cmgr_original_missing">تلك الحزمة الأصلية غير مخزَّنة</string> + <string name="cmgr_restore_queued">سيعود %1$s في %2$s إلى أصله عند إغلاق اللعبة التي تعمل عليه.</string> + <string name="cmgr_restore_done">تمت استعادة %1$s في %2$s من أصله في %3$s.</string> + <string name="cmgr_package_in_use">%1$s قيد الاستخدام في %2$s. بدِّل ذلك الإصدار من Proton إلى شيء آخر أولاً.</string> + <string name="cmgr_package_not_stored">%1$s غير مخزَّن</string> + <string name="cmgr_deleted">تم حذف %1$s.</string> + <string name="cmgr_original_kept">تم الاحتفاظ بأصل النسخة المثبَّتة: فهو طريق العودة.</string> + <string name="cmgr_not_stored">غير مخزَّن</string> + <string name="cmgr_deleted_original">تم حذف أصل %2$s من %1$s.</string> + <string name="cmgr_nightlies_only">التنزيلات تأتي فقط من إصدارات Nightlies</string> + <string name="cmgr_list_predates_checksums">قائمة الحزم هذه أقدم من إضافة المجاميع الاختبارية - حدِّثها وحاوِل مرة أخرى</string> + <string name="cmgr_checksum_mismatch">عدم تطابق المجموع الاختباري</string> + + <string name="sprefs_upscaler_linear">خطي</string> + <string name="sprefs_upscaler_nearest">الأقرب</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (جودة)</string> + <string name="sprefs_upscaler_sharpen">زيادة الحدة فقط</string> + <string name="sprefs_lod_bias_auto">تلقائي (يطابق التكبير)</string> + + <string name="look_off_desc">لا يُطبَّق أي شيء.</string> + <string name="look_game_clarity">وضوح اللعبة</string> + <string name="look_game_clarity_desc">زيادة حدّة مع لمسة من التباين - الخيار اليومي.</string> + <string name="look_vivid">زاهي</string> + <string name="look_vivid_desc">ألوان مُعزَّزة بقوة، مع تفعيل إزالة التدرّج الشريطي لمنع ظهور خطوط في السماء.</string> + <string name="look_cinematic">سينمائي</string> + <string name="look_cinematic_desc">تباين أعمق، ألوان أبرد، وحواف أكثر نعومة.</string> + <string name="look_competitive">تنافسي</string> + <string name="look_competitive_desc">ظلال مرفوعة وزيادة حدّة قوية - لرؤية الأشخاص أولاً.</string> + <string name="look_adaptive_sharpen">زيادة حدّة متكيّفة</string> + <string name="look_adaptive_sharpen_desc">زيادة حدّة فقط، دون تغيير الألوان.</string> + <string name="look_filmic">فيلمي</string> + <string name="look_filmic_desc">منحنى يشبه الفيلم السينمائي، بألوان خافتة قليلاً.</string> + <string name="look_arcade">أركيد</string> + <string name="look_arcade_desc">صاخب وقوي التأثير.</string> + <string name="look_retro_crt">CRT الكلاسيكي</string> + <string name="look_retro_crt_desc">تأثير أنبوب CRT والإشارة التناظرية معًا.</string> + <string name="look_upscale_sharp">تكبير حاد</string> + <string name="look_upscale_sharp_desc">للتشغيل بدقة أقل من دقة الشاشة.</string> + <string name="look_pixel_clean">بكسل نقي</string> + <string name="look_pixel_clean_desc">بكسلات واضحة للألعاب الثنائية الأبعاد والألعاب القديمة.</string> + <string name="look_anime_edge">حافة الأنيمي</string> + <string name="look_anime_edge_desc">حدود كرتونية مع زيادة الحدّة.</string> + + <string name="gpuinfo_not_adreno">وحدة GPU ليست من نوع Adreno</string> + <string name="gpuinfo_supported">مدعوم</string> + <string name="gpuinfo_experimental">تجريبي: برامج تشغيله إصدارات اختبارية</string> + <string name="gpuinfo_below_tested">أقل من العتاد المُختبَر (Adreno 725 وأحدث): قد لا يعمل</string> + <string name="gpuinfo_unsupported">غير مدعوم: يحتاج DroidDeck إلى وحدة GPU من نوع Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">تم الوصول إلى حدّ الطلبات في GitHub - حاوِل مرة أخرى لاحقًا</string> + <string name="turnip_github_http">استجاب GitHub بـ HTTP %1$d</string> + <string name="turnip_download_failed">فشل التنزيل</string> + <string name="turnip_list_predates_checksums">قائمة برامج التشغيل هذه أقدم من إضافة المجاميع الاختبارية - حدِّثها وحاوِل مرة أخرى</string> + <string name="turnip_checksum_mismatch">عدم تطابق المجموع الاختباري - تم تجاهل التنزيل</string> + <string name="turnip_not_adrenotools">ليس برنامج تشغيل AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">لا يوجد meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json غير قابل للقراءة (%1$s)</string> + <string name="turnip_reject_linux_driver">هذا برنامج تشغيل بيئة Linux (استورده ضمن «برنامج تشغيل بيئة Linux»)</string> + <string name="turnip_reject_wayland">هذا برنامج تشغيل ألعاب لـ Wayland، ولا يستخدمه هذا التطبيق</string> + <string name="turnip_reject_no_library_name">لا يذكر meta.json أي libraryName، فلم يكن بالإمكان تسليم أي شيء إلى AdrenoTools</string> + <string name="turnip_reject_library_missing">يذكر meta.json اسم %1$s، وهو غير موجود في ملف zip</string> + <string name="turnip_reject_not_aarch64">%1$s ليست مكتبة مشتركة ELF من نوع AArch64 64 بت</string> + <string name="turnip_reject_glibc">%1$s يرتبط بـ glibc - وهو إصدار Turnip بامتداد «-Linux»، الذي يندرج تحت «برنامج تشغيل بيئة Linux»</string> + <string name="lvd_no_library">لا يوجد libvulkan_freedreno*.so في ملف zip هذا. ملف Turnip من نوع Android (AdrenoTools) أو -Wayland ليس برنامج تشغيل بيئة Linux.</string> + <string name="lvd_not_aarch64">%1$s ليست مكتبة مشتركة ELF من نوع AArch64 64 بت.</string> + <string name="lvd_not_glibc">%1$s ليس برنامج تشغيل glibc - فهو يرتبط بمكتبة libc الخاصة بـ Android. تحتاج بيئة تشغيل Linux إلى ملف zip بامتداد «-Linux»؛ ولا يمكن لعميل Steam تحميل إصدار Turnip العادي أو بامتداد «-Wayland» على الإطلاق.</string> + <string name="bundle_no_manifest">ليست حزمة برامج تشغيل: لا يوجد manifest.json يذكر برنامج تشغيل لـ Android وآخر لـ Linux</string> + <string name="bundle_entry_outside">ليست حزمة برامج تشغيل: %1$s يشير إلى خارجها</string> + <string name="bundle_too_large">ليست حزمة برامج تشغيل: تتجاوز بعد الاستخراج %1$d MB</string> + + <string name="gstore_sd_card">بطاقة SD</string> + <string name="gstore_folder">مجلد</string> + + <string name="logshare_chooser">مشاركة سجلات الجلسة</string> + + <string name="hdr_needs_android_10">يحتاج إلى Android 10 أو أحدث (طبقات عرض بمساحة ألوان)</string> + <string name="hdr_none">لا تُعلن هذه الشاشة عن دعم HDR</string> + <string name="hdr_not_hdr10">تدعم هذه الشاشة %1$s، وليس HDR10</string> + + <string name="gpu_this_gpu">وحدة GPU هذه</string> + <string name="phantom_title_on">حدّ العمليات الفرعية مفعَّل</string> + <string name="phantom_title_unset">حدّ العمليات الفرعية غير محدَّد</string> + <string name="phantom_title_unreadable">تعذّر التحقّق من حدّ العمليات الفرعية</string> + <string name="phantom_title_off">حدّ العمليات الفرعية غير مفعَّل</string> + <string name="phantom_title_not_required">حدّ العمليات الفرعية غير مطلوب</string> + <string name="phantom_instructions_fix">%1$s إذا لم يكن ذلك ممكنًا، وصِّل هذا الجهاز بكمبيوتر يستخدم ADB ونفِّذ الأمر أدناه. عُد إلى هنا وتحقَّق مرة أخرى.</string> + <string name="phantom_instructions_off">يمكن بدء جلسات Steam.</string> + <string name="phantom_instructions_not_applicable">لا يستخدم إصدار Android هذا هذا الحدّ.</string> + <string name="phantom_fix_toggle">فعِّل «إيقاف القيود المفروضة على العمليات الثانوية» في خيارات المطوّرين، واترك خيارات المطوّرين مفعَّلة بعد ذلك.</string> + <string name="phantom_fix_no_toggle">لا يحتوي إصدار Android هذا على مفتاح لذلك. استخدِم تصحيح الأخطاء اللاسلكي لتغييره من هذا الجهاز.</string> + <string name="upd_block_no_apk">لا يتوفّر تنزيل لهذا الإصدار الخاص بهذه النسخة من DroidDeck.</string> + <string name="upd_block_version_code">لن يثبِّته Android فوق هذا الإصدار لأن versionCode %1$d أقل من %2$d المثبَّت.</string> + <string name="upd_fail_downgrade">لن يثبِّت Android إصدارًا أقدم فوق إصدار أحدث. ابقَ على هذا الإصدار إلى أن تلحق به قناة التحديثات.</string> + <string name="upd_fail_signature">هذه النسخة من DroidDeck موقَّعة بشكل مختلف (إصدار محلي؟)، فلن يحدِّثها Android في مكانها.</string> + <string name="upd_fail_storage">لا تتوفّر مساحة خالية كافية للتحديث.</string> + <string name="upd_fail_aborted">تم إلغاء التحديث.</string> + <string name="upd_fail_with_message">لم يتم تثبيت التحديث: %1$s</string> + <string name="upd_fail_generic">لم يتم تثبيت التحديث.</string> + <string name="saves_layout_zip">ملف zip لـ %1$s</string> + <string name="saves_zip">ملف zip</string> + <string name="saves_not_launched">لم يتم تشغيل %1$s بعد</string> + <string name="saves_none_found">لم يتم العثور على ملفات حفظ لـ %1$s</string> + <string name="saves_not_save_zip">لا يحتوي %1$s على مجلد drive_c، فهو ليس ملف حفظ من GameHub أو Winlator</string> + <string name="gstore_cannot_create">تعذّر إنشاء مجلدات في %1$s</string> + <string name="gstore_cannot_write">تعذّرت الكتابة في %1$s</string> + <string name="gstore_cannot_write_detail">تعذّرت الكتابة في %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">المجلد غير متاح</string> + <string name="gfiles_name_taken">يستخدم ملف آخر %1$s بالفعل</string> + <string name="gfiles_art_unavailable">مجلد الصور الفنية غير متاح</string> + <string name="gfiles_unrelated_inventory">يحتوي المجلد على قائمة مزامنة غير ذات صلة</string> + <string name="gfiles_remove_failed">تعذّرت إزالة %1$s</string> + <string name="gfiles_outside_folder">الملف يخرج عن مجلد التصدير</string> + <string name="cmgr_fex_unnamed">FEX (إصدار بدون اسم نسخة)</string> + <string name="cmgr_no_profile">لا يوجد profile.json في %1$s</string> + <string name="cmgr_not_component_package">%1$s ليس حزمة مكوّن لـ Linux (النوع %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s متاحة</string> + <string name="mode_storage_auto_short">تلقائي</string> + <string name="appupd_catalog_rejected">فشل كتالوج التحديثات في اختباراته (%1$s)</string> + <string name="main_adb_clip_label">إعداد العمليات الفرعية لـ DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">تم تسجيل الدخول · وضع عدم الاتصال</string> + <string name="setup_signed_in_unnamed">تم تسجيل الدخول</string> + <string name="driver_tag_bundled">مرفق</string> + <string name="driver_tag_downloaded">منزَّل</string> + <string name="driver_tag_imported">مستورَد</string> + <string name="driver_tag_bundle">Android + Linux</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">شاشة الجلسة</string> + <string name="display_resolution">الدقة</string> + <string name="display_game_fit">ملاءمة اللعبة لنسبة 16:9</string> + <string name="display_game_fit_hint">كيفية ملاءمة ألعاب 16:9 لهذه الشاشة. يُطبَّق في الجلسة التالية.</string> + <string name="display_game_fit_unavailable">اختر «مطابقة الشاشة» أو حجمًا مخصَّصًا أضيق من 16:9.</string> + <string name="display_preserve">الحفاظ على النسب</string> + <string name="display_stretch">تمديد لملء الشاشة</string> + <string name="display_image_scaling">تكبير الصورة</string> + <string name="display_filter">مرشِّح التكبير</string> + <string name="display_filter_hint">مشترك بين Steam وسطح المكتب.</string> + <string name="display_filter_live">يُطبَّق فوريًا. مشترك بين Steam وسطح المكتب.</string> + <string name="display_filter_note">تُطبَّق FSR و GSR و NIS عند تكبير صورة الجلسة. ويعمل خيار «زيادة الحدة فقط» أيضًا دون تكبير.</string> + <string name="display_sharpness">حدّة المرشِّح</string> + <string name="display_frame_rate">معدّل الإطارات</string> + <string name="display_look_filter">%1$s يضبط أسلوب التكبير على %2$s.</string> + <string name="display_match_screen">مطابقة الشاشة (%1$d×%2$d)</string> + <string name="display_follow_screen">اتباع الشاشة (يُغيَّر الحجم عند الطي أو الفتح)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">إظهار تفاصيل الجهاز</string> + <string name="device_info_hide">إخفاء تفاصيل الجهاز</string> + <string name="device_info_loading">جارٍ قراءة بيانات الجهاز…</string> + <string name="device_info_copy">نسخ</string> + <string name="device_info_copy_hint">انسخ هذه التفاصيل في بلاغ عن الخطأ.</string> + <string name="device_info_copied">تم النسخ.</string> + <string name="force_ssbs_title">فرض SSBS</string> + <string name="force_ssbs_hint">يحافظ على إعداد سرعة لوحدة المعالجة (CPU) يستمر Wine في إيقافه. قد يجعل ألعاب Windows أسرع على Snapdragon 8 Elite؛ مع تغيّر طفيف على الشرائح الأقدم. يُطبَّق عند تشغيل اللعبة في المرة التالية.</string> + + <string name="rail_stores">المتاجر</string> + <string name="source_steam">Steam</string> + <string name="source_added">مخصَّص</string> + <string name="setup_stores">المتاجر</string> + <string name="setup_stores_open_on">فتح متجر على</string> + <string name="setup_stores_speed">فئة سرعة التنزيل</string> + <string name="setup_stores_engine">محرك المتاجر</string> + <string name="setup_stores_engine_chip_ready">● المحرك جاهز</string> + <string name="setup_stores_engine_chip_missing">غير مبنيّ</string> + <string name="stores_tier_balanced">متوازن</string> + <string name="stores_tier_fast">سريع</string> + <string name="stores_tier_max">أقصى</string> + <string name="stores_title">المتاجر</string> + <string name="stores_settings">إعدادات المتاجر</string> + <string name="stores_settings_eyebrow">الإعدادات</string> + <string name="stores_chip_signed_out">(لم يتم تسجيل الدخول)</string> + <string name="stores_tab_store">المتجر</string> + <string name="stores_tab_installed">المثبَّتة</string> + <string name="stores_tab_library">المكتبة</string> + <string name="stores_tab_all">الكل</string> + <string name="stores_tab_downloads">التنزيلات</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">تسجيل الدخول</string> + <string name="stores_signout_named">%1$s · تسجيل الخروج</string> + <string name="stores_signout_title">تسجيل الخروج من %1$s؟</string> + <string name="stores_signout_note">تبقى الألعاب المثبَّتة. تُجلَب المكتبة مرة أخرى عند تسجيل الدخول مجددًا.</string> + <string name="stores_signout_stay">البقاء مسجَّل الدخول</string> + <string name="stores_signout_go">تسجيل الخروج</string> + <string name="stores_search_catalog">البحث في كتالوج %1$s…</string> + <string name="stores_search_installed">البحث في الألعاب المثبَّتة…</string> + <string name="stores_search_library">البحث في مكتبتك…</string> + <string name="stores_search_open">البحث</string> + <string name="stores_installed_empty">لا شيء مثبَّت</string> + <string name="stores_library_loading">جارٍ التحميل</string> + <string name="stores_nothing_matches">لا توجد ألعاب</string> + <string name="stores_shelves_loading">جارٍ تحميل المتجر…</string> + <string name="stores_amazon_no_catalog">لا يوجد كتالوج</string> + <string name="stores_shelf_new">الجديد</string> + <string name="stores_shelf_deals">العروض</string> + <string name="stores_shelf_free">ألعاب مجانية</string> + <string name="stores_shelf_trending">الرائج</string> + <string name="stores_shelf_library">مكتبتك</string> + <string name="stores_play">تشغيل</string> + <string name="stores_install">تثبيت</string> + <string name="stores_resume_install">استئناف التثبيت</string> + <string name="stores_dl_interrupted">منقطع</string> + <string name="stores_install_size">تثبيت · %1$s</string> + <string name="stores_get_free">احصل عليها مجانًا</string> + <string name="stores_view_on">عرض على %1$s</string> + <string name="stores_buy_price">شراء · %1$s</string> + <string name="stores_installed_chip">مثبَّتة</string> + <string name="stores_in_library">في المكتبة</string> + <string name="stores_free">مجاني</string> + <string name="stores_resume">استئناف</string> + <string name="stores_refresh">تحديث</string> + <string name="stores_sort">ترتيب</string> + <string name="stores_sort_last_played">لُعب مؤخرًا</string> + <string name="stores_sort_recently_installed">ثُبت مؤخرًا</string> + <string name="stores_sort_title_asc">العنوان أ–ي</string> + <string name="stores_sort_title_desc">العنوان ي–أ</string> + <string name="stores_sort_size_desc">الحجم: الأكبر</string> + <string name="stores_sort_size_asc">الحجم: الأصغر</string> + <string name="stores_sort_release_date">تاريخ الإصدار</string> + <string name="stores_view_list">عرض القائمة</string> + <string name="stores_view_cards">عرض البطاقات</string> + <string name="stores_show_mature">إظهار المحتوى للبالغين</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">غير متصل</string> + <string name="epic_card_none">غير مفعَّل</string> + <string name="epic_eos">تسجيل الدخول إلى Epic (EOS)</string> + <string name="epic_offline">التشغيل دون اتصال</string> + <string name="epic_resolve">إصلاح تسجيل الدخول إلى Epic</string> + <string name="epic_client_version">الإصدار %1$s</string> + <string name="epic_client_no_runtime">ثبّت بيئة تشغيل Linux أولًا</string> + <string name="epic_client_checking">جارٍ التحقق من آخر إصدار…</string> + <string name="epic_client_unpacking">جارٍ فك الضغط…</string> + <string name="epic_client_unreachable">لم يستجب خادم التنزيل</string> + <string name="epic_client_needs_fex">يحتاج مشغّل Epic Games إلى FEX الذي يقوم Steam بتنزيله. افتح المشغّل مرة أخرى بعد بدء Steam.</string> + <string name="epic_client_download_failed">فشل التنزيل: %1$s</string> + <string name="epic_client_unpack_failed">تعذّر فك ضغط المُشغِّل: %1$s</string> + <string name="epic_client_sign_in_failed">لم يقبل Epic Games Launcher تسجيل الدخول. شغّله مرة أخرى من المُشغِّل.</string> + <string name="epic_client_uninstall_body">يزيل المشغّل ويحرّر مساحته. تبقى ألعاب Epic مثبتة وتعمل، ويُحتفظ بتسجيل الدخول لحين تثبيته مرة أخرى.</string> + <string name="epic_client_uninstall_stops">ستُغلق الجلسة الجارية أولاً.</string> + <string name="epic_client_uninstalled">تمت إزالة Epic Games Launcher</string> + <string name="epic_client_uninstall_failed">تعذّرت إزالة بعض ملفات المشغّل. حاول مرة أخرى.</string> + <string name="epic_client_uninstalling">انتظر حتى ينتهي إلغاء تثبيت Epic Games Launcher</string> + <string name="store_cloud_saves">ملفات الحفظ السحابية</string> + <string name="cloud_upload">الرفع إلى السحابة</string> + <string name="cloud_download">التنزيل من السحابة</string> + <string name="cloud_none">لا توجد ملفات حفظ سحابية</string> + <string name="cloud_conflict">تعارض سحابي</string> + <string name="cloud_conflict_files">تعارض سحابي · %1$d ملفات</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">الاحتفاظ بالسحابة</string> + <string name="cloud_keep_local">الاحتفاظ بالمحلي</string> + <string name="cloud_checking">جارٍ التحقّق من السحابة…</string> + <string name="cloud_last_sync">آخر مزامنة %1$s</string> + <string name="cloud_never">لم تتم المزامنة بعد</string> + <string name="cloud_done">%1$d ملفات</string> + <string name="stores_eyebrow_installed">مثبَّتة</string> + <string name="stores_eyebrow_library">في مكتبتك</string> + <string name="stores_eyebrow_store">متجر</string> + <string name="achievements_title">الإنجازات</string> + <string name="achievements_count">%1$d من %2$d مفتوحة</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">مفتوحة · %1$d</string> + <string name="achievements_group_locked">مقفلة · %1$d</string> + <string name="achievements_group_hidden">مخفية · %1$d</string> + <string name="achievements_hidden">إنجاز مخفي</string> + <string name="achievements_hidden_detail">يتم عرض التفاصيل بعد فتحه.</string> + <string name="achievements_all">جميع الإنجازات مفتوحة</string> + <string name="achievements_reading">جارٍ التحميل…</string> + <string name="achievements_signed_out">سجّل الدخول إلى %1$s لرؤية إنجازاتك.</string> + <string name="achievements_unreachable">تعذّر الوصول إلى %1$s. تحقّق مرة أخرى عند الاتصال بالإنترنت.</string> + <string name="achievements_none">لا يسرد %1$s أي إنجازات لهذه اللعبة.</string> + <string name="achievements_show_all">إظهار الكل (%1$d)</string> + <string name="achievements_dialog_title">الإنجازات · %1$s</string> + <string name="stores_in_steam">✓ في Steam</string> + <string name="stores_uninstall">إلغاء التثبيت</string> + <string name="stores_uninstalling">جارٍ إلغاء التثبيت…</string> + <string name="stores_uninstall_title">إلغاء تثبيت %1$s؟</string> + <string name="stores_uninstall_body_size">يُفرِغ %1$s من المساحة ويزيل اللعبة من Steam.</string> + <string name="stores_uninstall_body">يزيل ملفاتها واختصارها في Steam.</string> + <string name="stores_launch_not_registered">يكتشف Steam اللعبة عند بدء تشغيله التالي؛ شغِّلها من هناك، أو شغِّل Steam الآن.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">اختيار Steam لكل لعبة</string> + <string name="stores_card_audio">الصوت</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">المكوّنات</string> + <string name="stores_card_components_value">FEX، DXVK، VKD3D</string> + <string name="stores_card_engine">المحرك</string> + <string name="stores_card_engine_value">%1$s · أصلي</string> + <string name="stores_card_engine_java">%1$s · مدمَج</string> + <string name="stores_how_it_runs">كيف تعمل</string> + <string name="stores_kv_fetched">تم الجلب من</string> + <string name="stores_kv_fetched_value">%1$s، بحسابك</string> + <string name="stores_kv_installed_to">مثبَّتة في</string> + <string name="stores_kv_installed_to_value">تخزين الألعاب (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">تُشغَّل باستخدام</string> + <string name="stores_kv_launched_by_value">Steam وProton، بنفس مسار ألعاب Steam</string> + <string name="stores_kv_launched_by_epic">Steam وProton · تسجيل الدخول إلى Epic عند كل تشغيل، وتراكب EOS معطَّل</string> + <string name="stores_kv_launched_by_amazon">Steam وProton · تم ضبط متغيّرات Amazon Games Services</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">تُضاف إلى Steam عند التثبيت (واجهة Deck + Steam Input)</string> + <string name="stores_downloads_empty">لا توجد تنزيلات</string> + <string name="stores_dl_paused">متوقِّف مؤقتًا</string> + <string name="stores_dl_queued">قيد الانتظار</string> + <string name="stores_dl_queued_at">قيد الانتظار · #%1$d</string> + <string name="stores_dl_cancelled">ملغى</string> + <string name="stores_dl_failed">فشل</string> + <string name="stores_dl_failed_reason">فشل · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">إيقاف مؤقت</string> + <string name="stores_dl_resume">استئناف</string> + <string name="stores_dl_cancel">إلغاء</string> + <string name="stores_dl_retry">إعادة المحاولة</string> + <string name="stores_dl_clear">إزالة</string> + <string name="stores_dl_clear_all">إزالة المنتهية</string> + <string name="stores_stage_manifest">الفهرس</string> + <string name="stores_stage_download">التنزيل</string> + <string name="stores_stage_verify">التحقّق</string> + <string name="stores_stage_install">التثبيت</string> + <string name="stores_stage_done">تم</string> + <string name="stores_stage_checking">جارٍ الفحص</string> + <string name="stores_stage_downloading">جارٍ التنزيل</string> + <string name="stores_dl_cancel_confirm">حذف التنزيل؟</string> + <string name="stores_dl_failed_kept">فشل · تم الاحتفاظ بـ %1$s</string> + <string name="stores_stage_verifying">جارٍ التحقّق</string> + <string name="stores_stage_installing">جارٍ التثبيت</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d ملفات</string> + <string name="stores_download_manager">مدير التنزيلات</string> + <string name="stores_parallel">عدد التنزيلات المتزامنة</string> + <string name="stores_install_where">التثبيت في</string> + <string name="stores_install_title">تثبيت %1$s:</string> + <string name="stores_target_internal">التخزين الداخلي</string> + <string name="stores_target_free">%1$s متاحة</string> + <string name="stores_target_free_unknown">المساحة الحرة غير معروفة</string> + <string name="stores_storage_insufficient">المساحة الحرة غير كافية: يلزم %1$s والمتوفر %2$s فقط</string> + <string name="stores_storage_low">المساحة غير كافية (%1$s متوفرة، ويلزم %2$s)</string> + <string name="stores_notification_channel">تنزيلات المتجر</string> + <string name="stores_notification_channel_hint">يعرض تقدّم تنزيل الألعاب ويحافظ على استمرار التنزيلات في الخلفية</string> + <string name="stores_notification_one">جارٍ التنزيل</string> + <string name="stores_notification_many">%1$d تنزيلات</string> + <string name="stores_notification_waiting">جارٍ التحضير…</string> + <string name="stores_notification_done_channel">تنزيلات المتجر المكتملة</string> + <string name="stores_notification_installed">تم تثبيت %1$s</string> + <string name="stores_notification_failed">فشل تنزيل %1$s</string> + <string name="stores_notification_delete">حذف</string> + <string name="stores_notification_keep">الاحتفاظ</string> + <string name="stores_login_title">تسجيل الدخول إلى %1$s</string> + <string name="stores_login_provider_title">تسجيل الدخول عبر مزوّدك</string> + <string name="stores_login_reload">إعادة التحميل</string> + <string name="stores_login_close">إغلاق</string> + <string name="stores_login_retry">حاوِل مرة أخرى</string> + <string name="stores_login_finishing">جارٍ إنهاء تسجيل الدخول…</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> + <string name="stores_login_error_ssl">الاتصال بصفحة تسجيل الدخول غير آمن.</string> + <string name="stores_login_error_verification">تعذّر التحقّق من تسجيل الدخول. حاوِل مرة أخرى.</string> + <string name="stores_login_error_generic">فشل تسجيل الدخول. حاوِل مرة أخرى.</string> + <string name="common_close">إغلاق</string> + <string name="common_back">رجوع</string> + <string name="common_edit">تعديل</string> + <string name="games_add_all">إضافة كل الألعاب في هذا المجلد</string> + <string name="games_added_none">لا شيء جديد في هذا المجلد</string> + <string name="edit_name">الاسم</string> + <string name="edit_target">الهدف</string> + <string name="edit_start_in">بدء التشغيل في</string> + <string name="edit_launch_options">خيارات التشغيل</string> + <string name="edit_artwork">الصور الفنية</string> + <string name="edit_other_exe">ملف exe آخر…</string> + <string name="edit_remove">إزالة</string> + <string name="art_cover">الغلاف</string> + <string name="art_wide_cover">غلاف عريض</string> + <string name="art_adjust_logo">ضبط الشعار</string> + <string name="logo_pos_default">افتراضي</string> + <string name="logo_pos_upper_left">أعلى اليسار</string> + <string name="logo_pos_upper_center">أعلى الوسط</string> + <string name="logo_pos_center">الوسط</string> + <string name="logo_pos_bottom_left">أسفل اليسار</string> + <string name="logo_pos_bottom_center">أسفل الوسط</string> + <string name="logo_pos_position">الموضع</string> + <string name="logo_pos_size">الحجم</string> + <string name="logo_pos_save">حفظ</string> + <string name="logo_pos_reset">العودة إلى الافتراضي</string> + <string name="logo_pos_hint">يُرسم فوق خلفية اللعبة كما يفعل Steam. قد يختلف الموضع الدقيق ببضع بكسلات.</string> + <string name="logo_pos_no_logo">لا توجد لهذه اللعبة شعار بعد. اختر واحدًا من الشعار لتراه هنا.</string> + <string name="logo_pos_failed">تعذّر حفظ موضع الشعار. حاول مرة أخرى.</string> + <string name="art_background">الخلفية</string> + <string name="art_logo">الشعار</string> + <string name="art_icon">الأيقونة</string> + <string name="art_src_folder">مجلد اللعبة</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">ملفك</string> + <string name="art_src_exe">من ملف exe</string> + <string name="art_src_auto">تلقائي</string> + <string name="art_pick_image">اختيار صورة…</string> + <string name="art_pick_title">اختيار صورة: %1$s</string> + <string name="art_reset">إعادة الضبط إلى تلقائي</string> + <string name="art_search_sgdb">البحث في SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">البحث عن لعبة</string> + <string name="art_sgdb_other_games">نتائج أخرى</string> + <string name="art_sgdb_none">لا نتائج.</string> + <string name="art_sgdb_no_key">يحتاج SteamGridDB إلى مفتاح API. أضف مفتاحك من الإعدادات › المشغّل.</string> + <string name="art_sgdb_bad_key">لم يقبل SteamGridDB مفتاح API. تحقق منه من الإعدادات › المشغّل.</string> + <string name="art_sgdb_limit">يحدّ SteamGridDB من عدد الطلبات الآن. حاول بعد دقيقة.</string> + <string name="art_sgdb_offline">تعذّر الوصول إلى SteamGridDB. تحقق من الاتصال.</string> + <string name="art_sgdb_server">حدث خطأ في SteamGridDB. حاول لاحقًا.</string> + <string name="art_sgdb_no_game">لا نتائج لهذه اللعبة في SteamGridDB. جرّب البحث عنها.</string> + <plurals name="games_added_n"> + <item quantity="zero">لم تتم إضافة أي لعبة</item> + <item quantity="one">تمت إضافة لعبة واحدة</item> + <item quantity="two">تمت إضافة لعبتين</item> + <item quantity="few">تمت إضافة %1$d ألعاب</item> + <item quantity="many">تمت إضافة %1$d لعبةً</item> + <item quantity="other">تمت إضافة %1$d لعبة</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="zero">لا توجد أي لعبة ضمن الألعاب بالفعل</item> + <item quantity="one">لعبة واحدة ضمن الألعاب بالفعل</item> + <item quantity="two">لعبتان ضمن الألعاب بالفعل</item> + <item quantity="few">%1$d ألعاب ضمن الألعاب بالفعل</item> + <item quantity="many">%1$d لعبةً ضمن الألعاب بالفعل</item> + <item quantity="other">%1$d لعبة ضمن الألعاب بالفعل</item> + </plurals> + <string name="hop_back">B · العودة إلى %1$s</string> + <string name="hop_from_games">اللعبة</string> + <string name="hop_from_play">إعدادات التشغيل</string> + <string name="sheet_graphics_drivers">برامج تشغيل الرسوميات</string> + <string name="comp_this_proton">هذا الإصدار من Proton</string> + <string name="comp_every_proton">كل إصدار من Proton</string> + <string name="comp_for_every_proton">لكل إصدار من Proton</string> + <string name="comp_available_count">متاح · %1$d</string> + <string name="comp_checked">آخر تحقّق %1$s</string> + <string name="comp_check_all">التحقّق من وجود مكوّنات وبرامج تشغيل جديدة</string> + <string name="comp_get">جلب</string> + <string name="comp_proton_bar">%1$s · DXVK وVKD3D-Proton وFEX أدناه خاصة بهذا الإصدار من Proton</string> + <string name="comp_device_tested">%1$s · تم اختباره</string> + <string name="comp_device_untested">%1$s · لم يتم اختباره</string> + <string name="comp_device_unsupported">%1$s · غير مدعوم</string> + <string name="gpu_auto_keeps">يحافظ على الزوج الموصى به محدَّثًا</string> + <string name="gpu_bar_auto">تلقائي · %1$s</string> + <string name="gpu_separately">برنامجا تشغيل بيئة التشغيل والعرض بشكل منفصل</string> + <string name="gpu_use_title">استخدام %1$s؟</string> + <string name="gpu_mode_title">كيف تُختار برامج التشغيل</string> + <string name="gpu_mode_auto_detail">أفضل زوج لهذا المعالج الرسومي، محدَّث دائمًا</string> + <string name="gpu_mode_pair">زوج متوافق</string> + <string name="gpu_mode_pair_detail">اختر زوجًا يضبط برنامجي التشغيل</string> + <string name="gpu_mode_mix">خلط حر</string> + <string name="gpu_mode_mix_detail">اختر الصورة وبيئة التشغيل بشكل منفصل</string> + <string name="gpu_mode_pair_short">زوج</string> + <string name="gpu_mode_mix_short">مختلط</string> + <string name="gpu_src_auto">تلقائي</string> + <string name="gpu_src_pair">زوج</string> + <string name="gpu_src_bundle">حزمة</string> + <string name="gpu_src_chosen">مختار</string> + <string name="gpu_src_by_gpu">حسب المعالج</string> + <string name="gpu_src_default">افتراضي</string> + <string name="gpu_display_live">يرسم الآن</string> + <string name="gpu_display_pending">يلزم إعادة تشغيل · يرسم %1$s حتى ذلك الحين</string> + <string name="gpu_runtime_live">نشط</string> + <string name="gpu_runtime_pending">الجلسة القادمة · هذه الجلسة تبقي %1$s</string> + <string name="gpu_display_next">يرسم الشاشة. يسري من الجلسة القادمة.</string> + <string name="gpu_previous_driver">برنامج التشغيل السابق</string> + <string name="gpu_restart_banner">أعد التشغيل لتغيير برنامج تشغيل الصورة.</string> + <string name="gpu_restart_blocked">أوقف الجلسة الحالية وأعد تشغيل DroidDeck لتغيير برنامج تشغيل الصورة.</string> + <string name="gpu_restart_now">إعادة التشغيل الآن</string> + <string name="gpu_restart_later">لاحقًا</string> + <string name="gpu_auto_title">اختار الوضع التلقائي هذا الزوج لـ %1$s</string> + <string name="gpu_auto_builtin_title">يستخدم الوضع التلقائي برامج التشغيل المدمجة لـ %1$s</string> + <string name="gpu_auto_reason">مختار لعائلة %1$s. تُثبَّت الإصدارات الجديدة في الخلفية.</string> + <string name="gpu_pair_title">اختر زوجًا</string> + <string name="gpu_pair_hint">الزوج يضبط برنامج تشغيل الصورة وبرنامج تشغيل بيئة التشغيل معًا.</string> + <string name="gpu_mix_title">اختر كل برنامج تشغيل</string> + <string name="gpu_mix_hint">الحزمة تملأ الموضعين. تسري تغييرات الصورة بعد إعادة التشغيل، وتغييرات بيئة التشغيل من الجلسة القادمة.</string> + <string name="gpu_change_display">تغيير برنامج تشغيل الصورة</string> + <string name="gpu_change_runtime">تغيير برنامج تشغيل بيئة التشغيل</string> + <string name="gpu_autos_pick">اختيار الوضع التلقائي</string> + <string name="gpu_installed">مثبَّت</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · أعد التشغيل للتطبيق</string> + <string name="gpu_chip_restart">%1$s · يلزم إعادة تشغيل</string> + <string name="comp_this_device">هذا الجهاز</string> + <string name="proton_remove_title">إزالة %1$s؟</string> + <string name="setup_tab_diagnostics">التشخيص</string> + <string name="setup_ready">جاهز للّعب</string> + <string name="setup_not_ready">غير جاهز للّعب بعد</string> + <string name="setup_ready_runtime">بيئة التشغيل %1$s</string> + <string name="setup_ready_limit_off">حدّ العمليات الفرعية غير مفعَّل</string> + <string name="setup_ready_signed_in">تم تسجيل الدخول باسم %1$s</string> + <string name="setup_needs_you">عندما يحتاج الأمر إلى تدخّلك</string> + <string name="setup_group_look">المظهر</string> + <string name="setup_group_device">هذا الجهاز</string> + <string name="setup_group_art">صور المكتبة الفنية</string> + <string name="setup_group_download">التنزيل</string> + <string name="setup_download_source">المصدر</string> + <string name="setup_download_source_auto">تلقائي</string> + <string name="setup_download_source_direct">مباشر</string> + <string name="setup_download_source_mirror">مرآة</string> + <string name="setup_download_source_custom">بادئة خاصة</string> + <string name="setup_download_mirror">الموقع</string> + <string name="setup_download_prefix">البادئة</string> + <string name="flathub_eyebrow">تطبيقات Linux</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">تطبيقات سطح المكتب لسطح مكتب Linux، تُفتح من سطح المكتب.</string> + <string name="flathub_setup">إعداد Flathub</string> + <string name="flathub_remove_title">إزالة %1$s؟</string> + <string name="flathub_remove_note">تُحفَظ إعداداته وملفاته.</string> + <string name="flathub_keep">الاحتفاظ</string> + <string name="desktop_size">الحجم على القرص</string> + <string name="desktop_uninstall_title">إلغاء تثبيت سطح المكتب؟</string> + <string name="desktop_all_systems">الكل</string> + <string name="gog_achievements">إنجازات GOG</string> + <string name="gog_achievements_hint">مزامنة الإنجازات للألعاب المتوافقة من GOG. يُطبَّق عند التشغيل التالي.</string> + <string name="gog_achievements_off">الإنجازات متوقفة</string> + <string name="gog_achievements_on">الإنجازات مفعّلة</string> + <string name="gog_achievements_signin">سجّل الدخول إلى GOG مرة أخرى</string> + <string name="gog_achievements_uploaded">تم رفع الإنجازات</string> + <string name="gog_achievements_pending">رفع الإنجاز معلّق</string> + <string name="gog_achievements_enable_store">فعّل إنجازات GOG في إعدادات المتاجر</string> + <string name="gog_achievements_unavailable">الإنجازات غير متوفرة؛ تحقّق من سجلات الجلسة</string> + <string name="achievement_unlocked">تم فتح الإنجاز</string> + <string name="touch_paste">لصق</string> + <string name="touch_dpad">لوحة الاتجاهات</string> + <string name="touch_left_stick">العصا اليسرى</string> + <string name="touch_right_stick">العصا اليمنى</string> + <string name="touch_menu">القائمة</string> + <string name="touch_keyboard">لوحة المفاتيح</string> + <string name="touch_dpad_up">لوحة الاتجاهات للأعلى</string> + <string name="touch_dpad_down">لوحة الاتجاهات للأسفل</string> + <string name="touch_dpad_left">لوحة الاتجاهات لليسار</string> + <string name="touch_dpad_right">لوحة الاتجاهات لليمين</string> + <string name="touch_title">أدوات التحكم باللمس</string> + <string name="touch_controller">وحدة تحكم باللمس</string> + <string name="touch_mouse">الفأرة</string> + <string name="touch_on">تشغيل</string> + <string name="touch_off">إيقاف</string> + <string name="touch_speed_slow">بطيئة</string> + <string name="touch_speed_normal">عادية</string> + <string name="touch_speed_fast">سريعة</string> + <string name="touch_edit_layout">تعديل التخطيط</string> + <string name="touch_droiddeck_menu">قائمة DroidDeck</string> + <string name="touch_drag_hint">اسحب أدوات التحكم إلى الشاشة</string> + <string name="touch_arrange">ترتيب</string> + <string name="touch_discard">تجاهل</string> + <string name="touch_saving">جارٍ الحفظ…</string> + <string name="touch_icon">الأيقونة</string> + <string name="touch_narrower">ع−</string> + <string name="touch_wider">ع+</string> + <string name="touch_shorter">ط−</string> + <string name="touch_taller">ط+</string> + <string name="touch_hide">إخفاء</string> + <string name="touch_color_opacity">اللون والعتامة…</string> + <string name="touch_copy_layout">نسخ هذا التخطيط</string> + <string name="touch_layout_copied">تم نسخ التخطيط؛ يمكنك لصقه في تخطيط اللمس لأي لعبة</string> + <string name="touch_paste_layout">لصق التخطيط المنسوخ</string> + <string name="touch_reset_layout">إعادة الضبط إلى تخطيط Steam الافتراضي</string> + <string name="touch_no_binding">لا يوجد ارتباط لهذا العنصر في Steam لإعطائه أيقونة</string> + <string name="touch_icon_for">أيقونة %1$s</string> + <string name="touch_layout_color">لون تخطيط اللمس</string> + <string name="touch_done">تم</string> + <string name="touch_save_failed">تعذّر حفظ تخطيط اللمس</string> + <string name="touch_saved">تم حفظ تخطيط اللمس في Steam</string> + <string name="touch_app_id">التطبيق %1$d</string> + <string name="touch_label_hint">التسمية (اختياري)</string> + <string name="touch_icons_missing">لم يتم العثور على أيقونات Steam</string> + <plurals name="touch_icons_found"> + <item quantity="zero">لا توجد أيقونات من Steam</item> + <item quantity="one">أيقونة واحدة من Steam</item> + <item quantity="two">أيقونتان من Steam</item> + <item quantity="few">%1$d أيقونات من Steam</item> + <item quantity="many">%1$d أيقونة من Steam</item> + <item quantity="other">%1$d أيقونة من Steam</item> + </plurals> + <string name="touch_icon_color">لون الأيقونة</string> + <string name="touch_button_color">لون الزر</string> + <string name="touch_no_icon">بلا أيقونة</string> + + <string name="stores_sync_sign_in">جارٍ التحقق من تسجيل الدخول…</string> + <string name="stores_sync_library">جارٍ جلب مكتبتك…</string> + <string name="stores_sync_game_list">جارٍ جلب قائمة الألعاب…</string> + <string name="stores_sync_details">جارٍ تحميل تفاصيل الألعاب… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="zero">لا مزامنة لألعاب</item> + <item quantity="one">جارٍ مزامنة لعبة واحدة…</item> + <item quantity="two">جارٍ مزامنة لعبتين…</item> + <item quantity="few">جارٍ مزامنة %1$d ألعاب…</item> + <item quantity="many">جارٍ مزامنة %1$d لعبة…</item> + <item quantity="other">جارٍ مزامنة %1$d لعبة…</item> + </plurals> + <string name="stores_sync_progress">جارٍ المزامنة… %1$d/%2$d</string> + <string name="stores_sync_cover_art">جارٍ جلب أغلفة الألعاب…</string> + <string name="stores_sync_failed">فشلت المزامنة</string> + <string name="stores_sync_no_games">لم يتم العثور على ألعاب في مكتبة %1$s الخاصة بك</string> + <string name="stores_sync_amazon_no_answer">لم يستجب Amazon Games بخصوص مكتبتك: حدّث الصفحة، أو سجّل الدخول من جديد</string> + <string name="stores_sync_gog_unreachable">تعذّر الاتصال بـ GOG</string> + <string name="stores_sync_gog_unreadable">تعذّر قراءة مكتبتك على GOG</string> + <string name="stores_registering">جارٍ التسجيل في Steam…</string> + <string name="mode_client_arch">عميل Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">تشخيص VAC</string> + <string name="setup_vac_diag_hint">تسجّل ألعاب Source وحدة التحكم الخاصة بها (-condebug)؛ ويذكر vac.txt في سجلات الجلسة إن كانت آمنة أو غير آمنة</string> + <string name="load_starting_steam_x64">جارٍ تشغيل Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">يستخدمه عميل Steam x86-64</string> + <string name="storage_uninstall_in_x64">هذه النسخة موجودة في عميل Steam x86-64. اختر x86-64 في عميل Steam، ثم ألغِ تثبيتها هنا.</string> + <string name="storage_uninstall_in_arm64">هذه النسخة موجودة في عميل Steam ARM64. اختر ARM64 في عميل Steam، ثم ألغِ تثبيتها هنا.</string> + <string name="drawer_page_glasses">النظارة</string> + <string name="glasses_open">نظارة VITURE</string> + <string name="glasses_control">التحكم في النظارة</string> + <string name="glasses_driver_missing">لا يتضمن هذا الإصدار برنامج التشغيل الخاص بهذه النظارة.</string> + <string name="glasses_connection_failed">تعذّر الاتصال بالنظارة. أعد توصيل الكابل أو اضغط على «السماح» لإعادة المحاولة.</string> + <string name="glasses_allow">السماح</string> + <string name="glasses_allow_hint">يسمح لتطبيق DroidDeck بضبط معدل تحديث النظارة ووضع 3D والسطوع ومستوى الصوت وحجب الشمس، وبقراءة تتبّع الرأس منها.</string> + <string name="glasses_asking">في انتظار سماحك بذلك في نافذة Android…</string> + <string name="glasses_denied">تم رفض التحكم. اسمح به لتغيير إعدادات النظارة.</string> + <string name="glasses_no_control">تعرض هذه النظارة اللعبة، لكن لا يمكن تغيير إعداداتها من هنا.</string> + <string name="glasses_output">الإخراج</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">اللعبة على النظارة</string> + <string name="glasses_game_on_hint">يعرض اللعبة على النظارة فقط. عند الإيقاف: يعرضها الهاتف ويعكس Android شاشة الهاتف.</string> + <string name="glasses_display">العرض</string> + <string name="glasses_refresh">معدل التحديث</string> + <string name="glasses_3d">3D (جنبًا إلى جنب)</string> + <string name="glasses_3d_hint">تحويل النظارات الذكية إلى وضع ثلاثي الأبعاد جنبًا إلى جنب. يتم التحكم في تتبع الرأس بشكل منفصل.</string> + <string name="glasses_3d_failed">لم يتم تأكيد إشارة 3D. حاول مجددًا بعد عودة صورة 2D.</string> + <string name="glasses_no_signal">لا توجد صورة: النظارة في وضع لا يستطيع هذا الهاتف إرساله. اضغط مطولًا على زر 2D/3D فيها، أو افصلها ثم أعد توصيلها.</string> + <string name="glasses_3d_refresh">معدل تحديث 3D</string> + <string name="glasses_auto3d">3D لألعاب الواقع الافتراضي</string> + <string name="glasses_auto3d_hint">يتحول إلى 3D أثناء تشغيل SteamVR، ثم يعود بعده.</string> + <string name="glasses_picture">الصورة</string> + <string name="glasses_picture_hint">يعرض الوضع التلقائي المحتوى المسطح في كلتا العينين ويكتشف SteamVR. اختر وضع اللعب جنبًا إلى جنب لعرض محتوى SBS.</string> + <string name="glasses_picture_auto">تلقائي</string> + <string name="glasses_picture_screen">شاشة افتراضية</string> + <string name="glasses_picture_sbs">لعبة جنبًا إلى جنب</string> + <string name="glasses_screen_size">عرض الشاشة</string> + <string name="glasses_screen_distance">بُعد الشاشة</string> + <string name="glasses_screen_next_session">يُطبَّق عرض الشاشة وبُعدها عندما تعمل لعبة على النظارة كشاشة افتراضية.</string> + <string name="glasses_screen_no_output">تُطبَّق هذه الإعدادات عند تفعيل «اللعبة على النظارة» وعرض اللعبة عليها.</string> + <string name="glasses_screen_flat_hint">يُبقي الوضع «تلقائي» لعبة 2D هذه بملء الشاشة. استخدم شاشة افتراضية لضبط عرضها وبُعدها وتتبّع الرأس.</string> + <string name="glasses_screen_use">استخدام شاشة افتراضية</string> + <string name="glasses_screen_direct_hint">يملأ SteamVR مجال الرؤية. اضبط مجال رؤيته في الواقع الافتراضي؛ ينطبق العرض والمسافة على الشاشة الافتراضية فقط.</string> + <string name="glasses_screen_sbs_hint">تملأ ألعاب جنبًا إلى جنب رؤية كل عين. ولا يُطبَّق عرض الشاشة وبُعدها إلا على الشاشة الافتراضية.</string> + <string name="glasses_tracking_flat_hint">يُبقي الوضع «تلقائي» لعبة 2D هذه ثابتة أمامك. اختر «شاشة افتراضية» في «العرض» لاستخدام تتبّع الرأس.</string> + <string name="glasses_tracking_sbs_hint">يُطبَّق تتبّع الرأس على الشاشة الافتراضية أو على لعبة SteamVR قيد التشغيل.</string> + <string name="glasses_hardware">الجهاز</string> + <string name="glasses_brightness">السطوع</string> + <string name="glasses_volume">مستوى الصوت</string> + <string name="glasses_sunblock">حجب الشمس</string> + <string name="glasses_sunblock_hint">يعتّم العدسات الأمامية.</string> + <string name="glasses_tracking">التتبع</string> + <string name="glasses_head_tracking">تتبّع الرأس</string> + <string name="glasses_head_tracking_hint">تُدير مستشعرات النظارة نفسها الشاشة الافتراضية وSteamVR مع حركة رأسك.</string> + <string name="glasses_recenter">إعادة توسيط العرض</string> + <string name="glasses_recenter_button">إعادة توسيط الشاشة</string> + <string name="glasses_vr_fov">مجال رؤية SteamVR</string> + <string name="glasses_vr_fov_hint">القيمة الأقل تقرّب SteamVR وتملأ النظارة؛ والأعلى تُظهر المزيد مما حولك.</string> + <string name="glasses_playing">جارٍ اللعب على %1$s</string> + <string name="glasses_calibration">معايرة التتبّع</string> + <string name="glasses_calibration_hint">يقلّل الانجراف ويضبط المرجع الأفقي.</string> + <string name="glasses_calibration_saved_hint">تُطبَّق المعايرة المحفوظة على هذه النظارة.</string> + <string name="glasses_calibration_open">معايرة</string> + <string name="glasses_calibration_instructions">ضع النظارة المتصلة مقلوبة على سطح مستوٍ، بحيث يستقر إطارها بالتساوي. اضغط على «بدء»، ثم اتركها دون لمس لمدة 8 ثوانٍ تقريبًا. أي حركة تعيد بدء القياس. يصحّح هذا الانجراف والميل، وليس الاتجاه الأفقي.</string> + <string name="glasses_calibration_settling">اترك النظارة مقلوبة ودون لمس. في انتظار استقرارها…</string> + <string name="glasses_calibration_collecting">جارٍ قياس المستشعرات. أبقِ النظارة ثابتة.</string> + <string name="glasses_calibration_moving">تم رصد حركة. اترك النظارة دون لمس؛ سيُعاد بدء القياس تلقائيًا.</string> + <string name="glasses_calibration_turn_over">ضع النظارة مقلوبة على سطح مستوٍ. سيبدأ القياس عندما تكون في الوضع الصحيح.</string> + <string name="glasses_calibration_complete">تم حفظ المعايرة. ارتدِ النظارة وانظر إلى الأمام مباشرة، ثم اضغط على «تم» لإعادة التوسيط.</string> + <string name="glasses_calibration_failed">تعذّر إكمال المعايرة. تحقّق من الاتصال وأبقِ النظارة ثابتة، ثم حاول مجددًا. لم تتغير معايرتك السابقة.</string> + <string name="glasses_calibration_start">بدء</string> + <string name="glasses_calibration_done">تم</string> + <string name="glasses_calibration_reset">إعادة ضبط معايرة التتبّع</string> + <string name="glasses_calibration_reset_hint">هل تريد إزالة المعايرة المحفوظة واستعادة الإعدادات الافتراضية للطراز؟ أعد توسيط العرض بعد ارتداء النظارة مجددًا.</string> + <string name="glasses_calibration_reset_button">إعادة ضبط</string> + <string name="hand_camera_group">تتبّع اليدين</string> + <string name="hand_camera_prompt_title">تتبع اليدين أو وحدات تحكم Joy-Con باستخدام كاميرا الهاتف؟</string> + <string name="hand_camera_prompt_body">عند عدم توصيل وحدة تحكم، تتتبع كاميرا الهاتف يديك في الواقع الافتراضي: اضغط بإبهامك وسبابتك للنقر، وأغلق يدك للإمساك، وأدر راحة يدك نحوك واضغط لفتح القائمة. عند توصيل وحدات تحكم Joy-Con، تتتبع الكاميرا موضعها بينما توفر وحدات التحكم إمكانية الدوران وإدخال الأزرار. تتم معالجة الصور على هذا الجهاز ولا يتم حفظها أو إرسالها.</string> + <string name="hand_camera_rear">الكاميرا الخلفية</string> + <string name="hand_camera_rear_hint">مُوصى بها. عادةً أوضح وأوسع.</string> + <string name="hand_camera_front">الكاميرا الأمامية</string> + <string name="hand_camera_front_hint">لاستخدامها عندما لا يمكن توجيه ظهر الجهاز نحوك.</string> + <string name="hand_camera_allow">استخدام الكاميرا</string> + <string name="hand_camera_not_now">ليس الآن</string> + <string name="hand_camera_setting">تتبّع اليدين بالكاميرا</string> + <string name="hand_camera_setting_hint">استخدم كاميرا الهاتف لإيماءات اليد المجردة أو لتحديد موضع وحدات تحكم Joy-Con المقترنة في الواقع الافتراضي. توفر وحدات تحكم Joy-Con التحكم في الدوران والأزرار. يتوقف التتبع مؤقتًا بينما تتعقب النظارات الذكية يديك أو وحدات تحكم Joy-Con. تتم معالجة الصور على هذا الجهاز فقط.</string> + <string name="hand_camera_choice">الكاميرا</string> + <string name="hand_camera_access">الوصول إلى الكاميرا</string> + <string name="hand_camera_access_hint">اسمح بالوصول إلى الكاميرا حتى يبدأ تتبّع اليدين.</string> + <string name="hand_camera_access_denied">الوصول إلى الكاميرا متوقف. فعّله من إعدادات Android.</string> + <string name="hand_camera_allow_button">سماح</string> + <string name="hand_camera_open_settings">فتح الإعدادات</string> + <string name="hand_camera_placement">وضع الكاميرا</string> + <string name="hand_camera_placement_hint">تحقّق من أن الكاميرا تراك قبل اللعب.</string> + <string name="hand_camera_check">تحقّق</string> + <string name="hand_camera_check_title">وضع الكاميرا</string> + <string name="hand_camera_how_rear">ضع الجهاز واقفًا على بُعد 1.5 إلى 2 متر تقريبًا بارتفاع الصدر، مع توجيه الكاميرا الخلفية نحوك. ثم ادخل إلى مجال الرؤية ويداك ممدودتان.</string> + <string name="hand_camera_how_front">ضع الجهاز واقفًا على بُعد 1.5 إلى 2 متر تقريبًا بارتفاع الصدر، مع توجيه الشاشة نحوك. ثم ادخل إلى مجال الرؤية ويداك ممدودتان.</string> + <string name="hand_camera_starting">جارٍ بدء تشغيل الكاميرا…</string> + <string name="hand_camera_stand_up">الجهاز مستلقٍ بشكل مسطّح. ضعه واقفًا لتتجه الكاميرا نحوك.</string> + <string name="hand_camera_upright">ضع الجهاز بوضعية أكثر استقامةً لتتجه الكاميرا نحوك.</string> + <string name="hand_camera_not_seen">لا يمكن رؤيتك بعد. ادخل إلى مجال الرؤية بحيث يظهر رأسك وكتفاك.</string> + <string name="hand_camera_move_back">تراجع قليلًا.</string> + <string name="hand_camera_move_closer">اقترب قليلًا.</string> + <string name="hand_camera_show_hands">ابسط يديك في مكان تراهما فيه الكاميرا.</string> + <string name="hand_camera_good">يبدو جيدًا.</string> + <string name="hand_camera_failed">تعذّر تشغيل الكاميرا. أغلق التطبيقات الأخرى التي تستخدمها وحاول مرة أخرى.</string> + <string name="hand_camera_switch">تبديل الكاميرا</string> + <string name="hand_camera_skip">تخطّي</string> + <string name="hand_camera_done">تم</string> + <string name="glasses_xreal_network_missing">في انتظار اتصال USB Ethernet الخاص بالنظارة. قد لا يتيحه هذا الهاتف للتطبيقات.</string> + <string name="glasses_xreal_connection_failed">انقطع اتصال XREAL أو أعاد استجابة غير مدعومة. جارٍ إعادة المحاولة…</string> + <string name="glasses_xreal_experimental">دعم تجريبي لـ 1S. استخدم وضع Follow وعطّل تثبيت الصورة من قائمة النظارة. لا تزال اتجاهات التتبّع وأوضاع العرض بحاجة إلى اختبار على الجهاز.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">وضع Cardboard</string> + <string name="cardboard_mode_hint">عرض للعين اليسرى وآخر لليمنى لنظارة واقع افتراضي للهاتف.</string> + <string name="cardboard_source">الصورة</string> + <string name="cardboard_source_screen">شاشة افتراضية</string> + <string name="cardboard_source_sbs">ثلاثي الأبعاد جنبًا إلى جنب</string> + <string name="cardboard_viewer">النظارة</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">بلا عدسة</string> + <string name="cardboard_ipd">المسافة بين العينين</string> + <string name="cardboard_screen_width">عرض الشاشة</string> + <string name="cardboard_screen_distance">بُعد الشاشة</string> + <string name="cardboard_head_tracking">تتبّع الرأس</string> + <string name="cardboard_no_sensor">لا يحتوي هذا الجهاز على مستشعر دوران.</string> + <string name="cardboard_recenter">إعادة توسيط العرض</string> + <string name="cardboard_recenter_button">إعادة التوسيط</string> + <string name="cardboard_steamvr">SteamVR (تجريبي)</string> + <string name="cardboard_steamvr_install">تثبيت</string> + <string name="cardboard_steamvr_installing">جارٍ تنزيل SteamVR وفك ضغطه…</string> + <string name="cardboard_steamvr_start">بدء</string> + <string name="cardboard_steamvr_stop">إيقاف</string> + <string name="cardboard_steamvr_unavailable">غير متوفر في هذه الجلسة.</string> + <string name="cardboard_steamvr_failed">لم يستجب SteamVR؛ تحقّق من سجل الجلسة.</string> + <string name="drawer_component_downloads">تنزيل المكوّنات</string> + <string name="drawer_component_downloads_hint">التنزيلات مشتركة مع صفحة «المكوّنات». اختر نسخة منزّلة أعلاه لاستخدامها عند التشغيل التالي للعبة.</string> + <string name="drawer_component_choose_download">اختر نسخة لتنزيلها</string> + <string name="stores_fact_developer">المطوّر</string> + <string name="stores_fact_publisher">الناشر</string> + <string name="stores_fact_released">الإصدار</string> + <string name="stores_hltb_main">القصة الرئيسية</string> + <string name="stores_hltb_extras">+ الإضافات</string> + <string name="stores_hltb_completionist">الإكمال التام</string> + <string name="stores_hltb_hours">%1$s س</string> + <string name="stores_hltb_minutes">%1$d د</string> + <string name="display_picture_position">موضع الصورة</string> + <string name="display_position_top">أعلى</string> + <string name="display_position_bottom">أسفل</string> + <string name="display_position_center">الوسط (افتراضي)</string> + <string name="setup_tab_storage">التخزين</string> + <string name="storage_measuring">جارٍ قياس التخزين…</string> + <string name="storage_measuring_hint">يستغرق القياس الأول بضع ثوانٍ.</string> + <string name="storage_internal">التخزين الداخلي</string> + <string name="storage_used_of">المستخدم %1$s من %2$s</string> + <string name="storage_free">%1$s متاحة</string> + <string name="storage_droiddeck_uses">يستخدم DroidDeck %1$s. قيس في %2$s.</string> + <string name="storage_rescanning">جارٍ القياس من جديد…</string> + <string name="storage_other_apps">تطبيقات Android الأخرى</string> + <string name="storage_safe_now">يمكن تحريره الآن</string> + <string name="storage_safe_hint">بيئات تشغيل غير مستخدمة وبقايا وسجلات قديمة</string> + <string name="storage_clean_up">جارٍ التنظيف…</string> + <string name="storage_session_running">أوقف الجلسة لتنظيف التخزين أو حذف شيء. تبقى الأحجام ظاهرة.</string> + <string name="storage_where">إلى أين يذهب</string> + <string name="storage_games">ألعاب Steam</string> + <string name="storage_game_data">بيانات الألعاب</string> + <string name="storage_game_data_hint">البادئات %1$s · الورشة %2$s · الشيدرات %3$s</string> + <string name="storage_tools">Proton وبيئات التشغيل</string> + <string name="storage_tools_unused">%1$s غير مستخدم</string> + <string name="storage_stores">GOG وEpic ومتاجر أخرى</string> + <string name="storage_stores_hint">احذفها من المتاجر</string> + <string name="storage_desktop">تطبيقات سطح المكتب</string> + <string name="storage_desktop_hint">تطبيقات Flatpak وبيئات التشغيل</string> + <string name="storage_system">نظام Linux وعميل Steam</string> + <string name="storage_system_hint">يلزم لتشغيل أي شيء</string> + <string name="storage_app_data">بيانات DroidDeck</string> + <string name="storage_app_data_hint">سجلات الجلسات القديمة %1$s · ذاكرة مؤقتة · برامج تشغيل</string> + <string name="storage_legend_games">الألعاب</string> + <string name="storage_legend_data">بيانات الألعاب</string> + <string name="storage_legend_tools">Proton وبيئات التشغيل</string> + <string name="storage_legend_stores">متاجر أخرى</string> + <string name="storage_legend_desktop">تطبيقات سطح المكتب</string> + <string name="storage_legend_system">نظام Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">التنظيف</string> + <string name="storage_clean_up_lede">لا يمس أي شيء هنا الألعاب المثبَّتة ولا التنزيلات الجارية.</string> + <string name="storage_nothing_to_clean">لا يوجد ما يُنظَّف الآن.</string> + <string name="storage_selected">المحدد: %1$s · %2$s ← %3$s ستُحرَّر</string> + <string name="storage_cleaning">جارٍ التنظيف…</string> + <string name="storage_free_button">تحرير %1$s</string> + <string name="storage_freed">حُرِّر %1$s.</string> + <string name="storage_item_runtimes">بيئات تشغيل Steam وProton غير المستخدمة</string> + <string name="storage_item_leftovers">بقايا ألعاب محذوفة</string> + <string name="storage_item_leftovers_unsure">بقايا قد تحتوي على حفظات</string> + <string name="storage_item_logs">سجلات جلسات قديمة</string> + <string name="storage_item_logs_detail">تبقى سجلات الجلسة الحالية</string> + <string name="storage_item_custom_detail">لا تستخدمه أي لعبة. أعد تثبيته من المكوّنات إذا احتجته.</string> + <string name="storage_item_shaders">ذاكرة الشيدرات المؤقتة للألعاب المثبَّتة</string> + <string name="storage_item_shaders_detail">تُبنى من جديد أثناء اللعب. ستعود التقطعات في أول دقائق من كل لعبة.</string> + <string name="storage_tag_safe">آمن</string> + <string name="storage_tag_unused">غير مستخدم</string> + <string name="storage_tag_stutter">تقطعات</string> + <string name="storage_tag_saves">تحقق من الحفظات</string> + <string name="storage_tag_default">افتراضي</string> + <string name="storage_tag_required">مطلوب</string> + <string name="storage_tag_not_used">غير مستخدم</string> + <string name="storage_back">التخزين</string> + <string name="storage_games_with_data">%1$s مع بياناتها</string> + <string name="storage_sort_largest">الأكبر</string> + <string name="storage_sort_least_played">الأقل لعبًا</string> + <string name="storage_sort_sd">على بطاقة SD</string> + <string name="storage_no_games">لا توجد ألعاب هنا.</string> + <string name="storage_played">لعبت %1$s</string> + <string name="storage_never_played">لم تُلعب قط</string> + <string name="storage_game_parts">اللعبة %1$s · البيانات %2$s</string> + <string name="storage_uninstall">إلغاء التثبيت</string> + <string name="storage_games_note">إلغاء التثبيت يفتح نافذة Steam ليُسجّل Steam العملية. لنقل لعبة إلى بطاقة SD استخدم Steam › الإعدادات › التخزين.</string> + <string name="storage_uninstall_title">إلغاء تثبيت %1$s؟</string> + <string name="storage_uninstall_body">يفتح Steam ويطلب التأكيد. هذا يحرر %1$s الخاصة باللعبة. تبقى البادئة حتى تنظّف البقايا، وتبقى حفظات Steam Cloud في حسابك.</string> + <string name="storage_open_steam">فتح Steam</string> + <string name="storage_tools_detail">%1$s · %2$s غير مستخدم</string> + <string name="storage_remove_unused">حذف غير المستخدم · %1$s</string> + <string name="storage_in_use">قيد الاستخدام</string> + <string name="storage_not_used">غير مستخدم</string> + <string name="storage_remove">حذف</string> + <string name="storage_remove_title">حذف %1$s؟</string> + <string name="storage_remove_body">يحرر %1$s. سينزّله Steam من جديد إذا احتاجته لعبة.</string> + <string name="storage_tool_fex_runtime">يلزم لألعاب Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">يلزم لإصدارات Proton لـ ARM64</string> + <string name="storage_tool_redist">تثبيتات VC++ وDirectX التي تحتاجها الألعاب</string> + <string name="storage_tool_fex">يشغّل ألعاب Linux x86</string> + <string name="storage_tool_steam">أداة Steam</string> + <string name="storage_tool_old_runtime">يشغّل DroidDeck الألعاب دون بيئة التشغيل هذه</string> + <string name="storage_tool_x86_proton">Proton x86، ولا يستطيع DroidDeck تشغيله</string> + <string name="storage_tool_custom_default">الافتراضي لكل الألعاب</string> + <string name="storage_tool_custom_unused">لا تستخدمه أي لعبة</string> + <string name="storage_tool_custom_unknown">لا يمكن قراءة إعدادات Steam، لذا يُحتفظ به</string> + <string name="storage_cleanup_busy">انتظر انتهاء تنظيف التخزين</string> + <string name="storage_low_title">المتاح %1$s فقط</string> + <string name="storage_low_body">يحتاج Steam مساحة للتحديثات وذاكرة الشيدرات. تحت 10 GB قد تفشل تحديثات الألعاب في المنتصف.</string> + <string name="storage_low_safe">يمكن تحرير %1$s بأمان.</string> + <string name="storage_free_up">تحرير مساحة</string> + <string name="storage_play_anyway">اللعب على أي حال</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d مثبَّتة</item> + <item quantity="other">%d مثبَّتة</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d على بطاقة SD</item> + <item quantity="other">%d على بطاقة SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d أداة</item> + <item quantity="other">%d أدوات</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">مجلدات بادئة فارغة وذاكرة شيدرات من %d لعبة</item> + <item quantity="other">مجلدات بادئة فارغة وذاكرة شيدرات من %d لعبة</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">بادئة %d لعبة تحتوي على ملفات، منها حفظات محلية. انسخها أولًا إن كنت تحتاجها.</item> + <item quantity="other">بادئات %d لعبة تحتوي على ملفات، منها حفظات محلية. انسخها أولًا إن كنت تحتاجها.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d لعبة</item> + <item quantity="other">%d لعبة</item> + </plurals> + <string name="storage_tool_default_proton">Proton الافتراضي في DroidDeck</string> + <string name="storage_tool_proton">خيار Proton 11 في DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">تستخدمه %d لعبة</item> + <item quantity="other">تستخدمه %d لعبة</item> + </plurals> + <string name="storage_legend_components">المكوّنات</string> + <string name="storage_components">المكوّنات</string> + <string name="storage_item_components">مكوّنات غير مستخدمة</string> + <string name="storage_component_original">الأصل %1$s · %2$s</string> + <string name="storage_original_confirm">يحرر %1$s. يعيد فقط إصدار Proton غير المثبَّت الآن.</string> + <string name="storage_leftovers_unchecked">لم يُتحقق: لا يمكن قراءة بيان تطبيق Steam، لذا تبقى بادئات الألعاب المحذوفة حتى يصبح ذلك ممكنًا.</string> + <string name="storage_failed">فشل: %1$s</string> + <string name="storage_desktop_shared">%1$s مشتركة</string> + <string name="storage_data_installed">الألعاب المثبَّتة</string> + <string name="storage_data_parts">البادئة %1$s · الشيدرات %2$s · الورشة %3$s</string> + <string name="storage_clear_shaders">مسح الشيدرات</string> + <string name="storage_data_leftovers">ألعاب محذوفة</string> + <string name="storage_steam_app">تطبيق Steam %1$d</string> + <string name="storage_leftover_unsure_detail">البادئة تحتوي على ملفات، ربما حفظات محلية</string> + <string name="storage_leftover_confirm">يمسح بادئة Wine وذاكرة الشيدرات (%1$s). انسخ الحفظات التي تحتاجها أولًا؛ تبقى حفظات Steam Cloud في حسابك.</string> + <string name="storage_data_other">محفوظة</string> + <string name="storage_data_other_title">ألعاب خارج Steam وبادئة Steam المشتركة</string> + <string name="storage_data_other_detail">بادئات ألعاب أُضيفت من المتاجر أو يدويًا</string> + <string name="storage_components_packages">حزم منزّلة</string> + <string name="storage_components_originals">أصول محفوظة</string> + <string name="storage_components_none">لا حزم مكوّنات منزّلة.</string> + <string name="storage_component_in_use">مختارة لـ Proton أو لعبة</string> + <string name="storage_component_unused">غير مختارة في أي مكان</string> + <string name="storage_original_kept">يعيد Proton المثبَّت</string> + <string name="storage_original_old">إصدار Proton غير مثبَّت الآن</string> + <string name="storage_tag_in_use">قيد الاستخدام</string> + <string name="storage_components_note">تبقى المكوّنات المستخدمة مقفلة. اخترها من المكوّنات؛ وما تحذفه هنا يمكن تنزيله هناك من جديد.</string> + <string name="storage_component_confirm">يحرر %1$s. الحزم التي استوردتها بنفسك لا يمكن تنزيلها من جديد.</string> + <string name="storage_desktop_detail">%1$s لتطبيقات Flatpak وما تشترك فيه</string> + <string name="storage_desktop_apps_title">التطبيقات</string> + <string name="storage_desktop_none">لا توجد تطبيقات Flatpak مثبَّتة.</string> + <string name="storage_desktop_shared_title">مشتركة بين التطبيقات</string> + <string name="storage_desktop_runtimes">بيئات التشغيل</string> + <string name="storage_desktop_runtimes_detail">المكتبات التي تعمل عليها التطبيقات؛ غير المستخدمة تزول مع حذف غير المستخدم</string> + <string name="storage_desktop_cache">تخزين التنزيل</string> + <string name="storage_desktop_cache_detail">مخزن الكائنات والذاكرة المؤقتة المنزّلة في Flatpak</string> + <string name="storage_desktop_prune">حذف غير المستخدم</string> + <string name="storage_desktop_prune_body">يحذف بيئات التشغيل التي لا يحتاجها أي تطبيق مثبَّت وينظّف مخزن كائنات Flatpak. تبقى التطبيقات المثبَّتة تعمل.</string> + <string name="storage_flatpak_uninstall_body">يحذف التطبيق (%1$s) وبيئات التشغيل التي لا يستخدمها غيره. تبقى بياناته في مجلدك الرئيسي.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d حزمة</item> + <item quantity="other">%d حزم</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d تطبيق</item> + <item quantity="other">%d تطبيقات</item> + </plurals> + <string name="boot_movie">فيديو الإقلاع</string> + <string name="boot_movie_video">الفيديو</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d إطار/ث</string> + <string name="boot_movie_note">معدل 60 إطارًا/ث أكثر سلاسة لكنه يستهلك المعالج أكثر أثناء بدء Steam. فيديو البدء المختار في إعدادات Steam نفسها له الأولوية.</string> + <string name="boot_movie_sound">الصوت</string> + <string name="boot_movie_custom">فيديو خاص بك</string> + <string name="boot_movie_custom_hint">MP4 أو MOV أو MKV أو WebM. تُحوَّل الصيغ الأخرى والملفات الأكبر من %1$d ميغابايت إلى WebM بدقة 720p على الجهاز، حتى %2$d ثانية.</string> + <string name="boot_movie_import">استيراد</string> + <string name="boot_movie_remove">إزالة</string> + <string name="boot_movie_pick">اختر فيديو الإقلاع</string> + <string name="boot_movie_imported">أصبح %1$s فيديو الإقلاع</string> + <string name="boot_movie_imported_silent">أصبح %1$s فيديو الإقلاع، بلا صوت</string> + <string name="boot_movie_too_long">يجب ألا تتجاوز مدة الفيديو المطلوب تحويله %1$d ثانية</string> + <string name="boot_movie_converting">جارٍ التحويل %1$d%%</string> + <string name="boot_movie_converting_started">جارٍ تحويل %1$s لـ Steam. أبقِ DroidDeck مفتوحًا.</string> + <string name="boot_movie_unsupported">لا يستطيع هذا الجهاز فك ترميز هذا الفيديو.</string> + <string name="boot_movie_import_failed">تعذّر استيراد الفيديو</string> + <string name="glasses_experimental">كاميرات Luma Ultra - تجريبية</string> + <string name="glasses_joycons">تتبع موضع Joy-Con</string> + <string name="glasses_joycons_hint">استخدم كاميرات النظارات الذكية لتحديد موضع وحدات تحكم Joy-Con المقترنة. يتم التحكم في الدوران والأزرار من خلال وحدات تحكم Joy-Con. يتم تقدير الموضع عندما تكون معصميك مخفية. يحل هذا محل وحدات التحكم التي يتم تشغيلها باليدين ويوقف تتبع كاميرا الهاتف مؤقتًا. وجّه وحدات تحكم Joy-Con للأمام عند توصيل مركز التتبع أو إعادة ضبطه.</string> + <string name="glasses_joycons_requires_position">فعّل تتبع الموضع أولًا. يتطلب ذلك وحدات تحكم Joy-Con تدعم الحركة على نظام Android 12 أو أحدث. مُعطّل افتراضيًا.</string> + <string name="setup_tab_glasses">النظارات الذكية</string> + <string name="setup_glasses_scope">تتم مشاركة إعدادات العرض وتتبع الرأس بين قوائم DroidDeck والألعاب وجلسات سطح المكتب.</string> + <string name="setup_glasses_connect">وصّل النظارات الذكية لتغيير إعدادات العرض والتتبع. يتم الاحتفاظ بإعداداتك المحفوظة عند فصلها.</string> + <string name="glasses_vr">الواقع الافتراضي</string> + <string name="glasses_display_mode">وضع العرض</string> + <string name="glasses_output_2d">إخراج ثنائي الأبعاد</string> + <string name="glasses_output_3d">إخراج ثلاثي الأبعاد</string> + <string name="glasses_picture_group">الصورة والشاشة الافتراضية</string> + <string name="glasses_position_group">الموضع ومستوى الأرضية</string> + <string name="glasses_hands_group">تتبع اليدين - تجريبي</string> + <string name="glasses_tracking_status">حالة التتبع</string> + <string name="glasses_resolution_2d">دقة ثنائية الأبعاد</string> + <string name="glasses_resolution_3d">دقة ثلاثية الأبعاد</string> + <string name="glasses_resolution_vr">دقة الواقع الافتراضي</string> + <string name="glasses_resolution_auto">تلقائي</string> + <string name="glasses_resolution_inherit">نفس دقة العرض ثنائي/ثلاثي الأبعاد</string> + <string name="glasses_resolution_hint">دقة الإخراج لكل عين.</string> + <string name="glasses_refresh_30_hint">تفعيل وضع الألعاب على النظارات الذكية لاختيار وضع 30 هرتز الأصلي للشاشة.</string> + <string name="glasses_3dof">شاشة افتراضية 3DoF</string> + <string name="glasses_3dof_hint">تثبيت الألعاب المسطحة أمامك لتتمكن من النظر حولك. يُمكّن هذا الخيار وضع الألعاب على النظارات الذكية دون الحاجة إلى التحويل إلى وضع ثلاثي الأبعاد.</string> + <string name="glasses_screen_app_wide">يتم تحديث العرض والمسافة للشاشة الافتراضية المُتتبعة لقوائم DroidDeck والألعاب وجلسات سطح المكتب فورًا.</string> + <string name="glasses_head_tracking_spatial_vr_hint">يشمل تتبع الحركة دوران الرأس في SteamVR. لتتبع الدوران فقط، أوقف تتبع الحركة.</string> + <string name="glasses_head_tracking_spatial_hint">يتحكم في حركة الرأس على الشاشة الافتراضية. يشمل تتبع الحركة دوران الرأس في SteamVR.</string> + <string name="glasses_quick_actions">إجراءات سريعة</string> + <string name="glasses_recenter_screen_hint">انظر إلى المكان الذي تريد وضع الشاشة فيه، ثم أعد ضبط مركز التتبع لتحديد ارتفاعه واتجاهه.</string> + <string name="glasses_recenter_joycons_button">إعادة توسيط Joy-Con</string> + <string name="phone_camera_tracking_group">كاميرا الهاتف - تجريبية</string> + <string name="phone_camera_tracking_setting">تتبع اليدين أو وحدات تحكم Joy-Con</string> + <string name="glasses_6dof">شاشة افتراضية 6DoF</string> + <string name="glasses_position">تتبع الموقع - تجريبي</string> + <string name="glasses_position_hint">الحركة الجسدية في الواقع الافتراضي وحول الشاشات الافتراضية. قد يستغرق إعادة تشغيل التتبع لحظة.</string> + <string name="glasses_eye_height">ارتفاع العين الحالي عن الأرض</string> + <string name="glasses_floor">ضبط مستوى الأرض من الارتفاع الحالي</string> + <string name="glasses_floor_set">ضبط مستوى الأرض</string> + <string name="glasses_spatial_setup">إعداد الكاميرا المجسمة وتشخيصها</string> + <string name="glasses_spatial_setup_hint">تحقق من معايرة الكاميرا وتتبع اليدين قبل اللعب.</string> + <string name="glasses_spatial_open">فتح الإعدادات</string> + <string name="glasses_hands">وحدات التحكم التي يتم تشغيلها باليدين</string> + <string name="glasses_hands_hint">استخدم كاميرات النظارات الذكية للتصويب بيديك، وقرّب للنقر، وأغلق يدك للإمساك في الواقع الافتراضي. تتحرك عصي التحكم وتدور. يحل هذا محل تتبع موقع Joy-Con. قد يحدث تأخير أو فقدان للتتبع أثناء اللعب.</string> + <string name="glasses_hands_ready_hint">فعّل وحدات التحكم التي يتم تشغيلها باليدين تحت كاميرات Luma Ultra في التتبع. اعرض اليدين المفتوحتين أولاً.</string> + <string name="glasses_hands_base">معايرة Luma Ultra المشتركة</string> + <string name="glasses_hands_base_hint">استخدام قاعدة Luma Ultra المشتركة. قم بمعايرة نظارتك الذكية للتحقق من دقتها.</string> + <string name="glasses_hands_calibration_verified">تم التحقق من صحة المعايرة المقاسة</string> + <string name="glasses_hands_calibration_required">يلزم التحقق</string> + <string name="glasses_hands_calibration_required_hint">تصبح وحدات التحكم التي يتم تشغيلها باليدين متاحة بعد اجتياز فحص المسافة المقاسة.</string> + <string name="tracking_recovery_lost">فقد التتبع</string> + <string name="tracking_recovery_look">انظر حولك ببطء في غرفة مضاءة جيدًا.\nحافظ على خلو مجال رؤية كاميرات التتبع، ووجه نظرك نحو الأثاث أو أي تفاصيل مرئية أخرى.</string> + <string name="tracking_recovery_restart_help">لا تزال عالقة؟ على هاتفك: النظارات الذكية → التتبع → فتح الإعداد → إظهار التشخيص → إعادة تشغيل التتبع.</string> + <string name="tracking_recovery_disconnected">تم فصل النظارات الذكية</string> + <string name="tracking_recovery_connect">تحقق من اتصال USB وأعد توصيل النظارات الذكية.\nاقبل مطالبة الوصول عبر USB على هاتفك إذا ظهرت.</string> + <string name="tracking_recovery_usb_help">بمجرد الاتصال، انظر حولك ببطء في غرفة مضاءة جيدًا لاستعادة التتبع.</string> + <string name="tracking_recovery_recenter">يلزم إعادة التوسيط</string> + <string name="tracking_recovery_recenter_steps">عاد التتبع إلى موقع جديد.\nانظر للأمام، ثم انقر على \"إعادة ضبط مركز التتبع\" على هاتفك.</string> + <string name="tracking_recovery_recenter_help">يمكنك أيضًا العثور على \"إعادة ضبط مركز التتبع\" في النظارات الذكية ← التتبع ← فتح الإعدادات. سيتم الاحتفاظ بمعايرة الكاميرا المحفوظة.</string> + <string name="tracking_recovery_stabilizing">ابقَ ثابتًا للحظة</string> + <string name="tracking_recovery_hold">جارٍ إعادة ضبط مركز التتبع.\nحافظ على ثبات النظارات الذكية أثناء استقرار التتبع.</string> + <string name="tracking_recovery_automatic">يتم إغلاق هذه الشاشة تلقائيًا عندما يكون تتبع الرأس جاهزًا.</string> + <string name="glasses_steady_hand_aim">التصويب المستقر بالأيدي</string> + <string name="glasses_steady_hand_aim_hint">صوب من كتفك إلى راحة يدك. قم بإيقاف التشغيل للدوران الذي يتم التحكم فيه بالمعصم.</string> + <string name="spatial_title">الإعداد المكاني</string> + <string name="spatial_wait_tracking">في انتظار التتبع...</string> + <string name="spatial_cameras_description">كاميرات التتبع اليسرى واليمنى</string> + <string name="spatial_camera_sync">مزامنة الكاميرا</string> + <string name="spatial_ready">جاهز</string> + <string name="spatial_sync_hint">في انتظار اصطفاف الكاميرا وتتبع الرأس. حافظ على النظارات الذكية متصلة.</string> + <string name="spatial_prepare">1. قم بإعداد هدف المعايرة</string> + <string name="spatial_print_actual">الطباعة بالحجم الفعلي</string> + <string name="spatial_print_hint">يجب أن يبلغ قياس كل مربع 30 مم (1.181 بوصة). قم بتركيب الورقة بشكل مسطح على سطح صلب في منطقة مضاءة جيدًا.</string> + <string name="spatial_print">طباعة لوحة المعايرة</string> + <string name="spatial_capture_group">2. التقط مناظر مختلفة</string> + <string name="spatial_board_stationary">حافظ على هدف المعايرة ثابتًا</string> + <string name="spatial_capture_hint">قم بتحريك النظارة الذكية بشكل أقرب وأبعد وعلى الجانب. اقلبهم إلى اليسار/اليمين، وزاويتهم لأعلى/لأسفل، وقم بإمالتهم جانبًا. احتفظ بهدف المعايرة في كلتا الكاميرتين وتوقف لفترة وجيزة قبل كل التقاط.</string> + <string name="spatial_start">ابدأ معايرة جديدة</string> + <string name="spatial_wait_sync">في انتظار مزامنة الكاميرا.</string> + <string name="spatial_start_hint">ابدأ معايرة جديدة لتجميع طرق العرض.</string> + <string name="spatial_views_hint">اجعل هدف المعايرة مرئيًا في كلا المعاينتين. التقط ما لا يقل عن 24 منظرًا حادًا من زوايا مختلفة.</string> + <string name="spatial_capturing">الالتقاط...</string> + <string name="spatial_capture">التقط عرض هدف المعايرة</string> + <string name="spatial_alignment">حساب محاذاة الكاميرا</string> + <string name="spatial_calculating">حساب…</string> + <string name="spatial_calculate">حساب المعايرة</string> + <string name="spatial_distance_group">3. التحقق من المسافة</string> + <string name="spatial_distance">المسافة المقاسة</string> + <string name="spatial_distance_hint">ابدأ بـ 12 بوصة أو 30 سم حتى يسهل اكتشاف العلامات المطبوعة. اختر القياس الدقيق الذي ستستخدمه.</string> + <string name="spatial_camera_board_distance">الكاميرا اليسرى لمركز هدف المعايرة</string> + <string name="spatial_checking_distance">فحص المسافة...</string> + <string name="spatial_validate">التحقق من المسافة</string> + <string name="spatial_diagnostics">التشخيص</string> + <string name="spatial_show_diagnostics">عرض التشخيص</string> + <string name="spatial_diagnostics_hint">توقيت الكاميرا وأدوات استرداد التتبع.</string> + <string name="spatial_camera_timing">توقيت الكاميرا</string> + <string name="spatial_hand_input">مدخلات من تتبع الأيدي</string> + <string name="spatial_wait_timing">انتظار توقيت الكاميرا.</string> + <string name="spatial_frames">صور الكاميرا</string> + <string name="spatial_gpu">كشف GPU للأيدي</string> + <string name="spatial_gpu_hint">المعالج CPU هو الخيار الافتراضي. استخدام GPU تجريبي وقد يؤدي إلى إعادة تشغيل SteamVR. يُعاد ضبط هذا الخيار عند إعادة تشغيل التتبع.</string> + <string name="spatial_lite">الكشف البسيط عن نماذج الأيدي</string> + <string name="spatial_lite_hint">استخدم كاشف راحة اليد Lite ونقاط مفتاح Lite الموجودة على اليدين. تحقق من دقة التصويب والقرص والاستيلاء. إعادة التعيين عند إعادة تشغيل التتبع.</string> + <string name="spatial_adaptive">تردد الإدخال التلقائي لتتبع العقارب</string> + <string name="spatial_adaptive_hint">اضبط الإدخال حسب سرعة المعالجة. إعادة التعيين عند إعادة تشغيل التتبع.</string> + <string name="spatial_half_rate">الحد من تردد الإدخال لتتبع العقارب</string> + <string name="spatial_half_rate_hint">استخدم نصف صور الكاميرا. قم بإيقاف التشغيل لمقارنة الحد الأقصى للتردد. إعادة التعيين عند إعادة تشغيل التتبع.</string> + <string name="spatial_diagnostic_capture">التقاط التشخيص</string> + <string name="spatial_diagnostic_capture_hint">احفظ زوجًا واحدًا من صور الاستريو محليًا. يتم حفظ الصور فقط عند الطلب.</string> + <string name="spatial_save_frame">حفظ صورة الكاميرا</string> + <string name="spatial_restart_tracking">إعادة تشغيل التتبع</string> + <string name="spatial_restart_hint">يُستخدم في حالة عدم استعادة التتبع في منطقة جيدة الإضاءة. تتطلب إعادة التشغيل أصل تتبع جديد.</string> + <string name="spatial_restart">إعادة التشغيل</string> + <string name="spatial_restart_title">إعادة تشغيل التتبع؟</string> + <string name="spatial_restart_confirm">ستُفقد مشاهد المعايرة غير المحفوظة. حافظ على ثبات النظارات الذكية بعد ذلك، وأعد ضبط مركز التتبع عند استعادة التتبع.</string> + <string name="spatial_views_count">%1$d / تم التقاط 24 مشاهدة</string> + <string name="spatial_capture_paused">تم إيقاف الالتقاط مؤقتًا: %1$s</string> + <string name="spatial_measure_hint">قِس %1$s. أظهر لوحة المعايرة كاملة في معاينتي الكاميرا، ثم ابقَ ثابتًا.</string> + <string name="spatial_timing_values">%1$.1f هرتز • عمر الصورة %2$.1f مللي ثانية • المعالجة %3$.1f مللي ثانية</string> + <string name="spatial_input_values">حد الإدخال %1$.1f هرتز • %2$.0f%% لصور الكاميرا. يستمر تتبع الرأس بأقصى تردد.</string> + <string name="spatial_frame_counts">تمت معالجة %1$d • تم إسقاط %2$d • تم تخطي %3$d بواسطة حد الإدخال</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - معايرة Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">الطباعة بحجم 100% / الحجم الفعلي. كل مربع: 30 ملم (1.181 بوصة).</string> + <string name="spatial_print_stationary">حافظ على هدف المعايرة مسطحًا وثابتًا؛ حرك النظارات الذكية بين اللقطات.</string> + <string name="spatial_print_check">فحص المقياس: 100 ملم (3.937 بوصة) بين علامات التجزئة</string> + <string name="spatial_distance_12in">12 بوصة (30.48 سم)</string> + <string name="spatial_distance_30cm">30 سم (11.81 بوصة)</string> + <string name="spatial_distance_20in">20 بوصة (50.8 سم)</string> + <string name="spatial_distance_50cm">50 سم (19.69 بوصة)</string> + <string name="spatial_disabled">معطل</string> + <string name="spatial_wait_stable">في انتظار التتبع المستقر</string> + <string name="spatial_disconnected">منقطع</string> + <string name="spatial_hands_off">تم إيقاف تشغيل وحدات التحكم التي يتم تشغيلها بالأيدي العارية</string> + <string name="spatial_tracking_off">تم إيقاف التتبع الموضعي أو تم فصل النظارات الذكية</string> + <string name="spatial_recenter_pending">تم طلب إعادة ضبط مركز التتبع - حافظ على ثباتك أثناء استقرار التتبع.</string> + <string name="spatial_tracking_lost">تم فقدان التتبع - واجه منطقة مضاءة جيدًا بتفاصيل مرئية</string> + <string name="spatial_origin_changed">تم تغيير نقطة الأصل للتتبع - انقر على \"إعادة ضبط مركز التتبع\"، ثم حافظ على ثباتك.</string> + <string name="spatial_active">6DoF نشط</string> + <string name="spatial_connect_hint">قم بتوصيل Luma Ultra وتمكين التتبع الموضعي.</string> + <string name="spatial_validation_session">تم التحقق من المعايرة لهذا الاتصال.</string> + <string name="spatial_validation_saved">تم التحقق من المعايرة وحفظها.</string> + <string name="spatial_wait_cameras">في انتظار كاميرات الاستريو</string> + <string name="spatial_wait_hands">انتظار تتبع الأيدي</string> + <string name="spatial_collect_instructions">أبقِ هدف المعايرة 5 × 7 ثابتًا. التقط أكثر من 24 مشاهدة أثناء تحريك النظارات الذكية وتدويرها.</string> + <string name="spatial_capture_pending">بانتظار صورة الكاميرا التالية. أبقِ النظارات ثابتة.</string> + <string name="spatial_validation_pending">جارٍ فحص صورة الكاميرا التالية. أبقِ لوحة المعايرة كاملة في مجال الرؤية ولا تتحرك.</string> + <string name="spatial_start_first">ابدأ المعايرة أولاً</string> + <string name="spatial_no_camera_frame">لم تصل أي صورة جديدة للكاميرا. تحقق من اتصال النظارات الذكية ومعاينات الكاميرا، ثم أعد المحاولة.</string> + <string name="spatial_clock_reset">إعادة ضبط ساعة الكاميرا</string> + <string name="spatial_frame_changed">تم تغيير نظام إحداثيات التتبع. تم حفظ مشاهدك لإعادة الحساب. أعد ضبط مركز التتبع، ثم ابدأ مجموعة جديدة لالتقاط المزيد من المشاهد.</string> + <string name="spatial_device_loaded">تم تحميل معايرة الجهاز</string> + <string name="spatial_base_loaded">تم تحميل معايرة قاعدة Luma Ultra</string> + <string name="spatial_calibration_needed">المعايرة مطلوبة</string> + <string name="spatial_tap_start">اضغط على بدء المعايرة الجديدة أولاً.</string> + <string name="spatial_capture_recenter_pending">مركز إعادة ضبط التتبع ينتظر استقرار التتبع. حافظ على ثباتك للحظة.</string> + <string name="spatial_capture_recenter">تم تغيير التتبع. انقر على \"إعادة ضبط مركز التتبع\" مرة واحدة، ثم ثبّت الكاميرا قبل التقاط الصورة.</string> + <string name="spatial_capture_unsynchronized">رُفض الالتقاط: لم يكن تتبع الرأس متزامنًا أو تغيّر أثناء الالتقاط. ابقَ ثابتًا وحاول مرة أخرى.</string> + <string name="spatial_align_first">احسب محاذاة الكاميرا قبل التحقق من المسافة.</string> + <string name="spatial_processing_failed">فشلت معالجة الكاميرا</string> + <string name="spatial_hand_head_changed">تم تغيير تتبع الرأس أثناء اكتشاف الأيدي</string> + <string name="spatial_hand_wait_sync">في انتظار تزامن الكاميرا والرأس</string> + <string name="spatial_no_wrists">لم يتم اكتشاف معصمين. احتفظ بمقابض وحدة التحكم Joy-Con أمام النظارات الذكية</string> + <string name="spatial_no_hands">لم يتم اكتشاف أي يد. أظهر راحتي يديك مفتوحتين أمام النظارات.</string> + <string name="spatial_one_camera_wrists">يمكن رؤية المعصمين في كاميرا واحدة فقط؛ احتفظ بمقابض وحدة التحكم الخاصة بك في العرض المشترك</string> + <string name="spatial_one_camera_hands">تظهر اليدان في كاميرا واحدة فقط؛ أبقِ راحتي يديك في مجال الرؤية المشترك.</string> + <string name="spatial_ambiguous_hands">كلتا الكاميرتين ترى الأيدي، لكن مطابقة اليسار/اليمين غامضة</string> + <string name="spatial_inconsistent_depth">تم اكتشاف اليدين، لكن قياس العمق بالكاميرتين غير متسق.</string> + <string name="spatial_rejected_wrist">تم رفض وضع المعصم عن طريق فحص الاستريو أو الحركة</string> + <string name="spatial_inconsistent_palm">تم اكتشاف نقاط بالكاميرتين، لكن شكل راحة اليد غير متسق.</string> + <string name="spatial_hands_need_calibration">المعايرة الكاملة وفحص المسافة لتمكين اليدين</string> + <string name="spatial_hands_wait_stable">جارٍ انتظار استقرار تتبع الرأس؛ أعد ضبط مركز التتبع إذا طُلب منك ذلك.</string> + <string name="spatial_old_frame">المراقبة بالكاميرات قديمة جدًا؛ في انتظار زوج جديد</string> + <string name="spatial_fit_ready">تناسب %1$.2f بكسل. قم بقياس المسافة التي حددتها من الكاميرا اليسرى إلى مركز هدف المعايرة، ثم قم بالتحقق من صحتها.</string> + <string name="spatial_opencv_error">OpenCV غير متاح: %1$s</string> + <string name="spatial_restored">تمت استعادة %1$d من المشاهدات المحفوظة. قم بحساب المعايرة لإعادة المحاولة، أو ابدأ مجموعة جديدة لالتقاط المزيد.</string> + <string name="spatial_captured">ملتقطة %1$d / 24 مشاهدة. حافظ على هدف المعايرة ثابتًا؛ حرك النظارات الذكية للعرض التالي.</string> + <string name="spatial_capture_corners">رُفض الالتقاط: تظهر %1$d / 12 زاوية مطلوبة في كلتا الكاميرتين. أظهر جزءًا أكبر من لوحة المعايرة، وابقَ ثابتًا ثم حاول مرة أخرى.</string> + <string name="spatial_validation_error">تعذر إنهاء فحص المسافة: %1$s. حاول ثانية.</string> + <string name="spatial_inference_error">تعذر اكتشاف اليدين: %1$s. غيّر خيار CPU/GPU أو أوقف التحكم باليدين ثم أعد تشغيله للمحاولة مجددًا.</string> + <string name="spatial_hand_timeout">تجاوز كشف الأيدي %1$d مللي ثانية؛ تم تجاهل الملاحظة</string> + <string name="spatial_wrists_tracked">%1$d / 2 وضعية معصم Joy-Con يتم قياسها بواسطة الاستريو</string> + <string name="spatial_palms_tracked">تتبع راحتي اليد: %1$d / 2؛ جاهزية ضم الأصابع: %2$d؛ جاهزية القبض: %3$d</string> + <string name="spatial_capture_saved">تم حفظ الالتقاط التشخيصي في %1$s</string> + <string name="spatial_hand_error">توقف تتبع الأيدي: %1$s</string> + <string name="spatial_stereo_loaded">استريو %1$d×%2$d؛ %3$s</string> + <string name="spatial_alignment_error">يختلف تتبع الرأس ولوحة المعايرة بمقدار %1$s (الحد الأقصى 5 سم / 2 بوصة). أبقِ اللوحة ثابتة وانتظر استقرار التتبع قبل بدء مجموعة جديدة. أدِر النظارات وأمِلها برفق، وتوقف قبل كل التقاط.</string> + <string name="spatial_need_views">التقط ما لا يقل عن 24 منظرًا متنوعًا لهدف المعايرة الثابت.</string> + <string name="spatial_need_rotation">قم بتدوير النظارات الذكية يمينًا ويسارًا، وإمالتها لأعلى ولأسفل؛ لا يمكن للحركة بدون دوران معايرة محاذاة الكاميرا.</string> + <string name="spatial_bad_baseline">خط الأساس غير المعقول للكاميرا</string> + <string name="spatial_need_orientations">حرك رأسك في اتجاهات أكثر تنوعًا.</string> + <string name="spatial_bad_rotation">تدوير الكاميرا للرأس غير صالح</string> + <string name="spatial_bad_alignment">محاذاة الكاميرا مع الرأس غير متناسقة.</string> + <string name="spatial_calibration_error">تعذر إنهاء المعايرة. %1$s تم حفظ مشاهداتك الملتقطة.</string> + <string name="spatial_reprojection_error">خطأ إعادة الإسقاط المعلق %1$.2f بكسل يتجاوز 2 بكسل. إعادة المعايرة.</string> + <string name="spatial_distance_corners">تم اكتشاف %1$d / 24 زاوية من نمط المعايرة في كلتا الكاميرتين. أبقِ اللوحة كاملة في مجال الرؤية ولا تتحرك. إذا كانت ظاهرة بالفعل، اختر 12 بوصة أو 30 سم وقِس هذه المسافة الأقرب قبل إعادة المحاولة.</string> + <string name="spatial_distance_depth">هدف المعايرة مرئي، ولكن لا يمكن قياس عمقه بشكل موثوق. أمسك النظارات الذكية بثبات وحافظ على هدف المعايرة مسطحًا ومضاء جيدًا، ثم أعد المحاولة.</string> + <string name="spatial_distance_invalid">قياس الكاميرا غير صالح. ابقَ ثابتًا وحاول مرة أخرى.</string> + <string name="spatial_distance_passed">تم اجتياز فحص المسافة.</string> + <string name="spatial_distance_retry">أعد فحص المسافة من الكاميرا اليسرى إلى مركز هدف المعايرة، ثم أعد المحاولة.</string> + <string name="spatial_distance_result">قياس الكاميرات %1$s؛ المسافة المختارة %2$s. %3$s</string> + <string name="spatial_wait_previews">انتظر معاينات الكاميرا قبل بدء المعايرة.</string> + <string name="spatial_saved_views_hint">يمكن إعادة حساب المشاهدات المحفوظة. ابدأ معايرة جديدة لالتقاطها في نظام إحداثيات التتبع الحالي.</string> + <string name="spatial_model_checksum_error">المجموع الاختباري لنموذج تتبع اليدين غير مطابق</string> + <string name="spatial_opencv_load_error">تعذر تحميل OpenCV</string> +</resources> diff --git a/app/src/main/res/values-b+es+419/strings.xml b/app/src/main/res/values-b+es+419/strings.xml new file mode 100644 index 0000000000..729f2aa74e --- /dev/null +++ b/app/src/main/res/values-b+es+419/strings.xml @@ -0,0 +1,2864 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Los gráficos de SteamVR se detuvieron</string> + <string name="steamvr_recovery_countdown">DroidDeck se reiniciará en %1$d segundos para restablecer los gráficos y volver a abrir SteamVR. Tu juego en curso se cerrará; el progreso no guardado no se podrá recuperar.</string> + <string name="steamvr_recovery_repeated">El fallo gráfico volvió tras un reinicio reciente. La recuperación automática está en pausa para evitar un bucle. Reiniciar cerrará tu juego; el progreso no guardado no se podrá recuperar.</string> + <string name="steamvr_recovery_restart">Reiniciar ahora</string> + <string name="steamvr_recovery_cancel">Mantener abierto</string> + <string name="steamvr_recovery_restarting">Restableciendo los gráficos y volviendo a abrir SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck no pudo reiniciarse automáticamente. Cierra la app por completo y vuelve a abrirla.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>La primera vez se descarga Steam. Puede tardar unos minutos.</item> + <item>De forma predeterminada, al salir de la app Steam se pausa y continúa donde lo dejaste cuando vuelves.</item> + <item>Tu control aparece como un control de Xbox 360. Si no, usa los controles en pantalla.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>La primera vez se prepara el escritorio. Puede tardar unos minutos.</item> + <item>De forma predeterminada, al salir de la app la sesión se pausa y continúa donde la dejaste cuando vuelves.</item> + <item>El tacto funciona como un touchpad: arrastra para mover el puntero y toca para hacer clic.</item> + <item>Tu control aparece como un control de Xbox 360. Si no, usa los controles en pantalla.</item> + </string-array> + <string name="session_channel">Sesión</string> + <string name="session_channel_description">Se muestra mientras hay una sesión de Steam o de escritorio abierta</string> + <string name="session_notification">Steam se está ejecutando</string> + <string name="session_notification_downloads">Descarga de Steam en curso</string> + <string name="session_notification_paused">Sesión en pausa - toca Reanudar cuando quieras</string> + <string name="resume_session">Reanudar</string> + <string name="suspend_now">Suspender ahora</string> + <string name="stop_session">Detener sesión</string> + <string name="frame_gen_title">Generación de fotogramas</string> + <string name="frame_gen_hint">Elige el modo de generación de fotogramas</string> + <string name="frame_gen_off">Desactivada</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG adaptativo %1$d</string> + <string name="lsfg_needs_steam">Requiere Lossless Scaling en Steam</string> + <string name="lsfg_needs_install">Instala Lossless Scaling en Steam o importa Lossless.dll</string> + <string name="lsfg_import">Importar Lossless.dll…</string> + <string name="lsfg_using_steam">Usando la copia de Steam</string> + <string name="lsfg_using_import">Usando una copia importada</string> + <string name="lsfg_pick_title">Elegir Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll importado</string> + <string name="lsfg_import_unchanged">Este Lossless.dll ya está en uso</string> + <string name="lsfg_import_not_owned">Lossless Scaling no está en esta cuenta de Steam</string> + <string name="lsfg_import_invalid">Este archivo no es el Lossless.dll de Lossless Scaling</string> + <string name="lsfg_import_failed">No se pudo preparar LSFG con este Lossless.dll</string> + <string name="lsfg_problem_missing">LSFG necesita Lossless Scaling de Steam o un Lossless.dll importado</string> + <string name="lsfg_problem_failed">LSFG no pudo preparar sus shaders desde Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: no compatible</string> + <string name="hud_fg_failed">%1$s: falló el motor</string> + <string name="hud_fg_needs_lossless">%1$s: requiere Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · iniciando</string> + <string name="second_library_import_hint">Agrega una biblioteca de Steam y busca juegos de Windows en ella. Los juegos que tienes usan sus entradas de Steam; el resto se convierten en accesos directos ajenos a Steam.</string> + <string name="game_env_title">Entorno del juego</string> + <string name="game_env_hint">Variables de entorno para juegos de Proton.</string> + <string name="game_env_edit">Editar</string> + <string name="game_env_shared">Todos los juegos de Proton</string> + <string name="game_env_scope">Perfil</string> + <string name="game_env_app_id">ID de app de Steam</string> + <string name="game_env_open">Abrir</string> + <string name="game_env_profile">Juego %1$s</string> + <string name="game_env_add">Agregar variable</string> + <string name="game_env_name">Nombre de la variable</string> + <string name="game_env_value">Valor</string> + <string name="game_env_save">Guardar</string> + <string name="game_env_remove">Quitar</string> + <string name="game_env_restore">Heredar de nuevo</string> + <string name="game_env_reset">Borrar los ajustes propios del entorno</string> + <string name="game_env_unset">Quitar valor en este perfil</string> + <string name="game_env_empty">Sin variables definidas.</string> + <string name="game_env_inherited">Heredada</string> + <string name="game_env_custom">Variable personalizada</string> + <string name="game_env_error">No se pudo cargar o guardar. Revisa el espacio libre e inténtalo de nuevo.</string> + <string name="game_env_invalid">Usa un nombre válido y un valor de hasta 8192 caracteres.</string> + <string name="game_env_unused">El runtime estándar de Proton no lee esta variable.</string> + <string name="game_env_loading">Cargando…</string> + <string name="game_env_feature">Forzar el nivel de funciones de D3D12. 12_2 informa de las capacidades de DirectX 12 Ultimate; las funciones no compatibles pueden fallar. Déjalo sin definir para detección automática.</string> + <string name="game_env_shader">Forzar el modelo de shaders de D3D12. 6_9 requiere un VKD3D suficientemente reciente y funciones de GPU compatibles. Déjalo sin definir para detección automática.</string> + <string name="game_env_cache">Mantén activada la caché de shaders de Mesa para reducir compilaciones repetidas. false activa la caché.</string> + <string name="game_env_cache_size">Tamaño máximo de la caché de shaders de Mesa, como 1G. Las cachés grandes usan más almacenamiento.</string> + <string name="game_env_vkd3d_config">Opciones de VKD3D para D3D12. nodxr desactiva el trazado de rayos; úsalo solo en un juego que lo necesite.</string> + <string name="game_env_proton_log">Pon 1 para obtener un registro de diagnóstico de Proton. El registro puede reducir el rendimiento y usar almacenamiento.</string> + <string name="game_env_wined3d">Pon 1 para usar WineD3D basado en OpenGL en lugar de DXVK, para pruebas de compatibilidad con D3D9–11.</string> + <string name="game_env_no_ntsync">Pon 1 para que este juego no use ntsync (droiddeck-ntsync o un controlador del kernel); usa droiddeck-esync si hay un paquete y, si no, droiddeck-fsync.</string> + <string name="game_env_no_esync">Pon 1 para desactivar droiddeck-esync en este juego; usa droiddeck-fsync en su lugar, o droiddeck-ntsync si fsync también está desactivado.</string> + <string name="game_env_no_fsync">Pon 1 para que este juego no use droiddeck-fsync; usa droiddeck-esync si hay un paquete y, si no, droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Pon 1 para que este juego use droiddeck-fsync, o 0 para dar prioridad a droiddeck-esync cuando haya un paquete para su Proton.</string> + <string name="game_env_xalia">Pon 0 para desactivar el asistente de navegación con control de Proton en este juego.</string> + <string name="game_env_hud">Superposición de DXVK para D3D9–11. fps muestra la tasa de fotogramas; sin definir la oculta.</string> + <string name="game_env_dxvk_config">Ajustes de DXVK separados por punto y coma. Las versiones recientes usan dxvk.maxFrameRate para limitar fotogramas; para el uso normal prefiere el límite de fotogramas de la sesión.</string> + <string name="game_env_vkd3d_limit">Límite de fotogramas de D3D12. 0 desactiva el límite.</string> + <string name="game_env_glthread">Subprocesos de OpenGL de Mesa. true puede ayudar a juegos OpenGL limitados por la CPU; pruébalo en cada juego.</string> + <string name="sync_backend_title">Sincronización de Wine</string> + <string name="sync_backend_hint">Cómo los juegos coordinan sus hilos. Se aplica en la próxima sesión.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Preajuste de FEX</string> + <string name="fex_next_launch">Se aplica al iniciar el próximo juego.</string> + <string name="game_settings_title">Juegos</string> + <string name="fex_default_label">Predeterminados de FEX</string> + <string name="fex_default_detail">Usa los valores predeterminados de FEX.</string> + <string name="fex_stability_label">Estabilidad</string> + <string name="fex_stability_detail">Los ajustes más seguros y lentos.</string> + <string name="fex_compatibility_label">Compatibilidad</string> + <string name="fex_compatibility_detail">TSO completo con multibloque.</string> + <string name="fex_intermediate_label">Intermedio</string> + <string name="fex_intermediate_detail">TSO equilibrado con precisión x87 reducida.</string> + <string name="fex_performance_label">Rendimiento</string> + <string name="fex_performance_detail">Todo el TSO desactivado; multibloque.</string> + <string name="fex_performance_tso_label">Rendimiento + TSO</string> + <string name="fex_performance_tso_detail">Ajustes de rendimiento con el TSO principal activado.</string> + <string name="fex_extreme_label">Extremo</string> + <string name="fex_extreme_detail">Desactiva las comprobaciones de código automodificable. Los juegos con JIT y el DRM pueden fallar.</string> + <string name="fex_extreme_tso_label">Extremo + TSO</string> + <string name="fex_extreme_tso_detail">Ajustes extremos con el TSO principal activado.</string> + <string name="fex_extreme_gn_label">Extremo-gn</string> + <string name="fex_extreme_gn_detail">Rendimiento con TSC y pistas de metadatos. Pruébalo antes que Extremo.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Rendimiento con comprobaciones de código completas y el bit del hipervisor oculto.</string> + <string name="game_env_custom_value">Valor personalizado</string> + <string name="game_env_select_value">Elegir valor</string> + <string name="user_apps_section">Emuladores y apps</string> + <string name="user_apps_add">Agregar</string> + <string name="user_apps_add_detail">Tu propia app o juego</string> + <string name="user_apps_kind_script">Script</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Iniciando…</string> + <string name="user_apps_added">%1$s agregada</string> + <string name="user_apps_removed">%1$s quitada</string> + <string name="user_apps_back">Escritorio</string> + <string name="user_apps_gone">Esa app ya no está. Elígela de nuevo desde Escritorio.</string> + <string name="user_apps_open">Abrir %1$s</string> + <string name="user_apps_remove">Quitar</string> + <string name="user_apps_remove_confirm">Presiona de nuevo para quitar</string> + <string name="user_apps_stop_session">Detén la sesión para quitar</string> + <string name="user_apps_script_linked">Ejecuta %1$s desde su carpeta, enlazada a la sesión donde está. Quitar la app no toca esa carpeta.</string> + <string name="user_apps_script_copied">Ejecuta %1$s desde una copia de su carpeta dentro de DroidDeck. Quitar la app borra la copia, no el original.</string> + <string name="user_apps_runtime_required">Instala primero el runtime de Linux</string> + <string name="user_apps_file_gone">El archivo ya no está</string> + <string name="user_apps_no_space">No hay espacio libre suficiente: copiar la carpeta necesita %1$s</string> + <string name="user_apps_copying">Copiando %1$s</string> + <string name="user_apps_failed">No se pudo agregar la app</string> + <string name="user_apps_github_checking">Buscando una versión de %1$s</string> + <string name="user_apps_github_unreachable">No se pudieron leer las versiones de %1$s</string> + <string name="user_apps_github_no_appimage">Ninguna versión de %1$s tiene un AppImage ARM64 o x86_64</string> + <string name="user_apps_downloading">Descargando %1$s</string> + <string name="user_apps_download_failed">La descarga falló</string> + <string name="user_apps_update_failed">No se pudo actualizar la app</string> + <string name="user_apps_icon_failed">No se pudo leer ese icono</string> + <string name="user_apps_saved">%1$s guardada</string> + <string name="user_apps_edit">Editar</string> + <string name="user_apps_check_updates">Buscar actualizaciones</string> + <string name="user_apps_checking_updates">Buscando actualizaciones…</string> + <string name="user_apps_update_to">Actualizar a %1$s</string> + <string name="user_apps_up_to_date">Al día · %1$s</string> + <string name="user_apps_updated">%1$s actualizada</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Agregar una app</string> + <string name="add_app_tab_script">Script</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Un archivo .sh. Se ejecuta desde su propia carpeta, a pantalla completa con gamescope.</string> + <string name="add_app_appimage_hint">Un AppImage ARM64 (aarch64), o uno x86_64 que se ejecuta con FEX. Se descomprime una vez en el runtime de Linux.</string> + <string name="add_app_github_hint">Instala el AppImage ARM64 de la última versión del repositorio, o el x86_64 con FEX.</string> + <string name="app_fex_title">Usar FEX</string> + <string name="app_fex_auto">Auto</string> + <string name="app_fex_on">Sí</string> + <string name="app_fex_off">No</string> + <string name="app_fex_hint">FEX ejecuta programas Linux x86 en este dispositivo ARM64. Auto lo usa cuando el programa es para x86.</string> + <string name="app_fex_x86">%1$s con FEX</string> + <string name="app_fex_not_ready">Este programa está hecho para PC %1$s y se ejecuta con FEX, que aún no está listo. Abre Steam una vez con tu sesión iniciada: DroidDeck hará que descargue FEX y el Steam Linux Runtime que necesita, y después se abrirá.</string> + <string name="session_end_program">Este programa</string> + <string name="session_end_fex_missing">%1$s está hecho para PC x86 y se ejecuta con FEX, que aún no está instalado. Abre Steam una vez con tu sesión iniciada y deja que descargue FEX y el Steam Linux Runtime; después vuelve a iniciarlo.</string> + <string name="add_app_flatpak_hint">Un ID de app de Flathub o su página en Flathub. Flatpak se configura primero si aún no lo está.</string> + <string name="add_app_file">Archivo</string> + <string name="add_app_no_file">Ningún archivo elegido</string> + <string name="add_app_choose_file">Elegir archivo</string> + <string name="add_app_change_file">Cambiar</string> + <string name="add_app_pick_script">Elige un script</string> + <string name="add_app_pick_appimage">Elige un AppImage</string> + <string name="add_app_pick_icon">Elige un icono</string> + <string name="add_app_repository">Repositorio</string> + <string name="add_app_repository_placeholder">propietario/repo o un enlace de github.com</string> + <string name="add_app_repository_invalid">No es un repositorio de GitHub</string> + <string name="add_app_flatpak_id">ID de app</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">No es un ID de app de Flathub</string> + <string name="add_app_flatpak_bundle_hint">O un archivo .flatpak, para una app que no esté en Flathub.</string> + <string name="add_app_pick_flatpak">Elige un archivo .flatpak</string> + <string name="add_app_source">Origen</string> + <string name="add_app_appearance">En tu Escritorio</string> + <string name="add_app_preview_name">Nueva app</string> + <string name="add_app_name">Nombre</string> + <string name="add_app_name_placeholder">De la app</string> + <string name="add_app_icon">Icono</string> + <string name="add_app_icon_default">Icono predeterminado</string> + <string name="add_app_choose_icon">Elegir icono</string> + <string name="add_app_clear_icon">Borrar</string> + <string name="add_app_icon_suggestions">Del repositorio</string> + <string name="add_app_icon_searching">Buscando iconos…</string> + <string name="add_app_icon_reset">Predeterminado</string> + <string name="edit_app_title">Editar %1$s</string> + <string name="edit_app_save">Guardar</string> + <string name="add_app_checking_folder">Comprobando la carpeta…</string> + <string name="add_app_folder_linked">Su carpeta está enlazada a la sesión: %1$s</string> + <string name="add_app_folder_copied">Su carpeta contiene programas de Linux, que el almacenamiento compartido no puede ejecutar, así que se copia en DroidDeck (%1$s).</string> + <string name="add_app_confirm">Agregar</string> + <string name="add_app_cancel">Cancelar</string> + <string name="add_app_runtime_required">Instala primero el runtime de Linux desde Configuración.</string> + <string name="add_app_busy">Espera a que termine %1$s.</string> + <string name="steam_compat_label">Compatible</string> + <string name="proton_compatible_note">Las versiones marcadas como “%1$s” en el menú Compatibilidad de Steam tienen las correcciones de prefijo de DroidDeck e inician juegos aquí. La predeterminada es Proton Experimental ARM64 (%1$s), o Proton 11.0 ARM64 (%1$s) cuando esa versión más reciente esté instalada. Las entradas de Proton propias de Valve sin la marca no pueden iniciar juegos en este dispositivo.</string> + <string name="proton_installed_compatible">Instalada %1$s · %2$s</string> + <string name="common_cancel">Cancelar</string> + <string name="common_auto">Auto</string> + <string name="common_never">Nunca</string> + <string name="common_always">Siempre</string> + <string name="common_uninstall">Desinstalar</string> + <string name="common_check">Comprobar</string> + <string name="common_update">Actualizar</string> + <string name="common_checking">Comprobando…</string> + <string name="common_working">Trabajando…</string> + <string name="common_forget">Olvidar</string> + <string name="common_add_ellipsis">Agregar…</string> + <string name="common_use">Usar</string> + <string name="common_applies_next_session">Se aplica en la próxima sesión.</string> + <string name="mode_steam_title">Sesión de Steam</string> + <string name="mode_desktop_title">Sesión de escritorio</string> + <string name="mode_display">Pantalla</string> + <string name="mode_resolution">Resolución</string> + <string name="mode_res_720">Hasta 720p</string> + <string name="mode_res_900">Hasta 900p</string> + <string name="mode_res_1080">Hasta 1080p</string> + <string name="mode_res_native">Nativa</string> + <string name="mode_res_default">%1$s (predeterminada)</string> + <string name="mode_res_custom_value">Personalizada · %1$d×%2$d</string> + <string name="mode_res_custom">Personalizada…</string> + <string name="mode_res_note">720p puede hacer los menús más ágiles.</string> + <string name="mode_ratio">Relación de aspecto</string> + <string name="mode_ratio_custom">Definida por la resolución personalizada.</string> + <string name="mode_ratio_auto">Auto usa al menos 16:9.</string> + <string name="mode_fps">Límite de fotogramas</string> + <string name="mode_fps_note">Limita toda la sesión. La pantalla cambia a una tasa de refresco que el límite divide exactamente.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Salida HDR10</string> + <string name="mode_hdr_unavailable">No disponible: %1$s.</string> + <string name="mode_hdr_restart">Reinicia la app para aplicarlo.</string> + <string name="mode_drivers">Controladores</string> + <string name="mode_gpu_drivers">Controladores de GPU</string> + <string name="mode_gpu_drivers_hint">Compartidos por Steam y Escritorio. Se definen en la página Componentes.</string> + <string name="mode_touch_controls">Táctil y controles</string> + <string name="mode_touch">Táctil</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Directo</string> + <string name="mode_touch_note">Auto: touchpad en Escritorio, directo en Steam.</string> + <string name="mode_osc">Controles en pantalla</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Auto muestra los controles en pantalla cuando no hay ningún control conectado.</string> + <string name="osc_steam_touch">Táctil de Steam (beta)</string> + <string name="osc_style_next_session">Los controles táctiles de Steam se activan en la próxima sesión de Steam</string> + <string name="osc_steam_layout">Disposición táctil de Steam</string> + <string name="osc_steam_layout_hint">Mueve, cambia de tamaño u oculta los controles táctiles de este juego; se guarda en Steam</string> + <string name="mode_controller">Control</string> + <string name="mode_controller_hint">Cómo ve Steam tu control. Se aplica en la próxima sesión.</string> + <string name="mode_controller_deck">Control de Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Control de Xbox 360</string> + <string name="mode_controller_note">Deck: botón de Quick Access y giroscopio. Steam Controller: lo mismo, con detección de agarre en los botones traseros. DualShock 4 y DualSense: giroscopio, y los trackpads como su panel táctil. Xbox 360: abre Quick Access con Guide+A.</string> + <string name="mode_back">Atrás</string> + <string name="back_menu_then_qam">Menú → QAM</string> + <string name="back_qam_then_menu">QAM → Menú</string> + <string name="mode_session">Sesión</string> + <string name="mode_suspend">Comportamiento en segundo plano</string> + <string name="mode_suspend_hint">Cuando la app se oculta o la pantalla se apaga.</string> + <string name="mode_suspend_manual">Manual</string> + <string name="mode_suspend_native">Nativo</string> + <string name="mode_suspend_steam_note">Auto pausa y reanuda al mostrarse. Nativo prepara Steam para la suspensión primero. Manual espera a Reanudar. Nunca sigue ejecutándose.</string> + <string name="mode_background_downloads">Mantener las descargas activas</string> + <string name="mode_background_downloads_hint">Retrasa la suspensión en segundo plano mientras Steam esté descargando.</string> + <string name="mode_zram">Compresión zRAM</string> + <string name="mode_zram_hint">Mientras se ejecuta un juego, la memoria del cliente de Steam se comprime en la zram del dispositivo, lo que deja más RAM para el juego. Se aplica la próxima vez que se inicie Steam.</string> + <string name="mode_zram_unsupported">No disponible: este dispositivo no tiene swap activo, o su kernel es anterior a la 5.4.</string> + <string name="mode_suspend_note">Auto pausa en segundo plano y reanuda al mostrarse. Manual espera a Reanudar. Nunca sigue ejecutándose.</string> + <string name="mode_startup">Inicio</string> + <string name="mode_steam_startup">Iniciar Steam con DroidDeck</string> + <string name="mode_steam_startup_hint">Abre la sesión de Steam al iniciar DroidDeck.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Buscando versiones…</string> + <string name="mode_decky_ready">Listo para instalar %1$s.</string> + <string name="mode_decky_none">No se encontró ninguna versión compatible. Inténtalo más tarde.</string> + <string name="mode_decky_installed">Instalado · %1$s</string> + <string name="mode_decky_update">Actualización disponible · %1$s</string> + <string name="mode_decky_current">Al día · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Instalar la última</string> + <string name="mode_decky_on">Se inicia con Steam. Mientras esté activado, otras apps de este dispositivo podrían controlar Steam.</string> + <string name="mode_decky_off">Desactivado. El puerto de depuración remota de Steam permanece cerrado.</string> + <string name="mode_decky_remove_title">¿Desinstalar Decky Loader?</string> + <string name="mode_decky_remove_text">Elimina el loader. Tus plugins y ajustes se conservan.</string> + <string name="mode_client">Cliente</string> + <string name="mode_mangoapp">Superposición de rendimiento</string> + <string name="mode_mangoapp_hint">Desactívalo si los juegos fallan o se quedan en negro en modo Deck. Se aplica en la próxima sesión.</string> + <string name="mode_steam_repair">Reparar el cliente de Steam</string> + <string name="mode_steam_repair_hint">Vuelve a descargar el cliente de Steam la próxima vez que se inicie Steam. Úsalo si Steam se queda en la pantalla de carga. Se conservan los juegos, la sesión iniciada y los ajustes.</string> + <string name="mode_steam_repair_queued">El cliente de Steam se volverá a descargar la próxima vez que se inicie Steam.</string> + <string name="mode_steam_repair_button">Reparar</string> + <string name="mode_added_art">Ilustraciones</string> + <string name="mode_sgdb_key">Clave API de SteamGridDB</string> + <string name="mode_sgdb_key_yours">Tu clave</string> + <string name="mode_sgdb_edit">Editar…</string> + <string name="mode_added_art_hint">Completa las imágenes que faltan desde Steam y, después, desde SteamGridDB. Tus propios cover.jpg, hero.jpg, logo.png o icon.png en la carpeta del juego tienen prioridad.</string> + <string name="summary_remove_game">Quitar %1$s</string> + <string name="mode_added_remove_confirm">¿Quitar?</string> + <string name="games_add">Agregar juego</string> + <string name="games_add_title">Agregar un juego:</string> + <string name="games_pick_exe_title">Elige el exe:</string> + <string name="games_add_unreachable">Esta ubicación no está disponible en la sesión</string> + <string name="mode_added_exe_check">Revisa este .exe</string> + <string name="wincomp_title">Componentes de Windows</string> + <string name="wincomp_pad_hint">LB / RB saltan entre las secciones.</string> + <string name="wincomp_card_none">Ninguno</string> + <string name="wincomp_applies">DLL de Windows que Proton no incluye, de la lista de componentes. Activa las que necesita este juego: van a la carpeta de Windows propia del juego, nunca a sus archivos, y se mantienen con cualquier Proton que use.</string> + <string name="wincomp_offline">No se pudo acceder a la lista de componentes. Los componentes ya descargados se pueden seguir activando o desactivando.</string> + <string name="wincomp_recommended">Recomendados para este juego</string> + <string name="wincomp_checking">Comprobando lo que necesita este juego…</string> + <string name="wincomp_when_online">Disponible con conexión</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Activando %1$d componente…</item> + <item quantity="other">Activando %1$d componentes…</item> + <item quantity="many">Activando %1$d componentes…</item> + </plurals> + <string name="wincomp_auto_section">Activados para este juego</string> + <string name="wincomp_auto_steam">Steam instala %1$s con %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">De la lista de GOG para este juego</string> + <string name="wincomp_auto_epic">De los requisitos previos de Epic para este juego</string> + <string name="wincomp_auto_amazon">De los pasos de instalación de Amazon para este juego</string> + <string name="wincomp_steam_by_name">Steam instala %1$s con la app %2$s, encontrada por nombre</string> + <string name="wincomp_suggestions">También en la lista</string> + <string name="wincomp_suggestion_reason">En la lista de %1$s; no es un componente aquí</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">El juego incluye %1$s</string> + <string name="wincomp_found_shipped">El juego tiene %1$s (suele funcionar tal cual)</string> + <string name="wincomp_already_here">Ya está en este juego</string> + <string name="wincomp_no_recommendation">Nada en la carpeta del juego apunta a un componente.</string> + <string name="wincomp_active">Instalados para este juego (%1$d)</string> + <string name="wincomp_all">Todos los componentes (%1$d)</string> + <string name="wincomp_installers">Necesitan un instalador de Windows (%1$d)</string> + <string name="wincomp_installers_note">Son programas de instalación independientes, sin ningún paquete que extraer, y todavía no hay un registro de lo que instalan. La mayoría son runtimes antiguos que el Mono incluido en Proton ya sustituye; los registros se agregan a medida que se crean.</string> + <string name="wincomp_show">Mostrar</string> + <string name="wincomp_hide">Ocultar</string> + <string name="wincomp_needs_installer">Ejecuta su propio programa de instalación (aún sin registro)</string> + <string name="wincomp_unsupported">Aún no compatible aquí</string> + <string name="wincomp_loading">Cargando los componentes…</string> + <string name="wincomp_failed">No se pudo instalar: %1$s</string> + <string name="wincomp_downloaded">Descargado</string> + <string name="wincomp_downloading">Descargando %1$s</string> + <string name="wincomp_installing">Instalando: %1$s</string> + <string name="wincomp_reverting">Desactivando…</string> + <string name="wincomp_download_size">Descarga de %1$s</string> + <string name="wincomp_next_launch">Se aplica la próxima vez que se inicie el juego.</string> + <string name="mode_stretch169">Estirar juegos 16:9</string> + <string name="mode_stretch169_hint">En pantallas más cuadradas que 16:9, estira los juegos para llenar en lugar de mostrar barras. Se aplica en la próxima sesión.</string> + <string name="mode_audio">Audio</string> + <string name="mode_directaudio">DirectAudio para juegos</string> + <string name="mode_directaudio_hint">Evita PulseAudio para menor latencia.</string> + <string name="mode_mic">Micrófono</string> + <string name="mode_mic_hint">Para el chat de voz.</string> + <string name="mode_network">Red</string> + <string name="mode_wifi_discovery">Detección de redes Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Muestra en Steam los nombres de Wi-Fi y las redes cercanas.</string> + <string name="mode_wifi_location_off">Los servicios de ubicación están desactivados.</string> + <string name="mode_wifi_permission_denied">No se concedió el permiso de ubicación.</string> + <string name="mode_wifi_open_settings">Abrir ajustes</string> + <string name="mode_wifi_continue">Continuar</string> + <string name="mode_wifi_explain_title">¿Activar la detección de redes Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android exige el permiso de ubicación para leer los nombres de Wi-Fi y detectar redes cercanas. DroidDeck usa este acceso para mostrar esas redes en Steam. No rastreamos tu ubicación. El acceso a internet funciona sin este permiso.</string> + <string name="mode_storage">Almacenamiento de juegos</string> + <string name="mode_storage_auto">Automático - la tarjeta SD si está presente, y tus carpetas de juegos</string> + <string name="mode_storage_auto_none">Automático - tus carpetas de juegos, y la tarjeta SD si está presente (ninguna ahora)</string> + <string name="mode_storage_internal">Solo interno</string> + <string name="mode_storage_folder">Carpeta: %1$s</string> + <string name="mode_second_library">Segunda biblioteca</string> + <string name="mode_storage_note">Los juegos que cargan recursos desde la SD o el almacenamiento compartido pueden tener microcortes.</string> + <string name="mode_storage_diagnostics">Diagnóstico de almacenamiento</string> + <string name="mode_storage_diagnostics_hint">Registra los resultados de asignación y muestras de tiempos de almacenamiento en Compartir registros. Puede ralentizar las instalaciones mientras esté activado. Se aplica en la próxima sesión.</string> + <string name="mode_choose_folder">Elegir una carpeta…</string> + <string name="mode_custom_res_title">Resolución personalizada</string> + <string name="mode_custom_res_text">Sustituye el límite y la relación de aspecto. Un tamaño que no coincide con la pantalla muestra barras.</string> + <string name="mode_width">Ancho</string> + <string name="mode_height">Alto</string> + <string name="mode_custom_res_range">Entre 320×240 y 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d juego</item> + <item quantity="other">%1$d juegos</item> + <item quantity="many">%1$d juegos</item> + </plurals> + <string name="common_ok">Aceptar</string> + <string name="common_delete">Eliminar</string> + <string name="common_restore">Restaurar</string> + <string name="common_download">Descargar</string> + <string name="common_delete_named">Eliminar %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Controlador de runtime</string> + <string name="comp_runtime_driver_hint">Lo usan Steam, los juegos y el escritorio. Se aplica en la próxima sesión.</string> + <string name="comp_import_turnip">Importar zip de Turnip…</string> + <string name="comp_display_driver">Controlador de pantalla</string> + <string name="comp_display_driver_hint">Dibuja los fotogramas en pantalla en ambos modos. Reinicia la app para aplicarlo.</string> + <string name="comp_import_adrenotools">Importar un zip de AdrenoTools…</string> + <string name="comp_never">nunca</string> + <string name="comp_nightlies_checked">Última comprobación de Nightlies: %1$s</string> + <string name="comp_title">Componentes</string> + <string name="comp_about">Acerca de Componentes</string> + <string name="comp_check_drivers">Buscar controladores nuevos</string> + <string name="comp_check_nightlies">Buscar paquetes nuevos en las Nightlies</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">El Proton elegido aquí ejecuta todos los juegos que no tengan uno propio en Steam, y un cambio hecho en Steam también se ve aquí. Steam reemplaza el Proton de Valve al actualizarse; los originales se conservan por versión.</string> + <string name="comp_scope">Configuración</string> + <string name="comp_profile_configure">Configurar perfil</string> + <string name="comp_profile">Perfil</string> + <string name="comp_scope_general">Perfil predeterminado</string> + <string name="comp_scope_general_detail">Lo usan automáticamente los juegos sin ajustes propios.</string> + <string name="comp_profile_game_detail">Ajustes guardados que se usan automáticamente al iniciar %1$s.</string> + <string name="comp_game_hint">Elige solo los ajustes que necesita este juego. Todo lo demás sigue usando el perfil predeterminado.</string> + <string name="comp_game_fex">Preajuste de FEX</string> + <string name="comp_game_fex_inherited">Usa el preajuste del perfil predeterminado.</string> + <string name="comp_game_fex_override">Preajuste personalizado guardado para este juego.</string> + <string name="comp_game_fex_custom">Variables de FEX personalizadas</string> + <string name="comp_game_use_general">Usar predeterminado</string> + <string name="comp_game_compatibility">Compatibilidad del juego</string> + <string name="comp_game_environment_hint">Opciones de entorno de Proton, DXVK, VKD3D y sincronización para este juego.</string> + <string name="comp_game_proton_inherited">Usa el Proton del perfil predeterminado.</string> + <string name="comp_game_proton_override">Proton personalizado guardado para este juego mediante la asignación de compatibilidad de Steam.</string> + <string name="comp_no_proton_short">Sin Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Usa el paquete del perfil predeterminado de %1$s, salvo que este juego elija otro paquete.</string> + <string name="comp_game_component_general">Usa el paquete de componentes del perfil predeterminado.</string> + <string name="comp_game_component_override">Usa %1$s solo para este juego.</string> + <string name="comp_game_runtime_options">Opciones del runtime</string> + <string name="comp_game_environment_other_hint">Otras opciones de entorno de Proton, DXVK, VKD3D-Proton y sincronización para cada juego.</string> + <string name="comp_game_saved_next">El perfil de %1$s se ha guardado para el próximo inicio del juego.</string> + <string name="game_no_steam_title">Iniciar sin Steam</string> + <string name="game_no_steam_detail">Para un juego que se cierra enseguida: lo inicia sin la configuración de Steam de Proton. Las funciones de Steam, como la superposición, están desactivadas para él.</string> + <string name="game_no_steam_on">Activado</string> + <string name="comp_game_proton_live">La elección de Proton de %1$s se ha guardado y ya está disponible en Steam.</string> + <string name="comp_game_proton_next">La elección de Proton de %1$s se ha guardado. Reinicia Steam antes de iniciar el juego.</string> + <string name="comp_game_proton_not_runnable">%1$s no puede usar el Proton elegido en este dispositivo.</string> + <string name="comp_game_load_failed">No se pudo cargar el perfil de %1$s: %2$s</string> + <string name="comp_game_save_failed">No se pudo guardar el perfil del juego: %1$s</string> + <string name="comp_game_reset">Restablecer perfil del juego</string> + <string name="comp_game_reset_title">¿Restablecer el perfil de %1$s?</string> + <string name="comp_game_reset_body">¿Quitar los ajustes propios de este juego para Proton, FEX, paquete de componentes, entorno, filtrado de texturas y componentes de Windows? Usará el perfil predeterminado.</string> + <string name="comp_game_reset_done">%1$s ahora usa el perfil predeterminado.</string> + <string name="comp_game_reset_failed">No se pudo restablecer del todo el perfil del juego: %1$s</string> + <string name="comp_default_live">%1$s ahora ejecuta todos los juegos que no tengan su propio Proton en Steam.</string> + <string name="comp_default_next">%1$s ejecutará todos los juegos que no tengan su propio Proton a partir del próximo inicio de Steam.</string> + <string name="comp_default_not_runnable">%1$s no puede iniciar juegos aquí, así que no puede ser el predeterminado.</string> + <string name="comp_default_failed">No se pudo guardar el Proton predeterminado: %1$s</string> + <string name="comp_swapped">%1$s · %2$d reemplazados</string> + <string name="comp_all_original">%1$s · todos originales</string> + <string name="comp_game_running_suffix">%1$s · juego en ejecución</string> + <string name="comp_esync_pack">%1$s · paquete droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · aún sin paquete droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync integrado, no necesita paquete</string> + <string name="comp_gpu_drivers">Controladores de GPU</string> + <string name="comp_reapplied">%1$s · reaplicado al iniciar %2$s</string> + <string name="comp_next_queued">Siguiente: %1$s · cuando se cierre el juego</string> + <string name="comp_in_use">%1$s en uso: %2$s</string> + <string name="comp_waits">Espera a que se cierre el juego</string> + <string name="comp_applies_next_game">Se aplica la próxima vez que se inicie un juego</string> + <string name="comp_import_zip">Importar .zip</string> + <string name="comp_reading">Leyendo Protons…</string> + <string name="comp_no_proton">Aún no hay ningún Proton instalado. Inicia Steam una vez para descargar su Proton ARM64, o agrega GE-Proton o CachyOS desde Configuración.</string> + <string name="comp_original">Original · %1$s</string> + <string name="comp_this_build">%1$s · esta versión</string> + <string name="comp_earlier_build">%1$s · versión anterior</string> + <string name="comp_installed_count">Instalados · %1$d</string> + <string name="comp_nothing_stored">Aún no hay nada guardado para %1$s. Los archivos propios de este Proton se guardan como su original.</string> + <string name="comp_waits_long">Hay un juego en ejecución con este Proton, así que se espera a que se cierre.</string> + <string name="comp_applies_long">Se aplica la próxima vez que se inicie un juego.</string> + <string name="comp_swap_title">¿Reemplazar %1$s?</string> + <string name="comp_swap_body">¿Poner %1$s en %2$s? Sus archivos originales quedan guardados. %3$s</string> + <string name="comp_restore_title">¿Restaurar %1$s?</string> + <string name="comp_restore_body">¿Volver a poner el original de %1$s en %2$s? %3$s</string> + <string name="comp_delete_package_body">Quita el paquete de la app. Puedes descargarlo de nuevo.</string> + <string name="comp_delete_original_title">¿Eliminar este original?</string> + <string name="comp_delete_original_body">Este original de %1$s es de una versión anterior de %2$s. El original de la versión actual siempre se conserva.</string> + <string name="comp_nightlies_count">En las Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Actualiza para listar los paquetes de las Nightlies.</string> + <string name="comp_nothing_new">Nada nuevo desde la última comprobación.</string> + <string name="comp_import_wcp">Importar .wcp</string> + <string name="comp_restore_original">Restaurar el original de este Proton</string> + <string name="comp_restore_original_body">¿Volver a poner el original %2$s de %1$s?</string> + <string name="comp_swap">Reemplazar</string> + <string name="comp_about_text">FEX, DXVK y VKD3D-Proton para cada Proton con el que Steam ejecuta juegos.\n\nElige una fila instalada para ponerla en uso. Se aplica la próxima vez que se inicie un juego, o cuando se cierre el juego en ejecución.\n\nTus elecciones se comprueban antes de cada inicio y se restauran si algo las cambió. Los archivos originales de cada Proton se conservan, así que las actualizaciones de Steam nunca los pierden.</string> + <string name="comp_tag_original">Original</string> + <string name="comp_tag_in_use">En uso</string> + <string name="comp_tag_new">Nuevo</string> + <string name="comp_tag_stored">Guardado</string> + <string name="perf_title">Rendimiento</string> + <string name="perf_lede">Núcleos de CPU, correcciones de sesión y nombre del host. Se aplica en la próxima sesión.</string> + <string name="perf_client_cores_group">Núcleos del cliente de Steam</string> + <string name="perf_override">Forzar la elección de núcleos de Steam</string> + <string name="perf_override_hint">Fija Steam, su ayudante de interfaz y gamescope a los núcleos de abajo.</string> + <string name="perf_client_cores">Núcleos del cliente</string> + <string name="perf_client_cores_on">Núcleos para Steam.</string> + <string name="perf_client_cores_off">Activa el forzado para elegir.</string> + <string name="perf_game_cores_group">Núcleos de juegos</string> + <string name="perf_game_cores">Núcleos de juegos</string> + <string name="perf_game_cores_hint">Núcleos para los juegos. Con todos seleccionados, Android los asigna libremente.</string> + <string name="perf_client_ui">Interfaz del cliente</string> + <string name="perf_glthread">GL con subprocesos</string> + <string name="perf_glthread_hint">Puede hacer los menús de Steam más ágiles.</string> + <string name="perf_zink">Zink: descriptores diferidos</string> + <string name="perf_zink_hint">Recomendado para controladores sin búferes de descriptores.</string> + <string name="perf_noglerror">Omitir comprobaciones de errores de GL</string> + <string name="perf_noglerror_hint">Desactiva la validación de GL en cada llamada.</string> + <string name="perf_gsrealtime">gamescope: cola de GPU en tiempo real</string> + <string name="perf_gsrealtime_hint">Da prioridad al trabajo de GPU del compositor. Puede suavizar el ritmo de fotogramas a costa de algo de rendimiento en los juegos.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Mantener la GPU a su reloj máximo</string> + <string name="perf_gpuclock_hint">Solo Adreno. Menos microcortes, más consumo de batería y calor.</string> + <string name="perf_fixes">Correcciones de sesión</string> + <string name="perf_sysmem">Turnip: renderizado sysmem</string> + <string name="perf_sysmem_hint">Más rápido para Steam y la mayoría de juegos. 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_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> + <string name="perf_esync_hint">Los hilos de Windows de los juegos se esperan entre sí mediante eventfd y memoria compartida, sin pasar por wineserver. Usa un paquete droiddeck-esync hecho para esa versión exacta de Proton; los paquetes se descargan automáticamente. Mientras no exista uno para una versión nueva de Proton, droiddeck-fsync lo sustituye. Se aplica en la próxima sesión.</string> + <string name="perf_xalia_hint">Desactiva el asistente de navegación con control de Proton, que consume CPU en cada juego.</string> + <string name="perf_seccomp">Ejecutar proot sin seccomp</string> + <string name="perf_seccomp_hint">Puede corregir errores de syscalls ausentes en algunos kernels. Puede reducir el rendimiento.</string> + <string name="perf_fastpath">Ruta rápida de proot</string> + <string name="perf_fastpath_needs_seccomp">Requiere el filtro seccomp de proot.</string> + <string name="perf_fastpath_hint">Búsquedas de archivos más rápidas y menos microcortes. Desactívalo si un programa no encuentra sus archivos.</string> + <string name="perf_identity">Identidad de la sesión</string> + <string name="perf_hostname">Nombre del host</string> + <string name="perf_hostname_hint">El nombre que Steam ve para este dispositivo. En blanco restaura %1$s.</string> + <string name="perf_hostname_invalid">Solo letras, dígitos y guiones internos, hasta 63 caracteres.</string> + <string name="perf_phantom_warning">Android está configurado para cerrar esta sesión</string> + <string name="driver_installed">Instalado</string> + <string name="driver_available">Disponible para descargar</string> + <string name="driver_nothing_new">Nada nuevo desde la última comprobación.</string> + <string name="driver_restore_builtin">Restaurar controladores integrados</string> + <string name="driver_delete_builtin">Integrado en la app: esto elimina sus archivos descomprimidos y lo oculta. Restaurar controladores integrados lo recupera.</string> + <string name="driver_delete_bundle">Mitad de un paquete Android + Linux: se eliminan ambas mitades. Un controlador en uso vuelve al predeterminado.</string> + <string name="driver_delete_plain">Sus archivos se eliminan de la app.</string> + <string name="driver_delete_in_use">Sus archivos se eliminan. Está en uso, así que pasa a usarse el predeterminado.</string> + <string name="drawer_page_display">Pantalla</string> + <string name="drawer_page_effects">Efectos</string> + <string name="drawer_page_controls">Controles</string> + <string name="drawer_page_components">Componentes</string> + <string name="drawer_page_controller">Control</string> + <string name="drawer_page_settings">Ajustes</string> + <string name="drawer_page_desc">Página %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Escritorio</string> + <string name="drawer_steam_menu">Menú de Steam</string> + <string name="drawer_quick_access">Quick Access</string> + <string name="drawer_open_qam">Abrir el menú Quick Access</string> + <string name="drawer_prev_page">Página anterior</string> + <string name="drawer_next_page">Página siguiente</string> + <string name="drawer_hud">HUD de rendimiento</string> + <string name="drawer_scaling">Modo de escalado</string> + <string name="drawer_scaling_sharpness">Nitidez del escalado</string> + <string name="drawer_effects">Efectos de pantalla</string> + <string name="drawer_effects_hint">Se aplica al instante. Usa algo de GPU mientras haya un efecto activo.</string> + <string name="drawer_look">Ajustes predefinidos</string> + <string name="drawer_look_custom">Personalizado</string> + <string name="drawer_effects_advanced">Avanzado</string> + <string name="widgets_expanded">Expandido</string> + <string name="widgets_collapsed">Contraído</string> + <string name="drawer_cas">Nitidez (CAS)</string> + <string name="drawer_cas_level">Nivel de nitidez</string> + <string name="drawer_fake_hdr">HDR simulado</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Modo Cardboard</string> + <string name="cardboard_mode_hint">Vistas para el ojo izquierdo y el derecho para un visor de RV para celular.</string> + <string name="cardboard_source">Imagen</string> + <string name="cardboard_source_screen">Pantalla virtual</string> + <string name="cardboard_source_sbs">3D lado a lado</string> + <string name="cardboard_viewer">Visor</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Sin lente</string> + <string name="cardboard_ipd">Distancia entre ojos</string> + <string name="cardboard_screen_width">Ancho de pantalla</string> + <string name="cardboard_screen_distance">Distancia de la pantalla</string> + <string name="cardboard_head_tracking">Seguimiento de cabeza</string> + <string name="cardboard_no_sensor">Este dispositivo no tiene sensor de rotación.</string> + <string name="cardboard_recenter">Recentrar vista</string> + <string name="cardboard_recenter_button">Recentrar</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Entrar en SteamVR</string> + <string name="steamvr_checking">Comprobando SteamVR…</string> + <string name="cardboard_steamvr">SteamVR (experimental)</string> + <string name="cardboard_steamvr_install">Instalar</string> + <string name="cardboard_steamvr_installing">Descargando y descomprimiendo SteamVR…</string> + <string name="cardboard_steamvr_start">Iniciar</string> + <string name="cardboard_steamvr_stop">Detener</string> + <string name="cardboard_steamvr_unavailable">No disponible en esta sesión.</string> + <string name="cardboard_steamvr_failed">SteamVR no respondió; revisa el registro de la sesión.</string> + <string name="drawer_deband">Reducción de bandas</string> + <string name="drawer_deband_strength">Intensidad de reducción de bandas</string> + <string name="drawer_brightness">Brillo</string> + <string name="drawer_contrast">Contraste</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Saturación</string> + <string name="drawer_fxaa">FXAA (suavizado de bordes)</string> + <string name="drawer_toon">Contornos toon</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Filtrado de texturas</string> + <string name="drawer_texture_hint">Juegos DirectX 9–11, desde su próximo inicio.</string> + <string name="drawer_anisotropy">Filtrado anisotrópico</string> + <string name="drawer_texture_sharpness">Nitidez de texturas</string> + <string name="drawer_texture_sharpness_note">Un sesgo de mip negativo: texturas más nítidas, algo de parpadeo. Auto sigue cuánto se amplía la sesión a la pantalla.</string> + <string name="drawer_touch_auto">Auto (%1$s)</string> + <string name="drawer_keyboard">Teclado</string> + <string name="drawer_latency">Latencia</string> + <string name="drawer_low_latency_controller">Control de baja latencia</string> + <string name="drawer_low_latency_controller_hint">El control informa a 1000 Hz en lugar de 250 Hz. Usa algo más de CPU.</string> + <string name="drawer_low_latency_touch">Táctil de baja latencia</string> + <string name="drawer_low_latency_touch_hint">Los toques omiten la agrupación de fotogramas; los controles táctiles de Steam van a 1000 Hz. Usa algo más de CPU.</string> + <string name="drawer_pc_keyboard">Teclado de PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Segunda pantalla</string> + <string name="drawer_second_screen_mode">Modo</string> + <string name="drawer_second_screen_shows">Muestra</string> + <string name="drawer_android_apps">Apps de Android</string> + <string name="drawer_launch_app">Abrir una app</string> + <string name="common_hide">Ocultar</string> + <string name="common_show">Mostrar</string> + <string name="drawer_no_apps">No hay apps que se puedan abrir</string> + <string name="drawer_session_behavior">Comportamiento de la sesión</string> + <string name="drawer_suspend_hint">Se aplica ahora y a las próximas sesiones en este modo.</string> + <string name="drawer_next_session">Próxima sesión</string> + <string name="drawer_support">Soporte</string> + <string name="drawer_logs">Registros de sesión</string> + <string name="drawer_logs_hint">Adjúntalos a un informe de error</string> + <string name="drawer_share_logs">Compartir registros</string> + <string name="drawer_background">Segundo plano</string> + <string name="drawer_stop">Detener</string> + <string name="drawer_stop_title">¿Detener la sesión?</string> + <string name="drawer_running_now">En ejecución</string> + <string name="drawer_no_game">Ningún juego se ejecuta con un Proton</string> + <string name="drawer_selected_profile">Perfil del juego</string> + <string name="drawer_selected_profile_none">Los detalles del perfil aún no están disponibles.</string> + <string name="drawer_profile_refresh_failed_initial">No se pudieron cargar los perfiles de juego. Se reintentará automáticamente.</string> + <string name="drawer_profile_refresh_failed_stale">No se pudieron actualizar los perfiles de juego. Se muestran los últimos datos disponibles; se reintentará automáticamente.</string> + <string name="drawer_profile_inspect_hint">Consulta y edita los ajustes guardados que se usarán en el próximo inicio.</string> + <string name="drawer_profile_default">Usa el perfil predeterminado</string> + <string name="drawer_profile_custom">Perfil personalizado</string> + <string name="drawer_component_inherited">Usa %1$s del perfil predeterminado.</string> + <string name="drawer_game_components_note">Los cambios se guardan en el perfil de %1$s y se aplican la próxima vez que se inicie el juego.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d ajuste propio del juego</item> + <item quantity="other">%1$d ajustes propios del juego</item> + <item quantity="many">%1$d ajustes propios del juego</item> + </plurals> + <string name="drawer_no_proton">Aún no hay ningún Proton instalado.</string> + <string name="drawer_game_running">juego en ejecución</string> + <string name="drawer_reapplied">reaplicado al iniciar %1$s</string> + <string name="drawer_original">Original</string> + <string name="drawer_components_note">Importa y elimina en la página Componentes.</string> + <string name="drawer_component_downloads">Descargar componentes</string> + <string name="drawer_component_downloads_hint">Las descargas se comparten con la página Componentes. Elige arriba una versión descargada para usarla al iniciar el próximo juego.</string> + <string name="drawer_component_choose_download">Elige una versión para descargar</string> + <string name="setup_check_done">Hecho</string> + <string name="setup_check_warn">Requiere atención</string> + <string name="setup_check_busy">Trabajando</string> + <string name="setup_limit_adb_failed">Revisa la dirección IP y el puerto de la Depuración inalámbrica, o vincula de nuevo si Android quitó este dispositivo.</string> + <string name="setup_install">Instalar</string> + <string name="setup_manage">Administrar</string> + <string name="setup_tab_overview">Resumen</string> + <string name="setup_tab_controller">Control</string> + <string name="setup_tab_session">Sesión</string> + <string name="setup_tab_launcher">Launcher</string> + <string name="setup_title">Configuración</string> + <string name="setup_all_set">● Todo listo</string> + <string name="setup_n_ready">%1$d de %2$d listos</string> + <string name="setup_system_check">Comprobación del sistema</string> + <string name="setup_gpu_supported">Dispositivo compatible</string> + <string name="setup_gpu_untested">GPU sin probar</string> + <string name="setup_gpu_unsupported">GPU no compatible</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam necesita un controlador Adreno; %1$s puede mostrar una pantalla negra</string> + <string name="setup_runtime">Runtime de Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">No instalado · unos 3 GB, se instala al jugar por primera vez</string> + <string name="setup_installed">Instalado</string> + <string name="setup_runtime_update">%1$s · actualización disponible</string> + <string name="setup_runtime_current">%1$s · al día</string> + <string name="setup_limit">Límite de procesos secundarios</string> + <string name="setup_limit_on">Activado · Android puede cerrar Steam. Desactivarlo tarda un minuto.</string> + <string name="setup_limit_unset">Sin definir · Android puede cerrar Steam. Desactivarlo tarda un minuto.</string> + <string name="setup_limit_unknown">No se pudo comprobar · desactivarlo tarda un minuto.</string> + <string name="setup_fix_it">Solucionar</string> + <string name="setup_details">Detalles</string> + <string name="setup_dev_options">Opciones de desarrollador</string> + <string name="setup_use_wireless">Usar Depuración inalámbrica</string> + <string name="setup_check_again">Comprobar de nuevo</string> + <string name="setup_limit_turn_on">Activar límite</string> + <string name="setup_account">Cuenta de Steam</string> + <string name="setup_signed_in_offline">Sesión iniciada como %1$s · modo sin conexión</string> + <string name="setup_signed_in">Sesión iniciada como %1$s</string> + <string name="setup_sign_in">Presiona Jugar en Steam e inicia sesión</string> + <string name="setup_tools">Herramientas</string> + <string name="setup_controller">Control</string> + <string name="setup_controller_unavailable">Los ajustes del control no están disponibles.</string> + <string name="setup_session">Sesión</string> + <string name="setup_logs">Registros de sesión</string> + <string name="setup_logs_hint">Se guardan tras cada sesión</string> + <string name="setup_agent_commands">Herramientas de depuración</string> + <string name="setup_latest_logs">Últimos registros de sesión</string> + <string name="setup_saved_logs">Registros de sesión guardados</string> + <string name="setup_saved_logs_hint">Conserva los %1$d más recientes</string> + <string name="setup_clear_logs">Borrar registros</string> + <string name="setup_reset_settings">Restablecer todos los ajustes</string> + <string name="setup_reset_settings_hint">Devuelve cada ajuste a su valor predeterminado</string> + <string name="setup_reset_settings_button">Restablecer</string> + <string name="setup_reset_settings_title">¿Restablecer todos los ajustes?</string> + <string name="setup_reset_settings_body">Los ajustes de pantalla, rendimiento, control, tema, idioma y lanzador vuelven a sus valores predeterminados. Se conservan tus juegos, la sesión de Steam, las cuentas de tiendas, los controladores descargados y las carpetas de almacenamiento.</string> + <string name="setup_reset_settings_profiles">Restablecer también los perfiles de juego (Proton, FEX, componentes y entorno de cada juego, y el entorno del perfil predeterminado)</string> + <string name="setup_reset_settings_session_running">Detén la sesión antes de restablecer los ajustes.</string> + <string name="setup_reset_settings_partial">Los ajustes se restablecieron, pero algunas partes no se pudieron restablecer. Los registros tienen los detalles.</string> + <string name="setup_offline">Modo sin conexión</string> + <string name="setup_sign_in_first">Inicia sesión en Steam primero</string> + <string name="setup_launcher">Launcher</string> + <string name="setup_language">Idioma</string> + <string name="setup_language_hint">Steam también lo usa a partir de su próximo inicio.</string> + <string name="setup_language_system">Predeterminado del sistema (%1$s)</string> + <string name="setup_language_system_short">Predeterminado del sistema</string> + <string name="setup_app_scale">Escala de la app</string> + <string name="setup_app_scale_hint">Texto y controles de DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (predeterminada)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Apariencia del launcher</string> + <string name="setup_home">Usar como pantalla de inicio</string> + <string name="setup_home_on">DroidDeck puede ser la app de inicio</string> + <string name="setup_home_off">DroidDeck nunca se ofrece como app de inicio</string> + <string name="setup_orientation">Orientación</string> + <string name="setup_orientation_auto">Horizontal automática</string> + <string name="setup_orientation_landscape">Horizontal</string> + <string name="setup_orientation_reverse">Horizontal invertida</string> + <string name="setup_fullscreen">Pantalla completa</string> + <string name="setup_fullscreen_on">Oculta las barras de estado y navegación de Android</string> + <string name="setup_fullscreen_off">Muestra las barras de estado y navegación de Android</string> + <string name="setup_default_home">App de inicio predeterminada</string> + <string name="setup_choose_home">Elige una app de inicio</string> + <string name="setup_choose">Elegir</string> + <string name="setup_linux_apps">Apps de Linux (beta)</string> + <string name="setup_tool_files">Archivos</string> + <string name="setup_tool_files_hint">Explorar y administrar archivos</string> + <string name="setup_tool_protons">Versiones de Proton</string> + <string name="setup_tool_protons_hint">Instala versiones de Proton ARM64</string> + <string name="setup_tool_performance">Rendimiento</string> + <string name="setup_tool_performance_hint">Asignación de núcleos de CPU</string> + <string name="setup_tool_roms">Carpeta de ROMs</string> + <string name="setup_tool_roms_hint">Donde se guardan los juegos de emuladores</string> + <string name="setup_card_components">Componentes</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Controles</string> + <string name="setup_card_controls_hint">Asignación de botones</string> + <string name="store_tab_discover">Descubrir</string> + <string name="store_tab_search">Buscar</string> + <string name="store_tab_installed">Instaladas</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Tienda</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak listo</string> + <string name="store_needs_runtime">Instala primero el runtime de Linux desde Configuración.</string> + <string name="store_setup_title">Configurar Flatpak</string> + <string name="store_setup_text">Agrega Flatpak y lo conecta a Flathub (unos 20 MB). La primera app también descarga su runtime.</string> + <string name="store_setting_up">Configurando…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Actualizaciones</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Iniciando…</string> + <string name="store_categories">Categorías</string> + <string name="store_unreachable">No se pudo conectar con Flathub. Revisa tu conexión e inténtalo de nuevo.</string> + <string name="store_try_again">Reintentar</string> + <string name="store_search_label">Buscar en Flathub</string> + <string name="store_search_placeholder">Firefox, juegos, emuladores…</string> + <string name="store_search">Buscar</string> + <string name="store_all">Todas</string> + <string name="store_searching">Buscando…</string> + <string name="store_search_hint">Busca por nombre o elige una categoría. Solo se listan apps ARM64.</string> + <string name="store_no_results">Ninguna app ARM64 de Flathub coincide.</string> + <string name="store_results">Resultados</string> + <string name="store_check_updates">Buscar actualizaciones</string> + <string name="store_update_all">Actualizar todas (%1$d)</string> + <string name="store_all_current">● Todo está al día</string> + <string name="store_no_apps">Aún no hay apps. Encuentra alguna en Descubrir o Buscar.</string> + <string name="store_setup_first_note">Configura Flatpak para instalar apps.</string> + <string name="store_update_available_prefix">Actualización disponible · %1$s</string> + <string name="store_open">Abrir</string> + <string name="store_details">Detalles</string> + <string name="store_remove">Quitar</string> + <string name="store_press_again">Presiona de nuevo para quitar</string> + <string name="store_installing">Instalando…</string> + <string name="store_install">Instalar</string> + <string name="store_setup_first">Configura Flatpak primero</string> + <string name="store_download_size">Descarga de %1$s</string> + <string name="store_installed_chip">● Instalada</string> + <string name="store_details_failed">No se pudo cargar la página de esta app en Flathub.</string> + <string name="store_loading">Cargando desde Flathub…</string> + <string name="store_no_arm">No hay versión ARM64 en Flathub, así que no se puede instalar aquí.</string> + <string name="store_screenshots">Capturas de pantalla</string> + <string name="store_about">Acerca de</string> + <string name="store_app_id">ID de app</string> + <string name="store_license">Licencia</string> + <string name="store_runtime">Runtime</string> + <string name="store_installed_size">Tamaño instalado</string> + <string name="store_installed_size_value">%1$s (más su runtime compartido)</string> + <string name="store_website">Sitio web</string> + <string name="store_verified">Verificada</string> + <string name="upd_title">Actualizaciones</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Comprobado %1$s</string> + <string name="upd_not_checked">Aún sin comprobar</string> + <string name="upd_perm_title">Permitir que DroidDeck se actualice solo</string> + <string name="upd_perm_text">En la siguiente pantalla, activa Permitir desde esta fuente y vuelve. La actualización continúa sola.</string> + <string name="upd_open_settings">Abrir ajustes</string> + <string name="upd_not_now">Ahora no</string> + <string name="upd_signed_status">Firmada de otro modo</string> + <string name="upd_signed_headline">No se puede actualizar sobre la instalada</string> + <string name="upd_signed_detail">Esta copia no está firmada con la clave de publicación de DroidDeck, así que las actualizaciones no se pueden instalar sobre ella. Desinstálala para cambiar.</string> + <string name="upd_available">Actualización disponible</string> + <string name="upd_blocked_status">No se puede instalar</string> + <string name="upd_switch">Lista para cambiar</string> + <string name="upd_ahead_status">Por delante de Estable</string> + <string name="upd_ahead_headline">Vas por delante de Estable</string> + <string name="upd_ahead_detail">Esta versión es más reciente que la última Estable. Pasarás a Estable con su próxima versión.</string> + <string name="upd_gone_status">Prueba finalizada</string> + <string name="upd_gone_headline">Esta prueba ha terminado</string> + <string name="upd_gone_detail">Su corrección se fusionó o se descartó. Sigue Vista previa para las correcciones más recientes.</string> + <string name="upd_current_status">Al día</string> + <string name="upd_current_headline">Tienes la última %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Actualizar%1$s</string> + <string name="upd_install_button">Instalar%1$s</string> + <string name="upd_install_anyway">Instalar Estable %1$s de todos modos</string> + <string name="upd_follow_preview">Seguir Vista previa</string> + <string name="upd_stop_session">Detén la sesión en ejecución para actualizar.</string> + <string name="upd_less">Menos</string> + <string name="upd_more">Más</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Nueva versión de Vista previa</string> + <string name="upd_new_test">Versión de prueba del PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">CANAL DE ACTUALIZACIÓN</string> + <string name="upd_stable">Estable</string> + <string name="upd_stable_hint">Versiones probadas, para la mayoría</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Vista previa</string> + <string name="upd_preview_hint">Las correcciones más recientes, antes que Estable</string> + <string name="upd_preview_current">Al día</string> + <string name="upd_tests">Versiones de prueba</string> + <string name="upd_tests_hint">Prueba una corrección antes de su publicación</string> + <string name="upd_tests_none">Ninguna por ahora</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">No compilada para esta copia de DroidDeck</string> + <string name="upd_updated">Actualizada %1$s</string> + <string name="upd_test_name">la prueba del PR #%1$d</string> + <string name="upd_while_ago">hace un tiempo</string> + <string name="upd_just_now">ahora mismo</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d para probar</item> + <item quantity="other">%1$d para probar</item> + <item quantity="many">%1$d para probar</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Cambios desde tu versión · %1$d versión atrás</item> + <item quantity="other">Cambios desde tu versión · %1$d versiones atrás</item> + <item quantity="many">Cambios desde tu versión · %1$d versiones atrás</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Cambios recientes · %1$d versión</item> + <item quantity="other">Cambios recientes · %1$d versiones</item> + <item quantity="many">Cambios recientes · %1$d versiones</item> + </plurals> + <string name="gate_title">Un ajuste de Android por cambiar</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android detiene las apps que inician muchos procesos en segundo plano, y Steam inicia decenas. Hasta que esto cambie, los juegos se cierran sin mostrar ningún error.</string> + <string name="gate_fix_for_me">Solucionarlo por mí</string> + <string name="gate_toggle_steps">Activa “Inhabilitar restricciones de procesos secundarios” y vuelve. Deja activadas las Opciones de desarrollador o el interruptor se desactivará de nuevo.</string> + <string name="gate_open_dev">Abrir Opciones de desarrollador</string> + <string name="gate_no_toggle">Esta versión de Android no tiene un interruptor para ello, así que DroidDeck lo cambia mediante la Depuración inalámbrica. Tarda un minuto y no necesitas una computadora.</string> + <string name="gate_needs_wifi">La Depuración inalámbrica necesita Wi-Fi. Sirve cualquier red; no necesita internet.</string> + <string name="gate_needs_notifications">El código de vinculación aparece en una notificación. Permite las notificaciones de DroidDeck o usa Otras formas.</string> + <string name="gate_allow_notifications">Permitir notificaciones</string> + <string name="gate_step1">Abre Ajustes → Opciones de desarrollador → Depuración inalámbrica y actívala</string> + <string name="gate_step2">Toca “Vincular dispositivo con código de vinculación”</string> + <string name="gate_step3">Escribe el código en la notificación de DroidDeck</string> + <string name="gate_waiting">Esperando la ventana de vinculación…</string> + <string name="gate_code_needed">Ventana encontrada. Ingresa su código en la notificación.</string> + <string name="gate_status">Estado</string> + <string name="gate_polling">Se comprueba cada 2 segundos. Esta página se cierra cuando esté desactivado.</string> + <string name="gate_other_ways">Otras formas</string> + <string name="gate_other_toggle">Depuración inalámbrica, dirección manual, ADB desde una computadora</string> + <string name="gate_other_no_toggle">Dirección manual, ADB desde una computadora, Opciones de desarrollador</string> + <string name="gate_use_wireless_instead">Usar Depuración inalámbrica en su lugar</string> + <string name="gate_some_roms">Algunas ROM agregan el interruptor de todos modos. Busca “procesos secundarios” en Opciones de desarrollador.</string> + <string name="gate_manual_hint">Si la notificación no funciona, ingresa manualmente la dirección y el código de la ventana.</string> + <string name="gate_enter_manually">Ingresar dirección manualmente</string> + <string name="gate_from_computer">Desde una computadora con ADB:</string> + <string name="gate_copy_command">Copiar comando</string> + <string name="gate_choose_display">Elige en qué pantalla abrir los Ajustes de Android.</string> + <string name="gate_main_screen">Pantalla principal</string> + <string name="wadb_finding_port">Vinculado. Buscando el puerto de la Depuración inalámbrica…</string> + <string name="wadb_enter_port">Vinculado. Ingresa el puerto de Ajustes.</string> + <string name="wadb_applying">Dispositivo encontrado. Aplicando el ajuste…</string> + <string name="wadb_apply_failed">No se pudo aplicar automáticamente. Revisa la dirección de abajo y reintenta. %1$s</string> + <string name="wadb_title_wireless">Depuración inalámbrica</string> + <string name="wadb_title_done">Límite de procesos secundarios actualizado</string> + <string name="wadb_title">Cambiar el límite de procesos secundarios</string> + <string name="wadb_lede_compact0">Si falta la opción, vincula mediante la Depuración inalámbrica.</string> + <string name="wadb_lede_compact1">Vinculado. Revisa la dirección IP y el puerto en Depuración inalámbrica.</string> + <string name="wadb_lede_done">El límite de procesos secundarios se actualizó.</string> + <string name="wadb_lede0">Usa el paso 2 si las Opciones de desarrollador no tienen un ajuste de procesos secundarios. Abre Opciones de desarrollador → Depuración inalámbrica → Vincular dispositivo con código de vinculación.</string> + <string name="wadb_lede1">Vinculado. Usa la dirección de abajo o actualízala desde Depuración inalámbrica → Dirección IP y puerto.</string> + <string name="wadb_lede_done_long">El límite de procesos secundarios se actualizó mediante la Depuración inalámbrica.</string> + <string name="wadb_confirmed_on">Android confirmó que el límite está activado.</string> + <string name="wadb_confirmed_off">Android confirmó que el límite está desactivado.</string> + <string name="wadb_pair_group">2 · Vincular Depuración inalámbrica</string> + <string name="wadb_pair_address">Dirección IP y puerto de la ventana de vinculación</string> + <string name="wadb_pin">Código de vinculación (PIN)</string> + <string name="wadb_pin_placeholder">6 dígitos</string> + <string name="wadb_pair">Vincular</string> + <string name="wadb_apply_group">2 · Aplicar mediante Depuración inalámbrica</string> + <string name="wadb_connect_address">Dirección IP y puerto de conexión</string> + <string name="wadb_pair_again">Vincular de nuevo</string> + <string name="wadb_turn_off">Desactivar límite</string> + <string name="wadb_other_ways">Otras formas de cambiarlo</string> + <string name="wadb_dev_try_first">1 · Opciones de desarrollador (pruébalo primero)</string> + <string name="wadb_restrict_on">Desactiva “Inhabilitar restricciones de procesos secundarios”.</string> + <string name="wadb_restrict_off">Activa “Inhabilitar restricciones de procesos secundarios”.</string> + <string name="wadb_computer_last">3 · ADB desde una computadora (último recurso)</string> + <string name="wadb_only_if">Solo si la Depuración inalámbrica no está disponible.</string> + <string name="wadb_computer_group">3 · ADB desde una computadora (último recurso)</string> + <string name="ctrl_osc_hint">Cuándo aparecen los controles táctiles en una sesión</string> + <string name="ctrl_color">Color</string> + <string name="ctrl_color_hint">Tinte de los botones en pantalla</string> + <string name="ctrl_custom">Personalizado</string> + <string name="ctrl_opacity">Opacidad</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Tamaño de botones</string> + <string name="ctrl_size_hint" formatted="false">100% es el tamaño estándar</string> + <string name="ctrl_stick_click">Clic del stick</string> + <string name="ctrl_stick_click_hint">Toca dos veces y mantén un stick para L3 o R3</string> + <string name="ctrl_adaptive">Sticks adaptables</string> + <string name="ctrl_rumble">Vibración en juegos</string> + <string name="ctrl_steam_button">Botón Steam</string> + <string name="ctrl_qam_button">Botón QAM</string> + <string name="ctrl_keyboard_button">Botón de teclado</string> + <string name="ctrl_select_steam">Presiona Select para abrir el menú de Steam</string> + <string name="ctrl_joycon_vr">Joy-Con como controles de RV</string> + <string name="ctrl_joycon_vr_hint">Mientras SteamVR está activo, cada Joy-Con es una mano. Apúntalo al frente y mantén Home o Captura para recentrarlo.</string> + <string name="hand_camera_prompt_body">Sin ningún mando conectado, la cámara del teléfono rastrea tus manos en realidad virtual: pellizca con el pulgar y el índice para hacer clic, cierra la mano para agarrar y gira la palma hacia ti y pellizca para abrir el menú. Con los mandos Joy-Con emparejados, la cámara rastrea su posición mientras los mandos Joy-Con proporcionan la rotación y las entradas de los botones. Las imágenes se procesan en este dispositivo y nunca se guardan ni se envían.</string> + <string name="hand_camera_rear">Cámara trasera</string> + <string name="hand_camera_rear_hint">Recomendada. Suele ser más nítida y amplia.</string> + <string name="hand_camera_front">Cámara frontal</string> + <string name="hand_camera_front_hint">Para cuando la parte trasera del dispositivo no pueda mirar hacia ti.</string> + <string name="hand_camera_allow">Usar cámara</string> + <string name="hand_camera_not_now">Ahora no</string> + <string name="hand_camera_setting">Seguimiento de manos por cámara</string> + <string name="hand_camera_setting_hint">Usa la cámara del teléfono para gestos con las manos desnudas o para posicionar los mandos Joy-Con emparejados en realidad virtual. Los mandos Joy-Con proporcionan la rotación y las pulsaciones de los botones. Se pausa mientras las gafas inteligentes rastrean tus manos o los mandos Joy-Con. Las imágenes se procesan solo en este dispositivo.</string> + <string name="hand_camera_choice">Cámara</string> + <string name="hand_camera_access">Acceso a la cámara</string> + <string name="hand_camera_access_hint">Permite el acceso a la cámara para que el seguimiento de manos pueda empezar.</string> + <string name="hand_camera_access_denied">El acceso a la cámara está desactivado. Actívalo en los ajustes de Android.</string> + <string name="hand_camera_allow_button">Permitir</string> + <string name="hand_camera_open_settings">Abrir ajustes</string> + <string name="hand_camera_placement">Posición de la cámara</string> + <string name="hand_camera_placement_hint">Comprueba que la cámara pueda verte antes de jugar.</string> + <string name="hand_camera_check">Comprobar</string> + <string name="hand_camera_check_title">Posición de la cámara</string> + <string name="hand_camera_how_rear">Coloca el dispositivo de pie a 1,5-2 metros de distancia, a la altura del pecho, con la cámara trasera hacia ti. Luego entra en el encuadre con las manos extendidas.</string> + <string name="hand_camera_how_front">Coloca el dispositivo de pie a 1,5-2 metros de distancia, a la altura del pecho, con la pantalla hacia ti. Luego entra en el encuadre con las manos extendidas.</string> + <string name="hand_camera_starting">Iniciando la cámara…</string> + <string name="hand_camera_stand_up">El dispositivo está tumbado. Ponlo de pie para que la cámara te mire.</string> + <string name="hand_camera_upright">Pon el dispositivo más vertical para que la cámara te mire.</string> + <string name="hand_camera_not_seen">Todavía no te ve. Entra en el encuadre para que se vean tu cabeza y tus hombros.</string> + <string name="hand_camera_move_back">Aléjate un poco.</string> + <string name="hand_camera_move_closer">Acércate un poco más.</string> + <string name="hand_camera_show_hands">Muestra las dos manos donde la cámara pueda verlas.</string> + <string name="hand_camera_good">Se ve bien.</string> + <string name="hand_camera_failed">La cámara no pudo iniciarse. Cierra otras apps que la usen y vuelve a intentarlo.</string> + <string name="hand_camera_switch">Cambiar de cámara</string> + <string name="hand_camera_skip">Omitir</string> + <string name="hand_camera_done">Hecho</string> + <string name="glasses_xreal_network_missing">Esperando la conexión Ethernet por USB de las gafas. Puede que este teléfono no la ofrezca a las apps.</string> + <string name="glasses_xreal_connection_failed">La conexión con las XREAL se interrumpió o devolvió una respuesta no compatible. Reintentando…</string> + <string name="glasses_xreal_experimental">Compatibilidad experimental con las 1S. Usa el modo Follow y desactiva la estabilización en el menú de las gafas. Aún falta probar en el dispositivo las direcciones del seguimiento y los modos de pantalla.</string> + <string name="ctrl_select_steam_hint">En lugar de View/Select.</string> + <string name="setup_animations">Animaciones</string> + <string name="ctrl_adaptive_hint">Los sticks aparecen donde tocas y se ocultan al soltar</string> + <string name="ctrl_layout">Disposición</string> + <string name="ctrl_layout_custom">Posiciones personalizadas guardadas</string> + <string name="ctrl_layout_default">Ajustada a esta pantalla</string> + <string name="ctrl_edit">Editar</string> + <string name="ctrl_reset">Restablecer</string> + <string name="ctrl_mapping">Asignación de botones</string> + <string name="ctrl_mapping_default">Cada botón envía su propia entrada</string> + <string name="ctrl_mapping_count">%1$d de %2$d botones reasignados</string> + <string name="ctrl_configure">Configurar</string> + <string name="ctrl_reset_all">Restablecer control</string> + <string name="ctrl_reset_all_hint">Restaura todos los ajustes del control y la disposición</string> + <string name="ctrl_mapping_lede">Lo que cada botón en pantalla envía al juego. Oculto quita el botón.</string> + <string name="ctrl_onscreen_buttons">Botones en pantalla</string> + <string name="ctrl_defaults">Predeterminados</string> + <string name="ctrl_reset_mapping">Restablecer asignación</string> + <string name="content_android_apps">Apps de Android</string> + <string name="content_apps_count">%1$d apps</string> + <string name="content_no_android_apps">No se encontraron apps de Android que se puedan abrir.</string> + <string name="content_desktop_installed">● Escritorio instalado</string> + <string name="content_desktop_first_open">Se instala al abrirlo por primera vez</string> + <string name="content_available">Disponible para instalar</string> + <string name="content_not_installed">No instalado.</string> + <string name="content_not_installed_suffix">%1$s · no instalado</string> + <string name="content_open_named">Abrir %1$s</string> + <string name="content_games">Juegos</string> + <string name="content_choose_roms">Elige una carpeta de ROMs.</string> + <string name="content_retroarch_roms">Ve a /root/ROMs en RetroArch.</string> + <string name="content_add_roms">Agrega juegos de %1$s a ROMs/%2$s.</string> + <string name="content_install_named">Instalar %1$s</string> + <string name="content_stop_to_install">Detén la sesión para instalar</string> + <string name="content_runtime_required">Runtime necesario</string> + <string name="content_loading_details">Cargando detalles de instalación…</string> + <string name="content_details_unavailable">Los detalles de instalación no están disponibles. Inténtalo más tarde.</string> + <string name="content_needs_runtime">Instala primero el runtime de Linux desde Configuración.</string> + <string name="content_stop_first">Detén la sesión en ejecución para instalar apps de escritorio.</string> + <string name="content_install_into">Instala %1$s en el escritorio de Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Ocultar la quita de Escritorio. Sus archivos permanecen en el runtime de Linux.</string> + <string name="content_rom_gone">Ese juego ya no está en la carpeta de ROMs.</string> + <string name="content_desktop_system">Escritorio · %1$s</string> + <string name="content_launch_in">Iniciar en %1$s</string> + <string name="content_also_in">También en %1$s</string> + <string name="content_page_gone">Esa página ya no existe. Elige una sección a la izquierda.</string> + <string name="content_open_desktop">Abrir escritorio</string> + <string name="content_install_open_desktop">Instalar y abrir escritorio</string> + <string name="desktop_remove_title">Desinstalar escritorio</string> + <string name="desktop_remove_text">Elimina el escritorio y sus apps incluidas. Se conservan los juegos, las apps agregadas, los ajustes y las bibliotecas compartidas.</string> + <string name="desktop_removing">Eliminando el escritorio</string> + <string name="desktop_removed">Escritorio eliminado</string> + <string name="desktop_cleaning_legacy">Eliminando archivos antiguos de LXQt</string> + <string name="desktop_removal_unknown">Actualiza DroidDeck antes de eliminar esta versión del escritorio.</string> + <string name="content_linux_desktop">Escritorio de Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox y tus emuladores</string> + <string name="games_empty">Los juegos que instales en Steam aparecen aquí después de la sesión.</string> + <string name="games_play_steam">Jugar en Steam</string> + <string name="games_play_steamvr">Jugar en SteamVR</string> + <string name="games_launch_settings">Ajustes de inicio</string> + <string name="games_launch">Iniciar</string> + <string name="games_files">Archivos del juego</string> + <string name="games_prefix">Prefijo de Proton</string> + <string name="games_saves_looking">Buscando partidas guardadas…</string> + <string name="games_saves_none">No se encontró ninguna carpeta de guardado por nombre. Exportar toma toda la carpeta de usuario.</string> + <string name="games_saves_folders">%1$d carpetas de guardado</string> + <string name="games_saves_summary">%1$s · %2$d archivos · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Administrar partidas guardadas</string> + <string name="games_saves">Partidas guardadas</string> + <string name="games_import_saves">Importar partidas guardadas…</string> + <string name="games_export_gamehub">Exportar como zip de GameHub…</string> + <string name="games_export_winlator">Exportar como zip de Winlator…</string> + <string name="games_open_save_folder">Abrir carpeta de guardado</string> + <string name="games_never_played">Nunca jugado</string> + <string name="games_runtime_busy_percent">Runtime ocupado · %1$d%%</string> + <string name="games_runtime_busy">Runtime ocupado</string> + <string name="games_runtime_first_play">El runtime se instala al jugar</string> + <string name="games_runtime_update">Actualización del runtime disponible</string> + <string name="games_runtime_ready">● Runtime listo</string> + <string name="games_last_played">Última partida %1$s</string> + <string name="games_internal">Almacenamiento interno</string> + <string name="games_added">Juego agregado</string> + <string name="games_custom">Juego personalizado</string> + <string name="games_store_storage">Almacenamiento de juegos</string> + <string name="gpu_auto_hint">El mejor par para esta GPU, siempre actualizado</string> + <string name="gpu_manual_hint">Elige un par manualmente</string> + <string name="gpu_checking">Buscando controladores…</string> + <string name="gpu_none_listed">Aún no hay controladores listados. Actualiza para buscarlos.</string> + <string name="gpu_hide_other">Ocultar controladores de otras GPU</string> + <string name="gpu_show_other">Mostrar controladores de otras GPU</string> + <string name="gpu_advanced">Avanzado</string> + <string name="gpu_set_with_display">Se define junto con el controlador de pantalla: %1$s incluye ambos.</string> + <string name="gpu_set_with_runtime">Se define junto con el controlador de runtime: %1$s incluye ambos.</string> + <string name="gpu_runtime_hint">Lo usan los juegos y el escritorio.</string> + <string name="gpu_runtime_default">Predeterminado del runtime</string> + <string name="gpu_auto_by_gpu">Auto - elegido según la GPU</string> + <string name="gpu_manage">Descargar, importar o eliminar…</string> + <string name="gpu_in_use_caps">EN USO</string> + <string name="gpu_builtin">Los controladores integrados en DroidDeck</string> + <string name="gpu_matched_pair">Controladores de runtime y de pantalla definidos juntos como un par compatible.</string> + <string name="gpu_recommended_for">Recomendado para esta GPU: %1$s.</string> + <string name="gpu_refresh_hint">Actualiza para buscar controladores para esta GPU.</string> + <string name="gpu_recommended_caps">RECOMENDADO</string> + <string name="gpu_unavailable">No disponible</string> + <string name="load_runtime">Runtime de Linux</string> + <string name="load_runtime_detail">Preparando el runtime de Linux</string> + <string name="load_session">Sesión</string> + <string name="load_session_detail">Iniciando pantalla y audio</string> + <string name="load_steam">Cliente de Steam</string> + <string name="load_steam_detail">Comprobando Steam y sus herramientas de compatibilidad</string> + <string name="load_opening_steam">Abriendo Steam</string> + <string name="load_opening_steam_detail">Esperando el primer fotograma de Steam</string> + <string name="load_desktop">Escritorio</string> + <string name="load_desktop_detail">Preparando el escritorio</string> + <string name="load_opening">Abriendo</string> + <string name="load_opening_detail">Esperando el primer fotograma</string> + <string name="load_starting_steam">Iniciando Steam</string> + <string name="load_ended">La sesión terminó</string> + <string name="load_step">Paso %1$d de %2$d</string> + <string name="load_steam_paused">Steam está en pausa</string> + <string name="deck_tab_grips">Agarres</string> + <string name="deck_tab_left">Pad izquierdo</string> + <string name="deck_tab_right">Pad derecho</string> + <string name="deck_tab_both">Ambos</string> + <string name="deck_tab_gamepad">Control</string> + <string name="deck_surface_stick">Stick</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Cambiar entre stick y trackpad</string> + <string name="deck_more_controls">Más controles de Deck</string> + <string name="deck_panels">PANELES</string> + <string name="deck_close">Cerrar controles de la segunda pantalla</string> + <string name="deck_open_steam_menu">Abrir menú de Steam</string> + <string name="deck_left_upper">Izquierdo · superior</string> + <string name="deck_left_lower">Izquierdo · inferior</string> + <string name="deck_right_upper">Derecho · superior</string> + <string name="deck_right_lower">Derecho · inferior</string> + <string name="deck_click">Clic</string> + <string name="deck_right_trackpad">Trackpad derecho</string> + <string name="deck_left_trackpad">Trackpad izquierdo</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Mostrar teclado</string> + <string name="second_hide_keyboard">Ocultar teclado</string> + <string name="second_terminal">Terminal de Linux</string> + <string name="second_terminal_not_ready">La sesión de Linux aún no está lista para un terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Juegos</string> + <string name="rail_desktop">Escritorio</string> + <string name="rail_store">Tienda</string> + <string name="rail_components">Componentes</string> + <string name="rail_apps">Apps</string> + <string name="rail_setup">Configuración</string> + <string name="rail_updates">Actualizar</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Reanudar %1$s</string> + <string name="roms_text">Aparece como /root/ROMs en cada sesión. El almacenamiento interno está en /root/Storage.</string> + <string name="roms_none">Ninguna carpeta elegida</string> + <string name="roms_applies">Se aplica en la próxima sesión. Las tarjetas SD funcionan.</string> + <string name="roms_choose">Elegir carpeta</string> + <string name="roms_change">Cambiar carpeta</string> + <string name="proton_lede">Instala una versión de Proton ARM64 y luego elígela para cada juego en Steam → Propiedades → Compatibilidad.</string> + <string name="proton_stop_first">Detén la sesión en ejecución para instalar o quitar una herramienta de compatibilidad.</string> + <string name="proton_available">Versiones disponibles</string> + <string name="proton_installed">Instalada %1$s</string> + <string name="proton_queued">Pendiente de una solicitud anterior</string> + <string name="proton_not_installed">No instalada</string> + <string name="proton_update_available">Actualización disponible → %1$s</string> + <string name="proton_remove_older">Quitar versiones antiguas de %1$s</string> + <string name="proton_remove_older_body">Elimina %1$s. Los juegos configurados con estas versiones deberán cambiarse a otro Proton.</string> + <string name="proton_remove_body">Los juegos configurados con esta versión deberán cambiarse a otro Proton.</string> + <string name="proton_install_now">Instalar ahora</string> + <string name="proton_cancel_queued">Cancelar en cola</string> + <string name="pckb_android">Teclado de Android</string> + <string name="pckb_hide">Ocultar ✕</string> + <string name="main_launch_named">Iniciar %1$s</string> + <string name="main_choose_screen">Elige una pantalla. Secundaria: %1$s.</string> + <string name="main_secondary_gone">La pantalla secundaria ya no está disponible.</string> + <string name="main_primary">Pantalla principal</string> + <string name="main_secondary">Pantalla secundaria</string> + <string name="widgets_prev_tab">Pestaña anterior</string> + <string name="widgets_next_tab">Pestaña siguiente</string> + <string name="widgets_on">Activado</string> + <string name="widgets_all_n">Todos %1$d</string> + <string name="widgets_none">Ninguno</string> + <string name="widgets_n_of_m">%1$d de %2$d</string> + <string name="widgets_off">Desactivado</string> + <string name="screen_bottom">Pantalla inferior</string> + <string name="game_env_applies">Se aplica al iniciar el próximo juego. El perfil de un juego tiene prioridad sobre el compartido.</string> + <string name="game_env_other">Otro juego por ID de app…</string> + <string name="game_env_done">Listo</string> + <string name="game_env_default">Predeterminado</string> + <string name="game_env_off">Desactivado</string> + <string name="game_env_change">Cambiar…</string> + <string name="game_env_change_title">Cambiar variable</string> + <string name="game_env_restore_default">Volver al predeterminado</string> + <string name="game_env_eyebrow">Juegos de Proton</string> + <string name="pip_title">Imagen en imagen</string> + <string name="pip_auto">Entrar en PiP automáticamente</string> + <string name="unfolded_controls">Controles con la pantalla desplegada</string> + <string name="unfolded_controls_hint">Desplegado, el juego queda encima de los trackpads y los agarres traseros de Steam Deck. Plegado, el juego ocupa toda la pantalla.</string> + <string name="pip_suspended">Suspendida</string> + <string name="pip_not_ready">Imagen en imagen estará disponible cuando la sesión esté lista.</string> + <string name="pip_permission">Permite imagen en imagen para DroidDeck en los ajustes de Android.</string> + <string name="pip_unavailable">Android no pudo abrir imagen en imagen.</string> + <string name="game_shortcut">Acceso directo</string> + <string name="game_shortcut_add">Agregar a la pantalla de inicio</string> + <string name="game_shortcut_choose">Elegir juego</string> + <string name="game_shortcut_scanning">Buscando juegos instalados…</string> + <string name="game_link_copy">Copiar enlace de inicio</string> + <string name="game_link_copied">Enlace de inicio copiado</string> + <string name="game_shortcut_unsupported">Este launcher no puede agregar accesos directos. Usa Copiar enlace de inicio.</string> + <string name="game_link_invalid">Enlace de inicio de juego no válido.</string> + <string name="game_link_missing">Este juego ya no está en tu biblioteca de DroidDeck.</string> + <string name="game_link_session_busy">Detén la sesión actual antes de iniciar un juego de Steam.</string> + <string name="game_link_failed">No se pudo enviar el juego a Steam. Intenta iniciarlo de nuevo.</string> + <string name="setup_retry_removal">Reintentar eliminación</string> + <string name="runtime_removing">Eliminando</string> + <string name="runtime_removal_incomplete">Eliminación incompleta</string> + <string name="game_file_export">Exportar archivo del juego</string> + <string name="game_file_sync">Sincronizar todos los archivos de juegos con una carpeta</string> + <string name="game_file_stop_sync">Dejar de sincronizar archivos de juegos</string> + <string name="game_file_folder">Elige una carpeta para los archivos de juegos del frontend</string> + <string name="game_file_exported">Archivos de juegos guardados en %1$s</string> + <string name="game_frontend_files">Archivos para frontends</string> + <string name="main_wait_runtime">Espera a que termine la operación del runtime</string> + <string name="main_wait_proton_install">Espera a que termine la instalación de la herramienta de compatibilidad</string> + <string name="main_wait_desktop_install">Espera a que termine la instalación de la app de escritorio</string> + <string name="main_wait_install_game">Espera a que termine la instalación antes de iniciar un juego</string> + <string name="main_saves_close_session">Cierra primero la sesión de Steam para que el juego no guarde encima de lo importado</string> + <string name="main_saves_importing">Importando en %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Se importó %1$d archivo del %2$s en %3$s</item> + <item quantity="other">Se importaron %1$d archivos del %2$s en %3$s</item> + <item quantity="many">Se importaron %1$d archivos del %2$s en %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Se importó %1$d archivo del %2$s en %3$s. Copia de las partidas anteriores en Download/DroidDeck/Saves/backups</item> + <item quantity="other">Se importaron %1$d archivos del %2$s en %3$s. Copia de las partidas anteriores en Download/DroidDeck/Saves/backups</item> + <item quantity="many">Se importaron %1$d archivos del %2$s en %3$s. Copia de las partidas anteriores en Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Elige un zip de partidas guardadas para %1$s</string> + <string name="main_saves_exporting">Exportando %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Se exportó %1$d archivo como %2$s: %3$s</item> + <item quantity="other">Se exportaron %1$d archivos como %2$s: %3$s</item> + <item quantity="many">Se exportaron %1$d archivos como %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Elige dónde guardar %1$s (%2$s)</string> + <string name="main_action_failed">%1$s falló: %2$s</string> + <string name="main_no_logs_yet">Aún no hay registros de sesión: inicia una sesión primero.</string> + <string name="main_no_logs_to_clear">No hay registros de sesión que borrar.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Se borró %1$d carpeta de registros de sesión.</item> + <item quantity="other">Se borraron %1$d carpetas de registros de sesión.</item> + <item quantity="many">Se borraron %1$d carpetas de registros de sesión.</item> + </plurals> + <string name="main_wadb_pair_failed">Falló la vinculación de la Depuración inalámbrica</string> + <string name="main_wadb_command_failed">Falló el comando de la Depuración inalámbrica</string> + <string name="main_wadb_unavailable">La Depuración inalámbrica no está disponible</string> + <string name="main_adb_copied">Comando ADB copiado</string> + <string name="main_pick_roms">Elige la carpeta de ROMs</string> + <string name="main_non_adreno_title">La GPU no es Adreno</string> + <string name="main_non_adreno_text">Turnip es compatible con GPU Adreno. En %1$s, Steam puede mostrar una pantalla negra. Descarga: %2$.0f MB.</string> + <string name="main_install_anyway">Instalar de todos modos</string> + <string name="main_remove_runtime_title">Eliminar el runtime de Linux</string> + <string name="main_remove_runtime_text">Esto elimina el runtime, el cliente de Steam que contiene y todos los juegos instalados en él.</string> + <string name="main_applied">Aplicado: %1$s</string> + <string name="android_app_open_failed_primary">No se pudo abrir %1$s en la pantalla principal</string> + <string name="android_app_open_failed_on">No se pudo abrir %1$s en %2$s</string> + <string name="android_app_open_failed_display">No se pudo abrir %1$s en la pantalla %2$d</string> + <string name="comp_busy_importing">Importando</string> + <string name="comp_busy_swapping">Reemplazando</string> + <string name="comp_busy_restoring">Restaurando</string> + <string name="comp_busy_cancelling">Cancelando</string> + <string name="comp_busy_deleting">Eliminando</string> + <string name="comp_cannot_read">no se puede leer el archivo</string> + <string name="comp_imported">%1$s importado</string> + <string name="comp_swap_cancelled">Se canceló el reemplazo pendiente.</string> + <string name="comp_pick_wcp">Elige un paquete de componentes (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">No se pudo acceder a las Nightlies</string> + <string name="comp_stored">%1$s guardado</string> + <string name="comp_download_failed">La descarga falló: %1$s</string> + <string name="drivers_pick_linux">Elige un controlador de runtime de Linux (zip -Linux o paquete Android + Linux)</string> + <string name="drivers_pick_android">Elige un controlador de pantalla (zip de AdrenoTools o paquete Android + Linux)</string> + <string name="drivers_pick_any">Elige un zip de controlador o un paquete Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Quitando %1$s…</string> + <string name="main_forgetting_named">Olvidando %1$s…</string> + <string name="main_pick_game_storage">Elige la carpeta de almacenamiento de juegos</string> + <string name="main_pick_decky_zip">Elige un ZIP de plugin de Decky</string> + <string name="main_storage_not_usable">No se puede usar: %1$s</string> + <string name="main_running_program">Programa</string> + <string name="main_removing_runtime">Eliminando el runtime de Linux</string> + <string name="main_settings_main_screen">No se pudieron abrir los Ajustes en la pantalla inferior; se abrieron en la pantalla principal.</string> + <string name="main_open_dev_options">Abre Opciones de desarrollador en Ajustes</string> + <string name="upd_unknown_apps_failed">No se pudo abrir el ajuste \\"Instalar apps desconocidas\\" de Android</string> + <string name="upd_couldnt_check">No se pudo comprobar: %1$s</string> + <string name="upd_no_download">Esta versión no tiene descarga para esta copia de DroidDeck</string> + <string name="upd_stop_first">Detén primero la sesión en ejecución y después actualiza</string> + <string name="upd_stage_downloading">Descargando</string> + <string name="upd_stage_installing">Instalando</string> + <string name="upd_stage_confirm">Esperando tu confirmación</string> + <string name="upd_failed">La actualización falló</string> + <string name="upd_not_offered">Android no ofreció instalar la actualización</string> + <string name="decky_install_failed">Falló la instalación de Decky: %1$s</string> + <string name="decky_plugin_starting">Iniciando la importación del plugin…</string> + <string name="decky_plugin_failed">Falló la importación del plugin: %1$s</string> + <string name="decky_plugin_installed">Plugin instalado. Reinicia Steam para cargarlo.</string> + <string name="drivers_not_checked">Aún sin comprobar - toca actualizar para buscar controladores nuevos</string> + <string name="drivers_bundle_sets_display">Android + Linux: define también el controlador de pantalla</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: define también el controlador de runtime</string> + <string name="drivers_runtime_builtin">el Turnip integrado en el runtime</string> + <string name="drivers_system_vulkan">Vulkan del sistema: no hay versión incluida para esta GPU</string> + <string name="drivers_bundled">%1$s (incluido)</string> + <string name="drivers_manual">Manual</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Por ahora solo se ha publicado una de las mitades</string> + <string name="drivers_pair_size">%1$.0f MB para ambos</string> + <string name="drivers_none_to_set">No hay controladores que definir: %1$s</string> + <string name="drivers_checking_latest">Buscando los controladores más recientes…</string> + <string name="drivers_up_to_date_check_failed">Al día (no se pudo comprobar: %1$s)</string> + <string name="drivers_recommended_unpublished">Los controladores recomendados no están publicados ahora mismo</string> + <string name="drivers_downloading_pair">Descargando %1$s %2$s…</string> + <string name="drivers_updated_to">Actualizado a %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Actualizado a %1$s %2$s. El controlador de pantalla se aplica al reiniciar DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Las actualizaciones de controladores esperan a que termine la sesión.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s se descargará cuando desactives los datos celulares y el ahorro de batería.</string> + <string name="drivers_skipping_bad">%1$s %2$s no inició una sesión aquí, así que Auto se queda con los controladores que sí funcionaron.</string> + <string name="drivers_rolled_back">%1$s no inició una sesión dos veces, así que Auto volvió a los controladores que funcionaban.</string> + <string name="drivers_switched_to">Cambiado a %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Cambiado a %1$s %2$s. El controlador de pantalla se aplica al reiniciar DroidDeck.</string> + <string name="drivers_using">Usando %1$s %2$s.</string> + <string name="drivers_using_restart">Usando %1$s %2$s. El controlador de pantalla se aplica al reiniciar DroidDeck.</string> + <string name="drivers_using_quest">Usando el controlador de pantalla Quest incluido y el valor predeterminado del runtime.</string> + <string name="drivers_using_quest_restart">Usando el controlador de pantalla Quest incluido y el valor predeterminado del runtime. El controlador de pantalla se aplica tras reiniciar DroidDeck.</string> + <string name="drivers_not_a_driver">No es un zip de controlador: no es un controlador de AdrenoTools, ni un Turnip -Linux, ni un paquete Android + Linux</string> + <string name="drivers_import_failed">La importación falló: %1$s</string> + <string name="drivers_imported_unnamed">Controlador importado</string> + <string name="drivers_using_bundle">Usando %1$s como controlador de runtime y de pantalla.</string> + <string name="drivers_using_bundle_restart">Usando %1$s como controlador de runtime y de pantalla. El controlador de pantalla se aplica al reiniciar DroidDeck.</string> + <string name="drivers_deleted_bundle">%1$s eliminado (ambos controladores)</string> + <string name="drivers_deleted">%1$s eliminado</string> + <string name="drivers_release_status">Últimas: %1$s · comprobado %2$s</string> + <string name="drivers_release_status_failed">Últimas: %1$s · sin acceso a %2$s · comprobado %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">hace %1$d min</item> + <item quantity="other">hace %1$d min</item> + <item quantity="many">hace %1$d min</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">hace %1$d h</item> + <item quantity="other">hace %1$d h</item> + <item quantity="many">hace %1$d h</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">hace %1$d día</item> + <item quantity="other">hace %1$d días</item> + <item quantity="many">hace %1$d días</item> + </plurals> + <string name="drivers_checking_sources">Comprobando Banners-Turnip, WinNative y DroidDeck…</string> + <string name="drivers_check_failed">falló la comprobación</string> + <string name="drivers_installed_pick_either">%1$s instalado - elígelo en cualquiera de las listas para definir ambos controladores</string> + <string name="drivers_installed_pick">%1$s instalado - elígelo en el menú</string> + <string name="session_wait_removal">Espera a que termine la eliminación del runtime</string> + <string name="session_title_game">Juego</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">directo</string> + <string name="session_swap_failed">El reemplazo falló: %1$s</string> + <string name="session_profile_save_failed">No se pudo guardar el perfil: %1$s</string> + <string name="session_desktop_paused">El escritorio está en pausa</string> + <string name="session_named_paused">%1$s está en pausa</string> + <string name="session_program_paused">El programa está en pausa</string> + <string name="session_starting_desktop">Iniciando el escritorio</string> + <string name="session_starting_named">Iniciando %1$s</string> + <string name="session_starting_program">Iniciando el programa</string> + <string name="session_no_logs">No hay registros de esta sesión.</string> + <string name="session_logs_archive_failed">No se pudo crear el archivo de registros de la sesión.</string> + <string name="session_logs_share_failed">No se pudieron compartir los registros de la sesión.</string> + <string name="session_starting_session">Iniciando la sesión…</string> + <string name="session_runtime_downloading">descargando el runtime de Linux</string> + <string name="session_runtime_downloading_mb">descargando el runtime de Linux · %1$d de %2$d MB</string> + <string name="session_runtime_checking">comprobando el runtime de Linux</string> + <string name="session_runtime_unpacking">descomprimiendo el runtime de Linux</string> + <string name="session_desktop_downloading">descargando el escritorio</string> + <string name="session_desktop_downloading_mb">descargando el escritorio · %1$d de %2$d MB</string> + <string name="session_desktop_checking">comprobando el escritorio</string> + <string name="session_desktop_unpacking">descomprimiendo el escritorio</string> + <string name="session_proton_downloading">descargando Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">descargando Proton Experimental (ARM64) · %1$d de %2$d MB</string> + <string name="session_proton_checking">comprobando Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">descomprimiendo Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">No se pudo acceder al catálogo del runtime. Revisa la conexión y vuelve a presionar Jugar.</string> + <string name="session_runtime_install_failed">El runtime de Linux no se instaló. Revisa el runtime en Configuración y vuelve a presionar Jugar.</string> + <string name="session_desktop_install_failed">El escritorio no se instaló (%1$s). Revisa la conexión y presiona Escritorio de nuevo.</string> + <string name="session_ended_named">%1$s se detuvo inesperadamente. Comparte los registros en un informe de error o inténtalo de nuevo.</string> + <string name="session_ended_program">El programa se detuvo inesperadamente. Comparte los registros en un informe de error o inténtalo de nuevo.</string> + <string name="session_ended_desktop">El escritorio se detuvo inesperadamente. Comparte los registros en un informe de error o inténtalo de nuevo.</string> + <string name="session_ended_detail">Código de salida %1$d · %2$s</string> + <string name="session_ended_no_log">sin registro</string> + <plurals name="session_hint_enosys"> + <item quantity="one">El registro muestra %1$d error \\"Function not implemented\\": la aceleración seccomp de proot hace fallar un proceso auxiliar en este dispositivo. Prueba %2$s → \\"%3$s\\" (o \\"%4$s\\") y vuelve a iniciar.</item> + <item quantity="other">El registro muestra %1$d errores \\"Function not implemented\\": la aceleración seccomp de proot hace fallar un proceso auxiliar en este dispositivo. Prueba %2$s → \\"%3$s\\" (o \\"%4$s\\") y vuelve a iniciar.</item> + <item quantity="many">El registro muestra %1$d errores \\"Function not implemented\\": la aceleración seccomp de proot hace fallar un proceso auxiliar en este dispositivo. Prueba %2$s → \\"%3$s\\" (o \\"%4$s\\") y vuelve a iniciar.</item> + </plurals> + <string name="mode_decky_plugins">Plugins</string> + <string name="mode_decky_plugins_hint">Instala un ZIP de plugin para la próxima sesión de Steam.</string> + <string name="mode_decky_plugin_downloading">Descargando…</string> + <string name="mode_decky_plugin_install_zip">Instalar desde ZIP</string> + <string name="store_cat_games">Juegos</string> + <string name="store_cat_audio_video">Audio y video</string> + <string name="store_cat_graphics">Gráficos</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Oficina</string> + <string name="store_cat_developer">Desarrollo</string> + <string name="store_cat_education">Educación</string> + <string name="store_cat_science">Ciencia</string> + <string name="store_cat_system">Sistema</string> + <string name="store_cat_utilities">Utilidades</string> + <string name="store_section_popular">Populares</string> + <string name="store_section_trending">En tendencia</string> + <string name="store_section_new">Nuevas</string> + <string name="store_section_updated">Actualizadas</string> + <string name="store_section_loading">cargando…</string> + <string name="store_flatpak_setup">Configuración de Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">No se pudieron buscar actualizaciones en Flathub</string> + <string name="content_rom_installed">instalado</string> + <string name="content_rom_folder">carpeta</string> + <string name="theme_graphite">Grafito</string> + <string name="theme_graphite_detail">Superficies grafito, con el azul del orbe del logotipo para todo lo seleccionado, enfocado o presionado.</string> + <string name="theme_paper">Papel sobre negro</string> + <string name="theme_paper_detail">El blanco es el color principal; el azul del icono señala líneas, anillos y puntos.</string> + <string name="theme_icon_blue">Azul del icono</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Insert</string> + <string name="pckb_key_del">Supr</string> + <string name="pckb_key_home">Inicio</string> + <string name="pckb_key_end">Fin</string> + <string name="pckb_key_pgup">RePág</string> + <string name="pckb_key_pgdn">AvPág</string> + <string name="pckb_key_backspace">⌫ Retroceso</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Bloq May</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Mayús</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Espacio</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Instala primero el runtime</string> + <string name="game_sync_err_steam_library">La biblioteca de Steam no está disponible</string> + <string name="game_sync_err_previous_sd">La biblioteca anterior de la SD no está disponible</string> + <string name="game_sync_err_game_storage">El almacenamiento de juegos no está disponible</string> + <string name="game_sync_err_added_games">La carpeta de juegos agregados no está disponible</string> + <string name="game_sync_err_manifests">Los manifiestos de Steam no están disponibles</string> + <string name="content_system_many">Varios sistemas</string> + <string name="fm_drive_internal">Interno</string> + <string name="fm_drive_linux">Sistema Linux</string> + <string name="fm_drive_sd">Tarjeta SD</string> + <string name="fm_drive_storage">Almacenamiento</string> + <string name="fm_select">Seleccionar</string> + <string name="fm_properties">Propiedades</string> + <string name="fm_favorite_add">Agregar a Favoritos</string> + <string name="fm_favorite_remove">Quitar de Favoritos</string> + <string name="fm_rename">Renombrar</string> + <string name="fm_copy">Copiar</string> + <string name="fm_cut">Cortar</string> + <string name="fm_actions">Acciones</string> + <string name="fm_favorites">Favoritos</string> + <string name="fm_pin_current">Fijar carpeta actual</string> + <string name="fm_no_favorites">Aún no hay favoritos - fija una carpeta con su menú ⋮ para volver aquí rápidamente.</string> + <string name="fm_unpin_favorite">Quitar de favoritos</string> + <string name="fm_size_zero">0 bytes</string> + <string name="fm_unit_bytes">bytes</string> + <string name="fm_prop_location">Ubicación</string> + <string name="fm_prop_type">Tipo</string> + <string name="fm_prop_size">Tamaño</string> + <string name="fm_prop_modified">Modificado</string> + <string name="fm_type_folder">Carpeta</string> + <string name="fm_type_file">Archivo</string> + <string name="fm_type_ext_file">Archivo %1$s</string> + <string name="fm_read_only">Solo lectura</string> + <string name="fm_read_only_hint">Impide que los juegos (y Wine) sobrescriban o eliminen este archivo.</string> + <string name="fm_read_only_failed">No se pudo cambiar Solo lectura</string> + <string name="fm_hidden">Oculto</string> + <string name="fm_hidden_unsupported">Este almacenamiento no admite el atributo oculto.</string> + <string name="fm_hidden_hint">Marca el archivo como oculto en Windows (el atributo oculto de Wine).</string> + <string name="fm_hidden_failed">No se pudo cambiar Oculto en este almacenamiento</string> + <string name="fm_done">Hecho</string> + <string name="fm_op_deleting">Eliminando...</string> + <string name="fm_delete_failed">No se pudo eliminar</string> + <string name="fm_op_moving">Moviendo...</string> + <string name="fm_op_copying">Copiando...</string> + <string name="fm_op_moving_item">Moviendo - %1$s</string> + <string name="fm_op_copying_item">Copiando - %1$s</string> + <string name="fm_op_moving_batch">Moviendo %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Copiando %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d hechos, %2$d con error</string> + <string name="fm_paste_skipped">%1$d hechos, %2$d omitidos</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d elemento movido</item> + <item quantity="other">%1$d elementos movidos</item> + <item quantity="many">%1$d elementos movidos</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d elemento copiado</item> + <item quantity="other">%1$d elementos copiados</item> + <item quantity="many">%1$d elementos copiados</item> + </plurals> + <string name="fm_already_exists">\\"%1$s\\" ya existe</string> + <string name="fm_op_renaming">Renombrando...</string> + <string name="fm_rename_failed">No se pudo renombrar</string> + <string name="fm_op_creating_folder">Creando carpeta...</string> + <string name="fm_create_folder_failed">No se pudo crear la carpeta</string> + <string name="fm_new_folder">Nueva carpeta</string> + <string name="fm_folder_name">Nombre de la carpeta</string> + <string name="fm_create">Crear</string> + <string name="fm_new_name">Nuevo nombre</string> + <string name="fm_delete_title">¿Eliminar?</string> + <string name="fm_delete_text">¿Eliminar \\"%1$s\\" de forma permanente?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">¿Eliminar %1$d elemento?</item> + <item quantity="other">¿Eliminar %1$d elementos?</item> + <item quantity="many">¿Eliminar %1$d elementos?</item> + </plurals> + <string name="fm_cannot_undo">Esta acción no se puede deshacer.</string> + <plurals name="fm_and_more"> + <item quantity="one">…y %1$d más</item> + <item quantity="other">…y %1$d más</item> + <item quantity="many">…y %1$d más</item> + </plurals> + <string name="fm_op_deleting_batch">Eliminando %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">No se pudo eliminar %1$d</item> + <item quantity="other">No se pudieron eliminar %1$d</item> + <item quantity="many">No se pudieron eliminar %1$d</item> + </plurals> + <string name="fm_conflict_merge_hint">Combinar agrega y reemplaza archivos dentro de la carpeta existente.</string> + <string name="fm_conflict_overwrite_hint">Sobrescribir reemplaza el archivo existente.</string> + <string name="fm_conflict_apply_all">Aplicar a todos los conflictos</string> + <string name="fm_conflict_merge">Combinar</string> + <string name="fm_conflict_overwrite">Sobrescribir</string> + <string name="fm_conflict_keep_both">Conservar ambos</string> + <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_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> + <string name="fm_search">Buscar</string> + <string name="fm_sort">Ordenar</string> + <string name="fm_sort_name">Nombre</string> + <string name="fm_sort_date">Fecha de modificación</string> + <string name="fm_rows_comfortable">Filas amplias</string> + <string name="fm_rows_compact">Filas compactas</string> + <string name="fm_hide_hidden">Ocultar archivos ocultos</string> + <string name="fm_show_hidden">Mostrar archivos ocultos</string> + <string name="fm_hide_favorites">Ocultar favoritos</string> + <string name="fm_show_favorites">Mostrar favoritos</string> + <string name="fm_filter_folder">Filtrar esta carpeta</string> + <string name="fm_free_space">%1$s libres</string> + <string name="fm_selected_count">%1$d seleccionados</string> + <string name="fm_select_none">Ninguno</string> + <string name="fm_select_all">Todo</string> + <string name="fm_paste">Pegar</string> + <plurals name="fm_items"> + <item quantity="one">%1$d elemento</item> + <item quantity="other">%1$d elementos</item> + <item quantity="many">%1$d elementos</item> + </plurals> + <string name="fm_paste_here">Pegar %1$s aquí</string> + <string name="fm_paste_move_here">Pegar %1$s aquí (mover)</string> + <string name="fm_rail_title">Archivos</string> + <string name="fm_rail_storage">ALMACENAMIENTO</string> + <string name="fm_rail_quick">ATAJOS</string> + <string name="fm_rail_favorites">FAVORITOS</string> + <string name="fm_rail_downloads">Descargas</string> + <string name="fm_rail_downloads_short">Descargas</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Registros de sesión</string> + <string name="fm_rail_pictures">Imágenes</string> + <string name="fm_favorite_added">Se agregó \"%1$s\" a Favoritos</string> + <string name="fm_favorite_removed">Se quitó \\"%1$s\\" de Favoritos</string> + <string name="fm_empty_directory">Carpeta vacía</string> + <string name="fm_up_one_level">Subir un nivel</string> + <string name="fm_choose_folder">Elige una carpeta</string> + <string name="fm_choose_file">Elige un archivo</string> + <string name="ctrl_tint_steam_blue">Azul Steam</string> + <string name="ctrl_tint_sky">Celeste</string> + <string name="ctrl_tint_white">Blanco</string> + <string name="ctrl_tint_violet">Violeta</string> + <string name="ctrl_tint_green">Verde</string> + <string name="ctrl_tint_amber">Ámbar</string> + <string name="ctrl_tint_red">Rojo</string> + <string name="ctrl_tint_pink">Rosa</string> + <string name="ctrl_button_a">Botón A</string> + <string name="ctrl_button_b">Botón B</string> + <string name="ctrl_button_x">Botón X</string> + <string name="ctrl_button_y">Botón Y</string> + <string name="ctrl_button_lb">Botón superior izquierdo</string> + <string name="ctrl_button_rb">Botón superior derecho</string> + <string name="ctrl_button_lt">Gatillo izquierdo</string> + <string name="ctrl_button_rt">Gatillo derecho</string> + <string name="ctrl_button_view">Botón Vista</string> + <string name="ctrl_button_menu">Botón Menú</string> + <string name="ctrl_target_view">Vista</string> + <string name="ctrl_target_menu">Menú</string> + <string name="ctrl_target_up">Cruceta arriba</string> + <string name="ctrl_target_down">Cruceta abajo</string> + <string name="ctrl_target_left">Cruceta izquierda</string> + <string name="ctrl_target_right">Cruceta derecha</string> + <string name="ctrl_target_hidden">Oculto</string> + <string name="ctrl_editor_drag">Arrastra para mover</string> + <string name="ctrl_editor_snap">Ajustar</string> + <string name="ctrl_editor_save">Guardar</string> + <string name="second_mode_none">Nada</string> + <string name="second_mode_keyboard_trackpad">Teclado + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Agarres de Deck + trackpads</string> + <string name="rtinst_removing">Eliminando el runtime de Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Eliminando el runtime de Linux · %1$d elemento</item> + <item quantity="other">Eliminando el runtime de Linux · %1$d elementos</item> + <item quantity="many">Eliminando el runtime de Linux · %1$d elementos</item> + </plurals> + <string name="rtinst_removed">Runtime de Linux eliminado</string> + <string name="rtinst_removal_failed">No se pudo terminar de eliminar el runtime de Linux. Usa Reintentar eliminación en Configuración.</string> + <string name="rtinst_removing_leftovers">Eliminando restos del runtime</string> + <string name="rtinst_downloading">Descargando</string> + <string name="rtinst_verifying">Verificando</string> + <string name="rtinst_extracting">Extrayendo</string> + <string name="rtinst_channel_description">Se muestra mientras se instala o elimina el runtime de Linux</string> + <string name="rtinst_title_installing">Instalando el runtime de Linux</string> + <string name="rtinst_title_removing">Eliminando el runtime de Linux</string> + <string name="deskpkg_runtime_missing">El runtime de Linux no está instalado</string> + <string name="deskpkg_no_checksum">El catálogo no tiene suma de verificación para %1$s</string> + <string name="deskpkg_checksum_mismatch">La suma de verificación no coincide - no se cambió nada</string> + <string name="deskpkg_installing">Instalando %1$s</string> + <string name="deskpkg_place_failed">No se pudo colocar el AppImage</string> + <string name="deskpkg_extract_failed">La extracción falló</string> + <string name="deskpkg_install_failed">La instalación falló</string> + <string name="flatpakmgr_setup_failed">La configuración de Flatpak falló (salida %1$d)</string> + <string name="flatpakmgr_setup_unfinished">La configuración de Flatpak no terminó</string> + <string name="flatpakmgr_busy">Hay otra tarea de la tienda en curso</string> + <string name="flatpakmgr_not_ready">Configura Flatpak primero</string> + <string name="flatpakmgr_starting">Iniciando</string> + <string name="flatpakmgr_exit_status">Flatpak terminó con el código %1$d</string> + <string name="flatpakmgr_installing">Instalando %1$s</string> + <string name="flatpakmgr_updating">Actualizando %1$s</string> + <string name="flatpakmgr_removing">Quitando %1$s</string> + <string name="flatpakmgr_installing_step">Instalando %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Actualizando %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Quitando %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">traducciones</string> + <string name="flatpakmgr_ref_graphics_drivers">controladores gráficos</string> + <string name="flatpakmgr_ref_media_codecs">códecs multimedia</string> + <string name="flatpakmgr_ref_runtime">runtime de %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">runtime de %1$s %2$s</string> + <string name="appimg_too_small">El archivo es demasiado pequeño para ser un AppImage</string> + <string name="appimg_unreadable">No se puede leer el archivo: %1$s</string> + <string name="appimg_not_linux">Esto no es un AppImage (no es un programa de Linux)</string> + <string name="appimg_wrong_arch">Este AppImage no está hecho ni para ARM64 (aarch64) ni para PC x86</string> + <string name="appimg_not_appimage">Es un programa de Linux, pero no un AppImage</string> + <string name="appimg_wrong_type">Solo se pueden importar AppImages de tipo 2 (este es de tipo %1$d)</string> + <string name="appimg_no_space_import">No hay espacio libre suficiente: importarlo necesita unos %1$s</string> + <string name="appimg_no_space_update">No hay espacio libre suficiente: actualizarlo necesita unos %1$s</string> + <string name="appimg_import_failed">La importación falló</string> + <string name="appimg_gone">Ese AppImage ya no está</string> + <string name="appimg_update_failed">La actualización falló</string> + <string name="appimg_extracting">Extrayendo %1$s</string> + <string name="appimg_extract_failed">No se pudo extraer el AppImage</string> + <string name="appimg_extract_failed_detail">No se pudo extraer el AppImage: %1$s</string> + <string name="deckymgr_stop_session_loader">Detén la sesión activa antes de instalar Decky Loader</string> + <string name="deckymgr_download_failed">Falló la descarga de Decky Loader</string> + <string name="deckymgr_size_mismatch">El tamaño de Decky Loader no coincide con los metadatos de la versión</string> + <string name="deckymgr_checksum_download_failed">No se pudo descargar la suma de verificación de la versión</string> + <string name="deckymgr_checksum_missing">Falta la suma de verificación de la versión</string> + <string name="deckymgr_checksum_invalid">La suma de verificación de la versión no es válida</string> + <string name="deckymgr_checksum_mismatch">La suma de verificación de Decky Loader no coincide</string> + <string name="deckymgr_not_elf">El archivo de la versión no es un ejecutable de Linux de 64 bits compatible</string> + <string name="deckymgr_session_started_loader">Se inició una sesión durante la descarga; detenla antes de instalar Decky Loader</string> + <string name="deckymgr_loader_not_executable">No se pudo marcar PluginLoader como ejecutable</string> + <string name="deckymgr_cef_failed">No se pudo activar la depuración remota de CEF de Steam</string> + <string name="deckymgr_stage_failed">No se pudo preparar PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">No se pudo conservar el PluginLoader existente</string> + <string name="deckymgr_loader_activate_failed">No se pudo activar el nuevo PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Detén la sesión activa antes de instalar un plugin</string> + <string name="deckymgr_loader_required">Instala Decky Loader antes de importar un plugin</string> + <string name="deckymgr_zip_unreadable">No se pudo leer el archivo ZIP seleccionado</string> + <string name="deckymgr_plugins_dir_failed">No se pudo crear la carpeta de plugins de Decky</string> + <string name="deckymgr_extracting_zip">Extrayendo el ZIP del plugin</string> + <string name="deckymgr_zip_one_folder">El ZIP del plugin debe contener una sola carpeta de plugin en el nivel superior</string> + <string name="deckymgr_zip_missing_files">Al ZIP del plugin le falta plugin.json, package.json o dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Falta el nombre del plugin</string> + <string name="deckymgr_session_started_plugin">Se inició una sesión durante la instalación; detenla antes de instalar un plugin</string> + <string name="deckymgr_plugin_installed">Plugin instalado · reinicia Steam para cargarlo</string> + <string name="deckymgr_plugin_install_failed">Falló la instalación del ZIP del plugin</string> + <string name="deckymgr_zip_too_many">El ZIP del plugin contiene demasiadas entradas</string> + <string name="deckymgr_zip_invalid_path">El ZIP del plugin contiene una ruta no válida</string> + <string name="deckymgr_zip_duplicate_paths">El ZIP del plugin contiene rutas duplicadas</string> + <string name="deckymgr_zip_unsafe_path">El ZIP del plugin contiene una ruta no segura</string> + <string name="deckymgr_folder_failed">No se pudo crear la carpeta del plugin</string> + <string name="deckymgr_zip_too_large">El ZIP del plugin supera el límite de 1 GiB al descomprimirse</string> + <string name="deckymgr_bundled_not_executable">No se pudo marcar como ejecutable el binario incluido del plugin</string> + <string name="deckymgr_remote_entry_invalid">Entrada remote_binary no válida</string> + <string name="deckymgr_remote_name_invalid">Nombre de binario remoto no válido</string> + <string name="deckymgr_remote_url_https">La URL del binario remoto debe usar HTTPS</string> + <string name="deckymgr_remote_hash_invalid">El binario remoto %1$s tiene un hash SHA-256 no válido</string> + <string name="deckymgr_bin_dir_failed">No se pudo crear la carpeta bin del plugin</string> + <string name="deckymgr_downloading_binary">Descargando el binario del plugin · %1$s</string> + <string name="deckymgr_binary_download_failed">No se pudo descargar el binario del plugin %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">La suma de verificación del binario del plugin no coincide · %1$s</string> + <string name="deckymgr_binary_not_executable">No se pudo marcar como ejecutable el binario del plugin · %1$s</string> + <string name="deckymgr_binary_replace_failed">No se pudo reemplazar el binario del plugin · %1$s</string> + <string name="deckymgr_binary_install_failed">No se pudo instalar el binario del plugin · %1$s</string> + <string name="deckymgr_folder_taken">La carpeta del plugin pertenece a otro plugin</string> + <string name="deckymgr_preserve_failed">No se pudo conservar el plugin existente</string> + <string name="deckymgr_activate_failed">No se pudo activar el plugin importado</string> + <string name="deckymgr_settings_failed">No se pudieron actualizar los ajustes de plugins de Decky</string> + <string name="deckymgr_restore_failed">No se pudo restaurar el plugin existente</string> + <string name="adbfix_save_failed">No se pudo guardar la identidad de la Depuración inalámbrica</string> + <string name="adbfix_command_failed">Falló el comando ADB (%1$d)</string> + <string name="adbfix_not_confirmed">Android no confirmó el cambio del límite de procesos secundarios: %1$s</string> + <string name="adbfix_no_pairing">No hay ninguna vinculación de Depuración inalámbrica guardada</string> + <string name="adbfix_enter_address">Ingresa la dirección IP y el puerto actuales de la Depuración inalámbrica</string> + <string name="adbpair_timed_out">Se agotó el tiempo de espera de la ventana de vinculación. Inténtalo de nuevo desde DroidDeck.</string> + <string name="adbpair_discovery_failed_code">No se pudo buscar la ventana de vinculación (%1$d). Comprueba que el Wi-Fi esté activado.</string> + <string name="adbpair_discovery_failed">No se pudo buscar la ventana de vinculación: %1$s</string> + <string name="adbpair_six_digits">Ingresa los 6 dígitos del código</string> + <string name="adbpair_pairing">Vinculando…</string> + <string name="adbpair_code_rejected">Ese código no funcionó. Vuelve a abrir la ventana de vinculación e ingresa su nuevo código.</string> + <string name="adbpair_connecting">Vinculado. Conectando…</string> + <string name="adbpair_port_not_found">Vinculado, pero no se encontró el puerto de la Depuración inalámbrica. Deja activada la Depuración inalámbrica e inténtalo de nuevo.</string> + <string name="adbpair_applying">Aplicando el ajuste…</string> + <string name="adbpair_command_failed">Falló el comando de la Depuración inalámbrica</string> + <string name="adbpair_channel_name">Configuración de la Depuración inalámbrica</string> + <string name="adbpair_channel_description">Pide el código de vinculación de la Depuración inalámbrica mientras Ajustes está abierto</string> + <string name="adbpair_title_pair">Vincular Depuración inalámbrica</string> + <string name="adbpair_waiting_text">Activa la Depuración inalámbrica y toca “Vincular dispositivo con código de vinculación”.</string> + <string name="adbpair_waiting_long">Activa la Depuración inalámbrica y toca “Vincular dispositivo con código de vinculación”. Quédate en Ajustes: el código se ingresa en esta notificación.</string> + <string name="adbpair_code_label">Código de vinculación de 6 dígitos</string> + <string name="adbpair_code_hint">Toca Ingresar código y escribe los 6 dígitos que muestra Ajustes.</string> + <string name="adbpair_title_code">Ingresa el código de vinculación Wi-Fi</string> + <string name="adbpair_title_retry">Vuelve a probar el código</string> + <string name="adbpair_enter_code">Ingresar código</string> + <string name="adbpair_title_working">Preparando Steam</string> + <string name="adbpair_title_done">Steam está listo</string> + <string name="adbpair_done_text">Toca para volver a DroidDeck. Ya puedes desactivar la Depuración inalámbrica.</string> + <string name="adbpair_title_failed">Se detuvo la configuración de la Depuración inalámbrica</string> + <string name="selfinst_download_failed">Error en la descarga</string> + <string name="selfinst_size_mismatch">El tamaño de la descarga no coincidía con el APK publicado y se descartó - inténtalo de nuevo</string> + <string name="selfinst_checksum_mismatch">La descarga no coincidía con su suma de verificación y se descartó - inténtalo de nuevo</string> + <string name="selfinst_wrong_package">La actualización es para el paquete de Android %1$s, no %2$s</string> + <string name="selfinst_metadata_signer">Los metadatos de la actualización no indican la clave de firma de publicación de DroidDeck</string> + <string name="selfinst_unreadable">Android no pudo leer el APK descargado</string> + <string name="selfinst_apk_wrong_package">El APK descargado es para %1$s, no %2$s</string> + <string name="selfinst_version_mismatch">El APK descargado indica versionCode %1$d, no el %2$d publicado</string> + <string name="selfinst_downgrade">Android no instalará versionCode %1$d sobre el %2$d instalado</string> + <string name="selfinst_no_signing">El APK descargado no tiene información de firma</string> + <string name="selfinst_wrong_signer">El APK descargado no está firmado con la clave de publicación de DroidDeck</string> + <string name="appupd_http">El catálogo de actualizaciones respondió HTTP %1$d</string> + <string name="loadstate_starting">Iniciando la sesión…</string> + <string name="loadstate_elapsed">%1$d:%2$02d transcurridos · sigue en marcha</string> + <string name="loadstate_steam_update">Descargando la actualización del cliente de Steam · %1$d%%</string> + <string name="loadstate_steam_client">Descargando el cliente de Steam · %1$s</string> + <string name="pextra_busy">Ya se está instalando una herramienta de compatibilidad</string> + <string name="pextra_stop_session">Detén la sesión activa antes de instalar herramientas de compatibilidad</string> + <string name="pextra_no_release">No se encontró una versión ARM64 de %1$s</string> + <string name="pextra_no_space">Para instalar %1$s se necesitan al menos 4 GB libres más el tamaño de la descarga</string> + <string name="pextra_downloading">Descargando %1$s %2$s</string> + <string name="pextra_retrying">Reintentando la descarga · intento %1$d de %2$d</string> + <string name="pextra_interrupted">Descarga interrumpida</string> + <string name="pextra_download_failed">La descarga falló; se conserva el archivo parcial para poder reanudarla</string> + <string name="pextra_too_big">La descarga superó el tamaño de la versión y se eliminó</string> + <string name="pextra_incomplete">La descarga quedó incompleta; se conserva el archivo parcial para reanudarla</string> + <string name="pextra_verifying">Verificando la descarga</string> + <string name="pextra_checksum_unreadable">No se pudo leer la suma de verificación de la versión; inténtalo de nuevo</string> + <string name="pextra_no_checksum">%1$s %2$s no publica suma de verificación; no se instaló nada</string> + <string name="pextra_checksum_mismatch">La suma de verificación no coincide; se eliminó la descarga</string> + <string name="pextra_session_started">Se inició una sesión durante la descarga; detenla antes de instalar herramientas de compatibilidad</string> + <string name="pextra_installing">Instalando %1$s</string> + <string name="pextra_install_failed">Falló la instalación de %1$s (salida %2$d)</string> + <string name="pextra_could_not_install">No se pudo instalar %1$s</string> + <string name="esync_fetching">Descargando el paquete droiddeck-esync</string> + <string name="cmgr_fex_linux_helpers">con auxiliares de Linux</string> + <string name="cmgr_fex_dlls_only">Solo DLL</string> + <string name="cmgr_original_proton_updated">Original (Proton se actualizó desde el último reemplazo)</string> + <string name="cmgr_changed_outside">Cambiado fuera de Componentes</string> + <string name="cmgr_not_present">no presente</string> + <string name="cmgr_original_version">Original %1$s</string> + <string name="cmgr_original_from">Original de %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s entrará en %3$s cuando se cierre el juego que lo está usando.</string> + <string name="cmgr_swap_done">%1$s %2$s ya está en %3$s. Se aplica la próxima vez que se inicie un juego.</string> + <string name="cmgr_original_missing">Ese paquete original no está guardado</string> + <string name="cmgr_restore_queued">%1$s de %2$s volverá a su original cuando se cierre el juego que lo está usando.</string> + <string name="cmgr_restore_done">%1$s de %2$s restaurado desde su original de %3$s.</string> + <string name="cmgr_package_in_use">%1$s está en uso en %2$s. Cambia antes ese Proton a otra cosa.</string> + <string name="cmgr_package_not_stored">%1$s no está guardado</string> + <string name="cmgr_deleted">%1$s eliminado.</string> + <string name="cmgr_original_kept">El original de la versión instalada se conserva: es el camino de vuelta.</string> + <string name="cmgr_not_stored">No guardado</string> + <string name="cmgr_deleted_original">Se eliminó el original de %1$s de %2$s.</string> + <string name="cmgr_nightlies_only">Las descargas solo proceden de las versiones Nightlies</string> + <string name="cmgr_list_predates_checksums">Esta lista de paquetes es anterior a las sumas de verificación - actualízala e inténtalo de nuevo</string> + <string name="cmgr_checksum_mismatch">La suma de verificación no coincide</string> + <string name="sprefs_upscaler_linear">Lineal</string> + <string name="sprefs_upscaler_nearest">Más cercano</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (calidad)</string> + <string name="sprefs_upscaler_sharpen">Solo nitidez</string> + <string name="sprefs_lod_bias_auto">Auto (según el escalado)</string> + <string name="look_off_desc">Sin efectos.</string> + <string name="look_game_clarity">Claridad</string> + <string name="look_game_clarity_desc">Nitidez con un toque de contraste: el de todos los días.</string> + <string name="look_vivid">Vívido</string> + <string name="look_vivid_desc">Color muy intenso. Reducción de bandas activada para que los cielos no se vean a franjas.</string> + <string name="look_cinematic">Cinemático</string> + <string name="look_cinematic_desc">Más contraste, color más frío y bordes suavizados.</string> + <string name="look_competitive">Competitivo</string> + <string name="look_competitive_desc">Sombras aclaradas y mucha nitidez: ve antes a los rivales.</string> + <string name="look_adaptive_sharpen">Nitidez adaptativa</string> + <string name="look_adaptive_sharpen_desc">Solo nitidez, sin tocar el color.</string> + <string name="look_filmic">Fílmico</string> + <string name="look_filmic_desc">Curva tipo película, ligeramente apagada.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Llamativo y con pegada.</string> + <string name="look_retro_crt">CRT retro</string> + <string name="look_retro_crt_desc">Los pases de tubo CRT y señal analógica juntos.</string> + <string name="look_upscale_sharp">Escalado nítido</string> + <string name="look_upscale_sharp_desc">Para jugar por debajo de la resolución de la pantalla.</string> + <string name="look_pixel_clean">Píxel limpio</string> + <string name="look_pixel_clean_desc">Píxeles nítidos para 2D y juegos antiguos.</string> + <string name="look_anime_edge">Bordes anime</string> + <string name="look_anime_edge_desc">Contornos toon más nitidez.</string> + <string name="gpuinfo_not_adreno">La GPU no es Adreno</string> + <string name="gpuinfo_supported">Compatible</string> + <string name="gpuinfo_experimental">Experimental: sus controladores son versiones de prueba</string> + <string name="gpuinfo_below_tested">Por debajo del hardware probado (Adreno 725 y posteriores): puede que no funcione</string> + <string name="gpuinfo_unsupported">No compatible: DroidDeck necesita una GPU Adreno (Snapdragon)</string> + <string name="turnip_rate_limited">Se alcanzó el límite de solicitudes de GitHub - inténtalo más tarde</string> + <string name="turnip_github_http">GitHub respondió HTTP %1$d</string> + <string name="turnip_download_failed">Error en la descarga</string> + <string name="turnip_list_predates_checksums">Esta lista de controladores es anterior a las sumas de verificación - actualízala e inténtalo de nuevo</string> + <string name="turnip_checksum_mismatch">La suma de verificación no coincide - se descartó la descarga</string> + <string name="turnip_not_adrenotools">No es un controlador de AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">no hay meta.json</string> + <string name="turnip_reject_meta_unreadable">no se puede leer meta.json (%1$s)</string> + <string name="turnip_reject_linux_driver">es un controlador de runtime de Linux (impórtalo en \\"Controlador de runtime\\")</string> + <string name="turnip_reject_wayland">es un controlador de juegos para Wayland, que esta app no usa</string> + <string name="turnip_reject_no_library_name">meta.json no indica ningún libraryName, así que no se pudo pasar nada a AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json indica %1$s, que no está en el zip</string> + <string name="turnip_reject_not_aarch64">%1$s no es una biblioteca compartida ELF AArch64 de 64 bits</string> + <string name="turnip_reject_glibc">%1$s enlaza glibc - es un Turnip \\"-Linux\\", que va en \\"Controlador de runtime\\"</string> + <string name="lvd_no_library">No hay ningún libvulkan_freedreno*.so en este zip. Un zip de Turnip para Android (AdrenoTools) o -Wayland no es un controlador de runtime de Linux.</string> + <string name="lvd_not_aarch64">%1$s no es una biblioteca compartida ELF AArch64 de 64 bits.</string> + <string name="lvd_not_glibc">%1$s no es un controlador glibc: enlaza la libc de Android. El runtime de Linux necesita un zip \\"-Linux\\"; el cliente de Steam no puede cargar en absoluto un Turnip normal o \\"-Wayland\\".</string> + <string name="bundle_no_manifest">No es un paquete de controladores: no hay un manifest.json que indique un controlador android y uno linux</string> + <string name="bundle_entry_outside">No es un paquete de controladores: %1$s apunta fuera de él</string> + <string name="bundle_too_large">No es un paquete de controladores: ocupa más de %1$d MB al descomprimirse</string> + <string name="gstore_sd_card">Tarjeta SD</string> + <string name="gstore_folder">Carpeta</string> + <string name="logshare_chooser">Compartir registros de sesión</string> + <string name="hdr_needs_android_10">requiere Android 10 o posterior (capas de pantalla con espacio de color)</string> + <string name="hdr_none">esta pantalla no indica compatibilidad con HDR</string> + <string name="hdr_not_hdr10">esta pantalla admite %1$s, no HDR10</string> + <string name="gpu_this_gpu">esta GPU</string> + <string name="phantom_title_on">El límite de procesos secundarios está activado</string> + <string name="phantom_title_unset">El límite de procesos secundarios no está definido</string> + <string name="phantom_title_unreadable">No se pudo comprobar el límite de procesos secundarios</string> + <string name="phantom_title_off">El límite de procesos secundarios está desactivado</string> + <string name="phantom_title_not_required">El límite de procesos secundarios no es necesario</string> + <string name="phantom_instructions_fix">%1$s Si no es posible, conecta este dispositivo a una computadora con ADB y ejecuta el comando de abajo. Después vuelve aquí y comprueba de nuevo.</string> + <string name="phantom_instructions_off">Ya se pueden iniciar sesiones de Steam.</string> + <string name="phantom_instructions_not_applicable">Esta versión de Android no usa este límite.</string> + <string name="phantom_fix_toggle">Activa “Inhabilitar restricciones de procesos secundarios” en Opciones de desarrollador y deja activadas las Opciones de desarrollador después.</string> + <string name="phantom_fix_no_toggle">Esta versión de Android no tiene un interruptor para ello. Usa la Depuración inalámbrica para cambiarlo desde este dispositivo.</string> + <string name="upd_block_no_apk">Esta versión no tiene descarga para esta copia de DroidDeck.</string> + <string name="upd_block_version_code">Android no la instalará sobre esta versión porque su versionCode %1$d es inferior al %2$d instalado.</string> + <string name="upd_fail_downgrade">Android no instala una versión anterior sobre una más reciente. Quédate en esta versión hasta que el canal la alcance.</string> + <string name="upd_fail_signature">Esta copia de DroidDeck está firmada de otro modo (¿una compilación local?), así que Android no la actualizará sobre la instalada.</string> + <string name="upd_fail_storage">No hay espacio libre suficiente para la actualización.</string> + <string name="upd_fail_aborted">Se canceló la actualización.</string> + <string name="upd_fail_with_message">La actualización no se instaló: %1$s</string> + <string name="upd_fail_generic">La actualización no se instaló.</string> + <string name="saves_layout_zip">zip de %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s aún no se ha iniciado</string> + <string name="saves_none_found">No se encontraron partidas guardadas de %1$s</string> + <string name="saves_not_save_zip">%1$s no tiene carpeta drive_c, así que no es un zip de partidas de GameHub ni de Winlator</string> + <string name="gstore_cannot_create">no se pueden crear carpetas en %1$s</string> + <string name="gstore_cannot_write">no se puede escribir en %1$s</string> + <string name="gstore_cannot_write_detail">no se puede escribir en %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">La carpeta no está disponible</string> + <string name="gfiles_name_taken">Otro archivo ya usa %1$s</string> + <string name="gfiles_art_unavailable">La carpeta de imágenes no está disponible</string> + <string name="gfiles_unrelated_inventory">La carpeta tiene un inventario de sincronización ajeno</string> + <string name="gfiles_remove_failed">No se pudo quitar %1$s</string> + <string name="gfiles_outside_folder">El archivo sale de la carpeta de exportación</string> + <string name="cmgr_fex_unnamed">FEX (compilación sin nombre de versión)</string> + <string name="cmgr_no_profile">no hay profile.json en %1$s</string> + <string name="cmgr_not_component_package">%1$s no es un paquete de componentes de Linux (tipo %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s libres</string> + <string name="mode_storage_auto_short">Automático</string> + <string name="appupd_catalog_rejected">El catálogo de actualizaciones no superó las comprobaciones (%1$s)</string> + <string name="main_adb_clip_label">Ajuste de procesos secundarios de DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Sesión iniciada · modo sin conexión</string> + <string name="setup_signed_in_unnamed">Sesión iniciada</string> + <string name="driver_tag_bundled">INCLUIDO</string> + <string name="driver_tag_downloaded">DESCARGADO</string> + <string name="driver_tag_imported">IMPORTADO</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Pantalla de la sesión</string> + <string name="display_resolution">Resolución</string> + <string name="display_game_fit">Ajuste de juegos 16:9</string> + <string name="display_game_fit_hint">Cómo se ajustan los juegos 16:9 a esta pantalla. Próxima sesión.</string> + <string name="display_game_fit_unavailable">Elige Igual a la pantalla o un tamaño personalizado más estrecho que 16:9.</string> + <string name="display_preserve">Mantener proporciones</string> + <string name="display_stretch">Estirar a la pantalla</string> + <string name="display_image_scaling">Escalado de imagen</string> + <string name="display_filter">Filtro de escalado</string> + <string name="display_filter_hint">Compartido por Steam y Escritorio.</string> + <string name="display_filter_live">Se aplica al instante. Compartido por Steam y Escritorio.</string> + <string name="display_filter_note">FSR, GSR y NIS se aplican al ampliar la imagen de la sesión. Solo nitidez también funciona sin ampliar.</string> + <string name="display_sharpness">Nitidez del filtro</string> + <string name="display_frame_rate">Velocidad de fotogramas</string> + <string name="display_look_filter">%1$s Cambia el escalado a %2$s.</string> + <string name="display_match_screen">Igual a la pantalla (%1$d×%2$d)</string> + <string name="display_follow_screen">Seguir la pantalla (cambia de tamaño al plegar o desplegar)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Mostrar detalles del dispositivo</string> + <string name="device_info_hide">Ocultar detalles del dispositivo</string> + <string name="device_info_loading">Leyendo el dispositivo…</string> + <string name="device_info_copy">Copiar</string> + <string name="device_info_copy_hint">Copia estos detalles en un informe de error.</string> + <string name="device_info_copied">Copiado.</string> + <string name="force_ssbs_title">Forzar SSBS</string> + <string name="force_ssbs_hint">Mantiene activado un ajuste de velocidad de la CPU que Wine sigue desactivando. Puede hacer más rápidos los juegos de Windows en Snapdragon 8 Elite; poco cambio en chips anteriores. Se aplica en el próximo inicio de un juego.</string> + <string name="rail_stores">Tiendas</string> + <string name="source_steam">Steam</string> + <string name="source_added">Personalizados</string> + <string name="setup_stores">Tiendas</string> + <string name="setup_stores_open_on">Abrir una tienda en</string> + <string name="setup_stores_speed">Nivel de velocidad de descarga</string> + <string name="setup_stores_engine">Motor de las tiendas</string> + <string name="setup_stores_engine_chip_ready">● Motor listo</string> + <string name="setup_stores_engine_chip_missing">Sin compilar</string> + <string name="stores_tier_balanced">Equilibrado</string> + <string name="stores_tier_fast">Rápido</string> + <string name="stores_tier_max">Máximo</string> + <string name="stores_title">Tiendas</string> + <string name="stores_settings">Ajustes de las tiendas</string> + <string name="stores_settings_eyebrow">Ajustes</string> + <string name="stores_chip_signed_out">(sin iniciar sesión)</string> + <string name="stores_tab_store">Tienda</string> + <string name="stores_tab_installed">Instalados</string> + <string name="stores_tab_library">Biblioteca</string> + <string name="stores_tab_all">Todos</string> + <string name="stores_tab_downloads">Descargas</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Iniciar sesión</string> + <string name="stores_signout_named">%1$s · cerrar sesión</string> + <string name="stores_signout_title">¿Cerrar sesión en %1$s?</string> + <string name="stores_signout_note">Los juegos instalados se conservan. La biblioteca se vuelve a cargar cuando inicias sesión de nuevo.</string> + <string name="stores_signout_stay">Mantener la sesión</string> + <string name="stores_signout_go">Cerrar sesión</string> + <string name="stores_search_catalog">Buscar en el catálogo de %1$s…</string> + <string name="stores_search_installed">Buscar juegos instalados…</string> + <string name="stores_search_library">Buscar en tu biblioteca…</string> + <string name="stores_search_open">Buscar</string> + <string name="stores_installed_empty">Nada instalado</string> + <string name="stores_library_loading">Cargando</string> + <string name="stores_nothing_matches">No hay juegos</string> + <string name="stores_shelves_loading">Cargando la tienda…</string> + <string name="stores_amazon_no_catalog">Sin catálogo</string> + <string name="stores_shelf_new">Novedades</string> + <string name="stores_shelf_deals">Ofertas</string> + <string name="stores_shelf_free">Juegos gratis</string> + <string name="stores_shelf_trending">En tendencia</string> + <string name="stores_shelf_library">Tu biblioteca</string> + <string name="stores_play">Jugar</string> + <string name="stores_install">Instalar</string> + <string name="stores_resume_install">Reanudar instalación</string> + <string name="stores_dl_interrupted">Interrumpida</string> + <string name="stores_install_size">Instalar · %1$s</string> + <string name="stores_get_free">Obtener gratis</string> + <string name="stores_view_on">Ver en %1$s</string> + <string name="stores_buy_price">Comprar · %1$s</string> + <string name="stores_installed_chip">Instalado</string> + <string name="stores_in_library">En la biblioteca</string> + <string name="stores_free">Gratis</string> + <string name="stores_resume">Reanudar</string> + <string name="stores_refresh">Actualizar</string> + <string name="stores_sort">Ordenar</string> + <string name="stores_sort_last_played">Jugados recientemente</string> + <string name="stores_sort_recently_installed">Instalados recientemente</string> + <string name="stores_sort_title_asc">Título A–Z</string> + <string name="stores_sort_title_desc">Título Z–A</string> + <string name="stores_sort_size_desc">Tamaño: mayor</string> + <string name="stores_sort_size_asc">Tamaño: menor</string> + <string name="stores_sort_release_date">Fecha de lanzamiento</string> + <string name="stores_view_list">Vista de lista</string> + <string name="stores_view_cards">Vista de tarjetas</string> + <string name="stores_show_mature">Mostrar contenido para adultos</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Sin conexión</string> + <string name="epic_card_none">Desactivado</string> + <string name="epic_eos">Inicio de sesión de Epic (EOS)</string> + <string name="epic_offline">Iniciar sin conexión</string> + <string name="epic_resolve">Solucionar el inicio de sesión de Epic</string> + <string name="store_cloud_saves">Partidas en la nube</string> + <string name="cloud_upload">Subir a la nube</string> + <string name="cloud_download">Descargar de la nube</string> + <string name="cloud_none">No hay partidas en la nube</string> + <string name="cloud_conflict">Conflicto en la nube</string> + <string name="cloud_conflict_files">Conflicto en la nube · %1$d archivos</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Conservar la de la nube</string> + <string name="cloud_keep_local">Conservar la local</string> + <string name="cloud_checking">Comprobando la nube…</string> + <string name="cloud_last_sync">Última sincronización %1$s</string> + <string name="cloud_never">Aún sin sincronizar</string> + <string name="cloud_done">%1$d archivos</string> + <string name="stores_eyebrow_installed">instalado</string> + <string name="stores_eyebrow_library">en tu biblioteca</string> + <string name="stores_eyebrow_store">tienda</string> + <string name="achievements_title">Logros</string> + <string name="achievements_count">%1$d de %2$d desbloqueados</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Desbloqueados · %1$d</string> + <string name="achievements_group_locked">Bloqueados · %1$d</string> + <string name="achievements_group_hidden">Ocultos · %1$d</string> + <string name="achievements_hidden">Logro oculto</string> + <string name="achievements_hidden_detail">Los detalles se muestran al desbloquearlo.</string> + <string name="achievements_all">Todos los logros desbloqueados</string> + <string name="achievements_reading">Leyendo…</string> + <string name="achievements_signed_out">Inicia sesión en %1$s para ver tus logros.</string> + <string name="achievements_unreachable">No se pudo conectar con %1$s. Vuelve a intentarlo cuando tengas conexión.</string> + <string name="achievements_none">%1$s no indica logros para este juego.</string> + <string name="achievements_show_all">Ver los %1$d</string> + <string name="achievements_dialog_title">Logros · %1$s</string> + <string name="stores_fact_developer">Desarrollador</string> + <string name="stores_fact_publisher">Distribuidor</string> + <string name="stores_fact_released">Lanzamiento</string> + <string name="stores_hltb_main">Principal</string> + <string name="stores_hltb_extras">+ Extras</string> + <string name="stores_hltb_completionist">Completista</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="stores_in_steam">✓ En Steam</string> + <string name="stores_uninstall">Desinstalar</string> + <string name="stores_uninstalling">Desinstalando…</string> + <string name="stores_uninstall_title">¿Desinstalar %1$s?</string> + <string name="stores_uninstall_body_size">Libera %1$s y lo quita de Steam.</string> + <string name="stores_uninstall_body">Elimina sus archivos y su acceso directo de Steam.</string> + <string name="stores_launch_not_registered">Steam detectará el juego la próxima vez que se inicie; ábrelo desde allí o inicia Steam ahora.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Lo elige Steam para cada juego</string> + <string name="stores_card_audio">Audio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Componentes</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motor</string> + <string name="stores_card_engine_value">%1$s · nativo</string> + <string name="stores_card_engine_java">%1$s · integrado</string> + <string name="stores_how_it_runs">Cómo se ejecuta</string> + <string name="stores_kv_fetched">Obtenido de</string> + <string name="stores_kv_fetched_value">%1$s, con tu cuenta</string> + <string name="stores_kv_installed_to">Instalado en</string> + <string name="stores_kv_installed_to_value">Almacenamiento de juegos (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Se inicia con</string> + <string name="stores_kv_launched_by_value">Steam y Proton, igual que los juegos de Steam</string> + <string name="stores_kv_launched_by_epic">Steam y Proton · inicio de sesión de Epic en cada arranque, superposición de EOS desactivada</string> + <string name="stores_kv_launched_by_amazon">Steam y Proton · variables de Amazon Games Services definidas</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">se agrega a Steam al instalar (interfaz Deck + Steam Input)</string> + <string name="stores_downloads_empty">No hay descargas</string> + <string name="stores_dl_paused">En pausa</string> + <string name="stores_dl_queued">En cola</string> + <string name="stores_dl_queued_at">En cola · #%1$d</string> + <string name="stores_dl_cancelled">Cancelada</string> + <string name="stores_dl_failed">Fallida</string> + <string name="stores_dl_failed_reason">Fallida · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pausar</string> + <string name="stores_dl_resume">Reanudar</string> + <string name="stores_dl_cancel">Cancelar</string> + <string name="stores_dl_retry">Reintentar</string> + <string name="stores_dl_clear">Quitar</string> + <string name="stores_dl_clear_all">Quitar terminadas</string> + <string name="stores_stage_manifest">Manifiesto</string> + <string name="stores_stage_download">Descarga</string> + <string name="stores_stage_verify">Verificación</string> + <string name="stores_stage_install">Instalación</string> + <string name="stores_stage_done">Hecho</string> + <string name="stores_stage_checking">Comprobando</string> + <string name="stores_stage_downloading">Descargando</string> + <string name="stores_dl_cancel_confirm">¿Eliminar la descarga?</string> + <string name="stores_dl_failed_kept">Fallida · se conservan %1$s</string> + <string name="stores_stage_verifying">Verificando</string> + <string name="stores_stage_installing">Instalando</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d archivos</string> + <string name="stores_download_manager">Administrador de descargas</string> + <string name="stores_parallel">Descargas simultáneas</string> + <string name="stores_install_where">Instalar en</string> + <string name="stores_install_title">Instalar %1$s:</string> + <string name="stores_target_internal">Interno</string> + <string name="stores_target_free">%1$s libres</string> + <string name="stores_target_free_unknown">Espacio libre desconocido</string> + <string name="stores_storage_insufficient">No hay suficiente espacio libre: se necesitan %1$s y solo hay %2$s libres</string> + <string name="stores_storage_low">Espacio insuficiente (%1$s libres, se necesitan %2$s)</string> + <string name="stores_notification_channel">Descargas de la tienda</string> + <string name="stores_notification_channel_hint">Muestra el progreso de las descargas de juegos y las mantiene activas en segundo plano</string> + <string name="stores_notification_one">Descargando</string> + <string name="stores_notification_many">%1$d descargas</string> + <string name="stores_notification_waiting">Preparando…</string> + <string name="stores_notification_done_channel">Descargas de la tienda terminadas</string> + <string name="stores_notification_installed">%1$s instalado</string> + <string name="stores_notification_failed">Falló la descarga de %1$s</string> + <string name="stores_notification_delete">Eliminar</string> + <string name="stores_notification_keep">Conservar</string> + <string name="stores_login_title">Iniciar sesión en %1$s</string> + <string name="stores_login_provider_title">Inicia sesión con tu proveedor</string> + <string name="stores_login_reload">Recargar</string> + <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_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> + <string name="stores_login_error_ssl">La conexión con la página de inicio de sesión no es segura.</string> + <string name="stores_login_error_verification">No se pudo verificar el inicio de sesión. Inténtalo de nuevo.</string> + <string name="stores_login_error_generic">No se pudo iniciar sesión. Inténtalo de nuevo.</string> + <string name="common_close">Cerrar</string> + <string name="common_back">Atrás</string> + <string name="common_edit">Editar</string> + <string name="games_add_all">Agregar todos los juegos de esta carpeta</string> + <string name="games_added_none">Nada nuevo en esta carpeta</string> + <string name="edit_name">Nombre</string> + <string name="edit_target">Destino</string> + <string name="edit_start_in">Iniciar en</string> + <string name="edit_launch_options">Opciones de lanzamiento</string> + <string name="edit_artwork">Ilustraciones</string> + <string name="edit_other_exe">Otro exe…</string> + <string name="edit_remove">Quitar</string> + <string name="art_cover">Portada</string> + <string name="art_wide_cover">Portada ancha</string> + <string name="art_adjust_logo">Ajustar logotipo</string> + <string name="logo_pos_default">Predeterminada</string> + <string name="logo_pos_upper_left">Arriba a la izquierda</string> + <string name="logo_pos_upper_center">Arriba al centro</string> + <string name="logo_pos_center">Centro</string> + <string name="logo_pos_bottom_left">Abajo a la izquierda</string> + <string name="logo_pos_bottom_center">Abajo al centro</string> + <string name="logo_pos_position">Posición</string> + <string name="logo_pos_size">Tamaño</string> + <string name="logo_pos_save">Guardar</string> + <string name="logo_pos_reset">Volver al valor predeterminado</string> + <string name="logo_pos_hint">Se dibuja sobre el fondo del juego, igual que en Steam. La posición exacta puede variar unos píxeles.</string> + <string name="logo_pos_no_logo">Este juego aún no tiene logotipo. Elige uno en Logotipo para verlo aquí.</string> + <string name="logo_pos_failed">No se pudo guardar la posición del logotipo. Inténtalo de nuevo.</string> + <string name="art_background">Fondo</string> + <string name="art_logo">Logotipo</string> + <string name="art_icon">Icono</string> + <string name="art_src_folder">Carpeta del juego</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Tu archivo</string> + <string name="art_src_exe">Del exe</string> + <string name="art_src_auto">Automático</string> + <string name="art_pick_image">Elegir imagen…</string> + <string name="art_pick_title">Elige una imagen: %1$s</string> + <string name="art_reset">Restablecer a automático</string> + <string name="art_search_sgdb">Buscar en SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Buscar un juego</string> + <string name="art_sgdb_other_games">Otras coincidencias</string> + <string name="art_sgdb_none">No se encontró nada.</string> + <string name="art_sgdb_no_key">SteamGridDB necesita una clave de API. Agrega la tuya en Configuración › Launcher.</string> + <string name="art_sgdb_bad_key">SteamGridDB no aceptó la clave de API. Compruébala en Configuración › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB está limitando las solicitudes ahora mismo. Inténtalo de nuevo en un minuto.</string> + <string name="art_sgdb_offline">No se pudo conectar con SteamGridDB. Comprueba la conexión.</string> + <string name="art_sgdb_server">SteamGridDB tuvo un problema. Inténtalo más tarde.</string> + <string name="art_sgdb_no_game">SteamGridDB no tiene ninguna coincidencia para este juego. Prueba a buscarlo.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d juego agregado</item> + <item quantity="many">%1$d juegos agregados</item> + <item quantity="other">%1$d juegos agregados</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d ya en Juegos</item> + <item quantity="other">%1$d ya en Juegos</item> + <item quantity="many">%1$d ya en Juegos</item> + </plurals> + <string name="hop_back">B · Volver a %1$s</string> + <string name="hop_from_games">la página del juego</string> + <string name="hop_from_play">los ajustes de Jugar</string> + <string name="sheet_graphics_drivers">Controladores gráficos</string> + <string name="comp_this_proton">Este Proton</string> + <string name="comp_every_proton">Todos los Protons</string> + <string name="comp_for_every_proton">Para todos los Protons</string> + <string name="comp_available_count">Disponibles · %1$d</string> + <string name="comp_checked">Comprobado %1$s</string> + <string name="comp_check_all">Buscar componentes y controladores nuevos</string> + <string name="comp_get">Obtener</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton y FEX de abajo son de este Proton</string> + <string name="comp_device_tested">%1$s · probado</string> + <string name="comp_device_untested">%1$s · sin probar</string> + <string name="comp_device_unsupported">%1$s · no compatible</string> + <string name="gpu_auto_keeps">Mantiene actualizado el par recomendado</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Controladores de runtime y de pantalla por separado</string> + <string name="gpu_use_title">¿Usar %1$s?</string> + <string name="gpu_mode_title">Cómo se eligen los controladores</string> + <string name="gpu_mode_auto_detail">La mejor pareja para esta GPU, siempre al día</string> + <string name="gpu_mode_pair">Pareja combinada</string> + <string name="gpu_mode_pair_detail">Elige una pareja; define ambos controladores</string> + <string name="gpu_mode_mix">Combinar libremente</string> + <string name="gpu_mode_mix_detail">Elige pantalla y runtime por separado</string> + <string name="gpu_mode_pair_short">Pareja</string> + <string name="gpu_mode_mix_short">Mixto</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAREJA</string> + <string name="gpu_src_bundle">PAQUETE</string> + <string name="gpu_src_chosen">ELEGIDO</string> + <string name="gpu_src_by_gpu">POR GPU</string> + <string name="gpu_src_default">PREDETERMINADO</string> + <string name="gpu_display_live">Dibujando ahora</string> + <string name="gpu_display_pending">Reinicio pendiente · %1$s dibuja hasta entonces</string> + <string name="gpu_runtime_live">En ejecución</string> + <string name="gpu_runtime_pending">Próxima sesión · esta sesión mantiene %1$s</string> + <string name="gpu_display_next">Dibuja la pantalla. Se aplica desde la próxima sesión.</string> + <string name="gpu_previous_driver">el controlador anterior</string> + <string name="gpu_restart_banner">Reinicia para cambiar el controlador de pantalla.</string> + <string name="gpu_restart_blocked">Detén la sesión en curso y luego reinicia DroidDeck para cambiar el controlador de pantalla.</string> + <string name="gpu_restart_now">Reiniciar ahora</string> + <string name="gpu_restart_later">Más tarde</string> + <string name="gpu_auto_title">Auto eligió esta pareja para tu %1$s</string> + <string name="gpu_auto_builtin_title">Auto usa los controladores integrados para tu %1$s</string> + <string name="gpu_auto_reason">Elegida para la familia %1$s. Las versiones nuevas se instalan en segundo plano.</string> + <string name="gpu_pair_title">Elige una pareja</string> + <string name="gpu_pair_hint">Una pareja define juntos el controlador de pantalla y el de runtime.</string> + <string name="gpu_mix_title">Elige cada controlador</string> + <string name="gpu_mix_hint">Un paquete rellena ambos huecos. Los cambios de pantalla se aplican tras reiniciar; los de runtime, en la próxima sesión.</string> + <string name="gpu_change_display">Cambiar controlador de pantalla</string> + <string name="gpu_change_runtime">Cambiar controlador de runtime</string> + <string name="gpu_autos_pick">ELECCIÓN DE AUTO</string> + <string name="gpu_installed">Instalado</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · reinicia para aplicar</string> + <string name="gpu_chip_restart">%1$s · reinicio pendiente</string> + <string name="comp_this_device">Este dispositivo</string> + <string name="proton_remove_title">¿Quitar %1$s?</string> + <string name="setup_tab_diagnostics">Diagnóstico</string> + <string name="setup_ready">Listo para jugar</string> + <string name="setup_not_ready">Aún no está listo para jugar</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">límite de procesos desactivado</string> + <string name="setup_ready_signed_in">sesión iniciada como %1$s</string> + <string name="setup_needs_you">Cuando algo requiera tu atención</string> + <string name="setup_group_look">Aspecto</string> + <string name="setup_group_device">Este dispositivo</string> + <string name="setup_group_art">Ilustraciones de la biblioteca</string> + <string name="setup_group_download">Descargas</string> + <string name="setup_download_source">Origen</string> + <string name="setup_download_source_auto">Automático</string> + <string name="setup_download_source_direct">Directo</string> + <string name="setup_download_source_mirror">Espejo</string> + <string name="setup_download_source_custom">Prefijo propio</string> + <string name="setup_download_mirror">Sitio</string> + <string name="setup_download_prefix">Prefijo</string> + <string name="flathub_eyebrow">APPS DE LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Apps para el escritorio de Linux, que se abren desde Escritorio.</string> + <string name="flathub_setup">Configurar Flathub</string> + <string name="flathub_remove_title">¿Quitar %1$s?</string> + <string name="flathub_remove_note">Se conservan sus ajustes y archivos.</string> + <string name="flathub_keep">Conservar</string> + <string name="desktop_size">Tamaño en disco</string> + <string name="desktop_uninstall_title">¿Desinstalar el escritorio?</string> + <string name="desktop_all_systems">Todos</string> + <string name="gog_achievements">Logros de GOG</string> + <string name="gog_achievements_hint">Sincroniza los logros de los juegos de GOG compatibles. Se aplica en el próximo inicio.</string> + <string name="gog_achievements_off">Logros desactivados</string> + <string name="gog_achievements_on">Logros activados</string> + <string name="gog_achievements_signin">Vuelve a iniciar sesión en GOG</string> + <string name="gog_achievements_uploaded">Logros subidos</string> + <string name="gog_achievements_pending">Subida de logro pendiente</string> + <string name="gog_achievements_enable_store">Activa los logros de GOG en los ajustes de tiendas</string> + <string name="gog_achievements_unavailable">Logros no disponibles; revisa los registros de la sesión</string> + <string name="achievement_unlocked">Logro desbloqueado</string> + <string name="touch_paste">Pegar</string> + <string name="touch_dpad">Pad direccional</string> + <string name="touch_left_stick">Stick izquierdo</string> + <string name="touch_right_stick">Stick derecho</string> + <string name="touch_menu">Menú</string> + <string name="touch_keyboard">Teclado</string> + <string name="touch_dpad_up">Pad direccional arriba</string> + <string name="touch_dpad_down">Pad direccional abajo</string> + <string name="touch_dpad_left">Pad direccional izquierda</string> + <string name="touch_dpad_right">Pad direccional derecha</string> + <string name="touch_title">Controles táctiles</string> + <string name="touch_controller">Control táctil</string> + <string name="touch_mouse">Ratón</string> + <string name="touch_on">Activado</string> + <string name="touch_off">Desactivado</string> + <string name="touch_speed_slow">Lenta</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Rápida</string> + <string name="touch_edit_layout">Editar disposición</string> + <string name="touch_droiddeck_menu">Menú de DroidDeck</string> + <string name="touch_drag_hint">Arrastra controles a la pantalla</string> + <string name="touch_arrange">Organizar</string> + <string name="touch_discard">Descartar</string> + <string name="touch_saving">Guardando…</string> + <string name="touch_icon">Icono</string> + <string name="touch_narrower">A−</string> + <string name="touch_wider">A+</string> + <string name="touch_shorter">Al−</string> + <string name="touch_taller">Al+</string> + <string name="touch_hide">Ocultar</string> + <string name="touch_color_opacity">Color y opacidad…</string> + <string name="touch_copy_layout">Copiar esta disposición</string> + <string name="touch_layout_copied">Disposición copiada; pégala en la disposición táctil de cualquier juego</string> + <string name="touch_paste_layout">Pegar disposición copiada</string> + <string name="touch_reset_layout">Restablecer a la de Steam</string> + <string name="touch_no_binding">Este control no tiene una acción asignada en Steam para ponerle un icono</string> + <string name="touch_icon_for">Icono para %1$s</string> + <string name="touch_layout_color">Color de la disposición táctil</string> + <string name="touch_done">Hecho</string> + <string name="touch_save_failed">No se pudo guardar la disposición táctil</string> + <string name="touch_saved">Disposición táctil guardada en Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Etiqueta (opcional)</string> + <string name="touch_icons_missing">No se encontraron los iconos de Steam</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d icono de Steam</item> + <item quantity="other">%1$d iconos de Steam</item> + <item quantity="many">%1$d iconos de Steam</item> + </plurals> + <string name="touch_icon_color">Color del icono</string> + <string name="touch_button_color">Color del botón</string> + <string name="touch_no_icon">Sin icono</string> + <string name="stores_sync_sign_in">Comprobando el inicio de sesión…</string> + <string name="stores_sync_library">Obteniendo tu biblioteca…</string> + <string name="stores_sync_game_list">Obteniendo la lista de juegos…</string> + <string name="stores_sync_details">Cargando datos de los juegos… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Sincronizando %1$d juego…</item> + <item quantity="other">Sincronizando %1$d juegos…</item> + <item quantity="many">Sincronizando %1$d juegos…</item> + </plurals> + <string name="stores_sync_progress">Sincronizando… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Obteniendo las carátulas…</string> + <string name="stores_sync_failed">Error al sincronizar</string> + <string name="stores_sync_no_games">No se encontraron juegos en tu biblioteca de %1$s</string> + <string name="stores_sync_amazon_no_answer">Amazon Games no respondió al consultar tu biblioteca: actualiza o vuelve a iniciar sesión</string> + <string name="stores_sync_gog_unreachable">No se pudo conectar con GOG</string> + <string name="stores_sync_gog_unreadable">No se pudo leer tu biblioteca de GOG</string> + <string name="stores_registering">Registrando con Steam…</string> + <string name="mode_client_arch">Cliente de Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnóstico de VAC</string> + <string name="setup_vac_diag_hint">Los juegos Source registran su consola (-condebug); vac.txt en los registros de sesión dice si es seguro o no</string> + <string name="load_starting_steam_x64">Iniciando Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Lo usa el cliente de Steam x86-64</string> + <string name="storage_uninstall_in_x64">Esta copia está en el cliente de Steam x86-64. Elige x86-64 en Cliente de Steam y desinstálala aquí.</string> + <string name="storage_uninstall_in_arm64">Esta copia está en el cliente de Steam ARM64. Elige ARM64 en Cliente de Steam y desinstálala aquí.</string> + <string name="drawer_page_glasses">Gafas</string> + <string name="glasses_open">Gafas VITURE</string> + <string name="glasses_control">Control de las gafas</string> + <string name="glasses_driver_missing">Esta versión no incluye el controlador de estas gafas.</string> + <string name="glasses_connection_failed">No se pudo conectar con las gafas. Vuelve a conectar el cable o toca Permitir para reintentar.</string> + <string name="glasses_allow">Permitir</string> + <string name="glasses_allow_hint">Permite que DroidDeck ajuste la frecuencia de actualización, el modo 3D, el brillo, el volumen y el bloqueo solar de las gafas, y lea su seguimiento de cabeza.</string> + <string name="glasses_asking">Esperando a que lo permitas en el aviso de Android…</string> + <string name="glasses_denied">Se rechazó el control. Permítelo para cambiar los ajustes de las gafas.</string> + <string name="glasses_no_control">Estas gafas muestran el juego, pero sus ajustes no se pueden cambiar desde aquí.</string> + <string name="glasses_output">Salida</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Juego en las gafas</string> + <string name="glasses_game_on_hint">Muestra el juego solo en las gafas. Desactivado: el teléfono lo muestra y Android duplica la pantalla del teléfono.</string> + <string name="glasses_display">Pantalla</string> + <string name="glasses_refresh">Frecuencia de actualización</string> + <string name="glasses_3d">3D (lado a lado)</string> + <string name="glasses_3d_hint">Cambia las gafas inteligentes a 3D lado a lado. El seguimiento de la cabeza se controla por separado.</string> + <string name="glasses_3d_failed">No se ha confirmado la señal 3D. Inténtalo de nuevo cuando vuelva la imagen 2D.</string> + <string name="glasses_no_signal">Sin imagen: las gafas están en un modo que este teléfono no puede enviar. Mantén presionado su botón 2D/3D o desconéctalas y vuelve a conectarlas.</string> + <string name="glasses_3d_refresh">Frecuencia en 3D</string> + <string name="glasses_auto3d">3D para juegos de RV</string> + <string name="glasses_auto3d_hint">Cambia a 3D mientras SteamVR está en marcha, y vuelve después.</string> + <string name="glasses_picture">Imagen</string> + <string name="glasses_picture_hint">Muestra automáticamente contenido plano en ambos ojos y detecta SteamVR. Seleccione Juego lado a lado para contenido SBS.</string> + <string name="glasses_picture_auto">Automático</string> + <string name="glasses_picture_screen">Pantalla virtual</string> + <string name="glasses_picture_sbs">Juego lado a lado</string> + <string name="glasses_screen_size">Ancho de la pantalla</string> + <string name="glasses_screen_distance">Distancia de la pantalla</string> + <string name="glasses_screen_next_session">El ancho y la distancia se aplican cuando un juego se muestra en las gafas como pantalla virtual.</string> + <string name="glasses_screen_no_output">Estos ajustes se aplican mientras Juego en las gafas está activado y el juego se muestra allí.</string> + <string name="glasses_screen_flat_hint">Automático mantiene este juego 2D a pantalla completa. Usa una pantalla virtual para ajustar su ancho, distancia y seguimiento de cabeza.</string> + <string name="glasses_screen_use">Usar pantalla virtual</string> + <string name="glasses_screen_direct_hint">SteamVR llena la vista. Ajuste su campo de visión en RV; el ancho y la distancia solo se aplican a una pantalla virtual.</string> + <string name="glasses_screen_sbs_hint">Los juegos lado a lado llenan cada ojo. El ancho y la distancia solo se aplican a una pantalla virtual.</string> + <string name="glasses_tracking_flat_hint">Automático mantiene este juego 2D fijo en la vista. Elige Pantalla virtual en la sección Pantalla para usar el seguimiento de cabeza.</string> + <string name="glasses_tracking_sbs_hint">El seguimiento de cabeza se aplica a una pantalla virtual o a un juego de SteamVR en marcha.</string> + <string name="glasses_hardware">Dispositivo</string> + <string name="glasses_brightness">Brillo</string> + <string name="glasses_volume">Volumen</string> + <string name="glasses_sunblock">Bloqueo solar</string> + <string name="glasses_sunblock_hint">Oscurece las lentes frontales.</string> + <string name="glasses_tracking">Seguimiento</string> + <string name="glasses_head_tracking">Seguimiento de cabeza</string> + <string name="glasses_head_tracking_hint">Los sensores de las gafas giran la pantalla virtual y SteamVR con tu cabeza.</string> + <string name="glasses_recenter">Recentrar la vista</string> + <string name="glasses_recenter_button">Volver a centrar la pantalla</string> + <string name="glasses_vr_fov">Campo de visión de SteamVR</string> + <string name="glasses_vr_fov_hint">Más bajo acerca SteamVR y llena las gafas; más alto muestra más a tu alrededor.</string> + <string name="glasses_playing">Jugando en %1$s</string> + <string name="glasses_calibration">Calibración del seguimiento</string> + <string name="glasses_calibration_hint">Reduce la deriva y alinea la referencia horizontal.</string> + <string name="glasses_calibration_saved_hint">Estas gafas usan la calibración guardada.</string> + <string name="glasses_calibration_open">Calibrar</string> + <string name="glasses_calibration_instructions">Coloca las gafas conectadas boca abajo sobre una superficie nivelada, con la montura bien apoyada. Toca Iniciar y no las muevas durante unos 8 segundos. Si se mueven, la medición vuelve a empezar. Esto corrige la deriva y la inclinación, no el rumbo.</string> + <string name="glasses_calibration_settling">Deja las gafas boca abajo y quietas. Esperando a que se estabilicen…</string> + <string name="glasses_calibration_collecting">Midiendo los sensores. Mantén las gafas quietas.</string> + <string name="glasses_calibration_moving">Se detectó movimiento. No toques las gafas; la medición se reiniciará automáticamente.</string> + <string name="glasses_calibration_turn_over">Apoya las gafas boca abajo sobre una superficie nivelada. La medición empezará cuando estén bien colocadas.</string> + <string name="glasses_calibration_complete">Calibración guardada. Ponte las gafas, mira al frente y toca Hecho para recentrar.</string> + <string name="glasses_calibration_failed">No se pudo completar la calibración. Comprueba la conexión, mantén las gafas quietas y vuelve a intentarlo. Se conserva tu calibración anterior.</string> + <string name="glasses_calibration_start">Iniciar</string> + <string name="glasses_calibration_done">Hecho</string> + <string name="glasses_calibration_reset">Restablecer calibración del seguimiento</string> + <string name="glasses_calibration_reset_hint">¿Quitar la calibración guardada y restaurar los valores predeterminados del modelo? Recentra después de volver a ponerte las gafas.</string> + <string name="glasses_calibration_reset_button">Restablecer</string> + <string name="hand_camera_group">Seguimiento de manos</string> + <string name="hand_camera_prompt_title">¿Rastrear las manos o los mandos Joy-Con con la cámara del teléfono?</string> + <string name="display_picture_position">Posición de la imagen</string> + <string name="display_position_top">Arriba</string> + <string name="display_position_bottom">Abajo</string> + <string name="display_position_center">Centro (predeterminado)</string> + <string name="setup_tab_storage">Almacenamiento</string> + <string name="storage_measuring">Midiendo el almacenamiento…</string> + <string name="storage_measuring_hint">La primera vez tarda unos segundos.</string> + <string name="storage_internal">Almacenamiento interno</string> + <string name="storage_used_of">%1$s de %2$s usados</string> + <string name="storage_free">%1$s libres</string> + <string name="storage_droiddeck_uses">DroidDeck usa %1$s. Medido el %2$s.</string> + <string name="storage_rescanning">midiendo de nuevo…</string> + <string name="storage_other_apps">Otras apps de Android</string> + <string name="storage_safe_now">Se puede liberar ahora</string> + <string name="storage_safe_hint">Runtimes sin usar, restos, registros antiguos</string> + <string name="storage_clean_up">Limpiar…</string> + <string name="storage_session_running">Detén la sesión para limpiar o eliminar algo. Los tamaños se siguen mostrando.</string> + <string name="storage_where">Dónde va</string> + <string name="storage_games">Juegos de Steam</string> + <string name="storage_game_data">Datos de juegos</string> + <string name="storage_game_data_hint">Prefijos %1$s · taller %2$s · shaders %3$s</string> + <string name="storage_tools">Proton y runtimes</string> + <string name="storage_tools_unused">%1$s sin usar</string> + <string name="storage_stores">GOG, Epic y otras tiendas</string> + <string name="storage_stores_hint">Desinstálalos desde Tiendas</string> + <string name="storage_desktop">Apps de escritorio</string> + <string name="storage_desktop_hint">Apps y runtimes de Flatpak</string> + <string name="storage_system">Sistema Linux y cliente de Steam</string> + <string name="storage_system_hint">Necesario para ejecutar cualquier cosa</string> + <string name="storage_app_data">Datos de DroidDeck</string> + <string name="storage_app_data_hint">Registros de sesiones antiguas %1$s · cachés · controladores</string> + <string name="storage_legend_games">Juegos</string> + <string name="storage_legend_data">Datos de juegos</string> + <string name="storage_legend_tools">Proton y runtimes</string> + <string name="storage_legend_stores">Otras tiendas</string> + <string name="storage_legend_desktop">Apps de escritorio</string> + <string name="storage_legend_system">Sistema Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Limpiar</string> + <string name="storage_clean_up_lede">Nada de aquí afecta a tus juegos instalados ni a las descargas en curso.</string> + <string name="storage_nothing_to_clean">Ahora mismo no hay nada que limpiar.</string> + <string name="storage_selected">Seleccionado: %1$s · %2$s → %3$s libres</string> + <string name="storage_cleaning">Limpiando…</string> + <string name="storage_free_button">Liberar %1$s</string> + <string name="storage_freed">Se liberaron %1$s.</string> + <string name="storage_item_runtimes">Runtimes y Proton de Steam sin usar</string> + <string name="storage_item_leftovers">Restos de juegos desinstalados</string> + <string name="storage_item_leftovers_unsure">Restos que pueden contener partidas guardadas</string> + <string name="storage_item_logs">Registros de sesiones antiguas</string> + <string name="storage_item_logs_detail">Conserva los registros de la sesión actual</string> + <string name="storage_item_custom_detail">Ningún juego lo usa. Reinstálalo desde Componentes si lo necesitas.</string> + <string name="storage_item_shaders">Cachés de shaders de juegos instalados</string> + <string name="storage_item_shaders_detail">Se reconstruyen al jugar. Los primeros minutos de cada juego vuelven a dar tirones.</string> + <string name="storage_tag_safe">Seguro</string> + <string name="storage_tag_unused">Sin usar</string> + <string name="storage_tag_stutter">Tirones</string> + <string name="storage_tag_saves">Revisar partidas</string> + <string name="storage_tag_default">Predeterminado</string> + <string name="storage_tag_required">Necesario</string> + <string name="storage_tag_not_used">Sin usar</string> + <string name="storage_back">Almacenamiento</string> + <string name="storage_games_with_data">%1$s con sus datos</string> + <string name="storage_sort_largest">Más grandes</string> + <string name="storage_sort_least_played">Menos jugados</string> + <string name="storage_sort_sd">En la tarjeta SD</string> + <string name="storage_no_games">Aquí no hay juegos.</string> + <string name="storage_played">Jugado %1$s</string> + <string name="storage_never_played">Nunca jugado</string> + <string name="storage_game_parts">Juego %1$s · datos %2$s</string> + <string name="storage_uninstall">Desinstalar</string> + <string name="storage_games_note">Desinstalar abre el diálogo de Steam para que Steam lo registre. Para mover un juego a la tarjeta SD, usa Steam › Ajustes › Almacenamiento.</string> + <string name="storage_uninstall_title">¿Desinstalar %1$s?</string> + <string name="storage_uninstall_body">Steam se abre y te pide confirmación. Esto libera los %1$s del juego. Su prefijo se queda hasta que limpies los restos, y las partidas guardadas en Steam Cloud siguen en tu cuenta.</string> + <string name="storage_open_steam">Abrir Steam</string> + <string name="storage_tools_detail">%1$s · %2$s sin usar</string> + <string name="storage_remove_unused">Quitar lo que no se usa · %1$s</string> + <string name="storage_in_use">En uso</string> + <string name="storage_not_used">Sin usar</string> + <string name="storage_remove">Quitar</string> + <string name="storage_remove_title">¿Quitar %1$s?</string> + <string name="storage_remove_body">Libera %1$s. Steam lo volverá a descargar si algún juego lo pide.</string> + <string name="storage_tool_fex_runtime">Necesario para juegos Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Lo necesitan los Proton ARM64</string> + <string name="storage_tool_redist">Instaladores de VC++ y DirectX que piden los juegos</string> + <string name="storage_tool_fex">Ejecuta juegos Linux x86</string> + <string name="storage_tool_steam">Herramienta de Steam</string> + <string name="storage_tool_old_runtime">DroidDeck ejecuta juegos sin este runtime</string> + <string name="storage_tool_x86_proton">Proton x86, que DroidDeck no puede ejecutar</string> + <string name="storage_tool_custom_default">Predeterminado para todos los juegos</string> + <string name="storage_tool_custom_unused">Ningún juego lo usa</string> + <string name="storage_tool_custom_unknown">No se pudieron leer los ajustes de Steam, así que se conserva</string> + <string name="storage_cleanup_busy">Espera a que termine la limpieza del almacenamiento</string> + <string name="storage_low_title">Solo quedan %1$s libres</string> + <string name="storage_low_body">Steam necesita espacio para actualizaciones y cachés de shaders. Por debajo de 10 GB, las actualizaciones de juegos pueden fallar a medias.</string> + <string name="storage_low_safe">Se pueden liberar %1$s sin riesgo.</string> + <string name="storage_free_up">Liberar espacio</string> + <string name="storage_play_anyway">Jugar igualmente</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d instalado</item> + <item quantity="other">%d instalados</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d en la tarjeta SD</item> + <item quantity="other">%d en la tarjeta SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d herramienta</item> + <item quantity="other">%d herramientas</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Carpetas de prefijo vacías y caché de shaders de %d juego</item> + <item quantity="other">Carpetas de prefijo vacías y cachés de shaders de %d juegos</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">El prefijo de %d juego aún contiene archivos, que pueden incluir partidas guardadas locales. Haz una copia antes si las quieres.</item> + <item quantity="other">Los prefijos de %d juegos aún contienen archivos, que pueden incluir partidas guardadas locales. Haz una copia antes si las quieres.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d juego</item> + <item quantity="other">%d juegos</item> + </plurals> + <string name="storage_tool_default_proton">Proton predeterminado de DroidDeck</string> + <string name="storage_tool_proton">Opción Proton 11 de DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Usado por %d juego</item> + <item quantity="other">Usado por %d juegos</item> + </plurals> + <string name="storage_legend_components">Componentes</string> + <string name="storage_components">Componentes</string> + <string name="storage_item_components">Componentes sin usar</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Libera %1$s. Solo restaura una versión de Proton que ya no está instalada.</string> + <string name="storage_leftovers_unchecked">Sin comprobar: no se pudo leer un manifiesto de app de Steam, así que los prefijos de juegos desinstalados se conservan hasta que se pueda.</string> + <string name="storage_failed">No se pudo terminar: %1$s</string> + <string name="storage_desktop_shared">compartidos %1$s</string> + <string name="storage_data_installed">Juegos instalados</string> + <string name="storage_data_parts">Prefijo %1$s · shaders %2$s · taller %3$s</string> + <string name="storage_clear_shaders">Borrar shaders</string> + <string name="storage_data_leftovers">Juegos desinstalados</string> + <string name="storage_steam_app">App de Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Su prefijo aún contiene archivos, que pueden incluir partidas guardadas locales</string> + <string name="storage_leftover_confirm">Elimina su prefijo de Wine y su caché de shaders (%1$s). Haz copia de las partidas que quieras antes; las de Steam Cloud siguen en tu cuenta.</string> + <string name="storage_data_other">Conservados</string> + <string name="storage_data_other_title">Juegos que no son de Steam y prefijo compartido de Steam</string> + <string name="storage_data_other_detail">Prefijos de juegos agregados desde tiendas o a mano</string> + <string name="storage_components_packages">Paquetes descargados</string> + <string name="storage_components_originals">Originales guardados</string> + <string name="storage_components_none">No hay paquetes de componentes descargados.</string> + <string name="storage_component_in_use">Elegido para un Proton o un juego</string> + <string name="storage_component_unused">No elegido en ningún sitio</string> + <string name="storage_original_kept">Restaura el Proton instalado</string> + <string name="storage_original_old">Versión de Proton que ya no está instalada</string> + <string name="storage_tag_in_use">En uso</string> + <string name="storage_components_note">Los componentes en uso permanecen bloqueados. Elígelos en Componentes; lo que quites aquí se puede volver a descargar allí.</string> + <string name="storage_component_confirm">Libera %1$s. Los paquetes que importaste tú no se pueden volver a descargar.</string> + <string name="storage_desktop_detail">%1$s para apps de Flatpak y lo que comparten</string> + <string name="storage_desktop_apps_title">Apps</string> + <string name="storage_desktop_none">No hay apps de Flatpak instaladas.</string> + <string name="storage_desktop_shared_title">Compartido por las apps</string> + <string name="storage_desktop_runtimes">Runtimes</string> + <string name="storage_desktop_runtimes_detail">Bibliotecas sobre las que funcionan las apps; las que no se usan se van con Quitar lo que no se usa</string> + <string name="storage_desktop_cache">Almacén de descargas</string> + <string name="storage_desktop_cache_detail">Almacén de objetos y descargas en caché de Flatpak</string> + <string name="storage_desktop_prune">Quitar lo que no se usa</string> + <string name="storage_desktop_prune_body">Quita los runtimes que ninguna app instalada necesita y limpia el almacén de objetos de Flatpak. Las apps instaladas siguen funcionando.</string> + <string name="storage_flatpak_uninstall_body">Quita la app (%1$s) y cualquier runtime que no use nada más. Sus datos en tu carpeta personal se quedan.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d paquete</item> + <item quantity="other">%d paquetes</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d app</item> + <item quantity="other">%d apps</item> + </plurals> + <string name="boot_movie">Video de arranque</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps se ve más fluido pero usa más CPU mientras Steam se inicia. Un video de inicio elegido en la configuración de Steam tiene prioridad.</string> + <string name="boot_movie_sound">Sonido</string> + <string name="boot_movie_custom">Tu propio video</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV o WebM. Otros formatos y archivos de más de %1$d MB se convierten a WebM 720p en el dispositivo, hasta %2$d segundos.</string> + <string name="boot_movie_import">Importar</string> + <string name="boot_movie_remove">Quitar</string> + <string name="boot_movie_pick">Elige un video de arranque</string> + <string name="boot_movie_imported">%1$s es ahora el video de arranque</string> + <string name="boot_movie_imported_silent">%1$s es ahora el video de arranque, sin sonido</string> + <string name="boot_movie_too_long">Los videos que hay que convertir deben durar %1$d segundos o menos</string> + <string name="boot_movie_converting">Convirtiendo %1$d %%</string> + <string name="boot_movie_converting_started">Convirtiendo %1$s para Steam. Mantén DroidDeck abierto.</string> + <string name="boot_movie_unsupported">Este dispositivo no puede decodificar ese video.</string> + <string name="boot_movie_import_failed">No se pudo importar ese video</string> + <string name="glasses_experimental">Cámaras Luma Ultra — Experimental</string> + <string name="glasses_joycons">Seguimiento de posición de los Joy-Con</string> + <string name="glasses_joycons_hint">Usa las cámaras de las gafas inteligentes para posicionar tus mandos Joy-Con emparejados. La rotación y las pulsaciones de los botones provienen de los mandos Joy-Con. La posición se estima cuando tus muñecas están ocultas. Reemplaza los mandos operados con las manos desnudas y pausa el seguimiento de la cámara del teléfono. Apunta los mandos Joy-Con hacia adelante al conectar o restablecer el centro de seguimiento.</string> + <string name="glasses_joycons_requires_position">Activa primero el seguimiento de posición. Requiere mandos Joy-Con compatibles con movimiento en Android 12 o posterior. Desactivado por defecto.</string> + <string name="setup_tab_glasses">Gafas inteligentes</string> + <string name="setup_glasses_scope">La configuración de pantalla y seguimiento de cabeza se comparte entre los menús de DroidDeck, los juegos y las sesiones de escritorio.</string> + <string name="setup_glasses_connect">Conecta las gafas inteligentes para cambiar su configuración de pantalla y seguimiento. Tu configuración guardada se conserva al desconectarlas.</string> + <string name="glasses_vr">RV</string> + <string name="glasses_display_mode">Modo de visualización</string> + <string name="glasses_output_2d">Salida 2D</string> + <string name="glasses_output_3d">Salida 3D</string> + <string name="glasses_picture_group">Imagen y pantalla virtual</string> + <string name="glasses_position_group">Posición y nivel del suelo</string> + <string name="glasses_hands_group">Seguimiento de manos — Experimental</string> + <string name="glasses_tracking_status">Estado del seguimiento</string> + <string name="glasses_resolution_2d">Resolución 2D</string> + <string name="glasses_resolution_3d">Resolución 3D</string> + <string name="glasses_resolution_vr">Resolución RV</string> + <string name="glasses_resolution_auto">Automático</string> + <string name="glasses_resolution_inherit">Igual que 2D/3D</string> + <string name="glasses_resolution_hint">Resolución de salida por ojo.</string> + <string name="glasses_refresh_30_hint">Habilita el juego en gafas inteligentes para seleccionar el modo nativo de 30 Hz de la pantalla.</string> + <string name="glasses_3dof">Pantalla virtual 3DoF</string> + <string name="glasses_3dof_hint">Ancla los juegos planos frente a ti para que puedas mirar a tu alrededor. Habilita el juego en gafas inteligentes sin cambiar a 3D.</string> + <string name="glasses_screen_app_wide">El ancho y la distancia actualizan la pantalla virtual rastreada para los menús, juegos y sesiones de escritorio de DroidDeck de forma inmediata.</string> + <string name="glasses_head_tracking_spatial_vr_hint">El seguimiento posicional incluye la rotación de la cabeza en SteamVR. Para el seguimiento solo de rotación, desactive el seguimiento posicional.</string> + <string name="glasses_head_tracking_spatial_hint">Controla el movimiento de la cabeza en la pantalla virtual. El seguimiento posicional incluye la rotación de la cabeza en SteamVR.</string> + <string name="glasses_quick_actions">Acciones rápidas</string> + <string name="glasses_recenter_screen_hint">Mira hacia donde quieras que esté la pantalla y luego restablece el centro de seguimiento para ajustar su altura y dirección.</string> + <string name="glasses_recenter_joycons_button">Volver a centrar los Joy-Con</string> + <string name="phone_camera_tracking_group">Cámara del teléfono — Experimental</string> + <string name="phone_camera_tracking_setting">Rastrear manos o mandos Joy-Con</string> + <string name="glasses_6dof">Pantalla virtual 6DoF</string> + <string name="glasses_position">Seguimiento posicional — experimental</string> + <string name="glasses_position_hint">Movimiento físico en RV y alrededor de pantallas virtuales. Reiniciar el seguimiento tarda un momento.</string> + <string name="glasses_eye_height">Altura actual de los ojos sobre el suelo</string> + <string name="glasses_floor">Establecer el nivel del suelo desde la altura actual</string> + <string name="glasses_floor_set">Establecer el nivel del suelo</string> + <string name="glasses_spatial_setup">Configuración y diagnóstico de la cámara estéreo</string> + <string name="glasses_spatial_setup_hint">Comprobar la calibración de la cámara y el seguimiento de las manos antes de jugar.</string> + <string name="glasses_spatial_open">Abrir configuración</string> + <string name="glasses_hands">Mandos operados con las manos desnudas</string> + <string name="glasses_hands_hint">Usar las cámaras de las gafas inteligentes para apuntar con las manos, pellizcar para hacer clic y cerrar la mano para agarrar en RV. Los joysticks del mando se mueven y giran. Sustituye el seguimiento de posición de los Joy-Con. Puede haber retrasos o pérdida de seguimiento durante los juegos.</string> + <string name="glasses_hands_ready_hint">Habilitar el uso de mandos operados con las manos desnudas bajo las cámaras Luma Ultra en Seguimiento. Mostrar primero las manos abiertas.</string> + <string name="glasses_hands_base">Calibración compartida de Luma Ultra</string> + <string name="glasses_hands_base_hint">Usar la base compartida de Luma Ultra. Calibra tus gafas inteligentes para verificar su precisión.</string> + <string name="glasses_hands_calibration_verified">Calibración medida verificada</string> + <string name="glasses_hands_calibration_required">Validación requerida</string> + <string name="glasses_hands_calibration_required_hint">Los controladores operados con las manos desnudas estarán disponibles después de que la verificación de distancia medida sea exitosa.</string> + <string name="tracking_recovery_lost">Seguimiento perdido</string> + <string name="tracking_recovery_look">Mira a tu alrededor lentamente en una habitación bien iluminada.\nMantén las cámaras de seguimiento despejadas y enfoca los muebles u otros detalles visibles.</string> + <string name="tracking_recovery_restart_help">¿Sigues estancado? En su teléfono: gafas inteligentes → Seguimiento → Abrir configuración → Mostrar diagnóstico → Reiniciar seguimiento.</string> + <string name="tracking_recovery_disconnected">Gafas inteligentes desconectadas</string> + <string name="tracking_recovery_connect">Verifique la conexión USB y vuelva a conectar las gafas inteligentes.\nAcepte el mensaje de acceso USB en su teléfono si aparece.</string> + <string name="tracking_recovery_usb_help">Una vez conectado, mire lentamente a su alrededor en una habitación bien iluminada para restablecer el seguimiento.</string> + <string name="tracking_recovery_recenter">Es necesario volver a centrar</string> + <string name="tracking_recovery_recenter_steps">El seguimiento ha vuelto a una nueva posición.\nMira hacia adelante y luego toca \"Restablecer centro de seguimiento\" en tu teléfono.</string> + <string name="tracking_recovery_recenter_help">También puedes encontrar la opción para restablecer el centro de seguimiento en las gafas inteligentes → Seguimiento → Abrir configuración. Se conserva la calibración de la cámara guardada.</string> + <string name="tracking_recovery_stabilizing">Quédate quieto por un momento</string> + <string name="tracking_recovery_hold">El restablecimiento del centro de seguimiento está en curso.\nMantén las gafas inteligentes estables mientras se estabiliza el seguimiento.</string> + <string name="tracking_recovery_automatic">Esta pantalla se cierra automáticamente cuando el seguimiento de la cabeza está listo.</string> + <string name="glasses_steady_hand_aim">Apuntar estabilizado con las manos</string> + <string name="glasses_steady_hand_aim_hint">Apunta desde tu hombro a través de tu palma. Apague para rotación controlada por la muñeca.</string> + <string name="spatial_title">Configuración espacial</string> + <string name="spatial_wait_tracking">Esperando seguimiento…</string> + <string name="spatial_cameras_description">Cámaras de seguimiento izquierda y derecha</string> + <string name="spatial_camera_sync">Sincronización de cámaras</string> + <string name="spatial_ready">Listo</string> + <string name="spatial_sync_hint">Esperando que la cámara y el seguimiento de la cabeza se alineen. Mantenga las gafas inteligentes conectadas.</string> + <string name="spatial_prepare">1. Prepare el objetivo de calibración</string> + <string name="spatial_print_actual">Imprimir en tamaño real</string> + <string name="spatial_print_hint">Cada cuadrado debe medir 30 mm (1.181 in). Monte la hoja plana sobre una superficie rígida en un área bien iluminada.</string> + <string name="spatial_print">Imprimir patrón de calibración</string> + <string name="spatial_capture_group">2. Captura diferentes vistas</string> + <string name="spatial_board_stationary">Mantener estacionario el objetivo de calibración</string> + <string name="spatial_capture_hint">Acerque, aleje y lateralmente las gafas inteligentes. Gírelos hacia la izquierda/derecha, inclínelos hacia arriba/abajo e inclínelos hacia los lados. Mantenga el objetivo de calibración en ambas cámaras y haga una pausa breve antes de cada captura.</string> + <string name="spatial_start">Iniciar nueva calibración</string> + <string name="spatial_wait_sync">Esperando sincronización de cámaras.</string> + <string name="spatial_start_hint">Inicie una nueva calibración para recopilar vistas.</string> + <string name="spatial_views_hint">Mantenga el objetivo de calibración visible en ambas vistas previas. Capture al menos 24 vistas nítidas desde diferentes ángulos.</string> + <string name="spatial_capturing">Capturando…</string> + <string name="spatial_capture">Capturar vista del objetivo de calibración</string> + <string name="spatial_alignment">Calcular la alineación de la cámara</string> + <string name="spatial_calculating">Calculando…</string> + <string name="spatial_calculate">Calcular calibración</string> + <string name="spatial_distance_group">3. Verifique la distancia</string> + <string name="spatial_distance">Distancia medida</string> + <string name="spatial_distance_hint">Comience con 12 pulgadas o 30 cm para que los marcadores impresos sean más fáciles de detectar. Elige la medida exacta que utilizarás.</string> + <string name="spatial_camera_board_distance">Cámara izquierda al centro del objetivo de calibración</string> + <string name="spatial_checking_distance">Comprobando la distancia...</string> + <string name="spatial_validate">Validar distancia</string> + <string name="spatial_diagnostics">Diagnóstico</string> + <string name="spatial_show_diagnostics">Mostrar diagnóstico</string> + <string name="spatial_diagnostics_hint">Herramientas de recuperación de seguimiento y sincronización de cámaras.</string> + <string name="spatial_camera_timing">Sincronización de la cámara</string> + <string name="spatial_hand_input">Entrada del seguimiento de manos</string> + <string name="spatial_wait_timing">Esperando la sincronización de la cámara.</string> + <string name="spatial_frames">Imágenes de la cámara</string> + <string name="spatial_gpu">Detección de manos por GPU</string> + <string name="spatial_gpu_hint">CPU es el valor predeterminado. La GPU es experimental y puede hacer que SteamVR se reinicie. Esta opción se restablece cuando se reinicia el seguimiento.</string> + <string name="spatial_lite">Detección Lite de modelos de manos.</string> + <string name="spatial_lite_hint">Utilice el detector de palma Lite y los puntos clave Lite en las manos. Compruebe la precisión de apuntar, pellizcar y agarrar. Se reinicia cuando se reinicia el seguimiento.</string> + <string name="spatial_adaptive">Frecuencia de entrada automática para seguimiento de manos</string> + <string name="spatial_adaptive_hint">Ajusta la entrada a la velocidad de procesamiento. Se reinicia cuando se reinicia el seguimiento.</string> + <string name="spatial_half_rate">Limitar la frecuencia de entrada para el seguimiento de manos</string> + <string name="spatial_half_rate_hint">Utilice la mitad de las imágenes de la cámara. Apague para comparar la frecuencia máxima. Se reinicia cuando se reinicia el seguimiento.</string> + <string name="spatial_diagnostic_capture">Captura de diagnóstico</string> + <string name="spatial_diagnostic_capture_hint">Guarde un par de imágenes estéreo localmente. Las imágenes se guardan sólo cuando se solicitan.</string> + <string name="spatial_save_frame">Guardar imagen de la cámara</string> + <string name="spatial_restart_tracking">Reiniciar seguimiento</string> + <string name="spatial_restart_hint">Úselo si el seguimiento no se recupera en un área bien iluminada. Un reinicio requiere un nuevo origen de seguimiento.</string> + <string name="spatial_restart">Reiniciar</string> + <string name="spatial_restart_title">¿Reiniciar el seguimiento?</string> + <string name="spatial_restart_confirm">Se perderán las vistas de calibración no guardadas. Mantén las gafas inteligentes quietas y restablece el centro de seguimiento cuando se restablezca el seguimiento.</string> + <string name="spatial_views_count">%1$d / 24 vistas capturadas</string> + <string name="spatial_capture_paused">Captura en pausa: %1$s</string> + <string name="spatial_measure_hint">Medida %1$s. Muestre el objetivo de calibración completo en ambas vistas previas y luego quédese quieto.</string> + <string name="spatial_timing_values">%1$.1f Hz • antigüedad de la imagen %2$.1f ms • procesamiento %3$.1f ms</string> + <string name="spatial_input_values">Límite de entrada %1$.1f Hz • %2$.0f%% de imágenes de la cámara. El seguimiento de la cabeza continúa con su frecuencia máxima.</string> + <string name="spatial_frame_counts">%1$d procesado • %2$d descartado • %3$d omitido por límite de entrada</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Calibración de Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Imprimir a 100% / Tamaño real. Cada cuadrado: 30 mm (1,181 pulgadas).</string> + <string name="spatial_print_stationary">Mantenga el objetivo de calibración plano y estacionario; mueve las gafas inteligentes entre capturas.</string> + <string name="spatial_print_check">Verificación de escala: 100 mm (3,937 in) entre marcas</string> + <string name="spatial_distance_12in">12 pulgadas (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 pulgadas)</string> + <string name="spatial_distance_20in">20 pulgadas (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 pulgadas)</string> + <string name="spatial_disabled">Deshabilitado</string> + <string name="spatial_wait_stable">Esperando seguimiento estable</string> + <string name="spatial_disconnected">Desconectado</string> + <string name="spatial_hands_off">Los controladores operados con las manos desnudas están apagados</string> + <string name="spatial_tracking_off">El seguimiento posicional está desactivado o las gafas inteligentes están desconectadas</string> + <string name="spatial_recenter_pending">Se ha solicitado el restablecimiento del centro de seguimiento; mantén las gafas quietas mientras se estabiliza el seguimiento.</string> + <string name="spatial_tracking_lost">Seguimiento perdido: frente a un área bien iluminada con detalles visibles</string> + <string name="spatial_origin_changed">El origen del seguimiento ha cambiado; pulsa el botón para restablecer el centro de seguimiento y mantén las gafas quietas.</string> + <string name="spatial_active">6DoF activo</string> + <string name="spatial_connect_hint">Conecte Luma Ultra y habilite el seguimiento posicional.</string> + <string name="spatial_validation_session">Calibración verificada para esta conexión.</string> + <string name="spatial_validation_saved">Calibración verificada y guardada.</string> + <string name="spatial_wait_cameras">Esperando cámaras estéreo</string> + <string name="spatial_wait_hands">Esperando seguimiento de manos</string> + <string name="spatial_collect_instructions">Mantenga estacionario el objetivo de calibración 5 × 7. Capture más de 24 vistas mientras mueve y gira las gafas inteligentes.</string> + <string name="spatial_capture_pending">Esperando la siguiente imagen de la cámara. Mantenga quietas las gafas inteligentes.</string> + <string name="spatial_validation_pending">Comprobación de la siguiente imagen de la cámara. Mantenga visible el objetivo de calibración completo y manténgalo quieto.</string> + <string name="spatial_start_first">Iniciar la calibración primero</string> + <string name="spatial_no_camera_frame">No llegó ninguna imagen nueva de la cámara. Verifique la conexión de las gafas inteligentes y las vistas previas de la cámara, luego vuelva a intentarlo.</string> + <string name="spatial_clock_reset">Reinicio del reloj de la cámara</string> + <string name="spatial_frame_changed">El sistema de coordenadas de seguimiento ha cambiado. Tus vistas se guardan para su recálculo. Restablece el centro de seguimiento y, a continuación, inicia una nueva configuración para capturar más vistas.</string> + <string name="spatial_device_loaded">calibración del dispositivo cargada</string> + <string name="spatial_base_loaded">Calibración de base Luma Ultra cargada</string> + <string name="spatial_calibration_needed">calibración requerida</string> + <string name="spatial_tap_start">Toque Iniciar nueva calibración primero.</string> + <string name="spatial_capture_recenter_pending">El restablecimiento del centro de seguimiento está esperando un seguimiento estable. Mantén las gafas quietas un momento.</string> + <string name="spatial_capture_recenter">El seguimiento ha cambiado. Pulsa el botón para restablecer el centro de seguimiento una vez y, a continuación, mantén las gafas quietas antes de capturar.</string> + <string name="spatial_capture_unsynchronized">Captura rechazada: el seguimiento de la cabeza no se sincronizó o cambió durante la captura. Quédate quieto y vuelve a intentarlo.</string> + <string name="spatial_align_first">Calcule la alineación de la cámara antes de verificar la distancia.</string> + <string name="spatial_processing_failed">el procesamiento de la cámara falló</string> + <string name="spatial_hand_head_changed">El seguimiento de la cabeza cambió durante la detección de manos</string> + <string name="spatial_hand_wait_sync">Esperando la sincronización de la cámara y el cabezal</string> + <string name="spatial_no_wrists">No se detectaron muñecas. Mantenga las manijas del controlador Joy-Con frente a las gafas inteligentes</string> + <string name="spatial_no_hands">No se detectaron manos. Muestre las palmas abiertas frente a las gafas inteligentes.</string> + <string name="spatial_one_camera_wrists">Muñecas visibles en una sola cámara; mantenga los identificadores de su controlador en la vista compartida</string> + <string name="spatial_one_camera_hands">Manos visibles en una sola cámara; mantenga ambas palmas en la vista compartida</string> + <string name="spatial_ambiguous_hands">Ambas cámaras ven manos, pero la coincidencia izquierda/derecha es ambigua</string> + <string name="spatial_inconsistent_depth">Se detectaron manos, pero la profundidad estéreo no es consistente</string> + <string name="spatial_rejected_wrist">Posición de la muñeca rechazada por controles estéreo o de movimiento</string> + <string name="spatial_inconsistent_palm">Se detectaron puntos estéreo, pero la geometría de la palma es inconsistente</string> + <string name="spatial_hands_need_calibration">Calibración completa y verificación de distancia para permitir que las manos</string> + <string name="spatial_hands_wait_stable">Esperando un seguimiento de cabeza estable; restablece el centro de seguimiento si se solicita.</string> + <string name="spatial_old_frame">La observación con cámara es demasiado antigua; esperando un par nuevo</string> + <string name="spatial_fit_ready">Ajustar %1$.2f px. Mida la distancia seleccionada desde la cámara izquierda hasta el centro del objetivo de calibración y luego valide.</string> + <string name="spatial_opencv_error">OpenCV no disponible: %1$s</string> + <string name="spatial_restored">%1$d vistas guardadas restauradas. Calcule la calibración para volver a intentarlo o comience un nuevo conjunto para capturar más.</string> + <string name="spatial_captured">Capturado %1$d / 24 vistas. Mantenga fijo el objetivo de calibración; Mueva las gafas inteligentes para la siguiente vista.</string> + <string name="spatial_capture_corners">Captura rechazada: %1$d / 12 esquinas requeridas visibles en ambas cámaras. Muestre más del objetivo de calibración, quédese quieto y vuelva a intentarlo.</string> + <string name="spatial_validation_error">La verificación de distancia no pudo finalizar: %1$s. Intentar otra vez.</string> + <string name="spatial_inference_error">Detección de manos no disponible: %1$s. Cambie la CPU/GPU o cambie los controladores operados con las manos desnudas para volver a intentarlo.</string> + <string name="spatial_hand_timeout">La detección de manos superó los %1$d ms; observación descartada</string> + <string name="spatial_wrists_tracked">%1$d / 2 posiciones de muñeca Joy-Con medidas por estéreo</string> + <string name="spatial_palms_tracked">Palmas seguidas: %1$d / 2; gesto de pinza listo: %2$d; agarre listo: %3$d</string> + <string name="spatial_capture_saved">Captura de diagnóstico guardada en %1$s</string> + <string name="spatial_hand_error">Seguimiento de manos detenido: %1$s</string> + <string name="spatial_stereo_loaded">Estéreo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">El seguimiento de la cabeza y el objetivo de calibración difieren en %1$s (límite de 5 cm/2 pulgadas). Mantenga fijo el objetivo de calibración y espere un seguimiento constante antes de comenzar una nueva serie. Gire e incline suavemente las gafas inteligentes; pausa antes de cada captura.</string> + <string name="spatial_need_views">Capture al menos 24 vistas variadas del objetivo de calibración estacionario.</string> + <string name="spatial_need_rotation">Gire las gafas inteligentes hacia la izquierda y hacia la derecha, e inclínelas hacia arriba y hacia abajo; el movimiento sin rotación no puede calibrar la alineación de la cámara.</string> + <string name="spatial_bad_baseline">Línea de base de cámara inverosímil</string> + <string name="spatial_need_orientations">Mueve la cabeza en orientaciones más variadas.</string> + <string name="spatial_bad_rotation">Rotación de cámara a cabezal no válida</string> + <string name="spatial_bad_alignment">La alineación entre la cámara y el cabezal es inconsistente.</string> + <string name="spatial_calibration_error">La calibración no pudo finalizar. %1$s Tus vistas capturadas se guardan.</string> + <string name="spatial_reprojection_error">El error de reproyección retenida %1$.2f px supera los 2 px. Recalibrar.</string> + <string name="spatial_distance_corners">%1$d / 24 esquinas de tablero de ajedrez detectadas en ambas cámaras. Mantenga visible el objetivo de calibración completo y manténgalo quieto. Si ya es visible, seleccione 12 pulgadas o 30 cm y mida esa distancia más cercana antes de volver a intentarlo.</string> + <string name="spatial_distance_depth">El objetivo de calibración es visible, pero su profundidad no se pudo medir de manera confiable. Mantenga las gafas inteligentes quietas y mantenga el objetivo de calibración plano y bien iluminado, luego vuelva a intentarlo.</string> + <string name="spatial_distance_invalid">La ​​medición de la cámara no fue válida. Quédate quieto y vuelve a intentarlo.</string> + <string name="spatial_distance_passed">Se pasó la verificación de distancia.</string> + <string name="spatial_distance_retry">Vuelva a verificar la distancia desde la cámara izquierda al centro del objetivo de calibración y luego vuelva a intentarlo.</string> + <string name="spatial_distance_result">Las cámaras midieron %1$s; distancia seleccionada %2$s. %3$s</string> + <string name="spatial_wait_previews">Espere las vistas previas de ambas cámaras antes de comenzar la calibración.</string> + <string name="spatial_saved_views_hint">Las vistas guardadas se pueden recalcular. Inicie una nueva calibración para capturar en el sistema de coordenadas de seguimiento actual.</string> + <string name="spatial_model_checksum_error">La suma de comprobación del modelo de mano no coincide</string> + <string name="spatial_opencv_load_error">OpenCV no se pudo cargar</string> +</resources> diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml new file mode 100644 index 0000000000..303feb9f42 --- /dev/null +++ b/app/src/main/res/values-bg/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Графиката на SteamVR спря</string> + <string name="steamvr_recovery_countdown">DroidDeck ще се рестартира след %1$d секунди, за да нулира графиката и да отвори отново SteamVR. Текущата ви игра ще бъде затворена; незапазеният напредък не може да бъде възстановен.</string> + <string name="steamvr_recovery_repeated">Графичната грешка се появи отново след скорошно рестартиране. Автоматичното възстановяване е на пауза, за да се избегне зацикляне. Рестартирането ще затвори играта ви; незапазеният напредък не може да бъде възстановен.</string> + <string name="steamvr_recovery_restart">Рестартиране сега</string> + <string name="steamvr_recovery_cancel">Остави отворено</string> + <string name="steamvr_recovery_restarting">Нулиране на графиката и повторно отваряне на SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck не успя да се рестартира автоматично. Затворете приложението напълно и след това го отворете отново.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Първото стартиране изтегля Steam. Това може да отнеме няколко минути.</item> + <item>По подразбиране излизането от приложението поставя Steam на пауза; при връщане продължава от същото място.</item> + <item>Контролерът ви се разпознава като контролер Xbox 360. В противен случай използвайте екранните контроли.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Първото стартиране подготвя работния плот. Това може да отнеме няколко минути.</item> + <item>По подразбиране излизането от приложението поставя сесията на пауза; при връщане тя продължава от същото място.</item> + <item>Докосването действа като тъчпад: плъзгане премества показалеца, докосване щраква.</item> + <item>Контролерът ви се разпознава като контролер Xbox 360. В противен случай използвайте екранните контроли.</item> + </string-array> + <string name="session_channel">Сесия</string> + <string name="session_channel_description">Показва се, докато има отворена сесия на Steam или работния плот</string> + <string name="session_notification">Steam работи</string> + <string name="session_notification_downloads">Активно изтегляне в Steam</string> + <string name="session_notification_paused">Сесията е на пауза – докоснете „Продължи“, когато сте готови</string> + <string name="resume_session">Продължи</string> + <string name="suspend_now">Приспи сега</string> + <string name="stop_session">Спри сесията</string> + <string name="frame_gen_title">Генериране на кадри</string> + <string name="frame_gen_hint">Изберете режима на генериране на кадри</string> + <string name="frame_gen_off">Изключено</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptive %1$d</string> + <string name="lsfg_needs_steam">Изисква Lossless Scaling в Steam</string> + <string name="lsfg_needs_install">Инсталирайте Lossless Scaling в Steam или импортирайте Lossless.dll</string> + <string name="lsfg_import">Импортиране на Lossless.dll…</string> + <string name="lsfg_using_steam">Използва се копието от Steam</string> + <string name="lsfg_using_import">Използва се импортирано копие</string> + <string name="lsfg_pick_title">Изберете Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll е импортиран</string> + <string name="lsfg_import_unchanged">Този Lossless.dll вече се използва</string> + <string name="lsfg_import_not_owned">Lossless Scaling не е закупен за този акаунт в Steam</string> + <string name="lsfg_import_invalid">Този файл не е Lossless.dll на Lossless Scaling</string> + <string name="lsfg_import_failed">LSFG не можа да се подготви от този Lossless.dll</string> + <string name="lsfg_problem_missing">LSFG изисква Lossless Scaling от Steam или импортиран Lossless.dll</string> + <string name="lsfg_problem_failed">LSFG не можа да подготви шейдърите си от Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: не се поддържа</string> + <string name="hud_fg_failed">%1$s: грешка в двигателя</string> + <string name="hud_fg_needs_lossless">%1$s: изисква Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · стартиране</string> + <string name="second_library_import_hint">Добавя библиотека на Steam и я сканира за игри за Windows. Притежаваните игри използват записите си в Steam; останалите стават преки пътища извън Steam.</string> + <string name="game_env_title">Среда на играта</string> + <string name="game_env_hint">Променливи на средата за игри с Proton.</string> + <string name="game_env_edit">Редактиране</string> + <string name="game_env_shared">Всички игри с Proton</string> + <string name="game_env_scope">Профил</string> + <string name="game_env_app_id">ID на приложението в Steam</string> + <string name="game_env_open">Отвори</string> + <string name="game_env_profile">Игра %1$s</string> + <string name="game_env_add">Добавяне на променлива</string> + <string name="game_env_name">Име на променливата</string> + <string name="game_env_value">Стойност</string> + <string name="game_env_save">Запиши</string> + <string name="game_env_remove">Премахни</string> + <string name="game_env_restore">Наследи отново</string> + <string name="game_env_reset">Изчистване на промените в средата</string> + <string name="game_env_unset">Премахни за този профил</string> + <string name="game_env_empty">Няма зададени променливи.</string> + <string name="game_env_inherited">Наследена</string> + <string name="game_env_custom">Персонализирана променлива</string> + <string name="game_env_error">Не можа да се зареди или запише. Проверете свободното място в хранилището и опитайте пак.</string> + <string name="game_env_invalid">Използвайте валидно име и стойност до 8192 знака.</string> + <string name="game_env_unused">Стандартната среда на Proton не отчита тази променлива.</string> + <string name="game_env_loading">Зареждане…</string> + <string name="game_env_feature">Замяна на нивото на възможности на D3D12. 12_2 показва възможности на DirectX 12 Ultimate; неподдържаните функции може да дадат грешка. Оставете незададено за автоматично откриване.</string> + <string name="game_env_shader">Замяна на модела на шейдъри на D3D12. 6_9 изисква достатъчно нов VKD3D и съответстващи възможности на GPU. Оставете незададено за автоматично откриване.</string> + <string name="game_env_cache">Дръжте кеширането на шейдъри на Mesa включено, за да намалите повтарящото се компилиране. false разрешава кеширането.</string> + <string name="game_env_cache_size">Максимален размер на кеша за шейдъри на Mesa, например 1G. По-големите кешове използват повече място в хранилището.</string> + <string name="game_env_vkd3d_config">Настройки на VKD3D за D3D12. nodxr изключва трасирането на лъчи; използвайте само за игра, която го изисква.</string> + <string name="game_env_proton_log">Задайте 1 за диагностичен дневник на Proton. Записването на дневник може да намали производителността и да използва място в хранилището.</string> + <string name="game_env_wined3d">Задайте 1, за да използвате WineD3D, базиран на OpenGL, вместо DXVK за тестване на съвместимост с D3D9–11.</string> + <string name="game_env_no_ntsync">Задайте 1, за да изключите ntsync (droiddeck-ntsync или драйвер на ядрото) за тази игра; тогава се използва droiddeck-esync, ако има пакет, или droiddeck-fsync в противен случай.</string> + <string name="game_env_no_esync">Задайте 1, за да изключите droiddeck-esync за тази игра; вместо това се използва droiddeck-fsync, или droiddeck-ntsync, ако fsync също е изключен.</string> + <string name="game_env_no_fsync">Задайте 1, за да изключите droiddeck-fsync за тази игра; тогава се използва droiddeck-esync, ако има пакет, или droiddeck-ntsync в противен случай.</string> + <string name="game_env_fsync_first">Задайте 1, за да стартирате тази игра с droiddeck-fsync, или 0, за да поставите droiddeck-esync на първо място, ако има пакет, подходящ за нейния Proton.</string> + <string name="game_env_xalia">Задайте 0, за да изключите помощника на Proton за навигация с контролер за тази игра.</string> + <string name="game_env_hud">Насложен слой на DXVK за D3D9–11. fps показва честотата на кадрите; незададено го скрива.</string> + <string name="game_env_dxvk_config">Настройки на DXVK, разделени с точка и запетая. По-новите версии използват dxvk.maxFrameRate за ограничаване на кадрите; за обикновена игра предпочитайте ограничителя на кадри на сесията.</string> + <string name="game_env_vkd3d_limit">Ограничение на честотата на кадрите за D3D12. 0 изключва ограничението.</string> + <string name="game_env_glthread">Многонишковост на Mesa OpenGL. true може да помогне при игри с OpenGL, ограничени от процесора; тествайте за всяка игра.</string> + <string name="sync_backend_title">Синхронизация на Wine</string> + <string name="sync_backend_hint">Как игрите поддържат нишките си синхронизирани. Прилага се от следващата сесия.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Предварителна настройка на FEX</string> + <string name="fex_next_launch">Прилага се при следващото стартиране на играта.</string> + <string name="game_settings_title">Игри</string> + <string name="fex_default_label">Стандартни настройки на FEX</string> + <string name="fex_default_detail">Използва стандартните настройки на FEX.</string> + <string name="fex_stability_label">Стабилност</string> + <string name="fex_stability_detail">Най-безопасните и най-бавните настройки.</string> + <string name="fex_compatibility_label">Съвместимост</string> + <string name="fex_compatibility_detail">Пълен TSO с multiblock.</string> + <string name="fex_intermediate_label">Средно</string> + <string name="fex_intermediate_detail">Балансиран TSO с намалена точност на x87.</string> + <string name="fex_performance_label">Производителност</string> + <string name="fex_performance_detail">Целият TSO е изключен; multiblock.</string> + <string name="fex_performance_tso_label">Производителност + TSO</string> + <string name="fex_performance_tso_detail">Настройки за производителност с включен основен TSO.</string> + <string name="fex_extreme_label">Екстремно</string> + <string name="fex_extreme_detail">Изключва проверките за самопроменящ се код. Игри с JIT и DRM може да спрат да работят.</string> + <string name="fex_extreme_tso_label">Екстремно + TSO</string> + <string name="fex_extreme_tso_detail">Екстремни настройки с включен основен TSO.</string> + <string name="fex_extreme_gn_label">Extreme-gn</string> + <string name="fex_extreme_gn_detail">Производителност с TSC и подсказки за метаданни. Пробвайте преди Екстремно.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Производителност с пълни проверки на кода и скрит hypervisor бит.</string> + <string name="game_env_custom_value">Персонализирана стойност</string> + <string name="game_env_select_value">Избор на стойност</string> + <string name="user_apps_section">Емулатори и приложения</string> + <string name="user_apps_add">Добави</string> + <string name="user_apps_add_detail">Ваше собствено приложение или игра</string> + <string name="user_apps_kind_script">Скрипт</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Стартиране…</string> + <string name="user_apps_added">Добавено: %1$s</string> + <string name="user_apps_removed">Премахнато: %1$s</string> + <string name="user_apps_back">Работен плот</string> + <string name="user_apps_gone">Това приложение вече не съществува. Изберете го отново от работния плот.</string> + <string name="user_apps_open">Отвори %1$s</string> + <string name="user_apps_remove">Премахни</string> + <string name="user_apps_remove_confirm">Натиснете отново, за да премахнете</string> + <string name="user_apps_stop_session">Спрете сесията, за да премахнете</string> + <string name="user_apps_script_linked">Стартира %1$s от папката му, свързана към сесията там, където се намира. Премахването на приложението не докосва тази папка.</string> + <string name="user_apps_script_copied">Стартира %1$s от копие на папката му в DroidDeck. Премахването на приложението изтрива копието, а не оригинала.</string> + <string name="user_apps_runtime_required">Първо инсталирайте средата на Linux</string> + <string name="user_apps_file_gone">Файлът вече не съществува</string> + <string name="user_apps_no_space">Няма достатъчно свободно място: копирането на папката изисква %1$s</string> + <string name="user_apps_copying">Копиране на %1$s</string> + <string name="user_apps_failed">Добавянето на приложението не бе успешно</string> + <string name="user_apps_github_checking">Търсене на издание на %1$s</string> + <string name="user_apps_github_unreachable">Изданията на %1$s не можаха да се прочетат</string> + <string name="user_apps_github_no_appimage">Никое издание на %1$s няма AppImage за ARM64 или x86_64</string> + <string name="user_apps_downloading">Изтегляне на %1$s</string> + <string name="user_apps_download_failed">Изтеглянето не бе успешно</string> + <string name="user_apps_update_failed">Актуализирането на приложението не бе успешно</string> + <string name="user_apps_icon_failed">Тази икона не можа да бъде прочетена</string> + <string name="user_apps_saved">Запазено: %1$s</string> + <string name="user_apps_edit">Редактиране</string> + <string name="user_apps_check_updates">Проверка за актуализации</string> + <string name="user_apps_checking_updates">Проверка за актуализации…</string> + <string name="user_apps_update_to">Актуализиране до %1$s</string> + <string name="user_apps_up_to_date">Актуално · %1$s</string> + <string name="user_apps_updated">Актуализирано: %1$s</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Добавяне на приложение</string> + <string name="add_app_tab_script">Скрипт</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Файл .sh. Стартира от собствената си папка, на цял екран под gamescope.</string> + <string name="add_app_appimage_hint">AppImage за ARM64 (aarch64) или за x86_64, който се стартира през FEX. Разопакова се в средата на Linux само веднъж.</string> + <string name="add_app_github_hint">Инсталира AppImage за ARM64 от най-новото издание на хранилището, или вариант за x86_64 през FEX.</string> + <string name="app_fex_title">Използване на FEX</string> + <string name="app_fex_auto">Автоматично</string> + <string name="app_fex_on">Включено</string> + <string name="app_fex_off">Изключено</string> + <string name="app_fex_hint">FEX стартира x86 Linux програми на това ARM64 устройство. Автоматично го използва, когато програмата е компилирана за x86.</string> + <string name="app_fex_x86">%1$s през FEX</string> + <string name="app_fex_not_ready">Тази програма е компилирана за %1$s компютри и се стартира през FEX, който още не е настроен. Отворете Steam веднъж, докато сте влезли: DroidDeck ще изтегли FEX и необходимата Steam Linux Runtime, след което тя ще се отвори.</string> + <string name="session_end_program">Тази програма</string> + <string name="session_end_fex_missing">%1$s е компилирана за x86 компютри и се стартира през FEX, който още не е инсталиран. Стартирайте Steam веднъж, докато сте влезли, и го оставете да изтегли FEX и Steam Linux Runtime, след което стартирайте отново.</string> + <string name="add_app_flatpak_hint">ID на приложение в Flathub или страницата му в Flathub. Flatpak се настройва първо, ако още не е.</string> + <string name="add_app_file">Файл</string> + <string name="add_app_no_file">Не е избран файл</string> + <string name="add_app_choose_file">Избор на файл</string> + <string name="add_app_change_file">Промяна</string> + <string name="add_app_pick_script">Изберете скрипт</string> + <string name="add_app_pick_appimage">Изберете AppImage</string> + <string name="add_app_pick_icon">Изберете икона</string> + <string name="add_app_repository">Хранилище</string> + <string name="add_app_repository_placeholder">owner/repo или връзка към github.com</string> + <string name="add_app_repository_invalid">Това не е хранилище в GitHub</string> + <string name="add_app_flatpak_id">ID на приложението</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Това не е ID на приложение в Flathub</string> + <string name="add_app_flatpak_bundle_hint">Или файл .flatpak за приложение, което не е в Flathub.</string> + <string name="add_app_pick_flatpak">Изберете файл .flatpak</string> + <string name="add_app_source">Източник</string> + <string name="add_app_appearance">На вашия работен плот</string> + <string name="add_app_preview_name">Ново приложение</string> + <string name="add_app_name">Име</string> + <string name="add_app_name_placeholder">От приложението</string> + <string name="add_app_icon">Икона</string> + <string name="add_app_icon_default">Стандартна икона</string> + <string name="add_app_choose_icon">Избор на икона</string> + <string name="add_app_clear_icon">Изчистване</string> + <string name="add_app_icon_suggestions">От хранилището</string> + <string name="add_app_icon_searching">Търсене на икони…</string> + <string name="add_app_icon_reset">Стандартна</string> + <string name="edit_app_title">Редактиране на %1$s</string> + <string name="edit_app_save">Запиши</string> + <string name="add_app_checking_folder">Проверка на папката…</string> + <string name="add_app_folder_linked">Папката му е свързана към сесията: %1$s</string> + <string name="add_app_folder_copied">Папката му съдържа Linux програми, които общото хранилище не може да стартира, затова се копира в DroidDeck (%1$s).</string> + <string name="add_app_confirm">Добави</string> + <string name="add_app_cancel">Отказ</string> + <string name="add_app_runtime_required">Първо инсталирайте средата на Linux от Настройка.</string> + <string name="add_app_busy">Изчакайте %1$s да завърши.</string> + <string name="steam_compat_label">Съвместим</string> + <string name="proton_compatible_note">Версиите, отбелязани с „%1$s“ в менюто за съвместимост на Steam, имат поправки на DroidDeck за префикса и стартират игри тук. По подразбиране е Proton Experimental ARM64 (%1$s), или Proton 11.0 ARM64 (%1$s), след като се инсталира тази по-нова версия. Собствените записи на Proton от Valve без тази отметка не могат да стартират игра на това устройство.</string> + <string name="proton_installed_compatible">Инсталирано %1$s · %2$s</string> + <string name="common_cancel">Отказ</string> + <string name="common_auto">Автоматично</string> + <string name="common_never">Никога</string> + <string name="common_always">Винаги</string> + <string name="common_uninstall">Деинсталиране</string> + <string name="common_check">Проверка</string> + <string name="common_update">Актуализация</string> + <string name="common_checking">Проверка…</string> + <string name="common_working">Обработва се…</string> + <string name="common_forget">Забрави</string> + <string name="common_add_ellipsis">Добави…</string> + <string name="common_use">Използвай</string> + <string name="common_applies_next_session">Прилага се от следващата сесия.</string> + <string name="mode_steam_title">Сесия на Steam</string> + <string name="mode_desktop_title">Сесия на работния плот</string> + <string name="mode_display">Екран</string> + <string name="mode_resolution">Резолюция</string> + <string name="mode_res_720">До 720p</string> + <string name="mode_res_900">До 900p</string> + <string name="mode_res_1080">До 1080p</string> + <string name="mode_res_native">Естествена</string> + <string name="mode_res_default">%1$s (по подразбиране)</string> + <string name="mode_res_custom_value">Персонализирана · %1$d×%2$d</string> + <string name="mode_res_custom">Персонализирана…</string> + <string name="mode_res_note">720p може да направи менютата по-отзивчиви.</string> + <string name="mode_ratio">Пропорции на екрана</string> + <string name="mode_ratio_custom">Определени от персонализираната резолюция.</string> + <string name="mode_ratio_auto">Автоматично използва поне 16:9.</string> + <string name="mode_fps">Ограничение на кадрите</string> + <string name="mode_fps_note">Ограничава цялата сесия. Екранът преминава към честота на опресняване, която се дели точно на ограничението.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10 изход</string> + <string name="mode_hdr_unavailable">Не е налично: %1$s.</string> + <string name="mode_hdr_restart">Рестартирайте приложението, за да се приложи.</string> + <string name="mode_drivers">Драйвери</string> + <string name="mode_gpu_drivers">GPU драйвери</string> + <string name="mode_gpu_drivers_hint">Общи за Steam и работния плот. Задават се в страницата Компоненти.</string> + <string name="mode_touch_controls">Докосване и контроли</string> + <string name="mode_touch">Докосване</string> + <string name="mode_touch_touchpad">Тъчпад</string> + <string name="mode_touch_direct">Директно</string> + <string name="mode_touch_note">Автоматично: тъчпад на работния плот, директно в Steam.</string> + <string name="mode_osc">Екранни контроли</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Автоматично показва контролите, когато няма свързан контролер.</string> + <string name="osc_steam_touch">Докосване в Steam (бета)</string> + <string name="osc_style_next_session">Сензорните контроли на Steam ще стартират от следващата сесия на Steam</string> + <string name="osc_steam_layout">Разположение на докосването в Steam</string> + <string name="osc_steam_layout_hint">Премествайте, преоразмерявайте или скривайте сензорните контроли на тази игра; записва се в Steam</string> + <string name="mode_controller">Контролер</string> + <string name="mode_controller_hint">Как Steam разпознава контролера ви. Прилага се от следващата сесия.</string> + <string name="mode_controller_deck">Контролер на Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Контролер Xbox 360</string> + <string name="mode_controller_note">Deck: бутон Quick Access и гироскоп. Steam Controller: същото, с усещане за захват на задните бутони. DualShock 4 и DualSense: гироскоп, а тракпадовете служат като тъчпад. Xbox 360: отворете Quick Access с Guide+A.</string> + <string name="mode_back">Back</string> + <string name="back_menu_then_qam">Меню → QAM</string> + <string name="back_qam_then_menu">QAM → Меню</string> + <string name="mode_session">Сесия</string> + <string name="mode_suspend">Поведение във фонов режим</string> + <string name="mode_suspend_hint">Когато приложението е скрито или екранът се изключи.</string> + <string name="mode_suspend_manual">Ръчно</string> + <string name="mode_suspend_native">Системно</string> + <string name="mode_suspend_steam_note">Автоматично поставя на пауза и продължава, когато се покаже отново. Системно подготвя Steam за заспиване първо. Ръчно изчаква „Продължи“. Никога продължава да работи.</string> + <string name="mode_background_downloads">Продължаване на изтеглянията</string> + <string name="mode_background_downloads_hint">Отлага фоновото спиране, докато Steam активно изтегля.</string> + <string name="mode_zram">zRAM компресия</string> + <string name="mode_zram_hint">Докато играта работи, паметта на Steam клиента се компресира в zram на устройството, така че играта получава повече RAM. Важи при следващото стартиране на Steam.</string> + <string name="mode_zram_unsupported">Недостъпно: устройството няма zram или swap, или ядрото е по-старо от 5.4.</string> + <string name="mode_suspend_note">Автоматично поставя на пауза във фонов режим и продължава при показване. Ръчно изчаква „Продължи“. Никога продължава да работи.</string> + <string name="mode_startup">Стартиране</string> + <string name="mode_steam_startup">Стартиране на Steam заедно с DroidDeck</string> + <string name="mode_steam_startup_hint">Отваря сесията на Steam при стартиране на DroidDeck.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Проверка за издания…</string> + <string name="mode_decky_ready">Готово за инсталиране на %1$s.</string> + <string name="mode_decky_none">Не е намерена съвместима версия. Опитайте по-късно.</string> + <string name="mode_decky_installed">Инсталирано · %1$s</string> + <string name="mode_decky_update">Налична актуализация · %1$s</string> + <string name="mode_decky_current">Актуално · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Инсталиране на последната версия</string> + <string name="mode_decky_on">Стартира заедно със Steam. Докато е включено, други приложения на това устройство може да могат да контролират Steam.</string> + <string name="mode_decky_off">Изключено. Портът за отдалечено дебъгване на Steam остава затворен.</string> + <string name="mode_decky_remove_title">Деинсталиране на Decky Loader?</string> + <string name="mode_decky_remove_text">Премахва зареждащия модул. Плъгините и настройките ви се запазват.</string> + <string name="mode_client">Клиент</string> + <string name="mode_mangoapp">Насложен слой за производителност</string> + <string name="mode_mangoapp_hint">Изключете, ако игрите забиват или екранът става черен в режим Deck. Прилага се от следващата сесия.</string> + <string name="mode_steam_repair">Поправка на клиента на Steam</string> + <string name="mode_steam_repair_hint">Изтегля отново клиента на Steam при следващото стартиране на Steam. Използвайте, ако Steam остава на екрана за зареждане. Игрите, влизането в профила и настройките се запазват.</string> + <string name="mode_steam_repair_queued">Клиентът на Steam ще бъде изтеглен отново при следващото стартиране на Steam.</string> + <string name="mode_steam_repair_button">Поправка</string> + <string name="mode_added_art">Изображения</string> + <string name="mode_sgdb_key">API ключ за SteamGridDB</string> + <string name="mode_sgdb_key_yours">Вашият ключ</string> + <string name="mode_sgdb_edit">Редактиране…</string> + <string name="mode_added_art_hint">Попълва липсващите изображения от Steam, а след това от SteamGridDB. Собствените ви файлове cover.jpg, hero.jpg, logo.png или icon.png в папката на играта имат предимство.</string> + <string name="summary_remove_game">Премахване на %1$s</string> + <string name="mode_added_remove_confirm">Премахване?</string> + <string name="games_add">Добавяне на игра</string> + <string name="games_add_title">Добавяне на игра:</string> + <string name="games_pick_exe_title">Изберете .exe файла:</string> + <string name="games_add_unreachable">Това местоположение не е достъпно в сесията</string> + <string name="mode_added_exe_check">Проверка на този .exe файл</string> + <string name="wincomp_title">Компоненти на Windows</string> + <string name="wincomp_pad_hint">LB / RB преминават между разделите.</string> + <string name="wincomp_card_none">Няма</string> + <string name="wincomp_applies">DLL файлове за Windows, които Proton не включва, от списъка с компоненти. Включете тези, от които тази игра се нуждае: те отиват в собствената Windows папка на играта, никога в нейните файлове, и остават независимо на кой Proton се изпълнява тя.</string> + <string name="wincomp_offline">Списъкът с компоненти не можа да се достигне. Вече изтеглените компоненти все още могат да се превключват.</string> + <string name="wincomp_recommended">Препоръчани за тази игра</string> + <string name="wincomp_checking">Проверка какво изисква тази игра…</string> + <string name="wincomp_when_online">Достъпно, когато сте онлайн</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Включване на %1$d компонент…</item> + <item quantity="other">Включване на %1$d компонента…</item> + </plurals> + <string name="wincomp_auto_section">Включени за тази игра</string> + <string name="wincomp_auto_steam">Steam инсталира %1$s с %2$s (приложение %3$s)</string> + <string name="wincomp_auto_gog">От списъка на GOG за тази игра</string> + <string name="wincomp_auto_epic">От изискванията на Epic за тази игра</string> + <string name="wincomp_auto_amazon">От стъпките за инсталиране на Amazon за тази игра</string> + <string name="wincomp_steam_by_name">Steam инсталира %1$s с приложение %2$s, съпоставено по име</string> + <string name="wincomp_suggestions">Също в списъка</string> + <string name="wincomp_suggestion_reason">Посочено от %1$s; не е компонент тук</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Играта включва %1$s</string> + <string name="wincomp_found_shipped">Играта вече има %1$s (често работи така)</string> + <string name="wincomp_already_here">Вече в тази игра</string> + <string name="wincomp_no_recommendation">Нищо в папката на играта не насочва към компонент.</string> + <string name="wincomp_active">Инсталирани за тази игра (%1$d)</string> + <string name="wincomp_all">Всички компоненти (%1$d)</string> + <string name="wincomp_installers">Нуждаят се от инсталатор за Windows (%1$d)</string> + <string name="wincomp_installers_note">Това са самостоятелни инсталационни програми без пакет вътре за разглобяване и все още без запис на какво инсталират. Повечето са стари среди за изпълнение, за които Mono в Proton вече служи като заместник; записи се добавят с течение на времето.</string> + <string name="wincomp_show">Показване</string> + <string name="wincomp_hide">Скриване</string> + <string name="wincomp_needs_installer">Изпълнява собствена инсталационна програма (все още без запис)</string> + <string name="wincomp_unsupported">Все още не се поддържа тук</string> + <string name="wincomp_loading">Зареждане на компонентите…</string> + <string name="wincomp_failed">Инсталирането не бе успешно: %1$s</string> + <string name="wincomp_downloaded">Изтеглено</string> + <string name="wincomp_downloading">Изтегляне на %1$s</string> + <string name="wincomp_installing">Инсталиране: %1$s</string> + <string name="wincomp_reverting">Изключване…</string> + <string name="wincomp_download_size">Изтегляне %1$s</string> + <string name="wincomp_next_launch">Влиза в сила при следващото стартиране на играта.</string> + <string name="mode_stretch169">Разтягане на игри в 16:9</string> + <string name="mode_stretch169_hint">На екрани, по-квадратни от 16:9, разтяга игрите, за да запълнят екрана, вместо да показва ленти. Прилага се от следващата сесия.</string> + <string name="mode_audio">Звук</string> + <string name="mode_directaudio">DirectAudio за игри</string> + <string name="mode_directaudio_hint">Пропуска PulseAudio за по-ниска латентност.</string> + <string name="mode_mic">Микрофон</string> + <string name="mode_mic_hint">За гласов чат.</string> + <string name="mode_network">Мрежа</string> + <string name="mode_wifi_discovery">Откриване на Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Показва имената на Wi-Fi и близките мрежи в Steam.</string> + <string name="mode_wifi_location_off">Услугите за местоположение са изключени.</string> + <string name="mode_wifi_permission_denied">Разрешението за местоположение не е предоставено.</string> + <string name="mode_wifi_open_settings">Отваряне на настройките</string> + <string name="mode_wifi_continue">Продължи</string> + <string name="mode_wifi_explain_title">Включване на откриването на Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android изисква разрешение за местоположение, за да прочете имената на Wi-Fi и да открие близките мрежи. DroidDeck използва този достъп, за да показва тези мрежи в Steam. Не следим местоположението ви. Достъпът до интернет работи без това разрешение.</string> + <string name="mode_storage">Хранилище за игри</string> + <string name="mode_storage_auto">Автоматично – SD картата, когато е налична, плюс папките ви Games</string> + <string name="mode_storage_auto_none">Автоматично – папките ви Games, плюс SD картата, когато е налична (в момента няма)</string> + <string name="mode_storage_internal">Само вътрешна памет</string> + <string name="mode_storage_folder">Папка: %1$s</string> + <string name="mode_second_library">Втора библиотека</string> + <string name="mode_storage_note">Игри, които стриймват ресурси от SD картата или общото хранилище, може да заекват.</string> + <string name="mode_storage_diagnostics">Диагностика на хранилището</string> + <string name="mode_storage_diagnostics_hint">Записва резултатите от заделянето и извадкови времена на хранилището в „Споделяне на дневници“. Може да забави инсталациите, докато е включено. Прилага се от следващата сесия.</string> + <string name="mode_choose_folder">Изберете папка…</string> + <string name="mode_custom_res_title">Персонализирана резолюция</string> + <string name="mode_custom_res_text">Заменя ограничението и пропорцията. Размер, който не съвпада с екрана, получава ленти.</string> + <string name="mode_width">Широчина</string> + <string name="mode_height">Височина</string> + <string name="mode_custom_res_range">Между 320×240 и 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d игра</item> + <item quantity="other">%1$d игри</item> + </plurals> + <string name="common_ok">ОК</string> + <string name="common_delete">Изтрий</string> + <string name="common_restore">Възстанови</string> + <string name="common_download">Изтегли</string> + <string name="common_delete_named">Изтриване на %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Драйвер за изпълнение</string> + <string name="comp_runtime_driver_hint">Използва се от Steam, игрите и работния плот. Прилага се от следващата сесия.</string> + <string name="comp_import_turnip">Импортиране на Turnip zip…</string> + <string name="comp_display_driver">Драйвер за дисплея</string> + <string name="comp_display_driver_hint">Изобразява кадрите на екрана в двата режима. Рестартирайте приложението, за да се приложи.</string> + <string name="comp_import_adrenotools">Импортиране на AdrenoTools zip…</string> + <string name="comp_never">никога</string> + <string name="comp_nightlies_checked">Nightlies проверени %1$s</string> + <string name="comp_title">Компоненти</string> + <string name="comp_about">За Компоненти</string> + <string name="comp_check_drivers">Проверка за нови драйвери</string> + <string name="comp_check_nightlies">Проверка на Nightlies за нови пакети</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Избраният тук Proton стартира всяка игра, която не е избрала свой собствен в Steam, а промяна, направена в Steam, се показва и тук. Steam заменя Proton на Valve при актуализация; оригиналите се запазват за всяка версия.</string> + <string name="comp_scope">Конфигурация</string> + <string name="comp_profile_configure">Конфигуриране на профил</string> + <string name="comp_profile">Профил</string> + <string name="comp_scope_general">Профил по подразбиране</string> + <string name="comp_scope_general_detail">Използва се автоматично от игри без промени.</string> + <string name="comp_profile_game_detail">Записани настройки, използвани автоматично при стартиране на %1$s.</string> + <string name="comp_game_hint">Изберете само настройките, от които тази игра се нуждае. Всичко останало продължава да използва профила по подразбиране.</string> + <string name="comp_game_fex">Предварителна настройка на FEX</string> + <string name="comp_game_fex_inherited">Използва настройката на профила по подразбиране.</string> + <string name="comp_game_fex_override">Персонализирана настройка, запазена за тази игра.</string> + <string name="comp_game_fex_custom">Персонализирани променливи на FEX</string> + <string name="comp_game_use_general">Използване на профила по подразбиране</string> + <string name="comp_game_compatibility">Съвместимост на играта</string> + <string name="comp_game_environment_hint">Настройки на средата за Proton, DXVK, VKD3D и синхронизация за тази игра.</string> + <string name="comp_game_proton_inherited">Използва Proton от профила по подразбиране.</string> + <string name="comp_game_proton_override">Персонализиран Proton, запазен за тази игра чрез таблицата за съвместимост на Steam.</string> + <string name="comp_no_proton_short">Без Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Използва пакета от профила по подразбиране от %1$s, освен ако тази игра избере друг пакет.</string> + <string name="comp_game_component_general">Използва пакета с компоненти от профила по подразбиране.</string> + <string name="comp_game_component_override">Използва %1$s само за тази игра.</string> + <string name="comp_game_runtime_options">Настройки за изпълнение</string> + <string name="comp_game_environment_other_hint">Други настройки на средата за Proton, DXVK, VKD3D-Proton и синхронизация за отделни игри.</string> + <string name="comp_game_saved_next">Профилът на %1$s е запазен за следващото стартиране на играта.</string> + <string name="game_no_steam_title">Старт без Steam</string> + <string name="game_no_steam_detail">Отваря го в Proton/FEX без клиента на Steam; функциите на Steam са изключени.</string> + <string name="game_no_steam_on">Включено</string> + <string name="game_steam_with">Стартира със Steam</string> + <string name="game_steam_without">Стартира без Steam</string> + <string name="game_settings_card">Настройки</string> + <string name="game_settings_menu_title">Настройки на %1$s</string> + <string name="game_settings_default">По подразбиране</string> + <string name="game_settings_default_detail">Връща всичко, променено за тази игра, към настройките на приложението.</string> + <string name="game_sync_custom">Персонализирани променливи за синхронизация</string> + <string name="comp_game_proton_live">Изборът на Proton за %1$s е запазен и вече е достъпен в Steam.</string> + <string name="comp_game_proton_next">Изборът на Proton за %1$s е запазен. Рестартирайте Steam, преди да стартирате играта.</string> + <string name="comp_game_proton_not_runnable">%1$s не може да използва избрания Proton на това устройство.</string> + <string name="comp_game_load_failed">Профилът на %1$s не можа да се зареди: %2$s</string> + <string name="comp_game_save_failed">Профилът на играта не можа да се запази: %1$s</string> + <string name="comp_game_reset">Нулиране на профила на играта</string> + <string name="comp_game_reset_title">Нулиране на профила на %1$s?</string> + <string name="comp_game_reset_body">Премахване на Proton, FEX, пакета с компоненти, средата, филтрирането на текстури и промените в компонентите на Windows за тази игра? Тя ще използва профила по подразбиране.</string> + <string name="comp_game_reset_done">%1$s вече използва профила по подразбиране.</string> + <string name="comp_game_reset_failed">Профилът на играта не можа да се нулира напълно: %1$s</string> + <string name="comp_default_live">%1$s вече стартира всяка игра, която не е избрала свой собствен Proton в Steam.</string> + <string name="comp_default_next">%1$s ще стартира всяка игра, която не е избрала свой собствен Proton, от следващото стартиране на Steam.</string> + <string name="comp_default_not_runnable">%1$s не може да стартира игри тук, затова не може да бъде по подразбиране.</string> + <string name="comp_default_failed">Proton по подразбиране не можа да се запази: %1$s</string> + <string name="comp_swapped">%1$s · %2$d заменени</string> + <string name="comp_all_original">%1$s · всички оригинални</string> + <string name="comp_game_running_suffix">%1$s · играта работи</string> + <string name="comp_esync_pack">%1$s · пакет droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · все още няма пакет droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync вграден, не е нужен пакет</string> + <string name="comp_gpu_drivers">GPU драйвери</string> + <string name="comp_reapplied">%1$s · приложен отново при стартиране %2$s</string> + <string name="comp_next_queued">Следващо: %1$s · след затваряне на играта</string> + <string name="comp_in_use">%1$s в употреба: %2$s</string> + <string name="comp_waits">Изчаква затварянето на играта</string> + <string name="comp_applies_next_game">Прилага се при следващото стартиране на игра</string> + <string name="comp_import_zip">Импортиране на .zip</string> + <string name="comp_reading">Четене на Proton версиите…</string> + <string name="comp_no_proton">Още няма инсталиран Proton. Стартирайте Steam веднъж, за да изтегли своя ARM64 Proton, или добавете GE-Proton, CachyOS или DroidDeck-Proton от Настройка.</string> + <string name="comp_original">Оригинал · %1$s</string> + <string name="comp_this_build">%1$s · тази версия</string> + <string name="comp_earlier_build">%1$s · по-стара версия</string> + <string name="comp_installed_count">Инсталирани · %1$d</string> + <string name="comp_nothing_stored">Все още няма запазено за %1$s. Собствените файлове на този Proton се запазват като негов оригинал.</string> + <string name="comp_waits_long">Игра работи на този Proton, затова това изчаква затварянето й.</string> + <string name="comp_applies_long">Прилага се при следващото стартиране на игра.</string> + <string name="comp_swap_title">Замяна на %1$s?</string> + <string name="comp_swap_body">Поставяне на %1$s в %2$s? Оригиналните му файлове остават запазени. %3$s</string> + <string name="comp_restore_title">Възстановяване на %1$s?</string> + <string name="comp_restore_body">Поставяне на оригинала на %1$s обратно в %2$s? %3$s</string> + <string name="comp_delete_package_body">Премахва пакета от приложението. Можете да го изтеглите отново.</string> + <string name="comp_delete_original_title">Изтриване на този оригинал?</string> + <string name="comp_delete_original_body">Този оригинал на %1$s е от по-стара версия на %2$s. Оригиналът на текущата версия винаги се запазва.</string> + <string name="comp_nightlies_count">В Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Обновете, за да видите пакетите в Nightlies.</string> + <string name="comp_nothing_new">Нищо ново от последната проверка.</string> + <string name="comp_import_wcp">Импортиране на .wcp</string> + <string name="comp_restore_original">Възстановяване на оригинала на този Proton</string> + <string name="comp_restore_original_body">Поставяне обратно на оригиналния %2$s на %1$s?</string> + <string name="comp_swap">Замяна</string> + <string name="comp_about_text">FEX, DXVK и VKD3D-Proton за всеки Proton, с който Steam стартира игри.\n\nИзберете инсталиран ред, за да го замените. Прилага се при следващото стартиране на игра или след затваряне на текущо работещата игра.\n\nИзборите ви се проверяват повторно преди всяко стартиране и се възстановяват, ако нещо ги е променило. Оригиналните файлове на всеки Proton се запазват, така че актуализациите на Steam никога не ги губят.</string> + <string name="comp_tag_original">Оригинал</string> + <string name="comp_tag_in_use">В употреба</string> + <string name="comp_tag_new">Ново</string> + <string name="comp_tag_stored">Запазено</string> + <string name="perf_title">Производителност</string> + <string name="perf_lede">CPU ядра, корекции на сесията и името на хоста. Прилага се от следващата сесия.</string> + <string name="perf_client_cores_group">Ядра за клиента на Steam</string> + <string name="perf_override">Замяна на избора на ядра на Steam</string> + <string name="perf_override_hint">Фиксира Steam, помощника за интерфейса му и gamescope към ядрата по-долу.</string> + <string name="perf_client_cores">Ядра на клиента</string> + <string name="perf_client_cores_on">Ядра за Steam.</string> + <string name="perf_client_cores_off">Включете замяната, за да изберете.</string> + <string name="perf_game_cores_group">Ядра за игри</string> + <string name="perf_game_cores">Ядра за игри</string> + <string name="perf_game_cores_hint">Ядра за игри. Когато всички са избрани, Android ги разпределя свободно.</string> + <string name="perf_client_ui">Интерфейс на клиента</string> + <string name="perf_glthread">Многонишков GL</string> + <string name="perf_glthread_hint">Може да направи менютата на Steam по-отзивчиви.</string> + <string name="perf_zink">Zink: лениви дескриптори</string> + <string name="perf_zink_hint">Препоръчва се за драйвери без буфери за дескриптори.</string> + <string name="perf_noglerror">Без проверки за GL грешки</string> + <string name="perf_noglerror_hint">Изключва проверката на GL за всяко извикване.</string> + <string name="perf_gsrealtime">gamescope: GPU опашка в реално време</string> + <string name="perf_gsrealtime_hint">Дава приоритет на GPU работата на компоситора. Може да изглади темпото на кадрите с известна цена за игрите.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Задръжте GPU на максималната му честота</string> + <string name="perf_gpuclock_hint">Само за Adreno. По-малко засечки, по-голямо използване на батерията и повече топлина.</string> + <string name="perf_fixes">Корекции на сесията</string> + <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_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> + <string name="perf_esync_hint">Windows нишките на игрите се изчакват взаимно чрез eventfd и обща памет, вместо през обиколки през wineserver. Използва пакет droiddeck-esync, направен точно за тази версия на Proton; пакетите се извличат автоматично. Докато не съществува такъв за нова версия на Proton, droiddeck-fsync го замества. Прилага се от следващата сесия.</string> + <string name="perf_xalia_hint">Изключва помощника на Proton за навигация с контролер, който използва процесорно време във всяка игра.</string> + <string name="perf_seccomp">Стартиране на proot без seccomp</string> + <string name="perf_seccomp_hint">Може да отстрани грешки с липсващи системни извиквания на някои ядра. Може да намали производителността.</string> + <string name="perf_fastpath">Бърз път на proot</string> + <string name="perf_fastpath_needs_seccomp">Изисква филтъра seccomp на proot.</string> + <string name="perf_fastpath_hint">По-бързо търсене на файлове и по-малко заекване. Изключете, ако програма не може да намери файловете си.</string> + <string name="perf_identity">Идентичност на сесията</string> + <string name="perf_hostname">Име на хоста</string> + <string name="perf_hostname_hint">Името, което Steam вижда за това устройство. Оставено празно възстановява %1$s.</string> + <string name="perf_hostname_invalid">Само букви, цифри и тирета по средата, до 63 знака.</string> + <string name="perf_phantom_warning">Android е настроен да прекратява тази сесия</string> + <string name="driver_installed">Инсталиран</string> + <string name="driver_available">Налично за изтегляне</string> + <string name="driver_nothing_new">Нищо ново от последната проверка.</string> + <string name="driver_restore_builtin">Възстановяване на вградените драйвери</string> + <string name="driver_delete_builtin">Вграден в приложението: това премахва разопакованите му файлове и го скрива. „Възстановяване на вградените драйвери“ го връща обратно.</string> + <string name="driver_delete_bundle">Половина от пакет Android + Linux: премахват се и двете половини. Драйвер в употреба се връща към стандартния.</string> + <string name="driver_delete_plain">Файловете му се премахват от приложението.</string> + <string name="driver_delete_in_use">Файловете му се премахват. В употреба е, затова стандартният драйвер поема.</string> + <string name="drawer_page_display">Екран</string> + <string name="drawer_page_effects">Ефекти</string> + <string name="drawer_page_controls">Контроли</string> + <string name="drawer_page_components">Компоненти</string> + <string name="drawer_page_controller">Контролер</string> + <string name="drawer_page_settings">Настройки</string> + <string name="drawer_page_desc">Страница %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Работен плот</string> + <string name="drawer_steam_menu">Меню на Steam</string> + <string name="drawer_quick_access">Бърз достъп</string> + <string name="drawer_open_qam">Отваряне на менюто за бърз достъп</string> + <string name="drawer_prev_page">Предишна страница</string> + <string name="drawer_next_page">Следваща страница</string> + <string name="drawer_hud">HUD за производителност</string> + <string name="drawer_scaling">Режим на мащабиране</string> + <string name="drawer_scaling_sharpness">Острота на мащабиране</string> + <string name="drawer_effects">Ефекти на екрана</string> + <string name="drawer_effects_hint">На живо. Използва малко GPU време, докато има включен ефект.</string> + <string name="drawer_look">Предварителни настройки</string> + <string name="drawer_look_custom">Персонализирано</string> + <string name="drawer_effects_advanced">Разширени</string> + <string name="widgets_expanded">Разгънато</string> + <string name="widgets_collapsed">Свито</string> + <string name="drawer_cas">Изостряне (CAS)</string> + <string name="drawer_cas_level">Ниво на изостряне</string> + <string name="drawer_fake_hdr">Имитация на HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Стартиране на SteamVR</string> + <string name="steamvr_checking">Проверка на SteamVR…</string> + <string name="drawer_deband">Премахване на цветови ленти</string> + <string name="drawer_deband_strength">Сила на премахването на цветови ленти</string> + <string name="drawer_brightness">Яркост</string> + <string name="drawer_contrast">Контраст</string> + <string name="drawer_gamma">Гама</string> + <string name="drawer_saturation">Наситеност</string> + <string name="drawer_fxaa">FXAA (изглаждане на ръбове)</string> + <string name="drawer_toon">Карикатурни контури</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Филтриране на текстури</string> + <string name="drawer_texture_hint">Игри с DirectX 9–11, от следващото им стартиране.</string> + <string name="drawer_anisotropy">Анизотропно филтриране</string> + <string name="drawer_texture_sharpness">Острота на текстурите</string> + <string name="drawer_texture_sharpness_note">Отрицателно отместване на mip нивото: по-остри текстури, леко трептене. Автоматично съответства на степента, до която сесията е увеличена спрямо екрана.</string> + <string name="drawer_touch_auto">Автоматично (%1$s)</string> + <string name="drawer_keyboard">Клавиатура</string> + <string name="drawer_latency">Закъснение</string> + <string name="drawer_low_latency_controller">Контролер с ниско закъснение</string> + <string name="drawer_low_latency_controller_hint">Контролерът докладва при 1000 Hz вместо 250 Hz. Малко повече CPU.</string> + <string name="drawer_low_latency_touch">Докосване с ниско закъснение</string> + <string name="drawer_low_latency_touch_hint">Докосванията пропускат групирането на кадри; управлението с докосване в Steam работи при 1000 Hz. Малко повече CPU.</string> + <string name="drawer_pc_keyboard">Клавиатура за компютър</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Втори екран</string> + <string name="drawer_second_screen_mode">Режим</string> + <string name="drawer_second_screen_shows">Показва</string> + <string name="drawer_android_apps">Приложения за Android</string> + <string name="drawer_launch_app">Стартиране на приложение</string> + <string name="common_hide">Скриване</string> + <string name="common_show">Показване</string> + <string name="drawer_no_apps">Няма приложения за стартиране</string> + <string name="drawer_session_behavior">Поведение на сесията</string> + <string name="drawer_suspend_hint">Прилага се сега и за бъдещи сесии в този режим.</string> + <string name="drawer_next_session">Следваща сесия</string> + <string name="drawer_support">Поддръжка</string> + <string name="drawer_logs">Дневници на сесията</string> + <string name="drawer_logs_hint">Прикачете към доклад за грешка</string> + <string name="drawer_share_logs">Споделяне на дневници</string> + <string name="drawer_background">Фонов режим</string> + <string name="drawer_stop">Спри</string> + <string name="drawer_stop_title">Спиране на сесията?</string> + <string name="drawer_running_now">В момента работи</string> + <string name="drawer_no_game">Няма игра, работеща на Proton</string> + <string name="drawer_selected_profile">Профил на играта</string> + <string name="drawer_selected_profile_none">Все още няма данни за профила.</string> + <string name="drawer_profile_refresh_failed_initial">Профилите на играта не можаха да се заредят. Автоматично се прави нов опит.</string> + <string name="drawer_profile_refresh_failed_stale">Профилите на играта не можаха да се обновят. Показват се последните налични данни; автоматично се прави нов опит.</string> + <string name="drawer_profile_inspect_hint">Преглед и редактиране на запазените настройки, използвани при следващото стартиране.</string> + <string name="drawer_profile_default">Използва се профилът по подразбиране</string> + <string name="drawer_profile_custom">Персонализиран профил</string> + <string name="drawer_component_inherited">Използва се %1$s от профила по подразбиране.</string> + <string name="drawer_game_components_note">Промените се запазват в профила на %1$s и се прилагат при следващото стартиране на играта.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d промяна за играта</item> + <item quantity="other">%1$d промени за играта</item> + </plurals> + <string name="drawer_no_proton">Все още няма инсталиран Proton.</string> + <string name="drawer_game_running">играта работи</string> + <string name="drawer_reapplied">приложено отново при стартиране %1$s</string> + <string name="drawer_original">Оригинал</string> + <string name="drawer_components_note">Импортиране и изтриване в страницата Компоненти.</string> + <string name="setup_check_done">Готово</string> + <string name="setup_check_warn">Нужно е внимание</string> + <string name="setup_check_busy">Обработва се</string> + <string name="setup_limit_adb_failed">Проверете IP адреса и порта за безжично отстраняване на грешки или сдвоете отново, ако Android е премахнал това устройство.</string> + <string name="setup_install">Инсталиране</string> + <string name="setup_manage">Управление</string> + <string name="setup_tab_overview">Общ преглед</string> + <string name="setup_tab_controller">Контролер</string> + <string name="setup_tab_session">Сесия</string> + <string name="setup_tab_launcher">Лаунчър</string> + <string name="setup_title">Настройка</string> + <string name="setup_all_set">● Всичко е готово</string> + <string name="setup_n_ready">%1$d от %2$d готови</string> + <string name="setup_system_check">Проверка на системата</string> + <string name="setup_gpu_supported">Устройството се поддържа</string> + <string name="setup_gpu_untested">Непроверен GPU</string> + <string name="setup_gpu_unsupported">GPU не се поддържа</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam изисква драйвер за Adreno; %1$s може да покаже черен екран</string> + <string name="setup_runtime">Linux среда за изпълнение</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Не е инсталирано · около 3 GB, инсталира се при първото Play</string> + <string name="setup_installed">Инсталирано</string> + <string name="setup_runtime_update">%1$s · налична актуализация</string> + <string name="setup_runtime_current">%1$s · актуално</string> + <string name="setup_limit">Ограничение на дъщерните процеси</string> + <string name="setup_limit_on">Включено · Android може да затвори Steam. Изключването отнема минута.</string> + <string name="setup_limit_unset">Не е зададено · Android може да затвори Steam. Изключването отнема минута.</string> + <string name="setup_limit_unknown">Не можа да се провери · изключването отнема минута.</string> + <string name="setup_fix_it">Поправи</string> + <string name="setup_details">Подробности</string> + <string name="setup_dev_options">Опции за програмисти</string> + <string name="setup_use_wireless">Използване на безжично отстраняване на грешки</string> + <string name="setup_check_again">Проверка отново</string> + <string name="setup_limit_turn_on">Включване на ограничението</string> + <string name="setup_account">Акаунт в Steam</string> + <string name="setup_signed_in_offline">Влезли сте като %1$s · офлайн режим</string> + <string name="setup_signed_in">Влезли сте като %1$s</string> + <string name="setup_sign_in">Натиснете Play и влезте в Steam</string> + <string name="setup_tools">Инструменти</string> + <string name="setup_controller">Контролер</string> + <string name="setup_controller_unavailable">Настройките на контролера не са достъпни.</string> + <string name="setup_session">Сесия</string> + <string name="setup_logs">Дневници на сесията</string> + <string name="setup_logs_hint">Запазват се след всяка сесия</string> + <string name="setup_agent_commands">Инструменти за отстраняване на грешки</string> + <string name="setup_latest_logs">Последни дневници на сесията</string> + <string name="setup_saved_logs">Запазени дневници на сесията</string> + <string name="setup_saved_logs_hint">Запазва най-новите %1$d</string> + <string name="setup_clear_logs">Изчистване на дневниците</string> + <string name="setup_reset_settings">Нулиране на всички настройки</string> + <string name="setup_reset_settings_hint">Връща всяка настройка към стойността по подразбиране</string> + <string name="setup_reset_settings_button">Нулиране</string> + <string name="setup_reset_settings_title">Нулиране на всички настройки?</string> + <string name="setup_reset_settings_body">Настройките за картина, производителност, контролер, тема, език и лаунчър се връщат към стандартните. Игрите, входът в Steam, профилите в магазините, изтеглените драйвери и папките за съхранение остават.</string> + <string name="setup_reset_settings_profiles">Нулирай и профилите на игрите (Proton, FEX, компоненти и среда за всяка игра, както и средата на профила По подразбиране)</string> + <string name="setup_reset_settings_session_running">Спри сесията, преди да нулираш настройките.</string> + <string name="setup_reset_settings_partial">Настройките са нулирани, но не всички. Подробностите са в логовете.</string> + <string name="setup_offline">Офлайн режим</string> + <string name="setup_sign_in_first">Първо влезте в Steam</string> + <string name="setup_launcher">Лаунчър</string> + <string name="setup_language">Език</string> + <string name="setup_language_hint">Steam също го използва, от следващото му стартиране.</string> + <string name="setup_language_system">По подразбиране от системата (%1$s)</string> + <string name="setup_language_system_short">По подразбиране от системата</string> + <string name="setup_app_scale">Мащаб на приложението</string> + <string name="setup_app_scale_hint">Текст и контроли на DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (по подразбиране)</string> + <string name="setup_theme">Тема</string> + <string name="setup_theme_hint">Облик на лаунчъра</string> + <string name="setup_home">Използване като начален екран</string> + <string name="setup_home_on">DroidDeck може да бъде приложението за начален екран</string> + <string name="setup_home_off">DroidDeck никога не се предлага като приложение за начален екран</string> + <string name="setup_orientation">Ориентация</string> + <string name="setup_orientation_auto">Автоматичен хоризонтален</string> + <string name="setup_orientation_landscape">Хоризонтална</string> + <string name="setup_orientation_reverse">Обърната хоризонтална</string> + <string name="setup_fullscreen">Цял екран</string> + <string name="setup_fullscreen_on">Скрива лентите за състояние и навигация на Android</string> + <string name="setup_fullscreen_off">Показва лентите за състояние и навигация на Android</string> + <string name="setup_default_home">Приложение за начален екран по подразбиране</string> + <string name="setup_choose_home">Изберете приложение за начален екран</string> + <string name="setup_choose">Избор</string> + <string name="setup_linux_apps">Приложения за Linux (бета)</string> + <string name="setup_tool_files">Файлове</string> + <string name="setup_tool_files_hint">Преглед и управление на файлове</string> + <string name="setup_tool_protons">Версии на Proton</string> + <string name="setup_tool_protons_hint">Инсталиране на версии на Proton за ARM64</string> + <string name="setup_tool_performance">Производителност</string> + <string name="setup_tool_performance_hint">Разпределение на CPU ядрата</string> + <string name="setup_tool_roms">Папка за ROM файлове</string> + <string name="setup_tool_roms_hint">Къде се съхраняват игрите за емулатори</string> + <string name="setup_card_components">Компоненти</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Контроли</string> + <string name="setup_card_controls_hint">Разпределение на бутоните</string> + <string name="store_tab_discover">Откриване</string> + <string name="store_tab_search">Търсене</string> + <string name="store_tab_installed">Инсталирани</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Магазин</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak е готов</string> + <string name="store_needs_runtime">Първо инсталирайте средата на Linux от Настройка.</string> + <string name="store_setup_title">Настройване на Flatpak</string> + <string name="store_setup_text">Добавя Flatpak и го свързва с Flathub (около 20 MB). Първото приложение също изтегля своята среда за изпълнение.</string> + <string name="store_setting_up">Настройване…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Актуализации</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Стартиране…</string> + <string name="store_categories">Категории</string> + <string name="store_unreachable">Flathub не можа да бъде достигнат. Проверете връзката си и опитайте отново.</string> + <string name="store_try_again">Опитайте отново</string> + <string name="store_search_label">Търсене във Flathub</string> + <string name="store_search_placeholder">Firefox, игри, емулатори…</string> + <string name="store_search">Търсене</string> + <string name="store_all">Всички</string> + <string name="store_searching">Търсене…</string> + <string name="store_search_hint">Търсене по име или избор на категория. Показват се само приложения за ARM64.</string> + <string name="store_no_results">Няма приложения за ARM64 във Flathub, съответстващи на това.</string> + <string name="store_results">Резултати</string> + <string name="store_check_updates">Проверка за актуализации</string> + <string name="store_update_all">Актуализиране на всички (%1$d)</string> + <string name="store_all_current">● Всичко е актуално</string> + <string name="store_no_apps">Все още няма приложения. Намерете такива в Откриване или Търсене.</string> + <string name="store_setup_first_note">Настройте Flatpak, за да инсталирате приложения.</string> + <string name="store_update_available_prefix">Налична актуализация · %1$s</string> + <string name="store_open">Отвори</string> + <string name="store_details">Подробности</string> + <string name="store_remove">Премахни</string> + <string name="store_press_again">Натиснете отново, за да премахнете</string> + <string name="store_installing">Инсталиране…</string> + <string name="store_install">Инсталиране</string> + <string name="store_setup_first">Първо настройте Flatpak</string> + <string name="store_download_size">Изтегляне %1$s</string> + <string name="store_installed_chip">● Инсталирано</string> + <string name="store_details_failed">Страницата на това приложение във Flathub не можа да се зареди.</string> + <string name="store_loading">Зареждане от Flathub…</string> + <string name="store_no_arm">Няма версия за ARM64 във Flathub, затова не може да се инсталира тук.</string> + <string name="store_screenshots">Екранни снимки</string> + <string name="store_about">За приложението</string> + <string name="store_app_id">ID на приложението</string> + <string name="store_license">Лиценз</string> + <string name="store_runtime">Среда за изпълнение</string> + <string name="store_installed_size">Инсталиран размер</string> + <string name="store_installed_size_value">%1$s (плюс споделената му среда за изпълнение)</string> + <string name="store_website">Уебсайт</string> + <string name="store_verified">Потвърдено</string> + <string name="upd_title">Актуализации</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Проверено %1$s</string> + <string name="upd_not_checked">Още не е проверено</string> + <string name="upd_perm_title">Разрешаване на DroidDeck да се актуализира самостоятелно</string> + <string name="upd_perm_text">На следващия екран включете „Разрешаване от този източник“, след което се върнете. Актуализацията продължава сама.</string> + <string name="upd_open_settings">Отваряне на настройките</string> + <string name="upd_not_now">Не сега</string> + <string name="upd_signed_status">Различно подписано</string> + <string name="upd_signed_headline">Не може да се актуализира директно</string> + <string name="upd_signed_detail">Това копие не е подписано с ключа за издания на DroidDeck, затова актуализациите не могат да се инсталират върху него. Деинсталирайте го, за да превключите.</string> + <string name="upd_available">Налична актуализация</string> + <string name="upd_blocked_status">Не може да се инсталира</string> + <string name="upd_switch">Готово за превключване</string> + <string name="upd_ahead_status">Пред Stable</string> + <string name="upd_ahead_headline">Вие сте пред Stable</string> + <string name="upd_ahead_detail">Тази версия е по-нова от последната Stable. Ще преминете към Stable с нейното следващо издание.</string> + <string name="upd_gone_status">Тестът приключи</string> + <string name="upd_gone_headline">Този тест приключи</string> + <string name="upd_gone_detail">Поправката му е обединена или изоставена. Следвайте Preview за най-новите поправки.</string> + <string name="upd_current_status">Актуално</string> + <string name="upd_current_headline">Имате най-новата версия %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Актуализиране%1$s</string> + <string name="upd_install_button">Инсталиране%1$s</string> + <string name="upd_install_anyway">Инсталиране на Stable %1$s все пак</string> + <string name="upd_follow_preview">Следване на Preview</string> + <string name="upd_stop_session">Спрете работещата сесия, за да актуализирате.</string> + <string name="upd_less">По-малко</string> + <string name="upd_more">Повече</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Нова версия на Preview</string> + <string name="upd_new_test">Тестова версия на PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">КАНАЛ ЗА АКТУАЛИЗАЦИИ</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Тествани издания, за повечето хора</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Най-новите поправки, преди Stable</string> + <string name="upd_preview_current">Актуално</string> + <string name="upd_tests">Тестови версии</string> + <string name="upd_tests_hint">Изпробвайте поправка, преди да бъде издадена</string> + <string name="upd_tests_none">Няма в момента</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Не е компилирана за това копие на DroidDeck</string> + <string name="upd_updated">Актуализирано %1$s</string> + <string name="upd_test_name">теста на PR #%1$d</string> + <string name="upd_while_ago">преди време</string> + <string name="upd_just_now">току-що</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d за изпробване</item> + <item quantity="other">%1$d за изпробване</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Промени от вашата версия · %1$d версия назад</item> + <item quantity="other">Промени от вашата версия · %1$d версии назад</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Скорошни промени · %1$d версия</item> + <item quantity="other">Скорошни промени · %1$d версии</item> + </plurals> + <string name="gate_title">Една настройка на Android за промяна</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android спира приложения, които стартират много фонови процеси, а Steam стартира десетки. Докато това не се промени, игрите се затварят без грешка.</string> + <string name="gate_fix_for_me">Поправи го вместо мен</string> + <string name="gate_toggle_steps">Включете „Деактивиране на ограниченията за дъщерните процеси“, след което се върнете. Оставете Опции за програмисти включени, иначе превключвателят се изключва отново.</string> + <string name="gate_open_dev">Отваряне на Опции за програмисти</string> + <string name="gate_no_toggle">Тази версия на Android няма превключвател за това, затова DroidDeck го променя чрез безжично отстраняване на грешки. Отнема около минута, не е нужен компютър.</string> + <string name="gate_needs_wifi">Безжичното отстраняване на грешки изисква Wi-Fi. Работи с всяка мрежа; не е необходим интернет.</string> + <string name="gate_needs_notifications">Кодът за сдвояване се показва в известие. Разрешете известията за DroidDeck или използвайте „Други начини“.</string> + <string name="gate_allow_notifications">Разрешаване на известията</string> + <string name="gate_step1">Отворете Настройки → Опции за програмисти → Безжично отстраняване на грешки и го включете</string> + <string name="gate_step2">Докоснете „Сдвояване на устройство с код за сдвояване“</string> + <string name="gate_step3">Въведете кода в известието на DroidDeck</string> + <string name="gate_waiting">Изчакване на изскачащия прозорец за сдвояване…</string> + <string name="gate_code_needed">Изскачащият прозорец е намерен. Въведете кода му в известието.</string> + <string name="gate_status">Състояние</string> + <string name="gate_polling">Проверява се на всеки 2 секунди. Тази страница се затваря, когато е изключено.</string> + <string name="gate_other_ways">Други начини</string> + <string name="gate_other_toggle">Безжично отстраняване на грешки, ръчен адрес, ADB от компютър</string> + <string name="gate_other_no_toggle">Ръчен адрес, ADB от компютър, Опции за програмисти</string> + <string name="gate_use_wireless_instead">Използване на безжично отстраняване на грешки вместо това</string> + <string name="gate_some_roms">Някои ROM-и добавят превключвателя въпреки това. Потърсете „child process“ в Опции за програмисти.</string> + <string name="gate_manual_hint">Ако известието не работи, въведете сами адреса и кода от изскачащия прозорец.</string> + <string name="gate_enter_manually">Ръчно въвеждане на адреса</string> + <string name="gate_from_computer">От компютър с ADB:</string> + <string name="gate_copy_command">Копиране на командата</string> + <string name="gate_choose_display">Изберете на кой екран да се отворят настройките на Android.</string> + <string name="gate_main_screen">Основен екран</string> + <string name="wadb_finding_port">Сдвоено. Търсене на порта за безжично отстраняване на грешки…</string> + <string name="wadb_enter_port">Сдвоено. Въведете порта от Настройки.</string> + <string name="wadb_applying">Устройството е намерено. Прилагане на настройката…</string> + <string name="wadb_apply_failed">Не можа да се приложи автоматично. Проверете адреса по-долу и опитайте отново. %1$s</string> + <string name="wadb_title_wireless">Безжично отстраняване на грешки</string> + <string name="wadb_title_done">Ограничението на дъщерните процеси е актуализирано</string> + <string name="wadb_title">Промяна на ограничението на дъщерните процеси</string> + <string name="wadb_lede_compact0">Ако опцията липсва, сдвоете чрез безжично отстраняване на грешки.</string> + <string name="wadb_lede_compact1">Сдвоено. Проверете IP адреса и порта в безжичното отстраняване на грешки.</string> + <string name="wadb_lede_done">Ограничението на дъщерните процеси беше актуализирано.</string> + <string name="wadb_lede0">Използвайте стъпка 2, ако Опции за програмисти нямат настройка за дъщерни процеси. Отворете Опции за програмисти → Безжично отстраняване на грешки → Сдвояване на устройство с код за сдвояване.</string> + <string name="wadb_lede1">Сдвоено. Използвайте адреса по-долу или го обновете от Безжично отстраняване на грешки → IP адрес и порт.</string> + <string name="wadb_lede_done_long">Ограничението на дъщерните процеси беше актуализирано чрез безжично отстраняване на грешки.</string> + <string name="wadb_confirmed_on">Android потвърди, че ограничението е включено.</string> + <string name="wadb_confirmed_off">Android потвърди, че ограничението е изключено.</string> + <string name="wadb_pair_group">2 · Сдвояване на безжично отстраняване на грешки</string> + <string name="wadb_pair_address">IP адрес и порт на изскачащия прозорец за сдвояване</string> + <string name="wadb_pin">Код за сдвояване (PIN)</string> + <string name="wadb_pin_placeholder">6 цифри</string> + <string name="wadb_pair">Сдвояване</string> + <string name="wadb_apply_group">2 · Прилагане чрез безжично отстраняване на грешки</string> + <string name="wadb_connect_address">IP адрес и порт за връзка</string> + <string name="wadb_pair_again">Сдвояване отново</string> + <string name="wadb_turn_off">Изключване на ограничението</string> + <string name="wadb_other_ways">Други начини за промяна</string> + <string name="wadb_dev_try_first">1 · Опции за програмисти (пробвайте първо)</string> + <string name="wadb_restrict_on">Изключете „Деактивиране на ограниченията за дъщерните процеси“.</string> + <string name="wadb_restrict_off">Включете „Деактивиране на ограниченията за дъщерните процеси“.</string> + <string name="wadb_computer_last">3 · ADB от компютър (последна възможност)</string> + <string name="wadb_only_if">Само ако безжичното отстраняване на грешки не е достъпно.</string> + <string name="wadb_computer_group">3 · ADB от компютър (последна възможност)</string> + <string name="ctrl_osc_hint">Кога се появяват екранните контроли в сесия</string> + <string name="ctrl_color">Цвят</string> + <string name="ctrl_color_hint">Оттенък на екранните бутони</string> + <string name="ctrl_custom">Персонализиран</string> + <string name="ctrl_opacity">Прозрачност</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Размер на бутоните</string> + <string name="ctrl_size_hint" formatted="false">100% е стандартният размер</string> + <string name="ctrl_stick_click">Натискане на стика</string> + <string name="ctrl_stick_click_hint">Докоснете двукратно и задръжте стик за L3 или R3</string> + <string name="ctrl_adaptive">Адаптивни стикове</string> + <string name="ctrl_rumble">Вибрация от играта</string> + <string name="ctrl_steam_button">Бутон Steam</string> + <string name="ctrl_qam_button">Бутон QAM</string> + <string name="ctrl_keyboard_button">Бутон за клавиатура</string> + <string name="ctrl_select_steam">Натиснете Select, за да отворите менюто на Steam</string> + <string name="ctrl_select_steam_hint">Вместо View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con като VR контролери</string> + <string name="ctrl_joycon_vr_hint">Докато SteamVR работи, всеки Joy-Con става ръка. Насочете го напред и задръжте Home или Capture, за да го центрирате отново.</string> + <string name="setup_animations">Анимации</string> + <string name="ctrl_adaptive_hint">Стиковете се появяват там, където докоснете, и се скриват при отпускане</string> + <string name="ctrl_layout">Разположение</string> + <string name="ctrl_layout_custom">Запазени персонализирани позиции</string> + <string name="ctrl_layout_default">Нагласено за този екран</string> + <string name="ctrl_edit">Редактиране</string> + <string name="ctrl_reset">Нулиране</string> + <string name="ctrl_mapping">Разпределение на бутоните</string> + <string name="ctrl_mapping_default">Всеки бутон изпраща собствения си сигнал</string> + <string name="ctrl_mapping_count">%1$d от %2$d бутона преназначени</string> + <string name="ctrl_configure">Конфигуриране</string> + <string name="ctrl_reset_all">Нулиране на контролера</string> + <string name="ctrl_reset_all_hint">Възстановява всички настройки на контролера и разположението</string> + <string name="ctrl_mapping_lede">Какво изпраща всеки екранен бутон към играта. „Скрит“ премахва бутона.</string> + <string name="ctrl_onscreen_buttons">Екранни бутони</string> + <string name="ctrl_defaults">Стандартни настройки</string> + <string name="ctrl_reset_mapping">Нулиране на разпределението</string> + <string name="content_android_apps">Приложения за Android</string> + <string name="content_apps_count">%1$d приложения</string> + <string name="content_no_android_apps">Не са намерени приложения за Android за стартиране.</string> + <string name="content_desktop_installed">● Работният плот е инсталиран</string> + <string name="content_desktop_first_open">Инсталира се при първото отваряне</string> + <string name="content_available">Налично за инсталиране</string> + <string name="content_not_installed">Не е инсталирано.</string> + <string name="content_not_installed_suffix">%1$s · не е инсталирано</string> + <string name="content_open_named">Отвори %1$s</string> + <string name="content_games">Игри</string> + <string name="content_choose_roms">Изберете папка за ROM файлове.</string> + <string name="content_retroarch_roms">Отидете на /root/ROMs в RetroArch.</string> + <string name="content_add_roms">Добавете игри за %1$s в ROMs/%2$s.</string> + <string name="content_install_named">Инсталиране на %1$s</string> + <string name="content_stop_to_install">Спрете сесията, за да инсталирате</string> + <string name="content_runtime_required">Изисква се среда за изпълнение</string> + <string name="content_loading_details">Зареждане на подробности за инсталирането…</string> + <string name="content_details_unavailable">Подробностите за инсталирането не са достъпни. Опитайте по-късно.</string> + <string name="content_needs_runtime">Първо инсталирайте средата на Linux от Настройка.</string> + <string name="content_stop_first">Спрете работещата сесия, за да инсталирате приложения за работния плот.</string> + <string name="content_install_into">Инсталира %1$s в работния плот на Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Скриването го премахва от работния плот. Файловете му остават в средата на Linux.</string> + <string name="content_rom_gone">Тази игра вече не е в папката за ROM файлове.</string> + <string name="content_desktop_system">Работен плот · %1$s</string> + <string name="content_launch_in">Стартиране в %1$s</string> + <string name="content_also_in">Също в %1$s</string> + <string name="content_page_gone">Тази страница вече не съществува. Изберете раздел от лявата страна.</string> + <string name="content_open_desktop">Отваряне на работния плот</string> + <string name="content_install_open_desktop">Инсталиране и отваряне на работния плот</string> + <string name="desktop_remove_title">Деинсталиране на работния плот</string> + <string name="desktop_remove_text">Премахва работния плот и включените в него приложения. Запазва игрите, добавените приложения, настройките и споделените библиотеки.</string> + <string name="desktop_removing">Премахване на работния плот</string> + <string name="desktop_removed">Работният плот е премахнат</string> + <string name="desktop_cleaning_legacy">Премахване на старите файлове на LXQt</string> + <string name="desktop_removal_unknown">Актуализирайте DroidDeck, преди да премахнете тази версия на работния плот.</string> + <string name="content_linux_desktop">Работен плот на Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox и вашите емулатори</string> + <string name="games_empty">Игрите, които инсталирате в Steam, се показват тук след сесията.</string> + <string name="games_play_steam">Пускане на Steam</string> + <string name="games_play_steamvr">Пускане на SteamVR</string> + <string name="games_launch_settings">Настройки за стартиране</string> + <string name="games_launch">Стартиране</string> + <string name="games_files">Файлове на играта</string> + <string name="games_prefix">Префикс на Proton</string> + <string name="games_saves_looking">Търсене на записи…</string> + <string name="games_saves_none">Не е намерена папка за записи по име. Експортирането взема цялата потребителска папка.</string> + <string name="games_saves_folders">%1$d папки за записи</string> + <string name="games_saves_summary">%1$s · %2$d файла · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Управление на записите</string> + <string name="games_saves">Записи на играта</string> + <string name="games_import_saves">Импортиране на записи…</string> + <string name="games_export_gamehub">Експортиране като GameHub zip…</string> + <string name="games_export_winlator">Експортиране като Winlator zip…</string> + <string name="games_open_save_folder">Отваряне на папката за записи</string> + <string name="games_never_played">Никога не е играна</string> + <string name="games_runtime_busy_percent">Средата за изпълнение е заета · %1$d%%</string> + <string name="games_runtime_busy">Средата за изпълнение е заета</string> + <string name="games_runtime_first_play">Средата за изпълнение се инсталира при първото Play</string> + <string name="games_runtime_update">Налична актуализация на средата за изпълнение</string> + <string name="games_runtime_ready">● Средата за изпълнение е готова</string> + <string name="games_last_played">Последна игра %1$s</string> + <string name="games_internal">Вътрешна памет</string> + <string name="games_added">Добавена игра</string> + <string name="games_custom">Персонализирана игра</string> + <string name="games_store_storage">Хранилище за игри</string> + <string name="gpu_auto_hint">Най-добрата двойка за този GPU, поддържана актуална</string> + <string name="gpu_manual_hint">Изберете двойка сами</string> + <string name="gpu_checking">Проверка за драйвери…</string> + <string name="gpu_none_listed">Все още няма изброени драйвери. Обновете, за да ги потърсите.</string> + <string name="gpu_hide_other">Скриване на драйверите за други GPU</string> + <string name="gpu_show_other">Показване на драйверите за други GPU</string> + <string name="gpu_advanced">Разширени</string> + <string name="gpu_set_with_display">Задава се заедно с драйвера за дисплея: %1$s включва и двете.</string> + <string name="gpu_set_with_runtime">Задава се заедно с драйвера за изпълнение: %1$s включва и двете.</string> + <string name="gpu_runtime_hint">Използва се от игрите и работния плот.</string> + <string name="gpu_runtime_default">Стандартен за изпълнение</string> + <string name="gpu_auto_by_gpu">Автоматично – избрано според GPU</string> + <string name="gpu_manage">Изтегляне, импортиране или изтриване…</string> + <string name="gpu_in_use_caps">В УПОТРЕБА</string> + <string name="gpu_builtin">Драйверите, вградени в DroidDeck</string> + <string name="gpu_matched_pair">Драйверите за изпълнение и за дисплея са зададени заедно като съответстваща двойка.</string> + <string name="gpu_recommended_for">Препоръчан за този GPU: %1$s.</string> + <string name="gpu_refresh_hint">Обновете, за да потърсите драйвери за този GPU.</string> + <string name="gpu_recommended_caps">ПРЕПОРЪЧАНО</string> + <string name="gpu_unavailable">Недостъпно</string> + <string name="load_runtime">Linux среда за изпълнение</string> + <string name="load_runtime_detail">Подготвяне на средата на Linux</string> + <string name="load_session">Сесия</string> + <string name="load_session_detail">Стартиране на екрана и звука</string> + <string name="load_steam">Клиент на Steam</string> + <string name="load_steam_detail">Проверка на Steam и инструментите му за съвместимост</string> + <string name="load_opening_steam">Отваряне на Steam</string> + <string name="load_opening_steam_detail">Изчакване на първия кадър на Steam</string> + <string name="load_desktop">Работен плот</string> + <string name="load_desktop_detail">Подготвяне на работния плот</string> + <string name="load_opening">Отваряне</string> + <string name="load_opening_detail">Изчакване на първия кадър</string> + <string name="load_starting_steam">Стартиране на Steam</string> + <string name="load_ended">Сесията приключи</string> + <string name="load_step">Стъпка %1$d от %2$d</string> + <string name="load_steam_paused">Steam е на пауза</string> + <string name="deck_tab_grips">Захвати</string> + <string name="deck_tab_left">Ляв пад</string> + <string name="deck_tab_right">Десен пад</string> + <string name="deck_tab_both">Двата</string> + <string name="deck_tab_gamepad">Геймпад</string> + <string name="deck_surface_stick">Стик</string> + <string name="deck_surface_trackpad">Тракпад</string> + <string name="deck_surface_switch">Превключване между стик и тракпад</string> + <string name="deck_more_controls">Още контроли на Deck</string> + <string name="deck_panels">ПАНЕЛИ</string> + <string name="deck_close">Затваряне на контролите за втория екран</string> + <string name="deck_open_steam_menu">Отваряне на менюто на Steam</string> + <string name="deck_left_upper">Ляво · горе</string> + <string name="deck_left_lower">Ляво · долу</string> + <string name="deck_right_upper">Дясно · горе</string> + <string name="deck_right_lower">Дясно · долу</string> + <string name="deck_click">Клик</string> + <string name="deck_right_trackpad">Десен тракпад</string> + <string name="deck_left_trackpad">Ляв тракпад</string> + <string name="second_trackpad">Тракпад</string> + <string name="second_show_keyboard">Показване на клавиатурата</string> + <string name="second_hide_keyboard">Скриване на клавиатурата</string> + <string name="second_terminal">Терминал на Linux</string> + <string name="second_terminal_not_ready">Сесията на Linux все още не е готова за терминал.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Игри</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Магазин</string> + <string name="rail_components">Компоненти</string> + <string name="rail_apps">Приложения</string> + <string name="rail_setup">Настройка</string> + <string name="rail_updates">Актуализации</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Продължаване на %1$s</string> + <string name="roms_text">Показва се като /root/ROMs във всяка сесия. Вътрешната памет е на /root/Storage.</string> + <string name="roms_none">Няма избрана папка</string> + <string name="roms_applies">Прилага се от следващата сесия. SD картите работят.</string> + <string name="roms_choose">Избор на папка</string> + <string name="roms_change">Смяна на папка</string> + <string name="proton_lede">Инсталирай ARM64 версия на Proton, после я избери за всяка игра в Steam → Properties → Compatibility.</string> + <string name="proton_stop_first">Спри текущата сесия, за да инсталираш или премахнеш инструмент за съвместимост.</string> + <string name="proton_available">Налични версии</string> + <string name="proton_installed">Инсталирано: %1$s</string> + <string name="proton_queued">Чака от по-ранна заявка</string> + <string name="proton_not_installed">Не е инсталирано</string> + <string name="proton_update_available">Налична актуализация → %1$s</string> + <string name="proton_remove_older">Премахване на старите версии на %1$s</string> + <string name="proton_remove_older_body">Премахва %1$s. Игрите, зададени на тези версии, трябва да бъдат превключени към друг Proton.</string> + <string name="proton_remove_body">Игрите, зададени на тази версия, трябва да бъдат превключени към друг Proton.</string> + <string name="proton_install_now">Инсталиране сега</string> + <string name="proton_cancel_queued">Отказ на изчакването</string> + <string name="pckb_android">Клавиатура на Android</string> + <string name="pckb_hide">Скриване ✕</string> + <string name="main_launch_named">Пускане на %1$s</string> + <string name="main_choose_screen">Избери екран. Втори: %1$s.</string> + <string name="main_secondary_gone">Вторият екран вече не е достъпен.</string> + <string name="main_primary">Основен екран</string> + <string name="main_secondary">Втори екран</string> + <string name="widgets_prev_tab">Предишен раздел</string> + <string name="widgets_next_tab">Следващ раздел</string> + <string name="widgets_on">Вкл.</string> + <string name="widgets_all_n">Всички %1$d</string> + <string name="widgets_none">Нищо</string> + <string name="widgets_n_of_m">%1$d от %2$d</string> + <string name="widgets_off">Изкл.</string> + <string name="screen_bottom">Долен екран</string> + <string name="game_env_applies">Прилага се при следващото пускане на играта. Профилът на играта има превес над общия.</string> + <string name="game_env_other">Друга игра по ID на приложението…</string> + <string name="game_env_done">Готово</string> + <string name="game_env_default">По подразбиране</string> + <string name="game_env_off">Изкл.</string> + <string name="game_env_change">Смяна…</string> + <string name="game_env_change_title">Промяна на променлива</string> + <string name="game_env_restore_default">Връщане по подразбиране</string> + <string name="game_env_eyebrow">Proton игри</string> + <string name="pip_title">Картина в картината</string> + <string name="pip_auto">Автоматично влизане в „Картина в картината“</string> + <string name="unfolded_controls">Контроли на разгънатия екран</string> + <string name="unfolded_controls_hint">Разгънат, играта стои над тракпадите и задните захвати на Steam Deck. Сгънат, играта е на цял екран.</string> + <string name="pip_suspended">Прекъсната</string> + <string name="pip_not_ready">Картина в картината е достъпна само когато сесията е готова.</string> + <string name="pip_permission">Разреши картина в картината за DroidDeck в настройките на Android.</string> + <string name="pip_unavailable">Android не можа да отвори картина в картината.</string> + <string name="game_shortcut">Пряк път</string> + <string name="game_shortcut_add">Добавяне към началния екран</string> + <string name="game_shortcut_choose">Избор на игра</string> + <string name="game_shortcut_scanning">Търсене на инсталирани игри…</string> + <string name="game_link_copy">Копиране на връзката за пускане</string> + <string name="game_link_copied">Връзката за пускане е копирана</string> + <string name="game_shortcut_unsupported">Текущият начален екран не поддържа преки пътища. Използвай „Копиране на връзката за пускане“ вместо това.</string> + <string name="game_link_invalid">Невалидна връзка за пускане на игра.</string> + <string name="game_link_missing">Тази игра вече не е в библиотеката ти в DroidDeck.</string> + <string name="game_link_session_busy">Спри текущата сесия, преди да пуснеш игра в Steam.</string> + <string name="game_link_failed">Играта не можа да се изпрати в Steam. Опитай да я пуснеш отново.</string> + <string name="setup_retry_removal">Нов опит за премахване</string> + <string name="runtime_removing">Премахване</string> + <string name="runtime_removal_incomplete">Премахването не е завършено</string> + <string name="game_file_export">Експортиране на файл на играта</string> + <string name="game_file_sync">Синхронизиране на всички файлове на игрите в папка</string> + <string name="game_file_stop_sync">Спиране на синхронизирането на файловете на игрите</string> + <string name="game_file_folder">Избор на папка за файловете на фронтенда на игрите</string> + <string name="game_file_exported">Файловете на игрите са запазени в %1$s</string> + <string name="game_frontend_files">Файлове на фронтенда</string> + + <string name="main_wait_runtime">Изчакай операцията със средата да приключи</string> + <string name="main_wait_proton_install">Изчакай инсталирането на инструмента за съвместимост да приключи</string> + <string name="main_wait_desktop_install">Изчакай инсталирането на работния плот да приключи</string> + <string name="main_wait_install_game">Изчакай инсталирането да приключи, преди да пуснеш игра.</string> + <string name="main_saves_close_session">Затвори сесията на Steam, за да играта не презапише импортираните файлове.</string> + <string name="main_saves_importing">Импортиране в %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Импортиран %1$d файл от %2$s в %3$s</item> + <item quantity="other">Импортирани %1$d файла от %2$s в %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Импортиран %1$d файл от %2$s в %3$s. Старите запазвания са архивирани в Download/DroidDeck/Saves/backups</item> + <item quantity="other">Импортирани %1$d файла от %2$s в %3$s. Старите запазвания са архивирани в Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Избор на ZIP файл със запазвания за %1$s</string> + <string name="main_saves_exporting">Експортиране на %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Експортиран %1$d файл като %2$s: %3$s</item> + <item quantity="other">Експортирани %1$d файла като %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Избор на папка за запазване на %1$s (%2$s)</string> + <string name="main_action_failed">%1$s се провали: %2$s</string> + <string name="main_no_logs_yet">Все още няма логове от сесии: пусни сесия първо.</string> + <string name="main_no_logs_to_clear">Няма логове от сесии за изчистване.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Изчистена %1$d папка с логове от сесия.</item> + <item quantity="other">Изчистени %1$d папки с логове от сесии.</item> + </plurals> + <string name="main_wadb_pair_failed">Чифтосването за безжично отстраняване на грешки се провали</string> + <string name="main_wadb_command_failed">Командата за безжично отстраняване на грешки се провали</string> + <string name="main_wadb_unavailable">Безжичното отстраняване на грешки не е достъпно</string> + <string name="main_adb_copied">Командата за ADB е копирана</string> + <string name="main_pick_roms">Избор на папката ROMs</string> + <string name="main_non_adreno_title">Не е Adreno GPU</string> + <string name="main_non_adreno_text">Turnip поддържа Adreno GPU-та. На %1$s Steam може да покаже черен екран. Изтегляне: %2$.0f MB.</string> + <string name="main_install_anyway">Инсталиране въпреки това</string> + <string name="main_remove_runtime_title">Премахване на средата на Linux</string> + <string name="main_remove_runtime_text">Това изтрива средата, клиента на Steam в нея и всяка инсталирана в нея игра.</string> + <string name="main_applied">Приложено: %1$s</string> + <string name="android_app_open_failed_primary">%1$s не можа да се отвори на основния екран</string> + <string name="android_app_open_failed_on">%1$s не можа да се отвори на %2$s</string> + <string name="android_app_open_failed_display">%1$s не можа да се отвори на екран %2$d</string> + <string name="comp_busy_importing">Импортиране</string> + <string name="comp_busy_swapping">Размяна</string> + <string name="comp_busy_restoring">Възстановяване</string> + <string name="comp_busy_cancelling">Отказване</string> + <string name="comp_busy_deleting">Изтриване</string> + <string name="comp_cannot_read">не може да се прочете файлът</string> + <string name="comp_imported">Импортирано: %1$s</string> + <string name="comp_swap_cancelled">Изчакващата размяна беше отказана.</string> + <string name="comp_pick_wcp">Избор на пакет с компоненти (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nightlies не можаха да бъдат достигнати</string> + <string name="comp_stored">Запазено: %1$s</string> + <string name="comp_download_failed">Изтеглянето се провали: %1$s</string> + <string name="drivers_pick_linux">Избор на драйвер за средата на Linux (-Linux ZIP или пакет Android + Linux)</string> + <string name="drivers_pick_android">Избор на драйвер за дисплея (AdrenoTools ZIP или пакет Android + Linux)</string> + <string name="drivers_pick_any">Избор на ZIP с драйвер или пакет Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Премахване на %1$s…</string> + <string name="main_forgetting_named">Забравяне на %1$s…</string> + <string name="main_pick_game_storage">Избор на папката за съхранение на игри</string> + <string name="main_pick_decky_zip">Избор на ZIP с плъгин за Decky</string> + <string name="main_storage_not_usable">Не може да се използва: %1$s</string> + <string name="main_running_program">Програма</string> + <string name="main_removing_runtime">Премахване на средата на Linux</string> + <string name="main_settings_main_screen">Настройките не можаха да се отворят на долния екран; отворени са на основния екран.</string> + <string name="main_open_dev_options">Отваряне на „Опции за програмисти“ в настройките</string> + + <string name="upd_unknown_apps_failed">Настройката на Android „Инсталиране на неизвестни приложения“ не можа да се отвори</string> + <string name="upd_couldnt_check">Проверката не можа да се извърши: %1$s</string> + <string name="upd_no_download">Тази версия няма изтегляне за това копие на DroidDeck</string> + <string name="upd_stop_first">Спри текущата сесия първо, после актуализирай</string> + <string name="upd_stage_downloading">Изтегляне</string> + <string name="upd_stage_installing">Инсталиране</string> + <string name="upd_stage_confirm">Изчакване на потвърждение от теб</string> + <string name="upd_failed">Актуализацията се провали</string> + <string name="upd_not_offered">Android не предложи инсталирането на актуализацията</string> + + <string name="decky_install_failed">Инсталирането на Decky се провали: %1$s</string> + <string name="decky_plugin_starting">Стартиране на импортирането на плъгина…</string> + <string name="decky_plugin_failed">Импортирането на плъгина се провали: %1$s</string> + <string name="decky_plugin_installed">Плъгинът е инсталиран. Рестартирай Steam, за да се зареди.</string> + + <string name="drivers_not_checked">Все още не е проверено - докосни опресняване, за да провериш за нови драйвери</string> + <string name="drivers_bundle_sets_display">Android + Linux: задава драйвера за дисплея заедно с него</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: задава драйвера за средата заедно с него</string> + <string name="drivers_runtime_builtin">вграденият в средата Turnip</string> + <string name="drivers_system_vulkan">системен Vulkan: няма вградена версия за този GPU</string> + <string name="drivers_bundled">%1$s (включен)</string> + <string name="drivers_manual">Ръчно</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">В момента е публикувана само една от двете части</string> + <string name="drivers_pair_size">%1$.0f MB за двете</string> + <string name="drivers_none_to_set">Няма драйвери за задаване: %1$s</string> + <string name="drivers_checking_latest">Проверка за най-новите драйвери…</string> + <string name="drivers_up_to_date_check_failed">Актуално (проверката не успя: %1$s)</string> + <string name="drivers_recommended_unpublished">Препоръчаните драйвери не са публикувани в момента</string> + <string name="drivers_downloading_pair">Изтегляне на %1$s %2$s…</string> + <string name="drivers_updated_to">Актуализирано до %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Актуализирано до %1$s %2$s. Драйверът за дисплея се прилага след рестартиране на DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Актуализациите на драйверите изчакват спирането на сесията.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s ще се изтегли, след като излезеш от мобилни данни и пестене на батерия.</string> + <string name="drivers_skipping_bad">%1$s %2$s не стартира сесия тук, затова Автоматично остава на драйверите, които го направиха.</string> + <string name="drivers_rolled_back">%1$s не стартира сесия два пъти, затова Автоматично се върна на драйверите, които работеха.</string> + <string name="drivers_switched_to">Превключено към %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Превключено към %1$s %2$s. Драйверът за дисплея се прилага след рестартиране на DroidDeck.</string> + <string name="drivers_using">Използва се %1$s %2$s.</string> + <string name="drivers_using_restart">Използва се %1$s %2$s. Драйверът за дисплея се прилага след рестартиране на DroidDeck.</string> + <string name="drivers_using_quest">Използват се включеният драйвер за картина на Quest и средата по подразбиране.</string> + <string name="drivers_using_quest_restart">Използват се включеният драйвер за картина на Quest и средата по подразбиране. Драйверът за картина важи след рестарт на DroidDeck.</string> + <string name="drivers_not_a_driver">Не е ZIP с драйвер: нито драйвер на AdrenoTools, нито -Linux Turnip, нито пакет Android + Linux</string> + <string name="drivers_import_failed">Импортирането се провали: %1$s</string> + <string name="drivers_imported_unnamed">Импортиран драйвер</string> + <string name="drivers_using_bundle">Използва се %1$s като драйвер и за средата, и за дисплея.</string> + <string name="drivers_using_bundle_restart">Използва се %1$s като драйвер и за средата, и за дисплея. Драйверът за дисплея се прилага след рестартиране на DroidDeck.</string> + <string name="drivers_deleted_bundle">Изтрито: %1$s (двата драйвера)</string> + <string name="drivers_deleted">Изтрито: %1$s</string> + <string name="drivers_release_status">Най-нови: %1$s · проверено %2$s</string> + <string name="drivers_release_status_failed">Най-нови: %1$s · %2$s недостъпни · проверено %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">преди %1$d мин</item> + <item quantity="other">преди %1$d мин</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">преди %1$d ч</item> + <item quantity="other">преди %1$d ч</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">преди %1$d ден</item> + <item quantity="other">преди %1$d дни</item> + </plurals> + <string name="drivers_checking_sources">Проверка на Banners-Turnip, WinNative и DroidDeck…</string> + <string name="drivers_check_failed">проверката се провали</string> + <string name="drivers_installed_pick_either">Инсталирано: %1$s - избери го в който и да е от списъците, за да зададеш и двата драйвера</string> + <string name="drivers_installed_pick">Инсталирано: %1$s - избери го от менюто</string> + + <string name="session_wait_removal">Изчакай премахването на средата да приключи</string> + <string name="session_title_game">Игра</string> + <string name="session_touch_auto_touchpad">тракпад</string> + <string name="session_touch_auto_direct">директно</string> + <string name="session_swap_failed">Размяната се провали: %1$s</string> + <string name="session_profile_save_failed">Запазването на профила се провали: %1$s</string> + <string name="session_desktop_paused">Работният плот е на пауза</string> + <string name="session_named_paused">%1$s е на пауза</string> + <string name="session_program_paused">Програмата е на пауза</string> + <string name="session_starting_desktop">Стартиране на работния плот</string> + <string name="session_starting_named">Стартиране на %1$s</string> + <string name="session_starting_program">Стартиране на програмата</string> + <string name="session_no_logs">Няма логове за тази сесия.</string> + <string name="session_logs_archive_failed">Архивът на логовете от сесията не можа да се създаде.</string> + <string name="session_logs_share_failed">Логовете от сесията не можаха да се споделят.</string> + <string name="session_starting_session">Стартиране на сесията…</string> + <string name="session_runtime_downloading">изтегляне на средата на Linux</string> + <string name="session_runtime_downloading_mb">изтегляне на средата на Linux · %1$d от %2$d MB</string> + <string name="session_runtime_checking">проверка на средата на Linux</string> + <string name="session_runtime_unpacking">разопаковане на средата на Linux</string> + <string name="session_desktop_downloading">изтегляне на работния плот</string> + <string name="session_desktop_downloading_mb">изтегляне на работния плот · %1$d от %2$d MB</string> + <string name="session_desktop_checking">проверка на работния плот</string> + <string name="session_desktop_unpacking">разопаковане на работния плот</string> + <string name="session_proton_downloading">изтегляне на Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">изтегляне на Proton Experimental (ARM64) · %1$d от %2$d MB</string> + <string name="session_proton_checking">проверка на Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">разопаковане на Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Каталогът на средата не можа да бъде достигнат. Провери връзката и натисни „Пускане“ отново.</string> + <string name="session_runtime_install_failed">Средата на Linux не се инсталира. Провери средата в „Настройка“ и натисни „Пускане“ отново.</string> + <string name="session_desktop_install_failed">Работният плот не се инсталира (%1$s). Провери връзката и натисни „Desktop“ отново.</string> + <string name="session_ended_named">%1$s спря неочаквано. Сподели логовете в отчет за грешка или опитай отново.</string> + <string name="session_ended_program">Програмата спря неочаквано. Сподели логовете в отчет за грешка или опитай отново.</string> + <string name="session_ended_desktop">Работният плот спря неочаквано. Сподели логовете в отчет за грешка или опитай отново.</string> + <string name="session_ended_detail">Код на изход %1$d · %2$s</string> + <string name="session_ended_no_log">няма лог</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Логът показва %1$d грешка „Function not implemented“: ускорението на proot чрез seccomp се проваля при помощен процес на това устройство. Пробвай %2$s → „%3$s“ (или „%4$s“) и стартирай отново.</item> + <item quantity="other">Логът показва %1$d грешки „Function not implemented“: ускорението на proot чрез seccomp се проваля при помощен процес на това устройство. Пробвай %2$s → „%3$s“ (или „%4$s“) и стартирай отново.</item> + </plurals> + + <string name="mode_decky_plugins">Плъгини</string> + <string name="mode_decky_plugins_hint">Инсталирай ZIP с плъгин за следващата сесия на Steam.</string> + <string name="mode_decky_plugin_downloading">Изтегляне…</string> + <string name="mode_decky_plugin_install_zip">Инсталиране от ZIP</string> + <string name="store_cat_games">Игри</string> + <string name="store_cat_audio_video">Аудио и видео</string> + <string name="store_cat_graphics">Графика</string> + <string name="store_cat_internet">Интернет</string> + <string name="store_cat_office">Офис</string> + <string name="store_cat_developer">Разработка</string> + <string name="store_cat_education">Образование</string> + <string name="store_cat_science">Наука</string> + <string name="store_cat_system">Система</string> + <string name="store_cat_utilities">Инструменти</string> + <string name="store_section_popular">Популярни</string> + <string name="store_section_trending">Тенденции</string> + <string name="store_section_new">Нови</string> + <string name="store_section_updated">Актуализирани</string> + <string name="store_section_loading">зареждане…</string> + <string name="store_flatpak_setup">Настройка на Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Flathub не можа да бъде проверен за актуализации</string> + <string name="content_rom_installed">инсталирана</string> + <string name="content_rom_folder">папка</string> + <string name="theme_graphite">Графит</string> + <string name="theme_graphite_detail">Графитени повърхности, със собственото синьо на сферата от логото за всичко избрано, на фокус или натиснато.</string> + <string name="theme_paper">Хартия на черно</string> + <string name="theme_paper_detail">Бялото е основният цвят, синьото от иконата е сигналът за линии, кръгове и точки.</string> + <string name="theme_icon_blue">Синя икона</string> + <string name="theme_icon_blue_detail">Черен фон, бял текст, синьото за всичко избрано, на фокус или натиснато.</string> + <string name="theme_electric">Яркосиньо</string> + <string name="theme_electric_detail">По-яркото синьо, върху повърхности, по-близки до тъмносиньо, вместо сиво.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Инсталирай средата първо</string> + <string name="game_sync_err_steam_library">Библиотеката на Steam не е достъпна</string> + <string name="game_sync_err_previous_sd">Предишната SD библиотека не е достъпна</string> + <string name="game_sync_err_game_storage">Хранилището за игри не е достъпно</string> + <string name="game_sync_err_added_games">Папката с добавени игри не е достъпна</string> + <string name="game_sync_err_manifests">Манифестите на Steam не са достъпни</string> + <string name="content_system_many">Много системи</string> + <string name="fm_drive_internal">Вътрешна</string> + <string name="fm_drive_linux">Система на Linux</string> + <string name="fm_drive_sd">SD карта</string> + <string name="fm_drive_storage">Хранилище</string> + <string name="fm_select">Избор</string> + <string name="fm_properties">Свойства</string> + <string name="fm_favorite_add">Добавяне към Любими</string> + <string name="fm_favorite_remove">Премахване от Любими</string> + <string name="fm_rename">Преименуване</string> + <string name="fm_copy">Копиране</string> + <string name="fm_cut">Изрязване</string> + <string name="fm_actions">Действия</string> + <string name="fm_favorites">Любими</string> + <string name="fm_pin_current">Закачане на текущата папка</string> + <string name="fm_no_favorites">Още няма любими - закачи папка от менюто ѝ ⋮, за да се връщаш тук бързо.</string> + <string name="fm_unpin_favorite">Премахване от любими</string> + <string name="fm_size_zero">0 байта</string> + <string name="fm_unit_bytes">байта</string> + <string name="fm_prop_location">Местоположение</string> + <string name="fm_prop_type">Тип</string> + <string name="fm_prop_size">Размер</string> + <string name="fm_prop_modified">Последна промяна</string> + <string name="fm_type_folder">Папка</string> + <string name="fm_type_file">Файл</string> + <string name="fm_type_ext_file">%1$s файл</string> + <string name="fm_read_only">Само за четене</string> + <string name="fm_read_only_hint">Пречи на игрите (и Wine) да презаписват или изтриват този файл.</string> + <string name="fm_read_only_failed">Статусът „Само за четене“ не можа да се промени</string> + <string name="fm_hidden">Скрит</string> + <string name="fm_hidden_unsupported">Това хранилище не може да съхранява флага за скрит файл.</string> + <string name="fm_hidden_hint">Отбелязва файла като скрит в Windows (атрибутът за скрити файлове на Wine).</string> + <string name="fm_hidden_failed">Статусът „Скрит“ не можа да се промени за това хранилище</string> + <string name="fm_done">Готово</string> + <string name="fm_op_deleting">Изтриване...</string> + <string name="fm_delete_failed">Изтриването се провали</string> + <string name="fm_op_moving">Преместване...</string> + <string name="fm_op_copying">Копиране...</string> + <string name="fm_op_moving_item">Преместване - %1$s</string> + <string name="fm_op_copying_item">Копиране - %1$s</string> + <string name="fm_op_moving_batch">Преместване %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Копиране %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d успешни, %2$d неуспешни</string> + <string name="fm_paste_skipped">%1$d успешни, %2$d пропуснати</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d елемент преместен</item> + <item quantity="other">%1$d елемента преместени</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d елемент копиран</item> + <item quantity="other">%1$d елемента копирани</item> + </plurals> + <string name="fm_already_exists">„%1$s“ вече съществува</string> + <string name="fm_op_renaming">Преименуване...</string> + <string name="fm_rename_failed">Преименуването се провали</string> + <string name="fm_op_creating_folder">Създаване на папка...</string> + <string name="fm_create_folder_failed">Папката не можа да се създаде</string> + <string name="fm_new_folder">Нова папка</string> + <string name="fm_folder_name">Име на папката</string> + <string name="fm_create">Създаване</string> + <string name="fm_new_name">Ново име</string> + <string name="fm_delete_title">Изтриване?</string> + <string name="fm_delete_text">Изтриване на „%1$s“ завинаги?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Изтриване на %1$d елемент?</item> + <item quantity="other">Изтриване на %1$d елемента?</item> + </plurals> + <string name="fm_cannot_undo">Това не може да бъде отменено.</string> + <plurals name="fm_and_more"> + <item quantity="one">…и още %1$d</item> + <item quantity="other">…и още %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">Изтриване %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d не можа да бъде изтрит</item> + <item quantity="other">%1$d не можаха да бъдат изтрити</item> + </plurals> + <string name="fm_conflict_merge_hint">Сливането добавя и заменя файлове в съществуващата папка.</string> + <string name="fm_conflict_overwrite_hint">Презаписването заменя съществуващия файл.</string> + <string name="fm_conflict_apply_all">Приложи за всички конфликти</string> + <string name="fm_conflict_merge">Сливане</string> + <string name="fm_conflict_overwrite">Презаписване</string> + <string name="fm_conflict_keep_both">Запазване на двете</string> + <string name="fm_conflict_skip">Пропускане</string> + <string name="fm_select_this_folder">Избор на тази папка</string> + <string name="fm_back">Назад</string> + <string name="fm_drive_not_readable">%1$s е монтирано, но в момента не може да се прочете</string> + <string name="fm_list_view">Изглед като списък</string> + <string name="fm_grid_view">Изглед като мрежа</string> + <string name="fm_search">Търсене</string> + <string name="fm_sort">Сортиране</string> + <string name="fm_sort_name">Име</string> + <string name="fm_sort_date">Дата на промяна</string> + <string name="fm_rows_comfortable">Удобни редове</string> + <string name="fm_rows_compact">Компактни редове</string> + <string name="fm_hide_hidden">Скриване на скритите файлове</string> + <string name="fm_show_hidden">Показване на скритите файлове</string> + <string name="fm_hide_favorites">Скриване на любимите</string> + <string name="fm_show_favorites">Показване на любимите</string> + <string name="fm_filter_folder">Филтриране на тази папка</string> + <string name="fm_free_space">%1$s свободни</string> + <string name="fm_selected_count">%1$d избрани</string> + <string name="fm_select_none">Нищо</string> + <string name="fm_select_all">Всички</string> + <string name="fm_paste">Поставяне</string> + <plurals name="fm_items"> + <item quantity="one">%1$d елемент</item> + <item quantity="other">%1$d елемента</item> + </plurals> + <string name="fm_paste_here">Поставяне на %1$s тук</string> + <string name="fm_paste_move_here">Поставяне на %1$s (премести) тук</string> + <string name="fm_rail_title">Файлове</string> + <string name="fm_rail_storage">ХРАНИЛИЩЕ</string> + <string name="fm_rail_quick">БЪРЗИ</string> + <string name="fm_rail_favorites">ЛЮБИМИ</string> + <string name="fm_rail_downloads">Изтеглени</string> + <string name="fm_rail_downloads_short">Изтегл.</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Логове от сесии</string> + <string name="fm_rail_pictures">Снимки</string> + <string name="fm_favorite_added">„%1$s“ е добавена към Любими</string> + <string name="fm_favorite_removed">„%1$s“ е премахната от Любими</string> + <string name="fm_empty_directory">Празна папка</string> + <string name="fm_up_one_level">Едно ниво нагоре</string> + <string name="fm_choose_folder">Избор на папка</string> + <string name="fm_choose_file">Избор на файл</string> + <string name="ctrl_tint_steam_blue">Синьо на Steam</string> + <string name="ctrl_tint_sky">Небесно</string> + <string name="ctrl_tint_white">Бяло</string> + <string name="ctrl_tint_violet">Виолетово</string> + <string name="ctrl_tint_green">Зелено</string> + <string name="ctrl_tint_amber">Кехлибарено</string> + <string name="ctrl_tint_red">Червено</string> + <string name="ctrl_tint_pink">Розово</string> + <string name="ctrl_button_a">Бутон A</string> + <string name="ctrl_button_b">Бутон B</string> + <string name="ctrl_button_x">Бутон X</string> + <string name="ctrl_button_y">Бутон Y</string> + <string name="ctrl_button_lb">Ляв бутон (LB)</string> + <string name="ctrl_button_rb">Десен бутон (RB)</string> + <string name="ctrl_button_lt">Ляв спусък (LT)</string> + <string name="ctrl_button_rt">Десен спусък (RT)</string> + <string name="ctrl_button_view">Бутон View</string> + <string name="ctrl_button_menu">Бутон Menu</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad нагоре</string> + <string name="ctrl_target_down">D-pad надолу</string> + <string name="ctrl_target_left">D-pad наляво</string> + <string name="ctrl_target_right">D-pad надясно</string> + <string name="ctrl_target_hidden">Скрит</string> + <string name="ctrl_editor_drag">Плъзни, за да преместиш</string> + <string name="ctrl_editor_snap">Прилепване</string> + <string name="ctrl_editor_save">Запазване</string> + <string name="second_mode_none">Нищо</string> + <string name="second_mode_keyboard_trackpad">Клавиатура + тракпад</string> + <string name="second_mode_terminal">Терминал</string> + <string name="second_mode_deck_controls">Захвати + тракпади на Deck</string> + + <string name="rtinst_removing">Премахване на средата на Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Премахване на средата на Linux · %1$d запис</item> + <item quantity="other">Премахване на средата на Linux · %1$d записа</item> + </plurals> + <string name="rtinst_removed">Средата на Linux е премахната</string> + <string name="rtinst_removal_failed">Премахването на средата на Linux не можа да завърши. Опитай отново от „Настройка“.</string> + <string name="rtinst_removing_leftovers">Премахване на остатъците от средата</string> + <string name="rtinst_downloading">Изтегляне</string> + <string name="rtinst_verifying">Проверка</string> + <string name="rtinst_extracting">Разопаковане</string> + <string name="rtinst_channel_description">Показва се, докато средата на Linux се инсталира или премахва</string> + <string name="rtinst_title_installing">Инсталиране на средата на Linux</string> + <string name="rtinst_title_removing">Премахване на средата на Linux</string> + + <string name="deskpkg_runtime_missing">Средата на Linux не е инсталирана</string> + <string name="deskpkg_no_checksum">Каталогът няма контролна сума за %1$s</string> + <string name="deskpkg_checksum_mismatch">Несъответствие в контролната сума - нищо не е променено</string> + <string name="deskpkg_installing">Инсталиране на %1$s</string> + <string name="deskpkg_place_failed">AppImage не можа да бъде поставен</string> + <string name="deskpkg_extract_failed">Разопаковането се провали</string> + <string name="deskpkg_install_failed">Инсталирането се провали</string> + + <string name="flatpakmgr_setup_failed">Настройката на Flatpak се провали (изход %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Настройката на Flatpak не завърши</string> + <string name="flatpakmgr_busy">Друга задача на магазина вече се изпълнява</string> + <string name="flatpakmgr_not_ready">Настрой Flatpak първо</string> + <string name="flatpakmgr_starting">Стартиране</string> + <string name="flatpakmgr_exit_status">Flatpak приключи със код %1$d</string> + <string name="flatpakmgr_installing">Инсталиране на %1$s</string> + <string name="flatpakmgr_updating">Актуализиране на %1$s</string> + <string name="flatpakmgr_removing">Премахване на %1$s</string> + <string name="flatpakmgr_installing_step">Инсталиране на %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Актуализиране на %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Премахване на %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">преводи</string> + <string name="flatpakmgr_ref_graphics_drivers">драйвери за графика</string> + <string name="flatpakmgr_ref_media_codecs">медийни кодеци</string> + <string name="flatpakmgr_ref_runtime">средата %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">средата %1$s %2$s</string> + + <string name="appimg_too_small">Файлът е твърде малък, за да бъде AppImage</string> + <string name="appimg_unreadable">Файлът не може да бъде прочетен: %1$s</string> + <string name="appimg_not_linux">Това не е AppImage (не е Linux програма)</string> + <string name="appimg_wrong_arch">Този AppImage не е компилиран нито за ARM64 (aarch64), нито за x86 компютри</string> + <string name="appimg_not_appimage">Това е Linux програма, но не е AppImage</string> + <string name="appimg_wrong_type">Могат да се импортират само AppImage от тип 2 (този е от тип %1$d)</string> + <string name="appimg_no_space_import">Няма достатъчно свободно място: импортирането изисква около %1$s</string> + <string name="appimg_no_space_update">Няма достатъчно свободно място: актуализирането изисква около %1$s</string> + <string name="appimg_import_failed">Импортирането се провали</string> + <string name="appimg_gone">Този AppImage вече не съществува</string> + <string name="appimg_update_failed">Актуализирането се провали</string> + <string name="appimg_extracting">Разопаковане на %1$s</string> + <string name="appimg_extract_failed">AppImage не можа да бъде разопакован</string> + <string name="appimg_extract_failed_detail">AppImage не можа да бъде разопакован: %1$s</string> + + <string name="deckymgr_stop_session_loader">Спри активната сесия, преди да инсталираш Decky Loader</string> + <string name="deckymgr_download_failed">Изтеглянето на Decky Loader се провали</string> + <string name="deckymgr_size_mismatch">Размерът на Decky Loader не съответства на метаданните на версията</string> + <string name="deckymgr_checksum_download_failed">Контролната сума на версията не можа да бъде изтеглена</string> + <string name="deckymgr_checksum_missing">Липсва контролна сума на версията</string> + <string name="deckymgr_checksum_invalid">Контролната сума на версията е невалидна</string> + <string name="deckymgr_checksum_mismatch">Несъответствие в контролната сума на Decky Loader</string> + <string name="deckymgr_not_elf">Файлът на версията не е съвместим 64-битов изпълним файл за Linux</string> + <string name="deckymgr_session_started_loader">По време на изтеглянето започна сесия - спри я, преди да инсталираш Decky Loader</string> + <string name="deckymgr_loader_not_executable">PluginLoader не можа да бъде означен като изпълним</string> + <string name="deckymgr_cef_failed">Отстраняването на грешки от разстояние на Steam CEF не можа да бъде включено</string> + <string name="deckymgr_stage_failed">PluginLoader не можа да бъде подготвен</string> + <string name="deckymgr_loader_preserve_failed">Съществуващият PluginLoader не можа да бъде запазен</string> + <string name="deckymgr_loader_activate_failed">Новият PluginLoader не можа да бъде активиран</string> + <string name="deckymgr_stop_session_plugin">Спри активната сесия, преди да инсталираш плъгин</string> + <string name="deckymgr_loader_required">Инсталирай Decky Loader, преди да импортираш плъгин</string> + <string name="deckymgr_zip_unreadable">Избраният ZIP файл не можа да бъде прочетен</string> + <string name="deckymgr_plugins_dir_failed">Директорията с плъгини на Decky не можа да бъде създадена</string> + <string name="deckymgr_extracting_zip">Разопаковане на ZIP на плъгина</string> + <string name="deckymgr_zip_one_folder">ZIP на плъгина трябва да съдържа една папка с плъгина на най-горно ниво</string> + <string name="deckymgr_zip_missing_files">В ZIP на плъгина липсва plugin.json, package.json или dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Липсва име на плъгина</string> + <string name="deckymgr_session_started_plugin">По време на инсталацията започна сесия - спри я, преди да инсталираш плъгин</string> + <string name="deckymgr_plugin_installed">Плъгинът е инсталиран · рестартирай Steam, за да се зареди</string> + <string name="deckymgr_plugin_install_failed">Инсталирането на ZIP на плъгина се провали</string> + <string name="deckymgr_zip_too_many">ZIP на плъгина съдържа твърде много записи</string> + <string name="deckymgr_zip_invalid_path">ZIP на плъгина съдържа невалиден път</string> + <string name="deckymgr_zip_duplicate_paths">ZIP на плъгина съдържа повтарящи се пътища</string> + <string name="deckymgr_zip_unsafe_path">ZIP на плъгина съдържа опасен път</string> + <string name="deckymgr_folder_failed">Папката на плъгина не можа да бъде създадена</string> + <string name="deckymgr_zip_too_large">ZIP на плъгина надвишава ограничението от 1 GiB при разопаковане</string> + <string name="deckymgr_bundled_not_executable">Вграденият изпълним файл на плъгина не можа да бъде означен като изпълним</string> + <string name="deckymgr_remote_entry_invalid">Невалиден запис remote_binary</string> + <string name="deckymgr_remote_name_invalid">Невалидно име на отдалечен изпълним файл</string> + <string name="deckymgr_remote_url_https">URL адресът на отдалечения изпълним файл трябва да използва HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Отдалеченият изпълним файл %1$s има невалиден SHA-256 хеш</string> + <string name="deckymgr_bin_dir_failed">Директорията bin на плъгина не можа да бъде създадена</string> + <string name="deckymgr_downloading_binary">Изтегляне на изпълним файл на плъгина · %1$s</string> + <string name="deckymgr_binary_download_failed">Изпълнимият файл на плъгина %1$s не можа да бъде изтеглен</string> + <string name="deckymgr_binary_checksum_mismatch">Несъответствие в контролната сума на изпълнимия файл на плъгина · %1$s</string> + <string name="deckymgr_binary_not_executable">Изпълнимият файл на плъгина не можа да бъде означен като изпълним · %1$s</string> + <string name="deckymgr_binary_replace_failed">Изпълнимият файл на плъгина не можа да бъде заменен · %1$s</string> + <string name="deckymgr_binary_install_failed">Изпълнимият файл на плъгина не можа да бъде инсталиран · %1$s</string> + <string name="deckymgr_folder_taken">Папката на плъгина принадлежи на друг плъгин</string> + <string name="deckymgr_preserve_failed">Съществуващият плъгин не можа да бъде запазен</string> + <string name="deckymgr_activate_failed">Импортираният плъгин не можа да бъде активиран</string> + <string name="deckymgr_settings_failed">Настройките на плъгина на Decky не можаха да бъдат обновени</string> + <string name="deckymgr_restore_failed">Съществуващият плъгин не можа да бъде възстановен</string> + + <string name="adbfix_save_failed">Идентичността на безжичното отстраняване на грешки не можа да бъде запазена</string> + <string name="adbfix_command_failed">Командата на ADB се провали (%1$d)</string> + <string name="adbfix_not_confirmed">Android не потвърди промяната на ограничението за дъщерни процеси: %1$s</string> + <string name="adbfix_no_pairing">Няма запазено чифтосване за безжично отстраняване на грешки</string> + <string name="adbfix_enter_address">Въведи текущия IP адрес и порт за безжично отстраняване на грешки</string> + + <string name="adbpair_timed_out">Изтече времето за изчакване на изскачащия прозорец за чифтосване. Опитай отново от DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Не можа да се търси изскачащият прозорец за чифтосване (%1$d). Проверете дали Wi-Fi е включен.</string> + <string name="adbpair_discovery_failed">Не можа да се търси изскачащият прозорец за чифтосване: %1$s</string> + <string name="adbpair_six_digits">Въведи всичките 6 цифри на кода</string> + <string name="adbpair_pairing">Чифтосване…</string> + <string name="adbpair_code_rejected">Този код не работи. Отвори отново изскачащия прозорец за чифтосване и въведи новия му код.</string> + <string name="adbpair_connecting">Чифтосано. Свързване…</string> + <string name="adbpair_port_not_found">Чифтосано, но портът за безжично отстраняване на грешки не беше намерен. Остави безжичното отстраняване на грешки включено и опитай отново.</string> + <string name="adbpair_applying">Прилагане на настройката…</string> + <string name="adbpair_command_failed">Командата за безжично отстраняване на грешки се провали</string> + <string name="adbpair_channel_name">Настройка на безжично отстраняване на грешки</string> + <string name="adbpair_channel_description">Пита за кода за чифтосване за безжично отстраняване на грешки, докато Настройки е отворено</string> + <string name="adbpair_title_pair">Чифтосване на безжично отстраняване на грешки</string> + <string name="adbpair_waiting_text">Включи безжичното отстраняване на грешки, после докосни „Чифтосване на устройство с код за чифтосване“.</string> + <string name="adbpair_waiting_long">Включи безжичното отстраняване на грешки, после докосни „Чифтосване на устройство с код за чифтосване“. Остани в Настройки: кодът ще се появи в това известие.</string> + <string name="adbpair_code_label">6-цифрен код за чифтосване</string> + <string name="adbpair_code_hint">Докосни „Въвеждане на код“ и напиши 6-те цифри, показани в Настройки.</string> + <string name="adbpair_title_code">Въведи кода за чифтосване по Wi-Fi</string> + <string name="adbpair_title_retry">Опитай кода отново</string> + <string name="adbpair_enter_code">Въвеждане на код</string> + <string name="adbpair_title_working">Настройка на Steam</string> + <string name="adbpair_title_done">Steam е готов</string> + <string name="adbpair_done_text">Докосни, за да се върнеш в DroidDeck. Вече можеш да изключиш безжичното отстраняване на грешки.</string> + <string name="adbpair_title_failed">Настройката на безжичното отстраняване на грешки спря</string> + + <string name="selfinst_download_failed">Изтеглянето не успя</string> + <string name="selfinst_size_mismatch">Размерът на изтеглянето не съответстваше на публикуваното APK и беше отхвърлен - опитай отново</string> + <string name="selfinst_checksum_mismatch">Изтеглянето не съответстваше на контролната си сума и беше отхвърлено - опитай отново</string> + <string name="selfinst_wrong_package">Актуализацията е за Android пакета %1$s, а не за %2$s</string> + <string name="selfinst_metadata_signer">Метаданните на актуализацията не посочват ключа за подписване на версиите на DroidDeck</string> + <string name="selfinst_unreadable">Android не можа да прочете изтегленото APK</string> + <string name="selfinst_apk_wrong_package">Изтегленото APK е за %1$s, а не за %2$s</string> + <string name="selfinst_version_mismatch">Изтегленото APK сочи versionCode %1$d, а не публикуваното %2$d</string> + <string name="selfinst_downgrade">Android няма да инсталира versionCode %1$d върху инсталираното %2$d</string> + <string name="selfinst_no_signing">Изтегленото APK няма информация за подпис</string> + <string name="selfinst_wrong_signer">Изтегленото APK не е подписано с ключа за версии на DroidDeck</string> + <string name="appupd_http">Каталогът с актуализации отговори с HTTP %1$d</string> + + <string name="loadstate_starting">Стартиране на сесията…</string> + <string name="loadstate_elapsed">%1$d:%2$02d изминали · все още работи</string> + <string name="loadstate_steam_update">Изтегляне на актуализацията на клиента на Steam · %1$d%%</string> + <string name="loadstate_steam_client">Изтегляне на клиента на Steam · %1$s</string> + + <string name="pextra_busy">Вече тече инсталация на инструмент за съвместимост</string> + <string name="pextra_stop_session">Спри активната сесия, преди да инсталираш инструменти за съвместимост</string> + <string name="pextra_no_release">Не беше намерена ARM64 версия на %1$s</string> + <string name="pextra_no_space">За инсталирането на %1$s са необходими поне 4 GB свободно място плюс размера на изтеглянето</string> + <string name="pextra_downloading">Изтегляне на %1$s %2$s</string> + <string name="pextra_retrying">Повторен опит за изтегляне · опит %1$d от %2$d</string> + <string name="pextra_interrupted">Изтеглянето е прекъснато</string> + <string name="pextra_download_failed">Изтеглянето се провали; частичният файл е запазен, за да може да се продължи при нов опит</string> + <string name="pextra_too_big">Изтеглянето надхвърли размера на версията и беше изтрито</string> + <string name="pextra_incomplete">Изтеглянето беше непълно; частичният файл е запазен за продължаем повторен опит</string> + <string name="pextra_verifying">Проверка на изтеглянето</string> + <string name="pextra_checksum_unreadable">Контролната сума на версията не можа да бъде прочетена; опитай отново</string> + <string name="pextra_no_checksum">%1$s %2$s не публикува контролна сума; нищо не беше инсталирано</string> + <string name="pextra_checksum_mismatch">Несъответствие в контролната сума; изтеглянето беше изтрито</string> + <string name="pextra_session_started">По време на изтеглянето започна сесия - спри я, преди да инсталираш инструменти за съвместимост</string> + <string name="pextra_installing">Инсталиране на %1$s</string> + <string name="pextra_install_failed">Инсталирането на %1$s се провали (код %2$d)</string> + <string name="pextra_could_not_install">%1$s не можа да бъде инсталиран</string> + <string name="esync_fetching">Извличане на пакета droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">с помощни програми за Linux</string> + <string name="cmgr_fex_dlls_only">Само DLL файлове</string> + <string name="cmgr_original_proton_updated">Оригинал (Proton е обновен след последната замяна)</string> + <string name="cmgr_changed_outside">Променено извън Компоненти</string> + <string name="cmgr_not_present">не е налично</string> + <string name="cmgr_original_version">Оригинал %1$s</string> + <string name="cmgr_original_from">Оригинал от %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s ще бъде поставен в %3$s, когато играта, която го използва, се затвори.</string> + <string name="cmgr_swap_done">%1$s %2$s вече е в %3$s. Прилага се при следващото стартиране на игра.</string> + <string name="cmgr_original_missing">Този оригинален пакет не е запазен</string> + <string name="cmgr_restore_queued">%1$s на %2$s ще се върне към оригинала си, когато играта, която го използва, се затвори.</string> + <string name="cmgr_restore_done">%1$s на %2$s е възстановен от оригинала си %3$s.</string> + <string name="cmgr_package_in_use">%1$s се използва в %2$s. Първо замени този Proton с нещо друго.</string> + <string name="cmgr_package_not_stored">%1$s не е запазен</string> + <string name="cmgr_deleted">%1$s е изтрит.</string> + <string name="cmgr_original_kept">Оригиналът на инсталираната версия е запазен: той е пътят назад.</string> + <string name="cmgr_not_stored">Не е запазен</string> + <string name="cmgr_deleted_original">Изтрит е оригиналът %1$s на %2$s.</string> + <string name="cmgr_nightlies_only">Изтеглянията идват само от версиите Nightlies</string> + <string name="cmgr_list_predates_checksums">Този списък с пакети е отпреди въвеждането на контролни суми - обнови го и опитай отново</string> + <string name="cmgr_checksum_mismatch">Несъответствие в контролната сума</string> + + <string name="sprefs_upscaler_linear">Линейно</string> + <string name="sprefs_upscaler_nearest">Най-близко</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (качество)</string> + <string name="sprefs_upscaler_sharpen">Само изостряне</string> + <string name="sprefs_lod_bias_auto">Автоматично (съответства на мащабирането)</string> + + <string name="look_off_desc">Нищо не е приложено.</string> + <string name="look_game_clarity">Яснота на играта</string> + <string name="look_game_clarity_desc">Изостряне с лек контраст - за всеки ден.</string> + <string name="look_vivid">Наситен</string> + <string name="look_vivid_desc">Силно наситен цвят. Deband е включен, за да не се набраздява небето.</string> + <string name="look_cinematic">Кино</string> + <string name="look_cinematic_desc">По-дълбок контраст, по-хладен цвят, заглаждане на ръбовете.</string> + <string name="look_competitive">Състезателен</string> + <string name="look_competitive_desc">Повдигнати сенки и силно изостряне - за да забележиш хората първи.</string> + <string name="look_adaptive_sharpen">Адаптивно изостряне</string> + <string name="look_adaptive_sharpen_desc">Само изостряне, цветът остава непроменен.</string> + <string name="look_filmic">Филмов</string> + <string name="look_filmic_desc">Крива като на филм, леко притъпена.</string> + <string name="look_arcade">Аркаден</string> + <string name="look_arcade_desc">Силен и ефектен.</string> + <string name="look_retro_crt">Ретро CRT</string> + <string name="look_retro_crt_desc">Ефектът на CRT тръбата и аналоговия сигнал заедно.</string> + <string name="look_upscale_sharp">Остро мащабиране</string> + <string name="look_upscale_sharp_desc">За работа под разделителната способност на екрана.</string> + <string name="look_pixel_clean">Чисти пиксели</string> + <string name="look_pixel_clean_desc">Ясни пиксели за 2D и стари игри.</string> + <string name="look_anime_edge">Аниме контури</string> + <string name="look_anime_edge_desc">Контури като в анимация плюс изостряне.</string> + + <string name="gpuinfo_not_adreno">Не е GPU Adreno</string> + <string name="gpuinfo_supported">Поддържан</string> + <string name="gpuinfo_experimental">Експериментален: драйверите му са тестови версии</string> + <string name="gpuinfo_below_tested">Под тестваните устройства (Adreno 725 и по-нови): може да не работи</string> + <string name="gpuinfo_unsupported">Не се поддържа: DroidDeck изисква GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Достигнато е ограничението на GitHub за заявки - опитай отново по-късно</string> + <string name="turnip_github_http">GitHub отговори с HTTP %1$d</string> + <string name="turnip_download_failed">Изтеглянето не успя</string> + <string name="turnip_list_predates_checksums">Този списък с драйвери е отпреди въвеждането на контролни суми - обнови го и опитай отново</string> + <string name="turnip_checksum_mismatch">Несъответствие в контролната сума - изтеглянето беше отхвърлено</string> + <string name="turnip_not_adrenotools">Не е драйвер за AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">няма meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json не може да се прочете (%1$s)</string> + <string name="turnip_reject_linux_driver">това е драйвер за средата на Linux (импортирай го от \"Драйвер за средата на Linux\")</string> + <string name="turnip_reject_wayland">това е драйвер за игри за Wayland, който това приложение не може да използва</string> + <string name="turnip_reject_no_library_name">meta.json не посочва libraryName, затова не може да се предаде нищо на AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json посочва %1$s, който не е в zip файла</string> + <string name="turnip_reject_not_aarch64">%1$s не е 64-битова AArch64 ELF споделена библиотека</string> + <string name="turnip_reject_glibc">%1$s се свързва с glibc - това е Turnip \"-Linux\", който принадлежи към \"Драйвер за средата на Linux\"</string> + <string name="lvd_no_library">В този zip файл няма libvulkan_freedreno*.so. Zip на Turnip за Android (AdrenoTools) или -Wayland не е драйвер за средата на Linux.</string> + <string name="lvd_not_aarch64">%1$s не е 64-битова AArch64 ELF споделена библиотека.</string> + <string name="lvd_not_glibc">%1$s не е glibc драйвер - той се свързва с libc на Android. Средата на Linux изисква zip \"-Linux\"; обикновен Turnip или \"-Wayland\" не може да се зареди от клиента на Steam.</string> + <string name="bundle_no_manifest">Не е пакет с драйвери: няма manifest.json, посочващ драйвер за Android и за Linux</string> + <string name="bundle_entry_outside">Не е пакет с драйвери: %1$s сочи извън него</string> + <string name="bundle_too_large">Не е пакет с драйвери: при разопаковане надхвърля %1$d MB</string> + + <string name="gstore_sd_card">SD карта</string> + <string name="gstore_folder">Папка</string> + + <string name="logshare_chooser">Споделяне на логовете от сесията</string> + + <string name="hdr_needs_android_10">изисква Android 10 или по-нова версия (слоеве на екрана с цветово пространство)</string> + <string name="hdr_none">този екран не отчита поддръжка на HDR</string> + <string name="hdr_not_hdr10">този екран поддържа %1$s, не HDR10</string> + + <string name="gpu_this_gpu">този GPU</string> + <string name="phantom_title_on">Ограничението за дъщерни процеси е включено</string> + <string name="phantom_title_unset">Ограничението за дъщерни процеси не е зададено</string> + <string name="phantom_title_unreadable">Ограничението за дъщерни процеси не можа да бъде проверено</string> + <string name="phantom_title_off">Ограничението за дъщерни процеси е изключено</string> + <string name="phantom_title_not_required">Ограничението за дъщерни процеси не е необходимо</string> + <string name="phantom_instructions_fix">%1$s Ако това не е възможно, свържи устройството с компютър с ADB и изпълни командата отдолу. Върни се тук и провери отново.</string> + <string name="phantom_instructions_off">Сесиите на Steam могат да стартират.</string> + <string name="phantom_instructions_not_applicable">Тази версия на Android не използва това ограничение.</string> + <string name="phantom_fix_toggle">Включи „Деактивиране на ограниченията за дъщерните процеси“ в Опции за програмисти и остави Опции за програмисти включени след това.</string> + <string name="phantom_fix_no_toggle">Тази версия на Android няма превключвател за това. Използвай безжично отстраняване на грешки, за да го промениш от това устройство.</string> + <string name="upd_block_no_apk">Тази версия няма изтегляне за това копие на DroidDeck.</string> + <string name="upd_block_version_code">Android няма да я инсталира върху тази версия, защото нейният versionCode %1$d е по-нисък от инсталираното %2$d.</string> + <string name="upd_fail_downgrade">Android няма да инсталира по-стара версия върху по-нова. Остани на тази версия, докато каналът я настигне.</string> + <string name="upd_fail_signature">Това копие на DroidDeck е подписано по различен начин (локална версия?), затова Android не ще го актуализира на място.</string> + <string name="upd_fail_storage">Няма достатъчно свободно място за актуализацията.</string> + <string name="upd_fail_aborted">Актуализацията беше прекратена.</string> + <string name="upd_fail_with_message">Актуализацията не се инсталира: %1$s</string> + <string name="upd_fail_generic">Актуализацията не се инсталира.</string> + <string name="saves_layout_zip">ZIP на %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s все още не е стартирана</string> + <string name="saves_none_found">Не са намерени файлове със записи за %1$s</string> + <string name="saves_not_save_zip">%1$s няма папка drive_c, затова не е zip със записи от GameHub или Winlator</string> + <string name="gstore_cannot_create">не могат да се създават папки в %1$s</string> + <string name="gstore_cannot_write">не може да се пише в %1$s</string> + <string name="gstore_cannot_write_detail">не може да се пише в %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Папката не е достъпна</string> + <string name="gfiles_name_taken">Друг файл вече използва %1$s</string> + <string name="gfiles_art_unavailable">Папката с визуални материали не е достъпна</string> + <string name="gfiles_unrelated_inventory">Папката има несвързан инвентар за синхронизация</string> + <string name="gfiles_remove_failed">%1$s не можа да бъде премахнат</string> + <string name="gfiles_outside_folder">Файлът излиза извън папката за експортиране</string> + <string name="cmgr_fex_unnamed">FEX (версия без име)</string> + <string name="cmgr_no_profile">няма profile.json в %1$s</string> + <string name="cmgr_not_component_package">%1$s не е пакет с компоненти за Linux (тип %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s свободни</string> + <string name="mode_storage_auto_short">Автоматично</string> + <string name="appupd_catalog_rejected">Каталогът с актуализации не премина проверките (%1$s)</string> + <string name="main_adb_clip_label">Настройка на DroidDeck за дъщерни процеси</string> + <string name="setup_signed_in_offline_unnamed">Вписан · офлайн режим</string> + <string name="setup_signed_in_unnamed">Вписан</string> + <string name="driver_tag_bundled">ВГРАДЕН</string> + <string name="driver_tag_downloaded">ИЗТЕГЛЕН</string> + <string name="driver_tag_imported">ИМПОРТИРАН</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Екран на сесията</string> + <string name="display_resolution">Разделителна способност</string> + <string name="display_game_fit">Напасване на игра 16:9</string> + <string name="display_game_fit_hint">Как игрите с 16:9 се напасват на този екран. При следващата сесия.</string> + <string name="display_game_fit_unavailable">Избери „Напасване на екрана“ или собствен размер, по-тесен от 16:9.</string> + <string name="display_preserve">Запазване на пропорциите</string> + <string name="display_stretch">Разтягане до екрана</string> + <string name="display_image_scaling">Мащабиране на изображението</string> + <string name="display_filter">Филтър за мащабиране</string> + <string name="display_filter_hint">Общ за Steam и Desktop.</string> + <string name="display_filter_live">Прилага се веднага. Общ за Steam и Desktop.</string> + <string name="display_filter_note">FSR, GSR и NIS се прилагат при уголемяване на изображението на сесията. „Само изостряне“ работи и без уголемяване.</string> + <string name="display_sharpness">Острота на филтъра</string> + <string name="display_frame_rate">Честота на кадрите</string> + <string name="display_look_filter">%1$s Задава мащабиране на %2$s.</string> + <string name="display_match_screen">Напасване на екрана (%1$d×%2$d)</string> + <string name="display_follow_screen">Следване на екрана (преоразмерява при сгъване или разгъване)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Покажи данните за устройството</string> + <string name="device_info_hide">Скрий данните за устройството</string> + <string name="device_info_loading">Прочитане на устройството…</string> + <string name="device_info_copy">Копирай</string> + <string name="device_info_copy_hint">Копирай тези данни в доклад за грешка.</string> + <string name="device_info_copied">Копирано.</string> + <string name="force_ssbs_title">Принудително SSBS</string> + <string name="force_ssbs_hint">Поддържа настройка за скоростта на процесора, която Wine непрекъснато изключва. Може да ускори Windows игрите на Snapdragon 8 Elite; при по-стари чипове промяната е малка. Прилага се при следващото стартиране на игра.</string> + + <string name="rail_stores">Магазини</string> + <string name="source_steam">Steam</string> + <string name="source_added">Персонализирана</string> + <string name="setup_stores">Магазини</string> + <string name="setup_stores_open_on">Отваряне на магазин на</string> + <string name="setup_stores_speed">Скорост на изтегляне</string> + <string name="setup_stores_engine">Ядро на магазините</string> + <string name="setup_stores_engine_chip_ready">● Ядрото е готово</string> + <string name="setup_stores_engine_chip_missing">Не е компилирано</string> + <string name="stores_tier_balanced">Балансирано</string> + <string name="stores_tier_fast">Бързо</string> + <string name="stores_tier_max">Максимално</string> + <string name="stores_title">Магазини</string> + <string name="stores_settings">Настройки на магазините</string> + <string name="stores_settings_eyebrow">Настройки</string> + <string name="stores_chip_signed_out">(не е вписан)</string> + <string name="stores_tab_store">Магазин</string> + <string name="stores_tab_installed">Инсталирани</string> + <string name="stores_tab_library">Библиотека</string> + <string name="stores_tab_all">Всички</string> + <string name="stores_tab_downloads">Изтегляния</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Вход</string> + <string name="stores_signout_named">%1$s · изход</string> + <string name="stores_signout_title">Изход от %1$s?</string> + <string name="stores_signout_note">Инсталираните игри остават. Библиотеката се изтегля отново, когато се впишеш пак.</string> + <string name="stores_signout_stay">Остани вписан</string> + <string name="stores_signout_go">Изход</string> + <string name="stores_search_catalog">Търсене в каталога на %1$s…</string> + <string name="stores_search_installed">Търсене в инсталираните игри…</string> + <string name="stores_search_library">Търсене в твоята библиотека…</string> + <string name="stores_search_open">Търсене</string> + <string name="stores_installed_empty">Нищо инсталирано</string> + <string name="stores_library_loading">Зареждане</string> + <string name="stores_nothing_matches">Няма игри</string> + <string name="stores_shelves_loading">Зареждане на магазина…</string> + <string name="stores_amazon_no_catalog">Няма каталог</string> + <string name="stores_shelf_new">Новости</string> + <string name="stores_shelf_deals">Промоции</string> + <string name="stores_shelf_free">Безплатни игри</string> + <string name="stores_shelf_trending">Актуални</string> + <string name="stores_shelf_library">Твоята библиотека</string> + <string name="stores_play">Играй</string> + <string name="stores_install">Инсталирай</string> + <string name="stores_resume_install">Продължи инсталацията</string> + <string name="stores_dl_interrupted">Прекъснато</string> + <string name="stores_install_size">Инсталация · %1$s</string> + <string name="stores_get_free">Вземи безплатно</string> + <string name="stores_view_on">Виж в %1$s</string> + <string name="stores_buy_price">Купи · %1$s</string> + <string name="stores_installed_chip">Инсталирана</string> + <string name="stores_in_library">В библиотеката</string> + <string name="stores_free">Безплатна</string> + <string name="stores_resume">Продължи</string> + <string name="stores_refresh">Обнови</string> + <string name="stores_sort">Сортиране</string> + <string name="stores_sort_last_played">Играни наскоро</string> + <string name="stores_sort_recently_installed">Инсталирани наскоро</string> + <string name="stores_sort_title_asc">Заглавие А–Я</string> + <string name="stores_sort_title_desc">Заглавие Я–А</string> + <string name="stores_sort_size_desc">Размер: най-голям</string> + <string name="stores_sort_size_asc">Размер: най-малък</string> + <string name="stores_sort_release_date">Дата на издаване</string> + <string name="stores_view_list">Изглед на списък</string> + <string name="stores_view_cards">Изглед с карти</string> + <string name="stores_show_mature">Показвай съдържание за възрастни</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Офлайн</string> + <string name="epic_card_none">Изключено</string> + <string name="epic_eos">Вход в Epic (EOS)</string> + <string name="epic_offline">Стартирай офлайн</string> + <string name="epic_resolve">Разреши входа в Epic</string> + <string name="epic_client_version">Версия %1$s</string> + <string name="epic_client_no_runtime">Първо инсталирайте средата на Linux</string> + <string name="epic_client_checking">Проверка за последната версия…</string> + <string name="epic_client_unpacking">Разархивиране…</string> + <string name="epic_client_unreachable">Сървърът за изтегляне не отговори</string> + <string name="epic_client_needs_fex">Epic Games Launcher се нуждае от FEX, който Steam изтегля. Отворете отново лаунчъра, след като Steam стартира.</string> + <string name="epic_client_download_failed">Изтеглянето се провали: %1$s</string> + <string name="epic_client_unpack_failed">Разархивирането на програмата не бе успешно: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher не прие влизането. Стартирайте го отново от програмата.</string> + <string name="epic_client_uninstall_body">Премахва лаунчера и освобождава мястото му. Игрите ви от Epic остават инсталирани и работят, а входът се запазва за следващото инсталиране.</string> + <string name="epic_client_uninstall_stops">Текущата сесия първо ще се затвори.</string> + <string name="epic_client_uninstalled">Epic Games Launcher е деинсталиран</string> + <string name="epic_client_uninstall_failed">Някои файлове на лаунчера не можаха да бъдат премахнати. Опитайте отново.</string> + <string name="epic_client_uninstalling">Изчакайте Epic Games Launcher да се деинсталира</string> + <string name="store_cloud_saves">Облачни запазвания</string> + <string name="cloud_upload">Качи в облака</string> + <string name="cloud_download">Изтегли от облака</string> + <string name="cloud_none">Няма облачни запазвания</string> + <string name="cloud_conflict">Конфликт в облака</string> + <string name="cloud_conflict_files">Конфликт в облака · %1$d файла</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Запази облачната</string> + <string name="cloud_keep_local">Запази локалната</string> + <string name="cloud_checking">Проверка на облака…</string> + <string name="cloud_last_sync">Последна синхронизация %1$s</string> + <string name="cloud_never">Още не е синхронизирано</string> + <string name="cloud_done">%1$d файла</string> + <string name="stores_eyebrow_installed">инсталирана</string> + <string name="stores_eyebrow_library">в библиотеката ти</string> + <string name="stores_eyebrow_store">магазин</string> + <string name="achievements_title">Постижения</string> + <string name="achievements_count">%1$d от %2$d отключени</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Отключени · %1$d</string> + <string name="achievements_group_locked">Заключени · %1$d</string> + <string name="achievements_group_hidden">Скрити · %1$d</string> + <string name="achievements_hidden">Скрито постижение</string> + <string name="achievements_hidden_detail">Подробностите се показват след отключването му.</string> + <string name="achievements_all">Всички постижения са отключени</string> + <string name="achievements_reading">Зареждане…</string> + <string name="achievements_signed_out">Влезте в %1$s, за да видите постиженията си.</string> + <string name="achievements_unreachable">Неуспешна връзка с %1$s. Проверете отново, когато сте онлайн.</string> + <string name="achievements_none">%1$s не показва постижения за тази игра.</string> + <string name="achievements_show_all">Покажи всички %1$d</string> + <string name="achievements_dialog_title">Постижения · %1$s</string> + <string name="stores_in_steam">✓ В Steam</string> + <string name="stores_uninstall">Деинсталирай</string> + <string name="stores_uninstalling">Деинсталиране…</string> + <string name="stores_uninstall_title">Деинсталиране на %1$s?</string> + <string name="stores_uninstall_body_size">Освобождава %1$s и я премахва от Steam.</string> + <string name="stores_uninstall_body">Премахва файловете ѝ и пряката ѝ пътека в Steam.</string> + <string name="stores_launch_not_registered">Steam ще засече играта при следващото стартиране; стартирай я оттам или отвори Steam сега.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Избор на Steam за всяка игра</string> + <string name="stores_card_audio">Звук</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Компоненти</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Ядро</string> + <string name="stores_card_engine_value">%1$s · собствено</string> + <string name="stores_card_engine_java">%1$s · вградено</string> + <string name="stores_how_it_runs">Как се стартира</string> + <string name="stores_kv_fetched">Изтеглена от</string> + <string name="stores_kv_fetched_value">%1$s, с твоя профил</string> + <string name="stores_kv_installed_to">Инсталирана в</string> + <string name="stores_kv_installed_to_value">Хранилище за игри (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Стартирана от</string> + <string name="stores_kv_launched_by_value">Steam и Proton, по същия начин както игрите от Steam</string> + <string name="stores_kv_launched_by_epic">Steam и Proton · вход в Epic при всяко стартиране, оверлеят на EOS е изключен</string> + <string name="stores_kv_launched_by_amazon">Steam и Proton · зададени са променливите на Amazon Games Services</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">добавена в Steam при инсталацията (Deck UI + Steam Input)</string> + <string name="stores_downloads_empty">Няма изтегляния</string> + <string name="stores_dl_paused">На пауза</string> + <string name="stores_dl_queued">На опашка</string> + <string name="stores_dl_queued_at">На опашка · №%1$d</string> + <string name="stores_dl_cancelled">Отказано</string> + <string name="stores_dl_failed">Неуспешно</string> + <string name="stores_dl_failed_reason">Неуспешно · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Пауза</string> + <string name="stores_dl_resume">Продължи</string> + <string name="stores_dl_cancel">Откажи</string> + <string name="stores_dl_retry">Опитай отново</string> + <string name="stores_dl_clear">Изчисти</string> + <string name="stores_dl_clear_all">Изчисти завършените</string> + <string name="stores_stage_manifest">Манифест</string> + <string name="stores_stage_download">Изтегляне</string> + <string name="stores_stage_verify">Проверка</string> + <string name="stores_stage_install">Инсталация</string> + <string name="stores_stage_done">Готово</string> + <string name="stores_stage_checking">Проверка</string> + <string name="stores_stage_downloading">Изтегляне</string> + <string name="stores_dl_cancel_confirm">Изтриване на изтеглянето?</string> + <string name="stores_dl_failed_kept">Неуспешно · %1$s е запазен</string> + <string name="stores_stage_verifying">Проверка</string> + <string name="stores_stage_installing">Инсталиране</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d файла</string> + <string name="stores_download_manager">Диспечер на изтеглянията</string> + <string name="stores_parallel">Изтегляния едновременно</string> + <string name="stores_install_where">Инсталирай в</string> + <string name="stores_install_title">Инсталация на %1$s:</string> + <string name="stores_target_internal">Вътрешна памет</string> + <string name="stores_target_free">%1$s свободни</string> + <string name="stores_target_free_unknown">Свободното място е неизвестно</string> + <string name="stores_storage_insufficient">Недостатъчно свободно място: нужно е %1$s, свободни са само %2$s</string> + <string name="stores_storage_low">Недостатъчно място (свободни %1$s, нужни %2$s)</string> + <string name="stores_notification_channel">Изтегляния от магазина</string> + <string name="stores_notification_channel_hint">Показва напредъка на изтеглянето на игри и ги държи активни на заден фон</string> + <string name="stores_notification_one">Изтегляне</string> + <string name="stores_notification_many">%1$d изтегляния</string> + <string name="stores_notification_waiting">Подготовка…</string> + <string name="stores_notification_done_channel">Завършени изтегляния от магазина</string> + <string name="stores_notification_installed">%1$s е инсталирана</string> + <string name="stores_notification_failed">Изтеглянето на %1$s се провали</string> + <string name="stores_notification_delete">Изтрий</string> + <string name="stores_notification_keep">Запази</string> + <string name="stores_login_title">Вход в %1$s</string> + <string name="stores_login_provider_title">Вход с твоя доставчик</string> + <string name="stores_login_reload">Презареди</string> + <string name="stores_login_close">Затвори</string> + <string name="stores_login_retry">Опитай отново</string> + <string name="stores_login_finishing">Завършване на входа…</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> + <string name="stores_login_error_ssl">Връзката със страницата за вход не е защитена.</string> + <string name="stores_login_error_verification">Входът не можа да бъде потвърден. Опитай отново.</string> + <string name="stores_login_error_generic">Входът се провали. Опитай отново.</string> + <string name="common_close">Затвори</string> + <string name="common_back">Назад</string> + <string name="common_edit">Редактирай</string> + <string name="games_add_all">Добави всички игри от тази папка</string> + <string name="games_added_none">Нищо ново в тази папка</string> + <string name="edit_name">Име</string> + <string name="edit_target">Цел</string> + <string name="edit_start_in">Старт в</string> + <string name="edit_launch_options">Настройки за стартиране</string> + <string name="edit_artwork">Визия</string> + <string name="edit_other_exe">Друг exe…</string> + <string name="edit_remove">Премахни</string> + <string name="art_cover">Обложка</string> + <string name="art_wide_cover">Широка обложка</string> + <string name="art_adjust_logo">Настройка на логото</string> + <string name="logo_pos_default">По подразбиране</string> + <string name="logo_pos_upper_left">Горе вляво</string> + <string name="logo_pos_upper_center">Горе в средата</string> + <string name="logo_pos_center">В средата</string> + <string name="logo_pos_bottom_left">Долу вляво</string> + <string name="logo_pos_bottom_center">Долу в средата</string> + <string name="logo_pos_position">Позиция</string> + <string name="logo_pos_size">Размер</string> + <string name="logo_pos_save">Запази</string> + <string name="logo_pos_reset">Обратно по подразбиране</string> + <string name="logo_pos_hint">Рисува се върху фона на играта, както прави Steam. Точната позиция може да се различава с няколко пиксела.</string> + <string name="logo_pos_no_logo">Тази игра още няма лого. Избери такова в Лого, за да го видиш тук.</string> + <string name="logo_pos_failed">Позицията на логото не можа да се запази. Опитай отново.</string> + <string name="art_background">Фон</string> + <string name="art_logo">Лого</string> + <string name="art_icon">Икона</string> + <string name="art_src_folder">Папка на играта</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Твой файл</string> + <string name="art_src_exe">От exe файла</string> + <string name="art_src_auto">Автоматично</string> + <string name="art_pick_image">Избери изображение…</string> + <string name="art_pick_title">Избери изображение: %1$s</string> + <string name="art_reset">Връщане към автоматично</string> + <string name="art_search_sgdb">Търсене в SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Търсене на игра</string> + <string name="art_sgdb_other_games">Други резултати</string> + <string name="art_sgdb_none">Няма резултати.</string> + <string name="art_sgdb_no_key">SteamGridDB изисква API ключ. Добави своя от Настройки › Лаунчър.</string> + <string name="art_sgdb_bad_key">SteamGridDB не прие API ключа. Провери го от Настройки › Лаунчър.</string> + <string name="art_sgdb_limit">SteamGridDB ограничава заявките в момента. Опитай отново след минута.</string> + <string name="art_sgdb_offline">SteamGridDB не е достъпен. Провери връзката.</string> + <string name="art_sgdb_server">Нещо се обърка в SteamGridDB. Опитай по-късно.</string> + <string name="art_sgdb_no_game">SteamGridDB няма резултати за тази игра. Опитай да я потърсиш.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d игра добавена</item> + <item quantity="other">%1$d игри добавени</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d вече в Игри</item> + <item quantity="other">%1$d вече в Игри</item> + </plurals> + <string name="hop_back">B · Назад към %1$s</string> + <string name="hop_from_games">играта</string> + <string name="hop_from_play">Настройки за игра</string> + <string name="sheet_graphics_drivers">Графични драйвери</string> + <string name="comp_this_proton">Този Proton</string> + <string name="comp_every_proton">Всеки Proton</string> + <string name="comp_for_every_proton">За всеки Proton</string> + <string name="comp_available_count">Налични · %1$d</string> + <string name="comp_checked">Проверено %1$s</string> + <string name="comp_check_all">Проверка за нови компоненти и драйвери</string> + <string name="comp_get">Вземи</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton и FEX по-долу са на този Proton</string> + <string name="comp_device_tested">%1$s · тестван</string> + <string name="comp_device_untested">%1$s · нетестван</string> + <string name="comp_device_unsupported">%1$s · неподдържан</string> + <string name="gpu_auto_keeps">Поддържа препоръчаната двойка актуална</string> + <string name="gpu_bar_auto">Автоматично · %1$s</string> + <string name="gpu_separately">Драйверите за среда и екран поотделно</string> + <string name="gpu_use_title">Използвай %1$s?</string> + <string name="gpu_mode_title">Как се избират драйверите</string> + <string name="gpu_mode_auto_detail">Най-добрата двойка за този GPU, винаги актуална</string> + <string name="gpu_mode_pair">Съвпадаща двойка</string> + <string name="gpu_mode_pair_detail">Избери двойка; задава двата драйвера</string> + <string name="gpu_mode_mix">Свободно смесване</string> + <string name="gpu_mode_mix_detail">Избери картина и среда поотделно</string> + <string name="gpu_mode_pair_short">Двойка</string> + <string name="gpu_mode_mix_short">Смесено</string> + <string name="gpu_src_auto">АВТО</string> + <string name="gpu_src_pair">ДВОЙКА</string> + <string name="gpu_src_bundle">ПАКЕТ</string> + <string name="gpu_src_chosen">ИЗБРАН</string> + <string name="gpu_src_by_gpu">СПОРЕД GPU</string> + <string name="gpu_src_default">СТАНДАРТ</string> + <string name="gpu_display_live">Ризува сега</string> + <string name="gpu_display_pending">Нужен е рестарт · дотогава рисува %1$s</string> + <string name="gpu_runtime_live">Активна</string> + <string name="gpu_runtime_pending">Следваща сесия · тази остава с %1$s</string> + <string name="gpu_display_next">Ризува екрана. Важи от следващата сесия.</string> + <string name="gpu_previous_driver">предишният драйвер</string> + <string name="gpu_restart_banner">Рестартирай, за да смениш драйвера за картина.</string> + <string name="gpu_restart_blocked">Спри текущата сесия и рестартирай DroidDeck, за да смениш драйвера за картина.</string> + <string name="gpu_restart_now">Рестарт сега</string> + <string name="gpu_restart_later">По-късно</string> + <string name="gpu_auto_title">Автоматично избра тази двойка за твоя %1$s</string> + <string name="gpu_auto_builtin_title">Автоматично използва вградените драйвери за твоя %1$s</string> + <string name="gpu_auto_reason">Избрано за семейството %1$s. Новите версии се инсталират на заден план.</string> + <string name="gpu_pair_title">Избери двойка</string> + <string name="gpu_pair_hint">Двойката задава едновременно драйвера за картина и драйвера за среда.</string> + <string name="gpu_mix_title">Избери всеки драйвер</string> + <string name="gpu_mix_hint">Пакетът запълва и двете места. Промените в картината важат след рестарт, промените в средата от следващата сесия.</string> + <string name="gpu_change_display">Смяна на драйвера за картина</string> + <string name="gpu_change_runtime">Смяна на драйвера за среда</string> + <string name="gpu_autos_pick">ИЗБОР НА АВТОМАТИЧНО</string> + <string name="gpu_installed">Инсталиран</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · рестартирай за прилагане</string> + <string name="gpu_chip_restart">%1$s · нужен е рестарт</string> + <string name="comp_this_device">Това устройство</string> + <string name="proton_remove_title">Премахване на %1$s?</string> + <string name="setup_tab_diagnostics">Диагностика</string> + <string name="setup_ready">Готово за игра</string> + <string name="setup_not_ready">Още не е готово за игра</string> + <string name="setup_ready_runtime">среда %1$s</string> + <string name="setup_ready_limit_off">ограничението за процеси е изключено</string> + <string name="setup_ready_signed_in">вписан като %1$s</string> + <string name="setup_needs_you">Когато нещо изисква действие</string> + <string name="setup_group_look">Визия</string> + <string name="setup_group_device">Това устройство</string> + <string name="setup_group_art">Визия на библиотеката</string> + <string name="setup_group_download">Изтегляне</string> + <string name="setup_download_source">Източник</string> + <string name="setup_download_source_auto">Автоматично</string> + <string name="setup_download_source_direct">Директно</string> + <string name="setup_download_source_mirror">Огледало</string> + <string name="setup_download_source_custom">Собствен префикс</string> + <string name="setup_download_mirror">Сайт</string> + <string name="setup_download_prefix">Префикс</string> + <string name="flathub_eyebrow">ПРИЛОЖЕНИЯ ЗА LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Приложения за десктоп на Linux, отваряни от Desktop.</string> + <string name="flathub_setup">Настрой Flathub</string> + <string name="flathub_remove_title">Премахване на %1$s?</string> + <string name="flathub_remove_note">Настройките и файловете му се запазват.</string> + <string name="flathub_keep">Запази</string> + <string name="desktop_size">Размер на диска</string> + <string name="desktop_uninstall_title">Деинсталиране на десктопа?</string> + <string name="desktop_all_systems">Всички</string> + <string name="gog_achievements">Постижения в GOG</string> + <string name="gog_achievements_hint">Синхронизира постиженията за поддържаните игри от GOG. Влиза в сила при следващото стартиране.</string> + <string name="gog_achievements_off">Постиженията са изключени</string> + <string name="gog_achievements_on">Постиженията са включени</string> + <string name="gog_achievements_signin">Влезте в GOG отново</string> + <string name="gog_achievements_uploaded">Постиженията са качени</string> + <string name="gog_achievements_pending">Качването на постижение е в изчакване</string> + <string name="gog_achievements_enable_store">Включи постиженията на GOG в настройките на магазините</string> + <string name="gog_achievements_unavailable">Постиженията не са достъпни; проверете логовете на сесията</string> + <string name="achievement_unlocked">Постижение отключено</string> + <string name="touch_paste">Поставяне</string> + <string name="touch_dpad">Кръстат бутон</string> + <string name="touch_left_stick">Ляв стик</string> + <string name="touch_right_stick">Десен стик</string> + <string name="touch_menu">Меню</string> + <string name="touch_keyboard">Клавиатура</string> + <string name="touch_dpad_up">Кръстат бутон нагоре</string> + <string name="touch_dpad_down">Кръстат бутон надолу</string> + <string name="touch_dpad_left">Кръстат бутон наляво</string> + <string name="touch_dpad_right">Кръстат бутон надясно</string> + <string name="touch_title">Сензорно управление</string> + <string name="touch_controller">Сензорен контролер</string> + <string name="touch_mouse">Мишка</string> + <string name="touch_on">Вкл.</string> + <string name="touch_off">Изкл.</string> + <string name="touch_speed_slow">Бавна</string> + <string name="touch_speed_normal">Нормална</string> + <string name="touch_speed_fast">Бърза</string> + <string name="touch_edit_layout">Редактиране на разположението</string> + <string name="touch_droiddeck_menu">Меню на DroidDeck</string> + <string name="touch_drag_hint">Плъзнете елементите за управление върху екрана</string> + <string name="touch_arrange">Разположи</string> + <string name="touch_discard">Отхвърли</string> + <string name="touch_saving">Запазване…</string> + <string name="touch_icon">Икона</string> + <string name="touch_narrower">Ш−</string> + <string name="touch_wider">Ш+</string> + <string name="touch_shorter">В−</string> + <string name="touch_taller">В+</string> + <string name="touch_hide">Скрий</string> + <string name="touch_color_opacity">Цвят и прозрачност…</string> + <string name="touch_copy_layout">Копиране на това разположение</string> + <string name="touch_layout_copied">Разположението е копирано; поставете го в сензорното разположение на всяка игра</string> + <string name="touch_paste_layout">Поставяне на копираното разположение</string> + <string name="touch_reset_layout">Връщане към стандартното на Steam</string> + <string name="touch_no_binding">Този елемент няма зададено действие в Steam, за да му се даде икона</string> + <string name="touch_icon_for">Икона за %1$s</string> + <string name="touch_layout_color">Цвят на сензорното разположение</string> + <string name="touch_done">Готово</string> + <string name="touch_save_failed">Сензорното разположение не можа да се запази</string> + <string name="touch_saved">Сензорното разположение е запазено в Steam</string> + <string name="touch_app_id">Приложение %1$d</string> + <string name="touch_label_hint">Етикет (незадължително)</string> + <string name="touch_icons_missing">Иконите на Steam не бяха намерени</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d икона от Steam</item> + <item quantity="other">%1$d икони от Steam</item> + </plurals> + <string name="touch_icon_color">Цвят на иконата</string> + <string name="touch_button_color">Цвят на бутона</string> + <string name="touch_no_icon">Без икона</string> + + <string name="stores_sync_sign_in">Проверка на вписването…</string> + <string name="stores_sync_library">Извличане на библиотеката ви…</string> + <string name="stores_sync_game_list">Извличане на списъка с игри…</string> + <string name="stores_sync_details">Зареждане на подробности за игрите… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Синхронизиране на %1$d игра…</item> + <item quantity="other">Синхронизиране на %1$d игри…</item> + </plurals> + <string name="stores_sync_progress">Синхронизиране… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Извличане на обложки…</string> + <string name="stores_sync_failed">Синхронизирането е неуспешно</string> + <string name="stores_sync_no_games">В библиотеката ви в %1$s не бяха намерени игри</string> + <string name="stores_sync_amazon_no_answer">Amazon Games не отговори за библиотеката ви: обновете или влезте отново</string> + <string name="stores_sync_gog_unreachable">Неуспешно свързване с GOG</string> + <string name="stores_sync_gog_unreadable">Библиотеката ви в GOG не можа да се прочете</string> + <string name="stores_registering">Регистриране в Steam…</string> + <string name="mode_client_arch">Клиент на Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Диагностика на VAC</string> + <string name="setup_vac_diag_hint">Игрите на Source записват конзолата си (-condebug); vac.txt в дневниците на сесията показва дали играта е защитена от VAC</string> + <string name="load_starting_steam_x64">Стартиране на Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Използва се от клиента на Steam x86-64</string> + <string name="storage_uninstall_in_x64">Това копие е в клиента на Steam x86-64. Изберете x86-64 в „Клиент на Steam“, след което го деинсталирайте тук.</string> + <string name="storage_uninstall_in_arm64">Това копие е в клиента на Steam ARM64. Изберете ARM64 в „Клиент на Steam“, след което го деинсталирайте тук.</string> + <string name="drawer_page_glasses">Очила</string> + <string name="glasses_open">Очила VITURE</string> + <string name="glasses_control">Управление на очилата</string> + <string name="glasses_driver_missing">Тази версия не включва драйвера за тези очила.</string> + <string name="glasses_connection_failed">Неуспешно свързване с очилата. Свържете кабела отново или докоснете „Разрешаване“, за да опитате пак.</string> + <string name="glasses_allow">Разрешаване</string> + <string name="glasses_allow_hint">Позволява на DroidDeck да задава честотата на опресняване, режима 3D, яркостта, силата на звука и затъмняването на очилата и да чете данните от проследяването на главата.</string> + <string name="glasses_asking">Изчаква се разрешението ви в прозореца на Android…</string> + <string name="glasses_denied">Управлението беше отказано. Разрешете го, за да променяте настройките на очилата.</string> + <string name="glasses_no_control">Тези очила показват играта, но настройките им не могат да се променят оттук.</string> + <string name="glasses_output">Изход</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Играта на очилата</string> + <string name="glasses_game_on_hint">Показва играта само на очилата. Изключено: телефонът я показва, а Android дублира екрана му.</string> + <string name="glasses_display">Екран</string> + <string name="glasses_refresh">Честота на опресняване</string> + <string name="glasses_3d">3D (един до друг)</string> + <string name="glasses_3d_hint">Превключете смарт очилата на 3D едно до друго. Проследяването на главата се контролира отделно.</string> + <string name="glasses_3d_failed">3D сигналът не беше потвърден. Опитайте отново, когато 2D картината се върне.</string> + <string name="glasses_no_signal">Няма картина: очилата са в режим, който този телефон не може да изпрати. Задръжте бутона им 2D/3D или ги изключете и включете отново.</string> + <string name="glasses_3d_refresh">Честота на опресняване в 3D</string> + <string name="glasses_auto3d">3D за VR игри</string> + <string name="glasses_auto3d_hint">Превключва на 3D, докато SteamVR работи, и после обратно.</string> + <string name="glasses_picture">Картина</string> + <string name="glasses_picture_hint">Автоматично показва плоско съдържание и в двете очи и разпознава SteamVR. Изберете „Игра отстрани“ за SBS съдържание.</string> + <string name="glasses_picture_auto">Автоматично</string> + <string name="glasses_picture_screen">Виртуален екран</string> + <string name="glasses_picture_sbs">Игра 3D един до друг</string> + <string name="glasses_screen_size">Ширина на екрана</string> + <string name="glasses_screen_distance">Разстояние до екрана</string> + <string name="glasses_screen_next_session">Ширината и разстоянието се прилагат, когато игра работи на очилата като виртуален екран.</string> + <string name="glasses_screen_no_output">Тези настройки се прилагат, докато опцията „Играта на очилата“ е включена и играта се показва там.</string> + <string name="glasses_screen_flat_hint">„Автоматично“ запазва тази 2D игра на цял екран. Използвайте виртуален екран, за да настроите ширината, разстоянието и проследяването на главата.</string> + <string name="glasses_screen_use">Използване на виртуален екран</string> + <string name="glasses_screen_direct_hint">SteamVR запълва изгледа. Регулирайте зрителното си поле във VR; ширината и разстоянието се отнасят само за виртуален екран.</string> + <string name="glasses_screen_sbs_hint">Игрите 3D един до друг запълват всяко око. Ширината и разстоянието се отнасят само за виртуален екран.</string> + <string name="glasses_tracking_flat_hint">„Автоматично“ държи тази 2D игра неподвижна в изгледа. Изберете „Виртуален екран“ в „Екран“, за да използвате проследяване на главата.</string> + <string name="glasses_tracking_sbs_hint">Проследяването на главата се отнася за виртуален екран или за работеща игра в SteamVR.</string> + <string name="glasses_hardware">Устройство</string> + <string name="glasses_brightness">Яркост</string> + <string name="glasses_volume">Сила на звука</string> + <string name="glasses_sunblock">Затъмняване</string> + <string name="glasses_sunblock_hint">Затъмнява предните стъкла.</string> + <string name="glasses_tracking">Проследяване</string> + <string name="glasses_head_tracking">Проследяване на главата</string> + <string name="glasses_head_tracking_hint">Собствените сензори на очилата завъртат виртуалния екран и SteamVR заедно с главата ви.</string> + <string name="glasses_recenter">Центриране на изгледа</string> + <string name="glasses_recenter_button">Центриране на екрана</string> + <string name="glasses_vr_fov">Зрително поле на SteamVR</string> + <string name="glasses_vr_fov_hint">По-ниско приближава SteamVR и запълва очилата; по-високо показва повече около вас.</string> + <string name="glasses_playing">Играете на %1$s</string> + <string name="glasses_calibration">Калибриране на проследяването</string> + <string name="glasses_calibration_hint">Намалява дрейфа и подравнява хоризонта.</string> + <string name="glasses_calibration_saved_hint">За тези очила се прилага запазено калибриране.</string> + <string name="glasses_calibration_open">Калибриране</string> + <string name="glasses_calibration_instructions">Поставете свързаните очила обърнати наопаки на равна повърхност, така че рамката да лежи равномерно. Докоснете „Стартиране“ и не ги докосвайте около 8 секунди. При движение измерването започва отначало. Това коригира дрейфа и наклона, но не и посоката.</string> + <string name="glasses_calibration_settling">Оставете очилата обърнати наопаки и не ги докосвайте. Изчаква се да се стабилизират…</string> + <string name="glasses_calibration_collecting">Измерване на сензорите. Дръжте очилата неподвижни.</string> + <string name="glasses_calibration_moving">Открито е движение. Не докосвайте очилата; измерването ще започне отначало автоматично.</string> + <string name="glasses_calibration_turn_over">Поставете очилата обърнати наопаки на равна повърхност. Измерването ще започне, когато са поставени правилно.</string> + <string name="glasses_calibration_complete">Калибрирането е запазено. Сложете очилата, погледнете право напред и докоснете „Готово“, за да центрирате изгледа.</string> + <string name="glasses_calibration_failed">Калибрирането не можа да завърши. Проверете връзката и дръжте очилата неподвижни, след което опитайте отново. Предишното ви калибриране не е променено.</string> + <string name="glasses_calibration_start">Стартиране</string> + <string name="glasses_calibration_done">Готово</string> + <string name="glasses_calibration_reset">Нулиране на калибрирането</string> + <string name="glasses_calibration_reset_hint">Да се премахне ли запазеното калибриране и да се възстановят стойностите по подразбиране за модела? Центрирайте изгледа, след като сложите очилата отново.</string> + <string name="glasses_calibration_reset_button">Нулиране</string> + <string name="hand_camera_group">Проследяване на ръцете</string> + <string name="hand_camera_prompt_title">Проследяване на ръце или контролери Joy-Con с камерата на телефона?</string> + <string name="hand_camera_prompt_body">Без свързан контролер, камерата на телефона проследява вашите голи ръце във VR: щипнете палеца и показалеца си, за да щракнете, затворете ръката си, за да хванете, и обърнете дланта си към себе си и щипнете, за да отворите менюто. С двойни контролери Joy-Con, камерата проследява позицията им, докато контролерите Joy-Con осигуряват въртене и натискане на бутони. Снимките се обработват на това устройство и никога не се запазват или изпращат.</string> + <string name="hand_camera_rear">Задна камера</string> + <string name="hand_camera_rear_hint">Препоръчително. Обикновено по-рязка и по-широкоъгълна.</string> + <string name="hand_camera_front">Предна камера</string> + <string name="hand_camera_front_hint">За случаите, когато задната част на устройството не може да е насочена към вас.</string> + <string name="hand_camera_allow">Използване на камерата</string> + <string name="hand_camera_not_now">Не сега</string> + <string name="hand_camera_setting">Проследяване на ръцете с камерата</string> + <string name="hand_camera_setting_hint">Използвайте камерата на телефона за жестове с голи ръце или за позициониране на сдвоени контролери Joy-Con във VR. Контролерите Joy-Con осигуряват въртене и натискане на бутони. Поставя на пауза, докато интелигентните очила проследяват ръцете ви или контролерите Joy-Con. Изображенията се обработват само на това устройство.</string> + <string name="hand_camera_choice">Камера</string> + <string name="hand_camera_access">Достъп до камерата</string> + <string name="hand_camera_access_hint">Разрешете достъп до камерата, за да започне проследяването на ръцете.</string> + <string name="hand_camera_access_denied">Достъпът до камерата е изключен. Включете го в настройките на Android.</string> + <string name="hand_camera_allow_button">Разрешаване</string> + <string name="hand_camera_open_settings">Отваряне на настройките</string> + <string name="hand_camera_placement">Разположение на камерата</string> + <string name="hand_camera_placement_hint">Проверете дали камерата ви вижда, преди да играете.</string> + <string name="hand_camera_check">Проверка</string> + <string name="hand_camera_check_title">Разположение на камерата</string> + <string name="hand_camera_how_rear">Поставете устройството изправено на 1,5–2 метра разстояние, приблизително на нивото на гърдите, със задната камера, насочена към вас. След това застанете в кадър с протегнати ръце.</string> + <string name="hand_camera_how_front">Поставете устройството изправено на 1,5–2 метра разстояние, приблизително на нивото на гърдите, с екрана, насочен към вас. След това застанете в кадър с протегнати ръце.</string> + <string name="hand_camera_starting">Стартиране на камерата…</string> + <string name="hand_camera_stand_up">Устройството лежи легнало. Изправете го, за да бъде камерата насочена към вас.</string> + <string name="hand_camera_upright">Изправете устройството повече, за да бъде камерата насочена към вас.</string> + <string name="hand_camera_not_seen">Все още не се виждате. Застанете в кадър така, че да се виждат главата и раменете ви.</string> + <string name="hand_camera_move_back">Отстъпете малко назад.</string> + <string name="hand_camera_move_closer">Приближете се малко.</string> + <string name="hand_camera_show_hands">Протегнете двете си ръце така, че камерата да ги вижда.</string> + <string name="hand_camera_good">Изглежда добре.</string> + <string name="hand_camera_failed">Камерата не можа да се стартира. Затворете другите приложения, които я използват, и опитайте отново.</string> + <string name="hand_camera_switch">Смяна на камерата</string> + <string name="hand_camera_skip">Пропускане</string> + <string name="hand_camera_done">Готово</string> + <string name="glasses_xreal_network_missing">Изчаква се USB Ethernet връзката на очилата. Този телефон може да не я предоставя на приложенията.</string> + <string name="glasses_xreal_connection_failed">Връзката с XREAL беше прекъсната или върна неподдържан отговор. Нов опит…</string> + <string name="glasses_xreal_experimental">Експериментална поддръжка на 1S. Използвайте режим Follow и изключете стабилизацията в менюто на очилата. Посоките на проследяване и режимите на показване все още трябва да се тестват на устройство.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Режим Cardboard</string> + <string name="cardboard_mode_hint">Изображения за лявото и дясното око за VR очила за телефон.</string> + <string name="cardboard_source">Картина</string> + <string name="cardboard_source_screen">Виртуален екран</string> + <string name="cardboard_source_sbs">3D един до друг</string> + <string name="cardboard_viewer">Очила</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Без леща</string> + <string name="cardboard_ipd">Разстояние между очите</string> + <string name="cardboard_screen_width">Ширина на екрана</string> + <string name="cardboard_screen_distance">Разстояние до екрана</string> + <string name="cardboard_head_tracking">Проследяване на главата</string> + <string name="cardboard_no_sensor">Това устройство няма сензор за въртене.</string> + <string name="cardboard_recenter">Центриране на изгледа</string> + <string name="cardboard_recenter_button">Центриране</string> + <string name="cardboard_steamvr">SteamVR (експериментално)</string> + <string name="cardboard_steamvr_install">Инсталиране</string> + <string name="cardboard_steamvr_installing">Изтегляне и разархивиране на SteamVR…</string> + <string name="cardboard_steamvr_start">Стартиране</string> + <string name="cardboard_steamvr_stop">Спиране</string> + <string name="cardboard_steamvr_unavailable">Не е налично в тази сесия.</string> + <string name="cardboard_steamvr_failed">SteamVR не отговори; проверете лога на сесията.</string> + <string name="drawer_component_downloads">Изтегляне на компоненти</string> + <string name="drawer_component_downloads_hint">Изтеглянията са общи със страницата Компоненти. Изберете по-горе изтеглена версия, за да се използва при следващото стартиране на играта.</string> + <string name="drawer_component_choose_download">Изберете версия за изтегляне</string> + <string name="stores_fact_developer">Разработчик</string> + <string name="stores_fact_publisher">Издател</string> + <string name="stores_fact_released">Издадена</string> + <string name="stores_hltb_main">Основна</string> + <string name="stores_hltb_extras">+ Допълнително</string> + <string name="stores_hltb_completionist">Пълно</string> + <string name="stores_hltb_hours">%1$s ч</string> + <string name="stores_hltb_minutes">%1$d мин</string> + <string name="display_picture_position">Позиция на картината</string> + <string name="display_position_top">Горе</string> + <string name="display_position_bottom">Долу</string> + <string name="display_position_center">В средата (по подразбиране)</string> + <string name="setup_tab_storage">Съхранение</string> + <string name="storage_measuring">Измерване на съхранението…</string> + <string name="storage_measuring_hint">Първият път отнема няколко секунди.</string> + <string name="storage_internal">Вътрешно съхранение</string> + <string name="storage_used_of">използвани %1$s от %2$s</string> + <string name="storage_free">свободни %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck използва %1$s. Измерено на %2$s.</string> + <string name="storage_rescanning">измерване отново…</string> + <string name="storage_other_apps">Други приложения за Android</string> + <string name="storage_safe_now">Може да се освободи сега</string> + <string name="storage_safe_hint">Неизползвани среди, остатъци, стари логове</string> + <string name="storage_clean_up">Почистване…</string> + <string name="storage_session_running">Спри сесията, за да почистиш или изтриеш нещо. Размерите остават видими.</string> + <string name="storage_where">Къде отива</string> + <string name="storage_games">Игри от Steam</string> + <string name="storage_game_data">Данни на игрите</string> + <string name="storage_game_data_hint">Префикси %1$s · workshop %2$s · шейдъри %3$s</string> + <string name="storage_tools">Proton и среди</string> + <string name="storage_tools_unused">%1$s неизползвани</string> + <string name="storage_stores">GOG, Epic и други магазини</string> + <string name="storage_stores_hint">Премахни ги от Магазини</string> + <string name="storage_desktop">Приложения за работен плот</string> + <string name="storage_desktop_hint">Приложения Flatpak и среди</string> + <string name="storage_system">Система Linux и Steam клиент</string> + <string name="storage_system_hint">Нужни, за да работи каквото и да е</string> + <string name="storage_app_data">Данни на DroidDeck</string> + <string name="storage_app_data_hint">Логове от стари сесии %1$s · кеш · драйвери</string> + <string name="storage_legend_games">Игри</string> + <string name="storage_legend_data">Данни на игрите</string> + <string name="storage_legend_tools">Proton и среди</string> + <string name="storage_legend_stores">Други магазини</string> + <string name="storage_legend_desktop">Приложения за работен плот</string> + <string name="storage_legend_system">Система Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Почистване</string> + <string name="storage_clean_up_lede">Нищо тук не засяга инсталирани игри или текущи изтегляния.</string> + <string name="storage_nothing_to_clean">В момента няма какво да се почисти.</string> + <string name="storage_selected">Избрано: %1$s · %2$s → %3$s ще се освободят</string> + <string name="storage_cleaning">Почистване…</string> + <string name="storage_free_button">Освободи %1$s</string> + <string name="storage_freed">Освободени %1$s.</string> + <string name="storage_item_runtimes">Неизползвани среди на Steam и Proton</string> + <string name="storage_item_leftovers">Остатъци от изтрити игри</string> + <string name="storage_item_leftovers_unsure">Остатъци, които може да съдържат записи</string> + <string name="storage_item_logs">Логове от стари сесии</string> + <string name="storage_item_logs_detail">Логовете на текущата сесия остават</string> + <string name="storage_item_custom_detail">Никоя игра не го използва. Инсталирай го отново от Компоненти, ако ти потрябва.</string> + <string name="storage_item_shaders">Кеш на шейдърите за инсталираните игри</string> + <string name="storage_item_shaders_detail">Изгражда се отново по време на игра. Първите минути на всяка игра отново ще накъсват.</string> + <string name="storage_tag_safe">Безопасно</string> + <string name="storage_tag_unused">Неизползвано</string> + <string name="storage_tag_stutter">Накъсване</string> + <string name="storage_tag_saves">Провери записите</string> + <string name="storage_tag_default">По подразбиране</string> + <string name="storage_tag_required">Нужно</string> + <string name="storage_tag_not_used">Неизползвано</string> + <string name="storage_back">Съхранение</string> + <string name="storage_games_with_data">%1$s с данните им</string> + <string name="storage_sort_largest">Най-големи</string> + <string name="storage_sort_least_played">Най-малко играна</string> + <string name="storage_sort_sd">На SD карта</string> + <string name="storage_no_games">Тук няма игри.</string> + <string name="storage_played">играна %1$s</string> + <string name="storage_never_played">Никога не е играна</string> + <string name="storage_game_parts">Игра %1$s · данни %2$s</string> + <string name="storage_uninstall">Деинсталиране</string> + <string name="storage_games_note">Деинсталирането отваря прозореца на Steam, за да го отчете Steam. За да преместиш игра на SD картата, използвай Steam › Настройки › Съхранение.</string> + <string name="storage_uninstall_title">Деинсталиране на %1$s?</string> + <string name="storage_uninstall_body">Steam се отваря и иска потвърждение. Това освобождава %1$s на играта. Префиксът остава, докато не почистиш остатъците, а записите в Steam Cloud остават в профила ти.</string> + <string name="storage_open_steam">Отвори Steam</string> + <string name="storage_tools_detail">%1$s · %2$s неизползвани</string> + <string name="storage_remove_unused">Премахни неизползваните · %1$s</string> + <string name="storage_in_use">Използва се</string> + <string name="storage_not_used">Неизползвано</string> + <string name="storage_remove">Премахни</string> + <string name="storage_remove_title">Премахване на %1$s?</string> + <string name="storage_remove_body">Освобождава %1$s. Steam ще го изтегли отново, ако игра го поиска.</string> + <string name="storage_tool_fex_runtime">Нужна за игри за Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Нужна за Proton за ARM64</string> + <string name="storage_tool_redist">Инсталации на VC++ и DirectX, нужни на игрите</string> + <string name="storage_tool_fex">Стартира игри за Linux x86</string> + <string name="storage_tool_steam">Инструмент на Steam</string> + <string name="storage_tool_old_runtime">DroidDeck стартира игри без тази среда</string> + <string name="storage_tool_x86_proton">Proton x86, който DroidDeck не може да стартира</string> + <string name="storage_tool_custom_default">По подразбиране за всички игри</string> + <string name="storage_tool_custom_unused">Никоя игра не го използва</string> + <string name="storage_tool_custom_unknown">Настройките на Steam не могат да се прочетат, затова се запазва</string> + <string name="storage_cleanup_busy">Изчакай почистването на съхранението да завърши</string> + <string name="storage_low_title">Свободни са само %1$s</string> + <string name="storage_low_body">Steam се нуждае от място за актуализации и кеш на шейдърите. Под 10 GB актуализациите на игрите може да се провалят по средата.</string> + <string name="storage_low_safe">%1$s могат да се освободят безопасно.</string> + <string name="storage_free_up">Освободи място</string> + <string name="storage_play_anyway">Играй въпреки това</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d инсталирана</item> + <item quantity="other">%d инсталирани</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d на SD карта</item> + <item quantity="other">%d на SD карта</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d инструмент</item> + <item quantity="other">%d инструмента</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Празни папки за префикс и кеш на шейдърите от %d игра</item> + <item quantity="other">Празни папки за префикс и кеш на шейдърите от %d игри</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Префиксът на %d игра още съдържа файлове, включително локални записи. Първо направи копие, ако ти трябват.</item> + <item quantity="other">Префиксите на %d игри още съдържат файлове, включително локални записи. Първо направи копие, ако ти трябват.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d игра</item> + <item quantity="other">%d игри</item> + </plurals> + <string name="storage_tool_default_proton">Proton по подразбиране на DroidDeck</string> + <string name="storage_tool_proton">Опция Proton 11 на DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Използва се от %d игра</item> + <item quantity="other">Използва се от %d игри</item> + </plurals> + <string name="storage_legend_components">Компоненти</string> + <string name="storage_components">Компоненти</string> + <string name="storage_item_components">Неизползвани компоненти</string> + <string name="storage_component_original">Оригинал %1$s · %2$s</string> + <string name="storage_original_confirm">Освобождава %1$s. Връща само версия на Proton, която вече не е инсталирана.</string> + <string name="storage_leftovers_unchecked">Непроверено: манифестът на приложение на Steam не може да се прочете, затова префиксите на изтритите игри остават, докато това стане възможно.</string> + <string name="storage_failed">Неуспешно: %1$s</string> + <string name="storage_desktop_shared">%1$s споделени</string> + <string name="storage_data_installed">Инсталирани игри</string> + <string name="storage_data_parts">Префикс %1$s · шейдъри %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Изчисти шейдърите</string> + <string name="storage_data_leftovers">Изтрити игри</string> + <string name="storage_steam_app">Приложение Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Префиксът още съдържа файлове, може би локални записи</string> + <string name="storage_leftover_confirm">Изчиства Wine префикса и кеша на шейдърите (%1$s). Първо направи копие на записите, които ти трябват; записите в Steam Cloud остават в профила ти.</string> + <string name="storage_data_other">Запазени</string> + <string name="storage_data_other_title">Игри извън Steam и споделен Steam префикс</string> + <string name="storage_data_other_detail">Префикси на игри, добавени през магазини или ръчно</string> + <string name="storage_components_packages">Изтеглени пакети</string> + <string name="storage_components_originals">Запазени оригинали</string> + <string name="storage_components_none">Няма изтеглени пакети с компоненти.</string> + <string name="storage_component_in_use">Избран за Proton или игра</string> + <string name="storage_component_unused">Не е избран никъде</string> + <string name="storage_original_kept">Връща инсталирания Proton</string> + <string name="storage_original_old">Версия на Proton, която вече не е инсталирана</string> + <string name="storage_tag_in_use">Използва се</string> + <string name="storage_components_note">Използваните компоненти остават заключени. Избирай ги от Компоненти; това, което премахнеш тук, може да се изтегли оттам отново.</string> + <string name="storage_component_confirm">Освобождава %1$s. Пакетите, които сам си внесъл, не могат да се изтеглят отново.</string> + <string name="storage_desktop_detail">%1$s за приложения Flatpak и каквото споделят</string> + <string name="storage_desktop_apps_title">Приложения</string> + <string name="storage_desktop_none">Няма инсталирани приложения Flatpak.</string> + <string name="storage_desktop_shared_title">Споделени от приложенията</string> + <string name="storage_desktop_runtimes">Среди</string> + <string name="storage_desktop_runtimes_detail">Библиотеките, на които работят приложенията; неизползваните се махат с Премахни неизползваните</string> + <string name="storage_desktop_cache">Хранилище за изтегляния</string> + <string name="storage_desktop_cache_detail">Обектно хранилище и изтеглен кеш на Flatpak</string> + <string name="storage_desktop_prune">Премахни неизползваните</string> + <string name="storage_desktop_prune_body">Премахва среди, които никое инсталирано приложение не използва, и почиства обектното хранилище на Flatpak. Инсталираните приложения продължават да работят.</string> + <string name="storage_flatpak_uninstall_body">Премахва приложението (%1$s) и средите, които никой друг не използва. Данните в домашната ти папка остават.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d пакет</item> + <item quantity="other">%d пакета</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d приложение</item> + <item quantity="other">%d приложения</item> + </plurals> + <string name="boot_movie">Начално видео</string> + <string name="boot_movie_video">Видео</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d кадъра/с</string> + <string name="boot_movie_note">60 кадъра/с изглежда по-гладко, но натоварва повече процесора, докато Steam се стартира. Начално видео, избрано в настройките на Steam, има предимство.</string> + <string name="boot_movie_sound">Звук</string> + <string name="boot_movie_custom">Собствено видео</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV или WebM. Други формати и файлове над %1$d MB се конвертират на устройството до WebM 720p, до %2$d секунди.</string> + <string name="boot_movie_import">Импортиране</string> + <string name="boot_movie_remove">Премахване</string> + <string name="boot_movie_pick">Изберете начално видео</string> + <string name="boot_movie_imported">%1$s вече е началното видео</string> + <string name="boot_movie_imported_silent">%1$s вече е началното видео, без звук</string> + <string name="boot_movie_too_long">Видеата за конвертиране трябва да са до %1$d секунди</string> + <string name="boot_movie_converting">Конвертиране %1$d%%</string> + <string name="boot_movie_converting_started">%1$s се конвертира за Steam. Не затваряйте DroidDeck.</string> + <string name="boot_movie_unsupported">Устройството не може да декодира това видео.</string> + <string name="boot_movie_import_failed">Видеото не можа да бъде импортирано</string> + <string name="glasses_experimental">Luma Ultra камери — Експериментално</string> + <string name="glasses_joycons">Проследяване на позицията на Joy-Con</string> + <string name="glasses_joycons_hint">Използвайте камерите на интелигентните очила, за да позиционирате сдвоените си контролери Joy-Con. Въртенето и натискането на бутоните идват от контролерите Joy-Con. Позицията се оценява, когато китките ви са скрити. Заменя контролерите, управлявани с голи ръце, и поставя на пауза проследяването с камерата на телефона. Насочете контролерите Joy-Con напред, когато свързвате или нулирате центъра за проследяване.</string> + <string name="glasses_joycons_requires_position">Първо активирайте проследяването на позицията. Изисква Joy-Con контролери с възможност за движение на Android 12 или по-нова версия. Изключено по подразбиране.</string> + <string name="setup_tab_glasses">Интелигентни очила</string> + <string name="setup_glasses_scope">Настройките за дисплей и проследяване на главата се споделят в менютата, игрите и настолните сесии на DroidDeck.</string> + <string name="setup_glasses_connect">Свържете интелигентните очила, за да промените настройките им за дисплей и проследяване. Запазените ви настройки се запазват, когато изключите връзката.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Режим на показване</string> + <string name="glasses_output_2d">2D изход</string> + <string name="glasses_output_3d">3D изход</string> + <string name="glasses_picture_group">Картина и виртуален екран</string> + <string name="glasses_position_group">Позиция и ниво на пода</string> + <string name="glasses_hands_group">Проследяване на ръцете — Експериментално</string> + <string name="glasses_tracking_status">Състояние на проследяване</string> + <string name="glasses_resolution_2d">2D резолюция</string> + <string name="glasses_resolution_3d">3D резолюция</string> + <string name="glasses_resolution_vr">VR резолюция</string> + <string name="glasses_resolution_auto">Автоматично</string> + <string name="glasses_resolution_inherit">Същото като 2D / 3D</string> + <string name="glasses_resolution_hint">Изходна резолюция за всяко око.</string> + <string name="glasses_refresh_30_hint">Активирайте „Игра на смарт очила“, за да изберете оригиналния 30 Hz режим на дисплея.</string> + <string name="glasses_3dof">Виртуален екран с 3DoF</string> + <string name="glasses_3dof_hint">Закрепете плоските игри пред себе си, за да можете да се оглеждате. Активира „Игра на смарт очила“, без да превключвате на 3D.</string> + <string name="glasses_screen_app_wide">Ширината и разстоянието актуализират незабавно проследения виртуален екран за менюта, игри и десктоп сесии на DroidDeck.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Позиционното проследяване включва въртене на главата в SteamVR. За проследяване само с въртене, изключете позиционното проследяване.</string> + <string name="glasses_head_tracking_spatial_hint">Контролира движението на главата на виртуалния екран. Позиционното проследяване включва въртене на главата в SteamVR.</string> + <string name="glasses_quick_actions">Бързи действия</string> + <string name="glasses_recenter_screen_hint">Погледнете къде искате екранът, след което нулирайте центъра за проследяване, за да зададете неговата височина и посока.</string> + <string name="glasses_recenter_joycons_button">Центриране на Joy-Con</string> + <string name="phone_camera_tracking_group">Камера на телефона — Експериментално</string> + <string name="phone_camera_tracking_setting">Проследяване на ръце или контролери Joy-Con</string> + <string name="glasses_6dof">Виртуален екран с 6DoF</string> + <string name="glasses_position">Проследяване на позицията — експериментално</string> + <string name="glasses_position_hint">Физическо движение във VR и около виртуални екрани. Рестартирането на проследяването отнема малко време.</string> + <string name="glasses_eye_height">Текуща височина на очите над пода</string> + <string name="glasses_floor">Задаване на нивото на пода от текущата височина</string> + <string name="glasses_floor_set">Задаване на нивото на пода</string> + <string name="glasses_spatial_setup">Настройка и диагностика на стерео камерата</string> + <string name="glasses_spatial_setup_hint">Проверете калибрирането на камерата и проследяването на ръцете преди игра.</string> + <string name="glasses_spatial_open">Отваряне на настройката</string> + <string name="glasses_hands">Контролери, управлявани с голи ръце</string> + <string name="glasses_hands_hint">Използвайте камерите на интелигентните очила, за да се прицелвате с ръце, щипнете, за да щракнете, и затворете ръката си, за да хванете във VR. Геймпадовете се движат и завъртат. Заменя проследяването на позицията на Joy-Con. Може да забави или да загуби проследяване по време на игри.</string> + <string name="glasses_hands_ready_hint">Активирайте контролери, управлявани с голи ръце под камерите на Luma Ultra в Проследяване. Първо покажете отворени ръце.</string> + <string name="glasses_hands_base">Споделено калибриране на Luma Ultra</string> + <string name="glasses_hands_base_hint">Използване на споделената основа Luma Ultra. Калибрирайте собствените си интелигентни очила, за да проверите тяхната точност.</string> + <string name="glasses_hands_calibration_verified">Измереното калибриране е потвърдено</string> + <string name="glasses_hands_calibration_required">Изисква се валидиране</string> + <string name="glasses_hands_calibration_required_hint">Контролери, управлявани с голи ръце, стават достъпни след преминаване на проверката на измереното разстояние.</string> + <string name="tracking_recovery_lost">Загуба на проследяване</string> + <string name="tracking_recovery_look">Огледайте се бавно в добре осветена стая.\nДръжте камерите за проследяване чисти и ги насочвайте към мебели или други видими детайли.</string> + <string name="tracking_recovery_restart_help">Все още сте заседнали? На вашия телефон: смарт очила → Проследяване → Отворете настройката → Показване на диагностика → Рестартиране на проследяването.</string> + <string name="tracking_recovery_disconnected">Интелигентните очила са прекъснати</string> + <string name="tracking_recovery_connect">Проверете USB връзката и свържете отново смарт очилата.\nПриемете подканата за USB достъп на телефона си, ако се появи.</string> + <string name="tracking_recovery_usb_help">След като се свържете, огледайте се бавно в добре осветена стая, за да възстановите проследяването.</string> + <string name="tracking_recovery_recenter">Необходимо е повторно центриране</string> + <string name="tracking_recovery_recenter_steps">Проследяването се е върнало в нова позиция.\nПогледнете напред, след което докоснете „Нулиране на центъра за проследяване“ на телефона си.</string> + <string name="tracking_recovery_recenter_help">Можете също да намерите „Нулиране на центъра за проследяване“ в „Смарт очила“ → „Проследяване“ → „Отваряне на настройката“. Запазената ви калибрация на камерата се запазва.</string> + <string name="tracking_recovery_stabilizing">Задръжте неподвижно за момент</string> + <string name="tracking_recovery_hold">В процес е нулиране на центъра за проследяване.\nДръжте смарт очилата стабилно, докато проследяването се стабилизира.</string> + <string name="tracking_recovery_automatic">Този екран се затваря автоматично, когато проследяването на главата е готово.</string> + <string name="glasses_steady_hand_aim">Стабилизирано прицелване с ръце</string> + <string name="glasses_steady_hand_aim_hint">Прицелете се от рамото през дланта. Изключете за въртене, контролирано от китката.</string> + <string name="spatial_title">Пространствена настройка</string> + <string name="spatial_wait_tracking">Изчаква се проследяване...</string> + <string name="spatial_cameras_description">Лява и дясна камери за проследяване</string> + <string name="spatial_camera_sync">Синхронизация на камерата</string> + <string name="spatial_ready">Готово</string> + <string name="spatial_sync_hint">Изчакване камерата и проследяването на главата да се подредят. Поддържайте смарт очилата свързани.</string> + <string name="spatial_prepare">1. Подгответе мишената за калибриране</string> + <string name="spatial_print_actual">Отпечатайте в действителен размер</string> + <string name="spatial_print_hint">Всеки квадрат трябва да е с размери 30 mm (1,181 in). Монтирайте листа плоско върху твърда повърхност в добре осветено място.</string> + <string name="spatial_print">Отпечатване на калибрационната мишена</string> + <string name="spatial_capture_group">2. Уловете различни изгледи</string> + <string name="spatial_board_stationary">Дръжте мишената за калибриране неподвижна</string> + <string name="spatial_capture_hint">Преместете интелигентните очила по-близо, по-далеч и настрани. Завъртете ги наляво/надясно, наклонете ги нагоре/надолу и ги наклонете настрани. Задръжте целта за калибриране в двете камери и правете пауза за кратко преди всяко заснемане.</string> + <string name="spatial_start">Стартиране на ново калибриране</string> + <string name="spatial_wait_sync">Изчакване за синхронизиране на камерата.</string> + <string name="spatial_start_hint">Стартирайте ново калибриране за събиране на изгледи.</string> + <string name="spatial_views_hint">Поддържайте целта за калибриране видима и в двата прегледа. Уловете най-малко 24 ясни гледки от различни ъгли.</string> + <string name="spatial_capturing">Заснема се...</string> + <string name="spatial_capture">Заснемане на целевия изглед за калибриране</string> + <string name="spatial_alignment">Изчислете подравняването на камерата</string> + <string name="spatial_calculating">Изчислява се...</string> + <string name="spatial_calculate">Изчисляване на калибриране</string> + <string name="spatial_distance_group">3. Проверете разстоянието</string> + <string name="spatial_distance">Измерено разстояние</string> + <string name="spatial_distance_hint">Започнете с 12 инча или 30 см, така че отпечатаните маркери да се откриват по-лесно. Изберете точното измерване, което ще използвате.</string> + <string name="spatial_camera_board_distance">Лява камера към центъра на целта за калибриране</string> + <string name="spatial_checking_distance">Проверка на разстоянието...</string> + <string name="spatial_validate">Проверка на разстоянието</string> + <string name="spatial_diagnostics">Диагностика</string> + <string name="spatial_show_diagnostics">Показване на диагностика</string> + <string name="spatial_diagnostics_hint">Инструменти за възстановяване на времето и проследяването на камерата.</string> + <string name="spatial_camera_timing">Време на камерата</string> + <string name="spatial_hand_input">Входящи данни от проследяване на ръце</string> + <string name="spatial_wait_timing">Изчакване на времето на камерата.</string> + <string name="spatial_frames">Изображения от камера</string> + <string name="spatial_gpu">GPU разпознаване на ръце</string> + <string name="spatial_gpu_hint">По подразбиране се използва CPU. GPU е експериментален и може да предизвика рестартиране на SteamVR. Изборът се нулира при рестартиране на проследяването.</string> + <string name="spatial_lite">Леко откриване на модели на ръце</string> + <string name="spatial_lite_hint">Използвайте Lite детектор за длан и Lite ключови точки на ръцете. Проверете точността на прицелване, прищипване и хващане. Нулира се при рестартиране на проследяването.</string> + <string name="spatial_adaptive">Автоматична входна честота за проследяване на ръцете</string> + <string name="spatial_adaptive_hint">Коригиране на входа към скоростта на обработка. Нулира се при рестартиране на проследяването.</string> + <string name="spatial_half_rate">Ограничаване на входната честота за проследяване на ръцете</string> + <string name="spatial_half_rate_hint">Използвайте половината изображения от камерата. Изключете, за да сравните максималната честота. Нулира се при рестартиране на проследяването.</string> + <string name="spatial_diagnostic_capture">Диагностично улавяне</string> + <string name="spatial_diagnostic_capture_hint">Запазете една двойка стерео изображения локално. Изображенията се запазват само при поискване.</string> + <string name="spatial_save_frame">Запазване на изображението от камерата</string> + <string name="spatial_restart_tracking">Рестартиране на проследяването</string> + <string name="spatial_restart_hint">Използвайте, ако проследяването не се възстанови в добре осветена зона. Рестартирането изисква нов произход за проследяване.</string> + <string name="spatial_restart">Рестартиране</string> + <string name="spatial_restart_title">Рестартиране на проследяването?</string> + <string name="spatial_restart_confirm">Незапазените изгледи за калибриране ще бъдат загубени. Дръжте смарт очилата неподвижно след това и нулирайте центъра за проследяване, когато проследяването се възстанови.</string> + <string name="spatial_views_count">%1$d / 24 заснети изгледа</string> + <string name="spatial_capture_paused">Заснемането е на пауза: %1$s</string> + <string name="spatial_measure_hint">Мярка %1$s. Покажете пълната цел за калибриране и в двете визуализации, след което задръжте неподвижно.</string> + <string name="spatial_timing_values">%1$.1f Hz • възраст на изображението %2$.1f ms • обработка %3$.1f ms</string> + <string name="spatial_input_values">Входящо ограничение %1$.1f Hz • %2$.0f%% на изображения от камерата. Проследяването на главата продължава на максималната си честота.</string> + <string name="spatial_frame_counts">%1$d обработено • %2$d изпуснато • %3$d пропуснато от въведено ограничение</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck – калибриране на Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Печат при 100%/действителен размер. Всеки квадрат: 30 мм (1,181 инча).</string> + <string name="spatial_print_stationary">Дръжте мишената за калибриране плоска и неподвижна; преместете интелигентните очила между заснеманията.</string> + <string name="spatial_print_check">Проверка на мащаба: 100 mm (3,937 инча) между отметките</string> + <string name="spatial_distance_12in">12 инча (30,48 см)</string> + <string name="spatial_distance_30cm">30 см (11,81 инча)</string> + <string name="spatial_distance_20in">20 инча (50,8 см)</string> + <string name="spatial_distance_50cm">50 см (19,69 инча)</string> + <string name="spatial_disabled">Дезактивирано</string> + <string name="spatial_wait_stable">Изчакване на стабилно проследяване</string> + <string name="spatial_disconnected">Прекъсната връзка</string> + <string name="spatial_hands_off">Контролерите, работещи с голи ръце, са изключени</string> + <string name="spatial_tracking_off">Позиционното проследяване е изключено или смарт очилата са изключени</string> + <string name="spatial_recenter_pending">Заявено е нулиране на центъра за проследяване — задръжте неподвижно, докато проследяването се стабилизира.</string> + <string name="spatial_tracking_lost">Проследяването е загубено — лице в добре осветена зона с видими детайли</string> + <string name="spatial_origin_changed">Произходът на проследяване е променен — докоснете „Нулиране на центъра за проследяване“, след което задръжте неподвижно.</string> + <string name="spatial_active">6DoF активен</string> + <string name="spatial_connect_hint">Свържете Luma Ultra и активирайте позиционното проследяване.</string> + <string name="spatial_validation_session">Калибрирането е потвърдено за тази връзка.</string> + <string name="spatial_validation_saved">Калибрирането е потвърдено и запазено.</string> + <string name="spatial_wait_cameras">Изчакване на стерео камери</string> + <string name="spatial_wait_hands">Изчакване за проследяване на ръцете</string> + <string name="spatial_collect_instructions">Дръжте мишената за калибриране 5 × 7 неподвижна. Уловете 24+ изгледа, докато местите и въртите смарт очилата.</string> + <string name="spatial_capture_pending">Изчакване на следващото изображение от камерата. Дръжте умните очила неподвижно.</string> + <string name="spatial_validation_pending">Проверка на следващото изображение от камерата. Дръжте целта за пълно калибриране видима и задръжте неподвижно.</string> + <string name="spatial_start_first">Първо започнете калибриране</string> + <string name="spatial_no_camera_frame">Не е пристигнало ново изображение от камерата. Проверете връзката на интелигентните очила и прегледите на камерата, след което опитайте отново.</string> + <string name="spatial_clock_reset">Нулиране на часовника на фотоапарата</string> + <string name="spatial_frame_changed">Координатната система за проследяване е променена. Вашите изгледи са запазени за преизчисляване. Нулирайте центъра за проследяване, след което започнете нов набор, за да заснемете още изгледи.</string> + <string name="spatial_device_loaded">калибрирането на устройството е заредено</string> + <string name="spatial_base_loaded">Заредено е базовото калибриране на Luma Ultra</string> + <string name="spatial_calibration_needed">изисква се калибриране</string> + <string name="spatial_tap_start">Докоснете Първо стартиране на ново калибриране.</string> + <string name="spatial_capture_recenter_pending">„Нулиране на центъра за проследяване“ чака стабилно проследяване. Задръжте неподвижно за момент.</string> + <string name="spatial_capture_recenter">Проследяването е променено. Докоснете „Нулиране на центъра за проследяване“ веднъж, след което задръжте неподвижно, преди да заснемете.</string> + <string name="spatial_capture_unsynchronized">Заснемането е отхвърлено: проследяването на главата не беше синхронизирано или се промени по време на заснемането. Стойте неподвижно и опитайте отново.</string> + <string name="spatial_align_first">Изчислете подравняването на камерата, преди да проверите разстоянието.</string> + <string name="spatial_processing_failed">обработката на камерата е неуспешна</string> + <string name="spatial_hand_head_changed">Проследяването на главата е променено по време на откриване на ръце</string> + <string name="spatial_hand_wait_sync">Изчакване за синхронизиране на камерата и главата</string> + <string name="spatial_no_wrists">Не са открити китки. Дръжте дръжките на вашия контролер Joy-Con пред смарт очилата</string> + <string name="spatial_no_hands">Няма открити ръце. Покажете разтворени длани пред умните очила</string> + <string name="spatial_one_camera_wrists">Китките се виждат само в една камера; дръжте дръжките на контролера си в споделения изглед</string> + <string name="spatial_one_camera_hands">Ръцете се виждат само в една камера; дръжте двете длани в споделения изглед</string> + <string name="spatial_ambiguous_hands">И двете камери виждат ръце, но съвпадението ляво/дясно е двусмислено</string> + <string name="spatial_inconsistent_depth">Ръцете са открити, но стерео дълбочината е непостоянна</string> + <string name="spatial_rejected_wrist">Позиция на китката, отхвърлена от проверки за стерео или движение</string> + <string name="spatial_inconsistent_palm">Открити са стерео точки, но геометрията на дланта е несъвместима</string> + <string name="spatial_hands_need_calibration">Завършете калибрирането и проверката на разстоянието, за да активирате ръцете</string> + <string name="spatial_hands_wait_stable">Изчакване на стабилно проследяване на главата; нулиране на центъра за проследяване, ако е поискано.</string> + <string name="spatial_old_frame">Наблюдението на камерата е твърде старо; в очакване на нов чифт</string> + <string name="spatial_fit_ready">Побиране на %1$.2f пиксела. Измерете избраното разстояние от лявата камера до центъра на целта за калибриране, след което потвърдете.</string> + <string name="spatial_opencv_error">OpenCV не е наличен: %1$s</string> + <string name="spatial_restored">%1$d запазените изгледи са възстановени. Изчислете калибрирането, за да опитате отново, или започнете нов набор, за да заснемете повече.</string> + <string name="spatial_captured">Заснето %1$d / 24 прегледа. Дръжте целта за калибриране фиксирана; преместете смарт очилата за следващия изглед.</string> + <string name="spatial_capture_corners">Заснемането е отхвърлено: %1$d / 12 задължителни ъгъла, видими и в двете камери. Покажете още от целта за калибриране, задръжте неподвижно и опитайте отново.</string> + <string name="spatial_validation_error">Проверката на разстоянието не можа да завърши: %1$s. Опитайте отново.</string> + <string name="spatial_inference_error">Откриване на недостъпни ръце: %1$s. Променете CPU/GPU или превключете контролерите, управлявани с голи ръце, за да опитате отново.</string> + <string name="spatial_hand_timeout">Откриването на ръце е превишено %1$d ms; наблюдението е отхвърлено</string> + <string name="spatial_wrists_tracked">%1$d / 2 позиции на китката на Joy-Con, измерени чрез стерео</string> + <string name="spatial_palms_tracked">Проследени длани: %1$d / 2; готовност за щипване: %2$d; готовност за хващане: %3$d</string> + <string name="spatial_capture_saved">Записан диагностичен запис в %1$s</string> + <string name="spatial_hand_error">Проследяването на ръцете е спряно: %1$s</string> + <string name="spatial_stereo_loaded">Стерео %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Проследяването на главата и целта за калибриране не съвпадат с %1$s (ограничение 5 см / 2 инча). Дръжте целта за калибриране фиксирана и изчакайте стабилно проследяване, преди да започнете нов набор. Внимателно завъртете и наклонете умните очила; пауза преди всяко заснемане.</string> + <string name="spatial_need_views">Заснемане на най-малко 24 разнообразни изгледа на неподвижната цел за калибриране.</string> + <string name="spatial_need_rotation">Завъртете умните очила наляво и надясно и ги наклонете нагоре и надолу; движение без завъртане не може да калибрира подравняването на камерата.</string> + <string name="spatial_bad_baseline">Неправдоподобна базова линия на камерата</string> + <string name="spatial_need_orientations">Преместете главата си в по-разнообразни ориентации.</string> + <string name="spatial_bad_rotation">Невалидно завъртане на камерата към главата</string> + <string name="spatial_bad_alignment">Подравняването на камерата към главата е непоследователно.</string> + <string name="spatial_calibration_error">Калибрирането не можа да завърши. %1$s Вашите заснети изгледи се запазват.</string> + <string name="spatial_reprojection_error">Грешка при повторна проекция на задържане %1$.2f px надвишава 2 px. Калибрирайте отново.</string> + <string name="spatial_distance_corners">%1$d / 24 ъгъла на шахматна дъска, открити и в двете камери. Дръжте целта за пълно калибриране видима и задръжте неподвижно. Ако вече се вижда, изберете 12 инча или 30 см и измерете това по-близко разстояние, преди да опитате отново.</string> + <string name="spatial_distance_depth">Целта за калибриране се вижда, но дълбочината й не може да бъде надеждно измерена. Дръжте умните очила неподвижно и дръжте мишената за калибриране плоска и добре осветена, след което опитайте отново.</string> + <string name="spatial_distance_invalid">Измерването на камерата е невалидно. Задръжте неподвижно и опитайте отново.</string> + <string name="spatial_distance_passed">Проверката на разстоянието е премината.</string> + <string name="spatial_distance_retry">Проверете отново разстоянието от лявата камера до центъра на целта за калибриране, след което опитайте отново.</string> + <string name="spatial_distance_result">Измерени камери %1$s; избраното разстояние %2$s. %3$s</string> + <string name="spatial_wait_previews">Изчакайте визуализациите на двете камери, преди да започнете калибрирането.</string> + <string name="spatial_saved_views_hint">Запазените изгледи могат да бъдат преизчислени. Започнете ново калибриране за заснемане в текущата координатна система за проследяване.</string> + <string name="spatial_model_checksum_error">Несъответствие на контролната сума на модела на ръката</string> + <string name="spatial_opencv_load_error">OpenCV не можа да се зареди</string> +</resources> diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml new file mode 100644 index 0000000000..feb7fdf84a --- /dev/null +++ b/app/src/main/res/values-cs/strings.xml @@ -0,0 +1,2955 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Grafika SteamVR přestala fungovat</string> + <string name="steamvr_recovery_countdown">DroidDeck se za %1$d s restartuje, aby resetoval grafiku a znovu otevřel SteamVR. Spuštěná hra se zavře; neuložený postup nelze obnovit.</string> + <string name="steamvr_recovery_repeated">Chyba grafiky se po nedávném restartu vrátila. Automatická obnova je pozastavena, aby nevznikla smyčka. Restart zavře vaši hru; neuložený postup nelze obnovit.</string> + <string name="steamvr_recovery_restart">Restartovat nyní</string> + <string name="steamvr_recovery_cancel">Nechat otevřené</string> + <string name="steamvr_recovery_restarting">Resetování grafiky a opětovné otevírání SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck se nepodařilo automaticky restartovat. Aplikaci úplně zavřete a pak ji znovu otevřete.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>První spuštění stáhne Steam. Může to trvat několik minut.</item> + <item>Ve výchozím nastavení se po opuštění aplikace Steam pozastaví; po návratu pokračuje, kde skončil.</item> + <item>Váš ovladač se zobrazí jako ovladač Xbox 360. Jinak použijte ovládání na obrazovce.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>První spuštění připraví Plochu. Může to trvat několik minut.</item> + <item>Ve výchozím nastavení se po opuštění aplikace relace pozastaví; po návratu pokračuje, kde skončila.</item> + <item>Dotyk funguje jako touchpad: tažením posouváte kurzor, dotykem klikáte.</item> + <item>Váš ovladač se zobrazí jako ovladač Xbox 360. Jinak použijte ovládání na obrazovce.</item> + </string-array> + <string name="session_channel">Relace</string> + <string name="session_channel_description">Zobrazuje se, když je otevřená relace Steamu nebo Plochy</string> + <string name="session_notification">Steam běží</string> + <string name="session_notification_downloads">Probíhá stahování Steamu</string> + <string name="session_notification_paused">Relace pozastavena – klepnutím na Obnovit pokračujte</string> + <string name="resume_session">Obnovit</string> + <string name="suspend_now">Pozastavit teď</string> + <string name="stop_session">Ukončit relaci</string> + <string name="frame_gen_title">Generování snímků</string> + <string name="frame_gen_hint">Vyberte režim generování snímků</string> + <string name="frame_gen_off">Vypnuto</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptive %1$d</string> + <string name="lsfg_needs_steam">Vyžaduje Lossless Scaling na Steamu</string> + <string name="lsfg_needs_install">Nainstalujte Lossless Scaling ve Steamu nebo naimportujte Lossless.dll</string> + <string name="lsfg_import">Importovat Lossless.dll…</string> + <string name="lsfg_using_steam">Používá se kopie ze Steamu</string> + <string name="lsfg_using_import">Používá se importovaná kopie</string> + <string name="lsfg_pick_title">Vyberte Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll byl importován</string> + <string name="lsfg_import_unchanged">Tento Lossless.dll se už používá</string> + <string name="lsfg_import_not_owned">Tento účet Steamu nevlastní Lossless Scaling</string> + <string name="lsfg_import_invalid">Tento soubor není Lossless.dll aplikace Lossless Scaling</string> + <string name="lsfg_import_failed">Z tohoto souboru Lossless.dll se nepodařilo připravit LSFG</string> + <string name="lsfg_problem_missing">LSFG vyžaduje Lossless Scaling ze Steamu nebo importovaný Lossless.dll</string> + <string name="lsfg_problem_failed">LSFG se nepodařilo připravit shadery z Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: nepodporováno</string> + <string name="hud_fg_failed">%1$s: chyba enginu</string> + <string name="hud_fg_needs_lossless">%1$s: vyžaduje Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · spouští se</string> + <string name="second_library_import_hint">Přidá knihovnu Steamu a prohledá ji na hry pro Windows. Vlastněné hry použijí své položky ze Steamu; ostatní se stanou zástupci mimo Steam.</string> + <string name="game_env_title">Prostředí hry</string> + <string name="game_env_hint">Proměnné prostředí pro hry na Protonu.</string> + <string name="game_env_edit">Upravit</string> + <string name="game_env_shared">Všechny hry na Protonu</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">ID aplikace Steam</string> + <string name="game_env_open">Otevřít</string> + <string name="game_env_profile">Hra %1$s</string> + <string name="game_env_add">Přidat proměnnou</string> + <string name="game_env_name">Název proměnné</string> + <string name="game_env_value">Hodnota</string> + <string name="game_env_save">Uložit</string> + <string name="game_env_remove">Odebrat</string> + <string name="game_env_restore">Znovu zdědit</string> + <string name="game_env_reset">Vymazat přepsání prostředí</string> + <string name="game_env_unset">Zrušit pro tento profil</string> + <string name="game_env_empty">Nejsou nastaveny žádné proměnné.</string> + <string name="game_env_inherited">Zděděno</string> + <string name="game_env_custom">Vlastní proměnná</string> + <string name="game_env_error">Nepodařilo se načíst ani uložit. Zkontrolujte volné úložiště a zkuste to znovu.</string> + <string name="game_env_invalid">Použijte platný název a hodnotu o délce až 8192 znaků.</string> + <string name="game_env_unused">Standardní běhové prostředí Protonu tuto proměnnou nečte.</string> + <string name="game_env_loading">Načítání…</string> + <string name="game_env_feature">Přepsání úrovně funkcí D3D12. 12_2 oznamuje schopnosti DirectX 12 Ultimate; nepodporované funkce mohou selhat. Nechte nenastavené pro automatickou detekci.</string> + <string name="game_env_shader">Přepsání shader modelu D3D12. 6_9 vyžaduje dostatečně novou verzi VKD3D a odpovídající funkce GPU. Nechte nenastavené pro automatickou detekci.</string> + <string name="game_env_cache">Ponechte zapnuté ukládání shaderů Mesa do mezipaměti, aby se omezilo opakované kompilování. false ukládání do mezipaměti zapíná.</string> + <string name="game_env_cache_size">Maximální velikost mezipaměti shaderů Mesa, například 1G. Větší mezipaměť zabírá více úložiště.</string> + <string name="game_env_vkd3d_config">Možnosti VKD3D pro D3D12. nodxr vypíná ray tracing; použijte jen pro hru, která to vyžaduje.</string> + <string name="game_env_proton_log">Nastavte na 1 pro diagnostický log Protonu. Protokolování může snížit výkon a zabírat úložiště.</string> + <string name="game_env_wined3d">Nastavte na 1 pro použití WineD3D založeného na OpenGL místo DXVK, pro testování kompatibility D3D9–11.</string> + <string name="game_env_no_ntsync">Nastavte na 1, aby tato hra nepoužívala ntsync (droiddeck-ntsync nebo ovladač jádra); použije droiddeck-esync, pokud existuje balíček, jinak droiddeck-fsync.</string> + <string name="game_env_no_esync">Nastavte na 1 pro vypnutí droiddeck-esync u této hry; místo něj použije droiddeck-fsync, nebo droiddeck-ntsync, pokud je vypnutý i fsync.</string> + <string name="game_env_no_fsync">Nastavte na 1, aby tato hra nepoužívala droiddeck-fsync; použije droiddeck-esync, pokud existuje balíček, jinak droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Nastavte na 1 pro spuštění této hry na droiddeck-fsync, nebo na 0, aby měl droiddeck-esync přednost, pokud balíček odpovídá jejímu Protonu.</string> + <string name="game_env_xalia">Nastavte na 0 pro vypnutí pomocníka Protonu pro navigaci gamepadem u této hry.</string> + <string name="game_env_hud">Překryvná vrstva DXVK pro D3D9–11. fps zobrazuje snímkovou frekvenci; bez nastavení se skryje.</string> + <string name="game_env_dxvk_config">Nastavení DXVK oddělená středníky. Novější verze používají pro omezení snímků dxvk.maxFrameRate; pro běžné hraní dejte přednost omezovači snímků relace.</string> + <string name="game_env_vkd3d_limit">Omezení snímkové frekvence D3D12. 0 omezení vypíná.</string> + <string name="game_env_glthread">Vícevláknové OpenGL Mesa. true může pomoci hrám OpenGL omezeným CPU; vyzkoušejte u každé hry zvlášť.</string> + <string name="sync_backend_title">Synchronizace Wine</string> + <string name="sync_backend_hint">Jak hry synchronizují svá vlákna. Použije se od příští relace.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Předvolba FEX</string> + <string name="fex_next_launch">Použije se při dalším spuštění hry.</string> + <string name="game_settings_title">Hry</string> + <string name="fex_default_label">Výchozí FEX</string> + <string name="fex_default_detail">Používá výchozí nastavení FEX.</string> + <string name="fex_stability_label">Stabilita</string> + <string name="fex_stability_detail">Nejbezpečnější, nejpomalejší nastavení.</string> + <string name="fex_compatibility_label">Kompatibilita</string> + <string name="fex_compatibility_detail">Plné TSO s multiblokem.</string> + <string name="fex_intermediate_label">Střední</string> + <string name="fex_intermediate_detail">Vyvážené TSO se sníženou přesností x87.</string> + <string name="fex_performance_label">Výkon</string> + <string name="fex_performance_detail">Veškeré TSO vypnuto; multiblok.</string> + <string name="fex_performance_tso_label">Výkon + TSO</string> + <string name="fex_performance_tso_detail">Nastavení výkonu se zapnutým hlavním TSO.</string> + <string name="fex_extreme_label">Extrémní</string> + <string name="fex_extreme_detail">Vypíná kontroly samo-modifikujícího se kódu. Hry s JIT a DRM mohou přestat fungovat.</string> + <string name="fex_extreme_tso_label">Extrémní + TSO</string> + <string name="fex_extreme_tso_detail">Extrémní nastavení se zapnutým hlavním TSO.</string> + <string name="fex_extreme_gn_label">Extrémní-gn</string> + <string name="fex_extreme_gn_detail">Výkon s nápovědami TSC a metadat. Zkuste před Extrémním.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Výkon s plnými kontrolami kódu a skrytým bitem hypervizoru.</string> + <string name="game_env_custom_value">Vlastní hodnota</string> + <string name="game_env_select_value">Vybrat hodnotu</string> + <string name="user_apps_section">Emulátory a aplikace</string> + <string name="user_apps_add">Přidat</string> + <string name="user_apps_add_detail">Vaše vlastní aplikace nebo hra</string> + <string name="user_apps_kind_script">Skript</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d %%</string> + <string name="user_apps_starting">Spouští se…</string> + <string name="user_apps_added">%1$s přidáno</string> + <string name="user_apps_removed">%1$s odebráno</string> + <string name="user_apps_back">Plocha</string> + <string name="user_apps_gone">Tato aplikace zmizela. Vyberte ji znovu z Plochy.</string> + <string name="user_apps_open">Otevřít %1$s</string> + <string name="user_apps_remove">Odebrat</string> + <string name="user_apps_remove_confirm">Pro odebrání stiskněte znovu</string> + <string name="user_apps_stop_session">Pro odebrání ukončete relaci</string> + <string name="user_apps_script_linked">Spouští %1$s ze své složky, propojené do relace tam, kde se nachází. Odebráním aplikace zůstane tato složka nedotčena.</string> + <string name="user_apps_script_copied">Spouští %1$s z kopie své složky uvnitř DroidDeck. Odebráním aplikace se smaže kopie, ne originál.</string> + <string name="user_apps_runtime_required">Nejprve nainstalujte běhové prostředí Linuxu</string> + <string name="user_apps_file_gone">Soubor zmizel</string> + <string name="user_apps_no_space">Nedostatek volného místa: zkopírování složky vyžaduje %1$s</string> + <string name="user_apps_copying">Kopíruje se %1$s</string> + <string name="user_apps_failed">Přidání aplikace se nezdařilo</string> + <string name="user_apps_github_checking">Hledá se vydání %1$s</string> + <string name="user_apps_github_unreachable">Nepodařilo se načíst vydání %1$s</string> + <string name="user_apps_github_no_appimage">Žádné vydání %1$s neobsahuje AppImage pro ARM64 ani x86_64</string> + <string name="user_apps_downloading">Stahuje se %1$s</string> + <string name="user_apps_download_failed">Stahování se nezdařilo</string> + <string name="user_apps_update_failed">Aktualizace aplikace se nezdařila</string> + <string name="user_apps_icon_failed">Tuto ikonu se nepodařilo načíst</string> + <string name="user_apps_saved">%1$s uloženo</string> + <string name="user_apps_edit">Upravit</string> + <string name="user_apps_check_updates">Zkontrolovat aktualizace</string> + <string name="user_apps_checking_updates">Kontrola aktualizací…</string> + <string name="user_apps_update_to">Aktualizovat na %1$s</string> + <string name="user_apps_up_to_date">Aktuální · %1$s</string> + <string name="user_apps_updated">%1$s aktualizováno</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Přidat aplikaci</string> + <string name="add_app_tab_script">Skript</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Soubor .sh. Spouští se ze své vlastní složky, na celou obrazovku pod gamescope.</string> + <string name="add_app_appimage_hint">AppImage pro ARM64 (aarch64), nebo pro x86_64, který běží přes FEX. Jednou se rozbalí do běhového prostředí Linuxu.</string> + <string name="add_app_github_hint">Nainstaluje AppImage pro ARM64 z nejnovějšího vydání repozitáře, nebo jeho verzi pro x86_64 přes FEX.</string> + <string name="app_fex_title">Použít FEX</string> + <string name="app_fex_auto">Automaticky</string> + <string name="app_fex_on">Zapnuto</string> + <string name="app_fex_off">Vypnuto</string> + <string name="app_fex_hint">FEX spouští programy pro x86 Linux na tomto zařízení ARM64. Automaticky ho použije, když je program sestaven pro x86.</string> + <string name="app_fex_x86">%1$s přes FEX</string> + <string name="app_fex_not_ready">Tento program je sestaven pro PC %1$s a běží přes FEX, který ještě není nastaven. Jednou spusťte přihlášený Steam: DroidDeck tím stáhne FEX a Steam Linux Runtime, který potřebuje, a pak se tento program otevře.</string> + <string name="session_end_program">Tento program</string> + <string name="session_end_fex_missing">%1$s je sestaven pro PC x86 a běží přes FEX, který ještě není nainstalován. Jednou spusťte přihlášený Steam a nechte ho stáhnout FEX a Steam Linux Runtime, pak to spusťte znovu.</string> + <string name="add_app_flatpak_hint">ID aplikace Flathub nebo její stránka na Flathub. Flatpak se nejprve nastaví, pokud ještě není.</string> + <string name="add_app_file">Soubor</string> + <string name="add_app_no_file">Nevybrán žádný soubor</string> + <string name="add_app_choose_file">Vybrat soubor</string> + <string name="add_app_change_file">Změnit</string> + <string name="add_app_pick_script">Vybrat skript</string> + <string name="add_app_pick_appimage">Vybrat AppImage</string> + <string name="add_app_pick_icon">Vybrat ikonu</string> + <string name="add_app_repository">Repozitář</string> + <string name="add_app_repository_placeholder">owner/repo nebo odkaz na github.com</string> + <string name="add_app_repository_invalid">Není to repozitář GitHubu</string> + <string name="add_app_flatpak_id">ID aplikace</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Není to ID aplikace Flathub</string> + <string name="add_app_flatpak_bundle_hint">Nebo soubor .flatpak pro aplikaci, která není na Flathub.</string> + <string name="add_app_pick_flatpak">Vybrat soubor .flatpak</string> + <string name="add_app_source">Zdroj</string> + <string name="add_app_appearance">Na Ploše</string> + <string name="add_app_preview_name">Nová aplikace</string> + <string name="add_app_name">Název</string> + <string name="add_app_name_placeholder">Z aplikace</string> + <string name="add_app_icon">Ikona</string> + <string name="add_app_icon_default">Výchozí ikona</string> + <string name="add_app_choose_icon">Vybrat ikonu</string> + <string name="add_app_clear_icon">Vymazat</string> + <string name="add_app_icon_suggestions">Z repozitáře</string> + <string name="add_app_icon_searching">Vyhledávání ikon…</string> + <string name="add_app_icon_reset">Výchozí</string> + <string name="edit_app_title">Upravit %1$s</string> + <string name="edit_app_save">Uložit</string> + <string name="add_app_checking_folder">Kontrola složky…</string> + <string name="add_app_folder_linked">Její složka je propojena do relace: %1$s</string> + <string name="add_app_folder_copied">Její složka obsahuje programy pro Linux, které sdílené úložiště nemůže spustit, proto se zkopíruje do DroidDeck (%1$s).</string> + <string name="add_app_confirm">Přidat</string> + <string name="add_app_cancel">Zrušit</string> + <string name="add_app_runtime_required">Nejprve nainstalujte běhové prostředí Linuxu v Nastavení.</string> + <string name="add_app_busy">Počkejte, až %1$s skončí.</string> + <string name="steam_compat_label">Kompatibilní</string> + <string name="proton_compatible_note">Sestavení označená „%1$s“ v nabídce Kompatibilita Steamu mají opravy prefixu od DroidDeck a hry z nich zde spustíte. Výchozí je Proton Experimental ARM64 (%1$s), nebo Proton 11.0 ARM64 (%1$s), jakmile se nainstaluje tato novější verze. Vlastní položky Protonu od Valve bez tohoto označení nemohou na tomto zařízení spustit hru.</string> + <string name="proton_installed_compatible">Nainstalováno %1$s · %2$s</string> + <string name="common_cancel">Zrušit</string> + <string name="common_auto">Automaticky</string> + <string name="common_never">Nikdy</string> + <string name="common_always">Vždy</string> + <string name="common_uninstall">Odinstalovat</string> + <string name="common_check">Zkontrolovat</string> + <string name="common_update">Aktualizovat</string> + <string name="common_checking">Kontrola…</string> + <string name="common_working">Zpracovává se…</string> + <string name="common_forget">Zapomenout</string> + <string name="common_add_ellipsis">Přidat…</string> + <string name="common_use">Použít</string> + <string name="common_applies_next_session">Použije se od příští relace.</string> + <string name="mode_steam_title">Relace Steamu</string> + <string name="mode_desktop_title">Relace Plochy</string> + <string name="mode_display">Displej</string> + <string name="mode_resolution">Rozlišení</string> + <string name="mode_res_720">Až 720p</string> + <string name="mode_res_900">Až 900p</string> + <string name="mode_res_1080">Až 1080p</string> + <string name="mode_res_native">Nativní</string> + <string name="mode_res_default">%1$s (výchozí)</string> + <string name="mode_res_custom_value">Vlastní · %1$d×%2$d</string> + <string name="mode_res_custom">Vlastní…</string> + <string name="mode_res_note">720p může zrychlit odezvu nabídek.</string> + <string name="mode_ratio">Poměr stran obrazovky</string> + <string name="mode_ratio_custom">Určen vlastním rozlišením.</string> + <string name="mode_ratio_auto">Automaticky použije alespoň 16:9.</string> + <string name="mode_fps">Omezení snímků</string> + <string name="mode_fps_note">Omezuje celou relaci. Displej přejde na obnovovací frekvenci, kterou lze tímto limitem dělit beze zbytku.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Výstup HDR10</string> + <string name="mode_hdr_unavailable">Není k dispozici: %1$s.</string> + <string name="mode_hdr_restart">Pro použití restartujte aplikaci.</string> + <string name="mode_drivers">Ovladače</string> + <string name="mode_gpu_drivers">Ovladače GPU</string> + <string name="mode_gpu_drivers_hint">Společné pro Steam a Plochu. Nastavuje se na stránce Komponenty.</string> + <string name="mode_touch_controls">Dotyk a ovládání</string> + <string name="mode_touch">Dotyk</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Přímé</string> + <string name="mode_touch_note">Automaticky: touchpad na Ploše, přímo ve Steamu.</string> + <string name="mode_osc">Ovládání na obrazovce</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Automaticky zobrazí ovládání, pokud není připojen žádný ovladač.</string> + <string name="osc_steam_touch">Dotykové ovládání Steamu (beta)</string> + <string name="osc_style_next_session">Dotykové ovládání Steamu se spustí od příští relace Steamu</string> + <string name="osc_steam_layout">Rozvržení dotykového ovládání Steamu</string> + <string name="osc_steam_layout_hint">Přesuňte, změňte velikost nebo skryjte dotykové ovládání této hry; uloží se do Steamu</string> + <string name="mode_controller">Ovladač</string> + <string name="mode_controller_hint">Jak Steam vidí váš ovladač. Použije se od příští relace.</string> + <string name="mode_controller_deck">Ovladač Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Ovladač Xbox 360</string> + <string name="mode_controller_note">Deck: tlačítko Quick Access a gyroskop. Steam Controller: totéž, navíc snímání úchopu na zadních tlačítkách. DualShock 4 a DualSense: gyroskop, trackpad slouží jako touchpad. Xbox 360: Quick Access otevřete kombinací Guide+A.</string> + <string name="mode_back">Zpět</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Relace</string> + <string name="mode_suspend">Chování na pozadí</string> + <string name="mode_suspend_hint">Když je aplikace skrytá nebo se vypne obrazovka.</string> + <string name="mode_suspend_manual">Manuální</string> + <string name="mode_suspend_native">Nativní</string> + <string name="mode_suspend_steam_note">Automaticky pozastaví relaci a obnoví ji při zobrazení. Nativně nejprve připraví Steam na spánek. Manuálně čeká na Obnovit. Nikdy běh nezastavuje.</string> + <string name="mode_background_downloads">Nechat stahování běžet</string> + <string name="mode_background_downloads_hint">Oddálí pozastavení na pozadí, pokud Steam aktivně stahuje.</string> + <string name="mode_zram">Komprese zRAM</string> + <string name="mode_zram_hint">Během hraní se paměť klienta Steam komprimuje do zram zařízení, takže hra má víc RAM. Platí při příštím spuštění Steamu.</string> + <string name="mode_zram_unsupported">Není k dispozici: zařízení nemá zram ani swap, nebo je jádro starší než 5.4.</string> + <string name="mode_suspend_note">Automaticky pozastaví na pozadí a obnoví při zobrazení. Manuálně čeká na Obnovit. Nikdy běh nezastavuje.</string> + <string name="mode_startup">Spouštění</string> + <string name="mode_steam_startup">Spustit Steam s DroidDeck</string> + <string name="mode_steam_startup_hint">Otevře relaci Steamu při spuštění DroidDeck.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Hledání vydání…</string> + <string name="mode_decky_ready">Připraveno k instalaci %1$s.</string> + <string name="mode_decky_none">Nenalezeno žádné kompatibilní sestavení. Zkuste to později.</string> + <string name="mode_decky_installed">Nainstalováno · %1$s</string> + <string name="mode_decky_update">Dostupná aktualizace · %1$s</string> + <string name="mode_decky_current">Aktuální · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Nainstalovat nejnovější</string> + <string name="mode_decky_on">Spouští se se Steamem. Když je zapnuto, jiné aplikace na tomto zařízení mohou mít možnost ovládat Steam.</string> + <string name="mode_decky_off">Vypnuto. Port pro vzdálené ladění Steamu zůstává zavřený.</string> + <string name="mode_decky_remove_title">Odinstalovat Decky Loader?</string> + <string name="mode_decky_remove_text">Odstraní loader. Vaše pluginy a nastavení zůstanou zachovány.</string> + <string name="mode_client">Klient</string> + <string name="mode_mangoapp">Výkonový overlay</string> + <string name="mode_mangoapp_hint">Vypněte, pokud hry v režimu Deck padají nebo zčernají. Použije se od příští relace.</string> + <string name="mode_steam_repair">Opravit klienta Steam</string> + <string name="mode_steam_repair_hint">Při dalším spuštění znovu stáhne klienta Steam. Použijte, pokud Steam zůstává na načítací obrazovce. Hry, přihlášení a nastavení zůstanou zachovány.</string> + <string name="mode_steam_repair_queued">Klient Steam se znovu stáhne při dalším spuštění Steamu.</string> + <string name="mode_steam_repair_button">Opravit</string> + <string name="mode_added_art">Grafika</string> + <string name="mode_sgdb_key">Klíč API SteamGridDB</string> + <string name="mode_sgdb_key_yours">Váš klíč</string> + <string name="mode_sgdb_edit">Upravit…</string> + <string name="mode_added_art_hint">Doplní chybějící grafiku ze Steamu, poté ze SteamGridDB. Vlastní soubory cover.jpg, hero.jpg, logo.png nebo icon.png ve složce hry mají přednost.</string> + <string name="summary_remove_game">Odebrat %1$s</string> + <string name="mode_added_remove_confirm">Odebrat?</string> + <string name="games_add">Přidat hru</string> + <string name="games_add_title">Přidat hru:</string> + <string name="games_pick_exe_title">Vyberte exe:</string> + <string name="games_add_unreachable">Toto umístění není v relaci dostupné</string> + <string name="mode_added_exe_check">Zkontrolovat tento exe</string> + <string name="wincomp_title">Komponenty Windows</string> + <string name="wincomp_pad_hint">LB / RB přeskakují mezi sekcemi.</string> + <string name="wincomp_card_none">Žádné</string> + <string name="wincomp_applies">DLL knihovny Windows, které Proton neobsahuje, ze seznamu komponent. Zapněte ty, které tato hra potřebuje: uloží se do vlastní složky Windows hry, nikdy do jejích souborů, a zůstanou bez ohledu na to, s jakým Protonem hra běží.</string> + <string name="wincomp_offline">Nepodařilo se načíst seznam komponent. Již stažené komponenty lze stále přepínat.</string> + <string name="wincomp_recommended">Doporučeno pro tuto hru</string> + <string name="wincomp_checking">Zjišťuje se, co tato hra potřebuje…</string> + <string name="wincomp_when_online">Dostupné online</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Zapíná se %1$d komponenta…</item> + <item quantity="few">Zapínají se %1$d komponenty…</item> + <item quantity="many">Zapínají se %1$d komponenty…</item> + <item quantity="other">Zapíná se %1$d komponent…</item> + </plurals> + <string name="wincomp_auto_section">Zapnuto pro tuto hru</string> + <string name="wincomp_auto_steam">Steam instaluje %1$s s %2$s (aplikace %3$s)</string> + <string name="wincomp_auto_gog">Ze seznamu GOG pro tuto hru</string> + <string name="wincomp_auto_epic">Z požadavků Epic pro tuto hru</string> + <string name="wincomp_auto_amazon">Z instalačních kroků Amazon pro tuto hru</string> + <string name="wincomp_steam_by_name">Steam instaluje %1$s s aplikací %2$s, spárováno podle názvu</string> + <string name="wincomp_suggestions">Také uvedeno</string> + <string name="wincomp_suggestion_reason">Uvádí ho %1$s; zde to není komponenta</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Hra obsahuje %1$s</string> + <string name="wincomp_found_shipped">Hra má %1$s (často funguje i bez úprav)</string> + <string name="wincomp_already_here">Již v této hře</string> + <string name="wincomp_no_recommendation">Nic ve složce hry neodkazuje na komponentu.</string> + <string name="wincomp_active">Nainstalováno pro tuto hru (%1$d)</string> + <string name="wincomp_all">Všechny komponenty (%1$d)</string> + <string name="wincomp_installers">Potřebují instalátor Windows (%1$d)</string> + <string name="wincomp_installers_note">Jde o vlastní instalační programy, uvnitř nemají balíček k rozebrání a zatím není zaznamenáno, co instalují. Většina z nich jsou staré runtimy, které už nahrazuje Mono uvnitř Protonu; záznamy se doplňují postupně.</string> + <string name="wincomp_show">Zobrazit</string> + <string name="wincomp_hide">Skrýt</string> + <string name="wincomp_needs_installer">Spouští vlastní instalační program (zatím bez záznamu)</string> + <string name="wincomp_unsupported">Zde ještě nepodporováno</string> + <string name="wincomp_loading">Načítání komponent…</string> + <string name="wincomp_failed">Nepodařilo se nainstalovat: %1$s</string> + <string name="wincomp_downloaded">Staženo</string> + <string name="wincomp_downloading">Stahuje se %1$s</string> + <string name="wincomp_installing">Instaluje se: %1$s</string> + <string name="wincomp_reverting">Vypínání…</string> + <string name="wincomp_download_size">%1$s ke stažení</string> + <string name="wincomp_next_launch">Použije se při dalším spuštění hry.</string> + <string name="mode_stretch169">Roztáhnout hry 16:9</string> + <string name="mode_stretch169_hint">Na obrazovkách bližších čtverci než 16:9 roztáhne hry na celou plochu místo pruhů. Použije se od příští relace.</string> + <string name="mode_audio">Zvuk</string> + <string name="mode_directaudio">DirectAudio pro hry</string> + <string name="mode_directaudio_hint">Obchází PulseAudio pro nižší latenci.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">Pro hlasový chat.</string> + <string name="mode_network">Síť</string> + <string name="mode_wifi_discovery">Vyhledávání Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Zobrazí názvy Wi-Fi a okolních sítí ve Steamu.</string> + <string name="mode_wifi_location_off">Služby určování polohy jsou vypnuté.</string> + <string name="mode_wifi_permission_denied">Oprávnění k poloze nebylo uděleno.</string> + <string name="mode_wifi_open_settings">Otevřít nastavení</string> + <string name="mode_wifi_continue">Pokračovat</string> + <string name="mode_wifi_explain_title">Povolit vyhledávání Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android vyžaduje oprávnění k poloze pro čtení názvů Wi-Fi a vyhledávání okolních sítí. DroidDeck tento přístup využívá k zobrazení těchto sítí ve Steamu. Vaši polohu nesledujeme. Přístup k internetu funguje i bez tohoto oprávnění.</string> + <string name="mode_storage">Úložiště her</string> + <string name="mode_storage_auto">Automaticky – karta SD, pokud je k dispozici, a vaše složky Games</string> + <string name="mode_storage_auto_none">Automaticky – vaše složky Games a karta SD, pokud je k dispozici (nyní žádná)</string> + <string name="mode_storage_internal">Pouze interní</string> + <string name="mode_storage_folder">Složka: %1$s</string> + <string name="mode_second_library">Druhá knihovna</string> + <string name="mode_storage_note">Hry, které streamují data z karty SD nebo sdíleného úložiště, mohou trhat.</string> + <string name="mode_storage_diagnostics">Diagnostika úložiště</string> + <string name="mode_storage_diagnostics_hint">Zaznamenává výsledky alokace a vzorky časování úložiště do sdílených protokolů. Když je zapnuto, může zpomalit instalace. Použije se od příští relace.</string> + <string name="mode_choose_folder">Vybrat složku…</string> + <string name="mode_custom_res_title">Vlastní rozlišení</string> + <string name="mode_custom_res_text">Nahradí limit i poměr stran. Velikost, která neodpovídá obrazovce, získá pruhy.</string> + <string name="mode_width">Šířka</string> + <string name="mode_height">Výška</string> + <string name="mode_custom_res_range">Mezi 320×240 a 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d hra</item> + <item quantity="few">%1$d hry</item> + <item quantity="many">%1$d hry</item> + <item quantity="other">%1$d her</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Smazat</string> + <string name="common_restore">Obnovit</string> + <string name="common_download">Stáhnout</string> + <string name="common_delete_named">Smazat %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Ovladač runtime</string> + <string name="comp_runtime_driver_hint">Používá Steam, hry i Plocha. Použije se od příští relace.</string> + <string name="comp_import_turnip">Importovat zip Turnip…</string> + <string name="comp_display_driver">Ovladač displeje</string> + <string name="comp_display_driver_hint">Vykresluje snímky na obrazovku v obou režimech. Pro použití restartujte aplikaci.</string> + <string name="comp_import_adrenotools">Importovat zip AdrenoTools…</string> + <string name="comp_never">nikdy</string> + <string name="comp_nightlies_checked">Nightlies zkontrolovány %1$s</string> + <string name="comp_title">Komponenty</string> + <string name="comp_about">O komponentách</string> + <string name="comp_check_drivers">Zkontrolovat nové ovladače</string> + <string name="comp_check_nightlies">Zkontrolovat Nightlies na nové balíčky</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Proton vybraný zde spouští každou hru, která si ve Steamu nevybrala svůj vlastní, a změna provedená ve Steamu se zobrazí i tady. Steam při aktualizaci nahrazuje Proton od Valve; originály jsou zachovány pro každé sestavení.</string> + <string name="comp_scope">Konfigurace</string> + <string name="comp_profile_configure">Konfigurovat profil</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Výchozí profil</string> + <string name="comp_scope_general_detail">Automaticky používán hrami bez vlastního přepsání.</string> + <string name="comp_profile_game_detail">Uložené nastavení se automaticky použije při spuštění %1$s.</string> + <string name="comp_game_hint">Vyberte jen nastavení, která tato hra potřebuje. Vše ostatní dál používá Výchozí profil.</string> + <string name="comp_game_fex">Předvolba FEX</string> + <string name="comp_game_fex_inherited">Používá se předvolba Výchozího profilu.</string> + <string name="comp_game_fex_override">Pro tuto hru je uložena vlastní předvolba.</string> + <string name="comp_game_fex_custom">Vlastní proměnné FEX</string> + <string name="comp_game_use_general">Použít Výchozí</string> + <string name="comp_game_compatibility">Kompatibilita hry</string> + <string name="comp_game_environment_hint">Možnosti prostředí Proton, DXVK, VKD3D a synchronizace pro tuto hru.</string> + <string name="comp_game_proton_inherited">Používá se Proton Výchozího profilu.</string> + <string name="comp_game_proton_override">Pro tuto hru je přes mapování kompatibility Steamu uložen vlastní Proton.</string> + <string name="comp_no_proton_short">Žádný Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Používá balíček Výchozího profilu z %1$s, pokud tato hra nevybere jiný balíček.</string> + <string name="comp_game_component_general">Používá balíček komponent Výchozího profilu.</string> + <string name="comp_game_component_override">Pro tuto hru používá jen %1$s.</string> + <string name="comp_game_runtime_options">Možnosti runtime</string> + <string name="comp_game_environment_other_hint">Další možnosti prostředí Proton, DXVK, VKD3D-Proton a synchronizace pro jednotlivé hry.</string> + <string name="comp_game_saved_next">Profil %1$s je uložen pro další spuštění hry.</string> + <string name="game_no_steam_title">Spustit bez Steamu</string> + <string name="game_no_steam_detail">Otevře ji v Protonu/FEX bez klienta Steamu; funkce Steamu jsou vypnuté.</string> + <string name="game_no_steam_on">Zapnuto</string> + <string name="game_steam_with">Spouští se se Steamem</string> + <string name="game_steam_without">Spouští se bez Steamu</string> + <string name="game_settings_card">Nastavení</string> + <string name="game_settings_menu_title">Nastavení %1$s</string> + <string name="game_settings_default">Výchozí</string> + <string name="game_settings_default_detail">Vrátí vše, co se u této hry změnilo, na nastavení aplikace.</string> + <string name="game_sync_custom">Vlastní proměnné synchronizace</string> + <string name="comp_game_proton_live">Výběr Protonu pro %1$s je uložen a hned dostupný ve Steamu.</string> + <string name="comp_game_proton_next">Výběr Protonu pro %1$s je uložen. Před spuštěním hry restartujte Steam.</string> + <string name="comp_game_proton_not_runnable">%1$s nemůže na tomto zařízení použít vybraný Proton.</string> + <string name="comp_game_load_failed">Nepodařilo se načíst profil %1$s: %2$s</string> + <string name="comp_game_save_failed">Profil hry se nepodařilo uložit: %1$s</string> + <string name="comp_game_reset">Resetovat profil hry</string> + <string name="comp_game_reset_title">Resetovat profil %1$s?</string> + <string name="comp_game_reset_body">Odebrat Proton, FEX, balíček komponent, prostředí, filtrování textur a přepsání komponent Windows u této hry? Bude používat Výchozí profil.</string> + <string name="comp_game_reset_done">%1$s nyní používá Výchozí profil.</string> + <string name="comp_game_reset_failed">Profil hry se nepodařilo úplně resetovat: %1$s</string> + <string name="comp_default_live">%1$s nyní spouští každou hru, která si ve Steamu nevybrala svůj vlastní Proton.</string> + <string name="comp_default_next">%1$s bude od dalšího spuštění Steamu spouštět každou hru, která si nevybrala svůj vlastní Proton.</string> + <string name="comp_default_not_runnable">%1$s zde nemůže spouštět hry, takže nemůže být výchozí.</string> + <string name="comp_default_failed">Výchozí Proton se nepodařilo uložit: %1$s</string> + <string name="comp_swapped">%1$s · %2$d nahrazeno</string> + <string name="comp_all_original">%1$s · vše originální</string> + <string name="comp_game_running_suffix">%1$s · hra běží</string> + <string name="comp_esync_pack">%1$s · balíček droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · zatím bez balíčku droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync je vestavěný, balíček nepotřeba</string> + <string name="comp_gpu_drivers">Ovladače GPU</string> + <string name="comp_reapplied">%1$s · znovu použito při spuštění %2$s</string> + <string name="comp_next_queued">Další: %1$s · po zavření hry</string> + <string name="comp_in_use">%1$s v použití: %2$s</string> + <string name="comp_waits">Čeká na zavření hry</string> + <string name="comp_applies_next_game">Použije se při dalším spuštění hry</string> + <string name="comp_import_zip">Importovat .zip</string> + <string name="comp_reading">Čtení Protonů…</string> + <string name="comp_no_proton">Zatím není nainstalován žádný Proton. Jednou spusťte Steam a stáhněte jeho Proton pro ARM64, nebo přidejte GE-Proton, CachyOS nebo DroidDeck-Proton v Nastavení.</string> + <string name="comp_original">Originál · %1$s</string> + <string name="comp_this_build">%1$s · toto sestavení</string> + <string name="comp_earlier_build">%1$s · dřívější sestavení</string> + <string name="comp_installed_count">Nainstalováno · %1$d</string> + <string name="comp_nothing_stored">Pro %1$s zatím nic není uloženo. Vlastní soubory tohoto Protonu jsou uloženy jako jeho originál.</string> + <string name="comp_waits_long">Na tomto Protonu běží hra, takže se čeká na její zavření.</string> + <string name="comp_applies_long">Použije se při dalším spuštění hry.</string> + <string name="comp_swap_title">Nahradit %1$s?</string> + <string name="comp_swap_body">Vložit %1$s do %2$s? Jeho původní soubory zůstanou uložené. %3$s</string> + <string name="comp_restore_title">Obnovit %1$s?</string> + <string name="comp_restore_body">Vrátit originál %1$s zpět do %2$s? %3$s</string> + <string name="comp_delete_package_body">Odstraní balíček z aplikace. Můžete ho znovu stáhnout.</string> + <string name="comp_delete_original_title">Smazat tento originál?</string> + <string name="comp_delete_original_body">Tento originál %1$s je z dřívějšího sestavení %2$s. Originál aktuálního sestavení je vždy zachován.</string> + <string name="comp_nightlies_count">Na Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Obnovte pro zobrazení balíčků na Nightlies.</string> + <string name="comp_nothing_new">Od poslední kontroly nic nového.</string> + <string name="comp_import_wcp">Importovat .wcp</string> + <string name="comp_restore_original">Obnovit originál tohoto Protonu</string> + <string name="comp_restore_original_body">Vrátit zpět originální %2$s od %1$s?</string> + <string name="comp_swap">Nahradit</string> + <string name="comp_about_text">FEX, DXVK a VKD3D-Proton pro každý Proton, se kterým Steam spouští hry.\n\nVyberte nainstalovaný řádek pro jeho nahrazení. Použije se při dalším spuštění hry, nebo po zavření běžící hry.\n\nVaše volby se před každým spuštěním znovu zkontrolují a vrátí zpět, pokud je něco změnilo. Původní soubory každého Protonu jsou zachovány, takže je aktualizace Steamu nikdy neztratí.</string> + <string name="comp_tag_original">Originál</string> + <string name="comp_tag_in_use">Používá se</string> + <string name="comp_tag_new">Nové</string> + <string name="comp_tag_stored">Uloženo</string> + <string name="perf_title">Výkon</string> + <string name="perf_lede">Jádra CPU, opravy relace a název hostitele. Použije se od příští relace.</string> + <string name="perf_client_cores_group">Jádra pro klienta Steam</string> + <string name="perf_override">Přepsat výběr jader Steamu</string> + <string name="perf_override_hint">Připne Steam, jeho pomocníka rozhraní a gamescope na jádra níže.</string> + <string name="perf_client_cores">Jádra klienta</string> + <string name="perf_client_cores_on">Jádra pro Steam.</string> + <string name="perf_client_cores_off">Pro výběr zapněte přepsání.</string> + <string name="perf_game_cores_group">Jádra pro hru</string> + <string name="perf_game_cores">Jádra pro hru</string> + <string name="perf_game_cores_hint">Jádra pro hry. Se všemi vybranými plánuje Android volně.</string> + <string name="perf_client_ui">Rozhraní klienta</string> + <string name="perf_glthread">Vícevláknové GL</string> + <string name="perf_glthread_hint">Může zrychlit odezvu nabídek Steamu.</string> + <string name="perf_zink">Zink: líné deskriptory</string> + <string name="perf_zink_hint">Doporučeno pro ovladače bez descriptor bufferů.</string> + <string name="perf_noglerror">Vynechat kontroly chyb GL</string> + <string name="perf_noglerror_hint">Vypne ověřování GL při každém volání.</string> + <string name="perf_gsrealtime">gamescope: fronta GPU v reálném čase</string> + <string name="perf_gsrealtime_hint">Dává prioritu práci GPU kompozitoru. Může vyhladit tempo snímků na úkor her.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Udržet GPU na nejvyšších taktech</string> + <string name="perf_gpuclock_hint">Jen Adreno. Méně zadrhávání, více spotřeby baterie a tepla.</string> + <string name="perf_fixes">Opravy relace</string> + <string name="perf_sysmem">Turnip: vykreslování sysmem</string> + <string name="perf_sysmem_hint">Rychlejší pro Steam a většinu her. 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_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> + <string name="perf_esync_hint">Vlákna Windows her na sebe čekají přes eventfd a sdílenou paměť místo zpráv přes wineserver. Používá balíček droiddeck-esync vytvořený přesně pro dané sestavení Protonu; balíčky se stahují automaticky. Dokud pro nové sestavení Protonu žádný neexistuje, zastupuje ho droiddeck-fsync. Použije se od příští relace.</string> + <string name="perf_xalia_hint">Vypne pomocníka Protonu pro navigaci gamepadem, který stojí výkon CPU v každé hře.</string> + <string name="perf_seccomp">Spustit proot bez seccomp</string> + <string name="perf_seccomp_hint">Může opravit chyby s chybějícími systémovými voláními na některých jádrech. Může snížit výkon.</string> + <string name="perf_fastpath">Rychlá cesta proot</string> + <string name="perf_fastpath_needs_seccomp">Vyžaduje filtr seccomp od proot.</string> + <string name="perf_fastpath_hint">Rychlejší vyhledávání souborů a méně zadrhávání. Vypněte, pokud program nemůže najít své soubory.</string> + <string name="perf_identity">Identita relace</string> + <string name="perf_hostname">Název hostitele</string> + <string name="perf_hostname_hint">Název, který Steam vidí pro toto zařízení. Prázdné obnoví %1$s.</string> + <string name="perf_hostname_invalid">Pouze písmena, číslice a vnitřní pomlčky, až 63 znaků.</string> + <string name="perf_phantom_warning">Android je nastaven tak, aby tuto relaci ukončil</string> + <string name="driver_installed">Nainstalováno</string> + <string name="driver_available">K dispozici ke stažení</string> + <string name="driver_nothing_new">Od poslední kontroly nic nového.</string> + <string name="driver_restore_builtin">Obnovit vestavěné ovladače</string> + <string name="driver_delete_builtin">Vestavěné v aplikaci: toto odstraní jeho rozbalené soubory a skryje ho. Obnovit vestavěné ovladače ho vrátí zpět.</string> + <string name="driver_delete_bundle">Polovina balíčku Android + Linux: odstraní se obě poloviny. Používaný ovladač se vrátí na výchozí.</string> + <string name="driver_delete_plain">Jeho soubory se odstraní z aplikace.</string> + <string name="driver_delete_in_use">Jeho soubory se odstraní. Používá se, takže převezme výchozí.</string> + <string name="drawer_page_display">Displej</string> + <string name="drawer_page_effects">Efekty</string> + <string name="drawer_page_controls">Ovládání</string> + <string name="drawer_page_components">Komponenty</string> + <string name="drawer_page_controller">Ovladač</string> + <string name="drawer_page_settings">Nastavení</string> + <string name="drawer_page_desc">Stránka %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Plocha</string> + <string name="drawer_steam_menu">Nabídka Steam</string> + <string name="drawer_quick_access">Rychlý přístup</string> + <string name="drawer_open_qam">Otevřít nabídku Rychlý přístup</string> + <string name="drawer_prev_page">Předchozí stránka</string> + <string name="drawer_next_page">Další stránka</string> + <string name="drawer_hud">HUD výkonu</string> + <string name="drawer_scaling">Režim škálování</string> + <string name="drawer_scaling_sharpness">Ostrost škálování</string> + <string name="drawer_effects">Efekty obrazovky</string> + <string name="drawer_effects_hint">Živě. Stojí trochu výkonu GPU, když je zapnutý jakýkoli efekt.</string> + <string name="drawer_look">Předvolby</string> + <string name="drawer_look_custom">Vlastní</string> + <string name="drawer_effects_advanced">Pokročilé</string> + <string name="widgets_expanded">Rozbaleno</string> + <string name="widgets_collapsed">Sbaleno</string> + <string name="drawer_cas">Zaostření (CAS)</string> + <string name="drawer_cas_level">Úroveň zaostření</string> + <string name="drawer_fake_hdr">Falešné HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Spustit SteamVR</string> + <string name="steamvr_checking">Kontrola SteamVR…</string> + <string name="drawer_deband">Odstranění pruhování</string> + <string name="drawer_deband_strength">Síla odstranění pruhování</string> + <string name="drawer_brightness">Jas</string> + <string name="drawer_contrast">Kontrast</string> + <string name="drawer_gamma">Gama</string> + <string name="drawer_saturation">Sytost</string> + <string name="drawer_fxaa">FXAA (vyhlazení hran)</string> + <string name="drawer_toon">Kreslené obrysy</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Filtrování textur</string> + <string name="drawer_texture_hint">Hry na DirectX 9–11, od jejich dalšího spuštění.</string> + <string name="drawer_anisotropy">Anizotropní filtrování</string> + <string name="drawer_texture_sharpness">Ostrost textur</string> + <string name="drawer_texture_sharpness_note">Záporný mip bias: ostřejší textury, trochu mihotání. Automaticky odpovídá tomu, jak moc je relace zvětšena na obrazovku.</string> + <string name="drawer_touch_auto">Automaticky (%1$s)</string> + <string name="drawer_keyboard">Klávesnice</string> + <string name="drawer_latency">Zpoždění</string> + <string name="drawer_low_latency_controller">Ovladač s nízkým zpožděním</string> + <string name="drawer_low_latency_controller_hint">Ovladač hlásí na 1000 Hz místo 250 Hz. O něco víc CPU.</string> + <string name="drawer_low_latency_touch">Dotek s nízkým zpožděním</string> + <string name="drawer_low_latency_touch_hint">Doteky přeskakují dávkování snímků, takže ovládání dotykem ve Steamu běží na 1000 Hz. O něco víc CPU.</string> + <string name="drawer_pc_keyboard">Klávesnice PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Druhá obrazovka</string> + <string name="drawer_second_screen_mode">Režim</string> + <string name="drawer_second_screen_shows">Zobrazuje</string> + <string name="drawer_android_apps">Aplikace Android</string> + <string name="drawer_launch_app">Spustit aplikaci</string> + <string name="common_hide">Skrýt</string> + <string name="common_show">Zobrazit</string> + <string name="drawer_no_apps">Žádné spustitelné aplikace</string> + <string name="drawer_session_behavior">Chování relace</string> + <string name="drawer_suspend_hint">Použije se nyní i pro budoucí relace v tomto režimu.</string> + <string name="drawer_next_session">Příští relace</string> + <string name="drawer_support">Podpora</string> + <string name="drawer_logs">Protokoly relace</string> + <string name="drawer_logs_hint">Přiložit k hlášení chyby</string> + <string name="drawer_share_logs">Sdílet protokoly</string> + <string name="drawer_background">Pozadí</string> + <string name="drawer_stop">Ukončit</string> + <string name="drawer_stop_title">Ukončit relaci?</string> + <string name="drawer_running_now">Právě běží</string> + <string name="drawer_no_game">Na Protonu neběží žádná hra</string> + <string name="drawer_selected_profile">Profil hry</string> + <string name="drawer_selected_profile_none">Podrobnosti profilu zatím nejsou k dispozici.</string> + <string name="drawer_profile_refresh_failed_initial">Nepodařilo se načíst profily her. Automaticky se to zkouší znovu.</string> + <string name="drawer_profile_refresh_failed_stale">Nepodařilo se obnovit profily her. Zobrazují se poslední dostupná data; automaticky se to zkouší znovu.</string> + <string name="drawer_profile_inspect_hint">Zobrazit a upravit uložené nastavení použité při dalším spuštění.</string> + <string name="drawer_profile_default">Používá se Výchozí profil</string> + <string name="drawer_profile_custom">Vlastní profil</string> + <string name="drawer_component_inherited">Používá se %1$s z Výchozího profilu.</string> + <string name="drawer_game_components_note">Změny se uloží do profilu %1$s a použijí se při dalším spuštění hry.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d přepsání hry</item> + <item quantity="few">%1$d přepsání hry</item> + <item quantity="many">%1$d přepsání hry</item> + <item quantity="other">%1$d přepsání hry</item> + </plurals> + <string name="drawer_no_proton">Zatím není nainstalován žádný Proton.</string> + <string name="drawer_game_running">hra běží</string> + <string name="drawer_reapplied">znovu použito při spuštění %1$s</string> + <string name="drawer_original">Originál</string> + <string name="drawer_components_note">Import a mazání na stránce Komponenty.</string> + <string name="setup_check_done">Hotovo</string> + <string name="setup_check_warn">Vyžaduje pozornost</string> + <string name="setup_check_busy">Zpracovává se</string> + <string name="setup_limit_adb_failed">Zkontrolujte IP adresu a port pro Bezdrátové ladění, nebo zařízení znovu spárujte, pokud ho Android odstranil.</string> + <string name="setup_install">Instalovat</string> + <string name="setup_manage">Správa</string> + <string name="setup_tab_overview">Přehled</string> + <string name="setup_tab_controller">Ovladač</string> + <string name="setup_tab_session">Relace</string> + <string name="setup_tab_launcher">Spouštěč</string> + <string name="setup_title">Příprava</string> + <string name="setup_all_set">● Vše připraveno</string> + <string name="setup_n_ready">%1$d z %2$d připraveno</string> + <string name="setup_system_check">Kontrola systému</string> + <string name="setup_gpu_supported">Zařízení podporováno</string> + <string name="setup_gpu_untested">Neověřené GPU</string> + <string name="setup_gpu_unsupported">GPU nepodporováno</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam vyžaduje ovladač Adreno; %1$s může zobrazit černou obrazovku</string> + <string name="setup_runtime">Běhové prostředí Linuxu</string> + <string name="setup_runtime_progress">%1$s · %2$d %%</string> + <string name="setup_runtime_missing">Nenainstalováno · přibližně 3 GB, instaluje se při prvním Play</string> + <string name="setup_installed">Nainstalováno</string> + <string name="setup_runtime_update">%1$s · dostupná aktualizace</string> + <string name="setup_runtime_current">%1$s · aktuální</string> + <string name="setup_limit">Limit podprocesů</string> + <string name="setup_limit_on">Zapnuto · Android může Steam zavřít. Vypnutí trvá minutu.</string> + <string name="setup_limit_unset">Nenastaveno · Android může Steam zavřít. Vypnutí trvá minutu.</string> + <string name="setup_limit_unknown">Nelze zkontrolovat · vypnutí trvá minutu.</string> + <string name="setup_fix_it">Opravit</string> + <string name="setup_details">Podrobnosti</string> + <string name="setup_dev_options">Možnosti pro vývojáře</string> + <string name="setup_use_wireless">Použít Bezdrátové ladění</string> + <string name="setup_check_again">Zkontrolovat znovu</string> + <string name="setup_limit_turn_on">Zapnout limit</string> + <string name="setup_account">Účet Steam</string> + <string name="setup_signed_in_offline">Přihlášen jako %1$s · režim offline</string> + <string name="setup_signed_in">Přihlášen jako %1$s</string> + <string name="setup_sign_in">Stiskněte Play a přihlaste se ke Steamu</string> + <string name="setup_tools">Nástroje</string> + <string name="setup_controller">Ovladač</string> + <string name="setup_controller_unavailable">Nastavení ovladače není k dispozici.</string> + <string name="setup_session">Relace</string> + <string name="setup_logs">Protokoly relace</string> + <string name="setup_logs_hint">Uloženo po každé relaci</string> + <string name="setup_agent_commands">Nástroje pro ladění</string> + <string name="setup_latest_logs">Protokoly poslední relace</string> + <string name="setup_saved_logs">Uložené protokoly relací</string> + <string name="setup_saved_logs_hint">Uchovává nejnovějších %1$d</string> + <string name="setup_clear_logs">Vymazat protokoly</string> + <string name="setup_reset_settings">Obnovit všechna nastavení</string> + <string name="setup_reset_settings_hint">Vrátí každé nastavení na výchozí hodnotu</string> + <string name="setup_reset_settings_button">Obnovit</string> + <string name="setup_reset_settings_title">Obnovit všechna nastavení?</string> + <string name="setup_reset_settings_body">Nastavení obrazu, výkonu, ovladače, motivu, jazyka a spouštěče se vrátí na výchozí hodnoty. Hry, přihlášení ke Steamu, účty obchodů, stažené ovladače a složky úložiště zůstanou.</string> + <string name="setup_reset_settings_profiles">Obnovit i profily her (Proton, FEX, komponenty a prostředí pro každou hru a prostředí profilu Výchozí)</string> + <string name="setup_reset_settings_session_running">Před obnovením nastavení zastav relaci.</string> + <string name="setup_reset_settings_partial">Nastavení byla obnovena, ale ne všechna. Podrobnosti jsou v logech.</string> + <string name="setup_offline">Režim offline</string> + <string name="setup_sign_in_first">Nejprve se přihlaste ke Steamu</string> + <string name="setup_launcher">Spouštěč</string> + <string name="setup_language">Jazyk</string> + <string name="setup_language_hint">Použije ho i Steam, od dalšího spuštění.</string> + <string name="setup_language_system">Výchozí systémový (%1$s)</string> + <string name="setup_language_system_short">Výchozí systémový</string> + <string name="setup_app_scale">Měřítko aplikace</string> + <string name="setup_app_scale_hint">Text a ovládání DroidDeck</string> + <string name="setup_app_scale_default">%1$d %% (výchozí)</string> + <string name="setup_theme">Téma</string> + <string name="setup_theme_hint">Vzhled spouštěče</string> + <string name="setup_home">Použít jako domovskou obrazovku</string> + <string name="setup_home_on">DroidDeck může být domovská aplikace</string> + <string name="setup_home_off">DroidDeck se nikdy nenabízí jako domovská aplikace</string> + <string name="setup_orientation">Orientace</string> + <string name="setup_orientation_auto">Automaticky na šířku</string> + <string name="setup_orientation_landscape">Na šířku</string> + <string name="setup_orientation_reverse">Na šířku obráceně</string> + <string name="setup_fullscreen">Celá obrazovka</string> + <string name="setup_fullscreen_on">Skryje stavový a navigační panel Androidu</string> + <string name="setup_fullscreen_off">Zobrazí stavový a navigační panel Androidu</string> + <string name="setup_default_home">Výchozí domovská aplikace</string> + <string name="setup_choose_home">Vybrat domovskou aplikaci</string> + <string name="setup_choose">Vybrat</string> + <string name="setup_linux_apps">Aplikace Linuxu (beta)</string> + <string name="setup_tool_files">Soubory</string> + <string name="setup_tool_files_hint">Procházení a správa souborů</string> + <string name="setup_tool_protons">Verze Protonu</string> + <string name="setup_tool_protons_hint">Instalace sestavení Protonu pro ARM64</string> + <string name="setup_tool_performance">Výkon</string> + <string name="setup_tool_performance_hint">Přiřazení jader CPU</string> + <string name="setup_tool_roms">Složka ROM</string> + <string name="setup_tool_roms_hint">Kde jsou uloženy hry pro emulátory</string> + <string name="setup_card_components">Komponenty</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Ovládání</string> + <string name="setup_card_controls_hint">Mapování tlačítek</string> + <string name="store_tab_discover">Objevit</string> + <string name="store_tab_search">Hledat</string> + <string name="store_tab_installed">Nainstalováno</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Obchod</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak připraven</string> + <string name="store_needs_runtime">Nejprve nainstalujte běhové prostředí Linuxu v Přípravě.</string> + <string name="store_setup_title">Nastavit Flatpak</string> + <string name="store_setup_text">Přidá Flatpak a připojí ho k Flathub (přibližně 20 MB). První aplikace si také stáhne svůj runtime.</string> + <string name="store_setting_up">Nastavování…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Aktualizace</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d %%</string> + <string name="store_starting">Spouští se…</string> + <string name="store_categories">Kategorie</string> + <string name="store_unreachable">Nepodařilo se spojit s Flathub. Zkontrolujte připojení a zkuste to znovu.</string> + <string name="store_try_again">Zkusit znovu</string> + <string name="store_search_label">Hledat na Flathub</string> + <string name="store_search_placeholder">Firefox, hry, emulátory…</string> + <string name="store_search">Hledat</string> + <string name="store_all">Vše</string> + <string name="store_searching">Hledání…</string> + <string name="store_search_hint">Hledejte podle názvu nebo vyberte kategorii. Uvedeny jsou jen aplikace pro ARM64.</string> + <string name="store_no_results">Tomu na Flathub neodpovídá žádná aplikace pro ARM64.</string> + <string name="store_results">Výsledky</string> + <string name="store_check_updates">Zkontrolovat aktualizace</string> + <string name="store_update_all">Aktualizovat vše (%1$d)</string> + <string name="store_all_current">● Vše je aktuální</string> + <string name="store_no_apps">Zatím žádné aplikace. Najděte nějaké v Objevit nebo Hledat.</string> + <string name="store_setup_first_note">Pro instalaci aplikací nastavte Flatpak.</string> + <string name="store_update_available_prefix">Dostupná aktualizace · %1$s</string> + <string name="store_open">Otevřít</string> + <string name="store_details">Podrobnosti</string> + <string name="store_remove">Odebrat</string> + <string name="store_press_again">Pro odebrání stiskněte znovu</string> + <string name="store_installing">Instaluje se…</string> + <string name="store_install">Instalovat</string> + <string name="store_setup_first">Nejprve nastavte Flatpak</string> + <string name="store_download_size">%1$s ke stažení</string> + <string name="store_installed_chip">● Nainstalováno</string> + <string name="store_details_failed">Nepodařilo se načíst stránku této aplikace na Flathub.</string> + <string name="store_loading">Načítání z Flathub…</string> + <string name="store_no_arm">Na Flathub není sestavení pro ARM64, takže zde nelze nainstalovat.</string> + <string name="store_screenshots">Snímky obrazovky</string> + <string name="store_about">O aplikaci</string> + <string name="store_app_id">ID aplikace</string> + <string name="store_license">Licence</string> + <string name="store_runtime">Runtime</string> + <string name="store_installed_size">Velikost po instalaci</string> + <string name="store_installed_size_value">%1$s (plus sdílený runtime)</string> + <string name="store_website">Web</string> + <string name="store_verified">Ověřeno</string> + <string name="upd_title">Aktualizace</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Zkontrolováno %1$s</string> + <string name="upd_not_checked">Zatím nezkontrolováno</string> + <string name="upd_perm_title">Povolit DroidDecku aktualizovat se sám</string> + <string name="upd_perm_text">Na další obrazovce zapněte Povolit z tohoto zdroje a vraťte se zpět. Aktualizace pak pokračuje sama.</string> + <string name="upd_open_settings">Otevřít nastavení</string> + <string name="upd_not_now">Teď ne</string> + <string name="upd_signed_status">Jinak podepsáno</string> + <string name="upd_signed_headline">Nelze aktualizovat na místě</string> + <string name="upd_signed_detail">Tato kopie není podepsána vydávacím klíčem DroidDecku, proto se přes ni aktualizace nedají nainstalovat. Odinstalujte ji, abyste mohli přejít.</string> + <string name="upd_available">Aktualizace k dispozici</string> + <string name="upd_blocked_status">Nelze instalovat</string> + <string name="upd_switch">Připraveno k přechodu</string> + <string name="upd_ahead_status">Před Stable</string> + <string name="upd_ahead_headline">Jste před verzí Stable</string> + <string name="upd_ahead_detail">Tato sestava je novější než aktuální Stable. Na Stable přejdete s jejím dalším vydáním.</string> + <string name="upd_gone_status">Test skončil</string> + <string name="upd_gone_headline">Tento test skončil</string> + <string name="upd_gone_detail">Jeho oprava byla sloučena nebo zrušena. Nejnovější opravy sledujte v Preview.</string> + <string name="upd_current_status">Aktuální</string> + <string name="upd_current_headline">Máte nejnovější %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Aktualizovat%1$s</string> + <string name="upd_install_button">Instalovat%1$s</string> + <string name="upd_install_anyway">Přesto instalovat Stable %1$s</string> + <string name="upd_follow_preview">Sledovat Preview</string> + <string name="upd_stop_session">Pro aktualizaci zastavte běžící relaci.</string> + <string name="upd_less">Méně</string> + <string name="upd_more">Více</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Nová sestava Preview</string> + <string name="upd_new_test">Testovací sestava PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">AKTUALIZAČNÍ KANÁL</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Testovaná vydání, pro většinu lidí</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Nejnovější opravy, dříve než ve Stable</string> + <string name="upd_preview_current">Aktuální</string> + <string name="upd_tests">Testovací sestavy</string> + <string name="upd_tests_hint">Vyzkoušejte opravu před jejím vydáním</string> + <string name="upd_tests_none">Momentálně žádné</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Pro tuto kopii DroidDecku není sestavena</string> + <string name="upd_updated">Aktualizováno %1$s</string> + <string name="upd_test_name">test PR #%1$d</string> + <string name="upd_while_ago">před chvílí</string> + <string name="upd_just_now">právě teď</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d k vyzkoušení</item> + <item quantity="few">%1$d k vyzkoušení</item> + <item quantity="many">%1$d k vyzkoušení</item> + <item quantity="other">%1$d k vyzkoušení</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Změny od vaší sestavy · o %1$d sestavu pozadu</item> + <item quantity="few">Změny od vaší sestavy · o %1$d sestavy pozadu</item> + <item quantity="many">Změny od vaší sestavy · o %1$d sestav pozadu</item> + <item quantity="other">Změny od vaší sestavy · o %1$d sestav pozadu</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Nedávné změny · %1$d sestava</item> + <item quantity="few">Nedávné změny · %1$d sestavy</item> + <item quantity="many">Nedávné změny · %1$d sestav</item> + <item quantity="other">Nedávné změny · %1$d sestav</item> + </plurals> + <string name="gate_title">Je třeba změnit jedno nastavení Androidu</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android zastavuje aplikace, které spouštějí mnoho procesů na pozadí, a Steam jich spouští desítky. Dokud se to nezmění, hry se zavírají bez chybové zprávy.</string> + <string name="gate_fix_for_me">Oprav to za mě</string> + <string name="gate_toggle_steps">Zapněte „Deaktivace omezení podřízených procesů“ a vraťte se zpět. Nechte Možnosti pro vývojáře zapnuté, jinak se přepínač znovu vypne.</string> + <string name="gate_open_dev">Otevřít Možnosti pro vývojáře</string> + <string name="gate_no_toggle">Tato verze Androidu pro to nemá přepínač, proto to DroidDeck změní přes Bezdrátové ladění. Zabere to asi minutu, počítač není potřeba.</string> + <string name="gate_needs_wifi">Bezdrátové ladění potřebuje Wi-Fi. Funguje jakákoli síť, internet není nutný.</string> + <string name="gate_needs_notifications">Párovací kód se zobrazí v oznámení. Povolte oznámení pro DroidDeck, nebo použijte Jiné způsoby.</string> + <string name="gate_allow_notifications">Povolit oznámení</string> + <string name="gate_step1">Otevřete Nastavení → Možnosti pro vývojáře → Bezdrátové ladění a zapněte ho</string> + <string name="gate_step2">Klepněte na „Spárovat zařízení pomocí párovacího kódu“</string> + <string name="gate_step3">Zadejte kód do oznámení DroidDecku</string> + <string name="gate_waiting">Čekání na párovací okno…</string> + <string name="gate_code_needed">Okno nalezeno. Zadejte jeho kód do oznámení.</string> + <string name="gate_status">Stav</string> + <string name="gate_polling">Kontroluje se každé 2 sekundy. Tato stránka se zavře, až bude vypnuto.</string> + <string name="gate_other_ways">Jiné způsoby</string> + <string name="gate_other_toggle">Bezdrátové ladění, ruční adresa, ADB z počítače</string> + <string name="gate_other_no_toggle">Ruční adresa, ADB z počítače, Možnosti pro vývojáře</string> + <string name="gate_use_wireless_instead">Použít místo toho Bezdrátové ladění</string> + <string name="gate_some_roms">Některé ROM přepínač přidávají i tak. Hledejte v Možnostech pro vývojáře „child process“.</string> + <string name="gate_manual_hint">Pokud oznámení nefunguje, zadejte adresu a kód z okna sami.</string> + <string name="gate_enter_manually">Zadat adresu ručně</string> + <string name="gate_from_computer">Z počítače s ADB:</string> + <string name="gate_copy_command">Kopírovat příkaz</string> + <string name="gate_choose_display">Vyberte, na kterém displeji se má otevřít Nastavení Androidu.</string> + <string name="gate_main_screen">Hlavní obrazovka</string> + <string name="wadb_finding_port">Spárováno. Hledání portu Bezdrátového ladění…</string> + <string name="wadb_enter_port">Spárováno. Zadejte port z Nastavení.</string> + <string name="wadb_applying">Zařízení nalezeno. Používá se nastavení…</string> + <string name="wadb_apply_failed">Nepodařilo se použít automaticky. Zkontrolujte adresu níže a zkuste to znovu. %1$s</string> + <string name="wadb_title_wireless">Bezdrátové ladění</string> + <string name="wadb_title_done">Omezení pro dětské procesy aktualizováno</string> + <string name="wadb_title">Změnit omezení pro dětské procesy</string> + <string name="wadb_lede_compact0">Pokud volba chybí, spárujte přes Bezdrátové ladění.</string> + <string name="wadb_lede_compact1">Spárováno. Zkontrolujte IP adresu a port v Bezdrátovém ladění.</string> + <string name="wadb_lede_done">Omezení pro dětské procesy bylo aktualizováno.</string> + <string name="wadb_lede0">Krok 2 použijte, pokud Možnosti pro vývojáře nemají nastavení pro dětské procesy. Otevřete Možnosti pro vývojáře → Bezdrátové ladění → Spárovat zařízení pomocí párovacího kódu.</string> + <string name="wadb_lede1">Spárováno. Použijte adresu níže, nebo ji aktualizujte z Bezdrátové ladění → IP adresa a port.</string> + <string name="wadb_lede_done_long">Omezení pro dětské procesy bylo aktualizováno přes Bezdrátové ladění.</string> + <string name="wadb_confirmed_on">Android potvrdil, že omezení je zapnuto.</string> + <string name="wadb_confirmed_off">Android potvrdil, že omezení je vypnuto.</string> + <string name="wadb_pair_group">2 · Spárovat Bezdrátové ladění</string> + <string name="wadb_pair_address">IP adresa a port párovacího okna</string> + <string name="wadb_pin">Párovací kód (PIN)</string> + <string name="wadb_pin_placeholder">6 číslic</string> + <string name="wadb_pair">Spárovat</string> + <string name="wadb_apply_group">2 · Použít přes Bezdrátové ladění</string> + <string name="wadb_connect_address">IP adresa a port pro připojení</string> + <string name="wadb_pair_again">Spárovat znovu</string> + <string name="wadb_turn_off">Vypnout omezení</string> + <string name="wadb_other_ways">Jiné způsoby změny</string> + <string name="wadb_dev_try_first">1 · Možnosti pro vývojáře (zkusit nejdřív)</string> + <string name="wadb_restrict_on">Vypněte „Deaktivace omezení podřízených procesů“.</string> + <string name="wadb_restrict_off">Zapněte „Deaktivace omezení podřízených procesů“.</string> + <string name="wadb_computer_last">3 · ADB z počítače (poslední možnost)</string> + <string name="wadb_only_if">Jen pokud Bezdrátové ladění není k dispozici.</string> + <string name="wadb_computer_group">3 · ADB z počítače (poslední možnost)</string> + <string name="ctrl_osc_hint">Kdy se dotykové ovládání zobrazí v relaci</string> + <string name="ctrl_color">Barva</string> + <string name="ctrl_color_hint">Odstín tlačítek na obrazovce</string> + <string name="ctrl_custom">Vlastní</string> + <string name="ctrl_opacity">Průhlednost</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Velikost tlačítek</string> + <string name="ctrl_size_hint" formatted="false">100 % je standardní velikost</string> + <string name="ctrl_stick_click">Kliknutí páčkou</string> + <string name="ctrl_stick_click_hint">Dvojitým dotykem a podržením páčky aktivujete L3 nebo R3</string> + <string name="ctrl_adaptive">Adaptivní páčky</string> + <string name="ctrl_rumble">Vibrace ve hře</string> + <string name="ctrl_steam_button">Tlačítko Steam</string> + <string name="ctrl_qam_button">Tlačítko QAM</string> + <string name="ctrl_keyboard_button">Tlačítko klávesnice</string> + <string name="ctrl_select_steam">Otevřít nabídku Steam stisknutím Select</string> + <string name="ctrl_select_steam_hint">Místo View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Cony jako ovladače VR</string> + <string name="ctrl_joycon_vr_hint">Když běží SteamVR, každý Joy-Con slouží jako ruka. Namiřte ho dopředu a podržením Home nebo Capture ho znovu vycentrujete.</string> + <string name="setup_animations">Animace</string> + <string name="ctrl_adaptive_hint">Páčky se zobrazí tam, kde se dotknete, a skryjí se po uvolnění</string> + <string name="ctrl_layout">Rozložení</string> + <string name="ctrl_layout_custom">Uloženy vlastní pozice</string> + <string name="ctrl_layout_default">Přizpůsobeno této obrazovce</string> + <string name="ctrl_edit">Upravit</string> + <string name="ctrl_reset">Obnovit</string> + <string name="ctrl_mapping">Mapování tlačítek</string> + <string name="ctrl_mapping_default">Každé tlačítko odesílá svůj vlastní vstup</string> + <string name="ctrl_mapping_count">%1$d z %2$d tlačítek přemapováno</string> + <string name="ctrl_configure">Konfigurovat</string> + <string name="ctrl_reset_all">Obnovit ovladač</string> + <string name="ctrl_reset_all_hint">Obnoví všechna nastavení ovladače a rozložení</string> + <string name="ctrl_mapping_lede">Co každé tlačítko na obrazovce odesílá hře. Skryté tlačítko odstraní.</string> + <string name="ctrl_onscreen_buttons">Tlačítka na obrazovce</string> + <string name="ctrl_defaults">Výchozí</string> + <string name="ctrl_reset_mapping">Obnovit mapování</string> + <string name="content_android_apps">Aplikace Android</string> + <string name="content_apps_count">%1$d aplikací</string> + <string name="content_no_android_apps">Nebyly nalezeny žádné spustitelné aplikace Android.</string> + <string name="content_desktop_installed">● Desktop nainstalován</string> + <string name="content_desktop_first_open">Nainstaluje se při prvním otevření</string> + <string name="content_available">K instalaci</string> + <string name="content_not_installed">Nenainstalováno.</string> + <string name="content_not_installed_suffix">%1$s · nenainstalováno</string> + <string name="content_open_named">Otevřít %1$s</string> + <string name="content_games">Hry</string> + <string name="content_choose_roms">Vyberte složku ROMs.</string> + <string name="content_retroarch_roms">Přejděte v RetroArchu na /root/ROMs.</string> + <string name="content_add_roms">Přidejte hry %1$s do ROMs/%2$s.</string> + <string name="content_install_named">Instalovat %1$s</string> + <string name="content_stop_to_install">Instalace vyžaduje zastavení relace</string> + <string name="content_runtime_required">Vyžadován runtime</string> + <string name="content_loading_details">Načítání podrobností instalace…</string> + <string name="content_details_unavailable">Podrobnosti instalace nejsou k dispozici. Zkuste to později.</string> + <string name="content_needs_runtime">Nejprve nainstalujte Linuxový runtime z Přípravy.</string> + <string name="content_stop_first">Pro instalaci desktopových aplikací zastavte běžící relaci.</string> + <string name="content_install_into">Instaluje %1$s do Linuxového desktopu.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Skrytím se odstraní z Desktopu. Soubory zůstanou v Linuxovém runtime.</string> + <string name="content_rom_gone">Tato hra už není ve složce ROMs.</string> + <string name="content_desktop_system">Desktop · %1$s</string> + <string name="content_launch_in">Spustit v %1$s</string> + <string name="content_also_in">Také v %1$s</string> + <string name="content_page_gone">Tato stránka už neexistuje. Vyberte sekci vlevo.</string> + <string name="content_open_desktop">Otevřít desktop</string> + <string name="content_install_open_desktop">Instalovat a otevřít desktop</string> + <string name="desktop_remove_title">Odinstalovat desktop?</string> + <string name="desktop_remove_text">Odstraní desktop a jeho vestavěné aplikace. Hry, přidané aplikace, nastavení a sdílené knihovny zůstanou.</string> + <string name="desktop_removing">Odstraňování desktopu</string> + <string name="desktop_removed">Desktop odstraněn</string> + <string name="desktop_cleaning_legacy">Odstraňování starých souborů LXQt</string> + <string name="desktop_removal_unknown">Před odstraněním této verze desktopu aktualizujte DroidDeck.</string> + <string name="content_linux_desktop">Linuxový desktop</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox a vaše emulátory</string> + <string name="games_empty">Hry, které nainstalujete ve Steamu, se zde zobrazí po relaci.</string> + <string name="games_play_steam">Hrát ve Steamu</string> + <string name="games_play_steamvr">Hrát ve SteamVR</string> + <string name="games_launch_settings">Nastavení spuštění</string> + <string name="games_launch">Spustit</string> + <string name="games_files">Soubory hry</string> + <string name="games_prefix">Prefix Protonu</string> + <string name="games_saves_looking">Hledání uložených pozic…</string> + <string name="games_saves_none">Podle názvu nebyla nalezena žádná složka s uloženými pozicemi. Export zabere celou uživatelskou složku.</string> + <string name="games_saves_folders">%1$d složek s uloženými pozicemi</string> + <string name="games_saves_summary">%1$s · %2$d souborů · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Správa uložených pozic</string> + <string name="games_saves">Uložené pozice hry</string> + <string name="games_import_saves">Importovat uložené pozice…</string> + <string name="games_export_gamehub">Exportovat jako GameHub zip…</string> + <string name="games_export_winlator">Exportovat jako Winlator zip…</string> + <string name="games_open_save_folder">Otevřít složku s uloženými pozicemi</string> + <string name="games_never_played">Nikdy nehráno</string> + <string name="games_runtime_busy_percent">Runtime zaneprázdněn · %1$d%%</string> + <string name="games_runtime_busy">Runtime zaneprázdněn</string> + <string name="games_runtime_first_play">Runtime se nainstaluje při prvním spuštění hry</string> + <string name="games_runtime_update">K dispozici aktualizace runtime</string> + <string name="games_runtime_ready">● Runtime připraven</string> + <string name="games_last_played">Poslední hraní %1$s</string> + <string name="games_internal">Interní úložiště</string> + <string name="games_added">Přidaná hra</string> + <string name="games_custom">Vlastní hra</string> + <string name="games_store_storage">Úložiště her</string> + <string name="gpu_auto_hint">Nejlepší dvojice pro tento GPU, udržovaná aktuální</string> + <string name="gpu_manual_hint">Vyberte dvojici sami</string> + <string name="gpu_checking">Hledání ovladačů…</string> + <string name="gpu_none_listed">Zatím žádné ovladače. Obnovte, aby se vyhledaly.</string> + <string name="gpu_hide_other">Skrýt ovladače pro jiné GPU</string> + <string name="gpu_show_other">Zobrazit ovladače pro jiné GPU</string> + <string name="gpu_advanced">Pokročilé</string> + <string name="gpu_set_with_display">Nastaveno společně s ovladačem displeje: %1$s obsahuje oba.</string> + <string name="gpu_set_with_runtime">Nastaveno společně s ovladačem runtime: %1$s obsahuje oba.</string> + <string name="gpu_runtime_hint">Používají hry a desktop.</string> + <string name="gpu_runtime_default">Výchozí runtime</string> + <string name="gpu_auto_by_gpu">Automaticky - podle GPU</string> + <string name="gpu_manage">Stáhnout, importovat nebo smazat…</string> + <string name="gpu_in_use_caps">POUŽÍVÁ SE</string> + <string name="gpu_builtin">Ovladače vestavěné v DroidDecku</string> + <string name="gpu_matched_pair">Ovladače runtime a displeje nastaveny společně jako sladěná dvojice.</string> + <string name="gpu_recommended_for">Doporučeno pro tento GPU: %1$s.</string> + <string name="gpu_refresh_hint">Obnovte, aby se vyhledaly ovladače pro tento GPU.</string> + <string name="gpu_recommended_caps">DOPORUČENO</string> + <string name="gpu_unavailable">Není k dispozici</string> + <string name="load_runtime">Linuxový runtime</string> + <string name="load_runtime_detail">Příprava Linuxového runtime</string> + <string name="load_session">Relace</string> + <string name="load_session_detail">Spouštění obrazu a zvuku</string> + <string name="load_steam">Klient Steam</string> + <string name="load_steam_detail">Kontrola Steamu a jeho nástrojů kompatibility</string> + <string name="load_opening_steam">Otevírání Steamu</string> + <string name="load_opening_steam_detail">Čekání na první snímek Steamu</string> + <string name="load_desktop">Desktop</string> + <string name="load_desktop_detail">Příprava desktopu</string> + <string name="load_opening">Otevírání</string> + <string name="load_opening_detail">Čekání na první snímek</string> + <string name="load_starting_steam">Spouštění Steamu</string> + <string name="load_ended">Relace skončila</string> + <string name="load_step">Krok %1$d z %2$d</string> + <string name="load_steam_paused">Steam je na pauze</string> + <string name="deck_tab_grips">Rukojeti</string> + <string name="deck_tab_left">Levý panel</string> + <string name="deck_tab_right">Pravý panel</string> + <string name="deck_tab_both">Oba</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Páčka</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Přepnout mezi páčkou a trackpadem</string> + <string name="deck_more_controls">Další ovládání Deck</string> + <string name="deck_panels">PANELY</string> + <string name="deck_close">Zavřít ovládání druhé obrazovky</string> + <string name="deck_open_steam_menu">Otevřít nabídku Steamu</string> + <string name="deck_left_upper">Levý · horní</string> + <string name="deck_left_lower">Levý · dolní</string> + <string name="deck_right_upper">Pravý · horní</string> + <string name="deck_right_lower">Pravý · dolní</string> + <string name="deck_click">Kliknutí</string> + <string name="deck_right_trackpad">Pravý trackpad</string> + <string name="deck_left_trackpad">Levý trackpad</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Zobrazit klávesnici</string> + <string name="second_hide_keyboard">Skrýt klávesnici</string> + <string name="second_terminal">Terminál Linuxu</string> + <string name="second_terminal_not_ready">Relace Linuxu ještě není připravena na terminál.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Hry</string> + <string name="rail_desktop">Plocha</string> + <string name="rail_store">Obchod</string> + <string name="rail_components">Komponenty</string> + <string name="rail_apps">Aplikace</string> + <string name="rail_setup">Příprava</string> + <string name="rail_updates">Aktualizace</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Obnovit %1$s</string> + <string name="roms_text">V každé relaci se zobrazí jako /root/ROMs. Vnitřní úložiště je v /root/Storage.</string> + <string name="roms_none">Nevybrána žádná složka</string> + <string name="roms_applies">Použije se v další relaci. SD karty fungují.</string> + <string name="roms_choose">Vybrat složku</string> + <string name="roms_change">Změnit složku</string> + <string name="proton_lede">Nainstalujte sestavení Protonu pro ARM64 a pak ho vyberte pro konkrétní hru v Steamu → Vlastnosti → Kompatibilita.</string> + <string name="proton_stop_first">Pro instalaci nebo odstranění nástroje kompatibility zastavte běžící relaci.</string> + <string name="proton_available">Dostupná sestavení</string> + <string name="proton_installed">Nainstalováno %1$s</string> + <string name="proton_queued">Čeká z dřívějšího požadavku</string> + <string name="proton_not_installed">Není nainstalováno</string> + <string name="proton_update_available">Dostupná aktualizace → %1$s</string> + <string name="proton_remove_older">Odstranit staré verze %1$s</string> + <string name="proton_remove_older_body">Odstraní %1$s. Hry nastavené na tyto verze je nutné přepnout na jiný Proton.</string> + <string name="proton_remove_body">Hry nastavené na tuto verzi je nutné přepnout na jiný Proton.</string> + <string name="proton_install_now">Instalovat nyní</string> + <string name="proton_cancel_queued">Zrušit čekající</string> + <string name="pckb_android">Klávesnice Androidu</string> + <string name="pckb_hide">Skrýt ✕</string> + <string name="main_launch_named">Spustit %1$s</string> + <string name="main_choose_screen">Vyberte obrazovku. Druhá: %1$s.</string> + <string name="main_secondary_gone">Druhá obrazovka už není dostupná.</string> + <string name="main_primary">Hlavní obrazovka</string> + <string name="main_secondary">Druhá obrazovka</string> + <string name="widgets_prev_tab">Předchozí karta</string> + <string name="widgets_next_tab">Další karta</string> + <string name="widgets_on">Zapnuto</string> + <string name="widgets_all_n">Vše %1$d</string> + <string name="widgets_none">Žádné</string> + <string name="widgets_n_of_m">%1$d z %2$d</string> + <string name="widgets_off">Vypnuto</string> + <string name="screen_bottom">Spodní obrazovka</string> + <string name="game_env_applies">Použije se při dalším spuštění hry. Profil hry má přednost před společným.</string> + <string name="game_env_other">Jiná hra podle ID aplikace…</string> + <string name="game_env_done">Hotovo</string> + <string name="game_env_default">Výchozí</string> + <string name="game_env_off">Vypnuto</string> + <string name="game_env_change">Změnit…</string> + <string name="game_env_change_title">Změnit proměnnou</string> + <string name="game_env_restore_default">Zpět na výchozí</string> + <string name="game_env_eyebrow">Hry přes Proton</string> + <string name="pip_title">Obraz v obraze</string> + <string name="pip_auto">Automaticky přejít do PiP</string> + <string name="unfolded_controls">Ovládání na rozložené obrazovce</string> + <string name="unfolded_controls_hint">Po rozložení je hra zobrazena nad trackpady a zadními rukojeťmi Steam Decku. Po složení je hra na celou obrazovku.</string> + <string name="pip_suspended">Pozastaveno</string> + <string name="pip_not_ready">Obraz v obraze bude dostupný, jakmile bude relace připravena.</string> + <string name="pip_permission">Povolte obraz v obraze pro DroidDeck v nastavení Androidu.</string> + <string name="pip_unavailable">Android nemohl otevřít obraz v obraze.</string> + <string name="game_shortcut">Zkratka</string> + <string name="game_shortcut_add">Přidat na domovskou obrazovku</string> + <string name="game_shortcut_choose">Vybrat hru</string> + <string name="game_shortcut_scanning">Vyhledávání nainstalovaných her…</string> + <string name="game_link_copy">Kopírovat odkaz pro spuštění</string> + <string name="game_link_copied">Odkaz pro spuštění zkopírován</string> + <string name="game_shortcut_unsupported">Tento spouštěč neumí přidávat zkratky. Použijte místo toho Kopírovat odkaz pro spuštění.</string> + <string name="game_link_invalid">Neplatný odkaz pro spuštění hry.</string> + <string name="game_link_missing">Tato hra už není ve vaší knihovně DroidDeck.</string> + <string name="game_link_session_busy">Před spuštěním hry ze Steamu zastavte aktuální relaci.</string> + <string name="game_link_failed">Hru se nepodařilo odeslat do Steamu. Zkuste ji spustit znovu.</string> + <string name="setup_retry_removal">Zkusit odstranění znovu</string> + <string name="runtime_removing">Odstraňování</string> + <string name="runtime_removal_incomplete">Odstranění nedokončeno</string> + <string name="game_file_export">Exportovat soubor hry</string> + <string name="game_file_sync">Synchronizovat všechny soubory her do složky</string> + <string name="game_file_stop_sync">Zastavit synchronizaci souborů her</string> + <string name="game_file_folder">Vybrat složku pro soubory her frontendu</string> + <string name="game_file_exported">Soubory hry uloženy do %1$s</string> + <string name="game_frontend_files">Soubory frontendu</string> + + <string name="main_wait_runtime">Počkejte, až skončí operace s runtime</string> + <string name="main_wait_proton_install">Počkejte, až skončí instalace nástroje kompatibility</string> + <string name="main_wait_desktop_install">Počkejte, až skončí instalace plochy</string> + <string name="main_wait_install_game">Před spuštěním hry počkejte, až skončí instalace</string> + <string name="main_saves_close_session">Nejprve zavřete relaci Steamu, aby hra svým uložením nepřepsala import.</string> + <string name="main_saves_importing">Importování do %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Importován %1$d soubor z %2$s do %3$s</item> + <item quantity="few">Importovány %1$d soubory z %2$s do %3$s</item> + <item quantity="many">Importováno %1$d souborů z %2$s do %3$s</item> + <item quantity="other">Importováno %1$d souborů z %2$s do %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Importován %1$d soubor z %2$s do %3$s. Staré uložené pozice byly zálohovány do Download/DroidDeck/Saves/backups</item> + <item quantity="few">Importovány %1$d soubory z %2$s do %3$s. Staré uložené pozice byly zálohovány do Download/DroidDeck/Saves/backups</item> + <item quantity="many">Importováno %1$d souborů z %2$s do %3$s. Staré uložené pozice byly zálohovány do Download/DroidDeck/Saves/backups</item> + <item quantity="other">Importováno %1$d souborů z %2$s do %3$s. Staré uložené pozice byly zálohovány do Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Vyberte ZIP s uloženou pozicí pro %1$s</string> + <string name="main_saves_exporting">Exportování %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Exportován %1$d soubor jako %2$s: %3$s</item> + <item quantity="few">Exportovány %1$d soubory jako %2$s: %3$s</item> + <item quantity="many">Exportováno %1$d souborů jako %2$s: %3$s</item> + <item quantity="other">Exportováno %1$d souborů jako %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Vyberte, kam uložit %1$s (%2$s)</string> + <string name="main_action_failed">%1$s se nezdařilo: %2$s</string> + <string name="main_no_logs_yet">Zatím žádné logy relace: nejprve spusťte relaci.</string> + <string name="main_no_logs_to_clear">Žádné logy relace k vymazání.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Vyčištěna %1$d složka s logy relace.</item> + <item quantity="few">Vyčištěny %1$d složky s logy relace.</item> + <item quantity="many">Vyčištěno %1$d složek s logy relace.</item> + <item quantity="other">Vyčištěno %1$d složek s logy relace.</item> + </plurals> + <string name="main_wadb_pair_failed">Párování bezdrátového ladění se nezdařilo</string> + <string name="main_wadb_command_failed">Příkaz bezdrátového ladění se nezdařil</string> + <string name="main_wadb_unavailable">Bezdrátové ladění není k dispozici</string> + <string name="main_adb_copied">Příkaz ADB zkopírován</string> + <string name="main_pick_roms">Vybrat složku ROMs</string> + <string name="main_non_adreno_title">Není GPU Adreno</string> + <string name="main_non_adreno_text">Turnip podporuje GPU Adreno. Na %1$s může Steam zobrazit černou obrazovku. Stažení: %2$.0f MB.</string> + <string name="main_install_anyway">Přesto instalovat</string> + <string name="main_remove_runtime_title">Odstranit runtime Linuxu</string> + <string name="main_remove_runtime_text">Tím se odstraní runtime, klient Steam v něm a všechny hry v něm nainstalované.</string> + <string name="main_applied">Použito: %1$s</string> + <string name="android_app_open_failed_primary">Nepodařilo se otevřít %1$s na hlavní obrazovce</string> + <string name="android_app_open_failed_on">Nepodařilo se otevřít %1$s na %2$s</string> + <string name="android_app_open_failed_display">Nepodařilo se otevřít %1$s na obrazovce %2$d</string> + <string name="comp_busy_importing">Importování</string> + <string name="comp_busy_swapping">Přepínání</string> + <string name="comp_busy_restoring">Obnovování</string> + <string name="comp_busy_cancelling">Rušení</string> + <string name="comp_busy_deleting">Mazání</string> + <string name="comp_cannot_read">soubor nelze přečíst</string> + <string name="comp_imported">Importováno %1$s</string> + <string name="comp_swap_cancelled">Čekající přepnutí bylo zrušeno.</string> + <string name="comp_pick_wcp">Vybrat balíček komponenty (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nepodařilo se spojit s Nightlies</string> + <string name="comp_stored">Uloženo %1$s</string> + <string name="comp_download_failed">Stažení se nezdařilo: %1$s</string> + <string name="drivers_pick_linux">Vybrat ovladač runtime Linuxu (ZIP -Linux nebo balíček Android + Linux)</string> + <string name="drivers_pick_android">Vybrat ovladač zobrazení (ZIP AdrenoTools nebo balíček Android + Linux)</string> + <string name="drivers_pick_any">Vybrat ZIP s ovladačem nebo balíček Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Odstraňování %1$s…</string> + <string name="main_forgetting_named">Zapomínání %1$s…</string> + <string name="main_pick_game_storage">Vybrat složku úložiště her</string> + <string name="main_pick_decky_zip">Vybrat ZIP s pluginem Decky</string> + <string name="main_storage_not_usable">Nepoužitelné: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Odstraňování runtime Linuxu</string> + <string name="main_settings_main_screen">Nepodařilo se otevřít Nastavení na spodní obrazovce; otevřelo se na hlavní obrazovce.</string> + <string name="main_open_dev_options">Otevřít Možnosti pro vývojáře v Nastavení</string> + + <string name="upd_unknown_apps_failed">Nepodařilo se otevřít nastavení Androidu „Instalace neznámých aplikací“</string> + <string name="upd_couldnt_check">Nepodařilo se zkontrolovat: %1$s</string> + <string name="upd_no_download">Toto sestavení nemá stažení pro tuto kopii DroidDecku</string> + <string name="upd_stop_first">Nejprve zastavte běžící relaci, pak aktualizujte</string> + <string name="upd_stage_downloading">Stahování</string> + <string name="upd_stage_installing">Instalování</string> + <string name="upd_stage_confirm">Čeká na vaše potvrzení</string> + <string name="upd_failed">Aktualizace se nezdařila</string> + <string name="upd_not_offered">Android nenabídl instalaci aktualizace</string> + + <string name="decky_install_failed">Instalace Decky se nezdařila: %1$s</string> + <string name="decky_plugin_starting">Spouštění importu pluginu…</string> + <string name="decky_plugin_failed">Import pluginu se nezdařil: %1$s</string> + <string name="decky_plugin_installed">Plugin nainstalován. Restartujte Steam, aby se načetl.</string> + + <string name="drivers_not_checked">Zatím nezkontrolováno - klepnutím na obnovit vyhledáte nové ovladače</string> + <string name="drivers_bundle_sets_display">Android + Linux: zároveň nastaví ovladač zobrazení</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: zároveň nastaví ovladač runtime</string> + <string name="drivers_runtime_builtin">Turnip vestavěný v runtime</string> + <string name="drivers_system_vulkan">systémový Vulkan: pro toto GPU není přibalené sestavení</string> + <string name="drivers_bundled">%1$s (přibalený)</string> + <string name="drivers_manual">Manuální</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Právě je zveřejněna jen jedna polovina</string> + <string name="drivers_pair_size">%1$.0f MB za oba</string> + <string name="drivers_none_to_set">Žádné ovladače k nastavení: %1$s</string> + <string name="drivers_checking_latest">Vyhledávání nejnovějších ovladačů…</string> + <string name="drivers_up_to_date_check_failed">Aktuální (nepodařilo se zkontrolovat: %1$s)</string> + <string name="drivers_recommended_unpublished">Doporučené ovladače nejsou právě zveřejněné</string> + <string name="drivers_downloading_pair">Stahování %1$s %2$s…</string> + <string name="drivers_updated_to">Aktualizováno na %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Aktualizováno na %1$s %2$s. Ovladač zobrazení se použije po restartu DroidDecku.</string> + <string name="drivers_auto_waits_for_session">Aktualizace ovladačů počkají, až se relace zastaví.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s se stáhne, jakmile opustíš mobilní data a spořič baterie.</string> + <string name="drivers_skipping_bad">%1$s %2$s tady nespustil relaci, takže Automaticky zůstává u ovladačů, které ano.</string> + <string name="drivers_rolled_back">%1$s dvakrát nespustil relaci, takže Automaticky se vrátil k ovladačům, které fungovaly.</string> + <string name="drivers_switched_to">Přepnuto na %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Přepnuto na %1$s %2$s. Ovladač zobrazení se použije po restartu DroidDecku.</string> + <string name="drivers_using">Používá se %1$s %2$s.</string> + <string name="drivers_using_restart">Používá se %1$s %2$s. Ovladač zobrazení se použije po restartu DroidDecku.</string> + <string name="drivers_using_quest">Používá se přibalený obrazový ovladač pro Quest a výchozí prostředí.</string> + <string name="drivers_using_quest_restart">Používá se přibalený obrazový ovladač pro Quest a výchozí prostředí. Obrazový ovladač platí po restartu DroidDeck.</string> + <string name="drivers_not_a_driver">Toto není ZIP s ovladačem: ani ovladač AdrenoTools, ani Turnip -Linux, ani balíček Android + Linux</string> + <string name="drivers_import_failed">Import se nezdařil: %1$s</string> + <string name="drivers_imported_unnamed">Importovaný ovladač</string> + <string name="drivers_using_bundle">%1$s se používá jako ovladač runtime i zobrazení.</string> + <string name="drivers_using_bundle_restart">%1$s se používá jako ovladač runtime i zobrazení. Ovladač zobrazení se použije po restartu DroidDecku.</string> + <string name="drivers_deleted_bundle">Odstraněno %1$s (oba ovladače)</string> + <string name="drivers_deleted">Odstraněno %1$s</string> + <string name="drivers_release_status">Nejnovější: %1$s · zkontrolováno %2$s</string> + <string name="drivers_release_status_failed">Nejnovější: %1$s · %2$s nedostupné · zkontrolováno %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">před %1$d min</item> + <item quantity="few">před %1$d min</item> + <item quantity="many">před %1$d min</item> + <item quantity="other">před %1$d min</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">před %1$d h</item> + <item quantity="few">před %1$d h</item> + <item quantity="many">před %1$d h</item> + <item quantity="other">před %1$d h</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">před %1$d dnem</item> + <item quantity="few">před %1$d dny</item> + <item quantity="many">před %1$d dny</item> + <item quantity="other">před %1$d dny</item> + </plurals> + <string name="drivers_checking_sources">Kontrola Banners-Turnip, WinNative a DroidDeck…</string> + <string name="drivers_check_failed">kontrola se nezdařila</string> + <string name="drivers_installed_pick_either">Nainstalováno %1$s - vyberte ho v kterémkoli seznamu pro nastavení obou ovladačů</string> + <string name="drivers_installed_pick">Nainstalováno %1$s - vyberte ho v nabídce</string> + + <string name="session_wait_removal">Počkejte, až skončí odstranění runtime</string> + <string name="session_title_game">Hra</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">přímý</string> + <string name="session_swap_failed">Přepnutí se nezdařilo: %1$s</string> + <string name="session_profile_save_failed">Uložení profilu se nezdařilo: %1$s</string> + <string name="session_desktop_paused">Plocha je na pauze</string> + <string name="session_named_paused">%1$s je na pauze</string> + <string name="session_program_paused">Program je na pauze</string> + <string name="session_starting_desktop">Spouštění plochy</string> + <string name="session_starting_named">Spouštění %1$s</string> + <string name="session_starting_program">Spouštění programu</string> + <string name="session_no_logs">Pro tuto relaci nejsou žádné logy.</string> + <string name="session_logs_archive_failed">Nepodařilo se vytvořit archiv logů relace.</string> + <string name="session_logs_share_failed">Nepodařilo se sdílet logy relace.</string> + <string name="session_starting_session">Spouštění relace…</string> + <string name="session_runtime_downloading">stahování runtime Linuxu</string> + <string name="session_runtime_downloading_mb">stahování runtime Linuxu · %1$d z %2$d MB</string> + <string name="session_runtime_checking">kontrola runtime Linuxu</string> + <string name="session_runtime_unpacking">rozbalování runtime Linuxu</string> + <string name="session_desktop_downloading">stahování plochy</string> + <string name="session_desktop_downloading_mb">stahování plochy · %1$d z %2$d MB</string> + <string name="session_desktop_checking">kontrola plochy</string> + <string name="session_desktop_unpacking">rozbalování plochy</string> + <string name="session_proton_downloading">stahování Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">stahování Proton Experimental (ARM64) · %1$d z %2$d MB</string> + <string name="session_proton_checking">kontrola Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">rozbalování Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Nepodařilo se spojit s katalogem runtime. Zkontrolujte připojení a znovu stiskněte Hrát.</string> + <string name="session_runtime_install_failed">Runtime Linuxu se nenainstaloval. Zkontrolujte runtime v Přípravě a znovu stiskněte Hrát.</string> + <string name="session_desktop_install_failed">Plocha se nenainstalovala (%1$s). Zkontrolujte připojení a znovu stiskněte Plocha.</string> + <string name="session_ended_named">Došlo k neočekávanému zastavení %1$s. Přiložte logy k hlášení chyby, nebo zkuste znovu.</string> + <string name="session_ended_program">Program neočekávaně skončil. Přiložte logy k hlášení chyby, nebo zkuste znovu.</string> + <string name="session_ended_desktop">Plocha neočekávaně skončila. Přiložte logy k hlášení chyby, nebo zkuste znovu.</string> + <string name="session_ended_detail">Návratový kód %1$d · %2$s</string> + <string name="session_ended_no_log">žádný log</string> + <plurals name="session_hint_enosys"> + <item quantity="one">V logu je %1$d chyba „Function not implemented“: akcelerace seccomp v proot zde selhává u pomocné funkce na tomto zařízení. Zkuste %2$s → „%3$s“ (nebo „%4$s“) a spusťte to znovu.</item> + <item quantity="few">V logu jsou %1$d chyby „Function not implemented“: akcelerace seccomp v proot zde selhává u pomocné funkce na tomto zařízení. Zkuste %2$s → „%3$s“ (nebo „%4$s“) a spusťte to znovu.</item> + <item quantity="many">V logu je %1$d chyb „Function not implemented“: akcelerace seccomp v proot zde selhává u pomocné funkce na tomto zařízení. Zkuste %2$s → „%3$s“ (nebo „%4$s“) a spusťte to znovu.</item> + <item quantity="other">V logu je %1$d chyb „Function not implemented“: akcelerace seccomp v proot zde selhává u pomocné funkce na tomto zařízení. Zkuste %2$s → „%3$s“ (nebo „%4$s“) a spusťte to znovu.</item> + </plurals> + + <string name="mode_decky_plugins">Pluginy</string> + <string name="mode_decky_plugins_hint">Nainstalujte ZIP s pluginem pro další relaci Steamu.</string> + <string name="mode_decky_plugin_downloading">Stahování…</string> + <string name="mode_decky_plugin_install_zip">Instalovat ze ZIP</string> + <string name="store_cat_games">Hry</string> + <string name="store_cat_audio_video">Zvuk a video</string> + <string name="store_cat_graphics">Grafika</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Kancelář</string> + <string name="store_cat_developer">Vývoj</string> + <string name="store_cat_education">Vzdělávání</string> + <string name="store_cat_science">Věda</string> + <string name="store_cat_system">Systém</string> + <string name="store_cat_utilities">Nástroje</string> + <string name="store_section_popular">Populární</string> + <string name="store_section_trending">Trendy</string> + <string name="store_section_new">Novinky</string> + <string name="store_section_updated">Aktualizováno</string> + <string name="store_section_loading">načítání…</string> + <string name="store_flatpak_setup">Nastavení Flatpaku</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Nepodařilo se zkontrolovat aktualizace na Flathubu</string> + <string name="content_rom_installed">nainstalováno</string> + <string name="content_rom_folder">složka</string> + <string name="theme_graphite">Grafit</string> + <string name="theme_graphite_detail">Grafitové povrchy, s modrou barvou kuličky z loga pro vše vybrané, zaměřené nebo stisknuté.</string> + <string name="theme_paper">Papír na černém</string> + <string name="theme_paper_detail">Hlavní je bílá, modrá z ikony značí linky, kroužky a body.</string> + <string name="theme_icon_blue">Modrá z ikony</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Nejprve nainstalujte runtime</string> + <string name="game_sync_err_steam_library">Knihovna Steamu není dostupná</string> + <string name="game_sync_err_previous_sd">Předchozí knihovna na SD kartě není dostupná</string> + <string name="game_sync_err_game_storage">Úložiště her není dostupné</string> + <string name="game_sync_err_added_games">Složka přidaných her není dostupná</string> + <string name="game_sync_err_manifests">Manifesty Steamu nejsou dostupné</string> + <string name="content_system_many">Mnoho systémů</string> + <string name="fm_drive_internal">Interní</string> + <string name="fm_drive_linux">Systém Linuxu</string> + <string name="fm_drive_sd">SD karta</string> + <string name="fm_drive_storage">Úložiště</string> + <string name="fm_select">Vybrat</string> + <string name="fm_properties">Vlastnosti</string> + <string name="fm_favorite_add">Přidat do oblíbených</string> + <string name="fm_favorite_remove">Odebrat z oblíbených</string> + <string name="fm_rename">Přejmenovat</string> + <string name="fm_copy">Kopírovat</string> + <string name="fm_cut">Vyjmout</string> + <string name="fm_actions">Akce</string> + <string name="fm_favorites">Oblíbené</string> + <string name="fm_pin_current">Připnout aktuální složku</string> + <string name="fm_no_favorites">Zatím žádné oblíbené - připněte složku pomocí jejího menu ⋮ a rychle se sem vrátíte.</string> + <string name="fm_unpin_favorite">Odebrat z oblíbených</string> + <string name="fm_size_zero">0 bajtů</string> + <string name="fm_unit_bytes">bajtů</string> + <string name="fm_prop_location">Umístění</string> + <string name="fm_prop_type">Typ</string> + <string name="fm_prop_size">Velikost</string> + <string name="fm_prop_modified">Změněno</string> + <string name="fm_type_folder">Složka</string> + <string name="fm_type_file">Soubor</string> + <string name="fm_type_ext_file">Soubor %1$s</string> + <string name="fm_read_only">Jen pro čtení</string> + <string name="fm_read_only_hint">Zabrání hrám (a Wine) přepsat nebo smazat tento soubor.</string> + <string name="fm_read_only_failed">Nepodařilo se změnit Jen pro čtení</string> + <string name="fm_hidden">Skryté</string> + <string name="fm_hidden_unsupported">Toto úložiště neumí uložit příznak skrytí.</string> + <string name="fm_hidden_hint">Označí soubor jako skrytý ve Windows (atribut skrytí Wine).</string> + <string name="fm_hidden_failed">Nepodařilo se změnit Skryté na tomto úložišti</string> + <string name="fm_done">Hotovo</string> + <string name="fm_op_deleting">Mazání...</string> + <string name="fm_delete_failed">Smazání se nezdařilo</string> + <string name="fm_op_moving">Přesouvání...</string> + <string name="fm_op_copying">Kopírování...</string> + <string name="fm_op_moving_item">Přesouvání - %1$s</string> + <string name="fm_op_copying_item">Kopírování - %1$s</string> + <string name="fm_op_moving_batch">Přesouvání %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Kopírování %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d hotovo, %2$d se nezdařilo</string> + <string name="fm_paste_skipped">%1$d hotovo, %2$d vynecháno</string> + <plurals name="fm_paste_moved"> + <item quantity="one">Přesunuta %1$d položka</item> + <item quantity="few">Přesunuty %1$d položky</item> + <item quantity="many">Přesunuto %1$d položek</item> + <item quantity="other">Přesunuto %1$d položek</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">Zkopírována %1$d položka</item> + <item quantity="few">Zkopírovány %1$d položky</item> + <item quantity="many">Zkopírováno %1$d položek</item> + <item quantity="other">Zkopírováno %1$d položek</item> + </plurals> + <string name="fm_already_exists">„%1$s“ už existuje</string> + <string name="fm_op_renaming">Přejmenovávání...</string> + <string name="fm_rename_failed">Přejmenování se nezdařilo</string> + <string name="fm_op_creating_folder">Vytváření složky...</string> + <string name="fm_create_folder_failed">Nepodařilo se vytvořit složku</string> + <string name="fm_new_folder">Nová složka</string> + <string name="fm_folder_name">Název složky</string> + <string name="fm_create">Vytvořit</string> + <string name="fm_new_name">Nový název</string> + <string name="fm_delete_title">Smazat?</string> + <string name="fm_delete_text">Trvale smazat „%1$s“?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Smazat %1$d položku?</item> + <item quantity="few">Smazat %1$d položky?</item> + <item quantity="many">Smazat %1$d položek?</item> + <item quantity="other">Smazat %1$d položek?</item> + </plurals> + <string name="fm_cannot_undo">Tuto akci nelze vzít zpět.</string> + <plurals name="fm_and_more"> + <item quantity="one">…a %1$d další</item> + <item quantity="few">…a %1$d další</item> + <item quantity="many">…a %1$d dalších</item> + <item quantity="other">…a %1$d dalších</item> + </plurals> + <string name="fm_op_deleting_batch">Mazání %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">Nepodařilo se smazat %1$d položku</item> + <item quantity="few">Nepodařilo se smazat %1$d položky</item> + <item quantity="many">Nepodařilo se smazat %1$d položek</item> + <item quantity="other">Nepodařilo se smazat %1$d položek</item> + </plurals> + <string name="fm_conflict_merge_hint">Sloučení přidá a nahradí soubory uvnitř stávající složky.</string> + <string name="fm_conflict_overwrite_hint">Přepsání nahradí existující soubor.</string> + <string name="fm_conflict_apply_all">Použít pro všechny konflikty</string> + <string name="fm_conflict_merge">Sloučit</string> + <string name="fm_conflict_overwrite">Přepsat</string> + <string name="fm_conflict_keep_both">Zachovat obojí</string> + <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_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> + <string name="fm_search">Hledat</string> + <string name="fm_sort">Seřadit</string> + <string name="fm_sort_name">Název</string> + <string name="fm_sort_date">Datum změny</string> + <string name="fm_rows_comfortable">Pohodlné řádky</string> + <string name="fm_rows_compact">Kompaktní řádky</string> + <string name="fm_hide_hidden">Skrýt skryté soubory</string> + <string name="fm_show_hidden">Zobrazit skryté soubory</string> + <string name="fm_hide_favorites">Skrýt oblíbené</string> + <string name="fm_show_favorites">Zobrazit oblíbené</string> + <string name="fm_filter_folder">Filtrovat tuto složku</string> + <string name="fm_free_space">Volné %1$s</string> + <string name="fm_selected_count">%1$d vybráno</string> + <string name="fm_select_none">Žádné</string> + <string name="fm_select_all">Vše</string> + <string name="fm_paste">Vložit</string> + <plurals name="fm_items"> + <item quantity="one">%1$d položka</item> + <item quantity="few">%1$d položky</item> + <item quantity="many">%1$d položek</item> + <item quantity="other">%1$d položek</item> + </plurals> + <string name="fm_paste_here">Vložit %1$s sem</string> + <string name="fm_paste_move_here">Vložit %1$s (přesunout) sem</string> + <string name="fm_rail_title">Soubory</string> + <string name="fm_rail_storage">ÚLOŽIŠTĚ</string> + <string name="fm_rail_quick">RYCHLÉ</string> + <string name="fm_rail_favorites">OBLÍBENÉ</string> + <string name="fm_rail_downloads">Stažené</string> + <string name="fm_rail_downloads_short">Stažené</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Logy relace</string> + <string name="fm_rail_pictures">Obrázky</string> + <string name="fm_favorite_added">„%1$s“ přidáno do oblíbených</string> + <string name="fm_favorite_removed">„%1$s“ odebráno z oblíbených</string> + <string name="fm_empty_directory">Prázdný adresář</string> + <string name="fm_up_one_level">O úroveň výš</string> + <string name="fm_choose_folder">Vybrat složku</string> + <string name="fm_choose_file">Vybrat soubor</string> + <string name="ctrl_tint_steam_blue">Steam modrá</string> + <string name="ctrl_tint_sky">Nebeská</string> + <string name="ctrl_tint_white">Bílá</string> + <string name="ctrl_tint_violet">Fialová</string> + <string name="ctrl_tint_green">Zelená</string> + <string name="ctrl_tint_amber">Ambrová</string> + <string name="ctrl_tint_red">Červená</string> + <string name="ctrl_tint_pink">Růžová</string> + <string name="ctrl_button_a">Tlačítko A</string> + <string name="ctrl_button_b">Tlačítko B</string> + <string name="ctrl_button_x">Tlačítko X</string> + <string name="ctrl_button_y">Tlačítko Y</string> + <string name="ctrl_button_lb">Levý bumper</string> + <string name="ctrl_button_rb">Pravý bumper</string> + <string name="ctrl_button_lt">Levý trigger</string> + <string name="ctrl_button_rt">Pravý trigger</string> + <string name="ctrl_button_view">Tlačítko View</string> + <string name="ctrl_button_menu">Tlačítko Menu</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad nahoru</string> + <string name="ctrl_target_down">D-pad dolů</string> + <string name="ctrl_target_left">D-pad vlevo</string> + <string name="ctrl_target_right">D-pad vpravo</string> + <string name="ctrl_target_hidden">Skryté</string> + <string name="ctrl_editor_drag">Přetažením přesunete</string> + <string name="ctrl_editor_snap">Přichytit</string> + <string name="ctrl_editor_save">Uložit</string> + <string name="second_mode_none">Žádný</string> + <string name="second_mode_keyboard_trackpad">Klávesnice + trackpad</string> + <string name="second_mode_terminal">Terminál</string> + <string name="second_mode_deck_controls">Rukojeti + trackpady Deck</string> + + <string name="rtinst_removing">Odstraňování runtime Linuxu</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Odstraňování runtime Linuxu · %1$d položka</item> + <item quantity="few">Odstraňování runtime Linuxu · %1$d položky</item> + <item quantity="many">Odstraňování runtime Linuxu · %1$d položek</item> + <item quantity="other">Odstraňování runtime Linuxu · %1$d položek</item> + </plurals> + <string name="rtinst_removed">Runtime Linuxu odstraněn</string> + <string name="rtinst_removal_failed">Nepodařilo se dokončit odstranění runtime Linuxu. Zkuste odstranění znovu v Přípravě.</string> + <string name="rtinst_removing_leftovers">Odstraňování zbytků runtime</string> + <string name="rtinst_downloading">Stahování</string> + <string name="rtinst_verifying">Ověřování</string> + <string name="rtinst_extracting">Rozbalování</string> + <string name="rtinst_channel_description">Zobrazuje se při instalaci nebo odstraňování runtime Linuxu</string> + <string name="rtinst_title_installing">Instalace runtime Linuxu</string> + <string name="rtinst_title_removing">Odstraňování runtime Linuxu</string> + + <string name="deskpkg_runtime_missing">Runtime Linuxu není nainstalován</string> + <string name="deskpkg_no_checksum">Katalog neobsahuje kontrolní součet pro %1$s</string> + <string name="deskpkg_checksum_mismatch">Neshoda kontrolního součtu - nic se nezměnilo</string> + <string name="deskpkg_installing">Instalování %1$s</string> + <string name="deskpkg_place_failed">Nepodařilo se umístit AppImage</string> + <string name="deskpkg_extract_failed">Rozbalení se nezdařilo</string> + <string name="deskpkg_install_failed">Instalace se nezdařila</string> + + <string name="flatpakmgr_setup_failed">Nastavení Flatpaku se nezdařilo (návratový kód %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Nastavení Flatpaku se nedokončilo</string> + <string name="flatpakmgr_busy">Běží jiná úloha obchodu</string> + <string name="flatpakmgr_not_ready">Nejprve nastavte Flatpak</string> + <string name="flatpakmgr_starting">Spouštění</string> + <string name="flatpakmgr_exit_status">Flatpak skončil s návratovým kódem %1$d</string> + <string name="flatpakmgr_installing">Instalování %1$s</string> + <string name="flatpakmgr_updating">Aktualizování %1$s</string> + <string name="flatpakmgr_removing">Odstraňování %1$s</string> + <string name="flatpakmgr_installing_step">Instalování %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Aktualizování %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Odstraňování %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">překlady</string> + <string name="flatpakmgr_ref_graphics_drivers">grafické ovladače</string> + <string name="flatpakmgr_ref_media_codecs">multimediální kodeky</string> + <string name="flatpakmgr_ref_runtime">runtime %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">runtime %1$s %2$s</string> + + <string name="appimg_too_small">Soubor je příliš malý na to, aby byl AppImage</string> + <string name="appimg_unreadable">Soubor nelze přečíst: %1$s</string> + <string name="appimg_not_linux">Toto není AppImage (nejde o program pro Linux)</string> + <string name="appimg_wrong_arch">Tento AppImage není sestaven ani pro ARM64 (aarch64), ani pro PC s x86</string> + <string name="appimg_not_appimage">Toto je program pro Linux, ale ne AppImage</string> + <string name="appimg_wrong_type">Importovat lze jen AppImage typu 2 (tento je typu %1$d)</string> + <string name="appimg_no_space_import">Nedostatek volného místa: import potřebuje přibližně %1$s</string> + <string name="appimg_no_space_update">Nedostatek volného místa: aktualizace potřebuje přibližně %1$s</string> + <string name="appimg_import_failed">Import se nezdařil</string> + <string name="appimg_gone">Tento AppImage už neexistuje</string> + <string name="appimg_update_failed">Aktualizace se nezdařila</string> + <string name="appimg_extracting">Rozbalování %1$s</string> + <string name="appimg_extract_failed">AppImage se nepodařilo rozbalit</string> + <string name="appimg_extract_failed_detail">AppImage se nepodařilo rozbalit: %1$s</string> + + <string name="deckymgr_stop_session_loader">Před instalací Decky Loader zastavte aktivní relaci</string> + <string name="deckymgr_download_failed">Stažení Decky Loader se nezdařilo</string> + <string name="deckymgr_size_mismatch">Velikost Decky Loader neodpovídala metadatům vydání</string> + <string name="deckymgr_checksum_download_failed">Nepodařilo se stáhnout kontrolní součet vydání</string> + <string name="deckymgr_checksum_missing">Chybí kontrolní součet vydání</string> + <string name="deckymgr_checksum_invalid">Kontrolní součet vydání je neplatný</string> + <string name="deckymgr_checksum_mismatch">Neshoda kontrolního součtu Decky Loader</string> + <string name="deckymgr_not_elf">Soubor vydání není kompatibilní 64bitový spustitelný soubor pro Linux</string> + <string name="deckymgr_session_started_loader">Během stahování se spustila relace; před instalací Decky Loader ji zastavte</string> + <string name="deckymgr_loader_not_executable">Nepodařilo se označit PluginLoader jako spustitelný</string> + <string name="deckymgr_cef_failed">Nepodařilo se povolit vzdálené ladění Steam CEF</string> + <string name="deckymgr_stage_failed">Nepodařilo se připravit PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Nepodařilo se zachovat stávající PluginLoader</string> + <string name="deckymgr_loader_activate_failed">Nepodařilo se aktivovat nový PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Před instalací pluginu zastavte aktivní relaci</string> + <string name="deckymgr_loader_required">Před importem pluginu nainstalujte Decky Loader</string> + <string name="deckymgr_zip_unreadable">Nepodařilo se přečíst vybraný soubor ZIP</string> + <string name="deckymgr_plugins_dir_failed">Nepodařilo se vytvořit adresář pluginů Decky</string> + <string name="deckymgr_extracting_zip">Rozbalování ZIP s pluginem</string> + <string name="deckymgr_zip_one_folder">ZIP s pluginem musí obsahovat jednu složku pluginu na nejvyšší úrovni</string> + <string name="deckymgr_zip_missing_files">V ZIP s pluginem chybí plugin.json, package.json nebo dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Chybí název pluginu</string> + <string name="deckymgr_session_started_plugin">Během instalace se spustila relace; před instalací pluginu ji zastavte</string> + <string name="deckymgr_plugin_installed">Plugin nainstalován · restartujte Steam, aby se načetl</string> + <string name="deckymgr_plugin_install_failed">Instalace ZIP s pluginem se nezdařila</string> + <string name="deckymgr_zip_too_many">ZIP s pluginem obsahuje příliš mnoho položek</string> + <string name="deckymgr_zip_invalid_path">ZIP s pluginem obsahuje neplatnou cestu</string> + <string name="deckymgr_zip_duplicate_paths">ZIP s pluginem obsahuje duplicitní cesty</string> + <string name="deckymgr_zip_unsafe_path">ZIP s pluginem obsahuje nebezpečnou cestu</string> + <string name="deckymgr_folder_failed">Nepodařilo se vytvořit složku pluginu</string> + <string name="deckymgr_zip_too_large">ZIP s pluginem po rozbalení přesáhne limit 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Nepodařilo se označit přibalený binární soubor pluginu jako spustitelný</string> + <string name="deckymgr_remote_entry_invalid">Neplatná položka remote_binary</string> + <string name="deckymgr_remote_name_invalid">Neplatný název vzdáleného binárního souboru</string> + <string name="deckymgr_remote_url_https">URL vzdáleného binárního souboru musí používat HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Vzdálený binární soubor %1$s má neplatný hash SHA-256</string> + <string name="deckymgr_bin_dir_failed">Nepodařilo se vytvořit adresář bin pluginu</string> + <string name="deckymgr_downloading_binary">Stahování binárního souboru pluginu · %1$s</string> + <string name="deckymgr_binary_download_failed">Nepodařilo se stáhnout binární soubor pluginu %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Neshoda kontrolního součtu binárního souboru pluginu · %1$s</string> + <string name="deckymgr_binary_not_executable">Nepodařilo se označit binární soubor pluginu jako spustitelný · %1$s</string> + <string name="deckymgr_binary_replace_failed">Nepodařilo se nahradit binární soubor pluginu · %1$s</string> + <string name="deckymgr_binary_install_failed">Nepodařilo se nainstalovat binární soubor pluginu · %1$s</string> + <string name="deckymgr_folder_taken">Složka pluginu patří jinému pluginu</string> + <string name="deckymgr_preserve_failed">Nepodařilo se zachovat stávající plugin</string> + <string name="deckymgr_activate_failed">Nepodařilo se aktivovat importovaný plugin</string> + <string name="deckymgr_settings_failed">Nepodařilo se aktualizovat nastavení pluginu Decky</string> + <string name="deckymgr_restore_failed">Nepodařilo se obnovit stávající plugin</string> + + <string name="adbfix_save_failed">Nepodařilo se uložit identitu bezdrátového ladění</string> + <string name="adbfix_command_failed">Příkaz ADB se nezdařil (%1$d)</string> + <string name="adbfix_not_confirmed">Android nepotvrdil změnu limitu procesů potomků: %1$s</string> + <string name="adbfix_no_pairing">Není uloženo žádné párování bezdrátového ladění</string> + <string name="adbfix_enter_address">Zadejte aktuální IP adresu a port bezdrátového ladění</string> + + <string name="adbpair_timed_out">Čekání na vyskakovací okno pro párování vypršelo. Zkuste to znovu z DroidDecku.</string> + <string name="adbpair_discovery_failed_code">Nepodařilo se vyhledat vyskakovací okno pro párování (%1$d). Zkontrolujte, že je zapnutá Wi-Fi.</string> + <string name="adbpair_discovery_failed">Nepodařilo se vyhledat vyskakovací okno pro párování: %1$s</string> + <string name="adbpair_six_digits">Zadejte všech 6 číslic kódu</string> + <string name="adbpair_pairing">Párování…</string> + <string name="adbpair_code_rejected">Tento kód nefungoval. Otevřete znovu vyskakovací okno pro párování a zadejte jeho nový kód.</string> + <string name="adbpair_connecting">Zpárováno. Připojování…</string> + <string name="adbpair_port_not_found">Zpárováno, ale port bezdrátového ladění nebyl nalezen. Ponechte bezdrátové ladění zapnuté a zkuste to znovu.</string> + <string name="adbpair_applying">Použití nastavení…</string> + <string name="adbpair_command_failed">Příkaz bezdrátového ladění se nezdařil</string> + <string name="adbpair_channel_name">Nastavení bezdrátového ladění</string> + <string name="adbpair_channel_description">Vyžádá kód pro párování bezdrátového ladění, dokud je otevřené Nastavení</string> + <string name="adbpair_title_pair">Zpárovat bezdrátové ladění</string> + <string name="adbpair_waiting_text">Zapněte bezdrátové ladění a pak klepněte na „Párování zařízení pomocí párovacího kódu“.</string> + <string name="adbpair_waiting_long">Zapněte bezdrátové ladění a pak klepněte na „Párování zařízení pomocí párovacího kódu“. Zůstaňte v Nastavení: kód se zobrazí v tomto oznámení.</string> + <string name="adbpair_code_label">6místný párovací kód</string> + <string name="adbpair_code_hint">Klepněte na Zadat kód a napište 6 číslic zobrazených v Nastavení.</string> + <string name="adbpair_title_code">Zadejte párovací kód Wi-Fi</string> + <string name="adbpair_title_retry">Zkusit kód znovu</string> + <string name="adbpair_enter_code">Zadat kód</string> + <string name="adbpair_title_working">Nastavování Steamu</string> + <string name="adbpair_title_done">Steam je připraven</string> + <string name="adbpair_done_text">Klepnutím se vrátíte do DroidDecku. Bezdrátové ladění teď můžete vypnout.</string> + <string name="adbpair_title_failed">Nastavení bezdrátového ladění bylo zastaveno</string> + + <string name="selfinst_download_failed">Stahování selhalo</string> + <string name="selfinst_size_mismatch">Velikost stahování neodpovídala zveřejněnému APK a bylo zahozeno - zkuste to znovu</string> + <string name="selfinst_checksum_mismatch">Stahování neodpovídalo svému kontrolnímu součtu a bylo zahozeno - zkuste to znovu</string> + <string name="selfinst_wrong_package">Aktualizace je pro balíček Androidu %1$s, ne %2$s</string> + <string name="selfinst_metadata_signer">Metadata aktualizace neuvádějí podpisový klíč vydání DroidDecku</string> + <string name="selfinst_unreadable">Android nemohl přečíst stažené APK</string> + <string name="selfinst_apk_wrong_package">Stažené APK je pro %1$s, ne %2$s</string> + <string name="selfinst_version_mismatch">Stažené APK uvádí versionCode %1$d, ne zveřejněný %2$d</string> + <string name="selfinst_downgrade">Android nenainstaluje versionCode %1$d přes nainstalovaný %2$d</string> + <string name="selfinst_no_signing">Stažené APK nemá žádné informace o podpisu</string> + <string name="selfinst_wrong_signer">Stažené APK není podepsáno vydávacím klíčem DroidDecku</string> + <string name="appupd_http">Katalog aktualizací odpověděl HTTP %1$d</string> + + <string name="loadstate_starting">Spouštění relace…</string> + <string name="loadstate_elapsed">%1$d:%2$02d uplynulo · stále pracuje</string> + <string name="loadstate_steam_update">Stahování aktualizace klienta Steam · %1$d%%</string> + <string name="loadstate_steam_client">Stahování klienta Steam · %1$s</string> + + <string name="pextra_busy">Instalace nástroje kompatibility už běží</string> + <string name="pextra_stop_session">Před instalací nástrojů kompatibility zastavte aktivní relaci</string> + <string name="pextra_no_release">Nepodařilo se najít vydání ARM64 pro %1$s</string> + <string name="pextra_no_space">Pro instalaci %1$s je potřeba alespoň 4 GB volného místa navíc k velikosti stahování</string> + <string name="pextra_downloading">Stahování %1$s %2$s</string> + <string name="pextra_retrying">Opakování stahování · pokus %1$d z %2$d</string> + <string name="pextra_interrupted">Stahování přerušeno</string> + <string name="pextra_download_failed">Stahování se nezdařilo; částečný soubor je zachován, aby mohl další pokus navázat</string> + <string name="pextra_too_big">Stahování překročilo velikost vydání a bylo odstraněno</string> + <string name="pextra_incomplete">Stahování nebylo dokončeno; částečný soubor je zachován pro navazující opakování</string> + <string name="pextra_verifying">Ověřování stahování</string> + <string name="pextra_checksum_unreadable">Nepodařilo se přečíst kontrolní součet vydání; zkuste to znovu</string> + <string name="pextra_no_checksum">%1$s %2$s nezveřejňuje kontrolní součet; nic se nenainstalovalo</string> + <string name="pextra_checksum_mismatch">Neshoda kontrolního součtu; stahování bylo odstraněno</string> + <string name="pextra_session_started">Během stahování se spustila relace; před instalací nástrojů kompatibility ji zastavte</string> + <string name="pextra_installing">Instalování %1$s</string> + <string name="pextra_install_failed">Instalace %1$s se nezdařila (návratový kód %2$d)</string> + <string name="pextra_could_not_install">Nepodařilo se nainstalovat %1$s</string> + <string name="esync_fetching">Stahování balíčku droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">s pomocnými nástroji pro Linux</string> + <string name="cmgr_fex_dlls_only">Jen DLL</string> + <string name="cmgr_original_proton_updated">Původní (Proton byl od posledního přepnutí aktualizován)</string> + <string name="cmgr_changed_outside">Změněno mimo Komponenty</string> + <string name="cmgr_not_present">není přítomno</string> + <string name="cmgr_original_version">Původní %1$s</string> + <string name="cmgr_original_from">Původní z %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s se přenese do %3$s, jakmile se zavře hra, která na něm běží.</string> + <string name="cmgr_swap_done">%1$s %2$s je teď v %3$s. Použije se při dalším spuštění hry.</string> + <string name="cmgr_original_missing">Tento původní balíček není uložen</string> + <string name="cmgr_restore_queued">%1$s z %2$s se vrátí na původní verzi, jakmile se zavře hra, která na něm běží.</string> + <string name="cmgr_restore_done">%1$s z %2$s bylo obnoveno z jeho původní verze %3$s.</string> + <string name="cmgr_package_in_use">%1$s se používá v %2$s. Nejprve ten Proton přepněte na něco jiného.</string> + <string name="cmgr_package_not_stored">%1$s není uloženo</string> + <string name="cmgr_deleted">Odstraněno %1$s.</string> + <string name="cmgr_original_kept">Původní verze nainstalovaného sestavení je zachována: je to cesta zpět.</string> + <string name="cmgr_not_stored">Není uloženo</string> + <string name="cmgr_deleted_original">Odstraněna původní verze %2$s z %1$s.</string> + <string name="cmgr_nightlies_only">Stahování pochází jen z vydání Nightlies</string> + <string name="cmgr_list_predates_checksums">Tento seznam balíčků předchází kontrolním součtům - obnovte ho a zkuste to znovu</string> + <string name="cmgr_checksum_mismatch">Neshoda kontrolního součtu</string> + + <string name="sprefs_upscaler_linear">Lineární</string> + <string name="sprefs_upscaler_nearest">Nejbližší</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (kvalita)</string> + <string name="sprefs_upscaler_sharpen">Jen zaostření</string> + <string name="sprefs_lod_bias_auto">Automaticky (podle škálování)</string> + + <string name="look_off_desc">Nic není použito.</string> + <string name="look_game_clarity">Herní jasnost</string> + <string name="look_game_clarity_desc">Zaostření s trochou kontrastu - ten každodenní.</string> + <string name="look_vivid">Sytý</string> + <string name="look_vivid_desc">Barvy vyhnané na maximum. Deband zapnutý, aby nebe nepruhovalo.</string> + <string name="look_cinematic">Kinematografický</string> + <string name="look_cinematic_desc">Hlubší kontrast, chladnější barvy, vyhlazené hrany.</string> + <string name="look_competitive">Soutěžní</string> + <string name="look_competitive_desc">Zvednuté stíny a silné zaostření - všimněte si lidí první.</string> + <string name="look_adaptive_sharpen">Adaptivní zaostření</string> + <string name="look_adaptive_sharpen_desc">Jen zaostření, barvy nedotčené.</string> + <string name="look_filmic">Filmový</string> + <string name="look_filmic_desc">Křivka připomínající film, lehce ztlumená.</string> + <string name="look_arcade">Arkáda</string> + <string name="look_arcade_desc">Křiklavé a výrazné.</string> + <string name="look_retro_crt">Retro CRT</string> + <string name="look_retro_crt_desc">Efekt CRT trubice a analogového signálu zároveň.</string> + <string name="look_upscale_sharp">Ostré zvětšení</string> + <string name="look_upscale_sharp_desc">Pro běh v rozlišení nižším než má displej.</string> + <string name="look_pixel_clean">Čisté pixely</string> + <string name="look_pixel_clean_desc">Ostré pixely pro 2D a staré hry.</string> + <string name="look_anime_edge">Anime hrany</string> + <string name="look_anime_edge_desc">Kreslené obrysy plus zaostření.</string> + + <string name="gpuinfo_not_adreno">Není GPU Adreno</string> + <string name="gpuinfo_supported">Podporováno</string> + <string name="gpuinfo_experimental">Experimentální: jeho ovladače jsou testovací sestavení</string> + <string name="gpuinfo_below_tested">Pod testovaným hardwarem (Adreno 725 a novější): nemusí fungovat</string> + <string name="gpuinfo_unsupported">Není podporováno: DroidDeck potřebuje GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Byl dosažen limit požadavků GitHubu - zkuste to později</string> + <string name="turnip_github_http">GitHub odpověděl HTTP %1$d</string> + <string name="turnip_download_failed">Stahování selhalo</string> + <string name="turnip_list_predates_checksums">Tento seznam ovladačů předchází kontrolním součtům - obnovte ho a zkuste to znovu</string> + <string name="turnip_checksum_mismatch">Neshoda kontrolního součtu - stahování bylo zahozeno</string> + <string name="turnip_not_adrenotools">Není ovladač AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">chybí meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json nelze přečíst (%1$s)</string> + <string name="turnip_reject_linux_driver">toto je ovladač runtime Linuxu (importujte ho v „Ovladač runtime Linuxu“)</string> + <string name="turnip_reject_wayland">toto je herní ovladač pro Wayland, který tato aplikace nepotřebuje</string> + <string name="turnip_reject_no_library_name">meta.json neuvádí libraryName, takže nic nemohlo být předáno AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json uvádí %1$s, který není v zipu</string> + <string name="turnip_reject_not_aarch64">%1$s není 64bitová sdílená knihovna ELF pro AArch64</string> + <string name="turnip_reject_glibc">%1$s odkazuje na glibc - jde o Turnip „-Linux“, který patří do „Ovladač runtime Linuxu“</string> + <string name="lvd_no_library">V tomto zipu není žádný libvulkan_freedreno*.so. ZIP Android (AdrenoTools) nebo -Wayland Turnip není ovladač runtime Linuxu.</string> + <string name="lvd_not_aarch64">%1$s není 64bitová sdílená knihovna ELF pro AArch64.</string> + <string name="lvd_not_glibc">%1$s není ovladač glibc - odkazuje na libc Androidu. Runtime Linuxu potřebuje zip „-Linux“; běžný nebo „-Wayland“ Turnip nemůže klient Steam vůbec načíst.</string> + <string name="bundle_no_manifest">Není balíček ovladačů: chybí manifest.json s názvy ovladače pro Android a Linux</string> + <string name="bundle_entry_outside">Není balíček ovladačů: %1$s odkazuje mimo něj</string> + <string name="bundle_too_large">Není balíček ovladačů: po rozbalení přesáhne %1$d MB</string> + + <string name="gstore_sd_card">SD karta</string> + <string name="gstore_folder">Složka</string> + + <string name="logshare_chooser">Sdílet logy relace</string> + + <string name="hdr_needs_android_10">vyžaduje Android 10 nebo novější (vrstvy displeje s barevným prostorem)</string> + <string name="hdr_none">tento displej neuvádí podporu HDR</string> + <string name="hdr_not_hdr10">tento displej podporuje %1$s, ne HDR10</string> + + <string name="gpu_this_gpu">toto GPU</string> + <string name="phantom_title_on">Limit procesů potomků je zapnutý</string> + <string name="phantom_title_unset">Limit procesů potomků není nastavený</string> + <string name="phantom_title_unreadable">Limit procesů potomků se nepodařilo zkontrolovat</string> + <string name="phantom_title_off">Limit procesů potomků je vypnutý</string> + <string name="phantom_title_not_required">Limit procesů potomků není vyžadován</string> + <string name="phantom_instructions_fix">%1$s Pokud to není možné, připojte toto zařízení k počítači s ADB a spusťte příkaz níže. Vraťte se sem a zkontrolujte to znovu.</string> + <string name="phantom_instructions_off">Relace Steamu se mohou spouštět.</string> + <string name="phantom_instructions_not_applicable">Tato verze Androidu tento limit nepoužívá.</string> + <string name="phantom_fix_toggle">Zapněte „Deaktivace omezení podřízených procesů“ v Možnostech pro vývojáře a pak je nechte zapnuté.</string> + <string name="phantom_fix_no_toggle">Tato verze Androidu pro to nemá přepínač. Použijte bezdrátové ladění a změňte to z tohoto zařízení.</string> + <string name="upd_block_no_apk">Toto sestavení nemá stažení pro tuto kopii DroidDecku.</string> + <string name="upd_block_version_code">Android to nenainstaluje přes toto sestavení, protože jeho versionCode %1$d je nižší než nainstalovaný %2$d.</string> + <string name="upd_fail_downgrade">Android nenainstaluje starší verzi přes novější. Zůstaňte na tomto sestavení, dokud kanál nedohoní.</string> + <string name="upd_fail_signature">Tato kopie DroidDecku je podepsána jinak (lokální sestavení?), takže ji Android nemůže aktualizovat na místě.</string> + <string name="upd_fail_storage">Na aktualizaci není dostatek volného místa.</string> + <string name="upd_fail_aborted">Aktualizace byla zrušena.</string> + <string name="upd_fail_with_message">Aktualizace se nenainstalovala: %1$s</string> + <string name="upd_fail_generic">Aktualizace se nenainstalovala.</string> + <string name="saves_layout_zip">%1$s zip</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s ještě nebylo spuštěno</string> + <string name="saves_none_found">Pro %1$s nebyly nalezeny žádné soubory uložených pozic</string> + <string name="saves_not_save_zip">%1$s neobsahuje složku drive_c, takže to není zip s uloženou pozicí z GameHub nebo Winlator</string> + <string name="gstore_cannot_create">nelze vytvářet složky v %1$s</string> + <string name="gstore_cannot_write">nelze zapisovat do %1$s</string> + <string name="gstore_cannot_write_detail">nelze zapisovat do %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Složka není dostupná</string> + <string name="gfiles_name_taken">Jiný soubor už používá %1$s</string> + <string name="gfiles_art_unavailable">Složka s obrázky není dostupná</string> + <string name="gfiles_unrelated_inventory">Složka obsahuje nesouvisející evidenci synchronizace</string> + <string name="gfiles_remove_failed">Nepodařilo se odstranit %1$s</string> + <string name="gfiles_outside_folder">Soubor opouští exportní složku</string> + <string name="cmgr_fex_unnamed">FEX (sestavení bez názvu verze)</string> + <string name="cmgr_no_profile">chybí profile.json v %1$s</string> + <string name="cmgr_not_component_package">%1$s není balíček komponenty pro Linux (typ %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s volných</string> + <string name="mode_storage_auto_short">Automaticky</string> + <string name="appupd_catalog_rejected">Katalog aktualizací neprošel kontrolou (%1$s)</string> + <string name="main_adb_clip_label">Nastavení procesů potomků DroidDecku</string> + <string name="setup_signed_in_offline_unnamed">Přihlášeno · offline režim</string> + <string name="setup_signed_in_unnamed">Přihlášeno</string> + <string name="driver_tag_bundled">PŘIBALENÝ</string> + <string name="driver_tag_downloaded">STAŽENÝ</string> + <string name="driver_tag_imported">IMPORTOVANÝ</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Obrazovka relace</string> + <string name="display_resolution">Rozlišení</string> + <string name="display_game_fit">Přizpůsobení hry 16:9</string> + <string name="display_game_fit_hint">Jak se hry s poměrem 16:9 přizpůsobí této obrazovce. Příští relace.</string> + <string name="display_game_fit_unavailable">Vyberte Podle obrazovky nebo vlastní velikost užší než 16:9.</string> + <string name="display_preserve">Zachovat proporce</string> + <string name="display_stretch">Roztáhnout na obrazovku</string> + <string name="display_image_scaling">Škálování obrazu</string> + <string name="display_filter">Filtr škálování</string> + <string name="display_filter_hint">Sdíleno Steamem a Plochou.</string> + <string name="display_filter_live">Použije se okamžitě. Sdíleno Steamem a Plochou.</string> + <string name="display_filter_note">FSR, GSR a NIS se použijí při zvětšování obrazu relace. Jen zaostření funguje i bez zvětšení.</string> + <string name="display_sharpness">Ostrost filtru</string> + <string name="display_frame_rate">Snímková frekvence</string> + <string name="display_look_filter">%1$s Nastaví škálování na %2$s.</string> + <string name="display_match_screen">Podle obrazovky (%1$d×%2$d)</string> + <string name="display_follow_screen">Sledovat obrazovku (změní velikost při složení nebo rozložení)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Zobrazit podrobnosti o zařízení</string> + <string name="device_info_hide">Skrýt podrobnosti o zařízení</string> + <string name="device_info_loading">Čtení zařízení…</string> + <string name="device_info_copy">Kopírovat</string> + <string name="device_info_copy_hint">Vlož tyto údaje do hlášení o chybě.</string> + <string name="device_info_copied">Zkopírováno.</string> + <string name="force_ssbs_title">Vynutit SSBS</string> + <string name="force_ssbs_hint">Udržuje zapnuté nastavení rychlosti CPU, které Wine stále vypíná. Může zrychlit Windows hry na Snapdragonu 8 Elite; na starších čipech je rozdíl malý. Použije se při příštím spuštění hry.</string> + + <string name="rail_stores">Obchody</string> + <string name="source_steam">Steam</string> + <string name="source_added">Vlastní</string> + <string name="setup_stores">Obchody</string> + <string name="setup_stores_open_on">Otevřít obchod na</string> + <string name="setup_stores_speed">Úroveň rychlosti stahování</string> + <string name="setup_stores_engine">Jádro obchodů</string> + <string name="setup_stores_engine_chip_ready">● Jádro je připraveno</string> + <string name="setup_stores_engine_chip_missing">Není sestaveno</string> + <string name="stores_tier_balanced">Vyvážené</string> + <string name="stores_tier_fast">Rychlé</string> + <string name="stores_tier_max">Maximální</string> + <string name="stores_title">Obchody</string> + <string name="stores_settings">Nastavení obchodů</string> + <string name="stores_settings_eyebrow">Nastavení</string> + <string name="stores_chip_signed_out">(nepřihlášen)</string> + <string name="stores_tab_store">Obchod</string> + <string name="stores_tab_installed">Nainstalované</string> + <string name="stores_tab_library">Knihovna</string> + <string name="stores_tab_all">Vše</string> + <string name="stores_tab_downloads">Stahování</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Přihlásit se</string> + <string name="stores_signout_named">%1$s · odhlásit</string> + <string name="stores_signout_title">Odhlásit se z %1$s?</string> + <string name="stores_signout_note">Nainstalované hry zůstanou. Knihovna se znovu stáhne po opětovném přihlášení.</string> + <string name="stores_signout_stay">Zůstat přihlášen</string> + <string name="stores_signout_go">Odhlásit se</string> + <string name="stores_search_catalog">Hledat v katalogu %1$s…</string> + <string name="stores_search_installed">Hledat v nainstalovaných hrách…</string> + <string name="stores_search_library">Hledat ve vaší knihovně…</string> + <string name="stores_search_open">Hledat</string> + <string name="stores_installed_empty">Nic není nainstalováno</string> + <string name="stores_library_loading">Načítání</string> + <string name="stores_nothing_matches">Žádné hry</string> + <string name="stores_shelves_loading">Načítání obchodu…</string> + <string name="stores_amazon_no_catalog">Žádný katalog</string> + <string name="stores_shelf_new">Novinky</string> + <string name="stores_shelf_deals">Nabídky</string> + <string name="stores_shelf_free">Hry zdarma</string> + <string name="stores_shelf_trending">Populární</string> + <string name="stores_shelf_library">Vaše knihovna</string> + <string name="stores_play">Hrát</string> + <string name="stores_install">Instalovat</string> + <string name="stores_resume_install">Pokračovat v instalaci</string> + <string name="stores_dl_interrupted">Přerušeno</string> + <string name="stores_install_size">Instalace · %1$s</string> + <string name="stores_get_free">Získat zdarma</string> + <string name="stores_view_on">Zobrazit na %1$s</string> + <string name="stores_buy_price">Koupit · %1$s</string> + <string name="stores_installed_chip">Nainstalováno</string> + <string name="stores_in_library">V knihovně</string> + <string name="stores_free">Zdarma</string> + <string name="stores_resume">Pokračovat</string> + <string name="stores_refresh">Obnovit</string> + <string name="stores_sort">Řazení</string> + <string name="stores_sort_last_played">Nedávno hrané</string> + <string name="stores_sort_recently_installed">Nedávno nainstalované</string> + <string name="stores_sort_title_asc">Název A–Z</string> + <string name="stores_sort_title_desc">Název Z–A</string> + <string name="stores_sort_size_desc">Velikost: největší</string> + <string name="stores_sort_size_asc">Velikost: nejmenší</string> + <string name="stores_sort_release_date">Datum vydání</string> + <string name="stores_view_list">Zobrazení seznamu</string> + <string name="stores_view_cards">Zobrazení karet</string> + <string name="stores_show_mature">Zobrazovat obsah pro dospělé</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Vypnuto</string> + <string name="epic_eos">Přihlášení do Epic (EOS)</string> + <string name="epic_offline">Spustit offline</string> + <string name="epic_resolve">Vyřešit přihlášení do Epic</string> + <string name="epic_client_version">Verze %1$s</string> + <string name="epic_client_no_runtime">Nejprve nainstalujte běhové prostředí Linuxu</string> + <string name="epic_client_checking">Kontrola nejnovější verze…</string> + <string name="epic_client_unpacking">Rozbaluje se…</string> + <string name="epic_client_unreachable">Stahovací server neodpověděl</string> + <string name="epic_client_needs_fex">Epic Games Launcher potřebuje FEX, který stáhne Steam. Po spuštění Steamu otevřete launcher znovu.</string> + <string name="epic_client_download_failed">Stažení se nezdařilo: %1$s</string> + <string name="epic_client_unpack_failed">Spouštěč se nepodařilo rozbalit: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher přihlášení nepřijal. Spusťte ho znovu ze spouštěče.</string> + <string name="epic_client_uninstall_body">Odebere spouštěč a uvolní jeho místo. Vaše hry z Epic zůstanou nainstalované a funkční a přihlášení zůstane uložené pro příští instalaci.</string> + <string name="epic_client_uninstall_stops">Nejprve se ukončí běžící relace.</string> + <string name="epic_client_uninstalled">Epic Games Launcher odinstalován</string> + <string name="epic_client_uninstall_failed">Některé soubory spouštěče nešlo odebrat. Zkuste to znovu.</string> + <string name="epic_client_uninstalling">Počkejte, až se Epic Games Launcher dokončí odinstalaci</string> + <string name="store_cloud_saves">Cloudové uložené pozice</string> + <string name="cloud_upload">Odeslat do cloudu</string> + <string name="cloud_download">Stáhnout z cloudu</string> + <string name="cloud_none">Žádné uložené pozice v cloudu</string> + <string name="cloud_conflict">Konflikt v cloudu</string> + <string name="cloud_conflict_files">Konflikt v cloudu · %1$d souborů</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Zachovat cloud</string> + <string name="cloud_keep_local">Zachovat lokální</string> + <string name="cloud_checking">Kontrola cloudu…</string> + <string name="cloud_last_sync">Poslední synchronizace %1$s</string> + <string name="cloud_never">Ještě nesynchronizováno</string> + <string name="cloud_done">%1$d souborů</string> + <string name="stores_eyebrow_installed">nainstalováno</string> + <string name="stores_eyebrow_library">ve vaší knihovně</string> + <string name="stores_eyebrow_store">obchod</string> + <string name="achievements_title">Achievementy</string> + <string name="achievements_count">%1$d z %2$d odemčeno</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Odemčeno · %1$d</string> + <string name="achievements_group_locked">Zamčeno · %1$d</string> + <string name="achievements_group_hidden">Skryto · %1$d</string> + <string name="achievements_hidden">Skrytý achievement</string> + <string name="achievements_hidden_detail">Podrobnosti se zobrazí po odemčení.</string> + <string name="achievements_all">Všechny achievementy odemčeny</string> + <string name="achievements_reading">Načítání…</string> + <string name="achievements_signed_out">Přihlaste se k %1$s a zobrazte si své achievementy.</string> + <string name="achievements_unreachable">Nepodařilo se spojit s %1$s. Zkontrolujte to znovu, až budete online.</string> + <string name="achievements_none">%1$s neuvádí pro tuto hru žádné achievementy.</string> + <string name="achievements_show_all">Zobrazit vše (%1$d)</string> + <string name="achievements_dialog_title">Achievementy · %1$s</string> + <string name="stores_in_steam">✓ Ve Steamu</string> + <string name="stores_uninstall">Odinstalovat</string> + <string name="stores_uninstalling">Odinstalování…</string> + <string name="stores_uninstall_title">Odinstalovat %1$s?</string> + <string name="stores_uninstall_body_size">Uvolní %1$s a odstraní ji ze Steamu.</string> + <string name="stores_uninstall_body">Odstraní její soubory a zástupce ve Steamu.</string> + <string name="stores_launch_not_registered">Steam hru zachytí při dalším spuštění; spustit ji odtamtud, nebo otevřít Steam hned.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Volba Steamu pro každou hru</string> + <string name="stores_card_audio">Zvuk</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Komponenty</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Jádro</string> + <string name="stores_card_engine_value">%1$s · nativní</string> + <string name="stores_card_engine_java">%1$s · vestavěné</string> + <string name="stores_how_it_runs">Jak se spouští</string> + <string name="stores_kv_fetched">Staženo z</string> + <string name="stores_kv_fetched_value">%1$s, s vaším účtem</string> + <string name="stores_kv_installed_to">Nainstalováno do</string> + <string name="stores_kv_installed_to_value">Úložiště her (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Spouští</string> + <string name="stores_kv_launched_by_value">Steam a Proton, stejnou cestou jako hry ze Steamu</string> + <string name="stores_kv_launched_by_epic">Steam a Proton · přihlášení do Epic při každém spuštění, překryvná vrstva EOS vypnuta</string> + <string name="stores_kv_launched_by_amazon">Steam a Proton · nastaveny proměnné Amazon Games Services</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">přidáno do Steamu při instalaci (Deck UI + Steam Input)</string> + <string name="stores_downloads_empty">Žádná stahování</string> + <string name="stores_dl_paused">Pozastaveno</string> + <string name="stores_dl_queued">V čekání</string> + <string name="stores_dl_queued_at">V čekání · #%1$d</string> + <string name="stores_dl_cancelled">Zrušeno</string> + <string name="stores_dl_failed">Nezdařilo se</string> + <string name="stores_dl_failed_reason">Nezdařilo se · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pozastavit</string> + <string name="stores_dl_resume">Pokračovat</string> + <string name="stores_dl_cancel">Zrušit</string> + <string name="stores_dl_retry">Zkusit znovu</string> + <string name="stores_dl_clear">Vymazat</string> + <string name="stores_dl_clear_all">Vymazat dokončené</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Stažení</string> + <string name="stores_stage_verify">Ověření</string> + <string name="stores_stage_install">Instalace</string> + <string name="stores_stage_done">Hotovo</string> + <string name="stores_stage_checking">Kontrola</string> + <string name="stores_stage_downloading">Stahování</string> + <string name="stores_dl_cancel_confirm">Odstranit stažení?</string> + <string name="stores_dl_failed_kept">Nezdařilo se · %1$s zachováno</string> + <string name="stores_stage_verifying">Ověřování</string> + <string name="stores_stage_installing">Instalování</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d souborů</string> + <string name="stores_download_manager">Správce stahování</string> + <string name="stores_parallel">Souběžných stahování</string> + <string name="stores_install_where">Instalovat do</string> + <string name="stores_install_title">Instalace %1$s:</string> + <string name="stores_target_internal">Interní úložiště</string> + <string name="stores_target_free">%1$s volných</string> + <string name="stores_target_free_unknown">Volné místo neznámé</string> + <string name="stores_storage_insufficient">Málo volného místa: potřeba %1$s, volně jen %2$s</string> + <string name="stores_storage_low">Málo místa (volně %1$s, potřeba %2$s)</string> + <string name="stores_notification_channel">Stahování z obchodů</string> + <string name="stores_notification_channel_hint">Zobrazuje průběh stahování her a udržuje stahování aktivní na pozadí</string> + <string name="stores_notification_one">Stahování</string> + <string name="stores_notification_many">%1$d stahování</string> + <string name="stores_notification_waiting">Příprava…</string> + <string name="stores_notification_done_channel">Dokončená stahování z obchodů</string> + <string name="stores_notification_installed">%1$s nainstalována</string> + <string name="stores_notification_failed">Stažení %1$s se nezdařilo</string> + <string name="stores_notification_delete">Odstranit</string> + <string name="stores_notification_keep">Zachovat</string> + <string name="stores_login_title">Přihlásit se k %1$s</string> + <string name="stores_login_provider_title">Přihlásit se přes poskytovatele</string> + <string name="stores_login_reload">Znovu načíst</string> + <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_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> + <string name="stores_login_error_ssl">Spojení s přihlašovací stránkou není zabezpečené.</string> + <string name="stores_login_error_verification">Přihlášení se nepodařilo ověřit. Zkuste to znovu.</string> + <string name="stores_login_error_generic">Přihlášení se nezdařilo. Zkuste to znovu.</string> + <string name="common_close">Zavřít</string> + <string name="common_back">Zpět</string> + <string name="common_edit">Upravit</string> + <string name="games_add_all">Přidat všechny hry z této složky</string> + <string name="games_added_none">V této složce nic nového</string> + <string name="edit_name">Název</string> + <string name="edit_target">Cíl</string> + <string name="edit_start_in">Spustit v</string> + <string name="edit_launch_options">Možnosti spuštění</string> + <string name="edit_artwork">Grafika</string> + <string name="edit_other_exe">Jiný exe…</string> + <string name="edit_remove">Odstranit</string> + <string name="art_cover">Obálka</string> + <string name="art_wide_cover">Široká obálka</string> + <string name="art_adjust_logo">Upravit logo</string> + <string name="logo_pos_default">Výchozí</string> + <string name="logo_pos_upper_left">Vlevo nahoře</string> + <string name="logo_pos_upper_center">Nahoře uprostřed</string> + <string name="logo_pos_center">Uprostřed</string> + <string name="logo_pos_bottom_left">Vlevo dole</string> + <string name="logo_pos_bottom_center">Dole uprostřed</string> + <string name="logo_pos_position">Poloha</string> + <string name="logo_pos_size">Velikost</string> + <string name="logo_pos_save">Uložit</string> + <string name="logo_pos_reset">Zpět na výchozí</string> + <string name="logo_pos_hint">Kreslí se přes pozadí hry, jako to dělá Steam. Přesná poloha se může lišit o pár pixelů.</string> + <string name="logo_pos_no_logo">Tato hra zatím nemá logo. Vyber ho v Logo, ať se tady zobrazí.</string> + <string name="logo_pos_failed">Polohu loga se nepodařilo uložit. Zkus to znovu.</string> + <string name="art_background">Pozadí</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Ikona</string> + <string name="art_src_folder">Složka hry</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Váš soubor</string> + <string name="art_src_exe">Z exe souboru</string> + <string name="art_src_auto">Automaticky</string> + <string name="art_pick_image">Vybrat obrázek…</string> + <string name="art_pick_title">Vyberte obrázek: %1$s</string> + <string name="art_reset">Obnovit na automatické</string> + <string name="art_search_sgdb">Hledat na SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Hledat hru</string> + <string name="art_sgdb_other_games">Další výsledky</string> + <string name="art_sgdb_none">Žádné výsledky.</string> + <string name="art_sgdb_no_key">SteamGridDB vyžaduje API klíč. Přidej svůj v Nastavení › Spouštěč.</string> + <string name="art_sgdb_bad_key">SteamGridDB nepřijal API klíč. Zkontroluj ho v Nastavení › Spouštěč.</string> + <string name="art_sgdb_limit">SteamGridDB teď omezuje požadavky. Zkus to za minutu.</string> + <string name="art_sgdb_offline">SteamGridDB není dostupný. Zkontroluj připojení.</string> + <string name="art_sgdb_server">Na straně SteamGridDB se něco pokazilo. Zkus to později.</string> + <string name="art_sgdb_no_game">SteamGridDB nemá pro tuto hru výsledky. Zkus ji vyhledat.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d hra přidána</item> + <item quantity="few">%1$d hry přidány</item> + <item quantity="many">%1$d her přidáno</item> + <item quantity="other">%1$d her přidáno</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d už je v Hrách</item> + <item quantity="few">%1$d už jsou v Hrách</item> + <item quantity="many">%1$d už je v Hrách</item> + <item quantity="other">%1$d už je v Hrách</item> + </plurals> + <string name="hop_back">B · Zpět na %1$s</string> + <string name="hop_from_games">hru</string> + <string name="hop_from_play">Nastavení spuštění</string> + <string name="sheet_graphics_drivers">Grafické ovladače</string> + <string name="comp_this_proton">Tento Proton</string> + <string name="comp_every_proton">Každý Proton</string> + <string name="comp_for_every_proton">Pro každý Proton</string> + <string name="comp_available_count">K dispozici · %1$d</string> + <string name="comp_checked">Zkontrolováno %1$s</string> + <string name="comp_check_all">Zkontrolovat nové komponenty a ovladače</string> + <string name="comp_get">Získat</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton a FEX níže patří tomuto Protonu</string> + <string name="comp_device_tested">%1$s · testováno</string> + <string name="comp_device_untested">%1$s · netestováno</string> + <string name="comp_device_unsupported">%1$s · nepodporováno</string> + <string name="gpu_auto_keeps">Udržuje doporučenou dvojici aktuální</string> + <string name="gpu_bar_auto">Automaticky · %1$s</string> + <string name="gpu_separately">Ovladače runtime a displeje samostatně</string> + <string name="gpu_use_title">Použít %1$s?</string> + <string name="gpu_mode_title">Jak se vybírají ovladače</string> + <string name="gpu_mode_auto_detail">Nejlepší dvojice pro tento GPU, vždy aktuální</string> + <string name="gpu_mode_pair">Spárovaná dvojice</string> + <string name="gpu_mode_pair_detail">Vyber dvojici; nastaví oba ovladače</string> + <string name="gpu_mode_mix">Volné kombinování</string> + <string name="gpu_mode_mix_detail">Vyber obraz a prostředí zvlášť</string> + <string name="gpu_mode_pair_short">Dvojice</string> + <string name="gpu_mode_mix_short">Smíšené</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">DVOJICE</string> + <string name="gpu_src_bundle">BALÍK</string> + <string name="gpu_src_chosen">VYBRÁNO</string> + <string name="gpu_src_by_gpu">PODLE GPU</string> + <string name="gpu_src_default">VÝCHOZÍ</string> + <string name="gpu_display_live">Kreslí teď</string> + <string name="gpu_display_pending">Čeká na restart · do té doby kreslí %1$s</string> + <string name="gpu_runtime_live">Aktivní</string> + <string name="gpu_runtime_pending">Příští relace · tahle zůstává u %1$s</string> + <string name="gpu_display_next">Kreslí obrazovku. Platí od příští relace.</string> + <string name="gpu_previous_driver">předchozí ovladač</string> + <string name="gpu_restart_banner">Restartuj, ať se obrazový ovladač změní.</string> + <string name="gpu_restart_blocked">Zastav aktuální relaci a restartuj DroidDeck, ať se obrazový ovladač změní.</string> + <string name="gpu_restart_now">Restartovat</string> + <string name="gpu_restart_later">Později</string> + <string name="gpu_auto_title">Automatika vybrala tuto dvojici pro tvůj %1$s</string> + <string name="gpu_auto_builtin_title">Automatika používá vestavěné ovladače pro tvůj %1$s</string> + <string name="gpu_auto_reason">Vybráno pro rodinu %1$s. Nové verze se instalují na pozadí.</string> + <string name="gpu_pair_title">Vyber dvojici</string> + <string name="gpu_pair_hint">Dvojice nastaví obrazový a runtime ovladač společně.</string> + <string name="gpu_mix_title">Vyber každý ovladač</string> + <string name="gpu_mix_hint">Balík zaplní obě místa. Změny obrazu platí po restartu, změny prostředí od příští relace.</string> + <string name="gpu_change_display">Změnit obrazový ovladač</string> + <string name="gpu_change_runtime">Změnit runtime ovladač</string> + <string name="gpu_autos_pick">VOLBA AUTOMATIKY</string> + <string name="gpu_installed">Nainstalováno</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · restart pro použití</string> + <string name="gpu_chip_restart">%1$s · čeká na restart</string> + <string name="comp_this_device">Toto zařízení</string> + <string name="proton_remove_title">Odstranit %1$s?</string> + <string name="setup_tab_diagnostics">Diagnostika</string> + <string name="setup_ready">Připraveno ke hraní</string> + <string name="setup_not_ready">Ještě není připraveno ke hraní</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">omezení procesů vypnuto</string> + <string name="setup_ready_signed_in">přihlášen jako %1$s</string> + <string name="setup_needs_you">Když je potřeba váš zásah</string> + <string name="setup_group_look">Vzhled</string> + <string name="setup_group_device">Toto zařízení</string> + <string name="setup_group_art">Grafika knihovny</string> + <string name="setup_group_download">Stahování</string> + <string name="setup_download_source">Zdroj</string> + <string name="setup_download_source_auto">Automaticky</string> + <string name="setup_download_source_direct">Přímo</string> + <string name="setup_download_source_mirror">Zrcadlo</string> + <string name="setup_download_source_custom">Vlastní prefix</string> + <string name="setup_download_mirror">Web</string> + <string name="setup_download_prefix">Prefix</string> + <string name="flathub_eyebrow">LINUXOVÉ APLIKACE</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Desktopové aplikace pro Linuxový desktop, otevírané z Desktopu.</string> + <string name="flathub_setup">Nastavit Flathub</string> + <string name="flathub_remove_title">Odstranit %1$s?</string> + <string name="flathub_remove_note">Nastavení a soubory zůstanou zachovány.</string> + <string name="flathub_keep">Zachovat</string> + <string name="desktop_size">Velikost na disku</string> + <string name="desktop_uninstall_title">Odinstalovat desktop?</string> + <string name="desktop_all_systems">Vše</string> + <string name="gog_achievements">Achievementy GOG</string> + <string name="gog_achievements_hint">Synchronizuje achievementy u podporovaných her GOG. Použije se při dalším spuštění.</string> + <string name="gog_achievements_off">Achievementy vypnuty</string> + <string name="gog_achievements_on">Achievementy zapnuty</string> + <string name="gog_achievements_signin">Přihlásit se ke GOG znovu</string> + <string name="gog_achievements_uploaded">Achievementy nahrány</string> + <string name="gog_achievements_pending">Nahrání achievementu čeká</string> + <string name="gog_achievements_enable_store">Zapněte achievementy GOG v nastavení obchodů</string> + <string name="gog_achievements_unavailable">Achievementy nejsou k dispozici; zkontrolujte protokoly relace</string> + <string name="achievement_unlocked">Achievement odemčen</string> + <string name="touch_paste">Vložit</string> + <string name="touch_dpad">Křížový ovladač</string> + <string name="touch_left_stick">Levá páčka</string> + <string name="touch_right_stick">Pravá páčka</string> + <string name="touch_menu">Nabídka</string> + <string name="touch_keyboard">Klávesnice</string> + <string name="touch_dpad_up">Křížový ovladač nahoru</string> + <string name="touch_dpad_down">Křížový ovladač dolů</string> + <string name="touch_dpad_left">Křížový ovladač vlevo</string> + <string name="touch_dpad_right">Křížový ovladač vpravo</string> + <string name="touch_title">Dotykové ovládání</string> + <string name="touch_controller">Dotykový ovladač</string> + <string name="touch_mouse">Myš</string> + <string name="touch_on">Zapnuto</string> + <string name="touch_off">Vypnuto</string> + <string name="touch_speed_slow">Pomalá</string> + <string name="touch_speed_normal">Normální</string> + <string name="touch_speed_fast">Rychlá</string> + <string name="touch_edit_layout">Upravit rozložení</string> + <string name="touch_droiddeck_menu">Nabídka DroidDeck</string> + <string name="touch_drag_hint">Přetáhněte prvky ovládání na obrazovku</string> + <string name="touch_arrange">Uspořádat</string> + <string name="touch_discard">Zahodit</string> + <string name="touch_saving">Ukládání…</string> + <string name="touch_icon">Ikona</string> + <string name="touch_narrower">Š−</string> + <string name="touch_wider">Š+</string> + <string name="touch_shorter">V−</string> + <string name="touch_taller">V+</string> + <string name="touch_hide">Skrýt</string> + <string name="touch_color_opacity">Barva a průhlednost…</string> + <string name="touch_copy_layout">Kopírovat toto rozložení</string> + <string name="touch_layout_copied">Rozložení zkopírováno; vložte ho do dotykového rozložení jakékoli hry</string> + <string name="touch_paste_layout">Vložit zkopírované rozložení</string> + <string name="touch_reset_layout">Obnovit výchozí rozložení Steamu</string> + <string name="touch_no_binding">Tento prvek nemá ve Steamu žádnou vazbu, které by se dala přiřadit ikona</string> + <string name="touch_icon_for">Ikona pro %1$s</string> + <string name="touch_layout_color">Barva dotykového rozložení</string> + <string name="touch_done">Hotovo</string> + <string name="touch_save_failed">Dotykové rozložení se nepodařilo uložit</string> + <string name="touch_saved">Dotykové rozložení uloženo ve Steamu</string> + <string name="touch_app_id">Aplikace %1$d</string> + <string name="touch_label_hint">Popisek (nepovinné)</string> + <string name="touch_icons_missing">Ikony Steamu nebyly nalezeny</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d ikona ze Steamu</item> + <item quantity="few">%1$d ikony ze Steamu</item> + <item quantity="many">%1$d ikony ze Steamu</item> + <item quantity="other">%1$d ikon ze Steamu</item> + </plurals> + <string name="touch_icon_color">Barva ikony</string> + <string name="touch_button_color">Barva tlačítka</string> + <string name="touch_no_icon">Bez ikony</string> + + <string name="stores_sync_sign_in">Ověřování přihlášení…</string> + <string name="stores_sync_library">Načítání vaší knihovny…</string> + <string name="stores_sync_game_list">Načítání seznamu her…</string> + <string name="stores_sync_details">Načítání podrobností o hrách… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Synchronizace %1$d hry…</item> + <item quantity="few">Synchronizace %1$d her…</item> + <item quantity="many">Synchronizace %1$d hry…</item> + <item quantity="other">Synchronizace %1$d her…</item> + </plurals> + <string name="stores_sync_progress">Synchronizace… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Načítání obálek…</string> + <string name="stores_sync_failed">Synchronizace se nezdařila</string> + <string name="stores_sync_no_games">Ve vaší knihovně %1$s nebyly nalezeny žádné hry</string> + <string name="stores_sync_amazon_no_answer">Amazon Games nereagovala na vaši knihovnu: obnovte stránku nebo se přihlaste znovu</string> + <string name="stores_sync_gog_unreachable">Nepodařilo se spojit s GOG</string> + <string name="stores_sync_gog_unreadable">Vaši knihovnu GOG se nepodařilo načíst</string> + <string name="stores_registering">Registrace ve Steamu…</string> + <string name="mode_client_arch">Klient Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnostika VAC</string> + <string name="setup_vac_diag_hint">Hry na Source zaznamenávají svou konzoli (-condebug); vac.txt v protokolech relace uvádí, zda je hra chráněna VAC</string> + <string name="load_starting_steam_x64">Spouštění Steamu x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Používá klient Steam x86-64</string> + <string name="storage_uninstall_in_x64">Tato kopie je v klientovi Steam x86-64. V nastavení Klient Steam vyberte x86-64 a pak ji odinstalujte tady.</string> + <string name="storage_uninstall_in_arm64">Tato kopie je v klientovi Steam ARM64. V nastavení Klient Steam vyberte ARM64 a pak ji odinstalujte tady.</string> + <string name="drawer_page_glasses">Brýle</string> + <string name="glasses_open">Brýle VITURE</string> + <string name="glasses_control">Ovládání brýlí</string> + <string name="glasses_driver_missing">Toto sestavení neobsahuje ovladač pro tyto brýle.</string> + <string name="glasses_connection_failed">K brýlím se nepodařilo připojit. Připojte znovu kabel, nebo to zkuste znovu klepnutím na Povolit.</string> + <string name="glasses_allow">Povolit</string> + <string name="glasses_allow_hint">Umožní aplikaci DroidDeck nastavovat obnovovací frekvenci, režim 3D, jas, hlasitost a zatmavení brýlí a číst data ze sledování hlavy.</string> + <string name="glasses_asking">Čeká se na vaše povolení v dialogu Androidu…</string> + <string name="glasses_denied">Ovládání bylo odmítnuto. Povolte ho, abyste mohli měnit nastavení brýlí.</string> + <string name="glasses_no_control">Tyto brýle zobrazují hru, ale jejich nastavení zde nelze změnit.</string> + <string name="glasses_output">Výstup</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Hra v brýlích</string> + <string name="glasses_game_on_hint">Zobrazí hru jen v brýlích. Vypnuto: hru zobrazuje telefon a Android zrcadlí jeho obrazovku.</string> + <string name="glasses_display">Displej</string> + <string name="glasses_refresh">Obnovovací frekvence</string> + <string name="glasses_3d">3D (vedle sebe)</string> + <string name="glasses_3d_hint">Přepněte chytré brýle do 3D zobrazení vedle sebe. Sledování hlavy se ovládá samostatně.</string> + <string name="glasses_3d_failed">Signál 3D se nepodařilo potvrdit. Zkuste to znovu, až se vrátí obraz 2D.</string> + <string name="glasses_no_signal">Žádný obraz: brýle jsou v režimu, který tento telefon neumí vyslat. Podržte jejich tlačítko 2D/3D, nebo je odpojte a znovu připojte.</string> + <string name="glasses_3d_refresh">Obnovovací frekvence ve 3D</string> + <string name="glasses_auto3d">3D pro hry VR</string> + <string name="glasses_auto3d_hint">Při běhu SteamVR přepne na 3D a potom zpět.</string> + <string name="glasses_picture">Obrázek</string> + <string name="glasses_picture_hint">Automaticky zobrazuje plochý obsah v obou očích a detekuje SteamVR. Pro obsah SBS vyberte možnost Hra vedle sebe.</string> + <string name="glasses_picture_auto">Automaticky</string> + <string name="glasses_picture_screen">Virtuální obrazovka</string> + <string name="glasses_picture_sbs">Hra 3D vedle sebe</string> + <string name="glasses_screen_size">Šířka obrazovky</string> + <string name="glasses_screen_distance">Vzdálenost obrazovky</string> + <string name="glasses_screen_next_session">Šířka a vzdálenost se použijí, když hra běží v brýlích jako virtuální obrazovka.</string> + <string name="glasses_screen_no_output">Tato nastavení platí, když je zapnutá možnost „Hra v brýlích“ a hra se v nich zobrazuje.</string> + <string name="glasses_screen_flat_hint">Režim Automaticky drží tuto 2D hru na celou obrazovku. Chcete-li upravit její šířku, vzdálenost a sledování hlavy, použijte virtuální obrazovku.</string> + <string name="glasses_screen_use">Použít virtuální obrazovku</string> + <string name="glasses_screen_direct_hint">SteamVR vyplní zobrazení. Upravte zorné pole ve VR; šířka a vzdálenost platí pouze pro virtuální obrazovku.</string> + <string name="glasses_screen_sbs_hint">Hry 3D vedle sebe vyplní zorné pole každého oka. Šířka a vzdálenost platí jen pro virtuální obrazovku.</string> + <string name="glasses_tracking_flat_hint">Režim Automaticky drží tuto 2D hru pevně v zorném poli. Chcete-li použít sledování hlavy, zvolte v části Displej možnost „Virtuální obrazovka“.</string> + <string name="glasses_tracking_sbs_hint">Sledování hlavy platí pro virtuální obrazovku nebo spuštěnou hru SteamVR.</string> + <string name="glasses_hardware">Zařízení</string> + <string name="glasses_brightness">Jas</string> + <string name="glasses_volume">Hlasitost</string> + <string name="glasses_sunblock">Zatmavení</string> + <string name="glasses_sunblock_hint">Ztmaví přední skla.</string> + <string name="glasses_tracking">Sledování</string> + <string name="glasses_head_tracking">Sledování hlavy</string> + <string name="glasses_head_tracking_hint">Vlastní senzory brýlí otáčejí virtuální obrazovkou a SteamVR podle pohybu hlavy.</string> + <string name="glasses_recenter">Vycentrovat pohled</string> + <string name="glasses_recenter_button">Vycentrovat obrazovku</string> + <string name="glasses_vr_fov">Zorné pole SteamVR</string> + <string name="glasses_vr_fov_hint">Nižší hodnota přiblíží SteamVR a vyplní brýle; vyšší ukáže víc z okolí.</string> + <string name="glasses_playing">Hraje se na %1$s</string> + <string name="glasses_calibration">Kalibrace sledování</string> + <string name="glasses_calibration_hint">Sníží drift a vyrovná vodorovnou referenci.</string> + <string name="glasses_calibration_saved_hint">Pro tyto brýle se používá uložená kalibrace.</string> + <string name="glasses_calibration_open">Kalibrovat</string> + <string name="glasses_calibration_instructions">Položte připojené brýle vzhůru nohama na vodorovnou plochu tak, aby rám ležel rovnoměrně. Klepněte na Spustit a nechte je asi 8 sekund bez dotyku. Pohyb měření restartuje. Tím se upraví drift a náklon, ne směr natočení.</string> + <string name="glasses_calibration_settling">Nechte brýle vzhůru nohama bez dotyku. Čeká se, až se ustálí…</string> + <string name="glasses_calibration_collecting">Probíhá měření senzorů. Nechte brýle v klidu.</string> + <string name="glasses_calibration_moving">Zjištěn pohyb. Nechte brýle bez dotyku; měření se automaticky spustí znovu.</string> + <string name="glasses_calibration_turn_over">Položte brýle vzhůru nohama na vodorovnou plochu. Měření začne, jakmile budou správně umístěny.</string> + <string name="glasses_calibration_complete">Kalibrace uložena. Nasaďte si brýle, dívejte se přímo vpřed a klepnutím na Hotovo pohled vycentrujte.</string> + <string name="glasses_calibration_failed">Kalibraci se nepodařilo dokončit. Zkontrolujte připojení, nechte brýle v klidu a zkuste to znovu. Předchozí kalibrace zůstává beze změny.</string> + <string name="glasses_calibration_start">Spustit</string> + <string name="glasses_calibration_done">Hotovo</string> + <string name="glasses_calibration_reset">Resetovat kalibraci sledování</string> + <string name="glasses_calibration_reset_hint">Odebrat uloženou kalibraci a obnovit výchozí hodnoty modelu? Po opětovném nasazení brýlí pohled vycentrujte.</string> + <string name="glasses_calibration_reset_button">Resetovat</string> + <string name="hand_camera_group">Sledování rukou</string> + <string name="hand_camera_prompt_title">Sledování rukou nebo ovladačů Joy-Con pomocí fotoaparátu telefonu?</string> + <string name="hand_camera_prompt_body">Bez připojeného ovladače sleduje fotoaparát telefonu ve VR vaše holé ruce: sevřením palce a ukazováčku kliknete, sevřením ruky uchopíte a otočením dlaně k sobě a sevřením otevřete nabídku. U spárovaných ovladačů Joy-Con fotoaparát sleduje jejich polohu, zatímco ovladače Joy-Con zajišťují otáčení a ovládání tlačítky. Snímky se zpracovávají na tomto zařízení a nikdy se neukládají ani neodesílají.</string> + <string name="hand_camera_rear">Zadní kamera</string> + <string name="hand_camera_rear_hint">Doporučeno. Obvykle ostřejší a širší.</string> + <string name="hand_camera_front">Přední kamera</string> + <string name="hand_camera_front_hint">Pro případy, kdy zadní strana zařízení nemůže směřovat k vám.</string> + <string name="hand_camera_allow">Použít kameru</string> + <string name="hand_camera_not_now">Teď ne</string> + <string name="hand_camera_setting">Sledování rukou kamerou</string> + <string name="hand_camera_setting_hint">Použijte kameru telefonu pro gesta holou rukou nebo k umístění spárovaných ovladačů Joy-Con ve VR. Ovladače Joy-Con poskytují otáčení a vstupy tlačítek. Pozastaví, zatímco chytré brýle sledují vaše ruce nebo ovladače Joy-Con. Snímky se zpracovávají pouze na tomto zařízení.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Přístup ke kameře</string> + <string name="hand_camera_access_hint">Povolte přístup ke kameře, aby mohlo začít sledování rukou.</string> + <string name="hand_camera_access_denied">Přístup ke kameře je vypnutý. Zapněte ho v nastavení Androidu.</string> + <string name="hand_camera_allow_button">Povolit</string> + <string name="hand_camera_open_settings">Otevřít nastavení</string> + <string name="hand_camera_placement">Umístění kamery</string> + <string name="hand_camera_placement_hint">Než začnete hrát, zkontrolujte, že vás kamera vidí.</string> + <string name="hand_camera_check">Zkontrolovat</string> + <string name="hand_camera_check_title">Umístění kamery</string> + <string name="hand_camera_how_rear">Postavte zařízení svisle do vzdálenosti 1,5 až 2 metry přibližně ve výšce hrudníku tak, aby zadní kamera směřovala k vám. Pak se postavte do záběru s nataženýma rukama.</string> + <string name="hand_camera_how_front">Postavte zařízení svisle do vzdálenosti 1,5 až 2 metry přibližně ve výšce hrudníku tak, aby obrazovka směřovala k vám. Pak se postavte do záběru s nataženýma rukama.</string> + <string name="hand_camera_starting">Spouštění kamery…</string> + <string name="hand_camera_stand_up">Zařízení leží naplocho. Postavte ho svisle, aby kamera směřovala k vám.</string> + <string name="hand_camera_upright">Postavte zařízení svisleji, aby kamera směřovala k vám.</string> + <string name="hand_camera_not_seen">Zatím vás nevidí. Postavte se do záběru tak, aby byla vidět hlava a ramena.</string> + <string name="hand_camera_move_back">Ustupte trochu dozadu.</string> + <string name="hand_camera_move_closer">Přistupte trochu blíž.</string> + <string name="hand_camera_show_hands">Natáhněte obě ruce tak, aby je kamera viděla.</string> + <string name="hand_camera_good">Vypadá to dobře.</string> + <string name="hand_camera_failed">Kameru se nepodařilo spustit. Zavřete ostatní aplikace, které ji používají, a zkuste to znovu.</string> + <string name="hand_camera_switch">Přepnout kameru</string> + <string name="hand_camera_skip">Přeskočit</string> + <string name="hand_camera_done">Hotovo</string> + <string name="glasses_xreal_network_missing">Čeká se na připojení USB Ethernet brýlí. Tento telefon ho možná aplikacím nezpřístupňuje.</string> + <string name="glasses_xreal_connection_failed">Připojení XREAL bylo přerušeno nebo vrátilo nepodporovanou odpověď. Zkouší se to znovu…</string> + <string name="glasses_xreal_experimental">Experimentální podpora 1S. V nabídce brýlí použijte režim Follow a vypněte stabilizaci. Směry sledování a režimy zobrazení je ještě třeba otestovat na zařízení.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Režim Cardboard</string> + <string name="cardboard_mode_hint">Obraz pro levé a pravé oko pro VR brýle pro telefon.</string> + <string name="cardboard_source">Obraz</string> + <string name="cardboard_source_screen">Virtuální obrazovka</string> + <string name="cardboard_source_sbs">3D vedle sebe</string> + <string name="cardboard_viewer">Brýle</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Bez čočky</string> + <string name="cardboard_ipd">Vzdálenost očí</string> + <string name="cardboard_screen_width">Šířka obrazovky</string> + <string name="cardboard_screen_distance">Vzdálenost obrazovky</string> + <string name="cardboard_head_tracking">Sledování hlavy</string> + <string name="cardboard_no_sensor">Toto zařízení nemá senzor otáčení.</string> + <string name="cardboard_recenter">Vycentrovat pohled</string> + <string name="cardboard_recenter_button">Vycentrovat</string> + <string name="cardboard_steamvr">SteamVR (experimentální)</string> + <string name="cardboard_steamvr_install">Instalovat</string> + <string name="cardboard_steamvr_installing">Stahování a rozbalování SteamVR…</string> + <string name="cardboard_steamvr_start">Spustit</string> + <string name="cardboard_steamvr_stop">Zastavit</string> + <string name="cardboard_steamvr_unavailable">V této relaci není k dispozici.</string> + <string name="cardboard_steamvr_failed">SteamVR neodpovídá; zkontrolujte protokol relace.</string> + <string name="drawer_component_downloads">Stáhnout komponenty</string> + <string name="drawer_component_downloads_hint">Stažené soubory se sdílejí se stránkou Komponenty. Výběrem stažené verze výše ji použijete při dalším spuštění hry.</string> + <string name="drawer_component_choose_download">Vyberte verzi ke stažení</string> + <string name="stores_fact_developer">Vývojář</string> + <string name="stores_fact_publisher">Vydavatel</string> + <string name="stores_fact_released">Vydáno</string> + <string name="stores_hltb_main">Hlavní</string> + <string name="stores_hltb_extras">+ Extra</string> + <string name="stores_hltb_completionist">Kompletní</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="display_picture_position">Poloha obrázku</string> + <string name="display_position_top">Nahoře</string> + <string name="display_position_bottom">Dole</string> + <string name="display_position_center">Uprostřed (výchozí)</string> + <string name="setup_tab_storage">Úložiště</string> + <string name="storage_measuring">Měření úložiště…</string> + <string name="storage_measuring_hint">Poprvé to trvá pár sekund.</string> + <string name="storage_internal">Interní úložiště</string> + <string name="storage_used_of">využito %1$s z %2$s</string> + <string name="storage_free">volně %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck využívá %1$s. Změřeno %2$s.</string> + <string name="storage_rescanning">měření znovu…</string> + <string name="storage_other_apps">Ostatní aplikace pro Android</string> + <string name="storage_safe_now">Lze uvolnit hned</string> + <string name="storage_safe_hint">Nevyužitá prostředí, zbytky, staré logy</string> + <string name="storage_clean_up">Čištění…</string> + <string name="storage_session_running">Zastav relaci, ať můžeš uklidit nebo něco smazat. Velikosti zůstávají vidět.</string> + <string name="storage_where">Kam to jde</string> + <string name="storage_games">Hry ze Steamu</string> + <string name="storage_game_data">Data her</string> + <string name="storage_game_data_hint">Prefixy %1$s · workshop %2$s · shadery %3$s</string> + <string name="storage_tools">Proton a prostředí</string> + <string name="storage_tools_unused">%1$s nevyužito</string> + <string name="storage_stores">GOG, Epic a další obchody</string> + <string name="storage_stores_hint">Odeber je v Obchodech</string> + <string name="storage_desktop">Aplikace pro plochu</string> + <string name="storage_desktop_hint">Aplikace Flatpak a prostředí</string> + <string name="storage_system">Systém Linux a klient Steam</string> + <string name="storage_system_hint">Potřebné, aby vůbec něco běželo</string> + <string name="storage_app_data">Data DroidDeck</string> + <string name="storage_app_data_hint">Logy starých relací %1$s · mezipaměť · ovladače</string> + <string name="storage_legend_games">Hry</string> + <string name="storage_legend_data">Data her</string> + <string name="storage_legend_tools">Proton a prostředí</string> + <string name="storage_legend_stores">Další obchody</string> + <string name="storage_legend_desktop">Aplikace pro plochu</string> + <string name="storage_legend_system">Systém Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Uklidit</string> + <string name="storage_clean_up_lede">Nic tady se nedotkne nainstalovaných her ani probíhajících stahování.</string> + <string name="storage_nothing_to_clean">Teď není co uklidit.</string> + <string name="storage_selected">Vybráno: %1$s · %2$s → uvolní se %3$s</string> + <string name="storage_cleaning">Čištění…</string> + <string name="storage_free_button">Uvolnit %1$s</string> + <string name="storage_freed">Uvolněno %1$s.</string> + <string name="storage_item_runtimes">Nevyužitá prostředí Steamu a Proton</string> + <string name="storage_item_leftovers">Zbytky po smazaných hrách</string> + <string name="storage_item_leftovers_unsure">Zbytky, které mohou obsahovat uložené pozice</string> + <string name="storage_item_logs">Logy starých relací</string> + <string name="storage_item_logs_detail">Logy aktuální relace zůstávají</string> + <string name="storage_item_custom_detail">Žádná hra ho nepoužívá. Pokud ho budeš potřebovat, nainstaluj ho znovu v Komponentách.</string> + <string name="storage_item_shaders">Mezipaměť shaderů nainstalovaných her</string> + <string name="storage_item_shaders_detail">Během hraní se znovu postaví. První minuty každé hry budou zase škubat.</string> + <string name="storage_tag_safe">Bezpečné</string> + <string name="storage_tag_unused">Nevyužité</string> + <string name="storage_tag_stutter">Škubání</string> + <string name="storage_tag_saves">Zkontroluj uložené pozice</string> + <string name="storage_tag_default">Výchozí</string> + <string name="storage_tag_required">Potřebné</string> + <string name="storage_tag_not_used">Nevyužité</string> + <string name="storage_back">Úložiště</string> + <string name="storage_games_with_data">%1$s s jejich daty</string> + <string name="storage_sort_largest">Největší</string> + <string name="storage_sort_least_played">Nejméně hrané</string> + <string name="storage_sort_sd">Na SD kartě</string> + <string name="storage_no_games">Nejsou tu žádné hry.</string> + <string name="storage_played">hráno %1$s</string> + <string name="storage_never_played">Nikdy nehráno</string> + <string name="storage_game_parts">Hra %1$s · data %2$s</string> + <string name="storage_uninstall">Odinstalovat</string> + <string name="storage_games_note">Odinstalování otevře okno Steamu, aby to Steam zaznamenal. Pro přesun hry na SD kartu použij Steam › Nastavení › Úložiště.</string> + <string name="storage_uninstall_title">Odinstalovat %1$s?</string> + <string name="storage_uninstall_body">Steam se otevře a požádá o potvrzení. Tím se uvolní %1$s hry. Prefix zůstane, dokud neuklidíš zbytky, a uložené pozice ve Steam Cloud zůstanou na účtu.</string> + <string name="storage_open_steam">Otevřít Steam</string> + <string name="storage_tools_detail">%1$s · %2$s nevyužito</string> + <string name="storage_remove_unused">Odebrat nevyužité · %1$s</string> + <string name="storage_in_use">Používá se</string> + <string name="storage_not_used">Nevyužité</string> + <string name="storage_remove">Odebrat</string> + <string name="storage_remove_title">Odebrat %1$s?</string> + <string name="storage_remove_body">Uvolní %1$s. Steam to znovu stáhne, pokud to nějaká hra bude potřebovat.</string> + <string name="storage_tool_fex_runtime">Potřebné pro hry pro Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Potřebné pro Proton pro ARM64</string> + <string name="storage_tool_redist">Instalace VC++ a DirectX, které hry potřebují</string> + <string name="storage_tool_fex">Spouští hry pro Linux x86</string> + <string name="storage_tool_steam">Nástroj Steamu</string> + <string name="storage_tool_old_runtime">DroidDeck spouští hry bez tohoto prostředí</string> + <string name="storage_tool_x86_proton">Proton x86, který DroidDeck nedokáže spustit</string> + <string name="storage_tool_custom_default">Výchozí pro všechny hry</string> + <string name="storage_tool_custom_unused">Žádná hra ho nepoužívá</string> + <string name="storage_tool_custom_unknown">Nastavení Steamu nejde přečíst, takže zůstává</string> + <string name="storage_cleanup_busy">Počkej, až se dokončí čištění úložiště</string> + <string name="storage_low_title">Volně jen %1$s</string> + <string name="storage_low_body">Steam potřebuje místo na aktualizace a mezipaměť shaderů. Pod 10 GB mohou aktualizace her selhat v polovině.</string> + <string name="storage_low_safe">%1$s lze bezpečně uvolnit.</string> + <string name="storage_free_up">Uvolnit místo</string> + <string name="storage_play_anyway">Přesto hrát</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d nainstalovaná</item> + <item quantity="other">%d nainstalovaných</item> + <item quantity="few">%d nainstalované</item> + <item quantity="many">%d nainstalované</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d na SD kartě</item> + <item quantity="other">%d na SD kartě</item> + <item quantity="few">%d na SD kartě</item> + <item quantity="many">%d na SD kartě</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d nástroj</item> + <item quantity="other">%d nástrojů</item> + <item quantity="few">%d nástroje</item> + <item quantity="many">%d nástroje</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Prázdné složky prefixu a mezipaměť shaderů z %d hry</item> + <item quantity="other">Prázdné složky prefixu a mezipaměť shaderů z %d her</item> + <item quantity="few">Prázdné složky prefixu a mezipaměť shaderů ze %d her</item> + <item quantity="many">Prázdné složky prefixu a mezipaměť shaderů z %d her</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Prefix %d hry stále obsahuje soubory, včetně místních uložených pozic. Pokud je potřebuješ, nejdřív si udělej kopii.</item> + <item quantity="other">Prefixy %d her stále obsahují soubory, včetně místních uložených pozic. Pokud je potřebuješ, nejdřív si udělej kopii.</item> + <item quantity="few">Prefixy %d her stále obsahují soubory, včetně místních uložených pozic. Pokud je potřebuješ, nejdřív si udělej kopii.</item> + <item quantity="many">Prefixy %d her stále obsahují soubory, včetně místních uložených pozic. Pokud je potřebuješ, nejdřív si udělej kopii.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d hra</item> + <item quantity="other">%d her</item> + <item quantity="few">%d hry</item> + <item quantity="many">%d hry</item> + </plurals> + <string name="storage_tool_default_proton">Výchozí Proton DroidDeck</string> + <string name="storage_tool_proton">Volba Proton 11 v DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Používá %d hra</item> + <item quantity="other">Používá %d her</item> + <item quantity="few">Používají %d hry</item> + <item quantity="many">Používá %d hry</item> + </plurals> + <string name="storage_legend_components">Komponenty</string> + <string name="storage_components">Komponenty</string> + <string name="storage_item_components">Nevyužité komponenty</string> + <string name="storage_component_original">Originál %1$s · %2$s</string> + <string name="storage_original_confirm">Uvolní %1$s. Vrací jen verzi Protonu, která už není nainstalovaná.</string> + <string name="storage_leftovers_unchecked">Nezkontrolováno: manifest aplikace Steamu nejde přečíst, takže prefixy smazaných her zůstanou, dokud to nepůjde.</string> + <string name="storage_failed">Selhalo: %1$s</string> + <string name="storage_desktop_shared">%1$s sdíleno</string> + <string name="storage_data_installed">Nainstalované hry</string> + <string name="storage_data_parts">Prefix %1$s · shadery %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Vymazat shadery</string> + <string name="storage_data_leftovers">Smazané hry</string> + <string name="storage_steam_app">Aplikace Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Prefix stále obsahuje soubory, možná místní uložené pozice</string> + <string name="storage_leftover_confirm">Vymaže Wine prefix a mezipaměť shaderů (%1$s). Nejdřív si udělej kopii uložených pozic, které potřebuješ; uložené pozice ve Steam Cloud zůstanou na účtu.</string> + <string name="storage_data_other">Zachováno</string> + <string name="storage_data_other_title">Hry mimo Steam a sdílený prefix Steamu</string> + <string name="storage_data_other_detail">Prefixy her přidaných přes obchody nebo ručně</string> + <string name="storage_components_packages">Stažené balíky</string> + <string name="storage_components_originals">Zachované originály</string> + <string name="storage_components_none">Nejsou stažené žádné balíky komponent.</string> + <string name="storage_component_in_use">Vybráno pro Proton nebo hru</string> + <string name="storage_component_unused">Nikde nevybráno</string> + <string name="storage_original_kept">Vrací nainstalovaný Proton</string> + <string name="storage_original_old">Verze Protonu, která už není nainstalovaná</string> + <string name="storage_tag_in_use">Používá se</string> + <string name="storage_components_note">Používané komponenty zůstávají zamčené. Vybírej je v Komponentách; co tady odebereš, tam můžeš znovu stáhnout.</string> + <string name="storage_component_confirm">Uvolní %1$s. Balíky, které jsi importoval sám, už znovu stáhnout nelze.</string> + <string name="storage_desktop_detail">%1$s pro aplikace Flatpak a co sdílejí</string> + <string name="storage_desktop_apps_title">Aplikace</string> + <string name="storage_desktop_none">Nejsou nainstalované žádné aplikace Flatpak.</string> + <string name="storage_desktop_shared_title">Sdílené aplikacemi</string> + <string name="storage_desktop_runtimes">Prostředí</string> + <string name="storage_desktop_runtimes_detail">Knihovny, na kterých aplikace běží; nevyužité zmizí přes Odebrat nevyužité</string> + <string name="storage_desktop_cache">Úložiště stahování</string> + <string name="storage_desktop_cache_detail">Objektové úložiště a stažená mezipaměť Flatpaku</string> + <string name="storage_desktop_prune">Odebrat nevyužité</string> + <string name="storage_desktop_prune_body">Odebere prostředí, která žádná nainstalovaná aplikace nepotřebuje, a uklidí objektové úložiště Flatpaku. Nainstalované aplikace dál fungují.</string> + <string name="storage_flatpak_uninstall_body">Odebere aplikaci (%1$s) a prostředí, která nikdo jiný nepoužívá. Data v domovské složce zůstanou.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d balík</item> + <item quantity="other">%d balíků</item> + <item quantity="few">%d balíky</item> + <item quantity="many">%d balíku</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d aplikace</item> + <item quantity="other">%d aplikací</item> + <item quantity="few">%d aplikace</item> + <item quantity="many">%d aplikace</item> + </plurals> + <string name="boot_movie">Úvodní video</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps vypadá plynuleji, ale při spouštění Steamu víc zatěžuje procesor. Úvodní video vybrané přímo v nastavení Steamu má přednost.</string> + <string name="boot_movie_sound">Zvuk</string> + <string name="boot_movie_custom">Vlastní video</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV nebo WebM. Jiné formáty a soubory nad %1$d MB se v zařízení převedou na WebM 720p, nejvýše %2$d sekund.</string> + <string name="boot_movie_import">Importovat</string> + <string name="boot_movie_remove">Odebrat</string> + <string name="boot_movie_pick">Vyberte úvodní video</string> + <string name="boot_movie_imported">%1$s je nyní úvodní video</string> + <string name="boot_movie_imported_silent">%1$s je nyní úvodní video, bez zvuku</string> + <string name="boot_movie_too_long">Videa k převodu mohou mít nejvýše %1$d sekund</string> + <string name="boot_movie_converting">Převádění %1$d %%</string> + <string name="boot_movie_converting_started">Převádí se %1$s pro Steam. Nechte DroidDeck otevřený.</string> + <string name="boot_movie_unsupported">Toto zařízení video nedokáže dekódovat.</string> + <string name="boot_movie_import_failed">Video se nepodařilo importovat</string> + <string name="glasses_experimental">Kamery Luma Ultra — Experimentální</string> + <string name="glasses_joycons">Sledování polohy Joy-Conů</string> + <string name="glasses_joycons_hint">Použijte kamery chytrých brýlí k umístění spárovaných ovladačů Joy-Con. Otáčení a vstupy tlačítek pocházejí z ovladačů Joy-Con. Poloha se odhaduje, když máte skrytá zápěstí. Nahrazuje ovladače ovládané holýma rukama a pozastavuje sledování fotoaparátem telefonu. Při připojování nebo resetování centra sledování namiřte ovladače Joy-Con dopředu.</string> + <string name="glasses_joycons_requires_position">Nejprve povolte sledování polohy. Vyžaduje ovladače Joy-Con s funkcí detekce pohybu v systému Android 12 nebo novějším. Ve výchozím nastavení vypnuto.</string> + <string name="setup_tab_glasses">Chytré brýle</string> + <string name="setup_glasses_scope">Nastavení zobrazení a sledování hlavy jsou sdílena mezi nabídkami, hrami a relacemi na počítači DroidDeck.</string> + <string name="setup_glasses_connect">Připojte chytré brýle a změňte jejich nastavení zobrazení a sledování. Uložená nastavení zůstanou zachována i po odpojení.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Režim zobrazení</string> + <string name="glasses_output_2d">2D výstup</string> + <string name="glasses_output_3d">3D výstup</string> + <string name="glasses_picture_group">Obraz a virtuální obrazovka</string> + <string name="glasses_position_group">Poloha a úroveň podlahy</string> + <string name="glasses_hands_group">Sledování rukou — Experimentální</string> + <string name="glasses_tracking_status">Stav sledování</string> + <string name="glasses_resolution_2d">2D rozlišení</string> + <string name="glasses_resolution_3d">3D rozlišení</string> + <string name="glasses_resolution_vr">VR rozlišení</string> + <string name="glasses_resolution_auto">Automatické</string> + <string name="glasses_resolution_inherit">Stejné jako 2D / 3D</string> + <string name="glasses_resolution_hint">Výstupní rozlišení pro každé oko.</string> + <string name="glasses_refresh_30_hint">Povolte Hra na chytrých brýlích pro výběr nativního 30Hz režimu displeje.</string> + <string name="glasses_3dof">Virtuální obrazovka 3DoF</string> + <string name="glasses_3dof_hint">Ukotvěte ploché hry před sebe, abyste se mohli rozhlédnout. Povolí Hra na chytrých brýlích bez přepínání do 3D.</string> + <string name="glasses_screen_app_wide">Šířka a vzdálenost okamžitě aktualizují sledovanou virtuální obrazovku pro nabídky DroidDeck, hry a relace plochy.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Sledování polohy zahrnuje rotaci hlavy ve SteamVR. Pro sledování pouze rotace vypněte sledování polohy.</string> + <string name="glasses_head_tracking_spatial_hint">Řídí pohyb hlavy na virtuální obrazovce. Sledování polohy zahrnuje rotaci hlavy ve SteamVR.</string> + <string name="glasses_quick_actions">Rychlé akce</string> + <string name="glasses_recenter_screen_hint">Podívejte se, kam chcete umístit obrazovku, a poté resetujte centrum sledování, abyste nastavili její výšku a směr.</string> + <string name="glasses_recenter_joycons_button">Vycentrovat Joy-Con</string> + <string name="phone_camera_tracking_group">Fotoaparát telefonu – Experimentální</string> + <string name="phone_camera_tracking_setting">Sledování rukou nebo ovladačů Joy-Con</string> + <string name="glasses_6dof">Virtuální obrazovka s 6DoF</string> + <string name="glasses_position">Sledování polohy – experimentální</string> + <string name="glasses_position_hint">Fyzický pohyb ve VR a kolem virtuálních obrazovek. Restartování sledování chvíli trvá.</string> + <string name="glasses_eye_height">Aktuální výška očí nad podlahou</string> + <string name="glasses_floor">Nastavit úroveň podlahy z aktuální výšky</string> + <string name="glasses_floor_set">Nastavit úroveň podlahy</string> + <string name="glasses_spatial_setup">Nastavení a diagnostika stereo kamery</string> + <string name="glasses_spatial_setup_hint">Před hraním zkontrolujte kalibraci kamery a sledování rukou.</string> + <string name="glasses_spatial_open">Otevřít nastavení</string> + <string name="glasses_hands">Ovladače ovládané holýma rukama</string> + <string name="glasses_hands_hint">Použijte kamery chytrých brýlí k míření rukama, sevřením prstů pro kliknutí a sevřením ruky pro uchopení ve VR. Gamepady se pohybují a otáčejí. Nahrazuje sledování polohy Joy-Con. Během her může docházet ke zpoždění nebo ztrátě sledování.</string> + <string name="glasses_hands_ready_hint">Povolte ovladače ovládané holýma rukama pod kamerami Luma Ultra v režimu Sledování. Nejprve zobrazte otevřené ruce.</string> + <string name="glasses_hands_base">Sdílená kalibrace Luma Ultra</string> + <string name="glasses_hands_base_hint">Používání sdílené základny Luma Ultra. Kalibrace vlastních chytrých brýlí pro ověření jejich přesnosti.</string> + <string name="glasses_hands_calibration_verified">Naměřená kalibrace ověřena</string> + <string name="glasses_hands_calibration_required">Vyžadováno ověření</string> + <string name="glasses_hands_calibration_required_hint">Ovladače ovládané holýma rukama budou k dispozici po úspěšném provedení kontroly naměřené vzdálenosti.</string> + <string name="tracking_recovery_lost">Sledování ztraceno</string> + <string name="tracking_recovery_look">Pomalu se rozhlédněte v dobře osvětlené místnosti.\nUdržujte sledovací kamery v dostatečné vzdálenosti a natočte je k nábytku nebo jiným viditelným detailům.</string> + <string name="tracking_recovery_restart_help">Stále se zasekl? Na telefonu: chytré brýle → Sledování → Otevřít nastavení → Zobrazit diagnostiku → Restartovat sledování.</string> + <string name="tracking_recovery_disconnected">Chytré brýle odpojeny</string> + <string name="tracking_recovery_connect">Zkontrolujte připojení USB a znovu připojte chytré brýle.\nPokud se zobrazí výzva k přístupu přes USB na telefonu, přijměte ji.</string> + <string name="tracking_recovery_usb_help">Po připojení se pomalu rozhlédněte v dobře osvětlené místnosti a obnovte sledování.</string> + <string name="tracking_recovery_recenter">Je nutné znovu vycentrovat sledování</string> + <string name="tracking_recovery_recenter_steps">Sledování se vrátilo do nové polohy.\nPodívejte se dopředu a poté klepněte na resetovat centrum sledování na telefonu.</string> + <string name="tracking_recovery_recenter_help">Obnovení centra sledování najdete také v chytrých brýlích → Sledování → Otevřít nastavení. Vaše uložená kalibrace fotoaparátu se zachová.</string> + <string name="tracking_recovery_stabilizing">Chvíli vydržte</string> + <string name="tracking_recovery_hold">Probíhá resetování centra sledování.\nDržte chytré brýle stabilně, dokud se sledování neustálí.</string> + <string name="tracking_recovery_automatic">Tato obrazovka se automaticky zavře, když je připraveno sledování hlavy.</string> + <string name="glasses_steady_hand_aim">Stabilizované míření rukama</string> + <string name="glasses_steady_hand_aim_hint">Zamiřte z ramene přes dlaň. Vypněte pro otáčení ovládané zápěstím.</string> + <string name="spatial_title">Prostorové nastavení</string> + <string name="spatial_wait_tracking">Čekání na sledování…</string> + <string name="spatial_cameras_description">Levé a pravé sledovací kamery</string> + <string name="spatial_camera_sync">Synchronizace kamery</string> + <string name="spatial_ready">Připraveno</string> + <string name="spatial_sync_hint">Čekání na seřazení kamery a sledování hlavy. Udržujte chytré brýle připojené.</string> + <string name="spatial_prepare">1. Připravte kalibrační cíl</string> + <string name="spatial_print_actual">Tisk ve skutečné velikosti</string> + <string name="spatial_print_hint">Každý čtverec musí měřit 30 mm (1,181 palce). Připevněte list naplocho na pevný povrch na dobře osvětlené místo.</string> + <string name="spatial_print">Vytisknout kalibrační terč</string> + <string name="spatial_capture_group">2. Zachyťte různé pohledy</string> + <string name="spatial_board_stationary">Udržujte kalibrační cíl nehybný</string> + <string name="spatial_capture_hint">Posuňte chytré brýle blíže, dále a do stran. Otočte je doleva/doprava, nakloňte je nahoru/dolů a nakloňte je do stran. Ponechejte kalibrační cíl v obou kamerách a před každým zachycením se na chvíli zastavte.</string> + <string name="spatial_start">Spusťte novou kalibraci</string> + <string name="spatial_wait_sync">Čekání na synchronizaci kamery.</string> + <string name="spatial_start_hint">Spusťte novou kalibraci pro sběr pohledů.</string> + <string name="spatial_views_hint">Ponechat cíl kalibrace viditelný v obou náhledech. Zachyťte alespoň 24 ostrých pohledů z různých úhlů.</string> + <string name="spatial_capturing">Zachycuji…</string> + <string name="spatial_capture">Zachycení pohledu na cíl kalibrace</string> + <string name="spatial_alignment">Vypočítat zarovnání kamery</string> + <string name="spatial_calculating">Počítám…</string> + <string name="spatial_calculate">Vypočítat kalibraci</string> + <string name="spatial_distance_group">3. Zkontrolujte vzdálenost</string> + <string name="spatial_distance">Změřená vzdálenost</string> + <string name="spatial_distance_hint">Začněte na 12 palcích nebo 30 cm, aby byly vytištěné značky snadněji rozpoznatelné. Vyberte si přesné měření, které budete používat.</string> + <string name="spatial_camera_board_distance">Levá kamera do středu kalibračního cíle</string> + <string name="spatial_checking_distance">Kontrola vzdálenosti…</string> + <string name="spatial_validate">Ověřte vzdálenost</string> + <string name="spatial_diagnostics">Diagnostika</string> + <string name="spatial_show_diagnostics">Zobrazit diagnostiku</string> + <string name="spatial_diagnostics_hint">Nástroje pro obnovu časování a sledování kamery.</string> + <string name="spatial_camera_timing">Časování kamery</string> + <string name="spatial_hand_input">Vstup ze sledování rukou</string> + <string name="spatial_wait_timing">Čekání na časování kamery.</string> + <string name="spatial_frames">Snímky z fotoaparátu</string> + <string name="spatial_gpu">GPU detekce rukou</string> + <string name="spatial_gpu_hint">CPU je výchozí. GPU je experimentální a může způsobit restartování SteamVR. Tato volba se resetuje při restartu sledování.</string> + <string name="spatial_lite">Lite detekce modelů rukou</string> + <string name="spatial_lite_hint">Použijte detektor dlaní Lite a klíčové body Lite na rukou. Zkontrolujte přesnost míření, štípnutí a uchopení. Resetuje se při restartu sledování.</string> + <string name="spatial_adaptive">Automatická vstupní frekvence pro sledování rukou</string> + <string name="spatial_adaptive_hint">Upravte vstup podle rychlosti zpracování. Resetuje se při restartu sledování.</string> + <string name="spatial_half_rate">Limitní vstupní frekvence pro sledování rukou</string> + <string name="spatial_half_rate_hint">Použijte polovinu snímků z fotoaparátu. Vypněte pro porovnání maximální frekvence. Resetuje se při restartu sledování.</string> + <string name="spatial_diagnostic_capture">Diagnostické zachycení</string> + <string name="spatial_diagnostic_capture_hint">Lokálně uložte jeden pár stereo obrázků. Obrázky se ukládají pouze na vyžádání.</string> + <string name="spatial_save_frame">Uložte snímek z fotoaparátu</string> + <string name="spatial_restart_tracking">Restartujte sledování</string> + <string name="spatial_restart_hint">Použijte, pokud se sledování neobnoví v dobře osvětlené oblasti. Restart vyžaduje nový zdroj sledování.</string> + <string name="spatial_restart">Restartujte</string> + <string name="spatial_restart_title">Restartovat sledování?</string> + <string name="spatial_restart_confirm">Neuložené kalibrační pohledy budou ztraceny. Poté držte chytré brýle v klidu a resetujte centrum sledování, jakmile se sledování obnoví.</string> + <string name="spatial_views_count">Zachyceno %1$d / 24 zobrazení</string> + <string name="spatial_capture_paused">Záznam pozastaven: %1$s</string> + <string name="spatial_measure_hint">Míra %1$s. Ukažte kompletní kalibrační cíl v obou náhledech a poté nehybně podržte.</string> + <string name="spatial_timing_values">%1$.1f Hz • stáří snímku %2$.1f ms • zpracování %3$.1f ms</string> + <string name="spatial_input_values">Limit vstupu %1$.1f Hz • %2$.0f%% snímků z kamery. Sledování hlavy pokračuje na maximální frekvenci.</string> + <string name="spatial_frame_counts">%1$d zpracováno • %2$d zrušeno • %3$d přeskočeno limitem vstupu</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra kalibrace</string> + <string name="spatial_print_scale" formatted="false">Tisk při 100% / Skutečná velikost. Každý čtverec: 30 mm (1,181 palce).</string> + <string name="spatial_print_stationary">Udržujte kalibrační cíl plochý a nehybný; přesouvejte chytré brýle mezi snímky.</string> + <string name="spatial_print_check">Kontrola měřítka: 100 mm (3,937 palce) mezi dílky</string> + <string name="spatial_distance_12in">12 palců (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 palce)</string> + <string name="spatial_distance_20in">20 palců (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 palce)</string> + <string name="spatial_disabled">Zakázáno</string> + <string name="spatial_wait_stable">Čekání na stabilní sledování</string> + <string name="spatial_disconnected">Odpojeno</string> + <string name="spatial_hands_off">Ovladače ovládané holýma rukama jsou vypnuté</string> + <string name="spatial_tracking_off">Sledování polohy je vypnuto nebo jsou odpojeny chytré brýle</string> + <string name="spatial_recenter_pending">Požadováno resetování centra sledování – držte se v klidu, dokud se sledování nestabilizuje.</string> + <string name="spatial_tracking_lost">Sledování ztraceno – čelte dobře osvětlené oblasti s viditelnými detaily</string> + <string name="spatial_origin_changed">Změněn počátek sledování – klepněte na resetování centra sledování a poté držte v klidu.</string> + <string name="spatial_active">6DoF aktivní</string> + <string name="spatial_connect_hint">Připojte Luma Ultra a povolte sledování polohy.</string> + <string name="spatial_validation_session">Kalibrace ověřena pro toto připojení.</string> + <string name="spatial_validation_saved">Kalibrace ověřena a uložena.</string> + <string name="spatial_wait_cameras">Čekání na stereo kamery</string> + <string name="spatial_wait_hands">Čekání na sledování rukou</string> + <string name="spatial_collect_instructions">Udržujte kalibrační terč 5 × 7 nehybný. Zachyťte více než 24 pohledů při pohybu a otáčení chytrými brýlemi.</string> + <string name="spatial_capture_pending">Čekání na další snímek z kamery. Držte chytré brýle v klidu.</string> + <string name="spatial_validation_pending">Kontrola dalšího snímku z kamery. Udržujte celý kalibrační cíl viditelný a držte jej v klidu.</string> + <string name="spatial_start_first">Nejprve spusťte kalibraci</string> + <string name="spatial_no_camera_frame">Nedorazil žádný nový snímek z kamery. Zkontrolujte připojení chytrých brýlí a náhledy fotoaparátu a zkuste to znovu.</string> + <string name="spatial_clock_reset">Hodiny fotoaparátu byly resetovány</string> + <string name="spatial_frame_changed">Souřadnicový systém sledování se změnil. Vaše pohledy jsou uloženy pro přepočet. Obnovte centrum sledování a poté spusťte novou sadu pro zachycení dalších pohledů.</string> + <string name="spatial_device_loaded">načtena kalibrace zařízení</string> + <string name="spatial_base_loaded">Načtena základní kalibrace Luma Ultra</string> + <string name="spatial_calibration_needed">nutná kalibrace</string> + <string name="spatial_tap_start">Nejprve klepněte na Spustit novou kalibraci.</string> + <string name="spatial_capture_recenter_pending">Obnovení centra sledování čeká na stabilní sledování. Chvíli držte v klidu.</string> + <string name="spatial_capture_recenter">Sledování se změnilo. Klepněte jednou na resetování centra sledování a poté držte v klidu před zachycením.</string> + <string name="spatial_capture_unsynchronized">Snímek odmítnut: sledování hlavy nebylo synchronizované nebo se během snímání změnilo. Nehýbejte se a zkuste to znovu.</string> + <string name="spatial_align_first">Před kontrolou vzdálenosti vypočítejte vyrovnání kamery.</string> + <string name="spatial_processing_failed">zpracování fotoaparátu se nezdařilo</string> + <string name="spatial_hand_head_changed">Sledování hlavy se změnilo během detekce rukou</string> + <string name="spatial_hand_wait_sync">Čekání na synchronizaci kamery a hlavy</string> + <string name="spatial_no_wrists">Nebyla zjištěna žádná zápěstí. Držte rukojeti ovladače Joy-Con před chytrými brýlemi</string> + <string name="spatial_no_hands">Nebyly zjištěny žádné ruce. Ukažte před chytrými brýlemi otevřené dlaně</string> + <string name="spatial_one_camera_wrists">Zápěstí viditelná pouze v jedné kameře; ponechte úchyty ovladače ve sdíleném zobrazení</string> + <string name="spatial_one_camera_hands">Ruce viditelné pouze v jedné kameře; mějte obě dlaně ve sdíleném pohledu</string> + <string name="spatial_ambiguous_hands">Obě kamery vidí ruce, ale shoda vlevo/vpravo je nejednoznačná</string> + <string name="spatial_inconsistent_depth">Ruce byly detekovány, ale stereo hloubka je nekonzistentní</string> + <string name="spatial_rejected_wrist">Poloha zápěstí zamítnuta stereo nebo kontrolou pohybu</string> + <string name="spatial_inconsistent_palm">Byly zjištěny stereo body, ale geometrie dlaně je nekonzistentní</string> + <string name="spatial_hands_need_calibration">Dokončete kalibraci a kontrolu vzdálenosti pro aktivaci rukou</string> + <string name="spatial_hands_wait_stable">Čekání na stabilní sledování hlavy; resetování centra sledování je možné, pokud je požadováno.</string> + <string name="spatial_old_frame">Pozorování kamerou je příliš staré; čekání na nový pár</string> + <string name="spatial_fit_ready">Přizpůsobit %1$.2f pixelům. Změřte vybranou vzdálenost od levé kamery ke středu kalibračního cíle a poté potvrďte.</string> + <string name="spatial_opencv_error">OpenCV není k dispozici: %1$s</string> + <string name="spatial_restored">Bylo obnoveno %1$d uložených zobrazení. Vypočítejte kalibraci a zkuste to znovu, nebo spusťte novou sadu a zachyťte více.</string> + <string name="spatial_captured">Pořízeno %1$d / 24 zobrazení. Udržujte kalibrační cíl pevný; posuňte chytré brýle pro další pohled.</string> + <string name="spatial_capture_corners">Snímek zamítnut: %1$d / 12 požadovaných rohů viditelných v obou kamerách. Ukažte více z kalibračního cíle, nehýbejte se a zkuste to znovu.</string> + <string name="spatial_validation_error">Kontrola vzdálenosti nemohla být dokončena: %1$s. Zkuste to znovu.</string> + <string name="spatial_inference_error">Detekce rukou není k dispozici: %1$s. Změňte CPU/GPU nebo přepněte řadiče ovládané holýma rukama a zkuste to znovu.</string> + <string name="spatial_hand_timeout">Detekce rukou přesáhla %1$d ms; pozorování vyřazeno</string> + <string name="spatial_wrists_tracked">%1$d / 2 polohy zápěstí Joy-Con měřené stereo</string> + <string name="spatial_palms_tracked">Sledované dlaně: %1$d / 2; připraveno sevření prstů: %2$d; připraveno uchopení: %3$d</string> + <string name="spatial_capture_saved">Diagnostický záznam byl uložen do %1$s</string> + <string name="spatial_hand_error">Sledování rukou zastaveno: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Sledování hlavy a kalibrační cíl nesouhlasí podle %1$s (limit 5 cm / 2 palce). Před spuštěním nové sady ponechte kalibrační cíl pevný a počkejte na stabilní sledování. Chytré brýle jemně otáčejte a naklánějte; pauza před každým zachycením.</string> + <string name="spatial_need_views">Zachyťte alespoň 24 různých pohledů na stacionární kalibrační cíl.</string> + <string name="spatial_need_rotation">Otočte chytré brýle doleva a doprava a naklánějte je nahoru a dolů; pohyb bez rotace nemůže kalibrovat zarovnání kamery.</string> + <string name="spatial_bad_baseline">Nepravděpodobná základní linie fotoaparátu</string> + <string name="spatial_need_orientations">Pohybujte hlavou různými směry.</string> + <string name="spatial_bad_rotation">Neplatné otáčení kamery proti hlavě</string> + <string name="spatial_bad_alignment">Zarovnání mezi kamerou a hlavou je nekonzistentní.</string> + <string name="spatial_calibration_error">Kalibraci nelze dokončit. %1$s Vaše zachycená zobrazení jsou uložena.</string> + <string name="spatial_reprojection_error">Zpožděná chyba reprojekce %1$.2f px přesahuje 2 px. Překalibrovat.</string> + <string name="spatial_distance_corners">%1$d / 24 šachovnicových rohů zjištěno v obou kamerách. Udržujte celý kalibrační cíl viditelný a držte jej v klidu. Pokud je již viditelná, vyberte 12 palců nebo 30 cm a před dalším pokusem změřte tuto bližší vzdálenost.</string> + <string name="spatial_distance_depth">Kalibrační terč je viditelný, ale jeho hloubku nebylo možné spolehlivě změřit. Držte chytré brýle v klidu a udržujte kalibrační terč plochý a dobře osvětlený, pak to zkuste znovu.</string> + <string name="spatial_distance_invalid">Měření kamery bylo neplatné. Nehýbejte se a zkuste to znovu.</string> + <string name="spatial_distance_passed">Kontrola vzdálenosti prošla.</string> + <string name="spatial_distance_retry">Znovu zkontrolujte vzdálenost od levé kamery ke středu kalibračního cíle a zkuste to znovu.</string> + <string name="spatial_distance_result">Fotoaparáty naměřeny %1$s; vybraná vzdálenost %2$s. %3$s</string> + <string name="spatial_wait_previews">Před zahájením kalibrace počkejte na náhledy obou kamer.</string> + <string name="spatial_saved_views_hint">Uložená zobrazení lze přepočítat. Spusťte novou kalibraci pro zachycení v aktuálním sledovacím souřadnicovém systému.</string> + <string name="spatial_model_checksum_error">Neshoda kontrolního součtu modelu ruky</string> + <string name="spatial_opencv_load_error">OpenCV se nepodařilo načíst</string> +</resources> diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml new file mode 100644 index 0000000000..6186aa6a64 --- /dev/null +++ b/app/src/main/res/values-da/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">SteamVR-grafikken stoppede</string> + <string name="steamvr_recovery_countdown">DroidDeck genstarter om %1$d sekunder for at nulstille grafikken og åbne SteamVR igen. Dit kørende spil lukkes; ikke-gemte fremskridt kan ikke gendannes.</string> + <string name="steamvr_recovery_repeated">Grafikfejlen opstod igen efter en nylig genstart. Automatisk gendannelse er sat på pause for at undgå en løkke. Genstart lukker dit spil; ikke-gemte fremskridt kan ikke gendannes.</string> + <string name="steamvr_recovery_restart">Genstart nu</string> + <string name="steamvr_recovery_cancel">Hold åben</string> + <string name="steamvr_recovery_restarting">Nulstiller grafikken og åbner SteamVR igen…</string> + <string name="steamvr_recovery_failed">DroidDeck kunne ikke genstarte automatisk. Luk appen helt, og åbn den så igen.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Den første start downloader Steam. Det kan tage nogle minutter.</item> + <item>Som standard sætter Steam på pause, når du forlader appen, og fortsætter, hvor du slap, når du kommer tilbage.</item> + <item>Din controller vises som en Xbox 360-controller. Brug ellers kontrollerne på skærmen.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Den første start sætter skrivebordet op. Det kan tage nogle minutter.</item> + <item>Som standard sætter sessionen på pause, når du forlader appen, og fortsætter, hvor du slap, når du kommer tilbage.</item> + <item>Berøring fungerer som et touchpad: Træk for at flytte markøren, tryk for at klikke.</item> + <item>Din controller vises som en Xbox 360-controller. Brug ellers kontrollerne på skærmen.</item> + </string-array> + <string name="session_channel">Session</string> + <string name="session_channel_description">Vises, når en Steam- eller skrivebordssession er åben</string> + <string name="session_notification">Steam kører</string> + <string name="session_notification_downloads">Steam-download i gang</string> + <string name="session_notification_paused">Session på pause – tryk på Genoptag, når du er klar</string> + <string name="resume_session">Genoptag</string> + <string name="suspend_now">Sæt på pause nu</string> + <string name="stop_session">Afslut session</string> + <string name="frame_gen_title">Billedgenerering</string> + <string name="frame_gen_hint">Vælg metode til billedgenerering</string> + <string name="frame_gen_off">Fra</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptiv %1$d</string> + <string name="lsfg_needs_steam">Kræver Lossless Scaling på Steam</string> + <string name="lsfg_needs_install">Installer Lossless Scaling via Steam, eller importer Lossless.dll</string> + <string name="lsfg_import">Importer Lossless.dll…</string> + <string name="lsfg_using_steam">Bruger kopien fra Steam</string> + <string name="lsfg_using_import">Bruger en importeret kopi</string> + <string name="lsfg_pick_title">Vælg Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll importeret</string> + <string name="lsfg_import_unchanged">Denne Lossless.dll er allerede i brug</string> + <string name="lsfg_import_not_owned">Lossless Scaling ejes ikke på denne Steam-konto</string> + <string name="lsfg_import_invalid">Denne fil er ikke Lossless Scalings Lossless.dll</string> + <string name="lsfg_import_failed">Kunne ikke forberede LSFG fra denne Lossless.dll</string> + <string name="lsfg_problem_missing">LSFG kræver Lossless Scaling fra Steam eller en importeret Lossless.dll</string> + <string name="lsfg_problem_failed">LSFG kunne ikke forberede sine shadere fra Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: ikke understøttet</string> + <string name="hud_fg_failed">%1$s: motoren fejlede</string> + <string name="hud_fg_needs_lossless">%1$s: kræver Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · starter</string> + <string name="second_library_import_hint">Tilføjer et Steam-bibliotek og scanner det for Windows-spil. Ejede spil bruger deres Steam-poster; resten bliver genveje til spil, der ikke er fra Steam.</string> + <string name="game_env_title">Spilmiljø</string> + <string name="game_env_hint">Miljøvariabler for Proton-spil.</string> + <string name="game_env_edit">Rediger</string> + <string name="game_env_shared">Alle Proton-spil</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">Steam-app-id</string> + <string name="game_env_open">Åbn</string> + <string name="game_env_profile">Spil %1$s</string> + <string name="game_env_add">Tilføj variabel</string> + <string name="game_env_name">Variabelnavn</string> + <string name="game_env_value">Værdi</string> + <string name="game_env_save">Gem</string> + <string name="game_env_remove">Fjern</string> + <string name="game_env_restore">Nedarv igen</string> + <string name="game_env_reset">Ryd miljøtilsidesættelser</string> + <string name="game_env_unset">Fjern for denne profil</string> + <string name="game_env_empty">Ingen variabler angivet.</string> + <string name="game_env_inherited">Nedarvet</string> + <string name="game_env_custom">Brugerdefineret variabel</string> + <string name="game_env_error">Kunne ikke indlæse eller gemme. Kontroller ledig lagerplads, og prøv igen.</string> + <string name="game_env_invalid">Brug et gyldigt navn og en værdi på op til 8192 tegn.</string> + <string name="game_env_unused">Den almindelige Proton-runtime læser ikke denne variabel.</string> + <string name="game_env_loading">Indlæser…</string> + <string name="game_env_feature">Tilsidesættelse af D3D12-funktionsniveau. 12_2 rapporterer DirectX 12 Ultimate-funktioner; ikke-understøttede funktioner kan fejle. Lad stå tomt for automatisk registrering.</string> + <string name="game_env_shader">Tilsidesættelse af D3D12-shadermodel. 6_9 kræver en tilstrækkeligt ny VKD3D og matchende GPU-funktioner. Lad stå tomt for automatisk registrering.</string> + <string name="game_env_cache">Behold Mesa-shader-cache aktiveret for at reducere gentagen kompilering. false aktiverer caching.</string> + <string name="game_env_cache_size">Maksimal størrelse for Mesa-shader-cache, f.eks. 1G. Større cache bruger mere lagerplads.</string> + <string name="game_env_vkd3d_config">VKD3D-indstillinger for D3D12. nodxr deaktiverer ray tracing; brug kun til et spil, der har brug for det.</string> + <string name="game_env_proton_log">Sæt til 1 for en diagnostisk Proton-log. Logning kan reducere ydelsen og bruge lagerplads.</string> + <string name="game_env_wined3d">Sæt til 1 for at bruge OpenGL-baseret WineD3D i stedet for DXVK til D3D9–11-kompatibilitetstest.</string> + <string name="game_env_no_ntsync">Sæt til 1 for at holde dette spil væk fra ntsync (droiddeck-ntsync eller en kerneldriver); det bruger droiddeck-esync, hvor en pack findes, ellers droiddeck-fsync.</string> + <string name="game_env_no_esync">Sæt til 1 for at slå droiddeck-esync fra for dette spil; det bruger droiddeck-fsync i stedet, eller droiddeck-ntsync hvis fsync også er fra.</string> + <string name="game_env_no_fsync">Sæt til 1 for at holde dette spil væk fra droiddeck-fsync; det bruger droiddeck-esync, hvor en pack findes, ellers droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Sæt til 1 for at køre dette spil på droiddeck-fsync, eller 0 for at sætte droiddeck-esync først, hvor en pack passer til dets Proton.</string> + <string name="game_env_xalia">Sæt til 0 for at deaktivere Protons gamepad-navigationshjælper for dette spil.</string> + <string name="game_env_hud">DXVK-overlay til D3D9–11. fps viser billedhastigheden; lad stå tomt for at skjule den.</string> + <string name="game_env_dxvk_config">DXVK-indstillinger adskilt af semikolon. Nyere builds bruger dxvk.maxFrameRate til at begrænse billedhastigheden; foretræk sessionens billedgrænse til almindeligt spil.</string> + <string name="game_env_vkd3d_limit">Grænse for D3D12-billedhastighed. 0 deaktiverer grænsen.</string> + <string name="game_env_glthread">Mesa OpenGL-threading. true kan hjælpe CPU-begrænsede OpenGL-spil; test for hvert spil.</string> + <string name="sync_backend_title">Wine-synkronisering</string> + <string name="sync_backend_hint">Hvordan spil holder deres tråde i trit. Gælder fra næste session.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">FEX-forudindstilling</string> + <string name="fex_next_launch">Gælder fra næste spilstart.</string> + <string name="game_settings_title">Spil</string> + <string name="fex_default_label">FEX-standard</string> + <string name="fex_default_detail">Bruger FEX-standardindstillinger.</string> + <string name="fex_stability_label">Stabilitet</string> + <string name="fex_stability_detail">De sikreste, langsomste indstillinger.</string> + <string name="fex_compatibility_label">Kompatibilitet</string> + <string name="fex_compatibility_detail">Fuld TSO med multiblock.</string> + <string name="fex_intermediate_label">Mellemniveau</string> + <string name="fex_intermediate_detail">Afbalanceret TSO med reduceret x87-præcision.</string> + <string name="fex_performance_label">Ydelse</string> + <string name="fex_performance_detail">Al TSO deaktiveret; multiblock.</string> + <string name="fex_performance_tso_label">Ydelse + TSO</string> + <string name="fex_performance_tso_detail">Ydelsesindstillinger med primær TSO aktiveret.</string> + <string name="fex_extreme_label">Ekstrem</string> + <string name="fex_extreme_detail">Deaktiverer kontrol af selvmodificerende kode. JIT-spil og DRM kan gå i stykker.</string> + <string name="fex_extreme_tso_label">Ekstrem + TSO</string> + <string name="fex_extreme_tso_detail">Ekstreme indstillinger med primær TSO aktiveret.</string> + <string name="fex_extreme_gn_label">Ekstrem-gn</string> + <string name="fex_extreme_gn_detail">Ydelse med TSC og metadata-hints. Prøv før Ekstrem.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Ydelse med fuld kodekontrol og hypervisor-bit skjult.</string> + <string name="game_env_custom_value">Brugerdefineret værdi</string> + <string name="game_env_select_value">Vælg værdi</string> + <string name="user_apps_section">Emulatorer & apps</string> + <string name="user_apps_add">Tilføj</string> + <string name="user_apps_add_detail">Din egen app eller spil</string> + <string name="user_apps_kind_script">Script</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Starter…</string> + <string name="user_apps_added">%1$s tilføjet</string> + <string name="user_apps_removed">%1$s fjernet</string> + <string name="user_apps_back">Skrivebord</string> + <string name="user_apps_gone">Den app findes ikke længere. Vælg den igen fra Skrivebord.</string> + <string name="user_apps_open">Åbn %1$s</string> + <string name="user_apps_remove">Fjern</string> + <string name="user_apps_remove_confirm">Tryk igen for at fjerne</string> + <string name="user_apps_stop_session">Afslut sessionen for at fjerne</string> + <string name="user_apps_script_linked">Kører %1$s fra dens egen mappe, linket ind i sessionen, hvor den ligger. Fjernes appen, lades mappen urørt.</string> + <string name="user_apps_script_copied">Kører %1$s fra en kopi af dens mappe inde i DroidDeck. Fjernes appen, slettes kopien, ikke originalen.</string> + <string name="user_apps_runtime_required">Installer Linux-runtimen først</string> + <string name="user_apps_file_gone">Filen findes ikke længere</string> + <string name="user_apps_no_space">Ikke nok ledig plads: kopiering af mappen kræver %1$s</string> + <string name="user_apps_copying">Kopierer %1$s</string> + <string name="user_apps_failed">Det mislykkedes at tilføje appen</string> + <string name="user_apps_github_checking">Søger efter en udgivelse af %1$s</string> + <string name="user_apps_github_unreachable">Kunne ikke læse udgivelserne for %1$s</string> + <string name="user_apps_github_no_appimage">Ingen udgivelse af %1$s har en ARM64- eller x86_64-AppImage</string> + <string name="user_apps_downloading">Downloader %1$s</string> + <string name="user_apps_download_failed">Download mislykkedes</string> + <string name="user_apps_update_failed">Det mislykkedes at opdatere appen</string> + <string name="user_apps_icon_failed">Det ikon kunne ikke læses</string> + <string name="user_apps_saved">%1$s gemt</string> + <string name="user_apps_edit">Rediger</string> + <string name="user_apps_check_updates">Søg efter opdateringer</string> + <string name="user_apps_checking_updates">Søger efter opdateringer…</string> + <string name="user_apps_update_to">Opdater til %1$s</string> + <string name="user_apps_up_to_date">Opdateret · %1$s</string> + <string name="user_apps_updated">%1$s opdateret</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Tilføj en app</string> + <string name="add_app_tab_script">Script</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">En .sh-fil. Den køres fra sin egen mappe i fuld skærm under gamescope.</string> + <string name="add_app_appimage_hint">En ARM64 (aarch64) AppImage, eller en x86_64-udgave, der køres via FEX. Den udpakkes i Linux-runtimen én gang.</string> + <string name="add_app_github_hint">Installerer den nyeste udgivelse af ARM64-AppImage fra repositoryet, eller x86_64-udgaven via FEX.</string> + <string name="app_fex_title">Brug FEX</string> + <string name="app_fex_auto">Auto</string> + <string name="app_fex_on">Til</string> + <string name="app_fex_off">Fra</string> + <string name="app_fex_hint">FEX kører x86-Linux-programmer på denne ARM64-enhed. Auto bruger det, når programmet er bygget til x86.</string> + <string name="app_fex_x86">%1$s via FEX</string> + <string name="app_fex_not_ready">Dette program er bygget til %1$s-pc’er og køres via FEX, som ikke er sat op endnu. Åbn Steam én gang, mens du er logget ind: DroidDeck downloader så FEX og den Steam Linux Runtime, det kræver, hvorefter dette åbner.</string> + <string name="session_end_program">Dette program</string> + <string name="session_end_fex_missing">%1$s er bygget til x86-pc’er og køres via FEX, som ikke er installeret endnu. Start Steam én gang, mens du er logget ind, og lad det downloade FEX og Steam Linux Runtime, og start så dette igen.</string> + <string name="add_app_flatpak_hint">Et Flathub-app-id eller dens Flathub-side. Flatpak sættes op først, hvis det ikke allerede er.</string> + <string name="add_app_file">Fil</string> + <string name="add_app_no_file">Ingen fil valgt</string> + <string name="add_app_choose_file">Vælg fil</string> + <string name="add_app_change_file">Skift</string> + <string name="add_app_pick_script">Vælg et script</string> + <string name="add_app_pick_appimage">Vælg en AppImage</string> + <string name="add_app_pick_icon">Vælg et ikon</string> + <string name="add_app_repository">Repository</string> + <string name="add_app_repository_placeholder">ejer/repo eller et github.com-link</string> + <string name="add_app_repository_invalid">Ikke et GitHub-repository</string> + <string name="add_app_flatpak_id">App-id</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Ikke et Flathub-app-id</string> + <string name="add_app_flatpak_bundle_hint">Eller en .flatpak-fil til en app, der ikke findes på Flathub.</string> + <string name="add_app_pick_flatpak">Vælg en .flatpak-fil</string> + <string name="add_app_source">Kilde</string> + <string name="add_app_appearance">På dit skrivebord</string> + <string name="add_app_preview_name">Ny app</string> + <string name="add_app_name">Navn</string> + <string name="add_app_name_placeholder">Fra appen</string> + <string name="add_app_icon">Ikon</string> + <string name="add_app_icon_default">Standardikon</string> + <string name="add_app_choose_icon">Vælg ikon</string> + <string name="add_app_clear_icon">Ryd</string> + <string name="add_app_icon_suggestions">Fra repositoryet</string> + <string name="add_app_icon_searching">Søger efter ikoner…</string> + <string name="add_app_icon_reset">Standard</string> + <string name="edit_app_title">Rediger %1$s</string> + <string name="edit_app_save">Gem</string> + <string name="add_app_checking_folder">Kontrollerer mappen…</string> + <string name="add_app_folder_linked">Dens mappe er linket ind i sessionen: %1$s</string> + <string name="add_app_folder_copied">Dens mappe indeholder Linux-programmer, som delt lager ikke kan køre, så den kopieres ind i DroidDeck (%1$s).</string> + <string name="add_app_confirm">Tilføj</string> + <string name="add_app_cancel">Annuller</string> + <string name="add_app_runtime_required">Installer Linux-runtimen fra Opsætning først.</string> + <string name="add_app_busy">Vent på, at %1$s er færdig.</string> + <string name="steam_compat_label">Kompatibel</string> + <string name="proton_compatible_note">Builds markeret med “%1$s” i Steams kompatibilitetsmenu har DroidDecks prefix-fixes og kan starte spil på denne enhed. Standarden er Proton Experimental ARM64 (%1$s), eller Proton 11.0 ARM64 (%1$s), når den nyere build er installeret. Valves egne Proton-poster uden mærket kan ikke starte et spil på denne enhed.</string> + <string name="proton_installed_compatible">Installeret %1$s · %2$s</string> + <string name="common_cancel">Annuller</string> + <string name="common_auto">Auto</string> + <string name="common_never">Aldrig</string> + <string name="common_always">Altid</string> + <string name="common_uninstall">Afinstaller</string> + <string name="common_check">Kontroller</string> + <string name="common_update">Opdater</string> + <string name="common_checking">Kontrollerer…</string> + <string name="common_working">Arbejder…</string> + <string name="common_forget">Glem</string> + <string name="common_add_ellipsis">Tilføj…</string> + <string name="common_use">Brug</string> + <string name="common_applies_next_session">Gælder fra næste session.</string> + <string name="mode_steam_title">Steam-session</string> + <string name="mode_desktop_title">Skrivebordssession</string> + <string name="mode_display">Skærm</string> + <string name="mode_resolution">Opløsning</string> + <string name="mode_res_720">Op til 720p</string> + <string name="mode_res_900">Op til 900p</string> + <string name="mode_res_1080">Op til 1080p</string> + <string name="mode_res_native">Native</string> + <string name="mode_res_default">%1$s (standard)</string> + <string name="mode_res_custom_value">Brugerdefineret · %1$d×%2$d</string> + <string name="mode_res_custom">Brugerdefineret…</string> + <string name="mode_res_note">720p kan gøre menuer mere lydhøre.</string> + <string name="mode_ratio">Billedformat</string> + <string name="mode_ratio_custom">Angivet af den brugerdefinerede opløsning.</string> + <string name="mode_ratio_auto">Auto bruger mindst 16:9.</string> + <string name="mode_fps">Billedgrænse</string> + <string name="mode_fps_note">Begrænser hele sessionen. Skærmen skifter til en opdateringshastighed, grænsen går lige op med.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10-output</string> + <string name="mode_hdr_unavailable">Ikke tilgængelig: %1$s.</string> + <string name="mode_hdr_restart">Genstart appen for at anvende ændringen.</string> + <string name="mode_drivers">Drivere</string> + <string name="mode_gpu_drivers">GPU-drivere</string> + <string name="mode_gpu_drivers_hint">Delt mellem Steam og Skrivebord. Indstilles på siden Komponenter.</string> + <string name="mode_touch_controls">Berøring & controller</string> + <string name="mode_touch">Berøring</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Direkte</string> + <string name="mode_touch_note">Auto: touchpad på Skrivebord, direkte i Steam.</string> + <string name="mode_osc">Kontroller på skærmen</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Auto viser kontrollerne, når ingen controller er tilsluttet.</string> + <string name="osc_steam_touch">Steam-berøring (beta)</string> + <string name="osc_style_next_session">Steams berøringskontroller starter med næste Steam-session</string> + <string name="osc_steam_layout">Steam-berøringslayout</string> + <string name="osc_steam_layout_hint">Flyt, tilpas størrelsen på eller skjul dette spils berøringskontroller; gemmes til Steam</string> + <string name="mode_controller">Controller</string> + <string name="mode_controller_hint">Hvordan Steam ser din controller. Gælder fra næste session.</string> + <string name="mode_controller_deck">Steam Deck-controller</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Xbox 360-controller</string> + <string name="mode_controller_note">Deck: Hurtig adgang-knap og gyro. Steam Controller: det samme, med gribefølsomme bagknapper. DualShock 4 og DualSense: gyro, og touchpaddene som deres touchpad. Xbox 360: åbn Hurtig adgang med Guide+A.</string> + <string name="mode_back">Tilbage</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Session</string> + <string name="mode_suspend">Baggrundsopførsel</string> + <string name="mode_suspend_hint">Når appen er skjult, eller skærmen slukkes.</string> + <string name="mode_suspend_manual">Manuel</string> + <string name="mode_suspend_native">Native</string> + <string name="mode_suspend_steam_note">Auto sætter på pause og genoptager, når den vises. Native forbereder Steam til dvale først. Manuel venter på Genoptag. Aldrig fortsætter med at køre.</string> + <string name="mode_background_downloads">Fortsæt downloads</string> + <string name="mode_background_downloads_hint">Udskyder baggrundspause, mens Steam aktivt downloader.</string> + <string name="mode_zram">zRAM-komprimering</string> + <string name="mode_zram_hint">Mens et spil kører, komprimeres Steam-klientens hukommelse til enhedens zram, så spillet får mere RAM. Gælder næste gang Steam starter.</string> + <string name="mode_zram_unsupported">Ikke tilgængeligt: enheden har ingen zram eller swap, eller kernen er ældre end 5.4.</string> + <string name="mode_suspend_note">Auto sætter på pause i baggrunden og genoptager, når den vises. Manuel venter på Genoptag. Aldrig fortsætter med at køre.</string> + <string name="mode_startup">Opstart</string> + <string name="mode_steam_startup">Start Steam med DroidDeck</string> + <string name="mode_steam_startup_hint">Åbner Steam-sessionen, når DroidDeck starter.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Søger efter udgivelser…</string> + <string name="mode_decky_ready">Klar til at installere %1$s.</string> + <string name="mode_decky_none">Ingen kompatibel build fundet. Prøv igen senere.</string> + <string name="mode_decky_installed">Installeret · %1$s</string> + <string name="mode_decky_update">Opdatering tilgængelig · %1$s</string> + <string name="mode_decky_current">Opdateret · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Installer nyeste</string> + <string name="mode_decky_on">Starter med Steam. Mens den er til, kan andre apps på denne enhed muligvis styre Steam.</string> + <string name="mode_decky_off">Fra. Steams fjerndebugport forbliver lukket.</string> + <string name="mode_decky_remove_title">Afinstaller Decky Loader?</string> + <string name="mode_decky_remove_text">Fjerner loaderen. Dine plugins og indstillinger bevares.</string> + <string name="mode_client">Klient</string> + <string name="mode_mangoapp">Ydelsesoverlay</string> + <string name="mode_mangoapp_hint">Slå fra, hvis spil går ned eller bliver sorte i Deck-tilstand. Gælder fra næste session.</string> + <string name="mode_steam_repair">Reparer Steam-klienten</string> + <string name="mode_steam_repair_hint">Downloader Steam-klienten igen, næste gang Steam starter. Brug det, hvis Steam bliver hængende på sin indlæsningsskærm. Spil, login og indstillinger bevares.</string> + <string name="mode_steam_repair_queued">Steam-klienten downloades igen, næste gang Steam starter.</string> + <string name="mode_steam_repair_button">Reparer</string> + <string name="mode_added_art">Grafik</string> + <string name="mode_sgdb_key">SteamGridDB API-nøgle</string> + <string name="mode_sgdb_key_yours">Din nøgle</string> + <string name="mode_sgdb_edit">Rediger…</string> + <string name="mode_added_art_hint">Udfylder manglende grafik fra Steam, derefter SteamGridDB. Din egen cover.jpg, hero.jpg, logo.png eller icon.png i spillets mappe har forrang.</string> + <string name="summary_remove_game">Fjern %1$s</string> + <string name="mode_added_remove_confirm">Fjern?</string> + <string name="games_add">Tilføj spil</string> + <string name="games_add_title">Tilføj et spil:</string> + <string name="games_pick_exe_title">Vælg exe-filen:</string> + <string name="games_add_unreachable">Denne placering er ikke tilgængelig i sessionen</string> + <string name="mode_added_exe_check">Kontroller denne exe-fil</string> + <string name="wincomp_title">Windows-komponenter</string> + <string name="wincomp_pad_hint">LB/RB skifter mellem afsnittene.</string> + <string name="wincomp_card_none">Ingen</string> + <string name="wincomp_applies">Windows-dll’er, Proton ikke inkluderer, fra komponentlisten. Slå dem til, som dette spil har brug for: de lægges ind i spillets egen Windows-mappe, aldrig dets egne filer, og følger med, uanset hvilken Proton det køres på.</string> + <string name="wincomp_offline">Kunne ikke nå komponentlisten. Komponenter, der allerede er downloadet, kan stadig skiftes.</string> + <string name="wincomp_recommended">Anbefalet til dette spil</string> + <string name="wincomp_checking">Kontrollerer, hvad dette spil har brug for…</string> + <string name="wincomp_when_online">Tilgængelig online</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Slår %1$d komponent til…</item> + <item quantity="other">Slår %1$d komponenter til…</item> + </plurals> + <string name="wincomp_auto_section">Til for dette spil</string> + <string name="wincomp_auto_steam">Steam installerer %1$s med %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">Fra GOG’s liste for dette spil</string> + <string name="wincomp_auto_epic">Fra Epics forudsætninger for dette spil</string> + <string name="wincomp_auto_amazon">Fra Amazons installationstrin for dette spil</string> + <string name="wincomp_steam_by_name">Steam installerer %1$s med app %2$s, matchet efter navn</string> + <string name="wincomp_suggestions">Også på listen</string> + <string name="wincomp_suggestion_reason">Angivet af %1$s; ikke en komponent her</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Spillet leveres med %1$s</string> + <string name="wincomp_found_shipped">Spillet har %1$s (fungerer tit som det er)</string> + <string name="wincomp_already_here">Allerede i dette spil</string> + <string name="wincomp_no_recommendation">Intet i spillets mappe peger på en komponent.</string> + <string name="wincomp_active">Installeret til dette spil (%1$d)</string> + <string name="wincomp_all">Alle komponenter (%1$d)</string> + <string name="wincomp_installers">Kræver et Windows-installationsprogram (%1$d)</string> + <string name="wincomp_installers_note">Disse er deres egne installationsprogrammer uden en pakke indeni at tage fra hinanden, og der er endnu ikke registreret, hvad de installerer. De fleste er gamle runtimes, som Mono inde i Proton allerede dækker; registreringer tilføjes, når de bliver lavet.</string> + <string name="wincomp_show">Vis</string> + <string name="wincomp_hide">Skjul</string> + <string name="wincomp_needs_installer">Kører sit eget installationsprogram (endnu ikke registreret)</string> + <string name="wincomp_unsupported">Ikke understøttet her endnu</string> + <string name="wincomp_loading">Indlæser komponenterne…</string> + <string name="wincomp_failed">Kunne ikke installere: %1$s</string> + <string name="wincomp_downloaded">Downloadet</string> + <string name="wincomp_downloading">Downloader %1$s</string> + <string name="wincomp_installing">Installerer: %1$s</string> + <string name="wincomp_reverting">Slår fra…</string> + <string name="wincomp_download_size">%1$s download</string> + <string name="wincomp_next_launch">Træder i kraft, næste gang spillet starter.</string> + <string name="mode_stretch169">Stræk 16:9-spil</string> + <string name="mode_stretch169_hint">På skærme mere kvadratiske end 16:9 strækkes spil, så de udfylder skærmen, i stedet for at vise sorte bjælker. Gælder fra næste session.</string> + <string name="mode_audio">Lyd</string> + <string name="mode_directaudio">DirectAudio til spil</string> + <string name="mode_directaudio_hint">Går uden om PulseAudio for lavere forsinkelse.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">Til voicechat.</string> + <string name="mode_network">Netværk</string> + <string name="mode_wifi_discovery">Wi-Fi-søgning</string> + <string name="mode_wifi_discovery_hint">Vis Wi-Fi-navne og netværk i nærheden i Steam.</string> + <string name="mode_wifi_location_off">Placeringstjenester er fra.</string> + <string name="mode_wifi_permission_denied">Placeringstilladelse ikke givet.</string> + <string name="mode_wifi_open_settings">Åbn indstillinger</string> + <string name="mode_wifi_continue">Fortsæt</string> + <string name="mode_wifi_explain_title">Aktiver Wi-Fi-søgning?</string> + <string name="mode_wifi_explain_text">Android kræver placeringstilladelse for at læse Wi-Fi-navne og finde netværk i nærheden. DroidDeck bruger denne adgang til at vise disse netværk i Steam. Vi registrerer ikke din placering. Internetadgang fungerer uden denne tilladelse.</string> + <string name="mode_storage">Spillager</string> + <string name="mode_storage_auto">Automatisk – SD-kortet, når det er isat, plus dine Spil-mapper</string> + <string name="mode_storage_auto_none">Automatisk – dine Spil-mapper, plus SD-kortet, når det er isat (ingen nu)</string> + <string name="mode_storage_internal">Kun internt</string> + <string name="mode_storage_folder">Mappe: %1$s</string> + <string name="mode_second_library">Andet bibliotek</string> + <string name="mode_storage_note">Spil, der streamer data fra SD-kort eller delt lager, kan stamme.</string> + <string name="mode_storage_diagnostics">Lagerdiagnostik</string> + <string name="mode_storage_diagnostics_hint">Registrerer allokeringsresultater og lagertider i Del logs. Kan gøre installationer langsommere, mens det er aktivt. Gælder fra næste session.</string> + <string name="mode_choose_folder">Vælg en mappe…</string> + <string name="mode_custom_res_title">Brugerdefineret opløsning</string> + <string name="mode_custom_res_text">Erstatter grænsen og billedformatet. En størrelse, der ikke matcher skærmen, giver sorte bjælker.</string> + <string name="mode_width">Bredde</string> + <string name="mode_height">Højde</string> + <string name="mode_custom_res_range">Mellem 320×240 og 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d spil</item> + <item quantity="other">%1$d spil</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Slet</string> + <string name="common_restore">Gendan</string> + <string name="common_download">Download</string> + <string name="common_delete_named">Slet %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Runtimedriver</string> + <string name="comp_runtime_driver_hint">Bruges af Steam, spil og skrivebordet. Gælder fra næste session.</string> + <string name="comp_import_turnip">Importer Turnip-zip…</string> + <string name="comp_display_driver">Skærmdriver</string> + <string name="comp_display_driver_hint">Tegner billeder til skærmen i begge tilstande. Genstart appen for at anvende.</string> + <string name="comp_import_adrenotools">Importer en AdrenoTools-zip…</string> + <string name="comp_never">aldrig</string> + <string name="comp_nightlies_checked">Nightlies kontrolleret %1$s</string> + <string name="comp_title">Komponenter</string> + <string name="comp_about">Om Komponenter</string> + <string name="comp_check_drivers">Søg efter nye drivere</string> + <string name="comp_check_nightlies">Søg Nightlies for nye pakker</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Den Proton, der vælges her, kører alle spil, der ikke selv har valgt en i Steam, og en ændring foretaget i Steam vises også her. Steam erstatter Valves Proton, når den opdaterer; originalerne bevares for hver build.</string> + <string name="comp_scope">Konfiguration</string> + <string name="comp_profile_configure">Konfigurer profil</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Standardprofil</string> + <string name="comp_scope_general_detail">Bruges automatisk af spil uden tilsidesættelser.</string> + <string name="comp_profile_game_detail">Gemte indstillinger bruges automatisk, når %1$s starter.</string> + <string name="comp_game_hint">Vælg kun de indstillinger, dette spil har brug for. Alt andet fortsætter med at bruge standardprofilen.</string> + <string name="comp_game_fex">FEX-forudindstilling</string> + <string name="comp_game_fex_inherited">Bruger standardprofilens forudindstilling.</string> + <string name="comp_game_fex_override">Brugerdefineret forudindstilling gemt for dette spil.</string> + <string name="comp_game_fex_custom">Brugerdefinerede FEX-variabler</string> + <string name="comp_game_use_general">Brug standard</string> + <string name="comp_game_compatibility">Spilkompatibilitet</string> + <string name="comp_game_environment_hint">Miljøindstillinger for Proton, DXVK, VKD3D og synkronisering for dette spil.</string> + <string name="comp_game_proton_inherited">Bruger standardprofilens Proton.</string> + <string name="comp_game_proton_override">Brugerdefineret Proton gemt for dette spil via Steams kompatibilitetstilknytning.</string> + <string name="comp_no_proton_short">Ingen Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Bruger standardprofilens pakke fra %1$s, hvis ikke dette spil vælger en anden pakke.</string> + <string name="comp_game_component_general">Bruger standardprofilens komponentpakke.</string> + <string name="comp_game_component_override">Bruger kun %1$s til dette spil.</string> + <string name="comp_game_runtime_options">Runtime-indstillinger</string> + <string name="comp_game_environment_other_hint">Andre miljøindstillinger pr. spil for Proton, DXVK, VKD3D-Proton og synkronisering.</string> + <string name="comp_game_saved_next">%1$s’s profil er gemt til næste spilstart.</string> + <string name="game_no_steam_title">Start uden Steam</string> + <string name="game_no_steam_detail">Åbner det i Proton/FEX uden Steam-klienten; Steam-funktioner er slået fra.</string> + <string name="game_no_steam_on">Til</string> + <string name="game_steam_with">Starter med Steam</string> + <string name="game_steam_without">Starter uden Steam</string> + <string name="game_settings_card">Indstillinger</string> + <string name="game_settings_menu_title">Indstillinger for %1$s</string> + <string name="game_settings_default">Standard</string> + <string name="game_settings_default_detail">Sætter alt, der er ændret for dette spil, tilbage til appens indstillinger.</string> + <string name="game_sync_custom">Brugerdefinerede synkroniseringsvariabler</string> + <string name="comp_game_proton_live">%1$s’s Proton-valg er gemt og tilgængeligt i Steam nu.</string> + <string name="comp_game_proton_next">%1$s’s Proton-valg er gemt. Genstart Steam, inden du starter spillet.</string> + <string name="comp_game_proton_not_runnable">%1$s kan ikke bruge den valgte Proton på denne enhed.</string> + <string name="comp_game_load_failed">Kunne ikke indlæse %1$s’s profil: %2$s</string> + <string name="comp_game_save_failed">Spilprofilen kunne ikke gemmes: %1$s</string> + <string name="comp_game_reset">Nulstil spilprofil</string> + <string name="comp_game_reset_title">Nulstil %1$s’s profil?</string> + <string name="comp_game_reset_body">Fjern dette spils tilsidesættelser af Proton, FEX, komponentpakke, miljø, teksturfiltrering og Windows-komponenter? Det bruger herefter standardprofilen.</string> + <string name="comp_game_reset_done">%1$s bruger nu standardprofilen.</string> + <string name="comp_game_reset_failed">Spilprofilen kunne ikke nulstilles helt: %1$s</string> + <string name="comp_default_live">%1$s kører nu alle spil, der ikke selv har valgt en Proton i Steam.</string> + <string name="comp_default_next">%1$s kører alle spil, der ikke selv har valgt en Proton, fra næste gang Steam starter.</string> + <string name="comp_default_not_runnable">%1$s kan ikke starte spil her, så den kan ikke være standarden.</string> + <string name="comp_default_failed">Standard-Protonen kunne ikke gemmes: %1$s</string> + <string name="comp_swapped">%1$s · %2$d udskiftet</string> + <string name="comp_all_original">%1$s · alt originalt</string> + <string name="comp_game_running_suffix">%1$s · spil kører</string> + <string name="comp_esync_pack">%1$s · droiddeck-esync-pack</string> + <string name="comp_esync_wanted">%1$s · ingen droiddeck-esync-pack endnu</string> + <string name="comp_esync_builtin">%1$s · esync er indbygget, ingen pack nødvendig</string> + <string name="comp_gpu_drivers">GPU-drivere</string> + <string name="comp_reapplied">%1$s · genanvendt ved start %2$s</string> + <string name="comp_next_queued">Næste: %1$s · når spillet er lukket</string> + <string name="comp_in_use">%1$s i brug: %2$s</string> + <string name="comp_waits">Venter til spillet lukkes</string> + <string name="comp_applies_next_game">Gælder, næste gang et spil starter</string> + <string name="comp_import_zip">Importer .zip</string> + <string name="comp_reading">Læser Protons…</string> + <string name="comp_no_proton">Ingen Proton installeret endnu. Start Steam én gang for at downloade dens ARM64-Proton, eller tilføj GE-Proton, CachyOS eller DroidDeck-Proton fra Opsætning.</string> + <string name="comp_original">Original · %1$s</string> + <string name="comp_this_build">%1$s · denne build</string> + <string name="comp_earlier_build">%1$s · tidligere build</string> + <string name="comp_installed_count">Installeret · %1$d</string> + <string name="comp_nothing_stored">Intet gemt for %1$s endnu. Denne Protons egne filer gemmes som dens original.</string> + <string name="comp_waits_long">Et spil kører på denne Proton, så dette venter, til det lukkes.</string> + <string name="comp_applies_long">Gælder, næste gang et spil starter.</string> + <string name="comp_swap_title">Udskift %1$s?</string> + <string name="comp_swap_body">Læg %1$s ind i %2$s? De originale filer forbliver gemt. %3$s</string> + <string name="comp_restore_title">Gendan %1$s?</string> + <string name="comp_restore_body">Læg originalen af %1$s tilbage i %2$s? %3$s</string> + <string name="comp_delete_package_body">Fjerner pakken fra appen. Du kan downloade den igen.</string> + <string name="comp_delete_original_title">Slet denne original?</string> + <string name="comp_delete_original_body">Denne original af %1$s er fra en tidligere build af %2$s. Den aktuelle builds original bevares altid.</string> + <string name="comp_nightlies_count">På Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Opdater for at se pakker på Nightlies.</string> + <string name="comp_nothing_new">Intet nyt siden sidste kontrol.</string> + <string name="comp_import_wcp">Importer .wcp</string> + <string name="comp_restore_original">Gendan denne Protons original</string> + <string name="comp_restore_original_body">Læg %1$s’s original %2$s tilbage?</string> + <string name="comp_swap">Udskift</string> + <string name="comp_about_text">FEX, DXVK og VKD3D-Proton for hver Proton, Steam kører spil med.\n\nVælg en installeret række for at sætte den i. Den træder i kraft, næste gang et spil starter, eller når det kørende spil er lukket.\n\nDine valg kontrolleres igen før hver start og lægges tilbage, hvis noget har ændret dem. Hver Protons originale filer bevares, så Steam-opdateringer aldrig fjerner dem.</string> + <string name="comp_tag_original">Original</string> + <string name="comp_tag_in_use">I brug</string> + <string name="comp_tag_new">Ny</string> + <string name="comp_tag_stored">Gemt</string> + <string name="perf_title">Ydelse</string> + <string name="perf_lede">CPU-kerner, sessionsrettelser og værtsnavn. Gælder fra næste session.</string> + <string name="perf_client_cores_group">Steam-klientens kerner</string> + <string name="perf_override">Tilsidesæt Steams kernevalg</string> + <string name="perf_override_hint">Fastgør Steam, dens UI-hjælper og gamescope til kernerne nedenfor.</string> + <string name="perf_client_cores">Klientkerner</string> + <string name="perf_client_cores_on">Kerner til Steam.</string> + <string name="perf_client_cores_off">Slå tilsidesættelsen til for at vælge.</string> + <string name="perf_game_cores_group">Spilkerner</string> + <string name="perf_game_cores">Spilkerner</string> + <string name="perf_game_cores_hint">Kerner til spil. Med alle valgt planlægger Android frit.</string> + <string name="perf_client_ui">Klientgrænseflade</string> + <string name="perf_glthread">Threaded GL</string> + <string name="perf_glthread_hint">Kan gøre Steam-menuer mere lydhøre.</string> + <string name="perf_zink">Zink: lazy descriptors</string> + <string name="perf_zink_hint">Anbefalet til drivere uden descriptor buffers.</string> + <string name="perf_noglerror">Spring GL-fejlkontrol over</string> + <string name="perf_noglerror_hint">Slår validering af GL fra for hvert kald.</string> + <string name="perf_gsrealtime">gamescope: realtids-GPU-kø</string> + <string name="perf_gsrealtime_hint">Prioriterer compositorens GPU-arbejde. Kan give jævnere billedtiming på bekostning af spillene.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Hold GPU’en på dens højeste clock</string> + <string name="perf_gpuclock_hint">Kun Adreno. Færre hak, mere batteribrug og varme.</string> + <string name="perf_fixes">Sessionsrettelser</string> + <string name="perf_sysmem">Turnip: sysmem-rendering</string> + <string name="perf_sysmem_hint">Hurtigere til Steam og de fleste spil. 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_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> + <string name="perf_esync_hint">Spils Windows-tråde venter på hinanden via eventfd og delt hukommelse i stedet for ture gennem wineserver. Bruger en droiddeck-esync-pack lavet til netop denne Proton-build; packs hentes automatisk. Indtil der findes en til en ny Proton-build, dækker droiddeck-fsync i stedet. Gælder fra næste session.</string> + <string name="perf_xalia_hint">Deaktiverer Protons gamepad-navigationshjælper, som koster CPU i hvert spil.</string> + <string name="perf_seccomp">Kør proot uden seccomp</string> + <string name="perf_seccomp_hint">Kan afhjælpe fejl om manglende systemkald på nogle kerner. Kan reducere ydelsen.</string> + <string name="perf_fastpath">proot fast path</string> + <string name="perf_fastpath_needs_seccomp">Kræver prootets seccomp-filter.</string> + <string name="perf_fastpath_hint">Hurtigere filopslag og mindre hak. Slå fra, hvis et program ikke kan finde sine filer.</string> + <string name="perf_identity">Sessionsidentitet</string> + <string name="perf_hostname">Værtsnavn</string> + <string name="perf_hostname_hint">Navnet Steam ser for denne enhed. Tomt gendanner %1$s.</string> + <string name="perf_hostname_invalid">Kun bogstaver, tal og bindestreger i midten, op til 63 tegn.</string> + <string name="perf_phantom_warning">Android er sat til at lukke denne session</string> + <string name="driver_installed">Installeret</string> + <string name="driver_available">Tilgængelig til download</string> + <string name="driver_nothing_new">Intet nyt siden sidste kontrol.</string> + <string name="driver_restore_builtin">Gendan indbyggede drivere</string> + <string name="driver_delete_builtin">Indbygget i appen: dette fjerner dens udpakkede filer og skjuler den. Gendan indbyggede drivere bringer den tilbage.</string> + <string name="driver_delete_bundle">Halvdelen af en Android- og Linux-bundle: begge halvdele fjernes. En driver i brug falder tilbage til standarden.</string> + <string name="driver_delete_plain">Dens filer fjernes fra appen.</string> + <string name="driver_delete_in_use">Dens filer fjernes. Den er i brug, så standarden tager over.</string> + <string name="drawer_page_display">Skærm</string> + <string name="drawer_page_effects">Effekter</string> + <string name="drawer_page_controls">Kontroller</string> + <string name="drawer_page_components">Komponenter</string> + <string name="drawer_page_controller">Controller</string> + <string name="drawer_page_settings">Indstillinger</string> + <string name="drawer_page_desc">Siden %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Skrivebord</string> + <string name="drawer_steam_menu">Steam-menu</string> + <string name="drawer_quick_access">Hurtig adgang</string> + <string name="drawer_open_qam">Åbn Hurtig adgang-menuen</string> + <string name="drawer_prev_page">Forrige side</string> + <string name="drawer_next_page">Næste side</string> + <string name="drawer_hud">Ydelses-HUD</string> + <string name="drawer_scaling">Skaleringstilstand</string> + <string name="drawer_scaling_sharpness">Skaleringsskarphed</string> + <string name="drawer_effects">Skærmeffekter</string> + <string name="drawer_effects_hint">Live. Koster lidt GPU-tid, mens en effekt er til.</string> + <string name="drawer_look">Forudindstillinger</string> + <string name="drawer_look_custom">Brugerdefineret</string> + <string name="drawer_effects_advanced">Avanceret</string> + <string name="widgets_expanded">Udvidet</string> + <string name="widgets_collapsed">Sammenfoldet</string> + <string name="drawer_cas">Skarphed (CAS)</string> + <string name="drawer_cas_level">Skarphedsniveau</string> + <string name="drawer_fake_hdr">Falsk HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Start SteamVR</string> + <string name="steamvr_checking">Tjekker SteamVR…</string> + <string name="drawer_deband">Debanding</string> + <string name="drawer_deband_strength">Debanding-styrke</string> + <string name="drawer_brightness">Lysstyrke</string> + <string name="drawer_contrast">Kontrast</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Farvemætning</string> + <string name="drawer_fxaa">FXAA (kantudjævning)</string> + <string name="drawer_toon">Toon-konturer</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Teksturfiltrering</string> + <string name="drawer_texture_hint">DirectX 9–11-spil, fra deres næste start.</string> + <string name="drawer_anisotropy">Anisotropisk filtrering</string> + <string name="drawer_texture_sharpness">Teksturskarphed</string> + <string name="drawer_texture_sharpness_note">En negativ mip-bias: skarpere teksturer, lidt flimmer. Auto følger, hvor meget sessionen forstørres til skærmen.</string> + <string name="drawer_touch_auto">Auto (%1$s)</string> + <string name="drawer_keyboard">Tastatur</string> + <string name="drawer_latency">Forsinkelse</string> + <string name="drawer_low_latency_controller">Controller med lav forsinkelse</string> + <string name="drawer_low_latency_controller_hint">Controlleren rapporterer ved 1000 Hz i stedet for 250 Hz. Lidt mere CPU.</string> + <string name="drawer_low_latency_touch">Berøring med lav forsinkelse</string> + <string name="drawer_low_latency_touch_hint">Berøringer springer billedsamling over; Steams berøringsstyring kører ved 1000 Hz. Lidt mere CPU.</string> + <string name="drawer_pc_keyboard">PC-tastatur</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Anden skærm</string> + <string name="drawer_second_screen_mode">Tilstand</string> + <string name="drawer_second_screen_shows">Viser</string> + <string name="drawer_android_apps">Android-apps</string> + <string name="drawer_launch_app">Start en app</string> + <string name="common_hide">Skjul</string> + <string name="common_show">Vis</string> + <string name="drawer_no_apps">Ingen apps, der kan startes</string> + <string name="drawer_session_behavior">Sessionsopførsel</string> + <string name="drawer_suspend_hint">Gælder nu og for fremtidige sessioner i denne tilstand.</string> + <string name="drawer_next_session">Næste session</string> + <string name="drawer_support">Support</string> + <string name="drawer_logs">Sessionslogs</string> + <string name="drawer_logs_hint">Vedhæft til en fejlrapport</string> + <string name="drawer_share_logs">Del logs</string> + <string name="drawer_background">Baggrund</string> + <string name="drawer_stop">Stop</string> + <string name="drawer_stop_title">Afslut session?</string> + <string name="drawer_running_now">Kører nu</string> + <string name="drawer_no_game">Intet spil kører på en Proton</string> + <string name="drawer_selected_profile">Spilprofil</string> + <string name="drawer_selected_profile_none">Profildetaljer er ikke tilgængelige endnu.</string> + <string name="drawer_profile_refresh_failed_initial">Kunne ikke indlæse spilprofiler. Forsøger automatisk igen.</string> + <string name="drawer_profile_refresh_failed_stale">Kunne ikke opdatere spilprofiler. Viser de sidst tilgængelige data; forsøger automatisk igen.</string> + <string name="drawer_profile_inspect_hint">Vis og rediger de gemte indstillinger, der bruges ved næste start.</string> + <string name="drawer_profile_default">Bruger standardprofilen</string> + <string name="drawer_profile_custom">Brugerdefineret profil</string> + <string name="drawer_component_inherited">Bruger %1$s fra standardprofilen.</string> + <string name="drawer_game_components_note">Ændringer gemmes i %1$s’s profil og gælder, næste gang spillet starter.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d spiltilsidesættelse</item> + <item quantity="other">%1$d spiltilsidesættelser</item> + </plurals> + <string name="drawer_no_proton">Ingen Proton er installeret endnu.</string> + <string name="drawer_game_running">spil kører</string> + <string name="drawer_reapplied">genanvendt ved start %1$s</string> + <string name="drawer_original">Original</string> + <string name="drawer_components_note">Importer og slet på siden Komponenter.</string> + <string name="setup_check_done">Klar</string> + <string name="setup_check_warn">Kræver handling</string> + <string name="setup_check_busy">Arbejder</string> + <string name="setup_limit_adb_failed">Kontroller IP-adressen og porten for Trådløs fejlretning, eller par igen, hvis Android har fjernet denne enhed.</string> + <string name="setup_install">Installer</string> + <string name="setup_manage">Administrer</string> + <string name="setup_tab_overview">Oversigt</string> + <string name="setup_tab_controller">Controller</string> + <string name="setup_tab_session">Session</string> + <string name="setup_tab_launcher">Launcher</string> + <string name="setup_title">Opsætning</string> + <string name="setup_all_set">● Alt er klar</string> + <string name="setup_n_ready">%1$d af %2$d klar</string> + <string name="setup_system_check">Systemkontrol</string> + <string name="setup_gpu_supported">Enhed understøttet</string> + <string name="setup_gpu_untested">Utestet GPU</string> + <string name="setup_gpu_unsupported">GPU ikke understøttet</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam kræver en Adreno-driver; %1$s kan vise en sort skærm</string> + <string name="setup_runtime">Linux-runtime</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Ikke installeret · omkring 3 GB, installeres ved første Spil</string> + <string name="setup_installed">Installeret</string> + <string name="setup_runtime_update">%1$s · opdatering tilgængelig</string> + <string name="setup_runtime_current">%1$s · opdateret</string> + <string name="setup_limit">Grænse for underprocesser</string> + <string name="setup_limit_on">Til · Android kan lukke Steam. Det tager et minut at slå den fra.</string> + <string name="setup_limit_unset">Ikke angivet · Android kan lukke Steam. Det tager et minut at slå den fra.</string> + <string name="setup_limit_unknown">Kunne ikke kontrolleres · det tager et minut at slå den fra.</string> + <string name="setup_fix_it">Ret det</string> + <string name="setup_details">Detaljer</string> + <string name="setup_dev_options">Udviklerindstillinger</string> + <string name="setup_use_wireless">Brug Trådløs fejlretning</string> + <string name="setup_check_again">Kontroller igen</string> + <string name="setup_limit_turn_on">Slå grænsen til</string> + <string name="setup_account">Steam-konto</string> + <string name="setup_signed_in_offline">Logget ind som %1$s · offlinetilstand</string> + <string name="setup_signed_in">Logget ind som %1$s</string> + <string name="setup_sign_in">Tryk på Spil, og log ind på Steam</string> + <string name="setup_tools">Værktøjer</string> + <string name="setup_controller">Controller</string> + <string name="setup_controller_unavailable">Controllerindstillinger er ikke tilgængelige.</string> + <string name="setup_session">Session</string> + <string name="setup_logs">Sessionslogs</string> + <string name="setup_logs_hint">Gemt efter hver session</string> + <string name="setup_agent_commands">Fejlfindingsværktøjer</string> + <string name="setup_latest_logs">Seneste sessionslogs</string> + <string name="setup_saved_logs">Gemte sessionslogs</string> + <string name="setup_saved_logs_hint">Gemmer de nyeste %1$d</string> + <string name="setup_clear_logs">Ryd logs</string> + <string name="setup_reset_settings">Nulstil alle indstillinger</string> + <string name="setup_reset_settings_hint">Sæt hver indstilling tilbage til standardværdien</string> + <string name="setup_reset_settings_button">Nulstil</string> + <string name="setup_reset_settings_title">Nulstil alle indstillinger?</string> + <string name="setup_reset_settings_body">Indstillinger for billede, ydeevne, controller, tema, sprog og launcher går tilbage til standard. Dine spil, Steam-login, butikskonti, hentede drivere og lagringsmapper bevares.</string> + <string name="setup_reset_settings_profiles">Nulstil også spilprofiler (Proton, FEX, komponenter og kørselsmiljø pr. spil samt kørselsmiljøet for Standard-profilen)</string> + <string name="setup_reset_settings_session_running">Stop sessionen, før du nulstiller indstillinger.</string> + <string name="setup_reset_settings_partial">Indstillingerne blev nulstillet, men ikke alle. Detaljerne står i loggen.</string> + <string name="setup_offline">Offlinetilstand</string> + <string name="setup_sign_in_first">Log ind på Steam først</string> + <string name="setup_launcher">Launcher</string> + <string name="setup_language">Sprog</string> + <string name="setup_language_hint">Steam bruger det også, fra næste gang det starter.</string> + <string name="setup_language_system">Systemstandard (%1$s)</string> + <string name="setup_language_system_short">Systemstandard</string> + <string name="setup_app_scale">App-skalering</string> + <string name="setup_app_scale_hint">Tekst og kontroller i DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (standard)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Launcherens udseende</string> + <string name="setup_home">Brug som startskærm</string> + <string name="setup_home_on">DroidDeck kan være Home-appen</string> + <string name="setup_home_off">DroidDeck tilbydes aldrig som Home-app</string> + <string name="setup_orientation">Retning</string> + <string name="setup_orientation_auto">Automatisk liggende</string> + <string name="setup_orientation_landscape">Liggende</string> + <string name="setup_orientation_reverse">Omvendt liggende</string> + <string name="setup_fullscreen">Fuldskærm</string> + <string name="setup_fullscreen_on">Skjuler Androids status- og navigationsbjælker</string> + <string name="setup_fullscreen_off">Viser Androids status- og navigationsbjælker</string> + <string name="setup_default_home">Standard Home-app</string> + <string name="setup_choose_home">Vælg en Home-app</string> + <string name="setup_choose">Vælg</string> + <string name="setup_linux_apps">Linux-apps (beta)</string> + <string name="setup_tool_files">Filer</string> + <string name="setup_tool_files_hint">Gennemse og administrer filer</string> + <string name="setup_tool_protons">Proton-versioner</string> + <string name="setup_tool_protons_hint">Installer ARM64-Proton-builds</string> + <string name="setup_tool_performance">Ydelse</string> + <string name="setup_tool_performance_hint">Tildeling af CPU-kerner</string> + <string name="setup_tool_roms">ROM-mappe</string> + <string name="setup_tool_roms_hint">Hvor emulatorspil gemmes</string> + <string name="setup_card_components">Komponenter</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Kontroller</string> + <string name="setup_card_controls_hint">Knapmapning</string> + <string name="store_tab_discover">Udforsk</string> + <string name="store_tab_search">Søg</string> + <string name="store_tab_installed">Installeret</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Butik</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak klar</string> + <string name="store_needs_runtime">Installer Linux-runtimen fra Opsætning først.</string> + <string name="store_setup_title">Sæt Flatpak op</string> + <string name="store_setup_text">Tilføjer Flatpak og forbinder det til Flathub (ca. 20 MB). Den første app downloader også sin runtime.</string> + <string name="store_setting_up">Sætter op…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Opdateringer</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Starter…</string> + <string name="store_categories">Kategorier</string> + <string name="store_unreachable">Kunne ikke nå Flathub. Kontroller din forbindelse, og prøv igen.</string> + <string name="store_try_again">Prøv igen</string> + <string name="store_search_label">Søg på Flathub</string> + <string name="store_search_placeholder">Firefox, spil, emulatorer…</string> + <string name="store_search">Søg</string> + <string name="store_all">Alle</string> + <string name="store_searching">Søger…</string> + <string name="store_search_hint">Søg efter navn, eller vælg en kategori. Kun ARM64-apps vises.</string> + <string name="store_no_results">Ingen ARM64-apps på Flathub matcher det.</string> + <string name="store_results">Resultater</string> + <string name="store_check_updates">Søg efter opdateringer</string> + <string name="store_update_all">Opdater alle (%1$d)</string> + <string name="store_all_current">● Alt er opdateret</string> + <string name="store_no_apps">Ingen apps endnu. Find nogle under Udforsk eller Søg.</string> + <string name="store_setup_first_note">Sæt Flatpak op for at installere apps.</string> + <string name="store_update_available_prefix">Opdatering tilgængelig · %1$s</string> + <string name="store_open">Åbn</string> + <string name="store_details">Detaljer</string> + <string name="store_remove">Fjern</string> + <string name="store_press_again">Tryk igen for at fjerne</string> + <string name="store_installing">Installerer…</string> + <string name="store_install">Installer</string> + <string name="store_setup_first">Sæt Flatpak op først</string> + <string name="store_download_size">%1$s download</string> + <string name="store_installed_chip">● Installeret</string> + <string name="store_details_failed">Kunne ikke indlæse denne apps Flathub-side.</string> + <string name="store_loading">Indlæser fra Flathub…</string> + <string name="store_no_arm">Ingen ARM64-build på Flathub, så den kan ikke installeres her.</string> + <string name="store_screenshots">Skærmbilleder</string> + <string name="store_about">Om</string> + <string name="store_app_id">App-id</string> + <string name="store_license">Licens</string> + <string name="store_runtime">Runtime</string> + <string name="store_installed_size">Installeret størrelse</string> + <string name="store_installed_size_value">%1$s (plus dens delte runtime)</string> + <string name="store_website">Websted</string> + <string name="store_verified">Verificeret</string> + <string name="upd_title">Opdateringer</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Kontrolleret %1$s</string> + <string name="upd_not_checked">Ikke kontrolleret endnu</string> + <string name="upd_perm_title">Lad DroidDeck opdatere sig selv</string> + <string name="upd_perm_text">På næste skærm skal du slå Tillad fra denne kilde til og derefter komme tilbage. Opdateringen fortsætter selv.</string> + <string name="upd_open_settings">Åbn indstillinger</string> + <string name="upd_not_now">Ikke nu</string> + <string name="upd_signed_status">Signeret anderledes</string> + <string name="upd_signed_headline">Kan ikke opdatere på plads</string> + <string name="upd_signed_detail">Denne kopi er ikke signeret med DroidDecks udgivelsesnøgle, så opdateringer kan ikke installeres over den. Afinstaller den for at skifte.</string> + <string name="upd_available">Opdatering tilgængelig</string> + <string name="upd_blocked_status">Kan ikke installere</string> + <string name="upd_switch">Klar til at skifte</string> + <string name="upd_ahead_status">Foran Stable</string> + <string name="upd_ahead_headline">Du er foran Stable</string> + <string name="upd_ahead_detail">Denne build er nyere end den seneste Stable. Du flyttes til Stable med dens næste udgivelse.</string> + <string name="upd_gone_status">Test afsluttet</string> + <string name="upd_gone_headline">Denne test er afsluttet</string> + <string name="upd_gone_detail">Dens rettelse er føjet ind eller opgivet. Følg Preview for de nyeste rettelser.</string> + <string name="upd_current_status">Opdateret</string> + <string name="upd_current_headline">Du har den nyeste %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Opdater%1$s</string> + <string name="upd_install_button">Installer%1$s</string> + <string name="upd_install_anyway">Installer Stable %1$s alligevel</string> + <string name="upd_follow_preview">Følg Preview</string> + <string name="upd_stop_session">Afslut den kørende session for at opdatere.</string> + <string name="upd_less">Mindre</string> + <string name="upd_more">Mere</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Ny Preview-build</string> + <string name="upd_new_test">PR #%1$d-testbuild</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">OPDATERINGSKANAL</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Testede udgivelser, til de fleste</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Nyeste rettelser, før Stable</string> + <string name="upd_preview_current">Opdateret</string> + <string name="upd_tests">Testbuilds</string> + <string name="upd_tests_hint">Prøv en rettelse, før den udgives</string> + <string name="upd_tests_none">Ingen lige nu</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Ikke bygget til denne kopi af DroidDeck</string> + <string name="upd_updated">Opdateret %1$s</string> + <string name="upd_test_name">PR #%1$d-testen</string> + <string name="upd_while_ago">et stykke tid siden</string> + <string name="upd_just_now">lige nu</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d at prøve</item> + <item quantity="other">%1$d at prøve</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Ændringer siden din build · %1$d build bagud</item> + <item quantity="other">Ændringer siden din build · %1$d builds bagud</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Seneste ændringer · %1$d build</item> + <item quantity="other">Seneste ændringer · %1$d builds</item> + </plurals> + <string name="gate_title">Én Android-indstilling, der skal ændres</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android lukker apps, der starter mange baggrundsprocesser, og Steam starter dusinvis. Indtil dette ændres, lukker spil uden en fejlmeddelelse.</string> + <string name="gate_fix_for_me">Ret det for mig</string> + <string name="gate_toggle_steps">Slå “Deaktiver begrænsningerne for underprocesser” til, og kom så tilbage. Lad Udviklerindstillinger stå til, ellers slås kontakten fra igen.</string> + <string name="gate_open_dev">Åbn Udviklerindstillinger</string> + <string name="gate_no_toggle">Denne Android-version har ingen kontakt til det, så DroidDeck ændrer det via Trådløs fejlretning. Tager omkring et minut, ingen computer nødvendig.</string> + <string name="gate_needs_wifi">Trådløs fejlretning kræver Wi-Fi. Alle netværk fungerer; det kræver ikke internet.</string> + <string name="gate_needs_notifications">Parringskoden kommer i en notifikation. Tillad notifikationer for DroidDeck, eller brug Andre måder.</string> + <string name="gate_allow_notifications">Tillad notifikationer</string> + <string name="gate_step1">Åbn Indstillinger → Udviklerindstillinger → Trådløs fejlretning, og slå den til</string> + <string name="gate_step2">Tryk på “Par enhed med parringskode”</string> + <string name="gate_step3">Indtast koden i DroidDeck-notifikationen</string> + <string name="gate_waiting">Venter på parringsvinduet…</string> + <string name="gate_code_needed">Vindue fundet. Indtast dets kode i notifikationen.</string> + <string name="gate_status">Status</string> + <string name="gate_polling">Kontrollerer hvert 2. sekund. Denne side lukker, når den er fra.</string> + <string name="gate_other_ways">Andre måder</string> + <string name="gate_other_toggle">Trådløs fejlretning, manuel adresse, computer-ADB</string> + <string name="gate_other_no_toggle">Manuel adresse, computer-ADB, Udviklerindstillinger</string> + <string name="gate_use_wireless_instead">Brug Trådløs fejlretning i stedet</string> + <string name="gate_some_roms">Nogle ROM’er tilføjer kontakten alligevel. Kig efter “underprocesser” i Udviklerindstillinger.</string> + <string name="gate_manual_hint">Hvis notifikationen ikke virker, kan du selv indtaste vinduets adresse og kode.</string> + <string name="gate_enter_manually">Indtast adresse manuelt</string> + <string name="gate_from_computer">Fra en computer med ADB:</string> + <string name="gate_copy_command">Kopier kommando</string> + <string name="gate_choose_display">Vælg, hvilken skærm Android-indstillinger skal åbnes på.</string> + <string name="gate_main_screen">Hovedskærm</string> + <string name="wadb_finding_port">Parret. Finder porten for Trådløs fejlretning…</string> + <string name="wadb_enter_port">Parret. Indtast porten fra Indstillinger.</string> + <string name="wadb_applying">Enhed fundet. Anvender indstillingen…</string> + <string name="wadb_apply_failed">Kunne ikke anvendes automatisk. Kontroller adressen nedenfor, og prøv igen. %1$s</string> + <string name="wadb_title_wireless">Trådløs fejlretning</string> + <string name="wadb_title_done">Grænsen for underprocesser opdateret</string> + <string name="wadb_title">Ændr grænsen for underprocesser</string> + <string name="wadb_lede_compact0">Hvis indstillingen mangler, skal du parre via Trådløs fejlretning.</string> + <string name="wadb_lede_compact1">Parret. Kontroller IP-adressen og porten i Trådløs fejlretning.</string> + <string name="wadb_lede_done">Grænsen for underprocesser blev opdateret.</string> + <string name="wadb_lede0">Brug trin 2, hvis Udviklerindstillinger ikke har en indstilling for underprocesser. Åbn Udviklerindstillinger → Trådløs fejlretning → Par enhed med parringskode.</string> + <string name="wadb_lede1">Parret. Brug adressen nedenfor, eller opdater den fra Trådløs fejlretning → IP-adresse og port.</string> + <string name="wadb_lede_done_long">Grænsen for underprocesser blev opdateret via Trådløs fejlretning.</string> + <string name="wadb_confirmed_on">Android bekræftede, at grænsen er til.</string> + <string name="wadb_confirmed_off">Android bekræftede, at grænsen er fra.</string> + <string name="wadb_pair_group">2 · Par Trådløs fejlretning</string> + <string name="wadb_pair_address">Parringsvinduets IP-adresse og port</string> + <string name="wadb_pin">Parringskode (PIN)</string> + <string name="wadb_pin_placeholder">6 cifre</string> + <string name="wadb_pair">Par</string> + <string name="wadb_apply_group">2 · Anvend via Trådløs fejlretning</string> + <string name="wadb_connect_address">Forbindelsens IP-adresse og port</string> + <string name="wadb_pair_again">Par igen</string> + <string name="wadb_turn_off">Slå grænsen fra</string> + <string name="wadb_other_ways">Andre måder at ændre det</string> + <string name="wadb_dev_try_first">1 · Udviklerindstillinger (prøv først)</string> + <string name="wadb_restrict_on">Slå “Deaktiver begrænsningerne for underprocesser” fra.</string> + <string name="wadb_restrict_off">Slå “Deaktiver begrænsningerne for underprocesser” til.</string> + <string name="wadb_computer_last">3 · Computer-ADB (sidste udvej)</string> + <string name="wadb_only_if">Kun hvis Trådløs fejlretning ikke er tilgængelig.</string> + <string name="wadb_computer_group">3 · Computer-ADB (sidste udvej)</string> + <string name="ctrl_osc_hint">Hvornår berøringskontrollerne vises i en session</string> + <string name="ctrl_color">Farve</string> + <string name="ctrl_color_hint">Farvetone for knapperne på skærmen</string> + <string name="ctrl_custom">Brugerdefineret</string> + <string name="ctrl_opacity">Gennemsigtighed</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Knapstørrelse</string> + <string name="ctrl_size_hint" formatted="false">100% er standardstørrelsen</string> + <string name="ctrl_stick_click">Stick-klik</string> + <string name="ctrl_stick_click_hint">Dobbelttryk og hold en stick nede for L3 eller R3</string> + <string name="ctrl_adaptive">Adaptive sticks</string> + <string name="ctrl_rumble">Spilvibration</string> + <string name="ctrl_steam_button">Steam-knap</string> + <string name="ctrl_qam_button">QAM-knap</string> + <string name="ctrl_keyboard_button">Tastaturknap</string> + <string name="ctrl_select_steam">Tryk på Select for at åbne Steam-menuen</string> + <string name="ctrl_select_steam_hint">I stedet for View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Cons som VR-controllere</string> + <string name="ctrl_joycon_vr_hint">Mens SteamVR kører, bliver hver Joy-Con en hånd. Peg den fremad, og hold Home eller Capture nede for at centrere den igen.</string> + <string name="setup_animations">Animationer</string> + <string name="ctrl_adaptive_hint">Sticks vises, hvor du rører skærmen, og skjules, når du slipper</string> + <string name="ctrl_layout">Layout</string> + <string name="ctrl_layout_custom">Brugerdefinerede positioner gemt</string> + <string name="ctrl_layout_default">Tilpasset denne skærm</string> + <string name="ctrl_edit">Rediger</string> + <string name="ctrl_reset">Nulstil</string> + <string name="ctrl_mapping">Knapmapning</string> + <string name="ctrl_mapping_default">Hver knap sender sit eget input</string> + <string name="ctrl_mapping_count">%1$d af %2$d knapper ommappet</string> + <string name="ctrl_configure">Konfigurer</string> + <string name="ctrl_reset_all">Nulstil controller</string> + <string name="ctrl_reset_all_hint">Gendanner alle controllerindstillinger og layoutet</string> + <string name="ctrl_mapping_lede">Hvad hver knap på skærmen sender til spillet. Skjult fjerner knappen.</string> + <string name="ctrl_onscreen_buttons">Knapper på skærmen</string> + <string name="ctrl_defaults">Standarder</string> + <string name="ctrl_reset_mapping">Nulstil mapning</string> + <string name="content_android_apps">Android-apps</string> + <string name="content_apps_count">%1$d apps</string> + <string name="content_no_android_apps">Ingen Android-apps, der kan startes, fundet.</string> + <string name="content_desktop_installed">● Skrivebord installeret</string> + <string name="content_desktop_first_open">Installeres ved første åbning</string> + <string name="content_available">Tilgængelig til installation</string> + <string name="content_not_installed">Ikke installeret.</string> + <string name="content_not_installed_suffix">%1$s · ikke installeret</string> + <string name="content_open_named">Åbn %1$s</string> + <string name="content_games">Spil</string> + <string name="content_choose_roms">Vælg en ROM-mappe.</string> + <string name="content_retroarch_roms">Gå til /root/ROMs i RetroArch.</string> + <string name="content_add_roms">Tilføj %1$s-spil til ROMs/%2$s.</string> + <string name="content_install_named">Installer %1$s</string> + <string name="content_stop_to_install">Afslut session for at installere</string> + <string name="content_runtime_required">Runtime påkrævet</string> + <string name="content_loading_details">Indlæser installationsdetaljer…</string> + <string name="content_details_unavailable">Installationsdetaljer er ikke tilgængelige. Prøv igen senere.</string> + <string name="content_needs_runtime">Installer Linux-runtimen fra Opsætning først.</string> + <string name="content_stop_first">Afslut den kørende session for at installere skrivebordsapps.</string> + <string name="content_install_into">Installerer %1$s i Linux-skrivebordet.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Hvis den skjules, fjernes den fra Skrivebord. Dens filer forbliver i Linux-runtimen.</string> + <string name="content_rom_gone">Det spil er ikke længere i ROM-mappen.</string> + <string name="content_desktop_system">Skrivebord · %1$s</string> + <string name="content_launch_in">Start i %1$s</string> + <string name="content_also_in">Også i %1$s</string> + <string name="content_page_gone">Den side findes ikke længere. Vælg et afsnit til venstre.</string> + <string name="content_open_desktop">Åbn skrivebord</string> + <string name="content_install_open_desktop">Installer og åbn skrivebord</string> + <string name="desktop_remove_title">Afinstaller skrivebord</string> + <string name="desktop_remove_text">Fjerner skrivebordet og dets medfølgende apps. Spil, tilføjede apps, indstillinger og delte biblioteker bevares.</string> + <string name="desktop_removing">Fjerner skrivebord</string> + <string name="desktop_removed">Skrivebord fjernet</string> + <string name="desktop_cleaning_legacy">Fjerner gamle LXQt-filer</string> + <string name="desktop_removal_unknown">Opdater DroidDeck, før du fjerner denne skrivebordsversion.</string> + <string name="content_linux_desktop">Linux-skrivebord</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox og dine emulatorer</string> + <string name="games_empty">Spil, du installerer i Steam, vises her efter sessionen.</string> + <string name="games_play_steam">Spil Steam</string> + <string name="games_play_steamvr">Spil SteamVR</string> + <string name="games_launch_settings">Startindstillinger</string> + <string name="games_launch">Start</string> + <string name="games_files">Spilfiler</string> + <string name="games_prefix">Proton-prefix</string> + <string name="games_saves_looking">Søger efter gemte spil…</string> + <string name="games_saves_none">Ingen savemappe fundet ved navn. Eksport tager hele brugermappen.</string> + <string name="games_saves_folders">%1$d savemapper</string> + <string name="games_saves_summary">%1$s · %2$d filer · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Administrer gemte spil</string> + <string name="games_saves">Gemte spil</string> + <string name="games_import_saves">Importer gemte spil…</string> + <string name="games_export_gamehub">Eksporter som GameHub-zip…</string> + <string name="games_export_winlator">Eksporter som Winlator-zip…</string> + <string name="games_open_save_folder">Åbn savemappe</string> + <string name="games_never_played">Aldrig spillet</string> + <string name="games_runtime_busy_percent">Runtime optaget · %1$d%%</string> + <string name="games_runtime_busy">Runtime optaget</string> + <string name="games_runtime_first_play">Runtime installeres ved første Spil</string> + <string name="games_runtime_update">Runtimeopdatering tilgængelig</string> + <string name="games_runtime_ready">● Runtime klar</string> + <string name="games_last_played">Sidst spillet %1$s</string> + <string name="games_internal">Internt lager</string> + <string name="games_added">Tilføjet spil</string> + <string name="games_custom">Brugerdefineret spil</string> + <string name="games_store_storage">Spillager</string> + <string name="gpu_auto_hint">Det bedste par til denne GPU, holdt opdateret</string> + <string name="gpu_manual_hint">Vælg et par selv</string> + <string name="gpu_checking">Søger efter drivere…</string> + <string name="gpu_none_listed">Ingen drivere på listen endnu. Opdater for at søge efter dem.</string> + <string name="gpu_hide_other">Skjul drivere til andre GPU’er</string> + <string name="gpu_show_other">Vis drivere til andre GPU’er</string> + <string name="gpu_advanced">Avanceret</string> + <string name="gpu_set_with_display">Angives sammen med skærmdriveren: %1$s dækker begge.</string> + <string name="gpu_set_with_runtime">Angives sammen med runtimedriveren: %1$s dækker begge.</string> + <string name="gpu_runtime_hint">Bruges af spil og skrivebordet.</string> + <string name="gpu_runtime_default">Runtime-standard</string> + <string name="gpu_auto_by_gpu">Auto – valgt efter GPU</string> + <string name="gpu_manage">Download, importer eller slet…</string> + <string name="gpu_in_use_caps">I BRUG</string> + <string name="gpu_builtin">Driverne indbygget i DroidDeck</string> + <string name="gpu_matched_pair">Runtime- og skærmdrivere angivet sammen som et matchende par.</string> + <string name="gpu_recommended_for">Anbefalet til denne GPU: %1$s.</string> + <string name="gpu_refresh_hint">Opdater for at søge efter drivere til denne GPU.</string> + <string name="gpu_recommended_caps">ANBEFALET</string> + <string name="gpu_unavailable">Ikke tilgængelig</string> + <string name="load_runtime">Linux-runtime</string> + <string name="load_runtime_detail">Gør Linux-runtimen klar</string> + <string name="load_session">Session</string> + <string name="load_session_detail">Starter skærm og lyd</string> + <string name="load_steam">Steam-klient</string> + <string name="load_steam_detail">Kontrollerer Steam og dets kompatibilitetsværktøjer</string> + <string name="load_opening_steam">Åbner Steam</string> + <string name="load_opening_steam_detail">Venter på Steams første billede</string> + <string name="load_desktop">Skrivebord</string> + <string name="load_desktop_detail">Gør skrivebordet klar</string> + <string name="load_opening">Åbner</string> + <string name="load_opening_detail">Venter på det første billede</string> + <string name="load_starting_steam">Starter Steam</string> + <string name="load_ended">Sessionen blev afsluttet</string> + <string name="load_step">Trin %1$d af %2$d</string> + <string name="load_steam_paused">Steam er sat på pause</string> + <string name="deck_tab_grips">Greb</string> + <string name="deck_tab_left">Venstre pad</string> + <string name="deck_tab_right">Højre pad</string> + <string name="deck_tab_both">Begge</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Stick</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Skift mellem stick og trackpad</string> + <string name="deck_more_controls">Flere Deck-kontroller</string> + <string name="deck_panels">PANELER</string> + <string name="deck_close">Luk kontrollerne til den anden skærm</string> + <string name="deck_open_steam_menu">Åbn Steam-menuen</string> + <string name="deck_left_upper">Venstre · øverst</string> + <string name="deck_left_lower">Venstre · nederst</string> + <string name="deck_right_upper">Højre · øverst</string> + <string name="deck_right_lower">Højre · nederst</string> + <string name="deck_click">Klik</string> + <string name="deck_right_trackpad">Højre trackpad</string> + <string name="deck_left_trackpad">Venstre trackpad</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Vis tastatur</string> + <string name="second_hide_keyboard">Skjul tastatur</string> + <string name="second_terminal">Linux-terminal</string> + <string name="second_terminal_not_ready">Linux-sessionen er ikke klar til en terminal endnu.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Spil</string> + <string name="rail_desktop">Skrivebord</string> + <string name="rail_store">Butik</string> + <string name="rail_components">Komponenter</string> + <string name="rail_apps">Apps</string> + <string name="rail_setup">Opsætning</string> + <string name="rail_updates">Opdateringer</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Genoptag %1$s</string> + <string name="roms_text">Vises som /root/ROMs i hver session. Intern lagerplads er på /root/Storage.</string> + <string name="roms_none">Ingen mappe valgt</string> + <string name="roms_applies">Gælder fra næste session. SD-kort fungerer.</string> + <string name="roms_choose">Vælg mappe</string> + <string name="roms_change">Skift mappe</string> + <string name="proton_lede">Installer en ARM64 Proton-build, og vælg den derefter for hvert spil i Steam → Egenskaber → Kompatibilitet.</string> + <string name="proton_stop_first">Stop den kørende session for at installere eller fjerne et kompatibilitetsværktøj.</string> + <string name="proton_available">Tilgængelige builds</string> + <string name="proton_installed">Installeret %1$s</string> + <string name="proton_queued">Afventer fra en tidligere anmodning</string> + <string name="proton_not_installed">Ikke installeret</string> + <string name="proton_update_available">Opdatering tilgængelig → %1$s</string> + <string name="proton_remove_older">Fjern gamle %1$s-versioner</string> + <string name="proton_remove_older_body">Fjerner %1$s. Spil, der er sat til disse versioner, skal skiftes til en anden Proton.</string> + <string name="proton_remove_body">Spil, der er sat til denne version, skal skiftes til en anden Proton.</string> + <string name="proton_install_now">Installer nu</string> + <string name="proton_cancel_queued">Annuller afventende</string> + <string name="pckb_android">Android-tastatur</string> + <string name="pckb_hide">Skjul ✕</string> + <string name="main_launch_named">Start %1$s</string> + <string name="main_choose_screen">Vælg en skærm. Sekundær: %1$s.</string> + <string name="main_secondary_gone">Den sekundære skærm er ikke længere tilgængelig.</string> + <string name="main_primary">Primær skærm</string> + <string name="main_secondary">Sekundær skærm</string> + <string name="widgets_prev_tab">Forrige fane</string> + <string name="widgets_next_tab">Næste fane</string> + <string name="widgets_on">Til</string> + <string name="widgets_all_n">Alle %1$d</string> + <string name="widgets_none">Ingen</string> + <string name="widgets_n_of_m">%1$d af %2$d</string> + <string name="widgets_off">Fra</string> + <string name="screen_bottom">Nederste skærm</string> + <string name="game_env_applies">Gælder fra næste spilstart. Et spils profil tilsidesætter den fælles.</string> + <string name="game_env_other">Et andet spil via app-id…</string> + <string name="game_env_done">Udført</string> + <string name="game_env_default">Standard</string> + <string name="game_env_off">Fra</string> + <string name="game_env_change">Skift…</string> + <string name="game_env_change_title">Skift variabel</string> + <string name="game_env_restore_default">Tilbage til standard</string> + <string name="game_env_eyebrow">Proton-spil</string> + <string name="pip_title">Billede i billede</string> + <string name="pip_auto">Gå automatisk til billede i billede</string> + <string name="unfolded_controls">Kontroller på den udfoldede skærm</string> + <string name="unfolded_controls_hint">Når skærmen er foldet ud, ligger spillet over Steam Decks trackpads og grebsknapper. Når den er foldet sammen, fylder spillet hele skærmen.</string> + <string name="pip_suspended">Sat i bero</string> + <string name="pip_not_ready">Billede i billede er tilgængeligt, når sessionen er klar.</string> + <string name="pip_permission">Tillad billede i billede for DroidDeck i Android-indstillingerne.</string> + <string name="pip_unavailable">Android kunne ikke åbne billede i billede.</string> + <string name="game_shortcut">Genvej</string> + <string name="game_shortcut_add">Tilføj til hjemmeskærm</string> + <string name="game_shortcut_choose">Vælg spil</string> + <string name="game_shortcut_scanning">Scanner installerede spil…</string> + <string name="game_link_copy">Kopier startlink</string> + <string name="game_link_copied">Startlink kopieret</string> + <string name="game_shortcut_unsupported">Denne launcher kan ikke tilføje genveje. Brug Kopier startlink i stedet.</string> + <string name="game_link_invalid">Ugyldigt startlink til spil.</string> + <string name="game_link_missing">Dette spil findes ikke længere i dit DroidDeck-bibliotek.</string> + <string name="game_link_session_busy">Stop den aktuelle session, før du starter et Steam-spil.</string> + <string name="game_link_failed">Kunne ikke sende spillet til Steam. Prøv at starte det igen.</string> + <string name="setup_retry_removal">Prøv fjernelse igen</string> + <string name="runtime_removing">Fjerner</string> + <string name="runtime_removal_incomplete">Fjernelse ikke fuldført</string> + <string name="game_file_export">Eksporter spilfil</string> + <string name="game_file_sync">Synkroniser alle spilfiler til mappe</string> + <string name="game_file_stop_sync">Stop synkronisering af spilfiler</string> + <string name="game_file_folder">Vælg en mappe til frontend-spilfiler</string> + <string name="game_file_exported">Spilfiler gemt i %1$s</string> + <string name="game_frontend_files">Frontend-filer</string> + + <string name="main_wait_runtime">Vent til runtime-handlingen er færdig</string> + <string name="main_wait_proton_install">Vent til installationen af kompatibilitetsværktøjet er færdig</string> + <string name="main_wait_desktop_install">Vent til installationen af skrivebordsappen er færdig</string> + <string name="main_wait_install_game">Vent til installationen er færdig, før du starter et spil</string> + <string name="main_saves_close_session">Luk Steam-sessionen først, så spillet ikke overskriver importen</string> + <string name="main_saves_importing">Importerer til %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Importerede %1$d fil fra %2$s til %3$s</item> + <item quantity="other">Importerede %1$d filer fra %2$s til %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Importerede %1$d fil fra %2$s til %3$s. Gamle gemte spil sikkerhedskopieret til Download/DroidDeck/Saves/backups</item> + <item quantity="other">Importerede %1$d filer fra %2$s til %3$s. Gamle gemte spil sikkerhedskopieret til Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Vælg en zip med gemte spil til %1$s</string> + <string name="main_saves_exporting">Eksporterer %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Eksporterede %1$d fil som %2$s: %3$s</item> + <item quantity="other">Eksporterede %1$d filer som %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Vælg, hvor %1$s skal gemmes (%2$s)</string> + <string name="main_action_failed">%1$s mislykkedes: %2$s</string> + <string name="main_no_logs_yet">Ingen sessionslogs endnu: kør en session først.</string> + <string name="main_no_logs_to_clear">Ingen sessionslogs at rydde.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Ryddede %1$d sessionslogmappe.</item> + <item quantity="other">Ryddede %1$d sessionslogmapper.</item> + </plurals> + <string name="main_wadb_pair_failed">Parring til trådløs fejlretning mislykkedes</string> + <string name="main_wadb_command_failed">Kommando til trådløs fejlretning mislykkedes</string> + <string name="main_wadb_unavailable">Trådløs fejlretning er ikke tilgængelig</string> + <string name="main_adb_copied">ADB-kommando kopieret</string> + <string name="main_pick_roms">Vælg ROMs-mappen</string> + <string name="main_non_adreno_title">Ikke en Adreno-GPU</string> + <string name="main_non_adreno_text">Turnip understøtter Adreno-GPU\'er. På %1$s kan Steam vise en sort skærm. Download: %2$.0f MB.</string> + <string name="main_install_anyway">Installer alligevel</string> + <string name="main_remove_runtime_title">Fjern Linux-runtime</string> + <string name="main_remove_runtime_text">Dette sletter runtime\'en, Steam-klienten i den og alle spil installeret der.</string> + <string name="main_applied">Anvendt: %1$s</string> + <string name="android_app_open_failed_primary">Kunne ikke åbne %1$s på den primære skærm</string> + <string name="android_app_open_failed_on">Kunne ikke åbne %1$s på %2$s</string> + <string name="android_app_open_failed_display">Kunne ikke åbne %1$s på skærm %2$d</string> + <string name="comp_busy_importing">Importerer</string> + <string name="comp_busy_swapping">Skifter</string> + <string name="comp_busy_restoring">Gendanner</string> + <string name="comp_busy_cancelling">Annullerer</string> + <string name="comp_busy_deleting">Sletter</string> + <string name="comp_cannot_read">kan ikke læse filen</string> + <string name="comp_imported">Importerede %1$s</string> + <string name="comp_swap_cancelled">Den ventende udskiftning blev annulleret.</string> + <string name="comp_pick_wcp">Vælg en komponentpakke (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nightlies kunne ikke nås</string> + <string name="comp_stored">Gemte %1$s</string> + <string name="comp_download_failed">Download mislykkedes: %1$s</string> + <string name="drivers_pick_linux">Vælg en Linux-runtime-driver (-Linux-zip eller Android + Linux-bundle)</string> + <string name="drivers_pick_android">Vælg en skærmdriver (AdrenoTools-zip eller Android + Linux-bundle)</string> + <string name="drivers_pick_any">Vælg en driver-zip eller en Android + Linux-bundle</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Fjerner %1$s…</string> + <string name="main_forgetting_named">Glemmer %1$s…</string> + <string name="main_pick_game_storage">Vælg mappen til spillagring</string> + <string name="main_pick_decky_zip">Vælg en Decky-plugin-ZIP</string> + <string name="main_storage_not_usable">Ikke brugbar: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Fjerner Linux-runtime</string> + <string name="main_settings_main_screen">Kunne ikke åbne Indstillinger på den nederste skærm; åbnede den på hovedskærmen.</string> + <string name="main_open_dev_options">Åbn Indstillinger for udviklere i Indstillinger</string> + + <string name="upd_unknown_apps_failed">Kunne ikke åbne Androids indstilling ”Installer ukendte apps”</string> + <string name="upd_couldnt_check">Kunne ikke kontrollere: %1$s</string> + <string name="upd_no_download">Denne build har ingen download til denne kopi af DroidDeck</string> + <string name="upd_stop_first">Stop den kørende session først, og opdater derefter</string> + <string name="upd_stage_downloading">Downloader</string> + <string name="upd_stage_installing">Installerer</string> + <string name="upd_stage_confirm">Venter på din bekræftelse</string> + <string name="upd_failed">Opdateringen mislykkedes</string> + <string name="upd_not_offered">Android tilbød ikke at installere opdateringen</string> + + <string name="decky_install_failed">Decky-installation mislykkedes: %1$s</string> + <string name="decky_plugin_starting">Starter import af plugin…</string> + <string name="decky_plugin_failed">Import af plugin mislykkedes: %1$s</string> + <string name="decky_plugin_installed">Plugin installeret. Genstart Steam for at indlæse det.</string> + + <string name="drivers_not_checked">Ikke kontrolleret endnu - tryk på opdater for at søge efter nye drivere</string> + <string name="drivers_bundle_sets_display">Android + Linux: angiver skærmdriveren samtidig</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: angiver runtime-driveren samtidig</string> + <string name="drivers_runtime_builtin">Turnip indbygget i runtime\'en</string> + <string name="drivers_system_vulkan">system-Vulkan: ingen medfølgende build til denne GPU</string> + <string name="drivers_bundled">%1$s (medfølgende)</string> + <string name="drivers_manual">Manuel</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Kun den ene halvdel er udgivet lige nu</string> + <string name="drivers_pair_size">%1$.0f MB for begge</string> + <string name="drivers_none_to_set">Ingen drivere at angive: %1$s</string> + <string name="drivers_checking_latest">Søger efter de nyeste drivere…</string> + <string name="drivers_up_to_date_check_failed">Opdateret (kunne ikke kontrollere: %1$s)</string> + <string name="drivers_recommended_unpublished">De anbefalede drivere er ikke udgivet lige nu</string> + <string name="drivers_downloading_pair">Downloader %1$s %2$s…</string> + <string name="drivers_updated_to">Opdateret til %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Opdateret til %1$s %2$s. Skærmdriveren træder i kraft, når DroidDeck genstarter.</string> + <string name="drivers_auto_waits_for_session">Driveropdateringer venter, til sessionen stoppes.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s hentes, når du forlader mobildata og batterisparetilstand.</string> + <string name="drivers_skipping_bad">%1$s %2$s startede ingen session her, så Automatisk holder sig til de drivere, der gjorde.</string> + <string name="drivers_rolled_back">%1$s startede ingen session to gange, så Automatisk gik tilbage til de drivere, der virkede.</string> + <string name="drivers_switched_to">Skiftet til %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Skiftet til %1$s %2$s. Skærmdriveren træder i kraft, når DroidDeck genstarter.</string> + <string name="drivers_using">Bruger %1$s %2$s.</string> + <string name="drivers_using_restart">Bruger %1$s %2$s. Skærmdriveren træder i kraft, når DroidDeck genstarter.</string> + <string name="drivers_using_quest">Den medfølgende billeddriver til Quest og standardkørselsmiljøet bruges.</string> + <string name="drivers_using_quest_restart">Den medfølgende billeddriver til Quest og standardkørselsmiljøet bruges. Billeddriveren gælder efter en genstart af DroidDeck.</string> + <string name="drivers_not_a_driver">Ikke en driver-zip: hverken en AdrenoTools-driver, en -Linux-Turnip eller en Android + Linux-bundle</string> + <string name="drivers_import_failed">Import mislykkedes: %1$s</string> + <string name="drivers_imported_unnamed">Importeret driver</string> + <string name="drivers_using_bundle">Bruger %1$s som både runtime- og skærmdriver.</string> + <string name="drivers_using_bundle_restart">Bruger %1$s som både runtime- og skærmdriver. Skærmdriveren træder i kraft, når DroidDeck genstarter.</string> + <string name="drivers_deleted_bundle">Slettede %1$s (begge drivere)</string> + <string name="drivers_deleted">Slettede %1$s</string> + <string name="drivers_release_status">Nyeste: %1$s · kontrolleret %2$s</string> + <string name="drivers_release_status_failed">Nyeste: %1$s · %2$s kunne ikke nås · kontrolleret %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d min siden</item> + <item quantity="other">%1$d min siden</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d t siden</item> + <item quantity="other">%1$d t siden</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d dag siden</item> + <item quantity="other">%1$d dage siden</item> + </plurals> + <string name="drivers_checking_sources">Kontrollerer Banners-Turnip, WinNative og DroidDeck…</string> + <string name="drivers_check_failed">kontrol mislykkedes</string> + <string name="drivers_installed_pick_either">Installeret %1$s - vælg den i en af listerne for at angive begge drivere</string> + <string name="drivers_installed_pick">Installeret %1$s - vælg den i menuen</string> + + <string name="session_wait_removal">Vent til fjernelse af runtime er færdig</string> + <string name="session_title_game">Spil</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">direkte</string> + <string name="session_swap_failed">Udskiftning mislykkedes: %1$s</string> + <string name="session_profile_save_failed">Lagring af profil mislykkedes: %1$s</string> + <string name="session_desktop_paused">Skrivebordet er sat på pause</string> + <string name="session_named_paused">%1$s er sat på pause</string> + <string name="session_program_paused">Programmet er sat på pause</string> + <string name="session_starting_desktop">Starter skrivebordet</string> + <string name="session_starting_named">Starter %1$s</string> + <string name="session_starting_program">Starter programmet</string> + <string name="session_no_logs">Ingen logs for denne session.</string> + <string name="session_logs_archive_failed">Kunne ikke oprette arkivet med sessionslogs.</string> + <string name="session_logs_share_failed">Kunne ikke dele sessionslogs.</string> + <string name="session_starting_session">Starter sessionen…</string> + <string name="session_runtime_downloading">downloader Linux-runtime</string> + <string name="session_runtime_downloading_mb">downloader Linux-runtime · %1$d af %2$d MB</string> + <string name="session_runtime_checking">kontrollerer Linux-runtime</string> + <string name="session_runtime_unpacking">udpakker Linux-runtime</string> + <string name="session_desktop_downloading">downloader skrivebordet</string> + <string name="session_desktop_downloading_mb">downloader skrivebordet · %1$d af %2$d MB</string> + <string name="session_desktop_checking">kontrollerer skrivebordet</string> + <string name="session_desktop_unpacking">udpakker skrivebordet</string> + <string name="session_proton_downloading">downloader Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">downloader Proton Experimental (ARM64) · %1$d af %2$d MB</string> + <string name="session_proton_checking">kontrollerer Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">udpakker Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Kunne ikke nå runtime-kataloget. Kontroller forbindelsen, og tryk på Spil igen.</string> + <string name="session_runtime_install_failed">Linux-runtime blev ikke installeret. Kontroller runtime i Opsætning, og tryk på Spil igen.</string> + <string name="session_desktop_install_failed">Skrivebordet blev ikke installeret (%1$s). Kontroller forbindelsen, og tryk på Skrivebord igen.</string> + <string name="session_ended_named">%1$s stoppede uventet. Del logs med en fejlrapport, eller prøv igen.</string> + <string name="session_ended_program">Programmet stoppede uventet. Del logs med en fejlrapport, eller prøv igen.</string> + <string name="session_ended_desktop">Skrivebordet stoppede uventet. Del logs med en fejlrapport, eller prøv igen.</string> + <string name="session_ended_detail">Afslutningsstatus %1$d · %2$s</string> + <string name="session_ended_no_log">ingen log</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Loggen viser %1$d \"Function not implemented\"-fejl: proots seccomp-acceleration fejler i en hjælpeproces på denne enhed. Prøv %2$s → \"%3$s\" (eller \"%4$s\"), og start igen.</item> + <item quantity="other">Loggen viser %1$d \"Function not implemented\"-fejl: proots seccomp-acceleration fejler i en hjælpeproces på denne enhed. Prøv %2$s → \"%3$s\" (eller \"%4$s\"), og start igen.</item> + </plurals> + + <string name="mode_decky_plugins">Plugins</string> + <string name="mode_decky_plugins_hint">Installer en plugin-ZIP til den næste Steam-session.</string> + <string name="mode_decky_plugin_downloading">Downloader…</string> + <string name="mode_decky_plugin_install_zip">Installer fra ZIP</string> + <string name="store_cat_games">Spil</string> + <string name="store_cat_audio_video">Lyd og video</string> + <string name="store_cat_graphics">Grafik</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Kontor</string> + <string name="store_cat_developer">Udvikler</string> + <string name="store_cat_education">Uddannelse</string> + <string name="store_cat_science">Videnskab</string> + <string name="store_cat_system">System</string> + <string name="store_cat_utilities">Hjælpeprogrammer</string> + <string name="store_section_popular">Populære</string> + <string name="store_section_trending">Trends</string> + <string name="store_section_new">Nye</string> + <string name="store_section_updated">Opdaterede</string> + <string name="store_section_loading">indlæser…</string> + <string name="store_flatpak_setup">Flatpak-opsætning</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Kunne ikke søge efter opdateringer på Flathub</string> + <string name="content_rom_installed">installeret</string> + <string name="content_rom_folder">mappe</string> + <string name="theme_graphite">Grafit</string> + <string name="theme_graphite_detail">Grafitoverflader, med logoets egen kugleblå farve til alt, der er valgt, fokuseret eller trykket.</string> + <string name="theme_paper">Papir på sort</string> + <string name="theme_paper_detail">Hvid er primærfarven, ikonets blå er signalfarven til streger, ringe og prikker.</string> + <string name="theme_icon_blue">Ikonblå</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Installer runtime først</string> + <string name="game_sync_err_steam_library">Steam-biblioteket er ikke tilgængeligt</string> + <string name="game_sync_err_previous_sd">Det tidligere SD-bibliotek er ikke tilgængeligt</string> + <string name="game_sync_err_game_storage">Spillagring er ikke tilgængelig</string> + <string name="game_sync_err_added_games">Mappen med tilføjede spil er ikke tilgængelig</string> + <string name="game_sync_err_manifests">Steam-manifester er ikke tilgængelige</string> + <string name="content_system_many">Mange systemer</string> + <string name="fm_drive_internal">Intern</string> + <string name="fm_drive_linux">Linux-system</string> + <string name="fm_drive_sd">SD-kort</string> + <string name="fm_drive_storage">Lagerplads</string> + <string name="fm_select">Vælg</string> + <string name="fm_properties">Egenskaber</string> + <string name="fm_favorite_add">Tilføj til Favoritter</string> + <string name="fm_favorite_remove">Fjern fra Favoritter</string> + <string name="fm_rename">Omdøb</string> + <string name="fm_copy">Kopier</string> + <string name="fm_cut">Klip</string> + <string name="fm_actions">Handlinger</string> + <string name="fm_favorites">Favoritter</string> + <string name="fm_pin_current">Fastgør aktuel mappe</string> + <string name="fm_no_favorites">Ingen favoritter endnu - fastgør en mappe via dens ⋮-menu for hurtigt at komme tilbage hertil.</string> + <string name="fm_unpin_favorite">Fjern fra favoritter</string> + <string name="fm_size_zero">0 byte</string> + <string name="fm_unit_bytes">byte</string> + <string name="fm_prop_location">Placering</string> + <string name="fm_prop_type">Type</string> + <string name="fm_prop_size">Størrelse</string> + <string name="fm_prop_modified">Ændret</string> + <string name="fm_type_folder">Mappe</string> + <string name="fm_type_file">Fil</string> + <string name="fm_type_ext_file">%1$s-fil</string> + <string name="fm_read_only">Skrivebeskyttet</string> + <string name="fm_read_only_hint">Forhindrer spil (og Wine) i at overskrive eller slette denne fil.</string> + <string name="fm_read_only_failed">Kunne ikke ændre Skrivebeskyttet</string> + <string name="fm_hidden">Skjult</string> + <string name="fm_hidden_unsupported">Denne lagerplads kan ikke gemme det skjulte flag.</string> + <string name="fm_hidden_hint">Markerer filen som skjult i Windows (Wines skjulte attribut).</string> + <string name="fm_hidden_failed">Kunne ikke ændre Skjult på denne lagerplads</string> + <string name="fm_done">Udført</string> + <string name="fm_op_deleting">Sletter...</string> + <string name="fm_delete_failed">Sletning mislykkedes</string> + <string name="fm_op_moving">Flytter...</string> + <string name="fm_op_copying">Kopierer...</string> + <string name="fm_op_moving_item">Flytter - %1$s</string> + <string name="fm_op_copying_item">Kopierer - %1$s</string> + <string name="fm_op_moving_batch">Flytter %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Kopierer %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d gennemført, %2$d mislykkedes</string> + <string name="fm_paste_skipped">%1$d gennemført, %2$d sprunget over</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d element flyttet</item> + <item quantity="other">%1$d elementer flyttet</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d element kopieret</item> + <item quantity="other">%1$d elementer kopieret</item> + </plurals> + <string name="fm_already_exists">\"%1$s\" findes allerede</string> + <string name="fm_op_renaming">Omdøber...</string> + <string name="fm_rename_failed">Omdøbning mislykkedes</string> + <string name="fm_op_creating_folder">Opretter mappe...</string> + <string name="fm_create_folder_failed">Kunne ikke oprette mappe</string> + <string name="fm_new_folder">Ny mappe</string> + <string name="fm_folder_name">Mappenavn</string> + <string name="fm_create">Opret</string> + <string name="fm_new_name">Nyt navn</string> + <string name="fm_delete_title">Slet?</string> + <string name="fm_delete_text">Slet \"%1$s\" permanent?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Slet %1$d element?</item> + <item quantity="other">Slet %1$d elementer?</item> + </plurals> + <string name="fm_cannot_undo">Dette kan ikke fortrydes.</string> + <plurals name="fm_and_more"> + <item quantity="one">…og %1$d til</item> + <item quantity="other">…og %1$d til</item> + </plurals> + <string name="fm_op_deleting_batch">Sletter %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d kunne ikke slettes</item> + <item quantity="other">%1$d kunne ikke slettes</item> + </plurals> + <string name="fm_conflict_merge_hint">Sammenlægning tilføjer og udskifter filer i den eksisterende mappe.</string> + <string name="fm_conflict_overwrite_hint">Overskriv udskifter den eksisterende fil.</string> + <string name="fm_conflict_apply_all">Anvend på alle konflikter</string> + <string name="fm_conflict_merge">Sammenlæg</string> + <string name="fm_conflict_overwrite">Overskriv</string> + <string name="fm_conflict_keep_both">Behold begge</string> + <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_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> + <string name="fm_search">Søg</string> + <string name="fm_sort">Sorter</string> + <string name="fm_sort_name">Navn</string> + <string name="fm_sort_date">Dato ændret</string> + <string name="fm_rows_comfortable">Luftige rækker</string> + <string name="fm_rows_compact">Kompakte rækker</string> + <string name="fm_hide_hidden">Skjul skjulte filer</string> + <string name="fm_show_hidden">Vis skjulte filer</string> + <string name="fm_hide_favorites">Skjul favoritter</string> + <string name="fm_show_favorites">Vis favoritter</string> + <string name="fm_filter_folder">Filtrer denne mappe</string> + <string name="fm_free_space">%1$s ledig</string> + <string name="fm_selected_count">%1$d valgt</string> + <string name="fm_select_none">Ingen</string> + <string name="fm_select_all">Alle</string> + <string name="fm_paste">Indsæt</string> + <plurals name="fm_items"> + <item quantity="one">%1$d element</item> + <item quantity="other">%1$d elementer</item> + </plurals> + <string name="fm_paste_here">Indsæt %1$s her</string> + <string name="fm_paste_move_here">Indsæt %1$s (flyt) her</string> + <string name="fm_rail_title">Filer</string> + <string name="fm_rail_storage">LAGERPLADS</string> + <string name="fm_rail_quick">GENVEJE</string> + <string name="fm_rail_favorites">FAVORITTER</string> + <string name="fm_rail_downloads">Download</string> + <string name="fm_rail_downloads_short">Download</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Sessionslogs</string> + <string name="fm_rail_pictures">Billeder</string> + <string name="fm_favorite_added">Tilføjede \"%1$s\" til Favoritter</string> + <string name="fm_favorite_removed">Fjernede \"%1$s\" fra Favoritter</string> + <string name="fm_empty_directory">Tom mappe</string> + <string name="fm_up_one_level">Et niveau op</string> + <string name="fm_choose_folder">Vælg en mappe</string> + <string name="fm_choose_file">Vælg en fil</string> + <string name="ctrl_tint_steam_blue">Steam-blå</string> + <string name="ctrl_tint_sky">Himmelblå</string> + <string name="ctrl_tint_white">Hvid</string> + <string name="ctrl_tint_violet">Violet</string> + <string name="ctrl_tint_green">Grøn</string> + <string name="ctrl_tint_amber">Ravgul</string> + <string name="ctrl_tint_red">Rød</string> + <string name="ctrl_tint_pink">Pink</string> + <string name="ctrl_button_a">A-knap</string> + <string name="ctrl_button_b">B-knap</string> + <string name="ctrl_button_x">X-knap</string> + <string name="ctrl_button_y">Y-knap</string> + <string name="ctrl_button_lb">Venstre bumper</string> + <string name="ctrl_button_rb">Højre bumper</string> + <string name="ctrl_button_lt">Venstre trigger</string> + <string name="ctrl_button_rt">Højre trigger</string> + <string name="ctrl_button_view">View-knap</string> + <string name="ctrl_button_menu">Menu-knap</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad op</string> + <string name="ctrl_target_down">D-pad ned</string> + <string name="ctrl_target_left">D-pad venstre</string> + <string name="ctrl_target_right">D-pad højre</string> + <string name="ctrl_target_hidden">Skjult</string> + <string name="ctrl_editor_drag">Træk for at flytte</string> + <string name="ctrl_editor_snap">Fastgør</string> + <string name="ctrl_editor_save">Gem</string> + <string name="second_mode_none">Ingen</string> + <string name="second_mode_keyboard_trackpad">Tastatur + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Deck-greb + trackpads</string> + + <string name="rtinst_removing">Fjerner Linux-runtime</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Fjerner Linux-runtime · %1$d element</item> + <item quantity="other">Fjerner Linux-runtime · %1$d elementer</item> + </plurals> + <string name="rtinst_removed">Linux-runtime fjernet</string> + <string name="rtinst_removal_failed">Kunne ikke afslutte fjernelsen af Linux-runtime. Prøv fjernelse igen i Opsætning.</string> + <string name="rtinst_removing_leftovers">Fjerner rester af runtime</string> + <string name="rtinst_downloading">Downloader</string> + <string name="rtinst_verifying">Verificerer</string> + <string name="rtinst_extracting">Udpakker</string> + <string name="rtinst_channel_description">Vises, mens Linux-runtime installeres eller fjernes</string> + <string name="rtinst_title_installing">Installerer Linux-runtime</string> + <string name="rtinst_title_removing">Fjerner Linux-runtime</string> + + <string name="deskpkg_runtime_missing">Linux-runtime er ikke installeret</string> + <string name="deskpkg_no_checksum">Kataloget har ingen tjeksum for %1$s</string> + <string name="deskpkg_checksum_mismatch">Tjeksum stemmer ikke - intet blev ændret</string> + <string name="deskpkg_installing">Installerer %1$s</string> + <string name="deskpkg_place_failed">Kunne ikke placere AppImage</string> + <string name="deskpkg_extract_failed">Udpakning mislykkedes</string> + <string name="deskpkg_install_failed">Installation mislykkedes</string> + + <string name="flatpakmgr_setup_failed">Flatpak-opsætning mislykkedes (afslutningskode %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Flatpak-opsætning blev ikke afsluttet</string> + <string name="flatpakmgr_busy">En anden butiksopgave er i gang</string> + <string name="flatpakmgr_not_ready">Opsæt Flatpak først</string> + <string name="flatpakmgr_starting">Starter</string> + <string name="flatpakmgr_exit_status">Flatpak afsluttede med status %1$d</string> + <string name="flatpakmgr_installing">Installerer %1$s</string> + <string name="flatpakmgr_updating">Opdaterer %1$s</string> + <string name="flatpakmgr_removing">Fjerner %1$s</string> + <string name="flatpakmgr_installing_step">Installerer %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Opdaterer %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Fjerner %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">oversættelser</string> + <string name="flatpakmgr_ref_graphics_drivers">grafikdrivere</string> + <string name="flatpakmgr_ref_media_codecs">mediecodecs</string> + <string name="flatpakmgr_ref_runtime">%1$s-runtime</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s-runtime %2$s</string> + + <string name="appimg_too_small">Filen er for lille til at være en AppImage</string> + <string name="appimg_unreadable">Filen kan ikke læses: %1$s</string> + <string name="appimg_not_linux">Dette er ikke en AppImage (det er ikke et Linux-program)</string> + <string name="appimg_wrong_arch">Denne AppImage er bygget til hverken ARM64 (aarch64) eller x86-pc\'er</string> + <string name="appimg_not_appimage">Dette er et Linux-program, men ikke en AppImage</string> + <string name="appimg_wrong_type">Kun type 2-AppImages kan importeres (denne er type %1$d)</string> + <string name="appimg_no_space_import">Ikke nok ledig plads: import kræver cirka %1$s</string> + <string name="appimg_no_space_update">Ikke nok ledig plads: opdatering kræver cirka %1$s</string> + <string name="appimg_import_failed">Import mislykkedes</string> + <string name="appimg_gone">Den AppImage findes ikke længere</string> + <string name="appimg_update_failed">Opdatering mislykkedes</string> + <string name="appimg_extracting">Udpakker %1$s</string> + <string name="appimg_extract_failed">AppImage kunne ikke udpakkes</string> + <string name="appimg_extract_failed_detail">AppImage kunne ikke udpakkes: %1$s</string> + + <string name="deckymgr_stop_session_loader">Stop den aktive session, før du installerer Decky Loader</string> + <string name="deckymgr_download_failed">Download af Decky Loader mislykkedes</string> + <string name="deckymgr_size_mismatch">Decky Loaders størrelse passede ikke med metadata for udgivelsen</string> + <string name="deckymgr_checksum_download_failed">Kunne ikke downloade tjeksummen for udgivelsen</string> + <string name="deckymgr_checksum_missing">Tjeksum for udgivelsen mangler</string> + <string name="deckymgr_checksum_invalid">Tjeksum for udgivelsen er ugyldig</string> + <string name="deckymgr_checksum_mismatch">Tjeksum for Decky Loader stemmer ikke</string> + <string name="deckymgr_not_elf">Udgivelsesfilen er ikke en kompatibel 64-bit Linux-eksekverbar fil</string> + <string name="deckymgr_session_started_loader">En session startede under downloadet; stop den før du installerer Decky Loader</string> + <string name="deckymgr_loader_not_executable">Kunne ikke markere PluginLoader som eksekverbar</string> + <string name="deckymgr_cef_failed">Kunne ikke aktivere Steam CEF-fjernfejlretning</string> + <string name="deckymgr_stage_failed">Kunne ikke forberede PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Kunne ikke bevare den eksisterende PluginLoader</string> + <string name="deckymgr_loader_activate_failed">Kunne ikke aktivere den nye PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Stop den aktive session, før du installerer et plugin</string> + <string name="deckymgr_loader_required">Installer Decky Loader, før du importerer et plugin</string> + <string name="deckymgr_zip_unreadable">Kunne ikke læse den valgte ZIP-fil</string> + <string name="deckymgr_plugins_dir_failed">Kunne ikke oprette mappen til Decky-plugins</string> + <string name="deckymgr_extracting_zip">Udpakker plugin-ZIP</string> + <string name="deckymgr_zip_one_folder">Plugin-ZIP skal indeholde én plugin-mappe på øverste niveau</string> + <string name="deckymgr_zip_missing_files">Plugin-ZIP mangler plugin.json, package.json eller dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Plugin-navn mangler</string> + <string name="deckymgr_session_started_plugin">En session startede under installationen; stop den før du installerer et plugin</string> + <string name="deckymgr_plugin_installed">Plugin installeret · genstart Steam for at indlæse det</string> + <string name="deckymgr_plugin_install_failed">Installation af plugin-ZIP mislykkedes</string> + <string name="deckymgr_zip_too_many">Plugin-ZIP indeholder for mange elementer</string> + <string name="deckymgr_zip_invalid_path">Plugin-ZIP indeholder en ugyldig sti</string> + <string name="deckymgr_zip_duplicate_paths">Plugin-ZIP indeholder gentagne stier</string> + <string name="deckymgr_zip_unsafe_path">Plugin-ZIP indeholder en usikker sti</string> + <string name="deckymgr_folder_failed">Kunne ikke oprette plugin-mappe</string> + <string name="deckymgr_zip_too_large">Plugin-ZIP udvider sig til mere end 1 GiB-grænsen</string> + <string name="deckymgr_bundled_not_executable">Kunne ikke markere den medfølgende plugin-binærfil som eksekverbar</string> + <string name="deckymgr_remote_entry_invalid">Ugyldig remote_binary-post</string> + <string name="deckymgr_remote_name_invalid">Ugyldigt navn på fjern-binærfil</string> + <string name="deckymgr_remote_url_https">URL til fjern-binærfil skal bruge HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Fjern-binærfilen %1$s har en ugyldig SHA-256-hash</string> + <string name="deckymgr_bin_dir_failed">Kunne ikke oprette plugin-bin-mappen</string> + <string name="deckymgr_downloading_binary">Downloader plugin-binærfil · %1$s</string> + <string name="deckymgr_binary_download_failed">Kunne ikke downloade plugin-binærfilen %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Tjeksum for plugin-binærfil stemmer ikke · %1$s</string> + <string name="deckymgr_binary_not_executable">Kunne ikke markere plugin-binærfil som eksekverbar · %1$s</string> + <string name="deckymgr_binary_replace_failed">Kunne ikke udskifte plugin-binærfil · %1$s</string> + <string name="deckymgr_binary_install_failed">Kunne ikke installere plugin-binærfil · %1$s</string> + <string name="deckymgr_folder_taken">Plugin-mappen hører til et andet plugin</string> + <string name="deckymgr_preserve_failed">Kunne ikke bevare det eksisterende plugin</string> + <string name="deckymgr_activate_failed">Kunne ikke aktivere det importerede plugin</string> + <string name="deckymgr_settings_failed">Kunne ikke opdatere Decky-pluginindstillinger</string> + <string name="deckymgr_restore_failed">Kunne ikke gendanne det eksisterende plugin</string> + + <string name="adbfix_save_failed">Kunne ikke gemme identitet til Trådløs fejlretning</string> + <string name="adbfix_command_failed">ADB-kommando mislykkedes (%1$d)</string> + <string name="adbfix_not_confirmed">Android bekræftede ikke, at procesgrænsen blev ændret: %1$s</string> + <string name="adbfix_no_pairing">Ingen parring for Trådløs fejlretning er gemt</string> + <string name="adbfix_enter_address">Indtast den aktuelle IP-adresse og port for Trådløs fejlretning</string> + + <string name="adbpair_timed_out">Der opstod timeout under venten på parringsvinduet. Forsøg igen fra DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Kunne ikke lede efter parringsvinduet (%1$d). Tjek at Wi-Fi er tændt.</string> + <string name="adbpair_discovery_failed">Kunne ikke lede efter parringsvinduet: %1$s</string> + <string name="adbpair_six_digits">Indtast alle 6 cifre i koden</string> + <string name="adbpair_pairing">Parrer…</string> + <string name="adbpair_code_rejected">Den kode virkede ikke. Åbn parringsvinduet igen, og indtast dens nye kode.</string> + <string name="adbpair_connecting">Parret. Forbinder…</string> + <string name="adbpair_port_not_found">Parret, men porten til Trådløs fejlretning blev ikke fundet. Lad Trådløs fejlretning være tændt, og forsøg igen.</string> + <string name="adbpair_applying">Anvender indstillingen…</string> + <string name="adbpair_command_failed">Kommando til Trådløs fejlretning mislykkedes</string> + <string name="adbpair_channel_name">Opsætning af Trådløs fejlretning</string> + <string name="adbpair_channel_description">Spørger efter parringskoden til Trådløs fejlretning, mens Indstillinger er åben</string> + <string name="adbpair_title_pair">Par Trådløs fejlretning</string> + <string name="adbpair_waiting_text">Tænd Trådløs fejlretning, og tryk derefter på „Par enhed med parringskode“.</string> + <string name="adbpair_waiting_long">Tænd Trådløs fejlretning, og tryk derefter på „Par enhed med parringskode“. Bliv i Indstillinger: koden vises i denne notifikation.</string> + <string name="adbpair_code_label">6-cifret parringskode</string> + <string name="adbpair_code_hint">Tryk på Indtast kode, og skriv de 6 cifre, der vises i Indstillinger.</string> + <string name="adbpair_title_code">Indtast Wi-Fi-parringskoden</string> + <string name="adbpair_title_retry">Forsøg koden igen</string> + <string name="adbpair_enter_code">Indtast kode</string> + <string name="adbpair_title_working">Sætter Steam op</string> + <string name="adbpair_title_done">Steam er klar</string> + <string name="adbpair_done_text">Tryk for at gå tilbage til DroidDeck. Du kan slukke Trådløs fejlretning nu.</string> + <string name="adbpair_title_failed">Opsætning af Trådløs fejlretning stoppet</string> + + <string name="selfinst_download_failed">Hentningen mislykkedes</string> + <string name="selfinst_size_mismatch">Downloadets størrelse passede ikke med den udgivne APK og blev kasseret - forsøg igen</string> + <string name="selfinst_checksum_mismatch">Downloadet matchede ikke sin tjeksum og blev kasseret - forsøg igen</string> + <string name="selfinst_wrong_package">Opdateringen er til Android-pakken %1$s, ikke %2$s</string> + <string name="selfinst_metadata_signer">Opdateringens metadata angiver ikke DroidDecks udgivelsessigneringsnøgle</string> + <string name="selfinst_unreadable">Android kunne ikke læse den downloadede APK</string> + <string name="selfinst_apk_wrong_package">Den downloadede APK er til %1$s, ikke %2$s</string> + <string name="selfinst_version_mismatch">Den downloadede APK siger versionCode %1$d, ikke den udgivne %2$d</string> + <string name="selfinst_downgrade">Android installerer ikke versionCode %1$d over den installerede %2$d</string> + <string name="selfinst_no_signing">Den downloadede APK har ingen signeringsoplysninger</string> + <string name="selfinst_wrong_signer">Den downloadede APK er ikke signeret med DroidDecks udgivelsesnøgle</string> + <string name="appupd_http">Opdateringskataloget svarede HTTP %1$d</string> + + <string name="loadstate_starting">Starter sessionen…</string> + <string name="loadstate_elapsed">%1$d:%2$02d forløbet · arbejder stadig</string> + <string name="loadstate_steam_update">Downloader Steam-klientopdateringen · %1$d%%</string> + <string name="loadstate_steam_client">Downloader Steam-klienten · %1$s</string> + + <string name="pextra_busy">En installation af et kompatibilitetsværktøj er allerede i gang</string> + <string name="pextra_stop_session">Stop den aktive session, før du installerer kompatibilitetsværktøjer</string> + <string name="pextra_no_release">Kunne ikke finde en ARM64-udgivelse af %1$s</string> + <string name="pextra_no_space">Mindst 4 GB ledig plads plus downloadets størrelse er nødvendig for at installere %1$s</string> + <string name="pextra_downloading">Downloader %1$s %2$s</string> + <string name="pextra_retrying">Forsøger download igen · forsøg %1$d af %2$d</string> + <string name="pextra_interrupted">Download afbrudt</string> + <string name="pextra_download_failed">Downloadet mislykkedes; den delvise fil beholdes, så et nyt forsøg kan genoptage</string> + <string name="pextra_too_big">Downloadet overskred udgivelsens størrelse og blev slettet</string> + <string name="pextra_incomplete">Downloadet var ufuldstændigt; den delvise fil beholdes til et genoptageligt forsøg</string> + <string name="pextra_verifying">Bekræfter download</string> + <string name="pextra_checksum_unreadable">Kunne ikke læse tjeksummen for udgivelsen; forsøg igen</string> + <string name="pextra_no_checksum">%1$s %2$s udgiver ingen tjeksum; intet blev installeret</string> + <string name="pextra_checksum_mismatch">Tjeksum stemmer ikke; downloadet blev slettet</string> + <string name="pextra_session_started">En session startede under downloadet; stop den før du installerer kompatibilitetsværktøjer</string> + <string name="pextra_installing">Installerer %1$s</string> + <string name="pextra_install_failed">Installation af %1$s mislykkedes (afslutningskode %2$d)</string> + <string name="pextra_could_not_install">Kunne ikke installere %1$s</string> + <string name="esync_fetching">Henter droiddeck-esync-pakken</string> + + <string name="cmgr_fex_linux_helpers">med Linux-hjælpeprogrammer</string> + <string name="cmgr_fex_dlls_only">Kun DLL\'er</string> + <string name="cmgr_original_proton_updated">Original (Proton opdateret siden sidste ombytning)</string> + <string name="cmgr_changed_outside">Ændret uden for Komponenter</string> + <string name="cmgr_not_present">ikke til stede</string> + <string name="cmgr_original_version">Original %1$s</string> + <string name="cmgr_original_from">Original fra %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s sættes ind i %3$s, når spillet der kører på det, lukker.</string> + <string name="cmgr_swap_done">%1$s %2$s er nu i %3$s. Det træder i kraft næste gang et spil starter.</string> + <string name="cmgr_original_missing">Den originale pakke er ikke gemt</string> + <string name="cmgr_restore_queued">%1$s af %2$s går tilbage til sin original, når spillet der kører på det, lukker.</string> + <string name="cmgr_restore_done">%1$s af %2$s gendannet fra sin %3$s-original.</string> + <string name="cmgr_package_in_use">%1$s er i brug i %2$s. Byt den Proton til noget andet først.</string> + <string name="cmgr_package_not_stored">%1$s er ikke gemt</string> + <string name="cmgr_deleted">%1$s slettet.</string> + <string name="cmgr_original_kept">Originalen af den installerede version beholdes: den er vejen tilbage.</string> + <string name="cmgr_not_stored">Ikke gemt</string> + <string name="cmgr_deleted_original">Slettede %1$s-originalen af %2$s.</string> + <string name="cmgr_nightlies_only">Downloads kommer kun fra Nightlies-udgivelserne</string> + <string name="cmgr_list_predates_checksums">Denne pakkeliste er ældre end tjeksummer - opdater den, og forsøg igen</string> + <string name="cmgr_checksum_mismatch">Tjeksum stemmer ikke</string> + + <string name="sprefs_upscaler_linear">Lineær</string> + <string name="sprefs_upscaler_nearest">Nærmeste</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (kvalitet)</string> + <string name="sprefs_upscaler_sharpen">Kun skærpning</string> + <string name="sprefs_lod_bias_auto">Auto (matcher skalering)</string> + + <string name="look_off_desc">Intet anvendt.</string> + <string name="look_game_clarity">Spilklarhed</string> + <string name="look_game_clarity_desc">Skærpning med et strejf af kontrast - den til hver dag.</string> + <string name="look_vivid">Levende</string> + <string name="look_vivid_desc">Farven skubbet hårdt op. Deband slået til, så himlen ikke striber.</string> + <string name="look_cinematic">Filmisk</string> + <string name="look_cinematic_desc">Dybere kontrast, koldere farve, udjævnede kanter.</string> + <string name="look_competitive">Konkurrence</string> + <string name="look_competitive_desc">Skygger hævet og tung skærpning - se folk først.</string> + <string name="look_adaptive_sharpen">Adaptiv skærpning</string> + <string name="look_adaptive_sharpen_desc">Kun skærpning, farven er uberørt.</string> + <string name="look_filmic">Film</string> + <string name="look_filmic_desc">Filmagtig kurve, let dæmpet.</string> + <string name="look_arcade">Arkade</string> + <string name="look_arcade_desc">Højt og slagkraftigt.</string> + <string name="look_retro_crt">Retro CRT</string> + <string name="look_retro_crt_desc">CRT-rørets og det analoge signals udseende sammen.</string> + <string name="look_upscale_sharp">Opskalering skarp</string> + <string name="look_upscale_sharp_desc">Til kørsel under skærmens opløsning.</string> + <string name="look_pixel_clean">Rene pixels</string> + <string name="look_pixel_clean_desc">Skarpe pixels til 2D og gamle titler.</string> + <string name="look_anime_edge">Anime-kant</string> + <string name="look_anime_edge_desc">Toon-konturer plus skærpning.</string> + + <string name="gpuinfo_not_adreno">Ikke en Adreno-GPU</string> + <string name="gpuinfo_supported">Understøttet</string> + <string name="gpuinfo_experimental">Eksperimentel: dens drivere er testversioner</string> + <string name="gpuinfo_below_tested">Under testet hardware (Adreno 725 og nyere): kører muligvis ikke</string> + <string name="gpuinfo_unsupported">Ikke understøttet: DroidDeck kræver en Adreno (Snapdragon) GPU</string> + + <string name="turnip_rate_limited">GitHubs hastighedsgrænse blev nået - forsøg igen senere</string> + <string name="turnip_github_http">GitHub svarede HTTP %1$d</string> + <string name="turnip_download_failed">Hentningen mislykkedes</string> + <string name="turnip_list_predates_checksums">Denne driverliste er ældre end tjeksummer - opdater den, og forsøg igen</string> + <string name="turnip_checksum_mismatch">Tjeksum stemmer ikke - downloadet blev kasseret</string> + <string name="turnip_not_adrenotools">Ikke en AdrenoTools-driver: %1$s</string> + <string name="turnip_reject_no_meta">ingen meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json kan ikke læses (%1$s)</string> + <string name="turnip_reject_linux_driver">dette er en Linux-runtime-driver (importer den under „Linux runtime driver“)</string> + <string name="turnip_reject_wayland">dette er en Wayland-spildriver, som denne app ikke har brug for</string> + <string name="turnip_reject_no_library_name">meta.json angiver ikke noget libraryName, så intet kunne gives til AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json angiver %1$s, som ikke findes i zip-filen</string> + <string name="turnip_reject_not_aarch64">%1$s er ikke et 64-bit AArch64 ELF-delt bibliotek</string> + <string name="turnip_reject_glibc">%1$s linker glibc - en „-Linux“ Turnip, som hører under „Linux runtime driver“</string> + <string name="lvd_no_library">Ingen libvulkan_freedreno*.so i denne zip-fil. En Android (AdrenoTools) eller -Wayland Turnip-zip er ikke en Linux-runtime-driver.</string> + <string name="lvd_not_aarch64">%1$s er ikke et 64-bit AArch64 ELF-delt bibliotek.</string> + <string name="lvd_not_glibc">%1$s er ikke en glibc-driver - den linker Androids libc. Linux-runtime kræver en „-Linux“-zip; en almindelig eller „-Wayland“ Turnip kan slet ikke indlæses af Steam-klienten.</string> + <string name="bundle_no_manifest">Ikke en driverpakke: ingen manifest.json, der angiver en android- og en linux-driver</string> + <string name="bundle_entry_outside">Ikke en driverpakke: %1$s peger uden for den</string> + <string name="bundle_too_large">Ikke en driverpakke: den udpakkes til mere end %1$d MB</string> + + <string name="gstore_sd_card">SD-kort</string> + <string name="gstore_folder">Mappe</string> + + <string name="logshare_chooser">Del sessionslogs</string> + + <string name="hdr_needs_android_10">kræver Android 10 eller nyere (skærmlag med et farverum)</string> + <string name="hdr_none">denne skærm rapporterer ingen HDR-understøttelse</string> + <string name="hdr_not_hdr10">denne skærm understøtter %1$s, ikke HDR10</string> + + <string name="gpu_this_gpu">denne GPU</string> + <string name="phantom_title_on">Procesgrænse er tændt</string> + <string name="phantom_title_unset">Procesgrænse er ikke sat</string> + <string name="phantom_title_unreadable">Procesgrænse kunne ikke tjekkes</string> + <string name="phantom_title_off">Procesgrænse er slået fra</string> + <string name="phantom_title_not_required">Procesgrænse er ikke nødvendig</string> + <string name="phantom_instructions_fix">%1$s Hvis det ikke er muligt, så forbind enheden til en computer med ADB, og køre kommandoen nedenfor. Kom tilbage hertil, og tjek igen.</string> + <string name="phantom_instructions_off">Steam-sessioner kan starte.</string> + <string name="phantom_instructions_not_applicable">Denne Android-version bruger ikke denne grænse.</string> + <string name="phantom_fix_toggle">Tænd „Deaktiver begrænsningerne for underprocesser“ i Udvikleremuligheder, og lad Udvikleremuligheder være tændt bagefter.</string> + <string name="phantom_fix_no_toggle">Denne Android-version har ingen kontakt til det. Brug Trådløs fejlretning til at ændre det fra denne enhed.</string> + <string name="upd_block_no_apk">Denne version har ingen download til denne kopi af DroidDeck.</string> + <string name="upd_block_version_code">Android installerer den ikke over denne version, fordi dens versionCode %1$d er under den installerede %2$d.</string> + <string name="upd_fail_downgrade">Android installerer ikke en ældre version over en nyere. Bliv på denne version, indtil kanalen følger efter.</string> + <string name="upd_fail_signature">Denne kopi af DroidDeck er signeret anderledes (en lokal version?), så Android opdaterer den ikke direkte.</string> + <string name="upd_fail_storage">Der er ikke nok ledig plads til opdateringen.</string> + <string name="upd_fail_aborted">Opdateringen blev annulleret.</string> + <string name="upd_fail_with_message">Opdateringen blev ikke installeret: %1$s</string> + <string name="upd_fail_generic">Opdateringen blev ikke installeret.</string> + <string name="saves_layout_zip">%1$s-zip</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s er ikke startet endnu</string> + <string name="saves_none_found">Ingen gemte filer fundet for %1$s</string> + <string name="saves_not_save_zip">%1$s har ingen drive_c-mappe, så det er ikke en gemt-zip fra GameHub eller Winlator</string> + <string name="gstore_cannot_create">kan ikke oprette mapper i %1$s</string> + <string name="gstore_cannot_write">kan ikke skrive i %1$s</string> + <string name="gstore_cannot_write_detail">kan ikke skrive i %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Mappen er ikke tilgængelig</string> + <string name="gfiles_name_taken">En anden fil bruger allerede %1$s</string> + <string name="gfiles_art_unavailable">Grafikmappen er ikke tilgængelig</string> + <string name="gfiles_unrelated_inventory">Mappen har en urelateret synkroniseringsoversigt</string> + <string name="gfiles_remove_failed">Kunne ikke fjerne %1$s</string> + <string name="gfiles_outside_folder">Filen forlader eksportmappen</string> + <string name="cmgr_fex_unnamed">FEX (version uden versionsnavn)</string> + <string name="cmgr_no_profile">ingen profile.json i %1$s</string> + <string name="cmgr_not_component_package">%1$s er ikke en Linux-komponentpakke (type %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s fri</string> + <string name="mode_storage_auto_short">Automatisk</string> + <string name="appupd_catalog_rejected">Opdateringskataloget bestod ikke sine kontroller (%1$s)</string> + <string name="main_adb_clip_label">DroidDeck-indstilling for procesgrænse</string> + <string name="setup_signed_in_offline_unnamed">Logget ind · offline-tilstand</string> + <string name="setup_signed_in_unnamed">Logget ind</string> + <string name="driver_tag_bundled">INDBYGGET</string> + <string name="driver_tag_downloaded">DOWNLOADET</string> + <string name="driver_tag_imported">IMPORTERET</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Sessionsskærm</string> + <string name="display_resolution">Opløsning</string> + <string name="display_game_fit">16:9-spiltilpasning</string> + <string name="display_game_fit_hint">Hvordan 16:9-spil tilpasses denne skærm. Fra næste session.</string> + <string name="display_game_fit_unavailable">Vælg Match skærm eller en brugerdefineret størrelse, der er smallere end 16:9.</string> + <string name="display_preserve">Bevar proportioner</string> + <string name="display_stretch">Stræk til skærm</string> + <string name="display_image_scaling">Billedskalering</string> + <string name="display_filter">Skaleringsfilter</string> + <string name="display_filter_hint">Deles af Steam og Desktop.</string> + <string name="display_filter_live">Træder i kraft øjeblikkeligt. Deles af Steam og Desktop.</string> + <string name="display_filter_note">FSR, GSR og NIS anvendes ved forstørrelse af sessionsbilledet. Kun skærpning virker også uden forstørrelse.</string> + <string name="display_sharpness">Filterskarphed</string> + <string name="display_frame_rate">Billedfrekvens</string> + <string name="display_look_filter">%1$s Indstiller skalering til %2$s.</string> + <string name="display_match_screen">Match skærm (%1$d×%2$d)</string> + <string name="display_follow_screen">Følg skærm (ændrer størrelse ved fold/udfold)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Vis enhedsoplysninger</string> + <string name="device_info_hide">Skjul enhedsoplysninger</string> + <string name="device_info_loading">Læser enheden…</string> + <string name="device_info_copy">Kopier</string> + <string name="device_info_copy_hint">Indsæt disse oplysninger i en fejlrapport.</string> + <string name="device_info_copied">Kopieret.</string> + <string name="force_ssbs_title">Tving SSBS</string> + <string name="force_ssbs_hint">Bevarer en CPU-hastighedsindstilling, som Wine hele tiden slår fra. Kan gøre Windows-spil hurtigere på Snapdragon 8 Elite; lille ændring set på ældre chips. Træder i kraft ved næste spilstart.</string> + + <string name="rail_stores">Butikker</string> + <string name="source_steam">Steam</string> + <string name="source_added">Brugerdefineret</string> + <string name="setup_stores">Butikker</string> + <string name="setup_stores_open_on">Åbn en butik på</string> + <string name="setup_stores_speed">Downloadhastighed</string> + <string name="setup_stores_engine">Butiksmotor</string> + <string name="setup_stores_engine_chip_ready">● Motor klar</string> + <string name="setup_stores_engine_chip_missing">Ikke bygget</string> + <string name="stores_tier_balanced">Afbalanceret</string> + <string name="stores_tier_fast">Hurtig</string> + <string name="stores_tier_max">Maks</string> + <string name="stores_title">Butikker</string> + <string name="stores_settings">Butiksindstillinger</string> + <string name="stores_settings_eyebrow">Indstillinger</string> + <string name="stores_chip_signed_out">(ikke logget ind)</string> + <string name="stores_tab_store">Butik</string> + <string name="stores_tab_installed">Installeret</string> + <string name="stores_tab_library">Bibliotek</string> + <string name="stores_tab_all">Alle</string> + <string name="stores_tab_downloads">Downloads</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Log ind</string> + <string name="stores_signout_named">%1$s · log ud</string> + <string name="stores_signout_title">Log ud af %1$s?</string> + <string name="stores_signout_note">Installerede spil forbliver. Biblioteket hentes igen, når du logger ind igen.</string> + <string name="stores_signout_stay">Bliv logget ind</string> + <string name="stores_signout_go">Log ud</string> + <string name="stores_search_catalog">Søg i %1$s-kataloget…</string> + <string name="stores_search_installed">Søg i installerede spil…</string> + <string name="stores_search_library">Søg i dit bibliotek…</string> + <string name="stores_search_open">Søg</string> + <string name="stores_installed_empty">Intet installeret</string> + <string name="stores_library_loading">Indlæser</string> + <string name="stores_nothing_matches">Ingen spil</string> + <string name="stores_shelves_loading">Indlæser butikken…</string> + <string name="stores_amazon_no_catalog">Intet katalog</string> + <string name="stores_shelf_new">Nyheder</string> + <string name="stores_shelf_deals">Tilbud</string> + <string name="stores_shelf_free">Gratis spil</string> + <string name="stores_shelf_trending">Populært</string> + <string name="stores_shelf_library">Dit bibliotek</string> + <string name="stores_play">Spil</string> + <string name="stores_install">Installer</string> + <string name="stores_resume_install">Genoptag installation</string> + <string name="stores_dl_interrupted">Afbrudt</string> + <string name="stores_install_size">Installation · %1$s</string> + <string name="stores_get_free">Få gratis</string> + <string name="stores_view_on">Se på %1$s</string> + <string name="stores_buy_price">Køb · %1$s</string> + <string name="stores_installed_chip">Installeret</string> + <string name="stores_in_library">I biblioteket</string> + <string name="stores_free">Gratis</string> + <string name="stores_resume">Genoptag</string> + <string name="stores_refresh">Opdater</string> + <string name="stores_sort">Sortér</string> + <string name="stores_sort_last_played">Senest spillet</string> + <string name="stores_sort_recently_installed">Senest installeret</string> + <string name="stores_sort_title_asc">Titel A–Å</string> + <string name="stores_sort_title_desc">Titel Å–A</string> + <string name="stores_sort_size_desc">Størrelse: størst</string> + <string name="stores_sort_size_asc">Størrelse: mindst</string> + <string name="stores_sort_release_date">Udgivelsesdato</string> + <string name="stores_view_list">Listevisning</string> + <string name="stores_view_cards">Kortvisning</string> + <string name="stores_show_mature">Vis indhold for voksne</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Fra</string> + <string name="epic_eos">Epic-login (EOS)</string> + <string name="epic_offline">Start offline</string> + <string name="epic_resolve">Løs Epic-login</string> + <string name="epic_client_version">Version %1$s</string> + <string name="epic_client_no_runtime">Installer Linux-runtimen først</string> + <string name="epic_client_checking">Kontrollerer den nyeste version…</string> + <string name="epic_client_unpacking">Udpakker…</string> + <string name="epic_client_unreachable">Downloadserveren svarede ikke</string> + <string name="epic_client_needs_fex">Epic Games Launcher skal bruge FEX, som Steam henter. Åbn launcheren igen, når Steam er startet.</string> + <string name="epic_client_download_failed">Download mislykkedes: %1$s</string> + <string name="epic_client_unpack_failed">Kunne ikke udpakke launcheren: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher accepterede ikke login. Start den igen fra launcheren.</string> + <string name="epic_client_uninstall_body">Fjerner launcheren og frigør dens plads. Dine Epic-spil forbliver installeret og virker stadig, og login gemmes til næste installation.</string> + <string name="epic_client_uninstall_stops">Den kørende session lukkes først.</string> + <string name="epic_client_uninstalled">Epic Games Launcher er afinstalleret</string> + <string name="epic_client_uninstall_failed">Nogle launcherfiler kunne ikke fjernes. Prøv igen.</string> + <string name="epic_client_uninstalling">Vent, til Epic Games Launcher er færdig med at blive afinstalleret</string> + <string name="store_cloud_saves">Cloud-gemte spil</string> + <string name="cloud_upload">Upload til cloud</string> + <string name="cloud_download">Download fra cloud</string> + <string name="cloud_none">Ingen cloud-gemte spil</string> + <string name="cloud_conflict">Cloud-konflikt</string> + <string name="cloud_conflict_files">Cloud-konflikt · %1$d filer</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Behold cloud</string> + <string name="cloud_keep_local">Behold lokal</string> + <string name="cloud_checking">Tjekker cloud…</string> + <string name="cloud_last_sync">Senest synkroniseret %1$s</string> + <string name="cloud_never">Ikke synkroniseret endnu</string> + <string name="cloud_done">%1$d filer</string> + <string name="stores_eyebrow_installed">installeret</string> + <string name="stores_eyebrow_library">i dit bibliotek</string> + <string name="stores_eyebrow_store">butik</string> + <string name="achievements_title">Bedrifter</string> + <string name="achievements_count">%1$d af %2$d låst op</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Låst op · %1$d</string> + <string name="achievements_group_locked">Låst · %1$d</string> + <string name="achievements_group_hidden">Skjult · %1$d</string> + <string name="achievements_hidden">Skjult bedrift</string> + <string name="achievements_hidden_detail">Detaljer vises, når den er låst op.</string> + <string name="achievements_all">Alle bedrifter låst op</string> + <string name="achievements_reading">Indlæser…</string> + <string name="achievements_signed_out">Log ind på %1$s for at se dine bedrifter.</string> + <string name="achievements_unreachable">Kunne ikke oprette forbindelse til %1$s. Prøv igen, når du er online.</string> + <string name="achievements_none">%1$s har ingen bedrifter for dette spil.</string> + <string name="achievements_show_all">Vis alle %1$d</string> + <string name="achievements_dialog_title">Bedrifter · %1$s</string> + <string name="stores_in_steam">✓ I Steam</string> + <string name="stores_uninstall">Afinstaller</string> + <string name="stores_uninstalling">Afinstallerer…</string> + <string name="stores_uninstall_title">Afinstaller %1$s?</string> + <string name="stores_uninstall_body_size">Frigør %1$s og fjerner det fra Steam.</string> + <string name="stores_uninstall_body">Fjerner dets filer og dets genvej i Steam.</string> + <string name="stores_launch_not_registered">Steam fanger spillet op næste gang det starter; start det derfra, eller åbn Steam nu.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Steams eget valg pr. spil</string> + <string name="stores_card_audio">Lyd</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Komponenter</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motor</string> + <string name="stores_card_engine_value">%1$s · native</string> + <string name="stores_card_engine_java">%1$s · indbygget</string> + <string name="stores_how_it_runs">Hvordan det køres</string> + <string name="stores_kv_fetched">Hentet fra</string> + <string name="stores_kv_fetched_value">%1$s, med din konto</string> + <string name="stores_kv_installed_to">Installeret til</string> + <string name="stores_kv_installed_to_value">Spillagring (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Startes af</string> + <string name="stores_kv_launched_by_value">Steam og Proton, samme vej som Steam-spil</string> + <string name="stores_kv_launched_by_epic">Steam og Proton · Epic-login pr. start, EOS-overlay slået fra</string> + <string name="stores_kv_launched_by_amazon">Steam og Proton · Amazon Games Services-variabler er sat</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">tilføjet til Steam ved installation (Deck UI + Steam Input)</string> + <string name="stores_downloads_empty">Ingen downloads</string> + <string name="stores_dl_paused">Pause</string> + <string name="stores_dl_queued">I kø</string> + <string name="stores_dl_queued_at">I kø · #%1$d</string> + <string name="stores_dl_cancelled">Annulleret</string> + <string name="stores_dl_failed">Mislykkedes</string> + <string name="stores_dl_failed_reason">Mislykkedes · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Sæt på pause</string> + <string name="stores_dl_resume">Genoptag</string> + <string name="stores_dl_cancel">Annuller</string> + <string name="stores_dl_retry">Forsøg igen</string> + <string name="stores_dl_clear">Ryd</string> + <string name="stores_dl_clear_all">Ryd gennemførte</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Download</string> + <string name="stores_stage_verify">Bekræft</string> + <string name="stores_stage_install">Installer</string> + <string name="stores_stage_done">Færdig</string> + <string name="stores_stage_checking">Tjekker</string> + <string name="stores_stage_downloading">Downloader</string> + <string name="stores_dl_cancel_confirm">Slet download?</string> + <string name="stores_dl_failed_kept">Mislykkedes · %1$s beholdt</string> + <string name="stores_stage_verifying">Bekræfter</string> + <string name="stores_stage_installing">Installerer</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d filer</string> + <string name="stores_download_manager">Downloadadministrator</string> + <string name="stores_parallel">Downloads på samme tid</string> + <string name="stores_install_where">Installer til</string> + <string name="stores_install_title">Installer %1$s:</string> + <string name="stores_target_internal">Intern</string> + <string name="stores_target_free">%1$s fri</string> + <string name="stores_target_free_unknown">Ledig plads ukendt</string> + <string name="stores_storage_insufficient">For lidt ledig plads: der kræves %1$s, kun %2$s ledig</string> + <string name="stores_storage_low">For lidt plads (%1$s ledig, %2$s kræves)</string> + <string name="stores_notification_channel">Butiksdownloads</string> + <string name="stores_notification_channel_hint">Viser fremskridt for spil-downloads og holder downloads kørende i baggrunden</string> + <string name="stores_notification_one">Downloader</string> + <string name="stores_notification_many">%1$d downloads</string> + <string name="stores_notification_waiting">Forbereder…</string> + <string name="stores_notification_done_channel">Afsluttede butiksdownloads</string> + <string name="stores_notification_installed">%1$s installeret</string> + <string name="stores_notification_failed">Download af %1$s mislykkedes</string> + <string name="stores_notification_delete">Slet</string> + <string name="stores_notification_keep">Behold</string> + <string name="stores_login_title">Log ind på %1$s</string> + <string name="stores_login_provider_title">Log ind med din udbyder</string> + <string name="stores_login_reload">Genindlæs</string> + <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_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> + <string name="stores_login_error_ssl">Forbindelsen til loginsiden er ikke sikker.</string> + <string name="stores_login_error_verification">Login kunne ikke bekræftes. Forsøg igen.</string> + <string name="stores_login_error_generic">Login mislykkedes. Forsøg igen.</string> + <string name="common_close">Luk</string> + <string name="common_back">Tilbage</string> + <string name="common_edit">Rediger</string> + <string name="games_add_all">Tilføj alle spil i denne mappe</string> + <string name="games_added_none">Intet nyt i denne mappe</string> + <string name="edit_name">Navn</string> + <string name="edit_target">Mål</string> + <string name="edit_start_in">Start i</string> + <string name="edit_launch_options">Startindstillinger</string> + <string name="edit_artwork">Grafik</string> + <string name="edit_other_exe">Anden exe…</string> + <string name="edit_remove">Fjern</string> + <string name="art_cover">Omslag</string> + <string name="art_wide_cover">Bredt omslag</string> + <string name="art_adjust_logo">Tilpas logo</string> + <string name="logo_pos_default">Standard</string> + <string name="logo_pos_upper_left">Øverst til venstre</string> + <string name="logo_pos_upper_center">Øverst i midten</string> + <string name="logo_pos_center">Midten</string> + <string name="logo_pos_bottom_left">Nederst til venstre</string> + <string name="logo_pos_bottom_center">Nederst i midten</string> + <string name="logo_pos_position">Placering</string> + <string name="logo_pos_size">Størrelse</string> + <string name="logo_pos_save">Gem</string> + <string name="logo_pos_reset">Tilbage til standard</string> + <string name="logo_pos_hint">Tegnes oven på spillets baggrund, som Steam gør. Den præcise placering kan afvige et par pixels.</string> + <string name="logo_pos_no_logo">Dette spil har endnu ikke et logo. Vælg et under Logo for at se det her.</string> + <string name="logo_pos_failed">Logopladeringen kunne ikke gemmes. Prøv igen.</string> + <string name="art_background">Baggrund</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Ikon</string> + <string name="art_src_folder">Spilmappe</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Din fil</string> + <string name="art_src_exe">Fra exe-filen</string> + <string name="art_src_auto">Automatisk</string> + <string name="art_pick_image">Vælg billede…</string> + <string name="art_pick_title">Vælg et billede: %1$s</string> + <string name="art_reset">Nulstil til automatisk</string> + <string name="art_search_sgdb">Søg på SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Søg et spil</string> + <string name="art_sgdb_other_games">Andre resultater</string> + <string name="art_sgdb_none">Ingen resultater.</string> + <string name="art_sgdb_no_key">SteamGridDB kræver en API-nøgle. Tilføj din under Indstillinger › Launcher.</string> + <string name="art_sgdb_bad_key">SteamGridDB accepterede ikke API-nøglen. Tjek den under Indstillinger › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB begrænser antallet af forespørgsler lige nu. Prøv igen om et minut.</string> + <string name="art_sgdb_offline">SteamGridDB kan ikke nås. Tjek forbindelsen.</string> + <string name="art_sgdb_server">Noget gik galt hos SteamGridDB. Prøv igen senere.</string> + <string name="art_sgdb_no_game">SteamGridDB har ingen resultater for dette spil. Prøv at søge på det.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d spil tilføjet</item> + <item quantity="other">%1$d spil tilføjet</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d allerede i Spil</item> + <item quantity="other">%1$d allerede i Spil</item> + </plurals> + <string name="hop_back">B · Tilbage til %1$s</string> + <string name="hop_from_games">spillet</string> + <string name="hop_from_play">Spilindstillinger</string> + <string name="sheet_graphics_drivers">Grafikdrivere</string> + <string name="comp_this_proton">Denne Proton</string> + <string name="comp_every_proton">Hver Proton</string> + <string name="comp_for_every_proton">For hver Proton</string> + <string name="comp_available_count">Tilgængelig · %1$d</string> + <string name="comp_checked">Kontrolleret %1$s</string> + <string name="comp_check_all">Søg efter nye komponenter og drivere</string> + <string name="comp_get">Hent</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton og FEX nedenfor hører til denne Proton</string> + <string name="comp_device_tested">%1$s · testet</string> + <string name="comp_device_untested">%1$s · ikke testet</string> + <string name="comp_device_unsupported">%1$s · ikke understøttet</string> + <string name="gpu_auto_keeps">Holder det anbefalede par ajour</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Runtime- og skærmdrivere separat</string> + <string name="gpu_use_title">Brug %1$s?</string> + <string name="gpu_mode_title">Sådan vælges drivere</string> + <string name="gpu_mode_auto_detail">Det bedste par til denne GPU, altid opdateret</string> + <string name="gpu_mode_pair">Matchet par</string> + <string name="gpu_mode_pair_detail">Vælg et par; sætter begge drivere</string> + <string name="gpu_mode_mix">Fri blanding</string> + <string name="gpu_mode_mix_detail">Vælg billede og kørselsmiljø hver for sig</string> + <string name="gpu_mode_pair_short">Par</string> + <string name="gpu_mode_mix_short">Blandet</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAR</string> + <string name="gpu_src_bundle">PAKKE</string> + <string name="gpu_src_chosen">VALGT</string> + <string name="gpu_src_by_gpu">PR. GPU</string> + <string name="gpu_src_default">STANDARD</string> + <string name="gpu_display_live">Tegner nu</string> + <string name="gpu_display_pending">Kræver genstart · indtil da tegner %1$s</string> + <string name="gpu_runtime_live">Aktiv</string> + <string name="gpu_runtime_pending">Næste session · denne beholder %1$s</string> + <string name="gpu_display_next">Tegner skærmen. Gælder fra næste session.</string> + <string name="gpu_previous_driver">den forrige driver</string> + <string name="gpu_restart_banner">Genstart for at skifte billeddriver.</string> + <string name="gpu_restart_blocked">Stop den aktuelle session og genstart DroidDeck for at skifte billeddriver.</string> + <string name="gpu_restart_now">Genstart nu</string> + <string name="gpu_restart_later">Senere</string> + <string name="gpu_auto_title">Automatisk valgte dette par til din %1$s</string> + <string name="gpu_auto_builtin_title">Automatisk bruger de indbyggede drivere til din %1$s</string> + <string name="gpu_auto_reason">Valgt til %1$s-familien. Nye versioner installeres i baggrunden.</string> + <string name="gpu_pair_title">Vælg et par</string> + <string name="gpu_pair_hint">Et par sætter billeddriveren og runtimedriveren sammen.</string> + <string name="gpu_mix_title">Vælg hver driver</string> + <string name="gpu_mix_hint">En pakke udfylder begge pladser. Billedændringer gælder efter en genstart, kørselsændringer fra næste session.</string> + <string name="gpu_change_display">Skift billeddriver</string> + <string name="gpu_change_runtime">Skift runtimedriver</string> + <string name="gpu_autos_pick">AUTOMATISK VALG</string> + <string name="gpu_installed">Installeret</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · genstart for at anvende</string> + <string name="gpu_chip_restart">%1$s · kræver genstart</string> + <string name="comp_this_device">Denne enhed</string> + <string name="proton_remove_title">Fjern %1$s?</string> + <string name="setup_tab_diagnostics">Diagnostik</string> + <string name="setup_ready">Klar til at spille</string> + <string name="setup_not_ready">Ikke klar til at spille endnu</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">procesgrænse fra</string> + <string name="setup_ready_signed_in">logget ind som %1$s</string> + <string name="setup_needs_you">Når noget kræver dig</string> + <string name="setup_group_look">Udseende</string> + <string name="setup_group_device">Denne enhed</string> + <string name="setup_group_art">Biblioteksgrafik</string> + <string name="setup_group_download">Hentning</string> + <string name="setup_download_source">Kilde</string> + <string name="setup_download_source_auto">Automatisk</string> + <string name="setup_download_source_direct">Direkte</string> + <string name="setup_download_source_mirror">Spejl</string> + <string name="setup_download_source_custom">Eget præfiks</string> + <string name="setup_download_mirror">Websted</string> + <string name="setup_download_prefix">Præfiks</string> + <string name="flathub_eyebrow">LINUX-APPS</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Desktopapps til Linux-desktoppen, åbnet fra Desktop.</string> + <string name="flathub_setup">Konfigurer Flathub</string> + <string name="flathub_remove_title">Fjern %1$s?</string> + <string name="flathub_remove_note">Dets indstillinger og filer bevares.</string> + <string name="flathub_keep">Behold</string> + <string name="desktop_size">Størrelse på disk</string> + <string name="desktop_uninstall_title">Afinstaller desktoppen?</string> + <string name="desktop_all_systems">Alle</string> + <string name="gog_achievements">GOG-bedrifter</string> + <string name="gog_achievements_hint">Synkroniserer bedrifter for understøttede GOG-spil. Gælder fra næste start.</string> + <string name="gog_achievements_off">Bedrifter slået fra</string> + <string name="gog_achievements_on">Bedrifter aktiveret</string> + <string name="gog_achievements_signin">Log ind på GOG igen</string> + <string name="gog_achievements_uploaded">Bedrifter uploadet</string> + <string name="gog_achievements_pending">Upload af bedrift afventer</string> + <string name="gog_achievements_enable_store">Aktivér GOG-bedrifter i Butik-indstillinger</string> + <string name="gog_achievements_unavailable">Bedrifter ikke tilgængelige; se sessionslogs</string> + <string name="achievement_unlocked">Bedrift låst op</string> + <string name="touch_paste">Indsæt</string> + <string name="touch_dpad">Styrekryds</string> + <string name="touch_left_stick">Venstre stick</string> + <string name="touch_right_stick">Højre stick</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Tastatur</string> + <string name="touch_dpad_up">Styrekryds op</string> + <string name="touch_dpad_down">Styrekryds ned</string> + <string name="touch_dpad_left">Styrekryds venstre</string> + <string name="touch_dpad_right">Styrekryds højre</string> + <string name="touch_title">Berøringsstyring</string> + <string name="touch_controller">Berøringscontroller</string> + <string name="touch_mouse">Mus</string> + <string name="touch_on">Til</string> + <string name="touch_off">Fra</string> + <string name="touch_speed_slow">Langsom</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Hurtig</string> + <string name="touch_edit_layout">Rediger layout</string> + <string name="touch_droiddeck_menu">DroidDeck-menu</string> + <string name="touch_drag_hint">Træk kontroller ud på skærmen</string> + <string name="touch_arrange">Arrangér</string> + <string name="touch_discard">Kassér</string> + <string name="touch_saving">Gemmer…</string> + <string name="touch_icon">Ikon</string> + <string name="touch_narrower">B−</string> + <string name="touch_wider">B+</string> + <string name="touch_shorter">H−</string> + <string name="touch_taller">H+</string> + <string name="touch_hide">Skjul</string> + <string name="touch_color_opacity">Farve og gennemsigtighed…</string> + <string name="touch_copy_layout">Kopiér dette layout</string> + <string name="touch_layout_copied">Layout kopieret; indsæt det i berøringslayoutet for et vilkårligt spil</string> + <string name="touch_paste_layout">Indsæt kopieret layout</string> + <string name="touch_reset_layout">Nulstil til Steams standard</string> + <string name="touch_no_binding">Denne kontrol har ingen binding i Steam, der kan tildeles et ikon</string> + <string name="touch_icon_for">Ikon for %1$s</string> + <string name="touch_layout_color">Farve på berøringslayout</string> + <string name="touch_done">Udført</string> + <string name="touch_save_failed">Berøringslayoutet kunne ikke gemmes</string> + <string name="touch_saved">Berøringslayout gemt i Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Etiket (valgfrit)</string> + <string name="touch_icons_missing">Steams ikoner blev ikke fundet</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d ikon fra Steam</item> + <item quantity="other">%1$d ikoner fra Steam</item> + </plurals> + <string name="touch_icon_color">Ikonfarve</string> + <string name="touch_button_color">Knapfarve</string> + <string name="touch_no_icon">Intet ikon</string> + + <string name="stores_sync_sign_in">Kontrollerer login…</string> + <string name="stores_sync_library">Henter dit bibliotek…</string> + <string name="stores_sync_game_list">Henter spilliste…</string> + <string name="stores_sync_details">Indlæser spildetaljer… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Synkroniserer %1$d spil…</item> + <item quantity="other">Synkroniserer %1$d spil…</item> + </plurals> + <string name="stores_sync_progress">Synkroniserer… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Henter coverbilleder…</string> + <string name="stores_sync_failed">Synkronisering mislykkedes</string> + <string name="stores_sync_no_games">Der blev ikke fundet spil i dit %1$s-bibliotek</string> + <string name="stores_sync_amazon_no_answer">Amazon Games svarede ikke om dit bibliotek: opdater, eller log ind igen</string> + <string name="stores_sync_gog_unreachable">Kunne ikke oprette forbindelse til GOG</string> + <string name="stores_sync_gog_unreadable">Dit GOG-bibliotek kunne ikke læses</string> + <string name="stores_registering">Registrerer hos Steam…</string> + <string name="mode_client_arch">Steam-klient</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC-diagnostik</string> + <string name="setup_vac_diag_hint">Source-spil logger deres konsol (-condebug); vac.txt i sessionslogs viser, om det er sikret eller ej</string> + <string name="load_starting_steam_x64">Starter Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Bruges af x86-64-Steam-klienten</string> + <string name="storage_uninstall_in_x64">Denne kopi ligger i x86-64-Steam-klienten. Vælg x86-64 under Steam-klient, og afinstaller den så her.</string> + <string name="storage_uninstall_in_arm64">Denne kopi ligger i ARM64-Steam-klienten. Vælg ARM64 under Steam-klient, og afinstaller den så her.</string> + <string name="drawer_page_glasses">Brille</string> + <string name="glasses_open">VITURE-brille</string> + <string name="glasses_control">Brillestyring</string> + <string name="glasses_driver_missing">Denne build indeholder ikke driveren til denne brille.</string> + <string name="glasses_connection_failed">Kunne ikke oprette forbindelse til brillen. Sæt kablet i igen, eller tryk på Tillad for at prøve igen.</string> + <string name="glasses_allow">Tillad</string> + <string name="glasses_allow_hint">Lad DroidDeck indstille brillens opdateringshastighed, 3D-tilstand, lysstyrke, lydstyrke og solafskærmning og aflæse dens hovedsporing.</string> + <string name="glasses_asking">Venter på, at du tillader det i Androids dialogboks…</string> + <string name="glasses_denied">Styring blev afvist. Tillad den for at ændre brillens indstillinger.</string> + <string name="glasses_no_control">Brillen viser spillet, men dens indstillinger kan ikke ændres herfra.</string> + <string name="glasses_output">Udgang</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Spil på brillen</string> + <string name="glasses_game_on_hint">Vis kun spillet på brillen. Fra: telefonen viser det, og Android spejler telefonen.</string> + <string name="glasses_display">Skærm</string> + <string name="glasses_refresh">Opdateringshastighed</string> + <string name="glasses_3d">3D (side-by-side)</string> + <string name="glasses_3d_hint">Skift smartbrillerne til side-om-side 3D. Hovedsporing styres separat.</string> + <string name="glasses_3d_failed">3D-signalet blev ikke bekræftet. Prøv igen, når 2D-billedet er tilbage.</string> + <string name="glasses_no_signal">Intet billede: brillen er i en tilstand, som telefonen ikke kan sende. Hold dens 2D/3D-knap inde, eller tag stikket ud og sæt det i igen.</string> + <string name="glasses_3d_refresh">3D-opdateringshastighed</string> + <string name="glasses_auto3d">3D til VR-spil</string> + <string name="glasses_auto3d_hint">Skifter til 3D, mens SteamVR kører, og tilbage bagefter.</string> + <string name="glasses_picture">Billede</string> + <string name="glasses_picture_hint">Automatisk viser fladt indhold i begge øjne og registrerer SteamVR. Vælg Side-om-side-spil for SBS-indhold.</string> + <string name="glasses_picture_auto">Automatisk</string> + <string name="glasses_picture_screen">Virtuel skærm</string> + <string name="glasses_picture_sbs">Side-by-side-spil</string> + <string name="glasses_screen_size">Skærmbredde</string> + <string name="glasses_screen_distance">Skærmafstand</string> + <string name="glasses_screen_next_session">Bredde og afstand gælder, når et spil kører på brillen som virtuel skærm.</string> + <string name="glasses_screen_no_output">Disse indstillinger gælder, mens Spil på brillen er slået til, og spillet vises der.</string> + <string name="glasses_screen_flat_hint">Automatisk holder dette 2D-spil i fuld skærm. Brug en virtuel skærm for at justere bredde, afstand og hovedsporing.</string> + <string name="glasses_screen_use">Brug virtuel skærm</string> + <string name="glasses_screen_direct_hint">SteamVR udfylder visningen. Juster dens synsfelt i VR; bredde og afstand gælder kun for en virtuel skærm.</string> + <string name="glasses_screen_sbs_hint">Side-by-side-spil fylder hvert øje. Bredde og afstand gælder kun for en virtuel skærm.</string> + <string name="glasses_tracking_flat_hint">Automatisk holder dette 2D-spil fast i synsfeltet. Vælg Virtuel skærm under Skærm for at bruge hovedsporing.</string> + <string name="glasses_tracking_sbs_hint">Hovedsporing gælder for en virtuel skærm eller et kørende SteamVR-spil.</string> + <string name="glasses_hardware">Enhed</string> + <string name="glasses_brightness">Lysstyrke</string> + <string name="glasses_volume">Lydstyrke</string> + <string name="glasses_sunblock">Solafskærmning</string> + <string name="glasses_sunblock_hint">Gør de forreste glas mørkere.</string> + <string name="glasses_tracking">Sporing</string> + <string name="glasses_head_tracking">Hovedsporing</string> + <string name="glasses_head_tracking_hint">Brillens egne sensorer drejer den virtuelle skærm og SteamVR med dit hoved.</string> + <string name="glasses_recenter">Centrer visning</string> + <string name="glasses_recenter_button">Centrer skærmen igen</string> + <string name="glasses_vr_fov">SteamVR-synsfelt</string> + <string name="glasses_vr_fov_hint">Lavere bringer SteamVR tættere på og fylder brillen; højere viser mere omkring dig.</string> + <string name="glasses_playing">Spiller på %1$s</string> + <string name="glasses_calibration">Sporingskalibrering</string> + <string name="glasses_calibration_hint">Mindsker drift og justerer den vandrette reference.</string> + <string name="glasses_calibration_saved_hint">Gemt kalibrering anvendes på denne brille.</string> + <string name="glasses_calibration_open">Kalibrer</string> + <string name="glasses_calibration_instructions">Læg den tilsluttede brille på hovedet på en vandret flade, så stellet hviler jævnt. Tryk på Start, og lad den derefter ligge urørt i ca. 8 sekunder. Bevægelse starter målingen forfra. Dette justerer drift og hældning, ikke retning.</string> + <string name="glasses_calibration_settling">Lad brillen ligge urørt på hovedet. Venter på, at den falder til ro…</string> + <string name="glasses_calibration_collecting">Måler sensorerne. Hold brillen i ro.</string> + <string name="glasses_calibration_moving">Bevægelse registreret. Lad brillen ligge urørt; målingen starter automatisk forfra.</string> + <string name="glasses_calibration_turn_over">Læg brillen på hovedet på en vandret flade. Målingen starter, når den ligger korrekt.</string> + <string name="glasses_calibration_complete">Kalibrering gemt. Tag brillen på, se lige frem, og tryk så på Udført for at centrere.</string> + <string name="glasses_calibration_failed">Kalibreringen kunne ikke gennemføres. Tjek forbindelsen, hold brillen i ro, og prøv igen. Din tidligere kalibrering er uændret.</string> + <string name="glasses_calibration_start">Start</string> + <string name="glasses_calibration_done">Udført</string> + <string name="glasses_calibration_reset">Nulstil sporingskalibrering</string> + <string name="glasses_calibration_reset_hint">Vil du fjerne den gemte kalibrering og gendanne modellens standardværdier? Centrer, når du har taget brillen på igen.</string> + <string name="glasses_calibration_reset_button">Nulstil</string> + <string name="hand_camera_group">Håndsporing</string> + <string name="hand_camera_prompt_title">Spor hænder eller Joy-Con-controllere med telefonkameraet?</string> + <string name="hand_camera_prompt_body">Uden en controller tilsluttet, sporer telefonkameraet dine bare hænder i VR: knib din tommelfinger og pegefinger for at klikke, luk din hånd for at gribe, og drej din håndflade mod dig og knib for at åbne menuen. Med parrede Joy-Con-controllere sporer kameraet deres position, mens Joy-Con-controllerne giver rotation og knapinput. Billeder behandles på denne enhed og gemmes eller sendes aldrig.</string> + <string name="hand_camera_rear">Bagkamera</string> + <string name="hand_camera_rear_hint">Anbefales. Som regel skarpere og bredere.</string> + <string name="hand_camera_front">Frontkamera</string> + <string name="hand_camera_front_hint">Til når enhedens bagside ikke kan vende mod dig.</string> + <string name="hand_camera_allow">Brug kamera</string> + <string name="hand_camera_not_now">Ikke nu</string> + <string name="hand_camera_setting">Håndsporing med kamera</string> + <string name="hand_camera_setting_hint">Brug telefonkameraet til bevægelser med bare hænder eller til at placere parrede Joy-Con-controllere i VR. Joy-Con-controllere giver rotation og knapinput. Pauserer, mens smartglassene sporer dine hænder eller Joy-Con-controllere. Billeder behandles kun på denne enhed.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Kameraadgang</string> + <string name="hand_camera_access_hint">Tillad kameraadgang, så håndsporing kan starte.</string> + <string name="hand_camera_access_denied">Kameraadgang er slået fra. Slå den til i Android-indstillingerne.</string> + <string name="hand_camera_allow_button">Tillad</string> + <string name="hand_camera_open_settings">Åbn indstillinger</string> + <string name="hand_camera_placement">Kameraplacering</string> + <string name="hand_camera_placement_hint">Tjek, at kameraet kan se dig, før du spiller.</string> + <string name="hand_camera_check">Tjek</string> + <string name="hand_camera_check_title">Kameraplacering</string> + <string name="hand_camera_how_rear">Stil enheden op 1,5 til 2 meter væk i cirka brysthøjde med bagkameraet vendt mod dig. Træd så ind i billedet med hænderne ude.</string> + <string name="hand_camera_how_front">Stil enheden op 1,5 til 2 meter væk i cirka brysthøjde med skærmen vendt mod dig. Træd så ind i billedet med hænderne ude.</string> + <string name="hand_camera_starting">Starter kameraet…</string> + <string name="hand_camera_stand_up">Enheden ligger fladt. Stil den op, så kameraet vender mod dig.</string> + <string name="hand_camera_upright">Stil enheden mere lodret, så kameraet vender mod dig.</string> + <string name="hand_camera_not_seen">Kan ikke se dig endnu. Træd ind i billedet, så hoved og skuldre ses.</string> + <string name="hand_camera_move_back">Træd lidt tilbage.</string> + <string name="hand_camera_move_closer">Kom lidt tættere på.</string> + <string name="hand_camera_show_hands">Hold begge hænder ud, hvor kameraet kan se dem.</string> + <string name="hand_camera_good">Ser godt ud.</string> + <string name="hand_camera_failed">Kameraet kunne ikke starte. Luk andre apps, der bruger det, og prøv igen.</string> + <string name="hand_camera_switch">Skift kamera</string> + <string name="hand_camera_skip">Spring over</string> + <string name="hand_camera_done">Udført</string> + <string name="glasses_xreal_network_missing">Venter på brillens USB-Ethernet-forbindelse. Denne telefon gør den muligvis ikke tilgængelig for apps.</string> + <string name="glasses_xreal_connection_failed">XREAL-forbindelsen blev afbrudt eller returnerede et svar, der ikke understøttes. Prøver igen…</string> + <string name="glasses_xreal_experimental">Eksperimentel understøttelse af 1S. Brug Follow-tilstand, og slå stabilisering fra i brillens menu. Sporingsretninger og visningstilstande mangler stadig test på enheden.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard-tilstand</string> + <string name="cardboard_mode_hint">Billeder til venstre og højre øje til en VR-brille til telefonen.</string> + <string name="cardboard_source">Billede</string> + <string name="cardboard_source_screen">Virtuel skærm</string> + <string name="cardboard_source_sbs">Side-by-side-3D</string> + <string name="cardboard_viewer">Brille</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Ingen linse</string> + <string name="cardboard_ipd">Øjenafstand</string> + <string name="cardboard_screen_width">Skærmbredde</string> + <string name="cardboard_screen_distance">Skærmafstand</string> + <string name="cardboard_head_tracking">Hovedsporing</string> + <string name="cardboard_no_sensor">Denne enhed har ingen rotationssensor.</string> + <string name="cardboard_recenter">Centrer visning</string> + <string name="cardboard_recenter_button">Centrer</string> + <string name="cardboard_steamvr">SteamVR (eksperimentel)</string> + <string name="cardboard_steamvr_install">Installer</string> + <string name="cardboard_steamvr_installing">Downloader og udpakker SteamVR…</string> + <string name="cardboard_steamvr_start">Start</string> + <string name="cardboard_steamvr_stop">Stop</string> + <string name="cardboard_steamvr_unavailable">Ikke tilgængelig i denne session.</string> + <string name="cardboard_steamvr_failed">SteamVR svarede ikke; se sessionsloggen.</string> + <string name="drawer_component_downloads">Download komponenter</string> + <string name="drawer_component_downloads_hint">Downloads deles med siden Komponenter. Vælg en downloadet version ovenfor for at bruge den fra næste spilstart.</string> + <string name="drawer_component_choose_download">Vælg en version at downloade</string> + <string name="stores_fact_developer">Udvikler</string> + <string name="stores_fact_publisher">Udgiver</string> + <string name="stores_fact_released">Udgivet</string> + <string name="stores_hltb_main">Hovedhistorie</string> + <string name="stores_hltb_extras">+ Ekstra</string> + <string name="stores_hltb_completionist">Komplettering</string> + <string name="stores_hltb_hours">%1$s t</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="display_picture_position">Billedets placering</string> + <string name="display_position_top">Øverst</string> + <string name="display_position_bottom">Nederst</string> + <string name="display_position_center">Midten (standard)</string> + <string name="setup_tab_storage">Lager</string> + <string name="storage_measuring">Måler lager…</string> + <string name="storage_measuring_hint">Første gang tager et par sekunder.</string> + <string name="storage_internal">Internt lager</string> + <string name="storage_used_of">%1$s af %2$s brugt</string> + <string name="storage_free">%1$s ledig</string> + <string name="storage_droiddeck_uses">DroidDeck bruger %1$s. Målt %2$s.</string> + <string name="storage_rescanning">måler igen…</string> + <string name="storage_other_apps">Andre Android-apps</string> + <string name="storage_safe_now">Kan frigøres nu</string> + <string name="storage_safe_hint">Ubrugte kørselsmiljøer, rester, gamle logfiler</string> + <string name="storage_clean_up">Rydder op…</string> + <string name="storage_session_running">Stop sessionen for at rydde op eller slette noget. Størrelserne vises stadig.</string> + <string name="storage_where">Hvor det ender</string> + <string name="storage_games">Steam-spil</string> + <string name="storage_game_data">Spildata</string> + <string name="storage_game_data_hint">Præfikser %1$s · workshop %2$s · shaders %3$s</string> + <string name="storage_tools">Proton og kørselsmiljøer</string> + <string name="storage_tools_unused">%1$s ubrugt</string> + <string name="storage_stores">GOG, Epic og andre butikker</string> + <string name="storage_stores_hint">Fjern dem under Butikker</string> + <string name="storage_desktop">Skrivebordsapps</string> + <string name="storage_desktop_hint">Flatpak-apps og kørselsmiljøer</string> + <string name="storage_system">Linux-systemet og Steam-klienten</string> + <string name="storage_system_hint">Nødvendigt for at noget kan køre</string> + <string name="storage_app_data">DroidDeck-data</string> + <string name="storage_app_data_hint">Logfiler fra gamle sessioner %1$s · cache · drivere</string> + <string name="storage_legend_games">Spil</string> + <string name="storage_legend_data">Spildata</string> + <string name="storage_legend_tools">Proton og kørselsmiljøer</string> + <string name="storage_legend_stores">Andre butikker</string> + <string name="storage_legend_desktop">Skrivebordsapps</string> + <string name="storage_legend_system">Linux-systemet</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Ryd op</string> + <string name="storage_clean_up_lede">Intet her rører installerede spil eller igangværende hentninger.</string> + <string name="storage_nothing_to_clean">Der er intet at rydde op lige nu.</string> + <string name="storage_selected">Valgt: %1$s · %2$s → %3$s frigøres</string> + <string name="storage_cleaning">Rydder op…</string> + <string name="storage_free_button">Frigør %1$s</string> + <string name="storage_freed">Frigjorde %1$s.</string> + <string name="storage_item_runtimes">Ubrugte Steam-kørselsmiljøer og Proton</string> + <string name="storage_item_leftovers">Rester efter slettede spil</string> + <string name="storage_item_leftovers_unsure">Rester, der kan indeholde gemte spil</string> + <string name="storage_item_logs">Logfiler fra gamle sessioner</string> + <string name="storage_item_logs_detail">Logfiler fra denne session bevares</string> + <string name="storage_item_custom_detail">Ingen spil bruger det. Installer det igen under Komponenter, hvis du får brug for det.</string> + <string name="storage_item_shaders">Shadercache for installerede spil</string> + <string name="storage_item_shaders_detail">Genopbygges, mens du spiller. De første minutter af hvert spil hakker igen.</string> + <string name="storage_tag_safe">Sikkert</string> + <string name="storage_tag_unused">Ubrugt</string> + <string name="storage_tag_stutter">Hak</string> + <string name="storage_tag_saves">Tjek gemte spil</string> + <string name="storage_tag_default">Standard</string> + <string name="storage_tag_required">Nødvendigt</string> + <string name="storage_tag_not_used">Ubrugt</string> + <string name="storage_back">Lager</string> + <string name="storage_games_with_data">%1$s med deres data</string> + <string name="storage_sort_largest">Størst</string> + <string name="storage_sort_least_played">Mindst spillet</string> + <string name="storage_sort_sd">På SD-kort</string> + <string name="storage_no_games">Der er ingen spil her.</string> + <string name="storage_played">spillet %1$s</string> + <string name="storage_never_played">Aldrig spillet</string> + <string name="storage_game_parts">Spil %1$s · data %2$s</string> + <string name="storage_uninstall">Afinstaller</string> + <string name="storage_games_note">Afinstallation åbner Steam-vinduet, så Steam registrerer det. For at flytte et spil til SD-kortet bruger du Steam › Indstillinger › Lager.</string> + <string name="storage_uninstall_title">Afinstaller %1$s?</string> + <string name="storage_uninstall_body">Steam åbnes og beder om bekræftelse. Det frigør spillets %1$s. Præfikset bliver, til du rydder resterne op, og Steam Cloud-gemte spil bliver på kontoen.</string> + <string name="storage_open_steam">Åbn Steam</string> + <string name="storage_tools_detail">%1$s · %2$s ubrugt</string> + <string name="storage_remove_unused">Fjern ubrugte · %1$s</string> + <string name="storage_in_use">I brug</string> + <string name="storage_not_used">Ubrugt</string> + <string name="storage_remove">Fjern</string> + <string name="storage_remove_title">Fjern %1$s?</string> + <string name="storage_remove_body">Frigør %1$s. Steam henter det igen, hvis et spil får brug for det.</string> + <string name="storage_tool_fex_runtime">Nødvendigt for Linux x86-spil (FEX)</string> + <string name="storage_tool_arm_runtime">Nødvendigt for ARM64-Proton</string> + <string name="storage_tool_redist">VC++- og DirectX-installationer, som spil kræver</string> + <string name="storage_tool_fex">Kører Linux x86-spil</string> + <string name="storage_tool_steam">Steam-værktøj</string> + <string name="storage_tool_old_runtime">DroidDeck kører spil uden dette kørselsmiljø</string> + <string name="storage_tool_x86_proton">Proton x86, som DroidDeck ikke kan køre</string> + <string name="storage_tool_custom_default">Standard for alle spil</string> + <string name="storage_tool_custom_unused">Ingen spil bruger det</string> + <string name="storage_tool_custom_unknown">Steam-indstillingerne kan ikke læses, så det bevares</string> + <string name="storage_cleanup_busy">Vent, til lageroprydningen er færdig</string> + <string name="storage_low_title">Kun %1$s ledig</string> + <string name="storage_low_body">Steam har brug for plads til opdateringer og shadercache. Under 10 GB kan spilopdateringer mislykkes halvvejs.</string> + <string name="storage_low_safe">%1$s kan frigøres sikkert.</string> + <string name="storage_free_up">Frigør plads</string> + <string name="storage_play_anyway">Spil alligevel</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d installeret</item> + <item quantity="other">%d installerede</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d på SD-kort</item> + <item quantity="other">%d på SD-kort</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d værktøj</item> + <item quantity="other">%d værktøjer</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Tomme præfiksmapper og shadercache fra %d spil</item> + <item quantity="other">Tomme præfiksmapper og shadercache fra %d spil</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Præfikset for %d spil indeholder stadig filer, bl.a. lokale gemte spil. Lav en kopi først, hvis du har brug for dem.</item> + <item quantity="other">Præfikserne for %d spil indeholder stadig filer, bl.a. lokale gemte spil. Lav en kopi først, hvis du har brug for dem.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d spil</item> + <item quantity="other">%d spil</item> + </plurals> + <string name="storage_tool_default_proton">DroidDecks standard-Proton</string> + <string name="storage_tool_proton">DroidDecks Proton 11-mulighed</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Bruges af %d spil</item> + <item quantity="other">Bruges af %d spil</item> + </plurals> + <string name="storage_legend_components">Komponenter</string> + <string name="storage_components">Komponenter</string> + <string name="storage_item_components">Ubrugte komponenter</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Frigør %1$s. Læg kun en Proton-version tilbage, der ikke længere er installeret.</string> + <string name="storage_leftovers_unchecked">Ikke tjekket: en Steam-apps manifest kan ikke læses, så præfikser for slettede spil bliver, til det kan.</string> + <string name="storage_failed">Mislykkedes: %1$s</string> + <string name="storage_desktop_shared">%1$s delt</string> + <string name="storage_data_installed">Installerede spil</string> + <string name="storage_data_parts">Præfiks %1$s · shaders %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Ryd shaders</string> + <string name="storage_data_leftovers">Slettede spil</string> + <string name="storage_steam_app">Steam-app %1$d</string> + <string name="storage_leftover_unsure_detail">Præfikset indeholder stadig filer, måske lokale gemte spil</string> + <string name="storage_leftover_confirm">Rydder Wine-præfikset og shadercachen (%1$s). Lav først en kopi af de gemte spil, du har brug for; Steam Cloud-gemte spil bliver på kontoen.</string> + <string name="storage_data_other">Bevares</string> + <string name="storage_data_other_title">Ikke-Steam-spil og delt Steam-præfiks</string> + <string name="storage_data_other_detail">Præfikser for spil tilføjet via butikker eller manuelt</string> + <string name="storage_components_packages">Hentede pakker</string> + <string name="storage_components_originals">Bevarede originaler</string> + <string name="storage_components_none">Ingen komponentpakker hentet.</string> + <string name="storage_component_in_use">Valgt til en Proton eller et spil</string> + <string name="storage_component_unused">Ikke valgt nogen steder</string> + <string name="storage_original_kept">Lægger den installerede Proton tilbage</string> + <string name="storage_original_old">Proton-version, der ikke længere er installeret</string> + <string name="storage_tag_in_use">I brug</string> + <string name="storage_components_note">Komponenter i brug er låst. Vælg dem under Komponenter; det, du fjerner her, kan hentes igen der.</string> + <string name="storage_component_confirm">Frigør %1$s. Pakker, du selv har importeret, kan ikke hentes igen.</string> + <string name="storage_desktop_detail">%1$s til Flatpak-apps og det, de deler</string> + <string name="storage_desktop_apps_title">Apps</string> + <string name="storage_desktop_none">Ingen Flatpak-apps installeret.</string> + <string name="storage_desktop_shared_title">Deles af appene</string> + <string name="storage_desktop_runtimes">Kørselsmiljøer</string> + <string name="storage_desktop_runtimes_detail">Bibliotekerne, appene kører på; ubrugte forsvinder med Fjern ubrugte</string> + <string name="storage_desktop_cache">Hentningslager</string> + <string name="storage_desktop_cache_detail">Flatpaks objektlager og hentede cache</string> + <string name="storage_desktop_prune">Fjern ubrugte</string> + <string name="storage_desktop_prune_body">Fjerner kørselsmiljøer, som ingen installeret app har brug for, og rydder op i Flatpaks objektlager. Installerede apps virker stadig.</string> + <string name="storage_flatpak_uninstall_body">Fjerner appen (%1$s) og de kørselsmiljøer, ingen andre bruger. Data i din hjemmemappe bevares.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d pakke</item> + <item quantity="other">%d pakker</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d app</item> + <item quantity="other">%d apps</item> + </plurals> + <string name="boot_movie">Opstartsvideo</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps ser mere flydende ud, men bruger mere CPU, mens Steam starter. En opstartsvideo valgt i Steams egne indstillinger har forrang.</string> + <string name="boot_movie_sound">Lyd</string> + <string name="boot_movie_custom">Din egen video</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV eller WebM. Andre formater og filer over %1$d MB konverteres til 720p-WebM på enheden, op til %2$d sekunder.</string> + <string name="boot_movie_import">Importér</string> + <string name="boot_movie_remove">Fjern</string> + <string name="boot_movie_pick">Vælg en opstartsvideo</string> + <string name="boot_movie_imported">%1$s er nu opstartsvideoen</string> + <string name="boot_movie_imported_silent">%1$s er nu opstartsvideoen, uden lyd</string> + <string name="boot_movie_too_long">Videoer, der skal konverteres, må højst vare %1$d sekunder</string> + <string name="boot_movie_converting">Konverterer %1$d %%</string> + <string name="boot_movie_converting_started">Konverterer %1$s til Steam. Hold DroidDeck åben.</string> + <string name="boot_movie_unsupported">Enheden kan ikke afkode videoen.</string> + <string name="boot_movie_import_failed">Kunne ikke importere videoen</string> + <string name="glasses_experimental">Luma Ultra-kameraer — Eksperimentel</string> + <string name="glasses_joycons">Joy-Con-positionssporing</string> + <string name="glasses_joycons_hint">Brug smartglass-kameraerne til at placere dine parrede Joy-Con-controllere. Rotation og knapinput kommer fra Joy-Con-controllerne. Positionen estimeres, når dine håndled er skjulte. Erstatter controllere, der betjenes med bare hænder, og sætter telefonkameraets sporing på pause. Ret Joy-Con-controllerne fremad, når du tilslutter eller nulstiller sporingscentret.</string> + <string name="glasses_joycons_requires_position">Aktiver positionssporing først. Kræver bevægelseskompatible Joy-Con-controllere på Android 12 eller nyere. Fra som standard.</string> + <string name="setup_tab_glasses">Smartglass</string> + <string name="setup_glasses_scope">Indstillinger for skærm- og hovedsporing deles på tværs af DroidDeck-menuer, spil og desktopsessioner.</string> + <string name="setup_glasses_connect">Tilslut smartglass for at ændre deres skærm- og sporingsindstillinger. Dine gemte indstillinger gemmes, når du afbryder forbindelsen.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Visningstilstand</string> + <string name="glasses_output_2d">2D-output</string> + <string name="glasses_output_3d">3D-output</string> + <string name="glasses_picture_group">Billede og virtuel skærm</string> + <string name="glasses_position_group">Position og gulvniveau</string> + <string name="glasses_hands_group">Sporing af hænder — Eksperimentel</string> + <string name="glasses_tracking_status">Sporingsstatus</string> + <string name="glasses_resolution_2d">2D-opløsning</string> + <string name="glasses_resolution_3d">3D-opløsning</string> + <string name="glasses_resolution_vr">VR-opløsning</string> + <string name="glasses_resolution_auto">Automatisk</string> + <string name="glasses_resolution_inherit">Samme som 2D / 3D</string> + <string name="glasses_resolution_hint">Outputopløsning pr. øje.</string> + <string name="glasses_refresh_30_hint">Aktiver Spil på smartbriller for at vælge skærmens native 30 Hz-tilstand.</string> + <string name="glasses_3dof">3DoF virtuel skærm</string> + <string name="glasses_3dof_hint">Forankre flade spil foran dig, så du kan se dig omkring. Aktiverer Spil på smartbriller uden at skifte til 3D.</string> + <string name="glasses_screen_app_wide">Bredde og afstand opdaterer den sporede virtuelle skærm til DroidDeck-menuer, spil og desktopsessioner med det samme.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Positionssporing inkluderer hovedrotation i SteamVR. For sporing kun med rotation skal du slå positionssporing fra.</string> + <string name="glasses_head_tracking_spatial_hint">Styrer hovedbevægelse på den virtuelle skærm. Positionssporing inkluderer hovedrotation i SteamVR.</string> + <string name="glasses_quick_actions">Hurtige handlinger</string> + <string name="glasses_recenter_screen_hint">Se, hvor du vil have skærmen, og nulstil derefter sporingscentret for at indstille dens højde og retning.</string> + <string name="glasses_recenter_joycons_button">Centrer Joy-Con igen</string> + <string name="phone_camera_tracking_group">Telefonkamera — Eksperimentel</string> + <string name="phone_camera_tracking_setting">Spor hænder eller Joy-Con-controllere</string> + <string name="glasses_6dof">6DoF virtuel skærm</string> + <string name="glasses_position">Positionssporing — eksperimentel</string> + <string name="glasses_position_hint">Fysisk bevægelse i VR og omkring virtuelle skærme. Genstart af sporing tager et øjeblik.</string> + <string name="glasses_eye_height">Aktuel øjenhøjde over gulv</string> + <string name="glasses_floor">Indstil gulvniveau fra aktuel højde</string> + <string name="glasses_floor_set">Indstil gulvniveau</string> + <string name="glasses_spatial_setup">Opsætning og diagnosticering af stereokamera</string> + <string name="glasses_spatial_setup_hint">Kontroller kamerakalibrering og sporing af hænder før du spiller.</string> + <string name="glasses_spatial_open">Åbn opsætning</string> + <string name="glasses_hands">Controllere, der betjenes med bare hænder</string> + <string name="glasses_hands_hint">Brug smartbrillernes kameraer til at sigte med dine hænder, knib for at klikke og luk din hånd for at gribe i VR. Gamepad-pinde bevæger sig og drejer. Erstatter Joy-Con-positionssporing. Kan forsinke eller miste sporing under spil.</string> + <string name="glasses_hands_ready_hint">Aktiver controllere, der betjenes med bare hænder under Luma Ultra-kameraer i Sporing. Vis åbne hænder først.</string> + <string name="glasses_hands_base">Delt Luma Ultra-kalibrering</string> + <string name="glasses_hands_base_hint">Brug af den delte Luma Ultra-base. Kalibrer dine egne smartbriller for at bekræfte deres nøjagtighed.</string> + <string name="glasses_hands_calibration_verified">Målt kalibrering verificeret</string> + <string name="glasses_hands_calibration_required">Validering påkrævet</string> + <string name="glasses_hands_calibration_required_hint">Controllere, der betjenes med bare hænder, bliver tilgængelige, når den målte afstandskontrol er bestået.</string> + <string name="tracking_recovery_lost">Sporing mistet</string> + <string name="tracking_recovery_look">Se dig langsomt omkring i et godt oplyst rum.\nHold sporingskameraerne fri, og vend dig mod møbler eller andre synlige detaljer.</string> + <string name="tracking_recovery_restart_help">Stadig fast? På din telefon: smarte briller → Sporing → Åbn opsætning → Vis diagnostik → Genstart sporing.</string> + <string name="tracking_recovery_disconnected">Smart-briller afbrudt</string> + <string name="tracking_recovery_connect">Tjek USB-forbindelsen, og tilslut smartbrillerne igen.\nAccepter USB-adgangsprompten på din telefon, hvis den vises.</string> + <string name="tracking_recovery_usb_help">Når du er tilsluttet, skal du se dig langsomt omkring i et godt oplyst rum for at genoprette sporingen.</string> + <string name="tracking_recovery_recenter">Centrering er nødvendig</string> + <string name="tracking_recovery_recenter_steps">Sporingen er vendt tilbage i en ny position.\nSe fremad, og tryk derefter på nulstil sporingscenter på din telefon.</string> + <string name="tracking_recovery_recenter_help">Du kan også finde nulstilling af sporingscenter i smartbriller → Sporing → Åbn opsætning. Din gemte kamerakalibrering gemmes.</string> + <string name="tracking_recovery_stabilizing">Hold stille et øjeblik</string> + <string name="tracking_recovery_hold">Nulstilling af sporingscenter er i gang.\nHold smartbrillerne stabile, mens sporingen stabiliseres.</string> + <string name="tracking_recovery_automatic">Denne skærm lukker automatisk, når hovedsporing er klar.</string> + <string name="glasses_steady_hand_aim">Stabiliseret sigte med hænderne</string> + <string name="glasses_steady_hand_aim_hint">Sigt fra din skulder gennem din håndflade. Slå denne indstilling fra for håndledsstyret rotation.</string> + <string name="spatial_title">Rumlig opsætning</string> + <string name="spatial_wait_tracking">Venter på sporing...</string> + <string name="spatial_cameras_description">Venstre og højre sporingskamera</string> + <string name="spatial_camera_sync">Kamerasynkronisering</string> + <string name="spatial_ready">Klar</string> + <string name="spatial_sync_hint">Venter på, at kamera og hovedsporing er på linje. Hold de smarte briller forbundet.</string> + <string name="spatial_prepare">1. Forbered kalibreringsmålet</string> + <string name="spatial_print_actual">Udskriv i faktisk størrelse</string> + <string name="spatial_print_hint">Hver firkant skal måle 30 mm (1.181 in). Monter pladen fladt på en stiv overflade i et godt oplyst område.</string> + <string name="spatial_print">Udskriv kalibreringsmønster</string> + <string name="spatial_capture_group">2. Optag forskellige visninger</string> + <string name="spatial_board_stationary">Hold kalibreringsmålet stationært</string> + <string name="spatial_capture_hint">Flyt de smarte briller tættere på, længere og sidelæns. Drej dem til venstre/højre, vinkle dem op/ned, og vip dem til siden. Behold kalibreringsmålet i begge kameraer, og hold en kort pause før hver optagelse.</string> + <string name="spatial_start">Start ny kalibrering</string> + <string name="spatial_wait_sync">Venter på kamerasynkronisering.</string> + <string name="spatial_start_hint">Start en ny kalibrering for at indsamle visninger.</string> + <string name="spatial_views_hint">Hold kalibreringsmålet synligt i begge forhåndsvisninger. Optag mindst 24 skarpe billeder fra forskellige vinkler.</string> + <string name="spatial_capturing">Optager...</string> + <string name="spatial_capture">Optag kalibreringsmålvisning</string> + <string name="spatial_alignment">Beregn kamerajustering</string> + <string name="spatial_calculating">Beregner...</string> + <string name="spatial_calculate">Beregn kalibrering</string> + <string name="spatial_distance_group">3. Kontroller afstanden</string> + <string name="spatial_distance">Målt afstand</string> + <string name="spatial_distance_hint">Start med 12 tommer eller 30 cm, så de trykte markører er nemmere at opdage. Vælg den nøjagtige måling, du vil bruge.</string> + <string name="spatial_camera_board_distance">Venstre kamera til kalibreringsmålcenter</string> + <string name="spatial_checking_distance">Kontrollerer afstand...</string> + <string name="spatial_validate">Valider afstand</string> + <string name="spatial_diagnostics">Diagnostik</string> + <string name="spatial_show_diagnostics">Vis diagnostik</string> + <string name="spatial_diagnostics_hint">Værktøjer til gendannelse af kameratiming og sporing.</string> + <string name="spatial_camera_timing">Kameratiming</string> + <string name="spatial_hand_input">Input fra sporing af hænder</string> + <string name="spatial_wait_timing">Venter på kameratiming.</string> + <string name="spatial_frames">Kamerabilleder</string> + <string name="spatial_gpu">GPU-detektering af hænder</string> + <string name="spatial_gpu_hint">CPU er standard. GPU er eksperimentel og kan få SteamVR til at genstarte. Dette valg nulstilles, når sporingen genstartes.</string> + <string name="spatial_lite">Lite-detektion af håndmodeller</string> + <string name="spatial_lite_hint">Brug Lite håndfladedetektor og Lite nøglepunkter på hænderne. Tjek sigte-, klem- og grebsnøjagtighed. Nulstiller, når sporing genstartes.</string> + <string name="spatial_adaptive">Automatisk indgangsfrekvens til sporing af hænder</string> + <string name="spatial_adaptive_hint">Juster input til behandlingshastighed. Nulstiller, når sporing genstartes.</string> + <string name="spatial_half_rate">Begræns inputfrekvens for sporing af hænder</string> + <string name="spatial_half_rate_hint">Brug halvdelen af kamerabillederne. Sluk for at sammenligne den maksimale frekvens. Nulstiller, når sporing genstartes.</string> + <string name="spatial_diagnostic_capture">Diagnostisk optagelse</string> + <string name="spatial_diagnostic_capture_hint">Gem ét stereobilledpar lokalt. Billeder gemmes kun efter anmodning.</string> + <string name="spatial_save_frame">Gem kamerabillede</string> + <string name="spatial_restart_tracking">Genstart sporing</string> + <string name="spatial_restart_hint">Bruges, hvis sporingen ikke genoprettes i et godt oplyst område. En genstart kræver en ny sporingsoprindelse.</string> + <string name="spatial_restart">Genstart</string> + <string name="spatial_restart_title">Genstart sporing?</string> + <string name="spatial_restart_confirm">Ikke-gemte kalibreringsvisninger vil gå tabt. Hold smartbrillerne stille bagefter, og nulstil sporingscenteret, når sporingen er genoprettet.</string> + <string name="spatial_views_count">%1$d / 24 visninger taget</string> + <string name="spatial_capture_paused">Optagelse sat på pause: %1$s</string> + <string name="spatial_measure_hint">Mål %1$s. Vis det komplette kalibreringsmål i begge forhåndsvisninger, og hold derefter stille.</string> + <string name="spatial_timing_values">%1$.1f Hz • billedalder %2$.1f ms • behandler %3$.1f ms</string> + <string name="spatial_input_values">Inputgrænse %1$.1f Hz • %2$.0f%% for kamerabilleder. Hovedsporing fortsætter ved sin maksimale frekvens.</string> + <string name="spatial_frame_counts">%1$d behandlet • %2$d droppet • %3$d sprunget over af inputgrænse</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra kalibrering</string> + <string name="spatial_print_scale" formatted="false">Udskriv ved 100% / faktisk størrelse. Hver firkant: 30 mm (1.181 tommer).</string> + <string name="spatial_print_stationary">Hold kalibreringsmålet fladt og stationært; flyt de smarte briller mellem optagelserne.</string> + <string name="spatial_print_check">Skalakontrol: 100 mm (3.937 in) mellem kryds</string> + <string name="spatial_distance_12in">12 tommer (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 tommer)</string> + <string name="spatial_distance_20in">20 tommer (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 tommer)</string> + <string name="spatial_disabled">Deaktiveret</string> + <string name="spatial_wait_stable">Venter på stabil sporing</string> + <string name="spatial_disconnected">Afbrudt</string> + <string name="spatial_hands_off">Controllere, der betjenes med bare hænder, er slukket</string> + <string name="spatial_tracking_off">Positionssporing er slået fra, eller smartbriller er afbrudt</string> + <string name="spatial_recenter_pending">Nulstilling af sporingscenter anmodes — hold stille, mens sporingen stabiliserer sig.</string> + <string name="spatial_tracking_lost">Sporing er gået tabt – vend ind mod et godt oplyst område med synlige detaljer</string> + <string name="spatial_origin_changed">Sporingsoprindelse ændret — tryk på nulstil sporingscenter, og hold derefter stille.</string> + <string name="spatial_active">6DoF aktiv</string> + <string name="spatial_connect_hint">Tilslut Luma Ultra og aktiver positionssporing.</string> + <string name="spatial_validation_session">Kalibrering verificeret for denne forbindelse.</string> + <string name="spatial_validation_saved">Kalibrering verificeret og gemt.</string> + <string name="spatial_wait_cameras">Venter på stereokameraer</string> + <string name="spatial_wait_hands">Venter på sporing af hænder</string> + <string name="spatial_collect_instructions">Hold 5 × 7 kalibreringsmålet stationært. Optag 24+ visninger, mens du flytter og roterer de smarte briller.</string> + <string name="spatial_capture_pending">Venter på det næste kamerabillede. Hold de smarte briller stille.</string> + <string name="spatial_validation_pending">Kontrollerer det næste kamerabillede. Hold hele kalibreringsmålet synligt, og hold det stille.</string> + <string name="spatial_start_first">Start kalibreringen først</string> + <string name="spatial_no_camera_frame">Intet nyt kamerabillede ankom. Tjek forbindelsen til smarte briller og forhåndsvisninger af kameraet, og prøv derefter igen.</string> + <string name="spatial_clock_reset">Nulstilling af kameraur</string> + <string name="spatial_frame_changed">Sporingskoordinatsystem ændret. Dine visninger gemmes til genberegning. Nulstil sporingscenter, og start derefter et nyt sæt for at optage flere visninger.</string> + <string name="spatial_device_loaded">enhedskalibrering indlæst</string> + <string name="spatial_base_loaded">Luma Ultra base kalibrering indlæst</string> + <string name="spatial_calibration_needed">kalibrering påkrævet</string> + <string name="spatial_tap_start">Tryk på Start ny kalibrering først.</string> + <string name="spatial_capture_recenter_pending">Nulstil sporingscenter venter på stabil sporing. Hold stille et øjeblik.</string> + <string name="spatial_capture_recenter">Sporing ændret. Tryk på nulstil sporingscenter én gang, og hold derefter stille, før du optager.</string> + <string name="spatial_capture_unsynchronized">Optagelse afvist: Hovedsporingen var ikke synkroniseret, eller den ændrede sig under optagelsen. Hold stille og prøv igen.</string> + <string name="spatial_align_first">Beregn kamerajustering, før du kontrollerer afstanden.</string> + <string name="spatial_processing_failed">kamerabehandling mislykkedes</string> + <string name="spatial_hand_head_changed">Hovedsporing ændret under registrering af hænder</string> + <string name="spatial_hand_wait_sync">Venter på kamera- og hovedsynkronisering</string> + <string name="spatial_no_wrists">Ingen håndled opdaget. Hold dine Joy-Con-controllerhåndtag foran de smarte briller</string> + <string name="spatial_no_hands">Ingen hænder fundet. Vis åbne håndflader foran de smarte briller</string> + <string name="spatial_one_camera_wrists">Håndled synlige i kun ét kamera; hold dine controllerhåndtag i den delte visning</string> + <string name="spatial_one_camera_hands">Hænderne er kun synlige i ét kamera; hold begge håndflader i den delte visning</string> + <string name="spatial_ambiguous_hands">Begge kameraer ser hænder, men venstre/højre-matchning er tvetydig</string> + <string name="spatial_inconsistent_depth">Hænder registreret, men stereodybden er inkonsekvent</string> + <string name="spatial_rejected_wrist">Håndledsposition afvist af stereo- eller bevægelsestjek</string> + <string name="spatial_inconsistent_palm">Stereopunkter registreret, men palmegeometrien er inkonsekvent</string> + <string name="spatial_hands_need_calibration">Fuldfør kalibrering og afstandskontrol for at aktivere hænder</string> + <string name="spatial_hands_wait_stable">Venter på stabil hovedsporing; nulstil sporingscenter, hvis det anmodes om.</string> + <string name="spatial_old_frame">Kameraobservation er for gammel; venter på et nyt par</string> + <string name="spatial_fit_ready">Tilpas %1$.2f px. Mål din valgte afstand fra venstre kamera til kalibreringsmålets centrum, og valider derefter.</string> + <string name="spatial_opencv_error">OpenCV utilgængelig: %1$s</string> + <string name="spatial_restored">%1$d gemte visninger gendannet. Beregn kalibrering for at prøve igen, eller start et nyt sæt for at fange mere.</string> + <string name="spatial_captured">Optaget %1$d / 24 visninger. Hold kalibreringsmålet fast; flyt de smarte briller til næste visning.</string> + <string name="spatial_capture_corners">Optagelse afvist: %1$d / 12 påkrævede hjørner synlige i begge kameraer. Vis mere af kalibreringsmålet, hold stille, og prøv derefter igen.</string> + <string name="spatial_validation_error">Afstandskontrol kunne ikke afsluttes: %1$s. Prøv igen.</string> + <string name="spatial_inference_error">Registrering af hænder utilgængelig: %1$s. Skift CPU/GPU eller skift controllere betjent med bare hænder for at prøve igen.</string> + <string name="spatial_hand_timeout">Registrering af hænder overskredet %1$d ms; observation forkastet</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con håndledspositioner målt ved stereo</string> + <string name="spatial_palms_tracked">Håndflader sporet: %1$d / 2; knibebevægelse klar: %2$d; gribebevægelse klar: %3$d</string> + <string name="spatial_capture_saved">Gemt diagnostisk optagelse i %1$s</string> + <string name="spatial_hand_error">Sporing af hænder stoppet: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Hovedsporing og kalibreringsmålet er uenige med %1$s (grænse 5 cm / 2 in). Hold kalibreringsmålet fast, og vent på konstant sporing, før du starter et nyt sæt. Drej og vip de smarte briller forsigtigt; pause før hver optagelse.</string> + <string name="spatial_need_views">Optag mindst 24 forskellige visninger af det stationære kalibreringsmål.</string> + <string name="spatial_need_rotation">Drej de smarte briller til venstre og højre, og vip dem op og ned; bevægelse uden rotation kan ikke kalibrere kamerajustering.</string> + <string name="spatial_bad_baseline">Usandsynlig kameragrundlinje</string> + <string name="spatial_need_orientations">Bevæg dit hoved gennem mere varierede orienteringer.</string> + <string name="spatial_bad_rotation">Ugyldig kamera-til-hoved-rotation</string> + <string name="spatial_bad_alignment">Kamera-til-hoved justering er inkonsekvent.</string> + <string name="spatial_calibration_error">Kalibrering kunne ikke afsluttes. %1$s Dine optagne visninger gemmes.</string> + <string name="spatial_reprojection_error">Udholdt reprojektionsfejl %1$.2f px overstiger 2 px. Kalibrer igen.</string> + <string name="spatial_distance_corners">%1$d / 24 skakternet hjørner registreret i begge kameraer. Hold hele kalibreringsmålet synligt, og hold det stille. Hvis det allerede er synligt, skal du vælge 12 tommer eller 30 cm og måle den tættere afstand, før du prøver igen.</string> + <string name="spatial_distance_depth">Kalibreringsmålet er synligt, men dets dybde kunne ikke måles pålideligt. Hold de smarte briller stille og hold kalibreringsmålet fladt og godt oplyst, og prøv derefter igen.</string> + <string name="spatial_distance_invalid">Kameramålingen var ugyldig. Hold stille og prøv igen.</string> + <string name="spatial_distance_passed">Afstandskontrol bestået.</string> + <string name="spatial_distance_retry">Kontroller igen afstanden fra venstre kamera til kalibreringsmålets centrum, og prøv derefter igen.</string> + <string name="spatial_distance_result">Kameraer målt %1$s; valgt afstand %2$s. %3$s</string> + <string name="spatial_wait_previews">Vent på forhåndsvisning af begge kameraer, før du starter kalibreringen.</string> + <string name="spatial_saved_views_hint">Gemte visninger kan genberegnes. Start en ny kalibrering for at fange i det aktuelle sporingskoordinatsystem.</string> + <string name="spatial_model_checksum_error">Håndmodel kontrolsum uoverensstemmelse</string> + <string name="spatial_opencv_load_error">OpenCV kunne ikke indlæse</string> +</resources> diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml new file mode 100644 index 0000000000..dfaa30fed7 --- /dev/null +++ b/app/src/main/res/values-de/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">SteamVR-Grafik ausgefallen</string> + <string name="steamvr_recovery_countdown">DroidDeck startet in %1$d Sekunden neu, um die Grafik zurückzusetzen und SteamVR wieder zu öffnen. Dein laufendes Spiel wird geschlossen; nicht gespeicherter Fortschritt lässt sich nicht wiederherstellen.</string> + <string name="steamvr_recovery_repeated">Der Grafikfehler ist nach einem kürzlichen Neustart erneut aufgetreten. Die automatische Wiederherstellung ist pausiert, um eine Endlosschleife zu vermeiden. Ein Neustart schließt dein Spiel; nicht gespeicherter Fortschritt lässt sich nicht wiederherstellen.</string> + <string name="steamvr_recovery_restart">Jetzt neu starten</string> + <string name="steamvr_recovery_cancel">Geöffnet lassen</string> + <string name="steamvr_recovery_restarting">Grafik wird zurückgesetzt und SteamVR neu geöffnet …</string> + <string name="steamvr_recovery_failed">DroidDeck konnte nicht automatisch neu starten. Schließe die App vollständig und öffne sie dann erneut.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Beim ersten Start wird Steam heruntergeladen. Das kann ein paar Minuten dauern.</item> + <item>Standardmäßig pausiert Steam, wenn du die App verlässt, und macht bei deiner Rückkehr dort weiter, wo es aufgehört hat.</item> + <item>Dein Controller erscheint als Xbox-360-Pad. Ansonsten nutze die Bildschirmsteuerung.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Beim ersten Start wird der Desktop eingerichtet. Das kann ein paar Minuten dauern.</item> + <item>Standardmäßig wird die Sitzung pausiert, wenn du die App verlässt, und macht bei deiner Rückkehr dort weiter, wo sie aufgehört hat.</item> + <item>Touch funktioniert wie ein Touchpad: Ziehen bewegt den Zeiger, Tippen klickt.</item> + <item>Dein Controller erscheint als Xbox-360-Pad. Ansonsten nutze die Bildschirmsteuerung.</item> + </string-array> + <string name="session_channel">Sitzung</string> + <string name="session_channel_description">Wird angezeigt, solange eine Steam- oder Desktop-Sitzung geöffnet ist</string> + <string name="session_notification">Steam läuft</string> + <string name="session_notification_downloads">Steam-Download aktiv</string> + <string name="session_notification_paused">Sitzung pausiert – tippe auf „Fortsetzen“, wenn du bereit bist</string> + <string name="resume_session">Fortsetzen</string> + <string name="suspend_now">Jetzt anhalten</string> + <string name="stop_session">Sitzung beenden</string> + <string name="frame_gen_title">Frame-Generierung</string> + <string name="frame_gen_hint">Modus der Frame-Generierung auswählen</string> + <string name="frame_gen_off">Aus</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptiv %1$d</string> + <string name="lsfg_needs_steam">Benötigt Lossless Scaling auf Steam</string> + <string name="lsfg_needs_install">Installiere Lossless Scaling in Steam oder importiere Lossless.dll</string> + <string name="lsfg_import">Lossless.dll importieren…</string> + <string name="lsfg_using_steam">Kopie aus Steam wird verwendet</string> + <string name="lsfg_using_import">Importierte Kopie wird verwendet</string> + <string name="lsfg_pick_title">Lossless.dll auswählen</string> + <string name="lsfg_imported">Lossless.dll importiert</string> + <string name="lsfg_import_unchanged">Diese Lossless.dll wird bereits verwendet</string> + <string name="lsfg_import_not_owned">Dieses Steam-Konto besitzt Lossless Scaling nicht</string> + <string name="lsfg_import_invalid">Diese Datei ist nicht die Lossless.dll von Lossless Scaling</string> + <string name="lsfg_import_failed">LSFG konnte aus dieser Lossless.dll nicht vorbereitet werden</string> + <string name="lsfg_problem_missing">LSFG benötigt Lossless Scaling aus Steam oder eine importierte Lossless.dll</string> + <string name="lsfg_problem_failed">LSFG konnte seine Shader nicht aus Lossless.dll vorbereiten</string> + <string name="hud_fg_unsupported">%1$s: nicht unterstützt</string> + <string name="hud_fg_failed">%1$s: Engine-Fehler</string> + <string name="hud_fg_needs_lossless">%1$s: benötigt Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · startet</string> + <string name="second_library_import_hint">Fügt eine Steam-Bibliothek hinzu und durchsucht sie nach Windows-Spielen. Eigene Spiele nutzen ihre Steam-Einträge, der Rest wird zu Nicht-Steam-Verknüpfungen.</string> + <string name="game_env_title">Spielumgebung</string> + <string name="game_env_hint">Umgebungsvariablen für Proton-Spiele.</string> + <string name="game_env_edit">Bearbeiten</string> + <string name="game_env_shared">Alle Proton-Spiele</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">Steam-App-ID</string> + <string name="game_env_open">Öffnen</string> + <string name="game_env_profile">Spiel %1$s</string> + <string name="game_env_add">Variable hinzufügen</string> + <string name="game_env_name">Variablenname</string> + <string name="game_env_value">Wert</string> + <string name="game_env_save">Speichern</string> + <string name="game_env_remove">Entfernen</string> + <string name="game_env_restore">Wieder erben</string> + <string name="game_env_reset">Umgebungsüberschreibungen löschen</string> + <string name="game_env_unset">Für dieses Profil aufheben</string> + <string name="game_env_empty">Keine Variablen gesetzt.</string> + <string name="game_env_inherited">Geerbt</string> + <string name="game_env_custom">Eigene Variable</string> + <string name="game_env_error">Laden oder Speichern fehlgeschlagen. Prüfe den freien Speicherplatz und versuch es noch einmal.</string> + <string name="game_env_invalid">Verwende einen gültigen Namen und einen Wert mit bis zu 8192 Zeichen.</string> + <string name="game_env_unused">Die Standard-Proton-Laufzeit liest diese Variable nicht.</string> + <string name="game_env_loading">Wird geladen…</string> + <string name="game_env_feature">Überschreibt das D3D12-Feature-Level. 12_2 meldet DirectX-12-Ultimate-Funktionen; nicht unterstützte Funktionen können fehlschlagen. Für automatische Erkennung nicht setzen.</string> + <string name="game_env_shader">Überschreibt das D3D12-Shader-Model. 6_9 erfordert ein ausreichend aktuelles VKD3D und passende GPU-Funktionen. Für automatische Erkennung nicht setzen.</string> + <string name="game_env_cache">Lass das Mesa-Shader-Caching aktiviert, um wiederholtes Kompilieren zu vermeiden. false aktiviert das Caching.</string> + <string name="game_env_cache_size">Maximale Größe des Mesa-Shader-Caches, z. B. 1G. Größere Caches belegen mehr Speicherplatz.</string> + <string name="game_env_vkd3d_config">VKD3D-Optionen für D3D12. nodxr deaktiviert Raytracing; nur bei Spielen verwenden, die das brauchen.</string> + <string name="game_env_proton_log">Auf 1 setzen für ein Proton-Diagnoseprotokoll. Protokollieren kann die Leistung mindern und Speicherplatz belegen.</string> + <string name="game_env_wined3d">Auf 1 setzen, um für D3D9–11-Kompatibilitätstests das OpenGL-basierte WineD3D statt DXVK zu verwenden.</string> + <string name="game_env_no_ntsync">Auf 1 setzen, um dieses Spiel von ntsync fernzuhalten (droiddeck-ntsync oder ein Kerneltreiber); es nutzt dann droiddeck-esync, wo ein Pack existiert, sonst droiddeck-fsync.</string> + <string name="game_env_no_esync">Auf 1 setzen, um droiddeck-esync für dieses Spiel abzuschalten; es nutzt stattdessen droiddeck-fsync oder droiddeck-ntsync, wo auch fsync aus ist.</string> + <string name="game_env_no_fsync">Auf 1 setzen, um dieses Spiel von droiddeck-fsync fernzuhalten; es nutzt dann droiddeck-esync, wo ein Pack existiert, sonst droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Auf 1 setzen, um dieses Spiel mit droiddeck-fsync auszuführen, oder auf 0, um droiddeck-esync vorzuziehen, wo ein Pack zu seinem Proton passt.</string> + <string name="game_env_xalia">Auf 0 setzen, um Protons Gamepad-Navigationshilfe für dieses Spiel zu deaktivieren.</string> + <string name="game_env_hud">DXVK-Overlay für D3D9–11. fps zeigt die Bildrate an; ohne Wert wird es ausgeblendet.</string> + <string name="game_env_dxvk_config">DXVK-Einstellungen, durch Semikolons getrennt. Neuere Builds nutzen dxvk.maxFrameRate zur Bildratenbegrenzung; fürs normale Spielen besser das Bildratenlimit der Sitzung verwenden.</string> + <string name="game_env_vkd3d_limit">D3D12-Bildratenlimit. 0 hebt das Limit auf.</string> + <string name="game_env_glthread">Mesa-OpenGL-Threading. true kann CPU-limitierten OpenGL-Spielen helfen; pro Spiel testen.</string> + <string name="sync_backend_title">Wine-Sync</string> + <string name="sync_backend_hint">Wie Spiele ihre Threads im Gleichschritt halten. Gilt ab der nächsten Sitzung.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">FEX-Voreinstellung</string> + <string name="fex_next_launch">Gilt ab dem nächsten Spielstart.</string> + <string name="game_settings_title">Spiele</string> + <string name="fex_default_label">FEX-Standard</string> + <string name="fex_default_detail">Verwendet die Standardwerte von FEX.</string> + <string name="fex_stability_label">Stabilität</string> + <string name="fex_stability_detail">Sicherste, langsamste Einstellungen.</string> + <string name="fex_compatibility_label">Kompatibilität</string> + <string name="fex_compatibility_detail">Volles TSO mit Multiblock.</string> + <string name="fex_intermediate_label">Mittel</string> + <string name="fex_intermediate_detail">Ausgewogenes TSO mit reduzierter x87-Genauigkeit.</string> + <string name="fex_performance_label">Leistung</string> + <string name="fex_performance_detail">TSO komplett deaktiviert; Multiblock.</string> + <string name="fex_performance_tso_label">Leistung + TSO</string> + <string name="fex_performance_tso_detail">Leistungseinstellungen mit aktiviertem Haupt-TSO.</string> + <string name="fex_extreme_label">Extrem</string> + <string name="fex_extreme_detail">Deaktiviert Prüfungen auf selbstmodifizierenden Code. JIT-Spiele und DRM können ausfallen.</string> + <string name="fex_extreme_tso_label">Extrem + TSO</string> + <string name="fex_extreme_tso_detail">Extrem-Einstellungen mit aktiviertem Haupt-TSO.</string> + <string name="fex_extreme_gn_label">Extrem-gn</string> + <string name="fex_extreme_gn_detail">Leistung mit TSC- und Metadaten-Hinweisen. Vor Extrem ausprobieren.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Leistung mit vollständigen Codeprüfungen und verstecktem Hypervisor-Bit.</string> + <string name="game_env_custom_value">Eigener Wert</string> + <string name="game_env_select_value">Wert auswählen</string> + <string name="user_apps_section">Emulatoren & Apps</string> + <string name="user_apps_add">Hinzufügen</string> + <string name="user_apps_add_detail">Eigene App oder eigenes Spiel</string> + <string name="user_apps_kind_script">Skript</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d %%</string> + <string name="user_apps_starting">Wird gestartet…</string> + <string name="user_apps_added">%1$s hinzugefügt</string> + <string name="user_apps_removed">%1$s entfernt</string> + <string name="user_apps_back">Desktop</string> + <string name="user_apps_gone">Diese App gibt es nicht mehr. Wähle sie erneut auf dem Desktop aus.</string> + <string name="user_apps_open">%1$s öffnen</string> + <string name="user_apps_remove">Entfernen</string> + <string name="user_apps_remove_confirm">Zum Entfernen erneut drücken</string> + <string name="user_apps_stop_session">Zum Entfernen Sitzung beenden</string> + <string name="user_apps_script_linked">Führt %1$s aus seinem Ordner aus, der an Ort und Stelle in die Sitzung eingebunden wird. Beim Entfernen der App bleibt dieser Ordner unangetastet.</string> + <string name="user_apps_script_copied">Führt %1$s aus einer Kopie seines Ordners in DroidDeck aus. Beim Entfernen der App wird die Kopie gelöscht, nicht das Original.</string> + <string name="user_apps_runtime_required">Installiere zuerst die Linux-Laufzeit</string> + <string name="user_apps_file_gone">Die Datei ist nicht mehr vorhanden</string> + <string name="user_apps_no_space">Nicht genug freier Speicherplatz: Zum Kopieren des Ordners werden %1$s benötigt</string> + <string name="user_apps_copying">%1$s wird kopiert</string> + <string name="user_apps_failed">Hinzufügen der App fehlgeschlagen</string> + <string name="user_apps_github_checking">Suche nach einem Release von %1$s</string> + <string name="user_apps_github_unreachable">Releases von %1$s konnten nicht gelesen werden</string> + <string name="user_apps_github_no_appimage">Kein Release von %1$s enthält ein ARM64- oder x86_64-AppImage</string> + <string name="user_apps_downloading">%1$s wird heruntergeladen</string> + <string name="user_apps_download_failed">Download fehlgeschlagen</string> + <string name="user_apps_update_failed">Aktualisieren der App fehlgeschlagen</string> + <string name="user_apps_icon_failed">Dieses Symbol konnte nicht gelesen werden</string> + <string name="user_apps_saved">%1$s gespeichert</string> + <string name="user_apps_edit">Bearbeiten</string> + <string name="user_apps_check_updates">Nach Updates suchen</string> + <string name="user_apps_checking_updates">Suche nach Updates…</string> + <string name="user_apps_update_to">Auf %1$s aktualisieren</string> + <string name="user_apps_up_to_date">Aktuell · %1$s</string> + <string name="user_apps_updated">%1$s aktualisiert</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">App hinzufügen</string> + <string name="add_app_tab_script">Skript</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Eine .sh-Datei. Sie läuft aus ihrem eigenen Ordner, im Vollbild unter gamescope.</string> + <string name="add_app_appimage_hint">Ein ARM64-AppImage (aarch64) oder ein x86_64-AppImage, das über FEX läuft. Es wird einmalig in die Linux-Laufzeit entpackt.</string> + <string name="add_app_github_hint">Installiert das ARM64-AppImage aus dem neuesten Release des Repositorys oder dessen x86_64-Version über FEX.</string> + <string name="app_fex_title">FEX verwenden</string> + <string name="app_fex_auto">Auto</string> + <string name="app_fex_on">An</string> + <string name="app_fex_off">Aus</string> + <string name="app_fex_hint">FEX führt x86-Linux-Programme auf diesem ARM64-Gerät aus. Auto nutzt es, wenn das Programm für x86 gebaut ist.</string> + <string name="app_fex_x86">%1$s über FEX</string> + <string name="app_fex_not_ready">Dieses Programm ist für %1$s-PCs gebaut und läuft über FEX, das noch nicht eingerichtet ist. Öffne Steam einmal, während du angemeldet bist: DroidDeck lässt es FEX und die nötige Steam Linux Runtime herunterladen, danach lässt sich das Programm öffnen.</string> + <string name="session_end_program">Dieses Programm</string> + <string name="session_end_fex_missing">%1$s ist für x86-PCs gebaut und läuft über FEX, das noch nicht installiert ist. Starte Steam einmal, während du angemeldet bist, und lass es FEX und die Steam Linux Runtime herunterladen. Starte es danach erneut.</string> + <string name="add_app_flatpak_hint">Eine Flathub-App-ID oder ihre Flathub-Seite. Flatpak wird zuerst eingerichtet, falls noch nicht geschehen.</string> + <string name="add_app_file">Datei</string> + <string name="add_app_no_file">Keine Datei ausgewählt</string> + <string name="add_app_choose_file">Datei auswählen</string> + <string name="add_app_change_file">Ändern</string> + <string name="add_app_pick_script">Skript auswählen</string> + <string name="add_app_pick_appimage">AppImage auswählen</string> + <string name="add_app_pick_icon">Symbol auswählen</string> + <string name="add_app_repository">Repository</string> + <string name="add_app_repository_placeholder">besitzer/repo oder ein github.com-Link</string> + <string name="add_app_repository_invalid">Kein GitHub-Repository</string> + <string name="add_app_flatpak_id">App-ID</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Keine Flathub-App-ID</string> + <string name="add_app_flatpak_bundle_hint">Oder eine .flatpak-Datei für eine App, die es nicht auf Flathub gibt.</string> + <string name="add_app_pick_flatpak">.flatpak-Datei auswählen</string> + <string name="add_app_source">Quelle</string> + <string name="add_app_appearance">Auf deinem Desktop</string> + <string name="add_app_preview_name">Neue App</string> + <string name="add_app_name">Name</string> + <string name="add_app_name_placeholder">Aus der App</string> + <string name="add_app_icon">Symbol</string> + <string name="add_app_icon_default">Standardsymbol</string> + <string name="add_app_choose_icon">Symbol auswählen</string> + <string name="add_app_clear_icon">Entfernen</string> + <string name="add_app_icon_suggestions">Aus dem Repository</string> + <string name="add_app_icon_searching">Suche nach Symbolen…</string> + <string name="add_app_icon_reset">Standard</string> + <string name="edit_app_title">%1$s bearbeiten</string> + <string name="edit_app_save">Speichern</string> + <string name="add_app_checking_folder">Ordner wird geprüft…</string> + <string name="add_app_folder_linked">Sein Ordner wird in die Sitzung eingebunden: %1$s</string> + <string name="add_app_folder_copied">Sein Ordner enthält Linux-Programme, die im gemeinsamen Speicher nicht laufen können, daher wird er in DroidDeck kopiert (%1$s).</string> + <string name="add_app_confirm">Hinzufügen</string> + <string name="add_app_cancel">Abbrechen</string> + <string name="add_app_runtime_required">Installiere zuerst die Linux-Laufzeit unter „Einrichtung“.</string> + <string name="add_app_busy">Warte, bis %1$s fertig ist.</string> + <string name="steam_compat_label">Kompatibel</string> + <string name="proton_compatible_note">Builds, die in Steams Menü „Kompatibilität“ mit „%1$s“ markiert sind, enthalten die Präfix-Korrekturen von DroidDeck und starten hier Spiele. Standard ist Proton Experimental ARM64 (%1$s) bzw. Proton 11.0 ARM64 (%1$s), sobald dieser neuere Build installiert ist. Valves eigene Proton-Einträge ohne Markierung können auf diesem Gerät kein Spiel starten.</string> + <string name="proton_installed_compatible">Installiert: %1$s · %2$s</string> + <string name="common_cancel">Abbrechen</string> + <string name="common_auto">Auto</string> + <string name="common_never">Nie</string> + <string name="common_always">Immer</string> + <string name="common_uninstall">Deinstallieren</string> + <string name="common_check">Prüfen</string> + <string name="common_update">Aktualisieren</string> + <string name="common_checking">Wird geprüft…</string> + <string name="common_working">Wird ausgeführt…</string> + <string name="common_forget">Vergessen</string> + <string name="common_add_ellipsis">Hinzufügen…</string> + <string name="common_use">Verwenden</string> + <string name="common_applies_next_session">Gilt ab der nächsten Sitzung.</string> + <string name="mode_steam_title">Steam-Sitzung</string> + <string name="mode_desktop_title">Desktop-Sitzung</string> + <string name="mode_display">Anzeige</string> + <string name="mode_resolution">Auflösung</string> + <string name="mode_res_720">Bis zu 720p</string> + <string name="mode_res_900">Bis zu 900p</string> + <string name="mode_res_1080">Bis zu 1080p</string> + <string name="mode_res_native">Nativ</string> + <string name="mode_res_default">%1$s (Standard)</string> + <string name="mode_res_custom_value">Benutzerdefiniert · %1$d×%2$d</string> + <string name="mode_res_custom">Benutzerdefiniert…</string> + <string name="mode_res_note">720p kann Menüs reaktionsschneller machen.</string> + <string name="mode_ratio">Seitenverhältnis</string> + <string name="mode_ratio_custom">Durch die benutzerdefinierte Auflösung festgelegt.</string> + <string name="mode_ratio_auto">Auto verwendet mindestens 16:9.</string> + <string name="mode_fps">Bildratenlimit</string> + <string name="mode_fps_note">Begrenzt die gesamte Sitzung. Das Display wechselt auf eine Bildwiederholrate, die ein ganzzahliges Vielfaches des Limits ist.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10-Ausgabe</string> + <string name="mode_hdr_unavailable">Nicht verfügbar: %1$s.</string> + <string name="mode_hdr_restart">Starte die App neu, um dies anzuwenden.</string> + <string name="mode_drivers">Treiber</string> + <string name="mode_gpu_drivers">GPU-Treiber</string> + <string name="mode_gpu_drivers_hint">Für Steam und Desktop gemeinsam. Wird auf der Seite „Komponenten“ festgelegt.</string> + <string name="mode_touch_controls">Touch & Steuerung</string> + <string name="mode_touch">Touch</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Direkt</string> + <string name="mode_touch_note">Auto: Touchpad auf dem Desktop, direkt in Steam.</string> + <string name="mode_osc">Bildschirmsteuerung</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Auto zeigt die Steuerung an, wenn kein Controller verbunden ist.</string> + <string name="osc_steam_touch">Steam-Touch (Beta)</string> + <string name="osc_style_next_session">Steams Touch-Steuerung startet mit der nächsten Steam-Sitzung</string> + <string name="osc_steam_layout">Steam-Touch-Layout</string> + <string name="osc_steam_layout_hint">Touch-Steuerung dieses Spiels verschieben, skalieren oder ausblenden; wird in Steam gespeichert</string> + <string name="mode_controller">Controller</string> + <string name="mode_controller_hint">Wie Steam deinen Controller erkennt. Gilt ab der nächsten Sitzung.</string> + <string name="mode_controller_deck">Steam-Deck-Controller</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Xbox-360-Controller</string> + <string name="mode_controller_note">Deck: Schnellzugriffstaste und Gyro. Steam Controller: dasselbe, mit Griffsensor an den Rücktasten. DualShock 4 und DualSense: Gyro, die Trackpads dienen als deren Touchpad. Xbox 360: Schnellzugriff mit Guide+A öffnen.</string> + <string name="mode_back">Zurück</string> + <string name="back_menu_then_qam">Menü → QAM</string> + <string name="back_qam_then_menu">QAM → Menü</string> + <string name="mode_session">Sitzung</string> + <string name="mode_suspend">Verhalten im Hintergrund</string> + <string name="mode_suspend_hint">Wenn die App ausgeblendet ist oder der Bildschirm ausgeht.</string> + <string name="mode_suspend_manual">Manuell</string> + <string name="mode_suspend_native">Nativ</string> + <string name="mode_suspend_steam_note">Auto pausiert und setzt fort, sobald die App wieder sichtbar ist. Nativ bereitet Steam zuerst auf den Ruhemodus vor. Manuell wartet auf „Fortsetzen“. Nie lässt alles weiterlaufen.</string> + <string name="mode_background_downloads">Downloads weiterlaufen lassen</string> + <string name="mode_background_downloads_hint">Verzögert das Anhalten im Hintergrund, solange Steam aktiv herunterlädt.</string> + <string name="mode_suspend_note">Auto pausiert im Hintergrund und setzt fort, sobald die App wieder sichtbar ist. Manuell wartet auf „Fortsetzen“. Nie lässt alles weiterlaufen.</string> + <string name="mode_startup">Start</string> + <string name="mode_steam_startup">Steam mit DroidDeck starten</string> + <string name="mode_steam_startup_hint">Öffnet die Steam-Sitzung, wenn DroidDeck startet.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Suche nach Releases…</string> + <string name="mode_decky_ready">Bereit zur Installation von %1$s.</string> + <string name="mode_decky_none">Kein kompatibler Build gefunden. Versuch es später noch einmal.</string> + <string name="mode_decky_installed">Installiert · %1$s</string> + <string name="mode_decky_update">Update verfügbar · %1$s</string> + <string name="mode_decky_current">Aktuell · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Neueste Version installieren</string> + <string name="mode_decky_on">Startet mit Steam. Solange aktiv, können andere Apps auf diesem Gerät Steam möglicherweise steuern.</string> + <string name="mode_decky_off">Aus. Der Remote-Debugging-Port von Steam bleibt geschlossen.</string> + <string name="mode_decky_remove_title">Decky Loader deinstallieren?</string> + <string name="mode_decky_remove_text">Entfernt den Loader. Deine Plugins und Einstellungen bleiben erhalten.</string> + <string name="mode_client">Client</string> + <string name="mode_mangoapp">Leistungs-Overlay</string> + <string name="mode_mangoapp_hint">Deaktivieren, wenn Spiele im Deck-Modus abstürzen oder schwarz werden. Gilt ab der nächsten Sitzung.</string> + <string name="mode_steam_repair">Steam-Client reparieren</string> + <string name="mode_steam_repair_hint">Lädt den Steam-Client beim nächsten Start von Steam erneut herunter. Nutze dies, wenn Steam im Ladebildschirm hängen bleibt. Spiele, Anmeldung und Einstellungen bleiben erhalten.</string> + <string name="mode_steam_repair_queued">Der Steam-Client wird beim nächsten Start von Steam erneut heruntergeladen.</string> + <string name="mode_steam_repair_button">Reparieren</string> + <string name="mode_added_art">Grafiken</string> + <string name="mode_sgdb_key">SteamGridDB-API-Schlüssel</string> + <string name="mode_sgdb_key_yours">Dein Schlüssel</string> + <string name="mode_sgdb_edit">Bearbeiten…</string> + <string name="mode_added_art_hint">Ergänzt fehlende Grafiken aus Steam, dann aus SteamGridDB. Deine eigene cover.jpg, hero.jpg, logo.png oder icon.png im Spielordner hat Vorrang.</string> + <string name="summary_remove_game">%1$s entfernen</string> + <string name="mode_added_remove_confirm">Entfernen?</string> + <string name="games_add">Spiel hinzufügen</string> + <string name="games_add_title">Spiel hinzufügen:</string> + <string name="games_pick_exe_title">EXE-Datei auswählen:</string> + <string name="games_add_unreachable">Dieser Ort ist in der Sitzung nicht verfügbar</string> + <string name="mode_added_exe_check">Diese EXE-Datei prüfen</string> + <string name="wincomp_title">Windows-Komponenten</string> + <string name="wincomp_pad_hint">Mit LB / RB zwischen den Abschnitten wechseln.</string> + <string name="wincomp_card_none">Keine</string> + <string name="wincomp_applies">Windows-DLLs aus der Komponentenliste, die Proton nicht enthält. Aktiviere die, die dieses Spiel braucht: Sie landen im eigenen Windows-Ordner des Spiels, nie bei seinen Dateien, und bleiben erhalten, egal mit welchem Proton es läuft.</string> + <string name="wincomp_offline">Komponentenliste nicht erreichbar. Bereits heruntergeladene Komponenten lassen sich weiterhin umschalten.</string> + <string name="wincomp_recommended">Für dieses Spiel empfohlen</string> + <string name="wincomp_checking">Prüfe, was dieses Spiel braucht…</string> + <string name="wincomp_when_online">Verfügbar, wenn online</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">%1$d Komponente wird aktiviert…</item> + <item quantity="other">%1$d Komponenten werden aktiviert…</item> + </plurals> + <string name="wincomp_auto_section">Für dieses Spiel aktiv</string> + <string name="wincomp_auto_steam">Steam installiert %1$s mit %2$s (App %3$s)</string> + <string name="wincomp_auto_gog">Aus der GOG-Liste für dieses Spiel</string> + <string name="wincomp_auto_epic">Aus den Epic-Voraussetzungen für dieses Spiel</string> + <string name="wincomp_auto_amazon">Aus den Amazon-Installationsschritten für dieses Spiel</string> + <string name="wincomp_steam_by_name">Steam installiert %1$s mit App %2$s, per Name zugeordnet</string> + <string name="wincomp_suggestions">Ebenfalls aufgeführt</string> + <string name="wincomp_suggestion_reason">Aufgeführt von %1$s; hier keine Komponente</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Das Spiel liefert %1$s mit</string> + <string name="wincomp_found_shipped">Das Spiel hat %1$s (funktioniert oft so)</string> + <string name="wincomp_already_here">Bereits in diesem Spiel</string> + <string name="wincomp_no_recommendation">Nichts im Spielordner deutet auf eine Komponente hin.</string> + <string name="wincomp_active">Für dieses Spiel installiert (%1$d)</string> + <string name="wincomp_all">Alle Komponenten (%1$d)</string> + <string name="wincomp_installers">Benötigen einen Windows-Installer (%1$d)</string> + <string name="wincomp_installers_note">Das sind eigenständige Setup-Programme ohne Paket, das sich zerlegen ließe, und für sie gibt es noch keine Aufzeichnung dessen, was sie installieren. Die meisten sind alte Laufzeiten, die das Mono in Proton bereits ersetzt; Aufzeichnungen kommen hinzu, sobald sie erstellt werden.</string> + <string name="wincomp_show">Anzeigen</string> + <string name="wincomp_hide">Ausblenden</string> + <string name="wincomp_needs_installer">Führt ein eigenes Setup-Programm aus (noch keine Aufzeichnung)</string> + <string name="wincomp_unsupported">Hier noch nicht unterstützt</string> + <string name="wincomp_loading">Komponenten werden geladen…</string> + <string name="wincomp_failed">Installation fehlgeschlagen: %1$s</string> + <string name="wincomp_downloaded">Heruntergeladen</string> + <string name="wincomp_downloading">%1$s wird heruntergeladen</string> + <string name="wincomp_installing">Wird installiert: %1$s</string> + <string name="wincomp_reverting">Wird deaktiviert…</string> + <string name="wincomp_download_size">%1$s Download</string> + <string name="wincomp_next_launch">Wirkt beim nächsten Spielstart.</string> + <string name="mode_stretch169">16:9-Spiele strecken</string> + <string name="mode_stretch169_hint">Auf Bildschirmen, die quadratischer als 16:9 sind, werden Spiele bildfüllend gestreckt statt mit Balken angezeigt. Gilt ab der nächsten Sitzung.</string> + <string name="mode_audio">Audio</string> + <string name="mode_directaudio">DirectAudio für Spiele</string> + <string name="mode_directaudio_hint">Umgeht PulseAudio für geringere Latenz.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">Für Sprachchat.</string> + <string name="mode_network">Netzwerk</string> + <string name="mode_wifi_discovery">Wi-Fi-Erkennung</string> + <string name="mode_wifi_discovery_hint">Wi-Fi-Namen und Netzwerke in der Nähe in Steam anzeigen.</string> + <string name="mode_wifi_location_off">Standortdienste sind deaktiviert.</string> + <string name="mode_wifi_permission_denied">Standortberechtigung nicht erteilt.</string> + <string name="mode_wifi_open_settings">Einstellungen öffnen</string> + <string name="mode_wifi_continue">Weiter</string> + <string name="mode_wifi_explain_title">Wi-Fi-Erkennung aktivieren?</string> + <string name="mode_wifi_explain_text">Android verlangt die Standortberechtigung, um Wi-Fi-Namen zu lesen und Netzwerke in der Nähe zu finden. DroidDeck nutzt diesen Zugriff, um diese Netzwerke in Steam anzuzeigen. Wir verfolgen deinen Standort nicht. Der Internetzugang funktioniert auch ohne diese Berechtigung.</string> + <string name="mode_storage">Spielspeicher</string> + <string name="mode_storage_auto">Automatisch - die SD-Karte, falls vorhanden, plus deine Games-Ordner</string> + <string name="mode_storage_auto_none">Automatisch - deine Games-Ordner plus die SD-Karte, falls vorhanden (derzeit keine)</string> + <string name="mode_storage_internal">Nur intern</string> + <string name="mode_storage_folder">Ordner: %1$s</string> + <string name="mode_second_library">Zweite Bibliothek</string> + <string name="mode_storage_note">Spiele, die Daten von der SD-Karte oder aus dem gemeinsamen Speicher streamen, können ruckeln.</string> + <string name="mode_storage_diagnostics">Speicherdiagnose</string> + <string name="mode_storage_diagnostics_hint">Zeichnet Zuweisungsergebnisse und stichprobenartige Speicher-Timings für „Logs teilen“ auf. Kann Installationen verlangsamen, solange aktiv. Gilt ab der nächsten Sitzung.</string> + <string name="mode_choose_folder">Ordner auswählen…</string> + <string name="mode_custom_res_title">Benutzerdefinierte Auflösung</string> + <string name="mode_custom_res_text">Ersetzt Obergrenze und Seitenverhältnis. Eine Größe, die nicht zum Bildschirm passt, bekommt Balken.</string> + <string name="mode_width">Breite</string> + <string name="mode_height">Höhe</string> + <string name="mode_custom_res_range">Zwischen 320×240 und 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d Spiel</item> + <item quantity="other">%1$d Spiele</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Löschen</string> + <string name="common_restore">Wiederherstellen</string> + <string name="common_download">Herunterladen</string> + <string name="common_delete_named">%1$s löschen</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Laufzeittreiber</string> + <string name="comp_runtime_driver_hint">Wird von Steam, Spielen und dem Desktop genutzt. Gilt ab der nächsten Sitzung.</string> + <string name="comp_import_turnip">Turnip-ZIP importieren…</string> + <string name="comp_display_driver">Anzeigetreiber</string> + <string name="comp_display_driver_hint">Bringt in beiden Modi die Frames auf den Bildschirm. Starte die App neu, um dies anzuwenden.</string> + <string name="comp_import_adrenotools">AdrenoTools-ZIP importieren…</string> + <string name="comp_never">nie</string> + <string name="comp_nightlies_checked">Nightlies geprüft: %1$s</string> + <string name="comp_title">Komponenten</string> + <string name="comp_about">Über Komponenten</string> + <string name="comp_check_drivers">Nach neuen Treibern suchen</string> + <string name="comp_check_nightlies">Nightlies nach neuen Paketen durchsuchen</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Das hier gewählte Proton führt jedes Spiel aus, das in Steam kein eigenes gewählt hat, und eine Änderung in Steam erscheint auch hier. Steam ersetzt Valves Proton bei Updates; die Originale werden pro Build aufbewahrt.</string> + <string name="comp_scope">Konfiguration</string> + <string name="comp_profile_configure">Profil konfigurieren</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Standardprofil</string> + <string name="comp_scope_general_detail">Wird automatisch von Spielen ohne eigene Überschreibungen verwendet.</string> + <string name="comp_profile_game_detail">Gespeicherte Einstellungen, die beim Start von %1$s automatisch verwendet werden.</string> + <string name="comp_game_hint">Wähle nur die Einstellungen, die dieses Spiel braucht. Alles andere nutzt weiterhin das Standardprofil.</string> + <string name="comp_game_fex">FEX-Voreinstellung</string> + <string name="comp_game_fex_inherited">Voreinstellung des Standardprofils wird verwendet.</string> + <string name="comp_game_fex_override">Eigene Voreinstellung für dieses Spiel gespeichert.</string> + <string name="comp_game_fex_custom">Eigene FEX-Variablen</string> + <string name="comp_game_use_general">Standard verwenden</string> + <string name="comp_game_compatibility">Spielkompatibilität</string> + <string name="comp_game_environment_hint">Umgebungsoptionen für Proton, DXVK, VKD3D und Synchronisation in diesem Spiel.</string> + <string name="comp_game_proton_inherited">Proton des Standardprofils wird verwendet.</string> + <string name="comp_game_proton_override">Eigenes Proton für dieses Spiel über die Steam-Kompatibilitätszuordnung gespeichert.</string> + <string name="comp_no_proton_short">Kein Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Nutzt das Paket des Standardprofils aus %1$s, sofern dieses Spiel kein anderes Paket wählt.</string> + <string name="comp_game_component_general">Nutzt das Komponentenpaket des Standardprofils.</string> + <string name="comp_game_component_override">Nutzt %1$s nur für dieses Spiel.</string> + <string name="comp_game_runtime_options">Laufzeitoptionen</string> + <string name="comp_game_environment_other_hint">Weitere spielspezifische Umgebungsoptionen für Proton, DXVK, VKD3D-Proton und Synchronisation.</string> + <string name="comp_game_saved_next">Das Profil von %1$s ist für den nächsten Spielstart gespeichert.</string> + <string name="game_no_steam_title">Ohne Steam starten</string> + <string name="game_no_steam_detail">Öffnet es in Proton/FEX ohne den Steam-Client; Steam-Funktionen sind aus.</string> + <string name="game_no_steam_on">An</string> + <string name="game_steam_with">Startet mit Steam</string> + <string name="game_steam_without">Startet ohne Steam</string> + <string name="game_settings_card">Einstellungen</string> + <string name="game_settings_menu_title">Einstellungen für %1$s</string> + <string name="game_settings_default">Standard</string> + <string name="game_settings_default_detail">Setzt alles, was für dieses Spiel geändert wurde, auf die Einstellungen der App zurück.</string> + <string name="game_sync_custom">Eigene Sync-Variablen</string> + <string name="comp_game_proton_live">Die Proton-Auswahl für %1$s ist gespeichert und jetzt in Steam verfügbar.</string> + <string name="comp_game_proton_next">Die Proton-Auswahl für %1$s ist gespeichert. Starte Steam neu, bevor du das Spiel startest.</string> + <string name="comp_game_proton_not_runnable">%1$s kann das gewählte Proton auf diesem Gerät nicht verwenden.</string> + <string name="comp_game_load_failed">Profil von %1$s konnte nicht geladen werden: %2$s</string> + <string name="comp_game_save_failed">Das Spielprofil konnte nicht gespeichert werden: %1$s</string> + <string name="comp_game_reset">Spielprofil zurücksetzen</string> + <string name="comp_game_reset_title">Profil von %1$s zurücksetzen?</string> + <string name="comp_game_reset_body">Überschreibungen dieses Spiels für Proton, FEX, Komponentenpaket, Umgebung, Texturfilterung und Windows-Komponenten entfernen? Es nutzt dann das Standardprofil.</string> + <string name="comp_game_reset_done">%1$s nutzt jetzt das Standardprofil.</string> + <string name="comp_game_reset_failed">Das Spielprofil konnte nicht vollständig zurückgesetzt werden: %1$s</string> + <string name="comp_default_live">%1$s führt jetzt jedes Spiel aus, das in Steam kein eigenes Proton gewählt hat.</string> + <string name="comp_default_next">%1$s führt ab dem nächsten Start von Steam jedes Spiel aus, das kein eigenes Proton gewählt hat.</string> + <string name="comp_default_not_runnable">%1$s kann hier keine Spiele starten und daher nicht der Standard sein.</string> + <string name="comp_default_failed">Das Standard-Proton konnte nicht gespeichert werden: %1$s</string> + <string name="comp_swapped">%1$s · %2$d ausgetauscht</string> + <string name="comp_all_original">%1$s · alles original</string> + <string name="comp_game_running_suffix">%1$s · Spiel läuft</string> + <string name="comp_esync_pack">%1$s · droiddeck-esync-Pack</string> + <string name="comp_esync_wanted">%1$s · noch kein droiddeck-esync-Pack</string> + <string name="comp_esync_builtin">%1$s · esync integriert, kein Pack nötig</string> + <string name="comp_gpu_drivers">GPU-Treiber</string> + <string name="comp_reapplied">%1$s · beim Start erneut angewendet %2$s</string> + <string name="comp_next_queued">Als Nächstes: %1$s · nach Ende des Spiels</string> + <string name="comp_in_use">%1$s in Verwendung: %2$s</string> + <string name="comp_waits">Wartet, bis das Spiel beendet ist</string> + <string name="comp_applies_next_game">Gilt ab dem nächsten Spielstart</string> + <string name="comp_import_zip">.zip importieren</string> + <string name="comp_reading">Protons werden gelesen…</string> + <string name="comp_no_proton">Noch kein Proton installiert. Starte Steam einmal, um sein ARM64-Proton herunterzuladen, oder füge GE-Proton, CachyOS oder DroidDeck-Proton unter „Einrichtung“ hinzu.</string> + <string name="comp_original">Original · %1$s</string> + <string name="comp_this_build">%1$s · dieser Build</string> + <string name="comp_earlier_build">%1$s · früherer Build</string> + <string name="comp_installed_count">Installiert · %1$d</string> + <string name="comp_nothing_stored">Für %1$s ist noch nichts gespeichert. Die eigenen Dateien dieses Protons werden als sein Original gesichert.</string> + <string name="comp_waits_long">Auf diesem Proton läuft ein Spiel, daher wartet dies, bis es beendet ist.</string> + <string name="comp_applies_long">Gilt ab dem nächsten Spielstart.</string> + <string name="comp_swap_title">%1$s austauschen?</string> + <string name="comp_swap_body">%1$s in %2$s einsetzen? Die Originaldateien bleiben gesichert. %3$s</string> + <string name="comp_restore_title">%1$s wiederherstellen?</string> + <string name="comp_restore_body">Das Original von %1$s wieder in %2$s einsetzen? %3$s</string> + <string name="comp_delete_package_body">Entfernt das Paket aus der App. Du kannst es erneut herunterladen.</string> + <string name="comp_delete_original_title">Dieses Original löschen?</string> + <string name="comp_delete_original_body">Dieses %1$s-Original stammt aus einem früheren Build von %2$s. Das Original des aktuellen Builds wird immer behalten.</string> + <string name="comp_nightlies_count">In den Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Aktualisiere, um die Pakete in den Nightlies aufzulisten.</string> + <string name="comp_nothing_new">Nichts Neues seit der letzten Prüfung.</string> + <string name="comp_import_wcp">.wcp importieren</string> + <string name="comp_restore_original">Original dieses Protons wiederherstellen</string> + <string name="comp_restore_original_body">Das originale %2$s von %1$s wiederherstellen?</string> + <string name="comp_swap">Austauschen</string> + <string name="comp_about_text">FEX, DXVK und VKD3D-Proton für jedes Proton, mit dem Steam Spiele ausführt.\n\nWähle eine installierte Zeile, um sie einzusetzen. Das gilt ab dem nächsten Spielstart oder sobald das laufende Spiel beendet ist.\n\nDeine Auswahl wird vor jedem Start erneut geprüft und wiederhergestellt, falls etwas sie geändert hat. Die Originaldateien jedes Protons werden aufbewahrt, sodass Steam-Updates sie nie verlieren.</string> + <string name="comp_tag_original">Original</string> + <string name="comp_tag_in_use">In Verwendung</string> + <string name="comp_tag_new">Neu</string> + <string name="comp_tag_stored">Gespeichert</string> + <string name="perf_title">Leistung</string> + <string name="perf_lede">CPU-Kerne, Sitzungskorrekturen und der Hostname. Gilt ab der nächsten Sitzung.</string> + <string name="perf_client_cores_group">Steam-Client-Kerne</string> + <string name="perf_override">Kernauswahl von Steam überschreiben</string> + <string name="perf_override_hint">Bindet Steam, seinen UI-Helfer und gamescope an die Kerne unten.</string> + <string name="perf_client_cores">Client-Kerne</string> + <string name="perf_client_cores_on">Kerne für Steam.</string> + <string name="perf_client_cores_off">Aktiviere die Überschreibung, um auszuwählen.</string> + <string name="perf_game_cores_group">Spielkerne</string> + <string name="perf_game_cores">Spielkerne</string> + <string name="perf_game_cores_hint">Kerne für Spiele. Sind alle ausgewählt, verteilt Android frei.</string> + <string name="perf_client_ui">Client-Oberfläche</string> + <string name="perf_glthread">Threaded GL</string> + <string name="perf_glthread_hint">Kann Steam-Menüs reaktionsschneller machen.</string> + <string name="perf_zink">Zink: verzögerte Deskriptoren</string> + <string name="perf_zink_hint">Empfohlen für Treiber ohne Deskriptorpuffer.</string> + <string name="perf_noglerror">GL-Fehlerprüfungen überspringen</string> + <string name="perf_noglerror_hint">Schaltet die GL-Validierung pro Aufruf ab.</string> + <string name="perf_gsrealtime">gamescope: Echtzeit-GPU-Warteschlange</string> + <string name="perf_gsrealtime_hint">Priorisiert die GPU-Arbeit des Compositors. Kann das Frame-Pacing glätten, kostet Spiele aber etwas Leistung.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">GPU auf höchstem Takt halten</string> + <string name="perf_gpuclock_hint">Nur Adreno. Weniger Ruckler, mehr Akkuverbrauch und Wärme.</string> + <string name="perf_fixes">Sitzungskorrekturen</string> + <string name="perf_sysmem">Turnip: Sysmem-Rendering</string> + <string name="perf_sysmem_hint">Schneller für Steam und die meisten Spiele. 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_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> + <string name="perf_esync_hint">Die Windows-Threads von Spielen warten über eventfd und gemeinsamen Speicher aufeinander statt über Umwege durch wineserver. Nutzt ein droiddeck-esync-Pack, das für genau diesen Proton-Build erstellt wurde; Packs werden automatisch geladen. Bis es eines für einen neuen Proton-Build gibt, springt droiddeck-fsync ein. Gilt ab der nächsten Sitzung.</string> + <string name="perf_xalia_hint">Deaktiviert Protons Gamepad-Navigationshilfe, die in jedem Spiel CPU-Leistung kostet.</string> + <string name="perf_seccomp">proot ohne seccomp ausführen</string> + <string name="perf_seccomp_hint">Kann Fehler wegen fehlender Syscalls auf manchen Kerneln beheben. Kann die Leistung mindern.</string> + <string name="perf_fastpath">proot-Schnellpfad</string> + <string name="perf_fastpath_needs_seccomp">Benötigt den seccomp-Filter von proot.</string> + <string name="perf_fastpath_hint">Schnellere Dateisuche und weniger Ruckler. Deaktivieren, wenn ein Programm seine Dateien nicht findet.</string> + <string name="perf_identity">Sitzungsidentität</string> + <string name="perf_hostname">Hostname</string> + <string name="perf_hostname_hint">Der Name, den Steam für dieses Gerät sieht. Leer lassen stellt %1$s wieder her.</string> + <string name="perf_hostname_invalid">Nur Buchstaben, Ziffern und innere Bindestriche, bis zu 63 Zeichen.</string> + <string name="perf_phantom_warning">Android ist so eingestellt, dass es diese Sitzung beendet</string> + <string name="driver_installed">Installiert</string> + <string name="driver_available">Zum Download verfügbar</string> + <string name="driver_nothing_new">Nichts Neues seit der letzten Prüfung.</string> + <string name="driver_restore_builtin">Integrierte Treiber wiederherstellen</string> + <string name="driver_delete_builtin">In die App integriert: Dies entfernt die entpackten Dateien und blendet ihn aus. „Integrierte Treiber wiederherstellen“ holt ihn zurück.</string> + <string name="driver_delete_bundle">Hälfte eines Android- + Linux-Bundles: Beide Hälften werden entfernt. Ein verwendeter Treiber fällt auf den Standard zurück.</string> + <string name="driver_delete_plain">Seine Dateien werden aus der App entfernt.</string> + <string name="driver_delete_in_use">Seine Dateien werden entfernt. Er ist in Verwendung, daher übernimmt der Standard.</string> + <string name="drawer_page_display">Anzeige</string> + <string name="drawer_page_effects">Effekte</string> + <string name="drawer_page_controls">Steuerung</string> + <string name="drawer_page_components">Komponenten</string> + <string name="drawer_page_controller">Controller</string> + <string name="drawer_page_settings">Einstellungen</string> + <string name="drawer_page_desc">Seite %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Desktop</string> + <string name="drawer_steam_menu">Steam-Menü</string> + <string name="drawer_quick_access">Schnellzugriff</string> + <string name="drawer_open_qam">Schnellzugriffsmenü öffnen</string> + <string name="drawer_prev_page">Vorherige Seite</string> + <string name="drawer_next_page">Nächste Seite</string> + <string name="drawer_hud">Leistungs-HUD</string> + <string name="drawer_scaling">Skalierungsmodus</string> + <string name="drawer_scaling_sharpness">Skalierungsschärfe</string> + <string name="drawer_effects">Bildschirmeffekte</string> + <string name="drawer_effects_hint">Live. Kostet etwas GPU-Zeit, solange ein Effekt aktiv ist.</string> + <string name="drawer_look">Voreinstellungen</string> + <string name="drawer_look_custom">Benutzerdefiniert</string> + <string name="drawer_effects_advanced">Erweitert</string> + <string name="widgets_expanded">Ausgeklappt</string> + <string name="widgets_collapsed">Eingeklappt</string> + <string name="drawer_cas">Schärfen (CAS)</string> + <string name="drawer_cas_level">Schärfegrad</string> + <string name="drawer_fake_hdr">Fake-HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">SteamVR starten</string> + <string name="steamvr_checking">SteamVR wird geprüft…</string> + <string name="drawer_deband">Debanding</string> + <string name="drawer_deband_strength">Debanding-Stärke</string> + <string name="drawer_brightness">Helligkeit</string> + <string name="drawer_contrast">Kontrast</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Sättigung</string> + <string name="drawer_fxaa">FXAA (Kantenglättung)</string> + <string name="drawer_toon">Toon-Konturen</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Texturfilterung</string> + <string name="drawer_texture_hint">DirectX-9–11-Spiele, ab ihrem nächsten Start.</string> + <string name="drawer_anisotropy">Anisotrope Filterung</string> + <string name="drawer_texture_sharpness">Texturschärfe</string> + <string name="drawer_texture_sharpness_note">Ein negativer Mip-Bias: schärfere Texturen, etwas Flimmern. Auto richtet sich danach, wie stark die Sitzung auf den Bildschirm vergrößert wird.</string> + <string name="drawer_touch_auto">Auto (%1$s)</string> + <string name="drawer_keyboard">Tastatur</string> + <string name="drawer_latency">Latenz</string> + <string name="drawer_low_latency_controller">Controller mit geringer Latenz</string> + <string name="drawer_low_latency_controller_hint">Der Controller meldet mit 1000 Hz statt 250 Hz. Die CPU-Last ist etwas höher.</string> + <string name="drawer_low_latency_touch">Touch mit geringer Latenz</string> + <string name="drawer_low_latency_touch_hint">Touch überspringt das Zusammenfassen von Frames, Steam-Touch meldet mit 1000 Hz. Die CPU-Last ist etwas höher.</string> + <string name="drawer_pc_keyboard">PC-Tastatur</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Zweiter Bildschirm</string> + <string name="drawer_second_screen_mode">Modus</string> + <string name="drawer_second_screen_shows">Zeigt</string> + <string name="drawer_android_apps">Android-Apps</string> + <string name="drawer_launch_app">App starten</string> + <string name="common_hide">Ausblenden</string> + <string name="common_show">Anzeigen</string> + <string name="drawer_no_apps">Keine startbaren Apps</string> + <string name="drawer_session_behavior">Sitzungsverhalten</string> + <string name="drawer_suspend_hint">Gilt sofort und für künftige Sitzungen in diesem Modus.</string> + <string name="drawer_next_session">Nächste Sitzung</string> + <string name="drawer_support">Support</string> + <string name="drawer_logs">Sitzungslogs</string> + <string name="drawer_logs_hint">An einen Fehlerbericht anhängen</string> + <string name="drawer_share_logs">Logs teilen</string> + <string name="drawer_background">Hintergrund</string> + <string name="drawer_stop">Beenden</string> + <string name="drawer_stop_title">Sitzung beenden?</string> + <string name="drawer_running_now">Läuft gerade</string> + <string name="drawer_no_game">Es läuft kein Spiel auf einem Proton</string> + <string name="drawer_selected_profile">Spielprofil</string> + <string name="drawer_selected_profile_none">Profildetails sind noch nicht verfügbar.</string> + <string name="drawer_profile_refresh_failed_initial">Spielprofile konnten nicht geladen werden. Neuer Versuch erfolgt automatisch.</string> + <string name="drawer_profile_refresh_failed_stale">Spielprofile konnten nicht aktualisiert werden. Die letzten verfügbaren Daten werden angezeigt; neuer Versuch erfolgt automatisch.</string> + <string name="drawer_profile_inspect_hint">Gespeicherte Einstellungen für den nächsten Start ansehen und bearbeiten.</string> + <string name="drawer_profile_default">Standardprofil wird verwendet</string> + <string name="drawer_profile_custom">Eigenes Profil</string> + <string name="drawer_component_inherited">%1$s aus dem Standardprofil wird verwendet.</string> + <string name="drawer_game_components_note">Änderungen werden im Profil von %1$s gespeichert und gelten ab dem nächsten Spielstart.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d Spielüberschreibung</item> + <item quantity="other">%1$d Spielüberschreibungen</item> + </plurals> + <string name="drawer_no_proton">Es ist noch kein Proton installiert.</string> + <string name="drawer_game_running">Spiel läuft</string> + <string name="drawer_reapplied">beim Start erneut angewendet %1$s</string> + <string name="drawer_original">Original</string> + <string name="drawer_components_note">Importieren und Löschen auf der Seite „Komponenten“.</string> + <string name="setup_check_done">Fertig</string> + <string name="setup_check_warn">Handlungsbedarf</string> + <string name="setup_check_busy">In Arbeit</string> + <string name="setup_limit_adb_failed">Prüfe IP-Adresse und Port unter „Debugging über WLAN“ oder kopple erneut, falls Android dieses Gerät entfernt hat.</string> + <string name="setup_install">Installieren</string> + <string name="setup_manage">Verwalten</string> + <string name="setup_tab_overview">Übersicht</string> + <string name="setup_tab_controller">Controller</string> + <string name="setup_tab_session">Sitzung</string> + <string name="setup_tab_launcher">Launcher</string> + <string name="setup_title">Einrichtung</string> + <string name="setup_all_set">● Alles bereit</string> + <string name="setup_n_ready">%1$d von %2$d bereit</string> + <string name="setup_system_check">Systemprüfung</string> + <string name="setup_gpu_supported">Gerät unterstützt</string> + <string name="setup_gpu_untested">Ungetestete GPU</string> + <string name="setup_gpu_unsupported">GPU nicht unterstützt</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam benötigt einen Adreno-Treiber; %1$s zeigt möglicherweise einen schwarzen Bildschirm</string> + <string name="setup_runtime">Linux-Laufzeit</string> + <string name="setup_runtime_progress">%1$s · %2$d %%</string> + <string name="setup_runtime_missing">Nicht installiert · ca. 3 GB, wird beim ersten „Spielen“ installiert</string> + <string name="setup_installed">Installiert</string> + <string name="setup_runtime_update">%1$s · Update verfügbar</string> + <string name="setup_runtime_current">%1$s · aktuell</string> + <string name="setup_limit">Limit für Kindprozesse</string> + <string name="setup_limit_on">An · Android kann Steam schließen. Das Abschalten dauert eine Minute.</string> + <string name="setup_limit_unset">Nicht gesetzt · Android kann Steam schließen. Das Abschalten dauert eine Minute.</string> + <string name="setup_limit_unknown">Konnte nicht geprüft werden · das Abschalten dauert eine Minute.</string> + <string name="setup_fix_it">Beheben</string> + <string name="setup_details">Details</string> + <string name="setup_dev_options">Entwickleroptionen</string> + <string name="setup_use_wireless">„Debugging über WLAN“ verwenden</string> + <string name="setup_check_again">Erneut prüfen</string> + <string name="setup_limit_turn_on">Limit aktivieren</string> + <string name="setup_account">Steam-Konto</string> + <string name="setup_signed_in_offline">Angemeldet als %1$s · Offlinemodus</string> + <string name="setup_signed_in">Angemeldet als %1$s</string> + <string name="setup_sign_in">Drücke „Spielen“ und melde dich bei Steam an</string> + <string name="setup_tools">Tools</string> + <string name="setup_controller">Controller</string> + <string name="setup_controller_unavailable">Controller-Einstellungen sind nicht verfügbar.</string> + <string name="setup_session">Sitzung</string> + <string name="setup_logs">Sitzungslogs</string> + <string name="setup_logs_hint">Nach jeder Sitzung gespeichert</string> + <string name="setup_agent_commands">Debugging-Tools</string> + <string name="setup_latest_logs">Neueste Sitzungslogs</string> + <string name="setup_saved_logs">Gespeicherte Sitzungslogs</string> + <string name="setup_saved_logs_hint">Behält die neuesten %1$d</string> + <string name="setup_clear_logs">Logs löschen</string> + <string name="setup_offline">Offlinemodus</string> + <string name="setup_sign_in_first">Melde dich zuerst bei Steam an</string> + <string name="setup_launcher">Launcher</string> + <string name="setup_language">Sprache</string> + <string name="setup_language_hint">Auch Steam nutzt sie, ab seinem nächsten Start.</string> + <string name="setup_language_system">Systemstandard (%1$s)</string> + <string name="setup_language_system_short">Systemstandard</string> + <string name="setup_app_scale">App-Skalierung</string> + <string name="setup_app_scale_hint">Text und Bedienelemente von DroidDeck</string> + <string name="setup_app_scale_default">%1$d %% (Standard)</string> + <string name="setup_theme">Design</string> + <string name="setup_theme_hint">Aussehen des Launchers</string> + <string name="setup_home">Als Startbildschirm verwenden</string> + <string name="setup_home_on">DroidDeck kann die Startbildschirm-App sein</string> + <string name="setup_home_off">DroidDeck wird nie als Startbildschirm-App angeboten</string> + <string name="setup_orientation">Ausrichtung</string> + <string name="setup_orientation_auto">Automatisch Querformat</string> + <string name="setup_orientation_landscape">Querformat</string> + <string name="setup_orientation_reverse">Umgekehrtes Querformat</string> + <string name="setup_fullscreen">Vollbild</string> + <string name="setup_fullscreen_on">Blendet die Status- und Navigationsleiste von Android aus</string> + <string name="setup_fullscreen_off">Zeigt die Status- und Navigationsleiste von Android an</string> + <string name="setup_default_home">Standard-Startbildschirm-App</string> + <string name="setup_choose_home">Startbildschirm-App auswählen</string> + <string name="setup_choose">Auswählen</string> + <string name="setup_linux_apps">Linux-Apps (Beta)</string> + <string name="setup_tool_files">Dateien</string> + <string name="setup_tool_files_hint">Dateien durchsuchen und verwalten</string> + <string name="setup_tool_protons">Proton-Versionen</string> + <string name="setup_tool_protons_hint">ARM64-Proton-Builds installieren</string> + <string name="setup_tool_performance">Leistung</string> + <string name="setup_tool_performance_hint">Zuweisung der CPU-Kerne</string> + <string name="setup_tool_roms">ROMs-Ordner</string> + <string name="setup_tool_roms_hint">Speicherort für Emulatorspiele</string> + <string name="setup_card_components">Komponenten</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Steuerung</string> + <string name="setup_card_controls_hint">Tastenbelegung</string> + <string name="store_tab_discover">Entdecken</string> + <string name="store_tab_search">Suchen</string> + <string name="store_tab_installed">Installiert</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Store</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak bereit</string> + <string name="store_needs_runtime">Installiere zuerst die Linux-Laufzeit unter „Einrichtung“.</string> + <string name="store_setup_title">Flatpak einrichten</string> + <string name="store_setup_text">Fügt Flatpak hinzu und verbindet es mit Flathub (ca. 20 MB). Die erste App lädt außerdem ihre Laufzeit herunter.</string> + <string name="store_setting_up">Wird eingerichtet…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Updates</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d %%</string> + <string name="store_starting">Wird gestartet…</string> + <string name="store_categories">Kategorien</string> + <string name="store_unreachable">Flathub nicht erreichbar. Prüfe deine Verbindung und versuch es noch einmal.</string> + <string name="store_try_again">Erneut versuchen</string> + <string name="store_search_label">Flathub durchsuchen</string> + <string name="store_search_placeholder">Firefox, Spiele, Emulatoren…</string> + <string name="store_search">Suchen</string> + <string name="store_all">Alle</string> + <string name="store_searching">Suche läuft…</string> + <string name="store_search_hint">Suche nach Namen oder wähle eine Kategorie. Nur ARM64-Apps werden aufgeführt.</string> + <string name="store_no_results">Keine ARM64-Apps auf Flathub passen dazu.</string> + <string name="store_results">Ergebnisse</string> + <string name="store_check_updates">Nach Updates suchen</string> + <string name="store_update_all">Alle aktualisieren (%1$d)</string> + <string name="store_all_current">● Alles ist aktuell</string> + <string name="store_no_apps">Noch keine Apps. Finde welche unter „Entdecken“ oder „Suchen“.</string> + <string name="store_setup_first_note">Richte Flatpak ein, um Apps zu installieren.</string> + <string name="store_update_available_prefix">Update verfügbar · %1$s</string> + <string name="store_open">Öffnen</string> + <string name="store_details">Details</string> + <string name="store_remove">Entfernen</string> + <string name="store_press_again">Zum Entfernen erneut drücken</string> + <string name="store_installing">Wird installiert…</string> + <string name="store_install">Installieren</string> + <string name="store_setup_first">Richte zuerst Flatpak ein</string> + <string name="store_download_size">%1$s Download</string> + <string name="store_installed_chip">● Installiert</string> + <string name="store_details_failed">Die Flathub-Seite dieser App konnte nicht geladen werden.</string> + <string name="store_loading">Wird von Flathub geladen…</string> + <string name="store_no_arm">Kein ARM64-Build auf Flathub, daher hier nicht installierbar.</string> + <string name="store_screenshots">Screenshots</string> + <string name="store_about">Über</string> + <string name="store_app_id">App-ID</string> + <string name="store_license">Lizenz</string> + <string name="store_runtime">Laufzeit</string> + <string name="store_installed_size">Installierte Größe</string> + <string name="store_installed_size_value">%1$s (plus gemeinsame Laufzeit)</string> + <string name="store_website">Website</string> + <string name="store_verified">Verifiziert</string> + <string name="upd_title">Updates</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Geprüft: %1$s</string> + <string name="upd_not_checked">Noch nicht geprüft</string> + <string name="upd_perm_title">Erlaube DroidDeck, sich selbst zu aktualisieren</string> + <string name="upd_perm_text">Aktiviere auf dem nächsten Bildschirm „Dieser Quelle vertrauen“ und kehre dann zurück. Das Update läuft von selbst weiter.</string> + <string name="upd_open_settings">Einstellungen öffnen</string> + <string name="upd_not_now">Nicht jetzt</string> + <string name="upd_signed_status">Anders signiert</string> + <string name="upd_signed_headline">Direktes Update nicht möglich</string> + <string name="upd_signed_detail">Diese Kopie ist nicht mit dem Release-Schlüssel von DroidDeck signiert, daher lassen sich Updates nicht darüber installieren. Deinstalliere sie, um zu wechseln.</string> + <string name="upd_available">Update verfügbar</string> + <string name="upd_blocked_status">Installation nicht möglich</string> + <string name="upd_switch">Bereit zum Wechseln</string> + <string name="upd_ahead_status">Neuer als Stabil</string> + <string name="upd_ahead_headline">Du bist dem Stabil-Kanal voraus</string> + <string name="upd_ahead_detail">Dieser Build ist neuer als die aktuelle Stabil-Version. Mit dem nächsten Release wechselst du zu Stabil.</string> + <string name="upd_gone_status">Test beendet</string> + <string name="upd_gone_headline">Dieser Test ist beendet</string> + <string name="upd_gone_detail">Sein Fix wurde übernommen oder verworfen. Folge „Vorschau“ für die neuesten Fixes.</string> + <string name="upd_current_status">Aktuell</string> + <string name="upd_current_headline">Du hast die neueste Version von %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d %%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Aktualisieren%1$s</string> + <string name="upd_install_button">Installieren%1$s</string> + <string name="upd_install_anyway">Stabil %1$s trotzdem installieren</string> + <string name="upd_follow_preview">Vorschau folgen</string> + <string name="upd_stop_session">Beende die laufende Sitzung, um zu aktualisieren.</string> + <string name="upd_less">Weniger</string> + <string name="upd_more">Mehr</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Neuer Vorschau-Build</string> + <string name="upd_new_test">Test-Build für PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">UPDATE-KANAL</string> + <string name="upd_stable">Stabil</string> + <string name="upd_stable_hint">Getestete Releases, für die meisten</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Vorschau</string> + <string name="upd_preview_hint">Neueste Fixes, vor Stabil</string> + <string name="upd_preview_current">Aktuell</string> + <string name="upd_tests">Test-Builds</string> + <string name="upd_tests_hint">Einen Fix vor dem Release ausprobieren</string> + <string name="upd_tests_none">Derzeit keine</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Nicht für diese Kopie von DroidDeck gebaut</string> + <string name="upd_updated">Aktualisiert: %1$s</string> + <string name="upd_test_name">Test zu PR #%1$d</string> + <string name="upd_while_ago">vor einer Weile</string> + <string name="upd_just_now">gerade eben</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d zum Ausprobieren</item> + <item quantity="other">%1$d zum Ausprobieren</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Änderungen seit deinem Build · %1$d Build zurück</item> + <item quantity="other">Änderungen seit deinem Build · %1$d Builds zurück</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Neueste Änderungen · %1$d Build</item> + <item quantity="other">Neueste Änderungen · %1$d Builds</item> + </plurals> + <string name="gate_title">Eine Android-Einstellung muss geändert werden</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android stoppt Apps, die viele Hintergrundprozesse starten, und Steam startet Dutzende. Solange das so bleibt, werden Spiele ohne Fehlermeldung geschlossen.</string> + <string name="gate_fix_for_me">Für mich beheben</string> + <string name="gate_toggle_steps">Aktiviere „Beschränkungen für Unterprozesse deaktivieren“ und kehre dann zurück. Lass die Entwickleroptionen aktiviert, sonst geht der Schalter wieder aus.</string> + <string name="gate_open_dev">Entwickleroptionen öffnen</string> + <string name="gate_no_toggle">Diese Android-Version hat dafür keinen Schalter, deshalb ändert DroidDeck es über „Debugging über WLAN“. Dauert etwa eine Minute, kein Computer nötig.</string> + <string name="gate_needs_wifi">„Debugging über WLAN“ braucht eine Wi-Fi-Verbindung. Jedes Netzwerk geht; Internet ist nicht nötig.</string> + <string name="gate_needs_notifications">Der Kopplungscode wird in eine Benachrichtigung eingegeben. Erlaube Benachrichtigungen für DroidDeck oder nutze „Andere Wege“.</string> + <string name="gate_allow_notifications">Benachrichtigungen erlauben</string> + <string name="gate_step1">Öffne Einstellungen → Entwickleroptionen → Debugging über WLAN und aktiviere es</string> + <string name="gate_step2">Tippe auf „Gerät über einen Kopplungscode koppeln“</string> + <string name="gate_step3">Gib den Code in die DroidDeck-Benachrichtigung ein</string> + <string name="gate_waiting">Warte auf das Kopplungs-Pop-up…</string> + <string name="gate_code_needed">Pop-up gefunden. Gib seinen Code in der Benachrichtigung ein.</string> + <string name="gate_status">Status</string> + <string name="gate_polling">Prüft alle 2 Sekunden. Diese Seite schließt sich, sobald es aus ist.</string> + <string name="gate_other_ways">Andere Wege</string> + <string name="gate_other_toggle">Debugging über WLAN, manuelle Adresse, ADB am Computer</string> + <string name="gate_other_no_toggle">Manuelle Adresse, ADB am Computer, Entwickleroptionen</string> + <string name="gate_use_wireless_instead">Stattdessen „Debugging über WLAN“ verwenden</string> + <string name="gate_some_roms">Manche ROMs haben den Schalter trotzdem. Suche in den Entwickleroptionen nach „untergeordnete Prozesse“.</string> + <string name="gate_manual_hint">Falls die Benachrichtigung nicht funktioniert, gib Adresse und Code des Pop-ups selbst ein.</string> + <string name="gate_enter_manually">Adresse manuell eingeben</string> + <string name="gate_from_computer">Von einem Computer mit ADB:</string> + <string name="gate_copy_command">Befehl kopieren</string> + <string name="gate_choose_display">Wähle, auf welchem Display die Android-Einstellungen geöffnet werden.</string> + <string name="gate_main_screen">Hauptbildschirm</string> + <string name="wadb_finding_port">Gekoppelt. Suche den Port für Debugging über WLAN…</string> + <string name="wadb_enter_port">Gekoppelt. Gib den Port aus den Einstellungen ein.</string> + <string name="wadb_applying">Gerät gefunden. Einstellung wird angewendet…</string> + <string name="wadb_apply_failed">Automatisches Anwenden fehlgeschlagen. Prüfe die Adresse unten und versuch es erneut. %1$s</string> + <string name="wadb_title_wireless">Debugging über WLAN</string> + <string name="wadb_title_done">Limit für untergeordnete Prozesse aktualisiert</string> + <string name="wadb_title">Limit für untergeordnete Prozesse ändern</string> + <string name="wadb_lede_compact0">Fehlt die Option, kopple über „Debugging über WLAN“.</string> + <string name="wadb_lede_compact1">Gekoppelt. Prüfe IP-Adresse und Port unter „Debugging über WLAN“.</string> + <string name="wadb_lede_done">Das Limit für untergeordnete Prozesse wurde aktualisiert.</string> + <string name="wadb_lede0">Nutze Schritt 2, wenn die Entwickleroptionen keine Einstellung für untergeordnete Prozesse haben. Öffne Entwickleroptionen → Debugging über WLAN → Gerät über einen Kopplungscode koppeln.</string> + <string name="wadb_lede1">Gekoppelt. Nutze die Adresse unten oder aktualisiere sie über Debugging über WLAN → IP-Adresse und Port.</string> + <string name="wadb_lede_done_long">Das Limit für untergeordnete Prozesse wurde über „Debugging über WLAN“ aktualisiert.</string> + <string name="wadb_confirmed_on">Android hat bestätigt, dass das Limit aktiv ist.</string> + <string name="wadb_confirmed_off">Android hat bestätigt, dass das Limit aus ist.</string> + <string name="wadb_pair_group">2 · Für Debugging über WLAN koppeln</string> + <string name="wadb_pair_address">IP-Adresse und Port aus dem Kopplungs-Pop-up</string> + <string name="wadb_pin">Kopplungscode (PIN)</string> + <string name="wadb_pin_placeholder">6 Ziffern</string> + <string name="wadb_pair">Koppeln</string> + <string name="wadb_apply_group">2 · Per Debugging über WLAN anwenden</string> + <string name="wadb_connect_address">IP-Adresse und Port für die Verbindung</string> + <string name="wadb_pair_again">Erneut koppeln</string> + <string name="wadb_turn_off">Limit deaktivieren</string> + <string name="wadb_other_ways">Andere Wege, es zu ändern</string> + <string name="wadb_dev_try_first">1 · Entwickleroptionen (zuerst versuchen)</string> + <string name="wadb_restrict_on">Schalte „Beschränkungen für Unterprozesse deaktivieren“ aus.</string> + <string name="wadb_restrict_off">Schalte „Beschränkungen für Unterprozesse deaktivieren“ ein.</string> + <string name="wadb_computer_last">3 · ADB am Computer (letzter Ausweg)</string> + <string name="wadb_only_if">Nur wenn „Debugging über WLAN“ nicht verfügbar ist.</string> + <string name="wadb_computer_group">3 · ADB am Computer (letzter Ausweg)</string> + <string name="ctrl_osc_hint">Wann die Touch-Steuerung in einer Sitzung erscheint</string> + <string name="ctrl_color">Farbe</string> + <string name="ctrl_color_hint">Farbton der Bildschirmtasten</string> + <string name="ctrl_custom">Benutzerdefiniert</string> + <string name="ctrl_opacity">Deckkraft</string> + <string name="ctrl_percent">%1$d %%</string> + <string name="ctrl_size">Tastengröße</string> + <string name="ctrl_size_hint" formatted="false">Standardgröße: 100 %</string> + <string name="ctrl_stick_click">Stick-Klick</string> + <string name="ctrl_stick_click_hint">Doppeltippen und Stick halten für L3 oder R3</string> + <string name="ctrl_adaptive">Adaptive Sticks</string> + <string name="ctrl_rumble">Spielvibration</string> + <string name="ctrl_steam_button">Steam-Taste</string> + <string name="ctrl_qam_button">QAM-Taste</string> + <string name="ctrl_keyboard_button">Tastatur-Taste</string> + <string name="ctrl_select_steam">Mit Select das Steam-Menü öffnen</string> + <string name="ctrl_select_steam_hint">Statt View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Cons als VR-Controller</string> + <string name="ctrl_joycon_vr_hint">Während SteamVR läuft, wird jeder Joy-Con zu einer Hand. Richte ihn nach vorn und halte HOME oder Capture gedrückt, um ihn neu auszurichten.</string> + <string name="setup_animations">Animationen</string> + <string name="ctrl_adaptive_hint">Sticks erscheinen dort, wo du tippst, und verschwinden beim Loslassen</string> + <string name="ctrl_layout">Layout</string> + <string name="ctrl_layout_custom">Eigene Positionen gespeichert</string> + <string name="ctrl_layout_default">An diesen Bildschirm angepasst</string> + <string name="ctrl_edit">Bearbeiten</string> + <string name="ctrl_reset">Zurücksetzen</string> + <string name="ctrl_mapping">Tastenbelegung</string> + <string name="ctrl_mapping_default">Jede Taste sendet ihre eigene Eingabe</string> + <string name="ctrl_mapping_count">%1$d von %2$d Tasten neu belegt</string> + <string name="ctrl_configure">Konfigurieren</string> + <string name="ctrl_reset_all">Controller zurücksetzen</string> + <string name="ctrl_reset_all_hint">Stellt alle Controller-Einstellungen und das Layout wieder her</string> + <string name="ctrl_mapping_lede">Was jede Bildschirmtaste an das Spiel sendet. „Ausgeblendet“ entfernt die Taste.</string> + <string name="ctrl_onscreen_buttons">Bildschirmtasten</string> + <string name="ctrl_defaults">Standardwerte</string> + <string name="ctrl_reset_mapping">Belegung zurücksetzen</string> + <string name="content_android_apps">Android-Apps</string> + <string name="content_apps_count">%1$d Apps</string> + <string name="content_no_android_apps">Keine startbaren Android-Apps gefunden.</string> + <string name="content_desktop_installed">● Desktop installiert</string> + <string name="content_desktop_first_open">Wird beim ersten Öffnen installiert</string> + <string name="content_available">Zur Installation verfügbar</string> + <string name="content_not_installed">Nicht installiert.</string> + <string name="content_not_installed_suffix">%1$s · nicht installiert</string> + <string name="content_open_named">%1$s öffnen</string> + <string name="content_games">Spiele</string> + <string name="content_choose_roms">Wähle einen ROMs-Ordner.</string> + <string name="content_retroarch_roms">Navigiere in RetroArch zu /root/ROMs.</string> + <string name="content_add_roms">Füge %1$s-Spiele zu ROMs/%2$s hinzu.</string> + <string name="content_install_named">%1$s installieren</string> + <string name="content_stop_to_install">Zum Installieren Sitzung beenden</string> + <string name="content_runtime_required">Laufzeit erforderlich</string> + <string name="content_loading_details">Installationsdetails werden geladen…</string> + <string name="content_details_unavailable">Installationsdetails sind nicht verfügbar. Versuch es später noch einmal.</string> + <string name="content_needs_runtime">Installiere zuerst die Linux-Laufzeit unter „Einrichtung“.</string> + <string name="content_stop_first">Beende die laufende Sitzung, um Desktop-Apps zu installieren.</string> + <string name="content_install_into">Installiert %1$s in den Linux-Desktop.</string> + <string name="store_busy_percent_short">%1$s · %2$d %%</string> + <string name="content_hide_note">Ausblenden entfernt es vom Desktop. Seine Dateien bleiben in der Linux-Laufzeit.</string> + <string name="content_rom_gone">Dieses Spiel ist nicht mehr im ROMs-Ordner.</string> + <string name="content_desktop_system">Desktop · %1$s</string> + <string name="content_launch_in">In %1$s starten</string> + <string name="content_also_in">Auch in %1$s</string> + <string name="content_page_gone">Diese Seite gibt es nicht mehr. Wähle links einen Bereich.</string> + <string name="content_open_desktop">Desktop öffnen</string> + <string name="content_install_open_desktop">Desktop installieren & öffnen</string> + <string name="desktop_remove_title">Desktop deinstallieren</string> + <string name="desktop_remove_text">Entfernt den Desktop und seine mitgelieferten Apps. Spiele, hinzugefügte Apps, Einstellungen und gemeinsame Bibliotheken bleiben erhalten.</string> + <string name="desktop_removing">Desktop wird entfernt</string> + <string name="desktop_removed">Desktop entfernt</string> + <string name="desktop_cleaning_legacy">Alte LXQt-Dateien werden entfernt</string> + <string name="desktop_removal_unknown">Aktualisiere DroidDeck, bevor du diese Desktop-Version entfernst.</string> + <string name="content_linux_desktop">Linux-Desktop</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox und deine Emulatoren</string> + <string name="games_empty">Spiele, die du in Steam installierst, erscheinen hier nach der Sitzung.</string> + <string name="games_play_steam">Mit Steam spielen</string> + <string name="games_play_steamvr">Mit SteamVR spielen</string> + <string name="games_launch_settings">Starteinstellungen</string> + <string name="games_launch">Starten</string> + <string name="games_files">Spieldateien</string> + <string name="games_prefix">Proton-Präfix</string> + <string name="games_saves_looking">Suche nach Spielständen…</string> + <string name="games_saves_none">Kein Spielstandordner per Name gefunden. Der Export nimmt den ganzen Benutzerordner.</string> + <string name="games_saves_folders">%1$d Spielstandordner</string> + <string name="games_saves_summary">%1$s · %2$d Dateien · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Spielstände verwalten</string> + <string name="games_saves">Spielstände</string> + <string name="games_import_saves">Spielstände importieren…</string> + <string name="games_export_gamehub">Als GameHub-ZIP exportieren…</string> + <string name="games_export_winlator">Als Winlator-ZIP exportieren…</string> + <string name="games_open_save_folder">Spielstandordner öffnen</string> + <string name="games_never_played">Nie gespielt</string> + <string name="games_runtime_busy_percent">Laufzeit beschäftigt · %1$d %%</string> + <string name="games_runtime_busy">Laufzeit beschäftigt</string> + <string name="games_runtime_first_play">Laufzeit wird beim ersten „Spielen“ installiert</string> + <string name="games_runtime_update">Laufzeit-Update verfügbar</string> + <string name="games_runtime_ready">● Laufzeit bereit</string> + <string name="games_last_played">Zuletzt gespielt: %1$s</string> + <string name="games_internal">Interner Speicher</string> + <string name="games_added">Hinzugefügtes Spiel</string> + <string name="games_custom">Eigenes Spiel</string> + <string name="games_store_storage">Spielspeicher</string> + <string name="gpu_auto_hint">Das beste Paar für diese GPU, stets aktuell</string> + <string name="gpu_manual_hint">Wähle selbst ein Paar</string> + <string name="gpu_checking">Suche nach Treibern…</string> + <string name="gpu_none_listed">Noch keine Treiber aufgeführt. Aktualisiere, um danach zu suchen.</string> + <string name="gpu_hide_other">Treiber für andere GPUs ausblenden</string> + <string name="gpu_show_other">Treiber für andere GPUs anzeigen</string> + <string name="gpu_advanced">Erweitert</string> + <string name="gpu_set_with_display">Zusammen mit dem Anzeigetreiber festgelegt: %1$s enthält beide.</string> + <string name="gpu_set_with_runtime">Zusammen mit dem Laufzeittreiber festgelegt: %1$s enthält beide.</string> + <string name="gpu_runtime_hint">Wird von Spielen und dem Desktop genutzt.</string> + <string name="gpu_runtime_default">Laufzeit-Standard</string> + <string name="gpu_auto_by_gpu">Auto - nach GPU gewählt</string> + <string name="gpu_manage">Herunterladen, importieren oder löschen…</string> + <string name="gpu_in_use_caps">IN VERWENDUNG</string> + <string name="gpu_builtin">Die in DroidDeck integrierten Treiber</string> + <string name="gpu_matched_pair">Laufzeit- und Anzeigetreiber zusammen als passendes Paar festgelegt.</string> + <string name="gpu_recommended_for">Empfohlen für diese GPU: %1$s.</string> + <string name="gpu_refresh_hint">Aktualisiere, um nach Treibern für diese GPU zu suchen.</string> + <string name="gpu_recommended_caps">EMPFOHLEN</string> + <string name="gpu_unavailable">Nicht verfügbar</string> + <string name="load_runtime">Linux-Laufzeit</string> + <string name="load_runtime_detail">Linux-Laufzeit wird vorbereitet</string> + <string name="load_session">Sitzung</string> + <string name="load_session_detail">Anzeige und Audio werden gestartet</string> + <string name="load_steam">Steam-Client</string> + <string name="load_steam_detail">Steam und seine Kompatibilitätstools werden geprüft</string> + <string name="load_opening_steam">Steam wird geöffnet</string> + <string name="load_opening_steam_detail">Warte auf das erste Bild von Steam</string> + <string name="load_desktop">Desktop</string> + <string name="load_desktop_detail">Desktop wird vorbereitet</string> + <string name="load_opening">Wird geöffnet</string> + <string name="load_opening_detail">Warte auf das erste Bild</string> + <string name="load_starting_steam">Steam wird gestartet</string> + <string name="load_ended">Die Sitzung wurde beendet</string> + <string name="load_step">Schritt %1$d von %2$d</string> + <string name="load_steam_paused">Steam ist pausiert</string> + <string name="deck_tab_grips">Griffe</string> + <string name="deck_tab_left">Linkes Pad</string> + <string name="deck_tab_right">Rechtes Pad</string> + <string name="deck_tab_both">Beide</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Stick</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Zwischen Stick und Trackpad wechseln</string> + <string name="deck_more_controls">Weitere Deck-Steuerelemente</string> + <string name="deck_panels">BEREICHE</string> + <string name="deck_close">Steuerung auf dem Zweitbildschirm schließen</string> + <string name="deck_open_steam_menu">Steam-Menü öffnen</string> + <string name="deck_left_upper">Links · oben</string> + <string name="deck_left_lower">Links · unten</string> + <string name="deck_right_upper">Rechts · oben</string> + <string name="deck_right_lower">Rechts · unten</string> + <string name="deck_click">Klick</string> + <string name="deck_right_trackpad">Rechtes Trackpad</string> + <string name="deck_left_trackpad">Linkes Trackpad</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Tastatur einblenden</string> + <string name="second_hide_keyboard">Tastatur ausblenden</string> + <string name="second_terminal">Linux-Terminal</string> + <string name="second_terminal_not_ready">Die Linux-Sitzung ist noch nicht bereit für ein Terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Spiele</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Store</string> + <string name="rail_components">Komponenten</string> + <string name="rail_apps">Apps</string> + <string name="rail_setup">Einrichtung</string> + <string name="rail_updates">Updates</string> + <string name="rail_percent">%1$d %%</string> + <string name="rail_resume_named">%1$s fortsetzen</string> + <string name="roms_text">Erscheint in jeder Sitzung als /root/ROMs. Der interne Speicher liegt unter /root/Storage.</string> + <string name="roms_none">Kein Ordner ausgewählt</string> + <string name="roms_applies">Gilt ab der nächsten Sitzung. SD-Karten funktionieren.</string> + <string name="roms_choose">Ordner auswählen</string> + <string name="roms_change">Ordner ändern</string> + <string name="proton_lede">Installiere einen ARM64-Proton-Build und wähle ihn dann pro Spiel unter Steam → Eigenschaften → Kompatibilität aus.</string> + <string name="proton_stop_first">Beende die laufende Sitzung, um ein Kompatibilitätstool zu installieren oder zu entfernen.</string> + <string name="proton_available">Verfügbare Builds</string> + <string name="proton_installed">%1$s installiert</string> + <string name="proton_queued">Aus einer früheren Anfrage vorgemerkt</string> + <string name="proton_not_installed">Nicht installiert</string> + <string name="proton_update_available">Update verfügbar → %1$s</string> + <string name="proton_remove_older">Alte %1$s-Versionen entfernen</string> + <string name="proton_remove_older_body">Entfernt %1$s. Spiele, die diese Versionen nutzen, müssen auf ein anderes Proton umgestellt werden.</string> + <string name="proton_remove_body">Spiele, die diese Version nutzen, müssen auf ein anderes Proton umgestellt werden.</string> + <string name="proton_install_now">Jetzt installieren</string> + <string name="proton_cancel_queued">Vormerkung abbrechen</string> + <string name="pckb_android">Android-Tastatur</string> + <string name="pckb_hide">Ausblenden ✕</string> + <string name="main_launch_named">%1$s starten</string> + <string name="main_choose_screen">Wähle einen Bildschirm. Zweitbildschirm: %1$s.</string> + <string name="main_secondary_gone">Der Zweitbildschirm ist nicht mehr verfügbar.</string> + <string name="main_primary">Hauptbildschirm</string> + <string name="main_secondary">Zweitbildschirm</string> + <string name="widgets_prev_tab">Vorheriger Tab</string> + <string name="widgets_next_tab">Nächster Tab</string> + <string name="widgets_on">An</string> + <string name="widgets_all_n">Alle %1$d</string> + <string name="widgets_none">Keine</string> + <string name="widgets_n_of_m">%1$d von %2$d</string> + <string name="widgets_off">Aus</string> + <string name="screen_bottom">Unterer Bildschirm</string> + <string name="game_env_applies">Gilt ab dem nächsten Spielstart. Das Profil eines Spiels hat Vorrang vor dem gemeinsamen.</string> + <string name="game_env_other">Anderes Spiel per App-ID…</string> + <string name="game_env_done">Fertig</string> + <string name="game_env_default">Standard</string> + <string name="game_env_off">Aus</string> + <string name="game_env_change">Ändern…</string> + <string name="game_env_change_title">Variable ändern</string> + <string name="game_env_restore_default">Auf Standard zurücksetzen</string> + <string name="game_env_eyebrow">Proton-Spiele</string> + <string name="pip_title">Bild im Bild</string> + <string name="pip_auto">Automatisch zu Bild im Bild wechseln</string> + <string name="unfolded_controls">Steuerung auf dem aufgeklappten Bildschirm</string> + <string name="unfolded_controls_hint">Aufgeklappt liegt das Spiel über den Steam Deck-Trackpads und den hinteren Griffen. Zugeklappt läuft es im Vollbild.</string> + <string name="pip_suspended">Angehalten</string> + <string name="pip_not_ready">Bild im Bild ist verfügbar, sobald die Sitzung bereit ist.</string> + <string name="pip_permission">Erlaube Bild im Bild für DroidDeck in den Android-Einstellungen.</string> + <string name="pip_unavailable">Android konnte Bild im Bild nicht öffnen.</string> + <string name="game_shortcut">Verknüpfung</string> + <string name="game_shortcut_add">Zum Startbildschirm hinzufügen</string> + <string name="game_shortcut_choose">Spiel auswählen</string> + <string name="game_shortcut_scanning">Installierte Spiele werden gesucht…</string> + <string name="game_link_copy">Startlink kopieren</string> + <string name="game_link_copied">Startlink kopiert</string> + <string name="game_shortcut_unsupported">Dieser Launcher kann keine Verknüpfungen hinzufügen. Nutze stattdessen „Startlink kopieren“.</string> + <string name="game_link_invalid">Ungültiger Spiel-Startlink.</string> + <string name="game_link_missing">Dieses Spiel ist nicht mehr in deiner DroidDeck-Bibliothek.</string> + <string name="game_link_session_busy">Beende die aktuelle Sitzung, bevor du ein Steam-Spiel startest.</string> + <string name="game_link_failed">Das Spiel konnte nicht an Steam gesendet werden. Versuche erneut, es zu starten.</string> + <string name="setup_retry_removal">Entfernen wiederholen</string> + <string name="runtime_removing">Wird entfernt</string> + <string name="runtime_removal_incomplete">Entfernen unvollständig</string> + <string name="game_file_export">Spieldatei exportieren</string> + <string name="game_file_sync">Alle Spieldateien mit Ordner synchronisieren</string> + <string name="game_file_stop_sync">Synchronisierung der Spieldateien beenden</string> + <string name="game_file_folder">Ordner für Frontend-Spieldateien auswählen</string> + <string name="game_file_exported">Spieldateien gespeichert unter %1$s</string> + <string name="game_frontend_files">Frontend-Dateien</string> + + <string name="main_wait_runtime">Warte, bis der Vorgang an der Laufzeit abgeschlossen ist</string> + <string name="main_wait_proton_install">Warte, bis die Installation des Kompatibilitätstools abgeschlossen ist</string> + <string name="main_wait_desktop_install">Warte, bis die Installation der Desktop-App abgeschlossen ist</string> + <string name="main_wait_install_game">Warte, bis die Installation abgeschlossen ist, bevor du ein Spiel startest</string> + <string name="main_saves_close_session">Schließe zuerst die Steam-Sitzung, damit das Spiel den Import nicht überschreiben kann</string> + <string name="main_saves_importing">Import in %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">%1$d Datei aus %2$s in %3$s importiert</item> + <item quantity="other">%1$d Dateien aus %2$s in %3$s importiert</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">%1$d Datei aus %2$s in %3$s importiert. Alte Spielstände gesichert unter Download/DroidDeck/Saves/backups</item> + <item quantity="other">%1$d Dateien aus %2$s in %3$s importiert. Alte Spielstände gesichert unter Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Spielstand-ZIP für %1$s auswählen</string> + <string name="main_saves_exporting">Export von %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">%1$d Datei als %2$s exportiert: %3$s</item> + <item quantity="other">%1$d Dateien als %2$s exportiert: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Speicherort für %1$s auswählen (%2$s)</string> + <string name="main_action_failed">%1$s fehlgeschlagen: %2$s</string> + <string name="main_no_logs_yet">Noch keine Sitzungsprotokolle: Starte zuerst eine Sitzung.</string> + <string name="main_no_logs_to_clear">Keine Sitzungsprotokolle zum Löschen.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">%1$d Ordner mit Sitzungsprotokollen gelöscht.</item> + <item quantity="other">%1$d Ordner mit Sitzungsprotokollen gelöscht.</item> + </plurals> + <string name="main_wadb_pair_failed">Kopplung für Debugging über WLAN fehlgeschlagen</string> + <string name="main_wadb_command_failed">Befehl für Debugging über WLAN fehlgeschlagen</string> + <string name="main_wadb_unavailable">Debugging über WLAN ist nicht verfügbar</string> + <string name="main_adb_copied">ADB-Befehl kopiert</string> + <string name="main_pick_roms">ROMs-Ordner auswählen</string> + <string name="main_non_adreno_title">Keine Adreno-GPU</string> + <string name="main_non_adreno_text">Turnip unterstützt Adreno-GPUs. Auf %1$s zeigt Steam eventuell einen schwarzen Bildschirm. Download: %2$.0f MB.</string> + <string name="main_install_anyway">Trotzdem installieren</string> + <string name="main_remove_runtime_title">Linux-Laufzeit entfernen</string> + <string name="main_remove_runtime_text">Dadurch werden die Laufzeit, der Steam-Client darin und alle dort installierten Spiele gelöscht.</string> + <string name="main_applied">Angewendet: %1$s</string> + <string name="android_app_open_failed_primary">%1$s konnte nicht auf dem Hauptbildschirm geöffnet werden</string> + <string name="android_app_open_failed_on">%1$s konnte nicht auf %2$s geöffnet werden</string> + <string name="android_app_open_failed_display">%1$s konnte nicht auf Bildschirm %2$d geöffnet werden</string> + <string name="comp_busy_importing">Importieren</string> + <string name="comp_busy_swapping">Austauschen</string> + <string name="comp_busy_restoring">Wiederherstellen</string> + <string name="comp_busy_cancelling">Abbrechen</string> + <string name="comp_busy_deleting">Löschen</string> + <string name="comp_cannot_read">Datei kann nicht gelesen werden</string> + <string name="comp_imported">%1$s importiert</string> + <string name="comp_swap_cancelled">Der wartende Austausch wurde abgebrochen.</string> + <string name="comp_pick_wcp">Komponentenpaket auswählen (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Die Nightlies waren nicht erreichbar</string> + <string name="comp_stored">%1$s gespeichert</string> + <string name="comp_download_failed">Download fehlgeschlagen: %1$s</string> + <string name="drivers_pick_linux">Laufzeittreiber auswählen (-Linux-ZIP oder Android + Linux-Bundle)</string> + <string name="drivers_pick_android">Anzeigetreiber auswählen (AdrenoTools-ZIP oder Android + Linux-Bundle)</string> + <string name="drivers_pick_any">Treiber-ZIP oder Android + Linux-Bundle auswählen</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">%1$s wird entfernt…</string> + <string name="main_forgetting_named">%1$s wird vergessen…</string> + <string name="main_pick_game_storage">Ordner für den Spielspeicher auswählen</string> + <string name="main_pick_decky_zip">Decky-Plugin-ZIP auswählen</string> + <string name="main_storage_not_usable">Nicht nutzbar: %1$s</string> + <string name="main_running_program">Programm</string> + <string name="main_removing_runtime">Linux-Laufzeit wird entfernt</string> + <string name="main_settings_main_screen">Die Einstellungen ließen sich nicht auf dem unteren Bildschirm öffnen und wurden auf dem Hauptbildschirm geöffnet.</string> + <string name="main_open_dev_options">Entwickleroptionen in den Einstellungen öffnen</string> + + <string name="upd_unknown_apps_failed">Die Android-Einstellung „Unbekannte Apps installieren“ konnte nicht geöffnet werden</string> + <string name="upd_couldnt_check">Prüfung nicht möglich: %1$s</string> + <string name="upd_no_download">Dieser Build hat keinen Download für diese DroidDeck-Installation</string> + <string name="upd_stop_first">Beende zuerst die laufende Sitzung und aktualisiere dann</string> + <string name="upd_stage_downloading">Herunterladen</string> + <string name="upd_stage_installing">Installieren</string> + <string name="upd_stage_confirm">Warte auf deine Bestätigung</string> + <string name="upd_failed">Das Update ist fehlgeschlagen</string> + <string name="upd_not_offered">Android hat die Installation des Updates nicht angeboten</string> + + <string name="decky_install_failed">Decky-Installation fehlgeschlagen: %1$s</string> + <string name="decky_plugin_starting">Plugin-Import wird gestartet…</string> + <string name="decky_plugin_failed">Plugin-Import fehlgeschlagen: %1$s</string> + <string name="decky_plugin_installed">Plugin installiert. Starte Steam neu, um es zu laden.</string> + + <string name="drivers_not_checked">Noch nicht geprüft - tippe auf Aktualisieren, um nach neuen Treibern zu suchen</string> + <string name="drivers_bundle_sets_display">Android + Linux: legt den Anzeigetreiber gleich mit fest</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: legt den Laufzeittreiber gleich mit fest</string> + <string name="drivers_runtime_builtin">das in die Laufzeit integrierte Turnip</string> + <string name="drivers_system_vulkan">System-Vulkan: kein mitgelieferter Build für diese GPU</string> + <string name="drivers_bundled">%1$s (mitgeliefert)</string> + <string name="drivers_manual">Manuell</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Derzeit ist nur eine Hälfte veröffentlicht</string> + <string name="drivers_pair_size">%1$.0f MB für beide</string> + <string name="drivers_none_to_set">Keine Treiber zum Festlegen: %1$s</string> + <string name="drivers_checking_latest">Suche nach den neuesten Treibern…</string> + <string name="drivers_up_to_date_check_failed">Aktuell (Prüfung nicht möglich: %1$s)</string> + <string name="drivers_recommended_unpublished">Die empfohlenen Treiber sind derzeit nicht veröffentlicht</string> + <string name="drivers_downloading_pair">%1$s %2$s wird heruntergeladen…</string> + <string name="drivers_updated_to">Auf %1$s %2$s aktualisiert.</string> + <string name="drivers_updated_to_restart">Auf %1$s %2$s aktualisiert. Der Anzeigetreiber gilt nach einem Neustart von DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Treiber-Updates werden nach dem Ende der Sitzung ausgeführt.</string> + <string name="drivers_auto_waits_for_network">Sobald mobile Daten und Energiesparmodus aus sind, wird %1$s %2$s geladen.</string> + <string name="drivers_skipping_bad">%1$s %2$s konnte auf diesem Gerät keine Sitzung starten, deshalb bleibt der Automatikmodus beim funktionierenden Treiber.</string> + <string name="drivers_rolled_back">%1$s konnte zweimal keine Sitzung starten, deshalb ist der Automatikmodus zum funktionierenden Treiber zurückgekehrt.</string> + <string name="drivers_switched_to">Zu %1$s %2$s gewechselt.</string> + <string name="drivers_switched_to_restart">Zu %1$s %2$s gewechselt. Der Anzeigetreiber gilt nach einem Neustart von DroidDeck.</string> + <string name="drivers_using">%1$s %2$s wird verwendet.</string> + <string name="drivers_using_restart">%1$s %2$s wird verwendet. Der Anzeigetreiber gilt nach einem Neustart von DroidDeck.</string> + <string name="drivers_using_quest">Nutzt den eingebauten Quest-Anzeigetreiber und die Laufzeit-Standardwerte.</string> + <string name="drivers_using_quest_restart">Nutzt den eingebauten Quest-Anzeigetreiber und die Laufzeit-Standardwerte. Der Anzeigetreiber greift nach einem Neustart von DroidDeck.</string> + <string name="drivers_not_a_driver">Keine Treiber-ZIP: weder ein AdrenoTools-Treiber noch ein -Linux-Turnip noch ein Android + Linux-Bundle</string> + <string name="drivers_import_failed">Import fehlgeschlagen: %1$s</string> + <string name="drivers_imported_unnamed">Importierter Treiber</string> + <string name="drivers_using_bundle">%1$s wird als Laufzeit- und Anzeigetreiber verwendet.</string> + <string name="drivers_using_bundle_restart">%1$s wird als Laufzeit- und Anzeigetreiber verwendet. Der Anzeigetreiber gilt nach einem Neustart von DroidDeck.</string> + <string name="drivers_deleted_bundle">%1$s gelöscht (beide Treiber)</string> + <string name="drivers_deleted">%1$s gelöscht</string> + <string name="drivers_release_status">Neueste: %1$s · geprüft %2$s</string> + <string name="drivers_release_status_failed">Neueste: %1$s · %2$s nicht erreichbar · geprüft %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">vor %1$d Min.</item> + <item quantity="other">vor %1$d Min.</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">vor %1$d Std.</item> + <item quantity="other">vor %1$d Std.</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">vor %1$d Tag</item> + <item quantity="other">vor %1$d Tagen</item> + </plurals> + <string name="drivers_checking_sources">Banners-Turnip, WinNative und DroidDeck werden geprüft…</string> + <string name="drivers_check_failed">Prüfung fehlgeschlagen</string> + <string name="drivers_installed_pick_either">%1$s installiert - wähle ihn in einer der beiden Listen, um beide Treiber festzulegen</string> + <string name="drivers_installed_pick">%1$s installiert - wähle ihn im Menü aus</string> + + <string name="session_wait_removal">Warte, bis die Laufzeit entfernt ist</string> + <string name="session_title_game">Spiel</string> + <string name="session_touch_auto_touchpad">Touchpad</string> + <string name="session_touch_auto_direct">direkt</string> + <string name="session_swap_failed">Austausch fehlgeschlagen: %1$s</string> + <string name="session_profile_save_failed">Profil konnte nicht gespeichert werden: %1$s</string> + <string name="session_desktop_paused">Der Desktop ist pausiert</string> + <string name="session_named_paused">%1$s ist pausiert</string> + <string name="session_program_paused">Das Programm ist pausiert</string> + <string name="session_starting_desktop">Desktop wird gestartet</string> + <string name="session_starting_named">%1$s wird gestartet</string> + <string name="session_starting_program">Programm wird gestartet</string> + <string name="session_no_logs">Keine Protokolle für diese Sitzung.</string> + <string name="session_logs_archive_failed">Das Archiv der Sitzungsprotokolle konnte nicht erstellt werden.</string> + <string name="session_logs_share_failed">Die Sitzungsprotokolle konnten nicht geteilt werden.</string> + <string name="session_starting_session">Sitzung wird gestartet…</string> + <string name="session_runtime_downloading">Linux-Laufzeit wird heruntergeladen</string> + <string name="session_runtime_downloading_mb">Linux-Laufzeit wird heruntergeladen · %1$d von %2$d MB</string> + <string name="session_runtime_checking">Linux-Laufzeit wird geprüft</string> + <string name="session_runtime_unpacking">Linux-Laufzeit wird entpackt</string> + <string name="session_desktop_downloading">Desktop wird heruntergeladen</string> + <string name="session_desktop_downloading_mb">Desktop wird heruntergeladen · %1$d von %2$d MB</string> + <string name="session_desktop_checking">Desktop wird geprüft</string> + <string name="session_desktop_unpacking">Desktop wird entpackt</string> + <string name="session_proton_downloading">Proton Experimental (ARM64) wird heruntergeladen</string> + <string name="session_proton_downloading_mb">Proton Experimental (ARM64) wird heruntergeladen · %1$d von %2$d MB</string> + <string name="session_proton_checking">Proton Experimental (ARM64) wird geprüft</string> + <string name="session_proton_unpacking">Proton Experimental (ARM64) wird entpackt</string> + <string name="session_runtime_catalog_unreachable">Der Katalog der Laufzeiten war nicht erreichbar. Prüfe die Verbindung und tippe erneut auf Spielen.</string> + <string name="session_runtime_install_failed">Die Linux-Laufzeit wurde nicht installiert. Prüfe sie unter Einrichtung und tippe erneut auf Spielen.</string> + <string name="session_desktop_install_failed">Der Desktop wurde nicht installiert (%1$s). Prüfe die Verbindung und tippe erneut auf Desktop.</string> + <string name="session_ended_named">%1$s wurde unerwartet beendet. Teile die Protokolle mit einem Fehlerbericht oder versuche es erneut.</string> + <string name="session_ended_program">Das Programm wurde unerwartet beendet. Teile die Protokolle mit einem Fehlerbericht oder versuche es erneut.</string> + <string name="session_ended_desktop">Der Desktop wurde unerwartet beendet. Teile die Protokolle mit einem Fehlerbericht oder versuche es erneut.</string> + <string name="session_ended_detail">Exit-Status %1$d · %2$s</string> + <string name="session_ended_no_log">kein Protokoll</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Das Protokoll zeigt %1$d Fehler „Function not implemented“: Die seccomp-Beschleunigung von proot lässt auf diesem Gerät einen Helfer scheitern. Versuche %2$s → „%3$s“ (oder „%4$s“) und starte neu.</item> + <item quantity="other">Das Protokoll zeigt %1$d Fehler „Function not implemented“: Die seccomp-Beschleunigung von proot lässt auf diesem Gerät einen Helfer scheitern. Versuche %2$s → „%3$s“ (oder „%4$s“) und starte neu.</item> + </plurals> + + <string name="mode_decky_plugins">Plugins</string> + <string name="mode_decky_plugins_hint">Installiere eine Plugin-ZIP für die nächste Steam-Sitzung.</string> + <string name="mode_decky_plugin_downloading">Wird heruntergeladen…</string> + <string name="mode_decky_plugin_install_zip">Aus ZIP installieren</string> + <string name="store_cat_games">Spiele</string> + <string name="store_cat_audio_video">Audio & Video</string> + <string name="store_cat_graphics">Grafik</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Büro</string> + <string name="store_cat_developer">Entwicklung</string> + <string name="store_cat_education">Bildung</string> + <string name="store_cat_science">Wissenschaft</string> + <string name="store_cat_system">System</string> + <string name="store_cat_utilities">Dienstprogramme</string> + <string name="store_section_popular">Beliebt</string> + <string name="store_section_trending">Im Trend</string> + <string name="store_section_new">Neu</string> + <string name="store_section_updated">Aktualisiert</string> + <string name="store_section_loading">wird geladen…</string> + <string name="store_flatpak_setup">Flatpak-Einrichtung</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Updates konnten nicht auf Flathub geprüft werden</string> + <string name="content_rom_installed">installiert</string> + <string name="content_rom_folder">Ordner</string> + <string name="theme_graphite">Graphit</string> + <string name="theme_graphite_detail">Graphitflächen, mit dem Kugelblau des Logos für alles Ausgewählte, Fokussierte oder Gedrückte.</string> + <string name="theme_paper">Papier auf Schwarz</string> + <string name="theme_paper_detail">Weiß ist die Hauptfarbe, das Blau des Symbols markiert Linien, Ringe und Punkte.</string> + <string name="theme_icon_blue">Symbolblau</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Einfg</string> + <string name="pckb_key_del">Entf</string> + <string name="pckb_key_home">Pos1</string> + <string name="pckb_key_end">Ende</string> + <string name="pckb_key_pgup">Bild↑</string> + <string name="pckb_key_pgdn">Bild↓</string> + <string name="pckb_key_backspace">⌫ Rücktaste</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Feststell</string> + <string name="pckb_key_enter">Eingabe ⏎</string> + <string name="pckb_key_shift">⇧ Umschalt</string> + <string name="pckb_key_ctrl">Strg</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Leertaste</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Strg+C</string> + <string name="second_key_ctrl_d">Strg+D</string> + <string name="game_sync_err_runtime">Installiere zuerst die Laufzeit</string> + <string name="game_sync_err_steam_library">Steam-Bibliothek ist nicht verfügbar</string> + <string name="game_sync_err_previous_sd">Vorherige SD-Bibliothek ist nicht verfügbar</string> + <string name="game_sync_err_game_storage">Spielspeicher ist nicht verfügbar</string> + <string name="game_sync_err_added_games">Ordner für hinzugefügte Spiele ist nicht verfügbar</string> + <string name="game_sync_err_manifests">Steam-Manifeste sind nicht verfügbar</string> + <string name="content_system_many">Viele Systeme</string> + <string name="fm_drive_internal">Intern</string> + <string name="fm_drive_linux">Linux-System</string> + <string name="fm_drive_sd">SD-Karte</string> + <string name="fm_drive_storage">Speicher</string> + <string name="fm_select">Auswählen</string> + <string name="fm_properties">Eigenschaften</string> + <string name="fm_favorite_add">Zu Favoriten hinzufügen</string> + <string name="fm_favorite_remove">Aus Favoriten entfernen</string> + <string name="fm_rename">Umbenennen</string> + <string name="fm_copy">Kopieren</string> + <string name="fm_cut">Ausschneiden</string> + <string name="fm_actions">Aktionen</string> + <string name="fm_favorites">Favoriten</string> + <string name="fm_pin_current">Aktuellen Ordner anheften</string> + <string name="fm_no_favorites">Noch keine Favoriten - hefte einen Ordner über sein ⋮-Menü an, um schnell hierher zurückzukehren.</string> + <string name="fm_unpin_favorite">Aus Favoriten entfernen</string> + <string name="fm_size_zero">0 Byte</string> + <string name="fm_unit_bytes">Byte</string> + <string name="fm_prop_location">Speicherort</string> + <string name="fm_prop_type">Typ</string> + <string name="fm_prop_size">Größe</string> + <string name="fm_prop_modified">Geändert</string> + <string name="fm_type_folder">Ordner</string> + <string name="fm_type_file">Datei</string> + <string name="fm_type_ext_file">%1$s-Datei</string> + <string name="fm_read_only">Schreibgeschützt</string> + <string name="fm_read_only_hint">Verhindert, dass Spiele (und Wine) diese Datei überschreiben oder löschen.</string> + <string name="fm_read_only_failed">„Schreibgeschützt“ konnte nicht geändert werden</string> + <string name="fm_hidden">Versteckt</string> + <string name="fm_hidden_unsupported">Dieser Speicher kann das Versteckt-Attribut nicht speichern.</string> + <string name="fm_hidden_hint">Markiert die Datei in Windows als versteckt (Versteckt-Attribut von Wine).</string> + <string name="fm_hidden_failed">„Versteckt“ konnte auf diesem Speicher nicht geändert werden</string> + <string name="fm_done">Fertig</string> + <string name="fm_op_deleting">Wird gelöscht...</string> + <string name="fm_delete_failed">Löschen fehlgeschlagen</string> + <string name="fm_op_moving">Wird verschoben...</string> + <string name="fm_op_copying">Wird kopiert...</string> + <string name="fm_op_moving_item">Verschieben - %1$s</string> + <string name="fm_op_copying_item">Kopieren - %1$s</string> + <string name="fm_op_moving_batch">Verschieben %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Kopieren %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d erledigt, %2$d fehlgeschlagen</string> + <string name="fm_paste_skipped">%1$d erledigt, %2$d übersprungen</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d Element verschoben</item> + <item quantity="other">%1$d Elemente verschoben</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d Element kopiert</item> + <item quantity="other">%1$d Elemente kopiert</item> + </plurals> + <string name="fm_already_exists">„%1$s“ ist bereits vorhanden</string> + <string name="fm_op_renaming">Wird umbenannt...</string> + <string name="fm_rename_failed">Umbenennen fehlgeschlagen</string> + <string name="fm_op_creating_folder">Ordner wird erstellt...</string> + <string name="fm_create_folder_failed">Ordner konnte nicht erstellt werden</string> + <string name="fm_new_folder">Neuer Ordner</string> + <string name="fm_folder_name">Ordnername</string> + <string name="fm_create">Erstellen</string> + <string name="fm_new_name">Neuer Name</string> + <string name="fm_delete_title">Löschen?</string> + <string name="fm_delete_text">„%1$s“ endgültig löschen?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">%1$d Element löschen?</item> + <item quantity="other">%1$d Elemente löschen?</item> + </plurals> + <string name="fm_cannot_undo">Dies kann nicht rückgängig gemacht werden.</string> + <plurals name="fm_and_more"> + <item quantity="one">…und %1$d weiteres</item> + <item quantity="other">…und %1$d weitere</item> + </plurals> + <string name="fm_op_deleting_batch">Löschen %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d konnte nicht gelöscht werden</item> + <item quantity="other">%1$d konnten nicht gelöscht werden</item> + </plurals> + <string name="fm_conflict_merge_hint">Zusammenführen fügt Dateien im vorhandenen Ordner hinzu und ersetzt sie.</string> + <string name="fm_conflict_overwrite_hint">Überschreiben ersetzt die vorhandene Datei.</string> + <string name="fm_conflict_apply_all">Auf alle Konflikte anwenden</string> + <string name="fm_conflict_merge">Zusammenführen</string> + <string name="fm_conflict_overwrite">Überschreiben</string> + <string name="fm_conflict_keep_both">Beide behalten</string> + <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_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> + <string name="fm_search">Suchen</string> + <string name="fm_sort">Sortieren</string> + <string name="fm_sort_name">Name</string> + <string name="fm_sort_date">Änderungsdatum</string> + <string name="fm_rows_comfortable">Großzügige Zeilen</string> + <string name="fm_rows_compact">Kompakte Zeilen</string> + <string name="fm_hide_hidden">Versteckte Dateien ausblenden</string> + <string name="fm_show_hidden">Versteckte Dateien anzeigen</string> + <string name="fm_hide_favorites">Favoriten ausblenden</string> + <string name="fm_show_favorites">Favoriten anzeigen</string> + <string name="fm_filter_folder">Diesen Ordner filtern</string> + <string name="fm_free_space">%1$s frei</string> + <string name="fm_selected_count">%1$d ausgewählt</string> + <string name="fm_select_none">Keine</string> + <string name="fm_select_all">Alle</string> + <string name="fm_paste">Einfügen</string> + <plurals name="fm_items"> + <item quantity="one">%1$d Element</item> + <item quantity="other">%1$d Elemente</item> + </plurals> + <string name="fm_paste_here">%1$s hier einfügen</string> + <string name="fm_paste_move_here">%1$s hier einfügen (verschieben)</string> + <string name="fm_rail_title">Dateien</string> + <string name="fm_rail_storage">SPEICHER</string> + <string name="fm_rail_quick">SCHNELLZUGRIFF</string> + <string name="fm_rail_favorites">FAVORITEN</string> + <string name="fm_rail_downloads">Downloads</string> + <string name="fm_rail_downloads_short">Download</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Sitzungsprotokolle</string> + <string name="fm_rail_pictures">Bilder</string> + <string name="fm_favorite_added">„%1$s“ zu Favoriten hinzugefügt</string> + <string name="fm_favorite_removed">„%1$s“ aus Favoriten entfernt</string> + <string name="fm_empty_directory">Leeres Verzeichnis</string> + <string name="fm_up_one_level">Eine Ebene nach oben</string> + <string name="fm_choose_folder">Ordner auswählen</string> + <string name="fm_choose_file">Datei auswählen</string> + <string name="ctrl_tint_steam_blue">Steam-Blau</string> + <string name="ctrl_tint_sky">Himmelblau</string> + <string name="ctrl_tint_white">Weiß</string> + <string name="ctrl_tint_violet">Violett</string> + <string name="ctrl_tint_green">Grün</string> + <string name="ctrl_tint_amber">Bernstein</string> + <string name="ctrl_tint_red">Rot</string> + <string name="ctrl_tint_pink">Pink</string> + <string name="ctrl_button_a">A-Taste</string> + <string name="ctrl_button_b">B-Taste</string> + <string name="ctrl_button_x">X-Taste</string> + <string name="ctrl_button_y">Y-Taste</string> + <string name="ctrl_button_lb">Linke Schultertaste</string> + <string name="ctrl_button_rb">Rechte Schultertaste</string> + <string name="ctrl_button_lt">Linker Trigger</string> + <string name="ctrl_button_rt">Rechter Trigger</string> + <string name="ctrl_button_view">Ansichtstaste</string> + <string name="ctrl_button_menu">Menütaste</string> + <string name="ctrl_target_view">Ansicht</string> + <string name="ctrl_target_menu">Menü</string> + <string name="ctrl_target_up">Steuerkreuz oben</string> + <string name="ctrl_target_down">Steuerkreuz unten</string> + <string name="ctrl_target_left">Steuerkreuz links</string> + <string name="ctrl_target_right">Steuerkreuz rechts</string> + <string name="ctrl_target_hidden">Ausgeblendet</string> + <string name="ctrl_editor_drag">Zum Verschieben ziehen</string> + <string name="ctrl_editor_snap">Einrasten</string> + <string name="ctrl_editor_save">Speichern</string> + <string name="second_mode_none">Nichts</string> + <string name="second_mode_keyboard_trackpad">Tastatur + Trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Deck-Griffe + Trackpads</string> + + <string name="rtinst_removing">Linux-Laufzeit wird entfernt</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Linux-Laufzeit wird entfernt · %1$d Eintrag</item> + <item quantity="other">Linux-Laufzeit wird entfernt · %1$d Einträge</item> + </plurals> + <string name="rtinst_removed">Linux-Laufzeit entfernt</string> + <string name="rtinst_removal_failed">Die Linux-Laufzeit konnte nicht vollständig entfernt werden. Wiederhole das Entfernen unter Einrichtung.</string> + <string name="rtinst_removing_leftovers">Reste der Laufzeit werden entfernt</string> + <string name="rtinst_downloading">Herunterladen</string> + <string name="rtinst_verifying">Überprüfen</string> + <string name="rtinst_extracting">Entpacken</string> + <string name="rtinst_channel_description">Wird angezeigt, während die Linux-Laufzeit installiert oder entfernt wird</string> + <string name="rtinst_title_installing">Linux-Laufzeit wird installiert</string> + <string name="rtinst_title_removing">Linux-Laufzeit wird entfernt</string> + + <string name="deskpkg_runtime_missing">Die Linux-Laufzeit ist nicht installiert</string> + <string name="deskpkg_no_checksum">Der Katalog hat keine Prüfsumme für %1$s</string> + <string name="deskpkg_checksum_mismatch">Prüfsumme stimmt nicht überein - es wurde nichts geändert</string> + <string name="deskpkg_installing">%1$s wird installiert</string> + <string name="deskpkg_place_failed">Das AppImage konnte nicht abgelegt werden</string> + <string name="deskpkg_extract_failed">Entpacken fehlgeschlagen</string> + <string name="deskpkg_install_failed">Installation fehlgeschlagen</string> + + <string name="flatpakmgr_setup_failed">Flatpak-Einrichtung fehlgeschlagen (Exit-Code %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Flatpak-Einrichtung wurde nicht abgeschlossen</string> + <string name="flatpakmgr_busy">Eine andere Store-Aufgabe läuft</string> + <string name="flatpakmgr_not_ready">Richte zuerst Flatpak ein</string> + <string name="flatpakmgr_starting">Wird gestartet</string> + <string name="flatpakmgr_exit_status">Flatpak wurde mit Status %1$d beendet</string> + <string name="flatpakmgr_installing">%1$s wird installiert</string> + <string name="flatpakmgr_updating">%1$s wird aktualisiert</string> + <string name="flatpakmgr_removing">%1$s wird entfernt</string> + <string name="flatpakmgr_installing_step">%1$s wird installiert (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">%1$s wird aktualisiert (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">%1$s wird entfernt (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">Übersetzungen</string> + <string name="flatpakmgr_ref_graphics_drivers">Grafiktreiber</string> + <string name="flatpakmgr_ref_media_codecs">Mediencodecs</string> + <string name="flatpakmgr_ref_runtime">%1$s-Laufzeit</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s-Laufzeit %2$s</string> + + <string name="appimg_too_small">Die Datei ist zu klein für ein AppImage</string> + <string name="appimg_unreadable">Die Datei kann nicht gelesen werden: %1$s</string> + <string name="appimg_not_linux">Dies ist kein AppImage (es ist kein Linux-Programm)</string> + <string name="appimg_wrong_arch">Dieses AppImage ist weder für ARM64 (aarch64) noch für x86-PCs gebaut</string> + <string name="appimg_not_appimage">Dies ist ein Linux-Programm, aber kein AppImage</string> + <string name="appimg_wrong_type">Nur AppImages vom Typ 2 können importiert werden (dieses ist Typ %1$d)</string> + <string name="appimg_no_space_import">Nicht genug freier Speicherplatz: Der Import benötigt etwa %1$s</string> + <string name="appimg_no_space_update">Nicht genug freier Speicherplatz: Das Update benötigt etwa %1$s</string> + <string name="appimg_import_failed">Import fehlgeschlagen</string> + <string name="appimg_gone">Dieses AppImage ist nicht mehr vorhanden</string> + <string name="appimg_update_failed">Update fehlgeschlagen</string> + <string name="appimg_extracting">%1$s wird entpackt</string> + <string name="appimg_extract_failed">Das AppImage konnte nicht entpackt werden</string> + <string name="appimg_extract_failed_detail">Das AppImage konnte nicht entpackt werden: %1$s</string> + + <string name="deckymgr_stop_session_loader">Beende die aktive Sitzung, bevor du Decky Loader installierst</string> + <string name="deckymgr_download_failed">Download von Decky Loader fehlgeschlagen</string> + <string name="deckymgr_size_mismatch">Die Größe von Decky Loader stimmt nicht mit den Release-Metadaten überein</string> + <string name="deckymgr_checksum_download_failed">Die Release-Prüfsumme konnte nicht heruntergeladen werden</string> + <string name="deckymgr_checksum_missing">Release-Prüfsumme fehlt</string> + <string name="deckymgr_checksum_invalid">Release-Prüfsumme ist ungültig</string> + <string name="deckymgr_checksum_mismatch">Prüfsumme von Decky Loader stimmt nicht überein</string> + <string name="deckymgr_not_elf">Die Release-Datei ist keine kompatible 64-Bit-Linux-Programmdatei</string> + <string name="deckymgr_session_started_loader">Während des Downloads wurde eine Sitzung gestartet; beende sie, bevor du Decky Loader installierst</string> + <string name="deckymgr_loader_not_executable">PluginLoader konnte nicht als ausführbar markiert werden</string> + <string name="deckymgr_cef_failed">Steam-CEF-Remote-Debugging konnte nicht aktiviert werden</string> + <string name="deckymgr_stage_failed">PluginLoader konnte nicht bereitgestellt werden</string> + <string name="deckymgr_loader_preserve_failed">Der vorhandene PluginLoader konnte nicht gesichert werden</string> + <string name="deckymgr_loader_activate_failed">Der neue PluginLoader konnte nicht aktiviert werden</string> + <string name="deckymgr_stop_session_plugin">Beende die aktive Sitzung, bevor du ein Plugin installierst</string> + <string name="deckymgr_loader_required">Installiere Decky Loader, bevor du ein Plugin importierst</string> + <string name="deckymgr_zip_unreadable">Die ausgewählte ZIP-Datei konnte nicht gelesen werden</string> + <string name="deckymgr_plugins_dir_failed">Das Decky-Plugin-Verzeichnis konnte nicht erstellt werden</string> + <string name="deckymgr_extracting_zip">Plugin-ZIP wird entpackt</string> + <string name="deckymgr_zip_one_folder">Die Plugin-ZIP muss genau einen Plugin-Ordner auf oberster Ebene enthalten</string> + <string name="deckymgr_zip_missing_files">In der Plugin-ZIP fehlt plugin.json, package.json oder dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Plugin-Name fehlt</string> + <string name="deckymgr_session_started_plugin">Während der Installation wurde eine Sitzung gestartet; beende sie, bevor du ein Plugin installierst</string> + <string name="deckymgr_plugin_installed">Plugin installiert · starte Steam neu, um es zu laden</string> + <string name="deckymgr_plugin_install_failed">Installation der Plugin-ZIP fehlgeschlagen</string> + <string name="deckymgr_zip_too_many">Die Plugin-ZIP enthält zu viele Einträge</string> + <string name="deckymgr_zip_invalid_path">Die Plugin-ZIP enthält einen ungültigen Pfad</string> + <string name="deckymgr_zip_duplicate_paths">Die Plugin-ZIP enthält doppelte Pfade</string> + <string name="deckymgr_zip_unsafe_path">Die Plugin-ZIP enthält einen unsicheren Pfad</string> + <string name="deckymgr_folder_failed">Plugin-Ordner konnte nicht erstellt werden</string> + <string name="deckymgr_zip_too_large">Die Plugin-ZIP überschreitet entpackt das Limit von 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Mitgelieferte Plugin-Binärdatei konnte nicht als ausführbar markiert werden</string> + <string name="deckymgr_remote_entry_invalid">Ungültiger remote_binary-Eintrag</string> + <string name="deckymgr_remote_name_invalid">Ungültiger Name der Remote-Binärdatei</string> + <string name="deckymgr_remote_url_https">Die URL der Remote-Binärdatei muss HTTPS verwenden</string> + <string name="deckymgr_remote_hash_invalid">Remote-Binärdatei %1$s hat einen ungültigen SHA-256-Hash</string> + <string name="deckymgr_bin_dir_failed">bin-Verzeichnis des Plugins konnte nicht erstellt werden</string> + <string name="deckymgr_downloading_binary">Plugin-Binärdatei wird heruntergeladen · %1$s</string> + <string name="deckymgr_binary_download_failed">Plugin-Binärdatei %1$s konnte nicht heruntergeladen werden</string> + <string name="deckymgr_binary_checksum_mismatch">Prüfsumme der Plugin-Binärdatei stimmt nicht überein · %1$s</string> + <string name="deckymgr_binary_not_executable">Plugin-Binärdatei konnte nicht als ausführbar markiert werden · %1$s</string> + <string name="deckymgr_binary_replace_failed">Plugin-Binärdatei konnte nicht ersetzt werden · %1$s</string> + <string name="deckymgr_binary_install_failed">Plugin-Binärdatei konnte nicht installiert werden · %1$s</string> + <string name="deckymgr_folder_taken">Der Plugin-Ordner gehört zu einem anderen Plugin</string> + <string name="deckymgr_preserve_failed">Das vorhandene Plugin konnte nicht gesichert werden</string> + <string name="deckymgr_activate_failed">Das importierte Plugin konnte nicht aktiviert werden</string> + <string name="deckymgr_settings_failed">Decky-Plugin-Einstellungen konnten nicht aktualisiert werden</string> + <string name="deckymgr_restore_failed">Das vorhandene Plugin konnte nicht wiederhergestellt werden</string> + + <string name="adbfix_save_failed">Identität für Debugging über WLAN konnte nicht gespeichert werden</string> + <string name="adbfix_command_failed">ADB-Befehl fehlgeschlagen (%1$d)</string> + <string name="adbfix_not_confirmed">Android hat nicht bestätigt, dass das Limit für untergeordnete Prozesse geändert wurde: %1$s</string> + <string name="adbfix_no_pairing">Keine Kopplung für Debugging über WLAN gespeichert</string> + <string name="adbfix_enter_address">Aktuelle IP-Adresse & Port von Debugging über WLAN eingeben</string> + + <string name="adbpair_timed_out">Zeitüberschreitung beim Warten auf das Kopplungs-Pop-up. Versuche es erneut über DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Suche nach dem Kopplungs-Pop-up nicht möglich (%1$d). Prüfe, ob WLAN aktiviert ist.</string> + <string name="adbpair_discovery_failed">Suche nach dem Kopplungs-Pop-up nicht möglich: %1$s</string> + <string name="adbpair_six_digits">Gib alle 6 Ziffern des Codes ein</string> + <string name="adbpair_pairing">Wird gekoppelt…</string> + <string name="adbpair_code_rejected">Dieser Code hat nicht funktioniert. Öffne das Kopplungs-Pop-up erneut und gib den neuen Code ein.</string> + <string name="adbpair_connecting">Gekoppelt. Verbindung wird hergestellt…</string> + <string name="adbpair_port_not_found">Gekoppelt, aber der Port für Debugging über WLAN wurde nicht gefunden. Lass Debugging über WLAN aktiviert und versuche es erneut.</string> + <string name="adbpair_applying">Einstellung wird angewendet…</string> + <string name="adbpair_command_failed">Befehl für Debugging über WLAN fehlgeschlagen</string> + <string name="adbpair_channel_name">Einrichtung von Debugging über WLAN</string> + <string name="adbpair_channel_description">Fragt nach dem Kopplungscode für Debugging über WLAN, während die Einstellungen geöffnet sind</string> + <string name="adbpair_title_pair">Debugging über WLAN koppeln</string> + <string name="adbpair_waiting_text">Aktiviere Debugging über WLAN und tippe dann auf „Gerät mit Kopplungscode koppeln“.</string> + <string name="adbpair_waiting_long">Aktiviere Debugging über WLAN und tippe dann auf „Gerät mit Kopplungscode koppeln“. Bleib in den Einstellungen: Der Code wird in dieser Benachrichtigung eingegeben.</string> + <string name="adbpair_code_label">6-stelliger Kopplungscode</string> + <string name="adbpair_code_hint">Tippe auf „Code eingeben“ und gib die 6 Ziffern aus den Einstellungen ein.</string> + <string name="adbpair_title_code">WLAN-Kopplungscode eingeben</string> + <string name="adbpair_title_retry">Code noch einmal eingeben</string> + <string name="adbpair_enter_code">Code eingeben</string> + <string name="adbpair_title_working">Steam wird eingerichtet</string> + <string name="adbpair_title_done">Steam ist bereit</string> + <string name="adbpair_done_text">Tippe, um zu DroidDeck zurückzukehren. Du kannst Debugging über WLAN jetzt deaktivieren.</string> + <string name="adbpair_title_failed">Einrichtung von Debugging über WLAN abgebrochen</string> + + <string name="selfinst_download_failed">Download fehlgeschlagen</string> + <string name="selfinst_size_mismatch">Der Download hatte nicht die Größe der veröffentlichten APK und wurde verworfen - versuche es erneut</string> + <string name="selfinst_checksum_mismatch">Der Download stimmte nicht mit seiner Prüfsumme überein und wurde verworfen - versuche es erneut</string> + <string name="selfinst_wrong_package">Das Update ist für das Android-Paket %1$s, nicht für %2$s</string> + <string name="selfinst_metadata_signer">Die Update-Metadaten nennen nicht den Release-Signaturschlüssel von DroidDeck</string> + <string name="selfinst_unreadable">Android konnte die heruntergeladene APK nicht lesen</string> + <string name="selfinst_apk_wrong_package">Die heruntergeladene APK ist für %1$s, nicht für %2$s</string> + <string name="selfinst_version_mismatch">Die heruntergeladene APK hat versionCode %1$d statt des veröffentlichten %2$d</string> + <string name="selfinst_downgrade">Android installiert versionCode %1$d nicht über den installierten %2$d</string> + <string name="selfinst_no_signing">Die heruntergeladene APK hat keine Signaturinformationen</string> + <string name="selfinst_wrong_signer">Die heruntergeladene APK ist nicht mit dem Release-Schlüssel von DroidDeck signiert</string> + <string name="appupd_http">Der Update-Katalog antwortete mit HTTP %1$d</string> + + <string name="loadstate_starting">Sitzung wird gestartet…</string> + <string name="loadstate_elapsed">%1$d:%2$02d vergangen · läuft noch</string> + <string name="loadstate_steam_update">Update des Steam-Clients wird heruntergeladen · %1$d %%</string> + <string name="loadstate_steam_client">Steam-Client wird heruntergeladen · %1$s</string> + + <string name="pextra_busy">Es läuft bereits die Installation eines Kompatibilitätstools</string> + <string name="pextra_stop_session">Beende die aktive Sitzung, bevor du Kompatibilitätstools installierst</string> + <string name="pextra_no_release">Kein ARM64-Release für %1$s gefunden</string> + <string name="pextra_no_space">Zum Installieren von %1$s werden mindestens 4 GB freier Speicherplatz plus die Downloadgröße benötigt</string> + <string name="pextra_downloading">%1$s %2$s wird heruntergeladen</string> + <string name="pextra_retrying">Download wird wiederholt · Versuch %1$d von %2$d</string> + <string name="pextra_interrupted">Download unterbrochen</string> + <string name="pextra_download_failed">Download fehlgeschlagen; die Teildatei bleibt erhalten, damit ein neuer Versuch fortsetzen kann</string> + <string name="pextra_too_big">Der Download war größer als das Release und wurde gelöscht</string> + <string name="pextra_incomplete">Der Download war unvollständig; die Teildatei bleibt für einen fortsetzbaren neuen Versuch erhalten</string> + <string name="pextra_verifying">Download wird überprüft</string> + <string name="pextra_checksum_unreadable">Die Release-Prüfsumme konnte nicht gelesen werden; versuche es erneut</string> + <string name="pextra_no_checksum">%1$s %2$s veröffentlicht keine Prüfsumme; es wurde nichts installiert</string> + <string name="pextra_checksum_mismatch">Prüfsumme stimmt nicht überein; der Download wurde gelöscht</string> + <string name="pextra_session_started">Während des Downloads wurde eine Sitzung gestartet; beende sie, bevor du Kompatibilitätstools installierst</string> + <string name="pextra_installing">%1$s wird installiert</string> + <string name="pextra_install_failed">Installation von %1$s fehlgeschlagen (Exit-Code %2$d)</string> + <string name="pextra_could_not_install">%1$s konnte nicht installiert werden</string> + <string name="esync_fetching">droiddeck-esync-Paket wird abgerufen</string> + + <string name="cmgr_fex_linux_helpers">mit Linux-Helfern</string> + <string name="cmgr_fex_dlls_only">nur DLLs</string> + <string name="cmgr_original_proton_updated">Original (Proton seit dem letzten Austausch aktualisiert)</string> + <string name="cmgr_changed_outside">Außerhalb von Komponenten geändert</string> + <string name="cmgr_not_present">nicht vorhanden</string> + <string name="cmgr_original_version">Original %1$s</string> + <string name="cmgr_original_from">Original aus %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s kommt in %3$s, sobald das darauf laufende Spiel beendet wird.</string> + <string name="cmgr_swap_done">%1$s %2$s ist jetzt in %3$s. Es gilt ab dem nächsten Spielstart.</string> + <string name="cmgr_original_missing">Dieses Original-Bundle ist nicht gespeichert</string> + <string name="cmgr_restore_queued">%1$s von %2$s wird auf das Original zurückgesetzt, sobald das darauf laufende Spiel beendet wird.</string> + <string name="cmgr_restore_done">%1$s von %2$s aus dem Original von %3$s wiederhergestellt.</string> + <string name="cmgr_package_in_use">%1$s wird in %2$s verwendet. Wechsle in diesem Proton zuerst zu etwas anderem.</string> + <string name="cmgr_package_not_stored">%1$s ist nicht gespeichert</string> + <string name="cmgr_deleted">%1$s gelöscht.</string> + <string name="cmgr_original_kept">Das Original des installierten Builds bleibt erhalten: Es ist der Weg zurück.</string> + <string name="cmgr_not_stored">Nicht gespeichert</string> + <string name="cmgr_deleted_original">Das %1$s-Original von %2$s wurde gelöscht.</string> + <string name="cmgr_nightlies_only">Downloads kommen nur aus den Nightlies-Releases</string> + <string name="cmgr_list_predates_checksums">Diese Paketliste stammt aus der Zeit vor Prüfsummen - aktualisiere sie und versuche es erneut</string> + <string name="cmgr_checksum_mismatch">Prüfsumme stimmt nicht überein</string> + + <string name="sprefs_upscaler_linear">Linear</string> + <string name="sprefs_upscaler_nearest">Nächster Nachbar</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (Qualität)</string> + <string name="sprefs_upscaler_sharpen">Nur schärfen</string> + <string name="sprefs_lod_bias_auto">Auto (an Skalierung anpassen)</string> + + <string name="look_off_desc">Nichts angewendet.</string> + <string name="look_game_clarity">Spielklarheit</string> + <string name="look_game_clarity_desc">Schärfung mit etwas Kontrast - für jeden Tag.</string> + <string name="look_vivid">Lebendig</string> + <string name="look_vivid_desc">Farben kräftig verstärkt. Debanding an, damit der Himmel keine Streifen zeigt.</string> + <string name="look_cinematic">Kino</string> + <string name="look_cinematic_desc">Tieferer Kontrast, kühlere Farben, geglättete Kanten.</string> + <string name="look_competitive">Wettkampf</string> + <string name="look_competitive_desc">Aufgehellte Schatten und starke Schärfung - Gegner zuerst entdecken.</string> + <string name="look_adaptive_sharpen">Adaptive Schärfe</string> + <string name="look_adaptive_sharpen_desc">Nur Schärfung, Farben unverändert.</string> + <string name="look_filmic">Filmisch</string> + <string name="look_filmic_desc">Filmähnliche Kurve, leicht gedämpft.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Laut und knackig.</string> + <string name="look_retro_crt">Retro-Röhre</string> + <string name="look_retro_crt_desc">Röhrenbildschirm und analoges Signal zusammen.</string> + <string name="look_upscale_sharp">Scharf hochskaliert</string> + <string name="look_upscale_sharp_desc">Für Auflösungen unterhalb der Panel-Auflösung.</string> + <string name="look_pixel_clean">Saubere Pixel</string> + <string name="look_pixel_clean_desc">Scharfe Pixel für 2D und alte Titel.</string> + <string name="look_anime_edge">Anime-Kanten</string> + <string name="look_anime_edge_desc">Cartoon-Konturen plus Schärfung.</string> + + <string name="gpuinfo_not_adreno">Keine Adreno-GPU</string> + <string name="gpuinfo_supported">Unterstützt</string> + <string name="gpuinfo_experimental">Experimentell: Die Treiber sind Test-Builds</string> + <string name="gpuinfo_below_tested">Unter der getesteten Hardware (Adreno 725 und neuer): läuft eventuell nicht</string> + <string name="gpuinfo_unsupported">Nicht unterstützt: DroidDeck braucht eine Adreno-GPU (Snapdragon)</string> + + <string name="turnip_rate_limited">Das Rate-Limit von GitHub wurde erreicht - versuche es später erneut</string> + <string name="turnip_github_http">GitHub antwortete mit HTTP %1$d</string> + <string name="turnip_download_failed">Download fehlgeschlagen</string> + <string name="turnip_list_predates_checksums">Diese Treiberliste stammt aus der Zeit vor Prüfsummen - aktualisiere sie und versuche es erneut</string> + <string name="turnip_checksum_mismatch">Prüfsumme stimmt nicht überein - der Download wurde verworfen</string> + <string name="turnip_not_adrenotools">Kein AdrenoTools-Treiber: %1$s</string> + <string name="turnip_reject_no_meta">keine meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json ist nicht lesbar (%1$s)</string> + <string name="turnip_reject_linux_driver">dies ist ein Laufzeittreiber für Linux (importiere ihn unter „Linux-Laufzeittreiber“)</string> + <string name="turnip_reject_wayland">dies ist ein Wayland-Spieltreiber, mit dem diese App nichts anfangen kann</string> + <string name="turnip_reject_no_library_name">meta.json nennt keinen libraryName, daher konnte nichts an AdrenoTools übergeben werden</string> + <string name="turnip_reject_library_missing">meta.json nennt %1$s, das nicht in der ZIP enthalten ist</string> + <string name="turnip_reject_not_aarch64">%1$s ist keine gemeinsam genutzte 64-Bit-AArch64-ELF-Bibliothek</string> + <string name="turnip_reject_glibc">%1$s linkt glibc - ein „-Linux“-Turnip, der unter „Linux-Laufzeittreiber“ gehört</string> + <string name="lvd_no_library">Keine libvulkan_freedreno*.so in dieser ZIP. Eine Android- (AdrenoTools) oder -Wayland-Turnip-ZIP ist kein Linux-Laufzeittreiber.</string> + <string name="lvd_not_aarch64">%1$s ist keine gemeinsam genutzte 64-Bit-AArch64-ELF-Bibliothek.</string> + <string name="lvd_not_glibc">%1$s ist kein glibc-Treiber - er linkt die libc von Android. Die Linux-Laufzeit braucht eine „-Linux“-ZIP; ein einfacher oder „-Wayland“-Turnip kann vom Steam-Client gar nicht geladen werden.</string> + <string name="bundle_no_manifest">Kein Treiber-Bundle: keine manifest.json, die einen Android- und einen Linux-Treiber nennt</string> + <string name="bundle_entry_outside">Kein Treiber-Bundle: %1$s zeigt nach außerhalb</string> + <string name="bundle_too_large">Kein Treiber-Bundle: entpackt mehr als %1$d MB</string> + + <string name="gstore_sd_card">SD-Karte</string> + <string name="gstore_folder">Ordner</string> + + <string name="logshare_chooser">Sitzungsprotokolle teilen</string> + + <string name="hdr_needs_android_10">erfordert Android 10 oder neuer (Anzeigeebenen mit Farbraum)</string> + <string name="hdr_none">dieses Display meldet keine HDR-Unterstützung</string> + <string name="hdr_not_hdr10">dieses Display unterstützt %1$s, aber nicht HDR10</string> + + <string name="gpu_this_gpu">diese GPU</string> + <string name="phantom_title_on">Limit für untergeordnete Prozesse ist aktiv</string> + <string name="phantom_title_unset">Limit für untergeordnete Prozesse ist nicht festgelegt</string> + <string name="phantom_title_unreadable">Limit für untergeordnete Prozesse konnte nicht geprüft werden</string> + <string name="phantom_title_off">Limit für untergeordnete Prozesse ist aus</string> + <string name="phantom_title_not_required">Limit für untergeordnete Prozesse nicht erforderlich</string> + <string name="phantom_instructions_fix">%1$s Falls das nicht möglich ist, verbinde dieses Gerät per ADB mit einem Computer und führe den Befehl unten aus. Kehre dann hierher zurück und prüfe erneut.</string> + <string name="phantom_instructions_off">Steam-Sitzungen können starten.</string> + <string name="phantom_instructions_not_applicable">Diese Android-Version nutzt dieses Limit nicht.</string> + <string name="phantom_fix_toggle">Aktiviere „Beschränkungen für Unterprozesse deaktivieren“ in den Entwickleroptionen und lass die Entwickleroptionen danach aktiviert.</string> + <string name="phantom_fix_no_toggle">Diese Android-Version hat dafür keinen Schalter. Nutze Debugging über WLAN, um es auf diesem Gerät zu ändern.</string> + <string name="upd_block_no_apk">Dieser Build hat keinen Download für diese DroidDeck-Installation.</string> + <string name="upd_block_version_code">Android installiert ihn nicht über diesen Build, weil sein versionCode %1$d unter dem installierten %2$d liegt.</string> + <string name="upd_fail_downgrade">Android installiert keine ältere Version über eine neuere. Bleib bei diesem Build, bis der Kanal aufholt.</string> + <string name="upd_fail_signature">Diese DroidDeck-Installation ist anders signiert (ein lokaler Build?), daher kann Android sie nicht direkt aktualisieren.</string> + <string name="upd_fail_storage">Für das Update ist nicht genug freier Speicherplatz vorhanden.</string> + <string name="upd_fail_aborted">Das Update wurde abgebrochen.</string> + <string name="upd_fail_with_message">Das Update wurde nicht installiert: %1$s</string> + <string name="upd_fail_generic">Das Update wurde nicht installiert.</string> + <string name="saves_layout_zip">%1$s-ZIP</string> + <string name="saves_zip">ZIP</string> + <string name="saves_not_launched">%1$s wurde noch nicht gestartet</string> + <string name="saves_none_found">Keine Spielstände für %1$s gefunden</string> + <string name="saves_not_save_zip">%1$s hat keinen drive_c-Ordner und ist daher keine GameHub- oder Winlator-Spielstand-ZIP</string> + <string name="gstore_cannot_create">in %1$s können keine Ordner erstellt werden</string> + <string name="gstore_cannot_write">in %1$s kann nicht geschrieben werden</string> + <string name="gstore_cannot_write_detail">in %1$s kann nicht geschrieben werden (%2$s)</string> + <string name="gfiles_folder_unavailable">Ordner ist nicht verfügbar</string> + <string name="gfiles_name_taken">Eine andere Datei verwendet bereits %1$s</string> + <string name="gfiles_art_unavailable">Grafikordner ist nicht verfügbar</string> + <string name="gfiles_unrelated_inventory">Der Ordner enthält ein fremdes Sync-Inventar</string> + <string name="gfiles_remove_failed">%1$s konnte nicht entfernt werden</string> + <string name="gfiles_outside_folder">Datei liegt außerhalb des Exportordners</string> + <string name="cmgr_fex_unnamed">FEX (Build ohne Versionsnamen)</string> + <string name="cmgr_no_profile">keine profile.json in %1$s</string> + <string name="cmgr_not_component_package">%1$s ist kein Linux-Komponentenpaket (Typ %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s frei</string> + <string name="mode_storage_auto_short">Automatisch</string> + <string name="appupd_catalog_rejected">Der Update-Katalog hat seine Prüfungen nicht bestanden (%1$s)</string> + <string name="main_adb_clip_label">DroidDeck-Einstellung für untergeordnete Prozesse</string> + <string name="setup_signed_in_offline_unnamed">Angemeldet · Offlinemodus</string> + <string name="setup_signed_in_unnamed">Angemeldet</string> + <string name="driver_tag_bundled">MITGELIEFERT</string> + <string name="driver_tag_downloaded">HERUNTERGELADEN</string> + <string name="driver_tag_imported">IMPORTIERT</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Sitzungsanzeige</string> + <string name="display_resolution">Auflösung</string> + <string name="display_game_fit">16:9-Spielanpassung</string> + <string name="display_game_fit_hint">Wie 16:9-Spiele auf dieses Display passen. Ab der nächsten Sitzung.</string> + <string name="display_game_fit_unavailable">Wähle „An Bildschirm anpassen“ oder eine eigene Größe schmaler als 16:9.</string> + <string name="display_preserve">Seitenverhältnis beibehalten</string> + <string name="display_stretch">Auf Display strecken</string> + <string name="display_image_scaling">Bildskalierung</string> + <string name="display_filter">Skalierungsfilter</string> + <string name="display_filter_hint">Gemeinsam für Steam und Desktop.</string> + <string name="display_filter_live">Wirkt sofort. Gemeinsam für Steam und Desktop.</string> + <string name="display_filter_note">FSR, GSR und NIS wirken beim Vergrößern des Sitzungsbilds. „Nur schärfen“ funktioniert auch ohne Vergrößerung.</string> + <string name="display_sharpness">Filterschärfe</string> + <string name="display_frame_rate">Bildrate</string> + <string name="display_look_filter">%1$s Stellt die Skalierung auf %2$s.</string> + <string name="display_match_screen">An Bildschirm anpassen (%1$d×%2$d)</string> + <string name="display_follow_screen">Bildschirm folgen (passt sich beim Auf- und Zuklappen an)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Gerätedetails anzeigen</string> + <string name="device_info_hide">Gerätedetails ausblenden</string> + <string name="device_info_loading">Gerät wird ausgelesen…</string> + <string name="device_info_copy">Kopieren</string> + <string name="device_info_copy_hint">Kopiere diese Details in einen Fehlerbericht.</string> + <string name="device_info_copied">Kopiert.</string> + <string name="force_ssbs_title">SSBS erzwingen</string> + <string name="force_ssbs_hint">Hält eine CPU-Geschwindigkeitseinstellung aktiv, die Wine immer wieder abschaltet. Kann Windows-Spiele auf dem Snapdragon 8 Elite beschleunigen; auf älteren Chips kaum Unterschied. Gilt ab dem nächsten Spielstart.</string> + + <string name="rail_stores">Stores</string> + <string name="source_steam">Steam</string> + <string name="source_added">Eigene</string> + <string name="setup_stores">Stores</string> + <string name="setup_stores_open_on">Store öffnen auf</string> + <string name="setup_stores_speed">Download-Tempo</string> + <string name="setup_stores_engine">Store-Engine</string> + <string name="setup_stores_engine_chip_ready">● Engine bereit</string> + <string name="setup_stores_engine_chip_missing">Nicht gebaut</string> + <string name="stores_tier_balanced">Ausgewogen</string> + <string name="stores_tier_fast">Schnell</string> + <string name="stores_tier_max">Max.</string> + <string name="stores_title">Stores</string> + <string name="stores_settings">Store-Einstellungen</string> + <string name="stores_settings_eyebrow">Einstellungen</string> + <string name="stores_chip_signed_out">(nicht angemeldet)</string> + <string name="stores_tab_store">Store</string> + <string name="stores_tab_installed">Installiert</string> + <string name="stores_tab_library">Bibliothek</string> + <string name="stores_tab_all">Alle</string> + <string name="stores_tab_downloads">Downloads</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Anmelden</string> + <string name="stores_signout_named">%1$s · abmelden</string> + <string name="stores_signout_title">Von %1$s abmelden?</string> + <string name="stores_signout_note">Installierte Spiele bleiben erhalten. Die Bibliothek wird bei der nächsten Anmeldung erneut abgerufen.</string> + <string name="stores_signout_stay">Angemeldet bleiben</string> + <string name="stores_signout_go">Abmelden</string> + <string name="stores_search_catalog">Katalog von %1$s durchsuchen…</string> + <string name="stores_search_installed">Installierte Spiele durchsuchen…</string> + <string name="stores_search_library">Deine Bibliothek durchsuchen…</string> + <string name="stores_search_open">Suchen</string> + <string name="stores_installed_empty">Nichts installiert</string> + <string name="stores_library_loading">Wird geladen</string> + <string name="stores_nothing_matches">Keine Spiele</string> + <string name="stores_shelves_loading">Store wird geladen…</string> + <string name="stores_amazon_no_catalog">Kein Katalog</string> + <string name="stores_shelf_new">Neuheiten</string> + <string name="stores_shelf_deals">Angebote</string> + <string name="stores_shelf_free">Kostenlose Spiele</string> + <string name="stores_shelf_trending">Im Trend</string> + <string name="stores_shelf_library">Deine Bibliothek</string> + <string name="stores_play">Spielen</string> + <string name="stores_install">Installieren</string> + <string name="stores_resume_install">Installation fortsetzen</string> + <string name="stores_dl_interrupted">Unterbrochen</string> + <string name="stores_install_size">Installieren · %1$s</string> + <string name="stores_get_free">Kostenlos erhalten</string> + <string name="stores_view_on">Auf %1$s ansehen</string> + <string name="stores_buy_price">Kaufen · %1$s</string> + <string name="stores_installed_chip">Installiert</string> + <string name="stores_in_library">In der Bibliothek</string> + <string name="stores_free">Kostenlos</string> + <string name="stores_resume">Fortsetzen</string> + <string name="stores_refresh">Aktualisieren</string> + <string name="stores_sort">Sortieren</string> + <string name="stores_sort_last_played">Zuletzt gespielt</string> + <string name="stores_sort_recently_installed">Zuletzt installiert</string> + <string name="stores_sort_title_asc">Titel A–Z</string> + <string name="stores_sort_title_desc">Titel Z–A</string> + <string name="stores_sort_size_desc">Größe: größte</string> + <string name="stores_sort_size_asc">Größe: kleinste</string> + <string name="stores_sort_release_date">Erscheinungsdatum</string> + <string name="stores_view_list">Listenansicht</string> + <string name="stores_view_cards">Kartenansicht</string> + <string name="stores_show_mature">Inhalte für Erwachsene anzeigen</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Aus</string> + <string name="epic_eos">Epic-Anmeldung (EOS)</string> + <string name="epic_offline">Offline starten</string> + <string name="epic_resolve">Epic-Anmeldung klären</string> + <string name="epic_client_version">Version %1$s</string> + <string name="epic_client_no_runtime">Installiere zuerst die Linux-Laufzeit</string> + <string name="epic_client_checking">Neueste Version wird geprüft…</string> + <string name="epic_client_unpacking">Wird entpackt…</string> + <string name="epic_client_unreachable">Der Download-Server hat nicht geantwortet</string> + <string name="epic_client_needs_fex">Der Epic Games Launcher braucht FEX, das Steam herunterlädt. Öffne den Launcher erneut, sobald Steam gestartet ist.</string> + <string name="epic_client_download_failed">Download fehlgeschlagen: %1$s</string> + <string name="epic_client_unpack_failed">Der Launcher konnte nicht entpackt werden: %1$s</string> + <string name="epic_client_sign_in_failed">Der Epic Games Launcher hat die Anmeldung nicht akzeptiert. Starte ihn über den Launcher erneut.</string> + <string name="epic_client_uninstall_body">Entfernt den Launcher und gibt seinen Speicher frei. Deine Epic-Spiele bleiben installiert und funktionieren weiter, und die Anmeldung bleibt für eine erneute Installation erhalten.</string> + <string name="epic_client_uninstall_stops">Die laufende Sitzung wird zuerst beendet.</string> + <string name="epic_client_uninstalled">Epic Games Launcher deinstalliert</string> + <string name="epic_client_uninstall_failed">Einige Launcher-Dateien konnten nicht entfernt werden. Versuche es erneut.</string> + <string name="epic_client_uninstalling">Warte, bis der Epic Games Launcher deinstalliert ist</string> + <string name="store_cloud_saves">Cloud-Spielstände</string> + <string name="cloud_upload">In die Cloud hochladen</string> + <string name="cloud_download">Aus der Cloud herunterladen</string> + <string name="cloud_none">Keine Cloud-Spielstände</string> + <string name="cloud_conflict">Cloud-Konflikt</string> + <string name="cloud_conflict_files">Cloud-Konflikt · %1$d Dateien</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Cloud behalten</string> + <string name="cloud_keep_local">Lokal behalten</string> + <string name="cloud_checking">Cloud wird geprüft…</string> + <string name="cloud_last_sync">Zuletzt synchronisiert %1$s</string> + <string name="cloud_never">Noch nicht synchronisiert</string> + <string name="cloud_done">%1$d Dateien</string> + <string name="stores_eyebrow_installed">installiert</string> + <string name="stores_eyebrow_library">in deiner Bibliothek</string> + <string name="stores_eyebrow_store">Store</string> + <string name="achievements_title">Erfolge</string> + <string name="achievements_count">%1$d von %2$d freigeschaltet</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Freigeschaltet · %1$d</string> + <string name="achievements_group_locked">Gesperrt · %1$d</string> + <string name="achievements_group_hidden">Verborgen · %1$d</string> + <string name="achievements_hidden">Verborgener Erfolg</string> + <string name="achievements_hidden_detail">Details werden angezeigt, sobald er freigeschaltet ist.</string> + <string name="achievements_all">Alle Erfolge freigeschaltet</string> + <string name="achievements_reading">Wird geladen…</string> + <string name="achievements_signed_out">Melde dich bei %1$s an, um deine Erfolge zu sehen.</string> + <string name="achievements_unreachable">%1$s konnte nicht erreicht werden. Schau später noch einmal vorbei, wenn du online bist.</string> + <string name="achievements_none">%1$s listet keine Erfolge für dieses Spiel.</string> + <string name="achievements_show_all">Alle %1$d anzeigen</string> + <string name="achievements_dialog_title">Erfolge · %1$s</string> + <string name="stores_in_steam">✓ In Steam</string> + <string name="stores_uninstall">Deinstallieren</string> + <string name="stores_uninstalling">Wird deinstalliert…</string> + <string name="stores_uninstall_title">%1$s deinstallieren?</string> + <string name="stores_uninstall_body_size">Gibt %1$s frei und entfernt das Spiel aus Steam.</string> + <string name="stores_uninstall_body">Entfernt seine Dateien und seine Steam-Verknüpfung.</string> + <string name="stores_launch_not_registered">Steam übernimmt das Spiel beim nächsten Start; starte es von dort oder starte Steam jetzt.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Von Steam pro Spiel gewählt</string> + <string name="stores_card_audio">Audio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Komponenten</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Engine</string> + <string name="stores_card_engine_value">%1$s · nativ</string> + <string name="stores_card_engine_java">%1$s · integriert</string> + <string name="stores_how_it_runs">So läuft es</string> + <string name="stores_kv_fetched">Abgerufen von</string> + <string name="stores_kv_fetched_value">%1$s, mit deinem Konto</string> + <string name="stores_kv_installed_to">Installiert in</string> + <string name="stores_kv_installed_to_value">Spielspeicher (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Gestartet über</string> + <string name="stores_kv_launched_by_value">Steam und Proton, derselbe Weg wie bei Steam-Spielen</string> + <string name="stores_kv_launched_by_epic">Steam und Proton · Epic-Anmeldung bei jedem Start, EOS-Overlay aus</string> + <string name="stores_kv_launched_by_amazon">Steam und Proton · Variablen für Amazon Games Services gesetzt</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">bei der Installation zu Steam hinzugefügt (Deck-UI + Steam Input)</string> + <string name="stores_downloads_empty">Keine Downloads</string> + <string name="stores_dl_paused">Pausiert</string> + <string name="stores_dl_queued">In Warteschlange</string> + <string name="stores_dl_queued_at">In Warteschlange · #%1$d</string> + <string name="stores_dl_cancelled">Abgebrochen</string> + <string name="stores_dl_failed">Fehlgeschlagen</string> + <string name="stores_dl_failed_reason">Fehlgeschlagen · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d %%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d %%</string> + <string name="stores_dl_pause">Pausieren</string> + <string name="stores_dl_resume">Fortsetzen</string> + <string name="stores_dl_cancel">Abbrechen</string> + <string name="stores_dl_retry">Wiederholen</string> + <string name="stores_dl_clear">Entfernen</string> + <string name="stores_dl_clear_all">Abgeschlossene entfernen</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Download</string> + <string name="stores_stage_verify">Prüfen</string> + <string name="stores_stage_install">Installation</string> + <string name="stores_stage_done">Fertig</string> + <string name="stores_stage_checking">Wird geprüft</string> + <string name="stores_stage_downloading">Wird heruntergeladen</string> + <string name="stores_dl_cancel_confirm">Download löschen?</string> + <string name="stores_dl_failed_kept">Fehlgeschlagen · %1$s behalten</string> + <string name="stores_stage_verifying">Wird überprüft</string> + <string name="stores_stage_installing">Wird installiert</string> + <string name="stores_dl_active_percent">%1$s %2$d %%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d Dateien</string> + <string name="stores_download_manager">Download-Manager</string> + <string name="stores_parallel">Gleichzeitige Downloads</string> + <string name="stores_install_where">Installieren in</string> + <string name="stores_install_title">%1$s installieren:</string> + <string name="stores_target_internal">Intern</string> + <string name="stores_target_free">%1$s frei</string> + <string name="stores_notification_channel">Store-Downloads</string> + <string name="stores_notification_channel_hint">Zeigt den Fortschritt von Spiel-Downloads und lässt Downloads im Hintergrund weiterlaufen</string> + <string name="stores_notification_one">Wird heruntergeladen</string> + <string name="stores_notification_many">%1$d Downloads</string> + <string name="stores_notification_waiting">Wird vorbereitet…</string> + <string name="stores_notification_done_channel">Abgeschlossene Store-Downloads</string> + <string name="stores_notification_installed">%1$s installiert</string> + <string name="stores_notification_failed">Download von %1$s fehlgeschlagen</string> + <string name="stores_notification_delete">Löschen</string> + <string name="stores_notification_keep">Behalten</string> + <string name="stores_login_title">Bei %1$s anmelden</string> + <string name="stores_login_provider_title">Mit deinem Anbieter anmelden</string> + <string name="stores_login_reload">Neu laden</string> + <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_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> + <string name="stores_login_error_ssl">Die Verbindung zur Anmeldeseite ist nicht sicher.</string> + <string name="stores_login_error_verification">Die Anmeldung konnte nicht bestätigt werden. Versuche es erneut.</string> + <string name="stores_login_error_generic">Anmeldung fehlgeschlagen. Versuche es erneut.</string> + <string name="common_close">Schließen</string> + <string name="common_back">Zurück</string> + <string name="common_edit">Bearbeiten</string> + <string name="games_add_all">Alle Spiele in diesem Ordner hinzufügen</string> + <string name="games_added_none">Nichts Neues in diesem Ordner</string> + <string name="edit_name">Name</string> + <string name="edit_target">Ziel</string> + <string name="edit_start_in">Ausführen in</string> + <string name="edit_launch_options">Startoptionen</string> + <string name="edit_artwork">Grafiken</string> + <string name="edit_other_exe">Andere EXE…</string> + <string name="edit_remove">Entfernen</string> + <string name="art_cover">Cover</string> + <string name="art_wide_cover">Breites Cover</string> + <string name="art_adjust_logo">Logo anpassen</string> + <string name="logo_pos_default">Standard</string> + <string name="logo_pos_upper_left">Oben links</string> + <string name="logo_pos_upper_center">Oben mittig</string> + <string name="logo_pos_center">Mitte</string> + <string name="logo_pos_bottom_left">Unten links</string> + <string name="logo_pos_bottom_center">Unten mittig</string> + <string name="logo_pos_position">Position</string> + <string name="logo_pos_size">Größe</string> + <string name="logo_pos_save">Speichern</string> + <string name="logo_pos_reset">Auf Standard zurücksetzen</string> + <string name="logo_pos_hint">Wird wie bei Steam über dem Spielehintergrund gezeichnet. Die Position kann um einige Pixel abweichen.</string> + <string name="logo_pos_no_logo">Für dieses Spiel gibt es noch kein Logo. Wähle unter Logo eines aus, um es hier zu sehen.</string> + <string name="logo_pos_failed">Die Logoposition ließ sich nicht speichern. Versuche es erneut.</string> + <string name="art_background">Hintergrund</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Symbol</string> + <string name="art_src_folder">Spielordner</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Deine Datei</string> + <string name="art_src_exe">Aus der EXE</string> + <string name="art_src_auto">Automatisch</string> + <string name="art_pick_image">Bild auswählen…</string> + <string name="art_pick_title">Bild auswählen: %1$s</string> + <string name="art_reset">Auf automatisch zurücksetzen</string> + <string name="art_search_sgdb">SteamGridDB durchsuchen…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Spiel suchen</string> + <string name="art_sgdb_other_games">Weitere Treffer</string> + <string name="art_sgdb_none">Nichts gefunden.</string> + <string name="art_sgdb_no_key">SteamGridDB braucht einen API-Schlüssel. Füge ihn unter Einstellungen › Launcher hinzu.</string> + <string name="art_sgdb_bad_key">SteamGridDB hat den API-Schlüssel nicht akzeptiert. Prüfe ihn unter Einstellungen › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB begrenzt gerade die Anfragen. Versuche es später erneut.</string> + <string name="art_sgdb_offline">Keine Verbindung zu SteamGridDB. Prüfe die Netzwerkverbindung.</string> + <string name="art_sgdb_server">Bei SteamGridDB ist ein Problem aufgetreten. Versuche es später erneut.</string> + <string name="art_sgdb_no_game">SteamGridDB hat keinen Treffer für dieses Spiel. Versuche es mit der Suche.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d Spiel hinzugefügt</item> + <item quantity="other">%1$d Spiele hinzugefügt</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d bereits unter „Spiele“</item> + <item quantity="other">%1$d bereits unter „Spiele“</item> + </plurals> + <string name="hop_back">B · Zurück: %1$s</string> + <string name="hop_from_games">Spiel</string> + <string name="hop_from_play">Spieleinstellungen</string> + <string name="sheet_graphics_drivers">Grafiktreiber</string> + <string name="comp_this_proton">Dieses Proton</string> + <string name="comp_every_proton">Jedes Proton</string> + <string name="comp_for_every_proton">Für jedes Proton</string> + <string name="comp_available_count">Verfügbar · %1$d</string> + <string name="comp_checked">Geprüft %1$s</string> + <string name="comp_check_all">Nach neuen Komponenten und Treibern suchen</string> + <string name="comp_get">Holen</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton und FEX unten gehören zu diesem Proton</string> + <string name="comp_device_tested">%1$s · getestet</string> + <string name="comp_device_untested">%1$s · ungetestet</string> + <string name="comp_device_unsupported">%1$s · nicht unterstützt</string> + <string name="gpu_auto_keeps">Hält das empfohlene Paar aktuell</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Laufzeit- und Anzeigetreiber getrennt</string> + <string name="gpu_use_title">%1$s verwenden?</string> + <string name="gpu_mode_title">So werden Treiber gewählt</string> + <string name="gpu_mode_auto_detail">Wählt für diese GPU automatisch die beste Kombination und hält sie aktuell</string> + <string name="gpu_mode_pair">Paar</string> + <string name="gpu_mode_pair_detail">Eine Kombination wählen, die beide Treiber gemeinsam festlegt</string> + <string name="gpu_mode_mix">Frei kombinieren</string> + <string name="gpu_mode_mix_detail">Anzeigetreiber und Laufzeittreiber getrennt wählen</string> + <string name="gpu_mode_pair_short">Paar</string> + <string name="gpu_mode_mix_short">Mix</string> + <string name="gpu_src_auto">Auto</string> + <string name="gpu_src_pair">Paar</string> + <string name="gpu_src_bundle">Integriert</string> + <string name="gpu_src_chosen">Gewählt</string> + <string name="gpu_src_by_gpu">Nach GPU</string> + <string name="gpu_src_default">Standard</string> + <string name="gpu_display_live">Zeichnet</string> + <string name="gpu_display_pending">Neustart ausstehend · zuletzt von %1$s gezeichnet</string> + <string name="gpu_runtime_live">Läuft</string> + <string name="gpu_runtime_pending">Gilt ab der nächsten Sitzung · diese Sitzung nutzt %1$s</string> + <string name="gpu_display_next">Zeichnet den Bildschirm. Gilt ab der nächsten Sitzung.</string> + <string name="gpu_previous_driver">Vorheriger Treiber</string> + <string name="gpu_restart_banner">Neu starten, um den Anzeigetreiber zu wechseln.</string> + <string name="gpu_restart_blocked">Beende zuerst die laufende Sitzung und starte dann DroidDeck neu, um den Anzeigetreiber zu wechseln.</string> + <string name="gpu_restart_now">Jetzt neu starten</string> + <string name="gpu_restart_later">Später</string> + <string name="gpu_auto_title">Diese Kombination wurde automatisch für deine %1$s gewählt</string> + <string name="gpu_auto_builtin_title">Der Automatikmodus nutzt für deine %1$s den eingebauten Treiber</string> + <string name="gpu_auto_reason">Für die %1$s-Serie gewählt. Neuere Versionen werden im Hintergrund installiert.</string> + <string name="gpu_pair_title">Kombination wählen</string> + <string name="gpu_pair_hint">Eine Kombination legt Anzeigetreiber und Laufzeittreiber gemeinsam fest.</string> + <string name="gpu_mix_title">Treiber getrennt wählen</string> + <string name="gpu_mix_hint">Ein integriertes Paket füllt beides. Änderungen am Anzeigetreiber greifen nach einem Neustart, der Laufzeittreiber ab der nächsten Sitzung.</string> + <string name="gpu_change_display">Anzeigetreiber wechseln</string> + <string name="gpu_change_runtime">Laufzeittreiber wechseln</string> + <string name="gpu_autos_pick">Automatisch wählen</string> + <string name="gpu_installed">Installiert</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · gilt nach Neustart</string> + <string name="gpu_chip_restart">%1$s · Neustart ausstehend</string> + <string name="comp_this_device">Dieses Gerät</string> + <string name="proton_remove_title">%1$s entfernen?</string> + <string name="setup_tab_diagnostics">Diagnose</string> + <string name="setup_ready">Bereit zum Spielen</string> + <string name="setup_not_ready">Noch nicht bereit zum Spielen</string> + <string name="setup_ready_runtime">Laufzeit %1$s</string> + <string name="setup_ready_limit_off">Prozesslimit aus</string> + <string name="setup_ready_signed_in">angemeldet als %1$s</string> + <string name="setup_needs_you">Wenn etwas deine Aufmerksamkeit braucht</string> + <string name="setup_group_look">Aussehen</string> + <string name="setup_group_device">Dieses Gerät</string> + <string name="setup_group_art">Bibliotheksgrafiken</string> + <string name="setup_group_download">Downloads</string> + <string name="setup_download_source">Quelle</string> + <string name="setup_download_source_auto">Automatisch</string> + <string name="setup_download_source_direct">Direkt</string> + <string name="setup_download_source_mirror">Spiegel</string> + <string name="setup_download_source_custom">Eigener Präfix</string> + <string name="setup_download_mirror">Seite</string> + <string name="setup_download_prefix">Präfix</string> + <string name="flathub_eyebrow">LINUX-APPS</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Desktop-Apps für den Linux-Desktop, geöffnet über Desktop.</string> + <string name="flathub_setup">Flathub einrichten</string> + <string name="flathub_remove_title">%1$s entfernen?</string> + <string name="flathub_remove_note">Einstellungen und Dateien bleiben erhalten.</string> + <string name="flathub_keep">Behalten</string> + <string name="desktop_size">Speicherbedarf</string> + <string name="desktop_uninstall_title">Desktop deinstallieren?</string> + <string name="desktop_all_systems">Alle</string> + <string name="gog_achievements">GOG-Erfolge</string> + <string name="gog_achievements_hint">Synchronisiert Erfolge für unterstützte GOG-Spiele. Gilt ab dem nächsten Start.</string> + <string name="gog_achievements_off">Erfolge aus</string> + <string name="gog_achievements_on">Erfolge aktiviert</string> + <string name="gog_achievements_signin">Melde dich erneut bei GOG an</string> + <string name="gog_achievements_uploaded">Erfolge hochgeladen</string> + <string name="gog_achievements_pending">Hochladen des Erfolgs ausstehend</string> + <string name="gog_achievements_enable_store">Aktiviere GOG-Erfolge in den Store-Einstellungen</string> + <string name="gog_achievements_unavailable">Erfolge nicht verfügbar; Sitzungsprotokolle prüfen</string> + <string name="achievement_unlocked">Erfolg freigeschaltet</string> + <string name="touch_paste">Einfügen</string> + <string name="touch_dpad">Richtungstasten</string> + <string name="touch_left_stick">Linker Stick</string> + <string name="touch_right_stick">Rechter Stick</string> + <string name="touch_menu">Menü</string> + <string name="touch_keyboard">Tastatur</string> + <string name="touch_dpad_up">Richtungstasten hoch</string> + <string name="touch_dpad_down">Richtungstasten runter</string> + <string name="touch_dpad_left">Richtungstasten links</string> + <string name="touch_dpad_right">Richtungstasten rechts</string> + <string name="touch_title">Touch-Steuerung</string> + <string name="touch_controller">Touch-Controller</string> + <string name="touch_mouse">Maus</string> + <string name="touch_on">An</string> + <string name="touch_off">Aus</string> + <string name="touch_speed_slow">Langsam</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Schnell</string> + <string name="touch_edit_layout">Layout bearbeiten</string> + <string name="touch_droiddeck_menu">DroidDeck-Menü</string> + <string name="touch_drag_hint">Ziehe Steuerelemente auf den Bildschirm</string> + <string name="touch_arrange">Anordnen</string> + <string name="touch_discard">Verwerfen</string> + <string name="touch_saving">Wird gespeichert…</string> + <string name="touch_icon">Symbol</string> + <string name="touch_narrower">B−</string> + <string name="touch_wider">B+</string> + <string name="touch_shorter">H−</string> + <string name="touch_taller">H+</string> + <string name="touch_hide">Ausblenden</string> + <string name="touch_color_opacity">Farbe und Deckkraft…</string> + <string name="touch_copy_layout">Dieses Layout kopieren</string> + <string name="touch_layout_copied">Layout kopiert; füge es in das Touch-Layout eines beliebigen Spiels ein</string> + <string name="touch_paste_layout">Kopiertes Layout einfügen</string> + <string name="touch_reset_layout">Auf Steams Standard zurücksetzen</string> + <string name="touch_no_binding">Dieses Steuerelement hat keine Zuordnung in Steam, um ihm ein Symbol zu geben</string> + <string name="touch_icon_for">Symbol für %1$s</string> + <string name="touch_layout_color">Touch-Layout-Farbe</string> + <string name="touch_done">Fertig</string> + <string name="touch_save_failed">Das Touch-Layout konnte nicht gespeichert werden</string> + <string name="touch_saved">Touch-Layout in Steam gespeichert</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Bezeichnung (optional)</string> + <string name="touch_icons_missing">Steams Symbole wurden nicht gefunden</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d Symbol von Steam</item> + <item quantity="other">%1$d Symbole von Steam</item> + </plurals> + <string name="touch_icon_color">Symbolfarbe</string> + <string name="touch_button_color">Schaltflächenfarbe</string> + <string name="touch_no_icon">Kein Symbol</string> + + <string name="stores_sync_sign_in">Anmeldung wird geprüft…</string> + <string name="stores_sync_library">Bibliothek wird abgerufen…</string> + <string name="stores_sync_game_list">Spieleliste wird abgerufen…</string> + <string name="stores_sync_details">Spieledetails werden geladen… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">%1$d Spiel wird synchronisiert…</item> + <item quantity="other">%1$d Spiele werden synchronisiert…</item> + </plurals> + <string name="stores_sync_progress">Wird synchronisiert… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Cover werden abgerufen…</string> + <string name="stores_sync_failed">Synchronisierung fehlgeschlagen</string> + <string name="stores_sync_no_games">Keine Spiele in deiner %1$s-Bibliothek gefunden</string> + <string name="stores_sync_amazon_no_answer">Amazon Games hat für deine Bibliothek nicht geantwortet: aktualisiere die Seite oder melde dich erneut an</string> + <string name="stores_sync_gog_unreachable">GOG konnte nicht erreicht werden</string> + <string name="stores_sync_gog_unreadable">Deine GOG-Bibliothek konnte nicht gelesen werden</string> + <string name="stores_registering">Wird bei Steam registriert…</string> + <string name="mode_client_arch">Steam-Client</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC-Diagnose</string> + <string name="setup_vac_diag_hint">Source-Spiele protokollieren ihre Konsole (-condebug); vac.txt in den Sitzungslogs zeigt gesichert oder ungesichert</string> + <string name="load_starting_steam_x64">Steam x86-64 wird gestartet</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Wird vom x86-64-Steam-Client verwendet</string> + <string name="storage_uninstall_in_x64">Diese Kopie liegt im x86-64-Steam-Client. Wähle x86-64 unter Steam-Client und deinstalliere sie dann hier.</string> + <string name="storage_uninstall_in_arm64">Diese Kopie liegt im ARM64-Steam-Client. Wähle ARM64 unter Steam-Client und deinstalliere sie dann hier.</string> + <string name="drawer_page_glasses">Brille</string> + <string name="glasses_open">VITURE-Brille</string> + <string name="glasses_control">Brillensteuerung</string> + <string name="glasses_driver_missing">Dieser Build enthält keinen Treiber für diese Brille.</string> + <string name="glasses_connection_failed">Keine Verbindung zur Brille. Steck das Kabel neu ein oder tippe auf „Erlauben“, um es erneut zu versuchen.</string> + <string name="glasses_allow">Erlauben</string> + <string name="glasses_allow_hint">Erlaube DroidDeck, Bildwiederholrate, 3D-Modus, Helligkeit, Lautstärke und Sonnenschutz der Brille einzustellen und ihr Kopf-Tracking auszulesen.</string> + <string name="glasses_asking">Warte, bis du es in der Android-Abfrage erlaubst …</string> + <string name="glasses_denied">Die Steuerung wurde abgelehnt. Erlaube sie, um die Einstellungen der Brille zu ändern.</string> + <string name="glasses_no_control">Diese Brille zeigt das Spiel, aber ihre Einstellungen lassen sich hier nicht ändern.</string> + <string name="glasses_output">Ausgabe</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Spiel auf der Brille</string> + <string name="glasses_game_on_hint">Zeigt das Spiel nur auf der Brille. Aus: Das Smartphone zeigt es und Android spiegelt das Smartphone.</string> + <string name="glasses_display">Anzeige</string> + <string name="glasses_refresh">Bildwiederholrate</string> + <string name="glasses_3d">3D (Side-by-Side)</string> + <string name="glasses_3d_hint">Schalten Sie die Datenbrille auf Side-by-Side-3D um. Das Headtracking wird separat gesteuert.</string> + <string name="glasses_3d_failed">Das 3D-Signal wurde nicht bestätigt. Versuche es erneut, sobald das 2D-Bild wieder da ist.</string> + <string name="glasses_no_signal">Kein Bild: Die Brille ist in einem Modus, den dieses Smartphone nicht ausgeben kann. Halte ihre 2D/3D-Taste gedrückt oder steck sie aus und wieder ein.</string> + <string name="glasses_3d_refresh">3D-Bildwiederholrate</string> + <string name="glasses_auto3d">3D für VR-Spiele</string> + <string name="glasses_auto3d_hint">Wechselt zu 3D, solange SteamVR läuft, und danach zurück.</string> + <string name="glasses_picture">Bild</string> + <string name="glasses_picture_hint">Automatisch zeigt flache Inhalte in beiden Augen an und erkennt SteamVR. Wählen Sie „Side-by-Side-Spiel“ für SBS-Inhalte.</string> + <string name="glasses_picture_auto">Automatisch</string> + <string name="glasses_picture_screen">Virtueller Bildschirm</string> + <string name="glasses_picture_sbs">Side-by-Side-Spiel</string> + <string name="glasses_screen_size">Bildschirmbreite</string> + <string name="glasses_screen_distance">Bildschirmabstand</string> + <string name="glasses_screen_next_session">Breite und Abstand gelten, wenn ein Spiel als virtueller Bildschirm auf der Brille läuft.</string> + <string name="glasses_screen_no_output">Diese Einstellungen gelten, solange „Spiel auf der Brille“ aktiviert ist und das Spiel dort angezeigt wird.</string> + <string name="glasses_screen_flat_hint">„Automatisch“ zeigt dieses 2D-Spiel im Vollbild. Nutze einen virtuellen Bildschirm, um Breite, Abstand und Kopf-Tracking anzupassen.</string> + <string name="glasses_screen_use">Virtuellen Bildschirm nutzen</string> + <string name="glasses_screen_direct_hint">SteamVR füllt die Ansicht. Passen Sie das Sichtfeld in VR an. Breite und Abstand gelten nur für einen virtuellen Bildschirm.</string> + <string name="glasses_screen_sbs_hint">Side-by-Side-Spiele füllen jedes Auge. Breite und Abstand gelten nur für einen virtuellen Bildschirm.</string> + <string name="glasses_tracking_flat_hint">„Automatisch“ hält dieses 2D-Spiel fest im Blickfeld. Wähle unter „Anzeige“ die Option „Virtueller Bildschirm“, um Kopf-Tracking zu nutzen.</string> + <string name="glasses_tracking_sbs_hint">Kopf-Tracking gilt für einen virtuellen Bildschirm oder ein laufendes SteamVR-Spiel.</string> + <string name="glasses_hardware">Gerät</string> + <string name="glasses_brightness">Helligkeit</string> + <string name="glasses_volume">Lautstärke</string> + <string name="glasses_sunblock">Sonnenschutz</string> + <string name="glasses_sunblock_hint">Dunkelt die vorderen Gläser ab.</string> + <string name="glasses_tracking">Verfolgung</string> + <string name="glasses_head_tracking">Kopf-Tracking</string> + <string name="glasses_head_tracking_hint">Die eigenen Sensoren der Brille drehen den virtuellen Bildschirm und SteamVR mit deinem Kopf mit.</string> + <string name="glasses_recenter">Ansicht zentrieren</string> + <string name="glasses_recenter_button">Bildschirm neu zentrieren</string> + <string name="glasses_vr_fov">SteamVR-Sichtfeld</string> + <string name="glasses_vr_fov_hint">Niedriger holt SteamVR näher heran und füllt die Brille; höher zeigt mehr von deiner Umgebung.</string> + <string name="glasses_playing">Spiel läuft auf %1$s</string> + <string name="glasses_calibration">Tracking-Kalibrierung</string> + <string name="glasses_calibration_hint">Verringert Drift und richtet die waagerechte Referenz aus.</string> + <string name="glasses_calibration_saved_hint">Für diese Brille wird eine gespeicherte Kalibrierung verwendet.</string> + <string name="glasses_calibration_open">Kalibrieren</string> + <string name="glasses_calibration_instructions">Leg die verbundene Brille verkehrt herum auf eine ebene Fläche, sodass der Rahmen gleichmäßig aufliegt. Tippe auf „Starten“ und lass sie dann etwa 8 Sekunden lang unberührt liegen. Bei Bewegung beginnt die Messung neu. Dies korrigiert Drift und Neigung, nicht die Blickrichtung.</string> + <string name="glasses_calibration_settling">Lass die Brille verkehrt herum und unberührt liegen. Warten, bis sie zur Ruhe kommt …</string> + <string name="glasses_calibration_collecting">Sensoren werden gemessen. Halte die Brille ruhig.</string> + <string name="glasses_calibration_moving">Bewegung erkannt. Lass die Brille unberührt liegen; die Messung beginnt automatisch neu.</string> + <string name="glasses_calibration_turn_over">Leg die Brille verkehrt herum auf eine ebene Fläche. Die Messung beginnt, sobald sie richtig liegt.</string> + <string name="glasses_calibration_complete">Kalibrierung gespeichert. Setz die Brille auf, schau geradeaus und tippe dann auf „Fertig“, um die Ansicht zu zentrieren.</string> + <string name="glasses_calibration_failed">Die Kalibrierung konnte nicht abgeschlossen werden. Prüfe die Verbindung, halte die Brille ruhig und versuche es erneut. Deine bisherige Kalibrierung bleibt unverändert.</string> + <string name="glasses_calibration_start">Starten</string> + <string name="glasses_calibration_done">Fertig</string> + <string name="glasses_calibration_reset">Tracking-Kalibrierung zurücksetzen</string> + <string name="glasses_calibration_reset_hint">Gespeicherte Kalibrierung entfernen und die Standardwerte des Modells wiederherstellen? Zentriere die Ansicht, nachdem du die Brille wieder aufgesetzt hast.</string> + <string name="glasses_calibration_reset_button">Zurücksetzen</string> + <string name="hand_camera_group">Hand-Tracking</string> + <string name="hand_camera_prompt_title">Hände oder Joy-Con-Controller mit der Telefonkamera verfolgen?</string> + <string name="hand_camera_prompt_body">Wenn kein Controller angeschlossen ist, verfolgt die Telefonkamera Ihre bloßen Hände in VR: Drücken Sie Daumen und Zeigefinger, um zu klicken, schließen Sie Ihre Hand, um zu greifen, und drehen Sie Ihre Handfläche in Ihre Richtung und drücken Sie, um das Menü zu öffnen. Bei gekoppelten Joy-Con-Controllern verfolgt die Kamera ihre Position, während die Joy-Con-Controller Drehungen und Tasteneingaben ermöglichen. Bilder werden auf diesem Gerät verarbeitet und niemals gespeichert oder gesendet.</string> + <string name="hand_camera_rear">Rückkamera</string> + <string name="hand_camera_rear_hint">Empfohlen. Meist schärfer und weitwinkliger.</string> + <string name="hand_camera_front">Frontkamera</string> + <string name="hand_camera_front_hint">Falls die Rückseite des Geräts nicht zu dir zeigen kann.</string> + <string name="hand_camera_allow">Kamera verwenden</string> + <string name="hand_camera_not_now">Nicht jetzt</string> + <string name="hand_camera_setting">Hand-Tracking per Kamera</string> + <string name="hand_camera_setting_hint">Verwenden Sie die Smartphone-Kamera für Gesten mit bloßen Händen oder zur Positionierung gekoppelter Joy-Con-Controller in VR. Die Joy-Con-Controller ermöglichen Drehung und Tasteneingaben. Die Verfolgung wird pausiert, während die Smartbrille Ihre Hände oder Joy-Con-Controller verfolgt. Bilder werden nur auf diesem Gerät verarbeitet.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Kamerazugriff</string> + <string name="hand_camera_access_hint">Erlaube den Kamerazugriff, damit das Hand-Tracking starten kann.</string> + <string name="hand_camera_access_denied">Kamerazugriff ist deaktiviert. Aktiviere ihn in den Android-Einstellungen.</string> + <string name="hand_camera_allow_button">Erlauben</string> + <string name="hand_camera_open_settings">Einstellungen öffnen</string> + <string name="hand_camera_placement">Kameraplatzierung</string> + <string name="hand_camera_placement_hint">Prüfe, ob die Kamera dich sehen kann, bevor du spielst.</string> + <string name="hand_camera_check">Prüfen</string> + <string name="hand_camera_check_title">Kameraplatzierung</string> + <string name="hand_camera_how_rear">Stell das Gerät etwa 1,5 bis 2 Meter entfernt in Brusthöhe auf, mit der Rückkamera zu dir gerichtet. Tritt dann mit ausgestreckten Händen ins Bild.</string> + <string name="hand_camera_how_front">Stell das Gerät etwa 1,5 bis 2 Meter entfernt in Brusthöhe auf, mit dem Bildschirm zu dir gerichtet. Tritt dann mit ausgestreckten Händen ins Bild.</string> + <string name="hand_camera_starting">Kamera wird gestartet…</string> + <string name="hand_camera_stand_up">Das Gerät liegt flach. Stell es auf, damit die Kamera zu dir zeigt.</string> + <string name="hand_camera_upright">Stell das Gerät aufrechter hin, damit die Kamera zu dir zeigt.</string> + <string name="hand_camera_not_seen">Kann dich noch nicht sehen. Tritt ins Bild, sodass Kopf und Schultern zu sehen sind.</string> + <string name="hand_camera_move_back">Geh ein Stück zurück.</string> + <string name="hand_camera_move_closer">Komm etwas näher.</string> + <string name="hand_camera_show_hands">Halte beide Hände so, dass die Kamera sie sehen kann.</string> + <string name="hand_camera_good">Sieht gut aus.</string> + <string name="hand_camera_failed">Die Kamera konnte nicht gestartet werden. Schließe andere Apps, die sie nutzen, und versuche es erneut.</string> + <string name="hand_camera_switch">Kamera wechseln</string> + <string name="hand_camera_skip">Überspringen</string> + <string name="hand_camera_done">Fertig</string> + <string name="glasses_xreal_network_missing">Warte auf die USB-Ethernet-Verbindung der Brille. Dieses Smartphone stellt sie Apps möglicherweise nicht bereit.</string> + <string name="glasses_xreal_connection_failed">Die XREAL-Verbindung wurde unterbrochen oder hat eine nicht unterstützte Antwort geliefert. Neuer Versuch …</string> + <string name="glasses_xreal_experimental">Experimentelle Unterstützung für die 1S. Nutze den Follow-Modus und deaktiviere die Stabilisierung im Menü der Brille. Tracking-Richtungen und Anzeigemodi müssen noch auf Geräten getestet werden.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard-Modus</string> + <string name="cardboard_mode_hint">Bilder für linkes und rechtes Auge für eine Smartphone-VR-Brille.</string> + <string name="cardboard_source">Bild</string> + <string name="cardboard_source_screen">Virtueller Bildschirm</string> + <string name="cardboard_source_sbs">Side-by-Side-3D</string> + <string name="cardboard_viewer">Brille</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Ohne Linse</string> + <string name="cardboard_ipd">Augenabstand</string> + <string name="cardboard_screen_width">Bildschirmbreite</string> + <string name="cardboard_screen_distance">Bildschirmabstand</string> + <string name="cardboard_head_tracking">Kopf-Tracking</string> + <string name="cardboard_no_sensor">Dieses Gerät hat keinen Drehsensor.</string> + <string name="cardboard_recenter">Ansicht zentrieren</string> + <string name="cardboard_recenter_button">Zentrieren</string> + <string name="cardboard_steamvr">SteamVR (experimentell)</string> + <string name="cardboard_steamvr_install">Installieren</string> + <string name="cardboard_steamvr_installing">SteamVR wird heruntergeladen und entpackt …</string> + <string name="cardboard_steamvr_start">Starten</string> + <string name="cardboard_steamvr_stop">Beenden</string> + <string name="cardboard_steamvr_unavailable">In dieser Sitzung nicht verfügbar.</string> + <string name="cardboard_steamvr_failed">SteamVR hat nicht reagiert; Sitzungsprotokoll prüfen.</string> + <string name="drawer_component_downloads">Komponenten herunterladen</string> + <string name="drawer_component_downloads_hint">Downloads werden mit der Seite „Komponenten“ geteilt. Wähle oben eine heruntergeladene Version, um sie beim nächsten Spielstart zu verwenden.</string> + <string name="drawer_component_choose_download">Version zum Herunterladen wählen</string> + <string name="stores_fact_developer">Entwickler</string> + <string name="stores_fact_publisher">Publisher</string> + <string name="stores_fact_released">Erschienen</string> + <string name="stores_hltb_main">Hauptspiel</string> + <string name="stores_hltb_extras">+ Extras</string> + <string name="stores_hltb_completionist">Komplettierer</string> + <string name="stores_hltb_hours">%1$s Std.</string> + <string name="stores_hltb_minutes">%1$d Min.</string> + <string name="mode_zram">zRAM-Komprimierung</string> + <string name="mode_zram_hint">Während ein Spiel läuft, wird der Arbeitsspeicher des Steam-Clients in das zram des Geräts komprimiert, sodass mehr RAM für das Spiel bleibt. Wird beim nächsten Start von Steam angewendet.</string> + <string name="mode_zram_unsupported">Nicht verfügbar: Dieses Gerät hat kein zram oder keinen Swap, oder sein Kernel ist älter als 5.4.</string> + <string name="setup_reset_settings">Alle Einstellungen zurücksetzen</string> + <string name="setup_reset_settings_title">Alle Einstellungen zurücksetzen?</string> + <string name="setup_reset_settings_body">Anzeige-, Leistungs-, Controller-, Design-, Sprach- und Launcher-Einstellungen werden auf ihre Standardwerte zurückgesetzt. Deine Spiele, die Steam-Anmeldung, Shop-Konten, heruntergeladene Treiber und Speicherordner bleiben erhalten.</string> + <string name="setup_reset_settings_button">Zurücksetzen</string> + <string name="setup_reset_settings_hint">Setzt jede Einstellung auf den Standardwert zurück</string> + <string name="setup_reset_settings_partial">Die Einstellungen wurden zurückgesetzt, aber einige Teile konnten nicht zurückgesetzt werden. Details stehen in den Protokollen.</string> + <string name="setup_reset_settings_profiles">Auch Spielprofile zurücksetzen (Proton, FEX, Komponenten und Umgebung jedes Spiels sowie die Umgebung des Standardprofils)</string> + <string name="setup_reset_settings_session_running">Beende die Sitzung, bevor du die Einstellungen zurücksetzt.</string> + <string name="stores_storage_insufficient">Nicht genug freier Speicher: %1$s benötigt, nur %2$s frei</string> + <string name="stores_storage_low">Zu wenig Speicher (%1$s frei, %2$s benötigt)</string> + <string name="stores_target_free_unknown">Freier Speicher unbekannt</string> + <string name="display_picture_position">Bildposition</string> + <string name="display_position_top">Oben</string> + <string name="display_position_bottom">Unten</string> + <string name="display_position_center">Mitte (Standard)</string> + <string name="setup_tab_storage">Speicher</string> + <string name="storage_measuring">Speicher wird erfasst…</string> + <string name="storage_measuring_hint">Die erste Erfassung dauert ein paar Sekunden.</string> + <string name="storage_internal">Interner Speicher</string> + <string name="storage_used_of">%1$s von %2$s belegt</string> + <string name="storage_free">%1$s frei</string> + <string name="storage_droiddeck_uses">DroidDeck belegt %1$s. Erfassung vom %2$s.</string> + <string name="storage_rescanning">Wird neu erfasst…</string> + <string name="storage_other_apps">Andere Android-Apps</string> + <string name="storage_safe_now">Jetzt sicher freigebbar</string> + <string name="storage_safe_hint">Ungenutzte Laufzeiten, Reste, alte Logs</string> + <string name="storage_clean_up">Aufräumen…</string> + <string name="storage_session_running">Beende die Sitzung, um aufzuräumen oder zu entfernen. Die Größen werden weiterhin angezeigt.</string> + <string name="storage_where">Belegung</string> + <string name="storage_games">Steam-Spiele</string> + <string name="storage_game_data">Spieldaten</string> + <string name="storage_game_data_hint">Präfixe %1$s · Workshop %2$s · Shader %3$s</string> + <string name="storage_tools">Proton und Laufzeiten</string> + <string name="storage_tools_unused">%1$s ungenutzt</string> + <string name="storage_stores">GOG, Epic und andere Stores</string> + <string name="storage_stores_hint">Im Store deinstallieren</string> + <string name="storage_desktop">Desktop-Apps</string> + <string name="storage_desktop_hint">Flatpak-Apps und Laufzeiten</string> + <string name="storage_system">Linux-System und Steam-Client</string> + <string name="storage_system_hint">Nötig, um irgendetwas auszuführen</string> + <string name="storage_app_data">DroidDeck-Daten</string> + <string name="storage_app_data_hint">Alte Sitzungslogs %1$s · Cache · Treiber</string> + <string name="storage_legend_games">Spiele</string> + <string name="storage_legend_data">Spieldaten</string> + <string name="storage_legend_tools">Proton und Laufzeiten</string> + <string name="storage_legend_stores">Andere Stores</string> + <string name="storage_legend_desktop">Desktop-Apps</string> + <string name="storage_legend_system">Linux-System</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Aufräumen</string> + <string name="storage_clean_up_lede">Installierte Spiele und laufende Downloads bleiben unberührt.</string> + <string name="storage_nothing_to_clean">Es gibt gerade nichts aufzuräumen.</string> + <string name="storage_selected">Gewählt: %1$s · %2$s → %3$s frei</string> + <string name="storage_cleaning">Wird aufgeräumt…</string> + <string name="storage_free_button">%1$s freigeben</string> + <string name="storage_freed">%1$s freigegeben.</string> + <string name="storage_item_runtimes">Ungenutzte Steam-Laufzeiten und Proton</string> + <string name="storage_item_leftovers">Reste deinstallierter Spiele</string> + <string name="storage_item_leftovers_unsure">Reste, die Speicherstände enthalten können</string> + <string name="storage_item_logs">Alte Sitzungslogs</string> + <string name="storage_item_logs_detail">Logs der aktuellen Sitzung bleiben erhalten</string> + <string name="storage_item_custom_detail">Kein Spiel nutzt es. Installiere es zum Nutzen unter Komponenten neu.</string> + <string name="storage_item_shaders">Shader-Cache installierter Spiele</string> + <string name="storage_item_shaders_detail">Wird beim Spielen neu erzeugt. Die ersten Minuten jedes Spiels ruckeln erneut.</string> + <string name="storage_tag_safe">Sicher</string> + <string name="storage_tag_unused">Ungenutzt</string> + <string name="storage_tag_stutter">Ruckeln</string> + <string name="storage_tag_saves">Speicherstände prüfen</string> + <string name="storage_tag_default">Standard</string> + <string name="storage_tag_required">Nötig</string> + <string name="storage_tag_not_used">Ungenutzt</string> + <string name="storage_back">Speicher</string> + <string name="storage_games_with_data">%1$s mit Daten</string> + <string name="storage_sort_largest">Größte</string> + <string name="storage_sort_least_played">Am seltensten gespielt</string> + <string name="storage_sort_sd">Auf SD-Karte</string> + <string name="storage_no_games">Hier sind keine Spiele.</string> + <string name="storage_played">Gespielt %1$s</string> + <string name="storage_never_played">Nie gespielt</string> + <string name="storage_game_parts">Spiel %1$s · Daten %2$s</string> + <string name="storage_uninstall">Deinstallieren</string> + <string name="storage_games_note">Die Deinstallation öffnet den Dialog von Steam, damit Steam es mitbekommt. Um ein Spiel auf die SD-Karte zu verschieben, nutze Steam › Einstellungen › Speicher.</string> + <string name="storage_uninstall_title">%1$s deinstallieren?</string> + <string name="storage_uninstall_body">Steam öffnet sich und fragt nach. Dadurch werden %1$s des Spiels frei. Das Präfix bleibt bis zum Aufräumen der Reste, Steam-Cloud-Speicherstände bleiben im Konto.</string> + <string name="storage_open_steam">Steam öffnen</string> + <string name="storage_tools_detail">%1$s · %2$s ungenutzt</string> + <string name="storage_remove_unused">Ungenutztes entfernen · %1$s</string> + <string name="storage_in_use">In Benutzung</string> + <string name="storage_not_used">Ungenutzt</string> + <string name="storage_remove">Entfernen</string> + <string name="storage_remove_title">%1$s entfernen?</string> + <string name="storage_remove_body">Gibt %1$s frei. Braucht später ein Spiel es, lädt Steam es erneut.</string> + <string name="storage_tool_fex_runtime">Für Linux-x86-Spiele nötig (FEX)</string> + <string name="storage_tool_arm_runtime">Für ARM64-Proton nötig</string> + <string name="storage_tool_redist">VC++- und DirectX-Installationsprogramme, die Spiele anfordern</string> + <string name="storage_tool_fex">Linux-x86-Spiele ausführen</string> + <string name="storage_tool_steam">Steam-Werkzeuge</string> + <string name="storage_tool_old_runtime">DroidDeck führt Spiele ohne diese Laufzeit aus</string> + <string name="storage_tool_x86_proton">x86-Proton, das DroidDeck nicht ausführen kann</string> + <string name="storage_tool_custom_default">Standard für alle Spiele</string> + <string name="storage_tool_custom_unused">Kein Spiel nutzt es</string> + <string name="storage_tool_custom_unknown">Steam-Einstellungen nicht lesbar, bleibt daher erhalten</string> + <string name="storage_cleanup_busy">Warte, bis das Aufräumen des Speichers fertig ist</string> + <string name="storage_low_title">Nur noch %1$s frei</string> + <string name="storage_low_body">Steam braucht Platz für Updates und Shader-Cache. Unter 10 GB können Spiel-Updates mittendrin fehlschlagen.</string> + <string name="storage_low_safe">%1$s lässt sich sicher freigeben.</string> + <string name="storage_free_up">Platz schaffen</string> + <string name="storage_play_anyway">Trotzdem spielen</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d installiert</item> + <item quantity="other">%d installiert</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d auf SD-Karte</item> + <item quantity="other">%d auf SD-Karte</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d Werkzeuge</item> + <item quantity="other">%d Werkzeuge</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Leere Präfixordner und Shader-Caches von %d Spielen</item> + <item quantity="other">Leere Präfixordner und Shader-Caches von %d Spielen</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Präfixe von %d Spielen enthalten noch Dateien, darunter möglicherweise lokale Speicherstände. Sichere sie vorher, wenn du sie behalten willst.</item> + <item quantity="other">Präfixe von %d Spielen enthalten noch Dateien, darunter möglicherweise lokale Speicherstände. Sichere sie vorher, wenn du sie behalten willst.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d Spiel</item> + <item quantity="other">%d Spiele</item> + </plurals> + <string name="storage_tool_default_proton">Standard-Proton von DroidDeck</string> + <string name="storage_tool_proton">Proton-11-Option von DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Von %d Spiel genutzt</item> + <item quantity="other">Von %d Spielen genutzt</item> + </plurals> + <string name="storage_legend_components">Komponenten</string> + <string name="storage_components">Komponenten</string> + <string name="storage_item_components">Ungenutzte Komponenten</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Gibt %1$s frei. Stellt nur eine Proton-Version wieder her, die nicht mehr installiert ist.</string> + <string name="storage_leftovers_unchecked">Nicht geprüft: Ein Steam-App-Manifest war nicht lesbar, deshalb bleiben Präfixe deinstallierter Spiele erhalten, bis es lesbar ist.</string> + <string name="storage_failed">Nicht abgeschlossen: %1$s</string> + <string name="storage_desktop_shared">Gemeinsam %1$s</string> + <string name="storage_data_installed">Installierte Spiele</string> + <string name="storage_data_parts">Präfix %1$s · Shader %2$s · Workshop %3$s</string> + <string name="storage_clear_shaders">Shader löschen</string> + <string name="storage_data_leftovers">Deinstallierte Spiele</string> + <string name="storage_steam_app">Steam-App %1$d</string> + <string name="storage_leftover_unsure_detail">Das Präfix enthält noch Dateien, darunter möglicherweise lokale Speicherstände</string> + <string name="storage_leftover_confirm">Löscht Wine-Präfix und Shader-Cache (%1$s). Sichere vorher benötigte Speicherstände; Steam-Cloud-Speicherstände bleiben im Konto.</string> + <string name="storage_data_other">Behalten</string> + <string name="storage_data_other_title">Gemeinsame Präfixe von Nicht-Steam-Spielen und Steam</string> + <string name="storage_data_other_detail">Präfixe von Spielen aus Stores oder manuell hinzugefügter Spiele</string> + <string name="storage_components_packages">Geladene Pakete</string> + <string name="storage_components_originals">Gesicherte Originale</string> + <string name="storage_components_none">Keine geladenen Komponentenpakete.</string> + <string name="storage_component_in_use">Für ein Proton oder ein Spiel gewählt</string> + <string name="storage_component_unused">Nirgends gewählt</string> + <string name="storage_original_kept">Installiertes Proton wiederherstellen</string> + <string name="storage_original_old">Proton-Version, die nicht mehr installiert ist</string> + <string name="storage_tag_in_use">In Benutzung</string> + <string name="storage_components_note">Komponenten in Benutzung sind gesperrt. Wähle sie unter Komponenten; was du hier entfernst, lässt sich dort erneut laden.</string> + <string name="storage_component_confirm">Gibt %1$s frei. Selbst importierte Pakete lassen sich nicht erneut laden.</string> + <string name="storage_desktop_detail">%1$s für Flatpak-Apps und ihre gemeinsamen Inhalte</string> + <string name="storage_desktop_apps_title">Apps</string> + <string name="storage_desktop_none">Keine Flatpak-Apps installiert.</string> + <string name="storage_desktop_shared_title">Gemeinsam genutzt</string> + <string name="storage_desktop_runtimes">Laufzeiten</string> + <string name="storage_desktop_runtimes_detail">Bibliotheken, die Apps brauchen; ungenutzte räumt „Ungenutztes entfernen“ mit auf</string> + <string name="storage_desktop_cache">Download-Repository</string> + <string name="storage_desktop_cache_detail">Objekt-Repository und zwischengespeicherte Downloads von Flatpak</string> + <string name="storage_desktop_prune">Ungenutztes entfernen</string> + <string name="storage_desktop_prune_body">Entfernt Laufzeiten, die keine installierte App braucht, und räumt das Objekt-Repository von Flatpak auf. Installierte Apps laufen weiter.</string> + <string name="storage_flatpak_uninstall_body">Entfernt die App (%1$s) und Laufzeiten, die keine andere App braucht. Daten im Home-Verzeichnis bleiben erhalten.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d Paket</item> + <item quantity="other">%d Pakete</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d App</item> + <item quantity="other">%d Apps</item> + </plurals> + <string name="boot_movie">Bootvideo</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps wirkt flüssiger, braucht aber mehr CPU, während Steam startet. Ein in Steam selbst gewähltes Startvideo hat Vorrang.</string> + <string name="boot_movie_sound">Ton</string> + <string name="boot_movie_custom">Eigenes Video</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV oder WebM. Andere Formate und Dateien über %1$d MB werden auf dem Gerät in 720p-WebM umgewandelt, bis %2$d Sekunden.</string> + <string name="boot_movie_import">Importieren</string> + <string name="boot_movie_remove">Entfernen</string> + <string name="boot_movie_pick">Bootvideo auswählen</string> + <string name="boot_movie_imported">%1$s ist jetzt das Bootvideo</string> + <string name="boot_movie_imported_silent">%1$s ist jetzt das Bootvideo, ohne Ton</string> + <string name="boot_movie_too_long">Videos, die umgewandelt werden, dürfen höchstens %1$d Sekunden lang sein</string> + <string name="boot_movie_converting">Umwandeln %1$d %%</string> + <string name="boot_movie_converting_started">%1$s wird für Steam umgewandelt. DroidDeck geöffnet lassen.</string> + <string name="boot_movie_unsupported">Dieses Gerät kann das Video nicht dekodieren.</string> + <string name="boot_movie_import_failed">Das Video konnte nicht importiert werden</string> + <string name="glasses_experimental">Luma Ultra-Kameras – Experimentell</string> + <string name="glasses_joycons">Joy-Con-Positionsverfolgung</string> + <string name="glasses_joycons_hint">Positionieren Sie Ihre gekoppelten Joy-Con-Controller mithilfe der Kameras Ihrer Smartbrille. Drehung und Tasteneingaben erfolgen über die Joy-Con-Controller. Die Position wird geschätzt, wenn Ihre Handgelenke verdeckt sind. Ersetzt Controller, die mit bloßen Händen bedient werden, und pausiert die Verfolgung per Smartphone-Kamera. Richten Sie die Joy-Con-Controller nach vorn, wenn Sie die Verbindung herstellen oder das Tracking-Center zurücksetzen.</string> + <string name="glasses_joycons_requires_position">Aktivieren Sie zuerst die Positionsverfolgung. Erfordert bewegungsfähige Joy-Con-Controller auf Android 12 oder höher. Standardmäßig deaktiviert.</string> + <string name="setup_tab_glasses">Intelligente Brille</string> + <string name="setup_glasses_scope">Anzeige- und Head-Tracking-Einstellungen werden in allen DroidDeck-Menüs, Spielen und Desktop-Sitzungen gemeinsam genutzt.</string> + <string name="setup_glasses_connect">Schließen Sie Datenbrillen an, um deren Anzeige- und Tracking-Einstellungen zu ändern. Ihre gespeicherten Einstellungen bleiben erhalten, wenn Sie die Verbindung trennen.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Anzeigemodus</string> + <string name="glasses_output_2d">2D-Ausgabe</string> + <string name="glasses_output_3d">3D-Ausgabe</string> + <string name="glasses_picture_group">Bild und virtueller Bildschirm</string> + <string name="glasses_position_group">Position und Bodenhöhe</string> + <string name="glasses_hands_group">Verfolgung von Händen – Experimentell</string> + <string name="glasses_tracking_status">Tracking-Status</string> + <string name="glasses_resolution_2d">2D-Auflösung</string> + <string name="glasses_resolution_3d">3D-Auflösung</string> + <string name="glasses_resolution_vr">VR-Auflösung</string> + <string name="glasses_resolution_auto">Automatisch</string> + <string name="glasses_resolution_inherit">Identisch mit 2D/3D</string> + <string name="glasses_resolution_hint">Ausgabeauflösung pro Auge.</string> + <string name="glasses_refresh_30_hint">Aktivieren Sie „Spiel auf Smart Glasses“, um den nativen 30-Hz-Modus des Displays auszuwählen.</string> + <string name="glasses_3dof">Virtueller 3DoF-Bildschirm</string> + <string name="glasses_3dof_hint">Verankern Sie flache Spiele vor sich, damit Sie sich umschauen können. Ermöglicht das Spielen auf Smart Glasses, ohne auf 3D umzuschalten.</string> + <string name="glasses_screen_app_wide">Breite und Abstand aktualisieren den verfolgten virtuellen Bildschirm für DroidDeck-Menüs, Spiele und Desktop-Sitzungen sofort.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Die Positionsverfolgung umfasst die Kopfrotation in SteamVR. Für eine reine Rotationsverfolgung schalten Sie die Positionsverfolgung aus.</string> + <string name="glasses_head_tracking_spatial_hint">Steuert die Kopfbewegung auf dem virtuellen Bildschirm. Die Positionsverfolgung umfasst die Kopfdrehung in SteamVR.</string> + <string name="glasses_quick_actions">Schnelle Aktionen</string> + <string name="glasses_recenter_screen_hint">Richten Sie Ihren Blick auf die gewünschte Position des Bildschirms und setzen Sie anschließend das Tracking-Center zurück, um Höhe und Ausrichtung festzulegen.</string> + <string name="glasses_recenter_joycons_button">Joy-Con neu zentrieren</string> + <string name="phone_camera_tracking_group">Telefonkamera – Experimentell</string> + <string name="phone_camera_tracking_setting">Track-Hände oder Joy-Con-Controller</string> + <string name="glasses_6dof">6DoF virtueller Bildschirm</string> + <string name="glasses_position">Positionsverfolgung – experimentell</string> + <string name="glasses_position_hint">Physische Bewegung in VR und auf virtuellen Bildschirmen. Der Neustart des Trackings dauert einen Moment.</string> + <string name="glasses_eye_height">Aktuelle Augenhöhe über dem Boden</string> + <string name="glasses_floor">Bodenhöhe ausgehend von der aktuellen Höhe einstellen</string> + <string name="glasses_floor_set">Bodenniveau einstellen</string> + <string name="glasses_spatial_setup">Einrichtung und Diagnose der Stereokamera</string> + <string name="glasses_spatial_setup_hint">Überprüfen Sie vor dem Spielen die Kamerakalibrierung und das Tracking der Hände.</string> + <string name="glasses_spatial_open">Setup öffnen</string> + <string name="glasses_hands">Controller werden mit bloßen Händen bedient</string> + <string name="glasses_hands_hint">Verwenden Sie die Smart-Brillen-Kameras, um mit Ihren Händen zu zielen, drücken Sie, um zu klicken, und schließen Sie Ihre Hand, um in VR zu greifen. Gamepad-Sticks bewegen und drehen sich. Ersetzt die Joy-Con-Positionsverfolgung. Während des Spielens kann es zu Verzögerungen oder Trackingverlusten kommen.</string> + <string name="glasses_hands_ready_hint">Aktivieren Sie Controller, die mit bloßen Händen unter Luma Ultra-Kameras in Tracking bedient werden. Zeigen Sie zuerst offene Hände.</string> + <string name="glasses_hands_base">Gemeinsame Luma Ultra-Kalibrierung</string> + <string name="glasses_hands_base_hint">Verwendung der gemeinsamen Luma Ultra-Basis. Kalibrieren Sie Ihre eigene Datenbrille, um deren Genauigkeit zu überprüfen.</string> + <string name="glasses_hands_calibration_verified">Gemessene Kalibrierung verifiziert</string> + <string name="glasses_hands_calibration_required">Validierung erforderlich</string> + <string name="glasses_hands_calibration_required_hint">Controller, die mit bloßen Händen bedient werden, werden verfügbar, nachdem die gemessene Distanzprüfung bestanden wurde.</string> + <string name="tracking_recovery_lost">Tracking verloren</string> + <string name="tracking_recovery_look">Schauen Sie sich langsam in einem gut beleuchteten Raum um.\nHalten Sie die Tracking-Kameras frei und blicken Sie auf Möbel oder andere sichtbare Details.</string> + <string name="tracking_recovery_restart_help">Immer noch nicht weitergekommen? Auf Ihrem Telefon: Datenbrille → Tracking → Setup öffnen → Diagnose anzeigen → Tracking neu starten.</string> + <string name="tracking_recovery_disconnected">Datenbrille getrennt</string> + <string name="tracking_recovery_connect">Überprüfen Sie die USB-Verbindung und schließen Sie die Datenbrille erneut an.\nAkzeptieren Sie die USB-Zugriffsaufforderung auf Ihrem Telefon, falls diese angezeigt wird.</string> + <string name="tracking_recovery_usb_help">Sobald die Verbindung hergestellt ist, schauen Sie sich langsam in einem gut beleuchteten Raum um, um die Ortung wiederherzustellen.</string> + <string name="tracking_recovery_recenter">Neuzentrierung erforderlich</string> + <string name="tracking_recovery_recenter_steps">Die Verfolgung wurde in einer neuen Position fortgesetzt.\nBlicken Sie nach vorn und tippen Sie anschließend auf Ihrem Smartphone auf „Tracking-Center zurücksetzen“.</string> + <string name="tracking_recovery_recenter_help">Sie können das Tracking-Zentrum auch unter Smart Glasses → Tracking → Einstellungen öffnen zurücksetzen. Ihre gespeicherte Kamerakalibrierung bleibt erhalten.</string> + <string name="tracking_recovery_stabilizing">Halten Sie einen Moment still</string> + <string name="tracking_recovery_hold">Das Zurücksetzen des Tracking-Zentrums wird durchgeführt.\nHalten Sie die Smart Glasses ruhig, bis sich das Tracking stabilisiert hat.</string> + <string name="tracking_recovery_automatic">Dieser Bildschirm wird automatisch geschlossen, wenn die Kopfverfolgung bereit ist.</string> + <string name="glasses_steady_hand_aim">Stabilisiertes Zielen mit den Händen</string> + <string name="glasses_steady_hand_aim_hint">Zielen Sie von Ihrer Schulter durch Ihre Handfläche. Ausschalten für handgelenkgesteuerte Drehung.</string> + <string name="spatial_title">Räumliche Einrichtung</string> + <string name="spatial_wait_tracking">Warten auf Tracking…</string> + <string name="spatial_cameras_description">Linke und rechte Trackingkameras</string> + <string name="spatial_camera_sync">Kamerasynchronisation</string> + <string name="spatial_ready">Fertig</string> + <string name="spatial_sync_hint">Warten auf die Ausrichtung von Kamera und Head-Tracking. Halten Sie die Datenbrille verbunden.</string> + <string name="spatial_prepare">1. Bereiten Sie das Kalibrierungsziel vor</string> + <string name="spatial_print_actual">Drucken in Originalgröße</string> + <string name="spatial_print_hint">Jedes Quadrat muss 30 mm (1,181 Zoll) messen. Montieren Sie die Platte flach auf einer festen Oberfläche an einem gut beleuchteten Ort.</string> + <string name="spatial_print">Kalibrierungsmuster drucken</string> + <string name="spatial_capture_group">2. Erfassen Sie verschiedene Ansichten</string> + <string name="spatial_board_stationary">Halten Sie das Kalibrierungsziel stationär</string> + <string name="spatial_capture_hint">Bewegen Sie die Datenbrille näher, weiter und seitwärts. Drehen Sie sie nach links/rechts, neigen Sie sie nach oben/unten und neigen Sie sie zur Seite. Behalten Sie das Kalibrierungsziel in beiden Kameras bei und halten Sie vor jeder Aufnahme kurz inne.</string> + <string name="spatial_start">Neue Kalibrierung starten</string> + <string name="spatial_wait_sync">Warten auf Kamerasynchronisation.</string> + <string name="spatial_start_hint">Starten Sie eine neue Kalibrierung, um Ansichten zu sammeln.</string> + <string name="spatial_views_hint">Lassen Sie das Kalibrierungsziel in beiden Vorschauen sichtbar. Nehmen Sie mindestens 24 scharfe Ansichten aus verschiedenen Blickwinkeln auf.</string> + <string name="spatial_capturing">Aufnahme...</string> + <string name="spatial_capture">Kalibrierungszielansicht erfassen</string> + <string name="spatial_alignment">Kameraausrichtung berechnen</string> + <string name="spatial_calculating">Berechnen…</string> + <string name="spatial_calculate">Kalibrierung berechnen</string> + <string name="spatial_distance_group">3. Überprüfen Sie den Abstand</string> + <string name="spatial_distance">Gemessene Distanz</string> + <string name="spatial_distance_hint">Beginnen Sie mit 12 Zoll oder 30 cm, damit die gedruckten Markierungen leichter zu erkennen sind. Wählen Sie das genaue Maß, das Sie verwenden möchten.</string> + <string name="spatial_camera_board_distance">Linke Kamera zur Kalibrierungszielmitte</string> + <string name="spatial_checking_distance">Abstand prüfen…</string> + <string name="spatial_validate">Distanz validieren</string> + <string name="spatial_diagnostics">Diagnose</string> + <string name="spatial_show_diagnostics">Diagnose anzeigen</string> + <string name="spatial_diagnostics_hint">Tools zur Kamera-Timing- und Tracking-Wiederherstellung.</string> + <string name="spatial_camera_timing">Kamera-Timing</string> + <string name="spatial_hand_input">Eingabe aus der Handverfolgung</string> + <string name="spatial_wait_timing">Warten auf Kamera-Timing.</string> + <string name="spatial_frames">Kamerabilder</string> + <string name="spatial_gpu">GPU-Erkennung von Händen</string> + <string name="spatial_gpu_hint">CPU ist die Standardeinstellung. Die GPU ist experimentell und kann einen Neustart von SteamVR verursachen. Diese Auswahl wird zurückgesetzt, wenn die Verfolgung neu gestartet wird.</string> + <string name="spatial_lite">Lite-Erkennung von Handmodellen</string> + <string name="spatial_lite_hint">Verwenden Sie den Lite-Handflächendetektor und die Lite-Schlüsselpunkte an den Händen. Überprüfen Sie die Ziel-, Klemm- und Greifgenauigkeit. Wird beim Neustart der Verfolgung zurückgesetzt.</string> + <string name="spatial_adaptive">Automatische Eingabefrequenz für die Handverfolgung</string> + <string name="spatial_adaptive_hint">Passen Sie die Eingabe an die Verarbeitungsgeschwindigkeit an. Wird beim Neustart der Verfolgung zurückgesetzt.</string> + <string name="spatial_half_rate">Eingangsfrequenz für die Handverfolgung begrenzen</string> + <string name="spatial_half_rate_hint">Verwenden Sie die Hälfte der Kamerabilder. Schalten Sie diese Option aus, um die maximale Frequenz zu vergleichen. Wird beim Neustart der Verfolgung zurückgesetzt.</string> + <string name="spatial_diagnostic_capture">Diagnoseerfassung</string> + <string name="spatial_diagnostic_capture_hint">Speichern Sie ein Stereobildpaar lokal. Bilder werden nur auf Anfrage gespeichert.</string> + <string name="spatial_save_frame">Kamerabild speichern</string> + <string name="spatial_restart_tracking">Tracking neu starten</string> + <string name="spatial_restart_hint">Verwenden Sie diese Option, wenn die Verfolgung in einem gut beleuchteten Bereich nicht wiederhergestellt werden kann. Ein Neustart erfordert einen neuen Tracking-Ursprung.</string> + <string name="spatial_restart">Neustart</string> + <string name="spatial_restart_title">Tracking neu starten?</string> + <string name="spatial_restart_confirm">Nicht gespeicherte Kalibrierungsansichten gehen verloren. Halten Sie die Smart Glasses anschließend ruhig und setzen Sie das Tracking-Zentrum zurück, sobald das Tracking wiederhergestellt ist.</string> + <string name="spatial_views_count">%1$d / 24 Aufrufe erfasst</string> + <string name="spatial_capture_paused">Aufnahme angehalten: %1$s</string> + <string name="spatial_measure_hint">Messen Sie %1$s. Zeigen Sie das vollständige Kalibrierungsziel in beiden Vorschauen an und halten Sie dann still.</string> + <string name="spatial_timing_values">%1$.1f Hz • Bildalter %2$.1f ms • Verarbeitung %3$.1f ms</string> + <string name="spatial_input_values">Eingabegrenze %1$.1f Hz • %2$.0f%% der Kamerabilder. Die Kopfverfolgung wird mit maximaler Frequenz fortgesetzt.</string> + <string name="spatial_frame_counts">%1$d verarbeitet • %2$d gelöscht • %3$d durch Eingabelimit übersprungen</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck – Luma Ultra-Kalibrierung</string> + <string name="spatial_print_scale" formatted="false">Drucken mit 100 % / Tatsächliche Größe. Jedes Quadrat: 30 mm (1,181 Zoll).</string> + <string name="spatial_print_stationary">Halten Sie das Kalibrierungsziel flach und stationär; Bewegen Sie die Datenbrille zwischen den Aufnahmen.</string> + <string name="spatial_print_check">Maßstabsprüfung: 100 mm (3,937 Zoll) zwischen den Teilstrichen</string> + <string name="spatial_distance_12in">12 Zoll (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 Zoll)</string> + <string name="spatial_distance_20in">20 Zoll (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 Zoll)</string> + <string name="spatial_disabled">Deaktiviert</string> + <string name="spatial_wait_stable">Warten auf stabiles Tracking</string> + <string name="spatial_disconnected">Nicht verbunden</string> + <string name="spatial_hands_off">Mit bloßen Händen bediente Controller sind ausgeschaltet</string> + <string name="spatial_tracking_off">Die Positionsverfolgung ist ausgeschaltet oder die Datenbrille ist nicht angeschlossen</string> + <string name="spatial_recenter_pending">Zurücksetzen des Tracking-Zentrums angefordert – halten Sie die Smart Glasses ruhig, bis sich das Tracking stabilisiert hat.</string> + <string name="spatial_tracking_lost">Tracking verloren – richten Sie Ihren Blick auf einen gut beleuchteten Bereich mit sichtbaren Details</string> + <string name="spatial_origin_changed">Tracking-Ursprung geändert – tippen Sie auf „Tracking-Zentrum zurücksetzen“ und halten Sie die Smart Glasses ruhig.</string> + <string name="spatial_active">6DoF aktiv</string> + <string name="spatial_connect_hint">Luma Ultra anschließen und Positionsverfolgung aktivieren.</string> + <string name="spatial_validation_session">Kalibrierung für diese Verbindung überprüft.</string> + <string name="spatial_validation_saved">Kalibrierung überprüft und gespeichert.</string> + <string name="spatial_wait_cameras">Warten auf Stereokameras</string> + <string name="spatial_wait_hands">Warten auf die Ortung der Hände</string> + <string name="spatial_collect_instructions">Halten Sie das 5 × 7-Kalibrierungsziel stationär. Erfassen Sie mehr als 24 Ansichten, während Sie die Datenbrille bewegen und drehen.</string> + <string name="spatial_capture_pending">Warten auf das nächste Kamerabild. Halten Sie die Datenbrille ruhig.</string> + <string name="spatial_validation_pending">Überprüfen des nächsten Kamerabildes. Halten Sie das vollständige Kalibrierungsziel sichtbar und halten Sie es ruhig.</string> + <string name="spatial_start_first">Starten Sie zuerst die Kalibrierung</string> + <string name="spatial_no_camera_frame">Es ist kein neues Kamerabild eingetroffen. Überprüfen Sie die Datenbrillenverbindung und die Kameravorschau und versuchen Sie es dann erneut.</string> + <string name="spatial_clock_reset">Kamerauhr zurückgesetzt</string> + <string name="spatial_frame_changed">Tracking-Koordinatensystem geändert. Ihre Ansichten werden zur Neuberechnung gespeichert. Setzen Sie das Tracking-Zentrum zurück und starten Sie dann eine neue Aufnahme, um weitere Ansichten zu erfassen.</string> + <string name="spatial_device_loaded">Gerätekalibrierung geladen</string> + <string name="spatial_base_loaded">Luma Ultra-Basiskalibrierung geladen</string> + <string name="spatial_calibration_needed">Kalibrierung erforderlich</string> + <string name="spatial_tap_start">Tippen Sie auf „Zuerst neue Kalibrierung starten“.</string> + <string name="spatial_capture_recenter_pending">Das Zurücksetzen des Tracking-Zentrums wartet auf stabiles Tracking. Halten Sie die Smart Glasses kurz ruhig.</string> + <string name="spatial_capture_recenter">Tracking geändert. Tippen Sie einmal auf „Tracking-Zentrum zurücksetzen“ und halten Sie die Smart Glasses vor der Aufnahme ruhig.</string> + <string name="spatial_capture_unsynchronized">Aufnahme abgelehnt: Die Kopfverfolgung war nicht synchron oder hat sich während der Aufnahme geändert. Halten Sie still und versuchen Sie es erneut.</string> + <string name="spatial_align_first">Berechnen Sie die Kameraausrichtung, bevor Sie den Abstand überprüfen.</string> + <string name="spatial_processing_failed">Kameraverarbeitung fehlgeschlagen</string> + <string name="spatial_hand_head_changed">Die Kopfverfolgung wurde während der Handerkennung geändert</string> + <string name="spatial_hand_wait_sync">Warten auf Kamera- und Kopfsynchronisation</string> + <string name="spatial_no_wrists">Keine Handgelenke erkannt. Halten Sie die Griffe Ihres Joy-Con-Controllers vor der Datenbrille</string> + <string name="spatial_no_hands">Keine Hände erkannt. Zeigen Sie offene Handflächen vor der Datenbrille</string> + <string name="spatial_one_camera_wrists">Handgelenke nur in einer Kamera sichtbar; Behalten Sie Ihre Controller-Handles in der freigegebenen Ansicht</string> + <string name="spatial_one_camera_hands">Hände nur in einer Kamera sichtbar; Halten Sie beide Handflächen im gemeinsamen Blickfeld</string> + <string name="spatial_ambiguous_hands">Beide Kameras sehen Hände, aber die Links/Rechts-Zuordnung ist nicht eindeutig</string> + <string name="spatial_inconsistent_depth">Hände erkannt, aber die Stereotiefe ist inkonsistent</string> + <string name="spatial_rejected_wrist">Handgelenksposition wurde durch Stereo- oder Bewegungsprüfungen abgelehnt</string> + <string name="spatial_inconsistent_palm">Stereopunkte erkannt, aber die Handflächengeometrie ist inkonsistent</string> + <string name="spatial_hands_need_calibration">Schließen Sie die Kalibrierung und die Distanzprüfung ab, um die Hände freizugeben</string> + <string name="spatial_hands_wait_stable">Warten auf stabiles Head-Tracking; Tracking-Zentrum bei Bedarf zurücksetzen.</string> + <string name="spatial_old_frame">Kamerabeobachtung ist zu alt; warte auf ein neues Paar</string> + <string name="spatial_fit_ready">%1$.2f px anpassen. Messen Sie den ausgewählten Abstand von der linken Kamera zum Zentrum des Kalibrierungsziels und bestätigen Sie ihn anschließend.</string> + <string name="spatial_opencv_error">OpenCV nicht verfügbar: %1$s</string> + <string name="spatial_restored">%1$d gespeicherte Ansichten wiederhergestellt. Berechnen Sie die Kalibrierung, um es erneut zu versuchen, oder starten Sie einen neuen Satz, um mehr zu erfassen.</string> + <string name="spatial_captured">Aufgenommen %1$d / 24 Aufrufe. Halten Sie das Kalibrierungsziel fest; Bewegen Sie die Datenbrille für die nächste Ansicht.</string> + <string name="spatial_capture_corners">Aufnahme abgelehnt: %1$d / 12 erforderliche Ecken in beiden Kameras sichtbar. Zeigen Sie mehr vom Kalibrierungsziel, halten Sie still und versuchen Sie es dann erneut.</string> + <string name="spatial_validation_error">Entfernungsprüfung konnte nicht abgeschlossen werden: %1$s. Versuchen Sie es erneut.</string> + <string name="spatial_inference_error">Handerkennung nicht verfügbar: %1$s. Wechseln Sie CPU/GPU oder schalten Sie mit bloßen Händen bediente Controller um, um es erneut zu versuchen.</string> + <string name="spatial_hand_timeout">Erkennung von Händen überschreitet %1$d ms; Beobachtung verworfen</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con-Handgelenkspositionen, gemessen per Stereo</string> + <string name="spatial_palms_tracked">Verfolgte Handflächen: %1$d / 2; Pinch bereit: %2$d; Greifen bereit: %3$d</string> + <string name="spatial_capture_saved">Diagnoseerfassung gespeichert unter %1$s</string> + <string name="spatial_hand_error">Handverfolgung gestoppt: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Head-Tracking und das Kalibrierungsziel stimmen um %1$s nicht überein (Grenzwert 5 cm / 2 Zoll). Halten Sie das Kalibrierungsziel fixiert und warten Sie auf eine stabile Verfolgung, bevor Sie mit einem neuen Satz beginnen. Drehen und neigen Sie die Datenbrille vorsichtig; Machen Sie vor jeder Aufnahme eine Pause.</string> + <string name="spatial_need_views">Erfassen Sie mindestens 24 verschiedene Ansichten des stationären Kalibrierungsziels.</string> + <string name="spatial_need_rotation">Drehen Sie die Datenbrille nach links und rechts und neigen Sie sie nach oben und unten. Eine Bewegung ohne Drehung kann die Kameraausrichtung nicht kalibrieren.</string> + <string name="spatial_bad_baseline">Unplausible Kamerabasislinie</string> + <string name="spatial_need_orientations">Bewegen Sie Ihren Kopf durch verschiedene Ausrichtungen.</string> + <string name="spatial_bad_rotation">Ungültige Kamera-zu-Kopf-Rotation</string> + <string name="spatial_bad_alignment">Die Ausrichtung der Kamera zum Kopf ist inkonsistent.</string> + <string name="spatial_calibration_error">Die Kalibrierung konnte nicht abgeschlossen werden. %1$s Ihre erfassten Ansichten werden gespeichert.</string> + <string name="spatial_reprojection_error">Reprojektionsfehler bei der Validierung %1$.2f px überschreitet 2 px. Neu kalibrieren.</string> + <string name="spatial_distance_corners">%1$d / 24 Schachbrettecken in beiden Kameras erkannt. Halten Sie das vollständige Kalibrierungsziel sichtbar und halten Sie es ruhig. Wenn es bereits sichtbar ist, wählen Sie 12 Zoll oder 30 cm und messen Sie den näheren Abstand, bevor Sie es erneut versuchen.</string> + <string name="spatial_distance_depth">Das Kalibrierungsziel ist sichtbar, seine Tiefe konnte jedoch nicht zuverlässig gemessen werden. Halten Sie die Datenbrille ruhig und halten Sie das Kalibrierungsziel flach und gut beleuchtet. Versuchen Sie es dann erneut.</string> + <string name="spatial_distance_invalid">Die Kameramessung war ungültig. Halten Sie still und versuchen Sie es erneut.</string> + <string name="spatial_distance_passed">Distanzprüfung bestanden.</string> + <string name="spatial_distance_retry">Überprüfen Sie den Abstand von der linken Kamera zur Mitte des Kalibrierungsziels erneut und versuchen Sie es dann erneut.</string> + <string name="spatial_distance_result">Kameras gemessen %1$s; ausgewählte Entfernung %2$s. %3$s</string> + <string name="spatial_wait_previews">Warten Sie auf die Vorschau beider Kameras, bevor Sie mit der Kalibrierung beginnen.</string> + <string name="spatial_saved_views_hint">Gespeicherte Ansichten können neu berechnet werden. Starten Sie eine neue Kalibrierung zur Erfassung im aktuellen Tracking-Koordinatensystem.</string> + <string name="spatial_model_checksum_error">Die Prüfsumme des Handmodells stimmt nicht überein</string> + <string name="spatial_opencv_load_error">OpenCV konnte nicht geladen werden</string> +</resources> diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml new file mode 100644 index 0000000000..bb3ed78302 --- /dev/null +++ b/app/src/main/res/values-el/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Τα γραφικά του SteamVR σταμάτησαν</string> + <string name="steamvr_recovery_countdown">Το DroidDeck θα κάνει επανεκκίνηση σε %1$d δευτερόλεπτα για να επαναφέρει τα γραφικά και να ανοίξει ξανά το SteamVR. Το παιχνίδι που εκτελείται θα κλείσει· η μη αποθηκευμένη πρόοδος δεν μπορεί να ανακτηθεί.</string> + <string name="steamvr_recovery_repeated">Το σφάλμα γραφικών επανεμφανίστηκε μετά από πρόσφατη επανεκκίνηση. Η αυτόματη ανάκτηση τέθηκε σε παύση για να αποφευχθεί ατέρμονος βρόχος. Η επανεκκίνηση θα κλείσει το παιχνίδι σας· η μη αποθηκευμένη πρόοδος δεν μπορεί να ανακτηθεί.</string> + <string name="steamvr_recovery_restart">Επανεκκίνηση τώρα</string> + <string name="steamvr_recovery_cancel">Να μείνει ανοιχτό</string> + <string name="steamvr_recovery_restarting">Επαναφορά γραφικών και εκ νέου άνοιγμα του SteamVR…</string> + <string name="steamvr_recovery_failed">Το DroidDeck δεν μπόρεσε να κάνει αυτόματη επανεκκίνηση. Κλείστε εντελώς την εφαρμογή και ανοίξτε την ξανά.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Η πρώτη εκτέλεση κάνει λήψη του Steam. Αυτό μπορεί να διαρκέσει μερικά λεπτά.</item> + <item>Από προεπιλογή, η έξοδος από την εφαρμογή θέτει το Steam σε παύση· συνεχίζει από εκεί που είχε μείνει όταν επιστρέψετε.</item> + <item>Το χειριστήριό σας εμφανίζεται ως χειριστήριο Xbox 360. Διαφορετικά, χρησιμοποιήστε τα χειριστήρια στην οθόνη.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Η πρώτη εκτέλεση ρυθμίζει την επιφάνεια εργασίας. Αυτό μπορεί να διαρκέσει μερικά λεπτά.</item> + <item>Από προεπιλογή, η έξοδος από την εφαρμογή θέτει τη συνεδρία σε παύση· συνεχίζει από εκεί που είχε μείνει όταν επιστρέψετε.</item> + <item>Το άγγιγμα λειτουργεί ως πινακίδα αφής: σύρετε για να μετακινήσετε τον δείκτη, πατήστε για κλικ.</item> + <item>Το χειριστήριό σας εμφανίζεται ως χειριστήριο Xbox 360. Διαφορετικά, χρησιμοποιήστε τα χειριστήρια στην οθόνη.</item> + </string-array> + <string name="session_channel">Συνεδρία</string> + <string name="session_channel_description">Εμφανίζεται όσο μια συνεδρία Steam ή επιφάνειας εργασίας είναι ανοιχτή</string> + <string name="session_notification">Το Steam εκτελείται</string> + <string name="session_notification_downloads">Λήψη Steam σε εξέλιξη</string> + <string name="session_notification_paused">Η συνεδρία παύθηκε - πατήστε Συνέχιση όταν είστε έτοιμοι</string> + <string name="resume_session">Συνέχιση</string> + <string name="suspend_now">Αναστολή τώρα</string> + <string name="stop_session">Διακοπή συνεδρίας</string> + <string name="frame_gen_title">Δημιουργία καρέ</string> + <string name="frame_gen_hint">Επιλέξτε τη λειτουργία δημιουργίας καρέ</string> + <string name="frame_gen_off">Ανενεργό</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG προσαρμοστικό %1$d</string> + <string name="lsfg_needs_steam">Απαιτεί το Lossless Scaling στο Steam</string> + <string name="lsfg_needs_install">Εγκαταστήστε το Lossless Scaling στο Steam ή εισαγάγετε το Lossless.dll</string> + <string name="lsfg_import">Εισαγωγή Lossless.dll…</string> + <string name="lsfg_using_steam">Χρήση του αντιγράφου από το Steam</string> + <string name="lsfg_using_import">Χρήση ενός εισαγμένου αντιγράφου</string> + <string name="lsfg_pick_title">Επιλογή Lossless.dll</string> + <string name="lsfg_imported">Το Lossless.dll εισήχθη</string> + <string name="lsfg_import_unchanged">Αυτό το Lossless.dll χρησιμοποιείται ήδη</string> + <string name="lsfg_import_not_owned">Αυτός ο λογαριασμός Steam δεν κατέχει το Lossless Scaling</string> + <string name="lsfg_import_invalid">Αυτό το αρχείο δεν είναι το Lossless.dll του Lossless Scaling</string> + <string name="lsfg_import_failed">Δεν ήταν δυνατή η προετοιμασία του LSFG από αυτό το Lossless.dll</string> + <string name="lsfg_problem_missing">Το LSFG απαιτεί το Lossless Scaling από το Steam ή ένα εισαγμένο Lossless.dll</string> + <string name="lsfg_problem_failed">Το LSFG δεν μπόρεσε να προετοιμάσει τα shaders του από το Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: μη υποστηριζόμενο</string> + <string name="hud_fg_failed">%1$s: αποτυχία μηχανής</string> + <string name="hud_fg_needs_lossless">%1$s: απαιτεί το Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · ξεκινά</string> + <string name="second_library_import_hint">Προσθέτει μια βιβλιοθήκη Steam και τη σαρώνει για παιχνίδια Windows. Τα παιχνίδια που κατέχετε χρησιμοποιούν τις καταχωρίσεις τους στο Steam· τα υπόλοιπα γίνονται συντομεύσεις εκτός Steam.</string> + <string name="game_env_title">Περιβάλλον παιχνιδιού</string> + <string name="game_env_hint">Μεταβλητές περιβάλλοντος για παιχνίδια Proton.</string> + <string name="game_env_edit">Επεξεργασία</string> + <string name="game_env_shared">Όλα τα παιχνίδια Proton</string> + <string name="game_env_scope">Προφίλ</string> + <string name="game_env_app_id">ID εφαρμογής Steam</string> + <string name="game_env_open">Άνοιγμα</string> + <string name="game_env_profile">Παιχνίδι %1$s</string> + <string name="game_env_add">Προσθήκη μεταβλητής</string> + <string name="game_env_name">Όνομα μεταβλητής</string> + <string name="game_env_value">Τιμή</string> + <string name="game_env_save">Αποθήκευση</string> + <string name="game_env_remove">Αφαίρεση</string> + <string name="game_env_restore">Κληρονόμηση ξανά</string> + <string name="game_env_reset">Εκκαθάριση παρακάμψεων περιβάλλοντος</string> + <string name="game_env_unset">Κατάργηση ορισμού για αυτό το προφίλ</string> + <string name="game_env_empty">Δεν έχουν ορισθεί μεταβλητές.</string> + <string name="game_env_inherited">Κληρονομημένη</string> + <string name="game_env_custom">Προσαρμοσμένη μεταβλητή</string> + <string name="game_env_error">Δεν ήταν δυνατή η φόρτωση ή η αποθήκευση. Ελέγξτε τον ελεύθερο χώρο αποθήκευσης και δοκιμάστε ξανά.</string> + <string name="game_env_invalid">Χρησιμοποιήστε ένα έγκυρο όνομα και μια τιμή έως 8192 χαρακτήρων.</string> + <string name="game_env_unused">Το τυπικό runtime του Proton δεν διαβάζει αυτή τη μεταβλητή.</string> + <string name="game_env_loading">Φόρτωση…</string> + <string name="game_env_feature">Παράκαμψη επιπέδου λειτουργιών D3D12. Το 12_2 αναφέρει δυνατότητες DirectX 12 Ultimate· μη υποστηριζόμενες λειτουργίες μπορεί να αποτύχουν. Αφήστε το χωρίς ορισμό για αυτόματη ανίχνευση.</string> + <string name="game_env_shader">Παράκαμψη μοντέλου shader D3D12. Το 6_9 απαιτεί αρκετά πρόσφατο VKD3D και αντίστοιχες δυνατότητες GPU. Αφήστε το χωρίς ορισμό για αυτόματη ανίχνευση.</string> + <string name="game_env_cache">Διατηρήστε την προσωρινή αποθήκευση shader της Mesa ενεργοποιημένη για να μειώσετε την επανειλημμένη μεταγλώττιση. Η τιμή false ενεργοποιεί την προσωρινή αποθήκευση.</string> + <string name="game_env_cache_size">Μέγιστο μέγεθος προσωρινής μνήμης shader της Mesa, όπως 1G. Μεγαλύτερες προσωρινές μνήμες χρησιμοποιούν περισσότερο χώρο αποθήκευσης.</string> + <string name="game_env_vkd3d_config">Επιλογές VKD3D για D3D12. Το nodxr απενεργοποιεί το ray tracing· χρησιμοποιήστε το μόνο για παιχνίδι που το χρειάζεται.</string> + <string name="game_env_proton_log">Ορίστε σε 1 για διαγνωστικό αρχείο καταγραφής του Proton. Η καταγραφή μπορεί να μειώσει την απόδοση και να χρησιμοποιήσει χώρο αποθήκευσης.</string> + <string name="game_env_wined3d">Ορίστε σε 1 για χρήση του WineD3D με βάση OpenGL αντί του DXVK, για δοκιμές συμβατότητας D3D9–11.</string> + <string name="game_env_no_ntsync">Ορίστε σε 1 για να κρατήσετε αυτό το παιχνίδι εκτός ntsync (droiddeck-ntsync ή οδηγός πυρήνα)· χρησιμοποιεί το droiddeck-esync όπου υπάρχει πακέτο, διαφορετικά το droiddeck-fsync.</string> + <string name="game_env_no_esync">Ορίστε σε 1 για να απενεργοποιήσετε το droiddeck-esync για αυτό το παιχνίδι· χρησιμοποιεί αντ’ αυτού το droiddeck-fsync, ή το droiddeck-ntsync όταν είναι απενεργοποιημένο και το fsync.</string> + <string name="game_env_no_fsync">Ορίστε σε 1 για να κρατήσετε αυτό το παιχνίδι εκτός droiddeck-fsync· χρησιμοποιεί το droiddeck-esync όπου υπάρχει πακέτο, διαφορετικά το droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Ορίστε σε 1 για εκτέλεση αυτού του παιχνιδιού με droiddeck-fsync, ή σε 0 για να προτάξετε το droiddeck-esync όπου ένα πακέτο ταιριάζει με το Proton του.</string> + <string name="game_env_xalia">Ορίστε σε 0 για να απενεργοποιήσετε τον βοηθό πλοήγησης με χειριστήριο του Proton για αυτό το παιχνίδι.</string> + <string name="game_env_hud">Επικάλυψη DXVK για D3D9–11. Το fps εμφανίζει τον ρυθμό καρέ· χωρίς ορισμό το αποκρύπτει.</string> + <string name="game_env_dxvk_config">Ρυθμίσεις DXVK χωρισμένες με ερωτηματικά. Οι πρόσφατες εκδόσεις χρησιμοποιούν το dxvk.maxFrameRate για τον περιορισμό καρέ· προτιμήστε τον περιοριστή καρέ της συνεδρίας για συνήθη χρήση.</string> + <string name="game_env_vkd3d_limit">Όριο ρυθμού καρέ D3D12. Το 0 απενεργοποιεί το όριο.</string> + <string name="game_env_glthread">Πολυνημάτωση OpenGL της Mesa. Το true μπορεί να βοηθήσει παιχνίδια OpenGL περιορισμένα από CPU· δοκιμάστε το ανά παιχνίδι.</string> + <string name="sync_backend_title">Συγχρονισμός Wine</string> + <string name="sync_backend_hint">Πώς τα παιχνίδια κρατούν τα νήματά τους συγχρονισμένα. Εφαρμόζεται στην επόμενη συνεδρία.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Προεπιλογή FEX</string> + <string name="fex_next_launch">Εφαρμόζεται στην επόμενη εκκίνηση παιχνιδιού.</string> + <string name="game_settings_title">Παιχνίδια</string> + <string name="fex_default_label">Προεπιλογές FEX</string> + <string name="fex_default_detail">Χρησιμοποιεί τις προεπιλογές του FEX.</string> + <string name="fex_stability_label">Σταθερότητα</string> + <string name="fex_stability_detail">Οι πιο ασφαλείς, πιο αργές ρυθμίσεις.</string> + <string name="fex_compatibility_label">Συμβατότητα</string> + <string name="fex_compatibility_detail">Πλήρες TSO με multiblock.</string> + <string name="fex_intermediate_label">Ενδιάμεσο</string> + <string name="fex_intermediate_detail">Ισορροπημένο TSO με μειωμένη ακρίβεια x87.</string> + <string name="fex_performance_label">Απόδοση</string> + <string name="fex_performance_detail">Όλο το TSO απενεργοποιημένο· multiblock.</string> + <string name="fex_performance_tso_label">Απόδοση + TSO</string> + <string name="fex_performance_tso_detail">Ρυθμίσεις απόδοσης με το κύριο TSO ενεργοποιημένο.</string> + <string name="fex_extreme_label">Ακραίο</string> + <string name="fex_extreme_detail">Απενεργοποιεί τους ελέγχους αυτο-τροποποιούμενου κώδικα. Παιχνίδια με JIT και DRM μπορεί να πάθουν βλάβη.</string> + <string name="fex_extreme_tso_label">Ακραίο + TSO</string> + <string name="fex_extreme_tso_detail">Ρυθμίσεις Ακραίο με το κύριο TSO ενεργοποιημένο.</string> + <string name="fex_extreme_gn_label">Extreme-gn</string> + <string name="fex_extreme_gn_detail">Απόδοση με υποδείξεις TSC και μεταδεδομένων. Δοκιμάστε το πριν το Ακραίο.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Απόδοση με πλήρεις ελέγχους κώδικα και το bit υπερεπόπτη κρυμμένο.</string> + <string name="game_env_custom_value">Προσαρμοσμένη τιμή</string> + <string name="game_env_select_value">Επιλογή τιμής</string> + <string name="user_apps_section">Προσομοιωτές & εφαρμογές</string> + <string name="user_apps_add">Προσθήκη</string> + <string name="user_apps_add_detail">Η δική σας εφαρμογή ή παιχνίδι</string> + <string name="user_apps_kind_script">Σενάριο</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Εκκίνηση…</string> + <string name="user_apps_added">Το %1$s προστέθηκε</string> + <string name="user_apps_removed">Το %1$s αφαιρέθηκε</string> + <string name="user_apps_back">Επιφάνεια εργασίας</string> + <string name="user_apps_gone">Αυτή η εφαρμογή δεν υπάρχει πια. Επιλέξτε την ξανά από την Επιφάνεια εργασίας.</string> + <string name="user_apps_open">Άνοιγμα %1$s</string> + <string name="user_apps_remove">Αφαίρεση</string> + <string name="user_apps_remove_confirm">Πατήστε ξανά για αφαίρεση</string> + <string name="user_apps_stop_session">Διακόψτε τη συνεδρία για αφαίρεση</string> + <string name="user_apps_script_linked">Εκτελεί το %1$s από τον φάκελό του, συνδεδεμένο στη συνεδρία όπου βρίσκεται. Η αφαίρεση της εφαρμογής αφήνει αυτόν τον φάκελο ανέγγιχτο.</string> + <string name="user_apps_script_copied">Εκτελεί το %1$s από ένα αντίγραφο του φακέλου του μέσα στο DroidDeck. Η αφαίρεση της εφαρμογής διαγράφει το αντίγραφο, όχι το πρωτότυπο.</string> + <string name="user_apps_runtime_required">Εγκαταστήστε πρώτα το runtime Linux</string> + <string name="user_apps_file_gone">Το αρχείο δεν υπάρχει πια</string> + <string name="user_apps_no_space">Δεν υπάρχει αρκετός ελεύθερος χώρος: η αντιγραφή του φακέλου απαιτεί %1$s</string> + <string name="user_apps_copying">Αντιγραφή %1$s</string> + <string name="user_apps_failed">Η προσθήκη της εφαρμογής απέτυχε</string> + <string name="user_apps_github_checking">Αναζήτηση έκδοσης του %1$s</string> + <string name="user_apps_github_unreachable">Δεν ήταν δυνατή η ανάγνωση των εκδόσεων του %1$s</string> + <string name="user_apps_github_no_appimage">Καμία έκδοση του %1$s δεν διαθέτει AppImage για ARM64 ή x86_64</string> + <string name="user_apps_downloading">Λήψη %1$s</string> + <string name="user_apps_download_failed">Η λήψη απέτυχε</string> + <string name="user_apps_update_failed">Η ενημέρωση της εφαρμογής απέτυχε</string> + <string name="user_apps_icon_failed">Δεν ήταν δυνατή η ανάγνωση αυτού του εικονιδίου</string> + <string name="user_apps_saved">Το %1$s αποθηκεύτηκε</string> + <string name="user_apps_edit">Επεξεργασία</string> + <string name="user_apps_check_updates">Έλεγχος για ενημερώσεις</string> + <string name="user_apps_checking_updates">Έλεγχος για ενημερώσεις…</string> + <string name="user_apps_update_to">Ενημέρωση σε %1$s</string> + <string name="user_apps_up_to_date">Ενημερωμένο · %1$s</string> + <string name="user_apps_updated">Το %1$s ενημερώθηκε</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Προσθήκη εφαρμογής</string> + <string name="add_app_tab_script">Σενάριο</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Ένα αρχείο .sh. Εκτελείται από τον δικό του φάκελο, σε πλήρη οθόνη μέσω gamescope.</string> + <string name="add_app_appimage_hint">Ένα AppImage για ARM64 (aarch64), ή ένα για x86_64 που εκτελείται μέσω FEX. Αποσυμπιέζεται μέσα στο runtime Linux μία φορά.</string> + <string name="add_app_github_hint">Εγκαθιστά το AppImage για ARM64 από την πιο πρόσφατη έκδοση του αποθετηρίου, ή το x86_64 μέσω FEX.</string> + <string name="app_fex_title">Χρήση FEX</string> + <string name="app_fex_auto">Αυτόματο</string> + <string name="app_fex_on">Ενεργό</string> + <string name="app_fex_off">Ανενεργό</string> + <string name="app_fex_hint">Το FEX εκτελεί προγράμματα x86 Linux σε αυτή τη συσκευή ARM64. Το Αυτόματο το χρησιμοποιεί όταν το πρόγραμμα είναι χτισμένο για x86.</string> + <string name="app_fex_x86">%1$s μέσω FEX</string> + <string name="app_fex_not_ready">Αυτό το πρόγραμμα είναι χτισμένο για υπολογιστές %1$s και εκτελείται μέσω FEX, το οποίο δεν έχει ρυθμιστεί ακόμα. Ανοίξτε το Steam μία φορά ενώ είστε συνδεδεμένοι: το DroidDeck κάνει λήψη του FEX και του Steam Linux Runtime που χρειάζεται, και μετά αυτό ανοίγει.</string> + <string name="session_end_program">Αυτό το πρόγραμμα</string> + <string name="session_end_fex_missing">Το %1$s είναι χτισμένο για υπολογιστές x86 και εκτελείται μέσω FEX, το οποίο δεν έχει εγκατασταθεί ακόμα. Εκκινήστε το Steam μία φορά ενώ είστε συνδεδεμένοι και αφήστε το να κάνει λήψη του FEX και του Steam Linux Runtime, μετά εκκινήστε αυτό ξανά.</string> + <string name="add_app_flatpak_hint">Ένα ID εφαρμογής Flathub ή η σελίδα της στο Flathub. Το Flatpak ρυθμίζεται πρώτα, αν δεν έχει ρυθμιστεί ακόμα.</string> + <string name="add_app_file">Αρχείο</string> + <string name="add_app_no_file">Δεν επιλέχθηκε αρχείο</string> + <string name="add_app_choose_file">Επιλογή αρχείου</string> + <string name="add_app_change_file">Αλλαγή</string> + <string name="add_app_pick_script">Επιλογή σεναρίου</string> + <string name="add_app_pick_appimage">Επιλογή AppImage</string> + <string name="add_app_pick_icon">Επιλογή εικονιδίου</string> + <string name="add_app_repository">Αποθετήριο</string> + <string name="add_app_repository_placeholder">owner/repo ή σύνδεσμος github.com</string> + <string name="add_app_repository_invalid">Δεν είναι αποθετήριο GitHub</string> + <string name="add_app_flatpak_id">ID εφαρμογής</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Δεν είναι ID εφαρμογής Flathub</string> + <string name="add_app_flatpak_bundle_hint">Ή ένα αρχείο .flatpak, για εφαρμογή που δεν υπάρχει στο Flathub.</string> + <string name="add_app_pick_flatpak">Επιλογή αρχείου .flatpak</string> + <string name="add_app_source">Πηγή</string> + <string name="add_app_appearance">Στην Επιφάνεια εργασίας σας</string> + <string name="add_app_preview_name">Νέα εφαρμογή</string> + <string name="add_app_name">Όνομα</string> + <string name="add_app_name_placeholder">Από την εφαρμογή</string> + <string name="add_app_icon">Εικονίδιο</string> + <string name="add_app_icon_default">Προεπιλεγμένο εικονίδιο</string> + <string name="add_app_choose_icon">Επιλογή εικονιδίου</string> + <string name="add_app_clear_icon">Εκκαθάριση</string> + <string name="add_app_icon_suggestions">Από το αποθετήριο</string> + <string name="add_app_icon_searching">Αναζήτηση εικονιδίων…</string> + <string name="add_app_icon_reset">Προεπιλογή</string> + <string name="edit_app_title">Επεξεργασία %1$s</string> + <string name="edit_app_save">Αποθήκευση</string> + <string name="add_app_checking_folder">Έλεγχος φακέλου…</string> + <string name="add_app_folder_linked">Ο φάκελός του είναι συνδεδεμένος στη συνεδρία: %1$s</string> + <string name="add_app_folder_copied">Ο φάκελός του περιέχει προγράμματα Linux, τα οποία ο κοινός χώρος αποθήκευσης δεν μπορεί να εκτελέσει, οπότε αντιγράφεται μέσα στο DroidDeck (%1$s).</string> + <string name="add_app_confirm">Προσθήκη</string> + <string name="add_app_cancel">Ακύρωση</string> + <string name="add_app_runtime_required">Εγκαταστήστε πρώτα το runtime Linux από τη Ρύθμιση.</string> + <string name="add_app_busy">Περιμένετε να τελειώσει το %1$s.</string> + <string name="steam_compat_label">Συμβατό</string> + <string name="proton_compatible_note">Τα builds που φέρουν τη σήμανση «%1$s» στο μενού Συμβατότητα του Steam έχουν τις διορθώσεις prefix του DroidDeck και εκκινούν παιχνίδια εδώ. Η προεπιλογή είναι το Proton Experimental ARM64 (%1$s), ή το Proton 11.0 ARM64 (%1$s) μόλις εγκατασταθεί αυτό το νεότερο build. Οι δικές της καταχωρίσεις Proton της Valve χωρίς τη σήμανση δεν μπορούν να εκκινήσουν παιχνίδι σε αυτή τη συσκευή.</string> + <string name="proton_installed_compatible">Εγκατεστημένο %1$s · %2$s</string> + <string name="common_cancel">Ακύρωση</string> + <string name="common_auto">Αυτόματο</string> + <string name="common_never">Ποτέ</string> + <string name="common_always">Πάντα</string> + <string name="common_uninstall">Κατάργηση εγκατάστασης</string> + <string name="common_check">Έλεγχος</string> + <string name="common_update">Ενημέρωση</string> + <string name="common_checking">Έλεγχος…</string> + <string name="common_working">Σε εξέλιξη…</string> + <string name="common_forget">Διαγραφή</string> + <string name="common_add_ellipsis">Προσθήκη…</string> + <string name="common_use">Χρήση</string> + <string name="common_applies_next_session">Εφαρμόζεται στην επόμενη συνεδρία.</string> + <string name="mode_steam_title">Συνεδρία Steam</string> + <string name="mode_desktop_title">Συνεδρία επιφάνειας εργασίας</string> + <string name="mode_display">Οθόνη</string> + <string name="mode_resolution">Ανάλυση</string> + <string name="mode_res_720">Έως 720p</string> + <string name="mode_res_900">Έως 900p</string> + <string name="mode_res_1080">Έως 1080p</string> + <string name="mode_res_native">Εγγενής</string> + <string name="mode_res_default">%1$s (προεπιλογή)</string> + <string name="mode_res_custom_value">Προσαρμοσμένη · %1$d×%2$d</string> + <string name="mode_res_custom">Προσαρμοσμένη…</string> + <string name="mode_res_note">Το 720p μπορεί να κάνει τα μενού πιο αποκρίσιμα.</string> + <string name="mode_ratio">Αναλογία οθόνης</string> + <string name="mode_ratio_custom">Καθορίζεται από την προσαρμοσμένη ανάλυση.</string> + <string name="mode_ratio_auto">Το Αυτόματο χρησιμοποιεί τουλάχιστον 16:9.</string> + <string name="mode_fps">Όριο καρέ</string> + <string name="mode_fps_note">Περιορίζει ολόκληρη τη συνεδρία. Η οθόνη μεταβαίνει σε ρυθμό ανανέωσης που διαιρείται ακριβώς με το όριο.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Έξοδος HDR10</string> + <string name="mode_hdr_unavailable">Μη διαθέσιμο: %1$s.</string> + <string name="mode_hdr_restart">Κάντε επανεκκίνηση της εφαρμογής για να εφαρμοστεί.</string> + <string name="mode_drivers">Προγράμματα οδήγησης</string> + <string name="mode_gpu_drivers">Προγράμματα οδήγησης GPU</string> + <string name="mode_gpu_drivers_hint">Κοινά για το Steam και την Επιφάνεια εργασίας. Ορίζονται στη σελίδα Στοιχεία.</string> + <string name="mode_touch_controls">Αφή & χειριστήρια</string> + <string name="mode_touch">Αφή</string> + <string name="mode_touch_touchpad">Πινακίδα αφής</string> + <string name="mode_touch_direct">Απευθείας</string> + <string name="mode_touch_note">Αυτόματο: πινακίδα αφής στην Επιφάνεια εργασίας, απευθείας στο Steam.</string> + <string name="mode_osc">Χειριστήρια στην οθόνη</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Το Αυτόματο εμφανίζει τα χειριστήρια όταν δεν είναι συνδεδεμένο χειριστήριο.</string> + <string name="osc_steam_touch">Αφή Steam (beta)</string> + <string name="osc_style_next_session">Τα χειριστήρια αφής του Steam ξεκινούν από την επόμενη συνεδρία Steam</string> + <string name="osc_steam_layout">Διάταξη αφής Steam</string> + <string name="osc_steam_layout_hint">Μετακινήστε, αλλάξτε μέγεθος ή αποκρύψτε τα χειριστήρια αφής αυτού του παιχνιδιού· αποθηκεύεται στο Steam</string> + <string name="mode_controller">Χειριστήριο</string> + <string name="mode_controller_hint">Πώς βλέπει το Steam το χειριστήριό σας. Εφαρμόζεται στην επόμενη συνεδρία.</string> + <string name="mode_controller_deck">Χειριστήριο Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Χειριστήριο Xbox 360</string> + <string name="mode_controller_note">Deck: κουμπί Quick Access και γυροσκόπιο. Steam Controller: το ίδιο, με αίσθηση λαβής στα πίσω κουμπιά. DualShock 4 και DualSense: γυροσκόπιο, και τα trackpad ως πινακίδα αφής τους. Xbox 360: ανοίξτε το Quick Access με Guide+A.</string> + <string name="mode_back">Πίσω</string> + <string name="back_menu_then_qam">Μενού → QAM</string> + <string name="back_qam_then_menu">QAM → Μενού</string> + <string name="mode_session">Συνεδρία</string> + <string name="mode_suspend">Συμπεριφορά παρασκηνίου</string> + <string name="mode_suspend_hint">Όταν η εφαρμογή είναι κρυφή ή η οθόνη κλείνει.</string> + <string name="mode_suspend_manual">Μη αυτόματο</string> + <string name="mode_suspend_native">Εγγενής</string> + <string name="mode_suspend_steam_note">Το Αυτόματο θέτει σε παύση και συνεχίζει όταν εμφανίζεται. Το Εγγενής προετοιμάζει πρώτα το Steam για αδρανοποίηση. Το Μη αυτόματο περιμένει το Συνέχιση. Το Ποτέ συνεχίζει να εκτελείται.</string> + <string name="mode_background_downloads">Διατήρηση των λήψεων σε εξέλιξη</string> + <string name="mode_background_downloads_hint">Καθυστερεί την αναστολή παρασκηνίου όσο το Steam κάνει ενεργά λήψη.</string> + <string name="mode_zram">Συμπίεση zRAM</string> + <string name="mode_zram_hint">Όσο τρέχει ένα παιχνίδι, η μνήμη του Steam συμπιέζεται στο zram της συσκευής, ώστε το παιχνίδι να έχει περισσότερη RAM. Ισχύει την επόμενη φορά που θα ξεκινήσει το Steam.</string> + <string name="mode_zram_unsupported">Μη διαθέσιμο: η συσκευή δεν έχει zram ή swap, ή ο πυρήνας είναι παλαιότερος από 5.4.</string> + <string name="mode_suspend_note">Το Αυτόματο θέτει σε παύση στο παρασκήνιο και συνεχίζει όταν εμφανίζεται. Το Μη αυτόματο περιμένει το Συνέχιση. Το Ποτέ συνεχίζει να εκτελείται.</string> + <string name="mode_startup">Εκκίνηση</string> + <string name="mode_steam_startup">Εκκίνηση του Steam με το DroidDeck</string> + <string name="mode_steam_startup_hint">Ανοίγει τη συνεδρία Steam όταν εκκινείται το DroidDeck.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Έλεγχος για εκδόσεις…</string> + <string name="mode_decky_ready">Έτοιμο για εγκατάσταση %1$s.</string> + <string name="mode_decky_none">Δεν βρέθηκε συμβατό build. Δοκιμάστε ξανά αργότερα.</string> + <string name="mode_decky_installed">Εγκατεστημένο · %1$s</string> + <string name="mode_decky_update">Διαθέσιμη ενημέρωση · %1$s</string> + <string name="mode_decky_current">Ενημερωμένο · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Εγκατάσταση τελευταίας έκδοσης</string> + <string name="mode_decky_on">Ξεκινά με το Steam. Όσο είναι ενεργό, άλλες εφαρμογές σε αυτή τη συσκευή μπορεί να είναι σε θέση να ελέγξουν το Steam.</string> + <string name="mode_decky_off">Ανενεργό. Η θύρα απομακρυσμένου εντοπισμού σφαλμάτων του Steam παραμένει κλειστή.</string> + <string name="mode_decky_remove_title">Κατάργηση εγκατάστασης του Decky Loader;</string> + <string name="mode_decky_remove_text">Καταργεί τον loader. Τα plugins και οι ρυθμίσεις σας διατηρούνται.</string> + <string name="mode_client">Πελάτης</string> + <string name="mode_mangoapp">Επικάλυψη απόδοσης</string> + <string name="mode_mangoapp_hint">Απενεργοποιήστε το αν τα παιχνίδια κολλάνε ή μαυρίζει η οθόνη σε λειτουργία Deck. Εφαρμόζεται στην επόμενη συνεδρία.</string> + <string name="mode_steam_repair">Επιδιόρθωση πελάτη Steam</string> + <string name="mode_steam_repair_hint">Κάνει ξανά λήψη του πελάτη Steam την επόμενη φορά που θα ξεκινήσει το Steam. Χρησιμοποιήστε το αν το Steam παραμένει στην οθόνη φόρτωσης. Τα παιχνίδια, η σύνδεση και οι ρυθμίσεις διατηρούνται.</string> + <string name="mode_steam_repair_queued">Ο πελάτης Steam θα ληφθεί ξανά την επόμενη φορά που θα ξεκινήσει το Steam.</string> + <string name="mode_steam_repair_button">Επιδιόρθωση</string> + <string name="mode_added_art">Εικαστικά</string> + <string name="mode_sgdb_key">Κλειδί API SteamGridDB</string> + <string name="mode_sgdb_key_yours">Το κλειδί σας</string> + <string name="mode_sgdb_edit">Επεξεργασία…</string> + <string name="mode_added_art_hint">Συμπληρώνει τα εικαστικά που λείπουν από το Steam, έπειτα από το SteamGridDB. Τα δικά σας cover.jpg, hero.jpg, logo.png ή icon.png στον φάκελο του παιχνιδιού έχουν προτεραιότητα.</string> + <string name="summary_remove_game">Αφαίρεση %1$s</string> + <string name="mode_added_remove_confirm">Αφαίρεση;</string> + <string name="games_add">Προσθήκη παιχνιδιού</string> + <string name="games_add_title">Προσθήκη παιχνιδιού:</string> + <string name="games_pick_exe_title">Επιλέξτε το exe:</string> + <string name="games_add_unreachable">Αυτή η τοποθεσία δεν είναι διαθέσιμη στη συνεδρία</string> + <string name="mode_added_exe_check">Έλεγχος αυτού του exe</string> + <string name="wincomp_title">Στοιχεία Windows</string> + <string name="wincomp_pad_hint">Τα LB / RB μεταπηδούν ανάμεσα στις ενότητες.</string> + <string name="wincomp_card_none">Κανένα</string> + <string name="wincomp_applies">DLL των Windows που το Proton δεν περιλαμβάνει, από τη λίστα στοιχείων. Ενεργοποιήστε όσα χρειάζεται αυτό το παιχνίδι: τοποθετούνται στον δικό του φάκελο Windows, ποτέ στα αρχεία του, και παραμένουν ανεξάρτητα από το Proton με το οποίο εκτελείται.</string> + <string name="wincomp_offline">Δεν ήταν δυνατή η πρόσβαση στη λίστα στοιχείων. Τα στοιχεία που έχουν ληφθεί ήδη μπορούν ακόμα να αλλάξουν.</string> + <string name="wincomp_recommended">Προτείνεται για αυτό το παιχνίδι</string> + <string name="wincomp_checking">Έλεγχος τι χρειάζεται αυτό το παιχνίδι…</string> + <string name="wincomp_when_online">Διαθέσιμο με σύνδεση στο διαδίκτυο</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Ενεργοποίηση %1$d στοιχείου…</item> + <item quantity="other">Ενεργοποίηση %1$d στοιχείων…</item> + </plurals> + <string name="wincomp_auto_section">Ενεργό για αυτό το παιχνίδι</string> + <string name="wincomp_auto_steam">Το Steam εγκαθιστά το %1$s με το %2$s (εφαρμογή %3$s)</string> + <string name="wincomp_auto_gog">Από τη λίστα του GOG για αυτό το παιχνίδι</string> + <string name="wincomp_auto_epic">Από τις προαπαιτήσεις του Epic για αυτό το παιχνίδι</string> + <string name="wincomp_auto_amazon">Από τα βήματα εγκατάστασης του Amazon για αυτό το παιχνίδι</string> + <string name="wincomp_steam_by_name">Το Steam εγκαθιστά το %1$s με την εφαρμογή %2$s, με αντιστοίχιση ονόματος</string> + <string name="wincomp_suggestions">Αναφέρονται επίσης</string> + <string name="wincomp_suggestion_reason">Αναφέρεται από %1$s· δεν είναι στοιχείο εδώ</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Το παιχνίδι διανέμει το %1$s</string> + <string name="wincomp_found_shipped">Το παιχνίδι διαθέτει το %1$s (συχνά λειτουργεί ως έχει)</string> + <string name="wincomp_already_here">Υπάρχει ήδη σε αυτό το παιχνίδι</string> + <string name="wincomp_no_recommendation">Τίποτα στον φάκελο του παιχνιδιού δεν παραπέμπει σε στοιχείο.</string> + <string name="wincomp_active">Εγκατεστημένα για αυτό το παιχνίδι (%1$d)</string> + <string name="wincomp_all">Όλα τα στοιχεία (%1$d)</string> + <string name="wincomp_installers">Απαιτούν πρόγραμμα εγκατάστασης Windows (%1$d)</string> + <string name="wincomp_installers_note">Αυτά είναι δικά τους προγράμματα εγκατάστασης χωρίς πακέτο μέσα για αποσυμπίεση, και χωρίς καταγραφή ακόμα για ό,τι εγκαθιστούν. Τα περισσότερα είναι παλιά runtime που το Mono μέσα στο Proton ήδη αντικαθιστά· καταγραφές προστίθενται όσο γίνονται.</string> + <string name="wincomp_show">Εμφάνιση</string> + <string name="wincomp_hide">Απόκρυψη</string> + <string name="wincomp_needs_installer">Εκτελεί το δικό του πρόγραμμα εγκατάστασης (χωρίς καταγραφή ακόμα)</string> + <string name="wincomp_unsupported">Δεν υποστηρίζεται ακόμα εδώ</string> + <string name="wincomp_loading">Φόρτωση των στοιχείων…</string> + <string name="wincomp_failed">Δεν ήταν δυνατή η εγκατάσταση: %1$s</string> + <string name="wincomp_downloaded">Λήφθηκε</string> + <string name="wincomp_downloading">Λήψη %1$s</string> + <string name="wincomp_installing">Εγκατάσταση: %1$s</string> + <string name="wincomp_reverting">Απενεργοποίηση…</string> + <string name="wincomp_download_size">Λήψη %1$s</string> + <string name="wincomp_next_launch">Εφαρμόζεται την επόμενη φορά που θα ξεκινήσει το παιχνίδι.</string> + <string name="mode_stretch169">Τέντωμα παιχνιδιών 16:9</string> + <string name="mode_stretch169_hint">Σε οθόνες πιο τετράγωνες από 16:9, τεντώνει τα παιχνίδια για να καλύψουν την οθόνη αντί να εμφανίζονται μαύρες λωρίδες. Εφαρμόζεται στην επόμενη συνεδρία.</string> + <string name="mode_audio">Ήχος</string> + <string name="mode_directaudio">DirectAudio για παιχνίδια</string> + <string name="mode_directaudio_hint">Παρακάμπτει το PulseAudio για μικρότερη καθυστέρηση.</string> + <string name="mode_mic">Μικρόφωνο</string> + <string name="mode_mic_hint">Για φωνητική συνομιλία.</string> + <string name="mode_network">Δίκτυο</string> + <string name="mode_wifi_discovery">Εντοπισμός Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Εμφανίζει ονόματα Wi-Fi και κοντινά δίκτυα στο Steam.</string> + <string name="mode_wifi_location_off">Οι υπηρεσίες τοποθεσίας είναι απενεργοποιημένες.</string> + <string name="mode_wifi_permission_denied">Δεν έχει δοθεί άδεια τοποθεσίας.</string> + <string name="mode_wifi_open_settings">Άνοιγμα ρυθμίσεων</string> + <string name="mode_wifi_continue">Συνέχεια</string> + <string name="mode_wifi_explain_title">Ενεργοποίηση εντοπισμού Wi-Fi;</string> + <string name="mode_wifi_explain_text">Το Android απαιτεί άδεια τοποθεσίας για να διαβάσει ονόματα Wi-Fi και να εντοπίσει κοντινά δίκτυα. Το DroidDeck χρησιμοποιεί αυτή την πρόσβαση για να εμφανίσει αυτά τα δίκτυα στο Steam. Δεν παρακολουθούμε την τοποθεσία σας. Η πρόσβαση στο διαδίκτυο λειτουργεί χωρίς αυτή την άδεια.</string> + <string name="mode_storage">Αποθηκευτικός χώρος παιχνιδιών</string> + <string name="mode_storage_auto">Αυτόματο - η κάρτα SD όταν υπάρχει, καθώς και οι φάκελοι Games σας</string> + <string name="mode_storage_auto_none">Αυτόματο - οι φάκελοι Games σας, καθώς και η κάρτα SD όταν υπάρχει (καμία τώρα)</string> + <string name="mode_storage_internal">Μόνο εσωτερική αποθήκευση</string> + <string name="mode_storage_folder">Φάκελος: %1$s</string> + <string name="mode_second_library">Δεύτερη βιβλιοθήκη</string> + <string name="mode_storage_note">Παιχνίδια που μεταδίδουν δεδομένα από κάρτα SD ή κοινόχρηστο χώρο αποθήκευσης μπορεί να κολλάνε.</string> + <string name="mode_storage_diagnostics">Διαγνωστικά αποθηκευτικού χώρου</string> + <string name="mode_storage_diagnostics_hint">Καταγράφει αποτελέσματα κατανομής και δειγματοληπτικούς χρόνους αποθήκευσης στην Κοινή χρήση αρχείων καταγραφής. Μπορεί να επιβραδύνει τις εγκαταστάσεις όσο είναι ενεργό. Εφαρμόζεται στην επόμενη συνεδρία.</string> + <string name="mode_choose_folder">Επιλογή φακέλου…</string> + <string name="mode_custom_res_title">Προσαρμοσμένη ανάλυση</string> + <string name="mode_custom_res_text">Αντικαθιστά το όριο και την αναλογία. Ένα μέγεθος που δεν ταιριάζει με την οθόνη εμφανίζει μαύρες λωρίδες.</string> + <string name="mode_width">Πλάτος</string> + <string name="mode_height">Ύψος</string> + <string name="mode_custom_res_range">Μεταξύ 320×240 και 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d παιχνίδι</item> + <item quantity="other">%1$d παιχνίδια</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Διαγραφή</string> + <string name="common_restore">Επαναφορά</string> + <string name="common_download">Λήψη</string> + <string name="common_delete_named">Διαγραφή %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Πρόγραμμα οδήγησης runtime</string> + <string name="comp_runtime_driver_hint">Χρησιμοποιείται από το Steam, τα παιχνίδια και την επιφάνεια εργασίας. Εφαρμόζεται στην επόμενη συνεδρία.</string> + <string name="comp_import_turnip">Εισαγωγή zip Turnip…</string> + <string name="comp_display_driver">Πρόγραμμα οδήγησης οθόνης</string> + <string name="comp_display_driver_hint">Σχεδιάζει τα καρέ στην οθόνη και στις δύο λειτουργίες. Κάντε επανεκκίνηση της εφαρμογής για εφαρμογή.</string> + <string name="comp_import_adrenotools">Εισαγωγή zip AdrenoTools…</string> + <string name="comp_never">ποτέ</string> + <string name="comp_nightlies_checked">Έλεγχος Nightlies %1$s</string> + <string name="comp_title">Στοιχεία</string> + <string name="comp_about">Σχετικά με τα Στοιχεία</string> + <string name="comp_check_drivers">Έλεγχος για νέα προγράμματα οδήγησης</string> + <string name="comp_check_nightlies">Έλεγχος των Nightlies για νέα πακέτα</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Το Proton που επιλέγεται εδώ εκτελεί κάθε παιχνίδι που δεν έχει επιλέξει το δικό του στο Steam, και μια αλλαγή που γίνεται στο Steam εμφανίζεται και εδώ. Το Steam αντικαθιστά το Proton της Valve όταν ενημερώνεται· τα πρωτότυπα διατηρούνται ανά build.</string> + <string name="comp_scope">Διαμόρφωση</string> + <string name="comp_profile_configure">Διαμόρφωση προφίλ</string> + <string name="comp_profile">Προφίλ</string> + <string name="comp_scope_general">Προεπιλεγμένο προφίλ</string> + <string name="comp_scope_general_detail">Χρησιμοποιείται αυτόματα από παιχνίδια χωρίς παρακάμψεις.</string> + <string name="comp_profile_game_detail">Αποθηκευμένες ρυθμίσεις που χρησιμοποιούνται αυτόματα όταν εκκινείται το %1$s.</string> + <string name="comp_game_hint">Επιλέξτε μόνο τις ρυθμίσεις που χρειάζεται αυτό το παιχνίδι. Όλα τα υπόλοιπα συνεχίζουν να χρησιμοποιούν το Προεπιλεγμένο προφίλ.</string> + <string name="comp_game_fex">Προεπιλογή FEX</string> + <string name="comp_game_fex_inherited">Χρησιμοποιεί την προεπιλογή του Προεπιλεγμένου προφίλ.</string> + <string name="comp_game_fex_override">Αποθηκεύτηκε προσαρμοσμένη προεπιλογή για αυτό το παιχνίδι.</string> + <string name="comp_game_fex_custom">Προσαρμοσμένες μεταβλητές FEX</string> + <string name="comp_game_use_general">Χρήση Προεπιλεγμένου</string> + <string name="comp_game_compatibility">Συμβατότητα παιχνιδιού</string> + <string name="comp_game_environment_hint">Επιλογές περιβάλλοντος Proton, DXVK, VKD3D και συγχρονισμού για αυτό το παιχνίδι.</string> + <string name="comp_game_proton_inherited">Χρησιμοποιεί το Proton του Προεπιλεγμένου προφίλ.</string> + <string name="comp_game_proton_override">Αποθηκεύτηκε προσαρμοσμένο Proton για αυτό το παιχνίδι μέσω της αντιστοίχισης συμβατότητας του Steam.</string> + <string name="comp_no_proton_short">Χωρίς Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Χρησιμοποιεί το πακέτο του Προεπιλεγμένου προφίλ από %1$s, εκτός αν αυτό το παιχνίδι επιλέξει άλλο πακέτο.</string> + <string name="comp_game_component_general">Χρησιμοποιεί το πακέτο στοιχείων του Προεπιλεγμένου προφίλ.</string> + <string name="comp_game_component_override">Χρησιμοποιεί το %1$s μόνο για αυτό το παιχνίδι.</string> + <string name="comp_game_runtime_options">Επιλογές runtime</string> + <string name="comp_game_environment_other_hint">Άλλες επιλογές περιβάλλοντος Proton, DXVK, VKD3D-Proton και συγχρονισμού ανά παιχνίδι.</string> + <string name="comp_game_saved_next">Το προφίλ του %1$s αποθηκεύτηκε για την επόμενη εκκίνηση του παιχνιδιού.</string> + <string name="game_no_steam_title">Εκκίνηση χωρίς το Steam</string> + <string name="game_no_steam_detail">Το ανοίγει στο Proton/FEX χωρίς το πρόγραμμα Steam· οι λειτουργίες του Steam είναι ανενεργές.</string> + <string name="game_no_steam_on">Ενεργό</string> + <string name="game_steam_with">Ξεκινά με το Steam</string> + <string name="game_steam_without">Ξεκινά χωρίς το Steam</string> + <string name="game_settings_card">Ρυθμίσεις</string> + <string name="game_settings_menu_title">Ρυθμίσεις %1$s</string> + <string name="game_settings_default">Προεπιλογή</string> + <string name="game_settings_default_detail">Επαναφέρει ό,τι άλλαξε για αυτό το παιχνίδι στις ρυθμίσεις της εφαρμογής.</string> + <string name="game_sync_custom">Προσαρμοσμένες μεταβλητές συγχρονισμού</string> + <string name="comp_game_proton_live">Η επιλογή Proton του %1$s αποθηκεύτηκε και είναι διαθέσιμη στο Steam τώρα.</string> + <string name="comp_game_proton_next">Η επιλογή Proton του %1$s αποθηκεύτηκε. Κάντε επανεκκίνηση του Steam πριν εκκινήσετε το παιχνίδι.</string> + <string name="comp_game_proton_not_runnable">Το %1$s δεν μπορεί να χρησιμοποιήσει το επιλεγμένο Proton σε αυτή τη συσκευή.</string> + <string name="comp_game_load_failed">Δεν ήταν δυνατή η φόρτωση του προφίλ του %1$s: %2$s</string> + <string name="comp_game_save_failed">Δεν ήταν δυνατή η αποθήκευση του προφίλ παιχνιδιού: %1$s</string> + <string name="comp_game_reset">Επαναφορά προφίλ παιχνιδιού</string> + <string name="comp_game_reset_title">Επαναφορά του προφίλ του %1$s;</string> + <string name="comp_game_reset_body">Αφαίρεση του Proton, του FEX, του πακέτου στοιχείων, του περιβάλλοντος, του φιλτραρίσματος υφών και των παρακάμψεων στοιχείων Windows αυτού του παιχνιδιού; Θα χρησιμοποιήσει το Προεπιλεγμένο προφίλ.</string> + <string name="comp_game_reset_done">Το %1$s χρησιμοποιεί τώρα το Προεπιλεγμένο προφίλ.</string> + <string name="comp_game_reset_failed">Δεν ήταν δυνατή η πλήρης επαναφορά του προφίλ παιχνιδιού: %1$s</string> + <string name="comp_default_live">Το %1$s εκτελεί τώρα κάθε παιχνίδι που δεν έχει επιλέξει το δικό του Proton στο Steam.</string> + <string name="comp_default_next">Το %1$s θα εκτελεί κάθε παιχνίδι που δεν έχει επιλέξει το δικό του Proton, από την επόμενη φορά που θα ξεκινήσει το Steam.</string> + <string name="comp_default_not_runnable">Το %1$s δεν μπορεί να εκκινήσει παιχνίδια εδώ, οπότε δεν μπορεί να είναι η προεπιλογή.</string> + <string name="comp_default_failed">Δεν ήταν δυνατή η αποθήκευση του προεπιλεγμένου Proton: %1$s</string> + <string name="comp_swapped">%1$s · %2$d αντικαταστάθηκαν</string> + <string name="comp_all_original">%1$s · όλα πρωτότυπα</string> + <string name="comp_game_running_suffix">%1$s · το παιχνίδι εκτελείται</string> + <string name="comp_esync_pack">%1$s · πακέτο droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · χωρίς πακέτο droiddeck-esync ακόμα</string> + <string name="comp_esync_builtin">%1$s · ενσωματωμένο esync, δεν χρειάζεται πακέτο</string> + <string name="comp_gpu_drivers">Προγράμματα οδήγησης GPU</string> + <string name="comp_reapplied">%1$s · επαναφέρθηκε στην εκκίνηση %2$s</string> + <string name="comp_next_queued">Επόμενο: %1$s · μετά το κλείσιμο του παιχνιδιού</string> + <string name="comp_in_use">%1$s σε χρήση: %2$s</string> + <string name="comp_waits">Περιμένει μέχρι να κλείσει το παιχνίδι</string> + <string name="comp_applies_next_game">Εφαρμόζεται την επόμενη φορά που θα ξεκινήσει ένα παιχνίδι</string> + <string name="comp_import_zip">Εισαγωγή .zip</string> + <string name="comp_reading">Ανάγνωση Proton…</string> + <string name="comp_no_proton">Δεν έχει εγκατασταθεί Proton ακόμα. Εκκινήστε το Steam μία φορά για λήψη του ARM64 Proton του, ή προσθέστε GE-Proton, CachyOS ή DroidDeck-Proton από τη Ρύθμιση.</string> + <string name="comp_original">Πρωτότυπο · %1$s</string> + <string name="comp_this_build">%1$s · αυτό το build</string> + <string name="comp_earlier_build">%1$s · προηγούμενο build</string> + <string name="comp_installed_count">Εγκατεστημένα · %1$d</string> + <string name="comp_nothing_stored">Δεν έχει αποθηκευτεί τίποτα για το %1$s ακόμα. Τα δικά του αρχεία αυτού του Proton αποθηκεύονται ως το πρωτότυπό του.</string> + <string name="comp_waits_long">Ένα παιχνίδι εκτελείται σε αυτό το Proton, οπότε αυτό περιμένει μέχρι να κλείσει.</string> + <string name="comp_applies_long">Εφαρμόζεται την επόμενη φορά που θα ξεκινήσει ένα παιχνίδι.</string> + <string name="comp_swap_title">Αντικατάσταση %1$s;</string> + <string name="comp_swap_body">Τοποθέτηση του %1$s στο %2$s; Τα πρωτότυπα αρχεία του παραμένουν αποθηκευμένα. %3$s</string> + <string name="comp_restore_title">Επαναφορά %1$s;</string> + <string name="comp_restore_body">Επαναφορά του πρωτότυπου %1$s στο %2$s; %3$s</string> + <string name="comp_delete_package_body">Αφαιρεί το πακέτο από την εφαρμογή. Μπορείτε να το λάβετε ξανά.</string> + <string name="comp_delete_original_title">Διαγραφή αυτού του πρωτοτύπου;</string> + <string name="comp_delete_original_body">Αυτό το πρωτότυπο %1$s είναι από προηγούμενο build του %2$s. Το πρωτότυπο του τρέχοντος build διατηρείται πάντα.</string> + <string name="comp_nightlies_count">Στα Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Ανανεώστε για να εμφανιστούν τα πακέτα στα Nightlies.</string> + <string name="comp_nothing_new">Τίποτα νέο από τον τελευταίο έλεγχο.</string> + <string name="comp_import_wcp">Εισαγωγή .wcp</string> + <string name="comp_restore_original">Επαναφορά του πρωτοτύπου αυτού του Proton</string> + <string name="comp_restore_original_body">Επαναφορά του πρωτότυπου %2$s του %1$s;</string> + <string name="comp_swap">Αντικατάσταση</string> + <string name="comp_about_text">FEX, DXVK και VKD3D-Proton για κάθε Proton με το οποίο το Steam εκτελεί παιχνίδια.\n\nΕπιλέξτε μια εγκατεστημένη γραμμή για να την αντικαταστήσετε. Εφαρμόζεται την επόμενη φορά που θα ξεκινήσει ένα παιχνίδι, ή μετά το κλείσιμο του τρέχοντος παιχνιδιού.\n\nΟι επιλογές σας επανελέγχονται πριν από κάθε εκκίνηση και επανέρχονται αν κάτι τις άλλαξε. Τα πρωτότυπα αρχεία κάθε Proton διατηρούνται, έτσι οι ενημερώσεις του Steam δεν τα χάνουν ποτέ.</string> + <string name="comp_tag_original">Πρωτότυπο</string> + <string name="comp_tag_in_use">Σε χρήση</string> + <string name="comp_tag_new">Νέο</string> + <string name="comp_tag_stored">Αποθηκευμένο</string> + <string name="perf_title">Απόδοση</string> + <string name="perf_lede">Πυρήνες CPU, διορθώσεις συνεδρίας και το όνομα κεντρικού υπολογιστή. Εφαρμόζεται στην επόμενη συνεδρία.</string> + <string name="perf_client_cores_group">Πυρήνες πελάτη Steam</string> + <string name="perf_override">Παράκαμψη της επιλογής πυρήνων του Steam</string> + <string name="perf_override_hint">Καθηλώνει το Steam, τον βοηθό διεπαφής του και το gamescope στους παρακάτω πυρήνες.</string> + <string name="perf_client_cores">Πυρήνες πελάτη</string> + <string name="perf_client_cores_on">Πυρήνες για το Steam.</string> + <string name="perf_client_cores_off">Ενεργοποιήστε την παράκαμψη για να επιλέξετε.</string> + <string name="perf_game_cores_group">Πυρήνες παιχνιδιού</string> + <string name="perf_game_cores">Πυρήνες παιχνιδιού</string> + <string name="perf_game_cores_hint">Πυρήνες για παιχνίδια. Με όλους επιλεγμένους, το Android τους προγραμματίζει ελεύθερα.</string> + <string name="perf_client_ui">Διεπαφή πελάτη</string> + <string name="perf_glthread">Νηματοποιημένο GL</string> + <string name="perf_glthread_hint">Μπορεί να κάνει τα μενού του Steam πιο αποκρίσιμα.</string> + <string name="perf_zink">Zink: lazy descriptors</string> + <string name="perf_zink_hint">Προτείνεται για προγράμματα οδήγησης χωρίς descriptor buffers.</string> + <string name="perf_noglerror">Παράβλεψη ελέγχων σφαλμάτων GL</string> + <string name="perf_noglerror_hint">Απενεργοποιεί την επικύρωση GL ανά κλήση.</string> + <string name="perf_gsrealtime">gamescope: ουρά GPU πραγματικού χρόνου</string> + <string name="perf_gsrealtime_hint">Δίνει προτεραιότητα στην εργασία GPU του compositor. Μπορεί να εξομαλύνει τον ρυθμό καρέ με κάποιο κόστος για τα παιχνίδια.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Διατήρηση της GPU στη μέγιστη συχνότητά της</string> + <string name="perf_gpuclock_hint">Μόνο Adreno. Λιγότερα κολλήματα, μεγαλύτερη χρήση μπαταρίας και θερμότητα.</string> + <string name="perf_fixes">Διορθώσεις συνεδρίας</string> + <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_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> + <string name="perf_esync_hint">Τα νήματα Windows των παιχνιδιών περιμένουν το ένα το άλλο μέσω eventfd και κοινόχρηστης μνήμης αντί για διαδρομές μέσω wineserver. Χρησιμοποιεί ένα πακέτο droiddeck-esync φτιαγμένο ειδικά για αυτό το build του Proton· τα πακέτα λαμβάνονται αυτόματα. Μέχρι να υπάρξει ένα για νέο build του Proton, το droiddeck-fsync το αναπληρώνει. Εφαρμόζεται στην επόμενη συνεδρία.</string> + <string name="perf_xalia_hint">Απενεργοποιεί τον βοηθό πλοήγησης με χειριστήριο του Proton, που κοστίζει CPU σε κάθε παιχνίδι.</string> + <string name="perf_seccomp">Εκτέλεση του proot χωρίς seccomp</string> + <string name="perf_seccomp_hint">Μπορεί να διορθώσει σφάλματα απόντων syscall σε ορισμένους πυρήνες. Μπορεί να μειώσει την απόδοση.</string> + <string name="perf_fastpath">Ταχεία διαδρομή proot</string> + <string name="perf_fastpath_needs_seccomp">Απαιτεί το φίλτρο seccomp του proot.</string> + <string name="perf_fastpath_hint">Ταχύτερη αναζήτηση αρχείων και λιγότερα κολλήματα. Απενεργοποιήστε το αν ένα πρόγραμμα δεν μπορεί να βρει τα αρχεία του.</string> + <string name="perf_identity">Ταυτότητα συνεδρίας</string> + <string name="perf_hostname">Όνομα κεντρικού υπολογιστή</string> + <string name="perf_hostname_hint">Το όνομα που βλέπει το Steam για αυτή τη συσκευή. Αν το αφήσετε κενό, επανέρχεται σε %1$s.</string> + <string name="perf_hostname_invalid">Μόνο γράμματα, ψηφία και εσωτερικές παύλες, έως 63 χαρακτήρες.</string> + <string name="perf_phantom_warning">Το Android είναι ρυθμισμένο να διακόπτει αυτή τη συνεδρία</string> + <string name="driver_installed">Εγκατεστημένο</string> + <string name="driver_available">Διαθέσιμο για λήψη</string> + <string name="driver_nothing_new">Τίποτα νέο από τον τελευταίο έλεγχο.</string> + <string name="driver_restore_builtin">Επαναφορά ενσωματωμένων προγραμμάτων οδήγησης</string> + <string name="driver_delete_builtin">Ενσωματωμένο στην εφαρμογή: αυτό αφαιρεί τα αποσυμπιεσμένα αρχεία του και το αποκρύπτει. Η Επαναφορά ενσωματωμένων προγραμμάτων οδήγησης το επαναφέρει.</string> + <string name="driver_delete_bundle">Το ένα μισό ενός πακέτου Android + Linux: αφαιρούνται και τα δύο μισά. Ένα πρόγραμμα οδήγησης σε χρήση επανέρχεται στο προεπιλεγμένο.</string> + <string name="driver_delete_plain">Τα αρχεία του αφαιρούνται από την εφαρμογή.</string> + <string name="driver_delete_in_use">Τα αρχεία του αφαιρούνται. Είναι σε χρήση, οπότε το προεπιλεγμένο παίρνει τη θέση του.</string> + <string name="drawer_page_display">Οθόνη</string> + <string name="drawer_page_effects">Εφέ</string> + <string name="drawer_page_controls">Χειριστήρια</string> + <string name="drawer_page_components">Στοιχεία</string> + <string name="drawer_page_controller">Χειριστήριο</string> + <string name="drawer_page_settings">Ρυθμίσεις</string> + <string name="drawer_page_desc">Σελίδα %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Επιφάνεια εργασίας</string> + <string name="drawer_steam_menu">Μενού Steam</string> + <string name="drawer_quick_access">Quick access</string> + <string name="drawer_open_qam">Άνοιγμα Quick Access Menu</string> + <string name="drawer_prev_page">Προηγούμενη σελίδα</string> + <string name="drawer_next_page">Επόμενη σελίδα</string> + <string name="drawer_hud">HUD απόδοσης</string> + <string name="drawer_scaling">Λειτουργία κλιμάκωσης</string> + <string name="drawer_scaling_sharpness">Οξύτητα κλιμάκωσης</string> + <string name="drawer_effects">Εφέ οθόνης</string> + <string name="drawer_effects_hint">Σε πραγματικό χρόνο. Κοστίζει λίγο χρόνο GPU όσο κάποιο εφέ είναι ενεργό.</string> + <string name="drawer_look">Προεπιλογές</string> + <string name="drawer_look_custom">Προσαρμοσμένο</string> + <string name="drawer_effects_advanced">Για προχωρημένους</string> + <string name="widgets_expanded">Αναπτυγμένο</string> + <string name="widgets_collapsed">Συμπτυγμένο</string> + <string name="drawer_cas">Όξυνση (CAS)</string> + <string name="drawer_cas_level">Επίπεδο όξυνσης</string> + <string name="drawer_fake_hdr">Ψεύτικο HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Εκκίνηση SteamVR</string> + <string name="steamvr_checking">Έλεγχος SteamVR…</string> + <string name="drawer_deband">Αφαίρεση λωρίδων</string> + <string name="drawer_deband_strength">Ένταση αφαίρεσης λωρίδων</string> + <string name="drawer_brightness">Φωτεινότητα</string> + <string name="drawer_contrast">Αντίθεση</string> + <string name="drawer_gamma">Γάμα</string> + <string name="drawer_saturation">Κορεσμός</string> + <string name="drawer_fxaa">FXAA (εξομάλυνση ακμών)</string> + <string name="drawer_toon">Περιγράμματα Toon</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Φιλτράρισμα υφών</string> + <string name="drawer_texture_hint">Παιχνίδια DirectX 9–11, από την επόμενη εκκίνησή τους.</string> + <string name="drawer_anisotropy">Ανισοτροπικό φιλτράρισμα</string> + <string name="drawer_texture_sharpness">Οξύτητα υφών</string> + <string name="drawer_texture_sharpness_note">Μια αρνητική απόκλιση mip: πιο έντονες υφές, κάποιο τρεμόπαιγμα. Το Αυτόματο ταιριάζει με το πόσο μεγεθύνεται η συνεδρία στην οθόνη.</string> + <string name="drawer_touch_auto">Αυτόματο (%1$s)</string> + <string name="drawer_keyboard">Πληκτρολόγιο</string> + <string name="drawer_latency">Καθυστέρηση</string> + <string name="drawer_low_latency_controller">Χειριστήριο χαμηλής καθυστέρησης</string> + <string name="drawer_low_latency_controller_hint">Το χειριστήριο αναφέρει στα 1000 Hz αντί για 250 Hz. Λίγο περισσότερο CPU.</string> + <string name="drawer_low_latency_touch">Αφή χαμηλής καθυστέρησης</string> + <string name="drawer_low_latency_touch_hint">Οι αφές παρακάμπτουν την ομαδοποίηση καρέ, οπότε ο χειρισμός αφής του Steam τρέχει στα 1000 Hz. Λίγο περισσότερο CPU.</string> + <string name="drawer_pc_keyboard">Πληκτρολόγιο PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Δεύτερη οθόνη</string> + <string name="drawer_second_screen_mode">Λειτουργία</string> + <string name="drawer_second_screen_shows">Εμφανίζει</string> + <string name="drawer_android_apps">Εφαρμογές Android</string> + <string name="drawer_launch_app">Εκκίνηση εφαρμογής</string> + <string name="common_hide">Απόκρυψη</string> + <string name="common_show">Εμφάνιση</string> + <string name="drawer_no_apps">Δεν υπάρχουν εφαρμογές για εκκίνηση</string> + <string name="drawer_session_behavior">Συμπεριφορά συνεδρίας</string> + <string name="drawer_suspend_hint">Εφαρμόζεται τώρα και σε επόμενες συνεδρίες σε αυτή τη λειτουργία.</string> + <string name="drawer_next_session">Επόμενη συνεδρία</string> + <string name="drawer_support">Υποστήριξη</string> + <string name="drawer_logs">Αρχεία καταγραφής συνεδρίας</string> + <string name="drawer_logs_hint">Επισυνάψτε σε αναφορά σφάλματος</string> + <string name="drawer_share_logs">Κοινή χρήση αρχείων καταγραφής</string> + <string name="drawer_background">Παρασκήνιο</string> + <string name="drawer_stop">Διακοπή</string> + <string name="drawer_stop_title">Διακοπή συνεδρίας;</string> + <string name="drawer_running_now">Εκτελείται τώρα</string> + <string name="drawer_no_game">Κανένα παιχνίδι δεν εκτελείται σε Proton</string> + <string name="drawer_selected_profile">Προφίλ παιχνιδιού</string> + <string name="drawer_selected_profile_none">Οι λεπτομέρειες του προφίλ δεν είναι διαθέσιμες ακόμα.</string> + <string name="drawer_profile_refresh_failed_initial">Δεν ήταν δυνατή η φόρτωση προφίλ παιχνιδιών. Νέα προσπάθεια αυτόματα.</string> + <string name="drawer_profile_refresh_failed_stale">Δεν ήταν δυνατή η ανανέωση προφίλ παιχνιδιών. Εμφανίζονται τα τελευταία διαθέσιμα δεδομένα· νέα προσπάθεια αυτόματα.</string> + <string name="drawer_profile_inspect_hint">Προβολή και επεξεργασία των αποθηκευμένων ρυθμίσεων που θα χρησιμοποιηθούν στην επόμενη εκκίνηση.</string> + <string name="drawer_profile_default">Χρήση Προεπιλεγμένου προφίλ</string> + <string name="drawer_profile_custom">Προσαρμοσμένο προφίλ</string> + <string name="drawer_component_inherited">Χρήση %1$s από το Προεπιλεγμένο προφίλ.</string> + <string name="drawer_game_components_note">Οι αλλαγές αποθηκεύονται στο προφίλ του %1$s και εφαρμόζονται την επόμενη φορά που θα εκκινήσει το παιχνίδι.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d παράκαμψη παιχνιδιού</item> + <item quantity="other">%1$d παρακάμψεις παιχνιδιού</item> + </plurals> + <string name="drawer_no_proton">Δεν έχει εγκατασταθεί Proton ακόμα.</string> + <string name="drawer_game_running">παιχνίδι σε εκτέλεση</string> + <string name="drawer_reapplied">επαναφέρθηκε στην εκκίνηση %1$s</string> + <string name="drawer_original">Πρωτότυπο</string> + <string name="drawer_components_note">Εισαγωγή και διαγραφή στη σελίδα Στοιχεία.</string> + <string name="setup_check_done">Έγινε</string> + <string name="setup_check_warn">Χρειάζεται προσοχή</string> + <string name="setup_check_busy">Σε εξέλιξη</string> + <string name="setup_limit_adb_failed">Ελέγξτε τη διεύθυνση IP και τη θύρα του Ασύρματου εντοπισμού σφαλμάτων, ή συζεύξτε ξανά αν το Android αφαίρεσε αυτή τη συσκευή.</string> + <string name="setup_install">Εγκατάσταση</string> + <string name="setup_manage">Διαχείριση</string> + <string name="setup_tab_overview">Επισκόπηση</string> + <string name="setup_tab_controller">Χειριστήριο</string> + <string name="setup_tab_session">Συνεδρία</string> + <string name="setup_tab_launcher">Εκκινητής</string> + <string name="setup_title">Ρύθμιση</string> + <string name="setup_all_set">● Όλα έτοιμα</string> + <string name="setup_n_ready">%1$d από %2$d έτοιμα</string> + <string name="setup_system_check">Έλεγχος συστήματος</string> + <string name="setup_gpu_supported">Η συσκευή υποστηρίζεται</string> + <string name="setup_gpu_untested">Μη δοκιμασμένη GPU</string> + <string name="setup_gpu_unsupported">Η GPU δεν υποστηρίζεται</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Το Steam απαιτεί πρόγραμμα οδήγησης Adreno· το %1$s μπορεί να εμφανίσει μαύρη οθόνη</string> + <string name="setup_runtime">Runtime Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Δεν έχει εγκατασταθεί · περίπου 3 GB, εγκαθίσταται στο πρώτο Play</string> + <string name="setup_installed">Εγκατεστημένο</string> + <string name="setup_runtime_update">%1$s · διαθέσιμη ενημέρωση</string> + <string name="setup_runtime_current">%1$s · ενημερωμένο</string> + <string name="setup_limit">Όριο θυγατρικών διαδικασιών</string> + <string name="setup_limit_on">Ενεργό · Το Android μπορεί να κλείσει το Steam. Η απενεργοποίησή του διαρκεί ένα λεπτό.</string> + <string name="setup_limit_unset">Δεν έχει ορισθεί · Το Android μπορεί να κλείσει το Steam. Η απενεργοποίησή του διαρκεί ένα λεπτό.</string> + <string name="setup_limit_unknown">Δεν ήταν δυνατός ο έλεγχος · η απενεργοποίηση διαρκεί ένα λεπτό.</string> + <string name="setup_fix_it">Διόρθωση</string> + <string name="setup_details">Λεπτομέρειες</string> + <string name="setup_dev_options">Επιλογές προγραμματιστή</string> + <string name="setup_use_wireless">Χρήση Ασύρματου εντοπισμού σφαλμάτων</string> + <string name="setup_check_again">Έλεγχος ξανά</string> + <string name="setup_limit_turn_on">Ενεργοποίηση ορίου</string> + <string name="setup_account">Λογαριασμός Steam</string> + <string name="setup_signed_in_offline">Συνδεδεμένος ως %1$s · λειτουργία εκτός σύνδεσης</string> + <string name="setup_signed_in">Συνδεδεμένος ως %1$s</string> + <string name="setup_sign_in">Πατήστε Play και συνδεθείτε στο Steam</string> + <string name="setup_tools">Εργαλεία</string> + <string name="setup_controller">Χειριστήριο</string> + <string name="setup_controller_unavailable">Οι ρυθμίσεις χειριστηρίου δεν είναι διαθέσιμες.</string> + <string name="setup_session">Συνεδρία</string> + <string name="setup_logs">Αρχεία καταγραφής συνεδρίας</string> + <string name="setup_logs_hint">Αποθηκεύονται μετά από κάθε συνεδρία</string> + <string name="setup_agent_commands">Εργαλεία εντοπισμού σφαλμάτων</string> + <string name="setup_latest_logs">Πιο πρόσφατα αρχεία καταγραφής συνεδρίας</string> + <string name="setup_saved_logs">Αποθηκευμένα αρχεία καταγραφής συνεδρίας</string> + <string name="setup_saved_logs_hint">Διατηρεί τα %1$d πιο πρόσφατα</string> + <string name="setup_clear_logs">Εκκαθάριση αρχείων καταγραφής</string> + <string name="setup_reset_settings">Επαναφορά όλων των ρυθμίσεων</string> + <string name="setup_reset_settings_hint">Επαναφέρει κάθε ρύθμιση στην προεπιλεγμένη τιμή</string> + <string name="setup_reset_settings_button">Επαναφορά</string> + <string name="setup_reset_settings_title">Επαναφορά όλων των ρυθμίσεων;</string> + <string name="setup_reset_settings_body">Οι ρυθμίσεις εικόνας, απόδοσης, χειριστηρίου, θέματος, γλώσσας και εκκινητή επιστρέφουν στις προεπιλογές. Τα παιχνίδια, η σύνδεση στο Steam, οι λογαριασμοί καταστημάτων, τα ληφθέντα προγράμματα οδήγησης και οι φάκελοι αποθήκευσης παραμένουν.</string> + <string name="setup_reset_settings_profiles">Επαναφορά και των προφίλ παιχνιδιών (Proton, FEX, στοιχεία και περιβάλλον ανά παιχνίδι, καθώς και το περιβάλλον του προφίλ Προεπιλογή)</string> + <string name="setup_reset_settings_session_running">Σταμάτησε τη συνεδρία πριν κάνεις επαναφορά ρυθμίσεων.</string> + <string name="setup_reset_settings_partial">Οι ρυθμίσεις επαναφέρθηκαν, αλλά όχι όλες. Οι λεπτομέρειες είναι στα αρχεία καταγραφής.</string> + <string name="setup_offline">Λειτουργία εκτός σύνδεσης</string> + <string name="setup_sign_in_first">Συνδεθείτε πρώτα στο Steam</string> + <string name="setup_launcher">Εκκινητής</string> + <string name="setup_language">Γλώσσα</string> + <string name="setup_language_hint">Το χρησιμοποιεί και το Steam, από την επόμενη φορά που θα ξεκινήσει.</string> + <string name="setup_language_system">Προεπιλογή συστήματος (%1$s)</string> + <string name="setup_language_system_short">Προεπιλογή συστήματος</string> + <string name="setup_app_scale">Κλίμακα εφαρμογής</string> + <string name="setup_app_scale_hint">Κείμενο και χειριστήρια του DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (Προεπιλογή)</string> + <string name="setup_theme">Θέμα</string> + <string name="setup_theme_hint">Εμφάνιση εκκινητή</string> + <string name="setup_home">Χρήση ως αρχική οθόνη</string> + <string name="setup_home_on">Το DroidDeck μπορεί να είναι η εφαρμογή αρχικής οθόνης</string> + <string name="setup_home_off">Το DroidDeck δεν προτείνεται ποτέ ως εφαρμογή αρχικής οθόνης</string> + <string name="setup_orientation">Προσανατολισμός</string> + <string name="setup_orientation_auto">Αυτόματος οριζόντιος προσανατολισμός</string> + <string name="setup_orientation_landscape">Οριζόντιος προσανατολισμός</string> + <string name="setup_orientation_reverse">Αντίστροφος οριζόντιος προσανατολισμός</string> + <string name="setup_fullscreen">Πλήρης οθόνη</string> + <string name="setup_fullscreen_on">Αποκρύπτει τις γραμμές κατάστασης και πλοήγησης του Android</string> + <string name="setup_fullscreen_off">Εμφανίζει τις γραμμές κατάστασης και πλοήγησης του Android</string> + <string name="setup_default_home">Προεπιλεγμένη εφαρμογή αρχικής οθόνης</string> + <string name="setup_choose_home">Επιλογή εφαρμογής αρχικής οθόνης</string> + <string name="setup_choose">Επιλογή</string> + <string name="setup_linux_apps">Εφαρμογές Linux (beta)</string> + <string name="setup_tool_files">Αρχεία</string> + <string name="setup_tool_files_hint">Περιήγηση και διαχείριση αρχείων</string> + <string name="setup_tool_protons">Εκδόσεις Proton</string> + <string name="setup_tool_protons_hint">Εγκατάσταση builds Proton για ARM64</string> + <string name="setup_tool_performance">Απόδοση</string> + <string name="setup_tool_performance_hint">Ανάθεση πυρήνων CPU</string> + <string name="setup_tool_roms">Φάκελος ROM</string> + <string name="setup_tool_roms_hint">Πού αποθηκεύονται τα παιχνίδια προσομοιωτών</string> + <string name="setup_card_components">Στοιχεία</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Χειριστήρια</string> + <string name="setup_card_controls_hint">Αντιστοίχιση κουμπιών</string> + <string name="store_tab_discover">Ανακάλυψη</string> + <string name="store_tab_search">Αναζήτηση</string> + <string name="store_tab_installed">Εγκατεστημένα</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Κατάστημα</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Το Flatpak είναι έτοιμο</string> + <string name="store_needs_runtime">Εγκαταστήστε πρώτα το runtime Linux από τη Ρύθμιση.</string> + <string name="store_setup_title">Ρύθμιση του Flatpak</string> + <string name="store_setup_text">Προσθέτει το Flatpak και το συνδέει με το Flathub (περίπου 20 MB). Η πρώτη εφαρμογή κάνει επίσης λήψη του runtime της.</string> + <string name="store_setting_up">Ρύθμιση…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Ενημερώσεις</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Εκκίνηση…</string> + <string name="store_categories">Κατηγορίες</string> + <string name="store_unreachable">Δεν ήταν δυνατή η πρόσβαση στο Flathub. Ελέγξτε τη σύνδεσή σας και δοκιμάστε ξανά.</string> + <string name="store_try_again">Δοκιμάστε ξανά</string> + <string name="store_search_label">Αναζήτηση στο Flathub</string> + <string name="store_search_placeholder">Firefox, παιχνίδια, προσομοιωτές…</string> + <string name="store_search">Αναζήτηση</string> + <string name="store_all">Όλα</string> + <string name="store_searching">Αναζήτηση…</string> + <string name="store_search_hint">Αναζητήστε με όνομα ή επιλέξτε κατηγορία. Αναφέρονται μόνο εφαρμογές ARM64.</string> + <string name="store_no_results">Καμία εφαρμογή ARM64 στο Flathub δεν ταιριάζει με αυτό.</string> + <string name="store_results">Αποτελέσματα</string> + <string name="store_check_updates">Έλεγχος για ενημερώσεις</string> + <string name="store_update_all">Ενημέρωση όλων (%1$d)</string> + <string name="store_all_current">● Όλα είναι ενημερωμένα</string> + <string name="store_no_apps">Δεν υπάρχουν εφαρμογές ακόμα. Βρείτε κάποιες στην Ανακάλυψη ή την Αναζήτηση.</string> + <string name="store_setup_first_note">Ρυθμίστε το Flatpak για να εγκαταστήσετε εφαρμογές.</string> + <string name="store_update_available_prefix">Διαθέσιμη ενημέρωση · %1$s</string> + <string name="store_open">Άνοιγμα</string> + <string name="store_details">Λεπτομέρειες</string> + <string name="store_remove">Αφαίρεση</string> + <string name="store_press_again">Πατήστε ξανά για αφαίρεση</string> + <string name="store_installing">Εγκατάσταση…</string> + <string name="store_install">Εγκατάσταση</string> + <string name="store_setup_first">Ρυθμίστε πρώτα το Flatpak</string> + <string name="store_download_size">Λήψη %1$s</string> + <string name="store_installed_chip">● Εγκατεστημένο</string> + <string name="store_details_failed">Δεν ήταν δυνατή η φόρτωση της σελίδας Flathub αυτής της εφαρμογής.</string> + <string name="store_loading">Φόρτωση από το Flathub…</string> + <string name="store_no_arm">Δεν υπάρχει build ARM64 στο Flathub, οπότε δεν μπορεί να εγκατασταθεί εδώ.</string> + <string name="store_screenshots">Στιγμιότυπα οθόνης</string> + <string name="store_about">Σχετικά</string> + <string name="store_app_id">ID εφαρμογής</string> + <string name="store_license">Άδεια χρήσης</string> + <string name="store_runtime">Runtime</string> + <string name="store_installed_size">Μέγεθος εγκατάστασης</string> + <string name="store_installed_size_value">%1$s (συν το κοινό runtime του)</string> + <string name="store_website">Ιστότοπος</string> + <string name="store_verified">Επιβεβαιωμένο</string> + <string name="upd_title">Ενημερώσεις</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Ελέγχθηκε %1$s</string> + <string name="upd_not_checked">Δεν έχει ελεγχθεί ακόμα</string> + <string name="upd_perm_title">Επιτρέψτε στο DroidDeck να ενημερωθεί μόνο του</string> + <string name="upd_perm_text">Στην επόμενη οθόνη, ενεργοποιήστε την Αποδοχή από αυτή την πηγή και επιστρέψτε εδώ. Η ενημέρωση συνεχίζεται μόνη της.</string> + <string name="upd_open_settings">Άνοιγμα ρυθμίσεων</string> + <string name="upd_not_now">Όχι τώρα</string> + <string name="upd_signed_status">Υπογεγραμμένο διαφορετικά</string> + <string name="upd_signed_headline">Δεν γίνεται ενημέρωση επί τόπου</string> + <string name="upd_signed_detail">Αυτή η έκδοση δεν είναι υπογεγραμμένη με το κλειδί κυκλοφορίας του DroidDeck, οπότε οι ενημερώσεις δεν μπορούν να εγκατασταθούν πάνω της. Απεγκαταστήστε την για να αλλάξετε.</string> + <string name="upd_available">Υπάρχει ενημέρωση</string> + <string name="upd_blocked_status">Δεν γίνεται εγκατάσταση</string> + <string name="upd_switch">Έτοιμο για αλλαγή</string> + <string name="upd_ahead_status">Μπροστά από το Stable</string> + <string name="upd_ahead_headline">Είστε μπροστά από το Stable</string> + <string name="upd_ahead_detail">Αυτό το build είναι νεότερο από το τελευταίο Stable. Θα μεταβείτε στο Stable με την επόμενη κυκλοφορία του.</string> + <string name="upd_gone_status">Η δοκιμή τελείωσε</string> + <string name="upd_gone_headline">Αυτή η δοκιμή έχει τελειώσει</string> + <string name="upd_gone_detail">Η διόρθωσή της συγχωνεύτηκε ή εγκαταλείφθηκε. Ακολουθήστε το Preview για τις νεότερες διορθώσεις.</string> + <string name="upd_current_status">Ενημερωμένο</string> + <string name="upd_current_headline">Έχετε την πιο πρόσφατη έκδοση %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Ενημέρωση%1$s</string> + <string name="upd_install_button">Εγκατάσταση%1$s</string> + <string name="upd_install_anyway">Εγκατάσταση Stable %1$s παρόλα αυτά</string> + <string name="upd_follow_preview">Ακολούθηση Preview</string> + <string name="upd_stop_session">Διακόψτε την τρέχουσα συνεδρία για ενημέρωση.</string> + <string name="upd_less">Λιγότερα</string> + <string name="upd_more">Περισσότερα</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Νέο build Preview</string> + <string name="upd_new_test">Δοκιμαστικό build PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">ΚΑΝΑΛΙ ΕΝΗΜΕΡΩΣΗΣ</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Δοκιμασμένες εκδόσεις, για τους περισσότερους</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Νεότερες διορθώσεις, πριν το Stable</string> + <string name="upd_preview_current">Ενημερωμένο</string> + <string name="upd_tests">Δοκιμαστικά builds</string> + <string name="upd_tests_hint">Δοκιμάστε μια διόρθωση πριν κυκλοφορήσει</string> + <string name="upd_tests_none">Κανένα προς το παρόν</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Δεν έχει κατασκευαστεί για αυτή την έκδοση του DroidDeck</string> + <string name="upd_updated">Ενημερώθηκε %1$s</string> + <string name="upd_test_name">η δοκιμή PR #%1$d</string> + <string name="upd_while_ago">πριν από λίγο</string> + <string name="upd_just_now">μόλις τώρα</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d προς δοκιμή</item> + <item quantity="other">%1$d προς δοκιμή</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Αλλαγές από το build σας · %1$d build πίσω</item> + <item quantity="other">Αλλαγές από το build σας · %1$d builds πίσω</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Πρόσφατες αλλαγές · %1$d build</item> + <item quantity="other">Πρόσφατες αλλαγές · %1$d builds</item> + </plurals> + <string name="gate_title">Μία ρύθμιση Android για αλλαγή</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Το Android διακόπτει εφαρμογές που ξεκινούν πολλές διαδικασίες παρασκηνίου, και το Steam ξεκινά δεκάδες. Μέχρι να αλλάξει αυτό, τα παιχνίδια κλείνουν χωρίς σφάλμα.</string> + <string name="gate_fix_for_me">Διόρθωσέ το για εμένα</string> + <string name="gate_toggle_steps">Ενεργοποιήστε «Απενεργοπ. περιορισμών σε θυγατρικές διεργασίες» και επιστρέψτε εδώ. Αφήστε τις Επιλογές προγραμματιστή ενεργές, διαφορετικά ο διακόπτης απενεργοποιείται ξανά.</string> + <string name="gate_open_dev">Άνοιγμα Επιλογών προγραμματιστή</string> + <string name="gate_no_toggle">Αυτή η έκδοση Android δεν έχει διακόπτη για αυτό, οπότε το DroidDeck το αλλάζει μέσω Ασύρματου εντοπισμού σφαλμάτων. Διαρκεί περίπου ένα λεπτό, χωρίς υπολογιστή.</string> + <string name="gate_needs_wifi">Ο Ασύρματος εντοπισμός σφαλμάτων απαιτεί Wi-Fi. Οποιοδήποτε δίκτυο λειτουργεί· δεν απαιτείται σύνδεση στο διαδίκτυο.</string> + <string name="gate_needs_notifications">Ο κωδικός σύζευξης εμφανίζεται σε ειδοποίηση. Επιτρέψτε ειδοποιήσεις για το DroidDeck, ή χρησιμοποιήστε Άλλοι τρόποι.</string> + <string name="gate_allow_notifications">Αποδοχή ειδοποιήσεων</string> + <string name="gate_step1">Ανοίξτε Ρυθμίσεις → Επιλογές προγραμματιστή → Ασύρματος εντοπισμός σφαλμάτων και ενεργοποιήστε τον</string> + <string name="gate_step2">Πατήστε «Σύζευξη συσκευής με κωδικό σύζευξης»</string> + <string name="gate_step3">Πληκτρολογήστε τον κωδικό στην ειδοποίηση του DroidDeck</string> + <string name="gate_waiting">Αναμονή για το αναδυόμενο παράθυρο σύζευξης…</string> + <string name="gate_code_needed">Βρέθηκε αναδυόμενο παράθυρο. Εισαγάγετε τον κωδικό του στην ειδοποίηση.</string> + <string name="gate_status">Κατάσταση</string> + <string name="gate_polling">Έλεγχος κάθε 2 δευτερόλεπτα. Αυτή η σελίδα κλείνει όταν είναι απενεργοποιημένο.</string> + <string name="gate_other_ways">Άλλοι τρόποι</string> + <string name="gate_other_toggle">Ασύρματος εντοπισμός σφαλμάτων, μη αυτόματη διεύθυνση, ADB υπολογιστή</string> + <string name="gate_other_no_toggle">Μη αυτόματη διεύθυνση, ADB υπολογιστή, Επιλογές προγραμματιστή</string> + <string name="gate_use_wireless_instead">Χρήση Ασύρματου εντοπισμού σφαλμάτων αντ\' αυτού</string> + <string name="gate_some_roms">Ορισμένες ROM προσθέτουν τον διακόπτη ούτως ή άλλως. Αναζητήστε «θυγατρική διαδικασία» στις Επιλογές προγραμματιστή.</string> + <string name="gate_manual_hint">Αν η ειδοποίηση δεν λειτουργεί, εισαγάγετε τη διεύθυνση και τον κωδικό του αναδυόμενου παραθύρου εσείς.</string> + <string name="gate_enter_manually">Μη αυτόματη εισαγωγή διεύθυνσης</string> + <string name="gate_from_computer">Από υπολογιστή με ADB:</string> + <string name="gate_copy_command">Αντιγραφή εντολής</string> + <string name="gate_choose_display">Επιλέξτε σε ποια οθόνη θα ανοίξουν οι Ρυθμίσεις Android.</string> + <string name="gate_main_screen">Κύρια οθόνη</string> + <string name="wadb_finding_port">Έγινε σύζευξη. Αναζήτηση θύρας Ασύρματου εντοπισμού σφαλμάτων…</string> + <string name="wadb_enter_port">Έγινε σύζευξη. Εισαγάγετε τη θύρα από τις Ρυθμίσεις.</string> + <string name="wadb_applying">Η συσκευή βρέθηκε. Εφαρμογή της ρύθμισης…</string> + <string name="wadb_apply_failed">Δεν ήταν δυνατή η αυτόματη εφαρμογή. Ελέγξτε την παρακάτω διεύθυνση και δοκιμάστε ξανά. %1$s</string> + <string name="wadb_title_wireless">Ασύρματος εντοπισμός σφαλμάτων</string> + <string name="wadb_title_done">Το όριο θυγατρικών διαδικασιών ενημερώθηκε</string> + <string name="wadb_title">Αλλαγή του ορίου θυγατρικών διαδικασιών</string> + <string name="wadb_lede_compact0">Αν η επιλογή λείπει, κάντε σύζευξη μέσω Ασύρματου εντοπισμού σφαλμάτων.</string> + <string name="wadb_lede_compact1">Έγινε σύζευξη. Ελέγξτε τη διεύθυνση IP και τη θύρα στον Ασύρματο εντοπισμό σφαλμάτων.</string> + <string name="wadb_lede_done">Το όριο θυγατρικών διαδικασιών ενημερώθηκε.</string> + <string name="wadb_lede0">Χρησιμοποιήστε το βήμα 2 αν οι Επιλογές προγραμματιστή δεν έχουν ρύθμιση θυγατρικών διαδικασιών. Ανοίξτε Επιλογές προγραμματιστή → Ασύρματος εντοπισμός σφαλμάτων → Σύζευξη συσκευής με κωδικό σύζευξης.</string> + <string name="wadb_lede1">Έγινε σύζευξη. Χρησιμοποιήστε την παρακάτω διεύθυνση, ή ενημερώστε την από Ασύρματος εντοπισμός σφαλμάτων → Διεύθυνση IP & θύρα.</string> + <string name="wadb_lede_done_long">Το όριο θυγατρικών διαδικασιών ενημερώθηκε μέσω Ασύρματου εντοπισμού σφαλμάτων.</string> + <string name="wadb_confirmed_on">Το Android επιβεβαίωσε ότι το όριο είναι ενεργό.</string> + <string name="wadb_confirmed_off">Το Android επιβεβαίωσε ότι το όριο είναι ανενεργό.</string> + <string name="wadb_pair_group">2 · Σύζευξη Ασύρματου εντοπισμού σφαλμάτων</string> + <string name="wadb_pair_address">Διεύθυνση IP & θύρα αναδυόμενου παραθύρου σύζευξης</string> + <string name="wadb_pin">Κωδικός σύζευξης (PIN)</string> + <string name="wadb_pin_placeholder">6 ψηφία</string> + <string name="wadb_pair">Σύζευξη</string> + <string name="wadb_apply_group">2 · Εφαρμογή μέσω Ασύρματου εντοπισμού σφαλμάτων</string> + <string name="wadb_connect_address">Διεύθυνση IP & θύρα σύνδεσης</string> + <string name="wadb_pair_again">Σύζευξη ξανά</string> + <string name="wadb_turn_off">Απενεργοποίηση ορίου</string> + <string name="wadb_other_ways">Άλλοι τρόποι αλλαγής</string> + <string name="wadb_dev_try_first">1 · Επιλογές προγραμματιστή (δοκιμάστε πρώτα)</string> + <string name="wadb_restrict_on">Απενεργοποιήστε «Απενεργοπ. περιορισμών σε θυγατρικές διεργασίες».</string> + <string name="wadb_restrict_off">Ενεργοποιήστε «Απενεργοπ. περιορισμών σε θυγατρικές διεργασίες».</string> + <string name="wadb_computer_last">3 · ADB υπολογιστή (τελευταία λύση)</string> + <string name="wadb_only_if">Μόνο αν ο Ασύρματος εντοπισμός σφαλμάτων δεν είναι διαθέσιμος.</string> + <string name="wadb_computer_group">3 · ADB υπολογιστή (τελευταία λύση)</string> + <string name="ctrl_osc_hint">Όταν εμφανίζονται τα χειριστήρια αφής σε μια συνεδρία</string> + <string name="ctrl_color">Χρώμα</string> + <string name="ctrl_color_hint">Απόχρωση των κουμπιών οθόνης</string> + <string name="ctrl_custom">Προσαρμοσμένο</string> + <string name="ctrl_opacity">Διαφάνεια</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Μέγεθος κουμπιών</string> + <string name="ctrl_size_hint" formatted="false">Το 100% είναι το κανονικό μέγεθος</string> + <string name="ctrl_stick_click">Κλικ μοχλού</string> + <string name="ctrl_stick_click_hint">Πατήστε δύο φορές και κρατήστε έναν μοχλό για L3 ή R3</string> + <string name="ctrl_adaptive">Προσαρμοστικοί μοχλοί</string> + <string name="ctrl_rumble">Κραδασμός παιχνιδιού</string> + <string name="ctrl_steam_button">Κουμπί Steam</string> + <string name="ctrl_qam_button">Κουμπί QAM</string> + <string name="ctrl_keyboard_button">Κουμπί πληκτρολογίου</string> + <string name="ctrl_select_steam">Πατήστε Select για να ανοίξετε το μενού Steam</string> + <string name="ctrl_select_steam_hint">Αντί για View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con ως χειριστήρια VR</string> + <string name="ctrl_joycon_vr_hint">Όσο εκτελείται το SteamVR, κάθε Joy-Con γίνεται χέρι. Στρέψτε το μπροστά και κρατήστε πατημένο το Home ή το Capture για να το επανακεντράρετε.</string> + <string name="setup_animations">Κινήσεις</string> + <string name="ctrl_adaptive_hint">Οι μοχλοί εμφανίζονται όπου αγγίζετε και εξαφανίζονται όταν αφήνετε</string> + <string name="ctrl_layout">Διάταξη</string> + <string name="ctrl_layout_custom">Αποθηκεύτηκαν προσαρμοσμένες θέσεις</string> + <string name="ctrl_layout_default">Προσαρμοσμένο σε αυτή την οθόνη</string> + <string name="ctrl_edit">Επεξεργασία</string> + <string name="ctrl_reset">Επαναφορά</string> + <string name="ctrl_mapping">Αντιστοίχιση κουμπιών</string> + <string name="ctrl_mapping_default">Κάθε κουμπί στέλνει τη δική του είσοδο</string> + <string name="ctrl_mapping_count">%1$d από %2$d κουμπιά επαναντιστοιχίστηκαν</string> + <string name="ctrl_configure">Διαμόρφωση</string> + <string name="ctrl_reset_all">Επαναφορά χειριστηρίου</string> + <string name="ctrl_reset_all_hint">Επαναφέρει όλες τις ρυθμίσεις χειριστηρίου και τη διάταξη</string> + <string name="ctrl_mapping_lede">Τι στέλνει κάθε κουμπί οθόνης στο παιχνίδι. Το Κρυμμένο αφαιρεί το κουμπί.</string> + <string name="ctrl_onscreen_buttons">Κουμπιά οθόνης</string> + <string name="ctrl_defaults">Προεπιλογές</string> + <string name="ctrl_reset_mapping">Επαναφορά αντιστοίχισης</string> + <string name="content_android_apps">Εφαρμογές Android</string> + <string name="content_apps_count">%1$d εφαρμογές</string> + <string name="content_no_android_apps">Δεν βρέθηκαν εφαρμογές Android για εκκίνηση.</string> + <string name="content_desktop_installed">● Επιφάνεια εργασίας εγκατεστημένη</string> + <string name="content_desktop_first_open">Εγκαθίσταται στο πρώτο άνοιγμα</string> + <string name="content_available">Διαθέσιμο για εγκατάσταση</string> + <string name="content_not_installed">Δεν έχει εγκατασταθεί.</string> + <string name="content_not_installed_suffix">%1$s · δεν έχει εγκατασταθεί</string> + <string name="content_open_named">Άνοιγμα %1$s</string> + <string name="content_games">Παιχνίδια</string> + <string name="content_choose_roms">Επιλέξτε έναν φάκελο ROM.</string> + <string name="content_retroarch_roms">Μεταβείτε στο /root/ROMs στο RetroArch.</string> + <string name="content_add_roms">Προσθέστε παιχνίδια %1$s στο ROMs/%2$s.</string> + <string name="content_install_named">Εγκατάσταση %1$s</string> + <string name="content_stop_to_install">Διακοπή συνεδρίας για εγκατάσταση</string> + <string name="content_runtime_required">Απαιτείται runtime</string> + <string name="content_loading_details">Φόρτωση λεπτομερειών εγκατάστασης…</string> + <string name="content_details_unavailable">Οι λεπτομέρειες εγκατάστασης δεν είναι διαθέσιμες. Δοκιμάστε ξανά αργότερα.</string> + <string name="content_needs_runtime">Εγκαταστήστε πρώτα το runtime Linux από τη Ρύθμιση.</string> + <string name="content_stop_first">Διακόψτε την τρέχουσα συνεδρία για να εγκαταστήσετε εφαρμογές επιφάνειας εργασίας.</string> + <string name="content_install_into">Εγκαθιστά το %1$s στην επιφάνεια εργασίας Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Η απόκρυψη το αφαιρεί από την Επιφάνεια εργασίας. Τα αρχεία του παραμένουν στο runtime Linux.</string> + <string name="content_rom_gone">Αυτό το παιχνίδι δεν βρίσκεται πλέον στον φάκελο ROM.</string> + <string name="content_desktop_system">Επιφάνεια εργασίας · %1$s</string> + <string name="content_launch_in">Εκκίνηση σε %1$s</string> + <string name="content_also_in">Επίσης σε %1$s</string> + <string name="content_page_gone">Αυτή η σελίδα δεν υπάρχει πια. Επιλέξτε μια ενότητα αριστερά.</string> + <string name="content_open_desktop">Άνοιγμα επιφάνειας εργασίας</string> + <string name="content_install_open_desktop">Εγκατάσταση & άνοιγμα επιφάνειας εργασίας</string> + <string name="desktop_remove_title">Απεγκατάσταση επιφάνειας εργασίας</string> + <string name="desktop_remove_text">Αφαιρεί την επιφάνεια εργασίας και τις ενσωματωμένες εφαρμογές της. Διατηρεί παιχνίδια, προστιθέμενες εφαρμογές, ρυθμίσεις και κοινές βιβλιοθήκες.</string> + <string name="desktop_removing">Αφαίρεση επιφάνειας εργασίας</string> + <string name="desktop_removed">Η επιφάνεια εργασίας αφαιρέθηκε</string> + <string name="desktop_cleaning_legacy">Αφαίρεση παλιών αρχείων LXQt</string> + <string name="desktop_removal_unknown">Ενημερώστε το DroidDeck πριν αφαιρέσετε αυτή την έκδοση επιφάνειας εργασίας.</string> + <string name="content_linux_desktop">Επιφάνεια εργασίας Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox και οι προσομοιωτές σας</string> + <string name="games_empty">Τα παιχνίδια που εγκαθιστάτε στο Steam εμφανίζονται εδώ μετά τη συνεδρία.</string> + <string name="games_play_steam">Αναπαραγωγή Steam</string> + <string name="games_play_steamvr">Αναπαραγωγή SteamVR</string> + <string name="games_launch_settings">Ρυθμίσεις εκκίνησης</string> + <string name="games_launch">Εκκίνηση</string> + <string name="games_files">Αρχεία παιχνιδιού</string> + <string name="games_prefix">Prefix Proton</string> + <string name="games_saves_looking">Αναζήτηση αποθηκευμένων αρχείων…</string> + <string name="games_saves_none">Δεν βρέθηκε φάκελος αποθήκευσης με όνομα. Η εξαγωγή λαμβάνει ολόκληρο τον φάκελο χρήστη.</string> + <string name="games_saves_folders">%1$d φάκελοι αποθήκευσης</string> + <string name="games_saves_summary">%1$s · %2$d αρχεία · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Διαχείριση αποθηκευμένων</string> + <string name="games_saves">Αποθηκευμένα παιχνιδιού</string> + <string name="games_import_saves">Εισαγωγή αποθηκευμένων…</string> + <string name="games_export_gamehub">Εξαγωγή ως zip GameHub…</string> + <string name="games_export_winlator">Εξαγωγή ως zip Winlator…</string> + <string name="games_open_save_folder">Άνοιγμα φακέλου αποθήκευσης</string> + <string name="games_never_played">Δεν έχει παιχτεί ποτέ</string> + <string name="games_runtime_busy_percent">Το runtime είναι απασχολημένο · %1$d%%</string> + <string name="games_runtime_busy">Το runtime είναι απασχολημένο</string> + <string name="games_runtime_first_play">Το runtime εγκαθίσταται στο πρώτο Play</string> + <string name="games_runtime_update">Υπάρχει ενημέρωση runtime</string> + <string name="games_runtime_ready">● Το runtime είναι έτοιμο</string> + <string name="games_last_played">Παίχτηκε τελευταία φορά %1$s</string> + <string name="games_internal">Εσωτερική αποθήκευση</string> + <string name="games_added">Προστέθηκε παιχνίδι</string> + <string name="games_custom">Προσαρμοσμένο παιχνίδι</string> + <string name="games_store_storage">Αποθήκευση παιχνιδιών</string> + <string name="gpu_auto_hint">Το καλύτερο ζεύγος για αυτή τη GPU, ενημερωμένο</string> + <string name="gpu_manual_hint">Επιλέξτε ένα ζεύγος εσείς</string> + <string name="gpu_checking">Έλεγχος για προγράμματα οδήγησης…</string> + <string name="gpu_none_listed">Δεν υπάρχουν ακόμα προγράμματα οδήγησης. Ανανεώστε για να τα αναζητήσετε.</string> + <string name="gpu_hide_other">Απόκρυψη προγραμμάτων οδήγησης για άλλες GPU</string> + <string name="gpu_show_other">Εμφάνιση προγραμμάτων οδήγησης για άλλες GPU</string> + <string name="gpu_advanced">Για προχωρημένους</string> + <string name="gpu_set_with_display">Ορίζεται μαζί με το πρόγραμμα οδήγησης οθόνης: το %1$s φέρει και τα δύο.</string> + <string name="gpu_set_with_runtime">Ορίζεται μαζί με το πρόγραμμα οδήγησης runtime: το %1$s φέρει και τα δύο.</string> + <string name="gpu_runtime_hint">Χρησιμοποιείται από παιχνίδια και την επιφάνεια εργασίας.</string> + <string name="gpu_runtime_default">Προεπιλογή runtime</string> + <string name="gpu_auto_by_gpu">Αυτόματο - επιλέγεται από τη GPU</string> + <string name="gpu_manage">Λήψη, εισαγωγή ή διαγραφή…</string> + <string name="gpu_in_use_caps">ΣΕ ΧΡΗΣΗ</string> + <string name="gpu_builtin">Τα προγράμματα οδήγησης ενσωματωμένα στο DroidDeck</string> + <string name="gpu_matched_pair">Τα προγράμματα οδήγησης runtime και οθόνης ορίζονται μαζί ως αντιστοιχισμένο ζεύγος.</string> + <string name="gpu_recommended_for">Προτείνεται για αυτή τη GPU: %1$s.</string> + <string name="gpu_refresh_hint">Ανανεώστε για να αναζητήσετε προγράμματα οδήγησης για αυτή τη GPU.</string> + <string name="gpu_recommended_caps">ΠΡΟΤΕΙΝΕΤΑΙ</string> + <string name="gpu_unavailable">Μη διαθέσιμο</string> + <string name="load_runtime">Runtime Linux</string> + <string name="load_runtime_detail">Προετοιμασία του runtime Linux</string> + <string name="load_session">Συνεδρία</string> + <string name="load_session_detail">Εκκίνηση οθόνης και ήχου</string> + <string name="load_steam">Steam client</string> + <string name="load_steam_detail">Έλεγχος του Steam και των εργαλείων συμβατότητάς του</string> + <string name="load_opening_steam">Άνοιγμα Steam</string> + <string name="load_opening_steam_detail">Αναμονή για το πρώτο καρέ του Steam</string> + <string name="load_desktop">Επιφάνεια εργασίας</string> + <string name="load_desktop_detail">Προετοιμασία της επιφάνειας εργασίας</string> + <string name="load_opening">Άνοιγμα</string> + <string name="load_opening_detail">Αναμονή για το πρώτο καρέ</string> + <string name="load_starting_steam">Εκκίνηση του Steam</string> + <string name="load_ended">Η συνεδρία έληξε</string> + <string name="load_step">Βήμα %1$d από %2$d</string> + <string name="load_steam_paused">Το Steam είναι σε παύση</string> + <string name="deck_tab_grips">Λαβές</string> + <string name="deck_tab_left">Αριστερή επιφάνεια</string> + <string name="deck_tab_right">Δεξιά επιφάνεια</string> + <string name="deck_tab_both">Και τα δύο</string> + <string name="deck_tab_gamepad">Χειριστήριο</string> + <string name="deck_surface_stick">Μοχλός</string> + <string name="deck_surface_trackpad">Πινακίδα αφής</string> + <string name="deck_surface_switch">Εναλλαγή μεταξύ μοχλού και πινακίδας αφής</string> + <string name="deck_more_controls">Περισσότερα χειριστήρια Deck</string> + <string name="deck_panels">ΠΙΝΑΚΕΣ</string> + <string name="deck_close">Κλείσιμο χειριστηρίων δεύτερης οθόνης</string> + <string name="deck_open_steam_menu">Άνοιγμα μενού Steam</string> + <string name="deck_left_upper">Αριστερά · πάνω</string> + <string name="deck_left_lower">Αριστερά · κάτω</string> + <string name="deck_right_upper">Δεξιά · πάνω</string> + <string name="deck_right_lower">Δεξιά · κάτω</string> + <string name="deck_click">Κλικ</string> + <string name="deck_right_trackpad">Δεξιά πινακίδα αφής</string> + <string name="deck_left_trackpad">Αριστερή πινακίδα αφής</string> + <string name="second_trackpad">Πινακίδα αφής</string> + <string name="second_show_keyboard">Εμφάνιση πληκτρολογίου</string> + <string name="second_hide_keyboard">Απόκρυψη πληκτρολογίου</string> + <string name="second_terminal">Τερματικό Linux</string> + <string name="second_terminal_not_ready">Η συνεδρία Linux δεν είναι ακόμα έτοιμη για τερματικό.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Παιχνίδια</string> + <string name="rail_desktop">Επιφάνεια</string> + <string name="rail_store">Κατάστημα</string> + <string name="rail_components">Στοιχεία</string> + <string name="rail_apps">Εφαρμογές</string> + <string name="rail_setup">Ρύθμιση</string> + <string name="rail_updates">Ενημερώσεις</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Συνέχιση %1$s</string> + <string name="roms_text">Εμφανίζεται ως /root/ROMs σε κάθε συνεδρία. Ο εσωτερικός χώρος αποθήκευσης βρίσκεται στο /root/Storage.</string> + <string name="roms_none">Δεν έχει επιλεγεί φάκελος</string> + <string name="roms_applies">Ισχύει από την επόμενη συνεδρία. Οι κάρτες SD λειτουργούν.</string> + <string name="roms_choose">Επιλογή φακέλου</string> + <string name="roms_change">Αλλαγή φακέλου</string> + <string name="proton_lede">Εγκαταστήστε μια έκδοση Proton για ARM64, και επιλέξτε την ανά παιχνίδι από το Steam → Ιδιότητες → Συμβατότητα.</string> + <string name="proton_stop_first">Διακόψτε την τρέχουσα συνεδρία για να εγκαταστήσετε ή να καταργήσετε ένα εργαλείο συμβατότητας.</string> + <string name="proton_available">Διαθέσιμες εκδόσεις</string> + <string name="proton_installed">Εγκατεστημένο %1$s</string> + <string name="proton_queued">Σε εκκρεμότητα από προηγούμενο αίτημα</string> + <string name="proton_not_installed">Δεν είναι εγκατεστημένο</string> + <string name="proton_update_available">Διαθέσιμη ενημέρωση → %1$s</string> + <string name="proton_remove_older">Κατάργηση παλιών εκδόσεων %1$s</string> + <string name="proton_remove_older_body">Καταργεί %1$s. Τα παιχνίδια που έχουν ρυθμιστεί σε αυτές τις εκδόσεις πρέπει να αλλάξουν σε άλλο Proton.</string> + <string name="proton_remove_body">Τα παιχνίδια που έχουν ρυθμιστεί σε αυτή την έκδοση πρέπει να αλλάξουν σε άλλο Proton.</string> + <string name="proton_install_now">Εγκατάσταση τώρα</string> + <string name="proton_cancel_queued">Ακύρωση σε εκκρεμότητα</string> + <string name="pckb_android">Πληκτρολόγιο Android</string> + <string name="pckb_hide">Απόκρυψη ✕</string> + <string name="main_launch_named">Εκκίνηση %1$s</string> + <string name="main_choose_screen">Επιλέξτε οθόνη. Δευτερεύουσα: %1$s.</string> + <string name="main_secondary_gone">Η δευτερεύουσα οθόνη δεν είναι πλέον διαθέσιμη.</string> + <string name="main_primary">Κύρια οθόνη</string> + <string name="main_secondary">Δευτερεύουσα οθόνη</string> + <string name="widgets_prev_tab">Προηγούμενη καρτέλα</string> + <string name="widgets_next_tab">Επόμενη καρτέλα</string> + <string name="widgets_on">Ενεργό</string> + <string name="widgets_all_n">Όλα %1$d</string> + <string name="widgets_none">Κανένα</string> + <string name="widgets_n_of_m">%1$d από %2$d</string> + <string name="widgets_off">Ανενεργό</string> + <string name="screen_bottom">Κάτω οθόνη</string> + <string name="game_env_applies">Ισχύει από την επόμενη εκκίνηση παιχνιδιού. Το προφίλ ενός παιχνιδιού υπερισχύει του κοινού.</string> + <string name="game_env_other">Άλλο παιχνίδι με αναγνωριστικό εφαρμογής…</string> + <string name="game_env_done">Τέλος</string> + <string name="game_env_default">Προεπιλογή</string> + <string name="game_env_off">Ανενεργό</string> + <string name="game_env_change">Αλλαγή…</string> + <string name="game_env_change_title">Αλλαγή μεταβλητής</string> + <string name="game_env_restore_default">Επαναφορά στην προεπιλογή</string> + <string name="game_env_eyebrow">Παιχνίδια Proton</string> + <string name="pip_title">Εικόνα εντός εικόνας</string> + <string name="pip_auto">Αυτόματη είσοδος σε λειτουργία εικόνας εντός εικόνας</string> + <string name="unfolded_controls">Χειριστήρια στην ξεδιπλωμένη οθόνη</string> + <string name="unfolded_controls_hint">Ξεδιπλωμένη, το παιχνίδι βρίσκεται πάνω από τις πινακίδες αφής και τις πίσω λαβές του Steam Deck. Διπλωμένη, το παιχνίδι καταλαμβάνει όλη την οθόνη.</string> + <string name="pip_suspended">Σε αναστολή</string> + <string name="pip_not_ready">Η λειτουργία εικόνας εντός εικόνας είναι διαθέσιμη μόλις η συνεδρία είναι έτοιμη.</string> + <string name="pip_permission">Επιτρέψτε την εικόνα εντός εικόνας για το DroidDeck στις ρυθμίσεις Android.</string> + <string name="pip_unavailable">Το Android δεν μπόρεσε να ανοίξει τη λειτουργία εικόνας εντός εικόνας.</string> + <string name="game_shortcut">Συντόμευση</string> + <string name="game_shortcut_add">Προσθήκη στην αρχική οθόνη</string> + <string name="game_shortcut_choose">Επιλογή παιχνιδιού</string> + <string name="game_shortcut_scanning">Σάρωση εγκατεστημένων παιχνιδιών…</string> + <string name="game_link_copy">Αντιγραφή συνδέσμου εκκίνησης</string> + <string name="game_link_copied">Ο σύνδεσμος εκκίνησης αντιγράφηκε</string> + <string name="game_shortcut_unsupported">Αυτό το πρόγραμμα εκκίνησης δεν μπορεί να προσθέσει συντομεύσεις. Χρησιμοποιήστε την Αντιγραφή συνδέσμου εκκίνησης.</string> + <string name="game_link_invalid">Μη έγκυρος σύνδεσμος εκκίνησης παιχνιδιού.</string> + <string name="game_link_missing">Αυτό το παιχνίδι δεν βρίσκεται πλέον στη βιβλιοθήκη DroidDeck σας.</string> + <string name="game_link_session_busy">Διακόψτε την τρέχουσα συνεδρία πριν εκκινήσετε ένα παιχνίδι Steam.</string> + <string name="game_link_failed">Δεν ήταν δυνατή η αποστολή του παιχνιδιού στο Steam. Δοκιμάστε να το εκκινήσετε ξανά.</string> + <string name="setup_retry_removal">Επανάληψη κατάργησης</string> + <string name="runtime_removing">Κατάργηση</string> + <string name="runtime_removal_incomplete">Η κατάργηση δεν ολοκληρώθηκε</string> + <string name="game_file_export">Εξαγωγή αρχείου παιχνιδιού</string> + <string name="game_file_sync">Συγχρονισμός όλων των αρχείων παιχνιδιού σε φάκελο</string> + <string name="game_file_stop_sync">Διακοπή συγχρονισμού αρχείων παιχνιδιού</string> + <string name="game_file_folder">Επιλέξτε φάκελο για τα αρχεία παιχνιδιού της διεπαφής</string> + <string name="game_file_exported">Τα αρχεία παιχνιδιού αποθηκεύτηκαν στο %1$s</string> + <string name="game_frontend_files">Αρχεία διεπαφής</string> + + <string name="main_wait_runtime">Περιμένετε να ολοκληρωθεί η λειτουργία του runtime</string> + <string name="main_wait_proton_install">Περιμένετε να ολοκληρωθεί η εγκατάσταση του εργαλείου συμβατότητας</string> + <string name="main_wait_desktop_install">Περιμένετε να ολοκληρωθεί η εγκατάσταση της εφαρμογής επιφάνειας εργασίας</string> + <string name="main_wait_install_game">Περιμένετε να ολοκληρωθεί η εγκατάσταση πριν εκκινήσετε ένα παιχνίδι</string> + <string name="main_saves_close_session">Κλείστε πρώτα τη συνεδρία Steam, ώστε το παιχνίδι να μην αποθηκεύσει πάνω από την εισαγωγή</string> + <string name="main_saves_importing">Εισαγωγή στο %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Έγινε εισαγωγή %1$d αρχείου από το %2$s στο %3$s</item> + <item quantity="other">Έγινε εισαγωγή %1$d αρχείων από το %2$s στο %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Έγινε εισαγωγή %1$d αρχείου από το %2$s στο %3$s. Τα παλιά αρχεία αποθήκευσης κρατήθηκαν ως αντίγραφο ασφαλείας στο Download/DroidDeck/Saves/backups</item> + <item quantity="other">Έγινε εισαγωγή %1$d αρχείων από το %2$s στο %3$s. Τα παλιά αρχεία αποθήκευσης κρατήθηκαν ως αντίγραφο ασφαλείας στο Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Επιλέξτε ένα zip αποθηκευμένων αρχείων για το %1$s</string> + <string name="main_saves_exporting">Εξαγωγή %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Έγινε εξαγωγή %1$d αρχείου ως %2$s: %3$s</item> + <item quantity="other">Έγινε εξαγωγή %1$d αρχείων ως %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Επιλέξτε πού θα αποθηκευτεί το %1$s (%2$s)</string> + <string name="main_action_failed">Αποτυχία %1$s: %2$s</string> + <string name="main_no_logs_yet">Δεν υπάρχουν ακόμα αρχεία καταγραφής συνεδρίας: εκτελέστε πρώτα μια συνεδρία.</string> + <string name="main_no_logs_to_clear">Δεν υπάρχουν αρχεία καταγραφής συνεδρίας για εκκαθάριση.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Έγινε εκκαθάριση %1$d φακέλου αρχείων καταγραφής συνεδρίας.</item> + <item quantity="other">Έγινε εκκαθάριση %1$d φακέλων αρχείων καταγραφής συνεδρίας.</item> + </plurals> + <string name="main_wadb_pair_failed">Η σύζευξη ασύρματου εντοπισμού σφαλμάτων απέτυχε</string> + <string name="main_wadb_command_failed">Η εντολή ασύρματου εντοπισμού σφαλμάτων απέτυχε</string> + <string name="main_wadb_unavailable">Ο ασύρματος εντοπισμός σφαλμάτων δεν είναι διαθέσιμος</string> + <string name="main_adb_copied">Η εντολή ADB αντιγράφηκε</string> + <string name="main_pick_roms">Επιλέξτε τον φάκελο ROMs</string> + <string name="main_non_adreno_title">Δεν είναι GPU Adreno</string> + <string name="main_non_adreno_text">Το Turnip υποστηρίζει GPU Adreno. Σε %1$s, το Steam ίσως εμφανίσει μαύρη οθόνη. Λήψη: %2$.0f MB.</string> + <string name="main_install_anyway">Εγκατάσταση παρόλα αυτά</string> + <string name="main_remove_runtime_title">Κατάργηση του Linux runtime</string> + <string name="main_remove_runtime_text">Αυτό διαγράφει το runtime, τον πελάτη Steam μέσα σε αυτό και κάθε παιχνίδι που είναι εγκατεστημένο εκεί.</string> + <string name="main_applied">Εφαρμόστηκε: %1$s</string> + <string name="android_app_open_failed_primary">Δεν ήταν δυνατό το άνοιγμα του %1$s στην κύρια οθόνη</string> + <string name="android_app_open_failed_on">Δεν ήταν δυνατό το άνοιγμα του %1$s στο %2$s</string> + <string name="android_app_open_failed_display">Δεν ήταν δυνατό το άνοιγμα του %1$s στην οθόνη %2$d</string> + <string name="comp_busy_importing">Εισαγωγή</string> + <string name="comp_busy_swapping">Εναλλαγή</string> + <string name="comp_busy_restoring">Επαναφορά</string> + <string name="comp_busy_cancelling">Ακύρωση</string> + <string name="comp_busy_deleting">Διαγραφή</string> + <string name="comp_cannot_read">δεν είναι δυνατή η ανάγνωση του αρχείου</string> + <string name="comp_imported">Έγινε εισαγωγή %1$s</string> + <string name="comp_swap_cancelled">Η εκκρεμής εναλλαγή ακυρώθηκε.</string> + <string name="comp_pick_wcp">Επιλέξτε ένα πακέτο στοιχείων (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Δεν ήταν δυνατή η πρόσβαση στα Nightlies</string> + <string name="comp_stored">Αποθηκεύτηκε %1$s</string> + <string name="comp_download_failed">Η λήψη απέτυχε: %1$s</string> + <string name="drivers_pick_linux">Επιλέξτε πρόγραμμα οδήγησης runtime Linux (-Linux zip ή πακέτο Android + Linux)</string> + <string name="drivers_pick_android">Επιλέξτε πρόγραμμα οδήγησης οθόνης (AdrenoTools zip ή πακέτο Android + Linux)</string> + <string name="drivers_pick_any">Επιλέξτε zip προγράμματος οδήγησης ή πακέτο Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Κατάργηση %1$s…</string> + <string name="main_forgetting_named">Διαγραφή εγγραφής %1$s…</string> + <string name="main_pick_game_storage">Επιλέξτε τον φάκελο αποθήκευσης παιχνιδιών</string> + <string name="main_pick_decky_zip">Επιλέξτε αρχείο ZIP προσθέτου Decky</string> + <string name="main_storage_not_usable">Δεν είναι χρησιμοποιήσιμο: %1$s</string> + <string name="main_running_program">Πρόγραμμα</string> + <string name="main_removing_runtime">Κατάργηση του Linux runtime</string> + <string name="main_settings_main_screen">Δεν ήταν δυνατό το άνοιγμα των Ρυθμίσεων στην κάτω οθόνη· άνοιξαν στην κύρια οθόνη.</string> + <string name="main_open_dev_options">Άνοιγμα Επιλογών προγραμματιστή στις Ρυθμίσεις</string> + + <string name="upd_unknown_apps_failed">Δεν ήταν δυνατό το άνοιγμα της ρύθμισης του Android «Εγκατάσταση άγνωστων εφαρμογών»</string> + <string name="upd_couldnt_check">Δεν ήταν δυνατός ο έλεγχος: %1$s</string> + <string name="upd_no_download">Αυτή η έκδοση δεν έχει λήψη για αυτό το αντίγραφο του DroidDeck</string> + <string name="upd_stop_first">Διακόψτε πρώτα την τρέχουσα συνεδρία και μετά ενημερώστε</string> + <string name="upd_stage_downloading">Λήψη</string> + <string name="upd_stage_installing">Εγκατάσταση</string> + <string name="upd_stage_confirm">Περιμένει να επιβεβαιώσετε</string> + <string name="upd_failed">Η ενημέρωση απέτυχε</string> + <string name="upd_not_offered">Το Android δεν πρότεινε την εγκατάσταση της ενημέρωσης</string> + + <string name="decky_install_failed">Η εγκατάσταση του Decky απέτυχε: %1$s</string> + <string name="decky_plugin_starting">Έναρξη εισαγωγής προσθέτου…</string> + <string name="decky_plugin_failed">Η εισαγωγή προσθέτου απέτυχε: %1$s</string> + <string name="decky_plugin_installed">Το πρόσθετο εγκαταστάθηκε. Κάντε επανεκκίνηση του Steam για να φορτωθεί.</string> + + <string name="drivers_not_checked">Δεν έχει ελεγχθεί ακόμα - πατήστε ανανέωση για αναζήτηση νέων προγραμμάτων οδήγησης</string> + <string name="drivers_bundle_sets_display">Android + Linux: ορίζει το πρόγραμμα οδήγησης οθόνης μαζί με αυτό</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: ορίζει το πρόγραμμα οδήγησης runtime μαζί με αυτό</string> + <string name="drivers_runtime_builtin">το Turnip που είναι ενσωματωμένο στο runtime</string> + <string name="drivers_system_vulkan">Vulkan συστήματος: δεν υπάρχει πακέτο έκδοσης για αυτό το GPU</string> + <string name="drivers_bundled">%1$s (σε πακέτο)</string> + <string name="drivers_manual">Μη αυτόματο</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Αυτή τη στιγμή έχει δημοσιευτεί μόνο το ένα μισό</string> + <string name="drivers_pair_size">%1$.0f MB για τα δύο</string> + <string name="drivers_none_to_set">Δεν υπάρχουν προγράμματα οδήγησης για ορισμό: %1$s</string> + <string name="drivers_checking_latest">Έλεγχος για τα πιο πρόσφατα προγράμματα οδήγησης…</string> + <string name="drivers_up_to_date_check_failed">Ενημερωμένο (δεν ήταν δυνατός ο έλεγχος: %1$s)</string> + <string name="drivers_recommended_unpublished">Τα προτεινόμενα προγράμματα οδήγησης δεν είναι δημοσιευμένα αυτή τη στιγμή</string> + <string name="drivers_downloading_pair">Λήψη %1$s %2$s…</string> + <string name="drivers_updated_to">Ενημερώθηκε σε %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Ενημερώθηκε σε %1$s %2$s. Το πρόγραμμα οδήγησης οθόνης εφαρμόζεται μετά την επανεκκίνηση του DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Οι ενημερώσεις προγραμμάτων οδήγησης περιμένουν να σταματήσει η συνεδρία.</string> + <string name="drivers_auto_waits_for_network">Το %1$s %2$s θα ληφθεί μόλις βγεις από δεδομένα κινητής και εξοικονόμηση μπαταρίας.</string> + <string name="drivers_skipping_bad">Το %1$s %2$s δεν ξεκίνησε συνεδρία εδώ, οπότε το Αυτόματο μένει στα προγράμματα οδήγησης που ξεκίνησαν.</string> + <string name="drivers_rolled_back">Το %1$s δεν ξεκίνησε συνεδρία δύο φορές, οπότε το Αυτόματο επέστρεψε στα προγράμματα οδήγησης που δούλευαν.</string> + <string name="drivers_switched_to">Έγινε αλλαγή σε %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Έγινε αλλαγή σε %1$s %2$s. Το πρόγραμμα οδήγησης οθόνης εφαρμόζεται μετά την επανεκκίνηση του DroidDeck.</string> + <string name="drivers_using">Χρήση %1$s %2$s.</string> + <string name="drivers_using_restart">Χρήση %1$s %2$s. Το πρόγραμμα οδήγησης οθόνης εφαρμόζεται μετά την επανεκκίνηση του DroidDeck.</string> + <string name="drivers_using_quest">Χρησιμοποιείται το ενσωματωμένο πρόγραμμα οδήγησης εικόνας για Quest και το προεπιλεγμένο περιβάλλον.</string> + <string name="drivers_using_quest_restart">Χρησιμοποιείται το ενσωματωμένο πρόγραμμα οδήγησης εικόνας για Quest και το προεπιλεγμένο περιβάλλον. Το πρόγραμμα οδήγησης εικόνας ισχύει μετά από επανεκκίνηση του DroidDeck.</string> + <string name="drivers_not_a_driver">Δεν είναι zip προγράμματος οδήγησης: ούτε πρόγραμμα οδήγησης AdrenoTools, ούτε -Linux Turnip, ούτε πακέτο Android + Linux</string> + <string name="drivers_import_failed">Η εισαγωγή απέτυχε: %1$s</string> + <string name="drivers_imported_unnamed">Έγινε εισαγωγή προγράμματος οδήγησης</string> + <string name="drivers_using_bundle">Χρήση %1$s ως πρόγραμμα οδήγησης runtime και οθόνης.</string> + <string name="drivers_using_bundle_restart">Χρήση %1$s ως πρόγραμμα οδήγησης runtime και οθόνης. Το πρόγραμμα οδήγησης οθόνης εφαρμόζεται μετά την επανεκκίνηση του DroidDeck.</string> + <string name="drivers_deleted_bundle">Διαγράφηκε %1$s (και τα δύο προγράμματα οδήγησης)</string> + <string name="drivers_deleted">Διαγράφηκε %1$s</string> + <string name="drivers_release_status">Πιο πρόσφατο: %1$s · έλεγχος %2$s</string> + <string name="drivers_release_status_failed">Πιο πρόσφατο: %1$s · %2$s μη προσβάσιμο · έλεγχος %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d λεπτό πριν</item> + <item quantity="other">%1$d λεπτά πριν</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d ώρα πριν</item> + <item quantity="other">%1$d ώρες πριν</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d ημέρα πριν</item> + <item quantity="other">%1$d ημέρες πριν</item> + </plurals> + <string name="drivers_checking_sources">Έλεγχος Banners-Turnip, WinNative και DroidDeck…</string> + <string name="drivers_check_failed">ο έλεγχος απέτυχε</string> + <string name="drivers_installed_pick_either">Εγκατεστημένο %1$s - επιλέξτε το σε οποιαδήποτε λίστα για να ορίσετε και τα δύο προγράμματα οδήγησης</string> + <string name="drivers_installed_pick">Εγκατεστημένο %1$s - επιλέξτε το στο μενού</string> + + <string name="session_wait_removal">Περιμένετε να ολοκληρωθεί η κατάργηση του runtime</string> + <string name="session_title_game">Παιχνίδι</string> + <string name="session_touch_auto_touchpad">πινακίδα αφής</string> + <string name="session_touch_auto_direct">απευθείας</string> + <string name="session_swap_failed">Η εναλλαγή απέτυχε: %1$s</string> + <string name="session_profile_save_failed">Η αποθήκευση προφίλ απέτυχε: %1$s</string> + <string name="session_desktop_paused">Η επιφάνεια εργασίας είναι σε παύση</string> + <string name="session_named_paused">%1$s είναι σε παύση</string> + <string name="session_program_paused">Το πρόγραμμα είναι σε παύση</string> + <string name="session_starting_desktop">Εκκίνηση της επιφάνειας εργασίας</string> + <string name="session_starting_named">Εκκίνηση %1$s</string> + <string name="session_starting_program">Εκκίνηση του προγράμματος</string> + <string name="session_no_logs">Δεν υπάρχουν αρχεία καταγραφής για αυτή τη συνεδρία.</string> + <string name="session_logs_archive_failed">Δεν ήταν δυνατή η δημιουργία της αρχειοθήκης καταγραφών συνεδρίας.</string> + <string name="session_logs_share_failed">Δεν ήταν δυνατή η κοινοποίηση των αρχείων καταγραφής συνεδρίας.</string> + <string name="session_starting_session">Εκκίνηση της συνεδρίας…</string> + <string name="session_runtime_downloading">λήψη του Linux runtime</string> + <string name="session_runtime_downloading_mb">λήψη του Linux runtime · %1$d από %2$d MB</string> + <string name="session_runtime_checking">έλεγχος του Linux runtime</string> + <string name="session_runtime_unpacking">αποσυμπίεση του Linux runtime</string> + <string name="session_desktop_downloading">λήψη της επιφάνειας εργασίας</string> + <string name="session_desktop_downloading_mb">λήψη της επιφάνειας εργασίας · %1$d από %2$d MB</string> + <string name="session_desktop_checking">έλεγχος της επιφάνειας εργασίας</string> + <string name="session_desktop_unpacking">αποσυμπίεση της επιφάνειας εργασίας</string> + <string name="session_proton_downloading">λήψη του Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">λήψη του Proton Experimental (ARM64) · %1$d από %2$d MB</string> + <string name="session_proton_checking">έλεγχος του Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">αποσυμπίεση του Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Δεν ήταν δυνατή η πρόσβαση στον κατάλογο runtime. Ελέγξτε τη σύνδεση και πατήστε ξανά Αναπαραγωγή.</string> + <string name="session_runtime_install_failed">Το Linux runtime δεν εγκαταστάθηκε. Ελέγξτε το runtime στη Ρύθμιση και πατήστε ξανά Αναπαραγωγή.</string> + <string name="session_desktop_install_failed">Η επιφάνεια εργασίας δεν εγκαταστάθηκε (%1$s). Ελέγξτε τη σύνδεση και πατήστε ξανά Επιφάνεια εργασίας.</string> + <string name="session_ended_named">%1$s διακόπηκε αναπάντεχα. Κοινοποιήστε τα αρχεία καταγραφής με μια αναφορά σφάλματος, ή δοκιμάστε ξανά.</string> + <string name="session_ended_program">Το πρόγραμμα διακόπηκε αναπάντεχα. Κοινοποιήστε τα αρχεία καταγραφής με μια αναφορά σφάλματος, ή δοκιμάστε ξανά.</string> + <string name="session_ended_desktop">Η επιφάνεια εργασίας διακόπηκε αναπάντεχα. Κοινοποιήστε τα αρχεία καταγραφής με μια αναφορά σφάλματος, ή δοκιμάστε ξανά.</string> + <string name="session_ended_detail">Κατάσταση εξόδου %1$d · %2$s</string> + <string name="session_ended_no_log">χωρίς αρχείο καταγραφής</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Το αρχείο καταγραφής δείχνει %1$d σφάλμα «Function not implemented»: η επιτάχυνση seccomp του proot αποτυγχάνει σε έναν βοηθητικό μηχανισμό σε αυτή τη συσκευή. Δοκιμάστε %2$s → «%3$s» (ή «%4$s») και ξεκινήστε ξανά.</item> + <item quantity="other">Το αρχείο καταγραφής δείχνει %1$d σφάλματα «Function not implemented»: η επιτάχυνση seccomp του proot αποτυγχάνει σε έναν βοηθητικό μηχανισμό σε αυτή τη συσκευή. Δοκιμάστε %2$s → «%3$s» (ή «%4$s») και ξεκινήστε ξανά.</item> + </plurals> + + <string name="mode_decky_plugins">Πρόσθετα</string> + <string name="mode_decky_plugins_hint">Εγκαταστήστε ένα ZIP προσθέτου για την επόμενη συνεδρία Steam.</string> + <string name="mode_decky_plugin_downloading">Γίνεται λήψη…</string> + <string name="mode_decky_plugin_install_zip">Εγκατάσταση από ZIP</string> + <string name="store_cat_games">Παιχνίδια</string> + <string name="store_cat_audio_video">Ήχος & βίντεο</string> + <string name="store_cat_graphics">Γραφικά</string> + <string name="store_cat_internet">Διαδίκτυο</string> + <string name="store_cat_office">Γραφείο</string> + <string name="store_cat_developer">Προγραμματιστής</string> + <string name="store_cat_education">Εκπαίδευση</string> + <string name="store_cat_science">Επιστήμη</string> + <string name="store_cat_system">Σύστημα</string> + <string name="store_cat_utilities">Βοηθητικά</string> + <string name="store_section_popular">Δημοφιλή</string> + <string name="store_section_trending">Σε άνοδο</string> + <string name="store_section_new">Νέα</string> + <string name="store_section_updated">Ενημερωμένα</string> + <string name="store_section_loading">γίνεται φόρτωση…</string> + <string name="store_flatpak_setup">Ρύθμιση Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Δεν ήταν δυνατός ο έλεγχος του Flathub για ενημερώσεις</string> + <string name="content_rom_installed">εγκατεστημένο</string> + <string name="content_rom_folder">φάκελος</string> + <string name="theme_graphite">Γραφίτης</string> + <string name="theme_graphite_detail">Επιφάνειες από γραφίτη, με το μπλε της σφαίρας του λογότυπου για ό,τι είναι επιλεγμένο, εστιασμένο ή πατημένο.</string> + <string name="theme_paper">Χαρτί σε μαύρο</string> + <string name="theme_paper_detail">Το λευκό είναι το κύριο χρώμα, το μπλε του εικονιδίου είναι το σήμα για γραμμές, δαχτυλίδια και κουκκίδες.</string> + <string name="theme_icon_blue">Μπλε εικονιδίου</string> + <string name="theme_icon_blue_detail">Μαύρο φόντο, λευκά γράμματα, το μπλε για ό,τι είναι επιλεγμένο, εστιασμένο ή πατημένο.</string> + <string name="theme_electric">Ηλεκτρικό ναυτικό μπλε</string> + <string name="theme_electric_detail">Το μπλε πιο έντονο, σε επιφάνειες που τείνουν προς το ναυτικό μπλε αντί για γκρι.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Εγκαταστήστε πρώτα το runtime</string> + <string name="game_sync_err_steam_library">Η βιβλιοθήκη Steam δεν είναι διαθέσιμη</string> + <string name="game_sync_err_previous_sd">Η προηγούμενη βιβλιοθήκη SD δεν είναι διαθέσιμη</string> + <string name="game_sync_err_game_storage">Ο χώρος αποθήκευσης παιχνιδιών δεν είναι διαθέσιμος</string> + <string name="game_sync_err_added_games">Ο φάκελος προστιθέμενων παιχνιδιών δεν είναι διαθέσιμος</string> + <string name="game_sync_err_manifests">Τα manifest του Steam δεν είναι διαθέσιμα</string> + <string name="content_system_many">Πολλά συστήματα</string> + <string name="fm_drive_internal">Εσωτερική</string> + <string name="fm_drive_linux">Σύστημα Linux</string> + <string name="fm_drive_sd">Κάρτα SD</string> + <string name="fm_drive_storage">Αποθηκευτικός χώρος</string> + <string name="fm_select">Επιλογή</string> + <string name="fm_properties">Ιδιότητες</string> + <string name="fm_favorite_add">Προσθήκη στα αγαπημένα</string> + <string name="fm_favorite_remove">Κατάργηση από τα αγαπημένα</string> + <string name="fm_rename">Μετονομασία</string> + <string name="fm_copy">Αντιγραφή</string> + <string name="fm_cut">Αποκοπή</string> + <string name="fm_actions">Ενέργειες</string> + <string name="fm_favorites">Αγαπημένα</string> + <string name="fm_pin_current">Καρφίτσωμα τρέχοντος φακέλου</string> + <string name="fm_no_favorites">Δεν υπάρχουν ακόμα αγαπημένα - καρφιτσώστε έναν φάκελο με το μενού ⋮ του για να έρχεστε εδώ γρήγορα.</string> + <string name="fm_unpin_favorite">Κατάργηση από τα αγαπημένα</string> + <string name="fm_size_zero">0 bytes</string> + <string name="fm_unit_bytes">bytes</string> + <string name="fm_prop_location">Τοποθεσία</string> + <string name="fm_prop_type">Τύπος</string> + <string name="fm_prop_size">Μέγεθος</string> + <string name="fm_prop_modified">Τροποποιήθηκε</string> + <string name="fm_type_folder">Φάκελος</string> + <string name="fm_type_file">Αρχείο</string> + <string name="fm_type_ext_file">Αρχείο %1$s</string> + <string name="fm_read_only">Μόνο για ανάγνωση</string> + <string name="fm_read_only_hint">Αποτρέπει τα παιχνίδια (και το Wine) από την αντικατάσταση ή διαγραφή αυτού του αρχείου.</string> + <string name="fm_read_only_failed">Δεν ήταν δυνατή η αλλαγή του Μόνο για ανάγνωση</string> + <string name="fm_hidden">Κρυφό</string> + <string name="fm_hidden_unsupported">Αυτός ο αποθηκευτικός χώρος δεν μπορεί να αποθηκεύσει τη σημαία απόκρυψης.</string> + <string name="fm_hidden_hint">Σημαδεύει το αρχείο ως κρυφό στα Windows (η ιδιότητα κρυφού του Wine).</string> + <string name="fm_hidden_failed">Δεν ήταν δυνατή η αλλαγή του Κρυφό σε αυτόν τον αποθηκευτικό χώρο</string> + <string name="fm_done">Τέλος</string> + <string name="fm_op_deleting">Γίνεται διαγραφή...</string> + <string name="fm_delete_failed">Η διαγραφή απέτυχε</string> + <string name="fm_op_moving">Γίνεται μετακίνηση...</string> + <string name="fm_op_copying">Γίνεται αντιγραφή...</string> + <string name="fm_op_moving_item">Μετακίνηση - %1$s</string> + <string name="fm_op_copying_item">Αντιγραφή - %1$s</string> + <string name="fm_op_moving_batch">Μετακίνηση %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Αντιγραφή %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d ολοκληρώθηκαν, %2$d απέτυχαν</string> + <string name="fm_paste_skipped">%1$d ολοκληρώθηκαν, %2$d παραλείφθηκαν</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d στοιχείο μετακινήθηκε</item> + <item quantity="other">%1$d στοιχεία μετακινήθηκαν</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d στοιχείο αντιγράφηκε</item> + <item quantity="other">%1$d στοιχεία αντιγράφηκαν</item> + </plurals> + <string name="fm_already_exists">Το «%1$s» υπάρχει ήδη</string> + <string name="fm_op_renaming">Γίνεται μετονομασία...</string> + <string name="fm_rename_failed">Η μετονομασία απέτυχε</string> + <string name="fm_op_creating_folder">Γίνεται δημιουργία φακέλου...</string> + <string name="fm_create_folder_failed">Δεν ήταν δυνατή η δημιουργία φακέλου</string> + <string name="fm_new_folder">Νέος φάκελος</string> + <string name="fm_folder_name">Όνομα φακέλου</string> + <string name="fm_create">Δημιουργία</string> + <string name="fm_new_name">Νέο όνομα</string> + <string name="fm_delete_title">Διαγραφή;</string> + <string name="fm_delete_text">Διαγραφή του «%1$s» οριστικά;</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Διαγραφή %1$d στοιχείου;</item> + <item quantity="other">Διαγραφή %1$d στοιχείων;</item> + </plurals> + <string name="fm_cannot_undo">Αυτό δεν μπορεί να αναιρεθεί.</string> + <plurals name="fm_and_more"> + <item quantity="one">…και %1$d ακόμα</item> + <item quantity="other">…και %1$d ακόμα</item> + </plurals> + <string name="fm_op_deleting_batch">Διαγραφή %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d δεν ήταν δυνατό να διαγραφεί</item> + <item quantity="other">%1$d δεν ήταν δυνατό να διαγραφούν</item> + </plurals> + <string name="fm_conflict_merge_hint">Η συγχώνευση προσθέτει και αντικαθιστά αρχεία μέσα στον υπάρχοντα φάκελο.</string> + <string name="fm_conflict_overwrite_hint">Η αντικατάσταση αντικαθιστά το υπάρχον αρχείο.</string> + <string name="fm_conflict_apply_all">Εφαρμογή σε όλες τις συγκρούσεις</string> + <string name="fm_conflict_merge">Συγχώνευση</string> + <string name="fm_conflict_overwrite">Αντικατάσταση</string> + <string name="fm_conflict_keep_both">Διατήρηση και των δύο</string> + <string name="fm_conflict_skip">Παράλειψη</string> + <string name="fm_select_this_folder">Επιλογή αυτού του φακέλου</string> + <string name="fm_back">Πίσω</string> + <string name="fm_drive_not_readable">Το %1$s είναι προσαρτημένο αλλά δεν είναι αναγνώσιμο αυτή τη στιγμή</string> + <string name="fm_list_view">Προβολή λίστας</string> + <string name="fm_grid_view">Προβολή πλέγματος</string> + <string name="fm_search">Αναζήτηση</string> + <string name="fm_sort">Ταξινόμηση</string> + <string name="fm_sort_name">Όνομα</string> + <string name="fm_sort_date">Ημερομηνία τροποποίησης</string> + <string name="fm_rows_comfortable">Άνετες γραμμές</string> + <string name="fm_rows_compact">Συμπαγείς γραμμές</string> + <string name="fm_hide_hidden">Απόκρυψη κρυφών αρχείων</string> + <string name="fm_show_hidden">Εμφάνιση κρυφών αρχείων</string> + <string name="fm_hide_favorites">Απόκρυψη αγαπημένων</string> + <string name="fm_show_favorites">Εμφάνιση αγαπημένων</string> + <string name="fm_filter_folder">Φιλτράρισμα αυτού του φακέλου</string> + <string name="fm_free_space">%1$s ελεύθερα</string> + <string name="fm_selected_count">%1$d επιλεγμένα</string> + <string name="fm_select_none">Κανένα</string> + <string name="fm_select_all">Όλα</string> + <string name="fm_paste">Επικόλληση</string> + <plurals name="fm_items"> + <item quantity="one">%1$d στοιχείο</item> + <item quantity="other">%1$d στοιχεία</item> + </plurals> + <string name="fm_paste_here">Επικόλληση %1$s εδώ</string> + <string name="fm_paste_move_here">Επικόλληση %1$s (μετακίνηση) εδώ</string> + <string name="fm_rail_title">Αρχεία</string> + <string name="fm_rail_storage">ΑΠΟΘΗΚΕΥΤΙΚΟΣ ΧΩΡΟΣ</string> + <string name="fm_rail_quick">ΓΡΗΓΟΡΑ</string> + <string name="fm_rail_favorites">ΑΓΑΠΗΜΕΝΑ</string> + <string name="fm_rail_downloads">Λήψεις</string> + <string name="fm_rail_downloads_short">Λήψεις</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Καταγραφές συνεδρίας</string> + <string name="fm_rail_pictures">Εικόνες</string> + <string name="fm_favorite_added">Το «%1$s» προστέθηκε στα αγαπημένα</string> + <string name="fm_favorite_removed">Το «%1$s» καταργήθηκε από τα αγαπημένα</string> + <string name="fm_empty_directory">Άδειος κατάλογος</string> + <string name="fm_up_one_level">Ένα επίπεδο πάνω</string> + <string name="fm_choose_folder">Επιλέξτε φάκελο</string> + <string name="fm_choose_file">Επιλέξτε αρχείο</string> + <string name="ctrl_tint_steam_blue">Μπλε Steam</string> + <string name="ctrl_tint_sky">Γαλάζιο</string> + <string name="ctrl_tint_white">Λευκό</string> + <string name="ctrl_tint_violet">Βιολετί</string> + <string name="ctrl_tint_green">Πράσινο</string> + <string name="ctrl_tint_amber">Κεχριμπαρί</string> + <string name="ctrl_tint_red">Κόκκινο</string> + <string name="ctrl_tint_pink">Ροζ</string> + <string name="ctrl_button_a">Κουμπί A</string> + <string name="ctrl_button_b">Κουμπί B</string> + <string name="ctrl_button_x">Κουμπί X</string> + <string name="ctrl_button_y">Κουμπί Y</string> + <string name="ctrl_button_lb">Αριστερό bumper</string> + <string name="ctrl_button_rb">Δεξί bumper</string> + <string name="ctrl_button_lt">Αριστερή σκανδάλη</string> + <string name="ctrl_button_rt">Δεξιά σκανδάλη</string> + <string name="ctrl_button_view">Κουμπί View</string> + <string name="ctrl_button_menu">Κουμπί Menu</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad πάνω</string> + <string name="ctrl_target_down">D-pad κάτω</string> + <string name="ctrl_target_left">D-pad αριστερά</string> + <string name="ctrl_target_right">D-pad δεξιά</string> + <string name="ctrl_target_hidden">Κρυφό</string> + <string name="ctrl_editor_drag">Σύρετε για μετακίνηση</string> + <string name="ctrl_editor_snap">Προσκόλληση</string> + <string name="ctrl_editor_save">Αποθήκευση</string> + <string name="second_mode_none">Κανένα</string> + <string name="second_mode_keyboard_trackpad">Πληκτρολόγιο + πινακίδα αφής</string> + <string name="second_mode_terminal">Τερματικό</string> + <string name="second_mode_deck_controls">Λαβές Deck + πινακίδες αφής</string> + + <string name="rtinst_removing">Κατάργηση του Linux runtime</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Κατάργηση του Linux runtime · %1$d εγγραφή</item> + <item quantity="other">Κατάργηση του Linux runtime · %1$d εγγραφές</item> + </plurals> + <string name="rtinst_removed">Το Linux runtime καταργήθηκε</string> + <string name="rtinst_removal_failed">Δεν ήταν δυνατή η ολοκλήρωση της κατάργησης του Linux runtime. Επαναλάβετε την κατάργηση στη Ρύθμιση.</string> + <string name="rtinst_removing_leftovers">Κατάργηση υπολειμμάτων του runtime</string> + <string name="rtinst_downloading">Γίνεται λήψη</string> + <string name="rtinst_verifying">Γίνεται επαλήθευση</string> + <string name="rtinst_extracting">Γίνεται εξαγωγή</string> + <string name="rtinst_channel_description">Εμφανίζεται όσο το Linux runtime εγκαθίσταται ή καταργείται</string> + <string name="rtinst_title_installing">Εγκατάσταση του Linux runtime</string> + <string name="rtinst_title_removing">Κατάργηση του Linux runtime</string> + + <string name="deskpkg_runtime_missing">Το Linux runtime δεν είναι εγκατεστημένο</string> + <string name="deskpkg_no_checksum">Ο κατάλογος δεν έχει checksum για το %1$s</string> + <string name="deskpkg_checksum_mismatch">Αναντιστοιχία checksum - τίποτα δεν άλλαξε</string> + <string name="deskpkg_installing">Εγκατάσταση %1$s</string> + <string name="deskpkg_place_failed">Δεν ήταν δυνατή η τοποθέτηση του AppImage</string> + <string name="deskpkg_extract_failed">Η εξαγωγή απέτυχε</string> + <string name="deskpkg_install_failed">Η εγκατάσταση απέτυχε</string> + + <string name="flatpakmgr_setup_failed">Η ρύθμιση του Flatpak απέτυχε (έξοδος %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Η ρύθμιση του Flatpak δεν ολοκληρώθηκε</string> + <string name="flatpakmgr_busy">Μια άλλη εργασία καταστήματος εκτελείται ήδη</string> + <string name="flatpakmgr_not_ready">Ρυθμίστε πρώτα το Flatpak</string> + <string name="flatpakmgr_starting">Γίνεται εκκίνηση</string> + <string name="flatpakmgr_exit_status">Το Flatpak έκλεισε με κατάσταση %1$d</string> + <string name="flatpakmgr_installing">Εγκατάσταση %1$s</string> + <string name="flatpakmgr_updating">Ενημέρωση %1$s</string> + <string name="flatpakmgr_removing">Κατάργηση %1$s</string> + <string name="flatpakmgr_installing_step">Εγκατάσταση %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Ενημέρωση %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Κατάργηση %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">μεταφράσεις</string> + <string name="flatpakmgr_ref_graphics_drivers">προγράμματα οδήγησης γραφικών</string> + <string name="flatpakmgr_ref_media_codecs">codecs πολυμέσων</string> + <string name="flatpakmgr_ref_runtime">runtime %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">runtime %1$s %2$s</string> + + <string name="appimg_too_small">Το αρχείο είναι πολύ μικρό για να είναι AppImage</string> + <string name="appimg_unreadable">Το αρχείο δεν μπορεί να αναγνωστεί: %1$s</string> + <string name="appimg_not_linux">Αυτό δεν είναι AppImage (δεν είναι πρόγραμμα Linux)</string> + <string name="appimg_wrong_arch">Αυτό το AppImage δεν είναι χτισμένο ούτε για ARM64 (aarch64) ούτε για PC x86</string> + <string name="appimg_not_appimage">Αυτό είναι πρόγραμμα Linux αλλά όχι AppImage</string> + <string name="appimg_wrong_type">Μόνο AppImage τύπου 2 μπορούν να εισαχθούν (αυτό είναι τύπου %1$d)</string> + <string name="appimg_no_space_import">Δεν υπάρχει αρκετός ελεύθερος χώρος: η εισαγωγή απαιτεί περίπου %1$s</string> + <string name="appimg_no_space_update">Δεν υπάρχει αρκετός ελεύθερος χώρος: η ενημέρωση απαιτεί περίπου %1$s</string> + <string name="appimg_import_failed">Η εισαγωγή απέτυχε</string> + <string name="appimg_gone">Αυτό το AppImage δεν υπάρχει πλέον</string> + <string name="appimg_update_failed">Η ενημέρωση απέτυχε</string> + <string name="appimg_extracting">Εξαγωγή %1$s</string> + <string name="appimg_extract_failed">Δεν ήταν δυνατή η εξαγωγή του AppImage</string> + <string name="appimg_extract_failed_detail">Δεν ήταν δυνατή η εξαγωγή του AppImage: %1$s</string> + + <string name="deckymgr_stop_session_loader">Διακόψτε την ενεργή συνεδρία πριν εγκαταστήσετε το Decky Loader</string> + <string name="deckymgr_download_failed">Η λήψη του Decky Loader απέτυχε</string> + <string name="deckymgr_size_mismatch">Το μέγεθος του Decky Loader δεν ταίριαζε με τα μεταδεδομένα της κυκλοφορίας</string> + <string name="deckymgr_checksum_download_failed">Δεν ήταν δυνατή η λήψη του αθροίσματος ελέγχου της κυκλοφορίας</string> + <string name="deckymgr_checksum_missing">Λείπει το άθροισμα ελέγχου της κυκλοφορίας</string> + <string name="deckymgr_checksum_invalid">Το άθροισμα ελέγχου της κυκλοφορίας δεν είναι έγκυρο</string> + <string name="deckymgr_checksum_mismatch">Αναντιστοιχία αθροίσματος ελέγχου του Decky Loader</string> + <string name="deckymgr_not_elf">Το αρχείο της κυκλοφορίας δεν είναι συμβατό εκτελέσιμο Linux 64-bit</string> + <string name="deckymgr_session_started_loader">Μια συνεδρία ξεκίνησε κατά τη λήψη· διακόψτε την πριν εγκαταστήσετε το Decky Loader</string> + <string name="deckymgr_loader_not_executable">Δεν ήταν δυνατό να οριστεί το PluginLoader ως εκτελέσιμο</string> + <string name="deckymgr_cef_failed">Δεν ήταν δυνατή η ενεργοποίηση του απομακρυσμένου εντοπισμού σφαλμάτων CEF του Steam</string> + <string name="deckymgr_stage_failed">Δεν ήταν δυνατή η προετοιμασία του PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Δεν ήταν δυνατή η διατήρηση του υπάρχοντος PluginLoader</string> + <string name="deckymgr_loader_activate_failed">Δεν ήταν δυνατή η ενεργοποίηση του νέου PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Διακόψτε την ενεργή συνεδρία πριν εγκαταστήσετε ένα πρόσθετο</string> + <string name="deckymgr_loader_required">Εγκαταστήστε το Decky Loader πριν εισαγάγετε ένα πρόσθετο</string> + <string name="deckymgr_zip_unreadable">Δεν ήταν δυνατή η ανάγνωση του επιλεγμένου αρχείου ZIP</string> + <string name="deckymgr_plugins_dir_failed">Δεν ήταν δυνατή η δημιουργία του καταλόγου προσθέτων Decky</string> + <string name="deckymgr_extracting_zip">Εξαγωγή ZIP προσθέτου</string> + <string name="deckymgr_zip_one_folder">Το ZIP προσθέτου πρέπει να περιέχει έναν φάκελο προσθέτου στο ανώτερο επίπεδο</string> + <string name="deckymgr_zip_missing_files">Από το ZIP προσθέτου λείπουν τα plugin.json, package.json ή dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Λείπει το όνομα του προσθέτου</string> + <string name="deckymgr_session_started_plugin">Μια συνεδρία ξεκίνησε κατά την εγκατάσταση· διακόψτε την πριν εγκαταστήσετε ένα πρόσθετο</string> + <string name="deckymgr_plugin_installed">Το πρόσθετο εγκαταστάθηκε · κάντε επανεκκίνηση του Steam για να φορτωθεί</string> + <string name="deckymgr_plugin_install_failed">Η εγκατάσταση του ZIP προσθέτου απέτυχε</string> + <string name="deckymgr_zip_too_many">Το ZIP προσθέτου περιέχει πολύ μεγάλο αριθμό εγγραφών</string> + <string name="deckymgr_zip_invalid_path">Το ZIP προσθέτου περιέχει μη έγκυρη διαδρομή</string> + <string name="deckymgr_zip_duplicate_paths">Το ZIP προσθέτου περιέχει διπλές διαδρομές</string> + <string name="deckymgr_zip_unsafe_path">Το ZIP προσθέτου περιέχει μη ασφαλή διαδρομή</string> + <string name="deckymgr_folder_failed">Δεν ήταν δυνατή η δημιουργία φακέλου προσθέτου</string> + <string name="deckymgr_zip_too_large">Το ZIP προσθέτου επεκτείνεται πέρα από το όριο του 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Δεν ήταν δυνατό να οριστεί το ενσωματωμένο εκτελέσιμο του προσθέτου ως εκτελέσιμο</string> + <string name="deckymgr_remote_entry_invalid">Μη έγκυρη εγγραφή remote_binary</string> + <string name="deckymgr_remote_name_invalid">Μη έγκυρο όνομα απομακρυσμένου εκτελέσιμου</string> + <string name="deckymgr_remote_url_https">Το URL του απομακρυσμένου εκτελέσιμου πρέπει να χρησιμοποιεί HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Το απομακρυσμένο εκτελέσιμο %1$s έχει μη έγκυρο κατακερματισμό SHA-256</string> + <string name="deckymgr_bin_dir_failed">Δεν ήταν δυνατή η δημιουργία καταλόγου bin του προσθέτου</string> + <string name="deckymgr_downloading_binary">Λήψη εκτελέσιμου προσθέτου · %1$s</string> + <string name="deckymgr_binary_download_failed">Δεν ήταν δυνατή η λήψη του εκτελέσιμου προσθέτου %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Αναντιστοιχία αθροίσματος ελέγχου εκτελέσιμου προσθέτου · %1$s</string> + <string name="deckymgr_binary_not_executable">Δεν ήταν δυνατό να οριστεί το εκτελέσιμο του προσθέτου ως εκτελέσιμο · %1$s</string> + <string name="deckymgr_binary_replace_failed">Δεν ήταν δυνατή η αντικατάσταση του εκτελέσιμου του προσθέτου · %1$s</string> + <string name="deckymgr_binary_install_failed">Δεν ήταν δυνατή η εγκατάσταση του εκτελέσιμου του προσθέτου · %1$s</string> + <string name="deckymgr_folder_taken">Ο φάκελος προσθέτου ανήκει σε άλλο πρόσθετο</string> + <string name="deckymgr_preserve_failed">Δεν ήταν δυνατή η διατήρηση του υπάρχοντος προσθέτου</string> + <string name="deckymgr_activate_failed">Δεν ήταν δυνατή η ενεργοποίηση του εισαγόμενου προσθέτου</string> + <string name="deckymgr_settings_failed">Δεν ήταν δυνατή η ενημέρωση των ρυθμίσεων προσθέτων Decky</string> + <string name="deckymgr_restore_failed">Δεν ήταν δυνατή η επαναφορά του υπάρχοντος προσθέτου</string> + + <string name="adbfix_save_failed">Δεν ήταν δυνατή η αποθήκευση της ταυτότητας ασύρματου εντοπισμού σφαλμάτων</string> + <string name="adbfix_command_failed">Η εντολή ADB απέτυχε (%1$d)</string> + <string name="adbfix_not_confirmed">Το Android δεν επιβεβαίωσε ότι το όριο θυγατρικών διαδικασιών άλλαξε: %1$s</string> + <string name="adbfix_no_pairing">Δεν υπάρχει αποθηκευμένη σύζευξη ασύρματου εντοπισμού σφαλμάτων</string> + <string name="adbfix_enter_address">Εισαγάγετε την τρέχουσα διεύθυνση IP & θύρα του ασύρματου εντοπισμού σφαλμάτων</string> + + <string name="adbpair_timed_out">Λήξη χρόνου αναμονής για το αναδυόμενο παράθυρο σύζευξης. Δοκιμάστε ξανά από το DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Δεν ήταν δυνατή η αναζήτηση του αναδυόμενου παραθύρου σύζευξης (%1$d). Ελέγξτε ότι το Wi-Fi είναι ενεργό.</string> + <string name="adbpair_discovery_failed">Δεν ήταν δυνατή η αναζήτηση του αναδυόμενου παραθύρου σύζευξης: %1$s</string> + <string name="adbpair_six_digits">Εισαγάγετε όλα τα 6 ψηφία του κωδικού</string> + <string name="adbpair_pairing">Γίνεται σύζευξη…</string> + <string name="adbpair_code_rejected">Αυτός ο κωδικός δεν λειτούργησε. Ανοίξτε ξανά το αναδυόμενο παράθυρο σύζευξης και εισαγάγετε τον νέο κωδικό του.</string> + <string name="adbpair_connecting">Έγινε σύζευξη. Γίνεται σύνδεση…</string> + <string name="adbpair_port_not_found">Έγινε σύζευξη, αλλά δεν βρέθηκε η θύρα του ασύρματου εντοπισμού σφαλμάτων. Κρατήστε τον ασύρματο εντοπισμό σφαλμάτων ενεργό και δοκιμάστε ξανά.</string> + <string name="adbpair_applying">Εφαρμογή της ρύθμισης…</string> + <string name="adbpair_command_failed">Η εντολή ασύρματου εντοπισμού σφαλμάτων απέτυχε</string> + <string name="adbpair_channel_name">Ρύθμιση ασύρματου εντοπισμού σφαλμάτων</string> + <string name="adbpair_channel_description">Ζητά τον κωδικό σύζευξης ασύρματου εντοπισμού σφαλμάτων όσο οι Ρυθμίσεις είναι ανοιχτές</string> + <string name="adbpair_title_pair">Σύζευξη ασύρματου εντοπισμού σφαλμάτων</string> + <string name="adbpair_waiting_text">Ενεργοποιήστε τον ασύρματο εντοπισμό σφαλμάτων και πατήστε «Σύζευξη συσκευής με κωδικό σύζευξης».</string> + <string name="adbpair_waiting_long">Ενεργοποιήστε τον ασύρματο εντοπισμό σφαλμάτων και πατήστε «Σύζευξη συσκευής με κωδικό σύζευξης». Παραμείνετε στις Ρυθμίσεις: ο κωδικός εμφανίζεται σε αυτή την ειδοποίηση.</string> + <string name="adbpair_code_label">Εξαψήφιος κωδικός σύζευξης</string> + <string name="adbpair_code_hint">Πατήστε Εισαγωγή κωδικού και πληκτρολογήστε τα 6 ψηφία που εμφανίζονται στις Ρυθμίσεις.</string> + <string name="adbpair_title_code">Εισαγάγετε τον κωδικό σύζευξης Wi-Fi</string> + <string name="adbpair_title_retry">Δοκιμάστε ξανά τον κωδικό</string> + <string name="adbpair_enter_code">Εισαγωγή κωδικού</string> + <string name="adbpair_title_working">Ρύθμιση του Steam</string> + <string name="adbpair_title_done">Το Steam είναι έτοιμο</string> + <string name="adbpair_done_text">Πατήστε για να επιστρέψετε στο DroidDeck. Μπορείτε να απενεργοποιήσετε τον ασύρματο εντοπισμό σφαλμάτων τώρα.</string> + <string name="adbpair_title_failed">Η ρύθμιση ασύρματου εντοπισμού σφαλμάτων διακόπηκε</string> + + <string name="selfinst_download_failed">Η λήψη απέτυχε</string> + <string name="selfinst_size_mismatch">Το μέγεθος της λήψης δεν ταίριαζε με το δημοσιευμένο APK και απορρίφθηκε - δοκιμάστε ξανά</string> + <string name="selfinst_checksum_mismatch">Η λήψη δεν ταίριαζε με το άθροισμα ελέγχου της και απορρίφθηκε - δοκιμάστε ξανά</string> + <string name="selfinst_wrong_package">Η ενημέρωση είναι για το πακέτο Android %1$s, όχι για το %2$s</string> + <string name="selfinst_metadata_signer">Τα μεταδεδομένα της ενημέρωσης δεν αναφέρουν το κλειδί υπογραφής κυκλοφορίας του DroidDeck</string> + <string name="selfinst_unreadable">Το Android δεν μπόρεσε να διαβάσει το ληφθέν APK</string> + <string name="selfinst_apk_wrong_package">Το ληφθέν APK είναι για το %1$s, όχι για το %2$s</string> + <string name="selfinst_version_mismatch">Το ληφθέν APK αναφέρει versionCode %1$d, όχι το δημοσιευμένο %2$d</string> + <string name="selfinst_downgrade">Το Android δεν θα εγκαταστήσει το versionCode %1$d πάνω από το εγκατεστημένο %2$d</string> + <string name="selfinst_no_signing">Το ληφθέν APK δεν έχει πληροφορίες υπογραφής</string> + <string name="selfinst_wrong_signer">Το ληφθέν APK δεν είναι υπογεγραμμένο με το κλειδί κυκλοφορίας του DroidDeck</string> + <string name="appupd_http">Ο κατάλογος ενημερώσεων απάντησε με HTTP %1$d</string> + + <string name="loadstate_starting">Εκκίνηση της συνεδρίας…</string> + <string name="loadstate_elapsed">%1$d:%2$02d πέρασαν · ακόμα σε εξέλιξη</string> + <string name="loadstate_steam_update">Λήψη της ενημέρωσης του πελάτη Steam · %1$d%%</string> + <string name="loadstate_steam_client">Λήψη του πελάτη Steam · %1$s</string> + + <string name="pextra_busy">Μια εγκατάσταση εργαλείου συμβατότητας εκτελείται ήδη</string> + <string name="pextra_stop_session">Διακόψτε την ενεργή συνεδρία πριν εγκαταστήσετε εργαλεία συμβατότητας</string> + <string name="pextra_no_release">Δεν βρέθηκε κυκλοφορία ARM64 για το %1$s</string> + <string name="pextra_no_space">Απαιτούνται τουλάχιστον 4 GB ελεύθερα συν το μέγεθος της λήψης για να εγκατασταθεί το %1$s</string> + <string name="pextra_downloading">Λήψη %1$s %2$s</string> + <string name="pextra_retrying">Επανάληψη λήψης · προσπάθεια %1$d από %2$d</string> + <string name="pextra_interrupted">Η λήψη διακόπηκε</string> + <string name="pextra_download_failed">Η λήψη απέτυχε· το μερικό αρχείο διατηρείται ώστε μια νέα προσπάθεια να μπορεί να συνεχίσει</string> + <string name="pextra_too_big">Η λήψη υπερέβη το μέγεθος της κυκλοφορίας και διαγράφηκε</string> + <string name="pextra_incomplete">Η λήψη ήταν ημιτελής· το μερικό αρχείο διατηρείται για επανάληψη με συνέχιση</string> + <string name="pextra_verifying">Επαλήθευση λήψης</string> + <string name="pextra_checksum_unreadable">Δεν ήταν δυνατή η ανάγνωση του αθροίσματος ελέγχου της κυκλοφορίας· δοκιμάστε ξανά</string> + <string name="pextra_no_checksum">Το %1$s %2$s δεν δημοσιεύει άθροισμα ελέγχου· δεν εγκαταστάθηκε τίποτα</string> + <string name="pextra_checksum_mismatch">Αναντιστοιχία αθροίσματος ελέγχου· η λήψη διαγράφηκε</string> + <string name="pextra_session_started">Μια συνεδρία ξεκίνησε κατά τη λήψη· διακόψτε την πριν εγκαταστήσετε εργαλεία συμβατότητας</string> + <string name="pextra_installing">Εγκατάσταση %1$s</string> + <string name="pextra_install_failed">Η εγκατάσταση του %1$s απέτυχε (έξοδος %2$d)</string> + <string name="pextra_could_not_install">Δεν ήταν δυνατή η εγκατάσταση του %1$s</string> + <string name="esync_fetching">Λήψη πακέτου droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">με βοηθητικά Linux</string> + <string name="cmgr_fex_dlls_only">Μόνο DLL</string> + <string name="cmgr_original_proton_updated">Αρχικό (το Proton ενημερώθηκε από την τελευταία εναλλαγή)</string> + <string name="cmgr_changed_outside">Άλλαξε εκτός Στοιχείων</string> + <string name="cmgr_not_present">δεν υπάρχει</string> + <string name="cmgr_original_version">Αρχικό %1$s</string> + <string name="cmgr_original_from">Αρχικό από %1$s</string> + <string name="cmgr_swap_queued">Το %1$s %2$s θα μπει στο %3$s όταν κλείσει το παιχνίδι που εκτελείται σε αυτό.</string> + <string name="cmgr_swap_done">Το %1$s %2$s βρίσκεται τώρα στο %3$s. Εφαρμόζεται την επόμενη φορά που θα ξεκινήσει ένα παιχνίδι.</string> + <string name="cmgr_original_missing">Αυτό το αρχικό πακέτο δεν είναι αποθηκευμένο</string> + <string name="cmgr_restore_queued">Το %1$s του %2$s θα επανέλθει στο αρχικό του όταν κλείσει το παιχνίδι που εκτελείται σε αυτό.</string> + <string name="cmgr_restore_done">Το %1$s του %2$s επανήλθε από το αρχικό του %3$s.</string> + <string name="cmgr_package_in_use">Το %1$s χρησιμοποιείται στο %2$s. Αλλάξτε πρώτα αυτό το Proton σε κάτι άλλο.</string> + <string name="cmgr_package_not_stored">Το %1$s δεν είναι αποθηκευμένο</string> + <string name="cmgr_deleted">Διαγράφηκε %1$s.</string> + <string name="cmgr_original_kept">Το αρχικό της εγκατεστημένης έκδοσης διατηρείται: είναι ο δρόμος της επιστροφής.</string> + <string name="cmgr_not_stored">Δεν είναι αποθηκευμένο</string> + <string name="cmgr_deleted_original">Διαγράφηκε το αρχικό %1$s του %2$s.</string> + <string name="cmgr_nightlies_only">Οι λήψεις προέρχονται μόνο από τις κυκλοφορίες Nightlies</string> + <string name="cmgr_list_predates_checksums">Αυτή η λίστα πακέτων προηγείται των αθροισμάτων ελέγχου - ανανεώστε την και δοκιμάστε ξανά</string> + <string name="cmgr_checksum_mismatch">Αναντιστοιχία αθροίσματος ελέγχου</string> + + <string name="sprefs_upscaler_linear">Γραμμικό</string> + <string name="sprefs_upscaler_nearest">Πλησιέστερο</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (ποιότητα)</string> + <string name="sprefs_upscaler_sharpen">Μόνο όξυνση</string> + <string name="sprefs_lod_bias_auto">Αυτόματο (αντιστοιχία κλιμάκωσης)</string> + + <string name="look_off_desc">Δεν εφαρμόζεται τίποτα.</string> + <string name="look_game_clarity">Σαφήνεια παιχνιδιού</string> + <string name="look_game_clarity_desc">Όξυνση με μια πινελιά αντίθεσης - το καθημερινό.</string> + <string name="look_vivid">Έντονο</string> + <string name="look_vivid_desc">Έντονα ενισχυμένο χρώμα. Το Deband ενεργό ώστε οι ουρανοί να μη γραμμώνονται.</string> + <string name="look_cinematic">Κινηματογραφικό</string> + <string name="look_cinematic_desc">Βαθύτερη αντίθεση, πιο ψυχρό χρώμα, ομαλές ακμές.</string> + <string name="look_competitive">Ανταγωνιστικό</string> + <string name="look_competitive_desc">Ανασηκωμένες σκιές και έντονη όξυνση - εντοπίστε πρώτα τους παίκτες.</string> + <string name="look_adaptive_sharpen">Προσαρμοστική όξυνση</string> + <string name="look_adaptive_sharpen_desc">Μόνο όξυνση, το χρώμα παραμένει ανεπηρέαστο.</string> + <string name="look_filmic">Φιλμικό</string> + <string name="look_filmic_desc">Καμπύλη σε στιλ φιλμ, ελαφρώς απαλή.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Έντονο και δυναμικό.</string> + <string name="look_retro_crt">Ρετρό CRT</string> + <string name="look_retro_crt_desc">Ο σωλήνας CRT και τα αναλογικά περάσματα σήματος μαζί.</string> + <string name="look_upscale_sharp">Έντονη μεγέθυνση</string> + <string name="look_upscale_sharp_desc">Για λειτουργία κάτω από την ανάλυση της οθόνης.</string> + <string name="look_pixel_clean">Καθαρά Pixel</string> + <string name="look_pixel_clean_desc">Ευκρινή pixel για 2D και παλιά παιχνίδια.</string> + <string name="look_anime_edge">Περίγραμμα Anime</string> + <string name="look_anime_edge_desc">Περιγράμματα τύπου toon συν όξυνση.</string> + + <string name="gpuinfo_not_adreno">Δεν είναι GPU Adreno</string> + <string name="gpuinfo_supported">Υποστηρίζεται</string> + <string name="gpuinfo_experimental">Πειραματικό: τα προγράμματα οδήγησής του είναι δοκιμαστικές εκδόσεις</string> + <string name="gpuinfo_below_tested">Κάτω από το δοκιμασμένο υλικό (Adreno 725 και νεότερα): ίσως να μην εκτελεστεί</string> + <string name="gpuinfo_unsupported">Δεν υποστηρίζεται: το DroidDeck χρειάζεται GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Το όριο ρυθμού του GitHub ξεπεράστηκε - δοκιμάστε ξανά αργότερα</string> + <string name="turnip_github_http">Το GitHub απάντησε με HTTP %1$d</string> + <string name="turnip_download_failed">Η λήψη απέτυχε</string> + <string name="turnip_list_predates_checksums">Αυτή η λίστα προγραμμάτων οδήγησης προηγείται των αθροισμάτων ελέγχου - ανανεώστε την και δοκιμάστε ξανά</string> + <string name="turnip_checksum_mismatch">Αναντιστοιχία αθροίσματος ελέγχου - η λήψη απορρίφθηκε</string> + <string name="turnip_not_adrenotools">Δεν είναι πρόγραμμα οδήγησης AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">χωρίς meta.json</string> + <string name="turnip_reject_meta_unreadable">Το meta.json δεν είναι αναγνώσιμο (%1$s)</string> + <string name="turnip_reject_linux_driver">αυτό είναι πρόγραμμα οδήγησης runtime Linux (εισαγάγετέ το από το «Πρόγραμμα οδήγησης runtime Linux»)</string> + <string name="turnip_reject_wayland">αυτό είναι πρόγραμμα οδήγησης παιχνιδιών Wayland, το οποίο αυτή η εφαρμογή δεν χρησιμοποιεί</string> + <string name="turnip_reject_no_library_name">Το meta.json δεν ονομάζει κανένα libraryName, οπότε δεν ήταν δυνατό να δοθεί τίποτα στο AdrenoTools</string> + <string name="turnip_reject_library_missing">Το meta.json ονομάζει το %1$s, το οποίο δεν βρίσκεται στο zip</string> + <string name="turnip_reject_not_aarch64">Το %1$s δεν είναι κοινόχρηστη βιβλιοθήκη ELF 64-bit AArch64</string> + <string name="turnip_reject_glibc">Το %1$s συνδέεται με glibc - ένα Turnip «-Linux», που ανήκει στο «Πρόγραμμα οδήγησης runtime Linux»</string> + <string name="lvd_no_library">Δεν υπάρχει libvulkan_freedreno*.so σε αυτό το zip. Ένα zip Android (AdrenoTools) ή -Wayland Turnip δεν είναι πρόγραμμα οδήγησης runtime Linux.</string> + <string name="lvd_not_aarch64">Το %1$s δεν είναι κοινόχρηστη βιβλιοθήκη ELF 64-bit AArch64.</string> + <string name="lvd_not_glibc">Το %1$s δεν είναι πρόγραμμα οδήγησης glibc - συνδέεται με τη libc του Android. Το Linux runtime χρειάζεται ένα zip «-Linux»· ένα απλό ή «-Wayland» Turnip δεν μπορεί να φορτωθεί καθόλου από τον πελάτη Steam.</string> + <string name="bundle_no_manifest">Δεν είναι πακέτο προγραμμάτων οδήγησης: δεν υπάρχει manifest.json που να ονομάζει πρόγραμμα οδήγησης android και linux</string> + <string name="bundle_entry_outside">Δεν είναι πακέτο προγραμμάτων οδήγησης: το %1$s δείχνει έξω από αυτό</string> + <string name="bundle_too_large">Δεν είναι πακέτο προγραμμάτων οδήγησης: αποσυμπιέζεται σε περισσότερα από %1$d MB</string> + + <string name="gstore_sd_card">Κάρτα SD</string> + <string name="gstore_folder">Φάκελος</string> + + <string name="logshare_chooser">Κοινοποίηση αρχείων καταγραφής συνεδρίας</string> + + <string name="hdr_needs_android_10">απαιτεί Android 10 ή νεότερο (επίπεδα οθόνης με χρωματικό χώρο)</string> + <string name="hdr_none">αυτή η οθόνη δεν αναφέρει υποστήριξη HDR</string> + <string name="hdr_not_hdr10">αυτή η οθόνη υποστηρίζει %1$s, όχι HDR10</string> + + <string name="gpu_this_gpu">αυτό το GPU</string> + <string name="phantom_title_on">Το όριο θυγατρικών διαδικασιών είναι ενεργό</string> + <string name="phantom_title_unset">Το όριο θυγατρικών διαδικασιών δεν έχει οριστεί</string> + <string name="phantom_title_unreadable">Δεν ήταν δυνατός ο έλεγχος του ορίου θυγατρικών διαδικασιών</string> + <string name="phantom_title_off">Το όριο θυγατρικών διαδικασιών είναι ανενεργό</string> + <string name="phantom_title_not_required">Το όριο θυγατρικών διαδικασιών δεν απαιτείται</string> + <string name="phantom_instructions_fix">%1$s Αν αυτό δεν είναι δυνατό, συνδέστε αυτή τη συσκευή σε έναν υπολογιστή με ADB και εκτελέστε την παρακάτω εντολή. Επιστρέψτε εδώ και ελέγξτε ξανά.</string> + <string name="phantom_instructions_off">Οι συνεδρίες Steam μπορούν να ξεκινήσουν.</string> + <string name="phantom_instructions_not_applicable">Αυτή η έκδοση Android δεν χρησιμοποιεί αυτό το όριο.</string> + <string name="phantom_fix_toggle">Ενεργοποιήστε την «Απενεργοπ. περιορισμών σε θυγατρικές διεργασίες» στις Επιλογές προγραμματιστή και αφήστε τις Επιλογές προγραμματιστή ενεργές μετά.</string> + <string name="phantom_fix_no_toggle">Αυτή η έκδοση Android δεν έχει διακόπτη για αυτό. Χρησιμοποιήστε τον ασύρματο εντοπισμό σφαλμάτων για να το αλλάξετε από αυτή τη συσκευή.</string> + <string name="upd_block_no_apk">Αυτή η έκδοση δεν έχει λήψη για αυτό το αντίγραφο του DroidDeck.</string> + <string name="upd_block_version_code">Το Android δεν θα το εγκαταστήσει πάνω από αυτήν την έκδοση επειδή το versionCode %1$d είναι μικρότερο από το εγκατεστημένο %2$d.</string> + <string name="upd_fail_downgrade">Το Android δεν θα εγκαταστήσει μια παλιότερη έκδοση πάνω από μια νεότερη. Παραμείνετε σε αυτή την έκδοση μέχρι να την προφτάσει το κανάλι.</string> + <string name="upd_fail_signature">Αυτό το αντίγραφο του DroidDeck είναι υπογεγραμμένο διαφορετικά (τοπική έκδοση;), οπότε το Android δεν θα το ενημερώσει επί τόπου.</string> + <string name="upd_fail_storage">Δεν υπάρχει αρκετός ελεύθερος χώρος για την ενημέρωση.</string> + <string name="upd_fail_aborted">Η ενημέρωση ακυρώθηκε.</string> + <string name="upd_fail_with_message">Η ενημέρωση δεν εγκαταστάθηκε: %1$s</string> + <string name="upd_fail_generic">Η ενημέρωση δεν εγκαταστάθηκε.</string> + <string name="saves_layout_zip">zip %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">Το %1$s δεν έχει εκκινηθεί ακόμα</string> + <string name="saves_none_found">Δεν βρέθηκαν αρχεία αποθήκευσης για το %1$s</string> + <string name="saves_not_save_zip">Το %1$s δεν έχει φάκελο drive_c, οπότε δεν είναι zip αποθήκευσης GameHub ή Winlator</string> + <string name="gstore_cannot_create">δεν είναι δυνατή η δημιουργία φακέλων στο %1$s</string> + <string name="gstore_cannot_write">δεν είναι δυνατή η εγγραφή στο %1$s</string> + <string name="gstore_cannot_write_detail">δεν είναι δυνατή η εγγραφή στο %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Ο φάκελος δεν είναι διαθέσιμος</string> + <string name="gfiles_name_taken">Ένα διαφορετικό αρχείο χρησιμοποιεί ήδη το %1$s</string> + <string name="gfiles_art_unavailable">Ο φάκελος γραφικών δεν είναι διαθέσιμος</string> + <string name="gfiles_unrelated_inventory">Ο φάκελος έχει άσχετο ευρετήριο συγχρονισμού</string> + <string name="gfiles_remove_failed">Δεν ήταν δυνατή η κατάργηση του %1$s</string> + <string name="gfiles_outside_folder">Το αρχείο βγαίνει εκτός του φακέλου εξαγωγής</string> + <string name="cmgr_fex_unnamed">FEX (έκδοση χωρίς όνομα έκδοσης)</string> + <string name="cmgr_no_profile">χωρίς profile.json στο %1$s</string> + <string name="cmgr_not_component_package">Το %1$s δεν είναι πακέτο στοιχείου Linux (τύπος %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s ελεύθερα</string> + <string name="mode_storage_auto_short">Αυτόματο</string> + <string name="appupd_catalog_rejected">Ο κατάλογος ενημερώσεων απέτυχε στους ελέγχους του (%1$s)</string> + <string name="main_adb_clip_label">Ρύθμιση θυγατρικών διαδικασιών DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Συνδεδεμένος · λειτουργία εκτός σύνδεσης</string> + <string name="setup_signed_in_unnamed">Συνδεδεμένος</string> + <string name="driver_tag_bundled">ΣΕ ΠΑΚΕΤΟ</string> + <string name="driver_tag_downloaded">ΛΗΦΘΗΚΕ</string> + <string name="driver_tag_imported">ΕΙΣΗΧΘΗΚΕ</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Οθόνη συνεδρίας</string> + <string name="display_resolution">Ανάλυση</string> + <string name="display_game_fit">Προσαρμογή παιχνιδιού 16:9</string> + <string name="display_game_fit_hint">Πώς προσαρμόζονται τα παιχνίδια 16:9 σε αυτή την οθόνη. Από την επόμενη συνεδρία.</string> + <string name="display_game_fit_unavailable">Επιλέξτε Αντιστοίχιση οθόνης ή ένα προσαρμοσμένο μέγεθος πιο στενό από 16:9.</string> + <string name="display_preserve">Διατήρηση αναλογιών</string> + <string name="display_stretch">Διάταση στην οθόνη</string> + <string name="display_image_scaling">Κλιμάκωση εικόνας</string> + <string name="display_filter">Φίλτρο κλιμάκωσης</string> + <string name="display_filter_hint">Κοινό για το Steam και την Επιφάνεια εργασίας.</string> + <string name="display_filter_live">Εφαρμόζεται σε πραγματικό χρόνο. Κοινό για το Steam και την Επιφάνεια εργασίας.</string> + <string name="display_filter_note">Τα FSR, GSR και NIS εφαρμόζονται κατά τη μεγέθυνση της εικόνας συνεδρίας. Το Μόνο όξυνση λειτουργεί και χωρίς μεγέθυνση.</string> + <string name="display_sharpness">Οξύτητα φίλτρου</string> + <string name="display_frame_rate">Καρέ ανά δευτερόλεπτο</string> + <string name="display_look_filter">%1$s Ορίζει την κλιμάκωση σε %2$s.</string> + <string name="display_match_screen">Αντιστοίχιση οθόνης (%1$d×%2$d)</string> + <string name="display_follow_screen">Ακολούθηση οθόνης (αλλάζει μέγεθος όταν διπλώνει ή ξεδιπλώνει)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Εμφάνιση στοιχείων συσκευής</string> + <string name="device_info_hide">Απόκρυψη στοιχείων συσκευής</string> + <string name="device_info_loading">Ανάγνωση της συσκευής…</string> + <string name="device_info_copy">Αντιγραφή</string> + <string name="device_info_copy_hint">Αντιγράψτε αυτά τα στοιχεία σε μια αναφορά σφάλματος.</string> + <string name="device_info_copied">Αντιγράφηκε.</string> + <string name="force_ssbs_title">Εξαναγκασμός SSBS</string> + <string name="force_ssbs_hint">Διατηρεί μια ρύθμιση ταχύτητας CPU που το Wine απενεργοποιεί συνεχώς. Μπορεί να κάνει τα παιχνίδια Windows πιο γρήγορα σε Snapdragon 8 Elite· μικρή διαφορά σε παλαιότερα chip. Ισχύει από την επόμενη εκκίνηση παιχνιδιού.</string> + + <string name="rail_stores">Καταστήματα</string> + <string name="source_steam">Steam</string> + <string name="source_added">Προσαρμοσμένο</string> + <string name="setup_stores">Καταστήματα</string> + <string name="setup_stores_open_on">Άνοιγμα καταστήματος σε</string> + <string name="setup_stores_speed">Επίπεδο ταχύτητας λήψης</string> + <string name="setup_stores_engine">Μηχανή καταστημάτων</string> + <string name="setup_stores_engine_chip_ready">● Η μηχανή είναι έτοιμη</string> + <string name="setup_stores_engine_chip_missing">Δεν έχει χτιστεί</string> + <string name="stores_tier_balanced">Ισορροπημένο</string> + <string name="stores_tier_fast">Ταχύ</string> + <string name="stores_tier_max">Μέγιστο</string> + <string name="stores_title">Καταστήματα</string> + <string name="stores_settings">Ρυθμίσεις καταστημάτων</string> + <string name="stores_settings_eyebrow">Ρυθμίσεις</string> + <string name="stores_chip_signed_out">(μη συνδεδεμένος)</string> + <string name="stores_tab_store">Κατάστημα</string> + <string name="stores_tab_installed">Εγκατεστημένα</string> + <string name="stores_tab_library">Βιβλιοθήκη</string> + <string name="stores_tab_all">Όλα</string> + <string name="stores_tab_downloads">Λήψεις</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Σύνδεση</string> + <string name="stores_signout_named">%1$s · αποσύνδεση</string> + <string name="stores_signout_title">Αποσύνδεση από %1$s;</string> + <string name="stores_signout_note">Τα εγκατεστημένα παιχνίδια παραμένουν. Η βιβλιοθήκη ανακτάται ξανά όταν συνδεθείτε πάλι.</string> + <string name="stores_signout_stay">Παραμονή συνδεδεμένου</string> + <string name="stores_signout_go">Αποσύνδεση</string> + <string name="stores_search_catalog">Αναζήτηση στον κατάλογο %1$s…</string> + <string name="stores_search_installed">Αναζήτηση εγκατεστημένων παιχνιδιών…</string> + <string name="stores_search_library">Αναζήτηση στη βιβλιοθήκη σας…</string> + <string name="stores_search_open">Αναζήτηση</string> + <string name="stores_installed_empty">Τίποτα εγκατεστημένο</string> + <string name="stores_library_loading">Φόρτωση</string> + <string name="stores_nothing_matches">Δεν υπάρχουν παιχνίδια</string> + <string name="stores_shelves_loading">Φόρτωση του καταστήματος…</string> + <string name="stores_amazon_no_catalog">Δεν υπάρχει κατάλογος</string> + <string name="stores_shelf_new">Τι νέο υπάρχει</string> + <string name="stores_shelf_deals">Προσφορές</string> + <string name="stores_shelf_free">Δωρεάν παιχνίδια</string> + <string name="stores_shelf_trending">Σε άνοδο</string> + <string name="stores_shelf_library">Η βιβλιοθήκη σας</string> + <string name="stores_play">Αναπαραγωγή</string> + <string name="stores_install">Εγκατάσταση</string> + <string name="stores_resume_install">Συνέχιση εγκατάστασης</string> + <string name="stores_dl_interrupted">Διακόπηκε</string> + <string name="stores_install_size">Εγκατάσταση · %1$s</string> + <string name="stores_get_free">Απόκτηση δωρεάν</string> + <string name="stores_view_on">Προβολή στο %1$s</string> + <string name="stores_buy_price">Αγορά · %1$s</string> + <string name="stores_installed_chip">Εγκατεστημένο</string> + <string name="stores_in_library">Στη βιβλιοθήκη</string> + <string name="stores_free">Δωρεάν</string> + <string name="stores_resume">Συνέχιση</string> + <string name="stores_refresh">Ανανέωση</string> + <string name="stores_sort">Ταξινόμηση</string> + <string name="stores_sort_last_played">Παίχτηκαν πρόσφατα</string> + <string name="stores_sort_recently_installed">Εγκαταστήθηκαν πρόσφατα</string> + <string name="stores_sort_title_asc">Τίτλος Α–Ω</string> + <string name="stores_sort_title_desc">Τίτλος Ω–Α</string> + <string name="stores_sort_size_desc">Μέγεθος: μεγαλύτερο</string> + <string name="stores_sort_size_asc">Μέγεθος: μικρότερο</string> + <string name="stores_sort_release_date">Ημερομηνία κυκλοφορίας</string> + <string name="stores_view_list">Προβολή λίστας</string> + <string name="stores_view_cards">Προβολή καρτών</string> + <string name="stores_show_mature">Εμφάνιση περιεχομένου για ενήλικες</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Εκτός σύνδεσης</string> + <string name="epic_card_none">Ανενεργό</string> + <string name="epic_eos">Σύνδεση Epic (EOS)</string> + <string name="epic_offline">Εκκίνηση εκτός σύνδεσης</string> + <string name="epic_resolve">Επίλυση σύνδεσης Epic</string> + <string name="epic_client_version">Έκδοση %1$s</string> + <string name="epic_client_no_runtime">Εγκαταστήστε πρώτα το runtime Linux</string> + <string name="epic_client_checking">Έλεγχος για την πιο πρόσφατη έκδοση…</string> + <string name="epic_client_unpacking">Αποσυμπίεση…</string> + <string name="epic_client_unreachable">Ο διακομιστής λήψης δεν αποκρίθηκε</string> + <string name="epic_client_needs_fex">Το Epic Games Launcher χρειάζεται το FEX, το οποίο κατεβάζει το Steam. Ανοίξτε ξανά το launcher αφού ξεκινήσει το Steam.</string> + <string name="epic_client_download_failed">Η λήψη απέτυχε: %1$s</string> + <string name="epic_client_unpack_failed">Δεν ήταν δυνατή η αποσυμπίεση του launcher: %1$s</string> + <string name="epic_client_sign_in_failed">Το Epic Games Launcher δεν δέχτηκε τη σύνδεση. Εκκινήστε το ξανά από το launcher.</string> + <string name="epic_client_uninstall_body">Αφαιρεί τον εκκινητή και ελευθερώνει τον χώρο του. Τα παιχνίδια Epic παραμένουν εγκατεστημένα και λειτουργούν, και η σύνδεση διατηρείται για την επόμενη εγκατάσταση.</string> + <string name="epic_client_uninstall_stops">Η τρέχουσα συνεδρία κλείνει πρώτα.</string> + <string name="epic_client_uninstalled">Το Epic Games Launcher απεγκαταστάθηκε</string> + <string name="epic_client_uninstall_failed">Δεν ήταν δυνατή η αφαίρεση ορισμένων αρχείων του εκκινητή. Δοκιμάστε ξανά.</string> + <string name="epic_client_uninstalling">Περιμένετε να ολοκληρωθεί η απεγκατάσταση του Epic Games Launcher</string> + <string name="store_cloud_saves">Αποθηκεύσεις στο cloud</string> + <string name="cloud_upload">Μεταφόρτωση στο cloud</string> + <string name="cloud_download">Λήψη από το cloud</string> + <string name="cloud_none">Καμία αποθήκευση στο cloud</string> + <string name="cloud_conflict">Σύγκρουση cloud</string> + <string name="cloud_conflict_files">Σύγκρουση cloud · %1$d αρχεία</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Διατήρηση του cloud</string> + <string name="cloud_keep_local">Διατήρηση του τοπικού</string> + <string name="cloud_checking">Έλεγχος cloud…</string> + <string name="cloud_last_sync">Τελευταίος συγχρονισμός %1$s</string> + <string name="cloud_never">Δεν έχει συγχρονιστεί ακόμα</string> + <string name="cloud_done">%1$d αρχεία</string> + <string name="stores_eyebrow_installed">εγκατεστημένο</string> + <string name="stores_eyebrow_library">στη βιβλιοθήκη σας</string> + <string name="stores_eyebrow_store">κατάστημα</string> + <string name="achievements_title">Επιτεύγματα</string> + <string name="achievements_count">%1$d από %2$d ξεκλειδώθηκαν</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Ξεκλειδωμένα · %1$d</string> + <string name="achievements_group_locked">Κλειδωμένα · %1$d</string> + <string name="achievements_group_hidden">Κρυφά · %1$d</string> + <string name="achievements_hidden">Κρυφό επίτευγμα</string> + <string name="achievements_hidden_detail">Οι λεπτομέρειες εμφανίζονται μόλις ξεκλειδωθεί.</string> + <string name="achievements_all">Όλα τα επιτεύγματα ξεκλειδώθηκαν</string> + <string name="achievements_reading">Φόρτωση…</string> + <string name="achievements_signed_out">Συνδεθείτε στο %1$s για να δείτε τα επιτεύγματά σας.</string> + <string name="achievements_unreachable">Δεν ήταν δυνατή η σύνδεση με το %1$s. Δοκιμάστε ξανά όταν είστε συνδεδεμένοι.</string> + <string name="achievements_none">Το %1$s δεν αναφέρει επιτεύγματα για αυτό το παιχνίδι.</string> + <string name="achievements_show_all">Εμφάνιση όλων (%1$d)</string> + <string name="achievements_dialog_title">Επιτεύγματα · %1$s</string> + <string name="stores_in_steam">✓ Στο Steam</string> + <string name="stores_uninstall">Κατάργηση εγκατάστασης</string> + <string name="stores_uninstalling">Γίνεται κατάργηση εγκατάστασης…</string> + <string name="stores_uninstall_title">Κατάργηση εγκατάστασης του %1$s;</string> + <string name="stores_uninstall_body_size">Ελευθερώνει %1$s και το αφαιρεί από το Steam.</string> + <string name="stores_uninstall_body">Αφαιρεί τα αρχεία του και τη συντόμευσή του στο Steam.</string> + <string name="stores_launch_not_registered">Το Steam το εντοπίζει την επόμενη φορά που θα ξεκινήσει· εκκινήστε το από εκεί, ή ξεκινήστε το Steam τώρα.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Επιλογή του Steam ανά παιχνίδι</string> + <string name="stores_card_audio">Ήχος</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Στοιχεία</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Μηχανή</string> + <string name="stores_card_engine_value">%1$s · εγγενής</string> + <string name="stores_card_engine_java">%1$s · ενσωματωμένη</string> + <string name="stores_how_it_runs">Πώς εκτελείται</string> + <string name="stores_kv_fetched">Προέρχεται από</string> + <string name="stores_kv_fetched_value">%1$s, με τον λογαριασμό σας</string> + <string name="stores_kv_installed_to">Εγκαταστάθηκε σε</string> + <string name="stores_kv_installed_to_value">Αποθηκευτικός χώρος παιχνιδιών (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Εκκινείται από</string> + <string name="stores_kv_launched_by_value">Steam και Proton, η ίδια διαδρομή με τα παιχνίδια Steam</string> + <string name="stores_kv_launched_by_epic">Steam και Proton · σύνδεση Epic ανά εκκίνηση, επικάλυψη EOS ανενεργή</string> + <string name="stores_kv_launched_by_amazon">Steam και Proton · ορισμένες μεταβλητές Amazon Games Services</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">προστέθηκε στο Steam κατά την εγκατάσταση (Deck UI + Steam Input)</string> + <string name="stores_downloads_empty">Καμία λήψη</string> + <string name="stores_dl_paused">Σε παύση</string> + <string name="stores_dl_queued">Σε αναμονή</string> + <string name="stores_dl_queued_at">Σε αναμονή · #%1$d</string> + <string name="stores_dl_cancelled">Ακυρώθηκε</string> + <string name="stores_dl_failed">Αποτυχία</string> + <string name="stores_dl_failed_reason">Αποτυχία · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Παύση</string> + <string name="stores_dl_resume">Συνέχιση</string> + <string name="stores_dl_cancel">Ακύρωση</string> + <string name="stores_dl_retry">Επανάληψη</string> + <string name="stores_dl_clear">Εκκαθάριση</string> + <string name="stores_dl_clear_all">Εκκαθάριση ολοκληρωμένων</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Λήψη</string> + <string name="stores_stage_verify">Επαλήθευση</string> + <string name="stores_stage_install">Εγκατάσταση</string> + <string name="stores_stage_done">Τέλος</string> + <string name="stores_stage_checking">Έλεγχος</string> + <string name="stores_stage_downloading">Γίνεται λήψη</string> + <string name="stores_dl_cancel_confirm">Διαγραφή λήψης;</string> + <string name="stores_dl_failed_kept">Αποτυχία · το %1$s διατηρήθηκε</string> + <string name="stores_stage_verifying">Γίνεται επαλήθευση</string> + <string name="stores_stage_installing">Γίνεται εγκατάσταση</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d αρχεία</string> + <string name="stores_download_manager">Διαχείριση λήψεων</string> + <string name="stores_parallel">Ταυτόχρονες λήψεις</string> + <string name="stores_install_where">Εγκατάσταση σε</string> + <string name="stores_install_title">Εγκατάσταση %1$s:</string> + <string name="stores_target_internal">Εσωτερική</string> + <string name="stores_target_free">%1$s ελεύθερα</string> + <string name="stores_target_free_unknown">Ο ελεύθερος χώρος είναι άγνωστος</string> + <string name="stores_storage_insufficient">Λίγος ελεύθερος χώρος: χρειάζονται %1$s, διαθέσιμα μόνο %2$s</string> + <string name="stores_storage_low">Λίγος χώρος (%1$s ελεύθερα, χρειάζονται %2$s)</string> + <string name="stores_notification_channel">Λήψεις καταστήματος</string> + <string name="stores_notification_channel_hint">Εμφανίζει την πρόοδο λήψης παιχνιδιών και κρατά τις λήψεις ενεργές στο παρασκήνιο</string> + <string name="stores_notification_one">Γίνεται λήψη</string> + <string name="stores_notification_many">%1$d λήψεις</string> + <string name="stores_notification_waiting">Προετοιμασία…</string> + <string name="stores_notification_done_channel">Ολοκληρωμένες λήψεις καταστήματος</string> + <string name="stores_notification_installed">Το %1$s εγκαταστάθηκε</string> + <string name="stores_notification_failed">Η λήψη του %1$s απέτυχε</string> + <string name="stores_notification_delete">Διαγραφή</string> + <string name="stores_notification_keep">Διατήρηση</string> + <string name="stores_login_title">Σύνδεση στο %1$s</string> + <string name="stores_login_provider_title">Συνδεθείτε με τον πάροχό σας</string> + <string name="stores_login_reload">Επαναφόρτωση</string> + <string name="stores_login_close">Κλείσιμο</string> + <string name="stores_login_retry">Δοκιμάστε ξανά</string> + <string name="stores_login_finishing">Ολοκλήρωση σύνδεσης…</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> + <string name="stores_login_error_ssl">Η σύνδεση με τη σελίδα σύνδεσης δεν είναι ασφαλής.</string> + <string name="stores_login_error_verification">Δεν ήταν δυνατή η επαλήθευση της σύνδεσης. Δοκιμάστε ξανά.</string> + <string name="stores_login_error_generic">Η σύνδεση απέτυχε. Δοκιμάστε ξανά.</string> + <string name="common_close">Κλείσιμο</string> + <string name="common_back">Πίσω</string> + <string name="common_edit">Επεξεργασία</string> + <string name="games_add_all">Προσθήκη όλων των παιχνιδιών σε αυτόν τον φάκελο</string> + <string name="games_added_none">Τίποτα νέο σε αυτόν τον φάκελο</string> + <string name="edit_name">Όνομα</string> + <string name="edit_target">Προορισμός</string> + <string name="edit_start_in">Εκκίνηση σε</string> + <string name="edit_launch_options">Επιλογές εκκίνησης</string> + <string name="edit_artwork">Γραφικά</string> + <string name="edit_other_exe">Άλλο exe…</string> + <string name="edit_remove">Κατάργηση</string> + <string name="art_cover">Εξώφυλλο</string> + <string name="art_wide_cover">Φαρδύ εξώφυλλο</string> + <string name="art_adjust_logo">Προσαρμογή λογότυπου</string> + <string name="logo_pos_default">Προεπιλογή</string> + <string name="logo_pos_upper_left">Πάνω αριστερά</string> + <string name="logo_pos_upper_center">Πάνω κέντρο</string> + <string name="logo_pos_center">Κέντρο</string> + <string name="logo_pos_bottom_left">Κάτω αριστερά</string> + <string name="logo_pos_bottom_center">Κάτω κέντρο</string> + <string name="logo_pos_position">Θέση</string> + <string name="logo_pos_size">Μέγεθος</string> + <string name="logo_pos_save">Αποθήκευση</string> + <string name="logo_pos_reset">Επαναφορά στην προεπιλογή</string> + <string name="logo_pos_hint">Σχεδιάζεται πάνω από το φόντο του παιχνιδιού, όπως κάνει το Steam. Η ακριβής θέση μπορεί να διαφέρει μερικά pixel.</string> + <string name="logo_pos_no_logo">Αυτό το παιχνίδι δεν έχει λογότυπο ακόμη. Διάλεξε ένα στο Λογότυπο για να το δεις εδώ.</string> + <string name="logo_pos_failed">Η θέση του λογότυπου δεν αποθηκεύτηκε. Δοκίμασε ξανά.</string> + <string name="art_background">Φόντο</string> + <string name="art_logo">Λογότυπο</string> + <string name="art_icon">Εικονίδιο</string> + <string name="art_src_folder">Φάκελος παιχνιδιού</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Το αρχείο σας</string> + <string name="art_src_exe">Από το exe</string> + <string name="art_src_auto">Αυτόματο</string> + <string name="art_pick_image">Επιλογή εικόνας…</string> + <string name="art_pick_title">Επιλέξτε μια εικόνα: %1$s</string> + <string name="art_reset">Επαναφορά στο αυτόματο</string> + <string name="art_search_sgdb">Αναζήτηση στο SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Αναζήτηση παιχνιδιού</string> + <string name="art_sgdb_other_games">Άλλα αποτελέσματα</string> + <string name="art_sgdb_none">Κανένα αποτέλεσμα.</string> + <string name="art_sgdb_no_key">Το SteamGridDB χρειάζεται κλειδί API. Πρόσθεσε το δικό σου στις Ρυθμίσεις › Εκκινητής.</string> + <string name="art_sgdb_bad_key">Το SteamGridDB δεν δέχτηκε το κλειδί API. Έλεγξέ το στις Ρυθμίσεις › Εκκινητής.</string> + <string name="art_sgdb_limit">Το SteamGridDB περιορίζει τα αιτήματα τώρα. Δοκίμασε ξανά σε ένα λεπτό.</string> + <string name="art_sgdb_offline">Το SteamGridDB δεν είναι προσβάσιμο. Έλεγξε τη σύνδεση.</string> + <string name="art_sgdb_server">Κάτι πήγε στραβά στο SteamGridDB. Δοκίμασε αργότερα.</string> + <string name="art_sgdb_no_game">Το SteamGridDB δεν έχει αποτελέσματα για αυτό το παιχνίδι. Δοκίμασε να το αναζητήσεις.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d παιχνίδι προστέθηκε</item> + <item quantity="other">%1$d παιχνίδια προστέθηκαν</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d ήδη στα Παιχνίδια</item> + <item quantity="other">%1$d ήδη στα Παιχνίδια</item> + </plurals> + <string name="hop_back">B · Πίσω στο %1$s</string> + <string name="hop_from_games">το παιχνίδι</string> + <string name="hop_from_play">Ρυθμίσεις αναπαραγωγής</string> + <string name="sheet_graphics_drivers">Προγράμματα οδήγησης γραφικών</string> + <string name="comp_this_proton">Αυτό το Proton</string> + <string name="comp_every_proton">Κάθε Proton</string> + <string name="comp_for_every_proton">Για κάθε Proton</string> + <string name="comp_available_count">Διαθέσιμα · %1$d</string> + <string name="comp_checked">Ελέγχθηκε %1$s</string> + <string name="comp_check_all">Έλεγχος για νέα στοιχεία και προγράμματα οδήγησης</string> + <string name="comp_get">Λήψη</string> + <string name="comp_proton_bar">%1$s · τα DXVK, VKD3D-Proton και FEX παρακάτω ανήκουν σε αυτό το Proton</string> + <string name="comp_device_tested">%1$s · δοκιμασμένο</string> + <string name="comp_device_untested">%1$s · μη δοκιμασμένο</string> + <string name="comp_device_unsupported">%1$s · μη υποστηριζόμενο</string> + <string name="gpu_auto_keeps">Κρατά το προτεινόμενο ζεύγος ενημερωμένο</string> + <string name="gpu_bar_auto">Αυτόματο · %1$s</string> + <string name="gpu_separately">Προγράμματα οδήγησης runtime και οθόνης ξεχωριστά</string> + <string name="gpu_use_title">Χρήση %1$s;</string> + <string name="gpu_mode_title">Πώς επιλέγονται τα προγράμματα οδήγησης</string> + <string name="gpu_mode_auto_detail">Το καλύτερο ζεύγος για αυτό το GPU, πάντα ενημερωμένο</string> + <string name="gpu_mode_pair">Ταιριαστό ζεύγος</string> + <string name="gpu_mode_pair_detail">Διάλεξε ζεύγος· ορίζει και τα δύο προγράμματα οδήγησης</string> + <string name="gpu_mode_mix">Ελεύθερος συνδυασμός</string> + <string name="gpu_mode_mix_detail">Διάλεξε εικόνα και περιβάλλον χωριστά</string> + <string name="gpu_mode_pair_short">Ζεύγος</string> + <string name="gpu_mode_mix_short">Μικτό</string> + <string name="gpu_src_auto">ΑΥΤΟ</string> + <string name="gpu_src_pair">ΖΕΥΓΟΣ</string> + <string name="gpu_src_bundle">ΠΑΚΕΤΟ</string> + <string name="gpu_src_chosen">ΕΠΙΛΕΓΜΕΝΟ</string> + <string name="gpu_src_by_gpu">ΑΝΑ GPU</string> + <string name="gpu_src_default">ΠΡΟΕΠΙΛΟΓΗ</string> + <string name="gpu_display_live">Σχεδιάζει τώρα</string> + <string name="gpu_display_pending">Απαιτείται επανεκκίνηση · μέχρι τότε σχεδιάζει το %1$s</string> + <string name="gpu_runtime_live">Ενεργό</string> + <string name="gpu_runtime_pending">Επόμενη συνεδρία · αυτή κρατά το %1$s</string> + <string name="gpu_display_next">Σχεδιάζει την οθόνη. Ισχύει από την επόμενη συνεδρία.</string> + <string name="gpu_previous_driver">το προηγούμενο πρόγραμμα οδήγησης</string> + <string name="gpu_restart_banner">Κάνε επανεκκίνηση για να αλλάξει το πρόγραμμα οδήγησης εικόνας.</string> + <string name="gpu_restart_blocked">Σταμάτησε την τρέχουσα συνεδρία και κάνε επανεκκίνηση το DroidDeck για να αλλάξει το πρόγραμμα οδήγησης εικόνας.</string> + <string name="gpu_restart_now">Επανεκκίνηση τώρα</string> + <string name="gpu_restart_later">Αργότερα</string> + <string name="gpu_auto_title">Το Αυτόματο διάλεξε αυτό το ζεύγος για το %1$s σου</string> + <string name="gpu_auto_builtin_title">Το Αυτόματο χρησιμοποιεί τα ενσωματωμένα προγράμματα οδήγησης για το %1$s σου</string> + <string name="gpu_auto_reason">Επιλέχθηκε για την οικογένεια %1$s. Νέες εκδόσεις εγκαθίστανται στο παρασκήνιο.</string> + <string name="gpu_pair_title">Διάλεξε ζεύγος</string> + <string name="gpu_pair_hint">Το ζεύγος ορίζει μαζί το πρόγραμμα οδήγησης εικόνας και runtime.</string> + <string name="gpu_mix_title">Διάλεξε κάθε πρόγραμμα οδήγησης</string> + <string name="gpu_mix_hint">Το πακέτο γεμίζει και τις δύο θέσεις. Οι αλλαγές εικόνας ισχύουν μετά από επανεκκίνηση, οι αλλαγές περιβάλλοντος από την επόμενη συνεδρία.</string> + <string name="gpu_change_display">Αλλαγή προγράμματος οδήγησης εικόνας</string> + <string name="gpu_change_runtime">Αλλαγή προγράμματος οδήγησης runtime</string> + <string name="gpu_autos_pick">ΕΠΙΛΟΓΗ ΑΥΤΟΜΑΤΟΥ</string> + <string name="gpu_installed">Εγκατεστημένο</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · επανεκκίνηση για εφαρμογή</string> + <string name="gpu_chip_restart">%1$s · απαιτείται επανεκκίνηση</string> + <string name="comp_this_device">Αυτή η συσκευή</string> + <string name="proton_remove_title">Κατάργηση %1$s;</string> + <string name="setup_tab_diagnostics">Διαγνωστικά</string> + <string name="setup_ready">Έτοιμο για παιχνίδι</string> + <string name="setup_not_ready">Δεν είναι ακόμα έτοιμο για παιχνίδι</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">όριο διαδικασιών ανενεργό</string> + <string name="setup_ready_signed_in">συνδεδεμένος ως %1$s</string> + <string name="setup_needs_you">Όταν κάτι χρειάζεται εσάς</string> + <string name="setup_group_look">Εμφάνιση</string> + <string name="setup_group_device">Αυτή η συσκευή</string> + <string name="setup_group_art">Γραφικά βιβλιοθήκης</string> + <string name="setup_group_download">Λήψη</string> + <string name="setup_download_source">Πηγή</string> + <string name="setup_download_source_auto">Αυτόματη</string> + <string name="setup_download_source_direct">Άμεση</string> + <string name="setup_download_source_mirror">Καθρέφτης</string> + <string name="setup_download_source_custom">Δικό σου prefix</string> + <string name="setup_download_mirror">Ιστότοπος</string> + <string name="setup_download_prefix">Prefix</string> + <string name="flathub_eyebrow">ΕΦΑΡΜΟΓΕΣ LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Εφαρμογές επιφάνειας εργασίας για την επιφάνεια εργασίας Linux, ανοίγουν από την Επιφάνεια εργασίας.</string> + <string name="flathub_setup">Ρύθμιση του Flathub</string> + <string name="flathub_remove_title">Κατάργηση %1$s;</string> + <string name="flathub_remove_note">Οι ρυθμίσεις και τα αρχεία του διατηρούνται.</string> + <string name="flathub_keep">Διατήρηση</string> + <string name="desktop_size">Μέγεθος στον δίσκο</string> + <string name="desktop_uninstall_title">Κατάργηση εγκατάστασης της επιφάνειας εργασίας;</string> + <string name="desktop_all_systems">Όλα</string> + <string name="gog_achievements">Επιτεύγματα GOG</string> + <string name="gog_achievements_hint">Συγχρονίζει επιτεύγματα για υποστηριζόμενα παιχνίδια GOG. Ισχύει από την επόμενη εκκίνηση.</string> + <string name="gog_achievements_off">Τα επιτεύγματα είναι απενεργοποιημένα</string> + <string name="gog_achievements_on">Τα επιτεύγματα είναι ενεργοποιημένα</string> + <string name="gog_achievements_signin">Συνδεθείτε ξανά στο GOG</string> + <string name="gog_achievements_uploaded">Τα επιτεύγματα ανέβηκαν</string> + <string name="gog_achievements_pending">Η μεταφόρτωση επιτεύγματος εκκρεμεί</string> + <string name="gog_achievements_enable_store">Ενεργοποιήστε τα επιτεύγματα GOG στις ρυθμίσεις καταστημάτων</string> + <string name="gog_achievements_unavailable">Τα επιτεύγματα δεν είναι διαθέσιμα· ελέγξτε τα αρχεία καταγραφής της συνεδρίας</string> + <string name="achievement_unlocked">Το επίτευγμα ξεκλειδώθηκε</string> + <string name="touch_paste">Επικόλληση</string> + <string name="touch_dpad">Σταυρός κατεύθυνσης</string> + <string name="touch_left_stick">Αριστερό στικ</string> + <string name="touch_right_stick">Δεξί στικ</string> + <string name="touch_menu">Μενού</string> + <string name="touch_keyboard">Πληκτρολόγιο</string> + <string name="touch_dpad_up">Σταυρός κατεύθυνσης πάνω</string> + <string name="touch_dpad_down">Σταυρός κατεύθυνσης κάτω</string> + <string name="touch_dpad_left">Σταυρός κατεύθυνσης αριστερά</string> + <string name="touch_dpad_right">Σταυρός κατεύθυνσης δεξιά</string> + <string name="touch_title">Χειριστήρια αφής</string> + <string name="touch_controller">Χειριστήριο αφής</string> + <string name="touch_mouse">Ποντίκι</string> + <string name="touch_on">Ενεργό</string> + <string name="touch_off">Ανενεργό</string> + <string name="touch_speed_slow">Αργή</string> + <string name="touch_speed_normal">Κανονική</string> + <string name="touch_speed_fast">Ταχεία</string> + <string name="touch_edit_layout">Επεξεργασία διάταξης</string> + <string name="touch_droiddeck_menu">Μενού DroidDeck</string> + <string name="touch_drag_hint">Σύρετε τα χειριστήρια στην οθόνη</string> + <string name="touch_arrange">Διάταξη</string> + <string name="touch_discard">Απόρριψη</string> + <string name="touch_saving">Αποθήκευση…</string> + <string name="touch_icon">Εικονίδιο</string> + <string name="touch_narrower">Π−</string> + <string name="touch_wider">Π+</string> + <string name="touch_shorter">Υ−</string> + <string name="touch_taller">Υ+</string> + <string name="touch_hide">Απόκρυψη</string> + <string name="touch_color_opacity">Χρώμα και διαφάνεια…</string> + <string name="touch_copy_layout">Αντιγραφή αυτής της διάταξης</string> + <string name="touch_layout_copied">Η διάταξη αντιγράφηκε· επικολλήστε την στη διάταξη αφής οποιουδήποτε παιχνιδιού</string> + <string name="touch_paste_layout">Επικόλληση αντιγραμμένης διάταξης</string> + <string name="touch_reset_layout">Επαναφορά στην προεπιλογή του Steam</string> + <string name="touch_no_binding">Αυτό το χειριστήριο δεν έχει αντιστοίχιση στο Steam για να του δοθεί εικονίδιο</string> + <string name="touch_icon_for">Εικονίδιο για %1$s</string> + <string name="touch_layout_color">Χρώμα διάταξης αφής</string> + <string name="touch_done">Τέλος</string> + <string name="touch_save_failed">Δεν ήταν δυνατή η αποθήκευση της διάταξης αφής</string> + <string name="touch_saved">Η διάταξη αφής αποθηκεύτηκε στο Steam</string> + <string name="touch_app_id">Εφαρμογή %1$d</string> + <string name="touch_label_hint">Ετικέτα (προαιρετικό)</string> + <string name="touch_icons_missing">Τα εικονίδια του Steam δεν βρέθηκαν</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d εικονίδιο από το Steam</item> + <item quantity="other">%1$d εικονίδια από το Steam</item> + </plurals> + <string name="touch_icon_color">Χρώμα εικονιδίου</string> + <string name="touch_button_color">Χρώμα κουμπιού</string> + <string name="touch_no_icon">Χωρίς εικονίδιο</string> + + <string name="stores_sync_sign_in">Έλεγχος σύνδεσης…</string> + <string name="stores_sync_library">Λήψη της βιβλιοθήκης σας…</string> + <string name="stores_sync_game_list">Λήψη λίστας παιχνιδιών…</string> + <string name="stores_sync_details">Φόρτωση στοιχείων παιχνιδιών… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Συγχρονισμός %1$d παιχνιδιού…</item> + <item quantity="other">Συγχρονισμός %1$d παιχνιδιών…</item> + </plurals> + <string name="stores_sync_progress">Συγχρονισμός… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Λήψη εξωφύλλων…</string> + <string name="stores_sync_failed">Ο συγχρονισμός απέτυχε</string> + <string name="stores_sync_no_games">Δεν βρέθηκαν παιχνίδια στη βιβλιοθήκη σας στο %1$s</string> + <string name="stores_sync_amazon_no_answer">Το Amazon Games δεν απάντησε για τη βιβλιοθήκη σας: κάντε ανανέωση ή συνδεθείτε ξανά</string> + <string name="stores_sync_gog_unreachable">Δεν ήταν δυνατή η σύνδεση με το GOG</string> + <string name="stores_sync_gog_unreadable">Δεν ήταν δυνατή η ανάγνωση της βιβλιοθήκης σας στο GOG</string> + <string name="stores_registering">Εγγραφή στο Steam…</string> + <string name="mode_client_arch">Πελάτης Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Διαγνωστικά VAC</string> + <string name="setup_vac_diag_hint">Τα παιχνίδια Source καταγράφουν την κονσόλα τους (-condebug)· το vac.txt στα αρχεία καταγραφής συνεδρίας δείχνει αν είναι ασφαλές ή όχι</string> + <string name="load_starting_steam_x64">Εκκίνηση του Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Χρησιμοποιείται από τον πελάτη Steam x86-64</string> + <string name="storage_uninstall_in_x64">Αυτό το αντίγραφο βρίσκεται στον πελάτη Steam x86-64. Επιλέξτε x86-64 στο «Πελάτης Steam» και, στη συνέχεια, απεγκαταστήστε το εδώ.</string> + <string name="storage_uninstall_in_arm64">Αυτό το αντίγραφο βρίσκεται στον πελάτη Steam ARM64. Επιλέξτε ARM64 στο «Πελάτης Steam» και, στη συνέχεια, απεγκαταστήστε το εδώ.</string> + <string name="drawer_page_glasses">Γυαλιά</string> + <string name="glasses_open">Γυαλιά VITURE</string> + <string name="glasses_control">Έλεγχος γυαλιών</string> + <string name="glasses_driver_missing">Αυτό το build δεν περιλαμβάνει το πρόγραμμα οδήγησης για αυτά τα γυαλιά.</string> + <string name="glasses_connection_failed">Δεν ήταν δυνατή η σύνδεση με τα γυαλιά. Συνδέστε ξανά το καλώδιο ή πατήστε «Να επιτρέπεται» για νέα προσπάθεια.</string> + <string name="glasses_allow">Να επιτρέπεται</string> + <string name="glasses_allow_hint">Επιτρέπει στο DroidDeck να ρυθμίζει τον ρυθμό ανανέωσης, τη λειτουργία 3D, τη φωτεινότητα, την ένταση ήχου και τη σκίαση των γυαλιών, και να διαβάζει την παρακολούθηση κεφαλιού τους.</string> + <string name="glasses_asking">Αναμονή για την έγκρισή σας στο παράθυρο του Android…</string> + <string name="glasses_denied">Ο έλεγχος απορρίφθηκε. Επιτρέψτε τον για να αλλάξετε τις ρυθμίσεις των γυαλιών.</string> + <string name="glasses_no_control">Αυτά τα γυαλιά δείχνουν το παιχνίδι, αλλά οι ρυθμίσεις τους δεν μπορούν να αλλάξουν από εδώ.</string> + <string name="glasses_output">Έξοδος</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Παιχνίδι στα γυαλιά</string> + <string name="glasses_game_on_hint">Εμφανίζει το παιχνίδι μόνο στα γυαλιά. Ανενεργό: το δείχνει το τηλέφωνο και το Android κατοπτρίζει την οθόνη του τηλεφώνου.</string> + <string name="glasses_display">Οθόνη</string> + <string name="glasses_refresh">Ρυθμός ανανέωσης</string> + <string name="glasses_3d">3D (δίπλα-δίπλα)</string> + <string name="glasses_3d_hint">Αλλάξτε τα έξυπνα γυαλιά σε 3D δίπλα-δίπλα. Η παρακολούθηση κεφαλιού ελέγχεται ξεχωριστά.</string> + <string name="glasses_3d_failed">Το σήμα 3D δεν επιβεβαιώθηκε. Δοκιμάστε ξανά μόλις επανέλθει η εικόνα 2D.</string> + <string name="glasses_no_signal">Δεν υπάρχει εικόνα: τα γυαλιά είναι σε λειτουργία που αυτό το τηλέφωνο δεν μπορεί να στείλει. Κρατήστε πατημένο το κουμπί 2D/3D τους ή αποσυνδέστε τα και συνδέστε τα ξανά.</string> + <string name="glasses_3d_refresh">Ρυθμός ανανέωσης 3D</string> + <string name="glasses_auto3d">3D για παιχνίδια VR</string> + <string name="glasses_auto3d_hint">Μεταβαίνει σε 3D όσο εκτελείται το SteamVR και επιστρέφει μετά.</string> + <string name="glasses_picture">Εικόνα</string> + <string name="glasses_picture_hint">Εμφανίζει αυτόματα επίπεδο περιεχόμενο και στα δύο μάτια και ανιχνεύει το SteamVR. Επιλέξτε Side-by-side game για περιεχόμενο SBS.</string> + <string name="glasses_picture_auto">Αυτόματο</string> + <string name="glasses_picture_screen">Εικονική οθόνη</string> + <string name="glasses_picture_sbs">Παιχνίδι δίπλα-δίπλα</string> + <string name="glasses_screen_size">Πλάτος οθόνης</string> + <string name="glasses_screen_distance">Απόσταση οθόνης</string> + <string name="glasses_screen_next_session">Το πλάτος και η απόσταση ισχύουν όταν ένα παιχνίδι εκτελείται στα γυαλιά ως εικονική οθόνη.</string> + <string name="glasses_screen_no_output">Αυτές οι ρυθμίσεις ισχύουν όσο είναι ενεργό το «Παιχνίδι στα γυαλιά» και το παιχνίδι εμφανίζεται εκεί.</string> + <string name="glasses_screen_flat_hint">Το «Αυτόματο» κρατά αυτό το παιχνίδι 2D σε πλήρη οθόνη. Χρησιμοποιήστε εικονική οθόνη για να ρυθμίσετε το πλάτος, την απόσταση και την παρακολούθηση κεφαλιού.</string> + <string name="glasses_screen_use">Χρήση εικονικής οθόνης</string> + <string name="glasses_screen_direct_hint">Το SteamVR γεμίζει την προβολή. Προσαρμόστε το οπτικό του πεδίο στο VR. Το πλάτος και η απόσταση ισχύουν μόνο για μια εικονική οθόνη.</string> + <string name="glasses_screen_sbs_hint">Τα παιχνίδια δίπλα-δίπλα γεμίζουν το πεδίο κάθε ματιού. Το πλάτος και η απόσταση ισχύουν μόνο για εικονική οθόνη.</string> + <string name="glasses_tracking_flat_hint">Το «Αυτόματο» κρατά αυτό το παιχνίδι 2D σταθερό στο οπτικό πεδίο. Επιλέξτε «Εικονική οθόνη» στην ενότητα «Οθόνη» για να χρησιμοποιήσετε παρακολούθηση κεφαλιού.</string> + <string name="glasses_tracking_sbs_hint">Η παρακολούθηση κεφαλιού ισχύει για εικονική οθόνη ή για παιχνίδι SteamVR που εκτελείται.</string> + <string name="glasses_hardware">Συσκευή</string> + <string name="glasses_brightness">Φωτεινότητα</string> + <string name="glasses_volume">Ένταση ήχου</string> + <string name="glasses_sunblock">Σκίαση</string> + <string name="glasses_sunblock_hint">Σκουραίνει τους μπροστινούς φακούς.</string> + <string name="glasses_tracking">Παρακολούθηση</string> + <string name="glasses_head_tracking">Παρακολούθηση κεφαλιού</string> + <string name="glasses_head_tracking_hint">Οι αισθητήρες των ίδιων των γυαλιών περιστρέφουν την εικονική οθόνη και το SteamVR μαζί με το κεφάλι σας.</string> + <string name="glasses_recenter">Επανακεντράρισμα προβολής</string> + <string name="glasses_recenter_button">Επανακεντράρισμα οθόνης</string> + <string name="glasses_vr_fov">Οπτικό πεδίο SteamVR</string> + <string name="glasses_vr_fov_hint">Χαμηλότερο: το SteamVR έρχεται πιο κοντά και γεμίζει τα γυαλιά· υψηλότερο: βλέπετε περισσότερα γύρω σας.</string> + <string name="glasses_playing">Παίζετε στα %1$s</string> + <string name="glasses_calibration">Βαθμονόμηση παρακολούθησης</string> + <string name="glasses_calibration_hint">Μειώνει την ολίσθηση και ευθυγραμμίζει την οριζόντια αναφορά.</string> + <string name="glasses_calibration_saved_hint">Σε αυτά τα γυαλιά εφαρμόζεται αποθηκευμένη βαθμονόμηση.</string> + <string name="glasses_calibration_open">Βαθμονόμηση</string> + <string name="glasses_calibration_instructions">Τοποθετήστε τα συνδεδεμένα γυαλιά ανάποδα σε οριζόντια επιφάνεια, με τον σκελετό να ακουμπά ομοιόμορφα. Πατήστε «Έναρξη» και μην τα αγγίξετε για περίπου 8 δευτερόλεπτα. Αν κινηθούν, η μέτρηση ξεκινά από την αρχή. Αυτό διορθώνει την ολίσθηση και την κλίση, όχι την κατεύθυνση.</string> + <string name="glasses_calibration_settling">Αφήστε τα γυαλιά ανάποδα χωρίς να τα αγγίζετε. Αναμονή για να σταθεροποιηθούν…</string> + <string name="glasses_calibration_collecting">Γίνεται μέτρηση των αισθητήρων. Κρατήστε τα γυαλιά ακίνητα.</string> + <string name="glasses_calibration_moving">Εντοπίστηκε κίνηση. Μην αγγίζετε τα γυαλιά· η μέτρηση θα ξεκινήσει ξανά αυτόματα.</string> + <string name="glasses_calibration_turn_over">Τοποθετήστε τα γυαλιά ανάποδα σε οριζόντια επιφάνεια. Η μέτρηση θα ξεκινήσει μόλις τοποθετηθούν σωστά.</string> + <string name="glasses_calibration_complete">Η βαθμονόμηση αποθηκεύτηκε. Φορέστε τα γυαλιά, κοιτάξτε ευθεία μπροστά και πατήστε «Τέλος» για επανακεντράρισμα.</string> + <string name="glasses_calibration_failed">Η βαθμονόμηση δεν ολοκληρώθηκε. Ελέγξτε τη σύνδεση, κρατήστε τα γυαλιά ακίνητα και δοκιμάστε ξανά. Η προηγούμενη βαθμονόμησή σας δεν άλλαξε.</string> + <string name="glasses_calibration_start">Έναρξη</string> + <string name="glasses_calibration_done">Τέλος</string> + <string name="glasses_calibration_reset">Επαναφορά βαθμονόμησης παρακολούθησης</string> + <string name="glasses_calibration_reset_hint">Να καταργηθεί η αποθηκευμένη βαθμονόμηση και να επανέλθουν οι προεπιλογές του μοντέλου; Κάντε επανακεντράρισμα αφού φορέσετε ξανά τα γυαλιά.</string> + <string name="glasses_calibration_reset_button">Επαναφορά</string> + <string name="hand_camera_group">Παρακολούθηση χεριών</string> + <string name="hand_camera_prompt_title">Παρακολούθηση χεριών ή χειριστηρίων Joy-Con με την κάμερα του τηλεφώνου;</string> + <string name="hand_camera_prompt_body">Χωρίς συνδεδεμένο χειριστήριο, η κάμερα του τηλεφώνου παρακολουθεί τα γυμνά σας χέρια σε εικονική πραγματικότητα: τσιμπήστε τον αντίχειρα και τον δείκτη σας για να κάνετε κλικ, κλείστε το χέρι σας για να το πιάσετε και στρέψτε την παλάμη σας προς το μέρος σας και τσιμπήστε για να ανοίξετε το μενού. Με τα ζευγαρωμένα χειριστήρια Joy-Con, η κάμερα παρακολουθεί τη θέση τους, ενώ τα χειριστήρια Joy-Con παρέχουν περιστροφή και κουμπιά. Οι εικόνες υποβάλλονται σε επεξεργασία σε αυτήν τη συσκευή και δεν αποθηκεύονται ή αποστέλλονται ποτέ.</string> + <string name="hand_camera_rear">Πίσω κάμερα</string> + <string name="hand_camera_rear_hint">Προτείνεται. Συνήθως πιο ευκρινής και ευρύτερη.</string> + <string name="hand_camera_front">Μπροστινή κάμερα</string> + <string name="hand_camera_front_hint">Για όταν η πίσω πλευρά της συσκευής δεν μπορεί να είναι στραμμένη προς εσάς.</string> + <string name="hand_camera_allow">Χρήση κάμερας</string> + <string name="hand_camera_not_now">Όχι τώρα</string> + <string name="hand_camera_setting">Παρακολούθηση χεριών με κάμερα</string> + <string name="hand_camera_setting_hint">Χρησιμοποιήστε την κάμερα του τηλεφώνου για χειρονομίες με γυμνά χέρια ή για να τοποθετήσετε τα συνδεδεμένα χειριστήρια Joy-Con σε εικονική πραγματικότητα. Τα χειριστήρια Joy-Con παρέχουν περιστροφή και εντολές κουμπιών. Παύει ενώ τα έξυπνα γυαλιά παρακολουθούν τα χέρια σας ή τα χειριστήρια Joy-Con. Οι εικόνες υποβάλλονται σε επεξεργασία μόνο σε αυτήν τη συσκευή.</string> + <string name="hand_camera_choice">Κάμερα</string> + <string name="hand_camera_access">Πρόσβαση στην κάμερα</string> + <string name="hand_camera_access_hint">Επιτρέψτε την πρόσβαση στην κάμερα για να ξεκινήσει η παρακολούθηση χεριών.</string> + <string name="hand_camera_access_denied">Η πρόσβαση στην κάμερα είναι απενεργοποιημένη. Ενεργοποιήστε την από τις ρυθμίσεις Android.</string> + <string name="hand_camera_allow_button">Να επιτρέπεται</string> + <string name="hand_camera_open_settings">Άνοιγμα ρυθμίσεων</string> + <string name="hand_camera_placement">Τοποθέτηση κάμερας</string> + <string name="hand_camera_placement_hint">Βεβαιωθείτε ότι η κάμερα σάς βλέπει πριν παίξετε.</string> + <string name="hand_camera_check">Έλεγχος</string> + <string name="hand_camera_check_title">Τοποθέτηση κάμερας</string> + <string name="hand_camera_how_rear">Στήστε τη συσκευή όρθια σε απόσταση 1,5 έως 2 μέτρων, περίπου στο ύψος του στήθους, με την πίσω κάμερα στραμμένη προς εσάς. Έπειτα μπείτε στο οπτικό πεδίο με τα χέρια τεντωμένα.</string> + <string name="hand_camera_how_front">Στήστε τη συσκευή όρθια σε απόσταση 1,5 έως 2 μέτρων, περίπου στο ύψος του στήθους, με την οθόνη στραμμένη προς εσάς. Έπειτα μπείτε στο οπτικό πεδίο με τα χέρια τεντωμένα.</string> + <string name="hand_camera_starting">Εκκίνηση κάμερας…</string> + <string name="hand_camera_stand_up">Η συσκευή είναι ξαπλωμένη οριζόντια. Στήστε την όρθια ώστε η κάμερα να είναι στραμμένη προς εσάς.</string> + <string name="hand_camera_upright">Στήστε τη συσκευή πιο όρθια ώστε η κάμερα να είναι στραμμένη προς εσάς.</string> + <string name="hand_camera_not_seen">Δεν φαίνεστε ακόμη. Μπείτε στο οπτικό πεδίο ώστε να φαίνονται το κεφάλι και οι ώμοι σας.</string> + <string name="hand_camera_move_back">Κάντε ένα βήμα πίσω.</string> + <string name="hand_camera_move_closer">Πλησιάστε λίγο.</string> + <string name="hand_camera_show_hands">Κρατήστε και τα δύο χέρια τεντωμένα εκεί όπου μπορεί να τα δει η κάμερα.</string> + <string name="hand_camera_good">Φαίνεται καλό.</string> + <string name="hand_camera_failed">Η κάμερα δεν μπόρεσε να εκκινηθεί. Κλείστε άλλες εφαρμογές που τη χρησιμοποιούν και δοκιμάστε ξανά.</string> + <string name="hand_camera_switch">Αλλαγή κάμερας</string> + <string name="hand_camera_skip">Παράλειψη</string> + <string name="hand_camera_done">Τέλος</string> + <string name="glasses_xreal_network_missing">Αναμονή για τη σύνδεση USB Ethernet των γυαλιών. Αυτό το τηλέφωνο ίσως δεν τη διαθέτει στις εφαρμογές.</string> + <string name="glasses_xreal_connection_failed">Η σύνδεση XREAL διακόπηκε ή επέστρεψε μη υποστηριζόμενη απόκριση. Νέα προσπάθεια…</string> + <string name="glasses_xreal_experimental">Πειραματική υποστήριξη για 1S. Χρησιμοποιήστε τη λειτουργία Follow και απενεργοποιήστε τη σταθεροποίηση στο μενού των γυαλιών. Οι κατευθύνσεις παρακολούθησης και οι λειτουργίες οθόνης χρειάζονται ακόμα δοκιμή σε συσκευή.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Λειτουργία Cardboard</string> + <string name="cardboard_mode_hint">Εικόνες για το αριστερό και το δεξί μάτι, για γυαλιά VR κινητού.</string> + <string name="cardboard_source">Εικόνα</string> + <string name="cardboard_source_screen">Εικονική οθόνη</string> + <string name="cardboard_source_sbs">3D δίπλα-δίπλα</string> + <string name="cardboard_viewer">Γυαλιά</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Χωρίς φακό</string> + <string name="cardboard_ipd">Απόσταση ματιών</string> + <string name="cardboard_screen_width">Πλάτος οθόνης</string> + <string name="cardboard_screen_distance">Απόσταση οθόνης</string> + <string name="cardboard_head_tracking">Παρακολούθηση κεφαλιού</string> + <string name="cardboard_no_sensor">Αυτή η συσκευή δεν έχει αισθητήρα περιστροφής.</string> + <string name="cardboard_recenter">Επανακεντράρισμα προβολής</string> + <string name="cardboard_recenter_button">Επανακεντράρισμα</string> + <string name="cardboard_steamvr">SteamVR (πειραματικό)</string> + <string name="cardboard_steamvr_install">Εγκατάσταση</string> + <string name="cardboard_steamvr_installing">Λήψη και αποσυμπίεση του SteamVR…</string> + <string name="cardboard_steamvr_start">Έναρξη</string> + <string name="cardboard_steamvr_stop">Διακοπή</string> + <string name="cardboard_steamvr_unavailable">Δεν είναι διαθέσιμο σε αυτή τη συνεδρία.</string> + <string name="cardboard_steamvr_failed">Το SteamVR δεν αποκρίθηκε· ελέγξτε το αρχείο καταγραφής της συνεδρίας.</string> + <string name="drawer_component_downloads">Λήψη στοιχείων</string> + <string name="drawer_component_downloads_hint">Οι λήψεις είναι κοινές με τη σελίδα Στοιχεία. Επιλέξτε παραπάνω μια έκδοση που έχει ληφθεί για να χρησιμοποιηθεί στην επόμενη εκκίνηση παιχνιδιού.</string> + <string name="drawer_component_choose_download">Επιλέξτε έκδοση για λήψη</string> + <string name="stores_fact_developer">Δημιουργός</string> + <string name="stores_fact_publisher">Εκδότης</string> + <string name="stores_fact_released">Κυκλοφορία</string> + <string name="stores_hltb_main">Κύρια ιστορία</string> + <string name="stores_hltb_extras">+ Επιπλέον</string> + <string name="stores_hltb_completionist">Ολοκλήρωση</string> + <string name="stores_hltb_hours">%1$s ώ.</string> + <string name="stores_hltb_minutes">%1$d λεπ.</string> + <string name="display_picture_position">Θέση εικόνας</string> + <string name="display_position_top">Πάνω</string> + <string name="display_position_bottom">Κάτω</string> + <string name="display_position_center">Κέντρο (προεπιλογή)</string> + <string name="setup_tab_storage">Αποθήκευση</string> + <string name="storage_measuring">Μέτρηση αποθήκευσης…</string> + <string name="storage_measuring_hint">Την πρώτη φορά παίρνει λίγα δευτερόλεπτα.</string> + <string name="storage_internal">Εσωτερική αποθήκευση</string> + <string name="storage_used_of">χρησιμοποιούνται %1$s από %2$s</string> + <string name="storage_free">%1$s ελεύθερα</string> + <string name="storage_droiddeck_uses">Το DroidDeck χρησιμοποιεί %1$s. Μετρήθηκε στις %2$s.</string> + <string name="storage_rescanning">νέα μέτρηση…</string> + <string name="storage_other_apps">Άλλες εφαρμογές Android</string> + <string name="storage_safe_now">Μπορούν να ελευθερωθούν τώρα</string> + <string name="storage_safe_hint">Αχρησιμοποίητα περιβάλλοντα, υπολείμματα, παλιά αρχεία καταγραφής</string> + <string name="storage_clean_up">Καθαρισμός…</string> + <string name="storage_session_running">Σταμάτησε τη συνεδρία για να καθαρίσεις ή να διαγράψεις κάτι. Τα μεγέθη παραμένουν ορατά.</string> + <string name="storage_where">Πού πηγαίνει</string> + <string name="storage_games">Παιχνίδια Steam</string> + <string name="storage_game_data">Δεδομένα παιχνιδιών</string> + <string name="storage_game_data_hint">Prefix %1$s · workshop %2$s · shaders %3$s</string> + <string name="storage_tools">Proton και περιβάλλοντα</string> + <string name="storage_tools_unused">%1$s αχρησιμοποίητα</string> + <string name="storage_stores">GOG, Epic και άλλα καταστήματα</string> + <string name="storage_stores_hint">Αφαίρεσέ τα στα Καταστήματα</string> + <string name="storage_desktop">Εφαρμογές επιφάνειας εργασίας</string> + <string name="storage_desktop_hint">Εφαρμογές Flatpak και περιβάλλοντα</string> + <string name="storage_system">Σύστημα Linux και πελάτης Steam</string> + <string name="storage_system_hint">Απαραίτητα για να τρέξει οτιδήποτε</string> + <string name="storage_app_data">Δεδομένα DroidDeck</string> + <string name="storage_app_data_hint">Αρχεία καταγραφής παλιών συνεδριών %1$s · προσωρινή μνήμη · προγράμματα οδήγησης</string> + <string name="storage_legend_games">Παιχνίδια</string> + <string name="storage_legend_data">Δεδομένα παιχνιδιών</string> + <string name="storage_legend_tools">Proton και περιβάλλοντα</string> + <string name="storage_legend_stores">Άλλα καταστήματα</string> + <string name="storage_legend_desktop">Εφαρμογές επιφάνειας εργασίας</string> + <string name="storage_legend_system">Σύστημα Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Καθαρισμός</string> + <string name="storage_clean_up_lede">Τίποτα εδώ δεν αγγίζει εγκατεστημένα παιχνίδια ή λήψεις σε εξέλιξη.</string> + <string name="storage_nothing_to_clean">Δεν υπάρχει κάτι για καθάρισμα τώρα.</string> + <string name="storage_selected">Επιλεγμένα: %1$s · %2$s → %3$s θα ελευθερωθούν</string> + <string name="storage_cleaning">Καθαρισμός…</string> + <string name="storage_free_button">Ελευθέρωση %1$s</string> + <string name="storage_freed">Ελευθερώθηκαν %1$s.</string> + <string name="storage_item_runtimes">Αχρησιμοποίητα περιβάλλοντα Steam και Proton</string> + <string name="storage_item_leftovers">Υπολείμματα διαγραμμένων παιχνιδιών</string> + <string name="storage_item_leftovers_unsure">Υπολείμματα που μπορεί να περιέχουν αποθηκεύσεις</string> + <string name="storage_item_logs">Αρχεία καταγραφής παλιών συνεδριών</string> + <string name="storage_item_logs_detail">Τα αρχεία καταγραφής της τρέχουσας συνεδρίας παραμένουν</string> + <string name="storage_item_custom_detail">Κανένα παιχνίδι δεν το χρησιμοποιεί. Εγκατέστησέ το ξανά στα Στοιχεία αν το χρειαστείς.</string> + <string name="storage_item_shaders">Προσωρινή μνήμη shaders των εγκατεστημένων παιχνιδιών</string> + <string name="storage_item_shaders_detail">Ξαναχτίζεται όσο παίζεις. Τα πρώτα λεπτά κάθε παιχνιδιού θα κολλάνε ξανά.</string> + <string name="storage_tag_safe">Ασφαλή</string> + <string name="storage_tag_unused">Αχρησιμοποίητα</string> + <string name="storage_tag_stutter">Κολλήματα</string> + <string name="storage_tag_saves">Έλεγξε τις αποθηκεύσεις</string> + <string name="storage_tag_default">Προεπιλογή</string> + <string name="storage_tag_required">Απαραίτητα</string> + <string name="storage_tag_not_used">Αχρησιμοποίητα</string> + <string name="storage_back">Αποθήκευση</string> + <string name="storage_games_with_data">%1$s με τα δεδομένα τους</string> + <string name="storage_sort_largest">Μεγαλύτερα</string> + <string name="storage_sort_least_played">Λιγότερο παιγμένα</string> + <string name="storage_sort_sd">Σε κάρτα SD</string> + <string name="storage_no_games">Δεν υπάρχουν παιχνίδια εδώ.</string> + <string name="storage_played">παίχτηκε %1$s</string> + <string name="storage_never_played">Δεν παίχτηκε ποτέ</string> + <string name="storage_game_parts">Παιχνίδι %1$s · δεδομένα %2$s</string> + <string name="storage_uninstall">Κατάργηση εγκατάστασης</string> + <string name="storage_games_note">Η κατάργηση εγκατάστασης ανοίγει το παράθυρο του Steam για να το καταγράψει. Για να μετακινήσεις παιχνίδι στην κάρτα SD, χρησιμοποίησε Steam › Ρυθμίσεις › Αποθήκευση.</string> + <string name="storage_uninstall_title">Κατάργηση εγκατάστασης του %1$s;</string> + <string name="storage_uninstall_body">Το Steam ανοίγει και ζητά επιβεβαίωση. Έτσι ελευθερώνονται τα %1$s του παιχνιδιού. Το prefix μένει μέχρι να καθαρίσεις τα υπολείμματα, και οι αποθηκεύσεις Steam Cloud μένουν στον λογαριασμό σου.</string> + <string name="storage_open_steam">Άνοιγμα Steam</string> + <string name="storage_tools_detail">%1$s · %2$s αχρησιμοποίητα</string> + <string name="storage_remove_unused">Αφαίρεση αχρησιμοποίητων · %1$s</string> + <string name="storage_in_use">Σε χρήση</string> + <string name="storage_not_used">Αχρησιμοποίητο</string> + <string name="storage_remove">Αφαίρεση</string> + <string name="storage_remove_title">Αφαίρεση του %1$s;</string> + <string name="storage_remove_body">Ελευθερώνει %1$s. Το Steam θα το ξανακατεβάσει αν το χρειαστεί κάποιο παιχνίδι.</string> + <string name="storage_tool_fex_runtime">Απαραίτητο για παιχνίδια Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Απαραίτητο για Proton ARM64</string> + <string name="storage_tool_redist">Εγκαταστάσεις VC++ και DirectX που χρειάζονται τα παιχνίδια</string> + <string name="storage_tool_fex">Τρέχει παιχνίδια Linux x86</string> + <string name="storage_tool_steam">Εργαλείο Steam</string> + <string name="storage_tool_old_runtime">Το DroidDeck τρέχει παιχνίδια χωρίς αυτό το περιβάλλον</string> + <string name="storage_tool_x86_proton">Proton x86, που το DroidDeck δεν μπορεί να τρέξει</string> + <string name="storage_tool_custom_default">Προεπιλογή για όλα τα παιχνίδια</string> + <string name="storage_tool_custom_unused">Κανένα παιχνίδι δεν το χρησιμοποιεί</string> + <string name="storage_tool_custom_unknown">Οι ρυθμίσεις του Steam δεν διαβάζονται, οπότε διατηρείται</string> + <string name="storage_cleanup_busy">Περίμενε να τελειώσει ο καθαρισμός αποθήκευσης</string> + <string name="storage_low_title">Μόνο %1$s ελεύθερα</string> + <string name="storage_low_body">Το Steam χρειάζεται χώρο για ενημερώσεις και προσωρινή μνήμη shaders. Κάτω από 10 GB οι ενημερώσεις παιχνιδιών μπορεί να αποτύχουν στη μέση.</string> + <string name="storage_low_safe">Τα %1$s μπορούν να ελευθερωθούν με ασφάλεια.</string> + <string name="storage_free_up">Ελευθέρωσε χώρο</string> + <string name="storage_play_anyway">Παίξε παρόλα αυτά</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d εγκατεστημένο</item> + <item quantity="other">%d εγκατεστημένα</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d σε κάρτα SD</item> + <item quantity="other">%d σε κάρτα SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d εργαλείο</item> + <item quantity="other">%d εργαλεία</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Κενοί φάκελοι prefix και προσωρινή μνήμη shaders από %d παιχνίδι</item> + <item quantity="other">Κενοί φάκελοι prefix και προσωρινή μνήμη shaders από %d παιχνίδια</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Το prefix του %d παιχνιδιού περιέχει ακόμη αρχεία, μεταξύ τους τοπικές αποθηκεύσεις. Κράτα αντίγραφο πρώτα αν τα χρειάζεσαι.</item> + <item quantity="other">Τα prefix των %d παιχνιδιών περιέχουν ακόμη αρχεία, μεταξύ τους τοπικές αποθηκεύσεις. Κράτα αντίγραφο πρώτα αν τα χρειάζεσαι.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d παιχνίδι</item> + <item quantity="other">%d παιχνίδια</item> + </plurals> + <string name="storage_tool_default_proton">Προεπιλεγμένο Proton του DroidDeck</string> + <string name="storage_tool_proton">Επιλογή Proton 11 του DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Χρησιμοποιείται από %d παιχνίδι</item> + <item quantity="other">Χρησιμοποιείται από %d παιχνίδια</item> + </plurals> + <string name="storage_legend_components">Στοιχεία</string> + <string name="storage_components">Στοιχεία</string> + <string name="storage_item_components">Αχρησιμοποίητα στοιχεία</string> + <string name="storage_component_original">Αρχικό %1$s · %2$s</string> + <string name="storage_original_confirm">Ελευθερώνει %1$s. Επαναφέρει μόνο έκδοση Proton που δεν είναι πια εγκατεστημένη.</string> + <string name="storage_leftovers_unchecked">Χωρίς έλεγχο: το manifest μιας εφαρμογής Steam δεν διαβάζεται, οπότε τα prefix διαγραμμένων παιχνιδιών μένουν μέχρι να γίνει εφικτό.</string> + <string name="storage_failed">Απέτυχε: %1$s</string> + <string name="storage_desktop_shared">%1$s κοινά</string> + <string name="storage_data_installed">Εγκατεστημένα παιχνίδια</string> + <string name="storage_data_parts">Prefix %1$s · shaders %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Εκκαθάριση shaders</string> + <string name="storage_data_leftovers">Διαγραμμένα παιχνίδια</string> + <string name="storage_steam_app">Εφαρμογή Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Το prefix περιέχει ακόμη αρχεία, ίσως τοπικές αποθηκεύσεις</string> + <string name="storage_leftover_confirm">Καθαρίζει το prefix Wine και την προσωρινή μνήμη shaders (%1$s). Κράτα πρώτα αντίγραφο των αποθηκεύσεων που χρειάζεσαι· οι αποθηκεύσεις Steam Cloud μένουν στον λογαριασμό σου.</string> + <string name="storage_data_other">Διατηρούνται</string> + <string name="storage_data_other_title">Παιχνίδια εκτός Steam και κοινό prefix Steam</string> + <string name="storage_data_other_detail">Prefix παιχνιδιών που προστέθηκαν από καταστήματα ή χειροκίνητα</string> + <string name="storage_components_packages">Ληφθέντα πακέτα</string> + <string name="storage_components_originals">Διατηρημένα αρχικά</string> + <string name="storage_components_none">Δεν έχουν ληφθεί πακέτα στοιχείων.</string> + <string name="storage_component_in_use">Επιλεγμένο για Proton ή παιχνίδι</string> + <string name="storage_component_unused">Δεν έχει επιλεγεί πουθενά</string> + <string name="storage_original_kept">Επαναφέρει το εγκατεστημένο Proton</string> + <string name="storage_original_old">Έκδοση Proton που δεν είναι πια εγκατεστημένη</string> + <string name="storage_tag_in_use">Σε χρήση</string> + <string name="storage_components_note">Τα στοιχεία σε χρήση μένουν κλειδωμένα. Διάλεξέ τα στα Στοιχεία· ό,τι αφαιρέσεις εδώ μπορείς να το ξανακατεβάσεις εκεί.</string> + <string name="storage_component_confirm">Ελευθερώνει %1$s. Πακέτα που εισήγαγες μόνος σου δεν ξανακατεβαίνουν.</string> + <string name="storage_desktop_detail">%1$s για εφαρμογές Flatpak και ό,τι μοιράζονται</string> + <string name="storage_desktop_apps_title">Εφαρμογές</string> + <string name="storage_desktop_none">Δεν υπάρχουν εγκατεστημένες εφαρμογές Flatpak.</string> + <string name="storage_desktop_shared_title">Κοινά από τις εφαρμογές</string> + <string name="storage_desktop_runtimes">Περιβάλλοντα</string> + <string name="storage_desktop_runtimes_detail">Οι βιβλιοθήκες στις οποίες τρέχουν οι εφαρμογές· τα αχρησιμοποίητα φεύγουν με Αφαίρεση αχρησιμοποίητων</string> + <string name="storage_desktop_cache">Αποθήκευση λήψεων</string> + <string name="storage_desktop_cache_detail">Χώρος αντικειμένων και ληφθείσα προσωρινή μνήμη του Flatpak</string> + <string name="storage_desktop_prune">Αφαίρεση αχρησιμοποίητων</string> + <string name="storage_desktop_prune_body">Αφαιρεί περιβάλλοντα που δεν χρειάζεται καμία εγκατεστημένη εφαρμογή και καθαρίζει τον χώρο αντικειμένων του Flatpak. Οι εγκατεστημένες εφαρμογές συνεχίζουν να δουλεύουν.</string> + <string name="storage_flatpak_uninstall_body">Αφαιρεί την εφαρμογή (%1$s) και τα περιβάλλοντα που δεν χρησιμοποιεί κανείς άλλος. Τα δεδομένα στον προσωπικό σου φάκελο μένουν.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d πακέτο</item> + <item quantity="other">%d πακέτα</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d εφαρμογή</item> + <item quantity="other">%d εφαρμογές</item> + </plurals> + <string name="boot_movie">Βίντεο εκκίνησης</string> + <string name="boot_movie_video">Βίντεο</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">Τα 60 fps φαίνονται πιο ομαλά, αλλά επιβαρύνουν περισσότερο τον επεξεργαστή όσο ξεκινά το Steam. Ένα βίντεο εκκίνησης που επιλέχθηκε στις ρυθμίσεις του Steam έχει προτεραιότητα.</string> + <string name="boot_movie_sound">Ήχος</string> + <string name="boot_movie_custom">Δικό σας βίντεο</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV ή WebM. Άλλες μορφές και αρχεία πάνω από %1$d MB μετατρέπονται στη συσκευή σε WebM 720p, έως %2$d δευτερόλεπτα.</string> + <string name="boot_movie_import">Εισαγωγή</string> + <string name="boot_movie_remove">Αφαίρεση</string> + <string name="boot_movie_pick">Επιλέξτε βίντεο εκκίνησης</string> + <string name="boot_movie_imported">Το %1$s είναι πλέον το βίντεο εκκίνησης</string> + <string name="boot_movie_imported_silent">Το %1$s είναι πλέον το βίντεο εκκίνησης, χωρίς ήχο</string> + <string name="boot_movie_too_long">Τα βίντεο προς μετατροπή πρέπει να διαρκούν έως %1$d δευτερόλεπτα</string> + <string name="boot_movie_converting">Μετατροπή %1$d%%</string> + <string name="boot_movie_converting_started">Μετατροπή του %1$s για το Steam. Αφήστε το DroidDeck ανοιχτό.</string> + <string name="boot_movie_unsupported">Η συσκευή δεν μπορεί να αποκωδικοποιήσει αυτό το βίντεο.</string> + <string name="boot_movie_import_failed">Δεν ήταν δυνατή η εισαγωγή του βίντεο</string> + <string name="glasses_experimental">Κάμερες Luma Ultra — Πειραματικό</string> + <string name="glasses_joycons">Παρακολούθηση θέσης Joy-Con</string> + <string name="glasses_joycons_hint">Χρησιμοποιήστε τις κάμερες των έξυπνων γυαλιών για να τοποθετήσετε τα συνδεδεμένα χειριστήρια Joy-Con. Η περιστροφή και οι εντολές κουμπιών προέρχονται από τα χειριστήρια Joy-Con. Η θέση εκτιμάται όταν οι καρποί σας είναι κρυμμένοι. Αντικαθιστά τα χειριστήρια που λειτουργούν με γυμνά χέρια και διακόπτει την παρακολούθηση της κάμερας του τηλεφώνου. Στρέψτε τα χειριστήρια Joy-Con προς τα εμπρός κατά τη σύνδεση ή την επαναφορά του κέντρου παρακολούθησης.</string> + <string name="glasses_joycons_requires_position">Ενεργοποιήστε πρώτα την παρακολούθηση θέσης. Απαιτούνται χειριστήρια Joy-Con με δυνατότητα κίνησης σε Android 12 ή νεότερη έκδοση. Απενεργοποιημένα από προεπιλογή.</string> + <string name="setup_tab_glasses">Έξυπνα γυαλιά</string> + <string name="setup_glasses_scope">Οι ρυθμίσεις οθόνης και παρακολούθησης κεφαλιού είναι κοινές σε όλα τα μενού, τα παιχνίδια και τις συνεδρίες επιφάνειας εργασίας του DroidDeck.</string> + <string name="setup_glasses_connect">Συνδέστε τα έξυπνα γυαλιά για να αλλάξετε τις ρυθμίσεις οθόνης και παρακολούθησης. Οι αποθηκευμένες ρυθμίσεις σας διατηρούνται όταν αποσυνδεθείτε.</string> + <string name="glasses_vr">VR (Εικονική πραγματικότητα)</string> + <string name="glasses_display_mode">Λειτουργία οθόνης</string> + <string name="glasses_output_2d">Έξοδος 2D</string> + <string name="glasses_output_3d">Έξοδος 3D</string> + <string name="glasses_picture_group">Εικόνα και εικονική οθόνη</string> + <string name="glasses_position_group">Θέση και επίπεδο δαπέδου</string> + <string name="glasses_hands_group">Παρακολούθηση χεριών — Πειραματικό</string> + <string name="glasses_tracking_status">Κατάσταση παρακολούθησης</string> + <string name="glasses_resolution_2d">Ανάλυση 2D</string> + <string name="glasses_resolution_3d">Ανάλυση 3D</string> + <string name="glasses_resolution_vr">Ανάλυση VR</string> + <string name="glasses_resolution_auto">Αυτόματη</string> + <string name="glasses_resolution_inherit">Ίδιο με 2D / 3D</string> + <string name="glasses_resolution_hint">Ανάλυση εξόδου ανά μάτι.</string> + <string name="glasses_refresh_30_hint">Ενεργοποιήστε το Παιχνίδι σε έξυπνα γυαλιά για να επιλέξετε την εγγενή λειτουργία 30 Hz της οθόνης.</string> + <string name="glasses_3dof">Εικονική οθόνη 3DoF</string> + <string name="glasses_3dof_hint">Αγκυρώστε τα επίπεδα παιχνίδια μπροστά σας, ώστε να μπορείτε να κοιτάτε τριγύρω. Ενεργοποιεί το Παιχνίδι σε έξυπνα γυαλιά χωρίς να μεταβείτε σε 3D.</string> + <string name="glasses_screen_app_wide">Το πλάτος και η απόσταση ενημερώνουν αμέσως την εικονική οθόνη που παρακολουθείται για τα μενού, τα παιχνίδια και τις συνεδρίες επιφάνειας εργασίας του DroidDeck.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Η παρακολούθηση θέσης περιλαμβάνει την περιστροφή του κεφαλιού στο SteamVR. Για παρακολούθηση μόνο με περιστροφή, απενεργοποιήστε την παρακολούθηση θέσης.</string> + <string name="glasses_head_tracking_spatial_hint">Ελέγχει την κίνηση του κεφαλιού στην εικονική οθόνη. Η παρακολούθηση θέσης περιλαμβάνει την περιστροφή του κεφαλιού στο SteamVR.</string> + <string name="glasses_quick_actions">Γρήγορες ενέργειες</string> + <string name="glasses_recenter_screen_hint">Κοιτάξτε πού θέλετε την οθόνη και, στη συνέχεια, επαναφέρετε το κέντρο παρακολούθησης για να ορίσετε το ύψος και την κατεύθυνσή της.</string> + <string name="glasses_recenter_joycons_button">Επανακεντράρισμα Joy-Con</string> + <string name="phone_camera_tracking_group">Κάμερα τηλεφώνου — Πειραματικό</string> + <string name="phone_camera_tracking_setting">Παρακολούθηση χεριών ή χειριστηρίων Joy-Con</string> + <string name="glasses_6dof">Εικονική οθόνη 6DoF</string> + <string name="glasses_position">Παρακολούθηση θέσης — πειραματική</string> + <string name="glasses_position_hint">Φυσική κίνηση σε εικονική πραγματικότητα και γύρω από εικονικές οθόνες. Η επανεκκίνηση της παρακολούθησης διαρκεί λίγο χρόνο.</string> + <string name="glasses_eye_height">Τρέχον ύψος ματιών πάνω από το πάτωμα</string> + <string name="glasses_floor">Ορισμός επιπέδου δαπέδου από το τρέχον ύψος</string> + <string name="glasses_floor_set">Ορισμός επιπέδου δαπέδου</string> + <string name="glasses_spatial_setup">Ρύθμιση και διαγνωστικά στερεοσκοπικής κάμερας</string> + <string name="glasses_spatial_setup_hint">Ελέγξτε τη βαθμονόμηση της κάμερας και την παρακολούθηση των χεριών πριν από το παιχνίδι.</string> + <string name="glasses_spatial_open">Άνοιγμα ρύθμισης</string> + <string name="glasses_hands">Χειριστήρια που λειτουργούν με γυμνά χέρια</string> + <string name="glasses_hands_hint">Χρησιμοποιήστε τις κάμερες έξυπνων γυαλιών για να στοχεύσετε με τα χέρια σας, πιέστε για να κάνετε κλικ και κλείστε το χέρι σας για να το πιάσετε σε εικονική πραγματικότητα. Τα sticks του Gamepad κινούνται και περιστρέφονται. Αντικαθιστά την παρακολούθηση θέσης Joy-Con. Ενδέχεται να καθυστερήσει ή να χάσει την παρακολούθηση κατά τη διάρκεια των παιχνιδιών.</string> + <string name="glasses_hands_ready_hint">Ενεργοποιήστε τα χειριστήρια που λειτουργούν με γυμνά χέρια κάτω από τις κάμερες Luma Ultra στην Παρακολούθηση. Εμφανίστε πρώτα τα ανοιχτά χέρια.</string> + <string name="glasses_hands_base">Κοινόχρηστη βαθμονόμηση Luma Ultra</string> + <string name="glasses_hands_base_hint">Χρήση της κοινόχρηστης βάσης Luma Ultra. Βαθμονομήστε τα δικά σας έξυπνα γυαλιά για να επαληθεύσετε την ακρίβειά τους.</string> + <string name="glasses_hands_calibration_verified">Επαληθεύτηκε η μετρούμενη βαθμονόμηση</string> + <string name="glasses_hands_calibration_required">Απαιτείται επικύρωση</string> + <string name="glasses_hands_calibration_required_hint">Τα χειριστήρια που λειτουργούν με γυμνά χέρια γίνονται διαθέσιμα μετά την ολοκλήρωση του ελέγχου της μετρούμενης απόστασης.</string> + <string name="tracking_recovery_lost">Χάθηκε η παρακολούθηση</string> + <string name="tracking_recovery_look">Κοιτάξτε αργά τριγύρω σε ένα καλά φωτισμένο δωμάτιο.\nΔιατηρήστε τις κάμερες παρακολούθησης καθαρές και στραμμένες προς τα έπιπλα ή άλλες ορατές λεπτομέρειες.</string> + <string name="tracking_recovery_restart_help">Ακόμα κολλημένοι; Στο τηλέφωνό σας: έξυπνα γυαλιά → Παρακολούθηση → Άνοιγμα ρύθμισης → Εμφάνιση διαγνωστικών → Επανεκκίνηση παρακολούθησης.</string> + <string name="tracking_recovery_disconnected">Τα έξυπνα γυαλιά αποσυνδέθηκαν</string> + <string name="tracking_recovery_connect">Ελέγξτε τη σύνδεση USB και επανασυνδέστε τα έξυπνα γυαλιά.\nΑποδεχτείτε το μήνυμα προτροπής πρόσβασης USB στο τηλέφωνό σας, εάν εμφανιστεί.</string> + <string name="tracking_recovery_usb_help">Μόλις συνδεθείτε, κοιτάξτε γύρω σας αργά σε ένα καλά φωτισμένο δωμάτιο για να επαναφέρετε την παρακολούθηση.</string> + <string name="tracking_recovery_recenter">Απαιτείται επανακεντράρισμα</string> + <string name="tracking_recovery_recenter_steps">Η παρακολούθηση επέστρεψε σε νέα θέση.\nΚοιτάξτε προς τα εμπρός και, στη συνέχεια, πατήστε επαναφορά κέντρου παρακολούθησης στο τηλέφωνό σας.</string> + <string name="tracking_recovery_recenter_help">Μπορείτε επίσης να βρείτε την επαναφορά του κέντρου παρακολούθησης στα έξυπνα γυαλιά → Παρακολούθηση → Άνοιγμα ρυθμίσεων. Η αποθηκευμένη βαθμονόμηση της κάμερας διατηρείται.</string> + <string name="tracking_recovery_stabilizing">Μείνετε ακίνητοι για μια στιγμή</string> + <string name="tracking_recovery_hold">Η επαναφορά του κέντρου παρακολούθησης βρίσκεται σε εξέλιξη.\nΔιατηρήστε τα έξυπνα γυαλιά σταθερά ενώ η παρακολούθηση σταθεροποιείται.</string> + <string name="tracking_recovery_automatic">Αυτή η οθόνη κλείνει αυτόματα όταν είναι έτοιμη η παρακολούθηση κεφαλής.</string> + <string name="glasses_steady_hand_aim">Σταθεροποιημένη σκόπευση με τα χέρια</string> + <string name="glasses_steady_hand_aim_hint">Στόχευσε από τον ώμο μέσα από την παλάμη σου. Απενεργοποιήστε για περιστροφή ελεγχόμενη από τον καρπό.</string> + <string name="spatial_title">Χωρική ρύθμιση</string> + <string name="spatial_wait_tracking">Αναμονή για παρακολούθηση…</string> + <string name="spatial_cameras_description">Αριστερή και δεξιά κάμερες παρακολούθησης</string> + <string name="spatial_camera_sync">Συγχρονισμός κάμερας</string> + <string name="spatial_ready">Έτοιμο</string> + <string name="spatial_sync_hint">Αναμονή για την ευθυγράμμιση της κάμερας και της παρακολούθησης κεφαλιού. Διατηρήστε τα έξυπνα γυαλιά συνδεδεμένα.</string> + <string name="spatial_prepare">1. Προετοιμάστε τον στόχο βαθμονόμησης</string> + <string name="spatial_print_actual">Εκτύπωση σε πραγματικό μέγεθος</string> + <string name="spatial_print_hint">Κάθε πλευρά του τετραγώνου πρέπει να έχει μήκος 30 mm (1.181 in). Στερεώστε το φύλλο επίπεδα σε μια άκαμπτη επιφάνεια σε καλά φωτισμένο χώρο.</string> + <string name="spatial_print">Εκτύπωση στόχου βαθμονόμησης</string> + <string name="spatial_capture_group">2. Καταγράψτε διαφορετικές προβολές</string> + <string name="spatial_board_stationary">Διατηρήστε σταθερό τον στόχο βαθμονόμησης</string> + <string name="spatial_capture_hint">Μετακινήστε τα έξυπνα γυαλιά πιο κοντά, πιο μακριά και στο πλάι. Γυρίστε τα αριστερά/δεξιά, γωνίστε τα πάνω/κάτω και γείρετε τα προς τα πλάγια. Διατηρήστε τον στόχο βαθμονόμησης και στις δύο κάμερες και κάντε μια σύντομη παύση πριν από κάθε λήψη.</string> + <string name="spatial_start">Έναρξη νέας βαθμονόμησης</string> + <string name="spatial_wait_sync">Αναμονή για συγχρονισμό κάμερας.</string> + <string name="spatial_start_hint">Ξεκινήστε μια νέα βαθμονόμηση για τη συλλογή προβολών.</string> + <string name="spatial_views_hint">Διατηρήστε τον στόχο βαθμονόμησης ορατός και στις δύο προεπισκοπήσεις. Καταγράψτε τουλάχιστον 24 ευκρινείς προβολές από διαφορετικές γωνίες.</string> + <string name="spatial_capturing">Λήψη…</string> + <string name="spatial_capture">Λήψη προβολής στόχου βαθμονόμησης</string> + <string name="spatial_alignment">Υπολογισμός ευθυγράμμισης κάμερας</string> + <string name="spatial_calculating">Υπολογισμός…</string> + <string name="spatial_calculate">Υπολογισμός βαθμονόμησης</string> + <string name="spatial_distance_group">3. Ελέγξτε την απόσταση</string> + <string name="spatial_distance">Μετρημένη απόσταση</string> + <string name="spatial_distance_hint">Ξεκινήστε με 12 ίντσες ή 30 cm, ώστε οι εκτυπωμένοι δείκτες να είναι ευκολότερος να ανιχνευθούν. Επιλέξτε την ακριβή μέτρηση που θα χρησιμοποιήσετε.</string> + <string name="spatial_camera_board_distance">Αριστερή κάμερα στο κέντρο στόχου βαθμονόμησης</string> + <string name="spatial_checking_distance">Έλεγχος απόστασης…</string> + <string name="spatial_validate">Επικύρωση απόστασης</string> + <string name="spatial_diagnostics">Διαγνωστικά</string> + <string name="spatial_show_diagnostics">Εμφάνιση διαγνωστικών</string> + <string name="spatial_diagnostics_hint">Εργαλεία ανάκτησης χρονισμού και παρακολούθησης κάμερας.</string> + <string name="spatial_camera_timing">Χρονισμός κάμερας</string> + <string name="spatial_hand_input">Είσοδος από παρακολούθηση χεριών</string> + <string name="spatial_wait_timing">Αναμονή για τον χρονισμό της κάμερας.</string> + <string name="spatial_frames">Εικόνες κάμερας</string> + <string name="spatial_gpu">Ανίχνευση χεριών με GPU</string> + <string name="spatial_gpu_hint">Η CPU είναι η προεπιλογή. Η GPU είναι πειραματική και μπορεί να προκαλέσει επανεκκίνηση του SteamVR. Αυτή η επιλογή επαναφέρεται κατά την επανεκκίνηση της παρακολούθησης.</string> + <string name="spatial_lite">Lite ανίχνευση μοντέλων χεριών</string> + <string name="spatial_lite_hint">Χρησιμοποιήστε τον ανιχνευτή παλάμης Lite και τα βασικά σημεία Lite στα χέρια. Ελέγξτε την ακρίβεια στόχευσης, τσιμπήστε και πιάστε. Επαναφέρεται κατά την επανεκκίνηση της παρακολούθησης.</string> + <string name="spatial_adaptive">Αυτόματη συχνότητα εισόδου για παρακολούθηση των χεριών</string> + <string name="spatial_adaptive_hint">Προσαρμόστε την είσοδο στην ταχύτητα επεξεργασίας. Επαναφέρεται κατά την επανεκκίνηση της παρακολούθησης.</string> + <string name="spatial_half_rate">Περιορίστε τη συχνότητα εισόδου για την παρακολούθηση των χεριών</string> + <string name="spatial_half_rate_hint">Χρησιμοποιήστε τις μισές εικόνες της κάμερας. Απενεργοποιήστε για να συγκρίνετε τη μέγιστη συχνότητα. Επαναφέρεται κατά την επανεκκίνηση της παρακολούθησης.</string> + <string name="spatial_diagnostic_capture">Διαγνωστική σύλληψη</string> + <string name="spatial_diagnostic_capture_hint">Αποθηκεύστε ένα ζεύγος στερεοφωνικής εικόνας τοπικά. Οι εικόνες αποθηκεύονται μόνο όταν ζητηθούν.</string> + <string name="spatial_save_frame">Αποθήκευση εικόνας κάμερας</string> + <string name="spatial_restart_tracking">Επανεκκινήστε την παρακολούθηση</string> + <string name="spatial_restart_hint">Χρησιμοποιήστε το εάν η παρακολούθηση δεν επανέρχεται σε καλά φωτισμένη περιοχή. Η επανεκκίνηση απαιτεί νέα προέλευση παρακολούθησης.</string> + <string name="spatial_restart">Επανεκκίνηση</string> + <string name="spatial_restart_title">Επανεκκίνηση της παρακολούθησης;</string> + <string name="spatial_restart_confirm">Οι μη αποθηκευμένες προβολές βαθμονόμησης θα χαθούν. Κρατήστε τα έξυπνα γυαλιά ακίνητα αργότερα και επαναφέρετε το κέντρο παρακολούθησης όταν αποκατασταθεί η παρακολούθηση.</string> + <string name="spatial_views_count">%1$d / 24 προβολές καταγράφηκαν</string> + <string name="spatial_capture_paused">Λήψη σε παύση: %1$s</string> + <string name="spatial_measure_hint">Μέτρο %1$s. Εμφάνιση του πλήρους στόχου βαθμονόμησης και στις δύο προεπισκοπήσεις και, στη συνέχεια, κρατήστε ακίνητο.</string> + <string name="spatial_timing_values">%1$.1f Hz • ηλικία εικόνας %2$.1f ms • επεξεργασία %3$.1f ms</string> + <string name="spatial_input_values">Όριο εισόδου %1$.1f Hz • %2$.0f%% εικόνων κάμερας. Η παρακολούθηση της κεφαλής συνεχίζεται στη μέγιστη συχνότητά της.</string> + <string name="spatial_frame_counts">%1$d υποβλήθηκε σε επεξεργασία • %2$d απορρίφθηκε • %3$d παραβλέφθηκε από το όριο εισαγωγής</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">Βαθμονόμηση DroidDeck - Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Εκτύπωση σε 100% / Πραγματικό μέγεθος. Κάθε τετράγωνο: 30 mm (1.181 in).</string> + <string name="spatial_print_stationary">Διατηρήστε το στόχο βαθμονόμησης επίπεδο και ακίνητο. μετακινήστε τα έξυπνα γυαλιά ανάμεσα στις λήψεις.</string> + <string name="spatial_print_check">Έλεγχος κλίμακας: 100 mm (3.937 ίντσες) μεταξύ των κροτώνων</string> + <string name="spatial_distance_12in">12 ίντσες (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 ίντσες)</string> + <string name="spatial_distance_20in">20 ίντσες (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 ίντσες)</string> + <string name="spatial_disabled">Απενεργοποιημένο</string> + <string name="spatial_wait_stable">Αναμονή για σταθερή παρακολούθηση</string> + <string name="spatial_disconnected">Αποσυνδέθηκε</string> + <string name="spatial_hands_off">Οι ελεγκτές που λειτουργούν με γυμνά χέρια είναι απενεργοποιημένοι</string> + <string name="spatial_tracking_off">Η παρακολούθηση θέσης είναι απενεργοποιημένη ή τα έξυπνα γυαλιά έχουν αποσυνδεθεί</string> + <string name="spatial_recenter_pending">Ζητήθηκε επαναφορά του κέντρου παρακολούθησης — μείνετε ακίνητοι ενώ η παρακολούθηση σταθεροποιείται</string> + <string name="spatial_tracking_lost">Παρακολούθηση χαμένη — αντιμετωπίστε μια καλά φωτισμένη περιοχή με ορατές λεπτομέρειες</string> + <string name="spatial_origin_changed">Άλλαξε η προέλευση παρακολούθησης — πατήστε επαναφορά του κέντρου παρακολούθησης και, στη συνέχεια, κρατήστε ακίνητοι</string> + <string name="spatial_active">6DoF ενεργό</string> + <string name="spatial_connect_hint">Συνδέστε το Luma Ultra και ενεργοποιήστε την παρακολούθηση θέσης.</string> + <string name="spatial_validation_session">Η βαθμονόμηση επαληθεύτηκε για αυτήν τη σύνδεση.</string> + <string name="spatial_validation_saved">Η βαθμονόμηση επαληθεύτηκε και αποθηκεύτηκε.</string> + <string name="spatial_wait_cameras">Αναμονή για στερεοφωνικές κάμερες</string> + <string name="spatial_wait_hands">Αναμονή για παρακολούθηση των χεριών</string> + <string name="spatial_collect_instructions">Διατηρήστε σταθερό τον στόχο βαθμονόμησης 5 × 7. Καταγράψτε 24+ προβολές ενώ μετακινείτε και περιστρέφετε τα έξυπνα γυαλιά.</string> + <string name="spatial_capture_pending">Αναμονή για την επόμενη εικόνα κάμερας. Κρατήστε τα έξυπνα γυαλιά ακίνητα.</string> + <string name="spatial_validation_pending">Έλεγχος της επόμενης εικόνας κάμερας. Διατηρήστε ορατό τον πλήρη στόχο βαθμονόμησης και κρατήστε ακίνητο.</string> + <string name="spatial_start_first">Ξεκινήστε πρώτα τη βαθμονόμηση</string> + <string name="spatial_no_camera_frame">Δεν έφτασε καμία νέα εικόνα κάμερας. Ελέγξτε τη σύνδεση των έξυπνων γυαλιών και τις προεπισκοπήσεις της κάμερας και, στη συνέχεια, δοκιμάστε ξανά.</string> + <string name="spatial_clock_reset">Επαναφορά ρολογιού κάμερας</string> + <string name="spatial_frame_changed">Το σύστημα συντεταγμένων παρακολούθησης άλλαξε. Οι προβολές σας αποθηκεύονται για επανυπολογισμό. Επαναφέρετε το κέντρο παρακολούθησης και, στη συνέχεια, ξεκινήστε ένα νέο σύνολο για να καταγράψετε περισσότερες προβολές.</string> + <string name="spatial_device_loaded">φορτώθηκε η βαθμονόμηση της συσκευής</string> + <string name="spatial_base_loaded">Φορτώθηκε η βαθμονόμηση βάσης Luma Ultra</string> + <string name="spatial_calibration_needed">απαιτείται βαθμονόμηση</string> + <string name="spatial_tap_start">Πατήστε Πρώτα Έναρξη νέας βαθμονόμησης.</string> + <string name="spatial_capture_recenter_pending">Η επαναφορά του κέντρου παρακολούθησης αναμένει σταθερή παρακολούθηση. Κρατήστε ακίνητοι για μια στιγμή.</string> + <string name="spatial_capture_recenter">Η παρακολούθηση άλλαξε. Πατήστε επαναφορά του κέντρου παρακολούθησης μία φορά και, στη συνέχεια, κρατήστε ακίνητοι πριν από τη λήψη.</string> + <string name="spatial_capture_unsynchronized">Η λήψη απορρίφθηκε: η παρακολούθηση κεφαλής δεν ήταν συγχρονισμένη ή άλλαξε κατά τη λήψη. Μείνετε ακίνητοι και δοκιμάστε ξανά.</string> + <string name="spatial_align_first">Υπολογίστε την ευθυγράμμιση της κάμερας πριν ελέγξετε την απόσταση.</string> + <string name="spatial_processing_failed">Η επεξεργασία της κάμερας απέτυχε</string> + <string name="spatial_hand_head_changed">Η παρακολούθηση κεφαλιού άλλαξε κατά την ανίχνευση των χεριών</string> + <string name="spatial_hand_wait_sync">Αναμονή για συγχρονισμό κάμερας και κεφαλής</string> + <string name="spatial_no_wrists">Δεν εντοπίστηκαν καρποί. Κρατήστε τις λαβές του ελεγκτή Joy-Con μπροστά από τα έξυπνα γυαλιά</string> + <string name="spatial_no_hands">Δεν εντοπίστηκαν χέρια. Δείξτε ανοιχτές παλάμες μπροστά από τα έξυπνα γυαλιά</string> + <string name="spatial_one_camera_wrists">Καρποί ορατοί μόνο σε μία κάμερα. κρατήστε τις λαβές του ελεγκτή σας στην κοινόχρηστη προβολή</string> + <string name="spatial_one_camera_hands">Τα χέρια ορατά μόνο σε μία κάμερα. κρατήστε και τις δύο παλάμες στην κοινή θέα</string> + <string name="spatial_ambiguous_hands">Και οι δύο κάμερες βλέπουν τα χέρια, αλλά η αντιστοίχιση αριστερά/δεξιά είναι διφορούμενη</string> + <string name="spatial_inconsistent_depth">Εντοπίστηκαν χέρια, αλλά το στερεοφωνικό βάθος είναι ασυνεπές</string> + <string name="spatial_rejected_wrist">Η θέση του καρπού απορρίπτεται με στερεοφωνικό έλεγχο ή έλεγχο κίνησης</string> + <string name="spatial_inconsistent_palm">Εντοπίστηκαν στερεοφωνικά σημεία, αλλά η γεωμετρία της παλάμης είναι ασυνεπής</string> + <string name="spatial_hands_need_calibration">Ολοκληρώστε τη βαθμονόμηση και τον έλεγχο απόστασης για να ενεργοποιήσετε τα χέρια</string> + <string name="spatial_hands_wait_stable">Αναμονή για σταθερή παρακολούθηση κεφαλής. Επαναφέρετε το κέντρο παρακολούθησης εάν ζητηθεί</string> + <string name="spatial_old_frame">Η παρατήρηση με κάμερα είναι πολύ παλιά. περιμένοντας ένα φρέσκο ζευγάρι</string> + <string name="spatial_fit_ready">Προσαρμογή %1$.2f px. Μετρήστε την επιλεγμένη απόσταση από την αριστερή κάμερα μέχρι το κέντρο στόχου βαθμονόμησης και, στη συνέχεια, επικυρώστε.</string> + <string name="spatial_opencv_error">Το OpenCV δεν είναι διαθέσιμο: %1$s</string> + <string name="spatial_restored">Αποκαταστάθηκαν οι αποθηκευμένες προβολές %1$d. Υπολογίστε τη βαθμονόμηση για να προσπαθήσετε ξανά ή ξεκινήστε ένα νέο σύνολο για να καταγράψετε περισσότερα.</string> + <string name="spatial_captured">Λήψη %1$d / 24 προβολές. Διατηρήστε σταθερό τον στόχο βαθμονόμησης. μετακινήστε τα έξυπνα γυαλιά για την επόμενη προβολή.</string> + <string name="spatial_capture_corners">Η λήψη απορρίφθηκε: %1$d / 12 απαιτούμενες γωνίες ορατές και στις δύο κάμερες. Εμφάνιση μεγαλύτερου μέρους του στόχου βαθμονόμησης, κρατήστε ακίνητο και μετά δοκιμάστε ξανά.</string> + <string name="spatial_validation_error">Ο έλεγχος απόστασης δεν μπόρεσε να ολοκληρωθεί: %1$s. Προσπαθήστε ξανά.</string> + <string name="spatial_inference_error">Μη διαθέσιμος εντοπισμός χεριών: %1$s. Αλλάξτε την CPU/GPU ή αλλάξτε τους ελεγκτές που λειτουργούν με γυμνά χέρια για να προσπαθήσετε ξανά.</string> + <string name="spatial_hand_timeout">Η ανίχνευση χεριών υπερέβη τα %1$d ms. η παρατήρηση απορρίφθηκε</string> + <string name="spatial_wrists_tracked">%1$d / 2 θέσεις καρπού Joy-Con μετρημένες με στερεοφωνικό</string> + <string name="spatial_palms_tracked">Παρακολουθούμενες παλάμες: %1$d / 2· ετοιμότητα τσιμπήματος: %2$d· ετοιμότητα λαβής: %3$d</string> + <string name="spatial_capture_saved">Αποθηκεύτηκε η διαγνωστική λήψη στο %1$s</string> + <string name="spatial_hand_error">Η παρακολούθηση των χεριών σταμάτησε: %1$s</string> + <string name="spatial_stereo_loaded">Στερεοφωνικό %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Η παρακολούθηση κεφαλής και ο στόχος βαθμονόμησης διαφωνούν κατά %1$s (όριο 5 cm / 2 in). Διατηρήστε σταθερό τον στόχο βαθμονόμησης και περιμένετε για σταθερή παρακολούθηση πριν ξεκινήσετε ένα νέο σετ. Γυρίστε και γείρετε τα έξυπνα γυαλιά απαλά. παύση πριν από κάθε λήψη.</string> + <string name="spatial_need_views">Καταγράψτε τουλάχιστον 24 διαφορετικές όψεις του σταθερού στόχου βαθμονόμησης.</string> + <string name="spatial_need_rotation">Γυρίστε τα έξυπνα γυαλιά αριστερά και δεξιά και γείρετε τα πάνω-κάτω. Η κίνηση χωρίς περιστροφή δεν μπορεί να βαθμονομήσει την ευθυγράμμιση της κάμερας.</string> + <string name="spatial_bad_baseline">Απίστευτη γραμμή βάσης κάμερας</string> + <string name="spatial_need_orientations">Μετακινήστε το κεφάλι σας σε πιο ποικίλους προσανατολισμούς.</string> + <string name="spatial_bad_rotation">Μη έγκυρη περιστροφή κάμερας με κεφαλή</string> + <string name="spatial_bad_alignment">Η ευθυγράμμιση κάμερας με κεφαλή είναι ασυνεπής.</string> + <string name="spatial_calibration_error">Η βαθμονόμηση δεν μπόρεσε να ολοκληρωθεί. %1$s Οι προβολές που έχετε καταγράψει αποθηκεύονται.</string> + <string name="spatial_reprojection_error">Το παρατεταμένο σφάλμα επαναπροβολής %1$.2f px υπερβαίνει τα 2 px. Επαναβαθμονόμηση.</string> + <string name="spatial_distance_corners">Εντοπίστηκαν %1$d / 24 γωνίες σκακιέρας και στις δύο κάμερες. Κρατήστε ολόκληρο τον στόχο βαθμονόμησης ορατό και παραμείνετε ακίνητοι. Εάν είναι ήδη ορατός, επιλέξτε 12 in ή 30 cm και μετρήστε αυτήν τη μικρότερη απόσταση πριν προσπαθήσετε ξανά.</string> + <string name="spatial_distance_depth">Ο στόχος βαθμονόμησης είναι ορατός, αλλά το βάθος του δεν μπορούσε να μετρηθεί αξιόπιστα. Κρατήστε τα έξυπνα γυαλιά ακίνητα και διατηρήστε το στόχο βαθμονόμησης επίπεδο και καλά φωτισμένο και, στη συνέχεια, δοκιμάστε ξανά.</string> + <string name="spatial_distance_invalid">Η μέτρηση της κάμερας δεν ήταν έγκυρη. Μείνετε ακίνητοι και δοκιμάστε ξανά.</string> + <string name="spatial_distance_passed">Ο έλεγχος εξ αποστάσεως πέρασε.</string> + <string name="spatial_distance_retry">Ελέγξτε ξανά την απόσταση από την αριστερή κάμερα μέχρι το κέντρο στόχου βαθμονόμησης και, στη συνέχεια, δοκιμάστε ξανά.</string> + <string name="spatial_distance_result">Κάμερες μέτρησης %1$s. επιλεγμένη απόσταση %2$s. %3$s</string> + <string name="spatial_wait_previews">Περιμένετε και για τις δύο προεπισκοπήσεις κάμερας πριν ξεκινήσετε τη βαθμονόμηση.</string> + <string name="spatial_saved_views_hint">Οι αποθηκευμένες προβολές μπορούν να υπολογιστούν εκ νέου. Ξεκινήστε μια νέα βαθμονόμηση για αποτύπωση στο τρέχον σύστημα συντεταγμένων παρακολούθησης.</string> + <string name="spatial_model_checksum_error">Αναντιστοιχία αθροίσματος ελέγχου μοντέλου χεριού</string> + <string name="spatial_opencv_load_error">Δεν ήταν δυνατή η φόρτωση του OpenCV</string> +</resources> diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index d22ccfba55..f576e95823 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="steamvr_recovery_title">Los gráficos de SteamVR se detuvieron</string> + <string name="steamvr_recovery_countdown">DroidDeck se reiniciará en %1$d segundos para restablecer los gráficos y volver a abrir SteamVR. Tu juego en curso se cerrará; el progreso no guardado no se podrá recuperar.</string> + <string name="steamvr_recovery_repeated">El fallo gráfico volvió tras un reinicio reciente. La recuperación automática está en pausa para evitar un bucle. Reiniciar cerrará tu juego; el progreso no guardado no se podrá recuperar.</string> + <string name="steamvr_recovery_restart">Reiniciar ahora</string> + <string name="steamvr_recovery_cancel">Mantener abierto</string> + <string name="steamvr_recovery_restarting">Restableciendo los gráficos y volviendo a abrir SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck no pudo reiniciarse automáticamente. Cierra la app por completo y vuelve a abrirla.</string> <string name="app_name">DroidDeck</string> <string-array name="loading_hints"> <item>La primera vez se descarga Steam. Puede tardar unos minutos.</item> @@ -15,8 +22,10 @@ <string name="session_channel">Sesión</string> <string name="session_channel_description">Se muestra mientras hay una sesión de Steam o de escritorio abierta</string> <string name="session_notification">Steam se está ejecutando</string> + <string name="session_notification_downloads">Descarga de Steam en curso</string> <string name="session_notification_paused">Sesión en pausa - toca Reanudar cuando quieras</string> <string name="resume_session">Reanudar</string> + <string name="suspend_now">Suspender ahora</string> <string name="stop_session">Detener sesión</string> <string name="frame_gen_title">Generación de fotogramas</string> <string name="frame_gen_hint">Elige el modo de generación de fotogramas</string> @@ -56,7 +65,7 @@ <string name="game_env_save">Guardar</string> <string name="game_env_remove">Quitar</string> <string name="game_env_restore">Heredar de nuevo</string> - <string name="game_env_reset">Restablecer este perfil</string> + <string name="game_env_reset">Borrar los ajustes propios del entorno</string> <string name="game_env_unset">Quitar valor en este perfil</string> <string name="game_env_empty">Sin variables definidas.</string> <string name="game_env_inherited">Heredada</string> @@ -182,6 +191,8 @@ <string name="add_app_flatpak_id">ID de app</string> <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> <string name="add_app_flatpak_invalid">No es un ID de app de Flathub</string> + <string name="add_app_flatpak_bundle_hint">O un archivo .flatpak, para una app que no esté en Flathub.</string> + <string name="add_app_pick_flatpak">Elige un archivo .flatpak</string> <string name="add_app_source">Origen</string> <string name="add_app_appearance">En tu Escritorio</string> <string name="add_app_preview_name">Nueva app</string> @@ -251,6 +262,10 @@ <string name="mode_osc">Controles en pantalla</string> <string name="mode_osc_qam">Steam + QAM</string> <string name="mode_osc_note">Auto muestra los controles cuando no hay ningún mando conectado.</string> + <string name="osc_steam_touch">Táctil de Steam (beta)</string> + <string name="osc_style_next_session">Los controles táctiles de Steam se activan en la próxima sesión de Steam</string> + <string name="osc_steam_layout">Disposición táctil de Steam</string> + <string name="osc_steam_layout_hint">Mueve, cambia de tamaño u oculta los controles táctiles de este juego; se guarda en Steam</string> <string name="mode_controller">Mando</string> <string name="mode_controller_hint">Cómo ve Steam tu mando. Se aplica en la próxima sesión.</string> <string name="mode_controller_deck">Mando de Steam Deck</string> @@ -258,7 +273,7 @@ <string name="mode_controller_ds4">DualShock 4</string> <string name="mode_controller_dualsense">DualSense</string> <string name="mode_controller_x360">Mando Xbox 360</string> - <string name="mode_controller_note">Deck: botón de Quick Access y giroscopio. Xbox 360: abre Quick Access con Guide+A.</string> + <string name="mode_controller_note">Deck: botón de Quick Access y giroscopio. Steam Controller: lo mismo, con detección de agarre en los botones traseros. DualShock 4 y DualSense: giroscopio, y los trackpads como su panel táctil. Xbox 360: abre Quick Access con Guide+A.</string> <string name="mode_back">Atrás</string> <string name="back_menu_then_qam">Menú → QAM</string> <string name="back_qam_then_menu">QAM → Menú</string> @@ -268,6 +283,8 @@ <string name="mode_suspend_manual">Manual</string> <string name="mode_suspend_native">Nativo</string> <string name="mode_suspend_steam_note">Auto pausa y reanuda al mostrarse. Nativo prepara Steam para la suspensión primero. Manual espera a Reanudar. Nunca sigue ejecutándose.</string> + <string name="mode_background_downloads">Mantener las descargas activas</string> + <string name="mode_background_downloads_hint">Retrasa la suspensión en segundo plano mientras Steam esté descargando.</string> <string name="mode_suspend_note">Auto pausa en segundo plano y reanuda al mostrarse. Manual espera a Reanudar. Nunca sigue ejecutándose.</string> <string name="mode_startup">Inicio</string> <string name="mode_steam_startup">Iniciar Steam con DroidDeck</string> @@ -296,8 +313,8 @@ <string name="mode_sgdb_key">Clave API de SteamGridDB</string> <string name="mode_sgdb_key_yours">Tu clave</string> <string name="mode_sgdb_edit">Editar…</string> - <string name="mode_added_art_hint">Completa las imágenes que faltan según el nombre de la carpeta. Tus propios cover.jpg, hero.jpg, logo.png o icon.png en la carpeta del juego tienen prioridad.</string> - <string name="summary_remove_game">Remove %1$s</string> + <string name="mode_added_art_hint">Completa las imágenes que faltan desde Steam y, después, desde SteamGridDB. Tus propios cover.jpg, hero.jpg, logo.png o icon.png en la carpeta del juego tienen prioridad.</string> + <string name="summary_remove_game">Quitar %1$s</string> <string name="mode_added_remove_confirm">¿Quitar?</string> <string name="games_add">Añadir juego</string> <string name="games_add_title">Añadir un juego:</string> @@ -333,16 +350,20 @@ <string name="wincomp_found_shipped">El juego tiene %1$s (suele funcionar tal cual)</string> <string name="wincomp_already_here">Ya está en este juego</string> <string name="wincomp_no_recommendation">Nada en la carpeta del juego apunta a un componente.</string> + <string name="wincomp_active">Instalados para este juego (%1$d)</string> <string name="wincomp_all">Todos los componentes (%1$d)</string> <string name="wincomp_installers">Necesitan un instalador de Windows (%1$d)</string> - <string name="wincomp_installers_note">Estos ejecutan un instalador real dentro del prefijo (.NET, PhysX, XNA, los instaladores completos de Visual C++…). DroidDeck aún no puede hacerlo; es lo siguiente.</string> + <string name="wincomp_installers_note">Son programas de instalación independientes, sin ningún paquete que extraer, y todavía no hay un registro de lo que instalan. La mayoría son runtimes antiguos que el Mono incluido en Proton ya sustituye; los registros se añaden a medida que se crean.</string> <string name="wincomp_show">Mostrar</string> <string name="wincomp_hide">Ocultar</string> - <string name="wincomp_needs_installer">Necesita un instalador de Windows (próximamente)</string> + <string name="wincomp_needs_installer">Ejecuta su propio programa de instalación (aún sin registro)</string> <string name="wincomp_unsupported">Aún no compatible aquí</string> <string name="wincomp_loading">Cargando los componentes…</string> <string name="wincomp_failed">No se pudo instalar: %1$s</string> <string name="wincomp_downloaded">Descargado</string> + <string name="wincomp_downloading">Descargando %1$s</string> + <string name="wincomp_installing">Instalando: %1$s</string> + <string name="wincomp_reverting">Desactivando…</string> <string name="wincomp_download_size">Descarga de %1$s</string> <string name="wincomp_next_launch">Se aplica la próxima vez que se inicie el juego.</string> <string name="mode_stretch169">Estirar juegos 16:9</string> @@ -401,6 +422,51 @@ <string name="comp_check_nightlies">Buscar paquetes nuevos en las Nightlies</string> <string name="comp_proton">Proton</string> <string name="comp_proton_note">El Proton elegido aquí ejecuta todos los juegos que no tengan uno propio en Steam, y un cambio hecho en Steam también se ve aquí. Steam reemplaza el Proton de Valve al actualizarse; los originales se conservan por versión.</string> + <string name="comp_scope">Configuración</string> + <string name="comp_profile_configure">Configurar perfil</string> + <string name="comp_profile">Perfil</string> + <string name="comp_scope_general">Perfil predeterminado</string> + <string name="comp_scope_general_detail">Lo usan automáticamente los juegos sin ajustes propios.</string> + <string name="comp_profile_game_detail">Ajustes guardados que se usan automáticamente al iniciar %1$s.</string> + <string name="comp_game_hint">Elige solo los ajustes que necesita este juego. Todo lo demás sigue usando el perfil predeterminado.</string> + <string name="comp_game_fex">Preajuste de FEX</string> + <string name="comp_game_fex_inherited">Usa el preajuste del perfil predeterminado.</string> + <string name="comp_game_fex_override">Preajuste personalizado guardado para este juego.</string> + <string name="comp_game_fex_custom">Variables de FEX personalizadas</string> + <string name="comp_game_use_general">Usar predeterminado</string> + <string name="comp_game_compatibility">Compatibilidad del juego</string> + <string name="comp_game_environment_hint">Opciones de entorno de Proton, DXVK, VKD3D y sincronización para este juego.</string> + <string name="comp_game_proton_inherited">Usa el Proton del perfil predeterminado.</string> + <string name="comp_game_proton_override">Proton personalizado guardado para este juego mediante la asignación de compatibilidad de Steam.</string> + <string name="comp_no_proton_short">Sin Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Usa el paquete del perfil predeterminado de %1$s, salvo que este juego elija otro paquete.</string> + <string name="comp_game_component_general">Usa el paquete de componentes del perfil predeterminado.</string> + <string name="comp_game_component_override">Usa %1$s solo para este juego.</string> + <string name="comp_game_runtime_options">Opciones del runtime</string> + <string name="comp_game_environment_other_hint">Otras opciones de entorno de Proton, DXVK, VKD3D-Proton y sincronización para cada juego.</string> + <string name="comp_game_saved_next">El perfil de %1$s se ha guardado para el próximo inicio del juego.</string> + <string name="game_no_steam_title">Iniciar sin Steam</string> + <string name="game_no_steam_detail">Lo abre en Proton/FEX sin el cliente de Steam; las funciones de Steam quedan desactivadas.</string> + <string name="game_no_steam_on">Activado</string> + <string name="game_steam_with">Se inicia con Steam</string> + <string name="game_steam_without">Se inicia sin Steam</string> + <string name="game_settings_card">Ajustes</string> + <string name="game_settings_menu_title">Ajustes de %1$s</string> + <string name="game_settings_default">Predeterminado</string> + <string name="game_settings_default_detail">Devuelve todo lo cambiado para este juego a los ajustes de la aplicación.</string> + <string name="game_sync_custom">Variables de sincronización personalizadas</string> + <string name="comp_game_proton_live">La elección de Proton de %1$s se ha guardado y ya está disponible en Steam.</string> + <string name="comp_game_proton_next">La elección de Proton de %1$s se ha guardado. Reinicia Steam antes de iniciar el juego.</string> + <string name="comp_game_proton_not_runnable">%1$s no puede usar el Proton elegido en este dispositivo.</string> + <string name="comp_game_load_failed">No se pudo cargar el perfil de %1$s: %2$s</string> + <string name="comp_game_save_failed">No se pudo guardar el perfil del juego: %1$s</string> + <string name="comp_game_reset">Restablecer perfil del juego</string> + <string name="comp_game_reset_title">¿Restablecer el perfil de %1$s?</string> + <string name="comp_game_reset_body">¿Quitar los ajustes propios de este juego para Proton, FEX, paquete de componentes, entorno, filtrado de texturas y componentes de Windows? Usará el perfil predeterminado.</string> + <string name="comp_game_reset_done">%1$s ahora usa el perfil predeterminado.</string> + <string name="comp_game_reset_failed">No se pudo restablecer del todo el perfil del juego: %1$s</string> <string name="comp_default_live">%1$s ahora ejecuta todos los juegos que no tengan su propio Proton en Steam.</string> <string name="comp_default_next">%1$s ejecutará todos los juegos que no tengan su propio Proton a partir del próximo inicio de Steam.</string> <string name="comp_default_not_runnable">%1$s no puede iniciar juegos aquí, así que no puede ser el predeterminado.</string> @@ -419,7 +485,7 @@ <string name="comp_applies_next_game">Se aplica la próxima vez que se inicie un juego</string> <string name="comp_import_zip">Importar .zip</string> <string name="comp_reading">Leyendo Protons…</string> - <string name="comp_no_proton">Aún no hay ningún Proton instalado. Inicia Steam una vez para descargar su Proton ARM64, o añade GE-Proton o CachyOS desde Configuración.</string> + <string name="comp_no_proton">Aún no hay ningún Proton instalado. Inicia Steam una vez para descargar su Proton ARM64, o añade GE-Proton, CachyOS o DroidDeck-Proton desde Configuración.</string> <string name="comp_original">Original · %1$s</string> <string name="comp_this_build">%1$s · esta versión</string> <string name="comp_earlier_build">%1$s · versión anterior</string> @@ -525,6 +591,10 @@ <string name="drawer_cas">Nitidez (CAS)</string> <string name="drawer_cas_level">Nivel de nitidez</string> <string name="drawer_fake_hdr">HDR simulado</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Entrar en SteamVR</string> + <string name="steamvr_checking">Comprobando SteamVR…</string> <string name="drawer_deband">Reducción de bandas</string> <string name="drawer_deband_strength">Intensidad de reducción de bandas</string> <string name="drawer_brightness">Brillo</string> @@ -542,6 +612,11 @@ <string name="drawer_texture_sharpness_note">Un sesgo de mip negativo: texturas más nítidas, algo de parpadeo. Auto sigue cuánto se amplía la sesión a la pantalla.</string> <string name="drawer_touch_auto">Auto (%1$s)</string> <string name="drawer_keyboard">Teclado</string> + <string name="drawer_latency">Latencia</string> + <string name="drawer_low_latency_controller">Mando de baja latencia</string> + <string name="drawer_low_latency_controller_hint">El mando informa a 1000 Hz en lugar de 250 Hz. Usa algo más de CPU.</string> + <string name="drawer_low_latency_touch">Táctil de baja latencia</string> + <string name="drawer_low_latency_touch_hint">Los toques omiten la agrupación de fotogramas; los controles táctiles de Steam van a 1000 Hz. Usa algo más de CPU.</string> <string name="drawer_pc_keyboard">Teclado de PC</string> <string name="drawer_android_keyboard">Android</string> <string name="drawer_second_screen">Segunda pantalla</string> @@ -564,11 +639,25 @@ <string name="drawer_stop_title">¿Detener la sesión?</string> <string name="drawer_running_now">En ejecución</string> <string name="drawer_no_game">Ningún juego se ejecuta con un Proton</string> + <string name="drawer_selected_profile">Perfil del juego</string> + <string name="drawer_selected_profile_none">Los detalles del perfil aún no están disponibles.</string> + <string name="drawer_profile_refresh_failed_initial">No se pudieron cargar los perfiles de juego. Se reintentará automáticamente.</string> + <string name="drawer_profile_refresh_failed_stale">No se pudieron actualizar los perfiles de juego. Se muestran los últimos datos disponibles; se reintentará automáticamente.</string> + <string name="drawer_profile_inspect_hint">Consulta y edita los ajustes guardados que se usarán en el próximo inicio.</string> + <string name="drawer_profile_default">Usa el perfil predeterminado</string> + <string name="drawer_profile_custom">Perfil personalizado</string> + <string name="drawer_component_inherited">Usa %1$s del perfil predeterminado.</string> + <string name="drawer_game_components_note">Los cambios se guardan en el perfil de %1$s y se aplican la próxima vez que se inicie el juego.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d ajuste propio del juego</item> + <item quantity="many">%1$d ajustes propios del juego</item> + <item quantity="other">%1$d ajustes propios del juego</item> + </plurals> <string name="drawer_no_proton">Aún no hay ningún Proton instalado.</string> <string name="drawer_game_running">juego en ejecución</string> <string name="drawer_reapplied">reaplicado al iniciar %1$s</string> <string name="drawer_original">Original</string> - <string name="drawer_components_note">Descarga, importa y elimina en la página Componentes.</string> + <string name="drawer_components_note">Importa y elimina en la página Componentes.</string> <string name="setup_check_done">Hecho</string> <string name="setup_check_warn">Requiere atención</string> <string name="setup_check_busy">Trabajando</string> @@ -620,6 +709,14 @@ <string name="setup_saved_logs">Registros de sesión guardados</string> <string name="setup_saved_logs_hint">Conserva los %1$d más recientes</string> <string name="setup_clear_logs">Borrar registros</string> + <string name="setup_reset_settings">Restablecer todos los ajustes</string> + <string name="setup_reset_settings_hint">Devuelve cada ajuste a su valor predeterminado</string> + <string name="setup_reset_settings_button">Restablecer</string> + <string name="setup_reset_settings_title">¿Restablecer todos los ajustes?</string> + <string name="setup_reset_settings_body">Los ajustes de pantalla, rendimiento, mando, tema, idioma y lanzador vuelven a sus valores predeterminados. Se conservan tus juegos, la sesión de Steam, las cuentas de tiendas, los controladores descargados y las carpetas de almacenamiento.</string> + <string name="setup_reset_settings_profiles">Restablecer también los perfiles de juego (Proton, FEX, componentes y entorno de cada juego, y el entorno del perfil predeterminado)</string> + <string name="setup_reset_settings_session_running">Detén la sesión antes de restablecer los ajustes.</string> + <string name="setup_reset_settings_partial">Los ajustes se restablecieron, pero algunas partes no se pudieron restablecer. Los registros tienen los detalles.</string> <string name="setup_offline">Modo sin conexión</string> <string name="setup_sign_in_first">Inicia sesión en Steam primero</string> <string name="setup_launcher">Launcher</string> @@ -635,6 +732,10 @@ <string name="setup_home">Usar como pantalla de inicio</string> <string name="setup_home_on">DroidDeck puede ser la app de inicio</string> <string name="setup_home_off">DroidDeck nunca se ofrece como app de inicio</string> + <string name="setup_orientation">Orientación</string> + <string name="setup_orientation_auto">Horizontal automática</string> + <string name="setup_orientation_landscape">Horizontal</string> + <string name="setup_orientation_reverse">Horizontal invertida</string> <string name="setup_fullscreen">Pantalla completa</string> <string name="setup_fullscreen_on">Oculta las barras de estado y navegación de Android</string> <string name="setup_fullscreen_off">Muestra las barras de estado y navegación de Android</string> @@ -779,7 +880,7 @@ <string name="gate_eyebrow">Steam</string> <string name="gate_lede">Android detiene las apps que inician muchos procesos en segundo plano, y Steam inicia decenas. Hasta que esto cambie, los juegos se cierran sin mostrar ningún error.</string> <string name="gate_fix_for_me">Solucionarlo por mí</string> - <string name="gate_toggle_steps">Activa “Desactivar restricciones de procesos secundarios” y vuelve. Deja activadas las Opciones de desarrollador o el interruptor se desactivará de nuevo.</string> + <string name="gate_toggle_steps">Activa “Inhabilitar restricciones de procesos secundarios” y vuelve. Deja activadas las Opciones de desarrollador o el interruptor se desactivará de nuevo.</string> <string name="gate_open_dev">Abrir Opciones de desarrollador</string> <string name="gate_no_toggle">Esta versión de Android no tiene un interruptor para ello, así que DroidDeck lo cambia mediante la Depuración inalámbrica. Tarda un minuto y no necesitas ordenador.</string> <string name="gate_needs_wifi">La Depuración inalámbrica necesita Wi-Fi. Sirve cualquier red; no necesita internet.</string> @@ -829,8 +930,8 @@ <string name="wadb_turn_off">Desactivar límite</string> <string name="wadb_other_ways">Otras formas de cambiarlo</string> <string name="wadb_dev_try_first">1 · Opciones de desarrollador (pruébalo primero)</string> - <string name="wadb_restrict_on">Activa “Restringir procesos secundarios”.</string> - <string name="wadb_restrict_off">Desactiva “Restringir procesos secundarios”.</string> + <string name="wadb_restrict_on">Desactiva “Inhabilitar restricciones de procesos secundarios”.</string> + <string name="wadb_restrict_off">Activa “Inhabilitar restricciones de procesos secundarios”.</string> <string name="wadb_computer_last">3 · ADB desde ordenador (último recurso)</string> <string name="wadb_only_if">Solo si la Depuración inalámbrica no está disponible.</string> <string name="wadb_computer_group">3 · ADB desde ordenador (último recurso)</string> @@ -851,6 +952,8 @@ <string name="ctrl_keyboard_button">Botón de teclado</string> <string name="ctrl_select_steam">Pulsa Select para abrir el menú de Steam</string> <string name="ctrl_select_steam_hint">En lugar de View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con como mandos de RV</string> + <string name="ctrl_joycon_vr_hint">Mientras SteamVR está activo, cada Joy-Con es una mano. Apúntalo al frente y mantén Home o Captura para recentrarlo.</string> <string name="setup_animations">Animaciones</string> <string name="ctrl_adaptive_hint">Los sticks aparecen donde tocas y se ocultan al soltar</string> <string name="ctrl_layout">Disposición</string> @@ -898,10 +1001,17 @@ <string name="content_page_gone">Esa página ya no existe. Elige una sección a la izquierda.</string> <string name="content_open_desktop">Abrir escritorio</string> <string name="content_install_open_desktop">Instalar y abrir escritorio</string> + <string name="desktop_remove_title">Desinstalar escritorio</string> + <string name="desktop_remove_text">Elimina el escritorio y sus apps incluidas. Se conservan los juegos, las apps añadidas, los ajustes y las bibliotecas compartidas.</string> + <string name="desktop_removing">Eliminando el escritorio</string> + <string name="desktop_removed">Escritorio eliminado</string> + <string name="desktop_cleaning_legacy">Eliminando archivos antiguos de LXQt</string> + <string name="desktop_removal_unknown">Actualiza DroidDeck antes de eliminar esta versión del escritorio.</string> <string name="content_linux_desktop">Escritorio de Linux</string> <string name="content_linux_desktop_hint">KDE Plasma, Firefox y tus emuladores</string> <string name="games_empty">Los juegos que instales en Steam aparecen aquí después de la sesión.</string> <string name="games_play_steam">Jugar en Steam</string> + <string name="games_play_steamvr">Jugar en SteamVR</string> <string name="games_launch_settings">Ajustes de inicio</string> <string name="games_launch">Iniciar</string> <string name="games_files">Archivos del juego</string> @@ -926,6 +1036,8 @@ <string name="games_last_played">Última partida %1$s</string> <string name="games_internal">Almacenamiento interno</string> <string name="games_added">Juego añadido</string> + <string name="games_custom">Juego personalizado</string> + <string name="games_store_storage">Almacenamiento de juegos</string> <string name="gpu_auto_hint">El mejor par para esta GPU, siempre actualizado</string> <string name="gpu_manual_hint">Elige un par manualmente</string> <string name="gpu_checking">Buscando controladores…</string> @@ -937,7 +1049,6 @@ <string name="gpu_set_with_runtime">Se define junto con el controlador de runtime: %1$s incluye ambos.</string> <string name="gpu_runtime_hint">Lo usan los juegos y el escritorio.</string> <string name="gpu_runtime_default">Predeterminado del runtime</string> - <string name="gpu_display_hint">Dibuja los fotogramas en pantalla. Se aplica al reiniciar DroidDeck.</string> <string name="gpu_auto_by_gpu">Auto - elegido según la GPU</string> <string name="gpu_manage">Descargar, importar o eliminar…</string> <string name="gpu_in_use_caps">EN USO</string> @@ -967,6 +1078,12 @@ <string name="deck_tab_left">Pad izquierdo</string> <string name="deck_tab_right">Pad derecho</string> <string name="deck_tab_both">Ambos</string> + <string name="deck_tab_gamepad">Mando</string> + <string name="deck_surface_stick">Stick</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Cambiar entre stick y trackpad</string> + <string name="deck_more_controls">Más controles de Deck</string> + <string name="deck_panels">PANELES</string> <string name="deck_close">Cerrar controles de la segunda pantalla</string> <string name="deck_open_steam_menu">Abrir menú de Steam</string> <string name="deck_left_upper">Izquierdo · superior</string> @@ -1002,6 +1119,10 @@ <string name="proton_installed">Instalada %1$s</string> <string name="proton_queued">Pendiente de una solicitud anterior</string> <string name="proton_not_installed">No instalada</string> + <string name="proton_update_available">Actualización disponible → %1$s</string> + <string name="proton_remove_older">Quitar versiones antiguas de %1$s</string> + <string name="proton_remove_older_body">Elimina %1$s. Los juegos configurados con estas versiones deberán cambiarse a otro Proton.</string> + <string name="proton_remove_body">Los juegos configurados con esta versión deberán cambiarse a otro Proton.</string> <string name="proton_install_now">Instalar ahora</string> <string name="proton_cancel_queued">Cancelar en cola</string> <string name="pckb_android">Teclado de Android</string> @@ -1030,6 +1151,8 @@ <string name="game_env_eyebrow">Juegos de Proton</string> <string name="pip_title">Imagen en imagen</string> <string name="pip_auto">Entrar en PiP automáticamente</string> + <string name="unfolded_controls">Controles con la pantalla desplegada</string> + <string name="unfolded_controls_hint">Desplegado, el juego queda encima de los trackpads y los agarres traseros de Steam Deck. Plegado, el juego ocupa toda la pantalla.</string> <string name="pip_suspended">Suspendida</string> <string name="pip_not_ready">Imagen en imagen estará disponible cuando la sesión esté lista.</string> <string name="pip_permission">Permite imagen en imagen para DroidDeck en los ajustes de Android.</string> @@ -1055,19 +1178,12 @@ <string name="game_file_exported">Archivos de juegos guardados en %1$s</string> <string name="game_frontend_files">Archivos para frontends</string> - <!-- Launcher, session and menus --> - - <!-- Launcher (MainActivity) --> <string name="main_wait_runtime">Espera a que termine la operación del runtime</string> <string name="main_wait_proton_install">Espera a que termine la instalación de la herramienta de compatibilidad</string> <string name="main_wait_desktop_install">Espera a que termine la instalación de la app de escritorio</string> <string name="main_wait_install_game">Espera a que termine la instalación antes de iniciar un juego</string> <string name="main_saves_close_session">Cierra primero la sesión de Steam para que el juego no guarde encima de lo importado</string> - - <!-- Busy line while saves are imported; %1$s is the game's name --> <string name="main_saves_importing">Importando en %1$s</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the game's name --> <plurals name="main_saves_imported"> <item quantity="one">Se importó %1$d archivo del %2$s en %3$s</item> <item quantity="many">Se importaron %1$d archivos del %2$s en %3$s</item> @@ -1079,21 +1195,13 @@ <item quantity="other">Se importaron %1$d archivos del %2$s en %3$s. Copia de las partidas anteriores en Download/DroidDeck/Saves/backups</item> </plurals> <string name="main_saves_pick_zip">Elige un zip de partidas guardadas para %1$s</string> - - <!-- Busy line while saves are exported; %1$s is the game's name --> <string name="main_saves_exporting">Exportando %1$s</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the zip's path --> <plurals name="main_saves_exported"> <item quantity="one">Se exportó %1$d archivo como %2$s: %3$s</item> <item quantity="many">Se exportaron %1$d archivos como %2$s: %3$s</item> <item quantity="other">Se exportaron %1$d archivos como %2$s: %3$s</item> </plurals> - - <!-- %1$s is the game's name, %2$s the save layout --> <string name="main_saves_pick_folder">Elige dónde guardar %1$s (%2$s)</string> - - <!-- %1$s is what was being done (e.g. Importing into Portal 2, Swapping), %2$s the error --> <string name="main_action_failed">%1$s falló: %2$s</string> <string name="main_no_logs_yet">Aún no hay registros de sesión: inicia una sesión primero.</string> <string name="main_no_logs_to_clear">No hay registros de sesión que borrar.</string> @@ -1108,78 +1216,55 @@ <string name="main_adb_copied">Comando ADB copiado</string> <string name="main_pick_roms">Elige la carpeta de ROMs</string> <string name="main_non_adreno_title">La GPU no es Adreno</string> - - <!-- %1$s is the GPU's name, %2$.0f the download size in MB --> <string name="main_non_adreno_text">Turnip es compatible con GPU Adreno. En %1$s, Steam puede mostrar una pantalla negra. Descarga: %2$.0f MB.</string> <string name="main_install_anyway">Instalar de todos modos</string> <string name="main_remove_runtime_title">Eliminar el runtime de Linux</string> <string name="main_remove_runtime_text">Esto elimina el runtime, el cliente de Steam que contiene y todos los juegos instalados en él.</string> - - <!-- Toast; %1$s is a list of components, separated by commas --> <string name="main_applied">Aplicado: %1$s</string> <string name="android_app_open_failed_primary">No se pudo abrir %1$s en la pantalla principal</string> - - <!-- %1$s is the app, %2$s the name of the display --> <string name="android_app_open_failed_on">No se pudo abrir %1$s en %2$s</string> - - <!-- %1$s is the app, %2$d the display's number --> <string name="android_app_open_failed_display">No se pudo abrir %1$s en la pantalla %2$d</string> - - <!-- Components page busy lines, shown with … after them --> <string name="comp_busy_importing">Importando</string> <string name="comp_busy_swapping">Reemplazando</string> <string name="comp_busy_restoring">Restaurando</string> <string name="comp_busy_cancelling">Cancelando</string> <string name="comp_busy_deleting">Eliminando</string> <string name="comp_cannot_read">no se puede leer el archivo</string> - - <!-- %1$s is a version or a name --> <string name="comp_imported">%1$s importado</string> <string name="comp_swap_cancelled">Se canceló el reemplazo pendiente.</string> <string name="comp_pick_wcp">Elige un paquete de componentes (-linux .wcp)</string> <string name="comp_nightlies_unreachable">No se pudo acceder a las Nightlies</string> - - <!-- %1$s is the package version --> <string name="comp_stored">%1$s guardado</string> <string name="comp_download_failed">La descarga falló: %1$s</string> <string name="drivers_pick_linux">Elige un controlador de runtime de Linux (zip -Linux o paquete Android + Linux)</string> <string name="drivers_pick_android">Elige un controlador de pantalla (zip de AdrenoTools o paquete Android + Linux)</string> <string name="drivers_pick_any">Elige un zip de controlador o un paquete Android + Linux</string> - - <!-- %1$s is a desktop app's name, %2$s what went wrong --> <string name="main_pkg_problem">%1$s: %2$s</string> <string name="main_removing_named">Quitando %1$s…</string> <string name="main_forgetting_named">Olvidando %1$s…</string> <string name="main_pick_game_storage">Elige la carpeta de almacenamiento de juegos</string> <string name="main_pick_decky_zip">Elige un ZIP de plugin de Decky</string> <string name="main_storage_not_usable">No se puede usar: %1$s</string> - - <!-- What is running, when it is a program without a known name --> <string name="main_running_program">Programa</string> <string name="main_removing_runtime">Eliminando el runtime de Linux</string> <string name="main_settings_main_screen">No se pudieron abrir los Ajustes en la pantalla inferior; se abrieron en la pantalla principal.</string> <string name="main_open_dev_options">Abre Opciones de desarrollador en Ajustes</string> - <!-- Updates --> <string name="upd_unknown_apps_failed">No se pudo abrir el ajuste \"Instalar apps desconocidas\" de Android</string> <string name="upd_couldnt_check">No se pudo comprobar: %1$s</string> <string name="upd_no_download">Esta versión no tiene descarga para esta copia de DroidDeck</string> <string name="upd_stop_first">Detén primero la sesión en ejecución y después actualiza</string> - - <!-- Update stages, shown with … after them --> <string name="upd_stage_downloading">Descargando</string> <string name="upd_stage_installing">Instalando</string> <string name="upd_stage_confirm">Esperando tu confirmación</string> <string name="upd_failed">La actualización falló</string> <string name="upd_not_offered">Android no ofreció instalar la actualización</string> - <!-- Decky --> <string name="decky_install_failed">Falló la instalación de Decky: %1$s</string> <string name="decky_plugin_starting">Iniciando la importación del plugin…</string> <string name="decky_plugin_failed">Falló la importación del plugin: %1$s</string> <string name="decky_plugin_installed">Plugin instalado. Reinicia Steam para cargarlo.</string> - <!-- GPU drivers --> <string name="drivers_not_checked">Aún sin comprobar - toca actualizar para buscar controladores nuevos</string> <string name="drivers_bundle_sets_display">Android + Linux: define también el controlador de pantalla</string> <string name="drivers_bundle_sets_runtime">Android + Linux: define también el controlador de runtime</string> @@ -1187,26 +1272,26 @@ <string name="drivers_system_vulkan">Vulkan del sistema: no hay versión incluida para esta GPU</string> <string name="drivers_bundled">%1$s (incluido)</string> <string name="drivers_manual">Manual</string> - - <!-- Driver mode, then the driver pair in use --> <string name="drivers_summary">%1$s · %2$s</string> <string name="drivers_half_published">Por ahora solo se ha publicado una de las mitades</string> <string name="drivers_pair_size">%1$.0f MB para ambos</string> - - <!-- %1$s says why (the GPU's support status) --> <string name="drivers_none_to_set">No hay controladores que definir: %1$s</string> <string name="drivers_checking_latest">Buscando los controladores más recientes…</string> <string name="drivers_up_to_date_check_failed">Al día (no se pudo comprobar: %1$s)</string> <string name="drivers_recommended_unpublished">Los controladores recomendados no están publicados ahora mismo</string> - - <!-- %1$s is the driver pair's name, %2$s its version --> <string name="drivers_downloading_pair">Descargando %1$s %2$s…</string> <string name="drivers_updated_to">Actualizado a %1$s %2$s.</string> <string name="drivers_updated_to_restart">Actualizado a %1$s %2$s. El controlador de pantalla se aplica al reiniciar DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Las actualizaciones de controladores esperan a que termine la sesión.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s se descargará cuando desactives los datos móviles y el ahorro de batería.</string> + <string name="drivers_skipping_bad">%1$s %2$s no inició una sesión aquí, así que Auto se queda con los controladores que sí funcionaron.</string> + <string name="drivers_rolled_back">%1$s no inició una sesión dos veces, así que Auto volvió a los controladores que funcionaban.</string> <string name="drivers_switched_to">Cambiado a %1$s %2$s.</string> <string name="drivers_switched_to_restart">Cambiado a %1$s %2$s. El controlador de pantalla se aplica al reiniciar DroidDeck.</string> <string name="drivers_using">Usando %1$s %2$s.</string> <string name="drivers_using_restart">Usando %1$s %2$s. El controlador de pantalla se aplica al reiniciar DroidDeck.</string> + <string name="drivers_using_quest">Usando el controlador de pantalla Quest incluido y el valor predeterminado del runtime.</string> + <string name="drivers_using_quest_restart">Usando el controlador de pantalla Quest incluido y el valor predeterminado del runtime. El controlador de pantalla se aplica tras reiniciar DroidDeck.</string> <string name="drivers_not_a_driver">No es un zip de controlador: no es un controlador de AdrenoTools, ni un Turnip -Linux, ni un paquete Android + Linux</string> <string name="drivers_import_failed">La importación falló: %1$s</string> <string name="drivers_imported_unnamed">Controlador importado</string> @@ -1214,11 +1299,7 @@ <string name="drivers_using_bundle_restart">Usando %1$s como controlador de runtime y de pantalla. El controlador de pantalla se aplica al reiniciar DroidDeck.</string> <string name="drivers_deleted_bundle">%1$s eliminado (ambos controladores)</string> <string name="drivers_deleted">%1$s eliminado</string> - - <!-- %1$s lists the latest releases, %2$s when they were checked (e.g. 5 min ago) --> <string name="drivers_release_status">Últimas: %1$s · comprobado %2$s</string> - - <!-- %1$s lists the latest releases, %2$s the sources that could not be reached, %3$s when they were checked --> <string name="drivers_release_status_failed">Últimas: %1$s · sin acceso a %2$s · comprobado %3$s</string> <plurals name="drivers_ago_minutes"> <item quantity="one">hace %1$d min</item> @@ -1237,39 +1318,25 @@ </plurals> <string name="drivers_checking_sources">Comprobando Banners-Turnip, WinNative y DroidDeck…</string> <string name="drivers_check_failed">falló la comprobación</string> - - <!-- %1$s is the driver's name --> <string name="drivers_installed_pick_either">%1$s instalado - elígelo en cualquiera de las listas para definir ambos controladores</string> <string name="drivers_installed_pick">%1$s instalado - elígelo en el menú</string> - <!-- Session (SessionActivity) --> <string name="session_wait_removal">Espera a que termine la eliminación del runtime</string> - - <!-- Drawer title when the running program has no known name --> <string name="session_title_game">Juego</string> - - <!-- Shown as "Auto (touchpad)" in the drawer's touch setting --> <string name="session_touch_auto_touchpad">touchpad</string> - - <!-- Shown as "Auto (direct)" in the drawer's touch setting --> <string name="session_touch_auto_direct">directo</string> <string name="session_swap_failed">El reemplazo falló: %1$s</string> + <string name="session_profile_save_failed">No se pudo guardar el perfil: %1$s</string> <string name="session_desktop_paused">El escritorio está en pausa</string> - - <!-- %1$s is the program's name --> <string name="session_named_paused">%1$s está en pausa</string> <string name="session_program_paused">El programa está en pausa</string> <string name="session_starting_desktop">Iniciando el escritorio</string> - - <!-- %1$s is the program's name --> <string name="session_starting_named">Iniciando %1$s</string> <string name="session_starting_program">Iniciando el programa</string> <string name="session_no_logs">No hay registros de esta sesión.</string> <string name="session_logs_archive_failed">No se pudo crear el archivo de registros de la sesión.</string> <string name="session_logs_share_failed">No se pudieron compartir los registros de la sesión.</string> <string name="session_starting_session">Iniciando la sesión…</string> - - <!-- Loading screen lines while packages download; %1$d and %2$d are megabytes --> <string name="session_runtime_downloading">descargando el runtime de Linux</string> <string name="session_runtime_downloading_mb">descargando el runtime de Linux · %1$d de %2$d MB</string> <string name="session_runtime_checking">comprobando el runtime de Linux</string> @@ -1284,35 +1351,22 @@ <string name="session_proton_unpacking">descomprimiendo Proton Experimental (ARM64)</string> <string name="session_runtime_catalog_unreachable">No se pudo acceder al catálogo del runtime. Revisa la conexión y vuelve a pulsar Jugar.</string> <string name="session_runtime_install_failed">El runtime de Linux no se instaló. Revisa el runtime en Configuración y vuelve a pulsar Jugar.</string> - - <!-- %1$s says what went wrong --> <string name="session_desktop_install_failed">El escritorio no se instaló (%1$s). Revisa la conexión y pulsa Escritorio de nuevo.</string> - - <!-- %1$s is the program's name, or Steam --> <string name="session_ended_named">%1$s se detuvo inesperadamente. Comparte los registros en un informe de error o inténtalo de nuevo.</string> <string name="session_ended_program">El programa se detuvo inesperadamente. Comparte los registros en un informe de error o inténtalo de nuevo.</string> <string name="session_ended_desktop">El escritorio se detuvo inesperadamente. Comparte los registros en un informe de error o inténtalo de nuevo.</string> - - <!-- %1$d is the exit status, %2$s the log file's path --> <string name="session_ended_detail">Código de salida %1$d · %2$s</string> <string name="session_ended_no_log">sin registro</string> - - <!-- %1$d errors; %2$s, %3$s and %4$s are the Performance page and its two settings --> <plurals name="session_hint_enosys"> <item quantity="one">El registro muestra %1$d error \"Function not implemented\": la aceleración seccomp de proot hace fallar un proceso auxiliar en este dispositivo. Prueba %2$s → \"%3$s\" (o \"%4$s\") y vuelve a iniciar.</item> <item quantity="many">El registro muestra %1$d errores \"Function not implemented\": la aceleración seccomp de proot hace fallar un proceso auxiliar en este dispositivo. Prueba %2$s → \"%3$s\" (o \"%4$s\") y vuelve a iniciar.</item> <item quantity="other">El registro muestra %1$d errores \"Function not implemented\": la aceleración seccomp de proot hace fallar un proceso auxiliar en este dispositivo. Prueba %2$s → \"%3$s\" (o \"%4$s\") y vuelve a iniciar.</item> </plurals> - <!-- Screens, files, controller and store --> - - <!-- Mode settings --> <string name="mode_decky_plugins">Plugins</string> <string name="mode_decky_plugins_hint">Instala un ZIP de plugin para la próxima sesión de Steam.</string> <string name="mode_decky_plugin_downloading">Descargando…</string> <string name="mode_decky_plugin_install_zip">Instalar desde ZIP</string> - - <!-- Store --> <string name="store_cat_games">Juegos</string> <string name="store_cat_audio_video">Audio y vídeo</string> <string name="store_cat_graphics">Gráficos</string> @@ -1325,28 +1379,14 @@ <string name="store_cat_utilities">Utilidades</string> <string name="store_section_popular">Populares</string> <string name="store_section_trending">En tendencia</string> - - <!-- Store front-page section of recently added apps --> <string name="store_section_new">Nuevas</string> - - <!-- Store front-page section of recently updated apps --> <string name="store_section_updated">Actualizadas</string> <string name="store_section_loading">cargando…</string> <string name="store_flatpak_setup">Configuración de Flatpak</string> - - <!-- %1$s is what failed (an app name or "Flatpak setup"), %2$s the error --> <string name="store_problem">%1$s: %2$s</string> <string name="store_updates_check_failed">No se pudieron buscar actualizaciones en Flathub</string> - - <!-- Library tiles --> - - <!-- Subtitle of a game tile whose cover art was found --> <string name="content_rom_installed">instalado</string> - - <!-- Subtitle of a game that is a folder rather than a single file --> <string name="content_rom_folder">carpeta</string> - - <!-- Launcher themes --> <string name="theme_graphite">Grafito</string> <string name="theme_graphite_detail">Superficies grafito, con el azul del orbe del logotipo para todo lo seleccionado, enfocado o pulsado.</string> <string name="theme_paper">Papel sobre negro</string> @@ -1355,8 +1395,6 @@ <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> - - <!-- PC keyboard key caps (keep them short; they label physical PC keys) --> <string name="pckb_key_esc">Esc</string> <string name="pckb_key_ins">Insert</string> <string name="pckb_key_del">Supr</string> @@ -1374,27 +1412,17 @@ <string name="pckb_key_alt">Alt</string> <string name="pckb_key_space">Espacio</string> <string name="pckb_key_altgr">AltGr</string> - - <!-- Terminal key strip on the second screen --> <string name="second_key_tab">Tab</string> - - <!-- A modifier key (%1$s, e.g. Ctrl) that is currently held --> <string name="second_key_on">%1$s ✓</string> <string name="second_key_ctrl_c">Ctrl+C</string> <string name="second_key_ctrl_d">Ctrl+D</string> - - <!-- Game file sync errors --> <string name="game_sync_err_runtime">Instala primero el runtime</string> <string name="game_sync_err_steam_library">La biblioteca de Steam no está disponible</string> <string name="game_sync_err_previous_sd">La biblioteca anterior de la SD no está disponible</string> <string name="game_sync_err_game_storage">El almacenamiento de juegos no está disponible</string> <string name="game_sync_err_added_games">La carpeta de juegos añadidos no está disponible</string> <string name="game_sync_err_manifests">Los manifiestos de Steam no están disponibles</string> - - <!-- The systems RetroArch emulates, shown under its name --> <string name="content_system_many">Varios sistemas</string> - - <!-- File manager --> <string name="fm_drive_internal">Interno</string> <string name="fm_drive_linux">Sistema Linux</string> <string name="fm_drive_sd">Tarjeta SD</string> @@ -1412,8 +1440,6 @@ <string name="fm_no_favorites">Aún no hay favoritos - fija una carpeta con su menú ⋮ para volver aquí rápidamente.</string> <string name="fm_unpin_favorite">Quitar de favoritos</string> <string name="fm_size_zero">0 bytes</string> - - <!-- Size unit for sizes under 1 KB, shown after a number --> <string name="fm_unit_bytes">bytes</string> <string name="fm_prop_location">Ubicación</string> <string name="fm_prop_type">Tipo</string> @@ -1421,8 +1447,6 @@ <string name="fm_prop_modified">Modificado</string> <string name="fm_type_folder">Carpeta</string> <string name="fm_type_file">Archivo</string> - - <!-- File type in Properties; %1$s is the file extension in capitals, e.g. TXT --> <string name="fm_type_ext_file">Archivo %1$s</string> <string name="fm_read_only">Solo lectura</string> <string name="fm_read_only_hint">Impide que los juegos (y Wine) sobrescriban o eliminen este archivo.</string> @@ -1436,19 +1460,11 @@ <string name="fm_delete_failed">No se pudo eliminar</string> <string name="fm_op_moving">Moviendo...</string> <string name="fm_op_copying">Copiando...</string> - - <!-- %1$s is the file name --> <string name="fm_op_moving_item">Moviendo - %1$s</string> <string name="fm_op_copying_item">Copiando - %1$s</string> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_moving_batch">Moviendo %1$d/%2$d - %3$s</string> <string name="fm_op_copying_batch">Copiando %1$d/%2$d - %3$s</string> - - <!-- Paste result; %1$d items done, %2$d items failed --> <string name="fm_paste_failed">%1$d hechos, %2$d con error</string> - - <!-- Paste result; %1$d items done, %2$d items skipped --> <string name="fm_paste_skipped">%1$d hechos, %2$d omitidos</string> <plurals name="fm_paste_moved"> <item quantity="one">%1$d elemento movido</item> @@ -1460,8 +1476,6 @@ <item quantity="many">%1$d elementos copiados</item> <item quantity="other">%1$d elementos copiados</item> </plurals> - - <!-- %1$s is a file or folder name --> <string name="fm_already_exists">\"%1$s\" ya existe</string> <string name="fm_op_renaming">Renombrando...</string> <string name="fm_rename_failed">No se pudo renombrar</string> @@ -1472,8 +1486,6 @@ <string name="fm_create">Crear</string> <string name="fm_new_name">Nuevo nombre</string> <string name="fm_delete_title">¿Eliminar?</string> - - <!-- %1$s is a file or folder name --> <string name="fm_delete_text">¿Eliminar \"%1$s\" de forma permanente?</string> <plurals name="fm_delete_items_title"> <item quantity="one">¿Eliminar %1$d elemento?</item> @@ -1481,15 +1493,11 @@ <item quantity="other">¿Eliminar %1$d elementos?</item> </plurals> <string name="fm_cannot_undo">Esta acción no se puede deshacer.</string> - - <!-- After a list of the first five names in a delete confirmation --> <plurals name="fm_and_more"> <item quantity="one">…y %1$d más</item> <item quantity="many">…y %1$d más</item> <item quantity="other">…y %1$d más</item> </plurals> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_deleting_batch">Eliminando %1$d/%2$d - %3$s</string> <plurals name="fm_delete_some_failed"> <item quantity="one">No se pudo eliminar %1$d</item> @@ -1505,8 +1513,6 @@ <string name="fm_conflict_skip">Omitir</string> <string name="fm_select_this_folder">Seleccionar esta carpeta</string> <string name="fm_back">Atrás</string> - - <!-- %1$s is a storage name, e.g. SD card --> <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> @@ -1521,15 +1527,9 @@ <string name="fm_hide_favorites">Ocultar favoritos</string> <string name="fm_show_favorites">Mostrar favoritos</string> <string name="fm_filter_folder">Filtrar esta carpeta</string> - - <!-- Free space on the storage being browsed; %1$s is a size, e.g. 12.50 GB --> <string name="fm_free_space">%1$s libres</string> <string name="fm_selected_count">%1$d seleccionados</string> - - <!-- Selection bar: clear the selection --> <string name="fm_select_none">Ninguno</string> - - <!-- Selection bar: select every item --> <string name="fm_select_all">Todo</string> <string name="fm_paste">Pegar</string> <plurals name="fm_items"> @@ -1537,37 +1537,23 @@ <item quantity="many">%1$d elementos</item> <item quantity="other">%1$d elementos</item> </plurals> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_here">Pegar %1$s aquí</string> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_move_here">Pegar %1$s aquí (mover)</string> <string name="fm_rail_title">Archivos</string> <string name="fm_rail_storage">ALMACENAMIENTO</string> - - <!-- Rail section of shortcut folders (Downloads, ROMs, …) --> <string name="fm_rail_quick">ATAJOS</string> <string name="fm_rail_favorites">FAVORITOS</string> <string name="fm_rail_downloads">Descargas</string> - - <!-- Downloads shortened to fit under an icon (about 8 characters) --> <string name="fm_rail_downloads_short">Descargas</string> <string name="fm_rail_roms">ROMs</string> <string name="fm_rail_session_logs">Registros de sesión</string> <string name="fm_rail_pictures">Imágenes</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_added">Se añadió \"%1$s\" a Favoritos</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_removed">Se quitó \"%1$s\" de Favoritos</string> <string name="fm_empty_directory">Carpeta vacía</string> <string name="fm_up_one_level">Subir un nivel</string> <string name="fm_choose_folder">Elige una carpeta</string> <string name="fm_choose_file">Elige un archivo</string> - - <!-- On-screen controller tint colors --> <string name="ctrl_tint_steam_blue">Azul Steam</string> <string name="ctrl_tint_sky">Celeste</string> <string name="ctrl_tint_white">Blanco</string> @@ -1576,8 +1562,6 @@ <string name="ctrl_tint_amber">Ámbar</string> <string name="ctrl_tint_red">Rojo</string> <string name="ctrl_tint_pink">Rosa</string> - - <!-- On-screen buttons that can be remapped --> <string name="ctrl_button_a">Botón A</string> <string name="ctrl_button_b">Botón B</string> <string name="ctrl_button_x">Botón X</string> @@ -1588,34 +1572,21 @@ <string name="ctrl_button_rt">Gatillo derecho</string> <string name="ctrl_button_view">Botón Vista</string> <string name="ctrl_button_menu">Botón Menú</string> - - <!-- What a remapped on-screen button sends; letters and Steam are controller button names --> - - <!-- Controller View button --> <string name="ctrl_target_view">Vista</string> - - <!-- Controller Menu button --> <string name="ctrl_target_menu">Menú</string> <string name="ctrl_target_up">Cruceta arriba</string> <string name="ctrl_target_down">Cruceta abajo</string> <string name="ctrl_target_left">Cruceta izquierda</string> <string name="ctrl_target_right">Cruceta derecha</string> - - <!-- The on-screen button is not shown --> <string name="ctrl_target_hidden">Oculto</string> <string name="ctrl_editor_drag">Arrastra para mover</string> <string name="ctrl_editor_snap">Ajustar</string> <string name="ctrl_editor_save">Guardar</string> - - <!-- What the second screen shows during a session --> <string name="second_mode_none">Nada</string> <string name="second_mode_keyboard_trackpad">Teclado + trackpad</string> <string name="second_mode_terminal">Terminal</string> <string name="second_mode_deck_controls">Agarres de Deck + trackpads</string> - <!-- Runtime, updates and setup helpers --> - - <!-- Linux runtime install / removal (LinuxRuntimeInstaller, RuntimeInstallService) --> <string name="rtinst_removing">Eliminando el runtime de Linux</string> <plurals name="rtinst_removing_entries"> <item quantity="one">Eliminando el runtime de Linux · %1$d elemento</item> @@ -1632,75 +1603,47 @@ <string name="rtinst_title_installing">Instalando el runtime de Linux</string> <string name="rtinst_title_removing">Eliminando el runtime de Linux</string> - <!-- Hosted desktop and emulator packages (DesktopCatalog) --> <string name="deskpkg_runtime_missing">El runtime de Linux no está instalado</string> - - <!-- %1$s: package name --> <string name="deskpkg_no_checksum">El catálogo no tiene suma de verificación para %1$s</string> <string name="deskpkg_checksum_mismatch">La suma de verificación no coincide - no se cambió nada</string> - - <!-- %1$s: package name --> <string name="deskpkg_installing">Instalando %1$s</string> <string name="deskpkg_place_failed">No se pudo colocar el AppImage</string> <string name="deskpkg_extract_failed">La extracción falló</string> <string name="deskpkg_install_failed">La instalación falló</string> - <!-- Flatpak store operations (FlatpakManager) --> <string name="flatpakmgr_setup_failed">La configuración de Flatpak falló (salida %1$d)</string> <string name="flatpakmgr_setup_unfinished">La configuración de Flatpak no terminó</string> <string name="flatpakmgr_busy">Hay otra tarea de la tienda en curso</string> <string name="flatpakmgr_not_ready">Configura Flatpak primero</string> <string name="flatpakmgr_starting">Iniciando</string> <string name="flatpakmgr_exit_status">Flatpak terminó con el código %1$d</string> - - <!-- %1$s: an app or runtime name, e.g. "SuperTux" or "GNOME runtime 50" --> <string name="flatpakmgr_installing">Instalando %1$s</string> <string name="flatpakmgr_updating">Actualizando %1$s</string> <string name="flatpakmgr_removing">Quitando %1$s</string> - - <!-- %1$s: an app or runtime name; %2$d of %3$d: this step and the number of steps --> <string name="flatpakmgr_installing_step">Instalando %1$s (%2$d/%3$d)</string> <string name="flatpakmgr_updating_step">Actualizando %1$s (%2$d/%3$d)</string> <string name="flatpakmgr_removing_step">Quitando %1$s (%2$d/%3$d)</string> - - <!-- Names for Flatpak runtime parts, shown inside "Installing %1$s" --> <string name="flatpakmgr_ref_translations">traducciones</string> <string name="flatpakmgr_ref_graphics_drivers">controladores gráficos</string> <string name="flatpakmgr_ref_media_codecs">códecs multimedia</string> - - <!-- %1$s: runtime vendor, e.g. GNOME, KDE, Freedesktop --> <string name="flatpakmgr_ref_runtime">runtime de %1$s</string> - - <!-- %1$s: runtime vendor, e.g. GNOME; %2$s: its version, e.g. 50 --> <string name="flatpakmgr_ref_runtime_branch">runtime de %1$s %2$s</string> - <!-- Imported AppImages (AppImageManager) --> <string name="appimg_too_small">El archivo es demasiado pequeño para ser un AppImage</string> - - <!-- %1$s: the system's reason --> <string name="appimg_unreadable">No se puede leer el archivo: %1$s</string> <string name="appimg_not_linux">Esto no es un AppImage (no es un programa de Linux)</string> <string name="appimg_wrong_arch">Este AppImage no está hecho ni para ARM64 (aarch64) ni para PC x86</string> <string name="appimg_not_appimage">Es un programa de Linux, pero no un AppImage</string> <string name="appimg_wrong_type">Solo se pueden importar AppImages de tipo 2 (este es de tipo %1$d)</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_import">No hay espacio libre suficiente: importarlo necesita unos %1$s</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_update">No hay espacio libre suficiente: actualizarlo necesita unos %1$s</string> <string name="appimg_import_failed">La importación falló</string> <string name="appimg_gone">Ese AppImage ya no está</string> <string name="appimg_update_failed">La actualización falló</string> - - <!-- %1$s: file name --> <string name="appimg_extracting">Extrayendo %1$s</string> <string name="appimg_extract_failed">No se pudo extraer el AppImage</string> - - <!-- %1$s: the last line the extractor printed --> <string name="appimg_extract_failed_detail">No se pudo extraer el AppImage: %1$s</string> - <!-- Decky Loader and plugin installs (DeckyManager) --> <string name="deckymgr_stop_session_loader">Detén la sesión activa antes de instalar Decky Loader</string> <string name="deckymgr_download_failed">Falló la descarga de Decky Loader</string> <string name="deckymgr_size_mismatch">El tamaño de Decky Loader no coincide con los metadatos de la versión</string> @@ -1736,27 +1679,13 @@ <string name="deckymgr_remote_entry_invalid">Entrada remote_binary no válida</string> <string name="deckymgr_remote_name_invalid">Nombre de binario remoto no válido</string> <string name="deckymgr_remote_url_https">La URL del binario remoto debe usar HTTPS</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_remote_hash_invalid">El binario remoto %1$s tiene un hash SHA-256 no válido</string> <string name="deckymgr_bin_dir_failed">No se pudo crear la carpeta bin del plugin</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_downloading_binary">Descargando el binario del plugin · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_download_failed">No se pudo descargar el binario del plugin %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_checksum_mismatch">La suma de verificación del binario del plugin no coincide · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_not_executable">No se pudo marcar como ejecutable el binario del plugin · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_replace_failed">No se pudo reemplazar el binario del plugin · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_install_failed">No se pudo instalar el binario del plugin · %1$s</string> <string name="deckymgr_folder_taken">La carpeta del plugin pertenece a otro plugin</string> <string name="deckymgr_preserve_failed">No se pudo conservar el plugin existente</string> @@ -1764,24 +1693,14 @@ <string name="deckymgr_settings_failed">No se pudieron actualizar los ajustes de plugins de Decky</string> <string name="deckymgr_restore_failed">No se pudo restaurar el plugin existente</string> - <!-- Child-process limit change over Wireless debugging (WirelessAdbFix) --> <string name="adbfix_save_failed">No se pudo guardar la identidad de la Depuración inalámbrica</string> - - <!-- %1$d: the command's exit status --> <string name="adbfix_command_failed">Falló el comando ADB (%1$d)</string> - - <!-- %1$s: what Android answered --> <string name="adbfix_not_confirmed">Android no confirmó el cambio del límite de procesos secundarios: %1$s</string> <string name="adbfix_no_pairing">No hay ninguna vinculación de Depuración inalámbrica guardada</string> <string name="adbfix_enter_address">Introduce la dirección IP y el puerto actuales de la Depuración inalámbrica</string> - <!-- Wireless debugging pairing notification (WirelessAdbPairingService) --> <string name="adbpair_timed_out">Se agotó el tiempo de espera de la ventana de vinculación. Inténtalo de nuevo desde DroidDeck.</string> - - <!-- %1$d: Android's error code --> <string name="adbpair_discovery_failed_code">No se pudo buscar la ventana de vinculación (%1$d). Comprueba que el Wi-Fi esté activado.</string> - - <!-- %1$s: the system's reason --> <string name="adbpair_discovery_failed">No se pudo buscar la ventana de vinculación: %1$s</string> <string name="adbpair_six_digits">Introduce los 6 dígitos del código</string> <string name="adbpair_pairing">Vinculando…</string> @@ -1795,31 +1714,22 @@ <string name="adbpair_title_pair">Vincular Depuración inalámbrica</string> <string name="adbpair_waiting_text">Activa la Depuración inalámbrica y toca “Vincular dispositivo con código de vinculación”.</string> <string name="adbpair_waiting_long">Activa la Depuración inalámbrica y toca “Vincular dispositivo con código de vinculación”. Quédate en Ajustes: el código se introduce en esta notificación.</string> - - <!-- Label of the notification's reply field --> <string name="adbpair_code_label">Código de vinculación de 6 dígitos</string> <string name="adbpair_code_hint">Toca Introducir código y escribe los 6 dígitos que muestra Ajustes.</string> <string name="adbpair_title_code">Introduce el código de vinculación Wi-Fi</string> <string name="adbpair_title_retry">Vuelve a probar el código</string> - - <!-- Notification action button --> <string name="adbpair_enter_code">Introducir código</string> <string name="adbpair_title_working">Preparando Steam</string> <string name="adbpair_title_done">Steam está listo</string> <string name="adbpair_done_text">Toca para volver a DroidDeck. Ya puedes desactivar la Depuración inalámbrica.</string> <string name="adbpair_title_failed">Se detuvo la configuración de la Depuración inalámbrica</string> - <!-- DroidDeck's own updates (SelfInstaller, AppUpdates) --> - <string name="selfinst_http">La descarga respondió HTTP %1$d</string> + <string name="selfinst_download_failed">Error en la descarga</string> <string name="selfinst_size_mismatch">El tamaño de la descarga no coincidía con el APK publicado y se descartó - inténtalo de nuevo</string> <string name="selfinst_checksum_mismatch">La descarga no coincidía con su suma de verificación y se descartó - inténtalo de nuevo</string> - - <!-- %1$s: the update's Android package name; %2$s: this app's --> <string name="selfinst_wrong_package">La actualización es para el paquete de Android %1$s, no %2$s</string> <string name="selfinst_metadata_signer">Los metadatos de la actualización no indican la clave de firma de publicación de DroidDeck</string> <string name="selfinst_unreadable">Android no pudo leer el APK descargado</string> - - <!-- %1$s: the APK's Android package name; %2$s: this app's --> <string name="selfinst_apk_wrong_package">El APK descargado es para %1$s, no %2$s</string> <string name="selfinst_version_mismatch">El APK descargado indica versionCode %1$d, no el %2$d publicado</string> <string name="selfinst_downgrade">Android no instalará versionCode %1$d sobre el %2$d instalado</string> @@ -1827,19 +1737,11 @@ <string name="selfinst_wrong_signer">El APK descargado no está firmado con la clave de publicación de DroidDeck</string> <string name="appupd_http">El catálogo de actualizaciones respondió HTTP %1$d</string> - <!-- Session, GPU and display --> - - <!-- Session loading screen --> <string name="loadstate_starting">Iniciando la sesión…</string> - - <!-- %1$d minutes, %2$02d seconds since the session started --> <string name="loadstate_elapsed">%1$d:%2$02d transcurridos · sigue en marcha</string> <string name="loadstate_steam_update">Descargando la actualización del cliente de Steam · %1$d%%</string> - - <!-- %1$s is the client's own download progress, as it prints it --> <string name="loadstate_steam_client">Descargando el cliente de Steam · %1$s</string> - <!-- Installing GE-Proton / proton-cachyos (%1$s is the tool's name, %2$s its release tag) --> <string name="pextra_busy">Ya se está instalando una herramienta de compatibilidad</string> <string name="pextra_stop_session">Detén la sesión activa antes de instalar herramientas de compatibilidad</string> <string name="pextra_no_release">No se encontró una versión ARM64 de %1$s</string> @@ -1856,55 +1758,38 @@ <string name="pextra_checksum_mismatch">La suma de verificación no coincide; se eliminó la descarga</string> <string name="pextra_session_started">Se inició una sesión durante la descarga; detenla antes de instalar herramientas de compatibilidad</string> <string name="pextra_installing">Instalando %1$s</string> - - <!-- %2$d is the installer's exit status --> <string name="pextra_install_failed">Falló la instalación de %1$s (salida %2$d)</string> <string name="pextra_could_not_install">No se pudo instalar %1$s</string> <string name="esync_fetching">Descargando el paquete droiddeck-esync</string> - <!-- Components (FEX / DXVK / VKD3D-Proton swapped into a Proton). %1$s component, %2$s version, %3$s Proton --> <string name="cmgr_fex_linux_helpers">con auxiliares de Linux</string> <string name="cmgr_fex_dlls_only">Solo DLL</string> <string name="cmgr_original_proton_updated">Original (Proton se actualizó desde el último reemplazo)</string> <string name="cmgr_changed_outside">Cambiado fuera de Componentes</string> - - <!-- A component version that could not be found in a Proton --> <string name="cmgr_not_present">no presente</string> - - <!-- %1$s is the Proton build the original files were saved from --> <string name="cmgr_original_version">Original %1$s</string> <string name="cmgr_original_from">Original de %1$s</string> <string name="cmgr_swap_queued">%1$s %2$s entrará en %3$s cuando se cierre el juego que lo está usando.</string> <string name="cmgr_swap_done">%1$s %2$s ya está en %3$s. Se aplica la próxima vez que se inicie un juego.</string> <string name="cmgr_original_missing">Ese paquete original no está guardado</string> - - <!-- %1$s component, %2$s Proton --> <string name="cmgr_restore_queued">%1$s de %2$s volverá a su original cuando se cierre el juego que lo está usando.</string> - - <!-- %1$s component, %2$s Proton, %3$s the Proton build the original came from --> <string name="cmgr_restore_done">%1$s de %2$s restaurado desde su original de %3$s.</string> - - <!-- %1$s package file, %2$s Proton id --> <string name="cmgr_package_in_use">%1$s está en uso en %2$s. Cambia antes ese Proton a otra cosa.</string> <string name="cmgr_package_not_stored">%1$s no está guardado</string> <string name="cmgr_deleted">%1$s eliminado.</string> <string name="cmgr_original_kept">El original de la versión instalada se conserva: es el camino de vuelta.</string> <string name="cmgr_not_stored">No guardado</string> - - <!-- %1$s Proton build, %2$s component --> <string name="cmgr_deleted_original">Se eliminó el original de %1$s de %2$s.</string> <string name="cmgr_nightlies_only">Las descargas solo proceden de las versiones Nightlies</string> <string name="cmgr_list_predates_checksums">Esta lista de paquetes es anterior a las sumas de verificación - actualízala e inténtalo de nuevo</string> <string name="cmgr_checksum_mismatch">La suma de verificación no coincide</string> - <!-- Display choices --> <string name="sprefs_upscaler_linear">Lineal</string> <string name="sprefs_upscaler_nearest">Más cercano</string> <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (calidad)</string> <string name="sprefs_upscaler_sharpen">Solo nitidez</string> <string name="sprefs_lod_bias_auto">Auto (según el escalado)</string> - <!-- Screen effect Looks: preset names and the line under the row --> <string name="look_off_desc">Sin efectos.</string> <string name="look_game_clarity">Claridad</string> <string name="look_game_clarity_desc">Nitidez con un toque de contraste: el de todos los días.</string> @@ -1929,29 +1814,23 @@ <string name="look_anime_edge">Bordes anime</string> <string name="look_anime_edge_desc">Contornos toon más nitidez.</string> - <!-- GPU support line --> <string name="gpuinfo_not_adreno">La GPU no es Adreno</string> <string name="gpuinfo_supported">Compatible</string> <string name="gpuinfo_experimental">Experimental: sus controladores son versiones de prueba</string> <string name="gpuinfo_below_tested">Por debajo del hardware probado (Adreno 725 y posteriores): puede que no funcione</string> <string name="gpuinfo_unsupported">No compatible: DroidDeck necesita una GPU Adreno (Snapdragon)</string> - <!-- Driver downloads and imports --> <string name="turnip_rate_limited">Se alcanzó el límite de solicitudes de GitHub - inténtalo más tarde</string> <string name="turnip_github_http">GitHub respondió HTTP %1$d</string> - <string name="turnip_download_http">la descarga respondió HTTP %1$d</string> + <string name="turnip_download_failed">Error en la descarga</string> <string name="turnip_list_predates_checksums">Esta lista de controladores es anterior a las sumas de verificación - actualízala e inténtalo de nuevo</string> <string name="turnip_checksum_mismatch">La suma de verificación no coincide - se descartó la descarga</string> - - <!-- %1$s is one of the turnip_reject_* reasons --> <string name="turnip_not_adrenotools">No es un controlador de AdrenoTools: %1$s</string> <string name="turnip_reject_no_meta">no hay meta.json</string> <string name="turnip_reject_meta_unreadable">no se puede leer meta.json (%1$s)</string> <string name="turnip_reject_linux_driver">es un controlador de runtime de Linux (impórtalo en \"Controlador de runtime\")</string> <string name="turnip_reject_wayland">es un controlador de juegos para Wayland, que esta app no usa</string> <string name="turnip_reject_no_library_name">meta.json no indica ningún libraryName, así que no se pudo pasar nada a AdrenoTools</string> - - <!-- %1$s is a library file name --> <string name="turnip_reject_library_missing">meta.json indica %1$s, que no está en el zip</string> <string name="turnip_reject_not_aarch64">%1$s no es una biblioteca compartida ELF AArch64 de 64 bits</string> <string name="turnip_reject_glibc">%1$s enlaza glibc - es un Turnip \"-Linux\", que va en \"Controlador de runtime\"</string> @@ -1962,115 +1841,61 @@ <string name="bundle_entry_outside">No es un paquete de controladores: %1$s apunta fuera de él</string> <string name="bundle_too_large">No es un paquete de controladores: ocupa más de %1$d MB al descomprimirse</string> - <!-- Game storage --> <string name="gstore_sd_card">Tarjeta SD</string> - - <!-- %1$s is a size, like 12.3 GB --> <string name="gstore_folder">Carpeta</string> + <string name="logshare_chooser">Compartir registros de sesión</string> - <!-- Stands in for the Steam account name when the client did not record one --> - - <!-- Why the HDR switch is greyed out --> <string name="hdr_needs_android_10">requiere Android 10 o posterior (capas de pantalla con espacio de color)</string> <string name="hdr_none">esta pantalla no indica compatibilidad con HDR</string> - - <!-- %1$s lists HDR formats, like Dolby Vision, HDR10+ --> <string name="hdr_not_hdr10">esta pantalla admite %1$s, no HDR10</string> - <!-- Follow-up --> - - <!-- Stands in for the GPU name when the device does not report one --> <string name="gpu_this_gpu">esta GPU</string> <string name="phantom_title_on">El límite de procesos secundarios está activado</string> <string name="phantom_title_unset">El límite de procesos secundarios no está definido</string> <string name="phantom_title_unreadable">No se pudo comprobar el límite de procesos secundarios</string> <string name="phantom_title_off">El límite de procesos secundarios está desactivado</string> <string name="phantom_title_not_required">El límite de procesos secundarios no es necesario</string> - - <!-- %1$s is the sentence saying how to turn the limit off on this device --> <string name="phantom_instructions_fix">%1$s Si no es posible, conecta este dispositivo a un ordenador con ADB y ejecuta el comando de abajo. Después vuelve aquí y comprueba de nuevo.</string> <string name="phantom_instructions_off">Ya se pueden iniciar sesiones de Steam.</string> <string name="phantom_instructions_not_applicable">Esta versión de Android no usa este límite.</string> - <string name="phantom_fix_toggle">Activa “Desactivar restricciones de procesos secundarios” en Opciones de desarrollador y deja activadas las Opciones de desarrollador después.</string> + <string name="phantom_fix_toggle">Activa “Inhabilitar restricciones de procesos secundarios” en Opciones de desarrollador y deja activadas las Opciones de desarrollador después.</string> <string name="phantom_fix_no_toggle">Esta versión de Android no tiene un interruptor para ello. Usa la Depuración inalámbrica para cambiarlo desde este dispositivo.</string> <string name="upd_block_no_apk">Esta versión no tiene descarga para esta copia de DroidDeck.</string> - - <!-- %1$d is the offered build's versionCode, %2$d the installed one's --> <string name="upd_block_version_code">Android no la instalará sobre esta versión porque su versionCode %1$d es inferior al %2$d instalado.</string> <string name="upd_fail_downgrade">Android no instala una versión anterior sobre una más reciente. Quédate en esta versión hasta que el canal la alcance.</string> <string name="upd_fail_signature">Esta copia de DroidDeck está firmada de otro modo (¿una compilación local?), así que Android no la actualizará sobre la instalada.</string> <string name="upd_fail_storage">No hay espacio libre suficiente para la actualización.</string> <string name="upd_fail_aborted">Se canceló la actualización.</string> - - <!-- %1$s is Android's own (English) installer message --> <string name="upd_fail_with_message">La actualización no se instaló: %1$s</string> <string name="upd_fail_generic">La actualización no se instaló.</string> - - <!-- A save zip's layout; %1$s is the app it comes from (GameHub, Winlator) --> <string name="saves_layout_zip">zip de %1$s</string> - - <!-- A save zip whose layout is not known --> <string name="saves_zip">zip</string> - - <!-- %1$s is the game's name --> <string name="saves_not_launched">%1$s aún no se ha iniciado</string> <string name="saves_none_found">No se encontraron partidas guardadas de %1$s</string> - - <!-- %1$s is the zip's file name --> <string name="saves_not_save_zip">%1$s no tiene carpeta drive_c, así que no es un zip de partidas de GameHub ni de Winlator</string> - - <!-- %1$s is a folder path --> <string name="gstore_cannot_create">no se pueden crear carpetas en %1$s</string> <string name="gstore_cannot_write">no se puede escribir en %1$s</string> - - <!-- %1$s is a folder path, %2$s the system's error --> <string name="gstore_cannot_write_detail">no se puede escribir en %1$s (%2$s)</string> <string name="gfiles_folder_unavailable">La carpeta no está disponible</string> - - <!-- %1$s is a file name --> <string name="gfiles_name_taken">Otro archivo ya usa %1$s</string> <string name="gfiles_art_unavailable">La carpeta de imágenes no está disponible</string> <string name="gfiles_unrelated_inventory">La carpeta tiene un inventario de sincronización ajeno</string> - - <!-- %1$s is a file name --> <string name="gfiles_remove_failed">No se pudo quitar %1$s</string> <string name="gfiles_outside_folder">El archivo sale de la carpeta de exportación</string> - - <!-- A FEX build whose DLL carries no version name --> <string name="cmgr_fex_unnamed">FEX (compilación sin nombre de versión)</string> - - <!-- %1$s is a package file name --> <string name="cmgr_no_profile">no hay profile.json en %1$s</string> - - <!-- %1$s is a package file name, %2$s the type its profile.json gives --> <string name="cmgr_not_component_package">%1$s no es un paquete de componentes de Linux (tipo %2$s)</string> - - <!-- A storage volume in the second-library menu; %1$s is its name, %2$s its free space, like 12.3 GB --> <string name="gstore_volume_free">%1$s · %2$s libres</string> - - <!-- The second-library setting's value when it is automatic (short form of mode_storage_auto) --> <string name="mode_storage_auto_short">Automático</string> - - <!-- %1$s is the technical reason, kept in English --> <string name="appupd_catalog_rejected">El catálogo de actualizaciones no superó las comprobaciones (%1$s)</string> - - <!-- Label of the copied ADB command on the clipboard --> <string name="main_adb_clip_label">Ajuste de procesos secundarios de DroidDeck</string> - - <!-- Signed in, but the Steam client recorded no account name --> <string name="setup_signed_in_offline_unnamed">Sesión iniciada · modo sin conexión</string> <string name="setup_signed_in_unnamed">Sesión iniciada</string> - - <!-- Small uppercase tags beside a driver's name: where it came from --> <string name="driver_tag_bundled">INCLUIDO</string> <string name="driver_tag_downloaded">DESCARGADO</string> <string name="driver_tag_imported">IMPORTADO</string> - - <!-- The driver is one half of a bundle that sets both drivers --> <string name="driver_tag_bundle">ANDROID + LINUX</string> - - <!-- %1$s is the limit's state (e.g. Child-process limit is on), %2$s what to do, %3$s the ADB command --> <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> <string name="display_session">Pantalla de la sesión</string> <string name="display_resolution">Resolución</string> @@ -2088,6 +1913,7 @@ <string name="display_frame_rate">Velocidad de fotogramas</string> <string name="display_look_filter">%1$s Cambia el escalado a %2$s.</string> <string name="display_match_screen">Igual a la pantalla (%1$d×%2$d)</string> + <string name="display_follow_screen">Seguir la pantalla (cambia de tamaño al plegar o desplegar)</string> <string name="mode_tab_steam">Steam</string> <string name="device_info_show">Mostrar detalles del dispositivo</string> <string name="device_info_hide">Ocultar detalles del dispositivo</string> @@ -2097,6 +1923,210 @@ <string name="device_info_copied">Copiado.</string> <string name="force_ssbs_title">Forzar SSBS</string> <string name="force_ssbs_hint">Mantiene activado un ajuste de velocidad de la CPU que Wine sigue desactivando. Puede hacer más rápidos los juegos de Windows en Snapdragon 8 Elite; poco cambio en chips anteriores. Se aplica en el próximo inicio de un juego.</string> + + <string name="rail_stores">Tiendas</string> + <string name="source_steam">Steam</string> + <string name="source_added">Personalizados</string> + <string name="setup_stores">Tiendas</string> + <string name="setup_stores_open_on">Abrir una tienda en</string> + <string name="setup_stores_speed">Nivel de velocidad de descarga</string> + <string name="setup_stores_engine">Motor de las tiendas</string> + <string name="setup_stores_engine_chip_ready">● Motor listo</string> + <string name="setup_stores_engine_chip_missing">Sin compilar</string> + <string name="stores_tier_balanced">Equilibrado</string> + <string name="stores_tier_fast">Rápido</string> + <string name="stores_tier_max">Máximo</string> + <string name="stores_title">Tiendas</string> + <string name="stores_settings">Ajustes de las tiendas</string> + <string name="stores_settings_eyebrow">Ajustes</string> + <string name="stores_chip_signed_out">(sin iniciar sesión)</string> + <string name="stores_tab_store">Tienda</string> + <string name="stores_tab_installed">Instalados</string> + <string name="stores_tab_library">Biblioteca</string> + <string name="stores_tab_all">Todos</string> + <string name="stores_tab_downloads">Descargas</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Iniciar sesión</string> + <string name="stores_signout_named">%1$s · cerrar sesión</string> + <string name="stores_signout_title">¿Cerrar sesión en %1$s?</string> + <string name="stores_signout_note">Los juegos instalados se conservan. La biblioteca se vuelve a cargar cuando inicias sesión de nuevo.</string> + <string name="stores_signout_stay">Mantener la sesión</string> + <string name="stores_signout_go">Cerrar sesión</string> + <string name="stores_search_catalog">Buscar en el catálogo de %1$s…</string> + <string name="stores_search_installed">Buscar juegos instalados…</string> + <string name="stores_search_library">Buscar en tu biblioteca…</string> + <string name="stores_search_open">Buscar</string> + <string name="stores_installed_empty">Nada instalado</string> + <string name="stores_library_loading">Cargando</string> + <string name="stores_nothing_matches">No hay juegos</string> + <string name="stores_shelves_loading">Cargando la tienda…</string> + <string name="stores_amazon_no_catalog">Sin catálogo</string> + <string name="stores_shelf_new">Novedades</string> + <string name="stores_shelf_deals">Ofertas</string> + <string name="stores_shelf_free">Juegos gratis</string> + <string name="stores_shelf_trending">En tendencia</string> + <string name="stores_shelf_library">Tu biblioteca</string> + <string name="stores_play">Jugar</string> + <string name="stores_install">Instalar</string> + <string name="stores_resume_install">Reanudar instalación</string> + <string name="stores_dl_interrupted">Interrumpida</string> + <string name="stores_install_size">Instalar · %1$s</string> + <string name="stores_get_free">Obtener gratis</string> + <string name="stores_view_on">Ver en %1$s</string> + <string name="stores_buy_price">Comprar · %1$s</string> + <string name="stores_installed_chip">Instalado</string> + <string name="stores_in_library">En la biblioteca</string> + <string name="stores_free">Gratis</string> + <string name="stores_resume">Reanudar</string> + <string name="stores_refresh">Actualizar</string> + <string name="stores_sort">Ordenar</string> + <string name="stores_sort_last_played">Jugados recientemente</string> + <string name="stores_sort_recently_installed">Instalados recientemente</string> + <string name="stores_sort_title_asc">Título A–Z</string> + <string name="stores_sort_title_desc">Título Z–A</string> + <string name="stores_sort_size_desc">Tamaño: mayor</string> + <string name="stores_sort_size_asc">Tamaño: menor</string> + <string name="stores_sort_release_date">Fecha de lanzamiento</string> + <string name="stores_view_list">Vista de lista</string> + <string name="stores_view_cards">Vista de tarjetas</string> + <string name="stores_show_mature">Mostrar contenido para adultos</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Sin conexión</string> + <string name="epic_card_none">Desactivado</string> + <string name="epic_eos">Inicio de sesión de Epic (EOS)</string> + <string name="epic_offline">Iniciar sin conexión</string> + <string name="epic_resolve">Solucionar el inicio de sesión de Epic</string> + <string name="epic_client_version">Versión %1$s</string> + <string name="epic_client_no_runtime">Instala primero el runtime de Linux</string> + <string name="epic_client_checking">Comprobando la versión más reciente…</string> + <string name="epic_client_unpacking">Descomprimiendo…</string> + <string name="epic_client_unreachable">El servidor de descargas no respondió</string> + <string name="epic_client_needs_fex">Epic Games Launcher necesita FEX, que descarga Steam. Vuelve a abrir el launcher cuando Steam se haya iniciado.</string> + <string name="epic_client_download_failed">La descarga falló: %1$s</string> + <string name="epic_client_unpack_failed">No se pudo descomprimir el launcher: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher no aceptó el inicio de sesión. Vuelve a iniciarlo desde el launcher.</string> + <string name="epic_client_uninstall_body">Quita el launcher y libera su espacio. Tus juegos de Epic siguen instalados y funcionando, y el inicio de sesión se guarda para cuando lo vuelvas a instalar.</string> + <string name="epic_client_uninstall_stops">Primero se cierra la sesión en curso.</string> + <string name="epic_client_uninstalled">Epic Games Launcher desinstalado</string> + <string name="epic_client_uninstall_failed">No se pudieron quitar algunos archivos del launcher. Inténtalo de nuevo.</string> + <string name="epic_client_uninstalling">Espera a que termine de desinstalarse Epic Games Launcher</string> + <string name="store_cloud_saves">Partidas en la nube</string> + <string name="cloud_upload">Subir a la nube</string> + <string name="cloud_download">Descargar de la nube</string> + <string name="cloud_none">No hay partidas en la nube</string> + <string name="cloud_conflict">Conflicto en la nube</string> + <string name="cloud_conflict_files">Conflicto en la nube · %1$d archivos</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Conservar la de la nube</string> + <string name="cloud_keep_local">Conservar la local</string> + <string name="cloud_checking">Comprobando la nube…</string> + <string name="cloud_last_sync">Última sincronización %1$s</string> + <string name="cloud_never">Aún sin sincronizar</string> + <string name="cloud_done">%1$d archivos</string> + <string name="stores_eyebrow_installed">instalado</string> + <string name="stores_eyebrow_library">en tu biblioteca</string> + <string name="stores_eyebrow_store">tienda</string> + <string name="achievements_title">Logros</string> + <string name="achievements_count">%1$d de %2$d desbloqueados</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Desbloqueados · %1$d</string> + <string name="achievements_group_locked">Bloqueados · %1$d</string> + <string name="achievements_group_hidden">Ocultos · %1$d</string> + <string name="achievements_hidden">Logro oculto</string> + <string name="achievements_hidden_detail">Los detalles se muestran al desbloquearlo.</string> + <string name="achievements_all">Todos los logros desbloqueados</string> + <string name="achievements_reading">Leyendo…</string> + <string name="achievements_signed_out">Inicia sesión en %1$s para ver tus logros.</string> + <string name="achievements_unreachable">No se pudo conectar con %1$s. Vuelve a intentarlo cuando tengas conexión.</string> + <string name="achievements_none">%1$s no indica logros para este juego.</string> + <string name="achievements_show_all">Ver los %1$d</string> + <string name="achievements_dialog_title">Logros · %1$s</string> + <string name="stores_in_steam">✓ En Steam</string> + <string name="stores_uninstall">Desinstalar</string> + <string name="stores_uninstalling">Desinstalando…</string> + <string name="stores_uninstall_title">¿Desinstalar %1$s?</string> + <string name="stores_uninstall_body_size">Libera %1$s y lo quita de Steam.</string> + <string name="stores_uninstall_body">Elimina sus archivos y su acceso directo de Steam.</string> + <string name="stores_launch_not_registered">Steam detectará el juego la próxima vez que se inicie; ábrelo desde allí o inicia Steam ahora.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Lo elige Steam para cada juego</string> + <string name="stores_card_audio">Audio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Componentes</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motor</string> + <string name="stores_card_engine_value">%1$s · nativo</string> + <string name="stores_card_engine_java">%1$s · integrado</string> + <string name="stores_how_it_runs">Cómo se ejecuta</string> + <string name="stores_kv_fetched">Obtenido de</string> + <string name="stores_kv_fetched_value">%1$s, con tu cuenta</string> + <string name="stores_kv_installed_to">Instalado en</string> + <string name="stores_kv_installed_to_value">Almacenamiento de juegos (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Se inicia con</string> + <string name="stores_kv_launched_by_value">Steam y Proton, igual que los juegos de Steam</string> + <string name="stores_kv_launched_by_epic">Steam y Proton · inicio de sesión de Epic en cada arranque, superposición de EOS desactivada</string> + <string name="stores_kv_launched_by_amazon">Steam y Proton · variables de Amazon Games Services definidas</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">se añade a Steam al instalar (interfaz Deck + Steam Input)</string> + <string name="stores_downloads_empty">No hay descargas</string> + <string name="stores_dl_paused">En pausa</string> + <string name="stores_dl_queued">En cola</string> + <string name="stores_dl_queued_at">En cola · #%1$d</string> + <string name="stores_dl_cancelled">Cancelada</string> + <string name="stores_dl_failed">Fallida</string> + <string name="stores_dl_failed_reason">Fallida · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pausar</string> + <string name="stores_dl_resume">Reanudar</string> + <string name="stores_dl_cancel">Cancelar</string> + <string name="stores_dl_retry">Reintentar</string> + <string name="stores_dl_clear">Quitar</string> + <string name="stores_dl_clear_all">Quitar terminadas</string> + <string name="stores_stage_manifest">Manifiesto</string> + <string name="stores_stage_download">Descarga</string> + <string name="stores_stage_verify">Verificación</string> + <string name="stores_stage_install">Instalación</string> + <string name="stores_stage_done">Hecho</string> + <string name="stores_stage_checking">Comprobando</string> + <string name="stores_stage_downloading">Descargando</string> + <string name="stores_dl_cancel_confirm">¿Eliminar la descarga?</string> + <string name="stores_dl_failed_kept">Fallida · se conservan %1$s</string> + <string name="stores_stage_verifying">Verificando</string> + <string name="stores_stage_installing">Instalando</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d archivos</string> + <string name="stores_download_manager">Gestor de descargas</string> + <string name="stores_parallel">Descargas simultáneas</string> + <string name="stores_install_where">Instalar en</string> + <string name="stores_install_title">Instalar %1$s:</string> + <string name="stores_target_internal">Interno</string> + <string name="stores_target_free">%1$s libres</string> + <string name="stores_notification_channel">Descargas de la tienda</string> + <string name="stores_notification_channel_hint">Muestra el progreso de las descargas de juegos y las mantiene activas en segundo plano</string> + <string name="stores_notification_one">Descargando</string> + <string name="stores_notification_many">%1$d descargas</string> + <string name="stores_notification_waiting">Preparando…</string> + <string name="stores_notification_done_channel">Descargas de la tienda terminadas</string> + <string name="stores_notification_installed">%1$s instalado</string> + <string name="stores_notification_failed">Falló la descarga de %1$s</string> + <string name="stores_notification_delete">Eliminar</string> + <string name="stores_notification_keep">Conservar</string> + <string name="stores_login_title">Iniciar sesión en %1$s</string> + <string name="stores_login_provider_title">Inicia sesión con tu proveedor</string> + <string name="stores_login_reload">Recargar</string> + <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_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> + <string name="stores_login_error_ssl">La conexión con la página de inicio de sesión no es segura.</string> + <string name="stores_login_error_verification">No se pudo verificar el inicio de sesión. Inténtalo de nuevo.</string> + <string name="stores_login_error_generic">No se pudo iniciar sesión. Inténtalo de nuevo.</string> <string name="common_close">Cerrar</string> <string name="common_back">Atrás</string> <string name="common_edit">Editar</string> @@ -2110,6 +2140,21 @@ <string name="edit_other_exe">Otro exe…</string> <string name="edit_remove">Quitar</string> <string name="art_cover">Portada</string> + <string name="art_wide_cover">Portada ancha</string> + <string name="art_adjust_logo">Ajustar logotipo</string> + <string name="logo_pos_default">Predeterminada</string> + <string name="logo_pos_upper_left">Arriba a la izquierda</string> + <string name="logo_pos_upper_center">Arriba al centro</string> + <string name="logo_pos_center">Centro</string> + <string name="logo_pos_bottom_left">Abajo a la izquierda</string> + <string name="logo_pos_bottom_center">Abajo al centro</string> + <string name="logo_pos_position">Posición</string> + <string name="logo_pos_size">Tamaño</string> + <string name="logo_pos_save">Guardar</string> + <string name="logo_pos_reset">Volver al valor predeterminado</string> + <string name="logo_pos_hint">Se dibuja sobre el fondo del juego, igual que en Steam. La posición exacta puede variar unos píxeles.</string> + <string name="logo_pos_no_logo">Este juego aún no tiene logotipo. Elige uno en Logotipo para verlo aquí.</string> + <string name="logo_pos_failed">No se pudo guardar la posición del logotipo. Inténtalo de nuevo.</string> <string name="art_background">Fondo</string> <string name="art_logo">Logotipo</string> <string name="art_icon">Icono</string> @@ -2122,6 +2167,17 @@ <string name="art_pick_image">Elegir imagen…</string> <string name="art_pick_title">Elige una imagen: %1$s</string> <string name="art_reset">Restablecer a automático</string> + <string name="art_search_sgdb">Buscar en SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Buscar un juego</string> + <string name="art_sgdb_other_games">Otras coincidencias</string> + <string name="art_sgdb_none">No se encontró nada.</string> + <string name="art_sgdb_no_key">SteamGridDB necesita una clave de API. Añade la tuya en Configuración › Launcher.</string> + <string name="art_sgdb_bad_key">SteamGridDB no aceptó la clave de API. Compruébala en Configuración › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB está limitando las solicitudes ahora mismo. Inténtalo de nuevo en un minuto.</string> + <string name="art_sgdb_offline">No se pudo conectar con SteamGridDB. Comprueba la conexión.</string> + <string name="art_sgdb_server">SteamGridDB tuvo un problema. Inténtalo más tarde.</string> + <string name="art_sgdb_no_game">SteamGridDB no tiene ninguna coincidencia para este juego. Prueba a buscarlo.</string> <plurals name="games_added_n"> <item quantity="one">%1$d juego añadido</item> <item quantity="many">%1$d juegos añadidos</item> @@ -2132,4 +2188,725 @@ <item quantity="many">%1$d ya en Juegos</item> <item quantity="other">%1$d ya en Juegos</item> </plurals> + <string name="hop_back">B · Volver a %1$s</string> + <string name="hop_from_games">la página del juego</string> + <string name="hop_from_play">los ajustes de Jugar</string> + <string name="sheet_graphics_drivers">Controladores gráficos</string> + <string name="comp_this_proton">Este Proton</string> + <string name="comp_every_proton">Todos los Protons</string> + <string name="comp_for_every_proton">Para todos los Protons</string> + <string name="comp_available_count">Disponibles · %1$d</string> + <string name="comp_checked">Comprobado %1$s</string> + <string name="comp_check_all">Buscar componentes y controladores nuevos</string> + <string name="comp_get">Obtener</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton y FEX de abajo son de este Proton</string> + <string name="comp_device_tested">%1$s · probado</string> + <string name="comp_device_untested">%1$s · sin probar</string> + <string name="comp_device_unsupported">%1$s · no compatible</string> + <string name="gpu_auto_keeps">Mantiene actualizado el par recomendado</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Controladores de runtime y de pantalla por separado</string> + <string name="gpu_use_title">¿Usar %1$s?</string> + <string name="gpu_mode_title">Cómo se eligen los controladores</string> + <string name="gpu_mode_auto_detail">La mejor pareja para esta GPU, siempre al día</string> + <string name="gpu_mode_pair">Pareja combinada</string> + <string name="gpu_mode_pair_detail">Elige una pareja; define ambos controladores</string> + <string name="gpu_mode_mix">Combinar libremente</string> + <string name="gpu_mode_mix_detail">Elige pantalla y runtime por separado</string> + <string name="gpu_mode_pair_short">Pareja</string> + <string name="gpu_mode_mix_short">Mixto</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAREJA</string> + <string name="gpu_src_bundle">PAQUETE</string> + <string name="gpu_src_chosen">ELEGIDO</string> + <string name="gpu_src_by_gpu">POR GPU</string> + <string name="gpu_src_default">PREDETERMINADO</string> + <string name="gpu_display_live">Dibujando ahora</string> + <string name="gpu_display_pending">Reinicio pendiente · %1$s dibuja hasta entonces</string> + <string name="gpu_runtime_live">En ejecución</string> + <string name="gpu_runtime_pending">Próxima sesión · esta sesión mantiene %1$s</string> + <string name="gpu_display_next">Dibuja la pantalla. Se aplica desde la próxima sesión.</string> + <string name="gpu_previous_driver">el controlador anterior</string> + <string name="gpu_restart_banner">Reinicia para cambiar el controlador de pantalla.</string> + <string name="gpu_restart_blocked">Detén la sesión en curso y luego reinicia DroidDeck para cambiar el controlador de pantalla.</string> + <string name="gpu_restart_now">Reiniciar ahora</string> + <string name="gpu_restart_later">Más tarde</string> + <string name="gpu_auto_title">Auto eligió esta pareja para tu %1$s</string> + <string name="gpu_auto_builtin_title">Auto usa los controladores integrados para tu %1$s</string> + <string name="gpu_auto_reason">Elegida para la familia %1$s. Las versiones nuevas se instalan en segundo plano.</string> + <string name="gpu_pair_title">Elige una pareja</string> + <string name="gpu_pair_hint">Una pareja define juntos el controlador de pantalla y el de runtime.</string> + <string name="gpu_mix_title">Elige cada controlador</string> + <string name="gpu_mix_hint">Un paquete rellena ambos huecos. Los cambios de pantalla se aplican tras reiniciar; los de runtime, en la próxima sesión.</string> + <string name="gpu_change_display">Cambiar controlador de pantalla</string> + <string name="gpu_change_runtime">Cambiar controlador de runtime</string> + <string name="gpu_autos_pick">ELECCIÓN DE AUTO</string> + <string name="gpu_installed">Instalado</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · reinicia para aplicar</string> + <string name="gpu_chip_restart">%1$s · reinicio pendiente</string> + <string name="comp_this_device">Este dispositivo</string> + <string name="proton_remove_title">¿Quitar %1$s?</string> + <string name="setup_tab_diagnostics">Diagnóstico</string> + <string name="setup_ready">Listo para jugar</string> + <string name="setup_not_ready">Aún no está listo para jugar</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">límite de procesos desactivado</string> + <string name="setup_ready_signed_in">sesión iniciada como %1$s</string> + <string name="setup_needs_you">Cuando algo requiera tu atención</string> + <string name="setup_group_look">Aspecto</string> + <string name="setup_group_device">Este dispositivo</string> + <string name="setup_group_art">Ilustraciones de la biblioteca</string> + <string name="setup_group_download">Descargas</string> + <string name="setup_download_source">Origen</string> + <string name="setup_download_source_auto">Automático</string> + <string name="setup_download_source_direct">Directo</string> + <string name="setup_download_source_mirror">Espejo</string> + <string name="setup_download_source_custom">Prefijo propio</string> + <string name="setup_download_mirror">Sitio</string> + <string name="setup_download_prefix">Prefijo</string> + <string name="flathub_eyebrow">APPS DE LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Apps para el escritorio de Linux, que se abren desde Escritorio.</string> + <string name="flathub_setup">Configurar Flathub</string> + <string name="flathub_remove_title">¿Quitar %1$s?</string> + <string name="flathub_remove_note">Se conservan sus ajustes y archivos.</string> + <string name="flathub_keep">Conservar</string> + <string name="desktop_size">Tamaño en disco</string> + <string name="desktop_uninstall_title">¿Desinstalar el escritorio?</string> + <string name="desktop_all_systems">Todos</string> + <string name="gog_achievements">Logros de GOG</string> + <string name="gog_achievements_hint">Sincroniza los logros de los juegos de GOG compatibles. Se aplica en el próximo inicio.</string> + <string name="gog_achievements_off">Logros desactivados</string> + <string name="gog_achievements_on">Logros activados</string> + <string name="gog_achievements_signin">Vuelve a iniciar sesión en GOG</string> + <string name="gog_achievements_uploaded">Logros subidos</string> + <string name="gog_achievements_pending">Subida de logro pendiente</string> + <string name="gog_achievements_enable_store">Activa los logros de GOG en los ajustes de tiendas</string> + <string name="gog_achievements_unavailable">Logros no disponibles; revisa los registros de la sesión</string> + <string name="achievement_unlocked">Logro desbloqueado</string> + <string name="touch_paste">Pegar</string> + <string name="touch_dpad">Pad direccional</string> + <string name="touch_left_stick">Stick izquierdo</string> + <string name="touch_right_stick">Stick derecho</string> + <string name="touch_menu">Menú</string> + <string name="touch_keyboard">Teclado</string> + <string name="touch_dpad_up">Pad direccional arriba</string> + <string name="touch_dpad_down">Pad direccional abajo</string> + <string name="touch_dpad_left">Pad direccional izquierda</string> + <string name="touch_dpad_right">Pad direccional derecha</string> + <string name="touch_title">Controles táctiles</string> + <string name="touch_controller">Mando táctil</string> + <string name="touch_mouse">Ratón</string> + <string name="touch_on">Activado</string> + <string name="touch_off">Desactivado</string> + <string name="touch_speed_slow">Lenta</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Rápida</string> + <string name="touch_edit_layout">Editar disposición</string> + <string name="touch_droiddeck_menu">Menú de DroidDeck</string> + <string name="touch_drag_hint">Arrastra controles a la pantalla</string> + <string name="touch_arrange">Organizar</string> + <string name="touch_discard">Descartar</string> + <string name="touch_saving">Guardando…</string> + <string name="touch_icon">Icono</string> + <string name="touch_narrower">A−</string> + <string name="touch_wider">A+</string> + <string name="touch_shorter">Al−</string> + <string name="touch_taller">Al+</string> + <string name="touch_hide">Ocultar</string> + <string name="touch_color_opacity">Color y opacidad…</string> + <string name="touch_copy_layout">Copiar esta disposición</string> + <string name="touch_layout_copied">Disposición copiada; pégala en la disposición táctil de cualquier juego</string> + <string name="touch_paste_layout">Pegar disposición copiada</string> + <string name="touch_reset_layout">Restablecer a la de Steam</string> + <string name="touch_no_binding">Este control no tiene una acción asignada en Steam para ponerle un icono</string> + <string name="touch_icon_for">Icono para %1$s</string> + <string name="touch_layout_color">Color de la disposición táctil</string> + <string name="touch_done">Hecho</string> + <string name="touch_save_failed">No se pudo guardar la disposición táctil</string> + <string name="touch_saved">Disposición táctil guardada en Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Etiqueta (opcional)</string> + <string name="touch_icons_missing">No se encontraron los iconos de Steam</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d icono de Steam</item> + <item quantity="many">%1$d iconos de Steam</item> + <item quantity="other">%1$d iconos de Steam</item> + </plurals> + <string name="touch_icon_color">Color del icono</string> + <string name="touch_button_color">Color del botón</string> + <string name="touch_no_icon">Sin icono</string> + + <string name="stores_sync_sign_in">Comprobando el inicio de sesión…</string> + <string name="stores_sync_library">Obteniendo tu biblioteca…</string> + <string name="stores_sync_game_list">Obteniendo la lista de juegos…</string> + <string name="stores_sync_details">Cargando datos de los juegos… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Sincronizando %1$d juego…</item> + <item quantity="many">Sincronizando %1$d juegos…</item> + <item quantity="other">Sincronizando %1$d juegos…</item> + </plurals> + <string name="stores_sync_progress">Sincronizando… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Obteniendo las carátulas…</string> + <string name="stores_sync_failed">Error al sincronizar</string> + <string name="stores_sync_no_games">No se encontraron juegos en tu biblioteca de %1$s</string> + <string name="stores_sync_amazon_no_answer">Amazon Games no respondió al consultar tu biblioteca: actualiza o vuelve a iniciar sesión</string> + <string name="stores_sync_gog_unreachable">No se pudo conectar con GOG</string> + <string name="stores_sync_gog_unreadable">No se pudo leer tu biblioteca de GOG</string> + <string name="stores_registering">Registrando con Steam…</string> + <string name="drawer_page_glasses">Gafas</string> + <string name="glasses_open">Gafas VITURE</string> + <string name="glasses_control">Control de las gafas</string> + <string name="glasses_driver_missing">Esta versión no incluye el controlador de estas gafas.</string> + <string name="glasses_connection_failed">No se pudo conectar con las gafas. Vuelve a conectar el cable o toca Permitir para reintentar.</string> + <string name="glasses_allow">Permitir</string> + <string name="glasses_allow_hint">Permite que DroidDeck ajuste la frecuencia de actualización, el modo 3D, el brillo, el volumen y el bloqueo solar de las gafas, y lea su seguimiento de cabeza.</string> + <string name="glasses_asking">Esperando a que lo permitas en el aviso de Android…</string> + <string name="glasses_denied">Se rechazó el control. Permítelo para cambiar los ajustes de las gafas.</string> + <string name="glasses_no_control">Estas gafas muestran el juego, pero sus ajustes no se pueden cambiar desde aquí.</string> + <string name="glasses_output">Salida</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Juego en las gafas</string> + <string name="glasses_game_on_hint">Muestra el juego solo en las gafas. Desactivado: el teléfono lo muestra y Android duplica la pantalla del teléfono.</string> + <string name="glasses_display">Pantalla</string> + <string name="glasses_refresh">Frecuencia de actualización</string> + <string name="glasses_3d">3D (lado a lado)</string> + <string name="glasses_3d_hint">Cambia las gafas inteligentes a 3D lado a lado. El seguimiento de la cabeza se controla por separado.</string> + <string name="glasses_3d_failed">No se ha confirmado la señal 3D. Inténtalo de nuevo cuando vuelva la imagen 2D.</string> + <string name="glasses_no_signal">Sin imagen: las gafas están en un modo que este teléfono no puede enviar. Mantén pulsado su botón 2D/3D o desconéctalas y vuelve a conectarlas.</string> + <string name="glasses_3d_refresh">Frecuencia en 3D</string> + <string name="glasses_auto3d">3D para juegos de RV</string> + <string name="glasses_auto3d_hint">Cambia a 3D mientras SteamVR está en marcha, y vuelve después.</string> + <string name="glasses_picture">Imagen</string> + <string name="glasses_picture_hint">Muestra automáticamente contenido plano en ambos ojos y detecta SteamVR. Seleccione Juego lado a lado para contenido SBS.</string> + <string name="glasses_picture_auto">Automático</string> + <string name="glasses_picture_screen">Pantalla virtual</string> + <string name="glasses_picture_sbs">Juego lado a lado</string> + <string name="glasses_screen_size">Ancho de la pantalla</string> + <string name="glasses_screen_distance">Distancia de la pantalla</string> + <string name="glasses_screen_next_session">El ancho y la distancia se aplican cuando un juego se muestra en las gafas como pantalla virtual.</string> + <string name="glasses_screen_no_output">Estos ajustes se aplican mientras Juego en las gafas está activado y el juego se muestra allí.</string> + <string name="glasses_screen_flat_hint">Automático mantiene este juego 2D a pantalla completa. Usa una pantalla virtual para ajustar su ancho, distancia y seguimiento de cabeza.</string> + <string name="glasses_screen_use">Usar pantalla virtual</string> + <string name="glasses_screen_direct_hint">SteamVR llena la vista. Ajuste su campo de visión en RV; el ancho y la distancia solo se aplican a una pantalla virtual.</string> + <string name="glasses_screen_sbs_hint">Los juegos lado a lado llenan cada ojo. El ancho y la distancia solo se aplican a una pantalla virtual.</string> + <string name="glasses_tracking_flat_hint">Automático mantiene este juego 2D fijo en la vista. Elige Pantalla virtual en la sección Pantalla para usar el seguimiento de cabeza.</string> + <string name="glasses_tracking_sbs_hint">El seguimiento de cabeza se aplica a una pantalla virtual o a un juego de SteamVR en marcha.</string> + <string name="glasses_hardware">Dispositivo</string> + <string name="glasses_brightness">Brillo</string> + <string name="glasses_volume">Volumen</string> + <string name="glasses_sunblock">Bloqueo solar</string> + <string name="glasses_sunblock_hint">Oscurece las lentes frontales.</string> + <string name="glasses_tracking">Seguimiento</string> + <string name="glasses_head_tracking">Seguimiento de cabeza</string> + <string name="glasses_head_tracking_hint">Los sensores de las gafas giran la pantalla virtual y SteamVR con tu cabeza.</string> + <string name="glasses_recenter">Recentrar la vista</string> + <string name="glasses_recenter_button">Volver a centrar la pantalla</string> + <string name="glasses_vr_fov">Campo de visión de SteamVR</string> + <string name="glasses_vr_fov_hint">Más bajo acerca SteamVR y llena las gafas; más alto muestra más a tu alrededor.</string> + <string name="glasses_playing">Jugando en %1$s</string> + <string name="glasses_calibration">Calibración del seguimiento</string> + <string name="glasses_calibration_hint">Reduce la deriva y alinea la referencia horizontal.</string> + <string name="glasses_calibration_saved_hint">Estas gafas usan la calibración guardada.</string> + <string name="glasses_calibration_open">Calibrar</string> + <string name="glasses_calibration_instructions">Coloca las gafas conectadas boca abajo sobre una superficie nivelada, con la montura bien apoyada. Toca Iniciar y no las muevas durante unos 8 segundos. Si se mueven, la medición vuelve a empezar. Esto corrige la deriva y la inclinación, no el rumbo.</string> + <string name="glasses_calibration_settling">Deja las gafas boca abajo y quietas. Esperando a que se estabilicen…</string> + <string name="glasses_calibration_collecting">Midiendo los sensores. Mantén las gafas quietas.</string> + <string name="glasses_calibration_moving">Se detectó movimiento. No toques las gafas; la medición se reiniciará automáticamente.</string> + <string name="glasses_calibration_turn_over">Apoya las gafas boca abajo sobre una superficie nivelada. La medición empezará cuando estén bien colocadas.</string> + <string name="glasses_calibration_complete">Calibración guardada. Ponte las gafas, mira al frente y toca Hecho para recentrar.</string> + <string name="glasses_calibration_failed">No se pudo completar la calibración. Comprueba la conexión, mantén las gafas quietas y vuelve a intentarlo. Se conserva tu calibración anterior.</string> + <string name="glasses_calibration_start">Iniciar</string> + <string name="glasses_calibration_done">Hecho</string> + <string name="glasses_calibration_reset">Restablecer calibración del seguimiento</string> + <string name="glasses_calibration_reset_hint">¿Quitar la calibración guardada y restaurar los valores predeterminados del modelo? Recentra después de volver a ponerte las gafas.</string> + <string name="glasses_calibration_reset_button">Restablecer</string> + <string name="hand_camera_group">Seguimiento de manos</string> + <string name="hand_camera_prompt_title">¿Rastrear las manos o los mandos Joy-Con con la cámara del teléfono?</string> + <string name="hand_camera_prompt_body">Sin ningún mando conectado, la cámara del teléfono rastrea tus manos en realidad virtual: pellizca con el pulgar y el índice para hacer clic, cierra la mano para agarrar y gira la palma hacia ti y pellizca para abrir el menú. Con los mandos Joy-Con emparejados, la cámara rastrea su posición mientras los mandos Joy-Con proporcionan la rotación y las entradas de los botones. Las imágenes se procesan en este dispositivo y nunca se guardan ni se envían.</string> + <string name="hand_camera_rear">Cámara trasera</string> + <string name="hand_camera_rear_hint">Recomendada. Suele ser más nítida y amplia.</string> + <string name="hand_camera_front">Cámara frontal</string> + <string name="hand_camera_front_hint">Para cuando la parte trasera del dispositivo no pueda mirar hacia ti.</string> + <string name="hand_camera_allow">Usar cámara</string> + <string name="hand_camera_not_now">Ahora no</string> + <string name="hand_camera_setting">Seguimiento de manos por cámara</string> + <string name="hand_camera_setting_hint">Usa la cámara del teléfono para gestos con las manos desnudas o para posicionar los mandos Joy-Con emparejados en realidad virtual. Los mandos Joy-Con proporcionan la rotación y las pulsaciones de los botones. Se pausa mientras las gafas inteligentes rastrean tus manos o los mandos Joy-Con. Las imágenes se procesan solo en este dispositivo.</string> + <string name="hand_camera_choice">Cámara</string> + <string name="hand_camera_access">Acceso a la cámara</string> + <string name="hand_camera_access_hint">Permite el acceso a la cámara para que el seguimiento de manos pueda empezar.</string> + <string name="hand_camera_access_denied">El acceso a la cámara está desactivado. Actívalo en los ajustes de Android.</string> + <string name="hand_camera_allow_button">Permitir</string> + <string name="hand_camera_open_settings">Abrir ajustes</string> + <string name="hand_camera_placement">Posición de la cámara</string> + <string name="hand_camera_placement_hint">Comprueba que la cámara pueda verte antes de jugar.</string> + <string name="hand_camera_check">Comprobar</string> + <string name="hand_camera_check_title">Posición de la cámara</string> + <string name="hand_camera_how_rear">Coloca el dispositivo de pie a 1,5-2 metros de distancia, a la altura del pecho, con la cámara trasera hacia ti. Luego entra en el encuadre con las manos extendidas.</string> + <string name="hand_camera_how_front">Coloca el dispositivo de pie a 1,5-2 metros de distancia, a la altura del pecho, con la pantalla hacia ti. Luego entra en el encuadre con las manos extendidas.</string> + <string name="hand_camera_starting">Iniciando la cámara…</string> + <string name="hand_camera_stand_up">El dispositivo está tumbado. Ponlo de pie para que la cámara te mire.</string> + <string name="hand_camera_upright">Pon el dispositivo más vertical para que la cámara te mire.</string> + <string name="hand_camera_not_seen">Todavía no te ve. Entra en el encuadre para que se vean tu cabeza y tus hombros.</string> + <string name="hand_camera_move_back">Aléjate un poco.</string> + <string name="hand_camera_move_closer">Acércate un poco más.</string> + <string name="hand_camera_show_hands">Muestra las dos manos donde la cámara pueda verlas.</string> + <string name="hand_camera_good">Se ve bien.</string> + <string name="hand_camera_failed">La cámara no pudo iniciarse. Cierra otras apps que la usen y vuelve a intentarlo.</string> + <string name="hand_camera_switch">Cambiar de cámara</string> + <string name="hand_camera_skip">Omitir</string> + <string name="hand_camera_done">Hecho</string> + <string name="glasses_xreal_network_missing">Esperando la conexión Ethernet por USB de las gafas. Puede que este teléfono no la ofrezca a las apps.</string> + <string name="glasses_xreal_connection_failed">La conexión con las XREAL se interrumpió o devolvió una respuesta no compatible. Reintentando…</string> + <string name="glasses_xreal_experimental">Compatibilidad experimental con las 1S. Usa el modo Follow y desactiva la estabilización en el menú de las gafas. Aún falta probar en el dispositivo las direcciones del seguimiento y los modos de pantalla.</string> + <string name="stores_fact_developer">Desarrollador</string> + <string name="stores_fact_publisher">Distribuidor</string> + <string name="stores_fact_released">Lanzamiento</string> + <string name="stores_hltb_main">Principal</string> + <string name="stores_hltb_extras">+ Extras</string> + <string name="stores_hltb_completionist">Completista</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Modo Cardboard</string> + <string name="cardboard_mode_hint">Vistas para el ojo izquierdo y el derecho para un visor de RV para móvil.</string> + <string name="cardboard_source">Imagen</string> + <string name="cardboard_source_screen">Pantalla virtual</string> + <string name="cardboard_source_sbs">3D lado a lado</string> + <string name="cardboard_viewer">Visor</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Sin lente</string> + <string name="cardboard_ipd">Distancia entre ojos</string> + <string name="cardboard_screen_width">Ancho de pantalla</string> + <string name="cardboard_screen_distance">Distancia de la pantalla</string> + <string name="cardboard_head_tracking">Seguimiento de cabeza</string> + <string name="cardboard_no_sensor">Este dispositivo no tiene sensor de rotación.</string> + <string name="cardboard_recenter">Recentrar vista</string> + <string name="cardboard_recenter_button">Recentrar</string> + <string name="cardboard_steamvr">SteamVR (experimental)</string> + <string name="cardboard_steamvr_install">Instalar</string> + <string name="cardboard_steamvr_installing">Descargando y descomprimiendo SteamVR…</string> + <string name="cardboard_steamvr_start">Iniciar</string> + <string name="cardboard_steamvr_stop">Detener</string> + <string name="cardboard_steamvr_unavailable">No disponible en esta sesión.</string> + <string name="cardboard_steamvr_failed">SteamVR no respondió; revisa el registro de la sesión.</string> + <string name="drawer_component_downloads">Descargar componentes</string> + <string name="drawer_component_downloads_hint">Las descargas se comparten con la página Componentes. Elige arriba una versión descargada para usarla al iniciar el próximo juego.</string> + <string name="drawer_component_choose_download">Elige una versión para descargar</string> + <string name="mode_client_arch">Cliente de Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnóstico de VAC</string> + <string name="setup_vac_diag_hint">Los juegos Source registran su consola (-condebug); vac.txt en los registros dice si es seguro o no</string> + <string name="load_starting_steam_x64">Iniciando Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Lo usa el cliente de Steam x86-64</string> + <string name="storage_uninstall_in_x64">Esta copia está en el cliente de Steam x86-64. Elige x86-64 en Cliente de Steam y desinstálala aquí.</string> + <string name="storage_uninstall_in_arm64">Esta copia está en el cliente de Steam ARM64. Elige ARM64 en Cliente de Steam y desinstálala aquí.</string> + <string name="mode_zram">Compresión zRAM</string> + <string name="mode_zram_hint">Mientras se ejecuta un juego, la memoria del cliente de Steam se comprime en la zram del dispositivo, lo que deja más RAM para el juego. Se aplica la próxima vez que se inicie Steam.</string> + <string name="mode_zram_unsupported">No disponible: este dispositivo no tiene swap activo, o su kernel es anterior a la 5.4.</string> + <string name="stores_storage_insufficient">No hay suficiente espacio libre: se necesitan %1$s y solo hay %2$s libres</string> + <string name="stores_storage_low">Espacio insuficiente (%1$s libres, se necesitan %2$s)</string> + <string name="stores_target_free_unknown">Espacio libre desconocido</string> + <string name="display_picture_position">Posición de la imagen</string> + <string name="display_position_top">Arriba</string> + <string name="display_position_bottom">Abajo</string> + <string name="display_position_center">Centro (predeterminado)</string> + <string name="setup_tab_storage">Almacenamiento</string> + <string name="storage_measuring">Midiendo el almacenamiento…</string> + <string name="storage_measuring_hint">La primera vez tarda unos segundos.</string> + <string name="storage_internal">Almacenamiento interno</string> + <string name="storage_used_of">%1$s de %2$s usados</string> + <string name="storage_free">%1$s libres</string> + <string name="storage_droiddeck_uses">DroidDeck usa %1$s. Medido el %2$s.</string> + <string name="storage_rescanning">midiendo de nuevo…</string> + <string name="storage_other_apps">Otras apps de Android</string> + <string name="storage_safe_now">Se puede liberar ahora</string> + <string name="storage_safe_hint">Runtimes sin usar, restos, registros antiguos</string> + <string name="storage_clean_up">Limpiar…</string> + <string name="storage_session_running">Detén la sesión para limpiar o eliminar algo. Los tamaños se siguen mostrando.</string> + <string name="storage_where">Dónde va</string> + <string name="storage_games">Juegos de Steam</string> + <string name="storage_game_data">Datos de juegos</string> + <string name="storage_game_data_hint">Prefijos %1$s · taller %2$s · shaders %3$s</string> + <string name="storage_tools">Proton y runtimes</string> + <string name="storage_tools_unused">%1$s sin usar</string> + <string name="storage_stores">GOG, Epic y otras tiendas</string> + <string name="storage_stores_hint">Desinstálalos desde Tiendas</string> + <string name="storage_desktop">Apps de escritorio</string> + <string name="storage_desktop_hint">Apps y runtimes de Flatpak</string> + <string name="storage_system">Sistema Linux y cliente de Steam</string> + <string name="storage_system_hint">Necesario para ejecutar cualquier cosa</string> + <string name="storage_app_data">Datos de DroidDeck</string> + <string name="storage_app_data_hint">Registros de sesiones antiguas %1$s · cachés · controladores</string> + <string name="storage_legend_games">Juegos</string> + <string name="storage_legend_data">Datos de juegos</string> + <string name="storage_legend_tools">Proton y runtimes</string> + <string name="storage_legend_stores">Otras tiendas</string> + <string name="storage_legend_desktop">Apps de escritorio</string> + <string name="storage_legend_system">Sistema Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Limpiar</string> + <string name="storage_clean_up_lede">Nada de aquí afecta a tus juegos instalados ni a las descargas en curso.</string> + <string name="storage_nothing_to_clean">Ahora mismo no hay nada que limpiar.</string> + <string name="storage_selected">Seleccionado: %1$s · %2$s → %3$s libres</string> + <string name="storage_cleaning">Limpiando…</string> + <string name="storage_free_button">Liberar %1$s</string> + <string name="storage_freed">Se liberaron %1$s.</string> + <string name="storage_item_runtimes">Runtimes y Proton de Steam sin usar</string> + <string name="storage_item_leftovers">Restos de juegos desinstalados</string> + <string name="storage_item_leftovers_unsure">Restos que pueden contener partidas guardadas</string> + <string name="storage_item_logs">Registros de sesiones antiguas</string> + <string name="storage_item_logs_detail">Conserva los registros de la sesión actual</string> + <string name="storage_item_custom_detail">Ningún juego lo usa. Reinstálalo desde Componentes si lo necesitas.</string> + <string name="storage_item_shaders">Cachés de shaders de juegos instalados</string> + <string name="storage_item_shaders_detail">Se reconstruyen al jugar. Los primeros minutos de cada juego vuelven a dar tirones.</string> + <string name="storage_tag_safe">Seguro</string> + <string name="storage_tag_unused">Sin usar</string> + <string name="storage_tag_stutter">Tirones</string> + <string name="storage_tag_saves">Revisar partidas</string> + <string name="storage_tag_default">Predeterminado</string> + <string name="storage_tag_required">Necesario</string> + <string name="storage_tag_not_used">Sin usar</string> + <string name="storage_back">Almacenamiento</string> + <string name="storage_games_with_data">%1$s con sus datos</string> + <string name="storage_sort_largest">Más grandes</string> + <string name="storage_sort_least_played">Menos jugados</string> + <string name="storage_sort_sd">En la tarjeta SD</string> + <string name="storage_no_games">Aquí no hay juegos.</string> + <string name="storage_played">Jugado %1$s</string> + <string name="storage_never_played">Nunca jugado</string> + <string name="storage_game_parts">Juego %1$s · datos %2$s</string> + <string name="storage_uninstall">Desinstalar</string> + <string name="storage_games_note">Desinstalar abre el diálogo de Steam para que Steam lo registre. Para mover un juego a la tarjeta SD, usa Steam › Ajustes › Almacenamiento.</string> + <string name="storage_uninstall_title">¿Desinstalar %1$s?</string> + <string name="storage_uninstall_body">Steam se abre y te pide confirmación. Esto libera los %1$s del juego. Su prefijo se queda hasta que limpies los restos, y las partidas guardadas en Steam Cloud siguen en tu cuenta.</string> + <string name="storage_open_steam">Abrir Steam</string> + <string name="storage_tools_detail">%1$s · %2$s sin usar</string> + <string name="storage_remove_unused">Quitar lo que no se usa · %1$s</string> + <string name="storage_in_use">En uso</string> + <string name="storage_not_used">Sin usar</string> + <string name="storage_remove">Quitar</string> + <string name="storage_remove_title">¿Quitar %1$s?</string> + <string name="storage_remove_body">Libera %1$s. Steam lo volverá a descargar si algún juego lo pide.</string> + <string name="storage_tool_fex_runtime">Necesario para juegos Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Lo necesitan los Proton ARM64</string> + <string name="storage_tool_redist">Instaladores de VC++ y DirectX que piden los juegos</string> + <string name="storage_tool_fex">Ejecuta juegos Linux x86</string> + <string name="storage_tool_steam">Herramienta de Steam</string> + <string name="storage_tool_old_runtime">DroidDeck ejecuta juegos sin este runtime</string> + <string name="storage_tool_x86_proton">Proton x86, que DroidDeck no puede ejecutar</string> + <string name="storage_tool_custom_default">Predeterminado para todos los juegos</string> + <string name="storage_tool_custom_unused">Ningún juego lo usa</string> + <string name="storage_tool_custom_unknown">No se pudieron leer los ajustes de Steam, así que se conserva</string> + <string name="storage_cleanup_busy">Espera a que termine la limpieza del almacenamiento</string> + <string name="storage_low_title">Solo quedan %1$s libres</string> + <string name="storage_low_body">Steam necesita espacio para actualizaciones y cachés de shaders. Por debajo de 10 GB, las actualizaciones de juegos pueden fallar a medias.</string> + <string name="storage_low_safe">Se pueden liberar %1$s sin riesgo.</string> + <string name="storage_free_up">Liberar espacio</string> + <string name="storage_play_anyway">Jugar igualmente</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d instalado</item> + <item quantity="other">%d instalados</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d en la tarjeta SD</item> + <item quantity="other">%d en la tarjeta SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d herramienta</item> + <item quantity="other">%d herramientas</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Carpetas de prefijo vacías y caché de shaders de %d juego</item> + <item quantity="other">Carpetas de prefijo vacías y cachés de shaders de %d juegos</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">El prefijo de %d juego aún contiene archivos, que pueden incluir partidas guardadas locales. Haz una copia antes si las quieres.</item> + <item quantity="other">Los prefijos de %d juegos aún contienen archivos, que pueden incluir partidas guardadas locales. Haz una copia antes si las quieres.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d juego</item> + <item quantity="other">%d juegos</item> + </plurals> + <string name="storage_tool_default_proton">Proton predeterminado de DroidDeck</string> + <string name="storage_tool_proton">Opción Proton 11 de DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Usado por %d juego</item> + <item quantity="other">Usado por %d juegos</item> + </plurals> + <string name="storage_legend_components">Componentes</string> + <string name="storage_components">Componentes</string> + <string name="storage_item_components">Componentes sin usar</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Libera %1$s. Solo restaura una versión de Proton que ya no está instalada.</string> + <string name="storage_leftovers_unchecked">Sin comprobar: no se pudo leer un manifiesto de app de Steam, así que los prefijos de juegos desinstalados se conservan hasta que se pueda.</string> + <string name="storage_failed">No se pudo terminar: %1$s</string> + <string name="storage_desktop_shared">compartidos %1$s</string> + <string name="storage_data_installed">Juegos instalados</string> + <string name="storage_data_parts">Prefijo %1$s · shaders %2$s · taller %3$s</string> + <string name="storage_clear_shaders">Borrar shaders</string> + <string name="storage_data_leftovers">Juegos desinstalados</string> + <string name="storage_steam_app">App de Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Su prefijo aún contiene archivos, que pueden incluir partidas guardadas locales</string> + <string name="storage_leftover_confirm">Elimina su prefijo de Wine y su caché de shaders (%1$s). Haz copia de las partidas que quieras antes; las de Steam Cloud siguen en tu cuenta.</string> + <string name="storage_data_other">Conservados</string> + <string name="storage_data_other_title">Juegos que no son de Steam y prefijo compartido de Steam</string> + <string name="storage_data_other_detail">Prefijos de juegos añadidos desde tiendas o a mano</string> + <string name="storage_components_packages">Paquetes descargados</string> + <string name="storage_components_originals">Originales guardados</string> + <string name="storage_components_none">No hay paquetes de componentes descargados.</string> + <string name="storage_component_in_use">Elegido para un Proton o un juego</string> + <string name="storage_component_unused">No elegido en ningún sitio</string> + <string name="storage_original_kept">Restaura el Proton instalado</string> + <string name="storage_original_old">Versión de Proton que ya no está instalada</string> + <string name="storage_tag_in_use">En uso</string> + <string name="storage_components_note">Los componentes en uso permanecen bloqueados. Elígelos en Componentes; lo que quites aquí se puede volver a descargar allí.</string> + <string name="storage_component_confirm">Libera %1$s. Los paquetes que importaste tú no se pueden volver a descargar.</string> + <string name="storage_desktop_detail">%1$s para apps de Flatpak y lo que comparten</string> + <string name="storage_desktop_apps_title">Apps</string> + <string name="storage_desktop_none">No hay apps de Flatpak instaladas.</string> + <string name="storage_desktop_shared_title">Compartido por las apps</string> + <string name="storage_desktop_runtimes">Runtimes</string> + <string name="storage_desktop_runtimes_detail">Bibliotecas sobre las que funcionan las apps; las que no se usan se van con Quitar lo que no se usa</string> + <string name="storage_desktop_cache">Almacén de descargas</string> + <string name="storage_desktop_cache_detail">Almacén de objetos y descargas en caché de Flatpak</string> + <string name="storage_desktop_prune">Quitar lo que no se usa</string> + <string name="storage_desktop_prune_body">Quita los runtimes que ninguna app instalada necesita y limpia el almacén de objetos de Flatpak. Las apps instaladas siguen funcionando.</string> + <string name="storage_flatpak_uninstall_body">Quita la app (%1$s) y cualquier runtime que no use nada más. Sus datos en tu carpeta personal se quedan.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d paquete</item> + <item quantity="other">%d paquetes</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d app</item> + <item quantity="other">%d apps</item> + </plurals> + <string name="boot_movie">Vídeo de arranque</string> + <string name="boot_movie_video">Vídeo</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps se ve más fluido pero usa más CPU mientras Steam se inicia. Un vídeo de inicio elegido en los ajustes de Steam tiene prioridad.</string> + <string name="boot_movie_sound">Sonido</string> + <string name="boot_movie_custom">Tu propio vídeo</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV o WebM. Otros formatos y archivos de más de %1$d MB se convierten a WebM 720p en el dispositivo, hasta %2$d segundos.</string> + <string name="boot_movie_import">Importar</string> + <string name="boot_movie_remove">Quitar</string> + <string name="boot_movie_pick">Elige un vídeo de arranque</string> + <string name="boot_movie_imported">%1$s es ahora el vídeo de arranque</string> + <string name="boot_movie_imported_silent">%1$s es ahora el vídeo de arranque, sin sonido</string> + <string name="boot_movie_too_long">Los vídeos que hay que convertir deben durar %1$d segundos o menos</string> + <string name="boot_movie_converting">Convirtiendo %1$d %%</string> + <string name="boot_movie_converting_started">Convirtiendo %1$s para Steam. Mantén DroidDeck abierto.</string> + <string name="boot_movie_unsupported">Este dispositivo no puede decodificar ese vídeo.</string> + <string name="boot_movie_import_failed">No se pudo importar ese vídeo</string> + <string name="glasses_experimental">Cámaras Luma Ultra — Experimental</string> + <string name="glasses_joycons">Seguimiento de posición de los Joy-Con</string> + <string name="glasses_joycons_hint">Usa las cámaras de las gafas inteligentes para posicionar tus mandos Joy-Con emparejados. La rotación y las pulsaciones de los botones provienen de los mandos Joy-Con. La posición se estima cuando tus muñecas están ocultas. Reemplaza los mandos operados con las manos desnudas y pausa el seguimiento de la cámara del teléfono. Apunta los mandos Joy-Con hacia adelante al conectar o restablecer el centro de seguimiento.</string> + <string name="glasses_joycons_requires_position">Activa primero el seguimiento de posición. Requiere mandos Joy-Con compatibles con movimiento en Android 12 o posterior. Desactivado por defecto.</string> + <string name="setup_tab_glasses">Gafas inteligentes</string> + <string name="setup_glasses_scope">La configuración de pantalla y seguimiento de cabeza se comparte entre los menús de DroidDeck, los juegos y las sesiones de escritorio.</string> + <string name="setup_glasses_connect">Conecta las gafas inteligentes para cambiar su configuración de pantalla y seguimiento. Tu configuración guardada se conserva al desconectarlas.</string> + <string name="glasses_vr">RV</string> + <string name="glasses_display_mode">Modo de visualización</string> + <string name="glasses_output_2d">Salida 2D</string> + <string name="glasses_output_3d">Salida 3D</string> + <string name="glasses_picture_group">Imagen y pantalla virtual</string> + <string name="glasses_position_group">Posición y nivel del suelo</string> + <string name="glasses_hands_group">Seguimiento de manos — Experimental</string> + <string name="glasses_tracking_status">Estado del seguimiento</string> + <string name="glasses_resolution_2d">Resolución 2D</string> + <string name="glasses_resolution_3d">Resolución 3D</string> + <string name="glasses_resolution_vr">Resolución RV</string> + <string name="glasses_resolution_auto">Automático</string> + <string name="glasses_resolution_inherit">Igual que 2D/3D</string> + <string name="glasses_resolution_hint">Resolución de salida por ojo.</string> + <string name="glasses_refresh_30_hint">Habilita el juego en gafas inteligentes para seleccionar el modo nativo de 30 Hz de la pantalla.</string> + <string name="glasses_3dof">Pantalla virtual 3DoF</string> + <string name="glasses_3dof_hint">Ancla los juegos planos frente a ti para que puedas mirar a tu alrededor. Habilita el juego en gafas inteligentes sin cambiar a 3D.</string> + <string name="glasses_screen_app_wide">El ancho y la distancia actualizan la pantalla virtual rastreada para los menús, juegos y sesiones de escritorio de DroidDeck de forma inmediata.</string> + <string name="glasses_head_tracking_spatial_vr_hint">El seguimiento posicional incluye la rotación de la cabeza en SteamVR. Para el seguimiento solo de rotación, desactive el seguimiento posicional.</string> + <string name="glasses_head_tracking_spatial_hint">Controla el movimiento de la cabeza en la pantalla virtual. El seguimiento posicional incluye la rotación de la cabeza en SteamVR.</string> + <string name="glasses_quick_actions">Acciones rápidas</string> + <string name="glasses_recenter_screen_hint">Mira hacia donde quieras que esté la pantalla y luego restablece el centro de seguimiento para ajustar su altura y dirección.</string> + <string name="glasses_recenter_joycons_button">Volver a centrar los Joy-Con</string> + <string name="phone_camera_tracking_group">Cámara del teléfono — Experimental</string> + <string name="phone_camera_tracking_setting">Rastrear manos o mandos Joy-Con</string> + <string name="glasses_6dof">Pantalla virtual 6DoF</string> + <string name="glasses_position">Seguimiento posicional — experimental</string> + <string name="glasses_position_hint">Movimiento físico en RV y alrededor de pantallas virtuales. Reiniciar el seguimiento tarda un momento.</string> + <string name="glasses_eye_height">Altura actual de los ojos sobre el suelo</string> + <string name="glasses_floor">Establecer el nivel del suelo desde la altura actual</string> + <string name="glasses_floor_set">Establecer el nivel del suelo</string> + <string name="glasses_spatial_setup">Configuración y diagnóstico de la cámara estéreo</string> + <string name="glasses_spatial_setup_hint">Comprobar la calibración de la cámara y el seguimiento de las manos antes de jugar.</string> + <string name="glasses_spatial_open">Abrir configuración</string> + <string name="glasses_hands">Mandos operados con las manos desnudas</string> + <string name="glasses_hands_hint">Usar las cámaras de las gafas inteligentes para apuntar con las manos, pellizcar para hacer clic y cerrar la mano para agarrar en RV. Los joysticks del mando se mueven y giran. Sustituye el seguimiento de posición de los Joy-Con. Puede haber retrasos o pérdida de seguimiento durante los juegos.</string> + <string name="glasses_hands_ready_hint">Habilitar el uso de mandos operados con las manos desnudas bajo las cámaras Luma Ultra en Seguimiento. Mostrar primero las manos abiertas.</string> + <string name="glasses_hands_base">Calibración compartida de Luma Ultra</string> + <string name="glasses_hands_base_hint">Usar la base compartida de Luma Ultra. Calibra tus gafas inteligentes para verificar su precisión.</string> + <string name="glasses_hands_calibration_verified">Calibración medida verificada</string> + <string name="glasses_hands_calibration_required">Validación requerida</string> + <string name="glasses_hands_calibration_required_hint">Los controladores operados con las manos desnudas estarán disponibles después de que la verificación de distancia medida sea exitosa.</string> + <string name="tracking_recovery_lost">Seguimiento perdido</string> + <string name="tracking_recovery_look">Mira a tu alrededor lentamente en una habitación bien iluminada.\nMantén las cámaras de seguimiento despejadas y enfoca los muebles u otros detalles visibles.</string> + <string name="tracking_recovery_restart_help">¿Sigues estancado? En su teléfono: gafas inteligentes → Seguimiento → Abrir configuración → Mostrar diagnóstico → Reiniciar seguimiento.</string> + <string name="tracking_recovery_disconnected">Gafas inteligentes desconectadas</string> + <string name="tracking_recovery_connect">Verifique la conexión USB y vuelva a conectar las gafas inteligentes.\nAcepte el mensaje de acceso USB en su teléfono si aparece.</string> + <string name="tracking_recovery_usb_help">Una vez conectado, mire lentamente a su alrededor en una habitación bien iluminada para restablecer el seguimiento.</string> + <string name="tracking_recovery_recenter">Es necesario volver a centrar</string> + <string name="tracking_recovery_recenter_steps">El seguimiento ha vuelto a una nueva posición.\nMira hacia adelante y luego toca \"Restablecer centro de seguimiento\" en tu teléfono.</string> + <string name="tracking_recovery_recenter_help">También puedes encontrar la opción para restablecer el centro de seguimiento en las gafas inteligentes → Seguimiento → Abrir configuración. Se conserva la calibración de la cámara guardada.</string> + <string name="tracking_recovery_stabilizing">Quédate quieto por un momento</string> + <string name="tracking_recovery_hold">El restablecimiento del centro de seguimiento está en curso.\nMantén las gafas inteligentes estables mientras se estabiliza el seguimiento.</string> + <string name="tracking_recovery_automatic">Esta pantalla se cierra automáticamente cuando el seguimiento de la cabeza está listo.</string> + <string name="glasses_steady_hand_aim">Apuntar estabilizado con las manos</string> + <string name="glasses_steady_hand_aim_hint">Apunta desde tu hombro a través de tu palma. Apague para rotación controlada por la muñeca.</string> + <string name="spatial_title">Configuración espacial</string> + <string name="spatial_wait_tracking">Esperando seguimiento…</string> + <string name="spatial_cameras_description">Cámaras de seguimiento izquierda y derecha</string> + <string name="spatial_camera_sync">Sincronización de cámaras</string> + <string name="spatial_ready">Listo</string> + <string name="spatial_sync_hint">Esperando que la cámara y el seguimiento de la cabeza se alineen. Mantenga las gafas inteligentes conectadas.</string> + <string name="spatial_prepare">1. Prepare el objetivo de calibración</string> + <string name="spatial_print_actual">Imprimir en tamaño real</string> + <string name="spatial_print_hint">Cada cuadrado debe medir 30 mm (1.181 in). Monte la hoja plana sobre una superficie rígida en un área bien iluminada.</string> + <string name="spatial_print">Imprimir patrón de calibración</string> + <string name="spatial_capture_group">2. Captura diferentes vistas</string> + <string name="spatial_board_stationary">Mantener estacionario el objetivo de calibración</string> + <string name="spatial_capture_hint">Acerque, aleje y lateralmente las gafas inteligentes. Gírelos hacia la izquierda/derecha, inclínelos hacia arriba/abajo e inclínelos hacia los lados. Mantenga el objetivo de calibración en ambas cámaras y haga una pausa breve antes de cada captura.</string> + <string name="spatial_start">Iniciar nueva calibración</string> + <string name="spatial_wait_sync">Esperando sincronización de cámaras.</string> + <string name="spatial_start_hint">Inicie una nueva calibración para recopilar vistas.</string> + <string name="spatial_views_hint">Mantenga el objetivo de calibración visible en ambas vistas previas. Capture al menos 24 vistas nítidas desde diferentes ángulos.</string> + <string name="spatial_capturing">Capturando…</string> + <string name="spatial_capture">Capturar vista del objetivo de calibración</string> + <string name="spatial_alignment">Calcular la alineación de la cámara</string> + <string name="spatial_calculating">Calculando…</string> + <string name="spatial_calculate">Calcular calibración</string> + <string name="spatial_distance_group">3. Verifique la distancia</string> + <string name="spatial_distance">Distancia medida</string> + <string name="spatial_distance_hint">Comience con 12 pulgadas o 30 cm para que los marcadores impresos sean más fáciles de detectar. Elige la medida exacta que utilizarás.</string> + <string name="spatial_camera_board_distance">Cámara izquierda al centro del objetivo de calibración</string> + <string name="spatial_checking_distance">Comprobando la distancia...</string> + <string name="spatial_validate">Validar distancia</string> + <string name="spatial_diagnostics">Diagnóstico</string> + <string name="spatial_show_diagnostics">Mostrar diagnóstico</string> + <string name="spatial_diagnostics_hint">Herramientas de recuperación de seguimiento y sincronización de cámaras.</string> + <string name="spatial_camera_timing">Sincronización de la cámara</string> + <string name="spatial_hand_input">Entrada del seguimiento de manos</string> + <string name="spatial_wait_timing">Esperando la sincronización de la cámara.</string> + <string name="spatial_frames">Imágenes de la cámara</string> + <string name="spatial_gpu">Detección de manos por GPU</string> + <string name="spatial_gpu_hint">CPU es el valor predeterminado. La GPU es experimental y puede hacer que SteamVR se reinicie. Esta opción se restablece cuando se reinicia el seguimiento.</string> + <string name="spatial_lite">Detección Lite de modelos de manos.</string> + <string name="spatial_lite_hint">Utilice el detector de palma Lite y los puntos clave Lite en las manos. Compruebe la precisión de apuntar, pellizcar y agarrar. Se reinicia cuando se reinicia el seguimiento.</string> + <string name="spatial_adaptive">Frecuencia de entrada automática para seguimiento de manos</string> + <string name="spatial_adaptive_hint">Ajusta la entrada a la velocidad de procesamiento. Se reinicia cuando se reinicia el seguimiento.</string> + <string name="spatial_half_rate">Limitar la frecuencia de entrada para el seguimiento de manos</string> + <string name="spatial_half_rate_hint">Utilice la mitad de las imágenes de la cámara. Apague para comparar la frecuencia máxima. Se reinicia cuando se reinicia el seguimiento.</string> + <string name="spatial_diagnostic_capture">Captura de diagnóstico</string> + <string name="spatial_diagnostic_capture_hint">Guarde un par de imágenes estéreo localmente. Las imágenes se guardan sólo cuando se solicitan.</string> + <string name="spatial_save_frame">Guardar imagen de la cámara</string> + <string name="spatial_restart_tracking">Reiniciar seguimiento</string> + <string name="spatial_restart_hint">Úselo si el seguimiento no se recupera en un área bien iluminada. Un reinicio requiere un nuevo origen de seguimiento.</string> + <string name="spatial_restart">Reiniciar</string> + <string name="spatial_restart_title">¿Reiniciar el seguimiento?</string> + <string name="spatial_restart_confirm">Se perderán las vistas de calibración no guardadas. Mantén las gafas inteligentes quietas y restablece el centro de seguimiento cuando se restablezca el seguimiento.</string> + <string name="spatial_views_count">%1$d / 24 vistas capturadas</string> + <string name="spatial_capture_paused">Captura en pausa: %1$s</string> + <string name="spatial_measure_hint">Medida %1$s. Muestre el objetivo de calibración completo en ambas vistas previas y luego quédese quieto.</string> + <string name="spatial_timing_values">%1$.1f Hz • antigüedad de la imagen %2$.1f ms • procesamiento %3$.1f ms</string> + <string name="spatial_input_values">Límite de entrada %1$.1f Hz • %2$.0f%% de imágenes de la cámara. El seguimiento de la cabeza continúa con su frecuencia máxima.</string> + <string name="spatial_frame_counts">%1$d procesado • %2$d descartado • %3$d omitido por límite de entrada</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Calibración de Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Imprimir a 100% / Tamaño real. Cada cuadrado: 30 mm (1,181 pulgadas).</string> + <string name="spatial_print_stationary">Mantenga el objetivo de calibración plano y estacionario; mueve las gafas inteligentes entre capturas.</string> + <string name="spatial_print_check">Verificación de escala: 100 mm (3,937 in) entre marcas</string> + <string name="spatial_distance_12in">12 pulgadas (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 pulgadas)</string> + <string name="spatial_distance_20in">20 pulgadas (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 pulgadas)</string> + <string name="spatial_disabled">Deshabilitado</string> + <string name="spatial_wait_stable">Esperando seguimiento estable</string> + <string name="spatial_disconnected">Desconectado</string> + <string name="spatial_hands_off">Los controladores operados con las manos desnudas están apagados</string> + <string name="spatial_tracking_off">El seguimiento posicional está desactivado o las gafas inteligentes están desconectadas</string> + <string name="spatial_recenter_pending">Se ha solicitado el restablecimiento del centro de seguimiento; mantén las gafas quietas mientras se estabiliza el seguimiento.</string> + <string name="spatial_tracking_lost">Seguimiento perdido: frente a un área bien iluminada con detalles visibles</string> + <string name="spatial_origin_changed">El origen del seguimiento ha cambiado; pulsa el botón para restablecer el centro de seguimiento y mantén las gafas quietas.</string> + <string name="spatial_active">6DoF activo</string> + <string name="spatial_connect_hint">Conecte Luma Ultra y habilite el seguimiento posicional.</string> + <string name="spatial_validation_session">Calibración verificada para esta conexión.</string> + <string name="spatial_validation_saved">Calibración verificada y guardada.</string> + <string name="spatial_wait_cameras">Esperando cámaras estéreo</string> + <string name="spatial_wait_hands">Esperando seguimiento de manos</string> + <string name="spatial_collect_instructions">Mantenga estacionario el objetivo de calibración 5 × 7. Capture más de 24 vistas mientras mueve y gira las gafas inteligentes.</string> + <string name="spatial_capture_pending">Esperando la siguiente imagen de la cámara. Mantenga quietas las gafas inteligentes.</string> + <string name="spatial_validation_pending">Comprobación de la siguiente imagen de la cámara. Mantenga visible el objetivo de calibración completo y manténgalo quieto.</string> + <string name="spatial_start_first">Iniciar la calibración primero</string> + <string name="spatial_no_camera_frame">No llegó ninguna imagen nueva de la cámara. Verifique la conexión de las gafas inteligentes y las vistas previas de la cámara, luego vuelva a intentarlo.</string> + <string name="spatial_clock_reset">Reinicio del reloj de la cámara</string> + <string name="spatial_frame_changed">El sistema de coordenadas de seguimiento ha cambiado. Tus vistas se guardan para su recálculo. Restablece el centro de seguimiento y, a continuación, inicia una nueva configuración para capturar más vistas.</string> + <string name="spatial_device_loaded">calibración del dispositivo cargada</string> + <string name="spatial_base_loaded">Calibración de base Luma Ultra cargada</string> + <string name="spatial_calibration_needed">calibración requerida</string> + <string name="spatial_tap_start">Toque Iniciar nueva calibración primero.</string> + <string name="spatial_capture_recenter_pending">El restablecimiento del centro de seguimiento está esperando un seguimiento estable. Mantén las gafas quietas un momento.</string> + <string name="spatial_capture_recenter">El seguimiento ha cambiado. Pulsa el botón para restablecer el centro de seguimiento una vez y, a continuación, mantén las gafas quietas antes de capturar.</string> + <string name="spatial_capture_unsynchronized">Captura rechazada: el seguimiento de la cabeza no se sincronizó o cambió durante la captura. Quédate quieto y vuelve a intentarlo.</string> + <string name="spatial_align_first">Calcule la alineación de la cámara antes de verificar la distancia.</string> + <string name="spatial_processing_failed">el procesamiento de la cámara falló</string> + <string name="spatial_hand_head_changed">El seguimiento de la cabeza cambió durante la detección de manos</string> + <string name="spatial_hand_wait_sync">Esperando la sincronización de la cámara y el cabezal</string> + <string name="spatial_no_wrists">No se detectaron muñecas. Mantenga las manijas del controlador Joy-Con frente a las gafas inteligentes</string> + <string name="spatial_no_hands">No se detectaron manos. Muestre las palmas abiertas frente a las gafas inteligentes.</string> + <string name="spatial_one_camera_wrists">Muñecas visibles en una sola cámara; mantenga los identificadores de su controlador en la vista compartida</string> + <string name="spatial_one_camera_hands">Manos visibles en una sola cámara; mantenga ambas palmas en la vista compartida</string> + <string name="spatial_ambiguous_hands">Ambas cámaras ven manos, pero la coincidencia izquierda/derecha es ambigua</string> + <string name="spatial_inconsistent_depth">Se detectaron manos, pero la profundidad estéreo no es consistente</string> + <string name="spatial_rejected_wrist">Posición de la muñeca rechazada por controles estéreo o de movimiento</string> + <string name="spatial_inconsistent_palm">Se detectaron puntos estéreo, pero la geometría de la palma es inconsistente</string> + <string name="spatial_hands_need_calibration">Calibración completa y verificación de distancia para permitir que las manos</string> + <string name="spatial_hands_wait_stable">Esperando un seguimiento de cabeza estable; restablece el centro de seguimiento si se solicita.</string> + <string name="spatial_old_frame">La observación con cámara es demasiado antigua; esperando un par nuevo</string> + <string name="spatial_fit_ready">Ajustar %1$.2f px. Mida la distancia seleccionada desde la cámara izquierda hasta el centro del objetivo de calibración y luego valide.</string> + <string name="spatial_opencv_error">OpenCV no disponible: %1$s</string> + <string name="spatial_restored">%1$d vistas guardadas restauradas. Calcule la calibración para volver a intentarlo o comience un nuevo conjunto para capturar más.</string> + <string name="spatial_captured">Capturado %1$d / 24 vistas. Mantenga fijo el objetivo de calibración; Mueva las gafas inteligentes para la siguiente vista.</string> + <string name="spatial_capture_corners">Captura rechazada: %1$d / 12 esquinas requeridas visibles en ambas cámaras. Muestre más del objetivo de calibración, quédese quieto y vuelva a intentarlo.</string> + <string name="spatial_validation_error">La verificación de distancia no pudo finalizar: %1$s. Intentar otra vez.</string> + <string name="spatial_inference_error">Detección de manos no disponible: %1$s. Cambie la CPU/GPU o cambie los controladores operados con las manos desnudas para volver a intentarlo.</string> + <string name="spatial_hand_timeout">La detección de manos superó los %1$d ms; observación descartada</string> + <string name="spatial_wrists_tracked">%1$d / 2 posiciones de muñeca Joy-Con medidas por estéreo</string> + <string name="spatial_palms_tracked">Palmas seguidas: %1$d / 2; gesto de pinza listo: %2$d; agarre listo: %3$d</string> + <string name="spatial_capture_saved">Captura de diagnóstico guardada en %1$s</string> + <string name="spatial_hand_error">Seguimiento de manos detenido: %1$s</string> + <string name="spatial_stereo_loaded">Estéreo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">El seguimiento de la cabeza y el objetivo de calibración difieren en %1$s (límite de 5 cm/2 pulgadas). Mantenga fijo el objetivo de calibración y espere un seguimiento constante antes de comenzar una nueva serie. Gire e incline suavemente las gafas inteligentes; pausa antes de cada captura.</string> + <string name="spatial_need_views">Capture al menos 24 vistas variadas del objetivo de calibración estacionario.</string> + <string name="spatial_need_rotation">Gire las gafas inteligentes hacia la izquierda y hacia la derecha, e inclínelas hacia arriba y hacia abajo; el movimiento sin rotación no puede calibrar la alineación de la cámara.</string> + <string name="spatial_bad_baseline">Línea de base de cámara inverosímil</string> + <string name="spatial_need_orientations">Mueve la cabeza en orientaciones más variadas.</string> + <string name="spatial_bad_rotation">Rotación de cámara a cabezal no válida</string> + <string name="spatial_bad_alignment">La alineación entre la cámara y el cabezal es inconsistente.</string> + <string name="spatial_calibration_error">La calibración no pudo finalizar. %1$s Tus vistas capturadas se guardan.</string> + <string name="spatial_reprojection_error">El error de reproyección retenida %1$.2f px supera los 2 px. Recalibrar.</string> + <string name="spatial_distance_corners">%1$d / 24 esquinas de tablero de ajedrez detectadas en ambas cámaras. Mantenga visible el objetivo de calibración completo y manténgalo quieto. Si ya es visible, seleccione 12 pulgadas o 30 cm y mida esa distancia más cercana antes de volver a intentarlo.</string> + <string name="spatial_distance_depth">El objetivo de calibración es visible, pero su profundidad no se pudo medir de manera confiable. Mantenga las gafas inteligentes quietas y mantenga el objetivo de calibración plano y bien iluminado, luego vuelva a intentarlo.</string> + <string name="spatial_distance_invalid">La ​​medición de la cámara no fue válida. Quédate quieto y vuelve a intentarlo.</string> + <string name="spatial_distance_passed">Se pasó la verificación de distancia.</string> + <string name="spatial_distance_retry">Vuelva a verificar la distancia desde la cámara izquierda al centro del objetivo de calibración y luego vuelva a intentarlo.</string> + <string name="spatial_distance_result">Las cámaras midieron %1$s; distancia seleccionada %2$s. %3$s</string> + <string name="spatial_wait_previews">Espere las vistas previas de ambas cámaras antes de comenzar la calibración.</string> + <string name="spatial_saved_views_hint">Las vistas guardadas se pueden recalcular. Inicie una nueva calibración para capturar en el sistema de coordenadas de seguimiento actual.</string> + <string name="spatial_model_checksum_error">La suma de comprobación del modelo de mano no coincide</string> + <string name="spatial_opencv_load_error">OpenCV no se pudo cargar</string> </resources> diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml new file mode 100644 index 0000000000..7c12aaa946 --- /dev/null +++ b/app/src/main/res/values-fi/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">SteamVR:n grafiikka pysähtyi</string> + <string name="steamvr_recovery_countdown">DroidDeck käynnistyy uudelleen %1$d sekunnin kuluttua nollatakseen grafiikan ja avatakseen SteamVR:n uudelleen. Käynnissä oleva pelisi suljetaan; tallentamatonta edistymistä ei voi palauttaa.</string> + <string name="steamvr_recovery_repeated">Grafiikkavirhe palasi äskeisen uudelleenkäynnistyksen jälkeen. Automaattinen palautus on keskeytetty silmukan estämiseksi. Uudelleenkäynnistys sulkee pelisi; tallentamatonta edistymistä ei voi palauttaa.</string> + <string name="steamvr_recovery_restart">Käynnistä uudelleen</string> + <string name="steamvr_recovery_cancel">Pidä auki</string> + <string name="steamvr_recovery_restarting">Nollataan grafiikkaa ja avataan SteamVR uudelleen…</string> + <string name="steamvr_recovery_failed">DroidDeck ei pystynyt käynnistymään uudelleen automaattisesti. Sulje sovellus kokonaan ja avaa se sitten uudelleen.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Ensimmäinen käynnistys lataa Steamin. Tämä voi kestää muutaman minuutin.</item> + <item>Oletuksena sovelluksesta poistuminen keskeyttää Steamin; se jatkuu siitä mihin jäit, kun palaat takaisin.</item> + <item>Ohjaimesi näkyy Xbox 360 -ohjaimena. Muussa tapauksessa käytä näytön ohjaimia.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Ensimmäinen käynnistys määrittää työpöydän. Tämä voi kestää muutaman minuutin.</item> + <item>Oletuksena sovelluksesta poistuminen keskeyttää istunnon; se jatkuu siitä mihin jäit, kun palaat takaisin.</item> + <item>Kosketus toimii kosketuslevynä: vedä liikuttaaksesi osoitinta, napauta napsauttaaksesi.</item> + <item>Ohjaimesi näkyy Xbox 360 -ohjaimena. Muussa tapauksessa käytä näytön ohjaimia.</item> + </string-array> + <string name="session_channel">Istunto</string> + <string name="session_channel_description">Näkyy, kun Steam- tai työpöytäistunto on käynnissä</string> + <string name="session_notification">Steam on käynnissä</string> + <string name="session_notification_downloads">Steamin lataus käynnissä</string> + <string name="session_notification_paused">Istunto keskeytetty - napauta Jatka, kun olet valmis</string> + <string name="resume_session">Jatka</string> + <string name="suspend_now">Keskeytä nyt</string> + <string name="stop_session">Lopeta istunto</string> + <string name="frame_gen_title">Kehysten generointi</string> + <string name="frame_gen_hint">Valitse kehysten generoinnin tila</string> + <string name="frame_gen_off">Pois</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Mukautuva %1$d</string> + <string name="lsfg_needs_steam">Vaatii Lossless Scalingin Steamista</string> + <string name="lsfg_needs_install">Asenna Lossless Scaling Steamista tai tuo Lossless.dll</string> + <string name="lsfg_import">Tuo Lossless.dll…</string> + <string name="lsfg_using_steam">Käytössä on Steamin kopio</string> + <string name="lsfg_using_import">Käytössä on tuotu kopio</string> + <string name="lsfg_pick_title">Valitse Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll tuotu</string> + <string name="lsfg_import_unchanged">Tämä Lossless.dll on jo käytössä</string> + <string name="lsfg_import_not_owned">Lossless Scaling ei ole tämän Steam-tilin omistuksessa</string> + <string name="lsfg_import_invalid">Tämä tiedosto ei ole Lossless Scalingin Lossless.dll</string> + <string name="lsfg_import_failed">LSFG:n valmistelu tästä Lossless.dll-tiedostosta epäonnistui</string> + <string name="lsfg_problem_missing">LSFG tarvitsee Lossless Scalingin Steamista tai tuodun Lossless.dll-tiedoston</string> + <string name="lsfg_problem_failed">LSFG ei pystynyt valmistelemaan sävyttimiään Lossless.dll-tiedostosta</string> + <string name="hud_fg_unsupported">%1$s: ei tuettu</string> + <string name="hud_fg_failed">%1$s: moottori epäonnistui</string> + <string name="hud_fg_needs_lossless">%1$s: vaatii Lossless Scalingin</string> + <string name="hud_fg_starting">%1$s %2$s · käynnistyy</string> + <string name="second_library_import_hint">Lisää Steam-kirjaston ja etsii siitä Windows-pelejä. Omistetut pelit käyttävät omia Steam-merkintöjään; muista tulee Steamin ulkopuolisia pikakuvakkeita.</string> + <string name="game_env_title">Pelin ympäristö</string> + <string name="game_env_hint">Proton-pelien ympäristömuuttujat.</string> + <string name="game_env_edit">Muokkaa</string> + <string name="game_env_shared">Kaikki Proton-pelit</string> + <string name="game_env_scope">Profiili</string> + <string name="game_env_app_id">Steam-sovellustunnus</string> + <string name="game_env_open">Avaa</string> + <string name="game_env_profile">Peli %1$s</string> + <string name="game_env_add">Lisää muuttuja</string> + <string name="game_env_name">Muuttujan nimi</string> + <string name="game_env_value">Arvo</string> + <string name="game_env_save">Tallenna</string> + <string name="game_env_remove">Poista</string> + <string name="game_env_restore">Peri uudelleen</string> + <string name="game_env_reset">Tyhjennä ympäristön ohitukset</string> + <string name="game_env_unset">Poista tästä profiilista</string> + <string name="game_env_empty">Ei asetettuja muuttujia.</string> + <string name="game_env_inherited">Peritty</string> + <string name="game_env_custom">Mukautettu muuttuja</string> + <string name="game_env_error">Lataaminen tai tallentaminen epäonnistui. Tarkista vapaa tallennustila ja yritä uudelleen.</string> + <string name="game_env_invalid">Käytä kelvollista nimeä ja enintään 8192 merkin arvoa.</string> + <string name="game_env_unused">Tavallinen Proton-ajonaikainen ympäristö ei lue tätä muuttujaa.</string> + <string name="game_env_loading">Latautuu…</string> + <string name="game_env_feature">D3D12-ominaisuustason ohitus. 12_2 ilmoittaa DirectX 12 Ultimate -ominaisuudet; tukemattomat ominaisuudet voivat epäonnistua. Jätä tyhjäksi automaattista tunnistusta varten.</string> + <string name="game_env_shader">D3D12-sävytinmallin ohitus. 6_9 vaatii riittävän uuden VKD3D:n ja vastaavat GPU-ominaisuudet. Jätä tyhjäksi automaattista tunnistusta varten.</string> + <string name="game_env_cache">Pidä Mesan sävytinvälimuisti käytössä vähentääksesi toistuvaa kääntämistä. false ottaa välimuistin käyttöön.</string> + <string name="game_env_cache_size">Mesan sävytinvälimuistin enimmäiskoko, esimerkiksi 1G. Suuremmat välimuistit käyttävät enemmän tallennustilaa.</string> + <string name="game_env_vkd3d_config">VKD3D-asetukset D3D12:lle. nodxr poistaa säteenseurannan käytöstä; käytä vain peleissä, jotka sitä tarvitsevat.</string> + <string name="game_env_proton_log">Aseta arvoon 1 Proton-diagnostiikkalokia varten. Lokitus voi heikentää suorituskykyä ja käyttää tallennustilaa.</string> + <string name="game_env_wined3d">Aseta arvoon 1 käyttääksesi OpenGL-pohjaista WineD3D:tä DXVK:n sijaan D3D9–11-yhteensopivuuden testaamiseen.</string> + <string name="game_env_no_ntsync">Aseta arvoon 1 pitääksesi tämän pelin poissa ntsyncistä (droiddeck-ntsync tai ydinajuri); se käyttää droiddeck-esynciä, jos paketti on olemassa, muuten droiddeck-fsynciä.</string> + <string name="game_env_no_esync">Aseta arvoon 1 poistaaksesi droiddeck-esyncin käytöstä tälle pelille; se käyttää sen sijaan droiddeck-fsynciä, tai droiddeck-ntsynciä, jos fsync on myös pois käytöstä.</string> + <string name="game_env_no_fsync">Aseta arvoon 1 pitääksesi tämän pelin poissa droiddeck-fsyncistä; se käyttää droiddeck-esynciä, jos paketti on olemassa, muuten droiddeck-ntsynciä.</string> + <string name="game_env_fsync_first">Aseta arvoon 1 ajaaksesi tämän pelin droiddeck-fsyncillä, tai 0 asettaaksesi droiddeck-esyncin etusijalle, jos paketti sopii sen Protoniin.</string> + <string name="game_env_xalia">Aseta arvoon 0 poistaaksesi käytöstä Protonin ohjaimen navigointiavustimen tälle pelille.</string> + <string name="game_env_hud">DXVK-peittokuva D3D9–11:lle. fps näyttää ruudunpäivitysnopeuden; tyhjänä piilottaa sen.</string> + <string name="game_env_dxvk_config">DXVK-asetukset erotettuna puolipisteillä. Uudemmat versiot käyttävät dxvk.maxFrameRate-asetusta kuvanopeuden rajoittamiseen; käytä tavallisessa pelaamisessa ennemmin istunnon kuvanopeusrajoitinta.</string> + <string name="game_env_vkd3d_limit">D3D12-kuvanopeusraja. 0 poistaa rajan käytöstä.</string> + <string name="game_env_glthread">Mesan OpenGL-säikeistys. true voi auttaa CPU-rajoitteisissa OpenGL-peleissä; testaa pelikohtaisesti.</string> + <string name="sync_backend_title">Wine-synkronointi</string> + <string name="sync_backend_hint">Miten pelit pitävät säikeensä tahdissa. Tulee voimaan seuraavassa istunnossa.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">FEX-esiasetus</string> + <string name="fex_next_launch">Tulee voimaan seuraavalla pelin käynnistyksellä.</string> + <string name="game_settings_title">Pelit</string> + <string name="fex_default_label">FEXin oletukset</string> + <string name="fex_default_detail">Käyttää FEXin oletuksia.</string> + <string name="fex_stability_label">Vakaus</string> + <string name="fex_stability_detail">Turvallisimmat, hitaimmat asetukset.</string> + <string name="fex_compatibility_label">Yhteensopivuus</string> + <string name="fex_compatibility_detail">Täysi TSO ja multiblock.</string> + <string name="fex_intermediate_label">Keskitaso</string> + <string name="fex_intermediate_detail">Tasapainotettu TSO heikennetyllä x87-tarkkuudella.</string> + <string name="fex_performance_label">Suorituskyky</string> + <string name="fex_performance_detail">Kaikki TSO pois käytöstä; multiblock.</string> + <string name="fex_performance_tso_label">Suorituskyky + TSO</string> + <string name="fex_performance_tso_detail">Suorituskykyasetukset, pääasiallinen TSO käytössä.</string> + <string name="fex_extreme_label">Äärimmäinen</string> + <string name="fex_extreme_detail">Poistaa itseään muokkaavan koodin tarkistukset käytöstä. JIT-pelit ja DRM voivat hajota.</string> + <string name="fex_extreme_tso_label">Äärimmäinen + TSO</string> + <string name="fex_extreme_tso_detail">Äärimmäiset asetukset, pääasiallinen TSO käytössä.</string> + <string name="fex_extreme_gn_label">Extreme-gn</string> + <string name="fex_extreme_gn_detail">Suorituskyky TSC- ja metadatavihjeillä. Kokeile ennen Äärimmäistä.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Suorituskyky täysin koodintarkistuksin ja hypervisor-bitti piilotettuna.</string> + <string name="game_env_custom_value">Mukautettu arvo</string> + <string name="game_env_select_value">Valitse arvo</string> + <string name="user_apps_section">Emulaattorit ja sovellukset</string> + <string name="user_apps_add">Lisää</string> + <string name="user_apps_add_detail">Oma sovelluksesi tai pelisi</string> + <string name="user_apps_kind_script">Komentosarja</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Käynnistyy…</string> + <string name="user_apps_added">%1$s lisätty</string> + <string name="user_apps_removed">%1$s poistettu</string> + <string name="user_apps_back">Työpöytä</string> + <string name="user_apps_gone">Tämä sovellus on kadonnut. Valitse se uudelleen Työpöydältä.</string> + <string name="user_apps_open">Avaa %1$s</string> + <string name="user_apps_remove">Poista</string> + <string name="user_apps_remove_confirm">Paina uudelleen poistaaksesi</string> + <string name="user_apps_stop_session">Lopeta istunto poistaaksesi</string> + <string name="user_apps_script_linked">Suorittaa %1$s:n omasta kansiostaan, linkitettynä istuntoon siihen paikkaan, jossa se sijaitsee. Sovelluksen poistaminen ei koske kyseistä kansiota.</string> + <string name="user_apps_script_copied">Suorittaa %1$s:n sen kansion kopiosta DroidDeckin sisällä. Sovelluksen poistaminen poistaa kopion, ei alkuperäistä.</string> + <string name="user_apps_runtime_required">Asenna Linux-ajoympäristö ensin</string> + <string name="user_apps_file_gone">Tiedosto on kadonnut</string> + <string name="user_apps_no_space">Vapaata tilaa ei ole tarpeeksi: kansion kopioiminen vaatii %1$s</string> + <string name="user_apps_copying">Kopioidaan: %1$s</string> + <string name="user_apps_failed">Sovelluksen lisääminen epäonnistui</string> + <string name="user_apps_github_checking">Etsitään julkaisua: %1$s</string> + <string name="user_apps_github_unreachable">Julkaisujen lukeminen epäonnistui: %1$s</string> + <string name="user_apps_github_no_appimage">Yhdessäkään %1$s:n julkaisussa ei ole ARM64- tai x86_64-AppImagea</string> + <string name="user_apps_downloading">Ladataan: %1$s</string> + <string name="user_apps_download_failed">Lataus epäonnistui</string> + <string name="user_apps_update_failed">Sovelluksen päivitys epäonnistui</string> + <string name="user_apps_icon_failed">Tätä kuvaketta ei voitu lukea</string> + <string name="user_apps_saved">%1$s tallennettu</string> + <string name="user_apps_edit">Muokkaa</string> + <string name="user_apps_check_updates">Tarkista päivitykset</string> + <string name="user_apps_checking_updates">Tarkistetaan päivityksiä…</string> + <string name="user_apps_update_to">Päivitä versioon %1$s</string> + <string name="user_apps_up_to_date">Ajan tasalla · %1$s</string> + <string name="user_apps_updated">%1$s päivitetty</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Lisää sovellus</string> + <string name="add_app_tab_script">Komentosarja</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">.sh-tiedosto. Se käynnistyy omasta kansiostaan koko näytön tilassa gamescopen alla.</string> + <string name="add_app_appimage_hint">ARM64 (aarch64) -AppImage, tai x86_64-AppImage, joka suoritetaan FEXin kautta. Se puretaan Linux-ajoympäristöön kertaalleen.</string> + <string name="add_app_github_hint">Asentaa ARM64-AppImagen repositorion uusimmasta julkaisusta, tai sen x86_64-version FEXin kautta.</string> + <string name="app_fex_title">Käytä FEXiä</string> + <string name="app_fex_auto">Automaattinen</string> + <string name="app_fex_on">Päällä</string> + <string name="app_fex_off">Pois</string> + <string name="app_fex_hint">FEX suorittaa x86-Linux-ohjelmia tällä ARM64-laitteella. Automaattinen käyttää sitä, kun ohjelma on tehty x86:lle.</string> + <string name="app_fex_x86">%1$s FEXin kautta</string> + <string name="app_fex_not_ready">Tämä ohjelma on tehty %1$s-tietokoneille ja käynnistyy FEXin kautta, jota ei ole vielä määritetty. Avaa Steam kerran kirjautuneena: DroidDeck lataa sen myötä FEXin ja tarvittavan Steam Linux Runtimen, jonka jälkeen tämä avautuu.</string> + <string name="session_end_program">Tämä ohjelma</string> + <string name="session_end_fex_missing">%1$s on tehty x86-tietokoneille ja käynnistyy FEXin kautta, jota ei ole vielä asennettu. Käynnistä Steam kerran kirjautuneena ja anna sen ladata FEX ja Steam Linux Runtime, sitten käynnistä tämä uudelleen.</string> + <string name="add_app_flatpak_hint">Flathub-sovellustunnus tai sen Flathub-sivu. Flatpak otetaan käyttöön ensin, jos sitä ei ole vielä otettu.</string> + <string name="add_app_file">Tiedosto</string> + <string name="add_app_no_file">Ei valittua tiedostoa</string> + <string name="add_app_choose_file">Valitse tiedosto</string> + <string name="add_app_change_file">Vaihda</string> + <string name="add_app_pick_script">Valitse komentosarja</string> + <string name="add_app_pick_appimage">Valitse AppImage</string> + <string name="add_app_pick_icon">Valitse kuvake</string> + <string name="add_app_repository">Repositorio</string> + <string name="add_app_repository_placeholder">omistaja/repo tai github.com-linkki</string> + <string name="add_app_repository_invalid">Ei ole GitHub-repositorio</string> + <string name="add_app_flatpak_id">Sovellustunnus</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Ei ole Flathub-sovellustunnus</string> + <string name="add_app_flatpak_bundle_hint">Tai .flatpak-tiedosto sovellukselle, jota ei ole Flathubissa.</string> + <string name="add_app_pick_flatpak">Valitse .flatpak-tiedosto</string> + <string name="add_app_source">Lähde</string> + <string name="add_app_appearance">Työpöydälläsi</string> + <string name="add_app_preview_name">Uusi sovellus</string> + <string name="add_app_name">Nimi</string> + <string name="add_app_name_placeholder">Sovelluksesta</string> + <string name="add_app_icon">Kuvake</string> + <string name="add_app_icon_default">Oletuskuvake</string> + <string name="add_app_choose_icon">Valitse kuvake</string> + <string name="add_app_clear_icon">Tyhjennä</string> + <string name="add_app_icon_suggestions">Repositoriosta</string> + <string name="add_app_icon_searching">Etsitään kuvakkeita…</string> + <string name="add_app_icon_reset">Oletus</string> + <string name="edit_app_title">Muokkaa: %1$s</string> + <string name="edit_app_save">Tallenna</string> + <string name="add_app_checking_folder">Tarkistetaan kansiota…</string> + <string name="add_app_folder_linked">Sen kansio on linkitetty istuntoon: %1$s</string> + <string name="add_app_folder_copied">Sen kansio sisältää Linux-ohjelmia, joita jaettu tallennustila ei voi suorittaa, joten se kopioidaan DroidDeckiin (%1$s).</string> + <string name="add_app_confirm">Lisää</string> + <string name="add_app_cancel">Peruuta</string> + <string name="add_app_runtime_required">Asenna Linux-ajoympäristö ensin Käyttöönotto-sivulta.</string> + <string name="add_app_busy">Odota, että %1$s valmistuu.</string> + <string name="steam_compat_label">Yhteensopiva</string> + <string name="proton_compatible_note">Steamin Yhteensopivuus-valikossa merkinnällä ”%1$s” varustetuissa versioissa on DroidDeckin etuliitekorjaukset, ja pelit käynnistyvät niillä täällä. Oletus on Proton Experimental ARM64 (%1$s), tai Proton 11.0 ARM64 (%1$s) kun tuo uudempi versio on asennettu. Valven omat Proton-merkinnät, joissa ei ole merkintää, eivät voi käynnistää peliä tällä laitteella.</string> + <string name="proton_installed_compatible">Asennettu %1$s · %2$s</string> + <string name="common_cancel">Peruuta</string> + <string name="common_auto">Automaattinen</string> + <string name="common_never">Ei koskaan</string> + <string name="common_always">Aina</string> + <string name="common_uninstall">Poista asennus</string> + <string name="common_check">Tarkista</string> + <string name="common_update">Päivitä</string> + <string name="common_checking">Tarkistetaan…</string> + <string name="common_working">Käsitellään…</string> + <string name="common_forget">Unohda</string> + <string name="common_add_ellipsis">Lisää…</string> + <string name="common_use">Käytä</string> + <string name="common_applies_next_session">Tulee voimaan seuraavassa istunnossa.</string> + <string name="mode_steam_title">Steam-istunto</string> + <string name="mode_desktop_title">Työpöytäistunto</string> + <string name="mode_display">Näyttö</string> + <string name="mode_resolution">Resoluutio</string> + <string name="mode_res_720">Enintään 720p</string> + <string name="mode_res_900">Enintään 900p</string> + <string name="mode_res_1080">Enintään 1080p</string> + <string name="mode_res_native">Alkuperäinen</string> + <string name="mode_res_default">%1$s (oletus)</string> + <string name="mode_res_custom_value">Mukautettu · %1$d×%2$d</string> + <string name="mode_res_custom">Mukautettu…</string> + <string name="mode_res_note">720p voi tehdä valikoista reagoivampia.</string> + <string name="mode_ratio">Näytön kuvasuhde</string> + <string name="mode_ratio_custom">Määräytyy mukautetun resoluution mukaan.</string> + <string name="mode_ratio_auto">Automaattinen käyttää vähintään 16:9:ää.</string> + <string name="mode_fps">Kuvanopeusraja</string> + <string name="mode_fps_note">Rajoittaa koko istuntoa. Näyttö vaihtaa virkistystaajuuteen, jonka rajoitus jakaa tasan.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10-lähtö</string> + <string name="mode_hdr_unavailable">Ei käytettävissä: %1$s.</string> + <string name="mode_hdr_restart">Käynnistä sovellus uudelleen, jotta muutos tulee voimaan.</string> + <string name="mode_drivers">Ajurit</string> + <string name="mode_gpu_drivers">GPU-ajurit</string> + <string name="mode_gpu_drivers_hint">Jaettu Steamin ja Työpöydän kesken. Asetetaan Komponentit-sivulla.</string> + <string name="mode_touch_controls">Kosketus ja ohjaimet</string> + <string name="mode_touch">Kosketus</string> + <string name="mode_touch_touchpad">Kosketuslevy</string> + <string name="mode_touch_direct">Suora</string> + <string name="mode_touch_note">Automaattinen: kosketuslevy Työpöydällä, suora Steamissa.</string> + <string name="mode_osc">Näytön ohjaimet</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Automaattinen näyttää ohjaimet, kun yhtään ohjainta ei ole kytketty.</string> + <string name="osc_steam_touch">Steam-kosketus (beta)</string> + <string name="osc_style_next_session">Steamin kosketusohjaimet otetaan käyttöön seuraavassa Steam-istunnossa</string> + <string name="osc_steam_layout">Steamin kosketusasettelu</string> + <string name="osc_steam_layout_hint">Siirrä, muuta kokoa tai piilota tämän pelin kosketusohjaimet; tallennetaan Steamiin</string> + <string name="mode_controller">Ohjain</string> + <string name="mode_controller_hint">Miten Steam näkee ohjaimesi. Tulee voimaan seuraavassa istunnossa.</string> + <string name="mode_controller_deck">Steam Deck -ohjain</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Xbox 360 -ohjain</string> + <string name="mode_controller_note">Deck: pikavalikkopainike ja gyroskooppi. Steam Controller: samat, ja takapainikkeissa puristustunnistus. DualShock 4 ja DualSense: gyroskooppi, ja kosketuslevyt toimivat kosketuslevynä. Xbox 360: avaa pikavalikko Guide+A:lla.</string> + <string name="mode_back">Back</string> + <string name="back_menu_then_qam">Valikko → QAM</string> + <string name="back_qam_then_menu">QAM → Valikko</string> + <string name="mode_session">Istunto</string> + <string name="mode_suspend">Taustatoiminta</string> + <string name="mode_suspend_hint">Kun sovellus on piilossa tai näyttö sammuu.</string> + <string name="mode_suspend_manual">Manuaalinen</string> + <string name="mode_suspend_native">Natiivi</string> + <string name="mode_suspend_steam_note">Automaattinen keskeyttää ja jatkaa, kun sovellus tulee näkyviin. Natiivi valmistelee Steamin lepotilaan ensin. Manuaalinen odottaa Jatka-painiketta. Ei koskaan pitää sovelluksen aina käynnissä.</string> + <string name="mode_background_downloads">Pidä lataukset käynnissä</string> + <string name="mode_background_downloads_hint">Viivästytä taustakeskeytystä, kun Steam lataa aktiivisesti.</string> + <string name="mode_zram">zRAM-pakkaus</string> + <string name="mode_zram_hint">Pelin pyöriessä Steam-asiakkaan muisti pakataan laitteen zramiin, jolloin pelille jää enemmän RAM-muistia. Astuu voimaan, kun Steam käynnistetään seuraavan kerran.</string> + <string name="mode_zram_unsupported">Ei käytettävissä: laitteessa ei ole zramia tai swappia, tai ydin on vanhempi kuin 5.4.</string> + <string name="mode_suspend_note">Automaattinen keskeyttää taustalla ja jatkaa, kun sovellus tulee näkyviin. Manuaalinen odottaa Jatka-painiketta. Ei koskaan pitää sovelluksen aina käynnissä.</string> + <string name="mode_startup">Käynnistys</string> + <string name="mode_steam_startup">Käynnistä Steam DroidDeckin kanssa</string> + <string name="mode_steam_startup_hint">Avaa Steam-istunnon, kun DroidDeck käynnistyy.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Tarkistetaan julkaisuja…</string> + <string name="mode_decky_ready">Valmiina asentamaan %1$s.</string> + <string name="mode_decky_none">Yhteensopivaa versiota ei löytynyt. Yritä myöhemmin uudelleen.</string> + <string name="mode_decky_installed">Asennettu · %1$s</string> + <string name="mode_decky_update">Päivitys saatavilla · %1$s</string> + <string name="mode_decky_current">Ajan tasalla · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Asenna uusin</string> + <string name="mode_decky_on">Käynnistyy Steamin kanssa. Päällä ollessaan muut tämän laitteen sovellukset voivat pystyä ohjaamaan Steamia.</string> + <string name="mode_decky_off">Pois. Steamin etävianmääritysportti pysyy suljettuna.</string> + <string name="mode_decky_remove_title">Poistetaanko Decky Loader?</string> + <string name="mode_decky_remove_text">Poistaa loaderin. Laajennuksesi ja asetuksesi säilyvät.</string> + <string name="mode_client">Asiakasohjelma</string> + <string name="mode_mangoapp">Suorituskyvyn peittokuva</string> + <string name="mode_mangoapp_hint">Poista käytöstä, jos pelit kaatuvat tai näyttö mustuu Deck-tilassa. Tulee voimaan seuraavassa istunnossa.</string> + <string name="mode_steam_repair">Korjaa Steam-asiakasohjelma</string> + <string name="mode_steam_repair_hint">Lataa Steam-asiakasohjelman uudelleen, kun Steam käynnistyy seuraavan kerran. Käytä tätä, jos Steam jää lataus­näytölle. Pelit, kirjautuminen ja asetukset säilyvät.</string> + <string name="mode_steam_repair_queued">Steam-asiakasohjelma ladataan uudelleen, kun Steam käynnistyy seuraavan kerran.</string> + <string name="mode_steam_repair_button">Korjaa</string> + <string name="mode_added_art">Kuvitus</string> + <string name="mode_sgdb_key">SteamGridDB-API-avain</string> + <string name="mode_sgdb_key_yours">Oma avaimesi</string> + <string name="mode_sgdb_edit">Muokkaa…</string> + <string name="mode_added_art_hint">Täyttää puuttuvan kuvituksen Steamista ja sen jälkeen SteamGridDB:stä. Pelin kansiossa oleva oma cover.jpg, hero.jpg, logo.png tai icon.png menee näiden edelle.</string> + <string name="summary_remove_game">Poista %1$s</string> + <string name="mode_added_remove_confirm">Poistetaanko?</string> + <string name="games_add">Lisää peli</string> + <string name="games_add_title">Lisää peli:</string> + <string name="games_pick_exe_title">Valitse exe-tiedosto:</string> + <string name="games_add_unreachable">Tämä sijainti ei ole käytettävissä istunnossa</string> + <string name="mode_added_exe_check">Tarkista tämä exe-tiedosto</string> + <string name="wincomp_title">Windows-komponentit</string> + <string name="wincomp_pad_hint">LB/RB siirtyvät osioiden välillä.</string> + <string name="wincomp_card_none">Ei mitään</string> + <string name="wincomp_applies">Windows-DLL-tiedostoja, joita Proton ei sisällä, komponenttiluettelosta. Ota käyttöön ne, joita tämä peli tarvitsee: ne asennetaan pelin omaan Windows-kansioon, eivät koskaan sen tiedostoihin, ja säilyvät Protonista riippumatta.</string> + <string name="wincomp_offline">Komponenttiluetteloa ei tavoitettu. Jo ladattuja komponentteja voi silti vaihtaa.</string> + <string name="wincomp_recommended">Suositellaan tälle pelille</string> + <string name="wincomp_checking">Tarkistetaan, mitä tämä peli tarvitsee…</string> + <string name="wincomp_when_online">Käytettävissä verkkoyhteyden kanssa</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Otetaan käyttöön %1$d komponentti…</item> + <item quantity="other">Otetaan käyttöön %1$d komponenttia…</item> + </plurals> + <string name="wincomp_auto_section">Käytössä tässä pelissä</string> + <string name="wincomp_auto_steam">Steam asentaa %1$s:n %2$s:n mukana (sovellus %3$s)</string> + <string name="wincomp_auto_gog">GOGin luettelosta tälle pelille</string> + <string name="wincomp_auto_epic">Epicin vaatimuksista tälle pelille</string> + <string name="wincomp_auto_amazon">Amazonin asennusvaiheista tälle pelille</string> + <string name="wincomp_steam_by_name">Steam asentaa %1$s:n sovelluksella %2$s, nimen perusteella täsmäytettynä</string> + <string name="wincomp_suggestions">Myös listalla</string> + <string name="wincomp_suggestion_reason">%1$s listaa tämän; ei komponentti tässä</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Pelissä on mukana %1$s</string> + <string name="wincomp_found_shipped">Pelissä on %1$s (toimii usein sellaisenaan)</string> + <string name="wincomp_already_here">Jo tässä pelissä</string> + <string name="wincomp_no_recommendation">Mikään pelin kansiossa ei viittaa komponenttiin.</string> + <string name="wincomp_active">Asennettu tälle pelille (%1$d)</string> + <string name="wincomp_all">Kaikki komponentit (%1$d)</string> + <string name="wincomp_installers">Vaativat Windows-asennusohjelman (%1$d)</string> + <string name="wincomp_installers_note">Näillä on omat asennusohjelmansa, joiden sisältä ei voi purkaa pakettia, ja niiden asentamisesta ei ole vielä tallennettua tietoa. Useimmat ovat vanhoja ajoympäristöjä, joiden tilalla toimii jo Protonin sisäinen Mono; tallenteet lisätään sitä mukaa kun niitä tehdään.</string> + <string name="wincomp_show">Näytä</string> + <string name="wincomp_hide">Piilota</string> + <string name="wincomp_needs_installer">Käynnistää oman asennusohjelmansa (ei tallennetta vielä)</string> + <string name="wincomp_unsupported">Ei tueta tässä vielä</string> + <string name="wincomp_loading">Ladataan komponentteja…</string> + <string name="wincomp_failed">Asennus epäonnistui: %1$s</string> + <string name="wincomp_downloaded">Ladattu</string> + <string name="wincomp_downloading">Ladataan: %1$s</string> + <string name="wincomp_installing">Asennetaan: %1$s</string> + <string name="wincomp_reverting">Poistetaan käytöstä…</string> + <string name="wincomp_download_size">Lataus %1$s</string> + <string name="wincomp_next_launch">Tulee voimaan, kun peli käynnistyy seuraavan kerran.</string> + <string name="mode_stretch169">Venytä 16:9-pelit</string> + <string name="mode_stretch169_hint">Näytöillä, jotka ovat neliömäisempiä kuin 16:9, venyttää pelit täyttämään ruudun palkkien näyttämisen sijaan. Tulee voimaan seuraavassa istunnossa.</string> + <string name="mode_audio">Ääni</string> + <string name="mode_directaudio">DirectAudio peleille</string> + <string name="mode_directaudio_hint">Ohittaa PulseAudion pienempää viivettä varten.</string> + <string name="mode_mic">Mikrofoni</string> + <string name="mode_mic_hint">Äänichattia varten.</string> + <string name="mode_network">Verkko</string> + <string name="mode_wifi_discovery">Wi-Fi-haku</string> + <string name="mode_wifi_discovery_hint">Näytä Wi-Fi-nimet ja lähellä olevat verkot Steamissa.</string> + <string name="mode_wifi_location_off">Sijaintipalvelut ovat pois käytöstä.</string> + <string name="mode_wifi_permission_denied">Sijaintilupaa ei ole myönnetty.</string> + <string name="mode_wifi_open_settings">Avaa asetukset</string> + <string name="mode_wifi_continue">Jatka</string> + <string name="mode_wifi_explain_title">Otetaanko Wi-Fi-haku käyttöön?</string> + <string name="mode_wifi_explain_text">Android vaatii sijaintiluvan Wi-Fi-nimien lukemiseen ja lähellä olevien verkkojen löytämiseen. DroidDeck käyttää tätä oikeutta näyttääkseen nämä verkot Steamissa. Emme seuraa sijaintiasi. Internet-yhteys toimii myös ilman tätä lupaa.</string> + <string name="mode_storage">Pelien tallennustila</string> + <string name="mode_storage_auto">Automaattinen - SD-kortti, kun käytettävissä, sekä Games-kansiosi</string> + <string name="mode_storage_auto_none">Automaattinen - Games-kansiosi, sekä SD-kortti, kun käytettävissä (ei nyt käytettävissä)</string> + <string name="mode_storage_internal">Vain sisäinen</string> + <string name="mode_storage_folder">Kansio: %1$s</string> + <string name="mode_second_library">Toinen kirjasto</string> + <string name="mode_storage_note">Pelit, jotka striimaavat materiaalia SD-kortilta tai jaetulta tallennustilalta, voivat nykiä.</string> + <string name="mode_storage_diagnostics">Tallennustilan diagnostiikka</string> + <string name="mode_storage_diagnostics_hint">Tallentaa varaustulokset ja otetut tallennustilan ajoitusnäytteet Jaa lokit -toimintoon. Voi hidastaa asennuksia käytössä ollessaan. Tulee voimaan seuraavassa istunnossa.</string> + <string name="mode_choose_folder">Valitse kansio…</string> + <string name="mode_custom_res_title">Mukautettu resoluutio</string> + <string name="mode_custom_res_text">Korvaa rajan ja kuvasuhteen. Näyttöön sopimaton koko saa palkit.</string> + <string name="mode_width">Leveys</string> + <string name="mode_height">Korkeus</string> + <string name="mode_custom_res_range">Väliltä 320×240–3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d peli</item> + <item quantity="other">%1$d peliä</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Poista</string> + <string name="common_restore">Palauta</string> + <string name="common_download">Lataa</string> + <string name="common_delete_named">Poista %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Ajonaikainen ajuri</string> + <string name="comp_runtime_driver_hint">Käytössä Steamissa, peleissä ja työpöydällä. Tulee voimaan seuraavassa istunnossa.</string> + <string name="comp_import_turnip">Tuo Turnip-zip…</string> + <string name="comp_display_driver">Näyttöajuri</string> + <string name="comp_display_driver_hint">Piirtää kuvat näytölle molemmissa tiloissa. Käynnistä sovellus uudelleen ottaaksesi käyttöön.</string> + <string name="comp_import_adrenotools">Tuo AdrenoTools-zip…</string> + <string name="comp_never">ei koskaan</string> + <string name="comp_nightlies_checked">Nightlies tarkistettu %1$s</string> + <string name="comp_title">Komponentit</string> + <string name="comp_about">Tietoja komponenteista</string> + <string name="comp_check_drivers">Tarkista uudet ajurit</string> + <string name="comp_check_nightlies">Tarkista Nightlies uusien pakettien varalta</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Tässä valittu Proton käynnistää kaikki pelit, jotka eivät ole valinneet omaa Protoniaan Steamissa, ja Steamissa tehty muutos näkyy myös tässä. Steam korvaa Valven Protonin päivittäessään; alkuperäiset säilytetään versiokohtaisesti.</string> + <string name="comp_scope">Määritys</string> + <string name="comp_profile_configure">Määritä profiili</string> + <string name="comp_profile">Profiili</string> + <string name="comp_scope_general">Oletusprofiili</string> + <string name="comp_scope_general_detail">Käytetään automaattisesti peleissä, joilla ei ole ohituksia.</string> + <string name="comp_profile_game_detail">Tallennetut asetukset käytetään automaattisesti, kun %1$s käynnistyy.</string> + <string name="comp_game_hint">Valitse vain tämän pelin tarvitsemat asetukset. Kaikki muu käyttää edelleen Oletusprofiilia.</string> + <string name="comp_game_fex">FEX-esiasetus</string> + <string name="comp_game_fex_inherited">Käytössä on Oletusprofiilin esiasetus.</string> + <string name="comp_game_fex_override">Tälle pelille on tallennettu mukautettu esiasetus.</string> + <string name="comp_game_fex_custom">Mukautetut FEX-muuttujat</string> + <string name="comp_game_use_general">Käytä oletusta</string> + <string name="comp_game_compatibility">Pelin yhteensopivuus</string> + <string name="comp_game_environment_hint">Tämän pelin Proton-, DXVK-, VKD3D- ja synkronointiympäristön asetukset.</string> + <string name="comp_game_proton_inherited">Käytössä on Oletusprofiilin Proton.</string> + <string name="comp_game_proton_override">Tälle pelille on tallennettu mukautettu Proton Steamin yhteensopivuusmäärityksen kautta.</string> + <string name="comp_no_proton_short">Ei Protonia</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Käyttää Oletusprofiilin pakettia kohteesta %1$s, jollei tämä peli valitse toista pakettia.</string> + <string name="comp_game_component_general">Käyttää Oletusprofiilin komponenttipakettia.</string> + <string name="comp_game_component_override">Käyttää pakettia %1$s vain tässä pelissä.</string> + <string name="comp_game_runtime_options">Ajonaikaiset asetukset</string> + <string name="comp_game_environment_other_hint">Muut pelikohtaiset Proton-, DXVK-, VKD3D-Proton- ja synkronointiympäristön asetukset.</string> + <string name="comp_game_saved_next">%1$s:n profiili on tallennettu seuraavaa pelin käynnistystä varten.</string> + <string name="game_no_steam_title">Käynnistä ilman Steamia</string> + <string name="game_no_steam_detail">Avaa sen Protonissa/FEXissä ilman Steam-asiakasta; Steamin ominaisuudet ovat pois päältä.</string> + <string name="game_no_steam_on">Päällä</string> + <string name="game_steam_with">Käynnistyy Steamin kanssa</string> + <string name="game_steam_without">Käynnistyy ilman Steamia</string> + <string name="game_settings_card">Asetukset</string> + <string name="game_settings_menu_title">%1$s – asetukset</string> + <string name="game_settings_default">Oletus</string> + <string name="game_settings_default_detail">Palauttaa kaiken tälle pelille muutetun sovelluksen asetuksiin.</string> + <string name="game_sync_custom">Mukautetut synkronointimuuttujat</string> + <string name="comp_game_proton_live">%1$s:n Proton-valinta on tallennettu ja käytettävissä Steamissa nyt.</string> + <string name="comp_game_proton_next">%1$s:n Proton-valinta on tallennettu. Käynnistä Steam uudelleen ennen pelin käynnistämistä.</string> + <string name="comp_game_proton_not_runnable">%1$s ei voi käyttää valittua Protonia tällä laitteella.</string> + <string name="comp_game_load_failed">%1$s:n profiilin lataaminen epäonnistui: %2$s</string> + <string name="comp_game_save_failed">Pelin profiilia ei voitu tallentaa: %1$s</string> + <string name="comp_game_reset">Palauta pelin profiili</string> + <string name="comp_game_reset_title">Palautetaanko %1$s:n profiili?</string> + <string name="comp_game_reset_body">Poistetaanko tämän pelin Proton, FEX, komponenttipaketti, ympäristö, tekstuurisuodatus ja Windows-komponenttien ohitukset? Peli käyttää tämän jälkeen Oletusprofiilia.</string> + <string name="comp_game_reset_done">%1$s käyttää nyt Oletusprofiilia.</string> + <string name="comp_game_reset_failed">Pelin profiilia ei voitu palauttaa kokonaan: %1$s</string> + <string name="comp_default_live">%1$s käynnistää nyt kaikki pelit, jotka eivät ole valinneet omaa Protoniaan Steamissa.</string> + <string name="comp_default_next">%1$s käynnistää kaikki pelit, jotka eivät ole valinneet omaa Protoniaan, siitä lähtien kun Steam käynnistyy seuraavan kerran.</string> + <string name="comp_default_not_runnable">%1$s ei voi käynnistää pelejä tällä laitteella, joten se ei voi olla oletus.</string> + <string name="comp_default_failed">Oletus-Protonia ei voitu tallentaa: %1$s</string> + <string name="comp_swapped">%1$s · %2$d vaihdettu</string> + <string name="comp_all_original">%1$s · kaikki alkuperäisiä</string> + <string name="comp_game_running_suffix">%1$s · peli käynnissä</string> + <string name="comp_esync_pack">%1$s · droiddeck-esync-paketti</string> + <string name="comp_esync_wanted">%1$s · ei droiddeck-esync-pakettia vielä</string> + <string name="comp_esync_builtin">%1$s · esync sisäänrakennettu, ei pakettia tarvita</string> + <string name="comp_gpu_drivers">GPU-ajurit</string> + <string name="comp_reapplied">%1$s · otettu uudelleen käyttöön käynnistyksessä %2$s</string> + <string name="comp_next_queued">Seuraavaksi: %1$s · pelin sulkeutumisen jälkeen</string> + <string name="comp_in_use">%1$s käytössä: %2$s</string> + <string name="comp_waits">Odottaa, kunnes peli sulkeutuu</string> + <string name="comp_applies_next_game">Tulee voimaan, kun peli käynnistyy seuraavan kerran</string> + <string name="comp_import_zip">Tuo .zip</string> + <string name="comp_reading">Luetaan Protoneja…</string> + <string name="comp_no_proton">Protonia ei ole vielä asennettu. Käynnistä Steam kerran, jotta sen ARM64-Proton latautuu, tai lisää GE-Proton, CachyOS tai DroidDeck-Proton Käyttöönotto-sivulta.</string> + <string name="comp_original">Alkuperäinen · %1$s</string> + <string name="comp_this_build">%1$s · tämä versio</string> + <string name="comp_earlier_build">%1$s · aiempi versio</string> + <string name="comp_installed_count">Asennettu · %1$d</string> + <string name="comp_nothing_stored">Mitään ei ole tallennettu %1$s:lle vielä. Tämän Protonin omat tiedostot tallennetaan sen alkuperäisenä.</string> + <string name="comp_waits_long">Tällä Protonilla on peli käynnissä, joten tämä odottaa, kunnes se sulkeutuu.</string> + <string name="comp_applies_long">Tulee voimaan, kun peli käynnistyy seuraavan kerran.</string> + <string name="comp_swap_title">Vaihdetaanko %1$s?</string> + <string name="comp_swap_body">Asetetaanko %1$s kohteeseen %2$s? Sen alkuperäiset tiedostot pysyvät tallessa. %3$s</string> + <string name="comp_restore_title">Palautetaanko %1$s?</string> + <string name="comp_restore_body">Palautetaanko %1$s:n alkuperäinen kohteeseen %2$s? %3$s</string> + <string name="comp_delete_package_body">Poistaa paketin sovelluksesta. Voit latata sen uudelleen.</string> + <string name="comp_delete_original_title">Poistetaanko tämä alkuperäinen?</string> + <string name="comp_delete_original_body">Tämä %1$s:n alkuperäinen on aiemmasta %2$s-versiosta. Nykyisen version alkuperäinen säilytetään aina.</string> + <string name="comp_nightlies_count">Nightliesissä · %1$d</string> + <string name="comp_refresh_to_list">Päivitä nähdäksesi Nightliesin paketit.</string> + <string name="comp_nothing_new">Ei mitään uutta viimeisimmän tarkistuksen jälkeen.</string> + <string name="comp_import_wcp">Tuo .wcp</string> + <string name="comp_restore_original">Palauta tämän Protonin alkuperäinen</string> + <string name="comp_restore_original_body">Palautetaanko %1$s:n alkuperäinen %2$s?</string> + <string name="comp_swap">Vaihda</string> + <string name="comp_about_text">FEX, DXVK ja VKD3D-Proton kullekin Protonille, jolla Steam käynnistää pelejä.\n\nValitse asennettu rivi ottaaksesi sen käyttöön. Se tulee voimaan, kun peli käynnistyy seuraavan kerran, tai kun käynnissä oleva peli sulkeutuu.\n\nValintasi tarkistetaan uudelleen ennen jokaista käynnistystä ja palautetaan, jos jokin on muuttanut niitä. Kunkin Protonin alkuperäiset tiedostot säilytetään, niin Steamin päivitykset eivät koskaan hävitä niitä.</string> + <string name="comp_tag_original">Alkuperäinen</string> + <string name="comp_tag_in_use">Käytössä</string> + <string name="comp_tag_new">Uusi</string> + <string name="comp_tag_stored">Tallennettu</string> + <string name="perf_title">Suorituskyky</string> + <string name="perf_lede">CPU-ytimet, istunnon korjaukset ja isäntänimi. Tulee voimaan seuraavassa istunnossa.</string> + <string name="perf_client_cores_group">Steam-asiakasohjelman ytimet</string> + <string name="perf_override">Ohita Steamin ydinvalinta</string> + <string name="perf_override_hint">Kiinnittää Steamin, sen käyttöliittymäavustajan ja gamescopen alla oleviin ytimiin.</string> + <string name="perf_client_cores">Asiakasohjelman ytimet</string> + <string name="perf_client_cores_on">Ytimet Steamille.</string> + <string name="perf_client_cores_off">Ota ohitus käyttöön valitaksesi.</string> + <string name="perf_game_cores_group">Pelin ytimet</string> + <string name="perf_game_cores">Pelin ytimet</string> + <string name="perf_game_cores_hint">Ytimet peleille. Kun kaikki on valittuna, Android ajoittaa vapaasti.</string> + <string name="perf_client_ui">Asiakasohjelman käyttöliittymä</string> + <string name="perf_glthread">Säikeistetty GL</string> + <string name="perf_glthread_hint">Voi tehdä Steamin valikoista reagoivampia.</string> + <string name="perf_zink">Zink: laiskat deskriptorit</string> + <string name="perf_zink_hint">Suositellaan ajureille, joissa ei ole deskriptoripuskureita.</string> + <string name="perf_noglerror">Ohita GL-virhetarkistukset</string> + <string name="perf_noglerror_hint">Poistaa käytöstä kutsukohtaisen GL-validoinnin.</string> + <string name="perf_gsrealtime">gamescope: reaaliaikainen GPU-jono</string> + <string name="perf_gsrealtime_hint">Priorisoi kompositorin GPU-työtä. Voi tasoittaa kuvanopeuden tahditusta pelien kustannuksella.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Pidä GPU huippukellotaajuudessaan</string> + <string name="perf_gpuclock_hint">Vain Adreno. Vähemmän nykäyksiä, enemmän akun kulutusta ja lämpöä.</string> + <string name="perf_fixes">Istunnon korjaukset</string> + <string name="perf_sysmem">Turnip: sysmem-renderöinti</string> + <string name="perf_sysmem_hint">Nopeampi Steamille ja useimmille peleille. 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_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> + <string name="perf_esync_hint">Pelien Windows-säikeet odottavat toisiaan eventfd:n ja jaetun muistin avulla sen sijaan, että kiertäisivät wineserverin kautta. Käyttää juuri tälle Proton-versiolle tehtyä droiddeck-esync-pakettia; paketit haetaan automaattisesti. Kunnes sellainen on olemassa uudelle Proton-versiolle, droiddeck-fsync toimii sen tilalla. Tulee voimaan seuraavassa istunnossa.</string> + <string name="perf_xalia_hint">Poistaa käytöstä Protonin ohjaimen navigointiavustimen, joka kuluttaa suoritintehoa jokaisessa pelissä.</string> + <string name="perf_seccomp">Suorita proot ilman seccompia</string> + <string name="perf_seccomp_hint">Voi korjata puuttuvan järjestelmäkutsun virheitä joissakin ytimissä. Voi heikentää suorituskykyä.</string> + <string name="perf_fastpath">proot-pikareitti</string> + <string name="perf_fastpath_needs_seccomp">Vaatii prootin seccomp-suodattimen.</string> + <string name="perf_fastpath_hint">Nopeampi tiedostojen hakeminen ja vähemmän nykimistä. Poista käytöstä, jos ohjelma ei löydä tiedostojaan.</string> + <string name="perf_identity">Istunnon identiteetti</string> + <string name="perf_hostname">Isäntänimi</string> + <string name="perf_hostname_hint">Nimi, jonka Steam näkee tälle laitteelle. Tyhjä palauttaa arvon %1$s.</string> + <string name="perf_hostname_invalid">Vain kirjaimia, numeroita ja sisäisiä yhdysmerkkejä, enintään 63 merkkiä.</string> + <string name="perf_phantom_warning">Android on asetettu lopettamaan tämä istunto</string> + <string name="driver_installed">Asennettu</string> + <string name="driver_available">Ladattavissa</string> + <string name="driver_nothing_new">Ei mitään uutta viimeisimmän tarkistuksen jälkeen.</string> + <string name="driver_restore_builtin">Palauta sisäänrakennetut ajurit</string> + <string name="driver_delete_builtin">Sisäänrakennettu sovellukseen: tämä poistaa sen puretut tiedostot ja piilottaa sen. Palauta sisäänrakennetut ajurit tuo sen takaisin.</string> + <string name="driver_delete_bundle">Puolikas Android + Linux -paketista: molemmat puoliskot poistetaan. Käytössä oleva ajuri palaa oletukseen.</string> + <string name="driver_delete_plain">Sen tiedostot poistetaan sovelluksesta.</string> + <string name="driver_delete_in_use">Sen tiedostot poistetaan. Se on käytössä, joten oletus ottaa sen paikan.</string> + <string name="drawer_page_display">Näyttö</string> + <string name="drawer_page_effects">Tehosteet</string> + <string name="drawer_page_controls">Ohjaimet</string> + <string name="drawer_page_components">Komponentit</string> + <string name="drawer_page_controller">Ohjain</string> + <string name="drawer_page_settings">Asetukset</string> + <string name="drawer_page_desc">%1$s-sivu</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Työpöytä</string> + <string name="drawer_steam_menu">Steam-valikko</string> + <string name="drawer_quick_access">Pikavalikko</string> + <string name="drawer_open_qam">Avaa pikavalikko</string> + <string name="drawer_prev_page">Edellinen sivu</string> + <string name="drawer_next_page">Seuraava sivu</string> + <string name="drawer_hud">Suorituskyky-HUD</string> + <string name="drawer_scaling">Skaalaustila</string> + <string name="drawer_scaling_sharpness">Skaalauksen terävyys</string> + <string name="drawer_effects">Näyttötehosteet</string> + <string name="drawer_effects_hint">Reaaliaikainen. Kuluttaa hieman GPU-aikaa, kun jokin tehoste on päällä.</string> + <string name="drawer_look">Esiasetukset</string> + <string name="drawer_look_custom">Mukautettu</string> + <string name="drawer_effects_advanced">Lisäasetukset</string> + <string name="widgets_expanded">Laajennettu</string> + <string name="widgets_collapsed">Supistettu</string> + <string name="drawer_cas">Terävöinti (CAS)</string> + <string name="drawer_cas_level">Terävöinnin taso</string> + <string name="drawer_fake_hdr">Keinotekoinen HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Käynnistä SteamVR</string> + <string name="steamvr_checking">Tarkistetaan SteamVR…</string> + <string name="drawer_deband">Raidanpoisto</string> + <string name="drawer_deband_strength">Raidanpoiston voimakkuus</string> + <string name="drawer_brightness">Kirkkaus</string> + <string name="drawer_contrast">Kontrasti</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Kylläisyys</string> + <string name="drawer_fxaa">FXAA (reunan pehmennys)</string> + <string name="drawer_toon">Piirrosääriviivat</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Tekstuurisuodatus</string> + <string name="drawer_texture_hint">DirectX 9–11 -pelit, niiden seuraavasta käynnistyksestä alkaen.</string> + <string name="drawer_anisotropy">Anisotrooppinen suodatus</string> + <string name="drawer_texture_sharpness">Tekstuurien terävyys</string> + <string name="drawer_texture_sharpness_note">Negatiivinen mip-poikkeama: terävämmät tekstuurit, jonkin verran kimmellystä. Automaattinen vastaa sitä, kuinka paljon istunto on suurennettu näytölle.</string> + <string name="drawer_touch_auto">Automaattinen (%1$s)</string> + <string name="drawer_keyboard">Näppäimistö</string> + <string name="drawer_latency">Viive</string> + <string name="drawer_low_latency_controller">Matalan viiveen ohjain</string> + <string name="drawer_low_latency_controller_hint">Ohjain raportoi 1000 Hz:n taajuudella 250 Hz:n sijaan. Hieman enemmän CPU:ta.</string> + <string name="drawer_low_latency_touch">Matalan viiveen kosketus</string> + <string name="drawer_low_latency_touch_hint">Kosketukset ohittavat ruutujen niputuksen, joten Steamin kosketusohjaus toimii 1000 Hz:llä. Hieman enemmän CPU:ta.</string> + <string name="drawer_pc_keyboard">PC-näppäimistö</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Toinen näyttö</string> + <string name="drawer_second_screen_mode">Tila</string> + <string name="drawer_second_screen_shows">Näyttää</string> + <string name="drawer_android_apps">Android-sovellukset</string> + <string name="drawer_launch_app">Käynnistä sovellus</string> + <string name="common_hide">Piilota</string> + <string name="common_show">Näytä</string> + <string name="drawer_no_apps">Ei käynnistettäviä sovelluksia</string> + <string name="drawer_session_behavior">Istunnon toiminta</string> + <string name="drawer_suspend_hint">Tulee voimaan nyt ja tuleviin istuntoihin tässä tilassa.</string> + <string name="drawer_next_session">Seuraava istunto</string> + <string name="drawer_support">Tuki</string> + <string name="drawer_logs">Istunnon lokit</string> + <string name="drawer_logs_hint">Liitä virheraporttiin</string> + <string name="drawer_share_logs">Jaa lokit</string> + <string name="drawer_background">Tausta</string> + <string name="drawer_stop">Lopeta</string> + <string name="drawer_stop_title">Lopetetaanko istunto?</string> + <string name="drawer_running_now">Käynnissä nyt</string> + <string name="drawer_no_game">Mikään peli ei ole käynnissä Protonilla</string> + <string name="drawer_selected_profile">Pelin profiili</string> + <string name="drawer_selected_profile_none">Profiilin tiedot eivät ole vielä saatavilla.</string> + <string name="drawer_profile_refresh_failed_initial">Pelien profiileja ei voitu ladata. Yritetään automaattisesti uudelleen.</string> + <string name="drawer_profile_refresh_failed_stale">Pelien profiileja ei voitu päivittää. Näytetään viimeisin saatavilla oleva tieto; yritetään automaattisesti uudelleen.</string> + <string name="drawer_profile_inspect_hint">Tarkastele ja muokkaa tallennettuja asetuksia, joita käytetään seuraavassa käynnistyksessä.</string> + <string name="drawer_profile_default">Käytössä on Oletusprofiili</string> + <string name="drawer_profile_custom">Mukautettu profiili</string> + <string name="drawer_component_inherited">Käytössä on %1$s Oletusprofiilista.</string> + <string name="drawer_game_components_note">Muutokset tallennetaan %1$s:n profiiliin ja tulevat voimaan, kun peli käynnistyy seuraavan kerran.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d pelikohtainen ohitus</item> + <item quantity="other">%1$d pelikohtaista ohitusta</item> + </plurals> + <string name="drawer_no_proton">Protonia ei ole vielä asennettu.</string> + <string name="drawer_game_running">peli käynnissä</string> + <string name="drawer_reapplied">otettu uudelleen käyttöön käynnistyksessä %1$s</string> + <string name="drawer_original">Alkuperäinen</string> + <string name="drawer_components_note">Tuo ja poista Komponentit-sivulla.</string> + <string name="setup_check_done">Valmis</string> + <string name="setup_check_warn">Vaatii huomiota</string> + <string name="setup_check_busy">Käsitellään</string> + <string name="setup_limit_adb_failed">Tarkista Langattoman virheenkorjauksen IP-osoite ja portti, tai pariuta uudelleen, jos Android poisti tämän laitteen.</string> + <string name="setup_install">Asenna</string> + <string name="setup_manage">Hallitse</string> + <string name="setup_tab_overview">Yleiskatsaus</string> + <string name="setup_tab_controller">Ohjain</string> + <string name="setup_tab_session">Istunto</string> + <string name="setup_tab_launcher">Käynnistin</string> + <string name="setup_title">Käyttöönotto</string> + <string name="setup_all_set">● Kaikki valmiina</string> + <string name="setup_n_ready">%1$d/%2$d valmiina</string> + <string name="setup_system_check">Järjestelmätarkistus</string> + <string name="setup_gpu_supported">Laite tuettu</string> + <string name="setup_gpu_untested">Testaamaton GPU</string> + <string name="setup_gpu_unsupported">GPU ei ole tuettu</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam tarvitsee Adreno-ajurin; %1$s saattaa näyttää mustan ruudun</string> + <string name="setup_runtime">Linux-ajoympäristö</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Ei asennettu · noin 3 GB, asennetaan ensimmäisellä Pelaa-painalluksella</string> + <string name="setup_installed">Asennettu</string> + <string name="setup_runtime_update">%1$s · päivitys saatavilla</string> + <string name="setup_runtime_current">%1$s · ajan tasalla</string> + <string name="setup_limit">Lapsiprosessien raja</string> + <string name="setup_limit_on">Päällä · Android voi sulkea Steamin. Pois ottaminen kestää minuutin.</string> + <string name="setup_limit_unset">Ei asetettu · Android voi sulkea Steamin. Pois ottaminen kestää minuutin.</string> + <string name="setup_limit_unknown">Ei voitu tarkistaa · pois ottaminen kestää minuutin.</string> + <string name="setup_fix_it">Korjaa</string> + <string name="setup_details">Tiedot</string> + <string name="setup_dev_options">Kehittäjäasetukset</string> + <string name="setup_use_wireless">Käytä Langatonta virheenkorjausta</string> + <string name="setup_check_again">Tarkista uudelleen</string> + <string name="setup_limit_turn_on">Ota raja käyttöön</string> + <string name="setup_account">Steam-tili</string> + <string name="setup_signed_in_offline">Kirjautuneena nimellä %1$s · offline-tila</string> + <string name="setup_signed_in">Kirjautuneena nimellä %1$s</string> + <string name="setup_sign_in">Paina Pelaa ja kirjaudu Steamiin</string> + <string name="setup_tools">Työkalut</string> + <string name="setup_controller">Ohjain</string> + <string name="setup_controller_unavailable">Ohjaimen asetukset eivät ole käytettävissä.</string> + <string name="setup_session">Istunto</string> + <string name="setup_logs">Istunnon lokit</string> + <string name="setup_logs_hint">Tallennetaan joka istunnon jälkeen</string> + <string name="setup_agent_commands">Vianmääritystyökalut</string> + <string name="setup_latest_logs">Viimeisimmät istunnon lokit</string> + <string name="setup_saved_logs">Tallennetut istunnon lokit</string> + <string name="setup_saved_logs_hint">Säilyttää %1$d uusinta</string> + <string name="setup_clear_logs">Tyhjennä lokit</string> + <string name="setup_reset_settings">Palauta kaikki asetukset</string> + <string name="setup_reset_settings_hint">Palauta jokainen asetus oletusarvoon</string> + <string name="setup_reset_settings_button">Palauta</string> + <string name="setup_reset_settings_title">Palautetaanko kaikki asetukset?</string> + <string name="setup_reset_settings_body">Kuvan, suorituskyvyn, ohjaimen, teeman, kielen ja käynnistimen asetukset palaavat oletuksiin. Pelisi, Steam-kirjautuminen, kauppatilit, ladatut ajurit ja tallennuskansiot säilyvät.</string> + <string name="setup_reset_settings_profiles">Palauta myös peliprofiilit (Proton, FEX, komponentit ja ajonaikainen ympäristö pelikohtaisesti sekä Oletus-profiilin ympäristö)</string> + <string name="setup_reset_settings_session_running">Pysäytä istunto ennen asetusten palauttamista.</string> + <string name="setup_reset_settings_partial">Asetukset palautettiin, mutta ei kaikkia. Tiedot ovat lokeissa.</string> + <string name="setup_offline">Offline-tila</string> + <string name="setup_sign_in_first">Kirjaudu Steamiin ensin</string> + <string name="setup_launcher">Käynnistin</string> + <string name="setup_language">Kieli</string> + <string name="setup_language_hint">Steam käyttää sitä myös, seuraavasta käynnistyksestä alkaen.</string> + <string name="setup_language_system">Järjestelmän oletus (%1$s)</string> + <string name="setup_language_system_short">Järjestelmän oletus</string> + <string name="setup_app_scale">Sovelluksen skaalaus</string> + <string name="setup_app_scale_hint">DroidDeckin tekstit ja säätimet</string> + <string name="setup_app_scale_default">%1$d %% (Oletus)</string> + <string name="setup_theme">Teema</string> + <string name="setup_theme_hint">Käynnistimen ulkoasu</string> + <string name="setup_home">Käytä Aloitusnäyttönä</string> + <string name="setup_home_on">DroidDeck voi olla kotisovellus</string> + <string name="setup_home_off">DroidDeckiä ei koskaan tarjota kotisovellukseksi</string> + <string name="setup_orientation">Suunta</string> + <string name="setup_orientation_auto">Automaattinen vaakasuunta</string> + <string name="setup_orientation_landscape">Vaakasuunta</string> + <string name="setup_orientation_reverse">Käänteinen vaakasuunta</string> + <string name="setup_fullscreen">Koko näyttö</string> + <string name="setup_fullscreen_on">Piilottaa Androidin tila- ja navigointipalkit</string> + <string name="setup_fullscreen_off">Näyttää Androidin tila- ja navigointipalkit</string> + <string name="setup_default_home">Oletuskotisovellus</string> + <string name="setup_choose_home">Valitse kotisovellus</string> + <string name="setup_choose">Valitse</string> + <string name="setup_linux_apps">Linux-sovellukset (beta)</string> + <string name="setup_tool_files">Tiedostot</string> + <string name="setup_tool_files_hint">Selaa ja hallitse tiedostoja</string> + <string name="setup_tool_protons">Proton-versiot</string> + <string name="setup_tool_protons_hint">Asenna ARM64-Proton-versioita</string> + <string name="setup_tool_performance">Suorituskyky</string> + <string name="setup_tool_performance_hint">CPU-ydinten määritys</string> + <string name="setup_tool_roms">ROM-kansio</string> + <string name="setup_tool_roms_hint">Mihin emulaattoripelit tallennetaan</string> + <string name="setup_card_components">Komponentit</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Ohjaimet</string> + <string name="setup_card_controls_hint">Painikkeiden kartoitus</string> + <string name="store_tab_discover">Löydä</string> + <string name="store_tab_search">Hae</string> + <string name="store_tab_installed">Asennetut</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Kauppa</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak valmis</string> + <string name="store_needs_runtime">Asenna Linux-ajoympäristö ensin Käyttöönotto-sivulta.</string> + <string name="store_setup_title">Ota Flatpak käyttöön</string> + <string name="store_setup_text">Lisää Flatpakin ja yhdistää sen Flathubiin (noin 20 MB). Ensimmäinen sovellus lataa myös oman ajoympäristönsä.</string> + <string name="store_setting_up">Otetaan käyttöön…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Päivitykset</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Käynnistyy…</string> + <string name="store_categories">Luokat</string> + <string name="store_unreachable">Flathubia ei tavoitettu. Tarkista yhteytesi ja yritä uudelleen.</string> + <string name="store_try_again">Yritä uudelleen</string> + <string name="store_search_label">Hae Flathubista</string> + <string name="store_search_placeholder">Firefox, pelit, emulaattorit…</string> + <string name="store_search">Hae</string> + <string name="store_all">Kaikki</string> + <string name="store_searching">Haetaan…</string> + <string name="store_search_hint">Hae nimellä tai valitse luokka. Vain ARM64-sovellukset näkyvät listalla.</string> + <string name="store_no_results">Flathubista ei löytynyt tätä vastaavia ARM64-sovelluksia.</string> + <string name="store_results">Tulokset</string> + <string name="store_check_updates">Tarkista päivitykset</string> + <string name="store_update_all">Päivitä kaikki (%1$d)</string> + <string name="store_all_current">● Kaikki on ajan tasalla</string> + <string name="store_no_apps">Ei sovelluksia vielä. Löydä niitä Löydä- tai Hae-välilehdeltä.</string> + <string name="store_setup_first_note">Ota Flatpak käyttöön asentaaksesi sovelluksia.</string> + <string name="store_update_available_prefix">Päivitys saatavilla · %1$s</string> + <string name="store_open">Avaa</string> + <string name="store_details">Tiedot</string> + <string name="store_remove">Poista</string> + <string name="store_press_again">Paina uudelleen poistaaksesi</string> + <string name="store_installing">Asennetaan…</string> + <string name="store_install">Asenna</string> + <string name="store_setup_first">Ota Flatpak käyttöön ensin</string> + <string name="store_download_size">Lataus %1$s</string> + <string name="store_installed_chip">● Asennettu</string> + <string name="store_details_failed">Tämän sovelluksen Flathub-sivua ei voitu ladata.</string> + <string name="store_loading">Ladataan Flathubista…</string> + <string name="store_no_arm">Flathubissa ei ole ARM64-versiota, joten sitä ei voi asentaa tässä.</string> + <string name="store_screenshots">Kuvakaappaukset</string> + <string name="store_about">Tietoja</string> + <string name="store_app_id">Sovellustunnus</string> + <string name="store_license">Lisenssi</string> + <string name="store_runtime">Ajoympäristö</string> + <string name="store_installed_size">Asennuksen koko</string> + <string name="store_installed_size_value">%1$s (lisäksi jaettu ajoympäristö)</string> + <string name="store_website">Verkkosivu</string> + <string name="store_verified">Vahvistettu</string> + <string name="upd_title">Päivitykset</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Tarkistettu %1$s</string> + <string name="upd_not_checked">Ei tarkistettu vielä</string> + <string name="upd_perm_title">Anna DroidDeckin päivittää itsensä</string> + <string name="upd_perm_text">Ota seuraavalla näytöllä käyttöön Salli tästä lähteestä ja palaa takaisin. Päivitys jatkuu itsekseen.</string> + <string name="upd_open_settings">Avaa asetukset</string> + <string name="upd_not_now">Ei nyt</string> + <string name="upd_signed_status">Allekirjoitettu eri tavalla</string> + <string name="upd_signed_headline">Ei voida päivittää paikan päällä</string> + <string name="upd_signed_detail">Tätä kopiota ei ole allekirjoitettu DroidDeckin julkaisuavaimella, niin päivitykset eivät voi asentua sen päälle. Poista se, jos haluat vaihtaa.</string> + <string name="upd_available">Päivitys saatavilla</string> + <string name="upd_blocked_status">Ei voida asentaa</string> + <string name="upd_switch">Valmis vaihdettavaksi</string> + <string name="upd_ahead_status">Stable-versiota edellä</string> + <string name="upd_ahead_headline">Olet Stable-versiota edellä</string> + <string name="upd_ahead_detail">Tämä build on uudempi kuin viimeisin Stable. Siirryt Stableen sen seuraavan julkaisun myötä.</string> + <string name="upd_gone_status">Testi päättyi</string> + <string name="upd_gone_headline">Tämä testi on päättynyt</string> + <string name="upd_gone_detail">Sen korjaus yhdistettiin tai hylättiin. Seuraa Previewiä saadaksesi uusimmat korjaukset.</string> + <string name="upd_current_status">Ajan tasalla</string> + <string name="upd_current_headline">Sinulla on uusin %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d %%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Päivitä%1$s</string> + <string name="upd_install_button">Asenna%1$s</string> + <string name="upd_install_anyway">Asenna Stable %1$s silti</string> + <string name="upd_follow_preview">Seuraa Previewiä</string> + <string name="upd_stop_session">Lopeta käynnissä oleva istunto päivittääksesi.</string> + <string name="upd_less">Vähemmän</string> + <string name="upd_more">Lisää</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Uusi Preview-build</string> + <string name="upd_new_test">PR #%1$d -testibuild</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">PÄIVITYSKANAVA</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Testatut julkaisut, sopii useimmille</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Uusimmat korjaukset, ennen Stablea</string> + <string name="upd_preview_current">Ajan tasalla</string> + <string name="upd_tests">Testibuildit</string> + <string name="upd_tests_hint">Kokeile korjausta ennen sen julkaisua</string> + <string name="upd_tests_none">Ei yhtään juuri nyt</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Ei rakennettu tälle DroidDeck-kopiolle</string> + <string name="upd_updated">Päivitettiin %1$s</string> + <string name="upd_test_name">PR #%1$d -testi</string> + <string name="upd_while_ago">hetki sitten</string> + <string name="upd_just_now">juuri nyt</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d kokeiltavana</item> + <item quantity="other">%1$d kokeiltavana</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Muutoksia buildisi jälkeen · %1$d build jäljessä</item> + <item quantity="other">Muutoksia buildisi jälkeen · %1$d buildia jäljessä</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Viimeisimmät muutokset · %1$d build</item> + <item quantity="other">Viimeisimmät muutokset · %1$d buildia</item> + </plurals> + <string name="gate_title">Yksi Android-asetus muutettavaksi</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android pysäyttää sovelluksia, jotka käynnistävät paljon taustaprosesseja, ja Steam käynnistää niitä kymmeniä. Kunnes tämä muuttuu, pelit sulkeutuvat ilman virheilmoitusta.</string> + <string name="gate_fix_for_me">Korjaa se puolestani</string> + <string name="gate_toggle_steps">Ota käyttöön ”Poista käytöstä alatason prosessirajoitukset” ja palaa takaisin. Jätä Kehittäjäasetukset päälle, tai kytkin kytkeytyy taas pois päältä.</string> + <string name="gate_open_dev">Avaa Kehittäjäasetukset</string> + <string name="gate_no_toggle">Tässä Android-versiossa ei ole kytkintä tälle, niin DroidDeck muuttaa sen Langattoman virheenkorjauksen kautta. Kestää noin minuutin, ei tarvita tietokonetta.</string> + <string name="gate_needs_wifi">Langaton virheenkorjaus vaatii Wi-Fi-yhteyden. Mikä tahansa verkko käy; internet-yhteyttä ei tarvita.</string> + <string name="gate_needs_notifications">Pariutuskoodi tulee ilmoitukseen. Salli ilmoitukset DroidDeckille, tai käytä Muita tapoja.</string> + <string name="gate_allow_notifications">Salli ilmoitukset</string> + <string name="gate_step1">Avaa Asetukset → Kehittäjäasetukset → Langaton virheenkorjaus ja kytke se päälle</string> + <string name="gate_step2">Napauta ”Pariuta laite pariutuskoodilla”</string> + <string name="gate_step3">Kirjoita koodi DroidDeckin ilmoitukseen</string> + <string name="gate_waiting">Odotetaan pariutuksen ponnahdusikkunaa…</string> + <string name="gate_code_needed">Ponnahdusikkuna löytyi. Syötä sen koodi ilmoitukseen.</string> + <string name="gate_status">Tila</string> + <string name="gate_polling">Tarkistetaan 2 sekunnin välein. Tämä sivu sulkeutuu, kun se on pois päältä.</string> + <string name="gate_other_ways">Muita tapoja</string> + <string name="gate_other_toggle">Langaton virheenkorjaus, manuaalinen osoite, tietokoneen ADB</string> + <string name="gate_other_no_toggle">Manuaalinen osoite, tietokoneen ADB, Kehittäjäasetukset</string> + <string name="gate_use_wireless_instead">Käytä sen sijaan Langatonta virheenkorjausta</string> + <string name="gate_some_roms">Jotkin ROM-versiot lisäävät kytkimen joka tapauksessa. Etsi ”child process” Kehittäjäasetuksista.</string> + <string name="gate_manual_hint">Jos ilmoitus ei toimi, syötä ponnahdusikkunan osoite ja koodi itse.</string> + <string name="gate_enter_manually">Syötä osoite manuaalisesti</string> + <string name="gate_from_computer">Tietokoneelta ADB:llä:</string> + <string name="gate_copy_command">Kopioi komento</string> + <string name="gate_choose_display">Valitse, millä näytöllä Android-asetukset avataan.</string> + <string name="gate_main_screen">Päänäyttö</string> + <string name="wadb_finding_port">Pariutui. Etsitään Langattoman virheenkorjauksen porttia…</string> + <string name="wadb_enter_port">Pariutui. Syötä portti Asetuksista.</string> + <string name="wadb_applying">Laite löytyi. Otetaan asetus käyttöön…</string> + <string name="wadb_apply_failed">Automaattinen käyttöönotto epäonnistui. Tarkista alla oleva osoite ja yritä uudelleen. %1$s</string> + <string name="wadb_title_wireless">Langaton virheenkorjaus</string> + <string name="wadb_title_done">Lapsiprosessien raja päivitetty</string> + <string name="wadb_title">Muuta lapsiprosessien rajaa</string> + <string name="wadb_lede_compact0">Jos asetus puuttuu, pariuta Langattoman virheenkorjauksen kautta.</string> + <string name="wadb_lede_compact1">Pariutui. Tarkista IP-osoite ja portti Langattomasta virheenkorjauksesta.</string> + <string name="wadb_lede_done">Lapsiprosessien raja päivitettiin.</string> + <string name="wadb_lede0">Käytä vaihetta 2, jos Kehittäjäasetuksissa ei ole lapsiprosessiasetusta. Avaa Kehittäjäasetukset → Langaton virheenkorjaus → Pariuta laite pariutuskoodilla.</string> + <string name="wadb_lede1">Pariutui. Käytä alla olevaa osoitetta, tai päivitä se Langaton virheenkorjaus → IP-osoite ja portti -kohdasta.</string> + <string name="wadb_lede_done_long">Lapsiprosessien raja päivitettiin Langattoman virheenkorjauksen kautta.</string> + <string name="wadb_confirmed_on">Android vahvisti, että raja on päällä.</string> + <string name="wadb_confirmed_off">Android vahvisti, että raja on pois päältä.</string> + <string name="wadb_pair_group">2 · Pariuta Langaton virheenkorjaus</string> + <string name="wadb_pair_address">Pariutuksen ponnahdusikkunan IP-osoite ja portti</string> + <string name="wadb_pin">Pariutuskoodi (PIN)</string> + <string name="wadb_pin_placeholder">6 numeroa</string> + <string name="wadb_pair">Pariuta</string> + <string name="wadb_apply_group">2 · Ota käyttöön Langattoman virheenkorjauksen kautta</string> + <string name="wadb_connect_address">Yhteyden IP-osoite ja portti</string> + <string name="wadb_pair_again">Pariuta uudelleen</string> + <string name="wadb_turn_off">Kytke raja pois päältä</string> + <string name="wadb_other_ways">Muita tapoja muuttaa sitä</string> + <string name="wadb_dev_try_first">1 · Kehittäjäasetukset (kokeile ensin)</string> + <string name="wadb_restrict_on">Aseta ”Poista käytöstä alatason prosessirajoitukset” pois päältä.</string> + <string name="wadb_restrict_off">Aseta ”Poista käytöstä alatason prosessirajoitukset” päälle.</string> + <string name="wadb_computer_last">3 · Tietokoneen ADB (viimeinen keino)</string> + <string name="wadb_only_if">Vain jos Langaton virheenkorjaus ei ole käytettävissä.</string> + <string name="wadb_computer_group">3 · Tietokoneen ADB (viimeinen keino)</string> + <string name="ctrl_osc_hint">Kun kosketusohjaimet näkyvät istunnossa</string> + <string name="ctrl_color">Väri</string> + <string name="ctrl_color_hint">Näytön painikkeiden sävy</string> + <string name="ctrl_custom">Mukautettu</string> + <string name="ctrl_opacity">Peittävyys</string> + <string name="ctrl_percent">%1$d %%</string> + <string name="ctrl_size">Painikkeiden koko</string> + <string name="ctrl_size_hint" formatted="false">100% on vakiokoko</string> + <string name="ctrl_stick_click">Sauvan napsautus</string> + <string name="ctrl_stick_click_hint">Kaksoisnapauta ja pidä sauvaa pohjassa saadaksesi L3:n tai R3:n</string> + <string name="ctrl_adaptive">Mukautuvat sauvat</string> + <string name="ctrl_rumble">Pelin tärinä</string> + <string name="ctrl_steam_button">Steam-painike</string> + <string name="ctrl_qam_button">QAM-painike</string> + <string name="ctrl_keyboard_button">Näppäimistöpainike</string> + <string name="ctrl_select_steam">Avaa Steam-valikko Select-painikkeella</string> + <string name="ctrl_select_steam_hint">View/Select-painikkeen sijaan.</string> + <string name="ctrl_joycon_vr">Joy-Conit VR-ohjaimina</string> + <string name="ctrl_joycon_vr_hint">Kun SteamVR on käynnissä, jokainen Joy-Con toimii kätenä. Osoita sillä eteenpäin ja pidä Home- tai Capture-painiketta pohjassa keskittääksesi sen uudelleen.</string> + <string name="setup_animations">Animaatiot</string> + <string name="ctrl_adaptive_hint">Sauvat tulevat näkyviin siihen, mihin kosketat, ja piiloutuvat, kun vapautat</string> + <string name="ctrl_layout">Asettelu</string> + <string name="ctrl_layout_custom">Mukautetut sijainnit tallennettu</string> + <string name="ctrl_layout_default">Sovitettu tähän näyttöön</string> + <string name="ctrl_edit">Muokkaa</string> + <string name="ctrl_reset">Palauta</string> + <string name="ctrl_mapping">Painikkeiden kartoitus</string> + <string name="ctrl_mapping_default">Jokainen painike lähettää oman syötteensä</string> + <string name="ctrl_mapping_count">%1$d/%2$d painiketta uudelleenkartoitettu</string> + <string name="ctrl_configure">Määritä</string> + <string name="ctrl_reset_all">Palauta ohjain</string> + <string name="ctrl_reset_all_hint">Palauttaa kaikki ohjaimen asetukset ja asettelun</string> + <string name="ctrl_mapping_lede">Mitä mikä näytön painike lähettää pelille. Piilotettu poistaa painikkeen.</string> + <string name="ctrl_onscreen_buttons">Näytön painikkeet</string> + <string name="ctrl_defaults">Oletukset</string> + <string name="ctrl_reset_mapping">Palauta kartoitus</string> + <string name="content_android_apps">Android-sovellukset</string> + <string name="content_apps_count">%1$d sovellusta</string> + <string name="content_no_android_apps">Käynnistettäviä Android-sovelluksia ei löytynyt.</string> + <string name="content_desktop_installed">● Työpöytä asennettu</string> + <string name="content_desktop_first_open">Asentuu ensimmäisellä avauksella</string> + <string name="content_available">Saatavilla asennettavaksi</string> + <string name="content_not_installed">Ei asennettu.</string> + <string name="content_not_installed_suffix">%1$s · ei asennettu</string> + <string name="content_open_named">Avaa %1$s</string> + <string name="content_games">Pelit</string> + <string name="content_choose_roms">Valitse ROM-kansio.</string> + <string name="content_retroarch_roms">Selaa kohteeseen /root/ROMs RetroArchissa.</string> + <string name="content_add_roms">Lisää %1$s-pelit kansioon ROMs/%2$s.</string> + <string name="content_install_named">Asenna %1$s</string> + <string name="content_stop_to_install">Lopeta istunto asentaaksesi</string> + <string name="content_runtime_required">Ajoympäristö vaaditaan</string> + <string name="content_loading_details">Ladataan asennustietoja…</string> + <string name="content_details_unavailable">Asennustiedot eivät ole käytettävissä. Yritä myöhemmin uudelleen.</string> + <string name="content_needs_runtime">Asenna Linux-ajoympäristö ensin Käyttöönotto-sivulta.</string> + <string name="content_stop_first">Lopeta käynnissä oleva istunto asentaaksesi työpöytäsovelluksia.</string> + <string name="content_install_into">Asentaa %1$s Linux-työpöydälle.</string> + <string name="store_busy_percent_short">%1$s · %2$d %%</string> + <string name="content_hide_note">Piilottaminen poistaa sen Työpöydältä. Sen tiedostot pysyvät Linux-ajoympäristössä.</string> + <string name="content_rom_gone">Tämä peli ei ole enää ROM-kansiossa.</string> + <string name="content_desktop_system">Työpöytä · %1$s</string> + <string name="content_launch_in">Käynnistä kohteessa %1$s</string> + <string name="content_also_in">Myös kohteessa %1$s</string> + <string name="content_page_gone">Tätä sivua ei ole enää. Valitse osio vasemmalta.</string> + <string name="content_open_desktop">Avaa työpöytä</string> + <string name="content_install_open_desktop">Asenna ja avaa työpöytä</string> + <string name="desktop_remove_title">Poista työpöytä</string> + <string name="desktop_remove_text">Poistaa työpöydän ja siihen kuuluvat sovellukset. Säilyttää pelit, lisätyt sovellukset, asetukset ja jaetut kirjastot.</string> + <string name="desktop_removing">Poistetaan työpöytää</string> + <string name="desktop_removed">Työpöytä poistettu</string> + <string name="desktop_cleaning_legacy">Poistetaan vanhoja LXQt-tiedostoja</string> + <string name="desktop_removal_unknown">Päivitä DroidDeck ennen tämän työpöytäversion poistamista.</string> + <string name="content_linux_desktop">Linux-työpöytä</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox ja emulaattorisi</string> + <string name="games_empty">Steamissa asentamasi pelit näkyvät tässä istunnon jälkeen.</string> + <string name="games_play_steam">Pelaa Steamissa</string> + <string name="games_play_steamvr">Pelaa SteamVR:ssä</string> + <string name="games_launch_settings">Käynnistysasetukset</string> + <string name="games_launch">Käynnistä</string> + <string name="games_files">Pelitiedostot</string> + <string name="games_prefix">Proton-prefix</string> + <string name="games_saves_looking">Etsitään tallennuksia…</string> + <string name="games_saves_none">Nimellä löydettävää tallennuskansiota ei löytynyt. Vienti ottaa koko käyttäjäkansion.</string> + <string name="games_saves_folders">%1$d tallennuskansiota</string> + <string name="games_saves_summary">%1$s · %2$d tiedostoa · %3$s</string> + <string name="games_kb">%1$d kt</string> + <string name="games_manage_saves">Hallitse tallennuksia</string> + <string name="games_saves">Pelitallennukset</string> + <string name="games_import_saves">Tuo tallennuksia…</string> + <string name="games_export_gamehub">Vie GameHub-zipinä…</string> + <string name="games_export_winlator">Vie Winlator-zipinä…</string> + <string name="games_open_save_folder">Avaa tallennuskansio</string> + <string name="games_never_played">Ei pelattu koskaan</string> + <string name="games_runtime_busy_percent">Ajoympäristö varattu · %1$d %%</string> + <string name="games_runtime_busy">Ajoympäristö varattu</string> + <string name="games_runtime_first_play">Ajoympäristö asentuu ensimmäisellä Pelaa-painalluksella</string> + <string name="games_runtime_update">Ajoympäristön päivitys saatavilla</string> + <string name="games_runtime_ready">● Ajoympäristö valmis</string> + <string name="games_last_played">Viimeksi pelattu %1$s</string> + <string name="games_internal">Sisäinen tallennustila</string> + <string name="games_added">Lisätty peli</string> + <string name="games_custom">Mukautettu peli</string> + <string name="games_store_storage">Pelien tallennustila</string> + <string name="gpu_auto_hint">Parhaiten tähän GPU:hun sopiva pari, pidetään ajan tasalla</string> + <string name="gpu_manual_hint">Valitse pari itse</string> + <string name="gpu_checking">Tarkistetaan ajureita…</string> + <string name="gpu_none_listed">Ei ajureita listattuna vielä. Päivitä etsiäksesi niitä.</string> + <string name="gpu_hide_other">Piilota muiden GPU:iden ajurit</string> + <string name="gpu_show_other">Näytä muiden GPU:iden ajurit</string> + <string name="gpu_advanced">Lisäasetukset</string> + <string name="gpu_set_with_display">Asetetaan yhdessä näyttöajurin kanssa: %1$s kattaa molemmat.</string> + <string name="gpu_set_with_runtime">Asetetaan yhdessä ajoympäristöajurin kanssa: %1$s kattaa molemmat.</string> + <string name="gpu_runtime_hint">Käytetään peleissä ja työpöydällä.</string> + <string name="gpu_runtime_default">Ajoympäristön oletus</string> + <string name="gpu_auto_by_gpu">Automaattinen - valittu GPU:n mukaan</string> + <string name="gpu_manage">Lataa, tuo tai poista…</string> + <string name="gpu_in_use_caps">KÄYTÖSSÄ</string> + <string name="gpu_builtin">DroidDeckiin sisäänrakennetut ajurit</string> + <string name="gpu_matched_pair">Ajoympäristö- ja näyttöajurit asetetaan yhdessä toisiinsa sopivana parina.</string> + <string name="gpu_recommended_for">Suositellaan tälle GPU:lle: %1$s.</string> + <string name="gpu_refresh_hint">Päivitä etsiäksesi ajureita tälle GPU:lle.</string> + <string name="gpu_recommended_caps">SUOSITELTU</string> + <string name="gpu_unavailable">Ei saatavilla</string> + <string name="load_runtime">Linux-ajoympäristö</string> + <string name="load_runtime_detail">Valmistellaan Linux-ajoympäristöä</string> + <string name="load_session">Istunto</string> + <string name="load_session_detail">Käynnistetään näyttöä ja ääntä</string> + <string name="load_steam">Steam-asiakasohjelma</string> + <string name="load_steam_detail">Tarkistetaan Steamia ja sen yhteensopivuustyökaluja</string> + <string name="load_opening_steam">Avataan Steam</string> + <string name="load_opening_steam_detail">Odotetaan Steamin ensimmäistä kuvaa</string> + <string name="load_desktop">Työpöytä</string> + <string name="load_desktop_detail">Valmistellaan työpöytää</string> + <string name="load_opening">Avataan</string> + <string name="load_opening_detail">Odotetaan ensimmäistä kuvaa</string> + <string name="load_starting_steam">Käynnistetään Steamia</string> + <string name="load_ended">Istunto päättyi</string> + <string name="load_step">Vaihe %1$d/%2$d</string> + <string name="load_steam_paused">Steam on keskeytetty</string> + <string name="deck_tab_grips">Kahvat</string> + <string name="deck_tab_left">Vasen pad</string> + <string name="deck_tab_right">Oikea pad</string> + <string name="deck_tab_both">Molemmat</string> + <string name="deck_tab_gamepad">Peliohjain</string> + <string name="deck_surface_stick">Tatti</string> + <string name="deck_surface_trackpad">Kosketuslevy</string> + <string name="deck_surface_switch">Vaihda tatin ja kosketuslevyn välillä</string> + <string name="deck_more_controls">Lisää Deck-ohjaimia</string> + <string name="deck_panels">PANEELIT</string> + <string name="deck_close">Sulje toisen näytön ohjaimet</string> + <string name="deck_open_steam_menu">Avaa Steam-valikko</string> + <string name="deck_left_upper">Vasen · ylä</string> + <string name="deck_left_lower">Vasen · ala</string> + <string name="deck_right_upper">Oikea · ylä</string> + <string name="deck_right_lower">Oikea · ala</string> + <string name="deck_click">Napsautus</string> + <string name="deck_right_trackpad">Oikea kosketuslevy</string> + <string name="deck_left_trackpad">Vasen kosketuslevy</string> + <string name="second_trackpad">Kosketuslevy</string> + <string name="second_show_keyboard">Näytä näppäimistö</string> + <string name="second_hide_keyboard">Piilota näppäimistö</string> + <string name="second_terminal">Linux-pääte</string> + <string name="second_terminal_not_ready">Linux-istunto ei ole vielä valmis päätteelle.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Pelit</string> + <string name="rail_desktop">Työpöytä</string> + <string name="rail_store">Kauppa</string> + <string name="rail_components">Komponentit</string> + <string name="rail_apps">Sovellukset</string> + <string name="rail_setup">Asetukset</string> + <string name="rail_updates">Päivitykset</string> + <string name="rail_percent">%1$d %%</string> + <string name="rail_resume_named">Jatka: %1$s</string> + <string name="roms_text">Näkyy sessiossa polussa /root/ROMs. Sisäinen tallennustila on /root/Storage.</string> + <string name="roms_none">Kansiota ei valittu</string> + <string name="roms_applies">Vaikuttaa seuraavaan istuntoon. SD-kortit toimivat.</string> + <string name="roms_choose">Valitse kansio</string> + <string name="roms_change">Vaihda kansio</string> + <string name="proton_lede">Asenna ARM64-Proton-versio ja valitse se pelikohtaisesti Steamissa kohdasta Properties → Compatibility.</string> + <string name="proton_stop_first">Pysäytä käynnissä oleva istunto, jotta voit asentaa tai poistaa yhteensopivuustyökalun.</string> + <string name="proton_available">Saatavilla olevat versiot</string> + <string name="proton_installed">Asennettu: %1$s</string> + <string name="proton_queued">Odottaa aiempaa pyyntöä</string> + <string name="proton_not_installed">Ei asennettu</string> + <string name="proton_update_available">Päivitys saatavilla → %1$s</string> + <string name="proton_remove_older">Poista vanhat %1$s-versiot</string> + <string name="proton_remove_older_body">Poistaa %1$s. Näihin versioihin asetetut pelit on vaihdettava toiseen Protoniin.</string> + <string name="proton_remove_body">Tähän versioon asetetut pelit on vaihdettava toiseen Protoniin.</string> + <string name="proton_install_now">Asenna nyt</string> + <string name="proton_cancel_queued">Peruuta jonotus</string> + <string name="pckb_android">Android-näppäimistö</string> + <string name="pckb_hide">Piilota ✕</string> + <string name="main_launch_named">Käynnistä %1$s</string> + <string name="main_choose_screen">Valitse näyttö. Toinen näyttö: %1$s.</string> + <string name="main_secondary_gone">Toinen näyttö ei ole enää käytettävissä.</string> + <string name="main_primary">Ensisijainen näyttö</string> + <string name="main_secondary">Toinen näyttö</string> + <string name="widgets_prev_tab">Edellinen välilehti</string> + <string name="widgets_next_tab">Seuraava välilehti</string> + <string name="widgets_on">Päällä</string> + <string name="widgets_all_n">Kaikki %1$d</string> + <string name="widgets_none">Ei mitään</string> + <string name="widgets_n_of_m">%1$d/%2$d</string> + <string name="widgets_off">Pois</string> + <string name="screen_bottom">Alanäyttö</string> + <string name="game_env_applies">Vaikuttaa seuraavaan pelin käynnistykseen. Pelin omat asetukset ohittavat yhteiset.</string> + <string name="game_env_other">Toinen peli sovellustunnuksella…</string> + <string name="game_env_done">Valmis</string> + <string name="game_env_default">Oletus</string> + <string name="game_env_off">Pois</string> + <string name="game_env_change">Muuta…</string> + <string name="game_env_change_title">Muuta muuttujaa</string> + <string name="game_env_restore_default">Palauta oletus</string> + <string name="game_env_eyebrow">Proton-pelit</string> + <string name="pip_title">Kuva kuvassa</string> + <string name="pip_auto">Siirry automaattisesti kuva kuvassa -tilaan</string> + <string name="unfolded_controls">Ohjaimet avattuna näytöllä</string> + <string name="unfolded_controls_hint">Avattuna peli sijaitsee Steam Deckin kosketuslevyjen ja takakahvojen yläpuolella. Taitettuna peli on koko näytön kokoinen.</string> + <string name="pip_suspended">Keskeytetty</string> + <string name="pip_not_ready">Kuva kuvassa -tila on käytettävissä, kun istunto on valmis.</string> + <string name="pip_permission">Salli kuva kuvassa -tila DroidDeckille Android-asetuksissa.</string> + <string name="pip_unavailable">Android ei pystynyt avaamaan kuva kuvassa -tilaa.</string> + <string name="game_shortcut">Pikakuvake</string> + <string name="game_shortcut_add">Lisää aloitusnäytölle</string> + <string name="game_shortcut_choose">Valitse peli</string> + <string name="game_shortcut_scanning">Etsitään asennettuja pelejä…</string> + <string name="game_link_copy">Kopioi käynnistyslinkki</string> + <string name="game_link_copied">Käynnistyslinkki kopioitu</string> + <string name="game_shortcut_unsupported">Tämä käynnistin ei voi lisätä pikakuvakkeita. Käytä sen sijaan Kopioi käynnistyslinkki -toimintoa.</string> + <string name="game_link_invalid">Virheellinen pelin käynnistyslinkki.</string> + <string name="game_link_missing">Tämä peli ei ole enää DroidDeck-kirjastossasi.</string> + <string name="game_link_session_busy">Pysäytä nykyinen istunto ennen Steam-pelin käynnistämistä.</string> + <string name="game_link_failed">Pelin lähettäminen Steamiin epäonnistui. Yritä käynnistää se uudelleen.</string> + <string name="setup_retry_removal">Yritä poistoa uudelleen</string> + <string name="runtime_removing">Poistetaan</string> + <string name="runtime_removal_incomplete">Poisto kesken</string> + <string name="game_file_export">Vie pelitiedosto</string> + <string name="game_file_sync">Synkronoi kaikki pelitiedostot kansioon</string> + <string name="game_file_stop_sync">Pysäytä pelitiedostojen synkronointi</string> + <string name="game_file_folder">Valitse kansio käyttöliittymän pelitiedostoille</string> + <string name="game_file_exported">Pelitiedostot tallennettu kohteeseen %1$s</string> + <string name="game_frontend_files">Käyttöliittymän tiedostot</string> + + <string name="main_wait_runtime">Odota, että ajoympäristötoiminto päättyy</string> + <string name="main_wait_proton_install">Odota, että yhteensopivuustyökalun asennus päättyy</string> + <string name="main_wait_desktop_install">Odota, että työpöytäsovelluksen asennus päättyy</string> + <string name="main_wait_install_game">Odota, että asennus päättyy ennen pelin käynnistämistä</string> + <string name="main_saves_close_session">Sulje Steam-istunto ensin, jotta peli ei voi tallentaa tuonnin päälle</string> + <string name="main_saves_importing">Tuodaan kohteeseen %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Tuotiin %1$d tiedosto %2$s-muodosta kohteeseen %3$s</item> + <item quantity="other">Tuotiin %1$d tiedostoa %2$s-muodosta kohteeseen %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Tuotiin %1$d tiedosto %2$s-muodosta kohteeseen %3$s. Vanhat tallennukset varmuuskopioitu kansioon Download/DroidDeck/Saves/backups</item> + <item quantity="other">Tuotiin %1$d tiedostoa %2$s-muodosta kohteeseen %3$s. Vanhat tallennukset varmuuskopioitu kansioon Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Valitse tallennusten zip-tiedosto kohteelle %1$s</string> + <string name="main_saves_exporting">Viedään %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Vietiin %1$d tiedosto %2$s-muotoisena: %3$s</item> + <item quantity="other">Vietiin %1$d tiedostoa %2$s-muotoisena: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Valitse, minne %1$s (%2$s) tallennetaan</string> + <string name="main_action_failed">%1$s epäonnistui: %2$s</string> + <string name="main_no_logs_yet">Ei istuntolokeja vielä: suorita istunto ensin.</string> + <string name="main_no_logs_to_clear">Ei tyhjennettäviä istuntolokeja.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Tyhjennettiin %1$d istuntolokikansio.</item> + <item quantity="other">Tyhjennettiin %1$d istuntolokikansiota.</item> + </plurals> + <string name="main_wadb_pair_failed">Langattoman virheenkorjauksen laitepariutus epäonnistui</string> + <string name="main_wadb_command_failed">Langattoman virheenkorjauksen komento epäonnistui</string> + <string name="main_wadb_unavailable">Langaton virheenkorjaus ei ole käytettävissä</string> + <string name="main_adb_copied">ADB-komento kopioitu</string> + <string name="main_pick_roms">Valitse ROMs-kansio</string> + <string name="main_non_adreno_title">Ei Adreno-grafiikkapiiri</string> + <string name="main_non_adreno_text">Turnip tukee Adreno-grafiikkapiirejä. Laitteella %1$s Steam voi näyttää mustan ruudun. Latauksen koko: %2$.0f MB.</string> + <string name="main_install_anyway">Asenna silti</string> + <string name="main_remove_runtime_title">Poista Linux-ajoympäristö</string> + <string name="main_remove_runtime_text">Tämä poistaa ajoympäristön, siihen asennetun Steam-asiakasohjelman ja kaikki sinne asennetut pelit.</string> + <string name="main_applied">Otettu käyttöön: %1$s</string> + <string name="android_app_open_failed_primary">Sovelluksen %1$s avaaminen ensisijaisella näytöllä epäonnistui</string> + <string name="android_app_open_failed_on">Sovelluksen %1$s avaaminen näytöllä %2$s epäonnistui</string> + <string name="android_app_open_failed_display">Sovelluksen %1$s avaaminen näytöllä %2$d epäonnistui</string> + <string name="comp_busy_importing">Tuodaan</string> + <string name="comp_busy_swapping">Vaihdetaan</string> + <string name="comp_busy_restoring">Palautetaan</string> + <string name="comp_busy_cancelling">Perutaan</string> + <string name="comp_busy_deleting">Poistetaan</string> + <string name="comp_cannot_read">tiedostoa ei voi lukea</string> + <string name="comp_imported">Tuotiin %1$s</string> + <string name="comp_swap_cancelled">Odottava vaihto peruttiin.</string> + <string name="comp_pick_wcp">Valitse komponenttipaketti (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nightlies-julkaisuihin ei saatu yhteyttä</string> + <string name="comp_stored">Tallennettu %1$s</string> + <string name="comp_download_failed">Lataus epäonnistui: %1$s</string> + <string name="drivers_pick_linux">Valitse Linux-ajoympäristön ajuri (-Linux-zip tai Android + Linux -paketti)</string> + <string name="drivers_pick_android">Valitse näyttöajuri (AdrenoTools-zip tai Android + Linux -paketti)</string> + <string name="drivers_pick_any">Valitse ajuri-zip tai Android + Linux -paketti</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Poistetaan %1$s…</string> + <string name="main_forgetting_named">Unohdetaan %1$s…</string> + <string name="main_pick_game_storage">Valitse pelien tallennustilakansio</string> + <string name="main_pick_decky_zip">Valitse Decky-laajennuksen ZIP-tiedosto</string> + <string name="main_storage_not_usable">Ei käytettävissä: %1$s</string> + <string name="main_running_program">Ohjelma</string> + <string name="main_removing_runtime">Poistetaan Linux-ajoympäristöä</string> + <string name="main_settings_main_screen">Asetuksia ei voitu avata alanäytöllä; avattiin sen sijaan päänäytöllä.</string> + <string name="main_open_dev_options">Avaa Kehittäjäasetukset Asetuksissa</string> + + <string name="upd_unknown_apps_failed">Androidin \"Tuntemattomien sovellusten asentaminen\" -asetusta ei voitu avata</string> + <string name="upd_couldnt_check">Tarkistus epäonnistui: %1$s</string> + <string name="upd_no_download">Tälle versiolle ei ole latausta tähän DroidDeck-kopioon</string> + <string name="upd_stop_first">Pysäytä käynnissä oleva istunto ennen päivitystä</string> + <string name="upd_stage_downloading">Latausta</string> + <string name="upd_stage_installing">Asennusta</string> + <string name="upd_stage_confirm">Odotetaan vahvistustasi</string> + <string name="upd_failed">Päivitys epäonnistui</string> + <string name="upd_not_offered">Android ei tarjonnut päivityksen asentamista</string> + + <string name="decky_install_failed">Deckyn asennus epäonnistui: %1$s</string> + <string name="decky_plugin_starting">Aloitetaan laajennuksen tuontia…</string> + <string name="decky_plugin_failed">Laajennuksen tuonti epäonnistui: %1$s</string> + <string name="decky_plugin_installed">Laajennus asennettu. Käynnistä Steam uudelleen, jotta se latautuu.</string> + + <string name="drivers_not_checked">Ei tarkistettu vielä - napauta päivitä etsiäksesi uusia ajureita</string> + <string name="drivers_bundle_sets_display">Android + Linux: asettaa näyttöajurin sen mukana</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: asettaa ajoympäristön ajurin sen mukana</string> + <string name="drivers_runtime_builtin">ajoympäristöön sisäänrakennettu Turnip</string> + <string name="drivers_system_vulkan">järjestelmän Vulkan: ei paketoitua versiota tälle grafiikkapiirille</string> + <string name="drivers_bundled">%1$s (mukana)</string> + <string name="drivers_manual">Manuaalinen</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Vain toinen puolisko on julkaistu juuri nyt</string> + <string name="drivers_pair_size">%1$.0f MB molemmille</string> + <string name="drivers_none_to_set">Ei asetettavia ajureita: %1$s</string> + <string name="drivers_checking_latest">Tarkistetaan uusimpia ajureita…</string> + <string name="drivers_up_to_date_check_failed">Ajan tasalla (tarkistus epäonnistui: %1$s)</string> + <string name="drivers_recommended_unpublished">Suositeltuja ajureita ei ole julkaistu juuri nyt</string> + <string name="drivers_downloading_pair">Ladataan %1$s %2$s…</string> + <string name="drivers_updated_to">Päivitetty versioon %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Päivitetty versioon %1$s %2$s. Näyttöajuri otetaan käyttöön, kun DroidDeck käynnistyy uudelleen.</string> + <string name="drivers_auto_waits_for_session">Ajuripäivitykset odottavat, kunnes istunto pysäytetään.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s ladataan, kun poistut mobiilidatasta ja virransäästöstä.</string> + <string name="drivers_skipping_bad">%1$s %2$s ei käynnistänyt istuntoa täällä, joten Automaattinen pysyy ajureissa, jotka käynnistivät.</string> + <string name="drivers_rolled_back">%1$s ei käynnistänyt istuntoa kahdesti, joten Automaattinen palasi toimineisiin ajureihin.</string> + <string name="drivers_switched_to">Vaihdettu versioon %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Vaihdettu versioon %1$s %2$s. Näyttöajuri otetaan käyttöön, kun DroidDeck käynnistyy uudelleen.</string> + <string name="drivers_using">Käytössä %1$s %2$s.</string> + <string name="drivers_using_restart">Käytössä %1$s %2$s. Näyttöajuri otetaan käyttöön, kun DroidDeck käynnistyy uudelleen.</string> + <string name="drivers_using_quest">Käytössä ovat Questin mukana tuleva kuva-ajuri ja oletusajonaikaympäristö.</string> + <string name="drivers_using_quest_restart">Käytössä ovat Questin mukana tuleva kuva-ajuri ja oletusajonaikaympäristö. Kuva-ajuri astuu voimaan, kun DroidDeck käynnistetään uudelleen.</string> + <string name="drivers_not_a_driver">Ei ajuri-zip: ei AdrenoTools-ajuri, -Linux-Turnip eikä Android + Linux -paketti</string> + <string name="drivers_import_failed">Tuonti epäonnistui: %1$s</string> + <string name="drivers_imported_unnamed">Ajuri tuotu</string> + <string name="drivers_using_bundle">Käytetään %1$s sekä ajoympäristön että näytön ajurina.</string> + <string name="drivers_using_bundle_restart">Käytetään %1$s sekä ajoympäristön että näytön ajurina. Näyttöajuri otetaan käyttöön, kun DroidDeck käynnistyy uudelleen.</string> + <string name="drivers_deleted_bundle">Poistettu %1$s (molemmat ajurit)</string> + <string name="drivers_deleted">Poistettu %1$s</string> + <string name="drivers_release_status">Uusimmat: %1$s · tarkistettu %2$s</string> + <string name="drivers_release_status_failed">Uusimmat: %1$s · %2$s ei tavoitettavissa · tarkistettu %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d min sitten</item> + <item quantity="other">%1$d min sitten</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d h sitten</item> + <item quantity="other">%1$d h sitten</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d päivä sitten</item> + <item quantity="other">%1$d päivää sitten</item> + </plurals> + <string name="drivers_checking_sources">Tarkistetaan Banners-Turnip, WinNative ja DroidDeck…</string> + <string name="drivers_check_failed">tarkistus epäonnistui</string> + <string name="drivers_installed_pick_either">Asennettu %1$s - valitse se kummasta tahansa listasta asettaaksesi molemmat ajurit</string> + <string name="drivers_installed_pick">Asennettu %1$s - valitse se valikosta</string> + + <string name="session_wait_removal">Odota, että ajoympäristön poisto päättyy</string> + <string name="session_title_game">Peli</string> + <string name="session_touch_auto_touchpad">kosketuslevy</string> + <string name="session_touch_auto_direct">suora</string> + <string name="session_swap_failed">Vaihto epäonnistui: %1$s</string> + <string name="session_profile_save_failed">Profiilin tallennus epäonnistui: %1$s</string> + <string name="session_desktop_paused">Työpöytä on keskeytetty</string> + <string name="session_named_paused">%1$s on keskeytetty</string> + <string name="session_program_paused">Ohjelma on keskeytetty</string> + <string name="session_starting_desktop">Käynnistetään työpöytää</string> + <string name="session_starting_named">Käynnistetään %1$s</string> + <string name="session_starting_program">Käynnistetään ohjelmaa</string> + <string name="session_no_logs">Ei lokeja tälle istunnolle.</string> + <string name="session_logs_archive_failed">Istuntolokien arkistoa ei voitu luoda.</string> + <string name="session_logs_share_failed">Istuntolokeja ei voitu jakaa.</string> + <string name="session_starting_session">Käynnistetään istuntoa…</string> + <string name="session_runtime_downloading">ladataan Linux-ajoympäristöä</string> + <string name="session_runtime_downloading_mb">ladataan Linux-ajoympäristöä · %1$d/%2$d MB</string> + <string name="session_runtime_checking">tarkistetaan Linux-ajoympäristöä</string> + <string name="session_runtime_unpacking">puretaan Linux-ajoympäristöä</string> + <string name="session_desktop_downloading">ladataan työpöytää</string> + <string name="session_desktop_downloading_mb">ladataan työpöytää · %1$d/%2$d MB</string> + <string name="session_desktop_checking">tarkistetaan työpöytää</string> + <string name="session_desktop_unpacking">puretaan työpöytää</string> + <string name="session_proton_downloading">ladataan Proton Experimentalia (ARM64)</string> + <string name="session_proton_downloading_mb">ladataan Proton Experimentalia (ARM64) · %1$d/%2$d MB</string> + <string name="session_proton_checking">tarkistetaan Proton Experimentalia (ARM64)</string> + <string name="session_proton_unpacking">puretaan Proton Experimentalia (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Ajoympäristöluetteloon ei saatu yhteyttä. Tarkista yhteys ja paina Play uudelleen.</string> + <string name="session_runtime_install_failed">Linux-ajoympäristö ei asentunut. Tarkista ajoympäristö Asetuksissa ja paina Play uudelleen.</string> + <string name="session_desktop_install_failed">Työpöytä ei asentunut (%1$s). Tarkista yhteys ja paina Työpöytä uudelleen.</string> + <string name="session_ended_named">%1$s pysähtyi odottamatta. Jaa lokit virheraportin mukana, tai yritä uudelleen.</string> + <string name="session_ended_program">Ohjelma pysähtyi odottamatta. Jaa lokit virheraportin mukana, tai yritä uudelleen.</string> + <string name="session_ended_desktop">Työpöytä pysähtyi odottamatta. Jaa lokit virheraportin mukana, tai yritä uudelleen.</string> + <string name="session_ended_detail">Poistumistila %1$d · %2$s</string> + <string name="session_ended_no_log">ei lokia</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Loki näyttää %1$d ”Function not implemented” -virheen: prootin seccomp-kiihdytys epäonnistuu laitteen apuohjelmassa. Kokeile %2$s → ”%3$s” (tai ”%4$s”) ja käynnistä uudelleen.</item> + <item quantity="other">Loki näyttää %1$d ”Function not implemented” -virhettä: prootin seccomp-kiihdytys epäonnistuu laitteen apuohjelmassa. Kokeile %2$s → ”%3$s” (tai ”%4$s”) ja käynnistä uudelleen.</item> + </plurals> + + <string name="mode_decky_plugins">Laajennukset</string> + <string name="mode_decky_plugins_hint">Asenna laajennuksen ZIP-tiedosto seuraavaa Steam-istuntoa varten.</string> + <string name="mode_decky_plugin_downloading">Latautuu…</string> + <string name="mode_decky_plugin_install_zip">Asenna ZIP-tiedostosta</string> + <string name="store_cat_games">Pelit</string> + <string name="store_cat_audio_video">Ääni ja video</string> + <string name="store_cat_graphics">Grafiikka</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Toimisto</string> + <string name="store_cat_developer">Kehitys</string> + <string name="store_cat_education">Koulutus</string> + <string name="store_cat_science">Tiede</string> + <string name="store_cat_system">Järjestelmä</string> + <string name="store_cat_utilities">Apuohjelmat</string> + <string name="store_section_popular">Suositut</string> + <string name="store_section_trending">Nousussa</string> + <string name="store_section_new">Uudet</string> + <string name="store_section_updated">Päivitetyt</string> + <string name="store_section_loading">latautuu…</string> + <string name="store_flatpak_setup">Flatpak-asennus</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Flathubista ei voitu tarkistaa päivityksiä</string> + <string name="content_rom_installed">asennettu</string> + <string name="content_rom_folder">kansio</string> + <string name="theme_graphite">Grafiitti</string> + <string name="theme_graphite_detail">Grafiitinväriset pinnat, ja logon oma pallonsininen sävy kaikessa valitussa, kohdistetussa tai painetussa.</string> + <string name="theme_paper">Paperi mustalla</string> + <string name="theme_paper_detail">Valkoinen on pääväri, kuvakkeen sininen on merkki viivoille, renkaille ja pisteille.</string> + <string name="theme_icon_blue">Kuvakkeen sininen</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Asenna ajoympäristö ensin</string> + <string name="game_sync_err_steam_library">Steam-kirjasto ei ole käytettävissä</string> + <string name="game_sync_err_previous_sd">Aiempi SD-kirjasto ei ole käytettävissä</string> + <string name="game_sync_err_game_storage">Pelien tallennustila ei ole käytettävissä</string> + <string name="game_sync_err_added_games">Lisättyjen pelien kansio ei ole käytettävissä</string> + <string name="game_sync_err_manifests">Steam-manifestit eivät ole käytettävissä</string> + <string name="content_system_many">Useita järjestelmiä</string> + <string name="fm_drive_internal">Sisäinen</string> + <string name="fm_drive_linux">Linux-järjestelmä</string> + <string name="fm_drive_sd">SD-kortti</string> + <string name="fm_drive_storage">Tallennustila</string> + <string name="fm_select">Valitse</string> + <string name="fm_properties">Ominaisuudet</string> + <string name="fm_favorite_add">Lisää suosikkeihin</string> + <string name="fm_favorite_remove">Poista suosikeista</string> + <string name="fm_rename">Nimeä uudelleen</string> + <string name="fm_copy">Kopioi</string> + <string name="fm_cut">Leikkaa</string> + <string name="fm_actions">Toiminnot</string> + <string name="fm_favorites">Suosikit</string> + <string name="fm_pin_current">Kiinnitä nykyinen kansio</string> + <string name="fm_no_favorites">Ei suosikkeja vielä - kiinnitä kansio sen ⋮-valikosta palataksesi tähän nopeasti.</string> + <string name="fm_unpin_favorite">Poista suosikeista</string> + <string name="fm_size_zero">0 tavua</string> + <string name="fm_unit_bytes">tavua</string> + <string name="fm_prop_location">Sijainti</string> + <string name="fm_prop_type">Tyyppi</string> + <string name="fm_prop_size">Koko</string> + <string name="fm_prop_modified">Muokattu</string> + <string name="fm_type_folder">Kansio</string> + <string name="fm_type_file">Tiedosto</string> + <string name="fm_type_ext_file">%1$s-tiedosto</string> + <string name="fm_read_only">Vain luku</string> + <string name="fm_read_only_hint">Estää pelejä (ja Winea) ylikirjoittamasta tai poistamasta tätä tiedostoa.</string> + <string name="fm_read_only_failed">Vain luku -tilaa ei voitu muuttaa</string> + <string name="fm_hidden">Piilotettu</string> + <string name="fm_hidden_unsupported">Tämä tallennustila ei tue piilotusmääritettä.</string> + <string name="fm_hidden_hint">Merkitsee tiedoston piilotetuksi Windowsissa (Winen piilotusmääritteenä).</string> + <string name="fm_hidden_failed">Piilotusta ei voitu muuttaa tällä tallennustilalla</string> + <string name="fm_done">Valmis</string> + <string name="fm_op_deleting">Poistetaan...</string> + <string name="fm_delete_failed">Poisto epäonnistui</string> + <string name="fm_op_moving">Siirretään...</string> + <string name="fm_op_copying">Kopioidaan...</string> + <string name="fm_op_moving_item">Siirretään - %1$s</string> + <string name="fm_op_copying_item">Kopioidaan - %1$s</string> + <string name="fm_op_moving_batch">Siirretään %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Kopioidaan %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d valmiina, %2$d epäonnistui</string> + <string name="fm_paste_skipped">%1$d valmiina, %2$d ohitettu</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d kohde siirretty</item> + <item quantity="other">%1$d kohdetta siirretty</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d kohde kopioitu</item> + <item quantity="other">%1$d kohdetta kopioitu</item> + </plurals> + <string name="fm_already_exists">”%1$s” on jo olemassa</string> + <string name="fm_op_renaming">Nimetään uudelleen...</string> + <string name="fm_rename_failed">Uudelleennimeäminen epäonnistui</string> + <string name="fm_op_creating_folder">Luodaan kansiota...</string> + <string name="fm_create_folder_failed">Kansiota ei voitu luoda</string> + <string name="fm_new_folder">Uusi kansio</string> + <string name="fm_folder_name">Kansion nimi</string> + <string name="fm_create">Luo</string> + <string name="fm_new_name">Uusi nimi</string> + <string name="fm_delete_title">Poistetaanko?</string> + <string name="fm_delete_text">Poistetaanko ”%1$s” pysyvästi?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Poistetaanko %1$d kohde?</item> + <item quantity="other">Poistetaanko %1$d kohdetta?</item> + </plurals> + <string name="fm_cannot_undo">Tätä ei voi perua.</string> + <plurals name="fm_and_more"> + <item quantity="one">…ja %1$d lisää</item> + <item quantity="other">…ja %1$d lisää</item> + </plurals> + <string name="fm_op_deleting_batch">Poistetaan %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d kohdetta ei voitu poistaa</item> + <item quantity="other">%1$d kohdetta ei voitu poistaa</item> + </plurals> + <string name="fm_conflict_merge_hint">Yhdistäminen lisää ja korvaa tiedostoja olemassa olevan kansion sisällä.</string> + <string name="fm_conflict_overwrite_hint">Korvaaminen korvaa olemassa olevan tiedoston.</string> + <string name="fm_conflict_apply_all">Käytä kaikkiin ristiriitoihin</string> + <string name="fm_conflict_merge">Yhdistä</string> + <string name="fm_conflict_overwrite">Korvaa</string> + <string name="fm_conflict_keep_both">Säilytä molemmat</string> + <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_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> + <string name="fm_search">Hae</string> + <string name="fm_sort">Järjestä</string> + <string name="fm_sort_name">Nimi</string> + <string name="fm_sort_date">Muokkauspäivä</string> + <string name="fm_rows_comfortable">Väljät rivit</string> + <string name="fm_rows_compact">Tiiviit rivit</string> + <string name="fm_hide_hidden">Piilota piilotiedostot</string> + <string name="fm_show_hidden">Näytä piilotiedostot</string> + <string name="fm_hide_favorites">Piilota suosikit</string> + <string name="fm_show_favorites">Näytä suosikit</string> + <string name="fm_filter_folder">Suodata tätä kansiota</string> + <string name="fm_free_space">%1$s vapaana</string> + <string name="fm_selected_count">%1$d valittu</string> + <string name="fm_select_none">Ei mitään</string> + <string name="fm_select_all">Kaikki</string> + <string name="fm_paste">Liitä</string> + <plurals name="fm_items"> + <item quantity="one">%1$d kohde</item> + <item quantity="other">%1$d kohdetta</item> + </plurals> + <string name="fm_paste_here">Liitä %1$s tähän</string> + <string name="fm_paste_move_here">Liitä %1$s (siirrä) tähän</string> + <string name="fm_rail_title">Tiedostot</string> + <string name="fm_rail_storage">TALLENNUSTILA</string> + <string name="fm_rail_quick">PIKAVALINNAT</string> + <string name="fm_rail_favorites">SUOSIKIT</string> + <string name="fm_rail_downloads">Lataukset</string> + <string name="fm_rail_downloads_short">Latauks.</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Istuntolokit</string> + <string name="fm_rail_pictures">Kuvat</string> + <string name="fm_favorite_added">”%1$s” lisätty suosikkeihin</string> + <string name="fm_favorite_removed">”%1$s” poistettu suosikeista</string> + <string name="fm_empty_directory">Tyhjä kansio</string> + <string name="fm_up_one_level">Ylös yksi taso</string> + <string name="fm_choose_folder">Valitse kansio</string> + <string name="fm_choose_file">Valitse tiedosto</string> + <string name="ctrl_tint_steam_blue">Steam-sininen</string> + <string name="ctrl_tint_sky">Taivaansininen</string> + <string name="ctrl_tint_white">Valkoinen</string> + <string name="ctrl_tint_violet">Violetti</string> + <string name="ctrl_tint_green">Vihreä</string> + <string name="ctrl_tint_amber">Meripihka</string> + <string name="ctrl_tint_red">Punainen</string> + <string name="ctrl_tint_pink">Pinkki</string> + <string name="ctrl_button_a">A-painike</string> + <string name="ctrl_button_b">B-painike</string> + <string name="ctrl_button_x">X-painike</string> + <string name="ctrl_button_y">Y-painike</string> + <string name="ctrl_button_lb">Vasen olkapainike</string> + <string name="ctrl_button_rb">Oikea olkapainike</string> + <string name="ctrl_button_lt">Vasen liipaisin</string> + <string name="ctrl_button_rt">Oikea liipaisin</string> + <string name="ctrl_button_view">View-painike</string> + <string name="ctrl_button_menu">Menu-painike</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-padi ylös</string> + <string name="ctrl_target_down">D-padi alas</string> + <string name="ctrl_target_left">D-padi vasen</string> + <string name="ctrl_target_right">D-padi oikea</string> + <string name="ctrl_target_hidden">Piilotettu</string> + <string name="ctrl_editor_drag">Vedä siirtääksesi</string> + <string name="ctrl_editor_snap">Kohdistus</string> + <string name="ctrl_editor_save">Tallenna</string> + <string name="second_mode_none">Ei mitään</string> + <string name="second_mode_keyboard_trackpad">Näppäimistö + kosketuslevy</string> + <string name="second_mode_terminal">Pääte</string> + <string name="second_mode_deck_controls">Deck-kahvat + kosketuslevyt</string> + + <string name="rtinst_removing">Poistetaan Linux-ajoympäristöä</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Poistetaan Linux-ajoympäristöä · %1$d kohta</item> + <item quantity="other">Poistetaan Linux-ajoympäristöä · %1$d kohtaa</item> + </plurals> + <string name="rtinst_removed">Linux-ajoympäristö poistettu</string> + <string name="rtinst_removal_failed">Linux-ajoympäristön poistoa ei voitu viimeistellä. Yritä poistoa uudelleen Asetuksissa.</string> + <string name="rtinst_removing_leftovers">Poistetaan ajoympäristön jäänteitä</string> + <string name="rtinst_downloading">Ladataan</string> + <string name="rtinst_verifying">Tarkistetaan</string> + <string name="rtinst_extracting">Puretaan</string> + <string name="rtinst_channel_description">Näytetään, kun Linux-ajoympäristöä asennetaan tai poistetaan</string> + <string name="rtinst_title_installing">Asennetaan Linux-ajoympäristöä</string> + <string name="rtinst_title_removing">Poistetaan Linux-ajoympäristöä</string> + + <string name="deskpkg_runtime_missing">Linux-ajoympäristöä ei ole asennettu</string> + <string name="deskpkg_no_checksum">Luettelossa ei ole tarkistussummaa kohteelle %1$s</string> + <string name="deskpkg_checksum_mismatch">Tarkistussumma ei täsmää - mitään ei muutettu</string> + <string name="deskpkg_installing">Asennetaan %1$s</string> + <string name="deskpkg_place_failed">AppImagea ei voitu sijoittaa</string> + <string name="deskpkg_extract_failed">Purkaminen epäonnistui</string> + <string name="deskpkg_install_failed">Asennus epäonnistui</string> + + <string name="flatpakmgr_setup_failed">Flatpak-asennus epäonnistui (poistumiskoodi %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Flatpak-asennus ei valmistunut</string> + <string name="flatpakmgr_busy">Toinen kauppatehtävä on käynnissä</string> + <string name="flatpakmgr_not_ready">Asenna Flatpak ensin</string> + <string name="flatpakmgr_starting">Käynnistetään</string> + <string name="flatpakmgr_exit_status">Flatpak sulkeutui tilakoodilla %1$d</string> + <string name="flatpakmgr_installing">Asennetaan %1$s</string> + <string name="flatpakmgr_updating">Päivitetään %1$s</string> + <string name="flatpakmgr_removing">Poistetaan %1$s</string> + <string name="flatpakmgr_installing_step">Asennetaan %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Päivitetään %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Poistetaan %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">käännökset</string> + <string name="flatpakmgr_ref_graphics_drivers">näyttöajurit</string> + <string name="flatpakmgr_ref_media_codecs">mediakoodekit</string> + <string name="flatpakmgr_ref_runtime">%1$s-ajoympäristö</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s-ajoympäristö %2$s</string> + + <string name="appimg_too_small">Tiedosto on liian pieni ollakseen AppImage</string> + <string name="appimg_unreadable">Tiedostoa ei voida lukea: %1$s</string> + <string name="appimg_not_linux">Tämä ei ole AppImage (se ei ole Linux-ohjelma)</string> + <string name="appimg_wrong_arch">Tämä AppImage ei ole tehty ARM64:lle (aarch64) eikä x86-tietokoneille</string> + <string name="appimg_not_appimage">Tämä on Linux-ohjelma, mutta ei AppImage</string> + <string name="appimg_wrong_type">Vain tyypin 2 AppImageja voi tuoda (tämä on tyyppiä %1$d)</string> + <string name="appimg_no_space_import">Tilaa ei ole riittävästi: tuonti vaatii noin %1$s</string> + <string name="appimg_no_space_update">Tilaa ei ole riittävästi: päivitys vaatii noin %1$s</string> + <string name="appimg_import_failed">Tuonti epäonnistui</string> + <string name="appimg_gone">Tämä AppImage on poissa</string> + <string name="appimg_update_failed">Päivitys epäonnistui</string> + <string name="appimg_extracting">Puretaan %1$s</string> + <string name="appimg_extract_failed">AppImagea ei voitu purkaa</string> + <string name="appimg_extract_failed_detail">AppImagea ei voitu purkaa: %1$s</string> + + <string name="deckymgr_stop_session_loader">Pysäytä käynnissä oleva istunto ennen Decky Loaderin asentamista</string> + <string name="deckymgr_download_failed">Decky Loaderin lataus epäonnistui</string> + <string name="deckymgr_size_mismatch">Decky Loaderin koko ei vastannut julkaisun metatietoja</string> + <string name="deckymgr_checksum_download_failed">Julkaisun tarkistussummaa ei voitu latata</string> + <string name="deckymgr_checksum_missing">Julkaisun tarkistussumma puuttuu</string> + <string name="deckymgr_checksum_invalid">Julkaisun tarkistussumma on virheellinen</string> + <string name="deckymgr_checksum_mismatch">Decky Loaderin tarkistussumma ei täsmää</string> + <string name="deckymgr_not_elf">Julkaisun tiedosto ei ole yhteensopiva 64-bittinen Linux-ohjelma</string> + <string name="deckymgr_session_started_loader">Istunto käynnistyi latauksen aikana; pysäytä se ennen Decky Loaderin asentamista</string> + <string name="deckymgr_loader_not_executable">PluginLoaderia ei voitu merkitä suoritettavaksi</string> + <string name="deckymgr_cef_failed">Steamin CEF-etävirheenkorjausta ei voitu ottaa käyttöön</string> + <string name="deckymgr_stage_failed">PluginLoaderia ei voitu valmistella</string> + <string name="deckymgr_loader_preserve_failed">Nykyistä PluginLoaderia ei voitu säilyttää</string> + <string name="deckymgr_loader_activate_failed">Uutta PluginLoaderia ei voitu ottaa käyttöön</string> + <string name="deckymgr_stop_session_plugin">Pysäytä käynnissä oleva istunto ennen laajennuksen asentamista</string> + <string name="deckymgr_loader_required">Asenna Decky Loader ennen laajennuksen tuomista</string> + <string name="deckymgr_zip_unreadable">Valittua ZIP-tiedostoa ei voitu lukea</string> + <string name="deckymgr_plugins_dir_failed">Deckyn laajennuskansiota ei voitu luoda</string> + <string name="deckymgr_extracting_zip">Puretaan laajennuksen ZIP-tiedostoa</string> + <string name="deckymgr_zip_one_folder">Laajennuksen ZIP-tiedostossa täytyy olla yksi ylätason laajennuskansio</string> + <string name="deckymgr_zip_missing_files">Laajennuksen ZIP-tiedostosta puuttuu plugin.json, package.json tai dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Laajennuksen nimi puuttuu</string> + <string name="deckymgr_session_started_plugin">Istunto käynnistyi asennuksen aikana; pysäytä se ennen laajennuksen asentamista</string> + <string name="deckymgr_plugin_installed">Laajennus asennettu · käynnistä Steam uudelleen, jotta se latautuu</string> + <string name="deckymgr_plugin_install_failed">Laajennuksen ZIP-tiedoston asennus epäonnistui</string> + <string name="deckymgr_zip_too_many">Laajennuksen ZIP-tiedostossa on liian monta kohdetta</string> + <string name="deckymgr_zip_invalid_path">Laajennuksen ZIP-tiedostossa on virheellinen polku</string> + <string name="deckymgr_zip_duplicate_paths">Laajennuksen ZIP-tiedostossa on päällekkäisiä polkuja</string> + <string name="deckymgr_zip_unsafe_path">Laajennuksen ZIP-tiedostossa on turvaton polku</string> + <string name="deckymgr_folder_failed">Laajennuskansiota ei voitu luoda</string> + <string name="deckymgr_zip_too_large">Laajennuksen ZIP-tiedosto purkautuu yli 1 GiB:n rajan</string> + <string name="deckymgr_bundled_not_executable">Mukana tulevaa laajennuksen binääriä ei voitu merkitä suoritettavaksi</string> + <string name="deckymgr_remote_entry_invalid">Virheellinen remote_binary-merkintä</string> + <string name="deckymgr_remote_name_invalid">Virheellinen etäbinäärin nimi</string> + <string name="deckymgr_remote_url_https">Etäbinäärin URL-osoitteen täytyy käyttää HTTPS:ää</string> + <string name="deckymgr_remote_hash_invalid">Etäbinäärillä %1$s on virheellinen SHA-256-tiiviste</string> + <string name="deckymgr_bin_dir_failed">Laajennuksen bin-kansiota ei voitu luoda</string> + <string name="deckymgr_downloading_binary">Ladataan laajennuksen binääriä · %1$s</string> + <string name="deckymgr_binary_download_failed">Laajennuksen binääriä %1$s ei voitu latata</string> + <string name="deckymgr_binary_checksum_mismatch">Laajennuksen binäärin tarkistussumma ei täsmää · %1$s</string> + <string name="deckymgr_binary_not_executable">Laajennuksen binääriä ei voitu merkitä suoritettavaksi · %1$s</string> + <string name="deckymgr_binary_replace_failed">Laajennuksen binääriä ei voitu korvata · %1$s</string> + <string name="deckymgr_binary_install_failed">Laajennuksen binääriä ei voitu asentaa · %1$s</string> + <string name="deckymgr_folder_taken">Laajennuskansio kuuluu toiselle laajennukselle</string> + <string name="deckymgr_preserve_failed">Nykyistä laajennusta ei voitu säilyttää</string> + <string name="deckymgr_activate_failed">Tuotua laajennusta ei voitu ottaa käyttöön</string> + <string name="deckymgr_settings_failed">Deckyn laajennusasetuksia ei voitu päivittää</string> + <string name="deckymgr_restore_failed">Nykyistä laajennusta ei voitu palauttaa</string> + + <string name="adbfix_save_failed">Langattoman virheenkorjauksen tunnistetta ei voitu tallentaa</string> + <string name="adbfix_command_failed">ADB-komento epäonnistui (%1$d)</string> + <string name="adbfix_not_confirmed">Android ei vahvistanut, että lapsiprosessirajaa muutettiin: %1$s</string> + <string name="adbfix_no_pairing">Langattoman virheenkorjauksen laiteparitusta ei ole tallennettu</string> + <string name="adbfix_enter_address">Anna langattoman virheenkorjauksen nykyinen IP-osoite ja portti</string> + + <string name="adbpair_timed_out">Paritusikkunan odotus aikakatkaistiin. Yritä uudelleen DroidDeckistä.</string> + <string name="adbpair_discovery_failed_code">Paritusikkunaa ei voitu etsiä (%1$d). Tarkista, että Wi-Fi on päällä.</string> + <string name="adbpair_discovery_failed">Paritusikkunaa ei voitu etsiä: %1$s</string> + <string name="adbpair_six_digits">Anna koodin kaikki 6 numeroa</string> + <string name="adbpair_pairing">Paritetaan…</string> + <string name="adbpair_code_rejected">Tämä koodi ei toiminut. Avaa paritusikkuna uudelleen ja syötä sen uusi koodi.</string> + <string name="adbpair_connecting">Paritettu. Yhdistetään…</string> + <string name="adbpair_port_not_found">Paritettu, mutta langattoman virheenkorjauksen porttia ei löytynyt. Pidä langaton virheenkorjaus päällä ja yritä uudelleen.</string> + <string name="adbpair_applying">Otetaan asetusta käyttöön…</string> + <string name="adbpair_command_failed">Langattoman virheenkorjauksen komento epäonnistui</string> + <string name="adbpair_channel_name">Langattoman virheenkorjauksen käyttöönotto</string> + <string name="adbpair_channel_description">Kysyy langattoman virheenkorjauksen parituskoodia Asetusten ollessa auki</string> + <string name="adbpair_title_pair">Paritä langaton virheenkorjaus</string> + <string name="adbpair_waiting_text">Ota langaton virheenkorjaus käyttöön ja napauta ”Yhdistä laite paritunnuksella”.</string> + <string name="adbpair_waiting_long">Ota langaton virheenkorjaus käyttöön ja napauta ”Yhdistä laite paritunnuksella”. Pysy Asetuksissa: koodi syötetään tähän ilmoitukseen.</string> + <string name="adbpair_code_label">6-numeroinen paritunnus</string> + <string name="adbpair_code_hint">Napauta Syötä koodi ja kirjoita Asetuksissa näkyvät 6 numeroa.</string> + <string name="adbpair_title_code">Anna Wi-Fi-paritunnus</string> + <string name="adbpair_title_retry">Yritä koodia uudelleen</string> + <string name="adbpair_enter_code">Syötä koodi</string> + <string name="adbpair_title_working">Otetaan Steamia käyttöön</string> + <string name="adbpair_title_done">Steam on valmis</string> + <string name="adbpair_done_text">Napauta palataksesi DroidDeckiin. Voit sammuttaa langattoman virheenkorjauksen nyt.</string> + <string name="adbpair_title_failed">Langattoman virheenkorjauksen käyttöönotto pysähtyi</string> + + <string name="selfinst_download_failed">Lataus epäonnistui</string> + <string name="selfinst_size_mismatch">Latauksen koko ei vastannut julkaistua APK-tiedostoa, ja se hylättiin - yritä uudelleen</string> + <string name="selfinst_checksum_mismatch">Lataus ei vastannut tarkistussummaansa, ja se hylättiin - yritä uudelleen</string> + <string name="selfinst_wrong_package">Päivitys on Android-paketille %1$s, ei %2$s</string> + <string name="selfinst_metadata_signer">Päivityksen metatiedot eivät mainitse DroidDeckin julkaisun allekirjoitusavainta</string> + <string name="selfinst_unreadable">Android ei pystynyt lukemaan ladattua APK-tiedostoa</string> + <string name="selfinst_apk_wrong_package">Ladattu APK on sovellukselle %1$s, ei %2$s</string> + <string name="selfinst_version_mismatch">Ladattu APK ilmoittaa versionCode-arvon %1$d, ei julkaistua %2$d</string> + <string name="selfinst_downgrade">Android ei asenna versionCode-arvoa %1$d asennetun %2$d päälle</string> + <string name="selfinst_no_signing">Ladatussa APK-tiedostossa ei ole allekirjoitustietoja</string> + <string name="selfinst_wrong_signer">Ladattu APK ei ole allekirjoitettu DroidDeckin julkaisuavaimella</string> + <string name="appupd_http">Päivitysluettelo vastasi HTTP %1$d</string> + + <string name="loadstate_starting">Käynnistetään istuntoa…</string> + <string name="loadstate_elapsed">%1$d:%2$02d kulunut · yhä käynnissä</string> + <string name="loadstate_steam_update">Ladataan Steam-asiakasohjelman päivitystä · %1$d %%</string> + <string name="loadstate_steam_client">Ladataan Steam-asiakasohjelmaa · %1$s</string> + + <string name="pextra_busy">Yhteensopivuustyökalun asennus on jo käynnissä</string> + <string name="pextra_stop_session">Pysäytä käynnissä oleva istunto ennen yhteensopivuustyökalujen asentamista</string> + <string name="pextra_no_release">ARM64-julkaisua kohteelle %1$s ei löytynyt</string> + <string name="pextra_no_space">Kohteen %1$s asentaminen vaatii vähintään 4 GB vapaata tilaa latauksen koon lisäksi</string> + <string name="pextra_downloading">Ladataan %1$s %2$s</string> + <string name="pextra_retrying">Yritetään latausta uudelleen · yritys %1$d/%2$d</string> + <string name="pextra_interrupted">Lataus keskeytyi</string> + <string name="pextra_download_failed">Lataus epäonnistui; osittainen tiedosto säilytetään, jotta uusi yritys voi jatkaa siitä</string> + <string name="pextra_too_big">Lataus ylitti julkaisun koon ja poistettiin</string> + <string name="pextra_incomplete">Lataus jäi kesken; osittainen tiedosto säilytetään jatkettavaa yritystä varten</string> + <string name="pextra_verifying">Tarkistetaan latausta</string> + <string name="pextra_checksum_unreadable">Julkaisun tarkistussummaa ei voitu lukea; yritä uudelleen</string> + <string name="pextra_no_checksum">%1$s %2$s ei julkaise tarkistussummaa; mitään ei asennettu</string> + <string name="pextra_checksum_mismatch">Tarkistussumma ei täsmää; lataus poistettiin</string> + <string name="pextra_session_started">Istunto käynnistyi latauksen aikana; pysäytä se ennen yhteensopivuustyökalujen asentamista</string> + <string name="pextra_installing">Asennetaan %1$s</string> + <string name="pextra_install_failed">%1$s-asennus epäonnistui (poistumiskoodi %2$d)</string> + <string name="pextra_could_not_install">Kohdetta %1$s ei voitu asentaa</string> + <string name="esync_fetching">Haetaan droiddeck-esync-pakettia</string> + + <string name="cmgr_fex_linux_helpers">Linux-apuohjelmien kanssa</string> + <string name="cmgr_fex_dlls_only">Vain DLL-tiedostot</string> + <string name="cmgr_original_proton_updated">Alkuperäinen (Proton päivitetty viimeisimmän vaihdon jälkeen)</string> + <string name="cmgr_changed_outside">Muutettu Komponenttien ulkopuolella</string> + <string name="cmgr_not_present">puuttuu</string> + <string name="cmgr_original_version">Alkuperäinen %1$s</string> + <string name="cmgr_original_from">Alkuperäinen versiosta %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s siirtyy kohteeseen %3$s, kun sillä käynnissä oleva peli suljetaan.</string> + <string name="cmgr_swap_done">%1$s %2$s on nyt kohteessa %3$s. Se otetaan käyttöön seuraavan kerran, kun peli käynnistyy.</string> + <string name="cmgr_original_missing">Tätä alkuperäistä pakettia ei ole tallennettu</string> + <string name="cmgr_restore_queued">%2$s:n %1$s palautuu alkuperäiseen, kun sillä käynnissä oleva peli suljetaan.</string> + <string name="cmgr_restore_done">%2$s:n %1$s palautettu %3$s-alkuperäisestä.</string> + <string name="cmgr_package_in_use">%1$s on käytössä kohteessa %2$s. Vaihda tämä Proton ensin joksikin toiseksi.</string> + <string name="cmgr_package_not_stored">%1$s ei ole tallennettu</string> + <string name="cmgr_deleted">Poistettu %1$s.</string> + <string name="cmgr_original_kept">Asennetun version alkuperäinen säilytetään: se on tie takaisin.</string> + <string name="cmgr_not_stored">Ei tallennettu</string> + <string name="cmgr_deleted_original">Poistettu %2$s:n %1$s-alkuperäinen.</string> + <string name="cmgr_nightlies_only">Lataukset tulevat vain Nightlies-julkaisuista</string> + <string name="cmgr_list_predates_checksums">Tämä pakettiluettelo on tarkistussummia vanhempi - päivitä se ja yritä uudelleen</string> + <string name="cmgr_checksum_mismatch">Tarkistussumma ei täsmää</string> + + <string name="sprefs_upscaler_linear">Lineaarinen</string> + <string name="sprefs_upscaler_nearest">Lähin</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (laatu)</string> + <string name="sprefs_upscaler_sharpen">Vain terävöinti</string> + <string name="sprefs_lod_bias_auto">Automaattinen (sovita skaalaukseen)</string> + + <string name="look_off_desc">Ei mitään käytössä.</string> + <string name="look_game_clarity">Pelin terävyys</string> + <string name="look_game_clarity_desc">Terävöinti hieman kontrastilla - arkikäyttöön.</string> + <string name="look_vivid">Eloisa</string> + <string name="look_vivid_desc">Väri viritetty voimakkaaksi. Deband päällä, jotta taivaat eivät raidoitu.</string> + <string name="look_cinematic">Elokuvamainen</string> + <string name="look_cinematic_desc">Syvempi kontrasti, viileämpi väri, reunat pehmennetty.</string> + <string name="look_competitive">Kilpailullinen</string> + <string name="look_competitive_desc">Varjot nostettuna ja voimakkaalla terävöinnillä - huomaa pelaajat ensin.</string> + <string name="look_adaptive_sharpen">Mukautuva terävöinti</string> + <string name="look_adaptive_sharpen_desc">Vain terävöinti, väri koskematta.</string> + <string name="look_filmic">Filmimäinen</string> + <string name="look_filmic_desc">Filmimäinen käyrä, hieman vaimennettu.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Räväkkä ja iskevä.</string> + <string name="look_retro_crt">Retro CRT</string> + <string name="look_retro_crt_desc">CRT-putken ja analogisen signaalin vaikutukset yhdessä.</string> + <string name="look_upscale_sharp">Terävä skaalaus</string> + <string name="look_upscale_sharp_desc">Käytettäväksi, kun ajetaan näytön tarkkuutta pienemmällä resoluutiolla.</string> + <string name="look_pixel_clean">Puhtaat pikselit</string> + <string name="look_pixel_clean_desc">Terävät pikselit 2D- ja vanhoille peleille.</string> + <string name="look_anime_edge">Anime-reunat</string> + <string name="look_anime_edge_desc">Sarjakuvamaiset ääriviivat ja terävöinti.</string> + + <string name="gpuinfo_not_adreno">Ei Adreno-grafiikkapiiri</string> + <string name="gpuinfo_supported">Tuettu</string> + <string name="gpuinfo_experimental">Kokeellinen: sen ajurit ovat testiversioita</string> + <string name="gpuinfo_below_tested">Testatun laitteiston alapuolella (Adreno 725 ja uudemmat): ei välttämättä toimi</string> + <string name="gpuinfo_unsupported">Ei tuettu: DroidDeck vaatii Adreno (Snapdragon) -grafiikkapiirin</string> + + <string name="turnip_rate_limited">GitHubin käyttörajoitus tuli vastaan - yritä myöhemmin uudelleen</string> + <string name="turnip_github_http">GitHub vastasi HTTP %1$d</string> + <string name="turnip_download_failed">Lataus epäonnistui</string> + <string name="turnip_list_predates_checksums">Tämä ajuriluettelo on tarkistussummia vanhempi - päivitä se ja yritä uudelleen</string> + <string name="turnip_checksum_mismatch">Tarkistussumma ei täsmää - lataus hylättiin</string> + <string name="turnip_not_adrenotools">Ei AdrenoTools-ajuri: %1$s</string> + <string name="turnip_reject_no_meta">ei meta.json-tiedostoa</string> + <string name="turnip_reject_meta_unreadable">meta.json ei ole luettavissa (%1$s)</string> + <string name="turnip_reject_linux_driver">tämä on Linux-ajoympäristön ajuri (tuo se kohdasta ”Linux-ajoympäristön ajuri”)</string> + <string name="turnip_reject_wayland">tämä on Wayland-peliajuri, jolle tällä sovelluksella ei ole käyttöä</string> + <string name="turnip_reject_no_library_name">meta.json ei nimeä libraryName-arvoa, joten mitään ei voitu antaa AdrenoToolsille</string> + <string name="turnip_reject_library_missing">meta.json nimeää %1$s, jota ei ole zip-tiedostossa</string> + <string name="turnip_reject_not_aarch64">%1$s ei ole 64-bittinen AArch64 ELF-jaettu kirjasto</string> + <string name="turnip_reject_glibc">%1$s linkittää glibc:n - tämä on ”-Linux”-Turnip, joka kuuluu kohtaan ”Linux-ajoympäristön ajuri”</string> + <string name="lvd_no_library">Tässä zip-tiedostossa ei ole libvulkan_freedreno*.so-tiedostoa. Android (AdrenoTools)- tai -Wayland-Turnip-zip ei ole Linux-ajoympäristön ajuri.</string> + <string name="lvd_not_aarch64">%1$s ei ole 64-bittinen AArch64 ELF-jaettu kirjasto.</string> + <string name="lvd_not_glibc">%1$s ei ole glibc-ajuri - se linkittää Androidin libc:n. Linux-ajoympäristö tarvitsee ”-Linux”-zipin; tavallista tai ”-Wayland”-Turnipia Steam-asiakasohjelma ei voi ladata lainkaan.</string> + <string name="bundle_no_manifest">Ei ajuripaketti: ei manifest.json-tiedostoa, joka nimeäisi android- ja linux-ajurin</string> + <string name="bundle_entry_outside">Ei ajuripaketti: %1$s osoittaa sen ulkopuolelle</string> + <string name="bundle_too_large">Ei ajuripaketti: se purkautuu yli %1$d MB:n kokoiseksi</string> + + <string name="gstore_sd_card">SD-kortti</string> + <string name="gstore_folder">Kansio</string> + + <string name="logshare_chooser">Jaa istuntolokit</string> + + <string name="hdr_needs_android_10">vaatii Android 10:n tai uudemman (näyttötasot väriavaruudella)</string> + <string name="hdr_none">tämä näyttö ei ilmoita HDR-tukea</string> + <string name="hdr_not_hdr10">tämä näyttö tukee %1$s, ei HDR10:tä</string> + + <string name="gpu_this_gpu">tämä grafiikkapiiri</string> + <string name="phantom_title_on">Lapsiprosessiraja on päällä</string> + <string name="phantom_title_unset">Lapsiprosessirajaa ei ole asetettu</string> + <string name="phantom_title_unreadable">Lapsiprosessirajaa ei voitu tarkistaa</string> + <string name="phantom_title_off">Lapsiprosessiraja on pois päältä</string> + <string name="phantom_title_not_required">Lapsiprosessirajaa ei vaadita</string> + <string name="phantom_instructions_fix">%1$s Jos se ei ole mahdollista, yhdistä tämä laite tietokoneeseen ADB:llä ja suorita alla oleva komento. Palaa tähän ja tarkista uudelleen.</string> + <string name="phantom_instructions_off">Steam-istunnot voivat käynnistyä.</string> + <string name="phantom_instructions_not_applicable">Tämä Android-versio ei käytä tätä rajaa.</string> + <string name="phantom_fix_toggle">Ota käyttöön ”Poista käytöstä alatason prosessirajoitukset” Kehittäjäasetuksissa, ja pidä Kehittäjäasetukset päällä sen jälkeen.</string> + <string name="phantom_fix_no_toggle">Tässä Android-versiossa ei ole kytkintä sille. Käytä langatonta virheenkorjausta muuttaaksesi sitä tältä laitteelta.</string> + <string name="upd_block_no_apk">Tälle versiolle ei ole latausta tähän DroidDeck-kopioon.</string> + <string name="upd_block_version_code">Android ei asenna sitä tämän version päälle, koska sen versionCode %1$d on pienempi kuin asennettu %2$d.</string> + <string name="upd_fail_downgrade">Android ei asenna vanhempaa versiota uudemman päälle. Pysy tässä versiossa, kunnes kanava saavuttaa sen.</string> + <string name="upd_fail_signature">Tämä DroidDeck-kopio on allekirjoitettu eri tavalla (paikallinen käännös?), joten Android ei päivitä sitä paikan päällä.</string> + <string name="upd_fail_storage">Vapaata tilaa ei ole riittävästi päivitykselle.</string> + <string name="upd_fail_aborted">Päivitys peruutettiin.</string> + <string name="upd_fail_with_message">Päivitys ei asentunut: %1$s</string> + <string name="upd_fail_generic">Päivitys ei asentunut.</string> + <string name="saves_layout_zip">%1$s-zip</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s ei ole käynnistetty vielä</string> + <string name="saves_none_found">Tallennustiedostoja ei löytynyt kohteelle %1$s</string> + <string name="saves_not_save_zip">%1$s ei sisällä drive_c-kansiota, joten se ei ole GameHubin tai Winlatorin tallennuszip</string> + <string name="gstore_cannot_create">kansioita ei voida luoda kohteeseen %1$s</string> + <string name="gstore_cannot_write">kohteeseen %1$s ei voida kirjoittaa</string> + <string name="gstore_cannot_write_detail">kohteeseen %1$s ei voida kirjoittaa (%2$s)</string> + <string name="gfiles_folder_unavailable">Kansio ei ole käytettävissä</string> + <string name="gfiles_name_taken">Toinen tiedosto käyttää jo nimeä %1$s</string> + <string name="gfiles_art_unavailable">Kuvituskansio ei ole käytettävissä</string> + <string name="gfiles_unrelated_inventory">Kansiossa on muuhun synkronointiin liittyvä luettelo</string> + <string name="gfiles_remove_failed">Kohdetta %1$s ei voitu poistaa</string> + <string name="gfiles_outside_folder">Tiedosto siirtyy vientikansion ulkopuolelle</string> + <string name="cmgr_fex_unnamed">FEX (versio, jolla ei ole nimeä)</string> + <string name="cmgr_no_profile">ei profile.json-tiedostoa kohteessa %1$s</string> + <string name="cmgr_not_component_package">%1$s ei ole Linux-komponenttipaketti (tyyppi %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s vapaana</string> + <string name="mode_storage_auto_short">Automaattinen</string> + <string name="appupd_catalog_rejected">Päivitysluettelo ei läpäissyt tarkistuksia (%1$s)</string> + <string name="main_adb_clip_label">DroidDeckin lapsiprosessiasetus</string> + <string name="setup_signed_in_offline_unnamed">Kirjautunut · offline-tila</string> + <string name="setup_signed_in_unnamed">Kirjautunut</string> + <string name="driver_tag_bundled">MUKANA</string> + <string name="driver_tag_downloaded">LADATTU</string> + <string name="driver_tag_imported">TUOTU</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Istunnon näyttö</string> + <string name="display_resolution">Tarkkuus</string> + <string name="display_game_fit">16:9-pelin sovitus</string> + <string name="display_game_fit_hint">Miten 16:9-pelit sovitetaan tähän näyttöön. Seuraava istunto.</string> + <string name="display_game_fit_unavailable">Valitse Sovita näyttöön tai mukautettu koko, joka on 16:9:ää kapeampi.</string> + <string name="display_preserve">Säilytä kuvasuhde</string> + <string name="display_stretch">Venytä näyttöön</string> + <string name="display_image_scaling">Kuvan skaalaus</string> + <string name="display_filter">Skaalaussuodatin</string> + <string name="display_filter_hint">Yhteinen Steamille ja Työpöydälle.</string> + <string name="display_filter_live">Vaikuttaa välittömästi. Yhteinen Steamille ja Työpöydälle.</string> + <string name="display_filter_note">FSR, GSR ja NIS vaikuttavat, kun istunnon kuvaa suurennetaan. Vain terävöinti toimii myös suurentamatta.</string> + <string name="display_sharpness">Suodattimen terävyys</string> + <string name="display_frame_rate">Kuvanopeus</string> + <string name="display_look_filter">%1$s Asettaa skaalauksen tilaan %2$s.</string> + <string name="display_match_screen">Sovita näyttöön (%1$d×%2$d)</string> + <string name="display_follow_screen">Seuraa näyttöä (koko muuttuu taitettuna tai avattuna)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Näytä laitteen tiedot</string> + <string name="device_info_hide">Piilota laitteen tiedot</string> + <string name="device_info_loading">Luetaan laitetta…</string> + <string name="device_info_copy">Kopioi</string> + <string name="device_info_copy_hint">Kopioi näitä tietoja virheraporttiin.</string> + <string name="device_info_copied">Kopioitu.</string> + <string name="force_ssbs_title">Pakota SSBS</string> + <string name="force_ssbs_hint">Pitää päällä suoritintehoasetuksen, jonka Wine jatkuvasti sammuttaa. Voi nopeuttaa Windows-pelejä Snapdragon 8 Elite -piirillä; vanhemmilla piireillä vaikutus on pieni. Vaikuttaa seuraavasta pelin käynnistyksestä alkaen.</string> + + <string name="rail_stores">Kaupat</string> + <string name="source_steam">Steam</string> + <string name="source_added">Mukautettu</string> + <string name="setup_stores">Kaupat</string> + <string name="setup_stores_open_on">Avaa kauppa näytöllä</string> + <string name="setup_stores_speed">Latausnopeuden taso</string> + <string name="setup_stores_engine">Kauppojen moottori</string> + <string name="setup_stores_engine_chip_ready">● Moottori valmis</string> + <string name="setup_stores_engine_chip_missing">Ei koottu</string> + <string name="stores_tier_balanced">Tasapainotettu</string> + <string name="stores_tier_fast">Nopea</string> + <string name="stores_tier_max">Maksimi</string> + <string name="stores_title">Kaupat</string> + <string name="stores_settings">Kauppojen asetukset</string> + <string name="stores_settings_eyebrow">Asetukset</string> + <string name="stores_chip_signed_out">(ei kirjautunut)</string> + <string name="stores_tab_store">Kauppa</string> + <string name="stores_tab_installed">Asennetut</string> + <string name="stores_tab_library">Kirjasto</string> + <string name="stores_tab_all">Kaikki</string> + <string name="stores_tab_downloads">Lataukset</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Kirjaudu sisään</string> + <string name="stores_signout_named">%1$s · kirjaudu ulos</string> + <string name="stores_signout_title">Kirjaudutaanko ulos %1$s:stä?</string> + <string name="stores_signout_note">Asennetut pelit säilyvät. Kirjasto haetaan uudelleen, kun kirjaudut takaisin sisään.</string> + <string name="stores_signout_stay">Pysy kirjautuneena</string> + <string name="stores_signout_go">Kirjaudu ulos</string> + <string name="stores_search_catalog">Hae %1$s-luettelosta…</string> + <string name="stores_search_installed">Hae asennetuista peleistä…</string> + <string name="stores_search_library">Hae kirjastostasi…</string> + <string name="stores_search_open">Hae</string> + <string name="stores_installed_empty">Ei mitään asennettuna</string> + <string name="stores_library_loading">Latautuu</string> + <string name="stores_nothing_matches">Ei pelejä</string> + <string name="stores_shelves_loading">Ladataan kauppaa…</string> + <string name="stores_amazon_no_catalog">Ei luetteloa</string> + <string name="stores_shelf_new">Uutuudet</string> + <string name="stores_shelf_deals">Tarjoukset</string> + <string name="stores_shelf_free">Ilmaiset pelit</string> + <string name="stores_shelf_trending">Nousussa</string> + <string name="stores_shelf_library">Kirjastosi</string> + <string name="stores_play">Pelaa</string> + <string name="stores_install">Asenna</string> + <string name="stores_resume_install">Jatka asennusta</string> + <string name="stores_dl_interrupted">Keskeytynyt</string> + <string name="stores_install_size">Asenna · %1$s</string> + <string name="stores_get_free">Hanki ilmaiseksi</string> + <string name="stores_view_on">Näytä %1$s:ssä</string> + <string name="stores_buy_price">Osta · %1$s</string> + <string name="stores_installed_chip">Asennettu</string> + <string name="stores_in_library">Kirjastossa</string> + <string name="stores_free">Ilmainen</string> + <string name="stores_resume">Jatka</string> + <string name="stores_refresh">Päivitä</string> + <string name="stores_sort">Järjestä</string> + <string name="stores_sort_last_played">Viimeksi pelatut</string> + <string name="stores_sort_recently_installed">Viimeksi asennetut</string> + <string name="stores_sort_title_asc">Nimi A–Ö</string> + <string name="stores_sort_title_desc">Nimi Ö–A</string> + <string name="stores_sort_size_desc">Koko: suurin</string> + <string name="stores_sort_size_asc">Koko: pienin</string> + <string name="stores_sort_release_date">Julkaisupäivä</string> + <string name="stores_view_list">Luettelonäkymä</string> + <string name="stores_view_cards">Korttinäkymä</string> + <string name="stores_show_mature">Näytä aikuisille tarkoitettu sisältö</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Pois</string> + <string name="epic_eos">Epic-kirjautuminen (EOS)</string> + <string name="epic_offline">Käynnistä offline-tilassa</string> + <string name="epic_resolve">Ratkaise Epic-kirjautuminen</string> + <string name="epic_client_version">Versio %1$s</string> + <string name="epic_client_no_runtime">Asenna Linux-ajoympäristö ensin</string> + <string name="epic_client_checking">Tarkistetaan uusinta versiota…</string> + <string name="epic_client_unpacking">Puretaan…</string> + <string name="epic_client_unreachable">Latauspalvelin ei vastannut</string> + <string name="epic_client_needs_fex">Epic Games Launcher tarvitsee FEXin, jonka Steam lataa. Avaa launcher uudelleen, kun Steam on käynnistynyt.</string> + <string name="epic_client_download_failed">Lataus epäonnistui: %1$s</string> + <string name="epic_client_unpack_failed">Launcherin purkaminen epäonnistui: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher ei hyväksynyt kirjautumista. Käynnistä se uudelleen launcherista.</string> + <string name="epic_client_uninstall_body">Poistaa käynnistimen ja vapauttaa sen tilan. Epic-pelisi pysyvät asennettuina ja toimivat, ja kirjautuminen säilyy seuraavaa asennusta varten.</string> + <string name="epic_client_uninstall_stops">Käynnissä oleva istunto suljetaan ensin.</string> + <string name="epic_client_uninstalled">Epic Games Launcher poistettu</string> + <string name="epic_client_uninstall_failed">Joitakin käynnistimen tiedostoja ei voitu poistaa. Yritä uudelleen.</string> + <string name="epic_client_uninstalling">Odota, että Epic Games Launcherin asennuksen poisto valmistuu</string> + <string name="store_cloud_saves">Pilvitallennukset</string> + <string name="cloud_upload">Lähetä pilveen</string> + <string name="cloud_download">Lataa pilvestä</string> + <string name="cloud_none">Ei pilvitallennuksia</string> + <string name="cloud_conflict">Pilviristiriita</string> + <string name="cloud_conflict_files">Pilviristiriita · %1$d tiedostoa</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Säilytä pilvi</string> + <string name="cloud_keep_local">Säilytä paikallinen</string> + <string name="cloud_checking">Tarkistetaan pilveä…</string> + <string name="cloud_last_sync">Viimeisin synkronointi %1$s</string> + <string name="cloud_never">Ei synkronoitu vielä</string> + <string name="cloud_done">%1$d tiedostoa</string> + <string name="stores_eyebrow_installed">asennettu</string> + <string name="stores_eyebrow_library">kirjastossasi</string> + <string name="stores_eyebrow_store">kauppa</string> + <string name="achievements_title">Saavutukset</string> + <string name="achievements_count">%1$d / %2$d avattu</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Avattu · %1$d</string> + <string name="achievements_group_locked">Lukittu · %1$d</string> + <string name="achievements_group_hidden">Piilotettu · %1$d</string> + <string name="achievements_hidden">Piilotettu saavutus</string> + <string name="achievements_hidden_detail">Tiedot näytetään, kun se on avattu.</string> + <string name="achievements_all">Kaikki saavutukset avattu</string> + <string name="achievements_reading">Ladataan…</string> + <string name="achievements_signed_out">Kirjaudu sisään %1$s-palveluun nähdäksesi saavutuksesi.</string> + <string name="achievements_unreachable">Yhteyttä %1$s-palveluun ei saatu. Tarkista uudelleen, kun olet verkossa.</string> + <string name="achievements_none">%1$s ei listaa saavutuksia tälle pelille.</string> + <string name="achievements_show_all">Näytä kaikki %1$d</string> + <string name="achievements_dialog_title">Saavutukset · %1$s</string> + <string name="stores_in_steam">✓ Steamissa</string> + <string name="stores_uninstall">Poista asennus</string> + <string name="stores_uninstalling">Poistetaan asennusta…</string> + <string name="stores_uninstall_title">Poistetaanko %1$s:n asennus?</string> + <string name="stores_uninstall_body_size">Vapauttaa %1$s ja poistaa sen Steamista.</string> + <string name="stores_uninstall_body">Poistaa sen tiedostot ja Steam-pikakuvakkeen.</string> + <string name="stores_launch_not_registered">Steam huomaa pelin seuraavan käynnistyksensä yhteydessä; käynnistä se siellä, tai käynnistä Steam nyt.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Steamin valinta pelikohtaisesti</string> + <string name="stores_card_audio">Äänet</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Komponentit</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Moottori</string> + <string name="stores_card_engine_value">%1$s · natiivi</string> + <string name="stores_card_engine_java">%1$s · sisäänrakennettu</string> + <string name="stores_how_it_runs">Miten se toimii</string> + <string name="stores_kv_fetched">Haettu</string> + <string name="stores_kv_fetched_value">%1$s, tilillasi</string> + <string name="stores_kv_installed_to">Asennettu kohteeseen</string> + <string name="stores_kv_installed_to_value">Pelien tallennustila (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Käynnistäjä</string> + <string name="stores_kv_launched_by_value">Steam ja Proton, sama reitti kuin Steam-peleillä</string> + <string name="stores_kv_launched_by_epic">Steam ja Proton · Epic-kirjautuminen joka käynnistyksellä, EOS-overlay pois</string> + <string name="stores_kv_launched_by_amazon">Steam ja Proton · Amazon Games Services -muuttujat asetettu</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">lisätty Steamiin asennuksen yhteydessä (Deck-käyttöliittymä + Steam Input)</string> + <string name="stores_downloads_empty">Ei latauksia</string> + <string name="stores_dl_paused">Keskeytetty</string> + <string name="stores_dl_queued">Jonossa</string> + <string name="stores_dl_queued_at">Jonossa · #%1$d</string> + <string name="stores_dl_cancelled">Peruutettu</string> + <string name="stores_dl_failed">Epäonnistui</string> + <string name="stores_dl_failed_reason">Epäonnistui · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d %%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d %%</string> + <string name="stores_dl_pause">Keskeytä</string> + <string name="stores_dl_resume">Jatka</string> + <string name="stores_dl_cancel">Peruuta</string> + <string name="stores_dl_retry">Yritä uudelleen</string> + <string name="stores_dl_clear">Tyhjennä</string> + <string name="stores_dl_clear_all">Tyhjennä valmiit</string> + <string name="stores_stage_manifest">Manifesti</string> + <string name="stores_stage_download">Lataus</string> + <string name="stores_stage_verify">Tarkistus</string> + <string name="stores_stage_install">Asennus</string> + <string name="stores_stage_done">Valmis</string> + <string name="stores_stage_checking">Tarkistetaan</string> + <string name="stores_stage_downloading">Latautuu</string> + <string name="stores_dl_cancel_confirm">Poistetaanko lataus?</string> + <string name="stores_dl_failed_kept">Epäonnistui · %1$s säilytetty</string> + <string name="stores_stage_verifying">Tarkistetaan</string> + <string name="stores_stage_installing">Asennetaan</string> + <string name="stores_dl_active_percent">%1$s %2$d %%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d tiedostoa</string> + <string name="stores_download_manager">Latausten hallinta</string> + <string name="stores_parallel">Samanaikaisia latauksia</string> + <string name="stores_install_where">Asenna kohteeseen</string> + <string name="stores_install_title">Asenna %1$s:</string> + <string name="stores_target_internal">Sisäinen</string> + <string name="stores_target_free">%1$s vapaana</string> + <string name="stores_target_free_unknown">Vapaa tila tuntematon</string> + <string name="stores_storage_insufficient">Liian vähän vapaata tilaa: tarvitaan %1$s, vapaana vain %2$s</string> + <string name="stores_storage_low">Liian vähän tilaa (vapaana %1$s, tarvitaan %2$s)</string> + <string name="stores_notification_channel">Kauppalataukset</string> + <string name="stores_notification_channel_hint">Näyttää pelin latauksen etenemisen ja pitää lataukset käynnissä taustalla</string> + <string name="stores_notification_one">Latautuu</string> + <string name="stores_notification_many">%1$d latausta</string> + <string name="stores_notification_waiting">Valmistellaan…</string> + <string name="stores_notification_done_channel">Valmiit kauppalataukset</string> + <string name="stores_notification_installed">%1$s asennettu</string> + <string name="stores_notification_failed">%1$s:n lataus epäonnistui</string> + <string name="stores_notification_delete">Poista</string> + <string name="stores_notification_keep">Säilytä</string> + <string name="stores_login_title">Kirjaudu sisään palveluun %1$s</string> + <string name="stores_login_provider_title">Kirjaudu sisään palveluntarjoajallasi</string> + <string name="stores_login_reload">Lataa uudelleen</string> + <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_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> + <string name="stores_login_error_ssl">Yhteys kirjautumissivulle ei ole suojattu.</string> + <string name="stores_login_error_verification">Kirjautumista ei voitu vahvistaa. Yritä uudelleen.</string> + <string name="stores_login_error_generic">Kirjautuminen epäonnistui. Yritä uudelleen.</string> + <string name="common_close">Sulje</string> + <string name="common_back">Takaisin</string> + <string name="common_edit">Muokkaa</string> + <string name="games_add_all">Lisää kaikki tämän kansion pelit</string> + <string name="games_added_none">Ei mitään uutta tässä kansiossa</string> + <string name="edit_name">Nimi</string> + <string name="edit_target">Kohde</string> + <string name="edit_start_in">Käynnistyskansio</string> + <string name="edit_launch_options">Käynnistysasetukset</string> + <string name="edit_artwork">Kuvitus</string> + <string name="edit_other_exe">Toinen exe…</string> + <string name="edit_remove">Poista</string> + <string name="art_cover">Kansikuva</string> + <string name="art_wide_cover">Leveä kansikuva</string> + <string name="art_adjust_logo">Säädä logoa</string> + <string name="logo_pos_default">Oletus</string> + <string name="logo_pos_upper_left">Vasen ylä</string> + <string name="logo_pos_upper_center">Ylä keskellä</string> + <string name="logo_pos_center">Keskellä</string> + <string name="logo_pos_bottom_left">Vasen ala</string> + <string name="logo_pos_bottom_center">Ala keskellä</string> + <string name="logo_pos_position">Sijainti</string> + <string name="logo_pos_size">Koko</string> + <string name="logo_pos_save">Tallenna</string> + <string name="logo_pos_reset">Takaisin oletukseen</string> + <string name="logo_pos_hint">Piirretään pelin taustan päälle, kuten Steam tekee. Tarkka sijainti voi poiketa muutaman pikselin.</string> + <string name="logo_pos_no_logo">Tällä pelillä ei ole vielä logoa. Valitse sellainen kohdasta Logo, niin näet sen tässä.</string> + <string name="logo_pos_failed">Logon sijaintia ei voitu tallentaa. Yritä uudelleen.</string> + <string name="art_background">Tausta</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Kuvake</string> + <string name="art_src_folder">Pelin kansio</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Oma tiedostosi</string> + <string name="art_src_exe">Exe-tiedostosta</string> + <string name="art_src_auto">Automaattinen</string> + <string name="art_pick_image">Valitse kuva…</string> + <string name="art_pick_title">Valitse kuva: %1$s</string> + <string name="art_reset">Palauta automaattiseksi</string> + <string name="art_search_sgdb">Hae SteamGridDB:stä…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Hae peliä</string> + <string name="art_sgdb_other_games">Muut tulokset</string> + <string name="art_sgdb_none">Ei tuloksia.</string> + <string name="art_sgdb_no_key">SteamGridDB vaatii API-avaimen. Lisää omasi kohdassa Asetukset › Käynnistin.</string> + <string name="art_sgdb_bad_key">SteamGridDB ei hyväksynyt API-avainta. Tarkista se kohdassa Asetukset › Käynnistin.</string> + <string name="art_sgdb_limit">SteamGridDB rajoittaa pyyntöjä juuri nyt. Yritä uudelleen minuutin kuluttua.</string> + <string name="art_sgdb_offline">SteamGridDB ei ole tavoitettavissa. Tarkista yhteys.</string> + <string name="art_sgdb_server">SteamGridDB:ssä meni jotain pieleen. Yritä myöhemmin uudelleen.</string> + <string name="art_sgdb_no_game">SteamGridDB:llä ei ole tuloksia tälle pelille. Kokeile hakea sitä.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d peli lisätty</item> + <item quantity="other">%1$d peliä lisätty</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d on jo Peleissä</item> + <item quantity="other">%1$d on jo Peleissä</item> + </plurals> + <string name="hop_back">B · Takaisin %1$s</string> + <string name="hop_from_games">peliin</string> + <string name="hop_from_play">Käynnistysasetuksiin</string> + <string name="sheet_graphics_drivers">Näyttöajurit</string> + <string name="comp_this_proton">Tämä Proton</string> + <string name="comp_every_proton">Kaikki Protonit</string> + <string name="comp_for_every_proton">Kaikille Protoneille</string> + <string name="comp_available_count">Saatavilla · %1$d</string> + <string name="comp_checked">Tarkistettu %1$s</string> + <string name="comp_check_all">Tarkista uudet komponentit ja ajurit</string> + <string name="comp_get">Hae</string> + <string name="comp_proton_bar">%1$s · alla olevat DXVK, VKD3D-Proton ja FEX ovat tämän Protonin</string> + <string name="comp_device_tested">%1$s · testattu</string> + <string name="comp_device_untested">%1$s · testaamaton</string> + <string name="comp_device_unsupported">%1$s · ei tuettu</string> + <string name="gpu_auto_keeps">Pitää suositellun parin ajan tasalla</string> + <string name="gpu_bar_auto">Automaattinen · %1$s</string> + <string name="gpu_separately">Ajoympäristön ja näytön ajurit erikseen</string> + <string name="gpu_use_title">Käytetäänkö %1$s?</string> + <string name="gpu_mode_title">Näin ajurit valitaan</string> + <string name="gpu_mode_auto_detail">Paras pari tälle GPU:lle, aina ajan tasalla</string> + <string name="gpu_mode_pair">Sovitettu pari</string> + <string name="gpu_mode_pair_detail">Valitse pari; asettaa molemmat ajurit</string> + <string name="gpu_mode_mix">Vapaa yhdistely</string> + <string name="gpu_mode_mix_detail">Valitse kuva ja ajonaikaympäristö erikseen</string> + <string name="gpu_mode_pair_short">Pari</string> + <string name="gpu_mode_mix_short">Sekoitus</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PARI</string> + <string name="gpu_src_bundle">PAKETTI</string> + <string name="gpu_src_chosen">VALITTU</string> + <string name="gpu_src_by_gpu">GPU-KOHTAINEN</string> + <string name="gpu_src_default">OLETUS</string> + <string name="gpu_display_live">Piirtää nyt</string> + <string name="gpu_display_pending">Vaatii uudelleenkäynnistyksen · siihen asti piirtää %1$s</string> + <string name="gpu_runtime_live">Aktiivinen</string> + <string name="gpu_runtime_pending">Seuraava istunto · tämä pitää %1$s</string> + <string name="gpu_display_next">Piirtää näytön. Astuu voimaan seuraavasta istunnosta.</string> + <string name="gpu_previous_driver">edellinen ajuri</string> + <string name="gpu_restart_banner">Käynnistä uudelleen vaihtaaksesi kuva-ajurin.</string> + <string name="gpu_restart_blocked">Pysäytä nykyinen istunto ja käynnistä DroidDeck uudelleen vaihtaaksesi kuva-ajurin.</string> + <string name="gpu_restart_now">Käynnistä uudelleen</string> + <string name="gpu_restart_later">Myöhemmin</string> + <string name="gpu_auto_title">Automaattinen valitsi tämän parin GPU:lle %1$s</string> + <string name="gpu_auto_builtin_title">Automaattinen käyttää sisäänrakennettuja ajureita GPU:lle %1$s</string> + <string name="gpu_auto_reason">Valittu %1$s-perheelle. Uudet versiot asennetaan taustalla.</string> + <string name="gpu_pair_title">Valitse pari</string> + <string name="gpu_pair_hint">Pari asettaa kuva-ajurin ja ajonaikaisen ajurin yhdessä.</string> + <string name="gpu_mix_title">Valitse kukin ajuri</string> + <string name="gpu_mix_hint">Paketti täyttää molemmat paikat. Kuvamuutokset astuvat voimaan uudelleenkäynnistyksen jälkeen, ajonaikaiset muutokset seuraavasta istunnosta.</string> + <string name="gpu_change_display">Vaihda kuva-ajuri</string> + <string name="gpu_change_runtime">Vaihda ajonaikainen ajuri</string> + <string name="gpu_autos_pick">AUTOMAATTINEN VALINTA</string> + <string name="gpu_installed">Asennettu</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · käynnistä uudelleen ottaaksesi käyttöön</string> + <string name="gpu_chip_restart">%1$s · vaatii uudelleenkäynnistyksen</string> + <string name="comp_this_device">Tämä laite</string> + <string name="proton_remove_title">Poistetaanko %1$s?</string> + <string name="setup_tab_diagnostics">Diagnostiikka</string> + <string name="setup_ready">Valmis pelattavaksi</string> + <string name="setup_not_ready">Ei vielä valmis pelattavaksi</string> + <string name="setup_ready_runtime">ajoympäristö %1$s</string> + <string name="setup_ready_limit_off">lapsiprosessiraja pois</string> + <string name="setup_ready_signed_in">kirjautuneena nimellä %1$s</string> + <string name="setup_needs_you">Kun jokin tarvitsee sinua</string> + <string name="setup_group_look">Ulkoasu</string> + <string name="setup_group_device">Tämä laite</string> + <string name="setup_group_art">Kirjaston kuvitus</string> + <string name="setup_group_download">Lataus</string> + <string name="setup_download_source">Lähde</string> + <string name="setup_download_source_auto">Automaattinen</string> + <string name="setup_download_source_direct">Suora</string> + <string name="setup_download_source_mirror">Peili</string> + <string name="setup_download_source_custom">Oma etuliite</string> + <string name="setup_download_mirror">Sivusto</string> + <string name="setup_download_prefix">Etuliite</string> + <string name="flathub_eyebrow">LINUX-SOVELLUKSET</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Työpöytäsovelluksia Linux-työpöydälle, avataan Työpöydältä.</string> + <string name="flathub_setup">Ota Flathub käyttöön</string> + <string name="flathub_remove_title">Poistetaanko %1$s?</string> + <string name="flathub_remove_note">Sen asetukset ja tiedostot säilyvät.</string> + <string name="flathub_keep">Säilytä</string> + <string name="desktop_size">Koko levyllä</string> + <string name="desktop_uninstall_title">Poistetaanko työpöydän asennus?</string> + <string name="desktop_all_systems">Kaikki</string> + <string name="gog_achievements">GOG-saavutukset</string> + <string name="gog_achievements_hint">Synkronoi saavutukset tuetuille GOG-peleille. Tulee voimaan seuraavalla käynnistyksellä.</string> + <string name="gog_achievements_off">Saavutukset pois käytöstä</string> + <string name="gog_achievements_on">Saavutukset käytössä</string> + <string name="gog_achievements_signin">Kirjaudu GOG:iin uudelleen</string> + <string name="gog_achievements_uploaded">Saavutukset lähetetty</string> + <string name="gog_achievements_pending">Saavutuksen lähetys odottaa</string> + <string name="gog_achievements_enable_store">Ota GOG-saavutukset käyttöön kauppa-asetuksissa</string> + <string name="gog_achievements_unavailable">Saavutukset ei käytettävissä; tarkista istunnon lokit</string> + <string name="achievement_unlocked">Saavutus avattu</string> + <string name="touch_paste">Liitä</string> + <string name="touch_dpad">Ristiohjain</string> + <string name="touch_left_stick">Vasen tatti</string> + <string name="touch_right_stick">Oikea tatti</string> + <string name="touch_menu">Valikko</string> + <string name="touch_keyboard">Näppäimistö</string> + <string name="touch_dpad_up">Ristiohjain ylös</string> + <string name="touch_dpad_down">Ristiohjain alas</string> + <string name="touch_dpad_left">Ristiohjain vasen</string> + <string name="touch_dpad_right">Ristiohjain oikea</string> + <string name="touch_title">Kosketusohjaimet</string> + <string name="touch_controller">Kosketusohjain</string> + <string name="touch_mouse">Hiiri</string> + <string name="touch_on">Päällä</string> + <string name="touch_off">Pois</string> + <string name="touch_speed_slow">Hidas</string> + <string name="touch_speed_normal">Normaali</string> + <string name="touch_speed_fast">Nopea</string> + <string name="touch_edit_layout">Muokkaa asettelua</string> + <string name="touch_droiddeck_menu">DroidDeck-valikko</string> + <string name="touch_drag_hint">Vedä ohjaimia näytölle</string> + <string name="touch_arrange">Järjestä</string> + <string name="touch_discard">Hylkää</string> + <string name="touch_saving">Tallennetaan…</string> + <string name="touch_icon">Kuvake</string> + <string name="touch_narrower">L−</string> + <string name="touch_wider">L+</string> + <string name="touch_shorter">K−</string> + <string name="touch_taller">K+</string> + <string name="touch_hide">Piilota</string> + <string name="touch_color_opacity">Väri ja peittävyys…</string> + <string name="touch_copy_layout">Kopioi tämä asettelu</string> + <string name="touch_layout_copied">Asettelu kopioitu; liitä se minkä tahansa pelin kosketusasetteluun</string> + <string name="touch_paste_layout">Liitä kopioitu asettelu</string> + <string name="touch_reset_layout">Palauta Steamin oletus</string> + <string name="touch_no_binding">Tällä ohjaimella ei ole sidosta Steamissa, jolle voisi antaa kuvakkeen</string> + <string name="touch_icon_for">Kuvake kohteelle %1$s</string> + <string name="touch_layout_color">Kosketusasettelun väri</string> + <string name="touch_done">Valmis</string> + <string name="touch_save_failed">Kosketusasettelua ei voitu tallentaa</string> + <string name="touch_saved">Kosketusasettelu tallennettu Steamiin</string> + <string name="touch_app_id">Sovellus %1$d</string> + <string name="touch_label_hint">Nimike (valinnainen)</string> + <string name="touch_icons_missing">Steamin kuvakkeita ei löytynyt</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d kuvake Steamista</item> + <item quantity="other">%1$d kuvaketta Steamista</item> + </plurals> + <string name="touch_icon_color">Kuvakkeen väri</string> + <string name="touch_button_color">Painikkeen väri</string> + <string name="touch_no_icon">Ei kuvaketta</string> + + <string name="stores_sync_sign_in">Tarkistetaan kirjautumista…</string> + <string name="stores_sync_library">Haetaan kirjastoasi…</string> + <string name="stores_sync_game_list">Haetaan peliluetteloa…</string> + <string name="stores_sync_details">Ladataan pelien tietoja… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Synkronoidaan %1$d peliä…</item> + <item quantity="other">Synkronoidaan %1$d peliä…</item> + </plurals> + <string name="stores_sync_progress">Synkronoidaan… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Haetaan kansikuvia…</string> + <string name="stores_sync_failed">Synkronointi epäonnistui</string> + <string name="stores_sync_no_games">%1$s-kirjastostasi ei löytynyt pelejä</string> + <string name="stores_sync_amazon_no_answer">Amazon Games ei vastannut kirjastosi suhteen: päivitä sivu tai kirjaudu uudelleen</string> + <string name="stores_sync_gog_unreachable">GOG:iin ei saatu yhteyttä</string> + <string name="stores_sync_gog_unreadable">GOG-kirjastoasi ei voitu lukea</string> + <string name="stores_registering">Rekisteröidytään Steamiin…</string> + <string name="mode_client_arch">Steam-asiakasohjelma</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC-diagnostiikka</string> + <string name="setup_vac_diag_hint">Source-pelit kirjaavat konsolinsa (-condebug); istunnon lokien vac.txt kertoo, onko suojattu vai ei</string> + <string name="load_starting_steam_x64">Käynnistetään Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">x86-64-Steam-asiakasohjelman käytössä</string> + <string name="storage_uninstall_in_x64">Tämä kopio on x86-64-Steam-asiakasohjelmassa. Valitse x86-64 kohdassa Steam-asiakasohjelma ja poista sen asennus sitten täältä.</string> + <string name="storage_uninstall_in_arm64">Tämä kopio on ARM64-Steam-asiakasohjelmassa. Valitse ARM64 kohdassa Steam-asiakasohjelma ja poista sen asennus sitten täältä.</string> + <string name="drawer_page_glasses">Lasit</string> + <string name="glasses_open">VITURE-lasit</string> + <string name="glasses_control">Lasien hallinta</string> + <string name="glasses_driver_missing">Tämä versio ei sisällä näiden lasien ajuria.</string> + <string name="glasses_connection_failed">Laseihin ei saatu yhteyttä. Kytke kaapeli uudelleen tai yritä uudestaan napauttamalla Salli.</string> + <string name="glasses_allow">Salli</string> + <string name="glasses_allow_hint">Anna DroidDeckin säätää lasien virkistystaajuutta, 3D-tilaa, kirkkautta, äänenvoimakkuutta ja tummennusta sekä lukea niiden pään seurantaa.</string> + <string name="glasses_asking">Odotetaan, että sallit sen Androidin kehotteessa…</string> + <string name="glasses_denied">Hallinta hylättiin. Salli se, jotta voit muuttaa lasien asetuksia.</string> + <string name="glasses_no_control">Nämä lasit näyttävät pelin, mutta niiden asetuksia ei voi muuttaa täältä.</string> + <string name="glasses_output">Ulostulo</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Peli laseissa</string> + <string name="glasses_game_on_hint">Näyttää pelin vain laseissa. Pois: puhelin näyttää sen ja Android peilaa puhelimen näyttöä.</string> + <string name="glasses_display">Näyttö</string> + <string name="glasses_refresh">Virkistystaajuus</string> + <string name="glasses_3d">3D (rinnakkain)</string> + <string name="glasses_3d_hint">Vaihda älylasit vierekkäiseen 3D-tilaan. Pään seurantaa ohjataan erikseen.</string> + <string name="glasses_3d_failed">3D-signaalia ei voitu vahvistaa. Yritä uudelleen, kun 2D-kuva palautuu.</string> + <string name="glasses_no_signal">Ei kuvaa: lasit ovat tilassa, jota tämä puhelin ei pysty lähettämään. Pidä niiden 2D/3D-painiketta pohjassa tai irrota ja kytke ne uudelleen.</string> + <string name="glasses_3d_refresh">3D-virkistystaajuus</string> + <string name="glasses_auto3d">3D VR-peleille</string> + <string name="glasses_auto3d_hint">Vaihtaa 3D:hen SteamVR:n ollessa käynnissä ja takaisin sen jälkeen.</string> + <string name="glasses_picture">Kuva</string> + <string name="glasses_picture_hint">Automaattinen toiminto näyttää tasaisen sisällön molemmissa silmissä ja tunnistaa SteamVR:n. Valitse SBS-sisällölle Vierekkäin-peli.</string> + <string name="glasses_picture_auto">Automaattinen</string> + <string name="glasses_picture_screen">Virtuaalinen näyttö</string> + <string name="glasses_picture_sbs">Pelin rinnakkais-3D</string> + <string name="glasses_screen_size">Näytön leveys</string> + <string name="glasses_screen_distance">Näytön etäisyys</string> + <string name="glasses_screen_next_session">Leveys ja etäisyys otetaan käyttöön, kun peli näkyy laseissa virtuaalisena näyttönä.</string> + <string name="glasses_screen_no_output">Nämä asetukset ovat käytössä, kun Peli laseissa on päällä ja peli näkyy niissä.</string> + <string name="glasses_screen_flat_hint">Automaattinen pitää tämän 2D-pelin koko näytön tilassa. Käytä virtuaalista näyttöä, jos haluat säätää sen leveyttä, etäisyyttä ja pään seurantaa.</string> + <string name="glasses_screen_use">Käytä virtuaalista näyttöä</string> + <string name="glasses_screen_direct_hint">SteamVR täyttää näkymän. Säädä sen näkökenttää VR:ssä; leveys ja etäisyys koskevat vain virtuaalinäyttöä.</string> + <string name="glasses_screen_sbs_hint">Rinnakkais-3D-pelit täyttävät kummankin silmän näkymän. Leveys ja etäisyys koskevat vain virtuaalista näyttöä.</string> + <string name="glasses_tracking_flat_hint">Automaattinen pitää tämän 2D-pelin paikallaan näkymässä. Valitse Näyttö-kohdasta Virtuaalinen näyttö, jos haluat käyttää pään seurantaa.</string> + <string name="glasses_tracking_sbs_hint">Pään seuranta koskee virtuaalista näyttöä tai käynnissä olevaa SteamVR-peliä.</string> + <string name="glasses_hardware">Laite</string> + <string name="glasses_brightness">Kirkkaus</string> + <string name="glasses_volume">Äänenvoimakkuus</string> + <string name="glasses_sunblock">Tummennus</string> + <string name="glasses_sunblock_hint">Tummentaa etulinssit.</string> + <string name="glasses_tracking">Seuranta</string> + <string name="glasses_head_tracking">Pään seuranta</string> + <string name="glasses_head_tracking_hint">Lasien omat anturit kääntävät virtuaalista näyttöä ja SteamVR:ää pääsi mukana.</string> + <string name="glasses_recenter">Keskitä näkymä</string> + <string name="glasses_recenter_button">Keskitä näyttö uudelleen</string> + <string name="glasses_vr_fov">SteamVR:n näkökenttä</string> + <string name="glasses_vr_fov_hint">Pienempi tuo SteamVR:n lähemmäs ja täyttää lasit; suurempi näyttää enemmän ympäriltäsi.</string> + <string name="glasses_playing">Pelataan laitteella %1$s</string> + <string name="glasses_calibration">Seurannan kalibrointi</string> + <string name="glasses_calibration_hint">Vähentää ryömintää ja kohdistaa vaakatason.</string> + <string name="glasses_calibration_saved_hint">Tallennettu kalibrointi on käytössä näissä laseissa.</string> + <string name="glasses_calibration_open">Kalibroi</string> + <string name="glasses_calibration_instructions">Aseta kytketyt lasit ylösalaisin vaakasuoralle alustalle niin, että kehys lepää tasaisesti. Napauta Aloita äläkä sitten koske niihin noin 8 sekuntiin. Liike aloittaa mittauksen alusta. Tämä korjaa ryömintää ja kallistusta, ei suuntaa.</string> + <string name="glasses_calibration_settling">Jätä lasit ylösalaisin äläkä koske niihin. Odotetaan, että ne asettuvat…</string> + <string name="glasses_calibration_collecting">Mitataan antureita. Pidä lasit paikallaan.</string> + <string name="glasses_calibration_moving">Liikettä havaittu. Älä koske laseihin; mittaus alkaa automaattisesti alusta.</string> + <string name="glasses_calibration_turn_over">Aseta lasit ylösalaisin vaakasuoralle alustalle. Mittaus alkaa, kun ne ovat oikeassa asennossa.</string> + <string name="glasses_calibration_complete">Kalibrointi tallennettu. Laita lasit päähän ja katso suoraan eteenpäin, napauta sitten Valmis keskittääksesi näkymän.</string> + <string name="glasses_calibration_failed">Kalibrointia ei voitu viedä loppuun. Tarkista yhteys ja pidä lasit paikallaan, yritä sitten uudelleen. Aiempi kalibrointisi on ennallaan.</string> + <string name="glasses_calibration_start">Aloita</string> + <string name="glasses_calibration_done">Valmis</string> + <string name="glasses_calibration_reset">Nollaa seurannan kalibrointi</string> + <string name="glasses_calibration_reset_hint">Poistetaanko tallennettu kalibrointi ja palautetaanko mallin oletukset? Keskitä näkymä, kun olet laittanut lasit takaisin päähän.</string> + <string name="glasses_calibration_reset_button">Nollaa</string> + <string name="hand_camera_group">Käden seuranta</string> + <string name="hand_camera_prompt_title">Seurataanko käsiä vai Joy-Con-ohjaimia puhelimen kameralla?</string> + <string name="hand_camera_prompt_body">Kun ohjainta ei ole kytketty, puhelimen kamera seuraa paljaita käsiäsi VR:ssä: purista peukaloa ja etusormea ​​napsauttamalla, sulje kätesi tarttuaksesi ja käännä kämmentäsi itseäsi kohti ja nipistä avataksesi valikon. Paritettujen Joy-Con-ohjainten kanssa kamera seuraa niiden sijaintia, kun taas Joy-Con-ohjaimet tarjoavat pyöritystä ja painikesyötteitä. Kuvia käsitellään tällä laitteella eikä niitä koskaan tallenneta tai lähetetä.</string> + <string name="hand_camera_rear">Takakamera</string> + <string name="hand_camera_rear_hint">Suositellaan. Yleensä tarkempi ja laajempi.</string> + <string name="hand_camera_front">Etukamera</string> + <string name="hand_camera_front_hint">Kun laitteen takaosa ei voi olla sinua kohti.</string> + <string name="hand_camera_allow">Käytä kameraa</string> + <string name="hand_camera_not_now">Ei nyt</string> + <string name="hand_camera_setting">Käden seuranta kameralla</string> + <string name="hand_camera_setting_hint">Käytä puhelimen kameraa paljain käsin tehtäviin eleisiin tai pariliitettyjen Joy-Con-ohjainten asemointiin VR:ssä. Joy-Con-ohjaimet tarjoavat kierto- ja painikesyötteitä. Seuranta keskeytyy, kun älylasit seuraavat käsiäsi tai Joy-Con-ohjaimiasi. Kuvia käsitellään vain tässä laitteessa.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Kameran käyttöoikeus</string> + <string name="hand_camera_access_hint">Salli kameran käyttö, jotta käden seuranta voi käynnistyä.</string> + <string name="hand_camera_access_denied">Kameran käyttöoikeus on pois päältä. Ota se käyttöön Android-asetuksissa.</string> + <string name="hand_camera_allow_button">Salli</string> + <string name="hand_camera_open_settings">Avaa asetukset</string> + <string name="hand_camera_placement">Kameran sijoitus</string> + <string name="hand_camera_placement_hint">Tarkista, että kamera näkee sinut ennen pelaamista.</string> + <string name="hand_camera_check">Tarkista</string> + <string name="hand_camera_check_title">Kameran sijoitus</string> + <string name="hand_camera_how_rear">Aseta laite pystyyn noin rinnan korkeudelle 1,5–2 metrin päähän niin, että takakamera on sinua kohti. Astu sitten näkyviin kädet ojennettuina.</string> + <string name="hand_camera_how_front">Aseta laite pystyyn noin rinnan korkeudelle 1,5–2 metrin päähän niin, että näyttö on sinua kohti. Astu sitten näkyviin kädet ojennettuina.</string> + <string name="hand_camera_starting">Käynnistetään kameraa…</string> + <string name="hand_camera_stand_up">Laite makaa litteänä. Nosta se pystyyn niin, että kamera on sinua kohti.</string> + <string name="hand_camera_upright">Aseta laite pystympään niin, että kamera on sinua kohti.</string> + <string name="hand_camera_not_seen">Ei vielä näe sinua. Astu näkyviin niin, että pääsi ja hartiasi näkyvät.</string> + <string name="hand_camera_move_back">Astu hieman taaksepäin.</string> + <string name="hand_camera_move_closer">Tule hieman lähemmäs.</string> + <string name="hand_camera_show_hands">Pidä molemmat kädet ojennettuina siellä, missä kamera näkee ne.</string> + <string name="hand_camera_good">Näyttää hyvältä.</string> + <string name="hand_camera_failed">Kamera ei käynnistynyt. Sulje muut sitä käyttävät sovellukset ja yritä uudelleen.</string> + <string name="hand_camera_switch">Vaihda kamera</string> + <string name="hand_camera_skip">Ohita</string> + <string name="hand_camera_done">Valmis</string> + <string name="glasses_xreal_network_missing">Odotetaan lasien USB-Ethernet-yhteyttä. Tämä puhelin ei ehkä tarjoa sitä sovelluksille.</string> + <string name="glasses_xreal_connection_failed">XREAL-yhteys katkesi tai palautti vastauksen, jota ei tueta. Yritetään uudelleen…</string> + <string name="glasses_xreal_experimental">Kokeellinen 1S-tuki. Käytä Follow-tilaa ja poista vakautus käytöstä lasien valikosta. Seurannan suunnat ja näyttötilat vaativat vielä testausta laitteella.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard-tila</string> + <string name="cardboard_mode_hint">Vasemman ja oikean silmän kuvat puhelimen VR-laseille.</string> + <string name="cardboard_source">Kuva</string> + <string name="cardboard_source_screen">Virtuaalinen näyttö</string> + <string name="cardboard_source_sbs">Rinnakkais-3D</string> + <string name="cardboard_viewer">Lasit</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Ei linssiä</string> + <string name="cardboard_ipd">Silmien etäisyys</string> + <string name="cardboard_screen_width">Näytön leveys</string> + <string name="cardboard_screen_distance">Näytön etäisyys</string> + <string name="cardboard_head_tracking">Pään seuranta</string> + <string name="cardboard_no_sensor">Tässä laitteessa ei ole kiertoanturia.</string> + <string name="cardboard_recenter">Keskitä näkymä</string> + <string name="cardboard_recenter_button">Keskitä</string> + <string name="cardboard_steamvr">SteamVR (kokeellinen)</string> + <string name="cardboard_steamvr_install">Asenna</string> + <string name="cardboard_steamvr_installing">Ladataan ja puretaan SteamVR:ää…</string> + <string name="cardboard_steamvr_start">Käynnistä</string> + <string name="cardboard_steamvr_stop">Pysäytä</string> + <string name="cardboard_steamvr_unavailable">Ei käytettävissä tässä istunnossa.</string> + <string name="cardboard_steamvr_failed">SteamVR ei vastannut; tarkista istunnon loki.</string> + <string name="drawer_component_downloads">Lataa komponentteja</string> + <string name="drawer_component_downloads_hint">Lataukset jaetaan Komponentit-sivun kanssa. Valitse yltä ladattu versio, niin sitä käytetään seuraavalla pelin käynnistyksellä.</string> + <string name="drawer_component_choose_download">Valitse ladattava versio</string> + <string name="stores_fact_developer">Kehittäjä</string> + <string name="stores_fact_publisher">Julkaisija</string> + <string name="stores_fact_released">Julkaistu</string> + <string name="stores_hltb_main">Pääosa</string> + <string name="stores_hltb_extras">+ Lisät</string> + <string name="stores_hltb_completionist">Kaikki</string> + <string name="stores_hltb_hours">%1$s t</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="display_picture_position">Kuvan sijainti</string> + <string name="display_position_top">Ylhäällä</string> + <string name="display_position_bottom">Alhaalla</string> + <string name="display_position_center">Keskellä (oletus)</string> + <string name="setup_tab_storage">Tallennustila</string> + <string name="storage_measuring">Mitataan tallennustilaa…</string> + <string name="storage_measuring_hint">Ensimmäisellä kerralla kestää muutaman sekunnin.</string> + <string name="storage_internal">Sisäinen tallennustila</string> + <string name="storage_used_of">%1$s / %2$s käytössä</string> + <string name="storage_free">%1$s vapaana</string> + <string name="storage_droiddeck_uses">DroidDeck käyttää %1$s. Mitattu %2$s.</string> + <string name="storage_rescanning">mitataan uudelleen…</string> + <string name="storage_other_apps">Muut Android-sovellukset</string> + <string name="storage_safe_now">Vapautettavissa nyt</string> + <string name="storage_safe_hint">Käyttämättömät ajonaikaympäristöt, jäänteet, vanhat lokit</string> + <string name="storage_clean_up">Siivotaan…</string> + <string name="storage_session_running">Pysäytä istunto, jos haluat siivota tai poistaa jotain. Koot näkyvät silti.</string> + <string name="storage_where">Mihin se menee</string> + <string name="storage_games">Steam-pelit</string> + <string name="storage_game_data">Pelidata</string> + <string name="storage_game_data_hint">Etuliitteet %1$s · workshop %2$s · shaderit %3$s</string> + <string name="storage_tools">Proton ja ajonaikaympäristöt</string> + <string name="storage_tools_unused">%1$s käyttämätön</string> + <string name="storage_stores">GOG, Epic ja muut kaupat</string> + <string name="storage_stores_hint">Poista ne kohdassa Kaupat</string> + <string name="storage_desktop">Työpöytäsovellukset</string> + <string name="storage_desktop_hint">Flatpak-sovellukset ja ajonaikaympäristöt</string> + <string name="storage_system">Linux-järjestelmä ja Steam-asiakas</string> + <string name="storage_system_hint">Tarvitaan, jotta mitään voi ajaa</string> + <string name="storage_app_data">DroidDeckin tiedot</string> + <string name="storage_app_data_hint">Vanhojen istuntojen lokit %1$s · välimuisti · ajurit</string> + <string name="storage_legend_games">Pelit</string> + <string name="storage_legend_data">Pelidata</string> + <string name="storage_legend_tools">Proton ja ajonaikaympäristöt</string> + <string name="storage_legend_stores">Muut kaupat</string> + <string name="storage_legend_desktop">Työpöytäsovellukset</string> + <string name="storage_legend_system">Linux-järjestelmä</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Siivoa</string> + <string name="storage_clean_up_lede">Mikään tässä ei koske asennettuihin peleihin tai käynnissä oleviin latauksiin.</string> + <string name="storage_nothing_to_clean">Nyt ei ole siivottavaa.</string> + <string name="storage_selected">Valittu: %1$s · %2$s → %3$s vapautuu</string> + <string name="storage_cleaning">Siivotaan…</string> + <string name="storage_free_button">Vapauta %1$s</string> + <string name="storage_freed">Vapautettiin %1$s.</string> + <string name="storage_item_runtimes">Käyttämättömät Steam-ajonaikaympäristöt ja Proton</string> + <string name="storage_item_leftovers">Poistettujen pelien jäänteet</string> + <string name="storage_item_leftovers_unsure">Jäänteet, jotka voivat sisältää tallennuksia</string> + <string name="storage_item_logs">Vanhojen istuntojen lokit</string> + <string name="storage_item_logs_detail">Nykyisen istunnon lokit säilyvät</string> + <string name="storage_item_custom_detail">Mikään peli ei käytä tätä. Asenna se uudelleen kohdassa Komponentit, jos tarvitset sitä.</string> + <string name="storage_item_shaders">Asennettujen pelien shadervälimuisti</string> + <string name="storage_item_shaders_detail">Rakentuu uudelleen pelaamisen aikana. Jokaisen pelin ensimmäiset minuutit nykivät taas.</string> + <string name="storage_tag_safe">Turvallinen</string> + <string name="storage_tag_unused">Käyttämätön</string> + <string name="storage_tag_stutter">Nykiminen</string> + <string name="storage_tag_saves">Tarkista tallennukset</string> + <string name="storage_tag_default">Oletus</string> + <string name="storage_tag_required">Tarvitaan</string> + <string name="storage_tag_not_used">Käyttämätön</string> + <string name="storage_back">Tallennustila</string> + <string name="storage_games_with_data">%1$s tietoineen</string> + <string name="storage_sort_largest">Suurin</string> + <string name="storage_sort_least_played">Vähiten pelattu</string> + <string name="storage_sort_sd">SD-kortilla</string> + <string name="storage_no_games">Täällä ei ole pelejä.</string> + <string name="storage_played">pelattu %1$s</string> + <string name="storage_never_played">Ei koskaan pelattu</string> + <string name="storage_game_parts">Peli %1$s · tiedot %2$s</string> + <string name="storage_uninstall">Poista asennus</string> + <string name="storage_games_note">Asennuksen poisto avaa Steam-ikkunan, jotta Steam pitää kirjaa. Jos haluat siirtää pelin SD-kortille, käytä kohtaa Steam › Asetukset › Tallennustila.</string> + <string name="storage_uninstall_title">Poistetaanko %1$s?</string> + <string name="storage_uninstall_body">Steam avautuu ja pyytää vahvistusta. Se vapauttaa pelin %1$s. Etuliite jää, kunnes siivoat jäänteet, ja Steam Cloud -tallennukset pysyvät tililläsi.</string> + <string name="storage_open_steam">Avaa Steam</string> + <string name="storage_tools_detail">%1$s · %2$s käyttämätön</string> + <string name="storage_remove_unused">Poista käyttämättömät · %1$s</string> + <string name="storage_in_use">Käytössä</string> + <string name="storage_not_used">Käyttämätön</string> + <string name="storage_remove">Poista</string> + <string name="storage_remove_title">Poistetaanko %1$s?</string> + <string name="storage_remove_body">Vapauttaa %1$s. Steam lataa sen uudelleen, jos jokin peli tarvitsee sitä.</string> + <string name="storage_tool_fex_runtime">Tarvitaan Linux x86 -peleille (FEX)</string> + <string name="storage_tool_arm_runtime">Tarvitaan ARM64-Proton-versioille</string> + <string name="storage_tool_redist">Pelien tarvitsemat VC++- ja DirectX-asennukset</string> + <string name="storage_tool_fex">Ajaa Linux x86 -pelejä</string> + <string name="storage_tool_steam">Steam-työkalu</string> + <string name="storage_tool_old_runtime">DroidDeck ajaa pelejä ilman tätä ajonaikaympäristöä</string> + <string name="storage_tool_x86_proton">Proton x86, jota DroidDeck ei pysty ajamaan</string> + <string name="storage_tool_custom_default">Oletus kaikille peleille</string> + <string name="storage_tool_custom_unused">Mikään peli ei käytä tätä</string> + <string name="storage_tool_custom_unknown">Steam-asetuksia ei voi lukea, joten se säilytetään</string> + <string name="storage_cleanup_busy">Odota, kunnes tallennustilan siivous on valmis</string> + <string name="storage_low_title">Vain %1$s vapaana</string> + <string name="storage_low_body">Steam tarvitsee tilaa päivityksille ja shadervälimuistille. Alle 10 GB:ssä pelipäivitykset voivat keskeytyä puolivälissä.</string> + <string name="storage_low_safe">%1$s voidaan vapauttaa turvallisesti.</string> + <string name="storage_free_up">Vapauta tilaa</string> + <string name="storage_play_anyway">Pelaa silti</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d asennettu</item> + <item quantity="other">%d asennettu</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d SD-kortilla</item> + <item quantity="other">%d SD-kortilla</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d työkalu</item> + <item quantity="other">%d työkalua</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Tyhjät etuliitekansiot ja shadervälimuisti %d pelistä</item> + <item quantity="other">Tyhjät etuliitekansiot ja shadervälimuisti %d pelistä</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">%d pelin etuliite sisältää yhä tiedostoja, muun muassa paikallisia tallennuksia. Ota niistä kopio ensin, jos tarvitset niitä.</item> + <item quantity="other">%d pelin etuliitteet sisältävät yhä tiedostoja, muun muassa paikallisia tallennuksia. Ota niistä kopio ensin, jos tarvitset niitä.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d peli</item> + <item quantity="other">%d peliä</item> + </plurals> + <string name="storage_tool_default_proton">DroidDeckin oletus-Proton</string> + <string name="storage_tool_proton">DroidDeckin Proton 11 -vaihtoehto</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d peli käyttää</item> + <item quantity="other">%d peliä käyttää</item> + </plurals> + <string name="storage_legend_components">Komponentit</string> + <string name="storage_components">Komponentit</string> + <string name="storage_item_components">Käyttämättömät komponentit</string> + <string name="storage_component_original">Alkuperäinen %1$s · %2$s</string> + <string name="storage_original_confirm">Vapauttaa %1$s. Palauttaa vain Proton-version, jota ei enää ole asennettu.</string> + <string name="storage_leftovers_unchecked">Ei tarkistettu: Steam-sovelluksen manifestia ei voi lukea, joten poistettujen pelien etuliitteet jäävät, kunnes se onnistuu.</string> + <string name="storage_failed">Epäonnistui: %1$s</string> + <string name="storage_desktop_shared">%1$s jaettua</string> + <string name="storage_data_installed">Asennetut pelit</string> + <string name="storage_data_parts">Etuliite %1$s · shaderit %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Tyhjennä shaderit</string> + <string name="storage_data_leftovers">Poistetut pelit</string> + <string name="storage_steam_app">Steam-sovellus %1$d</string> + <string name="storage_leftover_unsure_detail">Etuliite sisältää yhä tiedostoja, mahdollisesti paikallisia tallennuksia</string> + <string name="storage_leftover_confirm">Tyhjentää Wine-etuliitteen ja shadervälimuistin (%1$s). Ota ensin kopio tarvitsemistasi tallennuksista; Steam Cloud -tallennukset pysyvät tililläsi.</string> + <string name="storage_data_other">Säilytetään</string> + <string name="storage_data_other_title">Muut kuin Steam-pelit ja jaettu Steam-etuliite</string> + <string name="storage_data_other_detail">Kauppojen kautta tai käsin lisättyjen pelien etuliitteet</string> + <string name="storage_components_packages">Ladatut paketit</string> + <string name="storage_components_originals">Säilytetyt alkuperäiset</string> + <string name="storage_components_none">Komponenttipaketteja ei ole ladattu.</string> + <string name="storage_component_in_use">Valittu Protonille tai pelille</string> + <string name="storage_component_unused">Ei valittu missään</string> + <string name="storage_original_kept">Palauttaa asennetun Protonin</string> + <string name="storage_original_old">Proton-versio, jota ei enää ole asennettu</string> + <string name="storage_tag_in_use">Käytössä</string> + <string name="storage_components_note">Käytössä olevat komponentit pysyvät lukittuina. Valitse ne kohdassa Komponentit; täältä poistetut voi ladata siellä uudelleen.</string> + <string name="storage_component_confirm">Vapauttaa %1$s. Itse tuotuja paketteja ei voi ladata uudelleen.</string> + <string name="storage_desktop_detail">%1$s Flatpak-sovelluksille ja niiden jakamalle</string> + <string name="storage_desktop_apps_title">Sovellukset</string> + <string name="storage_desktop_none">Flatpak-sovelluksia ei ole asennettu.</string> + <string name="storage_desktop_shared_title">Sovellusten jakama</string> + <string name="storage_desktop_runtimes">Ajonaikaympäristöt</string> + <string name="storage_desktop_runtimes_detail">Kirjastot, joilla sovellukset pyörivät; käyttämättömät lähtevät kohdasta Poista käyttämättömät</string> + <string name="storage_desktop_cache">Latausvarasto</string> + <string name="storage_desktop_cache_detail">Flatpakin objektivarasto ja ladattu välimuisti</string> + <string name="storage_desktop_prune">Poista käyttämättömät</string> + <string name="storage_desktop_prune_body">Poistaa ajonaikaympäristöt, joita mikään asennettu sovellus ei tarvitse, ja siivoaa Flatpakin objektivaraston. Asennetut sovellukset toimivat edelleen.</string> + <string name="storage_flatpak_uninstall_body">Poistaa sovelluksen (%1$s) ja ajonaikaympäristöt, joita mikään muu ei käytä. Kotikansiosi tiedot säilyvät.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d paketti</item> + <item quantity="other">%d pakettia</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d sovellus</item> + <item quantity="other">%d sovellusta</item> + </plurals> + <string name="boot_movie">Käynnistysvideo</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps näyttää sulavammalta, mutta kuormittaa suoritinta enemmän Steamin käynnistyessä. Steamin omista asetuksista valittu käynnistysvideo on etusijalla.</string> + <string name="boot_movie_sound">Ääni</string> + <string name="boot_movie_custom">Oma video</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV tai WebM. Muut muodot ja yli %1$d Mt:n tiedostot muunnetaan laitteella 720p-WebM-muotoon, enintään %2$d sekuntia.</string> + <string name="boot_movie_import">Tuo</string> + <string name="boot_movie_remove">Poista</string> + <string name="boot_movie_pick">Valitse käynnistysvideo</string> + <string name="boot_movie_imported">%1$s on nyt käynnistysvideo</string> + <string name="boot_movie_imported_silent">%1$s on nyt käynnistysvideo, ilman ääntä</string> + <string name="boot_movie_too_long">Muunnettavan videon pituus saa olla enintään %1$d sekuntia</string> + <string name="boot_movie_converting">Muunnetaan %1$d %%</string> + <string name="boot_movie_converting_started">Muunnetaan %1$s Steamille. Pidä DroidDeck auki.</string> + <string name="boot_movie_unsupported">Laite ei pysty purkamaan videota.</string> + <string name="boot_movie_import_failed">Videon tuonti epäonnistui</string> + <string name="glasses_experimental">Luma Ultra -kamerat — Kokeellinen</string> + <string name="glasses_joycons">Joy-Con-paikan seuranta</string> + <string name="glasses_joycons_hint">Käytä älylasien kameroita pariliitettyjen Joy-Con-ohjainten asemointiin. Kierto- ja painikesyötteet tulevat Joy-Con-ohjaimista. Sijainti arvioidaan, kun ranteesi ovat piilossa. Korvaa paljain käsin käytettävät ohjaimet ja keskeyttää puhelimen kameran seurannan. Osoita Joy-Con-ohjaimet eteenpäin, kun yhdistät tai nollaat seurantakeskuksen.</string> + <string name="glasses_joycons_requires_position">Ota ensin käyttöön sijainnin seuranta. Vaatii liiketunnistuksella varustetut Joy-Con-ohjaimet Android 12:ssa tai uudemmassa käyttöjärjestelmässä. Oletusarvoisesti pois päältä.</string> + <string name="setup_tab_glasses">Älylasit</string> + <string name="setup_glasses_scope">Näyttö- ja päänseuranta-asetukset jaetaan DroidDeck-valikoiden, pelien ja työpöytäistuntojen välillä.</string> + <string name="setup_glasses_connect">Yhdistä älylasit muuttaaksesi niiden näyttö- ja seuranta-asetuksia. Tallennetut asetuksesi säilyvät, kun irrotat yhteyden.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Näyttötila</string> + <string name="glasses_output_2d">2D-ulostulo</string> + <string name="glasses_output_3d">3D-ulostulo</string> + <string name="glasses_picture_group">Kuva ja virtuaalinäyttö</string> + <string name="glasses_position_group">Sijainti ja lattiataso</string> + <string name="glasses_hands_group">Käsien seuranta — Kokeellinen</string> + <string name="glasses_tracking_status">Seurannan tila</string> + <string name="glasses_resolution_2d">2D-resoluutio</string> + <string name="glasses_resolution_3d">3D-resoluutio</string> + <string name="glasses_resolution_vr">VR-resoluutio</string> + <string name="glasses_resolution_auto">Automaattinen</string> + <string name="glasses_resolution_inherit">Sama kuin 2D / 3D</string> + <string name="glasses_resolution_hint">Lähtöresoluutio silmää kohden.</string> + <string name="glasses_refresh_30_hint">Ota käyttöön älylasien pelitoiminto valitaksesi näytön natiivin 30 Hz:n tilan.</string> + <string name="glasses_3dof">3DoF-virtuaalinäyttö</string> + <string name="glasses_3dof_hint">Ankkuroi tasaiset pelit eteesi, jotta voit katsella ympärillesi. Mahdollistaa älylasien pelitoiminnon ilman 3D-tilaan vaihtamista.</string> + <string name="glasses_screen_app_wide">Leveys ja etäisyys päivittävät seuratun virtuaalinäytön DroidDeck-valikoissa, peleissä ja työpöytäistunnoissa välittömästi.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Sijainnin seuranta sisältää pään kierron SteamVR:ssä. Jos haluat vain kierron seurannan, poista sijainnin seuranta käytöstä.</string> + <string name="glasses_head_tracking_spatial_hint">Ohjaa pään liikettä virtuaalinäytöllä. Sijainnin seuranta sisältää pään kierron SteamVR:ssä.</string> + <string name="glasses_quick_actions">Pikatoiminnot</string> + <string name="glasses_recenter_screen_hint">Katso, mihin haluat näytön sijoittuvan, ja nollaa sitten seurantakeskus asettaaksesi sen korkeuden ja suunnan.</string> + <string name="glasses_recenter_joycons_button">Keskitä Joy-Con-ohjaimet uudelleen</string> + <string name="phone_camera_tracking_group">Puhelimen kamera — Kokeellinen</string> + <string name="phone_camera_tracking_setting">Käsien tai Joy-Con-ohjainten seuranta</string> + <string name="glasses_6dof">6DoF-virtuaalinäyttö</string> + <string name="glasses_position">Sijainnin seuranta — kokeellinen</string> + <string name="glasses_position_hint">Fyysinen liike VR:ssä ja virtuaalinäyttöjen ympärillä. Seurannan uudelleenkäynnistäminen kestää hetken.</string> + <string name="glasses_eye_height">Nykyinen silmien korkeus lattiasta</string> + <string name="glasses_floor">Aseta lattiataso nykyisestä korkeudesta</string> + <string name="glasses_floor_set">Aseta lattiataso</string> + <string name="glasses_spatial_setup">Stereokameran asetukset ja diagnostiikka</string> + <string name="glasses_spatial_setup_hint">Tarkista kameran kalibrointi ja käsien seuranta ennen pelaamista.</string> + <string name="glasses_spatial_open">Avaa asetukset</string> + <string name="glasses_hands">Paljain käsin käytettävät ohjaimet</string> + <string name="glasses_hands_hint">Käytä älylasien kameroita tähtäämiseen käsilläsi, nipistämällä klikkaamiseen ja sulkemalla kätesi tarttumiseen VR:ssä. Peliohjaimen sauvat liikkuvat ja kääntyvät. Korvaa Joy-Con-paikan seurannan. Seuranta voi viiveellä tai kadota pelien aikana.</string> + <string name="glasses_hands_ready_hint">Ota käyttöön paljain käsin käytettävät ohjaimet Luma Ultra -kameroiden alla Seurannassa. Näytä avoimet kädet ensin.</string> + <string name="glasses_hands_base">Jaettu Luma Ultra -kalibrointi</string> + <string name="glasses_hands_base_hint">Jaetun Luma Ultra -jalustan käyttö. Kalibroi omat älylasisi varmistaaksesi niiden tarkkuuden.</string> + <string name="glasses_hands_calibration_verified">Mitattu kalibrointi vahvistettu</string> + <string name="glasses_hands_calibration_required">Vahvistus vaaditaan</string> + <string name="glasses_hands_calibration_required_hint">Paljain käsin käytettävät ohjaimet tulevat saataville, kun mitattu etäisyystarkistus on suoritettu.</string> + <string name="tracking_recovery_lost">Seuranta menetetty</string> + <string name="tracking_recovery_look">Katsele hitaasti ympärillesi hyvin valaistussa huoneessa.\nPidä seurantakameroiden näkymä esteettömänä ja katso huonekaluja tai muita näkyviä yksityiskohtia kohti.</string> + <string name="tracking_recovery_restart_help">Oletko edelleen jumissa? Puhelimessa: älylasit → Seuranta → Avaa asetukset → Näytä diagnostiikka → Aloita seuranta uudelleen.</string> + <string name="tracking_recovery_disconnected">Älylasit irrotettu</string> + <string name="tracking_recovery_connect">Tarkista USB-yhteys ja yhdistä älylasit uudelleen.\nHyväksy puhelimesi USB-käyttökehote, jos se tulee näkyviin.</string> + <string name="tracking_recovery_usb_help">Kun yhteys on muodostettu, katso hitaasti ympärillesi hyvin valaistussa huoneessa jäljityksen palauttamiseksi.</string> + <string name="tracking_recovery_recenter">Uudelleenkeskitys tarvitaan</string> + <string name="tracking_recovery_recenter_steps">Seuranta on palannut uuteen sijaintiin.\nKatso eteenpäin ja napauta sitten \"nollaa seurantakeskus\" puhelimessasi.</string> + <string name="tracking_recovery_recenter_help">Seurantakeskuksen nollaus löytyy myös kohdasta älylasit → Seuranta → Avaa asetukset. Tallennettu kameran kalibrointi säilytetään.</string> + <string name="tracking_recovery_stabilizing">Pysy paikallaan hetki</string> + <string name="tracking_recovery_hold">Seurantakeskuksen nollaus on käynnissä.\nPidä älylasit paikoillaan seurannan vakiintumisen ajan.</string> + <string name="tracking_recovery_automatic">Tämä näyttö sulkeutuu automaattisesti, kun pään seuranta on valmis.</string> + <string name="glasses_steady_hand_aim">Stabiloitu tähtäys käsillä</string> + <string name="glasses_steady_hand_aim_hint">Tähtää olkapäältä kämmenen läpi. Sammuta ranteella ohjattua pyöritystä varten.</string> + <string name="spatial_title">Tila-asetukset</string> + <string name="spatial_wait_tracking">Odotetaan seurantaa…</string> + <string name="spatial_cameras_description">Vasen ja oikea seurantakamera</string> + <string name="spatial_camera_sync">Kameran synkronointi</string> + <string name="spatial_ready">Valmis</string> + <string name="spatial_sync_hint">Odotetaan kameran ja päänseurannan linjaamista. Pidä älylasit kytkettynä.</string> + <string name="spatial_prepare">1. Valmistele kalibrointikohde</string> + <string name="spatial_print_actual">Tulosta todellisessa koossa</string> + <string name="spatial_print_hint">Jokaisen neliön on oltava kooltaan 30 mm (1,181 tuumaa). Asenna arkki tasaisesti jäykälle alustalle hyvin valaistulle alueelle.</string> + <string name="spatial_print">Tulosta kalibrointikuvio</string> + <string name="spatial_capture_group">2. Tallenna erilaisia näkymiä</string> + <string name="spatial_board_stationary">Pidä kalibrointikohde paikallaan</string> + <string name="spatial_capture_hint">Siirrä älylaseja lähemmäs, kauemmas ja sivuttain. Käännä niitä vasemmalle/oikealle, kallista niitä ylös/alas ja kallista sivuttain. Pidä kalibrointikohde molemmissa kameroissa ja keskeytä hetki ennen jokaista kuvausta.</string> + <string name="spatial_start">Aloita uusi kalibrointi</string> + <string name="spatial_wait_sync">Odotetaan kameran synkronointia.</string> + <string name="spatial_start_hint">Aloita uusi kalibrointi näkymien keräämiseksi.</string> + <string name="spatial_views_hint">Pidä kalibrointitavoite näkyvissä molemmissa esikatseluissa. Tallenna vähintään 24 terävää näkymää eri kulmista.</string> + <string name="spatial_capturing">Kuvataan…</string> + <string name="spatial_capture">Kaappaa kalibroinnin kohdenäkymä</string> + <string name="spatial_alignment">Laske kameran kohdistus</string> + <string name="spatial_calculating">Lasketaan…</string> + <string name="spatial_calculate">Laske kalibrointi</string> + <string name="spatial_distance_group">3. Tarkista etäisyys</string> + <string name="spatial_distance">Mitattu etäisyys</string> + <string name="spatial_distance_hint">Aloita 12 tuumasta tai 30 cm:stä, jotta painetut merkit on helpompi havaita. Valitse tarkka mitta, jota käytät.</string> + <string name="spatial_camera_board_distance">Vasemman kameran ja kalibrointikohteen keskipisteen välinen etäisyys</string> + <string name="spatial_checking_distance">Tarkistetaan etäisyyttä…</string> + <string name="spatial_validate">Vahvista etäisyys</string> + <string name="spatial_diagnostics">Diagnostiikka</string> + <string name="spatial_show_diagnostics">Näytä diagnostiikka</string> + <string name="spatial_diagnostics_hint">Kameran ajoituksen ja seurannan palautustyökalut.</string> + <string name="spatial_camera_timing">Kameran ajoitus</string> + <string name="spatial_hand_input">Syöttö käsien seurannasta</string> + <string name="spatial_wait_timing">Odotetaan kameran ajoitusta.</string> + <string name="spatial_frames">Kamerakuvat</string> + <string name="spatial_gpu">GPU-käsien tunnistus</string> + <string name="spatial_gpu_hint">CPU on oletusarvo. GPU on kokeellinen ja voi saada SteamVR:n käynnistymään uudelleen. Tämä valinta nollautuu, kun seuranta käynnistetään uudelleen.</string> + <string name="spatial_lite">Käsimallien kevyt tunnistus</string> + <string name="spatial_lite_hint">Käytä Lite-kämmenilmaisinta ja Lite-avainpisteitä käsissä. Tarkista kohdistus, puristus ja tartuntatarkkuus. Nollautuu, kun seuranta käynnistyy uudelleen.</string> + <string name="spatial_adaptive">Automaattinen syöttötaajuus käsien seurantaan</string> + <string name="spatial_adaptive_hint">Säädä tulo prosessointinopeuden mukaan. Nollautuu, kun seuranta käynnistyy uudelleen.</string> + <string name="spatial_half_rate">Rajoita tulotaajuutta käsien seurannassa</string> + <string name="spatial_half_rate_hint">Käytä puolet kameran kuvista. Sammuta, jos haluat verrata enimmäistaajuutta. Nollautuu, kun seuranta käynnistyy uudelleen.</string> + <string name="spatial_diagnostic_capture">Diagnostinen sieppaus</string> + <string name="spatial_diagnostic_capture_hint">Tallenna yksi stereokuvapari paikallisesti. Kuvat tallennetaan vain pyydettäessä.</string> + <string name="spatial_save_frame">Tallenna kamerakuva</string> + <string name="spatial_restart_tracking">Aloita seuranta uudelleen</string> + <string name="spatial_restart_hint">Käytä, jos seuranta ei palaudu hyvin valaistulla alueella. Uudelleenkäynnistys vaatii uuden seurantalähteen.</string> + <string name="spatial_restart">Käynnistä uudelleen</string> + <string name="spatial_restart_title">Aloitetaanko seuranta uudelleen?</string> + <string name="spatial_restart_confirm">Tallentamattomat kalibrointinäkymät menetetään. Pidä älylasit paikoillaan tämän jälkeen ja nollaa seurantakeskus, kun seuranta on palautettu.</string> + <string name="spatial_views_count">%1$d / 24 katselukertaa</string> + <string name="spatial_capture_paused">Kuvaus keskeytetty: %1$s</string> + <string name="spatial_measure_hint">Toimenpide %1$s. Näytä täydellinen kalibrointikohde molemmissa esikatseluissa ja pidä sitten paikallaan.</string> + <string name="spatial_timing_values">%1$.1f Hz • kuvan ikä %2$.1f ms • käsittely %3$.1f ms</string> + <string name="spatial_input_values">Tuloraja %1$.1f Hz • %2$.0f%% kamerakuvia. Pään seuranta jatkuu maksimitaajuudellaan.</string> + <string name="spatial_frame_counts">%1$d käsitelty • %2$d pudonnut • %3$d ohitettu syöttörajan mukaan</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck – Luma Ultra -kalibrointi</string> + <string name="spatial_print_scale" formatted="false">Tulosta 100% / todellinen koko. Jokainen neliö: 30 mm (1,181 tuumaa).</string> + <string name="spatial_print_stationary">Pidä kalibrointikohde tasaisena ja paikallaan; siirrä älylaseja kuvausten välillä.</string> + <string name="spatial_print_check">Mittakaavatarkistus: 100 mm (3,937 tuumaa) punkkien välillä</string> + <string name="spatial_distance_12in">12 tuumaa (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 tuumaa)</string> + <string name="spatial_distance_20in">20 tuumaa (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 tuumaa)</string> + <string name="spatial_disabled">Ei käytössä</string> + <string name="spatial_wait_stable">Odotetaan vakaata seurantaa</string> + <string name="spatial_disconnected">Yhteys katkaistu</string> + <string name="spatial_hands_off">Paljain käsin ohjattavat ohjaimet ovat pois päältä</string> + <string name="spatial_tracking_off">Paikanseuranta on pois päältä tai älylasit on irrotettu</string> + <string name="spatial_recenter_pending">Seurantakeskuksen nollausta pyydetty – pidä paikallasi, kun seuranta vakautuu.</string> + <string name="spatial_tracking_lost">Seuranta menetetty – kohtaa hyvin valaistu alue, jossa on näkyviä yksityiskohtia</string> + <string name="spatial_origin_changed">Seurannan lähtöpiste muuttunut – napauta seurantakeskuksen nollausta ja pidä sitten paikallasi.</string> + <string name="spatial_active">6DoF aktiivinen</string> + <string name="spatial_connect_hint">Liitä Luma Ultra ja ota sijainnin seuranta käyttöön.</string> + <string name="spatial_validation_session">Tämän yhteyden kalibrointi on vahvistettu.</string> + <string name="spatial_validation_saved">Kalibrointi vahvistettu ja tallennettu.</string> + <string name="spatial_wait_cameras">Odotetaan stereokameroita</string> + <string name="spatial_wait_hands">Odotetaan käsien seurantaa</string> + <string name="spatial_collect_instructions">Pidä 5 × 7 -kalibrointitavoite paikallaan. Tallenna yli 24 näkymää liikuttamalla ja pyörittämällä älylaseja.</string> + <string name="spatial_capture_pending">Odotetaan seuraavaa kamerakuvaa. Pidä älylasit paikallaan.</string> + <string name="spatial_validation_pending">Tarkistetaan seuraavaa kamerakuvaa. Pidä koko kalibrointitavoite näkyvissä ja pidä paikallaan.</string> + <string name="spatial_start_first">Aloita kalibrointi ensin</string> + <string name="spatial_no_camera_frame">Uusi kamerakuva ei saapunut. Tarkista älylasien yhteys ja kameran esikatselu ja yritä sitten uudelleen.</string> + <string name="spatial_clock_reset">Kameran kellon nollaus</string> + <string name="spatial_frame_changed">Seurantakoordinaatisto muuttunut. Näkymäsi tallennetaan uudelleenlaskentaa varten. Nollaa seurantakeskus ja aloita uusi sarja useampien näkymien tallentamiseksi.</string> + <string name="spatial_device_loaded">laitteen kalibrointi ladattu</string> + <string name="spatial_base_loaded">Luma Ultra -peruskalibrointi ladattu</string> + <string name="spatial_calibration_needed">kalibrointi vaaditaan</string> + <string name="spatial_tap_start">Napauta Aloita uusi kalibrointi ensin.</string> + <string name="spatial_capture_recenter_pending">Seurantakeskuksen nollaus odottaa vakaata seurantaa. Pysy paikallasi hetki.</string> + <string name="spatial_capture_recenter">Seuranta muuttunut. Napauta seurantakeskuksen nollausta kerran ja pidä sitten paikallasi ennen kuvaamista.</string> + <string name="spatial_capture_unsynchronized">Kuvaus hylätty: pään seuranta ei ollut synkronoitu tai se muuttui kuvauksen aikana. Pysy paikallasi ja yritä uudelleen.</string> + <string name="spatial_align_first">Laske kameran kohdistus ennen etäisyyden tarkistamista.</string> + <string name="spatial_processing_failed">Kameran käsittely epäonnistui</string> + <string name="spatial_hand_head_changed">Pään seuranta muuttui käsien havaitsemisen aikana</string> + <string name="spatial_hand_wait_sync">Odotetaan kameran ja pään synkronointia</string> + <string name="spatial_no_wrists">Ranteita ei havaittu. Pidä Joy-Con-ohjaimesi kahvat älylasien edessä</string> + <string name="spatial_no_hands">Käsiä ei havaittu. Näytä avoimet kämmenet älylasien edessä</string> + <string name="spatial_one_camera_wrists">Ranteet näkyvät vain yhdessä kamerassa; pidä ohjaimen kahvat jaetussa näkymässä</string> + <string name="spatial_one_camera_hands">Kädet näkyvät vain yhdessä kamerassa; pidä molemmat kämmenet yhteisessä näkymässä</string> + <string name="spatial_ambiguous_hands">Molemmat kamerat näkevät kädet, mutta vasen/oikea vastaavuus on epäselvä</string> + <string name="spatial_inconsistent_depth">Kädet havaittu, mutta stereosyvyys on epäjohdonmukainen</string> + <string name="spatial_rejected_wrist">Ranteen asento hylätty stereo- tai liiketarkistuksella</string> + <string name="spatial_inconsistent_palm">Stereopisteet havaittu, mutta kämmengeometria on epäjohdonmukainen</string> + <string name="spatial_hands_need_calibration">Suorita kalibrointi ja etäisyyden tarkistus käsien mahdollistamiseksi</string> + <string name="spatial_hands_wait_stable">Odotetaan vakaata pään seurantaa; nollaa seurantakeskus pyydettäessä.</string> + <string name="spatial_old_frame">Kamerahavainto on liian vanha; uutta paria odotellessa</string> + <string name="spatial_fit_ready">Sovita %1$.2f px. Mittaa valitsemasi etäisyys vasemmasta kamerasta kalibrointikohteen keskustaan ​​ja vahvista sitten.</string> + <string name="spatial_opencv_error">OpenCV ei saatavilla: %1$s</string> + <string name="spatial_restored">%1$d tallennettua näkymää palautettu. Laske kalibrointi yrittääksesi uudelleen tai aloita uusi sarja, jos haluat ottaa lisää.</string> + <string name="spatial_captured">Kuvattu %1$d / 24 katselukertaa. Pidä kalibrointitavoite kiinteänä; siirrä älylaseja seuraavaa näkymää varten.</string> + <string name="spatial_capture_corners">Kuvaus hylätty: %1$d / 12 vaadittua kulmaa näkyvissä molemmissa kameroissa. Näytä lisää kalibrointikohdetta, pidä paikallaan ja yritä sitten uudelleen.</string> + <string name="spatial_validation_error">Etäisyyden tarkistusta ei voitu suorittaa loppuun: %1$s. Yritä uudelleen.</string> + <string name="spatial_inference_error">Käsien tunnistus ei ole käytettävissä: %1$s. Vaihda CPU/GPU tai vaihda ohjaimia, joita käytetään paljain käsin, jotta voit yrittää uudelleen.</string> + <string name="spatial_hand_timeout">Käsien tunnistus ylitti %1$d ms; havainto hylätty</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con-ranteen asentoa stereolla mitattuna</string> + <string name="spatial_palms_tracked">Seuratut kämmenet: %1$d / 2; nipistysele valmis: %2$d; tarttumaele valmis: %3$d</string> + <string name="spatial_capture_saved">Tallennettu diagnostiikkakaappaus kohteeseen %1$s</string> + <string name="spatial_hand_error">Käsien seuranta pysäytetty: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Pään seuranta ja kalibrointitavoite eroavat toisistaan %1$s:lla (raja 5 cm / 2 tuumaa). Pidä kalibrointitavoite kiinteänä ja odota tasaista seurantaa ennen uuden sarjan aloittamista. Käännä ja kallista älylaseja varovasti; tauko ennen jokaista sieppausta.</string> + <string name="spatial_need_views">Tallenna vähintään 24 erilaista näkymää paikallaan olevasta kalibrointikohteesta.</string> + <string name="spatial_need_rotation">Käännä älylaseja vasemmalle ja oikealle ja kallista niitä ylös ja alas; liike ilman pyöritystä ei voi kalibroida kameran kohdistusta.</string> + <string name="spatial_bad_baseline">Epäuskottava kameran perusviiva</string> + <string name="spatial_need_orientations">Liikuta päätäsi monipuolisemmissa asennoissa.</string> + <string name="spatial_bad_rotation">Virheellinen kameran ja pään välinen kierto</string> + <string name="spatial_bad_alignment">Kameran ja pään välinen kohdistus on epäjohdonmukainen.</string> + <string name="spatial_calibration_error">Kalibrointia ei voitu suorittaa loppuun. %1$s Tallennetut näkymät tallennetaan.</string> + <string name="spatial_reprojection_error">Pidätetty toistovirhe %1$.2f px ylittää 2 pikseliä. Kalibroi uudelleen.</string> + <string name="spatial_distance_corners">%1$d / 24 shakkilaudan kulmaa havaittu molemmissa kameroissa. Pidä koko kalibrointitavoite näkyvissä ja pidä paikallaan. Jos se on jo näkyvissä, valitse 12 tuumaa tai 30 cm ja mittaa lähempi etäisyys ennen kuin yrität uudelleen.</string> + <string name="spatial_distance_depth">Kalibrointikohde on näkyvissä, mutta sen syvyyttä ei voitu mitata luotettavasti. Pidä älylaseja paikallaan ja pidä kalibrointikohde tasaisena ja hyvin valaistuna. Yritä sitten uudelleen.</string> + <string name="spatial_distance_invalid">Kameran mittaus oli virheellinen. Pysy paikallaan ja yritä uudelleen.</string> + <string name="spatial_distance_passed">Etäisyystarkastus läpäisty.</string> + <string name="spatial_distance_retry">Tarkista etäisyys vasemmasta kamerasta kalibrointikohteen keskustaan ​​ja yritä sitten uudelleen.</string> + <string name="spatial_distance_result">Kamerat mitattu %1$s; valittu etäisyys %2$s. %3$s</string> + <string name="spatial_wait_previews">Odota molempien kameroiden esikatselua ennen kalibroinnin aloittamista.</string> + <string name="spatial_saved_views_hint">Tallennetut näkymät voidaan laskea uudelleen. Aloita uusi kalibrointi kaapataksesi nykyiseen seurantakoordinaattijärjestelmään.</string> + <string name="spatial_model_checksum_error">Käsimallin tarkistussumman epäsuhta</string> + <string name="spatial_opencv_load_error">OpenCV:tä ei voitu ladata</string> +</resources> diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index cac95004b1..5d2323f912 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="steamvr_recovery_title">Le rendu graphique de SteamVR s\'est arrêté</string> + <string name="steamvr_recovery_countdown">DroidDeck va redémarrer dans %1$d secondes pour réinitialiser le rendu graphique et rouvrir SteamVR. Votre jeu en cours sera fermé ; la progression non sauvegardée ne pourra pas être récupérée.</string> + <string name="steamvr_recovery_repeated">Le problème graphique est réapparu après un redémarrage récent. La récupération automatique est suspendue pour éviter une boucle. Redémarrer fermera votre jeu ; la progression non sauvegardée ne pourra pas être récupérée.</string> + <string name="steamvr_recovery_restart">Redémarrer maintenant</string> + <string name="steamvr_recovery_cancel">Garder ouvert</string> + <string name="steamvr_recovery_restarting">Réinitialisation du rendu graphique et réouverture de SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck n\'a pas pu redémarrer automatiquement. Fermez complètement l\'application, puis rouvrez-la.</string> <string name="app_name">DroidDeck</string> <string-array name="loading_hints"> <item>Le premier lancement télécharge Steam. Cela peut prendre quelques minutes.</item> @@ -15,8 +22,10 @@ <string name="session_channel">Session</string> <string name="session_channel_description">Affiché lorsqu\'une session Steam ou Bureau est ouverte</string> <string name="session_notification">Steam est en cours d\'exécution</string> + <string name="session_notification_downloads">Téléchargement Steam en cours</string> <string name="session_notification_paused">Session en pause - Appuyez pour reprendre quand vous êtes prêt</string> <string name="resume_session">Reprendre</string> + <string name="suspend_now">Mettre en pause maintenant</string> <string name="stop_session">Terminer cette session</string> <string name="frame_gen_title">Génération d\'images</string> <string name="frame_gen_hint">Sélectionnez le mode de génération d\'images à utiliser</string> @@ -56,7 +65,7 @@ <string name="game_env_save">Enregistrer</string> <string name="game_env_remove">Supprimer</string> <string name="game_env_restore">Rétablir l\'héritage</string> - <string name="game_env_reset">Réinitialiser ce profil</string> + <string name="game_env_reset">Effacer les remplacements d\'environnement</string> <string name="game_env_unset">Annuler la définition pour ce profil</string> <string name="game_env_empty">Aucune variable définie.</string> <string name="game_env_inherited">Hérité</string> @@ -72,11 +81,21 @@ <string name="game_env_vkd3d_config">Options VKD3D pour D3D12. nodxr désactive le ray tracing ; à utiliser uniquement si le jeu le nécessite.</string> <string name="game_env_proton_log">Définir sur 1 pour générer un journal de diagnostic Proton. La journalisation peut réduire les performances et consommer de l\'espace de stockage.</string> <string name="game_env_wined3d">Définir sur 1 pour utiliser WineD3D (basé sur OpenGL) au lieu de DXVK, pour tester la compatibilité D3D9–11.</string> + <string name="game_env_no_ntsync">Définir sur 1 pour que ce jeu n\'utilise pas ntsync (droiddeck-ntsync ou un pilote du noyau) ; il utilise droiddeck-esync si un pack existe, sinon droiddeck-fsync.</string> + <string name="game_env_no_esync">Définir sur 1 pour désactiver droiddeck-esync pour ce jeu ; il utilise alors droiddeck-fsync, ou droiddeck-ntsync si fsync est aussi désactivé.</string> + <string name="game_env_no_fsync">Définir sur 1 pour que ce jeu n\'utilise pas droiddeck-fsync ; il utilise droiddeck-esync si un pack existe, sinon droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Définir sur 1 pour exécuter ce jeu avec droiddeck-fsync, ou sur 0 pour donner la priorité à droiddeck-esync si un pack correspond à son Proton.</string> <string name="game_env_xalia">Définir sur 0 pour désactiver l\'assistant de navigation à la manette de Proton pour ce jeu.</string> <string name="game_env_hud">Superposition DXVK pour D3D9–11. fps affiche le taux de rafraîchissement ; annuler la définition masque la superposition.</string> <string name="game_env_dxvk_config">Paramètres DXVK séparés par des points-virgules. Les versions récentes utilisent dxvk.maxFrameRate pour limiter le taux de rafraîchissement ; pour un jeu quotidien, il est recommandé d\'utiliser le limiteur de taux de rafraîchissement de session.</string> <string name="game_env_vkd3d_limit">Limite de taux de rafraîchissement D3D12. 0 désactive la limite.</string> <string name="game_env_glthread">Mesa OpenGL multithread. Pour les jeux OpenGL limités par le CPU, true peut aider ; à tester jeu par jeu.</string> + <string name="sync_backend_title">Synchronisation Wine</string> + <string name="sync_backend_hint">Comment les jeux synchronisent leurs threads. Prendra effet à la prochaine session.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> <string name="fex_preset_title">Préréglages FEX</string> <string name="fex_next_launch">Prendra effet au prochain lancement du jeu.</string> <string name="game_settings_title">Jeu</string> @@ -128,7 +147,7 @@ <string name="user_apps_failed">Échec de l\'ajout de l\'application</string> <string name="user_apps_github_checking">Recherche des versions de %1$s</string> <string name="user_apps_github_unreachable">Impossible de lire les versions de %1$s</string> - <string name="user_apps_github_no_appimage">%1$s ne fournit pas de version ARM64 AppImage</string> + <string name="user_apps_github_no_appimage">Aucune version de %1$s ne contient d\'AppImage ARM64 ou x86_64</string> <string name="user_apps_downloading">Téléchargement de %1$s en cours</string> <string name="user_apps_download_failed">Échec du téléchargement</string> <string name="user_apps_update_failed">Échec de la mise à jour de l\'application</string> @@ -147,8 +166,17 @@ <string name="add_app_tab_github">GitHub</string> <string name="add_app_tab_flatpak">Flatpak</string> <string name="add_app_script_hint">Un fichier .sh. Il s\'exécutera depuis son propre dossier et s\'affichera en plein écran via gamescope.</string> - <string name="add_app_appimage_hint">Un AppImage ARM64 (aarch64). Il sera décompressé dans l\'environnement d\'exécution Linux lors de la première utilisation.</string> - <string name="add_app_github_hint">Installer l\'AppImage ARM64 depuis la dernière version du dépôt.</string> + <string name="add_app_appimage_hint">Un AppImage ARM64 (aarch64), ou un AppImage x86_64 exécuté via FEX. Il sera décompressé dans l\'environnement d\'exécution Linux lors de la première utilisation.</string> + <string name="add_app_github_hint">Installer l\'AppImage ARM64 de la dernière version du dépôt, ou son AppImage x86_64 via FEX.</string> + <string name="app_fex_title">Utiliser FEX</string> + <string name="app_fex_auto">Auto</string> + <string name="app_fex_on">Activé</string> + <string name="app_fex_off">Désactivé</string> + <string name="app_fex_hint">FEX exécute des programmes Linux x86 sur cet appareil ARM64. En mode Auto, il est utilisé lorsque le programme est conçu pour x86.</string> + <string name="app_fex_x86">%1$s via FEX</string> + <string name="app_fex_not_ready">Ce programme est conçu pour les PC %1$s et s\'exécute via FEX, qui n\'est pas encore configuré. Ouvrez Steam une fois en étant connecté : DroidDeck lui fait télécharger FEX et le Steam Linux Runtime nécessaires, puis ce programme s\'ouvre.</string> + <string name="session_end_program">Ce programme</string> + <string name="session_end_fex_missing">%1$s est conçu pour les PC x86 et s\'exécute via FEX, qui n\'est pas encore installé. Lancez Steam une fois en étant connecté et laissez-le télécharger FEX et le Steam Linux Runtime, puis relancez ce programme.</string> <string name="add_app_flatpak_hint">ID d\'application Flathub ou sa page Flathub. Si Flatpak n\'est pas encore configuré, il le sera d\'abord.</string> <string name="add_app_file">Fichier</string> <string name="add_app_no_file">Aucun fichier sélectionné</string> @@ -163,6 +191,8 @@ <string name="add_app_flatpak_id">ID d\'application</string> <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> <string name="add_app_flatpak_invalid">N\'est pas un ID d\'application Flathub valide</string> + <string name="add_app_flatpak_bundle_hint">Ou un fichier .flatpak, pour une application absente de Flathub.</string> + <string name="add_app_pick_flatpak">Choisir un fichier .flatpak</string> <string name="add_app_source">Source</string> <string name="add_app_appearance">Afficher sur le bureau</string> <string name="add_app_preview_name">Nouvelle application</string> @@ -184,6 +214,9 @@ <string name="add_app_cancel">Annuler</string> <string name="add_app_runtime_required">Veuillez d\'abord installer l\'environnement d\'exécution Linux depuis les « Paramètres ».</string> <string name="add_app_busy">Veuillez attendre que %1$s soit terminé.</string> + <string name="steam_compat_label">Compatible</string> + <string name="proton_compatible_note">Les versions marquées « %1$s » dans le menu Compatibilité de Steam incluent les correctifs de préfixe de DroidDeck et lancent les jeux ici. Par défaut, c\'est Proton Experimental ARM64 (%1$s), ou Proton 11.0 ARM64 (%1$s) une fois cette version plus récente installée. Les entrées Proton de Valve sans cette mention ne peuvent pas lancer de jeu sur cet appareil.</string> + <string name="proton_installed_compatible">%1$s installé · %2$s</string> <string name="common_cancel">Annuler</string> <string name="common_auto">Auto</string> <string name="common_never">Jamais</string> @@ -229,6 +262,10 @@ <string name="mode_osc">Commandes à l\'écran</string> <string name="mode_osc_qam">Steam + QAM</string> <string name="mode_osc_note">Le mode automatique affiche les commandes à l\'écran lorsqu\'aucune manette n\'est connectée.</string> + <string name="osc_steam_touch">Tactile Steam (bêta)</string> + <string name="osc_style_next_session">Les commandes tactiles de Steam s\'activeront à la prochaine session Steam</string> + <string name="osc_steam_layout">Disposition tactile Steam</string> + <string name="osc_steam_layout_hint">Déplacez, redimensionnez ou masquez les commandes tactiles de ce jeu ; enregistré dans Steam</string> <string name="mode_controller">Manette</string> <string name="mode_controller_hint">Comment Steam reconnaît votre manette. Prendra effet à la prochaine session.</string> <string name="mode_controller_deck">Manette Steam Deck</string> @@ -236,12 +273,18 @@ <string name="mode_controller_ds4">DualShock 4</string> <string name="mode_controller_dualsense">DualSense</string> <string name="mode_controller_x360">Manette Xbox 360</string> - <string name="mode_controller_note">Deck : fournit un bouton d\'accès rapide et un gyroscope. Xbox 360 : utilisez Guide+A pour ouvrir l\'accès rapide.</string> + <string name="mode_controller_note">Deck : bouton d\'accès rapide et gyroscope. Steam Controller : idem, avec détection de la prise en main sur les boutons arrière. DualShock 4 et DualSense : gyroscope, et les trackpads servent de pavé tactile. Xbox 360 : utilisez Guide+A pour ouvrir l\'accès rapide.</string> <string name="mode_back">Retour</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> <string name="mode_session">Session</string> <string name="mode_suspend">Comportement en arrière-plan</string> <string name="mode_suspend_hint">Comportement lorsque l\'application est masquée ou que l\'écran est éteint.</string> <string name="mode_suspend_manual">Manuel</string> + <string name="mode_suspend_native">Natif</string> + <string name="mode_suspend_steam_note">Auto : met en pause, puis reprend à l\'affichage. Natif : prépare d\'abord Steam à la mise en veille. Manuel : attend « Reprendre ». Jamais : continue de fonctionner.</string> + <string name="mode_background_downloads">Poursuivre les téléchargements</string> + <string name="mode_background_downloads_hint">Retarde la mise en pause en arrière-plan tant que Steam télécharge.</string> <string name="mode_suspend_note">Le mode automatique met en pause en arrière-plan et reprend à l\'affichage. Le mode manuel nécessite d\'appuyer sur « Reprendre ». Ne reste jamais en cours d\'exécution.</string> <string name="mode_startup">Démarrage</string> <string name="mode_steam_startup">Lancer Steam à l\'ouverture de DroidDeck</string> @@ -262,18 +305,67 @@ <string name="mode_client">Client</string> <string name="mode_mangoapp">Superposition de performance</string> <string name="mode_mangoapp_hint">Désactivez cette option si les jeux plantent ou affichent un écran noir en mode Deck. Prendra effet à la prochaine session.</string> + <string name="mode_steam_repair">Réparer le client Steam</string> + <string name="mode_steam_repair_hint">Retélécharge le client Steam au prochain démarrage de Steam. Utile si Steam reste bloqué sur son écran de chargement. Les jeux, la connexion et les paramètres sont conservés.</string> + <string name="mode_steam_repair_queued">Le client Steam sera retéléchargé au prochain démarrage de Steam.</string> + <string name="mode_steam_repair_button">Réparer</string> <string name="mode_added_art">Illustrations</string> <string name="mode_sgdb_key">Clé API SteamGridDB</string> <string name="mode_sgdb_key_yours">Votre clé</string> <string name="mode_sgdb_edit">Modifier…</string> - <string name="mode_added_art_hint">Complète les images manquantes selon le nom du dossier. Les fichiers cover.jpg, hero.jpg, logo.png ou icon.png dans le dossier du jeu sont prioritaires.</string> - <string name="summary_remove_game">Remove %1$s</string> + <string name="mode_added_art_hint">Complète les images manquantes depuis Steam, puis SteamGridDB. Les fichiers cover.jpg, hero.jpg, logo.png ou icon.png que vous placez dans le dossier du jeu sont prioritaires.</string> + <string name="summary_remove_game">Retirer %1$s</string> <string name="mode_added_remove_confirm">Retirer ?</string> <string name="games_add">Ajouter un jeu</string> <string name="games_add_title">Ajouter un jeu :</string> <string name="games_pick_exe_title">Choisir l’exe :</string> <string name="games_add_unreachable">Cet emplacement n’est pas disponible dans la session</string> <string name="mode_added_exe_check">Vérifier cet exécutable</string> + <string name="wincomp_title">Composants Windows</string> + <string name="wincomp_pad_hint">LB / RB pour passer d\'une section à l\'autre.</string> + <string name="wincomp_card_none">Aucun</string> + <string name="wincomp_applies">DLL Windows non incluses dans Proton, issues de la liste des composants. Activez celles dont ce jeu a besoin : elles sont placées dans le dossier Windows propre au jeu, jamais dans ses fichiers, et restent quel que soit le Proton utilisé.</string> + <string name="wincomp_offline">Impossible d\'accéder à la liste des composants. Les composants déjà téléchargés peuvent toujours être activés ou désactivés.</string> + <string name="wincomp_recommended">Recommandés pour ce jeu</string> + <string name="wincomp_checking">Analyse des besoins de ce jeu…</string> + <string name="wincomp_when_online">Disponible une fois en ligne</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Activation de %1$d composant…</item> + <item quantity="many">Activation de %1$d composants…</item> + <item quantity="other">Activation de %1$d composants…</item> + </plurals> + <string name="wincomp_auto_section">Activés pour ce jeu</string> + <string name="wincomp_auto_steam">Steam installe %1$s avec %2$s (application %3$s)</string> + <string name="wincomp_auto_gog">D\'après la liste de GOG pour ce jeu</string> + <string name="wincomp_auto_epic">D\'après les prérequis d\'Epic pour ce jeu</string> + <string name="wincomp_auto_amazon">D\'après les étapes d\'installation d\'Amazon pour ce jeu</string> + <string name="wincomp_steam_by_name">Steam installe %1$s avec l\'application %2$s, identifiée par son nom</string> + <string name="wincomp_suggestions">Également listés</string> + <string name="wincomp_suggestion_reason">Listé par %1$s ; non disponible comme composant ici</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Le jeu fournit %1$s</string> + <string name="wincomp_found_shipped">Le jeu contient %1$s (fonctionne souvent tel quel)</string> + <string name="wincomp_already_here">Déjà présent dans ce jeu</string> + <string name="wincomp_no_recommendation">Rien dans le dossier du jeu n\'indique un composant.</string> + <string name="wincomp_active">Installés pour ce jeu (%1$d)</string> + <string name="wincomp_all">Tous les composants (%1$d)</string> + <string name="wincomp_installers">Installateur Windows requis (%1$d)</string> + <string name="wincomp_installers_note">Ce sont des programmes d\'installation autonomes, sans paquet à extraire, et ce qu\'ils installent n\'a pas encore été enregistré. La plupart sont d\'anciens environnements d\'exécution que le Mono de Proton remplace déjà ; les enregistrements sont ajoutés au fur et à mesure.</string> + <string name="wincomp_show">Afficher</string> + <string name="wincomp_hide">Masquer</string> + <string name="wincomp_needs_installer">Lance son propre programme d\'installation (pas encore d\'enregistrement)</string> + <string name="wincomp_unsupported">Pas encore pris en charge ici</string> + <string name="wincomp_loading">Chargement des composants…</string> + <string name="wincomp_failed">Installation impossible : %1$s</string> + <string name="wincomp_downloaded">Téléchargé</string> + <string name="wincomp_downloading">Téléchargement de %1$s</string> + <string name="wincomp_installing">Installation : %1$s</string> + <string name="wincomp_reverting">Désactivation…</string> + <string name="wincomp_download_size">%1$s à télécharger</string> + <string name="wincomp_next_launch">Prendra effet au prochain lancement du jeu.</string> <string name="mode_stretch169">Étirer les jeux 16:9</string> <string name="mode_stretch169_hint">Sur les écrans dont le rapport d\'aspect est inférieur à 16:9, étire le jeu pour remplir l\'écran au lieu d\'afficher des bandes noires. Prendra effet à la prochaine session.</string> <string name="mode_audio">Audio</string> @@ -297,6 +389,8 @@ <string name="mode_storage_folder">Dossier : %1$s</string> <string name="mode_second_library">Bibliothèque secondaire</string> <string name="mode_storage_note">Les jeux lisant des ressources depuis une carte SD ou un stockage partagé peuvent saccader.</string> + <string name="mode_storage_diagnostics">Diagnostic du stockage</string> + <string name="mode_storage_diagnostics_hint">Enregistre les résultats d\'allocation et des mesures de temps du stockage dans « Partager les journaux ». Peut ralentir les installations lorsqu\'il est activé. Prendra effet à la prochaine session.</string> <string name="mode_choose_folder">Choisir un dossier…</string> <string name="mode_custom_res_title">Résolution personnalisée</string> <string name="mode_custom_res_text">Remplace la limite de résolution et le format d\'écran. Les dimensions ne correspondant pas à l\'écran afficheront des bandes noires.</string> @@ -305,6 +399,7 @@ <string name="mode_custom_res_range">Plage : 320×240 à 3840×2160.</string> <plurals name="mode_added_count"> <item quantity="one">%1$d jeu</item> + <item quantity="many">%1$d jeux</item> <item quantity="other">%1$d jeux</item> </plurals> <string name="common_ok">OK</string> @@ -327,9 +422,61 @@ <string name="comp_check_nightlies">Vérifier les nouveaux paquets dans Nightlies</string> <string name="comp_proton">Proton</string> <string name="comp_proton_note">Les mises à jour de Steam remplacent le Proton de Valve ; les fichiers originaux de chaque version sont conservés.</string> + <string name="comp_scope">Configuration</string> + <string name="comp_profile_configure">Configurer le profil</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Profil par défaut</string> + <string name="comp_scope_general_detail">Utilisé automatiquement par les jeux sans réglages personnalisés.</string> + <string name="comp_profile_game_detail">Paramètres enregistrés utilisés automatiquement au lancement de %1$s.</string> + <string name="comp_game_hint">Choisissez uniquement les paramètres dont ce jeu a besoin. Tout le reste continue d\'utiliser le profil par défaut.</string> + <string name="comp_game_fex">Préréglage FEX</string> + <string name="comp_game_fex_inherited">Utilise le préréglage du profil par défaut.</string> + <string name="comp_game_fex_override">Préréglage personnalisé enregistré pour ce jeu.</string> + <string name="comp_game_fex_custom">Variables FEX personnalisées</string> + <string name="comp_game_use_general">Utiliser par défaut</string> + <string name="comp_game_compatibility">Compatibilité du jeu</string> + <string name="comp_game_environment_hint">Options d\'environnement Proton, DXVK, VKD3D et de synchronisation pour ce jeu.</string> + <string name="comp_game_proton_inherited">Utilise le Proton du profil par défaut.</string> + <string name="comp_game_proton_override">Proton personnalisé enregistré pour ce jeu via le mappage de compatibilité de Steam.</string> + <string name="comp_no_proton_short">Aucun Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Utilise le paquet du profil par défaut issu de %1$s, sauf si ce jeu choisit un autre paquet.</string> + <string name="comp_game_component_general">Utilise le paquet de composants du profil par défaut.</string> + <string name="comp_game_component_override">Utilise %1$s uniquement pour ce jeu.</string> + <string name="comp_game_runtime_options">Options d\'exécution</string> + <string name="comp_game_environment_other_hint">Autres options d\'environnement Proton, DXVK, VKD3D-Proton et de synchronisation propres à ce jeu.</string> + <string name="comp_game_saved_next">Le profil de %1$s est enregistré pour le prochain lancement du jeu.</string> + <string name="game_no_steam_title">Démarrer sans Steam</string> + <string name="game_no_steam_detail">L\'ouvre dans Proton/FEX sans le client Steam ; les fonctions Steam sont désactivées.</string> + <string name="game_no_steam_on">Activé</string> + <string name="game_steam_with">Démarre avec Steam</string> + <string name="game_steam_without">Démarre sans Steam</string> + <string name="game_settings_card">Paramètres</string> + <string name="game_settings_menu_title">Paramètres de %1$s</string> + <string name="game_settings_default">Par défaut</string> + <string name="game_settings_default_detail">Remet tout ce qui a été modifié pour ce jeu aux paramètres de l\'application.</string> + <string name="game_sync_custom">Variables de synchronisation personnalisées</string> + <string name="comp_game_proton_live">Le choix de Proton pour %1$s est enregistré et disponible dès maintenant dans Steam.</string> + <string name="comp_game_proton_next">Le choix de Proton pour %1$s est enregistré. Redémarrez Steam avant de lancer le jeu.</string> + <string name="comp_game_proton_not_runnable">%1$s ne peut pas utiliser le Proton sélectionné sur cet appareil.</string> + <string name="comp_game_load_failed">Impossible de charger le profil de %1$s : %2$s</string> + <string name="comp_game_save_failed">Impossible d\'enregistrer le profil du jeu : %1$s</string> + <string name="comp_game_reset">Réinitialiser le profil du jeu</string> + <string name="comp_game_reset_title">Réinitialiser le profil de %1$s ?</string> + <string name="comp_game_reset_body">Supprimer les réglages propres à ce jeu (Proton, FEX, paquet de composants, environnement, filtrage des textures et composants Windows) ? Il utilisera le profil par défaut.</string> + <string name="comp_game_reset_done">%1$s utilise désormais le profil par défaut.</string> + <string name="comp_game_reset_failed">Le profil du jeu n\'a pas pu être entièrement réinitialisé : %1$s</string> + <string name="comp_default_live">%1$s exécute désormais tous les jeux qui n\'ont pas choisi leur propre Proton dans Steam.</string> + <string name="comp_default_next">%1$s exécutera tous les jeux qui n\'ont pas choisi leur propre Proton, à partir du prochain démarrage de Steam.</string> + <string name="comp_default_not_runnable">%1$s ne peut pas lancer de jeux ici, il ne peut donc pas être le Proton par défaut.</string> + <string name="comp_default_failed">Impossible d\'enregistrer le Proton par défaut : %1$s</string> <string name="comp_swapped">%1$s · %2$d remplacé(s)</string> <string name="comp_all_original">%1$s · Tout est original</string> <string name="comp_game_running_suffix">%1$s · Jeu en cours d\'exécution</string> + <string name="comp_esync_pack">%1$s · pack droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · pas encore de pack droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync intégré, aucun pack requis</string> <string name="comp_gpu_drivers">Pilotes GPU</string> <string name="comp_reapplied">%1$s · Réappliqué au lancement de %2$s</string> <string name="comp_next_queued">Suivant : %1$s · Après la fermeture du jeu</string> @@ -338,7 +485,7 @@ <string name="comp_applies_next_game">Prendra effet au prochain lancement du jeu</string> <string name="comp_import_zip">Importer .zip</string> <string name="comp_reading">Lecture de Proton…</string> - <string name="comp_no_proton">Proton n\'est pas encore installé. Lancez Steam une fois pour télécharger son Proton ARM64, ou ajoutez GE-Proton ou CachyOS depuis les « Paramètres ».</string> + <string name="comp_no_proton">Proton n\'est pas encore installé. Lancez Steam une fois pour télécharger son Proton ARM64, ou ajoutez GE-Proton, CachyOS ou DroidDeck-Proton depuis les « Paramètres ».</string> <string name="comp_original">Original · %1$s</string> <string name="comp_this_build">%1$s · Version actuelle</string> <string name="comp_earlier_build">%1$s · Version antérieure</string> @@ -392,6 +539,12 @@ <string name="perf_sysmem">Turnip : rendu sysmem</string> <string name="perf_sysmem_hint">Steam et la plupart des jeux seront plus rapides. 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_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> + <string name="perf_esync_hint">Les threads Windows des jeux s\'attendent mutuellement via eventfd et la mémoire partagée au lieu de faire des allers-retours par wineserver. Utilise un pack droiddeck-esync conçu pour cette version exacte de Proton ; les packs sont récupérés automatiquement. Tant qu\'il n\'en existe pas pour une nouvelle version de Proton, droiddeck-fsync prend le relais. Prendra effet à la prochaine session.</string> <string name="perf_xalia_hint">Désactive l\'assistant de navigation à la manette de Proton, qui consomme du CPU dans chaque jeu.</string> <string name="perf_seccomp">Exécuter proot sans seccomp</string> <string name="perf_seccomp_hint">Peut corriger certaines erreurs d\'appels système manquants sur certains noyaux, mais peut réduire les performances.</string> @@ -412,8 +565,10 @@ <string name="driver_delete_plain">Ses fichiers seront supprimés de l\'application.</string> <string name="driver_delete_in_use">Ses fichiers seront supprimés. Comme il est en cours d\'utilisation, le pilote par défaut sera utilisé à la place.</string> <string name="drawer_page_display">Affichage</string> + <string name="drawer_page_effects">Effets</string> <string name="drawer_page_controls">Contrôles</string> <string name="drawer_page_components">Composants</string> + <string name="drawer_page_controller">Manette</string> <string name="drawer_page_settings">Paramètres</string> <string name="drawer_page_desc">Page %1$s</string> <string name="drawer_steam">Steam</string> @@ -424,11 +579,48 @@ <string name="drawer_prev_page">Page précédente</string> <string name="drawer_next_page">Page suivante</string> <string name="drawer_hud">HUD de performance</string> + <string name="drawer_scaling">Mode de mise à l\'échelle</string> + <string name="drawer_scaling_sharpness">Netteté de la mise à l\'échelle</string> + <string name="drawer_effects">Effets d\'écran</string> + <string name="drawer_effects_hint">En direct. Consomme un peu de temps GPU tant qu\'un effet est actif.</string> + <string name="drawer_look">Préréglages</string> + <string name="drawer_look_custom">Personnalisé</string> + <string name="drawer_effects_advanced">Avancé</string> + <string name="widgets_expanded">Développé</string> + <string name="widgets_collapsed">Réduit</string> + <string name="drawer_cas">Netteté (CAS)</string> + <string name="drawer_cas_level">Niveau de netteté</string> + <string name="drawer_fake_hdr">Faux HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Lancer SteamVR</string> + <string name="steamvr_checking">Vérification de SteamVR…</string> + <string name="drawer_deband">Anti-banding</string> + <string name="drawer_deband_strength">Intensité de l\'anti-banding</string> + <string name="drawer_brightness">Luminosité</string> + <string name="drawer_contrast">Contraste</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Saturation</string> + <string name="drawer_fxaa">FXAA (lissage des contours)</string> + <string name="drawer_toon">Contours cartoon</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Filtrage des textures</string> + <string name="drawer_texture_hint">Jeux DirectX 9–11, à partir de leur prochain lancement.</string> + <string name="drawer_anisotropy">Filtrage anisotrope</string> + <string name="drawer_texture_sharpness">Netteté des textures</string> + <string name="drawer_texture_sharpness_note">Un biais de mip négatif : textures plus nettes, un peu de scintillement. Auto s\'adapte au facteur d\'agrandissement de la session à l\'écran.</string> <string name="drawer_touch_auto">Auto (%1$s)</string> <string name="drawer_keyboard">Clavier</string> + <string name="drawer_latency">Latence</string> + <string name="drawer_low_latency_controller">Manette à faible latence</string> + <string name="drawer_low_latency_controller_hint">La manette émet à 1000 Hz au lieu de 250 Hz. Un peu plus de CPU.</string> + <string name="drawer_low_latency_touch">Tactile à faible latence</string> + <string name="drawer_low_latency_touch_hint">Les touchers ignorent le regroupement d\'images ; les commandes tactiles Steam passent à 1000 Hz. Un peu plus de CPU.</string> <string name="drawer_pc_keyboard">Clavier PC</string> <string name="drawer_android_keyboard">Android</string> <string name="drawer_second_screen">Deuxième écran</string> + <string name="drawer_second_screen_mode">Mode</string> <string name="drawer_second_screen_shows">Afficher</string> <string name="drawer_android_apps">Applications Android</string> <string name="drawer_launch_app">Lancer l\'application</string> @@ -447,11 +639,25 @@ <string name="drawer_stop_title">Arrêter la session ?</string> <string name="drawer_running_now">En cours d\'exécution</string> <string name="drawer_no_game">Aucun jeu n\'utilise actuellement Proton</string> + <string name="drawer_selected_profile">Profil du jeu</string> + <string name="drawer_selected_profile_none">Les détails du profil ne sont pas encore disponibles.</string> + <string name="drawer_profile_refresh_failed_initial">Impossible de charger les profils de jeu. Nouvelle tentative automatique.</string> + <string name="drawer_profile_refresh_failed_stale">Impossible d\'actualiser les profils de jeu. Affichage des dernières données disponibles ; nouvelle tentative automatique.</string> + <string name="drawer_profile_inspect_hint">Afficher et modifier les paramètres enregistrés utilisés au prochain lancement.</string> + <string name="drawer_profile_default">Utilise le profil par défaut</string> + <string name="drawer_profile_custom">Profil personnalisé</string> + <string name="drawer_component_inherited">Utilise %1$s du profil par défaut.</string> + <string name="drawer_game_components_note">Les modifications sont enregistrées dans le profil de %1$s et prennent effet au prochain lancement du jeu.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d réglage propre au jeu</item> + <item quantity="many">%1$d réglages propres au jeu</item> + <item quantity="other">%1$d réglages propres au jeu</item> + </plurals> <string name="drawer_no_proton">Proton n\'est pas encore installé.</string> <string name="drawer_game_running">Jeu en cours d\'exécution</string> <string name="drawer_reapplied">Réappliqué au lancement de %1$s</string> <string name="drawer_original">Original</string> - <string name="drawer_components_note">Veuillez télécharger, importer et supprimer depuis la page « Composants ».</string> + <string name="drawer_components_note">Importez et supprimez depuis la page « Composants ».</string> <string name="setup_check_done">Terminé</string> <string name="setup_check_warn">À traiter</string> <string name="setup_check_busy">Traitement en cours</string> @@ -503,14 +709,33 @@ <string name="setup_saved_logs">Journaux de session enregistrés</string> <string name="setup_saved_logs_hint">Conserver les %1$d plus récents</string> <string name="setup_clear_logs">Effacer les journaux</string> + <string name="setup_reset_settings">Réinitialiser tous les paramètres</string> + <string name="setup_reset_settings_hint">Remet chaque paramètre à sa valeur par défaut</string> + <string name="setup_reset_settings_button">Réinitialiser</string> + <string name="setup_reset_settings_title">Réinitialiser tous les paramètres ?</string> + <string name="setup_reset_settings_body">Les paramètres d\'affichage, de performances, de manette, de thème, de langue et du lanceur reprennent leurs valeurs par défaut. Vos jeux, votre connexion Steam, vos comptes de boutiques, les pilotes téléchargés et les dossiers de stockage sont conservés.</string> + <string name="setup_reset_settings_profiles">Réinitialiser aussi les profils de jeu (Proton, FEX, composants et environnement de chaque jeu, ainsi que l\'environnement du profil par défaut)</string> + <string name="setup_reset_settings_session_running">Arrêtez la session avant de réinitialiser les paramètres.</string> + <string name="setup_reset_settings_partial">Les paramètres ont été réinitialisés, mais certaines parties n\'ont pas pu l\'être. Les journaux contiennent les détails.</string> <string name="setup_offline">Mode hors ligne</string> <string name="setup_sign_in_first">Veuillez d\'abord vous connecter à Steam</string> <string name="setup_launcher">Lanceur</string> + <string name="setup_language">Langue</string> + <string name="setup_language_hint">Steam l\'utilise aussi, à partir de son prochain démarrage.</string> + <string name="setup_language_system">Langue du système (%1$s)</string> + <string name="setup_language_system_short">Langue du système</string> + <string name="setup_app_scale">Échelle de l\'application</string> + <string name="setup_app_scale_hint">Texte et commandes de DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (par défaut)</string> <string name="setup_theme">Thème</string> <string name="setup_theme_hint">Apparence du lanceur</string> <string name="setup_home">Utiliser comme écran d\'accueil</string> <string name="setup_home_on">DroidDeck peut être utilisé comme application d\'écran d\'accueil</string> <string name="setup_home_off">DroidDeck ne sera pas proposé comme application d\'écran d\'accueil</string> + <string name="setup_orientation">Orientation</string> + <string name="setup_orientation_auto">Paysage automatique</string> + <string name="setup_orientation_landscape">Paysage</string> + <string name="setup_orientation_reverse">Paysage inversé</string> <string name="setup_fullscreen">Plein écran</string> <string name="setup_fullscreen_on">Masquer la barre d\'état et la barre de navigation Android</string> <string name="setup_fullscreen_off">Afficher la barre d\'état et la barre de navigation Android</string> @@ -638,21 +863,24 @@ <string name="upd_just_now">À l\'instant</string> <plurals name="upd_tests_count"> <item quantity="one">%1$d disponible</item> + <item quantity="many">%1$d disponibles</item> <item quantity="other">%1$d disponibles</item> </plurals> <plurals name="upd_preview_behind"> <item quantity="one">Modifications depuis votre version · %1$d version de retard</item> + <item quantity="many">Modifications depuis votre version · %1$d versions de retard</item> <item quantity="other">Modifications depuis votre version · %1$d versions de retard</item> </plurals> <plurals name="upd_preview_recent"> <item quantity="one">Modifications récentes · %1$d version</item> + <item quantity="many">Modifications récentes · %1$d versions</item> <item quantity="other">Modifications récentes · %1$d versions</item> </plurals> <string name="gate_title">Un paramètre Android à modifier</string> <string name="gate_eyebrow">Steam</string> <string name="gate_lede">Android arrête les applications qui lancent de nombreux processus en arrière-plan, et Steam en lance des dizaines. Tant que ce paramètre n\'est pas modifié, les jeux peuvent se fermer sans message d\'erreur.</string> <string name="gate_fix_for_me">Corriger pour moi</string> - <string name="gate_toggle_steps">Activez « Désactiver la limite de processus enfants », puis revenez. Gardez les options pour les développeurs activées, sinon l\'interrupteur se désactivera à nouveau.</string> + <string name="gate_toggle_steps">Activez « Désactiver les limites pour les processus enfant », puis revenez. Gardez les options pour les développeurs activées, sinon l\'interrupteur se désactivera à nouveau.</string> <string name="gate_open_dev">Ouvrir les options pour les développeurs</string> <string name="gate_no_toggle">Cette version d\'Android ne dispose pas de cet interrupteur, DroidDeck effectuera donc la modification via le débogage sans fil. Cela prend environ une minute, sans ordinateur.</string> <string name="gate_needs_wifi">Le débogage sans fil nécessite un Wi-Fi. N\'importe quel réseau convient, Internet n\'est pas nécessaire.</string> @@ -702,8 +930,8 @@ <string name="wadb_turn_off">Désactiver la limite</string> <string name="wadb_other_ways">Autres méthodes de modification</string> <string name="wadb_dev_try_first">1 · Options pour les développeurs (à essayer en premier)</string> - <string name="wadb_restrict_on">Activez « Limiter les processus enfants ».</string> - <string name="wadb_restrict_off">Désactivez « Limiter les processus enfants ».</string> + <string name="wadb_restrict_on">Désactivez « Désactiver les limites pour les processus enfant ».</string> + <string name="wadb_restrict_off">Activez « Désactiver les limites pour les processus enfant ».</string> <string name="wadb_computer_last">3 · ADB sur PC (en dernier recours)</string> <string name="wadb_only_if">À utiliser uniquement si le débogage sans fil n\'est pas disponible.</string> <string name="wadb_computer_group">3 · ADB sur PC (en dernier recours)</string> @@ -724,6 +952,8 @@ <string name="ctrl_keyboard_button">Bouton clavier</string> <string name="ctrl_select_steam">Appuyez sur Select pour ouvrir le menu Steam</string> <string name="ctrl_select_steam_hint">À la place de View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con comme manettes VR</string> + <string name="ctrl_joycon_vr_hint">Pendant que SteamVR tourne, chaque Joy-Con devient une main. Pointez-le devant vous et maintenez Home ou Capture pour le recentrer.</string> <string name="setup_animations">Animations</string> <string name="ctrl_adaptive_hint">Le joystick apparaîtra là où vous touchez et se masquera une fois relâché</string> <string name="ctrl_layout">Disposition</string> @@ -771,10 +1001,17 @@ <string name="content_page_gone">Cette page n\'existe plus. Veuillez sélectionner une section à gauche.</string> <string name="content_open_desktop">Ouvrir le bureau</string> <string name="content_install_open_desktop">Installer et ouvrir le bureau</string> + <string name="desktop_remove_title">Désinstaller le bureau</string> + <string name="desktop_remove_text">Supprime le bureau et ses applications intégrées. Conserve les jeux, les applications ajoutées, les paramètres et les bibliothèques partagées.</string> + <string name="desktop_removing">Suppression du bureau</string> + <string name="desktop_removed">Bureau supprimé</string> + <string name="desktop_cleaning_legacy">Suppression des anciens fichiers LXQt</string> + <string name="desktop_removal_unknown">Mettez à jour DroidDeck avant de supprimer cette version du bureau.</string> <string name="content_linux_desktop">Bureau Linux</string> <string name="content_linux_desktop_hint">KDE Plasma, Firefox et vos émulateurs</string> <string name="games_empty">Les jeux installés sur Steam apparaîtront ici après la fin de la session.</string> <string name="games_play_steam">Lancer Steam</string> + <string name="games_play_steamvr">Lancer SteamVR</string> <string name="games_launch_settings">Paramètres de lancement</string> <string name="games_launch">Lancer</string> <string name="games_files">Fichiers du jeu</string> @@ -799,6 +1036,8 @@ <string name="games_last_played">Dernier lancement %1$s</string> <string name="games_internal">Stockage interne</string> <string name="games_added">Jeux ajoutés</string> + <string name="games_custom">Jeu personnalisé</string> + <string name="games_store_storage">Stockage des jeux</string> <string name="gpu_auto_hint">Sélectionne la meilleure combinaison de pilotes pour ce GPU et les maintient à jour</string> <string name="gpu_manual_hint">Choisir manuellement la combinaison de pilotes</string> <string name="gpu_checking">Vérification des pilotes…</string> @@ -810,7 +1049,6 @@ <string name="gpu_set_with_runtime">Configuré avec le pilote d\'exécution : %1$s inclut les deux.</string> <string name="gpu_runtime_hint">Utilisé par les jeux et le bureau.</string> <string name="gpu_runtime_default">Par défaut de l\'environnement d\'exécution</string> - <string name="gpu_display_hint">Responsable de la sortie vidéo vers l\'écran. Prendra effet après le redémarrage de DroidDeck.</string> <string name="gpu_auto_by_gpu">Auto - Sélection par GPU</string> <string name="gpu_manage">Télécharger, importer ou supprimer…</string> <string name="gpu_in_use_caps">Utilisé</string> @@ -840,6 +1078,12 @@ <string name="deck_tab_left">Pavé tactile gauche</string> <string name="deck_tab_right">Pavé tactile droit</string> <string name="deck_tab_both">Les deux</string> + <string name="deck_tab_gamepad">Manette</string> + <string name="deck_surface_stick">Joystick</string> + <string name="deck_surface_trackpad">Pavé tactile</string> + <string name="deck_surface_switch">Basculer entre joystick et pavé tactile</string> + <string name="deck_more_controls">Plus de commandes Deck</string> + <string name="deck_panels">PANNEAUX</string> <string name="deck_close">Fermer les commandes du deuxième écran</string> <string name="deck_open_steam_menu">Ouvrir le menu Steam</string> <string name="deck_left_upper">Gauche · Haut</string> @@ -875,6 +1119,10 @@ <string name="proton_installed">%1$s installé</string> <string name="proton_queued">Élément en attente d\'une demande précédente</string> <string name="proton_not_installed">Non installé</string> + <string name="proton_update_available">Mise à jour disponible → %1$s</string> + <string name="proton_remove_older">Supprimer les anciennes versions de %1$s</string> + <string name="proton_remove_older_body">Supprime %1$s. Les jeux configurés sur ces versions devront passer à un autre Proton.</string> + <string name="proton_remove_body">Les jeux configurés sur cette version devront passer à un autre Proton.</string> <string name="proton_install_now">Installer maintenant</string> <string name="proton_cancel_queued">Annuler la file d\'attente</string> <string name="pckb_android">Clavier Android</string> @@ -903,6 +1151,8 @@ <string name="game_env_eyebrow">Jeux Proton</string> <string name="pip_title">Picture-in-Picture (PiP)</string> <string name="pip_auto">Passer automatiquement en PiP</string> + <string name="unfolded_controls">Commandes sur l\'écran déplié</string> + <string name="unfolded_controls_hint">Déplié, le jeu s\'affiche au-dessus des pavés tactiles et des poignées arrière du Steam Deck. Plié, le jeu est en plein écran.</string> <string name="pip_suspended">En pause</string> <string name="pip_not_ready">Le mode PiP sera disponible une fois la session prête.</string> <string name="pip_permission">Veuillez autoriser DroidDeck à utiliser le mode PiP dans les paramètres Android.</string> @@ -927,8 +1177,956 @@ <string name="game_file_folder">Choisir un dossier pour les fichiers du jeu frontal</string> <string name="game_file_exported">Fichiers du jeu enregistrés dans %1$s</string> <string name="game_frontend_files">Fichiers frontaux</string> - <string name="fm_up_one_level">Remonter d\'un niveau</string> + + <string name="main_wait_runtime">Attendez la fin de l\'opération sur l\'environnement d\'exécution</string> + <string name="main_wait_proton_install">Attendez la fin de l\'installation de l\'outil de compatibilité</string> + <string name="main_wait_desktop_install">Attendez la fin de l\'installation de l\'application de bureau</string> + <string name="main_wait_install_game">Attendez la fin de l\'installation avant de lancer un jeu</string> + <string name="main_saves_close_session">Fermez d\'abord la session Steam, pour que le jeu ne puisse pas écraser l\'importation</string> + <string name="main_saves_importing">Importation dans %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">%1$d fichier importé (%2$s) dans %3$s</item> + <item quantity="many">%1$d fichiers importés (%2$s) dans %3$s</item> + <item quantity="other">%1$d fichiers importés (%2$s) dans %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">%1$d fichier importé (%2$s) dans %3$s. Anciennes sauvegardes copiées dans Download/DroidDeck/Saves/backups</item> + <item quantity="many">%1$d fichiers importés (%2$s) dans %3$s. Anciennes sauvegardes copiées dans Download/DroidDeck/Saves/backups</item> + <item quantity="other">%1$d fichiers importés (%2$s) dans %3$s. Anciennes sauvegardes copiées dans Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Choisir un zip de sauvegarde pour %1$s</string> + <string name="main_saves_exporting">Exportation de %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">%1$d fichier exporté (%2$s) : %3$s</item> + <item quantity="many">%1$d fichiers exportés (%2$s) : %3$s</item> + <item quantity="other">%1$d fichiers exportés (%2$s) : %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Choisir où enregistrer %1$s (%2$s)</string> + <string name="main_action_failed">%1$s : échec (%2$s)</string> + <string name="main_no_logs_yet">Aucun journal de session pour l\'instant : lancez d\'abord une session.</string> + <string name="main_no_logs_to_clear">Aucun journal de session à effacer.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">%1$d dossier de journaux de session effacé.</item> + <item quantity="many">%1$d dossiers de journaux de session effacés.</item> + <item quantity="other">%1$d dossiers de journaux de session effacés.</item> + </plurals> + <string name="main_wadb_pair_failed">Échec de l\'appairage du débogage sans fil</string> + <string name="main_wadb_command_failed">Échec de la commande de débogage sans fil</string> + <string name="main_wadb_unavailable">Le débogage sans fil n\'est pas disponible</string> + <string name="main_adb_copied">Commande ADB copiée</string> + <string name="main_pick_roms">Choisir le dossier ROM</string> + <string name="main_non_adreno_title">GPU non Adreno</string> + <string name="main_non_adreno_text">Turnip prend en charge les GPU Adreno. Sur %1$s, Steam peut afficher un écran noir. Téléchargement : %2$.0f Mo.</string> + <string name="main_install_anyway">Installer quand même</string> + <string name="main_remove_runtime_title">Supprimer l\'environnement d\'exécution Linux</string> + <string name="main_remove_runtime_text">Cela supprime l\'environnement d\'exécution, le client Steam qu\'il contient et tous les jeux qui y sont installés.</string> + <string name="main_applied">Appliqué : %1$s</string> + <string name="android_app_open_failed_primary">Impossible d\'ouvrir %1$s sur l\'écran principal</string> + <string name="android_app_open_failed_on">Impossible d\'ouvrir %1$s sur %2$s</string> + <string name="android_app_open_failed_display">Impossible d\'ouvrir %1$s sur l\'écran %2$d</string> + <string name="comp_busy_importing">Importation</string> + <string name="comp_busy_swapping">Remplacement</string> + <string name="comp_busy_restoring">Restauration</string> + <string name="comp_busy_cancelling">Annulation</string> + <string name="comp_busy_deleting">Suppression</string> + <string name="comp_cannot_read">impossible de lire le fichier</string> + <string name="comp_imported">%1$s importé</string> + <string name="comp_swap_cancelled">Le remplacement en attente a été annulé.</string> + <string name="comp_pick_wcp">Choisir un paquet de composants (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Impossible d\'accéder aux Nightlies</string> + <string name="comp_stored">%1$s enregistré</string> + <string name="comp_download_failed">Échec du téléchargement : %1$s</string> + <string name="drivers_pick_linux">Choisir un pilote d\'environnement d\'exécution Linux (zip -Linux ou bundle Android + Linux)</string> + <string name="drivers_pick_android">Choisir un pilote d\'affichage (zip AdrenoTools ou bundle Android + Linux)</string> + <string name="drivers_pick_any">Choisir un zip de pilote ou un bundle Android + Linux</string> + <string name="main_pkg_problem">%1$s : %2$s</string> + <string name="main_removing_named">Suppression de %1$s…</string> + <string name="main_forgetting_named">Oubli de %1$s…</string> + <string name="main_pick_game_storage">Choisir le dossier de stockage des jeux</string> + <string name="main_pick_decky_zip">Choisir un ZIP de plugin Decky</string> + <string name="main_storage_not_usable">Inutilisable : %1$s</string> + <string name="main_running_program">Programme</string> + <string name="main_removing_runtime">Suppression de l\'environnement d\'exécution Linux</string> + <string name="main_settings_main_screen">Impossible d\'ouvrir les paramètres sur l\'écran inférieur ; ils ont été ouverts sur l\'écran principal.</string> + <string name="main_open_dev_options">Ouvrez les options pour les développeurs dans les paramètres</string> + + <string name="upd_unknown_apps_failed">Impossible d\'ouvrir le paramètre Android « Installer des applis inconnues »</string> + <string name="upd_couldnt_check">Vérification impossible : %1$s</string> + <string name="upd_no_download">Cette version ne propose aucun téléchargement pour cette copie de DroidDeck</string> + <string name="upd_stop_first">Arrêtez d\'abord la session en cours, puis mettez à jour</string> + <string name="upd_stage_downloading">Téléchargement</string> + <string name="upd_stage_installing">Installation</string> + <string name="upd_stage_confirm">En attente de votre confirmation</string> + <string name="upd_failed">La mise à jour a échoué</string> + <string name="upd_not_offered">Android n\'a pas proposé d\'installer la mise à jour</string> + + <string name="decky_install_failed">Échec de l\'installation de Decky : %1$s</string> + <string name="decky_plugin_starting">Démarrage de l\'importation du plugin…</string> + <string name="decky_plugin_failed">Échec de l\'importation du plugin : %1$s</string> + <string name="decky_plugin_installed">Plugin installé. Redémarrez Steam pour le charger.</string> + + <string name="drivers_not_checked">Pas encore vérifié - appuyez sur Actualiser pour rechercher de nouveaux pilotes</string> + <string name="drivers_bundle_sets_display">Android + Linux : définit aussi le pilote d\'affichage</string> + <string name="drivers_bundle_sets_runtime">Android + Linux : définit aussi le pilote d\'exécution</string> + <string name="drivers_runtime_builtin">le Turnip intégré à l\'environnement d\'exécution</string> + <string name="drivers_system_vulkan">Vulkan du système : aucune version fournie pour ce GPU</string> + <string name="drivers_bundled">%1$s (intégré)</string> + <string name="drivers_manual">Manuel</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Une seule moitié est publiée pour le moment</string> + <string name="drivers_pair_size">%1$.0f Mo pour les deux</string> + <string name="drivers_none_to_set">Aucun pilote à définir : %1$s</string> + <string name="drivers_checking_latest">Recherche des derniers pilotes…</string> + <string name="drivers_up_to_date_check_failed">À jour (vérification impossible : %1$s)</string> + <string name="drivers_recommended_unpublished">Les pilotes recommandés ne sont pas publiés pour le moment</string> + <string name="drivers_downloading_pair">Téléchargement de %1$s %2$s…</string> + <string name="drivers_updated_to">Mis à jour vers %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Mis à jour vers %1$s %2$s. Le pilote d\'affichage prendra effet après le redémarrage de DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Les mises à jour de pilotes attendent la fin de la session.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s sera téléchargé dès que vous quitterez les données mobiles et l\'économiseur de batterie.</string> + <string name="drivers_skipping_bad">%1$s %2$s n\'a pas démarré de session ici, Auto garde donc les pilotes qui ont fonctionné.</string> + <string name="drivers_rolled_back">%1$s n\'a pas démarré de session deux fois, Auto est donc revenu aux pilotes qui fonctionnaient.</string> + <string name="drivers_switched_to">Basculé vers %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Basculé vers %1$s %2$s. Le pilote d\'affichage prendra effet après le redémarrage de DroidDeck.</string> + <string name="drivers_using">Utilise %1$s %2$s.</string> + <string name="drivers_using_restart">Utilise %1$s %2$s. Le pilote d\'affichage prendra effet après le redémarrage de DroidDeck.</string> + <string name="drivers_using_quest">Utilise le pilote d\'affichage Quest intégré et la valeur par défaut de l\'environnement d\'exécution.</string> + <string name="drivers_using_quest_restart">Utilise le pilote d\'affichage Quest intégré et la valeur par défaut de l\'environnement d\'exécution. Le pilote d\'affichage prend effet après un redémarrage de DroidDeck.</string> + <string name="drivers_not_a_driver">Ce n\'est pas un zip de pilote : ni un pilote AdrenoTools, ni un Turnip -Linux, ni un bundle Android + Linux</string> + <string name="drivers_import_failed">Échec de l\'importation : %1$s</string> + <string name="drivers_imported_unnamed">Pilote importé</string> + <string name="drivers_using_bundle">%1$s est utilisé comme pilote d\'exécution et comme pilote d\'affichage.</string> + <string name="drivers_using_bundle_restart">%1$s est utilisé comme pilote d\'exécution et comme pilote d\'affichage. Le pilote d\'affichage prendra effet après le redémarrage de DroidDeck.</string> + <string name="drivers_deleted_bundle">%1$s supprimé (les deux pilotes)</string> + <string name="drivers_deleted">%1$s supprimé</string> + <string name="drivers_release_status">Dernières versions : %1$s · vérifié %2$s</string> + <string name="drivers_release_status_failed">Dernières versions : %1$s · %2$s inaccessible · vérifié %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">il y a %1$d min</item> + <item quantity="many">il y a %1$d min</item> + <item quantity="other">il y a %1$d min</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">il y a %1$d h</item> + <item quantity="many">il y a %1$d h</item> + <item quantity="other">il y a %1$d h</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">il y a %1$d jour</item> + <item quantity="many">il y a %1$d jours</item> + <item quantity="other">il y a %1$d jours</item> + </plurals> + <string name="drivers_checking_sources">Vérification de Banners-Turnip, WinNative et DroidDeck…</string> + <string name="drivers_check_failed">échec de la vérification</string> + <string name="drivers_installed_pick_either">%1$s installé - choisissez-le dans l\'une ou l\'autre liste pour définir les deux pilotes</string> + <string name="drivers_installed_pick">%1$s installé - choisissez-le dans le menu</string> + + <string name="session_wait_removal">Attendez la fin de la suppression de l\'environnement d\'exécution</string> + <string name="session_title_game">Jeu</string> + <string name="session_touch_auto_touchpad">pavé tactile</string> + <string name="session_touch_auto_direct">direct</string> + <string name="session_swap_failed">Échec du remplacement : %1$s</string> + <string name="session_profile_save_failed">Échec de l\'enregistrement du profil : %1$s</string> + <string name="session_desktop_paused">Le bureau est en pause</string> + <string name="session_named_paused">%1$s est en pause</string> + <string name="session_program_paused">Le programme est en pause</string> + <string name="session_starting_desktop">Démarrage du bureau</string> + <string name="session_starting_named">Démarrage de %1$s</string> + <string name="session_starting_program">Démarrage du programme</string> + <string name="session_no_logs">Aucun journal pour cette session.</string> + <string name="session_logs_archive_failed">Impossible de créer l\'archive des journaux de session.</string> + <string name="session_logs_share_failed">Impossible de partager les journaux de session.</string> + <string name="session_starting_session">Démarrage de la session…</string> + <string name="session_runtime_downloading">téléchargement de l\'environnement d\'exécution Linux</string> + <string name="session_runtime_downloading_mb">téléchargement de l\'environnement d\'exécution Linux · %1$d sur %2$d Mo</string> + <string name="session_runtime_checking">vérification de l\'environnement d\'exécution Linux</string> + <string name="session_runtime_unpacking">décompression de l\'environnement d\'exécution Linux</string> + <string name="session_desktop_downloading">téléchargement du bureau</string> + <string name="session_desktop_downloading_mb">téléchargement du bureau · %1$d sur %2$d Mo</string> + <string name="session_desktop_checking">vérification du bureau</string> + <string name="session_desktop_unpacking">décompression du bureau</string> + <string name="session_proton_downloading">téléchargement de Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">téléchargement de Proton Experimental (ARM64) · %1$d sur %2$d Mo</string> + <string name="session_proton_checking">vérification de Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">décompression de Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Impossible d\'accéder au catalogue des environnements d\'exécution. Vérifiez la connexion et appuyez à nouveau sur Play.</string> + <string name="session_runtime_install_failed">L\'environnement d\'exécution Linux ne s\'est pas installé. Vérifiez-le dans « Paramètres » et appuyez à nouveau sur Play.</string> + <string name="session_desktop_install_failed">Le bureau ne s\'est pas installé (%1$s). Vérifiez la connexion et appuyez à nouveau sur Bureau.</string> + <string name="session_ended_named">%1$s s\'est arrêté de manière inattendue. Partagez les journaux dans un rapport de bug, ou réessayez.</string> + <string name="session_ended_program">Le programme s\'est arrêté de manière inattendue. Partagez les journaux dans un rapport de bug, ou réessayez.</string> + <string name="session_ended_desktop">Le bureau s\'est arrêté de manière inattendue. Partagez les journaux dans un rapport de bug, ou réessayez.</string> + <string name="session_ended_detail">Code de sortie %1$d · %2$s</string> + <string name="session_ended_no_log">aucun journal</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Le journal indique %1$d erreur « Function not implemented » : l\'accélération seccomp de proot fait échouer un utilitaire sur cet appareil. Essayez %2$s → « %3$s » (ou « %4$s ») et relancez.</item> + <item quantity="many">Le journal indique %1$d erreurs « Function not implemented » : l\'accélération seccomp de proot fait échouer un utilitaire sur cet appareil. Essayez %2$s → « %3$s » (ou « %4$s ») et relancez.</item> + <item quantity="other">Le journal indique %1$d erreurs « Function not implemented » : l\'accélération seccomp de proot fait échouer un utilitaire sur cet appareil. Essayez %2$s → « %3$s » (ou « %4$s ») et relancez.</item> + </plurals> + + <string name="mode_decky_plugins">Plugins</string> + <string name="mode_decky_plugins_hint">Installez un ZIP de plugin pour la prochaine session Steam.</string> + <string name="mode_decky_plugin_downloading">Téléchargement…</string> + <string name="mode_decky_plugin_install_zip">Installer depuis un ZIP</string> + <string name="store_cat_games">Jeux</string> + <string name="store_cat_audio_video">Audio et vidéo</string> + <string name="store_cat_graphics">Graphisme</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Bureautique</string> + <string name="store_cat_developer">Développement</string> + <string name="store_cat_education">Éducation</string> + <string name="store_cat_science">Sciences</string> + <string name="store_cat_system">Système</string> + <string name="store_cat_utilities">Utilitaires</string> + <string name="store_section_popular">Populaires</string> + <string name="store_section_trending">Tendances</string> + <string name="store_section_new">Nouveautés</string> + <string name="store_section_updated">Mis à jour</string> + <string name="store_section_loading">chargement…</string> + <string name="store_flatpak_setup">Configuration de Flatpak</string> + <string name="store_problem">%1$s : %2$s</string> + <string name="store_updates_check_failed">Impossible de rechercher des mises à jour sur Flathub</string> + <string name="content_rom_installed">installé</string> + <string name="content_rom_folder">dossier</string> + <string name="theme_graphite">Graphite</string> + <string name="theme_graphite_detail">Surfaces graphite, avec le bleu de l\'orbe du logo pour tout élément sélectionné, ciblé ou pressé.</string> + <string name="theme_paper">Papier sur noir</string> + <string name="theme_paper_detail">Le blanc est la couleur principale ; le bleu de l\'icône signale les filets, les anneaux et les points.</string> + <string name="theme_icon_blue">Bleu icône</string> + <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="pckb_key_esc">Échap</string> + <string name="pckb_key_ins">Inser</string> + <string name="pckb_key_del">Suppr</string> + <string name="pckb_key_home">Début</string> + <string name="pckb_key_end">Fin</string> + <string name="pckb_key_pgup">PgPréc</string> + <string name="pckb_key_pgdn">PgSuiv</string> + <string name="pckb_key_backspace">⌫ Retour</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Verr Maj</string> + <string name="pckb_key_enter">Entrée ⏎</string> + <string name="pckb_key_shift">⇧ Maj</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Espace</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Installez d\'abord l\'environnement d\'exécution</string> + <string name="game_sync_err_steam_library">La bibliothèque Steam n\'est pas disponible</string> + <string name="game_sync_err_previous_sd">L\'ancienne bibliothèque SD n\'est pas disponible</string> + <string name="game_sync_err_game_storage">Le stockage des jeux n\'est pas disponible</string> + <string name="game_sync_err_added_games">Le dossier des jeux ajoutés n\'est pas disponible</string> + <string name="game_sync_err_manifests">Les manifestes Steam ne sont pas disponibles</string> + <string name="content_system_many">Nombreux systèmes</string> + <string name="fm_drive_internal">Interne</string> <string name="fm_drive_linux">Système Linux</string> + <string name="fm_drive_sd">Carte SD</string> + <string name="fm_drive_storage">Stockage</string> + <string name="fm_select">Sélectionner</string> + <string name="fm_properties">Propriétés</string> + <string name="fm_favorite_add">Ajouter aux favoris</string> + <string name="fm_favorite_remove">Retirer des favoris</string> + <string name="fm_rename">Renommer</string> + <string name="fm_copy">Copier</string> + <string name="fm_cut">Couper</string> + <string name="fm_actions">Actions</string> + <string name="fm_favorites">Favoris</string> + <string name="fm_pin_current">Épingler le dossier actuel</string> + <string name="fm_no_favorites">Aucun favori pour l\'instant - épinglez un dossier via son menu ⋮ pour y revenir rapidement.</string> + <string name="fm_unpin_favorite">Retirer des favoris</string> + <string name="fm_size_zero">0 octet</string> + <string name="fm_unit_bytes">octets</string> + <string name="fm_prop_location">Emplacement</string> + <string name="fm_prop_type">Type</string> + <string name="fm_prop_size">Taille</string> + <string name="fm_prop_modified">Modifié</string> + <string name="fm_type_folder">Dossier</string> + <string name="fm_type_file">Fichier</string> + <string name="fm_type_ext_file">Fichier %1$s</string> + <string name="fm_read_only">Lecture seule</string> + <string name="fm_read_only_hint">Empêche les jeux (et Wine) d\'écraser ou de supprimer ce fichier.</string> + <string name="fm_read_only_failed">Impossible de modifier « Lecture seule »</string> + <string name="fm_hidden">Masqué</string> + <string name="fm_hidden_unsupported">Ce stockage ne peut pas enregistrer l\'attribut masqué.</string> + <string name="fm_hidden_hint">Marque le fichier comme masqué sous Windows (attribut masqué de Wine).</string> + <string name="fm_hidden_failed">Impossible de modifier « Masqué » sur ce stockage</string> + <string name="fm_done">Terminé</string> + <string name="fm_op_deleting">Suppression...</string> + <string name="fm_delete_failed">Échec de la suppression</string> + <string name="fm_op_moving">Déplacement...</string> + <string name="fm_op_copying">Copie...</string> + <string name="fm_op_moving_item">Déplacement - %1$s</string> + <string name="fm_op_copying_item">Copie - %1$s</string> + <string name="fm_op_moving_batch">Déplacement %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Copie %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d terminé(s), %2$d en échec</string> + <string name="fm_paste_skipped">%1$d terminé(s), %2$d ignoré(s)</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d élément déplacé</item> + <item quantity="many">%1$d éléments déplacés</item> + <item quantity="other">%1$d éléments déplacés</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d élément copié</item> + <item quantity="many">%1$d éléments copiés</item> + <item quantity="other">%1$d éléments copiés</item> + </plurals> + <string name="fm_already_exists">« %1$s » existe déjà</string> + <string name="fm_op_renaming">Renommage...</string> + <string name="fm_rename_failed">Échec du renommage</string> + <string name="fm_op_creating_folder">Création du dossier...</string> + <string name="fm_create_folder_failed">Impossible de créer le dossier</string> + <string name="fm_new_folder">Nouveau dossier</string> + <string name="fm_folder_name">Nom du dossier</string> + <string name="fm_create">Créer</string> + <string name="fm_new_name">Nouveau nom</string> + <string name="fm_delete_title">Supprimer ?</string> + <string name="fm_delete_text">Supprimer définitivement « %1$s » ?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Supprimer %1$d élément ?</item> + <item quantity="many">Supprimer %1$d éléments ?</item> + <item quantity="other">Supprimer %1$d éléments ?</item> + </plurals> + <string name="fm_cannot_undo">Cette action est irréversible.</string> + <plurals name="fm_and_more"> + <item quantity="one">…et %1$d autre</item> + <item quantity="many">…et %1$d autres</item> + <item quantity="other">…et %1$d autres</item> + </plurals> + <string name="fm_op_deleting_batch">Suppression %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d élément n\'a pas pu être supprimé</item> + <item quantity="many">%1$d éléments n\'ont pas pu être supprimés</item> + <item quantity="other">%1$d éléments n\'ont pas pu être supprimés</item> + </plurals> + <string name="fm_conflict_merge_hint">Fusionner ajoute et remplace des fichiers dans le dossier existant.</string> + <string name="fm_conflict_overwrite_hint">Écraser remplace le fichier existant.</string> + <string name="fm_conflict_apply_all">Appliquer à tous les conflits</string> + <string name="fm_conflict_merge">Fusionner</string> + <string name="fm_conflict_overwrite">Écraser</string> + <string name="fm_conflict_keep_both">Conserver les deux</string> + <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_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> + <string name="fm_search">Rechercher</string> + <string name="fm_sort">Trier</string> + <string name="fm_sort_name">Nom</string> + <string name="fm_sort_date">Date de modification</string> + <string name="fm_rows_comfortable">Lignes aérées</string> + <string name="fm_rows_compact">Lignes compactes</string> + <string name="fm_hide_hidden">Masquer les fichiers cachés</string> + <string name="fm_show_hidden">Afficher les fichiers cachés</string> + <string name="fm_hide_favorites">Masquer les favoris</string> + <string name="fm_show_favorites">Afficher les favoris</string> + <string name="fm_filter_folder">Filtrer ce dossier</string> + <string name="fm_free_space">%1$s libres</string> + <string name="fm_selected_count">%1$d sélectionné(s)</string> + <string name="fm_select_none">Aucun</string> + <string name="fm_select_all">Tout</string> + <string name="fm_paste">Coller</string> + <plurals name="fm_items"> + <item quantity="one">%1$d élément</item> + <item quantity="many">%1$d éléments</item> + <item quantity="other">%1$d éléments</item> + </plurals> + <string name="fm_paste_here">Coller %1$s ici</string> + <string name="fm_paste_move_here">Coller %1$s ici (déplacer)</string> + <string name="fm_rail_title">Fichiers</string> + <string name="fm_rail_storage">STOCKAGE</string> + <string name="fm_rail_quick">ACCÈS RAPIDE</string> + <string name="fm_rail_favorites">FAVORIS</string> + <string name="fm_rail_downloads">Téléchargements</string> + <string name="fm_rail_downloads_short">Téléch.</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Journaux de session</string> + <string name="fm_rail_pictures">Images</string> + <string name="fm_favorite_added">« %1$s » ajouté aux favoris</string> + <string name="fm_favorite_removed">« %1$s » retiré des favoris</string> + <string name="fm_empty_directory">Dossier vide</string> + <string name="fm_up_one_level">Remonter d\'un niveau</string> + <string name="fm_choose_folder">Choisir un dossier</string> + <string name="fm_choose_file">Choisir un fichier</string> + <string name="ctrl_tint_steam_blue">Bleu Steam</string> + <string name="ctrl_tint_sky">Ciel</string> + <string name="ctrl_tint_white">Blanc</string> + <string name="ctrl_tint_violet">Violet</string> + <string name="ctrl_tint_green">Vert</string> + <string name="ctrl_tint_amber">Ambre</string> + <string name="ctrl_tint_red">Rouge</string> + <string name="ctrl_tint_pink">Rose</string> + <string name="ctrl_button_a">Bouton A</string> + <string name="ctrl_button_b">Bouton B</string> + <string name="ctrl_button_x">Bouton X</string> + <string name="ctrl_button_y">Bouton Y</string> + <string name="ctrl_button_lb">Bouton bombé gauche</string> + <string name="ctrl_button_rb">Bouton bombé droit</string> + <string name="ctrl_button_lt">Gâchette gauche</string> + <string name="ctrl_button_rt">Gâchette droite</string> + <string name="ctrl_button_view">Bouton Affichage</string> + <string name="ctrl_button_menu">Bouton Menu</string> + <string name="ctrl_target_view">Affichage</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">Croix haut</string> + <string name="ctrl_target_down">Croix bas</string> + <string name="ctrl_target_left">Croix gauche</string> + <string name="ctrl_target_right">Croix droite</string> + <string name="ctrl_target_hidden">Masqué</string> + <string name="ctrl_editor_drag">Faites glisser pour déplacer</string> + <string name="ctrl_editor_snap">Aimanter</string> + <string name="ctrl_editor_save">Enregistrer</string> + <string name="second_mode_none">Aucun</string> + <string name="second_mode_keyboard_trackpad">Clavier + pavé tactile</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Poignées Deck + pavés tactiles</string> + + <string name="rtinst_removing">Suppression de l\'environnement d\'exécution Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Suppression de l\'environnement d\'exécution Linux · %1$d élément</item> + <item quantity="many">Suppression de l\'environnement d\'exécution Linux · %1$d éléments</item> + <item quantity="other">Suppression de l\'environnement d\'exécution Linux · %1$d éléments</item> + </plurals> + <string name="rtinst_removed">Environnement d\'exécution Linux supprimé</string> + <string name="rtinst_removal_failed">Impossible de terminer la suppression de l\'environnement d\'exécution Linux. Réessayez la suppression dans « Paramètres ».</string> + <string name="rtinst_removing_leftovers">Suppression des restes de l\'environnement d\'exécution</string> + <string name="rtinst_downloading">Téléchargement</string> + <string name="rtinst_verifying">Vérification</string> + <string name="rtinst_extracting">Extraction</string> + <string name="rtinst_channel_description">Affiché pendant l\'installation ou la suppression de l\'environnement d\'exécution Linux</string> + <string name="rtinst_title_installing">Installation de l\'environnement d\'exécution Linux</string> + <string name="rtinst_title_removing">Suppression de l\'environnement d\'exécution Linux</string> + + <string name="deskpkg_runtime_missing">L\'environnement d\'exécution Linux n\'est pas installé</string> + <string name="deskpkg_no_checksum">Le catalogue n\'a pas de somme de contrôle pour %1$s</string> + <string name="deskpkg_checksum_mismatch">Somme de contrôle incorrecte - rien n\'a été modifié</string> + <string name="deskpkg_installing">Installation de %1$s</string> + <string name="deskpkg_place_failed">Impossible de placer l\'AppImage</string> + <string name="deskpkg_extract_failed">Échec de l\'extraction</string> + <string name="deskpkg_install_failed">Échec de l\'installation</string> + + <string name="flatpakmgr_setup_failed">Échec de la configuration de Flatpak (code %1$d)</string> + <string name="flatpakmgr_setup_unfinished">La configuration de Flatpak ne s\'est pas terminée</string> + <string name="flatpakmgr_busy">Une autre tâche de la boutique est en cours</string> + <string name="flatpakmgr_not_ready">Configurez d\'abord Flatpak</string> + <string name="flatpakmgr_starting">Démarrage</string> + <string name="flatpakmgr_exit_status">Flatpak s\'est arrêté avec le code %1$d</string> + <string name="flatpakmgr_installing">Installation : %1$s</string> + <string name="flatpakmgr_updating">Mise à jour : %1$s</string> + <string name="flatpakmgr_removing">Suppression : %1$s</string> + <string name="flatpakmgr_installing_step">Installation : %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Mise à jour : %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Suppression : %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">traductions</string> + <string name="flatpakmgr_ref_graphics_drivers">pilotes graphiques</string> + <string name="flatpakmgr_ref_media_codecs">codecs multimédias</string> + <string name="flatpakmgr_ref_runtime">environnement d\'exécution %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">environnement d\'exécution %1$s %2$s</string> + + <string name="appimg_too_small">Le fichier est trop petit pour être un AppImage</string> + <string name="appimg_unreadable">Impossible de lire le fichier : %1$s</string> + <string name="appimg_not_linux">Ce n\'est pas un AppImage (ce n\'est pas un programme Linux)</string> + <string name="appimg_wrong_arch">Cet AppImage n\'est conçu ni pour ARM64 (aarch64) ni pour les PC x86</string> + <string name="appimg_not_appimage">C\'est un programme Linux, mais pas un AppImage</string> + <string name="appimg_wrong_type">Seuls les AppImage de type 2 peuvent être importés (celui-ci est de type %1$d)</string> + <string name="appimg_no_space_import">Espace libre insuffisant : l\'importation nécessite environ %1$s</string> + <string name="appimg_no_space_update">Espace libre insuffisant : la mise à jour nécessite environ %1$s</string> + <string name="appimg_import_failed">Échec de l\'importation</string> + <string name="appimg_gone">Cet AppImage n\'existe plus</string> + <string name="appimg_update_failed">Échec de la mise à jour</string> + <string name="appimg_extracting">Extraction de %1$s</string> + <string name="appimg_extract_failed">Impossible d\'extraire l\'AppImage</string> + <string name="appimg_extract_failed_detail">Impossible d\'extraire l\'AppImage : %1$s</string> + + <string name="deckymgr_stop_session_loader">Arrêtez la session en cours avant d\'installer Decky Loader</string> + <string name="deckymgr_download_failed">Échec du téléchargement de Decky Loader</string> + <string name="deckymgr_size_mismatch">La taille de Decky Loader ne correspond pas aux métadonnées de la version</string> + <string name="deckymgr_checksum_download_failed">Impossible de télécharger la somme de contrôle de la version</string> + <string name="deckymgr_checksum_missing">La somme de contrôle de la version est manquante</string> + <string name="deckymgr_checksum_invalid">La somme de contrôle de la version n\'est pas valide</string> + <string name="deckymgr_checksum_mismatch">Somme de contrôle de Decky Loader incorrecte</string> + <string name="deckymgr_not_elf">Le fichier de la version n\'est pas un exécutable Linux 64 bits compatible</string> + <string name="deckymgr_session_started_loader">Une session a démarré pendant le téléchargement ; arrêtez-la avant d\'installer Decky Loader</string> + <string name="deckymgr_loader_not_executable">Impossible de rendre PluginLoader exécutable</string> + <string name="deckymgr_cef_failed">Impossible d\'activer le débogage distant CEF de Steam</string> + <string name="deckymgr_stage_failed">Impossible de préparer PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Impossible de conserver le PluginLoader existant</string> + <string name="deckymgr_loader_activate_failed">Impossible d\'activer le nouveau PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Arrêtez la session en cours avant d\'installer un plugin</string> + <string name="deckymgr_loader_required">Installez Decky Loader avant d\'importer un plugin</string> + <string name="deckymgr_zip_unreadable">Impossible de lire le fichier ZIP sélectionné</string> + <string name="deckymgr_plugins_dir_failed">Impossible de créer le dossier des plugins Decky</string> + <string name="deckymgr_extracting_zip">Extraction du ZIP du plugin</string> + <string name="deckymgr_zip_one_folder">Le ZIP du plugin doit contenir un seul dossier de plugin à la racine</string> + <string name="deckymgr_zip_missing_files">Il manque plugin.json, package.json ou dist/index.js dans le ZIP du plugin</string> + <string name="deckymgr_plugin_name_missing">Le nom du plugin est manquant</string> + <string name="deckymgr_session_started_plugin">Une session a démarré pendant l\'installation ; arrêtez-la avant d\'installer un plugin</string> + <string name="deckymgr_plugin_installed">Plugin installé · redémarrez Steam pour le charger</string> + <string name="deckymgr_plugin_install_failed">Échec de l\'installation du ZIP du plugin</string> + <string name="deckymgr_zip_too_many">Le ZIP du plugin contient trop d\'éléments</string> + <string name="deckymgr_zip_invalid_path">Le ZIP du plugin contient un chemin non valide</string> + <string name="deckymgr_zip_duplicate_paths">Le ZIP du plugin contient des chemins en double</string> + <string name="deckymgr_zip_unsafe_path">Le ZIP du plugin contient un chemin dangereux</string> + <string name="deckymgr_folder_failed">Impossible de créer le dossier du plugin</string> + <string name="deckymgr_zip_too_large">Une fois décompressé, le ZIP du plugin dépasse la limite de 1 Gio</string> + <string name="deckymgr_bundled_not_executable">Impossible de rendre exécutable le binaire fourni avec le plugin</string> + <string name="deckymgr_remote_entry_invalid">Entrée remote_binary non valide</string> + <string name="deckymgr_remote_name_invalid">Nom de binaire distant non valide</string> + <string name="deckymgr_remote_url_https">L\'URL du binaire distant doit utiliser HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Le binaire distant %1$s a un hachage SHA-256 non valide</string> + <string name="deckymgr_bin_dir_failed">Impossible de créer le dossier bin du plugin</string> + <string name="deckymgr_downloading_binary">Téléchargement du binaire du plugin · %1$s</string> + <string name="deckymgr_binary_download_failed">Impossible de télécharger le binaire du plugin %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Somme de contrôle du binaire du plugin incorrecte · %1$s</string> + <string name="deckymgr_binary_not_executable">Impossible de rendre exécutable le binaire du plugin · %1$s</string> + <string name="deckymgr_binary_replace_failed">Impossible de remplacer le binaire du plugin · %1$s</string> + <string name="deckymgr_binary_install_failed">Impossible d\'installer le binaire du plugin · %1$s</string> + <string name="deckymgr_folder_taken">Le dossier du plugin appartient à un autre plugin</string> + <string name="deckymgr_preserve_failed">Impossible de conserver le plugin existant</string> + <string name="deckymgr_activate_failed">Impossible d\'activer le plugin importé</string> + <string name="deckymgr_settings_failed">Impossible de mettre à jour les paramètres des plugins Decky</string> + <string name="deckymgr_restore_failed">Impossible de restaurer le plugin existant</string> + + <string name="adbfix_save_failed">Impossible d\'enregistrer l\'identité du débogage sans fil</string> + <string name="adbfix_command_failed">Échec de la commande ADB (%1$d)</string> + <string name="adbfix_not_confirmed">Android n\'a pas confirmé la modification de la limite des processus enfants : %1$s</string> + <string name="adbfix_no_pairing">Aucun appairage de débogage sans fil n\'est enregistré</string> + <string name="adbfix_enter_address">Saisissez l\'adresse IP et le port actuels du débogage sans fil</string> + + <string name="adbpair_timed_out">Délai dépassé en attendant la fenêtre d\'appairage. Réessayez depuis DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Impossible de rechercher la fenêtre d\'appairage (%1$d). Vérifiez que le Wi-Fi est activé.</string> + <string name="adbpair_discovery_failed">Impossible de rechercher la fenêtre d\'appairage : %1$s</string> + <string name="adbpair_six_digits">Saisissez les 6 chiffres du code</string> + <string name="adbpair_pairing">Appairage…</string> + <string name="adbpair_code_rejected">Ce code n\'a pas fonctionné. Rouvrez la fenêtre d\'appairage et saisissez son nouveau code.</string> + <string name="adbpair_connecting">Appairé. Connexion…</string> + <string name="adbpair_port_not_found">Appairé, mais le port de débogage sans fil est introuvable. Laissez le débogage sans fil activé et réessayez.</string> + <string name="adbpair_applying">Application du paramètre…</string> + <string name="adbpair_command_failed">Échec de la commande de débogage sans fil</string> + <string name="adbpair_channel_name">Configuration du débogage sans fil</string> + <string name="adbpair_channel_description">Demande le code d\'appairage du débogage sans fil pendant que les paramètres sont ouverts</string> + <string name="adbpair_title_pair">Appairer le débogage sans fil</string> + <string name="adbpair_waiting_text">Activez le débogage sans fil, puis appuyez sur « Associer l\'appareil avec un code d\'appairage ».</string> + <string name="adbpair_waiting_long">Activez le débogage sans fil, puis appuyez sur « Associer l\'appareil avec un code d\'appairage ». Restez dans les paramètres : le code se saisit dans cette notification.</string> + <string name="adbpair_code_label">Code d\'appairage à 6 chiffres</string> + <string name="adbpair_code_hint">Appuyez sur « Saisir le code » et tapez les 6 chiffres affichés dans les paramètres.</string> + <string name="adbpair_title_code">Saisissez le code d\'appairage Wi-Fi</string> + <string name="adbpair_title_retry">Saisissez à nouveau le code</string> + <string name="adbpair_enter_code">Saisir le code</string> + <string name="adbpair_title_working">Configuration de Steam</string> + <string name="adbpair_title_done">Steam est prêt</string> + <string name="adbpair_done_text">Appuyez pour revenir à DroidDeck. Vous pouvez maintenant désactiver le débogage sans fil.</string> + <string name="adbpair_title_failed">Configuration du débogage sans fil interrompue</string> + + <string name="selfinst_download_failed">Échec du téléchargement</string> + <string name="selfinst_size_mismatch">La taille du téléchargement ne correspond pas à l\'APK publié ; il a été supprimé - réessayez</string> + <string name="selfinst_checksum_mismatch">Le téléchargement ne correspond pas à sa somme de contrôle et a été supprimé - réessayez</string> + <string name="selfinst_wrong_package">La mise à jour concerne le paquet Android %1$s, et non %2$s</string> + <string name="selfinst_metadata_signer">Les métadonnées de la mise à jour ne mentionnent pas la clé de signature de publication de DroidDeck</string> + <string name="selfinst_unreadable">Android n\'a pas pu lire l\'APK téléchargé</string> + <string name="selfinst_apk_wrong_package">L\'APK téléchargé concerne %1$s, et non %2$s</string> + <string name="selfinst_version_mismatch">L\'APK téléchargé indique versionCode %1$d, et non le %2$d publié</string> + <string name="selfinst_downgrade">Android refuse d\'installer versionCode %1$d par-dessus le %2$d installé</string> + <string name="selfinst_no_signing">L\'APK téléchargé ne contient aucune information de signature</string> + <string name="selfinst_wrong_signer">L\'APK téléchargé n\'est pas signé avec la clé de publication de DroidDeck</string> + <string name="appupd_http">Le catalogue des mises à jour a renvoyé HTTP %1$d</string> + + <string name="loadstate_starting">Démarrage de la session…</string> + <string name="loadstate_elapsed">%1$d:%2$02d écoulées · toujours en cours</string> + <string name="loadstate_steam_update">Téléchargement de la mise à jour du client Steam · %1$d%%</string> + <string name="loadstate_steam_client">Téléchargement du client Steam · %1$s</string> + + <string name="pextra_busy">Une installation d\'outil de compatibilité est déjà en cours</string> + <string name="pextra_stop_session">Arrêtez la session en cours avant d\'installer des outils de compatibilité</string> + <string name="pextra_no_release">Aucune version ARM64 trouvée pour %1$s</string> + <string name="pextra_no_space">Au moins 4 Go libres, plus la taille du téléchargement, sont nécessaires pour installer %1$s</string> + <string name="pextra_downloading">Téléchargement de %1$s %2$s</string> + <string name="pextra_retrying">Nouvelle tentative de téléchargement · essai %1$d sur %2$d</string> + <string name="pextra_interrupted">Téléchargement interrompu</string> + <string name="pextra_download_failed">Échec du téléchargement ; le fichier partiel est conservé pour pouvoir reprendre</string> + <string name="pextra_too_big">Le téléchargement dépassait la taille de la version et a été supprimé</string> + <string name="pextra_incomplete">Le téléchargement est incomplet ; le fichier partiel est conservé pour une reprise ultérieure</string> + <string name="pextra_verifying">Vérification du téléchargement</string> + <string name="pextra_checksum_unreadable">Impossible de lire la somme de contrôle de la version ; réessayez</string> + <string name="pextra_no_checksum">%1$s %2$s ne publie aucune somme de contrôle ; rien n\'a été installé</string> + <string name="pextra_checksum_mismatch">Somme de contrôle incorrecte ; le téléchargement a été supprimé</string> + <string name="pextra_session_started">Une session a démarré pendant le téléchargement ; arrêtez-la avant d\'installer des outils de compatibilité</string> + <string name="pextra_installing">Installation de %1$s</string> + <string name="pextra_install_failed">Échec de l\'installation de %1$s (code %2$d)</string> + <string name="pextra_could_not_install">Impossible d\'installer %1$s</string> + <string name="esync_fetching">Récupération du pack droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">avec les utilitaires Linux</string> + <string name="cmgr_fex_dlls_only">DLL uniquement</string> + <string name="cmgr_original_proton_updated">Original (Proton mis à jour depuis le dernier remplacement)</string> + <string name="cmgr_changed_outside">Modifié en dehors de « Composants »</string> + <string name="cmgr_not_present">absent</string> + <string name="cmgr_original_version">Original %1$s</string> + <string name="cmgr_original_from">Original issu de %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s sera placé dans %3$s à la fermeture du jeu qui l\'utilise.</string> + <string name="cmgr_swap_done">%1$s %2$s est maintenant dans %3$s. Prendra effet au prochain lancement d\'un jeu.</string> + <string name="cmgr_original_missing">Cet ensemble original n\'est pas enregistré</string> + <string name="cmgr_restore_queued">%1$s de %2$s reviendra à l\'original à la fermeture du jeu qui l\'utilise.</string> + <string name="cmgr_restore_done">%1$s de %2$s restauré à partir de l\'original %3$s.</string> + <string name="cmgr_package_in_use">%1$s est utilisé dans %2$s. Remplacez-le d\'abord par autre chose dans ce Proton.</string> + <string name="cmgr_package_not_stored">%1$s n\'est pas enregistré</string> + <string name="cmgr_deleted">%1$s supprimé.</string> + <string name="cmgr_original_kept">L\'original de la version installée est conservé : c\'est le moyen d\'y revenir.</string> + <string name="cmgr_not_stored">Non enregistré</string> + <string name="cmgr_deleted_original">Original %1$s de %2$s supprimé.</string> + <string name="cmgr_nightlies_only">Les téléchargements proviennent uniquement des versions Nightlies</string> + <string name="cmgr_list_predates_checksums">Cette liste de paquets est antérieure aux sommes de contrôle - actualisez-la et réessayez</string> + <string name="cmgr_checksum_mismatch">Somme de contrôle incorrecte</string> + + <string name="sprefs_upscaler_linear">Linéaire</string> + <string name="sprefs_upscaler_nearest">Plus proche voisin</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (qualité)</string> + <string name="sprefs_upscaler_sharpen">Netteté seule</string> + <string name="sprefs_lod_bias_auto">Auto (selon la mise à l\'échelle)</string> + + <string name="look_off_desc">Aucun effet appliqué.</string> + <string name="look_game_clarity">Clarté de jeu</string> + <string name="look_game_clarity_desc">Netteté avec une pointe de contraste - pour tous les jours.</string> + <string name="look_vivid">Éclatant</string> + <string name="look_vivid_desc">Couleurs poussées à fond. Anti-banding activé pour que le ciel ne forme pas de bandes.</string> + <string name="look_cinematic">Cinématique</string> + <string name="look_cinematic_desc">Contraste plus profond, couleurs plus froides, contours lissés.</string> + <string name="look_competitive">Compétitif</string> + <string name="look_competitive_desc">Ombres éclaircies et netteté renforcée - repérez les adversaires en premier.</string> + <string name="look_adaptive_sharpen">Netteté adaptative</string> + <string name="look_adaptive_sharpen_desc">Netteté uniquement, couleurs intactes.</string> + <string name="look_filmic">Filmique</string> + <string name="look_filmic_desc">Courbe façon pellicule, légèrement atténuée.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Intense et percutant.</string> + <string name="look_retro_crt">CRT rétro</string> + <string name="look_retro_crt_desc">Les passes tube CRT et signal analogique combinées.</string> + <string name="look_upscale_sharp">Agrandissement net</string> + <string name="look_upscale_sharp_desc">Pour une résolution inférieure à celle de l\'écran.</string> + <string name="look_pixel_clean">Pixels nets</string> + <string name="look_pixel_clean_desc">Pixels nets pour la 2D et les vieux jeux.</string> + <string name="look_anime_edge">Contours anime</string> + <string name="look_anime_edge_desc">Contours façon dessin animé et netteté accrue.</string> + + <string name="gpuinfo_not_adreno">GPU non Adreno</string> + <string name="gpuinfo_supported">Pris en charge</string> + <string name="gpuinfo_experimental">Expérimental : ses pilotes sont des versions de test</string> + <string name="gpuinfo_below_tested">En dessous du matériel testé (Adreno 725 et plus récent) : risque de ne pas fonctionner</string> + <string name="gpuinfo_unsupported">Non pris en charge : DroidDeck nécessite un GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Limite de requêtes GitHub atteinte - réessayez plus tard</string> + <string name="turnip_github_http">GitHub a répondu HTTP %1$d</string> + <string name="turnip_download_failed">Échec du téléchargement</string> + <string name="turnip_list_predates_checksums">Cette liste de pilotes est antérieure aux sommes de contrôle - actualisez-la et réessayez</string> + <string name="turnip_checksum_mismatch">Somme de contrôle incorrecte - le téléchargement a été supprimé</string> + <string name="turnip_not_adrenotools">Ce n\'est pas un pilote AdrenoTools : %1$s</string> + <string name="turnip_reject_no_meta">aucun meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json est illisible (%1$s)</string> + <string name="turnip_reject_linux_driver">c\'est un pilote d\'exécution Linux (importez-le sous « Pilote d\'exécution Linux »)</string> + <string name="turnip_reject_wayland">c\'est un pilote de jeu Wayland, inutile pour cette application</string> + <string name="turnip_reject_no_library_name">meta.json n\'indique aucun libraryName, rien ne peut donc être transmis à AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json indique %1$s, qui n\'est pas dans le zip</string> + <string name="turnip_reject_not_aarch64">%1$s n\'est pas une bibliothèque partagée ELF AArch64 64 bits</string> + <string name="turnip_reject_glibc">%1$s utilise glibc - c\'est un Turnip « -Linux », à importer sous « Pilote d\'exécution Linux »</string> + <string name="lvd_no_library">Aucun libvulkan_freedreno*.so dans ce zip. Un zip Turnip Android (AdrenoTools) ou -Wayland n\'est pas un pilote d\'exécution Linux.</string> + <string name="lvd_not_aarch64">%1$s n\'est pas une bibliothèque partagée ELF AArch64 64 bits.</string> + <string name="lvd_not_glibc">%1$s n\'est pas un pilote glibc - il utilise la libc d\'Android. L\'environnement d\'exécution Linux nécessite un zip « -Linux » ; un Turnip standard ou « -Wayland » ne peut pas du tout être chargé par le client Steam.</string> + <string name="bundle_no_manifest">Ce n\'est pas un bundle de pilotes : aucun manifest.json désignant un pilote Android et un pilote Linux</string> + <string name="bundle_entry_outside">Ce n\'est pas un bundle de pilotes : %1$s pointe en dehors de celui-ci</string> + <string name="bundle_too_large">Ce n\'est pas un bundle de pilotes : il dépasse %1$d Mo une fois décompressé</string> + + <string name="gstore_sd_card">Carte SD</string> + <string name="gstore_folder">Dossier</string> + + <string name="logshare_chooser">Partager les journaux de session</string> + + <string name="hdr_needs_android_10">nécessite Android 10 ou plus récent (couches d\'affichage avec espace colorimétrique)</string> + <string name="hdr_none">cet écran n\'indique aucune prise en charge HDR</string> + <string name="hdr_not_hdr10">cet écran prend en charge %1$s, mais pas HDR10</string> + + <string name="gpu_this_gpu">ce GPU</string> + <string name="phantom_title_on">Limite des processus enfants activée</string> + <string name="phantom_title_unset">Limite des processus enfants non définie</string> + <string name="phantom_title_unreadable">Impossible de vérifier la limite des processus enfants</string> + <string name="phantom_title_off">Limite des processus enfants désactivée</string> + <string name="phantom_title_not_required">Limite des processus enfants non requise</string> + <string name="phantom_instructions_fix">%1$s Si ce n\'est pas possible, connectez cet appareil à un ordinateur avec ADB et exécutez la commande ci-dessous. Revenez ensuite ici et vérifiez à nouveau.</string> + <string name="phantom_instructions_off">Les sessions Steam peuvent démarrer.</string> + <string name="phantom_instructions_not_applicable">Cette version d\'Android n\'utilise pas cette limite.</string> + <string name="phantom_fix_toggle">Activez « Désactiver les limites pour les processus enfant » dans les options pour les développeurs, puis laissez les options pour les développeurs activées.</string> + <string name="phantom_fix_no_toggle">Cette version d\'Android ne dispose pas de cet interrupteur. Utilisez le débogage sans fil pour le modifier depuis cet appareil.</string> + <string name="upd_block_no_apk">Cette version ne propose aucun téléchargement pour cette copie de DroidDeck.</string> + <string name="upd_block_version_code">Android ne l\'installera pas par-dessus cette version, car son versionCode %1$d est inférieur à celui installé (%2$d).</string> + <string name="upd_fail_downgrade">Android n\'installe pas une version plus ancienne par-dessus une plus récente. Restez sur cette version jusqu\'à ce que le canal la rattrape.</string> + <string name="upd_fail_signature">Cette copie de DroidDeck est signée différemment (version compilée localement ?), Android ne peut donc pas la mettre à jour sur place.</string> + <string name="upd_fail_storage">Espace libre insuffisant pour la mise à jour.</string> + <string name="upd_fail_aborted">La mise à jour a été annulée.</string> + <string name="upd_fail_with_message">La mise à jour n\'a pas été installée : %1$s</string> + <string name="upd_fail_generic">La mise à jour n\'a pas été installée.</string> + <string name="saves_layout_zip">Zip %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s n\'a pas encore été lancé</string> + <string name="saves_none_found">Aucune sauvegarde trouvée pour %1$s</string> + <string name="saves_not_save_zip">%1$s ne contient pas de dossier drive_c : ce n\'est donc pas un zip de sauvegarde GameHub ou Winlator</string> + <string name="gstore_cannot_create">impossible de créer des dossiers dans %1$s</string> + <string name="gstore_cannot_write">impossible d\'écrire dans %1$s</string> + <string name="gstore_cannot_write_detail">impossible d\'écrire dans %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Dossier indisponible</string> + <string name="gfiles_name_taken">Un autre fichier utilise déjà %1$s</string> + <string name="gfiles_art_unavailable">Dossier des illustrations indisponible</string> + <string name="gfiles_unrelated_inventory">Le dossier contient un inventaire de synchronisation sans rapport</string> + <string name="gfiles_remove_failed">Impossible de supprimer %1$s</string> + <string name="gfiles_outside_folder">Le fichier sort du dossier d\'exportation</string> + <string name="cmgr_fex_unnamed">FEX (version sans nom de version)</string> + <string name="cmgr_no_profile">aucun profile.json dans %1$s</string> + <string name="cmgr_not_component_package">%1$s n\'est pas un paquet de composants Linux (type %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s libres</string> + <string name="mode_storage_auto_short">Automatique</string> + <string name="appupd_catalog_rejected">Le catalogue de mises à jour n\'a pas passé les vérifications (%1$s)</string> + <string name="main_adb_clip_label">Paramètre de processus enfants DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Connecté · Mode hors ligne</string> + <string name="setup_signed_in_unnamed">Connecté</string> + <string name="driver_tag_bundled">INTÉGRÉ</string> + <string name="driver_tag_downloaded">TÉLÉCHARGÉ</string> + <string name="driver_tag_imported">IMPORTÉ</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Affichage de la session</string> + <string name="display_resolution">Résolution</string> + <string name="display_game_fit">Ajustement des jeux 16:9</string> + <string name="display_game_fit_hint">Comment les jeux 16:9 s\'adaptent à cet écran. À la prochaine session.</string> + <string name="display_game_fit_unavailable">Choisissez « Adapter à l\'écran » ou une taille personnalisée plus étroite que 16:9.</string> + <string name="display_preserve">Conserver les proportions</string> + <string name="display_stretch">Étirer sur l\'écran</string> + <string name="display_image_scaling">Mise à l\'échelle de l\'image</string> + <string name="display_filter">Filtre de mise à l\'échelle</string> + <string name="display_filter_hint">Partagé entre Steam et le bureau.</string> + <string name="display_filter_live">S\'applique en direct. Partagé entre Steam et le bureau.</string> + <string name="display_filter_note">FSR, GSR et NIS s\'appliquent lors de l\'agrandissement de l\'image de la session. « Netteté seule » fonctionne aussi sans agrandissement.</string> + <string name="display_sharpness">Netteté du filtre</string> + <string name="display_frame_rate">Fréquence d\'images</string> + <string name="display_look_filter">%1$s Règle la mise à l\'échelle sur %2$s.</string> + <string name="display_match_screen">Adapter à l\'écran (%1$d×%2$d)</string> + <string name="display_follow_screen">Suivre l\'écran (s\'adapte au pliage et au dépliage)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Afficher les détails de l\'appareil</string> + <string name="device_info_hide">Masquer les détails de l\'appareil</string> + <string name="device_info_loading">Lecture des informations de l\'appareil…</string> + <string name="device_info_copy">Copier</string> + <string name="device_info_copy_hint">Copiez ces détails dans un rapport d\'erreur.</string> + <string name="device_info_copied">Copié.</string> + <string name="force_ssbs_title">Forcer SSBS</string> + <string name="force_ssbs_hint">Maintient activé un réglage de vitesse du CPU que Wine désactive sans cesse. Peut accélérer les jeux Windows sur Snapdragon 8 Elite ; peu de différence constatée sur les puces plus anciennes. Prendra effet au prochain lancement du jeu.</string> + + <string name="rail_stores">Boutiques</string> + <string name="source_steam">Steam</string> + <string name="source_added">Personnalisé</string> + <string name="setup_stores">Boutiques</string> + <string name="setup_stores_open_on">Ouvrir une boutique sur</string> + <string name="setup_stores_speed">Niveau de vitesse de téléchargement</string> + <string name="setup_stores_engine">Moteur des boutiques</string> + <string name="setup_stores_engine_chip_ready">● Moteur prêt</string> + <string name="setup_stores_engine_chip_missing">Non compilé</string> + <string name="stores_tier_balanced">Équilibré</string> + <string name="stores_tier_fast">Rapide</string> + <string name="stores_tier_max">Max</string> + <string name="stores_title">Boutiques</string> + <string name="stores_settings">Paramètres des boutiques</string> + <string name="stores_settings_eyebrow">Paramètres</string> + <string name="stores_chip_signed_out">(non connecté)</string> + <string name="stores_tab_store">Boutique</string> + <string name="stores_tab_installed">Installés</string> + <string name="stores_tab_library">Bibliothèque</string> + <string name="stores_tab_all">Tous</string> + <string name="stores_tab_downloads">Téléchargements</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Se connecter</string> + <string name="stores_signout_named">%1$s · se déconnecter</string> + <string name="stores_signout_title">Se déconnecter de %1$s ?</string> + <string name="stores_signout_note">Les jeux installés sont conservés. La bibliothèque sera récupérée à nouveau lors de votre prochaine connexion.</string> + <string name="stores_signout_stay">Rester connecté</string> + <string name="stores_signout_go">Se déconnecter</string> + <string name="stores_search_catalog">Rechercher dans le catalogue %1$s…</string> + <string name="stores_search_installed">Rechercher dans les jeux installés…</string> + <string name="stores_search_library">Rechercher dans votre bibliothèque…</string> + <string name="stores_search_open">Rechercher</string> + <string name="stores_installed_empty">Aucun jeu installé</string> + <string name="stores_library_loading">Chargement</string> + <string name="stores_nothing_matches">Aucun jeu</string> + <string name="stores_shelves_loading">Chargement de la boutique…</string> + <string name="stores_amazon_no_catalog">Aucun catalogue</string> + <string name="stores_shelf_new">Nouveautés</string> + <string name="stores_shelf_deals">Promotions</string> + <string name="stores_shelf_free">Jeux gratuits</string> + <string name="stores_shelf_trending">Tendances</string> + <string name="stores_shelf_library">Votre bibliothèque</string> + <string name="stores_play">Jouer</string> + <string name="stores_install">Installer</string> + <string name="stores_resume_install">Reprendre l\'installation</string> + <string name="stores_dl_interrupted">Interrompu</string> + <string name="stores_install_size">Installer · %1$s</string> + <string name="stores_get_free">Obtenir gratuitement</string> + <string name="stores_view_on">Voir sur %1$s</string> + <string name="stores_buy_price">Acheter · %1$s</string> + <string name="stores_installed_chip">Installé</string> + <string name="stores_in_library">Dans la bibliothèque</string> + <string name="stores_free">Gratuit</string> + <string name="stores_resume">Reprendre</string> + <string name="stores_refresh">Actualiser</string> + <string name="stores_sort">Trier</string> + <string name="stores_sort_last_played">Joués récemment</string> + <string name="stores_sort_recently_installed">Installés récemment</string> + <string name="stores_sort_title_asc">Titre A–Z</string> + <string name="stores_sort_title_desc">Titre Z–A</string> + <string name="stores_sort_size_desc">Taille : plus grand</string> + <string name="stores_sort_size_asc">Taille : plus petit</string> + <string name="stores_sort_release_date">Date de sortie</string> + <string name="stores_view_list">Vue liste</string> + <string name="stores_view_cards">Vue cartes</string> + <string name="stores_show_mature">Afficher le contenu pour adultes</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Hors ligne</string> + <string name="epic_card_none">Désactivé</string> + <string name="epic_eos">Connexion Epic (EOS)</string> + <string name="epic_offline">Lancer hors ligne</string> + <string name="epic_resolve">Corriger la connexion Epic</string> + <string name="epic_client_version">Version %1$s</string> + <string name="epic_client_no_runtime">Veuillez d\'abord installer l\'environnement d\'exécution Linux</string> + <string name="epic_client_checking">Vérification de la dernière version…</string> + <string name="epic_client_unpacking">Décompression…</string> + <string name="epic_client_unreachable">Le serveur de téléchargement n\'a pas répondu</string> + <string name="epic_client_needs_fex">L\'Epic Games Launcher a besoin de FEX, que Steam télécharge. Rouvrez le launcher une fois Steam démarré.</string> + <string name="epic_client_download_failed">Échec du téléchargement : %1$s</string> + <string name="epic_client_unpack_failed">Impossible de décompresser le launcher : %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher n\'a pas accepté la connexion. Relancez-le depuis le launcher.</string> + <string name="epic_client_uninstall_body">Supprime le lanceur et libère son espace. Vos jeux Epic restent installés et fonctionnent, et la connexion est conservée pour une prochaine installation.</string> + <string name="epic_client_uninstall_stops">La session en cours se ferme d’abord.</string> + <string name="epic_client_uninstalled">Epic Games Launcher désinstallé</string> + <string name="epic_client_uninstall_failed">Certains fichiers du lanceur n’ont pas pu être supprimés. Réessayez.</string> + <string name="epic_client_uninstalling">Attendez la fin de la désinstallation d\'Epic Games Launcher</string> + <string name="store_cloud_saves">Sauvegardes cloud</string> + <string name="cloud_upload">Envoyer vers le cloud</string> + <string name="cloud_download">Télécharger depuis le cloud</string> + <string name="cloud_none">Aucune sauvegarde cloud</string> + <string name="cloud_conflict">Conflit cloud</string> + <string name="cloud_conflict_files">Conflit cloud · %1$d fichiers</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Garder la version cloud</string> + <string name="cloud_keep_local">Garder la version locale</string> + <string name="cloud_checking">Vérification du cloud…</string> + <string name="cloud_last_sync">Dernière synchro : %1$s</string> + <string name="cloud_never">Pas encore synchronisé</string> + <string name="cloud_done">%1$d fichiers</string> + <string name="stores_eyebrow_installed">installé</string> + <string name="stores_eyebrow_library">dans votre bibliothèque</string> + <string name="stores_eyebrow_store">boutique</string> + <string name="achievements_title">Succès</string> + <string name="achievements_count">%1$d sur %2$d débloqués</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Débloqués · %1$d</string> + <string name="achievements_group_locked">Verrouillés · %1$d</string> + <string name="achievements_group_hidden">Cachés · %1$d</string> + <string name="achievements_hidden">Succès caché</string> + <string name="achievements_hidden_detail">Les détails s\'affichent une fois débloqué.</string> + <string name="achievements_all">Tous les succès débloqués</string> + <string name="achievements_reading">Lecture…</string> + <string name="achievements_signed_out">Connectez-vous à %1$s pour voir vos succès.</string> + <string name="achievements_unreachable">Impossible de joindre %1$s. Réessayez une fois en ligne.</string> + <string name="achievements_none">%1$s n\'indique aucun succès pour ce jeu.</string> + <string name="achievements_show_all">Tout afficher (%1$d)</string> + <string name="achievements_dialog_title">Succès · %1$s</string> + <string name="stores_in_steam">✓ Dans Steam</string> + <string name="stores_uninstall">Désinstaller</string> + <string name="stores_uninstalling">Désinstallation…</string> + <string name="stores_uninstall_title">Désinstaller %1$s ?</string> + <string name="stores_uninstall_body_size">Libère %1$s et le retire de Steam.</string> + <string name="stores_uninstall_body">Supprime ses fichiers et son raccourci Steam.</string> + <string name="stores_launch_not_registered">Steam détectera le jeu à son prochain démarrage ; lancez-le depuis Steam, ou démarrez Steam maintenant.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Choix de Steam pour chaque jeu</string> + <string name="stores_card_audio">Audio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Composants</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Moteur</string> + <string name="stores_card_engine_value">%1$s · natif</string> + <string name="stores_card_engine_java">%1$s · intégré</string> + <string name="stores_how_it_runs">Fonctionnement</string> + <string name="stores_kv_fetched">Récupéré depuis</string> + <string name="stores_kv_fetched_value">%1$s, avec votre compte</string> + <string name="stores_kv_installed_to">Installé dans</string> + <string name="stores_kv_installed_to_value">Stockage des jeux (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Lancé par</string> + <string name="stores_kv_launched_by_value">Steam et Proton, comme les jeux Steam</string> + <string name="stores_kv_launched_by_epic">Steam et Proton · connexion Epic à chaque lancement, superposition EOS désactivée</string> + <string name="stores_kv_launched_by_amazon">Steam et Proton · variables Amazon Games Services définies</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">ajouté à Steam à l\'installation (interface Deck + Steam Input)</string> + <string name="stores_downloads_empty">Aucun téléchargement</string> + <string name="stores_dl_paused">En pause</string> + <string name="stores_dl_queued">En attente</string> + <string name="stores_dl_queued_at">En attente · n° %1$d</string> + <string name="stores_dl_cancelled">Annulé</string> + <string name="stores_dl_failed">Échec</string> + <string name="stores_dl_failed_reason">Échec · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pause</string> + <string name="stores_dl_resume">Reprendre</string> + <string name="stores_dl_cancel">Annuler</string> + <string name="stores_dl_retry">Réessayer</string> + <string name="stores_dl_clear">Effacer</string> + <string name="stores_dl_clear_all">Effacer les terminés</string> + <string name="stores_stage_manifest">Manifeste</string> + <string name="stores_stage_download">Téléchargement</string> + <string name="stores_stage_verify">Vérification</string> + <string name="stores_stage_install">Installation</string> + <string name="stores_stage_done">Terminé</string> + <string name="stores_stage_checking">Contrôle en cours</string> + <string name="stores_stage_downloading">Téléchargement en cours</string> + <string name="stores_dl_cancel_confirm">Supprimer le téléchargement ?</string> + <string name="stores_dl_failed_kept">Échec · %1$s conservés</string> + <string name="stores_stage_verifying">Vérification en cours</string> + <string name="stores_stage_installing">Installation en cours</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d fichiers</string> + <string name="stores_download_manager">Gestionnaire de téléchargements</string> + <string name="stores_parallel">Téléchargements simultanés</string> + <string name="stores_install_where">Installer dans</string> + <string name="stores_install_title">Installer %1$s :</string> + <string name="stores_target_internal">Interne</string> + <string name="stores_target_free">%1$s libres</string> + <string name="stores_notification_channel">Téléchargements des boutiques</string> + <string name="stores_notification_channel_hint">Affiche la progression des téléchargements de jeux et les poursuit en arrière-plan</string> + <string name="stores_notification_one">Téléchargement en cours</string> + <string name="stores_notification_many">%1$d téléchargements</string> + <string name="stores_notification_waiting">Préparation…</string> + <string name="stores_notification_done_channel">Téléchargements des boutiques terminés</string> + <string name="stores_notification_installed">%1$s installé</string> + <string name="stores_notification_failed">Échec du téléchargement de %1$s</string> + <string name="stores_notification_delete">Supprimer</string> + <string name="stores_notification_keep">Conserver</string> + <string name="stores_login_title">Se connecter à %1$s</string> + <string name="stores_login_provider_title">Connectez-vous avec votre fournisseur</string> + <string name="stores_login_reload">Recharger</string> + <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_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> + <string name="stores_login_error_ssl">La liaison avec la page de connexion n\'est pas sécurisée.</string> + <string name="stores_login_error_verification">Impossible de vérifier la connexion. Réessayez.</string> + <string name="stores_login_error_generic">Échec de la connexion. Réessayez.</string> <string name="common_close">Fermer</string> <string name="common_back">Retour</string> <string name="common_edit">Modifier</string> @@ -942,6 +2140,21 @@ <string name="edit_other_exe">Autre exe…</string> <string name="edit_remove">Retirer</string> <string name="art_cover">Jaquette</string> + <string name="art_wide_cover">Jaquette large</string> + <string name="art_adjust_logo">Ajuster le logo</string> + <string name="logo_pos_default">Par défaut</string> + <string name="logo_pos_upper_left">En haut à gauche</string> + <string name="logo_pos_upper_center">En haut au centre</string> + <string name="logo_pos_center">Centre</string> + <string name="logo_pos_bottom_left">En bas à gauche</string> + <string name="logo_pos_bottom_center">En bas au centre</string> + <string name="logo_pos_position">Position</string> + <string name="logo_pos_size">Taille</string> + <string name="logo_pos_save">Enregistrer</string> + <string name="logo_pos_reset">Rétablir par défaut</string> + <string name="logo_pos_hint">Dessiné sur l\'arrière-plan du jeu, comme le fait Steam. La position exacte peut varier de quelques pixels.</string> + <string name="logo_pos_no_logo">Ce jeu n\'a pas encore de logo. Choisissez-en un dans Logo pour le voir ici.</string> + <string name="logo_pos_failed">Impossible d\'enregistrer la position du logo. Réessayez.</string> <string name="art_background">Arrière-plan</string> <string name="art_logo">Logo</string> <string name="art_icon">Icône</string> @@ -954,12 +2167,746 @@ <string name="art_pick_image">Choisir une image…</string> <string name="art_pick_title">Choisir une image : %1$s</string> <string name="art_reset">Revenir à automatique</string> + <string name="art_search_sgdb">Rechercher sur SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB : %1$s</string> + <string name="art_sgdb_search_label">Rechercher un jeu</string> + <string name="art_sgdb_other_games">Autres résultats</string> + <string name="art_sgdb_none">Aucun résultat.</string> + <string name="art_sgdb_no_key">SteamGridDB nécessite une clé d\'API. Ajoutez la vôtre dans Paramètres › Lanceur.</string> + <string name="art_sgdb_bad_key">SteamGridDB a refusé la clé d\'API. Vérifiez-la dans Paramètres › Lanceur.</string> + <string name="art_sgdb_limit">SteamGridDB limite les requêtes en ce moment. Réessayez dans une minute.</string> + <string name="art_sgdb_offline">Impossible de joindre SteamGridDB. Vérifiez la connexion.</string> + <string name="art_sgdb_server">SteamGridDB a rencontré un problème. Réessayez plus tard.</string> + <string name="art_sgdb_no_game">SteamGridDB n\'a pas de résultat pour ce jeu. Essayez une recherche.</string> <plurals name="games_added_n"> <item quantity="one">%1$d jeu ajouté</item> + <item quantity="many">%1$d jeux ajoutés</item> <item quantity="other">%1$d jeux ajoutés</item> </plurals> <plurals name="games_already_n"> <item quantity="one">%1$d déjà dans Jeux</item> + <item quantity="many">%1$d déjà dans Jeux</item> <item quantity="other">%1$d déjà dans Jeux</item> </plurals> -</resources> \ No newline at end of file + <string name="hop_back">B · Retour vers %1$s</string> + <string name="hop_from_games">le jeu</string> + <string name="hop_from_play">les paramètres de jeu</string> + <string name="sheet_graphics_drivers">Pilotes graphiques</string> + <string name="comp_this_proton">Ce Proton</string> + <string name="comp_every_proton">Tous les Proton</string> + <string name="comp_for_every_proton">Pour tous les Proton</string> + <string name="comp_available_count">Disponible · %1$d</string> + <string name="comp_checked">Vérifié : %1$s</string> + <string name="comp_check_all">Rechercher de nouveaux composants et pilotes</string> + <string name="comp_get">Obtenir</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton et FEX ci-dessous sont ceux de ce Proton</string> + <string name="comp_device_tested">%1$s · testé</string> + <string name="comp_device_untested">%1$s · non testé</string> + <string name="comp_device_unsupported">%1$s · non pris en charge</string> + <string name="gpu_auto_keeps">Maintient la paire recommandée à jour</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Pilotes d\'exécution et d\'affichage séparément</string> + <string name="gpu_use_title">Utiliser %1$s ?</string> + <string name="gpu_mode_title">Comment les pilotes sont choisis</string> + <string name="gpu_mode_auto_detail">La meilleure paire pour ce GPU, toujours à jour</string> + <string name="gpu_mode_pair">Paire assortie</string> + <string name="gpu_mode_pair_detail">Choisissez une paire ; elle définit les deux pilotes</string> + <string name="gpu_mode_mix">Assortir librement</string> + <string name="gpu_mode_mix_detail">Choisissez l\'affichage et l\'environnement d\'exécution séparément</string> + <string name="gpu_mode_pair_short">Paire</string> + <string name="gpu_mode_mix_short">Mixte</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAIRE</string> + <string name="gpu_src_bundle">LOT</string> + <string name="gpu_src_chosen">CHOISI</string> + <string name="gpu_src_by_gpu">PAR GPU</string> + <string name="gpu_src_default">DÉFAUT</string> + <string name="gpu_display_live">Dessine actuellement</string> + <string name="gpu_display_pending">Redémarrage en attente · %1$s dessine d\'ici là</string> + <string name="gpu_runtime_live">En cours</string> + <string name="gpu_runtime_pending">Prochaine session · celle-ci garde %1$s</string> + <string name="gpu_display_next">Dessine l\'écran. Prend effet à la prochaine session.</string> + <string name="gpu_previous_driver">le pilote précédent</string> + <string name="gpu_restart_banner">Redémarrez pour changer le pilote d\'affichage.</string> + <string name="gpu_restart_blocked">Arrêtez la session en cours, puis redémarrez DroidDeck pour changer le pilote d\'affichage.</string> + <string name="gpu_restart_now">Redémarrer</string> + <string name="gpu_restart_later">Plus tard</string> + <string name="gpu_auto_title">Auto a choisi cette paire pour votre %1$s</string> + <string name="gpu_auto_builtin_title">Auto utilise les pilotes intégrés pour votre %1$s</string> + <string name="gpu_auto_reason">Choisie pour la famille %1$s. Les nouvelles versions s\'installent en arrière-plan.</string> + <string name="gpu_pair_title">Choisir une paire</string> + <string name="gpu_pair_hint">Une paire définit ensemble le pilote d\'affichage et celui de l\'environnement d\'exécution.</string> + <string name="gpu_mix_title">Choisir chaque pilote</string> + <string name="gpu_mix_hint">Un lot remplit les deux emplacements. Les changements d\'affichage prennent effet après un redémarrage, ceux de l\'environnement d\'exécution à la prochaine session.</string> + <string name="gpu_change_display">Changer le pilote d\'affichage</string> + <string name="gpu_change_runtime">Changer le pilote d\'exécution</string> + <string name="gpu_autos_pick">CHOIX D\'AUTO</string> + <string name="gpu_installed">Installé</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · redémarrez pour appliquer</string> + <string name="gpu_chip_restart">%1$s · redémarrage en attente</string> + <string name="comp_this_device">Cet appareil</string> + <string name="proton_remove_title">Supprimer %1$s ?</string> + <string name="setup_tab_diagnostics">Diagnostic</string> + <string name="setup_ready">Prêt à jouer</string> + <string name="setup_not_ready">Pas encore prêt à jouer</string> + <string name="setup_ready_runtime">environnement d\'exécution %1$s</string> + <string name="setup_ready_limit_off">limite des processus désactivée</string> + <string name="setup_ready_signed_in">connecté en tant que %1$s</string> + <string name="setup_needs_you">Quand une intervention est requise</string> + <string name="setup_group_look">Apparence</string> + <string name="setup_group_device">Cet appareil</string> + <string name="setup_group_art">Illustrations de la bibliothèque</string> + <string name="setup_group_download">Téléchargements</string> + <string name="setup_download_source">Source</string> + <string name="setup_download_source_auto">Automatique</string> + <string name="setup_download_source_direct">Directe</string> + <string name="setup_download_source_mirror">Miroir</string> + <string name="setup_download_source_custom">Préfixe personnalisé</string> + <string name="setup_download_mirror">Site</string> + <string name="setup_download_prefix">Préfixe</string> + <string name="flathub_eyebrow">APPLICATIONS LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Applications pour le bureau Linux, à ouvrir depuis l\'onglet Bureau.</string> + <string name="flathub_setup">Configurer Flathub</string> + <string name="flathub_remove_title">Supprimer %1$s ?</string> + <string name="flathub_remove_note">Ses paramètres et fichiers sont conservés.</string> + <string name="flathub_keep">Conserver</string> + <string name="desktop_size">Taille sur le disque</string> + <string name="desktop_uninstall_title">Désinstaller le bureau ?</string> + <string name="desktop_all_systems">Tous</string> + <string name="gog_achievements">Succès GOG</string> + <string name="gog_achievements_hint">Synchronise les succès des jeux GOG pris en charge. S\'applique au prochain lancement.</string> + <string name="gog_achievements_off">Succès désactivés</string> + <string name="gog_achievements_on">Succès activés</string> + <string name="gog_achievements_signin">Reconnectez-vous à GOG</string> + <string name="gog_achievements_uploaded">Succès envoyés</string> + <string name="gog_achievements_pending">Envoi du succès en attente</string> + <string name="gog_achievements_enable_store">Activez les succès GOG dans les paramètres des boutiques</string> + <string name="gog_achievements_unavailable">Succès indisponibles ; consultez les journaux de session</string> + <string name="achievement_unlocked">Succès débloqué</string> + <string name="touch_paste">Coller</string> + <string name="touch_dpad">Pavé directionnel</string> + <string name="touch_left_stick">Stick gauche</string> + <string name="touch_right_stick">Stick droit</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Clavier</string> + <string name="touch_dpad_up">Pavé directionnel haut</string> + <string name="touch_dpad_down">Pavé directionnel bas</string> + <string name="touch_dpad_left">Pavé directionnel gauche</string> + <string name="touch_dpad_right">Pavé directionnel droite</string> + <string name="touch_title">Commandes tactiles</string> + <string name="touch_controller">Manette tactile</string> + <string name="touch_mouse">Souris</string> + <string name="touch_on">Activé</string> + <string name="touch_off">Désactivé</string> + <string name="touch_speed_slow">Lente</string> + <string name="touch_speed_normal">Normale</string> + <string name="touch_speed_fast">Rapide</string> + <string name="touch_edit_layout">Modifier la disposition</string> + <string name="touch_droiddeck_menu">Menu DroidDeck</string> + <string name="touch_drag_hint">Faites glisser des commandes sur l\'écran</string> + <string name="touch_arrange">Organiser</string> + <string name="touch_discard">Ignorer</string> + <string name="touch_saving">Enregistrement…</string> + <string name="touch_icon">Icône</string> + <string name="touch_narrower">L−</string> + <string name="touch_wider">L+</string> + <string name="touch_shorter">H−</string> + <string name="touch_taller">H+</string> + <string name="touch_hide">Masquer</string> + <string name="touch_color_opacity">Couleur et opacité…</string> + <string name="touch_copy_layout">Copier cette disposition</string> + <string name="touch_layout_copied">Disposition copiée ; collez-la dans la disposition tactile de n\'importe quel jeu</string> + <string name="touch_paste_layout">Coller la disposition copiée</string> + <string name="touch_reset_layout">Rétablir celle de Steam</string> + <string name="touch_no_binding">Cette commande n\'a pas d\'action assignée dans Steam pour lui donner une icône</string> + <string name="touch_icon_for">Icône pour %1$s</string> + <string name="touch_layout_color">Couleur de la disposition tactile</string> + <string name="touch_done">Terminé</string> + <string name="touch_save_failed">Impossible d\'enregistrer la disposition tactile</string> + <string name="touch_saved">Disposition tactile enregistrée sur Steam</string> + <string name="touch_app_id">Appli %1$d</string> + <string name="touch_label_hint">Libellé (facultatif)</string> + <string name="touch_icons_missing">Les icônes de Steam n\'ont pas été trouvées</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d icône de Steam</item> + <item quantity="many">%1$d icônes de Steam</item> + <item quantity="other">%1$d icônes de Steam</item> + </plurals> + <string name="touch_icon_color">Couleur de l\'icône</string> + <string name="touch_button_color">Couleur du bouton</string> + <string name="touch_no_icon">Aucune icône</string> + + <string name="stores_sync_sign_in">Vérification de la connexion…</string> + <string name="stores_sync_library">Récupération de votre bibliothèque…</string> + <string name="stores_sync_game_list">Récupération de la liste des jeux…</string> + <string name="stores_sync_details">Chargement des détails des jeux… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Synchronisation de %1$d jeu…</item> + <item quantity="many">Synchronisation de %1$d jeux…</item> + <item quantity="other">Synchronisation de %1$d jeux…</item> + </plurals> + <string name="stores_sync_progress">Synchronisation… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Récupération des jaquettes…</string> + <string name="stores_sync_failed">Échec de la synchronisation</string> + <string name="stores_sync_no_games">Aucun jeu trouvé dans votre bibliothèque %1$s</string> + <string name="stores_sync_amazon_no_answer">Amazon Games n\'a pas répondu pour votre bibliothèque : actualisez, ou reconnectez-vous</string> + <string name="stores_sync_gog_unreachable">Impossible de contacter GOG</string> + <string name="stores_sync_gog_unreadable">Impossible de lire votre bibliothèque GOG</string> + <string name="stores_registering">Enregistrement auprès de Steam…</string> + <string name="mode_client_arch">Client Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnostic VAC</string> + <string name="setup_vac_diag_hint">Les jeux Source journalisent leur console (-condebug) ; vac.txt dans les journaux de session indique sécurisé ou non sécurisé</string> + <string name="load_starting_steam_x64">Démarrage de Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Utilisé par le client Steam x86-64</string> + <string name="storage_uninstall_in_x64">Cette copie se trouve dans le client Steam x86-64. Choisissez x86-64 sous Client Steam, puis désinstallez-la ici.</string> + <string name="storage_uninstall_in_arm64">Cette copie se trouve dans le client Steam ARM64. Choisissez ARM64 sous Client Steam, puis désinstallez-la ici.</string> + <string name="drawer_page_glasses">Lunettes</string> + <string name="glasses_open">Lunettes VITURE</string> + <string name="glasses_control">Contrôle des lunettes</string> + <string name="glasses_driver_missing">Cette version n\'inclut pas le pilote de ces lunettes.</string> + <string name="glasses_connection_failed">Impossible de se connecter aux lunettes. Rebranchez le câble ou appuyez sur Autoriser pour réessayer.</string> + <string name="glasses_allow">Autoriser</string> + <string name="glasses_allow_hint">Permet à DroidDeck de régler la fréquence d\'affichage, le mode 3D, la luminosité, le volume et le pare-soleil des lunettes, et de lire leur suivi de la tête.</string> + <string name="glasses_asking">En attente de votre autorisation dans la fenêtre d\'Android…</string> + <string name="glasses_denied">Le contrôle a été refusé. Autorisez-le pour modifier les réglages des lunettes.</string> + <string name="glasses_no_control">Ces lunettes affichent le jeu, mais leurs réglages ne peuvent pas être modifiés d\'ici.</string> + <string name="glasses_output">Sortie</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Jeu sur les lunettes</string> + <string name="glasses_game_on_hint">Affiche le jeu uniquement sur les lunettes. Désactivé : le téléphone l\'affiche et Android duplique l\'écran du téléphone.</string> + <string name="glasses_display">Affichage</string> + <string name="glasses_refresh">Fréquence d\'affichage</string> + <string name="glasses_3d">3D (côte à côte)</string> + <string name="glasses_3d_hint">Basculer les lunettes intelligentes en mode 3D côte à côte. Le suivi de la tête est contrôlé séparément.</string> + <string name="glasses_3d_failed">Le signal 3D n\'a pas été confirmé. Réessayez une fois l\'image 2D rétablie.</string> + <string name="glasses_no_signal">Pas d\'image : les lunettes sont dans un mode que ce téléphone ne peut pas envoyer. Maintenez leur bouton 2D/3D, ou débranchez-les puis rebranchez-les.</string> + <string name="glasses_3d_refresh">Fréquence en 3D</string> + <string name="glasses_auto3d">3D pour les jeux VR</string> + <string name="glasses_auto3d_hint">Passe en 3D pendant que SteamVR tourne, puis revient ensuite.</string> + <string name="glasses_picture">Image</string> + <string name="glasses_picture_hint">Affichage automatique du contenu plat pour les deux yeux et détection de SteamVR. Choisissez « Jeu côte à côte » pour le contenu SBS.</string> + <string name="glasses_picture_auto">Automatique</string> + <string name="glasses_picture_screen">Écran virtuel</string> + <string name="glasses_picture_sbs">Jeu côte à côte</string> + <string name="glasses_screen_size">Largeur de l\'écran</string> + <string name="glasses_screen_distance">Distance de l\'écran</string> + <string name="glasses_screen_next_session">La largeur et la distance s\'appliquent lorsqu\'un jeu s\'affiche sur les lunettes comme écran virtuel.</string> + <string name="glasses_screen_no_output">Ces réglages s\'appliquent lorsque Jeu sur les lunettes est activé et que le jeu y est affiché.</string> + <string name="glasses_screen_flat_hint">Automatique garde ce jeu 2D en plein écran. Utilisez un écran virtuel pour régler sa largeur, sa distance et le suivi de la tête.</string> + <string name="glasses_screen_use">Utiliser l\'écran virtuel</string> + <string name="glasses_screen_direct_hint">SteamVR remplit le champ de vision. Ajustez son champ de vision en VR ; la largeur et la distance s’appliquent uniquement à l’écran virtuel.</string> + <string name="glasses_screen_sbs_hint">Les jeux côte à côte remplissent chaque œil. La largeur et la distance ne s\'appliquent qu\'à un écran virtuel.</string> + <string name="glasses_tracking_flat_hint">Automatique garde ce jeu 2D fixe dans la vue. Choisissez Écran virtuel dans Affichage pour utiliser le suivi de la tête.</string> + <string name="glasses_tracking_sbs_hint">Le suivi de la tête s\'applique à un écran virtuel ou à un jeu SteamVR en cours.</string> + <string name="glasses_hardware">Appareil</string> + <string name="glasses_brightness">Luminosité</string> + <string name="glasses_volume">Volume</string> + <string name="glasses_sunblock">Pare-soleil</string> + <string name="glasses_sunblock_hint">Assombrit les verres avant.</string> + <string name="glasses_tracking">Suivi</string> + <string name="glasses_head_tracking">Suivi de la tête</string> + <string name="glasses_head_tracking_hint">Les capteurs des lunettes font tourner l\'écran virtuel et SteamVR avec votre tête.</string> + <string name="glasses_recenter">Recentrer la vue</string> + <string name="glasses_recenter_button">Recentrer l’écran</string> + <string name="glasses_vr_fov">Champ de vision SteamVR</string> + <string name="glasses_vr_fov_hint">Plus bas rapproche SteamVR et remplit les lunettes ; plus haut montre davantage autour de vous.</string> + <string name="glasses_playing">En jeu sur %1$s</string> + <string name="glasses_calibration">Calibrage du suivi</string> + <string name="glasses_calibration_hint">Réduit la dérive et aligne la référence horizontale.</string> + <string name="glasses_calibration_saved_hint">Le calibrage enregistré est appliqué à ces lunettes.</string> + <string name="glasses_calibration_open">Calibrer</string> + <string name="glasses_calibration_instructions">Posez les lunettes connectées à l\'envers sur une surface plane, la monture bien à plat. Appuyez sur Démarrer, puis n\'y touchez plus pendant environ 8 secondes. Tout mouvement relance la mesure. Cela corrige la dérive et l\'inclinaison, pas le cap.</string> + <string name="glasses_calibration_settling">Laissez les lunettes à l\'envers sans y toucher. En attente de leur stabilisation…</string> + <string name="glasses_calibration_collecting">Mesure des capteurs. Gardez les lunettes immobiles.</string> + <string name="glasses_calibration_moving">Mouvement détecté. Ne touchez pas les lunettes ; la mesure redémarrera automatiquement.</string> + <string name="glasses_calibration_turn_over">Posez les lunettes à l\'envers sur une surface plane. La mesure démarrera dès qu\'elles seront bien placées.</string> + <string name="glasses_calibration_complete">Calibrage enregistré. Mettez les lunettes, regardez droit devant, puis appuyez sur Terminé pour recentrer.</string> + <string name="glasses_calibration_failed">Le calibrage n\'a pas pu aboutir. Vérifiez la connexion et gardez les lunettes immobiles, puis réessayez. Votre calibrage précédent est inchangé.</string> + <string name="glasses_calibration_start">Démarrer</string> + <string name="glasses_calibration_done">Terminé</string> + <string name="glasses_calibration_reset">Réinitialiser le calibrage du suivi</string> + <string name="glasses_calibration_reset_hint">Supprimer le calibrage enregistré et rétablir les valeurs par défaut du modèle ? Recentrez après avoir remis les lunettes.</string> + <string name="glasses_calibration_reset_button">Réinitialiser</string> + <string name="hand_camera_group">Suivi des mains</string> + <string name="hand_camera_prompt_title">Suivi des mains ou des manettes Joy-Con avec la caméra du téléphone ?</string> + <string name="hand_camera_prompt_body">Sans manette connectée, la caméra du téléphone suit vos mains nues en VR : pincez votre pouce et votre index pour cliquer, fermez la main pour saisir un objet, et tournez la paume vers vous et pincez pour ouvrir le menu. Avec des manettes Joy-Con connectées, la caméra suit leur position tandis que les manettes permettent la rotation et l\'utilisation des boutons. Les images sont traitées sur cet appareil et ne sont ni enregistrées ni envoyées.</string> + <string name="hand_camera_rear">Caméra arrière</string> + <string name="hand_camera_rear_hint">Recommandée. Généralement plus nette et plus large.</string> + <string name="hand_camera_front">Caméra avant</string> + <string name="hand_camera_front_hint">Pour quand l\'arrière de l\'appareil ne peut pas être tourné vers vous.</string> + <string name="hand_camera_allow">Utiliser la caméra</string> + <string name="hand_camera_not_now">Pas maintenant</string> + <string name="hand_camera_setting">Suivi des mains par caméra</string> + <string name="hand_camera_setting_hint">Utilisez la caméra du téléphone pour les gestes à mains nues ou pour positionner les manettes Joy-Con appariées en VR. Les manettes Joy-Con permettent la rotation et les entrées des boutons. Interrompt le suivi pendant que les lunettes connectées suivent vos mains ou les manettes Joy-Con. Les images sont traitées uniquement sur cet appareil.</string> + <string name="hand_camera_choice">Caméra</string> + <string name="hand_camera_access">Accès à la caméra</string> + <string name="hand_camera_access_hint">Autorisez l\'accès à la caméra pour démarrer le suivi des mains.</string> + <string name="hand_camera_access_denied">L\'accès à la caméra est désactivé. Activez-le dans les paramètres Android.</string> + <string name="hand_camera_allow_button">Autoriser</string> + <string name="hand_camera_open_settings">Ouvrir les paramètres</string> + <string name="hand_camera_placement">Positionnement de la caméra</string> + <string name="hand_camera_placement_hint">Vérifiez que la caméra peut vous voir avant de jouer.</string> + <string name="hand_camera_check">Vérifier</string> + <string name="hand_camera_check_title">Positionnement de la caméra</string> + <string name="hand_camera_how_rear">Installez l\'appareil debout, entre 1,5 et 2 mètres de vous, à hauteur de poitrine, caméra arrière tournée vers vous. Puis entrez dans le champ, les mains tendues.</string> + <string name="hand_camera_how_front">Installez l\'appareil debout, entre 1,5 et 2 mètres de vous, à hauteur de poitrine, écran tourné vers vous. Puis entrez dans le champ, les mains tendues.</string> + <string name="hand_camera_starting">Démarrage de la caméra…</string> + <string name="hand_camera_stand_up">L\'appareil est posé à plat. Redressez-le pour que la caméra soit tournée vers vous.</string> + <string name="hand_camera_upright">Redressez davantage l\'appareil pour que la caméra soit tournée vers vous.</string> + <string name="hand_camera_not_seen">Vous n\'êtes pas encore visible. Entrez dans le champ pour que votre tête et vos épaules soient visibles.</string> + <string name="hand_camera_move_back">Reculez un peu.</string> + <string name="hand_camera_move_closer">Rapprochez-vous un peu.</string> + <string name="hand_camera_show_hands">Tendez les deux mains là où la caméra peut les voir.</string> + <string name="hand_camera_good">C\'est bon.</string> + <string name="hand_camera_failed">La caméra n\'a pas pu démarrer. Fermez les autres applications qui l\'utilisent et réessayez.</string> + <string name="hand_camera_switch">Changer de caméra</string> + <string name="hand_camera_skip">Ignorer</string> + <string name="hand_camera_done">Terminé</string> + <string name="glasses_xreal_network_missing">En attente de la connexion Ethernet USB des lunettes. Ce téléphone ne la rend peut-être pas accessible aux applications.</string> + <string name="glasses_xreal_connection_failed">La connexion XREAL a été interrompue ou a renvoyé une réponse non prise en charge. Nouvelle tentative…</string> + <string name="glasses_xreal_experimental">Prise en charge expérimentale des 1S. Utilisez le mode Follow et désactivez la stabilisation dans le menu des lunettes. Le sens du suivi et les modes d\'affichage restent à tester sur l\'appareil.</string> + <string name="stores_fact_developer">Développeur</string> + <string name="stores_fact_publisher">Éditeur</string> + <string name="stores_fact_released">Sortie</string> + <string name="stores_hltb_main">Principal</string> + <string name="stores_hltb_extras">+ Extras</string> + <string name="stores_hltb_completionist">Complétionniste</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Mode Cardboard</string> + <string name="cardboard_mode_hint">Vues pour l\'œil gauche et l\'œil droit, pour un casque VR pour téléphone.</string> + <string name="cardboard_source">Image</string> + <string name="cardboard_source_screen">Écran virtuel</string> + <string name="cardboard_source_sbs">3D côte à côte</string> + <string name="cardboard_viewer">Casque</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Sans lentille</string> + <string name="cardboard_ipd">Écart entre les yeux</string> + <string name="cardboard_screen_width">Largeur de l\'écran</string> + <string name="cardboard_screen_distance">Distance de l\'écran</string> + <string name="cardboard_head_tracking">Suivi de la tête</string> + <string name="cardboard_no_sensor">Cet appareil n\'a pas de capteur de rotation.</string> + <string name="cardboard_recenter">Recentrer la vue</string> + <string name="cardboard_recenter_button">Recentrer</string> + <string name="cardboard_steamvr">SteamVR (expérimental)</string> + <string name="cardboard_steamvr_install">Installer</string> + <string name="cardboard_steamvr_installing">Téléchargement et décompression de SteamVR…</string> + <string name="cardboard_steamvr_start">Démarrer</string> + <string name="cardboard_steamvr_stop">Arrêter</string> + <string name="cardboard_steamvr_unavailable">Indisponible dans cette session.</string> + <string name="cardboard_steamvr_failed">SteamVR ne répond pas ; consultez le journal de session.</string> + <string name="drawer_component_downloads">Télécharger des composants</string> + <string name="drawer_component_downloads_hint">Les téléchargements sont partagés avec la page « Composants ». Choisissez une version téléchargée ci-dessus pour l\'utiliser au prochain lancement du jeu.</string> + <string name="drawer_component_choose_download">Choisissez une version à télécharger</string> + <string name="mode_zram">Compression zRAM</string> + <string name="mode_zram_hint">Pendant qu\'un jeu tourne, la mémoire du client Steam est compressée dans la zram de l\'appareil, ce qui laisse plus de RAM au jeu. S\'applique au prochain démarrage de Steam.</string> + <string name="mode_zram_unsupported">Indisponible : cet appareil n\'a pas de swap actif, ou son noyau est antérieur à la version 5.4.</string> + <string name="stores_storage_insufficient">Espace libre insuffisant : %1$s nécessaires, seulement %2$s libres</string> + <string name="stores_storage_low">Espace insuffisant (%1$s libres, %2$s nécessaires)</string> + <string name="stores_target_free_unknown">Espace libre inconnu</string> + <string name="display_picture_position">Position de l\'image</string> + <string name="display_position_top">Haut</string> + <string name="display_position_bottom">Bas</string> + <string name="display_position_center">Centre (par défaut)</string> + <string name="setup_tab_storage">Stockage</string> + <string name="storage_measuring">Mesure du stockage…</string> + <string name="storage_measuring_hint">Cela prend quelques secondes la première fois.</string> + <string name="storage_internal">Stockage interne</string> + <string name="storage_used_of">%1$s sur %2$s utilisés</string> + <string name="storage_free">%1$s libres</string> + <string name="storage_droiddeck_uses">DroidDeck utilise %1$s. Mesuré le %2$s.</string> + <string name="storage_rescanning">nouvelle mesure…</string> + <string name="storage_other_apps">Autres applications Android</string> + <string name="storage_safe_now">Libérable maintenant</string> + <string name="storage_safe_hint">Environnements d\'exécution inutilisés, résidus, anciens journaux</string> + <string name="storage_clean_up">Nettoyer…</string> + <string name="storage_session_running">Arrêtez la session pour nettoyer ou supprimer quoi que ce soit. Les tailles restent affichées.</string> + <string name="storage_where">Où ça va</string> + <string name="storage_games">Jeux Steam</string> + <string name="storage_game_data">Données de jeu</string> + <string name="storage_game_data_hint">Préfixes %1$s · atelier %2$s · shaders %3$s</string> + <string name="storage_tools">Proton et environnements d\'exécution</string> + <string name="storage_tools_unused">%1$s inutilisés</string> + <string name="storage_stores">GOG, Epic et autres boutiques</string> + <string name="storage_stores_hint">Désinstallez-les depuis Boutiques</string> + <string name="storage_desktop">Applications de bureau</string> + <string name="storage_desktop_hint">Applications et environnements d\'exécution Flatpak</string> + <string name="storage_system">Système Linux et client Steam</string> + <string name="storage_system_hint">Nécessaire pour exécuter quoi que ce soit</string> + <string name="storage_app_data">Données de DroidDeck</string> + <string name="storage_app_data_hint">Journaux des anciennes sessions %1$s · caches · pilotes</string> + <string name="storage_legend_games">Jeux</string> + <string name="storage_legend_data">Données de jeu</string> + <string name="storage_legend_tools">Proton et environnements d\'exécution</string> + <string name="storage_legend_stores">Autres boutiques</string> + <string name="storage_legend_desktop">Applications de bureau</string> + <string name="storage_legend_system">Système Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Nettoyage</string> + <string name="storage_clean_up_lede">Rien ici ne touche à vos jeux installés ni aux téléchargements en cours.</string> + <string name="storage_nothing_to_clean">Rien à nettoyer pour le moment.</string> + <string name="storage_selected">Sélectionné : %1$s · %2$s → %3$s libres</string> + <string name="storage_cleaning">Nettoyage…</string> + <string name="storage_free_button">Libérer %1$s</string> + <string name="storage_freed">%1$s libérés.</string> + <string name="storage_item_runtimes">Environnements d\'exécution et Proton Steam inutilisés</string> + <string name="storage_item_leftovers">Résidus de jeux désinstallés</string> + <string name="storage_item_leftovers_unsure">Résidus pouvant contenir des sauvegardes</string> + <string name="storage_item_logs">Journaux des anciennes sessions</string> + <string name="storage_item_logs_detail">Conserve les journaux de la session en cours</string> + <string name="storage_item_custom_detail">Aucun jeu ne l\'utilise. Réinstallez-le depuis Composants si besoin.</string> + <string name="storage_item_shaders">Caches de shaders des jeux installés</string> + <string name="storage_item_shaders_detail">Reconstruits au fil du jeu. Les premières minutes de chaque jeu saccadent à nouveau.</string> + <string name="storage_tag_safe">Sûr</string> + <string name="storage_tag_unused">Inutilisé</string> + <string name="storage_tag_stutter">Saccades</string> + <string name="storage_tag_saves">Vérifier les sauvegardes</string> + <string name="storage_tag_default">Par défaut</string> + <string name="storage_tag_required">Nécessaire</string> + <string name="storage_tag_not_used">Inutilisé</string> + <string name="storage_back">Stockage</string> + <string name="storage_games_with_data">%1$s avec leurs données</string> + <string name="storage_sort_largest">Les plus gros</string> + <string name="storage_sort_least_played">Les moins joués</string> + <string name="storage_sort_sd">Sur la carte SD</string> + <string name="storage_no_games">Aucun jeu ici.</string> + <string name="storage_played">Joué %1$s</string> + <string name="storage_never_played">Jamais joué</string> + <string name="storage_game_parts">Jeu %1$s · données %2$s</string> + <string name="storage_uninstall">Désinstaller</string> + <string name="storage_games_note">Désinstaller ouvre la boîte de dialogue de Steam pour que Steam en tienne compte. Pour déplacer un jeu sur la carte SD, utilisez Steam › Paramètres › Stockage.</string> + <string name="storage_uninstall_title">Désinstaller %1$s ?</string> + <string name="storage_uninstall_body">Steam s\'ouvre et vous demande de confirmer. Cela libère les %1$s du jeu. Son préfixe reste jusqu\'au nettoyage des résidus, et les sauvegardes Steam Cloud restent dans votre compte.</string> + <string name="storage_open_steam">Ouvrir Steam</string> + <string name="storage_tools_detail">%1$s · %2$s inutilisés</string> + <string name="storage_remove_unused">Supprimer l\'inutilisé · %1$s</string> + <string name="storage_in_use">Utilisé</string> + <string name="storage_not_used">Inutilisé</string> + <string name="storage_remove">Supprimer</string> + <string name="storage_remove_title">Supprimer %1$s ?</string> + <string name="storage_remove_body">Libère %1$s. Steam le retéléchargera si un jeu le demande.</string> + <string name="storage_tool_fex_runtime">Nécessaire pour les jeux Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Nécessaire aux Proton ARM64</string> + <string name="storage_tool_redist">Programmes d\'installation VC++ et DirectX demandés par les jeux</string> + <string name="storage_tool_fex">Exécute les jeux Linux x86</string> + <string name="storage_tool_steam">Outil Steam</string> + <string name="storage_tool_old_runtime">DroidDeck exécute les jeux sans cet environnement d\'exécution</string> + <string name="storage_tool_x86_proton">Proton x86, que DroidDeck ne peut pas exécuter</string> + <string name="storage_tool_custom_default">Par défaut pour tous les jeux</string> + <string name="storage_tool_custom_unused">Aucun jeu ne l\'utilise</string> + <string name="storage_tool_custom_unknown">Les paramètres de Steam sont illisibles, il est donc conservé</string> + <string name="storage_cleanup_busy">Attendez la fin du nettoyage du stockage</string> + <string name="storage_low_title">Seulement %1$s libres</string> + <string name="storage_low_body">Steam a besoin de place pour les mises à jour et les caches de shaders. Sous 10 Go, les mises à jour de jeux peuvent échouer en cours de route.</string> + <string name="storage_low_safe">%1$s peuvent être libérés sans risque.</string> + <string name="storage_free_up">Libérer de l\'espace</string> + <string name="storage_play_anyway">Jouer quand même</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d installé</item> + <item quantity="other">%d installés</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d sur la carte SD</item> + <item quantity="other">%d sur la carte SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d outil</item> + <item quantity="other">%d outils</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Dossiers de préfixe vides et cache de shaders de %d jeu</item> + <item quantity="other">Dossiers de préfixe vides et caches de shaders de %d jeux</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Le préfixe de %d jeu contient encore des fichiers, dont d\'éventuelles sauvegardes locales. Sauvegardez-les avant si vous y tenez.</item> + <item quantity="other">Les préfixes de %d jeux contiennent encore des fichiers, dont d\'éventuelles sauvegardes locales. Sauvegardez-les avant si vous y tenez.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d jeu</item> + <item quantity="other">%d jeux</item> + </plurals> + <string name="storage_tool_default_proton">Proton par défaut de DroidDeck</string> + <string name="storage_tool_proton">Option Proton 11 de DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Utilisé par %d jeu</item> + <item quantity="other">Utilisé par %d jeux</item> + </plurals> + <string name="storage_legend_components">Composants</string> + <string name="storage_components">Composants</string> + <string name="storage_item_components">Composants inutilisés</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Libère %1$s. Ne restaure qu\'une version de Proton qui n\'est plus installée.</string> + <string name="storage_leftovers_unchecked">Non vérifié : un manifeste d\'application Steam est illisible, les préfixes des jeux désinstallés sont donc conservés tant que ce n\'est pas le cas.</string> + <string name="storage_failed">Impossible de terminer : %1$s</string> + <string name="storage_desktop_shared">%1$s partagés</string> + <string name="storage_data_installed">Jeux installés</string> + <string name="storage_data_parts">Préfixe %1$s · shaders %2$s · atelier %3$s</string> + <string name="storage_clear_shaders">Effacer les shaders</string> + <string name="storage_data_leftovers">Jeux désinstallés</string> + <string name="storage_steam_app">Application Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Son préfixe contient encore des fichiers, dont d\'éventuelles sauvegardes locales</string> + <string name="storage_leftover_confirm">Supprime son préfixe Wine et son cache de shaders (%1$s). Sauvegardez d\'abord les sauvegardes que vous voulez ; celles de Steam Cloud restent dans votre compte.</string> + <string name="storage_data_other">Conservés</string> + <string name="storage_data_other_title">Jeux hors Steam et préfixe partagé de Steam</string> + <string name="storage_data_other_detail">Préfixes de jeux ajoutés depuis les boutiques ou à la main</string> + <string name="storage_components_packages">Paquets téléchargés</string> + <string name="storage_components_originals">Originaux conservés</string> + <string name="storage_components_none">Aucun paquet de composant téléchargé.</string> + <string name="storage_component_in_use">Choisi pour un Proton ou un jeu</string> + <string name="storage_component_unused">Choisi nulle part</string> + <string name="storage_original_kept">Restaure le Proton installé</string> + <string name="storage_original_old">Version de Proton qui n\'est plus installée</string> + <string name="storage_tag_in_use">Utilisé</string> + <string name="storage_components_note">Les composants utilisés restent verrouillés. Choisissez-les dans Composants ; ce qui est supprimé ici peut y être retéléchargé.</string> + <string name="storage_component_confirm">Libère %1$s. Les paquets que vous avez importés vous-même ne peuvent pas être retéléchargés.</string> + <string name="storage_desktop_detail">%1$s pour les applications Flatpak et ce qu\'elles partagent</string> + <string name="storage_desktop_apps_title">Applications</string> + <string name="storage_desktop_none">Aucune application Flatpak installée.</string> + <string name="storage_desktop_shared_title">Partagé par les applications</string> + <string name="storage_desktop_runtimes">Environnements d\'exécution</string> + <string name="storage_desktop_runtimes_detail">Bibliothèques dont dépendent les applications ; les inutilisées partent avec Supprimer l\'inutilisé</string> + <string name="storage_desktop_cache">Dépôt de téléchargement</string> + <string name="storage_desktop_cache_detail">Dépôt d\'objets et téléchargements en cache de Flatpak</string> + <string name="storage_desktop_prune">Supprimer l\'inutilisé</string> + <string name="storage_desktop_prune_body">Supprime les environnements d\'exécution dont aucune application installée n\'a besoin et élague le dépôt d\'objets de Flatpak. Les applications installées continuent de fonctionner.</string> + <string name="storage_flatpak_uninstall_body">Supprime l\'application (%1$s) et tout environnement d\'exécution que rien d\'autre n\'utilise. Ses données dans votre dossier personnel restent.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d paquet</item> + <item quantity="other">%d paquets</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d application</item> + <item quantity="other">%d applications</item> + </plurals> + <string name="boot_movie">Vidéo de démarrage</string> + <string name="boot_movie_video">Vidéo</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d i/s</string> + <string name="boot_movie_note">60 i/s est plus fluide mais sollicite davantage le processeur pendant le démarrage de Steam. Une vidéo de démarrage choisie dans les paramètres de Steam est prioritaire.</string> + <string name="boot_movie_sound">Son</string> + <string name="boot_movie_custom">Votre propre vidéo</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV ou WebM. Les autres formats et les fichiers de plus de %1$d Mo sont convertis en WebM 720p sur l\'appareil, jusqu\'à %2$d secondes.</string> + <string name="boot_movie_import">Importer</string> + <string name="boot_movie_remove">Supprimer</string> + <string name="boot_movie_pick">Choisir une vidéo de démarrage</string> + <string name="boot_movie_imported">%1$s est maintenant la vidéo de démarrage</string> + <string name="boot_movie_imported_silent">%1$s est maintenant la vidéo de démarrage, sans son</string> + <string name="boot_movie_too_long">Les vidéos à convertir doivent durer %1$d secondes au maximum</string> + <string name="boot_movie_converting">Conversion %1$d %%</string> + <string name="boot_movie_converting_started">Conversion de %1$s pour Steam. Gardez DroidDeck ouvert.</string> + <string name="boot_movie_unsupported">Cet appareil ne peut pas décoder cette vidéo.</string> + <string name="boot_movie_import_failed">Impossible d\'importer cette vidéo</string> + <string name="glasses_experimental">Caméras Luma Ultra — Expérimental</string> + <string name="glasses_joycons">Suivi de la position des Joy-Con</string> + <string name="glasses_joycons_hint">Utilisez les caméras des lunettes connectées pour positionner vos manettes Joy-Con appariées. La rotation et les entrées des boutons proviennent des manettes Joy-Con. La position est estimée lorsque vos poignets sont cachés. Remplace les manettes utilisées à mains nues et interrompt le suivi par la caméra du téléphone. Pointez les manettes Joy-Con vers l\'avant lors de la connexion ou de la réinitialisation du centre de suivi.</string> + <string name="glasses_joycons_requires_position">Activez d\'abord le suivi de position. Nécessite des manettes Joy-Con compatibles avec la détection de mouvements sous Android 12 ou version ultérieure. Désactivé par défaut.</string> + <string name="setup_tab_glasses">Lunettes connectées</string> + <string name="setup_glasses_scope">Les paramètres d\'affichage et de suivi de la tête sont partagés entre les menus DroidDeck, les jeux et les sessions de bureau.</string> + <string name="setup_glasses_connect">Connectez vos lunettes connectées pour modifier leurs paramètres d\'affichage et de suivi. Vos paramètres enregistrés sont conservés lors de la déconnexion.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Mode d\'affichage</string> + <string name="glasses_output_2d">Sortie 2D</string> + <string name="glasses_output_3d">Sortie 3D</string> + <string name="glasses_picture_group">Image et écran virtuel</string> + <string name="glasses_position_group">Position et niveau du sol</string> + <string name="glasses_hands_group">Suivi des mains — Expérimental</string> + <string name="glasses_tracking_status">État du suivi</string> + <string name="glasses_resolution_2d">Résolution 2D</string> + <string name="glasses_resolution_3d">Résolution 3D</string> + <string name="glasses_resolution_vr">Résolution VR</string> + <string name="glasses_resolution_auto">Automatique</string> + <string name="glasses_resolution_inherit">Identique à 2D/3D</string> + <string name="glasses_resolution_hint">Résolution de sortie par œil.</string> + <string name="glasses_refresh_30_hint">Activer le mode Jeu sur lunettes intelligentes pour sélectionner le mode 30 Hz natif de l\'écran.</string> + <string name="glasses_3dof">Écran virtuel 3DoF</string> + <string name="glasses_3dof_hint">Ancrer les jeux plats devant vous pour vous permettre de regarder autour de vous. Active le mode Jeu sur lunettes intelligentes sans passer en 3D.</string> + <string name="glasses_screen_app_wide">Largeur et distance : mise à jour immédiate de l’écran virtuel suivi pour les menus DroidDeck, les jeux et les sessions de bureau.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Le suivi de position inclut la rotation de la tête dans SteamVR. Pour un suivi de la rotation uniquement, désactivez le suivi de position.</string> + <string name="glasses_head_tracking_spatial_hint">Contrôle les mouvements de la tête sur l’écran virtuel. Le suivi de position inclut la rotation de la tête dans SteamVR.</string> + <string name="glasses_quick_actions">Actions rapides</string> + <string name="glasses_recenter_screen_hint">Regardez où vous souhaitez que l\'écran apparaisse, puis réinitialisez le centre de suivi pour définir sa hauteur et sa direction.</string> + <string name="glasses_recenter_joycons_button">Recentrer les Joy-Con</string> + <string name="phone_camera_tracking_group">Caméra du téléphone — Expérimental</string> + <string name="phone_camera_tracking_setting">Suivi des mains ou des manettes Joy-Con</string> + <string name="glasses_6dof">Écran virtuel 6DoF</string> + <string name="glasses_position">Suivi de position — expérimental</string> + <string name="glasses_position_hint">Mouvements physiques en VR et autour des écrans virtuels. Le redémarrage du suivi peut prendre quelques instants.</string> + <string name="glasses_eye_height">Hauteur actuelle des yeux par rapport au sol</string> + <string name="glasses_floor">Définir le niveau du sol à partir de la hauteur actuelle</string> + <string name="glasses_floor_set">Définir le niveau du sol</string> + <string name="glasses_spatial_setup">Configuration et diagnostic de la caméra stéréo</string> + <string name="glasses_spatial_setup_hint">Vérifiez l\'étalonnage de la caméra et le suivi des mains avant de jouer.</string> + <string name="glasses_spatial_open">Ouvrir la configuration</string> + <string name="glasses_hands">Manettes utilisées à mains nues</string> + <string name="glasses_hands_hint">Utilisez les caméras des lunettes intelligentes pour viser avec vos mains, pincer pour cliquer et fermer la main pour saisir en VR. Les joysticks de la manette bougent et tournent. Remplace le suivi de position des Joy-Con. Peut entraîner des latences ou des pertes de suivi pendant les jeux.</string> + <string name="glasses_hands_ready_hint">Activer l\'utilisation des manettes à mains nues sous les caméras Luma Ultra dans Suivi. Afficher d\'abord les mains ouvertes.</string> + <string name="glasses_hands_base">Étalonnage Luma Ultra partagé</string> + <string name="glasses_hands_base_hint">Utilisation de la base Luma Ultra partagée. Calibrez vos lunettes connectées pour vérifier leur précision.</string> + <string name="glasses_hands_calibration_verified">Calibrage mesuré vérifié</string> + <string name="glasses_hands_calibration_required">Validation requise</string> + <string name="glasses_hands_calibration_required_hint">Les manettes utilisables à mains nues sont disponibles une fois la vérification de distance effectuée.</string> + <string name="tracking_recovery_lost">Suivi perdu</string> + <string name="tracking_recovery_look">Regardez lentement autour de vous dans une pièce bien éclairée.\nAssurez-vous que les caméras de suivi sont dégagées et que vous êtes face à des meubles ou à d\'autres éléments visibles.</string> + <string name="tracking_recovery_restart_help">Toujours bloqué ? Sur votre téléphone : lunettes intelligentes → Suivi → Ouvrir la configuration → Afficher les diagnostics → Redémarrer le suivi.</string> + <string name="tracking_recovery_disconnected">Lunettes intelligentes déconnectées</string> + <string name="tracking_recovery_connect">Vérifiez la connexion USB et reconnectez les lunettes intelligentes.\nAcceptez l\'invite d\'accès USB sur votre téléphone si elle apparaît.</string> + <string name="tracking_recovery_usb_help">Une fois connecté, regardez lentement autour de vous dans une pièce bien éclairée pour rétablir le suivi.</string> + <string name="tracking_recovery_recenter">Recentrage nécessaire</string> + <string name="tracking_recovery_recenter_steps">Le suivi a repris dans une nouvelle position.\nRegardez devant vous, puis appuyez sur « Réinitialiser le centre de suivi » sur votre téléphone.</string> + <string name="tracking_recovery_recenter_help">Vous pouvez également réinitialiser le centre de suivi dans Lunettes connectées → Suivi → Ouvrir la configuration. Votre étalonnage de caméra enregistré est conservé.</string> + <string name="tracking_recovery_stabilizing">Restez immobile un instant</string> + <string name="tracking_recovery_hold">Réinitialisation du centre de suivi en cours.\nGardez les lunettes connectées immobiles pendant la stabilisation du suivi.</string> + <string name="tracking_recovery_automatic">Cet écran se ferme automatiquement lorsque le suivi de la tête est prêt.</string> + <string name="glasses_steady_hand_aim">Visée stabilisée avec les mains</string> + <string name="glasses_steady_hand_aim_hint">Visez depuis votre épaule à travers votre paume. Éteignez-le pour une rotation contrôlée par le poignet.</string> + <string name="spatial_title">Configuration spatiale</string> + <string name="spatial_wait_tracking">En attente de suivi…</string> + <string name="spatial_cameras_description">Caméras de suivi gauche et droite</string> + <string name="spatial_camera_sync">Synchronisation de la caméra</string> + <string name="spatial_ready">Prêt</string> + <string name="spatial_sync_hint">En attente que la caméra et le suivi de la tête s\'alignent. Gardez les lunettes intelligentes connectées.</string> + <string name="spatial_prepare">1. Préparez la cible d\'étalonnage</string> + <string name="spatial_print_actual">Imprimer à taille réelle</string> + <string name="spatial_print_hint">Chaque carré doit mesurer 30 mm (1,181 po). Montez la feuille à plat sur une surface rigide dans un endroit bien éclairé.</string> + <string name="spatial_print">Imprimer la mire d’étalonnage</string> + <string name="spatial_capture_group">2. Capturer différentes vues</string> + <string name="spatial_board_stationary">Maintenir la cible d\'étalonnage stationnaire</string> + <string name="spatial_capture_hint">Rapprochez, éloignez et latéralement les lunettes intelligentes. Tournez-les à gauche/droite, inclinez-les vers le haut/bas et inclinez-les sur le côté. Conservez la cible d\'étalonnage dans les deux caméras et faites une brève pause avant chaque capture.</string> + <string name="spatial_start">Démarrer un nouvel étalonnage</string> + <string name="spatial_wait_sync">En attente de synchronisation de la caméra.</string> + <string name="spatial_start_hint">Démarrez un nouveau calibrage pour collecter des vues.</string> + <string name="spatial_views_hint">Gardez la cible d\'étalonnage visible dans les deux aperçus. Capturez au moins 24 vues nettes sous différents angles.</string> + <string name="spatial_capturing">Capturer…</string> + <string name="spatial_capture">Capturer la vue cible d\'étalonnage</string> + <string name="spatial_alignment">Calculer l\'alignement de la caméra</string> + <string name="spatial_calculating">Calcul…</string> + <string name="spatial_calculate">Calculer l\'étalonnage</string> + <string name="spatial_distance_group">3. Vérifiez la distance</string> + <string name="spatial_distance">Distance mesurée</string> + <string name="spatial_distance_hint">Commencez par 12 pouces ou 30 cm pour que les marqueurs imprimés soient plus faciles à détecter. Choisissez la mesure exacte que vous utiliserez.</string> + <string name="spatial_camera_board_distance">Caméra gauche vers le centre de la cible d\'étalonnage</string> + <string name="spatial_checking_distance">Vérification de la distance…</string> + <string name="spatial_validate">Valider la distance</string> + <string name="spatial_diagnostics">Diagnostic</string> + <string name="spatial_show_diagnostics">Afficher les diagnostics</string> + <string name="spatial_diagnostics_hint">Outils de synchronisation et de récupération de suivi de la caméra.</string> + <string name="spatial_camera_timing">Synchronisation de la caméra</string> + <string name="spatial_hand_input">Entrée du suivi des mains</string> + <string name="spatial_wait_timing">En attente du timing de la caméra.</string> + <string name="spatial_frames">Images de la caméra</string> + <string name="spatial_gpu">Détection GPU des mains</string> + <string name="spatial_gpu_hint">Le CPU est utilisé par défaut. Le GPU est expérimental et peut provoquer un redémarrage de SteamVR. Ce choix est réinitialisé au redémarrage du suivi.</string> + <string name="spatial_lite">Détection légère des modèles de mains</string> + <string name="spatial_lite_hint">Utilisez le détecteur de paume Lite et les points clés Lite sur les mains. Vérifiez la précision de la visée, du pincement et de la saisie. Se réinitialise lors du redémarrage du suivi.</string> + <string name="spatial_adaptive">Fréquence d\'entrée automatique pour le suivi des mains</string> + <string name="spatial_adaptive_hint">Ajustez l\'entrée à la vitesse de traitement. Se réinitialise lors du redémarrage du suivi.</string> + <string name="spatial_half_rate">Limiter la fréquence d\'entrée pour le suivi des mains</string> + <string name="spatial_half_rate_hint">Utilisez la moitié des images de la caméra. Éteignez pour comparer la fréquence maximale. Se réinitialise lors du redémarrage du suivi.</string> + <string name="spatial_diagnostic_capture">Capture diagnostique</string> + <string name="spatial_diagnostic_capture_hint">Enregistrez localement une paire d’images stéréo. Les images sont enregistrées uniquement sur demande.</string> + <string name="spatial_save_frame">Enregistrer l\'image de la caméra</string> + <string name="spatial_restart_tracking">Redémarrer le suivi</string> + <string name="spatial_restart_hint">À utiliser si le suivi ne se rétablit pas dans une zone bien éclairée. Un redémarrage nécessite une nouvelle origine de suivi.</string> + <string name="spatial_restart">Redémarrer</string> + <string name="spatial_restart_title">Redémarrer le suivi ?</string> + <string name="spatial_restart_confirm">Les vues d\'étalonnage non enregistrées seront perdues. Gardez les lunettes connectées immobiles ensuite et réinitialisez le centre de suivi une fois le suivi rétabli.</string> + <string name="spatial_views_count">%1$d / 24 vues capturées</string> + <string name="spatial_capture_paused">Capture interrompue : %1$s</string> + <string name="spatial_measure_hint">Mesure %1$s. Affichez la cible d\'étalonnage complète dans les deux aperçus, puis restez immobile.</string> + <string name="spatial_timing_values">%1$.1f Hz • âge de l\'image %2$.1f ms • traitement %3$.1f ms</string> + <string name="spatial_input_values">Limite d\'entrée %1$.1f Hz • %2$.0f%% des images de la caméra. Le suivi de la tête continue à sa fréquence maximale.</string> + <string name="spatial_frame_counts">%1$d traité • %2$d supprimé • %3$d ignoré par limite d\'entrée</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Calibrage Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Imprimer à 100% / Taille réelle. Chaque carré : 30 mm (1,181 po).</string> + <string name="spatial_print_stationary">Gardez la cible d\'étalonnage à plat et stationnaire ; déplacez les lunettes intelligentes entre les captures.</string> + <string name="spatial_print_check">Vérification de l\'échelle : 100 mm (3,937 in) entre les graduations</string> + <string name="spatial_distance_12in">12 pouces (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 pouces)</string> + <string name="spatial_distance_20in">20 po (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 pouces)</string> + <string name="spatial_disabled">Désactivé</string> + <string name="spatial_wait_stable">En attente d\'un suivi stable</string> + <string name="spatial_disconnected">Déconnecté</string> + <string name="spatial_hands_off">Les contrôleurs actionnés à mains nues sont éteints</string> + <string name="spatial_tracking_off">Le suivi de position est désactivé ou les lunettes intelligentes sont déconnectées</string> + <string name="spatial_recenter_pending">Réinitialisation du centre de suivi demandée — restez immobile pendant la stabilisation du suivi.</string> + <string name="spatial_tracking_lost">Suivi perdu – faites face à une zone bien éclairée avec des détails visibles</string> + <string name="spatial_origin_changed">Origine du suivi modifiée — appuyez sur Réinitialiser le centre de suivi, puis restez immobile.</string> + <string name="spatial_active">6DoF actif</string> + <string name="spatial_connect_hint">Connectez Luma Ultra et activez le suivi de position.</string> + <string name="spatial_validation_session">Calibrage vérifié pour cette connexion.</string> + <string name="spatial_validation_saved">Calibrage vérifié et enregistré.</string> + <string name="spatial_wait_cameras">En attente des caméras stéréo</string> + <string name="spatial_wait_hands">En attente du suivi des mains</string> + <string name="spatial_collect_instructions">Gardez la cible d\'étalonnage 5 × 7 stationnaire. Capturez plus de 24 vues tout en déplaçant et en faisant pivoter les lunettes intelligentes.</string> + <string name="spatial_capture_pending">En attente de la prochaine image de la caméra. Tenez immobile les lunettes intelligentes.</string> + <string name="spatial_validation_pending">Vérification de l\'image suivante de la caméra. Gardez la cible d\'étalonnage complète visible et restez immobile.</string> + <string name="spatial_start_first">Commencer d\'abord l\'étalonnage</string> + <string name="spatial_no_camera_frame">Aucune nouvelle image de caméra n’est arrivée. Vérifiez la connexion des lunettes intelligentes et les aperçus de l\'appareil photo, puis réessayez.</string> + <string name="spatial_clock_reset">Réinitialisation de l\'horloge de l\'appareil photo</string> + <string name="spatial_frame_changed">Système de coordonnées de suivi modifié. Vos vues sont enregistrées pour recalcul. Réinitialisez le centre de suivi, puis lancez une nouvelle série pour capturer davantage de vues.</string> + <string name="spatial_device_loaded">étalonnage de l\'appareil chargé</string> + <string name="spatial_base_loaded">Calibrage de base Luma Ultra chargé</string> + <string name="spatial_calibration_needed">étalonnage requis</string> + <string name="spatial_tap_start">Appuyez d\'abord sur Démarrer un nouvel étalonnage.</string> + <string name="spatial_capture_recenter_pending">La réinitialisation du centre de suivi attend un suivi stable. Restez immobile un instant.</string> + <string name="spatial_capture_recenter">Suivi modifié. Appuyez une fois sur Réinitialiser le centre de suivi, puis restez immobile avant de capturer.</string> + <string name="spatial_capture_unsynchronized">Capture rejetée : le suivi de la tête était désynchronisé ou a changé pendant la capture. Restez immobile et réessayez.</string> + <string name="spatial_align_first">Calculez l\'alignement de la caméra avant de vérifier la distance.</string> + <string name="spatial_processing_failed">Échec du traitement de la caméra</string> + <string name="spatial_hand_head_changed">Le suivi de la tête a changé lors de la détection des mains</string> + <string name="spatial_hand_wait_sync">En attente de synchronisation de la caméra et de la tête</string> + <string name="spatial_no_wrists">Aucun poignet détecté. Gardez les poignées de votre contrôleur Joy-Con devant les lunettes intelligentes</string> + <string name="spatial_no_hands">Aucune main détectée. Montrez les paumes ouvertes devant les lunettes intelligentes</string> + <string name="spatial_one_camera_wrists">Poignets visibles dans une seule caméra ; gardez les poignées de votre contrôleur dans la vue partagée</string> + <string name="spatial_one_camera_hands">Mains visibles dans une seule caméra ; garder les deux paumes dans la vue partagée</string> + <string name="spatial_ambiguous_hands">Les deux caméras voient les mains, mais la correspondance gauche/droite est ambiguë</string> + <string name="spatial_inconsistent_depth">Mains détectées, mais la profondeur stéréo est incohérente</string> + <string name="spatial_rejected_wrist">Position du poignet rejetée par les contrôles stéréo ou de mouvement</string> + <string name="spatial_inconsistent_palm">Points stéréo détectés, mais la géométrie de la paume est incohérente</string> + <string name="spatial_hands_need_calibration">Terminer l\'étalonnage et la vérification de la distance pour permettre aux mains</string> + <string name="spatial_hands_wait_stable">Attente d\'un suivi de tête stable ; réinitialisation du centre de suivi si demandé.</string> + <string name="spatial_old_frame">L\'observation par caméra est trop ancienne ; en attendant une nouvelle paire</string> + <string name="spatial_fit_ready">Ajuster %1$.2f px. Mesurez la distance sélectionnée entre la caméra gauche et le centre de la cible de calibrage, puis validez.</string> + <string name="spatial_opencv_error">OpenCV indisponible : %1$s</string> + <string name="spatial_restored">%1$d vues enregistrées restaurées. Calculez l’étalonnage pour réessayer ou démarrez un nouvel ensemble pour en capturer davantage.</string> + <string name="spatial_captured">Capturé %1$d / 24 vues. Gardez la cible d\'étalonnage fixe ; déplacez les lunettes intelligentes pour la vue suivante.</string> + <string name="spatial_capture_corners">Capture rejetée : %1$d / 12 coins requis visibles dans les deux caméras. Affichez davantage la cible d\'étalonnage, restez immobile, puis réessayez.</string> + <string name="spatial_validation_error">La vérification de distance n\'a pas pu se terminer : %1$s. Essayer à nouveau.</string> + <string name="spatial_inference_error">Détection de mains indisponibles : %1$s. Changez de CPU/GPU ou basculez les contrôleurs utilisés à mains nues pour réessayer.</string> + <string name="spatial_hand_timeout">Détection des mains dépassée %1$d ms ; observation rejetée</string> + <string name="spatial_wrists_tracked">%1$d / 2 positions du poignet du Joy-Con mesurées en stéréo</string> + <string name="spatial_palms_tracked">Paumes suivies : %1$d / 2 ; pincement prêt : %2$d ; saisie prête : %3$d</string> + <string name="spatial_capture_saved">Capture de diagnostic enregistrée dans %1$s</string> + <string name="spatial_hand_error">Suivi des mains arrêté : %1$s</string> + <string name="spatial_stereo_loaded">Stéréo %1$d×%2$d ; %3$s</string> + <string name="spatial_alignment_error">Le suivi de la tête et la cible d\'étalonnage sont en désaccord de %1$s (limite de 5 cm / 2 po). Gardez la cible d\'étalonnage fixe et attendez un suivi stable avant de commencer un nouvel ensemble. Tournez et inclinez doucement les lunettes intelligentes ; faites une pause avant chaque capture.</string> + <string name="spatial_need_views">Capturez au moins 24 vues variées de la cible d\'étalonnage stationnaire.</string> + <string name="spatial_need_rotation">Tournez les lunettes intelligentes à gauche et à droite et inclinez-les de haut en bas ; un mouvement sans rotation ne peut pas calibrer l’alignement de la caméra.</string> + <string name="spatial_bad_baseline">Base de référence de la caméra invraisemblable</string> + <string name="spatial_need_orientations">Déplacez votre tête dans des orientations plus variées.</string> + <string name="spatial_bad_rotation">Rotation caméra-tête non valide</string> + <string name="spatial_bad_alignment">L\'alignement caméra-tête est incohérent.</string> + <string name="spatial_calibration_error">L\'étalonnage n\'a pas pu se terminer. %1$s Vos vues capturées sont enregistrées.</string> + <string name="spatial_reprojection_error">L\'erreur de reprojection suspendue %1$.2f px dépasse 2 px. Recalibrer.</string> + <string name="spatial_distance_corners">%1$d / 24 coins en damier détectés dans les deux caméras. Gardez la cible d\'étalonnage complète visible et restez immobile. S\'il est déjà visible, sélectionnez 12 pouces ou 30 cm et mesurez cette distance la plus proche avant de réessayer.</string> + <string name="spatial_distance_depth">La cible d\'étalonnage est visible, mais sa profondeur n\'a pas pu être mesurée de manière fiable. Maintenez les lunettes intelligentes immobiles et gardez la cible d\'étalonnage plate et bien éclairée, puis réessayez.</string> + <string name="spatial_distance_invalid">Les mesures de la caméra n\'étaient pas valides. Restez immobile et réessayez.</string> + <string name="spatial_distance_passed">Contrôle de distance réussi.</string> + <string name="spatial_distance_retry">Revérifiez la distance entre la caméra gauche et le centre de la cible d\'étalonnage, puis réessayez.</string> + <string name="spatial_distance_result">Caméras mesurées %1$s ; distance sélectionnée %2$s. %3$s</string> + <string name="spatial_wait_previews">Attendez les deux aperçus de la caméra avant de commencer l\'étalonnage.</string> + <string name="spatial_saved_views_hint">Les vues enregistrées peuvent être recalculées. Démarrez un nouvel étalonnage pour capturer dans le système de coordonnées de suivi actuel.</string> + <string name="spatial_model_checksum_error">Incohérence de la somme de contrôle du modèle manuel</string> + <string name="spatial_opencv_load_error">OpenCV n\'a pas pu charger</string> +</resources> diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml new file mode 100644 index 0000000000..556e2b5382 --- /dev/null +++ b/app/src/main/res/values-hi/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">SteamVR ग्राफ़िक्स रुक गए</string> + <string name="steamvr_recovery_countdown">ग्राफ़िक्स रीसेट करने और SteamVR फिर से खोलने के लिए DroidDeck %1$d सेकंड में रीस्टार्ट होगा। आपका चल रहा गेम बंद हो जाएगा; बिना सेव की गई प्रोग्रेस वापस नहीं लाई जा सकती।</string> + <string name="steamvr_recovery_repeated">हाल ही में रीस्टार्ट के बाद ग्राफ़िक्स की गड़बड़ी फिर से आ गई। लूप से बचने के लिए ऑटोमैटिक रिकवरी रोक दी गई है। रीस्टार्ट करने पर आपका गेम बंद हो जाएगा; बिना सेव की गई प्रोग्रेस वापस नहीं लाई जा सकती।</string> + <string name="steamvr_recovery_restart">अभी रीस्टार्ट करें</string> + <string name="steamvr_recovery_cancel">खुला रखें</string> + <string name="steamvr_recovery_restarting">ग्राफ़िक्स रीसेट हो रहे हैं और SteamVR फिर से खुल रहा है…</string> + <string name="steamvr_recovery_failed">DroidDeck अपने-आप रीस्टार्ट नहीं हो सका। ऐप को पूरी तरह बंद करें, फिर उसे दोबारा खोलें।</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>पहली बार चलाने पर Steam डाउनलोड होता है। इसमें कुछ मिनट लग सकते हैं।</item> + <item>डिफ़ॉल्ट रूप से, ऐप से बाहर जाने पर Steam रुक जाता है; वापस आने पर यह वहीं से शुरू होता है जहां छोड़ा था।</item> + <item>आपका कंट्रोलर Xbox 360 पैड के रूप में दिखाई देता है। नहीं तो, ऑन-स्क्रीन कंट्रोल का उपयोग करें।</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>पहली बार चलाने पर डेस्कटॉप सेट हो जाता है। इसमें कुछ मिनट लग सकते हैं।</item> + <item>डिफ़ॉल्ट रूप से, ऐप से बाहर जाने पर सेशन रुक जाता है; वापस आने पर यह वहीं से शुरू होता है जहां छोड़ा था।</item> + <item>टच टचपैड की तरह काम करता है: पॉइंटर घुमाने के लिए ड्रैग करें, क्लिक के लिए टैप करें।</item> + <item>आपका कंट्रोलर Xbox 360 पैड के रूप में दिखाई देता है। नहीं तो, ऑन-स्क्रीन कंट्रोल का उपयोग करें।</item> + </string-array> + <string name="session_channel">सेशन</string> + <string name="session_channel_description">Steam या डेस्कटॉप सेशन खुला होने पर दिखता है</string> + <string name="session_notification">Steam चल रहा है</string> + <string name="session_notification_downloads">Steam डाउनलोड जारी है</string> + <string name="session_notification_paused">सेशन रुका हुआ है - तैयार होने पर फिर से शुरू करें पर टैप करें</string> + <string name="resume_session">फिर से शुरू करें</string> + <string name="suspend_now">अभी सस्पेंड करें</string> + <string name="stop_session">सेशन बंद करें</string> + <string name="frame_gen_title">फ़्रेम जनरेशन</string> + <string name="frame_gen_hint">फ़्रेम जनरेशन मोड चुनें</string> + <string name="frame_gen_off">बंद</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG एडैप्टिव %1$d</string> + <string name="lsfg_needs_steam">Steam पर Lossless Scaling की ज़रूरत है</string> + <string name="lsfg_needs_install">Steam में Lossless Scaling इंस्टॉल करें या Lossless.dll इंपोर्ट करें</string> + <string name="lsfg_import">Lossless.dll इंपोर्ट करें…</string> + <string name="lsfg_using_steam">Steam वाली कॉपी का उपयोग हो रहा है</string> + <string name="lsfg_using_import">इंपोर्ट की गई कॉपी का उपयोग हो रहा है</string> + <string name="lsfg_pick_title">Lossless.dll चुनें</string> + <string name="lsfg_imported">Lossless.dll इंपोर्ट हो गई</string> + <string name="lsfg_import_unchanged">यह Lossless.dll पहले से उपयोग में है</string> + <string name="lsfg_import_not_owned">इस Steam खाते में Lossless Scaling नहीं है</string> + <string name="lsfg_import_invalid">यह फ़ाइल Lossless Scaling की Lossless.dll नहीं है</string> + <string name="lsfg_import_failed">इस Lossless.dll से LSFG तैयार नहीं हो सका</string> + <string name="lsfg_problem_missing">LSFG को Steam से Lossless Scaling या इंपोर्ट की गई Lossless.dll चाहिए</string> + <string name="lsfg_problem_failed">LSFG अपने शेडर Lossless.dll से तैयार नहीं कर सका</string> + <string name="hud_fg_unsupported">%1$s: असमर्थित</string> + <string name="hud_fg_failed">%1$s: इंजन विफल</string> + <string name="hud_fg_needs_lossless">%1$s: को Lossless Scaling चाहिए</string> + <string name="hud_fg_starting">%1$s %2$s · शुरू हो रहा है</string> + <string name="second_library_import_hint">एक Steam लाइब्रेरी जोड़ता है और उसमें Windows गेम खोजता है। जिन गेम के मालिक आप हैं वे अपनी Steam एंट्री का उपयोग करते हैं; बाकी non-Steam शॉर्टकट बन जाते हैं।</string> + <string name="game_env_title">गेम एनवायरनमेंट</string> + <string name="game_env_hint">Proton गेम के लिए एनवायरनमेंट वेरिएबल।</string> + <string name="game_env_edit">संपादित करें</string> + <string name="game_env_shared">सभी Proton गेम</string> + <string name="game_env_scope">प्रोफ़ाइल</string> + <string name="game_env_app_id">Steam ऐप ID</string> + <string name="game_env_open">खोलें</string> + <string name="game_env_profile">गेम %1$s</string> + <string name="game_env_add">वेरिएबल जोड़ें</string> + <string name="game_env_name">वेरिएबल का नाम</string> + <string name="game_env_value">मान</string> + <string name="game_env_save">सेव करें</string> + <string name="game_env_remove">हटाएं</string> + <string name="game_env_restore">फिर से इनहेरिट करें</string> + <string name="game_env_reset">एनवायरनमेंट ओवरराइड हटाएं</string> + <string name="game_env_unset">इस प्रोफ़ाइल के लिए अनसेट करें</string> + <string name="game_env_empty">कोई वेरिएबल सेट नहीं है।</string> + <string name="game_env_inherited">इनहेरिटेड</string> + <string name="game_env_custom">कस्टम वेरिएबल</string> + <string name="game_env_error">लोड या सेव नहीं हो सका। खाली स्टोरेज जांचें और फिर कोशिश करें।</string> + <string name="game_env_invalid">मान्य नाम और 8192 वर्णों तक का मान इस्तेमाल करें।</string> + <string name="game_env_unused">स्टैंडर्ड Proton रनटाइम यह वेरिएबल नहीं पढ़ता।</string> + <string name="game_env_loading">लोड हो रहा है…</string> + <string name="game_env_feature">D3D12 फ़ीचर-लेवल ओवरराइड। 12_2 DirectX 12 Ultimate क्षमताएं दिखाता है; असमर्थित फ़ीचर फेल हो सकते हैं। ऑटोमैटिक पहचान के लिए इसे अनसेट रहने दें।</string> + <string name="game_env_shader">D3D12 शेडर-मॉडल ओवरराइड। 6_9 के लिए पर्याप्त नया VKD3D और मिलते GPU फ़ीचर चाहिए। ऑटोमैटिक पहचान के लिए इसे अनसेट रहने दें।</string> + <string name="game_env_cache">बार-बार कंपाइल होने से बचने के लिए Mesa शेडर कैशिंग चालू रखें। false कैशिंग को चालू करता है।</string> + <string name="game_env_cache_size">Mesa शेडर-कैश का अधिकतम आकार, जैसे 1G। बड़े कैश ज़्यादा स्टोरेज लेते हैं।</string> + <string name="game_env_vkd3d_config">D3D12 के लिए VKD3D विकल्प। nodxr रे ट्रेसिंग बंद करता है; इसका उपयोग सिर्फ़ उन गेम के लिए करें जिन्हें इसकी ज़रूरत हो।</string> + <string name="game_env_proton_log">Proton डायग्नोस्टिक लॉग के लिए 1 सेट करें। लॉगिंग से परफ़ॉर्मेंस घट सकता है और स्टोरेज लगता है।</string> + <string name="game_env_wined3d">D3D9–11 संगतता जांच के लिए DXVK के बजाय OpenGL-आधारित WineD3D इस्तेमाल करने के लिए 1 सेट करें।</string> + <string name="game_env_no_ntsync">इस गेम को ntsync (droiddeck-ntsync या कर्नेल ड्राइवर) से दूर रखने के लिए 1 सेट करें; जहां पैक मौजूद है वहां यह droiddeck-esync इस्तेमाल करता है, वरना droiddeck-fsync।</string> + <string name="game_env_no_esync">इस गेम के लिए droiddeck-esync बंद करने के लिए 1 सेट करें; इसके बदले यह droiddeck-fsync इस्तेमाल करता है, या जहां fsync भी बंद है वहां droiddeck-ntsync।</string> + <string name="game_env_no_fsync">इस गेम को droiddeck-fsync से दूर रखने के लिए 1 सेट करें; जहां पैक मौजूद है वहां यह droiddeck-esync इस्तेमाल करता है, वरना droiddeck-ntsync।</string> + <string name="game_env_fsync_first">इस गेम को droiddeck-fsync पर चलाने के लिए 1 सेट करें, या droiddeck-esync को पहले रखने के लिए 0 — जहां कोई पैक इसके Proton से मेल खाता हो।</string> + <string name="game_env_xalia">इस गेम के लिए Proton के गेमपैड-नेविगेशन हेल्पर को बंद करने के लिए 0 सेट करें।</string> + <string name="game_env_hud">D3D9–11 के लिए DXVK ओवरले। fps फ़्रेम रेट दिखाता है; अनसेट करने पर यह छिप जाता है।</string> + <string name="game_env_dxvk_config">सेमीकोलन से अलग की गई DXVK सेटिंग। नए बिल्ड फ़्रेम सीमित करने के लिए dxvk.maxFrameRate इस्तेमाल करते हैं; सामान्य खेल के लिए सेशन का फ़्रेम लिमिटर इस्तेमाल करना बेहतर है।</string> + <string name="game_env_vkd3d_limit">D3D12 फ़्रेम-रेट सीमा। 0 सीमा को बंद कर देता है।</string> + <string name="game_env_glthread">Mesa OpenGL थ्रेडिंग। true, CPU-सीमित OpenGL गेम में मदद कर सकता है; हर गेम पर जांच लें।</string> + <string name="sync_backend_title">Wine सिंक</string> + <string name="sync_backend_hint">गेम अपने थ्रेड को किस तरह तालमेल में रखते हैं। अगले सेशन से लागू होता है।</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">FEX प्रीसेट</string> + <string name="fex_next_launch">अगली बार गेम शुरू होने पर लागू होता है।</string> + <string name="game_settings_title">गेम</string> + <string name="fex_default_label">FEX डिफ़ॉल्ट</string> + <string name="fex_default_detail">FEX के डिफ़ॉल्ट इस्तेमाल करता है।</string> + <string name="fex_stability_label">स्टेबिलिटी</string> + <string name="fex_stability_detail">सबसे सुरक्षित, सबसे धीमी सेटिंग।</string> + <string name="fex_compatibility_label">कम्पैटिबिलिटी</string> + <string name="fex_compatibility_detail">मल्टीब्लॉक के साथ पूरा TSO।</string> + <string name="fex_intermediate_label">इंटरमीडिएट</string> + <string name="fex_intermediate_detail">घटी हुई x87 प्रिसिज़न के साथ संतुलित TSO।</string> + <string name="fex_performance_label">परफ़ॉर्मेंस</string> + <string name="fex_performance_detail">सभी TSO बंद; मल्टीब्लॉक।</string> + <string name="fex_performance_tso_label">परफ़ॉर्मेंस + TSO</string> + <string name="fex_performance_tso_detail">मुख्य TSO चालू के साथ परफ़ॉर्मेंस सेटिंग।</string> + <string name="fex_extreme_label">एक्सट्रीम</string> + <string name="fex_extreme_detail">सेल्फ़-मॉडिफ़ाइंग-कोड जांच बंद करता है। JIT गेम और DRM काम करना बंद कर सकते हैं।</string> + <string name="fex_extreme_tso_label">एक्सट्रीम + TSO</string> + <string name="fex_extreme_tso_detail">मुख्य TSO चालू के साथ एक्सट्रीम सेटिंग।</string> + <string name="fex_extreme_gn_label">एक्सट्रीम-gn</string> + <string name="fex_extreme_gn_detail">TSC और मेटाडेटा हिंट के साथ परफ़ॉर्मेंस। एक्सट्रीम से पहले इसे आज़माएं।</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">पूरी कोड जांच के साथ परफ़ॉर्मेंस, और हाइपरवाइज़र बिट छिपा हुआ।</string> + <string name="game_env_custom_value">कस्टम मान</string> + <string name="game_env_select_value">मान चुनें</string> + <string name="user_apps_section">एमुलेटर और ऐप</string> + <string name="user_apps_add">जोड़ें</string> + <string name="user_apps_add_detail">आपका अपना ऐप या गेम</string> + <string name="user_apps_kind_script">स्क्रिप्ट</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">शुरू हो रहा है…</string> + <string name="user_apps_added">%1$s जोड़ा गया</string> + <string name="user_apps_removed">%1$s हटाया गया</string> + <string name="user_apps_back">डेस्कटॉप</string> + <string name="user_apps_gone">वह ऐप अब नहीं है। इसे डेस्कटॉप से फिर से चुनें।</string> + <string name="user_apps_open">%1$s खोलें</string> + <string name="user_apps_remove">हटाएं</string> + <string name="user_apps_remove_confirm">हटाने के लिए फिर से दबाएं</string> + <string name="user_apps_stop_session">हटाने के लिए सेशन बंद करें</string> + <string name="user_apps_script_linked">%1$s को उसके फ़ोल्डर से चलाता है, जो सेशन में वहीं से लिंक रहता है। ऐप हटाने पर वह फ़ोल्डर जैसा है वैसा ही रहता है।</string> + <string name="user_apps_script_copied">%1$s को DroidDeck के भीतर उसके फ़ोल्डर की एक कॉपी से चलाता है। ऐप हटाने पर कॉपी मिटती है, असली फ़ोल्डर नहीं।</string> + <string name="user_apps_runtime_required">पहले Linux रनटाइम इंस्टॉल करें</string> + <string name="user_apps_file_gone">फ़ाइल अब नहीं है</string> + <string name="user_apps_no_space">पर्याप्त खाली जगह नहीं है: फ़ोल्डर कॉपी करने के लिए %1$s चाहिए</string> + <string name="user_apps_copying">%1$s कॉपी हो रहा है</string> + <string name="user_apps_failed">ऐप जोड़ना विफल रहा</string> + <string name="user_apps_github_checking">%1$s का रिलीज़ खोजा जा रहा है</string> + <string name="user_apps_github_unreachable">%1$s के रिलीज़ नहीं पढ़े जा सके</string> + <string name="user_apps_github_no_appimage">%1$s के किसी भी रिलीज़ में ARM64 या x86_64 AppImage नहीं है</string> + <string name="user_apps_downloading">%1$s डाउनलोड हो रहा है</string> + <string name="user_apps_download_failed">डाउनलोड विफल रहा</string> + <string name="user_apps_update_failed">ऐप अपडेट करना विफल रहा</string> + <string name="user_apps_icon_failed">वह आइकन पढ़ा नहीं जा सका</string> + <string name="user_apps_saved">%1$s सेव हुआ</string> + <string name="user_apps_edit">संपादित करें</string> + <string name="user_apps_check_updates">अपडेट देखें</string> + <string name="user_apps_checking_updates">अपडेट देखे जा रहे हैं…</string> + <string name="user_apps_update_to">%1$s में अपडेट करें</string> + <string name="user_apps_up_to_date">नवीनतम · %1$s</string> + <string name="user_apps_updated">%1$s अपडेट हुआ</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">ऐप जोड़ें</string> + <string name="add_app_tab_script">स्क्रिप्ट</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">एक .sh फ़ाइल। यह अपने फ़ोल्डर से gamescope के अंदर फ़ुल स्क्रीन में चलती है।</string> + <string name="add_app_appimage_hint">एक ARM64 (aarch64) AppImage, या एक x86_64 वाली जो FEX के ज़रिए चलती है। यह Linux रनटाइम में एक बार अनपैक होती है।</string> + <string name="add_app_github_hint">रिपॉज़िटरी के सबसे नए रिलीज़ से ARM64 AppImage इंस्टॉल करता है, या FEX के ज़रिए इसकी x86_64 वाली।</string> + <string name="app_fex_title">FEX इस्तेमाल करें</string> + <string name="app_fex_auto">ऑटो</string> + <string name="app_fex_on">चालू</string> + <string name="app_fex_off">बंद</string> + <string name="app_fex_hint">FEX इस ARM64 डिवाइस पर x86 Linux प्रोग्राम चलाता है। प्रोग्राम x86 के लिए बना होने पर ऑटो इसे इस्तेमाल करता है।</string> + <string name="app_fex_x86">FEX के ज़रिए %1$s</string> + <string name="app_fex_not_ready">यह प्रोग्राम %1$s पीसी के लिए बना है और FEX के ज़रिए चलता है, जो अभी सेट नहीं है। साइन इन रहते हुए Steam एक बार खोलें: DroidDeck इससे FEX और ज़रूरी Steam Linux Runtime डाउनलोड करवा लेगा, फिर यह खुल जाएगा।</string> + <string name="session_end_program">यह प्रोग्राम</string> + <string name="session_end_fex_missing">%1$s x86 पीसी के लिए बना है और FEX के ज़रिए चलता है, जो अभी इंस्टॉल नहीं है। साइन इन रहते हुए Steam एक बार शुरू करें और इसे FEX और Steam Linux Runtime डाउनलोड करने दें, फिर इसे फिर से शुरू करें।</string> + <string name="add_app_flatpak_hint">एक Flathub ऐप ID या उसका Flathub पेज। अगर Flatpak अभी सेट नहीं है, तो पहले वह सेट होगा।</string> + <string name="add_app_file">फ़ाइल</string> + <string name="add_app_no_file">कोई फ़ाइल नहीं चुनी गई</string> + <string name="add_app_choose_file">फ़ाइल चुनें</string> + <string name="add_app_change_file">बदलें</string> + <string name="add_app_pick_script">स्क्रिप्ट चुनें</string> + <string name="add_app_pick_appimage">AppImage चुनें</string> + <string name="add_app_pick_icon">आइकन चुनें</string> + <string name="add_app_repository">रिपॉज़िटरी</string> + <string name="add_app_repository_placeholder">owner/repo या github.com का लिंक</string> + <string name="add_app_repository_invalid">यह GitHub रिपॉज़िटरी नहीं है</string> + <string name="add_app_flatpak_id">ऐप ID</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">यह Flathub ऐप ID नहीं है</string> + <string name="add_app_flatpak_bundle_hint">या एक .flatpak फ़ाइल, उस ऐप के लिए जो Flathub पर नहीं है।</string> + <string name="add_app_pick_flatpak">.flatpak फ़ाइल चुनें</string> + <string name="add_app_source">सोर्स</string> + <string name="add_app_appearance">आपके डेस्कटॉप पर</string> + <string name="add_app_preview_name">नया ऐप</string> + <string name="add_app_name">नाम</string> + <string name="add_app_name_placeholder">ऐप से</string> + <string name="add_app_icon">आइकन</string> + <string name="add_app_icon_default">डिफ़ॉल्ट आइकन</string> + <string name="add_app_choose_icon">आइकन चुनें</string> + <string name="add_app_clear_icon">हटाएं</string> + <string name="add_app_icon_suggestions">रिपॉज़िटरी से</string> + <string name="add_app_icon_searching">आइकन खोजे जा रहे हैं…</string> + <string name="add_app_icon_reset">डिफ़ॉल्ट</string> + <string name="edit_app_title">%1$s संपादित करें</string> + <string name="edit_app_save">सेव करें</string> + <string name="add_app_checking_folder">फ़ोल्डर जांचा जा रहा है…</string> + <string name="add_app_folder_linked">इसका फ़ोल्डर सेशन में लिंक है: %1$s</string> + <string name="add_app_folder_copied">इसके फ़ोल्डर में Linux प्रोग्राम हैं, जिन्हें शेयर्ड स्टोरेज चला नहीं सकता, इसलिए इसे DroidDeck में कॉपी किया जाता है (%1$s)।</string> + <string name="add_app_confirm">जोड़ें</string> + <string name="add_app_cancel">रद्द करें</string> + <string name="add_app_runtime_required">पहले Setup से Linux रनटाइम इंस्टॉल करें।</string> + <string name="add_app_busy">%1$s के पूरा होने का इंतज़ार करें।</string> + <string name="steam_compat_label">कम्पैटिबल</string> + <string name="proton_compatible_note">Steam के Compatibility मेनू में “%1$s” के निशान वाले बिल्ड में DroidDeck के प्रीफ़िक्स फ़िक्स होते हैं और यहां गेम शुरू कर पाते हैं। डिफ़ॉल्ट है Proton Experimental ARM64 (%1$s), या नया बिल्ड इंस्टॉल होने पर Proton 11.0 ARM64 (%1$s)। बिना निशान वाली Valve की खुद की Proton एंट्री इस डिवाइस पर गेम शुरू नहीं कर सकती।</string> + <string name="proton_installed_compatible">इंस्टॉल है %1$s · %2$s</string> + <string name="common_cancel">रद्द करें</string> + <string name="common_auto">ऑटो</string> + <string name="common_never">कभी नहीं</string> + <string name="common_always">हमेशा</string> + <string name="common_uninstall">अनइंस्टॉल करें</string> + <string name="common_check">जांचें</string> + <string name="common_update">अपडेट करें</string> + <string name="common_checking">जांचा जा रहा है…</string> + <string name="common_working">काम हो रहा है…</string> + <string name="common_forget">भूलें</string> + <string name="common_add_ellipsis">जोड़ें…</string> + <string name="common_use">इस्तेमाल करें</string> + <string name="common_applies_next_session">अगले सेशन से लागू होता है।</string> + <string name="mode_steam_title">Steam सेशन</string> + <string name="mode_desktop_title">डेस्कटॉप सेशन</string> + <string name="mode_display">डिस्प्ले</string> + <string name="mode_resolution">रिज़ॉल्यूशन</string> + <string name="mode_res_720">720p तक</string> + <string name="mode_res_900">900p तक</string> + <string name="mode_res_1080">1080p तक</string> + <string name="mode_res_native">नेटिव</string> + <string name="mode_res_default">%1$s (डिफ़ॉल्ट)</string> + <string name="mode_res_custom_value">कस्टम · %1$d×%2$d</string> + <string name="mode_res_custom">कस्टम…</string> + <string name="mode_res_note">720p मेनू को ज़्यादा रिस्पॉन्सिव बना सकता है।</string> + <string name="mode_ratio">स्क्रीन रेशियो</string> + <string name="mode_ratio_custom">कस्टम रिज़ॉल्यूशन से तय होता है।</string> + <string name="mode_ratio_auto">ऑटो कम से कम 16:9 इस्तेमाल करता है।</string> + <string name="mode_fps">फ़्रेम सीमा</string> + <string name="mode_fps_note">पूरे सेशन को सीमित करता है। डिस्प्ले उस रिफ्रेश रेट पर चला जाता है जिसे यह सीमा बराबर बांटती है।</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10 आउटपुट</string> + <string name="mode_hdr_unavailable">उपलब्ध नहीं: %1$s।</string> + <string name="mode_hdr_restart">लागू करने के लिए ऐप रीस्टार्ट करें।</string> + <string name="mode_drivers">ड्राइवर</string> + <string name="mode_gpu_drivers">GPU ड्राइवर</string> + <string name="mode_gpu_drivers_hint">Steam और डेस्कटॉप दोनों में साझा। Components पेज पर सेट करें।</string> + <string name="mode_touch_controls">टच और कंट्रोल</string> + <string name="mode_touch">टच</string> + <string name="mode_touch_touchpad">टचपैड</string> + <string name="mode_touch_direct">डायरेक्ट</string> + <string name="mode_touch_note">ऑटो: डेस्कटॉप पर टचपैड, Steam में डायरेक्ट।</string> + <string name="mode_osc">ऑन-स्क्रीन कंट्रोल</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">कोई कंट्रोलर कनेक्ट न होने पर ऑटो कंट्रोल दिखाता है।</string> + <string name="osc_steam_touch">Steam टच (बीटा)</string> + <string name="osc_style_next_session">Steam के टच कंट्रोल अगले Steam सेशन से शुरू होंगे</string> + <string name="osc_steam_layout">Steam टच लेआउट</string> + <string name="osc_steam_layout_hint">इस गेम के टच कंट्रोल को घुमाएं, आकार बदलें या छिपाएं; Steam में सेव होता है</string> + <string name="mode_controller">कंट्रोलर</string> + <string name="mode_controller_hint">Steam आपके कंट्रोलर को किस तरह पहचानता है। अगले सेशन से लागू होता है।</string> + <string name="mode_controller_deck">Steam Deck कंट्रोलर</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Xbox 360 कंट्रोलर</string> + <string name="mode_controller_note">Deck: Quick Access बटन और gyro। Steam Controller: वही, साथ में पीछे के बटन पर ग्रिप सेंस। DualShock 4 और DualSense: gyro, और ट्रैकपैड उनके टचपैड के तौर पर। Xbox 360: Guide+A से Quick Access खोलें।</string> + <string name="mode_back">बैक</string> + <string name="back_menu_then_qam">मेनू → QAM</string> + <string name="back_qam_then_menu">QAM → मेनू</string> + <string name="mode_session">सेशन</string> + <string name="mode_suspend">बैकग्राउंड व्यवहार</string> + <string name="mode_suspend_hint">ऐप छिपने या स्क्रीन बंद होने पर।</string> + <string name="mode_suspend_manual">मैनुअल</string> + <string name="mode_suspend_native">नेटिव</string> + <string name="mode_suspend_steam_note">ऑटो दिखने पर रुकता है और फिर से शुरू होता है। नेटिव पहले Steam को स्लीप के लिए तैयार करता है। मैनुअल फिर से शुरू करें का इंतज़ार करता है। कभी नहीं वाला चलता रहता है।</string> + <string name="mode_background_downloads">डाउनलोड चलते रहने दें</string> + <string name="mode_background_downloads_hint">Steam के सक्रिय रूप से डाउनलोड करते समय बैकग्राउंड सस्पेंशन को टालें।</string> + <string name="mode_zram">zRAM कम्प्रेशन</string> + <string name="mode_zram_hint">गेम चलने के दौरान Steam क्लाइंट की मेमोरी डिवाइस के zram में कम्प्रेस होती है, जिससे गेम को ज़्यादा RAM मिलती है। अगली बार Steam शुरू होने पर लागू होगा।</string> + <string name="mode_zram_unsupported">उपलब्ध नहीं: इस डिवाइस में zram या swap नहीं है, या कर्नेल 5.4 से पुराना है।</string> + <string name="mode_suspend_note">ऑटो बैकग्राउंड में रुकता है और दिखने पर फिर से शुरू होता है। मैनुअल फिर से शुरू करें का इंतज़ार करता है। कभी नहीं वाला चलता रहता है।</string> + <string name="mode_startup">स्टार्टअप</string> + <string name="mode_steam_startup">DroidDeck के साथ Steam शुरू करें</string> + <string name="mode_steam_startup_hint">DroidDeck लॉन्च होने पर Steam सेशन खोलता है।</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">रिलीज़ देखी जा रही हैं…</string> + <string name="mode_decky_ready">%1$s इंस्टॉल करने के लिए तैयार।</string> + <string name="mode_decky_none">कोई कम्पैटिबल बिल्ड नहीं मिला। बाद में फिर कोशिश करें।</string> + <string name="mode_decky_installed">इंस्टॉल है · %1$s</string> + <string name="mode_decky_update">अपडेट उपलब्ध · %1$s</string> + <string name="mode_decky_current">नवीनतम · %1$s</string> + <string name="mode_decky_loader">लोडर</string> + <string name="mode_decky_install_latest">नवीनतम इंस्टॉल करें</string> + <string name="mode_decky_on">Steam के साथ शुरू होता है। चालू रहते हुए, इस डिवाइस के दूसरे ऐप Steam को नियंत्रित कर सकते हैं।</string> + <string name="mode_decky_off">बंद। Steam का रिमोट डिबगिंग पोर्ट बंद रहता है।</string> + <string name="mode_decky_remove_title">Decky Loader अनइंस्टॉल करें?</string> + <string name="mode_decky_remove_text">लोडर हटाता है। आपके प्लगइन और सेटिंग बनी रहती हैं।</string> + <string name="mode_client">क्लाइंट</string> + <string name="mode_mangoapp">परफ़ॉर्मेंस ओवरले</string> + <string name="mode_mangoapp_hint">Deck मोड में गेम क्रैश होने या काली स्क्रीन होने पर इसे बंद करें। अगले सेशन से लागू होता है।</string> + <string name="mode_steam_repair">Steam क्लाइंट रिपेयर करें</string> + <string name="mode_steam_repair_hint">अगली बार Steam शुरू होने पर Steam क्लाइंट फिर से डाउनलोड होता है। इसे इस्तेमाल करें जब Steam अपनी लोडिंग स्क्रीन पर अटका रह जाए। गेम, साइन-इन और सेटिंग बनी रहती हैं।</string> + <string name="mode_steam_repair_queued">अगली बार Steam शुरू होने पर Steam क्लाइंट फिर से डाउनलोड होगा।</string> + <string name="mode_steam_repair_button">रिपेयर करें</string> + <string name="mode_added_art">आर्टवर्क</string> + <string name="mode_sgdb_key">SteamGridDB API कुंजी</string> + <string name="mode_sgdb_key_yours">आपकी कुंजी</string> + <string name="mode_sgdb_edit">संपादित करें…</string> + <string name="mode_added_art_hint">पहले Steam से, फिर SteamGridDB से छूटी हुई आर्टवर्क भरता है। गेम फ़ोल्डर में आपकी अपनी cover.jpg, hero.jpg, logo.png या icon.png को प्राथमिकता मिलती है।</string> + <string name="summary_remove_game">%1$s हटाएं</string> + <string name="mode_added_remove_confirm">हटाएं?</string> + <string name="games_add">गेम जोड़ें</string> + <string name="games_add_title">गेम जोड़ें:</string> + <string name="games_pick_exe_title">exe चुनें:</string> + <string name="games_add_unreachable">यह जगह सेशन में उपलब्ध नहीं है</string> + <string name="mode_added_exe_check">इस exe को जांचें</string> + <string name="wincomp_title">Windows कॉम्पोनेंट</string> + <string name="wincomp_pad_hint">LB / RB से सेक्शन के बीच जाएं।</string> + <string name="wincomp_card_none">कोई नहीं</string> + <string name="wincomp_applies">कॉम्पोनेंट लिस्ट से वे Windows DLL जो Proton में शामिल नहीं हैं। जिन्हें इस गेम को ज़रूरत है उन्हें चालू करें: वे गेम के अपने Windows फ़ोल्डर में जाते हैं, उसकी फ़ाइलों में कभी नहीं, और जो भी Proton यह चलता है उसमें बने रहते हैं।</string> + <string name="wincomp_offline">कॉम्पोनेंट लिस्ट तक नहीं पहुंच सका। पहले से डाउनलोड किए कॉम्पोनेंट अब भी बदले जा सकते हैं।</string> + <string name="wincomp_recommended">इस गेम के लिए सुझाए गए</string> + <string name="wincomp_checking">यह गेम किसकी ज़रूरत है देखा जा रहा है…</string> + <string name="wincomp_when_online">ऑनलाइन होने पर उपलब्ध</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">%1$d कॉम्पोनेंट चालू किया जा रहा है…</item> + <item quantity="other">%1$d कॉम्पोनेंट चालू किए जा रहे हैं…</item> + </plurals> + <string name="wincomp_auto_section">इस गेम के लिए चालू</string> + <string name="wincomp_auto_steam">Steam %2$s (ऐप %3$s) के साथ %1$s इंस्टॉल करता है</string> + <string name="wincomp_auto_gog">इस गेम के लिए GOG की लिस्ट से</string> + <string name="wincomp_auto_epic">इस गेम के लिए Epic की ज़रूरी शर्तों से</string> + <string name="wincomp_auto_amazon">इस गेम के लिए Amazon के इंस्टॉल स्टेप से</string> + <string name="wincomp_steam_by_name">Steam नाम से मिलान करके ऐप %2$s के साथ %1$s इंस्टॉल करता है</string> + <string name="wincomp_suggestions">ये भी सूचीबद्ध</string> + <string name="wincomp_suggestion_reason">%1$s द्वारा सूचीबद्ध; यहां कॉम्पोनेंट नहीं है</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">गेम %1$s के साथ आता है</string> + <string name="wincomp_found_shipped">गेम में %1$s है (अक्सर ऐसे ही काम करता है)</string> + <string name="wincomp_already_here">इस गेम में पहले से मौजूद</string> + <string name="wincomp_no_recommendation">गेम के फ़ोल्डर में किसी कॉम्पोनेंट का कोई संकेत नहीं है।</string> + <string name="wincomp_active">इस गेम के लिए इंस्टॉल (%1$d)</string> + <string name="wincomp_all">सभी कॉम्पोनेंट (%1$d)</string> + <string name="wincomp_installers">Windows इंस्टॉलर की ज़रूरत (%1$d)</string> + <string name="wincomp_installers_note">ये अपने खुद के सेटअप प्रोग्राम हैं, जिनके भीतर खोलने लायक कोई पैकेज नहीं है, और अभी तक यह रिकॉर्ड नहीं है कि वे क्या इंस्टॉल करते हैं। ज़्यादातर पुराने रनटाइम हैं जिनकी जगह Proton के भीतर का Mono पहले से ले लेता है; रिकॉर्ड बनते ही जोड़े जाते हैं।</string> + <string name="wincomp_show">दिखाएं</string> + <string name="wincomp_hide">छिपाएं</string> + <string name="wincomp_needs_installer">अपना सेटअप प्रोग्राम चलाता है (अभी रिकॉर्ड नहीं)</string> + <string name="wincomp_unsupported">अभी यहां समर्थित नहीं</string> + <string name="wincomp_loading">कॉम्पोनेंट लोड हो रहे हैं…</string> + <string name="wincomp_failed">इंस्टॉल नहीं हो सका: %1$s</string> + <string name="wincomp_downloaded">डाउनलोड हो गया</string> + <string name="wincomp_downloading">%1$s डाउनलोड हो रहा है</string> + <string name="wincomp_installing">इंस्टॉल हो रहा है: %1$s</string> + <string name="wincomp_reverting">बंद किया जा रहा है…</string> + <string name="wincomp_download_size">%1$s डाउनलोड</string> + <string name="wincomp_next_launch">अगली बार गेम शुरू होने पर लागू होगा।</string> + <string name="mode_stretch169">16:9 गेम को स्ट्रेच करें</string> + <string name="mode_stretch169_hint">16:9 से ज़्यादा चौकोर स्क्रीन पर, बार दिखाने के बजाय गेम को भरने के लिए स्ट्रेच करता है। अगले सेशन से लागू होता है।</string> + <string name="mode_audio">ऑडियो</string> + <string name="mode_directaudio">गेम के लिए DirectAudio</string> + <string name="mode_directaudio_hint">कम लेटेंसी के लिए PulseAudio को बायपास करता है।</string> + <string name="mode_mic">माइक्रोफ़ोन</string> + <string name="mode_mic_hint">वॉइस चैट के लिए।</string> + <string name="mode_network">नेटवर्क</string> + <string name="mode_wifi_discovery">Wi-Fi खोज</string> + <string name="mode_wifi_discovery_hint">Steam में Wi-Fi नाम और आस-पास के नेटवर्क दिखाएं।</string> + <string name="mode_wifi_location_off">लोकेशन सेवाएं बंद हैं।</string> + <string name="mode_wifi_permission_denied">लोकेशन अनुमति नहीं दी गई।</string> + <string name="mode_wifi_open_settings">सेटिंग खोलें</string> + <string name="mode_wifi_continue">जारी रखें</string> + <string name="mode_wifi_explain_title">Wi-Fi खोज चालू करें?</string> + <string name="mode_wifi_explain_text">Wi-Fi नाम पढ़ने और आस-पास के नेटवर्क खोजने के लिए Android को लोकेशन अनुमति चाहिए। DroidDeck इस एक्सेस का उपयोग Steam में वे नेटवर्क दिखाने के लिए करता है। हम आपकी लोकेशन ट्रैक नहीं करते। इंटरनेट एक्सेस इस अनुमति के बिना भी काम करता है।</string> + <string name="mode_storage">गेम स्टोरेज</string> + <string name="mode_storage_auto">ऑटोमैटिक - मौजूद होने पर SD कार्ड, और आपके Games फ़ोल्डर</string> + <string name="mode_storage_auto_none">ऑटोमैटिक - आपके Games फ़ोल्डर, और मौजूद होने पर SD कार्ड (अभी कोई नहीं)</string> + <string name="mode_storage_internal">केवल इंटरनल</string> + <string name="mode_storage_folder">फ़ोल्डर: %1$s</string> + <string name="mode_second_library">दूसरी लाइब्रेरी</string> + <string name="mode_storage_note">SD या शेयर्ड स्टोरेज से एसेट स्ट्रीम करने वाले गेम अटक सकते हैं।</string> + <string name="mode_storage_diagnostics">स्टोरेज डायग्नोस्टिक्स</string> + <string name="mode_storage_diagnostics_hint">Share logs में एलोकेशन नतीजे और सैंपल किए स्टोरेज टाइमिंग रिकॉर्ड करें। चालू रहते हुए इंस्टॉल धीमे हो सकते हैं। अगले सेशन से लागू होता है।</string> + <string name="mode_choose_folder">फ़ोल्डर चुनें…</string> + <string name="mode_custom_res_title">कस्टम रिज़ॉल्यूशन</string> + <string name="mode_custom_res_text">सीमा और रेशियो को बदल देता है। स्क्रीन से न मिलने वाले आकार में बार दिखेंगे।</string> + <string name="mode_width">चौड़ाई</string> + <string name="mode_height">ऊंचाई</string> + <string name="mode_custom_res_range">320×240 और 3840×2160 के बीच।</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d गेम</item> + <item quantity="other">%1$d गेम</item> + </plurals> + <string name="common_ok">ठीक है</string> + <string name="common_delete">हटाएं</string> + <string name="common_restore">वापस लाएं</string> + <string name="common_download">डाउनलोड करें</string> + <string name="common_delete_named">%1$s हटाएं</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">रनटाइम ड्राइवर</string> + <string name="comp_runtime_driver_hint">Steam, गेम और डेस्कटॉप में उपयोग होता है। अगले सेशन से लागू होता है।</string> + <string name="comp_import_turnip">Turnip zip इंपोर्ट करें…</string> + <string name="comp_display_driver">डिस्प्ले ड्राइवर</string> + <string name="comp_display_driver_hint">दोनों मोड में स्क्रीन पर फ़्रेम बनाता है। लागू करने के लिए ऐप रीस्टार्ट करें।</string> + <string name="comp_import_adrenotools">AdrenoTools zip इंपोर्ट करें…</string> + <string name="comp_never">कभी नहीं</string> + <string name="comp_nightlies_checked">Nightlies की जांच %1$s को हुई</string> + <string name="comp_title">कॉम्पोनेंट</string> + <string name="comp_about">कॉम्पोनेंट के बारे में</string> + <string name="comp_check_drivers">नए ड्राइवर देखें</string> + <string name="comp_check_nightlies">नए पैकेज के लिए Nightlies देखें</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">यहां चुना गया Proton उन सभी गेम को चलाता है जिन्होंने Steam में अपना अलग Proton नहीं चुना है, और Steam में किया गया बदलाव यहां भी दिखता है। Steam अपडेट होने पर Valve का Proton बदल देता है; हर बिल्ड के ओरिजिनल सुरक्षित रहते हैं।</string> + <string name="comp_scope">कॉन्फ़िगरेशन</string> + <string name="comp_profile_configure">प्रोफ़ाइल कॉन्फ़िगर करें</string> + <string name="comp_profile">प्रोफ़ाइल</string> + <string name="comp_scope_general">डिफ़ॉल्ट प्रोफ़ाइल</string> + <string name="comp_scope_general_detail">बिना ओवरराइड वाले गेम इसे खुद इस्तेमाल करते हैं।</string> + <string name="comp_profile_game_detail">%1$s शुरू होने पर सेव की गई सेटिंग खुद इस्तेमाल होती हैं।</string> + <string name="comp_game_hint">सिर्फ़ वे सेटिंग चुनें जिनकी इस गेम को ज़रूरत है। बाकी सब डिफ़ॉल्ट प्रोफ़ाइल का इस्तेमाल करते रहते हैं।</string> + <string name="comp_game_fex">FEX प्रीसेट</string> + <string name="comp_game_fex_inherited">डिफ़ॉल्ट प्रोफ़ाइल का प्रीसेट इस्तेमाल हो रहा है।</string> + <string name="comp_game_fex_override">इस गेम के लिए कस्टम प्रीसेट सेव किया गया है।</string> + <string name="comp_game_fex_custom">कस्टम FEX वेरिएबल</string> + <string name="comp_game_use_general">डिफ़ॉल्ट इस्तेमाल करें</string> + <string name="comp_game_compatibility">गेम कम्पैटिबिलिटी</string> + <string name="comp_game_environment_hint">इस गेम के लिए Proton, DXVK, VKD3D और सिंक्रोनाइज़ेशन एनवायरनमेंट विकल्प।</string> + <string name="comp_game_proton_inherited">डिफ़ॉल्ट प्रोफ़ाइल का Proton इस्तेमाल हो रहा है।</string> + <string name="comp_game_proton_override">Steam कम्पैटिबिलिटी मैपिंग के ज़रिए इस गेम के लिए कस्टम Proton सेव किया गया है।</string> + <string name="comp_no_proton_short">कोई Proton नहीं</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">अगर यह गेम कोई और पैकेज न चुने, तो %1$s से डिफ़ॉल्ट प्रोफ़ाइल का पैकेज इस्तेमाल होता है।</string> + <string name="comp_game_component_general">डिफ़ॉल्ट प्रोफ़ाइल का कॉम्पोनेंट पैकेज इस्तेमाल होता है।</string> + <string name="comp_game_component_override">सिर्फ़ इस गेम के लिए %1$s इस्तेमाल होता है।</string> + <string name="comp_game_runtime_options">रनटाइम विकल्प</string> + <string name="comp_game_environment_other_hint">हर गेम के लिए अन्य Proton, DXVK, VKD3D-Proton और सिंक्रोनाइज़ेशन एनवायरनमेंट विकल्प।</string> + <string name="comp_game_saved_next">%1$s की प्रोफ़ाइल अगली बार गेम शुरू होने के लिए सेव है।</string> + <string name="game_no_steam_title">Steam के बिना शुरू करें</string> + <string name="game_no_steam_detail">इसे Steam क्लाइंट के बिना Proton/FEX में खोलता है; Steam सुविधाएँ बंद रहती हैं।</string> + <string name="game_no_steam_on">चालू</string> + <string name="game_steam_with">Steam के साथ शुरू होता है</string> + <string name="game_steam_without">Steam के बिना शुरू होता है</string> + <string name="game_settings_card">सेटिंग</string> + <string name="game_settings_menu_title">%1$s सेटिंग</string> + <string name="game_settings_default">डिफ़ॉल्ट</string> + <string name="game_settings_default_detail">इस गेम के लिए बदली गई हर चीज़ को ऐप की सेटिंग पर वापस लाता है।</string> + <string name="game_sync_custom">कस्टम सिंक वेरिएबल</string> + <string name="comp_game_proton_live">%1$s का Proton चुनाव सेव है और अभी Steam में उपलब्ध है।</string> + <string name="comp_game_proton_next">%1$s का Proton चुनाव सेव है। गेम शुरू करने से पहले Steam रीस्टार्ट करें।</string> + <string name="comp_game_proton_not_runnable">%1$s इस डिवाइस पर चुना गया Proton इस्तेमाल नहीं कर सकता।</string> + <string name="comp_game_load_failed">%1$s की प्रोफ़ाइल लोड नहीं हो सकी: %2$s</string> + <string name="comp_game_save_failed">गेम प्रोफ़ाइल सेव नहीं हो सकी: %1$s</string> + <string name="comp_game_reset">गेम प्रोफ़ाइल रीसेट करें</string> + <string name="comp_game_reset_title">%1$s की प्रोफ़ाइल रीसेट करें?</string> + <string name="comp_game_reset_body">इस गेम का Proton, FEX, कॉम्पोनेंट पैकेज, एनवायरनमेंट, टेक्सचर फ़िल्टरिंग, और Windows कॉम्पोनेंट ओवरराइड हटाएं? यह डिफ़ॉल्ट प्रोफ़ाइल इस्तेमाल करेगा।</string> + <string name="comp_game_reset_done">%1$s अब डिफ़ॉल्ट प्रोफ़ाइल इस्तेमाल करता है।</string> + <string name="comp_game_reset_failed">गेम प्रोफ़ाइल पूरी तरह रीसेट नहीं हो सकी: %1$s</string> + <string name="comp_default_live">%1$s अब उन सभी गेम को चलाता है जिन्होंने Steam में अपना Proton नहीं चुना है।</string> + <string name="comp_default_next">अगली बार Steam शुरू होने से, %1$s उन सभी गेम को चलाएगा जिन्होंने अपना Proton नहीं चुना है।</string> + <string name="comp_default_not_runnable">%1$s यहां गेम शुरू नहीं कर सकता, इसलिए यह डिफ़ॉल्ट नहीं हो सकता।</string> + <string name="comp_default_failed">डिफ़ॉल्ट Proton सेव नहीं हो सका: %1$s</string> + <string name="comp_swapped">%1$s · %2$d बदला गया</string> + <string name="comp_all_original">%1$s · सभी ओरिजिनल</string> + <string name="comp_game_running_suffix">%1$s · गेम चल रहा है</string> + <string name="comp_esync_pack">%1$s · droiddeck-esync पैक</string> + <string name="comp_esync_wanted">%1$s · अभी droiddeck-esync पैक नहीं है</string> + <string name="comp_esync_builtin">%1$s · esync पहले से मौजूद, पैक की ज़रूरत नहीं</string> + <string name="comp_gpu_drivers">GPU ड्राइवर</string> + <string name="comp_reapplied">%1$s · लॉन्च %2$s पर फिर से लागू हुआ</string> + <string name="comp_next_queued">आगे: %1$s · गेम बंद होने के बाद</string> + <string name="comp_in_use">उपयोग में %1$s: %2$s</string> + <string name="comp_waits">गेम बंद होने तक इंतज़ार करता है</string> + <string name="comp_applies_next_game">अगली बार गेम शुरू होने पर लागू होता है</string> + <string name="comp_import_zip">.zip इंपोर्ट करें</string> + <string name="comp_reading">Proton पढ़े जा रहे हैं…</string> + <string name="comp_no_proton">अभी कोई Proton इंस्टॉल नहीं है। इसका ARM64 Proton डाउनलोड करने के लिए Steam एक बार शुरू करें, या Setup से GE-Proton, CachyOS या DroidDeck-Proton जोड़ें।</string> + <string name="comp_original">ओरिजिनल · %1$s</string> + <string name="comp_this_build">%1$s · यह बिल्ड</string> + <string name="comp_earlier_build">%1$s · पहले का बिल्ड</string> + <string name="comp_installed_count">इंस्टॉल है · %1$d</string> + <string name="comp_nothing_stored">%1$s के लिए अभी कुछ सेव नहीं है। इस Proton की अपनी फ़ाइलें इसके ओरिजिनल के रूप में सेव हैं।</string> + <string name="comp_waits_long">इस Proton पर एक गेम चल रहा है, इसलिए यह बंद होने तक इंतज़ार करता है।</string> + <string name="comp_applies_long">अगली बार गेम शुरू होने पर लागू होता है।</string> + <string name="comp_swap_title">%1$s बदलें?</string> + <string name="comp_swap_body">%1$s को %2$s में डालें? इसकी ओरिजिनल फ़ाइलें सेव रहती हैं। %3$s</string> + <string name="comp_restore_title">%1$s वापस लाएं?</string> + <string name="comp_restore_body">%1$s का ओरिजिनल %2$s में वापस डालें? %3$s</string> + <string name="comp_delete_package_body">ऐप से पैकेज हटाता है। आप इसे फिर से डाउनलोड कर सकते हैं।</string> + <string name="comp_delete_original_title">यह ओरिजिनल हटाएं?</string> + <string name="comp_delete_original_body">यह %1$s ओरिजिनल %2$s के पहले वाले बिल्ड से है। मौजूदा बिल्ड का ओरिजिनल हमेशा रखा जाता है।</string> + <string name="comp_nightlies_count">Nightlies पर · %1$d</string> + <string name="comp_refresh_to_list">Nightlies के पैकेज सूचीबद्ध करने के लिए रीफ़्रेश करें।</string> + <string name="comp_nothing_new">पिछली जांच के बाद कुछ नया नहीं है।</string> + <string name="comp_import_wcp">.wcp इंपोर्ट करें</string> + <string name="comp_restore_original">इस Proton का ओरिजिनल वापस लाएं</string> + <string name="comp_restore_original_body">%1$s का ओरिजिनल %2$s वापस डालें?</string> + <string name="comp_swap">बदलें</string> + <string name="comp_about_text">हर उस Proton के लिए FEX, DXVK और VKD3D-Proton जिससे Steam गेम चलाता है।\n\nकिसी इंस्टॉल की गई पंक्ति को चुनकर उसे बदलें। यह अगली बार गेम शुरू होने पर, या चल रहा गेम बंद होने के बाद लागू होता है।\n\nआपके चुनाव हर लॉन्च से पहले फिर से जांचे जाते हैं और कुछ बदल गया हो तो वापस रखे जाते हैं। हर Proton की ओरिजिनल फ़ाइलें रखी जाती हैं, इसलिए Steam अपडेट से वे कभी नहीं खोती।</string> + <string name="comp_tag_original">ओरिजिनल</string> + <string name="comp_tag_in_use">उपयोग में</string> + <string name="comp_tag_new">नया</string> + <string name="comp_tag_stored">सेव है</string> + <string name="perf_title">परफ़ॉर्मेंस</string> + <string name="perf_lede">CPU कोर, सेशन फ़िक्स और होस्ट नाम। अगले सेशन से लागू होता है।</string> + <string name="perf_client_cores_group">Steam क्लाइंट कोर</string> + <string name="perf_override">Steam के कोर चुनाव को ओवरराइड करें</string> + <string name="perf_override_hint">Steam, उसके UI हेल्पर और gamescope को नीचे दिए कोर पर पिन करता है।</string> + <string name="perf_client_cores">क्लाइंट कोर</string> + <string name="perf_client_cores_on">Steam के लिए कोर।</string> + <string name="perf_client_cores_off">चुनने के लिए ओवरराइड चालू करें।</string> + <string name="perf_game_cores_group">गेम कोर</string> + <string name="perf_game_cores">गेम कोर</string> + <string name="perf_game_cores_hint">गेम के लिए कोर। सभी चुने होने पर, Android खुद शेड्यूल करता है।</string> + <string name="perf_client_ui">क्लाइंट इंटरफ़ेस</string> + <string name="perf_glthread">थ्रेडेड GL</string> + <string name="perf_glthread_hint">Steam मेनू को ज़्यादा रिस्पॉन्सिव बना सकता है।</string> + <string name="perf_zink">Zink: लेज़ी डिस्क्रिप्टर</string> + <string name="perf_zink_hint">डिस्क्रिप्टर बफ़र न रखने वाले ड्राइवर के लिए सुझाया गया।</string> + <string name="perf_noglerror">GL एरर जांच छोड़ें</string> + <string name="perf_noglerror_hint">हर कॉल पर होने वाली GL वैलिडेशन बंद करता है।</string> + <string name="perf_gsrealtime">gamescope: रीयलटाइम GPU क्यू</string> + <string name="perf_gsrealtime_hint">कम्पोज़िटर के GPU काम को प्राथमिकता देता है। गेम की कुछ कीमत पर फ़्रेम पेसिंग को स्मूथ कर सकता है।</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">GPU को उसकी टॉप क्लॉक पर बनाए रखें</string> + <string name="perf_gpuclock_hint">सिर्फ़ Adreno के लिए। कम हिचकोले, लेकिन ज़्यादा बैटरी खर्च और गर्मी।</string> + <string name="perf_fixes">सेशन फ़िक्स</string> + <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_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> + <string name="perf_esync_hint">गेम के Windows थ्रेड wineserver के राउंड ट्रिप के बजाय eventfd और शेयर्ड मेमोरी से एक-दूसरे का इंतज़ार करते हैं। उस खास Proton बिल्ड के लिए बने droiddeck-esync पैक का उपयोग करता है; पैक अपने आप मिल जाते हैं। किसी नए Proton बिल्ड के लिए पैक न होने तक droiddeck-fsync जगह लेता है। अगले सेशन से लागू होता है।</string> + <string name="perf_xalia_hint">Proton के गेमपैड नेविगेशन हेल्पर को बंद करता है, जो हर गेम में CPU खर्च करता है।</string> + <string name="perf_seccomp">proot को seccomp के बिना चलाएं</string> + <string name="perf_seccomp_hint">कुछ कर्नेल पर missing-syscall एरर ठीक कर सकता है। परफ़ॉर्मेंस घटा सकता है।</string> + <string name="perf_fastpath">proot फ़ास्ट पाथ</string> + <string name="perf_fastpath_needs_seccomp">proot के seccomp फ़िल्टर की ज़रूरत है।</string> + <string name="perf_fastpath_hint">तेज़ फ़ाइल लुकअप और कम अटकाव। अगर कोई प्रोग्राम अपनी फ़ाइलें न खोज पाए तो इसे बंद करें।</string> + <string name="perf_identity">सेशन पहचान</string> + <string name="perf_hostname">होस्ट नाम</string> + <string name="perf_hostname_hint">वह नाम जो Steam इस डिवाइस के लिए देखता है। खाली छोड़ने पर %1$s वापस आ जाता है।</string> + <string name="perf_hostname_invalid">सिर्फ़ अक्षर, अंक और बीच के हाइफ़न, 63 वर्णों तक।</string> + <string name="perf_phantom_warning">Android इस सेशन को बंद करने के लिए सेट है</string> + <string name="driver_installed">इंस्टॉल है</string> + <string name="driver_available">डाउनलोड के लिए उपलब्ध</string> + <string name="driver_nothing_new">पिछली जांच के बाद कुछ नया नहीं है।</string> + <string name="driver_restore_builtin">बिल्ट-इन ड्राइवर वापस लाएं</string> + <string name="driver_delete_builtin">ऐप में बिल्ट-इन: यह इसकी अनपैक की गई फ़ाइलें हटाता है और इसे छिपा देता है। बिल्ट-इन ड्राइवर वापस लाएं इसे फिर से वापस लाता है।</string> + <string name="driver_delete_bundle">Android + Linux बंडल का आधा हिस्सा: दोनों हिस्से हटाए जाते हैं। उपयोग में मौजूद ड्राइवर डिफ़ॉल्ट पर वापस चला जाता है।</string> + <string name="driver_delete_plain">इसकी फ़ाइलें ऐप से हटा दी जाती हैं।</string> + <string name="driver_delete_in_use">इसकी फ़ाइलें हटा दी जाती हैं। यह उपयोग में है, इसलिए डिफ़ॉल्ट इसकी जगह ले लेता है।</string> + <string name="drawer_page_display">डिस्प्ले</string> + <string name="drawer_page_effects">इफ़ेक्ट</string> + <string name="drawer_page_controls">कंट्रोल</string> + <string name="drawer_page_components">कॉम्पोनेंट</string> + <string name="drawer_page_controller">कंट्रोलर</string> + <string name="drawer_page_settings">सेटिंग</string> + <string name="drawer_page_desc">%1$s पेज</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">डेस्कटॉप</string> + <string name="drawer_steam_menu">Steam मेनू</string> + <string name="drawer_quick_access">Quick Access</string> + <string name="drawer_open_qam">Quick Access Menu खोलें</string> + <string name="drawer_prev_page">पिछला पेज</string> + <string name="drawer_next_page">अगला पेज</string> + <string name="drawer_hud">परफ़ॉर्मेंस HUD</string> + <string name="drawer_scaling">स्केलिंग मोड</string> + <string name="drawer_scaling_sharpness">स्केलिंग शार्पनेस</string> + <string name="drawer_effects">स्क्रीन इफ़ेक्ट</string> + <string name="drawer_effects_hint">लाइव। कोई इफ़ेक्ट चालू होने पर थोड़ा GPU समय लगता है।</string> + <string name="drawer_look">प्रीसेट</string> + <string name="drawer_look_custom">कस्टम</string> + <string name="drawer_effects_advanced">एडवांस्ड</string> + <string name="widgets_expanded">विस्तृत</string> + <string name="widgets_collapsed">संक्षिप्त</string> + <string name="drawer_cas">शार्पनिंग (CAS)</string> + <string name="drawer_cas_level">शार्पनिंग स्तर</string> + <string name="drawer_fake_hdr">फ़ेक HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">SteamVR शुरू करें</string> + <string name="steamvr_checking">SteamVR जाँचा जा रहा है…</string> + <string name="drawer_deband">डीबैंडिंग</string> + <string name="drawer_deband_strength">डीबैंडिंग तीव्रता</string> + <string name="drawer_brightness">ब्राइटनेस</string> + <string name="drawer_contrast">कंट्रास्ट</string> + <string name="drawer_gamma">गामा</string> + <string name="drawer_saturation">सैचुरेशन</string> + <string name="drawer_fxaa">FXAA (एज स्मूदिंग)</string> + <string name="drawer_toon">टून आउटलाइन</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">टेक्सचर फ़िल्टरिंग</string> + <string name="drawer_texture_hint">DirectX 9–11 गेम, उनके अगले लॉन्च से।</string> + <string name="drawer_anisotropy">एनिसोट्रॉपिक फ़िल्टरिंग</string> + <string name="drawer_texture_sharpness">टेक्सचर शार्पनेस</string> + <string name="drawer_texture_sharpness_note">एक नेगेटिव mip बायस: ज़्यादा शार्प टेक्सचर, कुछ शिमर। ऑटो उस हद से मेल खाता है जितना सेशन को स्क्रीन के लिए बड़ा किया गया है।</string> + <string name="drawer_touch_auto">ऑटो (%1$s)</string> + <string name="drawer_keyboard">कीबोर्ड</string> + <string name="drawer_latency">लेटेंसी</string> + <string name="drawer_low_latency_controller">कम लेटेंसी कंट्रोलर</string> + <string name="drawer_low_latency_controller_hint">कंट्रोलर 250 Hz के बजाय 1000 Hz पर रिपोर्ट करता है। थोड़ा ज़्यादा CPU।</string> + <string name="drawer_low_latency_touch">कम लेटेंसी टच</string> + <string name="drawer_low_latency_touch_hint">टच फ़्रेम बैचिंग छोड़ देते हैं, इसलिए Steam का टच कंट्रोल 1000 Hz पर चलता है। थोड़ा ज़्यादा CPU।</string> + <string name="drawer_pc_keyboard">पीसी कीबोर्ड</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">दूसरी स्क्रीन</string> + <string name="drawer_second_screen_mode">मोड</string> + <string name="drawer_second_screen_shows">दिखाता है</string> + <string name="drawer_android_apps">Android ऐप</string> + <string name="drawer_launch_app">ऐप लॉन्च करें</string> + <string name="common_hide">छिपाएं</string> + <string name="common_show">दिखाएं</string> + <string name="drawer_no_apps">लॉन्च करने लायक कोई ऐप नहीं</string> + <string name="drawer_session_behavior">सेशन व्यवहार</string> + <string name="drawer_suspend_hint">अभी और इस मोड के भविष्य के सेशन पर लागू होता है।</string> + <string name="drawer_next_session">अगला सेशन</string> + <string name="drawer_support">सपोर्ट</string> + <string name="drawer_logs">सेशन लॉग</string> + <string name="drawer_logs_hint">बग रिपोर्ट में जोड़ें</string> + <string name="drawer_share_logs">लॉग शेयर करें</string> + <string name="drawer_background">बैकग्राउंड</string> + <string name="drawer_stop">बंद करें</string> + <string name="drawer_stop_title">सेशन बंद करें?</string> + <string name="drawer_running_now">अभी चल रहा है</string> + <string name="drawer_no_game">किसी Proton पर कोई गेम नहीं चल रहा</string> + <string name="drawer_selected_profile">गेम प्रोफ़ाइल</string> + <string name="drawer_selected_profile_none">प्रोफ़ाइल जानकारी अभी उपलब्ध नहीं है।</string> + <string name="drawer_profile_refresh_failed_initial">गेम प्रोफ़ाइल लोड नहीं हो सकीं। अपने आप फिर कोशिश हो रही है।</string> + <string name="drawer_profile_refresh_failed_stale">गेम प्रोफ़ाइल रीफ़्रेश नहीं हो सकीं। आख़िरी उपलब्ध डेटा दिखाया जा रहा है; अपने आप फिर कोशिश हो रही है।</string> + <string name="drawer_profile_inspect_hint">अगले लॉन्च पर इस्तेमाल होने वाली सेव की गई सेटिंग देखें और बदलें।</string> + <string name="drawer_profile_default">डिफ़ॉल्ट प्रोफ़ाइल इस्तेमाल हो रही है</string> + <string name="drawer_profile_custom">कस्टम प्रोफ़ाइल</string> + <string name="drawer_component_inherited">डिफ़ॉल्ट प्रोफ़ाइल से %1$s इस्तेमाल हो रहा है।</string> + <string name="drawer_game_components_note">बदलाव %1$s की प्रोफ़ाइल में सेव होते हैं और अगली बार गेम लॉन्च होने पर लागू होते हैं।</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d गेम ओवरराइड</item> + <item quantity="other">%1$d गेम ओवरराइड</item> + </plurals> + <string name="drawer_no_proton">अभी कोई Proton इंस्टॉल नहीं है।</string> + <string name="drawer_game_running">गेम चल रहा है</string> + <string name="drawer_reapplied">लॉन्च %1$s पर फिर से लागू हुआ</string> + <string name="drawer_original">ओरिजिनल</string> + <string name="drawer_components_note">Components पेज पर इंपोर्ट और डिलीट करें।</string> + <string name="setup_check_done">पूरा हुआ</string> + <string name="setup_check_warn">ध्यान देने की ज़रूरत</string> + <string name="setup_check_busy">काम हो रहा है</string> + <string name="setup_limit_adb_failed">वायरलेस डीबगिंग का IP एड्रेस और पोर्ट जांचें, या अगर Android ने इस डिवाइस को हटा दिया है तो फिर से पेयर करें।</string> + <string name="setup_install">इंस्टॉल करें</string> + <string name="setup_manage">मैनेज करें</string> + <string name="setup_tab_overview">ओवरव्यू</string> + <string name="setup_tab_controller">कंट्रोलर</string> + <string name="setup_tab_session">सेशन</string> + <string name="setup_tab_launcher">लॉन्चर</string> + <string name="setup_title">सेटअप</string> + <string name="setup_all_set">● सब तैयार</string> + <string name="setup_n_ready">%2$d में से %1$d तैयार</string> + <string name="setup_system_check">सिस्टम जांच</string> + <string name="setup_gpu_supported">डिवाइस समर्थित</string> + <string name="setup_gpu_untested">अनटेस्टेड GPU</string> + <string name="setup_gpu_unsupported">GPU समर्थित नहीं</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam को Adreno ड्राइवर चाहिए; %1$s में काली स्क्रीन दिख सकती है</string> + <string name="setup_runtime">Linux रनटाइम</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">इंस्टॉल नहीं है · लगभग 3 GB, पहली बार Play पर इंस्टॉल होगा</string> + <string name="setup_installed">इंस्टॉल है</string> + <string name="setup_runtime_update">%1$s · अपडेट उपलब्ध</string> + <string name="setup_runtime_current">%1$s · नवीनतम</string> + <string name="setup_limit">चाइल्ड-प्रोसेस सीमा</string> + <string name="setup_limit_on">चालू · Android Steam बंद कर सकता है। इसे बंद करने में एक मिनट लगता है।</string> + <string name="setup_limit_unset">सेट नहीं · Android Steam बंद कर सकता है। इसे बंद करने में एक मिनट लगता है।</string> + <string name="setup_limit_unknown">जांचा नहीं जा सका · इसे बंद करने में एक मिनट लगता है।</string> + <string name="setup_fix_it">ठीक करें</string> + <string name="setup_details">जानकारी</string> + <string name="setup_dev_options">डेवलपर विकल्प</string> + <string name="setup_use_wireless">वायरलेस डीबगिंग इस्तेमाल करें</string> + <string name="setup_check_again">फिर से जांचें</string> + <string name="setup_limit_turn_on">सीमा चालू करें</string> + <string name="setup_account">Steam खाता</string> + <string name="setup_signed_in_offline">%1$s के रूप में साइन इन · ऑफ़लाइन मोड</string> + <string name="setup_signed_in">%1$s के रूप में साइन इन</string> + <string name="setup_sign_in">Play दबाएं और Steam में साइन इन करें</string> + <string name="setup_tools">टूल</string> + <string name="setup_controller">कंट्रोलर</string> + <string name="setup_controller_unavailable">कंट्रोलर सेटिंग उपलब्ध नहीं हैं।</string> + <string name="setup_session">सेशन</string> + <string name="setup_logs">सेशन लॉग</string> + <string name="setup_logs_hint">हर सेशन के बाद सेव होता है</string> + <string name="setup_agent_commands">डिबगिंग टूल</string> + <string name="setup_latest_logs">नवीनतम सेशन लॉग</string> + <string name="setup_saved_logs">सेव किए सेशन लॉग</string> + <string name="setup_saved_logs_hint">सबसे नए %1$d रखता है</string> + <string name="setup_clear_logs">लॉग हटाएं</string> + <string name="setup_reset_settings">सभी सेटिंग रीसेट करें</string> + <string name="setup_reset_settings_hint">हर सेटिंग को डिफ़ॉल्ट मान पर लौटाएँ</string> + <string name="setup_reset_settings_button">रीसेट करें</string> + <string name="setup_reset_settings_title">सभी सेटिंग रीसेट करें?</string> + <string name="setup_reset_settings_body">डिस्प्ले, परफ़ॉर्मेंस, कंट्रोलर, थीम, भाषा और लॉन्चर की सेटिंग डिफ़ॉल्ट पर लौट जाएँगी। आपके गेम, Steam लॉगिन, स्टोर खाते, डाउनलोड किए गए ड्राइवर और स्टोरेज फ़ोल्डर बने रहेंगे।</string> + <string name="setup_reset_settings_profiles">गेम प्रोफ़ाइल भी रीसेट करें (हर गेम के लिए Proton, FEX, कॉम्पोनेंट और रनटाइम एनवायरनमेंट, और डिफ़ॉल्ट प्रोफ़ाइल का एनवायरनमेंट)</string> + <string name="setup_reset_settings_session_running">सेटिंग रीसेट करने से पहले सेशन रोकें।</string> + <string name="setup_reset_settings_partial">सेटिंग रीसेट हुईं, पर सभी नहीं। विवरण लॉग में हैं।</string> + <string name="setup_offline">ऑफ़लाइन मोड</string> + <string name="setup_sign_in_first">पहले Steam में साइन इन करें</string> + <string name="setup_launcher">लॉन्चर</string> + <string name="setup_language">भाषा</string> + <string name="setup_language_hint">अगली बार शुरू होने पर Steam भी इसे इस्तेमाल करता है।</string> + <string name="setup_language_system">सिस्टम डिफ़ॉल्ट (%1$s)</string> + <string name="setup_language_system_short">सिस्टम डिफ़ॉल्ट</string> + <string name="setup_app_scale">ऐप स्केल</string> + <string name="setup_app_scale_hint">DroidDeck टेक्स्ट और कंट्रोल</string> + <string name="setup_app_scale_default">%1$d%% (डिफ़ॉल्ट)</string> + <string name="setup_theme">थीम</string> + <string name="setup_theme_hint">लॉन्चर की दिखावट</string> + <string name="setup_home">होम स्क्रीन के तौर पर इस्तेमाल करें</string> + <string name="setup_home_on">DroidDeck होम ऐप हो सकता है</string> + <string name="setup_home_off">DroidDeck को होम ऐप के तौर पर कभी नहीं दिखाया जाता</string> + <string name="setup_orientation">ओरिएंटेशन</string> + <string name="setup_orientation_auto">ऑटोमैटिक लैंडस्केप</string> + <string name="setup_orientation_landscape">लैंडस्केप</string> + <string name="setup_orientation_reverse">उलटा लैंडस्केप</string> + <string name="setup_fullscreen">फ़ुलस्क्रीन</string> + <string name="setup_fullscreen_on">Android स्टेटस और नेविगेशन बार छिपाता है</string> + <string name="setup_fullscreen_off">Android स्टेटस और नेविगेशन बार दिखाता है</string> + <string name="setup_default_home">डिफ़ॉल्ट होम ऐप</string> + <string name="setup_choose_home">होम ऐप चुनें</string> + <string name="setup_choose">चुनें</string> + <string name="setup_linux_apps">Linux ऐप (बीटा)</string> + <string name="setup_tool_files">फ़ाइलें</string> + <string name="setup_tool_files_hint">फ़ाइलें ब्राउज़ और मैनेज करें</string> + <string name="setup_tool_protons">Proton वर्शन</string> + <string name="setup_tool_protons_hint">ARM64 Proton बिल्ड इंस्टॉल करें</string> + <string name="setup_tool_performance">परफ़ॉर्मेंस</string> + <string name="setup_tool_performance_hint">CPU कोर असाइनमेंट</string> + <string name="setup_tool_roms">ROM फ़ोल्डर</string> + <string name="setup_tool_roms_hint">एमुलेटर गेम जहां रखे जाते हैं</string> + <string name="setup_card_components">कॉम्पोनेंट</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">कंट्रोल</string> + <string name="setup_card_controls_hint">बटन मैपिंग</string> + <string name="store_tab_discover">खोजें</string> + <string name="store_tab_search">सर्च</string> + <string name="store_tab_installed">इंस्टॉल किए</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">स्टोर</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak तैयार</string> + <string name="store_needs_runtime">पहले सेटअप से Linux रनटाइम इंस्टॉल करें।</string> + <string name="store_setup_title">Flatpak सेट करें</string> + <string name="store_setup_text">Flatpak जोड़ता है और इसे Flathub से जोड़ता है (लगभग 20 MB)। पहला ऐप अपना रनटाइम भी डाउनलोड करता है।</string> + <string name="store_setting_up">सेट हो रहा है…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">अपडेट</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">शुरू हो रहा है…</string> + <string name="store_categories">कैटेगरी</string> + <string name="store_unreachable">Flathub तक नहीं पहुंच सका। अपना कनेक्शन जांचें और फिर कोशिश करें।</string> + <string name="store_try_again">फिर कोशिश करें</string> + <string name="store_search_label">Flathub में सर्च करें</string> + <string name="store_search_placeholder">Firefox, गेम, एमुलेटर…</string> + <string name="store_search">सर्च</string> + <string name="store_all">सभी</string> + <string name="store_searching">सर्च हो रहा है…</string> + <string name="store_search_hint">नाम से सर्च करें या कोई कैटेगरी चुनें। सिर्फ़ ARM64 ऐप सूचीबद्ध हैं।</string> + <string name="store_no_results">Flathub पर इससे मेल खाने वाला कोई ARM64 ऐप नहीं है।</string> + <string name="store_results">नतीजे</string> + <string name="store_check_updates">अपडेट देखें</string> + <string name="store_update_all">सभी अपडेट करें (%1$d)</string> + <string name="store_all_current">● सब कुछ नवीनतम है</string> + <string name="store_no_apps">अभी कोई ऐप नहीं है। खोजें या सर्च में देखें।</string> + <string name="store_setup_first_note">ऐप इंस्टॉल करने के लिए Flatpak सेट करें।</string> + <string name="store_update_available_prefix">अपडेट उपलब्ध · %1$s</string> + <string name="store_open">खोलें</string> + <string name="store_details">जानकारी</string> + <string name="store_remove">हटाएं</string> + <string name="store_press_again">हटाने के लिए फिर से दबाएं</string> + <string name="store_installing">इंस्टॉल हो रहा है…</string> + <string name="store_install">इंस्टॉल करें</string> + <string name="store_setup_first">पहले Flatpak सेट करें</string> + <string name="store_download_size">%1$s डाउनलोड</string> + <string name="store_installed_chip">● इंस्टॉल है</string> + <string name="store_details_failed">इस ऐप का Flathub पेज लोड नहीं हो सका।</string> + <string name="store_loading">Flathub से लोड हो रहा है…</string> + <string name="store_no_arm">Flathub पर कोई ARM64 बिल्ड नहीं है, इसलिए इसे यहां इंस्टॉल नहीं किया जा सकता।</string> + <string name="store_screenshots">स्क्रीनशॉट</string> + <string name="store_about">परिचय</string> + <string name="store_app_id">ऐप ID</string> + <string name="store_license">लाइसेंस</string> + <string name="store_runtime">रनटाइम</string> + <string name="store_installed_size">इंस्टॉल आकार</string> + <string name="store_installed_size_value">%1$s (साथ में इसका शेयर्ड रनटाइम)</string> + <string name="store_website">वेबसाइट</string> + <string name="store_verified">वेरिफ़ाइड</string> + <string name="upd_title">अपडेट</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">%1$s को जांचा गया</string> + <string name="upd_not_checked">अभी जांचा नहीं गया</string> + <string name="upd_perm_title">DroidDeck को खुद अपडेट होने दें</string> + <string name="upd_perm_text">अगली स्क्रीन पर, “इस सोर्स से अनुमति दें” चालू करें, फिर वापस आएं। अपडेट खुद जारी रहेगा।</string> + <string name="upd_open_settings">सेटिंग खोलें</string> + <string name="upd_not_now">अभी नहीं</string> + <string name="upd_signed_status">अलग तरीके से साइन किया गया</string> + <string name="upd_signed_headline">यहीं अपडेट नहीं हो सकता</string> + <string name="upd_signed_detail">यह कॉपी DroidDeck की रिलीज़ कुंजी से साइन नहीं है, इसलिए अपडेट इसके ऊपर इंस्टॉल नहीं हो सकते। बदलने के लिए इसे अनइंस्टॉल करें।</string> + <string name="upd_available">अपडेट उपलब्ध</string> + <string name="upd_blocked_status">इंस्टॉल नहीं हो सकता</string> + <string name="upd_switch">बदलने के लिए तैयार</string> + <string name="upd_ahead_status">स्टेबल से आगे</string> + <string name="upd_ahead_headline">आप स्टेबल से आगे हैं</string> + <string name="upd_ahead_detail">यह बिल्ड नवीनतम स्टेबल से नया है। इसके अगले रिलीज़ के साथ आप स्टेबल पर चले जाएंगे।</string> + <string name="upd_gone_status">टेस्ट खत्म हुआ</string> + <string name="upd_gone_headline">यह टेस्ट खत्म हो गया है</string> + <string name="upd_gone_detail">इसका फ़िक्स मर्ज हो गया या हटा दिया गया। नवीनतम फ़िक्स के लिए प्रीव्यू फ़ॉलो करें।</string> + <string name="upd_current_status">नवीनतम</string> + <string name="upd_current_headline">आपके पास नवीनतम %1$s है</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">अपडेट%1$s</string> + <string name="upd_install_button">इंस्टॉल%1$s</string> + <string name="upd_install_anyway">फिर भी स्टेबल %1$s इंस्टॉल करें</string> + <string name="upd_follow_preview">प्रीव्यू फ़ॉलो करें</string> + <string name="upd_stop_session">अपडेट करने के लिए चल रहा सेशन बंद करें।</string> + <string name="upd_less">कम</string> + <string name="upd_more">ज़्यादा</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">नया प्रीव्यू बिल्ड</string> + <string name="upd_new_test">PR #%1$d टेस्ट बिल्ड</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">अपडेट चैनल</string> + <string name="upd_stable">स्टेबल</string> + <string name="upd_stable_hint">जांचे गए रिलीज़, ज़्यादातर लोगों के लिए</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">प्रीव्यू</string> + <string name="upd_preview_hint">नवीनतम फ़िक्स, स्टेबल से पहले</string> + <string name="upd_preview_current">नवीनतम</string> + <string name="upd_tests">टेस्ट बिल्ड</string> + <string name="upd_tests_hint">रिलीज़ होने से पहले किसी फ़िक्स को आज़माएं</string> + <string name="upd_tests_none">अभी कोई नहीं</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">DroidDeck की इस कॉपी के लिए नहीं बना</string> + <string name="upd_updated">%1$s को अपडेट किया गया</string> + <string name="upd_test_name">PR #%1$d टेस्ट</string> + <string name="upd_while_ago">कुछ समय पहले</string> + <string name="upd_just_now">अभी-अभी</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d आज़माने के लिए</item> + <item quantity="other">%1$d आज़माने के लिए</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">आपके बिल्ड के बाद से बदलाव · %1$d बिल्ड पीछे</item> + <item quantity="other">आपके बिल्ड के बाद से बदलाव · %1$d बिल्ड पीछे</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">नए बदलाव · %1$d बिल्ड</item> + <item quantity="other">नए बदलाव · %1$d बिल्ड</item> + </plurals> + <string name="gate_title">बदलने के लिए एक Android सेटिंग</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android उन ऐप को रोकता है जो कई बैकग्राउंड प्रोसेस शुरू करते हैं, और Steam दर्जनों शुरू करता है। जब तक यह नहीं बदलता, गेम बिना किसी एरर के बंद हो जाते हैं।</string> + <string name="gate_fix_for_me">मेरे लिए ठीक करें</string> + <string name="gate_toggle_steps">“चाइल्ड प्रोसेस से जुड़ी पाबंदियां हटाएं” चालू करें, फिर वापस आएं। डेवलपर विकल्प चालू रहने दें, नहीं तो यह स्विच फिर से बंद हो जाएगा।</string> + <string name="gate_open_dev">डेवलपर विकल्प खोलें</string> + <string name="gate_no_toggle">इस Android वर्शन में इसके लिए कोई स्विच नहीं है, इसलिए DroidDeck इसे वायरलेस डीबगिंग के ज़रिए बदलता है। इसमें लगभग एक मिनट लगता है, किसी कंप्यूटर की ज़रूरत नहीं।</string> + <string name="gate_needs_wifi">वायरलेस डीबगिंग के लिए Wi-Fi चाहिए। कोई भी नेटवर्क काम करेगा; इंटरनेट की ज़रूरत नहीं है।</string> + <string name="gate_needs_notifications">पेयरिंग कोड एक नोटिफ़िकेशन में आता है। DroidDeck के लिए नोटिफ़िकेशन की अनुमति दें, या अन्य तरीके इस्तेमाल करें।</string> + <string name="gate_allow_notifications">नोटिफ़िकेशन की अनुमति दें</string> + <string name="gate_step1">Settings → डेवलपर विकल्प → वायरलेस डीबगिंग खोलें और उसे चालू करें</string> + <string name="gate_step2">“Pair device with pairing code” पर टैप करें</string> + <string name="gate_step3">DroidDeck नोटिफ़िकेशन में कोड टाइप करें</string> + <string name="gate_waiting">पेयरिंग पॉप-अप का इंतज़ार हो रहा है…</string> + <string name="gate_code_needed">पॉप-अप मिल गया। इसका कोड नोटिफ़िकेशन में डालें।</string> + <string name="gate_status">स्थिति</string> + <string name="gate_polling">हर 2 सेकंड में जांच हो रही है। यह बंद होने पर यह पेज बंद हो जाता है।</string> + <string name="gate_other_ways">अन्य तरीके</string> + <string name="gate_other_toggle">वायरलेस डीबगिंग, मैनुअल एड्रेस, कंप्यूटर ADB</string> + <string name="gate_other_no_toggle">मैनुअल एड्रेस, कंप्यूटर ADB, डेवलपर विकल्प</string> + <string name="gate_use_wireless_instead">इसके बदले वायरलेस डीबगिंग इस्तेमाल करें</string> + <string name="gate_some_roms">कुछ ROM फिर भी यह स्विच जोड़ देते हैं। डेवलपर विकल्प में “child process” देखें।</string> + <string name="gate_manual_hint">अगर नोटिफ़िकेशन काम न करे, तो पॉप-अप का एड्रेस और कोड खुद डालें।</string> + <string name="gate_enter_manually">एड्रेस खुद डालें</string> + <string name="gate_from_computer">ADB वाले कंप्यूटर से:</string> + <string name="gate_copy_command">कमांड कॉपी करें</string> + <string name="gate_choose_display">Android Settings किस डिस्प्ले पर खोलना है चुनें।</string> + <string name="gate_main_screen">मुख्य स्क्रीन</string> + <string name="wadb_finding_port">पेयर हो गया। वायरलेस डीबगिंग का पोर्ट खोजा जा रहा है…</string> + <string name="wadb_enter_port">पेयर हो गया। Settings से पोर्ट डालें।</string> + <string name="wadb_applying">डिवाइस मिल गया। सेटिंग लागू की जा रही है…</string> + <string name="wadb_apply_failed">खुद लागू नहीं हो सका। नीचे दिया एड्रेस जांचें और फिर कोशिश करें। %1$s</string> + <string name="wadb_title_wireless">वायरलेस डीबगिंग</string> + <string name="wadb_title_done">चाइल्ड-प्रोसेस सीमा अपडेट हुई</string> + <string name="wadb_title">चाइल्ड-प्रोसेस सीमा बदलें</string> + <string name="wadb_lede_compact0">अगर यह विकल्प न हो, तो वायरलेस डीबगिंग से पेयर करें।</string> + <string name="wadb_lede_compact1">पेयर हो गया। वायरलेस डीबगिंग में IP एड्रेस और पोर्ट जांचें।</string> + <string name="wadb_lede_done">चाइल्ड-प्रोसेस सीमा अपडेट हो गई।</string> + <string name="wadb_lede0">अगर डेवलपर विकल्प में चाइल्ड-प्रोसेस सेटिंग न हो तो स्टेप 2 इस्तेमाल करें। डेवलपर विकल्प → वायरलेस डीबगिंग → Pair device with pairing code खोलें।</string> + <string name="wadb_lede1">पेयर हो गया। नीचे दिया एड्रेस इस्तेमाल करें, या इसे वायरलेस डीबगिंग → IP address & Port से अपडेट करें।</string> + <string name="wadb_lede_done_long">चाइल्ड-प्रोसेस सीमा वायरलेस डीबगिंग के ज़रिए अपडेट हो गई।</string> + <string name="wadb_confirmed_on">Android ने पुष्टि की कि सीमा चालू है।</string> + <string name="wadb_confirmed_off">Android ने पुष्टि की कि सीमा बंद है।</string> + <string name="wadb_pair_group">2 · वायरलेस डीबगिंग पेयर करें</string> + <string name="wadb_pair_address">पेयरिंग पॉप-अप का IP एड्रेस और पोर्ट</string> + <string name="wadb_pin">पेयरिंग कोड (PIN)</string> + <string name="wadb_pin_placeholder">6 अंक</string> + <string name="wadb_pair">पेयर करें</string> + <string name="wadb_apply_group">2 · वायरलेस डीबगिंग के ज़रिए लागू करें</string> + <string name="wadb_connect_address">कनेक्शन का IP एड्रेस और पोर्ट</string> + <string name="wadb_pair_again">फिर से पेयर करें</string> + <string name="wadb_turn_off">सीमा बंद करें</string> + <string name="wadb_other_ways">इसे बदलने के अन्य तरीके</string> + <string name="wadb_dev_try_first">1 · डेवलपर विकल्प (पहले आज़माएं)</string> + <string name="wadb_restrict_on">“चाइल्ड प्रोसेस से जुड़ी पाबंदियां हटाएं” बंद करें।</string> + <string name="wadb_restrict_off">“चाइल्ड प्रोसेस से जुड़ी पाबंदियां हटाएं” चालू करें।</string> + <string name="wadb_computer_last">3 · कंप्यूटर ADB (आख़िरी विकल्प)</string> + <string name="wadb_only_if">सिर्फ़ तब जब वायरलेस डीबगिंग उपलब्ध न हो।</string> + <string name="wadb_computer_group">3 · कंप्यूटर ADB (आख़िरी विकल्प)</string> + <string name="ctrl_osc_hint">सेशन में टच कंट्रोल कब दिखते हैं</string> + <string name="ctrl_color">रंग</string> + <string name="ctrl_color_hint">ऑन-स्क्रीन बटन का रंग</string> + <string name="ctrl_custom">कस्टम</string> + <string name="ctrl_opacity">ओपैसिटी</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">बटन का आकार</string> + <string name="ctrl_size_hint" formatted="false">100% मानक आकार है</string> + <string name="ctrl_stick_click">स्टिक क्लिक</string> + <string name="ctrl_stick_click_hint">L3 या R3 के लिए किसी स्टिक को डबल-टैप करके दबाए रखें</string> + <string name="ctrl_adaptive">एडैप्टिव स्टिक</string> + <string name="ctrl_rumble">गेम वाइब्रेशन</string> + <string name="ctrl_steam_button">Steam बटन</string> + <string name="ctrl_qam_button">QAM बटन</string> + <string name="ctrl_keyboard_button">कीबोर्ड बटन</string> + <string name="ctrl_select_steam">Steam मेनू खोलने के लिए Select दबाएं</string> + <string name="ctrl_select_steam_hint">View/Select के बदले।</string> + <string name="ctrl_joycon_vr">Joy-Con को VR कंट्रोलर की तरह</string> + <string name="ctrl_joycon_vr_hint">SteamVR चलते समय हर Joy-Con एक हाथ बन जाता है। उसे सामने की ओर करें और फिर से केंद्रित करने के लिए Home या Capture दबाए रखें।</string> + <string name="setup_animations">एनिमेशन</string> + <string name="ctrl_adaptive_hint">आप जहां टच करें वहां स्टिक दिखते हैं और छोड़ने पर छिप जाते हैं</string> + <string name="ctrl_layout">लेआउट</string> + <string name="ctrl_layout_custom">कस्टम पोज़िशन सेव हैं</string> + <string name="ctrl_layout_default">इस स्क्रीन के हिसाब से फ़िट किया गया</string> + <string name="ctrl_edit">संपादित करें</string> + <string name="ctrl_reset">रीसेट करें</string> + <string name="ctrl_mapping">बटन मैपिंग</string> + <string name="ctrl_mapping_default">हर बटन अपना इनपुट भेजता है</string> + <string name="ctrl_mapping_count">%2$d में से %1$d बटन रीमैप किए गए</string> + <string name="ctrl_configure">कॉन्फ़िगर करें</string> + <string name="ctrl_reset_all">कंट्रोलर रीसेट करें</string> + <string name="ctrl_reset_all_hint">सभी कंट्रोलर सेटिंग और लेआउट वापस लाता है</string> + <string name="ctrl_mapping_lede">हर ऑन-स्क्रीन बटन गेम को क्या भेजता है। Hidden बटन हटा देता है।</string> + <string name="ctrl_onscreen_buttons">ऑन-स्क्रीन बटन</string> + <string name="ctrl_defaults">डिफ़ॉल्ट</string> + <string name="ctrl_reset_mapping">मैपिंग रीसेट करें</string> + <string name="content_android_apps">Android ऐप</string> + <string name="content_apps_count">%1$d ऐप</string> + <string name="content_no_android_apps">लॉन्च करने लायक कोई Android ऐप नहीं मिला।</string> + <string name="content_desktop_installed">● डेस्कटॉप इंस्टॉल है</string> + <string name="content_desktop_first_open">पहली बार खोलने पर इंस्टॉल होता है</string> + <string name="content_available">इंस्टॉल के लिए उपलब्ध</string> + <string name="content_not_installed">इंस्टॉल नहीं है।</string> + <string name="content_not_installed_suffix">%1$s · इंस्टॉल नहीं है</string> + <string name="content_open_named">%1$s खोलें</string> + <string name="content_games">गेम</string> + <string name="content_choose_roms">ROM फ़ोल्डर चुनें।</string> + <string name="content_retroarch_roms">RetroArch में /root/ROMs तक ब्राउज़ करें।</string> + <string name="content_add_roms">%1$s गेम ROMs/%2$s में जोड़ें।</string> + <string name="content_install_named">%1$s इंस्टॉल करें</string> + <string name="content_stop_to_install">इंस्टॉल करने के लिए सेशन बंद करें</string> + <string name="content_runtime_required">रनटाइम ज़रूरी</string> + <string name="content_loading_details">इंस्टॉल जानकारी लोड हो रही है…</string> + <string name="content_details_unavailable">इंस्टॉल जानकारी उपलब्ध नहीं है। बाद में फिर कोशिश करें।</string> + <string name="content_needs_runtime">पहले सेटअप से Linux रनटाइम इंस्टॉल करें।</string> + <string name="content_stop_first">डेस्कटॉप ऐप इंस्टॉल करने के लिए चल रहा सेशन बंद करें।</string> + <string name="content_install_into">%1$s को Linux डेस्कटॉप में इंस्टॉल करता है।</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">छिपाने से यह डेस्कटॉप से हट जाता है। इसकी फ़ाइलें Linux रनटाइम में रहती हैं।</string> + <string name="content_rom_gone">वह गेम अब ROM फ़ोल्डर में नहीं है।</string> + <string name="content_desktop_system">डेस्कटॉप · %1$s</string> + <string name="content_launch_in">%1$s में लॉन्च करें</string> + <string name="content_also_in">%1$s में भी</string> + <string name="content_page_gone">वह पेज अब नहीं है। बाईं तरफ़ से कोई सेक्शन चुनें।</string> + <string name="content_open_desktop">डेस्कटॉप खोलें</string> + <string name="content_install_open_desktop">डेस्कटॉप इंस्टॉल करें और खोलें</string> + <string name="desktop_remove_title">डेस्कटॉप अनइंस्टॉल करें</string> + <string name="desktop_remove_text">डेस्कटॉप और इसके साथ आए ऐप हटाएं। गेम, जोड़े गए ऐप, सेटिंग और शेयर्ड लाइब्रेरी बनी रहेंगी।</string> + <string name="desktop_removing">डेस्कटॉप हटाया जा रहा है</string> + <string name="desktop_removed">डेस्कटॉप हटा दिया गया</string> + <string name="desktop_cleaning_legacy">पुरानी LXQt फ़ाइलें हटाई जा रही हैं</string> + <string name="desktop_removal_unknown">इस डेस्कटॉप वर्शन को हटाने से पहले DroidDeck अपडेट करें।</string> + <string name="content_linux_desktop">Linux डेस्कटॉप</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox और आपके एमुलेटर</string> + <string name="games_empty">Steam में इंस्टॉल किए गेम सेशन के बाद यहां दिखते हैं।</string> + <string name="games_play_steam">Steam चलाएं</string> + <string name="games_play_steamvr">SteamVR चलाएं</string> + <string name="games_launch_settings">लॉन्च सेटिंग</string> + <string name="games_launch">लॉन्च करें</string> + <string name="games_files">गेम फ़ाइलें</string> + <string name="games_prefix">Proton प्रीफ़िक्स</string> + <string name="games_saves_looking">सेव खोजे जा रहे हैं…</string> + <string name="games_saves_none">नाम से कोई सेव फ़ोल्डर नहीं मिला। एक्सपोर्ट पूरा यूज़र फ़ोल्डर लेता है।</string> + <string name="games_saves_folders">%1$d सेव फ़ोल्डर</string> + <string name="games_saves_summary">%1$s · %2$d फ़ाइलें · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">सेव मैनेज करें</string> + <string name="games_saves">गेम सेव</string> + <string name="games_import_saves">सेव इंपोर्ट करें…</string> + <string name="games_export_gamehub">GameHub zip के रूप में एक्सपोर्ट करें…</string> + <string name="games_export_winlator">Winlator zip के रूप में एक्सपोर्ट करें…</string> + <string name="games_open_save_folder">सेव फ़ोल्डर खोलें</string> + <string name="games_never_played">कभी नहीं खेला</string> + <string name="games_runtime_busy_percent">रनटाइम व्यस्त · %1$d%%</string> + <string name="games_runtime_busy">रनटाइम व्यस्त</string> + <string name="games_runtime_first_play">पहली बार Play पर रनटाइम इंस्टॉल होता है</string> + <string name="games_runtime_update">रनटाइम अपडेट उपलब्ध</string> + <string name="games_runtime_ready">● रनटाइम तैयार</string> + <string name="games_last_played">आख़िरी बार %1$s को खेला</string> + <string name="games_internal">इंटरनल स्टोरेज</string> + <string name="games_added">जोड़ा गया गेम</string> + <string name="games_custom">कस्टम गेम</string> + <string name="games_store_storage">गेम स्टोरेज</string> + <string name="gpu_auto_hint">इस GPU के लिए सबसे बेहतर जोड़ी, हमेशा नवीनतम</string> + <string name="gpu_manual_hint">खुद एक जोड़ी चुनें</string> + <string name="gpu_checking">ड्राइवर देखे जा रहे हैं…</string> + <string name="gpu_none_listed">अभी कोई ड्राइवर सूचीबद्ध नहीं है। उन्हें देखने के लिए रीफ़्रेश करें।</string> + <string name="gpu_hide_other">दूसरे GPU के ड्राइवर छिपाएं</string> + <string name="gpu_show_other">दूसरे GPU के ड्राइवर दिखाएं</string> + <string name="gpu_advanced">एडवांस्ड</string> + <string name="gpu_set_with_display">डिस्प्ले ड्राइवर के साथ सेट: %1$s दोनों साथ लाता है।</string> + <string name="gpu_set_with_runtime">रनटाइम ड्राइवर के साथ सेट: %1$s दोनों साथ लाता है।</string> + <string name="gpu_runtime_hint">गेम और डेस्कटॉप में उपयोग होता है।</string> + <string name="gpu_runtime_default">रनटाइम डिफ़ॉल्ट</string> + <string name="gpu_auto_by_gpu">ऑटो - GPU के हिसाब से चुना गया</string> + <string name="gpu_manage">डाउनलोड, इंपोर्ट या डिलीट करें…</string> + <string name="gpu_in_use_caps">उपयोग में</string> + <string name="gpu_builtin">DroidDeck में बिल्ट-इन ड्राइवर</string> + <string name="gpu_matched_pair">रनटाइम और डिस्प्ले ड्राइवर एक साथ मिलती-जुलती जोड़ी के रूप में सेट हैं।</string> + <string name="gpu_recommended_for">इस GPU के लिए सुझाया गया: %1$s।</string> + <string name="gpu_refresh_hint">इस GPU के लिए ड्राइवर देखने के लिए रीफ़्रेश करें।</string> + <string name="gpu_recommended_caps">सुझाया गया</string> + <string name="gpu_unavailable">उपलब्ध नहीं</string> + <string name="load_runtime">Linux रनटाइम</string> + <string name="load_runtime_detail">Linux रनटाइम तैयार किया जा रहा है</string> + <string name="load_session">सेशन</string> + <string name="load_session_detail">डिस्प्ले और ऑडियो शुरू किया जा रहा है</string> + <string name="load_steam">Steam क्लाइंट</string> + <string name="load_steam_detail">Steam और उसके कम्पैटिबिलिटी टूल जांचे जा रहे हैं</string> + <string name="load_opening_steam">Steam खोला जा रहा है</string> + <string name="load_opening_steam_detail">Steam के पहले फ़्रेम का इंतज़ार हो रहा है</string> + <string name="load_desktop">डेस्कटॉप</string> + <string name="load_desktop_detail">डेस्कटॉप तैयार किया जा रहा है</string> + <string name="load_opening">खोला जा रहा है</string> + <string name="load_opening_detail">पहले फ़्रेम का इंतज़ार हो रहा है</string> + <string name="load_starting_steam">Steam शुरू हो रहा है</string> + <string name="load_ended">सेशन खत्म हो गया</string> + <string name="load_step">स्टेप %2$d में से %1$d</string> + <string name="load_steam_paused">Steam रुका हुआ है</string> + <string name="deck_tab_grips">ग्रिप</string> + <string name="deck_tab_left">बायां पैड</string> + <string name="deck_tab_right">दायां पैड</string> + <string name="deck_tab_both">दोनों</string> + <string name="deck_tab_gamepad">गेमपैड</string> + <string name="deck_surface_stick">स्टिक</string> + <string name="deck_surface_trackpad">ट्रैकपैड</string> + <string name="deck_surface_switch">स्टिक और ट्रैकपैड के बीच बदलें</string> + <string name="deck_more_controls">और Deck कंट्रोल</string> + <string name="deck_panels">पैनल</string> + <string name="deck_close">दूसरी स्क्रीन के कंट्रोल बंद करें</string> + <string name="deck_open_steam_menu">Steam मेनू खोलें</string> + <string name="deck_left_upper">बायां · ऊपर</string> + <string name="deck_left_lower">बायां · नीचे</string> + <string name="deck_right_upper">दायां · ऊपर</string> + <string name="deck_right_lower">दायां · नीचे</string> + <string name="deck_click">क्लिक</string> + <string name="deck_right_trackpad">दायां ट्रैकपैड</string> + <string name="deck_left_trackpad">बायां ट्रैकपैड</string> + <string name="second_trackpad">ट्रैकपैड</string> + <string name="second_show_keyboard">कीबोर्ड दिखाएं</string> + <string name="second_hide_keyboard">कीबोर्ड छिपाएं</string> + <string name="second_terminal">Linux टर्मिनल</string> + <string name="second_terminal_not_ready">Linux सेशन अभी टर्मिनल के लिए तैयार नहीं है।</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">गेम</string> + <string name="rail_desktop">डेस्कटॉप</string> + <string name="rail_store">स्टोर</string> + <string name="rail_components">कॉम्पोनेंट</string> + <string name="rail_apps">ऐप</string> + <string name="rail_setup">सेटअप</string> + <string name="rail_updates">अपडेट</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">%1$s फिर से शुरू करें</string> + <string name="roms_text">हर सेशन में /root/ROMs के रूप में दिखता है। इंटरनल स्टोरेज /root/Storage पर है।</string> + <string name="roms_none">कोई फ़ोल्डर नहीं चुना गया</string> + <string name="roms_applies">अगले सेशन से लागू होता है। SD कार्ड काम करते हैं।</string> + <string name="roms_choose">फ़ोल्डर चुनें</string> + <string name="roms_change">फ़ोल्डर बदलें</string> + <string name="proton_lede">एक ARM64 Proton बिल्ड इंस्टॉल करें, फिर इसे Steam → Properties → Compatibility में हर गेम के लिए चुनें।</string> + <string name="proton_stop_first">कम्पैटिबिलिटी टूल इंस्टॉल या हटाने के लिए चल रहा सेशन बंद करें।</string> + <string name="proton_available">उपलब्ध बिल्ड</string> + <string name="proton_installed">इंस्टॉल है %1$s</string> + <string name="proton_queued">पहले की रिक्वेस्ट से पेंडिंग</string> + <string name="proton_not_installed">इंस्टॉल नहीं है</string> + <string name="proton_update_available">अपडेट उपलब्ध → %1$s</string> + <string name="proton_remove_older">पुराने %1$s वर्शन हटाएं</string> + <string name="proton_remove_older_body">%1$s हटाता है। इन वर्शन पर सेट गेम को किसी और Proton पर बदलना होगा।</string> + <string name="proton_remove_body">इस वर्शन पर सेट गेम को किसी और Proton पर बदलना होगा।</string> + <string name="proton_install_now">अभी इंस्टॉल करें</string> + <string name="proton_cancel_queued">पेंडिंग रद्द करें</string> + <string name="pckb_android">Android कीबोर्ड</string> + <string name="pckb_hide">छिपाएं ✕</string> + <string name="main_launch_named">%1$s लॉन्च करें</string> + <string name="main_choose_screen">स्क्रीन चुनें। सेकेंडरी: %1$s।</string> + <string name="main_secondary_gone">सेकेंडरी डिस्प्ले अब उपलब्ध नहीं है।</string> + <string name="main_primary">प्राइमरी स्क्रीन</string> + <string name="main_secondary">सेकेंडरी स्क्रीन</string> + <string name="widgets_prev_tab">पिछला टैब</string> + <string name="widgets_next_tab">अगला टैब</string> + <string name="widgets_on">चालू</string> + <string name="widgets_all_n">सभी %1$d</string> + <string name="widgets_none">कोई नहीं</string> + <string name="widgets_n_of_m">%2$d में से %1$d</string> + <string name="widgets_off">बंद</string> + <string name="screen_bottom">नीचे की स्क्रीन</string> + <string name="game_env_applies">अगली बार गेम लॉन्च होने पर लागू होता है। गेम की प्रोफ़ाइल शेयर्ड प्रोफ़ाइल से ऊपर रहती है।</string> + <string name="game_env_other">ऐप ID से कोई और गेम…</string> + <string name="game_env_done">हो गया</string> + <string name="game_env_default">डिफ़ॉल्ट</string> + <string name="game_env_off">बंद</string> + <string name="game_env_change">बदलें…</string> + <string name="game_env_change_title">वेरिएबल बदलें</string> + <string name="game_env_restore_default">डिफ़ॉल्ट पर वापस जाएं</string> + <string name="game_env_eyebrow">Proton गेम</string> + <string name="pip_title">पिक्चर इन पिक्चर</string> + <string name="pip_auto">अपने आप PiP में जाएं</string> + <string name="unfolded_controls">खुली हुई स्क्रीन पर कंट्रोल</string> + <string name="unfolded_controls_hint">खुली होने पर, गेम Steam Deck के ट्रैकपैड और पीछे की ग्रिप के ऊपर दिखता है। बंद होने पर, गेम फ़ुल स्क्रीन में रहता है।</string> + <string name="pip_suspended">सस्पेंडेड</string> + <string name="pip_not_ready">सेशन तैयार होने पर पिक्चर इन पिक्चर उपलब्ध होता है।</string> + <string name="pip_permission">Android सेटिंग में DroidDeck के लिए पिक्चर इन पिक्चर की अनुमति दें।</string> + <string name="pip_unavailable">Android पिक्चर इन पिक्चर नहीं खोल सका।</string> + <string name="game_shortcut">शॉर्टकट</string> + <string name="game_shortcut_add">होम स्क्रीन पर जोड़ें</string> + <string name="game_shortcut_choose">गेम चुनें</string> + <string name="game_shortcut_scanning">इंस्टॉल किए गेम स्कैन हो रहे हैं…</string> + <string name="game_link_copy">लॉन्च लिंक कॉपी करें</string> + <string name="game_link_copied">लॉन्च लिंक कॉपी हो गया</string> + <string name="game_shortcut_unsupported">यह लॉन्चर शॉर्टकट नहीं जोड़ सकता। इसके बदले लॉन्च लिंक कॉपी करें इस्तेमाल करें।</string> + <string name="game_link_invalid">गेम लॉन्च लिंक मान्य नहीं है।</string> + <string name="game_link_missing">यह गेम अब आपकी DroidDeck लाइब्रेरी में नहीं है।</string> + <string name="game_link_session_busy">कोई Steam गेम लॉन्च करने से पहले चल रहा सेशन बंद करें।</string> + <string name="game_link_failed">गेम Steam को नहीं भेजा जा सका। इसे फिर से लॉन्च करने की कोशिश करें।</string> + <string name="setup_retry_removal">हटाना फिर से कोशिश करें</string> + <string name="runtime_removing">हटाया जा रहा है</string> + <string name="runtime_removal_incomplete">हटाना पूरा नहीं हुआ</string> + <string name="game_file_export">गेम फ़ाइल एक्सपोर्ट करें</string> + <string name="game_file_sync">सभी गेम फ़ाइलें फ़ोल्डर में सिंक करें</string> + <string name="game_file_stop_sync">गेम फ़ाइलें सिंक करना बंद करें</string> + <string name="game_file_folder">फ़्रंटएंड गेम फ़ाइलों के लिए फ़ोल्डर चुनें</string> + <string name="game_file_exported">गेम फ़ाइलें %1$s में सेव हुईं</string> + <string name="game_frontend_files">फ़्रंटएंड फ़ाइलें</string> + + <string name="main_wait_runtime">रनटाइम ऑपरेशन खत्म होने का इंतज़ार करें</string> + <string name="main_wait_proton_install">कम्पैटिबिलिटी टूल इंस्टॉल खत्म होने का इंतज़ार करें</string> + <string name="main_wait_desktop_install">डेस्कटॉप ऐप इंस्टॉल खत्म होने का इंतज़ार करें</string> + <string name="main_wait_install_game">गेम लॉन्च करने से पहले इंस्टॉल खत्म होने का इंतज़ार करें</string> + <string name="main_saves_close_session">पहले Steam सेशन बंद करें, ताकि गेम इंपोर्ट के ऊपर सेव न कर सके</string> + <string name="main_saves_importing">%1$s में इंपोर्ट हो रहा है</string> + <plurals name="main_saves_imported"> + <item quantity="one">%2$s से %1$d फ़ाइल %3$s में इंपोर्ट हुई</item> + <item quantity="other">%2$s से %1$d फ़ाइलें %3$s में इंपोर्ट हुईं</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">%2$s से %1$d फ़ाइल %3$s में इंपोर्ट हुई। पुराने सेव Download/DroidDeck/Saves/backups में बैकअप हो गए</item> + <item quantity="other">%2$s से %1$d फ़ाइलें %3$s में इंपोर्ट हुईं। पुराने सेव Download/DroidDeck/Saves/backups में बैकअप हो गए</item> + </plurals> + <string name="main_saves_pick_zip">%1$s के लिए एक सेव zip चुनें</string> + <string name="main_saves_exporting">%1$s एक्सपोर्ट हो रहा है</string> + <plurals name="main_saves_exported"> + <item quantity="one">%1$d फ़ाइल %2$s के रूप में एक्सपोर्ट हुई: %3$s</item> + <item quantity="other">%1$d फ़ाइलें %2$s के रूप में एक्सपोर्ट हुईं: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">%1$s (%2$s) को सेव करने के लिए जगह चुनें</string> + <string name="main_action_failed">%1$s विफल: %2$s</string> + <string name="main_no_logs_yet">अभी कोई सेशन लॉग नहीं है: पहले एक सेशन चलाएं।</string> + <string name="main_no_logs_to_clear">हटाने के लिए कोई सेशन लॉग नहीं है।</string> + <plurals name="main_logs_cleared"> + <item quantity="one">%1$d सेशन लॉग फ़ोल्डर हटाया गया।</item> + <item quantity="other">%1$d सेशन लॉग फ़ोल्डर हटाए गए।</item> + </plurals> + <string name="main_wadb_pair_failed">वायरलेस डीबगिंग पेयरिंग विफल रही</string> + <string name="main_wadb_command_failed">वायरलेस डीबगिंग कमांड विफल रहा</string> + <string name="main_wadb_unavailable">वायरलेस डीबगिंग उपलब्ध नहीं है</string> + <string name="main_adb_copied">ADB कमांड कॉपी हो गया</string> + <string name="main_pick_roms">ROM फ़ोल्डर चुनें</string> + <string name="main_non_adreno_title">Adreno GPU नहीं है</string> + <string name="main_non_adreno_text">Turnip Adreno GPU को सपोर्ट करता है। %1$s पर, Steam में काली स्क्रीन दिख सकती है। डाउनलोड: %2$.0f MB।</string> + <string name="main_install_anyway">फिर भी इंस्टॉल करें</string> + <string name="main_remove_runtime_title">Linux रनटाइम हटाएं</string> + <string name="main_remove_runtime_text">यह रनटाइम, इसके भीतर का Steam क्लाइंट, और वहां इंस्टॉल हर गेम हटा देता है।</string> + <string name="main_applied">लागू हुआ: %1$s</string> + <string name="android_app_open_failed_primary">%1$s प्राइमरी स्क्रीन पर नहीं खुल सका</string> + <string name="android_app_open_failed_on">%1$s %2$s पर नहीं खुल सका</string> + <string name="android_app_open_failed_display">%1$s डिस्प्ले %2$d पर नहीं खुल सका</string> + <string name="comp_busy_importing">इंपोर्ट हो रहा है</string> + <string name="comp_busy_swapping">बदला जा रहा है</string> + <string name="comp_busy_restoring">वापस लाया जा रहा है</string> + <string name="comp_busy_cancelling">रद्द हो रहा है</string> + <string name="comp_busy_deleting">हटाया जा रहा है</string> + <string name="comp_cannot_read">फ़ाइल पढ़ी नहीं जा सकती</string> + <string name="comp_imported">%1$s इंपोर्ट हुआ</string> + <string name="comp_swap_cancelled">पेंडिंग स्वैप रद्द कर दिया गया।</string> + <string name="comp_pick_wcp">कॉम्पोनेंट पैकेज चुनें (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nightlies तक नहीं पहुंचा जा सका</string> + <string name="comp_stored">%1$s सेव हुआ</string> + <string name="comp_download_failed">डाउनलोड विफल: %1$s</string> + <string name="drivers_pick_linux">Linux रनटाइम ड्राइवर चुनें (-Linux zip या Android + Linux बंडल)</string> + <string name="drivers_pick_android">डिस्प्ले ड्राइवर चुनें (AdrenoTools zip या Android + Linux बंडल)</string> + <string name="drivers_pick_any">ड्राइवर zip या Android + Linux बंडल चुनें</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">%1$s हटाया जा रहा है…</string> + <string name="main_forgetting_named">%1$s भुलाया जा रहा है…</string> + <string name="main_pick_game_storage">गेम स्टोरेज फ़ोल्डर चुनें</string> + <string name="main_pick_decky_zip">Decky प्लगइन ZIP चुनें</string> + <string name="main_storage_not_usable">इस्तेमाल लायक नहीं: %1$s</string> + <string name="main_running_program">प्रोग्राम</string> + <string name="main_removing_runtime">Linux रनटाइम हटाया जा रहा है</string> + <string name="main_settings_main_screen">नीचे की स्क्रीन पर Settings नहीं खुल सकी; इसे मुख्य स्क्रीन पर खोला गया।</string> + <string name="main_open_dev_options">Settings में डेवलपर विकल्प खोलें</string> + + <string name="upd_unknown_apps_failed">Android की “Install unknown apps” सेटिंग नहीं खुल सकी</string> + <string name="upd_couldnt_check">जांच नहीं हो सकी: %1$s</string> + <string name="upd_no_download">इस बिल्ड में DroidDeck की इस कॉपी के लिए कोई डाउनलोड नहीं है</string> + <string name="upd_stop_first">पहले चल रहा सेशन बंद करें, फिर अपडेट करें</string> + <string name="upd_stage_downloading">डाउनलोड हो रहा है</string> + <string name="upd_stage_installing">इंस्टॉल हो रहा है</string> + <string name="upd_stage_confirm">आपकी पुष्टि का इंतज़ार हो रहा है</string> + <string name="upd_failed">अपडेट विफल रहा</string> + <string name="upd_not_offered">Android ने अपडेट इंस्टॉल करने का विकल्प नहीं दिया</string> + + <string name="decky_install_failed">Decky इंस्टॉल विफल रहा: %1$s</string> + <string name="decky_plugin_starting">प्लगइन इंपोर्ट शुरू हो रहा है…</string> + <string name="decky_plugin_failed">प्लगइन इंपोर्ट विफल रहा: %1$s</string> + <string name="decky_plugin_installed">प्लगइन इंस्टॉल हो गया। इसे लोड करने के लिए Steam रीस्टार्ट करें।</string> + + <string name="drivers_not_checked">अभी जांचा नहीं गया - नए ड्राइवर देखने के लिए रीफ़्रेश पर टैप करें</string> + <string name="drivers_bundle_sets_display">Android + Linux: इसके साथ डिस्प्ले ड्राइवर सेट करता है</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: इसके साथ रनटाइम ड्राइवर सेट करता है</string> + <string name="drivers_runtime_builtin">रनटाइम में बिल्ट-इन Turnip</string> + <string name="drivers_system_vulkan">सिस्टम Vulkan: इस GPU के लिए कोई बंडल बिल्ड नहीं</string> + <string name="drivers_bundled">%1$s (बंडल)</string> + <string name="drivers_manual">मैनुअल</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">अभी सिर्फ़ एक आधा हिस्सा पब्लिश है</string> + <string name="drivers_pair_size">दोनों के लिए %1$.0f MB</string> + <string name="drivers_none_to_set">सेट करने के लिए कोई ड्राइवर नहीं: %1$s</string> + <string name="drivers_checking_latest">नवीनतम ड्राइवर देखे जा रहे हैं…</string> + <string name="drivers_up_to_date_check_failed">नवीनतम (जांच नहीं हो सकी: %1$s)</string> + <string name="drivers_recommended_unpublished">सुझाए गए ड्राइवर अभी पब्लिश नहीं हैं</string> + <string name="drivers_downloading_pair">%1$s %2$s डाउनलोड हो रहा है…</string> + <string name="drivers_updated_to">%1$s %2$s में अपडेट हो गया।</string> + <string name="drivers_updated_to_restart">%1$s %2$s में अपडेट हो गया। DroidDeck रीस्टार्ट होने के बाद डिस्प्ले ड्राइवर लागू होता है।</string> + <string name="drivers_auto_waits_for_session">ड्राइवर अपडेट सेशन रुकने का इंतज़ार करेंगे।</string> + <string name="drivers_auto_waits_for_network">मोबाइल डेटा और बैटरी सेवर बंद करते ही %1$s %2$s डाउनलोड होगा।</string> + <string name="drivers_skipping_bad">%1$s %2$s ने यहाँ सेशन शुरू नहीं किया, इसलिए ऑटो उन्हीं ड्राइवर पर रहेगा जिन्होंने किया।</string> + <string name="drivers_rolled_back">%1$s ने दो बार सेशन शुरू नहीं किया, इसलिए ऑटो उन ड्राइवर पर लौट गया जो काम कर रहे थे।</string> + <string name="drivers_switched_to">%1$s %2$s में बदल दिया गया।</string> + <string name="drivers_switched_to_restart">%1$s %2$s में बदल दिया गया। DroidDeck रीस्टार्ट होने के बाद डिस्प्ले ड्राइवर लागू होता है।</string> + <string name="drivers_using">%1$s %2$s इस्तेमाल हो रहा है।</string> + <string name="drivers_using_restart">%1$s %2$s इस्तेमाल हो रहा है। DroidDeck रीस्टार्ट होने के बाद डिस्प्ले ड्राइवर लागू होता है।</string> + <string name="drivers_using_quest">Quest के साथ आया डिस्प्ले ड्राइवर और डिफ़ॉल्ट रनटाइम इस्तेमाल हो रहे हैं।</string> + <string name="drivers_using_quest_restart">Quest के साथ आया डिस्प्ले ड्राइवर और डिफ़ॉल्ट रनटाइम इस्तेमाल हो रहे हैं। डिस्प्ले ड्राइवर DroidDeck रीस्टार्ट करने के बाद लागू होगा।</string> + <string name="drivers_not_a_driver">यह ड्राइवर zip नहीं है: न AdrenoTools ड्राइवर, न -Linux Turnip, न Android + Linux बंडल</string> + <string name="drivers_import_failed">इंपोर्ट विफल: %1$s</string> + <string name="drivers_imported_unnamed">इंपोर्ट किया गया ड्राइवर</string> + <string name="drivers_using_bundle">%1$s को रनटाइम और डिस्प्ले दोनों ड्राइवर के रूप में इस्तेमाल किया जा रहा है।</string> + <string name="drivers_using_bundle_restart">%1$s को रनटाइम और डिस्प्ले दोनों ड्राइवर के रूप में इस्तेमाल किया जा रहा है। DroidDeck रीस्टार्ट होने के बाद डिस्प्ले ड्राइवर लागू होता है।</string> + <string name="drivers_deleted_bundle">%1$s हटाया गया (दोनों ड्राइवर)</string> + <string name="drivers_deleted">%1$s हटाया गया</string> + <string name="drivers_release_status">नवीनतम: %1$s · %2$s को जांचा गया</string> + <string name="drivers_release_status_failed">नवीनतम: %1$s · %2$s तक नहीं पहुंचा जा सका · %3$s को जांचा गया</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d मिनट पहले</item> + <item quantity="other">%1$d मिनट पहले</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d घंटे पहले</item> + <item quantity="other">%1$d घंटे पहले</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d दिन पहले</item> + <item quantity="other">%1$d दिन पहले</item> + </plurals> + <string name="drivers_checking_sources">Banners-Turnip, WinNative और DroidDeck जांचे जा रहे हैं…</string> + <string name="drivers_check_failed">जांच विफल रही</string> + <string name="drivers_installed_pick_either">इंस्टॉल है %1$s - दोनों ड्राइवर सेट करने के लिए इसे किसी भी लिस्ट में चुनें</string> + <string name="drivers_installed_pick">इंस्टॉल है %1$s - इसे मेनू में चुनें</string> + + <string name="session_wait_removal">रनटाइम हटाना खत्म होने का इंतज़ार करें</string> + <string name="session_title_game">गेम</string> + <string name="session_touch_auto_touchpad">टचपैड</string> + <string name="session_touch_auto_direct">डायरेक्ट</string> + <string name="session_swap_failed">स्वैप विफल: %1$s</string> + <string name="session_profile_save_failed">प्रोफ़ाइल सेव विफल: %1$s</string> + <string name="session_desktop_paused">डेस्कटॉप रुका हुआ है</string> + <string name="session_named_paused">%1$s रुका हुआ है</string> + <string name="session_program_paused">प्रोग्राम रुका हुआ है</string> + <string name="session_starting_desktop">डेस्कटॉप शुरू हो रहा है</string> + <string name="session_starting_named">%1$s शुरू हो रहा है</string> + <string name="session_starting_program">प्रोग्राम शुरू हो रहा है</string> + <string name="session_no_logs">इस सेशन के लिए कोई लॉग नहीं है।</string> + <string name="session_logs_archive_failed">सेशन लॉग आर्काइव नहीं बन सका।</string> + <string name="session_logs_share_failed">सेशन लॉग शेयर नहीं हो सके।</string> + <string name="session_starting_session">सेशन शुरू हो रहा है…</string> + <string name="session_runtime_downloading">Linux रनटाइम डाउनलोड हो रहा है</string> + <string name="session_runtime_downloading_mb">Linux रनटाइम डाउनलोड हो रहा है · %2$d में से %1$d MB</string> + <string name="session_runtime_checking">Linux रनटाइम जांचा जा रहा है</string> + <string name="session_runtime_unpacking">Linux रनटाइम अनपैक हो रहा है</string> + <string name="session_desktop_downloading">डेस्कटॉप डाउनलोड हो रहा है</string> + <string name="session_desktop_downloading_mb">डेस्कटॉप डाउनलोड हो रहा है · %2$d में से %1$d MB</string> + <string name="session_desktop_checking">डेस्कटॉप जांचा जा रहा है</string> + <string name="session_desktop_unpacking">डेस्कटॉप अनपैक हो रहा है</string> + <string name="session_proton_downloading">Proton Experimental (ARM64) डाउनलोड हो रहा है</string> + <string name="session_proton_downloading_mb">Proton Experimental (ARM64) डाउनलोड हो रहा है · %2$d में से %1$d MB</string> + <string name="session_proton_checking">Proton Experimental (ARM64) जांचा जा रहा है</string> + <string name="session_proton_unpacking">Proton Experimental (ARM64) अनपैक हो रहा है</string> + <string name="session_runtime_catalog_unreachable">रनटाइम कैटलॉग तक नहीं पहुंचा जा सका। कनेक्शन जांचें और फिर से Play दबाएं।</string> + <string name="session_runtime_install_failed">Linux रनटाइम इंस्टॉल नहीं हुआ। सेटअप में रनटाइम जांचें और फिर से Play दबाएं।</string> + <string name="session_desktop_install_failed">डेस्कटॉप इंस्टॉल नहीं हुआ (%1$s)। कनेक्शन जांचें और फिर से Desktop दबाएं।</string> + <string name="session_ended_named">%1$s अचानक बंद हो गया। बग रिपोर्ट के साथ लॉग शेयर करें, या फिर कोशिश करें।</string> + <string name="session_ended_program">प्रोग्राम अचानक बंद हो गया। बग रिपोर्ट के साथ लॉग शेयर करें, या फिर कोशिश करें।</string> + <string name="session_ended_desktop">डेस्कटॉप अचानक बंद हो गया। बग रिपोर्ट के साथ लॉग शेयर करें, या फिर कोशिश करें।</string> + <string name="session_ended_detail">एग्ज़िट स्टेटस %1$d · %2$s</string> + <string name="session_ended_no_log">कोई लॉग नहीं</string> + <plurals name="session_hint_enosys"> + <item quantity="one">लॉग में %1$d “Function not implemented” एरर दिखता है: इस डिवाइस पर proot का seccomp एक्सेलरेशन एक हेल्पर को फेल कर रहा है। %2$s → “%3$s” (या “%4$s”) आज़माएं और फिर से शुरू करें।</item> + <item quantity="other">लॉग में %1$d “Function not implemented” एरर दिखते हैं: इस डिवाइस पर proot का seccomp एक्सेलरेशन एक हेल्पर को फेल कर रहा है। %2$s → “%3$s” (या “%4$s”) आज़माएं और फिर से शुरू करें।</item> + </plurals> + + <string name="mode_decky_plugins">प्लगइन</string> + <string name="mode_decky_plugins_hint">अगले Steam सेशन के लिए एक प्लगइन ZIP इंस्टॉल करें।</string> + <string name="mode_decky_plugin_downloading">डाउनलोड हो रहा है…</string> + <string name="mode_decky_plugin_install_zip">ZIP से इंस्टॉल करें</string> + <string name="store_cat_games">गेम</string> + <string name="store_cat_audio_video">ऑडियो और वीडियो</string> + <string name="store_cat_graphics">ग्राफ़िक्स</string> + <string name="store_cat_internet">इंटरनेट</string> + <string name="store_cat_office">ऑफ़िस</string> + <string name="store_cat_developer">डेवलपर</string> + <string name="store_cat_education">शिक्षा</string> + <string name="store_cat_science">विज्ञान</string> + <string name="store_cat_system">सिस्टम</string> + <string name="store_cat_utilities">यूटिलिटी</string> + <string name="store_section_popular">पॉपुलर</string> + <string name="store_section_trending">ट्रेंडिंग</string> + <string name="store_section_new">नया</string> + <string name="store_section_updated">अपडेट किए गए</string> + <string name="store_section_loading">लोड हो रहा है…</string> + <string name="store_flatpak_setup">Flatpak सेटअप</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Flathub पर अपडेट नहीं जांचे जा सके</string> + <string name="content_rom_installed">इंस्टॉल है</string> + <string name="content_rom_folder">फ़ोल्डर</string> + <string name="theme_graphite">ग्रेफ़ाइट</string> + <string name="theme_graphite_detail">ग्रेफ़ाइट सतहें, और चुने, फ़ोकस या दबाए गए हर चीज़ के लिए लोगो के अपने ऑर्ब ब्लू रंग का इस्तेमाल।</string> + <string name="theme_paper">काले पर पेपर</string> + <string name="theme_paper_detail">सफ़ेद मुख्य रंग है, आइकन का ब्लू रंग लाइन, रिंग और डॉट के लिए संकेत है।</string> + <string name="theme_icon_blue">आइकन ब्लू</string> + <string name="theme_icon_blue_detail">काली ज़मीन, सफ़ेद टाइप, चुने, फ़ोकस या दबाए गए हर चीज़ के लिए ब्लू रंग।</string> + <string name="theme_electric">इलेक्ट्रिक नेवी</string> + <string name="theme_electric_detail">ब्लू रंग ज़्यादा चमकीला, उन सतहों पर जो ग्रे के बजाय नेवी की ओर झुकती हैं।</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">पहले रनटाइम इंस्टॉल करें</string> + <string name="game_sync_err_steam_library">Steam लाइब्रेरी उपलब्ध नहीं है</string> + <string name="game_sync_err_previous_sd">पिछली SD लाइब्रेरी उपलब्ध नहीं है</string> + <string name="game_sync_err_game_storage">गेम स्टोरेज उपलब्ध नहीं है</string> + <string name="game_sync_err_added_games">जोड़े गए गेम का फ़ोल्डर उपलब्ध नहीं है</string> + <string name="game_sync_err_manifests">Steam मेनिफ़ेस्ट उपलब्ध नहीं हैं</string> + <string name="content_system_many">कई सिस्टम</string> + <string name="fm_drive_internal">इंटरनल</string> + <string name="fm_drive_linux">Linux सिस्टम</string> + <string name="fm_drive_sd">SD कार्ड</string> + <string name="fm_drive_storage">स्टोरेज</string> + <string name="fm_select">चुनें</string> + <string name="fm_properties">प्रॉपर्टी</string> + <string name="fm_favorite_add">Favorites में जोड़ें</string> + <string name="fm_favorite_remove">Favorites से हटाएं</string> + <string name="fm_rename">नाम बदलें</string> + <string name="fm_copy">कॉपी करें</string> + <string name="fm_cut">कट करें</string> + <string name="fm_actions">एक्शन</string> + <string name="fm_favorites">Favorites</string> + <string name="fm_pin_current">मौजूदा फ़ोल्डर पिन करें</string> + <string name="fm_no_favorites">अभी कोई favorite नहीं है - किसी फ़ोल्डर को उसके ⋮ मेनू से पिन करें ताकि यहां जल्दी वापस आ सकें।</string> + <string name="fm_unpin_favorite">favorites से हटाएं</string> + <string name="fm_size_zero">0 बाइट</string> + <string name="fm_unit_bytes">बाइट</string> + <string name="fm_prop_location">जगह</string> + <string name="fm_prop_type">टाइप</string> + <string name="fm_prop_size">आकार</string> + <string name="fm_prop_modified">बदला गया</string> + <string name="fm_type_folder">फ़ोल्डर</string> + <string name="fm_type_file">फ़ाइल</string> + <string name="fm_type_ext_file">%1$s फ़ाइल</string> + <string name="fm_read_only">रीड-ओनली</string> + <string name="fm_read_only_hint">गेम (और Wine) को इस फ़ाइल को ओवरराइट या डिलीट करने से रोकता है।</string> + <string name="fm_read_only_failed">रीड-ओनली नहीं बदला जा सका</string> + <string name="fm_hidden">Hidden</string> + <string name="fm_hidden_unsupported">यह स्टोरेज hidden फ़्लैग सेव नहीं कर सकता।</string> + <string name="fm_hidden_hint">फ़ाइल को Windows में hidden के तौर पर चिह्नित करता है (Wine का hidden एट्रिब्यूट)।</string> + <string name="fm_hidden_failed">इस स्टोरेज पर Hidden नहीं बदला जा सका</string> + <string name="fm_done">हो गया</string> + <string name="fm_op_deleting">हटाया जा रहा है...</string> + <string name="fm_delete_failed">हटाना विफल रहा</string> + <string name="fm_op_moving">ले जाया जा रहा है...</string> + <string name="fm_op_copying">कॉपी हो रहा है...</string> + <string name="fm_op_moving_item">ले जाया जा रहा है - %1$s</string> + <string name="fm_op_copying_item">कॉपी हो रहा है - %1$s</string> + <string name="fm_op_moving_batch">ले जाया जा रहा है %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">कॉपी हो रहा है %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d पूरा, %2$d विफल</string> + <string name="fm_paste_skipped">%1$d पूरा, %2$d छोड़ा गया</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d आइटम ले जाया गया</item> + <item quantity="other">%1$d आइटम ले जाए गए</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d आइटम कॉपी हुआ</item> + <item quantity="other">%1$d आइटम कॉपी हुए</item> + </plurals> + <string name="fm_already_exists">“%1$s” पहले से मौजूद है</string> + <string name="fm_op_renaming">नाम बदला जा रहा है...</string> + <string name="fm_rename_failed">नाम बदलना विफल रहा</string> + <string name="fm_op_creating_folder">फ़ोल्डर बनाया जा रहा है...</string> + <string name="fm_create_folder_failed">फ़ोल्डर नहीं बन सका</string> + <string name="fm_new_folder">नया फ़ोल्डर</string> + <string name="fm_folder_name">फ़ोल्डर का नाम</string> + <string name="fm_create">बनाएं</string> + <string name="fm_new_name">नया नाम</string> + <string name="fm_delete_title">हटाएं?</string> + <string name="fm_delete_text">“%1$s” को स्थायी रूप से हटाएं?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">%1$d आइटम हटाएं?</item> + <item quantity="other">%1$d आइटम हटाएं?</item> + </plurals> + <string name="fm_cannot_undo">यह पूर्ववत नहीं हो सकता।</string> + <plurals name="fm_and_more"> + <item quantity="one">…और %1$d और</item> + <item quantity="other">…और %1$d और</item> + </plurals> + <string name="fm_op_deleting_batch">हटाया जा रहा है %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d नहीं हटाया जा सका</item> + <item quantity="other">%1$d नहीं हटाए जा सके</item> + </plurals> + <string name="fm_conflict_merge_hint">मर्ज मौजूदा फ़ोल्डर के भीतर फ़ाइलें जोड़ता और बदलता है।</string> + <string name="fm_conflict_overwrite_hint">ओवरराइट मौजूदा फ़ाइल को बदल देता है।</string> + <string name="fm_conflict_apply_all">सभी कॉन्फ़्लिक्ट पर लागू करें</string> + <string name="fm_conflict_merge">मर्ज करें</string> + <string name="fm_conflict_overwrite">ओवरराइट करें</string> + <string name="fm_conflict_keep_both">दोनों रखें</string> + <string name="fm_conflict_skip">छोड़ें</string> + <string name="fm_select_this_folder">यह फ़ोल्डर चुनें</string> + <string name="fm_back">बैक</string> + <string name="fm_drive_not_readable">%1$s माउंट है लेकिन अभी पढ़ा नहीं जा सकता</string> + <string name="fm_list_view">लिस्ट व्यू</string> + <string name="fm_grid_view">ग्रिड व्यू</string> + <string name="fm_search">सर्च</string> + <string name="fm_sort">सॉर्ट</string> + <string name="fm_sort_name">नाम</string> + <string name="fm_sort_date">बदलने की तारीख</string> + <string name="fm_rows_comfortable">आरामदायक पंक्तियां</string> + <string name="fm_rows_compact">कॉम्पैक्ट पंक्तियां</string> + <string name="fm_hide_hidden">छिपी फ़ाइलें छिपाएं</string> + <string name="fm_show_hidden">छिपी फ़ाइलें दिखाएं</string> + <string name="fm_hide_favorites">favorites छिपाएं</string> + <string name="fm_show_favorites">favorites दिखाएं</string> + <string name="fm_filter_folder">इस फ़ोल्डर को फ़िल्टर करें</string> + <string name="fm_free_space">%1$s खाली</string> + <string name="fm_selected_count">%1$d चुने गए</string> + <string name="fm_select_none">कोई नहीं</string> + <string name="fm_select_all">सभी</string> + <string name="fm_paste">पेस्ट करें</string> + <plurals name="fm_items"> + <item quantity="one">%1$d आइटम</item> + <item quantity="other">%1$d आइटम</item> + </plurals> + <string name="fm_paste_here">%1$s यहां पेस्ट करें</string> + <string name="fm_paste_move_here">%1$s (मूव) यहां पेस्ट करें</string> + <string name="fm_rail_title">फ़ाइलें</string> + <string name="fm_rail_storage">स्टोरेज</string> + <string name="fm_rail_quick">क्विक</string> + <string name="fm_rail_favorites">FAVORITES</string> + <string name="fm_rail_downloads">डाउनलोड</string> + <string name="fm_rail_downloads_short">डाउनलोड</string> + <string name="fm_rail_roms">ROM</string> + <string name="fm_rail_session_logs">सेशन लॉग</string> + <string name="fm_rail_pictures">पिक्चर</string> + <string name="fm_favorite_added">“%1$s” को Favorites में जोड़ा गया</string> + <string name="fm_favorite_removed">“%1$s” को Favorites से हटाया गया</string> + <string name="fm_empty_directory">खाली डायरेक्टरी</string> + <string name="fm_up_one_level">एक लेवल ऊपर</string> + <string name="fm_choose_folder">फ़ोल्डर चुनें</string> + <string name="fm_choose_file">फ़ाइल चुनें</string> + <string name="ctrl_tint_steam_blue">Steam ब्लू</string> + <string name="ctrl_tint_sky">स्काई</string> + <string name="ctrl_tint_white">सफ़ेद</string> + <string name="ctrl_tint_violet">वायलेट</string> + <string name="ctrl_tint_green">हरा</string> + <string name="ctrl_tint_amber">एम्बर</string> + <string name="ctrl_tint_red">लाल</string> + <string name="ctrl_tint_pink">गुलाबी</string> + <string name="ctrl_button_a">A बटन</string> + <string name="ctrl_button_b">B बटन</string> + <string name="ctrl_button_x">X बटन</string> + <string name="ctrl_button_y">Y बटन</string> + <string name="ctrl_button_lb">लेफ़्ट बंपर</string> + <string name="ctrl_button_rb">राइट बंपर</string> + <string name="ctrl_button_lt">लेफ़्ट ट्रिगर</string> + <string name="ctrl_button_rt">राइट ट्रिगर</string> + <string name="ctrl_button_view">View बटन</string> + <string name="ctrl_button_menu">Menu बटन</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad ऊपर</string> + <string name="ctrl_target_down">D-pad नीचे</string> + <string name="ctrl_target_left">D-pad बायां</string> + <string name="ctrl_target_right">D-pad दायां</string> + <string name="ctrl_target_hidden">Hidden</string> + <string name="ctrl_editor_drag">ले जाने के लिए ड्रैग करें</string> + <string name="ctrl_editor_snap">स्नैप</string> + <string name="ctrl_editor_save">सेव करें</string> + <string name="second_mode_none">कोई नहीं</string> + <string name="second_mode_keyboard_trackpad">कीबोर्ड + ट्रैकपैड</string> + <string name="second_mode_terminal">टर्मिनल</string> + <string name="second_mode_deck_controls">Deck ग्रिप + ट्रैकपैड</string> + + <string name="rtinst_removing">Linux रनटाइम हटाया जा रहा है</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Linux रनटाइम हटाया जा रहा है · %1$d एंट्री</item> + <item quantity="other">Linux रनटाइम हटाया जा रहा है · %1$d एंट्री</item> + </plurals> + <string name="rtinst_removed">Linux रनटाइम हटाया गया</string> + <string name="rtinst_removal_failed">Linux रनटाइम हटाना पूरा नहीं हो सका। सेटअप में फिर से हटाने की कोशिश करें।</string> + <string name="rtinst_removing_leftovers">रनटाइम का बाकी हिस्सा हटाया जा रहा है</string> + <string name="rtinst_downloading">डाउनलोड हो रहा है</string> + <string name="rtinst_verifying">जांचा जा रहा है</string> + <string name="rtinst_extracting">एक्सट्रैक्ट हो रहा है</string> + <string name="rtinst_channel_description">Linux रनटाइम इंस्टॉल या हटाए जाते समय दिखता है</string> + <string name="rtinst_title_installing">Linux रनटाइम इंस्टॉल हो रहा है</string> + <string name="rtinst_title_removing">Linux रनटाइम हटाया जा रहा है</string> + + <string name="deskpkg_runtime_missing">Linux रनटाइम इंस्टॉल नहीं है</string> + <string name="deskpkg_no_checksum">कैटलॉग में %1$s के लिए कोई चेकसम नहीं है</string> + <string name="deskpkg_checksum_mismatch">चेकसम मेल नहीं खाया - कुछ नहीं बदला गया</string> + <string name="deskpkg_installing">%1$s इंस्टॉल हो रहा है</string> + <string name="deskpkg_place_failed">AppImage को नहीं रखा जा सका</string> + <string name="deskpkg_extract_failed">एक्सट्रैक्शन विफल रहा</string> + <string name="deskpkg_install_failed">इंस्टॉल विफल रहा</string> + + <string name="flatpakmgr_setup_failed">Flatpak सेटअप विफल रहा (exit %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Flatpak सेटअप पूरा नहीं हुआ</string> + <string name="flatpakmgr_busy">कोई और स्टोर टास्क चल रहा है</string> + <string name="flatpakmgr_not_ready">पहले Flatpak सेट करें</string> + <string name="flatpakmgr_starting">शुरू हो रहा है</string> + <string name="flatpakmgr_exit_status">Flatpak status %1$d के साथ बंद हुआ</string> + <string name="flatpakmgr_installing">%1$s इंस्टॉल हो रहा है</string> + <string name="flatpakmgr_updating">%1$s अपडेट हो रहा है</string> + <string name="flatpakmgr_removing">%1$s हटाया जा रहा है</string> + <string name="flatpakmgr_installing_step">%1$s इंस्टॉल हो रहा है (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">%1$s अपडेट हो रहा है (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">%1$s हटाया जा रहा है (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">अनुवाद</string> + <string name="flatpakmgr_ref_graphics_drivers">ग्राफ़िक्स ड्राइवर</string> + <string name="flatpakmgr_ref_media_codecs">मीडिया कोडेक</string> + <string name="flatpakmgr_ref_runtime">%1$s रनटाइम</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s रनटाइम %2$s</string> + + <string name="appimg_too_small">यह फ़ाइल AppImage होने के लिए बहुत छोटी है</string> + <string name="appimg_unreadable">फ़ाइल पढ़ी नहीं जा सकती: %1$s</string> + <string name="appimg_not_linux">यह AppImage नहीं है (यह Linux प्रोग्राम नहीं है)</string> + <string name="appimg_wrong_arch">यह AppImage न ARM64 (aarch64) के लिए बना है, न x86 पीसी के लिए</string> + <string name="appimg_not_appimage">यह Linux प्रोग्राम है लेकिन AppImage नहीं है</string> + <string name="appimg_wrong_type">सिर्फ़ टाइप 2 AppImage इंपोर्ट किए जा सकते हैं (यह टाइप %1$d है)</string> + <string name="appimg_no_space_import">पर्याप्त खाली जगह नहीं है: इंपोर्ट के लिए लगभग %1$s चाहिए</string> + <string name="appimg_no_space_update">पर्याप्त खाली जगह नहीं है: अपडेट के लिए लगभग %1$s चाहिए</string> + <string name="appimg_import_failed">इंपोर्ट विफल रहा</string> + <string name="appimg_gone">वह AppImage अब नहीं है</string> + <string name="appimg_update_failed">अपडेट विफल रहा</string> + <string name="appimg_extracting">%1$s एक्सट्रैक्ट हो रहा है</string> + <string name="appimg_extract_failed">AppImage एक्सट्रैक्ट नहीं हो सका</string> + <string name="appimg_extract_failed_detail">AppImage एक्सट्रैक्ट नहीं हो सका: %1$s</string> + + <string name="deckymgr_stop_session_loader">Decky Loader इंस्टॉल करने से पहले चल रहा सेशन बंद करें</string> + <string name="deckymgr_download_failed">Decky Loader डाउनलोड विफल रहा</string> + <string name="deckymgr_size_mismatch">Decky Loader का आकार रिलीज़ मेटाडेटा से मेल नहीं खाया</string> + <string name="deckymgr_checksum_download_failed">रिलीज़ चेकसम डाउनलोड नहीं हो सका</string> + <string name="deckymgr_checksum_missing">रिलीज़ चेकसम मौजूद नहीं है</string> + <string name="deckymgr_checksum_invalid">रिलीज़ चेकसम मान्य नहीं है</string> + <string name="deckymgr_checksum_mismatch">Decky Loader चेकसम मेल नहीं खाया</string> + <string name="deckymgr_not_elf">रिलीज़ asset एक कम्पैटिबल 64-बिट Linux एग्ज़िक्यूटेबल नहीं है</string> + <string name="deckymgr_session_started_loader">डाउनलोड के दौरान एक सेशन शुरू हुआ; Decky Loader इंस्टॉल करने से पहले इसे बंद करें</string> + <string name="deckymgr_loader_not_executable">PluginLoader को एग्ज़िक्यूटेबल के तौर पर चिह्नित नहीं किया जा सका</string> + <string name="deckymgr_cef_failed">Steam CEF रिमोट डिबगिंग चालू नहीं हो सकी</string> + <string name="deckymgr_stage_failed">PluginLoader स्टेज नहीं किया जा सका</string> + <string name="deckymgr_loader_preserve_failed">मौजूदा PluginLoader को सुरक्षित नहीं रखा जा सका</string> + <string name="deckymgr_loader_activate_failed">नया PluginLoader चालू नहीं हो सका</string> + <string name="deckymgr_stop_session_plugin">प्लगइन इंस्टॉल करने से पहले चल रहा सेशन बंद करें</string> + <string name="deckymgr_loader_required">प्लगइन इंपोर्ट करने से पहले Decky Loader इंस्टॉल करें</string> + <string name="deckymgr_zip_unreadable">चुनी गई ZIP फ़ाइल नहीं पढ़ी जा सकी</string> + <string name="deckymgr_plugins_dir_failed">Decky प्लगइन डायरेक्टरी नहीं बन सकी</string> + <string name="deckymgr_extracting_zip">प्लगइन ZIP एक्सट्रैक्ट हो रहा है</string> + <string name="deckymgr_zip_one_folder">प्लगइन ZIP में एक टॉप-लेवल प्लगइन फ़ोल्डर होना चाहिए</string> + <string name="deckymgr_zip_missing_files">प्लगइन ZIP में plugin.json, package.json, या dist/index.js नहीं है</string> + <string name="deckymgr_plugin_name_missing">प्लगइन का नाम मौजूद नहीं है</string> + <string name="deckymgr_session_started_plugin">इंस्टॉलेशन के दौरान एक सेशन शुरू हुआ; प्लगइन इंस्टॉल करने से पहले इसे बंद करें</string> + <string name="deckymgr_plugin_installed">प्लगइन इंस्टॉल हो गया · इसे लोड करने के लिए Steam रीस्टार्ट करें</string> + <string name="deckymgr_plugin_install_failed">प्लगइन ZIP इंस्टॉलेशन विफल रहा</string> + <string name="deckymgr_zip_too_many">प्लगइन ZIP में बहुत ज़्यादा एंट्री हैं</string> + <string name="deckymgr_zip_invalid_path">प्लगइन ZIP में एक अमान्य पाथ है</string> + <string name="deckymgr_zip_duplicate_paths">प्लगइन ZIP में डुप्लीकेट पाथ हैं</string> + <string name="deckymgr_zip_unsafe_path">प्लगइन ZIP में एक असुरक्षित पाथ है</string> + <string name="deckymgr_folder_failed">प्लगइन फ़ोल्डर नहीं बन सका</string> + <string name="deckymgr_zip_too_large">प्लगइन ZIP 1 GiB की सीमा से आगे बढ़ जाता है</string> + <string name="deckymgr_bundled_not_executable">बंडल किए प्लगइन बाइनरी को एग्ज़िक्यूटेबल के तौर पर चिह्नित नहीं किया जा सका</string> + <string name="deckymgr_remote_entry_invalid">अमान्य remote_binary एंट्री</string> + <string name="deckymgr_remote_name_invalid">अमान्य रिमोट बाइनरी नाम</string> + <string name="deckymgr_remote_url_https">रिमोट बाइनरी URL को HTTPS इस्तेमाल करना चाहिए</string> + <string name="deckymgr_remote_hash_invalid">रिमोट बाइनरी %1$s का SHA-256 हैश मान्य नहीं है</string> + <string name="deckymgr_bin_dir_failed">प्लगइन bin डायरेक्टरी नहीं बन सकी</string> + <string name="deckymgr_downloading_binary">प्लगइन बाइनरी डाउनलोड हो रही है · %1$s</string> + <string name="deckymgr_binary_download_failed">प्लगइन बाइनरी %1$s डाउनलोड नहीं हो सकी</string> + <string name="deckymgr_binary_checksum_mismatch">प्लगइन बाइनरी चेकसम मेल नहीं खाया · %1$s</string> + <string name="deckymgr_binary_not_executable">प्लगइन बाइनरी को एग्ज़िक्यूटेबल के तौर पर चिह्नित नहीं किया जा सका · %1$s</string> + <string name="deckymgr_binary_replace_failed">प्लगइन बाइनरी बदली नहीं जा सकी · %1$s</string> + <string name="deckymgr_binary_install_failed">प्लगइन बाइनरी इंस्टॉल नहीं हो सकी · %1$s</string> + <string name="deckymgr_folder_taken">प्लगइन फ़ोल्डर किसी और प्लगइन का है</string> + <string name="deckymgr_preserve_failed">मौजूदा प्लगइन सुरक्षित नहीं रखा जा सका</string> + <string name="deckymgr_activate_failed">इंपोर्ट किए प्लगइन को चालू नहीं किया जा सका</string> + <string name="deckymgr_settings_failed">Decky प्लगइन सेटिंग अपडेट नहीं हो सकी</string> + <string name="deckymgr_restore_failed">मौजूदा प्लगइन वापस नहीं लाया जा सका</string> + + <string name="adbfix_save_failed">वायरलेस डीबगिंग पहचान सेव नहीं हो सकी</string> + <string name="adbfix_command_failed">ADB कमांड विफल रहा (%1$d)</string> + <string name="adbfix_not_confirmed">Android ने पुष्टि नहीं की कि चाइल्ड-प्रोसेस सीमा बदली गई: %1$s</string> + <string name="adbfix_no_pairing">कोई वायरलेस डीबगिंग पेयरिंग सेव नहीं है</string> + <string name="adbfix_enter_address">मौजूदा वायरलेस डीबगिंग का IP एड्रेस और पोर्ट डालें</string> + + <string name="adbpair_timed_out">पेयरिंग पॉप-अप का इंतज़ार करते-करते समय खत्म हो गया। DroidDeck से फिर कोशिश करें।</string> + <string name="adbpair_discovery_failed_code">पेयरिंग पॉप-अप नहीं खोजा जा सका (%1$d)। जांचें कि Wi-Fi चालू है।</string> + <string name="adbpair_discovery_failed">पेयरिंग पॉप-अप नहीं खोजा जा सका: %1$s</string> + <string name="adbpair_six_digits">कोड के सभी 6 अंक डालें</string> + <string name="adbpair_pairing">पेयरिंग हो रही है…</string> + <string name="adbpair_code_rejected">यह कोड काम नहीं आया। पेयरिंग पॉप-अप फिर से खोलें और इसका नया कोड डालें।</string> + <string name="adbpair_connecting">पेयर हो गया। कनेक्ट हो रहा है…</string> + <string name="adbpair_port_not_found">पेयर हो गया, लेकिन वायरलेस डीबगिंग का पोर्ट नहीं मिला। वायरलेस डीबगिंग चालू रखें और फिर कोशिश करें।</string> + <string name="adbpair_applying">सेटिंग लागू की जा रही है…</string> + <string name="adbpair_command_failed">वायरलेस डीबगिंग कमांड विफल रहा</string> + <string name="adbpair_channel_name">वायरलेस डीबगिंग सेटअप</string> + <string name="adbpair_channel_description">Settings खुली रहते हुए वायरलेस डीबगिंग का पेयरिंग कोड मांगता है</string> + <string name="adbpair_title_pair">वायरलेस डीबगिंग पेयर करें</string> + <string name="adbpair_waiting_text">वायरलेस डीबगिंग चालू करें, फिर “Pair device with pairing code” पर टैप करें।</string> + <string name="adbpair_waiting_long">वायरलेस डीबगिंग चालू करें, फिर “Pair device with pairing code” पर टैप करें। Settings में बने रहें: कोड इस नोटिफ़िकेशन में आता है।</string> + <string name="adbpair_code_label">6 अंकों का पेयरिंग कोड</string> + <string name="adbpair_code_hint">Enter code पर टैप करें और Settings में दिखाए गए 6 अंक टाइप करें।</string> + <string name="adbpair_title_code">Wi-Fi पेयरिंग कोड डालें</string> + <string name="adbpair_title_retry">कोड फिर से आज़माएं</string> + <string name="adbpair_enter_code">कोड डालें</string> + <string name="adbpair_title_working">Steam सेट किया जा रहा है</string> + <string name="adbpair_title_done">Steam तैयार है</string> + <string name="adbpair_done_text">DroidDeck पर वापस जाने के लिए टैप करें। अब आप वायरलेस डीबगिंग बंद कर सकते हैं।</string> + <string name="adbpair_title_failed">वायरलेस डीबगिंग सेटअप रुक गया</string> + + <string name="selfinst_download_failed">डाउनलोड विफल</string> + <string name="selfinst_size_mismatch">डाउनलोड का आकार पब्लिश किए APK से मेल नहीं खाया और इसे हटा दिया गया - फिर कोशिश करें</string> + <string name="selfinst_checksum_mismatch">डाउनलोड अपने चेकसम से मेल नहीं खाया और इसे हटा दिया गया - फिर कोशिश करें</string> + <string name="selfinst_wrong_package">यह अपडेट Android पैकेज %1$s के लिए है, %2$s के लिए नहीं</string> + <string name="selfinst_metadata_signer">अपडेट मेटाडेटा DroidDeck की रिलीज़ साइनिंग कुंजी का नाम नहीं लेता</string> + <string name="selfinst_unreadable">Android डाउनलोड किया APK नहीं पढ़ सका</string> + <string name="selfinst_apk_wrong_package">डाउनलोड किया APK %1$s के लिए है, %2$s के लिए नहीं</string> + <string name="selfinst_version_mismatch">डाउनलोड किए APK में versionCode %1$d है, पब्लिश किए %2$d नहीं</string> + <string name="selfinst_downgrade">Android इंस्टॉल किए %2$d के ऊपर versionCode %1$d इंस्टॉल नहीं करेगा</string> + <string name="selfinst_no_signing">डाउनलोड किए APK में कोई साइनिंग जानकारी नहीं है</string> + <string name="selfinst_wrong_signer">डाउनलोड किया APK DroidDeck की रिलीज़ कुंजी से साइन नहीं है</string> + <string name="appupd_http">अपडेट कैटलॉग ने HTTP %1$d जवाब दिया</string> + + <string name="loadstate_starting">सेशन शुरू हो रहा है…</string> + <string name="loadstate_elapsed">%1$d:%2$02d बीत गया · अभी भी काम हो रहा है</string> + <string name="loadstate_steam_update">Steam क्लाइंट अपडेट डाउनलोड हो रहा है · %1$d%%</string> + <string name="loadstate_steam_client">Steam क्लाइंट डाउनलोड हो रहा है · %1$s</string> + + <string name="pextra_busy">एक कम्पैटिबिलिटी टूल इंस्टॉल पहले से चल रहा है</string> + <string name="pextra_stop_session">कम्पैटिबिलिटी टूल इंस्टॉल करने से पहले चल रहा सेशन बंद करें</string> + <string name="pextra_no_release">%1$s के लिए कोई ARM64 रिलीज़ नहीं मिली</string> + <string name="pextra_no_space">%1$s इंस्टॉल करने के लिए कम से कम 4 GB खाली जगह और डाउनलोड आकार चाहिए</string> + <string name="pextra_downloading">%1$s %2$s डाउनलोड हो रहा है</string> + <string name="pextra_retrying">डाउनलोड फिर से कोशिश हो रहा है · %2$d में से %1$d प्रयास</string> + <string name="pextra_interrupted">डाउनलोड बाधित हुआ</string> + <string name="pextra_download_failed">डाउनलोड विफल रहा; आंशिक फ़ाइल रखी गई है ताकि फिर कोशिश करने पर यह जारी रह सके</string> + <string name="pextra_too_big">डाउनलोड रिलीज़ के आकार से बड़ा हो गया और हटा दिया गया</string> + <string name="pextra_incomplete">डाउनलोड अधूरा रहा; आंशिक फ़ाइल को फिर से जारी रखने लायक कोशिश के लिए रखा गया है</string> + <string name="pextra_verifying">डाउनलोड जांचा जा रहा है</string> + <string name="pextra_checksum_unreadable">रिलीज़ चेकसम नहीं पढ़ा जा सका; फिर कोशिश करें</string> + <string name="pextra_no_checksum">%1$s %2$s कोई चेकसम पब्लिश नहीं करता; कुछ भी इंस्टॉल नहीं हुआ</string> + <string name="pextra_checksum_mismatch">चेकसम मेल नहीं खाया; डाउनलोड हटा दिया गया</string> + <string name="pextra_session_started">डाउनलोड के दौरान एक सेशन शुरू हुआ; कम्पैटिबिलिटी टूल इंस्टॉल करने से पहले इसे बंद करें</string> + <string name="pextra_installing">%1$s इंस्टॉल हो रहा है</string> + <string name="pextra_install_failed">%1$s इंस्टॉलेशन विफल रहा (exit %2$d)</string> + <string name="pextra_could_not_install">%1$s इंस्टॉल नहीं हो सका</string> + <string name="esync_fetching">droiddeck-esync पैक लिया जा रहा है</string> + + <string name="cmgr_fex_linux_helpers">Linux हेल्पर के साथ</string> + <string name="cmgr_fex_dlls_only">सिर्फ़ DLL</string> + <string name="cmgr_original_proton_updated">ओरिजिनल (पिछले स्वैप के बाद Proton अपडेट हुआ)</string> + <string name="cmgr_changed_outside">Components के बाहर बदला गया</string> + <string name="cmgr_not_present">मौजूद नहीं</string> + <string name="cmgr_original_version">ओरिजिनल %1$s</string> + <string name="cmgr_original_from">%1$s से ओरिजिनल</string> + <string name="cmgr_swap_queued">जब इस पर चल रहा गेम बंद होगा, तो %1$s %2$s %3$s में चला जाएगा।</string> + <string name="cmgr_swap_done">%1$s %2$s अब %3$s में है। यह अगली बार गेम शुरू होने पर लागू होता है।</string> + <string name="cmgr_original_missing">वह ओरिजिनल बंडल सेव नहीं है</string> + <string name="cmgr_restore_queued">जब इस पर चल रहा गेम बंद होगा, तो %2$s का %1$s अपने ओरिजिनल पर वापस चला जाएगा।</string> + <string name="cmgr_restore_done">%2$s का %1$s अपने %3$s ओरिजिनल से वापस लाया गया।</string> + <string name="cmgr_package_in_use">%1$s %2$s में उपयोग में है। पहले उस Proton को किसी और चीज़ में बदलें।</string> + <string name="cmgr_package_not_stored">%1$s सेव नहीं है</string> + <string name="cmgr_deleted">%1$s हटाया गया।</string> + <string name="cmgr_original_kept">इंस्टॉल किए बिल्ड का ओरिजिनल रखा गया है: यह वापस जाने का रास्ता है।</string> + <string name="cmgr_not_stored">सेव नहीं है</string> + <string name="cmgr_deleted_original">%2$s का %1$s ओरिजिनल हटाया गया।</string> + <string name="cmgr_nightlies_only">डाउनलोड सिर्फ़ Nightlies रिलीज़ से आते हैं</string> + <string name="cmgr_list_predates_checksums">यह पैकेज लिस्ट चेकसम से पुरानी है - इसे रीफ़्रेश करें और फिर कोशिश करें</string> + <string name="cmgr_checksum_mismatch">चेकसम मेल नहीं खाया</string> + + <string name="sprefs_upscaler_linear">लीनियर</string> + <string name="sprefs_upscaler_nearest">निअरेस्ट</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (क्वालिटी)</string> + <string name="sprefs_upscaler_sharpen">सिर्फ़ शार्पन</string> + <string name="sprefs_lod_bias_auto">ऑटो (स्केलिंग से मेल)</string> + + <string name="look_off_desc">कुछ लागू नहीं।</string> + <string name="look_game_clarity">गेम क्लैरिटी</string> + <string name="look_game_clarity_desc">थोड़े कंट्रास्ट के साथ शार्पनिंग - रोज़ के लिए वाला।</string> + <string name="look_vivid">विविड</string> + <string name="look_vivid_desc">रंग को ज़ोर से बढ़ाया गया। आसमान में पट्टियां न आएं इसलिए डीबैंड चालू।</string> + <string name="look_cinematic">सिनेमैटिक</string> + <string name="look_cinematic_desc">गहरा कंट्रास्ट, ठंडा रंग, स्मूथ किए गए एज।</string> + <string name="look_competitive">कॉम्पिटिटिव</string> + <string name="look_competitive_desc">शैडो उठाए गए और भारी शार्पनिंग - पहले लोगों को पहचानें।</string> + <string name="look_adaptive_sharpen">एडैप्टिव शार्पन</string> + <string name="look_adaptive_sharpen_desc">सिर्फ़ शार्पनिंग, रंग जैसा है वैसा।</string> + <string name="look_filmic">फ़िल्मिक</string> + <string name="look_filmic_desc">फ़िल्म जैसा कर्व, थोड़ा हल्का रंग।</string> + <string name="look_arcade">आर्केड</string> + <string name="look_arcade_desc">तेज़ और दमदार।</string> + <string name="look_retro_crt">रेट्रो CRT</string> + <string name="look_retro_crt_desc">CRT ट्यूब और एनालॉग सिग्नल का असर एक साथ।</string> + <string name="look_upscale_sharp">अपस्केल शार्प</string> + <string name="look_upscale_sharp_desc">पैनल रिज़ॉल्यूशन से कम पर चलाने के लिए।</string> + <string name="look_pixel_clean">पिक्सल क्लीन</string> + <string name="look_pixel_clean_desc">2D और पुराने गेम के लिए साफ़ पिक्सल।</string> + <string name="look_anime_edge">एनिमे एज</string> + <string name="look_anime_edge_desc">टून आउटलाइन के साथ शार्पनिंग।</string> + + <string name="gpuinfo_not_adreno">Adreno GPU नहीं है</string> + <string name="gpuinfo_supported">समर्थित</string> + <string name="gpuinfo_experimental">एक्सपेरिमेंटल: इसके ड्राइवर टेस्ट बिल्ड हैं</string> + <string name="gpuinfo_below_tested">जांचे गए हार्डवेयर से नीचे (Adreno 725 और नए): यह शायद न चले</string> + <string name="gpuinfo_unsupported">समर्थित नहीं: DroidDeck को Adreno (Snapdragon) GPU चाहिए</string> + + <string name="turnip_rate_limited">GitHub की रेट लिमिट पार हो गई - बाद में फिर कोशिश करें</string> + <string name="turnip_github_http">GitHub ने HTTP %1$d जवाब दिया</string> + <string name="turnip_download_failed">डाउनलोड विफल</string> + <string name="turnip_list_predates_checksums">यह ड्राइवर लिस्ट चेकसम से पुरानी है - इसे रीफ़्रेश करें और फिर कोशिश करें</string> + <string name="turnip_checksum_mismatch">चेकसम मेल नहीं खाया - डाउनलोड हटा दिया गया</string> + <string name="turnip_not_adrenotools">यह AdrenoTools ड्राइवर नहीं है: %1$s</string> + <string name="turnip_reject_no_meta">कोई meta.json नहीं</string> + <string name="turnip_reject_meta_unreadable">meta.json पढ़ा नहीं जा सकता (%1$s)</string> + <string name="turnip_reject_linux_driver">यह एक Linux रनटाइम ड्राइवर है (इसे “Linux रनटाइम ड्राइवर” के अंतर्गत इंपोर्ट करें)</string> + <string name="turnip_reject_wayland">यह एक Wayland गेम ड्राइवर है, जिसका इस ऐप में कोई उपयोग नहीं है</string> + <string name="turnip_reject_no_library_name">meta.json में कोई libraryName नहीं है, इसलिए AdrenoTools को कुछ नहीं दिया जा सका</string> + <string name="turnip_reject_library_missing">meta.json में %1$s का नाम है, जो zip में नहीं है</string> + <string name="turnip_reject_not_aarch64">%1$s एक 64-बिट AArch64 ELF शेयर्ड लाइब्रेरी नहीं है</string> + <string name="turnip_reject_glibc">%1$s glibc से जुड़ा है - यह एक “-Linux” Turnip है, जो “Linux रनटाइम ड्राइवर” के अंतर्गत आता है</string> + <string name="lvd_no_library">इस zip में कोई libvulkan_freedreno*.so नहीं है। Android (AdrenoTools) या -Wayland Turnip zip Linux रनटाइम ड्राइवर नहीं है।</string> + <string name="lvd_not_aarch64">%1$s एक 64-बिट AArch64 ELF शेयर्ड लाइब्रेरी नहीं है।</string> + <string name="lvd_not_glibc">%1$s glibc ड्राइवर नहीं है - यह Android की libc से जुड़ा है। Linux रनटाइम को एक “-Linux” zip चाहिए; सादा या “-Wayland” Turnip Steam क्लाइंट द्वारा बिल्कुल भी लोड नहीं हो सकता।</string> + <string name="bundle_no_manifest">यह ड्राइवर बंडल नहीं है: कोई manifest.json नहीं जो एक android और एक linux ड्राइवर का नाम ले</string> + <string name="bundle_entry_outside">यह ड्राइवर बंडल नहीं है: %1$s इसके बाहर इशारा करता है</string> + <string name="bundle_too_large">यह ड्राइवर बंडल नहीं है: यह %1$d MB से ज़्यादा में अनपैक होता है</string> + + <string name="gstore_sd_card">SD कार्ड</string> + <string name="gstore_folder">फ़ोल्डर</string> + + <string name="logshare_chooser">सेशन लॉग शेयर करें</string> + + <string name="hdr_needs_android_10">Android 10 या नया चाहिए (कलर स्पेस वाली डिस्प्ले लेयर)</string> + <string name="hdr_none">यह डिस्प्ले HDR सपोर्ट नहीं बताता</string> + <string name="hdr_not_hdr10">यह डिस्प्ले %1$s को सपोर्ट करता है, HDR10 को नहीं</string> + + <string name="gpu_this_gpu">यह GPU</string> + <string name="phantom_title_on">चाइल्ड-प्रोसेस सीमा चालू है</string> + <string name="phantom_title_unset">चाइल्ड-प्रोसेस सीमा सेट नहीं है</string> + <string name="phantom_title_unreadable">चाइल्ड-प्रोसेस सीमा जांची नहीं जा सकी</string> + <string name="phantom_title_off">चाइल्ड-प्रोसेस सीमा बंद है</string> + <string name="phantom_title_not_required">चाइल्ड-प्रोसेस सीमा ज़रूरी नहीं</string> + <string name="phantom_instructions_fix">%1$s अगर यह संभव नहीं है, तो इस डिवाइस को ADB वाले कंप्यूटर से कनेक्ट करें और नीचे दिया कमांड चलाएं। यहां वापस आएं और फिर से जांचें।</string> + <string name="phantom_instructions_off">Steam सेशन शुरू हो सकते हैं।</string> + <string name="phantom_instructions_not_applicable">यह Android वर्शन इस सीमा का उपयोग नहीं करता।</string> + <string name="phantom_fix_toggle">डेवलपर विकल्प में “चाइल्ड प्रोसेस से जुड़ी पाबंदियां हटाएं” चालू करें, और बाद में डेवलपर विकल्प चालू रहने दें।</string> + <string name="phantom_fix_no_toggle">इस Android वर्शन में इसके लिए कोई स्विच नहीं है। इसे इस डिवाइस से बदलने के लिए वायरलेस डीबगिंग इस्तेमाल करें।</string> + <string name="upd_block_no_apk">इस बिल्ड में DroidDeck की इस कॉपी के लिए कोई डाउनलोड नहीं है।</string> + <string name="upd_block_version_code">Android इसे इस बिल्ड के ऊपर इंस्टॉल नहीं करेगा क्योंकि इसका versionCode %1$d इंस्टॉल किए %2$d से कम है।</string> + <string name="upd_fail_downgrade">Android किसी पुराने वर्शन को नए के ऊपर इंस्टॉल नहीं करेगा। चैनल के आगे आने तक इस बिल्ड पर बने रहें।</string> + <string name="upd_fail_signature">DroidDeck की यह कॉपी अलग तरीके से साइन है (क्या यह लोकल बिल्ड है?), इसलिए Android इसे यहीं अपडेट नहीं करेगा।</string> + <string name="upd_fail_storage">अपडेट के लिए पर्याप्त खाली जगह नहीं है।</string> + <string name="upd_fail_aborted">अपडेट रद्द कर दिया गया।</string> + <string name="upd_fail_with_message">अपडेट इंस्टॉल नहीं हुआ: %1$s</string> + <string name="upd_fail_generic">अपडेट इंस्टॉल नहीं हुआ।</string> + <string name="saves_layout_zip">%1$s zip</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s अभी तक लॉन्च नहीं हुआ</string> + <string name="saves_none_found">%1$s के लिए कोई सेव फ़ाइल नहीं मिली</string> + <string name="saves_not_save_zip">%1$s में कोई drive_c फ़ोल्डर नहीं है, इसलिए यह GameHub या Winlator सेव zip नहीं है</string> + <string name="gstore_cannot_create">%1$s में फ़ोल्डर नहीं बनाए जा सकते</string> + <string name="gstore_cannot_write">%1$s में लिखा नहीं जा सकता</string> + <string name="gstore_cannot_write_detail">%1$s में लिखा नहीं जा सकता (%2$s)</string> + <string name="gfiles_folder_unavailable">फ़ोल्डर उपलब्ध नहीं है</string> + <string name="gfiles_name_taken">%1$s का उपयोग एक अलग फ़ाइल पहले से कर रही है</string> + <string name="gfiles_art_unavailable">आर्टवर्क फ़ोल्डर उपलब्ध नहीं है</string> + <string name="gfiles_unrelated_inventory">फ़ोल्डर में एक असंबंधित सिंक इन्वेंटरी है</string> + <string name="gfiles_remove_failed">%1$s हटाया नहीं जा सका</string> + <string name="gfiles_outside_folder">फ़ाइल एक्सपोर्ट फ़ोल्डर से बाहर चली जाती है</string> + <string name="cmgr_fex_unnamed">FEX (वर्शन नाम के बिना बिल्ड)</string> + <string name="cmgr_no_profile">%1$s में कोई profile.json नहीं</string> + <string name="cmgr_not_component_package">%1$s एक Linux कॉम्पोनेंट पैकेज नहीं है (टाइप %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s खाली</string> + <string name="mode_storage_auto_short">ऑटोमैटिक</string> + <string name="appupd_catalog_rejected">अपडेट कैटलॉग अपनी जांच में विफल रहा (%1$s)</string> + <string name="main_adb_clip_label">DroidDeck चाइल्ड-प्रोसेस सेटिंग</string> + <string name="setup_signed_in_offline_unnamed">साइन इन है · ऑफ़लाइन मोड</string> + <string name="setup_signed_in_unnamed">साइन इन है</string> + <string name="driver_tag_bundled">बंडल</string> + <string name="driver_tag_downloaded">डाउनलोड किया गया</string> + <string name="driver_tag_imported">इंपोर्ट किया गया</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s। %2$s\n\n%3$s</string> + <string name="display_session">सेशन डिस्प्ले</string> + <string name="display_resolution">रिज़ॉल्यूशन</string> + <string name="display_game_fit">16:9 गेम फ़िट</string> + <string name="display_game_fit_hint">16:9 गेम इस डिस्प्ले में कैसे फ़िट होते हैं। अगले सेशन से।</string> + <string name="display_game_fit_unavailable">Match screen चुनें या 16:9 से पतला कस्टम आकार चुनें।</string> + <string name="display_preserve">अनुपात बनाए रखें</string> + <string name="display_stretch">डिस्प्ले में स्ट्रेच करें</string> + <string name="display_image_scaling">इमेज स्केलिंग</string> + <string name="display_filter">स्केलिंग फ़िल्टर</string> + <string name="display_filter_hint">Steam और डेस्कटॉप में साझा।</string> + <string name="display_filter_live">लाइव लागू होता है। Steam और डेस्कटॉप में साझा।</string> + <string name="display_filter_note">FSR, GSR और NIS सेशन इमेज को बड़ा करने पर लागू होते हैं। सिर्फ़ शार्पन बिना बड़ा किए भी काम करता है।</string> + <string name="display_sharpness">फ़िल्टर शार्पनेस</string> + <string name="display_frame_rate">फ़्रेम रेट</string> + <string name="display_look_filter">%1$s स्केलिंग को %2$s पर सेट करता है।</string> + <string name="display_match_screen">Match screen (%1$d×%2$d)</string> + <string name="display_follow_screen">Follow screen (खुलने या बंद होने पर आकार बदलता है)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">डिवाइस जानकारी दिखाएं</string> + <string name="device_info_hide">डिवाइस जानकारी छिपाएं</string> + <string name="device_info_loading">डिवाइस पढ़ा जा रहा है…</string> + <string name="device_info_copy">कॉपी करें</string> + <string name="device_info_copy_hint">इस जानकारी को बग रिपोर्ट में कॉपी करें।</string> + <string name="device_info_copied">कॉपी हो गया।</string> + <string name="force_ssbs_title">SSBS फ़ोर्स करें</string> + <string name="force_ssbs_hint">एक CPU स्पीड सेटिंग चालू रखता है जिसे Wine बार-बार बंद कर देता है। Snapdragon 8 Elite पर Windows गेम तेज़ हो सकते हैं; पुराने चिप पर बहुत कम फ़र्क़ दिखता है। अगली बार गेम लॉन्च होने पर लागू होता है।</string> + + <string name="rail_stores">स्टोर</string> + <string name="source_steam">Steam</string> + <string name="source_added">कस्टम</string> + <string name="setup_stores">स्टोर</string> + <string name="setup_stores_open_on">स्टोर खोलें</string> + <string name="setup_stores_speed">डाउनलोड स्पीड टियर</string> + <string name="setup_stores_engine">स्टोर इंजन</string> + <string name="setup_stores_engine_chip_ready">● इंजन तैयार</string> + <string name="setup_stores_engine_chip_missing">नहीं बना</string> + <string name="stores_tier_balanced">बैलेंस्ड</string> + <string name="stores_tier_fast">फ़ास्ट</string> + <string name="stores_tier_max">मैक्स</string> + <string name="stores_title">स्टोर</string> + <string name="stores_settings">स्टोर सेटिंग</string> + <string name="stores_settings_eyebrow">सेटिंग</string> + <string name="stores_chip_signed_out">(साइन इन नहीं है)</string> + <string name="stores_tab_store">स्टोर</string> + <string name="stores_tab_installed">इंस्टॉल किए</string> + <string name="stores_tab_library">लाइब्रेरी</string> + <string name="stores_tab_all">सभी</string> + <string name="stores_tab_downloads">डाउनलोड</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">साइन इन करें</string> + <string name="stores_signout_named">%1$s · साइन आउट करें</string> + <string name="stores_signout_title">%1$s से साइन आउट करें?</string> + <string name="stores_signout_note">इंस्टॉल किए गेम बने रहते हैं। जब आप फिर से साइन इन करेंगे तो लाइब्रेरी फिर से मिलेगी।</string> + <string name="stores_signout_stay">साइन इन रहें</string> + <string name="stores_signout_go">साइन आउट करें</string> + <string name="stores_search_catalog">%1$s के कैटलॉग में सर्च करें…</string> + <string name="stores_search_installed">इंस्टॉल किए गेम में सर्च करें…</string> + <string name="stores_search_library">अपनी लाइब्रेरी में सर्च करें…</string> + <string name="stores_search_open">सर्च</string> + <string name="stores_installed_empty">कुछ इंस्टॉल नहीं है</string> + <string name="stores_library_loading">लोड हो रहा है</string> + <string name="stores_nothing_matches">कोई गेम नहीं</string> + <string name="stores_shelves_loading">स्टोर लोड हो रहा है…</string> + <string name="stores_amazon_no_catalog">कोई कैटलॉग नहीं</string> + <string name="stores_shelf_new">नया क्या है</string> + <string name="stores_shelf_deals">डील</string> + <string name="stores_shelf_free">फ़्री गेम</string> + <string name="stores_shelf_trending">ट्रेंडिंग</string> + <string name="stores_shelf_library">आपकी लाइब्रेरी</string> + <string name="stores_play">Play</string> + <string name="stores_install">इंस्टॉल करें</string> + <string name="stores_resume_install">इंस्टॉल फिर से शुरू करें</string> + <string name="stores_dl_interrupted">बाधित</string> + <string name="stores_install_size">इंस्टॉल · %1$s</string> + <string name="stores_get_free">मुफ़्त में पाएं</string> + <string name="stores_view_on">%1$s पर देखें</string> + <string name="stores_buy_price">खरीदें · %1$s</string> + <string name="stores_installed_chip">इंस्टॉल है</string> + <string name="stores_in_library">लाइब्रेरी में</string> + <string name="stores_free">फ़्री</string> + <string name="stores_resume">फिर से शुरू करें</string> + <string name="stores_refresh">रीफ़्रेश करें</string> + <string name="stores_sort">क्रमबद्ध करें</string> + <string name="stores_sort_last_played">हाल में खेले गए</string> + <string name="stores_sort_recently_installed">हाल में इंस्टॉल किए गए</string> + <string name="stores_sort_title_asc">शीर्षक A–Z</string> + <string name="stores_sort_title_desc">शीर्षक Z–A</string> + <string name="stores_sort_size_desc">आकार: सबसे बड़ा</string> + <string name="stores_sort_size_asc">आकार: सबसे छोटा</string> + <string name="stores_sort_release_date">रिलीज़ तिथि</string> + <string name="stores_view_list">सूची दृश्य</string> + <string name="stores_view_cards">कार्ड दृश्य</string> + <string name="stores_show_mature">वयस्क कंटेंट दिखाएं</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">ऑफ़लाइन</string> + <string name="epic_card_none">बंद</string> + <string name="epic_eos">Epic साइन-इन (EOS)</string> + <string name="epic_offline">ऑफ़लाइन लॉन्च करें</string> + <string name="epic_resolve">Epic साइन-इन हल करें</string> + <string name="epic_client_version">वर्शन %1$s</string> + <string name="epic_client_no_runtime">पहले Linux रनटाइम इंस्टॉल करें</string> + <string name="epic_client_checking">नवीनतम वर्शन जांचा जा रहा है…</string> + <string name="epic_client_unpacking">अनपैक हो रहा है…</string> + <string name="epic_client_unreachable">डाउनलोड सर्वर ने जवाब नहीं दिया</string> + <string name="epic_client_needs_fex">Epic Games Launcher को FEX चाहिए, जिसे Steam डाउनलोड करता है। Steam शुरू होने के बाद launcher फिर से खोलें।</string> + <string name="epic_client_download_failed">डाउनलोड विफल: %1$s</string> + <string name="epic_client_unpack_failed">लॉन्चर को अनपैक नहीं किया जा सका: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher ने साइन-इन स्वीकार नहीं किया। इसे लॉन्चर से फिर से शुरू करें।</string> + <string name="epic_client_uninstall_body">लॉन्चर हटाता है और उसकी जगह खाली करता है। आपके Epic गेम इंस्टॉल रहते हैं और चलते रहते हैं, और साइन-इन अगली बार इंस्टॉल करने के लिए रखा जाता है।</string> + <string name="epic_client_uninstall_stops">पहले चल रहा सेशन बंद होगा।</string> + <string name="epic_client_uninstalled">Epic Games Launcher अनइंस्टॉल हो गया</string> + <string name="epic_client_uninstall_failed">लॉन्चर की कुछ फ़ाइलें हटाई नहीं जा सकीं। फिर से कोशिश करें।</string> + <string name="epic_client_uninstalling">Epic Games Launcher की अनइंस्टॉल पूरी होने तक प्रतीक्षा करें</string> + <string name="store_cloud_saves">क्लाउड सेव</string> + <string name="cloud_upload">क्लाउड पर अपलोड करें</string> + <string name="cloud_download">क्लाउड से डाउनलोड करें</string> + <string name="cloud_none">कोई क्लाउड सेव नहीं</string> + <string name="cloud_conflict">क्लाउड कॉन्फ़्लिक्ट</string> + <string name="cloud_conflict_files">क्लाउड कॉन्फ़्लिक्ट · %1$d फ़ाइलें</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">क्लाउड रखें</string> + <string name="cloud_keep_local">लोकल रखें</string> + <string name="cloud_checking">क्लाउड जांचा जा रहा है…</string> + <string name="cloud_last_sync">आख़िरी सिंक %1$s</string> + <string name="cloud_never">अभी सिंक नहीं हुआ</string> + <string name="cloud_done">%1$d फ़ाइलें</string> + <string name="stores_eyebrow_installed">इंस्टॉल है</string> + <string name="stores_eyebrow_library">आपकी लाइब्रेरी में</string> + <string name="stores_eyebrow_store">स्टोर</string> + <string name="achievements_title">उपलब्धियां</string> + <string name="achievements_count">%2$d में से %1$d अनलॉक</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">अनलॉक · %1$d</string> + <string name="achievements_group_locked">लॉक · %1$d</string> + <string name="achievements_group_hidden">छिपी · %1$d</string> + <string name="achievements_hidden">छिपी हुई उपलब्धि</string> + <string name="achievements_hidden_detail">अनलॉक होने पर विवरण दिखाए जाते हैं।</string> + <string name="achievements_all">सभी उपलब्धियां अनलॉक</string> + <string name="achievements_reading">लोड हो रहा है…</string> + <string name="achievements_signed_out">अपनी उपलब्धियां देखने के लिए %1$s में साइन इन करें।</string> + <string name="achievements_unreachable">%1$s तक नहीं पहुंच सका। ऑनलाइन होने पर फिर से देखें।</string> + <string name="achievements_none">%1$s इस गेम के लिए कोई उपलब्धि सूचीबद्ध नहीं करता।</string> + <string name="achievements_show_all">सभी %1$d दिखाएं</string> + <string name="achievements_dialog_title">उपलब्धियां · %1$s</string> + <string name="stores_in_steam">✓ Steam में</string> + <string name="stores_uninstall">अनइंस्टॉल करें</string> + <string name="stores_uninstalling">अनइंस्टॉल हो रहा है…</string> + <string name="stores_uninstall_title">%1$s अनइंस्टॉल करें?</string> + <string name="stores_uninstall_body_size">%1$s खाली करता है और इसे Steam से हटाता है।</string> + <string name="stores_uninstall_body">इसकी फ़ाइलें और इसका Steam शॉर्टकट हटाता है।</string> + <string name="stores_launch_not_registered">Steam अगली बार शुरू होने पर इस गेम को ले लेगा; इसे वहां से लॉन्च करें, या अभी Steam शुरू करें।</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">हर गेम के लिए Steam का चुनाव</string> + <string name="stores_card_audio">ऑडियो</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">कॉम्पोनेंट</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">इंजन</string> + <string name="stores_card_engine_value">%1$s · नेटिव</string> + <string name="stores_card_engine_java">%1$s · बिल्ट-इन</string> + <string name="stores_how_it_runs">यह कैसे चलता है</string> + <string name="stores_kv_fetched">कहां से लिया गया</string> + <string name="stores_kv_fetched_value">%1$s, आपके खाते से</string> + <string name="stores_kv_installed_to">कहां इंस्टॉल हुआ</string> + <string name="stores_kv_installed_to_value">गेम स्टोरेज (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">किससे लॉन्च होता है</string> + <string name="stores_kv_launched_by_value">Steam और Proton, Steam गेम वाला ही रास्ता</string> + <string name="stores_kv_launched_by_epic">Steam और Proton · हर लॉन्च पर Epic साइन-इन, EOS ओवरले बंद</string> + <string name="stores_kv_launched_by_amazon">Steam और Proton · Amazon Games Services वेरिएबल सेट</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">इंस्टॉल पर Steam में जोड़ा गया (Deck UI + Steam Input)</string> + <string name="stores_downloads_empty">कोई डाउनलोड नहीं</string> + <string name="stores_dl_paused">रुका हुआ</string> + <string name="stores_dl_queued">कतार में</string> + <string name="stores_dl_queued_at">कतार में · #%1$d</string> + <string name="stores_dl_cancelled">रद्द</string> + <string name="stores_dl_failed">विफल</string> + <string name="stores_dl_failed_reason">विफल · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">रोकें</string> + <string name="stores_dl_resume">फिर से शुरू करें</string> + <string name="stores_dl_cancel">रद्द करें</string> + <string name="stores_dl_retry">फिर कोशिश करें</string> + <string name="stores_dl_clear">हटाएं</string> + <string name="stores_dl_clear_all">पूरे हो गए हटाएं</string> + <string name="stores_stage_manifest">मेनिफ़ेस्ट</string> + <string name="stores_stage_download">डाउनलोड</string> + <string name="stores_stage_verify">जांचें</string> + <string name="stores_stage_install">इंस्टॉल</string> + <string name="stores_stage_done">पूरा हुआ</string> + <string name="stores_stage_checking">जांचा जा रहा है</string> + <string name="stores_stage_downloading">डाउनलोड हो रहा है</string> + <string name="stores_dl_cancel_confirm">डाउनलोड हटाएं?</string> + <string name="stores_dl_failed_kept">विफल · %1$s रखा गया</string> + <string name="stores_stage_verifying">जांचा जा रहा है</string> + <string name="stores_stage_installing">इंस्टॉल हो रहा है</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d फ़ाइलें</string> + <string name="stores_download_manager">डाउनलोड मैनेजर</string> + <string name="stores_parallel">एक साथ डाउनलोड</string> + <string name="stores_install_where">कहां इंस्टॉल करें</string> + <string name="stores_install_title">%1$s इंस्टॉल करें:</string> + <string name="stores_target_internal">इंटरनल</string> + <string name="stores_target_free">%1$s खाली</string> + <string name="stores_target_free_unknown">खाली जगह अज्ञात</string> + <string name="stores_storage_insufficient">खाली जगह कम है: %1$s चाहिए, सिर्फ़ %2$s खाली है</string> + <string name="stores_storage_low">जगह कम है (%1$s खाली, %2$s चाहिए)</string> + <string name="stores_notification_channel">स्टोर डाउनलोड</string> + <string name="stores_notification_channel_hint">गेम डाउनलोड की प्रोग्रेस दिखाता है और डाउनलोड को बैकग्राउंड में चलते रहने देता है</string> + <string name="stores_notification_one">डाउनलोड हो रहा है</string> + <string name="stores_notification_many">%1$d डाउनलोड</string> + <string name="stores_notification_waiting">तैयार किया जा रहा है…</string> + <string name="stores_notification_done_channel">पूरे हुए स्टोर डाउनलोड</string> + <string name="stores_notification_installed">%1$s इंस्टॉल हुआ</string> + <string name="stores_notification_failed">%1$s डाउनलोड विफल रहा</string> + <string name="stores_notification_delete">हटाएं</string> + <string name="stores_notification_keep">रखें</string> + <string name="stores_login_title">%1$s में साइन इन करें</string> + <string name="stores_login_provider_title">अपने प्रोवाइडर से साइन इन करें</string> + <string name="stores_login_reload">फिर से लोड करें</string> + <string name="stores_login_close">बंद करें</string> + <string name="stores_login_retry">फिर कोशिश करें</string> + <string name="stores_login_finishing">साइन-इन पूरा हो रहा है…</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> + <string name="stores_login_error_ssl">साइन-इन पेज से कनेक्शन सुरक्षित नहीं है।</string> + <string name="stores_login_error_verification">साइन-इन सत्यापित नहीं हो सका। फिर कोशिश करें।</string> + <string name="stores_login_error_generic">साइन-इन विफल रहा। फिर कोशिश करें।</string> + <string name="common_close">बंद करें</string> + <string name="common_back">बैक</string> + <string name="common_edit">संपादित करें</string> + <string name="games_add_all">इस फ़ोल्डर के सभी गेम जोड़ें</string> + <string name="games_added_none">इस फ़ोल्डर में कुछ नया नहीं है</string> + <string name="edit_name">नाम</string> + <string name="edit_target">टार्गेट</string> + <string name="edit_start_in">यहां शुरू करें</string> + <string name="edit_launch_options">लॉन्च विकल्प</string> + <string name="edit_artwork">आर्टवर्क</string> + <string name="edit_other_exe">दूसरा exe…</string> + <string name="edit_remove">हटाएं</string> + <string name="art_cover">कवर</string> + <string name="art_wide_cover">चौड़ा कवर</string> + <string name="art_adjust_logo">लोगो समायोजित करें</string> + <string name="logo_pos_default">डिफ़ॉल्ट</string> + <string name="logo_pos_upper_left">ऊपर बाएँ</string> + <string name="logo_pos_upper_center">ऊपर बीच में</string> + <string name="logo_pos_center">बीच में</string> + <string name="logo_pos_bottom_left">नीचे बाएँ</string> + <string name="logo_pos_bottom_center">नीचे बीच में</string> + <string name="logo_pos_position">स्थिति</string> + <string name="logo_pos_size">आकार</string> + <string name="logo_pos_save">सहेजें</string> + <string name="logo_pos_reset">डिफ़ॉल्ट पर लौटाएँ</string> + <string name="logo_pos_hint">गेम की पृष्ठभूमि के ऊपर बनता है, जैसे Steam करता है। सटीक स्थिति कुछ पिक्सेल अलग हो सकती है।</string> + <string name="logo_pos_no_logo">इस गेम का लोगो अभी नहीं है। यहाँ देखने के लिए लोगो में से कोई चुनें।</string> + <string name="logo_pos_failed">लोगो की स्थिति सहेजी नहीं जा सकी। फिर कोशिश करें।</string> + <string name="art_background">बैकग्राउंड</string> + <string name="art_logo">लोगो</string> + <string name="art_icon">आइकन</string> + <string name="art_src_folder">गेम फ़ोल्डर</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">आपकी फ़ाइल</string> + <string name="art_src_exe">exe से</string> + <string name="art_src_auto">ऑटोमैटिक</string> + <string name="art_pick_image">इमेज चुनें…</string> + <string name="art_pick_title">एक इमेज चुनें: %1$s</string> + <string name="art_reset">ऑटोमैटिक पर रीसेट करें</string> + <string name="art_search_sgdb">SteamGridDB पर खोजें…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">गेम खोजें</string> + <string name="art_sgdb_other_games">दूसरे नतीजे</string> + <string name="art_sgdb_none">कोई नतीजा नहीं।</string> + <string name="art_sgdb_no_key">SteamGridDB के लिए API कुंजी चाहिए। अपनी कुंजी सेटिंग › लॉन्चर में जोड़ें।</string> + <string name="art_sgdb_bad_key">SteamGridDB ने API कुंजी नहीं मानी। इसे सेटिंग › लॉन्चर में जाँचें।</string> + <string name="art_sgdb_limit">SteamGridDB अभी अनुरोध सीमित कर रहा है। एक मिनट बाद कोशिश करें।</string> + <string name="art_sgdb_offline">SteamGridDB से संपर्क नहीं हो रहा। कनेक्शन जाँचें।</string> + <string name="art_sgdb_server">SteamGridDB में कुछ गड़बड़ हुई। बाद में कोशिश करें।</string> + <string name="art_sgdb_no_game">SteamGridDB पर इस गेम के नतीजे नहीं हैं। इसे खोजकर देखें।</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d गेम जोड़ा गया</item> + <item quantity="other">%1$d गेम जोड़े गए</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d पहले से Games में है</item> + <item quantity="other">%1$d पहले से Games में हैं</item> + </plurals> + <string name="hop_back">B · %1$s पर वापस जाएं</string> + <string name="hop_from_games">गेम</string> + <string name="hop_from_play">Play सेटिंग</string> + <string name="sheet_graphics_drivers">ग्राफ़िक्स ड्राइवर</string> + <string name="comp_this_proton">यह Proton</string> + <string name="comp_every_proton">हर Proton</string> + <string name="comp_for_every_proton">हर Proton के लिए</string> + <string name="comp_available_count">उपलब्ध · %1$d</string> + <string name="comp_checked">%1$s को जांचा गया</string> + <string name="comp_check_all">नए कॉम्पोनेंट और ड्राइवर देखें</string> + <string name="comp_get">लें</string> + <string name="comp_proton_bar">%1$s · नीचे दिए DXVK, VKD3D-Proton और FEX इस Proton के हैं</string> + <string name="comp_device_tested">%1$s · जांचा गया</string> + <string name="comp_device_untested">%1$s · अनटेस्टेड</string> + <string name="comp_device_unsupported">%1$s · असमर्थित</string> + <string name="gpu_auto_keeps">सुझाई गई जोड़ी को हमेशा नवीनतम रखता है</string> + <string name="gpu_bar_auto">ऑटो · %1$s</string> + <string name="gpu_separately">रनटाइम और डिस्प्ले ड्राइवर अलग-अलग</string> + <string name="gpu_use_title">%1$s इस्तेमाल करें?</string> + <string name="gpu_mode_title">ड्राइवर कैसे चुने जाते हैं</string> + <string name="gpu_mode_auto_detail">इस GPU के लिए सबसे अच्छी जोड़ी, हमेशा अपडेट</string> + <string name="gpu_mode_pair">मिलती जोड़ी</string> + <string name="gpu_mode_pair_detail">जोड़ी चुनें; दोनों ड्राइवर सेट कर देती है</string> + <string name="gpu_mode_mix">मुक्त मिश्रण</string> + <string name="gpu_mode_mix_detail">डिस्प्ले और रनटाइम अलग-अलग चुनें</string> + <string name="gpu_mode_pair_short">जोड़ी</string> + <string name="gpu_mode_mix_short">मिश्रित</string> + <string name="gpu_src_auto">ऑटो</string> + <string name="gpu_src_pair">जोड़ी</string> + <string name="gpu_src_bundle">बंडल</string> + <string name="gpu_src_chosen">चुना गया</string> + <string name="gpu_src_by_gpu">GPU अनुसार</string> + <string name="gpu_src_default">डिफ़ॉल्ट</string> + <string name="gpu_display_live">अभी रेंडर कर रहा है</string> + <string name="gpu_display_pending">रीस्टार्ट बाकी · तब तक %1$s रेंडर करता है</string> + <string name="gpu_runtime_live">सक्रिय</string> + <string name="gpu_runtime_pending">अगला सेशन · यह सेशन %1$s पर है</string> + <string name="gpu_display_next">स्क्रीन रेंडर करता है। अगले सेशन से लागू।</string> + <string name="gpu_previous_driver">पिछला ड्राइवर</string> + <string name="gpu_restart_banner">डिस्प्ले ड्राइवर बदलने के लिए रीस्टार्ट करें।</string> + <string name="gpu_restart_blocked">डिस्प्ले ड्राइवर बदलने के लिए मौजूदा सेशन रोकें और DroidDeck रीस्टार्ट करें।</string> + <string name="gpu_restart_now">अभी रीस्टार्ट करें</string> + <string name="gpu_restart_later">बाद में</string> + <string name="gpu_auto_title">ऑटो ने आपके %1$s के लिए यह जोड़ी चुनी</string> + <string name="gpu_auto_builtin_title">ऑटो आपके %1$s के लिए बिल्ट-इन ड्राइवर इस्तेमाल कर रहा है</string> + <string name="gpu_auto_reason">%1$s परिवार के लिए चुना गया। नए संस्करण पृष्ठभूमि में इंस्टॉल होते हैं।</string> + <string name="gpu_pair_title">जोड़ी चुनें</string> + <string name="gpu_pair_hint">जोड़ी डिस्प्ले ड्राइवर और रनटाइम ड्राइवर एक साथ सेट करती है।</string> + <string name="gpu_mix_title">हर ड्राइवर चुनें</string> + <string name="gpu_mix_hint">बंडल दोनों जगह भर देता है। डिस्प्ले बदलाव रीस्टार्ट के बाद लागू होते हैं, रनटाइम बदलाव अगले सेशन से।</string> + <string name="gpu_change_display">डिस्प्ले ड्राइवर बदलें</string> + <string name="gpu_change_runtime">रनटाइम ड्राइवर बदलें</string> + <string name="gpu_autos_pick">ऑटो की पसंद</string> + <string name="gpu_installed">इंस्टॉल है</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · लागू करने के लिए रीस्टार्ट</string> + <string name="gpu_chip_restart">%1$s · रीस्टार्ट बाकी</string> + <string name="comp_this_device">यह डिवाइस</string> + <string name="proton_remove_title">%1$s हटाएं?</string> + <string name="setup_tab_diagnostics">डायग्नोस्टिक्स</string> + <string name="setup_ready">खेलने के लिए तैयार</string> + <string name="setup_not_ready">अभी खेलने के लिए तैयार नहीं</string> + <string name="setup_ready_runtime">रनटाइम %1$s</string> + <string name="setup_ready_limit_off">प्रोसेस सीमा बंद</string> + <string name="setup_ready_signed_in">%1$s के रूप में साइन इन</string> + <string name="setup_needs_you">जब किसी चीज़ को आपकी ज़रूरत हो</string> + <string name="setup_group_look">लुक</string> + <string name="setup_group_device">यह डिवाइस</string> + <string name="setup_group_art">लाइब्रेरी आर्ट</string> + <string name="setup_group_download">डाउनलोड</string> + <string name="setup_download_source">स्रोत</string> + <string name="setup_download_source_auto">ऑटो</string> + <string name="setup_download_source_direct">सीधा</string> + <string name="setup_download_source_mirror">मिरर</string> + <string name="setup_download_source_custom">अपना प्रीफ़िक्स</string> + <string name="setup_download_mirror">साइट</string> + <string name="setup_download_prefix">प्रीफ़िक्स</string> + <string name="flathub_eyebrow">LINUX ऐप</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Linux डेस्कटॉप के लिए डेस्कटॉप ऐप, डेस्कटॉप से खोले जाते हैं।</string> + <string name="flathub_setup">Flathub सेट करें</string> + <string name="flathub_remove_title">%1$s हटाएं?</string> + <string name="flathub_remove_note">इसकी सेटिंग और फ़ाइलें बनी रहती हैं।</string> + <string name="flathub_keep">रखें</string> + <string name="desktop_size">डिस्क पर आकार</string> + <string name="desktop_uninstall_title">डेस्कटॉप अनइंस्टॉल करें?</string> + <string name="desktop_all_systems">सभी</string> + <string name="gog_achievements">GOG उपलब्धियां</string> + <string name="gog_achievements_hint">समर्थित GOG गेम के लिए उपलब्धियां सिंक करता है। यह अगली बार लॉन्च करने पर लागू होगा।</string> + <string name="gog_achievements_off">उपलब्धियां बंद</string> + <string name="gog_achievements_on">उपलब्धियां चालू</string> + <string name="gog_achievements_signin">GOG में फिर से साइन इन करें</string> + <string name="gog_achievements_uploaded">उपलब्धियां अपलोड हुईं</string> + <string name="gog_achievements_pending">उपलब्धि अपलोड होना बाकी है</string> + <string name="gog_achievements_enable_store">Stores सेटिंग में GOG उपलब्धियां चालू करें</string> + <string name="gog_achievements_unavailable">उपलब्धियां उपलब्ध नहीं; सेशन लॉग देखें</string> + <string name="achievement_unlocked">उपलब्धि अनलॉक हुई</string> + <string name="touch_paste">पेस्ट करें</string> + <string name="touch_dpad">डी-पैड</string> + <string name="touch_left_stick">बायां स्टिक</string> + <string name="touch_right_stick">दायां स्टिक</string> + <string name="touch_menu">मेन्यू</string> + <string name="touch_keyboard">कीबोर्ड</string> + <string name="touch_dpad_up">डी-पैड ऊपर</string> + <string name="touch_dpad_down">डी-पैड नीचे</string> + <string name="touch_dpad_left">डी-पैड बायां</string> + <string name="touch_dpad_right">डी-पैड दायां</string> + <string name="touch_title">टच कंट्रोल</string> + <string name="touch_controller">टच कंट्रोलर</string> + <string name="touch_mouse">माउस</string> + <string name="touch_on">ऑन</string> + <string name="touch_off">ऑफ</string> + <string name="touch_speed_slow">धीमी</string> + <string name="touch_speed_normal">सामान्य</string> + <string name="touch_speed_fast">तेज़</string> + <string name="touch_edit_layout">लेआउट बदलें</string> + <string name="touch_droiddeck_menu">DroidDeck मेन्यू</string> + <string name="touch_drag_hint">कंट्रोल को स्क्रीन पर खींचकर रखें</string> + <string name="touch_arrange">व्यवस्थित करें</string> + <string name="touch_discard">रद्द करें</string> + <string name="touch_saving">सेव हो रहा है…</string> + <string name="touch_icon">आइकॉन</string> + <string name="touch_narrower">चौ−</string> + <string name="touch_wider">चौ+</string> + <string name="touch_shorter">ऊं−</string> + <string name="touch_taller">ऊं+</string> + <string name="touch_hide">छिपाएं</string> + <string name="touch_color_opacity">रंग और ओपैसिटी…</string> + <string name="touch_copy_layout">यह लेआउट कॉपी करें</string> + <string name="touch_layout_copied">लेआउट कॉपी हो गया; इसे किसी भी गेम के टच लेआउट में पेस्ट करें</string> + <string name="touch_paste_layout">कॉपी किया लेआउट पेस्ट करें</string> + <string name="touch_reset_layout">Steam के डिफ़ॉल्ट पर रीसेट करें</string> + <string name="touch_no_binding">इस कंट्रोल की Steam में कोई बाइंडिंग नहीं है जिसे आइकॉन दिया जा सके</string> + <string name="touch_icon_for">%1$s के लिए आइकॉन</string> + <string name="touch_layout_color">टच लेआउट का रंग</string> + <string name="touch_done">हो गया</string> + <string name="touch_save_failed">टच लेआउट सेव नहीं हो सका</string> + <string name="touch_saved">टच लेआउट Steam में सेव हो गया</string> + <string name="touch_app_id">ऐप %1$d</string> + <string name="touch_label_hint">लेबल (वैकल्पिक)</string> + <string name="touch_icons_missing">Steam के आइकॉन नहीं मिले</string> + <plurals name="touch_icons_found"> + <item quantity="one">Steam से %1$d आइकॉन</item> + <item quantity="other">Steam से %1$d आइकॉन</item> + </plurals> + <string name="touch_icon_color">आइकॉन का रंग</string> + <string name="touch_button_color">बटन का रंग</string> + <string name="touch_no_icon">कोई आइकॉन नहीं</string> + + <string name="stores_sync_sign_in">साइन-इन जांचा जा रहा है…</string> + <string name="stores_sync_library">आपकी लाइब्रेरी लाई जा रही है…</string> + <string name="stores_sync_game_list">गेम लिस्ट लाई जा रही है…</string> + <string name="stores_sync_details">गेम की जानकारी लोड हो रही है… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">%1$d गेम सिंक हो रहा है…</item> + <item quantity="other">%1$d गेम सिंक हो रहे हैं…</item> + </plurals> + <string name="stores_sync_progress">सिंक हो रहा है… %1$d/%2$d</string> + <string name="stores_sync_cover_art">कवर इमेज लाई जा रही हैं…</string> + <string name="stores_sync_failed">सिंक नहीं हो सका</string> + <string name="stores_sync_no_games">आपकी %1$s लाइब्रेरी में कोई गेम नहीं मिला</string> + <string name="stores_sync_amazon_no_answer">आपकी लाइब्रेरी के लिए Amazon Games ने जवाब नहीं दिया: रिफ्रेश करें, या फिर से साइन इन करें</string> + <string name="stores_sync_gog_unreachable">GOG से कनेक्ट नहीं हो सका</string> + <string name="stores_sync_gog_unreadable">आपकी GOG लाइब्रेरी पढ़ी नहीं जा सकी</string> + <string name="stores_registering">Steam में रजिस्टर हो रहा है…</string> + <string name="mode_client_arch">Steam क्लाइंट</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC डायग्नोस्टिक्स</string> + <string name="setup_vac_diag_hint">Source गेम अपना कंसोल लॉग करते हैं (-condebug); सेशन लॉग में vac.txt बताता है कि सुरक्षित है या नहीं</string> + <string name="load_starting_steam_x64">Steam x86-64 शुरू हो रहा है</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">x86-64 Steam क्लाइंट इसका उपयोग करता है</string> + <string name="storage_uninstall_in_x64">यह कॉपी x86-64 Steam क्लाइंट में है। Steam क्लाइंट में x86-64 चुनें, फिर इसे यहाँ अनइंस्टॉल करें।</string> + <string name="storage_uninstall_in_arm64">यह कॉपी ARM64 Steam क्लाइंट में है। Steam क्लाइंट में ARM64 चुनें, फिर इसे यहाँ अनइंस्टॉल करें।</string> + <string name="drawer_page_glasses">चश्मा</string> + <string name="glasses_open">VITURE चश्मा</string> + <string name="glasses_control">चश्मे का कंट्रोल</string> + <string name="glasses_driver_missing">इस बिल्ड में इस चश्मे का ड्राइवर शामिल नहीं है।</string> + <string name="glasses_connection_failed">चश्मे से कनेक्ट नहीं हो सका। केबल फिर से लगाएं या दोबारा कोशिश करने के लिए अनुमति दें पर टैप करें।</string> + <string name="glasses_allow">अनुमति दें</string> + <string name="glasses_allow_hint">DroidDeck को चश्मे का रिफ्रेश रेट, 3D मोड, ब्राइटनेस, वॉल्यूम और सनब्लॉक सेट करने और उसकी हेड ट्रैकिंग पढ़ने दें।</string> + <string name="glasses_asking">Android के प्रॉम्प्ट में आपकी अनुमति का इंतज़ार है…</string> + <string name="glasses_denied">कंट्रोल की अनुमति नहीं दी गई। चश्मे की सेटिंग बदलने के लिए इसकी अनुमति दें।</string> + <string name="glasses_no_control">यह चश्मा गेम दिखाता है, लेकिन इसकी सेटिंग यहां से नहीं बदली जा सकतीं।</string> + <string name="glasses_output">आउटपुट</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">चश्मे पर गेम</string> + <string name="glasses_game_on_hint">गेम सिर्फ़ चश्मे पर दिखाता है। बंद: गेम फ़ोन पर दिखता है और Android फ़ोन की स्क्रीन मिरर करता है।</string> + <string name="glasses_display">डिस्प्ले</string> + <string name="glasses_refresh">रिफ्रेश रेट</string> + <string name="glasses_3d">3D (साइड-बाय-साइड)</string> + <string name="glasses_3d_hint">स्मार्ट ग्लास को साइड-बाय-साइड 3D पर स्विच करें। हेड ट्रैकिंग को अलग से कंट्रोल किया जाता है।</string> + <string name="glasses_3d_failed">3D सिग्नल की पुष्टि नहीं हुई। 2D तस्वीर वापस आने पर फिर कोशिश करें।</string> + <string name="glasses_no_signal">कोई तस्वीर नहीं: चश्मा ऐसे मोड में है जिसे यह फ़ोन नहीं भेज सकता। उसका 2D/3D बटन दबाकर रखें, या केबल निकालकर फिर से लगाएं।</string> + <string name="glasses_3d_refresh">3D रिफ्रेश रेट</string> + <string name="glasses_auto3d">VR गेम के लिए 3D</string> + <string name="glasses_auto3d_hint">SteamVR चलने के दौरान 3D पर चला जाता है, और बाद में वापस आ जाता है।</string> + <string name="glasses_picture">पिक्चर</string> + <string name="glasses_picture_hint">ऑटोमैटिक दोनों आँखों में फ़्लैट कंटेंट दिखाता है और SteamVR को डिटेक्ट करता है। SBS कंटेंट के लिए साइड-बाय-साइड गेम चुनें।</string> + <string name="glasses_picture_auto">ऑटोमैटिक</string> + <string name="glasses_picture_screen">वर्चुअल स्क्रीन</string> + <string name="glasses_picture_sbs">साइड-बाय-साइड गेम</string> + <string name="glasses_screen_size">स्क्रीन की चौड़ाई</string> + <string name="glasses_screen_distance">स्क्रीन की दूरी</string> + <string name="glasses_screen_next_session">जब कोई गेम चश्मे पर वर्चुअल स्क्रीन के रूप में चलता है, तब चौड़ाई और दूरी लागू होती हैं।</string> + <string name="glasses_screen_no_output">ये सेटिंग तब लागू होती हैं जब चश्मे पर गेम चालू हो और गेम वहीं दिख रहा हो।</string> + <string name="glasses_screen_flat_hint">ऑटोमैटिक इस 2D गेम को फ़ुल-स्क्रीन रखता है। इसकी चौड़ाई, दूरी और हेड ट्रैकिंग बदलने के लिए वर्चुअल स्क्रीन इस्तेमाल करें।</string> + <string name="glasses_screen_use">वर्चुअल स्क्रीन इस्तेमाल करें</string> + <string name="glasses_screen_direct_hint">SteamVR व्यू को भरता है। VR में इसके फ़ील्ड ऑफ़ व्यू को एडजस्ट करें; चौड़ाई और दूरी सिर्फ़ वर्चुअल स्क्रीन पर लागू होती है।</string> + <string name="glasses_screen_sbs_hint">साइड-बाय-साइड गेम हर आंख का व्यू भर देते हैं। चौड़ाई और दूरी सिर्फ़ वर्चुअल स्क्रीन पर लागू होती हैं।</string> + <string name="glasses_tracking_flat_hint">ऑटोमैटिक इस 2D गेम को व्यू में एक जगह टिकाए रखता है। हेड ट्रैकिंग इस्तेमाल करने के लिए डिस्प्ले में वर्चुअल स्क्रीन चुनें।</string> + <string name="glasses_tracking_sbs_hint">हेड ट्रैकिंग वर्चुअल स्क्रीन या चल रहे SteamVR गेम पर लागू होती है।</string> + <string name="glasses_hardware">डिवाइस</string> + <string name="glasses_brightness">ब्राइटनेस</string> + <string name="glasses_volume">वॉल्यूम</string> + <string name="glasses_sunblock">सनब्लॉक</string> + <string name="glasses_sunblock_hint">आगे के लेंस गहरे करता है।</string> + <string name="glasses_tracking">ट्रैकिंग</string> + <string name="glasses_head_tracking">हेड ट्रैकिंग</string> + <string name="glasses_head_tracking_hint">चश्मे के अपने सेंसर वर्चुअल स्क्रीन और SteamVR को आपके सिर के साथ घुमाते हैं।</string> + <string name="glasses_recenter">व्यू को फिर से बीच में लाएं</string> + <string name="glasses_recenter_button">स्क्रीन फिर से केंद्रित करें</string> + <string name="glasses_vr_fov">SteamVR फ़ील्ड ऑफ़ व्यू</string> + <string name="glasses_vr_fov_hint">कम करने पर SteamVR पास आता है और चश्मा भर देता है; ज़्यादा करने पर आपके आस-पास ज़्यादा दिखता है।</string> + <string name="glasses_playing">%1$s पर खेल रहे हैं</string> + <string name="glasses_calibration">ट्रैकिंग कैलिब्रेशन</string> + <string name="glasses_calibration_hint">ड्रिफ़्ट कम करता है और क्षैतिज संदर्भ को सीध में लाता है।</string> + <string name="glasses_calibration_saved_hint">इस चश्मे पर सेव किया गया कैलिब्रेशन लागू है।</string> + <string name="glasses_calibration_open">कैलिब्रेट करें</string> + <string name="glasses_calibration_instructions">जुड़े हुए चश्मे को किसी समतल सतह पर उल्टा रखें, ताकि फ़्रेम बराबर टिका रहे। शुरू करें पर टैप करें, फिर लगभग 8 सेकंड तक उसे न छुएं। हिलने पर माप फिर से शुरू हो जाता है। इससे ड्रिफ़्ट और झुकाव ठीक होते हैं, सामने की दिशा नहीं।</string> + <string name="glasses_calibration_settling">चश्मे को उल्टा रहने दें और उसे न छुएं। उसके स्थिर होने का इंतज़ार है…</string> + <string name="glasses_calibration_collecting">सेंसर का माप लिया जा रहा है। चश्मे को स्थिर रखें।</string> + <string name="glasses_calibration_moving">हलचल मिली। चश्मे को न छुएं; माप अपने-आप फिर से शुरू होगा।</string> + <string name="glasses_calibration_turn_over">चश्मे को किसी समतल सतह पर उल्टा रखें। सही तरह रखते ही माप शुरू हो जाएगा।</string> + <string name="glasses_calibration_complete">कैलिब्रेशन सेव हो गया। चश्मा पहनें और सीधे सामने देखें, फिर व्यू बीच में लाने के लिए हो गया पर टैप करें।</string> + <string name="glasses_calibration_failed">कैलिब्रेशन पूरा नहीं हो सका। कनेक्शन जांचें और चश्मे को स्थिर रखें, फिर दोबारा कोशिश करें। आपका पिछला कैलिब्रेशन नहीं बदला है।</string> + <string name="glasses_calibration_start">शुरू करें</string> + <string name="glasses_calibration_done">हो गया</string> + <string name="glasses_calibration_reset">ट्रैकिंग कैलिब्रेशन रीसेट करें</string> + <string name="glasses_calibration_reset_hint">सेव किया गया कैलिब्रेशन हटाकर मॉडल का डिफ़ॉल्ट वापस लाएं? चश्मा दोबारा पहनने के बाद व्यू बीच में लाएं।</string> + <string name="glasses_calibration_reset_button">रीसेट करें</string> + <string name="hand_camera_group">हाथ ट्रैकिंग</string> + <string name="hand_camera_prompt_title">फ़ोन कैमरे से हाथ या Joy-Con कंट्रोलर ट्रैक करें?</string> + <string name="hand_camera_prompt_body">बिना कंट्रोलर कनेक्ट किए, फ़ोन कैमरा VR में आपके खाली हाथों को ट्रैक करता है: क्लिक करने के लिए अपने अंगूठे और इंडेक्स फिंगर को पिंच करें, पकड़ने के लिए अपना हाथ बंद करें, और अपनी हथेली को अपनी ओर घुमाएं और मेनू खोलने के लिए पिंच करें। पेयर्ड Joy-Con कंट्रोलर के साथ, कैमरा उनकी पोज़िशन को ट्रैक करता है जबकि Joy-Con कंट्रोलर रोटेशन और बटन इनपुट देते हैं। पिक्चर इस डिवाइस पर प्रोसेस की जाती हैं और कभी सेव या भेजी नहीं जातीं।</string> + <string name="hand_camera_rear">रियर कैमरा</string> + <string name="hand_camera_rear_hint">सुझाया गया। आमतौर पर ज़्यादा शार्प और चौड़ा।</string> + <string name="hand_camera_front">फ्रंट कैमरा</string> + <string name="hand_camera_front_hint">जब डिवाइस का पिछला हिस्सा आपकी ओर न हो, तब इस्तेमाल करें।</string> + <string name="hand_camera_allow">कैमरा इस्तेमाल करें</string> + <string name="hand_camera_not_now">अभी नहीं</string> + <string name="hand_camera_setting">कैमरे से हाथ ट्रैकिंग</string> + <string name="hand_camera_setting_hint">नंगे हाथों से जेस्चर के लिए या VR में पेयर्ड Joy-Con कंट्रोलर्स को सही जगह पर लगाने के लिए फ़ोन कैमरे का इस्तेमाल करें। Joy-Con कंट्रोलर्स रोटेशन और बटन इनपुट देते हैं। जब स्मार्ट ग्लास आपके हाथों या Joy-Con कंट्रोलर्स को ट्रैक करते हैं, तो यह पॉज़ करता है। इमेज सिर्फ़ इसी डिवाइस पर प्रोसेस की जाती हैं।</string> + <string name="hand_camera_choice">कैमरा</string> + <string name="hand_camera_access">कैमरा एक्सेस</string> + <string name="hand_camera_access_hint">हाथ ट्रैकिंग शुरू करने के लिए कैमरा एक्सेस की अनुमति दें।</string> + <string name="hand_camera_access_denied">कैमरा एक्सेस बंद है। इसे Android सेटिंग में चालू करें।</string> + <string name="hand_camera_allow_button">अनुमति दें</string> + <string name="hand_camera_open_settings">सेटिंग खोलें</string> + <string name="hand_camera_placement">कैमरे की स्थिति</string> + <string name="hand_camera_placement_hint">खेलने से पहले जांच लें कि कैमरा आपको देख पा रहा है।</string> + <string name="hand_camera_check">जांचें</string> + <string name="hand_camera_check_title">कैमरे की स्थिति</string> + <string name="hand_camera_how_rear">डिवाइस को करीब सीने की ऊंचाई पर, 1.5 से 2 मीटर दूर खड़ा करें, जिसमें रियर कैमरा आपकी ओर हो। फिर हाथ फैलाकर नज़र के दायरे में आएं।</string> + <string name="hand_camera_how_front">डिवाइस को करीब सीने की ऊंचाई पर, 1.5 से 2 मीटर दूर खड़ा करें, जिसमें स्क्रीन आपकी ओर हो। फिर हाथ फैलाकर नज़र के दायरे में आएं।</string> + <string name="hand_camera_starting">कैमरा शुरू हो रहा है…</string> + <string name="hand_camera_stand_up">डिवाइस सपाट लेटा है। इसे ऐसे खड़ा करें कि कैमरा आपकी ओर हो।</string> + <string name="hand_camera_upright">डिवाइस को ज़्यादा सीधा खड़ा करें ताकि कैमरा आपकी ओर हो।</string> + <string name="hand_camera_not_seen">अभी आप दिख नहीं रहे। नज़र के दायरे में आएं ताकि आपका सिर और कंधे दिखें।</string> + <string name="hand_camera_move_back">थोड़ा पीछे हटें।</string> + <string name="hand_camera_move_closer">थोड़ा और पास आएं।</string> + <string name="hand_camera_show_hands">दोनों हाथ वहां फैलाएं जहां कैमरा उन्हें देख सके।</string> + <string name="hand_camera_good">ठीक लग रहा है।</string> + <string name="hand_camera_failed">कैमरा शुरू नहीं हो सका। इसे इस्तेमाल करने वाले दूसरे ऐप बंद करें और फिर कोशिश करें।</string> + <string name="hand_camera_switch">कैमरा बदलें</string> + <string name="hand_camera_skip">छोड़ें</string> + <string name="hand_camera_done">हो गया</string> + <string name="glasses_xreal_network_missing">चश्मे के USB Ethernet कनेक्शन का इंतज़ार है। हो सकता है यह फ़ोन इसे ऐप्स को उपलब्ध न कराए।</string> + <string name="glasses_xreal_connection_failed">XREAL कनेक्शन टूट गया या उसने ऐसा जवाब दिया जो समर्थित नहीं है। फिर से कोशिश हो रही है…</string> + <string name="glasses_xreal_experimental">1S के लिए प्रायोगिक सपोर्ट। चश्मे के मेनू में Follow मोड चुनें और स्टेबिलाइज़ेशन बंद करें। ट्रैकिंग की दिशाएं और डिस्प्ले मोड अभी डिवाइस पर टेस्ट होने बाकी हैं।</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard मोड</string> + <string name="cardboard_mode_hint">फ़ोन VR व्यूअर के लिए बाईं और दाईं आंख के व्यू।</string> + <string name="cardboard_source">तस्वीर</string> + <string name="cardboard_source_screen">वर्चुअल स्क्रीन</string> + <string name="cardboard_source_sbs">साइड-बाय-साइड 3D</string> + <string name="cardboard_viewer">व्यूअर</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">कोई लेंस नहीं</string> + <string name="cardboard_ipd">आंखों की दूरी</string> + <string name="cardboard_screen_width">स्क्रीन की चौड़ाई</string> + <string name="cardboard_screen_distance">स्क्रीन की दूरी</string> + <string name="cardboard_head_tracking">हेड ट्रैकिंग</string> + <string name="cardboard_no_sensor">इस डिवाइस में रोटेशन सेंसर नहीं है।</string> + <string name="cardboard_recenter">व्यू को फिर से बीच में लाएं</string> + <string name="cardboard_recenter_button">बीच में लाएं</string> + <string name="cardboard_steamvr">SteamVR (प्रायोगिक)</string> + <string name="cardboard_steamvr_install">इंस्टॉल करें</string> + <string name="cardboard_steamvr_installing">SteamVR डाउनलोड और अनपैक हो रहा है…</string> + <string name="cardboard_steamvr_start">शुरू करें</string> + <string name="cardboard_steamvr_stop">रोकें</string> + <string name="cardboard_steamvr_unavailable">इस सेशन में उपलब्ध नहीं है।</string> + <string name="cardboard_steamvr_failed">SteamVR ने जवाब नहीं दिया; सेशन लॉग देखें।</string> + <string name="drawer_component_downloads">कंपोनेंट डाउनलोड करें</string> + <string name="drawer_component_downloads_hint">डाउनलोड Components पेज के साथ साझा होते हैं। अगली बार गेम शुरू होने पर इस्तेमाल करने के लिए ऊपर डाउनलोड किया गया वर्शन चुनें।</string> + <string name="drawer_component_choose_download">डाउनलोड करने के लिए वर्शन चुनें</string> + <string name="stores_fact_developer">डेवलपर</string> + <string name="stores_fact_publisher">पब्लिशर</string> + <string name="stores_fact_released">रिलीज़</string> + <string name="stores_hltb_main">मुख्य</string> + <string name="stores_hltb_extras">+ एक्स्ट्रा</string> + <string name="stores_hltb_completionist">पूरा</string> + <string name="stores_hltb_hours">%1$s घं</string> + <string name="stores_hltb_minutes">%1$d मि</string> + <string name="display_picture_position">चित्र की स्थिति</string> + <string name="display_position_top">ऊपर</string> + <string name="display_position_bottom">नीचे</string> + <string name="display_position_center">बीच में (डिफ़ॉल्ट)</string> + <string name="setup_tab_storage">स्टोरेज</string> + <string name="storage_measuring">स्टोरेज मापा जा रहा है…</string> + <string name="storage_measuring_hint">पहली बार कुछ सेकंड लगते हैं।</string> + <string name="storage_internal">आंतरिक स्टोरेज</string> + <string name="storage_used_of">%2$s में से %1$s इस्तेमाल</string> + <string name="storage_free">%1$s खाली</string> + <string name="storage_droiddeck_uses">DroidDeck %1$s इस्तेमाल करता है। %2$s पर मापा गया।</string> + <string name="storage_rescanning">फिर से माप रहे हैं…</string> + <string name="storage_other_apps">दूसरे Android ऐप</string> + <string name="storage_safe_now">अभी खाली की जा सकती है</string> + <string name="storage_safe_hint">अप्रयुक्त रनटाइम, बचे अवशेष, पुराने लॉग</string> + <string name="storage_clean_up">साफ़ कर रहे हैं…</string> + <string name="storage_session_running">साफ़ करने या कुछ हटाने के लिए सेशन रोकें। आकार दिखते रहेंगे।</string> + <string name="storage_where">कहाँ जाता है</string> + <string name="storage_games">Steam गेम</string> + <string name="storage_game_data">गेम डेटा</string> + <string name="storage_game_data_hint">प्रीफ़िक्स %1$s · वर्कशॉप %2$s · शेडर %3$s</string> + <string name="storage_tools">Proton और रनटाइम</string> + <string name="storage_tools_unused">%1$s अप्रयुक्त</string> + <string name="storage_stores">GOG, Epic और दूसरे स्टोर</string> + <string name="storage_stores_hint">इन्हें स्टोर में हटाएँ</string> + <string name="storage_desktop">डेस्कटॉप ऐप</string> + <string name="storage_desktop_hint">Flatpak ऐप और रनटाइम</string> + <string name="storage_system">Linux सिस्टम और Steam क्लाइंट</string> + <string name="storage_system_hint">कुछ भी चलाने के लिए ज़रूरी</string> + <string name="storage_app_data">DroidDeck डेटा</string> + <string name="storage_app_data_hint">पुराने सेशन के लॉग %1$s · कैश · ड्राइवर</string> + <string name="storage_legend_games">गेम</string> + <string name="storage_legend_data">गेम डेटा</string> + <string name="storage_legend_tools">Proton और रनटाइम</string> + <string name="storage_legend_stores">दूसरे स्टोर</string> + <string name="storage_legend_desktop">डेस्कटॉप ऐप</string> + <string name="storage_legend_system">Linux सिस्टम</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">साफ़ करें</string> + <string name="storage_clean_up_lede">यहाँ कुछ भी इंस्टॉल किए गेम या चालू डाउनलोड को नहीं छूता।</string> + <string name="storage_nothing_to_clean">अभी साफ़ करने के लिए कुछ नहीं है।</string> + <string name="storage_selected">चुना गया: %1$s · %2$s → %3$s खाली होगा</string> + <string name="storage_cleaning">साफ़ कर रहे हैं…</string> + <string name="storage_free_button">%1$s खाली करें</string> + <string name="storage_freed">%1$s खाली किया गया।</string> + <string name="storage_item_runtimes">अप्रयुक्त Steam रनटाइम और Proton</string> + <string name="storage_item_leftovers">हटाए गए गेम के अवशेष</string> + <string name="storage_item_leftovers_unsure">अवशेष जिनमें सेव हो सकते हैं</string> + <string name="storage_item_logs">पुराने सेशन के लॉग</string> + <string name="storage_item_logs_detail">मौजूदा सेशन के लॉग बने रहते हैं</string> + <string name="storage_item_custom_detail">कोई गेम इसे इस्तेमाल नहीं करता। ज़रूरत हो तो कॉम्पोनेंट में फिर से इंस्टॉल करें।</string> + <string name="storage_item_shaders">इंस्टॉल किए गेम का शेडर कैश</string> + <string name="storage_item_shaders_detail">खेलते समय फिर बनता है। हर गेम के पहले कुछ मिनट फिर अटकेंगे।</string> + <string name="storage_tag_safe">सुरक्षित</string> + <string name="storage_tag_unused">अप्रयुक्त</string> + <string name="storage_tag_stutter">अटकना</string> + <string name="storage_tag_saves">सेव जाँचें</string> + <string name="storage_tag_default">डिफ़ॉल्ट</string> + <string name="storage_tag_required">ज़रूरी</string> + <string name="storage_tag_not_used">अप्रयुक्त</string> + <string name="storage_back">स्टोरेज</string> + <string name="storage_games_with_data">%1$s उनके डेटा के साथ</string> + <string name="storage_sort_largest">सबसे बड़ा</string> + <string name="storage_sort_least_played">सबसे कम खेला</string> + <string name="storage_sort_sd">SD कार्ड पर</string> + <string name="storage_no_games">यहाँ कोई गेम नहीं है।</string> + <string name="storage_played">%1$s खेला</string> + <string name="storage_never_played">कभी नहीं खेला</string> + <string name="storage_game_parts">गेम %1$s · डेटा %2$s</string> + <string name="storage_uninstall">अनइंस्टॉल करें</string> + <string name="storage_games_note">अनइंस्टॉल करने पर Steam विंडो खुलती है ताकि Steam इसे दर्ज करे। गेम को SD कार्ड पर ले जाने के लिए Steam › सेटिंग › स्टोरेज इस्तेमाल करें।</string> + <string name="storage_uninstall_title">%1$s अनइंस्टॉल करें?</string> + <string name="storage_uninstall_body">Steam खुलेगा और पुष्टि माँगेगा। इससे गेम की %1$s खाली होती है। अवशेष साफ़ करने तक प्रीफ़िक्स बना रहता है, और Steam Cloud सेव आपके खाते में रहते हैं।</string> + <string name="storage_open_steam">Steam खोलें</string> + <string name="storage_tools_detail">%1$s · %2$s अप्रयुक्त</string> + <string name="storage_remove_unused">अप्रयुक्त हटाएँ · %1$s</string> + <string name="storage_in_use">इस्तेमाल में</string> + <string name="storage_not_used">अप्रयुक्त</string> + <string name="storage_remove">हटाएँ</string> + <string name="storage_remove_title">%1$s हटाएँ?</string> + <string name="storage_remove_body">%1$s खाली होगा। किसी गेम को ज़रूरत होने पर Steam इसे फिर डाउनलोड करेगा।</string> + <string name="storage_tool_fex_runtime">Linux x86 गेम के लिए ज़रूरी (FEX)</string> + <string name="storage_tool_arm_runtime">ARM64 Proton के लिए ज़रूरी</string> + <string name="storage_tool_redist">गेम को ज़रूरी VC++ और DirectX इंस्टॉल</string> + <string name="storage_tool_fex">Linux x86 गेम चलाता है</string> + <string name="storage_tool_steam">Steam टूल</string> + <string name="storage_tool_old_runtime">DroidDeck इस रनटाइम के बिना गेम चलाता है</string> + <string name="storage_tool_x86_proton">Proton x86, जिसे DroidDeck नहीं चला सकता</string> + <string name="storage_tool_custom_default">सभी गेम के लिए डिफ़ॉल्ट</string> + <string name="storage_tool_custom_unused">कोई गेम इसे इस्तेमाल नहीं करता</string> + <string name="storage_tool_custom_unknown">Steam सेटिंग पढ़ी नहीं जा सकतीं, इसलिए यह रखा जाता है</string> + <string name="storage_cleanup_busy">स्टोरेज सफ़ाई पूरी होने का इंतज़ार करें</string> + <string name="storage_low_title">सिर्फ़ %1$s खाली</string> + <string name="storage_low_body">Steam को अपडेट और शेडर कैश के लिए जगह चाहिए। 10 GB से कम पर गेम अपडेट बीच में विफल हो सकते हैं।</string> + <string name="storage_low_safe">%1$s सुरक्षित रूप से खाली किया जा सकता है।</string> + <string name="storage_free_up">जगह खाली करें</string> + <string name="storage_play_anyway">फिर भी खेलें</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d इंस्टॉल</item> + <item quantity="other">%d इंस्टॉल</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d SD कार्ड पर</item> + <item quantity="other">%d SD कार्ड पर</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d टूल</item> + <item quantity="other">%d टूल</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">%d गेम के खाली प्रीफ़िक्स फ़ोल्डर और शेडर कैश</item> + <item quantity="other">%d गेम के खाली प्रीफ़िक्स फ़ोल्डर और शेडर कैश</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">%d गेम के प्रीफ़िक्स में अब भी फ़ाइलें हैं, जिनमें लोकल सेव भी हैं। ज़रूरत हो तो पहले कॉपी बना लें।</item> + <item quantity="other">%d गेम के प्रीफ़िक्स में अब भी फ़ाइलें हैं, जिनमें लोकल सेव भी हैं। ज़रूरत हो तो पहले कॉपी बना लें।</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d गेम</item> + <item quantity="other">%d गेम</item> + </plurals> + <string name="storage_tool_default_proton">DroidDeck का डिफ़ॉल्ट Proton</string> + <string name="storage_tool_proton">DroidDeck का Proton 11 विकल्प</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d गेम इस्तेमाल करता है</item> + <item quantity="other">%d गेम इस्तेमाल करते हैं</item> + </plurals> + <string name="storage_legend_components">कॉम्पोनेंट</string> + <string name="storage_components">कॉम्पोनेंट</string> + <string name="storage_item_components">अप्रयुक्त कॉम्पोनेंट</string> + <string name="storage_component_original">मूल %1$s · %2$s</string> + <string name="storage_original_confirm">%1$s खाली होगा। सिर्फ़ वह Proton संस्करण लौटाता है जो अब इंस्टॉल नहीं है।</string> + <string name="storage_leftovers_unchecked">जाँचा नहीं गया: Steam ऐप का मैनिफ़ेस्ट पढ़ा नहीं जा सकता, इसलिए हटाए गेम के प्रीफ़िक्स तब तक रहेंगे जब तक यह संभव न हो।</string> + <string name="storage_failed">विफल: %1$s</string> + <string name="storage_desktop_shared">%1$s साझा</string> + <string name="storage_data_installed">इंस्टॉल किए गेम</string> + <string name="storage_data_parts">प्रीफ़िक्स %1$s · शेडर %2$s · वर्कशॉप %3$s</string> + <string name="storage_clear_shaders">शेडर साफ़ करें</string> + <string name="storage_data_leftovers">हटाए गए गेम</string> + <string name="storage_steam_app">Steam ऐप %1$d</string> + <string name="storage_leftover_unsure_detail">प्रीफ़िक्स में अब भी फ़ाइलें हैं, शायद लोकल सेव</string> + <string name="storage_leftover_confirm">Wine प्रीफ़िक्स और शेडर कैश साफ़ करता है (%1$s)। पहले ज़रूरी सेव की कॉपी बना लें; Steam Cloud सेव आपके खाते में रहते हैं।</string> + <string name="storage_data_other">रखा गया</string> + <string name="storage_data_other_title">गैर-Steam गेम और साझा Steam प्रीफ़िक्स</string> + <string name="storage_data_other_detail">स्टोर से या हाथ से जोड़े गेम के प्रीफ़िक्स</string> + <string name="storage_components_packages">डाउनलोड किए पैकेज</string> + <string name="storage_components_originals">रखे गए मूल</string> + <string name="storage_components_none">कोई कॉम्पोनेंट पैकेज डाउनलोड नहीं है।</string> + <string name="storage_component_in_use">किसी Proton या गेम के लिए चुना गया</string> + <string name="storage_component_unused">कहीं नहीं चुना गया</string> + <string name="storage_original_kept">इंस्टॉल किया Proton लौटाता है</string> + <string name="storage_original_old">Proton संस्करण जो अब इंस्टॉल नहीं है</string> + <string name="storage_tag_in_use">इस्तेमाल में</string> + <string name="storage_components_note">इस्तेमाल में कॉम्पोनेंट लॉक रहते हैं। इन्हें कॉम्पोनेंट में चुनें; यहाँ हटाया हुआ वहाँ फिर डाउनलोड किया जा सकता है।</string> + <string name="storage_component_confirm">%1$s खाली होगा। खुद आयात किए पैकेज फिर डाउनलोड नहीं हो सकते।</string> + <string name="storage_desktop_detail">Flatpak ऐप और उनकी साझा चीज़ों के लिए %1$s</string> + <string name="storage_desktop_apps_title">ऐप</string> + <string name="storage_desktop_none">कोई Flatpak ऐप इंस्टॉल नहीं है।</string> + <string name="storage_desktop_shared_title">ऐप के बीच साझा</string> + <string name="storage_desktop_runtimes">रनटाइम</string> + <string name="storage_desktop_runtimes_detail">जिन लाइब्रेरी पर ऐप चलते हैं; अप्रयुक्त अप्रयुक्त हटाएँ से चले जाते हैं</string> + <string name="storage_desktop_cache">डाउनलोड स्टोरेज</string> + <string name="storage_desktop_cache_detail">Flatpak का ऑब्जेक्ट स्टोर और डाउनलोड किया कैश</string> + <string name="storage_desktop_prune">अप्रयुक्त हटाएँ</string> + <string name="storage_desktop_prune_body">वे रनटाइम हटाता है जिनकी किसी इंस्टॉल किए ऐप को ज़रूरत नहीं, और Flatpak का ऑब्जेक्ट स्टोर साफ़ करता है। इंस्टॉल किए ऐप चलते रहते हैं।</string> + <string name="storage_flatpak_uninstall_body">ऐप (%1$s) और वे रनटाइम हटाता है जिन्हें कोई और इस्तेमाल नहीं करता। आपके होम फ़ोल्डर का डेटा बना रहता है।</string> + <plurals name="storage_components_count"> + <item quantity="one">%d पैकेज</item> + <item quantity="other">%d पैकेज</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d ऐप</item> + <item quantity="other">%d ऐप</item> + </plurals> + <string name="boot_movie">बूट वीडियो</string> + <string name="boot_movie_video">वीडियो</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps ज़्यादा स्मूथ दिखता है, लेकिन Steam शुरू होते समय CPU ज़्यादा इस्तेमाल करता है। Steam की अपनी सेटिंग्स में चुना गया स्टार्टअप वीडियो प्राथमिकता लेता है।</string> + <string name="boot_movie_sound">आवाज़</string> + <string name="boot_movie_custom">अपना वीडियो</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV या WebM. दूसरे फ़ॉर्मैट और %1$d MB से बड़ी फ़ाइलें डिवाइस पर 720p WebM में बदली जाती हैं, %2$d सेकंड तक।</string> + <string name="boot_movie_import">इंपोर्ट करें</string> + <string name="boot_movie_remove">हटाएं</string> + <string name="boot_movie_pick">बूट वीडियो चुनें</string> + <string name="boot_movie_imported">%1$s अब बूट वीडियो है</string> + <string name="boot_movie_imported_silent">%1$s अब बूट वीडियो है, बिना आवाज़ के</string> + <string name="boot_movie_too_long">बदले जाने वाले वीडियो %1$d सेकंड या उससे छोटे होने चाहिए</string> + <string name="boot_movie_converting">बदला जा रहा है %1$d%%</string> + <string name="boot_movie_converting_started">%1$s को Steam के लिए बदला जा रहा है। DroidDeck खुला रखें।</string> + <string name="boot_movie_unsupported">यह डिवाइस उस वीडियो को डिकोड नहीं कर सकता।</string> + <string name="boot_movie_import_failed">वीडियो इंपोर्ट नहीं हो सका</string> + <string name="glasses_experimental">Luma Ultra कैमरे — एक्सपेरिमेंटल</string> + <string name="glasses_joycons">Joy-Con पोजीशन ट्रैकिंग</string> + <string name="glasses_joycons_hint">अपने पेयर्ड Joy-Con कंट्रोलर्स को सही जगह पर लगाने के लिए स्मार्ट ग्लास के कैमरे का इस्तेमाल करें। रोटेशन और बटन इनपुट Joy-Con कंट्रोलर्स से आते हैं। जब आपकी कलाइयां छिपी होती हैं, तो पोजीशन का अंदाज़ा लगाया जाता है। नंगे हाथों से चलने वाले कंट्रोलर्स को बदलता है और फ़ोन-कैमरा ट्रैकिंग को पॉज़ करता है। ट्रैकिंग सेंटर को कनेक्ट या रीसेट करते समय Joy-Con कंट्रोलर्स को आगे की ओर पॉइंट करें।</string> + <string name="glasses_joycons_requires_position">पहले पोजीशनल ट्रैकिंग इनेबल करें। Android 12 या उसके बाद के वर्शन पर मोशन-कैपेबल Joy-Con कंट्रोलर्स की ज़रूरत है। डिफ़ॉल्ट रूप से बंद।</string> + <string name="setup_tab_glasses">स्मार्ट ग्लास</string> + <string name="setup_glasses_scope">डिस्प्ले और हेड-ट्रैकिंग सेटिंग्स DroidDeck मेनू, गेम्स और डेस्कटॉप सेशन में शेयर की जाती हैं।</string> + <string name="setup_glasses_connect">स्मार्ट ग्लास को उनकी डिस्प्ले और ट्रैकिंग सेटिंग्स बदलने के लिए कनेक्ट करें। जब आप डिस्कनेक्ट करते हैं तो आपकी सेव की गई सेटिंग्स रखी जाती हैं।</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">डिस्प्ले मोड</string> + <string name="glasses_output_2d">2D आउटपुट</string> + <string name="glasses_output_3d">3D आउटपुट</string> + <string name="glasses_picture_group">पिक्चर और वर्चुअल स्क्रीन</string> + <string name="glasses_position_group">पोजीशन और फ्लोर लेवल</string> + <string name="glasses_hands_group">हाथों की ट्रैकिंग — एक्सपेरिमेंटल</string> + <string name="glasses_tracking_status">ट्रैकिंग स्टेटस</string> + <string name="glasses_resolution_2d">2D रिज़ॉल्यूशन</string> + <string name="glasses_resolution_3d">3D रिज़ॉल्यूशन</string> + <string name="glasses_resolution_vr">VR रिज़ॉल्यूशन</string> + <string name="glasses_resolution_auto">ऑटोमैटिक</string> + <string name="glasses_resolution_inherit">2D / 3D जैसा ही</string> + <string name="glasses_resolution_hint">हर आंख के लिए आउटपुट रिज़ॉल्यूशन।</string> + <string name="glasses_refresh_30_hint">डिस्प्ले का नेटिव 30 Hz मोड चुनने के लिए स्मार्ट ग्लास पर गेम चालू करें।</string> + <string name="glasses_3dof">3DoF वर्चुअल स्क्रीन</string> + <string name="glasses_3dof_hint">अपने सामने फ्लैट गेम्स को एंकर करें ताकि आप चारों ओर देख सकें। 3D पर स्विच किए बिना स्मार्ट ग्लास पर गेम चालू करता है।</string> + <string name="glasses_screen_app_wide">चौड़ाई और दूरी, DroidDeck मेन्यू, गेम और डेस्कटॉप सेशन के लिए ट्रैक की गई वर्चुअल स्क्रीन को तुरंत अपडेट करते हैं।</string> + <string name="glasses_head_tracking_spatial_vr_hint">SteamVR में पोज़िशनल ट्रैकिंग में हेड रोटेशन शामिल है। सिर्फ़ रोटेशन ट्रैकिंग के लिए, पोज़िशनल ट्रैकिंग को बंद करें।</string> + <string name="glasses_head_tracking_spatial_hint">वर्चुअल स्क्रीन पर हेड मूवमेंट को कंट्रोल करता है। SteamVR में पोज़िशनल ट्रैकिंग में हेड रोटेशन शामिल है।</string> + <string name="glasses_quick_actions">क्विक एक्शन</string> + <string name="glasses_recenter_screen_hint">स्क्रीन को जहां आप चाहते हैं वहां देखें, फिर उसकी ऊंचाई और दिशा सेट करने के लिए ट्रैकिंग सेंटर को रीसेट करें।</string> + <string name="glasses_recenter_joycons_button">Joy-Con फिर से केंद्रित करें</string> + <string name="phone_camera_tracking_group">फ़ोन कैमरा — एक्सपेरिमेंटल</string> + <string name="phone_camera_tracking_setting">हाथ या Joy-Con कंट्रोलर ट्रैक करें</string> + <string name="glasses_6dof">6DoF वर्चुअल स्क्रीन</string> + <string name="glasses_position">पोज़िशनल ट्रैकिंग — एक्सपेरिमेंटल</string> + <string name="glasses_position_hint">VR में और वर्चुअल स्क्रीन के आस-पास फिजिकल मूवमेंट। ट्रैकिंग को फिर से शुरू करने में थोड़ा समय लगता है।</string> + <string name="glasses_eye_height">फ्लोर से अभी की आंख की ऊंचाई</string> + <string name="glasses_floor">अभी की ऊंचाई से फ्लोर लेवल सेट करें</string> + <string name="glasses_floor_set">फ्लोर लेवल सेट करें</string> + <string name="glasses_spatial_setup">स्टीरियो कैमरा सेटअप और डायग्नोस्टिक्स</string> + <string name="glasses_spatial_setup_hint">खेलने से पहले कैमरा कैलिब्रेशन और हाथों की ट्रैकिंग चेक करें।</string> + <string name="glasses_spatial_open">सेटअप खोलें</string> + <string name="glasses_hands">कंट्रोलर नंगे हाथों से ऑपरेट होते हैं</string> + <string name="glasses_hands_hint">VR में अपने हाथों से निशाना लगाने, क्लिक करने के लिए पिंच करने और पकड़ने के लिए अपना हाथ बंद करने के लिए स्मार्ट ग्लास कैमरे का इस्तेमाल करें। गेमपैड स्टिक हिलते और मुड़ते हैं। Joy-Con पोज़िशन ट्रैकिंग की जगह लेता है। गेम के दौरान ट्रैकिंग लैग हो सकती है या खो सकती है।</string> + <string name="glasses_hands_ready_hint">ट्रैकिंग में Luma Ultra कैमरों के तहत नंगे हाथों से ऑपरेट होने वाले कंट्रोलर चालू करें। पहले खुले हाथ दिखाएं।</string> + <string name="glasses_hands_base">शेयर्ड Luma Ultra कैलिब्रेशन</string> + <string name="glasses_hands_base_hint">शेयर्ड Luma Ultra बेस का इस्तेमाल करना। अपने स्मार्ट ग्लास की सटीकता को वेरिफ़ाई करने के लिए उन्हें खुद कैलिब्रेट करें।</string> + <string name="glasses_hands_calibration_verified">मापे गए कैलिब्रेशन को वेरिफ़ाई किया गया</string> + <string name="glasses_hands_calibration_required">वैलिडेशन ज़रूरी है</string> + <string name="glasses_hands_calibration_required_hint">मापी गई दूरी की जाँच पास होने के बाद, नंगे हाथों से ऑपरेट किए जाने वाले कंट्रोलर उपलब्ध हो जाते हैं।</string> + <string name="tracking_recovery_lost">ट्रैकिंग खो गई</string> + <string name="tracking_recovery_look">अच्छी रोशनी वाले कमरे में धीरे-धीरे चारों ओर देखें।\nट्रैकिंग कैमरे साफ़ रखें और फ़र्नीचर या दूसरी दिखने वाली डिटेल की ओर मुँह करके रखें।</string> + <string name="tracking_recovery_restart_help">अभी भी अटके हुए हैं? आपके फ़ोन पर: स्मार्ट चश्मा → ट्रैकिंग → सेटअप खोलें → डायग्नोस्टिक्स दिखाएँ → ट्रैकिंग पुनरारंभ करें।</string> + <string name="tracking_recovery_disconnected">स्मार्ट चश्मा डिस्कनेक्ट हो गया</string> + <string name="tracking_recovery_connect">USB कनेक्शन की जांच करें और स्मार्ट चश्मे को फिर से कनेक्ट करें।\nयदि आपके फोन पर USB-एक्सेस प्रॉम्प्ट दिखाई दे तो उसे स्वीकार करें।</string> + <string name="tracking_recovery_usb_help">एक बार कनेक्ट होने के बाद, ट्रैकिंग बहाल करने के लिए अच्छी रोशनी वाले कमरे में धीरे-धीरे चारों ओर देखें।</string> + <string name="tracking_recovery_recenter">फिर से केंद्रित करना ज़रूरी है</string> + <string name="tracking_recovery_recenter_steps">ट्रैकिंग नई जगह पर वापस आ गई है.\nआगे देखें, फिर अपने फ़ोन पर ट्रैकिंग सेंटर रीसेट करें पर टैप करें.</string> + <string name="tracking_recovery_recenter_help">आप स्मार्ट ग्लास → ट्रैकिंग → ओपन सेटअप में भी ट्रैकिंग सेंटर रीसेट कर सकते हैं. आपका सेव किया गया कैमरा कैलिब्रेशन रखा जाता है.</string> + <string name="tracking_recovery_stabilizing">एक पल के लिए रुकें</string> + <string name="tracking_recovery_hold">ट्रैकिंग सेंटर रीसेट किया जा रहा है.\nट्रैकिंग के सेटल होने तक स्मार्ट ग्लास को स्थिर रखें.</string> + <string name="tracking_recovery_automatic">हेड ट्रैकिंग तैयार होने पर यह स्क्रीन स्वचालित रूप से बंद हो जाती है।</string> + <string name="glasses_steady_hand_aim">हाथों से स्थिर निशाना लगाना</string> + <string name="glasses_steady_hand_aim_hint">अपने कंधे से हथेली के माध्यम से निशाना लगाओ। कलाई-नियंत्रित घुमाव के लिए बंद करें।</string> + <string name="spatial_title">स्थानिक सेटअप</string> + <string name="spatial_wait_tracking">ट्रैकिंग की प्रतीक्षा में...</string> + <string name="spatial_cameras_description">बाएँ और दाएँ ट्रैकिंग कैमरे</string> + <string name="spatial_camera_sync">कैमरा सिंक्रनाइज़ेशन</string> + <string name="spatial_ready">तैयार</string> + <string name="spatial_sync_hint">कैमरा और हेड ट्रैकिंग के लाइन में लगने की प्रतीक्षा की जा रही है। स्मार्ट ग्लास कनेक्ट रखें.</string> + <string name="spatial_prepare">1. अंशांकन लक्ष्य तैयार करें</string> + <string name="spatial_print_actual">वास्तविक आकार में प्रिंट करें</string> + <string name="spatial_print_hint">प्रत्येक वर्ग की माप 30 मिमी (1.181 इंच) होनी चाहिए। अच्छी रोशनी वाले क्षेत्र में एक सख्त सतह पर शीट को सपाट स्थापित करें।</string> + <string name="spatial_print">कैलिब्रेशन बोर्ड प्रिंट करें</string> + <string name="spatial_capture_group">2. विभिन्न दृश्यों को कैप्चर करें</string> + <string name="spatial_board_stationary">अंशांकन लक्ष्य को स्थिर रखें</string> + <string name="spatial_capture_hint">स्मार्ट चश्मे को पास, दूर और बग़ल में ले जाएँ। उन्हें बाएँ/दाएँ मोड़ें, उन्हें ऊपर/नीचे झुकाएँ और उन्हें बग़ल में झुकाएँ। दोनों कैमरों में अंशांकन लक्ष्य रखें और प्रत्येक कैप्चर से पहले थोड़ी देर रुकें।</string> + <string name="spatial_start">नया अंशांकन प्रारंभ करें</string> + <string name="spatial_wait_sync">कैमरा सिंक्रनाइज़ेशन की प्रतीक्षा की जा रही है।</string> + <string name="spatial_start_hint">दृश्य एकत्र करने के लिए एक नया अंशांकन प्रारंभ करें।</string> + <string name="spatial_views_hint">अंशांकन लक्ष्य को दोनों पूर्वावलोकनों में दृश्यमान रखें। विभिन्न कोणों से कम से कम 24 तीव्र दृश्य कैप्चर करें।</string> + <string name="spatial_capturing">कैप्चरिंग...</string> + <string name="spatial_capture">अंशांकन लक्ष्य दृश्य कैप्चर करें</string> + <string name="spatial_alignment">कैमरा संरेखण की गणना करें</string> + <string name="spatial_calculating">गणना कर रहा हूं...</string> + <string name="spatial_calculate">अंशांकन की गणना करें</string> + <string name="spatial_distance_group">3. दूरी की जाँच करें</string> + <string name="spatial_distance">मापी गई दूरी</string> + <string name="spatial_distance_hint">12 इंच या 30 सेमी से शुरू करें ताकि मुद्रित मार्करों का पता लगाना आसान हो। वह सटीक माप चुनें जिसका आप उपयोग करेंगे.</string> + <string name="spatial_camera_board_distance">बाएँ कैमरे से कैलिब्रेशन लक्ष्य के केंद्र तक की दूरी</string> + <string name="spatial_checking_distance">दूरी की जाँच हो रही है...</string> + <string name="spatial_validate">दूरी मान्य करें</string> + <string name="spatial_diagnostics">डायग्नोस्टिक्स</string> + <string name="spatial_show_diagnostics">डायग्नोस्टिक्स दिखाएं</string> + <string name="spatial_diagnostics_hint">कैमरा टाइमिंग और ट्रैकिंग रिकवरी टूल।</string> + <string name="spatial_camera_timing">कैमरा टाइमिंग</string> + <string name="spatial_hand_input">हाथों की ट्रैकिंग से इनपुट</string> + <string name="spatial_wait_timing">कैमरे की टाइमिंग का इंतजार है।</string> + <string name="spatial_frames">कैमरा छवियाँ</string> + <string name="spatial_gpu">हाथों की GPU पहचान</string> + <string name="spatial_gpu_hint">CPU डिफ़ॉल्ट है। GPU प्रायोगिक है और SteamVR को पुनः आरंभ करने का कारण बन सकता है। ट्रैकिंग पुनः प्रारंभ होने पर यह विकल्प रीसेट हो जाता है।</string> + <string name="spatial_lite">हाथों के मॉडलों का लाइट डिटेक्शन</string> + <string name="spatial_lite_hint">हाथों पर लाइट पाम डिटेक्टर और लाइट कुंजी बिंदुओं का उपयोग करें। लक्ष्य, चुटकी और पकड़ने की सटीकता की जाँच करें। ट्रैकिंग पुनरारंभ होने पर रीसेट हो जाता है।</string> + <string name="spatial_adaptive">हाथों की ट्रैकिंग के लिए स्वचालित इनपुट आवृत्ति</string> + <string name="spatial_adaptive_hint">इनपुट को प्रसंस्करण गति के अनुसार समायोजित करें। ट्रैकिंग पुनरारंभ होने पर रीसेट हो जाता है।</string> + <string name="spatial_half_rate">हाथों की ट्रैकिंग के लिए इनपुट आवृत्ति सीमित करें</string> + <string name="spatial_half_rate_hint">कैमरे की आधी छवियों का उपयोग करें। अधिकतम आवृत्ति की तुलना करने के लिए बंद करें. ट्रैकिंग पुनरारंभ होने पर रीसेट हो जाता है।</string> + <string name="spatial_diagnostic_capture">डायग्नोस्टिक कैप्चर</string> + <string name="spatial_diagnostic_capture_hint">एक स्टीरियो छवि जोड़ी को स्थानीय रूप से सहेजें। अनुरोध किए जाने पर ही छवियाँ सहेजी जाती हैं।</string> + <string name="spatial_save_frame">कैमरा छवि सहेजें</string> + <string name="spatial_restart_tracking">ट्रैकिंग पुनः प्रारंभ करें</string> + <string name="spatial_restart_hint">यदि अच्छी रोशनी वाले क्षेत्र में ट्रैकिंग ठीक नहीं होती है तो इसका उपयोग करें। पुनरारंभ के लिए एक नए ट्रैकिंग मूल की आवश्यकता होती है।</string> + <string name="spatial_restart">पुनः आरंभ करें</string> + <string name="spatial_restart_title">ट्रैकिंग पुनः प्रारंभ करें?</string> + <string name="spatial_restart_confirm">सेव न किए गए कैलिब्रेशन व्यू खो जाएँगे. इसके बाद स्मार्ट ग्लास को स्थिर रखें और ट्रैकिंग के ठीक होने पर ट्रैकिंग सेंटर रीसेट करें.</string> + <string name="spatial_views_count">%1$d / 24 बार देखा गया</string> + <string name="spatial_capture_paused">कैप्चर रोका गया: %1$s</string> + <string name="spatial_measure_hint">माप %1$s। दोनों पूर्वावलोकनों में पूर्ण अंशांकन लक्ष्य दिखाएँ, फिर स्थिर रखें।</string> + <string name="spatial_timing_values">%1$.1f हर्ट्ज़ • छवि आयु %2$.1f एमएस • प्रसंस्करण %3$.1f एमएस</string> + <string name="spatial_input_values">कैमरा छवियों की इनपुट सीमा %1$.1f हर्ट्ज़ • %2$.0f %%। हेड ट्रैकिंग अपनी अधिकतम आवृत्ति पर जारी रहती है।</string> + <string name="spatial_frame_counts">%1$d संसाधित हुआ • %2$d हटा दिया गया • %3$d इनपुट सीमा के कारण छोड़ दिया गया</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra कैलिब्रेशन</string> + <string name="spatial_print_scale" formatted="false">100%/वास्तविक आकार पर प्रिंट करें। प्रत्येक वर्ग: 30 मिमी (1.181 इंच)।</string> + <string name="spatial_print_stationary">अंशांकन लक्ष्य को सपाट और स्थिर रखें; कैप्चर के बीच स्मार्ट चश्मे को घुमाएँ।</string> + <string name="spatial_print_check">स्केल जांच: टिकों के बीच 100 मिमी (3.937 इंच)।</string> + <string name="spatial_distance_12in">12 इंच (30.48 सेमी)</string> + <string name="spatial_distance_30cm">30 सेमी (11.81 इंच)</string> + <string name="spatial_distance_20in">20 इंच (50.8 सेमी)</string> + <string name="spatial_distance_50cm">50 सेमी (19.69 इंच)</string> + <string name="spatial_disabled">बंद</string> + <string name="spatial_wait_stable">स्थिर ट्रैकिंग की प्रतीक्षा में</string> + <string name="spatial_disconnected">डिसकनेक्ट किया गया</string> + <string name="spatial_hands_off">नंगे हाथों से संचालित होने वाले नियंत्रक बंद हैं</string> + <string name="spatial_tracking_off">पोजिशनल ट्रैकिंग बंद है या स्मार्ट चश्मा डिस्कनेक्ट हो गया है</string> + <string name="spatial_recenter_pending">ट्रैकिंग सेंटर रीसेट करने का अनुरोध किया गया — ट्रैकिंग के स्थिर होने तक स्थिर रखें</string> + <string name="spatial_tracking_lost">ट्रैकिंग खो गई - दृश्यमान विवरण के साथ एक अच्छी रोशनी वाले क्षेत्र का सामना करें</string> + <string name="spatial_origin_changed">ट्रैकिंग ओरिजिन बदल गया — ट्रैकिंग सेंटर रीसेट करें पर टैप करें, फिर स्थिर रखें</string> + <string name="spatial_active">6DoF सक्रिय</string> + <string name="spatial_connect_hint">Luma Ultra को कनेक्ट करें और पोजिशनल ट्रैकिंग सक्षम करें।</string> + <string name="spatial_validation_session">इस कनेक्शन के लिए अंशांकन सत्यापित।</string> + <string name="spatial_validation_saved">अंशांकन सत्यापित और सहेजा गया।</string> + <string name="spatial_wait_cameras">स्टीरियो कैमरे की प्रतीक्षा है</string> + <string name="spatial_wait_hands">हाथों की ट्रैकिंग का इंतजार</string> + <string name="spatial_collect_instructions">5 × 7 अंशांकन लक्ष्य को स्थिर रखें। स्मार्ट चश्मे को घुमाते और घुमाते हुए 24+ दृश्य कैप्चर करें।</string> + <string name="spatial_capture_pending">अगली कैमरा छवि की प्रतीक्षा है। स्मार्ट चश्मे को स्थिर रखें।</string> + <string name="spatial_validation_pending">अगली कैमरा छवि की जाँच कर रहा हूँ। पूर्ण अंशांकन लक्ष्य को दृश्यमान रखें और स्थिर रखें।</string> + <string name="spatial_start_first">पहले अंशांकन प्रारंभ करें</string> + <string name="spatial_no_camera_frame">कोई ताज़ा कैमरा छवि नहीं आई। स्मार्ट ग्लास कनेक्शन और कैमरा पूर्वावलोकन जांचें, फिर पुनः प्रयास करें।</string> + <string name="spatial_clock_reset">कैमरा घड़ी रीसेट</string> + <string name="spatial_frame_changed">ट्रैकिंग कोऑर्डिनेट सिस्टम बदल गया है. आपके व्यू रीकैलकुलेशन के लिए सेव किए गए हैं. ट्रैकिंग सेंटर रीसेट करें, फिर ज़्यादा व्यू कैप्चर करने के लिए नया सेट शुरू करें.</string> + <string name="spatial_device_loaded">डिवाइस अंशांकन लोड किया गया</string> + <string name="spatial_base_loaded">Luma Ultra बेस कैलिब्रेशन लोड किया गया</string> + <string name="spatial_calibration_needed">अंशांकन आवश्यक है</string> + <string name="spatial_tap_start">सबसे पहले स्टार्ट न्यू कैलिब्रेशन पर टैप करें।</string> + <string name="spatial_capture_recenter_pending">ट्रैकिंग सेंटर रीसेट करने के लिए ट्रैकिंग के स्थिर होने का इंतज़ार किया जा रहा है. थोड़ी देर के लिए स्थिर रखें.</string> + <string name="spatial_capture_recenter">ट्रैकिंग बदल गई है. ट्रैकिंग सेंटर को रीसेट करने के लिए एक बार टैप करें, फिर कैप्चर करने से पहले उसे स्थिर रखें.</string> + <string name="spatial_capture_unsynchronized">कैप्चर अस्वीकृत: कैप्चर के दौरान हेड ट्रैकिंग सिंक्रोनाइज़ नहीं थी या उसमें बदलाव आया। स्थिर रहें और पुनः प्रयास करें।</string> + <string name="spatial_align_first">दूरी की जांच करने से पहले कैमरा संरेखण की गणना करें।</string> + <string name="spatial_processing_failed">कैमरा प्रोसेसिंग विफल रही</string> + <string name="spatial_hand_head_changed">हाथों का पता लगाने के दौरान हेड ट्रैकिंग बदल गई</string> + <string name="spatial_hand_wait_sync">कैमरा और हेड सिंक्रोनाइज़ेशन की प्रतीक्षा की जा रही है</string> + <string name="spatial_no_wrists">किसी कलाई का पता नहीं चला। अपने Joy-Con कंट्रोलर हैंडल को स्मार्ट चश्मे के सामने रखें</string> + <string name="spatial_no_hands">कोई हाथ नहीं मिला। स्मार्ट चश्मे के सामने खुली हथेलियाँ दिखाएँ</string> + <string name="spatial_one_camera_wrists">कलाइयाँ केवल एक कैमरे में दिखाई देती हैं; अपने नियंत्रक हैंडल को साझा दृश्य में रखें</string> + <string name="spatial_one_camera_hands">केवल एक कैमरे में हाथ दिखाई दे रहे हैं; दोनों हथेलियों को साझा दृश्य में रखें</string> + <string name="spatial_ambiguous_hands">दोनों कैमरे हाथ देखते हैं, लेकिन बाएँ/दाएँ मिलान अस्पष्ट है</string> + <string name="spatial_inconsistent_depth">हाथों का पता चला, लेकिन स्टीरियो गहराई असंगत है</string> + <string name="spatial_rejected_wrist">कलाई की स्थिति को स्टीरियो या मोशन जांच द्वारा अस्वीकार कर दिया गया</string> + <string name="spatial_inconsistent_palm">स्टीरियो बिंदुओं का पता चला, लेकिन हथेली की ज्यामिति असंगत है</string> + <string name="spatial_hands_need_calibration">हाथों को सक्षम करने के लिए पूर्ण अंशांकन और दूरी की जांच</string> + <string name="spatial_hands_wait_stable">स्थिर हेड ट्रैकिंग की प्रतीक्षा कर रहा है; अनुरोध किए जाने पर ट्रैकिंग सेंटर को रीसेट करें</string> + <string name="spatial_old_frame">कैमरा अवलोकन बहुत पुराना है; एक नई जोड़ी का इंतजार है</string> + <string name="spatial_fit_ready">फ़िट %1$.2f पीएक्स। बाएं कैमरे से अंशांकन लक्ष्य केंद्र तक अपनी चयनित दूरी को मापें, फिर सत्यापित करें।</string> + <string name="spatial_opencv_error">OpenCV अनुपलब्ध: %1$s</string> + <string name="spatial_restored">%1$d सहेजे गए दृश्य पुनर्स्थापित किए गए। पुनः प्रयास करने के लिए अंशांकन की गणना करें, या अधिक कैप्चर करने के लिए एक नया सेट प्रारंभ करें।</string> + <string name="spatial_captured">कैप्चर किया गया %1$d / 24 बार देखा गया। अंशांकन लक्ष्य निश्चित रखें; अगले दृश्य के लिए स्मार्ट चश्मा हटाएँ।</string> + <string name="spatial_capture_corners">कैप्चर अस्वीकृत: %1$d / दोनों कैमरों में 12 आवश्यक कोने दिखाई दे रहे हैं। अंशांकन लक्ष्य को और अधिक दिखाएं, स्थिर रखें, फिर पुनः प्रयास करें।</string> + <string name="spatial_validation_error">दूरी की जांच पूरी नहीं हो सकी: %1$s। पुनः प्रयास करें।</string> + <string name="spatial_inference_error">हाथों का पता लगाना अनुपलब्ध: %1$s। पुनः प्रयास करने के लिए CPU/GPU बदलें या नंगे हाथों से संचालित नियंत्रकों को टॉगल करें।</string> + <string name="spatial_hand_timeout">हाथों का पता लगाना %1$d एमएस से अधिक हो गया; अवलोकन त्याग दिया गया</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con कलाई की स्थिति स्टीरियो द्वारा मापी गई</string> + <string name="spatial_palms_tracked">ट्रैक की गई हथेलियाँ: %1$d / 2; पिंच के लिए तैयार: %2$d; पकड़ने के लिए तैयार: %3$d</string> + <string name="spatial_capture_saved">डायग्नोस्टिक कैप्चर को %1$s में सहेजा गया</string> + <string name="spatial_hand_error">हाथों का पता लगाना बंद कर दिया गया: %1$s</string> + <string name="spatial_stereo_loaded">स्टीरियो %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">हेड ट्रैकिंग और अंशांकन लक्ष्य %1$s (सीमा 5 सेमी/2 इंच) से असहमत हैं। अंशांकन लक्ष्य को निश्चित रखें और नया सेट शुरू करने से पहले स्थिर ट्रैकिंग की प्रतीक्षा करें। स्मार्ट चश्मे को धीरे से घुमाएँ और झुकाएँ; प्रत्येक कैप्चर से पहले रुकें।</string> + <string name="spatial_need_views">स्थिर अंशांकन लक्ष्य के कम से कम 24 विविध दृश्य कैप्चर करें।</string> + <string name="spatial_need_rotation">स्मार्ट चश्मे को बाएँ और दाएँ घुमाएँ, और उन्हें ऊपर और नीचे झुकाएँ; रोटेशन के बिना गति कैमरा संरेखण को कैलिब्रेट नहीं कर सकती।</string> + <string name="spatial_bad_baseline">अविश्वसनीय कैमरा बेसलाइन</string> + <string name="spatial_need_orientations">अपने सिर को अधिक विविध दिशाओं में घुमाएँ।</string> + <string name="spatial_bad_rotation">अमान्य कैमरा-टू-हेड रोटेशन</string> + <string name="spatial_bad_alignment">कैमरा-टू-हेड संरेखण असंगत है।</string> + <string name="spatial_calibration_error">अंशांकन समाप्त नहीं हो सका। %1$s आपके कैप्चर किए गए दृश्य सहेजे गए हैं।</string> + <string name="spatial_reprojection_error">हेल्ड-आउट रिप्रोजेक्शन त्रुटि %1$.2f px 2 px से अधिक है। पुन: अंशांकित करें.</string> + <string name="spatial_distance_corners">%1$d / दोनों कैमरों में 24 चेकरबोर्ड कोनों का पता चला। पूर्ण अंशांकन लक्ष्य को दृश्यमान रखें और स्थिर रखें। यदि यह पहले से ही दिखाई दे रहा है, तो 12 इंच या 30 सेमी का चयन करें और पुनः प्रयास करने से पहले उस निकटतम दूरी को मापें।</string> + <string name="spatial_distance_depth">अंशांकन लक्ष्य दृश्यमान है, लेकिन इसकी गहराई को विश्वसनीय रूप से नहीं मापा जा सका। स्मार्ट ग्लास को स्थिर रखें और अंशांकन लक्ष्य को सपाट और अच्छी रोशनी में रखें, फिर पुनः प्रयास करें।</string> + <string name="spatial_distance_invalid">कैमरे का माप अमान्य था। स्थिर रहें और पुनः प्रयास करें।</string> + <string name="spatial_distance_passed">दूरी जांच पास हो गई।</string> + <string name="spatial_distance_retry">बाएं कैमरे से अंशांकन लक्ष्य केंद्र तक की दूरी दोबारा जांचें, फिर पुनः प्रयास करें।</string> + <string name="spatial_distance_result">कैमरों की माप %1$s हुई; चयनित दूरी %2$s. %3$s</string> + <string name="spatial_wait_previews">अंशांकन शुरू करने से पहले दोनों कैमरा पूर्वावलोकन की प्रतीक्षा करें।</string> + <string name="spatial_saved_views_hint">सहेजे गए दृश्यों की पुनर्गणना की जा सकती है। वर्तमान ट्रैकिंग समन्वय प्रणाली में कैप्चर करने के लिए एक नया अंशांकन प्रारंभ करें।</string> + <string name="spatial_model_checksum_error">हैंड मॉडल चेकसम बेमेल</string> + <string name="spatial_opencv_load_error">OpenCV लोड नहीं हो सका</string> +</resources> diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml new file mode 100644 index 0000000000..d60f27fa94 --- /dev/null +++ b/app/src/main/res/values-hu/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">A SteamVR grafikája leállt</string> + <string name="steamvr_recovery_countdown">A DroidDeck %1$d másodperc múlva újraindul, hogy visszaállítsa a grafikát, és újra megnyissa a SteamVR-t. A futó játék bezárul; a nem mentett előrehaladás nem állítható vissza.</string> + <string name="steamvr_recovery_repeated">A grafikus hiba egy nemrégi újraindítás után ismét jelentkezett. Az automatikus helyreállítás szünetel, hogy ne alakuljon ki végtelen ciklus. Az újraindítás bezárja a játékot; a nem mentett előrehaladás nem állítható vissza.</string> + <string name="steamvr_recovery_restart">Újraindítás most</string> + <string name="steamvr_recovery_cancel">Nyitva tartás</string> + <string name="steamvr_recovery_restarting">A grafika visszaállítása és a SteamVR újranyitása…</string> + <string name="steamvr_recovery_failed">A DroidDeck nem tudott automatikusan újraindulni. Zárja be teljesen az alkalmazást, majd nyissa meg újra.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Az első indítás letölti a Steamet. Ez néhány percet vehet igénybe.</item> + <item>Alapértelmezés szerint az alkalmazás elhagyása szünetelteti a Steamet; visszatéréskor ott folytatja, ahol abbahagyta.</item> + <item>A kontroller Xbox 360 kontrollerként jelenik meg. Egyébként használja a képernyőn lévő vezérlőket.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Az első indítás beállítja az asztalt. Ez néhány percet vehet igénybe.</item> + <item>Alapértelmezés szerint az alkalmazás elhagyása szünetelteti a munkamenetet; visszatéréskor ott folytatja, ahol abbahagyta.</item> + <item>Az érintés érintőpadként működik: húzással mozgathatja a kurzort, koppintással kattinthat.</item> + <item>A kontroller Xbox 360 kontrollerként jelenik meg. Egyébként használja a képernyőn lévő vezérlőket.</item> + </string-array> + <string name="session_channel">Munkamenet</string> + <string name="session_channel_description">Megjelenik, amíg egy Steam- vagy asztali munkamenet aktív</string> + <string name="session_notification">A Steam fut</string> + <string name="session_notification_downloads">Steam-letöltés folyamatban</string> + <string name="session_notification_paused">A munkamenet szünetel – koppintson a Folytatásra, ha készen áll</string> + <string name="resume_session">Folytatás</string> + <string name="suspend_now">Felfüggesztés most</string> + <string name="stop_session">Munkamenet leállítása</string> + <string name="frame_gen_title">Képkocka-generálás</string> + <string name="frame_gen_hint">Válassza ki a képkocka-generálás módját</string> + <string name="frame_gen_off">Ki</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG adaptív %1$d</string> + <string name="lsfg_needs_steam">A Lossless Scaling szükséges a Steamen</string> + <string name="lsfg_needs_install">Telepítse a Lossless Scalinget a Steamen, vagy importálja a Lossless.dll fájlt</string> + <string name="lsfg_import">Lossless.dll importálása…</string> + <string name="lsfg_using_steam">A Steamről származó másolat használatban</string> + <string name="lsfg_using_import">Egy importált másolat használatban</string> + <string name="lsfg_pick_title">Válassza ki a Lossless.dll fájlt</string> + <string name="lsfg_imported">A Lossless.dll importálva</string> + <string name="lsfg_import_unchanged">Ez a Lossless.dll már használatban van</string> + <string name="lsfg_import_not_owned">A Lossless Scaling nincs a tulajdonában ezen a Steam-fiókon</string> + <string name="lsfg_import_invalid">Ez a fájl nem a Lossless Scaling Lossless.dll fájlja</string> + <string name="lsfg_import_failed">Nem sikerült előkészíteni az LSFG-t ebből a Lossless.dll fájlból</string> + <string name="lsfg_problem_missing">Az LSFG-hez szükséges a Lossless Scaling a Steamről vagy egy importált Lossless.dll</string> + <string name="lsfg_problem_failed">Az LSFG nem tudta előkészíteni a shadereket a Lossless.dll fájlból</string> + <string name="hud_fg_unsupported">%1$s: nem támogatott</string> + <string name="hud_fg_failed">%1$s: a motor hibát jelzett</string> + <string name="hud_fg_needs_lossless">%1$s: a Lossless Scaling szükséges</string> + <string name="hud_fg_starting">%1$s %2$s · indítás</string> + <string name="second_library_import_hint">Hozzáad egy Steam-könyvtárat, és Windows-os játékokat keres benne. A tulajdonában lévő játékok a Steam-bejegyzéseiket használják; a többi nem Steam-parancsikonként jelenik meg.</string> + <string name="game_env_title">Játékkörnyezet</string> + <string name="game_env_hint">Környezeti változók Proton-játékokhoz.</string> + <string name="game_env_edit">Szerkesztés</string> + <string name="game_env_shared">Összes Proton-játék</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">Steam alkalmazásazonosító</string> + <string name="game_env_open">Megnyitás</string> + <string name="game_env_profile">%1$s játék</string> + <string name="game_env_add">Változó hozzáadása</string> + <string name="game_env_name">Változó neve</string> + <string name="game_env_value">Érték</string> + <string name="game_env_save">Mentés</string> + <string name="game_env_remove">Eltávolítás</string> + <string name="game_env_restore">Örökítés újra</string> + <string name="game_env_reset">Környezeti felülírások törlése</string> + <string name="game_env_unset">Törlés ebben a profilban</string> + <string name="game_env_empty">Nincs beállított változó.</string> + <string name="game_env_inherited">Örökölt</string> + <string name="game_env_custom">Egyéni változó</string> + <string name="game_env_error">Nem sikerült betölteni vagy menteni. Ellenőrizze a szabad tárhelyet, és próbálja újra.</string> + <string name="game_env_invalid">Használjon érvényes nevet és legfeljebb 8192 karakteres értéket.</string> + <string name="game_env_unused">A szabványos Proton futtatókörnyezet nem olvassa ezt a változót.</string> + <string name="game_env_loading">Betöltés…</string> + <string name="game_env_feature">D3D12 feature level felülírása. A 12_2 a DirectX 12 Ultimate képességeit jelzi; a nem támogatott funkciók hibát okozhatnak. Hagyja beállítás nélkül az automatikus felismeréshez.</string> + <string name="game_env_shader">D3D12 shader model felülírása. A 6_9 kellően friss VKD3D-t és megfelelő GPU-funkciókat igényel. Hagyja beállítás nélkül az automatikus felismeréshez.</string> + <string name="game_env_cache">Tartsa bekapcsolva a Mesa shader-gyorsítótárazást az ismételt fordítás csökkentéséhez. A false érték bekapcsolja a gyorsítótárazást.</string> + <string name="game_env_cache_size">A Mesa shader-gyorsítótár legnagyobb mérete, például 1G. A nagyobb gyorsítótár több tárhelyet használ.</string> + <string name="game_env_vkd3d_config">VKD3D-beállítások D3D12-höz. A nodxr kikapcsolja a sugárkövetést; csak olyan játéknál használja, amelynek szüksége van rá.</string> + <string name="game_env_proton_log">Állítsa 1-re a Proton diagnosztikai napló bekapcsolásához. A naplózás csökkentheti a teljesítményt, és tárhelyet használ.</string> + <string name="game_env_wined3d">Állítsa 1-re, hogy a DXVK helyett az OpenGL-alapú WineD3D-t használja D3D9–11 kompatibilitási teszteléshez.</string> + <string name="game_env_no_ntsync">Állítsa 1-re, hogy ez a játék ne használja az ntsyncet (droiddeck-ntsync vagy kernelillesztőprogram); ekkor a droiddeck-esynct használja, ha van csomag, egyébként a droiddeck-fsynct.</string> + <string name="game_env_no_esync">Állítsa 1-re a droiddeck-esync kikapcsolásához ennél a játéknál; helyette a droiddeck-fsynct használja, vagy a droiddeck-ntsynct, ha az fsync is ki van kapcsolva.</string> + <string name="game_env_no_fsync">Állítsa 1-re, hogy ez a játék ne használja a droiddeck-fsynct; ekkor a droiddeck-esynct használja, ha van csomag, egyébként a droiddeck-ntsynct.</string> + <string name="game_env_fsync_first">Állítsa 1-re, hogy ez a játék a droiddeck-fsyncen fusson, vagy 0-ra, hogy a droiddeck-esync kerüljön előre, ha van csomag a Protonjához.</string> + <string name="game_env_xalia">Állítsa 0-ra a Proton kontroller-navigációs segédjének kikapcsolásához ennél a játéknál.</string> + <string name="game_env_hud">DXVK overlay D3D9–11-hez. Az fps megjeleníti a képkockasebességet; beállítás nélkül elrejti.</string> + <string name="game_env_dxvk_config">Pontosvesszővel elválasztott DXVK-beállítások. A legújabb buildek a dxvk.maxFrameRate beállítást használják a képkocka-korlátozáshoz; szokásos játékhoz a munkamenet képkocka-korlátozóját érdemes használni.</string> + <string name="game_env_vkd3d_limit">D3D12 képkockasebesség-korlát. A 0 kikapcsolja a korlátot.</string> + <string name="game_env_glthread">Mesa OpenGL szálkezelés. A true érték segíthet a CPU-korlátozott OpenGL-játékoknál; tesztelje játékonként.</string> + <string name="sync_backend_title">Wine-szinkronizálás</string> + <string name="sync_backend_hint">Hogyan tartják szinkronban a játékok a szálaikat. A következő munkamenettől érvényes.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">FEX előbeállítás</string> + <string name="fex_next_launch">A következő játékindítástól érvényes.</string> + <string name="game_settings_title">Játékok</string> + <string name="fex_default_label">FEX alapértelmezés</string> + <string name="fex_default_detail">A FEX alapértelmezéseit használja.</string> + <string name="fex_stability_label">Stabilitás</string> + <string name="fex_stability_detail">A legbiztosabb, leglassabb beállítások.</string> + <string name="fex_compatibility_label">Kompatibilitás</string> + <string name="fex_compatibility_detail">Teljes TSO multiblokkal.</string> + <string name="fex_intermediate_label">Köztes</string> + <string name="fex_intermediate_detail">Kiegyensúlyozott TSO csökkentett x87-pontossággal.</string> + <string name="fex_performance_label">Teljesítmény</string> + <string name="fex_performance_detail">Minden TSO kikapcsolva; multiblokk.</string> + <string name="fex_performance_tso_label">Teljesítmény + TSO</string> + <string name="fex_performance_tso_detail">Teljesítmény-beállítások a fő TSO bekapcsolásával.</string> + <string name="fex_extreme_label">Extrém</string> + <string name="fex_extreme_detail">Kikapcsolja az önmódosító kód ellenőrzését. A JIT-et használó játékok és a DRM-ek hibásan működhetnek.</string> + <string name="fex_extreme_tso_label">Extrém + TSO</string> + <string name="fex_extreme_tso_detail">Extrém beállítások a fő TSO bekapcsolásával.</string> + <string name="fex_extreme_gn_label">Extrém-gn</string> + <string name="fex_extreme_gn_detail">Teljesítmény TSC- és metaadat-utalásokkal. Próbálja ki az Extrém előtt.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Teljesítmény teljes kódellenőrzéssel és elrejtett hypervisor-bittel.</string> + <string name="game_env_custom_value">Egyéni érték</string> + <string name="game_env_select_value">Érték kiválasztása</string> + <string name="user_apps_section">Emulátorok és alkalmazások</string> + <string name="user_apps_add">Hozzáadás</string> + <string name="user_apps_add_detail">Saját alkalmazás vagy játék</string> + <string name="user_apps_kind_script">Szkript</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Indítás…</string> + <string name="user_apps_added">%1$s hozzáadva</string> + <string name="user_apps_removed">%1$s eltávolítva</string> + <string name="user_apps_back">Asztal</string> + <string name="user_apps_gone">Ez az alkalmazás már nincs meg. Válassza ki újra az Asztalról.</string> + <string name="user_apps_open">%1$s megnyitása</string> + <string name="user_apps_remove">Eltávolítás</string> + <string name="user_apps_remove_confirm">Nyomja meg újra az eltávolításhoz</string> + <string name="user_apps_stop_session">Állítsa le a munkamenetet az eltávolításhoz</string> + <string name="user_apps_script_linked">A %1$s a saját mappájából fut, amely a helyén csatolva van a munkamenetbe. Az alkalmazás eltávolítása nem érinti azt a mappát.</string> + <string name="user_apps_script_copied">A %1$s a mappájának egy, a DroidDecken belüli másolatából fut. Az alkalmazás eltávolítása törli a másolatot, az eredetit nem.</string> + <string name="user_apps_runtime_required">Előbb telepítse a Linux futtatókörnyezetet</string> + <string name="user_apps_file_gone">A fájl már nincs meg</string> + <string name="user_apps_no_space">Nincs elég szabad hely: a mappa másolásához %1$s szükséges</string> + <string name="user_apps_copying">%1$s másolása</string> + <string name="user_apps_failed">Az alkalmazás hozzáadása sikertelen</string> + <string name="user_apps_github_checking">%1$s kiadásának keresése</string> + <string name="user_apps_github_unreachable">Nem sikerült beolvasni a %1$s kiadásait</string> + <string name="user_apps_github_no_appimage">A %1$s semelyik kiadása nem tartalmaz ARM64 vagy x86_64 AppImage-et</string> + <string name="user_apps_downloading">%1$s letöltése</string> + <string name="user_apps_download_failed">A letöltés sikertelen</string> + <string name="user_apps_update_failed">Az alkalmazás frissítése sikertelen</string> + <string name="user_apps_icon_failed">Ezt az ikont nem sikerült beolvasni</string> + <string name="user_apps_saved">%1$s mentve</string> + <string name="user_apps_edit">Szerkesztés</string> + <string name="user_apps_check_updates">Frissítések keresése</string> + <string name="user_apps_checking_updates">Frissítések keresése…</string> + <string name="user_apps_update_to">Frissítés erre: %1$s</string> + <string name="user_apps_up_to_date">Naprakész · %1$s</string> + <string name="user_apps_updated">%1$s frissítve</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Alkalmazás hozzáadása</string> + <string name="add_app_tab_script">Szkript</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Egy .sh fájl. A saját mappájából fut, teljes képernyőn, gamescope alatt.</string> + <string name="add_app_appimage_hint">Egy ARM64 (aarch64) AppImage, vagy egy x86_64-es, amely a FEX-en keresztül fut. Egyszer kerül kicsomagolásra a Linux futtatókörnyezetbe.</string> + <string name="add_app_github_hint">Telepíti a tároló legújabb kiadásának ARM64 AppImage-ét, vagy annak x86_64-es változatát a FEX-en keresztül.</string> + <string name="app_fex_title">FEX használata</string> + <string name="app_fex_auto">Automatikus</string> + <string name="app_fex_on">Be</string> + <string name="app_fex_off">Ki</string> + <string name="app_fex_hint">A FEX x86-os Linux-programokat futtat ezen az ARM64-es eszközön. Az Automatikus akkor használja, ha a program x86-ra készült.</string> + <string name="app_fex_x86">%1$s a FEX-en keresztül</string> + <string name="app_fex_not_ready">Ez a program %1$s PC-khez készült, és a FEX-en keresztül fut, amely még nincs beállítva. Nyissa meg egyszer a Steamet bejelentkezve: a DroidDeck ekkor letölti a FEX-et és a szükséges Steam Linux Runtime-ot, majd ez megnyílik.</string> + <string name="session_end_program">Ez a program</string> + <string name="session_end_fex_missing">A %1$s x86 PC-khez készült, és a FEX-en keresztül fut, amely még nincs telepítve. Indítsa el egyszer a Steamet bejelentkezve, és hagyja letölteni a FEX-et és a Steam Linux Runtime-ot, majd indítsa el ezt újra.</string> + <string name="add_app_flatpak_hint">Egy Flathub-alkalmazásazonosító vagy a Flathub-oldala. A Flatpak előbb beállításra kerül, ha még nincs beállítva.</string> + <string name="add_app_file">Fájl</string> + <string name="add_app_no_file">Nincs kiválasztott fájl</string> + <string name="add_app_choose_file">Fájl kiválasztása</string> + <string name="add_app_change_file">Módosítás</string> + <string name="add_app_pick_script">Válasszon szkriptet</string> + <string name="add_app_pick_appimage">Válasszon AppImage-et</string> + <string name="add_app_pick_icon">Válasszon ikont</string> + <string name="add_app_repository">Tároló</string> + <string name="add_app_repository_placeholder">tulajdonos/tároló vagy egy github.com hivatkozás</string> + <string name="add_app_repository_invalid">Nem egy GitHub-tároló</string> + <string name="add_app_flatpak_id">Alkalmazásazonosító</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Nem egy Flathub-alkalmazásazonosító</string> + <string name="add_app_flatpak_bundle_hint">Vagy egy .flatpak fájl, egy Flathubon nem elérhető alkalmazáshoz.</string> + <string name="add_app_pick_flatpak">Válasszon .flatpak fájlt</string> + <string name="add_app_source">Forrás</string> + <string name="add_app_appearance">Az Asztalon</string> + <string name="add_app_preview_name">Új alkalmazás</string> + <string name="add_app_name">Név</string> + <string name="add_app_name_placeholder">Az alkalmazásból</string> + <string name="add_app_icon">Ikon</string> + <string name="add_app_icon_default">Alapértelmezett ikon</string> + <string name="add_app_choose_icon">Ikon kiválasztása</string> + <string name="add_app_clear_icon">Törlés</string> + <string name="add_app_icon_suggestions">A tárolóból</string> + <string name="add_app_icon_searching">Ikonok keresése…</string> + <string name="add_app_icon_reset">Alapértelmezett</string> + <string name="edit_app_title">%1$s szerkesztése</string> + <string name="edit_app_save">Mentés</string> + <string name="add_app_checking_folder">A mappa ellenőrzése…</string> + <string name="add_app_folder_linked">A mappája a munkamenetbe van csatolva: %1$s</string> + <string name="add_app_folder_copied">A mappája Linux-programokat tartalmaz, amelyeket a megosztott tárhely nem tud futtatni, ezért átkerül a DroidDeckbe (%1$s).</string> + <string name="add_app_confirm">Hozzáadás</string> + <string name="add_app_cancel">Mégse</string> + <string name="add_app_runtime_required">Előbb telepítse a Linux futtatókörnyezetet a Beállításból.</string> + <string name="add_app_busy">Várja meg, amíg a(z) %1$s befejeződik.</string> + <string name="steam_compat_label">Kompatibilis</string> + <string name="proton_compatible_note">A Steam Kompatibilitás menüjében „%1$s” jelölésű buildek tartalmazzák a DroidDeck prefixjavításait, és ezeken itt elindulnak a játékok. Az alapértelmezett a Proton Experimental ARM64 (%1$s), vagy a Proton 11.0 ARM64 (%1$s), ha az az újabb build telepítve van. A Valve saját, jelölés nélküli Proton-bejegyzései nem tudnak játékot elindítani ezen az eszközön.</string> + <string name="proton_installed_compatible">%1$s telepítve · %2$s</string> + <string name="common_cancel">Mégse</string> + <string name="common_auto">Automatikus</string> + <string name="common_never">Soha</string> + <string name="common_always">Mindig</string> + <string name="common_uninstall">Eltávolítás</string> + <string name="common_check">Ellenőrzés</string> + <string name="common_update">Frissítés</string> + <string name="common_checking">Ellenőrzés…</string> + <string name="common_working">Feldolgozás…</string> + <string name="common_forget">Elfelejtés</string> + <string name="common_add_ellipsis">Hozzáadás…</string> + <string name="common_use">Használat</string> + <string name="common_applies_next_session">A következő munkamenettől érvényes.</string> + <string name="mode_steam_title">Steam-munkamenet</string> + <string name="mode_desktop_title">Asztali munkamenet</string> + <string name="mode_display">Kijelző</string> + <string name="mode_resolution">Felbontás</string> + <string name="mode_res_720">Legfeljebb 720p</string> + <string name="mode_res_900">Legfeljebb 900p</string> + <string name="mode_res_1080">Legfeljebb 1080p</string> + <string name="mode_res_native">Natív</string> + <string name="mode_res_default">%1$s (alapértelmezett)</string> + <string name="mode_res_custom_value">Egyéni · %1$d×%2$d</string> + <string name="mode_res_custom">Egyéni…</string> + <string name="mode_res_note">A 720p reszponzívabbá teheti a menüket.</string> + <string name="mode_ratio">Képernyőarány</string> + <string name="mode_ratio_custom">Az egyéni felbontás határozza meg.</string> + <string name="mode_ratio_auto">Az Automatikus legalább 16:9-et használ.</string> + <string name="mode_fps">Képkocka-korlát</string> + <string name="mode_fps_note">Korlátozza a teljes munkamenetet. A kijelző olyan frissítési frekvenciára vált, amelyet a korlát egyenlően oszt.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10-kimenet</string> + <string name="mode_hdr_unavailable">Nem elérhető: %1$s.</string> + <string name="mode_hdr_restart">Indítsa újra az alkalmazást az érvényesítéshez.</string> + <string name="mode_drivers">Illesztőprogramok</string> + <string name="mode_gpu_drivers">GPU-illesztőprogramok</string> + <string name="mode_gpu_drivers_hint">A Steam és az Asztal közösen használja. Az Összetevők oldalon állítható be.</string> + <string name="mode_touch_controls">Érintés és vezérlők</string> + <string name="mode_touch">Érintés</string> + <string name="mode_touch_touchpad">Érintőpad</string> + <string name="mode_touch_direct">Közvetlen</string> + <string name="mode_touch_note">Automatikus: érintőpad az Asztalon, közvetlen a Steamben.</string> + <string name="mode_osc">Képernyőn megjelenő vezérlők</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Az Automatikus megjeleníti a vezérlőket, ha nincs csatlakoztatott kontroller.</string> + <string name="osc_steam_touch">Steam érintés (béta)</string> + <string name="osc_style_next_session">A Steam érintésvezérlői a következő Steam-munkamenettől lépnek életbe</string> + <string name="osc_steam_layout">Steam érintéskiosztás</string> + <string name="osc_steam_layout_hint">Mozgassa, méretezze vagy rejtse el a játék érintésvezérlőit; a Steamben mentve</string> + <string name="mode_controller">Kontroller</string> + <string name="mode_controller_hint">Hogyan látja a Steam a kontrollerét. A következő munkamenettől érvényes.</string> + <string name="mode_controller_deck">Steam Deck kontroller</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Xbox 360 kontroller</string> + <string name="mode_controller_note">Deck: Gyors hozzáférés gomb és gyroszkóp. Steam Controller: ugyanez, a hátsó gombok fogásérzékelésével. DualShock 4 és DualSense: gyroszkóp, és az érintőpadok mint touchpad. Xbox 360: a Gyors hozzáférés megnyitása Guide+A-val.</string> + <string name="mode_back">Vissza gomb</string> + <string name="back_menu_then_qam">Menü → QAM</string> + <string name="back_qam_then_menu">QAM → Menü</string> + <string name="mode_session">Munkamenet</string> + <string name="mode_suspend">Háttérbeli viselkedés</string> + <string name="mode_suspend_hint">Amikor az alkalmazás el van rejtve, vagy a kijelző kikapcsol.</string> + <string name="mode_suspend_manual">Manuális</string> + <string name="mode_suspend_native">Natív</string> + <string name="mode_suspend_steam_note">Az Automatikus szüneteltet, és megjelenéskor folytatja. A Natív előbb felkészíti a Steamet az altatásra. A Manuális megvárja a Folytatást. A Soha mindig futva tartja.</string> + <string name="mode_background_downloads">Letöltések futtatásának fenntartása</string> + <string name="mode_background_downloads_hint">Elhalasztja a háttérbeli felfüggesztést, amíg a Steam aktívan letölt.</string> + <string name="mode_zram">zRAM-tömörítés</string> + <string name="mode_zram_hint">Játék közben a Steam kliens memóriája a készülék zramjába tömörül, így a játéknak több RAM jut. A Steam következő indításakor lép életbe.</string> + <string name="mode_zram_unsupported">Nem elérhető: a készüléken nincs zram vagy swap, vagy a kernel régebbi az 5.4-nél.</string> + <string name="mode_suspend_note">Az Automatikus szüneteltet a háttérben, és megjelenéskor folytatja. A Manuális megvárja a Folytatást. A Soha mindig futva tartja.</string> + <string name="mode_startup">Indítás</string> + <string name="mode_steam_startup">Steam indítása a DroidDeckkel</string> + <string name="mode_steam_startup_hint">Megnyitja a Steam-munkamenetet a DroidDeck indulásakor.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Kiadások keresése…</string> + <string name="mode_decky_ready">Készen áll a %1$s telepítésére.</string> + <string name="mode_decky_none">Nem található kompatibilis build. Próbálja újra később.</string> + <string name="mode_decky_installed">Telepítve · %1$s</string> + <string name="mode_decky_update">Elérhető frissítés · %1$s</string> + <string name="mode_decky_current">Naprakész · %1$s</string> + <string name="mode_decky_loader">Betöltő</string> + <string name="mode_decky_install_latest">Legújabb telepítése</string> + <string name="mode_decky_on">A Steammel együtt indul. Amíg be van kapcsolva, az eszközön lévő más alkalmazások is irányíthatják a Steamet.</string> + <string name="mode_decky_off">Ki. A Steam távoli hibakeresési portja zárva marad.</string> + <string name="mode_decky_remove_title">Eltávolítja a Decky Loadert?</string> + <string name="mode_decky_remove_text">Eltávolítja a betöltőt. A bővítményei és beállításai megmaradnak.</string> + <string name="mode_client">Kliens</string> + <string name="mode_mangoapp">Teljesítmény-overlay</string> + <string name="mode_mangoapp_hint">Kapcsolja ki, ha a játékok összeomlanak vagy elfeketednek Deck módban. A következő munkamenettől érvényes.</string> + <string name="mode_steam_repair">Steam-kliens javítása</string> + <string name="mode_steam_repair_hint">A Steam kliens újbóli letöltése a Steam következő indításakor. Használja, ha a Steam a betöltő képernyőn ragad. A játékok, a bejelentkezés és a beállítások megmaradnak.</string> + <string name="mode_steam_repair_queued">A Steam kliens újra letöltődik a Steam következő indításakor.</string> + <string name="mode_steam_repair_button">Javítás</string> + <string name="mode_added_art">Illusztrációk</string> + <string name="mode_sgdb_key">SteamGridDB API-kulcs</string> + <string name="mode_sgdb_key_yours">A kulcsa</string> + <string name="mode_sgdb_edit">Szerkesztés…</string> + <string name="mode_added_art_hint">Kitölti a hiányzó illusztrációkat a Steamről, majd a SteamGridDB-ről. A játék mappájában lévő saját cover.jpg, hero.jpg, logo.png vagy icon.png fájl elsőbbséget kap.</string> + <string name="summary_remove_game">%1$s eltávolítása</string> + <string name="mode_added_remove_confirm">Eltávolítja?</string> + <string name="games_add">Játék hozzáadása</string> + <string name="games_add_title">Játék hozzáadása:</string> + <string name="games_pick_exe_title">Válassza ki az exe fájlt:</string> + <string name="games_add_unreachable">Ez a hely nem érhető el a munkamenetben</string> + <string name="mode_added_exe_check">Ennek az exe fájlnak az ellenőrzése</string> + <string name="wincomp_title">Windows-összetevők</string> + <string name="wincomp_pad_hint">LB / RB a szakaszok közötti ugráshoz.</string> + <string name="wincomp_card_none">Nincs</string> + <string name="wincomp_applies">A Proton által nem tartalmazott Windows DLL-ek az összetevőlistából. Kapcsolja be azokat, amelyekre ennek a játéknak szüksége van: ezek a játék saját Windows-mappájába kerülnek, soha nem a fájljaiba, és megmaradnak, függetlenül attól, melyik Protonon fut.</string> + <string name="wincomp_offline">Nem sikerült elérni az összetevőlistát. A már letöltött összetevők továbbra is kapcsolhatók.</string> + <string name="wincomp_recommended">Ajánlott ehhez a játékhoz</string> + <string name="wincomp_checking">Annak ellenőrzése, mire van szüksége ennek a játéknak…</string> + <string name="wincomp_when_online">Online elérhető</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">%1$d összetevő bekapcsolása…</item> + <item quantity="other">%1$d összetevő bekapcsolása…</item> + </plurals> + <string name="wincomp_auto_section">Bekapcsolva ehhez a játékhoz</string> + <string name="wincomp_auto_steam">A Steam a %2$s segítségével telepíti a %1$s-t (alkalmazás: %3$s)</string> + <string name="wincomp_auto_gog">A GOG listájából ehhez a játékhoz</string> + <string name="wincomp_auto_epic">Az Epic előfeltételeiből ehhez a játékhoz</string> + <string name="wincomp_auto_amazon">Az Amazon telepítési lépéseiből ehhez a játékhoz</string> + <string name="wincomp_steam_by_name">A Steam név szerint egyezve telepíti a %1$s-t a %2$s alkalmazással</string> + <string name="wincomp_suggestions">Szintén szerepel a listán</string> + <string name="wincomp_suggestion_reason">A %1$s sorolja fel; itt nem összetevő</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">A játék a %1$s-t tartalmazza</string> + <string name="wincomp_found_shipped">A játékban megtalálható a %1$s (gyakran változatlanul is működik)</string> + <string name="wincomp_already_here">Már megvan ebben a játékban</string> + <string name="wincomp_no_recommendation">A játék mappájában semmi nem utal összetevőre.</string> + <string name="wincomp_active">Telepítve ehhez a játékhoz (%1$d)</string> + <string name="wincomp_all">Minden összetevő (%1$d)</string> + <string name="wincomp_installers">Windows-telepítőt igényel (%1$d)</string> + <string name="wincomp_installers_note">Ezek saját telepítőprogramok, amelyekben nincs szétszedhető csomag, és még nincs rögzítve, mit telepítenek. Többségük régi futtatókörnyezet, amelyet a Protonban lévő Mono már helyettesít; a rögzítések elkészülésük után kerülnek hozzáadásra.</string> + <string name="wincomp_show">Megjelenítés</string> + <string name="wincomp_hide">Elrejtés</string> + <string name="wincomp_needs_installer">Saját telepítőprogramot futtat (még nincs rögzítve)</string> + <string name="wincomp_unsupported">Itt még nem támogatott</string> + <string name="wincomp_loading">Összetevők betöltése…</string> + <string name="wincomp_failed">Nem sikerült telepíteni: %1$s</string> + <string name="wincomp_downloaded">Letöltve</string> + <string name="wincomp_downloading">%1$s letöltése</string> + <string name="wincomp_installing">Telepítés: %1$s</string> + <string name="wincomp_reverting">Kikapcsolás…</string> + <string name="wincomp_download_size">%1$s letöltés</string> + <string name="wincomp_next_launch">A játék következő indításakor lép érvénybe.</string> + <string name="mode_stretch169">16:9 játékok nyújtása</string> + <string name="mode_stretch169_hint">A 16:9-nél négyzetesebb képernyőkön kitölti a játékkal a képernyőt sávok helyett. A következő munkamenettől érvényes.</string> + <string name="mode_audio">Hang</string> + <string name="mode_directaudio">DirectAudio a játékokhoz</string> + <string name="mode_directaudio_hint">Megkerüli a PulseAudiót a kisebb késleltetés érdekében.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">Hangos csevegéshez.</string> + <string name="mode_network">Hálózat</string> + <string name="mode_wifi_discovery">Wi-Fi felderítés</string> + <string name="mode_wifi_discovery_hint">Wi-Fi nevek és közeli hálózatok megjelenítése a Steamben.</string> + <string name="mode_wifi_location_off">A helymeghatározási szolgáltatások ki vannak kapcsolva.</string> + <string name="mode_wifi_permission_denied">A helymeghatározási engedély nincs megadva.</string> + <string name="mode_wifi_open_settings">Beállítások megnyitása</string> + <string name="mode_wifi_continue">Folytatás</string> + <string name="mode_wifi_explain_title">Bekapcsolja a Wi-Fi felderítést?</string> + <string name="mode_wifi_explain_text">Az Android helymeghatározási engedélyt igényel a Wi-Fi nevek beolvasásához és a közeli hálózatok felderítéséhez. A DroidDeck ezt a hozzáférést arra használja, hogy megjelenítse ezeket a hálózatokat a Steamben. Nem követjük a helyadatait. Az internet-hozzáférés ezen engedély nélkül is működik.</string> + <string name="mode_storage">Játéktárhely</string> + <string name="mode_storage_auto">Automatikus – az SD-kártya, ha van, és a Játékok mappái</string> + <string name="mode_storage_auto_none">Automatikus – a Játékok mappái, és az SD-kártya, ha van (jelenleg nincs)</string> + <string name="mode_storage_internal">Csak belső</string> + <string name="mode_storage_folder">Mappa: %1$s</string> + <string name="mode_second_library">Második könyvtár</string> + <string name="mode_storage_note">Az SD-kártyáról vagy megosztott tárhelyről streamelő játékok akadhatnak.</string> + <string name="mode_storage_diagnostics">Tárhely-diagnosztika</string> + <string name="mode_storage_diagnostics_hint">Rögzíti a foglalási eredményeket és a mintavételezett tárhelyidőzítéseket a megosztott naplókban. Bekapcsolva lassíthatja a telepítéseket. A következő munkamenettől érvényes.</string> + <string name="mode_choose_folder">Válasszon mappát…</string> + <string name="mode_custom_res_title">Egyéni felbontás</string> + <string name="mode_custom_res_text">Felülírja a korlátot és az arányt. A képernyőhöz nem illő méret sávokat eredményez.</string> + <string name="mode_width">Szélesség</string> + <string name="mode_height">Magasság</string> + <string name="mode_custom_res_range">320×240 és 3840×2160 között.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d játék</item> + <item quantity="other">%1$d játék</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Törlés</string> + <string name="common_restore">Visszaállítás</string> + <string name="common_download">Letöltés</string> + <string name="common_delete_named">%1$s törlése</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Futtatókörnyezet-illesztőprogram</string> + <string name="comp_runtime_driver_hint">A Steam, a játékok és az asztal használja. A következő munkamenettől érvényes.</string> + <string name="comp_import_turnip">Turnip zip importálása…</string> + <string name="comp_display_driver">Megjelenítő-illesztőprogram</string> + <string name="comp_display_driver_hint">Mindkét módban ez rajzolja a képkockákat a képernyőre. Indítsa újra az alkalmazást az érvényesítéshez.</string> + <string name="comp_import_adrenotools">AdrenoTools zip importálása…</string> + <string name="comp_never">soha</string> + <string name="comp_nightlies_checked">Nightlies ellenőrizve: %1$s</string> + <string name="comp_title">Összetevők</string> + <string name="comp_about">Az Összetevőkről</string> + <string name="comp_check_drivers">Új illesztőprogramok keresése</string> + <string name="comp_check_nightlies">Új csomagok keresése a Nightliesben</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Az itt kiválasztott Proton futtat minden olyan játékot, amely a Steamben nem választott saját Protont, és a Steamben végzett módosítás is megjelenik itt. A Steam frissítéskor lecseréli a Valve Protonját; az eredetik buildenként megmaradnak.</string> + <string name="comp_scope">Konfiguráció</string> + <string name="comp_profile_configure">Profil beállítása</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Alapértelmezett profil</string> + <string name="comp_scope_general_detail">A felülírás nélküli játékok automatikusan ezt használják.</string> + <string name="comp_profile_game_detail">A mentett beállítások automatikusan érvénybe lépnek a %1$s indításakor.</string> + <string name="comp_game_hint">Csak azokat a beállításokat válassza ki, amelyekre ennek a játéknak szüksége van. Minden más továbbra is az Alapértelmezett profilt használja.</string> + <string name="comp_game_fex">FEX előbeállítás</string> + <string name="comp_game_fex_inherited">Az Alapértelmezett profil előbeállítását használja.</string> + <string name="comp_game_fex_override">Egyéni előbeállítás mentve ehhez a játékhoz.</string> + <string name="comp_game_fex_custom">Egyéni FEX-változók</string> + <string name="comp_game_use_general">Alapértelmezett használata</string> + <string name="comp_game_compatibility">Játékkompatibilitás</string> + <string name="comp_game_environment_hint">Proton-, DXVK-, VKD3D- és szinkronizációs környezeti beállítások ehhez a játékhoz.</string> + <string name="comp_game_proton_inherited">Az Alapértelmezett profil Protonját használja.</string> + <string name="comp_game_proton_override">Egyéni Proton mentve ehhez a játékhoz a Steam kompatibilitási hozzárendelésén keresztül.</string> + <string name="comp_no_proton_short">Nincs Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Az Alapértelmezett profil %1$s csomagját használja, hacsak ez a játék másik csomagot nem választ.</string> + <string name="comp_game_component_general">Az Alapértelmezett profil összetevőcsomagját használja.</string> + <string name="comp_game_component_override">Csak ehhez a játékhoz a %1$s-t használja.</string> + <string name="comp_game_runtime_options">Futtatókörnyezet-beállítások</string> + <string name="comp_game_environment_other_hint">Egyéb, játékonkénti Proton-, DXVK-, VKD3D-Proton- és szinkronizációs környezeti beállítások.</string> + <string name="comp_game_saved_next">A %1$s profilja mentve a játék következő indítására.</string> + <string name="game_no_steam_title">Indítás Steam nélkül</string> + <string name="game_no_steam_detail">Proton/FEX alatt nyitja meg a Steam kliens nélkül; a Steam funkciói ki vannak kapcsolva.</string> + <string name="game_no_steam_on">Be</string> + <string name="game_steam_with">Steammel indul</string> + <string name="game_steam_without">Steam nélkül indul</string> + <string name="game_settings_card">Beállítások</string> + <string name="game_settings_menu_title">%1$s beállításai</string> + <string name="game_settings_default">Alapértelmezett</string> + <string name="game_settings_default_detail">Mindent, amit ennél a játéknál módosítottál, visszaállít az alkalmazás beállításaira.</string> + <string name="game_sync_custom">Egyéni szinkronizálási változók</string> + <string name="comp_game_proton_live">A %1$s Proton-választása mentve, és már elérhető a Steamben.</string> + <string name="comp_game_proton_next">A %1$s Proton-választása mentve. Indítsa újra a Steamet a játék elindítása előtt.</string> + <string name="comp_game_proton_not_runnable">A %1$s nem tudja használni a kiválasztott Protont ezen az eszközön.</string> + <string name="comp_game_load_failed">Nem sikerült betölteni a %1$s profilját: %2$s</string> + <string name="comp_game_save_failed">Nem sikerült menteni a játékprofilt: %1$s</string> + <string name="comp_game_reset">Játékprofil visszaállítása</string> + <string name="comp_game_reset_title">Visszaállítja a %1$s profilját?</string> + <string name="comp_game_reset_body">Eltávolítja ennek a játéknak a Proton-, FEX-, összetevőcsomag-, környezeti, textúraszűrési és Windows-összetevő-felülírásait? Ezután az Alapértelmezett profilt fogja használni.</string> + <string name="comp_game_reset_done">A %1$s most az Alapértelmezett profilt használja.</string> + <string name="comp_game_reset_failed">Nem sikerült teljesen visszaállítani a játékprofilt: %1$s</string> + <string name="comp_default_live">A %1$s most minden olyan játékot futtat, amely a Steamben nem választott saját Protont.</string> + <string name="comp_default_next">A %1$s a Steam következő indításától minden olyan játékot futtat, amely nem választott saját Protont.</string> + <string name="comp_default_not_runnable">A %1$s itt nem tud elindítani játékokat, ezért nem lehet alapértelmezett.</string> + <string name="comp_default_failed">Nem sikerült menteni az alapértelmezett Protont: %1$s</string> + <string name="comp_swapped">%1$s · %2$d kicserélve</string> + <string name="comp_all_original">%1$s · mind eredeti</string> + <string name="comp_game_running_suffix">%1$s · a játék fut</string> + <string name="comp_esync_pack">%1$s · droiddeck-esync csomag</string> + <string name="comp_esync_wanted">%1$s · még nincs droiddeck-esync csomag</string> + <string name="comp_esync_builtin">%1$s · az esync be van építve, nincs szükség csomagra</string> + <string name="comp_gpu_drivers">GPU-illesztőprogramok</string> + <string name="comp_reapplied">%1$s · újraalkalmazva indításkor: %2$s</string> + <string name="comp_next_queued">Következő: %1$s · a játék bezárása után</string> + <string name="comp_in_use">%1$s használatban: %2$s</string> + <string name="comp_waits">Megvárja, amíg a játék bezárul</string> + <string name="comp_applies_next_game">A következő játékindítástól érvényes</string> + <string name="comp_import_zip">.zip importálása</string> + <string name="comp_reading">Protonok beolvasása…</string> + <string name="comp_no_proton">Még nincs telepítve Proton. Indítsa el egyszer a Steamet az ARM64 Protonjának letöltéséhez, vagy adjon hozzá GE-Protont, CachyOS-t vagy DroidDeck-Protont a Beállításból.</string> + <string name="comp_original">Eredeti · %1$s</string> + <string name="comp_this_build">%1$s · ez a build</string> + <string name="comp_earlier_build">%1$s · korábbi build</string> + <string name="comp_installed_count">Telepítve · %1$d</string> + <string name="comp_nothing_stored">Még nincs tárolva semmi a %1$s számára. Ennek a Protonnak a saját fájljai eredetiként lesznek mentve.</string> + <string name="comp_waits_long">Egy játék fut ezen a Protonon, ezért ez megvárja, amíg bezárul.</string> + <string name="comp_applies_long">A következő játékindítástól érvényes.</string> + <string name="comp_swap_title">Kicseréli a %1$s-t?</string> + <string name="comp_swap_body">Beilleszti a %1$s-t a %2$s-be? Az eredeti fájljai mentve maradnak. %3$s</string> + <string name="comp_restore_title">Visszaállítja a %1$s-t?</string> + <string name="comp_restore_body">Visszateszi a %1$s eredetijét a %2$s-be? %3$s</string> + <string name="comp_delete_package_body">Eltávolítja a csomagot az alkalmazásból. Újra letöltheti.</string> + <string name="comp_delete_original_title">Törli ezt az eredetit?</string> + <string name="comp_delete_original_body">Ez a %1$s eredeti a %2$s egy korábbi buildjéből származik. Az aktuális build eredetije mindig megmarad.</string> + <string name="comp_nightlies_count">A Nightliesen · %1$d</string> + <string name="comp_refresh_to_list">Frissítsen a Nightliesen lévő csomagok listázásához.</string> + <string name="comp_nothing_new">Nincs semmi új az utolsó ellenőrzés óta.</string> + <string name="comp_import_wcp">.wcp importálása</string> + <string name="comp_restore_original">Ennek a Protonnak az eredetijének visszaállítása</string> + <string name="comp_restore_original_body">Visszateszi a %1$s eredeti %2$s-ét?</string> + <string name="comp_swap">Csere</string> + <string name="comp_about_text">FEX, DXVK és VKD3D-Proton minden olyan Protonhoz, amellyel a Steam játékokat futtat.\n\nVálasszon ki egy telepített sort a becseréléséhez. Ez a következő játékindításkor, vagy a futó játék bezárása után lép érvénybe.\n\nA választásai minden indítás előtt újraellenőrződnek, és visszaállnak, ha valami megváltoztatta őket. Minden Proton eredeti fájljai megmaradnak, így a Steam-frissítések sosem veszítik el őket.</string> + <string name="comp_tag_original">Eredeti</string> + <string name="comp_tag_in_use">Használatban</string> + <string name="comp_tag_new">Új</string> + <string name="comp_tag_stored">Tárolva</string> + <string name="perf_title">Teljesítmény</string> + <string name="perf_lede">CPU-magok, munkamenet-javítások és a hosztnév. A következő munkamenettől érvényes.</string> + <string name="perf_client_cores_group">Steam-kliens magok</string> + <string name="perf_override">A Steam magválasztásának felülírása</string> + <string name="perf_override_hint">A Steamet, felhasználói felület segítőjét és a gamescope-ot az alábbi magokhoz rögzíti.</string> + <string name="perf_client_cores">Kliensmagok</string> + <string name="perf_client_cores_on">Magok a Steamhez.</string> + <string name="perf_client_cores_off">Kapcsolja be a felülírást a kiválasztáshoz.</string> + <string name="perf_game_cores_group">Játékmagok</string> + <string name="perf_game_cores">Játékmagok</string> + <string name="perf_game_cores_hint">Magok a játékokhoz. Ha mind kiválasztva van, az Android szabadon ütemez.</string> + <string name="perf_client_ui">Kliens felhasználói felület</string> + <string name="perf_glthread">Szálalt GL</string> + <string name="perf_glthread_hint">Reszponzívabbá teheti a Steam menüit.</string> + <string name="perf_zink">Zink: lusta leírók</string> + <string name="perf_zink_hint">Leírópuffer nélküli illesztőprogramokhoz ajánlott.</string> + <string name="perf_noglerror">GL-hibaellenőrzések kihagyása</string> + <string name="perf_noglerror_hint">Kikapcsolja a hívásonkénti GL-ellenőrzést.</string> + <string name="perf_gsrealtime">gamescope: valós idejű GPU-sor</string> + <string name="perf_gsrealtime_hint">Előnyben részesíti a kompozitor GPU-munkáját. Egyenletesebbé teheti a képkocka-ütemezést, kisebb költséggel a játékoknak.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">A GPU legmagasabb órajelen tartása</string> + <string name="perf_gpuclock_hint">Csak Adreno. Kevesebb akadás, nagyobb akkumulátorhasználat és hőtermelés.</string> + <string name="perf_fixes">Munkamenet-javítások</string> + <string name="perf_sysmem">Turnip: sysmem renderelés</string> + <string name="perf_sysmem_hint">Gyorsabb a Steamhez és a legtöbb játékhoz. 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_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> + <string name="perf_esync_hint">A játékok Windows-szálai eventfd-n és megosztott memórián keresztül várnak egymásra, a wineserveren át vezető körök helyett. Egy az adott Proton buildhez készült droiddeck-esync csomagot használ; a csomagok automatikusan letöltődnek. Amíg egy új Proton buildhez nincs csomag, a droiddeck-fsync helyettesíti. A következő munkamenettől érvényes.</string> + <string name="perf_xalia_hint">Kikapcsolja a Proton kontroller-navigációs segédjét, amely minden játékban CPU-t használ.</string> + <string name="perf_seccomp">A proot futtatása seccomp nélkül</string> + <string name="perf_seccomp_hint">Javíthatja a hiányzó szisztémahívás-hibákat egyes kerneleken. Csökkentheti a teljesítményt.</string> + <string name="perf_fastpath">proot gyors útvonal</string> + <string name="perf_fastpath_needs_seccomp">A proot seccomp-szűrőjét igényli.</string> + <string name="perf_fastpath_hint">Gyorsabb fájlkeresés és kevesebb akadás. Kapcsolja ki, ha egy program nem találja a fájljait.</string> + <string name="perf_identity">Munkamenet-azonosítás</string> + <string name="perf_hostname">Hosztnév</string> + <string name="perf_hostname_hint">A név, amelyet a Steam ehhez az eszközhöz lát. Üresen hagyva visszaállítja: %1$s.</string> + <string name="perf_hostname_invalid">Csak betűk, számok és belső kötőjelek, legfeljebb 63 karakter.</string> + <string name="perf_phantom_warning">Az Android be van állítva, hogy kilője ezt a munkamenetet</string> + <string name="driver_installed">Telepítve</string> + <string name="driver_available">Letölthető</string> + <string name="driver_nothing_new">Nincs semmi új az utolsó ellenőrzés óta.</string> + <string name="driver_restore_builtin">Beépített illesztőprogramok visszaállítása</string> + <string name="driver_delete_builtin">Beépítve az alkalmazásba: ez eltávolítja a kicsomagolt fájljait, és elrejti. A Beépített illesztőprogramok visszaállítása visszahozza.</string> + <string name="driver_delete_bundle">Fele egy Android + Linux csomagnak: mindkét fele eltávolításra kerül. A használatban lévő illesztőprogram visszaáll az alapértelmezettre.</string> + <string name="driver_delete_plain">A fájljai eltávolításra kerülnek az alkalmazásból.</string> + <string name="driver_delete_in_use">A fájljai eltávolításra kerülnek. Használatban van, ezért az alapértelmezett veszi át a szerepét.</string> + <string name="drawer_page_display">Kijelző</string> + <string name="drawer_page_effects">Effektek</string> + <string name="drawer_page_controls">Vezérlők</string> + <string name="drawer_page_components">Összetevők</string> + <string name="drawer_page_controller">Kontroller</string> + <string name="drawer_page_settings">Beállítások</string> + <string name="drawer_page_desc">%1$s oldal</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Asztal</string> + <string name="drawer_steam_menu">Steam-menü</string> + <string name="drawer_quick_access">Gyors hozzáférés</string> + <string name="drawer_open_qam">Gyors hozzáférés menü megnyitása</string> + <string name="drawer_prev_page">Előző oldal</string> + <string name="drawer_next_page">Következő oldal</string> + <string name="drawer_hud">Teljesítmény HUD</string> + <string name="drawer_scaling">Méretezési mód</string> + <string name="drawer_scaling_sharpness">Méretezési élesség</string> + <string name="drawer_effects">Képernyőeffektek</string> + <string name="drawer_effects_hint">Élőben. Kis GPU-időt igényel, amíg bármelyik effekt be van kapcsolva.</string> + <string name="drawer_look">Előbeállítások</string> + <string name="drawer_look_custom">Egyéni</string> + <string name="drawer_effects_advanced">Speciális</string> + <string name="widgets_expanded">Kibontva</string> + <string name="widgets_collapsed">Összecsukva</string> + <string name="drawer_cas">Élesítés (CAS)</string> + <string name="drawer_cas_level">Élesítés szintje</string> + <string name="drawer_fake_hdr">Hamis HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">SteamVR indítása</string> + <string name="steamvr_checking">SteamVR ellenőrzése…</string> + <string name="drawer_deband">Csíkmentesítés</string> + <string name="drawer_deband_strength">Csíkmentesítés erőssége</string> + <string name="drawer_brightness">Fényerő</string> + <string name="drawer_contrast">Kontraszt</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Telítettség</string> + <string name="drawer_fxaa">FXAA (élsimítás)</string> + <string name="drawer_toon">Rajzfilmes körvonalak</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Textúraszűrés</string> + <string name="drawer_texture_hint">DirectX 9–11 játékok, a következő indításuktól.</string> + <string name="drawer_anisotropy">Anizotróp szűrés</string> + <string name="drawer_texture_sharpness">Textúraélesség</string> + <string name="drawer_texture_sharpness_note">Negatív mip-eltolás: élesebb textúrák, némi csillogással. Az Automatikus illeszkedik ahhoz, mennyire van felnagyítva a munkamenet a képernyőhöz.</string> + <string name="drawer_touch_auto">Automatikus (%1$s)</string> + <string name="drawer_keyboard">Billentyűzet</string> + <string name="drawer_latency">Késleltetés</string> + <string name="drawer_low_latency_controller">Alacsony késleltetésű kontroller</string> + <string name="drawer_low_latency_controller_hint">A kontroller 250 Hz helyett 1000 Hz-en jelent. Kicsit több CPU.</string> + <string name="drawer_low_latency_touch">Alacsony késleltetésű érintés</string> + <string name="drawer_low_latency_touch_hint">Az érintések kihagyják a képkockák kötegelését, így a Steam érintésvezérlése 1000 Hz-en fut. Kicsit több CPU.</string> + <string name="drawer_pc_keyboard">PC-billentyűzet</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Második képernyő</string> + <string name="drawer_second_screen_mode">Mód</string> + <string name="drawer_second_screen_shows">Megjelenít</string> + <string name="drawer_android_apps">Android-alkalmazások</string> + <string name="drawer_launch_app">Alkalmazás indítása</string> + <string name="common_hide">Elrejtés</string> + <string name="common_show">Megjelenítés</string> + <string name="drawer_no_apps">Nincs indítható alkalmazás</string> + <string name="drawer_session_behavior">Munkamenet-viselkedés</string> + <string name="drawer_suspend_hint">Most és a jövőbeli, ebben a módban futó munkamenetekre is érvényes.</string> + <string name="drawer_next_session">Következő munkamenet</string> + <string name="drawer_support">Támogatás</string> + <string name="drawer_logs">Munkamenet-naplók</string> + <string name="drawer_logs_hint">Csatolja egy hibajelentéshez</string> + <string name="drawer_share_logs">Naplók megosztása</string> + <string name="drawer_background">Háttér</string> + <string name="drawer_stop">Leállítás</string> + <string name="drawer_stop_title">Leállítja a munkamenetet?</string> + <string name="drawer_running_now">Jelenleg fut</string> + <string name="drawer_no_game">Nem fut játék Protonon</string> + <string name="drawer_selected_profile">Játékprofil</string> + <string name="drawer_selected_profile_none">A profil részletei még nem állnak rendelkezésre.</string> + <string name="drawer_profile_refresh_failed_initial">Nem sikerült betölteni a játékprofilokat. Automatikus újrapróbálkozás.</string> + <string name="drawer_profile_refresh_failed_stale">Nem sikerült frissíteni a játékprofilokat. Az utolsó elérhető adatok jelennek meg; automatikus újrapróbálkozás.</string> + <string name="drawer_profile_inspect_hint">A következő indításkor használt mentett beállítások megtekintése és szerkesztése.</string> + <string name="drawer_profile_default">Az Alapértelmezett profil használatban</string> + <string name="drawer_profile_custom">Egyéni profil</string> + <string name="drawer_component_inherited">A %1$s az Alapértelmezett profilból használatban.</string> + <string name="drawer_game_components_note">A módosítások a %1$s profiljába kerülnek mentésre, és a játék következő indításakor lépnek érvénybe.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d játékfelülírás</item> + <item quantity="other">%1$d játékfelülírás</item> + </plurals> + <string name="drawer_no_proton">Még nincs telepítve Proton.</string> + <string name="drawer_game_running">játék fut</string> + <string name="drawer_reapplied">újraalkalmazva indításkor: %1$s</string> + <string name="drawer_original">Eredeti</string> + <string name="drawer_components_note">Importálás és törlés az Összetevők oldalon.</string> + <string name="setup_check_done">Kész</string> + <string name="setup_check_warn">Figyelmet igényel</string> + <string name="setup_check_busy">Feldolgozás</string> + <string name="setup_limit_adb_failed">Ellenőrizze a vezeték nélküli hibakeresés IP-címét és portját, vagy párosítsa újra, ha az Android eltávolította ezt az eszközt.</string> + <string name="setup_install">Telepítés</string> + <string name="setup_manage">Kezelés</string> + <string name="setup_tab_overview">Áttekintés</string> + <string name="setup_tab_controller">Kontroller</string> + <string name="setup_tab_session">Munkamenet</string> + <string name="setup_tab_launcher">Indítóalkalmazás</string> + <string name="setup_title">Beállítás</string> + <string name="setup_all_set">● Minden rendben</string> + <string name="setup_n_ready">%1$d/%2$d kész</string> + <string name="setup_system_check">Rendszerellenőrzés</string> + <string name="setup_gpu_supported">Az eszköz támogatott</string> + <string name="setup_gpu_untested">Nem tesztelt GPU</string> + <string name="setup_gpu_unsupported">A GPU nem támogatott</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">A Steamnek Adreno-illesztőprogram szükséges; a %1$s fekete képernyőt jeleníthet meg</string> + <string name="setup_runtime">Linux futtatókörnyezet</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Nincs telepítve · kb. 3 GB, az első Játék gombnyomáskor települ</string> + <string name="setup_installed">Telepítve</string> + <string name="setup_runtime_update">%1$s · elérhető frissítés</string> + <string name="setup_runtime_current">%1$s · naprakész</string> + <string name="setup_limit">Gyermekfolyamat-korlát</string> + <string name="setup_limit_on">Be · az Android bezárhatja a Steamet. A kikapcsolása egy percet vesz igénybe.</string> + <string name="setup_limit_unset">Nincs beállítva · az Android bezárhatja a Steamet. A kikapcsolása egy percet vesz igénybe.</string> + <string name="setup_limit_unknown">Nem sikerült ellenőrizni · a kikapcsolása egy percet vesz igénybe.</string> + <string name="setup_fix_it">Javítás</string> + <string name="setup_details">Részletek</string> + <string name="setup_dev_options">Fejlesztői beállítások</string> + <string name="setup_use_wireless">Vezeték nélküli hibakeresés használata</string> + <string name="setup_check_again">Ellenőrzés újra</string> + <string name="setup_limit_turn_on">Korlát bekapcsolása</string> + <string name="setup_account">Steam-fiók</string> + <string name="setup_signed_in_offline">Bejelentkezve mint %1$s · offline mód</string> + <string name="setup_signed_in">Bejelentkezve mint %1$s</string> + <string name="setup_sign_in">Nyomja meg a Játék gombot, és jelentkezzen be a Steambe</string> + <string name="setup_tools">Eszközök</string> + <string name="setup_controller">Kontroller</string> + <string name="setup_controller_unavailable">A kontrollerbeállítások nem érhetők el.</string> + <string name="setup_session">Munkamenet</string> + <string name="setup_logs">Munkamenet-naplók</string> + <string name="setup_logs_hint">Minden munkamenet után mentve</string> + <string name="setup_agent_commands">Hibakeresési eszközök</string> + <string name="setup_latest_logs">Legutóbbi munkamenet-naplók</string> + <string name="setup_saved_logs">Mentett munkamenet-naplók</string> + <string name="setup_saved_logs_hint">A legújabb %1$d-t tartja meg</string> + <string name="setup_clear_logs">Naplók törlése</string> + <string name="setup_reset_settings">Minden beállítás visszaállítása</string> + <string name="setup_reset_settings_hint">Minden beállítást visszaállít az alapértékre</string> + <string name="setup_reset_settings_button">Visszaállítás</string> + <string name="setup_reset_settings_title">Visszaállítod az összes beállítást?</string> + <string name="setup_reset_settings_body">A kép, a teljesítmény, a kontroller, a téma, a nyelv és az indítóalkalmazás beállításai visszaállnak az alapértékre. A játékaid, a Steam-bejelentkezés, az áruházi fiókok, a letöltött illesztőprogramok és a tárhelymappák megmaradnak.</string> + <string name="setup_reset_settings_profiles">A játékprofilok visszaállítása is (Proton, FEX, összetevők és futtatókörnyezet játékonként, valamint az Alapértelmezett profil környezete)</string> + <string name="setup_reset_settings_session_running">A beállítások visszaállítása előtt állítsd le a munkamenetet.</string> + <string name="setup_reset_settings_partial">A beállítások visszaálltak, de nem mindegyik. A részletek a naplókban vannak.</string> + <string name="setup_offline">Offline mód</string> + <string name="setup_sign_in_first">Előbb jelentkezzen be a Steambe</string> + <string name="setup_launcher">Indítóalkalmazás</string> + <string name="setup_language">Nyelv</string> + <string name="setup_language_hint">A Steam is ezt használja, a következő indításától.</string> + <string name="setup_language_system">Rendszer alapértelmezett (%1$s)</string> + <string name="setup_language_system_short">Rendszer alapértelmezett</string> + <string name="setup_app_scale">Alkalmazásméret</string> + <string name="setup_app_scale_hint">A DroidDeck szövege és vezérlői</string> + <string name="setup_app_scale_default">%1$d%% (Alapértelmezett)</string> + <string name="setup_theme">Téma</string> + <string name="setup_theme_hint">Az indítóalkalmazás megjelenése</string> + <string name="setup_home">Használat kezdőképernyőként</string> + <string name="setup_home_on">A DroidDeck lehet a kezdőképernyő alkalmazás</string> + <string name="setup_home_off">A DroidDeck soha nem jelenik meg kezdőképernyő alkalmazásként</string> + <string name="setup_orientation">Tájolás</string> + <string name="setup_orientation_auto">Automatikus fekvő</string> + <string name="setup_orientation_landscape">Fekvő</string> + <string name="setup_orientation_reverse">Fordított fekvő</string> + <string name="setup_fullscreen">Teljes képernyő</string> + <string name="setup_fullscreen_on">Elrejti az Android állapot- és navigációs sávokat</string> + <string name="setup_fullscreen_off">Megjeleníti az Android állapot- és navigációs sávokat</string> + <string name="setup_default_home">Alapértelmezett kezdőképernyő alkalmazás</string> + <string name="setup_choose_home">Válasszon kezdőképernyő alkalmazást</string> + <string name="setup_choose">Kiválasztás</string> + <string name="setup_linux_apps">Linux-alkalmazások (béta)</string> + <string name="setup_tool_files">Fájlok</string> + <string name="setup_tool_files_hint">Fájlok tallózása és kezelése</string> + <string name="setup_tool_protons">Proton-verziók</string> + <string name="setup_tool_protons_hint">ARM64 Proton-buildek telepítése</string> + <string name="setup_tool_performance">Teljesítmény</string> + <string name="setup_tool_performance_hint">CPU-mag hozzárendelés</string> + <string name="setup_tool_roms">ROMs mappa</string> + <string name="setup_tool_roms_hint">Hol vannak tárolva az emulátoros játékok</string> + <string name="setup_card_components">Összetevők</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Vezérlők</string> + <string name="setup_card_controls_hint">Gombkiosztás</string> + <string name="store_tab_discover">Felfedezés</string> + <string name="store_tab_search">Keresés</string> + <string name="store_tab_installed">Telepítve</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Áruház</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● A Flatpak kész</string> + <string name="store_needs_runtime">Előbb telepítse a Linux futtatókörnyezetet a Beállításból.</string> + <string name="store_setup_title">Flatpak beállítása</string> + <string name="store_setup_text">Hozzáadja a Flatpakot, és csatlakoztatja a Flathubhoz (kb. 20 MB). Az első alkalmazás letölti a saját futtatókörnyezetét is.</string> + <string name="store_setting_up">Beállítás…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Frissítések</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Indítás…</string> + <string name="store_categories">Kategóriák</string> + <string name="store_unreachable">Nem sikerült elérni a Flathubot. Ellenőrizze a kapcsolatot, és próbálja újra.</string> + <string name="store_try_again">Próbálja újra</string> + <string name="store_search_label">Keresés a Flathubon</string> + <string name="store_search_placeholder">Firefox, játékok, emulátorok…</string> + <string name="store_search">Keresés</string> + <string name="store_all">Összes</string> + <string name="store_searching">Keresés…</string> + <string name="store_search_hint">Keressen név szerint, vagy válasszon kategóriát. Csak ARM64-es alkalmazások jelennek meg.</string> + <string name="store_no_results">Nincs ennek megfelelő ARM64-es alkalmazás a Flathubon.</string> + <string name="store_results">Eredmények</string> + <string name="store_check_updates">Frissítések keresése</string> + <string name="store_update_all">Összes frissítése (%1$d)</string> + <string name="store_all_current">● Minden naprakész</string> + <string name="store_no_apps">Még nincsenek alkalmazások. Keressen a Felfedezés vagy a Keresés alatt.</string> + <string name="store_setup_first_note">Állítsa be a Flatpakot az alkalmazások telepítéséhez.</string> + <string name="store_update_available_prefix">Elérhető frissítés · %1$s</string> + <string name="store_open">Megnyitás</string> + <string name="store_details">Részletek</string> + <string name="store_remove">Eltávolítás</string> + <string name="store_press_again">Nyomja meg újra az eltávolításhoz</string> + <string name="store_installing">Telepítés…</string> + <string name="store_install">Telepítés</string> + <string name="store_setup_first">Előbb állítsa be a Flatpakot</string> + <string name="store_download_size">%1$s letöltés</string> + <string name="store_installed_chip">● Telepítve</string> + <string name="store_details_failed">Nem sikerült betölteni ennek az alkalmazásnak a Flathub-oldalát.</string> + <string name="store_loading">Betöltés a Flathubról…</string> + <string name="store_no_arm">Nincs ARM64-es build a Flathubon, így itt nem telepíthető.</string> + <string name="store_screenshots">Képernyőképek</string> + <string name="store_about">Névjegy</string> + <string name="store_app_id">Alkalmazásazonosító</string> + <string name="store_license">Licenc</string> + <string name="store_runtime">Futtatókörnyezet</string> + <string name="store_installed_size">Telepített méret</string> + <string name="store_installed_size_value">%1$s (plusz a megosztott futtatókörnyezete)</string> + <string name="store_website">Weboldal</string> + <string name="store_verified">Ellenőrzött</string> + <string name="upd_title">Frissítések</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Ellenőrizve: %1$s</string> + <string name="upd_not_checked">Még nincs ellenőrizve</string> + <string name="upd_perm_title">Engedélyezze, hogy a DroidDeck magát frissítse</string> + <string name="upd_perm_text">A következő képernyőn kapcsolja be az „Engedélyezés ebből a forrásból” lehetőséget, majd térjen vissza. A frissítés önműködően folytatódik.</string> + <string name="upd_open_settings">Beállítások megnyitása</string> + <string name="upd_not_now">Most nem</string> + <string name="upd_signed_status">Másként aláírva</string> + <string name="upd_signed_headline">Nem frissíthető a helyén</string> + <string name="upd_signed_detail">Ez a másolat nincs a DroidDeck kiadási kulcsával aláírva, így a frissítések nem telepíthetők rá. Távolítsa el az átváltáshoz.</string> + <string name="upd_available">Elérhető frissítés</string> + <string name="upd_blocked_status">Nem telepíthető</string> + <string name="upd_switch">Kész az átváltásra</string> + <string name="upd_ahead_status">A Stable előtt</string> + <string name="upd_ahead_headline">A Stable előtt áll</string> + <string name="upd_ahead_detail">Ez a build újabb, mint a legújabb Stable. A Stable következő kiadásával arra fog átváltani.</string> + <string name="upd_gone_status">A teszt lezárult</string> + <string name="upd_gone_headline">Ez a teszt lezárult</string> + <string name="upd_gone_detail">A javítása beolvasztva vagy elvetve lett. Kövesse a Previewt a legújabb javításokért.</string> + <string name="upd_current_status">Naprakész</string> + <string name="upd_current_headline">A legújabb %1$s van telepítve</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Frissítés%1$s</string> + <string name="upd_install_button">Telepítés%1$s</string> + <string name="upd_install_anyway">A Stable %1$s telepítése mindenképpen</string> + <string name="upd_follow_preview">Preview követése</string> + <string name="upd_stop_session">Állítsa le a futó munkamenetet a frissítéshez.</string> + <string name="upd_less">Kevesebb</string> + <string name="upd_more">Több</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Új Preview build</string> + <string name="upd_new_test">PR #%1$d teszt build</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">FRISSÍTÉSI CSATORNA</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Tesztelt kiadások, a legtöbb felhasználónak</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">A legújabb javítások, a Stable előtt</string> + <string name="upd_preview_current">Naprakész</string> + <string name="upd_tests">Teszt buildek</string> + <string name="upd_tests_hint">Próbáljon ki egy javítást a kiadása előtt</string> + <string name="upd_tests_none">Jelenleg nincs</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Nincs buildelve ehhez a DroidDeck-másolathoz</string> + <string name="upd_updated">Frissítve: %1$s</string> + <string name="upd_test_name">a PR #%1$d teszt</string> + <string name="upd_while_ago">egy ideje</string> + <string name="upd_just_now">épp most</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d kipróbálható</item> + <item quantity="other">%1$d kipróbálható</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Változások a buildje óta · %1$d build lemaradás</item> + <item quantity="other">Változások a buildje óta · %1$d build lemaradás</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Legutóbbi változások · %1$d build</item> + <item quantity="other">Legutóbbi változások · %1$d build</item> + </plurals> + <string name="gate_title">Egy Android-beállítást kell módosítani</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Az Android leállítja azokat az alkalmazásokat, amelyek sok háttérfolyamatot indítanak, a Steam pedig tucatnyit indít. Amíg ez nem változik, a játékok hibaüzenet nélkül bezáródnak.</string> + <string name="gate_fix_for_me">Javítsa ezt helyettem</string> + <string name="gate_toggle_steps">Kapcsolja be az „Alárendelt folyamatok korlátozásának kikapcsolása” kapcsolót, majd térjen vissza. Hagyja bekapcsolva a Fejlesztői beállításokat, különben a kapcsoló visszakapcsol.</string> + <string name="gate_open_dev">Fejlesztői beállítások megnyitása</string> + <string name="gate_no_toggle">Ehhez az Android-verzióhoz nincs kapcsoló, ezért a DroidDeck a vezeték nélküli hibakeresésen keresztül módosítja. Körülbelül egy percet vesz igénybe, számítógép nélkül.</string> + <string name="gate_needs_wifi">A vezeték nélküli hibakereséshez Wi-Fi szükséges. Bármelyik hálózat megfelel; internetkapcsolat nem szükséges.</string> + <string name="gate_needs_notifications">A párosítási kód egy értesítésben jelenik meg. Engedélyezze az értesítéseket a DroidDecknek, vagy használja az Egyéb módokat.</string> + <string name="gate_allow_notifications">Értesítések engedélyezése</string> + <string name="gate_step1">Nyissa meg: Beállítások → Fejlesztői beállítások → Vezeték nélküli hibakeresés, és kapcsolja be</string> + <string name="gate_step2">Koppintson az „Eszköz párosítása párosítási kóddal” lehetőségre</string> + <string name="gate_step3">Írja be a kódot a DroidDeck értesítésébe</string> + <string name="gate_waiting">Várakozás a párosítási felugró ablakra…</string> + <string name="gate_code_needed">Felugró ablak megtalálva. Írja be a kódját az értesítésbe.</string> + <string name="gate_status">Állapot</string> + <string name="gate_polling">Ellenőrzés 2 másodpercenként. Ez az oldal bezárul, amikor kikapcsol.</string> + <string name="gate_other_ways">Egyéb módok</string> + <string name="gate_other_toggle">Vezeték nélküli hibakeresés, manuális cím, számítógépes ADB</string> + <string name="gate_other_no_toggle">Manuális cím, számítógépes ADB, Fejlesztői beállítások</string> + <string name="gate_use_wireless_instead">Vezeték nélküli hibakeresés használata helyette</string> + <string name="gate_some_roms">Néhány ROM mindenképpen hozzáadja a kapcsolót. Keresse a „gyermekfolyamat” kifejezést a Fejlesztői beállításokban.</string> + <string name="gate_manual_hint">Ha az értesítés nem működik, írja be saját kezűleg a felugró ablak címét és kódját.</string> + <string name="gate_enter_manually">Cím kézi megadása</string> + <string name="gate_from_computer">Egy ADB-vel rendelkező számítógépről:</string> + <string name="gate_copy_command">Parancs másolása</string> + <string name="gate_choose_display">Válassza ki, melyik kijelzőn nyíljon meg az Android Beállítások.</string> + <string name="gate_main_screen">Fő képernyő</string> + <string name="wadb_finding_port">Párosítva. A vezeték nélküli hibakeresés portjának keresése…</string> + <string name="wadb_enter_port">Párosítva. Adja meg a portot a Beállításokból.</string> + <string name="wadb_applying">Eszköz megtalálva. A beállítás alkalmazása…</string> + <string name="wadb_apply_failed">Nem sikerült automatikusan alkalmazni. Ellenőrizze az alábbi címet, és próbálja újra. %1$s</string> + <string name="wadb_title_wireless">Vezeték nélküli hibakeresés</string> + <string name="wadb_title_done">A gyermekfolyamat-korlát frissítve</string> + <string name="wadb_title">A gyermekfolyamat-korlát módosítása</string> + <string name="wadb_lede_compact0">Ha a beállítás hiányzik, párosítson a vezeték nélküli hibakeresésen keresztül.</string> + <string name="wadb_lede_compact1">Párosítva. Ellenőrizze az IP-címet és a portot a vezeték nélküli hibakeresésben.</string> + <string name="wadb_lede_done">A gyermekfolyamat-korlát frissítve.</string> + <string name="wadb_lede0">Használja a 2. lépést, ha a Fejlesztői beállításokban nincs gyermekfolyamat-beállítás. Nyissa meg: Fejlesztői beállítások → Vezeték nélküli hibakeresés → Eszköz párosítása párosítási kóddal.</string> + <string name="wadb_lede1">Párosítva. Használja az alábbi címet, vagy frissítse a Vezeték nélküli hibakeresés → IP-cím és port menüből.</string> + <string name="wadb_lede_done_long">A gyermekfolyamat-korlát frissítve a vezeték nélküli hibakeresésen keresztül.</string> + <string name="wadb_confirmed_on">Az Android megerősítette, hogy a korlát be van kapcsolva.</string> + <string name="wadb_confirmed_off">Az Android megerősítette, hogy a korlát ki van kapcsolva.</string> + <string name="wadb_pair_group">2 · Vezeték nélküli hibakeresés párosítása</string> + <string name="wadb_pair_address">A párosítási felugró ablak IP-címe és portja</string> + <string name="wadb_pin">Párosítási kód (PIN)</string> + <string name="wadb_pin_placeholder">6 számjegy</string> + <string name="wadb_pair">Párosítás</string> + <string name="wadb_apply_group">2 · Alkalmazás vezeték nélküli hibakeresésen keresztül</string> + <string name="wadb_connect_address">Kapcsolat IP-címe és portja</string> + <string name="wadb_pair_again">Párosítás újra</string> + <string name="wadb_turn_off">Korlát kikapcsolása</string> + <string name="wadb_other_ways">Egyéb módok a módosítására</string> + <string name="wadb_dev_try_first">1 · Fejlesztői beállítások (próbálja ezt először)</string> + <string name="wadb_restrict_on">Kapcsolja ki az „Alárendelt folyamatok korlátozásának kikapcsolása” lehetőséget.</string> + <string name="wadb_restrict_off">Kapcsolja be az „Alárendelt folyamatok korlátozásának kikapcsolása” lehetőséget.</string> + <string name="wadb_computer_last">3 · Számítógépes ADB (végső megoldás)</string> + <string name="wadb_only_if">Csak ha a vezeték nélküli hibakeresés nem elérhető.</string> + <string name="wadb_computer_group">3 · Számítógépes ADB (végső megoldás)</string> + <string name="ctrl_osc_hint">Mikor jelennek meg az érintésvezérlők egy munkamenetben</string> + <string name="ctrl_color">Szín</string> + <string name="ctrl_color_hint">A képernyőn megjelenő gombok árnyalata</string> + <string name="ctrl_custom">Egyéni</string> + <string name="ctrl_opacity">Átlátszatlanság</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Gombméret</string> + <string name="ctrl_size_hint" formatted="false">A 100% az alapértelmezett méret</string> + <string name="ctrl_stick_click">Kar kattintása</string> + <string name="ctrl_stick_click_hint">Koppintson duplán, és tartsa lenyomva a kart az L3 vagy R3 érdekében</string> + <string name="ctrl_adaptive">Adaptív karok</string> + <string name="ctrl_rumble">Játékvibráció</string> + <string name="ctrl_steam_button">Steam gomb</string> + <string name="ctrl_qam_button">QAM gomb</string> + <string name="ctrl_keyboard_button">Billentyűzet gomb</string> + <string name="ctrl_select_steam">Nyomja meg a Select gombot a Steam-menü megnyitásához</string> + <string name="ctrl_select_steam_hint">A View/Select helyett.</string> + <string name="ctrl_joycon_vr">Joy-Conok VR-kontrollerként</string> + <string name="ctrl_joycon_vr_hint">Amíg a SteamVR fut, minden Joy-Con egy kéz lesz. Irányítsa előre, és tartsa lenyomva a Home vagy a Capture gombot az újraközpontosításhoz.</string> + <string name="setup_animations">Animációk</string> + <string name="ctrl_adaptive_hint">A karok ott jelennek meg, ahol megérinti őket, és elengedéskor elrejtőznek</string> + <string name="ctrl_layout">Elrendezés</string> + <string name="ctrl_layout_custom">Egyéni pozíciók mentve</string> + <string name="ctrl_layout_default">Ehhez a képernyőhöz illesztve</string> + <string name="ctrl_edit">Szerkesztés</string> + <string name="ctrl_reset">Visszaállítás</string> + <string name="ctrl_mapping">Gombkiosztás</string> + <string name="ctrl_mapping_default">Minden gomb a saját bemenetét küldi</string> + <string name="ctrl_mapping_count">%1$d/%2$d gomb átkiosztva</string> + <string name="ctrl_configure">Beállítás</string> + <string name="ctrl_reset_all">Kontroller visszaállítása</string> + <string name="ctrl_reset_all_hint">Visszaállítja az összes kontrollerbeállítást és az elrendezést</string> + <string name="ctrl_mapping_lede">Mit küld a játéknak az egyes képernyőgombok. A Rejtett eltávolítja a gombot.</string> + <string name="ctrl_onscreen_buttons">Képernyőgombok</string> + <string name="ctrl_defaults">Alapértelmezések</string> + <string name="ctrl_reset_mapping">Kiosztás visszaállítása</string> + <string name="content_android_apps">Android-alkalmazások</string> + <string name="content_apps_count">%1$d alkalmazás</string> + <string name="content_no_android_apps">Nem található indítható Android-alkalmazás.</string> + <string name="content_desktop_installed">● Az Asztal telepítve</string> + <string name="content_desktop_first_open">Az első megnyitáskor települ</string> + <string name="content_available">Telepíthető</string> + <string name="content_not_installed">Nincs telepítve.</string> + <string name="content_not_installed_suffix">%1$s · nincs telepítve</string> + <string name="content_open_named">%1$s megnyitása</string> + <string name="content_games">Játékok</string> + <string name="content_choose_roms">Válasszon ROMs mappát.</string> + <string name="content_retroarch_roms">Tallózzon a /root/ROMs mappához a RetroArchban.</string> + <string name="content_add_roms">Adjon hozzá %1$s játékokat ide: ROMs/%2$s.</string> + <string name="content_install_named">%1$s telepítése</string> + <string name="content_stop_to_install">Állítsa le a munkamenetet a telepítéshez</string> + <string name="content_runtime_required">Futtatókörnyezet szükséges</string> + <string name="content_loading_details">Telepítési részletek betöltése…</string> + <string name="content_details_unavailable">A telepítési részletek nem érhetők el. Próbálja újra később.</string> + <string name="content_needs_runtime">Előbb telepítse a Linux futtatókörnyezetet a Beállításból.</string> + <string name="content_stop_first">Állítsa le a futó munkamenetet az asztali alkalmazások telepítéséhez.</string> + <string name="content_install_into">A %1$s-t telepíti a Linux-asztalba.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Az elrejtés eltávolítja az Asztalról. A fájljai megmaradnak a Linux futtatókörnyezetben.</string> + <string name="content_rom_gone">Ez a játék már nincs a ROMs mappában.</string> + <string name="content_desktop_system">Asztal · %1$s</string> + <string name="content_launch_in">Indítás ebben: %1$s</string> + <string name="content_also_in">Ebben is: %1$s</string> + <string name="content_page_gone">Ez az oldal már nincs meg. Válasszon egy szakaszt a bal oldalon.</string> + <string name="content_open_desktop">Asztal megnyitása</string> + <string name="content_install_open_desktop">Asztal telepítése és megnyitása</string> + <string name="desktop_remove_title">Asztal eltávolítása</string> + <string name="desktop_remove_text">Eltávolítja az asztalt és a hozzá tartozó alkalmazásokat. A játékok, a hozzáadott alkalmazások, a beállítások és a megosztott könyvtárak megmaradnak.</string> + <string name="desktop_removing">Asztal eltávolítása</string> + <string name="desktop_removed">Asztal eltávolítva</string> + <string name="desktop_cleaning_legacy">Régi LXQt-fájlok eltávolítása</string> + <string name="desktop_removal_unknown">Frissítse a DroidDecket, mielőtt eltávolítja ezt az asztali verziót.</string> + <string name="content_linux_desktop">Linux-asztal</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox és az emulátorai</string> + <string name="games_empty">A Steamben telepített játékok a munkamenet után itt jelennek meg.</string> + <string name="games_play_steam">Steam elindítása</string> + <string name="games_play_steamvr">SteamVR elindítása</string> + <string name="games_launch_settings">Indítási beállítások</string> + <string name="games_launch">Indítás</string> + <string name="games_files">Játékfájlok</string> + <string name="games_prefix">Proton prefix</string> + <string name="games_saves_looking">Mentések keresése…</string> + <string name="games_saves_none">Nem található mentésmappa név szerint. Az exportálás a teljes felhasználói mappát veszi.</string> + <string name="games_saves_folders">%1$d mentésmappa</string> + <string name="games_saves_summary">%1$s · %2$d fájl · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Mentések kezelése</string> + <string name="games_saves">Játékmentések</string> + <string name="games_import_saves">Mentések importálása…</string> + <string name="games_export_gamehub">Exportálás GameHub zipként…</string> + <string name="games_export_winlator">Exportálás Winlator zipként…</string> + <string name="games_open_save_folder">Mentésmappa megnyitása</string> + <string name="games_never_played">Még nem játszott</string> + <string name="games_runtime_busy_percent">Futtatókörnyezet dolgozik · %1$d%%</string> + <string name="games_runtime_busy">Futtatókörnyezet dolgozik</string> + <string name="games_runtime_first_play">A futtatókörnyezet az első Játék gombnyomáskor települ</string> + <string name="games_runtime_update">Elérhető futtatókörnyezet-frissítés</string> + <string name="games_runtime_ready">● A futtatókörnyezet kész</string> + <string name="games_last_played">Utoljára játszva: %1$s</string> + <string name="games_internal">Belső tárhely</string> + <string name="games_added">Hozzáadott játék</string> + <string name="games_custom">Egyéni játék</string> + <string name="games_store_storage">Játéktárhely</string> + <string name="gpu_auto_hint">A legjobb páros ehhez a GPU-hoz, naprakészen tartva</string> + <string name="gpu_manual_hint">Válasszon párost saját kezűleg</string> + <string name="gpu_checking">Illesztőprogramok keresése…</string> + <string name="gpu_none_listed">Még nincs felsorolt illesztőprogram. Frissítsen a kereséshez.</string> + <string name="gpu_hide_other">Más GPU-k illesztőprogramjainak elrejtése</string> + <string name="gpu_show_other">Más GPU-k illesztőprogramjainak megjelenítése</string> + <string name="gpu_advanced">Speciális</string> + <string name="gpu_set_with_display">A megjelenítő-illesztőprogrammal együtt beállítva: a %1$s mindkettőt tartalmazza.</string> + <string name="gpu_set_with_runtime">A futtatókörnyezet-illesztőprogrammal együtt beállítva: a %1$s mindkettőt tartalmazza.</string> + <string name="gpu_runtime_hint">A játékok és az asztal használja.</string> + <string name="gpu_runtime_default">Futtatókörnyezet alapértelmezése</string> + <string name="gpu_auto_by_gpu">Automatikus – GPU szerint kiválasztva</string> + <string name="gpu_manage">Letöltés, importálás vagy törlés…</string> + <string name="gpu_in_use_caps">HASZNÁLATBAN</string> + <string name="gpu_builtin">A DroidDeckbe épített illesztőprogramok</string> + <string name="gpu_matched_pair">A futtatókörnyezet- és megjelenítő-illesztőprogramok együtt, párként beállítva.</string> + <string name="gpu_recommended_for">Ehhez a GPU-hoz ajánlott: %1$s.</string> + <string name="gpu_refresh_hint">Frissítsen az ehhez a GPU-hoz tartozó illesztőprogramok kereséséhez.</string> + <string name="gpu_recommended_caps">AJÁNLOTT</string> + <string name="gpu_unavailable">Nem elérhető</string> + <string name="load_runtime">Linux futtatókörnyezet</string> + <string name="load_runtime_detail">A Linux futtatókörnyezet előkészítése</string> + <string name="load_session">Munkamenet</string> + <string name="load_session_detail">Kijelző és hang indítása</string> + <string name="load_steam">Steam-kliens</string> + <string name="load_steam_detail">A Steam és kompatibilitási eszközeinek ellenőrzése</string> + <string name="load_opening_steam">Steam megnyitása</string> + <string name="load_opening_steam_detail">Várakozás a Steam első képkockájára</string> + <string name="load_desktop">Asztal</string> + <string name="load_desktop_detail">Az asztal előkészítése</string> + <string name="load_opening">Megnyitás</string> + <string name="load_opening_detail">Várakozás az első képkockára</string> + <string name="load_starting_steam">Steam indítása</string> + <string name="load_ended">A munkamenet véget ért</string> + <string name="load_step">%1$d. lépés a %2$d-ből</string> + <string name="load_steam_paused">A Steam szünetel</string> + <string name="deck_tab_grips">Fogók</string> + <string name="deck_tab_left">Bal panel</string> + <string name="deck_tab_right">Jobb panel</string> + <string name="deck_tab_both">Mindkettő</string> + <string name="deck_tab_gamepad">Kontroller</string> + <string name="deck_surface_stick">Kar</string> + <string name="deck_surface_trackpad">Érintőpad</string> + <string name="deck_surface_switch">Váltás a kar és az érintőpad között</string> + <string name="deck_more_controls">További Deck-vezérlők</string> + <string name="deck_panels">PANELEK</string> + <string name="deck_close">Második képernyős vezérlők bezárása</string> + <string name="deck_open_steam_menu">Steam-menü megnyitása</string> + <string name="deck_left_upper">Bal · felső</string> + <string name="deck_left_lower">Bal · alsó</string> + <string name="deck_right_upper">Jobb · felső</string> + <string name="deck_right_lower">Jobb · alsó</string> + <string name="deck_click">Kattintás</string> + <string name="deck_right_trackpad">Jobb érintőpad</string> + <string name="deck_left_trackpad">Bal érintőpad</string> + <string name="second_trackpad">Érintőpad</string> + <string name="second_show_keyboard">Billentyűzet megjelenítése</string> + <string name="second_hide_keyboard">Billentyűzet elrejtése</string> + <string name="second_terminal">Linux terminál</string> + <string name="second_terminal_not_ready">A Linux-munkamenet még nem áll készen a terminálra.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Játékok</string> + <string name="rail_desktop">Asztal</string> + <string name="rail_store">Áruház</string> + <string name="rail_components">Összetevők</string> + <string name="rail_apps">Alkalmazások</string> + <string name="rail_setup">Beállítás</string> + <string name="rail_updates">Frissítések</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">%1$s folytatása</string> + <string name="roms_text">Minden munkamenetben /root/ROMs néven jelenik meg. A belső tárhely itt található: /root/Storage.</string> + <string name="roms_none">Nincs mappa kiválasztva</string> + <string name="roms_applies">A következő munkamenettől érvényes. SD-kártyák is működnek.</string> + <string name="roms_choose">Mappa kiválasztása</string> + <string name="roms_change">Mappa módosítása</string> + <string name="proton_lede">Telepítsen egy ARM64-es Proton-buildet, majd válassza ki játékonként itt: Steam → Tulajdonságok → Kompatibilitás.</string> + <string name="proton_stop_first">Állítsa le a futó munkamenetet egy kompatibilitási eszköz telepítéséhez vagy eltávolításához.</string> + <string name="proton_available">Elérhető buildek</string> + <string name="proton_installed">%1$s telepítve</string> + <string name="proton_queued">Egy korábbi kérésből függőben</string> + <string name="proton_not_installed">Nincs telepítve</string> + <string name="proton_update_available">Elérhető frissítés → %1$s</string> + <string name="proton_remove_older">Régi %1$s verziók eltávolítása</string> + <string name="proton_remove_older_body">Eltávolítja: %1$s. Az ezekre a verziókra beállított játékokat másik Protonra kell állítani.</string> + <string name="proton_remove_body">Az erre a verzióra beállított játékokat másik Protonra kell állítani.</string> + <string name="proton_install_now">Telepítés most</string> + <string name="proton_cancel_queued">Várakozó megszakítása</string> + <string name="pckb_android">Android billentyűzet</string> + <string name="pckb_hide">Elrejtés ✕</string> + <string name="main_launch_named">%1$s indítása</string> + <string name="main_choose_screen">Válasszon képernyőt. Másodlagos: %1$s.</string> + <string name="main_secondary_gone">A másodlagos kijelző már nem elérhető.</string> + <string name="main_primary">Elsődleges képernyő</string> + <string name="main_secondary">Másodlagos képernyő</string> + <string name="widgets_prev_tab">Előző lap</string> + <string name="widgets_next_tab">Következő lap</string> + <string name="widgets_on">Be</string> + <string name="widgets_all_n">Összes (%1$d)</string> + <string name="widgets_none">Nincs</string> + <string name="widgets_n_of_m">%1$d/%2$d</string> + <string name="widgets_off">Ki</string> + <string name="screen_bottom">Alsó képernyő</string> + <string name="game_env_applies">A következő játékindítástól érvényes. A játék profilja felülírja a közöset.</string> + <string name="game_env_other">Másik játék alkalmazásazonosító szerint…</string> + <string name="game_env_done">Kész</string> + <string name="game_env_default">Alapértelmezett</string> + <string name="game_env_off">Ki</string> + <string name="game_env_change">Módosítás…</string> + <string name="game_env_change_title">Változó módosítása</string> + <string name="game_env_restore_default">Visszaállítás alapértelmezettre</string> + <string name="game_env_eyebrow">Proton-játékok</string> + <string name="pip_title">Kép a képben</string> + <string name="pip_auto">Automatikus belépés a kép a képben módba</string> + <string name="unfolded_controls">Vezérlők a kinyitott képernyőn</string> + <string name="unfolded_controls_hint">Kinyitva a játék a Steam Deck érintőpadjai és hátsó fogói fölött jelenik meg. Összecsukva a játék teljes képernyős.</string> + <string name="pip_suspended">Felfüggesztve</string> + <string name="pip_not_ready">A kép a képben mód csak a munkamenet elkészülése után érhető el.</string> + <string name="pip_permission">Engedélyezze a kép a képben módot a DroidDeck számára az Android beállításaiban.</string> + <string name="pip_unavailable">Az Android nem tudta megnyitni a kép a képben módot.</string> + <string name="game_shortcut">Parancsikon</string> + <string name="game_shortcut_add">Hozzáadás a kezdőképernyőhöz</string> + <string name="game_shortcut_choose">Játék kiválasztása</string> + <string name="game_shortcut_scanning">Telepített játékok keresése…</string> + <string name="game_link_copy">Indítási link másolása</string> + <string name="game_link_copied">Indítási link másolva</string> + <string name="game_shortcut_unsupported">Ez az indítóalkalmazás nem tud parancsikont hozzáadni. Használja helyette az „Indítási link másolása” lehetőséget.</string> + <string name="game_link_invalid">Érvénytelen játékindítási link.</string> + <string name="game_link_missing">Ez a játék már nincs a DroidDeck könyvtárában.</string> + <string name="game_link_session_busy">Állítsa le a jelenlegi munkamenetet, mielőtt elindít egy Steam-játékot.</string> + <string name="game_link_failed">Nem sikerült elküldeni a játékot a Steamnek. Próbálja újra elindítani.</string> + <string name="setup_retry_removal">Eltávolítás újra</string> + <string name="runtime_removing">Eltávolítás</string> + <string name="runtime_removal_incomplete">Az eltávolítás nem teljes</string> + <string name="game_file_export">Játékfájl exportálása</string> + <string name="game_file_sync">Minden játékfájl szinkronizálása mappába</string> + <string name="game_file_stop_sync">Játékfájlok szinkronizálásának leállítása</string> + <string name="game_file_folder">Mappa kiválasztása a frontend játékfájlokhoz</string> + <string name="game_file_exported">A játékfájlok mentve: %1$s</string> + <string name="game_frontend_files">Frontend-fájlok</string> + + <string name="main_wait_runtime">Várja meg a futtatókörnyezet-művelet befejezését</string> + <string name="main_wait_proton_install">Várja meg a kompatibilitási eszköz telepítésének befejezését</string> + <string name="main_wait_desktop_install">Várja meg az asztali alkalmazás telepítésének befejezését</string> + <string name="main_wait_install_game">Várja meg a telepítés befejezését, mielőtt elindít egy játékot</string> + <string name="main_saves_close_session">Előbb zárja be a Steam-munkamenetet, hogy a játék ne írhassa felül az importált mentést</string> + <string name="main_saves_importing">Importálás ide: %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">%1$d fájl importálva innen: %2$s, ide: %3$s</item> + <item quantity="other">%1$d fájl importálva innen: %2$s, ide: %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">%1$d fájl importálva innen: %2$s, ide: %3$s. A régi mentések mentve itt: Download/DroidDeck/Saves/backups</item> + <item quantity="other">%1$d fájl importálva innen: %2$s, ide: %3$s. A régi mentések mentve itt: Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Válasszon mentés zip fájlt ehhez: %1$s</string> + <string name="main_saves_exporting">%1$s exportálása</string> + <plurals name="main_saves_exported"> + <item quantity="one">%1$d fájl exportálva %2$s formátumban: %3$s</item> + <item quantity="other">%1$d fájl exportálva %2$s formátumban: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Válassza ki, hová mentse: %1$s (%2$s)</string> + <string name="main_action_failed">%1$s sikertelen: %2$s</string> + <string name="main_no_logs_yet">Még nincs munkamenet-napló: indítson el előbb egy munkamenetet.</string> + <string name="main_no_logs_to_clear">Nincs törölhető munkamenet-napló.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">%1$d munkamenet-naplómappa törölve.</item> + <item quantity="other">%1$d munkamenet-naplómappa törölve.</item> + </plurals> + <string name="main_wadb_pair_failed">A vezeték nélküli hibakeresés párosítása sikertelen</string> + <string name="main_wadb_command_failed">A vezeték nélküli hibakeresés parancsa sikertelen</string> + <string name="main_wadb_unavailable">A vezeték nélküli hibakeresés nem áll rendelkezésre</string> + <string name="main_adb_copied">ADB-parancs másolva</string> + <string name="main_pick_roms">ROMs mappa kiválasztása</string> + <string name="main_non_adreno_title">Nem Adreno GPU</string> + <string name="main_non_adreno_text">A Turnip Adreno GPU-kat támogat. %1$s esetén a Steam fekete képernyőt jeleníthet meg. Letöltés: %2$.0f MB.</string> + <string name="main_install_anyway">Telepítés mindenképpen</string> + <string name="main_remove_runtime_title">Linux futtatókörnyezet eltávolítása</string> + <string name="main_remove_runtime_text">Ez törli a futtatókörnyezetet, a benne lévő Steam-klienst és az összes ott telepített játékot.</string> + <string name="main_applied">Alkalmazva: %1$s</string> + <string name="android_app_open_failed_primary">Nem sikerült megnyitni a %1$s alkalmazást az elsődleges képernyőn</string> + <string name="android_app_open_failed_on">Nem sikerült megnyitni a %1$s alkalmazást itt: %2$s</string> + <string name="android_app_open_failed_display">Nem sikerült megnyitni a %1$s alkalmazást a %2$d. kijelzőn</string> + <string name="comp_busy_importing">Importálás</string> + <string name="comp_busy_swapping">Csere</string> + <string name="comp_busy_restoring">Visszaállítás</string> + <string name="comp_busy_cancelling">Megszakítás</string> + <string name="comp_busy_deleting">Törlés</string> + <string name="comp_cannot_read">nem lehet beolvasni a fájlt</string> + <string name="comp_imported">%1$s importálva</string> + <string name="comp_swap_cancelled">A várakozó csere megszakítva.</string> + <string name="comp_pick_wcp">Válasszon összetevőcsomagot (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">A Nightlies nem volt elérhető</string> + <string name="comp_stored">%1$s tárolva</string> + <string name="comp_download_failed">Letöltés sikertelen: %1$s</string> + <string name="drivers_pick_linux">Válasszon Linux futtatókörnyezet-illesztőprogramot (-Linux zip vagy Android + Linux csomag)</string> + <string name="drivers_pick_android">Válasszon megjelenítő-illesztőprogramot (AdrenoTools zip vagy Android + Linux csomag)</string> + <string name="drivers_pick_any">Válasszon illesztőprogram zip fájlt vagy Android + Linux csomagot</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">%1$s eltávolítása…</string> + <string name="main_forgetting_named">%1$s elfelejtése…</string> + <string name="main_pick_game_storage">Játéktárhely-mappa kiválasztása</string> + <string name="main_pick_decky_zip">Válasszon Decky-bővítmény ZIP fájlt</string> + <string name="main_storage_not_usable">Nem használható: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Linux futtatókörnyezet eltávolítása</string> + <string name="main_settings_main_screen">Nem sikerült megnyitni a Beállításokat az alsó képernyőn; a fő képernyőn nyílt meg.</string> + <string name="main_open_dev_options">Fejlesztői beállítások megnyitása a Beállításokban</string> + + <string name="upd_unknown_apps_failed">Nem sikerült megnyitni az Android „Ismeretlen alkalmazások telepítése” beállítását</string> + <string name="upd_couldnt_check">Nem sikerült ellenőrizni: %1$s</string> + <string name="upd_no_download">Ez a build nem rendelkezik letöltéssel a DroidDeck ezen másolatához</string> + <string name="upd_stop_first">Előbb állítsa le a futó munkamenetet, majd frissítsen</string> + <string name="upd_stage_downloading">Letöltés</string> + <string name="upd_stage_installing">Telepítés</string> + <string name="upd_stage_confirm">Megerősítésre várakozás</string> + <string name="upd_failed">A frissítés sikertelen</string> + <string name="upd_not_offered">Az Android nem ajánlotta fel a frissítés telepítését</string> + + <string name="decky_install_failed">A Decky telepítése sikertelen: %1$s</string> + <string name="decky_plugin_starting">Bővítmény importálásának indítása…</string> + <string name="decky_plugin_failed">A bővítmény importálása sikertelen: %1$s</string> + <string name="decky_plugin_installed">A bővítmény telepítve. Indítsa újra a Steamet a betöltéséhez.</string> + + <string name="drivers_not_checked">Még nincs ellenőrizve – koppintson a frissítésre az új illesztőprogramok kereséséhez</string> + <string name="drivers_bundle_sets_display">Android + Linux: ezzel együtt beállítja a megjelenítő-illesztőprogramot is</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: ezzel együtt beállítja a futtatókörnyezet illesztőprogramját is</string> + <string name="drivers_runtime_builtin">a futtatókörnyezetbe épített Turnip</string> + <string name="drivers_system_vulkan">rendszer Vulkan: nincs csomagolt build ehhez a GPU-hoz</string> + <string name="drivers_bundled">%1$s (csomagolt)</string> + <string name="drivers_manual">Manuális</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Jelenleg csak az egyik fele van kiadva</string> + <string name="drivers_pair_size">%1$.0f MB mindkettőhöz</string> + <string name="drivers_none_to_set">Nincs beállítható illesztőprogram: %1$s</string> + <string name="drivers_checking_latest">A legújabb illesztőprogramok keresése…</string> + <string name="drivers_up_to_date_check_failed">Naprakész (nem sikerült ellenőrizni: %1$s)</string> + <string name="drivers_recommended_unpublished">Az ajánlott illesztőprogramok jelenleg nincsenek kiadva</string> + <string name="drivers_downloading_pair">%1$s %2$s letöltése…</string> + <string name="drivers_updated_to">Frissítve erre: %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Frissítve erre: %1$s %2$s. A megjelenítő-illesztőprogram a DroidDeck újraindítása után lép érvénybe.</string> + <string name="drivers_auto_waits_for_session">Az illesztőprogram-frissítések a munkamenet leállásáig várnak.</string> + <string name="drivers_auto_waits_for_network">A(z) %1$s %2$s letöltése akkor indul, amikor kilépsz a mobilnetről és az energiatakarékos módból.</string> + <string name="drivers_skipping_bad">A(z) %1$s %2$s nem indított itt munkamenetet, ezért az Automatikus azoknál az illesztőprogramoknál marad, amelyek igen.</string> + <string name="drivers_rolled_back">A(z) %1$s kétszer nem indított munkamenetet, ezért az Automatikus visszatért a működő illesztőprogramokhoz.</string> + <string name="drivers_switched_to">Átváltva erre: %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Átváltva erre: %1$s %2$s. A megjelenítő-illesztőprogram a DroidDeck újraindítása után lép érvénybe.</string> + <string name="drivers_using">%1$s %2$s használatban.</string> + <string name="drivers_using_restart">%1$s %2$s használatban. A megjelenítő-illesztőprogram a DroidDeck újraindítása után lép érvénybe.</string> + <string name="drivers_using_quest">A Questhez adott kép-illesztőprogram és az alapértelmezett futtatókörnyezet van használatban.</string> + <string name="drivers_using_quest_restart">A Questhez adott kép-illesztőprogram és az alapértelmezett futtatókörnyezet van használatban. A kép-illesztőprogram a DroidDeck újraindítása után lép életbe.</string> + <string name="drivers_not_a_driver">Nem illesztőprogram zip: nem AdrenoTools-illesztőprogram, nem -Linux Turnip és nem Android + Linux csomag</string> + <string name="drivers_import_failed">Importálás sikertelen: %1$s</string> + <string name="drivers_imported_unnamed">Illesztőprogram importálva</string> + <string name="drivers_using_bundle">%1$s használatban mind futtatókörnyezet-, mind megjelenítő-illesztőprogramként.</string> + <string name="drivers_using_bundle_restart">%1$s használatban mind futtatókörnyezet-, mind megjelenítő-illesztőprogramként. A megjelenítő-illesztőprogram a DroidDeck újraindítása után lép érvénybe.</string> + <string name="drivers_deleted_bundle">%1$s törölve (mindkét illesztőprogram)</string> + <string name="drivers_deleted">%1$s törölve</string> + <string name="drivers_release_status">Legújabb: %1$s · ellenőrizve: %2$s</string> + <string name="drivers_release_status_failed">Legújabb: %1$s · %2$s nem elérhető · ellenőrizve: %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d perce</item> + <item quantity="other">%1$d perce</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d órája</item> + <item quantity="other">%1$d órája</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d napja</item> + <item quantity="other">%1$d napja</item> + </plurals> + <string name="drivers_checking_sources">A Banners-Turnip, a WinNative és a DroidDeck ellenőrzése…</string> + <string name="drivers_check_failed">ellenőrzés sikertelen</string> + <string name="drivers_installed_pick_either">%1$s telepítve – válassza ki bármelyik listában mindkét illesztőprogram beállításához</string> + <string name="drivers_installed_pick">%1$s telepítve – válassza ki a menüben</string> + + <string name="session_wait_removal">Várja meg a futtatókörnyezet eltávolításának befejezését</string> + <string name="session_title_game">Játék</string> + <string name="session_touch_auto_touchpad">érintőpad</string> + <string name="session_touch_auto_direct">közvetlen</string> + <string name="session_swap_failed">A csere sikertelen: %1$s</string> + <string name="session_profile_save_failed">A profil mentése sikertelen: %1$s</string> + <string name="session_desktop_paused">Az asztal szünetel</string> + <string name="session_named_paused">%1$s szünetel</string> + <string name="session_program_paused">A program szünetel</string> + <string name="session_starting_desktop">Az asztal indítása</string> + <string name="session_starting_named">%1$s indítása</string> + <string name="session_starting_program">A program indítása</string> + <string name="session_no_logs">Nincs napló ehhez a munkamenethez.</string> + <string name="session_logs_archive_failed">Nem sikerült létrehozni a munkamenet-napló archívumot.</string> + <string name="session_logs_share_failed">Nem sikerült megosztani a munkamenet-naplókat.</string> + <string name="session_starting_session">A munkamenet indítása…</string> + <string name="session_runtime_downloading">a Linux futtatókörnyezet letöltése</string> + <string name="session_runtime_downloading_mb">a Linux futtatókörnyezet letöltése · %1$d/%2$d MB</string> + <string name="session_runtime_checking">a Linux futtatókörnyezet ellenőrzése</string> + <string name="session_runtime_unpacking">a Linux futtatókörnyezet kicsomagolása</string> + <string name="session_desktop_downloading">az asztal letöltése</string> + <string name="session_desktop_downloading_mb">az asztal letöltése · %1$d/%2$d MB</string> + <string name="session_desktop_checking">az asztal ellenőrzése</string> + <string name="session_desktop_unpacking">az asztal kicsomagolása</string> + <string name="session_proton_downloading">a Proton Experimental (ARM64) letöltése</string> + <string name="session_proton_downloading_mb">a Proton Experimental (ARM64) letöltése · %1$d/%2$d MB</string> + <string name="session_proton_checking">a Proton Experimental (ARM64) ellenőrzése</string> + <string name="session_proton_unpacking">a Proton Experimental (ARM64) kicsomagolása</string> + <string name="session_runtime_catalog_unreachable">Nem sikerült elérni a futtatókörnyezet-katalógust. Ellenőrizze a kapcsolatot, és nyomja meg újra a Játék gombot.</string> + <string name="session_runtime_install_failed">A Linux futtatókörnyezet telepítése sikertelen. Ellenőrizze a futtatókörnyezetet a Beállításban, és nyomja meg újra a Játék gombot.</string> + <string name="session_desktop_install_failed">Az asztal telepítése sikertelen (%1$s). Ellenőrizze a kapcsolatot, és nyomja meg újra az Asztal gombot.</string> + <string name="session_ended_named">%1$s váratlanul leállt. Ossza meg a naplókat egy hibajelentésben, vagy próbálja újra.</string> + <string name="session_ended_program">A program váratlanul leállt. Ossza meg a naplókat egy hibajelentésben, vagy próbálja újra.</string> + <string name="session_ended_desktop">Az asztal váratlanul leállt. Ossza meg a naplókat egy hibajelentésben, vagy próbálja újra.</string> + <string name="session_ended_detail">Kilépési állapot: %1$d · %2$s</string> + <string name="session_ended_no_log">nincs napló</string> + <plurals name="session_hint_enosys"> + <item quantity="one">A napló %1$d „Function not implemented” hibát tartalmaz: a proot seccomp-gyorsítása elutasít egy segédfolyamatot ezen az eszközön. Próbálja ki ezt: %2$s → „%3$s” (vagy „%4$s”), majd indítsa el újra.</item> + <item quantity="other">A napló %1$d „Function not implemented” hibát tartalmaz: a proot seccomp-gyorsítása elutasít egy segédfolyamatot ezen az eszközön. Próbálja ki ezt: %2$s → „%3$s” (vagy „%4$s”), majd indítsa el újra.</item> + </plurals> + + <string name="mode_decky_plugins">Bővítmények</string> + <string name="mode_decky_plugins_hint">Telepítsen egy bővítmény ZIP-et a következő Steam-munkamenethez.</string> + <string name="mode_decky_plugin_downloading">Letöltés…</string> + <string name="mode_decky_plugin_install_zip">Telepítés ZIP-ből</string> + <string name="store_cat_games">Játékok</string> + <string name="store_cat_audio_video">Hang és videó</string> + <string name="store_cat_graphics">Grafika</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Iroda</string> + <string name="store_cat_developer">Fejlesztés</string> + <string name="store_cat_education">Oktatás</string> + <string name="store_cat_science">Tudomány</string> + <string name="store_cat_system">Rendszer</string> + <string name="store_cat_utilities">Segédprogramok</string> + <string name="store_section_popular">Népszerű</string> + <string name="store_section_trending">Felkapott</string> + <string name="store_section_new">Új</string> + <string name="store_section_updated">Frissített</string> + <string name="store_section_loading">betöltés…</string> + <string name="store_flatpak_setup">Flatpak beállítása</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Nem sikerült ellenőrizni a frissítéseket a Flathubon</string> + <string name="content_rom_installed">telepítve</string> + <string name="content_rom_folder">mappa</string> + <string name="theme_graphite">Grafit</string> + <string name="theme_graphite_detail">Grafitszínű felületek, a logó saját gömbkékjével minden kijelölt, fókuszált vagy lenyomott elemhez.</string> + <string name="theme_paper">Papír feketén</string> + <string name="theme_paper_detail">A fehér az elsődleges, az ikon kékje jelzi a vonalakat, köröket és pontokat.</string> + <string name="theme_icon_blue">Ikonkék</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Előbb telepítse a futtatókörnyezetet</string> + <string name="game_sync_err_steam_library">A Steam-könyvtár nem elérhető</string> + <string name="game_sync_err_previous_sd">A korábbi SD-könyvtár nem elérhető</string> + <string name="game_sync_err_game_storage">A játéktárhely nem elérhető</string> + <string name="game_sync_err_added_games">A hozzáadott játékok mappája nem elérhető</string> + <string name="game_sync_err_manifests">A Steam-manifesztek nem elérhetők</string> + <string name="content_system_many">Sok rendszer</string> + <string name="fm_drive_internal">Belső</string> + <string name="fm_drive_linux">Linux-rendszer</string> + <string name="fm_drive_sd">SD-kártya</string> + <string name="fm_drive_storage">Tárhely</string> + <string name="fm_select">Kiválasztás</string> + <string name="fm_properties">Tulajdonságok</string> + <string name="fm_favorite_add">Hozzáadás a Kedvencekhez</string> + <string name="fm_favorite_remove">Eltávolítás a Kedvencekből</string> + <string name="fm_rename">Átnevezés</string> + <string name="fm_copy">Másolás</string> + <string name="fm_cut">Kivágás</string> + <string name="fm_actions">Műveletek</string> + <string name="fm_favorites">Kedvencek</string> + <string name="fm_pin_current">Jelenlegi mappa rögzítése</string> + <string name="fm_no_favorites">Még nincs kedvenc – rögzítsen egy mappát a ⋮ menüjével, hogy gyorsan visszaugorhasson ide.</string> + <string name="fm_unpin_favorite">Eltávolítás a kedvencekből</string> + <string name="fm_size_zero">0 bájt</string> + <string name="fm_unit_bytes">bájt</string> + <string name="fm_prop_location">Hely</string> + <string name="fm_prop_type">Típus</string> + <string name="fm_prop_size">Méret</string> + <string name="fm_prop_modified">Módosítva</string> + <string name="fm_type_folder">Mappa</string> + <string name="fm_type_file">Fájl</string> + <string name="fm_type_ext_file">%1$s fájl</string> + <string name="fm_read_only">Csak olvasható</string> + <string name="fm_read_only_hint">Megakadályozza, hogy a játékok (és a Wine) felülírják vagy töröljék ezt a fájlt.</string> + <string name="fm_read_only_failed">Nem sikerült módosítani a Csak olvasható állapotot</string> + <string name="fm_hidden">Rejtett</string> + <string name="fm_hidden_unsupported">Ez a tárhely nem tudja tárolni a rejtett jelzőt.</string> + <string name="fm_hidden_hint">Rejtettként jelöli meg a fájlt Windows alatt (a Wine rejtett attribútuma).</string> + <string name="fm_hidden_failed">Nem sikerült módosítani a Rejtett állapotot ezen a tárhelyen</string> + <string name="fm_done">Kész</string> + <string name="fm_op_deleting">Törlés…</string> + <string name="fm_delete_failed">A törlés sikertelen</string> + <string name="fm_op_moving">Áthelyezés…</string> + <string name="fm_op_copying">Másolás…</string> + <string name="fm_op_moving_item">Áthelyezés – %1$s</string> + <string name="fm_op_copying_item">Másolás – %1$s</string> + <string name="fm_op_moving_batch">Áthelyezés %1$d/%2$d – %3$s</string> + <string name="fm_op_copying_batch">Másolás %1$d/%2$d – %3$s</string> + <string name="fm_paste_failed">%1$d kész, %2$d sikertelen</string> + <string name="fm_paste_skipped">%1$d kész, %2$d kihagyva</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d elem áthelyezve</item> + <item quantity="other">%1$d elem áthelyezve</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d elem másolva</item> + <item quantity="other">%1$d elem másolva</item> + </plurals> + <string name="fm_already_exists">„%1$s” már létezik</string> + <string name="fm_op_renaming">Átnevezés…</string> + <string name="fm_rename_failed">Az átnevezés sikertelen</string> + <string name="fm_op_creating_folder">Mappa létrehozása…</string> + <string name="fm_create_folder_failed">Nem sikerült létrehozni a mappát</string> + <string name="fm_new_folder">Új mappa</string> + <string name="fm_folder_name">Mappa neve</string> + <string name="fm_create">Létrehozás</string> + <string name="fm_new_name">Új név</string> + <string name="fm_delete_title">Törli?</string> + <string name="fm_delete_text">Véglegesen törli: „%1$s”?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Törli %1$d elemet?</item> + <item quantity="other">Törli %1$d elemet?</item> + </plurals> + <string name="fm_cannot_undo">Ez nem vonható vissza.</string> + <plurals name="fm_and_more"> + <item quantity="one">…és még %1$d</item> + <item quantity="other">…és még %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">Törlés %1$d/%2$d – %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d elemet nem sikerült törölni</item> + <item quantity="other">%1$d elemet nem sikerült törölni</item> + </plurals> + <string name="fm_conflict_merge_hint">Az Összefésülés hozzáadja és lecseréli a fájlokat a meglévő mappában.</string> + <string name="fm_conflict_overwrite_hint">A Felülírás lecseréli a meglévő fájlt.</string> + <string name="fm_conflict_apply_all">Alkalmazás minden ütközésre</string> + <string name="fm_conflict_merge">Összefésülés</string> + <string name="fm_conflict_overwrite">Felülírás</string> + <string name="fm_conflict_keep_both">Mindkettő megtartása</string> + <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_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> + <string name="fm_search">Keresés</string> + <string name="fm_sort">Rendezés</string> + <string name="fm_sort_name">Név</string> + <string name="fm_sort_date">Módosítás dátuma</string> + <string name="fm_rows_comfortable">Kényelmes sorok</string> + <string name="fm_rows_compact">Kompakt sorok</string> + <string name="fm_hide_hidden">Rejtett fájlok elrejtése</string> + <string name="fm_show_hidden">Rejtett fájlok megjelenítése</string> + <string name="fm_hide_favorites">Kedvencek elrejtése</string> + <string name="fm_show_favorites">Kedvencek megjelenítése</string> + <string name="fm_filter_folder">Ennek a mappának a szűrése</string> + <string name="fm_free_space">%1$s szabad</string> + <string name="fm_selected_count">%1$d kiválasztva</string> + <string name="fm_select_none">Nincs</string> + <string name="fm_select_all">Összes</string> + <string name="fm_paste">Beillesztés</string> + <plurals name="fm_items"> + <item quantity="one">%1$d elem</item> + <item quantity="other">%1$d elem</item> + </plurals> + <string name="fm_paste_here">%1$s beillesztése ide</string> + <string name="fm_paste_move_here">%1$s beillesztése (áthelyezés) ide</string> + <string name="fm_rail_title">Fájlok</string> + <string name="fm_rail_storage">TÁRHELY</string> + <string name="fm_rail_quick">GYORS</string> + <string name="fm_rail_favorites">KEDVENCEK</string> + <string name="fm_rail_downloads">Letöltések</string> + <string name="fm_rail_downloads_short">Letöltés</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Munkamenet-naplók</string> + <string name="fm_rail_pictures">Képek</string> + <string name="fm_favorite_added">„%1$s” hozzáadva a Kedvencekhez</string> + <string name="fm_favorite_removed">„%1$s” eltávolítva a Kedvencekből</string> + <string name="fm_empty_directory">Üres mappa</string> + <string name="fm_up_one_level">Egy szinttel feljebb</string> + <string name="fm_choose_folder">Válasszon mappát</string> + <string name="fm_choose_file">Válasszon fájlt</string> + <string name="ctrl_tint_steam_blue">Steam kék</string> + <string name="ctrl_tint_sky">Égszínkék</string> + <string name="ctrl_tint_white">Fehér</string> + <string name="ctrl_tint_violet">Lila</string> + <string name="ctrl_tint_green">Zöld</string> + <string name="ctrl_tint_amber">Borostyán</string> + <string name="ctrl_tint_red">Piros</string> + <string name="ctrl_tint_pink">Rózsaszín</string> + <string name="ctrl_button_a">A gomb</string> + <string name="ctrl_button_b">B gomb</string> + <string name="ctrl_button_x">X gomb</string> + <string name="ctrl_button_y">Y gomb</string> + <string name="ctrl_button_lb">Bal bumper</string> + <string name="ctrl_button_rb">Jobb bumper</string> + <string name="ctrl_button_lt">Bal ravasz</string> + <string name="ctrl_button_rt">Jobb ravasz</string> + <string name="ctrl_button_view">View gomb</string> + <string name="ctrl_button_menu">Menu gomb</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad fel</string> + <string name="ctrl_target_down">D-pad le</string> + <string name="ctrl_target_left">D-pad balra</string> + <string name="ctrl_target_right">D-pad jobbra</string> + <string name="ctrl_target_hidden">Rejtett</string> + <string name="ctrl_editor_drag">Húzza a mozgatáshoz</string> + <string name="ctrl_editor_snap">Rögzítés</string> + <string name="ctrl_editor_save">Mentés</string> + <string name="second_mode_none">Nincs</string> + <string name="second_mode_keyboard_trackpad">Billentyűzet + érintőpad</string> + <string name="second_mode_terminal">Terminál</string> + <string name="second_mode_deck_controls">Deck fogók + érintőpadok</string> + + <string name="rtinst_removing">Linux futtatókörnyezet eltávolítása</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Linux futtatókörnyezet eltávolítása · %1$d bejegyzés</item> + <item quantity="other">Linux futtatókörnyezet eltávolítása · %1$d bejegyzés</item> + </plurals> + <string name="rtinst_removed">Linux futtatókörnyezet eltávolítva</string> + <string name="rtinst_removal_failed">Nem sikerült befejezni a Linux futtatókörnyezet eltávolítását. Próbálja újra a Beállításban.</string> + <string name="rtinst_removing_leftovers">Futtatókörnyezet-maradványok eltávolítása</string> + <string name="rtinst_downloading">Letöltés</string> + <string name="rtinst_verifying">Ellenőrzés</string> + <string name="rtinst_extracting">Kicsomagolás</string> + <string name="rtinst_channel_description">Megjelenik, amíg a Linux futtatókörnyezet telepítése vagy eltávolítása zajlik</string> + <string name="rtinst_title_installing">A Linux futtatókörnyezet telepítése</string> + <string name="rtinst_title_removing">A Linux futtatókörnyezet eltávolítása</string> + + <string name="deskpkg_runtime_missing">A Linux futtatókörnyezet nincs telepítve</string> + <string name="deskpkg_no_checksum">A katalógusban nincs ellenőrzőösszeg a %1$s-hez</string> + <string name="deskpkg_checksum_mismatch">Az ellenőrzőösszeg nem egyezik – semmi nem változott</string> + <string name="deskpkg_installing">%1$s telepítése</string> + <string name="deskpkg_place_failed">Nem sikerült elhelyezni az AppImage-et</string> + <string name="deskpkg_extract_failed">A kicsomagolás sikertelen</string> + <string name="deskpkg_install_failed">A telepítés sikertelen</string> + + <string name="flatpakmgr_setup_failed">A Flatpak beállítása sikertelen (kilépési kód: %1$d)</string> + <string name="flatpakmgr_setup_unfinished">A Flatpak beállítása nem fejeződött be</string> + <string name="flatpakmgr_busy">Egy másik áruházi feladat fut</string> + <string name="flatpakmgr_not_ready">Előbb állítsa be a Flatpakot</string> + <string name="flatpakmgr_starting">Indítás</string> + <string name="flatpakmgr_exit_status">A Flatpak %1$d állapotkóddal lépett ki</string> + <string name="flatpakmgr_installing">%1$s telepítése</string> + <string name="flatpakmgr_updating">%1$s frissítése</string> + <string name="flatpakmgr_removing">%1$s eltávolítása</string> + <string name="flatpakmgr_installing_step">%1$s telepítése (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">%1$s frissítése (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">%1$s eltávolítása (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">fordítások</string> + <string name="flatpakmgr_ref_graphics_drivers">grafikai illesztőprogramok</string> + <string name="flatpakmgr_ref_media_codecs">médiakodekek</string> + <string name="flatpakmgr_ref_runtime">%1$s futtatókörnyezet</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s futtatókörnyezet %2$s</string> + + <string name="appimg_too_small">A fájl túl kicsi ahhoz, hogy AppImage legyen</string> + <string name="appimg_unreadable">A fájl nem olvasható: %1$s</string> + <string name="appimg_not_linux">Ez nem egy AppImage (nem Linux-program)</string> + <string name="appimg_wrong_arch">Ez az AppImage sem ARM64-hez (aarch64), sem x86 PC-khez nincs készítve</string> + <string name="appimg_not_appimage">Ez egy Linux-program, de nem AppImage</string> + <string name="appimg_wrong_type">Csak 2-es típusú AppImage-ek importálhatók (ez %1$d típusú)</string> + <string name="appimg_no_space_import">Nincs elég szabad hely: az importáláshoz körülbelül %1$s szükséges</string> + <string name="appimg_no_space_update">Nincs elég szabad hely: a frissítéshez körülbelül %1$s szükséges</string> + <string name="appimg_import_failed">Az importálás sikertelen</string> + <string name="appimg_gone">Ez az AppImage már nincs meg</string> + <string name="appimg_update_failed">A frissítés sikertelen</string> + <string name="appimg_extracting">%1$s kicsomagolása</string> + <string name="appimg_extract_failed">Az AppImage-et nem sikerült kicsomagolni</string> + <string name="appimg_extract_failed_detail">Az AppImage-et nem sikerült kicsomagolni: %1$s</string> + + <string name="deckymgr_stop_session_loader">Állítsa le az aktív munkamenetet a Decky Loader telepítése előtt</string> + <string name="deckymgr_download_failed">A Decky Loader letöltése sikertelen</string> + <string name="deckymgr_size_mismatch">A Decky Loader mérete nem egyezett a kiadás metaadataival</string> + <string name="deckymgr_checksum_download_failed">Nem sikerült letölteni a kiadás ellenőrzőösszegét</string> + <string name="deckymgr_checksum_missing">A kiadás ellenőrzőösszege hiányzik</string> + <string name="deckymgr_checksum_invalid">A kiadás ellenőrzőösszege érvénytelen</string> + <string name="deckymgr_checksum_mismatch">A Decky Loader ellenőrzőösszege nem egyezik</string> + <string name="deckymgr_not_elf">A kiadás eszköze nem kompatibilis 64 bites Linux-futtatható</string> + <string name="deckymgr_session_started_loader">Egy munkamenet elindult a letöltés közben; állítsa le a Decky Loader telepítése előtt</string> + <string name="deckymgr_loader_not_executable">Nem sikerült futtathatóvá tenni a PluginLoadert</string> + <string name="deckymgr_cef_failed">Nem sikerült bekapcsolni a Steam CEF távoli hibakeresését</string> + <string name="deckymgr_stage_failed">Nem sikerült előkészíteni a PluginLoadert</string> + <string name="deckymgr_loader_preserve_failed">Nem sikerült megőrizni a meglévő PluginLoadert</string> + <string name="deckymgr_loader_activate_failed">Nem sikerült aktiválni az új PluginLoadert</string> + <string name="deckymgr_stop_session_plugin">Állítsa le az aktív munkamenetet egy bővítmény telepítése előtt</string> + <string name="deckymgr_loader_required">Telepítse a Decky Loadert egy bővítmény importálása előtt</string> + <string name="deckymgr_zip_unreadable">Nem sikerült beolvasni a kiválasztott ZIP fájlt</string> + <string name="deckymgr_plugins_dir_failed">Nem sikerült létrehozni a Decky bővítménymappát</string> + <string name="deckymgr_extracting_zip">Bővítmény ZIP kicsomagolása</string> + <string name="deckymgr_zip_one_folder">A bővítmény ZIP-nek egy legfelső szintű bővítménymappát kell tartalmaznia</string> + <string name="deckymgr_zip_missing_files">A bővítmény ZIP-ből hiányzik a plugin.json, a package.json vagy a dist/index.js</string> + <string name="deckymgr_plugin_name_missing">A bővítmény neve hiányzik</string> + <string name="deckymgr_session_started_plugin">Egy munkamenet elindult a telepítés közben; állítsa le egy bővítmény telepítése előtt</string> + <string name="deckymgr_plugin_installed">A bővítmény telepítve · indítsa újra a Steamet a betöltéséhez</string> + <string name="deckymgr_plugin_install_failed">A bővítmény ZIP telepítése sikertelen</string> + <string name="deckymgr_zip_too_many">A bővítmény ZIP túl sok bejegyzést tartalmaz</string> + <string name="deckymgr_zip_invalid_path">A bővítmény ZIP érvénytelen elérési utat tartalmaz</string> + <string name="deckymgr_zip_duplicate_paths">A bővítmény ZIP duplikált elérési utakat tartalmaz</string> + <string name="deckymgr_zip_unsafe_path">A bővítmény ZIP nem biztonságos elérési utat tartalmaz</string> + <string name="deckymgr_folder_failed">Nem sikerült létrehozni a bővítménymappát</string> + <string name="deckymgr_zip_too_large">A bővítmény ZIP kicsomagolva túllépi az 1 GiB-os korlátot</string> + <string name="deckymgr_bundled_not_executable">Nem sikerült futtathatóvá tenni a csomagolt bővítménybinárist</string> + <string name="deckymgr_remote_entry_invalid">Érvénytelen remote_binary bejegyzés</string> + <string name="deckymgr_remote_name_invalid">Érvénytelen távoli bináris neve</string> + <string name="deckymgr_remote_url_https">A távoli bináris URL-jének HTTPS-t kell használnia</string> + <string name="deckymgr_remote_hash_invalid">A %1$s távoli bináris SHA-256 hash-e érvénytelen</string> + <string name="deckymgr_bin_dir_failed">Nem sikerült létrehozni a bővítmény bin mappáját</string> + <string name="deckymgr_downloading_binary">Bővítménybináris letöltése · %1$s</string> + <string name="deckymgr_binary_download_failed">Nem sikerült letölteni a %1$s bővítménybinárist</string> + <string name="deckymgr_binary_checksum_mismatch">A bővítménybináris ellenőrzőösszege nem egyezik · %1$s</string> + <string name="deckymgr_binary_not_executable">Nem sikerült futtathatóvá tenni a bővítménybinárist · %1$s</string> + <string name="deckymgr_binary_replace_failed">Nem sikerült lecserélni a bővítménybinárist · %1$s</string> + <string name="deckymgr_binary_install_failed">Nem sikerült telepíteni a bővítménybinárist · %1$s</string> + <string name="deckymgr_folder_taken">A bővítménymappa egy másik bővítményhez tartozik</string> + <string name="deckymgr_preserve_failed">Nem sikerült megőrizni a meglévő bővítményt</string> + <string name="deckymgr_activate_failed">Nem sikerült aktiválni az importált bővítményt</string> + <string name="deckymgr_settings_failed">Nem sikerült frissíteni a Decky bővítménybeállításokat</string> + <string name="deckymgr_restore_failed">Nem sikerült visszaállítani a meglévő bővítményt</string> + + <string name="adbfix_save_failed">Nem sikerült menteni a vezeték nélküli hibakeresés azonosítóját</string> + <string name="adbfix_command_failed">Az ADB-parancs sikertelen (%1$d)</string> + <string name="adbfix_not_confirmed">Az Android nem erősítette meg a gyermekfolyamat-korlát módosítását: %1$s</string> + <string name="adbfix_no_pairing">Nincs mentett vezeték nélküli hibakeresés-párosítás</string> + <string name="adbfix_enter_address">Adja meg a vezeték nélküli hibakeresés jelenlegi IP-címét és portját</string> + + <string name="adbpair_timed_out">Időtúllépés a párosítási felugró ablakra várva. Próbálja újra a DroidDeckből.</string> + <string name="adbpair_discovery_failed_code">Nem sikerült megkeresni a párosítási felugró ablakot (%1$d). Ellenőrizze, hogy a Wi-Fi be van kapcsolva.</string> + <string name="adbpair_discovery_failed">Nem sikerült megkeresni a párosítási felugró ablakot: %1$s</string> + <string name="adbpair_six_digits">Írja be a kód mind a 6 számjegyét</string> + <string name="adbpair_pairing">Párosítás…</string> + <string name="adbpair_code_rejected">Ez a kód nem működött. Nyissa meg újra a párosítási felugró ablakot, és írja be az új kódját.</string> + <string name="adbpair_connecting">Párosítva. Csatlakozás…</string> + <string name="adbpair_port_not_found">Párosítva, de a vezeték nélküli hibakeresés portja nem található. Hagyja bekapcsolva a vezeték nélküli hibakeresést, és próbálja újra.</string> + <string name="adbpair_applying">A beállítás alkalmazása…</string> + <string name="adbpair_command_failed">A vezeték nélküli hibakeresés parancsa sikertelen</string> + <string name="adbpair_channel_name">Vezeték nélküli hibakeresés beállítása</string> + <string name="adbpair_channel_description">A vezeték nélküli hibakeresés párosítási kódját kéri, amíg a Beállítások meg van nyitva</string> + <string name="adbpair_title_pair">Vezeték nélküli hibakeresés párosítása</string> + <string name="adbpair_waiting_text">Kapcsolja be a vezeték nélküli hibakeresést, majd koppintson az „Eszköz párosítása párosítási kóddal” lehetőségre.</string> + <string name="adbpair_waiting_long">Kapcsolja be a vezeték nélküli hibakeresést, majd koppintson az „Eszköz párosítása párosítási kóddal” lehetőségre. Maradjon a Beállításokban: a kód ebbe az értesítésbe kerül.</string> + <string name="adbpair_code_label">6 számjegyű párosítási kód</string> + <string name="adbpair_code_hint">Koppintson a Kód megadására, és írja be a Beállításokban megjelenő 6 számjegyet.</string> + <string name="adbpair_title_code">Adja meg a Wi-Fi párosítási kódot</string> + <string name="adbpair_title_retry">Próbálja meg újra a kódot</string> + <string name="adbpair_enter_code">Kód megadása</string> + <string name="adbpair_title_working">A Steam beállítása</string> + <string name="adbpair_title_done">A Steam készen áll</string> + <string name="adbpair_done_text">Koppintson a DroidDeckhez való visszatéréshez. A vezeték nélküli hibakeresést most kikapcsolhatja.</string> + <string name="adbpair_title_failed">A vezeték nélküli hibakeresés beállítása megállt</string> + + <string name="selfinst_download_failed">A letöltés nem sikerült</string> + <string name="selfinst_size_mismatch">A letöltés mérete nem egyezett a közzétett APK-val, és elvetésre került – próbálja újra</string> + <string name="selfinst_checksum_mismatch">A letöltés nem egyezett az ellenőrzőösszegével, és elvetésre került – próbálja újra</string> + <string name="selfinst_wrong_package">A frissítés a %1$s Android-csomaghoz tartozik, nem a %2$s-hez</string> + <string name="selfinst_metadata_signer">A frissítés metaadatai nem nevezik meg a DroidDeck kiadási aláírókulcsát</string> + <string name="selfinst_unreadable">Az Android nem tudta beolvasni a letöltött APK-t</string> + <string name="selfinst_apk_wrong_package">A letöltött APK a %1$s-hez tartozik, nem a %2$s-hez</string> + <string name="selfinst_version_mismatch">A letöltött APK %1$d versionCode-ot ad meg, nem a közzétett %2$d-t</string> + <string name="selfinst_downgrade">Az Android nem telepíti a %1$d versionCode-ot a telepített %2$d fölé</string> + <string name="selfinst_no_signing">A letöltött APK nem tartalmaz aláírási információt</string> + <string name="selfinst_wrong_signer">A letöltött APK nincs aláírva a DroidDeck kiadási kulcsával</string> + <string name="appupd_http">A frissítési katalógus HTTP %1$d választ adott</string> + + <string name="loadstate_starting">A munkamenet indítása…</string> + <string name="loadstate_elapsed">%1$d:%2$02d eltelt · még dolgozik</string> + <string name="loadstate_steam_update">A Steam-kliens frissítésének letöltése · %1$d%%</string> + <string name="loadstate_steam_client">A Steam-kliens letöltése · %1$s</string> + + <string name="pextra_busy">Már fut egy kompatibilitási eszköz telepítése</string> + <string name="pextra_stop_session">Állítsa le az aktív munkamenetet a kompatibilitási eszközök telepítése előtt</string> + <string name="pextra_no_release">Nem található ARM64-es kiadás a %1$s-hez</string> + <string name="pextra_no_space">Legalább 4 GB szabad hely, plusz a letöltés mérete szükséges a %1$s telepítéséhez</string> + <string name="pextra_downloading">%1$s %2$s letöltése</string> + <string name="pextra_retrying">A letöltés újrapróbálása · %1$d. próbálkozás a %2$d-ből</string> + <string name="pextra_interrupted">A letöltés megszakadt</string> + <string name="pextra_download_failed">A letöltés sikertelen; a részleges fájl megmarad, hogy egy újrapróbálkozás folytathassa</string> + <string name="pextra_too_big">A letöltés túllépte a kiadás méretét, és törlésre került</string> + <string name="pextra_incomplete">A letöltés befejezetlen volt; a részleges fájl megmarad egy folytatható újrapróbálkozáshoz</string> + <string name="pextra_verifying">A letöltés ellenőrzése</string> + <string name="pextra_checksum_unreadable">Nem sikerült beolvasni a kiadás ellenőrzőösszegét; próbálja újra</string> + <string name="pextra_no_checksum">A %1$s %2$s nem közöl ellenőrzőösszeget; semmi nem lett telepítve</string> + <string name="pextra_checksum_mismatch">Az ellenőrzőösszeg nem egyezik; a letöltés törlésre került</string> + <string name="pextra_session_started">Egy munkamenet elindult a letöltés közben; állítsa le a kompatibilitási eszközök telepítése előtt</string> + <string name="pextra_installing">%1$s telepítése</string> + <string name="pextra_install_failed">A %1$s telepítése sikertelen (kilépési kód: %2$d)</string> + <string name="pextra_could_not_install">Nem sikerült telepíteni a %1$s-t</string> + <string name="esync_fetching">droiddeck-esync csomag letöltése</string> + + <string name="cmgr_fex_linux_helpers">Linux segédprogramokkal</string> + <string name="cmgr_fex_dlls_only">Csak DLL-ek</string> + <string name="cmgr_original_proton_updated">Eredeti (a Proton frissült az utolsó csere óta)</string> + <string name="cmgr_changed_outside">Az Összetevőkön kívül módosítva</string> + <string name="cmgr_not_present">nincs jelen</string> + <string name="cmgr_original_version">Eredeti %1$s</string> + <string name="cmgr_original_from">Eredeti innen: %1$s</string> + <string name="cmgr_swap_queued">A %1$s %2$s a %3$s-be kerül, amint a rajta futó játék bezárul.</string> + <string name="cmgr_swap_done">A %1$s %2$s most a %3$s-ben van. A következő játékindítástól érvényes.</string> + <string name="cmgr_original_missing">Az az eredeti csomag nincs tárolva</string> + <string name="cmgr_restore_queued">A %2$s %1$s-e visszaáll az eredetire, amint a rajta futó játék bezárul.</string> + <string name="cmgr_restore_done">A %2$s %1$s-e visszaállítva a %3$s eredetijéből.</string> + <string name="cmgr_package_in_use">A %1$s használatban van itt: %2$s. Előbb cserélje ki azt a Protont valami másra.</string> + <string name="cmgr_package_not_stored">A %1$s nincs tárolva</string> + <string name="cmgr_deleted">%1$s törölve.</string> + <string name="cmgr_original_kept">A telepített build eredetije megmarad: ez a visszaút.</string> + <string name="cmgr_not_stored">Nincs tárolva</string> + <string name="cmgr_deleted_original">A %2$s %1$s eredetije törölve.</string> + <string name="cmgr_nightlies_only">A letöltések csak a Nightlies kiadásokból érkeznek</string> + <string name="cmgr_list_predates_checksums">Ez a csomaglista régebbi, mint az ellenőrzőösszegek – frissítse, és próbálja újra</string> + <string name="cmgr_checksum_mismatch">Az ellenőrzőösszeg nem egyezik</string> + + <string name="sprefs_upscaler_linear">Lineáris</string> + <string name="sprefs_upscaler_nearest">Legközelebbi</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (minőség)</string> + <string name="sprefs_upscaler_sharpen">Csak élesítés</string> + <string name="sprefs_lod_bias_auto">Automatikus (illeszkedik a méretezéshez)</string> + + <string name="look_off_desc">Semmi nincs alkalmazva.</string> + <string name="look_game_clarity">Játéktisztaság</string> + <string name="look_game_clarity_desc">Élesítés egy csipetnyi kontraszttal – a mindennapi.</string> + <string name="look_vivid">Élénk</string> + <string name="look_vivid_desc">Erősen fokozott szín. Csíkmentesítés bekapcsolva, hogy az égbolt ne csíkozódjon.</string> + <string name="look_cinematic">Filmszerű</string> + <string name="look_cinematic_desc">Mélyebb kontraszt, hidegebb szín, simított élek.</string> + <string name="look_competitive">Versenyzős</string> + <string name="look_competitive_desc">Felemelt árnyékok és erős élesítés – vegye észre először az embereket.</string> + <string name="look_adaptive_sharpen">Adaptív élesítés</string> + <string name="look_adaptive_sharpen_desc">Csak élesítés, a színek érintetlenek.</string> + <string name="look_filmic">Filmes</string> + <string name="look_filmic_desc">Filmszerű görbe, enyhén tompított.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Hangos és ütős.</string> + <string name="look_retro_crt">Retro CRT</string> + <string name="look_retro_crt_desc">A CRT-képernyő és az analóg jel átmenetei együtt.</string> + <string name="look_upscale_sharp">Felskálázó élesítés</string> + <string name="look_upscale_sharp_desc">A panel felbontása alatti futtatáshoz.</string> + <string name="look_pixel_clean">Pixeltiszta</string> + <string name="look_pixel_clean_desc">Éles pixelek 2D-s és régi játékokhoz.</string> + <string name="look_anime_edge">Anime élek</string> + <string name="look_anime_edge_desc">Rajzfilmes körvonalak plusz élesítés.</string> + + <string name="gpuinfo_not_adreno">Nem Adreno GPU</string> + <string name="gpuinfo_supported">Támogatott</string> + <string name="gpuinfo_experimental">Kísérleti: az illesztőprogramjai teszt buildek</string> + <string name="gpuinfo_below_tested">A tesztelt hardver alatt (Adreno 725 és újabb): lehet, hogy nem fut</string> + <string name="gpuinfo_unsupported">Nem támogatott: a DroidDecknek Adreno (Snapdragon) GPU szükséges</string> + + <string name="turnip_rate_limited">A GitHub korlátja elérve – próbálja újra később</string> + <string name="turnip_github_http">A GitHub HTTP %1$d választ adott</string> + <string name="turnip_download_failed">A letöltés nem sikerült</string> + <string name="turnip_list_predates_checksums">Ez az illesztőprogram-lista régebbi, mint az ellenőrzőösszegek – frissítse, és próbálja újra</string> + <string name="turnip_checksum_mismatch">Az ellenőrzőösszeg nem egyezik – a letöltés elvetve</string> + <string name="turnip_not_adrenotools">Nem egy AdrenoTools illesztőprogram: %1$s</string> + <string name="turnip_reject_no_meta">nincs meta.json</string> + <string name="turnip_reject_meta_unreadable">a meta.json nem olvasható (%1$s)</string> + <string name="turnip_reject_linux_driver">ez egy Linux futtatókörnyezet-illesztőprogram (importálja a „Linux futtatókörnyezet-illesztőprogram” alatt)</string> + <string name="turnip_reject_wayland">ez egy Wayland játékillesztőprogram, amelyet ez az alkalmazás nem tud használni</string> + <string name="turnip_reject_no_library_name">a meta.json nem nevez meg libraryName-et, így semmit nem lehetett átadni az AdrenoToolsnak</string> + <string name="turnip_reject_library_missing">a meta.json a %1$s-t nevezi meg, amely nincs a zipben</string> + <string name="turnip_reject_not_aarch64">a %1$s nem 64 bites AArch64 ELF megosztott könyvtár</string> + <string name="turnip_reject_glibc">a %1$s a glibc-hez linkel – egy „-Linux” Turnip, amely a „Linux futtatókörnyezet-illesztőprogram” alá tartozik</string> + <string name="lvd_no_library">Nincs libvulkan_freedreno*.so ebben a zipben. Egy Android (AdrenoTools) vagy -Wayland Turnip zip nem Linux futtatókörnyezet-illesztőprogram.</string> + <string name="lvd_not_aarch64">A %1$s nem 64 bites AArch64 ELF megosztott könyvtár.</string> + <string name="lvd_not_glibc">A %1$s nem glibc illesztőprogram – az Android libc-jéhez linkel. A Linux futtatókörnyezethez „-Linux” zip szükséges; egy egyszerű vagy „-Wayland” Turnipet a Steam-kliens egyáltalán nem tudja betölteni.</string> + <string name="bundle_no_manifest">Nem illesztőprogram-csomag: nincs manifest.json, amely android és linux illesztőprogramot nevez meg</string> + <string name="bundle_entry_outside">Nem illesztőprogram-csomag: a %1$s rajta kívülre mutat</string> + <string name="bundle_too_large">Nem illesztőprogram-csomag: kicsomagolva több mint %1$d MB</string> + + <string name="gstore_sd_card">SD-kártya</string> + <string name="gstore_folder">Mappa</string> + + <string name="logshare_chooser">Munkamenet-naplók megosztása</string> + + <string name="hdr_needs_android_10">Android 10 vagy újabb szükséges (színtérrel rendelkező megjelenítési rétegek)</string> + <string name="hdr_none">ez a kijelző nem jelez HDR-támogatást</string> + <string name="hdr_not_hdr10">ez a kijelző a %1$s-t támogatja, nem a HDR10-et</string> + + <string name="gpu_this_gpu">ez a GPU</string> + <string name="phantom_title_on">A gyermekfolyamat-korlát be van kapcsolva</string> + <string name="phantom_title_unset">A gyermekfolyamat-korlát nincs beállítva</string> + <string name="phantom_title_unreadable">A gyermekfolyamat-korlátot nem sikerült ellenőrizni</string> + <string name="phantom_title_off">A gyermekfolyamat-korlát ki van kapcsolva</string> + <string name="phantom_title_not_required">A gyermekfolyamat-korlát nem szükséges</string> + <string name="phantom_instructions_fix">%1$s Ha ez nem lehetséges, csatlakoztassa ezt az eszközt egy ADB-vel rendelkező számítógéphez, és futtassa az alábbi parancsot. Térjen vissza ide, és ellenőrizze újra.</string> + <string name="phantom_instructions_off">A Steam-munkamenetek elindulhatnak.</string> + <string name="phantom_instructions_not_applicable">Ez az Android-verzió nem használja ezt a korlátot.</string> + <string name="phantom_fix_toggle">Kapcsolja be az „Alárendelt folyamatok korlátozásának kikapcsolása” lehetőséget a Fejlesztői beállításokban, és utána hagyja bekapcsolva a Fejlesztői beállításokat.</string> + <string name="phantom_fix_no_toggle">Ehhez az Android-verzióhoz nincs kapcsoló. Használja a vezeték nélküli hibakeresést a módosításához erről az eszközről.</string> + <string name="upd_block_no_apk">Ehhez a buildhez nincs letöltés a DroidDeck ezen másolatához.</string> + <string name="upd_block_version_code">Az Android nem telepíti ezt a buildet fölé, mert a %1$d versionCode-ja a telepített %2$d alatt van.</string> + <string name="upd_fail_downgrade">Az Android nem telepít régebbi verziót egy újabb fölé. Maradjon ezen a buildon, amíg a csatorna felzárkózik.</string> + <string name="upd_fail_signature">Ez a DroidDeck-másolat másként van aláírva (talán egy helyi build?), így az Android nem frissíti a helyén.</string> + <string name="upd_fail_storage">Nincs elég szabad hely a frissítéshez.</string> + <string name="upd_fail_aborted">A frissítés megszakítva.</string> + <string name="upd_fail_with_message">A frissítés nem települt: %1$s</string> + <string name="upd_fail_generic">A frissítés nem települt.</string> + <string name="saves_layout_zip">%1$s zip</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">A %1$s még nem lett elindítva</string> + <string name="saves_none_found">Nem található mentésfájl a %1$s-hez</string> + <string name="saves_not_save_zip">A %1$s-ben nincs drive_c mappa, így nem egy GameHub vagy Winlator mentés zip</string> + <string name="gstore_cannot_create">nem lehet mappákat létrehozni itt: %1$s</string> + <string name="gstore_cannot_write">nem lehet írni ide: %1$s</string> + <string name="gstore_cannot_write_detail">nem lehet írni ide: %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">A mappa nem elérhető</string> + <string name="gfiles_name_taken">Egy másik fájl már használja a %1$s nevet</string> + <string name="gfiles_art_unavailable">Az illusztrációk mappája nem elérhető</string> + <string name="gfiles_unrelated_inventory">A mappában egy nem kapcsolódó szinkronizációs leltár van</string> + <string name="gfiles_remove_failed">Nem sikerült eltávolítani a %1$s-t</string> + <string name="gfiles_outside_folder">A fájl kilép az exportmappából</string> + <string name="cmgr_fex_unnamed">FEX (verziónév nélküli build)</string> + <string name="cmgr_no_profile">nincs profile.json a %1$s-ben</string> + <string name="cmgr_not_component_package">A %1$s nem Linux-összetevőcsomag (típus: %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s szabad</string> + <string name="mode_storage_auto_short">Automatikus</string> + <string name="appupd_catalog_rejected">A frissítési katalógus nem ment át az ellenőrzéseken (%1$s)</string> + <string name="main_adb_clip_label">DroidDeck gyermekfolyamat-beállítás</string> + <string name="setup_signed_in_offline_unnamed">Bejelentkezve · offline mód</string> + <string name="setup_signed_in_unnamed">Bejelentkezve</string> + <string name="driver_tag_bundled">CSOMAGOLT</string> + <string name="driver_tag_downloaded">LETÖLTÖTT</string> + <string name="driver_tag_imported">IMPORTÁLT</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Munkamenet kijelzője</string> + <string name="display_resolution">Felbontás</string> + <string name="display_game_fit">16:9 játék illesztése</string> + <string name="display_game_fit_hint">Hogyan illeszkednek a 16:9 játékok ehhez a kijelzőhöz. A következő munkamenettől.</string> + <string name="display_game_fit_unavailable">Válassza a Képernyőhöz illesztést, vagy egy 16:9-nél szűkebb egyéni méretet.</string> + <string name="display_preserve">Arányok megtartása</string> + <string name="display_stretch">Nyújtás a kijelzőhöz</string> + <string name="display_image_scaling">Képméretezés</string> + <string name="display_filter">Méretezési szűrő</string> + <string name="display_filter_hint">A Steam és az Asztal közösen használja.</string> + <string name="display_filter_live">Élőben érvénybe lép. A Steam és az Asztal közösen használja.</string> + <string name="display_filter_note">Az FSR, a GSR és a NIS a munkamenet képének felnagyításakor lép érvénybe. A Csak élesítés nagyítás nélkül is működik.</string> + <string name="display_sharpness">Szűrőélesség</string> + <string name="display_frame_rate">Képkockasebesség</string> + <string name="display_look_filter">%1$s A méretezést erre állítja: %2$s.</string> + <string name="display_match_screen">Képernyőhöz illesztés (%1$d×%2$d)</string> + <string name="display_follow_screen">Képernyő követése (átméreteződik össze- vagy kinyitáskor)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Eszközrészletek megjelenítése</string> + <string name="device_info_hide">Eszközrészletek elrejtése</string> + <string name="device_info_loading">Az eszköz beolvasása…</string> + <string name="device_info_copy">Másolás</string> + <string name="device_info_copy_hint">Másolja ezeket a részleteket egy hibajelentésbe.</string> + <string name="device_info_copied">Másolva.</string> + <string name="force_ssbs_title">SSBS kényszerítése</string> + <string name="force_ssbs_hint">Bekapcsolva tartja azt a CPU-sebesség-beállítást, amelyet a Wine folyton kikapcsol. Gyorsíthatja a Windows-os játékokat Snapdragon 8 Elite-n; régebbi chipeken alig van hatása. A következő játékindítástól érvényes.</string> + + <string name="rail_stores">Áruházak</string> + <string name="source_steam">Steam</string> + <string name="source_added">Egyéni</string> + <string name="setup_stores">Áruházak</string> + <string name="setup_stores_open_on">Áruház megnyitása itt</string> + <string name="setup_stores_speed">Letöltési sebességi szint</string> + <string name="setup_stores_engine">Áruházmotor</string> + <string name="setup_stores_engine_chip_ready">● A motor kész</string> + <string name="setup_stores_engine_chip_missing">Nincs buildelve</string> + <string name="stores_tier_balanced">Kiegyensúlyozott</string> + <string name="stores_tier_fast">Gyors</string> + <string name="stores_tier_max">Max</string> + <string name="stores_title">Áruházak</string> + <string name="stores_settings">Áruházbeállítások</string> + <string name="stores_settings_eyebrow">Beállítások</string> + <string name="stores_chip_signed_out">(nincs bejelentkezve)</string> + <string name="stores_tab_store">Áruház</string> + <string name="stores_tab_installed">Telepítve</string> + <string name="stores_tab_library">Könyvtár</string> + <string name="stores_tab_all">Összes</string> + <string name="stores_tab_downloads">Letöltések</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Bejelentkezés</string> + <string name="stores_signout_named">%1$s · kijelentkezés</string> + <string name="stores_signout_title">Kijelentkezik a %1$s-ből?</string> + <string name="stores_signout_note">A telepített játékok megmaradnak. A könyvtár újra lekérésre kerül, amikor újra bejelentkezik.</string> + <string name="stores_signout_stay">Bejelentkezve marad</string> + <string name="stores_signout_go">Kijelentkezés</string> + <string name="stores_search_catalog">Keresés a %1$s katalógusban…</string> + <string name="stores_search_installed">Keresés a telepített játékok között…</string> + <string name="stores_search_library">Keresés a könyvtárában…</string> + <string name="stores_search_open">Keresés</string> + <string name="stores_installed_empty">Nincs telepítve semmi</string> + <string name="stores_library_loading">Betöltés</string> + <string name="stores_nothing_matches">Nincs játék</string> + <string name="stores_shelves_loading">Az áruház betöltése…</string> + <string name="stores_amazon_no_catalog">Nincs katalógus</string> + <string name="stores_shelf_new">Újdonságok</string> + <string name="stores_shelf_deals">Akciók</string> + <string name="stores_shelf_free">Ingyenes játékok</string> + <string name="stores_shelf_trending">Felkapott</string> + <string name="stores_shelf_library">A könyvtára</string> + <string name="stores_play">Játék</string> + <string name="stores_install">Telepítés</string> + <string name="stores_resume_install">Telepítés folytatása</string> + <string name="stores_dl_interrupted">Megszakítva</string> + <string name="stores_install_size">Telepítés · %1$s</string> + <string name="stores_get_free">Ingyenes beszerzés</string> + <string name="stores_view_on">Megtekintés itt: %1$s</string> + <string name="stores_buy_price">Megvétel · %1$s</string> + <string name="stores_installed_chip">Telepítve</string> + <string name="stores_in_library">A könyvtárban</string> + <string name="stores_free">Ingyenes</string> + <string name="stores_resume">Folytatás</string> + <string name="stores_refresh">Frissítés</string> + <string name="stores_sort">Rendezés</string> + <string name="stores_sort_last_played">Nemrég játszott</string> + <string name="stores_sort_recently_installed">Nemrég telepített</string> + <string name="stores_sort_title_asc">Cím A–Z</string> + <string name="stores_sort_title_desc">Cím Z–A</string> + <string name="stores_sort_size_desc">Méret: legnagyobb</string> + <string name="stores_sort_size_asc">Méret: legkisebb</string> + <string name="stores_sort_release_date">Megjelenés dátuma</string> + <string name="stores_view_list">Listanézet</string> + <string name="stores_view_cards">Kártyanézet</string> + <string name="stores_show_mature">Felnőtt tartalom megjelenítése</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Ki</string> + <string name="epic_eos">Epic bejelentkezés (EOS)</string> + <string name="epic_offline">Indítás offline</string> + <string name="epic_resolve">Epic bejelentkezés megoldása</string> + <string name="epic_client_version">%1$s verzió</string> + <string name="epic_client_no_runtime">Előbb telepítse a Linux futtatókörnyezetet</string> + <string name="epic_client_checking">A legújabb verzió ellenőrzése…</string> + <string name="epic_client_unpacking">Kicsomagolás…</string> + <string name="epic_client_unreachable">A letöltési szerver nem válaszolt</string> + <string name="epic_client_needs_fex">Az Epic Games Launchernek szüksége van a FEX-re, amelyet a Steam tölt le. Nyisd meg újra a launchert, miután a Steam elindult.</string> + <string name="epic_client_download_failed">Letöltés sikertelen: %1$s</string> + <string name="epic_client_unpack_failed">Nem sikerült kicsomagolni a launchert: %1$s</string> + <string name="epic_client_sign_in_failed">Az Epic Games Launcher nem fogadta el a bejelentkezést. Indítsa el újra a launcherből.</string> + <string name="epic_client_uninstall_body">Eltávolítja az indítót és felszabadítja a helyét. Az Epic-játékaid telepítve maradnak és működnek, a bejelentkezés pedig megmarad a következő telepítéshez.</string> + <string name="epic_client_uninstall_stops">Előbb bezárul a futó munkamenet.</string> + <string name="epic_client_uninstalled">Az Epic Games Launcher eltávolítva</string> + <string name="epic_client_uninstall_failed">Az indító néhány fájlját nem sikerült eltávolítani. Próbáld újra.</string> + <string name="epic_client_uninstalling">Várd meg, amíg az Epic Games Launcher eltávolítása befejeződik</string> + <string name="store_cloud_saves">Felhőmentések</string> + <string name="cloud_upload">Feltöltés a felhőbe</string> + <string name="cloud_download">Letöltés a felhőből</string> + <string name="cloud_none">Nincs felhőmentés</string> + <string name="cloud_conflict">Felhőütközés</string> + <string name="cloud_conflict_files">Felhőütközés · %1$d fájl</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Felhő megtartása</string> + <string name="cloud_keep_local">Helyi megtartása</string> + <string name="cloud_checking">Felhő ellenőrzése…</string> + <string name="cloud_last_sync">Utolsó szinkronizálás: %1$s</string> + <string name="cloud_never">Még nincs szinkronizálva</string> + <string name="cloud_done">%1$d fájl</string> + <string name="stores_eyebrow_installed">telepítve</string> + <string name="stores_eyebrow_library">a könyvtárában</string> + <string name="stores_eyebrow_store">áruház</string> + <string name="achievements_title">Eredmények</string> + <string name="achievements_count">%1$d / %2$d feloldva</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Feloldva · %1$d</string> + <string name="achievements_group_locked">Zárolva · %1$d</string> + <string name="achievements_group_hidden">Rejtett · %1$d</string> + <string name="achievements_hidden">Rejtett eredmény</string> + <string name="achievements_hidden_detail">A részletek a feloldás után jelennek meg.</string> + <string name="achievements_all">Minden eredmény feloldva</string> + <string name="achievements_reading">Betöltés…</string> + <string name="achievements_signed_out">Jelentkezz be a %1$s fiókodba az eredményeid megtekintéséhez.</string> + <string name="achievements_unreachable">Nem sikerült elérni a %1$s szolgáltatást. Nézd meg újra, ha online vagy.</string> + <string name="achievements_none">A %1$s nem sorol fel eredményt ehhez a játékhoz.</string> + <string name="achievements_show_all">Mind a %1$d megjelenítése</string> + <string name="achievements_dialog_title">Eredmények · %1$s</string> + <string name="stores_in_steam">✓ A Steamben</string> + <string name="stores_uninstall">Eltávolítás</string> + <string name="stores_uninstalling">Eltávolítás…</string> + <string name="stores_uninstall_title">Eltávolítja a %1$s-t?</string> + <string name="stores_uninstall_body_size">%1$s szabadít fel, és eltávolítja a Steamből.</string> + <string name="stores_uninstall_body">Eltávolítja a fájljait és a Steam-parancsikonját.</string> + <string name="stores_launch_not_registered">A Steam a következő indításakor felveszi a játékot; indítsa el onnan, vagy indítsa el most a Steamet.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">A Steam választása játékonként</string> + <string name="stores_card_audio">Hang</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Összetevők</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motor</string> + <string name="stores_card_engine_value">%1$s · natív</string> + <string name="stores_card_engine_java">%1$s · beépített</string> + <string name="stores_how_it_runs">Hogyan fut</string> + <string name="stores_kv_fetched">Lekérve innen</string> + <string name="stores_kv_fetched_value">%1$s, az Ön fiókjával</string> + <string name="stores_kv_installed_to">Telepítve ide</string> + <string name="stores_kv_installed_to_value">Játéktárhely (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Indítja</string> + <string name="stores_kv_launched_by_value">A Steam és a Proton, ugyanúgy, mint a Steam-játékoknál</string> + <string name="stores_kv_launched_by_epic">A Steam és a Proton · Epic bejelentkezés minden indításnál, EOS overlay kikapcsolva</string> + <string name="stores_kv_launched_by_amazon">A Steam és a Proton · Amazon Games Services változók beállítva</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">a Steamhez adva telepítéskor (Deck felhasználói felület + Steam Input)</string> + <string name="stores_downloads_empty">Nincs letöltés</string> + <string name="stores_dl_paused">Szüneteltetve</string> + <string name="stores_dl_queued">Sorban</string> + <string name="stores_dl_queued_at">Sorban · #%1$d</string> + <string name="stores_dl_cancelled">Megszakítva</string> + <string name="stores_dl_failed">Sikertelen</string> + <string name="stores_dl_failed_reason">Sikertelen · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Szüneteltetés</string> + <string name="stores_dl_resume">Folytatás</string> + <string name="stores_dl_cancel">Megszakítás</string> + <string name="stores_dl_retry">Újra</string> + <string name="stores_dl_clear">Törlés</string> + <string name="stores_dl_clear_all">Befejezettek törlése</string> + <string name="stores_stage_manifest">Manifeszt</string> + <string name="stores_stage_download">Letöltés</string> + <string name="stores_stage_verify">Ellenőrzés</string> + <string name="stores_stage_install">Telepítés</string> + <string name="stores_stage_done">Kész</string> + <string name="stores_stage_checking">Ellenőrzés</string> + <string name="stores_stage_downloading">Letöltés</string> + <string name="stores_dl_cancel_confirm">Törli a letöltést?</string> + <string name="stores_dl_failed_kept">Sikertelen · %1$s megtartva</string> + <string name="stores_stage_verifying">Ellenőrzés</string> + <string name="stores_stage_installing">Telepítés</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d fájl</string> + <string name="stores_download_manager">Letöltéskezelő</string> + <string name="stores_parallel">Egyszerre futó letöltések</string> + <string name="stores_install_where">Telepítés ide</string> + <string name="stores_install_title">%1$s telepítése:</string> + <string name="stores_target_internal">Belső</string> + <string name="stores_target_free">%1$s szabad</string> + <string name="stores_target_free_unknown">A szabad hely ismeretlen</string> + <string name="stores_storage_insufficient">Kevés a szabad hely: %1$s kell, csak %2$s szabad</string> + <string name="stores_storage_low">Kevés a hely (%1$s szabad, %2$s kell)</string> + <string name="stores_notification_channel">Áruházletöltések</string> + <string name="stores_notification_channel_hint">Megjeleníti a játékletöltés folyamatát, és futva tartja a letöltéseket a háttérben</string> + <string name="stores_notification_one">Letöltés</string> + <string name="stores_notification_many">%1$d letöltés</string> + <string name="stores_notification_waiting">Előkészítés…</string> + <string name="stores_notification_done_channel">Befejezett áruházletöltések</string> + <string name="stores_notification_installed">%1$s telepítve</string> + <string name="stores_notification_failed">A %1$s letöltése sikertelen</string> + <string name="stores_notification_delete">Törlés</string> + <string name="stores_notification_keep">Megtartás</string> + <string name="stores_login_title">Bejelentkezés ide: %1$s</string> + <string name="stores_login_provider_title">Bejelentkezés a szolgáltatójával</string> + <string name="stores_login_reload">Újratöltés</string> + <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_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> + <string name="stores_login_error_ssl">A kapcsolat a bejelentkezési oldalhoz nem biztonságos.</string> + <string name="stores_login_error_verification">A bejelentkezést nem sikerült ellenőrizni. Próbálja újra.</string> + <string name="stores_login_error_generic">A bejelentkezés sikertelen. Próbálja újra.</string> + <string name="common_close">Bezárás</string> + <string name="common_back">Vissza</string> + <string name="common_edit">Szerkesztés</string> + <string name="games_add_all">Minden játék hozzáadása ebből a mappából</string> + <string name="games_added_none">Nincs semmi új ebben a mappában</string> + <string name="edit_name">Név</string> + <string name="edit_target">Cél</string> + <string name="edit_start_in">Indítás innen</string> + <string name="edit_launch_options">Indítási beállítások</string> + <string name="edit_artwork">Illusztráció</string> + <string name="edit_other_exe">Másik exe…</string> + <string name="edit_remove">Eltávolítás</string> + <string name="art_cover">Borító</string> + <string name="art_wide_cover">Széles borító</string> + <string name="art_adjust_logo">Logó igazítása</string> + <string name="logo_pos_default">Alapértelmezett</string> + <string name="logo_pos_upper_left">Bal felső</string> + <string name="logo_pos_upper_center">Felső közép</string> + <string name="logo_pos_center">Közép</string> + <string name="logo_pos_bottom_left">Bal alsó</string> + <string name="logo_pos_bottom_center">Alsó közép</string> + <string name="logo_pos_position">Pozíció</string> + <string name="logo_pos_size">Méret</string> + <string name="logo_pos_save">Mentés</string> + <string name="logo_pos_reset">Vissza az alapértelmezettre</string> + <string name="logo_pos_hint">A játék háttere fölött rajzolódik ki, ahogy a Steam is teszi. A pontos pozíció néhány pixellel eltérhet.</string> + <string name="logo_pos_no_logo">Ennek a játéknak még nincs logója. Válassz egyet a Logó alatt, hogy itt lásd.</string> + <string name="logo_pos_failed">A logó pozícióját nem sikerült menteni. Próbáld újra.</string> + <string name="art_background">Háttér</string> + <string name="art_logo">Logó</string> + <string name="art_icon">Ikon</string> + <string name="art_src_folder">Játékmappa</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Saját fájl</string> + <string name="art_src_exe">Az exe-ből</string> + <string name="art_src_auto">Automatikus</string> + <string name="art_pick_image">Kép kiválasztása…</string> + <string name="art_pick_title">Kép kiválasztása: %1$s</string> + <string name="art_reset">Visszaállítás automatikusra</string> + <string name="art_search_sgdb">Keresés a SteamGridDB-n…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Játék keresése</string> + <string name="art_sgdb_other_games">További találatok</string> + <string name="art_sgdb_none">Nincs találat.</string> + <string name="art_sgdb_no_key">A SteamGridDB API-kulcsot igényel. Add hozzá a sajátodat a Beállítások › Indítóalkalmazás alatt.</string> + <string name="art_sgdb_bad_key">A SteamGridDB nem fogadta el az API-kulcsot. Ellenőrizd a Beállítások › Indítóalkalmazás alatt.</string> + <string name="art_sgdb_limit">A SteamGridDB most korlátozza a kéréseket. Próbáld újra egy perc múlva.</string> + <string name="art_sgdb_offline">A SteamGridDB nem érhető el. Ellenőrizd a kapcsolatot.</string> + <string name="art_sgdb_server">Valami hiba történt a SteamGridDB-nél. Próbáld később.</string> + <string name="art_sgdb_no_game">A SteamGridDB-nek nincs találata erre a játékra. Próbáld rákeresni.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d játék hozzáadva</item> + <item quantity="other">%1$d játék hozzáadva</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d már a Játékokban van</item> + <item quantity="other">%1$d már a Játékokban van</item> + </plurals> + <string name="hop_back">B · Vissza: %1$s</string> + <string name="hop_from_games">a játék</string> + <string name="hop_from_play">Játék beállítások</string> + <string name="sheet_graphics_drivers">Grafikai illesztőprogramok</string> + <string name="comp_this_proton">Ez a Proton</string> + <string name="comp_every_proton">Minden Proton</string> + <string name="comp_for_every_proton">Minden Protonhoz</string> + <string name="comp_available_count">Elérhető · %1$d</string> + <string name="comp_checked">Ellenőrizve: %1$s</string> + <string name="comp_check_all">Új összetevők és illesztőprogramok keresése</string> + <string name="comp_get">Beszerzés</string> + <string name="comp_proton_bar">%1$s · a lenti DXVK, VKD3D-Proton és FEX ehhez a Protonhoz tartozik</string> + <string name="comp_device_tested">%1$s · tesztelt</string> + <string name="comp_device_untested">%1$s · nem tesztelt</string> + <string name="comp_device_unsupported">%1$s · nem támogatott</string> + <string name="gpu_auto_keeps">Naprakészen tartja az ajánlott párost</string> + <string name="gpu_bar_auto">Automatikus · %1$s</string> + <string name="gpu_separately">Futtatókörnyezet- és megjelenítő-illesztőprogramok külön</string> + <string name="gpu_use_title">Használja a %1$s-t?</string> + <string name="gpu_mode_title">Hogyan választódnak ki az illesztőprogramok</string> + <string name="gpu_mode_auto_detail">A legjobb pár ehhez a GPU-hoz, mindig friss</string> + <string name="gpu_mode_pair">Illesztett pár</string> + <string name="gpu_mode_pair_detail">Válassz párt; mindkét illesztőprogramot beállítja</string> + <string name="gpu_mode_mix">Szabad kombinálás</string> + <string name="gpu_mode_mix_detail">A képet és a futtatókörnyezetet külön válaszd</string> + <string name="gpu_mode_pair_short">Pár</string> + <string name="gpu_mode_mix_short">Vegyes</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PÁR</string> + <string name="gpu_src_bundle">CSOMAG</string> + <string name="gpu_src_chosen">KIVÁLASZTVA</string> + <string name="gpu_src_by_gpu">GPU SZERINT</string> + <string name="gpu_src_default">ALAP</string> + <string name="gpu_display_live">Most rajzol</string> + <string name="gpu_display_pending">Újraindítás kell · addig a(z) %1$s rajzol</string> + <string name="gpu_runtime_live">Aktív</string> + <string name="gpu_runtime_pending">Következő munkamenet · ez a(z) %1$s-t használja</string> + <string name="gpu_display_next">A képernyőt rajzolja. A következő munkamenettől érvényes.</string> + <string name="gpu_previous_driver">az előző illesztőprogram</string> + <string name="gpu_restart_banner">Indítsd újra a kép-illesztőprogram váltásához.</string> + <string name="gpu_restart_blocked">Állítsd le a jelenlegi munkamenetet és indítsd újra a DroidDecket a kép-illesztőprogram váltásához.</string> + <string name="gpu_restart_now">Újraindítás most</string> + <string name="gpu_restart_later">Később</string> + <string name="gpu_auto_title">Az Automatikus ezt a párt választotta ehhez: %1$s</string> + <string name="gpu_auto_builtin_title">Az Automatikus a beépített illesztőprogramokat használja ehhez: %1$s</string> + <string name="gpu_auto_reason">A(z) %1$s családhoz választva. Az új verziók a háttérben települnek.</string> + <string name="gpu_pair_title">Válassz párt</string> + <string name="gpu_pair_hint">A pár a kép-illesztőprogramot és a futtatókörnyezet-illesztőprogramot együtt állítja be.</string> + <string name="gpu_mix_title">Válaszd ki mindegyik illesztőprogramot</string> + <string name="gpu_mix_hint">A csomag mindkét helyet kitölti. A kép módosításai újraindítás után, a futtatókörnyezet módosításai a következő munkamenettől érvényesek.</string> + <string name="gpu_change_display">Kép-illesztőprogram váltása</string> + <string name="gpu_change_runtime">Futtatókörnyezet-illesztőprogram váltása</string> + <string name="gpu_autos_pick">AZ AUTOMATIKUS VÁLASZTÁSA</string> + <string name="gpu_installed">Telepítve</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · újraindítás az érvényesítéshez</string> + <string name="gpu_chip_restart">%1$s · újraindítás szükséges</string> + <string name="comp_this_device">Ez a készülék</string> + <string name="proton_remove_title">Eltávolítja a %1$s-t?</string> + <string name="setup_tab_diagnostics">Diagnosztika</string> + <string name="setup_ready">Készen áll a játékra</string> + <string name="setup_not_ready">Még nem áll készen a játékra</string> + <string name="setup_ready_runtime">futtatókörnyezet: %1$s</string> + <string name="setup_ready_limit_off">folyamatkorlát kikapcsolva</string> + <string name="setup_ready_signed_in">bejelentkezve mint %1$s</string> + <string name="setup_needs_you">Amikor szükség van rá</string> + <string name="setup_group_look">Megjelenés</string> + <string name="setup_group_device">Ez az eszköz</string> + <string name="setup_group_art">Könyvtár illusztrációi</string> + <string name="setup_group_download">Letöltés</string> + <string name="setup_download_source">Forrás</string> + <string name="setup_download_source_auto">Automatikus</string> + <string name="setup_download_source_direct">Közvetlen</string> + <string name="setup_download_source_mirror">Tükör</string> + <string name="setup_download_source_custom">Saját prefix</string> + <string name="setup_download_mirror">Webhely</string> + <string name="setup_download_prefix">Prefix</string> + <string name="flathub_eyebrow">LINUX-ALKALMAZÁSOK</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Asztali alkalmazások a Linux-asztalhoz, az Asztalról megnyitva.</string> + <string name="flathub_setup">Flathub beállítása</string> + <string name="flathub_remove_title">Eltávolítja a %1$s-t?</string> + <string name="flathub_remove_note">A beállításai és fájljai megmaradnak.</string> + <string name="flathub_keep">Megtartás</string> + <string name="desktop_size">Méret a tárhelyen</string> + <string name="desktop_uninstall_title">Eltávolítja az asztalt?</string> + <string name="desktop_all_systems">Összes</string> + <string name="gog_achievements">GOG-eredmények</string> + <string name="gog_achievements_hint">Szinkronizálja az eredményeket a támogatott GOG-játékokhoz. A következő indítástól lép életbe.</string> + <string name="gog_achievements_off">Eredmények kikapcsolva</string> + <string name="gog_achievements_on">Eredmények bekapcsolva</string> + <string name="gog_achievements_signin">Jelentkezz be újra a GOG-ba</string> + <string name="gog_achievements_uploaded">Eredmények feltöltve</string> + <string name="gog_achievements_pending">Az eredmény feltöltése függőben</string> + <string name="gog_achievements_enable_store">Kapcsold be a GOG-eredményeket a Store-beállításokban</string> + <string name="gog_achievements_unavailable">Eredmények nem elérhetők; nézd meg a munkamenet-naplókat</string> + <string name="achievement_unlocked">Eredmény feloldva</string> + <string name="touch_paste">Beillesztés</string> + <string name="touch_dpad">Iránykereszt</string> + <string name="touch_left_stick">Bal kar</string> + <string name="touch_right_stick">Jobb kar</string> + <string name="touch_menu">Menü</string> + <string name="touch_keyboard">Billentyűzet</string> + <string name="touch_dpad_up">Iránykereszt fel</string> + <string name="touch_dpad_down">Iránykereszt le</string> + <string name="touch_dpad_left">Iránykereszt balra</string> + <string name="touch_dpad_right">Iránykereszt jobbra</string> + <string name="touch_title">Érintővezérlők</string> + <string name="touch_controller">Érintőkontroller</string> + <string name="touch_mouse">Egér</string> + <string name="touch_on">Be</string> + <string name="touch_off">Ki</string> + <string name="touch_speed_slow">Lassú</string> + <string name="touch_speed_normal">Normál</string> + <string name="touch_speed_fast">Gyors</string> + <string name="touch_edit_layout">Elrendezés szerkesztése</string> + <string name="touch_droiddeck_menu">DroidDeck menü</string> + <string name="touch_drag_hint">Húzd a vezérlőket a képernyőre</string> + <string name="touch_arrange">Elrendezés</string> + <string name="touch_discard">Elvetés</string> + <string name="touch_saving">Mentés…</string> + <string name="touch_icon">Ikon</string> + <string name="touch_narrower">Sz−</string> + <string name="touch_wider">Sz+</string> + <string name="touch_shorter">M−</string> + <string name="touch_taller">M+</string> + <string name="touch_hide">Elrejtés</string> + <string name="touch_color_opacity">Szín és átlátszatlanság…</string> + <string name="touch_copy_layout">Elrendezés másolása</string> + <string name="touch_layout_copied">Elrendezés másolva; illeszd be bármelyik játék érintőelrendezésébe</string> + <string name="touch_paste_layout">Másolt elrendezés beillesztése</string> + <string name="touch_reset_layout">Visszaállítás a Steam alapértelmezésére</string> + <string name="touch_no_binding">Ehhez a vezérlőhöz nincs hozzárendelés a Steamben, amihez ikont lehetne adni</string> + <string name="touch_icon_for">Ikon ehhez: %1$s</string> + <string name="touch_layout_color">Érintőelrendezés színe</string> + <string name="touch_done">Kész</string> + <string name="touch_save_failed">Az érintőelrendezést nem sikerült elmenteni</string> + <string name="touch_saved">Az érintőelrendezés elmentve a Steambe</string> + <string name="touch_app_id">%1$d. alkalmazás</string> + <string name="touch_label_hint">Felirat (nem kötelező)</string> + <string name="touch_icons_missing">A Steam ikonjai nem találhatók</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d ikon a Steamről</item> + <item quantity="other">%1$d ikon a Steamről</item> + </plurals> + <string name="touch_icon_color">Ikon színe</string> + <string name="touch_button_color">Gomb színe</string> + <string name="touch_no_icon">Nincs ikon</string> + + <string name="stores_sync_sign_in">Bejelentkezés ellenőrzése…</string> + <string name="stores_sync_library">Könyvtárad lekérése…</string> + <string name="stores_sync_game_list">Játéklista lekérése…</string> + <string name="stores_sync_details">Játékadatok betöltése… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">%1$d játék szinkronizálása…</item> + <item quantity="other">%1$d játék szinkronizálása…</item> + </plurals> + <string name="stores_sync_progress">Szinkronizálás… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Borítóképek lekérése…</string> + <string name="stores_sync_failed">A szinkronizálás sikertelen</string> + <string name="stores_sync_no_games">Nem található játék a %1$s könyvtáradban</string> + <string name="stores_sync_amazon_no_answer">Az Amazon Games nem válaszolt a könyvtáradra vonatkozóan: frissítsd, vagy jelentkezz be újra</string> + <string name="stores_sync_gog_unreachable">Nem sikerült csatlakozni a GOG-hoz</string> + <string name="stores_sync_gog_unreadable">A GOG-könyvtáradat nem sikerült beolvasni</string> + <string name="stores_registering">Regisztráció a Steamnél…</string> + <string name="mode_client_arch">Steam-kliens</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC-diagnosztika</string> + <string name="setup_vac_diag_hint">A Source-játékok naplózzák a konzoljukat (-condebug); a munkamenet-naplókban lévő vac.txt mutatja, hogy védett-e</string> + <string name="load_starting_steam_x64">Steam x86-64 indítása</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Az x86-64-es Steam-kliens használja</string> + <string name="storage_uninstall_in_x64">Ez a példány az x86-64 Steam-kliensben van. Válassza az x86-64 lehetőséget a Steam-kliens beállításnál, majd itt távolítsa el.</string> + <string name="storage_uninstall_in_arm64">Ez a példány az ARM64 Steam-kliensben van. Válassza az ARM64 lehetőséget a Steam-kliens beállításnál, majd itt távolítsa el.</string> + <string name="drawer_page_glasses">Szemüveg</string> + <string name="glasses_open">VITURE szemüveg</string> + <string name="glasses_control">Szemüveg vezérlése</string> + <string name="glasses_driver_missing">Ez a verzió nem tartalmazza a szemüveg illesztőprogramját.</string> + <string name="glasses_connection_failed">Nem sikerült csatlakozni a szemüveghez. Csatlakoztassa újra a kábelt, vagy koppintson az Engedélyezés gombra az újrapróbáláshoz.</string> + <string name="glasses_allow">Engedélyezés</string> + <string name="glasses_allow_hint">Engedélyezze, hogy a DroidDeck beállítsa a szemüveg frissítési frekvenciáját, 3D módját, fényerejét, hangerejét és elsötétítését, valamint olvassa a fejkövetési adatait.</string> + <string name="glasses_asking">Várakozás az engedélyére az Android ablakában…</string> + <string name="glasses_denied">A vezérlés elutasítva. Engedélyezze, hogy módosíthassa a szemüveg beállításait.</string> + <string name="glasses_no_control">Ez a szemüveg megjeleníti a játékot, de a beállításai innen nem módosíthatók.</string> + <string name="glasses_output">Kimenet</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Játék a szemüvegen</string> + <string name="glasses_game_on_hint">A játék csak a szemüvegen jelenik meg. Ki: a telefon mutatja, és az Android tükrözi a telefon képernyőjét.</string> + <string name="glasses_display">Kijelző</string> + <string name="glasses_refresh">Frissítési frekvencia</string> + <string name="glasses_3d">3D (egymás melletti)</string> + <string name="glasses_3d_hint">Váltsa az okosszemüveget egymás melletti 3D-re. A fejkövetés külön vezérelhető.</string> + <string name="glasses_3d_failed">Nem sikerült megerősíteni a 3D-jelet. Próbáld újra, ha visszatér a 2D-kép.</string> + <string name="glasses_no_signal">Nincs kép: a szemüveg olyan módban van, amelyet ez a telefon nem tud küldeni. Tartsa lenyomva a 2D/3D gombját, vagy húzza ki, és dugja vissza.</string> + <string name="glasses_3d_refresh">3D frissítési frekvencia</string> + <string name="glasses_auto3d">3D a VR-játékokhoz</string> + <string name="glasses_auto3d_hint">3D-re vált, amíg a SteamVR fut, utána vissza.</string> + <string name="glasses_picture">Kép</string> + <string name="glasses_picture_hint">Az Automatikus mód lapos tartalmat jelenít meg mindkét szemben, és érzékeli a SteamVR-t. SBS tartalomhoz válassza az Egymás melletti játék lehetőséget.</string> + <string name="glasses_picture_auto">Automatikus</string> + <string name="glasses_picture_screen">Virtuális képernyő</string> + <string name="glasses_picture_sbs">Egymás melletti 3D játék</string> + <string name="glasses_screen_size">Képernyő szélessége</string> + <string name="glasses_screen_distance">Képernyő távolsága</string> + <string name="glasses_screen_next_session">A szélesség és a távolság akkor érvényes, ha a játék virtuális képernyőként fut a szemüvegen.</string> + <string name="glasses_screen_no_output">Ezek a beállítások akkor érvényesek, ha a Játék a szemüvegen be van kapcsolva, és a játék ott jelenik meg.</string> + <string name="glasses_screen_flat_hint">Az Automatikus mód teljes képernyőn tartja ezt a 2D-s játékot. Használjon virtuális képernyőt a szélesség, a távolság és a fejkövetés beállításához.</string> + <string name="glasses_screen_use">Virtuális képernyő használata</string> + <string name="glasses_screen_direct_hint">A SteamVR kitölti a nézetet. Állítsa be a látómezőt VR-ben; a szélesség és a távolság csak egy virtuális képernyőre vonatkozik.</string> + <string name="glasses_screen_sbs_hint">Az egymás melletti 3D-s játékok mindkét szem látóterét kitöltik. A szélesség és a távolság csak virtuális képernyőre vonatkozik.</string> + <string name="glasses_tracking_flat_hint">Az Automatikus mód rögzítve tartja ezt a 2D-s játékot a látótérben. A fejkövetéshez válassza a Kijelző részben a Virtuális képernyő lehetőséget.</string> + <string name="glasses_tracking_sbs_hint">A fejkövetés virtuális képernyőre vagy futó SteamVR-játékra vonatkozik.</string> + <string name="glasses_hardware">Eszköz</string> + <string name="glasses_brightness">Fényerő</string> + <string name="glasses_volume">Hangerő</string> + <string name="glasses_sunblock">Elsötétítés</string> + <string name="glasses_sunblock_hint">Elsötétíti az elülső lencséket.</string> + <string name="glasses_tracking">Követés</string> + <string name="glasses_head_tracking">Fejkövetés</string> + <string name="glasses_head_tracking_hint">A szemüveg saját érzékelői a fejével együtt forgatják a virtuális képernyőt és a SteamVR-t.</string> + <string name="glasses_recenter">Nézet középre igazítása</string> + <string name="glasses_recenter_button">Képernyő újraközpontosítása</string> + <string name="glasses_vr_fov">SteamVR látómező</string> + <string name="glasses_vr_fov_hint">Kisebb érték közelebb hozza a SteamVR-t és kitölti a szemüveget; nagyobb többet mutat a környezetéből.</string> + <string name="glasses_playing">Játék ezen: %1$s</string> + <string name="glasses_calibration">Követés kalibrálása</string> + <string name="glasses_calibration_hint">Csökkenti a sodródást, és beállítja a vízszintes referenciát.</string> + <string name="glasses_calibration_saved_hint">A szemüveg a mentett kalibrációt használja.</string> + <string name="glasses_calibration_open">Kalibrálás</string> + <string name="glasses_calibration_instructions">Helyezze a csatlakoztatott szemüveget fejjel lefelé egy vízszintes felületre úgy, hogy a keret egyenletesen feküdjön. Koppintson az Indítás gombra, majd kb. 8 másodpercig ne érjen hozzá. Mozgás esetén a mérés újraindul. Ez a sodródást és a dőlést korrigálja, az irányt nem.</string> + <string name="glasses_calibration_settling">Hagyja a szemüveget fejjel lefelé, és ne érjen hozzá. Várakozás, amíg nyugalomba kerül…</string> + <string name="glasses_calibration_collecting">Az érzékelők mérése. Tartsa mozdulatlanul a szemüveget.</string> + <string name="glasses_calibration_moving">Mozgás észlelve. Ne érjen a szemüveghez; a mérés automatikusan újraindul.</string> + <string name="glasses_calibration_turn_over">Helyezze a szemüveget fejjel lefelé egy vízszintes felületre. A mérés akkor indul, amikor megfelelő helyzetben van.</string> + <string name="glasses_calibration_complete">Kalibráció mentve. Vegye fel a szemüveget, nézzen egyenesen előre, majd koppintson a Kész gombra a középre igazításhoz.</string> + <string name="glasses_calibration_failed">Nem sikerült befejezni a kalibrálást. Ellenőrizze a kapcsolatot, tartsa mozdulatlanul a szemüveget, majd próbálja újra. Az előző kalibráció változatlan.</string> + <string name="glasses_calibration_start">Indítás</string> + <string name="glasses_calibration_done">Kész</string> + <string name="glasses_calibration_reset">Követési kalibráció visszaállítása</string> + <string name="glasses_calibration_reset_hint">Törli a mentett kalibrációt, és visszaállítja a modell alapértékeit? A szemüveg visszavétele után igazítsa középre a nézetet.</string> + <string name="glasses_calibration_reset_button">Visszaállítás</string> + <string name="hand_camera_group">Kézkövetés</string> + <string name="hand_camera_prompt_title">Kezek vagy Joy-Con kontrollerek követése a telefonkamerával?</string> + <string name="hand_camera_prompt_body">Ha nincs csatlakoztatva kontroller, a telefon kamerája követi a kezeidet VR-ban: kattintáshoz csípd össze a hüvelykujjadat és a mutatóujjadat, megfogáshoz zárd össze a kezed, a menü megnyitásához pedig fordítsd magad felé a tenyeredet, majd csípd össze őket. Párosított Joy-Con kontrollerek esetén a kamera követi a pozíciójukat, miközben a Joy-Con kontrollerek forgatást és gombbevitelt biztosítanak. A képeket ezen az eszközön dolgozzák fel, és soha nem mentik vagy küldik el.</string> + <string name="hand_camera_rear">Hátlapi kamera</string> + <string name="hand_camera_rear_hint">Ajánlott. Általában élesebb és szélesebb látószögű.</string> + <string name="hand_camera_front">Előlapi kamera</string> + <string name="hand_camera_front_hint">Ha az eszköz hátlapja nem fordítható Ön felé.</string> + <string name="hand_camera_allow">Kamera használata</string> + <string name="hand_camera_not_now">Most nem</string> + <string name="hand_camera_setting">Kézkövetés kamerával</string> + <string name="hand_camera_setting_hint">Használd a telefon kameráját puszta kézzel végzett mozdulatokhoz vagy a párosított Joy-Con kontrollerek pozicionálásához VR-ban. A Joy-Con kontrollerek forgatást és gombbemeneteket biztosítanak. Szünetel, amíg az okosszemüveg követi a kezeidet vagy a Joy-Con kontrollereket. A képek feldolgozása csak ezen az eszközön történik.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Kamerahozzáférés</string> + <string name="hand_camera_access_hint">Engedélyezze a kamerahozzáférést, hogy elindulhasson a kézkövetés.</string> + <string name="hand_camera_access_denied">A kamerahozzáférés ki van kapcsolva. Kapcsolja be az Android beállításaiban.</string> + <string name="hand_camera_allow_button">Engedélyezés</string> + <string name="hand_camera_open_settings">Beállítások megnyitása</string> + <string name="hand_camera_placement">Kamera elhelyezése</string> + <string name="hand_camera_placement_hint">Játék előtt ellenőrizze, hogy a kamera látja-e Önt.</string> + <string name="hand_camera_check">Ellenőrzés</string> + <string name="hand_camera_check_title">Kamera elhelyezése</string> + <string name="hand_camera_how_rear">Állítsa az eszközt függőlegesen 1,5–2 méter távolságra, nagyjából mellkasmagasságban úgy, hogy a hátlapi kamera Ön felé nézzen. Ezután lépjen a látótérbe kinyújtott kezekkel.</string> + <string name="hand_camera_how_front">Állítsa az eszközt függőlegesen 1,5–2 méter távolságra, nagyjából mellkasmagasságban úgy, hogy a képernyő Ön felé nézzen. Ezután lépjen a látótérbe kinyújtott kezekkel.</string> + <string name="hand_camera_starting">Kamera indítása…</string> + <string name="hand_camera_stand_up">Az eszköz laposan fekszik. Állítsa fel úgy, hogy a kamera Ön felé nézzen.</string> + <string name="hand_camera_upright">Állítsa az eszközt még függőlegesebbre, hogy a kamera Ön felé nézzen.</string> + <string name="hand_camera_not_seen">Még nem látja Önt. Lépjen a látótérbe úgy, hogy a feje és a válla is látszódjon.</string> + <string name="hand_camera_move_back">Lépjen hátrébb egy kicsit.</string> + <string name="hand_camera_move_closer">Jöjjön egy kicsit közelebb.</string> + <string name="hand_camera_show_hands">Nyújtsa ki mindkét kezét oda, ahol a kamera látja őket.</string> + <string name="hand_camera_good">Jól néz ki.</string> + <string name="hand_camera_failed">A kamera indítása nem sikerült. Zárja be a többi, azt használó alkalmazást, és próbálja újra.</string> + <string name="hand_camera_switch">Kamera váltása</string> + <string name="hand_camera_skip">Kihagyás</string> + <string name="hand_camera_done">Kész</string> + <string name="glasses_xreal_network_missing">Várakozás a szemüveg USB-s Ethernet-kapcsolatára. Lehet, hogy ez a telefon nem teszi elérhetővé az alkalmazások számára.</string> + <string name="glasses_xreal_connection_failed">Az XREAL-kapcsolat megszakadt, vagy nem támogatott választ adott. Újrapróbálkozás…</string> + <string name="glasses_xreal_experimental">Kísérleti 1S-támogatás. Használja a Follow módot, és kapcsolja ki a stabilizálást a szemüveg menüjében. A követési irányokat és a megjelenítési módokat még tesztelni kell az eszközön.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard mód</string> + <string name="cardboard_mode_hint">Bal és jobb szem képe telefonos VR-szemüveghez.</string> + <string name="cardboard_source">Kép</string> + <string name="cardboard_source_screen">Virtuális képernyő</string> + <string name="cardboard_source_sbs">Egymás melletti 3D</string> + <string name="cardboard_viewer">Szemüveg</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Lencse nélkül</string> + <string name="cardboard_ipd">Szemtávolság</string> + <string name="cardboard_screen_width">Képernyő szélessége</string> + <string name="cardboard_screen_distance">Képernyő távolsága</string> + <string name="cardboard_head_tracking">Fejkövetés</string> + <string name="cardboard_no_sensor">Ezen az eszközön nincs forgásérzékelő.</string> + <string name="cardboard_recenter">Nézet középre igazítása</string> + <string name="cardboard_recenter_button">Középre</string> + <string name="cardboard_steamvr">SteamVR (kísérleti)</string> + <string name="cardboard_steamvr_install">Telepítés</string> + <string name="cardboard_steamvr_installing">SteamVR letöltése és kicsomagolása…</string> + <string name="cardboard_steamvr_start">Indítás</string> + <string name="cardboard_steamvr_stop">Leállítás</string> + <string name="cardboard_steamvr_unavailable">Ebben a munkamenetben nem érhető el.</string> + <string name="cardboard_steamvr_failed">A SteamVR nem válaszolt; nézd meg a munkamenet naplóját.</string> + <string name="drawer_component_downloads">Összetevők letöltése</string> + <string name="drawer_component_downloads_hint">A letöltések közösek az Összetevők oldallal. Fent válassz egy letöltött verziót, hogy a következő játékindítástól azt használd.</string> + <string name="drawer_component_choose_download">Válassz letöltendő verziót</string> + <string name="stores_fact_developer">Fejlesztő</string> + <string name="stores_fact_publisher">Kiadó</string> + <string name="stores_fact_released">Megjelenés</string> + <string name="stores_hltb_main">Fő történet</string> + <string name="stores_hltb_extras">+ Extrák</string> + <string name="stores_hltb_completionist">Teljes</string> + <string name="stores_hltb_hours">%1$s óra</string> + <string name="stores_hltb_minutes">%1$d perc</string> + <string name="display_picture_position">A kép pozíciója</string> + <string name="display_position_top">Fent</string> + <string name="display_position_bottom">Lent</string> + <string name="display_position_center">Középen (alapértelmezett)</string> + <string name="setup_tab_storage">Tárhely</string> + <string name="storage_measuring">Tárhely mérése…</string> + <string name="storage_measuring_hint">Első alkalommal pár másodpercig tart.</string> + <string name="storage_internal">Belső tárhely</string> + <string name="storage_used_of">%1$s / %2$s használt</string> + <string name="storage_free">%1$s szabad</string> + <string name="storage_droiddeck_uses">A DroidDeck %1$s-t használ. Mérve: %2$s.</string> + <string name="storage_rescanning">újramérés…</string> + <string name="storage_other_apps">Egyéb Android-alkalmazások</string> + <string name="storage_safe_now">Most felszabadítható</string> + <string name="storage_safe_hint">Nem használt futtatókörnyezetek, maradványok, régi naplók</string> + <string name="storage_clean_up">Takarítás…</string> + <string name="storage_session_running">A takarításhoz vagy törléshez állítsd le a munkamenetet. A méretek láthatók maradnak.</string> + <string name="storage_where">Hova kerül</string> + <string name="storage_games">Steam-játékok</string> + <string name="storage_game_data">Játékadatok</string> + <string name="storage_game_data_hint">Prefixek %1$s · workshop %2$s · shaderek %3$s</string> + <string name="storage_tools">Proton és futtatókörnyezetek</string> + <string name="storage_tools_unused">%1$s nem használt</string> + <string name="storage_stores">GOG, Epic és más áruházak</string> + <string name="storage_stores_hint">Távolítsd el őket az Áruházak alatt</string> + <string name="storage_desktop">Asztali alkalmazások</string> + <string name="storage_desktop_hint">Flatpak-alkalmazások és futtatókörnyezetek</string> + <string name="storage_system">Linux rendszer és Steam kliens</string> + <string name="storage_system_hint">Szükséges ahhoz, hogy bármi fusson</string> + <string name="storage_app_data">DroidDeck-adatok</string> + <string name="storage_app_data_hint">Régi munkamenetek naplói %1$s · gyorsítótár · illesztőprogramok</string> + <string name="storage_legend_games">Játékok</string> + <string name="storage_legend_data">Játékadatok</string> + <string name="storage_legend_tools">Proton és futtatókörnyezetek</string> + <string name="storage_legend_stores">Más áruházak</string> + <string name="storage_legend_desktop">Asztali alkalmazások</string> + <string name="storage_legend_system">Linux rendszer</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Takarítás</string> + <string name="storage_clean_up_lede">Itt semmi sem érinti a telepített játékokat vagy a futó letöltéseket.</string> + <string name="storage_nothing_to_clean">Most nincs mit takarítani.</string> + <string name="storage_selected">Kijelölve: %1$s · %2$s → %3$s szabadul fel</string> + <string name="storage_cleaning">Takarítás…</string> + <string name="storage_free_button">%1$s felszabadítása</string> + <string name="storage_freed">%1$s felszabadítva.</string> + <string name="storage_item_runtimes">Nem használt Steam futtatókörnyezetek és Proton</string> + <string name="storage_item_leftovers">Törölt játékok maradványai</string> + <string name="storage_item_leftovers_unsure">Maradványok, amelyek mentéseket tartalmazhatnak</string> + <string name="storage_item_logs">Régi munkamenetek naplói</string> + <string name="storage_item_logs_detail">A jelenlegi munkamenet naplói megmaradnak</string> + <string name="storage_item_custom_detail">Egy játék sem használja. Ha kell, telepítsd újra az Összetevők alatt.</string> + <string name="storage_item_shaders">Telepített játékok shader-gyorsítótára</string> + <string name="storage_item_shaders_detail">Játék közben újraépül. Minden játék első percei újra akadozni fognak.</string> + <string name="storage_tag_safe">Biztonságos</string> + <string name="storage_tag_unused">Nem használt</string> + <string name="storage_tag_stutter">Akadozás</string> + <string name="storage_tag_saves">Mentések ellenőrzése</string> + <string name="storage_tag_default">Alapértelmezett</string> + <string name="storage_tag_required">Szükséges</string> + <string name="storage_tag_not_used">Nem használt</string> + <string name="storage_back">Tárhely</string> + <string name="storage_games_with_data">%1$s az adataikkal</string> + <string name="storage_sort_largest">Legnagyobb</string> + <string name="storage_sort_least_played">Legkevesebbet játszott</string> + <string name="storage_sort_sd">SD-kártyán</string> + <string name="storage_no_games">Itt nincsenek játékok.</string> + <string name="storage_played">játszva: %1$s</string> + <string name="storage_never_played">Sosem játszott</string> + <string name="storage_game_parts">Játék %1$s · adatok %2$s</string> + <string name="storage_uninstall">Eltávolítás</string> + <string name="storage_games_note">Az eltávolítás megnyitja a Steam ablakát, hogy a Steam nyilvántartsa. A játék SD-kártyára mozgatásához használd a Steam › Beállítások › Tárhely menüpontot.</string> + <string name="storage_uninstall_title">Eltávolítod ezt: %1$s?</string> + <string name="storage_uninstall_body">A Steam megnyílik és megerősítést kér. Ez felszabadítja a játék %1$s-ját. A prefix a maradványok takarításáig megmarad, a Steam Cloud mentések pedig a fiókodban maradnak.</string> + <string name="storage_open_steam">Steam megnyitása</string> + <string name="storage_tools_detail">%1$s · %2$s nem használt</string> + <string name="storage_remove_unused">Nem használtak eltávolítása · %1$s</string> + <string name="storage_in_use">Használatban</string> + <string name="storage_not_used">Nem használt</string> + <string name="storage_remove">Eltávolítás</string> + <string name="storage_remove_title">Eltávolítod ezt: %1$s?</string> + <string name="storage_remove_body">Felszabadít %1$s-t. A Steam újra letölti, ha egy játéknak kell.</string> + <string name="storage_tool_fex_runtime">Linux x86-os játékokhoz kell (FEX)</string> + <string name="storage_tool_arm_runtime">ARM64-es Protonokhoz kell</string> + <string name="storage_tool_redist">A játékokhoz szükséges VC++ és DirectX telepítések</string> + <string name="storage_tool_fex">Linux x86-os játékokat futtat</string> + <string name="storage_tool_steam">Steam-eszköz</string> + <string name="storage_tool_old_runtime">A DroidDeck e futtatókörnyezet nélkül futtat játékokat</string> + <string name="storage_tool_x86_proton">Proton x86, amit a DroidDeck nem tud futtatni</string> + <string name="storage_tool_custom_default">Alapértelmezett minden játéknak</string> + <string name="storage_tool_custom_unused">Egy játék sem használja</string> + <string name="storage_tool_custom_unknown">A Steam beállításai nem olvashatók, ezért megmarad</string> + <string name="storage_cleanup_busy">Várd meg a tárhelytakarítás végét</string> + <string name="storage_low_title">Csak %1$s szabad</string> + <string name="storage_low_body">A Steamnek hely kell a frissítésekhez és a shader-gyorsítótárhoz. 10 GB alatt a játékfrissítések félúton meghiúsulhatnak.</string> + <string name="storage_low_safe">%1$s biztonságosan felszabadítható.</string> + <string name="storage_free_up">Hely felszabadítása</string> + <string name="storage_play_anyway">Játék így is</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d telepítve</item> + <item quantity="other">%d telepítve</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d SD-kártyán</item> + <item quantity="other">%d SD-kártyán</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d eszköz</item> + <item quantity="other">%d eszköz</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Üres prefixmappák és shader-gyorsítótár %d játékból</item> + <item quantity="other">Üres prefixmappák és shader-gyorsítótár %d játékból</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">%d játék prefixe még tartalmaz fájlokat, köztük helyi mentéseket. Ha kellenek, előbb készíts másolatot.</item> + <item quantity="other">%d játék prefixe még tartalmaz fájlokat, köztük helyi mentéseket. Ha kellenek, előbb készíts másolatot.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d játék</item> + <item quantity="other">%d játék</item> + </plurals> + <string name="storage_tool_default_proton">A DroidDeck alap Protonja</string> + <string name="storage_tool_proton">A DroidDeck Proton 11 lehetősége</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d játék használja</item> + <item quantity="other">%d játék használja</item> + </plurals> + <string name="storage_legend_components">Összetevők</string> + <string name="storage_components">Összetevők</string> + <string name="storage_item_components">Nem használt összetevők</string> + <string name="storage_component_original">Eredeti %1$s · %2$s</string> + <string name="storage_original_confirm">Felszabadít %1$s-t. Csak olyan Proton-verziót tesz vissza, amely már nincs telepítve.</string> + <string name="storage_leftovers_unchecked">Nincs ellenőrizve: egy Steam-alkalmazás manifesztje nem olvasható, ezért a törölt játékok prefixei addig megmaradnak.</string> + <string name="storage_failed">Sikertelen: %1$s</string> + <string name="storage_desktop_shared">%1$s megosztva</string> + <string name="storage_data_installed">Telepített játékok</string> + <string name="storage_data_parts">Prefix %1$s · shaderek %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Shaderek törlése</string> + <string name="storage_data_leftovers">Törölt játékok</string> + <string name="storage_steam_app">Steam-alkalmazás %1$d</string> + <string name="storage_leftover_unsure_detail">A prefix még tartalmaz fájlokat, talán helyi mentéseket</string> + <string name="storage_leftover_confirm">Törli a Wine prefixet és a shader-gyorsítótárat (%1$s). Előbb készíts másolatot a szükséges mentésekről; a Steam Cloud mentések a fiókodban maradnak.</string> + <string name="storage_data_other">Megtartva</string> + <string name="storage_data_other_title">Nem Steam-es játékok és a megosztott Steam prefix</string> + <string name="storage_data_other_detail">Áruházból vagy kézzel hozzáadott játékok prefixei</string> + <string name="storage_components_packages">Letöltött csomagok</string> + <string name="storage_components_originals">Megtartott eredetiek</string> + <string name="storage_components_none">Nincs letöltött összetevő-csomag.</string> + <string name="storage_component_in_use">Protonhoz vagy játékhoz kiválasztva</string> + <string name="storage_component_unused">Sehol nincs kiválasztva</string> + <string name="storage_original_kept">Visszateszi a telepített Protont</string> + <string name="storage_original_old">Már nem telepített Proton-verzió</string> + <string name="storage_tag_in_use">Használatban</string> + <string name="storage_components_note">A használatban lévő összetevők zárolva maradnak. Az Összetevők alatt válaszd ki őket; amit itt eltávolítasz, azt ott újra letöltheted.</string> + <string name="storage_component_confirm">Felszabadít %1$s-t. A saját magad által importált csomagok nem tölthetők le újra.</string> + <string name="storage_desktop_detail">%1$s a Flatpak-alkalmazásokhoz és amit megosztanak</string> + <string name="storage_desktop_apps_title">Alkalmazások</string> + <string name="storage_desktop_none">Nincs telepített Flatpak-alkalmazás.</string> + <string name="storage_desktop_shared_title">Az alkalmazások megosztják</string> + <string name="storage_desktop_runtimes">Futtatókörnyezetek</string> + <string name="storage_desktop_runtimes_detail">A könyvtárak, amelyeken az alkalmazások futnak; a nem használtak a Nem használtak eltávolítása paranccsal távoznak</string> + <string name="storage_desktop_cache">Letöltési tárhely</string> + <string name="storage_desktop_cache_detail">A Flatpak objektumtára és letöltött gyorsítótára</string> + <string name="storage_desktop_prune">Nem használtak eltávolítása</string> + <string name="storage_desktop_prune_body">Eltávolítja azokat a futtatókörnyezeteket, amelyekre egyetlen telepített alkalmazásnak sincs szüksége, és rendezi a Flatpak objektumtárát. A telepített alkalmazások tovább működnek.</string> + <string name="storage_flatpak_uninstall_body">Eltávolítja az alkalmazást (%1$s) és azokat a futtatókörnyezeteket, amelyeket más nem használ. A saját mappádban lévő adatok megmaradnak.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d csomag</item> + <item quantity="other">%d csomag</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d alkalmazás</item> + <item quantity="other">%d alkalmazás</item> + </plurals> + <string name="boot_movie">Indítóvideó</string> + <string name="boot_movie_video">Videó</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">A 60 fps simább, de jobban terheli a processzort a Steam indulása közben. A Steam saját beállításaiban választott indítóvideó elsőbbséget élvez.</string> + <string name="boot_movie_sound">Hang</string> + <string name="boot_movie_custom">Saját videó</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV vagy WebM. Más formátumokat és a %1$d MB-nál nagyobb fájlokat az eszköz 720p WebM-re alakítja, legfeljebb %2$d másodpercig.</string> + <string name="boot_movie_import">Importálás</string> + <string name="boot_movie_remove">Eltávolítás</string> + <string name="boot_movie_pick">Válassz indítóvideót</string> + <string name="boot_movie_imported">Mostantól %1$s az indítóvideó</string> + <string name="boot_movie_imported_silent">Mostantól %1$s az indítóvideó, hang nélkül</string> + <string name="boot_movie_too_long">Az átalakítandó videó legfeljebb %1$d másodperces lehet</string> + <string name="boot_movie_converting">Átalakítás %1$d%%</string> + <string name="boot_movie_converting_started">%1$s átalakítása a Steamhez. Hagyd nyitva a DroidDecket.</string> + <string name="boot_movie_unsupported">Ez az eszköz nem tudja dekódolni a videót.</string> + <string name="boot_movie_import_failed">Nem sikerült importálni a videót</string> + <string name="glasses_experimental">Luma Ultra kamerák — Kísérleti</string> + <string name="glasses_joycons">Joy-Con pozíciókövetés</string> + <string name="glasses_joycons_hint">Használd az okosszemüveg kameráit a párosított Joy-Con kontrollerek pozicionálásához. A forgatás és a gombbemenetek a Joy-Con kontrollerekről származnak. A pozíció akkor becsült, amikor a csuklód rejtve van. Helyettesíti a puszta kézzel működtetett kontrollereket, és szünetelteti a telefonkamera követést. Irányítsd a Joy-Con kontrollereket előre a követőközpont csatlakoztatásakor vagy visszaállításakor.</string> + <string name="glasses_joycons_requires_position">Először engedélyezd a pozíciókövetést. Mozgásérzékelős Joy-Con kontrollereket igényel Android 12-es vagy újabb rendszeren. Alapértelmezés szerint ki van kapcsolva.</string> + <string name="setup_tab_glasses">Okosszemüveg</string> + <string name="setup_glasses_scope">A kijelző és a fejkövetés beállításai megoszlanak a DroidDeck menükben, játékokban és asztali munkamenetekben.</string> + <string name="setup_glasses_connect">Csatlakoztasd az okosszemüveget a kijelző és a követés beállításainak módosításához. A mentett beállítások a leválasztáskor is megmaradnak.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Kijelző mód</string> + <string name="glasses_output_2d">2D kimenet</string> + <string name="glasses_output_3d">3D kimenet</string> + <string name="glasses_picture_group">Kép és virtuális képernyő</string> + <string name="glasses_position_group">Pozíció és padlószint</string> + <string name="glasses_hands_group">Kezek követése — Kísérleti</string> + <string name="glasses_tracking_status">Követési állapot</string> + <string name="glasses_resolution_2d">2D felbontás</string> + <string name="glasses_resolution_3d">3D felbontás</string> + <string name="glasses_resolution_vr">VR felbontás</string> + <string name="glasses_resolution_auto">Automatikus</string> + <string name="glasses_resolution_inherit">Ugyanaz, mint a 2D / 3D</string> + <string name="glasses_resolution_hint">Kimeneti felbontás szemenként.</string> + <string name="glasses_refresh_30_hint">Engedélyezze a Játék okosszemüvegen funkciót a kijelző natív 30 Hz-es módjának kiválasztásához.</string> + <string name="glasses_3dof_hint">Lapos játékok rögzítése előtted, hogy körülnézhess. Engedélyezi a Játék okosszemüvegen funkciót 3D-re váltás nélkül.</string> + <string name="glasses_screen_app_wide">A szélesség és távolság azonnal frissíti a követett virtuális képernyőt a DroidDeck menükben, játékokban és asztali munkamenetekben.</string> + <string name="glasses_head_tracking_spatial_vr_hint">A pozíciókövetés magában foglalja a fej elforgatását a SteamVR-ben. Csak elforgatásos követéshez kapcsolja ki a pozíciókövetést.</string> + <string name="glasses_head_tracking_spatial_hint">A fej mozgását vezérli a virtuális képernyőn. A pozíciókövetés magában foglalja a fej elforgatását a SteamVR-ben.</string> + <string name="glasses_quick_actions">Gyors műveletek</string> + <string name="glasses_recenter_screen_hint">Nézz oda, ahová a képernyőt szeretnéd helyezni, majd állítsd vissza a követőközpontot a magasság és az irány beállításához.</string> + <string name="glasses_recenter_joycons_button">Joy-Con újraközpontosítása</string> + <string name="phone_camera_tracking_group">Telefonkamera — Kísérleti</string> + <string name="phone_camera_tracking_setting">Kezek vagy Joy-Con kontrollerek követése</string> + <string name="glasses_position">Pozíciókövetés — kísérleti</string> + <string name="glasses_position_hint">Fizikai mozgás VR-ban és virtuális képernyők körül. A követés újraindítása eltart egy ideig.</string> + <string name="glasses_eye_height">Aktuális szemmagasság a padló felett</string> + <string name="glasses_floor">Padlószint beállítása az aktuális magasság alapján</string> + <string name="glasses_floor_set">Padlószint beállítása</string> + <string name="glasses_spatial_setup">Sztereó kamera beállítása és diagnosztika</string> + <string name="glasses_spatial_setup_hint">Játék előtt ellenőrizze a kamera kalibrálását és a kézkövetést.</string> + <string name="glasses_spatial_open">Beállítás megnyitása</string> + <string name="glasses_hands">Puszta kézzel működtetett kontrollerek</string> + <string name="glasses_hands_hint">Használja az okosszemüveg kameráit a kezeivel való célzáshoz, csíptesse össze a kattintáshoz és zárja össze a kezét a megfogáshoz VR-ban. A gamepad botjai mozognak és forognak. Helyettesíti a Joy-Con pozíciókövetést. Játék közben késleltetheti vagy elveszítheti a követést.</string> + <string name="glasses_hands_ready_hint">Engedélyezze a puszta kézzel működtetett kontrollereket a Luma Ultra kamerák alatt a Követés módban. Először mutassa a nyitott kezeket.</string> + <string name="glasses_hands_base">Megosztott Luma Ultra kalibrálás</string> + <string name="glasses_hands_base_hint">A megosztott Luma Ultra talp használata. Kalibrálja saját okosszemüvegét a pontosság ellenőrzéséhez.</string> + <string name="glasses_hands_calibration_verified">Mért kalibráció ellenőrizve</string> + <string name="glasses_hands_calibration_required">Érvényesítés szükséges</string> + <string name="glasses_hands_calibration_required_hint">A puszta kézzel működtetett kontrollerek a mért távolság ellenőrzésének sikeres elvégzése után válnak elérhetővé.</string> + <string name="tracking_recovery_lost">Elveszett a követés</string> + <string name="tracking_recovery_look">Nézzen körül lassan egy jól megvilágított szobában.\nTartsa távol a követőkamerákat, és nézzen szembe a bútorokkal vagy más látható részletekkel.</string> + <string name="tracking_recovery_restart_help">Még mindig elakad? A telefonon: okosszemüveg → Követés → Beállítás megnyitása → Diagnosztika megjelenítése → Nyomon követés újraindítása.</string> + <string name="tracking_recovery_disconnected">Az intelligens szemüvegek leválasztva</string> + <string name="tracking_recovery_connect">Ellenőrizze az USB-kapcsolatot, és csatlakoztassa újra az okosszemüveget.\nHa megjelenik, fogadja el az USB-hozzáférési felszólítást a telefonon.</string> + <string name="tracking_recovery_usb_help">Csatlakozás után lassan nézzen körül egy jól megvilágított szobában a követés helyreállításához.</string> + <string name="tracking_recovery_recenter">Újraközpontosítás szükséges</string> + <string name="tracking_recovery_recenter_steps">A követés visszatért egy új pozícióba.\nNézz előre, majd koppints a Követőközpont visszaállítása gombra a telefonodon.</string> + <string name="tracking_recovery_recenter_help">A követőközpont visszaállítása funkciót az okosszemüveg → Követés → Beállítás megnyitása menüpontban is megtalálhatja. A mentett kamerakalibráció megmarad.</string> + <string name="tracking_recovery_stabilizing">Maradjon mozdulatlanul egy pillanatra</string> + <string name="tracking_recovery_hold">A követőközpont visszaállítása folyamatban van.\nTartsa az okosszemüveget mozdulatlanul, amíg a követés beáll.</string> + <string name="tracking_recovery_automatic">Ez a képernyő automatikusan bezárul, amikor a fejkövetés készen áll.</string> + <string name="glasses_steady_hand_aim">Stabilizált célzás kézzel</string> + <string name="glasses_steady_hand_aim_hint">Célozzon a válláról a tenyerén keresztül. Kapcsolja ki a csuklóval vezérelt forgatáshoz.</string> + <string name="spatial_title">Térbeli beállítások</string> + <string name="spatial_wait_tracking">Várakozás a követésre…</string> + <string name="spatial_cameras_description">Bal és jobb követési kamera</string> + <string name="spatial_camera_sync">Kamera szinkronizálás</string> + <string name="spatial_ready">Kész</string> + <string name="spatial_sync_hint">Várakozás, amíg a kamera és a fejkövetés összeáll. Tartsa csatlakoztatva az okosszemüveget.</string> + <string name="spatial_prepare">1. Készítse elő a kalibrációs célt</string> + <string name="spatial_print_actual">Nyomtatás tényleges méretben</string> + <string name="spatial_print_hint">Minden négyzetnek 30 mm-nek (1,181 hüvelyk) kell lennie. Szerelje fel a lapot merev felületre, jól megvilágított helyen.</string> + <string name="spatial_print">Kalibrációs minta nyomtatása</string> + <string name="spatial_capture_group">2. Különböző nézetek rögzítése</string> + <string name="spatial_board_stationary">Tartsa mozdulatlanul a kalibrációs célt</string> + <string name="spatial_capture_hint">Vigye közelebb az intelligens szemüveget, távolabb és oldalra. Forgassa balra/jobbra, döntse fel/le, és döntse oldalra. Tartsa a kalibrációs célt mindkét kamerában, és minden rögzítés előtt álljon meg egy rövid ideig.</string> + <string name="spatial_start">Indítsa el az új kalibrálást</string> + <string name="spatial_wait_sync">Várakozás a kamera szinkronizálására.</string> + <string name="spatial_start_hint">Indítson el egy új kalibrálást a nézetek összegyűjtéséhez.</string> + <string name="spatial_views_hint">Tartsa láthatóan a kalibrációs célt mindkét előnézetben. Rögzítsen legalább 24 éles képet különböző szögekből.</string> + <string name="spatial_capturing">Rögzítés…</string> + <string name="spatial_capture">Kalibrációs célnézet rögzítése</string> + <string name="spatial_alignment">Számítsa ki a kamera beállítását</string> + <string name="spatial_calculating">Számítás…</string> + <string name="spatial_calculate">Számítsa ki a kalibrációt</string> + <string name="spatial_distance_group">3. Ellenőrizze a távolságot</string> + <string name="spatial_distance">Mért távolság</string> + <string name="spatial_distance_hint">Kezdje 12 hüvelykkel vagy 30 cm-rel, hogy a nyomtatott jelölők könnyebben felismerhetők legyenek. Válassza ki a használni kívánt pontos méretet.</string> + <string name="spatial_camera_board_distance">A bal kamera és a kalibrációs céltábla középpontja közötti távolság</string> + <string name="spatial_checking_distance">Távolság ellenőrzése…</string> + <string name="spatial_validate">Távolság érvényesítése</string> + <string name="spatial_diagnostics">Diagnosztika</string> + <string name="spatial_show_diagnostics">Diagnosztika megjelenítése</string> + <string name="spatial_diagnostics_hint">Kamera időzítési és nyomkövetési helyreállítási eszközök.</string> + <string name="spatial_camera_timing">Kamera időzítése</string> + <string name="spatial_hand_input">Bemenet a kezek követéséből</string> + <string name="spatial_wait_timing">Várakozás a kameraidőzítésre.</string> + <string name="spatial_frames">Kameraképek</string> + <string name="spatial_gpu">A kezek GPU-felismerése</string> + <string name="spatial_gpu_hint">A CPU az alapértelmezett. A GPU kísérleti jellegű, és a SteamVR újraindítását okozhatja. Ez a választás visszaáll a követés újraindításakor.</string> + <string name="spatial_lite">Kézmodellek egyszerű észlelése</string> + <string name="spatial_lite_hint">Használja a Lite tenyérérzékelőt és a Lite kulcspontokat a kezeken. Ellenőrizze a célzás, a szorítás és a megfogás pontosságát. Visszaállítja a követés újraindulásakor.</string> + <string name="spatial_adaptive">Automatikus bemeneti frekvencia a kezek nyomon követéséhez</string> + <string name="spatial_adaptive_hint">Állítsa be a bemenetet a feldolgozási sebességhez. Visszaállítja a követés újraindulásakor.</string> + <string name="spatial_half_rate">Korlátozza a bemeneti frekvenciát a kezek követéséhez</string> + <string name="spatial_half_rate_hint">A kameraképek felét használja. A maximális frekvencia összehasonlításához kapcsolja ki. Visszaállítja a követés újraindulásakor.</string> + <string name="spatial_diagnostic_capture">Diagnosztikai rögzítés</string> + <string name="spatial_diagnostic_capture_hint">Mentse el egy sztereó képpárt helyileg. A képek csak kérésre kerülnek mentésre.</string> + <string name="spatial_save_frame">Kamerakép mentése</string> + <string name="spatial_restart_tracking">Indítsa újra a követést</string> + <string name="spatial_restart_hint">Akkor használja, ha a követés nem áll helyre jól megvilágított területen. Az újraindításhoz új nyomkövetési eredetre van szükség.</string> + <string name="spatial_restart">Indítsa újra</string> + <string name="spatial_restart_title">Újraindítja a követést?</string> + <string name="spatial_restart_confirm">A nem mentett kalibrációs nézetek elvesznek. Tartsa mozdulatlanul az okosszemüveget, és állítsa vissza a követőközpontot, amikor a követés helyreállt.</string> + <string name="spatial_views_count">%1$d / 24 megtekintés</string> + <string name="spatial_capture_paused">A rögzítés szünetel: %1$s</string> + <string name="spatial_measure_hint">%1$s. intézkedés. Jelenítse meg a teljes kalibrációs célt mindkét előnézetben, majd tartsa mozdulatlanul.</string> + <string name="spatial_timing_values">%1$.1f Hz • kép kora %2$.1f ms • feldolgozás %3$.1f ms</string> + <string name="spatial_input_values">Bemeneti korlát %1$.1f Hz • %2$.0f%% kamerakép. A fejkövetés a maximális frekvencián folytatódik.</string> + <string name="spatial_frame_counts">%1$d feldolgozva • %2$d elvetve • %3$d kihagyva a beviteli korlát miatt</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck – Luma Ultra kalibrálás</string> + <string name="spatial_print_scale" formatted="false">Nyomtatás 100%/Tényleges méretben. Mindegyik négyzet: 30 mm (1,181 hüvelyk).</string> + <string name="spatial_print_stationary">Tartsa a kalibrációs célt síkban és álló helyzetben; mozgassa az okosszemüveget a felvételek között.</string> + <string name="spatial_print_check">Skálaellenőrzés: 100 mm (3,937 hüvelyk) a jelölések között</string> + <string name="spatial_distance_12in">12 hüvelyk (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 hüvelyk)</string> + <string name="spatial_distance_20in">20 hüvelyk (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 hüvelyk)</string> + <string name="spatial_disabled">Letiltva</string> + <string name="spatial_wait_stable">Várakozás a stabil követésre</string> + <string name="spatial_disconnected">Lekapcsolva</string> + <string name="spatial_hands_off">A puszta kézzel működtetett vezérlők ki vannak kapcsolva</string> + <string name="spatial_tracking_off">A helyzetkövetés ki van kapcsolva, vagy az intelligens szemüvegek le vannak választva</string> + <string name="spatial_recenter_pending">Követőközpont visszaállítása kérve – tartsa mozdulatlanul, amíg a követés stabilizálódik.</string> + <string name="spatial_tracking_lost">A követés elveszett – nézzen szembe egy jól megvilágított területtel, látható részletekkel</string> + <string name="spatial_origin_changed">A követés kezdőpontja megváltozott – koppintson a követőközpont visszaállítására, majd tartsa mozdulatlanul.</string> + <string name="spatial_active">6DoF aktív</string> + <string name="spatial_connect_hint">Csatlakoztassa a Luma Ultra-t és engedélyezze a helyzetkövetést.</string> + <string name="spatial_validation_session">Ehhez a kapcsolathoz a kalibráció ellenőrizve.</string> + <string name="spatial_validation_saved">A kalibráció ellenőrizve és mentve.</string> + <string name="spatial_wait_cameras">Várakozás a sztereó kamerákra</string> + <string name="spatial_wait_hands">Várakozás a kezek nyomon követésére</string> + <string name="spatial_collect_instructions">Tartsa mozdulatlanul az 5 × 7 kalibrációs célt. Rögzítsen 24+ nézetet az okosszemüveg mozgatása és forgatása közben.</string> + <string name="spatial_capture_pending">Várakozás a következő kameraképre. Tartsa mozdulatlanul az okosszemüveget.</string> + <string name="spatial_validation_pending">A következő kamerakép ellenőrzése. Tartsa láthatóan a teljes kalibrációs célt, és tartsa mozdulatlanul.</string> + <string name="spatial_start_first">Először indítsa el a kalibrálást</string> + <string name="spatial_no_camera_frame">Nem érkezett friss kamerakép. Ellenőrizze az okosszemüveg csatlakozását és a kamera előnézetét, majd próbálkozzon újra.</string> + <string name="spatial_clock_reset">A kamera órájának visszaállítása</string> + <string name="spatial_frame_changed">A követési koordinátarendszer megváltozott. A nézetek mentésre kerültek az újraszámításhoz. Állítsa vissza a követőközpontot, majd indítson új sorozatot további nézetek rögzítéséhez.</string> + <string name="spatial_device_loaded">eszközkalibráció betöltve</string> + <string name="spatial_base_loaded">A Luma Ultra alapkalibráció betöltve</string> + <string name="spatial_calibration_needed">kalibrálás szükséges</string> + <string name="spatial_tap_start">Érintse meg az Új kalibrálás indítása elemet először.</string> + <string name="spatial_capture_recenter_pending">A követőközpont visszaállítása funkció stabil követést vár. Tartsa mozdulatlanul egy pillanatig.</string> + <string name="spatial_capture_recenter">A követés megváltozott. Koppintson egyszer a követőközpont visszaállítására, majd tartsa mozdulatlanul a rögzítés előtt.</string> + <string name="spatial_capture_unsynchronized">Rögzítés elutasítva: a fejkövetés nem lett szinkronizálva vagy módosult a rögzítés során. Maradjon nyugton, és próbálja újra.</string> + <string name="spatial_align_first">Számítsa ki a kamera beállítását a távolság ellenőrzése előtt.</string> + <string name="spatial_processing_failed">A kamera feldolgozása nem sikerült</string> + <string name="spatial_hand_head_changed">A fejkövetés megváltozott a kezek észlelése során</string> + <string name="spatial_hand_wait_sync">Várakozás a kamera és a fej szinkronizálására</string> + <string name="spatial_no_wrists">Nem észleltek csuklót. Tartsa a Joy-Con kontroller fogantyúit az okosszemüveg előtt</string> + <string name="spatial_no_hands">Nem észleltek kezet. Mutasson nyitott tenyeret az okosszemüveg előtt</string> + <string name="spatial_one_camera_wrists">A csukló csak egy kamerában látható; tartsa a vezérlő fogantyúit a megosztott nézetben</string> + <string name="spatial_one_camera_hands">A kezek csak egy kamerában láthatók; tartsa mindkét tenyerét megosztott nézetben</string> + <string name="spatial_ambiguous_hands">Mindkét kamera látja a kezeket, de a bal/jobb párosítás kétértelmű</string> + <string name="spatial_inconsistent_depth">Kezek észlelve, de a sztereó mélység nem következetes</string> + <string name="spatial_rejected_wrist">Sztereó vagy mozgásellenőrzések által elutasított csuklóhelyzet</string> + <string name="spatial_inconsistent_palm">Sztereópontok észlelve, de a tenyér geometriája inkonzisztens</string> + <string name="spatial_hands_need_calibration">Végezze el a kalibrálást és a távolságellenőrzést a kezek engedélyezéséhez</string> + <string name="spatial_hands_wait_stable">Várakozás stabil fejkövetésre; szükség esetén állítsa vissza a követőközpontot.</string> + <string name="spatial_old_frame">A kamerás megfigyelés túl régi; friss párra vár</string> + <string name="spatial_fit_ready">Fit %1$.2f px. Mérje meg a kiválasztott távolságot a bal oldali kamera és a kalibrációs célközép között, majd érvényesítse.</string> + <string name="spatial_opencv_error">Az OpenCV nem érhető el: %1$s</string> + <string name="spatial_restored">%1$d mentett nézet visszaállítva. Számítsa ki a kalibrációt az újrapróbálkozáshoz, vagy indítson új sorozatot, hogy többet rögzítsen.</string> + <string name="spatial_captured">Rögzített %1$d / 24 megtekintés. Tartsa rögzítve a kalibrációs célt; mozgassa az okosszemüveget a következő nézethez.</string> + <string name="spatial_capture_corners">Rögzítés elutasítva: %1$d / 12 szükséges sarok mindkét kamerán látható. Mutasson többet a kalibrációs célból, tartsa mozdulatlanul, majd próbálja újra.</string> + <string name="spatial_validation_error">A távolságellenőrzést nem sikerült befejezni: %1$s. Próbáld újra.</string> + <string name="spatial_inference_error">A kezek észlelése nem érhető el: %1$s. Az újrapróbálkozáshoz cserélje ki a CPU/GPU-t, vagy váltson puszta kézzel működtetett vezérlőket.</string> + <string name="spatial_hand_timeout">A kezek észlelése meghaladja a %1$d ms-ot; a megfigyelést elvetették</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con csuklópozíció sztereóval mérve</string> + <string name="spatial_palms_tracked">Követett tenyerek: %1$d / 2; csippentésre kész: %2$d; megfogásra kész: %3$d</string> + <string name="spatial_capture_saved">Diagnosztikai rögzítés mentve ide: %1$s</string> + <string name="spatial_hand_error">Leállított kezek követése: %1$s</string> + <string name="spatial_stereo_loaded">Sztereó %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">A fejkövetés és a kalibrálási cél %1$s-kal (korlátozás: 5 cm) nem egyezik. Tartsa rögzítve a kalibrációs célt, és várja meg a folyamatos követést, mielőtt új sorozatot kezdene. Finoman fordítsa és döntse meg az intelligens szemüveget; szünetet minden rögzítés előtt.</string> + <string name="spatial_need_views">Rögzítsen legalább 24 különböző nézetet az álló kalibrációs célpontról.</string> + <string name="spatial_need_rotation">Forgassa balra és jobbra az intelligens szemüveget, majd döntse fel és le; a forgatás nélküli mozgás nem tudja kalibrálni a kamera beállítását.</string> + <string name="spatial_bad_baseline">Valószínűtlen kamera alapvonal</string> + <string name="spatial_need_orientations">Mozgassa fejét változatosabb tájolásokon.</string> + <string name="spatial_bad_rotation">Érvénytelen kamera-fej elforgatás</string> + <string name="spatial_bad_alignment">A kamera-fej igazítás nem következetes.</string> + <string name="spatial_calibration_error">A kalibrálást nem sikerült befejezni. %1$s A rögzített nézetek mentésre kerülnek.</string> + <string name="spatial_reprojection_error">Kitartott újravetítési hiba %1$.2f px meghaladja a 2 képpontot. Újrakalibrálás.</string> + <string name="spatial_distance_corners">%1$d / 24 sakktábla-sarkot észleltünk mindkét kamerában. Tartsa láthatóan a teljes kalibrációs célt, és tartsa mozdulatlanul. Ha már látható, válassza ki a 12 hüvelyk vagy a 30 cm-t, és mérje meg a közelebbi távolságot, mielőtt újra próbálkozna.</string> + <string name="spatial_distance_depth">A kalibrációs cél látható, de a mélysége nem mérhető megbízhatóan. Tartsa mozdulatlanul az intelligens szemüveget, és tartsa a kalibrációs célt síkban és jól megvilágítva, majd próbálkozzon újra.</string> + <string name="spatial_distance_invalid">A kamera mérése érvénytelen volt. Maradjon nyugton, és próbálja újra.</string> + <string name="spatial_distance_passed">A távolság ellenőrzése sikeres.</string> + <string name="spatial_distance_retry">Ellenőrizze újra a bal oldali kamera és a kalibrációs célpont közötti távolságot, majd próbálkozzon újra.</string> + <string name="spatial_distance_result">Mért kamerák: %1$s; kiválasztott távolság %2$s. %3$s</string> + <string name="spatial_wait_previews">A kalibrálás megkezdése előtt várja meg mindkét kamera előnézetét.</string> + <string name="spatial_saved_views_hint">Az elmentett nézetek újraszámíthatók. Indítson el egy új kalibrálást, hogy rögzítse az aktuális követési koordináta-rendszerben.</string> + <string name="spatial_model_checksum_error">A kézi modell ellenőrzőösszegének eltérése</string> + <string name="spatial_opencv_load_error">Az OpenCV betöltése nem sikerült</string> + <string name="glasses_3dof">3DoF virtuális képernyő</string> + <string name="glasses_6dof">6DoF virtuális képernyő</string> +</resources> diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml new file mode 100644 index 0000000000..8aee58b539 --- /dev/null +++ b/app/src/main/res/values-in/strings.xml @@ -0,0 +1,2862 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Grafis SteamVR berhenti</string> + <string name="steamvr_recovery_countdown">DroidDeck akan dimulai ulang dalam %1$d detik untuk mereset grafis dan membuka kembali SteamVR. Game Anda yang sedang berjalan akan ditutup; progres yang belum disimpan tidak dapat dipulihkan.</string> + <string name="steamvr_recovery_repeated">Gangguan grafis muncul lagi setelah mulai ulang baru-baru ini. Pemulihan otomatis dijeda agar tidak terjadi pengulangan terus-menerus. Memulai ulang akan menutup game Anda; progres yang belum disimpan tidak dapat dipulihkan.</string> + <string name="steamvr_recovery_restart">Mulai ulang sekarang</string> + <string name="steamvr_recovery_cancel">Biarkan terbuka</string> + <string name="steamvr_recovery_restarting">Mereset grafis dan membuka kembali SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck tidak bisa dimulai ulang secara otomatis. Tutup aplikasi sepenuhnya, lalu buka lagi.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Proses pertama mengunduh Steam. Ini mungkin memerlukan beberapa menit.</item> + <item>Secara default, keluar dari aplikasi akan menjeda Steam; sesi dilanjutkan dari posisi terakhir saat Anda kembali.</item> + <item>Pengontrol Anda akan terlihat sebagai gamepad Xbox 360. Jika tidak, gunakan kontrol di layar.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Proses pertama menyiapkan desktop. Ini mungkin memerlukan beberapa menit.</item> + <item>Secara default, keluar dari aplikasi akan menjeda sesi; sesi dilanjutkan dari posisi terakhir saat Anda kembali.</item> + <item>Sentuhan berfungsi seperti touchpad: geser untuk menggerakkan penunjuk, ketuk untuk mengeklik.</item> + <item>Pengontrol Anda akan terlihat sebagai gamepad Xbox 360. Jika tidak, gunakan kontrol di layar.</item> + </string-array> + <string name="session_channel">Sesi</string> + <string name="session_channel_description">Ditampilkan saat sesi Steam atau desktop berjalan</string> + <string name="session_notification">Steam berjalan</string> + <string name="session_notification_downloads">Unduhan Steam aktif</string> + <string name="session_notification_paused">Sesi dijeda - ketuk Lanjutkan saat siap</string> + <string name="resume_session">Lanjutkan</string> + <string name="suspend_now">Jeda sekarang</string> + <string name="stop_session">Hentikan sesi</string> + <string name="frame_gen_title">Pembuatan frame</string> + <string name="frame_gen_hint">Pilih mode pembuatan frame</string> + <string name="frame_gen_off">Nonaktif</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptif %1$d</string> + <string name="lsfg_needs_steam">Memerlukan Lossless Scaling di Steam</string> + <string name="lsfg_needs_install">Instal Lossless Scaling di Steam atau impor Lossless.dll</string> + <string name="lsfg_import">Impor Lossless.dll…</string> + <string name="lsfg_using_steam">Menggunakan salinan dari Steam</string> + <string name="lsfg_using_import">Menggunakan salinan yang diimpor</string> + <string name="lsfg_pick_title">Pilih Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll diimpor</string> + <string name="lsfg_import_unchanged">Lossless.dll ini sudah digunakan</string> + <string name="lsfg_import_not_owned">Lossless Scaling tidak dimiliki di akun Steam ini</string> + <string name="lsfg_import_invalid">File ini bukan Lossless.dll milik Lossless Scaling</string> + <string name="lsfg_import_failed">Tidak dapat menyiapkan LSFG dari Lossless.dll ini</string> + <string name="lsfg_problem_missing">LSFG memerlukan Lossless Scaling dari Steam atau Lossless.dll yang diimpor</string> + <string name="lsfg_problem_failed">LSFG tidak dapat menyiapkan shader-nya dari Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: tidak didukung</string> + <string name="hud_fg_failed">%1$s: mesin gagal</string> + <string name="hud_fg_needs_lossless">%1$s: memerlukan Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · memulai</string> + <string name="second_library_import_hint">Menambahkan pustaka Steam dan memindainya untuk gim Windows. Gim yang sudah dimiliki akan menggunakan entri Steam-nya; sisanya menjadi pintasan non-Steam.</string> + <string name="game_env_title">Lingkungan gim</string> + <string name="game_env_hint">Variabel lingkungan untuk gim Proton.</string> + <string name="game_env_edit">Edit</string> + <string name="game_env_shared">Semua gim Proton</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">ID aplikasi Steam</string> + <string name="game_env_open">Buka</string> + <string name="game_env_profile">Gim %1$s</string> + <string name="game_env_add">Tambah variabel</string> + <string name="game_env_name">Nama variabel</string> + <string name="game_env_value">Nilai</string> + <string name="game_env_save">Simpan</string> + <string name="game_env_remove">Hapus</string> + <string name="game_env_restore">Warisi kembali</string> + <string name="game_env_reset">Hapus semua penggantian lingkungan</string> + <string name="game_env_unset">Nonaktifkan untuk profil ini</string> + <string name="game_env_empty">Belum ada variabel yang diatur.</string> + <string name="game_env_inherited">Diwariskan</string> + <string name="game_env_custom">Variabel khusus</string> + <string name="game_env_error">Tidak dapat memuat atau menyimpan. Periksa penyimpanan kosong dan coba lagi.</string> + <string name="game_env_invalid">Gunakan nama yang valid dan nilai hingga 8192 karakter.</string> + <string name="game_env_unused">Runtime Proton standar tidak membaca variabel ini.</string> + <string name="game_env_loading">Memuat…</string> + <string name="game_env_feature">Override level fitur D3D12. 12_2 melaporkan kemampuan DirectX 12 Ultimate; fitur yang tidak didukung dapat gagal. Biarkan kosong untuk deteksi otomatis.</string> + <string name="game_env_shader">Override model shader D3D12. 6_9 memerlukan VKD3D yang cukup baru dan fitur GPU yang sesuai. Biarkan kosong untuk deteksi otomatis.</string> + <string name="game_env_cache">Pertahankan cache shader Mesa tetap aktif untuk mengurangi kompilasi berulang. false mengaktifkan cache.</string> + <string name="game_env_cache_size">Ukuran maksimum cache shader Mesa, misalnya 1G. Cache yang lebih besar menggunakan lebih banyak penyimpanan.</string> + <string name="game_env_vkd3d_config">Opsi VKD3D untuk D3D12. nodxr menonaktifkan ray tracing; gunakan hanya untuk gim yang membutuhkannya.</string> + <string name="game_env_proton_log">Atur ke 1 untuk log diagnostik Proton. Pencatatan log dapat mengurangi performa dan menggunakan penyimpanan.</string> + <string name="game_env_wined3d">Atur ke 1 untuk menggunakan WineD3D berbasis OpenGL sebagai pengganti DXVK untuk pengujian kompatibilitas D3D9–11.</string> + <string name="game_env_no_ntsync">Atur ke 1 untuk menjaga gim ini di luar ntsync (droiddeck-ntsync atau driver kernel); gim ini menggunakan droiddeck-esync jika ada paket yang tersedia, jika tidak droiddeck-fsync.</string> + <string name="game_env_no_esync">Atur ke 1 untuk menonaktifkan droiddeck-esync bagi gim ini; gim ini menggunakan droiddeck-fsync, atau droiddeck-ntsync jika fsync juga nonaktif.</string> + <string name="game_env_no_fsync">Atur ke 1 untuk menjaga gim ini di luar droiddeck-fsync; gim ini menggunakan droiddeck-esync jika ada paket yang tersedia, jika tidak droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Atur ke 1 untuk menjalankan gim ini pada droiddeck-fsync, atau 0 untuk mengutamakan droiddeck-esync jika ada paket yang cocok dengan Proton-nya.</string> + <string name="game_env_xalia">Atur ke 0 untuk menonaktifkan fitur bantu navigasi gamepad milik Proton untuk gim ini.</string> + <string name="game_env_hud">Overlay DXVK untuk D3D9–11. fps menampilkan frame rate; kosongkan untuk menyembunyikannya.</string> + <string name="game_env_dxvk_config">Setelan DXVK dipisahkan dengan titik koma. Versi terbaru menggunakan dxvk.maxFrameRate untuk membatasi frame rate; gunakan pembatas frame rate sesi untuk permainan biasa.</string> + <string name="game_env_vkd3d_limit">Batas frame rate D3D12. 0 menonaktifkan batas.</string> + <string name="game_env_glthread">Threading OpenGL Mesa. true dapat membantu gim OpenGL yang terbatas CPU; uji per gim.</string> + <string name="sync_backend_title">Sinkronisasi Wine</string> + <string name="sync_backend_hint">Cara gim menjaga thread-nya tetap selaras. Berlaku pada sesi berikutnya.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Preset FEX</string> + <string name="fex_next_launch">Berlaku pada peluncuran gim berikutnya.</string> + <string name="game_settings_title">Gim</string> + <string name="fex_default_label">Default FEX</string> + <string name="fex_default_detail">Menggunakan default FEX.</string> + <string name="fex_stability_label">Stabilitas</string> + <string name="fex_stability_detail">Setelan paling aman dan paling lambat.</string> + <string name="fex_compatibility_label">Kompatibilitas</string> + <string name="fex_compatibility_detail">TSO penuh dengan multiblock.</string> + <string name="fex_intermediate_label">Menengah</string> + <string name="fex_intermediate_detail">TSO seimbang dengan presisi x87 yang dikurangi.</string> + <string name="fex_performance_label">Performa</string> + <string name="fex_performance_detail">Semua TSO dinonaktifkan; multiblock.</string> + <string name="fex_performance_tso_label">Performa + TSO</string> + <string name="fex_performance_tso_detail">Setelan performa dengan TSO utama diaktifkan.</string> + <string name="fex_extreme_label">Ekstrem</string> + <string name="fex_extreme_detail">Menonaktifkan pemeriksaan self-modifying-code. Gim JIT dan DRM dapat rusak.</string> + <string name="fex_extreme_tso_label">Ekstrem + TSO</string> + <string name="fex_extreme_tso_detail">Setelan ekstrem dengan TSO utama diaktifkan.</string> + <string name="fex_extreme_gn_label">Extreme-gn</string> + <string name="fex_extreme_gn_detail">Performa dengan TSC dan metadata hints. Coba sebelum Ekstrem.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Performa dengan pemeriksaan kode penuh dan bit hypervisor disembunyikan.</string> + <string name="game_env_custom_value">Nilai khusus</string> + <string name="game_env_select_value">Pilih nilai</string> + <string name="user_apps_section">Emulator & aplikasi</string> + <string name="user_apps_add">Tambah</string> + <string name="user_apps_add_detail">Aplikasi atau gim Anda sendiri</string> + <string name="user_apps_kind_script">Skrip</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Memulai…</string> + <string name="user_apps_added">%1$s ditambahkan</string> + <string name="user_apps_removed">%1$s dihapus</string> + <string name="user_apps_back">Desktop</string> + <string name="user_apps_gone">Aplikasi itu sudah tidak ada. Pilih lagi dari Desktop.</string> + <string name="user_apps_open">Buka %1$s</string> + <string name="user_apps_remove">Hapus</string> + <string name="user_apps_remove_confirm">Tekan lagi untuk menghapus</string> + <string name="user_apps_stop_session">Hentikan sesi untuk menghapus</string> + <string name="user_apps_script_linked">Menjalankan %1$s dari foldernya, ditautkan ke dalam sesi tempatnya berada. Menghapus aplikasi ini tidak memengaruhi folder tersebut.</string> + <string name="user_apps_script_copied">Menjalankan %1$s dari salinan foldernya di dalam DroidDeck. Menghapus aplikasi ini menghapus salinannya, bukan aslinya.</string> + <string name="user_apps_runtime_required">Instal runtime Linux terlebih dahulu</string> + <string name="user_apps_file_gone">File tersebut sudah tidak ada</string> + <string name="user_apps_no_space">Penyimpanan tidak cukup: menyalin folder memerlukan %1$s</string> + <string name="user_apps_copying">Menyalin %1$s</string> + <string name="user_apps_failed">Gagal menambahkan aplikasi</string> + <string name="user_apps_github_checking">Mencari rilis %1$s</string> + <string name="user_apps_github_unreachable">Tidak dapat membaca rilis %1$s</string> + <string name="user_apps_github_no_appimage">Tidak ada rilis %1$s yang memiliki AppImage ARM64 atau x86_64</string> + <string name="user_apps_downloading">Mengunduh %1$s</string> + <string name="user_apps_download_failed">Unduhan gagal</string> + <string name="user_apps_update_failed">Gagal memperbarui aplikasi</string> + <string name="user_apps_icon_failed">Ikon tersebut tidak dapat dibaca</string> + <string name="user_apps_saved">%1$s disimpan</string> + <string name="user_apps_edit">Edit</string> + <string name="user_apps_check_updates">Periksa pembaruan</string> + <string name="user_apps_checking_updates">Memeriksa pembaruan…</string> + <string name="user_apps_update_to">Perbarui ke %1$s</string> + <string name="user_apps_up_to_date">Terbaru · %1$s</string> + <string name="user_apps_updated">%1$s diperbarui</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Tambahkan aplikasi</string> + <string name="add_app_tab_script">Skrip</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">File .sh. Berjalan dari foldernya sendiri, layar penuh di bawah gamescope.</string> + <string name="add_app_appimage_hint">AppImage ARM64 (aarch64), atau AppImage x86_64 yang berjalan melalui FEX. Dibongkar ke dalam runtime Linux sekali saja.</string> + <string name="add_app_github_hint">Menginstal AppImage ARM64 dari rilis terbaru repositori, atau AppImage x86_64-nya melalui FEX.</string> + <string name="app_fex_title">Gunakan FEX</string> + <string name="app_fex_auto">Otomatis</string> + <string name="app_fex_on">Aktif</string> + <string name="app_fex_off">Nonaktif</string> + <string name="app_fex_hint">FEX menjalankan program Linux x86 di perangkat ARM64 ini. Otomatis menggunakannya saat program dibuat untuk x86.</string> + <string name="app_fex_x86">%1$s melalui FEX</string> + <string name="app_fex_not_ready">Program ini dibuat untuk PC %1$s dan berjalan melalui FEX, yang belum disiapkan. Buka Steam sekali saat masuk: DroidDeck akan mengunduh FEX dan Steam Linux Runtime yang diperlukan, lalu ini akan terbuka.</string> + <string name="session_end_program">Program ini</string> + <string name="session_end_fex_missing">%1$s dibuat untuk PC x86 dan berjalan melalui FEX, yang belum terinstal. Mulai Steam sekali saat masuk dan biarkan FEX serta Steam Linux Runtime diunduh, lalu mulai lagi.</string> + <string name="add_app_flatpak_hint">ID aplikasi Flathub atau halaman Flathub-nya. Flatpak disiapkan dahulu jika belum.</string> + <string name="add_app_file">File</string> + <string name="add_app_no_file">Belum ada file yang dipilih</string> + <string name="add_app_choose_file">Pilih file</string> + <string name="add_app_change_file">Ubah</string> + <string name="add_app_pick_script">Pilih skrip</string> + <string name="add_app_pick_appimage">Pilih AppImage</string> + <string name="add_app_pick_icon">Pilih ikon</string> + <string name="add_app_repository">Repositori</string> + <string name="add_app_repository_placeholder">owner/repo atau tautan github.com</string> + <string name="add_app_repository_invalid">Bukan repositori GitHub</string> + <string name="add_app_flatpak_id">ID aplikasi</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Bukan ID aplikasi Flathub</string> + <string name="add_app_flatpak_bundle_hint">Atau file .flatpak, untuk aplikasi yang tidak ada di Flathub.</string> + <string name="add_app_pick_flatpak">Pilih file .flatpak</string> + <string name="add_app_source">Sumber</string> + <string name="add_app_appearance">Di Desktop Anda</string> + <string name="add_app_preview_name">Aplikasi baru</string> + <string name="add_app_name">Nama</string> + <string name="add_app_name_placeholder">Dari aplikasi</string> + <string name="add_app_icon">Ikon</string> + <string name="add_app_icon_default">Ikon default</string> + <string name="add_app_choose_icon">Pilih ikon</string> + <string name="add_app_clear_icon">Hapus</string> + <string name="add_app_icon_suggestions">Dari repositori</string> + <string name="add_app_icon_searching">Mencari ikon…</string> + <string name="add_app_icon_reset">Default</string> + <string name="edit_app_title">Edit %1$s</string> + <string name="edit_app_save">Simpan</string> + <string name="add_app_checking_folder">Memeriksa folder…</string> + <string name="add_app_folder_linked">Foldernya ditautkan ke dalam sesi: %1$s</string> + <string name="add_app_folder_copied">Foldernya berisi program Linux, yang tidak dapat dijalankan dari penyimpanan bersama, sehingga disalin ke dalam DroidDeck (%1$s).</string> + <string name="add_app_confirm">Tambah</string> + <string name="add_app_cancel">Batal</string> + <string name="add_app_runtime_required">Instal runtime Linux dari Penyiapan terlebih dahulu.</string> + <string name="add_app_busy">Tunggu %1$s selesai.</string> + <string name="steam_compat_label">Kompatibel</string> + <string name="proton_compatible_note">Build yang ditandai “%1$s” di menu Kompatibilitas Steam memiliki perbaikan prefix dari DroidDeck dan dapat menjalankan gim di sini. Defaultnya adalah Proton Experimental ARM64 (%1$s), atau Proton 11.0 ARM64 (%1$s) setelah build yang lebih baru itu terinstal. Entri Proton asli milik Valve tanpa tanda ini tidak dapat menjalankan gim di perangkat ini.</string> + <string name="proton_installed_compatible">Terinstal %1$s · %2$s</string> + <string name="common_cancel">Batal</string> + <string name="common_auto">Otomatis</string> + <string name="common_never">Tidak pernah</string> + <string name="common_always">Selalu</string> + <string name="common_uninstall">Hapus instalasi</string> + <string name="common_check">Periksa</string> + <string name="common_update">Perbarui</string> + <string name="common_checking">Memeriksa…</string> + <string name="common_working">Memproses…</string> + <string name="common_forget">Lupakan</string> + <string name="common_add_ellipsis">Tambah…</string> + <string name="common_use">Gunakan</string> + <string name="common_applies_next_session">Berlaku pada sesi berikutnya.</string> + <string name="mode_steam_title">Sesi Steam</string> + <string name="mode_desktop_title">Sesi Desktop</string> + <string name="mode_display">Tampilan</string> + <string name="mode_resolution">Resolusi</string> + <string name="mode_res_720">Hingga 720p</string> + <string name="mode_res_900">Hingga 900p</string> + <string name="mode_res_1080">Hingga 1080p</string> + <string name="mode_res_native">Asli</string> + <string name="mode_res_default">%1$s (default)</string> + <string name="mode_res_custom_value">Khusus · %1$d×%2$d</string> + <string name="mode_res_custom">Khusus…</string> + <string name="mode_res_note">720p dapat membuat menu lebih responsif.</string> + <string name="mode_ratio">Rasio layar</string> + <string name="mode_ratio_custom">Ditentukan oleh resolusi khusus.</string> + <string name="mode_ratio_auto">Otomatis menggunakan setidaknya 16:9.</string> + <string name="mode_fps">Batas frame rate</string> + <string name="mode_fps_note">Membatasi seluruh sesi. Tampilan beralih ke refresh rate yang habis dibagi oleh batas ini.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Output HDR10</string> + <string name="mode_hdr_unavailable">Tidak tersedia: %1$s.</string> + <string name="mode_hdr_restart">Mulai ulang aplikasi untuk menerapkannya.</string> + <string name="mode_drivers">Driver</string> + <string name="mode_gpu_drivers">Driver GPU</string> + <string name="mode_gpu_drivers_hint">Digunakan bersama oleh Steam dan Desktop. Diatur di halaman Komponen.</string> + <string name="mode_touch_controls">Sentuhan & kontrol</string> + <string name="mode_touch">Sentuhan</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Langsung</string> + <string name="mode_touch_note">Otomatis: touchpad di Desktop, langsung di Steam.</string> + <string name="mode_osc">Kontrol di layar</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Otomatis menampilkan kontrol saat tidak ada pengontrol yang terhubung.</string> + <string name="osc_steam_touch">Sentuhan Steam (beta)</string> + <string name="osc_style_next_session">Kontrol sentuh Steam dimulai pada sesi Steam berikutnya</string> + <string name="osc_steam_layout">Tata letak sentuh Steam</string> + <string name="osc_steam_layout_hint">Pindahkan, ubah ukuran, atau sembunyikan kontrol sentuh gim ini; disimpan ke Steam</string> + <string name="mode_controller">Pengontrol</string> + <string name="mode_controller_hint">Cara Steam mendeteksi pengontrol Anda. Berlaku pada sesi berikutnya.</string> + <string name="mode_controller_deck">Pengontrol Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Pengontrol Xbox 360</string> + <string name="mode_controller_note">Deck: tombol Quick Access dan giroskop. Steam Controller: sama, dengan grip sense pada tombol belakang. DualShock 4 dan DualSense: giroskop, dan trackpad sebagai touchpad-nya. Xbox 360: buka Quick Access dengan Guide+A.</string> + <string name="mode_back">Kembali</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Sesi</string> + <string name="mode_suspend">Perilaku latar belakang</string> + <string name="mode_suspend_hint">Saat aplikasi disembunyikan atau layar mati.</string> + <string name="mode_suspend_manual">Manual</string> + <string name="mode_suspend_native">Native</string> + <string name="mode_suspend_steam_note">Otomatis menjeda dan melanjutkan saat ditampilkan. Native menyiapkan Steam untuk tidur terlebih dahulu. Manual menunggu Lanjutkan. Tidak pernah terus berjalan.</string> + <string name="mode_background_downloads">Pertahankan unduhan tetap berjalan</string> + <string name="mode_background_downloads_hint">Menunda penjedaan latar belakang saat Steam sedang aktif mengunduh.</string> + <string name="mode_zram">Kompresi zRAM</string> + <string name="mode_zram_hint">Saat bermain, memori klien Steam dipadatkan ke zram perangkat sehingga gim mendapat lebih banyak RAM. Berlaku saat Steam dijalankan berikutnya.</string> + <string name="mode_zram_unsupported">Tidak tersedia: perangkat ini tidak punya zram atau swap, atau kernelnya lebih lama dari 5.4.</string> + <string name="mode_suspend_note">Otomatis menjeda di latar belakang dan melanjutkan saat ditampilkan. Manual menunggu Lanjutkan. Tidak pernah terus berjalan.</string> + <string name="mode_startup">Mulai</string> + <string name="mode_steam_startup">Mulai Steam bersama DroidDeck</string> + <string name="mode_steam_startup_hint">Membuka sesi Steam saat DroidDeck diluncurkan.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Memeriksa rilis…</string> + <string name="mode_decky_ready">Siap menginstal %1$s.</string> + <string name="mode_decky_none">Tidak ditemukan build yang kompatibel. Coba lagi nanti.</string> + <string name="mode_decky_installed">Terinstal · %1$s</string> + <string name="mode_decky_update">Pembaruan tersedia · %1$s</string> + <string name="mode_decky_current">Terbaru · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Instal versi terbaru</string> + <string name="mode_decky_on">Dimulai bersama Steam. Saat aktif, aplikasi lain di perangkat ini mungkin dapat mengendalikan Steam.</string> + <string name="mode_decky_off">Nonaktif. Port debugging jarak jauh Steam tetap tertutup.</string> + <string name="mode_decky_remove_title">Hapus instalasi Decky Loader?</string> + <string name="mode_decky_remove_text">Menghapus loader. Plugin dan setelan Anda tetap disimpan.</string> + <string name="mode_client">Klien</string> + <string name="mode_mangoapp">Overlay performa</string> + <string name="mode_mangoapp_hint">Nonaktifkan jika gim crash atau layar menjadi hitam di mode Deck. Berlaku pada sesi berikutnya.</string> + <string name="mode_steam_repair">Perbaiki klien Steam</string> + <string name="mode_steam_repair_hint">Mengunduh ulang klien Steam saat Steam dimulai lagi. Gunakan ini jika Steam tetap berada di layar pemuatannya. Gim, status masuk, dan setelan tetap disimpan.</string> + <string name="mode_steam_repair_queued">Klien Steam akan diunduh ulang saat Steam dimulai lagi.</string> + <string name="mode_steam_repair_button">Perbaiki</string> + <string name="mode_added_art">Karya seni</string> + <string name="mode_sgdb_key">Kunci API SteamGridDB</string> + <string name="mode_sgdb_key_yours">Kunci Anda</string> + <string name="mode_sgdb_edit">Edit…</string> + <string name="mode_added_art_hint">Melengkapi karya seni yang belum ada dari Steam, lalu SteamGridDB. File cover.jpg, hero.jpg, logo.png, atau icon.png Anda sendiri di folder gim lebih diutamakan.</string> + <string name="summary_remove_game">Hapus %1$s</string> + <string name="mode_added_remove_confirm">Hapus?</string> + <string name="games_add">Tambah gim</string> + <string name="games_add_title">Tambahkan gim:</string> + <string name="games_pick_exe_title">Pilih exe:</string> + <string name="games_add_unreachable">Lokasi ini tidak tersedia dalam sesi</string> + <string name="mode_added_exe_check">Periksa exe ini</string> + <string name="wincomp_title">Komponen Windows</string> + <string name="wincomp_pad_hint">LB / RB berpindah antar bagian.</string> + <string name="wincomp_card_none">Tidak ada</string> + <string name="wincomp_applies">DLL Windows yang tidak disertakan Proton, dari daftar komponen. Aktifkan yang diperlukan gim ini: DLL tersebut masuk ke folder Windows milik gim sendiri, bukan ke file gimnya, dan tetap ada pada Proton apa pun yang menjalankannya.</string> + <string name="wincomp_offline">Tidak dapat menjangkau daftar komponen. Komponen yang sudah diunduh masih dapat dialihkan.</string> + <string name="wincomp_recommended">Direkomendasikan untuk gim ini</string> + <string name="wincomp_checking">Memeriksa kebutuhan gim ini…</string> + <string name="wincomp_when_online">Tersedia saat online</string> + <plurals name="wincomp_turning_on"> + <item quantity="other">Mengaktifkan %1$d komponen…</item> + </plurals> + <string name="wincomp_auto_section">Aktif untuk gim ini</string> + <string name="wincomp_auto_steam">Steam menginstal %1$s dengan %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">Dari daftar GOG untuk gim ini</string> + <string name="wincomp_auto_epic">Dari prasyarat Epic untuk gim ini</string> + <string name="wincomp_auto_amazon">Dari langkah instalasi Amazon untuk gim ini</string> + <string name="wincomp_steam_by_name">Steam menginstal %1$s dengan app %2$s, dicocokkan berdasarkan nama</string> + <string name="wincomp_suggestions">Juga tercantum</string> + <string name="wincomp_suggestion_reason">Tercantum oleh %1$s; bukan komponen di sini</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Gim ini menyertakan %1$s</string> + <string name="wincomp_found_shipped">Gim ini memiliki %1$s (sering berfungsi tanpa perubahan)</string> + <string name="wincomp_already_here">Sudah ada di gim ini</string> + <string name="wincomp_no_recommendation">Tidak ada yang di folder gim mengarah ke komponen.</string> + <string name="wincomp_active">Terinstal untuk gim ini (%1$d)</string> + <string name="wincomp_all">Semua komponen (%1$d)</string> + <string name="wincomp_installers">Memerlukan installer Windows (%1$d)</string> + <string name="wincomp_installers_note">Ini adalah program penyiapan sendiri tanpa paket di dalamnya yang dapat dibongkar, dan belum ada catatan tentang apa yang diinstalnya. Kebanyakan adalah runtime lama yang sudah digantikan oleh Mono di dalam Proton; catatan ditambahkan seiring dibuatnya.</string> + <string name="wincomp_show">Tampilkan</string> + <string name="wincomp_hide">Sembunyikan</string> + <string name="wincomp_needs_installer">Menjalankan program penyiapan sendiri (belum tercatat)</string> + <string name="wincomp_unsupported">Belum didukung di sini</string> + <string name="wincomp_loading">Memuat komponen…</string> + <string name="wincomp_failed">Tidak dapat menginstal: %1$s</string> + <string name="wincomp_downloaded">Terunduh</string> + <string name="wincomp_downloading">Mengunduh %1$s</string> + <string name="wincomp_installing">Menginstal: %1$s</string> + <string name="wincomp_reverting">Menonaktifkan…</string> + <string name="wincomp_download_size">Unduhan %1$s</string> + <string name="wincomp_next_launch">Berlaku saat gim dimulai lagi.</string> + <string name="mode_stretch169">Rentangkan gim 16:9</string> + <string name="mode_stretch169_hint">Pada layar yang lebih persegi dari 16:9, merentangkan gim agar memenuhi layar, bukan menampilkan batang hitam. Berlaku pada sesi berikutnya.</string> + <string name="mode_audio">Audio</string> + <string name="mode_directaudio">DirectAudio untuk gim</string> + <string name="mode_directaudio_hint">Melewati PulseAudio untuk latensi yang lebih rendah.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">Untuk obrolan suara.</string> + <string name="mode_network">Jaringan</string> + <string name="mode_wifi_discovery">Pencarian Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Menampilkan nama Wi-Fi dan jaringan di sekitar di Steam.</string> + <string name="mode_wifi_location_off">Layanan lokasi tidak aktif.</string> + <string name="mode_wifi_permission_denied">Izin lokasi tidak diberikan.</string> + <string name="mode_wifi_open_settings">Buka setelan</string> + <string name="mode_wifi_continue">Lanjutkan</string> + <string name="mode_wifi_explain_title">Aktifkan pencarian Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android memerlukan izin Lokasi untuk membaca nama Wi-Fi dan menemukan jaringan di sekitar. DroidDeck menggunakan akses ini untuk menampilkan jaringan tersebut di Steam. Kami tidak melacak lokasi Anda. Akses internet tetap berfungsi tanpa izin ini.</string> + <string name="mode_storage">Penyimpanan gim</string> + <string name="mode_storage_auto">Otomatis - kartu SD jika ada, ditambah folder Games Anda</string> + <string name="mode_storage_auto_none">Otomatis - folder Games Anda, ditambah kartu SD jika ada (tidak ada sekarang)</string> + <string name="mode_storage_internal">Hanya internal</string> + <string name="mode_storage_folder">Folder: %1$s</string> + <string name="mode_second_library">Pustaka kedua</string> + <string name="mode_storage_note">Gim yang melakukan streaming aset dari SD atau penyimpanan bersama dapat tersendat.</string> + <string name="mode_storage_diagnostics">Diagnostik penyimpanan</string> + <string name="mode_storage_diagnostics_hint">Mencatat hasil alokasi dan waktu penyimpanan yang disampel di Bagikan log. Dapat memperlambat instalasi saat diaktifkan. Berlaku pada sesi berikutnya.</string> + <string name="mode_choose_folder">Pilih folder…</string> + <string name="mode_custom_res_title">Resolusi khusus</string> + <string name="mode_custom_res_text">Menggantikan batas dan rasio. Ukuran yang tidak sesuai dengan layar akan menampilkan batang.</string> + <string name="mode_width">Lebar</string> + <string name="mode_height">Tinggi</string> + <string name="mode_custom_res_range">Antara 320×240 dan 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="other">%1$d gim</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Hapus</string> + <string name="common_restore">Pulihkan</string> + <string name="common_download">Unduh</string> + <string name="common_delete_named">Hapus %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Driver runtime</string> + <string name="comp_runtime_driver_hint">Digunakan oleh Steam, gim, dan desktop. Berlaku pada sesi berikutnya.</string> + <string name="comp_import_turnip">Impor zip Turnip…</string> + <string name="comp_display_driver">Driver tampilan</string> + <string name="comp_display_driver_hint">Menggambar frame ke layar di kedua mode. Mulai ulang aplikasi untuk menerapkannya.</string> + <string name="comp_import_adrenotools">Impor zip AdrenoTools…</string> + <string name="comp_never">tidak pernah</string> + <string name="comp_nightlies_checked">Nightlies diperiksa %1$s</string> + <string name="comp_title">Komponen</string> + <string name="comp_about">Tentang Komponen</string> + <string name="comp_check_drivers">Periksa driver baru</string> + <string name="comp_check_nightlies">Periksa Nightlies untuk paket baru</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Proton yang dipilih di sini menjalankan setiap gim yang belum memilih Proton sendiri di Steam, dan perubahan yang dibuat di Steam juga ditampilkan di sini. Steam menggantikan Proton milik Valve saat memperbarui; aslinya tetap disimpan per build.</string> + <string name="comp_scope">Konfigurasi</string> + <string name="comp_profile_configure">Konfigurasikan profil</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Profil default</string> + <string name="comp_scope_general_detail">Digunakan secara otomatis oleh gim tanpa penggantian.</string> + <string name="comp_profile_game_detail">Setelan tersimpan yang digunakan secara otomatis saat %1$s dijalankan.</string> + <string name="comp_game_hint">Pilih hanya setelan yang diperlukan gim ini. Semua yang lain tetap menggunakan profil Default.</string> + <string name="comp_game_fex">Preset FEX</string> + <string name="comp_game_fex_inherited">Menggunakan preset profil Default.</string> + <string name="comp_game_fex_override">Preset khusus tersimpan untuk gim ini.</string> + <string name="comp_game_fex_custom">Variabel FEX khusus</string> + <string name="comp_game_use_general">Gunakan Default</string> + <string name="comp_game_compatibility">Kompatibilitas gim</string> + <string name="comp_game_environment_hint">Opsi lingkungan Proton, DXVK, VKD3D, dan sinkronisasi untuk gim ini.</string> + <string name="comp_game_proton_inherited">Menggunakan Proton profil Default.</string> + <string name="comp_game_proton_override">Proton khusus tersimpan untuk gim ini melalui pemetaan kompatibilitas Steam.</string> + <string name="comp_no_proton_short">Tanpa Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Menggunakan paket profil Default dari %1$s kecuali gim ini memilih paket lain.</string> + <string name="comp_game_component_general">Menggunakan paket komponen profil Default.</string> + <string name="comp_game_component_override">Menggunakan %1$s hanya untuk gim ini.</string> + <string name="comp_game_runtime_options">Opsi runtime</string> + <string name="comp_game_environment_other_hint">Opsi lingkungan Proton, DXVK, VKD3D-Proton, dan sinkronisasi lain per gim.</string> + <string name="comp_game_saved_next">Profil %1$s tersimpan untuk peluncuran gim berikutnya.</string> + <string name="game_no_steam_title">Mulai tanpa Steam</string> + <string name="game_no_steam_detail">Membukanya di Proton/FEX tanpa klien Steam; fitur Steam nonaktif.</string> + <string name="game_no_steam_on">Aktif</string> + <string name="game_steam_with">Dimulai dengan Steam</string> + <string name="game_steam_without">Dimulai tanpa Steam</string> + <string name="game_settings_card">Setelan</string> + <string name="game_settings_menu_title">Setelan %1$s</string> + <string name="game_settings_default">Default</string> + <string name="game_settings_default_detail">Mengembalikan semua yang diubah untuk game ini ke setelan aplikasi.</string> + <string name="game_sync_custom">Variabel sinkronisasi kustom</string> + <string name="comp_game_proton_live">Pilihan Proton %1$s tersimpan dan sudah tersedia di Steam sekarang.</string> + <string name="comp_game_proton_next">Pilihan Proton %1$s tersimpan. Mulai ulang Steam sebelum meluncurkan gim.</string> + <string name="comp_game_proton_not_runnable">%1$s tidak dapat menggunakan Proton yang dipilih di perangkat ini.</string> + <string name="comp_game_load_failed">Tidak dapat memuat profil %1$s: %2$s</string> + <string name="comp_game_save_failed">Profil gim tidak dapat disimpan: %1$s</string> + <string name="comp_game_reset">Atur ulang profil gim</string> + <string name="comp_game_reset_title">Atur ulang profil %1$s?</string> + <string name="comp_game_reset_body">Hapus Proton, FEX, paket komponen, lingkungan, pemfilteran tekstur, dan penggantian komponen Windows gim ini? Gim ini akan menggunakan profil Default.</string> + <string name="comp_game_reset_done">%1$s sekarang menggunakan profil Default.</string> + <string name="comp_game_reset_failed">Profil gim tidak dapat diatur ulang secara lengkap: %1$s</string> + <string name="comp_default_live">%1$s sekarang menjalankan setiap gim yang belum memilih Proton sendiri di Steam.</string> + <string name="comp_default_next">%1$s akan menjalankan setiap gim yang belum memilih Proton sendiri, mulai dari saat Steam berikutnya dijalankan.</string> + <string name="comp_default_not_runnable">%1$s tidak dapat memulai gim di sini, sehingga tidak dapat menjadi default.</string> + <string name="comp_default_failed">Proton default tidak dapat disimpan: %1$s</string> + <string name="comp_swapped">%1$s · %2$d ditukar</string> + <string name="comp_all_original">%1$s · semua asli</string> + <string name="comp_game_running_suffix">%1$s · gim berjalan</string> + <string name="comp_esync_pack">%1$s · paket droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · belum ada paket droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync sudah terpasang, tidak perlu paket</string> + <string name="comp_gpu_drivers">Driver GPU</string> + <string name="comp_reapplied">%1$s · diterapkan ulang saat peluncuran %2$s</string> + <string name="comp_next_queued">Berikutnya: %1$s · setelah gim ditutup</string> + <string name="comp_in_use">%1$s digunakan: %2$s</string> + <string name="comp_waits">Menunggu sampai gim ditutup</string> + <string name="comp_applies_next_game">Berlaku saat gim berikutnya dimulai</string> + <string name="comp_import_zip">Impor .zip</string> + <string name="comp_reading">Membaca Proton…</string> + <string name="comp_no_proton">Belum ada Proton yang terinstal. Mulai Steam sekali untuk mengunduh Proton ARM64-nya, atau tambahkan GE-Proton, CachyOS, atau DroidDeck-Proton dari Penyiapan.</string> + <string name="comp_original">Asli · %1$s</string> + <string name="comp_this_build">%1$s · build ini</string> + <string name="comp_earlier_build">%1$s · build sebelumnya</string> + <string name="comp_installed_count">Terinstal · %1$d</string> + <string name="comp_nothing_stored">Belum ada yang tersimpan untuk %1$s. File asli Proton ini disimpan sebagai aslinya.</string> + <string name="comp_waits_long">Sebuah gim sedang berjalan pada Proton ini, sehingga ini menunggu sampai gim ditutup.</string> + <string name="comp_applies_long">Berlaku saat gim berikutnya dimulai.</string> + <string name="comp_swap_title">Tukar %1$s?</string> + <string name="comp_swap_body">Masukkan %1$s ke %2$s? File aslinya tetap tersimpan. %3$s</string> + <string name="comp_restore_title">Pulihkan %1$s?</string> + <string name="comp_restore_body">Kembalikan %1$s asli ke %2$s? %3$s</string> + <string name="comp_delete_package_body">Menghapus paket dari aplikasi. Anda dapat mengunduhnya lagi.</string> + <string name="comp_delete_original_title">Hapus yang asli ini?</string> + <string name="comp_delete_original_body">%1$s asli ini berasal dari build %2$s yang lebih lama. Asli build saat ini selalu dipertahankan.</string> + <string name="comp_nightlies_count">Di Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Segarkan untuk melihat daftar paket di Nightlies.</string> + <string name="comp_nothing_new">Tidak ada yang baru sejak pemeriksaan terakhir.</string> + <string name="comp_import_wcp">Impor .wcp</string> + <string name="comp_restore_original">Pulihkan yang asli dari Proton ini</string> + <string name="comp_restore_original_body">Kembalikan %1$s asli %2$s?</string> + <string name="comp_swap">Tukar</string> + <string name="comp_about_text">FEX, DXVK, dan VKD3D-Proton untuk setiap Proton yang digunakan Steam menjalankan gim.\n\nPilih baris yang terinstal untuk menukarnya. Berlaku saat gim berikutnya dimulai, atau setelah gim yang sedang berjalan ditutup.\n\nPilihan Anda diperiksa ulang sebelum setiap peluncuran dan dikembalikan jika ada yang mengubahnya. File asli setiap Proton tetap disimpan, sehingga pembaruan Steam tidak akan pernah menghilangkannya.</string> + <string name="comp_tag_original">Asli</string> + <string name="comp_tag_in_use">Digunakan</string> + <string name="comp_tag_new">Baru</string> + <string name="comp_tag_stored">Tersimpan</string> + <string name="perf_title">Performa</string> + <string name="perf_lede">Core CPU, perbaikan sesi, dan nama host. Berlaku pada sesi berikutnya.</string> + <string name="perf_client_cores_group">Core klien Steam</string> + <string name="perf_override">Timpa pilihan core Steam</string> + <string name="perf_override_hint">Mengikat Steam, pembantu UI-nya, dan gamescope ke core di bawah.</string> + <string name="perf_client_cores">Core klien</string> + <string name="perf_client_cores_on">Core untuk Steam.</string> + <string name="perf_client_cores_off">Aktifkan penggantian untuk memilih.</string> + <string name="perf_game_cores_group">Core gim</string> + <string name="perf_game_cores">Core gim</string> + <string name="perf_game_cores_hint">Core untuk gim. Dengan semua dipilih, Android menjadwalkan secara bebas.</string> + <string name="perf_client_ui">Antarmuka klien</string> + <string name="perf_glthread">GL berulir (threaded)</string> + <string name="perf_glthread_hint">Dapat membuat menu Steam lebih responsif.</string> + <string name="perf_zink">Zink: deskriptor lazy</string> + <string name="perf_zink_hint">Direkomendasikan untuk driver tanpa descriptor buffer.</string> + <string name="perf_noglerror">Lewati pemeriksaan error GL</string> + <string name="perf_noglerror_hint">Menonaktifkan validasi GL per panggilan.</string> + <string name="perf_gsrealtime">gamescope: antrean GPU realtime</string> + <string name="perf_gsrealtime_hint">Memprioritaskan kerja GPU compositor. Dapat menghaluskan pacing frame dengan sedikit mengorbankan gim.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Pertahankan GPU pada clock tertingginya</string> + <string name="perf_gpuclock_hint">Hanya Adreno. Lebih sedikit tersendat, lebih banyak penggunaan baterai dan panas.</string> + <string name="perf_fixes">Perbaikan sesi</string> + <string name="perf_sysmem">Turnip: rendering sysmem</string> + <string name="perf_sysmem_hint">Lebih cepat untuk Steam dan sebagian besar gim. 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_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> + <string name="perf_esync_hint">Thread Windows milik gim saling menunggu melalui eventfd dan memori bersama, bukan melalui bolak-balik ke wineserver. Menggunakan paket droiddeck-esync yang dibuat khusus untuk build Proton tersebut; paket diambil secara otomatis. Sampai paket untuk build Proton baru tersedia, droiddeck-fsync menjadi penggantinya. Berlaku pada sesi berikutnya.</string> + <string name="perf_xalia_hint">Menonaktifkan bantuan navigasi gamepad milik Proton, yang menggunakan CPU di setiap gim.</string> + <string name="perf_seccomp">Jalankan proot tanpa seccomp</string> + <string name="perf_seccomp_hint">Dapat memperbaiki galat syscall yang hilang pada beberapa kernel. Dapat mengurangi performa.</string> + <string name="perf_fastpath">Jalur cepat proot</string> + <string name="perf_fastpath_needs_seccomp">Memerlukan filter seccomp milik proot.</string> + <string name="perf_fastpath_hint">Pencarian file lebih cepat dan lebih sedikit tersendat. Nonaktifkan jika program tidak dapat menemukan filenya.</string> + <string name="perf_identity">Identitas sesi</string> + <string name="perf_hostname">Nama host</string> + <string name="perf_hostname_hint">Nama yang dilihat Steam untuk perangkat ini. Kosongkan untuk memulihkan %1$s.</string> + <string name="perf_hostname_invalid">Hanya huruf, angka, dan tanda hubung di tengah, hingga 63 karakter.</string> + <string name="perf_phantom_warning">Android diatur untuk menghentikan sesi ini</string> + <string name="driver_installed">Terinstal</string> + <string name="driver_available">Tersedia untuk diunduh</string> + <string name="driver_nothing_new">Tidak ada yang baru sejak pemeriksaan terakhir.</string> + <string name="driver_restore_builtin">Pulihkan driver bawaan</string> + <string name="driver_delete_builtin">Bawaan aplikasi: ini menghapus file yang telah dibongkar dan menyembunyikannya. Pulihkan driver bawaan akan mengembalikannya.</string> + <string name="driver_delete_bundle">Separuh dari paket Android + Linux: kedua separuhnya dihapus. Driver yang sedang digunakan akan beralih kembali ke default.</string> + <string name="driver_delete_plain">Filenya dihapus dari aplikasi.</string> + <string name="driver_delete_in_use">Filenya dihapus. Driver ini sedang digunakan, jadi default akan mengambil alih.</string> + <string name="drawer_page_display">Tampilan</string> + <string name="drawer_page_effects">Efek</string> + <string name="drawer_page_controls">Kontrol</string> + <string name="drawer_page_components">Komponen</string> + <string name="drawer_page_controller">Pengontrol</string> + <string name="drawer_page_settings">Setelan</string> + <string name="drawer_page_desc">Halaman %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Desktop</string> + <string name="drawer_steam_menu">Menu Steam</string> + <string name="drawer_quick_access">Akses cepat</string> + <string name="drawer_open_qam">Buka Menu Akses Cepat</string> + <string name="drawer_prev_page">Halaman sebelumnya</string> + <string name="drawer_next_page">Halaman berikutnya</string> + <string name="drawer_hud">HUD performa</string> + <string name="drawer_scaling">Mode penskalaan</string> + <string name="drawer_scaling_sharpness">Ketajaman penskalaan</string> + <string name="drawer_effects">Efek layar</string> + <string name="drawer_effects_hint">Langsung. Menggunakan sedikit waktu GPU saat ada efek yang aktif.</string> + <string name="drawer_look">Preset</string> + <string name="drawer_look_custom">Khusus</string> + <string name="drawer_effects_advanced">Lanjutan</string> + <string name="widgets_expanded">Diperluas</string> + <string name="widgets_collapsed">Dilipat</string> + <string name="drawer_cas">Penajaman (CAS)</string> + <string name="drawer_cas_level">Tingkat penajaman</string> + <string name="drawer_fake_hdr">HDR palsu</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Jalankan SteamVR</string> + <string name="steamvr_checking">Memeriksa SteamVR…</string> + <string name="drawer_deband">Debanding</string> + <string name="drawer_deband_strength">Kekuatan debanding</string> + <string name="drawer_brightness">Kecerahan</string> + <string name="drawer_contrast">Kontras</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Saturasi</string> + <string name="drawer_fxaa">FXAA (penghalusan tepi)</string> + <string name="drawer_toon">Garis tepi toon</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Pemfilteran tekstur</string> + <string name="drawer_texture_hint">Gim DirectX 9–11, mulai dari peluncuran berikutnya.</string> + <string name="drawer_anisotropy">Pemfilteran anisotropik</string> + <string name="drawer_texture_sharpness">Ketajaman tekstur</string> + <string name="drawer_texture_sharpness_note">Bias mip negatif: tekstur lebih tajam, sedikit kilauan. Otomatis menyesuaikan seberapa besar sesi diperbesar ke layar.</string> + <string name="drawer_touch_auto">Otomatis (%1$s)</string> + <string name="drawer_keyboard">Keyboard</string> + <string name="drawer_latency">Latensi</string> + <string name="drawer_low_latency_controller">Pengontrol latensi rendah</string> + <string name="drawer_low_latency_controller_hint">Pengontrol melapor pada 1000 Hz, bukan 250 Hz. Sedikit lebih banyak CPU.</string> + <string name="drawer_low_latency_touch">Sentuh latensi rendah</string> + <string name="drawer_low_latency_touch_hint">Sentuhan melewati pengelompokan frame, jadi kontrol sentuh Steam berjalan pada 1000 Hz. Sedikit lebih banyak CPU.</string> + <string name="drawer_pc_keyboard">Keyboard PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Layar kedua</string> + <string name="drawer_second_screen_mode">Mode</string> + <string name="drawer_second_screen_shows">Menampilkan</string> + <string name="drawer_android_apps">Aplikasi Android</string> + <string name="drawer_launch_app">Luncurkan aplikasi</string> + <string name="common_hide">Sembunyikan</string> + <string name="common_show">Tampilkan</string> + <string name="drawer_no_apps">Tidak ada aplikasi yang dapat diluncurkan</string> + <string name="drawer_session_behavior">Perilaku sesi</string> + <string name="drawer_suspend_hint">Berlaku sekarang dan untuk sesi mendatang dalam mode ini.</string> + <string name="drawer_next_session">Sesi berikutnya</string> + <string name="drawer_support">Dukungan</string> + <string name="drawer_logs">Log sesi</string> + <string name="drawer_logs_hint">Lampirkan ke laporan bug</string> + <string name="drawer_share_logs">Bagikan log</string> + <string name="drawer_background">Latar belakang</string> + <string name="drawer_stop">Hentikan</string> + <string name="drawer_stop_title">Hentikan sesi?</string> + <string name="drawer_running_now">Sedang berjalan</string> + <string name="drawer_no_game">Tidak ada gim yang berjalan pada Proton</string> + <string name="drawer_selected_profile">Profil gim</string> + <string name="drawer_selected_profile_none">Detail profil belum tersedia.</string> + <string name="drawer_profile_refresh_failed_initial">Tidak dapat memuat profil gim. Mencoba lagi secara otomatis.</string> + <string name="drawer_profile_refresh_failed_stale">Tidak dapat menyegarkan profil gim. Menampilkan data terakhir yang tersedia; mencoba lagi secara otomatis.</string> + <string name="drawer_profile_inspect_hint">Lihat dan edit setelan tersimpan yang digunakan pada peluncuran berikutnya.</string> + <string name="drawer_profile_default">Menggunakan profil Default</string> + <string name="drawer_profile_custom">Profil khusus</string> + <string name="drawer_component_inherited">Menggunakan %1$s dari profil Default.</string> + <string name="drawer_game_components_note">Perubahan disimpan ke profil %1$s dan berlaku saat gim diluncurkan berikutnya.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="other">%1$d penggantian gim</item> + </plurals> + <string name="drawer_no_proton">Belum ada Proton yang terinstal.</string> + <string name="drawer_game_running">gim berjalan</string> + <string name="drawer_reapplied">diterapkan ulang pada peluncuran %1$s</string> + <string name="drawer_original">Asli</string> + <string name="drawer_components_note">Impor dan hapus di halaman Komponen.</string> + <string name="setup_check_done">Selesai</string> + <string name="setup_check_warn">Perlu perhatian</string> + <string name="setup_check_busy">Memproses</string> + <string name="setup_limit_adb_failed">Periksa alamat IP dan port Debugging nirkabel, atau sandingkan lagi jika Android telah menghapus perangkat ini.</string> + <string name="setup_install">Instal</string> + <string name="setup_manage">Kelola</string> + <string name="setup_tab_overview">Ringkasan</string> + <string name="setup_tab_controller">Pengontrol</string> + <string name="setup_tab_session">Sesi</string> + <string name="setup_tab_launcher">Peluncur</string> + <string name="setup_title">Penyiapan</string> + <string name="setup_all_set">● Semua siap</string> + <string name="setup_n_ready">%1$d dari %2$d siap</string> + <string name="setup_system_check">Pemeriksaan sistem</string> + <string name="setup_gpu_supported">Perangkat didukung</string> + <string name="setup_gpu_untested">GPU belum diuji</string> + <string name="setup_gpu_unsupported">GPU tidak didukung</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam memerlukan driver Adreno; %1$s mungkin menampilkan layar hitam</string> + <string name="setup_runtime">Runtime Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Belum terinstal · sekitar 3 GB, terinstal saat Play pertama kali</string> + <string name="setup_installed">Terinstal</string> + <string name="setup_runtime_update">%1$s · pembaruan tersedia</string> + <string name="setup_runtime_current">%1$s · terbaru</string> + <string name="setup_limit">Batas proses turunan</string> + <string name="setup_limit_on">Aktif · Android dapat menutup Steam. Menonaktifkannya memerlukan waktu sekitar satu menit.</string> + <string name="setup_limit_unset">Belum diatur · Android dapat menutup Steam. Menonaktifkannya memerlukan waktu sekitar satu menit.</string> + <string name="setup_limit_unknown">Tidak dapat diperiksa · menonaktifkannya memerlukan waktu sekitar satu menit.</string> + <string name="setup_fix_it">Perbaiki</string> + <string name="setup_details">Detail</string> + <string name="setup_dev_options">Opsi developer</string> + <string name="setup_use_wireless">Gunakan Debugging nirkabel</string> + <string name="setup_check_again">Periksa lagi</string> + <string name="setup_limit_turn_on">Aktifkan batas</string> + <string name="setup_account">Akun Steam</string> + <string name="setup_signed_in_offline">Masuk sebagai %1$s · mode luring</string> + <string name="setup_signed_in">Masuk sebagai %1$s</string> + <string name="setup_sign_in">Tekan Play dan masuk ke Steam</string> + <string name="setup_tools">Alat</string> + <string name="setup_controller">Pengontrol</string> + <string name="setup_controller_unavailable">Setelan pengontrol tidak tersedia.</string> + <string name="setup_session">Sesi</string> + <string name="setup_logs">Log sesi</string> + <string name="setup_logs_hint">Disimpan setelah setiap sesi</string> + <string name="setup_agent_commands">Alat debug</string> + <string name="setup_latest_logs">Log sesi terbaru</string> + <string name="setup_saved_logs">Log sesi tersimpan</string> + <string name="setup_saved_logs_hint">Menyimpan %1$d terbaru</string> + <string name="setup_clear_logs">Hapus log</string> + <string name="setup_reset_settings">Setel ulang semua setelan</string> + <string name="setup_reset_settings_hint">Kembalikan setiap setelan ke nilai bawaannya</string> + <string name="setup_reset_settings_button">Setel ulang</string> + <string name="setup_reset_settings_title">Setel ulang semua setelan?</string> + <string name="setup_reset_settings_body">Setelan tampilan, performa, pengontrol, tema, bahasa, dan peluncur kembali ke bawaan. Gim, login Steam, akun toko, driver yang diunduh, dan folder penyimpanan tetap ada.</string> + <string name="setup_reset_settings_profiles">Setel ulang profil gim juga (Proton, FEX, komponen, dan lingkungan runtime per gim, serta lingkungan profil Bawaan)</string> + <string name="setup_reset_settings_session_running">Hentikan sesi sebelum menyetel ulang setelan.</string> + <string name="setup_reset_settings_partial">Setelan disetel ulang, tetapi tidak semuanya. Rinciannya ada di log.</string> + <string name="setup_offline">Mode luring</string> + <string name="setup_sign_in_first">Masuk ke Steam terlebih dahulu</string> + <string name="setup_launcher">Peluncur</string> + <string name="setup_language">Bahasa</string> + <string name="setup_language_hint">Steam juga menggunakannya, mulai dari saat berikutnya dimulai.</string> + <string name="setup_language_system">Default sistem (%1$s)</string> + <string name="setup_language_system_short">Default sistem</string> + <string name="setup_app_scale">Skala aplikasi</string> + <string name="setup_app_scale_hint">Teks dan kontrol DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (Default)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Tampilan peluncur</string> + <string name="setup_home">Gunakan sebagai Layar Utama</string> + <string name="setup_home_on">DroidDeck dapat menjadi aplikasi Utama</string> + <string name="setup_home_off">DroidDeck tidak pernah ditawarkan sebagai aplikasi Utama</string> + <string name="setup_orientation">Orientasi</string> + <string name="setup_orientation_auto">Lanskap otomatis</string> + <string name="setup_orientation_landscape">Lanskap</string> + <string name="setup_orientation_reverse">Lanskap terbalik</string> + <string name="setup_fullscreen">Layar penuh</string> + <string name="setup_fullscreen_on">Menyembunyikan bilah status dan navigasi Android</string> + <string name="setup_fullscreen_off">Menampilkan bilah status dan navigasi Android</string> + <string name="setup_default_home">Aplikasi Utama default</string> + <string name="setup_choose_home">Pilih aplikasi Utama</string> + <string name="setup_choose">Pilih</string> + <string name="setup_linux_apps">Aplikasi Linux (beta)</string> + <string name="setup_tool_files">File</string> + <string name="setup_tool_files_hint">Jelajahi dan kelola file</string> + <string name="setup_tool_protons">Versi Proton</string> + <string name="setup_tool_protons_hint">Instal build Proton ARM64</string> + <string name="setup_tool_performance">Performa</string> + <string name="setup_tool_performance_hint">Penugasan inti CPU</string> + <string name="setup_tool_roms">Folder ROM</string> + <string name="setup_tool_roms_hint">Tempat gim emulator disimpan</string> + <string name="setup_card_components">Komponen</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Kontrol</string> + <string name="setup_card_controls_hint">Pemetaan tombol</string> + <string name="store_tab_discover">Temukan</string> + <string name="store_tab_search">Cari</string> + <string name="store_tab_installed">Terinstal</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Toko</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak siap</string> + <string name="store_needs_runtime">Instal runtime Linux dari Penyiapan terlebih dahulu.</string> + <string name="store_setup_title">Siapkan Flatpak</string> + <string name="store_setup_text">Menambahkan Flatpak dan menghubungkannya ke Flathub (sekitar 20 MB). Aplikasi pertama juga mengunduh runtime-nya.</string> + <string name="store_setting_up">Menyiapkan…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Pembaruan</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Memulai…</string> + <string name="store_categories">Kategori</string> + <string name="store_unreachable">Tidak dapat menjangkau Flathub. Periksa koneksi Anda dan coba lagi.</string> + <string name="store_try_again">Coba lagi</string> + <string name="store_search_label">Cari di Flathub</string> + <string name="store_search_placeholder">Firefox, gim, emulator…</string> + <string name="store_search">Cari</string> + <string name="store_all">Semua</string> + <string name="store_searching">Mencari…</string> + <string name="store_search_hint">Cari berdasarkan nama atau pilih kategori. Hanya aplikasi ARM64 yang ditampilkan.</string> + <string name="store_no_results">Tidak ada aplikasi ARM64 di Flathub yang cocok.</string> + <string name="store_results">Hasil</string> + <string name="store_check_updates">Periksa pembaruan</string> + <string name="store_update_all">Perbarui semua (%1$d)</string> + <string name="store_all_current">● Semuanya sudah terbaru</string> + <string name="store_no_apps">Belum ada aplikasi. Temukan di tab Temukan atau Cari.</string> + <string name="store_setup_first_note">Siapkan Flatpak untuk menginstal aplikasi.</string> + <string name="store_update_available_prefix">Pembaruan tersedia · %1$s</string> + <string name="store_open">Buka</string> + <string name="store_details">Detail</string> + <string name="store_remove">Hapus</string> + <string name="store_press_again">Tekan lagi untuk menghapus</string> + <string name="store_installing">Menginstal…</string> + <string name="store_install">Instal</string> + <string name="store_setup_first">Siapkan Flatpak terlebih dahulu</string> + <string name="store_download_size">Unduhan %1$s</string> + <string name="store_installed_chip">● Terinstal</string> + <string name="store_details_failed">Tidak dapat memuat halaman Flathub aplikasi ini.</string> + <string name="store_loading">Memuat dari Flathub…</string> + <string name="store_no_arm">Tidak ada build ARM64 di Flathub, sehingga tidak dapat diinstal di sini.</string> + <string name="store_screenshots">Tangkapan layar</string> + <string name="store_about">Tentang</string> + <string name="store_app_id">ID aplikasi</string> + <string name="store_license">Lisensi</string> + <string name="store_runtime">Runtime</string> + <string name="store_installed_size">Ukuran terinstal</string> + <string name="store_installed_size_value">%1$s (ditambah runtime bersamanya)</string> + <string name="store_website">Situs web</string> + <string name="store_verified">Terverifikasi</string> + <string name="upd_title">Pembaruan</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Diperiksa %1$s</string> + <string name="upd_not_checked">Belum diperiksa</string> + <string name="upd_perm_title">Izinkan DroidDeck memperbarui dirinya sendiri</string> + <string name="upd_perm_text">Pada layar berikutnya, aktifkan Izinkan dari sumber ini, lalu kembali. Pembaruan akan berlanjut secara otomatis.</string> + <string name="upd_open_settings">Buka setelan</string> + <string name="upd_not_now">Nanti saja</string> + <string name="upd_signed_status">Ditandatangani berbeda</string> + <string name="upd_signed_headline">Tidak dapat memperbarui di tempat</string> + <string name="upd_signed_detail">Salinan ini tidak ditandatangani dengan kunci rilis DroidDeck, sehingga pembaruan tidak dapat diinstal menimpanya. Hapus instalasinya untuk beralih.</string> + <string name="upd_available">Pembaruan tersedia</string> + <string name="upd_blocked_status">Tidak dapat diinstal</string> + <string name="upd_switch">Siap untuk beralih</string> + <string name="upd_ahead_status">Lebih baru dari Stable</string> + <string name="upd_ahead_headline">Anda lebih baru dari Stable</string> + <string name="upd_ahead_detail">Build ini lebih baru daripada Stable terbaru. Anda akan beralih ke Stable pada rilis berikutnya.</string> + <string name="upd_gone_status">Pengujian berakhir</string> + <string name="upd_gone_headline">Pengujian ini telah berakhir</string> + <string name="upd_gone_detail">Perbaikannya sudah digabungkan atau dibatalkan. Ikuti Preview untuk perbaikan terbaru.</string> + <string name="upd_current_status">Terbaru</string> + <string name="upd_current_headline">Anda memiliki %1$s terbaru</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Perbarui%1$s</string> + <string name="upd_install_button">Instal%1$s</string> + <string name="upd_install_anyway">Tetap instal Stable %1$s</string> + <string name="upd_follow_preview">Ikuti Preview</string> + <string name="upd_stop_session">Hentikan sesi yang berjalan untuk memperbarui.</string> + <string name="upd_less">Lebih sedikit</string> + <string name="upd_more">Lebih banyak</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Build Preview baru</string> + <string name="upd_new_test">Build pengujian PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">SALURAN PEMBARUAN</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Rilis yang telah diuji, untuk kebanyakan orang</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Perbaikan terbaru, sebelum Stable</string> + <string name="upd_preview_current">Terbaru</string> + <string name="upd_tests">Build pengujian</string> + <string name="upd_tests_hint">Coba perbaikan sebelum dirilis</string> + <string name="upd_tests_none">Tidak ada saat ini</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Tidak dibuat untuk salinan DroidDeck ini</string> + <string name="upd_updated">Diperbarui %1$s</string> + <string name="upd_test_name">pengujian PR #%1$d</string> + <string name="upd_while_ago">beberapa waktu lalu</string> + <string name="upd_just_now">baru saja</string> + <plurals name="upd_tests_count"> + <item quantity="other">%1$d untuk dicoba</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="other">Perubahan sejak build Anda · %1$d build di belakang</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="other">Perubahan terbaru · %1$d build</item> + </plurals> + <string name="gate_title">Satu setelan Android yang harus diubah</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android menghentikan aplikasi yang memulai banyak proses latar belakang, dan Steam memulai puluhan. Sampai ini berubah, gim akan tertutup tanpa pesan kesalahan.</string> + <string name="gate_fix_for_me">Perbaiki untuk saya</string> + <string name="gate_toggle_steps">Aktifkan “Nonaktifkan batasan proses turunan”, lalu kembali. Biarkan Opsi pengembang tetap aktif, atau sakelarnya akan nonaktif lagi.</string> + <string name="gate_open_dev">Buka Opsi pengembang</string> + <string name="gate_no_toggle">Versi Android ini tidak memiliki sakelar untuk itu, sehingga DroidDeck mengubahnya melalui Debugging nirkabel. Membutuhkan waktu sekitar satu menit, tanpa komputer.</string> + <string name="gate_needs_wifi">Debugging nirkabel memerlukan Wi-Fi. Jaringan apa pun berfungsi; tidak perlu internet.</string> + <string name="gate_needs_notifications">Kode pemasangan muncul di notifikasi. Izinkan notifikasi untuk DroidDeck, atau gunakan Cara lain.</string> + <string name="gate_allow_notifications">Izinkan notifikasi</string> + <string name="gate_step1">Buka Setelan → Opsi pengembang → Debugging nirkabel dan aktifkan</string> + <string name="gate_step2">Ketuk “Pasangkan perangkat dengan kode pemasangan”</string> + <string name="gate_step3">Masukkan kode ke notifikasi DroidDeck</string> + <string name="gate_waiting">Menunggu jendela pemasangan…</string> + <string name="gate_code_needed">Jendela ditemukan. Masukkan kodenya di notifikasi.</string> + <string name="gate_status">Status</string> + <string name="gate_polling">Memeriksa setiap 2 detik. Halaman ini akan tertutup saat statusnya nonaktif.</string> + <string name="gate_other_ways">Cara lain</string> + <string name="gate_other_toggle">Debugging nirkabel, alamat manual, ADB komputer</string> + <string name="gate_other_no_toggle">Alamat manual, ADB komputer, Opsi pengembang</string> + <string name="gate_use_wireless_instead">Gunakan Debugging nirkabel sebagai gantinya</string> + <string name="gate_some_roms">Beberapa ROM menambahkan sakelar ini juga. Cari “child process” di Opsi pengembang.</string> + <string name="gate_manual_hint">Jika notifikasinya tidak berfungsi, masukkan sendiri alamat dan kode dari jendela pemasangan.</string> + <string name="gate_enter_manually">Masukkan alamat secara manual</string> + <string name="gate_from_computer">Dari komputer dengan ADB:</string> + <string name="gate_copy_command">Salin perintah</string> + <string name="gate_choose_display">Pilih tampilan tempat membuka Setelan Android.</string> + <string name="gate_main_screen">Layar utama</string> + <string name="wadb_finding_port">Berhasil dipasangkan. Mencari port Debugging nirkabel…</string> + <string name="wadb_enter_port">Berhasil dipasangkan. Masukkan port dari Setelan.</string> + <string name="wadb_applying">Perangkat ditemukan. Menerapkan setelan…</string> + <string name="wadb_apply_failed">Tidak dapat menerapkan secara otomatis. Periksa alamat di bawah dan coba lagi. %1$s</string> + <string name="wadb_title_wireless">Debugging nirkabel</string> + <string name="wadb_title_done">Batas proses turunan diperbarui</string> + <string name="wadb_title">Ubah batas proses turunan</string> + <string name="wadb_lede_compact0">Jika opsinya tidak ada, pasangkan melalui Debugging nirkabel.</string> + <string name="wadb_lede_compact1">Berhasil dipasangkan. Periksa alamat IP dan port di Debugging nirkabel.</string> + <string name="wadb_lede_done">Batas proses turunan telah diperbarui.</string> + <string name="wadb_lede0">Gunakan langkah 2 jika Opsi pengembang tidak memiliki setelan proses turunan. Buka Opsi pengembang → Debugging nirkabel → Pasangkan perangkat dengan kode pemasangan.</string> + <string name="wadb_lede1">Berhasil dipasangkan. Gunakan alamat di bawah, atau perbarui dari Debugging nirkabel → Alamat IP & Port.</string> + <string name="wadb_lede_done_long">Batas proses turunan telah diperbarui melalui Debugging nirkabel.</string> + <string name="wadb_confirmed_on">Android mengonfirmasi batas ini aktif.</string> + <string name="wadb_confirmed_off">Android mengonfirmasi batas ini nonaktif.</string> + <string name="wadb_pair_group">2 · Pasangkan Debugging nirkabel</string> + <string name="wadb_pair_address">Alamat IP & port jendela pemasangan</string> + <string name="wadb_pin">Kode pemasangan (PIN)</string> + <string name="wadb_pin_placeholder">6 digit</string> + <string name="wadb_pair">Pasangkan</string> + <string name="wadb_apply_group">2 · Terapkan melalui Debugging nirkabel</string> + <string name="wadb_connect_address">Alamat IP & port koneksi</string> + <string name="wadb_pair_again">Pasangkan lagi</string> + <string name="wadb_turn_off">Nonaktifkan batas</string> + <string name="wadb_other_ways">Cara lain untuk mengubahnya</string> + <string name="wadb_dev_try_first">1 · Opsi pengembang (coba dahulu)</string> + <string name="wadb_restrict_on">Nonaktifkan “Nonaktifkan batasan proses turunan”.</string> + <string name="wadb_restrict_off">Aktifkan “Nonaktifkan batasan proses turunan”.</string> + <string name="wadb_computer_last">3 · ADB komputer (upaya terakhir)</string> + <string name="wadb_only_if">Hanya jika Debugging nirkabel tidak tersedia.</string> + <string name="wadb_computer_group">3 · ADB komputer (upaya terakhir)</string> + <string name="ctrl_osc_hint">Saat kontrol sentuh muncul dalam sesi</string> + <string name="ctrl_color">Warna</string> + <string name="ctrl_color_hint">Warna tombol di layar</string> + <string name="ctrl_custom">Khusus</string> + <string name="ctrl_opacity">Opasitas</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Ukuran tombol</string> + <string name="ctrl_size_hint" formatted="false">100% adalah ukuran standar</string> + <string name="ctrl_stick_click">Klik stik</string> + <string name="ctrl_stick_click_hint">Ketuk dua kali dan tahan sebuah stik untuk L3 atau R3</string> + <string name="ctrl_adaptive">Stik adaptif</string> + <string name="ctrl_rumble">Getaran gim</string> + <string name="ctrl_steam_button">Tombol Steam</string> + <string name="ctrl_qam_button">Tombol QAM</string> + <string name="ctrl_keyboard_button">Tombol keyboard</string> + <string name="ctrl_select_steam">Tekan Select untuk membuka menu Steam</string> + <string name="ctrl_select_steam_hint">Bukan View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con sebagai pengontrol VR</string> + <string name="ctrl_joycon_vr_hint">Saat SteamVR berjalan, setiap Joy-Con menjadi tangan. Arahkan ke depan lalu tahan Home atau Capture untuk memusatkannya kembali.</string> + <string name="setup_animations">Animasi</string> + <string name="ctrl_adaptive_hint">Stik muncul di tempat Anda menyentuh dan tersembunyi saat dilepas</string> + <string name="ctrl_layout">Tata letak</string> + <string name="ctrl_layout_custom">Posisi khusus disimpan</string> + <string name="ctrl_layout_default">Disesuaikan dengan layar ini</string> + <string name="ctrl_edit">Edit</string> + <string name="ctrl_reset">Reset</string> + <string name="ctrl_mapping">Pemetaan tombol</string> + <string name="ctrl_mapping_default">Setiap tombol mengirim input-nya sendiri</string> + <string name="ctrl_mapping_count">%1$d dari %2$d tombol dipetakan ulang</string> + <string name="ctrl_configure">Konfigurasi</string> + <string name="ctrl_reset_all">Reset pengontrol</string> + <string name="ctrl_reset_all_hint">Mengembalikan semua setelan pengontrol dan tata letak</string> + <string name="ctrl_mapping_lede">Apa yang dikirim setiap tombol di layar ke gim. Tersembunyi menghapus tombol tersebut.</string> + <string name="ctrl_onscreen_buttons">Tombol di layar</string> + <string name="ctrl_defaults">Default</string> + <string name="ctrl_reset_mapping">Reset pemetaan</string> + <string name="content_android_apps">Aplikasi Android</string> + <string name="content_apps_count">%1$d aplikasi</string> + <string name="content_no_android_apps">Tidak ada aplikasi Android yang dapat dijalankan.</string> + <string name="content_desktop_installed">● Desktop terinstal</string> + <string name="content_desktop_first_open">Terinstal saat pertama kali dibuka</string> + <string name="content_available">Tersedia untuk diinstal</string> + <string name="content_not_installed">Belum terinstal.</string> + <string name="content_not_installed_suffix">%1$s · belum terinstal</string> + <string name="content_open_named">Buka %1$s</string> + <string name="content_games">Gim</string> + <string name="content_choose_roms">Pilih folder ROM.</string> + <string name="content_retroarch_roms">Jelajahi ke /root/ROMs di RetroArch.</string> + <string name="content_add_roms">Tambahkan gim %1$s ke ROMs/%2$s.</string> + <string name="content_install_named">Instal %1$s</string> + <string name="content_stop_to_install">Hentikan sesi untuk menginstal</string> + <string name="content_runtime_required">Runtime diperlukan</string> + <string name="content_loading_details">Memuat detail instalasi…</string> + <string name="content_details_unavailable">Detail instalasi tidak tersedia. Coba lagi nanti.</string> + <string name="content_needs_runtime">Instal runtime Linux dari Penyiapan terlebih dahulu.</string> + <string name="content_stop_first">Hentikan sesi yang berjalan untuk menginstal aplikasi desktop.</string> + <string name="content_install_into">Menginstal %1$s ke desktop Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Menyembunyikan menghapusnya dari Desktop. Filenya tetap berada di runtime Linux.</string> + <string name="content_rom_gone">Gim tersebut sudah tidak ada di folder ROMs.</string> + <string name="content_desktop_system">Desktop · %1$s</string> + <string name="content_launch_in">Luncurkan di %1$s</string> + <string name="content_also_in">Juga di %1$s</string> + <string name="content_page_gone">Halaman tersebut sudah tidak ada. Pilih bagian di sebelah kiri.</string> + <string name="content_open_desktop">Buka desktop</string> + <string name="content_install_open_desktop">Instal & buka desktop</string> + <string name="desktop_remove_title">Hapus instalasi desktop</string> + <string name="desktop_remove_text">Hapus desktop dan aplikasi bawaannya. Simpan gim, aplikasi yang ditambahkan, setelan, dan pustaka bersama.</string> + <string name="desktop_removing">Menghapus desktop</string> + <string name="desktop_removed">Desktop dihapus</string> + <string name="desktop_cleaning_legacy">Menghapus file LXQt lama</string> + <string name="desktop_removal_unknown">Perbarui DroidDeck sebelum menghapus versi desktop ini.</string> + <string name="content_linux_desktop">Desktop Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox, dan emulator Anda</string> + <string name="games_empty">Gim yang Anda instal di Steam akan muncul di sini setelah sesi.</string> + <string name="games_play_steam">Mainkan Steam</string> + <string name="games_play_steamvr">Mainkan SteamVR</string> + <string name="games_launch_settings">Setelan peluncuran</string> + <string name="games_launch">Luncurkan</string> + <string name="games_files">File gim</string> + <string name="games_prefix">Prefix Proton</string> + <string name="games_saves_looking">Mencari data simpanan…</string> + <string name="games_saves_none">Tidak ditemukan folder simpanan berdasarkan nama. Ekspor mengambil seluruh folder pengguna.</string> + <string name="games_saves_folders">%1$d folder simpanan</string> + <string name="games_saves_summary">%1$s · %2$d file · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Kelola data simpanan</string> + <string name="games_saves">Data simpanan gim</string> + <string name="games_import_saves">Impor data simpanan…</string> + <string name="games_export_gamehub">Ekspor sebagai zip GameHub…</string> + <string name="games_export_winlator">Ekspor sebagai zip Winlator…</string> + <string name="games_open_save_folder">Buka folder simpanan</string> + <string name="games_never_played">Belum pernah dimainkan</string> + <string name="games_runtime_busy_percent">Runtime sibuk · %1$d%%</string> + <string name="games_runtime_busy">Runtime sibuk</string> + <string name="games_runtime_first_play">Runtime terinstal saat Main pertama kali</string> + <string name="games_runtime_update">Pembaruan runtime tersedia</string> + <string name="games_runtime_ready">● Runtime siap</string> + <string name="games_last_played">Terakhir dimainkan %1$s</string> + <string name="games_internal">Penyimpanan internal</string> + <string name="games_added">Gim ditambahkan</string> + <string name="games_custom">Gim khusus</string> + <string name="games_store_storage">Penyimpanan gim</string> + <string name="gpu_auto_hint">Pasangan terbaik untuk GPU ini, selalu diperbarui</string> + <string name="gpu_manual_hint">Pilih pasangan sendiri</string> + <string name="gpu_checking">Memeriksa driver…</string> + <string name="gpu_none_listed">Belum ada driver yang terdaftar. Segarkan untuk mencarinya.</string> + <string name="gpu_hide_other">Sembunyikan driver untuk GPU lain</string> + <string name="gpu_show_other">Tampilkan driver untuk GPU lain</string> + <string name="gpu_advanced">Lanjutan</string> + <string name="gpu_set_with_display">Diatur bersama driver tampilan: %1$s membawa keduanya.</string> + <string name="gpu_set_with_runtime">Diatur bersama driver runtime: %1$s membawa keduanya.</string> + <string name="gpu_runtime_hint">Digunakan oleh gim dan desktop.</string> + <string name="gpu_runtime_default">Default runtime</string> + <string name="gpu_auto_by_gpu">Otomatis - dipilih berdasarkan GPU</string> + <string name="gpu_manage">Unduh, impor, atau hapus…</string> + <string name="gpu_in_use_caps">DIGUNAKAN</string> + <string name="gpu_builtin">Driver bawaan DroidDeck</string> + <string name="gpu_matched_pair">Driver runtime dan tampilan diatur bersama sebagai pasangan yang cocok.</string> + <string name="gpu_recommended_for">Direkomendasikan untuk GPU ini: %1$s.</string> + <string name="gpu_refresh_hint">Segarkan untuk mencari driver bagi GPU ini.</string> + <string name="gpu_recommended_caps">DIREKOMENDASIKAN</string> + <string name="gpu_unavailable">Tidak tersedia</string> + <string name="load_runtime">Runtime Linux</string> + <string name="load_runtime_detail">Menyiapkan runtime Linux</string> + <string name="load_session">Sesi</string> + <string name="load_session_detail">Memulai tampilan dan audio</string> + <string name="load_steam">Klien Steam</string> + <string name="load_steam_detail">Memeriksa Steam dan alat kompatibilitasnya</string> + <string name="load_opening_steam">Membuka Steam</string> + <string name="load_opening_steam_detail">Menunggu frame pertama Steam</string> + <string name="load_desktop">Desktop</string> + <string name="load_desktop_detail">Menyiapkan desktop</string> + <string name="load_opening">Membuka</string> + <string name="load_opening_detail">Menunggu frame pertama</string> + <string name="load_starting_steam">Memulai Steam</string> + <string name="load_ended">Sesi berakhir</string> + <string name="load_step">Langkah %1$d dari %2$d</string> + <string name="load_steam_paused">Steam dijeda</string> + <string name="deck_tab_grips">Pegangan</string> + <string name="deck_tab_left">Pad kiri</string> + <string name="deck_tab_right">Pad kanan</string> + <string name="deck_tab_both">Keduanya</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Stik</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Beralih antara stik dan trackpad</string> + <string name="deck_more_controls">Kontrol Deck lainnya</string> + <string name="deck_panels">PANEL</string> + <string name="deck_close">Tutup kontrol layar kedua</string> + <string name="deck_open_steam_menu">Buka menu Steam</string> + <string name="deck_left_upper">Kiri · atas</string> + <string name="deck_left_lower">Kiri · bawah</string> + <string name="deck_right_upper">Kanan · atas</string> + <string name="deck_right_lower">Kanan · bawah</string> + <string name="deck_click">Klik</string> + <string name="deck_right_trackpad">Trackpad kanan</string> + <string name="deck_left_trackpad">Trackpad kiri</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Tampilkan keyboard</string> + <string name="second_hide_keyboard">Sembunyikan keyboard</string> + <string name="second_terminal">Terminal Linux</string> + <string name="second_terminal_not_ready">Sesi Linux belum siap untuk terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Game</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Toko</string> + <string name="rail_components">Komponen</string> + <string name="rail_apps">Aplikasi</string> + <string name="rail_setup">Penyiapan</string> + <string name="rail_updates">Pembaruan</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Lanjutkan %1$s</string> + <string name="roms_text">Muncul sebagai /root/ROMs di setiap sesi. Penyimpanan internal berada di /root/Storage.</string> + <string name="roms_none">Belum ada folder yang dipilih</string> + <string name="roms_applies">Berlaku pada sesi berikutnya. Kartu SD juga bisa.</string> + <string name="roms_choose">Pilih folder</string> + <string name="roms_change">Ubah folder</string> + <string name="proton_lede">Instal build Proton ARM64, lalu pilih per game di Steam → Properti → Kompatibilitas.</string> + <string name="proton_stop_first">Hentikan sesi yang berjalan untuk menginstal atau menghapus alat kompatibilitas.</string> + <string name="proton_available">Build yang tersedia</string> + <string name="proton_installed">Terinstal %1$s</string> + <string name="proton_queued">Tertunda dari permintaan sebelumnya</string> + <string name="proton_not_installed">Belum terinstal</string> + <string name="proton_update_available">Pembaruan tersedia → %1$s</string> + <string name="proton_remove_older">Hapus versi %1$s yang lama</string> + <string name="proton_remove_older_body">Menghapus %1$s. Game yang diatur ke versi ini harus dialihkan ke Proton lain.</string> + <string name="proton_remove_body">Game yang diatur ke versi ini harus dialihkan ke Proton lain.</string> + <string name="proton_install_now">Instal sekarang</string> + <string name="proton_cancel_queued">Batalkan antrean</string> + <string name="pckb_android">Keyboard Android</string> + <string name="pckb_hide">Sembunyikan ✕</string> + <string name="main_launch_named">Luncurkan %1$s</string> + <string name="main_choose_screen">Pilih layar. Sekunder: %1$s.</string> + <string name="main_secondary_gone">Layar sekunder tidak lagi tersedia.</string> + <string name="main_primary">Layar utama</string> + <string name="main_secondary">Layar sekunder</string> + <string name="widgets_prev_tab">Tab sebelumnya</string> + <string name="widgets_next_tab">Tab selanjutnya</string> + <string name="widgets_on">Aktif</string> + <string name="widgets_all_n">Semua %1$d</string> + <string name="widgets_none">Tidak ada</string> + <string name="widgets_n_of_m">%1$d dari %2$d</string> + <string name="widgets_off">Nonaktif</string> + <string name="screen_bottom">Layar bawah</string> + <string name="game_env_applies">Berlaku pada peluncuran game berikutnya. Profil khusus game ini menimpa profil bersama.</string> + <string name="game_env_other">Game lain berdasarkan app ID…</string> + <string name="game_env_done">Selesai</string> + <string name="game_env_default">Default</string> + <string name="game_env_off">Nonaktif</string> + <string name="game_env_change">Ubah…</string> + <string name="game_env_change_title">Ubah variabel</string> + <string name="game_env_restore_default">Kembali ke default</string> + <string name="game_env_eyebrow">Game Proton</string> + <string name="pip_title">Gambar dalam gambar</string> + <string name="pip_auto">Otomatis masuk ke mode PiP</string> + <string name="unfolded_controls">Kontrol di layar saat dibuka</string> + <string name="unfolded_controls_hint">Saat dibuka, game berada di atas trackpad dan grip belakang Steam Deck. Saat dilipat, game tampil layar penuh.</string> + <string name="pip_suspended">Ditangguhkan</string> + <string name="pip_not_ready">Gambar dalam gambar tersedia setelah sesi siap.</string> + <string name="pip_permission">Izinkan gambar dalam gambar untuk DroidDeck di setelan Android.</string> + <string name="pip_unavailable">Android tidak dapat membuka gambar dalam gambar.</string> + <string name="game_shortcut">Pintasan</string> + <string name="game_shortcut_add">Tambahkan ke layar utama</string> + <string name="game_shortcut_choose">Pilih game</string> + <string name="game_shortcut_scanning">Memindai game yang terinstal…</string> + <string name="game_link_copy">Salin tautan peluncuran</string> + <string name="game_link_copied">Tautan peluncuran disalin</string> + <string name="game_shortcut_unsupported">Launcher ini tidak dapat menambahkan pintasan. Gunakan Salin tautan peluncuran.</string> + <string name="game_link_invalid">Tautan peluncuran game tidak valid.</string> + <string name="game_link_missing">Game ini tidak lagi ada di pustaka DroidDeck Anda.</string> + <string name="game_link_session_busy">Hentikan sesi saat ini sebelum meluncurkan game Steam.</string> + <string name="game_link_failed">Tidak dapat mengirim game ke Steam. Coba luncurkan lagi.</string> + <string name="setup_retry_removal">Ulangi penghapusan</string> + <string name="runtime_removing">Menghapus</string> + <string name="runtime_removal_incomplete">Penghapusan belum selesai</string> + <string name="game_file_export">Ekspor file game</string> + <string name="game_file_sync">Sinkronkan semua file game ke folder</string> + <string name="game_file_stop_sync">Hentikan sinkronisasi file game</string> + <string name="game_file_folder">Pilih folder untuk file game frontend</string> + <string name="game_file_exported">File game disimpan ke %1$s</string> + <string name="game_frontend_files">File frontend</string> + + <string name="main_wait_runtime">Tunggu operasi runtime selesai</string> + <string name="main_wait_proton_install">Tunggu instalasi alat kompatibilitas selesai</string> + <string name="main_wait_desktop_install">Tunggu instalasi aplikasi desktop selesai</string> + <string name="main_wait_install_game">Tunggu instalasi selesai sebelum meluncurkan game</string> + <string name="main_saves_close_session">Tutup sesi Steam dulu, agar game tidak menyimpan dan menimpa hasil impor</string> + <string name="main_saves_importing">Mengimpor ke %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="other">%1$d file diimpor dari %2$s ke %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="other">%1$d file diimpor dari %2$s ke %3$s. Save lama dicadangkan ke Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Pilih zip save untuk %1$s</string> + <string name="main_saves_exporting">Mengekspor %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="other">%1$d file diekspor sebagai %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Pilih tempat menyimpan %1$s (%2$s)</string> + <string name="main_action_failed">%1$s gagal: %2$s</string> + <string name="main_no_logs_yet">Belum ada log sesi: jalankan sesi dulu.</string> + <string name="main_no_logs_to_clear">Tidak ada log sesi untuk dihapus.</string> + <plurals name="main_logs_cleared"> + <item quantity="other">%1$d folder log sesi dihapus.</item> + </plurals> + <string name="main_wadb_pair_failed">Penyambungan debugging nirkabel gagal</string> + <string name="main_wadb_command_failed">Perintah debugging nirkabel gagal</string> + <string name="main_wadb_unavailable">Debugging nirkabel tidak tersedia</string> + <string name="main_adb_copied">Perintah ADB disalin</string> + <string name="main_pick_roms">Pilih folder ROMs</string> + <string name="main_non_adreno_title">Bukan GPU Adreno</string> + <string name="main_non_adreno_text">Turnip mendukung GPU Adreno. Di %1$s, Steam mungkin menampilkan layar hitam. Unduhan: %2$.0f MB.</string> + <string name="main_install_anyway">Tetap instal</string> + <string name="main_remove_runtime_title">Hapus runtime Linux</string> + <string name="main_remove_runtime_text">Ini menghapus runtime, klien Steam di dalamnya, dan setiap game yang terinstal di sana.</string> + <string name="main_applied">Diterapkan: %1$s</string> + <string name="android_app_open_failed_primary">Tidak dapat membuka %1$s di layar utama</string> + <string name="android_app_open_failed_on">Tidak dapat membuka %1$s di %2$s</string> + <string name="android_app_open_failed_display">Tidak dapat membuka %1$s di layar %2$d</string> + <string name="comp_busy_importing">Mengimpor</string> + <string name="comp_busy_swapping">Mengganti</string> + <string name="comp_busy_restoring">Memulihkan</string> + <string name="comp_busy_cancelling">Membatalkan</string> + <string name="comp_busy_deleting">Menghapus</string> + <string name="comp_cannot_read">tidak dapat membaca file</string> + <string name="comp_imported">Diimpor %1$s</string> + <string name="comp_swap_cancelled">Pergantian yang tertunda dibatalkan.</string> + <string name="comp_pick_wcp">Pilih paket komponen (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nightlies tidak dapat dihubungi</string> + <string name="comp_stored">Disimpan %1$s</string> + <string name="comp_download_failed">Unduhan gagal: %1$s</string> + <string name="drivers_pick_linux">Pilih driver runtime Linux (zip -Linux atau bundle Android + Linux)</string> + <string name="drivers_pick_android">Pilih driver tampilan (zip AdrenoTools atau bundle Android + Linux)</string> + <string name="drivers_pick_any">Pilih zip driver atau bundle Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Menghapus %1$s…</string> + <string name="main_forgetting_named">Melupakan %1$s…</string> + <string name="main_pick_game_storage">Pilih folder penyimpanan game</string> + <string name="main_pick_decky_zip">Pilih ZIP plugin Decky</string> + <string name="main_storage_not_usable">Tidak dapat digunakan: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Menghapus runtime Linux</string> + <string name="main_settings_main_screen">Tidak dapat membuka Setelan di layar bawah; dibuka di layar utama.</string> + <string name="main_open_dev_options">Buka Opsi Pengembang di Setelan</string> + + <string name="upd_unknown_apps_failed">Tidak dapat membuka setelan Android “Instal aplikasi tidak dikenal”</string> + <string name="upd_couldnt_check">Tidak dapat memeriksa: %1$s</string> + <string name="upd_no_download">Build ini tidak memiliki unduhan untuk salinan DroidDeck ini</string> + <string name="upd_stop_first">Hentikan sesi yang berjalan dulu, baru perbarui</string> + <string name="upd_stage_downloading">Mengunduh</string> + <string name="upd_stage_installing">Menginstal</string> + <string name="upd_stage_confirm">Menunggu konfirmasi Anda</string> + <string name="upd_failed">Pembaruan gagal</string> + <string name="upd_not_offered">Android tidak menawarkan untuk menginstal pembaruan</string> + + <string name="decky_install_failed">Instalasi Decky gagal: %1$s</string> + <string name="decky_plugin_starting">Memulai impor plugin…</string> + <string name="decky_plugin_failed">Impor plugin gagal: %1$s</string> + <string name="decky_plugin_installed">Plugin terinstal. Mulai ulang Steam untuk memuatnya.</string> + + <string name="drivers_not_checked">Belum diperiksa - ketuk refresh untuk mencari driver baru</string> + <string name="drivers_bundle_sets_display">Android + Linux: mengatur driver tampilan dengannya</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: mengatur driver runtime dengannya</string> + <string name="drivers_runtime_builtin">Turnip bawaan runtime</string> + <string name="drivers_system_vulkan">Vulkan sistem: tidak ada build bawaan untuk GPU ini</string> + <string name="drivers_bundled">%1$s (bawaan)</string> + <string name="drivers_manual">Manual</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Hanya satu bagian yang dirilis saat ini</string> + <string name="drivers_pair_size">%1$.0f MB untuk keduanya</string> + <string name="drivers_none_to_set">Tidak ada driver untuk diatur: %1$s</string> + <string name="drivers_checking_latest">Memeriksa driver terbaru…</string> + <string name="drivers_up_to_date_check_failed">Sudah terbaru (tidak dapat memeriksa: %1$s)</string> + <string name="drivers_recommended_unpublished">Driver yang direkomendasikan belum dirilis saat ini</string> + <string name="drivers_downloading_pair">Mengunduh %1$s %2$s…</string> + <string name="drivers_updated_to">Diperbarui ke %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Diperbarui ke %1$s %2$s. Driver tampilan berlaku setelah DroidDeck dimulai ulang.</string> + <string name="drivers_auto_waits_for_session">Pembaruan driver menunggu sesi berhenti.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s akan diunduh setelah keluar dari data seluler dan penghemat baterai.</string> + <string name="drivers_skipping_bad">%1$s %2$s tidak memulai sesi di sini, jadi Otomatis tetap memakai driver yang berhasil.</string> + <string name="drivers_rolled_back">%1$s gagal memulai sesi dua kali, jadi Otomatis kembali ke driver yang berfungsi.</string> + <string name="drivers_switched_to">Beralih ke %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Beralih ke %1$s %2$s. Driver tampilan berlaku setelah DroidDeck dimulai ulang.</string> + <string name="drivers_using">Menggunakan %1$s %2$s.</string> + <string name="drivers_using_restart">Menggunakan %1$s %2$s. Driver tampilan berlaku setelah DroidDeck dimulai ulang.</string> + <string name="drivers_using_quest">Driver tampilan bawaan Quest dan runtime bawaan sedang dipakai.</string> + <string name="drivers_using_quest_restart">Driver tampilan bawaan Quest dan runtime bawaan sedang dipakai. Driver tampilan berlaku setelah DroidDeck dimulai ulang.</string> + <string name="drivers_not_a_driver">Bukan zip driver: bukan driver AdrenoTools, Turnip -Linux, maupun bundle Android + Linux</string> + <string name="drivers_import_failed">Impor gagal: %1$s</string> + <string name="drivers_imported_unnamed">Driver diimpor</string> + <string name="drivers_using_bundle">Menggunakan %1$s sebagai driver runtime dan tampilan.</string> + <string name="drivers_using_bundle_restart">Menggunakan %1$s sebagai driver runtime dan tampilan. Driver tampilan berlaku setelah DroidDeck dimulai ulang.</string> + <string name="drivers_deleted_bundle">Dihapus %1$s (kedua driver)</string> + <string name="drivers_deleted">Dihapus %1$s</string> + <string name="drivers_release_status">Terbaru: %1$s · diperiksa %2$s</string> + <string name="drivers_release_status_failed">Terbaru: %1$s · %2$s tidak dapat dihubungi · diperiksa %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="other">%1$d mnt lalu</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="other">%1$d jam lalu</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="other">%1$d hari lalu</item> + </plurals> + <string name="drivers_checking_sources">Memeriksa Banners-Turnip, WinNative, dan DroidDeck…</string> + <string name="drivers_check_failed">pemeriksaan gagal</string> + <string name="drivers_installed_pick_either">Terinstal %1$s - pilih di salah satu daftar untuk mengatur kedua driver</string> + <string name="drivers_installed_pick">Terinstal %1$s - pilih di menu</string> + + <string name="session_wait_removal">Tunggu penghapusan runtime selesai</string> + <string name="session_title_game">Game</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">langsung</string> + <string name="session_swap_failed">Pergantian gagal: %1$s</string> + <string name="session_profile_save_failed">Penyimpanan profil gagal: %1$s</string> + <string name="session_desktop_paused">Desktop dijeda</string> + <string name="session_named_paused">%1$s dijeda</string> + <string name="session_program_paused">Program dijeda</string> + <string name="session_starting_desktop">Memulai desktop</string> + <string name="session_starting_named">Memulai %1$s</string> + <string name="session_starting_program">Memulai program</string> + <string name="session_no_logs">Tidak ada log untuk sesi ini.</string> + <string name="session_logs_archive_failed">Tidak dapat membuat arsip log sesi.</string> + <string name="session_logs_share_failed">Tidak dapat membagikan log sesi.</string> + <string name="session_starting_session">Memulai sesi…</string> + <string name="session_runtime_downloading">mengunduh runtime Linux</string> + <string name="session_runtime_downloading_mb">mengunduh runtime Linux · %1$d dari %2$d MB</string> + <string name="session_runtime_checking">memeriksa runtime Linux</string> + <string name="session_runtime_unpacking">mengekstrak runtime Linux</string> + <string name="session_desktop_downloading">mengunduh desktop</string> + <string name="session_desktop_downloading_mb">mengunduh desktop · %1$d dari %2$d MB</string> + <string name="session_desktop_checking">memeriksa desktop</string> + <string name="session_desktop_unpacking">mengekstrak desktop</string> + <string name="session_proton_downloading">mengunduh Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">mengunduh Proton Experimental (ARM64) · %1$d dari %2$d MB</string> + <string name="session_proton_checking">memeriksa Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">mengekstrak Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Tidak dapat menghubungi katalog runtime. Periksa koneksi dan tekan Mainkan lagi.</string> + <string name="session_runtime_install_failed">Runtime Linux tidak terinstal. Periksa runtime di Penyiapan dan tekan Mainkan lagi.</string> + <string name="session_desktop_install_failed">Desktop tidak terinstal (%1$s). Periksa koneksi dan tekan Desktop lagi.</string> + <string name="session_ended_named">%1$s berhenti secara tak terduga. Bagikan log bersama laporan bug, atau coba lagi.</string> + <string name="session_ended_program">Program berhenti secara tak terduga. Bagikan log bersama laporan bug, atau coba lagi.</string> + <string name="session_ended_desktop">Desktop berhenti secara tak terduga. Bagikan log bersama laporan bug, atau coba lagi.</string> + <string name="session_ended_detail">Status keluar %1$d · %2$s</string> + <string name="session_ended_no_log">tidak ada log</string> + <plurals name="session_hint_enosys"> + <item quantity="other">Log menunjukkan %1$d error “Function not implemented”: akselerasi seccomp proot gagal pada salah satu helper di perangkat ini. Coba %2$s → “%3$s” (atau “%4$s”) lalu mulai lagi.</item> + </plurals> + + <string name="mode_decky_plugins">Plugin</string> + <string name="mode_decky_plugins_hint">Instal file ZIP plugin untuk sesi Steam berikutnya.</string> + <string name="mode_decky_plugin_downloading">Mengunduh…</string> + <string name="mode_decky_plugin_install_zip">Instal dari ZIP</string> + <string name="store_cat_games">Gim</string> + <string name="store_cat_audio_video">Audio & Video</string> + <string name="store_cat_graphics">Grafis</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Perkantoran</string> + <string name="store_cat_developer">Pengembang</string> + <string name="store_cat_education">Pendidikan</string> + <string name="store_cat_science">Sains</string> + <string name="store_cat_system">Sistem</string> + <string name="store_cat_utilities">Utilitas</string> + <string name="store_section_popular">Populer</string> + <string name="store_section_trending">Tren</string> + <string name="store_section_new">Baru</string> + <string name="store_section_updated">Diperbarui</string> + <string name="store_section_loading">memuat…</string> + <string name="store_flatpak_setup">Penyiapan Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Tidak dapat memeriksa pembaruan di Flathub</string> + <string name="content_rom_installed">terinstal</string> + <string name="content_rom_folder">folder</string> + <string name="theme_graphite">Graphite</string> + <string name="theme_graphite_detail">Permukaan graphite, dengan biru orb khas logo untuk semua yang dipilih, difokuskan, atau ditekan.</string> + <string name="theme_paper">Kertas di atas hitam</string> + <string name="theme_paper_detail">Putih adalah warna utama, biru pada ikon menjadi sinyal untuk garis, cincin, dan titik.</string> + <string name="theme_icon_blue">Biru ikon</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Instal runtime terlebih dahulu</string> + <string name="game_sync_err_steam_library">Pustaka Steam tidak tersedia</string> + <string name="game_sync_err_previous_sd">Pustaka SD sebelumnya tidak tersedia</string> + <string name="game_sync_err_game_storage">Penyimpanan gim tidak tersedia</string> + <string name="game_sync_err_added_games">Folder gim yang ditambahkan tidak tersedia</string> + <string name="game_sync_err_manifests">Manifes Steam tidak tersedia</string> + <string name="content_system_many">Banyak sistem</string> + <string name="fm_drive_internal">Internal</string> + <string name="fm_drive_linux">Sistem Linux</string> + <string name="fm_drive_sd">Kartu SD</string> + <string name="fm_drive_storage">Penyimpanan</string> + <string name="fm_select">Pilih</string> + <string name="fm_properties">Properti</string> + <string name="fm_favorite_add">Tambahkan ke Favorit</string> + <string name="fm_favorite_remove">Hapus dari Favorit</string> + <string name="fm_rename">Ganti nama</string> + <string name="fm_copy">Salin</string> + <string name="fm_cut">Potong</string> + <string name="fm_actions">Tindakan</string> + <string name="fm_favorites">Favorit</string> + <string name="fm_pin_current">Sematkan folder saat ini</string> + <string name="fm_no_favorites">Belum ada favorit - sematkan folder dengan menu ⋮-nya untuk kembali ke sini dengan cepat.</string> + <string name="fm_unpin_favorite">Hapus dari favorit</string> + <string name="fm_size_zero">0 byte</string> + <string name="fm_unit_bytes">byte</string> + <string name="fm_prop_location">Lokasi</string> + <string name="fm_prop_type">Jenis</string> + <string name="fm_prop_size">Ukuran</string> + <string name="fm_prop_modified">Diubah</string> + <string name="fm_type_folder">Folder</string> + <string name="fm_type_file">File</string> + <string name="fm_type_ext_file">File %1$s</string> + <string name="fm_read_only">Hanya-baca</string> + <string name="fm_read_only_hint">Mencegah gim (dan Wine) menimpa atau menghapus file ini.</string> + <string name="fm_read_only_failed">Tidak dapat mengubah Hanya-baca</string> + <string name="fm_hidden">Tersembunyi</string> + <string name="fm_hidden_unsupported">Penyimpanan ini tidak dapat menyimpan tanda tersembunyi.</string> + <string name="fm_hidden_hint">Menandai file tersembunyi di Windows (atribut tersembunyi milik Wine).</string> + <string name="fm_hidden_failed">Tidak dapat mengubah Tersembunyi pada penyimpanan ini</string> + <string name="fm_done">Selesai</string> + <string name="fm_op_deleting">Menghapus...</string> + <string name="fm_delete_failed">Penghapusan gagal</string> + <string name="fm_op_moving">Memindahkan...</string> + <string name="fm_op_copying">Menyalin...</string> + <string name="fm_op_moving_item">Memindahkan - %1$s</string> + <string name="fm_op_copying_item">Menyalin - %1$s</string> + <string name="fm_op_moving_batch">Memindahkan %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Menyalin %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d selesai, %2$d gagal</string> + <string name="fm_paste_skipped">%1$d selesai, %2$d dilewati</string> + <plurals name="fm_paste_moved"> + <item quantity="other">%1$d item dipindahkan</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="other">%1$d item disalin</item> + </plurals> + <string name="fm_already_exists">\"%1$s\" sudah ada</string> + <string name="fm_op_renaming">Mengganti nama...</string> + <string name="fm_rename_failed">Gagal mengganti nama</string> + <string name="fm_op_creating_folder">Membuat folder...</string> + <string name="fm_create_folder_failed">Tidak dapat membuat folder</string> + <string name="fm_new_folder">Folder Baru</string> + <string name="fm_folder_name">Nama folder</string> + <string name="fm_create">Buat</string> + <string name="fm_new_name">Nama baru</string> + <string name="fm_delete_title">Hapus?</string> + <string name="fm_delete_text">Hapus \"%1$s\" secara permanen?</string> + <plurals name="fm_delete_items_title"> + <item quantity="other">Hapus %1$d item?</item> + </plurals> + <string name="fm_cannot_undo">Ini tidak dapat dibatalkan.</string> + <plurals name="fm_and_more"> + <item quantity="other">…dan %1$d lainnya</item> + </plurals> + <string name="fm_op_deleting_batch">Menghapus %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="other">%1$d tidak dapat dihapus</item> + </plurals> + <string name="fm_conflict_merge_hint">Gabungkan menambahkan dan mengganti file di dalam folder yang sudah ada.</string> + <string name="fm_conflict_overwrite_hint">Timpa mengganti file yang sudah ada.</string> + <string name="fm_conflict_apply_all">Terapkan ke semua konflik</string> + <string name="fm_conflict_merge">Gabungkan</string> + <string name="fm_conflict_overwrite">Timpa</string> + <string name="fm_conflict_keep_both">Simpan keduanya</string> + <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_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> + <string name="fm_search">Cari</string> + <string name="fm_sort">Urutkan</string> + <string name="fm_sort_name">Nama</string> + <string name="fm_sort_date">Tanggal diubah</string> + <string name="fm_rows_comfortable">Baris nyaman</string> + <string name="fm_rows_compact">Baris ringkas</string> + <string name="fm_hide_hidden">Sembunyikan file tersembunyi</string> + <string name="fm_show_hidden">Tampilkan file tersembunyi</string> + <string name="fm_hide_favorites">Sembunyikan favorit</string> + <string name="fm_show_favorites">Tampilkan favorit</string> + <string name="fm_filter_folder">Filter folder ini</string> + <string name="fm_free_space">%1$s bebas</string> + <string name="fm_selected_count">%1$d dipilih</string> + <string name="fm_select_none">Tidak Ada</string> + <string name="fm_select_all">Semua</string> + <string name="fm_paste">Tempel</string> + <plurals name="fm_items"> + <item quantity="other">%1$d item</item> + </plurals> + <string name="fm_paste_here">Tempel %1$s di sini</string> + <string name="fm_paste_move_here">Tempel %1$s (pindahkan) di sini</string> + <string name="fm_rail_title">File</string> + <string name="fm_rail_storage">PENYIMPANAN</string> + <string name="fm_rail_quick">CEPAT</string> + <string name="fm_rail_favorites">FAVORIT</string> + <string name="fm_rail_downloads">Unduhan</string> + <string name="fm_rail_downloads_short">Unduhan</string> + <string name="fm_rail_roms">ROM</string> + <string name="fm_rail_session_logs">Log sesi</string> + <string name="fm_rail_pictures">Gambar</string> + <string name="fm_favorite_added">\"%1$s\" ditambahkan ke Favorit</string> + <string name="fm_favorite_removed">\"%1$s\" dihapus dari Favorit</string> + <string name="fm_empty_directory">Direktori kosong</string> + <string name="fm_up_one_level">Naik satu tingkat</string> + <string name="fm_choose_folder">Pilih folder</string> + <string name="fm_choose_file">Pilih file</string> + <string name="ctrl_tint_steam_blue">Biru Steam</string> + <string name="ctrl_tint_sky">Langit</string> + <string name="ctrl_tint_white">Putih</string> + <string name="ctrl_tint_violet">Violet</string> + <string name="ctrl_tint_green">Hijau</string> + <string name="ctrl_tint_amber">Amber</string> + <string name="ctrl_tint_red">Merah</string> + <string name="ctrl_tint_pink">Merah muda</string> + <string name="ctrl_button_a">Tombol A</string> + <string name="ctrl_button_b">Tombol B</string> + <string name="ctrl_button_x">Tombol X</string> + <string name="ctrl_button_y">Tombol Y</string> + <string name="ctrl_button_lb">Bumper kiri</string> + <string name="ctrl_button_rb">Bumper kanan</string> + <string name="ctrl_button_lt">Trigger kiri</string> + <string name="ctrl_button_rt">Trigger kanan</string> + <string name="ctrl_button_view">Tombol View</string> + <string name="ctrl_button_menu">Tombol Menu</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad atas</string> + <string name="ctrl_target_down">D-pad bawah</string> + <string name="ctrl_target_left">D-pad kiri</string> + <string name="ctrl_target_right">D-pad kanan</string> + <string name="ctrl_target_hidden">Tersembunyi</string> + <string name="ctrl_editor_drag">Seret untuk memindahkan</string> + <string name="ctrl_editor_snap">Ratakan</string> + <string name="ctrl_editor_save">Simpan</string> + <string name="second_mode_none">Tidak ada</string> + <string name="second_mode_keyboard_trackpad">Keyboard + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Pegangan Deck + trackpad</string> + + <string name="rtinst_removing">Menghapus runtime Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="other">Menghapus runtime Linux · %1$d entri</item> + </plurals> + <string name="rtinst_removed">Runtime Linux dihapus</string> + <string name="rtinst_removal_failed">Tidak dapat menyelesaikan penghapusan runtime Linux. Coba hapus lagi di Penyiapan.</string> + <string name="rtinst_removing_leftovers">Menghapus sisa runtime</string> + <string name="rtinst_downloading">Mengunduh</string> + <string name="rtinst_verifying">Memverifikasi</string> + <string name="rtinst_extracting">Mengekstrak</string> + <string name="rtinst_channel_description">Ditampilkan saat runtime Linux diinstal atau dihapus</string> + <string name="rtinst_title_installing">Menginstal runtime Linux</string> + <string name="rtinst_title_removing">Menghapus runtime Linux</string> + + <string name="deskpkg_runtime_missing">Runtime Linux tidak terinstal</string> + <string name="deskpkg_no_checksum">Katalog tidak memiliki checksum untuk %1$s</string> + <string name="deskpkg_checksum_mismatch">Checksum tidak cocok - tidak ada yang diubah</string> + <string name="deskpkg_installing">Menginstal %1$s</string> + <string name="deskpkg_place_failed">Tidak dapat menempatkan AppImage</string> + <string name="deskpkg_extract_failed">Ekstraksi gagal</string> + <string name="deskpkg_install_failed">Instalasi gagal</string> + + <string name="flatpakmgr_setup_failed">Penyiapan Flatpak gagal (keluar %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Penyiapan Flatpak tidak selesai</string> + <string name="flatpakmgr_busy">Tugas toko lainnya sedang berjalan</string> + <string name="flatpakmgr_not_ready">Siapkan Flatpak terlebih dahulu</string> + <string name="flatpakmgr_starting">Memulai</string> + <string name="flatpakmgr_exit_status">Flatpak keluar dengan status %1$d</string> + <string name="flatpakmgr_installing">Menginstal %1$s</string> + <string name="flatpakmgr_updating">Memperbarui %1$s</string> + <string name="flatpakmgr_removing">Menghapus %1$s</string> + <string name="flatpakmgr_installing_step">Menginstal %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Memperbarui %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Menghapus %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">terjemahan</string> + <string name="flatpakmgr_ref_graphics_drivers">driver grafis</string> + <string name="flatpakmgr_ref_media_codecs">kodek media</string> + <string name="flatpakmgr_ref_runtime">Runtime %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">Runtime %1$s %2$s</string> + + <string name="appimg_too_small">File terlalu kecil untuk menjadi AppImage</string> + <string name="appimg_unreadable">File tidak dapat dibaca: %1$s</string> + <string name="appimg_not_linux">Ini bukan AppImage (bukan program Linux)</string> + <string name="appimg_wrong_arch">AppImage ini tidak dibuat untuk ARM64 (aarch64) maupun PC x86</string> + <string name="appimg_not_appimage">Ini adalah program Linux tetapi bukan AppImage</string> + <string name="appimg_wrong_type">Hanya AppImage tipe 2 yang dapat diimpor (yang ini tipe %1$d)</string> + <string name="appimg_no_space_import">Ruang kosong tidak cukup: mengimpor memerlukan sekitar %1$s</string> + <string name="appimg_no_space_update">Ruang kosong tidak cukup: memperbarui memerlukan sekitar %1$s</string> + <string name="appimg_import_failed">Impor gagal</string> + <string name="appimg_gone">AppImage itu sudah tidak ada</string> + <string name="appimg_update_failed">Pembaruan gagal</string> + <string name="appimg_extracting">Mengekstrak %1$s</string> + <string name="appimg_extract_failed">AppImage tidak dapat diekstrak</string> + <string name="appimg_extract_failed_detail">AppImage tidak dapat diekstrak: %1$s</string> + + <string name="deckymgr_stop_session_loader">Hentikan sesi aktif sebelum menginstal Decky Loader</string> + <string name="deckymgr_download_failed">Unduhan Decky Loader gagal</string> + <string name="deckymgr_size_mismatch">Ukuran Decky Loader tidak sesuai dengan metadata rilis</string> + <string name="deckymgr_checksum_download_failed">Tidak dapat mengunduh checksum rilis</string> + <string name="deckymgr_checksum_missing">Checksum rilis tidak ada</string> + <string name="deckymgr_checksum_invalid">Checksum rilis tidak valid</string> + <string name="deckymgr_checksum_mismatch">Checksum Decky Loader tidak cocok</string> + <string name="deckymgr_not_elf">Aset rilis bukan file eksekusi Linux 64-bit yang kompatibel</string> + <string name="deckymgr_session_started_loader">Sesi dimulai saat pengunduhan berlangsung; hentikan sesi tersebut sebelum menginstal Decky Loader</string> + <string name="deckymgr_loader_not_executable">Tidak dapat menandai PluginLoader sebagai dapat dieksekusi</string> + <string name="deckymgr_cef_failed">Tidak dapat mengaktifkan debugging jarak jauh CEF Steam</string> + <string name="deckymgr_stage_failed">Tidak dapat menyiapkan PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Tidak dapat mempertahankan PluginLoader yang ada</string> + <string name="deckymgr_loader_activate_failed">Tidak dapat mengaktifkan PluginLoader baru</string> + <string name="deckymgr_stop_session_plugin">Hentikan sesi aktif sebelum menginstal plugin</string> + <string name="deckymgr_loader_required">Instal Decky Loader sebelum mengimpor plugin</string> + <string name="deckymgr_zip_unreadable">Tidak dapat membaca file ZIP yang dipilih</string> + <string name="deckymgr_plugins_dir_failed">Tidak dapat membuat direktori plugin Decky</string> + <string name="deckymgr_extracting_zip">Mengekstrak ZIP plugin</string> + <string name="deckymgr_zip_one_folder">ZIP plugin harus berisi satu folder plugin tingkat atas</string> + <string name="deckymgr_zip_missing_files">ZIP plugin tidak memiliki plugin.json, package.json, atau dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Nama plugin tidak ada</string> + <string name="deckymgr_session_started_plugin">Sesi dimulai saat instalasi berlangsung; hentikan sesi tersebut sebelum menginstal plugin</string> + <string name="deckymgr_plugin_installed">Plugin terinstal · mulai ulang Steam untuk memuatnya</string> + <string name="deckymgr_plugin_install_failed">Instalasi ZIP plugin gagal</string> + <string name="deckymgr_zip_too_many">ZIP plugin berisi terlalu banyak entri</string> + <string name="deckymgr_zip_invalid_path">ZIP plugin berisi jalur yang tidak valid</string> + <string name="deckymgr_zip_duplicate_paths">ZIP plugin berisi jalur duplikat</string> + <string name="deckymgr_zip_unsafe_path">ZIP plugin berisi jalur yang tidak aman</string> + <string name="deckymgr_folder_failed">Tidak dapat membuat folder plugin</string> + <string name="deckymgr_zip_too_large">ZIP plugin mengembang melebihi batas 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Tidak dapat menandai biner plugin bawaan sebagai dapat dieksekusi</string> + <string name="deckymgr_remote_entry_invalid">Entri remote_binary tidak valid</string> + <string name="deckymgr_remote_name_invalid">Nama biner jarak jauh tidak valid</string> + <string name="deckymgr_remote_url_https">URL biner jarak jauh harus menggunakan HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Biner jarak jauh %1$s memiliki hash SHA-256 yang tidak valid</string> + <string name="deckymgr_bin_dir_failed">Tidak dapat membuat direktori bin plugin</string> + <string name="deckymgr_downloading_binary">Mengunduh biner plugin · %1$s</string> + <string name="deckymgr_binary_download_failed">Tidak dapat mengunduh biner plugin %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Checksum biner plugin tidak cocok · %1$s</string> + <string name="deckymgr_binary_not_executable">Tidak dapat menandai biner plugin sebagai dapat dieksekusi · %1$s</string> + <string name="deckymgr_binary_replace_failed">Tidak dapat mengganti biner plugin · %1$s</string> + <string name="deckymgr_binary_install_failed">Tidak dapat menginstal biner plugin · %1$s</string> + <string name="deckymgr_folder_taken">Folder plugin milik plugin lain</string> + <string name="deckymgr_preserve_failed">Tidak dapat mempertahankan plugin yang ada</string> + <string name="deckymgr_activate_failed">Tidak dapat mengaktifkan plugin yang diimpor</string> + <string name="deckymgr_settings_failed">Tidak dapat memperbarui setelan plugin Decky</string> + <string name="deckymgr_restore_failed">Tidak dapat memulihkan plugin yang ada</string> + + <string name="adbfix_save_failed">Tidak dapat menyimpan identitas Debugging nirkabel</string> + <string name="adbfix_command_failed">Perintah ADB gagal (%1$d)</string> + <string name="adbfix_not_confirmed">Android tidak mengonfirmasi bahwa batas proses turunan telah diubah: %1$s</string> + <string name="adbfix_no_pairing">Tidak ada pemasangan Debugging nirkabel yang tersimpan</string> + <string name="adbfix_enter_address">Masukkan alamat IP & Port Debugging nirkabel saat ini</string> + + <string name="adbpair_timed_out">Waktu tunggu munculan pemasangan habis. Coba lagi dari DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Tidak dapat mencari munculan pemasangan (%1$d). Pastikan Wi-Fi aktif.</string> + <string name="adbpair_discovery_failed">Tidak dapat mencari munculan pemasangan: %1$s</string> + <string name="adbpair_six_digits">Masukkan ke-6 digit kode tersebut</string> + <string name="adbpair_pairing">Memasangkan…</string> + <string name="adbpair_code_rejected">Kode tersebut tidak berfungsi. Buka kembali munculan pemasangan dan masukkan kode barunya.</string> + <string name="adbpair_connecting">Terpasang. Menghubungkan…</string> + <string name="adbpair_port_not_found">Terpasang, tetapi port Debugging nirkabel tidak ditemukan. Biarkan Debugging nirkabel tetap aktif dan coba lagi.</string> + <string name="adbpair_applying">Menerapkan setelan…</string> + <string name="adbpair_command_failed">Perintah Debugging nirkabel gagal</string> + <string name="adbpair_channel_name">Penyiapan Debugging nirkabel</string> + <string name="adbpair_channel_description">Meminta kode pemasangan Debugging nirkabel saat Setelan terbuka</string> + <string name="adbpair_title_pair">Pasangkan Debugging nirkabel</string> + <string name="adbpair_waiting_text">Aktifkan Debugging nirkabel, lalu ketuk “Pasangkan perangkat dengan kode pemasangan”.</string> + <string name="adbpair_waiting_long">Aktifkan Debugging nirkabel, lalu ketuk “Pasangkan perangkat dengan kode pemasangan”. Tetap di Setelan: kodenya akan muncul di notifikasi ini.</string> + <string name="adbpair_code_label">Kode pemasangan 6 digit</string> + <string name="adbpair_code_hint">Ketuk Masukkan kode dan ketikkan 6 digit yang ditampilkan di Setelan.</string> + <string name="adbpair_title_code">Masukkan kode pemasangan Wi-Fi</string> + <string name="adbpair_title_retry">Coba kode lagi</string> + <string name="adbpair_enter_code">Masukkan kode</string> + <string name="adbpair_title_working">Menyiapkan Steam</string> + <string name="adbpair_title_done">Steam siap</string> + <string name="adbpair_done_text">Ketuk untuk kembali ke DroidDeck. Anda bisa menonaktifkan Debugging nirkabel sekarang.</string> + <string name="adbpair_title_failed">Penyiapan Debugging nirkabel dihentikan</string> + + <string name="selfinst_download_failed">Unduhan gagal</string> + <string name="selfinst_size_mismatch">Ukuran unduhan tidak sesuai dengan APK yang dipublikasikan dan dibuang - coba lagi</string> + <string name="selfinst_checksum_mismatch">Unduhan tidak sesuai dengan checksum-nya dan dibuang - coba lagi</string> + <string name="selfinst_wrong_package">Pembaruan ini untuk paket Android %1$s, bukan %2$s</string> + <string name="selfinst_metadata_signer">Metadata pembaruan tidak mencantumkan kunci penandatanganan rilis DroidDeck</string> + <string name="selfinst_unreadable">Android tidak dapat membaca APK yang diunduh</string> + <string name="selfinst_apk_wrong_package">APK yang diunduh untuk %1$s, bukan %2$s</string> + <string name="selfinst_version_mismatch">APK yang diunduh mencantumkan versionCode %1$d, bukan %2$d yang dipublikasikan</string> + <string name="selfinst_downgrade">Android tidak akan menginstal versionCode %1$d di atas %2$d yang terinstal</string> + <string name="selfinst_no_signing">APK yang diunduh tidak memiliki informasi penandatanganan</string> + <string name="selfinst_wrong_signer">APK yang diunduh tidak ditandatangani dengan kunci rilis DroidDeck</string> + <string name="appupd_http">Katalog pembaruan merespons HTTP %1$d</string> + + <string name="loadstate_starting">Memulai sesi…</string> + <string name="loadstate_elapsed">%1$d:%2$02d berlalu · masih berjalan</string> + <string name="loadstate_steam_update">Mengunduh pembaruan klien Steam · %1$d%%</string> + <string name="loadstate_steam_client">Mengunduh klien Steam · %1$s</string> + + <string name="pextra_busy">Instalasi alat kompatibilitas sedang berjalan</string> + <string name="pextra_stop_session">Hentikan sesi aktif sebelum menginstal alat kompatibilitas</string> + <string name="pextra_no_release">Tidak dapat menemukan rilis ARM64 untuk %1$s</string> + <string name="pextra_no_space">Setidaknya 4 GB ruang kosong ditambah ukuran unduhan diperlukan untuk menginstal %1$s</string> + <string name="pextra_downloading">Mengunduh %1$s %2$s</string> + <string name="pextra_retrying">Mencoba lagi unduhan · percobaan %1$d dari %2$d</string> + <string name="pextra_interrupted">Unduhan terputus</string> + <string name="pextra_download_failed">Unduhan gagal; file sebagian disimpan agar percobaan ulang dapat dilanjutkan</string> + <string name="pextra_too_big">Unduhan melebihi ukuran rilis dan telah dihapus</string> + <string name="pextra_incomplete">Unduhan tidak lengkap; file sebagian disimpan untuk percobaan ulang yang dapat dilanjutkan</string> + <string name="pextra_verifying">Memverifikasi unduhan</string> + <string name="pextra_checksum_unreadable">Tidak dapat membaca checksum rilis; coba lagi</string> + <string name="pextra_no_checksum">%1$s %2$s tidak mempublikasikan checksum; tidak ada yang diinstal</string> + <string name="pextra_checksum_mismatch">Checksum tidak cocok; unduhan telah dihapus</string> + <string name="pextra_session_started">Sesi dimulai saat pengunduhan berlangsung; hentikan sesi tersebut sebelum menginstal alat kompatibilitas</string> + <string name="pextra_installing">Menginstal %1$s</string> + <string name="pextra_install_failed">Instalasi %1$s gagal (keluar %2$d)</string> + <string name="pextra_could_not_install">Tidak dapat menginstal %1$s</string> + <string name="esync_fetching">Mengambil paket droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">dengan helper Linux</string> + <string name="cmgr_fex_dlls_only">Hanya DLL</string> + <string name="cmgr_original_proton_updated">Asli (Proton diperbarui sejak penggantian terakhir)</string> + <string name="cmgr_changed_outside">Diubah di luar Komponen</string> + <string name="cmgr_not_present">tidak ada</string> + <string name="cmgr_original_version">Asli %1$s</string> + <string name="cmgr_original_from">Asli dari %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s akan dipasang ke %3$s saat gim yang berjalan di sana ditutup.</string> + <string name="cmgr_swap_done">%1$s %2$s sekarang ada di %3$s. Berlaku pada peluncuran gim berikutnya.</string> + <string name="cmgr_original_missing">Paket asli tersebut tidak tersimpan</string> + <string name="cmgr_restore_queued">%1$s dari %2$s akan dikembalikan ke aslinya saat gim yang berjalan di sana ditutup.</string> + <string name="cmgr_restore_done">%1$s dari %2$s dipulihkan dari aslinya %3$s.</string> + <string name="cmgr_package_in_use">%1$s sedang digunakan di %2$s. Ganti Proton tersebut ke yang lain terlebih dahulu.</string> + <string name="cmgr_package_not_stored">%1$s tidak tersimpan</string> + <string name="cmgr_deleted">%1$s dihapus.</string> + <string name="cmgr_original_kept">Yang asli dari build terinstal disimpan: itulah cara untuk kembali.</string> + <string name="cmgr_not_stored">Tidak tersimpan</string> + <string name="cmgr_deleted_original">Menghapus yang asli %1$s dari %2$s.</string> + <string name="cmgr_nightlies_only">Unduhan hanya berasal dari rilis Nightlies</string> + <string name="cmgr_list_predates_checksums">Daftar paket ini dibuat sebelum adanya checksum - segarkan dan coba lagi</string> + <string name="cmgr_checksum_mismatch">Checksum tidak cocok</string> + + <string name="sprefs_upscaler_linear">Linear</string> + <string name="sprefs_upscaler_nearest">Nearest</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (kualitas)</string> + <string name="sprefs_upscaler_sharpen">Hanya penajaman</string> + <string name="sprefs_lod_bias_auto">Otomatis (sesuaikan skala)</string> + + <string name="look_off_desc">Tidak ada yang diterapkan.</string> + <string name="look_game_clarity">Kejernihan Gim</string> + <string name="look_game_clarity_desc">Penajaman dengan sedikit kontras - cocok untuk sehari-hari.</string> + <string name="look_vivid">Vivid</string> + <string name="look_vivid_desc">Warna didorong lebih kuat. Deband aktif agar langit tidak bergaris.</string> + <string name="look_cinematic">Sinematik</string> + <string name="look_cinematic_desc">Kontras lebih dalam, warna lebih dingin, tepi dihaluskan.</string> + <string name="look_competitive">Kompetitif</string> + <string name="look_competitive_desc">Bayangan diangkat dan penajaman berat - temukan orang lebih dulu.</string> + <string name="look_adaptive_sharpen">Penajaman Adaptif</string> + <string name="look_adaptive_sharpen_desc">Hanya penajaman, warna tidak diubah.</string> + <string name="look_filmic">Filmic</string> + <string name="look_filmic_desc">Kurva seperti film, sedikit diredam.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Mencolok dan berdampak kuat.</string> + <string name="look_retro_crt">CRT Retro</string> + <string name="look_retro_crt_desc">Tabung CRT dan sinyal analog digabungkan bersama.</string> + <string name="look_upscale_sharp">Upscale Tajam</string> + <string name="look_upscale_sharp_desc">Untuk menjalankan di bawah resolusi panel.</string> + <string name="look_pixel_clean">Piksel Bersih</string> + <string name="look_pixel_clean_desc">Piksel tajam untuk gim 2D dan judul lawas.</string> + <string name="look_anime_edge">Tepi Anime</string> + <string name="look_anime_edge_desc">Garis luar toon ditambah penajaman.</string> + + <string name="gpuinfo_not_adreno">Bukan GPU Adreno</string> + <string name="gpuinfo_supported">Didukung</string> + <string name="gpuinfo_experimental">Eksperimental: drivernya adalah build uji</string> + <string name="gpuinfo_below_tested">Di bawah perangkat keras yang diuji (Adreno 725 dan lebih baru): mungkin tidak dapat berjalan</string> + <string name="gpuinfo_unsupported">Tidak didukung: DroidDeck memerlukan GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Batas kecepatan GitHub tercapai - coba lagi nanti</string> + <string name="turnip_github_http">GitHub merespons HTTP %1$d</string> + <string name="turnip_download_failed">Unduhan gagal</string> + <string name="turnip_list_predates_checksums">Daftar driver ini dibuat sebelum adanya checksum - segarkan dan coba lagi</string> + <string name="turnip_checksum_mismatch">Checksum tidak cocok - unduhan dibuang</string> + <string name="turnip_not_adrenotools">Bukan driver AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">tidak ada meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json tidak dapat dibaca (%1$s)</string> + <string name="turnip_reject_linux_driver">ini adalah driver runtime Linux (impor di bagian “Linux runtime driver”)</string> + <string name="turnip_reject_wayland">ini adalah driver gim Wayland, yang tidak digunakan oleh aplikasi ini</string> + <string name="turnip_reject_no_library_name">meta.json tidak menyebutkan libraryName, sehingga tidak ada yang dapat diserahkan ke AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json menyebutkan %1$s, yang tidak ada di dalam zip</string> + <string name="turnip_reject_not_aarch64">%1$s bukan library bersama ELF AArch64 64-bit</string> + <string name="turnip_reject_glibc">%1$s menautkan glibc - Turnip “-Linux”, yang termasuk di bagian “Linux runtime driver”</string> + <string name="lvd_no_library">Tidak ada libvulkan_freedreno*.so dalam zip ini. Zip Turnip Android (AdrenoTools) atau -Wayland bukan driver runtime Linux.</string> + <string name="lvd_not_aarch64">%1$s bukan library bersama ELF AArch64 64-bit.</string> + <string name="lvd_not_glibc">%1$s bukan driver glibc - ia menautkan libc milik Android. Runtime Linux memerlukan zip “-Linux”; Turnip biasa atau “-Wayland” sama sekali tidak dapat dimuat oleh klien Steam.</string> + <string name="bundle_no_manifest">Bukan paket driver: tidak ada manifest.json yang menyebutkan driver android dan linux</string> + <string name="bundle_entry_outside">Bukan paket driver: %1$s mengarah ke luar paket</string> + <string name="bundle_too_large">Bukan paket driver: ukurannya setelah diekstrak lebih dari %1$d MB</string> + + <string name="gstore_sd_card">Kartu SD</string> + <string name="gstore_folder">Folder</string> + + <string name="logshare_chooser">Bagikan log sesi</string> + + <string name="hdr_needs_android_10">memerlukan Android 10 atau yang lebih baru (lapisan tampilan dengan ruang warna)</string> + <string name="hdr_none">tampilan ini melaporkan tidak ada dukungan HDR</string> + <string name="hdr_not_hdr10">tampilan ini mendukung %1$s, bukan HDR10</string> + + <string name="gpu_this_gpu">GPU ini</string> + <string name="phantom_title_on">Batas proses turunan aktif</string> + <string name="phantom_title_unset">Batas proses turunan belum diatur</string> + <string name="phantom_title_unreadable">Batas proses turunan tidak dapat diperiksa</string> + <string name="phantom_title_off">Batas proses turunan nonaktif</string> + <string name="phantom_title_not_required">Batas proses turunan tidak diperlukan</string> + <string name="phantom_instructions_fix">%1$s Jika itu tidak memungkinkan, sambungkan perangkat ini ke komputer dengan ADB dan jalankan perintah di bawah. Kembali ke sini dan periksa lagi.</string> + <string name="phantom_instructions_off">Sesi Steam dapat dimulai.</string> + <string name="phantom_instructions_not_applicable">Versi Android ini tidak menggunakan batas ini.</string> + <string name="phantom_fix_toggle">Aktifkan “Nonaktifkan batasan proses turunan” di Opsi developer, dan biarkan Opsi developer tetap aktif setelahnya.</string> + <string name="phantom_fix_no_toggle">Versi Android ini tidak memiliki sakelar untuk itu. Gunakan Debugging nirkabel untuk mengubahnya dari perangkat ini.</string> + <string name="upd_block_no_apk">Build ini tidak memiliki unduhan untuk salinan DroidDeck ini.</string> + <string name="upd_block_version_code">Android tidak akan menginstalnya di atas build ini karena versionCode %1$d lebih rendah dari %2$d yang terinstal.</string> + <string name="upd_fail_downgrade">Android tidak akan menginstal versi yang lebih lama di atas versi yang lebih baru. Tetap gunakan build ini sampai saluran tersebut menyusul.</string> + <string name="upd_fail_signature">Salinan DroidDeck ini ditandatangani secara berbeda (build lokal?), sehingga Android tidak akan memperbaruinya di tempat.</string> + <string name="upd_fail_storage">Ruang kosong tidak cukup untuk pembaruan ini.</string> + <string name="upd_fail_aborted">Pembaruan dibatalkan.</string> + <string name="upd_fail_with_message">Pembaruan tidak terinstal: %1$s</string> + <string name="upd_fail_generic">Pembaruan tidak terinstal.</string> + <string name="saves_layout_zip">zip %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s belum pernah dijalankan</string> + <string name="saves_none_found">Tidak ditemukan file simpanan untuk %1$s</string> + <string name="saves_not_save_zip">%1$s tidak memiliki folder drive_c, sehingga bukan zip simpanan GameHub atau Winlator</string> + <string name="gstore_cannot_create">tidak dapat membuat folder di %1$s</string> + <string name="gstore_cannot_write">tidak dapat menulis di %1$s</string> + <string name="gstore_cannot_write_detail">tidak dapat menulis di %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Folder tidak tersedia</string> + <string name="gfiles_name_taken">File lain sudah menggunakan %1$s</string> + <string name="gfiles_art_unavailable">Folder artwork tidak tersedia</string> + <string name="gfiles_unrelated_inventory">Folder memiliki inventaris sinkronisasi yang tidak terkait</string> + <string name="gfiles_remove_failed">Tidak dapat menghapus %1$s</string> + <string name="gfiles_outside_folder">File berada di luar folder ekspor</string> + <string name="cmgr_fex_unnamed">FEX (build tanpa nama versi)</string> + <string name="cmgr_no_profile">tidak ada profile.json di %1$s</string> + <string name="cmgr_not_component_package">%1$s bukan paket komponen Linux (tipe %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s kosong</string> + <string name="mode_storage_auto_short">Otomatis</string> + <string name="appupd_catalog_rejected">Katalog pembaruan gagal dalam pemeriksaannya (%1$s)</string> + <string name="main_adb_clip_label">Setelan proses turunan DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Masuk · mode offline</string> + <string name="setup_signed_in_unnamed">Masuk</string> + <string name="driver_tag_bundled">BAWAAN</string> + <string name="driver_tag_downloaded">DIUNDUH</string> + <string name="driver_tag_imported">DIIMPOR</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Tampilan sesi</string> + <string name="display_resolution">Resolusi</string> + <string name="display_game_fit">Penyesuaian gim 16:9</string> + <string name="display_game_fit_hint">Cara gim 16:9 disesuaikan dengan tampilan ini. Berlaku pada sesi berikutnya.</string> + <string name="display_game_fit_unavailable">Pilih Sesuaikan layar atau ukuran khusus yang lebih sempit dari 16:9.</string> + <string name="display_preserve">Pertahankan proporsi</string> + <string name="display_stretch">Bentangkan ke tampilan</string> + <string name="display_image_scaling">Penskalaan gambar</string> + <string name="display_filter">Filter penskalaan</string> + <string name="display_filter_hint">Digunakan bersama oleh Steam dan Desktop.</string> + <string name="display_filter_live">Berlaku langsung. Digunakan bersama oleh Steam dan Desktop.</string> + <string name="display_filter_note">FSR, GSR, dan NIS berlaku saat memperbesar gambar sesi. Hanya penajaman juga berfungsi tanpa pembesaran.</string> + <string name="display_sharpness">Ketajaman filter</string> + <string name="display_frame_rate">Frame rate</string> + <string name="display_look_filter">%1$s Mengatur skala ke %2$s.</string> + <string name="display_match_screen">Sesuaikan layar (%1$d×%2$d)</string> + <string name="display_follow_screen">Ikuti layar (ukuran berubah saat dilipat atau dibuka)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Tampilkan detail perangkat</string> + <string name="device_info_hide">Sembunyikan detail perangkat</string> + <string name="device_info_loading">Membaca perangkat…</string> + <string name="device_info_copy">Salin</string> + <string name="device_info_copy_hint">Salin detail ini ke dalam laporan bug.</string> + <string name="device_info_copied">Disalin.</string> + <string name="force_ssbs_title">Paksa SSBS</string> + <string name="force_ssbs_hint">Menjaga setelan kecepatan CPU yang terus dinonaktifkan oleh Wine. Dapat membuat gim Windows lebih cepat di Snapdragon 8 Elite; perubahan kecil terlihat pada chip yang lebih lama. Berlaku pada peluncuran gim berikutnya.</string> + + <string name="rail_stores">Toko</string> + <string name="source_steam">Steam</string> + <string name="source_added">Khusus</string> + <string name="setup_stores">Toko</string> + <string name="setup_stores_open_on">Buka toko di</string> + <string name="setup_stores_speed">Tingkat kecepatan unduhan</string> + <string name="setup_stores_engine">Mesin toko</string> + <string name="setup_stores_engine_chip_ready">● Mesin siap</string> + <string name="setup_stores_engine_chip_missing">Belum dibuat</string> + <string name="stores_tier_balanced">Seimbang</string> + <string name="stores_tier_fast">Cepat</string> + <string name="stores_tier_max">Maks</string> + <string name="stores_title">Toko</string> + <string name="stores_settings">Setelan toko</string> + <string name="stores_settings_eyebrow">Setelan</string> + <string name="stores_chip_signed_out">(belum masuk)</string> + <string name="stores_tab_store">Toko</string> + <string name="stores_tab_installed">Terinstal</string> + <string name="stores_tab_library">Pustaka</string> + <string name="stores_tab_all">Semua</string> + <string name="stores_tab_downloads">Unduhan</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Masuk</string> + <string name="stores_signout_named">%1$s · keluar</string> + <string name="stores_signout_title">Keluar dari %1$s?</string> + <string name="stores_signout_note">Gim yang terinstal tetap ada. Pustaka diambil lagi saat Anda masuk kembali.</string> + <string name="stores_signout_stay">Tetap masuk</string> + <string name="stores_signout_go">Keluar</string> + <string name="stores_search_catalog">Cari katalog %1$s…</string> + <string name="stores_search_installed">Cari gim yang terinstal…</string> + <string name="stores_search_library">Cari pustaka Anda…</string> + <string name="stores_search_open">Cari</string> + <string name="stores_installed_empty">Belum ada yang terinstal</string> + <string name="stores_library_loading">Memuat</string> + <string name="stores_nothing_matches">Tidak ada gim</string> + <string name="stores_shelves_loading">Memuat toko…</string> + <string name="stores_amazon_no_catalog">Tidak ada katalog</string> + <string name="stores_shelf_new">Yang baru</string> + <string name="stores_shelf_deals">Penawaran</string> + <string name="stores_shelf_free">Gim gratis</string> + <string name="stores_shelf_trending">Sedang tren</string> + <string name="stores_shelf_library">Pustaka Anda</string> + <string name="stores_play">Mainkan</string> + <string name="stores_install">Instal</string> + <string name="stores_resume_install">Lanjutkan instalasi</string> + <string name="stores_dl_interrupted">Terhenti</string> + <string name="stores_install_size">Instal · %1$s</string> + <string name="stores_get_free">Dapatkan gratis</string> + <string name="stores_view_on">Lihat di %1$s</string> + <string name="stores_buy_price">Beli · %1$s</string> + <string name="stores_installed_chip">Terinstal</string> + <string name="stores_in_library">Dalam pustaka</string> + <string name="stores_free">Gratis</string> + <string name="stores_resume">Lanjutkan</string> + <string name="stores_refresh">Segarkan</string> + <string name="stores_sort">Urutkan</string> + <string name="stores_sort_last_played">Baru dimainkan</string> + <string name="stores_sort_recently_installed">Baru dipasang</string> + <string name="stores_sort_title_asc">Judul A–Z</string> + <string name="stores_sort_title_desc">Judul Z–A</string> + <string name="stores_sort_size_desc">Ukuran: terbesar</string> + <string name="stores_sort_size_asc">Ukuran: terkecil</string> + <string name="stores_sort_release_date">Tanggal rilis</string> + <string name="stores_view_list">Tampilan daftar</string> + <string name="stores_view_cards">Tampilan kartu</string> + <string name="stores_show_mature">Tampilkan konten dewasa</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Nonaktif</string> + <string name="epic_eos">Masuk Epic (EOS)</string> + <string name="epic_offline">Jalankan secara offline</string> + <string name="epic_resolve">Selesaikan masuk Epic</string> + <string name="epic_client_version">Versi %1$s</string> + <string name="epic_client_no_runtime">Instal runtime Linux terlebih dahulu</string> + <string name="epic_client_checking">Memeriksa versi terbaru…</string> + <string name="epic_client_unpacking">Mengekstrak…</string> + <string name="epic_client_unreachable">Server unduhan tidak merespons</string> + <string name="epic_client_needs_fex">Epic Games Launcher memerlukan FEX, yang diunduh oleh Steam. Buka launcher lagi setelah Steam dimulai.</string> + <string name="epic_client_download_failed">Unduhan gagal: %1$s</string> + <string name="epic_client_unpack_failed">Tidak dapat mengekstrak launcher: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher tidak menerima proses masuk. Mulai lagi dari launcher.</string> + <string name="epic_client_uninstall_body">Menghapus peluncur dan mengosongkan ruangnya. Game Epic Anda tetap terpasang dan berfungsi, dan proses masuk disimpan untuk saat memasangnya lagi.</string> + <string name="epic_client_uninstall_stops">Sesi yang berjalan ditutup terlebih dahulu.</string> + <string name="epic_client_uninstalled">Epic Games Launcher dicopot</string> + <string name="epic_client_uninstall_failed">Beberapa file peluncur tidak dapat dihapus. Coba lagi.</string> + <string name="epic_client_uninstalling">Tunggu hingga Epic Games Launcher selesai dicopot</string> + <string name="store_cloud_saves">Simpanan cloud</string> + <string name="cloud_upload">Unggah ke cloud</string> + <string name="cloud_download">Unduh dari cloud</string> + <string name="cloud_none">Tidak ada simpanan cloud</string> + <string name="cloud_conflict">Konflik cloud</string> + <string name="cloud_conflict_files">Konflik cloud · %1$d file</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Pertahankan cloud</string> + <string name="cloud_keep_local">Pertahankan lokal</string> + <string name="cloud_checking">Memeriksa cloud…</string> + <string name="cloud_last_sync">Sinkronisasi terakhir %1$s</string> + <string name="cloud_never">Belum disinkronkan</string> + <string name="cloud_done">%1$d file</string> + <string name="stores_eyebrow_installed">terinstal</string> + <string name="stores_eyebrow_library">dalam pustaka Anda</string> + <string name="stores_eyebrow_store">toko</string> + <string name="achievements_title">Pencapaian</string> + <string name="achievements_count">%1$d dari %2$d terbuka</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Terbuka · %1$d</string> + <string name="achievements_group_locked">Terkunci · %1$d</string> + <string name="achievements_group_hidden">Tersembunyi · %1$d</string> + <string name="achievements_hidden">Pencapaian tersembunyi</string> + <string name="achievements_hidden_detail">Detail ditampilkan setelah terbuka.</string> + <string name="achievements_all">Semua pencapaian terbuka</string> + <string name="achievements_reading">Memuat…</string> + <string name="achievements_signed_out">Masuk ke %1$s untuk melihat pencapaianmu.</string> + <string name="achievements_unreachable">Tidak dapat menjangkau %1$s. Periksa lagi saat sudah online.</string> + <string name="achievements_none">%1$s tidak mencantumkan pencapaian untuk game ini.</string> + <string name="achievements_show_all">Tampilkan semua %1$d</string> + <string name="achievements_dialog_title">Pencapaian · %1$s</string> + <string name="stores_in_steam">✓ Di Steam</string> + <string name="stores_uninstall">Hapus instalasi</string> + <string name="stores_uninstalling">Menghapus instalasi…</string> + <string name="stores_uninstall_title">Hapus instalasi %1$s?</string> + <string name="stores_uninstall_body_size">Membebaskan %1$s dan menghapusnya dari Steam.</string> + <string name="stores_uninstall_body">Menghapus filenya dan pintasan Steam-nya.</string> + <string name="stores_launch_not_registered">Steam akan mendeteksi gim ini saat berikutnya dimulai; jalankan dari sana, atau mulai Steam sekarang.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Pilihan Steam per gim</string> + <string name="stores_card_audio">Audio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Komponen</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Mesin</string> + <string name="stores_card_engine_value">%1$s · asli</string> + <string name="stores_card_engine_java">%1$s · bawaan</string> + <string name="stores_how_it_runs">Cara menjalankannya</string> + <string name="stores_kv_fetched">Diambil dari</string> + <string name="stores_kv_fetched_value">%1$s, dengan akun Anda</string> + <string name="stores_kv_installed_to">Terinstal di</string> + <string name="stores_kv_installed_to_value">Penyimpanan gim (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Dijalankan oleh</string> + <string name="stores_kv_launched_by_value">Steam dan Proton, jalur yang sama seperti gim Steam</string> + <string name="stores_kv_launched_by_epic">Steam dan Proton · Masuk Epic setiap peluncuran, overlay EOS nonaktif</string> + <string name="stores_kv_launched_by_amazon">Steam dan Proton · Variabel Amazon Games Services diatur</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">ditambahkan ke Steam saat instalasi (UI Deck + Steam Input)</string> + <string name="stores_downloads_empty">Tidak ada unduhan</string> + <string name="stores_dl_paused">Dijeda</string> + <string name="stores_dl_queued">Dalam antrean</string> + <string name="stores_dl_queued_at">Dalam antrean · #%1$d</string> + <string name="stores_dl_cancelled">Dibatalkan</string> + <string name="stores_dl_failed">Gagal</string> + <string name="stores_dl_failed_reason">Gagal · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Jeda</string> + <string name="stores_dl_resume">Lanjutkan</string> + <string name="stores_dl_cancel">Batal</string> + <string name="stores_dl_retry">Coba lagi</string> + <string name="stores_dl_clear">Hapus</string> + <string name="stores_dl_clear_all">Hapus yang selesai</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Unduhan</string> + <string name="stores_stage_verify">Verifikasi</string> + <string name="stores_stage_install">Instal</string> + <string name="stores_stage_done">Selesai</string> + <string name="stores_stage_checking">Memeriksa</string> + <string name="stores_stage_downloading">Mengunduh</string> + <string name="stores_dl_cancel_confirm">Hapus unduhan?</string> + <string name="stores_dl_failed_kept">Gagal · %1$s disimpan</string> + <string name="stores_stage_verifying">Memverifikasi</string> + <string name="stores_stage_installing">Menginstal</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d file</string> + <string name="stores_download_manager">Manajer unduhan</string> + <string name="stores_parallel">Unduhan sekaligus</string> + <string name="stores_install_where">Instal ke</string> + <string name="stores_install_title">Instal %1$s:</string> + <string name="stores_target_internal">Internal</string> + <string name="stores_target_free">%1$s tersedia</string> + <string name="stores_target_free_unknown">Ruang kosong tidak diketahui</string> + <string name="stores_storage_insufficient">Ruang kosong kurang: butuh %1$s, hanya %2$s tersedia</string> + <string name="stores_storage_low">Ruang menipis (%1$s kosong, butuh %2$s)</string> + <string name="stores_notification_channel">Unduhan toko</string> + <string name="stores_notification_channel_hint">Menampilkan progres unduhan gim dan menjaga unduhan tetap berjalan di latar belakang</string> + <string name="stores_notification_one">Mengunduh</string> + <string name="stores_notification_many">%1$d unduhan</string> + <string name="stores_notification_waiting">Menyiapkan…</string> + <string name="stores_notification_done_channel">Unduhan toko selesai</string> + <string name="stores_notification_installed">%1$s terinstal</string> + <string name="stores_notification_failed">Unduhan %1$s gagal</string> + <string name="stores_notification_delete">Hapus</string> + <string name="stores_notification_keep">Pertahankan</string> + <string name="stores_login_title">Masuk ke %1$s</string> + <string name="stores_login_provider_title">Masuk dengan penyedia Anda</string> + <string name="stores_login_reload">Muat ulang</string> + <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_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> + <string name="stores_login_error_ssl">Koneksi ke halaman masuk tidak aman.</string> + <string name="stores_login_error_verification">Proses masuk tidak dapat diverifikasi. Coba lagi.</string> + <string name="stores_login_error_generic">Proses masuk gagal. Coba lagi.</string> + <string name="common_close">Tutup</string> + <string name="common_back">Kembali</string> + <string name="common_edit">Edit</string> + <string name="games_add_all">Tambahkan semua gim di folder ini</string> + <string name="games_added_none">Tidak ada yang baru di folder ini</string> + <string name="edit_name">Nama</string> + <string name="edit_target">Target</string> + <string name="edit_start_in">Mulai di</string> + <string name="edit_launch_options">Opsi peluncuran</string> + <string name="edit_artwork">Artwork</string> + <string name="edit_other_exe">Exe lain…</string> + <string name="edit_remove">Hapus</string> + <string name="art_cover">Sampul</string> + <string name="art_wide_cover">Sampul lebar</string> + <string name="art_adjust_logo">Sesuaikan logo</string> + <string name="logo_pos_default">Bawaan</string> + <string name="logo_pos_upper_left">Kiri atas</string> + <string name="logo_pos_upper_center">Tengah atas</string> + <string name="logo_pos_center">Tengah</string> + <string name="logo_pos_bottom_left">Kiri bawah</string> + <string name="logo_pos_bottom_center">Tengah bawah</string> + <string name="logo_pos_position">Posisi</string> + <string name="logo_pos_size">Ukuran</string> + <string name="logo_pos_save">Simpan</string> + <string name="logo_pos_reset">Kembalikan ke bawaan</string> + <string name="logo_pos_hint">Digambar di atas latar gim, seperti yang dilakukan Steam. Posisi persisnya bisa berbeda beberapa piksel.</string> + <string name="logo_pos_no_logo">Gim ini belum punya logo. Pilih salah satu di Logo untuk melihatnya di sini.</string> + <string name="logo_pos_failed">Posisi logo tidak tersimpan. Coba lagi.</string> + <string name="art_background">Latar belakang</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Ikon</string> + <string name="art_src_folder">Folder gim</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">File Anda</string> + <string name="art_src_exe">Dari exe</string> + <string name="art_src_auto">Otomatis</string> + <string name="art_pick_image">Pilih gambar…</string> + <string name="art_pick_title">Pilih gambar: %1$s</string> + <string name="art_reset">Setel ulang ke otomatis</string> + <string name="art_search_sgdb">Cari di SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Cari gim</string> + <string name="art_sgdb_other_games">Hasil lain</string> + <string name="art_sgdb_none">Tidak ada hasil.</string> + <string name="art_sgdb_no_key">SteamGridDB memerlukan kunci API. Tambahkan milik Anda di Setelan › Peluncur.</string> + <string name="art_sgdb_bad_key">SteamGridDB menolak kunci API. Periksa di Setelan › Peluncur.</string> + <string name="art_sgdb_limit">SteamGridDB sedang membatasi permintaan. Coba lagi sebentar lagi.</string> + <string name="art_sgdb_offline">SteamGridDB tidak dapat dihubungi. Periksa koneksi.</string> + <string name="art_sgdb_server">Ada masalah di SteamGridDB. Coba lagi nanti.</string> + <string name="art_sgdb_no_game">SteamGridDB tidak punya hasil untuk gim ini. Coba cari secara manual.</string> + <plurals name="games_added_n"> + <item quantity="other">%1$d gim ditambahkan</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="other">%1$d sudah ada di Games</item> + </plurals> + <string name="hop_back">B · Kembali ke %1$s</string> + <string name="hop_from_games">gim ini</string> + <string name="hop_from_play">Setelan Main</string> + <string name="sheet_graphics_drivers">Driver grafis</string> + <string name="comp_this_proton">Proton ini</string> + <string name="comp_every_proton">Setiap Proton</string> + <string name="comp_for_every_proton">Untuk setiap Proton</string> + <string name="comp_available_count">Tersedia · %1$d</string> + <string name="comp_checked">Diperiksa %1$s</string> + <string name="comp_check_all">Periksa komponen dan driver baru</string> + <string name="comp_get">Dapatkan</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton, dan FEX di bawah ini milik Proton ini</string> + <string name="comp_device_tested">%1$s · diuji</string> + <string name="comp_device_untested">%1$s · belum diuji</string> + <string name="comp_device_unsupported">%1$s · tidak didukung</string> + <string name="gpu_auto_keeps">Menjaga pasangan yang direkomendasikan tetap terbaru</string> + <string name="gpu_bar_auto">Otomatis · %1$s</string> + <string name="gpu_separately">Runtime dan driver tampilan secara terpisah</string> + <string name="gpu_use_title">Gunakan %1$s?</string> + <string name="gpu_mode_title">Cara driver dipilih</string> + <string name="gpu_mode_auto_detail">Pasangan terbaik untuk GPU ini, selalu diperbarui</string> + <string name="gpu_mode_pair">Pasangan tetap</string> + <string name="gpu_mode_pair_detail">Pilih pasangan; menyetel kedua driver sekaligus</string> + <string name="gpu_mode_mix">Campur bebas</string> + <string name="gpu_mode_mix_detail">Pilih tampilan dan runtime secara terpisah</string> + <string name="gpu_mode_pair_short">Pasangan</string> + <string name="gpu_mode_mix_short">Campur</string> + <string name="gpu_src_auto">OTOMATIS</string> + <string name="gpu_src_pair">PASANGAN</string> + <string name="gpu_src_bundle">BUNDEL</string> + <string name="gpu_src_chosen">DIPILIH</string> + <string name="gpu_src_by_gpu">MENURUT GPU</string> + <string name="gpu_src_default">BAWAAN</string> + <string name="gpu_display_live">Sedang menggambar</string> + <string name="gpu_display_pending">Perlu mulai ulang · sampai itu %1$s yang menggambar</string> + <string name="gpu_runtime_live">Aktif</string> + <string name="gpu_runtime_pending">Sesi berikutnya · sesi ini memakai %1$s</string> + <string name="gpu_display_next">Menggambar layar. Berlaku mulai sesi berikutnya.</string> + <string name="gpu_previous_driver">driver sebelumnya</string> + <string name="gpu_restart_banner">Mulai ulang untuk mengganti driver tampilan.</string> + <string name="gpu_restart_blocked">Hentikan sesi saat ini dan mulai ulang DroidDeck untuk mengganti driver tampilan.</string> + <string name="gpu_restart_now">Mulai ulang sekarang</string> + <string name="gpu_restart_later">Nanti</string> + <string name="gpu_auto_title">Otomatis memilih pasangan ini untuk %1$s Anda</string> + <string name="gpu_auto_builtin_title">Otomatis memakai driver bawaan untuk %1$s Anda</string> + <string name="gpu_auto_reason">Dipilih untuk keluarga %1$s. Versi baru dipasang di latar belakang.</string> + <string name="gpu_pair_title">Pilih pasangan</string> + <string name="gpu_pair_hint">Pasangan menyetel driver tampilan dan driver runtime bersamaan.</string> + <string name="gpu_mix_title">Pilih setiap driver</string> + <string name="gpu_mix_hint">Bundel mengisi keduanya. Perubahan tampilan berlaku setelah mulai ulang, perubahan runtime mulai sesi berikutnya.</string> + <string name="gpu_change_display">Ganti driver tampilan</string> + <string name="gpu_change_runtime">Ganti driver runtime</string> + <string name="gpu_autos_pick">PILIHAN OTOMATIS</string> + <string name="gpu_installed">Terpasang</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · mulai ulang untuk menerapkan</string> + <string name="gpu_chip_restart">%1$s · perlu mulai ulang</string> + <string name="comp_this_device">Perangkat ini</string> + <string name="proton_remove_title">Hapus %1$s?</string> + <string name="setup_tab_diagnostics">Diagnostik</string> + <string name="setup_ready">Siap bermain</string> + <string name="setup_not_ready">Belum siap bermain</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">batas proses nonaktif</string> + <string name="setup_ready_signed_in">masuk sebagai %1$s</string> + <string name="setup_needs_you">Saat ada yang memerlukan Anda</string> + <string name="setup_group_look">Tampilan</string> + <string name="setup_group_device">Perangkat ini</string> + <string name="setup_group_art">Artwork pustaka</string> + <string name="setup_group_download">Unduhan</string> + <string name="setup_download_source">Sumber</string> + <string name="setup_download_source_auto">Otomatis</string> + <string name="setup_download_source_direct">Langsung</string> + <string name="setup_download_source_mirror">Cermin</string> + <string name="setup_download_source_custom">Prefix sendiri</string> + <string name="setup_download_mirror">Situs</string> + <string name="setup_download_prefix">Prefix</string> + <string name="flathub_eyebrow">APLIKASI LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Aplikasi desktop untuk desktop Linux, dibuka dari Desktop.</string> + <string name="flathub_setup">Siapkan Flathub</string> + <string name="flathub_remove_title">Hapus %1$s?</string> + <string name="flathub_remove_note">Setelan dan filenya tetap disimpan.</string> + <string name="flathub_keep">Pertahankan</string> + <string name="desktop_size">Ukuran di disk</string> + <string name="desktop_uninstall_title">Hapus instalasi desktop?</string> + <string name="desktop_all_systems">Semua</string> + <string name="gog_achievements">Pencapaian GOG</string> + <string name="gog_achievements_hint">Menyinkronkan pencapaian untuk game GOG yang didukung. Berlaku saat peluncuran berikutnya.</string> + <string name="gog_achievements_off">Pencapaian nonaktif</string> + <string name="gog_achievements_on">Pencapaian aktif</string> + <string name="gog_achievements_signin">Masuk lagi ke GOG</string> + <string name="gog_achievements_uploaded">Pencapaian terunggah</string> + <string name="gog_achievements_pending">Unggahan pencapaian tertunda</string> + <string name="gog_achievements_enable_store">Aktifkan pencapaian GOG di setelan Stores</string> + <string name="gog_achievements_unavailable">Pencapaian tidak tersedia; periksa log sesi</string> + <string name="achievement_unlocked">Pencapaian terbuka</string> + <string name="touch_paste">Tempel</string> + <string name="touch_dpad">Tombol arah</string> + <string name="touch_left_stick">Stik kiri</string> + <string name="touch_right_stick">Stik kanan</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Keyboard</string> + <string name="touch_dpad_up">Tombol arah atas</string> + <string name="touch_dpad_down">Tombol arah bawah</string> + <string name="touch_dpad_left">Tombol arah kiri</string> + <string name="touch_dpad_right">Tombol arah kanan</string> + <string name="touch_title">Kontrol sentuh</string> + <string name="touch_controller">Kontroler sentuh</string> + <string name="touch_mouse">Mouse</string> + <string name="touch_on">Aktif</string> + <string name="touch_off">Nonaktif</string> + <string name="touch_speed_slow">Lambat</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Cepat</string> + <string name="touch_edit_layout">Edit tata letak</string> + <string name="touch_droiddeck_menu">Menu DroidDeck</string> + <string name="touch_drag_hint">Seret kontrol ke layar</string> + <string name="touch_arrange">Atur</string> + <string name="touch_discard">Buang</string> + <string name="touch_saving">Menyimpan…</string> + <string name="touch_icon">Ikon</string> + <string name="touch_narrower">L−</string> + <string name="touch_wider">L+</string> + <string name="touch_shorter">T−</string> + <string name="touch_taller">T+</string> + <string name="touch_hide">Sembunyikan</string> + <string name="touch_color_opacity">Warna dan opasitas…</string> + <string name="touch_copy_layout">Salin tata letak ini</string> + <string name="touch_layout_copied">Tata letak disalin; tempelkan ke tata letak sentuh game apa pun</string> + <string name="touch_paste_layout">Tempel tata letak yang disalin</string> + <string name="touch_reset_layout">Setel ulang ke default Steam</string> + <string name="touch_no_binding">Kontrol ini tidak memiliki pengikatan di Steam untuk diberi ikon</string> + <string name="touch_icon_for">Ikon untuk %1$s</string> + <string name="touch_layout_color">Warna tata letak sentuh</string> + <string name="touch_done">Selesai</string> + <string name="touch_save_failed">Tata letak sentuh tidak dapat disimpan</string> + <string name="touch_saved">Tata letak sentuh disimpan ke Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Label (opsional)</string> + <string name="touch_icons_missing">Ikon Steam tidak ditemukan</string> + <plurals name="touch_icons_found"> + <item quantity="other">%1$d ikon dari Steam</item> + </plurals> + <string name="touch_icon_color">Warna ikon</string> + <string name="touch_button_color">Warna tombol</string> + <string name="touch_no_icon">Tidak ada ikon</string> + + <string name="stores_sync_sign_in">Memeriksa status masuk…</string> + <string name="stores_sync_library">Mengambil pustaka kamu…</string> + <string name="stores_sync_game_list">Mengambil daftar game…</string> + <string name="stores_sync_details">Memuat detail game… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="other">Menyinkronkan %1$d game…</item> + </plurals> + <string name="stores_sync_progress">Menyinkronkan… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Mengambil gambar sampul…</string> + <string name="stores_sync_failed">Sinkronisasi gagal</string> + <string name="stores_sync_no_games">Tidak ada game yang ditemukan di pustaka %1$s kamu</string> + <string name="stores_sync_amazon_no_answer">Amazon Games tidak merespons untuk pustaka kamu: segarkan, atau masuk lagi</string> + <string name="stores_sync_gog_unreachable">Tidak dapat menghubungi GOG</string> + <string name="stores_sync_gog_unreadable">Pustaka GOG kamu tidak dapat dibaca</string> + <string name="stores_registering">Mendaftar ke Steam…</string> + <string name="mode_client_arch">Klien Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnostik VAC</string> + <string name="setup_vac_diag_hint">Game Source mencatat konsolnya (-condebug); vac.txt di log sesi menunjukkan aman atau tidak</string> + <string name="load_starting_steam_x64">Memulai Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Digunakan oleh klien Steam x86-64</string> + <string name="storage_uninstall_in_x64">Salinan ini ada di klien Steam x86-64. Pilih x86-64 di Klien Steam, lalu hapus instalasinya di sini.</string> + <string name="storage_uninstall_in_arm64">Salinan ini ada di klien Steam ARM64. Pilih ARM64 di Klien Steam, lalu hapus instalasinya di sini.</string> + <string name="drawer_page_glasses">Kacamata</string> + <string name="glasses_open">Kacamata VITURE</string> + <string name="glasses_control">Kontrol kacamata</string> + <string name="glasses_driver_missing">Versi ini tidak menyertakan driver untuk kacamata ini.</string> + <string name="glasses_connection_failed">Tidak bisa terhubung ke kacamata. Sambungkan ulang kabel atau ketuk Izinkan untuk mencoba lagi.</string> + <string name="glasses_allow">Izinkan</string> + <string name="glasses_allow_hint">Izinkan DroidDeck mengatur refresh rate, mode 3D, kecerahan, volume, dan peredup lensa kacamata, serta membaca pelacakan kepalanya.</string> + <string name="glasses_asking">Menunggu Anda mengizinkannya di dialog Android…</string> + <string name="glasses_denied">Kontrol ditolak. Izinkan untuk mengubah setelan kacamata.</string> + <string name="glasses_no_control">Kacamata ini menampilkan game, tetapi setelannya tidak bisa diubah dari sini.</string> + <string name="glasses_output">Output</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Game di kacamata</string> + <string name="glasses_game_on_hint">Tampilkan game hanya di kacamata. Nonaktif: ponsel menampilkannya dan Android mencerminkan layar ponsel.</string> + <string name="glasses_display">Tampilan</string> + <string name="glasses_refresh">Refresh rate</string> + <string name="glasses_3d">3D (berdampingan)</string> + <string name="glasses_3d_hint">Alihkan kacamata pintar ke 3D berdampingan. Pelacakan kepala dikontrol secara terpisah.</string> + <string name="glasses_3d_failed">Sinyal 3D belum terkonfirmasi. Coba lagi setelah gambar 2D kembali.</string> + <string name="glasses_no_signal">Tidak ada gambar: kacamata dalam mode yang tidak bisa dikirim ponsel ini. Tahan tombol 2D/3D-nya, atau cabut lalu colokkan lagi.</string> + <string name="glasses_3d_refresh">Refresh rate 3D</string> + <string name="glasses_auto3d">3D untuk game VR</string> + <string name="glasses_auto3d_hint">Beralih ke 3D saat SteamVR berjalan, lalu kembali setelahnya.</string> + <string name="glasses_picture">Gambar</string> + <string name="glasses_picture_hint">Otomatis menampilkan konten datar di kedua mata dan mendeteksi SteamVR. Pilih game berdampingan untuk konten SBS.</string> + <string name="glasses_picture_auto">Otomatis</string> + <string name="glasses_picture_screen">Layar virtual</string> + <string name="glasses_picture_sbs">Game 3D berdampingan</string> + <string name="glasses_screen_size">Lebar layar</string> + <string name="glasses_screen_distance">Jarak layar</string> + <string name="glasses_screen_next_session">Lebar dan jarak berlaku saat game berjalan di kacamata sebagai layar virtual.</string> + <string name="glasses_screen_no_output">Setelan ini berlaku saat Game di kacamata aktif dan game ditampilkan di sana.</string> + <string name="glasses_screen_flat_hint">Otomatis menjaga game 2D ini tetap layar penuh. Gunakan layar virtual untuk mengatur lebar, jarak, dan pelacakan kepalanya.</string> + <string name="glasses_screen_use">Gunakan layar virtual</string> + <string name="glasses_screen_direct_hint">SteamVR memenuhi tampilan. Sesuaikan bidang pandangnya di VR; lebar dan jarak hanya berlaku untuk layar virtual.</string> + <string name="glasses_screen_sbs_hint">Game berdampingan memenuhi pandangan setiap mata. Lebar dan jarak hanya berlaku untuk layar virtual.</string> + <string name="glasses_tracking_flat_hint">Otomatis menjaga game 2D ini tetap diam dalam pandangan. Pilih Layar virtual di Tampilan untuk menggunakan pelacakan kepala.</string> + <string name="glasses_tracking_sbs_hint">Pelacakan kepala berlaku untuk layar virtual atau game SteamVR yang sedang berjalan.</string> + <string name="glasses_hardware">Perangkat</string> + <string name="glasses_brightness">Kecerahan</string> + <string name="glasses_volume">Volume</string> + <string name="glasses_sunblock">Peredup lensa</string> + <string name="glasses_sunblock_hint">Menggelapkan lensa depan.</string> + <string name="glasses_tracking">Pelacakan</string> + <string name="glasses_head_tracking">Pelacakan kepala</string> + <string name="glasses_head_tracking_hint">Sensor milik kacamata memutar layar virtual dan SteamVR mengikuti kepala Anda.</string> + <string name="glasses_recenter">Posisikan ulang tampilan</string> + <string name="glasses_recenter_button">Pusatkan ulang layar</string> + <string name="glasses_vr_fov">Bidang pandang SteamVR</string> + <string name="glasses_vr_fov_hint">Lebih rendah membawa SteamVR lebih dekat dan memenuhi kacamata; lebih tinggi menampilkan lebih banyak di sekitar Anda.</string> + <string name="glasses_playing">Bermain di %1$s</string> + <string name="glasses_calibration">Kalibrasi pelacakan</string> + <string name="glasses_calibration_hint">Mengurangi drift dan menyelaraskan acuan horizontal.</string> + <string name="glasses_calibration_saved_hint">Kalibrasi tersimpan diterapkan ke kacamata ini.</string> + <string name="glasses_calibration_open">Kalibrasi</string> + <string name="glasses_calibration_instructions">Letakkan kacamata yang terhubung secara terbalik di permukaan datar, dengan bingkai bertumpu rata. Ketuk Mulai, lalu jangan sentuh kacamata selama sekitar 8 detik. Gerakan akan mengulang pengukuran. Ini mengoreksi drift dan kemiringan, bukan arah hadap.</string> + <string name="glasses_calibration_settling">Biarkan kacamata terbalik dan jangan disentuh. Menunggu kacamata stabil…</string> + <string name="glasses_calibration_collecting">Mengukur sensor. Jaga kacamata tetap diam.</string> + <string name="glasses_calibration_moving">Gerakan terdeteksi. Jangan sentuh kacamata; pengukuran akan diulang otomatis.</string> + <string name="glasses_calibration_turn_over">Letakkan kacamata terbalik di permukaan datar. Pengukuran dimulai saat posisinya sudah benar.</string> + <string name="glasses_calibration_complete">Kalibrasi tersimpan. Pakai kacamata dan lihat lurus ke depan, lalu ketuk Selesai untuk memosisikan ulang tampilan.</string> + <string name="glasses_calibration_failed">Kalibrasi tidak dapat diselesaikan. Periksa koneksi dan jaga kacamata tetap diam, lalu coba lagi. Kalibrasi Anda sebelumnya tidak berubah.</string> + <string name="glasses_calibration_start">Mulai</string> + <string name="glasses_calibration_done">Selesai</string> + <string name="glasses_calibration_reset">Reset kalibrasi pelacakan</string> + <string name="glasses_calibration_reset_hint">Hapus kalibrasi tersimpan dan pulihkan default model? Posisikan ulang tampilan setelah memakai kacamata kembali.</string> + <string name="glasses_calibration_reset_button">Reset</string> + <string name="hand_camera_group">Pelacakan tangan</string> + <string name="hand_camera_prompt_title">Lacak tangan atau pengontrol Joy-Con dengan kamera ponsel?</string> + <string name="hand_camera_prompt_body">Tanpa pengontrol yang terhubung, kamera ponsel melacak tangan Anda di VR: jepit ibu jari dan jari telunjuk untuk mengklik, tutup tangan untuk meraih, dan putar telapak tangan ke arah Anda dan jepit untuk membuka menu. Dengan pengontrol Joy-Con yang terpasang, kamera melacak posisinya sementara pengontrol Joy-Con menyediakan input rotasi dan tombol. Gambar diproses di perangkat ini dan tidak pernah disimpan atau dikirim.</string> + <string name="hand_camera_rear">Kamera belakang</string> + <string name="hand_camera_rear_hint">Direkomendasikan. Biasanya lebih tajam dan lebih lebar.</string> + <string name="hand_camera_front">Kamera depan</string> + <string name="hand_camera_front_hint">Untuk saat bagian belakang perangkat tidak bisa menghadap Anda.</string> + <string name="hand_camera_allow">Gunakan kamera</string> + <string name="hand_camera_not_now">Nanti saja</string> + <string name="hand_camera_setting">Pelacakan tangan dengan kamera</string> + <string name="hand_camera_setting_hint">Gunakan kamera ponsel untuk gerakan tangan kosong atau untuk memposisikan pengontrol Joy-Con yang terpasang di VR. Pengontrol Joy-Con menyediakan rotasi dan input tombol. Berhenti sementara kacamata pintar melacak tangan atau pengontrol Joy-Con Anda. Gambar hanya diproses pada perangkat ini.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Akses kamera</string> + <string name="hand_camera_access_hint">Izinkan akses kamera agar pelacakan tangan bisa dimulai.</string> + <string name="hand_camera_access_denied">Akses kamera nonaktif. Aktifkan di setelan Android.</string> + <string name="hand_camera_allow_button">Izinkan</string> + <string name="hand_camera_open_settings">Buka setelan</string> + <string name="hand_camera_placement">Posisi kamera</string> + <string name="hand_camera_placement_hint">Pastikan kamera bisa melihat Anda sebelum bermain.</string> + <string name="hand_camera_check">Periksa</string> + <string name="hand_camera_check_title">Posisi kamera</string> + <string name="hand_camera_how_rear">Dirikan perangkat sejauh 1,5 hingga 2 meter kira-kira setinggi dada, dengan kamera belakang menghadap Anda. Lalu masuk ke bidang pandang dengan tangan terentang.</string> + <string name="hand_camera_how_front">Dirikan perangkat sejauh 1,5 hingga 2 meter kira-kira setinggi dada, dengan layar menghadap Anda. Lalu masuk ke bidang pandang dengan tangan terentang.</string> + <string name="hand_camera_starting">Memulai kamera…</string> + <string name="hand_camera_stand_up">Perangkat terbaring datar. Dirikan agar kamera menghadap Anda.</string> + <string name="hand_camera_upright">Dirikan perangkat lebih tegak agar kamera menghadap Anda.</string> + <string name="hand_camera_not_seen">Belum bisa melihat Anda. Masuk ke bidang pandang agar kepala dan bahu Anda terlihat.</string> + <string name="hand_camera_move_back">Mundur sedikit.</string> + <string name="hand_camera_move_closer">Mendekat sedikit.</string> + <string name="hand_camera_show_hands">Rentangkan kedua tangan di tempat yang bisa dilihat kamera.</string> + <string name="hand_camera_good">Terlihat bagus.</string> + <string name="hand_camera_failed">Kamera tidak dapat dimulai. Tutup aplikasi lain yang menggunakannya, lalu coba lagi.</string> + <string name="hand_camera_switch">Ganti kamera</string> + <string name="hand_camera_skip">Lewati</string> + <string name="hand_camera_done">Selesai</string> + <string name="glasses_xreal_network_missing">Menunggu koneksi Ethernet USB dari kacamata. Ponsel ini mungkin tidak menyediakannya untuk aplikasi.</string> + <string name="glasses_xreal_connection_failed">Koneksi XREAL terputus atau memberikan respons yang tidak didukung. Mencoba lagi…</string> + <string name="glasses_xreal_experimental">Dukungan 1S eksperimental. Gunakan mode Follow dan nonaktifkan stabilisasi di menu kacamata. Arah pelacakan dan mode tampilan masih perlu diuji di perangkat.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Mode Cardboard</string> + <string name="cardboard_mode_hint">Tampilan mata kiri dan kanan untuk kacamata VR ponsel.</string> + <string name="cardboard_source">Gambar</string> + <string name="cardboard_source_screen">Layar virtual</string> + <string name="cardboard_source_sbs">3D berdampingan</string> + <string name="cardboard_viewer">Kacamata</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Tanpa lensa</string> + <string name="cardboard_ipd">Jarak mata</string> + <string name="cardboard_screen_width">Lebar layar</string> + <string name="cardboard_screen_distance">Jarak layar</string> + <string name="cardboard_head_tracking">Pelacakan kepala</string> + <string name="cardboard_no_sensor">Perangkat ini tidak punya sensor rotasi.</string> + <string name="cardboard_recenter">Posisikan ulang tampilan</string> + <string name="cardboard_recenter_button">Posisikan ulang</string> + <string name="cardboard_steamvr">SteamVR (eksperimental)</string> + <string name="cardboard_steamvr_install">Pasang</string> + <string name="cardboard_steamvr_installing">Mengunduh dan mengekstrak SteamVR…</string> + <string name="cardboard_steamvr_start">Mulai</string> + <string name="cardboard_steamvr_stop">Hentikan</string> + <string name="cardboard_steamvr_unavailable">Tidak tersedia di sesi ini.</string> + <string name="cardboard_steamvr_failed">SteamVR tidak merespons; periksa log sesi.</string> + <string name="drawer_component_downloads">Unduh komponen</string> + <string name="drawer_component_downloads_hint">Unduhan dipakai bersama halaman Komponen. Pilih versi yang sudah diunduh di atas untuk memakainya pada peluncuran gim berikutnya.</string> + <string name="drawer_component_choose_download">Pilih versi untuk diunduh</string> + <string name="stores_fact_developer">Pengembang</string> + <string name="stores_fact_publisher">Penerbit</string> + <string name="stores_fact_released">Rilis</string> + <string name="stores_hltb_main">Utama</string> + <string name="stores_hltb_extras">+ Ekstra</string> + <string name="stores_hltb_completionist">Tuntas</string> + <string name="stores_hltb_hours">%1$s j</string> + <string name="stores_hltb_minutes">%1$d mnt</string> + <string name="display_picture_position">Posisi gambar</string> + <string name="display_position_top">Atas</string> + <string name="display_position_bottom">Bawah</string> + <string name="display_position_center">Tengah (bawaan)</string> + <string name="setup_tab_storage">Penyimpanan</string> + <string name="storage_measuring">Mengukur penyimpanan…</string> + <string name="storage_measuring_hint">Butuh beberapa detik pada kali pertama.</string> + <string name="storage_internal">Penyimpanan internal</string> + <string name="storage_used_of">%1$s dari %2$s terpakai</string> + <string name="storage_free">%1$s kosong</string> + <string name="storage_droiddeck_uses">DroidDeck memakai %1$s. Diukur pada %2$s.</string> + <string name="storage_rescanning">memindai ulang…</string> + <string name="storage_other_apps">Aplikasi Android lain</string> + <string name="storage_safe_now">Bisa dikosongkan sekarang</string> + <string name="storage_safe_hint">Runtime yang tidak dipakai, sisa, log lama</string> + <string name="storage_clean_up">Membersihkan…</string> + <string name="storage_session_running">Hentikan sesi untuk membersihkan atau menghapus apa pun. Ukuran tetap terlihat.</string> + <string name="storage_where">Ke mana perginya</string> + <string name="storage_games">Gim Steam</string> + <string name="storage_game_data">Data gim</string> + <string name="storage_game_data_hint">Prefix %1$s · workshop %2$s · shader %3$s</string> + <string name="storage_tools">Proton dan runtime</string> + <string name="storage_tools_unused">%1$s tidak dipakai</string> + <string name="storage_stores">GOG, Epic, dan toko lain</string> + <string name="storage_stores_hint">Hapus di Toko</string> + <string name="storage_desktop">Aplikasi desktop</string> + <string name="storage_desktop_hint">Aplikasi dan runtime Flatpak</string> + <string name="storage_system">Sistem Linux dan klien Steam</string> + <string name="storage_system_hint">Diperlukan agar apa pun bisa berjalan</string> + <string name="storage_app_data">Data DroidDeck</string> + <string name="storage_app_data_hint">Log sesi lama %1$s · cache · driver</string> + <string name="storage_legend_games">Gim</string> + <string name="storage_legend_data">Data gim</string> + <string name="storage_legend_tools">Proton dan runtime</string> + <string name="storage_legend_stores">Toko lain</string> + <string name="storage_legend_desktop">Aplikasi desktop</string> + <string name="storage_legend_system">Sistem Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Bersihkan</string> + <string name="storage_clean_up_lede">Tidak ada di sini yang menyentuh gim terpasang atau unduhan yang berjalan.</string> + <string name="storage_nothing_to_clean">Tidak ada yang perlu dibersihkan sekarang.</string> + <string name="storage_selected">Dipilih: %1$s · %2$s → %3$s akan kosong</string> + <string name="storage_cleaning">Membersihkan…</string> + <string name="storage_free_button">Kosongkan %1$s</string> + <string name="storage_freed">%1$s dikosongkan.</string> + <string name="storage_item_runtimes">Runtime Steam dan Proton yang tidak dipakai</string> + <string name="storage_item_leftovers">Sisa gim yang dihapus</string> + <string name="storage_item_leftovers_unsure">Sisa yang mungkin berisi save</string> + <string name="storage_item_logs">Log sesi lama</string> + <string name="storage_item_logs_detail">Log sesi saat ini tetap disimpan</string> + <string name="storage_item_custom_detail">Tidak ada gim yang memakainya. Pasang ulang di Komponen jika perlu.</string> + <string name="storage_item_shaders">Cache shader gim terpasang</string> + <string name="storage_item_shaders_detail">Dibangun ulang saat bermain. Beberapa menit pertama tiap gim akan tersendat lagi.</string> + <string name="storage_tag_safe">Aman</string> + <string name="storage_tag_unused">Tidak dipakai</string> + <string name="storage_tag_stutter">Tersendat</string> + <string name="storage_tag_saves">Periksa save</string> + <string name="storage_tag_default">Bawaan</string> + <string name="storage_tag_required">Diperlukan</string> + <string name="storage_tag_not_used">Tidak dipakai</string> + <string name="storage_back">Penyimpanan</string> + <string name="storage_games_with_data">%1$s beserta datanya</string> + <string name="storage_sort_largest">Terbesar</string> + <string name="storage_sort_least_played">Paling jarang dimainkan</string> + <string name="storage_sort_sd">Di kartu SD</string> + <string name="storage_no_games">Tidak ada gim di sini.</string> + <string name="storage_played">dimainkan %1$s</string> + <string name="storage_never_played">Belum pernah dimainkan</string> + <string name="storage_game_parts">Gim %1$s · data %2$s</string> + <string name="storage_uninstall">Hapus instalasi</string> + <string name="storage_games_note">Menghapus instalasi membuka jendela Steam agar Steam mencatatnya. Untuk memindahkan gim ke kartu SD, pakai Steam › Setelan › Penyimpanan.</string> + <string name="storage_uninstall_title">Hapus instalasi %1$s?</string> + <string name="storage_uninstall_body">Steam akan terbuka dan meminta konfirmasi. Ini mengosongkan %1$s gim. Prefix tetap ada sampai sisa dibersihkan, dan save Steam Cloud tetap di akun Anda.</string> + <string name="storage_open_steam">Buka Steam</string> + <string name="storage_tools_detail">%1$s · %2$s tidak dipakai</string> + <string name="storage_remove_unused">Hapus yang tidak dipakai · %1$s</string> + <string name="storage_in_use">Sedang dipakai</string> + <string name="storage_not_used">Tidak dipakai</string> + <string name="storage_remove">Hapus</string> + <string name="storage_remove_title">Hapus %1$s?</string> + <string name="storage_remove_body">Mengosongkan %1$s. Steam akan mengunduhnya lagi jika ada gim yang membutuhkan.</string> + <string name="storage_tool_fex_runtime">Diperlukan untuk gim Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Diperlukan untuk Proton ARM64</string> + <string name="storage_tool_redist">Instalan VC++ dan DirectX yang dibutuhkan gim</string> + <string name="storage_tool_fex">Menjalankan gim Linux x86</string> + <string name="storage_tool_steam">Alat Steam</string> + <string name="storage_tool_old_runtime">DroidDeck menjalankan gim tanpa runtime ini</string> + <string name="storage_tool_x86_proton">Proton x86, yang tidak bisa dijalankan DroidDeck</string> + <string name="storage_tool_custom_default">Bawaan untuk semua gim</string> + <string name="storage_tool_custom_unused">Tidak ada gim yang memakainya</string> + <string name="storage_tool_custom_unknown">Setelan Steam tidak terbaca, jadi ini disimpan</string> + <string name="storage_cleanup_busy">Tunggu pembersihan penyimpanan selesai</string> + <string name="storage_low_title">Hanya %1$s kosong</string> + <string name="storage_low_body">Steam butuh ruang untuk pembaruan dan cache shader. Di bawah 10 GB, pembaruan gim bisa gagal di tengah.</string> + <string name="storage_low_safe">%1$s bisa dikosongkan dengan aman.</string> + <string name="storage_free_up">Kosongkan ruang</string> + <string name="storage_play_anyway">Tetap main</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d terpasang</item> + <item quantity="other">%d terpasang</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d di kartu SD</item> + <item quantity="other">%d di kartu SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d alat</item> + <item quantity="other">%d alat</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Folder prefix dan cache shader kosong dari %d gim</item> + <item quantity="other">Folder prefix dan cache shader kosong dari %d gim</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Prefix %d gim masih berisi berkas, termasuk save lokal. Salin dulu jika diperlukan.</item> + <item quantity="other">Prefix %d gim masih berisi berkas, termasuk save lokal. Salin dulu jika diperlukan.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d gim</item> + <item quantity="other">%d gim</item> + </plurals> + <string name="storage_tool_default_proton">Proton bawaan DroidDeck</string> + <string name="storage_tool_proton">Opsi Proton 11 DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">dipakai %d gim</item> + <item quantity="other">dipakai %d gim</item> + </plurals> + <string name="storage_legend_components">Komponen</string> + <string name="storage_components">Komponen</string> + <string name="storage_item_components">Komponen yang tidak dipakai</string> + <string name="storage_component_original">Asli %1$s · %2$s</string> + <string name="storage_original_confirm">Mengosongkan %1$s. Hanya mengembalikan versi Proton yang tidak terpasang lagi.</string> + <string name="storage_leftovers_unchecked">Belum diperiksa: manifes aplikasi Steam tidak terbaca, jadi prefix gim yang dihapus tetap ada sampai itu memungkinkan.</string> + <string name="storage_failed">Gagal: %1$s</string> + <string name="storage_desktop_shared">%1$s dibagi pakai</string> + <string name="storage_data_installed">Gim terpasang</string> + <string name="storage_data_parts">Prefix %1$s · shader %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Bersihkan shader</string> + <string name="storage_data_leftovers">Gim yang dihapus</string> + <string name="storage_steam_app">Aplikasi Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Prefix masih berisi berkas, mungkin save lokal</string> + <string name="storage_leftover_confirm">Menghapus prefix Wine dan cache shader (%1$s). Salin dulu save yang penting; save Steam Cloud tetap di akun Anda.</string> + <string name="storage_data_other">Disimpan</string> + <string name="storage_data_other_title">Gim non-Steam dan prefix Steam bersama</string> + <string name="storage_data_other_detail">Prefix gim dari toko atau yang ditambahkan sendiri</string> + <string name="storage_components_packages">Paket yang diunduh</string> + <string name="storage_components_originals">Berkas asli yang disimpan</string> + <string name="storage_components_none">Tidak ada paket komponen yang diunduh.</string> + <string name="storage_component_in_use">Dipilih untuk Proton atau gim</string> + <string name="storage_component_unused">Tidak dipilih di mana pun</string> + <string name="storage_original_kept">Mengembalikan Proton yang terpasang</string> + <string name="storage_original_old">Versi Proton yang tidak terpasang lagi</string> + <string name="storage_tag_in_use">Dipakai</string> + <string name="storage_components_note">Komponen yang dipakai tetap terkunci. Pilih di Komponen; yang dihapus di sini bisa diunduh lagi di sana.</string> + <string name="storage_component_confirm">Mengosongkan %1$s. Paket yang Anda impor sendiri tidak bisa diunduh ulang.</string> + <string name="storage_desktop_detail">%1$s untuk aplikasi Flatpak dan yang dibagi pakai</string> + <string name="storage_desktop_apps_title">Aplikasi</string> + <string name="storage_desktop_none">Tidak ada aplikasi Flatpak terpasang.</string> + <string name="storage_desktop_shared_title">Dibagi pakai antar aplikasi</string> + <string name="storage_desktop_runtimes">Runtime</string> + <string name="storage_desktop_runtimes_detail">Pustaka tempat aplikasi berjalan; yang tidak dipakai hilang lewat Hapus yang tidak dipakai</string> + <string name="storage_desktop_cache">Penyimpanan unduhan</string> + <string name="storage_desktop_cache_detail">Object store dan cache unduhan Flatpak</string> + <string name="storage_desktop_prune">Hapus yang tidak dipakai</string> + <string name="storage_desktop_prune_body">Menghapus runtime yang tidak dibutuhkan aplikasi terpasang mana pun dan merapikan object store Flatpak. Aplikasi terpasang tetap berjalan.</string> + <string name="storage_flatpak_uninstall_body">Menghapus aplikasi (%1$s) dan runtime yang tidak dipakai yang lain. Data di folder home Anda tetap ada.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d paket</item> + <item quantity="other">%d paket</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d aplikasi</item> + <item quantity="other">%d aplikasi</item> + </plurals> + <string name="boot_movie">Video boot</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps terlihat lebih mulus tetapi memakai lebih banyak CPU saat Steam dimulai. Video startup yang dipilih di pengaturan Steam sendiri lebih diutamakan.</string> + <string name="boot_movie_sound">Suara</string> + <string name="boot_movie_custom">Video sendiri</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV, atau WebM. Format lain dan file di atas %1$d MB dikonversi ke WebM 720p di perangkat, hingga %2$d detik.</string> + <string name="boot_movie_import">Impor</string> + <string name="boot_movie_remove">Hapus</string> + <string name="boot_movie_pick">Pilih video boot</string> + <string name="boot_movie_imported">%1$s sekarang menjadi video boot</string> + <string name="boot_movie_imported_silent">%1$s sekarang menjadi video boot, tanpa suara</string> + <string name="boot_movie_too_long">Video yang perlu dikonversi maksimal %1$d detik</string> + <string name="boot_movie_converting">Mengonversi %1$d%%</string> + <string name="boot_movie_converting_started">Mengonversi %1$s untuk Steam. Biarkan DroidDeck tetap terbuka.</string> + <string name="boot_movie_unsupported">Perangkat ini tidak dapat mendekode video itu.</string> + <string name="boot_movie_import_failed">Tidak dapat mengimpor video itu</string> + <string name="glasses_experimental">Kamera Luma Ultra — Eksperimental</string> + <string name="glasses_joycons">Pelacakan posisi Joy-Con</string> + <string name="glasses_joycons_hint">Gunakan kamera kacamata pintar untuk memposisikan pengontrol Joy-Con yang terpasang. Rotasi dan input tombol berasal dari pengontrol Joy-Con. Posisi diperkirakan saat pergelangan tangan Anda tersembunyi. Menggantikan pengontrol yang dioperasikan dengan tangan kosong dan menghentikan pelacakan kamera ponsel. Arahkan pengontrol Joy-Con ke depan saat menghubungkan atau mengatur ulang pusat pelacakan.</string> + <string name="glasses_joycons_requires_position">Aktifkan pelacakan posisi terlebih dahulu. Membutuhkan pengontrol Joy-Con yang mampu mendeteksi gerakan pada Android 12 atau yang lebih baru. Nonaktif secara default.</string> + <string name="setup_tab_glasses">Kacamata pintar</string> + <string name="setup_glasses_scope">Pengaturan tampilan dan pelacakan kepala dibagikan di seluruh menu DroidDeck, game, dan sesi desktop.</string> + <string name="setup_glasses_connect">Hubungkan kacamata pintar untuk mengubah pengaturan tampilan dan pelacakannya. Pengaturan yang Anda simpan akan tetap ada saat Anda memutuskan sambungan.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Mode tampilan</string> + <string name="glasses_output_2d">Output 2D</string> + <string name="glasses_output_3d">Output 3D</string> + <string name="glasses_picture_group">Gambar dan layar virtual</string> + <string name="glasses_position_group">Posisi dan level lantai</string> + <string name="glasses_hands_group">Pelacakan tangan — Eksperimental</string> + <string name="glasses_tracking_status">Status pelacakan</string> + <string name="glasses_resolution_2d">Resolusi 2D</string> + <string name="glasses_resolution_3d">Resolusi 3D</string> + <string name="glasses_resolution_vr">Resolusi VR</string> + <string name="glasses_resolution_auto">Otomatis</string> + <string name="glasses_resolution_inherit">Sama seperti 2D / 3D</string> + <string name="glasses_resolution_hint">Resolusi output per mata.</string> + <string name="glasses_refresh_30_hint">Aktifkan Game pada kacamata pintar untuk memilih mode 30 Hz asli layar.</string> + <string name="glasses_3dof">Layar virtual 3DoF</string> + <string name="glasses_3dof_hint">Pasang game datar di depan Anda sehingga Anda dapat melihat sekeliling. Mengaktifkan Game pada kacamata pintar tanpa beralih ke 3D.</string> + <string name="glasses_screen_app_wide">Lebar dan jarak memperbarui layar virtual yang dilacak untuk menu DroidDeck, game, dan sesi desktop secara instan.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Pelacakan posisi mencakup rotasi kepala di SteamVR. Untuk pelacakan hanya rotasi, matikan pelacakan posisi.</string> + <string name="glasses_head_tracking_spatial_hint">Mengontrol pergerakan kepala di layar virtual. Pelacakan posisi mencakup rotasi kepala di SteamVR.</string> + <string name="glasses_quick_actions">Tindakan cepat</string> + <string name="glasses_recenter_screen_hint">Lihat ke arah yang Anda inginkan untuk layar, lalu atur ulang pusat pelacakan untuk mengatur ketinggian dan arahnya.</string> + <string name="glasses_recenter_joycons_button">Pusatkan ulang Joy-Con</string> + <string name="phone_camera_tracking_group">Kamera Ponsel — Eksperimental</string> + <string name="phone_camera_tracking_setting">Lacak tangan atau pengontrol Joy-Con</string> + <string name="glasses_6dof">Layar virtual 6DoF</string> + <string name="glasses_position">Pelacakan posisi — eksperimental</string> + <string name="glasses_position_hint">Pergerakan fisik di VR dan di sekitar layar virtual. Memulai ulang pelacakan membutuhkan waktu sejenak.</string> + <string name="glasses_eye_height">Tinggi mata saat ini di atas lantai</string> + <string name="glasses_floor">Atur level lantai dari tinggi saat ini</string> + <string name="glasses_floor_set">Atur level lantai</string> + <string name="glasses_spatial_setup">Pengaturan dan diagnostik kamera stereo</string> + <string name="glasses_spatial_setup_hint">Periksa kalibrasi kamera dan pelacakan tangan sebelum bermain.</string> + <string name="glasses_spatial_open">Buka pengaturan</string> + <string name="glasses_hands">Pengontrol dioperasikan dengan tangan kosong</string> + <string name="glasses_hands_hint">Gunakan kamera kacamata pintar untuk membidik dengan tangan Anda, cubit untuk mengklik dan tutup tangan Anda untuk meraih di VR. Stik gamepad bergerak dan berputar. Menggantikan pelacakan posisi Joy-Con. Mungkin mengalami lag atau kehilangan pelacakan selama permainan.</string> + <string name="glasses_hands_ready_hint">Aktifkan pengontrol yang dioperasikan dengan tangan kosong di bawah kamera Luma Ultra di Pelacakan. Tunjukkan tangan terbuka terlebih dahulu.</string> + <string name="glasses_hands_base">Kalibrasi Luma Ultra bersama</string> + <string name="glasses_hands_base_hint">Menggunakan basis Luma Ultra bersama. Kalibrasi kacamata pintar Anda sendiri untuk memverifikasi keakuratannya.</string> + <string name="glasses_hands_calibration_verified">Kalibrasi terukur terverifikasi</string> + <string name="glasses_hands_calibration_required">Validasi diperlukan</string> + <string name="glasses_hands_calibration_required_hint">Pengontrol yang dioperasikan dengan tangan kosong tersedia setelah pemeriksaan jarak terukur berhasil.</string> + <string name="tracking_recovery_lost">Pelacakan hilang</string> + <string name="tracking_recovery_look">Lihat sekeliling perlahan di ruangan yang terang.\nJaga agar kamera pelacak tetap bersih dan menghadap ke furnitur atau detail lain yang terlihat.</string> + <string name="tracking_recovery_restart_help">Masih buntu? Di ponsel Anda: kacamata pintar → Pelacakan → Buka pengaturan → Tampilkan diagnostik → Mulai ulang pelacakan.</string> + <string name="tracking_recovery_disconnected">Kacamata pintar terputus</string> + <string name="tracking_recovery_connect">Periksa sambungan USB dan sambungkan kembali kacamata pintar.\nTerima perintah akses USB di ponsel Anda jika muncul.</string> + <string name="tracking_recovery_usb_help">Setelah terhubung, lihat sekeliling secara perlahan di ruangan yang cukup terang untuk memulihkan pelacakan.</string> + <string name="tracking_recovery_recenter">Perlu pemusatan ulang</string> + <string name="tracking_recovery_recenter_steps">Pelacakan telah kembali ke posisi baru.\nLihat ke depan, lalu ketuk atur ulang pusat pelacakan di ponsel Anda.</string> + <string name="tracking_recovery_recenter_help">Anda juga dapat menemukan reset pusat pelacakan di kacamata pintar → Pelacakan → Buka pengaturan. Kalibrasi kamera yang Anda simpan akan tetap tersimpan.</string> + <string name="tracking_recovery_stabilizing">Diam sejenak</string> + <string name="tracking_recovery_hold">Reset pusat pelacakan sedang berlangsung.\nJaga agar kacamata pintar tetap stabil saat pelacakan stabil.</string> + <string name="tracking_recovery_automatic">Layar ini tertutup secara otomatis ketika pelacakan kepala sudah siap.</string> + <string name="glasses_steady_hand_aim">Membidik dengan tangan dengan stabil</string> + <string name="glasses_steady_hand_aim_hint">Bidik dari bahumu hingga telapak tanganmu. Matikan untuk rotasi yang dikontrol pergelangan tangan.</string> + <string name="spatial_title">Pengaturan spasial</string> + <string name="spatial_wait_tracking">Menunggu pelacakan…</string> + <string name="spatial_cameras_description">Kamera pelacak kiri dan kanan</string> + <string name="spatial_camera_sync">Sinkronisasi kamera</string> + <string name="spatial_ready">Siap</string> + <string name="spatial_sync_hint">Menunggu kamera dan pelacakan kepala berbaris. Jaga agar kacamata pintar tetap terhubung.</string> + <string name="spatial_prepare">1. Siapkan target kalibrasi</string> + <string name="spatial_print_actual">Cetak dengan ukuran sebenarnya</string> + <string name="spatial_print_hint">Setiap persegi harus berukuran 30 mm (1,181 in). Pasang lembaran secara mendatar pada permukaan yang kaku di area yang cukup terang.</string> + <string name="spatial_print">Cetak pola kalibrasi</string> + <string name="spatial_capture_group">2. Menangkap tampilan berbeda</string> + <string name="spatial_board_stationary">Jaga agar target kalibrasi tetap diam</string> + <string name="spatial_capture_hint">Pindahkan kacamata pintar lebih dekat, lebih jauh dan ke samping. Putar ke kiri/kanan, miringkan ke atas/bawah, dan miringkan ke samping. Simpan target kalibrasi di kedua kamera dan jeda sebentar sebelum setiap pengambilan.</string> + <string name="spatial_start">Mulai kalibrasi baru</string> + <string name="spatial_wait_sync">Menunggu sinkronisasi kamera.</string> + <string name="spatial_start_hint">Mulai kalibrasi baru untuk mengumpulkan tampilan.</string> + <string name="spatial_views_hint">Jaga agar target kalibrasi tetap terlihat di kedua pratinjau. Tangkap setidaknya 24 tampilan tajam dari berbagai sudut.</string> + <string name="spatial_capturing">Menangkap…</string> + <string name="spatial_capture">Menangkap tampilan target kalibrasi</string> + <string name="spatial_alignment">Hitung penyelarasan kamera</string> + <string name="spatial_calculating">Menghitung…</string> + <string name="spatial_calculate">Hitung kalibrasi</string> + <string name="spatial_distance_group">3. Periksa jaraknya</string> + <string name="spatial_distance">Jarak terukur</string> + <string name="spatial_distance_hint">Mulailah dengan 12 inci atau 30 cm agar penanda yang dicetak lebih mudah dideteksi. Pilih pengukuran tepat yang akan Anda gunakan.</string> + <string name="spatial_camera_board_distance">Kamera kiri ke pusat target kalibrasi</string> + <string name="spatial_checking_distance">Memeriksa jarak…</string> + <string name="spatial_validate">Validasi jarak</string> + <string name="spatial_diagnostics">Diagnostik</string> + <string name="spatial_show_diagnostics">Tampilkan diagnostik</string> + <string name="spatial_diagnostics_hint">Alat pemulihan pengaturan waktu dan pelacakan kamera.</string> + <string name="spatial_camera_timing">Pengaturan waktu kamera</string> + <string name="spatial_hand_input">Masukan dari pelacakan tangan</string> + <string name="spatial_wait_timing">Menunggu timing kamera.</string> + <string name="spatial_frames">Gambar kamera</string> + <string name="spatial_gpu">Deteksi GPU pada tangan</string> + <string name="spatial_gpu_hint">CPU adalah defaultnya. GPU bersifat eksperimental dan dapat menyebabkan SteamVR dimulai ulang. Pilihan ini disetel ulang saat pelacakan dimulai ulang.</string> + <string name="spatial_lite">Deteksi ringan model tangan</string> + <string name="spatial_lite_hint">Gunakan detektor telapak tangan Lite dan titik kunci Lite di tangan. Periksa akurasi membidik, mencubit, dan meraih. Direset saat pelacakan dimulai ulang.</string> + <string name="spatial_adaptive">Frekuensi input otomatis untuk pelacakan tangan</string> + <string name="spatial_adaptive_hint">Sesuaikan input dengan kecepatan pemrosesan. Direset saat pelacakan dimulai ulang.</string> + <string name="spatial_half_rate">Batasi frekuensi input untuk pelacakan tangan</string> + <string name="spatial_half_rate_hint">Gunakan separuh gambar kamera. Matikan untuk membandingkan frekuensi maksimum. Direset saat pelacakan dimulai ulang.</string> + <string name="spatial_diagnostic_capture">Pengambilan diagnostik</string> + <string name="spatial_diagnostic_capture_hint">Simpan satu pasangan gambar stereo secara lokal. Gambar disimpan hanya jika diminta.</string> + <string name="spatial_save_frame">Simpan gambar kamera</string> + <string name="spatial_restart_tracking">Mulai ulang pelacakan</string> + <string name="spatial_restart_hint">Gunakan jika pelacakan tidak pulih di area yang cukup terang. Memulai ulang memerlukan asal pelacakan baru.</string> + <string name="spatial_restart">Mulai ulang</string> + <string name="spatial_restart_title">Mulai ulang pelacakan?</string> + <string name="spatial_restart_confirm">Tampilan kalibrasi yang belum disimpan akan hilang. Jaga agar kacamata pintar tetap diam setelahnya dan reset pusat pelacakan saat pelacakan dipulihkan.</string> + <string name="spatial_views_count">%1$d / 24 tayangan diambil</string> + <string name="spatial_capture_paused">Pengambilan dijeda: %1$s</string> + <string name="spatial_measure_hint">Ukur %1$s. Tampilkan target kalibrasi lengkap di kedua pratinjau, lalu tahan.</string> + <string name="spatial_timing_values">%1$.1f Hz • umur gambar %2$.1f ms • pemrosesan %3$.1f ms</string> + <string name="spatial_input_values">Batas input %1$.1f Hz • %2$.0f%% gambar kamera. Pelacakan kepala berlanjut pada frekuensi maksimumnya.</string> + <string name="spatial_frame_counts">%1$d diproses • %2$d dihilangkan • %3$d dilewati berdasarkan batas masukan</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Kalibrasi Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Cetak pada ukuran 100% / Ukuran sebenarnya. Setiap kotak: 30 mm (1,181 in).</string> + <string name="spatial_print_stationary">Jaga agar target kalibrasi tetap datar dan tidak bergerak; pindahkan kacamata pintar di antara pengambilan.</string> + <string name="spatial_print_check">Pemeriksaan skala: 100 mm (3,937 in) di antara tick</string> + <string name="spatial_distance_12in">12 inci (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 inci)</string> + <string name="spatial_distance_20in">20 inci (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 inci)</string> + <string name="spatial_disabled">Dinonaktifkan</string> + <string name="spatial_wait_stable">Menunggu pelacakan stabil</string> + <string name="spatial_disconnected">Terputus</string> + <string name="spatial_hands_off">Pengendali yang dioperasikan dengan tangan kosong dimatikan</string> + <string name="spatial_tracking_off">Pelacakan posisi tidak aktif atau kacamata pintar dilepas</string> + <string name="spatial_recenter_pending">Reset pusat pelacakan diminta — diamkan saat pelacakan stabil</string> + <string name="spatial_tracking_lost">Pelacakan hilang — hadapi area yang cukup terang dengan detail yang terlihat</string> + <string name="spatial_origin_changed">Asal pelacakan berubah — ketuk reset pusat pelacakan, lalu diamkan</string> + <string name="spatial_active">6DoF aktif</string> + <string name="spatial_connect_hint">Hubungkan Luma Ultra dan aktifkan pelacakan posisi.</string> + <string name="spatial_validation_session">Kalibrasi diverifikasi untuk koneksi ini.</string> + <string name="spatial_validation_saved">Kalibrasi diverifikasi dan disimpan.</string> + <string name="spatial_wait_cameras">Menunggu kamera stereo</string> + <string name="spatial_wait_hands">Menunggu pelacakan tangan</string> + <string name="spatial_collect_instructions">Jaga agar target kalibrasi 5 × 7 tidak bergerak. Tangkap 24+ tampilan sambil menggerakkan dan memutar kacamata pintar.</string> + <string name="spatial_capture_pending">Menunggu gambar kamera selanjutnya. Pegang kacamata pintar dengan tenang.</string> + <string name="spatial_validation_pending">Memeriksa gambar kamera selanjutnya. Jaga agar target kalibrasi penuh tetap terlihat dan diam.</string> + <string name="spatial_start_first">Mulai kalibrasi terlebih dahulu</string> + <string name="spatial_no_camera_frame">Tidak ada gambar kamera baru yang tiba. Periksa sambungan kacamata pintar dan pratinjau kamera, lalu coba lagi.</string> + <string name="spatial_clock_reset">Reset jam kamera</string> + <string name="spatial_frame_changed">Sistem koordinat pelacakan berubah. Tampilan Anda disimpan untuk perhitungan ulang. Reset pusat pelacakan, lalu mulai set baru untuk menangkap lebih banyak tampilan.</string> + <string name="spatial_device_loaded">kalibrasi perangkat dimuat</string> + <string name="spatial_base_loaded">Kalibrasi dasar Luma Ultra dimuat</string> + <string name="spatial_calibration_needed">kalibrasi diperlukan</string> + <string name="spatial_tap_start">Ketuk Mulai kalibrasi baru terlebih dahulu.</string> + <string name="spatial_capture_recenter_pending">Reset pusat pelacakan sedang menunggu pelacakan stabil. Diamkan sebentar.</string> + <string name="spatial_capture_recenter">Pelacakan berubah. Ketuk reset pusat pelacakan sekali, lalu diamkan sebelum menangkap.</string> + <string name="spatial_capture_unsynchronized">Pengambilan ditolak: pelacakan kepala tidak sinkron atau berubah selama pengambilan. Tetap diam dan coba lagi.</string> + <string name="spatial_align_first">Hitung keselarasan kamera sebelum memeriksa jarak.</string> + <string name="spatial_processing_failed">pemrosesan kamera gagal</string> + <string name="spatial_hand_head_changed">Pelacakan kepala berubah selama deteksi tangan</string> + <string name="spatial_hand_wait_sync">Menunggu sinkronisasi kamera dan kepala</string> + <string name="spatial_no_wrists">Tidak ada pergelangan tangan yang terdeteksi. Letakkan pegangan pengontrol Joy-Con Anda di depan kacamata pintar</string> + <string name="spatial_no_hands">Tidak ada tangan yang terdeteksi. Tunjukkan telapak tangan terbuka di depan kacamata pintar</string> + <string name="spatial_one_camera_wrists">Pergelangan tangan hanya terlihat di satu kamera; pertahankan pegangan pengontrol Anda dalam tampilan bersama</string> + <string name="spatial_one_camera_hands">Tangan hanya terlihat di satu kamera; jaga kedua telapak tangan dalam pandangan bersama</string> + <string name="spatial_ambiguous_hands">Kedua kamera melihat tangan, tetapi pencocokan kiri/kanan tidak jelas</string> + <string name="spatial_inconsistent_depth">Tangan terdeteksi, tetapi kedalaman stereo tidak konsisten</string> + <string name="spatial_rejected_wrist">Posisi pergelangan tangan ditolak dengan pemeriksaan stereo atau gerakan</string> + <string name="spatial_inconsistent_palm">Titik stereo terdeteksi, tetapi geometri telapak tangan tidak konsisten</string> + <string name="spatial_hands_need_calibration">Kalibrasi lengkap dan pemeriksaan jarak untuk mengaktifkan tangan</string> + <string name="spatial_hands_wait_stable">Menunggu pelacakan kepala yang stabil; reset pusat pelacakan jika diminta</string> + <string name="spatial_old_frame">Pengamatan kamera terlalu tua; menunggu pasangan baru</string> + <string name="spatial_fit_ready">Cocok dengan %1$.2f piksel. Ukur jarak yang Anda pilih dari kamera kiri ke pusat target kalibrasi, lalu validasi.</string> + <string name="spatial_opencv_error">OpenCV tidak tersedia: %1$s</string> + <string name="spatial_restored">%1$d tampilan tersimpan dipulihkan. Hitung kalibrasi untuk mencoba ulang, atau mulai rangkaian baru untuk menangkap lebih banyak.</string> + <string name="spatial_captured">Diambil %1$d / 24 penayangan. Jaga agar target kalibrasi tetap; pindahkan kacamata pintar untuk tampilan selanjutnya.</string> + <string name="spatial_capture_corners">Pengambilan gambar ditolak: %1$d / 12 sudut yang diperlukan terlihat di kedua kamera. Tampilkan lebih banyak target kalibrasi, diamkan, lalu coba lagi.</string> + <string name="spatial_validation_error">Pemeriksaan jarak tidak dapat diselesaikan: %1$s. Coba lagi.</string> + <string name="spatial_inference_error">Deteksi tangan tidak tersedia: %1$s. Ubah CPU/GPU atau pengontrol sakelar yang dioperasikan dengan tangan kosong untuk mencoba lagi.</string> + <string name="spatial_hand_timeout">Deteksi tangan melebihi %1$d ms; observasi dibuang</string> + <string name="spatial_wrists_tracked">%1$d / 2 posisi pergelangan tangan Joy-Con diukur dengan stereo</string> + <string name="spatial_palms_tracked">Telapak tangan terlacak: %1$d / 2; gestur cubit siap: %2$d; gestur genggam siap: %3$d</string> + <string name="spatial_capture_saved">Pengambilan diagnostik tersimpan ke %1$s</string> + <string name="spatial_hand_error">Pelacakan tangan dihentikan: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Pelacakan kepala dan target kalibrasi berbeda sebesar %1$s (batas 5 cm / 2 inci). Pertahankan target kalibrasi tetap dan tunggu pelacakan stabil sebelum memulai set baru. Putar dan miringkan kacamata pintar dengan lembut; jeda sebelum setiap pengambilan.</string> + <string name="spatial_need_views">Menangkap setidaknya 24 tampilan bervariasi dari target kalibrasi stasioner.</string> + <string name="spatial_need_rotation">Putar kacamata pintar ke kiri dan ke kanan, lalu miringkan ke atas dan ke bawah; gerakan tanpa rotasi tidak dapat mengkalibrasi kesejajaran kamera.</string> + <string name="spatial_bad_baseline">Garis dasar kamera yang tidak masuk akal</string> + <string name="spatial_need_orientations">Gerakkan kepala Anda ke arah yang lebih bervariasi.</string> + <string name="spatial_bad_rotation">Rotasi kamera-ke-kepala tidak valid</string> + <string name="spatial_bad_alignment">Penyelarasan kamera-ke-kepala tidak konsisten.</string> + <string name="spatial_calibration_error">Kalibrasi tidak dapat diselesaikan. %1$s Tampilan yang Anda ambil disimpan.</string> + <string name="spatial_reprojection_error">Kesalahan proyeksi ulang yang tertunda %1$.2f px melebihi 2 px. Kalibrasi ulang.</string> + <string name="spatial_distance_corners">%1$d / 24 sudut kotak-kotak terdeteksi di kedua kamera. Jaga agar target kalibrasi penuh tetap terlihat dan diam. Jika sudah terlihat, pilih 12 inci atau 30 cm dan ukur jarak terdekatnya sebelum mencoba lagi.</string> + <string name="spatial_distance_depth">Target kalibrasi terlihat, namun kedalamannya tidak dapat diukur dengan andal. Pegang kacamata pintar dengan tenang dan jaga target kalibrasi tetap datar dan terang, lalu coba lagi.</string> + <string name="spatial_distance_invalid">Pengukuran kamera tidak valid. Tahan dan coba lagi.</string> + <string name="spatial_distance_passed">Pemeriksaan jarak berhasil.</string> + <string name="spatial_distance_retry">Periksa kembali jarak dari kamera kiri ke pusat target kalibrasi, lalu coba lagi.</string> + <string name="spatial_distance_result">Kamera diukur %1$s; jarak yang dipilih %2$s. %3$s</string> + <string name="spatial_wait_previews">Tunggu pratinjau kedua kamera sebelum memulai kalibrasi.</string> + <string name="spatial_saved_views_hint">Tampilan yang disimpan dapat dihitung ulang. Mulai kalibrasi baru untuk menangkap sistem koordinat pelacakan saat ini.</string> + <string name="spatial_model_checksum_error">Ketidakcocokan checksum model tangan</string> + <string name="spatial_opencv_load_error">OpenCV tidak dapat memuat</string> +</resources> diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml new file mode 100644 index 0000000000..84fc8340c8 --- /dev/null +++ b/app/src/main/res/values-it/strings.xml @@ -0,0 +1,2912 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Grafica di SteamVR interrotta</string> + <string name="steamvr_recovery_countdown">DroidDeck si riavvierà tra %1$d secondi per ripristinare la grafica e riaprire SteamVR. Il gioco in esecuzione verrà chiuso; i progressi non salvati non potranno essere recuperati.</string> + <string name="steamvr_recovery_repeated">Il problema grafico si è ripresentato dopo un riavvio recente. Il ripristino automatico è sospeso per evitare un ciclo. Il riavvio chiuderà il gioco; i progressi non salvati non potranno essere recuperati.</string> + <string name="steamvr_recovery_restart">Riavvia ora</string> + <string name="steamvr_recovery_cancel">Lascia aperto</string> + <string name="steamvr_recovery_restarting">Ripristino della grafica e riapertura di SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck non è riuscito a riavviarsi automaticamente. Chiudi completamente l\'app, poi riaprila.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Al primo avvio viene scaricato Steam. Potrebbero volerci alcuni minuti.</item> + <item>Per impostazione predefinita, uscire dall\'app mette in pausa Steam; al tuo ritorno riprende da dove si era interrotto.</item> + <item>Il tuo controller viene visto come un pad Xbox 360. In alternativa, usa i controlli su schermo.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Al primo avvio viene configurato il desktop. Potrebbero volerci alcuni minuti.</item> + <item>Per impostazione predefinita, uscire dall\'app mette in pausa la sessione; al tuo ritorno riprende da dove si era interrotta.</item> + <item>Il touchscreen funziona come un touchpad: trascina per spostare il puntatore, tocca per fare clic.</item> + <item>Il tuo controller viene visto come un pad Xbox 360. In alternativa, usa i controlli su schermo.</item> + </string-array> + <string name="session_channel">Sessione</string> + <string name="session_channel_description">Visibile mentre è aperta una sessione Steam o desktop</string> + <string name="session_notification">Steam è in esecuzione</string> + <string name="session_notification_downloads">Download di Steam in corso</string> + <string name="session_notification_paused">Sessione in pausa - tocca Riprendi quando sei pronto</string> + <string name="resume_session">Riprendi</string> + <string name="suspend_now">Sospendi ora</string> + <string name="stop_session">Termina sessione</string> + <string name="frame_gen_title">Generazione di frame</string> + <string name="frame_gen_hint">Seleziona la modalità di generazione di frame</string> + <string name="frame_gen_off">Disattivata</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG adattivo %1$d</string> + <string name="lsfg_needs_steam">Richiede Lossless Scaling su Steam</string> + <string name="lsfg_needs_install">Installa Lossless Scaling in Steam o importa Lossless.dll</string> + <string name="lsfg_import">Importa Lossless.dll…</string> + <string name="lsfg_using_steam">In uso la copia di Steam</string> + <string name="lsfg_using_import">In uso una copia importata</string> + <string name="lsfg_pick_title">Scegli Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll importato</string> + <string name="lsfg_import_unchanged">Questo Lossless.dll è già in uso</string> + <string name="lsfg_import_not_owned">Questo account Steam non possiede Lossless Scaling</string> + <string name="lsfg_import_invalid">Questo file non è il Lossless.dll di Lossless Scaling</string> + <string name="lsfg_import_failed">Impossibile preparare LSFG da questo Lossless.dll</string> + <string name="lsfg_problem_missing">LSFG richiede Lossless Scaling da Steam o un Lossless.dll importato</string> + <string name="lsfg_problem_failed">LSFG non è riuscito a preparare gli shader da Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: non supportato</string> + <string name="hud_fg_failed">%1$s: errore del motore</string> + <string name="hud_fg_needs_lossless">%1$s: richiede Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · avvio</string> + <string name="second_library_import_hint">Aggiunge una libreria di Steam e la analizza alla ricerca di giochi Windows. I giochi posseduti usano le loro voci di Steam; gli altri diventano collegamenti non di Steam.</string> + <string name="game_env_title">Ambiente di gioco</string> + <string name="game_env_hint">Variabili d\'ambiente per i giochi Proton.</string> + <string name="game_env_edit">Modifica</string> + <string name="game_env_shared">Tutti i giochi Proton</string> + <string name="game_env_scope">Profilo</string> + <string name="game_env_app_id">ID app di Steam</string> + <string name="game_env_open">Apri</string> + <string name="game_env_profile">Gioco %1$s</string> + <string name="game_env_add">Aggiungi variabile</string> + <string name="game_env_name">Nome variabile</string> + <string name="game_env_value">Valore</string> + <string name="game_env_save">Salva</string> + <string name="game_env_remove">Rimuovi</string> + <string name="game_env_restore">Eredita di nuovo</string> + <string name="game_env_reset">Cancella le personalizzazioni dell\'ambiente</string> + <string name="game_env_unset">Annulla impostazione per questo profilo</string> + <string name="game_env_empty">Nessuna variabile impostata.</string> + <string name="game_env_inherited">Ereditata</string> + <string name="game_env_custom">Variabile personalizzata</string> + <string name="game_env_error">Impossibile caricare o salvare. Controlla lo spazio libero e riprova.</string> + <string name="game_env_invalid">Usa un nome valido e un valore di massimo 8192 caratteri.</string> + <string name="game_env_unused">Il runtime Proton standard non legge questa variabile.</string> + <string name="game_env_loading">Caricamento…</string> + <string name="game_env_feature">Sostituisce il feature level D3D12. 12_2 dichiara le funzionalità di DirectX 12 Ultimate; quelle non supportate possono causare errori. Lascia vuota per il rilevamento automatico.</string> + <string name="game_env_shader">Sostituisce lo shader model D3D12. 6_9 richiede un VKD3D abbastanza recente e funzionalità GPU adeguate. Lascia vuota per il rilevamento automatico.</string> + <string name="game_env_cache">Mantieni attiva la cache degli shader di Mesa per ridurre le compilazioni ripetute. false attiva la cache.</string> + <string name="game_env_cache_size">Dimensione massima della cache degli shader di Mesa, ad esempio 1G. Una cache più grande occupa più spazio di archiviazione.</string> + <string name="game_env_vkd3d_config">Opzioni VKD3D per D3D12. nodxr disattiva il ray tracing; usalo solo per un gioco che lo richiede.</string> + <string name="game_env_proton_log">Imposta 1 per un log diagnostico di Proton. Il log può ridurre le prestazioni e occupare spazio.</string> + <string name="game_env_wined3d">Imposta 1 per usare WineD3D basato su OpenGL invece di DXVK, per test di compatibilità D3D9–11.</string> + <string name="game_env_no_ntsync">Imposta 1 per non usare ntsync (droiddeck-ntsync o un driver del kernel) in questo gioco; userà droiddeck-esync se esiste un pacchetto, altrimenti droiddeck-fsync.</string> + <string name="game_env_no_esync">Imposta 1 per disattivare droiddeck-esync in questo gioco; userà invece droiddeck-fsync, o droiddeck-ntsync se anche fsync è disattivato.</string> + <string name="game_env_no_fsync">Imposta 1 per non usare droiddeck-fsync in questo gioco; userà droiddeck-esync se esiste un pacchetto, altrimenti droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Imposta 1 per eseguire questo gioco con droiddeck-fsync, o 0 per dare priorità a droiddeck-esync se c\'è un pacchetto adatto al suo Proton.</string> + <string name="game_env_xalia">Imposta 0 per disattivare l\'assistente di navigazione con gamepad di Proton in questo gioco.</string> + <string name="game_env_hud">Overlay DXVK per D3D9–11. fps mostra il frame rate; se vuota, l\'overlay è nascosto.</string> + <string name="game_env_dxvk_config">Impostazioni DXVK separate da punto e virgola. Le build recenti usano dxvk.maxFrameRate per limitare i frame; per giocare normalmente è meglio il limitatore di frame della sessione.</string> + <string name="game_env_vkd3d_limit">Limite di frame rate D3D12. 0 disattiva il limite.</string> + <string name="game_env_glthread">Threading OpenGL di Mesa. true può aiutare i giochi OpenGL limitati dalla CPU; provalo gioco per gioco.</string> + <string name="sync_backend_title">Sincronizzazione Wine</string> + <string name="sync_backend_hint">Come i giochi mantengono sincronizzati i loro thread. Si applica dalla prossima sessione.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Preset FEX</string> + <string name="fex_next_launch">Si applica al prossimo avvio del gioco.</string> + <string name="game_settings_title">Giochi</string> + <string name="fex_default_label">Predefinito FEX</string> + <string name="fex_default_detail">Usa le impostazioni predefinite di FEX.</string> + <string name="fex_stability_label">Stabilità</string> + <string name="fex_stability_detail">Impostazioni più sicure e più lente.</string> + <string name="fex_compatibility_label">Compatibilità</string> + <string name="fex_compatibility_detail">TSO completo con multiblock.</string> + <string name="fex_intermediate_label">Intermedio</string> + <string name="fex_intermediate_detail">TSO bilanciato con precisione x87 ridotta.</string> + <string name="fex_performance_label">Prestazioni</string> + <string name="fex_performance_detail">TSO del tutto disattivato; multiblock.</string> + <string name="fex_performance_tso_label">Prestazioni + TSO</string> + <string name="fex_performance_tso_detail">Impostazioni Prestazioni con il TSO principale attivo.</string> + <string name="fex_extreme_label">Estremo</string> + <string name="fex_extreme_detail">Disattiva i controlli sul codice automodificante. Giochi con JIT e DRM potrebbero non funzionare.</string> + <string name="fex_extreme_tso_label">Estremo + TSO</string> + <string name="fex_extreme_tso_detail">Impostazioni Estremo con il TSO principale attivo.</string> + <string name="fex_extreme_gn_label">Estremo-gn</string> + <string name="fex_extreme_gn_detail">Prestazioni con suggerimenti TSC e metadati. Provalo prima di Estremo.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Prestazioni con controlli completi sul codice e bit dell\'hypervisor nascosto.</string> + <string name="game_env_custom_value">Valore personalizzato</string> + <string name="game_env_select_value">Seleziona valore</string> + <string name="user_apps_section">Emulatori e app</string> + <string name="user_apps_add">Aggiungi</string> + <string name="user_apps_add_detail">La tua app o il tuo gioco</string> + <string name="user_apps_kind_script">Script</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Avvio…</string> + <string name="user_apps_added">Hai aggiunto %1$s</string> + <string name="user_apps_removed">Hai rimosso %1$s</string> + <string name="user_apps_back">Desktop</string> + <string name="user_apps_gone">Quell\'app non c\'è più. Sceglila di nuovo dal Desktop.</string> + <string name="user_apps_open">Apri %1$s</string> + <string name="user_apps_remove">Rimuovi</string> + <string name="user_apps_remove_confirm">Premi di nuovo per rimuovere</string> + <string name="user_apps_stop_session">Termina la sessione per rimuovere</string> + <string name="user_apps_script_linked">Esegue %1$s dalla sua cartella, collegata alla sessione nella posizione in cui si trova. Rimuovere l\'app non tocca quella cartella.</string> + <string name="user_apps_script_copied">Esegue %1$s da una copia della sua cartella dentro DroidDeck. Rimuovere l\'app elimina la copia, non l\'originale.</string> + <string name="user_apps_runtime_required">Installa prima il runtime Linux</string> + <string name="user_apps_file_gone">Il file non esiste più</string> + <string name="user_apps_no_space">Spazio libero insufficiente: per copiare la cartella servono %1$s</string> + <string name="user_apps_copying">Copia di %1$s</string> + <string name="user_apps_failed">Impossibile aggiungere l\'app</string> + <string name="user_apps_github_checking">Ricerca di una release di %1$s</string> + <string name="user_apps_github_unreachable">Impossibile leggere le release di %1$s</string> + <string name="user_apps_github_no_appimage">Nessuna release di %1$s ha un AppImage ARM64 o x86_64</string> + <string name="user_apps_downloading">Download di %1$s</string> + <string name="user_apps_download_failed">Download non riuscito</string> + <string name="user_apps_update_failed">Impossibile aggiornare l\'app</string> + <string name="user_apps_icon_failed">Impossibile leggere quell\'icona</string> + <string name="user_apps_saved">Modifiche a %1$s salvate</string> + <string name="user_apps_edit">Modifica</string> + <string name="user_apps_check_updates">Controlla aggiornamenti</string> + <string name="user_apps_checking_updates">Controllo aggiornamenti…</string> + <string name="user_apps_update_to">Aggiorna a %1$s</string> + <string name="user_apps_up_to_date">Ultima versione · %1$s</string> + <string name="user_apps_updated">Aggiornamento di %1$s completato</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Aggiungi un\'app</string> + <string name="add_app_tab_script">Script</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Un file .sh. Viene eseguito dalla sua cartella, a schermo intero in gamescope.</string> + <string name="add_app_appimage_hint">Un AppImage ARM64 (aarch64) o uno x86_64 da eseguire tramite FEX. Viene estratto nel runtime Linux una sola volta.</string> + <string name="add_app_github_hint">Installa l\'AppImage ARM64 dalla release più recente del repository, oppure quello x86_64 tramite FEX.</string> + <string name="app_fex_title">Usa FEX</string> + <string name="app_fex_auto">Auto</string> + <string name="app_fex_on">Sì</string> + <string name="app_fex_off">No</string> + <string name="app_fex_hint">FEX esegue programmi Linux x86 su questo dispositivo ARM64. Auto lo usa quando il programma è compilato per x86.</string> + <string name="app_fex_x86">%1$s tramite FEX</string> + <string name="app_fex_not_ready">Questo programma è compilato per PC %1$s e viene eseguito tramite FEX, che non è ancora configurato. Apri Steam una volta dopo aver eseguito l\'accesso: DroidDeck gli farà scaricare FEX e lo Steam Linux Runtime necessario, poi il programma si aprirà.</string> + <string name="session_end_program">Questo programma</string> + <string name="session_end_fex_missing">%1$s è compilato per PC x86 e viene eseguito tramite FEX, che non è ancora installato. Avvia Steam una volta dopo aver eseguito l\'accesso e lascia che scarichi FEX e lo Steam Linux Runtime, poi riavvia il programma.</string> + <string name="add_app_flatpak_hint">Un ID app di Flathub o la sua pagina su Flathub. Se manca, Flatpak viene prima configurato.</string> + <string name="add_app_file">File</string> + <string name="add_app_no_file">Nessun file scelto</string> + <string name="add_app_choose_file">Scegli file</string> + <string name="add_app_change_file">Cambia</string> + <string name="add_app_pick_script">Scegli uno script</string> + <string name="add_app_pick_appimage">Scegli un AppImage</string> + <string name="add_app_pick_icon">Scegli un\'icona</string> + <string name="add_app_repository">Repository</string> + <string name="add_app_repository_placeholder">proprietario/repo o un link github.com</string> + <string name="add_app_repository_invalid">Non è un repository GitHub</string> + <string name="add_app_flatpak_id">ID app</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Non è un ID app di Flathub</string> + <string name="add_app_flatpak_bundle_hint">Oppure un file .flatpak, per un\'app che non è su Flathub.</string> + <string name="add_app_pick_flatpak">Scegli un file .flatpak</string> + <string name="add_app_source">Origine</string> + <string name="add_app_appearance">Sul tuo Desktop</string> + <string name="add_app_preview_name">Nuova app</string> + <string name="add_app_name">Nome</string> + <string name="add_app_name_placeholder">Dall\'app</string> + <string name="add_app_icon">Icona</string> + <string name="add_app_icon_default">Icona predefinita</string> + <string name="add_app_choose_icon">Scegli icona</string> + <string name="add_app_clear_icon">Cancella</string> + <string name="add_app_icon_suggestions">Dal repository</string> + <string name="add_app_icon_searching">Ricerca di icone…</string> + <string name="add_app_icon_reset">Predefinita</string> + <string name="edit_app_title">Modifica %1$s</string> + <string name="edit_app_save">Salva</string> + <string name="add_app_checking_folder">Controllo della cartella…</string> + <string name="add_app_folder_linked">La sua cartella è collegata alla sessione: %1$s</string> + <string name="add_app_folder_copied">La sua cartella contiene programmi Linux, che la memoria condivisa non può eseguire, quindi viene copiata in DroidDeck (%1$s).</string> + <string name="add_app_confirm">Aggiungi</string> + <string name="add_app_cancel">Annulla</string> + <string name="add_app_runtime_required">Installa prima il runtime Linux da Configurazione.</string> + <string name="add_app_busy">Attendi che %1$s finisca.</string> + <string name="steam_compat_label">Compatibile</string> + <string name="proton_compatible_note">Le build contrassegnate con “%1$s” nel menu Compatibilità di Steam includono le correzioni al prefisso di DroidDeck e avviano i giochi qui. Quella predefinita è Proton Experimental ARM64 (%1$s), oppure Proton 11.0 ARM64 (%1$s) quando è installata questa build più recente. Le voci Proton di Valve senza il contrassegno non possono avviare giochi su questo dispositivo.</string> + <string name="proton_installed_compatible">Installato: %1$s · %2$s</string> + <string name="common_cancel">Annulla</string> + <string name="common_auto">Auto</string> + <string name="common_never">Mai</string> + <string name="common_always">Sempre</string> + <string name="common_uninstall">Disinstalla</string> + <string name="common_check">Controlla</string> + <string name="common_update">Aggiorna</string> + <string name="common_checking">Controllo…</string> + <string name="common_working">Operazione in corso…</string> + <string name="common_forget">Dimentica</string> + <string name="common_add_ellipsis">Aggiungi…</string> + <string name="common_use">Usa</string> + <string name="common_applies_next_session">Si applica dalla prossima sessione.</string> + <string name="mode_steam_title">Sessione Steam</string> + <string name="mode_desktop_title">Sessione desktop</string> + <string name="mode_display">Schermo</string> + <string name="mode_resolution">Risoluzione</string> + <string name="mode_res_720">Fino a 720p</string> + <string name="mode_res_900">Fino a 900p</string> + <string name="mode_res_1080">Fino a 1080p</string> + <string name="mode_res_native">Nativa</string> + <string name="mode_res_default">%1$s (predefinita)</string> + <string name="mode_res_custom_value">Personalizzata · %1$d×%2$d</string> + <string name="mode_res_custom">Personalizzata…</string> + <string name="mode_res_note">A 720p i menu possono essere più reattivi.</string> + <string name="mode_ratio">Proporzioni schermo</string> + <string name="mode_ratio_custom">Definite dalla risoluzione personalizzata.</string> + <string name="mode_ratio_auto">Auto usa almeno 16:9.</string> + <string name="mode_fps">Limite frame</string> + <string name="mode_fps_note">Limita l\'intera sessione. Lo schermo passa a una frequenza di aggiornamento multipla del limite.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Uscita HDR10</string> + <string name="mode_hdr_unavailable">Non disponibile: %1$s.</string> + <string name="mode_hdr_restart">Riavvia l\'app per applicare.</string> + <string name="mode_drivers">Driver</string> + <string name="mode_gpu_drivers">Driver GPU</string> + <string name="mode_gpu_drivers_hint">Condivisi da Steam e Desktop. Si impostano nella pagina Componenti.</string> + <string name="mode_touch_controls">Tocco e controlli</string> + <string name="mode_touch">Tocco</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Diretto</string> + <string name="mode_touch_note">Auto: touchpad sul Desktop, diretto in Steam.</string> + <string name="mode_osc">Controlli su schermo</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Auto mostra i controlli quando non è collegato nessun controller.</string> + <string name="osc_steam_touch">Touch di Steam (beta)</string> + <string name="osc_style_next_session">I controlli touch di Steam partono dalla prossima sessione Steam</string> + <string name="osc_steam_layout">Layout touch di Steam</string> + <string name="osc_steam_layout_hint">Sposta, ridimensiona o nascondi i controlli touch di questo gioco; vengono salvati su Steam</string> + <string name="mode_controller">Controller</string> + <string name="mode_controller_hint">Come Steam vede il tuo controller. Si applica dalla prossima sessione.</string> + <string name="mode_controller_deck">Controller di Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Controller Xbox 360</string> + <string name="mode_controller_note">Deck: tasto Accesso rapido e giroscopio. Steam Controller: lo stesso, con il rilevamento della presa sui tasti posteriori. DualShock 4 e DualSense: giroscopio, con i trackpad usati come touchpad. Xbox 360: apri Accesso rapido con Guide+A.</string> + <string name="mode_back">Indietro</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Sessione</string> + <string name="mode_suspend">Comportamento in background</string> + <string name="mode_suspend_hint">Quando l\'app è nascosta o lo schermo si spegne.</string> + <string name="mode_suspend_manual">Manuale</string> + <string name="mode_suspend_native">Nativo</string> + <string name="mode_suspend_steam_note">Auto mette in pausa e riprende quando l\'app torna visibile. Nativo prepara prima Steam alla sospensione. Manuale attende Riprendi. Mai lascia tutto in esecuzione.</string> + <string name="mode_background_downloads">Continua i download</string> + <string name="mode_background_downloads_hint">Ritarda la sospensione in background mentre Steam sta scaricando.</string> + <string name="mode_suspend_note">Auto mette in pausa in background e riprende quando l\'app torna visibile. Manuale attende Riprendi. Mai lascia tutto in esecuzione.</string> + <string name="mode_startup">Avvio</string> + <string name="mode_steam_startup">Avvia Steam con DroidDeck</string> + <string name="mode_steam_startup_hint">Apre la sessione Steam all\'avvio di DroidDeck.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Ricerca di release…</string> + <string name="mode_decky_ready">Pronto per installare %1$s.</string> + <string name="mode_decky_none">Nessuna build compatibile trovata. Riprova più tardi.</string> + <string name="mode_decky_installed">Installato · %1$s</string> + <string name="mode_decky_update">Aggiornamento disponibile · %1$s</string> + <string name="mode_decky_current">Ultima versione · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Installa l\'ultima versione</string> + <string name="mode_decky_on">Si avvia con Steam. Quando è attivo, altre app su questo dispositivo potrebbero controllare Steam.</string> + <string name="mode_decky_off">Disattivato. La porta di debug remoto di Steam resta chiusa.</string> + <string name="mode_decky_remove_title">Disinstallare Decky Loader?</string> + <string name="mode_decky_remove_text">Rimuove il loader. I tuoi plugin e le impostazioni vengono mantenuti.</string> + <string name="mode_client">Client</string> + <string name="mode_mangoapp">Overlay prestazioni</string> + <string name="mode_mangoapp_hint">Disattivalo se i giochi vanno in crash o diventano neri in modalità Deck. Si applica dalla prossima sessione.</string> + <string name="mode_steam_repair">Ripara il client Steam</string> + <string name="mode_steam_repair_hint">Scarica di nuovo il client Steam al prossimo avvio di Steam. Usalo se Steam resta sulla schermata di caricamento. Giochi, accesso e impostazioni vengono mantenuti.</string> + <string name="mode_steam_repair_queued">Il client Steam verrà scaricato di nuovo al prossimo avvio di Steam.</string> + <string name="mode_steam_repair_button">Ripara</string> + <string name="mode_added_art">Grafica</string> + <string name="mode_sgdb_key">Chiave API SteamGridDB</string> + <string name="mode_sgdb_key_yours">La tua chiave</string> + <string name="mode_sgdb_edit">Modifica…</string> + <string name="mode_added_art_hint">Completa la grafica mancante da Steam, poi da SteamGridDB. I tuoi cover.jpg, hero.jpg, logo.png o icon.png nella cartella del gioco hanno la priorità.</string> + <string name="summary_remove_game">Rimuovi %1$s</string> + <string name="mode_added_remove_confirm">Rimuovere?</string> + <string name="games_add">Aggiungi gioco</string> + <string name="games_add_title">Aggiungi un gioco:</string> + <string name="games_pick_exe_title">Scegli l\'exe:</string> + <string name="games_add_unreachable">Questa posizione non è disponibile nella sessione</string> + <string name="mode_added_exe_check">Controlla questo exe</string> + <string name="wincomp_title">Componenti Windows</string> + <string name="wincomp_pad_hint">LB / RB per passare da una sezione all\'altra.</string> + <string name="wincomp_card_none">Nessuno</string> + <string name="wincomp_applies">DLL di Windows non incluse in Proton, dall\'elenco dei componenti. Attiva quelle che servono a questo gioco: vanno nella cartella Windows del gioco, mai tra i suoi file, e restano con qualunque Proton venga usato.</string> + <string name="wincomp_offline">Impossibile raggiungere l\'elenco dei componenti. I componenti già scaricati si possono comunque attivare o disattivare.</string> + <string name="wincomp_recommended">Consigliati per questo gioco</string> + <string name="wincomp_checking">Verifica di cosa serve a questo gioco…</string> + <string name="wincomp_when_online">Disponibile quando sei online</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Attivazione di %1$d componente…</item> + <item quantity="many">Attivazione di %1$d componenti…</item> + <item quantity="other">Attivazione di %1$d componenti…</item> + </plurals> + <string name="wincomp_auto_section">Attivi per questo gioco</string> + <string name="wincomp_auto_steam">Steam installa %1$s con %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">Dall\'elenco di GOG per questo gioco</string> + <string name="wincomp_auto_epic">Dai prerequisiti di Epic per questo gioco</string> + <string name="wincomp_auto_amazon">Dai passaggi di installazione di Amazon per questo gioco</string> + <string name="wincomp_steam_by_name">Steam installa %1$s con l\'app %2$s, abbinata per nome</string> + <string name="wincomp_suggestions">Elencati anche</string> + <string name="wincomp_suggestion_reason">Elencato da %1$s; qui non è un componente</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Il gioco include %1$s</string> + <string name="wincomp_found_shipped">Il gioco ha %1$s (spesso funziona così com\'è)</string> + <string name="wincomp_already_here">Già presente in questo gioco</string> + <string name="wincomp_no_recommendation">Nulla nella cartella del gioco indica un componente.</string> + <string name="wincomp_active">Installati per questo gioco (%1$d)</string> + <string name="wincomp_all">Tutti i componenti (%1$d)</string> + <string name="wincomp_installers">Richiedono un programma di installazione Windows (%1$d)</string> + <string name="wincomp_installers_note">Sono programmi di installazione a sé, senza un pacchetto da scomporre e ancora senza una registrazione di ciò che installano. Quasi tutti sono vecchi runtime già sostituiti dal Mono incluso in Proton; le registrazioni vengono aggiunte man mano che vengono create.</string> + <string name="wincomp_show">Mostra</string> + <string name="wincomp_hide">Nascondi</string> + <string name="wincomp_needs_installer">Esegue un proprio programma di installazione (ancora nessuna registrazione)</string> + <string name="wincomp_unsupported">Non ancora supportato qui</string> + <string name="wincomp_loading">Caricamento dei componenti…</string> + <string name="wincomp_failed">Impossibile installare: %1$s</string> + <string name="wincomp_downloaded">Scaricato</string> + <string name="wincomp_downloading">Download di %1$s</string> + <string name="wincomp_installing">Installazione: %1$s</string> + <string name="wincomp_reverting">Disattivazione…</string> + <string name="wincomp_download_size">%1$s da scaricare</string> + <string name="wincomp_next_launch">Ha effetto al prossimo avvio del gioco.</string> + <string name="mode_stretch169">Allarga i giochi 16:9</string> + <string name="mode_stretch169_hint">Sugli schermi più quadrati di 16:9, allarga i giochi a tutto schermo invece di mostrare le bande. Si applica dalla prossima sessione.</string> + <string name="mode_audio">Audio</string> + <string name="mode_directaudio">DirectAudio per i giochi</string> + <string name="mode_directaudio_hint">Bypassa PulseAudio per ridurre la latenza.</string> + <string name="mode_mic">Microfono</string> + <string name="mode_mic_hint">Per la chat vocale.</string> + <string name="mode_network">Rete</string> + <string name="mode_wifi_discovery">Rilevamento Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Mostra in Steam i nomi delle reti Wi-Fi e le reti vicine.</string> + <string name="mode_wifi_location_off">La geolocalizzazione è disattivata.</string> + <string name="mode_wifi_permission_denied">Autorizzazione Posizione non concessa.</string> + <string name="mode_wifi_open_settings">Apri impostazioni</string> + <string name="mode_wifi_continue">Continua</string> + <string name="mode_wifi_explain_title">Attivare il rilevamento Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android richiede l\'autorizzazione Posizione per leggere i nomi delle reti Wi-Fi e rilevare le reti vicine. DroidDeck usa questo accesso per mostrare quelle reti in Steam. Non tracciamo la tua posizione. L\'accesso a Internet funziona anche senza questa autorizzazione.</string> + <string name="mode_storage">Archiviazione giochi</string> + <string name="mode_storage_auto">Automatica - la scheda SD se presente, più le tue cartelle Games</string> + <string name="mode_storage_auto_none">Automatica - le tue cartelle Games, più la scheda SD se presente (ora assente)</string> + <string name="mode_storage_internal">Solo memoria interna</string> + <string name="mode_storage_folder">Cartella: %1$s</string> + <string name="mode_second_library">Seconda libreria</string> + <string name="mode_storage_note">I giochi che caricano risorse in streaming dalla SD o dalla memoria condivisa potrebbero scattare.</string> + <string name="mode_storage_diagnostics">Diagnostica archiviazione</string> + <string name="mode_storage_diagnostics_hint">Registra i risultati delle allocazioni e campioni dei tempi di archiviazione in Condividi log. Mentre è attiva può rallentare le installazioni. Si applica dalla prossima sessione.</string> + <string name="mode_choose_folder">Scegli una cartella…</string> + <string name="mode_custom_res_title">Risoluzione personalizzata</string> + <string name="mode_custom_res_text">Sostituisce il limite e le proporzioni. Una dimensione che non corrisponde allo schermo avrà delle bande.</string> + <string name="mode_width">Larghezza</string> + <string name="mode_height">Altezza</string> + <string name="mode_custom_res_range">Tra 320×240 e 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d gioco</item> + <item quantity="many">%1$d giochi</item> + <item quantity="other">%1$d giochi</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Elimina</string> + <string name="common_restore">Ripristina</string> + <string name="common_download">Scarica</string> + <string name="common_delete_named">Elimina %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Driver di runtime</string> + <string name="comp_runtime_driver_hint">Usato da Steam, dai giochi e dal desktop. Si applica dalla prossima sessione.</string> + <string name="comp_import_turnip">Importa zip Turnip…</string> + <string name="comp_display_driver">Driver di visualizzazione</string> + <string name="comp_display_driver_hint">Disegna i frame sullo schermo in entrambe le modalità. Riavvia l\'app per applicare.</string> + <string name="comp_import_adrenotools">Importa uno zip AdrenoTools…</string> + <string name="comp_never">mai</string> + <string name="comp_nightlies_checked">Nightlies controllate: %1$s</string> + <string name="comp_title">Componenti</string> + <string name="comp_about">Informazioni sui componenti</string> + <string name="comp_check_drivers">Cerca nuovi driver</string> + <string name="comp_check_nightlies">Cerca nuovi pacchetti nelle Nightlies</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Il Proton scelto qui esegue ogni gioco che non ne ha scelto uno proprio in Steam, e una modifica fatta in Steam appare anche qui. Steam sostituisce il Proton di Valve quando si aggiorna; gli originali vengono conservati per ogni build.</string> + <string name="comp_scope">Configurazione</string> + <string name="comp_profile_configure">Configura profilo</string> + <string name="comp_profile">Profilo</string> + <string name="comp_scope_general">Profilo predefinito</string> + <string name="comp_scope_general_detail">Usato automaticamente dai giochi senza personalizzazioni.</string> + <string name="comp_profile_game_detail">Impostazioni salvate, usate automaticamente all\'avvio di %1$s.</string> + <string name="comp_game_hint">Scegli solo le impostazioni che servono a questo gioco. Tutto il resto continua a usare il Profilo predefinito.</string> + <string name="comp_game_fex">Preset FEX</string> + <string name="comp_game_fex_inherited">In uso il preset del Profilo predefinito.</string> + <string name="comp_game_fex_override">Preset personalizzato salvato per questo gioco.</string> + <string name="comp_game_fex_custom">Variabili FEX personalizzate</string> + <string name="comp_game_use_general">Usa predefinito</string> + <string name="comp_game_compatibility">Compatibilità del gioco</string> + <string name="comp_game_environment_hint">Opzioni d\'ambiente di Proton, DXVK, VKD3D e sincronizzazione per questo gioco.</string> + <string name="comp_game_proton_inherited">In uso il Proton del Profilo predefinito.</string> + <string name="comp_game_proton_override">Proton personalizzato salvato per questo gioco tramite la mappatura di compatibilità di Steam.</string> + <string name="comp_no_proton_short">Nessun Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Usa il pacchetto del Profilo predefinito da %1$s, a meno che questo gioco non ne selezioni un altro.</string> + <string name="comp_game_component_general">Usa il pacchetto di componenti del Profilo predefinito.</string> + <string name="comp_game_component_override">Usa %1$s solo per questo gioco.</string> + <string name="comp_game_runtime_options">Opzioni del runtime</string> + <string name="comp_game_environment_other_hint">Altre opzioni d\'ambiente per gioco di Proton, DXVK, VKD3D-Proton e sincronizzazione.</string> + <string name="comp_game_saved_next">Il profilo di %1$s è salvato per il prossimo avvio del gioco.</string> + <string name="game_no_steam_title">Avvia senza Steam</string> + <string name="game_no_steam_detail">Lo apre in Proton/FEX senza il client di Steam; le funzioni di Steam sono disattivate.</string> + <string name="game_no_steam_on">Attivo</string> + <string name="game_steam_with">Si avvia con Steam</string> + <string name="game_steam_without">Si avvia senza Steam</string> + <string name="game_settings_card">Impostazioni</string> + <string name="game_settings_menu_title">Impostazioni di %1$s</string> + <string name="game_settings_default">Predefinito</string> + <string name="game_settings_default_detail">Riporta tutto ciò che è stato cambiato per questo gioco alle impostazioni dell\'app.</string> + <string name="game_sync_custom">Variabili di sincronizzazione personalizzate</string> + <string name="comp_game_proton_live">La scelta di Proton per %1$s è salvata e già disponibile in Steam.</string> + <string name="comp_game_proton_next">La scelta di Proton per %1$s è salvata. Riavvia Steam prima di avviare il gioco.</string> + <string name="comp_game_proton_not_runnable">%1$s non può usare il Proton selezionato su questo dispositivo.</string> + <string name="comp_game_load_failed">Impossibile caricare il profilo di %1$s: %2$s</string> + <string name="comp_game_save_failed">Impossibile salvare il profilo del gioco: %1$s</string> + <string name="comp_game_reset">Reimposta profilo del gioco</string> + <string name="comp_game_reset_title">Reimpostare il profilo di %1$s?</string> + <string name="comp_game_reset_body">Rimuovere le personalizzazioni di Proton, FEX, pacchetto di componenti, ambiente, filtro delle texture e componenti Windows di questo gioco? Userà il Profilo predefinito.</string> + <string name="comp_game_reset_done">%1$s ora usa il Profilo predefinito.</string> + <string name="comp_game_reset_failed">Impossibile reimpostare completamente il profilo del gioco: %1$s</string> + <string name="comp_default_live">%1$s ora esegue ogni gioco che non ha scelto un proprio Proton in Steam.</string> + <string name="comp_default_next">%1$s eseguirà ogni gioco che non ha scelto un proprio Proton, dal prossimo avvio di Steam.</string> + <string name="comp_default_not_runnable">%1$s non può avviare giochi qui, quindi non può essere il predefinito.</string> + <string name="comp_default_failed">Impossibile salvare il Proton predefinito: %1$s</string> + <string name="comp_swapped">%1$s · %2$d sostituiti</string> + <string name="comp_all_original">%1$s · tutti originali</string> + <string name="comp_game_running_suffix">%1$s · gioco in esecuzione</string> + <string name="comp_esync_pack">%1$s · pacchetto droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · ancora nessun pacchetto droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync integrato, nessun pacchetto necessario</string> + <string name="comp_gpu_drivers">Driver GPU</string> + <string name="comp_reapplied">%1$s · riapplicato all\'avvio %2$s</string> + <string name="comp_next_queued">Prossimo: %1$s · dopo la chiusura del gioco</string> + <string name="comp_in_use">%1$s in uso: %2$s</string> + <string name="comp_waits">Attende la chiusura del gioco</string> + <string name="comp_applies_next_game">Si applica al prossimo avvio di un gioco</string> + <string name="comp_import_zip">Importa .zip</string> + <string name="comp_reading">Lettura delle versioni di Proton…</string> + <string name="comp_no_proton">Nessun Proton ancora installato. Avvia Steam una volta per scaricare il suo Proton ARM64, oppure aggiungi GE-Proton, CachyOS o DroidDeck-Proton da Configurazione.</string> + <string name="comp_original">Originale · %1$s</string> + <string name="comp_this_build">%1$s · questa build</string> + <string name="comp_earlier_build">%1$s · build precedente</string> + <string name="comp_installed_count">Installati · %1$d</string> + <string name="comp_nothing_stored">Ancora nulla di salvato per %1$s. I file di questo Proton vengono salvati come suo originale.</string> + <string name="comp_waits_long">Un gioco è in esecuzione su questo Proton, quindi la modifica attende la sua chiusura.</string> + <string name="comp_applies_long">Si applica al prossimo avvio di un gioco.</string> + <string name="comp_swap_title">Sostituire %1$s?</string> + <string name="comp_swap_body">Inserire %1$s in %2$s? I suoi file originali restano salvati. %3$s</string> + <string name="comp_restore_title">Ripristinare %1$s?</string> + <string name="comp_restore_body">Rimettere l\'originale di %1$s in %2$s? %3$s</string> + <string name="comp_delete_package_body">Rimuove il pacchetto dall\'app. Puoi scaricarlo di nuovo.</string> + <string name="comp_delete_original_title">Eliminare questo originale?</string> + <string name="comp_delete_original_body">Questo originale di %1$s proviene da una build precedente di %2$s. L\'originale della build attuale viene sempre conservato.</string> + <string name="comp_nightlies_count">Nelle Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Aggiorna per elencare i pacchetti nelle Nightlies.</string> + <string name="comp_nothing_new">Niente di nuovo dall\'ultimo controllo.</string> + <string name="comp_import_wcp">Importa .wcp</string> + <string name="comp_restore_original">Ripristina l\'originale di questo Proton</string> + <string name="comp_restore_original_body">Ripristinare il %2$s originale di %1$s?</string> + <string name="comp_swap">Sostituisci</string> + <string name="comp_about_text">FEX, DXVK e VKD3D-Proton per ogni Proton con cui Steam esegue i giochi.\n\nSeleziona una riga installata per usarla al posto di quella attuale. La modifica si applica al prossimo avvio di un gioco, o dopo la chiusura del gioco in esecuzione.\n\nLe tue scelte vengono ricontrollate prima di ogni avvio e ripristinate se qualcosa le ha modificate. I file originali di ogni Proton vengono conservati, così gli aggiornamenti di Steam non li perdono mai.</string> + <string name="comp_tag_original">Originale</string> + <string name="comp_tag_in_use">In uso</string> + <string name="comp_tag_new">Nuovo</string> + <string name="comp_tag_stored">Salvato</string> + <string name="perf_title">Prestazioni</string> + <string name="perf_lede">Core della CPU, correzioni della sessione e nome host. Si applica dalla prossima sessione.</string> + <string name="perf_client_cores_group">Core del client Steam</string> + <string name="perf_override">Sostituisci la scelta dei core di Steam</string> + <string name="perf_override_hint">Vincola Steam, il suo helper dell\'interfaccia e gamescope ai core qui sotto.</string> + <string name="perf_client_cores">Core del client</string> + <string name="perf_client_cores_on">Core per Steam.</string> + <string name="perf_client_cores_off">Attiva la sostituzione per sceglierli.</string> + <string name="perf_game_cores_group">Core dei giochi</string> + <string name="perf_game_cores">Core dei giochi</string> + <string name="perf_game_cores_hint">Core per i giochi. Con tutti selezionati, Android li gestisce liberamente.</string> + <string name="perf_client_ui">Interfaccia del client</string> + <string name="perf_glthread">GL multithread</string> + <string name="perf_glthread_hint">Può rendere più reattivi i menu di Steam.</string> + <string name="perf_zink">Zink: descrittori differiti</string> + <string name="perf_zink_hint">Consigliato per i driver senza descriptor buffer.</string> + <string name="perf_noglerror">Salta i controlli degli errori GL</string> + <string name="perf_noglerror_hint">Disattiva la convalida GL a ogni chiamata.</string> + <string name="perf_gsrealtime">gamescope: coda GPU in tempo reale</string> + <string name="perf_gsrealtime_hint">Dà priorità al lavoro GPU del compositor. Può rendere più regolare il frame pacing, a scapito dei giochi.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Mantieni la GPU alla frequenza massima</string> + <string name="perf_gpuclock_hint">Solo Adreno. Meno scatti, più consumo di batteria e più calore.</string> + <string name="perf_fixes">Correzioni della sessione</string> + <string name="perf_sysmem">Turnip: rendering sysmem</string> + <string name="perf_sysmem_hint">Più veloce per Steam e la maggior parte dei giochi. 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_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> + <string name="perf_esync_hint">I thread Windows dei giochi si attendono a vicenda tramite eventfd e memoria condivisa invece di passare ogni volta da wineserver. Usa un pacchetto droiddeck-esync creato per quella precisa build di Proton; i pacchetti vengono scaricati automaticamente. Finché non ne esiste uno per una nuova build di Proton, viene usato droiddeck-fsync. Si applica dalla prossima sessione.</string> + <string name="perf_xalia_hint">Disattiva l\'assistente di navigazione con gamepad di Proton, che consuma CPU in ogni gioco.</string> + <string name="perf_seccomp">Esegui proot senza seccomp</string> + <string name="perf_seccomp_hint">Può risolvere errori di syscall mancanti su alcuni kernel. Può ridurre le prestazioni.</string> + <string name="perf_fastpath">Percorso veloce di proot</string> + <string name="perf_fastpath_needs_seccomp">Richiede il filtro seccomp di proot.</string> + <string name="perf_fastpath_hint">Ricerca dei file più veloce e meno scatti. Disattivalo se un programma non trova i suoi file.</string> + <string name="perf_identity">Identità della sessione</string> + <string name="perf_hostname">Nome host</string> + <string name="perf_hostname_hint">Il nome con cui Steam vede questo dispositivo. Se vuoto, torna a %1$s.</string> + <string name="perf_hostname_invalid">Solo lettere, cifre e trattini interni, fino a 63 caratteri.</string> + <string name="perf_phantom_warning">Android è impostato per terminare questa sessione</string> + <string name="driver_installed">Installati</string> + <string name="driver_available">Disponibili per il download</string> + <string name="driver_nothing_new">Niente di nuovo dall\'ultimo controllo.</string> + <string name="driver_restore_builtin">Ripristina driver integrati</string> + <string name="driver_delete_builtin">Integrato nell\'app: questa azione rimuove i suoi file estratti e lo nasconde. Ripristina driver integrati lo fa ricomparire.</string> + <string name="driver_delete_bundle">Metà di un pacchetto Android + Linux: vengono rimosse entrambe le metà. Un driver in uso torna a quello predefinito.</string> + <string name="driver_delete_plain">I suoi file vengono rimossi dall\'app.</string> + <string name="driver_delete_in_use">I suoi file vengono rimossi. È in uso, quindi subentra quello predefinito.</string> + <string name="drawer_page_display">Schermo</string> + <string name="drawer_page_effects">Effetti</string> + <string name="drawer_page_controls">Controlli</string> + <string name="drawer_page_components">Componenti</string> + <string name="drawer_page_controller">Controller</string> + <string name="drawer_page_settings">Impostazioni</string> + <string name="drawer_page_desc">Pagina %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Desktop</string> + <string name="drawer_steam_menu">Menu di Steam</string> + <string name="drawer_quick_access">Accesso rapido</string> + <string name="drawer_open_qam">Apri il menu di accesso rapido</string> + <string name="drawer_prev_page">Pagina precedente</string> + <string name="drawer_next_page">Pagina successiva</string> + <string name="drawer_hud">HUD prestazioni</string> + <string name="drawer_scaling">Modalità di ridimensionamento</string> + <string name="drawer_scaling_sharpness">Nitidezza del ridimensionamento</string> + <string name="drawer_effects">Effetti schermo</string> + <string name="drawer_effects_hint">In tempo reale. Usa un po\' di tempo GPU mentre un effetto è attivo.</string> + <string name="drawer_look">Preset</string> + <string name="drawer_look_custom">Personalizzato</string> + <string name="drawer_effects_advanced">Avanzate</string> + <string name="widgets_expanded">Espanso</string> + <string name="widgets_collapsed">Compresso</string> + <string name="drawer_cas">Nitidezza (CAS)</string> + <string name="drawer_cas_level">Livello di nitidezza</string> + <string name="drawer_fake_hdr">HDR simulato</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Avvia SteamVR</string> + <string name="steamvr_checking">Controllo di SteamVR…</string> + <string name="drawer_deband">Riduzione del banding</string> + <string name="drawer_deband_strength">Intensità riduzione banding</string> + <string name="drawer_brightness">Luminosità</string> + <string name="drawer_contrast">Contrasto</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Saturazione</string> + <string name="drawer_fxaa">FXAA (smussatura dei bordi)</string> + <string name="drawer_toon">Contorni cartoon</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Filtro delle texture</string> + <string name="drawer_texture_hint">Giochi DirectX 9–11, dal prossimo avvio.</string> + <string name="drawer_anisotropy">Filtro anisotropico</string> + <string name="drawer_texture_sharpness">Nitidezza delle texture</string> + <string name="drawer_texture_sharpness_note">Un mip bias negativo: texture più nitide, un po\' di sfarfallio. Auto si adatta a quanto la sessione viene ingrandita sullo schermo.</string> + <string name="drawer_touch_auto">Auto (%1$s)</string> + <string name="drawer_keyboard">Tastiera</string> + <string name="drawer_latency">Latenza</string> + <string name="drawer_low_latency_controller">Controller a bassa latenza</string> + <string name="drawer_low_latency_controller_hint">Il controller invia dati a 1000 Hz invece di 250 Hz. Un po\' più di CPU.</string> + <string name="drawer_low_latency_touch">Touch a bassa latenza</string> + <string name="drawer_low_latency_touch_hint">I tocchi saltano il raggruppamento dei frame; i controlli touch di Steam passano a 1000 Hz. Un po\' più di CPU.</string> + <string name="drawer_pc_keyboard">Tastiera PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Secondo schermo</string> + <string name="drawer_second_screen_mode">Modalità</string> + <string name="drawer_second_screen_shows">Mostra</string> + <string name="drawer_android_apps">App Android</string> + <string name="drawer_launch_app">Avvia un\'app</string> + <string name="common_hide">Nascondi</string> + <string name="common_show">Mostra</string> + <string name="drawer_no_apps">Nessuna app avviabile</string> + <string name="drawer_session_behavior">Comportamento della sessione</string> + <string name="drawer_suspend_hint">Si applica subito e alle sessioni future in questa modalità.</string> + <string name="drawer_next_session">Prossima sessione</string> + <string name="drawer_support">Assistenza</string> + <string name="drawer_logs">Log della sessione</string> + <string name="drawer_logs_hint">Da allegare a una segnalazione di bug</string> + <string name="drawer_share_logs">Condividi log</string> + <string name="drawer_background">In background</string> + <string name="drawer_stop">Termina</string> + <string name="drawer_stop_title">Terminare la sessione?</string> + <string name="drawer_running_now">In esecuzione ora</string> + <string name="drawer_no_game">Nessun gioco in esecuzione su un Proton</string> + <string name="drawer_selected_profile">Profilo del gioco</string> + <string name="drawer_selected_profile_none">I dettagli del profilo non sono ancora disponibili.</string> + <string name="drawer_profile_refresh_failed_initial">Impossibile caricare i profili dei giochi. Nuovo tentativo automatico.</string> + <string name="drawer_profile_refresh_failed_stale">Impossibile aggiornare i profili dei giochi. Vengono mostrati gli ultimi dati disponibili; nuovo tentativo automatico.</string> + <string name="drawer_profile_inspect_hint">Visualizza e modifica le impostazioni salvate usate al prossimo avvio.</string> + <string name="drawer_profile_default">In uso il Profilo predefinito</string> + <string name="drawer_profile_custom">Profilo personalizzato</string> + <string name="drawer_component_inherited">In uso %1$s dal Profilo predefinito.</string> + <string name="drawer_game_components_note">Le modifiche vengono salvate nel profilo di %1$s e si applicano al prossimo avvio del gioco.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d personalizzazione del gioco</item> + <item quantity="many">%1$d personalizzazioni del gioco</item> + <item quantity="other">%1$d personalizzazioni del gioco</item> + </plurals> + <string name="drawer_no_proton">Nessun Proton ancora installato.</string> + <string name="drawer_game_running">gioco in esecuzione</string> + <string name="drawer_reapplied">riapplicato all\'avvio %1$s</string> + <string name="drawer_original">Originale</string> + <string name="drawer_components_note">Importa ed elimina nella pagina Componenti.</string> + <string name="setup_check_done">Fatto</string> + <string name="setup_check_warn">Richiede attenzione</string> + <string name="setup_check_busy">In corso</string> + <string name="setup_limit_adb_failed">Controlla l\'indirizzo IP e la porta di Debug wireless, oppure esegui di nuovo l\'accoppiamento se Android ha rimosso questo dispositivo.</string> + <string name="setup_install">Installa</string> + <string name="setup_manage">Gestisci</string> + <string name="setup_tab_overview">Panoramica</string> + <string name="setup_tab_controller">Controller</string> + <string name="setup_tab_session">Sessione</string> + <string name="setup_tab_launcher">Launcher</string> + <string name="setup_title">Configurazione</string> + <string name="setup_all_set">● Tutto pronto</string> + <string name="setup_n_ready">%1$d di %2$d pronti</string> + <string name="setup_system_check">Controllo del sistema</string> + <string name="setup_gpu_supported">Dispositivo supportato</string> + <string name="setup_gpu_untested">GPU non testata</string> + <string name="setup_gpu_unsupported">GPU non supportata</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam richiede un driver Adreno; %1$s potrebbe mostrare una schermata nera</string> + <string name="setup_runtime">Runtime Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Non installato · circa 3 GB, si installa la prima volta che premi Gioca</string> + <string name="setup_installed">Installato</string> + <string name="setup_runtime_update">%1$s · aggiornamento disponibile</string> + <string name="setup_runtime_current">%1$s · aggiornato</string> + <string name="setup_limit">Limite processi figlio</string> + <string name="setup_limit_on">Attivo · Android potrebbe chiudere Steam. Disattivarlo richiede un minuto.</string> + <string name="setup_limit_unset">Non impostato · Android potrebbe chiudere Steam. Disattivarlo richiede un minuto.</string> + <string name="setup_limit_unknown">Impossibile verificare · disattivarlo richiede un minuto.</string> + <string name="setup_fix_it">Risolvi</string> + <string name="setup_details">Dettagli</string> + <string name="setup_dev_options">Opzioni sviluppatore</string> + <string name="setup_use_wireless">Usa Debug wireless</string> + <string name="setup_check_again">Controlla di nuovo</string> + <string name="setup_limit_turn_on">Attiva il limite</string> + <string name="setup_account">Account Steam</string> + <string name="setup_signed_in_offline">Accesso eseguito come %1$s · modalità offline</string> + <string name="setup_signed_in">Accesso eseguito come %1$s</string> + <string name="setup_sign_in">Premi Gioca e accedi a Steam</string> + <string name="setup_tools">Strumenti</string> + <string name="setup_controller">Controller</string> + <string name="setup_controller_unavailable">Le impostazioni del controller non sono disponibili.</string> + <string name="setup_session">Sessione</string> + <string name="setup_logs">Log della sessione</string> + <string name="setup_logs_hint">Salvati dopo ogni sessione</string> + <string name="setup_agent_commands">Strumenti di debug</string> + <string name="setup_latest_logs">Log dell\'ultima sessione</string> + <string name="setup_saved_logs">Log delle sessioni salvati</string> + <string name="setup_saved_logs_hint">Conserva i %1$d più recenti</string> + <string name="setup_clear_logs">Cancella log</string> + <string name="setup_offline">Modalità offline</string> + <string name="setup_sign_in_first">Accedi prima a Steam</string> + <string name="setup_launcher">Launcher</string> + <string name="setup_language">Lingua</string> + <string name="setup_language_hint">La usa anche Steam, dal suo prossimo avvio.</string> + <string name="setup_language_system">Predefinita di sistema (%1$s)</string> + <string name="setup_language_system_short">Predefinita di sistema</string> + <string name="setup_app_scale">Scala dell\'app</string> + <string name="setup_app_scale_hint">Testo e controlli di DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (predefinita)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Aspetto del launcher</string> + <string name="setup_home">Usa come schermata Home</string> + <string name="setup_home_on">DroidDeck può essere l\'app Home</string> + <string name="setup_home_off">DroidDeck non viene mai proposta come app Home</string> + <string name="setup_orientation">Orientamento</string> + <string name="setup_orientation_auto">Orizzontale automatico</string> + <string name="setup_orientation_landscape">Orizzontale</string> + <string name="setup_orientation_reverse">Orizzontale invertito</string> + <string name="setup_fullscreen">Schermo intero</string> + <string name="setup_fullscreen_on">Nasconde la barra di stato e la barra di navigazione di Android</string> + <string name="setup_fullscreen_off">Mostra la barra di stato e la barra di navigazione di Android</string> + <string name="setup_default_home">App Home predefinita</string> + <string name="setup_choose_home">Scegli un\'app Home</string> + <string name="setup_choose">Scegli</string> + <string name="setup_linux_apps">App Linux (beta)</string> + <string name="setup_tool_files">File</string> + <string name="setup_tool_files_hint">Sfoglia e gestisci i file</string> + <string name="setup_tool_protons">Versioni di Proton</string> + <string name="setup_tool_protons_hint">Installa build ARM64 di Proton</string> + <string name="setup_tool_performance">Prestazioni</string> + <string name="setup_tool_performance_hint">Assegnazione dei core della CPU</string> + <string name="setup_tool_roms">Cartella ROM</string> + <string name="setup_tool_roms_hint">Dove sono salvati i giochi per emulatori</string> + <string name="setup_card_components">Componenti</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Controlli</string> + <string name="setup_card_controls_hint">Mappatura dei tasti</string> + <string name="store_tab_discover">Scopri</string> + <string name="store_tab_search">Cerca</string> + <string name="store_tab_installed">Installate</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Negozio</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak pronto</string> + <string name="store_needs_runtime">Installa prima il runtime Linux da Configurazione.</string> + <string name="store_setup_title">Configura Flatpak</string> + <string name="store_setup_text">Aggiunge Flatpak e lo collega a Flathub (circa 20 MB). La prima app scarica anche il suo runtime.</string> + <string name="store_setting_up">Configurazione…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Aggiornamenti</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Avvio…</string> + <string name="store_categories">Categorie</string> + <string name="store_unreachable">Impossibile raggiungere Flathub. Controlla la connessione e riprova.</string> + <string name="store_try_again">Riprova</string> + <string name="store_search_label">Cerca su Flathub</string> + <string name="store_search_placeholder">Firefox, giochi, emulatori…</string> + <string name="store_search">Cerca</string> + <string name="store_all">Tutte</string> + <string name="store_searching">Ricerca…</string> + <string name="store_search_hint">Cerca per nome o scegli una categoria. Vengono elencate solo app ARM64.</string> + <string name="store_no_results">Nessuna app ARM64 su Flathub corrisponde alla ricerca.</string> + <string name="store_results">Risultati</string> + <string name="store_check_updates">Controlla aggiornamenti</string> + <string name="store_update_all">Aggiorna tutte (%1$d)</string> + <string name="store_all_current">● Tutto è aggiornato</string> + <string name="store_no_apps">Ancora nessuna app. Trovane qualcuna in Scopri o Cerca.</string> + <string name="store_setup_first_note">Configura Flatpak per installare app.</string> + <string name="store_update_available_prefix">Aggiornamento disponibile · %1$s</string> + <string name="store_open">Apri</string> + <string name="store_details">Dettagli</string> + <string name="store_remove">Rimuovi</string> + <string name="store_press_again">Premi di nuovo per rimuovere</string> + <string name="store_installing">Installazione…</string> + <string name="store_install">Installa</string> + <string name="store_setup_first">Configura prima Flatpak</string> + <string name="store_download_size">%1$s da scaricare</string> + <string name="store_installed_chip">● Installata</string> + <string name="store_details_failed">Impossibile caricare la pagina Flathub di questa app.</string> + <string name="store_loading">Caricamento da Flathub…</string> + <string name="store_no_arm">Nessuna build ARM64 su Flathub, quindi non si può installare qui.</string> + <string name="store_screenshots">Screenshot</string> + <string name="store_about">Informazioni</string> + <string name="store_app_id">ID app</string> + <string name="store_license">Licenza</string> + <string name="store_runtime">Runtime</string> + <string name="store_installed_size">Dimensione installata</string> + <string name="store_installed_size_value">%1$s (più il suo runtime condiviso)</string> + <string name="store_website">Sito web</string> + <string name="store_verified">Verificata</string> + <string name="upd_title">Aggiornamenti</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Controllato %1$s</string> + <string name="upd_not_checked">Non ancora controllato</string> + <string name="upd_perm_title">Lascia che DroidDeck si aggiorni da sé</string> + <string name="upd_perm_text">Nella prossima schermata, attiva Consenti da questa fonte, poi torna qui. L\'aggiornamento continua da solo.</string> + <string name="upd_open_settings">Apri Impostazioni</string> + <string name="upd_not_now">Non ora</string> + <string name="upd_signed_status">Firma diversa</string> + <string name="upd_signed_headline">Impossibile aggiornare senza reinstallare</string> + <string name="upd_signed_detail">Questa copia non è firmata con la chiave di rilascio di DroidDeck, quindi gli aggiornamenti non possono installarsi sopra di essa. Disinstallala per passare all\'altra.</string> + <string name="upd_available">Aggiornamento disponibile</string> + <string name="upd_blocked_status">Impossibile installare</string> + <string name="upd_switch">Pronto per il passaggio</string> + <string name="upd_ahead_status">In anticipo su Stable</string> + <string name="upd_ahead_headline">Sei in anticipo su Stable</string> + <string name="upd_ahead_detail">Questa build è più recente dell\'ultima Stable. Passerai a Stable con la sua prossima versione.</string> + <string name="upd_gone_status">Test terminato</string> + <string name="upd_gone_headline">Questo test è terminato</string> + <string name="upd_gone_detail">La sua correzione è stata unita o scartata. Segui Preview per le correzioni più recenti.</string> + <string name="upd_current_status">Aggiornato</string> + <string name="upd_current_headline">Hai la versione più recente (%1$s)</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Aggiorna%1$s</string> + <string name="upd_install_button">Installa%1$s</string> + <string name="upd_install_anyway">Installa comunque Stable %1$s</string> + <string name="upd_follow_preview">Segui Preview</string> + <string name="upd_stop_session">Interrompi la sessione in corso per aggiornare.</string> + <string name="upd_less">Meno</string> + <string name="upd_more">Altro</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Nuova build Preview</string> + <string name="upd_new_test">Build di test della PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">CANALE DI AGGIORNAMENTO</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Versioni testate, per la maggior parte delle persone</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Le correzioni più recenti, prima di Stable</string> + <string name="upd_preview_current">Aggiornato</string> + <string name="upd_tests">Build di test</string> + <string name="upd_tests_hint">Prova una correzione prima che venga rilasciata</string> + <string name="upd_tests_none">Nessuna al momento</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Non compilata per questa copia di DroidDeck</string> + <string name="upd_updated">Aggiornato %1$s</string> + <string name="upd_test_name">il test della PR #%1$d</string> + <string name="upd_while_ago">qualche tempo fa</string> + <string name="upd_just_now">proprio ora</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d da provare</item> + <item quantity="many">%1$d da provare</item> + <item quantity="other">%1$d da provare</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Modifiche rispetto alla tua build · %1$d build indietro</item> + <item quantity="many">Modifiche rispetto alla tua build · %1$d build indietro</item> + <item quantity="other">Modifiche rispetto alla tua build · %1$d build indietro</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Modifiche recenti · %1$d build</item> + <item quantity="many">Modifiche recenti · %1$d build</item> + <item quantity="other">Modifiche recenti · %1$d build</item> + </plurals> + <string name="gate_title">Un\'impostazione di Android da cambiare</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android arresta le app che avviano molti processi in background, e Steam ne avvia decine. Finché questo non cambia, i giochi si chiudono senza un errore.</string> + <string name="gate_fix_for_me">Risolvilo per me</string> + <string name="gate_toggle_steps">Attiva “Disattiva limitazioni per i processi secondari”, poi torna qui. Lascia attive le Opzioni sviluppatore, altrimenti l\'interruttore si disattiva di nuovo.</string> + <string name="gate_open_dev">Apri Opzioni sviluppatore</string> + <string name="gate_no_toggle">Questa versione di Android non ha un interruttore per questo, quindi DroidDeck lo cambia tramite il Debug wireless. Richiede circa un minuto, senza bisogno di un computer.</string> + <string name="gate_needs_wifi">Il Debug wireless richiede il Wi-Fi. Va bene qualsiasi rete; non serve l\'accesso a internet.</string> + <string name="gate_needs_notifications">Il codice di accoppiamento arriva in una notifica. Consenti le notifiche per DroidDeck, oppure usa Altri modi.</string> + <string name="gate_allow_notifications">Consenti notifiche</string> + <string name="gate_step1">Apri Impostazioni → Opzioni sviluppatore → Debug wireless e attivalo</string> + <string name="gate_step2">Tocca “Accoppia dispositivo con codice di accoppiamento”</string> + <string name="gate_step3">Digita il codice nella notifica di DroidDeck</string> + <string name="gate_waiting">In attesa del popup di accoppiamento…</string> + <string name="gate_code_needed">Popup trovato. Inserisci il codice nella notifica.</string> + <string name="gate_status">Stato</string> + <string name="gate_polling">Controllo ogni 2 secondi. Questa pagina si chiude quando è disattivato.</string> + <string name="gate_other_ways">Altri modi</string> + <string name="gate_other_toggle">Debug wireless, indirizzo manuale, ADB da computer</string> + <string name="gate_other_no_toggle">Indirizzo manuale, ADB da computer, Opzioni sviluppatore</string> + <string name="gate_use_wireless_instead">Usa invece il Debug wireless</string> + <string name="gate_some_roms">Alcune ROM aggiungono comunque l\'interruttore. Cerca “processi figlio” nelle Opzioni sviluppatore.</string> + <string name="gate_manual_hint">Se la notifica non funziona, inserisci tu l\'indirizzo e il codice del popup.</string> + <string name="gate_enter_manually">Inserisci l\'indirizzo manualmente</string> + <string name="gate_from_computer">Da un computer con ADB:</string> + <string name="gate_copy_command">Copia comando</string> + <string name="gate_choose_display">Scegli su quale schermo aprire le Impostazioni di Android.</string> + <string name="gate_main_screen">Schermo principale</string> + <string name="wadb_finding_port">Accoppiato. Ricerca della porta del Debug wireless…</string> + <string name="wadb_enter_port">Accoppiato. Inserisci la porta dalle Impostazioni.</string> + <string name="wadb_applying">Dispositivo trovato. Applicazione dell\'impostazione…</string> + <string name="wadb_apply_failed">Impossibile applicare automaticamente. Controlla l\'indirizzo qui sotto e riprova. %1$s</string> + <string name="wadb_title_wireless">Debug wireless</string> + <string name="wadb_title_done">Limite dei processi figlio aggiornato</string> + <string name="wadb_title">Cambia il limite dei processi figlio</string> + <string name="wadb_lede_compact0">Se l\'opzione non è presente, accoppia tramite il Debug wireless.</string> + <string name="wadb_lede_compact1">Accoppiato. Controlla l\'indirizzo IP e la porta nel Debug wireless.</string> + <string name="wadb_lede_done">Il limite dei processi figlio è stato aggiornato.</string> + <string name="wadb_lede0">Usa il passaggio 2 se le Opzioni sviluppatore non hanno un\'impostazione per i processi figlio. Apri Opzioni sviluppatore → Debug wireless → Accoppia dispositivo con codice di accoppiamento.</string> + <string name="wadb_lede1">Accoppiato. Usa l\'indirizzo qui sotto, oppure aggiornalo da Debug wireless → Indirizzo IP e porta.</string> + <string name="wadb_lede_done_long">Il limite dei processi figlio è stato aggiornato tramite il Debug wireless.</string> + <string name="wadb_confirmed_on">Android ha confermato che il limite è attivo.</string> + <string name="wadb_confirmed_off">Android ha confermato che il limite è disattivato.</string> + <string name="wadb_pair_group">2 · Accoppia il Debug wireless</string> + <string name="wadb_pair_address">Indirizzo IP e porta del popup di accoppiamento</string> + <string name="wadb_pin">Codice di accoppiamento (PIN)</string> + <string name="wadb_pin_placeholder">6 cifre</string> + <string name="wadb_pair">Accoppia</string> + <string name="wadb_apply_group">2 · Applica tramite il Debug wireless</string> + <string name="wadb_connect_address">Indirizzo IP e porta di connessione</string> + <string name="wadb_pair_again">Accoppia di nuovo</string> + <string name="wadb_turn_off">Disattiva il limite</string> + <string name="wadb_other_ways">Altri modi per cambiarlo</string> + <string name="wadb_dev_try_first">1 · Opzioni sviluppatore (da provare prima)</string> + <string name="wadb_restrict_on">Disattiva “Disattiva limitazioni per i processi secondari”.</string> + <string name="wadb_restrict_off">Attiva “Disattiva limitazioni per i processi secondari”.</string> + <string name="wadb_computer_last">3 · ADB da computer (ultima risorsa)</string> + <string name="wadb_only_if">Solo se il Debug wireless non è disponibile.</string> + <string name="wadb_computer_group">3 · ADB da computer (ultima risorsa)</string> + <string name="ctrl_osc_hint">Quando i controlli touch appaiono in una sessione</string> + <string name="ctrl_color">Colore</string> + <string name="ctrl_color_hint">Tonalità dei tasti sullo schermo</string> + <string name="ctrl_custom">Personalizzato</string> + <string name="ctrl_opacity">Opacità</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Dimensione dei tasti</string> + <string name="ctrl_size_hint" formatted="false">100% è la dimensione standard</string> + <string name="ctrl_stick_click">Clic levetta</string> + <string name="ctrl_stick_click_hint">Tocca due volte e tieni premuta una levetta per L3 o R3</string> + <string name="ctrl_adaptive">Levette adattive</string> + <string name="ctrl_rumble">Vibrazione di gioco</string> + <string name="ctrl_steam_button">Tasto Steam</string> + <string name="ctrl_qam_button">Tasto QAM</string> + <string name="ctrl_keyboard_button">Tasto tastiera</string> + <string name="ctrl_select_steam">Premi Select per aprire il menu Steam</string> + <string name="ctrl_select_steam_hint">Invece di View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con come controller VR</string> + <string name="ctrl_joycon_vr_hint">Mentre SteamVR è in esecuzione, ogni Joy-Con diventa una mano. Puntalo in avanti e tieni premuto Home o Capture per ricentrarlo.</string> + <string name="setup_animations">Animazioni</string> + <string name="ctrl_adaptive_hint">Le levette appaiono dove tocchi e si nascondono al rilascio</string> + <string name="ctrl_layout">Layout</string> + <string name="ctrl_layout_custom">Posizioni personalizzate salvate</string> + <string name="ctrl_layout_default">Adattato a questo schermo</string> + <string name="ctrl_edit">Modifica</string> + <string name="ctrl_reset">Ripristina</string> + <string name="ctrl_mapping">Mappatura dei tasti</string> + <string name="ctrl_mapping_default">Ogni tasto invia il proprio input</string> + <string name="ctrl_mapping_count">%1$d di %2$d tasti rimappati</string> + <string name="ctrl_configure">Configura</string> + <string name="ctrl_reset_all">Ripristina controller</string> + <string name="ctrl_reset_all_hint">Ripristina tutte le impostazioni del controller e il layout</string> + <string name="ctrl_mapping_lede">Cosa invia al gioco ciascun tasto sullo schermo. Nascosto rimuove il tasto.</string> + <string name="ctrl_onscreen_buttons">Tasti sullo schermo</string> + <string name="ctrl_defaults">Predefiniti</string> + <string name="ctrl_reset_mapping">Ripristina mappatura</string> + <string name="content_android_apps">App Android</string> + <string name="content_apps_count">%1$d app</string> + <string name="content_no_android_apps">Nessuna app Android avviabile trovata.</string> + <string name="content_desktop_installed">● Desktop installato</string> + <string name="content_desktop_first_open">Si installa alla prima apertura</string> + <string name="content_available">Disponibile per l\'installazione</string> + <string name="content_not_installed">Non installato.</string> + <string name="content_not_installed_suffix">%1$s · non installato</string> + <string name="content_open_named">Apri %1$s</string> + <string name="content_games">Giochi</string> + <string name="content_choose_roms">Scegli una cartella ROM.</string> + <string name="content_retroarch_roms">Sfoglia fino a /root/ROMs in RetroArch.</string> + <string name="content_add_roms">Aggiungi i giochi %1$s a ROMs/%2$s.</string> + <string name="content_install_named">Installa %1$s</string> + <string name="content_stop_to_install">Interrompi la sessione per installare</string> + <string name="content_runtime_required">Runtime richiesto</string> + <string name="content_loading_details">Caricamento dei dettagli di installazione…</string> + <string name="content_details_unavailable">I dettagli di installazione non sono disponibili. Riprova più tardi.</string> + <string name="content_needs_runtime">Installa prima il runtime Linux da Configurazione.</string> + <string name="content_stop_first">Interrompi la sessione in corso per installare le app desktop.</string> + <string name="content_install_into">Installa %1$s nel desktop Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Nasconderlo lo rimuove da Desktop. I suoi file restano nel runtime Linux.</string> + <string name="content_rom_gone">Quel gioco non è più nella cartella ROM.</string> + <string name="content_desktop_system">Desktop · %1$s</string> + <string name="content_launch_in">Avvia in %1$s</string> + <string name="content_also_in">Anche in %1$s</string> + <string name="content_page_gone">Quella pagina non esiste più. Scegli una sezione a sinistra.</string> + <string name="content_open_desktop">Apri desktop</string> + <string name="content_install_open_desktop">Installa e apri desktop</string> + <string name="desktop_remove_title">Disinstalla desktop</string> + <string name="desktop_remove_text">Rimuove il desktop e le sue app incluse. Mantiene giochi, app aggiunte, impostazioni e librerie condivise.</string> + <string name="desktop_removing">Rimozione del desktop</string> + <string name="desktop_removed">Desktop rimosso</string> + <string name="desktop_cleaning_legacy">Rimozione dei vecchi file LXQt</string> + <string name="desktop_removal_unknown">Aggiorna DroidDeck prima di rimuovere questa versione del desktop.</string> + <string name="content_linux_desktop">Desktop Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox e i tuoi emulatori</string> + <string name="games_empty">I giochi che installi in Steam compaiono qui dopo la sessione.</string> + <string name="games_play_steam">Gioca su Steam</string> + <string name="games_play_steamvr">Gioca su SteamVR</string> + <string name="games_launch_settings">Impostazioni di avvio</string> + <string name="games_launch">Avvia</string> + <string name="games_files">File di gioco</string> + <string name="games_prefix">Prefisso Proton</string> + <string name="games_saves_looking">Ricerca dei salvataggi…</string> + <string name="games_saves_none">Nessuna cartella di salvataggio trovata per nome. L\'esportazione prende l\'intera cartella utente.</string> + <string name="games_saves_folders">%1$d cartelle di salvataggio</string> + <string name="games_saves_summary">%1$s · %2$d file · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Gestisci salvataggi</string> + <string name="games_saves">Salvataggi di gioco</string> + <string name="games_import_saves">Importa salvataggi…</string> + <string name="games_export_gamehub">Esporta come zip GameHub…</string> + <string name="games_export_winlator">Esporta come zip Winlator…</string> + <string name="games_open_save_folder">Apri cartella di salvataggio</string> + <string name="games_never_played">Mai giocato</string> + <string name="games_runtime_busy_percent">Runtime occupato · %1$d%%</string> + <string name="games_runtime_busy">Runtime occupato</string> + <string name="games_runtime_first_play">Il runtime si installa al primo Gioca</string> + <string name="games_runtime_update">Aggiornamento del runtime disponibile</string> + <string name="games_runtime_ready">● Runtime pronto</string> + <string name="games_last_played">Giocato l\'ultima volta %1$s</string> + <string name="games_internal">Memoria interna</string> + <string name="games_added">Gioco aggiunto</string> + <string name="games_custom">Gioco personalizzato</string> + <string name="games_store_storage">Archiviazione dei giochi</string> + <string name="gpu_auto_hint">La coppia migliore per questa GPU, mantenuta aggiornata</string> + <string name="gpu_manual_hint">Scegli tu una coppia</string> + <string name="gpu_checking">Ricerca dei driver…</string> + <string name="gpu_none_listed">Ancora nessun driver elencato. Aggiorna per cercarli.</string> + <string name="gpu_hide_other">Nascondi i driver per altre GPU</string> + <string name="gpu_show_other">Mostra i driver per altre GPU</string> + <string name="gpu_advanced">Avanzate</string> + <string name="gpu_set_with_display">Impostato insieme al driver video: %1$s include entrambi.</string> + <string name="gpu_set_with_runtime">Impostato insieme al driver del runtime: %1$s include entrambi.</string> + <string name="gpu_runtime_hint">Usato dai giochi e dal desktop.</string> + <string name="gpu_runtime_default">Runtime predefinito</string> + <string name="gpu_auto_by_gpu">Auto - scelto in base alla GPU</string> + <string name="gpu_manage">Scarica, importa o elimina…</string> + <string name="gpu_in_use_caps">IN USO</string> + <string name="gpu_builtin">I driver integrati in DroidDeck</string> + <string name="gpu_matched_pair">Driver del runtime e video impostati insieme come coppia abbinata.</string> + <string name="gpu_recommended_for">Consigliato per questa GPU: %1$s.</string> + <string name="gpu_refresh_hint">Aggiorna per cercare driver per questa GPU.</string> + <string name="gpu_recommended_caps">CONSIGLIATO</string> + <string name="gpu_unavailable">Non disponibile</string> + <string name="load_runtime">Runtime Linux</string> + <string name="load_runtime_detail">Preparazione del runtime Linux</string> + <string name="load_session">Sessione</string> + <string name="load_session_detail">Avvio di schermo e audio</string> + <string name="load_steam">Client Steam</string> + <string name="load_steam_detail">Controllo di Steam e dei suoi strumenti di compatibilità</string> + <string name="load_opening_steam">Apertura di Steam</string> + <string name="load_opening_steam_detail">In attesa del primo frame di Steam</string> + <string name="load_desktop">Desktop</string> + <string name="load_desktop_detail">Preparazione del desktop</string> + <string name="load_opening">Apertura</string> + <string name="load_opening_detail">In attesa del primo frame</string> + <string name="load_starting_steam">Avvio di Steam</string> + <string name="load_ended">La sessione è terminata</string> + <string name="load_step">Passaggio %1$d di %2$d</string> + <string name="load_steam_paused">Steam è in pausa</string> + <string name="deck_tab_grips">Impugnature</string> + <string name="deck_tab_left">Pad sinistro</string> + <string name="deck_tab_right">Pad destro</string> + <string name="deck_tab_both">Entrambi</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Levetta</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Alterna tra levetta e trackpad</string> + <string name="deck_more_controls">Altri controlli Deck</string> + <string name="deck_panels">PANNELLI</string> + <string name="deck_close">Chiudi i controlli sul secondo schermo</string> + <string name="deck_open_steam_menu">Apri il menu Steam</string> + <string name="deck_left_upper">Sinistra · in alto</string> + <string name="deck_left_lower">Sinistra · in basso</string> + <string name="deck_right_upper">Destra · in alto</string> + <string name="deck_right_lower">Destra · in basso</string> + <string name="deck_click">Clic</string> + <string name="deck_right_trackpad">Trackpad destro</string> + <string name="deck_left_trackpad">Trackpad sinistro</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Mostra tastiera</string> + <string name="second_hide_keyboard">Nascondi tastiera</string> + <string name="second_terminal">Terminale Linux</string> + <string name="second_terminal_not_ready">La sessione Linux non è ancora pronta per un terminale.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Giochi</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Negozio</string> + <string name="rail_components">Componenti</string> + <string name="rail_apps">App</string> + <string name="rail_setup">Configurazione</string> + <string name="rail_updates">Aggiornamenti</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Riprendi %1$s</string> + <string name="roms_text">Appare come /root/ROMs in ogni sessione. La memoria interna si trova in /root/Storage.</string> + <string name="roms_none">Nessuna cartella scelta</string> + <string name="roms_applies">Si applica dalla prossima sessione. Le schede SD funzionano.</string> + <string name="roms_choose">Scegli cartella</string> + <string name="roms_change">Cambia cartella</string> + <string name="proton_lede">Installa una build ARM64 di Proton, poi sceglila per ogni gioco in Steam → Proprietà → Compatibilità.</string> + <string name="proton_stop_first">Interrompi la sessione in corso per installare o rimuovere uno strumento di compatibilità.</string> + <string name="proton_available">Build disponibili</string> + <string name="proton_installed">Installata: %1$s</string> + <string name="proton_queued">In attesa da una richiesta precedente</string> + <string name="proton_not_installed">Non installata</string> + <string name="proton_update_available">Aggiornamento disponibile → %1$s</string> + <string name="proton_remove_older">Rimuovi le vecchie versioni di %1$s</string> + <string name="proton_remove_older_body">Rimuove %1$s. I giochi impostati su queste versioni devono passare a un altro Proton.</string> + <string name="proton_remove_body">I giochi impostati su questa versione devono passare a un altro Proton.</string> + <string name="proton_install_now">Installa ora</string> + <string name="proton_cancel_queued">Togli dalla coda</string> + <string name="pckb_android">Tastiera Android</string> + <string name="pckb_hide">Nascondi ✕</string> + <string name="main_launch_named">Avvia %1$s</string> + <string name="main_choose_screen">Scegli uno schermo. Secondario: %1$s.</string> + <string name="main_secondary_gone">Lo schermo secondario non è più disponibile.</string> + <string name="main_primary">Schermo principale</string> + <string name="main_secondary">Schermo secondario</string> + <string name="widgets_prev_tab">Scheda precedente</string> + <string name="widgets_next_tab">Scheda successiva</string> + <string name="widgets_on">Attivo</string> + <string name="widgets_all_n">Tutti i %1$d</string> + <string name="widgets_none">Nessuno</string> + <string name="widgets_n_of_m">%1$d di %2$d</string> + <string name="widgets_off">Disattivato</string> + <string name="screen_bottom">Schermo inferiore</string> + <string name="game_env_applies">Si applica al prossimo avvio del gioco. Il profilo di un gioco ha la precedenza su quello condiviso.</string> + <string name="game_env_other">Un altro gioco tramite ID app…</string> + <string name="game_env_done">Fine</string> + <string name="game_env_default">Predefinito</string> + <string name="game_env_off">Disattivato</string> + <string name="game_env_change">Cambia…</string> + <string name="game_env_change_title">Cambia variabile</string> + <string name="game_env_restore_default">Ripristina predefinito</string> + <string name="game_env_eyebrow">Giochi Proton</string> + <string name="pip_title">Picture in picture</string> + <string name="pip_auto">Passa automaticamente in PiP</string> + <string name="unfolded_controls">Controlli sullo schermo aperto</string> + <string name="unfolded_controls_hint">Da aperto, il gioco sta sopra i trackpad e le impugnature posteriori di Steam Deck. Da chiuso, il gioco è a schermo intero.</string> + <string name="pip_suspended">Sospeso</string> + <string name="pip_not_ready">Il picture in picture è disponibile quando la sessione è pronta.</string> + <string name="pip_permission">Consenti il picture in picture per DroidDeck nelle impostazioni di Android.</string> + <string name="pip_unavailable">Android non è riuscito ad aprire il picture in picture.</string> + <string name="game_shortcut">Scorciatoia</string> + <string name="game_shortcut_add">Aggiungi alla schermata Home</string> + <string name="game_shortcut_choose">Scegli gioco</string> + <string name="game_shortcut_scanning">Ricerca dei giochi installati…</string> + <string name="game_link_copy">Copia link di avvio</string> + <string name="game_link_copied">Link di avvio copiato</string> + <string name="game_shortcut_unsupported">Questo launcher non può aggiungere scorciatoie. Usa Copia link di avvio.</string> + <string name="game_link_invalid">Link di avvio del gioco non valido.</string> + <string name="game_link_missing">Questo gioco non è più nella tua libreria DroidDeck.</string> + <string name="game_link_session_busy">Interrompi la sessione attuale prima di avviare un gioco Steam.</string> + <string name="game_link_failed">Impossibile inviare il gioco a Steam. Prova ad avviarlo di nuovo.</string> + <string name="setup_retry_removal">Riprova rimozione</string> + <string name="runtime_removing">Rimozione</string> + <string name="runtime_removal_incomplete">Rimozione incompleta</string> + <string name="game_file_export">Esporta file del gioco</string> + <string name="game_file_sync">Sincronizza tutti i file dei giochi nella cartella</string> + <string name="game_file_stop_sync">Interrompi sincronizzazione dei file dei giochi</string> + <string name="game_file_folder">Scegli una cartella per i file dei giochi del frontend</string> + <string name="game_file_exported">File dei giochi salvati in %1$s</string> + <string name="game_frontend_files">File del frontend</string> + + <string name="main_wait_runtime">Attendi la fine dell\'operazione sul runtime</string> + <string name="main_wait_proton_install">Attendi la fine dell\'installazione dello strumento di compatibilità</string> + <string name="main_wait_desktop_install">Attendi la fine dell\'installazione dell\'app desktop</string> + <string name="main_wait_install_game">Attendi la fine dell\'installazione prima di avviare un gioco</string> + <string name="main_saves_close_session">Chiudi prima la sessione Steam, così il gioco non potrà sovrascrivere i dati importati</string> + <string name="main_saves_importing">Importazione in %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">%1$d file importato (%2$s) in %3$s</item> + <item quantity="many">%1$d file importati (%2$s) in %3$s</item> + <item quantity="other">%1$d file importati (%2$s) in %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">%1$d file importato (%2$s) in %3$s. Backup dei vecchi salvataggi in Download/DroidDeck/Saves/backups</item> + <item quantity="many">%1$d file importati (%2$s) in %3$s. Backup dei vecchi salvataggi in Download/DroidDeck/Saves/backups</item> + <item quantity="other">%1$d file importati (%2$s) in %3$s. Backup dei vecchi salvataggi in Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Scegli uno zip di salvataggi per %1$s</string> + <string name="main_saves_exporting">Esportazione di %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">%1$d file esportato come %2$s: %3$s</item> + <item quantity="many">%1$d file esportati come %2$s: %3$s</item> + <item quantity="other">%1$d file esportati come %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Scegli dove salvare %1$s (%2$s)</string> + <string name="main_action_failed">Operazione non riuscita (%1$s): %2$s</string> + <string name="main_no_logs_yet">Ancora nessun log di sessione: avvia prima una sessione.</string> + <string name="main_no_logs_to_clear">Nessun log di sessione da cancellare.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">%1$d cartella di log di sessione cancellata.</item> + <item quantity="many">%1$d cartelle di log di sessione cancellate.</item> + <item quantity="other">%1$d cartelle di log di sessione cancellate.</item> + </plurals> + <string name="main_wadb_pair_failed">Accoppiamento per il debug wireless non riuscito</string> + <string name="main_wadb_command_failed">Comando di debug wireless non riuscito</string> + <string name="main_wadb_unavailable">Il debug wireless non è disponibile</string> + <string name="main_adb_copied">Comando ADB copiato</string> + <string name="main_pick_roms">Scegli la cartella delle ROM</string> + <string name="main_non_adreno_title">Non è una GPU Adreno</string> + <string name="main_non_adreno_text">Turnip supporta le GPU Adreno. Su %1$s, Steam potrebbe mostrare una schermata nera. Download: %2$.0f MB.</string> + <string name="main_install_anyway">Installa comunque</string> + <string name="main_remove_runtime_title">Rimuovi runtime Linux</string> + <string name="main_remove_runtime_text">Verranno eliminati il runtime, il client Steam al suo interno e tutti i giochi installati lì.</string> + <string name="main_applied">Applicato: %1$s</string> + <string name="android_app_open_failed_primary">Impossibile aprire %1$s sullo schermo principale</string> + <string name="android_app_open_failed_on">Impossibile aprire %1$s su %2$s</string> + <string name="android_app_open_failed_display">Impossibile aprire %1$s sullo schermo %2$d</string> + <string name="comp_busy_importing">Importazione</string> + <string name="comp_busy_swapping">Sostituzione</string> + <string name="comp_busy_restoring">Ripristino</string> + <string name="comp_busy_cancelling">Annullamento</string> + <string name="comp_busy_deleting">Eliminazione</string> + <string name="comp_cannot_read">impossibile leggere il file</string> + <string name="comp_imported">Importato %1$s</string> + <string name="comp_swap_cancelled">La sostituzione in attesa è stata annullata.</string> + <string name="comp_pick_wcp">Scegli un pacchetto di componenti (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Impossibile raggiungere le build Nightly</string> + <string name="comp_stored">Salvato %1$s</string> + <string name="comp_download_failed">Download non riuscito: %1$s</string> + <string name="drivers_pick_linux">Scegli un driver per il runtime Linux (zip -Linux o pacchetto Android + Linux)</string> + <string name="drivers_pick_android">Scegli un driver video (zip AdrenoTools o pacchetto Android + Linux)</string> + <string name="drivers_pick_any">Scegli uno zip di driver o un pacchetto Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Rimozione di %1$s…</string> + <string name="main_forgetting_named">Rimozione di %1$s dall\'elenco…</string> + <string name="main_pick_game_storage">Scegli la cartella di archiviazione dei giochi</string> + <string name="main_pick_decky_zip">Scegli uno ZIP di plugin Decky</string> + <string name="main_storage_not_usable">Non utilizzabile: %1$s</string> + <string name="main_running_program">Programma</string> + <string name="main_removing_runtime">Rimozione del runtime Linux</string> + <string name="main_settings_main_screen">Impossibile aprire Impostazioni sullo schermo inferiore; aperte sullo schermo principale.</string> + <string name="main_open_dev_options">Apri Opzioni sviluppatore in Impostazioni</string> + + <string name="upd_unknown_apps_failed">Impossibile aprire l\'impostazione Android “Installa app sconosciute”</string> + <string name="upd_couldnt_check">Impossibile controllare: %1$s</string> + <string name="upd_no_download">Questa build non ha un download per questa copia di DroidDeck</string> + <string name="upd_stop_first">Interrompi prima la sessione in corso, poi aggiorna</string> + <string name="upd_stage_downloading">Download</string> + <string name="upd_stage_installing">Installazione</string> + <string name="upd_stage_confirm">In attesa della tua conferma</string> + <string name="upd_failed">Aggiornamento non riuscito</string> + <string name="upd_not_offered">Android non ha proposto di installare l\'aggiornamento</string> + + <string name="decky_install_failed">Installazione di Decky non riuscita: %1$s</string> + <string name="decky_plugin_starting">Avvio dell\'importazione del plugin…</string> + <string name="decky_plugin_failed">Importazione del plugin non riuscita: %1$s</string> + <string name="decky_plugin_installed">Plugin installato. Riavvia Steam per caricarlo.</string> + + <string name="drivers_not_checked">Non ancora controllato - tocca aggiorna per cercare nuovi driver</string> + <string name="drivers_bundle_sets_display">Android + Linux: imposta anche il driver video</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: imposta anche il driver del runtime</string> + <string name="drivers_runtime_builtin">il Turnip integrato nel runtime</string> + <string name="drivers_system_vulkan">Vulkan di sistema: nessuna build inclusa per questa GPU</string> + <string name="drivers_bundled">%1$s (incluso)</string> + <string name="drivers_manual">Manuale</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Al momento ne è pubblicata solo una metà</string> + <string name="drivers_pair_size">%1$.0f MB per entrambi</string> + <string name="drivers_none_to_set">Nessun driver da impostare: %1$s</string> + <string name="drivers_checking_latest">Ricerca dei driver più recenti…</string> + <string name="drivers_up_to_date_check_failed">Aggiornato (impossibile controllare: %1$s)</string> + <string name="drivers_recommended_unpublished">Al momento i driver consigliati non sono pubblicati</string> + <string name="drivers_downloading_pair">Download di %1$s %2$s…</string> + <string name="drivers_updated_to">Aggiornato a %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Aggiornato a %1$s %2$s. Il driver video si applica dopo il riavvio di DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Gli aggiornamenti dei driver aspettano la fine della sessione.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s verrà scaricato quando disattivi i dati mobili e il risparmio energetico.</string> + <string name="drivers_skipping_bad">%1$s %2$s non ha avviato una sessione qui, quindi Auto resta sui driver che hanno funzionato.</string> + <string name="drivers_rolled_back">%1$s non ha avviato una sessione per due volte, quindi Auto è tornato ai driver che funzionavano.</string> + <string name="drivers_switched_to">Passato a %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Passato a %1$s %2$s. Il driver video si applica dopo il riavvio di DroidDeck.</string> + <string name="drivers_using">In uso: %1$s %2$s.</string> + <string name="drivers_using_restart">In uso: %1$s %2$s. Il driver video si applica dopo il riavvio di DroidDeck.</string> + <string name="drivers_using_quest">In uso il driver video Quest incluso e il valore predefinito del runtime.</string> + <string name="drivers_using_quest_restart">In uso il driver video Quest incluso e il valore predefinito del runtime. Il driver video si applica dopo il riavvio di DroidDeck.</string> + <string name="drivers_not_a_driver">Non è uno zip di driver: non è un driver AdrenoTools, un Turnip -Linux né un pacchetto Android + Linux</string> + <string name="drivers_import_failed">Importazione non riuscita: %1$s</string> + <string name="drivers_imported_unnamed">Driver importato</string> + <string name="drivers_using_bundle">%1$s in uso sia come driver del runtime sia come driver video.</string> + <string name="drivers_using_bundle_restart">%1$s in uso sia come driver del runtime sia come driver video. Il driver video si applica dopo il riavvio di DroidDeck.</string> + <string name="drivers_deleted_bundle">Eliminato %1$s (entrambi i driver)</string> + <string name="drivers_deleted">Eliminato %1$s</string> + <string name="drivers_release_status">Ultimi: %1$s · controllato %2$s</string> + <string name="drivers_release_status_failed">Ultimi: %1$s · %2$s non raggiungibile · controllato %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d min fa</item> + <item quantity="many">%1$d min fa</item> + <item quantity="other">%1$d min fa</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d h fa</item> + <item quantity="many">%1$d h fa</item> + <item quantity="other">%1$d h fa</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d giorno fa</item> + <item quantity="many">%1$d giorni fa</item> + <item quantity="other">%1$d giorni fa</item> + </plurals> + <string name="drivers_checking_sources">Controllo di Banners-Turnip, WinNative e DroidDeck…</string> + <string name="drivers_check_failed">controllo non riuscito</string> + <string name="drivers_installed_pick_either">Installato %1$s - sceglilo in uno dei due elenchi per impostare entrambi i driver</string> + <string name="drivers_installed_pick">Installato %1$s - sceglilo nel menu</string> + + <string name="session_wait_removal">Attendi la fine della rimozione del runtime</string> + <string name="session_title_game">Gioco</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">diretto</string> + <string name="session_swap_failed">Sostituzione non riuscita: %1$s</string> + <string name="session_profile_save_failed">Salvataggio del profilo non riuscito: %1$s</string> + <string name="session_desktop_paused">Il desktop è in pausa</string> + <string name="session_named_paused">%1$s è in pausa</string> + <string name="session_program_paused">Il programma è in pausa</string> + <string name="session_starting_desktop">Avvio del desktop</string> + <string name="session_starting_named">Avvio di %1$s</string> + <string name="session_starting_program">Avvio del programma</string> + <string name="session_no_logs">Nessun log per questa sessione.</string> + <string name="session_logs_archive_failed">Impossibile creare l\'archivio dei log della sessione.</string> + <string name="session_logs_share_failed">Impossibile condividere i log della sessione.</string> + <string name="session_starting_session">Avvio della sessione…</string> + <string name="session_runtime_downloading">download del runtime Linux</string> + <string name="session_runtime_downloading_mb">download del runtime Linux · %1$d di %2$d MB</string> + <string name="session_runtime_checking">verifica del runtime Linux</string> + <string name="session_runtime_unpacking">estrazione del runtime Linux</string> + <string name="session_desktop_downloading">download del desktop</string> + <string name="session_desktop_downloading_mb">download del desktop · %1$d di %2$d MB</string> + <string name="session_desktop_checking">verifica del desktop</string> + <string name="session_desktop_unpacking">estrazione del desktop</string> + <string name="session_proton_downloading">download di Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">download di Proton Experimental (ARM64) · %1$d di %2$d MB</string> + <string name="session_proton_checking">verifica di Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">estrazione di Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Impossibile raggiungere il catalogo dei runtime. Controlla la connessione e premi di nuovo Gioca.</string> + <string name="session_runtime_install_failed">Il runtime Linux non è stato installato. Controlla il runtime in Configurazione e premi di nuovo Gioca.</string> + <string name="session_desktop_install_failed">Il desktop non è stato installato (%1$s). Controlla la connessione e premi di nuovo Desktop.</string> + <string name="session_ended_named">%1$s si è interrotto in modo imprevisto. Condividi i log in una segnalazione di bug o riprova.</string> + <string name="session_ended_program">Il programma si è interrotto in modo imprevisto. Condividi i log in una segnalazione di bug o riprova.</string> + <string name="session_ended_desktop">Il desktop si è interrotto in modo imprevisto. Condividi i log in una segnalazione di bug o riprova.</string> + <string name="session_ended_detail">Stato di uscita %1$d · %2$s</string> + <string name="session_ended_no_log">nessun log</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Il log mostra %1$d errore “Function not implemented”: l\'accelerazione seccomp di proot fa fallire un helper su questo dispositivo. Prova %2$s → “%3$s” (o “%4$s”) e riavvia.</item> + <item quantity="many">Il log mostra %1$d errori “Function not implemented”: l\'accelerazione seccomp di proot fa fallire un helper su questo dispositivo. Prova %2$s → “%3$s” (o “%4$s”) e riavvia.</item> + <item quantity="other">Il log mostra %1$d errori “Function not implemented”: l\'accelerazione seccomp di proot fa fallire un helper su questo dispositivo. Prova %2$s → “%3$s” (o “%4$s”) e riavvia.</item> + </plurals> + + <string name="mode_decky_plugins">Plugin</string> + <string name="mode_decky_plugins_hint">Installa uno ZIP di plugin per la prossima sessione Steam.</string> + <string name="mode_decky_plugin_downloading">Download…</string> + <string name="mode_decky_plugin_install_zip">Installa da ZIP</string> + <string name="store_cat_games">Giochi</string> + <string name="store_cat_audio_video">Audio e video</string> + <string name="store_cat_graphics">Grafica</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Ufficio</string> + <string name="store_cat_developer">Sviluppo</string> + <string name="store_cat_education">Istruzione</string> + <string name="store_cat_science">Scienza</string> + <string name="store_cat_system">Sistema</string> + <string name="store_cat_utilities">Utilità</string> + <string name="store_section_popular">Popolari</string> + <string name="store_section_trending">Di tendenza</string> + <string name="store_section_new">Novità</string> + <string name="store_section_updated">Aggiornate</string> + <string name="store_section_loading">caricamento…</string> + <string name="store_flatpak_setup">Configurazione di Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Impossibile cercare aggiornamenti su Flathub</string> + <string name="content_rom_installed">installato</string> + <string name="content_rom_folder">cartella</string> + <string name="theme_graphite">Grafite</string> + <string name="theme_graphite_detail">Superfici color grafite, con il blu della sfera del logo per tutto ciò che è selezionato, attivo o premuto.</string> + <string name="theme_paper">Carta su nero</string> + <string name="theme_paper_detail">Il bianco è il colore principale, il blu dell\'icona fa da segnale per linee, anelli e punti.</string> + <string name="theme_icon_blue">Blu icona</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Canc</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">Fine</string> + <string name="pckb_key_pgup">PgSu</string> + <string name="pckb_key_pgdn">PgGiù</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Bloc Maiusc</string> + <string name="pckb_key_enter">Invio ⏎</string> + <string name="pckb_key_shift">⇧ Maiusc</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Spazio</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Installa prima il runtime</string> + <string name="game_sync_err_steam_library">La libreria di Steam non è disponibile</string> + <string name="game_sync_err_previous_sd">La libreria SD precedente non è disponibile</string> + <string name="game_sync_err_game_storage">L\'archivio dei giochi non è disponibile</string> + <string name="game_sync_err_added_games">La cartella dei giochi aggiunti non è disponibile</string> + <string name="game_sync_err_manifests">I manifest di Steam non sono disponibili</string> + <string name="content_system_many">Molti sistemi</string> + <string name="fm_drive_internal">Interna</string> + <string name="fm_drive_linux">Sistema Linux</string> + <string name="fm_drive_sd">Scheda SD</string> + <string name="fm_drive_storage">Memoria</string> + <string name="fm_select">Seleziona</string> + <string name="fm_properties">Proprietà</string> + <string name="fm_favorite_add">Aggiungi ai preferiti</string> + <string name="fm_favorite_remove">Rimuovi dai preferiti</string> + <string name="fm_rename">Rinomina</string> + <string name="fm_copy">Copia</string> + <string name="fm_cut">Taglia</string> + <string name="fm_actions">Azioni</string> + <string name="fm_favorites">Preferiti</string> + <string name="fm_pin_current">Fissa la cartella attuale</string> + <string name="fm_no_favorites">Ancora nessun preferito - fissa una cartella dal suo menu ⋮ per tornarci in un attimo.</string> + <string name="fm_unpin_favorite">Rimuovi dai preferiti</string> + <string name="fm_size_zero">0 byte</string> + <string name="fm_unit_bytes">byte</string> + <string name="fm_prop_location">Posizione</string> + <string name="fm_prop_type">Tipo</string> + <string name="fm_prop_size">Dimensioni</string> + <string name="fm_prop_modified">Modificato</string> + <string name="fm_type_folder">Cartella</string> + <string name="fm_type_file">File</string> + <string name="fm_type_ext_file">File %1$s</string> + <string name="fm_read_only">Sola lettura</string> + <string name="fm_read_only_hint">Impedisce ai giochi (e a Wine) di sovrascrivere o eliminare questo file.</string> + <string name="fm_read_only_failed">Impossibile cambiare Sola lettura</string> + <string name="fm_hidden">Nascosto</string> + <string name="fm_hidden_unsupported">Questa memoria non può salvare l\'attributo nascosto.</string> + <string name="fm_hidden_hint">Contrassegna il file come nascosto in Windows (attributo nascosto di Wine).</string> + <string name="fm_hidden_failed">Impossibile cambiare Nascosto su questa memoria</string> + <string name="fm_done">Fine</string> + <string name="fm_op_deleting">Eliminazione...</string> + <string name="fm_delete_failed">Eliminazione non riuscita</string> + <string name="fm_op_moving">Spostamento...</string> + <string name="fm_op_copying">Copia in corso...</string> + <string name="fm_op_moving_item">Spostamento - %1$s</string> + <string name="fm_op_copying_item">Copia - %1$s</string> + <string name="fm_op_moving_batch">Spostamento %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Copia %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d completati, %2$d non riusciti</string> + <string name="fm_paste_skipped">%1$d completati, %2$d saltati</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d elemento spostato</item> + <item quantity="many">%1$d elementi spostati</item> + <item quantity="other">%1$d elementi spostati</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d elemento copiato</item> + <item quantity="many">%1$d elementi copiati</item> + <item quantity="other">%1$d elementi copiati</item> + </plurals> + <string name="fm_already_exists">“%1$s” esiste già</string> + <string name="fm_op_renaming">Rinomina in corso...</string> + <string name="fm_rename_failed">Impossibile rinominare</string> + <string name="fm_op_creating_folder">Creazione della cartella...</string> + <string name="fm_create_folder_failed">Impossibile creare la cartella</string> + <string name="fm_new_folder">Nuova cartella</string> + <string name="fm_folder_name">Nome cartella</string> + <string name="fm_create">Crea</string> + <string name="fm_new_name">Nuovo nome</string> + <string name="fm_delete_title">Eliminare?</string> + <string name="fm_delete_text">Eliminare definitivamente “%1$s”?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Eliminare %1$d elemento?</item> + <item quantity="many">Eliminare %1$d elementi?</item> + <item quantity="other">Eliminare %1$d elementi?</item> + </plurals> + <string name="fm_cannot_undo">L\'operazione non può essere annullata.</string> + <plurals name="fm_and_more"> + <item quantity="one">…e %1$d altro</item> + <item quantity="many">…e altri %1$d</item> + <item quantity="other">…e altri %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">Eliminazione %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">Impossibile eliminare %1$d elemento</item> + <item quantity="many">Impossibile eliminare %1$d elementi</item> + <item quantity="other">Impossibile eliminare %1$d elementi</item> + </plurals> + <string name="fm_conflict_merge_hint">Unisci aggiunge e sostituisce i file nella cartella esistente.</string> + <string name="fm_conflict_overwrite_hint">Sovrascrivi sostituisce il file esistente.</string> + <string name="fm_conflict_apply_all">Applica a tutti i conflitti</string> + <string name="fm_conflict_merge">Unisci</string> + <string name="fm_conflict_overwrite">Sovrascrivi</string> + <string name="fm_conflict_keep_both">Mantieni entrambi</string> + <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_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> + <string name="fm_search">Cerca</string> + <string name="fm_sort">Ordina</string> + <string name="fm_sort_name">Nome</string> + <string name="fm_sort_date">Data di modifica</string> + <string name="fm_rows_comfortable">Righe ampie</string> + <string name="fm_rows_compact">Righe compatte</string> + <string name="fm_hide_hidden">Nascondi file nascosti</string> + <string name="fm_show_hidden">Mostra file nascosti</string> + <string name="fm_hide_favorites">Nascondi preferiti</string> + <string name="fm_show_favorites">Mostra preferiti</string> + <string name="fm_filter_folder">Filtra questa cartella</string> + <string name="fm_free_space">%1$s liberi</string> + <string name="fm_selected_count">%1$d selezionati</string> + <string name="fm_select_none">Nessuno</string> + <string name="fm_select_all">Tutti</string> + <string name="fm_paste">Incolla</string> + <plurals name="fm_items"> + <item quantity="one">%1$d elemento</item> + <item quantity="many">%1$d elementi</item> + <item quantity="other">%1$d elementi</item> + </plurals> + <string name="fm_paste_here">Incolla %1$s qui</string> + <string name="fm_paste_move_here">Incolla %1$s qui (sposta)</string> + <string name="fm_rail_title">File</string> + <string name="fm_rail_storage">UNITÀ</string> + <string name="fm_rail_quick">ACCESSO RAPIDO</string> + <string name="fm_rail_favorites">PREFERITI</string> + <string name="fm_rail_downloads">Download</string> + <string name="fm_rail_downloads_short">Download</string> + <string name="fm_rail_roms">ROM</string> + <string name="fm_rail_session_logs">Log di sessione</string> + <string name="fm_rail_pictures">Immagini</string> + <string name="fm_favorite_added">“%1$s” aggiunta ai preferiti</string> + <string name="fm_favorite_removed">“%1$s” rimossa dai preferiti</string> + <string name="fm_empty_directory">Cartella vuota</string> + <string name="fm_up_one_level">Livello superiore</string> + <string name="fm_choose_folder">Scegli una cartella</string> + <string name="fm_choose_file">Scegli un file</string> + <string name="ctrl_tint_steam_blue">Blu Steam</string> + <string name="ctrl_tint_sky">Cielo</string> + <string name="ctrl_tint_white">Bianco</string> + <string name="ctrl_tint_violet">Viola</string> + <string name="ctrl_tint_green">Verde</string> + <string name="ctrl_tint_amber">Ambra</string> + <string name="ctrl_tint_red">Rosso</string> + <string name="ctrl_tint_pink">Rosa</string> + <string name="ctrl_button_a">Pulsante A</string> + <string name="ctrl_button_b">Pulsante B</string> + <string name="ctrl_button_x">Pulsante X</string> + <string name="ctrl_button_y">Pulsante Y</string> + <string name="ctrl_button_lb">Dorsale sinistro</string> + <string name="ctrl_button_rb">Dorsale destro</string> + <string name="ctrl_button_lt">Grilletto sinistro</string> + <string name="ctrl_button_rt">Grilletto destro</string> + <string name="ctrl_button_view">Pulsante Visualizza</string> + <string name="ctrl_button_menu">Pulsante Menu</string> + <string name="ctrl_target_view">Visualizza</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">Croce su</string> + <string name="ctrl_target_down">Croce giù</string> + <string name="ctrl_target_left">Croce sinistra</string> + <string name="ctrl_target_right">Croce destra</string> + <string name="ctrl_target_hidden">Nascosto</string> + <string name="ctrl_editor_drag">Trascina per spostare</string> + <string name="ctrl_editor_snap">Aggancia</string> + <string name="ctrl_editor_save">Salva</string> + <string name="second_mode_none">Nessuno</string> + <string name="second_mode_keyboard_trackpad">Tastiera + trackpad</string> + <string name="second_mode_terminal">Terminale</string> + <string name="second_mode_deck_controls">Impugnature Deck + trackpad</string> + + <string name="rtinst_removing">Rimozione del runtime Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Rimozione del runtime Linux · %1$d elemento</item> + <item quantity="many">Rimozione del runtime Linux · %1$d elementi</item> + <item quantity="other">Rimozione del runtime Linux · %1$d elementi</item> + </plurals> + <string name="rtinst_removed">Runtime Linux rimosso</string> + <string name="rtinst_removal_failed">Impossibile completare la rimozione del runtime Linux. Riprova la rimozione in Configurazione.</string> + <string name="rtinst_removing_leftovers">Rimozione dei residui del runtime</string> + <string name="rtinst_downloading">Download</string> + <string name="rtinst_verifying">Verifica</string> + <string name="rtinst_extracting">Estrazione</string> + <string name="rtinst_channel_description">Visibile durante l\'installazione o la rimozione del runtime Linux</string> + <string name="rtinst_title_installing">Installazione del runtime Linux</string> + <string name="rtinst_title_removing">Rimozione del runtime Linux</string> + + <string name="deskpkg_runtime_missing">Il runtime Linux non è installato</string> + <string name="deskpkg_no_checksum">Il catalogo non ha un checksum per %1$s</string> + <string name="deskpkg_checksum_mismatch">Checksum non corrispondente - non è stato modificato nulla</string> + <string name="deskpkg_installing">Installazione di %1$s</string> + <string name="deskpkg_place_failed">Impossibile posizionare l\'AppImage</string> + <string name="deskpkg_extract_failed">Estrazione non riuscita</string> + <string name="deskpkg_install_failed">Installazione non riuscita</string> + + <string name="flatpakmgr_setup_failed">Configurazione di Flatpak non riuscita (uscita %1$d)</string> + <string name="flatpakmgr_setup_unfinished">La configurazione di Flatpak non è stata completata</string> + <string name="flatpakmgr_busy">È in corso un\'altra operazione del Negozio</string> + <string name="flatpakmgr_not_ready">Configura prima Flatpak</string> + <string name="flatpakmgr_starting">Avvio</string> + <string name="flatpakmgr_exit_status">Flatpak è terminato con stato %1$d</string> + <string name="flatpakmgr_installing">Installazione di %1$s</string> + <string name="flatpakmgr_updating">Aggiornamento di %1$s</string> + <string name="flatpakmgr_removing">Rimozione di %1$s</string> + <string name="flatpakmgr_installing_step">Installazione di %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Aggiornamento di %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Rimozione di %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">traduzioni</string> + <string name="flatpakmgr_ref_graphics_drivers">driver grafici</string> + <string name="flatpakmgr_ref_media_codecs">codec multimediali</string> + <string name="flatpakmgr_ref_runtime">runtime %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">runtime %1$s %2$s</string> + + <string name="appimg_too_small">Il file è troppo piccolo per essere un AppImage</string> + <string name="appimg_unreadable">Impossibile leggere il file: %1$s</string> + <string name="appimg_not_linux">Questo non è un AppImage (non è un programma Linux)</string> + <string name="appimg_wrong_arch">Questo AppImage non è compilato né per ARM64 (aarch64) né per PC x86</string> + <string name="appimg_not_appimage">Questo è un programma Linux, ma non un AppImage</string> + <string name="appimg_wrong_type">Si possono importare solo AppImage di tipo 2 (questo è di tipo %1$d)</string> + <string name="appimg_no_space_import">Spazio libero insufficiente: l\'importazione richiede circa %1$s</string> + <string name="appimg_no_space_update">Spazio libero insufficiente: l\'aggiornamento richiede circa %1$s</string> + <string name="appimg_import_failed">Importazione non riuscita</string> + <string name="appimg_gone">Quell\'AppImage non c\'è più</string> + <string name="appimg_update_failed">Aggiornamento non riuscito</string> + <string name="appimg_extracting">Estrazione di %1$s</string> + <string name="appimg_extract_failed">Impossibile estrarre l\'AppImage</string> + <string name="appimg_extract_failed_detail">Impossibile estrarre l\'AppImage: %1$s</string> + + <string name="deckymgr_stop_session_loader">Interrompi la sessione attiva prima di installare Decky Loader</string> + <string name="deckymgr_download_failed">Download di Decky Loader non riuscito</string> + <string name="deckymgr_size_mismatch">La dimensione di Decky Loader non corrisponde ai metadati della release</string> + <string name="deckymgr_checksum_download_failed">Impossibile scaricare il checksum della release</string> + <string name="deckymgr_checksum_missing">Checksum della release mancante</string> + <string name="deckymgr_checksum_invalid">Checksum della release non valido</string> + <string name="deckymgr_checksum_mismatch">Checksum di Decky Loader non corrispondente</string> + <string name="deckymgr_not_elf">Il file della release non è un eseguibile Linux a 64 bit compatibile</string> + <string name="deckymgr_session_started_loader">È stata avviata una sessione durante il download; interrompila prima di installare Decky Loader</string> + <string name="deckymgr_loader_not_executable">Impossibile rendere eseguibile PluginLoader</string> + <string name="deckymgr_cef_failed">Impossibile attivare il debug remoto CEF di Steam</string> + <string name="deckymgr_stage_failed">Impossibile preparare PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Impossibile conservare il PluginLoader esistente</string> + <string name="deckymgr_loader_activate_failed">Impossibile attivare il nuovo PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Interrompi la sessione attiva prima di installare un plugin</string> + <string name="deckymgr_loader_required">Installa Decky Loader prima di importare un plugin</string> + <string name="deckymgr_zip_unreadable">Impossibile leggere il file ZIP selezionato</string> + <string name="deckymgr_plugins_dir_failed">Impossibile creare la cartella dei plugin Decky</string> + <string name="deckymgr_extracting_zip">Estrazione dello ZIP del plugin</string> + <string name="deckymgr_zip_one_folder">Lo ZIP del plugin deve contenere una sola cartella di plugin al primo livello</string> + <string name="deckymgr_zip_missing_files">Nello ZIP del plugin mancano plugin.json, package.json o dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Nome del plugin mancante</string> + <string name="deckymgr_session_started_plugin">È stata avviata una sessione durante l\'installazione; interrompila prima di installare un plugin</string> + <string name="deckymgr_plugin_installed">Plugin installato · riavvia Steam per caricarlo</string> + <string name="deckymgr_plugin_install_failed">Installazione dello ZIP del plugin non riuscita</string> + <string name="deckymgr_zip_too_many">Lo ZIP del plugin contiene troppi elementi</string> + <string name="deckymgr_zip_invalid_path">Lo ZIP del plugin contiene un percorso non valido</string> + <string name="deckymgr_zip_duplicate_paths">Lo ZIP del plugin contiene percorsi duplicati</string> + <string name="deckymgr_zip_unsafe_path">Lo ZIP del plugin contiene un percorso non sicuro</string> + <string name="deckymgr_folder_failed">Impossibile creare la cartella del plugin</string> + <string name="deckymgr_zip_too_large">Una volta estratto, lo ZIP del plugin supera il limite di 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Impossibile rendere eseguibile il binario incluso nel plugin</string> + <string name="deckymgr_remote_entry_invalid">Voce remote_binary non valida</string> + <string name="deckymgr_remote_name_invalid">Nome del binario remoto non valido</string> + <string name="deckymgr_remote_url_https">L\'URL del binario remoto deve usare HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Il binario remoto %1$s ha un hash SHA-256 non valido</string> + <string name="deckymgr_bin_dir_failed">Impossibile creare la cartella bin del plugin</string> + <string name="deckymgr_downloading_binary">Download del binario del plugin · %1$s</string> + <string name="deckymgr_binary_download_failed">Impossibile scaricare il binario del plugin %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Checksum del binario del plugin non corrispondente · %1$s</string> + <string name="deckymgr_binary_not_executable">Impossibile rendere eseguibile il binario del plugin · %1$s</string> + <string name="deckymgr_binary_replace_failed">Impossibile sostituire il binario del plugin · %1$s</string> + <string name="deckymgr_binary_install_failed">Impossibile installare il binario del plugin · %1$s</string> + <string name="deckymgr_folder_taken">La cartella del plugin appartiene a un altro plugin</string> + <string name="deckymgr_preserve_failed">Impossibile conservare il plugin esistente</string> + <string name="deckymgr_activate_failed">Impossibile attivare il plugin importato</string> + <string name="deckymgr_settings_failed">Impossibile aggiornare le impostazioni dei plugin Decky</string> + <string name="deckymgr_restore_failed">Impossibile ripristinare il plugin esistente</string> + + <string name="adbfix_save_failed">Impossibile salvare l\'identità del debug wireless</string> + <string name="adbfix_command_failed">Comando ADB non riuscito (%1$d)</string> + <string name="adbfix_not_confirmed">Android non ha confermato la modifica del limite dei processi secondari: %1$s</string> + <string name="adbfix_no_pairing">Nessun accoppiamento del debug wireless salvato</string> + <string name="adbfix_enter_address">Inserisci l\'indirizzo IP e la porta attuali del debug wireless</string> + + <string name="adbpair_timed_out">Tempo scaduto in attesa del popup di accoppiamento. Riprova da DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Impossibile cercare il popup di accoppiamento (%1$d). Controlla che il Wi-Fi sia attivo.</string> + <string name="adbpair_discovery_failed">Impossibile cercare il popup di accoppiamento: %1$s</string> + <string name="adbpair_six_digits">Inserisci tutte e 6 le cifre del codice</string> + <string name="adbpair_pairing">Accoppiamento…</string> + <string name="adbpair_code_rejected">Il codice non ha funzionato. Riapri il popup di accoppiamento e inserisci il nuovo codice.</string> + <string name="adbpair_connecting">Accoppiato. Connessione…</string> + <string name="adbpair_port_not_found">Accoppiato, ma la porta del debug wireless non è stata trovata. Lascia attivo il debug wireless e riprova.</string> + <string name="adbpair_applying">Applicazione dell\'impostazione…</string> + <string name="adbpair_command_failed">Comando di debug wireless non riuscito</string> + <string name="adbpair_channel_name">Configurazione del debug wireless</string> + <string name="adbpair_channel_description">Chiede il codice di accoppiamento del debug wireless mentre Impostazioni è aperto</string> + <string name="adbpair_title_pair">Accoppia il debug wireless</string> + <string name="adbpair_waiting_text">Attiva Debug wireless, poi tocca “Accoppia dispositivo con codice di accoppiamento”.</string> + <string name="adbpair_waiting_long">Attiva Debug wireless, poi tocca “Accoppia dispositivo con codice di accoppiamento”. Resta in Impostazioni: il codice va inserito in questa notifica.</string> + <string name="adbpair_code_label">Codice di accoppiamento a 6 cifre</string> + <string name="adbpair_code_hint">Tocca Inserisci codice e digita le 6 cifre mostrate in Impostazioni.</string> + <string name="adbpair_title_code">Inserisci il codice di accoppiamento Wi-Fi</string> + <string name="adbpair_title_retry">Riprova con il codice</string> + <string name="adbpair_enter_code">Inserisci codice</string> + <string name="adbpair_title_working">Configurazione di Steam</string> + <string name="adbpair_title_done">Steam è pronto</string> + <string name="adbpair_done_text">Tocca per tornare a DroidDeck. Ora puoi disattivare il debug wireless.</string> + <string name="adbpair_title_failed">Configurazione del debug wireless interrotta</string> + + <string name="selfinst_download_failed">Download non riuscito</string> + <string name="selfinst_size_mismatch">La dimensione del download non corrispondeva all\'APK pubblicato ed è stato scartato - riprova</string> + <string name="selfinst_checksum_mismatch">Il download non corrispondeva al suo checksum ed è stato scartato - riprova</string> + <string name="selfinst_wrong_package">L\'aggiornamento è per il pacchetto Android %1$s, non %2$s</string> + <string name="selfinst_metadata_signer">I metadati dell\'aggiornamento non indicano la chiave di firma delle release di DroidDeck</string> + <string name="selfinst_unreadable">Android non è riuscito a leggere l\'APK scaricato</string> + <string name="selfinst_apk_wrong_package">L\'APK scaricato è per %1$s, non %2$s</string> + <string name="selfinst_version_mismatch">L\'APK scaricato indica versionCode %1$d, non il %2$d pubblicato</string> + <string name="selfinst_downgrade">Android non installa il versionCode %1$d sopra il %2$d installato</string> + <string name="selfinst_no_signing">L\'APK scaricato non ha informazioni di firma</string> + <string name="selfinst_wrong_signer">L\'APK scaricato non è firmato con la chiave di release di DroidDeck</string> + <string name="appupd_http">Il catalogo degli aggiornamenti ha risposto HTTP %1$d</string> + + <string name="loadstate_starting">Avvio della sessione…</string> + <string name="loadstate_elapsed">%1$d:%2$02d trascorsi · ancora in corso</string> + <string name="loadstate_steam_update">Download dell\'aggiornamento del client Steam · %1$d%%</string> + <string name="loadstate_steam_client">Download del client Steam · %1$s</string> + + <string name="pextra_busy">È già in corso l\'installazione di uno strumento di compatibilità</string> + <string name="pextra_stop_session">Interrompi la sessione attiva prima di installare strumenti di compatibilità</string> + <string name="pextra_no_release">Impossibile trovare una release ARM64 per %1$s</string> + <string name="pextra_no_space">Per installare %1$s servono almeno 4 GB liberi più la dimensione del download</string> + <string name="pextra_downloading">Download di %1$s %2$s</string> + <string name="pextra_retrying">Nuovo tentativo di download · tentativo %1$d di %2$d</string> + <string name="pextra_interrupted">Download interrotto</string> + <string name="pextra_download_failed">Download non riuscito; il file parziale viene conservato per riprendere al prossimo tentativo</string> + <string name="pextra_too_big">Il download ha superato la dimensione della release ed è stato eliminato</string> + <string name="pextra_incomplete">Download incompleto; il file parziale viene conservato per riprendere al prossimo tentativo</string> + <string name="pextra_verifying">Verifica del download</string> + <string name="pextra_checksum_unreadable">Impossibile leggere il checksum della release; riprova</string> + <string name="pextra_no_checksum">%1$s %2$s non pubblica alcun checksum; non è stato installato nulla</string> + <string name="pextra_checksum_mismatch">Checksum non corrispondente; il download è stato eliminato</string> + <string name="pextra_session_started">È stata avviata una sessione durante il download; interrompila prima di installare strumenti di compatibilità</string> + <string name="pextra_installing">Installazione di %1$s</string> + <string name="pextra_install_failed">Installazione di %1$s non riuscita (uscita %2$d)</string> + <string name="pextra_could_not_install">Impossibile installare %1$s</string> + <string name="esync_fetching">Recupero del pacchetto droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">con helper Linux</string> + <string name="cmgr_fex_dlls_only">Solo DLL</string> + <string name="cmgr_original_proton_updated">Originale (Proton aggiornato dopo l\'ultima sostituzione)</string> + <string name="cmgr_changed_outside">Modificato fuori da Componenti</string> + <string name="cmgr_not_present">non presente</string> + <string name="cmgr_original_version">Originale %1$s</string> + <string name="cmgr_original_from">Originale da %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s entrerà in %3$s quando si chiuderà il gioco che lo sta usando.</string> + <string name="cmgr_swap_done">%1$s %2$s ora è in %3$s. Si applica al prossimo avvio di un gioco.</string> + <string name="cmgr_original_missing">Quel pacchetto originale non è salvato</string> + <string name="cmgr_restore_queued">%1$s di %2$s tornerà all\'originale quando si chiuderà il gioco che lo sta usando.</string> + <string name="cmgr_restore_done">%1$s di %2$s ripristinato dall\'originale di %3$s.</string> + <string name="cmgr_package_in_use">%1$s è in uso in %2$s. Prima passa quel Proton a un\'altra versione.</string> + <string name="cmgr_package_not_stored">%1$s non è salvato</string> + <string name="cmgr_deleted">%1$s eliminato.</string> + <string name="cmgr_original_kept">L\'originale della build installata viene conservato: serve per tornare indietro.</string> + <string name="cmgr_not_stored">Non salvato</string> + <string name="cmgr_deleted_original">Originale %1$s di %2$s eliminato.</string> + <string name="cmgr_nightlies_only">I download provengono solo dalle release Nightly</string> + <string name="cmgr_list_predates_checksums">Questo elenco di pacchetti è anteriore ai checksum - aggiornalo e riprova</string> + <string name="cmgr_checksum_mismatch">Checksum non corrispondente</string> + + <string name="sprefs_upscaler_linear">Lineare</string> + <string name="sprefs_upscaler_nearest">Più vicino</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (qualità)</string> + <string name="sprefs_upscaler_sharpen">Solo nitidezza</string> + <string name="sprefs_lod_bias_auto">Auto (segue il ridimensionamento)</string> + + <string name="look_off_desc">Nessun effetto applicato.</string> + <string name="look_game_clarity">Chiarezza di gioco</string> + <string name="look_game_clarity_desc">Nitidezza con un tocco di contrasto - quello per tutti i giorni.</string> + <string name="look_vivid">Vivace</string> + <string name="look_vivid_desc">Colori molto accentuati. Deband attivo, così i cieli non fanno strisce.</string> + <string name="look_cinematic">Cinematografico</string> + <string name="look_cinematic_desc">Contrasto più profondo, colori più freddi, bordi smussati.</string> + <string name="look_competitive">Competitivo</string> + <string name="look_competitive_desc">Ombre schiarite e nitidezza elevata - avvista gli avversari per primo.</string> + <string name="look_adaptive_sharpen">Nitidezza adattiva</string> + <string name="look_adaptive_sharpen_desc">Solo nitidezza, colori invariati.</string> + <string name="look_filmic">Filmico</string> + <string name="look_filmic_desc">Curva da pellicola, leggermente attenuata.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Forte e incisivo.</string> + <string name="look_retro_crt">CRT rétro</string> + <string name="look_retro_crt_desc">I passaggi tubo CRT e segnale analogico insieme.</string> + <string name="look_upscale_sharp">Upscaling nitido</string> + <string name="look_upscale_sharp_desc">Per giocare sotto la risoluzione del pannello.</string> + <string name="look_pixel_clean">Pixel puliti</string> + <string name="look_pixel_clean_desc">Pixel nitidi per il 2D e i titoli più vecchi.</string> + <string name="look_anime_edge">Contorni anime</string> + <string name="look_anime_edge_desc">Contorni da cartone animato più nitidezza.</string> + + <string name="gpuinfo_not_adreno">Non è una GPU Adreno</string> + <string name="gpuinfo_supported">Supportata</string> + <string name="gpuinfo_experimental">Sperimentale: i suoi driver sono build di test</string> + <string name="gpuinfo_below_tested">Inferiore all\'hardware testato (Adreno 725 e successive): potrebbe non funzionare</string> + <string name="gpuinfo_unsupported">Non supportata: DroidDeck richiede una GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Raggiunto il limite di richieste di GitHub - riprova più tardi</string> + <string name="turnip_github_http">GitHub ha risposto HTTP %1$d</string> + <string name="turnip_download_failed">Download non riuscito</string> + <string name="turnip_list_predates_checksums">Questo elenco di driver è anteriore ai checksum - aggiornalo e riprova</string> + <string name="turnip_checksum_mismatch">Checksum non corrispondente - il download è stato scartato</string> + <string name="turnip_not_adrenotools">Non è un driver AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">manca meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json non è leggibile (%1$s)</string> + <string name="turnip_reject_linux_driver">questo è un driver per il runtime Linux (importalo in “Driver del runtime Linux”)</string> + <string name="turnip_reject_wayland">questo è un driver per giochi Wayland, che a questa app non serve</string> + <string name="turnip_reject_no_library_name">meta.json non indica alcun libraryName, quindi non c\'era nulla da passare ad AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json indica %1$s, che non è nello zip</string> + <string name="turnip_reject_not_aarch64">%1$s non è una libreria condivisa ELF AArch64 a 64 bit</string> + <string name="turnip_reject_glibc">%1$s è collegato a glibc: è un Turnip “-Linux”, che va in “Driver del runtime Linux”</string> + <string name="lvd_no_library">Nessun libvulkan_freedreno*.so in questo zip. Uno zip Turnip Android (AdrenoTools) o -Wayland non è un driver per il runtime Linux.</string> + <string name="lvd_not_aarch64">%1$s non è una libreria condivisa ELF AArch64 a 64 bit.</string> + <string name="lvd_not_glibc">%1$s non è un driver glibc: è collegato alla libc di Android. Il runtime Linux richiede uno zip “-Linux”; un Turnip normale o “-Wayland” non può essere caricato in alcun modo dal client Steam.</string> + <string name="bundle_no_manifest">Non è un pacchetto di driver: manca un manifest.json che indichi un driver Android e uno Linux</string> + <string name="bundle_entry_outside">Non è un pacchetto di driver: %1$s punta al di fuori di esso</string> + <string name="bundle_too_large">Non è un pacchetto di driver: una volta estratto supera %1$d MB</string> + + <string name="gstore_sd_card">Scheda SD</string> + <string name="gstore_folder">Cartella</string> + + <string name="logshare_chooser">Condividi log di sessione</string> + + <string name="hdr_needs_android_10">richiede Android 10 o successivo (livelli di visualizzazione con spazio colore)</string> + <string name="hdr_none">questo schermo non segnala supporto HDR</string> + <string name="hdr_not_hdr10">questo schermo supporta %1$s, non HDR10</string> + + <string name="gpu_this_gpu">questa GPU</string> + <string name="phantom_title_on">Limite dei processi secondari attivo</string> + <string name="phantom_title_unset">Limite dei processi secondari non impostato</string> + <string name="phantom_title_unreadable">Impossibile verificare il limite dei processi secondari</string> + <string name="phantom_title_off">Limite dei processi secondari disattivato</string> + <string name="phantom_title_not_required">Limite dei processi secondari non necessario</string> + <string name="phantom_instructions_fix">%1$s Se non è possibile, collega questo dispositivo a un computer con ADB ed esegui il comando qui sotto. Poi torna qui e ricontrolla.</string> + <string name="phantom_instructions_off">Le sessioni Steam possono avviarsi.</string> + <string name="phantom_instructions_not_applicable">Questa versione di Android non usa questo limite.</string> + <string name="phantom_fix_toggle">Attiva “Disattiva limitazioni per i processi secondari” in Opzioni sviluppatore e poi lascia attive le Opzioni sviluppatore.</string> + <string name="phantom_fix_no_toggle">Questa versione di Android non ha un interruttore per farlo. Usa il debug wireless per cambiarlo da questo dispositivo.</string> + <string name="upd_block_no_apk">Questa build non ha un download per questa copia di DroidDeck.</string> + <string name="upd_block_version_code">Android non la installerà sopra questa build perché il suo versionCode %1$d è inferiore al %2$d installato.</string> + <string name="upd_fail_downgrade">Android non installa una versione precedente sopra una più recente. Resta su questa build finché il canale non si aggiorna.</string> + <string name="upd_fail_signature">Questa copia di DroidDeck ha una firma diversa (una build locale?), quindi Android non può aggiornarla direttamente.</string> + <string name="upd_fail_storage">Non c\'è abbastanza spazio libero per l\'aggiornamento.</string> + <string name="upd_fail_aborted">L\'aggiornamento è stato annullato.</string> + <string name="upd_fail_with_message">L\'aggiornamento non è stato installato: %1$s</string> + <string name="upd_fail_generic">L\'aggiornamento non è stato installato.</string> + <string name="saves_layout_zip">zip %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s non è ancora stato avviato</string> + <string name="saves_none_found">Nessun file di salvataggio trovato per %1$s</string> + <string name="saves_not_save_zip">%1$s non ha una cartella drive_c, quindi non è uno zip di salvataggi GameHub o Winlator</string> + <string name="gstore_cannot_create">impossibile creare cartelle in %1$s</string> + <string name="gstore_cannot_write">impossibile scrivere in %1$s</string> + <string name="gstore_cannot_write_detail">impossibile scrivere in %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Cartella non disponibile</string> + <string name="gfiles_name_taken">Un altro file usa già %1$s</string> + <string name="gfiles_art_unavailable">Cartella delle illustrazioni non disponibile</string> + <string name="gfiles_unrelated_inventory">La cartella ha un inventario di sincronizzazione non correlato</string> + <string name="gfiles_remove_failed">Impossibile rimuovere %1$s</string> + <string name="gfiles_outside_folder">Il file esce dalla cartella di esportazione</string> + <string name="cmgr_fex_unnamed">FEX (build senza nome di versione)</string> + <string name="cmgr_no_profile">nessun profile.json in %1$s</string> + <string name="cmgr_not_component_package">%1$s non è un pacchetto di componenti Linux (tipo %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s liberi</string> + <string name="mode_storage_auto_short">Automatico</string> + <string name="appupd_catalog_rejected">Il catalogo degli aggiornamenti non ha superato i controlli (%1$s)</string> + <string name="main_adb_clip_label">Impostazione processi secondari di DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Accesso eseguito · modalità offline</string> + <string name="setup_signed_in_unnamed">Accesso eseguito</string> + <string name="driver_tag_bundled">INCLUSO</string> + <string name="driver_tag_downloaded">SCARICATO</string> + <string name="driver_tag_imported">IMPORTATO</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Schermo della sessione</string> + <string name="display_resolution">Risoluzione</string> + <string name="display_game_fit">Adattamento giochi 16:9</string> + <string name="display_game_fit_hint">Come i giochi 16:9 si adattano a questo schermo. Dalla prossima sessione.</string> + <string name="display_game_fit_unavailable">Scegli Adatta allo schermo o una dimensione personalizzata più stretta di 16:9.</string> + <string name="display_preserve">Mantieni proporzioni</string> + <string name="display_stretch">Estendi allo schermo</string> + <string name="display_image_scaling">Ridimensionamento immagine</string> + <string name="display_filter">Filtro di ridimensionamento</string> + <string name="display_filter_hint">Condiviso da Steam e Desktop.</string> + <string name="display_filter_live">Si applica subito. Condiviso da Steam e Desktop.</string> + <string name="display_filter_note">FSR, GSR e NIS si applicano quando l\'immagine della sessione viene ingrandita. Solo nitidezza funziona anche senza ingrandimento.</string> + <string name="display_sharpness">Nitidezza del filtro</string> + <string name="display_frame_rate">Frequenza fotogrammi</string> + <string name="display_look_filter">%1$s Imposta il ridimensionamento su %2$s.</string> + <string name="display_match_screen">Adatta allo schermo (%1$d×%2$d)</string> + <string name="display_follow_screen">Segui lo schermo (si ridimensiona quando lo pieghi o lo apri)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Mostra dettagli dispositivo</string> + <string name="device_info_hide">Nascondi dettagli dispositivo</string> + <string name="device_info_loading">Lettura del dispositivo…</string> + <string name="device_info_copy">Copia</string> + <string name="device_info_copy_hint">Copia questi dettagli in una segnalazione di bug.</string> + <string name="device_info_copied">Copiato.</string> + <string name="force_ssbs_title">Forza SSBS</string> + <string name="force_ssbs_hint">Mantiene attiva un\'impostazione di velocità della CPU che Wine continua a disattivare. Può rendere più veloci i giochi Windows su Snapdragon 8 Elite; poche differenze sui chip più vecchi. Si applica al prossimo avvio del gioco.</string> + + <string name="rail_stores">Negozi</string> + <string name="source_steam">Steam</string> + <string name="source_added">Personalizzati</string> + <string name="setup_stores">Negozi</string> + <string name="setup_stores_open_on">Apri un negozio su</string> + <string name="setup_stores_speed">Livello di velocità di download</string> + <string name="setup_stores_engine">Motore dei negozi</string> + <string name="setup_stores_engine_chip_ready">● Motore pronto</string> + <string name="setup_stores_engine_chip_missing">Non compilato</string> + <string name="stores_tier_balanced">Bilanciato</string> + <string name="stores_tier_fast">Veloce</string> + <string name="stores_tier_max">Massimo</string> + <string name="stores_title">Negozi</string> + <string name="stores_settings">Impostazioni negozi</string> + <string name="stores_settings_eyebrow">Impostazioni</string> + <string name="stores_chip_signed_out">(accesso non eseguito)</string> + <string name="stores_tab_store">Negozio</string> + <string name="stores_tab_installed">Installati</string> + <string name="stores_tab_library">Libreria</string> + <string name="stores_tab_all">Tutti</string> + <string name="stores_tab_downloads">Download</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Accedi</string> + <string name="stores_signout_named">%1$s · esci</string> + <string name="stores_signout_title">Uscire da %1$s?</string> + <string name="stores_signout_note">I giochi installati restano. La libreria verrà recuperata di nuovo quando accederai.</string> + <string name="stores_signout_stay">Resta connesso</string> + <string name="stores_signout_go">Esci</string> + <string name="stores_search_catalog">Cerca nel catalogo di %1$s…</string> + <string name="stores_search_installed">Cerca tra i giochi installati…</string> + <string name="stores_search_library">Cerca nella tua libreria…</string> + <string name="stores_search_open">Cerca</string> + <string name="stores_installed_empty">Niente di installato</string> + <string name="stores_library_loading">Caricamento</string> + <string name="stores_nothing_matches">Nessun gioco</string> + <string name="stores_shelves_loading">Caricamento del negozio…</string> + <string name="stores_amazon_no_catalog">Nessun catalogo</string> + <string name="stores_shelf_new">Novità</string> + <string name="stores_shelf_deals">Offerte</string> + <string name="stores_shelf_free">Giochi gratuiti</string> + <string name="stores_shelf_trending">Di tendenza</string> + <string name="stores_shelf_library">La tua libreria</string> + <string name="stores_play">Gioca</string> + <string name="stores_install">Installa</string> + <string name="stores_resume_install">Riprendi installazione</string> + <string name="stores_dl_interrupted">Interrotto</string> + <string name="stores_install_size">Installa · %1$s</string> + <string name="stores_get_free">Ottieni gratis</string> + <string name="stores_view_on">Visualizza su %1$s</string> + <string name="stores_buy_price">Acquista · %1$s</string> + <string name="stores_installed_chip">Installato</string> + <string name="stores_in_library">In libreria</string> + <string name="stores_free">Gratis</string> + <string name="stores_resume">Riprendi</string> + <string name="stores_refresh">Aggiorna</string> + <string name="stores_sort">Ordina</string> + <string name="stores_sort_last_played">Giocate di recente</string> + <string name="stores_sort_recently_installed">Installate di recente</string> + <string name="stores_sort_title_asc">Titolo A–Z</string> + <string name="stores_sort_title_desc">Titolo Z–A</string> + <string name="stores_sort_size_desc">Dimensione: maggiore</string> + <string name="stores_sort_size_asc">Dimensione: minore</string> + <string name="stores_sort_release_date">Data di uscita</string> + <string name="stores_view_list">Visualizzazione elenco</string> + <string name="stores_view_cards">Visualizzazione schede</string> + <string name="stores_show_mature">Mostra contenuti per adulti</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Disattivato</string> + <string name="epic_eos">Accesso Epic (EOS)</string> + <string name="epic_offline">Avvia offline</string> + <string name="epic_resolve">Risolvi l\'accesso Epic</string> + <string name="epic_client_version">Versione %1$s</string> + <string name="epic_client_no_runtime">Installa prima il runtime Linux</string> + <string name="epic_client_checking">Controllo della versione più recente…</string> + <string name="epic_client_unpacking">Estrazione…</string> + <string name="epic_client_unreachable">Il server di download non ha risposto</string> + <string name="epic_client_needs_fex">Epic Games Launcher ha bisogno di FEX, che viene scaricato da Steam. Riapri il launcher dopo l\'avvio di Steam.</string> + <string name="epic_client_download_failed">Download non riuscito: %1$s</string> + <string name="epic_client_unpack_failed">Impossibile estrarre il launcher: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher non ha accettato l\'accesso. Avvialo di nuovo dal launcher.</string> + <string name="epic_client_uninstall_body">Rimuove il launcher e libera il suo spazio. I tuoi giochi Epic restano installati e funzionanti, e l’accesso viene conservato per quando lo reinstalli.</string> + <string name="epic_client_uninstall_stops">Prima viene chiusa la sessione in corso.</string> + <string name="epic_client_uninstalled">Epic Games Launcher disinstallato</string> + <string name="epic_client_uninstall_failed">Non è stato possibile rimuovere alcuni file del launcher. Riprova.</string> + <string name="epic_client_uninstalling">Attendi che Epic Games Launcher finisca di disinstallarsi</string> + <string name="store_cloud_saves">Salvataggi nel cloud</string> + <string name="cloud_upload">Carica nel cloud</string> + <string name="cloud_download">Scarica dal cloud</string> + <string name="cloud_none">Nessun salvataggio nel cloud</string> + <string name="cloud_conflict">Conflitto cloud</string> + <string name="cloud_conflict_files">Conflitto cloud · %1$d file</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Mantieni cloud</string> + <string name="cloud_keep_local">Mantieni locale</string> + <string name="cloud_checking">Controllo del cloud…</string> + <string name="cloud_last_sync">Ultima sincronizzazione %1$s</string> + <string name="cloud_never">Non ancora sincronizzato</string> + <string name="cloud_done">%1$d file</string> + <string name="stores_eyebrow_installed">installato</string> + <string name="stores_eyebrow_library">nella tua libreria</string> + <string name="stores_eyebrow_store">negozio</string> + <string name="achievements_title">Obiettivi</string> + <string name="achievements_count">%1$d di %2$d sbloccati</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Sbloccati · %1$d</string> + <string name="achievements_group_locked">Bloccati · %1$d</string> + <string name="achievements_group_hidden">Nascosti · %1$d</string> + <string name="achievements_hidden">Obiettivo nascosto</string> + <string name="achievements_hidden_detail">I dettagli vengono mostrati una volta sbloccato.</string> + <string name="achievements_all">Tutti gli obiettivi sbloccati</string> + <string name="achievements_reading">Caricamento…</string> + <string name="achievements_signed_out">Accedi a %1$s per vedere i tuoi obiettivi.</string> + <string name="achievements_unreachable">Impossibile raggiungere %1$s. Riprova quando sei online.</string> + <string name="achievements_none">%1$s non elenca obiettivi per questo gioco.</string> + <string name="achievements_show_all">Mostra tutti i %1$d</string> + <string name="achievements_dialog_title">Obiettivi · %1$s</string> + <string name="stores_in_steam">✓ In Steam</string> + <string name="stores_uninstall">Disinstalla</string> + <string name="stores_uninstalling">Disinstallazione…</string> + <string name="stores_uninstall_title">Disinstallare %1$s?</string> + <string name="stores_uninstall_body_size">Libera %1$s e lo rimuove da Steam.</string> + <string name="stores_uninstall_body">Rimuove i suoi file e il suo collegamento in Steam.</string> + <string name="stores_launch_not_registered">Steam rileverà il gioco al prossimo avvio; avvialo da lì, oppure avvia Steam ora.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Scelta di Steam per ogni gioco</string> + <string name="stores_card_audio">Audio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Componenti</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motore</string> + <string name="stores_card_engine_value">%1$s · nativo</string> + <string name="stores_card_engine_java">%1$s · integrato</string> + <string name="stores_how_it_runs">Come funziona</string> + <string name="stores_kv_fetched">Scaricato da</string> + <string name="stores_kv_fetched_value">%1$s, con il tuo account</string> + <string name="stores_kv_installed_to">Installato in</string> + <string name="stores_kv_installed_to_value">Archivio dei giochi (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Avviato da</string> + <string name="stores_kv_launched_by_value">Steam e Proton, come i giochi Steam</string> + <string name="stores_kv_launched_by_epic">Steam e Proton · accesso Epic a ogni avvio, overlay EOS disattivato</string> + <string name="stores_kv_launched_by_amazon">Steam e Proton · variabili di Amazon Games Services impostate</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">aggiunto a Steam all\'installazione (interfaccia Deck + Steam Input)</string> + <string name="stores_downloads_empty">Nessun download</string> + <string name="stores_dl_paused">In pausa</string> + <string name="stores_dl_queued">In coda</string> + <string name="stores_dl_queued_at">In coda · #%1$d</string> + <string name="stores_dl_cancelled">Annullato</string> + <string name="stores_dl_failed">Non riuscito</string> + <string name="stores_dl_failed_reason">Non riuscito · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pausa</string> + <string name="stores_dl_resume">Riprendi</string> + <string name="stores_dl_cancel">Annulla</string> + <string name="stores_dl_retry">Riprova</string> + <string name="stores_dl_clear">Cancella</string> + <string name="stores_dl_clear_all">Cancella completati</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Download</string> + <string name="stores_stage_verify">Verifica</string> + <string name="stores_stage_install">Installazione</string> + <string name="stores_stage_done">Completato</string> + <string name="stores_stage_checking">Controllo</string> + <string name="stores_stage_downloading">Download</string> + <string name="stores_dl_cancel_confirm">Eliminare il download?</string> + <string name="stores_dl_failed_kept">Non riuscito · %1$s conservati</string> + <string name="stores_stage_verifying">Verifica</string> + <string name="stores_stage_installing">Installazione</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d file</string> + <string name="stores_download_manager">Gestione download</string> + <string name="stores_parallel">Download simultanei</string> + <string name="stores_install_where">Installa in</string> + <string name="stores_install_title">Installa %1$s:</string> + <string name="stores_target_internal">Interna</string> + <string name="stores_target_free">%1$s liberi</string> + <string name="stores_notification_channel">Download dei negozi</string> + <string name="stores_notification_channel_hint">Mostra l\'avanzamento dei download dei giochi e li mantiene attivi in background</string> + <string name="stores_notification_one">Download in corso</string> + <string name="stores_notification_many">%1$d download</string> + <string name="stores_notification_waiting">Preparazione…</string> + <string name="stores_notification_done_channel">Download dei negozi completati</string> + <string name="stores_notification_installed">%1$s installato</string> + <string name="stores_notification_failed">Download di %1$s non riuscito</string> + <string name="stores_notification_delete">Elimina</string> + <string name="stores_notification_keep">Mantieni</string> + <string name="stores_login_title">Accedi a %1$s</string> + <string name="stores_login_provider_title">Accedi con il tuo provider</string> + <string name="stores_login_reload">Ricarica</string> + <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_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> + <string name="stores_login_error_ssl">La connessione alla pagina di accesso non è sicura.</string> + <string name="stores_login_error_verification">Impossibile verificare l\'accesso. Riprova.</string> + <string name="stores_login_error_generic">Accesso non riuscito. Riprova.</string> + <string name="common_close">Chiudi</string> + <string name="common_back">Indietro</string> + <string name="common_edit">Modifica</string> + <string name="games_add_all">Aggiungi tutti i giochi in questa cartella</string> + <string name="games_added_none">Niente di nuovo in questa cartella</string> + <string name="edit_name">Nome</string> + <string name="edit_target">Destinazione</string> + <string name="edit_start_in">Avvia in</string> + <string name="edit_launch_options">Opzioni di avvio</string> + <string name="edit_artwork">Illustrazioni</string> + <string name="edit_other_exe">Altro exe…</string> + <string name="edit_remove">Rimuovi</string> + <string name="art_cover">Copertina</string> + <string name="art_wide_cover">Copertina larga</string> + <string name="art_adjust_logo">Regola logo</string> + <string name="logo_pos_default">Predefinita</string> + <string name="logo_pos_upper_left">In alto a sinistra</string> + <string name="logo_pos_upper_center">In alto al centro</string> + <string name="logo_pos_center">Centro</string> + <string name="logo_pos_bottom_left">In basso a sinistra</string> + <string name="logo_pos_bottom_center">In basso al centro</string> + <string name="logo_pos_position">Posizione</string> + <string name="logo_pos_size">Dimensione</string> + <string name="logo_pos_save">Salva</string> + <string name="logo_pos_reset">Ripristina predefinita</string> + <string name="logo_pos_hint">Viene disegnato sullo sfondo del gioco, come fa Steam. La posizione esatta può variare di qualche pixel.</string> + <string name="logo_pos_no_logo">Questo gioco non ha ancora un logo. Scegline uno in Logo per vederlo qui.</string> + <string name="logo_pos_failed">Impossibile salvare la posizione del logo. Riprova.</string> + <string name="art_background">Sfondo</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Icona</string> + <string name="art_src_folder">Cartella del gioco</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Il tuo file</string> + <string name="art_src_exe">Dall\'exe</string> + <string name="art_src_auto">Automatico</string> + <string name="art_pick_image">Scegli immagine…</string> + <string name="art_pick_title">Scegli un\'immagine: %1$s</string> + <string name="art_reset">Ripristina automatico</string> + <string name="art_search_sgdb">Cerca su SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Cerca un gioco</string> + <string name="art_sgdb_other_games">Altri risultati</string> + <string name="art_sgdb_none">Nessun risultato.</string> + <string name="art_sgdb_no_key">SteamGridDB richiede una chiave API. Aggiungi la tua in Configurazione › Launcher.</string> + <string name="art_sgdb_bad_key">SteamGridDB non ha accettato la chiave API. Controllala in Configurazione › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB sta limitando le richieste in questo momento. Riprova tra un minuto.</string> + <string name="art_sgdb_offline">Impossibile raggiungere SteamGridDB. Controlla la connessione.</string> + <string name="art_sgdb_server">SteamGridDB ha avuto un problema. Riprova più tardi.</string> + <string name="art_sgdb_no_game">SteamGridDB non ha risultati per questo gioco. Prova a cercarlo.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d gioco aggiunto</item> + <item quantity="many">%1$d giochi aggiunti</item> + <item quantity="other">%1$d giochi aggiunti</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d già in Giochi</item> + <item quantity="many">%1$d già in Giochi</item> + <item quantity="other">%1$d già in Giochi</item> + </plurals> + <string name="hop_back">B · Torna a %1$s</string> + <string name="hop_from_games">il gioco</string> + <string name="hop_from_play">Impostazioni di gioco</string> + <string name="sheet_graphics_drivers">Driver grafici</string> + <string name="comp_this_proton">Questo Proton</string> + <string name="comp_every_proton">Ogni Proton</string> + <string name="comp_for_every_proton">Per ogni Proton</string> + <string name="comp_available_count">Disponibili · %1$d</string> + <string name="comp_checked">Controllato %1$s</string> + <string name="comp_check_all">Cerca nuovi componenti e driver</string> + <string name="comp_get">Ottieni</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton e FEX qui sotto sono di questo Proton</string> + <string name="comp_device_tested">%1$s · testato</string> + <string name="comp_device_untested">%1$s · non testato</string> + <string name="comp_device_unsupported">%1$s · non supportato</string> + <string name="gpu_auto_keeps">Mantiene aggiornata la coppia consigliata</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Driver del runtime e video separati</string> + <string name="gpu_use_title">Usare %1$s?</string> + <string name="gpu_mode_title">Come vengono scelti i driver</string> + <string name="gpu_mode_auto_detail">La coppia migliore per questa GPU, sempre aggiornata</string> + <string name="gpu_mode_pair">Coppia abbinata</string> + <string name="gpu_mode_pair_detail">Scegli una coppia; imposta entrambi i driver</string> + <string name="gpu_mode_mix">Abbina liberamente</string> + <string name="gpu_mode_mix_detail">Scegli video e runtime separatamente</string> + <string name="gpu_mode_pair_short">Coppia</string> + <string name="gpu_mode_mix_short">Misto</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">COPPIA</string> + <string name="gpu_src_bundle">PACCHETTO</string> + <string name="gpu_src_chosen">SCELTO</string> + <string name="gpu_src_by_gpu">PER GPU</string> + <string name="gpu_src_default">PREDEFINITO</string> + <string name="gpu_display_live">Disegna ora</string> + <string name="gpu_display_pending">Riavvio in attesa · fino ad allora disegna %1$s</string> + <string name="gpu_runtime_live">In esecuzione</string> + <string name="gpu_runtime_pending">Prossima sessione · questa mantiene %1$s</string> + <string name="gpu_display_next">Disegna lo schermo. Si applica dalla prossima sessione.</string> + <string name="gpu_previous_driver">il driver precedente</string> + <string name="gpu_restart_banner">Riavvia per cambiare il driver video.</string> + <string name="gpu_restart_blocked">Interrompi la sessione in corso, poi riavvia DroidDeck per cambiare il driver video.</string> + <string name="gpu_restart_now">Riavvia ora</string> + <string name="gpu_restart_later">Più tardi</string> + <string name="gpu_auto_title">Auto ha scelto questa coppia per la tua %1$s</string> + <string name="gpu_auto_builtin_title">Auto usa i driver integrati per la tua %1$s</string> + <string name="gpu_auto_reason">Scelta per la famiglia %1$s. Le nuove versioni si installano in background.</string> + <string name="gpu_pair_title">Scegli una coppia</string> + <string name="gpu_pair_hint">Una coppia imposta insieme il driver video e quello del runtime.</string> + <string name="gpu_mix_title">Scegli ogni driver</string> + <string name="gpu_mix_hint">Un pacchetto riempie entrambi gli slot. Le modifiche video si applicano dopo un riavvio, quelle del runtime dalla prossima sessione.</string> + <string name="gpu_change_display">Cambia driver video</string> + <string name="gpu_change_runtime">Cambia driver del runtime</string> + <string name="gpu_autos_pick">SCELTA DI AUTO</string> + <string name="gpu_installed">Installato</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · riavvia per applicare</string> + <string name="gpu_chip_restart">%1$s · riavvio in attesa</string> + <string name="comp_this_device">Questo dispositivo</string> + <string name="proton_remove_title">Rimuovere %1$s?</string> + <string name="setup_tab_diagnostics">Diagnostica</string> + <string name="setup_ready">Pronto per giocare</string> + <string name="setup_not_ready">Non ancora pronto per giocare</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">limite processi disattivato</string> + <string name="setup_ready_signed_in">accesso come %1$s</string> + <string name="setup_needs_you">Quando serve il tuo intervento</string> + <string name="setup_group_look">Aspetto</string> + <string name="setup_group_device">Questo dispositivo</string> + <string name="setup_group_art">Illustrazioni della libreria</string> + <string name="setup_group_download">Download</string> + <string name="setup_download_source">Origine</string> + <string name="setup_download_source_auto">Automatica</string> + <string name="setup_download_source_direct">Diretta</string> + <string name="setup_download_source_mirror">Mirror</string> + <string name="setup_download_source_custom">Prefisso personalizzato</string> + <string name="setup_download_mirror">Sito</string> + <string name="setup_download_prefix">Prefisso</string> + <string name="flathub_eyebrow">APP LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">App per il desktop Linux, da aprire in Desktop.</string> + <string name="flathub_setup">Configura Flathub</string> + <string name="flathub_remove_title">Rimuovere %1$s?</string> + <string name="flathub_remove_note">Le sue impostazioni e i suoi file vengono conservati.</string> + <string name="flathub_keep">Mantieni</string> + <string name="desktop_size">Spazio su disco</string> + <string name="desktop_uninstall_title">Disinstallare il desktop?</string> + <string name="desktop_all_systems">Tutti</string> + <string name="gog_achievements">Obiettivi GOG</string> + <string name="gog_achievements_hint">Sincronizza gli obiettivi per i giochi GOG supportati. Si applica al prossimo avvio.</string> + <string name="gog_achievements_off">Obiettivi disattivati</string> + <string name="gog_achievements_on">Obiettivi attivati</string> + <string name="gog_achievements_signin">Accedi di nuovo a GOG</string> + <string name="gog_achievements_uploaded">Obiettivi caricati</string> + <string name="gog_achievements_pending">Caricamento obiettivo in sospeso</string> + <string name="gog_achievements_enable_store">Attiva gli obiettivi GOG nelle impostazioni Store</string> + <string name="gog_achievements_unavailable">Obiettivi non disponibili; controlla i log della sessione</string> + <string name="achievement_unlocked">Obiettivo sbloccato</string> + <string name="touch_paste">Incolla</string> + <string name="touch_dpad">Croce direzionale</string> + <string name="touch_left_stick">Stick sinistro</string> + <string name="touch_right_stick">Stick destro</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Tastiera</string> + <string name="touch_dpad_up">Croce direzionale su</string> + <string name="touch_dpad_down">Croce direzionale giù</string> + <string name="touch_dpad_left">Croce direzionale sinistra</string> + <string name="touch_dpad_right">Croce direzionale destra</string> + <string name="touch_title">Controlli touch</string> + <string name="touch_controller">Controller touch</string> + <string name="touch_mouse">Mouse</string> + <string name="touch_on">Attivo</string> + <string name="touch_off">Disattivo</string> + <string name="touch_speed_slow">Lenta</string> + <string name="touch_speed_normal">Normale</string> + <string name="touch_speed_fast">Rapida</string> + <string name="touch_edit_layout">Modifica layout</string> + <string name="touch_droiddeck_menu">Menu di DroidDeck</string> + <string name="touch_drag_hint">Trascina i controlli sullo schermo</string> + <string name="touch_arrange">Disponi</string> + <string name="touch_discard">Annulla</string> + <string name="touch_saving">Salvataggio…</string> + <string name="touch_icon">Icona</string> + <string name="touch_narrower">L−</string> + <string name="touch_wider">L+</string> + <string name="touch_shorter">A−</string> + <string name="touch_taller">A+</string> + <string name="touch_hide">Nascondi</string> + <string name="touch_color_opacity">Colore e opacità…</string> + <string name="touch_copy_layout">Copia questo layout</string> + <string name="touch_layout_copied">Layout copiato; incollalo nel layout touch di qualsiasi gioco</string> + <string name="touch_paste_layout">Incolla layout copiato</string> + <string name="touch_reset_layout">Ripristina quello predefinito di Steam</string> + <string name="touch_no_binding">Questo controllo non ha un\'associazione in Steam per assegnargli un\'icona</string> + <string name="touch_icon_for">Icona per %1$s</string> + <string name="touch_layout_color">Colore del layout touch</string> + <string name="touch_done">Fine</string> + <string name="touch_save_failed">Impossibile salvare il layout touch</string> + <string name="touch_saved">Layout touch salvato su Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Etichetta (opzionale)</string> + <string name="touch_icons_missing">Le icone di Steam non sono state trovate</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d icona da Steam</item> + <item quantity="many">%1$d icone da Steam</item> + <item quantity="other">%1$d icone da Steam</item> + </plurals> + <string name="touch_icon_color">Colore dell\'icona</string> + <string name="touch_button_color">Colore del tasto</string> + <string name="touch_no_icon">Nessuna icona</string> + + <string name="stores_sync_sign_in">Verifica dell\'accesso…</string> + <string name="stores_sync_library">Recupero della libreria…</string> + <string name="stores_sync_game_list">Recupero dell\'elenco giochi…</string> + <string name="stores_sync_details">Caricamento dei dettagli dei giochi… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Sincronizzazione di %1$d gioco…</item> + <item quantity="many">Sincronizzazione di %1$d giochi…</item> + <item quantity="other">Sincronizzazione di %1$d giochi…</item> + </plurals> + <string name="stores_sync_progress">Sincronizzazione… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Recupero delle copertine…</string> + <string name="stores_sync_failed">Sincronizzazione non riuscita</string> + <string name="stores_sync_no_games">Nessun gioco trovato nella tua libreria %1$s</string> + <string name="stores_sync_amazon_no_answer">Amazon Games non ha risposto per la tua libreria: aggiorna, oppure accedi di nuovo</string> + <string name="stores_sync_gog_unreachable">Impossibile contattare GOG</string> + <string name="stores_sync_gog_unreadable">Impossibile leggere la tua libreria GOG</string> + <string name="stores_registering">Registrazione su Steam…</string> + <string name="mode_client_arch">Client Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnostica VAC</string> + <string name="setup_vac_diag_hint">I giochi Source registrano la console (-condebug); vac.txt nei log della sessione indica se è protetto o no</string> + <string name="load_starting_steam_x64">Avvio di Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Usato dal client Steam x86-64</string> + <string name="storage_uninstall_in_x64">Questa copia è nel client Steam x86-64. Scegli x86-64 in Client Steam, poi disinstallala qui.</string> + <string name="storage_uninstall_in_arm64">Questa copia è nel client Steam ARM64. Scegli ARM64 in Client Steam, poi disinstallala qui.</string> + <string name="drawer_page_glasses">Occhiali</string> + <string name="glasses_open">Occhiali VITURE</string> + <string name="glasses_control">Controllo degli occhiali</string> + <string name="glasses_driver_missing">Questa build non include il driver per questi occhiali.</string> + <string name="glasses_connection_failed">Impossibile connettersi agli occhiali. Ricollega il cavo o tocca Consenti per riprovare.</string> + <string name="glasses_allow">Consenti</string> + <string name="glasses_allow_hint">Consenti a DroidDeck di impostare frequenza di aggiornamento, modalità 3D, luminosità, volume e oscuramento degli occhiali, e di leggerne il tracciamento della testa.</string> + <string name="glasses_asking">In attesa che tu lo consenta nella richiesta di Android…</string> + <string name="glasses_denied">Controllo rifiutato. Consentilo per modificare le impostazioni degli occhiali.</string> + <string name="glasses_no_control">Questi occhiali mostrano il gioco, ma le loro impostazioni non si possono modificare da qui.</string> + <string name="glasses_output">Uscita</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Gioco sugli occhiali</string> + <string name="glasses_game_on_hint">Mostra il gioco solo sugli occhiali. Disattivato: lo mostra il telefono e Android ne duplica lo schermo.</string> + <string name="glasses_display">Schermo</string> + <string name="glasses_refresh">Frequenza di aggiornamento</string> + <string name="glasses_3d">3D (affiancato)</string> + <string name="glasses_3d_hint">Passa gli occhiali intelligenti alla modalità 3D side-by-side. Il tracciamento della testa è controllato separatamente.</string> + <string name="glasses_3d_failed">Il segnale 3D non è stato confermato. Riprova quando torna l\'immagine 2D.</string> + <string name="glasses_no_signal">Nessuna immagine: gli occhiali sono in una modalità che questo telefono non può inviare. Tieni premuto il loro pulsante 2D/3D, oppure scollegali e ricollegali.</string> + <string name="glasses_3d_refresh">Frequenza di aggiornamento 3D</string> + <string name="glasses_auto3d">3D per i giochi VR</string> + <string name="glasses_auto3d_hint">Passa al 3D mentre SteamVR è in esecuzione, poi torna indietro.</string> + <string name="glasses_picture">Immagine</string> + <string name="glasses_picture_hint">La ​​modalità automatica mostra contenuti piatti in entrambi gli occhi e rileva SteamVR. Scegli Gioco Side-by-Side per contenuti SBS.</string> + <string name="glasses_picture_auto">Automatico</string> + <string name="glasses_picture_screen">Schermo virtuale</string> + <string name="glasses_picture_sbs">Gioco affiancato</string> + <string name="glasses_screen_size">Larghezza schermo</string> + <string name="glasses_screen_distance">Distanza schermo</string> + <string name="glasses_screen_next_session">Larghezza e distanza si applicano quando un gioco è mostrato sugli occhiali come schermo virtuale.</string> + <string name="glasses_screen_no_output">Queste impostazioni si applicano quando Gioco sugli occhiali è attivo e il gioco è mostrato sugli occhiali.</string> + <string name="glasses_screen_flat_hint">Con Automatico questo gioco 2D resta a schermo intero. Usa uno schermo virtuale per regolarne larghezza, distanza e tracciamento della testa.</string> + <string name="glasses_screen_use">Usa schermo virtuale</string> + <string name="glasses_screen_direct_hint">SteamVR riempie la visuale. Regola il campo visivo in VR; larghezza e distanza si applicano solo allo schermo virtuale.</string> + <string name="glasses_screen_sbs_hint">I giochi affiancati riempiono ciascun occhio. Larghezza e distanza si applicano solo a uno schermo virtuale.</string> + <string name="glasses_tracking_flat_hint">Con Automatico questo gioco 2D resta fisso nella vista. Scegli Schermo virtuale nella sezione Schermo per usare il tracciamento della testa.</string> + <string name="glasses_tracking_sbs_hint">Il tracciamento della testa si applica a uno schermo virtuale o a un gioco SteamVR in esecuzione.</string> + <string name="glasses_hardware">Dispositivo</string> + <string name="glasses_brightness">Luminosità</string> + <string name="glasses_volume">Volume</string> + <string name="glasses_sunblock">Oscuramento</string> + <string name="glasses_sunblock_hint">Scurisce le lenti frontali.</string> + <string name="glasses_tracking">Tracciamento</string> + <string name="glasses_head_tracking">Tracciamento della testa</string> + <string name="glasses_head_tracking_hint">I sensori degli occhiali ruotano lo schermo virtuale e SteamVR insieme alla tua testa.</string> + <string name="glasses_recenter">Ricentra vista</string> + <string name="glasses_recenter_button">Ricentra lo schermo</string> + <string name="glasses_vr_fov">Campo visivo di SteamVR</string> + <string name="glasses_vr_fov_hint">Più basso avvicina SteamVR e riempie gli occhiali; più alto mostra di più intorno a te.</string> + <string name="glasses_playing">Gioco in corso su %1$s</string> + <string name="glasses_calibration">Calibrazione del tracciamento</string> + <string name="glasses_calibration_hint">Riduce la deriva e allinea il riferimento orizzontale.</string> + <string name="glasses_calibration_saved_hint">La calibrazione salvata è applicata a questi occhiali.</string> + <string name="glasses_calibration_open">Calibra</string> + <string name="glasses_calibration_instructions">Posa gli occhiali collegati capovolti su una superficie piana, con la montatura ben appoggiata. Tocca Avvia, poi lasciali fermi per circa 8 secondi. Qualsiasi movimento fa ripartire la misurazione. Corregge deriva e inclinazione, non la direzione.</string> + <string name="glasses_calibration_settling">Lascia gli occhiali capovolti e non toccarli. In attesa che si stabilizzino…</string> + <string name="glasses_calibration_collecting">Misurazione dei sensori in corso. Tieni fermi gli occhiali.</string> + <string name="glasses_calibration_moving">Movimento rilevato. Non toccare gli occhiali; la misurazione ripartirà automaticamente.</string> + <string name="glasses_calibration_turn_over">Appoggia gli occhiali capovolti su una superficie piana. La misurazione inizierà quando saranno posizionati correttamente.</string> + <string name="glasses_calibration_complete">Calibrazione salvata. Indossa gli occhiali e guarda dritto davanti a te, poi tocca Fine per ricentrare.</string> + <string name="glasses_calibration_failed">Impossibile completare la calibrazione. Controlla il collegamento e tieni fermi gli occhiali, poi riprova. La calibrazione precedente non è cambiata.</string> + <string name="glasses_calibration_start">Avvia</string> + <string name="glasses_calibration_done">Fine</string> + <string name="glasses_calibration_reset">Ripristina calibrazione del tracciamento</string> + <string name="glasses_calibration_reset_hint">Rimuovere la calibrazione salvata e ripristinare i valori predefiniti del modello? Ricentra dopo aver rimesso gli occhiali.</string> + <string name="glasses_calibration_reset_button">Ripristina</string> + <string name="hand_camera_group">Tracciamento delle mani</string> + <string name="hand_camera_prompt_title">Tracciare le mani o i controller Joy-Con con la fotocamera del telefono?</string> + <string name="hand_camera_prompt_body">Senza controller collegato, la fotocamera del telefono traccia le tue mani nude in VR: pizzica il pollice e l\'indice per cliccare, chiudi la mano per afferrare e ruota il palmo verso di te e pizzica per aprire il menu. Con i controller Joy-Con abbinati, la fotocamera ne traccia la posizione mentre i controller Joy-Con forniscono input di rotazione e pulsanti. Le immagini vengono elaborate su questo dispositivo e non vengono mai salvate o inviate.</string> + <string name="hand_camera_rear">Fotocamera posteriore</string> + <string name="hand_camera_rear_hint">Consigliata. Di solito più nitida e ampia.</string> + <string name="hand_camera_front">Fotocamera anteriore</string> + <string name="hand_camera_front_hint">Per quando il retro del dispositivo non può essere rivolto verso di te.</string> + <string name="hand_camera_allow">Usa la fotocamera</string> + <string name="hand_camera_not_now">Non ora</string> + <string name="hand_camera_setting">Tracciamento mani con fotocamera</string> + <string name="hand_camera_setting_hint">Utilizza la fotocamera del telefono per i gesti a mani nude o per posizionare i controller Joy-Con associati in VR. I controller Joy-Con forniscono la rotazione e gli input dei pulsanti. Mette in pausa mentre gli occhiali smart tracciano le tue mani o i controller Joy-Con. Le immagini vengono elaborate solo su questo dispositivo.</string> + <string name="hand_camera_choice">Fotocamera</string> + <string name="hand_camera_access">Accesso alla fotocamera</string> + <string name="hand_camera_access_hint">Consenti l\'accesso alla fotocamera per avviare il tracciamento delle mani.</string> + <string name="hand_camera_access_denied">L\'accesso alla fotocamera è disattivato. Attivalo nelle impostazioni di Android.</string> + <string name="hand_camera_allow_button">Consenti</string> + <string name="hand_camera_open_settings">Apri impostazioni</string> + <string name="hand_camera_placement">Posizione della fotocamera</string> + <string name="hand_camera_placement_hint">Controlla che la fotocamera possa vederti prima di giocare.</string> + <string name="hand_camera_check">Controlla</string> + <string name="hand_camera_check_title">Posizione della fotocamera</string> + <string name="hand_camera_how_rear">Metti il dispositivo in piedi a una distanza di 1,5-2 metri, all\'altezza del petto, con la fotocamera posteriore rivolta verso di te. Poi entra nell\'inquadratura con le mani tese.</string> + <string name="hand_camera_how_front">Metti il dispositivo in piedi a una distanza di 1,5-2 metri, all\'altezza del petto, con lo schermo rivolto verso di te. Poi entra nell\'inquadratura con le mani tese.</string> + <string name="hand_camera_starting">Avvio della fotocamera…</string> + <string name="hand_camera_stand_up">Il dispositivo è appoggiato in piano. Mettilo in piedi perché la fotocamera sia rivolta verso di te.</string> + <string name="hand_camera_upright">Metti il dispositivo più in verticale perché la fotocamera sia rivolta verso di te.</string> + <string name="hand_camera_not_seen">Non riesce ancora a vederti. Entra nell\'inquadratura in modo che si vedano testa e spalle.</string> + <string name="hand_camera_move_back">Fai un passo indietro.</string> + <string name="hand_camera_move_closer">Avvicinati un po\'.</string> + <string name="hand_camera_show_hands">Tieni entrambe le mani dove la fotocamera possa vederle.</string> + <string name="hand_camera_good">Va bene così.</string> + <string name="hand_camera_failed">Impossibile avviare la fotocamera. Chiudi le altre app che la usano e riprova.</string> + <string name="hand_camera_switch">Cambia fotocamera</string> + <string name="hand_camera_skip">Salta</string> + <string name="hand_camera_done">Fine</string> + <string name="glasses_xreal_network_missing">In attesa della connessione USB Ethernet degli occhiali. Questo telefono potrebbe non renderla disponibile alle app.</string> + <string name="glasses_xreal_connection_failed">La connessione XREAL si è interrotta o ha restituito una risposta non supportata. Nuovo tentativo…</string> + <string name="glasses_xreal_experimental">Supporto sperimentale per 1S. Usa la modalità Follow e disattiva la stabilizzazione nel menu degli occhiali. Direzioni del tracciamento e modalità di visualizzazione devono ancora essere testate sul dispositivo.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Modalità Cardboard</string> + <string name="cardboard_mode_hint">Immagini per l\'occhio sinistro e destro, per un visore VR per telefono.</string> + <string name="cardboard_source">Immagine</string> + <string name="cardboard_source_screen">Schermo virtuale</string> + <string name="cardboard_source_sbs">3D affiancato</string> + <string name="cardboard_viewer">Visore</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Senza lenti</string> + <string name="cardboard_ipd">Distanza tra gli occhi</string> + <string name="cardboard_screen_width">Larghezza schermo</string> + <string name="cardboard_screen_distance">Distanza schermo</string> + <string name="cardboard_head_tracking">Tracciamento della testa</string> + <string name="cardboard_no_sensor">Questo dispositivo non ha un sensore di rotazione.</string> + <string name="cardboard_recenter">Ricentra vista</string> + <string name="cardboard_recenter_button">Ricentra</string> + <string name="cardboard_steamvr">SteamVR (sperimentale)</string> + <string name="cardboard_steamvr_install">Installa</string> + <string name="cardboard_steamvr_installing">Download ed estrazione di SteamVR…</string> + <string name="cardboard_steamvr_start">Avvia</string> + <string name="cardboard_steamvr_stop">Arresta</string> + <string name="cardboard_steamvr_unavailable">Non disponibile in questa sessione.</string> + <string name="cardboard_steamvr_failed">SteamVR non ha risposto; controlla il log della sessione.</string> + <string name="drawer_component_downloads">Scarica componenti</string> + <string name="drawer_component_downloads_hint">I download sono condivisi con la pagina Componenti. Scegli sopra una versione scaricata per usarla al prossimo avvio del gioco.</string> + <string name="drawer_component_choose_download">Scegli una versione da scaricare</string> + <string name="stores_fact_developer">Sviluppatore</string> + <string name="stores_fact_publisher">Editore</string> + <string name="stores_fact_released">Uscita</string> + <string name="stores_hltb_main">Principale</string> + <string name="stores_hltb_extras">+ Extra</string> + <string name="stores_hltb_completionist">Completista</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="mode_zram">Compressione zRAM</string> + <string name="mode_zram_hint">Mentre un gioco è in esecuzione, la memoria del client Steam viene compressa nella zram del dispositivo, lasciando più RAM al gioco. Si applica al prossimo avvio di Steam.</string> + <string name="mode_zram_unsupported">Non disponibile: questo dispositivo non ha zram o swap, oppure il suo kernel è precedente alla 5.4.</string> + <string name="setup_reset_settings">Ripristina tutte le impostazioni</string> + <string name="setup_reset_settings_title">Ripristinare tutte le impostazioni?</string> + <string name="setup_reset_settings_body">Le impostazioni di schermo, prestazioni, controller, tema, lingua e launcher tornano ai valori predefiniti. Giochi, accesso a Steam, account degli store, driver scaricati e cartelle di archiviazione vengono mantenuti.</string> + <string name="setup_reset_settings_button">Ripristina</string> + <string name="setup_reset_settings_hint">Riporta ogni impostazione al valore predefinito</string> + <string name="setup_reset_settings_partial">Le impostazioni sono state ripristinate, ma alcune parti no. I dettagli sono nei log.</string> + <string name="setup_reset_settings_profiles">Ripristina anche i profili dei giochi (Proton, FEX, componenti e ambiente di ogni gioco e l\'ambiente del profilo predefinito)</string> + <string name="setup_reset_settings_session_running">Termina la sessione prima di ripristinare le impostazioni.</string> + <string name="stores_storage_insufficient">Spazio libero insufficiente: servono %1$s, ne sono liberi solo %2$s</string> + <string name="stores_storage_low">Spazio insufficiente (%1$s liberi, ne servono %2$s)</string> + <string name="stores_target_free_unknown">Spazio libero sconosciuto</string> + <string name="display_picture_position">Posizione immagine</string> + <string name="display_position_top">In alto</string> + <string name="display_position_bottom">In basso</string> + <string name="display_position_center">Centro (predefinito)</string> + <string name="setup_tab_storage">Archiviazione</string> + <string name="storage_measuring">Misurazione dell\'archiviazione…</string> + <string name="storage_measuring_hint">La prima volta richiede qualche secondo.</string> + <string name="storage_internal">Archiviazione interna</string> + <string name="storage_used_of">%1$s di %2$s usati</string> + <string name="storage_free">%1$s liberi</string> + <string name="storage_droiddeck_uses">DroidDeck occupa %1$s. Misurato il %2$s.</string> + <string name="storage_rescanning">nuova misurazione…</string> + <string name="storage_other_apps">Altre app Android</string> + <string name="storage_safe_now">Liberabile ora</string> + <string name="storage_safe_hint">Runtime inutilizzati, residui, vecchi log</string> + <string name="storage_clean_up">Pulisci…</string> + <string name="storage_session_running">Interrompi la sessione per pulire o rimuovere qualcosa. Le dimensioni restano visibili.</string> + <string name="storage_where">Dove finisce</string> + <string name="storage_games">Giochi Steam</string> + <string name="storage_game_data">Dati dei giochi</string> + <string name="storage_game_data_hint">Prefissi %1$s · workshop %2$s · shader %3$s</string> + <string name="storage_tools">Proton e runtime</string> + <string name="storage_tools_unused">%1$s inutilizzati</string> + <string name="storage_stores">GOG, Epic e altri store</string> + <string name="storage_stores_hint">Disinstallali da Store</string> + <string name="storage_desktop">App desktop</string> + <string name="storage_desktop_hint">App e runtime Flatpak</string> + <string name="storage_system">Sistema Linux e client Steam</string> + <string name="storage_system_hint">Necessario per eseguire qualsiasi cosa</string> + <string name="storage_app_data">Dati di DroidDeck</string> + <string name="storage_app_data_hint">Log delle vecchie sessioni %1$s · cache · driver</string> + <string name="storage_legend_games">Giochi</string> + <string name="storage_legend_data">Dati dei giochi</string> + <string name="storage_legend_tools">Proton e runtime</string> + <string name="storage_legend_stores">Altri store</string> + <string name="storage_legend_desktop">App desktop</string> + <string name="storage_legend_system">Sistema Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Pulizia</string> + <string name="storage_clean_up_lede">Qui nulla tocca i giochi installati o i download in corso.</string> + <string name="storage_nothing_to_clean">Al momento non c\'è nulla da pulire.</string> + <string name="storage_selected">Selezionato: %1$s · %2$s → %3$s liberi</string> + <string name="storage_cleaning">Pulizia…</string> + <string name="storage_free_button">Libera %1$s</string> + <string name="storage_freed">Liberati %1$s.</string> + <string name="storage_item_runtimes">Runtime e Proton di Steam inutilizzati</string> + <string name="storage_item_leftovers">Residui di giochi disinstallati</string> + <string name="storage_item_leftovers_unsure">Residui che possono contenere salvataggi</string> + <string name="storage_item_logs">Log delle vecchie sessioni</string> + <string name="storage_item_logs_detail">Conserva i log della sessione attuale</string> + <string name="storage_item_custom_detail">Nessun gioco lo usa. Reinstallalo da Componenti se ti serve.</string> + <string name="storage_item_shaders">Cache shader dei giochi installati</string> + <string name="storage_item_shaders_detail">Vengono ricreate giocando. I primi minuti di ogni gioco tornano a scattare.</string> + <string name="storage_tag_safe">Sicuro</string> + <string name="storage_tag_unused">Inutilizzato</string> + <string name="storage_tag_stutter">Scatti</string> + <string name="storage_tag_saves">Controlla salvataggi</string> + <string name="storage_tag_default">Predefinito</string> + <string name="storage_tag_required">Necessario</string> + <string name="storage_tag_not_used">Inutilizzato</string> + <string name="storage_back">Archiviazione</string> + <string name="storage_games_with_data">%1$s con i loro dati</string> + <string name="storage_sort_largest">Più grandi</string> + <string name="storage_sort_least_played">Meno giocati</string> + <string name="storage_sort_sd">Su scheda SD</string> + <string name="storage_no_games">Qui non ci sono giochi.</string> + <string name="storage_played">Giocato %1$s</string> + <string name="storage_never_played">Mai giocato</string> + <string name="storage_game_parts">Gioco %1$s · dati %2$s</string> + <string name="storage_uninstall">Disinstalla</string> + <string name="storage_games_note">La disinstallazione apre la finestra di Steam, così Steam ne tiene traccia. Per spostare un gioco sulla scheda SD, usa Steam › Impostazioni › Archiviazione.</string> + <string name="storage_uninstall_title">Disinstallare %1$s?</string> + <string name="storage_uninstall_body">Steam si apre e chiede conferma. Questo libera i %1$s del gioco. Il prefisso resta finché non pulisci i residui, e i salvataggi di Steam Cloud restano nel tuo account.</string> + <string name="storage_open_steam">Apri Steam</string> + <string name="storage_tools_detail">%1$s · %2$s inutilizzati</string> + <string name="storage_remove_unused">Rimuovi gli inutilizzati · %1$s</string> + <string name="storage_in_use">In uso</string> + <string name="storage_not_used">Inutilizzato</string> + <string name="storage_remove">Rimuovi</string> + <string name="storage_remove_title">Rimuovere %1$s?</string> + <string name="storage_remove_body">Libera %1$s. Steam lo scaricherà di nuovo se un gioco lo richiede.</string> + <string name="storage_tool_fex_runtime">Necessario per i giochi Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Necessario ai Proton ARM64</string> + <string name="storage_tool_redist">Programmi di installazione VC++ e DirectX richiesti dai giochi</string> + <string name="storage_tool_fex">Esegue i giochi Linux x86</string> + <string name="storage_tool_steam">Strumento Steam</string> + <string name="storage_tool_old_runtime">DroidDeck esegue i giochi senza questo runtime</string> + <string name="storage_tool_x86_proton">Proton x86, che DroidDeck non può eseguire</string> + <string name="storage_tool_custom_default">Predefinito per tutti i giochi</string> + <string name="storage_tool_custom_unused">Nessun gioco lo usa</string> + <string name="storage_tool_custom_unknown">Le impostazioni di Steam non sono leggibili, quindi viene conservato</string> + <string name="storage_cleanup_busy">Attendi la fine della pulizia dell\'archiviazione</string> + <string name="storage_low_title">Solo %1$s liberi</string> + <string name="storage_low_body">Steam ha bisogno di spazio per aggiornamenti e cache shader. Sotto i 10 GB gli aggiornamenti dei giochi possono fallire a metà.</string> + <string name="storage_low_safe">%1$s si possono liberare senza rischi.</string> + <string name="storage_free_up">Libera spazio</string> + <string name="storage_play_anyway">Gioca comunque</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d installato</item> + <item quantity="other">%d installati</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d su scheda SD</item> + <item quantity="other">%d su scheda SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d strumento</item> + <item quantity="other">%d strumenti</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Cartelle di prefisso vuote e cache shader di %d gioco</item> + <item quantity="other">Cartelle di prefisso vuote e cache shader di %d giochi</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Il prefisso di %d gioco contiene ancora file, che possono includere salvataggi locali. Se ti servono, fanne una copia prima.</item> + <item quantity="other">I prefissi di %d giochi contengono ancora file, che possono includere salvataggi locali. Se ti servono, fanne una copia prima.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d gioco</item> + <item quantity="other">%d giochi</item> + </plurals> + <string name="storage_tool_default_proton">Proton predefinito di DroidDeck</string> + <string name="storage_tool_proton">Opzione Proton 11 di DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Usato da %d gioco</item> + <item quantity="other">Usato da %d giochi</item> + </plurals> + <string name="storage_legend_components">Componenti</string> + <string name="storage_components">Componenti</string> + <string name="storage_item_components">Componenti inutilizzati</string> + <string name="storage_component_original">Originale %1$s · %2$s</string> + <string name="storage_original_confirm">Libera %1$s. Ripristina solo una versione di Proton non più installata.</string> + <string name="storage_leftovers_unchecked">Non controllato: un manifest di un\'app Steam non è leggibile, quindi i prefissi dei giochi disinstallati restano finché non lo sarà.</string> + <string name="storage_failed">Impossibile completare: %1$s</string> + <string name="storage_desktop_shared">%1$s condivisi</string> + <string name="storage_data_installed">Giochi installati</string> + <string name="storage_data_parts">Prefisso %1$s · shader %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Elimina shader</string> + <string name="storage_data_leftovers">Giochi disinstallati</string> + <string name="storage_steam_app">App Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Il suo prefisso contiene ancora file, che possono includere salvataggi locali</string> + <string name="storage_leftover_confirm">Elimina il suo prefisso Wine e la cache shader (%1$s). Fai prima una copia dei salvataggi che ti servono; quelli di Steam Cloud restano nel tuo account.</string> + <string name="storage_data_other">Conservati</string> + <string name="storage_data_other_title">Giochi non Steam e prefisso condiviso di Steam</string> + <string name="storage_data_other_detail">Prefissi di giochi aggiunti dagli store o a mano</string> + <string name="storage_components_packages">Pacchetti scaricati</string> + <string name="storage_components_originals">Originali conservati</string> + <string name="storage_components_none">Nessun pacchetto di componenti scaricato.</string> + <string name="storage_component_in_use">Scelto per un Proton o un gioco</string> + <string name="storage_component_unused">Non scelto da nessuna parte</string> + <string name="storage_original_kept">Ripristina il Proton installato</string> + <string name="storage_original_old">Versione di Proton non più installata</string> + <string name="storage_tag_in_use">In uso</string> + <string name="storage_components_note">I componenti in uso restano bloccati. Sceglili in Componenti; ciò che rimuovi qui si può scaricare di nuovo lì.</string> + <string name="storage_component_confirm">Libera %1$s. I pacchetti importati da te non si possono scaricare di nuovo.</string> + <string name="storage_desktop_detail">%1$s per le app Flatpak e ciò che condividono</string> + <string name="storage_desktop_apps_title">App</string> + <string name="storage_desktop_none">Nessuna app Flatpak installata.</string> + <string name="storage_desktop_shared_title">Condiviso dalle app</string> + <string name="storage_desktop_runtimes">Runtime</string> + <string name="storage_desktop_runtimes_detail">Librerie su cui girano le app; quelle inutilizzate se ne vanno con Rimuovi gli inutilizzati</string> + <string name="storage_desktop_cache">Deposito dei download</string> + <string name="storage_desktop_cache_detail">Object store e download in cache di Flatpak</string> + <string name="storage_desktop_prune">Rimuovi gli inutilizzati</string> + <string name="storage_desktop_prune_body">Rimuove i runtime che nessuna app installata richiede e ripulisce l\'object store di Flatpak. Le app installate continuano a funzionare.</string> + <string name="storage_flatpak_uninstall_body">Rimuove l\'app (%1$s) e i runtime che nessun altro usa. I suoi dati nella cartella home restano.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d pacchetto</item> + <item quantity="other">%d pacchetti</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d app</item> + <item quantity="other">%d app</item> + </plurals> + <string name="boot_movie">Video di avvio</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps è più fluido ma usa più CPU durante l\'avvio di Steam. Un video di avvio scelto nelle impostazioni di Steam ha la precedenza.</string> + <string name="boot_movie_sound">Audio</string> + <string name="boot_movie_custom">Il tuo video</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV o WebM. Altri formati e file oltre %1$d MB vengono convertiti in WebM 720p sul dispositivo, fino a %2$d secondi.</string> + <string name="boot_movie_import">Importa</string> + <string name="boot_movie_remove">Rimuovi</string> + <string name="boot_movie_pick">Scegli un video di avvio</string> + <string name="boot_movie_imported">%1$s è ora il video di avvio</string> + <string name="boot_movie_imported_silent">%1$s è ora il video di avvio, senza audio</string> + <string name="boot_movie_too_long">I video da convertire devono durare al massimo %1$d secondi</string> + <string name="boot_movie_converting">Conversione %1$d%%</string> + <string name="boot_movie_converting_started">Conversione di %1$s per Steam. Tieni aperto DroidDeck.</string> + <string name="boot_movie_unsupported">Questo dispositivo non può decodificare il video.</string> + <string name="boot_movie_import_failed">Impossibile importare il video</string> + <string name="glasses_experimental">Fotocamere Luma Ultra — Sperimentale</string> + <string name="glasses_joycons">Tracciamento della posizione dei Joy-Con</string> + <string name="glasses_joycons_hint">Utilizza le fotocamere degli occhiali smart per posizionare i controller Joy-Con associati. La rotazione e gli input dei pulsanti provengono dai controller Joy-Con. La posizione viene stimata quando i polsi sono nascosti. Sostituisce i controller utilizzati a mani nude e mette in pausa il tracciamento tramite la fotocamera del telefono. Punta i controller Joy-Con in avanti quando li connetti o reimposti il ​​centro di tracciamento.</string> + <string name="glasses_joycons_requires_position">Abilita prima il tracciamento della posizione. Richiede controller Joy-Con compatibili con il movimento su Android 12 o versioni successive. Disattivato per impostazione predefinita.</string> + <string name="setup_tab_glasses">Occhiali smart</string> + <string name="setup_glasses_connect">Collega gli occhiali smart per modificarne le impostazioni di visualizzazione e tracciamento. Le impostazioni salvate vengono mantenute anche dopo la disconnessione.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Modalità di visualizzazione</string> + <string name="glasses_output_2d">Uscita 2D</string> + <string name="glasses_output_3d">Uscita 3D</string> + <string name="glasses_picture_group">Immagine e schermo virtuale</string> + <string name="glasses_position_group">Posizione e livello del pavimento</string> + <string name="glasses_hands_group">Tracciamento delle mani - Sperimentale</string> + <string name="glasses_tracking_status">Stato del tracciamento</string> + <string name="glasses_resolution_2d">Risoluzione 2D</string> + <string name="glasses_resolution_3d">Risoluzione 3D</string> + <string name="glasses_resolution_vr">Risoluzione VR</string> + <string name="glasses_resolution_auto">Automatica</string> + <string name="glasses_resolution_inherit">Uguale a 2D/3D</string> + <string name="glasses_resolution_hint">Risoluzione di output per occhio.</string> + <string name="glasses_refresh_30_hint">Abilita Gioco su occhiali intelligenti per selezionare la modalità nativa a 30 Hz del display.</string> + <string name="glasses_3dof">Schermo virtuale 3DoF</string> + <string name="glasses_3dof_hint">Ancora i giochi piatti di fronte a te per poterti guardare intorno. Abilita Gioco su occhiali intelligenti senza passare al 3D.</string> + <string name="glasses_screen_app_wide">Larghezza e distanza aggiornano immediatamente lo schermo virtuale tracciato per i menu di DroidDeck, i giochi e le sessioni desktop.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Il tracciamento posizionale include la rotazione della testa in SteamVR. Per il tracciamento della sola rotazione, disattiva il tracciamento posizionale.</string> + <string name="glasses_head_tracking_spatial_hint">Controlla il movimento della testa sullo schermo virtuale. Il tracciamento posizionale include la rotazione della testa in SteamVR.</string> + <string name="glasses_quick_actions">Azioni rapide</string> + <string name="glasses_recenter_screen_hint">Guarda dove desideri che appaia lo schermo, quindi reimposta il centro di tracciamento per impostarne altezza e direzione.</string> + <string name="glasses_recenter_joycons_button">Ricentra i Joy-Con</string> + <string name="phone_camera_tracking_group">Fotocamera del telefono - Sperimentale</string> + <string name="phone_camera_tracking_setting">Tracciare mani o controller Joy-Con</string> + <string name="glasses_6dof">Schermo virtuale 6DoF</string> + <string name="glasses_position">Tracciamento posizionale - sperimentale</string> + <string name="glasses_position_hint">Movimento fisico in VR e intorno agli schermi virtuali. Il riavvio del tracciamento richiede un attimo.</string> + <string name="glasses_eye_height">Altezza attuale degli occhi rispetto al pavimento</string> + <string name="glasses_floor">Imposta il livello del pavimento dall\'altezza attuale</string> + <string name="glasses_floor_set">Imposta il livello del pavimento</string> + <string name="glasses_spatial_setup">Configurazione e diagnostica della telecamera stereo</string> + <string name="glasses_spatial_setup_hint">Verifica la calibrazione della telecamera e il tracciamento delle mani prima di giocare.</string> + <string name="glasses_spatial_open">Apri la configurazione</string> + <string name="glasses_hands">Controller utilizzati a mani nude</string> + <string name="glasses_hands_hint">Usa le telecamere degli occhiali smart per mirare con le mani, pizzica per cliccare e chiudi la mano per afferrare in VR. Gli stick del gamepad si muovono e ruotano. Sostituisce il tracciamento della posizione dei Joy-Con. Potrebbe verificarsi un ritardo o la perdita del tracciamento durante le partite.</string> + <string name="glasses_hands_ready_hint">Abilita i controller utilizzati a mani nude sotto le telecamere Luma Ultra in Tracciamento. Mostra prima le mani aperte.</string> + <string name="glasses_hands_base">Calibrazione Luma Ultra condivisa</string> + <string name="glasses_hands_base_hint">Utilizzo della base Luma Ultra condivisa. Calibra i tuoi occhiali intelligenti per verificarne la precisione.</string> + <string name="glasses_hands_calibration_verified">Calibrazione misurata verificata</string> + <string name="glasses_hands_calibration_required">Validazione richiesta</string> + <string name="glasses_hands_calibration_required_hint">I controller azionati a mani nude saranno disponibili dopo il superamento del controllo della distanza misurata.</string> + <string name="tracking_recovery_lost">Tracciamento perso</string> + <string name="tracking_recovery_look">Guardati intorno lentamente in una stanza ben illuminata.\nMantieni le telecamere di tracciamento libere e rivolte verso mobili o altri dettagli visibili.</string> + <string name="tracking_recovery_restart_help">Ancora bloccato? Sul tuo telefono: occhiali intelligenti → Monitoraggio → Apri configurazione → Mostra diagnostica → Riavvia monitoraggio.</string> + <string name="tracking_recovery_disconnected">Occhiali intelligenti disconnessi</string> + <string name="tracking_recovery_connect">Controlla la connessione USB e ricollega gli occhiali intelligenti.\nAccetta la richiesta di accesso USB sul telefono, se visualizzata.</string> + <string name="tracking_recovery_usb_help">Una volta connesso, guardati intorno lentamente in una stanza ben illuminata per ripristinare il tracciamento.</string> + <string name="tracking_recovery_recenter">È necessario ricentrare</string> + <string name="tracking_recovery_recenter_steps">Il tracciamento è tornato in una nuova posizione.\nGuarda in avanti, quindi tocca \"Ricentra\" sul telefono.</string> + <string name="tracking_recovery_recenter_help">Puoi trovare \"Ricentra\" anche in Occhiali smart → Tracciamento → Apri la configurazione. La calibrazione salvata della fotocamera viene mantenuta.</string> + <string name="tracking_recovery_stabilizing">Resta fermo per un momento</string> + <string name="tracking_recovery_hold">Ripristino del centro di tracciamento in corso.\nMantieni gli Smart Glasses fermi mentre il tracciamento si stabilizza.</string> + <string name="tracking_recovery_automatic">Questa schermata si chiude automaticamente quando il tracciamento della testa è pronto.</string> + <string name="glasses_steady_hand_aim">Mira stabilizzata con le mani</string> + <string name="glasses_steady_hand_aim_hint">Mira dalla spalla attraverso il palmo della mano. Disattivare per la rotazione controllata dal polso.</string> + <string name="spatial_title">Configurazione spaziale</string> + <string name="spatial_wait_tracking">In attesa del tracciamento…</string> + <string name="spatial_cameras_description">Telecamere di tracciamento sinistra e destra</string> + <string name="spatial_camera_sync">Sincronizzazione della fotocamera</string> + <string name="spatial_ready">Pronto</string> + <string name="spatial_sync_hint">In attesa che la telecamera e il rilevamento della testa si allineino. Mantieni gli occhiali intelligenti collegati.</string> + <string name="spatial_prepare">1. Preparare il target di calibrazione</string> + <string name="spatial_print_actual">Stampa nelle dimensioni reali</string> + <string name="spatial_print_hint">Ciascun quadrato deve misurare 30 mm (1,181 pollici). Montare il foglio in piano su una superficie rigida in un\'area ben illuminata.</string> + <string name="spatial_print">Stampa il pannello di calibrazione</string> + <string name="spatial_capture_group">2. Cattura punti di vista diversi</string> + <string name="spatial_board_stationary">Mantenere fermo il target di calibrazione</string> + <string name="spatial_capture_hint">Avvicinare, allontanare e lateralmente gli occhiali intelligenti. Girali a sinistra/destra, inclinali verso l\'alto/il basso e inclinali lateralmente. Conservare il target di calibrazione in entrambe le fotocamere e fare una breve pausa prima di ogni acquisizione.</string> + <string name="spatial_start">Avvia una nuova calibrazione</string> + <string name="spatial_wait_sync">In attesa della sincronizzazione della fotocamera.</string> + <string name="spatial_start_hint">Avviare una nuova calibrazione per raccogliere visualizzazioni.</string> + <string name="spatial_views_hint">Mantenere il target di calibrazione visibile in entrambe le anteprime. Cattura almeno 24 viste nitide da diverse angolazioni.</string> + <string name="spatial_capturing">Cattura…</string> + <string name="spatial_capture">Cattura la vista del target di calibrazione</string> + <string name="spatial_alignment">Calcolare l\'allineamento della telecamera</string> + <string name="spatial_calculating">Calcolo…</string> + <string name="spatial_calculate">Calcolare la calibrazione</string> + <string name="spatial_distance_group">3. Controllare la distanza</string> + <string name="spatial_distance">Distanza misurata</string> + <string name="spatial_distance_hint">Iniziare con 12 pollici o 30 cm in modo che gli indicatori stampati siano più facili da rilevare. Scegli la misura esatta che utilizzerai.</string> + <string name="spatial_camera_board_distance">Telecamera sinistra al centro del target di calibrazione</string> + <string name="spatial_checking_distance">Controllo della distanza…</string> + <string name="spatial_validate">Convalida la distanza</string> + <string name="spatial_diagnostics">Diagnostica</string> + <string name="spatial_show_diagnostics">Mostra diagnostica</string> + <string name="spatial_diagnostics_hint">Strumenti di recupero della temporizzazione e tracciamento della fotocamera.</string> + <string name="spatial_camera_timing">Temporizzazione della telecamera</string> + <string name="spatial_hand_input">Input dal tracciamento delle mani</string> + <string name="spatial_wait_timing">In attesa dei tempi della telecamera.</string> + <string name="spatial_frames">Immagini della telecamera</string> + <string name="spatial_gpu">Rilevamento delle mani tramite GPU</string> + <string name="spatial_gpu_hint">La CPU è l\'impostazione predefinita. La GPU è sperimentale e può causare il riavvio di SteamVR. Questa scelta si reimposta al riavvio del monitoraggio.</string> + <string name="spatial_lite">Rilevamento rapido dei modelli di mani</string> + <string name="spatial_lite_hint">Utilizzare il rilevatore di palma Lite e i punti chiave Lite sulle mani. Controlla la precisione della mira, del pizzicotto e della presa. Si reimposta al riavvio del monitoraggio.</string> + <string name="spatial_adaptive">Frequenza di ingresso automatica per il tracciamento delle mani</string> + <string name="spatial_adaptive_hint">Regola l\'input alla velocità di elaborazione. Si reimposta al riavvio del monitoraggio.</string> + <string name="spatial_half_rate">Limita la frequenza di ingresso per il tracciamento delle mani</string> + <string name="spatial_half_rate_hint">Utilizzare la metà delle immagini della telecamera. Spegnere per confrontare la frequenza massima. Si reimposta al riavvio del monitoraggio.</string> + <string name="spatial_diagnostic_capture">Cattura diagnostica</string> + <string name="spatial_diagnostic_capture_hint">Salva localmente una coppia di immagini stereo. Le immagini vengono salvate solo quando richiesto.</string> + <string name="spatial_save_frame">Salva l\'immagine della telecamera</string> + <string name="spatial_restart_tracking">Riavviare il tracciamento</string> + <string name="spatial_restart_hint">Utilizzare se il tracciamento non viene ripristinato in un\'area ben illuminata. Un riavvio richiede una nuova origine di tracciamento.</string> + <string name="spatial_restart">Riavvio</string> + <string name="spatial_restart_title">Riavviare il monitoraggio?</string> + <string name="spatial_restart_confirm">Le visualizzazioni di calibrazione non salvate andranno perse. Mantieni gli Smart Glasses fermi in seguito e ripristina il centro di tracciamento quando il tracciamento viene ripristinato.</string> + <string name="spatial_views_count">%1$d / 24 visualizzazioni acquisite</string> + <string name="spatial_capture_paused">Cattura in pausa: %1$s</string> + <string name="spatial_measure_hint">Misura %1$s. Mostra il target di calibrazione completo in entrambe le anteprime, quindi resta fermo.</string> + <string name="spatial_timing_values">%1$.1f Hz • età dell\'immagine %2$.1f ms • elaborazione %3$.1f ms</string> + <string name="spatial_input_values">Limite di ingresso %1$.1f Hz • %2$.0f%% delle immagini della telecamera. Il tracciamento della testa continua alla sua frequenza massima.</string> + <string name="spatial_frame_counts">%1$d elaborato • %2$d eliminato • %3$d saltato per limite di input</string> + <string name="spatial_print_title">DroidDeck - Calibrazione Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Stampa a 100% / Dimensioni effettive. Ogni quadrato: 30 mm (1,181 pollici).</string> + <string name="spatial_print_stationary">Mantenere il target di calibrazione piatto e fermo; spostare gli occhiali intelligenti tra le acquisizioni.</string> + <string name="spatial_print_check">Controllo scala: 100 mm (3,937 pollici) tra i tick</string> + <string name="spatial_distance_12in">12 pollici (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 pollici)</string> + <string name="spatial_distance_20in">20 pollici (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 pollici)</string> + <string name="spatial_disabled">Disabilitato</string> + <string name="spatial_wait_stable">In attesa del tracciamento stabile</string> + <string name="spatial_disconnected">Disconnesso</string> + <string name="spatial_hands_off">I controller azionati a mani nude sono spenti</string> + <string name="spatial_tracking_off">Il rilevamento della posizione è disattivato o gli occhiali intelligenti sono disconnessi</string> + <string name="spatial_recenter_pending">Richiesta di ripristino del centro di tracciamento: tieni fermi gli occhiali mentre il tracciamento si stabilizza.</string> + <string name="spatial_tracking_lost">Tracciamento perso: rivolgiti verso un\'area ben illuminata con dettagli visibili</string> + <string name="spatial_origin_changed">Origine del tracciamento modificata: tocca \"Ricentra\", quindi tieni fermi gli occhiali.</string> + <string name="spatial_active">6DoF attivo</string> + <string name="spatial_connect_hint">Collegare Luma Ultra e abilitare il tracciamento posizionale.</string> + <string name="spatial_validation_session">Calibrazione verificata per questa connessione.</string> + <string name="spatial_validation_saved">Calibrazione verificata e salvata.</string> + <string name="spatial_wait_cameras">In attesa delle telecamere stereo</string> + <string name="spatial_wait_hands">In attesa del tracciamento delle mani</string> + <string name="spatial_collect_instructions">Mantenere fermo il target di calibrazione 5 × 7. Cattura oltre 24 visualizzazioni spostando e ruotando gli occhiali intelligenti.</string> + <string name="spatial_capture_pending">In attesa dell\'immagine successiva della telecamera. Tieni fermi gli occhiali intelligenti.</string> + <string name="spatial_validation_pending">Controllo dell\'immagine successiva della telecamera. Mantenere visibile l\'intero target di calibrazione e restare fermi.</string> + <string name="spatial_start_first">Avviare prima la calibrazione</string> + <string name="spatial_no_camera_frame">Non è arrivata alcuna nuova immagine della fotocamera. Controlla la connessione degli occhiali intelligenti e le anteprime della fotocamera, quindi riprova.</string> + <string name="spatial_clock_reset">Reimpostazione dell\'orologio della fotocamera</string> + <string name="spatial_frame_changed">Sistema di coordinate di tracciamento modificato. Le visualizzazioni sono state salvate per il ricalcolo. Ripristina il centro di tracciamento, quindi avvia una nuova configurazione per acquisire altre visualizzazioni.</string> + <string name="spatial_device_loaded">calibrazione del dispositivo caricata</string> + <string name="spatial_base_loaded">Calibrazione base Luma Ultra caricata</string> + <string name="spatial_calibration_needed">calibrazione richiesta</string> + <string name="spatial_tap_start">Toccare prima Avvia nuova calibrazione.</string> + <string name="spatial_capture_recenter_pending">Il ripristino del centro di tracciamento è in attesa di un tracciamento stabile. Tieni fermi gli occhiali per un momento.</string> + <string name="spatial_capture_recenter">Tracciamento modificato. Tocca \"Ricentra\" una volta, quindi tieni fermi gli occhiali prima di acquisire.</string> + <string name="spatial_capture_unsynchronized">Acquisizione rifiutata: il tracciamento della testa non era sincronizzato oppure è cambiato durante l’acquisizione. Rimani fermo e riprova.</string> + <string name="spatial_align_first">Calcolare l\'allineamento della telecamera prima di controllare la distanza.</string> + <string name="spatial_processing_failed">elaborazione della fotocamera non riuscita</string> + <string name="spatial_hand_head_changed">Il rilevamento della testa è stato modificato durante il rilevamento delle mani</string> + <string name="spatial_hand_wait_sync">In attesa della sincronizzazione della fotocamera e della testa</string> + <string name="spatial_no_wrists">Nessun polso rilevato. Tieni le maniglie del controller Joy-Con davanti agli occhiali intelligenti</string> + <string name="spatial_no_hands">Nessuna mano rilevata. Mostra i palmi aperti davanti agli occhiali intelligenti</string> + <string name="spatial_one_camera_wrists">Polsi visibili in una sola telecamera; mantieni gli handle del controller nella vista condivisa</string> + <string name="spatial_one_camera_hands">Mani visibili in una sola telecamera; mantieni entrambi i palmi nella vista condivisa</string> + <string name="spatial_ambiguous_hands">Entrambe le fotocamere vedono le mani, ma la corrispondenza sinistra/destra è ambigua</string> + <string name="spatial_inconsistent_depth">Mani rilevate, ma la profondità stereo non è coerente</string> + <string name="spatial_rejected_wrist">Posizione del polso rifiutata dai controlli stereo o di movimento</string> + <string name="spatial_inconsistent_palm">Sono stati rilevati punti stereo, ma la geometria del palmo non è coerente</string> + <string name="spatial_hands_need_calibration">Calibrazione completa e controllo della distanza per abilitare le mani</string> + <string name="spatial_hands_wait_stable">In attesa di un tracciamento stabile della testa; ripristina il centro di tracciamento se richiesto.</string> + <string name="spatial_old_frame">L’osservazione tramite telecamera è troppo vecchia; in attesa di un nuovo paio</string> + <string name="spatial_fit_ready">Adatta %1$.2f px. Misura la distanza selezionata dalla telecamera sinistra al centro del target di calibrazione, quindi convalida.</string> + <string name="spatial_opencv_error">OpenCV non disponibile: %1$s</string> + <string name="spatial_restored">%1$d visualizzazioni salvate ripristinate. Calcola la calibrazione per riprovare o avvia un nuovo set per acquisirne di più.</string> + <string name="spatial_captured">Acquisito %1$d / 24 visualizzazioni. Mantenere fisso il target di calibrazione; sposta gli occhiali intelligenti per la visualizzazione successiva.</string> + <string name="spatial_capture_corners">Acquisizione rifiutata: %1$d / 12 angoli obbligatori visibili in entrambe le telecamere. Mostra una parte maggiore del target di calibrazione, resta fermo e riprova.</string> + <string name="spatial_validation_error">Impossibile terminare il controllo della distanza: %1$s. Riprova.</string> + <string name="spatial_inference_error">Rilevamento delle mani non disponibile: %1$s. Cambia CPU/GPU o attiva/disattiva i controller azionati a mani nude per riprovare.</string> + <string name="spatial_hand_timeout">Il rilevamento delle mani ha superato %1$d ms; osservazione scartata</string> + <string name="spatial_wrists_tracked">%1$d / 2 Posizioni del polso dei Joy-Con misurate tramite stereo</string> + <string name="spatial_palms_tracked">Palmi tracciati: %1$d / 2; gesto di pizzico pronto: %2$d; presa pronta: %3$d</string> + <string name="spatial_capture_saved">Acquisizione diagnostica salvata in %1$s</string> + <string name="spatial_hand_error">Tracciamento delle mani interrotto: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Il rilevamento della testa e il target di calibrazione non sono d\'accordo di %1$s (limite 5 cm/2 pollici). Mantenere fisso il target di calibrazione e attendere un tracciamento costante prima di iniziare una nuova serie. Ruota e inclina delicatamente gli occhiali intelligenti; fare una pausa prima di ogni acquisizione.</string> + <string name="spatial_need_views">Cattura almeno 24 viste diverse del target di calibrazione stazionario.</string> + <string name="spatial_need_rotation">Gira gli occhiali intelligenti a sinistra e a destra e inclinali su e giù; il movimento senza rotazione non può calibrare l\'allineamento della fotocamera.</string> + <string name="spatial_bad_baseline">Linea di base della fotocamera non plausibile</string> + <string name="spatial_need_orientations">Muovi la testa attraverso orientamenti più diversi.</string> + <string name="spatial_bad_rotation">Rotazione telecamera-testa non valida</string> + <string name="spatial_bad_alignment">L\'allineamento telecamera-testa non è coerente.</string> + <string name="spatial_calibration_error">Impossibile terminare la calibrazione. %1$s Le tue visualizzazioni acquisite vengono salvate.</string> + <string name="spatial_reprojection_error">L\'errore di riproiezione trattenuta %1$.2f px supera i 2 px. Ricalibrare.</string> + <string name="spatial_distance_corners">%1$d / 24 angoli della scacchiera rilevati in entrambe le fotocamere. Mantenere visibile l\'intero target di calibrazione e restare fermi. Se è già visibile, seleziona 12 pollici o 30 cm e misura la distanza più vicina prima di riprovare.</string> + <string name="spatial_distance_depth">Il target di calibrazione è visibile, ma la sua profondità non può essere misurata in modo affidabile. Tieni fermi gli occhiali intelligenti e mantieni il target di calibrazione piatto e ben illuminato, quindi riprova.</string> + <string name="spatial_distance_invalid">La ​​misurazione della fotocamera non era valida. Stai fermo e riprova.</string> + <string name="spatial_distance_passed">Controllo della distanza superato.</string> + <string name="spatial_distance_retry">Ricontrollare la distanza dalla telecamera sinistra al centro del target di calibrazione, quindi riprovare.</string> + <string name="spatial_distance_result">Telecamere misurate %1$s; distanza selezionata %2$s. %3$s</string> + <string name="spatial_wait_previews">Attendere le anteprime di entrambe le telecamere prima di avviare la calibrazione.</string> + <string name="spatial_saved_views_hint">Le visualizzazioni salvate possono essere ricalcolate. Avvia una nuova calibrazione per acquisire il sistema di coordinate di tracciamento corrente.</string> + <string name="spatial_model_checksum_error">Mancata corrispondenza del checksum del modello di mano</string> + <string name="spatial_opencv_load_error">Impossibile caricare OpenCV</string> + <string name="setup_glasses_scope">Le impostazioni dello schermo e del tracciamento della testa sono condivise tra menu, giochi e sessioni desktop di DroidDeck.</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> +</resources> diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index a788642f6a..2df5383a99 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="steamvr_recovery_title">SteamVR のグラフィックが停止しました</string> + <string name="steamvr_recovery_countdown">グラフィックをリセットして SteamVR を開き直すため、DroidDeck は%1$d秒後に再起動します。実行中のゲームは終了し、保存されていない進行状況は復元できません。</string> + <string name="steamvr_recovery_repeated">最近の再起動の後、グラフィックの障害が再発しました。ループを防ぐため、自動復旧を一時停止しています。再起動するとゲームは終了し、保存されていない進行状況は復元できません。</string> + <string name="steamvr_recovery_restart">今すぐ再起動</string> + <string name="steamvr_recovery_cancel">開いたままにする</string> + <string name="steamvr_recovery_restarting">グラフィックをリセットして SteamVR を開き直しています…</string> + <string name="steamvr_recovery_failed">DroidDeck を自動的に再起動できませんでした。アプリを完全に終了してから、もう一度開いてください。</string> <string name="app_name">DroidDeck</string> <string-array name="loading_hints"> <item>初回起動時はSteamをダウンロードします。数分かかる場合があります。</item> @@ -15,8 +22,10 @@ <string name="session_channel">セッション</string> <string name="session_channel_description">Steamまたはデスクトップのセッション中に表示</string> <string name="session_notification">Steamが実行中です</string> + <string name="session_notification_downloads">Steamのダウンロードが進行中</string> <string name="session_notification_paused">セッションが一時停止中 - 準備ができたらタップして再開</string> <string name="resume_session">再開</string> + <string name="suspend_now">今すぐ一時停止</string> <string name="stop_session">セッションを終了</string> <string name="frame_gen_title">フレーム生成</string> <string name="frame_gen_hint">使用するフレーム生成モードを選択してください</string> @@ -182,6 +191,8 @@ <string name="add_app_flatpak_id">アプリID</string> <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> <string name="add_app_flatpak_invalid">有効なFlathubアプリIDではありません</string> + <string name="add_app_flatpak_bundle_hint">Flathubにないアプリの場合は、.flatpakファイルも使えます。</string> + <string name="add_app_pick_flatpak">.flatpakファイルを選択</string> <string name="add_app_source">ソース</string> <string name="add_app_appearance">デスクトップに表示</string> <string name="add_app_preview_name">新しいアプリ</string> @@ -201,7 +212,7 @@ <string name="add_app_folder_copied">このフォルダにはLinuxプログラムが含まれており、共有ストレージでは実行できないため、DroidDeckにコピーされます(%1$s)。</string> <string name="add_app_confirm">追加</string> <string name="add_app_cancel">キャンセル</string> - <string name="add_app_runtime_required">先に「設定」からLinux実行環境をインストールしてください。</string> + <string name="add_app_runtime_required">先に「セットアップ」からLinux実行環境をインストールしてください。</string> <string name="add_app_busy">%1$sが完了するまでお待ちください。</string> <string name="steam_compat_label">互換</string> <string name="proton_compatible_note">Steamの互換性メニューで「%1$s」と表示されたビルドには、DroidDeckのプレフィックス修正が含まれており、ここでゲームを起動できます。デフォルトはProton Experimental ARM64(%1$s)で、より新しいProton 11.0 ARM64(%1$s)がインストールされている場合はそちらになります。この表示のないValve純正のProtonでは、このデバイスでゲームを起動できません。</string> @@ -215,7 +226,7 @@ <string name="common_update">更新</string> <string name="common_checking">確認中…</string> <string name="common_working">処理中…</string> - <string name="common_forget">忘れる</string> + <string name="common_forget">解除</string> <string name="common_add_ellipsis">追加…</string> <string name="common_use">使用</string> <string name="common_applies_next_session">次回のセッションで有効になります。</string> @@ -251,6 +262,10 @@ <string name="mode_osc">画面コントローラー</string> <string name="mode_osc_qam">Steam + QAM</string> <string name="mode_osc_note">自動では、コントローラーが接続されていないときに画面コントローラーを表示します。</string> + <string name="osc_steam_touch">Steamタッチ(ベータ版)</string> + <string name="osc_style_next_session">Steamのタッチコントロールは次回のSteamセッションから有効になります</string> + <string name="osc_steam_layout">Steamタッチのレイアウト</string> + <string name="osc_steam_layout_hint">このゲームのタッチコントロールを移動、サイズ変更、非表示にします。Steamに保存されます</string> <string name="mode_controller">コントローラー</string> <string name="mode_controller_hint">Steamがコントローラーを認識する方法。次回のセッションで有効になります。</string> <string name="mode_controller_deck">Steam Deckコントローラー</string> @@ -268,6 +283,11 @@ <string name="mode_suspend_manual">手動</string> <string name="mode_suspend_native">ネイティブ</string> <string name="mode_suspend_steam_note">自動では一時停止し、表示すると再開します。ネイティブでは先にSteamをスリープに備えさせます。手動では「再開」をタップするまで待機します。「しない」では実行し続けます。</string> + <string name="mode_background_downloads">ダウンロードを継続</string> + <string name="mode_background_downloads_hint">Steamがダウンロード中は、バックグラウンドでの一時停止を遅らせます。</string> + <string name="mode_zram">zRAM 圧縮</string> + <string name="mode_zram_hint">ゲームの実行中、Steam クライアントのメモリがデバイスの zram に圧縮され、ゲーム用のメモリが増えます。次回 Steam を起動したときに反映されます。</string> + <string name="mode_zram_unsupported">使用できません:このデバイスに zram もしくは swap がないか、カーネルが 5.4 未満です。</string> <string name="mode_suspend_note">自動ではバックグラウンドで一時停止し、表示すると再開します。手動では「再開」をタップするまで待機します。「しない」では実行し続けます。</string> <string name="mode_startup">起動</string> <string name="mode_steam_startup">DroidDeck起動時にSteamを起動</string> @@ -279,12 +299,12 @@ <string name="mode_decky_installed">インストール済み · %1$s</string> <string name="mode_decky_update">アップデートあり · %1$s</string> <string name="mode_decky_current">最新です · %1$s</string> - <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_loader">ローダー</string> <string name="mode_decky_install_latest">最新バージョンをインストール</string> <string name="mode_decky_on">Steamと共に起動します。有効にすると、このデバイス上の他のアプリがSteamを制御できる場合があります。</string> <string name="mode_decky_off">オフ。Steamのリモートデバッグポートは閉じたままになります。</string> <string name="mode_decky_remove_title">Decky Loaderをアンインストールしますか?</string> - <string name="mode_decky_remove_text">Loaderを削除します。プラグインと設定は保持されます。</string> + <string name="mode_decky_remove_text">ローダーを削除します。プラグインと設定は保持されます。</string> <string name="mode_client">クライアント</string> <string name="mode_mangoapp">パフォーマンスオーバーレイ</string> <string name="mode_mangoapp_hint">Deckモードでゲームがクラッシュしたり画面が真っ暗になる場合は、これをオフにしてください。次回のセッションで有効になります。</string> @@ -296,8 +316,8 @@ <string name="mode_sgdb_key">SteamGridDB API キー</string> <string name="mode_sgdb_key_yours">自分のキー</string> <string name="mode_sgdb_edit">編集…</string> - <string name="mode_added_art_hint">フォルダ名に基づいて不足している画像を補完します。ゲームフォルダ内のcover.jpg、hero.jpg、logo.png、またはicon.pngが優先的に使用されます。</string> - <string name="summary_remove_game">Remove %1$s</string> + <string name="mode_added_art_hint">不足しているアートワークをSteamから、次にSteamGridDBから補完します。ゲームフォルダ内のcover.jpg、hero.jpg、logo.png、icon.pngが優先されます。</string> + <string name="summary_remove_game">%1$sを削除</string> <string name="mode_added_remove_confirm">削除?</string> <string name="games_add">ゲームを追加</string> <string name="games_add_title">ゲームを追加:</string> @@ -330,17 +350,21 @@ <string name="wincomp_found_bundled">ゲームに%1$sが同梱されています</string> <string name="wincomp_found_shipped">ゲームに%1$sがあります(そのままで動くことが多いです)</string> <string name="wincomp_already_here">このゲームに導入済み</string> - <string name="wincomp_no_recommendation">ゲームのフォルダーには、必要なコンポーネントを示すものがありません。</string> + <string name="wincomp_no_recommendation">ゲームのフォルダには、必要なコンポーネントを示すものがありません。</string> + <string name="wincomp_active">このゲームにインストール済み(%1$d)</string> <string name="wincomp_all">すべてのコンポーネント(%1$d)</string> <string name="wincomp_installers">Windowsインストーラーが必要(%1$d)</string> - <string name="wincomp_installers_note">これらはプレフィックス内で実際のインストーラーを実行します(.NET、PhysX、XNA、Visual C++のフルインストーラーなど)。DroidDeckはまだ対応していませんが、次に対応予定です。</string> + <string name="wincomp_installers_note">これらはそれぞれ独自のセットアッププログラムで、中に取り出せるパッケージはなく、何をインストールするかの記録もまだありません。多くはProton内蔵のMonoで代用できる古いランタイムで、記録は作成次第追加されます。</string> <string name="wincomp_show">表示</string> <string name="wincomp_hide">非表示</string> - <string name="wincomp_needs_installer">Windowsインストーラーが必要(対応予定)</string> + <string name="wincomp_needs_installer">独自のセットアッププログラムを実行します(記録はまだありません)</string> <string name="wincomp_unsupported">ここではまだ未対応</string> <string name="wincomp_loading">コンポーネントを読み込み中…</string> <string name="wincomp_failed">インストールできませんでした: %1$s</string> <string name="wincomp_downloaded">ダウンロード済み</string> + <string name="wincomp_downloading">%1$sをダウンロード中</string> + <string name="wincomp_installing">インストール中:%1$s</string> + <string name="wincomp_reverting">オフにしています…</string> <string name="wincomp_download_size">ダウンロード %1$s</string> <string name="wincomp_next_launch">次にゲームを起動したときに反映されます。</string> <string name="mode_stretch169">16:9ゲームを引き伸ばす</string> @@ -397,6 +421,51 @@ <string name="comp_check_nightlies">Nightliesの新しいパッケージを確認</string> <string name="comp_proton">Proton</string> <string name="comp_proton_note">ここで選択したProtonは、Steamで個別のProtonが選択されていないすべてのゲームを実行します。Steamで変更した場合もここに反映されます。Steamのアップデート時にValveのProtonは置き換えられますが、元のファイルはビルドごとに保持されます。</string> + <string name="comp_scope">構成</string> + <string name="comp_profile_configure">プロファイルを設定</string> + <string name="comp_profile">プロファイル</string> + <string name="comp_scope_general">デフォルトプロファイル</string> + <string name="comp_scope_general_detail">個別設定のないゲームで自動的に使用されます。</string> + <string name="comp_profile_game_detail">%1$sの起動時に自動的に使用される保存済みの設定です。</string> + <string name="comp_game_hint">このゲームに必要な設定だけを選んでください。それ以外はデフォルトプロファイルを引き続き使用します。</string> + <string name="comp_game_fex">FEXプリセット</string> + <string name="comp_game_fex_inherited">デフォルトプロファイルのプリセットを使用中。</string> + <string name="comp_game_fex_override">このゲーム用のカスタムプリセットを保存済み。</string> + <string name="comp_game_fex_custom">カスタムFEX変数</string> + <string name="comp_game_use_general">デフォルトを使用</string> + <string name="comp_game_compatibility">ゲームの互換性</string> + <string name="comp_game_environment_hint">このゲームのProton、DXVK、VKD3D、同期の環境オプション。</string> + <string name="comp_game_proton_inherited">デフォルトプロファイルのProtonを使用中。</string> + <string name="comp_game_proton_override">Steamの互換性マッピングを通じて、このゲーム用のカスタムProtonを保存済み。</string> + <string name="comp_no_proton_short">Protonなし</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">このゲームで別のパッケージを選択しない限り、%1$sのデフォルトプロファイルのパッケージを使用します。</string> + <string name="comp_game_component_general">デフォルトプロファイルのコンポーネントパッケージを使用します。</string> + <string name="comp_game_component_override">このゲームでのみ%1$sを使用します。</string> + <string name="comp_game_runtime_options">ランタイムオプション</string> + <string name="comp_game_environment_other_hint">その他のゲームごとのProton、DXVK、VKD3D-Proton、同期の環境オプション。</string> + <string name="comp_game_saved_next">%1$sのプロファイルを保存しました。次回のゲーム起動時に有効になります。</string> + <string name="game_no_steam_title">Steamなしで起動</string> + <string name="game_no_steam_detail">Steam クライアントなしで Proton/FEX で開きます。Steam の機能はオフになります。</string> + <string name="game_no_steam_on">オン</string> + <string name="game_steam_with">Steam と一緒に起動</string> + <string name="game_steam_without">Steam なしで起動</string> + <string name="game_settings_card">設定</string> + <string name="game_settings_menu_title">%1$s の設定</string> + <string name="game_settings_default">デフォルト</string> + <string name="game_settings_default_detail">このゲーム用に変更した内容をすべてアプリの設定に戻します。</string> + <string name="game_sync_custom">カスタム同期変数</string> + <string name="comp_game_proton_live">%1$sのProtonの選択を保存しました。Steamですぐに使用できます。</string> + <string name="comp_game_proton_next">%1$sのProtonの選択を保存しました。ゲームを起動する前にSteamを再起動してください。</string> + <string name="comp_game_proton_not_runnable">%1$sは、選択したProtonをこのデバイスで使用できません。</string> + <string name="comp_game_load_failed">%1$sのプロファイルを読み込めませんでした:%2$s</string> + <string name="comp_game_save_failed">ゲームプロファイルを保存できませんでした:%1$s</string> + <string name="comp_game_reset">ゲームプロファイルをリセット</string> + <string name="comp_game_reset_title">%1$sのプロファイルをリセットしますか?</string> + <string name="comp_game_reset_body">このゲームのProton、FEX、コンポーネントパッケージ、環境、テクスチャフィルタリング、Windowsコンポーネントの個別設定を削除しますか?デフォルトプロファイルが使用されます。</string> + <string name="comp_game_reset_done">%1$sはデフォルトプロファイルを使用するようになりました。</string> + <string name="comp_game_reset_failed">ゲームプロファイルを完全にはリセットできませんでした:%1$s</string> <string name="comp_default_live">Steamで個別のProtonが選択されていないすべてのゲームを、現在%1$sで実行します。</string> <string name="comp_default_next">次回Steamの起動時から、個別のProtonが選択されていないすべてのゲームを%1$sで実行します。</string> <string name="comp_default_not_runnable">%1$sはここでゲームを起動できないため、デフォルトにできません。</string> @@ -415,7 +484,7 @@ <string name="comp_applies_next_game">次回のゲーム起動時に有効になります</string> <string name="comp_import_zip">.zipをインポート</string> <string name="comp_reading">Protonを読み込み中…</string> - <string name="comp_no_proton">Protonがインストールされていません。一度Steamを起動してARM64 Protonをダウンロードするか、「設定」からGE-ProtonまたはCachyOSを追加してください。</string> + <string name="comp_no_proton">Protonがインストールされていません。一度Steamを起動してARM64 Protonをダウンロードするか、「セットアップ」からGE-ProtonまたはCachyOSを追加してください。</string> <string name="comp_original">元 · %1$s</string> <string name="comp_this_build">%1$s · 現在のビルド</string> <string name="comp_earlier_build">%1$s · 以前のビルド</string> @@ -481,7 +550,7 @@ <string name="perf_fastpath">prootファストパス</string> <string name="perf_fastpath_needs_seccomp">prootのseccompフィルターが必要です。</string> <string name="perf_fastpath_hint">ファイル検索が速くなり、スタッターが減ります。プログラムがファイルを見つけられない場合は、これをオフにしてください。</string> - <string name="perf_identity">セッションID</string> + <string name="perf_identity">セッションの識別情報</string> <string name="perf_hostname">ホスト名</string> <string name="perf_hostname_hint">Steamがこのデバイスを認識する名前。空にすると%1$sに戻ります。</string> <string name="perf_hostname_invalid">英数字と中間のハイフンのみ使用でき、最大63文字です。</string> @@ -521,6 +590,10 @@ <string name="drawer_cas">シャープ化(CAS)</string> <string name="drawer_cas_level">シャープ化レベル</string> <string name="drawer_fake_hdr">疑似HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">SteamVR を起動</string> + <string name="steamvr_checking">SteamVR を確認しています…</string> <string name="drawer_deband">バンディング除去</string> <string name="drawer_deband_strength">バンディング除去の強度</string> <string name="drawer_brightness">明るさ</string> @@ -538,6 +611,11 @@ <string name="drawer_texture_sharpness_note">マイナスのミップマップバイアス:テクスチャがシャープになりますが、ちらつきが出ることがあります。自動では、セッションが画面に合わせて拡大される倍率に合わせます。</string> <string name="drawer_touch_auto">自動(%1$s)</string> <string name="drawer_keyboard">キーボード</string> + <string name="drawer_latency">遅延</string> + <string name="drawer_low_latency_controller">低遅延コントローラー</string> + <string name="drawer_low_latency_controller_hint">コントローラーが 250 Hz ではなく 1000 Hz で報告されます。CPU 使用率がわずかに上がります。</string> + <string name="drawer_low_latency_touch">低遅延タッチ</string> + <string name="drawer_low_latency_touch_hint">タッチはフレームの結合を省略し、Steam のタッチは 1000 Hz で報告されます。CPU 使用率がわずかに上がります。</string> <string name="drawer_pc_keyboard">PCキーボード</string> <string name="drawer_android_keyboard">Android</string> <string name="drawer_second_screen">セカンドスクリーン</string> @@ -560,11 +638,23 @@ <string name="drawer_stop_title">セッションを停止しますか?</string> <string name="drawer_running_now">現在実行中</string> <string name="drawer_no_game">現在Protonで実行中のゲームはありません</string> + <string name="drawer_selected_profile">ゲームプロファイル</string> + <string name="drawer_selected_profile_none">プロファイルの詳細はまだ利用できません。</string> + <string name="drawer_profile_refresh_failed_initial">ゲームプロファイルを読み込めませんでした。自動的に再試行します。</string> + <string name="drawer_profile_refresh_failed_stale">ゲームプロファイルを更新できませんでした。最後に取得したデータを表示しています。自動的に再試行します。</string> + <string name="drawer_profile_inspect_hint">次回の起動時に使用される保存済みの設定を表示・編集します。</string> + <string name="drawer_profile_default">デフォルトプロファイルを使用中</string> + <string name="drawer_profile_custom">カスタムプロファイル</string> + <string name="drawer_component_inherited">デフォルトプロファイルの%1$sを使用中。</string> + <string name="drawer_game_components_note">変更は%1$sのプロファイルに保存され、次回のゲーム起動時に有効になります。</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="other">%1$d件のゲーム個別設定</item> + </plurals> <string name="drawer_no_proton">Protonがインストールされていません。</string> <string name="drawer_game_running">ゲーム実行中</string> <string name="drawer_reapplied">%1$sの起動時に再適用しました</string> <string name="drawer_original">元</string> - <string name="drawer_components_note">「コンポーネント」ページでダウンロード、インポート、削除してください。</string> + <string name="drawer_components_note">「コンポーネント」ページでインポート、削除してください。</string> <string name="setup_check_done">完了</string> <string name="setup_check_warn">要対応</string> <string name="setup_check_busy">処理中</string> @@ -575,7 +665,7 @@ <string name="setup_tab_controller">コントローラー</string> <string name="setup_tab_session">セッション</string> <string name="setup_tab_launcher">ランチャー</string> - <string name="setup_title">設定</string> + <string name="setup_title">セットアップ</string> <string name="setup_all_set">● すべて準備完了</string> <string name="setup_n_ready">%1$d/%2$d 準備完了</string> <string name="setup_system_check">システムチェック</string> @@ -616,6 +706,14 @@ <string name="setup_saved_logs">保存されたセッションログ</string> <string name="setup_saved_logs_hint">最新の%1$d件を保持</string> <string name="setup_clear_logs">ログを消去</string> + <string name="setup_reset_settings">すべての設定をリセット</string> + <string name="setup_reset_settings_hint">すべての設定をデフォルトに戻します</string> + <string name="setup_reset_settings_button">リセット</string> + <string name="setup_reset_settings_title">すべての設定をリセットしますか?</string> + <string name="setup_reset_settings_body">画面、パフォーマンス、コントローラー、テーマ、言語、ランチャーの設定がデフォルトに戻ります。ゲーム、Steamのサインイン、ストアのアカウント、ダウンロードしたドライバー、ストレージフォルダーは保持されます。</string> + <string name="setup_reset_settings_profiles">ゲームプロファイルもリセットする(各ゲームのProton、FEX、コンポーネント、環境、およびデフォルトプロファイルの環境)</string> + <string name="setup_reset_settings_session_running">設定をリセットする前にセッションを停止してください。</string> + <string name="setup_reset_settings_partial">設定はリセットされましたが、一部をリセットできませんでした。詳細はログを確認してください。</string> <string name="setup_offline">オフラインモード</string> <string name="setup_sign_in_first">先にSteamにログインしてください</string> <string name="setup_launcher">ランチャー</string> @@ -631,6 +729,10 @@ <string name="setup_home">ホーム画面として使用</string> <string name="setup_home_on">DroidDeckをホームアプリとして使用できます</string> <string name="setup_home_off">DroidDeckはホームアプリとして提供されません</string> + <string name="setup_orientation">画面の向き</string> + <string name="setup_orientation_auto">横向き(自動回転)</string> + <string name="setup_orientation_landscape">横向き</string> + <string name="setup_orientation_reverse">横向き(反転)</string> <string name="setup_fullscreen">全画面</string> <string name="setup_fullscreen_on">Androidのステータスバーとナビゲーションバーを非表示</string> <string name="setup_fullscreen_off">Androidのステータスバーとナビゲーションバーを表示</string> @@ -657,7 +759,7 @@ <string name="store_title">ストア</string> <string name="store_chip_flathub">Flathub · ARM64</string> <string name="store_chip_ready">● Flatpakの準備完了</string> - <string name="store_needs_runtime">先に「設定」からLinux実行環境をインストールしてください。</string> + <string name="store_needs_runtime">先に「セットアップ」からLinux実行環境をインストールしてください。</string> <string name="store_setup_title">Flatpakをセットアップ</string> <string name="store_setup_text">Flatpakを追加し、Flathubに接続します(約20MB)。最初のアプリは実行環境もダウンロードします。</string> <string name="store_setting_up">セットアップ中…</string> @@ -769,7 +871,7 @@ <string name="gate_eyebrow">Steam</string> <string name="gate_lede">Androidは多数のバックグラウンドプロセスを起動するアプリを停止しますが、Steamは数十のプロセスを起動します。この設定を変更するまで、ゲームがエラー表示なしで閉じる可能性があります。</string> <string name="gate_fix_for_me">自動で修正</string> - <string name="gate_toggle_steps">「子プロセス制限を無効にする」をオンにして戻ってください。開発者向けオプションをオンのままにしないと、スイッチが再びオフになります。</string> + <string name="gate_toggle_steps">「子プロセスの制限を無効化」をオンにして戻ってください。開発者向けオプションをオンのままにしないと、スイッチが再びオフになります。</string> <string name="gate_open_dev">開発者向けオプションを開く</string> <string name="gate_no_toggle">このAndroidバージョンにはこのスイッチがないため、DroidDeckはワイヤレスデバッグを介して変更します。約1分かかり、PCは不要です。</string> <string name="gate_needs_wifi">ワイヤレスデバッグにはWi-Fiが必要です。ネットワークは何でもよく、インターネットは不要です。</string> @@ -819,8 +921,8 @@ <string name="wadb_turn_off">制限をオフにする</string> <string name="wadb_other_ways">その他の変更方法</string> <string name="wadb_dev_try_first">1 · 開発者向けオプション(最初に試す)</string> - <string name="wadb_restrict_on">「子プロセスを制限」をオンにします。</string> - <string name="wadb_restrict_off">「子プロセスを制限」をオフにします。</string> + <string name="wadb_restrict_on">「子プロセスの制限を無効化」をオフにします。</string> + <string name="wadb_restrict_off">「子プロセスの制限を無効化」をオンにします。</string> <string name="wadb_computer_last">3 · PC ADB(最終手段)</string> <string name="wadb_only_if">ワイヤレスデバッグが利用できない場合にのみ使用してください。</string> <string name="wadb_computer_group">3 · PC ADB(最終手段)</string> @@ -841,6 +943,8 @@ <string name="ctrl_keyboard_button">キーボードボタン</string> <string name="ctrl_select_steam">Selectを押してSteamメニューを開く</string> <string name="ctrl_select_steam_hint">View/Selectの代わり。</string> + <string name="ctrl_joycon_vr">Joy-ConをVRコントローラーとして使う</string> + <string name="ctrl_joycon_vr_hint">SteamVRの実行中は各Joy-Conが手になります。前に向けてHOMEボタンかキャプチャーボタンを長押しすると、向きを合わせ直します。</string> <string name="setup_animations">アニメーション</string> <string name="ctrl_adaptive_hint">スティックは触れた位置に表示され、離すと非表示になります</string> <string name="ctrl_layout">レイアウト</string> @@ -876,7 +980,7 @@ <string name="content_runtime_required">実行環境が必要です</string> <string name="content_loading_details">インストール詳細を読み込み中…</string> <string name="content_details_unavailable">インストール詳細は利用できません。後でもう一度お試しください。</string> - <string name="content_needs_runtime">先に「設定」からLinux実行環境をインストールしてください。</string> + <string name="content_needs_runtime">先に「セットアップ」からLinux実行環境をインストールしてください。</string> <string name="content_stop_first">実行中のセッションを停止してからデスクトップアプリをインストールしてください。</string> <string name="content_install_into">%1$sをLinuxデスクトップにインストールします。</string> <string name="store_busy_percent_short">%1$s · %2$d%%</string> @@ -888,10 +992,17 @@ <string name="content_page_gone">このページは存在しません。左側からセクションを選択してください。</string> <string name="content_open_desktop">デスクトップを開く</string> <string name="content_install_open_desktop">インストールしてデスクトップを開く</string> + <string name="desktop_remove_title">デスクトップをアンインストール</string> + <string name="desktop_remove_text">デスクトップと同梱のアプリを削除します。ゲーム、追加したアプリ、設定、共有ライブラリは保持されます。</string> + <string name="desktop_removing">デスクトップを削除中</string> + <string name="desktop_removed">デスクトップを削除しました</string> + <string name="desktop_cleaning_legacy">古いLXQtファイルを削除中</string> + <string name="desktop_removal_unknown">このバージョンのデスクトップを削除する前に、DroidDeckを更新してください。</string> <string name="content_linux_desktop">Linuxデスクトップ</string> <string name="content_linux_desktop_hint">KDE Plasma、Firefox、エミュレーター</string> <string name="games_empty">Steamでインストールされたゲームは、セッション終了後にここに表示されます。</string> <string name="games_play_steam">Steamを実行</string> + <string name="games_play_steamvr">SteamVRを実行</string> <string name="games_launch_settings">起動設定</string> <string name="games_launch">起動</string> <string name="games_files">ゲームファイル</string> @@ -908,14 +1019,16 @@ <string name="games_export_winlator">Winlatorアーカイブとしてエクスポート…</string> <string name="games_open_save_folder">セーブフォルダを開く</string> <string name="games_never_played">未プレイ</string> - <string name="games_runtime_busy_percent">実行環境がビジー · %1$d%%</string> - <string name="games_runtime_busy">実行環境がビジー</string> + <string name="games_runtime_busy_percent">実行環境は使用中 · %1$d%%</string> + <string name="games_runtime_busy">実行環境は使用中</string> <string name="games_runtime_first_play">初回実行時に実行環境を導入</string> <string name="games_runtime_update">実行環境にアップデートがあります</string> <string name="games_runtime_ready">● 実行環境の準備完了</string> <string name="games_last_played">最終プレイ %1$s</string> <string name="games_internal">内部ストレージ</string> <string name="games_added">追加されたゲーム</string> + <string name="games_custom">カスタムゲーム</string> + <string name="games_store_storage">ゲームストレージ</string> <string name="gpu_auto_hint">このGPUに最適なドライバー構成を選択し、最新の状態に保ちます</string> <string name="gpu_manual_hint">ドライバー構成を自分で選択する</string> <string name="gpu_checking">ドライバーを確認中…</string> @@ -927,7 +1040,6 @@ <string name="gpu_set_with_runtime">ランタイムドライバーと一緒に設定:%1$s は両方を含みます。</string> <string name="gpu_runtime_hint">ゲームとデスクトップで使用されます。</string> <string name="gpu_runtime_default">ランタイムデフォルト</string> - <string name="gpu_display_hint">画面への出力を担当します。DroidDeckの再起動後に有効になります。</string> <string name="gpu_auto_by_gpu">自動 - GPUごとに選択</string> <string name="gpu_manage">ダウンロード、インポート、削除…</string> <string name="gpu_in_use_caps">使用中</string> @@ -957,6 +1069,12 @@ <string name="deck_tab_left">左トラックパッド</string> <string name="deck_tab_right">右トラックパッド</string> <string name="deck_tab_both">両方</string> + <string name="deck_tab_gamepad">ゲームパッド</string> + <string name="deck_surface_stick">スティック</string> + <string name="deck_surface_trackpad">トラックパッド</string> + <string name="deck_surface_switch">スティックとトラックパッドを切り替え</string> + <string name="deck_more_controls">その他のDeckコントロール</string> + <string name="deck_panels">パネル</string> <string name="deck_close">セカンドスクリーンコントロールを閉じる</string> <string name="deck_open_steam_menu">Steamメニューを開く</string> <string name="deck_left_upper">左 · 上</string> @@ -977,7 +1095,7 @@ <string name="rail_store">ストア</string> <string name="rail_components">コンポーネント</string> <string name="rail_apps">アプリ</string> - <string name="rail_setup">設定</string> + <string name="rail_setup">セットアップ</string> <string name="rail_updates">アップデート</string> <string name="rail_percent">%1$d%%</string> <string name="rail_resume_named">%1$sを再開</string> @@ -992,6 +1110,10 @@ <string name="proton_installed">%1$s インストール済み</string> <string name="proton_queued">前回のリクエストによる保留中の項目</string> <string name="proton_not_installed">未インストール</string> + <string name="proton_update_available">アップデートあり → %1$s</string> + <string name="proton_remove_older">古い%1$sのバージョンを削除</string> + <string name="proton_remove_older_body">%1$sを削除します。これらのバージョンに設定されているゲームは、別のProtonに切り替える必要があります。</string> + <string name="proton_remove_body">このバージョンに設定されているゲームは、別のProtonに切り替える必要があります。</string> <string name="proton_install_now">今すぐインストール</string> <string name="proton_cancel_queued">キューをキャンセル</string> <string name="pckb_android">Androidキーボード</string> @@ -1020,6 +1142,8 @@ <string name="game_env_eyebrow">Protonゲーム</string> <string name="pip_title">ピクチャーインピクチャー</string> <string name="pip_auto">自動でピクチャーインピクチャー</string> + <string name="unfolded_controls">開いた状態の画面のコントロール</string> + <string name="unfolded_controls_hint">開いた状態では、ゲームがSteam Deckのトラックパッドと背面グリップの上に表示されます。折りたたんだ状態では、ゲームが全画面で表示されます。</string> <string name="pip_suspended">一時停止中</string> <string name="pip_not_ready">セッションの準備ができたらピクチャーインピクチャーを使用できます。</string> <string name="pip_permission">Android設定でDroidDeckのピクチャーインピクチャーを許可してください。</string> @@ -1045,19 +1169,12 @@ <string name="game_file_exported">ゲームファイルを %1$s に保存しました</string> <string name="game_frontend_files">フロントエンドファイル</string> - <!-- Launcher, session and menus --> - - <!-- Launcher (MainActivity) --> <string name="main_wait_runtime">実行環境の処理が完了するまでお待ちください</string> <string name="main_wait_proton_install">互換性ツールのインストールが完了するまでお待ちください</string> <string name="main_wait_desktop_install">デスクトップアプリのインストールが完了するまでお待ちください</string> <string name="main_wait_install_game">インストールが完了してからゲームを起動してください</string> <string name="main_saves_close_session">インポートしたデータがゲームに上書き保存されないよう、先にSteamセッションを終了してください</string> - - <!-- Busy line while saves are imported; %1$s is the game's name --> <string name="main_saves_importing">%1$sにインポート中</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the game's name --> <plurals name="main_saves_imported"> <item quantity="other">%2$sから%1$d個のファイルを%3$sにインポートしました</item> </plurals> @@ -1065,19 +1182,11 @@ <item quantity="other">%2$sから%1$d個のファイルを%3$sにインポートしました。以前のセーブデータはDownload/DroidDeck/Saves/backupsにバックアップされました</item> </plurals> <string name="main_saves_pick_zip">%1$sのセーブデータzipを選択</string> - - <!-- Busy line while saves are exported; %1$s is the game's name --> <string name="main_saves_exporting">%1$sをエクスポート中</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the zip's path --> <plurals name="main_saves_exported"> <item quantity="other">%1$d個のファイルを%2$sとしてエクスポートしました:%3$s</item> </plurals> - - <!-- %1$s is the game's name, %2$s the save layout --> <string name="main_saves_pick_folder">%1$sの保存先を選択(%2$s)</string> - - <!-- %1$s is what was being done (e.g. Importing into Portal 2, Swapping), %2$s the error --> <string name="main_action_failed">%1$sに失敗しました:%2$s</string> <string name="main_no_logs_yet">セッションログはまだありません。先にセッションを実行してください。</string> <string name="main_no_logs_to_clear">消去するセッションログはありません。</string> @@ -1090,78 +1199,55 @@ <string name="main_adb_copied">ADBコマンドをコピーしました</string> <string name="main_pick_roms">ROMフォルダを選択</string> <string name="main_non_adreno_title">Adreno GPUではありません</string> - - <!-- %1$s is the GPU's name, %2$.0f the download size in MB --> <string name="main_non_adreno_text">TurnipはAdreno GPUをサポートしています。%1$sでは、Steamの画面が真っ暗になる可能性があります。ダウンロード:%2$.0f MB。</string> <string name="main_install_anyway">インストールする</string> <string name="main_remove_runtime_title">Linux実行環境を削除</string> <string name="main_remove_runtime_text">実行環境、その中のSteamクライアント、そこにインストールされたすべてのゲームが削除されます。</string> - - <!-- Toast; %1$s is a list of components, separated by commas --> <string name="main_applied">適用しました:%1$s</string> <string name="android_app_open_failed_primary">メイン画面で%1$sを開けませんでした</string> - - <!-- %1$s is the app, %2$s the name of the display --> <string name="android_app_open_failed_on">%2$sで%1$sを開けませんでした</string> - - <!-- %1$s is the app, %2$d the display's number --> <string name="android_app_open_failed_display">ディスプレイ%2$dで%1$sを開けませんでした</string> - - <!-- Components page busy lines, shown with … after them --> <string name="comp_busy_importing">インポート中</string> <string name="comp_busy_swapping">置き換え中</string> <string name="comp_busy_restoring">復元中</string> <string name="comp_busy_cancelling">キャンセル中</string> <string name="comp_busy_deleting">削除中</string> <string name="comp_cannot_read">ファイルを読み取れません</string> - - <!-- %1$s is a version or a name --> <string name="comp_imported">%1$sをインポートしました</string> <string name="comp_swap_cancelled">待機中の置き換えをキャンセルしました。</string> <string name="comp_pick_wcp">コンポーネントパッケージ(-linux .wcp)を選択</string> <string name="comp_nightlies_unreachable">Nightliesに接続できませんでした</string> - - <!-- %1$s is the package version --> <string name="comp_stored">%1$sを保存しました</string> <string name="comp_download_failed">ダウンロードに失敗しました:%1$s</string> <string name="drivers_pick_linux">Linuxランタイムドライバー(-Linux zipまたはAndroid + Linuxバンドル)を選択</string> <string name="drivers_pick_android">ディスプレイドライバー(AdrenoTools zipまたはAndroid + Linuxバンドル)を選択</string> <string name="drivers_pick_any">ドライバーzipまたはAndroid + Linuxバンドルを選択</string> - - <!-- %1$s is a desktop app's name, %2$s what went wrong --> <string name="main_pkg_problem">%1$s:%2$s</string> <string name="main_removing_named">%1$sを削除中…</string> - <string name="main_forgetting_named">%1$sを登録解除中…</string> + <string name="main_forgetting_named">%1$sを解除中…</string> <string name="main_pick_game_storage">ゲームの保存先フォルダを選択</string> <string name="main_pick_decky_zip">Deckyプラグインのzipを選択</string> <string name="main_storage_not_usable">使用できません:%1$s</string> - - <!-- What is running, when it is a program without a known name --> <string name="main_running_program">プログラム</string> <string name="main_removing_runtime">Linux実行環境を削除中</string> <string name="main_settings_main_screen">下部画面で設定を開けなかったため、メイン画面で開きました。</string> <string name="main_open_dev_options">設定で開発者向けオプションを開いてください</string> - <!-- Updates --> <string name="upd_unknown_apps_failed">Androidの「不明なアプリのインストール」設定を開けませんでした</string> <string name="upd_couldnt_check">確認できませんでした:%1$s</string> <string name="upd_no_download">このビルドには、このDroidDeckコピー用のダウンロードがありません</string> <string name="upd_stop_first">実行中のセッションを停止してから更新してください</string> - - <!-- Update stages, shown with … after them --> <string name="upd_stage_downloading">ダウンロード中</string> <string name="upd_stage_installing">インストール中</string> <string name="upd_stage_confirm">確認を待機中</string> <string name="upd_failed">アップデートに失敗しました</string> <string name="upd_not_offered">Androidがアップデートのインストールを表示しませんでした</string> - <!-- Decky --> <string name="decky_install_failed">Deckyのインストールに失敗しました:%1$s</string> <string name="decky_plugin_starting">プラグインのインポートを開始中…</string> <string name="decky_plugin_failed">プラグインのインポートに失敗しました:%1$s</string> <string name="decky_plugin_installed">プラグインをインストールしました。読み込むにはSteamを再起動してください。</string> - <!-- GPU drivers --> <string name="drivers_not_checked">未確認 - 更新をタップして新しいドライバーを検索</string> <string name="drivers_bundle_sets_display">Android + Linux:ディスプレイドライバーも一緒に設定されます</string> <string name="drivers_bundle_sets_runtime">Android + Linux:ランタイムドライバーも一緒に設定されます</string> @@ -1169,26 +1255,26 @@ <string name="drivers_system_vulkan">システムのVulkan:このGPU用の同梱ビルドはありません</string> <string name="drivers_bundled">%1$s(同梱)</string> <string name="drivers_manual">手動</string> - - <!-- Driver mode, then the driver pair in use --> <string name="drivers_summary">%1$s · %2$s</string> <string name="drivers_half_published">現在、片方のみが公開されています</string> <string name="drivers_pair_size">両方で%1$.0f MB</string> - - <!-- %1$s says why (the GPU's support status) --> <string name="drivers_none_to_set">設定できるドライバーがありません:%1$s</string> <string name="drivers_checking_latest">最新のドライバーを確認中…</string> <string name="drivers_up_to_date_check_failed">最新です(確認できませんでした:%1$s)</string> <string name="drivers_recommended_unpublished">推奨ドライバーは現在公開されていません</string> - - <!-- %1$s is the driver pair's name, %2$s its version --> <string name="drivers_downloading_pair">%1$s %2$sをダウンロード中…</string> <string name="drivers_updated_to">%1$s %2$sに更新しました。</string> <string name="drivers_updated_to_restart">%1$s %2$sに更新しました。ディスプレイドライバーはDroidDeckの再起動後に有効になります。</string> + <string name="drivers_auto_waits_for_session">ドライバーの更新はセッションの終了後に行われます。</string> + <string name="drivers_auto_waits_for_network">モバイルデータと省電力モードを解除すると、%1$s %2$s をダウンロードします。</string> + <string name="drivers_skipping_bad">%1$s %2$s はこのデバイスでセッションを開始できなかったため、自動モードは利用できるドライバーを使い続けます。</string> + <string name="drivers_rolled_back">%1$s は 2 回セッションを開始できなかったため、自動モードは利用できるドライバーに戻しました。</string> <string name="drivers_switched_to">%1$s %2$sに切り替えました。</string> <string name="drivers_switched_to_restart">%1$s %2$sに切り替えました。ディスプレイドライバーはDroidDeckの再起動後に有効になります。</string> <string name="drivers_using">%1$s %2$sを使用中。</string> <string name="drivers_using_restart">%1$s %2$sを使用中。ディスプレイドライバーはDroidDeckの再起動後に有効になります。</string> + <string name="drivers_using_quest">内蔵の Quest ディスプレイドライバーとランタイムの既定値を使用します。</string> + <string name="drivers_using_quest_restart">内蔵の Quest ディスプレイドライバーとランタイムの既定値を使用します。ディスプレイドライバーは DroidDeck の再起動後に反映されます。</string> <string name="drivers_not_a_driver">ドライバーzipではありません:AdrenoToolsドライバー、-Linux Turnip、Android + Linuxバンドルのいずれでもありません</string> <string name="drivers_import_failed">インポートに失敗しました:%1$s</string> <string name="drivers_imported_unnamed">インポートしたドライバー</string> @@ -1196,11 +1282,7 @@ <string name="drivers_using_bundle_restart">%1$sをランタイムドライバーとディスプレイドライバーの両方として使用中。ディスプレイドライバーはDroidDeckの再起動後に有効になります。</string> <string name="drivers_deleted_bundle">%1$sを削除しました(両方のドライバー)</string> <string name="drivers_deleted">%1$sを削除しました</string> - - <!-- %1$s lists the latest releases, %2$s when they were checked (e.g. 5 min ago) --> <string name="drivers_release_status">最新:%1$s · 確認 %2$s</string> - - <!-- %1$s lists the latest releases, %2$s the sources that could not be reached, %3$s when they were checked --> <string name="drivers_release_status_failed">最新:%1$s · %2$sに接続できません · 確認 %3$s</string> <plurals name="drivers_ago_minutes"> <item quantity="other">%1$d分前</item> @@ -1213,39 +1295,25 @@ </plurals> <string name="drivers_checking_sources">Banners-Turnip、WinNative、DroidDeckを確認中…</string> <string name="drivers_check_failed">確認に失敗</string> - - <!-- %1$s is the driver's name --> <string name="drivers_installed_pick_either">%1$sをインストールしました - どちらかの一覧で選択すると両方のドライバーが設定されます</string> <string name="drivers_installed_pick">%1$sをインストールしました - メニューで選択してください</string> - <!-- Session (SessionActivity) --> <string name="session_wait_removal">実行環境の削除が完了するまでお待ちください</string> - - <!-- Drawer title when the running program has no known name --> <string name="session_title_game">ゲーム</string> - - <!-- Shown as "Auto (touchpad)" in the drawer's touch setting --> <string name="session_touch_auto_touchpad">トラックパッド</string> - - <!-- Shown as "Auto (direct)" in the drawer's touch setting --> <string name="session_touch_auto_direct">ダイレクト</string> <string name="session_swap_failed">置き換えに失敗しました:%1$s</string> + <string name="session_profile_save_failed">プロファイルの保存に失敗しました:%1$s</string> <string name="session_desktop_paused">デスクトップは一時停止中です</string> - - <!-- %1$s is the program's name --> <string name="session_named_paused">%1$sは一時停止中です</string> <string name="session_program_paused">プログラムは一時停止中です</string> <string name="session_starting_desktop">デスクトップを起動中</string> - - <!-- %1$s is the program's name --> <string name="session_starting_named">%1$sを起動中</string> <string name="session_starting_program">プログラムを起動中</string> <string name="session_no_logs">このセッションのログはありません。</string> <string name="session_logs_archive_failed">セッションログのアーカイブを作成できませんでした。</string> <string name="session_logs_share_failed">セッションログを共有できませんでした。</string> <string name="session_starting_session">セッションを開始中…</string> - - <!-- Loading screen lines while packages download; %1$d and %2$d are megabytes --> <string name="session_runtime_downloading">Linux実行環境をダウンロード中</string> <string name="session_runtime_downloading_mb">Linux実行環境をダウンロード中 · %1$d / %2$d MB</string> <string name="session_runtime_checking">Linux実行環境を確認中</string> @@ -1260,33 +1328,20 @@ <string name="session_proton_unpacking">Proton Experimental(ARM64)を展開中</string> <string name="session_runtime_catalog_unreachable">実行環境のカタログに接続できませんでした。接続を確認して、もう一度Playをタップしてください。</string> <string name="session_runtime_install_failed">Linux実行環境をインストールできませんでした。「設定」で実行環境を確認して、もう一度Playをタップしてください。</string> - - <!-- %1$s says what went wrong --> <string name="session_desktop_install_failed">デスクトップをインストールできませんでした(%1$s)。接続を確認して、もう一度「デスクトップ」をタップしてください。</string> - - <!-- %1$s is the program's name, or Steam --> <string name="session_ended_named">%1$sが予期せず停止しました。バグレポートにログを添付して共有するか、もう一度お試しください。</string> <string name="session_ended_program">プログラムが予期せず停止しました。バグレポートにログを添付して共有するか、もう一度お試しください。</string> <string name="session_ended_desktop">デスクトップが予期せず停止しました。バグレポートにログを添付して共有するか、もう一度お試しください。</string> - - <!-- %1$d is the exit status, %2$s the log file's path --> <string name="session_ended_detail">終了ステータス %1$d · %2$s</string> <string name="session_ended_no_log">ログなし</string> - - <!-- %1$d errors; %2$s, %3$s and %4$s are the Performance page and its two settings --> <plurals name="session_hint_enosys"> <item quantity="other">ログに「Function not implemented」エラーが%1$d件あります。このデバイスでは、prootのseccomp高速化が補助プロセスの処理に失敗しています。%2$s →「%3$s」(または「%4$s」)を試してから、もう一度起動してください。</item> </plurals> - <!-- Screens, files, controller and store --> - - <!-- Mode settings --> <string name="mode_decky_plugins">プラグイン</string> <string name="mode_decky_plugins_hint">次回のSteamセッション用にプラグインのzipをインストールします。</string> <string name="mode_decky_plugin_downloading">ダウンロード中…</string> <string name="mode_decky_plugin_install_zip">zipからインストール</string> - - <!-- Store --> <string name="store_cat_games">ゲーム</string> <string name="store_cat_audio_video">オーディオ・ビデオ</string> <string name="store_cat_graphics">グラフィック</string> @@ -1299,28 +1354,14 @@ <string name="store_cat_utilities">ユーティリティ</string> <string name="store_section_popular">人気</string> <string name="store_section_trending">トレンド</string> - - <!-- Store front-page section of recently added apps --> <string name="store_section_new">新着</string> - - <!-- Store front-page section of recently updated apps --> <string name="store_section_updated">最近の更新</string> <string name="store_section_loading">読み込み中…</string> <string name="store_flatpak_setup">Flatpakのセットアップ</string> - - <!-- %1$s is what failed (an app name or "Flatpak setup"), %2$s the error --> <string name="store_problem">%1$s:%2$s</string> <string name="store_updates_check_failed">Flathubでアップデートを確認できませんでした</string> - - <!-- Library tiles --> - - <!-- Subtitle of a game tile whose cover art was found --> <string name="content_rom_installed">インストール済み</string> - - <!-- Subtitle of a game that is a folder rather than a single file --> <string name="content_rom_folder">フォルダ</string> - - <!-- Launcher themes --> <string name="theme_graphite">グラファイト</string> <string name="theme_graphite_detail">グラファイト調の画面に、選択・フォーカス・押下時にはロゴのオーブと同じ青を使用します。</string> <string name="theme_paper">ペーパー・オン・ブラック</string> @@ -1329,8 +1370,6 @@ <string name="theme_icon_blue_detail">黒の背景に白の文字、選択・フォーカス・押下時には青を使用します。</string> <string name="theme_electric">エレクトリックネイビー</string> <string name="theme_electric_detail">より明るい青を、グレーではなくネイビー寄りの画面に使用します。</string> - - <!-- PC keyboard key caps (keep them short; they label physical PC keys) --> <string name="pckb_key_esc">Esc</string> <string name="pckb_key_ins">Ins</string> <string name="pckb_key_del">Del</string> @@ -1348,27 +1387,17 @@ <string name="pckb_key_alt">Alt</string> <string name="pckb_key_space">スペース</string> <string name="pckb_key_altgr">AltGr</string> - - <!-- Terminal key strip on the second screen --> <string name="second_key_tab">Tab</string> - - <!-- A modifier key (%1$s, e.g. Ctrl) that is currently held --> <string name="second_key_on">%1$s ✓</string> <string name="second_key_ctrl_c">Ctrl+C</string> <string name="second_key_ctrl_d">Ctrl+D</string> - - <!-- Game file sync errors --> <string name="game_sync_err_runtime">先に実行環境をインストールしてください</string> <string name="game_sync_err_steam_library">Steamライブラリを利用できません</string> <string name="game_sync_err_previous_sd">以前のSDライブラリを利用できません</string> <string name="game_sync_err_game_storage">ゲームストレージを利用できません</string> <string name="game_sync_err_added_games">追加したゲームのフォルダを利用できません</string> <string name="game_sync_err_manifests">Steamのマニフェストを利用できません</string> - - <!-- The systems RetroArch emulates, shown under its name --> <string name="content_system_many">多数のシステム</string> - - <!-- File manager --> <string name="fm_drive_internal">内部</string> <string name="fm_drive_linux">Linux システム</string> <string name="fm_drive_sd">SDカード</string> @@ -1386,8 +1415,6 @@ <string name="fm_no_favorites">お気に入りはまだありません。フォルダの⋮メニューからピン留めすると、すぐにここへ戻れます。</string> <string name="fm_unpin_favorite">お気に入りから削除</string> <string name="fm_size_zero">0バイト</string> - - <!-- Size unit for sizes under 1 KB, shown after a number --> <string name="fm_unit_bytes">バイト</string> <string name="fm_prop_location">場所</string> <string name="fm_prop_type">種類</string> @@ -1395,8 +1422,6 @@ <string name="fm_prop_modified">更新日時</string> <string name="fm_type_folder">フォルダ</string> <string name="fm_type_file">ファイル</string> - - <!-- File type in Properties; %1$s is the file extension in capitals, e.g. TXT --> <string name="fm_type_ext_file">%1$sファイル</string> <string name="fm_read_only">読み取り専用</string> <string name="fm_read_only_hint">ゲーム(およびWine)がこのファイルを上書き・削除できないようにします。</string> @@ -1410,19 +1435,11 @@ <string name="fm_delete_failed">削除に失敗しました</string> <string name="fm_op_moving">移動中...</string> <string name="fm_op_copying">コピー中...</string> - - <!-- %1$s is the file name --> <string name="fm_op_moving_item">移動中 - %1$s</string> <string name="fm_op_copying_item">コピー中 - %1$s</string> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_moving_batch">移動中 %1$d/%2$d - %3$s</string> <string name="fm_op_copying_batch">コピー中 %1$d/%2$d - %3$s</string> - - <!-- Paste result; %1$d items done, %2$d items failed --> <string name="fm_paste_failed">%1$d件完了、%2$d件失敗</string> - - <!-- Paste result; %1$d items done, %2$d items skipped --> <string name="fm_paste_skipped">%1$d件完了、%2$d件スキップ</string> <plurals name="fm_paste_moved"> <item quantity="other">%1$d個の項目を移動しました</item> @@ -1430,8 +1447,6 @@ <plurals name="fm_paste_copied"> <item quantity="other">%1$d個の項目をコピーしました</item> </plurals> - - <!-- %1$s is a file or folder name --> <string name="fm_already_exists">「%1$s」はすでに存在します</string> <string name="fm_op_renaming">名前を変更中...</string> <string name="fm_rename_failed">名前を変更できませんでした</string> @@ -1442,20 +1457,14 @@ <string name="fm_create">作成</string> <string name="fm_new_name">新しい名前</string> <string name="fm_delete_title">削除しますか?</string> - - <!-- %1$s is a file or folder name --> <string name="fm_delete_text">「%1$s」を完全に削除しますか?</string> <plurals name="fm_delete_items_title"> <item quantity="other">%1$d個の項目を削除しますか?</item> </plurals> <string name="fm_cannot_undo">この操作は元に戻せません。</string> - - <!-- After a list of the first five names in a delete confirmation --> <plurals name="fm_and_more"> <item quantity="other">…ほか%1$d件</item> </plurals> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_deleting_batch">削除中 %1$d/%2$d - %3$s</string> <plurals name="fm_delete_some_failed"> <item quantity="other">%1$d件を削除できませんでした</item> @@ -1469,8 +1478,6 @@ <string name="fm_conflict_skip">スキップ</string> <string name="fm_select_this_folder">このフォルダを選択</string> <string name="fm_back">戻る</string> - - <!-- %1$s is a storage name, e.g. SD card --> <string name="fm_drive_not_readable">%1$sはマウントされていますが、現在読み取れません</string> <string name="fm_list_view">リスト表示</string> <string name="fm_grid_view">グリッド表示</string> @@ -1485,51 +1492,31 @@ <string name="fm_hide_favorites">お気に入りを非表示</string> <string name="fm_show_favorites">お気に入りを表示</string> <string name="fm_filter_folder">このフォルダを絞り込み</string> - - <!-- Free space on the storage being browsed; %1$s is a size, e.g. 12.50 GB --> <string name="fm_free_space">空き %1$s</string> <string name="fm_selected_count">%1$d個選択中</string> - - <!-- Selection bar: clear the selection --> <string name="fm_select_none">解除</string> - - <!-- Selection bar: select every item --> <string name="fm_select_all">すべて</string> <string name="fm_paste">貼り付け</string> <plurals name="fm_items"> <item quantity="other">%1$d個の項目</item> </plurals> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_here">%1$sをここに貼り付け</string> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_move_here">%1$sをここに貼り付け(移動)</string> <string name="fm_rail_title">ファイル</string> <string name="fm_rail_storage">ストレージ</string> - - <!-- Rail section of shortcut folders (Downloads, ROMs, …) --> <string name="fm_rail_quick">クイック</string> <string name="fm_rail_favorites">お気に入り</string> <string name="fm_rail_downloads">ダウンロード</string> - - <!-- Downloads shortened to fit under an icon (about 8 characters) --> <string name="fm_rail_downloads_short">DL</string> <string name="fm_rail_roms">ROM</string> <string name="fm_rail_session_logs">セッションログ</string> <string name="fm_rail_pictures">画像</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_added">「%1$s」をお気に入りに追加しました</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_removed">「%1$s」をお気に入りから削除しました</string> <string name="fm_empty_directory">空のフォルダ</string> <string name="fm_up_one_level">1つ上の階層へ</string> <string name="fm_choose_folder">フォルダを選択</string> <string name="fm_choose_file">ファイルを選択</string> - - <!-- On-screen controller tint colors --> <string name="ctrl_tint_steam_blue">Steamブルー</string> <string name="ctrl_tint_sky">スカイ</string> <string name="ctrl_tint_white">ホワイト</string> @@ -1538,8 +1525,6 @@ <string name="ctrl_tint_amber">アンバー</string> <string name="ctrl_tint_red">レッド</string> <string name="ctrl_tint_pink">ピンク</string> - - <!-- On-screen buttons that can be remapped --> <string name="ctrl_button_a">Aボタン</string> <string name="ctrl_button_b">Bボタン</string> <string name="ctrl_button_x">Xボタン</string> @@ -1550,34 +1535,21 @@ <string name="ctrl_button_rt">右トリガー</string> <string name="ctrl_button_view">ビューボタン</string> <string name="ctrl_button_menu">メニューボタン</string> - - <!-- What a remapped on-screen button sends; letters and Steam are controller button names --> - - <!-- Controller View button --> <string name="ctrl_target_view">ビュー</string> - - <!-- Controller Menu button --> <string name="ctrl_target_menu">メニュー</string> <string name="ctrl_target_up">十字キー上</string> <string name="ctrl_target_down">十字キー下</string> <string name="ctrl_target_left">十字キー左</string> <string name="ctrl_target_right">十字キー右</string> - - <!-- The on-screen button is not shown --> <string name="ctrl_target_hidden">非表示</string> <string name="ctrl_editor_drag">ドラッグして移動</string> <string name="ctrl_editor_snap">スナップ</string> <string name="ctrl_editor_save">保存</string> - - <!-- What the second screen shows during a session --> <string name="second_mode_none">なし</string> <string name="second_mode_keyboard_trackpad">キーボード + トラックパッド</string> <string name="second_mode_terminal">ターミナル</string> <string name="second_mode_deck_controls">Deckグリップ + トラックパッド</string> - <!-- Runtime, updates and setup helpers --> - - <!-- Linux runtime install / removal (LinuxRuntimeInstaller, RuntimeInstallService) --> <string name="rtinst_removing">Linux実行環境を削除中</string> <plurals name="rtinst_removing_entries"> <item quantity="other">Linux実行環境を削除中 · %1$d項目</item> @@ -1592,75 +1564,47 @@ <string name="rtinst_title_installing">Linux実行環境をインストール中</string> <string name="rtinst_title_removing">Linux実行環境を削除中</string> - <!-- Hosted desktop and emulator packages (DesktopCatalog) --> <string name="deskpkg_runtime_missing">Linux実行環境がインストールされていません</string> - - <!-- %1$s: package name --> <string name="deskpkg_no_checksum">カタログに%1$sのチェックサムがありません</string> <string name="deskpkg_checksum_mismatch">チェックサムが一致しません - 何も変更されていません</string> - - <!-- %1$s: package name --> <string name="deskpkg_installing">%1$sをインストール中</string> <string name="deskpkg_place_failed">AppImageを配置できませんでした</string> <string name="deskpkg_extract_failed">展開に失敗しました</string> <string name="deskpkg_install_failed">インストールに失敗しました</string> - <!-- Flatpak store operations (FlatpakManager) --> <string name="flatpakmgr_setup_failed">Flatpakのセットアップに失敗しました(終了コード %1$d)</string> <string name="flatpakmgr_setup_unfinished">Flatpakのセットアップが完了しませんでした</string> <string name="flatpakmgr_busy">別のストアのタスクを実行中です</string> <string name="flatpakmgr_not_ready">先にFlatpakをセットアップしてください</string> <string name="flatpakmgr_starting">開始中</string> <string name="flatpakmgr_exit_status">Flatpakがステータス%1$dで終了しました</string> - - <!-- %1$s: an app or runtime name, e.g. "SuperTux" or "GNOME runtime 50" --> <string name="flatpakmgr_installing">%1$sをインストール中</string> <string name="flatpakmgr_updating">%1$sを更新中</string> <string name="flatpakmgr_removing">%1$sを削除中</string> - - <!-- %1$s: an app or runtime name; %2$d of %3$d: this step and the number of steps --> <string name="flatpakmgr_installing_step">%1$sをインストール中(%2$d/%3$d)</string> <string name="flatpakmgr_updating_step">%1$sを更新中(%2$d/%3$d)</string> <string name="flatpakmgr_removing_step">%1$sを削除中(%2$d/%3$d)</string> - - <!-- Names for Flatpak runtime parts, shown inside "Installing %1$s" --> <string name="flatpakmgr_ref_translations">翻訳</string> <string name="flatpakmgr_ref_graphics_drivers">グラフィックドライバー</string> <string name="flatpakmgr_ref_media_codecs">メディアコーデック</string> - - <!-- %1$s: runtime vendor, e.g. GNOME, KDE, Freedesktop --> <string name="flatpakmgr_ref_runtime">%1$sランタイム</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s実行環境 %2$s</string> - <!-- %1$s: runtime vendor, e.g. GNOME; %2$s: its version, e.g. 50 --> - <string name="flatpakmgr_ref_runtime_branch">%1$sランタイム %2$s</string> - - <!-- Imported AppImages (AppImageManager) --> <string name="appimg_too_small">ファイルが小さすぎるため、AppImageではありません</string> - - <!-- %1$s: the system's reason --> <string name="appimg_unreadable">ファイルを読み取れません:%1$s</string> <string name="appimg_not_linux">AppImageではありません(Linuxプログラムではありません)</string> <string name="appimg_wrong_arch">このAppImageはARM64(aarch64)向けでもx86 PC向けでもありません</string> <string name="appimg_not_appimage">Linuxプログラムですが、AppImageではありません</string> <string name="appimg_wrong_type">インポートできるのはタイプ2のAppImageのみです(このファイルはタイプ%1$d)</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_import">空き容量不足:インポートには約%1$sが必要です</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_update">空き容量不足:更新には約%1$sが必要です</string> <string name="appimg_import_failed">インポートに失敗しました</string> <string name="appimg_gone">このAppImageは存在しません</string> <string name="appimg_update_failed">更新に失敗しました</string> - - <!-- %1$s: file name --> <string name="appimg_extracting">%1$sを展開中</string> <string name="appimg_extract_failed">AppImageを展開できませんでした</string> - - <!-- %1$s: the last line the extractor printed --> <string name="appimg_extract_failed_detail">AppImageを展開できませんでした:%1$s</string> - <!-- Decky Loader and plugin installs (DeckyManager) --> <string name="deckymgr_stop_session_loader">Decky Loaderをインストールする前に、実行中のセッションを停止してください</string> <string name="deckymgr_download_failed">Decky Loaderのダウンロードに失敗しました</string> <string name="deckymgr_size_mismatch">Decky Loaderのサイズがリリース情報と一致しません</string> @@ -1696,27 +1640,13 @@ <string name="deckymgr_remote_entry_invalid">remote_binaryの項目が無効です</string> <string name="deckymgr_remote_name_invalid">リモートバイナリ名が無効です</string> <string name="deckymgr_remote_url_https">リモートバイナリのURLにはHTTPSを使用する必要があります</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_remote_hash_invalid">リモートバイナリ%1$sのSHA-256ハッシュが無効です</string> <string name="deckymgr_bin_dir_failed">プラグインのbinフォルダを作成できませんでした</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_downloading_binary">プラグインバイナリをダウンロード中 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_download_failed">プラグインバイナリ%1$sをダウンロードできませんでした</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_checksum_mismatch">プラグインバイナリのチェックサムが一致しません · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_not_executable">プラグインバイナリを実行可能にできませんでした · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_replace_failed">プラグインバイナリを置き換えられませんでした · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_install_failed">プラグインバイナリをインストールできませんでした · %1$s</string> <string name="deckymgr_folder_taken">このプラグインフォルダは別のプラグインが使用しています</string> <string name="deckymgr_preserve_failed">既存のプラグインを保持できませんでした</string> @@ -1724,24 +1654,14 @@ <string name="deckymgr_settings_failed">Deckyのプラグイン設定を更新できませんでした</string> <string name="deckymgr_restore_failed">既存のプラグインを復元できませんでした</string> - <!-- Child-process limit change over Wireless debugging (WirelessAdbFix) --> <string name="adbfix_save_failed">ワイヤレスデバッグの識別情報を保存できませんでした</string> - - <!-- %1$d: the command's exit status --> <string name="adbfix_command_failed">ADBコマンドに失敗しました(%1$d)</string> - - <!-- %1$s: what Android answered --> <string name="adbfix_not_confirmed">Androidは子プロセス制限の変更を確認しませんでした:%1$s</string> <string name="adbfix_no_pairing">ワイヤレスデバッグのペアリング情報が保存されていません</string> <string name="adbfix_enter_address">現在のワイヤレスデバッグのIPアドレスとポートを入力してください</string> - <!-- Wireless debugging pairing notification (WirelessAdbPairingService) --> <string name="adbpair_timed_out">ペアリングのポップアップを待機中にタイムアウトしました。DroidDeckからもう一度お試しください。</string> - - <!-- %1$d: Android's error code --> <string name="adbpair_discovery_failed_code">ペアリングのポップアップを検索できませんでした(%1$d)。Wi-Fiがオンになっているか確認してください。</string> - - <!-- %1$s: the system's reason --> <string name="adbpair_discovery_failed">ペアリングのポップアップを検索できませんでした:%1$s</string> <string name="adbpair_six_digits">6桁のコードをすべて入力してください</string> <string name="adbpair_pairing">ペアリング中…</string> @@ -1755,31 +1675,22 @@ <string name="adbpair_title_pair">ワイヤレスデバッグのペアリング</string> <string name="adbpair_waiting_text">ワイヤレスデバッグをオンにして、「ペアリングコードでデバイスをペア設定」をタップしてください。</string> <string name="adbpair_waiting_long">ワイヤレスデバッグをオンにして、「ペアリングコードでデバイスをペア設定」をタップしてください。設定画面のままにしてください:コードはこの通知に入力します。</string> - - <!-- Label of the notification's reply field --> <string name="adbpair_code_label">6桁のペアリングコード</string> <string name="adbpair_code_hint">「コードを入力」をタップし、設定に表示された6桁の数字を入力してください。</string> <string name="adbpair_title_code">Wi-Fiペアリングコードを入力</string> <string name="adbpair_title_retry">コードをもう一度入力</string> - - <!-- Notification action button --> <string name="adbpair_enter_code">コードを入力</string> <string name="adbpair_title_working">Steamをセットアップ中</string> <string name="adbpair_title_done">Steamの準備ができました</string> <string name="adbpair_done_text">タップしてDroidDeckに戻ります。ワイヤレスデバッグはオフにしてかまいません。</string> <string name="adbpair_title_failed">ワイヤレスデバッグのセットアップが中断しました</string> - <!-- DroidDeck's own updates (SelfInstaller, AppUpdates) --> - <string name="selfinst_http">ダウンロード先がHTTP %1$dを返しました</string> + <string name="selfinst_download_failed">ダウンロードに失敗しました</string> <string name="selfinst_size_mismatch">ダウンロードしたファイルのサイズが公開されているAPKと一致しないため、破棄しました。もう一度お試しください</string> <string name="selfinst_checksum_mismatch">ダウンロードしたファイルがチェックサムと一致しないため、破棄しました。もう一度お試しください</string> - - <!-- %1$s: the update's Android package name; %2$s: this app's --> <string name="selfinst_wrong_package">このアップデートはAndroidパッケージ%1$s用で、%2$s用ではありません</string> <string name="selfinst_metadata_signer">アップデート情報にDroidDeckのリリース署名キーが記載されていません</string> <string name="selfinst_unreadable">AndroidがダウンロードしたAPKを読み取れませんでした</string> - - <!-- %1$s: the APK's Android package name; %2$s: this app's --> <string name="selfinst_apk_wrong_package">ダウンロードしたAPKは%1$s用で、%2$s用ではありません</string> <string name="selfinst_version_mismatch">ダウンロードしたAPKのversionCodeは%1$dで、公開されている%2$dと一致しません</string> <string name="selfinst_downgrade">AndroidはインストールされているversionCode %2$dの上に%1$dをインストールしません</string> @@ -1787,19 +1698,11 @@ <string name="selfinst_wrong_signer">ダウンロードしたAPKはDroidDeckのリリースキーで署名されていません</string> <string name="appupd_http">アップデートカタログがHTTP %1$dを返しました</string> - <!-- Session, GPU and display --> - - <!-- Session loading screen --> <string name="loadstate_starting">セッションを開始中…</string> - - <!-- %1$d minutes, %2$02d seconds since the session started --> <string name="loadstate_elapsed">%1$d:%2$02d 経過 · 処理中</string> <string name="loadstate_steam_update">Steamクライアントのアップデートをダウンロード中 · %1$d%%</string> - - <!-- %1$s is the client's own download progress, as it prints it --> <string name="loadstate_steam_client">Steamクライアントをダウンロード中 · %1$s</string> - <!-- Installing GE-Proton / proton-cachyos (%1$s is the tool's name, %2$s its release tag) --> <string name="pextra_busy">互換性ツールのインストールはすでに実行中です</string> <string name="pextra_stop_session">互換性ツールをインストールする前に、実行中のセッションを停止してください</string> <string name="pextra_no_release">%1$sのARM64リリースが見つかりませんでした</string> @@ -1816,55 +1719,38 @@ <string name="pextra_checksum_mismatch">チェックサムが一致しないため、ダウンロードを削除しました</string> <string name="pextra_session_started">ダウンロード中にセッションが開始されました。停止してから互換性ツールをインストールしてください</string> <string name="pextra_installing">%1$sをインストール中</string> - - <!-- %2$d is the installer's exit status --> <string name="pextra_install_failed">%1$sのインストールに失敗しました(終了コード %2$d)</string> <string name="pextra_could_not_install">%1$sをインストールできませんでした</string> <string name="esync_fetching">droiddeck-esyncパックを取得中</string> - <!-- Components (FEX / DXVK / VKD3D-Proton swapped into a Proton). %1$s component, %2$s version, %3$s Proton --> <string name="cmgr_fex_linux_helpers">Linux補助プログラム付き</string> <string name="cmgr_fex_dlls_only">DLLのみ</string> <string name="cmgr_original_proton_updated">元(前回の置き換え以降にProtonが更新されました)</string> <string name="cmgr_changed_outside">「コンポーネント」以外で変更されました</string> - - <!-- A component version that could not be found in a Proton --> <string name="cmgr_not_present">なし</string> - - <!-- %1$s is the Proton build the original files were saved from --> <string name="cmgr_original_version">元 %1$s</string> <string name="cmgr_original_from">%1$sの元のファイル</string> <string name="cmgr_swap_queued">%3$sで実行中のゲームが終了すると、%1$s %2$sがそこに入ります。</string> <string name="cmgr_swap_done">%1$s %2$sが%3$sに入りました。次回のゲーム起動時に有効になります。</string> <string name="cmgr_original_missing">その元のバンドルは保存されていません</string> - - <!-- %1$s component, %2$s Proton --> <string name="cmgr_restore_queued">%2$sで実行中のゲームが終了すると、その%1$sが元に戻ります。</string> - - <!-- %1$s component, %2$s Proton, %3$s the Proton build the original came from --> <string name="cmgr_restore_done">%2$sの%1$sを%3$sの元のファイルから復元しました。</string> - - <!-- %1$s package file, %2$s Proton id --> <string name="cmgr_package_in_use">%1$sは%2$sで使用中です。先にそのProtonを別のものに置き換えてください。</string> <string name="cmgr_package_not_stored">%1$sは保存されていません</string> <string name="cmgr_deleted">%1$sを削除しました。</string> <string name="cmgr_original_kept">インストール済みビルドの元のファイルは、元に戻すために保持されます。</string> <string name="cmgr_not_stored">保存されていません</string> - - <!-- %1$s Proton build, %2$s component --> <string name="cmgr_deleted_original">%2$sの%1$s版の元のファイルを削除しました。</string> <string name="cmgr_nightlies_only">ダウンロードはNightliesのリリースからのみ行われます</string> <string name="cmgr_list_predates_checksums">このパッケージ一覧はチェックサム導入前のものです。更新してからもう一度お試しください</string> <string name="cmgr_checksum_mismatch">チェックサムが一致しません</string> - <!-- Display choices --> <string name="sprefs_upscaler_linear">リニア</string> <string name="sprefs_upscaler_nearest">ニアレスト</string> <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR(品質)</string> <string name="sprefs_upscaler_sharpen">シャープのみ</string> <string name="sprefs_lod_bias_auto">自動(スケーリングに合わせる)</string> - <!-- Screen effect Looks: preset names and the line under the row --> <string name="look_off_desc">何も適用されません。</string> <string name="look_game_clarity">ゲームクラリティ</string> <string name="look_game_clarity_desc">シャープ化に少しコントラストを加えた、普段使い向け。</string> @@ -1889,29 +1775,23 @@ <string name="look_anime_edge">アニメエッジ</string> <string name="look_anime_edge_desc">トゥーン輪郭線とシャープ化。</string> - <!-- GPU support line --> <string name="gpuinfo_not_adreno">Adreno GPUではありません</string> <string name="gpuinfo_supported">サポート対象</string> <string name="gpuinfo_experimental">実験的:ドライバーはテストビルドです</string> <string name="gpuinfo_below_tested">テスト済みハードウェア(Adreno 725以降)未満:動作しない可能性があります</string> <string name="gpuinfo_unsupported">サポート対象外:DroidDeckにはAdreno(Snapdragon)GPUが必要です</string> - <!-- Driver downloads and imports --> <string name="turnip_rate_limited">GitHubのレート制限に達しました。後でもう一度お試しください</string> <string name="turnip_github_http">GitHubがHTTP %1$dを返しました</string> - <string name="turnip_download_http">ダウンロード先がHTTP %1$dを返しました</string> + <string name="turnip_download_failed">ダウンロードに失敗しました</string> <string name="turnip_list_predates_checksums">このドライバー一覧はチェックサム導入前のものです。更新してからもう一度お試しください</string> <string name="turnip_checksum_mismatch">チェックサムが一致しないため、ダウンロードを破棄しました</string> - - <!-- %1$s is one of the turnip_reject_* reasons --> <string name="turnip_not_adrenotools">AdrenoToolsドライバーではありません:%1$s</string> <string name="turnip_reject_no_meta">meta.jsonがありません</string> <string name="turnip_reject_meta_unreadable">meta.jsonを読み取れません(%1$s)</string> <string name="turnip_reject_linux_driver">これはLinuxランタイムドライバーです(「ランタイムドライバー」でインポートしてください)</string> <string name="turnip_reject_wayland">これはWaylandゲーム用ドライバーで、このアプリでは使用しません</string> <string name="turnip_reject_no_library_name">meta.jsonにlibraryNameが指定されていないため、AdrenoToolsに渡せるものがありません</string> - - <!-- %1$s is a library file name --> <string name="turnip_reject_library_missing">meta.jsonで指定された%1$sがzipに含まれていません</string> <string name="turnip_reject_not_aarch64">%1$sは64ビットAArch64 ELF共有ライブラリではありません</string> <string name="turnip_reject_glibc">%1$sはglibcにリンクしています。これは「-Linux」Turnipなので、「ランタイムドライバー」でインポートしてください</string> @@ -1922,115 +1802,61 @@ <string name="bundle_entry_outside">ドライバーバンドルではありません:%1$sがバンドルの外を指しています</string> <string name="bundle_too_large">ドライバーバンドルではありません:展開後のサイズが%1$d MBを超えます</string> - <!-- Game storage --> <string name="gstore_sd_card">SDカード</string> - - <!-- %1$s is a size, like 12.3 GB --> <string name="gstore_folder">フォルダ</string> + <string name="logshare_chooser">セッションログを共有</string> - <!-- Stands in for the Steam account name when the client did not record one --> - - <!-- Why the HDR switch is greyed out --> <string name="hdr_needs_android_10">Android 10以降が必要です(色空間付きのディスプレイレイヤー)</string> <string name="hdr_none">このディスプレイはHDRに対応していません</string> - - <!-- %1$s lists HDR formats, like Dolby Vision, HDR10+ --> <string name="hdr_not_hdr10">このディスプレイは%1$sに対応していますが、HDR10には対応していません</string> - <!-- Follow-up --> - - <!-- Stands in for the GPU name when the device does not report one --> <string name="gpu_this_gpu">このGPU</string> <string name="phantom_title_on">子プロセス制限がオンです</string> <string name="phantom_title_unset">子プロセス制限が未設定です</string> <string name="phantom_title_unreadable">子プロセス制限を確認できませんでした</string> <string name="phantom_title_off">子プロセス制限はオフです</string> <string name="phantom_title_not_required">子プロセス制限の変更は不要です</string> - - <!-- %1$s is the sentence saying how to turn the limit off on this device --> <string name="phantom_instructions_fix">%1$s それができない場合は、このデバイスをADBが使えるPCに接続し、以下のコマンドを実行してください。その後ここに戻って再確認してください。</string> <string name="phantom_instructions_off">Steamセッションを開始できます。</string> <string name="phantom_instructions_not_applicable">このAndroidバージョンではこの制限は使用されません。</string> - <string name="phantom_fix_toggle">開発者向けオプションで「子プロセス制限を無効にする」をオンにし、その後も開発者向けオプションをオンのままにしてください。</string> + <string name="phantom_fix_toggle">開発者向けオプションで「子プロセスの制限を無効化」をオンにし、その後も開発者向けオプションをオンのままにしてください。</string> <string name="phantom_fix_no_toggle">このAndroidバージョンにはこのスイッチがありません。ワイヤレスデバッグを使って、このデバイスから変更してください。</string> <string name="upd_block_no_apk">このビルドには、このDroidDeckコピー用のダウンロードがありません。</string> - - <!-- %1$d is the offered build's versionCode, %2$d the installed one's --> <string name="upd_block_version_code">このビルドのversionCode %1$dはインストール済みの%2$dより小さいため、Androidは上書きインストールしません。</string> <string name="upd_fail_downgrade">Androidは新しいバージョンの上に古いバージョンをインストールしません。チャンネルが追いつくまで、このビルドを使い続けてください。</string> <string name="upd_fail_signature">このDroidDeckコピーは署名が異なる(ローカルビルド?)ため、Androidは上書き更新しません。</string> <string name="upd_fail_storage">アップデートに必要な空き容量が不足しています。</string> <string name="upd_fail_aborted">アップデートはキャンセルされました。</string> - - <!-- %1$s is Android's own (English) installer message --> <string name="upd_fail_with_message">アップデートをインストールできませんでした:%1$s</string> <string name="upd_fail_generic">アップデートをインストールできませんでした。</string> - - <!-- A save zip's layout; %1$s is the app it comes from (GameHub, Winlator) --> <string name="saves_layout_zip">%1$s zip</string> - - <!-- A save zip whose layout is not known --> <string name="saves_zip">zip</string> - - <!-- %1$s is the game's name --> <string name="saves_not_launched">%1$sはまだ起動されていません</string> <string name="saves_none_found">%1$sのセーブファイルが見つかりません</string> - - <!-- %1$s is the zip's file name --> <string name="saves_not_save_zip">%1$sにはdrive_cフォルダがないため、GameHubまたはWinlatorのセーブデータzipではありません</string> - - <!-- %1$s is a folder path --> <string name="gstore_cannot_create">%1$sにフォルダを作成できません</string> <string name="gstore_cannot_write">%1$sに書き込めません</string> - - <!-- %1$s is a folder path, %2$s the system's error --> <string name="gstore_cannot_write_detail">%1$sに書き込めません(%2$s)</string> <string name="gfiles_folder_unavailable">フォルダを利用できません</string> - - <!-- %1$s is a file name --> <string name="gfiles_name_taken">%1$sは別のファイルがすでに使用しています</string> <string name="gfiles_art_unavailable">画像フォルダを利用できません</string> <string name="gfiles_unrelated_inventory">フォルダに無関係な同期情報があります</string> - - <!-- %1$s is a file name --> <string name="gfiles_remove_failed">%1$sを削除できませんでした</string> <string name="gfiles_outside_folder">ファイルがエクスポートフォルダの外を指しています</string> - - <!-- A FEX build whose DLL carries no version name --> <string name="cmgr_fex_unnamed">FEX(バージョン名のないビルド)</string> - - <!-- %1$s is a package file name --> <string name="cmgr_no_profile">%1$sにprofile.jsonがありません</string> - - <!-- %1$s is a package file name, %2$s the type its profile.json gives --> <string name="cmgr_not_component_package">%1$sはLinuxコンポーネントパッケージではありません(タイプ %2$s)</string> - - <!-- A storage volume in the second-library menu; %1$s is its name, %2$s its free space, like 12.3 GB --> <string name="gstore_volume_free">%1$s · 空き %2$s</string> - - <!-- The second-library setting's value when it is automatic (short form of mode_storage_auto) --> <string name="mode_storage_auto_short">自動</string> - - <!-- %1$s is the technical reason, kept in English --> <string name="appupd_catalog_rejected">アップデートカタログの検証に失敗しました(%1$s)</string> - - <!-- Label of the copied ADB command on the clipboard --> <string name="main_adb_clip_label">DroidDeckの子プロセス設定</string> - - <!-- Signed in, but the Steam client recorded no account name --> <string name="setup_signed_in_offline_unnamed">ログイン中 · オフラインモード</string> <string name="setup_signed_in_unnamed">ログイン中</string> - - <!-- Small uppercase tags beside a driver's name: where it came from --> <string name="driver_tag_bundled">同梱</string> <string name="driver_tag_downloaded">ダウンロード</string> <string name="driver_tag_imported">インポート</string> - - <!-- The driver is one half of a bundle that sets both drivers --> <string name="driver_tag_bundle">ANDROID + LINUX</string> - - <!-- %1$s is the limit's state (e.g. Child-process limit is on), %2$s what to do, %3$s the ADB command --> <string name="phantom_warning">%1$s。%2$s\n\n%3$s</string> <string name="display_session">セッションの表示</string> <string name="display_resolution">解像度</string> @@ -2048,6 +1874,7 @@ <string name="display_frame_rate">フレームレート</string> <string name="display_look_filter">%1$s スケーリングを%2$sに設定します。</string> <string name="display_match_screen">画面に合わせる(%1$d×%2$d)</string> + <string name="display_follow_screen">画面に追従(開閉時にサイズを変更)</string> <string name="mode_tab_steam">Steam</string> <string name="device_info_show">デバイスの詳細を表示</string> <string name="device_info_hide">デバイスの詳細を非表示</string> @@ -2057,23 +1884,245 @@ <string name="device_info_copied">コピーしました。</string> <string name="force_ssbs_title">SSBSを強制</string> <string name="force_ssbs_hint">Wineがオフにし続けるCPUの速度設定をオンに保ちます。Snapdragon 8 EliteではWindowsゲームが速くなることがあります。古いチップではほとんど変化がありません。次のゲーム起動時に反映されます。</string> + + <string name="rail_stores">ストア</string> + <string name="source_steam">Steam</string> + <string name="source_added">カスタム</string> + <string name="setup_stores">ストア</string> + <string name="setup_stores_open_on">ストアページを開くときの初期タブ</string> + <string name="setup_stores_speed">ダウンロード速度レベル</string> + <string name="setup_stores_engine">ストアエンジン</string> + <string name="setup_stores_engine_chip_ready">● エンジン準備完了</string> + <string name="setup_stores_engine_chip_missing">未ビルド</string> + <string name="stores_tier_balanced">バランス</string> + <string name="stores_tier_fast">高速</string> + <string name="stores_tier_max">最大</string> + <string name="stores_title">ストア</string> + <string name="stores_settings">ストア設定</string> + <string name="stores_settings_eyebrow">設定</string> + <string name="stores_chip_signed_out">(未ログイン)</string> + <string name="stores_tab_store">ストア</string> + <string name="stores_tab_installed">インストール済み</string> + <string name="stores_tab_library">ライブラリ</string> + <string name="stores_tab_all">すべて</string> + <string name="stores_tab_downloads">ダウンロード</string> + <string name="stores_tab_count">%1$s(%2$d)</string> + <string name="stores_signin">ログイン</string> + <string name="stores_signout_named">%1$s · ログアウト</string> + <string name="stores_signout_title">%1$sからログアウトしますか?</string> + <string name="stores_signout_note">インストール済みのゲームは残ります。再度ログインすると、ライブラリをもう一度取得します。</string> + <string name="stores_signout_stay">ログインしたままにする</string> + <string name="stores_signout_go">ログアウト</string> + <string name="stores_search_catalog">%1$sのカタログを検索…</string> + <string name="stores_search_installed">インストール済みのゲームを検索…</string> + <string name="stores_search_library">ライブラリを検索…</string> + <string name="stores_search_open">検索</string> + <string name="stores_installed_empty">何もインストールされていません</string> + <string name="stores_library_loading">読み込み中</string> + <string name="stores_nothing_matches">ゲームがありません</string> + <string name="stores_shelves_loading">ストアを読み込み中…</string> + <string name="stores_amazon_no_catalog">カタログなし</string> + <string name="stores_shelf_new">新着</string> + <string name="stores_shelf_deals">セール</string> + <string name="stores_shelf_free">無料ゲーム</string> + <string name="stores_shelf_trending">トレンド</string> + <string name="stores_shelf_library">マイライブラリ</string> + <string name="stores_play">プレイ</string> + <string name="stores_install">インストール</string> + <string name="stores_resume_install">インストールを再開</string> + <string name="stores_dl_interrupted">中断</string> + <string name="stores_install_size">インストール · %1$s</string> + <string name="stores_get_free">無料で入手</string> + <string name="stores_view_on">%1$sで見る</string> + <string name="stores_buy_price">購入 · %1$s</string> + <string name="stores_installed_chip">インストール済み</string> + <string name="stores_in_library">ライブラリにあり</string> + <string name="stores_free">無料</string> + <string name="stores_resume">再開</string> + <string name="stores_refresh">更新</string> + <string name="stores_sort">並べ替え</string> + <string name="stores_sort_last_played">最近プレイ</string> + <string name="stores_sort_recently_installed">最近インストール</string> + <string name="stores_sort_title_asc">タイトル A–Z</string> + <string name="stores_sort_title_desc">タイトル Z–A</string> + <string name="stores_sort_size_desc">サイズ: 大きい順</string> + <string name="stores_sort_size_asc">サイズ: 小さい順</string> + <string name="stores_sort_release_date">リリース日</string> + <string name="stores_view_list">リスト表示</string> + <string name="stores_view_cards">カード表示</string> + <string name="stores_show_mature">成人向けコンテンツを表示</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">オフライン</string> + <string name="epic_card_none">オフ</string> + <string name="epic_eos">Epicログイン(EOS)</string> + <string name="epic_offline">オフラインで起動</string> + <string name="epic_resolve">Epicログインの問題を解決</string> + <string name="epic_client_version">バージョン %1$s</string> + <string name="epic_client_no_runtime">先にLinux実行環境をインストールしてください</string> + <string name="epic_client_checking">最新バージョンを確認中…</string> + <string name="epic_client_unpacking">展開中…</string> + <string name="epic_client_unreachable">ダウンロードサーバーが応答しませんでした</string> + <string name="epic_client_needs_fex">Epic Games Launcher には FEX が必要です。FEX は Steam がダウンロードします。Steam の起動後にもう一度ランチャーを開いてください。</string> + <string name="epic_client_download_failed">ダウンロードに失敗しました:%1$s</string> + <string name="epic_client_unpack_failed">ランチャーを展開できませんでした:%1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcherがサインインを受け付けませんでした。ランチャーからもう一度起動してください。</string> + <string name="epic_client_uninstall_body">ランチャーを削除して容量を空けます。Epicのゲームはインストールされたまま動作し、サインインは再インストール時のために保持されます。</string> + <string name="epic_client_uninstall_stops">実行中のセッションを先に終了します。</string> + <string name="epic_client_uninstalled">Epic Games Launcherをアンインストールしました</string> + <string name="epic_client_uninstall_failed">ランチャーの一部のファイルを削除できませんでした。もう一度お試しください。</string> + <string name="epic_client_uninstalling">Epic Games Launcher のアンインストールが終わるまでお待ちください</string> + <string name="store_cloud_saves">クラウドセーブ</string> + <string name="cloud_upload">クラウドにアップロード</string> + <string name="cloud_download">クラウドからダウンロード</string> + <string name="cloud_none">クラウドセーブなし</string> + <string name="cloud_conflict">クラウドの競合</string> + <string name="cloud_conflict_files">クラウドの競合 · %1$d個のファイル</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">クラウドを残す</string> + <string name="cloud_keep_local">ローカルを残す</string> + <string name="cloud_checking">クラウドを確認中…</string> + <string name="cloud_last_sync">最終同期 %1$s</string> + <string name="cloud_never">未同期</string> + <string name="cloud_done">%1$d個のファイル</string> + <string name="stores_eyebrow_installed">インストール済み</string> + <string name="stores_eyebrow_library">ライブラリ内</string> + <string name="stores_eyebrow_store">ストア</string> + <string name="achievements_title">実績</string> + <string name="achievements_count">%2$d 個中 %1$d 個を解除</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">解除済み · %1$d</string> + <string name="achievements_group_locked">未解除 · %1$d</string> + <string name="achievements_group_hidden">隠し実績 · %1$d</string> + <string name="achievements_hidden">隠し実績</string> + <string name="achievements_hidden_detail">解除すると詳細が表示されます。</string> + <string name="achievements_all">すべての実績を解除</string> + <string name="achievements_reading">読み込み中…</string> + <string name="achievements_signed_out">実績を表示するには %1$s にサインインしてください。</string> + <string name="achievements_unreachable">%1$s に接続できませんでした。オンラインになってから再度確認してください。</string> + <string name="achievements_none">%1$s にはこのゲームの実績がありません。</string> + <string name="achievements_show_all">すべて表示(%1$d)</string> + <string name="achievements_dialog_title">実績 · %1$s</string> + <string name="stores_in_steam">✓ Steamに追加済み</string> + <string name="stores_uninstall">アンインストール</string> + <string name="stores_uninstalling">アンインストール中…</string> + <string name="stores_uninstall_title">%1$sをアンインストールしますか?</string> + <string name="stores_uninstall_body_size">%1$sの空き容量を確保し、Steamから削除します。</string> + <string name="stores_uninstall_body">ファイルとSteamのショートカットを削除します。</string> + <string name="stores_launch_not_registered">Steamは次回の起動時にこのゲームを認識します。Steamから起動するか、今すぐSteamを起動してください。</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">ゲームごとにSteamが選択</string> + <string name="stores_card_audio">オーディオ</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">コンポーネント</string> + <string name="stores_card_components_value">FEX、DXVK、VKD3D</string> + <string name="stores_card_engine">エンジン</string> + <string name="stores_card_engine_value">%1$s · ネイティブ</string> + <string name="stores_card_engine_java">%1$s · 内蔵</string> + <string name="stores_how_it_runs">実行の仕組み</string> + <string name="stores_kv_fetched">取得元</string> + <string name="stores_kv_fetched_value">%1$s(あなたのアカウントで取得)</string> + <string name="stores_kv_installed_to">インストール先</string> + <string name="stores_kv_installed_to_value">ゲームストレージ(Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">起動方法</string> + <string name="stores_kv_launched_by_value">SteamとProton(Steamゲームと同じ経路)</string> + <string name="stores_kv_launched_by_epic">SteamとProton · 起動ごとにEpicログイン、EOSオーバーレイはオフ</string> + <string name="stores_kv_launched_by_amazon">SteamとProton · Amazon Games Servicesの変数を設定</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">インストール時にSteamに追加(Deck UI + Steam Input)</string> + <string name="stores_downloads_empty">ダウンロードはありません</string> + <string name="stores_dl_paused">一時停止中</string> + <string name="stores_dl_queued">待機中</string> + <string name="stores_dl_queued_at">待機中 · #%1$d</string> + <string name="stores_dl_cancelled">キャンセル済み</string> + <string name="stores_dl_failed">失敗</string> + <string name="stores_dl_failed_reason">失敗 · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">一時停止</string> + <string name="stores_dl_resume">再開</string> + <string name="stores_dl_cancel">キャンセル</string> + <string name="stores_dl_retry">再試行</string> + <string name="stores_dl_clear">消去</string> + <string name="stores_dl_clear_all">完了分を消去</string> + <string name="stores_stage_manifest">マニフェスト</string> + <string name="stores_stage_download">ダウンロード</string> + <string name="stores_stage_verify">検証</string> + <string name="stores_stage_install">インストール</string> + <string name="stores_stage_done">完了</string> + <string name="stores_stage_checking">確認中</string> + <string name="stores_stage_downloading">ダウンロード中</string> + <string name="stores_dl_cancel_confirm">ダウンロードを削除しますか?</string> + <string name="stores_dl_failed_kept">失敗 · %1$sを保持</string> + <string name="stores_stage_verifying">検証中</string> + <string name="stores_stage_installing">インストール中</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">ファイル %1$d/%2$d</string> + <string name="stores_download_manager">ダウンロードマネージャー</string> + <string name="stores_parallel">同時ダウンロード数</string> + <string name="stores_install_where">インストール先</string> + <string name="stores_install_title">%1$sをインストール:</string> + <string name="stores_target_internal">内部ストレージ</string> + <string name="stores_target_free">空き %1$s</string> + <string name="stores_target_free_unknown">空き容量が不明</string> + <string name="stores_storage_insufficient">空き容量が不足しています:%1$s 必要、残り %2$s</string> + <string name="stores_storage_low">容量が不足しています(空き %1$s、必要 %2$s)</string> + <string name="stores_notification_channel">ストアのダウンロード</string> + <string name="stores_notification_channel_hint">ゲームのダウンロードの進行状況を表示し、バックグラウンドでダウンロードを継続します</string> + <string name="stores_notification_one">ダウンロード中</string> + <string name="stores_notification_many">%1$d件のダウンロード</string> + <string name="stores_notification_waiting">準備中…</string> + <string name="stores_notification_done_channel">完了したストアのダウンロード</string> + <string name="stores_notification_installed">%1$sをインストールしました</string> + <string name="stores_notification_failed">%1$sのダウンロードに失敗しました</string> + <string name="stores_notification_delete">削除</string> + <string name="stores_notification_keep">保持</string> + <string name="stores_login_title">%1$sにログイン</string> + <string name="stores_login_provider_title">プロバイダーでログイン</string> + <string name="stores_login_reload">再読み込み</string> + <string name="stores_login_close">閉じる</string> + <string name="stores_login_retry">再試行</string> + <string name="stores_login_finishing">ログインを完了しています…</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> + <string name="stores_login_error_ssl">ログインページへの接続は安全ではありません。</string> + <string name="stores_login_error_verification">ログインを確認できませんでした。もう一度お試しください。</string> + <string name="stores_login_error_generic">ログインに失敗しました。もう一度お試しください。</string> <string name="common_close">閉じる</string> <string name="common_back">戻る</string> <string name="common_edit">編集</string> - <string name="games_add_all">このフォルダーのゲームをすべて追加</string> - <string name="games_added_none">このフォルダーに新しいゲームはありません</string> + <string name="games_add_all">このフォルダのゲームをすべて追加</string> + <string name="games_added_none">このフォルダに新しいゲームはありません</string> <string name="edit_name">名前</string> <string name="edit_target">ターゲット</string> - <string name="edit_start_in">開始フォルダー</string> + <string name="edit_start_in">開始フォルダ</string> <string name="edit_launch_options">起動オプション</string> <string name="edit_artwork">アートワーク</string> <string name="edit_other_exe">別の exe…</string> <string name="edit_remove">削除</string> <string name="art_cover">カバー</string> + <string name="art_wide_cover">ワイドカバー</string> + <string name="art_adjust_logo">ロゴを調整</string> + <string name="logo_pos_default">既定</string> + <string name="logo_pos_upper_left">左上</string> + <string name="logo_pos_upper_center">中央上</string> + <string name="logo_pos_center">中央</string> + <string name="logo_pos_bottom_left">左下</string> + <string name="logo_pos_bottom_center">中央下</string> + <string name="logo_pos_position">位置</string> + <string name="logo_pos_size">サイズ</string> + <string name="logo_pos_save">保存</string> + <string name="logo_pos_reset">既定に戻す</string> + <string name="logo_pos_hint">ゲームの背景に、Steam と同じ方法で描画されます。位置が数ピクセルずれることがあります。</string> + <string name="logo_pos_no_logo">このゲームにはまだロゴがありません。ロゴでいずれかを選ぶとここに表示されます。</string> + <string name="logo_pos_failed">ロゴの位置を保存できませんでした。もう一度お試しください。</string> <string name="art_background">背景</string> <string name="art_logo">ロゴ</string> <string name="art_icon">アイコン</string> - <string name="art_src_folder">ゲームフォルダー</string> + <string name="art_src_folder">ゲームフォルダ</string> <string name="art_src_steam">Steam</string> <string name="art_src_sgdb">SteamGridDB</string> <string name="art_src_file">自分のファイル</string> @@ -2082,10 +2131,732 @@ <string name="art_pick_image">画像を選択…</string> <string name="art_pick_title">画像を選択: %1$s</string> <string name="art_reset">自動に戻す</string> + <string name="art_search_sgdb">SteamGridDB を検索…</string> + <string name="art_sgdb_title">SteamGridDB:%1$s</string> + <string name="art_sgdb_search_label">ゲームを検索</string> + <string name="art_sgdb_other_games">その他の一致</string> + <string name="art_sgdb_none">見つかりません。</string> + <string name="art_sgdb_no_key">SteamGridDB には API キーが必要です。設定 › ランチャーで追加してください。</string> + <string name="art_sgdb_bad_key">SteamGridDB がこの API キーを受け付けませんでした。設定 › ランチャーで確認してください。</string> + <string name="art_sgdb_limit">SteamGridDB が現在リクエストを制限しています。しばらくしてからお試しください。</string> + <string name="art_sgdb_offline">SteamGridDB に接続できません。ネットワーク接続を確認してください。</string> + <string name="art_sgdb_server">SteamGridDB で問題が発生しました。しばらくしてからお試しください。</string> + <string name="art_sgdb_no_game">SteamGridDB にこのゲームの一致がありません。検索をお試しください。</string> <plurals name="games_added_n"> <item quantity="other">%1$d 本のゲームを追加しました</item> </plurals> <plurals name="games_already_n"> <item quantity="other">%1$d 本はすでにゲームにあります</item> </plurals> + <string name="hop_back">B · %1$sに戻る</string> + <string name="hop_from_games">ゲーム</string> + <string name="hop_from_play">プレイ設定</string> + <string name="sheet_graphics_drivers">グラフィックドライバー</string> + <string name="comp_this_proton">このProton</string> + <string name="comp_every_proton">すべてのProton</string> + <string name="comp_for_every_proton">すべてのProtonに適用</string> + <string name="comp_available_count">利用可能 · %1$d</string> + <string name="comp_checked">確認日時 %1$s</string> + <string name="comp_check_all">新しいコンポーネントとドライバーを確認</string> + <string name="comp_get">入手</string> + <string name="comp_proton_bar">%1$s · 以下のDXVK、VKD3D-Proton、FEXはこのProtonのものです</string> + <string name="comp_device_tested">%1$s · テスト済み</string> + <string name="comp_device_untested">%1$s · 未テスト</string> + <string name="comp_device_unsupported">%1$s · サポート外</string> + <string name="gpu_auto_keeps">推奨の組み合わせを最新に保ちます</string> + <string name="gpu_bar_auto">自動 · %1$s</string> + <string name="gpu_separately">ランタイムドライバーとディスプレイドライバーを個別に設定</string> + <string name="gpu_use_title">%1$sを使用しますか?</string> + <string name="gpu_mode_title">ドライバーの選び方</string> + <string name="gpu_mode_auto_detail">この GPU に最適な組み合わせを自動で選び、最新に保ちます</string> + <string name="gpu_mode_pair">組み合わせ</string> + <string name="gpu_mode_pair_detail">1 つの組み合わせを選び、両方のドライバーをまとめて設定します</string> + <string name="gpu_mode_mix">個別に選ぶ</string> + <string name="gpu_mode_mix_detail">ディスプレイドライバーとランタイムドライバーを別々に選びます</string> + <string name="gpu_mode_pair_short">ペア</string> + <string name="gpu_mode_mix_short">個別</string> + <string name="gpu_src_auto">自動</string> + <string name="gpu_src_pair">ペア</string> + <string name="gpu_src_bundle">内蔵</string> + <string name="gpu_src_chosen">選択済み</string> + <string name="gpu_src_by_gpu">GPU 別</string> + <string name="gpu_src_default">既定</string> + <string name="gpu_display_live">描画中</string> + <string name="gpu_display_pending">再起動待ち · 現在は %1$s が描画</string> + <string name="gpu_runtime_live">実行中</string> + <string name="gpu_runtime_pending">次回セッションで有効 · このセッションは %1$s を使用</string> + <string name="gpu_display_next">画面の描画を担当します。次回セッションから有効になります。</string> + <string name="gpu_previous_driver">前のドライバー</string> + <string name="gpu_restart_banner">再起動してディスプレイドライバーを切り替えます。</string> + <string name="gpu_restart_blocked">実行中のセッションを停止してから、ディスプレイドライバーを切り替えるために DroidDeck を再起動してください。</string> + <string name="gpu_restart_now">今すぐ再起動</string> + <string name="gpu_restart_later">あとで</string> + <string name="gpu_auto_title">%1$s に合わせてこの組み合わせを自動で選びました</string> + <string name="gpu_auto_builtin_title">自動モードは %1$s に内蔵ドライバーを使用しています</string> + <string name="gpu_auto_reason">%1$s シリーズ向けに選択されました。新しいバージョンはバックグラウンドでインストールされます。</string> + <string name="gpu_pair_title">組み合わせを選択</string> + <string name="gpu_pair_hint">組み合わせはディスプレイドライバーとランタイムドライバーをまとめて設定します。</string> + <string name="gpu_mix_title">ドライバーを個別に選択</string> + <string name="gpu_mix_hint">内蔵パッケージは両方をまとめて設定します。ディスプレイドライバーの変更は再起動後に、ランタイムドライバーは次回セッションで有効になります。</string> + <string name="gpu_change_display">ディスプレイドライバーを変更</string> + <string name="gpu_change_runtime">ランタイムドライバーを変更</string> + <string name="gpu_autos_pick">自動で選ぶ</string> + <string name="gpu_installed">インストール済み</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · 再起動後に有効</string> + <string name="gpu_chip_restart">%1$s · 再起動待ち</string> + <string name="comp_this_device">このデバイス</string> + <string name="proton_remove_title">%1$sを削除しますか?</string> + <string name="setup_tab_diagnostics">診断</string> + <string name="setup_ready">プレイの準備完了</string> + <string name="setup_not_ready">まだプレイの準備ができていません</string> + <string name="setup_ready_runtime">実行環境 %1$s</string> + <string name="setup_ready_limit_off">プロセス制限オフ</string> + <string name="setup_ready_signed_in">%1$sとしてログイン中</string> + <string name="setup_needs_you">対応が必要なとき</string> + <string name="setup_group_look">外観</string> + <string name="setup_group_device">このデバイス</string> + <string name="setup_group_art">ライブラリのアートワーク</string> + <string name="setup_group_download">ダウンロード</string> + <string name="setup_download_source">ソース</string> + <string name="setup_download_source_auto">自動</string> + <string name="setup_download_source_direct">直接</string> + <string name="setup_download_source_mirror">ミラー</string> + <string name="setup_download_source_custom">カスタムプレフィックス</string> + <string name="setup_download_mirror">サイト</string> + <string name="setup_download_prefix">プレフィックス</string> + <string name="flathub_eyebrow">Linuxアプリ</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Linuxデスクトップ用のアプリ。「デスクトップ」から開きます。</string> + <string name="flathub_setup">Flathubをセットアップ</string> + <string name="flathub_remove_title">%1$sを削除しますか?</string> + <string name="flathub_remove_note">設定とファイルは保持されます。</string> + <string name="flathub_keep">保持</string> + <string name="desktop_size">ディスク上のサイズ</string> + <string name="desktop_uninstall_title">デスクトップをアンインストールしますか?</string> + <string name="desktop_all_systems">すべて</string> + <string name="gog_achievements">GOGの実績</string> + <string name="gog_achievements_hint">対応するGOGゲームの実績を同期します。次回の起動から適用されます。</string> + <string name="gog_achievements_off">実績オフ</string> + <string name="gog_achievements_on">実績オン</string> + <string name="gog_achievements_signin">GOGに再度サインインしてください</string> + <string name="gog_achievements_uploaded">実績をアップロードしました</string> + <string name="gog_achievements_pending">実績のアップロード待ち</string> + <string name="gog_achievements_enable_store">ストア設定でGOGの実績を有効にしてください</string> + <string name="gog_achievements_unavailable">実績を利用できません。セッションログを確認してください</string> + <string name="achievement_unlocked">実績を解除しました</string> + <string name="touch_paste">貼り付け</string> + <string name="touch_dpad">十字キー</string> + <string name="touch_left_stick">左スティック</string> + <string name="touch_right_stick">右スティック</string> + <string name="touch_menu">メニュー</string> + <string name="touch_keyboard">キーボード</string> + <string name="touch_dpad_up">十字キー上</string> + <string name="touch_dpad_down">十字キー下</string> + <string name="touch_dpad_left">十字キー左</string> + <string name="touch_dpad_right">十字キー右</string> + <string name="touch_title">タッチ操作</string> + <string name="touch_controller">タッチコントローラー</string> + <string name="touch_mouse">マウス</string> + <string name="touch_on">オン</string> + <string name="touch_off">オフ</string> + <string name="touch_speed_slow">遅い</string> + <string name="touch_speed_normal">普通</string> + <string name="touch_speed_fast">速い</string> + <string name="touch_edit_layout">レイアウトを編集</string> + <string name="touch_droiddeck_menu">DroidDeckメニュー</string> + <string name="touch_drag_hint">操作ボタンを画面にドラッグしてください</string> + <string name="touch_arrange">配置</string> + <string name="touch_discard">破棄</string> + <string name="touch_saving">保存中…</string> + <string name="touch_icon">アイコン</string> + <string name="touch_narrower">幅−</string> + <string name="touch_wider">幅+</string> + <string name="touch_shorter">高−</string> + <string name="touch_taller">高+</string> + <string name="touch_hide">非表示</string> + <string name="touch_color_opacity">色と不透明度…</string> + <string name="touch_copy_layout">このレイアウトをコピー</string> + <string name="touch_layout_copied">レイアウトをコピーしました。任意のゲームのタッチレイアウトに貼り付けられます</string> + <string name="touch_paste_layout">コピーしたレイアウトを貼り付け</string> + <string name="touch_reset_layout">Steamの初期設定に戻す</string> + <string name="touch_no_binding">この操作にはSteamでアイコンを設定できる割り当てがありません</string> + <string name="touch_icon_for">%1$sのアイコン</string> + <string name="touch_layout_color">タッチレイアウトの色</string> + <string name="touch_done">完了</string> + <string name="touch_save_failed">タッチレイアウトを保存できませんでした</string> + <string name="touch_saved">タッチレイアウトをSteamに保存しました</string> + <string name="touch_app_id">アプリ%1$d</string> + <string name="touch_label_hint">ラベル(任意)</string> + <string name="touch_icons_missing">Steamのアイコンが見つかりませんでした</string> + <plurals name="touch_icons_found"> + <item quantity="other">Steamのアイコン%1$d個</item> + </plurals> + <string name="touch_icon_color">アイコンの色</string> + <string name="touch_button_color">ボタンの色</string> + <string name="touch_no_icon">アイコンなし</string> + + <string name="stores_sync_sign_in">サインインを確認中…</string> + <string name="stores_sync_library">ライブラリを取得中…</string> + <string name="stores_sync_game_list">ゲームリストを取得中…</string> + <string name="stores_sync_details">ゲーム情報を読み込み中… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="other">%1$d個のゲームを同期中…</item> + </plurals> + <string name="stores_sync_progress">同期中… %1$d/%2$d</string> + <string name="stores_sync_cover_art">カバーアートを取得中…</string> + <string name="stores_sync_failed">同期に失敗しました</string> + <string name="stores_sync_no_games">%1$sのライブラリにゲームが見つかりません</string> + <string name="stores_sync_amazon_no_answer">Amazon Gamesからライブラリの応答がありません。更新するか、再度サインインしてください</string> + <string name="stores_sync_gog_unreachable">GOGに接続できませんでした</string> + <string name="stores_sync_gog_unreadable">GOGのライブラリを読み込めませんでした</string> + <string name="stores_registering">Steamに登録中…</string> + <string name="mode_client_arch">Steamクライアント</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC診断</string> + <string name="setup_vac_diag_hint">Sourceゲームはコンソールを記録します(-condebug)。セッションログのvac.txtで保護の有無がわかります</string> + <string name="load_starting_steam_x64">Steam x86-64を起動中</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">x86-64 Steamクライアントが使用</string> + <string name="storage_uninstall_in_x64">このコピーはx86-64のSteamクライアントにあります。Steamクライアントでx86-64を選んでから、ここでアンインストールしてください。</string> + <string name="storage_uninstall_in_arm64">このコピーはARM64のSteamクライアントにあります。SteamクライアントでARM64を選んでから、ここでアンインストールしてください。</string> + <string name="drawer_page_glasses">グラス</string> + <string name="glasses_open">VITURE グラス</string> + <string name="glasses_control">グラスの制御</string> + <string name="glasses_driver_missing">このビルドには、このグラス用のドライバーが含まれていません。</string> + <string name="glasses_connection_failed">グラスに接続できませんでした。ケーブルを接続し直すか、「許可」をタップして再試行してください。</string> + <string name="glasses_allow">許可</string> + <string name="glasses_allow_hint">DroidDeck がグラスのリフレッシュレート、3D モード、明るさ、音量、サンブロックを設定し、ヘッドトラッキングを読み取れるようにします。</string> + <string name="glasses_asking">Android のダイアログで許可されるのを待っています…</string> + <string name="glasses_denied">制御が拒否されました。グラスの設定を変更するには許可してください。</string> + <string name="glasses_no_control">このグラスにはゲームが表示されますが、ここから設定は変更できません。</string> + <string name="glasses_output">出力</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">グラスにゲームを表示</string> + <string name="glasses_game_on_hint">ゲームをグラスだけに表示します。オフ: スマートフォンに表示し、Android がスマートフォンの画面をミラーリングします。</string> + <string name="glasses_display">表示</string> + <string name="glasses_refresh">リフレッシュレート</string> + <string name="glasses_3d">3D(サイドバイサイド)</string> + <string name="glasses_3d_hint">スマートグラスをサイドバイサイド3Dに切り替えます。ヘッドトラッキングは個別に制御されます。</string> + <string name="glasses_3d_failed">3D 信号を確認できませんでした。2D 映像が戻ってから再試行してください。</string> + <string name="glasses_no_signal">映像なし: グラスがこのスマートフォンで出力できないモードになっています。2D/3D ボタンを長押しするか、抜き差ししてください。</string> + <string name="glasses_3d_refresh">3D のリフレッシュレート</string> + <string name="glasses_auto3d">VR ゲームで 3D</string> + <string name="glasses_auto3d_hint">SteamVR の実行中は 3D に切り替え、終了後に戻します。</string> + <string name="glasses_picture">画像</string> + <string name="glasses_picture_hint">自動設定では、両眼にフラットコンテンツを表示し、SteamVRを検出します。サイドバイサイドゲーム(SBS)コンテンツの場合は、サイドバイサイドゲームを選択してください。</string> + <string name="glasses_picture_auto">自動</string> + <string name="glasses_picture_screen">仮想スクリーン</string> + <string name="glasses_picture_sbs">サイドバイサイドのゲーム</string> + <string name="glasses_screen_size">スクリーンの幅</string> + <string name="glasses_screen_distance">スクリーンまでの距離</string> + <string name="glasses_screen_next_session">幅と距離は、ゲームを仮想スクリーンとしてグラスに表示しているときに適用されます。</string> + <string name="glasses_screen_no_output">これらの設定は、「グラスにゲームを表示」がオンで、ゲームがグラスに表示されているときに適用されます。</string> + <string name="glasses_screen_flat_hint">「自動」では、この 2D ゲームは全画面のままです。幅、距離、ヘッドトラッキングを調整するには、仮想スクリーンを使用してください。</string> + <string name="glasses_screen_use">仮想スクリーンを使用</string> + <string name="glasses_screen_direct_hint">SteamVRは画面全体に表示されます。VR内で視野角を調整してください。幅と距離は仮想画面にのみ適用されます。</string> + <string name="glasses_screen_sbs_hint">サイドバイサイドのゲームは、左右の目の視界いっぱいに表示されます。幅と距離は仮想スクリーンにのみ適用されます。</string> + <string name="glasses_tracking_flat_hint">「自動」では、この 2D ゲームは視界の中で固定されます。ヘッドトラッキングを使うには、「表示」で「仮想スクリーン」を選んでください。</string> + <string name="glasses_tracking_sbs_hint">ヘッドトラッキングは、仮想スクリーンまたは実行中の SteamVR ゲームに適用されます。</string> + <string name="glasses_hardware">デバイス</string> + <string name="glasses_brightness">明るさ</string> + <string name="glasses_volume">音量</string> + <string name="glasses_sunblock">サンブロック</string> + <string name="glasses_sunblock_hint">前面のレンズを暗くします。</string> + <string name="glasses_tracking">トラッキング</string> + <string name="glasses_head_tracking">ヘッドトラッキング</string> + <string name="glasses_head_tracking_hint">グラスのセンサーで、頭の動きに合わせて仮想スクリーンと SteamVR を動かします。</string> + <string name="glasses_recenter">視点をリセット</string> + <string name="glasses_recenter_button">画面の中心をリセット</string> + <string name="glasses_vr_fov">SteamVR の視野角</string> + <string name="glasses_vr_fov_hint">小さくすると SteamVR が近くなりグラスいっぱいに広がり、大きくすると周囲が広く見えます。</string> + <string name="glasses_playing">%1$s でプレイ中</string> + <string name="glasses_calibration">トラッキングのキャリブレーション</string> + <string name="glasses_calibration_hint">ドリフトを減らし、水平の基準を合わせます。</string> + <string name="glasses_calibration_saved_hint">保存したキャリブレーションをこのグラスに適用しています。</string> + <string name="glasses_calibration_open">キャリブレーション</string> + <string name="glasses_calibration_instructions">接続したグラスを、フレームが均等に接するように水平な面に逆さまに置いてください。「開始」をタップしたら、約8秒間そのまま触れないでください。動かすと測定がやり直しになります。ドリフトと傾きは補正されますが、左右の向きは補正されません。</string> + <string name="glasses_calibration_settling">グラスを逆さまにしたまま、触れずに置いておいてください。安定するのを待っています…</string> + <string name="glasses_calibration_collecting">センサーを測定しています。グラスを動かさないでください。</string> + <string name="glasses_calibration_moving">動きを検出しました。グラスに触れないでください。測定は自動的にやり直されます。</string> + <string name="glasses_calibration_turn_over">グラスを水平な面に逆さまに置いてください。正しい位置に置かれると測定が始まります。</string> + <string name="glasses_calibration_complete">キャリブレーションを保存しました。グラスを装着して正面を見てから、「完了」をタップして中央に戻してください。</string> + <string name="glasses_calibration_failed">キャリブレーションを完了できませんでした。接続を確認し、グラスを動かさずにもう一度お試しください。以前のキャリブレーションは変更されていません。</string> + <string name="glasses_calibration_start">開始</string> + <string name="glasses_calibration_done">完了</string> + <string name="glasses_calibration_reset">トラッキングのキャリブレーションをリセット</string> + <string name="glasses_calibration_reset_hint">保存したキャリブレーションを削除して、モデルの初期設定に戻しますか?グラスを装着し直したら、中央に戻してください。</string> + <string name="glasses_calibration_reset_button">リセット</string> + <string name="hand_camera_group">ハンドトラッキング</string> + <string name="hand_camera_prompt_title">スマートフォンカメラで手やJoy-Conコントローラーをトラッキングしますか?</string> + <string name="hand_camera_prompt_body">コントローラーが接続されていない場合、スマートフォンカメラはVR内で素手の動きをトラッキングします。親指と人差し指でつまむとクリック、手を閉じると掴む、手のひらを自分の方に向け、つまむとメニューが開きます。Joy-Conコントローラーがペアリングされている場合、カメラはコントローラーの位置をトラッキングし、Joy-Conコントローラーは回転とボタン入力を行います。画像はこのデバイスで処理され、保存または送信されることはありません。</string> + <string name="hand_camera_rear">背面カメラ</string> + <string name="hand_camera_rear_hint">おすすめです。通常はより鮮明で広角です。</string> + <string name="hand_camera_front">前面カメラ</string> + <string name="hand_camera_front_hint">デバイスの背面をあなたに向けられないときに使います。</string> + <string name="hand_camera_allow">カメラを使う</string> + <string name="hand_camera_not_now">後で</string> + <string name="hand_camera_setting">カメラハンドトラッキング</string> + <string name="hand_camera_setting_hint">スマートフォンのカメラを使って、素手でのジェスチャー操作や、ペアリングしたJoy-ConコントローラーをVR空間に配置することができます。Joy-Conコントローラーは回転とボタン入力を提供します。スマートグラスが手やJoy-Conコントローラーをトラッキングしている間、一時停止します。画像はこのデバイスでのみ処理されます。</string> + <string name="hand_camera_choice">カメラ</string> + <string name="hand_camera_access">カメラの権限</string> + <string name="hand_camera_access_hint">ハンドトラッキングを開始するには、カメラへのアクセスを許可してください。</string> + <string name="hand_camera_access_denied">カメラの権限がオフになっています。Android設定でオンにしてください。</string> + <string name="hand_camera_allow_button">許可</string> + <string name="hand_camera_open_settings">設定を開く</string> + <string name="hand_camera_placement">カメラの位置</string> + <string name="hand_camera_placement_hint">プレイ前に、カメラにあなたが映っているか確認してください。</string> + <string name="hand_camera_check">確認</string> + <string name="hand_camera_check_title">カメラの位置</string> + <string name="hand_camera_how_rear">デバイスを胸の高さくらいで1.5〜2m離れたところに立て、背面カメラがあなたの方を向くようにしてください。そのあと、手を広げて画面内に入ってください。</string> + <string name="hand_camera_how_front">デバイスを胸の高さくらいで1.5〜2m離れたところに立て、画面があなたの方を向くようにしてください。そのあと、手を広げて画面内に入ってください。</string> + <string name="hand_camera_starting">カメラを起動しています…</string> + <string name="hand_camera_stand_up">デバイスが横に倒れています。カメラがあなたの方を向くように立ててください。</string> + <string name="hand_camera_upright">デバイスをもっと立てて、カメラがあなたの方を向くようにしてください。</string> + <string name="hand_camera_not_seen">まだ映っていません。頭と肩が見えるように画面内に入ってください。</string> + <string name="hand_camera_move_back">少し下がってください。</string> + <string name="hand_camera_move_closer">もう少し近づいてください。</string> + <string name="hand_camera_show_hands">カメラに見える位置で、両手を広げて見せてください。</string> + <string name="hand_camera_good">良好です。</string> + <string name="hand_camera_failed">カメラを起動できませんでした。カメラを使用している他のアプリを閉じてから、もう一度お試しください。</string> + <string name="hand_camera_switch">カメラを切り替え</string> + <string name="hand_camera_skip">スキップ</string> + <string name="hand_camera_done">完了</string> + <string name="glasses_xreal_network_missing">グラスの USB Ethernet 接続を待っています。このスマートフォンでは、アプリがこの接続を利用できない場合があります。</string> + <string name="glasses_xreal_connection_failed">XREAL との接続が中断されたか、サポートされていない応答が返されました。再試行しています…</string> + <string name="glasses_xreal_experimental">1S のサポートは試験運用中です。グラスのメニューで Follow モードを使い、安定化をオフにしてください。トラッキングの方向と表示モードは、まだ実機でのテストが必要です。</string> + <string name="stores_fact_developer">開発元</string> + <string name="stores_fact_publisher">パブリッシャー</string> + <string name="stores_fact_released">発売日</string> + <string name="stores_hltb_main">メイン</string> + <string name="stores_hltb_extras">+ やり込み</string> + <string name="stores_hltb_completionist">完全制覇</string> + <string name="stores_hltb_hours">%1$s時間</string> + <string name="stores_hltb_minutes">%1$d分</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboardモード</string> + <string name="cardboard_mode_hint">スマホ用VRビューアー向けの左右の目の映像です。</string> + <string name="cardboard_source">映像</string> + <string name="cardboard_source_screen">仮想スクリーン</string> + <string name="cardboard_source_sbs">サイドバイサイド3D</string> + <string name="cardboard_viewer">ビューアー</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard(2014)</string> + <string name="cardboard_viewer_none">レンズなし</string> + <string name="cardboard_ipd">目の間隔</string> + <string name="cardboard_screen_width">スクリーンの幅</string> + <string name="cardboard_screen_distance">スクリーンまでの距離</string> + <string name="cardboard_head_tracking">ヘッドトラッキング</string> + <string name="cardboard_no_sensor">このデバイスには回転センサーがありません。</string> + <string name="cardboard_recenter">視点をリセット</string> + <string name="cardboard_recenter_button">リセット</string> + <string name="cardboard_steamvr">SteamVR(試験運用)</string> + <string name="cardboard_steamvr_install">インストール</string> + <string name="cardboard_steamvr_installing">SteamVRをダウンロードして展開しています…</string> + <string name="cardboard_steamvr_start">開始</string> + <string name="cardboard_steamvr_stop">停止</string> + <string name="cardboard_steamvr_unavailable">このセッションでは利用できません。</string> + <string name="cardboard_steamvr_failed">SteamVRが応答しませんでした。セッションログを確認してください。</string> + <string name="drawer_component_downloads">コンポーネントをダウンロード</string> + <string name="drawer_component_downloads_hint">ダウンロードは「コンポーネント」ページと共有されます。上でダウンロード済みのバージョンを選ぶと、次回のゲーム起動時に使用されます。</string> + <string name="drawer_component_choose_download">ダウンロードするバージョンを選択</string> + <string name="display_picture_position">画面の位置</string> + <string name="display_position_top">上</string> + <string name="display_position_bottom">下</string> + <string name="display_position_center">中央(既定)</string> + <string name="setup_tab_storage">ストレージ</string> + <string name="storage_measuring">ストレージを集計しています…</string> + <string name="storage_measuring_hint">初回の集計には数秒かかります。</string> + <string name="storage_internal">内部ストレージ</string> + <string name="storage_used_of">%1$s / %2$s 使用中</string> + <string name="storage_free">空き %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck が %1$s を使用しています。集計時刻 %2$s。</string> + <string name="storage_rescanning">再集計しています…</string> + <string name="storage_other_apps">その他の Android アプリ</string> + <string name="storage_safe_now">今すぐ安全に解放できます</string> + <string name="storage_safe_hint">未使用のランタイム、残留、古いログ</string> + <string name="storage_clean_up">クリーンアップ…</string> + <string name="storage_session_running">セッションを停止するとクリーンアップや削除ができます。容量は引き続き表示されます。</string> + <string name="storage_where">使用内訳</string> + <string name="storage_games">Steam ゲーム</string> + <string name="storage_game_data">ゲームデータ</string> + <string name="storage_game_data_hint">プレフィックス %1$s · ワークショップ %2$s · シェーダー %3$s</string> + <string name="storage_tools">Proton とランタイム</string> + <string name="storage_tools_unused">%1$s 未使用</string> + <string name="storage_stores">GOG、Epic などのストア</string> + <string name="storage_stores_hint">ストアでアンインストール</string> + <string name="storage_desktop">デスクトップアプリ</string> + <string name="storage_desktop_hint">Flatpak アプリとランタイム</string> + <string name="storage_system">Linux システムと Steam クライアント</string> + <string name="storage_system_hint">何かを動かすのに必要</string> + <string name="storage_app_data">DroidDeck のデータ</string> + <string name="storage_app_data_hint">古いセッションログ %1$s · キャッシュ · ドライバー</string> + <string name="storage_legend_games">ゲーム</string> + <string name="storage_legend_data">ゲームデータ</string> + <string name="storage_legend_tools">Proton とランタイム</string> + <string name="storage_legend_stores">その他のストア</string> + <string name="storage_legend_desktop">デスクトップアプリ</string> + <string name="storage_legend_system">Linux システム</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">クリーンアップ</string> + <string name="storage_clean_up_lede">インストール済みのゲームや進行中のダウンロードには影響しません。</string> + <string name="storage_nothing_to_clean">クリーンアップできるものはありません。</string> + <string name="storage_selected">選択中:%1$s · %2$s → 空き %3$s</string> + <string name="storage_cleaning">クリーンアップしています…</string> + <string name="storage_free_button">%1$s を解放</string> + <string name="storage_freed">%1$s を解放しました。</string> + <string name="storage_item_runtimes">未使用の Steam ランタイムと Proton</string> + <string name="storage_item_leftovers">アンインストールしたゲームの残留</string> + <string name="storage_item_leftovers_unsure">セーブデータを含む可能性がある残留</string> + <string name="storage_item_logs">古いセッションログ</string> + <string name="storage_item_logs_detail">現在のセッションのログは保持されます</string> + <string name="storage_item_custom_detail">どのゲームも使用していません。使用するにはコンポーネントで再インストールしてください。</string> + <string name="storage_item_shaders">インストール済みゲームのシェーダーキャッシュ</string> + <string name="storage_item_shaders_detail">プレイすると再生成されます。各ゲームの最初の数分は再びカクつきます。</string> + <string name="storage_tag_safe">安全</string> + <string name="storage_tag_unused">未使用</string> + <string name="storage_tag_stutter">カクつき</string> + <string name="storage_tag_saves">セーブデータを確認</string> + <string name="storage_tag_default">既定</string> + <string name="storage_tag_required">必須</string> + <string name="storage_tag_not_used">未使用</string> + <string name="storage_back">ストレージ</string> + <string name="storage_games_with_data">%1$s(データ込み)</string> + <string name="storage_sort_largest">大きい順</string> + <string name="storage_sort_least_played">プレイ時間が短い順</string> + <string name="storage_sort_sd">SD カード上</string> + <string name="storage_no_games">ここにゲームはありません。</string> + <string name="storage_played">プレイ時間 %1$s</string> + <string name="storage_never_played">未プレイ</string> + <string name="storage_game_parts">ゲーム %1$s · データ %2$s</string> + <string name="storage_uninstall">アンインストール</string> + <string name="storage_games_note">アンインストールすると Steam 標準のダイアログが開き、Steam 側に記録されます。ゲームを SD カードへ移すには Steam › 設定 › ストレージを使用してください。</string> + <string name="storage_uninstall_title">%1$s をアンインストールしますか?</string> + <string name="storage_uninstall_body">Steam が開いて確認を求めます。このゲームの %1$s が解放されます。プレフィックスは残留のクリーンアップまで残り、Steam クラウドのセーブデータはアカウントに残ります。</string> + <string name="storage_open_steam">Steam を開く</string> + <string name="storage_tools_detail">%1$s · %2$s 未使用</string> + <string name="storage_remove_unused">未使用を削除 · %1$s</string> + <string name="storage_in_use">使用中</string> + <string name="storage_not_used">未使用</string> + <string name="storage_remove">削除</string> + <string name="storage_remove_title">%1$s を削除しますか?</string> + <string name="storage_remove_body">%1$s を解放します。後でゲームが必要とすれば Steam が再ダウンロードします。</string> + <string name="storage_tool_fex_runtime">Linux x86 ゲームに必要(FEX)</string> + <string name="storage_tool_arm_runtime">ARM64 Proton に必要</string> + <string name="storage_tool_redist">ゲームが要求した VC++ と DirectX のインストーラー</string> + <string name="storage_tool_fex">Linux x86 ゲームを実行</string> + <string name="storage_tool_steam">Steam ツール</string> + <string name="storage_tool_old_runtime">DroidDeck はこのランタイムなしでゲームを実行できます</string> + <string name="storage_tool_x86_proton">x86 Proton のため DroidDeck では実行できません</string> + <string name="storage_tool_custom_default">すべてのゲームの既定</string> + <string name="storage_tool_custom_unused">どのゲームも使用していません</string> + <string name="storage_tool_custom_unknown">Steam の設定を読み取れないため保持します</string> + <string name="storage_cleanup_busy">ストレージのクリーンアップが終わるまでお待ちください</string> + <string name="storage_low_title">空きが %1$s のみです</string> + <string name="storage_low_body">Steam は更新とシェーダーキャッシュ用の空き容量を必要とします。10 GB を下回ると、ゲームの更新が途中で失敗することがあります。</string> + <string name="storage_low_safe">%1$s を安全に解放できます。</string> + <string name="storage_free_up">容量を空ける</string> + <string name="storage_play_anyway">そのままプレイ</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d 件インストール済み</item> + <item quantity="other">%d 件インストール済み</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d 件が SD カード上</item> + <item quantity="other">%d 件が SD カード上</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d 個のツール</item> + <item quantity="other">%d 個のツール</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">%d 件のゲームの空のプレフィックスフォルダーとシェーダーキャッシュ</item> + <item quantity="other">%d 件のゲームの空のプレフィックスフォルダーとシェーダーキャッシュ</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">%d 件のゲームのプレフィックスにファイルが残っており、ローカルのセーブデータが含まれる可能性があります。残す場合は先にバックアップしてください。</item> + <item quantity="other">%d 件のゲームのプレフィックスにファイルが残っており、ローカルのセーブデータが含まれる可能性があります。残す場合は先にバックアップしてください。</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d 件のゲーム</item> + <item quantity="other">%d 件のゲーム</item> + </plurals> + <string name="storage_tool_default_proton">DroidDeck の既定 Proton</string> + <string name="storage_tool_proton">DroidDeck の Proton 11 オプション</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d 件のゲームが使用</item> + <item quantity="other">%d 件のゲームが使用</item> + </plurals> + <string name="storage_legend_components">コンポーネント</string> + <string name="storage_components">コンポーネント</string> + <string name="storage_item_components">未使用のコンポーネント</string> + <string name="storage_component_original">元の %1$s · %2$s</string> + <string name="storage_original_confirm">%1$s を解放します。すでにインストールされていない Proton バージョンを戻すだけです。</string> + <string name="storage_leftovers_unchecked">未確認:Steam のアプリマニフェストを読み取れないため、読み取れるまでアンインストールしたゲームのプレフィックスを保持します。</string> + <string name="storage_failed">完了できませんでした:%1$s</string> + <string name="storage_desktop_shared">共有 %1$s</string> + <string name="storage_data_installed">インストール済みゲーム</string> + <string name="storage_data_parts">プレフィックス %1$s · シェーダー %2$s · ワークショップ %3$s</string> + <string name="storage_clear_shaders">シェーダーを削除</string> + <string name="storage_data_leftovers">アンインストールしたゲーム</string> + <string name="storage_steam_app">Steam アプリ %1$d</string> + <string name="storage_leftover_unsure_detail">プレフィックスにファイルが残っており、ローカルのセーブデータが含まれる可能性があります</string> + <string name="storage_leftover_confirm">Wine プレフィックスとシェーダーキャッシュ(%1$s)を削除します。必要なセーブデータは先にバックアップしてください。Steam クラウドのセーブデータはアカウントに残ります。</string> + <string name="storage_data_other">保持</string> + <string name="storage_data_other_title">Steam 以外のゲームと Steam の共有プレフィックス</string> + <string name="storage_data_other_detail">ストアから、または手動で追加したゲームのプレフィックス</string> + <string name="storage_components_packages">ダウンロード済みのパッケージ</string> + <string name="storage_components_originals">保存済みの元ファイル</string> + <string name="storage_components_none">ダウンロード済みのコンポーネントパッケージはありません。</string> + <string name="storage_component_in_use">Proton またはゲームで選択済み</string> + <string name="storage_component_unused">どこでも選択されていません</string> + <string name="storage_original_kept">インストール済みの Proton を戻す</string> + <string name="storage_original_old">インストールされていない Proton バージョン</string> + <string name="storage_tag_in_use">使用中</string> + <string name="storage_components_note">使用中のコンポーネントはロックされます。コンポーネントで選択してください。ここで削除したものはそこで再ダウンロードできます。</string> + <string name="storage_component_confirm">%1$s を解放します。自分でインポートしたパッケージは再ダウンロードできません。</string> + <string name="storage_desktop_detail">%1$s(Flatpak アプリとその共有内容に使用)</string> + <string name="storage_desktop_apps_title">アプリ</string> + <string name="storage_desktop_none">Flatpak アプリはインストールされていません。</string> + <string name="storage_desktop_shared_title">アプリの共有</string> + <string name="storage_desktop_runtimes">ランタイム</string> + <string name="storage_desktop_runtimes_detail">アプリが依存するライブラリ。未使用のものは「未使用を削除」でクリーンアップされます</string> + <string name="storage_desktop_cache">ダウンロードリポジトリ</string> + <string name="storage_desktop_cache_detail">Flatpak のオブジェクトリポジトリとキャッシュされたダウンロード</string> + <string name="storage_desktop_prune">未使用を削除</string> + <string name="storage_desktop_prune_body">インストール済みのアプリが必要としないランタイムを削除し、Flatpak のオブジェクトリポジトリをクリーンアップします。インストール済みのアプリはそのまま動作します。</string> + <string name="storage_flatpak_uninstall_body">このアプリ(%1$s)と、他のアプリが使用していないランタイムを削除します。ホームディレクトリのデータは保持されます。</string> + <plurals name="storage_components_count"> + <item quantity="one">%d 個のパッケージ</item> + <item quantity="other">%d 個のパッケージ</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d 個のアプリ</item> + <item quantity="other">%d 個のアプリ</item> + </plurals> + <string name="boot_movie">起動ムービー</string> + <string name="boot_movie_video">ムービー</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps はなめらかですが、Steam の起動中に CPU をより多く使います。Steam 本体の設定で選んだ起動ムービーが優先されます。</string> + <string name="boot_movie_sound">サウンド</string> + <string name="boot_movie_custom">自分のムービー</string> + <string name="boot_movie_custom_hint">MP4、MOV、MKV、WebM。その他の形式や %1$d MB を超えるファイルは、端末上で 720p の WebM に変換されます(%2$d 秒まで)。</string> + <string name="boot_movie_import">インポート</string> + <string name="boot_movie_remove">削除</string> + <string name="boot_movie_pick">起動ムービーを選択</string> + <string name="boot_movie_imported">%1$s を起動ムービーに設定しました</string> + <string name="boot_movie_imported_silent">%1$s を起動ムービーに設定しました(無音)</string> + <string name="boot_movie_too_long">変換が必要なムービーは %1$d 秒以内にしてください</string> + <string name="boot_movie_converting">変換中 %1$d%%</string> + <string name="boot_movie_converting_started">%1$s を Steam 用に変換しています。DroidDeck を開いたままにしてください。</string> + <string name="boot_movie_unsupported">この端末ではその動画をデコードできません。</string> + <string name="boot_movie_import_failed">ムービーをインポートできませんでした</string> + <string name="setup_tab_glasses">スマートグラス</string> + <string name="setup_glasses_connect">スマートグラスを接続して、ディスプレイと追跡の設定を変更してください。接続を解除しても、保存された設定は保持されます。</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">表示モード</string> + <string name="glasses_output_2d">2D出力</string> + <string name="glasses_output_3d">3D出力</string> + <string name="glasses_picture_group">画像と仮想スクリーン</string> + <string name="glasses_position_group">位置と床面レベル</string> + <string name="glasses_hands_group">ハンドトラッキング - 実験的</string> + <string name="glasses_tracking_status">トラッキング状態</string> + <string name="glasses_resolution_2d">2D解像度</string> + <string name="glasses_resolution_3d">3D解像度</string> + <string name="glasses_resolution_vr">VR解像度</string> + <string name="glasses_resolution_auto">自動</string> + <string name="glasses_resolution_inherit">2D/3Dと同じ</string> + <string name="glasses_resolution_hint">片目あたりの出力解像度</string> + <string name="glasses_refresh_30_hint">スマートグラスでゲームを有効にすると、ディスプレイのネイティブ30Hzモードが選択されます。</string> + <string name="glasses_3dof_hint">平面ゲームを目の前に固定して、周囲を見渡せるようにします。3Dに切り替えずにスマートグラスでゲームを有効にします。</string> + <string name="glasses_quick_actions">クイックアクション</string> + <string name="glasses_recenter_screen_hint">画面を表示したい場所を見てから、トラッキングセンターをリセットして画面の高さと方向を設定します。</string> + <string name="phone_camera_tracking_group">スマートフォンカメラ - 実験的機能</string> + <string name="glasses_position">位置トラッキング - 実験的機能</string> + <string name="glasses_position_hint">VR内および仮想スクリーン周辺での身体の動き。トラッキングの再開には少々時間がかかります。</string> + <string name="glasses_eye_height">床面からの現在の目の高さ</string> + <string name="glasses_floor">現在の高さから床面レベルを設定</string> + <string name="glasses_floor_set">床面レベルを設定</string> + <string name="glasses_spatial_setup">ステレオカメラの設定と診断</string> + <string name="glasses_spatial_setup_hint">プレイ前にカメラのキャリブレーションと手のトラッキングを確認してください。</string> + <string name="glasses_spatial_open">セットアップを開く</string> + <string name="glasses_hands">素手で操作するコントローラー</string> + <string name="glasses_hands_calibration_verified">測定されたキャリブレーションが検証されました</string> + <string name="glasses_hands_calibration_required">検証が必要です</string> + <string name="glasses_hands_calibration_required_hint">測定距離チェックに合格すると、素手で操作できるコントローラーが使用可能になります。</string> + <string name="tracking_recovery_lost">トラッキングが失われました</string> + <string name="glasses_experimental">Luma Ultraカメラ - 実験的機能</string> + <string name="glasses_joycons">Joy-Conの位置追跡</string> + <string name="glasses_joycons_hint">スマートグラスのカメラを使って、ペアリングしたJoy-Conコントローラーの位置を調整します。回転とボタン入力はJoy-Conコントローラーから行われます。手首が隠れている状態では位置が推定されます。素手で操作するコントローラーの代わりに、スマートフォンのカメラによるトラッキングを一時停止します。接続時またはトラッキングセンターをリセットする際は、Joy-Conコントローラーを前方に向けてください。</string> + <string name="glasses_joycons_requires_position">まず位置追跡を有効にしてください。Android 12以降を搭載したモーション対応のJoy-Conコントローラーが必要です。デフォルトでは無効になっています。</string> + <string name="setup_glasses_scope">ディスプレイとヘッドトラッキングの設定は、DroidDeckのメニュー、ゲーム、デスクトップセッション間で共有されます。</string> + <string name="glasses_3dof">3DoF仮想スクリーン</string> + <string name="glasses_screen_app_wide">幅と距離を設定すると、DroidDeckのメニュー、ゲーム、デスクトップセッションのトラッキングされた仮想画面が即座に更新されます。</string> + <string name="glasses_head_tracking_spatial_vr_hint">位置トラッキングには、SteamVRでの頭部回転が含まれます。回転のみのトラッキングを行うには、位置トラッキングをオフにしてください。</string> + <string name="glasses_head_tracking_spatial_hint">仮想画面上の頭部の動きを制御します。位置トラッキングには、SteamVRでの頭部回転が含まれます。</string> + <string name="glasses_recenter_joycons_button">Joy-Conの中心をリセット</string> + <string name="phone_camera_tracking_setting">手やJoy-Conコントローラーのトラッキング</string> + <string name="glasses_6dof">6DoF仮想スクリーン</string> + <string name="glasses_hands_hint">スマートグラスのカメラを使用して、VR内で手で照準を合わせ、ピンチ操作でクリック、手を閉じて掴みます。ゲームパッドのスティックは移動および回転します。Joy-Conの位置トラッキングを置き換えます。ゲーム中にラグが発生したり、トラッキングが失われる場合があります。</string> + <string name="glasses_hands_ready_hint">トラッキングのLuma Ultraカメラで、素手で操作するコントローラーを有効にします。最初に開いた手を表示します。</string> + <string name="glasses_hands_base">Luma Ultraの共有キャリブレーション</string> + <string name="glasses_hands_base_hint">共有Luma Ultraベースを使用します。スマートグラスの精度を確認するために、ご自身のスマートグラスをキャリブレーションしてください。</string> + <string name="tracking_recovery_restart_help">まだ行き詰まっていますか?携帯電話で: スマートグラス → 追跡 → セットアップを開く → 診断を表示 → 追跡を再開します。</string> + <string name="tracking_recovery_disconnected">スマートグラスが切断されました</string> + <string name="tracking_recovery_connect">USB 接続を確認し、スマート グラスを再接続します。\nスマートフォンに USB アクセス プロンプトが表示されたら、これを受け入れます。</string> + <string name="tracking_recovery_usb_help">接続したら、明るい部屋でゆっくり周りを見回して追跡を復元します。</string> + <string name="tracking_recovery_recenter">中心のリセットが必要です</string> + <string name="tracking_recovery_recenter_steps">トラッキングが新しい位置で再開しました。\n正面を向いてから、スマートフォンの「トラッキングセンターのリセット」をタップしてください。</string> + <string name="tracking_recovery_recenter_help">スマートグラスの「トラッキング」→「セットアップを開く」からも「トラッキングセンターのリセット」が可能です。保存されたカメラキャリブレーションは保持されます。</string> + <string name="tracking_recovery_stabilizing">ちょっと静止してください</string> + <string name="tracking_recovery_hold">トラッキングセンターのリセット処理中です。\nトラッキングが安定するまで、スマートグラスを動かさないでください。</string> + <string name="tracking_recovery_automatic">ヘッドトラッキングの準備が完了すると、この画面は自動的に閉じます。</string> + <string name="glasses_steady_hand_aim">手による照準の安定化</string> + <string name="glasses_steady_hand_aim_hint">肩から手のひらを通って狙います。手首で回転を制御する場合はオフにします。</string> + <string name="spatial_title">空間設定</string> + <string name="spatial_wait_tracking">追跡を待っています…</string> + <string name="spatial_cameras_description">左右の追跡カメラ</string> + <string name="spatial_camera_sync">カメラ同期</string> + <string name="spatial_ready">準備完了</string> + <string name="spatial_sync_hint">カメラとヘッドトラッキングが揃うのを待っています。スマートグラスを接続したままにしてください。</string> + <string name="spatial_prepare">1. キャリブレーションターゲットを準備します</string> + <string name="spatial_print_actual">実寸で印刷する</string> + <string name="spatial_print_hint">各正方形の寸法は 30 mm (1.181 インチ) でなければなりません。明るい場所の硬い面にシートを平らに取り付けます。</string> + <string name="spatial_print">キャリブレーションボードを印刷</string> + <string name="spatial_capture_group">2. さまざまなビューをキャプチャする</string> + <string name="spatial_board_stationary">キャリブレーションターゲットを静止させます</string> + <string name="spatial_capture_hint">スマートグラスを近づけたり、遠ざけたり、横に動かしたりします。左右に回転させたり、上下に角度を付けたり、横に傾けたりします。キャリブレーション ターゲットを両方のカメラに保持し、各キャプチャの前に少し停止します。</string> + <string name="spatial_start">新しいキャリブレーションを開始する</string> + <string name="spatial_wait_sync">カメラの同期を待っています。</string> + <string name="spatial_start_hint">新しいキャリブレーションを開始してビューを収集します。</string> + <string name="spatial_views_hint">両方のプレビューでキャリブレーションターゲットを表示したままにします。さまざまな角度から少なくとも 24 の鮮明なビューを撮影します。</string> + <string name="spatial_capturing">キャプチャ中…</string> + <string name="spatial_capture">キャリブレーションターゲットビューのキャプチャ</string> + <string name="spatial_alignment">カメラアライメントを計算する</string> + <string name="spatial_calculating">計算中…</string> + <string name="spatial_calculate">キャリブレーションを計算する</string> + <string name="spatial_distance_group">3.距離を確認する</string> + <string name="spatial_distance">測定距離</string> + <string name="spatial_distance_hint">印刷されたマーカーが検出しやすいように、12 インチまたは 30 cm から始めます。使用する正確な測定値を選択してください。</string> + <string name="spatial_camera_board_distance">左カメラからキャリブレーションターゲット中心まで</string> + <string name="spatial_checking_distance">距離を確認中…</string> + <string name="spatial_validate">距離の検証</string> + <string name="spatial_diagnostics">診断</string> + <string name="spatial_show_diagnostics">診断を表示する</string> + <string name="spatial_diagnostics_hint">カメラのタイミングおよび追跡回復ツール。</string> + <string name="spatial_camera_timing">カメラのタイミング</string> + <string name="spatial_hand_input">手の追跡からの入力</string> + <string name="spatial_wait_timing">カメラのタイミングを待っています。</string> + <string name="spatial_frames">カメラ画像</string> + <string name="spatial_gpu">手のGPU検出</string> + <string name="spatial_gpu_hint">CPU がデフォルトです。 GPU は実験的なものであるため、SteamVR が再起動する可能性があります。この選択は、追跡が再開されるとリセットされます。</string> + <string name="spatial_lite">手モデルのライト検出</string> + <string name="spatial_lite_hint">Lite 手のひら検出器と手の Lite キー ポイントを使用します。照準、ピンチ、グラブの精度を確認します。トラッキングを再開するとリセットされます。</string> + <string name="spatial_adaptive">手の追跡のための自動入力周波数</string> + <string name="spatial_adaptive_hint">入力を処理速度に調整します。トラッキングを再開するとリセットされます。</string> + <string name="spatial_half_rate">手の追跡のための入力周波数を制限する</string> + <string name="spatial_half_rate_hint">カメラ画像の半分を使用します。最大周波数を比較する場合はオフにします。トラッキングを再開するとリセットされます。</string> + <string name="spatial_diagnostic_capture">診断キャプチャ</string> + <string name="spatial_diagnostic_capture_hint">1 つのステレオ画像ペアをローカルに保存します。画像は要求された場合にのみ保存されます。</string> + <string name="spatial_save_frame">カメラ画像の保存</string> + <string name="spatial_restart_tracking">追跡を再開する</string> + <string name="spatial_restart_hint">明るい場所でトラッキングが回復しない場合に使用します。再起動には新しい追跡起点が必要です。</string> + <string name="spatial_restart">再起動</string> + <string name="spatial_restart_title">追跡を再開しますか?</string> + <string name="spatial_restart_confirm">保存されていないキャリブレーションビューは失われます。その後、スマートグラスを動かさずに、トラッキングが復元されたらトラッキングセンターをリセットしてください。</string> + <string name="spatial_views_count">%1$d / 24 ビューがキャプチャされました</string> + <string name="spatial_capture_paused">キャプチャが一時停止されました: %1$s</string> + <string name="spatial_measure_hint">%1$s を測定します。両方のプレビューで完全なキャリブレーション ターゲットを表示し、静止したままにします。</string> + <string name="spatial_timing_values">%1$.1f Hz • 画像期間 %2$.1f ms • 処理時間 %3$.1f ms</string> + <string name="spatial_input_values">カメラ画像の入力制限 %1$.1f Hz • %2$.0f%%。ヘッドトラッキングは最大周波数で継続します。</string> + <string name="spatial_frame_counts">%1$d が処理されました • %2$d がドロップされました • %3$d は入力制限によりスキップされました</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra キャリブレーション</string> + <string name="spatial_print_scale" formatted="false">100% / 実際のサイズで印刷します。各正方形: 30 mm (1.181 インチ)。</string> + <string name="spatial_print_stationary">キャリブレーションターゲットを平らで静止した状態に保ちます。キャプチャ間でスマート グラスを移動します。</string> + <string name="spatial_print_check">スケール チェック: 目盛間 100 mm (3.937 インチ)</string> + <string name="spatial_distance_12in">12 インチ (30.48 センチメートル)</string> + <string name="spatial_distance_30cm">30cm (11.81インチ)</string> + <string name="spatial_distance_20in">20 インチ (50.8 センチメートル)</string> + <string name="spatial_distance_50cm">50cm (19.69インチ)</string> + <string name="spatial_disabled">無効</string> + <string name="spatial_wait_stable">安定した追跡を待っています</string> + <string name="spatial_disconnected">切断されました</string> + <string name="spatial_hands_off">素手で操作するコントローラーはオフです</string> + <string name="spatial_tracking_off">位置追跡がオフになっているか、スマートグラスが接続されていません</string> + <string name="spatial_recenter_pending">トラッキングセンターのリセットが要求されました。トラッキングが安定するまで動かないでください。</string> + <string name="spatial_tracking_lost">追跡が失われました — 細部が見える明るい場所に面してください</string> + <string name="spatial_origin_changed">トラッキングの原点が変更されました。「トラッキングセンターのリセット」をタップしてから、動かないでください。</string> + <string name="spatial_active">6DoF アクティブ</string> + <string name="spatial_connect_hint">Luma Ultra を接続し、位置追跡を有効にします。</string> + <string name="spatial_validation_session">この接続のキャリブレーションが検証されました。</string> + <string name="spatial_validation_saved">キャリブレーションが検証され、保存されました。</string> + <string name="spatial_wait_cameras">ステレオカメラ待ち</string> + <string name="spatial_wait_hands">手の追跡を待っています</string> + <string name="spatial_collect_instructions">5 × 7 キャリブレーション ターゲットを静止したままにします。スマートグラスを動かしたり回転させたりしながら、24 以上のビューをキャプチャします。</string> + <string name="spatial_capture_pending">次のカメラ画像を待っています。スマートグラスを動かさないでください。</string> + <string name="spatial_validation_pending">次のカメラ画像を確認します。完全なキャリブレーションターゲットが見える状態を維持し、静止してください。</string> + <string name="spatial_start_first">まずキャリブレーションを開始します</string> + <string name="spatial_no_camera_frame">新しいカメラ画像が到着しませんでした。スマートグラスの接続とカメラのプレビューを確認してから、再試行してください。</string> + <string name="spatial_clock_reset">カメラクロックリセット</string> + <string name="spatial_frame_changed">トラッキング座標系が変更されました。ビューは再計算のために保存されます。トラッキングセンターをリセットしてから、新しいセットを開始して、さらに多くのビューをキャプチャしてください。</string> + <string name="spatial_device_loaded">デバイスキャリブレーションがロードされました</string> + <string name="spatial_base_loaded">Luma Ultra ベース キャリブレーションをロードしました</string> + <string name="spatial_calibration_needed">校正が必要です</string> + <string name="spatial_tap_start">まず「新しいキャリブレーションを開始」をタップします。</string> + <string name="spatial_capture_recenter_pending">トラッキングセンターのリセットは、安定したトラッキングを待っています。しばらく動かないでください。</string> + <string name="spatial_capture_recenter">トラッキングが変更されました。トラッキングセンターのリセットを一度タップし、静止してから撮影してください。</string> + <string name="spatial_capture_unsynchronized">キャプチャが拒否されました: ヘッド トラッキングが同期されていないか、キャプチャ中に変更されました。静止してもう一度試してください。</string> + <string name="spatial_align_first">距離を確認する前にカメラの位置を計算します。</string> + <string name="spatial_processing_failed">カメラ処理に失敗しました</string> + <string name="spatial_hand_head_changed">手の検出中にヘッドトラッキングが変更されました</string> + <string name="spatial_hand_wait_sync">カメラとヘッドの同期待ち</string> + <string name="spatial_no_wrists">手首は検出されませんでした。 Joy-Con コントローラーのハンドルをスマートグラスの前に置いてください</string> + <string name="spatial_no_hands">手が検出されませんでした。スマートグラスの前で開いた手のひらを見せる</string> + <string name="spatial_one_camera_wrists">手首は 1 台のカメラでのみ表示されます。コントローラーのハンドルを共有ビューに保持します</string> + <string name="spatial_one_camera_hands">手は 1 台のカメラでのみ表示されます。両方の手のひらを共有ビューに保ちます</string> + <string name="spatial_ambiguous_hands">両方のカメラで手は見えますが、左右の一致があいまいです</string> + <string name="spatial_inconsistent_depth">手は検出されましたが、ステレオの深度が一貫していません</string> + <string name="spatial_rejected_wrist">手首の位置がステレオまたはモーション チェックで拒否されました</string> + <string name="spatial_inconsistent_palm">ステレオ ポイントが検出されましたが、手のひらのジオメトリが一貫していません</string> + <string name="spatial_hands_need_calibration">手のトラッキングを有効にするには、キャリブレーションと距離チェックを完了してください</string> + <string name="spatial_hands_wait_stable">安定したヘッドトラッキングを待機中。必要に応じてトラッキングセンターをリセットします。</string> + <string name="spatial_old_frame">カメラによる観察は古すぎる。新しいペアを待っています</string> + <string name="spatial_fit_ready">%1$.2f ピクセルにフィットします。左側のカメラからキャリブレーション ターゲットの中心までの選択した距離を測定し、検証します。</string> + <string name="spatial_opencv_error">OpenCV は利用できません: %1$s</string> + <string name="spatial_restored">%1$d 個の保存されたビューが復元されました。キャリブレーションを計算して再試行するか、新しいセットを開始してさらにキャプチャします。</string> + <string name="spatial_captured">%1$d / 24 ビューをキャプチャしました。キャリブレーションターゲットを固定してください。次のビューのためにスマート グラスを移動します。</string> + <string name="spatial_capture_corners">キャプチャが拒否されました: %1$d / 12 個の必須コーナーが両方のカメラに表示されます。キャリブレーション ターゲットをさらに表示し、静止してからもう一度試してください。</string> + <string name="spatial_validation_error">距離チェックを完了できませんでした: %1$s。もう一度やり直してください。</string> + <string name="spatial_inference_error">手の検出が利用できません: %1$s。 CPU/GPUを変更するか、素手で操作するコントローラーを切り替えて再試行してください。</string> + <string name="spatial_hand_timeout">手の検出が %1$d ミリ秒を超えました。観察は破棄されました</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con の手首の位置をステレオで測定</string> + <string name="spatial_palms_tracked">追跡中の手のひら: %1$d / 2、ピンチ可能: %2$d、つかむ操作が可能: %3$d</string> + <string name="spatial_capture_saved">診断キャプチャを %1$s に保存しました</string> + <string name="spatial_hand_error">停止した手の追跡: %1$s</string> + <string name="spatial_stereo_loaded">ステレオ %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">ヘッドトラッキングとキャリブレーションターゲットは、%1$s (制限 5 cm / 2 インチ) によって一致しません。新しいセットを開始する前に、キャリブレーションターゲットを固定したままにして、安定した追跡を待ちます。スマートグラスをゆっくり回転させたり傾けたりしてください。各キャプチャの前に一時停止します。</string> + <string name="spatial_need_views">静止した校正ターゲットの少なくとも 24 のさまざまなビューをキャプチャします。</string> + <string name="spatial_need_rotation">スマートグラスを左右に回し、上下に傾けます。回転を伴わない動きではカメラの位置を調整できません。</string> + <string name="spatial_bad_baseline">信じられないカメラのベースライン</string> + <string name="spatial_need_orientations">頭をより多様な方向に動かします。</string> + <string name="spatial_bad_rotation">カメラから頭への回転が無効です</string> + <string name="spatial_bad_alignment">カメラとヘッドの位置合わせが一貫していません。</string> + <string name="spatial_calibration_error">キャリブレーションを完了できませんでした。 %1$s キャプチャしたビューは保存されます。</string> + <string name="spatial_reprojection_error">保留された再投影エラー %1$.2f ピクセルが 2 ピクセルを超えています。再調整します。</string> + <string name="spatial_distance_corners">%1$d / 24 個のチェッカーボード コーナーが両方のカメラで検出されました。完全なキャリブレーションターゲットが見える状態を維持し、静止してください。すでに表示されている場合は、12 インチまたは 30 cm を選択し、再試行する前にさらに近い距離を測定します。</string> + <string name="spatial_distance_depth">校正ターゲットは目に見えますが、その深さを確実に測定することはできませんでした。スマート グラスを動かさずに保持し、キャリブレーション ターゲットを平らで明るい状態に保ってから、再試行してください。</string> + <string name="spatial_distance_invalid">カメラ測定が無効でした。静止してもう一度試してください。</string> + <string name="spatial_distance_passed">距離チェックに合格しました。</string> + <string name="spatial_distance_retry">左カメラからキャリブレーションターゲット中心までの距離を再確認し、再試行してください。</string> + <string name="spatial_distance_result">カメラは %1$s を測定しました。選択された距離 %2$s。 %3$s</string> + <string name="spatial_wait_previews">キャリブレーションを開始する前に、両方のカメラのプレビューを待ちます。</string> + <string name="spatial_saved_views_hint">保存されたビューは再計算できます。新しいキャリブレーションを開始して、現在のトラッキング座標系でキャプチャします。</string> + <string name="spatial_model_checksum_error">ハンドモデルのチェックサムの不一致</string> + <string name="spatial_opencv_load_error">OpenCVをロードできませんでした</string> + <string name="tracking_recovery_look">明るい部屋でゆっくりと周囲を見回してください。\nトラッキングカメラを遮るものがないように、家具などの見えるものに顔を向けてください。</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> </resources> diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 6d5ef3a49c..0705efab91 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="steamvr_recovery_title">SteamVR 그래픽 중지됨</string> + <string name="steamvr_recovery_countdown">그래픽을 초기화하고 SteamVR을 다시 열기 위해 %1$d초 후 DroidDeck이 다시 시작됩니다. 실행 중인 게임은 종료되며, 저장하지 않은 진행 상황은 복구할 수 없습니다.</string> + <string name="steamvr_recovery_repeated">최근 다시 시작한 후 그래픽 오류가 다시 발생했습니다. 반복을 막기 위해 자동 복구를 일시 중지했습니다. 다시 시작하면 게임이 종료되며, 저장하지 않은 진행 상황은 복구할 수 없습니다.</string> + <string name="steamvr_recovery_restart">지금 다시 시작</string> + <string name="steamvr_recovery_cancel">열어 두기</string> + <string name="steamvr_recovery_restarting">그래픽을 초기화하고 SteamVR을 다시 여는 중…</string> + <string name="steamvr_recovery_failed">DroidDeck을 자동으로 다시 시작하지 못했습니다. 앱을 완전히 종료한 후 다시 여세요.</string> <string name="app_name">DroidDeck</string> <string-array name="loading_hints"> <item>첫 실행 시 Steam을 다운로드합니다. 몇 분 정도 걸릴 수 있습니다.</item> @@ -15,8 +22,10 @@ <string name="session_channel">세션</string> <string name="session_channel_description">Steam 또는 데스크톱 세션이 실행 중일 때 표시</string> <string name="session_notification">Steam이 실행 중입니다</string> + <string name="session_notification_downloads">Steam 다운로드 진행 중</string> <string name="session_notification_paused">세션이 일시 중지됨 - 준비되면 \"재개\"를 탭하세요</string> <string name="resume_session">재개</string> + <string name="suspend_now">지금 일시 중지</string> <string name="stop_session">세션 종료</string> <string name="frame_gen_title">프레임 생성</string> <string name="frame_gen_hint">사용할 프레임 생성 모드를 선택하세요</string> @@ -182,6 +191,8 @@ <string name="add_app_flatpak_id">앱 ID</string> <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> <string name="add_app_flatpak_invalid">유효한 Flathub 앱 ID가 아닙니다</string> + <string name="add_app_flatpak_bundle_hint">또는 Flathub에 없는 앱의 .flatpak 파일.</string> + <string name="add_app_pick_flatpak">.flatpak 파일 선택</string> <string name="add_app_source">소스</string> <string name="add_app_appearance">데스크톱에 표시</string> <string name="add_app_preview_name">새 앱</string> @@ -251,6 +262,10 @@ <string name="mode_osc">화면 컨트롤</string> <string name="mode_osc_qam">Steam + QAM</string> <string name="mode_osc_note">자동 모드에서는 컨트롤러가 연결되지 않은 경우 화면 컨트롤을 표시합니다.</string> + <string name="osc_steam_touch">Steam 터치(베타)</string> + <string name="osc_style_next_session">Steam 터치 컨트롤은 다음 Steam 세션부터 적용됩니다</string> + <string name="osc_steam_layout">Steam 터치 레이아웃</string> + <string name="osc_steam_layout_hint">이 게임의 터치 컨트롤을 옮기거나 크기를 바꾸거나 숨깁니다. Steam에 저장됩니다</string> <string name="mode_controller">컨트롤러</string> <string name="mode_controller_hint">Steam이 컨트롤러를 인식하는 방식입니다. 다음 세션에 적용됩니다.</string> <string name="mode_controller_deck">Steam Deck 컨트롤러</string> @@ -268,6 +283,11 @@ <string name="mode_suspend_manual">수동</string> <string name="mode_suspend_native">네이티브</string> <string name="mode_suspend_steam_note">자동: 일시 중지되고 다시 표시되면 재개됩니다. 네이티브: 먼저 Steam을 절전에 대비시킵니다. 수동: \"재개\"를 탭할 때까지 기다립니다. 안 함: 계속 실행됩니다.</string> + <string name="mode_background_downloads">다운로드 계속 진행</string> + <string name="mode_background_downloads_hint">Steam이 다운로드 중일 때는 백그라운드 일시 중지를 미룹니다.</string> + <string name="mode_zram">zRAM 압축</string> + <string name="mode_zram_hint">게임을 실행하는 동안 Steam 클라이언트의 메모리가 기기의 zram으로 압축되어 게임에 더 많은 메모리가 남습니다. 다음에 Steam을 시작할 때 적용됩니다.</string> + <string name="mode_zram_unsupported">사용할 수 없음: 이 기기에 zram 또는 swap이 없거나 커널이 5.4 미만입니다.</string> <string name="mode_suspend_note">자동: 백그라운드에서 일시 중지되고 다시 표시되면 재개됩니다. 수동: \"재개\"를 탭할 때까지 기다립니다. 안 함: 계속 실행됩니다.</string> <string name="mode_startup">시작</string> <string name="mode_steam_startup">DroidDeck을 열 때 Steam 시작</string> @@ -296,8 +316,8 @@ <string name="mode_sgdb_key">SteamGridDB API 키</string> <string name="mode_sgdb_key_yours">내 키</string> <string name="mode_sgdb_edit">편집…</string> - <string name="mode_added_art_hint">폴더 이름을 기준으로 누락된 이미지를 채웁니다. 게임 폴더의 cover.jpg, hero.jpg, logo.png 또는 icon.png가 우선적으로 사용됩니다.</string> - <string name="summary_remove_game">Remove %1$s</string> + <string name="mode_added_art_hint">누락된 이미지를 Steam, 그다음 SteamGridDB에서 채웁니다. 게임 폴더의 cover.jpg, hero.jpg, logo.png 또는 icon.png가 우선적으로 사용됩니다.</string> + <string name="summary_remove_game">%1$s 제거</string> <string name="mode_added_remove_confirm">제거?</string> <string name="games_add">게임 추가</string> <string name="games_add_title">게임 추가:</string> @@ -331,16 +351,20 @@ <string name="wincomp_found_shipped">게임에 %1$s이(가) 있습니다 (대개 그대로 작동)</string> <string name="wincomp_already_here">이 게임에 이미 있음</string> <string name="wincomp_no_recommendation">게임 폴더에서 필요한 구성 요소를 가리키는 것이 없습니다.</string> + <string name="wincomp_active">이 게임에 설치됨 (%1$d)</string> <string name="wincomp_all">모든 구성 요소 (%1$d)</string> <string name="wincomp_installers">Windows 설치 프로그램 필요 (%1$d)</string> - <string name="wincomp_installers_note">이 항목들은 프리픽스 안에서 실제 설치 프로그램을 실행합니다(.NET, PhysX, XNA, 전체 Visual C++ 설치 프로그램 등). DroidDeck은 아직 지원하지 않으며 다음에 지원할 예정입니다.</string> + <string name="wincomp_installers_note">이 항목들은 내부에 풀어낼 패키지가 없는 자체 설치 프로그램이며, 설치하는 내용은 아직 기록되지 않았습니다. 대부분 Proton에 포함된 Mono가 이미 대신하는 오래된 런타임이며, 기록은 만들어지는 대로 추가됩니다.</string> <string name="wincomp_show">표시</string> <string name="wincomp_hide">숨기기</string> - <string name="wincomp_needs_installer">Windows 설치 프로그램 필요 (예정)</string> + <string name="wincomp_needs_installer">자체 설치 프로그램을 실행합니다 (아직 기록 없음)</string> <string name="wincomp_unsupported">아직 여기서 지원되지 않음</string> <string name="wincomp_loading">구성 요소를 불러오는 중…</string> <string name="wincomp_failed">설치할 수 없습니다: %1$s</string> <string name="wincomp_downloaded">다운로드됨</string> + <string name="wincomp_downloading">%1$s 다운로드 중</string> + <string name="wincomp_installing">설치 중: %1$s</string> + <string name="wincomp_reverting">끄는 중…</string> <string name="wincomp_download_size">%1$s 다운로드</string> <string name="wincomp_next_launch">다음에 게임을 시작할 때 적용됩니다.</string> <string name="mode_stretch169">16:9 게임 늘리기</string> @@ -397,6 +421,51 @@ <string name="comp_check_nightlies">Nightlies의 새 패키지 확인</string> <string name="comp_proton">Proton</string> <string name="comp_proton_note">여기에서 선택한 Proton은 Steam에서 Proton을 따로 선택하지 않은 모든 게임을 실행하며, Steam에서 변경한 내용도 여기에 표시됩니다. Steam 업데이트 시 Valve의 Proton이 교체되지만 각 빌드의 원본 파일은 유지됩니다.</string> + <string name="comp_scope">구성</string> + <string name="comp_profile_configure">프로필 구성</string> + <string name="comp_profile">프로필</string> + <string name="comp_scope_general">기본 프로필</string> + <string name="comp_scope_general_detail">재정의가 없는 게임에서 자동으로 사용됩니다.</string> + <string name="comp_profile_game_detail">%1$s 실행 시 자동으로 사용되는 저장된 설정입니다.</string> + <string name="comp_game_hint">이 게임에 필요한 설정만 선택하세요. 나머지는 계속 기본 프로필을 사용합니다.</string> + <string name="comp_game_fex">FEX 프리셋</string> + <string name="comp_game_fex_inherited">기본 프로필의 프리셋 사용 중.</string> + <string name="comp_game_fex_override">이 게임에 사용자 정의 프리셋이 저장되었습니다.</string> + <string name="comp_game_fex_custom">사용자 정의 FEX 변수</string> + <string name="comp_game_use_general">기본값 사용</string> + <string name="comp_game_compatibility">게임 호환성</string> + <string name="comp_game_environment_hint">이 게임의 Proton, DXVK, VKD3D 및 동기화 환경 옵션입니다.</string> + <string name="comp_game_proton_inherited">기본 프로필의 Proton 사용 중.</string> + <string name="comp_game_proton_override">Steam 호환성 매핑을 통해 이 게임에 사용자 정의 Proton이 저장되었습니다.</string> + <string name="comp_no_proton_short">Proton 없음</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">이 게임에서 다른 패키지를 선택하지 않으면 %1$s의 기본 프로필 패키지를 사용합니다.</string> + <string name="comp_game_component_general">기본 프로필의 구성 요소 패키지를 사용합니다.</string> + <string name="comp_game_component_override">이 게임에만 %1$s을(를) 사용합니다.</string> + <string name="comp_game_runtime_options">런타임 옵션</string> + <string name="comp_game_environment_other_hint">기타 게임별 Proton, DXVK, VKD3D-Proton 및 동기화 환경 옵션입니다.</string> + <string name="comp_game_saved_next">%1$s의 프로필이 저장되었습니다. 다음 게임 실행 시 적용됩니다.</string> + <string name="game_no_steam_title">Steam 없이 시작</string> + <string name="game_no_steam_detail">Steam 클라이언트 없이 Proton/FEX에서 엽니다. Steam 기능은 꺼집니다.</string> + <string name="game_no_steam_on">켜짐</string> + <string name="game_steam_with">Steam과 함께 시작</string> + <string name="game_steam_without">Steam 없이 시작</string> + <string name="game_settings_card">설정</string> + <string name="game_settings_menu_title">%1$s 설정</string> + <string name="game_settings_default">기본값</string> + <string name="game_settings_default_detail">이 게임에서 변경한 모든 항목을 앱 설정으로 되돌립니다.</string> + <string name="game_sync_custom">사용자 지정 동기화 변수</string> + <string name="comp_game_proton_live">%1$s의 Proton 선택이 저장되었으며 지금 Steam에서 사용할 수 있습니다.</string> + <string name="comp_game_proton_next">%1$s의 Proton 선택이 저장되었습니다. 게임을 실행하기 전에 Steam을 다시 시작하세요.</string> + <string name="comp_game_proton_not_runnable">%1$s은(는) 이 기기에서 선택한 Proton을 사용할 수 없습니다.</string> + <string name="comp_game_load_failed">%1$s의 프로필을 불러올 수 없습니다: %2$s</string> + <string name="comp_game_save_failed">게임 프로필을 저장할 수 없습니다: %1$s</string> + <string name="comp_game_reset">게임 프로필 초기화</string> + <string name="comp_game_reset_title">%1$s의 프로필을 초기화하시겠습니까?</string> + <string name="comp_game_reset_body">이 게임의 Proton, FEX, 구성 요소 패키지, 환경, 텍스처 필터링 및 Windows 구성 요소 재정의를 제거하시겠습니까? 이후 기본 프로필을 사용합니다.</string> + <string name="comp_game_reset_done">이제 %1$s은(는) 기본 프로필을 사용합니다.</string> + <string name="comp_game_reset_failed">게임 프로필을 완전히 초기화할 수 없습니다: %1$s</string> <string name="comp_default_live">이제 Steam에서 Proton을 따로 선택하지 않은 모든 게임을 %1$s(으)로 실행합니다.</string> <string name="comp_default_next">다음에 Steam을 시작할 때부터 Proton을 따로 선택하지 않은 모든 게임을 %1$s(으)로 실행합니다.</string> <string name="comp_default_not_runnable">%1$s(으)로는 여기에서 게임을 실행할 수 없으므로 기본값으로 설정할 수 없습니다.</string> @@ -521,6 +590,10 @@ <string name="drawer_cas">샤프닝(CAS)</string> <string name="drawer_cas_level">샤프닝 강도</string> <string name="drawer_fake_hdr">가상 HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">SteamVR 시작</string> + <string name="steamvr_checking">SteamVR 확인 중…</string> <string name="drawer_deband">디밴딩</string> <string name="drawer_deband_strength">디밴딩 강도</string> <string name="drawer_brightness">밝기</string> @@ -538,6 +611,11 @@ <string name="drawer_texture_sharpness_note">음수 밉 바이어스: 텍스처가 선명해지지만 약간 깜박일 수 있습니다. 자동으로 설정하면 세션 화면이 확대되는 정도에 맞춥니다.</string> <string name="drawer_touch_auto">자동(%1$s)</string> <string name="drawer_keyboard">키보드</string> + <string name="drawer_latency">지연</string> + <string name="drawer_low_latency_controller">저지연 컨트롤러</string> + <string name="drawer_low_latency_controller_hint">컨트롤러가 250 Hz 대신 1000 Hz로 보고됩니다. CPU 사용량이 약간 늘어납니다.</string> + <string name="drawer_low_latency_touch">저지연 터치</string> + <string name="drawer_low_latency_touch_hint">터치가 프레임 병합을 건너뛰고 Steam 터치가 1000 Hz로 보고됩니다. CPU 사용량이 약간 늘어납니다.</string> <string name="drawer_pc_keyboard">PC 키보드</string> <string name="drawer_android_keyboard">Android</string> <string name="drawer_second_screen">보조 화면</string> @@ -560,11 +638,23 @@ <string name="drawer_stop_title">세션을 중지하시겠습니까?</string> <string name="drawer_running_now">현재 실행 중</string> <string name="drawer_no_game">현재 Proton으로 실행 중인 게임이 없습니다</string> + <string name="drawer_selected_profile">게임 프로필</string> + <string name="drawer_selected_profile_none">프로필 세부 정보를 아직 사용할 수 없습니다.</string> + <string name="drawer_profile_refresh_failed_initial">게임 프로필을 불러올 수 없습니다. 자동으로 다시 시도합니다.</string> + <string name="drawer_profile_refresh_failed_stale">게임 프로필을 새로 고칠 수 없습니다. 마지막으로 가져온 데이터를 표시하며 자동으로 다시 시도합니다.</string> + <string name="drawer_profile_inspect_hint">다음 실행 시 사용되는 저장된 설정을 보고 편집합니다.</string> + <string name="drawer_profile_default">기본 프로필 사용 중</string> + <string name="drawer_profile_custom">사용자 정의 프로필</string> + <string name="drawer_component_inherited">기본 프로필의 %1$s 사용 중.</string> + <string name="drawer_game_components_note">변경 사항은 %1$s의 프로필에 저장되며 다음 게임 실행 시 적용됩니다.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="other">게임 재정의 %1$d개</item> + </plurals> <string name="drawer_no_proton">Proton이 설치되지 않았습니다.</string> <string name="drawer_game_running">게임 실행 중</string> <string name="drawer_reapplied">%1$s 시작 시 다시 적용됨</string> <string name="drawer_original">원본</string> - <string name="drawer_components_note">\"구성 요소\" 페이지에서 다운로드, 가져오기 및 삭제하세요.</string> + <string name="drawer_components_note">구성 요소 페이지에서 가져오기 및 삭제하세요.</string> <string name="setup_check_done">완료</string> <string name="setup_check_warn">처리 필요</string> <string name="setup_check_busy">처리 중</string> @@ -616,6 +706,14 @@ <string name="setup_saved_logs">저장된 세션 로그</string> <string name="setup_saved_logs_hint">최신 %1$d개 유지</string> <string name="setup_clear_logs">로그 지우기</string> + <string name="setup_reset_settings">모든 설정 초기화</string> + <string name="setup_reset_settings_hint">모든 설정을 기본값으로 되돌립니다</string> + <string name="setup_reset_settings_button">초기화</string> + <string name="setup_reset_settings_title">모든 설정을 초기화할까요?</string> + <string name="setup_reset_settings_body">화면, 성능, 컨트롤러, 테마, 언어 및 런처 설정이 기본값으로 돌아갑니다. 게임, Steam 로그인, 스토어 계정, 다운로드한 드라이버 및 저장소 폴더는 유지됩니다.</string> + <string name="setup_reset_settings_profiles">게임 프로필도 초기화 (각 게임의 Proton, FEX, 구성 요소 및 환경, 기본 프로필의 환경)</string> + <string name="setup_reset_settings_session_running">설정을 초기화하기 전에 세션을 중지하세요.</string> + <string name="setup_reset_settings_partial">설정이 초기화되었지만 일부는 초기화하지 못했습니다. 자세한 내용은 로그를 확인하세요.</string> <string name="setup_offline">오프라인 모드</string> <string name="setup_sign_in_first">먼저 Steam에 로그인하세요</string> <string name="setup_launcher">런처</string> @@ -631,6 +729,10 @@ <string name="setup_home">홈 화면으로 사용</string> <string name="setup_home_on">DroidDeck을 홈 앱으로 사용할 수 있습니다</string> <string name="setup_home_off">DroidDeck은 홈 앱으로 제공되지 않습니다</string> + <string name="setup_orientation">화면 방향</string> + <string name="setup_orientation_auto">자동 가로 모드</string> + <string name="setup_orientation_landscape">가로 모드</string> + <string name="setup_orientation_reverse">역방향 가로 모드</string> <string name="setup_fullscreen">전체 화면</string> <string name="setup_fullscreen_on">Android 상태 표시줄 및 탐색 표시줄 숨기기</string> <string name="setup_fullscreen_off">Android 상태 표시줄 및 탐색 표시줄 표시</string> @@ -819,8 +921,8 @@ <string name="wadb_turn_off">제한 끄기</string> <string name="wadb_other_ways">기타 변경 방법</string> <string name="wadb_dev_try_first">1 · 개발자 옵션(먼저 시도)</string> - <string name="wadb_restrict_on">\"하위 프로세스 제한\"을 켭니다.</string> - <string name="wadb_restrict_off">\"하위 프로세스 제한\"을 끕니다.</string> + <string name="wadb_restrict_on">\"하위 프로세스 제한 사용 중지\"를 끕니다.</string> + <string name="wadb_restrict_off">\"하위 프로세스 제한 사용 중지\"를 켭니다.</string> <string name="wadb_computer_last">3 · PC ADB(최후의 수단)</string> <string name="wadb_only_if">무선 디버깅을 사용할 수 없을 때만 사용하세요.</string> <string name="wadb_computer_group">3 · PC ADB(최후의 수단)</string> @@ -841,6 +943,8 @@ <string name="ctrl_keyboard_button">키보드 버튼</string> <string name="ctrl_select_steam">Select를 눌러 Steam 메뉴 열기</string> <string name="ctrl_select_steam_hint">View/Select 대신.</string> + <string name="ctrl_joycon_vr">Joy-Con을 VR 컨트롤러로 사용</string> + <string name="ctrl_joycon_vr_hint">SteamVR이 실행되는 동안 각 Joy-Con이 손이 됩니다. 앞을 향하게 한 채 HOME 또는 캡처 버튼을 길게 누르면 다시 가운데로 맞춥니다.</string> <string name="setup_animations">애니메이션</string> <string name="ctrl_adaptive_hint">스틱이 터치한 위치에 나타나며 손을 떼면 숨겨집니다</string> <string name="ctrl_layout">레이아웃</string> @@ -888,10 +992,17 @@ <string name="content_page_gone">해당 페이지가 더 이상 존재하지 않습니다. 왼쪽에서 항목을 선택하세요.</string> <string name="content_open_desktop">데스크톱 열기</string> <string name="content_install_open_desktop">설치 및 데스크톱 열기</string> + <string name="desktop_remove_title">데스크톱 제거</string> + <string name="desktop_remove_text">데스크톱과 번들 앱을 제거합니다. 게임, 추가한 앱, 설정 및 공유 라이브러리는 유지됩니다.</string> + <string name="desktop_removing">데스크톱 제거 중</string> + <string name="desktop_removed">데스크톱 제거됨</string> + <string name="desktop_cleaning_legacy">이전 LXQt 파일 제거 중</string> + <string name="desktop_removal_unknown">이 데스크톱 버전을 제거하기 전에 DroidDeck을 업데이트하세요.</string> <string name="content_linux_desktop">Linux 데스크톱</string> <string name="content_linux_desktop_hint">KDE Plasma, Firefox 및 에뮬레이터</string> <string name="games_empty">Steam에서 설치한 게임은 세션 종료 후 여기에 표시됩니다.</string> <string name="games_play_steam">Steam 실행</string> + <string name="games_play_steamvr">SteamVR 실행</string> <string name="games_launch_settings">실행 설정</string> <string name="games_launch">실행</string> <string name="games_files">게임 파일</string> @@ -916,6 +1027,8 @@ <string name="games_last_played">마지막 실행 %1$s</string> <string name="games_internal">내부 저장 공간</string> <string name="games_added">추가된 게임</string> + <string name="games_custom">사용자 정의 게임</string> + <string name="games_store_storage">게임 저장 공간</string> <string name="gpu_auto_hint">이 GPU에 가장 적합한 드라이버 조합을 선택하고 최신 상태로 유지합니다</string> <string name="gpu_manual_hint">드라이버 조합을 직접 선택</string> <string name="gpu_checking">드라이버 확인 중…</string> @@ -927,7 +1040,6 @@ <string name="gpu_set_with_runtime">런타임 드라이버와 함께 설정: %1$s에 둘 다 포함됩니다.</string> <string name="gpu_runtime_hint">게임 및 데스크톱에서 사용됩니다.</string> <string name="gpu_runtime_default">런타임 기본값</string> - <string name="gpu_display_hint">화면 출력을 담당합니다. DroidDeck을 다시 시작한 후 적용됩니다.</string> <string name="gpu_auto_by_gpu">자동 - GPU별 선택</string> <string name="gpu_manage">다운로드, 가져오기 또는 삭제…</string> <string name="gpu_in_use_caps">사용 중</string> @@ -957,6 +1069,12 @@ <string name="deck_tab_left">왼쪽 터치패드</string> <string name="deck_tab_right">오른쪽 터치패드</string> <string name="deck_tab_both">양쪽</string> + <string name="deck_tab_gamepad">게임패드</string> + <string name="deck_surface_stick">스틱</string> + <string name="deck_surface_trackpad">터치패드</string> + <string name="deck_surface_switch">스틱과 터치패드 간 전환</string> + <string name="deck_more_controls">Deck 컨트롤 더 보기</string> + <string name="deck_panels">패널</string> <string name="deck_close">보조 화면 컨트롤 닫기</string> <string name="deck_open_steam_menu">Steam 메뉴 열기</string> <string name="deck_left_upper">왼쪽 · 위</string> @@ -992,6 +1110,10 @@ <string name="proton_installed">%1$s 설치됨</string> <string name="proton_queued">이전 요청으로 인한 대기 항목</string> <string name="proton_not_installed">설치되지 않음</string> + <string name="proton_update_available">업데이트 있음 → %1$s</string> + <string name="proton_remove_older">이전 %1$s 버전 제거</string> + <string name="proton_remove_older_body">%1$s을(를) 제거합니다. 이 버전으로 설정된 게임은 다른 Proton으로 전환해야 합니다.</string> + <string name="proton_remove_body">이 버전으로 설정된 게임은 다른 Proton으로 전환해야 합니다.</string> <string name="proton_install_now">지금 설치</string> <string name="proton_cancel_queued">대기 취소</string> <string name="pckb_android">Android 키보드</string> @@ -1020,6 +1142,8 @@ <string name="game_env_eyebrow">Proton 게임</string> <string name="pip_title">PIP (픽처 인 픽처)</string> <string name="pip_auto">자동으로 PIP 시작</string> + <string name="unfolded_controls">펼친 화면의 컨트롤</string> + <string name="unfolded_controls_hint">펼치면 게임이 Steam Deck 터치패드와 뒷면 그립 위에 표시됩니다. 접으면 게임이 전체 화면으로 표시됩니다.</string> <string name="pip_suspended">일시 중지됨</string> <string name="pip_not_ready">세션이 준비되면 PIP를 사용할 수 있습니다.</string> <string name="pip_permission">Android 설정에서 DroidDeck의 PIP 사용을 허용하세요.</string> @@ -1045,19 +1169,12 @@ <string name="game_file_exported">게임 파일이 %1$s에 저장되었습니다</string> <string name="game_frontend_files">프론트엔드 파일</string> - <!-- Launcher, session and menus --> - - <!-- Launcher (MainActivity) --> <string name="main_wait_runtime">런타임 작업이 끝날 때까지 기다려 주세요</string> <string name="main_wait_proton_install">호환성 도구 설치가 끝날 때까지 기다려 주세요</string> <string name="main_wait_desktop_install">데스크톱 앱 설치가 끝날 때까지 기다려 주세요</string> <string name="main_wait_install_game">설치가 끝난 후 게임을 실행하세요</string> <string name="main_saves_close_session">게임이 가져온 데이터를 덮어쓰지 않도록 먼저 Steam 세션을 종료하세요</string> - - <!-- Busy line while saves are imported; %1$s is the game's name --> <string name="main_saves_importing">%1$s(으)로 가져오는 중</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the game's name --> <plurals name="main_saves_imported"> <item quantity="other">%2$s에서 %3$s(으)로 파일 %1$d개를 가져왔습니다</item> </plurals> @@ -1065,19 +1182,11 @@ <item quantity="other">%2$s에서 %3$s(으)로 파일 %1$d개를 가져왔습니다. 이전 저장 데이터는 Download/DroidDeck/Saves/backups에 백업되었습니다</item> </plurals> <string name="main_saves_pick_zip">%1$s의 저장 데이터 zip 선택</string> - - <!-- Busy line while saves are exported; %1$s is the game's name --> <string name="main_saves_exporting">%1$s 내보내는 중</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the zip's path --> <plurals name="main_saves_exported"> <item quantity="other">파일 %1$d개를 %2$s(으)로 내보냈습니다: %3$s</item> </plurals> - - <!-- %1$s is the game's name, %2$s the save layout --> <string name="main_saves_pick_folder">%1$s을(를) 저장할 위치 선택(%2$s)</string> - - <!-- %1$s is what was being done (e.g. Importing into Portal 2, Swapping), %2$s the error --> <string name="main_action_failed">%1$s 실패: %2$s</string> <string name="main_no_logs_yet">아직 세션 로그가 없습니다. 먼저 세션을 실행하세요.</string> <string name="main_no_logs_to_clear">지울 세션 로그가 없습니다.</string> @@ -1090,78 +1199,55 @@ <string name="main_adb_copied">ADB 명령이 복사되었습니다</string> <string name="main_pick_roms">ROM 폴더 선택</string> <string name="main_non_adreno_title">Adreno GPU가 아님</string> - - <!-- %1$s is the GPU's name, %2$.0f the download size in MB --> <string name="main_non_adreno_text">Turnip은 Adreno GPU를 지원합니다. %1$s에서는 Steam 화면이 검게 표시될 수 있습니다. 다운로드: %2$.0f MB.</string> <string name="main_install_anyway">그래도 설치</string> <string name="main_remove_runtime_title">Linux 런타임 제거</string> <string name="main_remove_runtime_text">런타임과 그 안의 Steam 클라이언트, 그리고 런타임에 설치된 모든 게임이 삭제됩니다.</string> - - <!-- Toast; %1$s is a list of components, separated by commas --> <string name="main_applied">적용됨: %1$s</string> <string name="android_app_open_failed_primary">메인 화면에서 %1$s을(를) 열 수 없습니다</string> - - <!-- %1$s is the app, %2$s the name of the display --> <string name="android_app_open_failed_on">%2$s에서 %1$s을(를) 열 수 없습니다</string> - - <!-- %1$s is the app, %2$d the display's number --> <string name="android_app_open_failed_display">디스플레이 %2$d에서 %1$s을(를) 열 수 없습니다</string> - - <!-- Components page busy lines, shown with … after them --> <string name="comp_busy_importing">가져오는 중</string> <string name="comp_busy_swapping">교체하는 중</string> <string name="comp_busy_restoring">복원하는 중</string> <string name="comp_busy_cancelling">취소하는 중</string> <string name="comp_busy_deleting">삭제하는 중</string> <string name="comp_cannot_read">파일을 읽을 수 없음</string> - - <!-- %1$s is a version or a name --> <string name="comp_imported">%1$s 가져옴</string> <string name="comp_swap_cancelled">대기 중이던 교체가 취소되었습니다.</string> <string name="comp_pick_wcp">구성 요소 패키지 선택(-linux .wcp)</string> <string name="comp_nightlies_unreachable">Nightlies에 연결할 수 없습니다</string> - - <!-- %1$s is the package version --> <string name="comp_stored">%1$s 저장됨</string> <string name="comp_download_failed">다운로드 실패: %1$s</string> <string name="drivers_pick_linux">Linux 런타임 드라이버 선택(-Linux zip 또는 Android + Linux 번들)</string> <string name="drivers_pick_android">디스플레이 드라이버 선택(AdrenoTools zip 또는 Android + Linux 번들)</string> <string name="drivers_pick_any">드라이버 zip 또는 Android + Linux 번들 선택</string> - - <!-- %1$s is a desktop app's name, %2$s what went wrong --> <string name="main_pkg_problem">%1$s: %2$s</string> <string name="main_removing_named">%1$s 제거 중…</string> <string name="main_forgetting_named">%1$s 잊는 중…</string> <string name="main_pick_game_storage">게임 저장 폴더 선택</string> <string name="main_pick_decky_zip">Decky 플러그인 ZIP 선택</string> <string name="main_storage_not_usable">사용할 수 없음: %1$s</string> - - <!-- What is running, when it is a program without a known name --> <string name="main_running_program">프로그램</string> <string name="main_removing_runtime">Linux 런타임 제거 중</string> <string name="main_settings_main_screen">하단 화면에서 설정을 열 수 없어 메인 화면에서 열었습니다.</string> <string name="main_open_dev_options">설정에서 개발자 옵션을 여세요</string> - <!-- Updates --> <string name="upd_unknown_apps_failed">Android의 \"출처를 알 수 없는 앱 설치\" 설정을 열 수 없습니다</string> <string name="upd_couldnt_check">확인할 수 없음: %1$s</string> <string name="upd_no_download">이 빌드에는 이 DroidDeck 복사본용 다운로드가 없습니다</string> <string name="upd_stop_first">실행 중인 세션을 먼저 중지한 후 업데이트하세요</string> - - <!-- Update stages, shown with … after them --> <string name="upd_stage_downloading">다운로드 중</string> <string name="upd_stage_installing">설치 중</string> <string name="upd_stage_confirm">확인 대기 중</string> <string name="upd_failed">업데이트 실패</string> <string name="upd_not_offered">Android에서 업데이트 설치를 진행하지 않았습니다</string> - <!-- Decky --> <string name="decky_install_failed">Decky 설치 실패: %1$s</string> <string name="decky_plugin_starting">플러그인 가져오기 시작 중…</string> <string name="decky_plugin_failed">플러그인 가져오기 실패: %1$s</string> <string name="decky_plugin_installed">플러그인이 설치되었습니다. 불러오려면 Steam을 다시 시작하세요.</string> - <!-- GPU drivers --> <string name="drivers_not_checked">아직 확인하지 않음 - 새로 고침을 탭하여 새 드라이버를 찾으세요</string> <string name="drivers_bundle_sets_display">Android + Linux: 디스플레이 드라이버도 함께 설정</string> <string name="drivers_bundle_sets_runtime">Android + Linux: 런타임 드라이버도 함께 설정</string> @@ -1169,26 +1255,26 @@ <string name="drivers_system_vulkan">시스템 Vulkan: 이 GPU용 내장 빌드 없음</string> <string name="drivers_bundled">%1$s(내장)</string> <string name="drivers_manual">수동</string> - - <!-- Driver mode, then the driver pair in use --> <string name="drivers_summary">%1$s · %2$s</string> <string name="drivers_half_published">현재 한쪽만 배포되어 있습니다</string> <string name="drivers_pair_size">둘 다 %1$.0f MB</string> - - <!-- %1$s says why (the GPU's support status) --> <string name="drivers_none_to_set">설정할 드라이버 없음: %1$s</string> <string name="drivers_checking_latest">최신 드라이버 확인 중…</string> <string name="drivers_up_to_date_check_failed">최신 버전(확인 실패: %1$s)</string> <string name="drivers_recommended_unpublished">현재 권장 드라이버가 배포되지 않았습니다</string> - - <!-- %1$s is the driver pair's name, %2$s its version --> <string name="drivers_downloading_pair">%1$s %2$s 다운로드 중…</string> <string name="drivers_updated_to">%1$s %2$s(으)로 업데이트했습니다.</string> <string name="drivers_updated_to_restart">%1$s %2$s(으)로 업데이트했습니다. 디스플레이 드라이버는 DroidDeck을 다시 시작한 후 적용됩니다.</string> + <string name="drivers_auto_waits_for_session">드라이버 업데이트는 세션이 끝난 뒤 진행됩니다.</string> + <string name="drivers_auto_waits_for_network">모바일 데이터와 절전 모드를 해제하면 다음을 내려받습니다: %1$s %2$s</string> + <string name="drivers_skipping_bad">%1$s %2$s 드라이버가 이 기기에서 세션을 시작하지 못해 자동 모드가 사용 가능한 드라이버를 계속 사용합니다.</string> + <string name="drivers_rolled_back">%1$s 드라이버가 두 번 세션을 시작하지 못해 자동 모드가 사용 가능한 드라이버로 되돌렸습니다.</string> <string name="drivers_switched_to">%1$s %2$s(으)로 전환했습니다.</string> <string name="drivers_switched_to_restart">%1$s %2$s(으)로 전환했습니다. 디스플레이 드라이버는 DroidDeck을 다시 시작한 후 적용됩니다.</string> <string name="drivers_using">%1$s %2$s 사용 중.</string> <string name="drivers_using_restart">%1$s %2$s 사용 중. 디스플레이 드라이버는 DroidDeck을 다시 시작한 후 적용됩니다.</string> + <string name="drivers_using_quest">내장 Quest 디스플레이 드라이버와 런타임 기본값을 사용합니다.</string> + <string name="drivers_using_quest_restart">내장 Quest 디스플레이 드라이버와 런타임 기본값을 사용합니다. 디스플레이 드라이버는 DroidDeck을 다시 시작한 뒤 적용됩니다.</string> <string name="drivers_not_a_driver">드라이버 zip이 아닙니다. AdrenoTools 드라이버, -Linux Turnip, Android + Linux 번들 중 어느 것도 아닙니다</string> <string name="drivers_import_failed">가져오기 실패: %1$s</string> <string name="drivers_imported_unnamed">가져온 드라이버</string> @@ -1196,11 +1282,7 @@ <string name="drivers_using_bundle_restart">%1$s을(를) 런타임 및 디스플레이 드라이버로 사용 중. 디스플레이 드라이버는 DroidDeck을 다시 시작한 후 적용됩니다.</string> <string name="drivers_deleted_bundle">%1$s 삭제됨(드라이버 2개)</string> <string name="drivers_deleted">%1$s 삭제됨</string> - - <!-- %1$s lists the latest releases, %2$s when they were checked (e.g. 5 min ago) --> <string name="drivers_release_status">최신: %1$s · %2$s 확인</string> - - <!-- %1$s lists the latest releases, %2$s the sources that could not be reached, %3$s when they were checked --> <string name="drivers_release_status_failed">최신: %1$s · %2$s 연결 불가 · %3$s 확인</string> <plurals name="drivers_ago_minutes"> <item quantity="other">%1$d분 전</item> @@ -1213,39 +1295,25 @@ </plurals> <string name="drivers_checking_sources">Banners-Turnip, WinNative 및 DroidDeck 확인 중…</string> <string name="drivers_check_failed">확인 실패</string> - - <!-- %1$s is the driver's name --> <string name="drivers_installed_pick_either">%1$s 설치됨 - 두 목록 중 어디에서든 선택하면 두 드라이버가 모두 설정됩니다</string> <string name="drivers_installed_pick">%1$s 설치됨 - 메뉴에서 선택하세요</string> - <!-- Session (SessionActivity) --> <string name="session_wait_removal">런타임 제거가 끝날 때까지 기다려 주세요</string> - - <!-- Drawer title when the running program has no known name --> <string name="session_title_game">게임</string> - - <!-- Shown as "Auto (touchpad)" in the drawer's touch setting --> <string name="session_touch_auto_touchpad">터치패드</string> - - <!-- Shown as "Auto (direct)" in the drawer's touch setting --> <string name="session_touch_auto_direct">직접 터치</string> <string name="session_swap_failed">교체 실패: %1$s</string> + <string name="session_profile_save_failed">프로필 저장 실패: %1$s</string> <string name="session_desktop_paused">데스크톱이 일시 중지됨</string> - - <!-- %1$s is the program's name --> <string name="session_named_paused">%1$s 일시 중지됨</string> <string name="session_program_paused">프로그램이 일시 중지됨</string> <string name="session_starting_desktop">데스크톱 시작 중</string> - - <!-- %1$s is the program's name --> <string name="session_starting_named">%1$s 시작 중</string> <string name="session_starting_program">프로그램 시작 중</string> <string name="session_no_logs">이 세션의 로그가 없습니다.</string> <string name="session_logs_archive_failed">세션 로그 압축 파일을 만들 수 없습니다.</string> <string name="session_logs_share_failed">세션 로그를 공유할 수 없습니다.</string> <string name="session_starting_session">세션 시작 중…</string> - - <!-- Loading screen lines while packages download; %1$d and %2$d are megabytes --> <string name="session_runtime_downloading">Linux 런타임 다운로드 중</string> <string name="session_runtime_downloading_mb">Linux 런타임 다운로드 중 · %1$d/%2$d MB</string> <string name="session_runtime_checking">Linux 런타임 확인 중</string> @@ -1260,33 +1328,20 @@ <string name="session_proton_unpacking">Proton Experimental(ARM64) 압축 해제 중</string> <string name="session_runtime_catalog_unreachable">런타임 카탈로그에 연결할 수 없습니다. 연결을 확인한 후 \"Steam 실행\"을 다시 누르세요.</string> <string name="session_runtime_install_failed">Linux 런타임이 설치되지 않았습니다. \"설정\"에서 런타임을 확인한 후 \"Steam 실행\"을 다시 누르세요.</string> - - <!-- %1$s says what went wrong --> <string name="session_desktop_install_failed">데스크톱이 설치되지 않았습니다(%1$s). 연결을 확인한 후 \"데스크톱\"을 다시 누르세요.</string> - - <!-- %1$s is the program's name, or Steam --> <string name="session_ended_named">%1$s이(가) 예기치 않게 중지되었습니다. 버그 리포트와 함께 로그를 공유하거나 다시 시도하세요.</string> <string name="session_ended_program">프로그램이 예기치 않게 중지되었습니다. 버그 리포트와 함께 로그를 공유하거나 다시 시도하세요.</string> <string name="session_ended_desktop">데스크톱이 예기치 않게 중지되었습니다. 버그 리포트와 함께 로그를 공유하거나 다시 시도하세요.</string> - - <!-- %1$d is the exit status, %2$s the log file's path --> <string name="session_ended_detail">종료 상태 %1$d · %2$s</string> <string name="session_ended_no_log">로그 없음</string> - - <!-- %1$d errors; %2$s, %3$s and %4$s are the Performance page and its two settings --> <plurals name="session_hint_enosys"> <item quantity="other">로그에 \"Function not implemented\" 오류가 %1$d개 있습니다. 이 기기에서 proot의 seccomp 가속이 보조 프로세스를 실패시키고 있습니다. %2$s → \"%3$s\"(또는 \"%4$s\")를 시도한 후 다시 시작하세요.</item> </plurals> - <!-- Screens, files, controller and store --> - - <!-- Mode settings --> <string name="mode_decky_plugins">플러그인</string> <string name="mode_decky_plugins_hint">다음 Steam 세션에 사용할 플러그인 ZIP을 설치합니다.</string> <string name="mode_decky_plugin_downloading">다운로드 중…</string> <string name="mode_decky_plugin_install_zip">ZIP에서 설치</string> - - <!-- Store --> <string name="store_cat_games">게임</string> <string name="store_cat_audio_video">오디오 및 비디오</string> <string name="store_cat_graphics">그래픽</string> @@ -1299,28 +1354,14 @@ <string name="store_cat_utilities">유틸리티</string> <string name="store_section_popular">인기</string> <string name="store_section_trending">급상승</string> - - <!-- Store front-page section of recently added apps --> <string name="store_section_new">신규</string> - - <!-- Store front-page section of recently updated apps --> <string name="store_section_updated">업데이트됨</string> <string name="store_section_loading">불러오는 중…</string> <string name="store_flatpak_setup">Flatpak 설정</string> - - <!-- %1$s is what failed (an app name or "Flatpak setup"), %2$s the error --> <string name="store_problem">%1$s: %2$s</string> <string name="store_updates_check_failed">Flathub에서 업데이트를 확인할 수 없습니다</string> - - <!-- Library tiles --> - - <!-- Subtitle of a game tile whose cover art was found --> <string name="content_rom_installed">설치됨</string> - - <!-- Subtitle of a game that is a folder rather than a single file --> <string name="content_rom_folder">폴더</string> - - <!-- Launcher themes --> <string name="theme_graphite">그래파이트</string> <string name="theme_graphite_detail">그래파이트 색상의 화면에, 선택·포커스·누름 상태에는 로고의 오브 블루를 사용합니다.</string> <string name="theme_paper">블랙 앤 화이트</string> @@ -1329,8 +1370,6 @@ <string name="theme_icon_blue_detail">검은색 배경에 흰색 글자, 선택·포커스·누름 상태에는 파란색을 사용합니다.</string> <string name="theme_electric">일렉트릭 네이비</string> <string name="theme_electric_detail">회색 대신 네이비 톤의 화면에 더 밝은 파란색을 사용합니다.</string> - - <!-- PC keyboard key caps (keep them short; they label physical PC keys) --> <string name="pckb_key_esc">Esc</string> <string name="pckb_key_ins">Ins</string> <string name="pckb_key_del">Del</string> @@ -1348,27 +1387,17 @@ <string name="pckb_key_alt">Alt</string> <string name="pckb_key_space">Space</string> <string name="pckb_key_altgr">AltGr</string> - - <!-- Terminal key strip on the second screen --> <string name="second_key_tab">Tab</string> - - <!-- A modifier key (%1$s, e.g. Ctrl) that is currently held --> <string name="second_key_on">%1$s ✓</string> <string name="second_key_ctrl_c">Ctrl+C</string> <string name="second_key_ctrl_d">Ctrl+D</string> - - <!-- Game file sync errors --> <string name="game_sync_err_runtime">먼저 런타임을 설치하세요</string> <string name="game_sync_err_steam_library">Steam 라이브러리를 사용할 수 없습니다</string> <string name="game_sync_err_previous_sd">이전 SD 라이브러리를 사용할 수 없습니다</string> <string name="game_sync_err_game_storage">게임 저장 공간을 사용할 수 없습니다</string> <string name="game_sync_err_added_games">추가된 게임 폴더를 사용할 수 없습니다</string> <string name="game_sync_err_manifests">Steam 매니페스트를 사용할 수 없습니다</string> - - <!-- The systems RetroArch emulates, shown under its name --> <string name="content_system_many">다양한 기종</string> - - <!-- File manager --> <string name="fm_drive_internal">내부</string> <string name="fm_drive_linux">Linux 시스템</string> <string name="fm_drive_sd">SD 카드</string> @@ -1386,8 +1415,6 @@ <string name="fm_no_favorites">즐겨찾기가 없습니다. 폴더의 ⋮ 메뉴에서 고정하면 여기로 빠르게 이동할 수 있습니다.</string> <string name="fm_unpin_favorite">즐겨찾기에서 제거</string> <string name="fm_size_zero">0바이트</string> - - <!-- Size unit for sizes under 1 KB, shown after a number --> <string name="fm_unit_bytes">바이트</string> <string name="fm_prop_location">위치</string> <string name="fm_prop_type">유형</string> @@ -1395,8 +1422,6 @@ <string name="fm_prop_modified">수정한 날짜</string> <string name="fm_type_folder">폴더</string> <string name="fm_type_file">파일</string> - - <!-- File type in Properties; %1$s is the file extension in capitals, e.g. TXT --> <string name="fm_type_ext_file">%1$s 파일</string> <string name="fm_read_only">읽기 전용</string> <string name="fm_read_only_hint">게임(및 Wine)이 이 파일을 덮어쓰거나 삭제하지 못하게 합니다.</string> @@ -1410,19 +1435,11 @@ <string name="fm_delete_failed">삭제 실패</string> <string name="fm_op_moving">이동 중...</string> <string name="fm_op_copying">복사 중...</string> - - <!-- %1$s is the file name --> <string name="fm_op_moving_item">이동 중 - %1$s</string> <string name="fm_op_copying_item">복사 중 - %1$s</string> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_moving_batch">이동 중 %1$d/%2$d - %3$s</string> <string name="fm_op_copying_batch">복사 중 %1$d/%2$d - %3$s</string> - - <!-- Paste result; %1$d items done, %2$d items failed --> <string name="fm_paste_failed">%1$d개 완료, %2$d개 실패</string> - - <!-- Paste result; %1$d items done, %2$d items skipped --> <string name="fm_paste_skipped">%1$d개 완료, %2$d개 건너뜀</string> <plurals name="fm_paste_moved"> <item quantity="other">항목 %1$d개 이동됨</item> @@ -1430,8 +1447,6 @@ <plurals name="fm_paste_copied"> <item quantity="other">항목 %1$d개 복사됨</item> </plurals> - - <!-- %1$s is a file or folder name --> <string name="fm_already_exists">\"%1$s\"이(가) 이미 있습니다</string> <string name="fm_op_renaming">이름 바꾸는 중...</string> <string name="fm_rename_failed">이름 바꾸기 실패</string> @@ -1442,20 +1457,14 @@ <string name="fm_create">만들기</string> <string name="fm_new_name">새 이름</string> <string name="fm_delete_title">삭제하시겠습니까?</string> - - <!-- %1$s is a file or folder name --> <string name="fm_delete_text">\"%1$s\"을(를) 영구적으로 삭제하시겠습니까?</string> <plurals name="fm_delete_items_title"> <item quantity="other">항목 %1$d개를 삭제하시겠습니까?</item> </plurals> <string name="fm_cannot_undo">이 작업은 되돌릴 수 없습니다.</string> - - <!-- After a list of the first five names in a delete confirmation --> <plurals name="fm_and_more"> <item quantity="other">…외 %1$d개</item> </plurals> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_deleting_batch">삭제 중 %1$d/%2$d - %3$s</string> <plurals name="fm_delete_some_failed"> <item quantity="other">%1$d개를 삭제할 수 없습니다</item> @@ -1469,8 +1478,6 @@ <string name="fm_conflict_skip">건너뛰기</string> <string name="fm_select_this_folder">이 폴더 선택</string> <string name="fm_back">뒤로</string> - - <!-- %1$s is a storage name, e.g. SD card --> <string name="fm_drive_not_readable">%1$s이(가) 마운트되었지만 지금은 읽을 수 없습니다</string> <string name="fm_list_view">목록 보기</string> <string name="fm_grid_view">격자 보기</string> @@ -1485,51 +1492,31 @@ <string name="fm_hide_favorites">즐겨찾기 숨기기</string> <string name="fm_show_favorites">즐겨찾기 표시</string> <string name="fm_filter_folder">이 폴더에서 필터</string> - - <!-- Free space on the storage being browsed; %1$s is a size, e.g. 12.50 GB --> <string name="fm_free_space">%1$s 사용 가능</string> <string name="fm_selected_count">%1$d개 선택됨</string> - - <!-- Selection bar: clear the selection --> <string name="fm_select_none">선택 해제</string> - - <!-- Selection bar: select every item --> <string name="fm_select_all">전체</string> <string name="fm_paste">붙여넣기</string> <plurals name="fm_items"> <item quantity="other">항목 %1$d개</item> </plurals> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_here">여기에 %1$s 붙여넣기</string> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_move_here">여기에 %1$s 붙여넣기(이동)</string> <string name="fm_rail_title">파일</string> <string name="fm_rail_storage">저장소</string> - - <!-- Rail section of shortcut folders (Downloads, ROMs, …) --> <string name="fm_rail_quick">바로 가기</string> <string name="fm_rail_favorites">즐겨찾기</string> <string name="fm_rail_downloads">다운로드</string> - - <!-- Downloads shortened to fit under an icon (about 8 characters) --> <string name="fm_rail_downloads_short">다운로드</string> <string name="fm_rail_roms">ROMs</string> <string name="fm_rail_session_logs">세션 로그</string> <string name="fm_rail_pictures">사진</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_added">\"%1$s\"을(를) 즐겨찾기에 추가했습니다</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_removed">\"%1$s\"을(를) 즐겨찾기에서 제거했습니다</string> <string name="fm_empty_directory">빈 폴더</string> <string name="fm_up_one_level">상위 폴더로</string> <string name="fm_choose_folder">폴더 선택</string> <string name="fm_choose_file">파일 선택</string> - - <!-- On-screen controller tint colors --> <string name="ctrl_tint_steam_blue">Steam 블루</string> <string name="ctrl_tint_sky">하늘색</string> <string name="ctrl_tint_white">흰색</string> @@ -1538,8 +1525,6 @@ <string name="ctrl_tint_amber">호박색</string> <string name="ctrl_tint_red">빨간색</string> <string name="ctrl_tint_pink">분홍색</string> - - <!-- On-screen buttons that can be remapped --> <string name="ctrl_button_a">A 버튼</string> <string name="ctrl_button_b">B 버튼</string> <string name="ctrl_button_x">X 버튼</string> @@ -1550,34 +1535,21 @@ <string name="ctrl_button_rt">오른쪽 트리거</string> <string name="ctrl_button_view">보기 버튼</string> <string name="ctrl_button_menu">메뉴 버튼</string> - - <!-- What a remapped on-screen button sends; letters and Steam are controller button names --> - - <!-- Controller View button --> <string name="ctrl_target_view">보기</string> - - <!-- Controller Menu button --> <string name="ctrl_target_menu">메뉴</string> <string name="ctrl_target_up">방향 패드 위</string> <string name="ctrl_target_down">방향 패드 아래</string> <string name="ctrl_target_left">방향 패드 왼쪽</string> <string name="ctrl_target_right">방향 패드 오른쪽</string> - - <!-- The on-screen button is not shown --> <string name="ctrl_target_hidden">숨김</string> <string name="ctrl_editor_drag">드래그하여 이동</string> <string name="ctrl_editor_snap">맞춤</string> <string name="ctrl_editor_save">저장</string> - - <!-- What the second screen shows during a session --> <string name="second_mode_none">없음</string> <string name="second_mode_keyboard_trackpad">키보드 + 터치패드</string> <string name="second_mode_terminal">터미널</string> <string name="second_mode_deck_controls">Deck 그립 + 터치패드</string> - <!-- Runtime, updates and setup helpers --> - - <!-- Linux runtime install / removal (LinuxRuntimeInstaller, RuntimeInstallService) --> <string name="rtinst_removing">Linux 런타임 제거 중</string> <plurals name="rtinst_removing_entries"> <item quantity="other">Linux 런타임 제거 중 · 항목 %1$d개</item> @@ -1592,75 +1564,47 @@ <string name="rtinst_title_installing">Linux 런타임 설치 중</string> <string name="rtinst_title_removing">Linux 런타임 제거 중</string> - <!-- Hosted desktop and emulator packages (DesktopCatalog) --> <string name="deskpkg_runtime_missing">Linux 런타임이 설치되지 않았습니다</string> - - <!-- %1$s: package name --> <string name="deskpkg_no_checksum">카탈로그에 %1$s의 체크섬이 없습니다</string> <string name="deskpkg_checksum_mismatch">체크섬이 일치하지 않습니다. 변경된 내용은 없습니다</string> - - <!-- %1$s: package name --> <string name="deskpkg_installing">%1$s 설치 중</string> <string name="deskpkg_place_failed">AppImage를 배치할 수 없습니다</string> <string name="deskpkg_extract_failed">압축 해제 실패</string> <string name="deskpkg_install_failed">설치 실패</string> - <!-- Flatpak store operations (FlatpakManager) --> <string name="flatpakmgr_setup_failed">Flatpak 설정 실패(종료 코드 %1$d)</string> <string name="flatpakmgr_setup_unfinished">Flatpak 설정이 완료되지 않았습니다</string> <string name="flatpakmgr_busy">다른 스토어 작업이 진행 중입니다</string> <string name="flatpakmgr_not_ready">먼저 Flatpak을 설정하세요</string> <string name="flatpakmgr_starting">시작 중</string> <string name="flatpakmgr_exit_status">Flatpak이 종료되었습니다(상태 %1$d)</string> - - <!-- %1$s: an app or runtime name, e.g. "SuperTux" or "GNOME runtime 50" --> <string name="flatpakmgr_installing">%1$s 설치 중</string> <string name="flatpakmgr_updating">%1$s 업데이트 중</string> <string name="flatpakmgr_removing">%1$s 제거 중</string> - - <!-- %1$s: an app or runtime name; %2$d of %3$d: this step and the number of steps --> <string name="flatpakmgr_installing_step">%1$s 설치 중(%2$d/%3$d)</string> <string name="flatpakmgr_updating_step">%1$s 업데이트 중(%2$d/%3$d)</string> <string name="flatpakmgr_removing_step">%1$s 제거 중(%2$d/%3$d)</string> - - <!-- Names for Flatpak runtime parts, shown inside "Installing %1$s" --> <string name="flatpakmgr_ref_translations">번역</string> <string name="flatpakmgr_ref_graphics_drivers">그래픽 드라이버</string> <string name="flatpakmgr_ref_media_codecs">미디어 코덱</string> - - <!-- %1$s: runtime vendor, e.g. GNOME, KDE, Freedesktop --> <string name="flatpakmgr_ref_runtime">%1$s 런타임</string> - - <!-- %1$s: runtime vendor, e.g. GNOME; %2$s: its version, e.g. 50 --> <string name="flatpakmgr_ref_runtime_branch">%1$s 런타임 %2$s</string> - <!-- Imported AppImages (AppImageManager) --> <string name="appimg_too_small">파일이 너무 작아 AppImage가 아닙니다</string> - - <!-- %1$s: the system's reason --> <string name="appimg_unreadable">파일을 읽을 수 없습니다: %1$s</string> <string name="appimg_not_linux">AppImage가 아닙니다(Linux 프로그램이 아님)</string> <string name="appimg_wrong_arch">이 AppImage는 ARM64(aarch64)용도, x86 PC용도 아닙니다</string> <string name="appimg_not_appimage">Linux 프로그램이지만 AppImage가 아닙니다</string> <string name="appimg_wrong_type">유형 2 AppImage만 가져올 수 있습니다(이 파일은 유형 %1$d)</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_import">사용 가능한 공간 부족: 가져오려면 약 %1$s이(가) 필요합니다</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_update">사용 가능한 공간 부족: 업데이트하려면 약 %1$s이(가) 필요합니다</string> <string name="appimg_import_failed">가져오기 실패</string> <string name="appimg_gone">AppImage가 더 이상 존재하지 않습니다</string> <string name="appimg_update_failed">업데이트 실패</string> - - <!-- %1$s: file name --> <string name="appimg_extracting">%1$s 압축 해제 중</string> <string name="appimg_extract_failed">AppImage의 압축을 풀 수 없습니다</string> - - <!-- %1$s: the last line the extractor printed --> <string name="appimg_extract_failed_detail">AppImage의 압축을 풀 수 없습니다: %1$s</string> - <!-- Decky Loader and plugin installs (DeckyManager) --> <string name="deckymgr_stop_session_loader">Decky Loader를 설치하기 전에 실행 중인 세션을 중지하세요</string> <string name="deckymgr_download_failed">Decky Loader 다운로드 실패</string> <string name="deckymgr_size_mismatch">Decky Loader 크기가 릴리스 정보와 일치하지 않습니다</string> @@ -1696,27 +1640,13 @@ <string name="deckymgr_remote_entry_invalid">잘못된 remote_binary 항목</string> <string name="deckymgr_remote_name_invalid">잘못된 원격 바이너리 이름</string> <string name="deckymgr_remote_url_https">원격 바이너리 URL은 HTTPS를 사용해야 합니다</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_remote_hash_invalid">원격 바이너리 %1$s의 SHA-256 해시가 잘못되었습니다</string> <string name="deckymgr_bin_dir_failed">플러그인 bin 폴더를 만들 수 없습니다</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_downloading_binary">플러그인 바이너리 다운로드 중 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_download_failed">플러그인 바이너리 %1$s을(를) 다운로드할 수 없습니다</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_checksum_mismatch">플러그인 바이너리 체크섬 불일치 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_not_executable">플러그인 바이너리를 실행 가능으로 설정할 수 없습니다 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_replace_failed">플러그인 바이너리를 교체할 수 없습니다 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_install_failed">플러그인 바이너리를 설치할 수 없습니다 · %1$s</string> <string name="deckymgr_folder_taken">플러그인 폴더를 다른 플러그인이 사용하고 있습니다</string> <string name="deckymgr_preserve_failed">기존 플러그인을 보존할 수 없습니다</string> @@ -1724,24 +1654,14 @@ <string name="deckymgr_settings_failed">Decky 플러그인 설정을 업데이트할 수 없습니다</string> <string name="deckymgr_restore_failed">기존 플러그인을 복원할 수 없습니다</string> - <!-- Child-process limit change over Wireless debugging (WirelessAdbFix) --> <string name="adbfix_save_failed">무선 디버깅 ID를 저장할 수 없습니다</string> - - <!-- %1$d: the command's exit status --> <string name="adbfix_command_failed">ADB 명령 실패(%1$d)</string> - - <!-- %1$s: what Android answered --> <string name="adbfix_not_confirmed">Android에서 하위 프로세스 제한 변경을 확인하지 않았습니다: %1$s</string> <string name="adbfix_no_pairing">저장된 무선 디버깅 페어링이 없습니다</string> <string name="adbfix_enter_address">현재 무선 디버깅의 IP 주소 및 포트를 입력하세요</string> - <!-- Wireless debugging pairing notification (WirelessAdbPairingService) --> <string name="adbpair_timed_out">페어링 팝업을 기다리는 시간이 초과되었습니다. DroidDeck에서 다시 시도하세요.</string> - - <!-- %1$d: Android's error code --> <string name="adbpair_discovery_failed_code">페어링 팝업을 찾을 수 없습니다(%1$d). Wi-Fi가 켜져 있는지 확인하세요.</string> - - <!-- %1$s: the system's reason --> <string name="adbpair_discovery_failed">페어링 팝업을 찾을 수 없습니다: %1$s</string> <string name="adbpair_six_digits">코드 6자리를 모두 입력하세요</string> <string name="adbpair_pairing">페어링 중…</string> @@ -1755,31 +1675,22 @@ <string name="adbpair_title_pair">무선 디버깅 페어링</string> <string name="adbpair_waiting_text">무선 디버깅을 켠 다음 “페어링 코드로 기기 페어링”을 탭하세요.</string> <string name="adbpair_waiting_long">무선 디버깅을 켠 다음 “페어링 코드로 기기 페어링”을 탭하세요. 코드는 이 알림에 입력하므로 설정 화면에 머물러 있으세요.</string> - - <!-- Label of the notification's reply field --> <string name="adbpair_code_label">6자리 페어링 코드</string> <string name="adbpair_code_hint">\"코드 입력\"을 탭하고 설정에 표시된 6자리 숫자를 입력하세요.</string> <string name="adbpair_title_code">Wi-Fi 페어링 코드 입력</string> <string name="adbpair_title_retry">코드를 다시 입력하세요</string> - - <!-- Notification action button --> <string name="adbpair_enter_code">코드 입력</string> <string name="adbpair_title_working">Steam 설정 중</string> <string name="adbpair_title_done">Steam 준비 완료</string> <string name="adbpair_done_text">탭하여 DroidDeck으로 돌아가세요. 이제 무선 디버깅을 꺼도 됩니다.</string> <string name="adbpair_title_failed">무선 디버깅 설정이 중단되었습니다</string> - <!-- DroidDeck's own updates (SelfInstaller, AppUpdates) --> - <string name="selfinst_http">다운로드 응답: HTTP %1$d</string> + <string name="selfinst_download_failed">다운로드 실패</string> <string name="selfinst_size_mismatch">다운로드 크기가 배포된 APK와 일치하지 않아 삭제했습니다. 다시 시도하세요</string> <string name="selfinst_checksum_mismatch">다운로드한 파일이 체크섬과 일치하지 않아 삭제했습니다. 다시 시도하세요</string> - - <!-- %1$s: the update's Android package name; %2$s: this app's --> <string name="selfinst_wrong_package">이 업데이트는 %2$s이(가) 아닌 Android 패키지 %1$s용입니다</string> <string name="selfinst_metadata_signer">업데이트 메타데이터에 DroidDeck 릴리스 서명 키가 지정되어 있지 않습니다</string> <string name="selfinst_unreadable">Android에서 다운로드한 APK를 읽을 수 없습니다</string> - - <!-- %1$s: the APK's Android package name; %2$s: this app's --> <string name="selfinst_apk_wrong_package">다운로드한 APK는 %2$s이(가) 아닌 %1$s용입니다</string> <string name="selfinst_version_mismatch">다운로드한 APK의 versionCode가 배포된 %2$d이(가) 아닌 %1$d입니다</string> <string name="selfinst_downgrade">Android에서 설치된 versionCode %2$d 위에 %1$d을(를) 설치하지 않습니다</string> @@ -1787,19 +1698,11 @@ <string name="selfinst_wrong_signer">다운로드한 APK가 DroidDeck 릴리스 키로 서명되지 않았습니다</string> <string name="appupd_http">업데이트 카탈로그 응답: HTTP %1$d</string> - <!-- Session, GPU and display --> - - <!-- Session loading screen --> <string name="loadstate_starting">세션 시작 중…</string> - - <!-- %1$d minutes, %2$02d seconds since the session started --> <string name="loadstate_elapsed">%1$d:%2$02d 경과 · 아직 진행 중</string> <string name="loadstate_steam_update">Steam 클라이언트 업데이트 다운로드 중 · %1$d%%</string> - - <!-- %1$s is the client's own download progress, as it prints it --> <string name="loadstate_steam_client">Steam 클라이언트 다운로드 중 · %1$s</string> - <!-- Installing GE-Proton / proton-cachyos (%1$s is the tool's name, %2$s its release tag) --> <string name="pextra_busy">호환성 도구를 이미 설치하고 있습니다</string> <string name="pextra_stop_session">호환성 도구를 설치하기 전에 실행 중인 세션을 중지하세요</string> <string name="pextra_no_release">%1$s의 ARM64 릴리스를 찾을 수 없습니다</string> @@ -1816,55 +1719,38 @@ <string name="pextra_checksum_mismatch">체크섬이 일치하지 않아 다운로드를 삭제했습니다</string> <string name="pextra_session_started">다운로드 중에 세션이 시작되었습니다. 호환성 도구를 설치하기 전에 세션을 중지하세요</string> <string name="pextra_installing">%1$s 설치 중</string> - - <!-- %2$d is the installer's exit status --> <string name="pextra_install_failed">%1$s 설치 실패(종료 코드 %2$d)</string> <string name="pextra_could_not_install">%1$s을(를) 설치할 수 없습니다</string> <string name="esync_fetching">droiddeck-esync 팩 받는 중</string> - <!-- Components (FEX / DXVK / VKD3D-Proton swapped into a Proton). %1$s component, %2$s version, %3$s Proton --> <string name="cmgr_fex_linux_helpers">Linux 도우미 포함</string> <string name="cmgr_fex_dlls_only">DLL만</string> <string name="cmgr_original_proton_updated">원본(마지막 교체 이후 Proton 업데이트됨)</string> <string name="cmgr_changed_outside">\"구성 요소\" 외부에서 변경됨</string> - - <!-- A component version that could not be found in a Proton --> <string name="cmgr_not_present">없음</string> - - <!-- %1$s is the Proton build the original files were saved from --> <string name="cmgr_original_version">원본 %1$s</string> <string name="cmgr_original_from">%1$s의 원본</string> <string name="cmgr_swap_queued">%3$s을(를) 사용하는 게임이 종료되면 %1$s %2$s(으)로 교체됩니다.</string> <string name="cmgr_swap_done">이제 %3$s에 %1$s %2$s이(가) 적용되었습니다. 다음 게임 실행 시 적용됩니다.</string> <string name="cmgr_original_missing">해당 원본 번들이 저장되어 있지 않습니다</string> - - <!-- %1$s component, %2$s Proton --> <string name="cmgr_restore_queued">%2$s의 %1$s은(는) 해당 Proton을 사용하는 게임이 종료되면 원본으로 복원됩니다.</string> - - <!-- %1$s component, %2$s Proton, %3$s the Proton build the original came from --> <string name="cmgr_restore_done">%2$s의 %1$s을(를) %3$s 원본으로 복원했습니다.</string> - - <!-- %1$s package file, %2$s Proton id --> <string name="cmgr_package_in_use">%1$s은(는) %2$s에서 사용 중입니다. 먼저 해당 Proton을 다른 항목으로 교체하세요.</string> <string name="cmgr_package_not_stored">%1$s이(가) 저장되어 있지 않습니다</string> <string name="cmgr_deleted">%1$s을(를) 삭제했습니다.</string> <string name="cmgr_original_kept">설치된 빌드의 원본은 되돌리기 위해 유지됩니다.</string> <string name="cmgr_not_stored">저장되지 않음</string> - - <!-- %1$s Proton build, %2$s component --> <string name="cmgr_deleted_original">%2$s의 %1$s 원본을 삭제했습니다.</string> <string name="cmgr_nightlies_only">Nightlies 릴리스에서만 다운로드할 수 있습니다</string> <string name="cmgr_list_predates_checksums">이 패키지 목록은 체크섬 도입 이전의 것입니다. 새로 고친 후 다시 시도하세요</string> <string name="cmgr_checksum_mismatch">체크섬 불일치</string> - <!-- Display choices --> <string name="sprefs_upscaler_linear">선형</string> <string name="sprefs_upscaler_nearest">최근접</string> <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR(품질)</string> <string name="sprefs_upscaler_sharpen">샤프닝 전용</string> <string name="sprefs_lod_bias_auto">자동(스케일링에 맞춤)</string> - <!-- Screen effect Looks: preset names and the line under the row --> <string name="look_off_desc">적용된 효과 없음.</string> <string name="look_game_clarity">게임 선명도</string> <string name="look_game_clarity_desc">샤프닝에 약간의 대비를 더한 일상용 프리셋.</string> @@ -1889,29 +1775,23 @@ <string name="look_anime_edge">애니메 윤곽</string> <string name="look_anime_edge_desc">툰 윤곽선과 샤프닝.</string> - <!-- GPU support line --> <string name="gpuinfo_not_adreno">Adreno GPU가 아님</string> <string name="gpuinfo_supported">지원됨</string> <string name="gpuinfo_experimental">실험적: 드라이버가 테스트 빌드입니다</string> <string name="gpuinfo_below_tested">테스트된 하드웨어(Adreno 725 이상)보다 낮음: 실행되지 않을 수 있습니다</string> <string name="gpuinfo_unsupported">지원되지 않음: DroidDeck에는 Adreno(Snapdragon) GPU가 필요합니다</string> - <!-- Driver downloads and imports --> <string name="turnip_rate_limited">GitHub 요청 한도에 도달했습니다. 나중에 다시 시도하세요</string> <string name="turnip_github_http">GitHub 응답: HTTP %1$d</string> - <string name="turnip_download_http">다운로드 응답: HTTP %1$d</string> + <string name="turnip_download_failed">다운로드 실패</string> <string name="turnip_list_predates_checksums">이 드라이버 목록은 체크섬 도입 이전의 것입니다. 새로 고친 후 다시 시도하세요</string> <string name="turnip_checksum_mismatch">체크섬이 일치하지 않아 다운로드를 삭제했습니다</string> - - <!-- %1$s is one of the turnip_reject_* reasons --> <string name="turnip_not_adrenotools">AdrenoTools 드라이버가 아닙니다: %1$s</string> <string name="turnip_reject_no_meta">meta.json 없음</string> <string name="turnip_reject_meta_unreadable">meta.json을 읽을 수 없음(%1$s)</string> <string name="turnip_reject_linux_driver">Linux 런타임 드라이버입니다(\"Linux 런타임 드라이버\"에서 가져오세요)</string> <string name="turnip_reject_wayland">Wayland 게임 드라이버이며, 이 앱에서는 사용하지 않습니다</string> <string name="turnip_reject_no_library_name">meta.json에 libraryName이 지정되지 않아 AdrenoTools에 전달할 수 없습니다</string> - - <!-- %1$s is a library file name --> <string name="turnip_reject_library_missing">meta.json에 지정된 %1$s이(가) zip에 없습니다</string> <string name="turnip_reject_not_aarch64">%1$s은(는) 64비트 AArch64 ELF 공유 라이브러리가 아닙니다</string> <string name="turnip_reject_glibc">%1$s은(는) glibc에 링크되어 있습니다. \"-Linux\" Turnip이므로 \"Linux 런타임 드라이버\"에서 가져오세요</string> @@ -1922,115 +1802,61 @@ <string name="bundle_entry_outside">드라이버 번들이 아닙니다: %1$s이(가) 번들 외부를 가리킵니다</string> <string name="bundle_too_large">드라이버 번들이 아닙니다: 압축을 풀면 %1$d MB를 초과합니다</string> - <!-- Game storage --> <string name="gstore_sd_card">SD 카드</string> - - <!-- %1$s is a size, like 12.3 GB --> <string name="gstore_folder">폴더</string> + <string name="logshare_chooser">세션 로그 공유</string> - <!-- Stands in for the Steam account name when the client did not record one --> - - <!-- Why the HDR switch is greyed out --> <string name="hdr_needs_android_10">Android 10 이상 필요(색 공간을 지원하는 디스플레이 레이어)</string> <string name="hdr_none">이 디스플레이는 HDR을 지원하지 않습니다</string> - - <!-- %1$s lists HDR formats, like Dolby Vision, HDR10+ --> <string name="hdr_not_hdr10">이 디스플레이는 HDR10이 아닌 %1$s 형식을 지원합니다</string> - <!-- Follow-up --> - - <!-- Stands in for the GPU name when the device does not report one --> <string name="gpu_this_gpu">이 GPU</string> <string name="phantom_title_on">하위 프로세스 제한 켜짐</string> <string name="phantom_title_unset">하위 프로세스 제한 설정되지 않음</string> <string name="phantom_title_unreadable">하위 프로세스 제한을 확인할 수 없음</string> <string name="phantom_title_off">하위 프로세스 제한 꺼짐</string> <string name="phantom_title_not_required">하위 프로세스 제한 해당 없음</string> - - <!-- %1$s is the sentence saying how to turn the limit off on this device --> <string name="phantom_instructions_fix">%1$s 이 방법을 사용할 수 없으면 이 기기를 ADB가 설치된 PC에 연결하고 아래 명령을 실행하세요. 그런 다음 여기로 돌아와 다시 확인하세요.</string> <string name="phantom_instructions_off">Steam 세션을 시작할 수 있습니다.</string> <string name="phantom_instructions_not_applicable">이 Android 버전에서는 이 제한을 사용하지 않습니다.</string> <string name="phantom_fix_toggle">개발자 옵션에서 “하위 프로세스 제한 사용 중지”를 켜고, 이후에도 개발자 옵션을 켜 둔 상태로 유지하세요.</string> <string name="phantom_fix_no_toggle">이 Android 버전에는 해당 스위치가 없습니다. 무선 디버깅을 사용하여 이 기기에서 변경하세요.</string> <string name="upd_block_no_apk">이 빌드에는 이 DroidDeck 복사본용 다운로드가 없습니다.</string> - - <!-- %1$d is the offered build's versionCode, %2$d the installed one's --> <string name="upd_block_version_code">versionCode %1$d이(가) 설치된 %2$d보다 낮아 Android에서 이 빌드 위에 설치하지 않습니다.</string> <string name="upd_fail_downgrade">Android에서는 최신 버전 위에 이전 버전을 설치할 수 없습니다. 채널이 따라잡을 때까지 현재 빌드를 유지하세요.</string> <string name="upd_fail_signature">이 DroidDeck 복사본은 다른 키로 서명되어 있어(로컬 빌드일 수 있음) Android에서 덮어쓰기 업데이트를 할 수 없습니다.</string> <string name="upd_fail_storage">업데이트에 필요한 저장 공간이 부족합니다.</string> <string name="upd_fail_aborted">업데이트가 취소되었습니다.</string> - - <!-- %1$s is Android's own (English) installer message --> <string name="upd_fail_with_message">업데이트가 설치되지 않았습니다: %1$s</string> <string name="upd_fail_generic">업데이트가 설치되지 않았습니다.</string> - - <!-- A save zip's layout; %1$s is the app it comes from (GameHub, Winlator) --> <string name="saves_layout_zip">%1$s zip</string> - - <!-- A save zip whose layout is not known --> <string name="saves_zip">zip</string> - - <!-- %1$s is the game's name --> <string name="saves_not_launched">%1$s을(를) 아직 실행한 적이 없습니다</string> <string name="saves_none_found">%1$s의 저장 파일을 찾을 수 없습니다</string> - - <!-- %1$s is the zip's file name --> <string name="saves_not_save_zip">%1$s에 drive_c 폴더가 없으므로 GameHub 또는 Winlator 저장 데이터 zip이 아닙니다</string> - - <!-- %1$s is a folder path --> <string name="gstore_cannot_create">%1$s에 폴더를 만들 수 없음</string> <string name="gstore_cannot_write">%1$s에 쓸 수 없음</string> - - <!-- %1$s is a folder path, %2$s the system's error --> <string name="gstore_cannot_write_detail">%1$s에 쓸 수 없음(%2$s)</string> <string name="gfiles_folder_unavailable">폴더를 사용할 수 없습니다</string> - - <!-- %1$s is a file name --> <string name="gfiles_name_taken">다른 파일이 이미 %1$s 이름을 사용하고 있습니다</string> <string name="gfiles_art_unavailable">이미지 폴더를 사용할 수 없습니다</string> <string name="gfiles_unrelated_inventory">폴더에 관련 없는 동기화 목록이 있습니다</string> - - <!-- %1$s is a file name --> <string name="gfiles_remove_failed">%1$s을(를) 제거할 수 없습니다</string> <string name="gfiles_outside_folder">파일이 내보내기 폴더 밖을 가리킵니다</string> - - <!-- A FEX build whose DLL carries no version name --> <string name="cmgr_fex_unnamed">FEX(버전 이름 없는 빌드)</string> - - <!-- %1$s is a package file name --> <string name="cmgr_no_profile">%1$s에 profile.json이 없음</string> - - <!-- %1$s is a package file name, %2$s the type its profile.json gives --> <string name="cmgr_not_component_package">%1$s은(는) Linux 구성 요소 패키지가 아닙니다(유형 %2$s)</string> - - <!-- A storage volume in the second-library menu; %1$s is its name, %2$s its free space, like 12.3 GB --> <string name="gstore_volume_free">%1$s · %2$s 사용 가능</string> - - <!-- The second-library setting's value when it is automatic (short form of mode_storage_auto) --> <string name="mode_storage_auto_short">자동</string> - - <!-- %1$s is the technical reason, kept in English --> <string name="appupd_catalog_rejected">업데이트 카탈로그가 검사를 통과하지 못했습니다(%1$s)</string> - - <!-- Label of the copied ADB command on the clipboard --> <string name="main_adb_clip_label">DroidDeck 하위 프로세스 설정</string> - - <!-- Signed in, but the Steam client recorded no account name --> <string name="setup_signed_in_offline_unnamed">로그인됨 · 오프라인 모드</string> <string name="setup_signed_in_unnamed">로그인됨</string> - - <!-- Small uppercase tags beside a driver's name: where it came from --> <string name="driver_tag_bundled">내장</string> <string name="driver_tag_downloaded">다운로드됨</string> <string name="driver_tag_imported">가져옴</string> - - <!-- The driver is one half of a bundle that sets both drivers --> <string name="driver_tag_bundle">ANDROID + LINUX</string> - - <!-- %1$s is the limit's state (e.g. Child-process limit is on), %2$s what to do, %3$s the ADB command --> <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> <string name="display_session">세션 디스플레이</string> <string name="display_resolution">해상도</string> @@ -2048,6 +1874,7 @@ <string name="display_frame_rate">프레임 속도</string> <string name="display_look_filter">%1$s 스케일링을 %2$s(으)로 설정합니다.</string> <string name="display_match_screen">화면에 맞춤(%1$d×%2$d)</string> + <string name="display_follow_screen">화면 따라가기(접거나 펼치면 크기 변경)</string> <string name="mode_tab_steam">Steam</string> <string name="device_info_show">기기 세부 정보 표시</string> <string name="device_info_hide">기기 세부 정보 숨기기</string> @@ -2057,6 +1884,213 @@ <string name="device_info_copied">복사했습니다.</string> <string name="force_ssbs_title">SSBS 강제</string> <string name="force_ssbs_hint">Wine이 계속 끄는 CPU 속도 설정을 켜 둡니다. Snapdragon 8 Elite에서 Windows 게임이 빨라질 수 있으며, 이전 칩에서는 변화가 거의 없습니다. 다음 게임 실행 시 적용됩니다.</string> + + <string name="rail_stores">스토어</string> + <string name="source_steam">Steam</string> + <string name="source_added">사용자 정의</string> + <string name="setup_stores">스토어</string> + <string name="setup_stores_open_on">스토어를 열 때 표시</string> + <string name="setup_stores_speed">다운로드 속도 단계</string> + <string name="setup_stores_engine">스토어 엔진</string> + <string name="setup_stores_engine_chip_ready">● 엔진 준비됨</string> + <string name="setup_stores_engine_chip_missing">빌드되지 않음</string> + <string name="stores_tier_balanced">균형</string> + <string name="stores_tier_fast">빠름</string> + <string name="stores_tier_max">최대</string> + <string name="stores_title">스토어</string> + <string name="stores_settings">스토어 설정</string> + <string name="stores_settings_eyebrow">설정</string> + <string name="stores_chip_signed_out">(로그인 안 됨)</string> + <string name="stores_tab_store">스토어</string> + <string name="stores_tab_installed">설치됨</string> + <string name="stores_tab_library">라이브러리</string> + <string name="stores_tab_all">전체</string> + <string name="stores_tab_downloads">다운로드</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">로그인</string> + <string name="stores_signout_named">%1$s · 로그아웃</string> + <string name="stores_signout_title">%1$s에서 로그아웃하시겠습니까?</string> + <string name="stores_signout_note">설치된 게임은 유지됩니다. 다시 로그인하면 라이브러리를 다시 가져옵니다.</string> + <string name="stores_signout_stay">로그인 유지</string> + <string name="stores_signout_go">로그아웃</string> + <string name="stores_search_catalog">%1$s 카탈로그 검색…</string> + <string name="stores_search_installed">설치된 게임 검색…</string> + <string name="stores_search_library">내 라이브러리 검색…</string> + <string name="stores_search_open">검색</string> + <string name="stores_installed_empty">설치된 항목 없음</string> + <string name="stores_library_loading">불러오는 중</string> + <string name="stores_nothing_matches">게임 없음</string> + <string name="stores_shelves_loading">스토어 불러오는 중…</string> + <string name="stores_amazon_no_catalog">카탈로그 없음</string> + <string name="stores_shelf_new">새로 나온 게임</string> + <string name="stores_shelf_deals">할인</string> + <string name="stores_shelf_free">무료 게임</string> + <string name="stores_shelf_trending">인기 급상승</string> + <string name="stores_shelf_library">내 라이브러리</string> + <string name="stores_play">플레이</string> + <string name="stores_install">설치</string> + <string name="stores_resume_install">설치 재개</string> + <string name="stores_dl_interrupted">중단됨</string> + <string name="stores_install_size">설치 · %1$s</string> + <string name="stores_get_free">무료로 받기</string> + <string name="stores_view_on">%1$s에서 보기</string> + <string name="stores_buy_price">구매 · %1$s</string> + <string name="stores_installed_chip">설치됨</string> + <string name="stores_in_library">라이브러리에 있음</string> + <string name="stores_free">무료</string> + <string name="stores_resume">재개</string> + <string name="stores_refresh">새로 고침</string> + <string name="stores_sort">정렬</string> + <string name="stores_sort_last_played">최근 플레이</string> + <string name="stores_sort_recently_installed">최근 설치</string> + <string name="stores_sort_title_asc">제목 A–Z</string> + <string name="stores_sort_title_desc">제목 Z–A</string> + <string name="stores_sort_size_desc">크기: 큰순</string> + <string name="stores_sort_size_asc">크기: 작은순</string> + <string name="stores_sort_release_date">출시일</string> + <string name="stores_view_list">목록 보기</string> + <string name="stores_view_cards">카드 보기</string> + <string name="stores_show_mature">성인용 콘텐츠 표시</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">오프라인</string> + <string name="epic_card_none">끔</string> + <string name="epic_eos">Epic 로그인(EOS)</string> + <string name="epic_offline">오프라인으로 실행</string> + <string name="epic_resolve">Epic 로그인 문제 해결</string> + <string name="epic_client_version">버전 %1$s</string> + <string name="epic_client_no_runtime">먼저 Linux 런타임을 설치하세요</string> + <string name="epic_client_checking">최신 버전 확인 중…</string> + <string name="epic_client_unpacking">압축 해제 중…</string> + <string name="epic_client_unreachable">다운로드 서버가 응답하지 않았습니다</string> + <string name="epic_client_needs_fex">Epic Games Launcher에는 Steam이 다운로드하는 FEX가 필요합니다. Steam이 시작된 후 런처를 다시 여세요.</string> + <string name="epic_client_download_failed">다운로드 실패: %1$s</string> + <string name="epic_client_unpack_failed">런처 압축을 해제할 수 없습니다: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher가 로그인을 받아들이지 않았습니다. 런처에서 다시 시작하세요.</string> + <string name="epic_client_uninstall_body">런처를 삭제하고 공간을 확보합니다. Epic 게임은 설치된 상태로 계속 작동하며, 로그인은 다시 설치할 때를 위해 유지됩니다.</string> + <string name="epic_client_uninstall_stops">실행 중인 세션이 먼저 종료됩니다.</string> + <string name="epic_client_uninstalled">Epic Games Launcher를 제거했습니다</string> + <string name="epic_client_uninstall_failed">일부 런처 파일을 삭제하지 못했습니다. 다시 시도하세요.</string> + <string name="epic_client_uninstalling">Epic Games Launcher 제거가 끝날 때까지 기다려 주세요</string> + <string name="store_cloud_saves">클라우드 저장</string> + <string name="cloud_upload">클라우드에 업로드</string> + <string name="cloud_download">클라우드에서 다운로드</string> + <string name="cloud_none">클라우드 저장 없음</string> + <string name="cloud_conflict">클라우드 충돌</string> + <string name="cloud_conflict_files">클라우드 충돌 · 파일 %1$d개</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">클라우드 유지</string> + <string name="cloud_keep_local">로컬 유지</string> + <string name="cloud_checking">클라우드 확인 중…</string> + <string name="cloud_last_sync">마지막 동기화 %1$s</string> + <string name="cloud_never">아직 동기화 안 됨</string> + <string name="cloud_done">파일 %1$d개</string> + <string name="stores_eyebrow_installed">설치됨</string> + <string name="stores_eyebrow_library">내 라이브러리</string> + <string name="stores_eyebrow_store">스토어</string> + <string name="achievements_title">도전 과제</string> + <string name="achievements_count">%2$d개 중 %1$d개 달성</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">달성 · %1$d</string> + <string name="achievements_group_locked">미달성 · %1$d</string> + <string name="achievements_group_hidden">숨겨짐 · %1$d</string> + <string name="achievements_hidden">숨겨진 도전 과제</string> + <string name="achievements_hidden_detail">달성하면 세부 정보가 표시됩니다.</string> + <string name="achievements_all">모든 도전 과제 달성</string> + <string name="achievements_reading">불러오는 중…</string> + <string name="achievements_signed_out">도전 과제를 보려면 %1$s에 로그인하세요.</string> + <string name="achievements_unreachable">%1$s에 연결할 수 없습니다. 온라인 상태에서 다시 확인하세요.</string> + <string name="achievements_none">%1$s에 이 게임의 도전 과제가 없습니다.</string> + <string name="achievements_show_all">모두 보기(%1$d)</string> + <string name="achievements_dialog_title">도전 과제 · %1$s</string> + <string name="stores_in_steam">✓ Steam에 있음</string> + <string name="stores_uninstall">제거</string> + <string name="stores_uninstalling">제거 중…</string> + <string name="stores_uninstall_title">%1$s을(를) 제거하시겠습니까?</string> + <string name="stores_uninstall_body_size">%1$s의 공간을 확보하고 Steam에서 제거합니다.</string> + <string name="stores_uninstall_body">게임 파일과 Steam 바로 가기를 제거합니다.</string> + <string name="stores_launch_not_registered">다음에 Steam을 시작하면 게임이 표시됩니다. Steam에서 실행하거나 지금 Steam을 시작하세요.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">게임별 Steam 선택</string> + <string name="stores_card_audio">오디오</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">구성 요소</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">엔진</string> + <string name="stores_card_engine_value">%1$s · 네이티브</string> + <string name="stores_card_engine_java">%1$s · 내장</string> + <string name="stores_how_it_runs">실행 방식</string> + <string name="stores_kv_fetched">가져온 곳</string> + <string name="stores_kv_fetched_value">%1$s, 내 계정으로</string> + <string name="stores_kv_installed_to">설치 위치</string> + <string name="stores_kv_installed_to_value">게임 저장 공간(Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">실행 도구</string> + <string name="stores_kv_launched_by_value">Steam 및 Proton, Steam 게임과 같은 방식</string> + <string name="stores_kv_launched_by_epic">Steam 및 Proton · 실행할 때마다 Epic 로그인, EOS 오버레이 끔</string> + <string name="stores_kv_launched_by_amazon">Steam 및 Proton · Amazon Games Services 변수 설정됨</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">설치 시 Steam에 추가됨(Deck UI + Steam Input)</string> + <string name="stores_downloads_empty">다운로드 없음</string> + <string name="stores_dl_paused">일시 중지됨</string> + <string name="stores_dl_queued">대기 중</string> + <string name="stores_dl_queued_at">대기 중 · #%1$d</string> + <string name="stores_dl_cancelled">취소됨</string> + <string name="stores_dl_failed">실패</string> + <string name="stores_dl_failed_reason">실패 · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">일시 중지</string> + <string name="stores_dl_resume">재개</string> + <string name="stores_dl_cancel">취소</string> + <string name="stores_dl_retry">다시 시도</string> + <string name="stores_dl_clear">지우기</string> + <string name="stores_dl_clear_all">완료된 항목 지우기</string> + <string name="stores_stage_manifest">매니페스트</string> + <string name="stores_stage_download">다운로드</string> + <string name="stores_stage_verify">검증</string> + <string name="stores_stage_install">설치</string> + <string name="stores_stage_done">완료</string> + <string name="stores_stage_checking">확인 중</string> + <string name="stores_stage_downloading">다운로드 중</string> + <string name="stores_dl_cancel_confirm">다운로드를 삭제하시겠습니까?</string> + <string name="stores_dl_failed_kept">실패 · %1$s 유지됨</string> + <string name="stores_stage_verifying">검증 중</string> + <string name="stores_stage_installing">설치 중</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">파일 %1$d/%2$d개</string> + <string name="stores_download_manager">다운로드 관리자</string> + <string name="stores_parallel">동시 다운로드 수</string> + <string name="stores_install_where">설치 위치</string> + <string name="stores_install_title">%1$s 설치:</string> + <string name="stores_target_internal">내부 저장 공간</string> + <string name="stores_target_free">%1$s 사용 가능</string> + <string name="stores_target_free_unknown">사용 가능한 공간 알 수 없음</string> + <string name="stores_storage_insufficient">공간 부족: %1$s 필요, %2$s 남음</string> + <string name="stores_storage_low">공간 부족(사용 가능 %1$s, 필요 %2$s)</string> + <string name="stores_notification_channel">스토어 다운로드</string> + <string name="stores_notification_channel_hint">게임 다운로드 진행률을 표시하고 백그라운드에서 다운로드를 계속 진행합니다</string> + <string name="stores_notification_one">다운로드 중</string> + <string name="stores_notification_many">다운로드 %1$d개</string> + <string name="stores_notification_waiting">준비 중…</string> + <string name="stores_notification_done_channel">완료된 스토어 다운로드</string> + <string name="stores_notification_installed">%1$s 설치됨</string> + <string name="stores_notification_failed">%1$s 다운로드 실패</string> + <string name="stores_notification_delete">삭제</string> + <string name="stores_notification_keep">유지</string> + <string name="stores_login_title">%1$s에 로그인</string> + <string name="stores_login_provider_title">계정 제공업체로 로그인</string> + <string name="stores_login_reload">새로 고침</string> + <string name="stores_login_close">닫기</string> + <string name="stores_login_retry">다시 시도</string> + <string name="stores_login_finishing">로그인 완료 중…</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> + <string name="stores_login_error_ssl">로그인 페이지 연결이 안전하지 않습니다.</string> + <string name="stores_login_error_verification">로그인을 확인할 수 없습니다. 다시 시도하세요.</string> + <string name="stores_login_error_generic">로그인에 실패했습니다. 다시 시도하세요.</string> <string name="common_close">닫기</string> <string name="common_back">뒤로</string> <string name="common_edit">편집</string> @@ -2070,6 +2104,21 @@ <string name="edit_other_exe">다른 exe…</string> <string name="edit_remove">제거</string> <string name="art_cover">커버</string> + <string name="art_wide_cover">와이드 커버</string> + <string name="art_adjust_logo">로고 조정</string> + <string name="logo_pos_default">기본</string> + <string name="logo_pos_upper_left">왼쪽 위</string> + <string name="logo_pos_upper_center">가운데 위</string> + <string name="logo_pos_center">가운데</string> + <string name="logo_pos_bottom_left">왼쪽 아래</string> + <string name="logo_pos_bottom_center">가운데 아래</string> + <string name="logo_pos_position">위치</string> + <string name="logo_pos_size">크기</string> + <string name="logo_pos_save">저장</string> + <string name="logo_pos_reset">기본값으로</string> + <string name="logo_pos_hint">게임 배경에 Steam과 같은 방식으로 그려집니다. 위치가 몇 픽셀 어긋날 수 있습니다.</string> + <string name="logo_pos_no_logo">이 게임에는 아직 로고가 없습니다. 로고에서 하나를 고르면 여기에 표시됩니다.</string> + <string name="logo_pos_failed">로고 위치를 저장하지 못했습니다. 다시 시도하세요.</string> <string name="art_background">배경</string> <string name="art_logo">로고</string> <string name="art_icon">아이콘</string> @@ -2082,10 +2131,732 @@ <string name="art_pick_image">이미지 선택…</string> <string name="art_pick_title">이미지 선택: %1$s</string> <string name="art_reset">자동으로 재설정</string> + <string name="art_search_sgdb">SteamGridDB 검색…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">게임 검색</string> + <string name="art_sgdb_other_games">다른 결과</string> + <string name="art_sgdb_none">찾을 수 없습니다.</string> + <string name="art_sgdb_no_key">SteamGridDB에는 API 키가 필요합니다. 설정 › 런처에서 추가하세요.</string> + <string name="art_sgdb_bad_key">SteamGridDB가 이 API 키를 받지 않았습니다. 설정 › 런처에서 확인하세요.</string> + <string name="art_sgdb_limit">SteamGridDB가 현재 요청을 제한하고 있습니다. 잠시 후 다시 시도하세요.</string> + <string name="art_sgdb_offline">SteamGridDB에 연결할 수 없습니다. 네트워크 연결을 확인하세요.</string> + <string name="art_sgdb_server">SteamGridDB에 문제가 발생했습니다. 잠시 후 다시 시도하세요.</string> + <string name="art_sgdb_no_game">SteamGridDB에 이 게임의 결과가 없습니다. 검색을 사용해 보세요.</string> <plurals name="games_added_n"> <item quantity="other">게임 %1$d개 추가됨</item> </plurals> <plurals name="games_already_n"> <item quantity="other">%1$d개는 이미 게임에 있음</item> </plurals> + <string name="hop_back">B · %1$s(으)로 돌아가기</string> + <string name="hop_from_games">게임</string> + <string name="hop_from_play">플레이 설정</string> + <string name="sheet_graphics_drivers">그래픽 드라이버</string> + <string name="comp_this_proton">이 Proton</string> + <string name="comp_every_proton">모든 Proton</string> + <string name="comp_for_every_proton">모든 Proton에 적용</string> + <string name="comp_available_count">사용 가능 · %1$d</string> + <string name="comp_checked">확인 시각 %1$s</string> + <string name="comp_check_all">새 구성 요소 및 드라이버 확인</string> + <string name="comp_get">받기</string> + <string name="comp_proton_bar">%1$s · 아래의 DXVK, VKD3D-Proton 및 FEX는 이 Proton용입니다</string> + <string name="comp_device_tested">%1$s · 테스트됨</string> + <string name="comp_device_untested">%1$s · 테스트되지 않음</string> + <string name="comp_device_unsupported">%1$s · 지원되지 않음</string> + <string name="gpu_auto_keeps">권장 조합을 최신 상태로 유지합니다</string> + <string name="gpu_bar_auto">자동 · %1$s</string> + <string name="gpu_separately">런타임 및 디스플레이 드라이버 개별 설정</string> + <string name="gpu_use_title">%1$s을(를) 사용하시겠습니까?</string> + <string name="gpu_mode_title">드라이버 선택 방식</string> + <string name="gpu_mode_auto_detail">이 GPU에 가장 좋은 조합을 자동으로 선택하고 최신으로 유지합니다</string> + <string name="gpu_mode_pair">조합</string> + <string name="gpu_mode_pair_detail">조합 하나를 골라 두 드라이버를 함께 설정합니다</string> + <string name="gpu_mode_mix">개별 선택</string> + <string name="gpu_mode_mix_detail">디스플레이 드라이버와 런타임 드라이버를 따로 선택합니다</string> + <string name="gpu_mode_pair_short">조합</string> + <string name="gpu_mode_mix_short">개별</string> + <string name="gpu_src_auto">자동</string> + <string name="gpu_src_pair">조합</string> + <string name="gpu_src_bundle">내장</string> + <string name="gpu_src_chosen">선택됨</string> + <string name="gpu_src_by_gpu">GPU별</string> + <string name="gpu_src_default">기본</string> + <string name="gpu_display_live">그리는 중</string> + <string name="gpu_display_pending">재시작 대기 · 현재 %1$s 그리는 중</string> + <string name="gpu_runtime_live">실행 중</string> + <string name="gpu_runtime_pending">다음 세션에 적용 · 이번 세션은 %1$s 사용</string> + <string name="gpu_display_next">화면 그리기를 담당합니다. 다음 세션부터 적용됩니다.</string> + <string name="gpu_previous_driver">이전 드라이버</string> + <string name="gpu_restart_banner">디스플레이 드라이버를 바꾸려면 다시 시작하세요.</string> + <string name="gpu_restart_blocked">실행 중인 세션을 중지한 뒤 디스플레이 드라이버를 바꾸려면 DroidDeck을 다시 시작하세요.</string> + <string name="gpu_restart_now">지금 다시 시작</string> + <string name="gpu_restart_later">나중에</string> + <string name="gpu_auto_title">%1$s에 맞춰 이 조합을 자동으로 선택했습니다</string> + <string name="gpu_auto_builtin_title">자동 모드가 %1$s에 내장 드라이버를 사용합니다</string> + <string name="gpu_auto_reason">%1$s 시리즈에 맞춰 선택했습니다. 새 버전은 백그라운드에서 설치됩니다.</string> + <string name="gpu_pair_title">조합 선택</string> + <string name="gpu_pair_hint">조합은 디스플레이 드라이버와 런타임 드라이버를 함께 설정합니다.</string> + <string name="gpu_mix_title">드라이버 개별 선택</string> + <string name="gpu_mix_hint">내장 패키지는 둘 다 함께 채웁니다. 디스플레이 드라이버 변경은 다시 시작한 뒤, 런타임 드라이버는 다음 세션에 적용됩니다.</string> + <string name="gpu_change_display">디스플레이 드라이버 변경</string> + <string name="gpu_change_runtime">런타임 드라이버 변경</string> + <string name="gpu_autos_pick">자동 선택</string> + <string name="gpu_installed">설치됨</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · 재시작 후 적용</string> + <string name="gpu_chip_restart">%1$s · 재시작 대기</string> + <string name="comp_this_device">이 기기</string> + <string name="proton_remove_title">%1$s을(를) 제거하시겠습니까?</string> + <string name="setup_tab_diagnostics">진단</string> + <string name="setup_ready">플레이 준비 완료</string> + <string name="setup_not_ready">아직 플레이할 준비가 되지 않음</string> + <string name="setup_ready_runtime">런타임 %1$s</string> + <string name="setup_ready_limit_off">프로세스 제한 꺼짐</string> + <string name="setup_ready_signed_in">%1$s(으)로 로그인됨</string> + <string name="setup_needs_you">확인이 필요한 항목</string> + <string name="setup_group_look">외관</string> + <string name="setup_group_device">이 기기</string> + <string name="setup_group_art">라이브러리 아트워크</string> + <string name="setup_group_download">다운로드</string> + <string name="setup_download_source">소스</string> + <string name="setup_download_source_auto">자동</string> + <string name="setup_download_source_direct">직접</string> + <string name="setup_download_source_mirror">미러</string> + <string name="setup_download_source_custom">사용자 지정 프리픽스</string> + <string name="setup_download_mirror">사이트</string> + <string name="setup_download_prefix">프리픽스</string> + <string name="flathub_eyebrow">LINUX 앱</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Linux 데스크톱용 앱으로, 데스크톱에서 엽니다.</string> + <string name="flathub_setup">Flathub 설정</string> + <string name="flathub_remove_title">%1$s을(를) 제거하시겠습니까?</string> + <string name="flathub_remove_note">설정과 파일은 유지됩니다.</string> + <string name="flathub_keep">유지</string> + <string name="desktop_size">디스크 사용량</string> + <string name="desktop_uninstall_title">데스크톱을 제거하시겠습니까?</string> + <string name="desktop_all_systems">전체</string> + <string name="gog_achievements">GOG 도전 과제</string> + <string name="gog_achievements_hint">지원되는 GOG 게임의 도전 과제를 동기화합니다. 다음 실행부터 적용됩니다.</string> + <string name="gog_achievements_off">도전 과제 꺼짐</string> + <string name="gog_achievements_on">도전 과제 켜짐</string> + <string name="gog_achievements_signin">GOG에 다시 로그인하세요</string> + <string name="gog_achievements_uploaded">도전 과제 업로드됨</string> + <string name="gog_achievements_pending">도전 과제 업로드 대기 중</string> + <string name="gog_achievements_enable_store">스토어 설정에서 GOG 도전 과제를 활성화하세요</string> + <string name="gog_achievements_unavailable">도전 과제를 사용할 수 없습니다. 세션 로그를 확인하세요</string> + <string name="achievement_unlocked">도전 과제 잠금 해제됨</string> + <string name="touch_paste">붙여넣기</string> + <string name="touch_dpad">방향패드</string> + <string name="touch_left_stick">왼쪽 스틱</string> + <string name="touch_right_stick">오른쪽 스틱</string> + <string name="touch_menu">메뉴</string> + <string name="touch_keyboard">키보드</string> + <string name="touch_dpad_up">방향패드 위</string> + <string name="touch_dpad_down">방향패드 아래</string> + <string name="touch_dpad_left">방향패드 왼쪽</string> + <string name="touch_dpad_right">방향패드 오른쪽</string> + <string name="touch_title">터치 컨트롤</string> + <string name="touch_controller">터치 컨트롤러</string> + <string name="touch_mouse">마우스</string> + <string name="touch_on">켜짐</string> + <string name="touch_off">꺼짐</string> + <string name="touch_speed_slow">느림</string> + <string name="touch_speed_normal">보통</string> + <string name="touch_speed_fast">빠름</string> + <string name="touch_edit_layout">레이아웃 편집</string> + <string name="touch_droiddeck_menu">DroidDeck 메뉴</string> + <string name="touch_drag_hint">화면으로 컨트롤을 끌어다 놓으세요</string> + <string name="touch_arrange">배치</string> + <string name="touch_discard">취소</string> + <string name="touch_saving">저장 중…</string> + <string name="touch_icon">아이콘</string> + <string name="touch_narrower">너−</string> + <string name="touch_wider">너+</string> + <string name="touch_shorter">높−</string> + <string name="touch_taller">높+</string> + <string name="touch_hide">숨기기</string> + <string name="touch_color_opacity">색상 및 불투명도…</string> + <string name="touch_copy_layout">이 레이아웃 복사</string> + <string name="touch_layout_copied">레이아웃이 복사되었습니다. 어떤 게임의 터치 레이아웃에도 붙여넣을 수 있습니다</string> + <string name="touch_paste_layout">복사한 레이아웃 붙여넣기</string> + <string name="touch_reset_layout">Steam 기본값으로 재설정</string> + <string name="touch_no_binding">이 컨트롤에는 아이콘을 지정할 Steam 바인딩이 없습니다</string> + <string name="touch_icon_for">%1$s 아이콘</string> + <string name="touch_layout_color">터치 레이아웃 색상</string> + <string name="touch_done">완료</string> + <string name="touch_save_failed">터치 레이아웃을 저장할 수 없습니다</string> + <string name="touch_saved">터치 레이아웃이 Steam에 저장되었습니다</string> + <string name="touch_app_id">앱 %1$d</string> + <string name="touch_label_hint">라벨(선택 사항)</string> + <string name="touch_icons_missing">Steam 아이콘을 찾을 수 없습니다</string> + <plurals name="touch_icons_found"> + <item quantity="other">Steam 아이콘 %1$d개</item> + </plurals> + <string name="touch_icon_color">아이콘 색상</string> + <string name="touch_button_color">버튼 색상</string> + <string name="touch_no_icon">아이콘 없음</string> + + <string name="stores_sync_sign_in">로그인 확인 중…</string> + <string name="stores_sync_library">라이브러리를 가져오는 중…</string> + <string name="stores_sync_game_list">게임 목록을 가져오는 중…</string> + <string name="stores_sync_details">게임 정보를 불러오는 중… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="other">게임 %1$d개 동기화 중…</item> + </plurals> + <string name="stores_sync_progress">동기화 중… %1$d/%2$d</string> + <string name="stores_sync_cover_art">커버 아트를 가져오는 중…</string> + <string name="stores_sync_failed">동기화 실패</string> + <string name="stores_sync_no_games">%1$s 라이브러리에서 게임을 찾을 수 없습니다</string> + <string name="stores_sync_amazon_no_answer">Amazon Games가 라이브러리 요청에 응답하지 않았습니다. 새로고침하거나 다시 로그인하세요</string> + <string name="stores_sync_gog_unreachable">GOG에 연결할 수 없습니다</string> + <string name="stores_sync_gog_unreadable">GOG 라이브러리를 읽을 수 없습니다</string> + <string name="stores_registering">Steam에 등록 중…</string> + <string name="mode_client_arch">Steam 클라이언트</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC 진단</string> + <string name="setup_vac_diag_hint">Source 게임은 콘솔을 기록합니다(-condebug). 세션 로그의 vac.txt에서 보안 여부를 확인할 수 있습니다</string> + <string name="load_starting_steam_x64">Steam x86-64 시작 중</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">x86-64 Steam 클라이언트에서 사용</string> + <string name="storage_uninstall_in_x64">이 사본은 x86-64 Steam 클라이언트에 있습니다. Steam 클라이언트에서 x86-64를 선택한 다음 여기에서 제거하세요.</string> + <string name="storage_uninstall_in_arm64">이 사본은 ARM64 Steam 클라이언트에 있습니다. Steam 클라이언트에서 ARM64를 선택한 다음 여기에서 제거하세요.</string> + <string name="drawer_page_glasses">안경</string> + <string name="glasses_open">VITURE 안경</string> + <string name="glasses_control">안경 제어</string> + <string name="glasses_driver_missing">이 빌드에는 이 안경용 드라이버가 포함되어 있지 않습니다.</string> + <string name="glasses_connection_failed">안경에 연결하지 못했습니다. 케이블을 다시 연결하거나 “허용”을 탭하여 다시 시도하세요.</string> + <string name="glasses_allow">허용</string> + <string name="glasses_allow_hint">DroidDeck이 안경의 주사율, 3D 모드, 밝기, 볼륨, 선블록을 설정하고 헤드 트래킹을 읽도록 허용합니다.</string> + <string name="glasses_asking">Android 안내 창에서 허용하기를 기다리는 중…</string> + <string name="glasses_denied">제어가 거부되었습니다. 안경 설정을 바꾸려면 허용하세요.</string> + <string name="glasses_no_control">이 안경은 게임을 표시하지만 여기에서 설정을 바꿀 수는 없습니다.</string> + <string name="glasses_output">출력</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">안경에 게임 표시</string> + <string name="glasses_game_on_hint">게임을 안경에만 표시합니다. 끄면 휴대폰에 표시되고 Android가 휴대폰 화면을 미러링합니다.</string> + <string name="glasses_display">디스플레이</string> + <string name="glasses_refresh">주사율</string> + <string name="glasses_3d">3D (사이드 바이 사이드)</string> + <string name="glasses_3d_hint">스마트 안경을 사이드 바이 사이드 3D 모드로 전환합니다. 헤드 추적은 별도로 제어됩니다.</string> + <string name="glasses_3d_failed">3D 신호를 확인하지 못했습니다. 2D 화면이 돌아오면 다시 시도하세요.</string> + <string name="glasses_no_signal">화면 없음: 안경이 이 휴대폰에서 보낼 수 없는 모드에 있습니다. 2D/3D 버튼을 길게 누르거나 안경을 뺐다가 다시 연결하세요.</string> + <string name="glasses_3d_refresh">3D 주사율</string> + <string name="glasses_auto3d">VR 게임에서 3D</string> + <string name="glasses_auto3d_hint">SteamVR이 실행되는 동안 3D로 전환하고 끝나면 되돌립니다.</string> + <string name="glasses_picture">화면</string> + <string name="glasses_picture_hint">자동 모드는 양쪽 눈에 평면 콘텐츠를 표시하고 SteamVR을 감지합니다. SBS 콘텐츠의 경우 \'Side-by-side 게임\'을 선택하세요.</string> + <string name="glasses_picture_auto">자동</string> + <string name="glasses_picture_screen">가상 화면</string> + <string name="glasses_picture_sbs">사이드 바이 사이드 게임</string> + <string name="glasses_screen_size">화면 너비</string> + <string name="glasses_screen_distance">화면 거리</string> + <string name="glasses_screen_next_session">너비와 거리는 게임이 안경에서 가상 화면으로 실행될 때 적용됩니다.</string> + <string name="glasses_screen_no_output">이 설정은 “안경에 게임 표시”가 켜져 있고 게임이 안경에 표시될 때 적용됩니다.</string> + <string name="glasses_screen_flat_hint">“자동”에서는 이 2D 게임이 전체 화면으로 유지됩니다. 너비, 거리, 헤드 트래킹을 조정하려면 가상 화면을 사용하세요.</string> + <string name="glasses_screen_use">가상 화면 사용</string> + <string name="glasses_screen_direct_hint">SteamVR은 화면을 가득 채웁니다. VR 환경에서 시야각을 조정하세요. 너비와 거리는 가상 화면에만 적용됩니다.</string> + <string name="glasses_screen_sbs_hint">사이드 바이 사이드 게임은 양쪽 눈의 시야를 각각 가득 채웁니다. 너비와 거리는 가상 화면에만 적용됩니다.</string> + <string name="glasses_tracking_flat_hint">“자동”에서는 이 2D 게임이 시야에 고정됩니다. 헤드 트래킹을 사용하려면 “디스플레이”에서 “가상 화면”을 선택하세요.</string> + <string name="glasses_tracking_sbs_hint">헤드 트래킹은 가상 화면이나 실행 중인 SteamVR 게임에 적용됩니다.</string> + <string name="glasses_hardware">장치</string> + <string name="glasses_brightness">밝기</string> + <string name="glasses_volume">볼륨</string> + <string name="glasses_sunblock">선블록</string> + <string name="glasses_sunblock_hint">앞쪽 렌즈를 어둡게 합니다.</string> + <string name="glasses_tracking">추적</string> + <string name="glasses_head_tracking">헤드 트래킹</string> + <string name="glasses_head_tracking_hint">안경의 센서가 머리 움직임에 맞춰 가상 화면과 SteamVR을 돌립니다.</string> + <string name="glasses_recenter">시점 재설정</string> + <string name="glasses_recenter_button">화면 중심 재설정</string> + <string name="glasses_vr_fov">SteamVR 시야각</string> + <string name="glasses_vr_fov_hint">낮추면 SteamVR이 가까워져 안경을 가득 채우고, 높이면 주변이 더 넓게 보입니다.</string> + <string name="glasses_playing">%1$s에서 플레이 중</string> + <string name="glasses_calibration">트래킹 보정</string> + <string name="glasses_calibration_hint">드리프트를 줄이고 수평 기준을 맞춥니다.</string> + <string name="glasses_calibration_saved_hint">저장된 보정이 이 안경에 적용되어 있습니다.</string> + <string name="glasses_calibration_open">보정</string> + <string name="glasses_calibration_instructions">연결된 안경을 수평한 곳에 뒤집어 놓고 프레임이 고르게 닿도록 하세요. “시작”을 탭한 다음 약 8초 동안 건드리지 마세요. 움직이면 측정이 다시 시작됩니다. 드리프트와 기울기는 보정되지만 좌우 방향은 보정되지 않습니다.</string> + <string name="glasses_calibration_settling">안경을 뒤집어 둔 채 건드리지 마세요. 안정될 때까지 기다리는 중…</string> + <string name="glasses_calibration_collecting">센서를 측정하는 중입니다. 안경을 움직이지 마세요.</string> + <string name="glasses_calibration_moving">움직임이 감지되었습니다. 안경을 건드리지 마세요. 측정이 자동으로 다시 시작됩니다.</string> + <string name="glasses_calibration_turn_over">안경을 수평한 곳에 뒤집어 놓으세요. 올바른 위치에 놓이면 측정이 시작됩니다.</string> + <string name="glasses_calibration_complete">보정이 저장되었습니다. 안경을 쓰고 정면을 바라본 다음 “완료”를 탭하여 중앙을 맞추세요.</string> + <string name="glasses_calibration_failed">보정을 완료하지 못했습니다. 연결을 확인하고 안경을 움직이지 않게 둔 다음 다시 시도하세요. 이전 보정은 그대로 유지됩니다.</string> + <string name="glasses_calibration_start">시작</string> + <string name="glasses_calibration_done">완료</string> + <string name="glasses_calibration_reset">트래킹 보정 초기화</string> + <string name="glasses_calibration_reset_hint">저장된 보정을 삭제하고 모델 기본값으로 되돌릴까요? 안경을 다시 쓴 후 중앙을 맞추세요.</string> + <string name="glasses_calibration_reset_button">초기화</string> + <string name="hand_camera_group">핸드 트래킹</string> + <string name="hand_camera_prompt_title">스마트폰 카메라로 손 또는 Joy-Con 컨트롤러 추적?</string> + <string name="hand_camera_prompt_body">컨트롤러가 연결되지 않은 경우, 스마트폰 카메라가 VR 환경에서 맨손을 추적합니다. 엄지와 검지를 오므려 클릭, 손을 오므려 잡기, 손바닥을 자신 쪽으로 돌리고 오므려 메뉴를 엽니다. Joy-Con 컨트롤러가 연결된 경우, 카메라가 컨트롤러의 위치를 ​​추적하는 동안 Joy-Con 컨트롤러는 회전 및 버튼 입력을 제공합니다. 사진은 이 기기에서 처리되며 저장되거나 전송되지 않습니다.</string> + <string name="hand_camera_rear">후면 카메라</string> + <string name="hand_camera_rear_hint">권장합니다. 보통 더 선명하고 화각이 넓습니다.</string> + <string name="hand_camera_front">전면 카메라</string> + <string name="hand_camera_front_hint">기기의 뒷면을 당신 쪽으로 향하게 할 수 없을 때 사용합니다.</string> + <string name="hand_camera_allow">카메라 사용</string> + <string name="hand_camera_not_now">나중에</string> + <string name="hand_camera_setting">카메라 핸드 트래킹</string> + <string name="hand_camera_setting_hint">휴대폰 카메라를 사용하여 맨손 제스처를 사용하거나 VR에서 페어링된 Joy-Con 컨트롤러의 위치를 ​​조정합니다. Joy-Con 컨트롤러는 회전 및 버튼 입력을 제공합니다. 스마트 안경이 손이나 Joy-Con 컨트롤러를 추적하는 동안 일시 중지됩니다. 이미지는 이 기기에서만 처리됩니다.</string> + <string name="hand_camera_choice">카메라</string> + <string name="hand_camera_access">카메라 권한</string> + <string name="hand_camera_access_hint">핸드 트래킹을 시작하려면 카메라 권한을 허용하세요.</string> + <string name="hand_camera_access_denied">카메라 권한이 꺼져 있습니다. Android 설정에서 켜세요.</string> + <string name="hand_camera_allow_button">허용</string> + <string name="hand_camera_open_settings">설정 열기</string> + <string name="hand_camera_placement">카메라 위치</string> + <string name="hand_camera_placement_hint">플레이하기 전에 카메라에 당신이 보이는지 확인하세요.</string> + <string name="hand_camera_check">확인</string> + <string name="hand_camera_check_title">카메라 위치</string> + <string name="hand_camera_how_rear">기기를 가슴 높이쯤에서 1.5~2m 떨어진 곳에 세우고, 후면 카메라가 당신을 향하게 하세요. 그런 다음 손을 벌리고 화면 안으로 들어오세요.</string> + <string name="hand_camera_how_front">기기를 가슴 높이쯤에서 1.5~2m 떨어진 곳에 세우고, 화면이 당신을 향하게 하세요. 그런 다음 손을 벌리고 화면 안으로 들어오세요.</string> + <string name="hand_camera_starting">카메라를 시작하는 중…</string> + <string name="hand_camera_stand_up">기기가 눕혀져 있습니다. 카메라가 당신을 향하도록 세워 주세요.</string> + <string name="hand_camera_upright">카메라가 당신을 향하도록 기기를 더 세워 주세요.</string> + <string name="hand_camera_not_seen">아직 보이지 않습니다. 머리와 어깨가 보이도록 화면 안으로 들어와 주세요.</string> + <string name="hand_camera_move_back">조금 뒤로 물러나 주세요.</string> + <string name="hand_camera_move_closer">조금 더 가까이 와 주세요.</string> + <string name="hand_camera_show_hands">카메라가 볼 수 있는 곳에서 양손을 뻗어 보여주세요.</string> + <string name="hand_camera_good">좋습니다.</string> + <string name="hand_camera_failed">카메라를 시작하지 못했습니다. 카메라를 사용 중인 다른 앱을 닫고 다시 시도하세요.</string> + <string name="hand_camera_switch">카메라 전환</string> + <string name="hand_camera_skip">건너뛰기</string> + <string name="hand_camera_done">완료</string> + <string name="glasses_xreal_network_missing">안경의 USB Ethernet 연결을 기다리는 중입니다. 이 휴대폰은 앱에 이 연결을 제공하지 않을 수 있습니다.</string> + <string name="glasses_xreal_connection_failed">XREAL 연결이 중단되었거나 지원되지 않는 응답을 받았습니다. 다시 시도하는 중…</string> + <string name="glasses_xreal_experimental">1S 지원은 실험 단계입니다. 안경 메뉴에서 Follow 모드를 사용하고 안정화를 끄세요. 트래킹 방향과 디스플레이 모드는 아직 기기에서 테스트가 필요합니다.</string> + <string name="stores_fact_developer">개발사</string> + <string name="stores_fact_publisher">배급사</string> + <string name="stores_fact_released">출시일</string> + <string name="stores_hltb_main">메인</string> + <string name="stores_hltb_extras">+ 추가 요소</string> + <string name="stores_hltb_completionist">완전 정복</string> + <string name="stores_hltb_hours">%1$s시간</string> + <string name="stores_hltb_minutes">%1$d분</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard 모드</string> + <string name="cardboard_mode_hint">휴대폰 VR 뷰어용 왼쪽 및 오른쪽 눈 화면입니다.</string> + <string name="cardboard_source">화면</string> + <string name="cardboard_source_screen">가상 스크린</string> + <string name="cardboard_source_sbs">사이드 바이 사이드 3D</string> + <string name="cardboard_viewer">뷰어</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">렌즈 없음</string> + <string name="cardboard_ipd">눈 사이 거리</string> + <string name="cardboard_screen_width">스크린 너비</string> + <string name="cardboard_screen_distance">스크린 거리</string> + <string name="cardboard_head_tracking">머리 추적</string> + <string name="cardboard_no_sensor">이 기기에는 회전 센서가 없습니다.</string> + <string name="cardboard_recenter">시점 재설정</string> + <string name="cardboard_recenter_button">재설정</string> + <string name="cardboard_steamvr">SteamVR (실험적)</string> + <string name="cardboard_steamvr_install">설치</string> + <string name="cardboard_steamvr_installing">SteamVR 다운로드 및 압축 해제 중…</string> + <string name="cardboard_steamvr_start">시작</string> + <string name="cardboard_steamvr_stop">중지</string> + <string name="cardboard_steamvr_unavailable">이 세션에서는 사용할 수 없습니다.</string> + <string name="cardboard_steamvr_failed">SteamVR이 응답하지 않았습니다. 세션 로그를 확인하세요.</string> + <string name="drawer_component_downloads">구성 요소 다운로드</string> + <string name="drawer_component_downloads_hint">다운로드는 구성 요소 페이지와 공유됩니다. 위에서 다운로드한 버전을 선택하면 다음 게임 실행 시 사용됩니다.</string> + <string name="drawer_component_choose_download">다운로드할 버전 선택</string> + <string name="display_picture_position">화면 위치</string> + <string name="display_position_top">위</string> + <string name="display_position_bottom">아래</string> + <string name="display_position_center">가운데(기본)</string> + <string name="setup_tab_storage">저장 공간</string> + <string name="storage_measuring">저장 공간 계산 중…</string> + <string name="storage_measuring_hint">처음 계산할 때는 몇 초 걸립니다.</string> + <string name="storage_internal">내부 저장 공간</string> + <string name="storage_used_of">%1$s / %2$s 사용 중</string> + <string name="storage_free">%1$s 사용 가능</string> + <string name="storage_droiddeck_uses">DroidDeck 사용량 %1$s. 계산 시각 %2$s.</string> + <string name="storage_rescanning">다시 계산 중…</string> + <string name="storage_other_apps">다른 Android 앱</string> + <string name="storage_safe_now">지금 안전하게 확보 가능</string> + <string name="storage_safe_hint">사용하지 않는 런타임, 잔여물, 오래된 로그</string> + <string name="storage_clean_up">정리…</string> + <string name="storage_session_running">세션을 중지해야 정리하거나 제거할 수 있습니다. 용량은 계속 표시됩니다.</string> + <string name="storage_where">사용 내역</string> + <string name="storage_games">Steam 게임</string> + <string name="storage_game_data">게임 데이터</string> + <string name="storage_game_data_hint">프리픽스 %1$s · 워크숍 %2$s · 셰이더 %3$s</string> + <string name="storage_tools">Proton과 런타임</string> + <string name="storage_tools_unused">%1$s 사용 안 함</string> + <string name="storage_stores">GOG, Epic 및 기타 스토어</string> + <string name="storage_stores_hint">스토어에서 제거</string> + <string name="storage_desktop">데스크톱 앱</string> + <string name="storage_desktop_hint">Flatpak 앱과 런타임</string> + <string name="storage_system">Linux 시스템과 Steam 클라이언트</string> + <string name="storage_system_hint">무엇이든 실행하는 데 필요</string> + <string name="storage_app_data">DroidDeck 데이터</string> + <string name="storage_app_data_hint">오래된 세션 로그 %1$s · 캐시 · 드라이버</string> + <string name="storage_legend_games">게임</string> + <string name="storage_legend_data">게임 데이터</string> + <string name="storage_legend_tools">Proton과 런타임</string> + <string name="storage_legend_stores">기타 스토어</string> + <string name="storage_legend_desktop">데스크톱 앱</string> + <string name="storage_legend_system">Linux 시스템</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">정리</string> + <string name="storage_clean_up_lede">설치된 게임이나 진행 중인 다운로드에는 영향을 주지 않습니다.</string> + <string name="storage_nothing_to_clean">지금은 정리할 항목이 없습니다.</string> + <string name="storage_selected">선택: %1$s · %2$s → 사용 가능 %3$s</string> + <string name="storage_cleaning">정리 중…</string> + <string name="storage_free_button">%1$s 확보</string> + <string name="storage_freed">%1$s 확보됨.</string> + <string name="storage_item_runtimes">사용하지 않는 Steam 런타임과 Proton</string> + <string name="storage_item_leftovers">제거한 게임의 잔여물</string> + <string name="storage_item_leftovers_unsure">저장 파일이 있을 수 있는 잔여물</string> + <string name="storage_item_logs">오래된 세션 로그</string> + <string name="storage_item_logs_detail">현재 세션의 로그는 유지됩니다</string> + <string name="storage_item_custom_detail">어떤 게임도 사용하지 않습니다. 사용하려면 구성 요소에서 다시 설치하세요.</string> + <string name="storage_item_shaders">설치된 게임의 셰이더 캐시</string> + <string name="storage_item_shaders_detail">플레이하면 다시 생성됩니다. 게임마다 첫 몇 분은 다시 끊깁니다.</string> + <string name="storage_tag_safe">안전</string> + <string name="storage_tag_unused">사용 안 함</string> + <string name="storage_tag_stutter">끊김</string> + <string name="storage_tag_saves">저장 파일 확인</string> + <string name="storage_tag_default">기본</string> + <string name="storage_tag_required">필수</string> + <string name="storage_tag_not_used">사용 안 함</string> + <string name="storage_back">저장 공간</string> + <string name="storage_games_with_data">%1$s 및 데이터</string> + <string name="storage_sort_largest">큰 순</string> + <string name="storage_sort_least_played">적게 플레이한 순</string> + <string name="storage_sort_sd">SD 카드에 있음</string> + <string name="storage_no_games">여기에 게임이 없습니다.</string> + <string name="storage_played">플레이 %1$s</string> + <string name="storage_never_played">플레이한 적 없음</string> + <string name="storage_game_parts">게임 %1$s · 데이터 %2$s</string> + <string name="storage_uninstall">제거</string> + <string name="storage_games_note">제거하면 Steam 기본 대화 상자가 열려 Steam에 기록됩니다. 게임을 SD 카드로 옮기려면 Steam › 설정 › 저장 공간을 사용하세요.</string> + <string name="storage_uninstall_title">%1$s 제거할까요?</string> + <string name="storage_uninstall_body">Steam이 열리고 확인을 요청합니다. 이 게임의 %1$s이 확보됩니다. 프리픽스는 잔여물을 정리할 때까지 남고, Steam 클라우드 저장 파일은 계정에 남습니다.</string> + <string name="storage_open_steam">Steam 열기</string> + <string name="storage_tools_detail">%1$s · %2$s 사용 안 함</string> + <string name="storage_remove_unused">사용 안 함 제거 · %1$s</string> + <string name="storage_in_use">사용 중</string> + <string name="storage_not_used">사용 안 함</string> + <string name="storage_remove">제거</string> + <string name="storage_remove_title">%1$s 제거할까요?</string> + <string name="storage_remove_body">%1$s이 확보됩니다. 나중에 게임이 필요로 하면 Steam이 다시 내려받습니다.</string> + <string name="storage_tool_fex_runtime">Linux x86 게임에 필요(FEX)</string> + <string name="storage_tool_arm_runtime">ARM64 Proton에 필요</string> + <string name="storage_tool_redist">게임이 요청한 VC++ 및 DirectX 설치 관리자</string> + <string name="storage_tool_fex">Linux x86 게임 실행</string> + <string name="storage_tool_steam">Steam 도구</string> + <string name="storage_tool_old_runtime">DroidDeck은 이 런타임 없이 게임을 실행할 수 있습니다</string> + <string name="storage_tool_x86_proton">x86 Proton이라 DroidDeck에서 실행할 수 없습니다</string> + <string name="storage_tool_custom_default">모든 게임의 기본값</string> + <string name="storage_tool_custom_unused">어떤 게임도 사용하지 않습니다</string> + <string name="storage_tool_custom_unknown">Steam 설정을 읽을 수 없어 유지합니다</string> + <string name="storage_cleanup_busy">저장 공간 정리가 끝날 때까지 기다리세요</string> + <string name="storage_low_title">%1$s만 남았습니다</string> + <string name="storage_low_body">Steam은 업데이트와 셰이더 캐시에 공간이 필요합니다. 10 GB 미만이면 게임 업데이트가 중간에 실패할 수 있습니다.</string> + <string name="storage_low_safe">%1$s 안전하게 확보 가능.</string> + <string name="storage_free_up">공간 확보</string> + <string name="storage_play_anyway">그래도 플레이</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d개 설치됨</item> + <item quantity="other">%d개 설치됨</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d개 SD 카드에 있음</item> + <item quantity="other">%d개 SD 카드에 있음</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">도구 %d개</item> + <item quantity="other">도구 %d개</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">게임 %d개의 빈 프리픽스 폴더와 셰이더 캐시</item> + <item quantity="other">게임 %d개의 빈 프리픽스 폴더와 셰이더 캐시</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">게임 %d개의 프리픽스에 파일이 남아 있고 로컬 저장 파일이 있을 수 있습니다. 남기려면 먼저 백업하세요.</item> + <item quantity="other">게임 %d개의 프리픽스에 파일이 남아 있고 로컬 저장 파일이 있을 수 있습니다. 남기려면 먼저 백업하세요.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">게임 %d개</item> + <item quantity="other">게임 %d개</item> + </plurals> + <string name="storage_tool_default_proton">DroidDeck 기본 Proton</string> + <string name="storage_tool_proton">DroidDeck의 Proton 11 옵션</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">게임 %d개 사용</item> + <item quantity="other">게임 %d개 사용</item> + </plurals> + <string name="storage_legend_components">구성 요소</string> + <string name="storage_components">구성 요소</string> + <string name="storage_item_components">사용하지 않는 구성 요소</string> + <string name="storage_component_original">원본 %1$s · %2$s</string> + <string name="storage_original_confirm">%1$s이 확보됩니다. 더 이상 설치되지 않은 Proton 버전만 되돌립니다.</string> + <string name="storage_leftovers_unchecked">확인하지 않음: Steam 앱 매니페스트를 읽을 수 없어 읽을 수 있을 때까지 제거한 게임의 프리픽스를 유지합니다.</string> + <string name="storage_failed">완료하지 못했습니다: %1$s</string> + <string name="storage_desktop_shared">공유 %1$s</string> + <string name="storage_data_installed">설치된 게임</string> + <string name="storage_data_parts">프리픽스 %1$s · 셰이더 %2$s · 워크숍 %3$s</string> + <string name="storage_clear_shaders">셰이더 지우기</string> + <string name="storage_data_leftovers">제거한 게임</string> + <string name="storage_steam_app">Steam 앱 %1$d</string> + <string name="storage_leftover_unsure_detail">프리픽스에 파일이 남아 있고 로컬 저장 파일이 있을 수 있습니다</string> + <string name="storage_leftover_confirm">Wine 프리픽스와 셰이더 캐시(%1$s)를 삭제합니다. 필요한 저장 파일은 먼저 백업하세요. Steam 클라우드 저장 파일은 계정에 남습니다.</string> + <string name="storage_data_other">유지</string> + <string name="storage_data_other_title">Steam이 아닌 게임과 Steam의 공유 프리픽스</string> + <string name="storage_data_other_detail">스토어에서 추가했거나 직접 추가한 게임의 프리픽스</string> + <string name="storage_components_packages">내려받은 패키지</string> + <string name="storage_components_originals">저장된 원본 파일</string> + <string name="storage_components_none">내려받은 구성 요소 패키지가 없습니다.</string> + <string name="storage_component_in_use">Proton이나 게임에서 선택됨</string> + <string name="storage_component_unused">어디에서도 선택되지 않음</string> + <string name="storage_original_kept">설치된 Proton 복원</string> + <string name="storage_original_old">더 이상 설치되지 않은 Proton 버전</string> + <string name="storage_tag_in_use">사용 중</string> + <string name="storage_components_note">사용 중인 구성 요소는 잠깁니다. 구성 요소에서 선택하세요. 여기에서 제거한 항목은 거기에서 다시 내려받을 수 있습니다.</string> + <string name="storage_component_confirm">%1$s이 확보됩니다. 직접 가져온 패키지는 다시 내려받을 수 없습니다.</string> + <string name="storage_desktop_detail">Flatpak 앱과 공유 콘텐츠에 사용되는 %1$s</string> + <string name="storage_desktop_apps_title">앱</string> + <string name="storage_desktop_none">설치된 Flatpak 앱이 없습니다.</string> + <string name="storage_desktop_shared_title">앱 공유</string> + <string name="storage_desktop_runtimes">런타임</string> + <string name="storage_desktop_runtimes_detail">앱이 의존하는 라이브러리이며, 사용하지 않는 것은 사용 안 함 제거로 정리됩니다</string> + <string name="storage_desktop_cache">다운로드 저장소</string> + <string name="storage_desktop_cache_detail">Flatpak 객체 저장소와 캐시된 다운로드</string> + <string name="storage_desktop_prune">사용 안 함 제거</string> + <string name="storage_desktop_prune_body">설치된 앱이 필요로 하지 않는 런타임을 제거하고 Flatpak 객체 저장소를 정리합니다. 설치된 앱은 그대로 동작합니다.</string> + <string name="storage_flatpak_uninstall_body">이 앱(%1$s)과 다른 앱이 사용하지 않는 런타임을 제거합니다. 홈 디렉터리의 데이터는 유지됩니다.</string> + <plurals name="storage_components_count"> + <item quantity="one">패키지 %d개</item> + <item quantity="other">패키지 %d개</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">앱 %d개</item> + <item quantity="other">앱 %d개</item> + </plurals> + <string name="boot_movie">부팅 동영상</string> + <string name="boot_movie_video">동영상</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps는 더 부드럽지만 Steam이 시작되는 동안 CPU를 더 사용합니다. Steam 자체 설정에서 고른 시작 동영상이 우선합니다.</string> + <string name="boot_movie_sound">소리</string> + <string name="boot_movie_custom">내 동영상</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV 또는 WebM. 다른 형식과 %1$d MB를 넘는 파일은 기기에서 720p WebM으로 변환됩니다(최대 %2$d초).</string> + <string name="boot_movie_import">가져오기</string> + <string name="boot_movie_remove">삭제</string> + <string name="boot_movie_pick">부팅 동영상 선택</string> + <string name="boot_movie_imported">%1$s이(가) 이제 부팅 동영상입니다</string> + <string name="boot_movie_imported_silent">%1$s이(가) 이제 부팅 동영상입니다(소리 없음)</string> + <string name="boot_movie_too_long">변환이 필요한 동영상은 %1$d초 이하여야 합니다</string> + <string name="boot_movie_converting">변환 중 %1$d%%</string> + <string name="boot_movie_converting_started">Steam용으로 %1$s 변환 중입니다. DroidDeck을 열어 두세요.</string> + <string name="boot_movie_unsupported">이 기기에서 해당 동영상을 디코딩할 수 없습니다.</string> + <string name="boot_movie_import_failed">동영상을 가져오지 못했습니다</string> + <string name="glasses_experimental">Luma Ultra 카메라 — 실험적 기능</string> + <string name="glasses_joycons">Joy-Con 위치 추적</string> + <string name="glasses_joycons_hint">스마트 안경 카메라를 사용하여 페어링된 Joy-Con 컨트롤러의 위치를 ​​조정합니다. 회전 및 버튼 입력은 Joy-Con 컨트롤러에서 이루어집니다. 손목이 가려진 경우 위치가 추정됩니다. 맨손으로 조작하는 컨트롤러를 대체하며, 휴대폰 카메라 추적이 일시 중지됩니다. 추적 센터를 연결하거나 재설정할 때는 Joy-Con 컨트롤러를 앞쪽으로 향하게 하십시오.</string> + <string name="glasses_joycons_requires_position">위치 추적을 먼저 활성화해야 합니다. Android 12 이상에서 모션 기능을 지원하는 Joy-Con 컨트롤러가 필요합니다. 기본적으로 비활성화되어 있습니다.</string> + <string name="setup_tab_glasses">스마트 안경</string> + <string name="setup_glasses_scope">디스플레이 및 헤드 트래킹 설정은 DroidDeck 메뉴, 게임 및 데스크톱 세션에서 공유됩니다.</string> + <string name="setup_glasses_connect">스마트 안경을 연결하여 디스플레이 및 추적 설정을 변경하십시오. 연결을 해제해도 저장된 설정이 유지됩니다.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">표시 모드</string> + <string name="glasses_output_2d">2D 출력</string> + <string name="glasses_output_3d">3D 출력</string> + <string name="glasses_picture_group">화면 및 가상 화면</string> + <string name="glasses_position_group">위치 및 층수</string> + <string name="glasses_hands_group">손 추적 - 실험적 기능</string> + <string name="glasses_tracking_status">추적 상태</string> + <string name="glasses_resolution_2d">2D 해상도</string> + <string name="glasses_resolution_3d">3D 해상도</string> + <string name="glasses_resolution_vr">VR 해상도</string> + <string name="glasses_resolution_auto">자동</string> + <string name="glasses_resolution_inherit">2D/3D 동일</string> + <string name="glasses_resolution_hint">눈별 출력 해상도</string> + <string name="glasses_refresh_30_hint">스마트 안경에서 게임 기능을 활성화하여 디스플레이의 기본 30Hz 모드를 선택합니다.</string> + <string name="glasses_3dof">3DoF 가상 화면</string> + <string name="glasses_3dof_hint">플랫 게임을 정면에 고정하여 주변을 둘러볼 수 있습니다. 3D 모드로 전환하지 않고도 스마트 안경에서 게임 기능을 활성화할 수 있습니다.</string> + <string name="glasses_screen_app_wide">너비와 거리는 DroidDeck 메뉴, 게임 및 데스크톱 세션에 대해 추적된 가상 화면을 즉시 업데이트합니다.</string> + <string name="glasses_head_tracking_spatial_vr_hint">위치 추적은 SteamVR에서 머리 회전을 포함합니다. 회전만 추적하려면 위치 추적을 끄세요.</string> + <string name="glasses_head_tracking_spatial_hint">가상 화면에서 머리 움직임을 제어합니다. 위치 추적은 SteamVR에서 머리 회전을 포함합니다.</string> + <string name="glasses_quick_actions">빠른 실행</string> + <string name="glasses_recenter_screen_hint">화면을 표시할 위치를 바라본 다음 추적 센터를 재설정하여 높이와 방향을 설정합니다.</string> + <string name="glasses_recenter_joycons_button">Joy-Con 중심 재설정</string> + <string name="phone_camera_tracking_group">스마트폰 카메라 - 실험적 기능</string> + <string name="phone_camera_tracking_setting">손 또는 Joy-Con 컨트롤러 추적</string> + <string name="glasses_position">위치 추적 - 실험적 기능</string> + <string name="glasses_position_hint">VR 및 가상 화면 주변에서의 물리적 움직임. 추적을 다시 시작하면 잠시 시간이 걸립니다.</string> + <string name="glasses_eye_height">현재 눈높이(바닥 위)</string> + <string name="glasses_floor">현재 높이에서 바닥 높이 설정</string> + <string name="glasses_floor_set">바닥 높이 설정</string> + <string name="glasses_spatial_setup">스테레오 카메라 설정 및 진단</string> + <string name="glasses_spatial_setup_hint">게임 시작 전 카메라 보정 및 손 추적을 확인하세요.</string> + <string name="glasses_spatial_open">설정 열기</string> + <string name="glasses_hands">맨손으로 조작하는 컨트롤러</string> + <string name="glasses_hands_hint">스마트 안경 카메라를 사용하여 VR에서 손으로 조준하고, 엄지와 검지를 오므려 클릭하고, 손을 오므려 잡으세요. 게임패드 스틱으로 이동하고 방향을 바꿀 수 있습니다. Joy-Con 위치 추적을 대체합니다. 게임 중 지연이 발생하거나 추적이 끊길 수 있습니다.</string> + <string name="glasses_hands_ready_hint">추적 설정에서 Luma Ultra 카메라 아래에 맨손으로 조작하는 컨트롤러를 활성화합니다. 먼저 손을 펼친 상태를 표시합니다.</string> + <string name="glasses_hands_base">Luma Ultra 공유 보정</string> + <string name="glasses_hands_base_hint">Luma Ultra 공유 베이스 사용 스마트 안경의 정확도를 확인하려면 직접 보정하십시오.</string> + <string name="glasses_hands_calibration_verified">측정된 보정 확인됨</string> + <string name="glasses_hands_calibration_required">검증 필요</string> + <string name="glasses_hands_calibration_required_hint">측정 거리 확인이 완료되면 맨손으로 조작하는 컨트롤러를 사용할 수 있습니다.</string> + <string name="tracking_recovery_lost">추적 실패</string> + <string name="tracking_recovery_disconnected">스마트 안경 연결이 끊어졌습니다.</string> + <string name="spatial_capturing">캡처하는 중…</string> + <string name="spatial_camera_board_distance">왼쪽 카메라에서 보정 대상 중심까지의 거리</string> + <string name="spatial_checking_distance">거리 확인 중…</string> + <string name="spatial_validate">거리 확인</string> + <string name="spatial_diagnostics">진단</string> + <string name="spatial_camera_timing">카메라 타이밍</string> + <string name="spatial_frames">카메라 이미지</string> + <string name="spatial_lite">Lite 손 추적 모델</string> + <string name="spatial_lite_hint">Lite 손바닥 감지 모델과 Lite 손 랜드마크 모델을 사용합니다. 조준, 집기 및 잡기 동작의 정확도를 확인하세요. 추적을 다시 시작하면 초기화됩니다.</string> + <string name="spatial_adaptive">손 추적을 위한 자동 입력 주파수</string> + <string name="spatial_adaptive_hint">입력을 처리 속도로 조정합니다. 추적이 다시 시작되면 재설정됩니다.</string> + <string name="spatial_save_frame">카메라 이미지 저장</string> + <string name="spatial_restart_tracking">추적 다시 시작</string> + <string name="spatial_restart_hint">조명이 밝은 곳에서 추적이 복구되지 않는 경우 사용합니다. 다시 시작하려면 새로운 추적 원본이 필요합니다.</string> + <string name="spatial_restart">재시작</string> + <string name="spatial_restart_title">추적을 다시 시작하시겠습니까?</string> + <string name="spatial_restart_confirm">저장하지 않은 보정 이미지가 삭제됩니다. 다시 시작한 뒤에는 안경을 움직이지 말고, 추적이 복구되면 중심을 재설정하세요.</string> + <string name="spatial_views_count">%1$d / 24개 보정 이미지 촬영됨</string> + <string name="spatial_timing_values">%1$.1fHz • 이미지 수명 %2$.1fms • 처리 중 %3$.1fms</string> + <string name="spatial_input_values">카메라 이미지의 입력 제한 %1$.1fHz • %2$.0f%%. 머리 추적은 최대 빈도로 계속됩니다.</string> + <string name="spatial_frame_counts">%1$d 처리됨 • %2$d 삭제됨 • 입력 제한으로 인해 %3$d 건너뛰음</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra 보정</string> + <string name="spatial_print_check">눈금 확인: 눈금 간 100mm(3.937인치)</string> + <string name="spatial_distance_12in">30.48cm(12인치)</string> + <string name="spatial_distance_30cm">30cm(11.81인치)</string> + <string name="spatial_distance_20in">50.8cm(20인치)</string> + <string name="spatial_distance_50cm">50cm(19.69인치)</string> + <string name="spatial_disabled">비활성화됨</string> + <string name="spatial_wait_stable">안정적인 추적을 기다리는 중</string> + <string name="spatial_disconnected">연결 끊김</string> + <string name="spatial_hands_off">맨손으로 조작하는 컨트롤러는 꺼짐</string> + <string name="spatial_tracking_off">위치 추적이 꺼져 있거나 스마트 안경이 연결되지 않은 경우</string> + <string name="spatial_recenter_pending">추적 중심 재설정 요청됨 - 추적이 안정될 때까지 움직이지 마세요.</string> + <string name="spatial_tracking_lost">추적 손실 - 눈에 보이는 세부 사항이 있는 밝은 조명 영역을 향합니다.</string> + <string name="spatial_origin_changed">추적 원점 변경됨 - 추적 중심 재설정을 탭한 다음 움직이지 마세요.</string> + <string name="spatial_validation_session">이 연결에 대한 교정이 확인되었습니다.</string> + <string name="spatial_validation_saved">교정이 확인되고 저장되었습니다.</string> + <string name="spatial_wait_cameras">스테레오 카메라를 기다리는 중</string> + <string name="spatial_clock_reset">카메라 시계 재설정</string> + <string name="spatial_frame_changed">추적 좌표계가 변경되었습니다. 뷰가 재계산을 위해 저장됩니다. 추적 중심을 재설정한 다음 새 세트를 시작하여 더 많은 뷰를 캡처하세요.</string> + <string name="spatial_device_loaded">장치 교정 로드됨</string> + <string name="spatial_base_loaded">Luma Ultra 기본 보정 로드됨</string> + <string name="spatial_calibration_needed">교정이 필요함</string> + <string name="spatial_capture_recenter">추적이 변경되었습니다. 캡처하기 전에 추적 중심 재설정을 한 번 탭한 다음 움직이지 마세요.</string> + <string name="spatial_processing_failed">카메라 처리 실패</string> + <string name="spatial_hand_head_changed">손 감지 시 헤드 트래킹이 변경됨</string> + <string name="spatial_ambiguous_hands">두 카메라 모두 손은 보이나 좌우 매칭이 모호함</string> + <string name="spatial_inconsistent_depth">손이 감지되었으나 스테레오 깊이가 일치하지 않습니다.</string> + <string name="spatial_rejected_wrist">스테레오 또는 모션 검사에 의해 손목 위치가 거부됨</string> + <string name="spatial_inconsistent_palm">스테레오 포인트가 감지되었지만 손바닥 형상이 일치하지 않습니다.</string> + <string name="spatial_fit_ready">%1$.2f픽셀에 맞춥니다. 왼쪽 카메라에서 보정 대상 중심까지 선택한 거리를 측정한 다음 확인합니다.</string> + <string name="spatial_opencv_error">OpenCV를 사용할 수 없습니다: %1$s</string> + <string name="spatial_restored">%1$d 저장된 뷰가 복원되었습니다. 다시 시도하려면 보정을 계산하고, 더 많은 것을 캡처하려면 새 세트를 시작하세요.</string> + <string name="spatial_captured">캡쳐 %1$d / 조회수 24입니다. 교정 대상을 고정된 상태로 유지하십시오. 다음 보기를 위해 스마트 안경을 이동하세요.</string> + <string name="spatial_capture_corners">캡처 거부됨: %1$d / 두 카메라 모두에 12개의 필수 모서리가 표시됩니다. 보정 대상을 더 많이 표시하고 가만히 있다가 다시 시도하세요.</string> + <string name="spatial_validation_error">거리 확인을 완료할 수 없습니다: %1$s. 다시 시도해 보세요.</string> + <string name="spatial_inference_error">손 감지 불가: %1$s. CPU/GPU를 변경하거나 맨손으로 조작하는 컨트롤러를 전환하여 다시 시도하세요.</string> + <string name="spatial_hand_timeout">손 감지가 %1$dms를 초과했습니다. 관찰이 폐기됨</string> + <string name="spatial_wrists_tracked">%1$d / 스테레오로 측정한 Joy-Con 손목 위치 2개</string> + <string name="spatial_palms_tracked">추적 중인 손바닥: %1$d / 2; 집기 준비: %2$d; 잡기 준비: %3$d</string> + <string name="spatial_capture_saved">진단 캡처를 %1$s에 저장했습니다.</string> + <string name="spatial_bad_rotation">잘못된 카메라 대 머리 회전</string> + <string name="spatial_calibration_error">교정을 완료할 수 없습니다. %1$s 캡처한 보기가 저장되었습니다.</string> + <string name="spatial_reprojection_error">보류 재투영 오류 %1$.2f px가 2px를 초과합니다. 재보정하세요.</string> + <string name="spatial_distance_invalid">카메라 측정이 잘못되었습니다. 가만히 있다가 다시 시도해 보세요.</string> + <string name="spatial_distance_passed">거리 확인이 통과되었습니다.</string> + <string name="spatial_model_checksum_error">손 모델 체크섬 불일치</string> + <string name="spatial_opencv_load_error">OpenCV를 로드할 수 없습니다.</string> + <string name="glasses_6dof">6DoF 가상 화면</string> + <string name="tracking_recovery_look">조명이 밝은 방에서 천천히 주변을 둘러보세요.\n추적 카메라를 가리지 말고 가구처럼 특징이 뚜렷한 곳을 바라보세요.</string> + <string name="tracking_recovery_restart_help">아직도 막혔나요? 휴대폰에서: 스마트 안경 → 추적 → 설정 열기 → 진단 표시 → 추적 다시 시작.</string> + <string name="tracking_recovery_connect">USB 연결을 확인하고 스마트 안경을 다시 연결하세요.\n휴대전화에 USB 액세스 메시지가 나타나면 수락하세요.</string> + <string name="tracking_recovery_usb_help">일단 연결되면, 조명이 밝은 방에서 천천히 주위를 둘러보며 추적을 복원하십시오.</string> + <string name="tracking_recovery_recenter">중심 재설정 필요</string> + <string name="tracking_recovery_recenter_steps">새로운 위치에서 추적이 재개되었습니다.\n앞을 바라본 다음 휴대폰에서 추적 센터 재설정을 탭하세요.</string> + <string name="tracking_recovery_recenter_help">스마트 안경 → 추적 → 설정 열기에서 추적 중심 재설정을 찾을 수도 있습니다. 저장된 카메라 보정값이 유지됩니다.</string> + <string name="tracking_recovery_stabilizing">잠시만 가만히 있어주세요</string> + <string name="tracking_recovery_hold">추적 중심 재설정이 진행 중입니다.\n추적이 안정될 때까지 스마트 안경을 움직이지 마세요.</string> + <string name="tracking_recovery_automatic">이 화면은 머리 추적이 준비되면 자동으로 닫힙니다.</string> + <string name="glasses_steady_hand_aim">손으로 안정화된 조준</string> + <string name="glasses_steady_hand_aim_hint">어깨부터 손바닥까지 조준하세요. 손목으로 제어되는 회전을 사용하려면 끄세요.</string> + <string name="spatial_title">공간 설정</string> + <string name="spatial_wait_tracking">추적을 기다리는 중…</string> + <string name="spatial_cameras_description">왼쪽 및 오른쪽 추적 카메라</string> + <string name="spatial_camera_sync">카메라 동기화</string> + <string name="spatial_ready">준비</string> + <string name="spatial_sync_hint">카메라와 머리 추적이 정렬되기를 기다리는 중입니다. 스마트 안경을 연결된 상태로 유지하세요.</string> + <string name="spatial_prepare">1. 교정 타겟 준비</string> + <string name="spatial_print_actual">실제 크기로 인쇄</string> + <string name="spatial_print_hint">각 정사각형의 크기는 30mm(1.181인치)여야 합니다. 조명이 밝은 곳의 단단한 표면에 시트를 평평하게 장착합니다.</string> + <string name="spatial_print">보정 패턴 인쇄</string> + <string name="spatial_capture_group">2. 다양한 뷰 캡처</string> + <string name="spatial_board_stationary">교정 타겟을 고정된 상태로 유지하세요.</string> + <string name="spatial_capture_hint">스마트 안경을 더 가까이, 더 멀리, 옆으로 움직여 보세요. 왼쪽/오른쪽으로 돌리고, 위쪽/아래쪽 각도를 맞추고, 옆쪽으로 기울입니다. 두 카메라 모두에서 보정 대상을 유지하고 각 캡처 전에 잠시 일시 중지합니다.</string> + <string name="spatial_start">새로운 교정 시작</string> + <string name="spatial_wait_sync">카메라 동기화를 기다리는 중입니다.</string> + <string name="spatial_start_hint">뷰를 수집하기 위해 새로운 교정을 시작합니다.</string> + <string name="spatial_views_hint">두 미리보기 모두에서 교정 타겟이 표시되도록 유지합니다. 다양한 각도에서 최소 24개의 선명한 뷰를 캡처하세요.</string> + <string name="spatial_capture">캡쳐 캘리브레이션 타겟 화면</string> + <string name="spatial_alignment">카메라 정렬 계산</string> + <string name="spatial_calculating">계산 중…</string> + <string name="spatial_calculate">교정 계산</string> + <string name="spatial_distance_group">3. 거리 확인</string> + <string name="spatial_distance">측정된 거리</string> + <string name="spatial_distance_hint">인쇄된 마커를 더 쉽게 감지할 수 있도록 12인치 또는 30cm로 시작하세요. 사용할 정확한 측정값을 선택하세요.</string> + <string name="spatial_show_diagnostics">진단 표시</string> + <string name="spatial_diagnostics_hint">카메라 타이밍 및 추적 복구 도구.</string> + <string name="spatial_hand_input">손 추적을 통한 입력</string> + <string name="spatial_wait_timing">카메라 타이밍을 기다리는 중입니다.</string> + <string name="spatial_gpu">손의 GPU 감지</string> + <string name="spatial_gpu_hint">CPU가 기본값이다. GPU는 실험적이므로 SteamVR이 다시 시작될 수 있습니다. 이 선택은 추적이 다시 시작되면 재설정됩니다.</string> + <string name="spatial_half_rate">손 추적을 위한 입력 빈도 제한</string> + <string name="spatial_half_rate_hint">카메라 이미지의 절반을 사용합니다. 최대 주파수를 비교하려면 끄십시오. 추적이 다시 시작되면 재설정됩니다.</string> + <string name="spatial_diagnostic_capture">진단 캡처</string> + <string name="spatial_diagnostic_capture_hint">하나의 스테레오 이미지 쌍을 로컬에 저장합니다. 이미지는 요청한 경우에만 저장됩니다.</string> + <string name="spatial_capture_paused">캡처가 일시 중지되었습니다: %1$s</string> + <string name="spatial_measure_hint">%1$s을 측정한다. 두 미리보기 모두에 전체 보정 대상을 표시한 다음 가만히 기다리세요.</string> + <string name="spatial_print_scale" formatted="false">100% / 실제 크기로 인쇄합니다. 각 정사각형: 30mm(1.181인치).</string> + <string name="spatial_print_stationary">교정 대상을 평평하고 고정된 상태로 유지하십시오. 캡처 사이에 스마트 안경을 이동합니다.</string> + <string name="spatial_active">6DoF 활성</string> + <string name="spatial_connect_hint">Luma Ultra를 연결하고 위치 추적을 활성화합니다.</string> + <string name="spatial_wait_hands">손 추적을 기다리는 중</string> + <string name="spatial_collect_instructions">5 × 7 교정 대상을 고정된 상태로 유지하십시오. 스마트 안경을 이동하고 회전하면서 24개 이상의 뷰를 캡처하세요.</string> + <string name="spatial_capture_pending">다음 카메라 영상을 기다리는 중입니다. 스마트 안경을 가만히 잡으세요.</string> + <string name="spatial_validation_pending">다음 카메라 영상을 확인하는 중입니다. 전체 교정 대상이 보이도록 유지하고 가만히 기다리십시오.</string> + <string name="spatial_start_first">먼저 캘리브레이션을 시작하세요</string> + <string name="spatial_no_camera_frame">새로운 카메라 이미지가 도착하지 않았습니다. 스마트 안경 연결 및 카메라 미리보기를 확인한 후 다시 시도하세요.</string> + <string name="spatial_tap_start">먼저 새 보정 시작을 탭합니다.</string> + <string name="spatial_capture_recenter_pending">추적 중심 재설정이 안정적인 추적을 기다리고 있습니다. 잠시 움직이지 마세요.</string> + <string name="spatial_capture_unsynchronized">캡처 거부됨: 머리 추적이 동기화되지 않았거나 캡처 중에 변경되었습니다. 움직이지 말고 다시 시도하세요.</string> + <string name="spatial_align_first">거리를 확인하기 전에 카메라 정렬을 계산하십시오.</string> + <string name="spatial_hand_wait_sync">카메라와 헤드의 동기화를 기다리는 중</string> + <string name="spatial_no_wrists">손목이 감지되지 않았습니다. Joy-Con 컨트롤러 핸들을 스마트 안경 앞에 두십시오.</string> + <string name="spatial_no_hands">손이 감지되지 않습니다. 스마트 안경 앞에 손바닥을 펼쳐 보여주세요.</string> + <string name="spatial_one_camera_wrists">하나의 카메라에서만 손목이 보입니다. 컨트롤러 핸들을 공유 보기에 유지하세요</string> + <string name="spatial_one_camera_hands">하나의 카메라에서만 손이 보입니다. 두 손바닥을 공유 보기에 유지</string> + <string name="spatial_hands_need_calibration">손이 활성화되도록 보정 및 거리 확인을 완료합니다.</string> + <string name="spatial_hands_wait_stable">안정적인 헤드 추적을 기다리는 중; 요청 시 추적 중심을 재설정하세요.</string> + <string name="spatial_old_frame">카메라 관찰이 너무 오래되었습니다. 새로운 한 쌍을 기다리고 있어요</string> + <string name="spatial_hand_error">손 추적이 중지됨: %1$s</string> + <string name="spatial_stereo_loaded">스테레오 %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">머리 추적과 보정 대상이 %1$s(5cm/2인치 제한)만큼 일치하지 않습니다. 교정 대상을 고정된 상태로 유지하고 새 세트를 시작하기 전에 안정적인 추적을 기다립니다. 스마트 안경을 부드럽게 돌리고 기울이세요. 각 캡처 전에 일시 중지합니다.</string> + <string name="spatial_need_views">고정된 교정 대상에 대해 최소 24개의 다양한 뷰를 캡처합니다.</string> + <string name="spatial_need_rotation">스마트 안경을 좌우로 돌리고, 상하로 기울이는 단계; 회전 없는 움직임은 카메라 정렬을 교정할 수 없습니다.</string> + <string name="spatial_bad_baseline">믿기지 않는 카메라 기준선</string> + <string name="spatial_need_orientations">좀 더 다양한 방향으로 머리를 움직여 보세요.</string> + <string name="spatial_bad_alignment">카메라와 머리의 정렬이 일관되지 않습니다.</string> + <string name="spatial_distance_corners">%1$d / 두 카메라 모두에서 24개의 체커보드 모서리가 감지되었습니다. 전체 교정 대상이 보이도록 유지하고 가만히 기다리십시오. 이미 보이는 경우 12인치 또는 30cm를 선택하고 다시 시도하기 전에 더 가까운 거리를 측정합니다.</string> + <string name="spatial_distance_depth">교정대상은 보이지만 깊이를 확실하게 측정할 수 없었다. 스마트 안경을 가만히 잡고 보정 대상을 평평하게 유지하고 조명을 밝게 유지한 후 다시 시도하세요.</string> + <string name="spatial_distance_retry">왼쪽 카메라에서 캘리브레이션 대상 중심까지의 거리를 다시 확인하고 재시도하세요.</string> + <string name="spatial_distance_result">카메라 측정 %1$s; 선택한 거리 %2$s. %3$s</string> + <string name="spatial_wait_previews">보정을 시작하기 전에 두 카메라 미리보기를 모두 기다리세요.</string> + <string name="spatial_saved_views_hint">저장된 뷰는 다시 계산될 수 있습니다. 현재 추적 좌표계에서 캡처하려면 새 보정을 시작하세요.</string> </resources> diff --git a/app/src/main/res/values-ms/strings.xml b/app/src/main/res/values-ms/strings.xml new file mode 100644 index 0000000000..668a2419ba --- /dev/null +++ b/app/src/main/res/values-ms/strings.xml @@ -0,0 +1,2862 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Grafik SteamVR terhenti</string> + <string name="steamvr_recovery_countdown">DroidDeck akan dimulakan semula dalam %1$d saat untuk menetapkan semula grafik dan membuka SteamVR sekali lagi. Permainan yang sedang berjalan akan ditutup; kemajuan yang belum disimpan tidak dapat dipulihkan.</string> + <string name="steamvr_recovery_repeated">Ralat grafik berlaku lagi selepas dimulakan semula baru-baru ini. Pemulihan automatik dijeda untuk mengelakkan gelung. Memulakan semula akan menutup permainan anda; kemajuan yang belum disimpan tidak dapat dipulihkan.</string> + <string name="steamvr_recovery_restart">Mulakan semula sekarang</string> + <string name="steamvr_recovery_cancel">Biarkan terbuka</string> + <string name="steamvr_recovery_restarting">Menetapkan semula grafik dan membuka SteamVR sekali lagi…</string> + <string name="steamvr_recovery_failed">DroidDeck tidak dapat dimulakan semula secara automatik. Tutup apl sepenuhnya, kemudian buka semula.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Larian pertama memuat turun Steam. Ini mungkin mengambil beberapa minit.</item> + <item>Secara lalai, meninggalkan apl ini menjedakan Steam; ia menyambung semula dari tempat ia berhenti apabila anda kembali.</item> + <item>Pengawal anda akan muncul sebagai pad Xbox 360. Jika tidak, gunakan kawalan pada skrin.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Larian pertama menyediakan desktop. Ini mungkin mengambil beberapa minit.</item> + <item>Secara lalai, meninggalkan apl ini menjedakan sesi; ia menyambung semula dari tempat ia berhenti apabila anda kembali.</item> + <item>Sentuhan berfungsi sebagai pad sentuh: seret untuk menggerakkan penunjuk, ketik untuk klik.</item> + <item>Pengawal anda akan muncul sebagai pad Xbox 360. Jika tidak, gunakan kawalan pada skrin.</item> + </string-array> + <string name="session_channel">Sesi</string> + <string name="session_channel_description">Dipaparkan semasa sesi Steam atau desktop sedang dibuka</string> + <string name="session_notification">Steam sedang berjalan</string> + <string name="session_notification_downloads">Muat turun Steam aktif</string> + <string name="session_notification_paused">Sesi dijeda - ketik Sambung apabila sedia</string> + <string name="resume_session">Sambung</string> + <string name="suspend_now">Gantung sekarang</string> + <string name="stop_session">Hentikan sesi</string> + <string name="frame_gen_title">Penjanaan bingkai</string> + <string name="frame_gen_hint">Pilih mod penjanaan bingkai</string> + <string name="frame_gen_off">Mati</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptif %1$d</string> + <string name="lsfg_needs_steam">Memerlukan Lossless Scaling pada Steam</string> + <string name="lsfg_needs_install">Pasang Lossless Scaling dalam Steam atau import Lossless.dll</string> + <string name="lsfg_import">Import Lossless.dll…</string> + <string name="lsfg_using_steam">Menggunakan salinan daripada Steam</string> + <string name="lsfg_using_import">Menggunakan salinan yang diimport</string> + <string name="lsfg_pick_title">Pilih Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll diimport</string> + <string name="lsfg_import_unchanged">Lossless.dll ini sudah digunakan</string> + <string name="lsfg_import_not_owned">Lossless Scaling tidak dimiliki pada akaun Steam ini</string> + <string name="lsfg_import_invalid">Fail ini bukan Lossless.dll milik Lossless Scaling</string> + <string name="lsfg_import_failed">Tidak dapat menyediakan LSFG daripada Lossless.dll ini</string> + <string name="lsfg_problem_missing">LSFG memerlukan Lossless Scaling daripada Steam atau Lossless.dll yang diimport</string> + <string name="lsfg_problem_failed">LSFG tidak dapat menyediakan shadernya daripada Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: tidak disokong</string> + <string name="hud_fg_failed">%1$s: enjin gagal</string> + <string name="hud_fg_needs_lossless">%1$s: memerlukan Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · bermula</string> + <string name="second_library_import_hint">Menambah pustaka Steam dan mengimbasnya untuk permainan Windows. Permainan yang dimiliki menggunakan entri Steam masing-masing; selebihnya menjadi pintasan bukan Steam.</string> + <string name="game_env_title">Persekitaran permainan</string> + <string name="game_env_hint">Pembolehubah persekitaran untuk permainan Proton.</string> + <string name="game_env_edit">Edit</string> + <string name="game_env_shared">Semua permainan Proton</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">ID apl Steam</string> + <string name="game_env_open">Buka</string> + <string name="game_env_profile">Permainan %1$s</string> + <string name="game_env_add">Tambah pembolehubah</string> + <string name="game_env_name">Nama pembolehubah</string> + <string name="game_env_value">Nilai</string> + <string name="game_env_save">Simpan</string> + <string name="game_env_remove">Alih keluar</string> + <string name="game_env_restore">Warisi semula</string> + <string name="game_env_reset">Kosongkan penggantian persekitaran</string> + <string name="game_env_unset">Nyahtetapkan untuk profil ini</string> + <string name="game_env_empty">Tiada pembolehubah ditetapkan.</string> + <string name="game_env_inherited">Diwarisi</string> + <string name="game_env_custom">Pembolehubah tersuai</string> + <string name="game_env_error">Tidak dapat memuatkan atau menyimpan. Semak storan kosong dan cuba lagi.</string> + <string name="game_env_invalid">Gunakan nama yang sah dan nilai sehingga 8192 aksara.</string> + <string name="game_env_unused">Runtime Proton standard tidak membaca pembolehubah ini.</string> + <string name="game_env_loading">Memuatkan…</string> + <string name="game_env_feature">Penggantian tahap ciri D3D12. 12_2 melaporkan keupayaan DirectX 12 Ultimate; ciri yang tidak disokong boleh gagal. Biarkan tidak ditetapkan untuk pengesanan automatik.</string> + <string name="game_env_shader">Penggantian model shader D3D12. 6_9 memerlukan VKD3D yang cukup terkini dan ciri GPU yang sepadan. Biarkan tidak ditetapkan untuk pengesanan automatik.</string> + <string name="game_env_cache">Kekalkan caching shader Mesa dihidupkan untuk mengurangkan penyusunan berulang. false menghidupkan caching.</string> + <string name="game_env_cache_size">Saiz maksimum cache shader Mesa, seperti 1G. Cache yang lebih besar menggunakan lebih banyak storan.</string> + <string name="game_env_vkd3d_config">Pilihan VKD3D untuk D3D12. nodxr melumpuhkan ray tracing; gunakan hanya untuk permainan yang memerlukannya.</string> + <string name="game_env_proton_log">Tetapkan kepada 1 untuk log diagnostik Proton. Pengelogan boleh mengurangkan prestasi dan menggunakan storan.</string> + <string name="game_env_wined3d">Tetapkan kepada 1 untuk menggunakan WineD3D berasaskan OpenGL dan bukan DXVK, untuk pengujian keserasian D3D9–11.</string> + <string name="game_env_no_ntsync">Tetapkan kepada 1 untuk mengekalkan permainan ini di luar ntsync (droiddeck-ntsync atau pemacu kernel); ia menggunakan droiddeck-esync jika pek wujud, jika tidak droiddeck-fsync.</string> + <string name="game_env_no_esync">Tetapkan kepada 1 untuk mematikan droiddeck-esync bagi permainan ini; ia menggunakan droiddeck-fsync sebagai ganti, atau droiddeck-ntsync jika fsync juga dimatikan.</string> + <string name="game_env_no_fsync">Tetapkan kepada 1 untuk mengekalkan permainan ini di luar droiddeck-fsync; ia menggunakan droiddeck-esync jika pek wujud, jika tidak droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Tetapkan kepada 1 untuk menjalankan permainan ini pada droiddeck-fsync, atau 0 untuk meletakkan droiddeck-esync dahulu jika pek sepadan dengan Protonnya.</string> + <string name="game_env_xalia">Tetapkan kepada 0 untuk melumpuhkan pembantu navigasi pad permainan Proton bagi permainan ini.</string> + <string name="game_env_hud">Overlay DXVK untuk D3D9–11. fps memaparkan kadar bingkai; nyahtetapkan untuk menyembunyikannya.</string> + <string name="game_env_dxvk_config">Tetapan DXVK diasingkan dengan tanda koma bertitik. Binaan terkini menggunakan dxvk.maxFrameRate untuk pengehadan bingkai; lebih baik gunakan pengehad bingkai sesi untuk permainan biasa.</string> + <string name="game_env_vkd3d_limit">Had kadar bingkai D3D12. 0 melumpuhkan had.</string> + <string name="game_env_glthread">Threading OpenGL Mesa. true boleh membantu permainan OpenGL yang terhad oleh CPU; uji bagi setiap permainan.</string> + <string name="sync_backend_title">Segerak Wine</string> + <string name="sync_backend_hint">Cara permainan menyelaraskan bebenangnya. Berkuat kuasa pada sesi seterusnya.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Praset FEX</string> + <string name="fex_next_launch">Berkuat kuasa pada pelancaran permainan seterusnya.</string> + <string name="game_settings_title">Permainan</string> + <string name="fex_default_label">Lalai FEX</string> + <string name="fex_default_detail">Menggunakan lalai FEX.</string> + <string name="fex_stability_label">Kestabilan</string> + <string name="fex_stability_detail">Tetapan paling selamat dan paling perlahan.</string> + <string name="fex_compatibility_label">Keserasian</string> + <string name="fex_compatibility_detail">TSO penuh dengan multiblock.</string> + <string name="fex_intermediate_label">Pertengahan</string> + <string name="fex_intermediate_detail">TSO seimbang dengan ketepatan x87 dikurangkan.</string> + <string name="fex_performance_label">Prestasi</string> + <string name="fex_performance_detail">Semua TSO dilumpuhkan; multiblock.</string> + <string name="fex_performance_tso_label">Prestasi + TSO</string> + <string name="fex_performance_tso_detail">Tetapan Prestasi dengan TSO utama dihidupkan.</string> + <string name="fex_extreme_label">Ekstrem</string> + <string name="fex_extreme_detail">Melumpuhkan pemeriksaan kod mengubah-diri-sendiri. Permainan JIT dan DRM mungkin rosak.</string> + <string name="fex_extreme_tso_label">Ekstrem + TSO</string> + <string name="fex_extreme_tso_detail">Tetapan Ekstrem dengan TSO utama dihidupkan.</string> + <string name="fex_extreme_gn_label">Ekstrem-gn</string> + <string name="fex_extreme_gn_detail">Prestasi dengan petunjuk TSC dan metadata. Cuba sebelum Ekstrem.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Prestasi dengan pemeriksaan kod penuh dan bit hypervisor disembunyikan.</string> + <string name="game_env_custom_value">Nilai tersuai</string> + <string name="game_env_select_value">Pilih nilai</string> + <string name="user_apps_section">Emulator & apl</string> + <string name="user_apps_add">Tambah</string> + <string name="user_apps_add_detail">Apl atau permainan anda sendiri</string> + <string name="user_apps_kind_script">Skrip</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Bermula…</string> + <string name="user_apps_added">%1$s ditambah</string> + <string name="user_apps_removed">%1$s dialih keluar</string> + <string name="user_apps_back">Desktop</string> + <string name="user_apps_gone">Apl itu sudah tiada. Pilih semula daripada Desktop.</string> + <string name="user_apps_open">Buka %1$s</string> + <string name="user_apps_remove">Alih keluar</string> + <string name="user_apps_remove_confirm">Tekan sekali lagi untuk alih keluar</string> + <string name="user_apps_stop_session">Hentikan sesi untuk alih keluar</string> + <string name="user_apps_script_linked">Menjalankan %1$s daripada folder asalnya, dipautkan ke dalam sesi di tempat ia berada. Mengalih keluar apl ini tidak mengubah folder tersebut.</string> + <string name="user_apps_script_copied">Menjalankan %1$s daripada salinan foldernya dalam DroidDeck. Mengalih keluar apl ini memadam salinan tersebut, bukan yang asal.</string> + <string name="user_apps_runtime_required">Pasang runtime Linux dahulu</string> + <string name="user_apps_file_gone">Fail itu sudah tiada</string> + <string name="user_apps_no_space">Ruang kosong tidak mencukupi: menyalin folder memerlukan %1$s</string> + <string name="user_apps_copying">Menyalin %1$s</string> + <string name="user_apps_failed">Menambah apl gagal</string> + <string name="user_apps_github_checking">Mencari keluaran %1$s</string> + <string name="user_apps_github_unreachable">Tidak dapat membaca keluaran %1$s</string> + <string name="user_apps_github_no_appimage">Tiada keluaran %1$s mempunyai AppImage ARM64 atau x86_64</string> + <string name="user_apps_downloading">Memuat turun %1$s</string> + <string name="user_apps_download_failed">Muat turun gagal</string> + <string name="user_apps_update_failed">Mengemas kini apl gagal</string> + <string name="user_apps_icon_failed">Ikon itu tidak dapat dibaca</string> + <string name="user_apps_saved">%1$s disimpan</string> + <string name="user_apps_edit">Edit</string> + <string name="user_apps_check_updates">Semak kemas kini</string> + <string name="user_apps_checking_updates">Menyemak kemas kini…</string> + <string name="user_apps_update_to">Kemas kini kepada %1$s</string> + <string name="user_apps_up_to_date">Terkini · %1$s</string> + <string name="user_apps_updated">%1$s dikemas kini</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Tambah apl</string> + <string name="add_app_tab_script">Skrip</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Fail .sh. Ia berjalan daripada folder sendiri, skrin penuh di bawah gamescope.</string> + <string name="add_app_appimage_hint">AppImage ARM64 (aarch64), atau yang x86_64 yang berjalan melalui FEX. Ia dinyahpek ke dalam runtime Linux sekali sahaja.</string> + <string name="add_app_github_hint">Memasang AppImage ARM64 daripada keluaran terbaharu repositori, atau versi x86_64-nya melalui FEX.</string> + <string name="app_fex_title">Gunakan FEX</string> + <string name="app_fex_auto">Auto</string> + <string name="app_fex_on">Hidup</string> + <string name="app_fex_off">Mati</string> + <string name="app_fex_hint">FEX menjalankan program Linux x86 pada peranti ARM64 ini. Auto menggunakannya apabila program dibina untuk x86.</string> + <string name="app_fex_x86">%1$s melalui FEX</string> + <string name="app_fex_not_ready">Program ini dibina untuk PC %1$s dan berjalan melalui FEX, yang belum disediakan lagi. Buka Steam sekali semasa anda log masuk: DroidDeck akan memuat turun FEX dan Steam Linux Runtime yang diperlukan, kemudian ini akan dibuka.</string> + <string name="session_end_program">Program ini</string> + <string name="session_end_fex_missing">%1$s dibina untuk PC x86 dan berjalan melalui FEX, yang belum dipasang lagi. Mulakan Steam sekali semasa anda log masuk dan biarkan ia memuat turun FEX dan Steam Linux Runtime, kemudian mulakan ini semula.</string> + <string name="add_app_flatpak_hint">ID apl Flathub atau halaman Flathubnya. Flatpak akan disediakan dahulu jika belum lagi.</string> + <string name="add_app_file">Fail</string> + <string name="add_app_no_file">Tiada fail dipilih</string> + <string name="add_app_choose_file">Pilih fail</string> + <string name="add_app_change_file">Tukar</string> + <string name="add_app_pick_script">Pilih skrip</string> + <string name="add_app_pick_appimage">Pilih AppImage</string> + <string name="add_app_pick_icon">Pilih ikon</string> + <string name="add_app_repository">Repositori</string> + <string name="add_app_repository_placeholder">owner/repo atau pautan github.com</string> + <string name="add_app_repository_invalid">Bukan repositori GitHub</string> + <string name="add_app_flatpak_id">ID apl</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Bukan ID apl Flathub</string> + <string name="add_app_flatpak_bundle_hint">Atau fail .flatpak, untuk apl yang tiada di Flathub.</string> + <string name="add_app_pick_flatpak">Pilih fail .flatpak</string> + <string name="add_app_source">Sumber</string> + <string name="add_app_appearance">Pada Desktop anda</string> + <string name="add_app_preview_name">Apl baharu</string> + <string name="add_app_name">Nama</string> + <string name="add_app_name_placeholder">Daripada apl</string> + <string name="add_app_icon">Ikon</string> + <string name="add_app_icon_default">Ikon lalai</string> + <string name="add_app_choose_icon">Pilih ikon</string> + <string name="add_app_clear_icon">Kosongkan</string> + <string name="add_app_icon_suggestions">Daripada repositori</string> + <string name="add_app_icon_searching">Mencari ikon…</string> + <string name="add_app_icon_reset">Lalai</string> + <string name="edit_app_title">Edit %1$s</string> + <string name="edit_app_save">Simpan</string> + <string name="add_app_checking_folder">Menyemak folder…</string> + <string name="add_app_folder_linked">Foldernya dipautkan ke dalam sesi: %1$s</string> + <string name="add_app_folder_copied">Foldernya menyimpan program Linux, yang tidak dapat dijalankan oleh storan kongsi, jadi ia disalin ke dalam DroidDeck (%1$s).</string> + <string name="add_app_confirm">Tambah</string> + <string name="add_app_cancel">Batal</string> + <string name="add_app_runtime_required">Pasang runtime Linux daripada Persediaan dahulu.</string> + <string name="add_app_busy">Tunggu %1$s selesai.</string> + <string name="steam_compat_label">Serasi</string> + <string name="proton_compatible_note">Binaan yang ditanda “%1$s” dalam menu Compatibility Steam mempunyai pembaikan prefix DroidDeck dan boleh memulakan permainan di sini. Lalai adalah Proton Experimental ARM64 (%1$s), atau Proton 11.0 ARM64 (%1$s) sebaik sahaja binaan terbaharu itu dipasang. Entri Proton asal Valve tanpa tanda ini tidak boleh memulakan permainan pada peranti ini.</string> + <string name="proton_installed_compatible">Dipasang %1$s · %2$s</string> + <string name="common_cancel">Batal</string> + <string name="common_auto">Auto</string> + <string name="common_never">Tidak pernah</string> + <string name="common_always">Sentiasa</string> + <string name="common_uninstall">Nyahpasang</string> + <string name="common_check">Semak</string> + <string name="common_update">Kemas kini</string> + <string name="common_checking">Menyemak…</string> + <string name="common_working">Memproses…</string> + <string name="common_forget">Lupakan</string> + <string name="common_add_ellipsis">Tambah…</string> + <string name="common_use">Guna</string> + <string name="common_applies_next_session">Berkuat kuasa pada sesi seterusnya.</string> + <string name="mode_steam_title">Sesi Steam</string> + <string name="mode_desktop_title">Sesi Desktop</string> + <string name="mode_display">Paparan</string> + <string name="mode_resolution">Resolusi</string> + <string name="mode_res_720">Sehingga 720p</string> + <string name="mode_res_900">Sehingga 900p</string> + <string name="mode_res_1080">Sehingga 1080p</string> + <string name="mode_res_native">Asli</string> + <string name="mode_res_default">%1$s (lalai)</string> + <string name="mode_res_custom_value">Tersuai · %1$d×%2$d</string> + <string name="mode_res_custom">Tersuai…</string> + <string name="mode_res_note">720p boleh menjadikan menu lebih responsif.</string> + <string name="mode_ratio">Nisbah skrin</string> + <string name="mode_ratio_custom">Ditetapkan oleh resolusi tersuai.</string> + <string name="mode_ratio_auto">Auto menggunakan sekurang-kurangnya 16:9.</string> + <string name="mode_fps">Had bingkai</string> + <string name="mode_fps_note">Mengehadkan keseluruhan sesi. Paparan beralih kepada kadar penyegaran yang boleh dibahagi sama rata dengan had ini.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Output HDR10</string> + <string name="mode_hdr_unavailable">Tidak tersedia: %1$s.</string> + <string name="mode_hdr_restart">Mulakan semula apl untuk menggunakannya.</string> + <string name="mode_drivers">Pemacu</string> + <string name="mode_gpu_drivers">Pemacu GPU</string> + <string name="mode_gpu_drivers_hint">Dikongsi oleh Steam dan Desktop. Ditetapkan pada halaman Komponen.</string> + <string name="mode_touch_controls">Sentuhan & kawalan</string> + <string name="mode_touch">Sentuhan</string> + <string name="mode_touch_touchpad">Pad sentuh</string> + <string name="mode_touch_direct">Terus</string> + <string name="mode_touch_note">Auto: pad sentuh pada Desktop, terus dalam Steam.</string> + <string name="mode_osc">Kawalan pada skrin</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Auto memaparkan kawalan apabila tiada pengawal disambungkan.</string> + <string name="osc_steam_touch">Sentuhan Steam (beta)</string> + <string name="osc_style_next_session">Kawalan sentuh Steam bermula pada sesi Steam seterusnya</string> + <string name="osc_steam_layout">Susun atur sentuh Steam</string> + <string name="osc_steam_layout_hint">Gerakkan, ubah saiz atau sembunyikan kawalan sentuh permainan ini; disimpan ke Steam</string> + <string name="mode_controller">Pengawal</string> + <string name="mode_controller_hint">Cara Steam mengesan pengawal anda. Berkuat kuasa pada sesi seterusnya.</string> + <string name="mode_controller_deck">Pengawal Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Pengawal Xbox 360</string> + <string name="mode_controller_note">Deck: butang Quick Access dan giro. Steam Controller: sama, dengan grip sense pada butang belakang. DualShock 4 dan DualSense: giro, dan trackpad sebagai pad sentuhnya. Xbox 360: buka Quick Access dengan Guide+A.</string> + <string name="mode_back">Kembali</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Sesi</string> + <string name="mode_suspend">Gelagat latar belakang</string> + <string name="mode_suspend_hint">Apabila apl disembunyikan atau skrin dimatikan.</string> + <string name="mode_suspend_manual">Manual</string> + <string name="mode_suspend_native">Asli</string> + <string name="mode_suspend_steam_note">Auto menjeda dan menyambung semula apabila dipaparkan. Asli menyediakan Steam untuk tidur dahulu. Manual menunggu Sambung. Jangan sekali-kali terus berjalan.</string> + <string name="mode_background_downloads">Teruskan muat turun</string> + <string name="mode_background_downloads_hint">Lambatkan penjedaan latar belakang semasa Steam aktif memuat turun.</string> + <string name="mode_zram">Pemampatan zRAM</string> + <string name="mode_zram_hint">Semasa bermain, memori klien Steam dimampatkan ke zram peranti supaya permainan mendapat lebih RAM. Berkuat kuasa pada permulaan Steam seterusnya.</string> + <string name="mode_zram_unsupported">Tidak tersedia: peranti ini tiada zram atau swap, atau kernelnya lebih lama daripada 5.4.</string> + <string name="mode_suspend_note">Auto menjeda di latar belakang dan menyambung semula apabila dipaparkan. Manual menunggu Sambung. Jangan sekali-kali terus berjalan.</string> + <string name="mode_startup">Permulaan</string> + <string name="mode_steam_startup">Mulakan Steam bersama DroidDeck</string> + <string name="mode_steam_startup_hint">Membuka sesi Steam apabila DroidDeck dilancarkan.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Menyemak keluaran…</string> + <string name="mode_decky_ready">Sedia untuk memasang %1$s.</string> + <string name="mode_decky_none">Tiada binaan serasi ditemui. Cuba lagi kemudian.</string> + <string name="mode_decky_installed">Dipasang · %1$s</string> + <string name="mode_decky_update">Kemas kini tersedia · %1$s</string> + <string name="mode_decky_current">Terkini · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Pasang yang terbaharu</string> + <string name="mode_decky_on">Bermula bersama Steam. Semasa dihidupkan, apl lain pada peranti ini mungkin boleh mengawal Steam.</string> + <string name="mode_decky_off">Mati. Port debug jauh Steam kekal tertutup.</string> + <string name="mode_decky_remove_title">Nyahpasang Decky Loader?</string> + <string name="mode_decky_remove_text">Mengalih keluar loader. Plugin dan tetapan anda dikekalkan.</string> + <string name="mode_client">Klien</string> + <string name="mode_mangoapp">Overlay prestasi</string> + <string name="mode_mangoapp_hint">Matikan jika permainan ranap atau skrin hitam dalam mod Deck. Berkuat kuasa pada sesi seterusnya.</string> + <string name="mode_steam_repair">Baik pulih klien Steam</string> + <string name="mode_steam_repair_hint">Memuat turun semula klien Steam pada permulaan Steam seterusnya. Gunakan jika Steam tersekat pada skrin pemuatannya. Permainan, log masuk dan tetapan dikekalkan.</string> + <string name="mode_steam_repair_queued">Klien Steam akan dimuat turun semula pada permulaan Steam seterusnya.</string> + <string name="mode_steam_repair_button">Baik pulih</string> + <string name="mode_added_art">Karya seni</string> + <string name="mode_sgdb_key">Kunci API SteamGridDB</string> + <string name="mode_sgdb_key_yours">Kunci anda</string> + <string name="mode_sgdb_edit">Edit…</string> + <string name="mode_added_art_hint">Melengkapkan karya seni yang hilang daripada Steam, kemudian SteamGridDB. cover.jpg, hero.jpg, logo.png atau icon.png anda sendiri dalam folder permainan diutamakan.</string> + <string name="summary_remove_game">Alih keluar %1$s</string> + <string name="mode_added_remove_confirm">Alih keluar?</string> + <string name="games_add">Tambah permainan</string> + <string name="games_add_title">Tambah permainan:</string> + <string name="games_pick_exe_title">Pilih exe:</string> + <string name="games_add_unreachable">Lokasi ini tidak tersedia dalam sesi</string> + <string name="mode_added_exe_check">Semak exe ini</string> + <string name="wincomp_title">Komponen Windows</string> + <string name="wincomp_pad_hint">LB / RB bertukar antara bahagian.</string> + <string name="wincomp_card_none">Tiada</string> + <string name="wincomp_applies">DLL Windows yang tidak disertakan dalam Proton, daripada senarai komponen. Hidupkan yang diperlukan oleh permainan ini: ia dimasukkan ke dalam folder Windows permainan itu sendiri, bukan failnya, dan kekal pada Proton mana sekalipun ia berjalan.</string> + <string name="wincomp_offline">Tidak dapat mencapai senarai komponen. Komponen yang sudah dimuat turun masih boleh ditukar.</string> + <string name="wincomp_recommended">Disyorkan untuk permainan ini</string> + <string name="wincomp_checking">Menyemak keperluan permainan ini…</string> + <string name="wincomp_when_online">Tersedia semasa dalam talian</string> + <plurals name="wincomp_turning_on"> + <item quantity="other">Menghidupkan %1$d komponen…</item> + </plurals> + <string name="wincomp_auto_section">Dihidupkan untuk permainan ini</string> + <string name="wincomp_auto_steam">Steam memasang %1$s dengan %2$s (apl %3$s)</string> + <string name="wincomp_auto_gog">Daripada senarai GOG untuk permainan ini</string> + <string name="wincomp_auto_epic">Daripada prasyarat Epic untuk permainan ini</string> + <string name="wincomp_auto_amazon">Daripada langkah pemasangan Amazon untuk permainan ini</string> + <string name="wincomp_steam_by_name">Steam memasang %1$s dengan apl %2$s, disepadankan mengikut nama</string> + <string name="wincomp_suggestions">Turut disenaraikan</string> + <string name="wincomp_suggestion_reason">Disenaraikan oleh %1$s; bukan komponen di sini</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Permainan ini menyertakan %1$s</string> + <string name="wincomp_found_shipped">Permainan ini mempunyai %1$s (selalunya berfungsi seadanya)</string> + <string name="wincomp_already_here">Sudah ada dalam permainan ini</string> + <string name="wincomp_no_recommendation">Tiada apa-apa dalam folder permainan yang merujuk kepada komponen.</string> + <string name="wincomp_active">Dipasang untuk permainan ini (%1$d)</string> + <string name="wincomp_all">Semua komponen (%1$d)</string> + <string name="wincomp_installers">Memerlukan pemasang Windows (%1$d)</string> + <string name="wincomp_installers_note">Ini adalah program pemasangan sendiri tanpa pakej dalaman untuk dibuka, dan belum direkodkan apa yang dipasangnya. Kebanyakannya runtime lama yang sudah digantikan oleh Mono dalam Proton; rekod ditambah apabila ia disediakan.</string> + <string name="wincomp_show">Tunjukkan</string> + <string name="wincomp_hide">Sembunyikan</string> + <string name="wincomp_needs_installer">Menjalankan program pemasangan sendiri (belum direkodkan)</string> + <string name="wincomp_unsupported">Belum disokong di sini</string> + <string name="wincomp_loading">Memuatkan komponen…</string> + <string name="wincomp_failed">Tidak dapat memasang: %1$s</string> + <string name="wincomp_downloaded">Dimuat turun</string> + <string name="wincomp_downloading">Memuat turun %1$s</string> + <string name="wincomp_installing">Memasang: %1$s</string> + <string name="wincomp_reverting">Mematikan…</string> + <string name="wincomp_download_size">Muat turun %1$s</string> + <string name="wincomp_next_launch">Berkuat kuasa pada permulaan permainan seterusnya.</string> + <string name="mode_stretch169">Regangkan permainan 16:9</string> + <string name="mode_stretch169_hint">Pada skrin yang lebih segi empat daripada 16:9, meregangkan permainan untuk memenuhi skrin dan bukan menunjukkan jalur. Berkuat kuasa pada sesi seterusnya.</string> + <string name="mode_audio">Audio</string> + <string name="mode_directaudio">DirectAudio untuk permainan</string> + <string name="mode_directaudio_hint">Memintas PulseAudio untuk kependaman yang lebih rendah.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">Untuk sembang suara.</string> + <string name="mode_network">Rangkaian</string> + <string name="mode_wifi_discovery">Penemuan Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Tunjukkan nama Wi-Fi dan rangkaian berdekatan dalam Steam.</string> + <string name="mode_wifi_location_off">Perkhidmatan lokasi dimatikan.</string> + <string name="mode_wifi_permission_denied">Kebenaran lokasi tidak diberikan.</string> + <string name="mode_wifi_open_settings">Buka tetapan</string> + <string name="mode_wifi_continue">Teruskan</string> + <string name="mode_wifi_explain_title">Aktifkan penemuan Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android memerlukan kebenaran Lokasi untuk membaca nama Wi-Fi dan menemui rangkaian berdekatan. DroidDeck menggunakan akses ini untuk menunjukkan rangkaian tersebut dalam Steam. Kami tidak menjejaki lokasi anda. Akses internet berfungsi tanpa kebenaran ini.</string> + <string name="mode_storage">Storan permainan</string> + <string name="mode_storage_auto">Automatik - kad SD jika ada, serta folder Games anda</string> + <string name="mode_storage_auto_none">Automatik - folder Games anda, serta kad SD jika ada (tiada sekarang)</string> + <string name="mode_storage_internal">Dalaman sahaja</string> + <string name="mode_storage_folder">Folder: %1$s</string> + <string name="mode_second_library">Pustaka kedua</string> + <string name="mode_storage_note">Permainan yang menstrim aset daripada SD atau storan kongsi mungkin tersekat-sekat.</string> + <string name="mode_storage_diagnostics">Diagnostik storan</string> + <string name="mode_storage_diagnostics_hint">Rekod keputusan peruntukan dan masa storan yang disampel dalam Kongsi log. Boleh melambatkan pemasangan semasa dihidupkan. Berkuat kuasa pada sesi seterusnya.</string> + <string name="mode_choose_folder">Pilih folder…</string> + <string name="mode_custom_res_title">Resolusi tersuai</string> + <string name="mode_custom_res_text">Menggantikan had dan nisbah. Saiz yang tidak sepadan dengan skrin akan mendapat jalur.</string> + <string name="mode_width">Lebar</string> + <string name="mode_height">Tinggi</string> + <string name="mode_custom_res_range">Antara 320×240 dan 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="other">%1$d permainan</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Padam</string> + <string name="common_restore">Pulihkan</string> + <string name="common_download">Muat turun</string> + <string name="common_delete_named">Padam %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Pemacu runtime</string> + <string name="comp_runtime_driver_hint">Digunakan oleh Steam, permainan dan desktop. Berkuat kuasa pada sesi seterusnya.</string> + <string name="comp_import_turnip">Import zip Turnip…</string> + <string name="comp_display_driver">Pemacu paparan</string> + <string name="comp_display_driver_hint">Melukis bingkai ke skrin dalam kedua-dua mod. Mulakan semula apl untuk menggunakannya.</string> + <string name="comp_import_adrenotools">Import zip AdrenoTools…</string> + <string name="comp_never">tidak pernah</string> + <string name="comp_nightlies_checked">Nightlies disemak %1$s</string> + <string name="comp_title">Komponen</string> + <string name="comp_about">Perihal Komponen</string> + <string name="comp_check_drivers">Semak pemacu baharu</string> + <string name="comp_check_nightlies">Semak Nightlies untuk pakej baharu</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Proton yang dipilih di sini menjalankan setiap permainan yang belum memilih Protonnya sendiri dalam Steam, dan perubahan yang dibuat dalam Steam turut dipaparkan di sini. Steam menggantikan Proton Valve apabila ia dikemas kini; versi asal dikekalkan bagi setiap binaan.</string> + <string name="comp_scope">Konfigurasi</string> + <string name="comp_profile_configure">Konfigurasikan profil</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Profil lalai</string> + <string name="comp_scope_general_detail">Digunakan secara automatik oleh permainan tanpa penggantian.</string> + <string name="comp_profile_game_detail">Tetapan tersimpan yang digunakan secara automatik apabila %1$s dilancarkan.</string> + <string name="comp_game_hint">Pilih hanya tetapan yang diperlukan permainan ini. Selebihnya terus menggunakan profil Lalai.</string> + <string name="comp_game_fex">Praset FEX</string> + <string name="comp_game_fex_inherited">Menggunakan praset profil Lalai.</string> + <string name="comp_game_fex_override">Praset tersuai disimpan untuk permainan ini.</string> + <string name="comp_game_fex_custom">Pembolehubah FEX tersuai</string> + <string name="comp_game_use_general">Guna Lalai</string> + <string name="comp_game_compatibility">Keserasian permainan</string> + <string name="comp_game_environment_hint">Pilihan persekitaran Proton, DXVK, VKD3D dan penyegerakan untuk permainan ini.</string> + <string name="comp_game_proton_inherited">Menggunakan Proton profil Lalai.</string> + <string name="comp_game_proton_override">Proton tersuai disimpan untuk permainan ini melalui pemetaan keserasian Steam.</string> + <string name="comp_no_proton_short">Tiada Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Menggunakan pakej komponen profil Lalai daripada %1$s melainkan permainan ini memilih pakej lain.</string> + <string name="comp_game_component_general">Menggunakan pakej komponen profil Lalai.</string> + <string name="comp_game_component_override">Menggunakan %1$s hanya untuk permainan ini.</string> + <string name="comp_game_runtime_options">Pilihan runtime</string> + <string name="comp_game_environment_other_hint">Pilihan persekitaran Proton, DXVK, VKD3D-Proton dan penyegerakan lain bagi setiap permainan.</string> + <string name="comp_game_saved_next">Profil %1$s disimpan untuk pelancaran permainan seterusnya.</string> + <string name="game_no_steam_title">Mulakan tanpa Steam</string> + <string name="game_no_steam_detail">Membukanya dalam Proton/FEX tanpa klien Steam; ciri Steam dimatikan.</string> + <string name="game_no_steam_on">Hidup</string> + <string name="game_steam_with">Bermula dengan Steam</string> + <string name="game_steam_without">Bermula tanpa Steam</string> + <string name="game_settings_card">Tetapan</string> + <string name="game_settings_menu_title">Tetapan %1$s</string> + <string name="game_settings_default">Lalai</string> + <string name="game_settings_default_detail">Mengembalikan semua yang diubah untuk permainan ini kepada tetapan apl.</string> + <string name="game_sync_custom">Pemboleh ubah segerak tersuai</string> + <string name="comp_game_proton_live">Pilihan Proton %1$s disimpan dan tersedia dalam Steam sekarang.</string> + <string name="comp_game_proton_next">Pilihan Proton %1$s disimpan. Mulakan semula Steam sebelum melancarkan permainan.</string> + <string name="comp_game_proton_not_runnable">%1$s tidak boleh menggunakan Proton yang dipilih pada peranti ini.</string> + <string name="comp_game_load_failed">Tidak dapat memuatkan profil %1$s: %2$s</string> + <string name="comp_game_save_failed">Profil permainan tidak dapat disimpan: %1$s</string> + <string name="comp_game_reset">Tetapkan semula profil permainan</string> + <string name="comp_game_reset_title">Tetapkan semula profil %1$s?</string> + <string name="comp_game_reset_body">Alih keluar penggantian Proton, FEX, pakej komponen, persekitaran, penapisan tekstur dan komponen Windows permainan ini? Ia akan menggunakan profil Lalai.</string> + <string name="comp_game_reset_done">%1$s kini menggunakan profil Lalai.</string> + <string name="comp_game_reset_failed">Profil permainan tidak dapat ditetapkan semula sepenuhnya: %1$s</string> + <string name="comp_default_live">%1$s kini menjalankan setiap permainan yang belum memilih Protonnya sendiri dalam Steam.</string> + <string name="comp_default_next">%1$s akan menjalankan setiap permainan yang belum memilih Protonnya sendiri, mulai permulaan Steam seterusnya.</string> + <string name="comp_default_not_runnable">%1$s tidak boleh memulakan permainan di sini, jadi ia tidak boleh menjadi lalai.</string> + <string name="comp_default_failed">Proton lalai tidak dapat disimpan: %1$s</string> + <string name="comp_swapped">%1$s · %2$d ditukar</string> + <string name="comp_all_original">%1$s · semua asal</string> + <string name="comp_game_running_suffix">%1$s · permainan sedang berjalan</string> + <string name="comp_esync_pack">%1$s · pek droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · belum ada pek droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync terbina dalam, tiada pek diperlukan</string> + <string name="comp_gpu_drivers">Pemacu GPU</string> + <string name="comp_reapplied">%1$s · digunakan semula pada pelancaran %2$s</string> + <string name="comp_next_queued">Seterusnya: %1$s · selepas permainan ditutup</string> + <string name="comp_in_use">%1$s digunakan: %2$s</string> + <string name="comp_waits">Menunggu sehingga permainan ditutup</string> + <string name="comp_applies_next_game">Berkuat kuasa pada permulaan permainan seterusnya</string> + <string name="comp_import_zip">Import .zip</string> + <string name="comp_reading">Membaca Proton…</string> + <string name="comp_no_proton">Tiada Proton dipasang lagi. Mulakan Steam sekali untuk memuat turun Proton ARM64-nya, atau tambah GE-Proton, CachyOS atau DroidDeck-Proton daripada Persediaan.</string> + <string name="comp_original">Asal · %1$s</string> + <string name="comp_this_build">%1$s · binaan ini</string> + <string name="comp_earlier_build">%1$s · binaan terdahulu</string> + <string name="comp_installed_count">Dipasang · %1$d</string> + <string name="comp_nothing_stored">Belum ada apa-apa disimpan untuk %1$s. Fail asal Proton ini disimpan sebagai yang asalnya.</string> + <string name="comp_waits_long">Permainan sedang berjalan pada Proton ini, jadi ini menunggu sehingga ia ditutup.</string> + <string name="comp_applies_long">Berkuat kuasa pada permulaan permainan seterusnya.</string> + <string name="comp_swap_title">Tukar %1$s?</string> + <string name="comp_swap_body">Masukkan %1$s ke dalam %2$s? Fail asalnya kekal disimpan. %3$s</string> + <string name="comp_restore_title">Pulihkan %1$s?</string> + <string name="comp_restore_body">Masukkan semula %1$s asal ke dalam %2$s? %3$s</string> + <string name="comp_delete_package_body">Mengalih keluar pakej daripada apl. Anda boleh memuat turunnya semula.</string> + <string name="comp_delete_original_title">Padam yang asal ini?</string> + <string name="comp_delete_original_body">%1$s asal ini daripada binaan terdahulu %2$s. Yang asal bagi binaan semasa sentiasa dikekalkan.</string> + <string name="comp_nightlies_count">Pada Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Segarkan semula untuk menyenaraikan pakej pada Nightlies.</string> + <string name="comp_nothing_new">Tiada apa-apa yang baharu sejak semakan terakhir.</string> + <string name="comp_import_wcp">Import .wcp</string> + <string name="comp_restore_original">Pulihkan yang asal bagi Proton ini</string> + <string name="comp_restore_original_body">Masukkan semula %1$s asal milik %2$s?</string> + <string name="comp_swap">Tukar</string> + <string name="comp_about_text">FEX, DXVK dan VKD3D-Proton untuk setiap Proton yang menjalankan permainan dalam Steam.\n\nPilih baris yang dipasang untuk menukarnya. Ia berkuat kuasa pada permulaan permainan seterusnya, atau selepas permainan yang sedang berjalan ditutup.\n\nPilihan anda disemak semula sebelum setiap pelancaran dan dikembalikan jika ada yang mengubahnya. Fail asal setiap Proton dikekalkan, jadi kemas kini Steam tidak akan menghilangkannya.</string> + <string name="comp_tag_original">Asal</string> + <string name="comp_tag_in_use">Digunakan</string> + <string name="comp_tag_new">Baharu</string> + <string name="comp_tag_stored">Disimpan</string> + <string name="perf_title">Prestasi</string> + <string name="perf_lede">Teras CPU, pembaikan sesi dan nama hos. Berkuat kuasa pada sesi seterusnya.</string> + <string name="perf_client_cores_group">Teras klien Steam</string> + <string name="perf_override">Gantikan pilihan teras Steam</string> + <string name="perf_override_hint">Memasak Steam, pembantu UI-nya dan gamescope kepada teras di bawah.</string> + <string name="perf_client_cores">Teras klien</string> + <string name="perf_client_cores_on">Teras untuk Steam.</string> + <string name="perf_client_cores_off">Hidupkan penggantian untuk memilih.</string> + <string name="perf_game_cores_group">Teras permainan</string> + <string name="perf_game_cores">Teras permainan</string> + <string name="perf_game_cores_hint">Teras untuk permainan. Dengan semua dipilih, Android menjadualkan secara bebas.</string> + <string name="perf_client_ui">Antara muka klien</string> + <string name="perf_glthread">GL berbenang</string> + <string name="perf_glthread_hint">Boleh menjadikan menu Steam lebih responsif.</string> + <string name="perf_zink">Zink: deskriptor malas</string> + <string name="perf_zink_hint">Disyorkan untuk pemacu tanpa penampan deskriptor.</string> + <string name="perf_noglerror">Langkau semakan ralat GL</string> + <string name="perf_noglerror_hint">Mematikan pengesahan GL bagi setiap panggilan.</string> + <string name="perf_gsrealtime">gamescope: baris gilir GPU masa nyata</string> + <string name="perf_gsrealtime_hint">Mengutamakan kerja GPU compositor. Boleh melicinkan rentak bingkai dengan sedikit kos kepada permainan.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Kekalkan GPU pada kelajuan tertinggi</string> + <string name="perf_gpuclock_hint">Adreno sahaja. Kurang tersekat-sekat, lebih penggunaan bateri dan haba.</string> + <string name="perf_fixes">Pembetulan sesi</string> + <string name="perf_sysmem">Turnip: rendering sysmem</string> + <string name="perf_sysmem_hint">Lebih pantas untuk Steam dan kebanyakan permainan. 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_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> + <string name="perf_esync_hint">Thread Windows permainan menunggu satu sama lain melalui eventfd dan memori kongsi daripada rangkaian pergi balik melalui wineserver. Menggunakan pek droiddeck-esync yang dibuat untuk binaan Proton itu dengan tepat; pek diambil secara automatik. Sehingga satu wujud untuk binaan Proton baharu, droiddeck-fsync menggantikannya. Berkuat kuasa pada sesi seterusnya.</string> + <string name="perf_xalia_hint">Melumpuhkan pembantu navigasi pad Proton, yang memakan CPU dalam setiap permainan.</string> + <string name="perf_seccomp">Jalankan proot tanpa seccomp</string> + <string name="perf_seccomp_hint">Mungkin membetulkan ralat syscall yang hilang pada sesetengah kernel. Boleh mengurangkan prestasi.</string> + <string name="perf_fastpath">Laluan pantas proot</string> + <string name="perf_fastpath_needs_seccomp">Memerlukan penapis seccomp proot.</string> + <string name="perf_fastpath_hint">Carian fail lebih pantas dan kurang tersekat-sekat. Matikan jika sesuatu program tidak dapat mencari failnya.</string> + <string name="perf_identity">Identiti sesi</string> + <string name="perf_hostname">Nama hos</string> + <string name="perf_hostname_hint">Nama yang dilihat Steam untuk peranti ini. Kosongkan untuk memulihkan %1$s.</string> + <string name="perf_hostname_invalid">Huruf, digit dan tanda sempang dalaman sahaja, sehingga 63 aksara.</string> + <string name="perf_phantom_warning">Android ditetapkan untuk menamatkan sesi ini</string> + <string name="driver_installed">Dipasang</string> + <string name="driver_available">Tersedia untuk dimuat turun</string> + <string name="driver_nothing_new">Tiada yang baharu sejak semakan terakhir.</string> + <string name="driver_restore_builtin">Pulihkan pemacu terbina dalam</string> + <string name="driver_delete_builtin">Terbina dalam apl: ini mengalih keluar fail nyahpaknya dan menyembunyikannya. Pulihkan pemacu terbina dalam akan mengembalikannya.</string> + <string name="driver_delete_bundle">Separuh daripada gabungan Android + Linux: kedua-dua separuh dialih keluar. Pemacu yang digunakan beralih kepada lalai.</string> + <string name="driver_delete_plain">Failnya dialih keluar daripada apl.</string> + <string name="driver_delete_in_use">Failnya dialih keluar. Ia sedang digunakan, jadi lalai mengambil alih.</string> + <string name="drawer_page_display">Paparan</string> + <string name="drawer_page_effects">Kesan</string> + <string name="drawer_page_controls">Kawalan</string> + <string name="drawer_page_components">Komponen</string> + <string name="drawer_page_controller">Pengawal</string> + <string name="drawer_page_settings">Tetapan</string> + <string name="drawer_page_desc">Halaman %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Desktop</string> + <string name="drawer_steam_menu">Menu Steam</string> + <string name="drawer_quick_access">Akses pantas</string> + <string name="drawer_open_qam">Buka Menu Akses Pantas</string> + <string name="drawer_prev_page">Halaman sebelumnya</string> + <string name="drawer_next_page">Halaman seterusnya</string> + <string name="drawer_hud">HUD prestasi</string> + <string name="drawer_scaling">Mod penskalaan</string> + <string name="drawer_scaling_sharpness">Ketajaman penskalaan</string> + <string name="drawer_effects">Kesan skrin</string> + <string name="drawer_effects_hint">Langsung. Memakan sedikit masa GPU semasa mana-mana kesan dihidupkan.</string> + <string name="drawer_look">Prapasang</string> + <string name="drawer_look_custom">Tersuai</string> + <string name="drawer_effects_advanced">Lanjutan</string> + <string name="widgets_expanded">Dikembangkan</string> + <string name="widgets_collapsed">Dikuncupkan</string> + <string name="drawer_cas">Ketajaman (CAS)</string> + <string name="drawer_cas_level">Tahap ketajaman</string> + <string name="drawer_fake_hdr">HDR palsu</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Lancarkan SteamVR</string> + <string name="steamvr_checking">Menyemak SteamVR…</string> + <string name="drawer_deband">Pengurangan jalur</string> + <string name="drawer_deband_strength">Kekuatan pengurangan jalur</string> + <string name="drawer_brightness">Kecerahan</string> + <string name="drawer_contrast">Kontras</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Ketepuan</string> + <string name="drawer_fxaa">FXAA (pelicinan tepi)</string> + <string name="drawer_toon">Garis luar kartun</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Penapisan tekstur</string> + <string name="drawer_texture_hint">Permainan DirectX 9–11, bermula daripada pelancaran seterusnya.</string> + <string name="drawer_anisotropy">Penapisan anisotropik</string> + <string name="drawer_texture_sharpness">Ketajaman tekstur</string> + <string name="drawer_texture_sharpness_note">Pincang mip negatif: tekstur lebih tajam, sedikit kilauan. Auto sepadan dengan sejauh mana sesi dibesarkan ke skrin.</string> + <string name="drawer_touch_auto">Auto (%1$s)</string> + <string name="drawer_keyboard">Papan kekunci</string> + <string name="drawer_latency">Kependaman</string> + <string name="drawer_low_latency_controller">Pengawal kependaman rendah</string> + <string name="drawer_low_latency_controller_hint">Pengawal melapor pada 1000 Hz dan bukan 250 Hz. Sedikit lebih banyak CPU.</string> + <string name="drawer_low_latency_touch">Sentuh kependaman rendah</string> + <string name="drawer_low_latency_touch_hint">Sentuhan melangkau pengumpulan bingkai, jadi kawalan sentuh Steam berjalan pada 1000 Hz. Sedikit lebih banyak CPU.</string> + <string name="drawer_pc_keyboard">Papan kekunci PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Skrin kedua</string> + <string name="drawer_second_screen_mode">Mod</string> + <string name="drawer_second_screen_shows">Memaparkan</string> + <string name="drawer_android_apps">Apl Android</string> + <string name="drawer_launch_app">Lancarkan apl</string> + <string name="common_hide">Sembunyi</string> + <string name="common_show">Papar</string> + <string name="drawer_no_apps">Tiada apl boleh dilancarkan</string> + <string name="drawer_session_behavior">Kelakuan sesi</string> + <string name="drawer_suspend_hint">Berkuat kuasa sekarang dan untuk sesi akan datang dalam mod ini.</string> + <string name="drawer_next_session">Sesi seterusnya</string> + <string name="drawer_support">Sokongan</string> + <string name="drawer_logs">Log sesi</string> + <string name="drawer_logs_hint">Lampirkan pada laporan pepijat</string> + <string name="drawer_share_logs">Kongsi log</string> + <string name="drawer_background">Latar belakang</string> + <string name="drawer_stop">Hentikan</string> + <string name="drawer_stop_title">Hentikan sesi?</string> + <string name="drawer_running_now">Sedang berjalan</string> + <string name="drawer_no_game">Tiada permainan berjalan pada mana-mana Proton</string> + <string name="drawer_selected_profile">Profil permainan</string> + <string name="drawer_selected_profile_none">Butiran profil belum tersedia.</string> + <string name="drawer_profile_refresh_failed_initial">Tidak dapat memuatkan profil permainan. Mencuba semula secara automatik.</string> + <string name="drawer_profile_refresh_failed_stale">Tidak dapat menyegarkan profil permainan. Memaparkan data terakhir yang tersedia; mencuba semula secara automatik.</string> + <string name="drawer_profile_inspect_hint">Lihat dan sunting tetapan tersimpan yang digunakan pada pelancaran seterusnya.</string> + <string name="drawer_profile_default">Menggunakan profil Lalai</string> + <string name="drawer_profile_custom">Profil tersuai</string> + <string name="drawer_component_inherited">Menggunakan %1$s daripada profil Lalai.</string> + <string name="drawer_game_components_note">Perubahan disimpan ke profil %1$s dan berkuat kuasa pada kali seterusnya permainan dilancarkan.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="other">%1$d tindanan permainan</item> + </plurals> + <string name="drawer_no_proton">Belum ada Proton dipasang.</string> + <string name="drawer_game_running">permainan sedang berjalan</string> + <string name="drawer_reapplied">digunakan semula pada pelancaran %1$s</string> + <string name="drawer_original">Asal</string> + <string name="drawer_components_note">Import dan padam pada halaman Komponen.</string> + <string name="setup_check_done">Selesai</string> + <string name="setup_check_warn">Perlu perhatian</string> + <string name="setup_check_busy">Sedang berjalan</string> + <string name="setup_limit_adb_failed">Semak alamat IP dan port Debugging Wayarles, atau gandingkan semula jika Android mengalih keluar peranti ini.</string> + <string name="setup_install">Pasang</string> + <string name="setup_manage">Urus</string> + <string name="setup_tab_overview">Gambaran keseluruhan</string> + <string name="setup_tab_controller">Pengawal</string> + <string name="setup_tab_session">Sesi</string> + <string name="setup_tab_launcher">Pelancar</string> + <string name="setup_title">Persediaan</string> + <string name="setup_all_set">● Semua sedia</string> + <string name="setup_n_ready">%1$d daripada %2$d sedia</string> + <string name="setup_system_check">Semakan sistem</string> + <string name="setup_gpu_supported">Peranti disokong</string> + <string name="setup_gpu_untested">GPU belum diuji</string> + <string name="setup_gpu_unsupported">GPU tidak disokong</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam memerlukan pemacu Adreno; %1$s mungkin memaparkan skrin hitam</string> + <string name="setup_runtime">Masa jalan Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Belum dipasang · kira-kira 3 GB, dipasang pada Main pertama</string> + <string name="setup_installed">Dipasang</string> + <string name="setup_runtime_update">%1$s · kemas kini tersedia</string> + <string name="setup_runtime_current">%1$s · terkini</string> + <string name="setup_limit">Had proses anak</string> + <string name="setup_limit_on">Hidup · Android mungkin menutup Steam. Mematikannya mengambil masa seminit.</string> + <string name="setup_limit_unset">Tidak ditetapkan · Android mungkin menutup Steam. Mematikannya mengambil masa seminit.</string> + <string name="setup_limit_unknown">Tidak dapat disemak · mematikannya mengambil masa seminit.</string> + <string name="setup_fix_it">Betulkan</string> + <string name="setup_details">Butiran</string> + <string name="setup_dev_options">Pilihan pembangun</string> + <string name="setup_use_wireless">Gunakan Debugging Wayarles</string> + <string name="setup_check_again">Semak semula</string> + <string name="setup_limit_turn_on">Hidupkan had</string> + <string name="setup_account">Akaun Steam</string> + <string name="setup_signed_in_offline">Dilog masuk sebagai %1$s · mod luar talian</string> + <string name="setup_signed_in">Dilog masuk sebagai %1$s</string> + <string name="setup_sign_in">Tekan Main dan log masuk ke Steam</string> + <string name="setup_tools">Alatan</string> + <string name="setup_controller">Pengawal</string> + <string name="setup_controller_unavailable">Tetapan pengawal tidak tersedia.</string> + <string name="setup_session">Sesi</string> + <string name="setup_logs">Log sesi</string> + <string name="setup_logs_hint">Disimpan selepas setiap sesi</string> + <string name="setup_agent_commands">Alatan penyahpepijatan</string> + <string name="setup_latest_logs">Log sesi terkini</string> + <string name="setup_saved_logs">Log sesi tersimpan</string> + <string name="setup_saved_logs_hint">Menyimpan %1$d yang terbaharu</string> + <string name="setup_clear_logs">Kosongkan log</string> + <string name="setup_reset_settings">Set semula semua tetapan</string> + <string name="setup_reset_settings_hint">Kembalikan setiap tetapan kepada nilai lalai</string> + <string name="setup_reset_settings_button">Set semula</string> + <string name="setup_reset_settings_title">Set semula semua tetapan?</string> + <string name="setup_reset_settings_body">Tetapan paparan, prestasi, pengawal, tema, bahasa dan pelancar kembali kepada lalai. Permainan, log masuk Steam, akaun kedai, pemacu yang dimuat turun dan folder storan kekal.</string> + <string name="setup_reset_settings_profiles">Set semula profil permainan juga (Proton, FEX, komponen dan persekitaran runtime bagi setiap permainan, serta persekitaran profil Lalai)</string> + <string name="setup_reset_settings_session_running">Hentikan sesi sebelum menetap semula tetapan.</string> + <string name="setup_reset_settings_partial">Tetapan telah ditetap semula, tetapi bukan semuanya. Butirannya ada dalam log.</string> + <string name="setup_offline">Mod luar talian</string> + <string name="setup_sign_in_first">Log masuk ke Steam dahulu</string> + <string name="setup_launcher">Pelancar</string> + <string name="setup_language">Bahasa</string> + <string name="setup_language_hint">Steam juga menggunakannya, dari kali seterusnya ia dimulakan.</string> + <string name="setup_language_system">Lalai sistem (%1$s)</string> + <string name="setup_language_system_short">Lalai sistem</string> + <string name="setup_app_scale">Skala apl</string> + <string name="setup_app_scale_hint">Teks dan kawalan DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (Lalai)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Rupa pelancar</string> + <string name="setup_home">Gunakan sebagai skrin Utama</string> + <string name="setup_home_on">DroidDeck boleh menjadi apl Utama</string> + <string name="setup_home_off">DroidDeck tidak sekali-kali ditawarkan sebagai apl Utama</string> + <string name="setup_orientation">Orientasi</string> + <string name="setup_orientation_auto">Lanskap automatik</string> + <string name="setup_orientation_landscape">Lanskap</string> + <string name="setup_orientation_reverse">Lanskap songsang</string> + <string name="setup_fullscreen">Skrin penuh</string> + <string name="setup_fullscreen_on">Menyembunyikan bar status dan navigasi Android</string> + <string name="setup_fullscreen_off">Memaparkan bar status dan navigasi Android</string> + <string name="setup_default_home">Apl Utama lalai</string> + <string name="setup_choose_home">Pilih apl Utama</string> + <string name="setup_choose">Pilih</string> + <string name="setup_linux_apps">Apl Linux (beta)</string> + <string name="setup_tool_files">Fail</string> + <string name="setup_tool_files_hint">Semak imbas dan urus fail</string> + <string name="setup_tool_protons">Versi Proton</string> + <string name="setup_tool_protons_hint">Pasang binaan Proton ARM64</string> + <string name="setup_tool_performance">Prestasi</string> + <string name="setup_tool_performance_hint">Penetapan teras CPU</string> + <string name="setup_tool_roms">Folder ROM</string> + <string name="setup_tool_roms_hint">Tempat permainan emulator disimpan</string> + <string name="setup_card_components">Komponen</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Kawalan</string> + <string name="setup_card_controls_hint">Pemetaan butang</string> + <string name="store_tab_discover">Terokai</string> + <string name="store_tab_search">Cari</string> + <string name="store_tab_installed">Dipasang</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Kedai</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak sedia</string> + <string name="store_needs_runtime">Pasang masa jalan Linux daripada Persediaan dahulu.</string> + <string name="store_setup_title">Sediakan Flatpak</string> + <string name="store_setup_text">Menambah Flatpak dan menyambungkannya ke Flathub (kira-kira 20 MB). Apl pertama juga memuat turun masa jalannya.</string> + <string name="store_setting_up">Menyediakan…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Kemas kini</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Memulakan…</string> + <string name="store_categories">Kategori</string> + <string name="store_unreachable">Tidak dapat menghubungi Flathub. Semak sambungan anda dan cuba lagi.</string> + <string name="store_try_again">Cuba lagi</string> + <string name="store_search_label">Cari di Flathub</string> + <string name="store_search_placeholder">Firefox, permainan, emulator…</string> + <string name="store_search">Cari</string> + <string name="store_all">Semua</string> + <string name="store_searching">Mencari…</string> + <string name="store_search_hint">Cari mengikut nama atau pilih kategori. Hanya apl ARM64 disenaraikan.</string> + <string name="store_no_results">Tiada apl ARM64 di Flathub sepadan dengan itu.</string> + <string name="store_results">Hasil</string> + <string name="store_check_updates">Semak kemas kini</string> + <string name="store_update_all">Kemas kini semua (%1$d)</string> + <string name="store_all_current">● Semuanya terkini</string> + <string name="store_no_apps">Tiada apl lagi. Cari di Terokai atau Cari.</string> + <string name="store_setup_first_note">Sediakan Flatpak untuk memasang apl.</string> + <string name="store_update_available_prefix">Kemas kini tersedia · %1$s</string> + <string name="store_open">Buka</string> + <string name="store_details">Butiran</string> + <string name="store_remove">Alih keluar</string> + <string name="store_press_again">Tekan sekali lagi untuk alih keluar</string> + <string name="store_installing">Memasang…</string> + <string name="store_install">Pasang</string> + <string name="store_setup_first">Sediakan Flatpak dahulu</string> + <string name="store_download_size">Muat turun %1$s</string> + <string name="store_installed_chip">● Dipasang</string> + <string name="store_details_failed">Tidak dapat memuatkan halaman Flathub apl ini.</string> + <string name="store_loading">Memuatkan daripada Flathub…</string> + <string name="store_no_arm">Tiada binaan ARM64 di Flathub, jadi ia tidak boleh dipasang di sini.</string> + <string name="store_screenshots">Tangkapan skrin</string> + <string name="store_about">Perihal</string> + <string name="store_app_id">ID Apl</string> + <string name="store_license">Lesen</string> + <string name="store_runtime">Masa jalan</string> + <string name="store_installed_size">Saiz dipasang</string> + <string name="store_installed_size_value">%1$s (tambah masa jalan kongsinya)</string> + <string name="store_website">Laman web</string> + <string name="store_verified">Disahkan</string> + <string name="upd_title">Kemas kini</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Disemak %1$s</string> + <string name="upd_not_checked">Belum disemak</string> + <string name="upd_perm_title">Benarkan DroidDeck mengemas kini sendiri</string> + <string name="upd_perm_text">Pada skrin seterusnya, hidupkan Benarkan daripada sumber ini, kemudian kembali semula. Kemas kini akan diteruskan secara automatik.</string> + <string name="upd_open_settings">Buka tetapan</string> + <string name="upd_not_now">Bukan sekarang</string> + <string name="upd_signed_status">Ditandatangani berbeza</string> + <string name="upd_signed_headline">Tidak boleh dikemas kini di tempat</string> + <string name="upd_signed_detail">Salinan ini tidak ditandatangani dengan kunci keluaran DroidDeck, jadi kemas kini tidak boleh dipasang menggantikannya. Nyahpasang untuk bertukar.</string> + <string name="upd_available">Kemas kini tersedia</string> + <string name="upd_blocked_status">Tidak boleh dipasang</string> + <string name="upd_switch">Sedia untuk bertukar</string> + <string name="upd_ahead_status">Mendahului Stable</string> + <string name="upd_ahead_headline">Anda mendahului Stable</string> + <string name="upd_ahead_detail">Binaan ini lebih baharu daripada Stable terkini. Anda akan beralih ke Stable pada keluaran seterusnya.</string> + <string name="upd_gone_status">Ujian tamat</string> + <string name="upd_gone_headline">Ujian ini telah tamat</string> + <string name="upd_gone_detail">Pembetulannya telah digabungkan atau dibuang. Ikuti Preview untuk pembetulan terbaharu.</string> + <string name="upd_current_status">Terkini</string> + <string name="upd_current_headline">Anda mempunyai %1$s yang terbaharu</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Kemas kini%1$s</string> + <string name="upd_install_button">Pasang%1$s</string> + <string name="upd_install_anyway">Pasang Stable %1$s juga</string> + <string name="upd_follow_preview">Ikuti Preview</string> + <string name="upd_stop_session">Hentikan sesi yang berjalan untuk mengemas kini.</string> + <string name="upd_less">Kurang</string> + <string name="upd_more">Lagi</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Binaan Preview baharu</string> + <string name="upd_new_test">Binaan ujian PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">SALURAN KEMAS KINI</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Keluaran yang telah diuji, untuk kebanyakan orang</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Pembetulan terbaharu, sebelum Stable</string> + <string name="upd_preview_current">Terkini</string> + <string name="upd_tests">Binaan ujian</string> + <string name="upd_tests_hint">Cuba pembetulan sebelum dikeluarkan</string> + <string name="upd_tests_none">Tiada pada masa ini</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Tidak dibina untuk salinan DroidDeck ini</string> + <string name="upd_updated">Dikemas kini %1$s</string> + <string name="upd_test_name">ujian PR #%1$d</string> + <string name="upd_while_ago">beberapa ketika dahulu</string> + <string name="upd_just_now">sebentar tadi</string> + <plurals name="upd_tests_count"> + <item quantity="other">%1$d untuk dicuba</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="other">Perubahan sejak binaan anda · %1$d binaan ketinggalan</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="other">Perubahan terkini · %1$d binaan</item> + </plurals> + <string name="gate_title">Satu tetapan Android untuk ditukar</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android menghentikan apl yang memulakan banyak proses latar belakang, dan Steam memulakan berpuluh-puluh. Sehingga ini berubah, permainan tertutup tanpa ralat.</string> + <string name="gate_fix_for_me">Betulkan untuk saya</string> + <string name="gate_toggle_steps">Hidupkan “Lumpuhkan sekatan proses anak”, kemudian kembali semula. Biarkan Pilihan pembangun hidup, atau suis itu akan mati semula.</string> + <string name="gate_open_dev">Buka Pilihan pembangun</string> + <string name="gate_no_toggle">Versi Android ini tidak mempunyai suis untuknya, jadi DroidDeck menukarnya melalui Debugging Wayarles. Mengambil masa kira-kira seminit, tanpa komputer diperlukan.</string> + <string name="gate_needs_wifi">Debugging Wayarles memerlukan Wi-Fi. Mana-mana rangkaian berfungsi; ia tidak memerlukan internet.</string> + <string name="gate_needs_notifications">Kod gandingan dihantar dalam pemberitahuan. Benarkan pemberitahuan untuk DroidDeck, atau gunakan Cara lain.</string> + <string name="gate_allow_notifications">Benarkan pemberitahuan</string> + <string name="gate_step1">Buka Tetapan → Pilihan pembangun → Debugging Wayarles dan hidupkannya</string> + <string name="gate_step2">Ketik “Gandingkan peranti dengan kod gandingan”</string> + <string name="gate_step3">Taip kod itu ke dalam pemberitahuan DroidDeck</string> + <string name="gate_waiting">Menunggu tetingkap timbul gandingan…</string> + <string name="gate_code_needed">Tetingkap timbul dijumpai. Masukkan kodnya dalam pemberitahuan.</string> + <string name="gate_status">Status</string> + <string name="gate_polling">Menyemak setiap 2 saat. Halaman ini ditutup apabila ia mati.</string> + <string name="gate_other_ways">Cara lain</string> + <string name="gate_other_toggle">Debugging Wayarles, alamat manual, ADB komputer</string> + <string name="gate_other_no_toggle">Alamat manual, ADB komputer, Pilihan pembangun</string> + <string name="gate_use_wireless_instead">Gunakan Debugging Wayarles sebaliknya</string> + <string name="gate_some_roms">Sesetengah ROM turut menambah suis itu. Cari “proses anak” dalam Pilihan pembangun.</string> + <string name="gate_manual_hint">Jika pemberitahuan tidak berfungsi, masukkan alamat dan kod tetingkap timbul itu sendiri.</string> + <string name="gate_enter_manually">Masukkan alamat secara manual</string> + <string name="gate_from_computer">Daripada komputer dengan ADB:</string> + <string name="gate_copy_command">Salin arahan</string> + <string name="gate_choose_display">Pilih paparan mana untuk membuka Tetapan Android.</string> + <string name="gate_main_screen">Skrin utama</string> + <string name="wadb_finding_port">Digandingkan. Mencari port Debugging Wayarles…</string> + <string name="wadb_enter_port">Digandingkan. Masukkan port daripada Tetapan.</string> + <string name="wadb_applying">Peranti dijumpai. Menggunakan tetapan…</string> + <string name="wadb_apply_failed">Tidak dapat digunakan secara automatik. Semak alamat di bawah dan cuba lagi. %1$s</string> + <string name="wadb_title_wireless">Debugging Wayarles</string> + <string name="wadb_title_done">Had proses anak dikemas kini</string> + <string name="wadb_title">Tukar had proses anak</string> + <string name="wadb_lede_compact0">Jika pilihan itu tiada, gandingkan melalui Debugging Wayarles.</string> + <string name="wadb_lede_compact1">Digandingkan. Semak alamat IP dan port dalam Debugging Wayarles.</string> + <string name="wadb_lede_done">Had proses anak telah dikemas kini.</string> + <string name="wadb_lede0">Gunakan langkah 2 jika Pilihan pembangun tidak mempunyai tetapan proses anak. Buka Pilihan pembangun → Debugging Wayarles → Gandingkan peranti dengan kod gandingan.</string> + <string name="wadb_lede1">Digandingkan. Gunakan alamat di bawah, atau kemas kini daripada Debugging Wayarles → Alamat IP & Port.</string> + <string name="wadb_lede_done_long">Had proses anak telah dikemas kini melalui Debugging Wayarles.</string> + <string name="wadb_confirmed_on">Android mengesahkan had itu hidup.</string> + <string name="wadb_confirmed_off">Android mengesahkan had itu mati.</string> + <string name="wadb_pair_group">2 · Gandingkan Debugging Wayarles</string> + <string name="wadb_pair_address">Alamat IP & port tetingkap timbul gandingan</string> + <string name="wadb_pin">Kod gandingan (PIN)</string> + <string name="wadb_pin_placeholder">6 digit</string> + <string name="wadb_pair">Gandingkan</string> + <string name="wadb_apply_group">2 · Gunakan melalui Debugging Wayarles</string> + <string name="wadb_connect_address">Alamat IP & port sambungan</string> + <string name="wadb_pair_again">Gandingkan semula</string> + <string name="wadb_turn_off">Matikan had</string> + <string name="wadb_other_ways">Cara lain untuk menukarnya</string> + <string name="wadb_dev_try_first">1 · Pilihan pembangun (cuba dahulu)</string> + <string name="wadb_restrict_on">Tetapkan “Lumpuhkan sekatan proses anak” mati.</string> + <string name="wadb_restrict_off">Tetapkan “Lumpuhkan sekatan proses anak” hidup.</string> + <string name="wadb_computer_last">3 · ADB komputer (pilihan akhir)</string> + <string name="wadb_only_if">Hanya jika Debugging Wayarles tidak tersedia.</string> + <string name="wadb_computer_group">3 · ADB komputer (pilihan akhir)</string> + <string name="ctrl_osc_hint">Bila kawalan sentuh muncul dalam sesi</string> + <string name="ctrl_color">Warna</string> + <string name="ctrl_color_hint">Rona butang pada skrin</string> + <string name="ctrl_custom">Tersuai</string> + <string name="ctrl_opacity">Kelegapan</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Saiz butang</string> + <string name="ctrl_size_hint" formatted="false">100% ialah saiz standard</string> + <string name="ctrl_stick_click">Klik stik</string> + <string name="ctrl_stick_click_hint">Ketik dua kali dan tahan stik untuk L3 atau R3</string> + <string name="ctrl_adaptive">Stik adaptif</string> + <string name="ctrl_rumble">Getaran permainan</string> + <string name="ctrl_steam_button">Butang Steam</string> + <string name="ctrl_qam_button">Butang QAM</string> + <string name="ctrl_keyboard_button">Butang papan kekunci</string> + <string name="ctrl_select_steam">Tekan Select untuk membuka menu Steam</string> + <string name="ctrl_select_steam_hint">Sebagai ganti View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con sebagai pengawal VR</string> + <string name="ctrl_joycon_vr_hint">Semasa SteamVR berjalan, setiap Joy-Con menjadi tangan. Halakan ke hadapan dan tahan Home atau Capture untuk memusatkannya semula.</string> + <string name="setup_animations">Animasi</string> + <string name="ctrl_adaptive_hint">Stik muncul di tempat anda sentuh dan tersembunyi apabila dilepaskan</string> + <string name="ctrl_layout">Susun atur</string> + <string name="ctrl_layout_custom">Kedudukan tersuai disimpan</string> + <string name="ctrl_layout_default">Disesuaikan dengan skrin ini</string> + <string name="ctrl_edit">Sunting</string> + <string name="ctrl_reset">Tetapkan semula</string> + <string name="ctrl_mapping">Pemetaan butang</string> + <string name="ctrl_mapping_default">Setiap butang menghantar inputnya sendiri</string> + <string name="ctrl_mapping_count">%1$d daripada %2$d butang dipetakan semula</string> + <string name="ctrl_configure">Konfigurasikan</string> + <string name="ctrl_reset_all">Tetapkan semula pengawal</string> + <string name="ctrl_reset_all_hint">Memulihkan semua tetapan pengawal dan susun atur</string> + <string name="ctrl_mapping_lede">Apa yang setiap butang pada skrin hantar kepada permainan. Tersembunyi mengalih keluar butang itu.</string> + <string name="ctrl_onscreen_buttons">Butang pada skrin</string> + <string name="ctrl_defaults">Lalai</string> + <string name="ctrl_reset_mapping">Tetapkan semula pemetaan</string> + <string name="content_android_apps">Apl Android</string> + <string name="content_apps_count">%1$d apl</string> + <string name="content_no_android_apps">Tiada apl Android boleh dilancarkan dijumpai.</string> + <string name="content_desktop_installed">● Desktop dipasang</string> + <string name="content_desktop_first_open">Dipasang pada pembukaan pertama</string> + <string name="content_available">Tersedia untuk dipasang</string> + <string name="content_not_installed">Belum dipasang.</string> + <string name="content_not_installed_suffix">%1$s · belum dipasang</string> + <string name="content_open_named">Buka %1$s</string> + <string name="content_games">Permainan</string> + <string name="content_choose_roms">Pilih folder ROM.</string> + <string name="content_retroarch_roms">Semak imbas ke /root/ROMs dalam RetroArch.</string> + <string name="content_add_roms">Tambah permainan %1$s ke ROMs/%2$s.</string> + <string name="content_install_named">Pasang %1$s</string> + <string name="content_stop_to_install">Hentikan sesi untuk memasang</string> + <string name="content_runtime_required">Masa jalan diperlukan</string> + <string name="content_loading_details">Memuatkan butiran pemasangan…</string> + <string name="content_details_unavailable">Butiran pemasangan tidak tersedia. Cuba lagi kemudian.</string> + <string name="content_needs_runtime">Pasang masa jalan Linux daripada Persediaan dahulu.</string> + <string name="content_stop_first">Hentikan sesi yang berjalan untuk memasang apl desktop.</string> + <string name="content_install_into">Memasang %1$s ke dalam desktop Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Menyembunyikannya mengalih keluarkannya daripada Desktop. Failnya kekal dalam masa jalan Linux.</string> + <string name="content_rom_gone">Permainan itu tidak lagi berada dalam folder ROM.</string> + <string name="content_desktop_system">Desktop · %1$s</string> + <string name="content_launch_in">Lancarkan dalam %1$s</string> + <string name="content_also_in">Juga dalam %1$s</string> + <string name="content_page_gone">Halaman itu telah hilang. Pilih bahagian di sebelah kiri.</string> + <string name="content_open_desktop">Buka desktop</string> + <string name="content_install_open_desktop">Pasang & buka desktop</string> + <string name="desktop_remove_title">Nyahpasang desktop</string> + <string name="desktop_remove_text">Alih keluar desktop dan apl terbundlenya. Kekalkan permainan, apl ditambah, tetapan dan pustaka kongsi.</string> + <string name="desktop_removing">Mengalih keluar desktop</string> + <string name="desktop_removed">Desktop dialih keluar</string> + <string name="desktop_cleaning_legacy">Mengalih keluar fail LXQt lama</string> + <string name="desktop_removal_unknown">Kemas kini DroidDeck sebelum mengalih keluar versi desktop ini.</string> + <string name="content_linux_desktop">Desktop Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox dan emulator anda</string> + <string name="games_empty">Permainan yang anda pasang dalam Steam muncul di sini selepas sesi.</string> + <string name="games_play_steam">Main Steam</string> + <string name="games_play_steamvr">Main SteamVR</string> + <string name="games_launch_settings">Tetapan pelancaran</string> + <string name="games_launch">Lancarkan</string> + <string name="games_files">Fail permainan</string> + <string name="games_prefix">Prefix Proton</string> + <string name="games_saves_looking">Mencari simpanan…</string> + <string name="games_saves_none">Tiada folder simpanan dijumpai mengikut nama. Eksport mengambil seluruh folder pengguna.</string> + <string name="games_saves_folders">%1$d folder simpanan</string> + <string name="games_saves_summary">%1$s · %2$d fail · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Urus simpanan</string> + <string name="games_saves">Simpanan permainan</string> + <string name="games_import_saves">Import simpanan…</string> + <string name="games_export_gamehub">Eksport sebagai zip GameHub…</string> + <string name="games_export_winlator">Eksport sebagai zip Winlator…</string> + <string name="games_open_save_folder">Buka folder simpanan</string> + <string name="games_never_played">Belum pernah dimainkan</string> + <string name="games_runtime_busy_percent">Masa jalan sibuk · %1$d%%</string> + <string name="games_runtime_busy">Masa jalan sibuk</string> + <string name="games_runtime_first_play">Masa jalan dipasang pada Main pertama</string> + <string name="games_runtime_update">Kemas kini masa jalan tersedia</string> + <string name="games_runtime_ready">● Masa jalan sedia</string> + <string name="games_last_played">Terakhir dimainkan %1$s</string> + <string name="games_internal">Storan dalaman</string> + <string name="games_added">Permainan ditambah</string> + <string name="games_custom">Permainan tersuai</string> + <string name="games_store_storage">Storan permainan</string> + <string name="gpu_auto_hint">Pasangan terbaik untuk GPU ini, dikemas kini sentiasa</string> + <string name="gpu_manual_hint">Pilih pasangan sendiri</string> + <string name="gpu_checking">Menyemak pemacu…</string> + <string name="gpu_none_listed">Belum ada pemacu disenaraikan. Segarkan untuk mencarinya.</string> + <string name="gpu_hide_other">Sembunyikan pemacu untuk GPU lain</string> + <string name="gpu_show_other">Papar pemacu untuk GPU lain</string> + <string name="gpu_advanced">Lanjutan</string> + <string name="gpu_set_with_display">Ditetapkan bersama pemacu paparan: %1$s membawa kedua-duanya.</string> + <string name="gpu_set_with_runtime">Ditetapkan bersama pemacu masa jalan: %1$s membawa kedua-duanya.</string> + <string name="gpu_runtime_hint">Digunakan oleh permainan dan desktop.</string> + <string name="gpu_runtime_default">Lalai masa jalan</string> + <string name="gpu_auto_by_gpu">Auto - dipilih mengikut GPU</string> + <string name="gpu_manage">Muat turun, import atau padam…</string> + <string name="gpu_in_use_caps">SEDANG DIGUNAKAN</string> + <string name="gpu_builtin">Pemacu terbina dalam DroidDeck</string> + <string name="gpu_matched_pair">Pemacu masa jalan dan paparan ditetapkan bersama sebagai pasangan sepadan.</string> + <string name="gpu_recommended_for">Disyorkan untuk GPU ini: %1$s.</string> + <string name="gpu_refresh_hint">Segarkan untuk mencari pemacu bagi GPU ini.</string> + <string name="gpu_recommended_caps">DISYORKAN</string> + <string name="gpu_unavailable">Tidak tersedia</string> + <string name="load_runtime">Masa jalan Linux</string> + <string name="load_runtime_detail">Menyediakan masa jalan Linux</string> + <string name="load_session">Sesi</string> + <string name="load_session_detail">Memulakan paparan dan audio</string> + <string name="load_steam">Klien Steam</string> + <string name="load_steam_detail">Menyemak Steam dan alatan keserasiannya</string> + <string name="load_opening_steam">Membuka Steam</string> + <string name="load_opening_steam_detail">Menunggu bingkai pertama Steam</string> + <string name="load_desktop">Desktop</string> + <string name="load_desktop_detail">Menyediakan desktop</string> + <string name="load_opening">Membuka</string> + <string name="load_opening_detail">Menunggu bingkai pertama</string> + <string name="load_starting_steam">Memulakan Steam</string> + <string name="load_ended">Sesi telah tamat</string> + <string name="load_step">Langkah %1$d daripada %2$d</string> + <string name="load_steam_paused">Steam dijeda</string> + <string name="deck_tab_grips">Pemegang</string> + <string name="deck_tab_left">Pad kiri</string> + <string name="deck_tab_right">Pad kanan</string> + <string name="deck_tab_both">Kedua-dua</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Stik</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Tukar antara stik dan trackpad</string> + <string name="deck_more_controls">Lagi kawalan Deck</string> + <string name="deck_panels">PANEL</string> + <string name="deck_close">Tutup kawalan skrin kedua</string> + <string name="deck_open_steam_menu">Buka menu Steam</string> + <string name="deck_left_upper">Kiri · atas</string> + <string name="deck_left_lower">Kiri · bawah</string> + <string name="deck_right_upper">Kanan · atas</string> + <string name="deck_right_lower">Kanan · bawah</string> + <string name="deck_click">Klik</string> + <string name="deck_right_trackpad">Trackpad kanan</string> + <string name="deck_left_trackpad">Trackpad kiri</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Papar papan kekunci</string> + <string name="second_hide_keyboard">Sembunyikan papan kekunci</string> + <string name="second_terminal">Terminal Linux</string> + <string name="second_terminal_not_ready">Sesi Linux belum sedia untuk terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Permainan</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Kedai</string> + <string name="rail_components">Komponen</string> + <string name="rail_apps">Apl</string> + <string name="rail_setup">Persediaan</string> + <string name="rail_updates">Kemas kini</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Sambung %1$s</string> + <string name="roms_text">Muncul sebagai /root/ROMs dalam setiap sesi. Storan dalaman berada di /root/Storage.</string> + <string name="roms_none">Tiada folder dipilih</string> + <string name="roms_applies">Berkuat kuasa pada sesi seterusnya. Kad SD berfungsi.</string> + <string name="roms_choose">Pilih folder</string> + <string name="roms_change">Tukar folder</string> + <string name="proton_lede">Pasang binaan Proton ARM64, kemudian pilihnya mengikut permainan dalam Steam → Properties → Compatibility.</string> + <string name="proton_stop_first">Hentikan sesi yang berjalan untuk memasang atau mengalih keluar alat keserasian.</string> + <string name="proton_available">Binaan tersedia</string> + <string name="proton_installed">%1$s dipasang</string> + <string name="proton_queued">Tertangguh daripada permintaan terdahulu</string> + <string name="proton_not_installed">Belum dipasang</string> + <string name="proton_update_available">Kemas kini tersedia → %1$s</string> + <string name="proton_remove_older">Alih keluar versi %1$s lama</string> + <string name="proton_remove_older_body">Mengalih keluar %1$s. Permainan yang ditetapkan ke versi ini perlu ditukar ke Proton lain.</string> + <string name="proton_remove_body">Permainan yang ditetapkan ke versi ini perlu ditukar ke Proton lain.</string> + <string name="proton_install_now">Pasang sekarang</string> + <string name="proton_cancel_queued">Batalkan yang tertangguh</string> + <string name="pckb_android">Papan kekunci Android</string> + <string name="pckb_hide">Sembunyi ✕</string> + <string name="main_launch_named">Lancarkan %1$s</string> + <string name="main_choose_screen">Pilih skrin. Kedua: %1$s.</string> + <string name="main_secondary_gone">Paparan kedua tidak lagi tersedia.</string> + <string name="main_primary">Skrin utama</string> + <string name="main_secondary">Skrin kedua</string> + <string name="widgets_prev_tab">Tab sebelumnya</string> + <string name="widgets_next_tab">Tab seterusnya</string> + <string name="widgets_on">Hidup</string> + <string name="widgets_all_n">Semua %1$d</string> + <string name="widgets_none">Tiada</string> + <string name="widgets_n_of_m">%1$d daripada %2$d</string> + <string name="widgets_off">Mati</string> + <string name="screen_bottom">Skrin bawah</string> + <string name="game_env_applies">Berkuat kuasa pada pelancaran permainan seterusnya. Profil permainan mengatasi profil kongsi.</string> + <string name="game_env_other">Permainan lain mengikut ID apl…</string> + <string name="game_env_done">Selesai</string> + <string name="game_env_default">Lalai</string> + <string name="game_env_off">Mati</string> + <string name="game_env_change">Tukar…</string> + <string name="game_env_change_title">Tukar pemboleh ubah</string> + <string name="game_env_restore_default">Kembali ke lalai</string> + <string name="game_env_eyebrow">Permainan Proton</string> + <string name="pip_title">Gambar dalam gambar</string> + <string name="pip_auto">Masuk ke PiP secara automatik</string> + <string name="unfolded_controls">Kawalan pada skrin terbuka</string> + <string name="unfolded_controls_hint">Terbuka, permainan terletak di atas trackpad dan pemegang belakang Steam Deck. Dilipat, permainan menjadi skrin penuh.</string> + <string name="pip_suspended">Digantung</string> + <string name="pip_not_ready">Gambar dalam gambar tersedia sebaik sahaja sesi sedia.</string> + <string name="pip_permission">Benarkan gambar dalam gambar untuk DroidDeck dalam tetapan Android.</string> + <string name="pip_unavailable">Android tidak dapat membuka gambar dalam gambar.</string> + <string name="game_shortcut">Pintasan</string> + <string name="game_shortcut_add">Tambah ke skrin utama</string> + <string name="game_shortcut_choose">Pilih permainan</string> + <string name="game_shortcut_scanning">Mengimbas permainan dipasang…</string> + <string name="game_link_copy">Salin pautan pelancaran</string> + <string name="game_link_copied">Pautan pelancaran disalin</string> + <string name="game_shortcut_unsupported">Pelancar ini tidak dapat menambah pintasan. Gunakan Salin pautan pelancaran sebaliknya.</string> + <string name="game_link_invalid">Pautan pelancaran permainan tidak sah.</string> + <string name="game_link_missing">Permainan ini tidak lagi berada dalam pustaka DroidDeck anda.</string> + <string name="game_link_session_busy">Hentikan sesi semasa sebelum melancarkan permainan Steam.</string> + <string name="game_link_failed">Tidak dapat menghantar permainan ke Steam. Cuba lancarkan semula.</string> + <string name="setup_retry_removal">Cuba semula pengalihan keluar</string> + <string name="runtime_removing">Mengalih keluar</string> + <string name="runtime_removal_incomplete">Pengalihan keluar tidak selesai</string> + <string name="game_file_export">Eksport fail permainan</string> + <string name="game_file_sync">Segerakkan semua fail permainan ke folder</string> + <string name="game_file_stop_sync">Hentikan penyegerakan fail permainan</string> + <string name="game_file_folder">Pilih folder untuk fail permainan frontend</string> + <string name="game_file_exported">Fail permainan disimpan ke %1$s</string> + <string name="game_frontend_files">Fail frontend</string> + + <string name="main_wait_runtime">Tunggu operasi masa jalan selesai</string> + <string name="main_wait_proton_install">Tunggu pemasangan alat keserasian selesai</string> + <string name="main_wait_desktop_install">Tunggu pemasangan apl desktop selesai</string> + <string name="main_wait_install_game">Tunggu pemasangan selesai sebelum melancarkan permainan</string> + <string name="main_saves_close_session">Tutup sesi Steam dahulu, supaya permainan tidak dapat menyimpan di atas import</string> + <string name="main_saves_importing">Mengimport ke %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="other">Mengimport %1$d fail daripada %2$s ke %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="other">Mengimport %1$d fail daripada %2$s ke %3$s. Simpanan lama disandarkan ke Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Pilih zip simpanan untuk %1$s</string> + <string name="main_saves_exporting">Mengeksport %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="other">Mengeksport %1$d fail sebagai %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Pilih tempat menyimpan %1$s (%2$s)</string> + <string name="main_action_failed">%1$s gagal: %2$s</string> + <string name="main_no_logs_yet">Belum ada log sesi: jalankan sesi dahulu.</string> + <string name="main_no_logs_to_clear">Tiada log sesi untuk dikosongkan.</string> + <plurals name="main_logs_cleared"> + <item quantity="other">%1$d folder log sesi dikosongkan.</item> + </plurals> + <string name="main_wadb_pair_failed">Gandingan Debugging Wayarles gagal</string> + <string name="main_wadb_command_failed">Arahan Debugging Wayarles gagal</string> + <string name="main_wadb_unavailable">Debugging Wayarles tidak tersedia</string> + <string name="main_adb_copied">Arahan ADB disalin</string> + <string name="main_pick_roms">Pilih folder ROM</string> + <string name="main_non_adreno_title">Bukan GPU Adreno</string> + <string name="main_non_adreno_text">Turnip menyokong GPU Adreno. Pada %1$s, Steam mungkin memaparkan skrin hitam. Muat turun: %2$.0f MB.</string> + <string name="main_install_anyway">Pasang juga</string> + <string name="main_remove_runtime_title">Alih keluar masa jalan Linux</string> + <string name="main_remove_runtime_text">Ini memadam masa jalan, klien Steam di dalamnya, dan setiap permainan yang dipasang di sana.</string> + <string name="main_applied">Digunakan: %1$s</string> + <string name="android_app_open_failed_primary">Tidak dapat membuka %1$s pada skrin utama</string> + <string name="android_app_open_failed_on">Tidak dapat membuka %1$s pada %2$s</string> + <string name="android_app_open_failed_display">Tidak dapat membuka %1$s pada paparan %2$d</string> + <string name="comp_busy_importing">Mengimport</string> + <string name="comp_busy_swapping">Menukar</string> + <string name="comp_busy_restoring">Memulihkan</string> + <string name="comp_busy_cancelling">Membatalkan</string> + <string name="comp_busy_deleting">Memadam</string> + <string name="comp_cannot_read">tidak dapat membaca fail</string> + <string name="comp_imported">%1$s diimport</string> + <string name="comp_swap_cancelled">Penukaran yang menunggu telah dibatalkan.</string> + <string name="comp_pick_wcp">Pilih pakej komponen (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nightlies tidak dapat dihubungi</string> + <string name="comp_stored">%1$s disimpan</string> + <string name="comp_download_failed">Muat turun gagal: %1$s</string> + <string name="drivers_pick_linux">Pilih pemacu masa jalan Linux (zip -Linux atau gabungan Android + Linux)</string> + <string name="drivers_pick_android">Pilih pemacu paparan (zip AdrenoTools atau gabungan Android + Linux)</string> + <string name="drivers_pick_any">Pilih zip pemacu atau gabungan Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Mengalih keluar %1$s…</string> + <string name="main_forgetting_named">Melupakan %1$s…</string> + <string name="main_pick_game_storage">Pilih folder storan permainan</string> + <string name="main_pick_decky_zip">Pilih ZIP pemalam Decky</string> + <string name="main_storage_not_usable">Tidak dapat digunakan: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Mengalih keluar masa jalan Linux</string> + <string name="main_settings_main_screen">Tidak dapat membuka Tetapan pada skrin bawah; dibuka pada skrin utama.</string> + <string name="main_open_dev_options">Buka Pilihan pembangun dalam Tetapan</string> + + <string name="upd_unknown_apps_failed">Tidak dapat membuka tetapan “Pasang apl tidak diketahui” Android</string> + <string name="upd_couldnt_check">Tidak dapat menyemak: %1$s</string> + <string name="upd_no_download">Binaan ini tidak mempunyai muat turun untuk salinan DroidDeck ini</string> + <string name="upd_stop_first">Hentikan sesi yang berjalan dahulu, kemudian kemas kini</string> + <string name="upd_stage_downloading">Memuat turun</string> + <string name="upd_stage_installing">Memasang</string> + <string name="upd_stage_confirm">Menunggu pengesahan anda</string> + <string name="upd_failed">Kemas kini gagal</string> + <string name="upd_not_offered">Android tidak menawarkan untuk memasang kemas kini</string> + + <string name="decky_install_failed">Pemasangan Decky gagal: %1$s</string> + <string name="decky_plugin_starting">Memulakan import pemalam…</string> + <string name="decky_plugin_failed">Import pemalam gagal: %1$s</string> + <string name="decky_plugin_installed">Pemalam dipasang. Mulakan semula Steam untuk memuatkannya.</string> + + <string name="drivers_not_checked">Belum disemak - ketik segar semula untuk mencari pemacu baharu</string> + <string name="drivers_bundle_sets_display">Android + Linux: menetapkan pemacu paparan sekali</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: menetapkan pemacu masa jalan sekali</string> + <string name="drivers_runtime_builtin">Turnip yang terbina dalam masa jalan</string> + <string name="drivers_system_vulkan">Vulkan sistem: tiada binaan terbundle untuk GPU ini</string> + <string name="drivers_bundled">%1$s (terbundle)</string> + <string name="drivers_manual">Manual</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Hanya satu separuh diterbitkan sekarang</string> + <string name="drivers_pair_size">%1$.0f MB untuk kedua-duanya</string> + <string name="drivers_none_to_set">Tiada pemacu untuk ditetapkan: %1$s</string> + <string name="drivers_checking_latest">Menyemak pemacu terkini…</string> + <string name="drivers_up_to_date_check_failed">Terkini (tidak dapat disemak: %1$s)</string> + <string name="drivers_recommended_unpublished">Pemacu yang disyorkan tidak diterbitkan sekarang</string> + <string name="drivers_downloading_pair">Memuat turun %1$s %2$s…</string> + <string name="drivers_updated_to">Dikemas kini ke %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Dikemas kini ke %1$s %2$s. Pemacu paparan berkuat kuasa selepas DroidDeck dimulakan semula.</string> + <string name="drivers_auto_waits_for_session">Kemas kini pemacu menunggu sesi berhenti.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s akan dimuat turun selepas anda keluar daripada data mudah alih dan penjimat bateri.</string> + <string name="drivers_skipping_bad">%1$s %2$s tidak memulakan sesi di sini, jadi Automatik kekal dengan pemacu yang berjaya.</string> + <string name="drivers_rolled_back">%1$s gagal memulakan sesi dua kali, jadi Automatik kembali kepada pemacu yang berfungsi.</string> + <string name="drivers_switched_to">Ditukar ke %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Ditukar ke %1$s %2$s. Pemacu paparan berkuat kuasa selepas DroidDeck dimulakan semula.</string> + <string name="drivers_using">Menggunakan %1$s %2$s.</string> + <string name="drivers_using_restart">Menggunakan %1$s %2$s. Pemacu paparan berkuat kuasa selepas DroidDeck dimulakan semula.</string> + <string name="drivers_using_quest">Pemacu paparan bawaan Quest dan runtime lalai sedang digunakan.</string> + <string name="drivers_using_quest_restart">Pemacu paparan bawaan Quest dan runtime lalai sedang digunakan. Pemacu paparan berkuat kuasa selepas DroidDeck dimulakan semula.</string> + <string name="drivers_not_a_driver">Bukan zip pemacu: bukan pemacu AdrenoTools, Turnip -Linux, atau gabungan Android + Linux</string> + <string name="drivers_import_failed">Import gagal: %1$s</string> + <string name="drivers_imported_unnamed">Pemacu diimport</string> + <string name="drivers_using_bundle">Menggunakan %1$s sebagai pemacu masa jalan dan paparan.</string> + <string name="drivers_using_bundle_restart">Menggunakan %1$s sebagai pemacu masa jalan dan paparan. Pemacu paparan berkuat kuasa selepas DroidDeck dimulakan semula.</string> + <string name="drivers_deleted_bundle">%1$s dipadam (kedua-dua pemacu)</string> + <string name="drivers_deleted">%1$s dipadam</string> + <string name="drivers_release_status">Terkini: %1$s · disemak %2$s</string> + <string name="drivers_release_status_failed">Terkini: %1$s · %2$s tidak dapat dihubungi · disemak %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="other">%1$d minit lalu</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="other">%1$d jam lalu</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="other">%1$d hari lalu</item> + </plurals> + <string name="drivers_checking_sources">Menyemak Banners-Turnip, WinNative dan DroidDeck…</string> + <string name="drivers_check_failed">semakan gagal</string> + <string name="drivers_installed_pick_either">%1$s dipasang - pilih dalam mana-mana senarai untuk menetapkan kedua-dua pemacu</string> + <string name="drivers_installed_pick">%1$s dipasang - pilih dalam menu</string> + + <string name="session_wait_removal">Tunggu pengalihan keluar masa jalan selesai</string> + <string name="session_title_game">Permainan</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">langsung</string> + <string name="session_swap_failed">Penukaran gagal: %1$s</string> + <string name="session_profile_save_failed">Penyimpanan profil gagal: %1$s</string> + <string name="session_desktop_paused">Desktop dijeda</string> + <string name="session_named_paused">%1$s dijeda</string> + <string name="session_program_paused">Program dijeda</string> + <string name="session_starting_desktop">Memulakan desktop</string> + <string name="session_starting_named">Memulakan %1$s</string> + <string name="session_starting_program">Memulakan program</string> + <string name="session_no_logs">Tiada log untuk sesi ini.</string> + <string name="session_logs_archive_failed">Tidak dapat membuat arkib log sesi.</string> + <string name="session_logs_share_failed">Tidak dapat berkongsi log sesi.</string> + <string name="session_starting_session">Memulakan sesi…</string> + <string name="session_runtime_downloading">memuat turun masa jalan Linux</string> + <string name="session_runtime_downloading_mb">memuat turun masa jalan Linux · %1$d daripada %2$d MB</string> + <string name="session_runtime_checking">menyemak masa jalan Linux</string> + <string name="session_runtime_unpacking">menyahpak masa jalan Linux</string> + <string name="session_desktop_downloading">memuat turun desktop</string> + <string name="session_desktop_downloading_mb">memuat turun desktop · %1$d daripada %2$d MB</string> + <string name="session_desktop_checking">menyemak desktop</string> + <string name="session_desktop_unpacking">menyahpak desktop</string> + <string name="session_proton_downloading">memuat turun Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">memuat turun Proton Experimental (ARM64) · %1$d daripada %2$d MB</string> + <string name="session_proton_checking">menyemak Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">menyahpak Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Tidak dapat menghubungi katalog masa jalan. Semak sambungan dan tekan Main semula.</string> + <string name="session_runtime_install_failed">Masa jalan Linux tidak berjaya dipasang. Semak masa jalan dalam Persediaan dan tekan Main semula.</string> + <string name="session_desktop_install_failed">Desktop tidak berjaya dipasang (%1$s). Semak sambungan dan tekan Desktop semula.</string> + <string name="session_ended_named">%1$s terhenti secara tidak dijangka. Kongsi log dengan laporan pepijat, atau cuba lagi.</string> + <string name="session_ended_program">Program terhenti secara tidak dijangka. Kongsi log dengan laporan pepijat, atau cuba lagi.</string> + <string name="session_ended_desktop">Desktop terhenti secara tidak dijangka. Kongsi log dengan laporan pepijat, atau cuba lagi.</string> + <string name="session_ended_detail">Status keluar %1$d · %2$s</string> + <string name="session_ended_no_log">tiada log</string> + <plurals name="session_hint_enosys"> + <item quantity="other">Log menunjukkan %1$d ralat “Function not implemented”: pecutan seccomp proot gagal pada pembantu di peranti ini. Cuba %2$s → “%3$s” (atau “%4$s”) dan mulakan semula.</item> + </plurals> + + <string name="mode_decky_plugins">Pemalam</string> + <string name="mode_decky_plugins_hint">Pasang ZIP pemalam untuk sesi Steam seterusnya.</string> + <string name="mode_decky_plugin_downloading">Memuat turun…</string> + <string name="mode_decky_plugin_install_zip">Pasang daripada ZIP</string> + <string name="store_cat_games">Permainan</string> + <string name="store_cat_audio_video">Audio & Video</string> + <string name="store_cat_graphics">Grafik</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Pejabat</string> + <string name="store_cat_developer">Pembangun</string> + <string name="store_cat_education">Pendidikan</string> + <string name="store_cat_science">Sains</string> + <string name="store_cat_system">Sistem</string> + <string name="store_cat_utilities">Utiliti</string> + <string name="store_section_popular">Popular</string> + <string name="store_section_trending">Tular</string> + <string name="store_section_new">Baharu</string> + <string name="store_section_updated">Dikemas kini</string> + <string name="store_section_loading">memuatkan…</string> + <string name="store_flatpak_setup">Persediaan Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Tidak dapat menyemak kemas kini di Flathub</string> + <string name="content_rom_installed">dipasang</string> + <string name="content_rom_folder">folder</string> + <string name="theme_graphite">Graphite</string> + <string name="theme_graphite_detail">Permukaan graphite, dengan bebola biru logo untuk semua yang dipilih, difokus atau ditekan.</string> + <string name="theme_paper">Kertas pada hitam</string> + <string name="theme_paper_detail">Putih sebagai utama, biru ikon sebagai isyarat untuk garis, gelang dan titik.</string> + <string name="theme_icon_blue">Biru ikon</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Pasang masa jalan dahulu</string> + <string name="game_sync_err_steam_library">Pustaka Steam tidak tersedia</string> + <string name="game_sync_err_previous_sd">Pustaka SD terdahulu tidak tersedia</string> + <string name="game_sync_err_game_storage">Storan permainan tidak tersedia</string> + <string name="game_sync_err_added_games">Folder permainan yang ditambah tidak tersedia</string> + <string name="game_sync_err_manifests">Manifest Steam tidak tersedia</string> + <string name="content_system_many">Banyak sistem</string> + <string name="fm_drive_internal">Dalaman</string> + <string name="fm_drive_linux">Sistem Linux</string> + <string name="fm_drive_sd">Kad SD</string> + <string name="fm_drive_storage">Storan</string> + <string name="fm_select">Pilih</string> + <string name="fm_properties">Ciri</string> + <string name="fm_favorite_add">Tambah ke Kegemaran</string> + <string name="fm_favorite_remove">Alih keluar daripada Kegemaran</string> + <string name="fm_rename">Namakan semula</string> + <string name="fm_copy">Salin</string> + <string name="fm_cut">Potong</string> + <string name="fm_actions">Tindakan</string> + <string name="fm_favorites">Kegemaran</string> + <string name="fm_pin_current">Sematkan folder semasa</string> + <string name="fm_no_favorites">Belum ada kegemaran - sematkan folder dengan menu ⋮-nya untuk melompat ke sini dengan pantas.</string> + <string name="fm_unpin_favorite">Alih keluar daripada kegemaran</string> + <string name="fm_size_zero">0 bait</string> + <string name="fm_unit_bytes">bait</string> + <string name="fm_prop_location">Lokasi</string> + <string name="fm_prop_type">Jenis</string> + <string name="fm_prop_size">Saiz</string> + <string name="fm_prop_modified">Diubah suai</string> + <string name="fm_type_folder">Folder</string> + <string name="fm_type_file">Fail</string> + <string name="fm_type_ext_file">Fail %1$s</string> + <string name="fm_read_only">Baca sahaja</string> + <string name="fm_read_only_hint">Menghalang permainan (dan Wine) daripada menulis ganti atau memadam fail ini.</string> + <string name="fm_read_only_failed">Tidak dapat menukar Baca sahaja</string> + <string name="fm_hidden">Tersembunyi</string> + <string name="fm_hidden_unsupported">Storan ini tidak dapat menyimpan bendera tersembunyi.</string> + <string name="fm_hidden_hint">Menandakan fail tersembunyi dalam Windows (atribut tersembunyi Wine).</string> + <string name="fm_hidden_failed">Tidak dapat menukar Tersembunyi pada storan ini</string> + <string name="fm_done">Selesai</string> + <string name="fm_op_deleting">Memadam...</string> + <string name="fm_delete_failed">Padam gagal</string> + <string name="fm_op_moving">Mengalihkan...</string> + <string name="fm_op_copying">Menyalin...</string> + <string name="fm_op_moving_item">Mengalihkan - %1$s</string> + <string name="fm_op_copying_item">Menyalin - %1$s</string> + <string name="fm_op_moving_batch">Mengalihkan %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Menyalin %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d selesai, %2$d gagal</string> + <string name="fm_paste_skipped">%1$d selesai, %2$d dilangkau</string> + <plurals name="fm_paste_moved"> + <item quantity="other">%1$d item dialihkan</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="other">%1$d item disalin</item> + </plurals> + <string name="fm_already_exists">“%1$s” sudah wujud</string> + <string name="fm_op_renaming">Menamakan semula...</string> + <string name="fm_rename_failed">Namakan semula gagal</string> + <string name="fm_op_creating_folder">Mencipta folder...</string> + <string name="fm_create_folder_failed">Tidak dapat mencipta folder</string> + <string name="fm_new_folder">Folder Baharu</string> + <string name="fm_folder_name">Nama folder</string> + <string name="fm_create">Cipta</string> + <string name="fm_new_name">Nama baharu</string> + <string name="fm_delete_title">Padam?</string> + <string name="fm_delete_text">Padam “%1$s” secara kekal?</string> + <plurals name="fm_delete_items_title"> + <item quantity="other">Padam %1$d item?</item> + </plurals> + <string name="fm_cannot_undo">Ini tidak boleh dibuat asal.</string> + <plurals name="fm_and_more"> + <item quantity="other">…dan %1$d lagi</item> + </plurals> + <string name="fm_op_deleting_batch">Memadam %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="other">%1$d tidak dapat dipadam</item> + </plurals> + <string name="fm_conflict_merge_hint">Gabung menambah dan menggantikan fail di dalam folder sedia ada.</string> + <string name="fm_conflict_overwrite_hint">Tulis ganti menggantikan fail sedia ada.</string> + <string name="fm_conflict_apply_all">Gunakan untuk semua konflik</string> + <string name="fm_conflict_merge">Gabung</string> + <string name="fm_conflict_overwrite">Tulis ganti</string> + <string name="fm_conflict_keep_both">Simpan kedua-duanya</string> + <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_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> + <string name="fm_search">Cari</string> + <string name="fm_sort">Susun</string> + <string name="fm_sort_name">Nama</string> + <string name="fm_sort_date">Tarikh diubah suai</string> + <string name="fm_rows_comfortable">Baris selesa</string> + <string name="fm_rows_compact">Baris padat</string> + <string name="fm_hide_hidden">Sembunyikan fail tersembunyi</string> + <string name="fm_show_hidden">Papar fail tersembunyi</string> + <string name="fm_hide_favorites">Sembunyikan kegemaran</string> + <string name="fm_show_favorites">Papar kegemaran</string> + <string name="fm_filter_folder">Tapis folder ini</string> + <string name="fm_free_space">%1$s bebas</string> + <string name="fm_selected_count">%1$d dipilih</string> + <string name="fm_select_none">Tiada</string> + <string name="fm_select_all">Semua</string> + <string name="fm_paste">Tampal</string> + <plurals name="fm_items"> + <item quantity="other">%1$d item</item> + </plurals> + <string name="fm_paste_here">Tampal %1$s di sini</string> + <string name="fm_paste_move_here">Tampal %1$s (alih) di sini</string> + <string name="fm_rail_title">Fail</string> + <string name="fm_rail_storage">STORAN</string> + <string name="fm_rail_quick">PANTAS</string> + <string name="fm_rail_favorites">KEGEMARAN</string> + <string name="fm_rail_downloads">Muat turun</string> + <string name="fm_rail_downloads_short">MuatTrn</string> + <string name="fm_rail_roms">ROM</string> + <string name="fm_rail_session_logs">Log sesi</string> + <string name="fm_rail_pictures">Gambar</string> + <string name="fm_favorite_added">“%1$s” ditambah ke Kegemaran</string> + <string name="fm_favorite_removed">“%1$s” dialih keluar daripada Kegemaran</string> + <string name="fm_empty_directory">Direktori kosong</string> + <string name="fm_up_one_level">Naik satu tahap</string> + <string name="fm_choose_folder">Pilih folder</string> + <string name="fm_choose_file">Pilih fail</string> + <string name="ctrl_tint_steam_blue">Biru Steam</string> + <string name="ctrl_tint_sky">Langit</string> + <string name="ctrl_tint_white">Putih</string> + <string name="ctrl_tint_violet">Violet</string> + <string name="ctrl_tint_green">Hijau</string> + <string name="ctrl_tint_amber">Ambar</string> + <string name="ctrl_tint_red">Merah</string> + <string name="ctrl_tint_pink">Merah jambu</string> + <string name="ctrl_button_a">Butang A</string> + <string name="ctrl_button_b">Butang B</string> + <string name="ctrl_button_x">Butang X</string> + <string name="ctrl_button_y">Butang Y</string> + <string name="ctrl_button_lb">Bumper kiri</string> + <string name="ctrl_button_rb">Bumper kanan</string> + <string name="ctrl_button_lt">Pencetus kiri</string> + <string name="ctrl_button_rt">Pencetus kanan</string> + <string name="ctrl_button_view">Butang View</string> + <string name="ctrl_button_menu">Butang Menu</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad atas</string> + <string name="ctrl_target_down">D-pad bawah</string> + <string name="ctrl_target_left">D-pad kiri</string> + <string name="ctrl_target_right">D-pad kanan</string> + <string name="ctrl_target_hidden">Tersembunyi</string> + <string name="ctrl_editor_drag">Seret untuk alih</string> + <string name="ctrl_editor_snap">Lekat</string> + <string name="ctrl_editor_save">Simpan</string> + <string name="second_mode_none">Tiada</string> + <string name="second_mode_keyboard_trackpad">Papan kekunci + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Pemegang Deck + trackpad</string> + + <string name="rtinst_removing">Mengalih keluar masa jalan Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="other">Mengalih keluar masa jalan Linux · %1$d entri</item> + </plurals> + <string name="rtinst_removed">Masa jalan Linux dialih keluar</string> + <string name="rtinst_removal_failed">Tidak dapat selesai mengalih keluar masa jalan Linux. Cuba semula pengalihan keluar dalam Persediaan.</string> + <string name="rtinst_removing_leftovers">Mengalih keluar baki masa jalan</string> + <string name="rtinst_downloading">Memuat turun</string> + <string name="rtinst_verifying">Mengesahkan</string> + <string name="rtinst_extracting">Mengekstrak</string> + <string name="rtinst_channel_description">Dipaparkan semasa masa jalan Linux dipasang atau dialih keluar</string> + <string name="rtinst_title_installing">Memasang masa jalan Linux</string> + <string name="rtinst_title_removing">Mengalih keluar masa jalan Linux</string> + + <string name="deskpkg_runtime_missing">Masa jalan Linux belum dipasang</string> + <string name="deskpkg_no_checksum">Katalog tidak mempunyai checksum untuk %1$s</string> + <string name="deskpkg_checksum_mismatch">Checksum tidak sepadan - tiada apa yang diubah</string> + <string name="deskpkg_installing">Memasang %1$s</string> + <string name="deskpkg_place_failed">Tidak dapat meletakkan AppImage</string> + <string name="deskpkg_extract_failed">Pengekstrakan gagal</string> + <string name="deskpkg_install_failed">Pemasangan gagal</string> + + <string name="flatpakmgr_setup_failed">Persediaan Flatpak gagal (keluar %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Persediaan Flatpak tidak selesai</string> + <string name="flatpakmgr_busy">Tugas kedai lain sedang berjalan</string> + <string name="flatpakmgr_not_ready">Sediakan Flatpak dahulu</string> + <string name="flatpakmgr_starting">Memulakan</string> + <string name="flatpakmgr_exit_status">Flatpak keluar dengan status %1$d</string> + <string name="flatpakmgr_installing">Memasang %1$s</string> + <string name="flatpakmgr_updating">Mengemas kini %1$s</string> + <string name="flatpakmgr_removing">Mengalih keluar %1$s</string> + <string name="flatpakmgr_installing_step">Memasang %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Mengemas kini %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Mengalih keluar %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">terjemahan</string> + <string name="flatpakmgr_ref_graphics_drivers">pemacu grafik</string> + <string name="flatpakmgr_ref_media_codecs">kodek media</string> + <string name="flatpakmgr_ref_runtime">masa jalan %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">masa jalan %1$s %2$s</string> + + <string name="appimg_too_small">Fail terlalu kecil untuk menjadi AppImage</string> + <string name="appimg_unreadable">Fail tidak dapat dibaca: %1$s</string> + <string name="appimg_not_linux">Ini bukan AppImage (ia bukan program Linux)</string> + <string name="appimg_wrong_arch">AppImage ini dibina bukan untuk ARM64 (aarch64) mahupun PC x86</string> + <string name="appimg_not_appimage">Ini adalah program Linux tetapi bukan AppImage</string> + <string name="appimg_wrong_type">Hanya AppImage jenis 2 boleh diimport (ini jenis %1$d)</string> + <string name="appimg_no_space_import">Ruang bebas tidak mencukupi: import memerlukan kira-kira %1$s</string> + <string name="appimg_no_space_update">Ruang bebas tidak mencukupi: kemas kini memerlukan kira-kira %1$s</string> + <string name="appimg_import_failed">Import gagal</string> + <string name="appimg_gone">AppImage itu sudah hilang</string> + <string name="appimg_update_failed">Kemas kini gagal</string> + <string name="appimg_extracting">Mengekstrak %1$s</string> + <string name="appimg_extract_failed">AppImage tidak dapat diekstrak</string> + <string name="appimg_extract_failed_detail">AppImage tidak dapat diekstrak: %1$s</string> + + <string name="deckymgr_stop_session_loader">Hentikan sesi aktif sebelum memasang Decky Loader</string> + <string name="deckymgr_download_failed">Muat turun Decky Loader gagal</string> + <string name="deckymgr_size_mismatch">Saiz Decky Loader tidak sepadan dengan metadata keluaran</string> + <string name="deckymgr_checksum_download_failed">Tidak dapat memuat turun checksum keluaran</string> + <string name="deckymgr_checksum_missing">Checksum keluaran tiada</string> + <string name="deckymgr_checksum_invalid">Checksum keluaran tidak sah</string> + <string name="deckymgr_checksum_mismatch">Checksum Decky Loader tidak sepadan</string> + <string name="deckymgr_not_elf">Aset keluaran bukan boleh laku Linux 64-bit yang serasi</string> + <string name="deckymgr_session_started_loader">Sesi dimulakan semasa muat turun; hentikan dahulu sebelum memasang Decky Loader</string> + <string name="deckymgr_loader_not_executable">Tidak dapat menandakan PluginLoader sebagai boleh laku</string> + <string name="deckymgr_cef_failed">Tidak dapat membenarkan penyahpepijatan jauh CEF Steam</string> + <string name="deckymgr_stage_failed">Tidak dapat menyediakan PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Tidak dapat mengekalkan PluginLoader sedia ada</string> + <string name="deckymgr_loader_activate_failed">Tidak dapat mengaktifkan PluginLoader baharu</string> + <string name="deckymgr_stop_session_plugin">Hentikan sesi aktif sebelum memasang pemalam</string> + <string name="deckymgr_loader_required">Pasang Decky Loader sebelum mengimport pemalam</string> + <string name="deckymgr_zip_unreadable">Tidak dapat membaca fail ZIP yang dipilih</string> + <string name="deckymgr_plugins_dir_failed">Tidak dapat mencipta direktori pemalam Decky</string> + <string name="deckymgr_extracting_zip">Mengekstrak ZIP pemalam</string> + <string name="deckymgr_zip_one_folder">ZIP pemalam mesti mengandungi satu folder pemalam peringkat atas</string> + <string name="deckymgr_zip_missing_files">ZIP pemalam tiada plugin.json, package.json atau dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Nama pemalam tiada</string> + <string name="deckymgr_session_started_plugin">Sesi dimulakan semasa pemasangan; hentikan dahulu sebelum memasang pemalam</string> + <string name="deckymgr_plugin_installed">Pemalam dipasang · mulakan semula Steam untuk memuatkannya</string> + <string name="deckymgr_plugin_install_failed">Pemasangan ZIP pemalam gagal</string> + <string name="deckymgr_zip_too_many">ZIP pemalam mengandungi terlalu banyak entri</string> + <string name="deckymgr_zip_invalid_path">ZIP pemalam mengandungi laluan yang tidak sah</string> + <string name="deckymgr_zip_duplicate_paths">ZIP pemalam mengandungi laluan pendua</string> + <string name="deckymgr_zip_unsafe_path">ZIP pemalam mengandungi laluan yang tidak selamat</string> + <string name="deckymgr_folder_failed">Tidak dapat mencipta folder pemalam</string> + <string name="deckymgr_zip_too_large">ZIP pemalam mengembang melebihi had 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Tidak dapat menandakan binari pemalam terbundle sebagai boleh laku</string> + <string name="deckymgr_remote_entry_invalid">Entri remote_binary tidak sah</string> + <string name="deckymgr_remote_name_invalid">Nama binari jauh tidak sah</string> + <string name="deckymgr_remote_url_https">URL binari jauh mesti menggunakan HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Binari jauh %1$s mempunyai cincang SHA-256 yang tidak sah</string> + <string name="deckymgr_bin_dir_failed">Tidak dapat mencipta direktori bin pemalam</string> + <string name="deckymgr_downloading_binary">Memuat turun binari pemalam · %1$s</string> + <string name="deckymgr_binary_download_failed">Tidak dapat memuat turun binari pemalam %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Checksum binari pemalam tidak sepadan · %1$s</string> + <string name="deckymgr_binary_not_executable">Tidak dapat menandakan binari pemalam sebagai boleh laku · %1$s</string> + <string name="deckymgr_binary_replace_failed">Tidak dapat menggantikan binari pemalam · %1$s</string> + <string name="deckymgr_binary_install_failed">Tidak dapat memasang binari pemalam · %1$s</string> + <string name="deckymgr_folder_taken">Folder pemalam dimiliki oleh pemalam lain</string> + <string name="deckymgr_preserve_failed">Tidak dapat mengekalkan pemalam sedia ada</string> + <string name="deckymgr_activate_failed">Tidak dapat mengaktifkan pemalam yang diimport</string> + <string name="deckymgr_settings_failed">Tidak dapat mengemas kini tetapan pemalam Decky</string> + <string name="deckymgr_restore_failed">Tidak dapat memulihkan pemalam sedia ada</string> + + <string name="adbfix_save_failed">Tidak dapat menyimpan identiti Debugging Wayarles</string> + <string name="adbfix_command_failed">Arahan ADB gagal (%1$d)</string> + <string name="adbfix_not_confirmed">Android tidak mengesahkan had proses anak telah ditukar: %1$s</string> + <string name="adbfix_no_pairing">Tiada gandingan Debugging Wayarles disimpan</string> + <string name="adbfix_enter_address">Masukkan alamat IP & Port Debugging Wayarles semasa</string> + + <string name="adbpair_timed_out">Masa tamat menunggu tetingkap timbul gandingan. Cuba lagi daripada DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Tidak dapat mencari tetingkap timbul gandingan (%1$d). Semak Wi-Fi dihidupkan.</string> + <string name="adbpair_discovery_failed">Tidak dapat mencari tetingkap timbul gandingan: %1$s</string> + <string name="adbpair_six_digits">Masukkan kesemua 6 digit kod</string> + <string name="adbpair_pairing">Menggandingkan…</string> + <string name="adbpair_code_rejected">Kod itu tidak berfungsi. Buka tetingkap timbul gandingan semula dan masukkan kod baharunya.</string> + <string name="adbpair_connecting">Digandingkan. Menyambung…</string> + <string name="adbpair_port_not_found">Digandingkan, tetapi port Debugging Wayarles tidak dijumpai. Biarkan Debugging Wayarles hidup dan cuba lagi.</string> + <string name="adbpair_applying">Menggunakan tetapan…</string> + <string name="adbpair_command_failed">Arahan Debugging Wayarles gagal</string> + <string name="adbpair_channel_name">Persediaan Debugging Wayarles</string> + <string name="adbpair_channel_description">Meminta kod gandingan Debugging Wayarles semasa Tetapan dibuka</string> + <string name="adbpair_title_pair">Gandingkan Debugging Wayarles</string> + <string name="adbpair_waiting_text">Hidupkan Debugging Wayarles, kemudian ketik “Gandingkan peranti dengan kod gandingan”.</string> + <string name="adbpair_waiting_long">Hidupkan Debugging Wayarles, kemudian ketik “Gandingkan peranti dengan kod gandingan”. Kekal dalam Tetapan: kod akan masuk dalam pemberitahuan ini.</string> + <string name="adbpair_code_label">Kod gandingan 6 digit</string> + <string name="adbpair_code_hint">Ketik Masukkan kod dan taip 6 digit yang dipaparkan dalam Tetapan.</string> + <string name="adbpair_title_code">Masukkan kod gandingan Wi-Fi</string> + <string name="adbpair_title_retry">Cuba kod itu sekali lagi</string> + <string name="adbpair_enter_code">Masukkan kod</string> + <string name="adbpair_title_working">Menyediakan Steam</string> + <string name="adbpair_title_done">Steam sedia</string> + <string name="adbpair_done_text">Ketik untuk kembali ke DroidDeck. Anda boleh matikan Debugging Wayarles sekarang.</string> + <string name="adbpair_title_failed">Persediaan Debugging Wayarles terhenti</string> + + <string name="selfinst_download_failed">Muat turun gagal</string> + <string name="selfinst_size_mismatch">Saiz muat turun tidak sepadan dengan APK yang diterbitkan dan telah dibuang - cuba lagi</string> + <string name="selfinst_checksum_mismatch">Muat turun tidak sepadan dengan checksumnya dan telah dibuang - cuba lagi</string> + <string name="selfinst_wrong_package">Kemas kini ini untuk pakej Android %1$s, bukan %2$s</string> + <string name="selfinst_metadata_signer">Metadata kemas kini tidak menamakan kunci tandatangan keluaran DroidDeck</string> + <string name="selfinst_unreadable">Android tidak dapat membaca APK yang dimuat turun</string> + <string name="selfinst_apk_wrong_package">APK yang dimuat turun untuk %1$s, bukan %2$s</string> + <string name="selfinst_version_mismatch">APK yang dimuat turun menyatakan versionCode %1$d, bukan %2$d yang diterbitkan</string> + <string name="selfinst_downgrade">Android tidak akan memasang versionCode %1$d menggantikan %2$d yang dipasang</string> + <string name="selfinst_no_signing">APK yang dimuat turun tidak mempunyai maklumat tandatangan</string> + <string name="selfinst_wrong_signer">APK yang dimuat turun tidak ditandatangani dengan kunci keluaran DroidDeck</string> + <string name="appupd_http">Katalog kemas kini menjawab HTTP %1$d</string> + + <string name="loadstate_starting">Memulakan sesi…</string> + <string name="loadstate_elapsed">%1$d:%2$02d berlalu · masih berjalan</string> + <string name="loadstate_steam_update">Memuat turun kemas kini klien Steam · %1$d%%</string> + <string name="loadstate_steam_client">Memuat turun klien Steam · %1$s</string> + + <string name="pextra_busy">Pemasangan alat keserasian sudah berjalan</string> + <string name="pextra_stop_session">Hentikan sesi aktif sebelum memasang alat keserasian</string> + <string name="pextra_no_release">Tidak dapat mencari keluaran ARM64 untuk %1$s</string> + <string name="pextra_no_space">Sekurang-kurangnya 4 GB bebas tambah saiz muat turun diperlukan untuk memasang %1$s</string> + <string name="pextra_downloading">Memuat turun %1$s %2$s</string> + <string name="pextra_retrying">Mencuba semula muat turun · percubaan %1$d daripada %2$d</string> + <string name="pextra_interrupted">Muat turun terganggu</string> + <string name="pextra_download_failed">Muat turun gagal; fail separa disimpan supaya cubaan semula boleh disambung</string> + <string name="pextra_too_big">Muat turun melebihi saiz keluaran dan telah dipadam</string> + <string name="pextra_incomplete">Muat turun tidak selesai; fail separa disimpan untuk cubaan semula yang boleh disambung</string> + <string name="pextra_verifying">Mengesahkan muat turun</string> + <string name="pextra_checksum_unreadable">Tidak dapat membaca checksum keluaran; cuba lagi</string> + <string name="pextra_no_checksum">%1$s %2$s tidak menerbitkan checksum; tiada apa yang dipasang</string> + <string name="pextra_checksum_mismatch">Checksum tidak sepadan; muat turun telah dipadam</string> + <string name="pextra_session_started">Sesi dimulakan semasa muat turun; hentikan dahulu sebelum memasang alat keserasian</string> + <string name="pextra_installing">Memasang %1$s</string> + <string name="pextra_install_failed">Pemasangan %1$s gagal (keluar %2$d)</string> + <string name="pextra_could_not_install">Tidak dapat memasang %1$s</string> + <string name="esync_fetching">Mengambil pek droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">dengan pembantu Linux</string> + <string name="cmgr_fex_dlls_only">DLL sahaja</string> + <string name="cmgr_original_proton_updated">Asal (Proton dikemas kini sejak penukaran terakhir)</string> + <string name="cmgr_changed_outside">Diubah di luar Komponen</string> + <string name="cmgr_not_present">tidak ada</string> + <string name="cmgr_original_version">Asal %1$s</string> + <string name="cmgr_original_from">Asal daripada %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s akan masuk ke %3$s apabila permainan yang berjalan padanya ditutup.</string> + <string name="cmgr_swap_done">%1$s %2$s kini dalam %3$s. Ia berkuat kuasa pada kali seterusnya permainan dimulakan.</string> + <string name="cmgr_original_missing">Pakej asal itu tidak disimpan</string> + <string name="cmgr_restore_queued">%1$s bagi %2$s akan kembali kepada asalnya apabila permainan yang berjalan padanya ditutup.</string> + <string name="cmgr_restore_done">%1$s bagi %2$s dipulihkan daripada asal %3$s-nya.</string> + <string name="cmgr_package_in_use">%1$s sedang digunakan dalam %2$s. Tukar Proton itu kepada yang lain dahulu.</string> + <string name="cmgr_package_not_stored">%1$s tidak disimpan</string> + <string name="cmgr_deleted">%1$s telah dipadam.</string> + <string name="cmgr_original_kept">Asal binaan yang dipasang dikekalkan: itulah jalan kembali.</string> + <string name="cmgr_not_stored">Tidak disimpan</string> + <string name="cmgr_deleted_original">Asal %1$s bagi %2$s telah dipadam.</string> + <string name="cmgr_nightlies_only">Muat turun hanya datang daripada keluaran Nightlies</string> + <string name="cmgr_list_predates_checksums">Senarai pakej ini mendahului checksum - segarkan dan cuba lagi</string> + <string name="cmgr_checksum_mismatch">Checksum tidak sepadan</string> + + <string name="sprefs_upscaler_linear">Linear</string> + <string name="sprefs_upscaler_nearest">Terdekat</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (kualiti)</string> + <string name="sprefs_upscaler_sharpen">Ketajaman sahaja</string> + <string name="sprefs_lod_bias_auto">Auto (sepadan penskalaan)</string> + + <string name="look_off_desc">Tiada yang digunakan.</string> + <string name="look_game_clarity">Kejelasan Permainan</string> + <string name="look_game_clarity_desc">Ketajaman dengan sedikit kontras - yang harian.</string> + <string name="look_vivid">Jelas</string> + <string name="look_vivid_desc">Warna didorong kuat. Pengurangan jalur dihidupkan supaya langit tidak bergaris.</string> + <string name="look_cinematic">Sinematik</string> + <string name="look_cinematic_desc">Kontras lebih dalam, warna lebih sejuk, tepi dilicinkan.</string> + <string name="look_competitive">Kompetitif</string> + <string name="look_competitive_desc">Bayang diangkat dan ketajaman berat - kesan orang dahulu.</string> + <string name="look_adaptive_sharpen">Ketajaman Adaptif</string> + <string name="look_adaptive_sharpen_desc">Ketajaman sahaja, warna tidak disentuh.</string> + <string name="look_filmic">Filmik</string> + <string name="look_filmic_desc">Lengkuk seperti filem, sedikit lembut.</string> + <string name="look_arcade">Arked</string> + <string name="look_arcade_desc">Kuat dan bertenaga.</string> + <string name="look_retro_crt">CRT Retro</string> + <string name="look_retro_crt_desc">Tiub CRT dan isyarat analog bergabung sekali.</string> + <string name="look_upscale_sharp">Peningkatan Skala Tajam</string> + <string name="look_upscale_sharp_desc">Untuk berjalan di bawah resolusi panel.</string> + <string name="look_pixel_clean">Piksel Bersih</string> + <string name="look_pixel_clean_desc">Piksel tajam untuk 2D dan tajuk lama.</string> + <string name="look_anime_edge">Tepi Anime</string> + <string name="look_anime_edge_desc">Garis luar kartun tambah ketajaman.</string> + + <string name="gpuinfo_not_adreno">Bukan GPU Adreno</string> + <string name="gpuinfo_supported">Disokong</string> + <string name="gpuinfo_experimental">Eksperimen: pemacunya ialah binaan ujian</string> + <string name="gpuinfo_below_tested">Di bawah perkakasan yang diuji (Adreno 725 dan lebih baharu): mungkin tidak dapat berjalan</string> + <string name="gpuinfo_unsupported">Tidak disokong: DroidDeck memerlukan GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Had kadar GitHub dicapai - cuba lagi kemudian</string> + <string name="turnip_github_http">GitHub menjawab HTTP %1$d</string> + <string name="turnip_download_failed">Muat turun gagal</string> + <string name="turnip_list_predates_checksums">Senarai pemacu ini mendahului checksum - segarkan dan cuba lagi</string> + <string name="turnip_checksum_mismatch">Checksum tidak sepadan - muat turun telah dibuang</string> + <string name="turnip_not_adrenotools">Bukan pemacu AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">tiada meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json tidak dapat dibaca (%1$s)</string> + <string name="turnip_reject_linux_driver">ini ialah pemacu masa jalan Linux (import di bawah “Pemacu masa jalan Linux”)</string> + <string name="turnip_reject_wayland">ini ialah pemacu permainan Wayland, yang tidak berguna untuk apl ini</string> + <string name="turnip_reject_no_library_name">meta.json tidak menamakan libraryName, jadi tiada apa dapat diberikan kepada AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json menamakan %1$s, yang tidak ada dalam zip</string> + <string name="turnip_reject_not_aarch64">%1$s bukan pustaka kongsi ELF AArch64 64-bit</string> + <string name="turnip_reject_glibc">%1$s menghubungkan glibc - Turnip “-Linux”, yang tergolong di bawah “Pemacu masa jalan Linux”</string> + <string name="lvd_no_library">Tiada libvulkan_freedreno*.so dalam zip ini. Zip Turnip Android (AdrenoTools) atau -Wayland bukan pemacu masa jalan Linux.</string> + <string name="lvd_not_aarch64">%1$s bukan pustaka kongsi ELF AArch64 64-bit.</string> + <string name="lvd_not_glibc">%1$s bukan pemacu glibc - ia menghubungkan libc Android. Masa jalan Linux memerlukan zip “-Linux”; Turnip biasa atau “-Wayland” langsung tidak dapat dimuatkan oleh klien Steam.</string> + <string name="bundle_no_manifest">Bukan gabungan pemacu: tiada manifest.json yang menamakan pemacu android dan linux</string> + <string name="bundle_entry_outside">Bukan gabungan pemacu: %1$s menunjuk ke luar darinya</string> + <string name="bundle_too_large">Bukan gabungan pemacu: ia mengembang lebih daripada %1$d MB</string> + + <string name="gstore_sd_card">Kad SD</string> + <string name="gstore_folder">Folder</string> + + <string name="logshare_chooser">Kongsi log sesi</string> + + <string name="hdr_needs_android_10">memerlukan Android 10 atau lebih baharu (lapisan paparan dengan ruang warna)</string> + <string name="hdr_none">paparan ini melaporkan tiada sokongan HDR</string> + <string name="hdr_not_hdr10">paparan ini menyokong %1$s, bukan HDR10</string> + + <string name="gpu_this_gpu">GPU ini</string> + <string name="phantom_title_on">Had proses anak dihidupkan</string> + <string name="phantom_title_unset">Had proses anak tidak ditetapkan</string> + <string name="phantom_title_unreadable">Had proses anak tidak dapat disemak</string> + <string name="phantom_title_off">Had proses anak dimatikan</string> + <string name="phantom_title_not_required">Had proses anak tidak diperlukan</string> + <string name="phantom_instructions_fix">%1$s Jika itu tidak boleh, sambungkan peranti ini ke komputer dengan ADB dan jalankan arahan di bawah. Kembali ke sini dan semak semula.</string> + <string name="phantom_instructions_off">Sesi Steam boleh dimulakan.</string> + <string name="phantom_instructions_not_applicable">Versi Android ini tidak menggunakan had ini.</string> + <string name="phantom_fix_toggle">Hidupkan “Lumpuhkan sekatan proses anak” dalam Pilihan pembangun, dan biarkan Pilihan pembangun hidup selepas itu.</string> + <string name="phantom_fix_no_toggle">Versi Android ini tidak mempunyai suis untuknya. Gunakan Debugging Wayarles untuk menukarnya daripada peranti ini.</string> + <string name="upd_block_no_apk">Binaan ini tidak mempunyai muat turun untuk salinan DroidDeck ini.</string> + <string name="upd_block_version_code">Android tidak akan memasangnya menggantikan binaan ini kerana versionCode %1$d lebih rendah daripada %2$d yang dipasang.</string> + <string name="upd_fail_downgrade">Android tidak akan memasang versi lama menggantikan versi baharu. Kekal pada binaan ini sehingga saluran menyusul.</string> + <string name="upd_fail_signature">Salinan DroidDeck ini ditandatangani secara berbeza (binaan tempatan?), jadi Android tidak akan mengemas kininya di tempat.</string> + <string name="upd_fail_storage">Tidak cukup ruang bebas untuk kemas kini.</string> + <string name="upd_fail_aborted">Kemas kini telah dibatalkan.</string> + <string name="upd_fail_with_message">Kemas kini tidak terpasang: %1$s</string> + <string name="upd_fail_generic">Kemas kini tidak terpasang.</string> + <string name="saves_layout_zip">zip %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s belum pernah dilancarkan</string> + <string name="saves_none_found">Tiada fail simpanan dijumpai untuk %1$s</string> + <string name="saves_not_save_zip">%1$s tidak mempunyai folder drive_c, jadi ia bukan zip simpanan GameHub atau Winlator</string> + <string name="gstore_cannot_create">tidak dapat mencipta folder dalam %1$s</string> + <string name="gstore_cannot_write">tidak dapat menulis dalam %1$s</string> + <string name="gstore_cannot_write_detail">tidak dapat menulis dalam %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Folder tidak tersedia</string> + <string name="gfiles_name_taken">Fail lain sudah menggunakan %1$s</string> + <string name="gfiles_art_unavailable">Folder seni tidak tersedia</string> + <string name="gfiles_unrelated_inventory">Folder mempunyai inventori penyegerakan yang tidak berkaitan</string> + <string name="gfiles_remove_failed">Tidak dapat mengalih keluar %1$s</string> + <string name="gfiles_outside_folder">Fail keluar daripada folder eksport</string> + <string name="cmgr_fex_unnamed">FEX (binaan tanpa nama versi)</string> + <string name="cmgr_no_profile">tiada profile.json dalam %1$s</string> + <string name="cmgr_not_component_package">%1$s bukan pakej komponen Linux (jenis %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s bebas</string> + <string name="mode_storage_auto_short">Automatik</string> + <string name="appupd_catalog_rejected">Katalog kemas kini gagal semakannya (%1$s)</string> + <string name="main_adb_clip_label">Tetapan proses anak DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Dilog masuk · mod luar talian</string> + <string name="setup_signed_in_unnamed">Dilog masuk</string> + <string name="driver_tag_bundled">TERBUNDLE</string> + <string name="driver_tag_downloaded">DIMUAT TURUN</string> + <string name="driver_tag_imported">DIIMPORT</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Paparan sesi</string> + <string name="display_resolution">Resolusi</string> + <string name="display_game_fit">Suaian permainan 16:9</string> + <string name="display_game_fit_hint">Cara permainan 16:9 disuaikan ke paparan ini. Sesi seterusnya.</string> + <string name="display_game_fit_unavailable">Pilih Sepadan skrin atau saiz tersuai lebih nipis daripada 16:9.</string> + <string name="display_preserve">Kekalkan nisbah</string> + <string name="display_stretch">Regang ke paparan</string> + <string name="display_image_scaling">Penskalaan imej</string> + <string name="display_filter">Penapis penskalaan</string> + <string name="display_filter_hint">Dikongsi oleh Steam dan Desktop.</string> + <string name="display_filter_live">Berkuat kuasa secara langsung. Dikongsi oleh Steam dan Desktop.</string> + <string name="display_filter_note">FSR, GSR dan NIS berkuat kuasa semasa membesarkan imej sesi. Ketajaman sahaja juga berfungsi tanpa pembesaran.</string> + <string name="display_sharpness">Ketajaman penapis</string> + <string name="display_frame_rate">Kadar bingkai</string> + <string name="display_look_filter">%1$s Menetapkan penskalaan ke %2$s.</string> + <string name="display_match_screen">Sepadan skrin (%1$d×%2$d)</string> + <string name="display_follow_screen">Ikut skrin (mengubah saiz apabila dilipat atau dibuka)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Papar butiran peranti</string> + <string name="device_info_hide">Sembunyikan butiran peranti</string> + <string name="device_info_loading">Membaca peranti…</string> + <string name="device_info_copy">Salin</string> + <string name="device_info_copy_hint">Salin butiran ini ke dalam laporan pepijat.</string> + <string name="device_info_copied">Disalin.</string> + <string name="force_ssbs_title">Paksa SSBS</string> + <string name="force_ssbs_hint">Mengekalkan tetapan kelajuan CPU yang sentiasa dimatikan oleh Wine. Boleh melajukan permainan Windows pada Snapdragon 8 Elite; sedikit perubahan dilihat pada cip lama. Berkuat kuasa pada pelancaran permainan seterusnya.</string> + + <string name="rail_stores">Kedai</string> + <string name="source_steam">Steam</string> + <string name="source_added">Tersuai</string> + <string name="setup_stores">Kedai</string> + <string name="setup_stores_open_on">Buka kedai pada</string> + <string name="setup_stores_speed">Tahap kelajuan muat turun</string> + <string name="setup_stores_engine">Enjin kedai</string> + <string name="setup_stores_engine_chip_ready">● Enjin sedia</string> + <string name="setup_stores_engine_chip_missing">Tidak dibina</string> + <string name="stores_tier_balanced">Seimbang</string> + <string name="stores_tier_fast">Pantas</string> + <string name="stores_tier_max">Maksimum</string> + <string name="stores_title">Kedai</string> + <string name="stores_settings">Tetapan kedai</string> + <string name="stores_settings_eyebrow">Tetapan</string> + <string name="stores_chip_signed_out">(belum log masuk)</string> + <string name="stores_tab_store">Kedai</string> + <string name="stores_tab_installed">Dipasang</string> + <string name="stores_tab_library">Pustaka</string> + <string name="stores_tab_all">Semua</string> + <string name="stores_tab_downloads">Muat turun</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Log masuk</string> + <string name="stores_signout_named">%1$s · log keluar</string> + <string name="stores_signout_title">Log keluar daripada %1$s?</string> + <string name="stores_signout_note">Permainan yang dipasang kekal. Pustaka diambil semula apabila anda log masuk kembali.</string> + <string name="stores_signout_stay">Kekal log masuk</string> + <string name="stores_signout_go">Log keluar</string> + <string name="stores_search_catalog">Cari katalog %1$s…</string> + <string name="stores_search_installed">Cari permainan dipasang…</string> + <string name="stores_search_library">Cari pustaka anda…</string> + <string name="stores_search_open">Cari</string> + <string name="stores_installed_empty">Tiada apa dipasang</string> + <string name="stores_library_loading">Memuatkan</string> + <string name="stores_nothing_matches">Tiada permainan</string> + <string name="stores_shelves_loading">Memuatkan kedai…</string> + <string name="stores_amazon_no_catalog">Tiada katalog</string> + <string name="stores_shelf_new">Apa yang baharu</string> + <string name="stores_shelf_deals">Tawaran</string> + <string name="stores_shelf_free">Permainan percuma</string> + <string name="stores_shelf_trending">Tular</string> + <string name="stores_shelf_library">Pustaka anda</string> + <string name="stores_play">Main</string> + <string name="stores_install">Pasang</string> + <string name="stores_resume_install">Sambung pemasangan</string> + <string name="stores_dl_interrupted">Terganggu</string> + <string name="stores_install_size">Pasang · %1$s</string> + <string name="stores_get_free">Dapatkan percuma</string> + <string name="stores_view_on">Lihat pada %1$s</string> + <string name="stores_buy_price">Beli · %1$s</string> + <string name="stores_installed_chip">Dipasang</string> + <string name="stores_in_library">Dalam pustaka</string> + <string name="stores_free">Percuma</string> + <string name="stores_resume">Sambung</string> + <string name="stores_refresh">Segar semula</string> + <string name="stores_sort">Isih</string> + <string name="stores_sort_last_played">Baru dimainkan</string> + <string name="stores_sort_recently_installed">Baru dipasang</string> + <string name="stores_sort_title_asc">Tajuk A–Z</string> + <string name="stores_sort_title_desc">Tajuk Z–A</string> + <string name="stores_sort_size_desc">Saiz: terbesar</string> + <string name="stores_sort_size_asc">Saiz: terkecil</string> + <string name="stores_sort_release_date">Tarikh keluaran</string> + <string name="stores_view_list">Paparan senarai</string> + <string name="stores_view_cards">Paparan kad</string> + <string name="stores_show_mature">Papar kandungan matang</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Luar talian</string> + <string name="epic_card_none">Mati</string> + <string name="epic_eos">Log masuk Epic (EOS)</string> + <string name="epic_offline">Lancarkan secara luar talian</string> + <string name="epic_resolve">Selesaikan log masuk Epic</string> + <string name="epic_client_version">Versi %1$s</string> + <string name="epic_client_no_runtime">Pasang runtime Linux dahulu</string> + <string name="epic_client_checking">Menyemak versi terkini…</string> + <string name="epic_client_unpacking">Menyahpak…</string> + <string name="epic_client_unreachable">Pelayan muat turun tidak memberi respons</string> + <string name="epic_client_needs_fex">Epic Games Launcher memerlukan FEX, yang dimuat turun oleh Steam. Buka semula pelancar selepas Steam bermula.</string> + <string name="epic_client_download_failed">Muat turun gagal: %1$s</string> + <string name="epic_client_unpack_failed">Tidak dapat menyahpak pelancar: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher tidak menerima log masuk itu. Mulakan semula daripada pelancar.</string> + <string name="epic_client_uninstall_body">Membuang pelancar dan mengosongkan ruangnya. Permainan Epic anda kekal dipasang dan berfungsi, dan log masuk disimpan untuk apabila anda memasangnya semula.</string> + <string name="epic_client_uninstall_stops">Sesi yang sedang berjalan ditutup dahulu.</string> + <string name="epic_client_uninstalled">Epic Games Launcher dinyahpasang</string> + <string name="epic_client_uninstall_failed">Sesetengah fail pelancar tidak dapat dibuang. Cuba lagi.</string> + <string name="epic_client_uninstalling">Tunggu sehingga Epic Games Launcher selesai dinyahpasang</string> + <string name="store_cloud_saves">Simpanan awan</string> + <string name="cloud_upload">Muat naik ke awan</string> + <string name="cloud_download">Muat turun daripada awan</string> + <string name="cloud_none">Tiada simpanan awan</string> + <string name="cloud_conflict">Konflik awan</string> + <string name="cloud_conflict_files">Konflik awan · %1$d fail</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Kekalkan awan</string> + <string name="cloud_keep_local">Kekalkan tempatan</string> + <string name="cloud_checking">Menyemak awan…</string> + <string name="cloud_last_sync">Segerak terakhir %1$s</string> + <string name="cloud_never">Belum disegerakkan</string> + <string name="cloud_done">%1$d fail</string> + <string name="stores_eyebrow_installed">dipasang</string> + <string name="stores_eyebrow_library">dalam pustaka anda</string> + <string name="stores_eyebrow_store">kedai</string> + <string name="achievements_title">Pencapaian</string> + <string name="achievements_count">%1$d daripada %2$d dibuka kunci</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Dibuka kunci · %1$d</string> + <string name="achievements_group_locked">Berkunci · %1$d</string> + <string name="achievements_group_hidden">Tersembunyi · %1$d</string> + <string name="achievements_hidden">Pencapaian tersembunyi</string> + <string name="achievements_hidden_detail">Butiran dipaparkan sebaik ia dibuka kunci.</string> + <string name="achievements_all">Semua pencapaian dibuka kunci</string> + <string name="achievements_reading">Memuatkan…</string> + <string name="achievements_signed_out">Log masuk ke %1$s untuk melihat pencapaian anda.</string> + <string name="achievements_unreachable">Tidak dapat menghubungi %1$s. Semak semula sebaik anda dalam talian.</string> + <string name="achievements_none">%1$s tidak menyenaraikan pencapaian untuk permainan ini.</string> + <string name="achievements_show_all">Papar semua %1$d</string> + <string name="achievements_dialog_title">Pencapaian · %1$s</string> + <string name="stores_in_steam">✓ Dalam Steam</string> + <string name="stores_uninstall">Nyahpasang</string> + <string name="stores_uninstalling">Menyahpasang…</string> + <string name="stores_uninstall_title">Nyahpasang %1$s?</string> + <string name="stores_uninstall_body_size">Membebaskan %1$s dan mengalih keluarkannya daripada Steam.</string> + <string name="stores_uninstall_body">Mengalih keluar failnya dan pintasan Steamnya.</string> + <string name="stores_launch_not_registered">Steam akan mengambilnya pada kali seterusnya ia dimulakan; lancarkan dari sana, atau mulakan Steam sekarang.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Pilihan Steam mengikut permainan</string> + <string name="stores_card_audio">Audio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Komponen</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Enjin</string> + <string name="stores_card_engine_value">%1$s · asli</string> + <string name="stores_card_engine_java">%1$s · terbina dalam</string> + <string name="stores_how_it_runs">Cara ia berjalan</string> + <string name="stores_kv_fetched">Diambil daripada</string> + <string name="stores_kv_fetched_value">%1$s, dengan akaun anda</string> + <string name="stores_kv_installed_to">Dipasang ke</string> + <string name="stores_kv_installed_to_value">Storan permainan (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Dilancarkan oleh</string> + <string name="stores_kv_launched_by_value">Steam dan Proton, laluan yang sama seperti permainan Steam</string> + <string name="stores_kv_launched_by_epic">Steam dan Proton · Log masuk Epic setiap pelancaran, overlay EOS mati</string> + <string name="stores_kv_launched_by_amazon">Steam dan Proton · Pemboleh ubah Amazon Games Services ditetapkan</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">ditambah ke Steam semasa pemasangan (UI Deck + Steam Input)</string> + <string name="stores_downloads_empty">Tiada muat turun</string> + <string name="stores_dl_paused">Dijeda</string> + <string name="stores_dl_queued">Dalam baris gilir</string> + <string name="stores_dl_queued_at">Dalam baris gilir · #%1$d</string> + <string name="stores_dl_cancelled">Dibatalkan</string> + <string name="stores_dl_failed">Gagal</string> + <string name="stores_dl_failed_reason">Gagal · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Jeda</string> + <string name="stores_dl_resume">Sambung</string> + <string name="stores_dl_cancel">Batal</string> + <string name="stores_dl_retry">Cuba lagi</string> + <string name="stores_dl_clear">Kosongkan</string> + <string name="stores_dl_clear_all">Kosongkan yang selesai</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Muat turun</string> + <string name="stores_stage_verify">Sahkan</string> + <string name="stores_stage_install">Pasang</string> + <string name="stores_stage_done">Selesai</string> + <string name="stores_stage_checking">Menyemak</string> + <string name="stores_stage_downloading">Memuat turun</string> + <string name="stores_dl_cancel_confirm">Padam muat turun?</string> + <string name="stores_dl_failed_kept">Gagal · %1$s dikekalkan</string> + <string name="stores_stage_verifying">Mengesahkan</string> + <string name="stores_stage_installing">Memasang</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d fail</string> + <string name="stores_download_manager">Pengurus muat turun</string> + <string name="stores_parallel">Muat turun pada satu masa</string> + <string name="stores_install_where">Pasang ke</string> + <string name="stores_install_title">Pasang %1$s:</string> + <string name="stores_target_internal">Dalaman</string> + <string name="stores_target_free">%1$s bebas</string> + <string name="stores_target_free_unknown">Ruang kosong tidak diketahui</string> + <string name="stores_storage_insufficient">Ruang kosong tidak cukup: perlu %1$s, hanya %2$s tersedia</string> + <string name="stores_storage_low">Ruang semakin sedikit (%1$s kosong, perlu %2$s)</string> + <string name="stores_notification_channel">Muat turun kedai</string> + <string name="stores_notification_channel_hint">Memaparkan kemajuan muat turun permainan dan mengekalkan muat turun berjalan di latar belakang</string> + <string name="stores_notification_one">Memuat turun</string> + <string name="stores_notification_many">%1$d muat turun</string> + <string name="stores_notification_waiting">Menyediakan…</string> + <string name="stores_notification_done_channel">Muat turun kedai selesai</string> + <string name="stores_notification_installed">%1$s dipasang</string> + <string name="stores_notification_failed">Muat turun %1$s gagal</string> + <string name="stores_notification_delete">Padam</string> + <string name="stores_notification_keep">Kekalkan</string> + <string name="stores_login_title">Log masuk ke %1$s</string> + <string name="stores_login_provider_title">Log masuk dengan penyedia anda</string> + <string name="stores_login_reload">Muat semula</string> + <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_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> + <string name="stores_login_error_ssl">Sambungan ke halaman log masuk tidak selamat.</string> + <string name="stores_login_error_verification">Log masuk tidak dapat disahkan. Cuba lagi.</string> + <string name="stores_login_error_generic">Log masuk gagal. Cuba lagi.</string> + <string name="common_close">Tutup</string> + <string name="common_back">Kembali</string> + <string name="common_edit">Sunting</string> + <string name="games_add_all">Tambah semua permainan dalam folder ini</string> + <string name="games_added_none">Tiada yang baharu dalam folder ini</string> + <string name="edit_name">Nama</string> + <string name="edit_target">Sasaran</string> + <string name="edit_start_in">Mula dalam</string> + <string name="edit_launch_options">Pilihan pelancaran</string> + <string name="edit_artwork">Seni</string> + <string name="edit_other_exe">Exe lain…</string> + <string name="edit_remove">Alih keluar</string> + <string name="art_cover">Kulit</string> + <string name="art_wide_cover">Kulit lebar</string> + <string name="art_adjust_logo">Laras logo</string> + <string name="logo_pos_default">Lalai</string> + <string name="logo_pos_upper_left">Kiri atas</string> + <string name="logo_pos_upper_center">Tengah atas</string> + <string name="logo_pos_center">Tengah</string> + <string name="logo_pos_bottom_left">Kiri bawah</string> + <string name="logo_pos_bottom_center">Tengah bawah</string> + <string name="logo_pos_position">Kedudukan</string> + <string name="logo_pos_size">Saiz</string> + <string name="logo_pos_save">Simpan</string> + <string name="logo_pos_reset">Kembali kepada lalai</string> + <string name="logo_pos_hint">Dilukis di atas latar belakang permainan, seperti yang dibuat oleh Steam. Kedudukan tepatnya mungkin berbeza beberapa piksel.</string> + <string name="logo_pos_no_logo">Permainan ini belum ada logo. Pilih satu di Logo untuk melihatnya di sini.</string> + <string name="logo_pos_failed">Kedudukan logo tidak dapat disimpan. Cuba lagi.</string> + <string name="art_background">Latar belakang</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Ikon</string> + <string name="art_src_folder">Folder permainan</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Fail anda</string> + <string name="art_src_exe">Daripada exe</string> + <string name="art_src_auto">Automatik</string> + <string name="art_pick_image">Pilih imej…</string> + <string name="art_pick_title">Pilih imej: %1$s</string> + <string name="art_reset">Tetapkan semula ke automatik</string> + <string name="art_search_sgdb">Cari di SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Cari permainan</string> + <string name="art_sgdb_other_games">Hasil lain</string> + <string name="art_sgdb_none">Tiada hasil.</string> + <string name="art_sgdb_no_key">SteamGridDB memerlukan kunci API. Tambah milik anda di Tetapan › Pelancar.</string> + <string name="art_sgdb_bad_key">SteamGridDB menolak kunci API. Semak di Tetapan › Pelancar.</string> + <string name="art_sgdb_limit">SteamGridDB sedang mengehadkan permintaan. Cuba sebentar lagi.</string> + <string name="art_sgdb_offline">SteamGridDB tidak dapat dihubungi. Semak sambungan.</string> + <string name="art_sgdb_server">Ada masalah di SteamGridDB. Cuba kemudian.</string> + <string name="art_sgdb_no_game">SteamGridDB tiada hasil untuk permainan ini. Cuba cari sendiri.</string> + <plurals name="games_added_n"> + <item quantity="other">%1$d permainan ditambah</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="other">%1$d sudah berada dalam Permainan</item> + </plurals> + <string name="hop_back">B · Kembali ke %1$s</string> + <string name="hop_from_games">permainan itu</string> + <string name="hop_from_play">Tetapan Main</string> + <string name="sheet_graphics_drivers">Pemacu grafik</string> + <string name="comp_this_proton">Proton ini</string> + <string name="comp_every_proton">Setiap Proton</string> + <string name="comp_for_every_proton">Untuk setiap Proton</string> + <string name="comp_available_count">Tersedia · %1$d</string> + <string name="comp_checked">Disemak %1$s</string> + <string name="comp_check_all">Semak komponen dan pemacu baharu</string> + <string name="comp_get">Dapatkan</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton dan FEX di bawah adalah milik Proton ini</string> + <string name="comp_device_tested">%1$s · diuji</string> + <string name="comp_device_untested">%1$s · belum diuji</string> + <string name="comp_device_unsupported">%1$s · tidak disokong</string> + <string name="gpu_auto_keeps">Mengekalkan pasangan disyorkan terkini</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Pemacu masa jalan dan paparan secara berasingan</string> + <string name="gpu_use_title">Gunakan %1$s?</string> + <string name="gpu_mode_title">Cara pemacu dipilih</string> + <string name="gpu_mode_auto_detail">Pasangan terbaik untuk GPU ini, sentiasa dikemas kini</string> + <string name="gpu_mode_pair">Pasangan tetap</string> + <string name="gpu_mode_pair_detail">Pilih pasangan; menetapkan kedua-dua pemacu sekali</string> + <string name="gpu_mode_mix">Campur bebas</string> + <string name="gpu_mode_mix_detail">Pilih paparan dan runtime secara berasingan</string> + <string name="gpu_mode_pair_short">Pasangan</string> + <string name="gpu_mode_mix_short">Campur</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PASANGAN</string> + <string name="gpu_src_bundle">BUNDEL</string> + <string name="gpu_src_chosen">DIPILIH</string> + <string name="gpu_src_by_gpu">MENGIKUT GPU</string> + <string name="gpu_src_default">LALAI</string> + <string name="gpu_display_live">Sedang melukis</string> + <string name="gpu_display_pending">Perlu mula semula · sehingga itu %1$s yang melukis</string> + <string name="gpu_runtime_live">Aktif</string> + <string name="gpu_runtime_pending">Sesi seterusnya · sesi ini menggunakan %1$s</string> + <string name="gpu_display_next">Melukis skrin. Berkuat kuasa mulai sesi seterusnya.</string> + <string name="gpu_previous_driver">pemacu sebelum ini</string> + <string name="gpu_restart_banner">Mula semula untuk menukar pemacu paparan.</string> + <string name="gpu_restart_blocked">Hentikan sesi semasa dan mula semula DroidDeck untuk menukar pemacu paparan.</string> + <string name="gpu_restart_now">Mula semula sekarang</string> + <string name="gpu_restart_later">Kemudian</string> + <string name="gpu_auto_title">Automatik memilih pasangan ini untuk %1$s anda</string> + <string name="gpu_auto_builtin_title">Automatik menggunakan pemacu terbina dalam untuk %1$s anda</string> + <string name="gpu_auto_reason">Dipilih untuk keluarga %1$s. Versi baharu dipasang di latar belakang.</string> + <string name="gpu_pair_title">Pilih pasangan</string> + <string name="gpu_pair_hint">Pasangan menetapkan pemacu paparan dan pemacu runtime serentak.</string> + <string name="gpu_mix_title">Pilih setiap pemacu</string> + <string name="gpu_mix_hint">Bundel mengisi kedua-duanya. Perubahan paparan berkuat kuasa selepas mula semula, perubahan runtime mulai sesi seterusnya.</string> + <string name="gpu_change_display">Tukar pemacu paparan</string> + <string name="gpu_change_runtime">Tukar pemacu runtime</string> + <string name="gpu_autos_pick">PILIHAN AUTOMATIK</string> + <string name="gpu_installed">Dipasang</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · mula semula untuk menggunakan</string> + <string name="gpu_chip_restart">%1$s · perlu mula semula</string> + <string name="comp_this_device">Peranti ini</string> + <string name="proton_remove_title">Alih keluar %1$s?</string> + <string name="setup_tab_diagnostics">Diagnostik</string> + <string name="setup_ready">Sedia untuk bermain</string> + <string name="setup_not_ready">Belum sedia untuk bermain</string> + <string name="setup_ready_runtime">masa jalan %1$s</string> + <string name="setup_ready_limit_off">had proses dimatikan</string> + <string name="setup_ready_signed_in">dilog masuk sebagai %1$s</string> + <string name="setup_needs_you">Apabila sesuatu memerlukan anda</string> + <string name="setup_group_look">Rupa</string> + <string name="setup_group_device">Peranti ini</string> + <string name="setup_group_art">Seni pustaka</string> + <string name="setup_group_download">Muat turun</string> + <string name="setup_download_source">Sumber</string> + <string name="setup_download_source_auto">Automatik</string> + <string name="setup_download_source_direct">Terus</string> + <string name="setup_download_source_mirror">Cermin</string> + <string name="setup_download_source_custom">Awalan sendiri</string> + <string name="setup_download_mirror">Laman</string> + <string name="setup_download_prefix">Awalan</string> + <string name="flathub_eyebrow">APL LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Apl desktop untuk desktop Linux, dibuka daripada Desktop.</string> + <string name="flathub_setup">Sediakan Flathub</string> + <string name="flathub_remove_title">Alih keluar %1$s?</string> + <string name="flathub_remove_note">Tetapan dan failnya dikekalkan.</string> + <string name="flathub_keep">Kekalkan</string> + <string name="desktop_size">Saiz pada cakera</string> + <string name="desktop_uninstall_title">Nyahpasang desktop?</string> + <string name="desktop_all_systems">Semua</string> + <string name="gog_achievements">Pencapaian GOG</string> + <string name="gog_achievements_hint">Menyegerakkan pencapaian untuk permainan GOG yang disokong. Terpakai pada pelancaran seterusnya.</string> + <string name="gog_achievements_off">Pencapaian dimatikan</string> + <string name="gog_achievements_on">Pencapaian dihidupkan</string> + <string name="gog_achievements_signin">Log masuk semula ke GOG</string> + <string name="gog_achievements_uploaded">Pencapaian dimuat naik</string> + <string name="gog_achievements_pending">Muat naik pencapaian belum selesai</string> + <string name="gog_achievements_enable_store">Hidupkan pencapaian GOG dalam tetapan Stores</string> + <string name="gog_achievements_unavailable">Pencapaian tidak tersedia; semak log sesi</string> + <string name="achievement_unlocked">Pencapaian dibuka kunci</string> + <string name="touch_paste">Tampal</string> + <string name="touch_dpad">Pad arah</string> + <string name="touch_left_stick">Kayu bedik kiri</string> + <string name="touch_right_stick">Kayu bedik kanan</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Papan kekunci</string> + <string name="touch_dpad_up">Pad arah atas</string> + <string name="touch_dpad_down">Pad arah bawah</string> + <string name="touch_dpad_left">Pad arah kiri</string> + <string name="touch_dpad_right">Pad arah kanan</string> + <string name="touch_title">Kawalan sentuh</string> + <string name="touch_controller">Pengawal sentuh</string> + <string name="touch_mouse">Tetikus</string> + <string name="touch_on">Hidup</string> + <string name="touch_off">Mati</string> + <string name="touch_speed_slow">Perlahan</string> + <string name="touch_speed_normal">Biasa</string> + <string name="touch_speed_fast">Pantas</string> + <string name="touch_edit_layout">Edit susun atur</string> + <string name="touch_droiddeck_menu">Menu DroidDeck</string> + <string name="touch_drag_hint">Seret kawalan ke skrin</string> + <string name="touch_arrange">Susun</string> + <string name="touch_discard">Buang</string> + <string name="touch_saving">Menyimpan…</string> + <string name="touch_icon">Ikon</string> + <string name="touch_narrower">L−</string> + <string name="touch_wider">L+</string> + <string name="touch_shorter">T−</string> + <string name="touch_taller">T+</string> + <string name="touch_hide">Sembunyikan</string> + <string name="touch_color_opacity">Warna dan kelegapan…</string> + <string name="touch_copy_layout">Salin susun atur ini</string> + <string name="touch_layout_copied">Susun atur disalin; tampalkannya pada susun atur sentuh mana-mana permainan</string> + <string name="touch_paste_layout">Tampal susun atur yang disalin</string> + <string name="touch_reset_layout">Tetapkan semula kepada lalai Steam</string> + <string name="touch_no_binding">Kawalan ini tidak mempunyai pengikatan dalam Steam untuk diberikan ikon</string> + <string name="touch_icon_for">Ikon untuk %1$s</string> + <string name="touch_layout_color">Warna susun atur sentuh</string> + <string name="touch_done">Selesai</string> + <string name="touch_save_failed">Susun atur sentuh tidak dapat disimpan</string> + <string name="touch_saved">Susun atur sentuh disimpan ke Steam</string> + <string name="touch_app_id">Apl %1$d</string> + <string name="touch_label_hint">Label (pilihan)</string> + <string name="touch_icons_missing">Ikon Steam tidak dijumpai</string> + <plurals name="touch_icons_found"> + <item quantity="other">%1$d ikon daripada Steam</item> + </plurals> + <string name="touch_icon_color">Warna ikon</string> + <string name="touch_button_color">Warna butang</string> + <string name="touch_no_icon">Tiada ikon</string> + + <string name="stores_sync_sign_in">Menyemak log masuk…</string> + <string name="stores_sync_library">Mengambil pustaka anda…</string> + <string name="stores_sync_game_list">Mengambil senarai permainan…</string> + <string name="stores_sync_details">Memuatkan butiran permainan… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="other">Menyegerakkan %1$d permainan…</item> + </plurals> + <string name="stores_sync_progress">Menyegerakkan… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Mengambil kulit permainan…</string> + <string name="stores_sync_failed">Penyegerakan gagal</string> + <string name="stores_sync_no_games">Tiada permainan dijumpai dalam pustaka %1$s anda</string> + <string name="stores_sync_amazon_no_answer">Amazon Games tidak memberi respons untuk pustaka anda: muat semula, atau log masuk semula</string> + <string name="stores_sync_gog_unreachable">Tidak dapat menyambung ke GOG</string> + <string name="stores_sync_gog_unreadable">Pustaka GOG anda tidak dapat dibaca</string> + <string name="stores_registering">Mendaftar dengan Steam…</string> + <string name="mode_client_arch">Klien Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnostik VAC</string> + <string name="setup_vac_diag_hint">Permainan Source merekodkan konsolnya (-condebug); vac.txt dalam log sesi menunjukkan selamat atau tidak</string> + <string name="load_starting_steam_x64">Memulakan Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Digunakan oleh klien Steam x86-64</string> + <string name="storage_uninstall_in_x64">Salinan ini berada dalam klien Steam x86-64. Pilih x86-64 di bawah Klien Steam, kemudian nyahpasangnya di sini.</string> + <string name="storage_uninstall_in_arm64">Salinan ini berada dalam klien Steam ARM64. Pilih ARM64 di bawah Klien Steam, kemudian nyahpasangnya di sini.</string> + <string name="drawer_page_glasses">Cermin mata</string> + <string name="glasses_open">Cermin mata VITURE</string> + <string name="glasses_control">Kawalan cermin mata</string> + <string name="glasses_driver_missing">Binaan ini tidak menyertakan pemacu untuk cermin mata ini.</string> + <string name="glasses_connection_failed">Tidak dapat menyambung ke cermin mata. Sambungkan semula kabel atau ketik Benarkan untuk mencuba lagi.</string> + <string name="glasses_allow">Benarkan</string> + <string name="glasses_allow_hint">Benarkan DroidDeck menetapkan kadar penyegaran, mod 3D, kecerahan, kelantangan dan peredup kanta cermin mata, serta membaca penjejakan kepalanya.</string> + <string name="glasses_asking">Menunggu anda membenarkannya dalam dialog Android…</string> + <string name="glasses_denied">Kawalan ditolak. Benarkannya untuk menukar tetapan cermin mata.</string> + <string name="glasses_no_control">Cermin mata ini memaparkan permainan, tetapi tetapannya tidak boleh ditukar dari sini.</string> + <string name="glasses_output">Output</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Permainan pada cermin mata</string> + <string name="glasses_game_on_hint">Paparkan permainan pada cermin mata sahaja. Mati: telefon memaparkannya dan Android mencerminkan skrin telefon.</string> + <string name="glasses_display">Paparan</string> + <string name="glasses_refresh">Kadar penyegaran</string> + <string name="glasses_3d">3D (sebelah-menyebelah)</string> + <string name="glasses_3d_hint">Tukar cermin mata pintar kepada 3D bersebelahan. Penjejakan kepala dikawal secara berasingan.</string> + <string name="glasses_3d_failed">Isyarat 3D tidak dapat disahkan. Cuba lagi selepas gambar 2D kembali.</string> + <string name="glasses_no_signal">Tiada gambar: cermin mata dalam mod yang tidak dapat dihantar oleh telefon ini. Tahan butang 2D/3D-nya, atau cabut dan pasang semula.</string> + <string name="glasses_3d_refresh">Kadar penyegaran 3D</string> + <string name="glasses_auto3d">3D untuk permainan VR</string> + <string name="glasses_auto3d_hint">Bertukar kepada 3D semasa SteamVR berjalan, dan kembali selepas itu.</string> + <string name="glasses_picture">Gambar</string> + <string name="glasses_picture_hint">Automatik memaparkan kandungan rata di kedua-dua mata dan mengesan SteamVR. Pilih permainan Side-by-side untuk kandungan SBS.</string> + <string name="glasses_picture_auto">Automatik</string> + <string name="glasses_picture_screen">Skrin maya</string> + <string name="glasses_picture_sbs">Permainan 3D sebelah-menyebelah</string> + <string name="glasses_screen_size">Lebar skrin</string> + <string name="glasses_screen_distance">Jarak skrin</string> + <string name="glasses_screen_next_session">Lebar dan jarak digunakan apabila permainan berjalan pada cermin mata sebagai skrin maya.</string> + <string name="glasses_screen_no_output">Tetapan ini digunakan semasa Permainan pada cermin mata didayakan dan permainan dipaparkan di sana.</string> + <string name="glasses_screen_flat_hint">Automatik mengekalkan permainan 2D ini dalam skrin penuh. Gunakan skrin maya untuk melaraskan lebar, jarak dan penjejakan kepalanya.</string> + <string name="glasses_screen_use">Gunakan skrin maya</string> + <string name="glasses_screen_direct_hint">SteamVR memenuhi paparan. Laraskan medan pandangannya dalam VR; lebar dan jarak hanya terpakai pada skrin maya.</string> + <string name="glasses_screen_sbs_hint">Permainan sebelah-menyebelah memenuhi setiap mata. Lebar dan jarak hanya digunakan untuk skrin maya.</string> + <string name="glasses_tracking_flat_hint">Automatik mengekalkan permainan 2D ini tetap dalam pandangan. Pilih Skrin maya dalam Paparan untuk menggunakan penjejakan kepala.</string> + <string name="glasses_tracking_sbs_hint">Penjejakan kepala digunakan untuk skrin maya atau permainan SteamVR yang sedang berjalan.</string> + <string name="glasses_hardware">Peranti</string> + <string name="glasses_brightness">Kecerahan</string> + <string name="glasses_volume">Kelantangan</string> + <string name="glasses_sunblock">Peredup kanta</string> + <string name="glasses_sunblock_hint">Menggelapkan kanta hadapan.</string> + <string name="glasses_tracking">Penjejakan</string> + <string name="glasses_head_tracking">Penjejakan kepala</string> + <string name="glasses_head_tracking_hint">Penderia cermin mata itu sendiri memutarkan skrin maya dan SteamVR mengikut kepala anda.</string> + <string name="glasses_recenter">Pusatkan semula paparan</string> + <string name="glasses_recenter_button">Pusatkan semula skrin</string> + <string name="glasses_vr_fov">Medan pandangan SteamVR</string> + <string name="glasses_vr_fov_hint">Lebih rendah mendekatkan SteamVR dan memenuhi cermin mata; lebih tinggi menunjukkan lebih banyak di sekeliling anda.</string> + <string name="glasses_playing">Bermain pada %1$s</string> + <string name="glasses_calibration">Penentukuran penjejakan</string> + <string name="glasses_calibration_hint">Mengurangkan hanyutan dan menjajarkan rujukan mendatar.</string> + <string name="glasses_calibration_saved_hint">Penentukuran yang disimpan digunakan pada cermin mata ini.</string> + <string name="glasses_calibration_open">Tentukur</string> + <string name="glasses_calibration_instructions">Letakkan cermin mata yang disambungkan secara terbalik di atas permukaan rata, dengan bingkainya terletak sekata. Ketik Mula, kemudian jangan sentuh selama kira-kira 8 saat. Pergerakan akan memulakan semula pengukuran. Ini melaraskan hanyutan dan kecondongan, bukan arah haluan.</string> + <string name="glasses_calibration_settling">Biarkan cermin mata terbalik dan jangan sentuh. Menunggu ia stabil…</string> + <string name="glasses_calibration_collecting">Mengukur penderia. Pastikan cermin mata tidak bergerak.</string> + <string name="glasses_calibration_moving">Pergerakan dikesan. Jangan sentuh cermin mata; pengukuran akan bermula semula secara automatik.</string> + <string name="glasses_calibration_turn_over">Letakkan cermin mata secara terbalik di atas permukaan rata. Pengukuran akan bermula apabila ia diletakkan dengan betul.</string> + <string name="glasses_calibration_complete">Penentukuran disimpan. Pakai cermin mata dan pandang lurus ke hadapan, kemudian ketik Selesai untuk memusatkan semula.</string> + <string name="glasses_calibration_failed">Penentukuran tidak dapat diselesaikan. Semak sambungan dan pastikan cermin mata tidak bergerak, kemudian cuba lagi. Penentukuran anda sebelum ini tidak berubah.</string> + <string name="glasses_calibration_start">Mula</string> + <string name="glasses_calibration_done">Selesai</string> + <string name="glasses_calibration_reset">Tetapkan semula penentukuran penjejakan</string> + <string name="glasses_calibration_reset_hint">Alih keluar penentukuran yang disimpan dan pulihkan tetapan lalai model? Pusatkan semula selepas memakai cermin mata semula.</string> + <string name="glasses_calibration_reset_button">Tetapkan semula</string> + <string name="hand_camera_group">Penjejakan tangan</string> + <string name="hand_camera_prompt_title">Jejaki tangan atau pengawal Joy-Con dengan kamera telefon?</string> + <string name="hand_camera_prompt_body">Tanpa pengawal yang disambungkan, kamera telefon menjejaki tangan kosong anda dalam VR: picit ibu jari dan jari telunjuk anda untuk mengklik, tutup tangan anda untuk memegang, dan pusingkan tapak tangan anda ke arah anda dan picit untuk membuka menu. Dengan pengawal Joy-Con yang dipasangkan, kamera menjejaki kedudukannya sementara pengawal Joy-Con menyediakan input putaran dan butang. Gambar diproses pada peranti ini dan tidak pernah disimpan atau dihantar.</string> + <string name="hand_camera_rear">Kamera belakang</string> + <string name="hand_camera_rear_hint">Disyorkan. Biasanya lebih jelas dan lebih luas.</string> + <string name="hand_camera_front">Kamera depan</string> + <string name="hand_camera_front_hint">Untuk apabila bahagian belakang peranti tidak boleh menghadap anda.</string> + <string name="hand_camera_allow">Gunakan kamera</string> + <string name="hand_camera_not_now">Bukan sekarang</string> + <string name="hand_camera_setting">Penjejakan tangan dengan kamera</string> + <string name="hand_camera_setting_hint">Gunakan kamera telefon untuk gerak isyarat tangan kosong atau untuk meletakkan pengawal Joy-Con yang dipasangkan dalam VR. Pengawal Joy-Con menyediakan input putaran dan butang. Berhenti seketika semasa cermin mata pintar menjejaki tangan anda atau pengawal Joy-Con. Imej diproses hanya pada peranti ini.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Akses kamera</string> + <string name="hand_camera_access_hint">Benarkan akses kamera supaya penjejakan tangan boleh bermula.</string> + <string name="hand_camera_access_denied">Akses kamera dimatikan. Hidupkannya dalam tetapan Android.</string> + <string name="hand_camera_allow_button">Benarkan</string> + <string name="hand_camera_open_settings">Buka tetapan</string> + <string name="hand_camera_placement">Kedudukan kamera</string> + <string name="hand_camera_placement_hint">Pastikan kamera boleh melihat anda sebelum bermain.</string> + <string name="hand_camera_check">Semak</string> + <string name="hand_camera_check_title">Kedudukan kamera</string> + <string name="hand_camera_how_rear">Dirikan peranti sejauh 1.5 hingga 2 meter kira-kira pada paras dada, dengan kamera belakang menghadap anda. Kemudian masuk ke pandangan dengan tangan terhulur.</string> + <string name="hand_camera_how_front">Dirikan peranti sejauh 1.5 hingga 2 meter kira-kira pada paras dada, dengan skrin menghadap anda. Kemudian masuk ke pandangan dengan tangan terhulur.</string> + <string name="hand_camera_starting">Memulakan kamera…</string> + <string name="hand_camera_stand_up">Peranti terbaring rata. Dirikannya supaya kamera menghadap anda.</string> + <string name="hand_camera_upright">Dirikan peranti dengan lebih tegak supaya kamera menghadap anda.</string> + <string name="hand_camera_not_seen">Belum dapat melihat anda. Masuk ke pandangan supaya kepala dan bahu anda kelihatan.</string> + <string name="hand_camera_move_back">Undur sedikit.</string> + <string name="hand_camera_move_closer">Dekatkan sedikit lagi.</string> + <string name="hand_camera_show_hands">Hulurkan kedua-dua tangan di tempat yang boleh dilihat oleh kamera.</string> + <string name="hand_camera_good">Kelihatan baik.</string> + <string name="hand_camera_failed">Kamera tidak dapat dimulakan. Tutup aplikasi lain yang menggunakannya dan cuba lagi.</string> + <string name="hand_camera_switch">Tukar kamera</string> + <string name="hand_camera_skip">Langkau</string> + <string name="hand_camera_done">Selesai</string> + <string name="glasses_xreal_network_missing">Menunggu sambungan USB Ethernet cermin mata. Telefon ini mungkin tidak mendedahkannya kepada apl.</string> + <string name="glasses_xreal_connection_failed">Sambungan XREAL terganggu atau memberikan respons yang tidak disokong. Mencuba semula…</string> + <string name="glasses_xreal_experimental">Sokongan eksperimen untuk 1S. Gunakan mod Follow dan matikan penstabilan dalam menu cermin mata. Arah penjejakan dan mod paparan masih perlu diuji pada peranti.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Mod Cardboard</string> + <string name="cardboard_mode_hint">Paparan mata kiri dan kanan untuk kaca mata VR telefon.</string> + <string name="cardboard_source">Gambar</string> + <string name="cardboard_source_screen">Skrin maya</string> + <string name="cardboard_source_sbs">3D sebelah-menyebelah</string> + <string name="cardboard_viewer">Kaca mata</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Tiada kanta</string> + <string name="cardboard_ipd">Jarak mata</string> + <string name="cardboard_screen_width">Lebar skrin</string> + <string name="cardboard_screen_distance">Jarak skrin</string> + <string name="cardboard_head_tracking">Penjejakan kepala</string> + <string name="cardboard_no_sensor">Peranti ini tiada penderia putaran.</string> + <string name="cardboard_recenter">Pusatkan semula paparan</string> + <string name="cardboard_recenter_button">Pusatkan semula</string> + <string name="cardboard_steamvr">SteamVR (eksperimen)</string> + <string name="cardboard_steamvr_install">Pasang</string> + <string name="cardboard_steamvr_installing">Memuat turun dan menyahmampat SteamVR…</string> + <string name="cardboard_steamvr_start">Mula</string> + <string name="cardboard_steamvr_stop">Henti</string> + <string name="cardboard_steamvr_unavailable">Tidak tersedia dalam sesi ini.</string> + <string name="cardboard_steamvr_failed">SteamVR tidak memberi respons; semak log sesi.</string> + <string name="drawer_component_downloads">Muat turun komponen</string> + <string name="drawer_component_downloads_hint">Muat turun dikongsi dengan halaman Komponen. Pilih versi yang telah dimuat turun di atas untuk menggunakannya pada pelancaran permainan seterusnya.</string> + <string name="drawer_component_choose_download">Pilih versi untuk dimuat turun</string> + <string name="stores_fact_developer">Pembangun</string> + <string name="stores_fact_publisher">Penerbit</string> + <string name="stores_fact_released">Dikeluarkan</string> + <string name="stores_hltb_main">Utama</string> + <string name="stores_hltb_extras">+ Tambahan</string> + <string name="stores_hltb_completionist">Lengkap</string> + <string name="stores_hltb_hours">%1$s j</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="display_picture_position">Kedudukan gambar</string> + <string name="display_position_top">Atas</string> + <string name="display_position_bottom">Bawah</string> + <string name="display_position_center">Tengah (lalai)</string> + <string name="setup_tab_storage">Storan</string> + <string name="storage_measuring">Mengukur storan…</string> + <string name="storage_measuring_hint">Mengambil beberapa saat pada kali pertama.</string> + <string name="storage_internal">Storan dalaman</string> + <string name="storage_used_of">%1$s daripada %2$s digunakan</string> + <string name="storage_free">%1$s kosong</string> + <string name="storage_droiddeck_uses">DroidDeck menggunakan %1$s. Diukur pada %2$s.</string> + <string name="storage_rescanning">mengimbas semula…</string> + <string name="storage_other_apps">Aplikasi Android lain</string> + <string name="storage_safe_now">Boleh dikosongkan sekarang</string> + <string name="storage_safe_hint">Runtime tidak digunakan, sisa, log lama</string> + <string name="storage_clean_up">Membersihkan…</string> + <string name="storage_session_running">Hentikan sesi untuk membersihkan atau memadam apa-apa. Saiz kekal kelihatan.</string> + <string name="storage_where">Ke mana perginya</string> + <string name="storage_games">Permainan Steam</string> + <string name="storage_game_data">Data permainan</string> + <string name="storage_game_data_hint">Awalan %1$s · workshop %2$s · shader %3$s</string> + <string name="storage_tools">Proton dan runtime</string> + <string name="storage_tools_unused">%1$s tidak digunakan</string> + <string name="storage_stores">GOG, Epic dan kedai lain</string> + <string name="storage_stores_hint">Alih keluar di Kedai</string> + <string name="storage_desktop">Aplikasi desktop</string> + <string name="storage_desktop_hint">Aplikasi dan runtime Flatpak</string> + <string name="storage_system">Sistem Linux dan klien Steam</string> + <string name="storage_system_hint">Diperlukan untuk apa-apa berjalan</string> + <string name="storage_app_data">Data DroidDeck</string> + <string name="storage_app_data_hint">Log sesi lama %1$s · cache · pemacu</string> + <string name="storage_legend_games">Permainan</string> + <string name="storage_legend_data">Data permainan</string> + <string name="storage_legend_tools">Proton dan runtime</string> + <string name="storage_legend_stores">Kedai lain</string> + <string name="storage_legend_desktop">Aplikasi desktop</string> + <string name="storage_legend_system">Sistem Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Bersihkan</string> + <string name="storage_clean_up_lede">Tiada apa di sini yang menyentuh permainan yang dipasang atau muat turun yang sedang berjalan.</string> + <string name="storage_nothing_to_clean">Tiada apa untuk dibersihkan sekarang.</string> + <string name="storage_selected">Dipilih: %1$s · %2$s → %3$s akan kosong</string> + <string name="storage_cleaning">Membersihkan…</string> + <string name="storage_free_button">Kosongkan %1$s</string> + <string name="storage_freed">%1$s dikosongkan.</string> + <string name="storage_item_runtimes">Runtime Steam dan Proton yang tidak digunakan</string> + <string name="storage_item_leftovers">Sisa permainan yang dialih keluar</string> + <string name="storage_item_leftovers_unsure">Sisa yang mungkin mengandungi simpanan</string> + <string name="storage_item_logs">Log sesi lama</string> + <string name="storage_item_logs_detail">Log sesi semasa kekal disimpan</string> + <string name="storage_item_custom_detail">Tiada permainan menggunakannya. Pasang semula di Komponen jika perlu.</string> + <string name="storage_item_shaders">Cache shader permainan yang dipasang</string> + <string name="storage_item_shaders_detail">Dibina semula semasa bermain. Beberapa minit pertama setiap permainan akan tersekat-sekat semula.</string> + <string name="storage_tag_safe">Selamat</string> + <string name="storage_tag_unused">Tidak digunakan</string> + <string name="storage_tag_stutter">Tersekat</string> + <string name="storage_tag_saves">Semak simpanan</string> + <string name="storage_tag_default">Lalai</string> + <string name="storage_tag_required">Diperlukan</string> + <string name="storage_tag_not_used">Tidak digunakan</string> + <string name="storage_back">Storan</string> + <string name="storage_games_with_data">%1$s berserta datanya</string> + <string name="storage_sort_largest">Terbesar</string> + <string name="storage_sort_least_played">Paling jarang dimainkan</string> + <string name="storage_sort_sd">Pada kad SD</string> + <string name="storage_no_games">Tiada permainan di sini.</string> + <string name="storage_played">dimainkan %1$s</string> + <string name="storage_never_played">Belum pernah dimainkan</string> + <string name="storage_game_parts">Permainan %1$s · data %2$s</string> + <string name="storage_uninstall">Nyahpasang</string> + <string name="storage_games_note">Menyahpasang membuka tetingkap Steam supaya Steam merekodkannya. Untuk memindahkan permainan ke kad SD, gunakan Steam › Tetapan › Storan.</string> + <string name="storage_uninstall_title">Nyahpasang %1$s?</string> + <string name="storage_uninstall_body">Steam akan terbuka dan meminta pengesahan. Ini mengosongkan %1$s permainan. Awalan kekal sehingga sisa dibersihkan, dan simpanan Steam Cloud kekal dalam akaun anda.</string> + <string name="storage_open_steam">Buka Steam</string> + <string name="storage_tools_detail">%1$s · %2$s tidak digunakan</string> + <string name="storage_remove_unused">Alih keluar yang tidak digunakan · %1$s</string> + <string name="storage_in_use">Sedang digunakan</string> + <string name="storage_not_used">Tidak digunakan</string> + <string name="storage_remove">Alih keluar</string> + <string name="storage_remove_title">Alih keluar %1$s?</string> + <string name="storage_remove_body">Mengosongkan %1$s. Steam akan memuat turunnya semula jika ada permainan memerlukannya.</string> + <string name="storage_tool_fex_runtime">Diperlukan untuk permainan Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Diperlukan untuk Proton ARM64</string> + <string name="storage_tool_redist">Pemasangan VC++ dan DirectX yang diperlukan permainan</string> + <string name="storage_tool_fex">Menjalankan permainan Linux x86</string> + <string name="storage_tool_steam">Alat Steam</string> + <string name="storage_tool_old_runtime">DroidDeck menjalankan permainan tanpa runtime ini</string> + <string name="storage_tool_x86_proton">Proton x86, yang tidak dapat dijalankan oleh DroidDeck</string> + <string name="storage_tool_custom_default">Lalai untuk semua permainan</string> + <string name="storage_tool_custom_unused">Tiada permainan menggunakannya</string> + <string name="storage_tool_custom_unknown">Tetapan Steam tidak dapat dibaca, jadi ini disimpan</string> + <string name="storage_cleanup_busy">Tunggu pembersihan storan selesai</string> + <string name="storage_low_title">Hanya %1$s kosong</string> + <string name="storage_low_body">Steam memerlukan ruang untuk kemas kini dan cache shader. Bawah 10 GB, kemas kini permainan boleh gagal di tengah jalan.</string> + <string name="storage_low_safe">%1$s boleh dikosongkan dengan selamat.</string> + <string name="storage_free_up">Kosongkan ruang</string> + <string name="storage_play_anyway">Main juga</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d dipasang</item> + <item quantity="other">%d dipasang</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d pada kad SD</item> + <item quantity="other">%d pada kad SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d alat</item> + <item quantity="other">%d alat</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Folder awalan dan cache shader kosong daripada %d permainan</item> + <item quantity="other">Folder awalan dan cache shader kosong daripada %d permainan</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Awalan %d permainan masih mengandungi fail, termasuk simpanan setempat. Salin dahulu jika perlu.</item> + <item quantity="other">Awalan %d permainan masih mengandungi fail, termasuk simpanan setempat. Salin dahulu jika perlu.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d permainan</item> + <item quantity="other">%d permainan</item> + </plurals> + <string name="storage_tool_default_proton">Proton lalai DroidDeck</string> + <string name="storage_tool_proton">Pilihan Proton 11 DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">digunakan %d permainan</item> + <item quantity="other">digunakan %d permainan</item> + </plurals> + <string name="storage_legend_components">Komponen</string> + <string name="storage_components">Komponen</string> + <string name="storage_item_components">Komponen yang tidak digunakan</string> + <string name="storage_component_original">Asal %1$s · %2$s</string> + <string name="storage_original_confirm">Mengosongkan %1$s. Hanya memulihkan versi Proton yang tidak dipasang lagi.</string> + <string name="storage_leftovers_unchecked">Belum disemak: manifes aplikasi Steam tidak dapat dibaca, jadi awalan permainan yang dialih keluar kekal sehingga itu mungkin.</string> + <string name="storage_failed">Gagal: %1$s</string> + <string name="storage_desktop_shared">%1$s dikongsi</string> + <string name="storage_data_installed">Permainan dipasang</string> + <string name="storage_data_parts">Awalan %1$s · shader %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Kosongkan shader</string> + <string name="storage_data_leftovers">Permainan dialih keluar</string> + <string name="storage_steam_app">Aplikasi Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Awalan masih mengandungi fail, mungkin simpanan setempat</string> + <string name="storage_leftover_confirm">Memadam awalan Wine dan cache shader (%1$s). Salin dahulu simpanan penting; simpanan Steam Cloud kekal dalam akaun anda.</string> + <string name="storage_data_other">Disimpan</string> + <string name="storage_data_other_title">Permainan bukan Steam dan awalan Steam dikongsi</string> + <string name="storage_data_other_detail">Awalan permainan daripada kedai atau yang ditambah sendiri</string> + <string name="storage_components_packages">Pakej yang dimuat turun</string> + <string name="storage_components_originals">Fail asal yang disimpan</string> + <string name="storage_components_none">Tiada pakej komponen dimuat turun.</string> + <string name="storage_component_in_use">Dipilih untuk Proton atau permainan</string> + <string name="storage_component_unused">Tidak dipilih di mana-mana</string> + <string name="storage_original_kept">Memulihkan Proton yang dipasang</string> + <string name="storage_original_old">Versi Proton yang tidak dipasang lagi</string> + <string name="storage_tag_in_use">Digunakan</string> + <string name="storage_components_note">Komponen yang digunakan kekal dikunci. Pilih di Komponen; yang dialih keluar di sini boleh dimuat turun semula di sana.</string> + <string name="storage_component_confirm">Mengosongkan %1$s. Pakej yang anda import sendiri tidak boleh dimuat turun semula.</string> + <string name="storage_desktop_detail">%1$s untuk aplikasi Flatpak dan yang dikongsi</string> + <string name="storage_desktop_apps_title">Aplikasi</string> + <string name="storage_desktop_none">Tiada aplikasi Flatpak dipasang.</string> + <string name="storage_desktop_shared_title">Dikongsi antara aplikasi</string> + <string name="storage_desktop_runtimes">Runtime</string> + <string name="storage_desktop_runtimes_detail">Pustaka tempat aplikasi berjalan; yang tidak digunakan hilang melalui Alih keluar yang tidak digunakan</string> + <string name="storage_desktop_cache">Storan muat turun</string> + <string name="storage_desktop_cache_detail">Object store dan cache muat turun Flatpak</string> + <string name="storage_desktop_prune">Alih keluar yang tidak digunakan</string> + <string name="storage_desktop_prune_body">Mengalih keluar runtime yang tidak diperlukan mana-mana aplikasi dipasang dan mengemas object store Flatpak. Aplikasi dipasang terus berjalan.</string> + <string name="storage_flatpak_uninstall_body">Mengalih keluar aplikasi (%1$s) dan runtime yang tidak digunakan oleh yang lain. Data dalam folder rumah anda kekal.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d pakej</item> + <item quantity="other">%d pakej</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d aplikasi</item> + <item quantity="other">%d aplikasi</item> + </plurals> + <string name="boot_movie">Video but</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps kelihatan lebih lancar tetapi menggunakan lebih banyak CPU semasa Steam bermula. Video permulaan yang dipilih dalam tetapan Steam sendiri diutamakan.</string> + <string name="boot_movie_sound">Bunyi</string> + <string name="boot_movie_custom">Video anda sendiri</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV atau WebM. Format lain dan fail melebihi %1$d MB ditukar kepada WebM 720p pada peranti, sehingga %2$d saat.</string> + <string name="boot_movie_import">Import</string> + <string name="boot_movie_remove">Alih keluar</string> + <string name="boot_movie_pick">Pilih video but</string> + <string name="boot_movie_imported">%1$s kini video but</string> + <string name="boot_movie_imported_silent">%1$s kini video but, tanpa bunyi</string> + <string name="boot_movie_too_long">Video yang perlu ditukar mestilah %1$d saat atau kurang</string> + <string name="boot_movie_converting">Menukar %1$d%%</string> + <string name="boot_movie_converting_started">Menukar %1$s untuk Steam. Biarkan DroidDeck terbuka.</string> + <string name="boot_movie_unsupported">Peranti ini tidak dapat menyahkod video itu.</string> + <string name="boot_movie_import_failed">Tidak dapat mengimport video itu</string> + <string name="glasses_experimental">Kamera Luma Ultra — Eksperimen</string> + <string name="glasses_joycons">Penjejakan kedudukan Joy-Con</string> + <string name="glasses_joycons_hint">Gunakan kamera cermin mata pintar untuk meletakkan pengawal Joy-Con yang dipasangkan. Input putaran dan butang datang daripada pengawal Joy-Con. Kedudukan dianggarkan apabila pergelangan tangan anda tersembunyi. Menggantikan pengawal yang dikendalikan dengan tangan kosong dan menjeda penjejakan kamera telefon. Halakan pengawal Joy-Con ke hadapan semasa menyambung atau menetapkan semula pusat penjejakan.</string> + <string name="glasses_joycons_requires_position">Dayakan penjejakan kedudukan terlebih dahulu. Memerlukan pengawal Joy-Con yang berkemampuan gerakan pada Android 12 atau lebih baharu. Dimatikan secara lalai.</string> + <string name="setup_tab_glasses">Cermin mata pintar</string> + <string name="setup_glasses_scope">Tetapan penjejakan paparan dan kepala dikongsi merentasi menu, permainan dan sesi desktop DroidDeck.</string> + <string name="setup_glasses_connect">Sambungkan cermin mata pintar untuk menukar tetapan paparan dan penjejakannya. Tetapan anda yang disimpan disimpan apabila anda memutuskan sambungan.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Mod paparan</string> + <string name="glasses_output_2d">Output 2D</string> + <string name="glasses_output_3d">Output 3D</string> + <string name="glasses_picture_group">Gambar dan skrin maya</string> + <string name="glasses_position_group">Kedudukan dan aras lantai</string> + <string name="glasses_hands_group">Penjejakan tangan — Eksperimen</string> + <string name="glasses_tracking_status">Status penjejakan</string> + <string name="glasses_resolution_2d">Resolusi 2D</string> + <string name="glasses_resolution_3d">Resolusi 3D</string> + <string name="glasses_resolution_vr">Resolusi VR</string> + <string name="glasses_resolution_auto">Automatik</string> + <string name="glasses_resolution_inherit">Sama seperti 2D / 3D</string> + <string name="glasses_resolution_hint">Resolusi output setiap mata.</string> + <string name="glasses_refresh_30_hint">Dayakan Permainan pada cermin mata pintar untuk memilih mod 30 Hz natif paparan.</string> + <string name="glasses_3dof">Skrin maya 3DoF</string> + <string name="glasses_3dof_hint">Sauhkan permainan rata di hadapan anda supaya anda boleh melihat sekeliling. Mendayakan Permainan pada cermin mata pintar tanpa bertukar kepada 3D.</string> + <string name="glasses_screen_app_wide">Lebar dan jarak mengemas kini skrin maya yang dijejaki untuk menu, permainan dan sesi desktop DroidDeck dengan segera.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Penjejakan kedudukan termasuk putaran kepala dalam SteamVR. Untuk penjejakan putaran sahaja, matikan penjejakan kedudukan.</string> + <string name="glasses_head_tracking_spatial_hint">Mengawal pergerakan kepala pada skrin maya. Penjejakan kedudukan termasuk putaran kepala dalam SteamVR.</string> + <string name="glasses_quick_actions">Tindakan pantas</string> + <string name="glasses_recenter_screen_hint">Lihat di mana anda mahu skrin, kemudian tetapkan semula pusat penjejakan untuk menetapkan ketinggian dan arahnya.</string> + <string name="glasses_recenter_joycons_button">Pusatkan semula Joy-Con</string> + <string name="phone_camera_tracking_group">Kamera telefon — Eksperimen</string> + <string name="phone_camera_tracking_setting">Jejaki tangan atau pengawal Joy-Con</string> + <string name="glasses_6dof">Skrin maya 6DoF</string> + <string name="glasses_position">Penjejakan kedudukan — eksperimen</string> + <string name="glasses_position_hint">Pergerakan fizikal dalam VR dan di sekitar skrin maya. Memulakan semula penjejakan mengambil masa seketika.</string> + <string name="glasses_eye_height">Ketinggian mata semasa di atas lantai</string> + <string name="glasses_floor">Tetapkan paras lantai daripada ketinggian semasa</string> + <string name="glasses_floor_set">Tetapkan paras lantai</string> + <string name="glasses_spatial_setup">Persediaan dan diagnostik kamera stereo</string> + <string name="glasses_spatial_setup_hint">Semak penentukuran kamera dan penjejakan tangan sebelum bermain.</string> + <string name="glasses_spatial_open">Buka persediaan</string> + <string name="glasses_hands">Pengawal dikendalikan dengan tangan kosong</string> + <string name="glasses_hands_hint">Gunakan kamera cermin mata pintar untuk membidik dengan tangan anda, cubit untuk klik dan tutup tangan anda untuk memegang dalam VR. Kayu Gamepad bergerak dan berpusing. Menggantikan penjejakan kedudukan Joy-Con. Mungkin ketinggalan atau kehilangan penjejakan semasa permainan.</string> + <string name="glasses_hands_ready_hint">Dayakan pengawal dikendalikan dengan tangan kosong di bawah kamera Luma Ultra dalam Penjejakan. Tunjukkan tangan terbuka dahulu.</string> + <string name="glasses_hands_base">Penentukuran Luma Ultra Dikongsi</string> + <string name="glasses_hands_base_hint">Menggunakan tapak Luma Ultra yang dikongsi. Kalibrasi cermin mata pintar anda sendiri untuk mengesahkan ketepatannya.</string> + <string name="glasses_hands_calibration_verified">Penentukuran yang diukur disahkan</string> + <string name="glasses_hands_calibration_required">Pengesahan diperlukan</string> + <string name="glasses_hands_calibration_required_hint">Pengawal yang dikendalikan dengan tangan kosong akan tersedia selepas pemeriksaan jarak yang diukur lulus.</string> + <string name="tracking_recovery_lost">Penjejakan hilang</string> + <string name="tracking_recovery_look">Lihat sekeliling perlahan-lahan di dalam bilik yang terang benderang.\nPastikan kamera penjejakan jelas dan menghadap perabot atau perincian lain yang boleh dilihat.</string> + <string name="tracking_recovery_restart_help">Masih buntu? Pada telefon anda: cermin mata pintar → Penjejakan → Buka persediaan → Tunjukkan diagnostik → Mulakan semula penjejakan.</string> + <string name="tracking_recovery_disconnected">Cermin mata pintar diputuskan sambungan</string> + <string name="tracking_recovery_connect">Periksa sambungan USB dan sambungkan semula cermin mata pintar.\nTerima gesaan akses USB pada telefon anda jika ia muncul.</string> + <string name="tracking_recovery_usb_help">Setelah disambungkan, lihat sekeliling perlahan-lahan di dalam bilik yang terang untuk memulihkan penjejakan.</string> + <string name="tracking_recovery_recenter">Pemusatan semula diperlukan</string> + <string name="tracking_recovery_recenter_steps">Penjejakan telah kembali ke kedudukan baharu.\nLihat ke hadapan, kemudian ketik tetapkan semula pusat penjejakan pada telefon anda.</string> + <string name="tracking_recovery_recenter_help">Anda juga boleh menemui pusat penjejakan tetap semula dalam cermin mata pintar → Penjejakan → Buka persediaan. Penentukuran kamera yang disimpan disimpan.</string> + <string name="tracking_recovery_stabilizing">Diamlah seketika</string> + <string name="tracking_recovery_hold">Tetapkan semula pusat penjejakan sedang dijalankan.\nPastikan cermin mata pintar stabil semasa penjejakan stabil.</string> + <string name="tracking_recovery_automatic">Skrin ini ditutup secara automatik apabila pengesanan kepala sedia.</string> + <string name="glasses_steady_hand_aim">Mensasarkan stabil dengan tangan</string> + <string name="glasses_steady_hand_aim_hint">Halakan dari bahu anda melalui tapak tangan anda. Matikan untuk putaran terkawal pergelangan tangan.</string> + <string name="spatial_title">Persediaan ruang</string> + <string name="spatial_wait_tracking">Menunggu penjejakan…</string> + <string name="spatial_cameras_description">Kamera pengesan kiri dan kanan</string> + <string name="spatial_camera_sync">Penyegerakan kamera</string> + <string name="spatial_ready">Sedia</string> + <string name="spatial_sync_hint">Menunggu pengesanan kamera dan kepala untuk beratur. Pastikan cermin mata pintar disambungkan.</string> + <string name="spatial_prepare">1. Sediakan sasaran penentukuran</string> + <string name="spatial_print_actual">Cetak pada saiz sebenar</string> + <string name="spatial_print_hint">Setiap segi empat sama mesti berukuran 30 mm (1.181 in). Lekapkan helaian rata pada permukaan tegar di kawasan yang terang.</string> + <string name="spatial_print">Cetak corak penentukuran</string> + <string name="spatial_capture_group">2. Tangkap pandangan yang berbeza</string> + <string name="spatial_board_stationary">Pastikan sasaran penentukuran tidak bergerak</string> + <string name="spatial_capture_hint">Gerakkan cermin mata pintar lebih dekat, lebih jauh dan sisi. Pusingkannya ke kiri/kanan, condongkannya ke atas/bawah, dan condongkannya ke sisi. Simpan sasaran penentukuran dalam kedua-dua kamera dan jeda sebentar sebelum setiap tangkapan.</string> + <string name="spatial_start">Mulakan penentukuran baharu</string> + <string name="spatial_wait_sync">Menunggu penyegerakan kamera.</string> + <string name="spatial_start_hint">Mulakan penentukuran baharu untuk mengumpul pandangan.</string> + <string name="spatial_views_hint">Pastikan sasaran penentukuran kelihatan dalam kedua-dua pratonton. Tangkap sekurang-kurangnya 24 pandangan tajam dari sudut yang berbeza.</string> + <string name="spatial_capturing">Merakam…</string> + <string name="spatial_capture">Tangkap paparan sasaran penentukuran</string> + <string name="spatial_alignment">Kira penjajaran kamera</string> + <string name="spatial_calculating">Mengira…</string> + <string name="spatial_calculate">Kira penentukuran</string> + <string name="spatial_distance_group">3. Semak jarak</string> + <string name="spatial_distance">Jarak yang diukur</string> + <string name="spatial_distance_hint">Mulakan dengan 12 in atau 30 cm supaya penanda yang dicetak lebih mudah untuk dikesan. Pilih ukuran tepat yang akan anda gunakan.</string> + <string name="spatial_camera_board_distance">Jarak dari kamera kiri ke pusat sasaran penentukuran</string> + <string name="spatial_checking_distance">Menyemak jarak…</string> + <string name="spatial_validate">Sahkan jarak</string> + <string name="spatial_diagnostics">Diagnostik</string> + <string name="spatial_show_diagnostics">Tunjukkan diagnostik</string> + <string name="spatial_diagnostics_hint">Pemasa kamera dan alat pemulihan penjejakan.</string> + <string name="spatial_camera_timing">Masa kamera</string> + <string name="spatial_hand_input">Input daripada penjejakan tangan</string> + <string name="spatial_wait_timing">Menunggu pemasaan kamera.</string> + <string name="spatial_frames">Imej kamera</string> + <string name="spatial_gpu">Pengesanan GPU tangan</string> + <string name="spatial_gpu_hint">CPU ialah lalai. GPU adalah percubaan dan boleh menyebabkan SteamVR dimulakan semula. Pilihan ini ditetapkan semula apabila penjejakan dimulakan semula.</string> + <string name="spatial_lite">Pengesanan ringan model tangan</string> + <string name="spatial_lite_hint">Gunakan pengesan tapak tangan Lite dan mata kekunci Lite pada tangan. Periksa ketepatan menyasar, mencubit dan merebut. Ditetapkan semula apabila penjejakan dimulakan semula.</string> + <string name="spatial_adaptive">Kekerapan input automatik untuk menjejak tangan</string> + <string name="spatial_adaptive_hint">Laraskan input kepada kelajuan pemprosesan. Ditetapkan semula apabila penjejakan dimulakan semula.</string> + <string name="spatial_half_rate">Hadkan kekerapan input untuk menjejak tangan</string> + <string name="spatial_half_rate_hint">Gunakan separuh imej kamera. Matikan untuk membandingkan kekerapan maksimum. Ditetapkan semula apabila penjejakan dimulakan semula.</string> + <string name="spatial_diagnostic_capture">Tangkapan diagnostik</string> + <string name="spatial_diagnostic_capture_hint">Simpan satu pasangan imej stereo secara setempat. Imej disimpan hanya apabila diminta.</string> + <string name="spatial_save_frame">Simpan imej kamera</string> + <string name="spatial_restart_tracking">Mulakan semula penjejakan</string> + <string name="spatial_restart_hint">Gunakan jika penjejakan tidak pulih di kawasan yang terang. Mulakan semula memerlukan asal penjejakan baharu.</string> + <string name="spatial_restart">Mulakan semula</string> + <string name="spatial_restart_title">Mulakan semula penjejakan?</string> + <string name="spatial_restart_confirm">Paparan penentukuran yang tidak disimpan akan hilang. Pastikan cermin mata pintar tidak bergerak selepas itu dan tetapkan semula pusat penjejakan apabila penjejakan dipulihkan.</string> + <string name="spatial_views_count">%1$d / 24 paparan ditangkap</string> + <string name="spatial_capture_paused">Tangkapan dijeda: %1$s</string> + <string name="spatial_measure_hint">Ukur %1$s. Tunjukkan sasaran penentukuran lengkap dalam kedua-dua pratonton, kemudian tahan.</string> + <string name="spatial_timing_values">%1$.1f Hz • umur imej %2$.1f ms • pemprosesan %3$.1f ms</string> + <string name="spatial_input_values">Had input %1$.1f Hz • %2$.0f%% imej kamera. Pengesanan kepala diteruskan pada kekerapan maksimumnya.</string> + <string name="spatial_frame_counts">%1$d diproses • %2$d digugurkan • %3$d dilangkau mengikut had input</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_scale" formatted="false">Cetak pada 100% / Saiz sebenar. Setiap segi empat sama: 30 mm (1.181 in).</string> + <string name="spatial_print_stationary">Pastikan sasaran penentukuran rata dan pegun; gerakkan cermin mata pintar antara tangkapan.</string> + <string name="spatial_print_check">Semakan skala: 100 mm (3.937 in) antara tanda skala</string> + <string name="spatial_distance_12in">12 in (30.48 sm)</string> + <string name="spatial_distance_30cm">30 sm (11.81 in)</string> + <string name="spatial_distance_20in">20 in (50.8 sm)</string> + <string name="spatial_distance_50cm">50 sm (19.69 in)</string> + <string name="spatial_disabled">Dilumpuhkan</string> + <string name="spatial_wait_stable">Menunggu penjejakan yang stabil</string> + <string name="spatial_disconnected">Terputus sambungan</string> + <string name="spatial_hands_off">Pengawal yang dikendalikan dengan tangan kosong dimatikan</string> + <string name="spatial_tracking_off">Penjejakan kedudukan dimatikan atau cermin mata pintar diputuskan</string> + <string name="spatial_recenter_pending">Tetapkan semula pusat penjejakan diminta — tahan pegun semasa penjejakan stabil</string> + <string name="spatial_tracking_lost">Penjejakan hilang — hadapi kawasan yang terang dengan perincian yang boleh dilihat</string> + <string name="spatial_origin_changed">Asal penjejakan berubah — ketik tetapkan semula pusat penjejakan, kemudian tahan pegun</string> + <string name="spatial_active">6DoF aktif</string> + <string name="spatial_connect_hint">Sambungkan Luma Ultra dan dayakan penjejakan kedudukan.</string> + <string name="spatial_validation_session">Penentukuran disahkan untuk sambungan ini.</string> + <string name="spatial_validation_saved">Penentukuran disahkan dan disimpan.</string> + <string name="spatial_wait_cameras">Menunggu kamera stereo</string> + <string name="spatial_wait_hands">Menunggu untuk mengesan tangan</string> + <string name="spatial_collect_instructions">Pastikan sasaran penentukuran 5 × 7 tidak bergerak. Tangkap 24+ paparan sambil menggerakkan dan memutar cermin mata pintar.</string> + <string name="spatial_capture_pending">Menunggu imej kamera seterusnya. Pegang cermin mata pintar itu.</string> + <string name="spatial_validation_pending">Menyemak imej kamera seterusnya. Pastikan sasaran penentukuran penuh kelihatan dan tahan.</string> + <string name="spatial_start_first">Mulakan penentukuran dahulu</string> + <string name="spatial_no_camera_frame">Tiada imej kamera baharu tiba. Periksa sambungan cermin mata pintar dan pratonton kamera, kemudian cuba semula.</string> + <string name="spatial_clock_reset">Tetapan semula jam kamera</string> + <string name="spatial_frame_changed">Sistem koordinat penjejakan berubah. Paparan anda disimpan untuk pengiraan semula. tetapkan semula pusat penjejakan, kemudian mulakan set baharu untuk menangkap lebih banyak paparan.</string> + <string name="spatial_device_loaded">penentukuran peranti dimuatkan</string> + <string name="spatial_calibration_needed">penentukuran diperlukan</string> + <string name="spatial_tap_start">Ketik Mulakan penentukuran baharu dahulu.</string> + <string name="spatial_capture_recenter_pending">Tetapkan semula pusat penjejakan sedang menunggu penjejakan yang stabil. Tahan pegun seketika.</string> + <string name="spatial_capture_recenter">Penjejakan berubah. Ketik tetapkan semula pusat penjejakan sekali, kemudian tahan pegun sebelum menangkap.</string> + <string name="spatial_capture_unsynchronized">Tangkapan ditolak: penjejakan kepala tidak segerak atau telah berubah semasa tangkapan. Kekal diam dan cuba lagi.</string> + <string name="spatial_align_first">Kira penjajaran kamera sebelum menyemak jarak.</string> + <string name="spatial_processing_failed">pemprosesan kamera gagal</string> + <string name="spatial_hand_head_changed">Pengesanan kepala berubah semasa pengesanan tangan</string> + <string name="spatial_hand_wait_sync">Menunggu penyegerakan kamera dan kepala</string> + <string name="spatial_no_wrists">Tiada pergelangan tangan dikesan. Simpan pemegang pengawal Joy-Con anda di hadapan cermin mata pintar</string> + <string name="spatial_no_hands">Tiada tangan dikesan. Tunjukkan tapak tangan terbuka di hadapan cermin mata pintar</string> + <string name="spatial_one_camera_wrists">Pergelangan tangan boleh dilihat dalam satu kamera sahaja; simpan pemegang pengawal anda dalam paparan dikongsi</string> + <string name="spatial_one_camera_hands">Tangan boleh dilihat dalam satu kamera sahaja; kekalkan kedua tapak tangan dalam pandangan yang dikongsi</string> + <string name="spatial_ambiguous_hands">Kedua-dua kamera melihat tangan, tetapi padanan kiri/kanan adalah samar-samar</string> + <string name="spatial_inconsistent_depth">Tangan dikesan, tetapi kedalaman stereo tidak konsisten</string> + <string name="spatial_rejected_wrist">Kedudukan pergelangan tangan ditolak oleh pemeriksaan stereo atau gerakan</string> + <string name="spatial_inconsistent_palm">Mata stereo dikesan, tetapi geometri tapak tangan tidak konsisten</string> + <string name="spatial_hands_need_calibration">Selesaikan penentukuran dan pemeriksaan jarak untuk membolehkan tangan</string> + <string name="spatial_hands_wait_stable">Menunggu penjejakan kepala yang stabil; tetapkan semula pusat penjejakan jika diminta</string> + <string name="spatial_old_frame">Pemerhatian kamera terlalu lama; menunggu pasangan baru</string> + <string name="spatial_fit_ready">Muat %1$.2f px. Ukur jarak pilihan anda dari kamera kiri ke pusat sasaran penentukuran, kemudian sahkan.</string> + <string name="spatial_opencv_error">OpenCV tidak tersedia: %1$s</string> + <string name="spatial_restored">%1$d paparan yang disimpan dipulihkan. Kira penentukuran untuk mencuba semula, atau mulakan set baharu untuk menangkap lebih banyak lagi.</string> + <string name="spatial_captured">Ditangkap %1$d / 24 paparan. Pastikan sasaran penentukuran tetap; alihkan cermin mata pintar untuk paparan seterusnya.</string> + <string name="spatial_capture_corners">Tangkapan ditolak: %1$d / 12 sudut yang diperlukan kelihatan dalam kedua-dua kamera. Tunjukkan lebih banyak sasaran penentukuran, tahan diam, kemudian cuba lagi.</string> + <string name="spatial_validation_error">Pemeriksaan jarak tidak dapat diselesaikan: %1$s. Cuba lagi.</string> + <string name="spatial_inference_error">Pengesanan tangan tidak tersedia: %1$s. Tukar CPU/GPU atau togol pengawal yang dikendalikan dengan tangan kosong untuk mencuba semula.</string> + <string name="spatial_hand_timeout">Pengesanan tangan melebihi %1$d ms; pemerhatian dibuang</string> + <string name="spatial_wrists_tracked">%1$d / 2 kedudukan pergelangan tangan Joy-Con diukur dengan stereo</string> + <string name="spatial_palms_tracked">Tapak tangan dijejak: %1$d / 2; gerak isyarat cubit sedia: %2$d; gerak isyarat genggam sedia: %3$d</string> + <string name="spatial_capture_saved">Tangkapan diagnostik disimpan ke %1$s</string> + <string name="spatial_hand_error">Penjejakan tangan terhenti: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Penjejakan kepala dan sasaran penentukuran tidak bersetuju dengan %1$s (had 5 sm / 2 in). Pastikan sasaran penentukuran tetap dan tunggu penjejakan mantap sebelum memulakan set baharu. Pusing dan condongkan cermin mata pintar dengan perlahan; jeda sebelum setiap tangkapan.</string> + <string name="spatial_need_views">Tangkap sekurang-kurangnya 24 pandangan berbeza sasaran penentukuran pegun.</string> + <string name="spatial_need_rotation">Pusingkan cermin mata pintar ke kiri dan kanan, dan condongkannya ke atas dan ke bawah; pergerakan tanpa putaran tidak boleh menentukur penjajaran kamera.</string> + <string name="spatial_bad_baseline">Garis dasar kamera yang tidak masuk akal</string> + <string name="spatial_need_orientations">Gerakkan kepala anda melalui orientasi yang lebih pelbagai.</string> + <string name="spatial_bad_rotation">Putaran kamera ke kepala tidak sah</string> + <string name="spatial_bad_alignment">Penjajaran kamera ke kepala tidak konsisten.</string> + <string name="spatial_calibration_error">Penentukuran tidak dapat diselesaikan. %1$s Pandangan yang ditangkap anda disimpan.</string> + <string name="spatial_reprojection_error">Ralat tayangan semula yang ditahan %1$.2f px melebihi 2 px. Ukur semula.</string> + <string name="spatial_distance_corners">%1$d / 24 sudut papan dam dikesan dalam kedua-dua kamera. Pastikan sasaran penentukuran penuh kelihatan dan tahan. Jika ia sudah kelihatan, pilih 12 in atau 30 cm dan ukur jarak yang lebih dekat itu sebelum mencuba semula.</string> + <string name="spatial_distance_depth">Sasaran penentukuran boleh dilihat, tetapi kedalamannya tidak dapat diukur dengan pasti. Pegang cermin mata pintar dan pastikan sasaran penentukuran rata dan terang, kemudian cuba semula.</string> + <string name="spatial_distance_invalid">Ukuran kamera tidak sah. Diam dan cuba lagi.</string> + <string name="spatial_distance_passed">Semakan jarak lulus.</string> + <string name="spatial_distance_retry">Semak semula jarak dari kamera kiri ke pusat sasaran penentukuran, kemudian cuba semula.</string> + <string name="spatial_distance_result">Kamera diukur %1$s; jarak yang dipilih %2$s. %3$s</string> + <string name="spatial_wait_previews">Tunggu kedua-dua pratonton kamera sebelum memulakan penentukuran.</string> + <string name="spatial_saved_views_hint">Pandangan yang disimpan boleh dikira semula. Mulakan penentukuran baharu untuk ditangkap dalam sistem koordinat penjejakan semasa.</string> + <string name="spatial_model_checksum_error">Ketakpadanan checksum model tangan</string> + <string name="spatial_opencv_load_error">OpenCV tidak dapat dimuatkan</string> + <string name="spatial_print_title">DroidDeck - Penentukuran Luma Ultra</string> + <string name="spatial_base_loaded">Penentukuran asas Luma Ultra dimuatkan</string> +</resources> diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml new file mode 100644 index 0000000000..5c1ebd5dbe --- /dev/null +++ b/app/src/main/res/values-nb/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">SteamVR-grafikken stoppet</string> + <string name="steamvr_recovery_countdown">DroidDeck starter på nytt om %1$d sekunder for å tilbakestille grafikken og åpne SteamVR igjen. Spillet som kjører, lukkes, og ulagret fremdrift kan ikke gjenopprettes.</string> + <string name="steamvr_recovery_repeated">Grafikkfeilen kom tilbake etter en nylig omstart. Automatisk gjenoppretting er satt på pause for å unngå en løkke. Omstart lukker spillet, og ulagret fremdrift kan ikke gjenopprettes.</string> + <string name="steamvr_recovery_restart">Start på nytt nå</string> + <string name="steamvr_recovery_cancel">La stå åpen</string> + <string name="steamvr_recovery_restarting">Tilbakestiller grafikken og åpner SteamVR igjen…</string> + <string name="steamvr_recovery_failed">DroidDeck kunne ikke starte på nytt automatisk. Lukk appen helt, og åpne den igjen.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Første gang lastes Steam ned. Dette kan ta noen minutter.</item> + <item>Som standard settes Steam på pause når du lukker appen, og fortsetter der du slapp når du kommer tilbake.</item> + <item>Kontrolleren din vises som en Xbox 360-kontroller. Hvis ikke, bruk skjermkontrollene.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Første gang settes skrivebordet opp. Dette kan ta noen minutter.</item> + <item>Som standard settes sesjonen på pause når du lukker appen, og fortsetter der du slapp når du kommer tilbake.</item> + <item>Berøring fungerer som styreflate: dra for å flytte pekeren, trykk for å klikke.</item> + <item>Kontrolleren din vises som en Xbox 360-kontroller. Hvis ikke, bruk skjermkontrollene.</item> + </string-array> + <string name="session_channel">Sesjon</string> + <string name="session_channel_description">Vises mens en Steam- eller skrivebordssesjon er åpen</string> + <string name="session_notification">Steam kjører</string> + <string name="session_notification_downloads">Steam-nedlasting aktiv</string> + <string name="session_notification_paused">Sesjonen er pauset – trykk på Gjenoppta når du er klar</string> + <string name="resume_session">Gjenoppta</string> + <string name="suspend_now">Sett på pause nå</string> + <string name="stop_session">Avslutt sesjon</string> + <string name="frame_gen_title">Bildegenerering</string> + <string name="frame_gen_hint">Velg modus for bildegenerering</string> + <string name="frame_gen_off">Av</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptiv %1$d</string> + <string name="lsfg_needs_steam">Krever Lossless Scaling på Steam</string> + <string name="lsfg_needs_install">Installer Lossless Scaling via Steam, eller importer Lossless.dll</string> + <string name="lsfg_import">Importer Lossless.dll…</string> + <string name="lsfg_using_steam">Bruker kopien fra Steam</string> + <string name="lsfg_using_import">Bruker en importert kopi</string> + <string name="lsfg_pick_title">Velg Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll importert</string> + <string name="lsfg_import_unchanged">Denne Lossless.dll-filen er allerede i bruk</string> + <string name="lsfg_import_not_owned">Lossless Scaling eies ikke av denne Steam-kontoen</string> + <string name="lsfg_import_invalid">Denne filen er ikke Lossless Scalings Lossless.dll</string> + <string name="lsfg_import_failed">Kunne ikke forberede LSFG fra denne Lossless.dll-filen</string> + <string name="lsfg_problem_missing">LSFG krever Lossless Scaling fra Steam eller en importert Lossless.dll</string> + <string name="lsfg_problem_failed">LSFG kunne ikke forberede shaderne sine fra Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: ikke støttet</string> + <string name="hud_fg_failed">%1$s: motoren feilet</string> + <string name="hud_fg_needs_lossless">%1$s: krever Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · starter</string> + <string name="second_library_import_hint">Legger til et Steam-bibliotek og søker gjennom det etter Windows-spill. Eide spill bruker sine Steam-oppføringer, resten blir snarveier til spill som ikke er fra Steam.</string> + <string name="game_env_title">Spillmiljø</string> + <string name="game_env_hint">Miljøvariabler for Proton-spill.</string> + <string name="game_env_edit">Rediger</string> + <string name="game_env_shared">Alle Proton-spill</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">Steam-app-ID</string> + <string name="game_env_open">Åpne</string> + <string name="game_env_profile">Spill %1$s</string> + <string name="game_env_add">Legg til variabel</string> + <string name="game_env_name">Variabelnavn</string> + <string name="game_env_value">Verdi</string> + <string name="game_env_save">Lagre</string> + <string name="game_env_remove">Fjern</string> + <string name="game_env_restore">Arv på nytt</string> + <string name="game_env_reset">Fjern alle miljøoverstyringer</string> + <string name="game_env_unset">Fjern for denne profilen</string> + <string name="game_env_empty">Ingen variabler satt.</string> + <string name="game_env_inherited">Arvet</string> + <string name="game_env_custom">Egendefinert variabel</string> + <string name="game_env_error">Kunne ikke laste eller lagre. Kontroller ledig lagringsplass og prøv igjen.</string> + <string name="game_env_invalid">Bruk et gyldig navn og en verdi på opptil 8192 tegn.</string> + <string name="game_env_unused">Standard Proton-kjøretid leser ikke denne variabelen.</string> + <string name="game_env_loading">Laster…</string> + <string name="game_env_feature">Overstyring av D3D12-funksjonsnivå. 12_2 rapporterer DirectX 12 Ultimate-funksjoner; ustøttede funksjoner kan feile. La stå uten verdi for automatisk oppdagelse.</string> + <string name="game_env_shader">Overstyring av D3D12-shadermodell. 6_9 krever en tilstrekkelig ny VKD3D og tilsvarende GPU-funksjoner. La stå uten verdi for automatisk oppdagelse.</string> + <string name="game_env_cache">Behold Mesa shader-mellomlagring aktivert for å redusere gjentatt kompilering. false aktiverer mellomlagring.</string> + <string name="game_env_cache_size">Maksimal størrelse på Mesa shader-mellomlageret, for eksempel 1G. Større mellomlagre bruker mer lagringsplass.</string> + <string name="game_env_vkd3d_config">VKD3D-innstillinger for D3D12. nodxr slår av ray tracing; bruk bare for spill som krever det.</string> + <string name="game_env_proton_log">Sett til 1 for en Proton-diagnostikklogg. Logging kan redusere ytelsen og bruke lagringsplass.</string> + <string name="game_env_wined3d">Sett til 1 for å bruke OpenGL-baserte WineD3D i stedet for DXVK til kompatibilitetstesting av D3D9–11.</string> + <string name="game_env_no_ntsync">Sett til 1 for å holde dette spillet unna ntsync (droiddeck-ntsync eller en kjernedriver); det bruker droiddeck-esync der en pakke finnes, ellers droiddeck-fsync.</string> + <string name="game_env_no_esync">Sett til 1 for å slå av droiddeck-esync for dette spillet; det bruker droiddeck-fsync i stedet, eller droiddeck-ntsync der fsync også er av.</string> + <string name="game_env_no_fsync">Sett til 1 for å holde dette spillet unna droiddeck-fsync; det bruker droiddeck-esync der en pakke finnes, ellers droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Sett til 1 for å kjøre dette spillet på droiddeck-fsync, eller 0 for å sette droiddeck-esync først der en pakke passer Protonen.</string> + <string name="game_env_xalia">Sett til 0 for å slå av Protons hjelper for kontrollernavigasjon for dette spillet.</string> + <string name="game_env_hud">DXVK-overlegg for D3D9–11. fps viser bildefrekvens; uten verdi skjules det.</string> + <string name="game_env_dxvk_config">DXVK-innstillinger skilt med semikolon. Nyere versjoner bruker dxvk.maxFrameRate for bildefrekvensbegrensning; bruk heller sesjonens bildefrekvensbegrensning for vanlig spilling.</string> + <string name="game_env_vkd3d_limit">Bildefrekvensgrense for D3D12. 0 slår av grensen.</string> + <string name="game_env_glthread">Mesa OpenGL-tråding. true kan hjelpe CPU-begrensede OpenGL-spill; test per spill.</string> + <string name="sync_backend_title">Wine-synkronisering</string> + <string name="sync_backend_hint">Hvordan spill holder trådene sine i takt. Gjelder fra neste sesjon.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">FEX-forhåndsinnstilling</string> + <string name="fex_next_launch">Gjelder fra neste spilløkt.</string> + <string name="game_settings_title">Spill</string> + <string name="fex_default_label">FEX-standard</string> + <string name="fex_default_detail">Bruker FEX-standardinnstillinger.</string> + <string name="fex_stability_label">Stabilitet</string> + <string name="fex_stability_detail">Tryggeste, saktest innstillinger.</string> + <string name="fex_compatibility_label">Kompatibilitet</string> + <string name="fex_compatibility_detail">Full TSO med multiblokk.</string> + <string name="fex_intermediate_label">Middels</string> + <string name="fex_intermediate_detail">Balansert TSO med redusert x87-presisjon.</string> + <string name="fex_performance_label">Ytelse</string> + <string name="fex_performance_detail">All TSO av; multiblokk.</string> + <string name="fex_performance_tso_label">Ytelse + TSO</string> + <string name="fex_performance_tso_detail">Ytelsesinnstillinger med hoved-TSO aktivert.</string> + <string name="fex_extreme_label">Ekstrem</string> + <string name="fex_extreme_detail">Slår av kontroller for selvmodifiserende kode. JIT-spill og DRM kan feile.</string> + <string name="fex_extreme_tso_label">Ekstrem + TSO</string> + <string name="fex_extreme_tso_detail">Ekstreminnstillinger med hoved-TSO aktivert.</string> + <string name="fex_extreme_gn_label">Ekstrem-gn</string> + <string name="fex_extreme_gn_detail">Ytelse med TSC og metadatahint. Prøv før Ekstrem.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Ytelse med fulle kodekontroller og hypervisor-biten skjult.</string> + <string name="game_env_custom_value">Egendefinert verdi</string> + <string name="game_env_select_value">Velg verdi</string> + <string name="user_apps_section">Emulatorer & apper</string> + <string name="user_apps_add">Legg til</string> + <string name="user_apps_add_detail">Din egen app eller spill</string> + <string name="user_apps_kind_script">Skript</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Starter…</string> + <string name="user_apps_added">%1$s lagt til</string> + <string name="user_apps_removed">%1$s fjernet</string> + <string name="user_apps_back">Skrivebord</string> + <string name="user_apps_gone">Appen finnes ikke lenger. Velg den på nytt fra Skrivebord.</string> + <string name="user_apps_open">Åpne %1$s</string> + <string name="user_apps_remove">Fjern</string> + <string name="user_apps_remove_confirm">Trykk igjen for å fjerne</string> + <string name="user_apps_stop_session">Avslutt sesjonen for å fjerne</string> + <string name="user_apps_script_linked">Kjører %1$s fra mappen sin, lenket inn i sesjonen der den ligger. Fjerning av appen lar mappen være i fred.</string> + <string name="user_apps_script_copied">Kjører %1$s fra en kopi av mappen sin inne i DroidDeck. Fjerning av appen sletter kopien, ikke originalen.</string> + <string name="user_apps_runtime_required">Installer Linux-kjøretiden først</string> + <string name="user_apps_file_gone">Filen finnes ikke lenger</string> + <string name="user_apps_no_space">Ikke nok ledig plass: å kopiere mappen krever %1$s</string> + <string name="user_apps_copying">Kopierer %1$s</string> + <string name="user_apps_failed">Kunne ikke legge til appen</string> + <string name="user_apps_github_checking">Søker etter en utgivelse av %1$s</string> + <string name="user_apps_github_unreachable">Kunne ikke lese utgivelsene til %1$s</string> + <string name="user_apps_github_no_appimage">Ingen utgivelse av %1$s har en ARM64- eller x86_64-AppImage</string> + <string name="user_apps_downloading">Laster ned %1$s</string> + <string name="user_apps_download_failed">Nedlastingen mislyktes</string> + <string name="user_apps_update_failed">Oppdatering av appen mislyktes</string> + <string name="user_apps_icon_failed">Dette ikonet kunne ikke leses</string> + <string name="user_apps_saved">%1$s lagret</string> + <string name="user_apps_edit">Rediger</string> + <string name="user_apps_check_updates">Se etter oppdateringer</string> + <string name="user_apps_checking_updates">Ser etter oppdateringer…</string> + <string name="user_apps_update_to">Oppdater til %1$s</string> + <string name="user_apps_up_to_date">Oppdatert · %1$s</string> + <string name="user_apps_updated">%1$s oppdatert</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Legg til en app</string> + <string name="add_app_tab_script">Skript</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">En .sh-fil. Den kjører fra sin egen mappe, i fullskjerm under gamescope.</string> + <string name="add_app_appimage_hint">En ARM64 (aarch64) AppImage, eller en x86_64-AppImage som kjører via FEX. Den pakkes ut i Linux-kjøretiden én gang.</string> + <string name="add_app_github_hint">Installerer ARM64-AppImage-filen fra den nyeste utgivelsen i repositoriet, eller x86_64-filen via FEX.</string> + <string name="app_fex_title">Bruk FEX</string> + <string name="app_fex_auto">Auto</string> + <string name="app_fex_on">På</string> + <string name="app_fex_off">Av</string> + <string name="app_fex_hint">FEX kjører x86-Linux-programmer på denne ARM64-enheten. Auto bruker det når programmet er bygget for x86.</string> + <string name="app_fex_x86">%1$s via FEX</string> + <string name="app_fex_not_ready">Dette programmet er bygget for %1$s-PC-er og kjører via FEX, som ikke er satt opp ennå. Åpne Steam én gang mens du er innlogget: DroidDeck lar den laste ned FEX og Steam Linux Runtime den trenger, og så åpnes dette.</string> + <string name="session_end_program">Dette programmet</string> + <string name="session_end_fex_missing">%1$s er bygget for x86-PC-er og kjører via FEX, som ikke er installert ennå. Start Steam én gang mens du er innlogget, og la den laste ned FEX og Steam Linux Runtime, og start dette på nytt.</string> + <string name="add_app_flatpak_hint">En Flathub-app-ID eller dens Flathub-side. Flatpak settes opp først hvis det ikke allerede er gjort.</string> + <string name="add_app_file">Fil</string> + <string name="add_app_no_file">Ingen fil valgt</string> + <string name="add_app_choose_file">Velg fil</string> + <string name="add_app_change_file">Endre</string> + <string name="add_app_pick_script">Velg et skript</string> + <string name="add_app_pick_appimage">Velg en AppImage</string> + <string name="add_app_pick_icon">Velg et ikon</string> + <string name="add_app_repository">Repositorium</string> + <string name="add_app_repository_placeholder">eier/repo eller en github.com-lenke</string> + <string name="add_app_repository_invalid">Ikke et GitHub-repositorium</string> + <string name="add_app_flatpak_id">App-ID</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Ikke en gyldig Flathub-app-ID</string> + <string name="add_app_flatpak_bundle_hint">Eller en .flatpak-fil, for en app som ikke er på Flathub.</string> + <string name="add_app_pick_flatpak">Velg en .flatpak-fil</string> + <string name="add_app_source">Kilde</string> + <string name="add_app_appearance">På skrivebordet ditt</string> + <string name="add_app_preview_name">Ny app</string> + <string name="add_app_name">Navn</string> + <string name="add_app_name_placeholder">Fra appen</string> + <string name="add_app_icon">Ikon</string> + <string name="add_app_icon_default">Standardikon</string> + <string name="add_app_choose_icon">Velg ikon</string> + <string name="add_app_clear_icon">Fjern</string> + <string name="add_app_icon_suggestions">Fra repositoriet</string> + <string name="add_app_icon_searching">Søker etter ikoner…</string> + <string name="add_app_icon_reset">Standard</string> + <string name="edit_app_title">Rediger %1$s</string> + <string name="edit_app_save">Lagre</string> + <string name="add_app_checking_folder">Kontrollerer mappen…</string> + <string name="add_app_folder_linked">Mappen er lenket inn i sesjonen: %1$s</string> + <string name="add_app_folder_copied">Mappen inneholder Linux-programmer, som delt lagring ikke kan kjøre, så den kopieres inn i DroidDeck (%1$s).</string> + <string name="add_app_confirm">Legg til</string> + <string name="add_app_cancel">Avbryt</string> + <string name="add_app_runtime_required">Installer Linux-kjøretiden fra Oppsett først.</string> + <string name="add_app_busy">Vent til %1$s er ferdig.</string> + <string name="steam_compat_label">Kompatibel</string> + <string name="proton_compatible_note">Builder merket «%1$s» i Steams Kompatibilitet-meny har DroidDecks prefiksfiksing og starter spill her. Standarden er Proton Experimental ARM64 (%1$s), eller Proton 11.0 ARM64 (%1$s) når den nyere builden er installert. Valves egne Proton-oppføringer uten merket kan ikke starte et spill på denne enheten.</string> + <string name="proton_installed_compatible">Installert %1$s · %2$s</string> + <string name="common_cancel">Avbryt</string> + <string name="common_auto">Auto</string> + <string name="common_never">Aldri</string> + <string name="common_always">Alltid</string> + <string name="common_uninstall">Avinstaller</string> + <string name="common_check">Se etter</string> + <string name="common_update">Oppdater</string> + <string name="common_checking">Ser etter…</string> + <string name="common_working">Arbeider…</string> + <string name="common_forget">Glem</string> + <string name="common_add_ellipsis">Legg til…</string> + <string name="common_use">Bruk</string> + <string name="common_applies_next_session">Gjelder fra neste sesjon.</string> + <string name="mode_steam_title">Steam-sesjon</string> + <string name="mode_desktop_title">Skrivebordssesjon</string> + <string name="mode_display">Skjerm</string> + <string name="mode_resolution">Oppløsning</string> + <string name="mode_res_720">Opptil 720p</string> + <string name="mode_res_900">Opptil 900p</string> + <string name="mode_res_1080">Opptil 1080p</string> + <string name="mode_res_native">Nativ</string> + <string name="mode_res_default">%1$s (standard)</string> + <string name="mode_res_custom_value">Egendefinert · %1$d×%2$d</string> + <string name="mode_res_custom">Egendefinert…</string> + <string name="mode_res_note">720p kan gjøre menyer mer responsive.</string> + <string name="mode_ratio">Skjermforhold</string> + <string name="mode_ratio_custom">Angis av den egendefinerte oppløsningen.</string> + <string name="mode_ratio_auto">Auto bruker minst 16:9.</string> + <string name="mode_fps">Bildefrekvensgrense</string> + <string name="mode_fps_note">Begrenser hele sesjonen. Skjermen bytter til en oppdateringsfrekvens som grensen går opp i.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10-utgang</string> + <string name="mode_hdr_unavailable">Ikke tilgjengelig: %1$s.</string> + <string name="mode_hdr_restart">Start appen på nytt for å bruke dette.</string> + <string name="mode_drivers">Drivere</string> + <string name="mode_gpu_drivers">GPU-drivere</string> + <string name="mode_gpu_drivers_hint">Delt av Steam og Skrivebord. Angis på Komponenter-siden.</string> + <string name="mode_touch_controls">Berøring og kontroller</string> + <string name="mode_touch">Berøring</string> + <string name="mode_touch_touchpad">Styreflate</string> + <string name="mode_touch_direct">Direkte</string> + <string name="mode_touch_note">Auto: styreflate på Skrivebord, direkte i Steam.</string> + <string name="mode_osc">Skjermkontroller</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Auto viser kontrollene når ingen kontroller er tilkoblet.</string> + <string name="osc_steam_touch">Steam-berøring (beta)</string> + <string name="osc_style_next_session">Steams berøringskontroller starter med neste Steam-sesjon</string> + <string name="osc_steam_layout">Steam-berøringslayout</string> + <string name="osc_steam_layout_hint">Flytt, endre størrelse på eller skjul dette spillets berøringskontroller; lagres til Steam</string> + <string name="mode_controller">Kontroller</string> + <string name="mode_controller_hint">Hvordan Steam ser kontrolleren din. Gjelder fra neste sesjon.</string> + <string name="mode_controller_deck">Steam Deck-kontroller</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Xbox 360-kontroller</string> + <string name="mode_controller_note">Deck: Hurtigmeny-knapp og gyro. Steam Controller: det samme, med gripesensor på bakknappene. DualShock 4 og DualSense: gyro, og styreflatene som styreflate. Xbox 360: åpne Hurtigmenyen med Guide+A.</string> + <string name="mode_back">Tilbake</string> + <string name="back_menu_then_qam">Meny → QAM</string> + <string name="back_qam_then_menu">QAM → Meny</string> + <string name="mode_session">Sesjon</string> + <string name="mode_suspend">Bakgrunnsoppførsel</string> + <string name="mode_suspend_hint">Når appen er skjult eller skjermen slås av.</string> + <string name="mode_suspend_manual">Manuell</string> + <string name="mode_suspend_native">Nativ</string> + <string name="mode_suspend_steam_note">Auto setter på pause og gjenopptar når den vises. Nativ forbereder Steam på hvilemodus først. Manuell venter på Gjenoppta. Aldri lar den fortsette å kjøre.</string> + <string name="mode_background_downloads">La nedlastinger fortsette</string> + <string name="mode_background_downloads_hint">Utsetter bakgrunnspause mens Steam laster aktivt ned.</string> + <string name="mode_zram">zRAM-komprimering</string> + <string name="mode_zram_hint">Mens et spill kjører, komprimeres minnet til Steam-klienten til enhetens zram, slik at spillet får mer RAM. Gjelder neste gang Steam starter.</string> + <string name="mode_zram_unsupported">Ikke tilgjengelig: enheten har ingen zram eller swap, eller kjernen er eldre enn 5.4.</string> + <string name="mode_suspend_note">Auto setter på pause i bakgrunnen og gjenopptar når den vises. Manuell venter på Gjenoppta. Aldri lar den fortsette å kjøre.</string> + <string name="mode_startup">Oppstart</string> + <string name="mode_steam_startup">Start Steam med DroidDeck</string> + <string name="mode_steam_startup_hint">Åpner Steam-sesjonen når DroidDeck starter.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Ser etter utgivelser…</string> + <string name="mode_decky_ready">Klar til å installere %1$s.</string> + <string name="mode_decky_none">Ingen kompatibel build funnet. Prøv igjen senere.</string> + <string name="mode_decky_installed">Installert · %1$s</string> + <string name="mode_decky_update">Oppdatering tilgjengelig · %1$s</string> + <string name="mode_decky_current">Oppdatert · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Installer nyeste</string> + <string name="mode_decky_on">Starter med Steam. Mens på, kan andre apper på denne enheten kanskje styre Steam.</string> + <string name="mode_decky_off">Av. Steams fjernsøkeport for feilsøking forblir stengt.</string> + <string name="mode_decky_remove_title">Avinstaller Decky Loader?</string> + <string name="mode_decky_remove_text">Fjerner loaderen. Programtilleggene og innstillingene dine beholdes.</string> + <string name="mode_client">Klient</string> + <string name="mode_mangoapp">Ytelsesoverlegg</string> + <string name="mode_mangoapp_hint">Slå av hvis spill krasjer eller blir svarte i Deck-modus. Gjelder fra neste sesjon.</string> + <string name="mode_steam_repair">Reparer Steam-klienten</string> + <string name="mode_steam_repair_hint">Laster ned Steam-klienten igjen neste gang Steam starter. Bruk dette hvis Steam blir hengende på lasteskjermen. Spill, innlogging og innstillinger beholdes.</string> + <string name="mode_steam_repair_queued">Steam-klienten lastes ned igjen neste gang Steam starter.</string> + <string name="mode_steam_repair_button">Reparer</string> + <string name="mode_added_art">Grafikk</string> + <string name="mode_sgdb_key">SteamGridDB API-nøkkel</string> + <string name="mode_sgdb_key_yours">Nøkkelen din</string> + <string name="mode_sgdb_edit">Rediger…</string> + <string name="mode_added_art_hint">Fyller inn manglende grafikk fra Steam, deretter SteamGridDB. Din egen cover.jpg, hero.jpg, logo.png eller icon.png i spillmappen har forrang.</string> + <string name="summary_remove_game">Fjern %1$s</string> + <string name="mode_added_remove_confirm">Fjerne?</string> + <string name="games_add">Legg til spill</string> + <string name="games_add_title">Legg til et spill:</string> + <string name="games_pick_exe_title">Velg exe-filen:</string> + <string name="games_add_unreachable">Denne plasseringen er ikke tilgjengelig i sesjonen</string> + <string name="mode_added_exe_check">Kontroller denne exe-filen</string> + <string name="wincomp_title">Windows-komponenter</string> + <string name="wincomp_pad_hint">LB/RB hopper mellom delene.</string> + <string name="wincomp_card_none">Ingen</string> + <string name="wincomp_applies">Windows-DLL-er Proton ikke inkluderer, fra komponentlisten. Slå på de dette spillet trenger: de legges inn i spillets egen Windows-mappe, aldri i filene det kom med, og blir med uansett hvilken Proton det kjører på.</string> + <string name="wincomp_offline">Kunne ikke nå komponentlisten. Komponenter som allerede er lastet ned, kan fremdeles slås av og på.</string> + <string name="wincomp_recommended">Anbefalt for dette spillet</string> + <string name="wincomp_checking">Ser på hva dette spillet trenger…</string> + <string name="wincomp_when_online">Tilgjengelig når du er tilkoblet</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Slår på %1$d komponent…</item> + <item quantity="other">Slår på %1$d komponenter…</item> + </plurals> + <string name="wincomp_auto_section">På for dette spillet</string> + <string name="wincomp_auto_steam">Steam installerer %1$s med %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">Fra GOGs liste for dette spillet</string> + <string name="wincomp_auto_epic">Fra Epics forutsetninger for dette spillet</string> + <string name="wincomp_auto_amazon">Fra Amazons installasjonssteg for dette spillet</string> + <string name="wincomp_steam_by_name">Steam installerer %1$s med app %2$s, matchet etter navn</string> + <string name="wincomp_suggestions">Også oppført</string> + <string name="wincomp_suggestion_reason">Oppført av %1$s; ikke en komponent her</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Spillet leveres med %1$s</string> + <string name="wincomp_found_shipped">Spillet har %1$s (fungerer ofte som det er)</string> + <string name="wincomp_already_here">Allerede i dette spillet</string> + <string name="wincomp_no_recommendation">Ingenting i spillets mappe peker på en komponent.</string> + <string name="wincomp_active">Installert for dette spillet (%1$d)</string> + <string name="wincomp_all">Alle komponenter (%1$d)</string> + <string name="wincomp_installers">Krever et Windows-installasjonsprogram (%1$d)</string> + <string name="wincomp_installers_note">Disse er egne installasjonsprogrammer uten en pakke inni å ta fra hverandre, og ingen oversikt over hva de installerer ennå. De fleste er gamle kjøretider som Mono inne i Proton allerede dekker; oversikter legges til etter hvert som de blir laget.</string> + <string name="wincomp_show">Vis</string> + <string name="wincomp_hide">Skjul</string> + <string name="wincomp_needs_installer">Kjører sitt eget installasjonsprogram (ingen oversikt ennå)</string> + <string name="wincomp_unsupported">Ikke støttet her ennå</string> + <string name="wincomp_loading">Laster komponentene…</string> + <string name="wincomp_failed">Kunne ikke installere: %1$s</string> + <string name="wincomp_downloaded">Lastet ned</string> + <string name="wincomp_downloading">Laster ned %1$s</string> + <string name="wincomp_installing">Installerer: %1$s</string> + <string name="wincomp_reverting">Slår av…</string> + <string name="wincomp_download_size">%1$s nedlasting</string> + <string name="wincomp_next_launch">Trer i kraft neste gang spillet starter.</string> + <string name="mode_stretch169">Strekk 16:9-spill</string> + <string name="mode_stretch169_hint">På skjermer som er mer kvadratiske enn 16:9, strekkes spill til å fylle skjermen i stedet for å vise sorte striper. Gjelder fra neste sesjon.</string> + <string name="mode_audio">Lyd</string> + <string name="mode_directaudio">DirectAudio for spill</string> + <string name="mode_directaudio_hint">Går forbi PulseAudio for lavere ventetid.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">For talechat.</string> + <string name="mode_network">Nettverk</string> + <string name="mode_wifi_discovery">Wi-Fi-oppdagelse</string> + <string name="mode_wifi_discovery_hint">Vis Wi-Fi-navn og nettverk i nærheten i Steam.</string> + <string name="mode_wifi_location_off">Posisjonstjenester er av.</string> + <string name="mode_wifi_permission_denied">Posisjonstillatelse ikke gitt.</string> + <string name="mode_wifi_open_settings">Åpne innstillinger</string> + <string name="mode_wifi_continue">Fortsett</string> + <string name="mode_wifi_explain_title">Slå på Wi-Fi-oppdagelse?</string> + <string name="mode_wifi_explain_text">Android krever posisjonstillatelse for å lese Wi-Fi-navn og oppdage nettverk i nærheten. DroidDeck bruker denne tillatelsen til å vise disse nettverkene i Steam. Vi følger ikke med på posisjonen din. Internett-tilgang fungerer uten denne tillatelsen.</string> + <string name="mode_storage">Spillagring</string> + <string name="mode_storage_auto">Automatisk – SD-kortet når det finnes, pluss Spill-mappene dine</string> + <string name="mode_storage_auto_none">Automatisk – Spill-mappene dine, pluss SD-kortet når det finnes (ingen nå)</string> + <string name="mode_storage_internal">Bare intern</string> + <string name="mode_storage_folder">Mappe: %1$s</string> + <string name="mode_second_library">Andre bibliotek</string> + <string name="mode_storage_note">Spill som strømmer ressurser fra SD-kort eller delt lagring kan hakke.</string> + <string name="mode_storage_diagnostics">Lagringsdiagnostikk</string> + <string name="mode_storage_diagnostics_hint">Lagrer tildelingsresultater og tidsmålinger for lagring i Del logger. Kan gjøre installasjoner tregere mens dette er på. Gjelder fra neste sesjon.</string> + <string name="mode_choose_folder">Velg en mappe…</string> + <string name="mode_custom_res_title">Egendefinert oppløsning</string> + <string name="mode_custom_res_text">Erstatter grensen og forholdet. En størrelse som ikke passer skjermen, gir sorte striper.</string> + <string name="mode_width">Bredde</string> + <string name="mode_height">Høyde</string> + <string name="mode_custom_res_range">Mellom 320×240 og 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d spill</item> + <item quantity="other">%1$d spill</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Slett</string> + <string name="common_restore">Gjenopprett</string> + <string name="common_download">Last ned</string> + <string name="common_delete_named">Slett %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Kjøretidsdriver</string> + <string name="comp_runtime_driver_hint">Brukes av Steam, spill og skrivebordet. Gjelder fra neste sesjon.</string> + <string name="comp_import_turnip">Importer Turnip-zip…</string> + <string name="comp_display_driver">Skjermdriver</string> + <string name="comp_display_driver_hint">Tegner bilder til skjermen i begge moduser. Start appen på nytt for å bruke dette.</string> + <string name="comp_import_adrenotools">Importer en AdrenoTools-zip…</string> + <string name="comp_never">aldri</string> + <string name="comp_nightlies_checked">Nightlies sjekket %1$s</string> + <string name="comp_title">Komponenter</string> + <string name="comp_about">Om Komponenter</string> + <string name="comp_check_drivers">Se etter nye drivere</string> + <string name="comp_check_nightlies">Se etter nye pakker på Nightlies</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Protonen som velges her, kjører hvert spill som ikke har valgt sin egen i Steam, og en endring gjort i Steam vises også her. Steam erstatter Valves Proton når den oppdaterer; originalene beholdes per build.</string> + <string name="comp_scope">Konfigurasjon</string> + <string name="comp_profile_configure">Konfigurer profil</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Standardprofil</string> + <string name="comp_scope_general_detail">Brukes automatisk av spill uten overstyringer.</string> + <string name="comp_profile_game_detail">Lagrede innstillinger brukes automatisk når %1$s starter.</string> + <string name="comp_game_hint">Velg bare innstillingene dette spillet trenger. Alt annet fortsetter å bruke standardprofilen.</string> + <string name="comp_game_fex">FEX-forhåndsinnstilling</string> + <string name="comp_game_fex_inherited">Bruker forhåndsinnstillingen fra standardprofilen.</string> + <string name="comp_game_fex_override">Egendefinert forhåndsinnstilling lagret for dette spillet.</string> + <string name="comp_game_fex_custom">Egendefinerte FEX-variabler</string> + <string name="comp_game_use_general">Bruk standard</string> + <string name="comp_game_compatibility">Spillkompatibilitet</string> + <string name="comp_game_environment_hint">Proton-, DXVK-, VKD3D- og synkroniseringsalternativer for dette spillet.</string> + <string name="comp_game_proton_inherited">Bruker Protonen fra standardprofilen.</string> + <string name="comp_game_proton_override">Egendefinert Proton lagret for dette spillet via Steams kompatibilitetstilordning.</string> + <string name="comp_no_proton_short">Ingen Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Bruker komponentpakken fra standardprofilen fra %1$s, med mindre dette spillet velger en annen pakke.</string> + <string name="comp_game_component_general">Bruker standardprofilens komponentpakke.</string> + <string name="comp_game_component_override">Bruker bare %1$s for dette spillet.</string> + <string name="comp_game_runtime_options">Kjøretidsalternativer</string> + <string name="comp_game_environment_other_hint">Andre spillspesifikke Proton-, DXVK-, VKD3D-Proton- og synkroniseringsalternativer.</string> + <string name="comp_game_saved_next">Profilen til %1$s er lagret for neste spilløkt.</string> + <string name="game_no_steam_title">Start uten Steam</string> + <string name="game_no_steam_detail">Åpner det i Proton/FEX uten Steam-klienten; Steam-funksjoner er av.</string> + <string name="game_no_steam_on">På</string> + <string name="game_steam_with">Starter med Steam</string> + <string name="game_steam_without">Starter uten Steam</string> + <string name="game_settings_card">Innstillinger</string> + <string name="game_settings_menu_title">Innstillinger for %1$s</string> + <string name="game_settings_default">Standard</string> + <string name="game_settings_default_detail">Setter alt som er endret for dette spillet, tilbake til appens innstillinger.</string> + <string name="game_sync_custom">Egendefinerte synkroniseringsvariabler</string> + <string name="comp_game_proton_live">Proton-valget til %1$s er lagret og tilgjengelig i Steam nå.</string> + <string name="comp_game_proton_next">Proton-valget til %1$s er lagret. Start Steam på nytt før du starter spillet.</string> + <string name="comp_game_proton_not_runnable">%1$s kan ikke bruke den valgte Protonen på denne enheten.</string> + <string name="comp_game_load_failed">Kunne ikke laste profilen til %1$s: %2$s</string> + <string name="comp_game_save_failed">Spillprofilen kunne ikke lagres: %1$s</string> + <string name="comp_game_reset">Nullstill spillprofil</string> + <string name="comp_game_reset_title">Nullstille profilen til %1$s?</string> + <string name="comp_game_reset_body">Fjerne dette spillets overstyringer for Proton, FEX, komponentpakke, miljø, teksturfiltrering og Windows-komponenter? Det vil bruke standardprofilen.</string> + <string name="comp_game_reset_done">%1$s bruker nå standardprofilen.</string> + <string name="comp_game_reset_failed">Spillprofilen kunne ikke nullstilles helt: %1$s</string> + <string name="comp_default_live">%1$s kjører nå hvert spill som ikke har valgt sin egen Proton i Steam.</string> + <string name="comp_default_next">%1$s vil kjøre hvert spill som ikke har valgt sin egen Proton, fra neste gang Steam starter.</string> + <string name="comp_default_not_runnable">%1$s kan ikke starte spill her, så den kan ikke være standarden.</string> + <string name="comp_default_failed">Standard-Protonen kunne ikke lagres: %1$s</string> + <string name="comp_swapped">%1$s · %2$d byttet ut</string> + <string name="comp_all_original">%1$s · alt originalt</string> + <string name="comp_game_running_suffix">%1$s · spillet kjører</string> + <string name="comp_esync_pack">%1$s · droiddeck-esync-pakke</string> + <string name="comp_esync_wanted">%1$s · ingen droiddeck-esync-pakke ennå</string> + <string name="comp_esync_builtin">%1$s · esync innebygd, ingen pakke nødvendig</string> + <string name="comp_gpu_drivers">GPU-drivere</string> + <string name="comp_reapplied">%1$s · brukt på nytt ved start %2$s</string> + <string name="comp_next_queued">Neste: %1$s · etter at spillet avsluttes</string> + <string name="comp_in_use">%1$s i bruk: %2$s</string> + <string name="comp_waits">Venter til spillet avsluttes</string> + <string name="comp_applies_next_game">Gjelder neste gang et spill starter</string> + <string name="comp_import_zip">Importer .zip</string> + <string name="comp_reading">Leser Protoner…</string> + <string name="comp_no_proton">Ingen Proton installert ennå. Start Steam én gang for å laste ned dens ARM64-Proton, eller legg til GE-Proton, CachyOS eller DroidDeck-Proton fra Oppsett.</string> + <string name="comp_original">Original · %1$s</string> + <string name="comp_this_build">%1$s · denne builden</string> + <string name="comp_earlier_build">%1$s · tidligere build</string> + <string name="comp_installed_count">Installert · %1$d</string> + <string name="comp_nothing_stored">Ingenting lagret for %1$s ennå. Denne Protonens egne filer lagres som dens original.</string> + <string name="comp_waits_long">Et spill kjører på denne Protonen, så dette venter til det avsluttes.</string> + <string name="comp_applies_long">Gjelder neste gang et spill starter.</string> + <string name="comp_swap_title">Bytte ut %1$s?</string> + <string name="comp_swap_body">Sette %1$s inn i %2$s? De originale filene forblir lagret. %3$s</string> + <string name="comp_restore_title">Gjenopprette %1$s?</string> + <string name="comp_restore_body">Sette %1$s-originalen tilbake i %2$s? %3$s</string> + <string name="comp_delete_package_body">Fjerner pakken fra appen. Du kan laste den ned igjen.</string> + <string name="comp_delete_original_title">Slette denne originalen?</string> + <string name="comp_delete_original_body">Denne %1$s-originalen er fra en tidligere build av %2$s. Den gjeldende buildens original beholdes alltid.</string> + <string name="comp_nightlies_count">På Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Oppdater for å liste pakker på Nightlies.</string> + <string name="comp_nothing_new">Ingenting nytt siden siste sjekk.</string> + <string name="comp_import_wcp">Importer .wcp</string> + <string name="comp_restore_original">Gjenopprett denne Protonens original</string> + <string name="comp_restore_original_body">Sette %1$ss original %2$s tilbake?</string> + <string name="comp_swap">Bytt ut</string> + <string name="comp_about_text">FEX, DXVK og VKD3D-Proton for hver Proton som Steam kjører spill med.\n\nVelg en installert rad for å bytte den inn. Det gjelder neste gang et spill starter, eller etter at det kjørende spillet avsluttes.\n\nValgene dine kontrolleres på nytt før hver start og settes tilbake hvis noe har endret dem. Hver Protons originale filer beholdes, så Steam-oppdateringer mister dem aldri.</string> + <string name="comp_tag_original">Original</string> + <string name="comp_tag_in_use">I bruk</string> + <string name="comp_tag_new">Ny</string> + <string name="comp_tag_stored">Lagret</string> + <string name="perf_title">Ytelse</string> + <string name="perf_lede">CPU-kjerner, sesjonsfikser og vertsnavnet. Gjelder fra neste sesjon.</string> + <string name="perf_client_cores_group">Steam-klientens kjerner</string> + <string name="perf_override">Overstyr Steams kjernevalg</string> + <string name="perf_override_hint">Fester Steam, dets grensesnitthjelper og gamescope til kjernene under.</string> + <string name="perf_client_cores">Klientkjerner</string> + <string name="perf_client_cores_on">Kjerner for Steam.</string> + <string name="perf_client_cores_off">Slå på overstyringen for å velge.</string> + <string name="perf_game_cores_group">Spillkjerner</string> + <string name="perf_game_cores">Spillkjerner</string> + <string name="perf_game_cores_hint">Kjerner for spill. Med alle valgt, planlegger Android fritt.</string> + <string name="perf_client_ui">Klientgrensesnitt</string> + <string name="perf_glthread">Trådet GL</string> + <string name="perf_glthread_hint">Kan gjøre Steam-menyer mer responsive.</string> + <string name="perf_zink">Zink: lazy descriptors</string> + <string name="perf_zink_hint">Anbefales for drivere uten descriptor buffers.</string> + <string name="perf_noglerror">Hopp over GL-feilkontroller</string> + <string name="perf_noglerror_hint">Slår av GL-validering per kall.</string> + <string name="perf_gsrealtime">gamescope: realtime GPU-kø</string> + <string name="perf_gsrealtime_hint">Prioriterer kompositørens GPU-arbeid. Kan jevne ut bildetakten, på bekostning av spillene.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Hold GPU-en på toppfrekvens</string> + <string name="perf_gpuclock_hint">Bare Adreno. Færre hikk, mer batteribruk og varme.</string> + <string name="perf_fixes">Sesjonsfikser</string> + <string name="perf_sysmem">Turnip: sysmem-rendering</string> + <string name="perf_sysmem_hint">Raskere for Steam og de fleste spill. 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_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> + <string name="perf_esync_hint">Spillenes Windows-tråder venter på hverandre gjennom eventfd og delt minne i stedet for rundturer via wineserver. Bruker en droiddeck-esync-pakke laget for nettopp den Proton-builden; pakker hentes automatisk. Til det finnes en for en ny Proton-build, steppes droiddeck-fsync inn i stedet. Gjelder fra neste sesjon.</string> + <string name="perf_xalia_hint">Slår av Protons hjelper for kontrollernavigasjon, som koster CPU i hvert spill.</string> + <string name="perf_seccomp">Kjør proot uten seccomp</string> + <string name="perf_seccomp_hint">Kan fikse feil om manglende systemkall på noen kjerner. Kan redusere ytelsen.</string> + <string name="perf_fastpath">proot-hurtigvei</string> + <string name="perf_fastpath_needs_seccomp">Krever prootens seccomp-filter.</string> + <string name="perf_fastpath_hint">Raskere filoppslag og mindre hakking. Slå av hvis et program ikke finner filene sine.</string> + <string name="perf_identity">Sesjonsidentitet</string> + <string name="perf_hostname">Vertsnavn</string> + <string name="perf_hostname_hint">Navnet Steam ser for denne enheten. Tomt gjenoppretter %1$s.</string> + <string name="perf_hostname_invalid">Bare bokstaver, tall og bindestreker inni navnet, opptil 63 tegn.</string> + <string name="perf_phantom_warning">Android er satt til å avslutte denne sesjonen</string> + <string name="driver_installed">Installert</string> + <string name="driver_available">Tilgjengelig for nedlasting</string> + <string name="driver_nothing_new">Ingenting nytt siden siste sjekk.</string> + <string name="driver_restore_builtin">Gjenopprett innebygde drivere</string> + <string name="driver_delete_builtin">Innebygd i appen: dette fjerner de utpakkede filene og skjuler den. Gjenopprett innebygde drivere bringer den tilbake.</string> + <string name="driver_delete_bundle">Halvparten av en Android + Linux-pakke: begge halvdelene fjernes. En driver i bruk faller tilbake til standarden.</string> + <string name="driver_delete_plain">Filene fjernes fra appen.</string> + <string name="driver_delete_in_use">Filene fjernes. Den er i bruk, så standarden tar over.</string> + <string name="drawer_page_display">Skjerm</string> + <string name="drawer_page_effects">Effekter</string> + <string name="drawer_page_controls">Kontroller</string> + <string name="drawer_page_components">Komponenter</string> + <string name="drawer_page_controller">Kontroller</string> + <string name="drawer_page_settings">Innstillinger</string> + <string name="drawer_page_desc">%1$s-side</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Skrivebord</string> + <string name="drawer_steam_menu">Steam-meny</string> + <string name="drawer_quick_access">Hurtigmeny</string> + <string name="drawer_open_qam">Åpne Hurtigmenyen</string> + <string name="drawer_prev_page">Forrige side</string> + <string name="drawer_next_page">Neste side</string> + <string name="drawer_hud">Ytelses-HUD</string> + <string name="drawer_scaling">Skaleringsmodus</string> + <string name="drawer_scaling_sharpness">Skaleringsskarphet</string> + <string name="drawer_effects">Skjermeffekter</string> + <string name="drawer_effects_hint">Live. Koster litt GPU-tid mens en effekt er på.</string> + <string name="drawer_look">Forhåndsinnstillinger</string> + <string name="drawer_look_custom">Egendefinert</string> + <string name="drawer_effects_advanced">Avansert</string> + <string name="widgets_expanded">Utvidet</string> + <string name="widgets_collapsed">Sammenslått</string> + <string name="drawer_cas">Skarphet (CAS)</string> + <string name="drawer_cas_level">Skarphetsnivå</string> + <string name="drawer_fake_hdr">Falsk HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Start SteamVR</string> + <string name="steamvr_checking">Sjekker SteamVR…</string> + <string name="drawer_deband">Fargebåndfjerning</string> + <string name="drawer_deband_strength">Styrke på fargebåndfjerning</string> + <string name="drawer_brightness">Lysstyrke</string> + <string name="drawer_contrast">Kontrast</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Metning</string> + <string name="drawer_fxaa">FXAA (kantutjevning)</string> + <string name="drawer_toon">Tegnefilm-konturer</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Teksturfiltrering</string> + <string name="drawer_texture_hint">DirectX 9–11-spill, fra neste gang de starter.</string> + <string name="drawer_anisotropy">Anisotropisk filtrering</string> + <string name="drawer_texture_sharpness">Teksturskarphet</string> + <string name="drawer_texture_sharpness_note">En negativ mip-skjevhet: skarpere teksturer, litt glitring. Auto følger hvor mye sesjonen forstørres til skjermen.</string> + <string name="drawer_touch_auto">Auto (%1$s)</string> + <string name="drawer_keyboard">Tastatur</string> + <string name="drawer_latency">Forsinkelse</string> + <string name="drawer_low_latency_controller">Kontroller med lav forsinkelse</string> + <string name="drawer_low_latency_controller_hint">Kontrolleren rapporterer ved 1000 Hz i stedet for 250 Hz. Litt mer CPU.</string> + <string name="drawer_low_latency_touch">Berøring med lav forsinkelse</string> + <string name="drawer_low_latency_touch_hint">Berøringer hopper over bildeinnsamling; Steams berøringsstyring går ved 1000 Hz. Litt mer CPU.</string> + <string name="drawer_pc_keyboard">PC-tastatur</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Andre skjerm</string> + <string name="drawer_second_screen_mode">Modus</string> + <string name="drawer_second_screen_shows">Viser</string> + <string name="drawer_android_apps">Android-apper</string> + <string name="drawer_launch_app">Start en app</string> + <string name="common_hide">Skjul</string> + <string name="common_show">Vis</string> + <string name="drawer_no_apps">Ingen startbare apper</string> + <string name="drawer_session_behavior">Sesjonsoppførsel</string> + <string name="drawer_suspend_hint">Gjelder nå og for fremtidige sesjoner i denne modusen.</string> + <string name="drawer_next_session">Neste sesjon</string> + <string name="drawer_support">Support</string> + <string name="drawer_logs">Sesjonslogger</string> + <string name="drawer_logs_hint">Legg ved en feilrapport</string> + <string name="drawer_share_logs">Del logger</string> + <string name="drawer_background">Bakgrunn</string> + <string name="drawer_stop">Avslutt</string> + <string name="drawer_stop_title">Avslutte sesjonen?</string> + <string name="drawer_running_now">Kjører nå</string> + <string name="drawer_no_game">Ingen spill kjører på en Proton</string> + <string name="drawer_selected_profile">Spillprofil</string> + <string name="drawer_selected_profile_none">Profildetaljer er ikke tilgjengelige ennå.</string> + <string name="drawer_profile_refresh_failed_initial">Kunne ikke laste spillprofiler. Prøver automatisk igjen.</string> + <string name="drawer_profile_refresh_failed_stale">Kunne ikke oppdatere spillprofiler. Viser de siste tilgjengelige dataene; prøver automatisk igjen.</string> + <string name="drawer_profile_inspect_hint">Se og rediger de lagrede innstillingene som brukes neste gang.</string> + <string name="drawer_profile_default">Bruker standardprofilen</string> + <string name="drawer_profile_custom">Egendefinert profil</string> + <string name="drawer_component_inherited">Bruker %1$s fra standardprofilen.</string> + <string name="drawer_game_components_note">Endringer lagres i profilen til %1$s og gjelder neste gang spillet starter.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d spilloverstyring</item> + <item quantity="other">%1$d spilloverstyringer</item> + </plurals> + <string name="drawer_no_proton">Ingen Proton er installert ennå.</string> + <string name="drawer_game_running">spill kjører</string> + <string name="drawer_reapplied">brukt på nytt ved start %1$s</string> + <string name="drawer_original">Original</string> + <string name="drawer_components_note">Importer og slett på Komponenter-siden.</string> + <string name="setup_check_done">Ferdig</string> + <string name="setup_check_warn">Krever oppmerksomhet</string> + <string name="setup_check_busy">Arbeider</string> + <string name="setup_limit_adb_failed">Kontroller IP-adressen og porten for trådløs feilsøking, eller par på nytt hvis Android har fjernet denne enheten.</string> + <string name="setup_install">Installer</string> + <string name="setup_manage">Behandle</string> + <string name="setup_tab_overview">Oversikt</string> + <string name="setup_tab_controller">Kontroller</string> + <string name="setup_tab_session">Sesjon</string> + <string name="setup_tab_launcher">Launcher</string> + <string name="setup_title">Oppsett</string> + <string name="setup_all_set">● Alt klart</string> + <string name="setup_n_ready">%1$d av %2$d klare</string> + <string name="setup_system_check">Systemkontroll</string> + <string name="setup_gpu_supported">Enheten er støttet</string> + <string name="setup_gpu_untested">Utestet GPU</string> + <string name="setup_gpu_unsupported">GPU ikke støttet</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam krever en Adreno-driver; %1$s kan vise en svart skjerm</string> + <string name="setup_runtime">Linux-kjøretid</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Ikke installert · omtrent 3 GB, installeres ved første Spill</string> + <string name="setup_installed">Installert</string> + <string name="setup_runtime_update">%1$s · oppdatering tilgjengelig</string> + <string name="setup_runtime_current">%1$s · oppdatert</string> + <string name="setup_limit">Grense for underprosesser</string> + <string name="setup_limit_on">På · Android kan avslutte Steam. Det tar et minutt å slå den av.</string> + <string name="setup_limit_unset">Ikke angitt · Android kan avslutte Steam. Det tar et minutt å slå den av.</string> + <string name="setup_limit_unknown">Kunne ikke kontrolleres · det tar et minutt å slå den av.</string> + <string name="setup_fix_it">Fiks det</string> + <string name="setup_details">Detaljer</string> + <string name="setup_dev_options">Utvikleralternativer</string> + <string name="setup_use_wireless">Bruk trådløs feilsøking</string> + <string name="setup_check_again">Kontroller igjen</string> + <string name="setup_limit_turn_on">Slå på grensen</string> + <string name="setup_account">Steam-konto</string> + <string name="setup_signed_in_offline">Innlogget som %1$s · frakoblet modus</string> + <string name="setup_signed_in">Innlogget som %1$s</string> + <string name="setup_sign_in">Trykk på Spill og logg inn på Steam</string> + <string name="setup_tools">Verktøy</string> + <string name="setup_controller">Kontroller</string> + <string name="setup_controller_unavailable">Kontrollerinnstillinger er ikke tilgjengelige.</string> + <string name="setup_session">Sesjon</string> + <string name="setup_logs">Sesjonslogger</string> + <string name="setup_logs_hint">Lagret etter hver sesjon</string> + <string name="setup_agent_commands">Feilsøkingsverktøy</string> + <string name="setup_latest_logs">Nyeste sesjonslogger</string> + <string name="setup_saved_logs">Lagrede sesjonslogger</string> + <string name="setup_saved_logs_hint">Beholder de %1$d nyeste</string> + <string name="setup_clear_logs">Tøm logger</string> + <string name="setup_reset_settings">Tilbakestill alle innstillinger</string> + <string name="setup_reset_settings_hint">Sett hver innstilling tilbake til standardverdien</string> + <string name="setup_reset_settings_button">Tilbakestill</string> + <string name="setup_reset_settings_title">Tilbakestille alle innstillinger?</string> + <string name="setup_reset_settings_body">Innstillinger for bilde, ytelse, kontroller, tema, språk og launcher går tilbake til standard. Spillene dine, Steam-påloggingen, butikkontoene, nedlastede drivere og lagringsmappene beholdes.</string> + <string name="setup_reset_settings_profiles">Tilbakestill også spillprofiler (Proton, FEX, komponenter og kjøretidsmiljø per spill, samt kjøretidsmiljøet for Standard-profilen)</string> + <string name="setup_reset_settings_session_running">Stopp økten før du tilbakestiller innstillinger.</string> + <string name="setup_reset_settings_partial">Innstillingene ble tilbakestilt, men ikke alle. Detaljene står i loggen.</string> + <string name="setup_offline">Frakoblet modus</string> + <string name="setup_sign_in_first">Logg inn på Steam først</string> + <string name="setup_launcher">Launcher</string> + <string name="setup_language">Språk</string> + <string name="setup_language_hint">Steam bruker det også, fra neste gang den starter.</string> + <string name="setup_language_system">Systemstandard (%1$s)</string> + <string name="setup_language_system_short">Systemstandard</string> + <string name="setup_app_scale">Appskalering</string> + <string name="setup_app_scale_hint">Tekst og kontroller i DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (Standard)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Launcherens utseende</string> + <string name="setup_home">Bruk som Hjem-skjerm</string> + <string name="setup_home_on">DroidDeck kan være Hjem-appen</string> + <string name="setup_home_off">DroidDeck tilbys aldri som en Hjem-app</string> + <string name="setup_orientation">Retning</string> + <string name="setup_orientation_auto">Automatisk liggende</string> + <string name="setup_orientation_landscape">Liggende</string> + <string name="setup_orientation_reverse">Omvendt liggende</string> + <string name="setup_fullscreen">Fullskjerm</string> + <string name="setup_fullscreen_on">Skjuler Androids status- og navigasjonslinjer</string> + <string name="setup_fullscreen_off">Viser Androids status- og navigasjonslinjer</string> + <string name="setup_default_home">Standard Hjem-app</string> + <string name="setup_choose_home">Velg en Hjem-app</string> + <string name="setup_choose">Velg</string> + <string name="setup_linux_apps">Linux-apper (beta)</string> + <string name="setup_tool_files">Filer</string> + <string name="setup_tool_files_hint">Bla gjennom og behandle filer</string> + <string name="setup_tool_protons">Proton-versjoner</string> + <string name="setup_tool_protons_hint">Installer ARM64 Proton-builder</string> + <string name="setup_tool_performance">Ytelse</string> + <string name="setup_tool_performance_hint">Tildeling av CPU-kjerner</string> + <string name="setup_tool_roms">ROM-mappe</string> + <string name="setup_tool_roms_hint">Hvor emulatorspill lagres</string> + <string name="setup_card_components">Komponenter</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Kontroller</string> + <string name="setup_card_controls_hint">Knappetilordning</string> + <string name="store_tab_discover">Utforsk</string> + <string name="store_tab_search">Søk</string> + <string name="store_tab_installed">Installert</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Butikk</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak klar</string> + <string name="store_needs_runtime">Installer Linux-kjøretiden fra Oppsett først.</string> + <string name="store_setup_title">Sett opp Flatpak</string> + <string name="store_setup_text">Legger til Flatpak og kobler det til Flathub (omtrent 20 MB). Den første appen laster også ned kjøretiden sin.</string> + <string name="store_setting_up">Setter opp…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Oppdateringer</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Starter…</string> + <string name="store_categories">Kategorier</string> + <string name="store_unreachable">Kunne ikke nå Flathub. Kontroller tilkoblingen og prøv igjen.</string> + <string name="store_try_again">Prøv igjen</string> + <string name="store_search_label">Søk på Flathub</string> + <string name="store_search_placeholder">Firefox, spill, emulatorer…</string> + <string name="store_search">Søk</string> + <string name="store_all">Alle</string> + <string name="store_searching">Søker…</string> + <string name="store_search_hint">Søk etter navn eller velg en kategori. Bare ARM64-apper er listet.</string> + <string name="store_no_results">Ingen ARM64-apper på Flathub matcher det.</string> + <string name="store_results">Resultater</string> + <string name="store_check_updates">Se etter oppdateringer</string> + <string name="store_update_all">Oppdater alle (%1$d)</string> + <string name="store_all_current">● Alt er oppdatert</string> + <string name="store_no_apps">Ingen apper ennå. Finn noen under Utforsk eller Søk.</string> + <string name="store_setup_first_note">Sett opp Flatpak for å installere apper.</string> + <string name="store_update_available_prefix">Oppdatering tilgjengelig · %1$s</string> + <string name="store_open">Åpne</string> + <string name="store_details">Detaljer</string> + <string name="store_remove">Fjern</string> + <string name="store_press_again">Trykk igjen for å fjerne</string> + <string name="store_installing">Installerer…</string> + <string name="store_install">Installer</string> + <string name="store_setup_first">Sett opp Flatpak først</string> + <string name="store_download_size">%1$s nedlasting</string> + <string name="store_installed_chip">● Installert</string> + <string name="store_details_failed">Kunne ikke laste denne appens Flathub-side.</string> + <string name="store_loading">Laster fra Flathub…</string> + <string name="store_no_arm">Ingen ARM64-build på Flathub, så den kan ikke installeres her.</string> + <string name="store_screenshots">Skjermbilder</string> + <string name="store_about">Om</string> + <string name="store_app_id">App-ID</string> + <string name="store_license">Lisens</string> + <string name="store_runtime">Kjøretid</string> + <string name="store_installed_size">Installert størrelse</string> + <string name="store_installed_size_value">%1$s (pluss den delte kjøretiden)</string> + <string name="store_website">Nettside</string> + <string name="store_verified">Verifisert</string> + <string name="upd_title">Oppdateringer</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Sjekket %1$s</string> + <string name="upd_not_checked">Ikke sjekket ennå</string> + <string name="upd_perm_title">La DroidDeck oppdatere seg selv</string> + <string name="upd_perm_text">På neste skjerm, slå på Tillat fra denne kilden, og kom så tilbake. Oppdateringen fortsetter av seg selv.</string> + <string name="upd_open_settings">Åpne innstillinger</string> + <string name="upd_not_now">Ikke nå</string> + <string name="upd_signed_status">Signert annerledes</string> + <string name="upd_signed_headline">Kan ikke oppdatere direkte</string> + <string name="upd_signed_detail">Denne kopien er ikke signert med DroidDecks utgivelsesnøkkel, så oppdateringer kan ikke installeres over den. Avinstaller den for å bytte.</string> + <string name="upd_available">Oppdatering tilgjengelig</string> + <string name="upd_blocked_status">Kan ikke installere</string> + <string name="upd_switch">Klar til å bytte</string> + <string name="upd_ahead_status">Foran Stable</string> + <string name="upd_ahead_headline">Du er foran Stable</string> + <string name="upd_ahead_detail">Denne builden er nyere enn den nyeste Stable. Du flyttes til Stable med dens neste utgivelse.</string> + <string name="upd_gone_status">Testen er avsluttet</string> + <string name="upd_gone_headline">Denne testen er avsluttet</string> + <string name="upd_gone_detail">Fiksen ble slått sammen eller forkastet. Følg Preview for de nyeste fiksene.</string> + <string name="upd_current_status">Oppdatert</string> + <string name="upd_current_headline">Du har den nyeste %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Oppdater%1$s</string> + <string name="upd_install_button">Installer%1$s</string> + <string name="upd_install_anyway">Installer Stable %1$s likevel</string> + <string name="upd_follow_preview">Følg Preview</string> + <string name="upd_stop_session">Avslutt den kjørende sesjonen for å oppdatere.</string> + <string name="upd_less">Mindre</string> + <string name="upd_more">Mer</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Ny Preview-build</string> + <string name="upd_new_test">PR #%1$d-testbuild</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">OPPDATERINGSKANAL</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Testede utgivelser, for de fleste</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Nyeste fikser, før Stable</string> + <string name="upd_preview_current">Oppdatert</string> + <string name="upd_tests">Testbuilder</string> + <string name="upd_tests_hint">Prøv en fiks før den blir utgitt</string> + <string name="upd_tests_none">Ingen akkurat nå</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Ikke bygget for denne kopien av DroidDeck</string> + <string name="upd_updated">Oppdatert %1$s</string> + <string name="upd_test_name">PR #%1$d-testen</string> + <string name="upd_while_ago">en stund siden</string> + <string name="upd_just_now">akkurat nå</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d å prøve</item> + <item quantity="other">%1$d å prøve</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Endringer siden din build · %1$d build bak</item> + <item quantity="other">Endringer siden din build · %1$d builder bak</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Nylige endringer · %1$d build</item> + <item quantity="other">Nylige endringer · %1$d builder</item> + </plurals> + <string name="gate_title">En Android-innstilling å endre</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android stopper apper som starter mange bakgrunnsprosesser, og Steam starter dusinvis. Til dette endres, avsluttes spill uten en feilmelding.</string> + <string name="gate_fix_for_me">Fiks det for meg</string> + <string name="gate_toggle_steps">Slå på «Slå av begrensninger for underordnede prosesser», og kom så tilbake. La Utvikleralternativer stå på, ellers slår bryteren seg av igjen.</string> + <string name="gate_open_dev">Åpne Utvikleralternativer</string> + <string name="gate_no_toggle">Denne Android-versjonen har ingen bryter for det, så DroidDeck endrer det via trådløs feilsøking. Tar omtrent ett minutt, ingen datamaskin nødvendig.</string> + <string name="gate_needs_wifi">Trådløs feilsøking krever Wi-Fi. Hvilket nettverk som helst fungerer; det krever ikke internett.</string> + <string name="gate_needs_notifications">Koblingskoden kommer i en varsling. Tillat varslinger for DroidDeck, eller bruk Andre måter.</string> + <string name="gate_allow_notifications">Tillat varslinger</string> + <string name="gate_step1">Åpne Innstillinger → Utvikleralternativer → Trådløs feilsøking og slå det på</string> + <string name="gate_step2">Trykk på «Par enhet med koblingskode»</string> + <string name="gate_step3">Skriv koden inn i DroidDeck-varslingen</string> + <string name="gate_waiting">Venter på koblingsvarselet…</string> + <string name="gate_code_needed">Varsel funnet. Skriv inn koden i varslingen.</string> + <string name="gate_status">Status</string> + <string name="gate_polling">Kontrollerer hvert 2. sekund. Denne siden lukkes når det er av.</string> + <string name="gate_other_ways">Andre måter</string> + <string name="gate_other_toggle">Trådløs feilsøking, manuell adresse, ADB fra datamaskin</string> + <string name="gate_other_no_toggle">Manuell adresse, ADB fra datamaskin, Utvikleralternativer</string> + <string name="gate_use_wireless_instead">Bruk trådløs feilsøking i stedet</string> + <string name="gate_some_roms">Noen ROM-er legger til bryteren likevel. Se etter «child process» i Utvikleralternativer.</string> + <string name="gate_manual_hint">Hvis varslingen ikke fungerer, skriv inn varselets adresse og kode selv.</string> + <string name="gate_enter_manually">Skriv inn adresse manuelt</string> + <string name="gate_from_computer">Fra en datamaskin med ADB:</string> + <string name="gate_copy_command">Kopier kommando</string> + <string name="gate_choose_display">Velg hvilken skjerm Android-innstillinger skal åpnes på.</string> + <string name="gate_main_screen">Hovedskjerm</string> + <string name="wadb_finding_port">Koblet sammen. Finner porten for trådløs feilsøking…</string> + <string name="wadb_enter_port">Koblet sammen. Skriv inn porten fra Innstillinger.</string> + <string name="wadb_applying">Enhet funnet. Bruker innstillingen…</string> + <string name="wadb_apply_failed">Kunne ikke bruke den automatisk. Kontroller adressen under og prøv igjen. %1$s</string> + <string name="wadb_title_wireless">Trådløs feilsøking</string> + <string name="wadb_title_done">Grensen for underprosesser er oppdatert</string> + <string name="wadb_title">Endre grensen for underprosesser</string> + <string name="wadb_lede_compact0">Hvis alternativet er borte, par over trådløs feilsøking.</string> + <string name="wadb_lede_compact1">Koblet sammen. Kontroller IP-adressen og porten i Trådløs feilsøking.</string> + <string name="wadb_lede_done">Grensen for underprosesser ble oppdatert.</string> + <string name="wadb_lede0">Bruk steg 2 hvis Utvikleralternativer ikke har en innstilling for underprosesser. Åpne Utvikleralternativer → Trådløs feilsøking → Par enhet med koblingskode.</string> + <string name="wadb_lede1">Koblet sammen. Bruk adressen under, eller oppdater den fra Trådløs feilsøking → IP-adresse og port.</string> + <string name="wadb_lede_done_long">Grensen for underprosesser ble oppdatert via trådløs feilsøking.</string> + <string name="wadb_confirmed_on">Android bekreftet at grensen er på.</string> + <string name="wadb_confirmed_off">Android bekreftet at grensen er av.</string> + <string name="wadb_pair_group">2 · Koble sammen trådløs feilsøking</string> + <string name="wadb_pair_address">IP-adresse og port for koblingsvarsel</string> + <string name="wadb_pin">Koblingskode (PIN)</string> + <string name="wadb_pin_placeholder">6 tall</string> + <string name="wadb_pair">Koble sammen</string> + <string name="wadb_apply_group">2 · Bruk via trådløs feilsøking</string> + <string name="wadb_connect_address">IP-adresse og port for tilkobling</string> + <string name="wadb_pair_again">Koble sammen igjen</string> + <string name="wadb_turn_off">Slå av grensen</string> + <string name="wadb_other_ways">Andre måter å endre det</string> + <string name="wadb_dev_try_first">1 · Utvikleralternativer (prøv først)</string> + <string name="wadb_restrict_on">Slå av «Slå av begrensninger for underordnede prosesser».</string> + <string name="wadb_restrict_off">Slå på «Slå av begrensninger for underordnede prosesser».</string> + <string name="wadb_computer_last">3 · ADB fra datamaskin (siste utvei)</string> + <string name="wadb_only_if">Bare hvis trådløs feilsøking ikke er tilgjengelig.</string> + <string name="wadb_computer_group">3 · ADB fra datamaskin (siste utvei)</string> + <string name="ctrl_osc_hint">Når skjermkontrollene vises i en sesjon</string> + <string name="ctrl_color">Farge</string> + <string name="ctrl_color_hint">Fargetone på skjermknappene</string> + <string name="ctrl_custom">Egendefinert</string> + <string name="ctrl_opacity">Opasitet</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Knappestørrelse</string> + <string name="ctrl_size_hint" formatted="false">100% er standardstørrelsen</string> + <string name="ctrl_stick_click">Stikke-klikk</string> + <string name="ctrl_stick_click_hint">Dobbelttrykk og hold en stikke for L3 eller R3</string> + <string name="ctrl_adaptive">Adaptive stikker</string> + <string name="ctrl_rumble">Spillvibrasjon</string> + <string name="ctrl_steam_button">Steam-knapp</string> + <string name="ctrl_qam_button">QAM-knapp</string> + <string name="ctrl_keyboard_button">Tastatur-knapp</string> + <string name="ctrl_select_steam">Trykk på Select for å åpne Steam-menyen</string> + <string name="ctrl_select_steam_hint">I stedet for View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con som VR-kontrollere</string> + <string name="ctrl_joycon_vr_hint">Mens SteamVR kjører, blir hver Joy-Con en hånd. Pek den fremover og hold inne Home eller Capture for å sentrere den på nytt.</string> + <string name="setup_animations">Animasjoner</string> + <string name="ctrl_adaptive_hint">Stikker vises der du trykker og skjules når du slipper</string> + <string name="ctrl_layout">Oppsett</string> + <string name="ctrl_layout_custom">Egendefinerte posisjoner lagret</string> + <string name="ctrl_layout_default">Tilpasset denne skjermen</string> + <string name="ctrl_edit">Rediger</string> + <string name="ctrl_reset">Nullstill</string> + <string name="ctrl_mapping">Knappetilordning</string> + <string name="ctrl_mapping_default">Hver knapp sender sin egen inndata</string> + <string name="ctrl_mapping_count">%1$d av %2$d knapper omtilordnet</string> + <string name="ctrl_configure">Konfigurer</string> + <string name="ctrl_reset_all">Nullstill kontroller</string> + <string name="ctrl_reset_all_hint">Gjenoppretter alle kontrollerinnstillinger og oppsettet</string> + <string name="ctrl_mapping_lede">Hva hver skjermknapp sender til spillet. Skjult fjerner knappen.</string> + <string name="ctrl_onscreen_buttons">Skjermknapper</string> + <string name="ctrl_defaults">Standardverdier</string> + <string name="ctrl_reset_mapping">Nullstill tilordning</string> + <string name="content_android_apps">Android-apper</string> + <string name="content_apps_count">%1$d apper</string> + <string name="content_no_android_apps">Fant ingen startbare Android-apper.</string> + <string name="content_desktop_installed">● Skrivebord installert</string> + <string name="content_desktop_first_open">Installeres ved første åpning</string> + <string name="content_available">Tilgjengelig for installasjon</string> + <string name="content_not_installed">Ikke installert.</string> + <string name="content_not_installed_suffix">%1$s · ikke installert</string> + <string name="content_open_named">Åpne %1$s</string> + <string name="content_games">Spill</string> + <string name="content_choose_roms">Velg en ROM-mappe.</string> + <string name="content_retroarch_roms">Bla til /root/ROMs i RetroArch.</string> + <string name="content_add_roms">Legg %1$s-spill til i ROMs/%2$s.</string> + <string name="content_install_named">Installer %1$s</string> + <string name="content_stop_to_install">Avslutt sesjonen for å installere</string> + <string name="content_runtime_required">Kjøretid nødvendig</string> + <string name="content_loading_details">Laster installasjonsdetaljer…</string> + <string name="content_details_unavailable">Installasjonsdetaljer er ikke tilgjengelige. Prøv igjen senere.</string> + <string name="content_needs_runtime">Installer Linux-kjøretiden fra Oppsett først.</string> + <string name="content_stop_first">Avslutt den kjørende sesjonen for å installere skrivebordsapper.</string> + <string name="content_install_into">Installerer %1$s i Linux-skrivebordet.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Å skjule den fjerner den fra Skrivebord. Filene ligger fortsatt i Linux-kjøretiden.</string> + <string name="content_rom_gone">Det spillet er ikke lenger i ROM-mappen.</string> + <string name="content_desktop_system">Skrivebord · %1$s</string> + <string name="content_launch_in">Start i %1$s</string> + <string name="content_also_in">Også i %1$s</string> + <string name="content_page_gone">Den siden finnes ikke lenger. Velg en del til venstre.</string> + <string name="content_open_desktop">Åpne skrivebord</string> + <string name="content_install_open_desktop">Installer og åpne skrivebord</string> + <string name="desktop_remove_title">Avinstaller skrivebord</string> + <string name="desktop_remove_text">Fjern skrivebordet og appene det kom med. Behold spill, tillagte apper, innstillinger og delte biblioteker.</string> + <string name="desktop_removing">Fjerner skrivebord</string> + <string name="desktop_removed">Skrivebord fjernet</string> + <string name="desktop_cleaning_legacy">Fjerner gamle LXQt-filer</string> + <string name="desktop_removal_unknown">Oppdater DroidDeck før du fjerner denne skrivebordsversjonen.</string> + <string name="content_linux_desktop">Linux-skrivebord</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox og emulatorene dine</string> + <string name="games_empty">Spill du installerer i Steam, vises her etter sesjonen.</string> + <string name="games_play_steam">Spill Steam</string> + <string name="games_play_steamvr">Spill SteamVR</string> + <string name="games_launch_settings">Startinnstillinger</string> + <string name="games_launch">Start</string> + <string name="games_files">Spillfiler</string> + <string name="games_prefix">Proton-prefiks</string> + <string name="games_saves_looking">Ser etter lagringer…</string> + <string name="games_saves_none">Fant ingen lagringsmappe på navn. Eksport tar hele brukermappen.</string> + <string name="games_saves_folders">%1$d lagringsmapper</string> + <string name="games_saves_summary">%1$s · %2$d filer · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Behandle lagringer</string> + <string name="games_saves">Spilllagringer</string> + <string name="games_import_saves">Importer lagringer…</string> + <string name="games_export_gamehub">Eksporter som GameHub-zip…</string> + <string name="games_export_winlator">Eksporter som Winlator-zip…</string> + <string name="games_open_save_folder">Åpne lagringsmappe</string> + <string name="games_never_played">Aldri spilt</string> + <string name="games_runtime_busy_percent">Kjøretid opptatt · %1$d%%</string> + <string name="games_runtime_busy">Kjøretid opptatt</string> + <string name="games_runtime_first_play">Kjøretiden installeres ved første Spill</string> + <string name="games_runtime_update">Kjøretidsoppdatering tilgjengelig</string> + <string name="games_runtime_ready">● Kjøretid klar</string> + <string name="games_last_played">Sist spilt %1$s</string> + <string name="games_internal">Intern lagring</string> + <string name="games_added">Lagt til spill</string> + <string name="games_custom">Egendefinert spill</string> + <string name="games_store_storage">Spillagring</string> + <string name="gpu_auto_hint">Det beste paret for denne GPU-en, holdt oppdatert</string> + <string name="gpu_manual_hint">Velg et par selv</string> + <string name="gpu_checking">Ser etter drivere…</string> + <string name="gpu_none_listed">Ingen drivere listet ennå. Oppdater for å se etter dem.</string> + <string name="gpu_hide_other">Skjul drivere for andre GPU-er</string> + <string name="gpu_show_other">Vis drivere for andre GPU-er</string> + <string name="gpu_advanced">Avansert</string> + <string name="gpu_set_with_display">Angis sammen med skjermdriveren: %1$s bærer begge.</string> + <string name="gpu_set_with_runtime">Angis sammen med kjøretidsdriveren: %1$s bærer begge.</string> + <string name="gpu_runtime_hint">Brukes av spill og skrivebordet.</string> + <string name="gpu_runtime_default">Kjøretidsstandard</string> + <string name="gpu_auto_by_gpu">Auto – valgt etter GPU</string> + <string name="gpu_manage">Last ned, importer eller slett…</string> + <string name="gpu_in_use_caps">I BRUK</string> + <string name="gpu_builtin">Driverne innebygd i DroidDeck</string> + <string name="gpu_matched_pair">Kjøretids- og skjermdrivere angitt sammen som et matchet par.</string> + <string name="gpu_recommended_for">Anbefalt for denne GPU-en: %1$s.</string> + <string name="gpu_refresh_hint">Oppdater for å se etter drivere for denne GPU-en.</string> + <string name="gpu_recommended_caps">ANBEFALT</string> + <string name="gpu_unavailable">Ikke tilgjengelig</string> + <string name="load_runtime">Linux-kjøretid</string> + <string name="load_runtime_detail">Gjør Linux-kjøretiden klar</string> + <string name="load_session">Sesjon</string> + <string name="load_session_detail">Starter skjerm og lyd</string> + <string name="load_steam">Steam-klient</string> + <string name="load_steam_detail">Kontrollerer Steam og kompatibilitetsverktøyene</string> + <string name="load_opening_steam">Åpner Steam</string> + <string name="load_opening_steam_detail">Venter på Steams første bilde</string> + <string name="load_desktop">Skrivebord</string> + <string name="load_desktop_detail">Gjør skrivebordet klart</string> + <string name="load_opening">Åpner</string> + <string name="load_opening_detail">Venter på det første bildet</string> + <string name="load_starting_steam">Starter Steam</string> + <string name="load_ended">Sesjonen ble avsluttet</string> + <string name="load_step">Steg %1$d av %2$d</string> + <string name="load_steam_paused">Steam er pauset</string> + <string name="deck_tab_grips">Grep</string> + <string name="deck_tab_left">Venstre plate</string> + <string name="deck_tab_right">Høyre plate</string> + <string name="deck_tab_both">Begge</string> + <string name="deck_tab_gamepad">Kontroller</string> + <string name="deck_surface_stick">Stikke</string> + <string name="deck_surface_trackpad">Styreflate</string> + <string name="deck_surface_switch">Bytt mellom stikke og styreflate</string> + <string name="deck_more_controls">Flere Deck-kontroller</string> + <string name="deck_panels">PANELER</string> + <string name="deck_close">Lukk kontroller for andre skjerm</string> + <string name="deck_open_steam_menu">Åpne Steam-menyen</string> + <string name="deck_left_upper">Venstre · øvre</string> + <string name="deck_left_lower">Venstre · nedre</string> + <string name="deck_right_upper">Høyre · øvre</string> + <string name="deck_right_lower">Høyre · nedre</string> + <string name="deck_click">Klikk</string> + <string name="deck_right_trackpad">Høyre styreflate</string> + <string name="deck_left_trackpad">Venstre styreflate</string> + <string name="second_trackpad">Styreflate</string> + <string name="second_show_keyboard">Vis tastatur</string> + <string name="second_hide_keyboard">Skjul tastatur</string> + <string name="second_terminal">Linux-terminal</string> + <string name="second_terminal_not_ready">Linux-sesjonen er ikke klar for en terminal ennå.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Spill</string> + <string name="rail_desktop">Skrivebord</string> + <string name="rail_store">Butikk</string> + <string name="rail_components">Komponenter</string> + <string name="rail_apps">Apper</string> + <string name="rail_setup">Oppsett</string> + <string name="rail_updates">Oppdateringer</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Gjenoppta %1$s</string> + <string name="roms_text">Vises som /root/ROMs i hver sesjon. Intern lagring er på /root/Storage.</string> + <string name="roms_none">Ingen mappe valgt</string> + <string name="roms_applies">Gjelder fra neste sesjon. SD-kort fungerer.</string> + <string name="roms_choose">Velg mappe</string> + <string name="roms_change">Endre mappe</string> + <string name="proton_lede">Installer en ARM64 Proton-build, og velg den så per spill i Steam → Egenskaper → Kompatibilitet.</string> + <string name="proton_stop_first">Avslutt den kjørende sesjonen for å installere eller fjerne et kompatibilitetsverktøy.</string> + <string name="proton_available">Tilgjengelige builder</string> + <string name="proton_installed">Installert %1$s</string> + <string name="proton_queued">Venter fra en tidligere forespørsel</string> + <string name="proton_not_installed">Ikke installert</string> + <string name="proton_update_available">Oppdatering tilgjengelig → %1$s</string> + <string name="proton_remove_older">Fjern gamle %1$s-versjoner</string> + <string name="proton_remove_older_body">Fjerner %1$s. Spill satt til disse versjonene må byttes til en annen Proton.</string> + <string name="proton_remove_body">Spill satt til denne versjonen må byttes til en annen Proton.</string> + <string name="proton_install_now">Installer nå</string> + <string name="proton_cancel_queued">Avbryt i kø</string> + <string name="pckb_android">Android-tastatur</string> + <string name="pckb_hide">Skjul ✕</string> + <string name="main_launch_named">Start %1$s</string> + <string name="main_choose_screen">Velg en skjerm. Sekundær: %1$s.</string> + <string name="main_secondary_gone">Den sekundære skjermen er ikke tilgjengelig lenger.</string> + <string name="main_primary">Hovedskjerm</string> + <string name="main_secondary">Sekundær skjerm</string> + <string name="widgets_prev_tab">Forrige fane</string> + <string name="widgets_next_tab">Neste fane</string> + <string name="widgets_on">På</string> + <string name="widgets_all_n">Alle %1$d</string> + <string name="widgets_none">Ingen</string> + <string name="widgets_n_of_m">%1$d av %2$d</string> + <string name="widgets_off">Av</string> + <string name="screen_bottom">Nedre skjerm</string> + <string name="game_env_applies">Gjelder fra neste spilløkt. En spillprofil overstyrer den delte.</string> + <string name="game_env_other">Et annet spill etter app-ID…</string> + <string name="game_env_done">Ferdig</string> + <string name="game_env_default">Standard</string> + <string name="game_env_off">Av</string> + <string name="game_env_change">Endre…</string> + <string name="game_env_change_title">Endre variabel</string> + <string name="game_env_restore_default">Tilbake til standard</string> + <string name="game_env_eyebrow">Proton-spill</string> + <string name="pip_title">Bilde-i-bilde</string> + <string name="pip_auto">Gå automatisk inn i PiP</string> + <string name="unfolded_controls">Kontroller på den utbrettede skjermen</string> + <string name="unfolded_controls_hint">Utbrettet sitter spillet over Steam Deck-styreflatene og bakgrepene. Sammenslått er spillet i fullskjerm.</string> + <string name="pip_suspended">Satt på pause</string> + <string name="pip_not_ready">Bilde-i-bilde er tilgjengelig når sesjonen er klar.</string> + <string name="pip_permission">Tillat bilde-i-bilde for DroidDeck i Android-innstillingene.</string> + <string name="pip_unavailable">Android kunne ikke åpne bilde-i-bilde.</string> + <string name="game_shortcut">Snarvei</string> + <string name="game_shortcut_add">Legg til på hjem-skjermen</string> + <string name="game_shortcut_choose">Velg spill</string> + <string name="game_shortcut_scanning">Skanner installerte spill…</string> + <string name="game_link_copy">Kopier oppstartslenke</string> + <string name="game_link_copied">Oppstartslenke kopiert</string> + <string name="game_shortcut_unsupported">Denne launcheren kan ikke legge til snarveier. Bruk Kopier oppstartslenke i stedet.</string> + <string name="game_link_invalid">Ugyldig oppstartslenke for spill.</string> + <string name="game_link_missing">Dette spillet er ikke lenger i DroidDeck-biblioteket ditt.</string> + <string name="game_link_session_busy">Avslutt den nåværende sesjonen før du starter et Steam-spill.</string> + <string name="game_link_failed">Kunne ikke sende spillet til Steam. Prøv å starte det igjen.</string> + <string name="setup_retry_removal">Prøv fjerning igjen</string> + <string name="runtime_removing">Fjerner</string> + <string name="runtime_removal_incomplete">Fjerning ikke fullført</string> + <string name="game_file_export">Eksporter spillfil</string> + <string name="game_file_sync">Synkroniser alle spillfiler til mappe</string> + <string name="game_file_stop_sync">Stopp synkronisering av spillfiler</string> + <string name="game_file_folder">Velg en mappe for frontend-spillfiler</string> + <string name="game_file_exported">Spillfiler lagret i %1$s</string> + <string name="game_frontend_files">Frontend-filer</string> + + <string name="main_wait_runtime">Vent til kjøretidsoperasjonen er ferdig</string> + <string name="main_wait_proton_install">Vent til installasjonen av kompatibilitetsverktøyet er ferdig</string> + <string name="main_wait_desktop_install">Vent til installasjonen av skrivebordsappen er ferdig</string> + <string name="main_wait_install_game">Vent til installasjonen er ferdig før du starter et spill</string> + <string name="main_saves_close_session">Lukk Steam-sesjonen først, så spillet ikke kan lagre over importen</string> + <string name="main_saves_importing">Importerer til %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Importerte %1$d fil fra %2$s til %3$s</item> + <item quantity="other">Importerte %1$d filer fra %2$s til %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Importerte %1$d fil fra %2$s til %3$s. Gamle lagringer sikkerhetskopiert til Download/DroidDeck/Saves/backups</item> + <item quantity="other">Importerte %1$d filer fra %2$s til %3$s. Gamle lagringer sikkerhetskopiert til Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Velg en lagrings-zip for %1$s</string> + <string name="main_saves_exporting">Eksporterer %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Eksporterte %1$d fil som en %2$s: %3$s</item> + <item quantity="other">Eksporterte %1$d filer som en %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Velg hvor du vil lagre %1$s (%2$s)</string> + <string name="main_action_failed">%1$s mislyktes: %2$s</string> + <string name="main_no_logs_yet">Ingen sesjonslogger ennå: kjør en sesjon først.</string> + <string name="main_no_logs_to_clear">Ingen sesjonslogger å tømme.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Tømte %1$d sesjonsloggmappe.</item> + <item quantity="other">Tømte %1$d sesjonsloggmapper.</item> + </plurals> + <string name="main_wadb_pair_failed">Kobling for trådløs feilsøking mislyktes</string> + <string name="main_wadb_command_failed">Kommando for trådløs feilsøking mislyktes</string> + <string name="main_wadb_unavailable">Trådløs feilsøking er ikke tilgjengelig</string> + <string name="main_adb_copied">ADB-kommando kopiert</string> + <string name="main_pick_roms">Velg ROM-mappen</string> + <string name="main_non_adreno_title">Ikke en Adreno-GPU</string> + <string name="main_non_adreno_text">Turnip støtter Adreno-GPU-er. På %1$s kan Steam vise en svart skjerm. Nedlasting: %2$.0f MB.</string> + <string name="main_install_anyway">Installer likevel</string> + <string name="main_remove_runtime_title">Fjern Linux-kjøretid</string> + <string name="main_remove_runtime_text">Dette sletter kjøretiden, Steam-klienten inni den, og hvert spill installert der.</string> + <string name="main_applied">Brukt: %1$s</string> + <string name="android_app_open_failed_primary">Kunne ikke åpne %1$s på hovedskjermen</string> + <string name="android_app_open_failed_on">Kunne ikke åpne %1$s på %2$s</string> + <string name="android_app_open_failed_display">Kunne ikke åpne %1$s på skjerm %2$d</string> + <string name="comp_busy_importing">Importerer</string> + <string name="comp_busy_swapping">Bytter ut</string> + <string name="comp_busy_restoring">Gjenoppretter</string> + <string name="comp_busy_cancelling">Avbryter</string> + <string name="comp_busy_deleting">Sletter</string> + <string name="comp_cannot_read">kan ikke lese filen</string> + <string name="comp_imported">Importerte %1$s</string> + <string name="comp_swap_cancelled">Den ventende byttingen ble avbrutt.</string> + <string name="comp_pick_wcp">Velg en komponentpakke (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Kunne ikke nå Nightlies</string> + <string name="comp_stored">Lagret %1$s</string> + <string name="comp_download_failed">Nedlasting mislyktes: %1$s</string> + <string name="drivers_pick_linux">Velg en Linux-kjøretidsdriver (-Linux-zip eller Android + Linux-pakke)</string> + <string name="drivers_pick_android">Velg en skjermdriver (AdrenoTools-zip eller Android + Linux-pakke)</string> + <string name="drivers_pick_any">Velg en driver-zip eller en Android + Linux-pakke</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Fjerner %1$s…</string> + <string name="main_forgetting_named">Glemmer %1$s…</string> + <string name="main_pick_game_storage">Velg spillagringsmappen</string> + <string name="main_pick_decky_zip">Velg en Decky-programtillegg-ZIP</string> + <string name="main_storage_not_usable">Ikke brukbar: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Fjerner Linux-kjøretid</string> + <string name="main_settings_main_screen">Kunne ikke åpne Innstillinger på den nedre skjermen; åpnet den på hovedskjermen.</string> + <string name="main_open_dev_options">Åpne Utvikleralternativer i Innstillinger</string> + + <string name="upd_unknown_apps_failed">Kunne ikke åpne Androids innstilling «Installer ukjente apper»</string> + <string name="upd_couldnt_check">Kunne ikke sjekke: %1$s</string> + <string name="upd_no_download">Denne builden har ingen nedlasting for denne kopien av DroidDeck</string> + <string name="upd_stop_first">Avslutt den kjørende sesjonen først, og oppdater så</string> + <string name="upd_stage_downloading">Laster ned</string> + <string name="upd_stage_installing">Installerer</string> + <string name="upd_stage_confirm">Venter på at du bekrefter</string> + <string name="upd_failed">Oppdateringen mislyktes</string> + <string name="upd_not_offered">Android tilbød ikke å installere oppdateringen</string> + + <string name="decky_install_failed">Decky-installasjon mislyktes: %1$s</string> + <string name="decky_plugin_starting">Starter import av programtillegg…</string> + <string name="decky_plugin_failed">Import av programtillegg mislyktes: %1$s</string> + <string name="decky_plugin_installed">Programtillegg installert. Start Steam på nytt for å laste det.</string> + + <string name="drivers_not_checked">Ikke sjekket ennå – trykk oppdater for å se etter nye drivere</string> + <string name="drivers_bundle_sets_display">Android + Linux: setter skjermdriveren med den</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: setter kjøretidsdriveren med den</string> + <string name="drivers_runtime_builtin">Turnipen innebygd i kjøretiden</string> + <string name="drivers_system_vulkan">system-Vulkan: ingen bunnet build for denne GPU-en</string> + <string name="drivers_bundled">%1$s (medfølgende)</string> + <string name="drivers_manual">Manuell</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Bare den ene halvdelen er publisert akkurat nå</string> + <string name="drivers_pair_size">%1$.0f MB for begge</string> + <string name="drivers_none_to_set">Ingen drivere å angi: %1$s</string> + <string name="drivers_checking_latest">Ser etter de nyeste driverne…</string> + <string name="drivers_up_to_date_check_failed">Oppdatert (kunne ikke sjekke: %1$s)</string> + <string name="drivers_recommended_unpublished">De anbefalte driverne er ikke publisert akkurat nå</string> + <string name="drivers_downloading_pair">Laster ned %1$s %2$s…</string> + <string name="drivers_updated_to">Oppdatert til %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Oppdatert til %1$s %2$s. Skjermdriveren gjelder etter at DroidDeck starter på nytt.</string> + <string name="drivers_auto_waits_for_session">Driveroppdateringer venter til økten stoppes.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s lastes ned når du går av mobildata og batterisparing.</string> + <string name="drivers_skipping_bad">%1$s %2$s startet ingen økt her, så Automatisk holder seg til driverne som gjorde det.</string> + <string name="drivers_rolled_back">%1$s startet ingen økt to ganger, så Automatisk gikk tilbake til driverne som virket.</string> + <string name="drivers_switched_to">Byttet til %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Byttet til %1$s %2$s. Skjermdriveren gjelder etter at DroidDeck starter på nytt.</string> + <string name="drivers_using">Bruker %1$s %2$s.</string> + <string name="drivers_using_restart">Bruker %1$s %2$s. Skjermdriveren gjelder etter at DroidDeck starter på nytt.</string> + <string name="drivers_using_quest">Den medfølgende bildedriveren for Quest og standard kjøretidsmiljø brukes.</string> + <string name="drivers_using_quest_restart">Den medfølgende bildedriveren for Quest og standard kjøretidsmiljø brukes. Bildedriveren gjelder etter en omstart av DroidDeck.</string> + <string name="drivers_not_a_driver">Ikke en driver-zip: verken en AdrenoTools-driver, en -Linux Turnip eller en Android + Linux-pakke</string> + <string name="drivers_import_failed">Import mislyktes: %1$s</string> + <string name="drivers_imported_unnamed">Importert driver</string> + <string name="drivers_using_bundle">Bruker %1$s som både kjøretids- og skjermdriver.</string> + <string name="drivers_using_bundle_restart">Bruker %1$s som både kjøretids- og skjermdriver. Skjermdriveren gjelder etter at DroidDeck starter på nytt.</string> + <string name="drivers_deleted_bundle">Slettet %1$s (begge driverne)</string> + <string name="drivers_deleted">Slettet %1$s</string> + <string name="drivers_release_status">Nyeste: %1$s · sjekket %2$s</string> + <string name="drivers_release_status_failed">Nyeste: %1$s · %2$s utilgjengelig · sjekket %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d min siden</item> + <item quantity="other">%1$d min siden</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d t siden</item> + <item quantity="other">%1$d t siden</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d dag siden</item> + <item quantity="other">%1$d dager siden</item> + </plurals> + <string name="drivers_checking_sources">Sjekker Banners-Turnip, WinNative og DroidDeck…</string> + <string name="drivers_check_failed">sjekk mislyktes</string> + <string name="drivers_installed_pick_either">Installert %1$s – velg den i begge lister for å angi begge driverne</string> + <string name="drivers_installed_pick">Installert %1$s – velg den i menyen</string> + + <string name="session_wait_removal">Vent til fjerning av kjøretiden er ferdig</string> + <string name="session_title_game">Spill</string> + <string name="session_touch_auto_touchpad">styreflate</string> + <string name="session_touch_auto_direct">direkte</string> + <string name="session_swap_failed">Bytting mislyktes: %1$s</string> + <string name="session_profile_save_failed">Lagring av profil mislyktes: %1$s</string> + <string name="session_desktop_paused">Skrivebordet er pauset</string> + <string name="session_named_paused">%1$s er pauset</string> + <string name="session_program_paused">Programmet er pauset</string> + <string name="session_starting_desktop">Starter skrivebordet</string> + <string name="session_starting_named">Starter %1$s</string> + <string name="session_starting_program">Starter programmet</string> + <string name="session_no_logs">Ingen logger for denne sesjonen.</string> + <string name="session_logs_archive_failed">Kunne ikke opprette sesjonsloggarkivet.</string> + <string name="session_logs_share_failed">Kunne ikke dele sesjonsloggene.</string> + <string name="session_starting_session">Starter sesjonen…</string> + <string name="session_runtime_downloading">laster ned Linux-kjøretiden</string> + <string name="session_runtime_downloading_mb">laster ned Linux-kjøretiden · %1$d av %2$d MB</string> + <string name="session_runtime_checking">kontrollerer Linux-kjøretiden</string> + <string name="session_runtime_unpacking">pakker ut Linux-kjøretiden</string> + <string name="session_desktop_downloading">laster ned skrivebordet</string> + <string name="session_desktop_downloading_mb">laster ned skrivebordet · %1$d av %2$d MB</string> + <string name="session_desktop_checking">kontrollerer skrivebordet</string> + <string name="session_desktop_unpacking">pakker ut skrivebordet</string> + <string name="session_proton_downloading">laster ned Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">laster ned Proton Experimental (ARM64) · %1$d av %2$d MB</string> + <string name="session_proton_checking">kontrollerer Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">pakker ut Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Kunne ikke nå kjøretidskatalogen. Kontroller tilkoblingen og trykk Spill igjen.</string> + <string name="session_runtime_install_failed">Linux-kjøretiden ble ikke installert. Kontroller kjøretiden i Oppsett og trykk Spill igjen.</string> + <string name="session_desktop_install_failed">Skrivebordet ble ikke installert (%1$s). Kontroller tilkoblingen og trykk Skrivebord igjen.</string> + <string name="session_ended_named">%1$s stoppet uventet. Del loggene med en feilrapport, eller prøv igjen.</string> + <string name="session_ended_program">Programmet stoppet uventet. Del loggene med en feilrapport, eller prøv igjen.</string> + <string name="session_ended_desktop">Skrivebordet stoppet uventet. Del loggene med en feilrapport, eller prøv igjen.</string> + <string name="session_ended_detail">Avslutningsstatus %1$d · %2$s</string> + <string name="session_ended_no_log">ingen logg</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Loggen viser %1$d «Function not implemented»-feil: prootens seccomp-akselerasjon feiler en hjelper på denne enheten. Prøv %2$s → «%3$s» (eller «%4$s») og start på nytt.</item> + <item quantity="other">Loggen viser %1$d «Function not implemented»-feil: prootens seccomp-akselerasjon feiler en hjelper på denne enheten. Prøv %2$s → «%3$s» (eller «%4$s») og start på nytt.</item> + </plurals> + + <string name="mode_decky_plugins">Programtillegg</string> + <string name="mode_decky_plugins_hint">Installer en programtillegg-ZIP for neste Steam-sesjon.</string> + <string name="mode_decky_plugin_downloading">Laster ned…</string> + <string name="mode_decky_plugin_install_zip">Installer fra ZIP</string> + <string name="store_cat_games">Spill</string> + <string name="store_cat_audio_video">Lyd og video</string> + <string name="store_cat_graphics">Grafikk</string> + <string name="store_cat_internet">Internett</string> + <string name="store_cat_office">Kontor</string> + <string name="store_cat_developer">Utvikler</string> + <string name="store_cat_education">Utdanning</string> + <string name="store_cat_science">Vitenskap</string> + <string name="store_cat_system">System</string> + <string name="store_cat_utilities">Verktøy</string> + <string name="store_section_popular">Populært</string> + <string name="store_section_trending">Trender</string> + <string name="store_section_new">Nytt</string> + <string name="store_section_updated">Oppdatert</string> + <string name="store_section_loading">laster…</string> + <string name="store_flatpak_setup">Flatpak-oppsett</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Kunne ikke sjekke Flathub for oppdateringer</string> + <string name="content_rom_installed">installert</string> + <string name="content_rom_folder">mappe</string> + <string name="theme_graphite">Grafitt</string> + <string name="theme_graphite_detail">Grafittflater, med logoens egen kuleblå farge for alt som er valgt, fokusert eller trykket.</string> + <string name="theme_paper">Papir på svart</string> + <string name="theme_paper_detail">Hvitt er primærfargen, ikonets blå er signalet for linjer, ringer og prikker.</string> + <string name="theme_icon_blue">Ikonblå</string> + <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="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Installer kjøretiden først</string> + <string name="game_sync_err_steam_library">Steam-biblioteket er ikke tilgjengelig</string> + <string name="game_sync_err_previous_sd">Det forrige SD-biblioteket er ikke tilgjengelig</string> + <string name="game_sync_err_game_storage">Spillagringen er ikke tilgjengelig</string> + <string name="game_sync_err_added_games">Mappen for tillagte spill er ikke tilgjengelig</string> + <string name="game_sync_err_manifests">Steam-manifestene er ikke tilgjengelige</string> + <string name="content_system_many">Mange systemer</string> + <string name="fm_drive_internal">Intern</string> + <string name="fm_drive_linux">Linux-system</string> + <string name="fm_drive_sd">SD-kort</string> + <string name="fm_drive_storage">Lagring</string> + <string name="fm_select">Velg</string> + <string name="fm_properties">Egenskaper</string> + <string name="fm_favorite_add">Legg til i favoritter</string> + <string name="fm_favorite_remove">Fjern fra favoritter</string> + <string name="fm_rename">Gi nytt navn</string> + <string name="fm_copy">Kopier</string> + <string name="fm_cut">Klipp ut</string> + <string name="fm_actions">Handlinger</string> + <string name="fm_favorites">Favoritter</string> + <string name="fm_pin_current">Fest denne mappen</string> + <string name="fm_no_favorites">Ingen favoritter ennå – fest en mappe med ⋮-menyen for å komme raskt tilbake hit.</string> + <string name="fm_unpin_favorite">Fjern fra favoritter</string> + <string name="fm_size_zero">0 byte</string> + <string name="fm_unit_bytes">byte</string> + <string name="fm_prop_location">Plassering</string> + <string name="fm_prop_type">Type</string> + <string name="fm_prop_size">Størrelse</string> + <string name="fm_prop_modified">Endret</string> + <string name="fm_type_folder">Mappe</string> + <string name="fm_type_file">Fil</string> + <string name="fm_type_ext_file">%1$s-fil</string> + <string name="fm_read_only">Skrivebeskyttet</string> + <string name="fm_read_only_hint">Stopper spill (og Wine) fra å overskrive eller slette denne filen.</string> + <string name="fm_read_only_failed">Kunne ikke endre Skrivebeskyttet</string> + <string name="fm_hidden">Skjult</string> + <string name="fm_hidden_unsupported">Denne lagringen kan ikke lagre den skjulte-flagget.</string> + <string name="fm_hidden_hint">Markerer filen som skjult i Windows (Wines skjult-attributt).</string> + <string name="fm_hidden_failed">Kunne ikke endre Skjult på denne lagringen</string> + <string name="fm_done">Ferdig</string> + <string name="fm_op_deleting">Sletter…</string> + <string name="fm_delete_failed">Sletting mislyktes</string> + <string name="fm_op_moving">Flytter…</string> + <string name="fm_op_copying">Kopierer…</string> + <string name="fm_op_moving_item">Flytter – %1$s</string> + <string name="fm_op_copying_item">Kopierer – %1$s</string> + <string name="fm_op_moving_batch">Flytter %1$d/%2$d – %3$s</string> + <string name="fm_op_copying_batch">Kopierer %1$d/%2$d – %3$s</string> + <string name="fm_paste_failed">%1$d ferdig, %2$d mislyktes</string> + <string name="fm_paste_skipped">%1$d ferdig, %2$d hoppet over</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d element flyttet</item> + <item quantity="other">%1$d elementer flyttet</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d element kopiert</item> + <item quantity="other">%1$d elementer kopiert</item> + </plurals> + <string name="fm_already_exists">«%1$s» finnes allerede</string> + <string name="fm_op_renaming">Gir nytt navn…</string> + <string name="fm_rename_failed">Kunne ikke gi nytt navn</string> + <string name="fm_op_creating_folder">Oppretter mappe…</string> + <string name="fm_create_folder_failed">Kunne ikke opprette mappe</string> + <string name="fm_new_folder">Ny mappe</string> + <string name="fm_folder_name">Mappenavn</string> + <string name="fm_create">Opprett</string> + <string name="fm_new_name">Nytt navn</string> + <string name="fm_delete_title">Slette?</string> + <string name="fm_delete_text">Slette «%1$s» permanent?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Slette %1$d element?</item> + <item quantity="other">Slette %1$d elementer?</item> + </plurals> + <string name="fm_cannot_undo">Dette kan ikke angres.</string> + <plurals name="fm_and_more"> + <item quantity="one">…og %1$d til</item> + <item quantity="other">…og %1$d til</item> + </plurals> + <string name="fm_op_deleting_batch">Sletter %1$d/%2$d – %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d kunne ikke slettes</item> + <item quantity="other">%1$d kunne ikke slettes</item> + </plurals> + <string name="fm_conflict_merge_hint">Slå sammen legger til og erstatter filer inne i den eksisterende mappen.</string> + <string name="fm_conflict_overwrite_hint">Overskriv erstatter den eksisterende filen.</string> + <string name="fm_conflict_apply_all">Bruk på alle konflikter</string> + <string name="fm_conflict_merge">Slå sammen</string> + <string name="fm_conflict_overwrite">Overskriv</string> + <string name="fm_conflict_keep_both">Behold begge</string> + <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_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> + <string name="fm_search">Søk</string> + <string name="fm_sort">Sorter</string> + <string name="fm_sort_name">Navn</string> + <string name="fm_sort_date">Dato endret</string> + <string name="fm_rows_comfortable">Luftige rader</string> + <string name="fm_rows_compact">Kompakte rader</string> + <string name="fm_hide_hidden">Skjul skjulte filer</string> + <string name="fm_show_hidden">Vis skjulte filer</string> + <string name="fm_hide_favorites">Skjul favoritter</string> + <string name="fm_show_favorites">Vis favoritter</string> + <string name="fm_filter_folder">Filtrer denne mappen</string> + <string name="fm_free_space">%1$s ledig</string> + <string name="fm_selected_count">%1$d valgt</string> + <string name="fm_select_none">Ingen</string> + <string name="fm_select_all">Alle</string> + <string name="fm_paste">Lim inn</string> + <plurals name="fm_items"> + <item quantity="one">%1$d element</item> + <item quantity="other">%1$d elementer</item> + </plurals> + <string name="fm_paste_here">Lim inn %1$s her</string> + <string name="fm_paste_move_here">Lim inn %1$s (flytt) her</string> + <string name="fm_rail_title">Filer</string> + <string name="fm_rail_storage">LAGRING</string> + <string name="fm_rail_quick">RASK</string> + <string name="fm_rail_favorites">FAVORITTER</string> + <string name="fm_rail_downloads">Nedlastinger</string> + <string name="fm_rail_downloads_short">Nedlast</string> + <string name="fm_rail_roms">ROM-er</string> + <string name="fm_rail_session_logs">Sesjonslogger</string> + <string name="fm_rail_pictures">Bilder</string> + <string name="fm_favorite_added">La til «%1$s» i favoritter</string> + <string name="fm_favorite_removed">Fjernet «%1$s» fra favoritter</string> + <string name="fm_empty_directory">Tom mappe</string> + <string name="fm_up_one_level">Opp ett nivå</string> + <string name="fm_choose_folder">Velg en mappe</string> + <string name="fm_choose_file">Velg en fil</string> + <string name="ctrl_tint_steam_blue">Steam-blå</string> + <string name="ctrl_tint_sky">Himmel</string> + <string name="ctrl_tint_white">Hvit</string> + <string name="ctrl_tint_violet">Fiolett</string> + <string name="ctrl_tint_green">Grønn</string> + <string name="ctrl_tint_amber">Amber</string> + <string name="ctrl_tint_red">Rød</string> + <string name="ctrl_tint_pink">Rosa</string> + <string name="ctrl_button_a">A-knapp</string> + <string name="ctrl_button_b">B-knapp</string> + <string name="ctrl_button_x">X-knapp</string> + <string name="ctrl_button_y">Y-knapp</string> + <string name="ctrl_button_lb">Venstre skulderknapp</string> + <string name="ctrl_button_rb">Høyre skulderknapp</string> + <string name="ctrl_button_lt">Venstre trigger</string> + <string name="ctrl_button_rt">Høyre trigger</string> + <string name="ctrl_button_view">View-knapp</string> + <string name="ctrl_button_menu">Menu-knapp</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad opp</string> + <string name="ctrl_target_down">D-pad ned</string> + <string name="ctrl_target_left">D-pad venstre</string> + <string name="ctrl_target_right">D-pad høyre</string> + <string name="ctrl_target_hidden">Skjult</string> + <string name="ctrl_editor_drag">Dra for å flytte</string> + <string name="ctrl_editor_snap">Fest</string> + <string name="ctrl_editor_save">Lagre</string> + <string name="second_mode_none">Ingen</string> + <string name="second_mode_keyboard_trackpad">Tastatur + styreflate</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Deck-grep + styreflater</string> + + <string name="rtinst_removing">Fjerner Linux-kjøretid</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Fjerner Linux-kjøretid · %1$d oppføring</item> + <item quantity="other">Fjerner Linux-kjøretid · %1$d oppføringer</item> + </plurals> + <string name="rtinst_removed">Linux-kjøretiden fjernet</string> + <string name="rtinst_removal_failed">Kunne ikke fullføre fjerningen av Linux-kjøretiden. Prøv fjerning igjen i Oppsett.</string> + <string name="rtinst_removing_leftovers">Fjerner kjøretidsrester</string> + <string name="rtinst_downloading">Laster ned</string> + <string name="rtinst_verifying">Verifiserer</string> + <string name="rtinst_extracting">Pakker ut</string> + <string name="rtinst_channel_description">Vises mens Linux-kjøretiden installeres eller fjernes</string> + <string name="rtinst_title_installing">Installerer Linux-kjøretiden</string> + <string name="rtinst_title_removing">Fjerner Linux-kjøretiden</string> + + <string name="deskpkg_runtime_missing">Linux-kjøretiden er ikke installert</string> + <string name="deskpkg_no_checksum">Katalogen har ingen sjekksum for %1$s</string> + <string name="deskpkg_checksum_mismatch">Sjekksum stemmer ikke – ingenting ble endret</string> + <string name="deskpkg_installing">Installerer %1$s</string> + <string name="deskpkg_place_failed">Kunne ikke plassere AppImage-filen</string> + <string name="deskpkg_extract_failed">Utpakking mislyktes</string> + <string name="deskpkg_install_failed">Installasjon mislyktes</string> + + <string name="flatpakmgr_setup_failed">Flatpak-oppsett mislyktes (avslutningskode %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Flatpak-oppsettet ble ikke fullført</string> + <string name="flatpakmgr_busy">En annen butikkoppgave kjører</string> + <string name="flatpakmgr_not_ready">Sett opp Flatpak først</string> + <string name="flatpakmgr_starting">Starter</string> + <string name="flatpakmgr_exit_status">Flatpak avsluttet med status %1$d</string> + <string name="flatpakmgr_installing">Installerer %1$s</string> + <string name="flatpakmgr_updating">Oppdaterer %1$s</string> + <string name="flatpakmgr_removing">Fjerner %1$s</string> + <string name="flatpakmgr_installing_step">Installerer %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Oppdaterer %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Fjerner %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">oversettelser</string> + <string name="flatpakmgr_ref_graphics_drivers">grafikkdrivere</string> + <string name="flatpakmgr_ref_media_codecs">mediekodeker</string> + <string name="flatpakmgr_ref_runtime">%1$s-kjøretid</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s-kjøretid %2$s</string> + + <string name="appimg_too_small">Filen er for liten til å være en AppImage</string> + <string name="appimg_unreadable">Filen kan ikke leses: %1$s</string> + <string name="appimg_not_linux">Dette er ikke en AppImage (det er ikke et Linux-program)</string> + <string name="appimg_wrong_arch">Denne AppImage-filen er bygget for verken ARM64 (aarch64) eller x86-PC-er</string> + <string name="appimg_not_appimage">Dette er et Linux-program, men ikke en AppImage</string> + <string name="appimg_wrong_type">Bare type 2-AppImages kan importeres (denne er type %1$d)</string> + <string name="appimg_no_space_import">Ikke nok ledig plass: import krever omtrent %1$s</string> + <string name="appimg_no_space_update">Ikke nok ledig plass: oppdatering krever omtrent %1$s</string> + <string name="appimg_import_failed">Import mislyktes</string> + <string name="appimg_gone">Den AppImage-filen finnes ikke lenger</string> + <string name="appimg_update_failed">Oppdatering mislyktes</string> + <string name="appimg_extracting">Pakker ut %1$s</string> + <string name="appimg_extract_failed">AppImage-filen kunne ikke pakkes ut</string> + <string name="appimg_extract_failed_detail">AppImage-filen kunne ikke pakkes ut: %1$s</string> + + <string name="deckymgr_stop_session_loader">Avslutt den aktive sesjonen før du installerer Decky Loader</string> + <string name="deckymgr_download_failed">Nedlasting av Decky Loader mislyktes</string> + <string name="deckymgr_size_mismatch">Decky Loader-størrelsen stemte ikke med utgivelsens metadata</string> + <string name="deckymgr_checksum_download_failed">Kunne ikke laste ned utgivelsens sjekksum</string> + <string name="deckymgr_checksum_missing">Utgivelsens sjekksum mangler</string> + <string name="deckymgr_checksum_invalid">Utgivelsens sjekksum er ugyldig</string> + <string name="deckymgr_checksum_mismatch">Sjekksummen til Decky Loader stemmer ikke</string> + <string name="deckymgr_not_elf">Utgivelsesfilen er ikke en kompatibel 64-bit Linux-kjørbar fil</string> + <string name="deckymgr_session_started_loader">En sesjon startet under nedlastingen; avslutt den før du installerer Decky Loader</string> + <string name="deckymgr_loader_not_executable">Kunne ikke merke PluginLoader som kjørbar</string> + <string name="deckymgr_cef_failed">Kunne ikke slå på Steams CEF-fjernsøking for feilsøking</string> + <string name="deckymgr_stage_failed">Kunne ikke klargjøre PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Kunne ikke bevare den eksisterende PluginLoader</string> + <string name="deckymgr_loader_activate_failed">Kunne ikke aktivere den nye PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Avslutt den aktive sesjonen før du installerer et programtillegg</string> + <string name="deckymgr_loader_required">Installer Decky Loader før du importerer et programtillegg</string> + <string name="deckymgr_zip_unreadable">Kunne ikke lese den valgte ZIP-filen</string> + <string name="deckymgr_plugins_dir_failed">Kunne ikke opprette mappen for Decky-programtillegg</string> + <string name="deckymgr_extracting_zip">Pakker ut programtillegg-ZIP</string> + <string name="deckymgr_zip_one_folder">Programtillegg-ZIP-en må inneholde én mappe på toppnivå</string> + <string name="deckymgr_zip_missing_files">Programtillegg-ZIP-en mangler plugin.json, package.json eller dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Programtilleggets navn mangler</string> + <string name="deckymgr_session_started_plugin">En sesjon startet under installasjonen; avslutt den før du installerer et programtillegg</string> + <string name="deckymgr_plugin_installed">Programtillegg installert · start Steam på nytt for å laste det</string> + <string name="deckymgr_plugin_install_failed">Installasjon av programtillegg-ZIP mislyktes</string> + <string name="deckymgr_zip_too_many">Programtillegg-ZIP-en inneholder for mange oppføringer</string> + <string name="deckymgr_zip_invalid_path">Programtillegg-ZIP-en inneholder en ugyldig sti</string> + <string name="deckymgr_zip_duplicate_paths">Programtillegg-ZIP-en inneholder like stier</string> + <string name="deckymgr_zip_unsafe_path">Programtillegg-ZIP-en inneholder en utrygg sti</string> + <string name="deckymgr_folder_failed">Kunne ikke opprette programtillegg-mappen</string> + <string name="deckymgr_zip_too_large">Programtillegg-ZIP-en pakker ut til mer enn 1 GiB-grensen</string> + <string name="deckymgr_bundled_not_executable">Kunne ikke merke den medfølgende programtilleggsfilen som kjørbar</string> + <string name="deckymgr_remote_entry_invalid">Ugyldig remote_binary-oppføring</string> + <string name="deckymgr_remote_name_invalid">Ugyldig navn på ekstern kjørbar fil</string> + <string name="deckymgr_remote_url_https">URL-en til den eksterne kjørbare filen må bruke HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Den eksterne kjørbare filen %1$s har en ugyldig SHA-256-hash</string> + <string name="deckymgr_bin_dir_failed">Kunne ikke opprette bin-mappen for programtillegget</string> + <string name="deckymgr_downloading_binary">Laster ned programtilleggets kjørbare fil · %1$s</string> + <string name="deckymgr_binary_download_failed">Kunne ikke laste ned programtilleggets kjørbare fil %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Sjekksummen til den kjørbare filen stemmer ikke · %1$s</string> + <string name="deckymgr_binary_not_executable">Kunne ikke merke den kjørbare filen som kjørbar · %1$s</string> + <string name="deckymgr_binary_replace_failed">Kunne ikke erstatte den kjørbare filen · %1$s</string> + <string name="deckymgr_binary_install_failed">Kunne ikke installere den kjørbare filen · %1$s</string> + <string name="deckymgr_folder_taken">Programtillegg-mappen tilhører et annet programtillegg</string> + <string name="deckymgr_preserve_failed">Kunne ikke bevare det eksisterende programtillegget</string> + <string name="deckymgr_activate_failed">Kunne ikke aktivere det importerte programtillegget</string> + <string name="deckymgr_settings_failed">Kunne ikke oppdatere innstillingene for Decky-programtillegget</string> + <string name="deckymgr_restore_failed">Kunne ikke gjenopprette det eksisterende programtillegget</string> + + <string name="adbfix_save_failed">Kunne ikke lagre identiteten for trådløs feilsøking</string> + <string name="adbfix_command_failed">ADB-kommandoen mislyktes (%1$d)</string> + <string name="adbfix_not_confirmed">Android bekreftet ikke at grensen for underprosesser ble endret: %1$s</string> + <string name="adbfix_no_pairing">Ingen kobling for trådløs feilsøking er lagret</string> + <string name="adbfix_enter_address">Skriv inn dagens IP-adresse og port for trådløs feilsøking</string> + + <string name="adbpair_timed_out">Tidsavbrudd ved venting på koblingsvarselet. Prøv igjen fra DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Kunne ikke se etter koblingsvarselet (%1$d). Kontroller at Wi-Fi er på.</string> + <string name="adbpair_discovery_failed">Kunne ikke se etter koblingsvarselet: %1$s</string> + <string name="adbpair_six_digits">Skriv inn alle 6 tallene i koden</string> + <string name="adbpair_pairing">Kobler sammen…</string> + <string name="adbpair_code_rejected">Den koden fungerte ikke. Åpne koblingsvarselet igjen og skriv inn den nye koden.</string> + <string name="adbpair_connecting">Koblet sammen. Kobler til…</string> + <string name="adbpair_port_not_found">Koblet sammen, men porten for trådløs feilsøking ble ikke funnet. La trådløs feilsøking stå på og prøv igjen.</string> + <string name="adbpair_applying">Bruker innstillingen…</string> + <string name="adbpair_command_failed">Kommandoen for trådløs feilsøking mislyktes</string> + <string name="adbpair_channel_name">Oppsett av trådløs feilsøking</string> + <string name="adbpair_channel_description">Ber om koblingskoden for trådløs feilsøking mens Innstillinger er åpen</string> + <string name="adbpair_title_pair">Koble sammen trådløs feilsøking</string> + <string name="adbpair_waiting_text">Slå på trådløs feilsøking, og trykk så på «Par enhet med koblingskode».</string> + <string name="adbpair_waiting_long">Slå på trådløs feilsøking, og trykk så på «Par enhet med koblingskode». Hold deg i Innstillinger: koden kommer i denne varslingen.</string> + <string name="adbpair_code_label">6-tallers koblingskode</string> + <string name="adbpair_code_hint">Trykk på Skriv inn kode og skriv de 6 tallene som vises i Innstillinger.</string> + <string name="adbpair_title_code">Skriv inn Wi-Fi-koblingskoden</string> + <string name="adbpair_title_retry">Prøv koden igjen</string> + <string name="adbpair_enter_code">Skriv inn kode</string> + <string name="adbpair_title_working">Setter opp Steam</string> + <string name="adbpair_title_done">Steam er klar</string> + <string name="adbpair_done_text">Trykk for å gå tilbake til DroidDeck. Du kan slå av trådløs feilsøking nå.</string> + <string name="adbpair_title_failed">Oppsettet for trådløs feilsøking stoppet</string> + + <string name="selfinst_download_failed">Nedlastingen mislyktes</string> + <string name="selfinst_size_mismatch">Nedlastingens størrelse stemte ikke med den publiserte APK-en og ble forkastet – prøv igjen</string> + <string name="selfinst_checksum_mismatch">Nedlastingen stemte ikke med sjekksummen og ble forkastet – prøv igjen</string> + <string name="selfinst_wrong_package">Oppdateringen er for Android-pakken %1$s, ikke %2$s</string> + <string name="selfinst_metadata_signer">Oppdateringens metadata nevner ikke DroidDecks utgivelsessigneringsnøkkel</string> + <string name="selfinst_unreadable">Android kunne ikke lese den nedlastede APK-en</string> + <string name="selfinst_apk_wrong_package">Den nedlastede APK-en er for %1$s, ikke %2$s</string> + <string name="selfinst_version_mismatch">Den nedlastede APK-en sier versionCode %1$d, ikke den publiserte %2$d</string> + <string name="selfinst_downgrade">Android vil ikke installere versionCode %1$d over den installerte %2$d</string> + <string name="selfinst_no_signing">Den nedlastede APK-en har ingen signeringsinformasjon</string> + <string name="selfinst_wrong_signer">Den nedlastede APK-en er ikke signert med DroidDecks utgivelsesnøkkel</string> + <string name="appupd_http">Oppdateringskatalogen svarte HTTP %1$d</string> + + <string name="loadstate_starting">Starter sesjonen…</string> + <string name="loadstate_elapsed">%1$d:%2$02d gått · fortsatt i gang</string> + <string name="loadstate_steam_update">Laster ned Steam-klientoppdateringen · %1$d%%</string> + <string name="loadstate_steam_client">Laster ned Steam-klienten · %1$s</string> + + <string name="pextra_busy">En installasjon av et kompatibilitetsverktøy kjører allerede</string> + <string name="pextra_stop_session">Avslutt den aktive sesjonen før du installerer kompatibilitetsverktøy</string> + <string name="pextra_no_release">Fant ingen ARM64-utgivelse for %1$s</string> + <string name="pextra_no_space">Minst 4 GB ledig pluss nedlastingens størrelse er nødvendig for å installere %1$s</string> + <string name="pextra_downloading">Laster ned %1$s %2$s</string> + <string name="pextra_retrying">Prøver nedlastingen igjen · forsøk %1$d av %2$d</string> + <string name="pextra_interrupted">Nedlastingen ble avbrutt</string> + <string name="pextra_download_failed">Nedlastingen mislyktes; den delvise filen beholdes slik at et nytt forsøk kan fortsette</string> + <string name="pextra_too_big">Nedlastingen overskred utgivelsens størrelse og ble slettet</string> + <string name="pextra_incomplete">Nedlastingen var ikke fullført; den delvise filen beholdes for et gjenopptakende nytt forsøk</string> + <string name="pextra_verifying">Verifiserer nedlastingen</string> + <string name="pextra_checksum_unreadable">Kunne ikke lese utgivelsens sjekksum; prøv igjen</string> + <string name="pextra_no_checksum">%1$s %2$s publiserer ingen sjekksum; ingenting ble installert</string> + <string name="pextra_checksum_mismatch">Sjekksummen stemmer ikke; nedlastingen ble slettet</string> + <string name="pextra_session_started">En sesjon startet under nedlastingen; avslutt den før du installerer kompatibilitetsverktøy</string> + <string name="pextra_installing">Installerer %1$s</string> + <string name="pextra_install_failed">Installasjonen av %1$s mislyktes (avslutningskode %2$d)</string> + <string name="pextra_could_not_install">Kunne ikke installere %1$s</string> + <string name="esync_fetching">Henter droiddeck-esync-pakke</string> + + <string name="cmgr_fex_linux_helpers">med Linux-hjelpere</string> + <string name="cmgr_fex_dlls_only">Bare DLL-er</string> + <string name="cmgr_original_proton_updated">Original (Proton oppdatert siden siste bytte)</string> + <string name="cmgr_changed_outside">Endret utenfor Komponenter</string> + <string name="cmgr_not_present">ikke til stede</string> + <string name="cmgr_original_version">Original %1$s</string> + <string name="cmgr_original_from">Original fra %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s settes inn i %3$s når spillet som kjører på den avsluttes.</string> + <string name="cmgr_swap_done">%1$s %2$s er nå i %3$s. Det gjelder neste gang et spill starter.</string> + <string name="cmgr_original_missing">Den originale pakken er ikke lagret</string> + <string name="cmgr_restore_queued">%1$s av %2$s går tilbake til sin original når spillet som kjører på den avsluttes.</string> + <string name="cmgr_restore_done">%1$s av %2$s gjenopprettet fra sin %3$s-original.</string> + <string name="cmgr_package_in_use">%1$s er i bruk i %2$s. Bytt ut den Protonen med noe annet først.</string> + <string name="cmgr_package_not_stored">%1$s er ikke lagret</string> + <string name="cmgr_deleted">Slettet %1$s.</string> + <string name="cmgr_original_kept">Originalen til den installerte builden beholdes: det er veien tilbake.</string> + <string name="cmgr_not_stored">Ikke lagret</string> + <string name="cmgr_deleted_original">Slettet %1$s-originalen av %2$s.</string> + <string name="cmgr_nightlies_only">Nedlastinger kommer bare fra Nightlies-utgivelsene</string> + <string name="cmgr_list_predates_checksums">Denne pakkelisten er eldre enn sjekksummene – oppdater den og prøv igjen</string> + <string name="cmgr_checksum_mismatch">Sjekksummen stemmer ikke</string> + + <string name="sprefs_upscaler_linear">Lineær</string> + <string name="sprefs_upscaler_nearest">Nærmeste</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (kvalitet)</string> + <string name="sprefs_upscaler_sharpen">Bare skarphet</string> + <string name="sprefs_lod_bias_auto">Auto (følger skalering)</string> + + <string name="look_off_desc">Ingenting brukt.</string> + <string name="look_game_clarity">Spillklarhet</string> + <string name="look_game_clarity_desc">Skarphet med et snev kontrast – den for hver dag.</string> + <string name="look_vivid">Levende</string> + <string name="look_vivid_desc">Farger skrudd opp. Fargebåndfjerning på, så himmelen ikke striper.</string> + <string name="look_cinematic">Filmatisk</string> + <string name="look_cinematic_desc">Dypere kontrast, kjøligere farger, kanter utjevnet.</string> + <string name="look_competitive">Konkurranse</string> + <string name="look_competitive_desc">Skygger hevet og kraftig skarphet – se folk først.</string> + <string name="look_adaptive_sharpen">Adaptiv skarphet</string> + <string name="look_adaptive_sharpen_desc">Bare skarphet, farger urørt.</string> + <string name="look_filmic">Filmaktig</string> + <string name="look_filmic_desc">Filmlignende kurve, litt dempet.</string> + <string name="look_arcade">Arkade</string> + <string name="look_arcade_desc">Høylytt og kraftfull.</string> + <string name="look_retro_crt">Retro CRT</string> + <string name="look_retro_crt_desc">CRT-rørets og det analoge signalet går sammen.</string> + <string name="look_upscale_sharp">Oppskalert skarp</string> + <string name="look_upscale_sharp_desc">For å kjøre under skjermens oppløsning.</string> + <string name="look_pixel_clean">Piksel-ren</string> + <string name="look_pixel_clean_desc">Skarpe piksler for 2D og gamle titler.</string> + <string name="look_anime_edge">Anime-kant</string> + <string name="look_anime_edge_desc">Tegnefilm-konturer pluss skarphet.</string> + + <string name="gpuinfo_not_adreno">Ikke en Adreno-GPU</string> + <string name="gpuinfo_supported">Støttet</string> + <string name="gpuinfo_experimental">Eksperimentell: driverne er testbuilder</string> + <string name="gpuinfo_below_tested">Under testet maskinvare (Adreno 725 og nyere): den kan ikke kjøre</string> + <string name="gpuinfo_unsupported">Ikke støttet: DroidDeck krever en Adreno (Snapdragon) GPU</string> + + <string name="turnip_rate_limited">GitHubs hastighetsgrense ble nådd – prøv igjen senere</string> + <string name="turnip_github_http">GitHub svarte HTTP %1$d</string> + <string name="turnip_download_failed">Nedlastingen mislyktes</string> + <string name="turnip_list_predates_checksums">Denne driverlisten er eldre enn sjekksummene – oppdater den og prøv igjen</string> + <string name="turnip_checksum_mismatch">Sjekksummen stemmer ikke – nedlastingen ble forkastet</string> + <string name="turnip_not_adrenotools">Ikke en AdrenoTools-driver: %1$s</string> + <string name="turnip_reject_no_meta">ingen meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json kan ikke leses (%1$s)</string> + <string name="turnip_reject_linux_driver">dette er en Linux-kjøretidsdriver (importer den under «Linux-kjøretidsdriver»)</string> + <string name="turnip_reject_wayland">dette er en Wayland-spilldriver, som denne appen ikke har bruk for</string> + <string name="turnip_reject_no_library_name">meta.json nevner ingen libraryName, så ingenting kunne gis til AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json nevner %1$s, som ikke finnes i zip-filen</string> + <string name="turnip_reject_not_aarch64">%1$s er ikke et 64-bit AArch64 ELF-delt bibliotek</string> + <string name="turnip_reject_glibc">%1$s lenker glibc – en «-Linux»-Turnip, som hører under «Linux-kjøretidsdriver»</string> + <string name="lvd_no_library">Ingen libvulkan_freedreno*.so i denne zip-filen. En Android- (AdrenoTools-) eller -Wayland-Turnip-zip er ikke en Linux-kjøretidsdriver.</string> + <string name="lvd_not_aarch64">%1$s er ikke et 64-bit AArch64 ELF-delt bibliotek.</string> + <string name="lvd_not_glibc">%1$s er ikke en glibc-driver – den lenker Androids libc. Linux-kjøretiden krever en «-Linux»-zip; en vanlig eller «-Wayland»-Turnip kan ikke lastes av Steam-klienten i det hele tatt.</string> + <string name="bundle_no_manifest">Ikke en driverpakke: ingen manifest.json som nevner en android- og en linux-driver</string> + <string name="bundle_entry_outside">Ikke en driverpakke: %1$s peker utenfor den</string> + <string name="bundle_too_large">Ikke en driverpakke: den pakkes ut til mer enn %1$d MB</string> + + <string name="gstore_sd_card">SD-kort</string> + <string name="gstore_folder">Mappe</string> + + <string name="logshare_chooser">Del sesjonslogger</string> + + <string name="hdr_needs_android_10">krever Android 10 eller nyere (skjermlag med et fargerom)</string> + <string name="hdr_none">denne skjermen rapporterer ingen HDR-støtte</string> + <string name="hdr_not_hdr10">denne skjermen støtter %1$s, ikke HDR10</string> + + <string name="gpu_this_gpu">denne GPU-en</string> + <string name="phantom_title_on">Grensen for underprosesser er på</string> + <string name="phantom_title_unset">Grensen for underprosesser er ikke angitt</string> + <string name="phantom_title_unreadable">Grensen for underprosesser kunne ikke kontrolleres</string> + <string name="phantom_title_off">Grensen for underprosesser er av</string> + <string name="phantom_title_not_required">Grensen for underprosesser ikke nødvendig</string> + <string name="phantom_instructions_fix">%1$s Hvis det ikke er mulig, koble denne enheten til en datamaskin med ADB og kjør kommandoen under. Kom tilbake hit og kontroller igjen.</string> + <string name="phantom_instructions_off">Steam-sesjoner kan starte.</string> + <string name="phantom_instructions_not_applicable">Denne Android-versjonen bruker ikke denne grensen.</string> + <string name="phantom_fix_toggle">Slå på «Slå av begrensninger for underordnede prosesser» i Utvikleralternativer, og la Utvikleralternativer stå på etterpå.</string> + <string name="phantom_fix_no_toggle">Denne Android-versjonen har ingen bryter for det. Bruk trådløs feilsøking for å endre det fra denne enheten.</string> + <string name="upd_block_no_apk">Denne builden har ingen nedlasting for denne kopien av DroidDeck.</string> + <string name="upd_block_version_code">Android vil ikke installere den over denne builden fordi dens versionCode %1$d er under den installerte %2$d.</string> + <string name="upd_fail_downgrade">Android vil ikke installere en eldre versjon over en nyere. Bli på denne builden til kanalen tar den igjen.</string> + <string name="upd_fail_signature">Denne kopien av DroidDeck er signert annerledes (en lokal build?), så Android vil ikke oppdatere den direkte.</string> + <string name="upd_fail_storage">Det er ikke nok ledig plass for oppdateringen.</string> + <string name="upd_fail_aborted">Oppdateringen ble avbrutt.</string> + <string name="upd_fail_with_message">Oppdateringen ble ikke installert: %1$s</string> + <string name="upd_fail_generic">Oppdateringen ble ikke installert.</string> + <string name="saves_layout_zip">%1$s-zip</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s har ikke blitt startet ennå</string> + <string name="saves_none_found">Fant ingen lagringsfiler for %1$s</string> + <string name="saves_not_save_zip">%1$s har ingen drive_c-mappe, så det er ikke en GameHub- eller Winlator-lagrings-zip</string> + <string name="gstore_cannot_create">kan ikke opprette mapper i %1$s</string> + <string name="gstore_cannot_write">kan ikke skrive i %1$s</string> + <string name="gstore_cannot_write_detail">kan ikke skrive i %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Mappen er ikke tilgjengelig</string> + <string name="gfiles_name_taken">En annen fil bruker allerede %1$s</string> + <string name="gfiles_art_unavailable">Grafikkmappen er ikke tilgjengelig</string> + <string name="gfiles_unrelated_inventory">Mappen har en urelatert synkroniseringsoversikt</string> + <string name="gfiles_remove_failed">Kunne ikke fjerne %1$s</string> + <string name="gfiles_outside_folder">Filen ligger utenfor eksportmappen</string> + <string name="cmgr_fex_unnamed">FEX (build uten versjonsnavn)</string> + <string name="cmgr_no_profile">ingen profile.json i %1$s</string> + <string name="cmgr_not_component_package">%1$s er ikke en Linux-komponentpakke (type %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s ledig</string> + <string name="mode_storage_auto_short">Automatisk</string> + <string name="appupd_catalog_rejected">Oppdateringskatalogen mislyktes i sine kontroller (%1$s)</string> + <string name="main_adb_clip_label">DroidDeck-innstilling for underprosesser</string> + <string name="setup_signed_in_offline_unnamed">Innlogget · frakoblet modus</string> + <string name="setup_signed_in_unnamed">Innlogget</string> + <string name="driver_tag_bundled">MEDFØLGER</string> + <string name="driver_tag_downloaded">NEDLASTET</string> + <string name="driver_tag_imported">IMPORTERT</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Sesjonsskjerm</string> + <string name="display_resolution">Oppløsning</string> + <string name="display_game_fit">16:9-spilltilpasning</string> + <string name="display_game_fit_hint">Hvordan 16:9-spill tilpasses denne skjermen. Fra neste sesjon.</string> + <string name="display_game_fit_unavailable">Velg Tilpass skjerm eller en egendefinert størrelse smalere enn 16:9.</string> + <string name="display_preserve">Behold proporsjoner</string> + <string name="display_stretch">Strekk til skjermen</string> + <string name="display_image_scaling">Bildeskalering</string> + <string name="display_filter">Skaleringsfilter</string> + <string name="display_filter_hint">Delt av Steam og Skrivebord.</string> + <string name="display_filter_live">Gjelder live. Delt av Steam og Skrivebord.</string> + <string name="display_filter_note">FSR, GSR og NIS gjelder ved forstørring av sesjonsbildet. Bare skarphet fungerer også uten forstørring.</string> + <string name="display_sharpness">Filterskarphet</string> + <string name="display_frame_rate">Bildefrekvens</string> + <string name="display_look_filter">%1$s Setter skalering til %2$s.</string> + <string name="display_match_screen">Tilpass skjerm (%1$d×%2$d)</string> + <string name="display_follow_screen">Følg skjermen (endrer størrelse ved sammenslåing eller utbretting)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Vis enhetsdetaljer</string> + <string name="device_info_hide">Skjul enhetsdetaljer</string> + <string name="device_info_loading">Leser enheten…</string> + <string name="device_info_copy">Kopier</string> + <string name="device_info_copy_hint">Kopier disse detaljene inn i en feilrapport.</string> + <string name="device_info_copied">Kopiert.</string> + <string name="force_ssbs_title">Tvungen SSBS</string> + <string name="force_ssbs_hint">Holder en CPU-hastighetsinnstilling som Wine stadig slår av. Kan gjøre Windows-spill raskere på Snapdragon 8 Elite; lite endring sett på eldre brikker. Gjelder fra neste spilløkt.</string> + + <string name="rail_stores">Butikker</string> + <string name="source_steam">Steam</string> + <string name="source_added">Egendefinert</string> + <string name="setup_stores">Butikker</string> + <string name="setup_stores_open_on">Åpne en butikk på</string> + <string name="setup_stores_speed">Nedlastingshastighetsnivå</string> + <string name="setup_stores_engine">Butikkmotor</string> + <string name="setup_stores_engine_chip_ready">● Motor klar</string> + <string name="setup_stores_engine_chip_missing">Ikke bygget</string> + <string name="stores_tier_balanced">Balansert</string> + <string name="stores_tier_fast">Rask</string> + <string name="stores_tier_max">Maks</string> + <string name="stores_title">Butikker</string> + <string name="stores_settings">Butikkinnstillinger</string> + <string name="stores_settings_eyebrow">Innstillinger</string> + <string name="stores_chip_signed_out">(ikke innlogget)</string> + <string name="stores_tab_store">Butikk</string> + <string name="stores_tab_installed">Installert</string> + <string name="stores_tab_library">Bibliotek</string> + <string name="stores_tab_all">Alle</string> + <string name="stores_tab_downloads">Nedlastinger</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Logg inn</string> + <string name="stores_signout_named">%1$s · logg ut</string> + <string name="stores_signout_title">Logge ut av %1$s?</string> + <string name="stores_signout_note">Installerte spill blir liggende. Biblioteket hentes på nytt når du logger inn igjen.</string> + <string name="stores_signout_stay">Fortsett innlogget</string> + <string name="stores_signout_go">Logg ut</string> + <string name="stores_search_catalog">Søk i %1$s-katalogen…</string> + <string name="stores_search_installed">Søk i installerte spill…</string> + <string name="stores_search_library">Søk i biblioteket ditt…</string> + <string name="stores_search_open">Søk</string> + <string name="stores_installed_empty">Ingenting installert</string> + <string name="stores_library_loading">Laster</string> + <string name="stores_nothing_matches">Ingen spill</string> + <string name="stores_shelves_loading">Laster butikken…</string> + <string name="stores_amazon_no_catalog">Ingen katalog</string> + <string name="stores_shelf_new">Nytt</string> + <string name="stores_shelf_deals">Tilbud</string> + <string name="stores_shelf_free">Gratisspill</string> + <string name="stores_shelf_trending">Trender</string> + <string name="stores_shelf_library">Biblioteket ditt</string> + <string name="stores_play">Spill</string> + <string name="stores_install">Installer</string> + <string name="stores_resume_install">Gjenoppta installasjon</string> + <string name="stores_dl_interrupted">Avbrutt</string> + <string name="stores_install_size">Installer · %1$s</string> + <string name="stores_get_free">Hent gratis</string> + <string name="stores_view_on">Vis på %1$s</string> + <string name="stores_buy_price">Kjøp · %1$s</string> + <string name="stores_installed_chip">Installert</string> + <string name="stores_in_library">I biblioteket</string> + <string name="stores_free">Gratis</string> + <string name="stores_resume">Gjenoppta</string> + <string name="stores_refresh">Oppdater</string> + <string name="stores_sort">Sorter</string> + <string name="stores_sort_last_played">Nylig spilt</string> + <string name="stores_sort_recently_installed">Nylig installert</string> + <string name="stores_sort_title_asc">Tittel A–Å</string> + <string name="stores_sort_title_desc">Tittel Å–A</string> + <string name="stores_sort_size_desc">Størrelse: størst</string> + <string name="stores_sort_size_asc">Størrelse: minst</string> + <string name="stores_sort_release_date">Utgivelsesdato</string> + <string name="stores_view_list">Listevisning</string> + <string name="stores_view_cards">Kortvisning</string> + <string name="stores_show_mature">Vis innhold for voksne</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Frakoblet</string> + <string name="epic_card_none">Av</string> + <string name="epic_eos">Epic-innlogging (EOS)</string> + <string name="epic_offline">Start frakoblet</string> + <string name="epic_resolve">Løs Epic-innlogging</string> + <string name="epic_client_version">Versjon %1$s</string> + <string name="epic_client_no_runtime">Installer Linux-kjøretiden først</string> + <string name="epic_client_checking">Ser etter nyeste versjon…</string> + <string name="epic_client_unpacking">Pakker ut…</string> + <string name="epic_client_unreachable">Nedlastingsserveren svarte ikke</string> + <string name="epic_client_needs_fex">Epic Games Launcher trenger FEX, som Steam laster ned. Åpne launcheren igjen når Steam har startet.</string> + <string name="epic_client_download_failed">Nedlasting mislyktes: %1$s</string> + <string name="epic_client_unpack_failed">Kunne ikke pakke ut launcheren: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher godtok ikke innloggingen. Start den på nytt fra launcheren.</string> + <string name="epic_client_uninstall_body">Fjerner startprogrammet og frigjør plassen. Epic-spillene dine forblir installert og fungerer, og påloggingen beholdes til neste installasjon.</string> + <string name="epic_client_uninstall_stops">Den kjørende økten lukkes først.</string> + <string name="epic_client_uninstalled">Epic Games Launcher er avinstallert</string> + <string name="epic_client_uninstall_failed">Noen filer for startprogrammet kunne ikke fjernes. Prøv igjen.</string> + <string name="epic_client_uninstalling">Vent til Epic Games Launcher er ferdig avinstallert</string> + <string name="store_cloud_saves">Skylagringer</string> + <string name="cloud_upload">Last opp til skyen</string> + <string name="cloud_download">Last ned fra skyen</string> + <string name="cloud_none">Ingen skylagringer</string> + <string name="cloud_conflict">Skykonflikt</string> + <string name="cloud_conflict_files">Skykonflikt · %1$d filer</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Behold skyversjon</string> + <string name="cloud_keep_local">Behold lokal versjon</string> + <string name="cloud_checking">Kontrollerer skyen…</string> + <string name="cloud_last_sync">Siste synkronisering %1$s</string> + <string name="cloud_never">Ikke synkronisert ennå</string> + <string name="cloud_done">%1$d filer</string> + <string name="stores_eyebrow_installed">installert</string> + <string name="stores_eyebrow_library">i biblioteket ditt</string> + <string name="stores_eyebrow_store">butikk</string> + <string name="achievements_title">Prestasjoner</string> + <string name="achievements_count">%1$d av %2$d låst opp</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Låst opp · %1$d</string> + <string name="achievements_group_locked">Låst · %1$d</string> + <string name="achievements_group_hidden">Skjult · %1$d</string> + <string name="achievements_hidden">Skjult prestasjon</string> + <string name="achievements_hidden_detail">Detaljer vises når den er låst opp.</string> + <string name="achievements_all">Alle prestasjoner låst opp</string> + <string name="achievements_reading">Laster…</string> + <string name="achievements_signed_out">Logg inn på %1$s for å se prestasjonene dine.</string> + <string name="achievements_unreachable">Kunne ikke nå %1$s. Sjekk igjen når du er på nett.</string> + <string name="achievements_none">%1$s har ingen prestasjoner for dette spillet.</string> + <string name="achievements_show_all">Vis alle %1$d</string> + <string name="achievements_dialog_title">Prestasjoner · %1$s</string> + <string name="stores_in_steam">✓ I Steam</string> + <string name="stores_uninstall">Avinstaller</string> + <string name="stores_uninstalling">Avinstallerer…</string> + <string name="stores_uninstall_title">Avinstallere %1$s?</string> + <string name="stores_uninstall_body_size">Frigjør %1$s og fjerner det fra Steam.</string> + <string name="stores_uninstall_body">Fjerner filene og Steam-snarveien.</string> + <string name="stores_launch_not_registered">Steam plukker opp spillet neste gang det starter; start det derfra, eller start Steam nå.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Steams valg per spill</string> + <string name="stores_card_audio">Lyd</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Komponenter</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motor</string> + <string name="stores_card_engine_value">%1$s · nativ</string> + <string name="stores_card_engine_java">%1$s · innebygd</string> + <string name="stores_how_it_runs">Hvordan det kjører</string> + <string name="stores_kv_fetched">Hentet fra</string> + <string name="stores_kv_fetched_value">%1$s, med kontoen din</string> + <string name="stores_kv_installed_to">Installert til</string> + <string name="stores_kv_installed_to_value">Spillagring (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Startet av</string> + <string name="stores_kv_launched_by_value">Steam og Proton, samme sti som Steam-spill</string> + <string name="stores_kv_launched_by_epic">Steam og Proton · Epic-innlogging per start, EOS-overlegg av</string> + <string name="stores_kv_launched_by_amazon">Steam og Proton · Amazon Games Services-variabler satt</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">lagt til i Steam ved installasjon (Deck-grensesnitt + Steam Input)</string> + <string name="stores_downloads_empty">Ingen nedlastinger</string> + <string name="stores_dl_paused">Pauset</string> + <string name="stores_dl_queued">I kø</string> + <string name="stores_dl_queued_at">I kø · #%1$d</string> + <string name="stores_dl_cancelled">Avbrutt</string> + <string name="stores_dl_failed">Mislyktes</string> + <string name="stores_dl_failed_reason">Mislyktes · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pause</string> + <string name="stores_dl_resume">Gjenoppta</string> + <string name="stores_dl_cancel">Avbryt</string> + <string name="stores_dl_retry">Prøv igjen</string> + <string name="stores_dl_clear">Fjern</string> + <string name="stores_dl_clear_all">Fjern fullførte</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Nedlasting</string> + <string name="stores_stage_verify">Verifisering</string> + <string name="stores_stage_install">Installasjon</string> + <string name="stores_stage_done">Ferdig</string> + <string name="stores_stage_checking">Kontrollerer</string> + <string name="stores_stage_downloading">Laster ned</string> + <string name="stores_dl_cancel_confirm">Slette nedlastingen?</string> + <string name="stores_dl_failed_kept">Mislyktes · %1$s beholdt</string> + <string name="stores_stage_verifying">Verifiserer</string> + <string name="stores_stage_installing">Installerer</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d filer</string> + <string name="stores_download_manager">Nedlastingsbehandling</string> + <string name="stores_parallel">Samtidige nedlastinger</string> + <string name="stores_install_where">Installer til</string> + <string name="stores_install_title">Installer %1$s:</string> + <string name="stores_target_internal">Intern</string> + <string name="stores_target_free">%1$s ledig</string> + <string name="stores_target_free_unknown">Ledig plass ukjent</string> + <string name="stores_storage_insufficient">For lite ledig plass: trenger %1$s, bare %2$s ledig</string> + <string name="stores_storage_low">For lite plass (%1$s ledig, %2$s trengs)</string> + <string name="stores_notification_channel">Butikknedlastinger</string> + <string name="stores_notification_channel_hint">Viser nedlastingsfremgang for spill og holder nedlastinger i gang i bakgrunnen</string> + <string name="stores_notification_one">Laster ned</string> + <string name="stores_notification_many">%1$d nedlastinger</string> + <string name="stores_notification_waiting">Forbereder…</string> + <string name="stores_notification_done_channel">Fullførte butikknedlastinger</string> + <string name="stores_notification_installed">%1$s installert</string> + <string name="stores_notification_failed">Nedlasting av %1$s mislyktes</string> + <string name="stores_notification_delete">Slett</string> + <string name="stores_notification_keep">Behold</string> + <string name="stores_login_title">Logg inn på %1$s</string> + <string name="stores_login_provider_title">Logg inn med leverandøren din</string> + <string name="stores_login_reload">Last på nytt</string> + <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_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> + <string name="stores_login_error_ssl">Tilkoblingen til innloggingssiden er ikke sikker.</string> + <string name="stores_login_error_verification">Innloggingen kunne ikke verifiseres. Prøv igjen.</string> + <string name="stores_login_error_generic">Innlogging mislyktes. Prøv igjen.</string> + <string name="common_close">Lukk</string> + <string name="common_back">Tilbake</string> + <string name="common_edit">Rediger</string> + <string name="games_add_all">Legg til alle spill i denne mappen</string> + <string name="games_added_none">Ingenting nytt i denne mappen</string> + <string name="edit_name">Navn</string> + <string name="edit_target">Mål</string> + <string name="edit_start_in">Start i</string> + <string name="edit_launch_options">Startalternativer</string> + <string name="edit_artwork">Grafikk</string> + <string name="edit_other_exe">Annen exe…</string> + <string name="edit_remove">Fjern</string> + <string name="art_cover">Omslag</string> + <string name="art_wide_cover">Bredt omslag</string> + <string name="art_adjust_logo">Juster logo</string> + <string name="logo_pos_default">Standard</string> + <string name="logo_pos_upper_left">Øvre venstre</string> + <string name="logo_pos_upper_center">Øvre midt</string> + <string name="logo_pos_center">Midten</string> + <string name="logo_pos_bottom_left">Nedre venstre</string> + <string name="logo_pos_bottom_center">Nedre midt</string> + <string name="logo_pos_position">Posisjon</string> + <string name="logo_pos_size">Størrelse</string> + <string name="logo_pos_save">Lagre</string> + <string name="logo_pos_reset">Tilbake til standard</string> + <string name="logo_pos_hint">Tegnes oppå spillets bakgrunn, slik Steam gjør. Den nøyaktige posisjonen kan avvike noen piksler.</string> + <string name="logo_pos_no_logo">Dette spillet har ingen logo ennå. Velg en under Logo for å se den her.</string> + <string name="logo_pos_failed">Logoposisjonen kunne ikke lagres. Prøv igjen.</string> + <string name="art_background">Bakgrunn</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Ikon</string> + <string name="art_src_folder">Spillmappe</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Din fil</string> + <string name="art_src_exe">Fra exe-filen</string> + <string name="art_src_auto">Automatisk</string> + <string name="art_pick_image">Velg bilde…</string> + <string name="art_pick_title">Velg et bilde: %1$s</string> + <string name="art_reset">Tilbakestill til automatisk</string> + <string name="art_search_sgdb">Søk på SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Søk etter et spill</string> + <string name="art_sgdb_other_games">Andre treff</string> + <string name="art_sgdb_none">Ingen treff.</string> + <string name="art_sgdb_no_key">SteamGridDB krever en API-nøkkel. Legg til din under Innstillinger › Launcher.</string> + <string name="art_sgdb_bad_key">SteamGridDB godtok ikke API-nøkkelen. Sjekk den under Innstillinger › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB begrenser antall forespørsler akkurat nå. Prøv igjen om et minutt.</string> + <string name="art_sgdb_offline">Får ikke kontakt med SteamGridDB. Sjekk tilkoblingen.</string> + <string name="art_sgdb_server">Noe gikk galt hos SteamGridDB. Prøv igjen senere.</string> + <string name="art_sgdb_no_game">SteamGridDB har ingen treff for dette spillet. Prøv å søke på det.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d spill lagt til</item> + <item quantity="other">%1$d spill lagt til</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d allerede i Spill</item> + <item quantity="other">%1$d allerede i Spill</item> + </plurals> + <string name="hop_back">B · Tilbake til %1$s</string> + <string name="hop_from_games">spillet</string> + <string name="hop_from_play">Spillinnstillinger</string> + <string name="sheet_graphics_drivers">Grafikkdrivere</string> + <string name="comp_this_proton">Denne Protonen</string> + <string name="comp_every_proton">Hver Proton</string> + <string name="comp_for_every_proton">For hver Proton</string> + <string name="comp_available_count">Tilgjengelig · %1$d</string> + <string name="comp_checked">Sjekket %1$s</string> + <string name="comp_check_all">Se etter nye komponenter og drivere</string> + <string name="comp_get">Hent</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton og FEX under hører til denne Protonen</string> + <string name="comp_device_tested">%1$s · testet</string> + <string name="comp_device_untested">%1$s · ikke testet</string> + <string name="comp_device_unsupported">%1$s · ikke støttet</string> + <string name="gpu_auto_keeps">Holder det anbefalte paret oppdatert</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Kjøretids- og skjermdrivere separat</string> + <string name="gpu_use_title">Bruke %1$s?</string> + <string name="gpu_mode_title">Slik velges drivere</string> + <string name="gpu_mode_auto_detail">Det beste paret for denne GPU-en, alltid oppdatert</string> + <string name="gpu_mode_pair">Matchet par</string> + <string name="gpu_mode_pair_detail">Velg et par; setter begge driverne</string> + <string name="gpu_mode_mix">Fri blanding</string> + <string name="gpu_mode_mix_detail">Velg bilde og kjøretidsmiljø hver for seg</string> + <string name="gpu_mode_pair_short">Par</string> + <string name="gpu_mode_mix_short">Blandet</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAR</string> + <string name="gpu_src_bundle">PAKKE</string> + <string name="gpu_src_chosen">VALGT</string> + <string name="gpu_src_by_gpu">PER GPU</string> + <string name="gpu_src_default">STANDARD</string> + <string name="gpu_display_live">Tegner nå</string> + <string name="gpu_display_pending">Krever omstart · til da tegner %1$s</string> + <string name="gpu_runtime_live">Aktiv</string> + <string name="gpu_runtime_pending">Neste økt · denne beholder %1$s</string> + <string name="gpu_display_next">Tegner skjermen. Gjelder fra neste økt.</string> + <string name="gpu_previous_driver">forrige driver</string> + <string name="gpu_restart_banner">Start på nytt for å bytte bildedriver.</string> + <string name="gpu_restart_blocked">Stopp den gjeldende økten og start DroidDeck på nytt for å bytte bildedriver.</string> + <string name="gpu_restart_now">Start på nytt nå</string> + <string name="gpu_restart_later">Senere</string> + <string name="gpu_auto_title">Automatisk valgte dette paret for din %1$s</string> + <string name="gpu_auto_builtin_title">Automatisk bruker de innebygde driverne for din %1$s</string> + <string name="gpu_auto_reason">Valgt for %1$s-familien. Nye versjoner installeres i bakgrunnen.</string> + <string name="gpu_pair_title">Velg et par</string> + <string name="gpu_pair_hint">Et par setter bildedriveren og kjøretidsdriveren sammen.</string> + <string name="gpu_mix_title">Velg hver driver</string> + <string name="gpu_mix_hint">En pakke fyller begge plassene. Bildeendringer gjelder etter en omstart, kjøretidsendringer fra neste økt.</string> + <string name="gpu_change_display">Bytt bildedriver</string> + <string name="gpu_change_runtime">Bytt kjøretidsdriver</string> + <string name="gpu_autos_pick">AUTOMATISK VALG</string> + <string name="gpu_installed">Installert</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · start på nytt for å bruke</string> + <string name="gpu_chip_restart">%1$s · krever omstart</string> + <string name="comp_this_device">Denne enheten</string> + <string name="proton_remove_title">Fjerne %1$s?</string> + <string name="setup_tab_diagnostics">Diagnostikk</string> + <string name="setup_ready">Klar til å spille</string> + <string name="setup_not_ready">Ikke klar til å spille ennå</string> + <string name="setup_ready_runtime">kjøretid %1$s</string> + <string name="setup_ready_limit_off">prosessgrense av</string> + <string name="setup_ready_signed_in">innlogget som %1$s</string> + <string name="setup_needs_you">Når noe trenger deg</string> + <string name="setup_group_look">Utseende</string> + <string name="setup_group_device">Denne enheten</string> + <string name="setup_group_art">Biblioteksgrafikk</string> + <string name="setup_group_download">Nedlasting</string> + <string name="setup_download_source">Kilde</string> + <string name="setup_download_source_auto">Automatisk</string> + <string name="setup_download_source_direct">Direkte</string> + <string name="setup_download_source_mirror">Speil</string> + <string name="setup_download_source_custom">Eget prefiks</string> + <string name="setup_download_mirror">Nettsted</string> + <string name="setup_download_prefix">Prefiks</string> + <string name="flathub_eyebrow">LINUX-APPER</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Skrivebordsapper for Linux-skrivebordet, åpnet fra Skrivebord.</string> + <string name="flathub_setup">Sett opp Flathub</string> + <string name="flathub_remove_title">Fjerne %1$s?</string> + <string name="flathub_remove_note">Innstillingene og filene beholdes.</string> + <string name="flathub_keep">Behold</string> + <string name="desktop_size">Størrelse på disk</string> + <string name="desktop_uninstall_title">Avinstallere skrivebordet?</string> + <string name="desktop_all_systems">Alle</string> + <string name="gog_achievements">GOG-prestasjoner</string> + <string name="gog_achievements_hint">Synkroniserer prestasjoner for støttede GOG-spill. Gjelder fra neste oppstart.</string> + <string name="gog_achievements_off">Prestasjoner av</string> + <string name="gog_achievements_on">Prestasjoner på</string> + <string name="gog_achievements_signin">Logg inn på GOG igjen</string> + <string name="gog_achievements_uploaded">Prestasjoner lastet opp</string> + <string name="gog_achievements_pending">Opplasting av prestasjon venter</string> + <string name="gog_achievements_enable_store">Slå på GOG-prestasjoner i Store-innstillinger</string> + <string name="gog_achievements_unavailable">Prestasjoner ikke tilgjengelig; sjekk sesjonsloggene</string> + <string name="achievement_unlocked">Prestasjon låst opp</string> + <string name="touch_paste">Lim inn</string> + <string name="touch_dpad">Styrekors</string> + <string name="touch_left_stick">Venstre stikke</string> + <string name="touch_right_stick">Høyre stikke</string> + <string name="touch_menu">Meny</string> + <string name="touch_keyboard">Tastatur</string> + <string name="touch_dpad_up">Styrekors opp</string> + <string name="touch_dpad_down">Styrekors ned</string> + <string name="touch_dpad_left">Styrekors venstre</string> + <string name="touch_dpad_right">Styrekors høyre</string> + <string name="touch_title">Berøringskontroller</string> + <string name="touch_controller">Berøringskontroll</string> + <string name="touch_mouse">Mus</string> + <string name="touch_on">På</string> + <string name="touch_off">Av</string> + <string name="touch_speed_slow">Sakte</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Rask</string> + <string name="touch_edit_layout">Rediger oppsett</string> + <string name="touch_droiddeck_menu">DroidDeck-meny</string> + <string name="touch_drag_hint">Dra kontroller ut på skjermen</string> + <string name="touch_arrange">Ordne</string> + <string name="touch_discard">Forkast</string> + <string name="touch_saving">Lagrer…</string> + <string name="touch_icon">Ikon</string> + <string name="touch_narrower">B−</string> + <string name="touch_wider">B+</string> + <string name="touch_shorter">H−</string> + <string name="touch_taller">H+</string> + <string name="touch_hide">Skjul</string> + <string name="touch_color_opacity">Farge og opasitet…</string> + <string name="touch_copy_layout">Kopier dette oppsettet</string> + <string name="touch_layout_copied">Oppsett kopiert; lim det inn i berøringsoppsettet til et hvilket som helst spill</string> + <string name="touch_paste_layout">Lim inn kopiert oppsett</string> + <string name="touch_reset_layout">Tilbakestill til Steams standard</string> + <string name="touch_no_binding">Denne kontrollen har ingen binding i Steam å gi et ikon</string> + <string name="touch_icon_for">Ikon for %1$s</string> + <string name="touch_layout_color">Farge på berøringsoppsett</string> + <string name="touch_done">Fullført</string> + <string name="touch_save_failed">Kunne ikke lagre berøringsoppsettet</string> + <string name="touch_saved">Berøringsoppsett lagret til Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Etikett (valgfritt)</string> + <string name="touch_icons_missing">Steams ikoner ble ikke funnet</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d ikon fra Steam</item> + <item quantity="other">%1$d ikoner fra Steam</item> + </plurals> + <string name="touch_icon_color">Ikonfarge</string> + <string name="touch_button_color">Knappefarge</string> + <string name="touch_no_icon">Ikke noe ikon</string> + + <string name="stores_sync_sign_in">Kontrollerer innlogging…</string> + <string name="stores_sync_library">Henter biblioteket ditt…</string> + <string name="stores_sync_game_list">Henter spilliste…</string> + <string name="stores_sync_details">Laster spilldetaljer… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Synkroniserer %1$d spill…</item> + <item quantity="other">Synkroniserer %1$d spill…</item> + </plurals> + <string name="stores_sync_progress">Synkroniserer… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Henter omslagsbilder…</string> + <string name="stores_sync_failed">Synkronisering mislyktes</string> + <string name="stores_sync_no_games">Fant ingen spill i %1$s-biblioteket ditt</string> + <string name="stores_sync_amazon_no_answer">Amazon Games svarte ikke for biblioteket ditt: oppdater, eller logg inn på nytt</string> + <string name="stores_sync_gog_unreachable">Kunne ikke nå GOG</string> + <string name="stores_sync_gog_unreadable">Kunne ikke lese GOG-biblioteket ditt</string> + <string name="stores_registering">Registrerer hos Steam…</string> + <string name="mode_client_arch">Steam-klient</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC-diagnostikk</string> + <string name="setup_vac_diag_hint">Source-spill logger konsollen sin (-condebug); vac.txt i sesjonsloggene viser om det er sikret eller ikke</string> + <string name="load_starting_steam_x64">Starter Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Brukes av x86-64-Steam-klienten</string> + <string name="storage_uninstall_in_x64">Denne kopien ligger i x86-64-Steam-klienten. Velg x86-64 under Steam-klient, og avinstaller den så her.</string> + <string name="storage_uninstall_in_arm64">Denne kopien ligger i ARM64-Steam-klienten. Velg ARM64 under Steam-klient, og avinstaller den så her.</string> + <string name="drawer_page_glasses">Briller</string> + <string name="glasses_open">VITURE-briller</string> + <string name="glasses_control">Brillestyring</string> + <string name="glasses_driver_missing">Denne versjonen inneholder ikke driveren for disse brillene.</string> + <string name="glasses_connection_failed">Kunne ikke koble til brillene. Koble til kabelen på nytt, eller trykk på Tillat for å prøve igjen.</string> + <string name="glasses_allow">Tillat</string> + <string name="glasses_allow_hint">La DroidDeck stille inn brillenes oppdateringsfrekvens, 3D-modus, lysstyrke, volum og solskjerming og lese av hodesporingen deres.</string> + <string name="glasses_asking">Venter på at du tillater det i Android-dialogen …</string> + <string name="glasses_denied">Styring ble avslått. Tillat den for å endre brillenes innstillinger.</string> + <string name="glasses_no_control">Disse brillene viser spillet, men innstillingene deres kan ikke endres herfra.</string> + <string name="glasses_output">Utgang</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Spill i brillene</string> + <string name="glasses_game_on_hint">Vis spillet bare i brillene. Av: telefonen viser det, og Android speiler telefonen.</string> + <string name="glasses_display">Skjerm</string> + <string name="glasses_refresh">Oppdateringsfrekvens</string> + <string name="glasses_3d">3D (side ved side)</string> + <string name="glasses_3d_hint">Bytt smartbrillene til side-ved-side 3D. Hodesporing styres separat.</string> + <string name="glasses_3d_failed">3D-signalet ble ikke bekreftet. Prøv igjen når 2D-bildet er tilbake.</string> + <string name="glasses_no_signal">Ikke noe bilde: brillene er i en modus denne telefonen ikke kan sende. Hold inne 2D/3D-knappen deres, eller koble dem fra og til igjen.</string> + <string name="glasses_3d_refresh">3D-oppdateringsfrekvens</string> + <string name="glasses_auto3d">3D for VR-spill</string> + <string name="glasses_auto3d_hint">Bytter til 3D mens SteamVR kjører, og tilbake etterpå.</string> + <string name="glasses_picture">Bilde</string> + <string name="glasses_picture_hint">Automatisk viser flatt innhold i begge øyne og oppdager SteamVR. Velg Side-om-side-spill for SBS-innhold.</string> + <string name="glasses_picture_auto">Automatisk</string> + <string name="glasses_picture_screen">Virtuell skjerm</string> + <string name="glasses_picture_sbs">Side-ved-side-spill</string> + <string name="glasses_screen_size">Skjermbredde</string> + <string name="glasses_screen_distance">Skjermavstand</string> + <string name="glasses_screen_next_session">Bredde og avstand gjelder når et spill kjører i brillene som en virtuell skjerm.</string> + <string name="glasses_screen_no_output">Disse innstillingene gjelder når Spill i brillene er på og spillet vises der.</string> + <string name="glasses_screen_flat_hint">Automatisk holder dette 2D-spillet i fullskjerm. Bruk en virtuell skjerm for å justere bredde, avstand og hodesporing.</string> + <string name="glasses_screen_use">Bruk virtuell skjerm</string> + <string name="glasses_screen_direct_hint">SteamVR fyller visningen. Juster synsfeltet i VR; bredde og avstand gjelder bare for en virtuell skjerm.</string> + <string name="glasses_screen_sbs_hint">Side-ved-side-spill fyller hvert øye. Bredde og avstand gjelder bare for en virtuell skjerm.</string> + <string name="glasses_tracking_flat_hint">Automatisk holder dette 2D-spillet fast i synsfeltet. Velg Virtuell skjerm under Skjerm for å bruke hodesporing.</string> + <string name="glasses_tracking_sbs_hint">Hodesporing gjelder for en virtuell skjerm eller et SteamVR-spill som kjører.</string> + <string name="glasses_hardware">Enhet</string> + <string name="glasses_brightness">Lysstyrke</string> + <string name="glasses_volume">Volum</string> + <string name="glasses_sunblock">Solskjerming</string> + <string name="glasses_sunblock_hint">Gjør de fremre glassene mørkere.</string> + <string name="glasses_tracking">Sporing</string> + <string name="glasses_head_tracking">Hodesporing</string> + <string name="glasses_head_tracking_hint">Brillenes egne sensorer dreier den virtuelle skjermen og SteamVR med hodet ditt.</string> + <string name="glasses_recenter">Sentrer visningen</string> + <string name="glasses_recenter_button">Sentrer skjermen på nytt</string> + <string name="glasses_vr_fov">SteamVR-synsfelt</string> + <string name="glasses_vr_fov_hint">Lavere bringer SteamVR nærmere og fyller brillene; høyere viser mer rundt deg.</string> + <string name="glasses_playing">Spiller på %1$s</string> + <string name="glasses_calibration">Sporingskalibrering</string> + <string name="glasses_calibration_hint">Reduserer avdrift og retter inn horisontreferansen.</string> + <string name="glasses_calibration_saved_hint">Lagret kalibrering brukes for disse brillene.</string> + <string name="glasses_calibration_open">Kalibrer</string> + <string name="glasses_calibration_instructions">Legg de tilkoblede brillene opp ned på en plan flate, slik at rammen hviler jevnt. Trykk på Start, og la dem ligge urørt i omtrent 8 sekunder. Bevegelse starter målingen på nytt. Dette justerer avdrift og helning, ikke retning.</string> + <string name="glasses_calibration_settling">La brillene ligge opp ned og urørt. Venter på at de skal falle til ro…</string> + <string name="glasses_calibration_collecting">Måler sensorene. Hold brillene i ro.</string> + <string name="glasses_calibration_moving">Bevegelse oppdaget. La brillene ligge urørt; målingen starter på nytt automatisk.</string> + <string name="glasses_calibration_turn_over">Legg brillene opp ned på en plan flate. Målingen starter når de ligger riktig.</string> + <string name="glasses_calibration_complete">Kalibreringen er lagret. Ta på brillene og se rett frem, og trykk deretter på Ferdig for å sentrere.</string> + <string name="glasses_calibration_failed">Kalibreringen kunne ikke fullføres. Sjekk tilkoblingen, hold brillene i ro og prøv igjen. Den forrige kalibreringen er uendret.</string> + <string name="glasses_calibration_start">Start</string> + <string name="glasses_calibration_done">Ferdig</string> + <string name="glasses_calibration_reset">Nullstill sporingskalibrering</string> + <string name="glasses_calibration_reset_hint">Vil du fjerne den lagrede kalibreringen og gå tilbake til modellens standardverdier? Sentrer når du har tatt på deg brillene igjen.</string> + <string name="glasses_calibration_reset_button">Nullstill</string> + <string name="hand_camera_group">Håndsporing</string> + <string name="hand_camera_prompt_title">Spore hender eller Joy-Con-kontrollere med telefonkameraet?</string> + <string name="hand_camera_prompt_body">Uten en kontroller tilkoblet, sporer telefonkameraet dine bare hender i VR: klyp tommelen og pekefingeren for å klikke, lukk hånden for å gripe, og vri håndflaten mot deg og klyp for å åpne menyen. Med parede Joy-Con-kontrollere sporer kameraet posisjonen deres mens Joy-Con-kontrollerne gir rotasjon og knappinndata. Bilder behandles på denne enheten og lagres eller sendes aldri.</string> + <string name="hand_camera_rear">Bakre kamera</string> + <string name="hand_camera_rear_hint">Anbefales. Vanligvis skarpere og bredere.</string> + <string name="hand_camera_front">Frontkamera</string> + <string name="hand_camera_front_hint">For når baksiden av enheten ikke kan vende mot deg.</string> + <string name="hand_camera_allow">Bruk kamera</string> + <string name="hand_camera_not_now">Ikke nå</string> + <string name="hand_camera_setting">Håndsporing med kamera</string> + <string name="hand_camera_setting_hint">Bruk telefonkameraet til bevegelser med bare hender eller for å plassere parede Joy-Con-kontrollere i VR. Joy-Con-kontrollere gir rotasjon og knappinndata. Pauser mens smartbrillene sporer hendene eller Joy-Con-kontrollerne dine. Bilder behandles bare på denne enheten.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Kameratilgang</string> + <string name="hand_camera_access_hint">Tillat kameratilgang slik at håndsporing kan starte.</string> + <string name="hand_camera_access_denied">Kameratilgang er av. Slå den på i Android-innstillingene.</string> + <string name="hand_camera_allow_button">Tillat</string> + <string name="hand_camera_open_settings">Åpne innstillinger</string> + <string name="hand_camera_placement">Kameraplassering</string> + <string name="hand_camera_placement_hint">Sjekk at kameraet kan se deg før du spiller.</string> + <string name="hand_camera_check">Sjekk</string> + <string name="hand_camera_check_title">Kameraplassering</string> + <string name="hand_camera_how_rear">Still enheten opp 1,5 til 2 meter unna i omtrent brysthøyde, med det bakre kameraet vendt mot deg. Tre så inn i bildet med hendene ute.</string> + <string name="hand_camera_how_front">Still enheten opp 1,5 til 2 meter unna i omtrent brysthøyde, med skjermen vendt mot deg. Tre så inn i bildet med hendene ute.</string> + <string name="hand_camera_starting">Starter kameraet…</string> + <string name="hand_camera_stand_up">Enheten ligger flatt. Still den opp slik at kameraet vender mot deg.</string> + <string name="hand_camera_upright">Still enheten mer oppreist slik at kameraet vender mot deg.</string> + <string name="hand_camera_not_seen">Ser deg ikke ennå. Tre inn i bildet slik at hode og skuldre vises.</string> + <string name="hand_camera_move_back">Ta et steg tilbake.</string> + <string name="hand_camera_move_closer">Kom litt nærmere.</string> + <string name="hand_camera_show_hands">Hold begge hendene ute der kameraet kan se dem.</string> + <string name="hand_camera_good">Ser bra ut.</string> + <string name="hand_camera_failed">Kameraet kunne ikke starte. Lukk andre apper som bruker det, og prøv igjen.</string> + <string name="hand_camera_switch">Bytt kamera</string> + <string name="hand_camera_skip">Hopp over</string> + <string name="hand_camera_done">Ferdig</string> + <string name="glasses_xreal_network_missing">Venter på USB Ethernet-tilkoblingen til brillene. Denne telefonen gjør den kanskje ikke tilgjengelig for apper.</string> + <string name="glasses_xreal_connection_failed">XREAL-tilkoblingen ble avbrutt eller ga et svar som ikke støttes. Prøver igjen…</string> + <string name="glasses_xreal_experimental">Eksperimentell støtte for 1S. Bruk Follow-modus og slå av stabilisering i brillemenyen. Sporingsretninger og visningsmoduser må fortsatt testes på enheten.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard-modus</string> + <string name="cardboard_mode_hint">Bilder for venstre og høyre øye til en VR-brille for mobil.</string> + <string name="cardboard_source">Bilde</string> + <string name="cardboard_source_screen">Virtuell skjerm</string> + <string name="cardboard_source_sbs">Side-ved-side-3D</string> + <string name="cardboard_viewer">Briller</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Ingen linse</string> + <string name="cardboard_ipd">Øyeavstand</string> + <string name="cardboard_screen_width">Skjermbredde</string> + <string name="cardboard_screen_distance">Skjermavstand</string> + <string name="cardboard_head_tracking">Hodesporing</string> + <string name="cardboard_no_sensor">Denne enheten har ingen rotasjonssensor.</string> + <string name="cardboard_recenter">Sentrer visningen</string> + <string name="cardboard_recenter_button">Sentrer</string> + <string name="cardboard_steamvr">SteamVR (eksperimentell)</string> + <string name="cardboard_steamvr_install">Installer</string> + <string name="cardboard_steamvr_installing">Laster ned og pakker ut SteamVR …</string> + <string name="cardboard_steamvr_start">Start</string> + <string name="cardboard_steamvr_stop">Stopp</string> + <string name="cardboard_steamvr_unavailable">Ikke tilgjengelig i denne økten.</string> + <string name="cardboard_steamvr_failed">SteamVR svarte ikke; sjekk sesjonsloggen.</string> + <string name="drawer_component_downloads">Last ned komponenter</string> + <string name="drawer_component_downloads_hint">Nedlastinger deles med Komponenter-siden. Velg en nedlastet versjon ovenfor for å bruke den fra neste spilløkt.</string> + <string name="drawer_component_choose_download">Velg en versjon å laste ned</string> + <string name="stores_fact_developer">Utvikler</string> + <string name="stores_fact_publisher">Utgiver</string> + <string name="stores_fact_released">Utgitt</string> + <string name="stores_hltb_main">Hovedhistorie</string> + <string name="stores_hltb_extras">+ Ekstra</string> + <string name="stores_hltb_completionist">Komplettering</string> + <string name="stores_hltb_hours">%1$s t</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="display_picture_position">Bildets posisjon</string> + <string name="display_position_top">Øverst</string> + <string name="display_position_bottom">Nederst</string> + <string name="display_position_center">Midten (standard)</string> + <string name="setup_tab_storage">Lagring</string> + <string name="storage_measuring">Måler lagring…</string> + <string name="storage_measuring_hint">Første gang tar noen sekunder.</string> + <string name="storage_internal">Intern lagring</string> + <string name="storage_used_of">%1$s av %2$s brukt</string> + <string name="storage_free">%1$s ledig</string> + <string name="storage_droiddeck_uses">DroidDeck bruker %1$s. Målt %2$s.</string> + <string name="storage_rescanning">måler på nytt…</string> + <string name="storage_other_apps">Andre Android-apper</string> + <string name="storage_safe_now">Kan frigjøres nå</string> + <string name="storage_safe_hint">Ubrukte kjøretidsmiljøer, rester, gamle logger</string> + <string name="storage_clean_up">Rydder…</string> + <string name="storage_session_running">Stopp økten for å rydde eller slette noe. Størrelsene vises fortsatt.</string> + <string name="storage_where">Hvor det ender</string> + <string name="storage_games">Steam-spill</string> + <string name="storage_game_data">Spilldata</string> + <string name="storage_game_data_hint">Prefikser %1$s · workshop %2$s · shaders %3$s</string> + <string name="storage_tools">Proton og kjøretidsmiljøer</string> + <string name="storage_tools_unused">%1$s ubrukt</string> + <string name="storage_stores">GOG, Epic og andre butikker</string> + <string name="storage_stores_hint">Fjern dem under Butikker</string> + <string name="storage_desktop">Skrivebordsapper</string> + <string name="storage_desktop_hint">Flatpak-apper og kjøretidsmiljøer</string> + <string name="storage_system">Linux-systemet og Steam-klienten</string> + <string name="storage_system_hint">Nødvendig for at noe skal kunne kjøre</string> + <string name="storage_app_data">DroidDeck-data</string> + <string name="storage_app_data_hint">Logger fra gamle økter %1$s · hurtiglager · drivere</string> + <string name="storage_legend_games">Spill</string> + <string name="storage_legend_data">Spilldata</string> + <string name="storage_legend_tools">Proton og kjøretidsmiljøer</string> + <string name="storage_legend_stores">Andre butikker</string> + <string name="storage_legend_desktop">Skrivebordsapper</string> + <string name="storage_legend_system">Linux-systemet</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Rydd</string> + <string name="storage_clean_up_lede">Ingenting her rører installerte spill eller pågående nedlastinger.</string> + <string name="storage_nothing_to_clean">Det er ingenting å rydde akkurat nå.</string> + <string name="storage_selected">Valgt: %1$s · %2$s → %3$s frigjøres</string> + <string name="storage_cleaning">Rydder…</string> + <string name="storage_free_button">Frigjør %1$s</string> + <string name="storage_freed">Frigjorde %1$s.</string> + <string name="storage_item_runtimes">Ubrukte Steam-kjøretidsmiljøer og Proton</string> + <string name="storage_item_leftovers">Rester etter slettede spill</string> + <string name="storage_item_leftovers_unsure">Rester som kan inneholde lagrede spill</string> + <string name="storage_item_logs">Logger fra gamle økter</string> + <string name="storage_item_logs_detail">Logger fra denne økten beholdes</string> + <string name="storage_item_custom_detail">Ingen spill bruker det. Installer det på nytt under Komponenter hvis du trenger det.</string> + <string name="storage_item_shaders">Shadercache for installerte spill</string> + <string name="storage_item_shaders_detail">Bygges opp igjen mens du spiller. De første minuttene av hvert spill hakker igjen.</string> + <string name="storage_tag_safe">Trygt</string> + <string name="storage_tag_unused">Ubrukt</string> + <string name="storage_tag_stutter">Hakking</string> + <string name="storage_tag_saves">Sjekk lagrede spill</string> + <string name="storage_tag_default">Standard</string> + <string name="storage_tag_required">Nødvendig</string> + <string name="storage_tag_not_used">Ubrukt</string> + <string name="storage_back">Lagring</string> + <string name="storage_games_with_data">%1$s med dataene sine</string> + <string name="storage_sort_largest">Størst</string> + <string name="storage_sort_least_played">Minst spilt</string> + <string name="storage_sort_sd">På SD-kort</string> + <string name="storage_no_games">Det er ingen spill her.</string> + <string name="storage_played">spilt %1$s</string> + <string name="storage_never_played">Aldri spilt</string> + <string name="storage_game_parts">Spill %1$s · data %2$s</string> + <string name="storage_uninstall">Avinstaller</string> + <string name="storage_games_note">Avinstallering åpner Steam-vinduet, slik at Steam holder orden. For å flytte et spill til SD-kortet bruker du Steam › Innstillinger › Lagring.</string> + <string name="storage_uninstall_title">Avinstallere %1$s?</string> + <string name="storage_uninstall_body">Steam åpnes og ber om bekreftelse. Det frigjør spillets %1$s. Prefikset blir til du rydder restene, og Steam Cloud-lagringer blir på kontoen.</string> + <string name="storage_open_steam">Åpne Steam</string> + <string name="storage_tools_detail">%1$s · %2$s ubrukt</string> + <string name="storage_remove_unused">Fjern ubrukte · %1$s</string> + <string name="storage_in_use">I bruk</string> + <string name="storage_not_used">Ubrukt</string> + <string name="storage_remove">Fjern</string> + <string name="storage_remove_title">Fjerne %1$s?</string> + <string name="storage_remove_body">Frigjør %1$s. Steam laster det ned igjen hvis et spill trenger det.</string> + <string name="storage_tool_fex_runtime">Nødvendig for Linux x86-spill (FEX)</string> + <string name="storage_tool_arm_runtime">Nødvendig for ARM64-Proton</string> + <string name="storage_tool_redist">VC++- og DirectX-installasjoner spill krever</string> + <string name="storage_tool_fex">Kjører Linux x86-spill</string> + <string name="storage_tool_steam">Steam-verktøy</string> + <string name="storage_tool_old_runtime">DroidDeck kjører spill uten dette kjøretidsmiljøet</string> + <string name="storage_tool_x86_proton">Proton x86, som DroidDeck ikke kan kjøre</string> + <string name="storage_tool_custom_default">Standard for alle spill</string> + <string name="storage_tool_custom_unused">Ingen spill bruker det</string> + <string name="storage_tool_custom_unknown">Steam-innstillingene kan ikke leses, så det beholdes</string> + <string name="storage_cleanup_busy">Vent til lagringsoppryddingen er ferdig</string> + <string name="storage_low_title">Bare %1$s ledig</string> + <string name="storage_low_body">Steam trenger plass til oppdateringer og shadercache. Under 10 GB kan spilloppdateringer mislykkes halvveis.</string> + <string name="storage_low_safe">%1$s kan frigjøres trygt.</string> + <string name="storage_free_up">Frigjør plass</string> + <string name="storage_play_anyway">Spill likevel</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d installert</item> + <item quantity="other">%d installerte</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d på SD-kort</item> + <item quantity="other">%d på SD-kort</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d verktøy</item> + <item quantity="other">%d verktøy</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Tomme prefiksmapper og shadercache fra %d spill</item> + <item quantity="other">Tomme prefiksmapper og shadercache fra %d spill</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Prefikset til %d spill inneholder fortsatt filer, blant annet lokale lagringer. Ta en kopi først hvis du trenger dem.</item> + <item quantity="other">Prefiksene til %d spill inneholder fortsatt filer, blant annet lokale lagringer. Ta en kopi først hvis du trenger dem.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d spill</item> + <item quantity="other">%d spill</item> + </plurals> + <string name="storage_tool_default_proton">DroidDecks standard-Proton</string> + <string name="storage_tool_proton">DroidDecks Proton 11-alternativ</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Brukes av %d spill</item> + <item quantity="other">Brukes av %d spill</item> + </plurals> + <string name="storage_legend_components">Komponenter</string> + <string name="storage_components">Komponenter</string> + <string name="storage_item_components">Ubrukte komponenter</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Frigjør %1$s. Legger bare tilbake en Proton-versjon som ikke lenger er installert.</string> + <string name="storage_leftovers_unchecked">Ikke sjekket: manifestet til en Steam-app kan ikke leses, så prefikser for slettede spill blir til det går.</string> + <string name="storage_failed">Mislyktes: %1$s</string> + <string name="storage_desktop_shared">%1$s delt</string> + <string name="storage_data_installed">Installerte spill</string> + <string name="storage_data_parts">Prefiks %1$s · shaders %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Rydd shaders</string> + <string name="storage_data_leftovers">Slettede spill</string> + <string name="storage_steam_app">Steam-app %1$d</string> + <string name="storage_leftover_unsure_detail">Prefikset inneholder fortsatt filer, kanskje lokale lagringer</string> + <string name="storage_leftover_confirm">Rydder Wine-prefikset og shadercachen (%1$s). Ta først en kopi av lagringene du trenger; Steam Cloud-lagringer blir på kontoen.</string> + <string name="storage_data_other">Beholdes</string> + <string name="storage_data_other_title">Ikke-Steam-spill og delt Steam-prefiks</string> + <string name="storage_data_other_detail">Prefikser for spill lagt til via butikker eller manuelt</string> + <string name="storage_components_packages">Nedlastede pakker</string> + <string name="storage_components_originals">Beholdte originaler</string> + <string name="storage_components_none">Ingen komponentpakker lastet ned.</string> + <string name="storage_component_in_use">Valgt for en Proton eller et spill</string> + <string name="storage_component_unused">Ikke valgt noe sted</string> + <string name="storage_original_kept">Legger tilbake den installerte Proton-en</string> + <string name="storage_original_old">Proton-versjon som ikke lenger er installert</string> + <string name="storage_tag_in_use">I bruk</string> + <string name="storage_components_note">Komponenter i bruk er låst. Velg dem under Komponenter; det du fjerner her, kan lastes ned igjen der.</string> + <string name="storage_component_confirm">Frigjør %1$s. Pakker du importerte selv, kan ikke lastes ned igjen.</string> + <string name="storage_desktop_detail">%1$s for Flatpak-apper og det de deler</string> + <string name="storage_desktop_apps_title">Apper</string> + <string name="storage_desktop_none">Ingen Flatpak-apper installert.</string> + <string name="storage_desktop_shared_title">Deles av appene</string> + <string name="storage_desktop_runtimes">Kjøretidsmiljøer</string> + <string name="storage_desktop_runtimes_detail">Bibliotekene appene kjører på; ubrukte forsvinner med Fjern ubrukte</string> + <string name="storage_desktop_cache">Nedlastingslager</string> + <string name="storage_desktop_cache_detail">Flatpaks objektlager og nedlastet hurtiglager</string> + <string name="storage_desktop_prune">Fjern ubrukte</string> + <string name="storage_desktop_prune_body">Fjerner kjøretidsmiljøer ingen installert app trenger, og rydder i Flatpaks objektlager. Installerte apper virker fortsatt.</string> + <string name="storage_flatpak_uninstall_body">Fjerner appen (%1$s) og kjøretidsmiljøene ingen andre bruker. Dataene i hjemmappen din blir.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d pakke</item> + <item quantity="other">%d pakker</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d app</item> + <item quantity="other">%d apper</item> + </plurals> + <string name="boot_movie">Oppstartsvideo</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps ser jevnere ut, men bruker mer CPU mens Steam starter. En oppstartsvideo valgt i Steams egne innstillinger har forrang.</string> + <string name="boot_movie_sound">Lyd</string> + <string name="boot_movie_custom">Din egen video</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV eller WebM. Andre formater og filer over %1$d MB konverteres til 720p-WebM på enheten, opptil %2$d sekunder.</string> + <string name="boot_movie_import">Importer</string> + <string name="boot_movie_remove">Fjern</string> + <string name="boot_movie_pick">Velg en oppstartsvideo</string> + <string name="boot_movie_imported">%1$s er nå oppstartsvideoen</string> + <string name="boot_movie_imported_silent">%1$s er nå oppstartsvideoen, uten lyd</string> + <string name="boot_movie_too_long">Videoer som må konverteres kan vare maks %1$d sekunder</string> + <string name="boot_movie_converting">Konverterer %1$d %%</string> + <string name="boot_movie_converting_started">Konverterer %1$s for Steam. Hold DroidDeck åpen.</string> + <string name="boot_movie_unsupported">Enheten kan ikke dekode videoen.</string> + <string name="boot_movie_import_failed">Kunne ikke importere videoen</string> + <string name="glasses_experimental">Luma Ultra-kameraer – Eksperimentelt</string> + <string name="glasses_joycons">Joy-Con-posisjonssporing</string> + <string name="glasses_joycons_hint">Bruk smartbrillenes kameraer til å plassere de parede Joy-Con-kontrollerne. Rotasjon og knappinndata kommer fra Joy-Con-kontrollerne. Posisjonen estimeres når håndleddene dine er skjult. Erstatter kontrollere som betjenes med bare hender og pauser sporing av telefonkamera. Rett Joy-Con-kontrollerne fremover når du kobler til eller tilbakestiller sporingssenteret.</string> + <string name="glasses_joycons_requires_position">Aktiver posisjonssporing først. Krever bevegelseskompatible Joy-Con-kontrollere på Android 12 eller nyere. Av som standard.</string> + <string name="setup_tab_glasses">Smartbriller</string> + <string name="setup_glasses_scope">Innstillinger for skjerm- og hodesporing deles på tvers av DroidDeck-menyer, spill og skrivebordsøkter.</string> + <string name="setup_glasses_connect">Koble til smartbriller for å endre skjerm- og sporingsinnstillingene. De lagrede innstillingene dine beholdes når du kobler fra.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Skjermmodus</string> + <string name="glasses_output_2d">2D-utgang</string> + <string name="glasses_output_3d">3D-utgang</string> + <string name="glasses_picture_group">Bilde og virtuell skjerm</string> + <string name="glasses_position_group">Posisjon og gulvnivå</string> + <string name="glasses_hands_group">Sporing av hender — Eksperimentell</string> + <string name="glasses_tracking_status">Sporingsstatus</string> + <string name="glasses_resolution_2d">2D-oppløsning</string> + <string name="glasses_resolution_3d">3D-oppløsning</string> + <string name="glasses_resolution_vr">VR-oppløsning</string> + <string name="glasses_resolution_auto">Automatisk</string> + <string name="glasses_resolution_inherit">Samme som 2D / 3D</string> + <string name="glasses_resolution_hint">Utgangsoppløsning per øye.</string> + <string name="glasses_refresh_30_hint">Aktiver Spill på smartbriller for å velge skjermens native 30 Hz-modus.</string> + <string name="glasses_3dof">3DoF virtuell skjerm</string> + <string name="glasses_3dof_hint">Forankre flate spill foran deg slik at du kan se deg rundt. Aktiverer Spill på smartbriller uten å bytte til 3D.</string> + <string name="glasses_screen_app_wide">Bredde og avstand oppdaterer den sporede virtuelle skjermen for DroidDeck-menyer, spill og skrivebordsøkter umiddelbart.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Posisjonssporing inkluderer hoderotasjon i SteamVR. For sporing kun med rotasjon, slå av posisjonssporing.</string> + <string name="glasses_head_tracking_spatial_hint">Kontrollerer hodebevegelse på den virtuelle skjermen. Posisjonssporing inkluderer hoderotasjon i SteamVR.</string> + <string name="glasses_quick_actions">Hurtighandlinger</string> + <string name="glasses_recenter_screen_hint">Se dit du vil ha skjermen, og tilbakestill deretter sporingssenteret for å angi høyde og retning.</string> + <string name="glasses_recenter_joycons_button">Sentrer Joy-Con på nytt</string> + <string name="phone_camera_tracking_group">Telefonkamera – Eksperimentelt</string> + <string name="phone_camera_tracking_setting">Spore hender eller Joy-Con-kontrollere</string> + <string name="glasses_6dof">6DoF virtuell skjerm</string> + <string name="glasses_position">Posisjonssporing – eksperimentelt</string> + <string name="glasses_position_hint">Fysisk bevegelse i VR og rundt virtuelle skjermer. Det tar et øyeblikk å starte sporingen på nytt.</string> + <string name="glasses_eye_height">Gjeldende øyehøyde over gulvet</string> + <string name="glasses_floor">Angi gulvnivå fra gjeldende høyde</string> + <string name="glasses_floor_set">Angi gulvnivå</string> + <string name="glasses_spatial_setup">Oppsett og diagnostikk av stereokamera</string> + <string name="glasses_spatial_setup_hint">Sjekk kamerakalibrering og sporing av hender før du spiller.</string> + <string name="glasses_spatial_open">Åpne oppsett</string> + <string name="glasses_hands">Kontrollere som betjenes med bare hender</string> + <string name="glasses_hands_hint">Bruk smartbrillekameraene til å sikte med hendene, klyp for å klikke og lukk hånden for å gripe i VR. Gamepad-spaker beveger seg og snurrer. Erstatter Joy-Con-posisjonssporing. Kan forsinke eller miste sporing under spill.</string> + <string name="glasses_hands_ready_hint">Aktiver kontrollere som betjenes med bare hender under Luma Ultra-kameraer i Sporing. Vis åpne hender først.</string> + <string name="glasses_hands_base">Delt Luma Ultra-kalibrering</string> + <string name="glasses_hands_base_hint">Bruk av den delte Luma Ultra-basen. Kalibrer dine egne smartbriller for å bekrefte nøyaktigheten deres.</string> + <string name="glasses_hands_calibration_verified">Målt kalibrering bekreftet</string> + <string name="glasses_hands_calibration_required">Validering kreves</string> + <string name="glasses_hands_calibration_required_hint">Kontrollere som betjenes med bare hender blir tilgjengelige etter at den målte avstandskontrollen er bestått.</string> + <string name="tracking_recovery_lost">Sporing tapt</string> + <string name="tracking_recovery_look">Se deg sakte rundt i et godt opplyst rom.\nHold sikten til sporingskameraene fri og vend deg mot møbler eller andre synlige detaljer.</string> + <string name="tracking_recovery_restart_help">Fortsatt fast? På telefonen: smartbriller → Sporing → Åpne oppsett → Vis diagnostikk → Start sporing på nytt.</string> + <string name="tracking_recovery_disconnected">Smarte briller frakoblet</string> + <string name="tracking_recovery_connect">Sjekk USB-tilkoblingen og koble til smartbrillene igjen.\nGodta forespørselen om USB-tilgang på telefonen din hvis den vises.</string> + <string name="tracking_recovery_usb_help">Når du er tilkoblet, se deg sakte rundt i et godt opplyst rom for å gjenopprette sporingen.</string> + <string name="tracking_recovery_recenter">Ny sentrering er nødvendig</string> + <string name="tracking_recovery_recenter_steps">Sporingen har returnert i en ny posisjon.\nSe fremover, og trykk deretter på tilbakestill sporingssenteret på telefonen din.</string> + <string name="tracking_recovery_recenter_help">Du finner også tilbakestilling av sporingssenter i smartbriller → Sporing → Åpne oppsett. Din lagrede kamerakalibrering beholdes.</string> + <string name="tracking_recovery_stabilizing">Hold stille et øyeblikk</string> + <string name="tracking_recovery_hold">Tilbakestilling av sporingssenter pågår.\nHold smartbrillene stødige mens sporingen stabiliserer seg.</string> + <string name="tracking_recovery_automatic">Denne skjermen lukkes automatisk når hodesporing er klar.</string> + <string name="glasses_steady_hand_aim">Stabilisert sikting med hendene</string> + <string name="glasses_steady_hand_aim_hint">Sikt fra skulderen gjennom håndflaten. Slå av for håndleddskontrollert rotasjon.</string> + <string name="spatial_title">Romlig oppsett</string> + <string name="spatial_wait_tracking">Venter på sporing...</string> + <string name="spatial_cameras_description">Venstre og høyre sporingskamera</string> + <string name="spatial_camera_sync">Kamerasynkronisering</string> + <string name="spatial_ready">Klar</string> + <string name="spatial_sync_hint">Venter på at kamera og hodesporing skal stille opp. Hold smartbrillene tilkoblet.</string> + <string name="spatial_prepare">1. Klargjør kalibreringsmålet</string> + <string name="spatial_print_actual">Skriv ut i faktisk størrelse</string> + <string name="spatial_print_hint">Hver firkant må være 30 mm (1.181 in). Monter arket flatt på en stiv overflate i et godt opplyst område.</string> + <string name="spatial_print">Skriv ut kalibreringsmønster</string> + <string name="spatial_capture_group">2. Ta opp forskjellige visninger</string> + <string name="spatial_board_stationary">Hold kalibreringsmålet stasjonært</string> + <string name="spatial_capture_hint">Flytt smartbrillene nærmere, lenger og sidelengs. Snu dem til venstre/høyre, vinkle dem opp/ned og vipp dem sidelengs. Hold kalibreringsmålet i begge kameraene og ta en kort pause før hver opptak.</string> + <string name="spatial_start">Start ny kalibrering</string> + <string name="spatial_wait_sync">Venter på kamerasynkronisering.</string> + <string name="spatial_start_hint">Start en ny kalibrering for å samle visninger.</string> + <string name="spatial_views_hint">Hold kalibreringsmålet synlig i begge forhåndsvisningene. Ta minst 24 skarpe bilder fra forskjellige vinkler.</string> + <string name="spatial_capturing">Tar opp …</string> + <string name="spatial_capture">Fange kalibreringsmålvisning</string> + <string name="spatial_alignment">Beregn kamerajustering</string> + <string name="spatial_calculating">Beregner...</string> + <string name="spatial_calculate">Beregn kalibrering</string> + <string name="spatial_distance_group">3. Sjekk avstanden</string> + <string name="spatial_distance">Målt avstand</string> + <string name="spatial_distance_hint">Start med 12 tommer eller 30 cm slik at de trykte markørene er lettere å oppdage. Velg den nøyaktige målingen du vil bruke.</string> + <string name="spatial_camera_board_distance">Venstre kamera til kalibreringsmålsenter</string> + <string name="spatial_checking_distance">Sjekker avstand...</string> + <string name="spatial_validate">Valider avstand</string> + <string name="spatial_diagnostics">Diagnostikk</string> + <string name="spatial_show_diagnostics">Vis diagnostikk</string> + <string name="spatial_diagnostics_hint">Verktøy for gjenoppretting av kameratiming og sporing.</string> + <string name="spatial_camera_timing">Kameratiming</string> + <string name="spatial_hand_input">Inndata fra sporing av hender</string> + <string name="spatial_wait_timing">Venter på kameratiming.</string> + <string name="spatial_frames">Kamerabilder</string> + <string name="spatial_gpu">GPU-deteksjon av hender</string> + <string name="spatial_gpu_hint">CPU er standard. GPU er eksperimentell og kan føre til at SteamVR starter på nytt. Dette valget tilbakestilles når sporingen starter på nytt.</string> + <string name="spatial_lite">Lite deteksjon av hendermodeller</string> + <string name="spatial_lite_hint">Bruk Lite håndleddetektor og Lite nøkkelpunkter på hendene. Sjekk sikting, klype og grip nøyaktighet. Tilbakestilles når sporingen starter på nytt.</string> + <string name="spatial_adaptive">Automatisk inngangsfrekvens for sporing av hender</string> + <string name="spatial_adaptive_hint">Juster input til prosesseringshastighet. Tilbakestilles når sporingen starter på nytt.</string> + <string name="spatial_half_rate">Begrens inngangsfrekvens for sporing av hender</string> + <string name="spatial_half_rate_hint">Bruk halvparten av kamerabildene. Slå av for å sammenligne maksimal frekvens. Tilbakestilles når sporingen starter på nytt.</string> + <string name="spatial_diagnostic_capture">Diagnostisk fangst</string> + <string name="spatial_diagnostic_capture_hint">Lagre ett stereobildepar lokalt. Bilder lagres kun når du blir bedt om det.</string> + <string name="spatial_save_frame">Lagre kamerabilde</string> + <string name="spatial_restart_tracking">Start sporing på nytt</string> + <string name="spatial_restart_hint">Brukes hvis sporingen ikke gjenopprettes i et godt opplyst område. En omstart krever et nytt sporingsopprinnelse.</string> + <string name="spatial_restart">Start på nytt</string> + <string name="spatial_restart_title">Vil du starte sporingen på nytt?</string> + <string name="spatial_restart_confirm">Ulagrede kalibreringsvisninger vil gå tapt. Hold smartbrillene i ro etterpå, og tilbakestill sporingssenteret når sporingen er gjenopprettet.</string> + <string name="spatial_views_count">%1$d / 24 visninger tatt</string> + <string name="spatial_capture_paused">Opptaket er satt på pause: %1$s</string> + <string name="spatial_measure_hint">Mål %1$s. Vis hele kalibreringsmålet i begge forhåndsvisningene, og hold deretter stille.</string> + <string name="spatial_timing_values">%1$.1f Hz • bildealder %2$.1f ms • behandler %3$.1f ms</string> + <string name="spatial_input_values">Inngangsgrense %1$.1f Hz • %2$.0f%% for kamerabilder. Hodesporing fortsetter med sin maksimale frekvens.</string> + <string name="spatial_frame_counts">%1$d behandlet • %2$d droppet • %3$d hoppet over inndatagrense</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra-kalibrering</string> + <string name="spatial_print_scale" formatted="false">Skriv ut ved 100% / faktisk størrelse. Hver kvadrat: 30 mm (1.181 tommer).</string> + <string name="spatial_print_stationary">Hold kalibreringsmålet flatt og stasjonært; flytt smartbrillene mellom opptakene.</string> + <string name="spatial_print_check">Skalakontroll: 100 mm (3.937 in) mellom flåttene</string> + <string name="spatial_distance_12in">12 tommer (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 tommer)</string> + <string name="spatial_distance_20in">20 tommer (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 tommer)</string> + <string name="spatial_disabled">Deaktivert</string> + <string name="spatial_wait_stable">Venter på stabil sporing</string> + <string name="spatial_disconnected">Frakoblet</string> + <string name="spatial_hands_off">Kontrollere som betjenes med bare hender er av</string> + <string name="spatial_tracking_off">Posisjonssporing er av eller smartbriller er frakoblet</string> + <string name="spatial_recenter_pending">Tilbakestilling av sporingssenter forespurt – hold stille mens sporingen stabiliserer seg.</string> + <string name="spatial_tracking_lost">Sporing tapt – møt et godt opplyst område med synlige detaljer</string> + <string name="spatial_origin_changed">Sporingsopprinnelse endret – trykk på tilbakestill sporingssenter, og hold deretter stille.</string> + <string name="spatial_active">6DoF aktiv</string> + <string name="spatial_connect_hint">Koble til Luma Ultra og aktiver posisjonssporing.</string> + <string name="spatial_validation_session">Kalibrering bekreftet for denne forbindelsen.</string> + <string name="spatial_validation_saved">Kalibrering bekreftet og lagret.</string> + <string name="spatial_wait_cameras">Venter på stereokameraer</string> + <string name="spatial_wait_hands">Venter på sporing av hender</string> + <string name="spatial_collect_instructions">Hold 5 × 7 kalibreringsmålet stasjonært. Ta 24+ visninger mens du flytter og roterer de smarte brillene.</string> + <string name="spatial_capture_pending">Venter på neste kamerabilde. Hold de smarte brillene i ro.</string> + <string name="spatial_validation_pending">Kontrollerer neste kamerabilde. Hold hele kalibreringsmålet synlig og hold stille.</string> + <string name="spatial_start_first">Start kalibreringen først</string> + <string name="spatial_no_camera_frame">Det kom ikke noe nytt kamerabilde. Sjekk smartbrilletilkoblingen og forhåndsvisninger av kameraet, og prøv deretter på nytt.</string> + <string name="spatial_clock_reset">Kameraklokke tilbakestilt</string> + <string name="spatial_frame_changed">Sporingskoordinatsystem endret. Visningene dine er lagret for ny beregning. Tilbakestill sporingssenter, og start deretter et nytt sett for å fange opp flere visninger.</string> + <string name="spatial_device_loaded">enhetskalibrering lastet</string> + <string name="spatial_base_loaded">Luma Ultra basekalibrering lastet</string> + <string name="spatial_calibration_needed">kalibrering kreves</string> + <string name="spatial_tap_start">Trykk på Start ny kalibrering først.</string> + <string name="spatial_capture_recenter_pending">Tilbakestill sporingssenter venter på stabil sporing. Hold stille et øyeblikk.</string> + <string name="spatial_capture_recenter">Sporing endret. Trykk på tilbakestill sporingssenter én gang, og hold deretter stille før du tar opptak.</string> + <string name="spatial_capture_unsynchronized">Opptak avvist: Hodesporingen var ikke synkronisert, eller den endret seg under opptaket. Hold deg i ro og prøv igjen.</string> + <string name="spatial_align_first">Beregn kamerajustering før du sjekker avstanden.</string> + <string name="spatial_processing_failed">kamerabehandling mislyktes</string> + <string name="spatial_hand_head_changed">Hodesporing endret under deteksjon av hender</string> + <string name="spatial_hand_wait_sync">Venter på kamera- og hodesynkronisering</string> + <string name="spatial_no_wrists">Ingen håndledd oppdaget. Hold Joy-Con-kontrollerhåndtakene foran de smarte brillene</string> + <string name="spatial_no_hands">Ingen hender oppdaget. Vis åpne håndflater foran de smarte brillene</string> + <string name="spatial_one_camera_wrists">Håndledd synlig i bare ett kamera; holde kontrollerhåndtakene i den delte visningen</string> + <string name="spatial_one_camera_hands">Hender synlig i bare ett kamera; hold begge håndflatene i den delte visningen</string> + <string name="spatial_ambiguous_hands">Begge kameraene ser hender, men venstre/høyre-matching er tvetydig</string> + <string name="spatial_inconsistent_depth">Viser oppdaget, men stereodybden er inkonsekvent</string> + <string name="spatial_rejected_wrist">Håndleddsposisjon avvist av stereo- eller bevegelseskontroller</string> + <string name="spatial_inconsistent_palm">Stereopunkter oppdaget, men palmegeometrien er inkonsekvent</string> + <string name="spatial_hands_need_calibration">Fullfør kalibrering og avstandssjekk for å aktivere hendene</string> + <string name="spatial_hands_wait_stable">Venter på stabil hodesporing; tilbakestill sporingssenteret hvis forespurt.</string> + <string name="spatial_old_frame">Kameraobservasjon er for gammel; venter på et nytt par</string> + <string name="spatial_fit_ready">Fit %1$.2f px. Mål den valgte avstanden fra venstre kamera til kalibreringsmålsenteret, og valider deretter.</string> + <string name="spatial_opencv_error">OpenCV utilgjengelig: %1$s</string> + <string name="spatial_restored">%1$d lagrede visninger gjenopprettet. Beregn kalibrering for å prøve på nytt, eller start et nytt sett for å fange mer.</string> + <string name="spatial_captured">Fanget %1$d / 24 visninger. Hold kalibreringsmålet fast; flytt smartbrillene for neste visning.</string> + <string name="spatial_capture_corners">Opptaket avvist: %1$d / 12 nødvendige hjørner synlige i begge kameraene. Vis mer av kalibreringsmålet, hold stille, og prøv på nytt.</string> + <string name="spatial_validation_error">Avstandssjekk kunne ikke fullføres: %1$s. Prøv igjen.</string> + <string name="spatial_inference_error">Deteksjon av hender utilgjengelig: %1$s. Bytt CPU/GPU eller bytt kontroller som betjenes med bare hender for å prøve på nytt.</string> + <string name="spatial_hand_timeout">Deteksjon av hender overskredet %1$d ms; observasjon forkastet</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con håndleddsposisjoner målt med stereo</string> + <string name="spatial_palms_tracked">Håndflater sporet: %1$d / 2; klypebevegelse klar: %2$d; gripebevegelse klar: %3$d</string> + <string name="spatial_capture_saved">Lagret diagnostisk opptak til %1$s</string> + <string name="spatial_hand_error">Sporing av hender stoppet: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Hodesporing og kalibreringsmålet er uenige med %1$s (grense 5 cm / 2 in). Hold kalibreringsmålet fast og vent på jevn sporing før du starter et nytt sett. Snu og vipp de smarte brillene forsiktig; pause før hver opptak.</string> + <string name="spatial_need_views">Ta minst 24 varierte visninger av det stasjonære kalibreringsmålet.</string> + <string name="spatial_need_rotation">Snu de smarte brillene til venstre og høyre, og vipp dem opp og ned; bevegelse uten rotasjon kan ikke kalibrere kamerajustering.</string> + <string name="spatial_bad_baseline">Usannsynlig kameragrunnlinje</string> + <string name="spatial_need_orientations">Beveg hodet gjennom mer varierte orienteringer.</string> + <string name="spatial_bad_rotation">Ugyldig kamera-til-hode-rotasjon</string> + <string name="spatial_bad_alignment">Kamera-til-hode-justering er inkonsekvent.</string> + <string name="spatial_calibration_error">Kalibreringen kunne ikke fullføres. %1$s Dine visninger lagres.</string> + <string name="spatial_reprojection_error">Utholdt reprojeksjonsfeil %1$.2f px overskrider 2 px. Kalibrer på nytt.</string> + <string name="spatial_distance_corners">%1$d / 24 sjakkbretthjørner oppdaget i begge kameraene. Hold hele kalibreringsmålet synlig og hold stille. Hvis den allerede er synlig, velg 12 tommer eller 30 cm og mål den nærmere avstanden før du prøver på nytt.</string> + <string name="spatial_distance_depth">Kalibreringsmålet er synlig, men dybden kunne ikke måles pålitelig. Hold smartbrillene stille og hold kalibreringsmålet flatt og godt opplyst, og prøv deretter på nytt.</string> + <string name="spatial_distance_invalid">Kameramålingen var ugyldig. Hold stille og prøv igjen.</string> + <string name="spatial_distance_passed">Avstandssjekk bestått.</string> + <string name="spatial_distance_retry">Kontroller avstanden fra venstre kamera til kalibreringsmålsenteret på nytt, og prøv deretter på nytt.</string> + <string name="spatial_distance_result">Kameraer målt %1$s; valgt avstand %2$s. %3$s</string> + <string name="spatial_wait_previews">Vent på forhåndsvisningene av begge kameraene før du starter kalibreringen.</string> + <string name="spatial_saved_views_hint">Lagrede visninger kan beregnes på nytt. Start en ny kalibrering for å fange opp i gjeldende sporingskoordinatsystem.</string> + <string name="spatial_model_checksum_error">Uoverensstemmelse med håndmodellsjekksum</string> + <string name="spatial_opencv_load_error">OpenCV kunne ikke laste</string> +</resources> diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml new file mode 100644 index 0000000000..46389accad --- /dev/null +++ b/app/src/main/res/values-nl/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Grafische weergave van SteamVR gestopt</string> + <string name="steamvr_recovery_countdown">DroidDeck start over %1$d seconden opnieuw om de grafische weergave te resetten en SteamVR weer te openen. Je game wordt gesloten; niet-opgeslagen voortgang kan niet worden hersteld.</string> + <string name="steamvr_recovery_repeated">De grafische fout kwam terug na een recente herstart. Automatisch herstel is gepauzeerd om een lus te voorkomen. Opnieuw starten sluit je game; niet-opgeslagen voortgang kan niet worden hersteld.</string> + <string name="steamvr_recovery_restart">Nu opnieuw starten</string> + <string name="steamvr_recovery_cancel">Open laten</string> + <string name="steamvr_recovery_restarting">Grafische weergave resetten en SteamVR opnieuw openen…</string> + <string name="steamvr_recovery_failed">DroidDeck kon niet automatisch opnieuw starten. Sluit de app volledig af en open hem daarna opnieuw.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Bij de eerste start wordt Steam gedownload. Dit kan een paar minuten duren.</item> + <item>Standaard wordt Steam gepauzeerd als je de app verlaat; als je terugkomt, gaat het verder waar je was.</item> + <item>Je controller wordt gezien als Xbox 360-controller. Gebruik anders de schermbediening.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Bij de eerste start wordt de desktop ingericht. Dit kan een paar minuten duren.</item> + <item>Standaard wordt de sessie gepauzeerd als je de app verlaat; als je terugkomt, gaat die verder waar je was.</item> + <item>Aanraken werkt als touchpad: sleep om de aanwijzer te verplaatsen, tik om te klikken.</item> + <item>Je controller wordt gezien als Xbox 360-controller. Gebruik anders de schermbediening.</item> + </string-array> + <string name="session_channel">Sessie</string> + <string name="session_channel_description">Wordt getoond zolang er een Steam- of desktopsessie open is</string> + <string name="session_notification">Steam is actief</string> + <string name="session_notification_downloads">Steam-download actief</string> + <string name="session_notification_paused">Sessie gepauzeerd - tik op Hervatten als je klaar bent</string> + <string name="resume_session">Hervatten</string> + <string name="suspend_now">Nu onderbreken</string> + <string name="stop_session">Sessie stoppen</string> + <string name="frame_gen_title">Framegeneratie</string> + <string name="frame_gen_hint">Kies de modus voor framegeneratie</string> + <string name="frame_gen_off">Uit</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG adaptief %1$d</string> + <string name="lsfg_needs_steam">Vereist Lossless Scaling op Steam</string> + <string name="lsfg_needs_install">Installeer Lossless Scaling in Steam of importeer Lossless.dll</string> + <string name="lsfg_import">Lossless.dll importeren…</string> + <string name="lsfg_using_steam">De kopie uit Steam wordt gebruikt</string> + <string name="lsfg_using_import">Een geïmporteerde kopie wordt gebruikt</string> + <string name="lsfg_pick_title">Kies Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll geïmporteerd</string> + <string name="lsfg_import_unchanged">Deze Lossless.dll wordt al gebruikt</string> + <string name="lsfg_import_not_owned">Lossless Scaling staat niet op dit Steam-account</string> + <string name="lsfg_import_invalid">Dit bestand is niet de Lossless.dll van Lossless Scaling</string> + <string name="lsfg_import_failed">Kan LSFG niet voorbereiden met deze Lossless.dll</string> + <string name="lsfg_problem_missing">LSFG vereist Lossless Scaling uit Steam of een geïmporteerde Lossless.dll</string> + <string name="lsfg_problem_failed">LSFG kan zijn shaders niet voorbereiden uit Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: niet ondersteund</string> + <string name="hud_fg_failed">%1$s: engine mislukt</string> + <string name="hud_fg_needs_lossless">%1$s: vereist Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · starten</string> + <string name="second_library_import_hint">Voegt een Steam-bibliotheek toe en scant die op Windows-games. Games die je bezit gebruiken hun Steam-items; de rest wordt een snelkoppeling voor een niet-Steam-game.</string> + <string name="game_env_title">Game-omgeving</string> + <string name="game_env_hint">Omgevingsvariabelen voor Proton-games.</string> + <string name="game_env_edit">Bewerken</string> + <string name="game_env_shared">Alle Proton-games</string> + <string name="game_env_scope">Profiel</string> + <string name="game_env_app_id">Steam-app-ID</string> + <string name="game_env_open">Openen</string> + <string name="game_env_profile">Game %1$s</string> + <string name="game_env_add">Variabele toevoegen</string> + <string name="game_env_name">Naam van variabele</string> + <string name="game_env_value">Waarde</string> + <string name="game_env_save">Opslaan</string> + <string name="game_env_remove">Verwijderen</string> + <string name="game_env_restore">Weer overnemen</string> + <string name="game_env_reset">Omgevingsoverschrijvingen wissen</string> + <string name="game_env_unset">Niet instellen voor dit profiel</string> + <string name="game_env_empty">Geen variabelen ingesteld.</string> + <string name="game_env_inherited">Overgenomen</string> + <string name="game_env_custom">Aangepaste variabele</string> + <string name="game_env_error">Kan niet laden of opslaan. Controleer de vrije opslagruimte en probeer het opnieuw.</string> + <string name="game_env_invalid">Gebruik een geldige naam en een waarde van maximaal 8192 tekens.</string> + <string name="game_env_unused">De standaard Proton-runtime leest deze variabele niet.</string> + <string name="game_env_loading">Laden…</string> + <string name="game_env_feature">Overschrijving van het D3D12-featureniveau. 12_2 meldt DirectX 12 Ultimate-mogelijkheden; niet-ondersteunde functies kunnen mislukken. Niet instellen voor automatische detectie.</string> + <string name="game_env_shader">Overschrijving van het D3D12-shadermodel. 6_9 vereist een voldoende recente VKD3D en bijpassende GPU-functies. Niet instellen voor automatische detectie.</string> + <string name="game_env_cache">Houd de Mesa-shadercache ingeschakeld om herhaald compileren te beperken. false schakelt caching in.</string> + <string name="game_env_cache_size">Maximale grootte van de Mesa-shadercache, zoals 1G. Grotere caches gebruiken meer opslag.</string> + <string name="game_env_vkd3d_config">VKD3D-opties voor D3D12. nodxr schakelt raytracing uit; gebruik dit alleen voor een game die dat nodig heeft.</string> + <string name="game_env_proton_log">Stel in op 1 voor een diagnostisch Proton-log. Loggen kan de prestaties verlagen en kost opslag.</string> + <string name="game_env_wined3d">Stel in op 1 om voor compatibiliteitstests met D3D9–11 het op OpenGL gebaseerde WineD3D te gebruiken in plaats van DXVK.</string> + <string name="game_env_no_ntsync">Stel in op 1 om deze game niet op ntsync (droiddeck-ntsync of een kerneldriver) te draaien; dan wordt droiddeck-esync gebruikt als er een pakket is, anders droiddeck-fsync.</string> + <string name="game_env_no_esync">Stel in op 1 om droiddeck-esync uit te zetten voor deze game; dan wordt droiddeck-fsync gebruikt, of droiddeck-ntsync als fsync ook uit staat.</string> + <string name="game_env_no_fsync">Stel in op 1 om deze game niet op droiddeck-fsync te draaien; dan wordt droiddeck-esync gebruikt als er een pakket is, anders droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Stel in op 1 om deze game op droiddeck-fsync te draaien, of op 0 om droiddeck-esync voorrang te geven als er een pakket bij de Proton-versie past.</string> + <string name="game_env_xalia">Stel in op 0 om de gamepadnavigatiehulp van Proton voor deze game uit te schakelen.</string> + <string name="game_env_hud">DXVK-overlay voor D3D9–11. fps toont de framerate; niet ingesteld verbergt de overlay.</string> + <string name="game_env_dxvk_config">DXVK-instellingen, gescheiden door puntkomma’s. Recente builds gebruiken dxvk.maxFrameRate om de framerate te begrenzen; gebruik voor normaal spelen liever de framelimiet van de sessie.</string> + <string name="game_env_vkd3d_limit">Framerate-limiet voor D3D12. 0 schakelt de limiet uit.</string> + <string name="game_env_glthread">OpenGL-threading van Mesa. true kan helpen bij CPU-beperkte OpenGL-games; test per game.</string> + <string name="sync_backend_title">Wine-synchronisatie</string> + <string name="sync_backend_hint">Hoe games hun threads gelijk laten lopen. Geldt vanaf de volgende sessie.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">FEX-voorinstelling</string> + <string name="fex_next_launch">Geldt bij de volgende start van een game.</string> + <string name="game_settings_title">Games</string> + <string name="fex_default_label">FEX-standaard</string> + <string name="fex_default_detail">Gebruikt de standaardinstellingen van FEX.</string> + <string name="fex_stability_label">Stabiliteit</string> + <string name="fex_stability_detail">Veiligste, traagste instellingen.</string> + <string name="fex_compatibility_label">Compatibiliteit</string> + <string name="fex_compatibility_detail">Volledige TSO met multiblock.</string> + <string name="fex_intermediate_label">Gemiddeld</string> + <string name="fex_intermediate_detail">Gebalanceerde TSO met lagere x87-precisie.</string> + <string name="fex_performance_label">Prestaties</string> + <string name="fex_performance_detail">Alle TSO uitgeschakeld; multiblock.</string> + <string name="fex_performance_tso_label">Prestaties + TSO</string> + <string name="fex_performance_tso_detail">Prestatie-instellingen met de hoofd-TSO ingeschakeld.</string> + <string name="fex_extreme_label">Extreem</string> + <string name="fex_extreme_detail">Schakelt controles op zelfwijzigende code uit. JIT-games en DRM kunnen stukgaan.</string> + <string name="fex_extreme_tso_label">Extreem + TSO</string> + <string name="fex_extreme_tso_detail">Extreme instellingen met de hoofd-TSO ingeschakeld.</string> + <string name="fex_extreme_gn_label">Extreem-gn</string> + <string name="fex_extreme_gn_detail">Prestaties met TSC- en metadatahints. Probeer dit vóór Extreem.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Prestaties met volledige codecontroles en verborgen hypervisorbit.</string> + <string name="game_env_custom_value">Aangepaste waarde</string> + <string name="game_env_select_value">Kies een waarde</string> + <string name="user_apps_section">Emulators & apps</string> + <string name="user_apps_add">Toevoegen</string> + <string name="user_apps_add_detail">Je eigen app of game</string> + <string name="user_apps_kind_script">Script</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Starten…</string> + <string name="user_apps_added">%1$s toegevoegd</string> + <string name="user_apps_removed">%1$s verwijderd</string> + <string name="user_apps_back">Desktop</string> + <string name="user_apps_gone">Die app bestaat niet meer. Kies hem opnieuw via Desktop.</string> + <string name="user_apps_open">%1$s openen</string> + <string name="user_apps_remove">Verwijderen</string> + <string name="user_apps_remove_confirm">Druk nogmaals om te verwijderen</string> + <string name="user_apps_stop_session">Stop de sessie om te verwijderen</string> + <string name="user_apps_script_linked">Voert %1$s uit vanuit de eigen map, die in de sessie wordt gekoppeld waar hij staat. Als je de app verwijdert, blijft die map ongemoeid.</string> + <string name="user_apps_script_copied">Voert %1$s uit vanuit een kopie van de map in DroidDeck. Als je de app verwijdert, wordt de kopie gewist, niet het origineel.</string> + <string name="user_apps_runtime_required">Installeer eerst de Linux-runtime</string> + <string name="user_apps_file_gone">Het bestand bestaat niet meer</string> + <string name="user_apps_no_space">Niet genoeg vrije ruimte: voor het kopiëren van de map is %1$s nodig</string> + <string name="user_apps_copying">%1$s kopiëren</string> + <string name="user_apps_failed">App toevoegen mislukt</string> + <string name="user_apps_github_checking">Zoeken naar een release van %1$s</string> + <string name="user_apps_github_unreachable">Kan de releases van %1$s niet lezen</string> + <string name="user_apps_github_no_appimage">Geen enkele release van %1$s heeft een ARM64- of x86_64-AppImage</string> + <string name="user_apps_downloading">%1$s downloaden</string> + <string name="user_apps_download_failed">Downloaden mislukt</string> + <string name="user_apps_update_failed">App updaten mislukt</string> + <string name="user_apps_icon_failed">Dat pictogram kan niet worden gelezen</string> + <string name="user_apps_saved">%1$s opgeslagen</string> + <string name="user_apps_edit">Bewerken</string> + <string name="user_apps_check_updates">Controleren op updates</string> + <string name="user_apps_checking_updates">Controleren op updates…</string> + <string name="user_apps_update_to">Updaten naar %1$s</string> + <string name="user_apps_up_to_date">Up-to-date · %1$s</string> + <string name="user_apps_updated">%1$s geüpdatet</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">App toevoegen</string> + <string name="add_app_tab_script">Script</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Een .sh-bestand. Het draait vanuit de eigen map, op volledig scherm onder gamescope.</string> + <string name="add_app_appimage_hint">Een ARM64-AppImage (aarch64), of een x86_64-versie die via FEX draait. Die wordt eenmalig uitgepakt in de Linux-runtime.</string> + <string name="add_app_github_hint">Installeert de ARM64-AppImage uit de nieuwste release van de repository, of de x86_64-versie via FEX.</string> + <string name="app_fex_title">FEX gebruiken</string> + <string name="app_fex_auto">Automatisch</string> + <string name="app_fex_on">Aan</string> + <string name="app_fex_off">Uit</string> + <string name="app_fex_hint">FEX draait x86-Linux-programma’s op dit ARM64-apparaat. Bij Automatisch wordt FEX gebruikt als het programma voor x86 is gemaakt.</string> + <string name="app_fex_x86">%1$s via FEX</string> + <string name="app_fex_not_ready">Dit programma is gemaakt voor %1$s-pc’s en draait via FEX, dat nog niet is ingesteld. Open Steam één keer terwijl je bent ingelogd: DroidDeck laat het dan FEX en de benodigde Steam Linux Runtime downloaden. Daarna opent dit.</string> + <string name="session_end_program">Dit programma</string> + <string name="session_end_fex_missing">%1$s is gemaakt voor x86-pc’s en draait via FEX, dat nog niet is geïnstalleerd. Start Steam één keer terwijl je bent ingelogd en laat het FEX en de Steam Linux Runtime downloaden. Start dit daarna opnieuw.</string> + <string name="add_app_flatpak_hint">Een Flathub-app-ID of de Flathub-pagina ervan. Flatpak wordt eerst ingesteld als dat nog niet is gebeurd.</string> + <string name="add_app_file">Bestand</string> + <string name="add_app_no_file">Geen bestand gekozen</string> + <string name="add_app_choose_file">Bestand kiezen</string> + <string name="add_app_change_file">Wijzigen</string> + <string name="add_app_pick_script">Kies een script</string> + <string name="add_app_pick_appimage">Kies een AppImage</string> + <string name="add_app_pick_icon">Kies een pictogram</string> + <string name="add_app_repository">Repository</string> + <string name="add_app_repository_placeholder">eigenaar/repo of een github.com-link</string> + <string name="add_app_repository_invalid">Geen GitHub-repository</string> + <string name="add_app_flatpak_id">App-ID</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Geen Flathub-app-ID</string> + <string name="add_app_flatpak_bundle_hint">Of een .flatpak-bestand, voor een app die niet op Flathub staat.</string> + <string name="add_app_pick_flatpak">Kies een .flatpak-bestand</string> + <string name="add_app_source">Bron</string> + <string name="add_app_appearance">Op je desktop</string> + <string name="add_app_preview_name">Nieuwe app</string> + <string name="add_app_name">Naam</string> + <string name="add_app_name_placeholder">Uit de app</string> + <string name="add_app_icon">Pictogram</string> + <string name="add_app_icon_default">Standaardpictogram</string> + <string name="add_app_choose_icon">Pictogram kiezen</string> + <string name="add_app_clear_icon">Wissen</string> + <string name="add_app_icon_suggestions">Uit de repository</string> + <string name="add_app_icon_searching">Zoeken naar pictogrammen…</string> + <string name="add_app_icon_reset">Standaard</string> + <string name="edit_app_title">%1$s bewerken</string> + <string name="edit_app_save">Opslaan</string> + <string name="add_app_checking_folder">Map controleren…</string> + <string name="add_app_folder_linked">De map wordt in de sessie gekoppeld: %1$s</string> + <string name="add_app_folder_copied">De map bevat Linux-programma’s, die vanaf gedeelde opslag niet kunnen draaien, dus wordt hij naar DroidDeck gekopieerd (%1$s).</string> + <string name="add_app_confirm">Toevoegen</string> + <string name="add_app_cancel">Annuleren</string> + <string name="add_app_runtime_required">Installeer eerst de Linux-runtime via Installatie.</string> + <string name="add_app_busy">Wacht tot %1$s klaar is.</string> + <string name="steam_compat_label">Compatibel</string> + <string name="proton_compatible_note">Builds die in het menu Compatibiliteit van Steam zijn gemarkeerd met “%1$s” hebben de prefixfixes van DroidDeck en starten hier games. Standaard is dat Proton Experimental ARM64 (%1$s), of Proton 11.0 ARM64 (%1$s) zodra die nieuwere build is geïnstalleerd. Valves eigen Proton-items zonder die markering kunnen op dit apparaat geen game starten.</string> + <string name="proton_installed_compatible">%1$s geïnstalleerd · %2$s</string> + <string name="common_cancel">Annuleren</string> + <string name="common_auto">Automatisch</string> + <string name="common_never">Nooit</string> + <string name="common_always">Altijd</string> + <string name="common_uninstall">Verwijderen</string> + <string name="common_check">Controleren</string> + <string name="common_update">Updaten</string> + <string name="common_checking">Controleren…</string> + <string name="common_working">Bezig…</string> + <string name="common_forget">Vergeten</string> + <string name="common_add_ellipsis">Toevoegen…</string> + <string name="common_use">Gebruiken</string> + <string name="common_applies_next_session">Geldt vanaf de volgende sessie.</string> + <string name="mode_steam_title">Steam-sessie</string> + <string name="mode_desktop_title">Desktopsessie</string> + <string name="mode_display">Scherm</string> + <string name="mode_resolution">Resolutie</string> + <string name="mode_res_720">Tot 720p</string> + <string name="mode_res_900">Tot 900p</string> + <string name="mode_res_1080">Tot 1080p</string> + <string name="mode_res_native">Oorspronkelijk</string> + <string name="mode_res_default">%1$s (standaard)</string> + <string name="mode_res_custom_value">Aangepast · %1$d×%2$d</string> + <string name="mode_res_custom">Aangepast…</string> + <string name="mode_res_note">Met 720p kunnen menu’s sneller reageren.</string> + <string name="mode_ratio">Beeldverhouding</string> + <string name="mode_ratio_custom">Ingesteld door de aangepaste resolutie.</string> + <string name="mode_ratio_auto">Automatisch gebruikt minimaal 16:9.</string> + <string name="mode_fps">Framelimiet</string> + <string name="mode_fps_note">Begrenst de hele sessie. Het scherm schakelt naar een verversingssnelheid die een veelvoud van de limiet is.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10-uitvoer</string> + <string name="mode_hdr_unavailable">Niet beschikbaar: %1$s.</string> + <string name="mode_hdr_restart">Start de app opnieuw om dit toe te passen.</string> + <string name="mode_drivers">Drivers</string> + <string name="mode_gpu_drivers">GPU-drivers</string> + <string name="mode_gpu_drivers_hint">Gedeeld door Steam en Desktop. In te stellen op de pagina Componenten.</string> + <string name="mode_touch_controls">Aanraken & bediening</string> + <string name="mode_touch">Aanraken</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Direct</string> + <string name="mode_touch_note">Automatisch: touchpad op Desktop, direct in Steam.</string> + <string name="mode_osc">Schermbediening</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Automatisch toont de bediening als er geen controller is verbonden.</string> + <string name="osc_steam_touch">Steam-aanraakbediening (bèta)</string> + <string name="osc_style_next_session">De aanraakbediening van Steam start bij de volgende Steam-sessie</string> + <string name="osc_steam_layout">Steam-aanraakindeling</string> + <string name="osc_steam_layout_hint">Verplaats, schaal of verberg de aanraakbediening van deze game; opgeslagen in Steam</string> + <string name="mode_controller">Controller</string> + <string name="mode_controller_hint">Hoe Steam je controller ziet. Geldt vanaf de volgende sessie.</string> + <string name="mode_controller_deck">Steam Deck-controller</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Xbox 360-controller</string> + <string name="mode_controller_note">Deck: knop Snelle toegang en gyro. Steam Controller: hetzelfde, met gripsensor op de achterknoppen. DualShock 4 en DualSense: gyro, en de trackpads als hun touchpad. Xbox 360: open Snelle toegang met Guide+A.</string> + <string name="mode_back">Terug</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Sessie</string> + <string name="mode_suspend">Gedrag op de achtergrond</string> + <string name="mode_suspend_hint">Als de app verborgen is of het scherm uitgaat.</string> + <string name="mode_suspend_manual">Handmatig</string> + <string name="mode_suspend_native">Systeemeigen</string> + <string name="mode_suspend_steam_note">Automatisch pauzeert en hervat zodra de app weer zichtbaar is. Systeemeigen maakt Steam eerst klaar voor de slaapstand. Handmatig wacht op Hervatten. Nooit laat alles doorlopen.</string> + <string name="mode_background_downloads">Downloads laten doorlopen</string> + <string name="mode_background_downloads_hint">Stel onderbreken op de achtergrond uit zolang Steam actief downloadt.</string> + <string name="mode_zram">zRAM-compressie</string> + <string name="mode_zram_hint">Terwijl een game draait wordt het geheugen van de Steam-client gecomprimeerd naar de zram van het apparaat, zodat de game meer RAM heeft. Geldt de volgende keer dat Steam start.</string> + <string name="mode_zram_unsupported">Niet beschikbaar: dit apparaat heeft geen zram of swap, of de kernel is ouder dan 5.4.</string> + <string name="mode_suspend_note">Automatisch pauzeert op de achtergrond en hervat zodra de app weer zichtbaar is. Handmatig wacht op Hervatten. Nooit laat alles doorlopen.</string> + <string name="mode_startup">Opstarten</string> + <string name="mode_steam_startup">Steam starten met DroidDeck</string> + <string name="mode_steam_startup_hint">Opent de Steam-sessie als DroidDeck start.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Zoeken naar releases…</string> + <string name="mode_decky_ready">Klaar om %1$s te installeren.</string> + <string name="mode_decky_none">Geen compatibele build gevonden. Probeer het later opnieuw.</string> + <string name="mode_decky_installed">Geïnstalleerd · %1$s</string> + <string name="mode_decky_update">Update beschikbaar · %1$s</string> + <string name="mode_decky_current">Up-to-date · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Nieuwste installeren</string> + <string name="mode_decky_on">Start met Steam. Zolang dit aan staat, kunnen andere apps op dit apparaat Steam mogelijk bedienen.</string> + <string name="mode_decky_off">Uit. De poort voor foutopsporing op afstand van Steam blijft dicht.</string> + <string name="mode_decky_remove_title">Decky Loader verwijderen?</string> + <string name="mode_decky_remove_text">Verwijdert de loader. Je plug-ins en instellingen blijven behouden.</string> + <string name="mode_client">Client</string> + <string name="mode_mangoapp">Prestatie-overlay</string> + <string name="mode_mangoapp_hint">Zet dit uit als games crashen of zwart worden in de Deck-modus. Geldt vanaf de volgende sessie.</string> + <string name="mode_steam_repair">Steam-client repareren</string> + <string name="mode_steam_repair_hint">Downloadt de Steam-client opnieuw bij de volgende start van Steam. Gebruik dit als Steam op het laadscherm blijft hangen. Games, login en instellingen blijven behouden.</string> + <string name="mode_steam_repair_queued">De Steam-client wordt opnieuw gedownload bij de volgende start van Steam.</string> + <string name="mode_steam_repair_button">Repareren</string> + <string name="mode_added_art">Afbeeldingen</string> + <string name="mode_sgdb_key">SteamGridDB-API-sleutel</string> + <string name="mode_sgdb_key_yours">Je eigen sleutel</string> + <string name="mode_sgdb_edit">Bewerken…</string> + <string name="mode_added_art_hint">Vult ontbrekende afbeeldingen aan uit Steam en daarna uit SteamGridDB. Je eigen cover.jpg, hero.jpg, logo.png of icon.png in de gamemap heeft voorrang.</string> + <string name="summary_remove_game">%1$s verwijderen</string> + <string name="mode_added_remove_confirm">Verwijderen?</string> + <string name="games_add">Game toevoegen</string> + <string name="games_add_title">Game toevoegen:</string> + <string name="games_pick_exe_title">Kies de exe:</string> + <string name="games_add_unreachable">Deze locatie is niet beschikbaar in de sessie</string> + <string name="mode_added_exe_check">Deze exe controleren</string> + <string name="wincomp_title">Windows-componenten</string> + <string name="wincomp_pad_hint">Met LB / RB spring je tussen de secties.</string> + <string name="wincomp_card_none">Geen</string> + <string name="wincomp_applies">Windows-DLL’s die Proton niet meelevert, uit de componentenlijst. Zet aan wat deze game nodig heeft: ze komen in de eigen Windows-map van de game, nooit tussen de gamebestanden, en blijven staan op welke Proton de game ook draait.</string> + <string name="wincomp_offline">Kan de componentenlijst niet bereiken. Al gedownloade componenten kun je nog steeds aan- en uitzetten.</string> + <string name="wincomp_recommended">Aanbevolen voor deze game</string> + <string name="wincomp_checking">Controleren wat deze game nodig heeft…</string> + <string name="wincomp_when_online">Beschikbaar als je online bent</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">%1$d component aanzetten…</item> + <item quantity="other">%1$d componenten aanzetten…</item> + </plurals> + <string name="wincomp_auto_section">Aan voor deze game</string> + <string name="wincomp_auto_steam">Steam installeert %1$s met %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">Uit de lijst van GOG voor deze game</string> + <string name="wincomp_auto_epic">Uit de vereisten van Epic voor deze game</string> + <string name="wincomp_auto_amazon">Uit de installatiestappen van Amazon voor deze game</string> + <string name="wincomp_steam_by_name">Steam installeert %1$s met app %2$s, gevonden op naam</string> + <string name="wincomp_suggestions">Ook vermeld</string> + <string name="wincomp_suggestion_reason">Vermeld door %1$s; hier geen component</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">De game levert %1$s mee</string> + <string name="wincomp_found_shipped">De game heeft %1$s (werkt vaak zoals het is)</string> + <string name="wincomp_already_here">Al aanwezig in deze game</string> + <string name="wincomp_no_recommendation">Niets in de gamemap wijst op een component.</string> + <string name="wincomp_active">Geïnstalleerd voor deze game (%1$d)</string> + <string name="wincomp_all">Alle componenten (%1$d)</string> + <string name="wincomp_installers">Vereisen een Windows-installatieprogramma (%1$d)</string> + <string name="wincomp_installers_note">Dit zijn eigen installatieprogramma’s zonder pakket dat uit elkaar gehaald kan worden, en er is nog geen opname van wat ze installeren. De meeste zijn oude runtimes waarvoor de Mono in Proton al invalt; opnames worden toegevoegd zodra ze gemaakt zijn.</string> + <string name="wincomp_show">Tonen</string> + <string name="wincomp_hide">Verbergen</string> + <string name="wincomp_needs_installer">Voert een eigen installatieprogramma uit (nog geen opname)</string> + <string name="wincomp_unsupported">Hier nog niet ondersteund</string> + <string name="wincomp_loading">Componenten laden…</string> + <string name="wincomp_failed">Kan niet installeren: %1$s</string> + <string name="wincomp_downloaded">Gedownload</string> + <string name="wincomp_downloading">%1$s downloaden</string> + <string name="wincomp_installing">Installeren: %1$s</string> + <string name="wincomp_reverting">Uitzetten…</string> + <string name="wincomp_download_size">%1$s te downloaden</string> + <string name="wincomp_next_launch">Wordt actief bij de volgende start van de game.</string> + <string name="mode_stretch169">16:9-games uitrekken</string> + <string name="mode_stretch169_hint">Rekt games op schermen die vierkanter zijn dan 16:9 uit tot het hele scherm, in plaats van balken te tonen. Geldt vanaf de volgende sessie.</string> + <string name="mode_audio">Audio</string> + <string name="mode_directaudio">DirectAudio voor games</string> + <string name="mode_directaudio_hint">Omzeilt PulseAudio voor minder vertraging.</string> + <string name="mode_mic">Microfoon</string> + <string name="mode_mic_hint">Voor spraakchat.</string> + <string name="mode_network">Netwerk</string> + <string name="mode_wifi_discovery">Wi-Fi-detectie</string> + <string name="mode_wifi_discovery_hint">Toon Wi-Fi-namen en netwerken in de buurt in Steam.</string> + <string name="mode_wifi_location_off">Locatieservices staan uit.</string> + <string name="mode_wifi_permission_denied">Locatietoestemming niet verleend.</string> + <string name="mode_wifi_open_settings">Instellingen openen</string> + <string name="mode_wifi_continue">Doorgaan</string> + <string name="mode_wifi_explain_title">Wi-Fi-detectie aanzetten?</string> + <string name="mode_wifi_explain_text">Android vereist locatietoestemming om Wi-Fi-namen te lezen en netwerken in de buurt te vinden. DroidDeck gebruikt deze toegang om die netwerken in Steam te tonen. We volgen je locatie niet. Internettoegang werkt ook zonder deze toestemming.</string> + <string name="mode_storage">Gameopslag</string> + <string name="mode_storage_auto">Automatisch - de SD-kaart als die er is, plus je Games-mappen</string> + <string name="mode_storage_auto_none">Automatisch - je Games-mappen, plus de SD-kaart als die er is (nu geen)</string> + <string name="mode_storage_internal">Alleen intern</string> + <string name="mode_storage_folder">Map: %1$s</string> + <string name="mode_second_library">Tweede bibliotheek</string> + <string name="mode_storage_note">Games die assets streamen vanaf SD of gedeelde opslag kunnen haperen.</string> + <string name="mode_storage_diagnostics">Opslagdiagnose</string> + <string name="mode_storage_diagnostics_hint">Legt toewijzingsresultaten en steekproeven van opslagtijden vast in Logs delen. Kan installaties vertragen zolang dit aan staat. Geldt vanaf de volgende sessie.</string> + <string name="mode_choose_folder">Kies een map…</string> + <string name="mode_custom_res_title">Aangepaste resolutie</string> + <string name="mode_custom_res_text">Vervangt de limiet en de beeldverhouding. Een formaat dat niet bij het scherm past, krijgt balken.</string> + <string name="mode_width">Breedte</string> + <string name="mode_height">Hoogte</string> + <string name="mode_custom_res_range">Tussen 320×240 en 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d game</item> + <item quantity="other">%1$d games</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Verwijderen</string> + <string name="common_restore">Herstellen</string> + <string name="common_download">Downloaden</string> + <string name="common_delete_named">%1$s verwijderen</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Runtimedriver</string> + <string name="comp_runtime_driver_hint">Gebruikt door Steam, games en de desktop. Geldt vanaf de volgende sessie.</string> + <string name="comp_import_turnip">Turnip-zip importeren…</string> + <string name="comp_display_driver">Weergavedriver</string> + <string name="comp_display_driver_hint">Tekent frames op het scherm in beide modi. Start de app opnieuw om dit toe te passen.</string> + <string name="comp_import_adrenotools">AdrenoTools-zip importeren…</string> + <string name="comp_never">nooit</string> + <string name="comp_nightlies_checked">Nightlies gecontroleerd: %1$s</string> + <string name="comp_title">Componenten</string> + <string name="comp_about">Over Componenten</string> + <string name="comp_check_drivers">Zoeken naar nieuwe drivers</string> + <string name="comp_check_nightlies">Nightlies controleren op nieuwe pakketten</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">De hier gekozen Proton draait elke game die in Steam geen eigen Proton heeft gekozen, en een wijziging in Steam zie je hier ook. Steam vervangt Valves Proton bij updates; originelen worden per build bewaard.</string> + <string name="comp_scope">Configuratie</string> + <string name="comp_profile_configure">Profiel configureren</string> + <string name="comp_profile">Profiel</string> + <string name="comp_scope_general">Standaardprofiel</string> + <string name="comp_scope_general_detail">Automatisch gebruikt door games zonder overschrijvingen.</string> + <string name="comp_profile_game_detail">Opgeslagen instellingen die automatisch worden gebruikt als %1$s start.</string> + <string name="comp_game_hint">Kies alleen de instellingen die deze game nodig heeft. Al het andere blijft het Standaardprofiel gebruiken.</string> + <string name="comp_game_fex">FEX-voorinstelling</string> + <string name="comp_game_fex_inherited">Gebruikt de voorinstelling van het Standaardprofiel.</string> + <string name="comp_game_fex_override">Aangepaste voorinstelling opgeslagen voor deze game.</string> + <string name="comp_game_fex_custom">Aangepaste FEX-variabelen</string> + <string name="comp_game_use_general">Standaard gebruiken</string> + <string name="comp_game_compatibility">Gamecompatibiliteit</string> + <string name="comp_game_environment_hint">Omgevingsopties voor Proton, DXVK, VKD3D en synchronisatie voor deze game.</string> + <string name="comp_game_proton_inherited">Gebruikt de Proton van het Standaardprofiel.</string> + <string name="comp_game_proton_override">Aangepaste Proton opgeslagen voor deze game via de compatibiliteitstoewijzing van Steam.</string> + <string name="comp_no_proton_short">Geen Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Gebruikt het pakket van het Standaardprofiel uit %1$s, tenzij deze game een ander pakket kiest.</string> + <string name="comp_game_component_general">Gebruikt het componentpakket van het Standaardprofiel.</string> + <string name="comp_game_component_override">Gebruikt %1$s alleen voor deze game.</string> + <string name="comp_game_runtime_options">Runtime-opties</string> + <string name="comp_game_environment_other_hint">Overige omgevingsopties per game voor Proton, DXVK, VKD3D-Proton en synchronisatie.</string> + <string name="comp_game_saved_next">Het profiel van %1$s is opgeslagen voor de volgende start van de game.</string> + <string name="game_no_steam_title">Starten zonder Steam</string> + <string name="game_no_steam_detail">Opent het in Proton/FEX zonder de Steam-client; Steam-functies staan uit.</string> + <string name="game_no_steam_on">Aan</string> + <string name="game_steam_with">Start met Steam</string> + <string name="game_steam_without">Start zonder Steam</string> + <string name="game_settings_card">Instellingen</string> + <string name="game_settings_menu_title">Instellingen voor %1$s</string> + <string name="game_settings_default">Standaard</string> + <string name="game_settings_default_detail">Zet alles wat voor deze game is gewijzigd terug naar de instellingen van de app.</string> + <string name="game_sync_custom">Aangepaste synchronisatievariabelen</string> + <string name="comp_game_proton_live">De Proton-keuze van %1$s is opgeslagen en nu beschikbaar in Steam.</string> + <string name="comp_game_proton_next">De Proton-keuze van %1$s is opgeslagen. Start Steam opnieuw voordat je de game start.</string> + <string name="comp_game_proton_not_runnable">%1$s kan de gekozen Proton op dit apparaat niet gebruiken.</string> + <string name="comp_game_load_failed">Kan het profiel van %1$s niet laden: %2$s</string> + <string name="comp_game_save_failed">Het gameprofiel kan niet worden opgeslagen: %1$s</string> + <string name="comp_game_reset">Gameprofiel resetten</string> + <string name="comp_game_reset_title">Profiel van %1$s resetten?</string> + <string name="comp_game_reset_body">De overschrijvingen voor Proton, FEX, componentpakket, omgeving, textuurfiltering en Windows-componenten van deze game verwijderen? De game gebruikt dan het Standaardprofiel.</string> + <string name="comp_game_reset_done">%1$s gebruikt nu het Standaardprofiel.</string> + <string name="comp_game_reset_failed">Het gameprofiel kan niet volledig worden gereset: %1$s</string> + <string name="comp_default_live">%1$s draait nu elke game die in Steam geen eigen Proton heeft gekozen.</string> + <string name="comp_default_next">%1$s draait elke game die geen eigen Proton heeft gekozen, vanaf de volgende start van Steam.</string> + <string name="comp_default_not_runnable">%1$s kan hier geen games starten en kan dus niet de standaard zijn.</string> + <string name="comp_default_failed">De standaard-Proton kan niet worden opgeslagen: %1$s</string> + <string name="comp_swapped">%1$s · %2$d gewisseld</string> + <string name="comp_all_original">%1$s · alles origineel</string> + <string name="comp_game_running_suffix">%1$s · game actief</string> + <string name="comp_esync_pack">%1$s · droiddeck-esync-pakket</string> + <string name="comp_esync_wanted">%1$s · nog geen droiddeck-esync-pakket</string> + <string name="comp_esync_builtin">%1$s · esync ingebouwd, geen pakket nodig</string> + <string name="comp_gpu_drivers">GPU-drivers</string> + <string name="comp_reapplied">%1$s · opnieuw toegepast bij start %2$s</string> + <string name="comp_next_queued">Volgende: %1$s · nadat de game sluit</string> + <string name="comp_in_use">%1$s in gebruik: %2$s</string> + <string name="comp_waits">Wacht tot de game sluit</string> + <string name="comp_applies_next_game">Geldt bij de volgende start van een game</string> + <string name="comp_import_zip">.zip importeren</string> + <string name="comp_reading">Protons lezen…</string> + <string name="comp_no_proton">Nog geen Proton geïnstalleerd. Start Steam één keer om de ARM64-Proton te downloaden, of voeg GE-Proton, CachyOS of DroidDeck-Proton toe via Installatie.</string> + <string name="comp_original">Origineel · %1$s</string> + <string name="comp_this_build">%1$s · deze build</string> + <string name="comp_earlier_build">%1$s · eerdere build</string> + <string name="comp_installed_count">Geïnstalleerd · %1$d</string> + <string name="comp_nothing_stored">Nog niets bewaard voor %1$s. De eigen bestanden van deze Proton worden als origineel opgeslagen.</string> + <string name="comp_waits_long">Er draait een game op deze Proton, dus dit wacht tot die sluit.</string> + <string name="comp_applies_long">Geldt bij de volgende start van een game.</string> + <string name="comp_swap_title">%1$s wisselen?</string> + <string name="comp_swap_body">%1$s in %2$s zetten? De originele bestanden blijven bewaard. %3$s</string> + <string name="comp_restore_title">%1$s herstellen?</string> + <string name="comp_restore_body">Het origineel van %1$s terugzetten in %2$s? %3$s</string> + <string name="comp_delete_package_body">Verwijdert het pakket uit de app. Je kunt het opnieuw downloaden.</string> + <string name="comp_delete_original_title">Dit origineel verwijderen?</string> + <string name="comp_delete_original_body">Dit origineel van %1$s komt uit een eerdere build van %2$s. Het origineel van de huidige build wordt altijd bewaard.</string> + <string name="comp_nightlies_count">In de Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Vernieuw om de pakketten in de Nightlies te tonen.</string> + <string name="comp_nothing_new">Niets nieuws sinds de laatste controle.</string> + <string name="comp_import_wcp">.wcp importeren</string> + <string name="comp_restore_original">Origineel van deze Proton herstellen</string> + <string name="comp_restore_original_body">Het originele %2$s van %1$s terugzetten?</string> + <string name="comp_swap">Wisselen</string> + <string name="comp_about_text">FEX, DXVK en VKD3D-Proton voor elke Proton waarmee Steam games draait.\n\nKies een geïnstalleerde rij om die in te wisselen. Dit geldt bij de volgende start van een game, of nadat de draaiende game sluit.\n\nJe keuzes worden voor elke start opnieuw gecontroleerd en teruggezet als iets ze heeft gewijzigd. De originele bestanden van elke Proton worden bewaard, zodat Steam-updates ze nooit kwijtraken.</string> + <string name="comp_tag_original">Origineel</string> + <string name="comp_tag_in_use">In gebruik</string> + <string name="comp_tag_new">Nieuw</string> + <string name="comp_tag_stored">Bewaard</string> + <string name="perf_title">Prestaties</string> + <string name="perf_lede">CPU-cores, sessiefixes en de hostnaam. Geldt vanaf de volgende sessie.</string> + <string name="perf_client_cores_group">Cores voor de Steam-client</string> + <string name="perf_override">Corekeuze van Steam overschrijven</string> + <string name="perf_override_hint">Bindt Steam, de UI-helper en gamescope aan de cores hieronder.</string> + <string name="perf_client_cores">Clientcores</string> + <string name="perf_client_cores_on">Cores voor Steam.</string> + <string name="perf_client_cores_off">Zet de overschrijving aan om te kiezen.</string> + <string name="perf_game_cores_group">Gamecores</string> + <string name="perf_game_cores">Gamecores</string> + <string name="perf_game_cores_hint">Cores voor games. Met alles geselecteerd verdeelt Android vrij.</string> + <string name="perf_client_ui">Clientinterface</string> + <string name="perf_glthread">GL-threading</string> + <string name="perf_glthread_hint">Kan Steam-menu’s sneller laten reageren.</string> + <string name="perf_zink">Zink: luie descriptors</string> + <string name="perf_zink_hint">Aanbevolen voor drivers zonder descriptorbuffers.</string> + <string name="perf_noglerror">GL-foutcontroles overslaan</string> + <string name="perf_noglerror_hint">Schakelt GL-validatie per aanroep uit.</string> + <string name="perf_gsrealtime">gamescope: realtime GPU-wachtrij</string> + <string name="perf_gsrealtime_hint">Geeft het GPU-werk van de compositor voorrang. Kan de framepacing gladder maken, ten koste van wat gameprestaties.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">GPU op hoogste kloksnelheid houden</string> + <string name="perf_gpuclock_hint">Alleen Adreno. Minder haperingen, meer batterijverbruik en warmte.</string> + <string name="perf_fixes">Sessiefixes</string> + <string name="perf_sysmem">Turnip: sysmem-rendering</string> + <string name="perf_sysmem_hint">Sneller voor Steam en de meeste games. Vereist op Adreno 710/720/722.</string> + <string name="perf_xalia">Sla de xalia-helper van Steam over</string> + <string name="perf_fastsync">droiddeck-ntsync (experimenteel)</string> + <string name="perf_fastsync_hint">Een userspace-vervanger voor de ntsync-driver van Linux, voor tests. Terwijl dit aan staat, gebruikt Proton dit in plaats van droiddeck-esync en droiddeck-fsync. Werkt met Proton Experimental ARM64, GE-Proton en proton-cachyos. Geldt vanaf de volgende sessie.</string> + <string name="perf_esync">droiddeck-esync</string> + <string name="perf_fsync">droiddeck-fsync eerst</string> + <string name="perf_fsync_hint">Draait de eigen fsync van Proton op de standaard Proton-bestanden, met futex_waitv in userspace geleverd, zodat er geen pakket nodig is en dit blijft werken zodra Steam Proton bijwerkt. Terwijl dit aan staat, gebruiken games dit vóór droiddeck-esync, behalve de paar die Proton niet op fsync laat draaien. Geldt vanaf de volgende sessie.</string> + <string name="perf_esync_hint">De Windows-threads van games wachten via eventfd en gedeeld geheugen op elkaar, in plaats van heen-en-weer via wineserver. Gebruikt een droiddeck-esync-pakket dat voor die exacte Proton-build is gemaakt; pakketten worden automatisch gehaald. Totdat er een pakket is voor een nieuwe Proton-build, springt droiddeck-fsync in. Geldt vanaf de volgende sessie.</string> + <string name="perf_xalia_hint">Schakelt de gamepadnavigatiehulp van Proton uit, die in elke game CPU kost.</string> + <string name="perf_seccomp">Draai proot zonder seccomp</string> + <string name="perf_seccomp_hint">Kan foutmeldingen over ontbrekende systeemaanroepen op sommige kernels verhelpen. Kan de prestaties verlagen.</string> + <string name="perf_fastpath">proot-snelpad</string> + <string name="perf_fastpath_needs_seccomp">Vereist het seccomp-filter van proot.</string> + <string name="perf_fastpath_hint">Snellere bestandstoegang en minder stotteren. Zet dit uit als een programma zijn bestanden niet kan vinden.</string> + <string name="perf_identity">Sessie-identiteit</string> + <string name="perf_hostname">Hostnaam</string> + <string name="perf_hostname_hint">De naam die Steam voor dit apparaat ziet. Leeg herstelt %1$s.</string> + <string name="perf_hostname_invalid">Alleen letters, cijfers en koppeltekens binnen de naam, tot 63 tekens.</string> + <string name="perf_phantom_warning">Android is ingesteld om deze sessie te sluiten</string> + <string name="driver_installed">Geïnstalleerd</string> + <string name="driver_available">Beschikbaar om te downloaden</string> + <string name="driver_nothing_new">Niets nieuws sinds de laatste controle.</string> + <string name="driver_restore_builtin">Ingebouwde drivers herstellen</string> + <string name="driver_delete_builtin">Ingebouwd in de app: dit verwijdert de uitgepakte bestanden en verbergt de driver. Met Ingebouwde drivers herstellen komt hij terug.</string> + <string name="driver_delete_bundle">Een helft van een Android + Linux-bundel: beide helften worden verwijderd. Een driver die in gebruik is, valt terug op de standaard.</string> + <string name="driver_delete_plain">De bestanden worden uit de app verwijderd.</string> + <string name="driver_delete_in_use">De bestanden worden verwijderd. Hij is in gebruik, dus de standaard neemt het over.</string> + <string name="drawer_page_display">Scherm</string> + <string name="drawer_page_effects">Effecten</string> + <string name="drawer_page_controls">Bediening</string> + <string name="drawer_page_components">Componenten</string> + <string name="drawer_page_controller">Controller</string> + <string name="drawer_page_settings">Instellingen</string> + <string name="drawer_page_desc">%1$s-pagina</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Desktop</string> + <string name="drawer_steam_menu">Steam-menu</string> + <string name="drawer_quick_access">Snelmenu</string> + <string name="drawer_open_qam">Snelmenu openen</string> + <string name="drawer_prev_page">Vorige pagina</string> + <string name="drawer_next_page">Volgende pagina</string> + <string name="drawer_hud">Prestatie-HUD</string> + <string name="drawer_scaling">Schaalmodus</string> + <string name="drawer_scaling_sharpness">Schaalscherpte</string> + <string name="drawer_effects">Schermeffecten</string> + <string name="drawer_effects_hint">Live. Kost wat GPU-tijd zolang er een effect aan staat.</string> + <string name="drawer_look">Voorinstellingen</string> + <string name="drawer_look_custom">Aangepast</string> + <string name="drawer_effects_advanced">Geavanceerd</string> + <string name="widgets_expanded">Uitgeklapt</string> + <string name="widgets_collapsed">Ingeklapt</string> + <string name="drawer_cas">Verscherping (CAS)</string> + <string name="drawer_cas_level">Verscherpingsniveau</string> + <string name="drawer_fake_hdr">Nep-HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">SteamVR starten</string> + <string name="steamvr_checking">SteamVR controleren…</string> + <string name="drawer_deband">Debanding</string> + <string name="drawer_deband_strength">Debanding-sterkte</string> + <string name="drawer_brightness">Helderheid</string> + <string name="drawer_contrast">Contrast</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Verzadiging</string> + <string name="drawer_fxaa">FXAA (vloeiende randen)</string> + <string name="drawer_toon">Toon-contouren</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Textuurfiltering</string> + <string name="drawer_texture_hint">DirectX 9–11-games, vanaf hun volgende start.</string> + <string name="drawer_anisotropy">Anisotrope filtering</string> + <string name="drawer_texture_sharpness">Textuurscherpte</string> + <string name="drawer_texture_sharpness_note">Een negatieve mip-bias: scherpere texturen, met wat shimmer. Automatisch volgt hoe ver de sessie wordt uitvergroot naar het scherm.</string> + <string name="drawer_touch_auto">Automatisch (%1$s)</string> + <string name="drawer_keyboard">Toetsenbord</string> + <string name="drawer_latency">Latentie</string> + <string name="drawer_low_latency_controller">Controller met lage latentie</string> + <string name="drawer_low_latency_controller_hint">De controller rapporteert op 1000 Hz in plaats van 250 Hz. Iets meer CPU.</string> + <string name="drawer_low_latency_touch">Aanraking met lage latentie</string> + <string name="drawer_low_latency_touch_hint">Aanrakingen slaan framebundeling over; Steam-aanraakbediening op 1000 Hz. Iets meer CPU.</string> + <string name="drawer_pc_keyboard">Pc-toetsenbord</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Tweede scherm</string> + <string name="drawer_second_screen_mode">Modus</string> + <string name="drawer_second_screen_shows">Toont</string> + <string name="drawer_android_apps">Android-apps</string> + <string name="drawer_launch_app">Een app starten</string> + <string name="common_hide">Verbergen</string> + <string name="common_show">Tonen</string> + <string name="drawer_no_apps">Geen apps om te starten</string> + <string name="drawer_session_behavior">Sessiegedrag</string> + <string name="drawer_suspend_hint">Geldt nu en voor toekomstige sessies in deze modus.</string> + <string name="drawer_next_session">Volgende sessie</string> + <string name="drawer_support">Ondersteuning</string> + <string name="drawer_logs">Sessielogs</string> + <string name="drawer_logs_hint">Voeg bij een bugmelding</string> + <string name="drawer_share_logs">Logs delen</string> + <string name="drawer_background">Achtergrond</string> + <string name="drawer_stop">Stoppen</string> + <string name="drawer_stop_title">Sessie stoppen?</string> + <string name="drawer_running_now">Nu actief</string> + <string name="drawer_no_game">Er draait geen game op een Proton</string> + <string name="drawer_selected_profile">Gameprofiel</string> + <string name="drawer_selected_profile_none">Profielgegevens zijn nog niet beschikbaar.</string> + <string name="drawer_profile_refresh_failed_initial">Kan gameprofielen niet laden. Wordt automatisch opnieuw geprobeerd.</string> + <string name="drawer_profile_refresh_failed_stale">Kan gameprofielen niet vernieuwen. Toont de laatst beschikbare gegevens; wordt automatisch opnieuw geprobeerd.</string> + <string name="drawer_profile_inspect_hint">Bekijk en bewerk de opgeslagen instellingen voor de volgende start.</string> + <string name="drawer_profile_default">Gebruikt het standaardprofiel</string> + <string name="drawer_profile_custom">Aangepast profiel</string> + <string name="drawer_component_inherited">Gebruikt %1$s van het standaardprofiel.</string> + <string name="drawer_game_components_note">Wijzigingen worden opgeslagen in het profiel van %1$s en gelden vanaf de volgende keer dat de game start.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d game-override</item> + <item quantity="other">%1$d game-overrides</item> + </plurals> + <string name="drawer_no_proton">Er is nog geen Proton geïnstalleerd.</string> + <string name="drawer_game_running">game actief</string> + <string name="drawer_reapplied">opnieuw toegepast bij start %1$s</string> + <string name="drawer_original">Origineel</string> + <string name="drawer_components_note">Importeren en verwijderen op de pagina Componenten.</string> + <string name="setup_check_done">Klaar</string> + <string name="setup_check_warn">Aandacht nodig</string> + <string name="setup_check_busy">Bezig</string> + <string name="setup_limit_adb_failed">Controleer het IP-adres en de poort van Draadloos debuggen, of koppel opnieuw als Android dit apparaat heeft verwijderd.</string> + <string name="setup_install">Installeren</string> + <string name="setup_manage">Beheren</string> + <string name="setup_tab_overview">Overzicht</string> + <string name="setup_tab_controller">Controller</string> + <string name="setup_tab_session">Sessie</string> + <string name="setup_tab_launcher">Launcher</string> + <string name="setup_title">Installatie</string> + <string name="setup_all_set">● Alles klaar</string> + <string name="setup_n_ready">%1$d van %2$d gereed</string> + <string name="setup_system_check">Systeemcontrole</string> + <string name="setup_gpu_supported">Apparaat ondersteund</string> + <string name="setup_gpu_untested">Ongeteste GPU</string> + <string name="setup_gpu_unsupported">GPU niet ondersteund</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam heeft een Adreno-driver nodig; %1$s kan een zwart scherm tonen</string> + <string name="setup_runtime">Linux-runtime</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Niet geïnstalleerd · ongeveer 3 GB, geïnstalleerd bij de eerste keer Spelen</string> + <string name="setup_installed">Geïnstalleerd</string> + <string name="setup_runtime_update">%1$s · update beschikbaar</string> + <string name="setup_runtime_current">%1$s · up-to-date</string> + <string name="setup_limit">Limiet voor subprocessen</string> + <string name="setup_limit_on">Aan · Android kan Steam sluiten. Uitzetten duurt een minuutje.</string> + <string name="setup_limit_unset">Niet ingesteld · Android kan Steam sluiten. Uitzetten duurt een minuutje.</string> + <string name="setup_limit_unknown">Kan niet worden gecontroleerd · uitzetten duurt een minuutje.</string> + <string name="setup_fix_it">Oplossen</string> + <string name="setup_details">Details</string> + <string name="setup_dev_options">Opties voor ontwikkelaars</string> + <string name="setup_use_wireless">Draadloos debuggen gebruiken</string> + <string name="setup_check_again">Opnieuw controleren</string> + <string name="setup_limit_turn_on">Limiet inschakelen</string> + <string name="setup_account">Steam-account</string> + <string name="setup_signed_in_offline">Aangemeld als %1$s · offlinemodus</string> + <string name="setup_signed_in">Aangemeld als %1$s</string> + <string name="setup_sign_in">Druk op Spelen en meld je aan bij Steam</string> + <string name="setup_tools">Hulpmiddelen</string> + <string name="setup_controller">Controller</string> + <string name="setup_controller_unavailable">Controllerinstellingen zijn niet beschikbaar.</string> + <string name="setup_session">Sessie</string> + <string name="setup_logs">Sessielogs</string> + <string name="setup_logs_hint">Opgeslagen na elke sessie</string> + <string name="setup_agent_commands">Hulpmiddelen voor debuggen</string> + <string name="setup_latest_logs">Nieuwste sessielogs</string> + <string name="setup_saved_logs">Opgeslagen sessielogs</string> + <string name="setup_saved_logs_hint">Bewaart de nieuwste %1$d</string> + <string name="setup_clear_logs">Logs wissen</string> + <string name="setup_reset_settings">Alle instellingen resetten</string> + <string name="setup_reset_settings_hint">Zet elke instelling terug op de standaardwaarde</string> + <string name="setup_reset_settings_button">Resetten</string> + <string name="setup_reset_settings_title">Alle instellingen resetten?</string> + <string name="setup_reset_settings_body">Instellingen voor beeld, prestaties, controller, thema, taal en launcher gaan terug naar de standaardwaarden. Je games, Steam-aanmelding, winkelaccounts, gedownloade drivers en opslagmappen blijven bewaard.</string> + <string name="setup_reset_settings_profiles">Ook gameprofielen resetten (Proton, FEX, componenten en omgeving per game, en de omgeving van het Standaard-profiel)</string> + <string name="setup_reset_settings_session_running">Stop de sessie voordat je instellingen reset.</string> + <string name="setup_reset_settings_partial">De instellingen zijn gereset, maar niet alles. De details staan in de logs.</string> + <string name="setup_offline">Offlinemodus</string> + <string name="setup_sign_in_first">Meld je eerst aan bij Steam</string> + <string name="setup_launcher">Launcher</string> + <string name="setup_language">Taal</string> + <string name="setup_language_hint">Steam gebruikt deze ook, vanaf de volgende keer dat het start.</string> + <string name="setup_language_system">Systeemstandaard (%1$s)</string> + <string name="setup_language_system_short">Systeemstandaard</string> + <string name="setup_app_scale">Appschaal</string> + <string name="setup_app_scale_hint">Tekst en bediening van DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (Standaard)</string> + <string name="setup_theme">Thema</string> + <string name="setup_theme_hint">Uiterlijk van de launcher</string> + <string name="setup_home">Als startscherm gebruiken</string> + <string name="setup_home_on">DroidDeck kan de startschermapp zijn</string> + <string name="setup_home_off">DroidDeck wordt nooit aangeboden als startschermapp</string> + <string name="setup_orientation">Oriëntatie</string> + <string name="setup_orientation_auto">Automatisch liggend</string> + <string name="setup_orientation_landscape">Liggend</string> + <string name="setup_orientation_reverse">Liggend omgekeerd</string> + <string name="setup_fullscreen">Volledig scherm</string> + <string name="setup_fullscreen_on">Verbergt de statusbalk en navigatiebalk van Android</string> + <string name="setup_fullscreen_off">Toont de statusbalk en navigatiebalk van Android</string> + <string name="setup_default_home">Standaard startschermapp</string> + <string name="setup_choose_home">Kies een startschermapp</string> + <string name="setup_choose">Kiezen</string> + <string name="setup_linux_apps">Linux-apps (bèta)</string> + <string name="setup_tool_files">Bestanden</string> + <string name="setup_tool_files_hint">Bestanden doorbladeren en beheren</string> + <string name="setup_tool_protons">Proton-versies</string> + <string name="setup_tool_protons_hint">ARM64 Proton-builds installeren</string> + <string name="setup_tool_performance">Prestaties</string> + <string name="setup_tool_performance_hint">Toewijzing van CPU-kernen</string> + <string name="setup_tool_roms">ROM-map</string> + <string name="setup_tool_roms_hint">Waar emulatorgames worden opgeslagen</string> + <string name="setup_card_components">Componenten</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Bediening</string> + <string name="setup_card_controls_hint">Knoppenindeling</string> + <string name="store_tab_discover">Ontdekken</string> + <string name="store_tab_search">Zoeken</string> + <string name="store_tab_installed">Geïnstalleerd</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Store</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak gereed</string> + <string name="store_needs_runtime">Installeer eerst de Linux-runtime via Installatie.</string> + <string name="store_setup_title">Flatpak instellen</string> + <string name="store_setup_text">Voegt Flatpak toe en verbindt het met Flathub (ongeveer 20 MB). Bij de eerste app wordt ook de bijbehorende runtime gedownload.</string> + <string name="store_setting_up">Instellen…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Updates</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Starten…</string> + <string name="store_categories">Categorieën</string> + <string name="store_unreachable">Kan Flathub niet bereiken. Controleer je verbinding en probeer het opnieuw.</string> + <string name="store_try_again">Opnieuw proberen</string> + <string name="store_search_label">Flathub doorzoeken</string> + <string name="store_search_placeholder">Firefox, games, emulators…</string> + <string name="store_search">Zoeken</string> + <string name="store_all">Alle</string> + <string name="store_searching">Zoeken…</string> + <string name="store_search_hint">Zoek op naam of kies een categorie. Alleen ARM64-apps worden weergegeven.</string> + <string name="store_no_results">Geen ARM64-apps op Flathub komen daarmee overeen.</string> + <string name="store_results">Resultaten</string> + <string name="store_check_updates">Controleren op updates</string> + <string name="store_update_all">Alles updaten (%1$d)</string> + <string name="store_all_current">● Alles is up-to-date</string> + <string name="store_no_apps">Nog geen apps. Zoek ze onder Ontdekken of Zoeken.</string> + <string name="store_setup_first_note">Stel Flatpak in om apps te installeren.</string> + <string name="store_update_available_prefix">Update beschikbaar · %1$s</string> + <string name="store_open">Openen</string> + <string name="store_details">Details</string> + <string name="store_remove">Verwijderen</string> + <string name="store_press_again">Druk nogmaals om te verwijderen</string> + <string name="store_installing">Installeren…</string> + <string name="store_install">Installeren</string> + <string name="store_setup_first">Stel eerst Flatpak in</string> + <string name="store_download_size">%1$s download</string> + <string name="store_installed_chip">● Geïnstalleerd</string> + <string name="store_details_failed">Kan de Flathub-pagina van deze app niet laden.</string> + <string name="store_loading">Laden vanuit Flathub…</string> + <string name="store_no_arm">Geen ARM64-build op Flathub, dus kan dit hier niet worden geïnstalleerd.</string> + <string name="store_screenshots">Screenshots</string> + <string name="store_about">Over</string> + <string name="store_app_id">App-ID</string> + <string name="store_license">Licentie</string> + <string name="store_runtime">Runtime</string> + <string name="store_installed_size">Geïnstalleerde grootte</string> + <string name="store_installed_size_value">%1$s (plus de gedeelde runtime)</string> + <string name="store_website">Website</string> + <string name="store_verified">Geverifieerd</string> + <string name="upd_title">Updates</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Gecontroleerd %1$s</string> + <string name="upd_not_checked">Nog niet gecontroleerd</string> + <string name="upd_perm_title">Laat DroidDeck zichzelf updaten</string> + <string name="upd_perm_text">Op het volgende scherm zet je Van deze bron toestaan aan, en kom dan terug. De update gaat daarna automatisch verder.</string> + <string name="upd_open_settings">Instellingen openen</string> + <string name="upd_not_now">Niet nu</string> + <string name="upd_signed_status">Anders ondertekend</string> + <string name="upd_signed_headline">Kan niet rechtstreeks worden bijgewerkt</string> + <string name="upd_signed_detail">Deze kopie is niet ondertekend met de releasesleutel van DroidDeck, dus updates kunnen er niet overheen worden geïnstalleerd. Verwijder de app om te wisselen.</string> + <string name="upd_available">Update beschikbaar</string> + <string name="upd_blocked_status">Installeren niet mogelijk</string> + <string name="upd_switch">Klaar om te wisselen</string> + <string name="upd_ahead_status">Voor op Stabiel</string> + <string name="upd_ahead_headline">Je loopt voor op Stabiel</string> + <string name="upd_ahead_detail">Deze build is nieuwer dan de nieuwste Stabiele build. Je gaat naar Stabiel zodra de volgende release daarvan verschijnt.</string> + <string name="upd_gone_status">Test afgelopen</string> + <string name="upd_gone_headline">Deze test is afgelopen</string> + <string name="upd_gone_detail">De bijbehorende fix is samengevoegd of geschrapt. Volg Preview voor de nieuwste fixes.</string> + <string name="upd_current_status">Up-to-date</string> + <string name="upd_current_headline">Je hebt de nieuwste %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Updaten%1$s</string> + <string name="upd_install_button">Installeren%1$s</string> + <string name="upd_install_anyway">Stabiel %1$s toch installeren</string> + <string name="upd_follow_preview">Preview volgen</string> + <string name="upd_stop_session">Stop de actieve sessie om te updaten.</string> + <string name="upd_less">Minder</string> + <string name="upd_more">Meer</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Nieuwe Preview-build</string> + <string name="upd_new_test">PR #%1$d-testbuild</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">UPDATEKANAAL</string> + <string name="upd_stable">Stabiel</string> + <string name="upd_stable_hint">Geteste releases, voor de meeste mensen</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Nieuwste fixes, vóór Stabiel</string> + <string name="upd_preview_current">Up-to-date</string> + <string name="upd_tests">Testbuilds</string> + <string name="upd_tests_hint">Probeer een fix voordat die wordt uitgebracht</string> + <string name="upd_tests_none">Momenteel geen</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Niet gebouwd voor deze kopie van DroidDeck</string> + <string name="upd_updated">Geüpdatet %1$s</string> + <string name="upd_test_name">de PR #%1$d-test</string> + <string name="upd_while_ago">een tijdje geleden</string> + <string name="upd_just_now">zojuist</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d om te proberen</item> + <item quantity="other">%1$d om te proberen</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Wijzigingen sinds jouw build · %1$d build achter</item> + <item quantity="other">Wijzigingen sinds jouw build · %1$d builds achter</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Recente wijzigingen · %1$d build</item> + <item quantity="other">Recente wijzigingen · %1$d builds</item> + </plurals> + <string name="gate_title">Eén Android-instelling om te wijzigen</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android stopt apps die veel achtergrondprocessen starten, en Steam start er tientallen. Totdat dit verandert, sluiten games zonder foutmelding.</string> + <string name="gate_fix_for_me">Voor mij oplossen</string> + <string name="gate_toggle_steps">Zet “Beperkingen voor onderliggende processen uitzetten” aan, en kom dan terug. Laat Opties voor ontwikkelaars aan staan, anders schakelt de schakelaar weer uit.</string> + <string name="gate_open_dev">Opties voor ontwikkelaars openen</string> + <string name="gate_no_toggle">Deze Android-versie heeft hiervoor geen schakelaar, dus wijzigt DroidDeck dit via Draadloos debuggen. Duurt ongeveer een minuut, geen computer nodig.</string> + <string name="gate_needs_wifi">Draadloos debuggen heeft Wi-Fi nodig. Elk netwerk werkt; internet is niet vereist.</string> + <string name="gate_needs_notifications">De koppelingscode komt in een melding. Sta meldingen toe voor DroidDeck, of gebruik Andere manieren.</string> + <string name="gate_allow_notifications">Meldingen toestaan</string> + <string name="gate_step1">Open Instellingen → Opties voor ontwikkelaars → Draadloos debuggen en zet het aan</string> + <string name="gate_step2">Tik op “Apparaat koppelen met koppelingscode”</string> + <string name="gate_step3">Voer de code in bij de melding van DroidDeck</string> + <string name="gate_waiting">Wachten op de koppelingspop-up…</string> + <string name="gate_code_needed">Pop-up gevonden. Voer de code ervan in bij de melding.</string> + <string name="gate_status">Status</string> + <string name="gate_polling">Controleert elke 2 seconden. Deze pagina sluit zodra het uit staat.</string> + <string name="gate_other_ways">Andere manieren</string> + <string name="gate_other_toggle">Draadloos debuggen, handmatig adres, computer-ADB</string> + <string name="gate_other_no_toggle">Handmatig adres, computer-ADB, Opties voor ontwikkelaars</string> + <string name="gate_use_wireless_instead">Gebruik Draadloos debuggen in plaats daarvan</string> + <string name="gate_some_roms">Sommige ROMs voegen de schakelaar toch toe. Zoek naar “subproces” in Opties voor ontwikkelaars.</string> + <string name="gate_manual_hint">Als de melding niet werkt, voer je het adres en de code van de pop-up zelf in.</string> + <string name="gate_enter_manually">Adres handmatig invoeren</string> + <string name="gate_from_computer">Vanaf een computer met ADB:</string> + <string name="gate_copy_command">Opdracht kopiëren</string> + <string name="gate_choose_display">Kies op welk scherm Android-instellingen wordt geopend.</string> + <string name="gate_main_screen">Hoofdscherm</string> + <string name="wadb_finding_port">Gekoppeld. Poort van Draadloos debuggen zoeken…</string> + <string name="wadb_enter_port">Gekoppeld. Voer de poort uit Instellingen in.</string> + <string name="wadb_applying">Apparaat gevonden. Instelling toepassen…</string> + <string name="wadb_apply_failed">Kan niet automatisch worden toegepast. Controleer het adres hieronder en probeer het opnieuw. %1$s</string> + <string name="wadb_title_wireless">Draadloos debuggen</string> + <string name="wadb_title_done">Limiet voor subprocessen bijgewerkt</string> + <string name="wadb_title">De limiet voor subprocessen wijzigen</string> + <string name="wadb_lede_compact0">Als de optie ontbreekt, koppel dan via Draadloos debuggen.</string> + <string name="wadb_lede_compact1">Gekoppeld. Controleer het IP-adres en de poort in Draadloos debuggen.</string> + <string name="wadb_lede_done">De limiet voor subprocessen is bijgewerkt.</string> + <string name="wadb_lede0">Gebruik stap 2 als Opties voor ontwikkelaars geen instelling voor subprocessen heeft. Open Opties voor ontwikkelaars → Draadloos debuggen → Apparaat koppelen met koppelingscode.</string> + <string name="wadb_lede1">Gekoppeld. Gebruik het adres hieronder, of werk het bij via Draadloos debuggen → IP-adres & Poort.</string> + <string name="wadb_lede_done_long">De limiet voor subprocessen is bijgewerkt via Draadloos debuggen.</string> + <string name="wadb_confirmed_on">Android heeft bevestigd dat de limiet aan staat.</string> + <string name="wadb_confirmed_off">Android heeft bevestigd dat de limiet uit staat.</string> + <string name="wadb_pair_group">2 · Draadloos debuggen koppelen</string> + <string name="wadb_pair_address">IP-adres & poort van de koppelingspop-up</string> + <string name="wadb_pin">Koppelingscode (pincode)</string> + <string name="wadb_pin_placeholder">6 cijfers</string> + <string name="wadb_pair">Koppelen</string> + <string name="wadb_apply_group">2 · Toepassen via Draadloos debuggen</string> + <string name="wadb_connect_address">IP-adres & poort van de verbinding</string> + <string name="wadb_pair_again">Opnieuw koppelen</string> + <string name="wadb_turn_off">Limiet uitschakelen</string> + <string name="wadb_other_ways">Andere manieren om dit te wijzigen</string> + <string name="wadb_dev_try_first">1 · Opties voor ontwikkelaars (probeer dit eerst)</string> + <string name="wadb_restrict_on">Zet “Beperkingen voor onderliggende processen uitzetten” uit.</string> + <string name="wadb_restrict_off">Zet “Beperkingen voor onderliggende processen uitzetten” aan.</string> + <string name="wadb_computer_last">3 · Computer-ADB (laatste redmiddel)</string> + <string name="wadb_only_if">Alleen als Draadloos debuggen niet beschikbaar is.</string> + <string name="wadb_computer_group">3 · Computer-ADB (laatste redmiddel)</string> + <string name="ctrl_osc_hint">Wanneer de aanraakbediening in een sessie verschijnt</string> + <string name="ctrl_color">Kleur</string> + <string name="ctrl_color_hint">Tint van de knoppen op het scherm</string> + <string name="ctrl_custom">Aangepast</string> + <string name="ctrl_opacity">Transparantie</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Knopgrootte</string> + <string name="ctrl_size_hint" formatted="false">100% is de standaardgrootte</string> + <string name="ctrl_stick_click">Stickklik</string> + <string name="ctrl_stick_click_hint">Dubbeltik en houd een stick ingedrukt voor L3 of R3</string> + <string name="ctrl_adaptive">Adaptieve sticks</string> + <string name="ctrl_rumble">Trillen in games</string> + <string name="ctrl_steam_button">Steam-knop</string> + <string name="ctrl_qam_button">QAM-knop</string> + <string name="ctrl_keyboard_button">Toetsenbordknop</string> + <string name="ctrl_select_steam">Druk op Select om het Steam-menu te openen</string> + <string name="ctrl_select_steam_hint">In plaats van View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Cons als VR-controllers</string> + <string name="ctrl_joycon_vr_hint">Zolang SteamVR draait, wordt elke Joy-Con een hand. Richt hem naar voren en houd Home of Capture ingedrukt om hem opnieuw te centreren.</string> + <string name="setup_animations">Animaties</string> + <string name="ctrl_adaptive_hint">Sticks verschijnen waar je aanraakt en verdwijnen als je loslaat</string> + <string name="ctrl_layout">Indeling</string> + <string name="ctrl_layout_custom">Aangepaste posities opgeslagen</string> + <string name="ctrl_layout_default">Aangepast aan dit scherm</string> + <string name="ctrl_edit">Bewerken</string> + <string name="ctrl_reset">Resetten</string> + <string name="ctrl_mapping">Knoppenindeling</string> + <string name="ctrl_mapping_default">Elke knop stuurt zijn eigen invoer</string> + <string name="ctrl_mapping_count">%1$d van %2$d knoppen opnieuw toegewezen</string> + <string name="ctrl_configure">Configureren</string> + <string name="ctrl_reset_all">Controller resetten</string> + <string name="ctrl_reset_all_hint">Herstelt alle controllerinstellingen en de indeling</string> + <string name="ctrl_mapping_lede">Wat elke schermknop naar de game stuurt. Verborgen verwijdert de knop.</string> + <string name="ctrl_onscreen_buttons">Schermknoppen</string> + <string name="ctrl_defaults">Standaardinstellingen</string> + <string name="ctrl_reset_mapping">Indeling resetten</string> + <string name="content_android_apps">Android-apps</string> + <string name="content_apps_count">%1$d apps</string> + <string name="content_no_android_apps">Geen startbare Android-apps gevonden.</string> + <string name="content_desktop_installed">● Desktop geïnstalleerd</string> + <string name="content_desktop_first_open">Wordt geïnstalleerd bij eerste keer openen</string> + <string name="content_available">Beschikbaar om te installeren</string> + <string name="content_not_installed">Niet geïnstalleerd.</string> + <string name="content_not_installed_suffix">%1$s · niet geïnstalleerd</string> + <string name="content_open_named">%1$s openen</string> + <string name="content_games">Games</string> + <string name="content_choose_roms">Kies een ROM-map.</string> + <string name="content_retroarch_roms">Blader naar /root/ROMs in RetroArch.</string> + <string name="content_add_roms">Voeg %1$s-games toe aan ROMs/%2$s.</string> + <string name="content_install_named">%1$s installeren</string> + <string name="content_stop_to_install">Stop de sessie om te installeren</string> + <string name="content_runtime_required">Runtime vereist</string> + <string name="content_loading_details">Installatiegegevens laden…</string> + <string name="content_details_unavailable">Installatiegegevens zijn niet beschikbaar. Probeer het later opnieuw.</string> + <string name="content_needs_runtime">Installeer eerst de Linux-runtime via Installatie.</string> + <string name="content_stop_first">Stop de actieve sessie om desktopapps te installeren.</string> + <string name="content_install_into">Installeert %1$s in de Linux-desktop.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Verbergen haalt het van Desktop. De bestanden blijven in de Linux-runtime.</string> + <string name="content_rom_gone">Die game staat niet meer in de ROM-map.</string> + <string name="content_desktop_system">Desktop · %1$s</string> + <string name="content_launch_in">Starten in %1$s</string> + <string name="content_also_in">Ook in %1$s</string> + <string name="content_page_gone">Die pagina bestaat niet meer. Kies een onderdeel aan de linkerkant.</string> + <string name="content_open_desktop">Desktop openen</string> + <string name="content_install_open_desktop">Installeren & desktop openen</string> + <string name="desktop_remove_title">Desktop verwijderen</string> + <string name="desktop_remove_text">Verwijdert de desktop en de meegeleverde apps. Games, toegevoegde apps, instellingen en gedeelde bibliotheken blijven behouden.</string> + <string name="desktop_removing">Desktop wordt verwijderd</string> + <string name="desktop_removed">Desktop verwijderd</string> + <string name="desktop_cleaning_legacy">Oude LXQt-bestanden verwijderen</string> + <string name="desktop_removal_unknown">Werk DroidDeck bij voordat je deze desktopversie verwijdert.</string> + <string name="content_linux_desktop">Linux-desktop</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox en je emulators</string> + <string name="games_empty">Games die je in Steam installeert, verschijnen hier na de sessie.</string> + <string name="games_play_steam">Steam spelen</string> + <string name="games_play_steamvr">SteamVR spelen</string> + <string name="games_launch_settings">Opstartinstellingen</string> + <string name="games_launch">Starten</string> + <string name="games_files">Gamebestanden</string> + <string name="games_prefix">Proton-prefix</string> + <string name="games_saves_looking">Opslagbestanden zoeken…</string> + <string name="games_saves_none">Geen opslagmap gevonden op naam. Exporteren neemt de hele gebruikersmap.</string> + <string name="games_saves_folders">%1$d opslagmappen</string> + <string name="games_saves_summary">%1$s · %2$d bestanden · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Opslagbestanden beheren</string> + <string name="games_saves">Gameopslag</string> + <string name="games_import_saves">Opslagbestanden importeren…</string> + <string name="games_export_gamehub">Exporteren als GameHub-zip…</string> + <string name="games_export_winlator">Exporteren als Winlator-zip…</string> + <string name="games_open_save_folder">Opslagmap openen</string> + <string name="games_never_played">Nooit gespeeld</string> + <string name="games_runtime_busy_percent">Runtime bezig · %1$d%%</string> + <string name="games_runtime_busy">Runtime bezig</string> + <string name="games_runtime_first_play">Runtime wordt geïnstalleerd bij de eerste keer Spelen</string> + <string name="games_runtime_update">Runtime-update beschikbaar</string> + <string name="games_runtime_ready">● Runtime gereed</string> + <string name="games_last_played">Laatst gespeeld %1$s</string> + <string name="games_internal">Interne opslag</string> + <string name="games_added">Toegevoegde game</string> + <string name="games_custom">Aangepaste game</string> + <string name="games_store_storage">Opslag voor games</string> + <string name="gpu_auto_hint">Het beste paar voor deze GPU, blijft up-to-date</string> + <string name="gpu_manual_hint">Kies zelf een paar</string> + <string name="gpu_checking">Controleren op drivers…</string> + <string name="gpu_none_listed">Nog geen drivers vermeld. Vernieuw om ernaar te zoeken.</string> + <string name="gpu_hide_other">Drivers voor andere GPU’s verbergen</string> + <string name="gpu_show_other">Drivers voor andere GPU’s tonen</string> + <string name="gpu_advanced">Geavanceerd</string> + <string name="gpu_set_with_display">Wordt samen met de beeldschermdriver ingesteld: %1$s bevat beide.</string> + <string name="gpu_set_with_runtime">Wordt samen met de runtimedriver ingesteld: %1$s bevat beide.</string> + <string name="gpu_runtime_hint">Gebruikt door games en de desktop.</string> + <string name="gpu_runtime_default">Runtimestandaard</string> + <string name="gpu_auto_by_gpu">Automatisch - gekozen op basis van de GPU</string> + <string name="gpu_manage">Downloaden, importeren of verwijderen…</string> + <string name="gpu_in_use_caps">IN GEBRUIK</string> + <string name="gpu_builtin">De drivers die ingebouwd zijn in DroidDeck</string> + <string name="gpu_matched_pair">Runtime- en beeldschermdrivers samen ingesteld als bijpassend paar.</string> + <string name="gpu_recommended_for">Aanbevolen voor deze GPU: %1$s.</string> + <string name="gpu_refresh_hint">Vernieuw om te zoeken naar drivers voor deze GPU.</string> + <string name="gpu_recommended_caps">AANBEVOLEN</string> + <string name="gpu_unavailable">Niet beschikbaar</string> + <string name="load_runtime">Linux-runtime</string> + <string name="load_runtime_detail">Linux-runtime wordt voorbereid</string> + <string name="load_session">Sessie</string> + <string name="load_session_detail">Beeld en audio starten</string> + <string name="load_steam">Steam-client</string> + <string name="load_steam_detail">Steam en de compatibiliteitstools controleren</string> + <string name="load_opening_steam">Steam wordt geopend</string> + <string name="load_opening_steam_detail">Wachten op het eerste frame van Steam</string> + <string name="load_desktop">Desktop</string> + <string name="load_desktop_detail">Desktop wordt voorbereid</string> + <string name="load_opening">Openen</string> + <string name="load_opening_detail">Wachten op het eerste frame</string> + <string name="load_starting_steam">Steam wordt gestart</string> + <string name="load_ended">De sessie is beëindigd</string> + <string name="load_step">Stap %1$d van %2$d</string> + <string name="load_steam_paused">Steam is gepauzeerd</string> + <string name="deck_tab_grips">Grepen</string> + <string name="deck_tab_left">Linkerpad</string> + <string name="deck_tab_right">Rechterpad</string> + <string name="deck_tab_both">Beide</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Stick</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Wisselen tussen stick en trackpad</string> + <string name="deck_more_controls">Meer Deck-bediening</string> + <string name="deck_panels">PANELEN</string> + <string name="deck_close">Bediening op tweede scherm sluiten</string> + <string name="deck_open_steam_menu">Steam-menu openen</string> + <string name="deck_left_upper">Links · boven</string> + <string name="deck_left_lower">Links · onder</string> + <string name="deck_right_upper">Rechts · boven</string> + <string name="deck_right_lower">Rechts · onder</string> + <string name="deck_click">Klik</string> + <string name="deck_right_trackpad">Rechtertrackpad</string> + <string name="deck_left_trackpad">Linkertrackpad</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Toetsenbord tonen</string> + <string name="second_hide_keyboard">Toetsenbord verbergen</string> + <string name="second_terminal">Linux-terminal</string> + <string name="second_terminal_not_ready">De Linux-sessie is nog niet klaar voor een terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Games</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Winkel</string> + <string name="rail_components">Componenten</string> + <string name="rail_apps">Apps</string> + <string name="rail_setup">Installatie</string> + <string name="rail_updates">Updates</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">%1$s hervatten</string> + <string name="roms_text">Verschijnt in elke sessie als /root/ROMs. Interne opslag staat op /root/Storage.</string> + <string name="roms_none">Geen map gekozen</string> + <string name="roms_applies">Geldt vanaf de volgende sessie. SD-kaarten werken ook.</string> + <string name="roms_choose">Map kiezen</string> + <string name="roms_change">Map wijzigen</string> + <string name="proton_lede">Installeer een ARM64-build van Proton en kies die per game in Steam → Eigenschappen → Compatibiliteit.</string> + <string name="proton_stop_first">Stop de actieve sessie om een compatibiliteitstool te installeren of te verwijderen.</string> + <string name="proton_available">Beschikbare builds</string> + <string name="proton_installed">%1$s geïnstalleerd</string> + <string name="proton_queued">In afwachting van een eerder verzoek</string> + <string name="proton_not_installed">Niet geïnstalleerd</string> + <string name="proton_update_available">Update beschikbaar → %1$s</string> + <string name="proton_remove_older">Oude versies van %1$s verwijderen</string> + <string name="proton_remove_older_body">Verwijdert %1$s. Games die op deze versies zijn ingesteld, moeten naar een andere Proton worden overgezet.</string> + <string name="proton_remove_body">Games die op deze versie zijn ingesteld, moeten naar een andere Proton worden overgezet.</string> + <string name="proton_install_now">Nu installeren</string> + <string name="proton_cancel_queued">Wachtrij annuleren</string> + <string name="pckb_android">Android-toetsenbord</string> + <string name="pckb_hide">Verbergen ✕</string> + <string name="main_launch_named">%1$s starten</string> + <string name="main_choose_screen">Kies een scherm. Tweede scherm: %1$s.</string> + <string name="main_secondary_gone">Het tweede scherm is niet meer beschikbaar.</string> + <string name="main_primary">Hoofdscherm</string> + <string name="main_secondary">Tweede scherm</string> + <string name="widgets_prev_tab">Vorig tabblad</string> + <string name="widgets_next_tab">Volgend tabblad</string> + <string name="widgets_on">Aan</string> + <string name="widgets_all_n">Alle %1$d</string> + <string name="widgets_none">Geen</string> + <string name="widgets_n_of_m">%1$d van %2$d</string> + <string name="widgets_off">Uit</string> + <string name="screen_bottom">Onderste scherm</string> + <string name="game_env_applies">Geldt bij de volgende gamestart. Het profiel van een game gaat voor het gedeelde profiel.</string> + <string name="game_env_other">Andere game via app-ID…</string> + <string name="game_env_done">Klaar</string> + <string name="game_env_default">Standaard</string> + <string name="game_env_off">Uit</string> + <string name="game_env_change">Wijzigen…</string> + <string name="game_env_change_title">Variabele wijzigen</string> + <string name="game_env_restore_default">Terug naar standaard</string> + <string name="game_env_eyebrow">Proton-games</string> + <string name="pip_title">Scherm-in-scherm</string> + <string name="pip_auto">Automatisch scherm-in-scherm starten</string> + <string name="unfolded_controls">Bediening op het uitgevouwen scherm</string> + <string name="unfolded_controls_hint">Uitgevouwen staat de game boven de Steam Deck-trackpads en achtergrepen. Dichtgevouwen is de game schermvullend.</string> + <string name="pip_suspended">Onderbroken</string> + <string name="pip_not_ready">Scherm-in-scherm is beschikbaar zodra de sessie klaar is.</string> + <string name="pip_permission">Sta scherm-in-scherm toe voor DroidDeck in de Android-instellingen.</string> + <string name="pip_unavailable">Android kon scherm-in-scherm niet openen.</string> + <string name="game_shortcut">Snelkoppeling</string> + <string name="game_shortcut_add">Toevoegen aan startscherm</string> + <string name="game_shortcut_choose">Game kiezen</string> + <string name="game_shortcut_scanning">Geïnstalleerde games zoeken…</string> + <string name="game_link_copy">Startlink kopiëren</string> + <string name="game_link_copied">Startlink gekopieerd</string> + <string name="game_shortcut_unsupported">Deze launcher kan geen snelkoppelingen toevoegen. Gebruik in plaats daarvan “Startlink kopiëren”.</string> + <string name="game_link_invalid">Ongeldige startlink voor game.</string> + <string name="game_link_missing">Deze game staat niet meer in je DroidDeck-bibliotheek.</string> + <string name="game_link_session_busy">Stop de huidige sessie voordat je een Steam-game start.</string> + <string name="game_link_failed">Kan de game niet naar Steam sturen. Probeer hem opnieuw te starten.</string> + <string name="setup_retry_removal">Verwijderen opnieuw proberen</string> + <string name="runtime_removing">Verwijderen</string> + <string name="runtime_removal_incomplete">Verwijderen onvolledig</string> + <string name="game_file_export">Gamebestand exporteren</string> + <string name="game_file_sync">Alle gamebestanden naar map synchroniseren</string> + <string name="game_file_stop_sync">Synchroniseren van gamebestanden stoppen</string> + <string name="game_file_folder">Kies een map voor frontend-gamebestanden</string> + <string name="game_file_exported">Gamebestanden opgeslagen in %1$s</string> + <string name="game_frontend_files">Frontend-bestanden</string> + + <string name="main_wait_runtime">Wacht tot de runtime-bewerking klaar is</string> + <string name="main_wait_proton_install">Wacht tot de installatie van de compatibiliteitstool klaar is</string> + <string name="main_wait_desktop_install">Wacht tot de installatie van de desktop-app klaar is</string> + <string name="main_wait_install_game">Wacht tot de installatie klaar is voordat je een game start</string> + <string name="main_saves_close_session">Sluit eerst de Steam-sessie, zodat de game niet over de import heen kan opslaan</string> + <string name="main_saves_importing">Importeren in %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">%1$d bestand uit de %2$s geïmporteerd in %3$s</item> + <item quantity="other">%1$d bestanden uit de %2$s geïmporteerd in %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">%1$d bestand uit de %2$s geïmporteerd in %3$s. Oude savegames als back-up bewaard in Download/DroidDeck/Saves/backups</item> + <item quantity="other">%1$d bestanden uit de %2$s geïmporteerd in %3$s. Oude savegames als back-up bewaard in Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Kies een savegame-zip voor %1$s</string> + <string name="main_saves_exporting">%1$s exporteren</string> + <plurals name="main_saves_exported"> + <item quantity="one">%1$d bestand geëxporteerd als %2$s: %3$s</item> + <item quantity="other">%1$d bestanden geëxporteerd als %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Kies waar je %1$s wilt opslaan (%2$s)</string> + <string name="main_action_failed">%1$s mislukt: %2$s</string> + <string name="main_no_logs_yet">Nog geen sessielogs: start eerst een sessie.</string> + <string name="main_no_logs_to_clear">Geen sessielogs om te wissen.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">%1$d map met sessielogs gewist.</item> + <item quantity="other">%1$d mappen met sessielogs gewist.</item> + </plurals> + <string name="main_wadb_pair_failed">Koppelen voor draadloze foutopsporing mislukt</string> + <string name="main_wadb_command_failed">Opdracht voor draadloze foutopsporing mislukt</string> + <string name="main_wadb_unavailable">Draadloze foutopsporing is niet beschikbaar</string> + <string name="main_adb_copied">ADB-opdracht gekopieerd</string> + <string name="main_pick_roms">Kies de ROM-map</string> + <string name="main_non_adreno_title">Geen Adreno-GPU</string> + <string name="main_non_adreno_text">Turnip ondersteunt Adreno-GPU\'s. Op %1$s kan Steam een zwart scherm tonen. Download: %2$.0f MB.</string> + <string name="main_install_anyway">Toch installeren</string> + <string name="main_remove_runtime_title">Linux-runtime verwijderen</string> + <string name="main_remove_runtime_text">Hiermee verwijder je de runtime, de Steam-client erin en alle games die daar zijn geïnstalleerd.</string> + <string name="main_applied">Toegepast: %1$s</string> + <string name="android_app_open_failed_primary">Kan %1$s niet openen op het hoofdscherm</string> + <string name="android_app_open_failed_on">Kan %1$s niet openen op %2$s</string> + <string name="android_app_open_failed_display">Kan %1$s niet openen op scherm %2$d</string> + <string name="comp_busy_importing">Importeren</string> + <string name="comp_busy_swapping">Wisselen</string> + <string name="comp_busy_restoring">Herstellen</string> + <string name="comp_busy_cancelling">Annuleren</string> + <string name="comp_busy_deleting">Verwijderen</string> + <string name="comp_cannot_read">kan het bestand niet lezen</string> + <string name="comp_imported">%1$s geïmporteerd</string> + <string name="comp_swap_cancelled">De wachtende wissel is geannuleerd.</string> + <string name="comp_pick_wcp">Kies een componentpakket (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">De Nightlies zijn niet bereikbaar</string> + <string name="comp_stored">%1$s opgeslagen</string> + <string name="comp_download_failed">Downloaden mislukt: %1$s</string> + <string name="drivers_pick_linux">Kies een Linux-runtimedriver (-Linux-zip of Android + Linux-bundel)</string> + <string name="drivers_pick_android">Kies een weergavedriver (AdrenoTools-zip of Android + Linux-bundel)</string> + <string name="drivers_pick_any">Kies een driver-zip of een Android + Linux-bundel</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">%1$s verwijderen…</string> + <string name="main_forgetting_named">%1$s vergeten…</string> + <string name="main_pick_game_storage">Kies de map voor gameopslag</string> + <string name="main_pick_decky_zip">Kies een Decky-plug-in (ZIP)</string> + <string name="main_storage_not_usable">Niet bruikbaar: %1$s</string> + <string name="main_running_program">Programma</string> + <string name="main_removing_runtime">Linux-runtime verwijderen</string> + <string name="main_settings_main_screen">Kan Instellingen niet openen op het onderste scherm; geopend op het hoofdscherm.</string> + <string name="main_open_dev_options">Open Ontwikkelaarsopties in Instellingen</string> + + <string name="upd_unknown_apps_failed">Kan de Android-instelling “Onbekende apps installeren” niet openen</string> + <string name="upd_couldnt_check">Kan niet controleren: %1$s</string> + <string name="upd_no_download">Deze build heeft geen download voor deze versie van DroidDeck</string> + <string name="upd_stop_first">Stop eerst de actieve sessie en update daarna</string> + <string name="upd_stage_downloading">Downloaden</string> + <string name="upd_stage_installing">Installeren</string> + <string name="upd_stage_confirm">Wachten op je bevestiging</string> + <string name="upd_failed">De update is mislukt</string> + <string name="upd_not_offered">Android heeft niet aangeboden om de update te installeren</string> + + <string name="decky_install_failed">Installatie van Decky mislukt: %1$s</string> + <string name="decky_plugin_starting">Plug-in importeren…</string> + <string name="decky_plugin_failed">Importeren van plug-in mislukt: %1$s</string> + <string name="decky_plugin_installed">Plug-in geïnstalleerd. Start Steam opnieuw om hem te laden.</string> + + <string name="drivers_not_checked">Nog niet gecontroleerd - tik op vernieuwen om nieuwe drivers te zoeken</string> + <string name="drivers_bundle_sets_display">Android + Linux: stelt ook de weergavedriver in</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: stelt ook de runtimedriver in</string> + <string name="drivers_runtime_builtin">de Turnip die in de runtime is ingebouwd</string> + <string name="drivers_system_vulkan">systeem-Vulkan: geen meegeleverde build voor deze GPU</string> + <string name="drivers_bundled">%1$s (meegeleverd)</string> + <string name="drivers_manual">Handmatig</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Er is momenteel maar één helft gepubliceerd</string> + <string name="drivers_pair_size">%1$.0f MB voor beide</string> + <string name="drivers_none_to_set">Geen drivers om in te stellen: %1$s</string> + <string name="drivers_checking_latest">Nieuwste drivers zoeken…</string> + <string name="drivers_up_to_date_check_failed">Up-to-date (kan niet controleren: %1$s)</string> + <string name="drivers_recommended_unpublished">De aanbevolen drivers zijn momenteel niet gepubliceerd</string> + <string name="drivers_downloading_pair">%1$s %2$s downloaden…</string> + <string name="drivers_updated_to">Geüpdatet naar %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Geüpdatet naar %1$s %2$s. De weergavedriver werkt na een herstart van DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Driverupdates wachten tot de sessie stopt.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s wordt gedownload zodra je van mobiele data en batterijbesparing af bent.</string> + <string name="drivers_skipping_bad">%1$s %2$s startte hier geen sessie, dus Automatisch blijft bij de drivers die dat wel deden.</string> + <string name="drivers_rolled_back">%1$s startte twee keer geen sessie, dus Automatisch ging terug naar de drivers die werkten.</string> + <string name="drivers_switched_to">Overgeschakeld naar %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Overgeschakeld naar %1$s %2$s. De weergavedriver werkt na een herstart van DroidDeck.</string> + <string name="drivers_using">%1$s %2$s wordt gebruikt.</string> + <string name="drivers_using_restart">%1$s %2$s wordt gebruikt. De weergavedriver werkt na een herstart van DroidDeck.</string> + <string name="drivers_using_quest">De meegeleverde Quest-beelddriver en de standaard runtime worden gebruikt.</string> + <string name="drivers_using_quest_restart">De meegeleverde Quest-beelddriver en de standaard runtime worden gebruikt. De beelddriver geldt na een herstart van DroidDeck.</string> + <string name="drivers_not_a_driver">Geen driver-zip: geen AdrenoTools-driver, geen -Linux-Turnip en geen Android + Linux-bundel</string> + <string name="drivers_import_failed">Importeren mislukt: %1$s</string> + <string name="drivers_imported_unnamed">Geïmporteerde driver</string> + <string name="drivers_using_bundle">%1$s wordt gebruikt als runtime- én weergavedriver.</string> + <string name="drivers_using_bundle_restart">%1$s wordt gebruikt als runtime- én weergavedriver. De weergavedriver werkt na een herstart van DroidDeck.</string> + <string name="drivers_deleted_bundle">%1$s verwijderd (beide drivers)</string> + <string name="drivers_deleted">%1$s verwijderd</string> + <string name="drivers_release_status">Nieuwste: %1$s · gecontroleerd %2$s</string> + <string name="drivers_release_status_failed">Nieuwste: %1$s · %2$s onbereikbaar · gecontroleerd %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d min geleden</item> + <item quantity="other">%1$d min geleden</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d u geleden</item> + <item quantity="other">%1$d u geleden</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d dag geleden</item> + <item quantity="other">%1$d dagen geleden</item> + </plurals> + <string name="drivers_checking_sources">Banners-Turnip, WinNative en DroidDeck controleren…</string> + <string name="drivers_check_failed">controle mislukt</string> + <string name="drivers_installed_pick_either">%1$s geïnstalleerd - kies hem in een van beide lijsten om beide drivers in te stellen</string> + <string name="drivers_installed_pick">%1$s geïnstalleerd - kies hem in het menu</string> + + <string name="session_wait_removal">Wacht tot de runtime is verwijderd</string> + <string name="session_title_game">Game</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">direct</string> + <string name="session_swap_failed">Wisselen mislukt: %1$s</string> + <string name="session_profile_save_failed">Profiel opslaan mislukt: %1$s</string> + <string name="session_desktop_paused">De desktop is gepauzeerd</string> + <string name="session_named_paused">%1$s is gepauzeerd</string> + <string name="session_program_paused">Het programma is gepauzeerd</string> + <string name="session_starting_desktop">Desktop wordt gestart</string> + <string name="session_starting_named">%1$s wordt gestart</string> + <string name="session_starting_program">Programma wordt gestart</string> + <string name="session_no_logs">Geen logs voor deze sessie.</string> + <string name="session_logs_archive_failed">Kan het archief met sessielogs niet maken.</string> + <string name="session_logs_share_failed">Kan de sessielogs niet delen.</string> + <string name="session_starting_session">Sessie wordt gestart…</string> + <string name="session_runtime_downloading">Linux-runtime downloaden</string> + <string name="session_runtime_downloading_mb">Linux-runtime downloaden · %1$d van %2$d MB</string> + <string name="session_runtime_checking">Linux-runtime controleren</string> + <string name="session_runtime_unpacking">Linux-runtime uitpakken</string> + <string name="session_desktop_downloading">desktop downloaden</string> + <string name="session_desktop_downloading_mb">desktop downloaden · %1$d van %2$d MB</string> + <string name="session_desktop_checking">desktop controleren</string> + <string name="session_desktop_unpacking">desktop uitpakken</string> + <string name="session_proton_downloading">Proton Experimental (ARM64) downloaden</string> + <string name="session_proton_downloading_mb">Proton Experimental (ARM64) downloaden · %1$d van %2$d MB</string> + <string name="session_proton_checking">Proton Experimental (ARM64) controleren</string> + <string name="session_proton_unpacking">Proton Experimental (ARM64) uitpakken</string> + <string name="session_runtime_catalog_unreachable">Kan de runtimecatalogus niet bereiken. Controleer de verbinding en druk opnieuw op Spelen.</string> + <string name="session_runtime_install_failed">De Linux-runtime is niet geïnstalleerd. Controleer de runtime bij Installatie en druk opnieuw op Spelen.</string> + <string name="session_desktop_install_failed">De desktop is niet geïnstalleerd (%1$s). Controleer de verbinding en druk opnieuw op Desktop.</string> + <string name="session_ended_named">%1$s is onverwacht gestopt. Deel de logs in een bugrapport of probeer het opnieuw.</string> + <string name="session_ended_program">Het programma is onverwacht gestopt. Deel de logs in een bugrapport of probeer het opnieuw.</string> + <string name="session_ended_desktop">De desktop is onverwacht gestopt. Deel de logs in een bugrapport of probeer het opnieuw.</string> + <string name="session_ended_detail">Afsluitstatus %1$d · %2$s</string> + <string name="session_ended_no_log">geen log</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Het log toont %1$d fout “Function not implemented”: de seccomp-versnelling van proot laat op dit apparaat een hulpprogramma falen. Probeer %2$s → “%3$s” (of “%4$s”) en start opnieuw.</item> + <item quantity="other">Het log toont %1$d fouten “Function not implemented”: de seccomp-versnelling van proot laat op dit apparaat een hulpprogramma falen. Probeer %2$s → “%3$s” (of “%4$s”) en start opnieuw.</item> + </plurals> + + <string name="mode_decky_plugins">Plug-ins</string> + <string name="mode_decky_plugins_hint">Installeer een plug-in-ZIP voor de volgende Steam-sessie.</string> + <string name="mode_decky_plugin_downloading">Downloaden…</string> + <string name="mode_decky_plugin_install_zip">Installeren uit ZIP</string> + <string name="store_cat_games">Games</string> + <string name="store_cat_audio_video">Audio & video</string> + <string name="store_cat_graphics">Grafisch</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Kantoor</string> + <string name="store_cat_developer">Ontwikkeling</string> + <string name="store_cat_education">Onderwijs</string> + <string name="store_cat_science">Wetenschap</string> + <string name="store_cat_system">Systeem</string> + <string name="store_cat_utilities">Hulpprogramma\'s</string> + <string name="store_section_popular">Populair</string> + <string name="store_section_trending">In opkomst</string> + <string name="store_section_new">Nieuw</string> + <string name="store_section_updated">Bijgewerkt</string> + <string name="store_section_loading">laden…</string> + <string name="store_flatpak_setup">Flatpak instellen</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Kan Flathub niet controleren op updates</string> + <string name="content_rom_installed">geïnstalleerd</string> + <string name="content_rom_folder">map</string> + <string name="theme_graphite">Grafiet</string> + <string name="theme_graphite_detail">Grafietkleurige vlakken, met het eigen bolblauw van het logo voor alles wat geselecteerd, gefocust of ingedrukt is.</string> + <string name="theme_paper">Papier op zwart</string> + <string name="theme_paper_detail">Wit is de hoofdkleur, het blauw van het pictogram is het signaal voor lijnen, ringen en stippen.</string> + <string name="theme_icon_blue">Pictogramblauw</string> + <string name="theme_icon_blue_detail">Zwarte achtergrond, witte tekst, het blauw voor alles wat geselecteerd, gefocust of ingedrukt is.</string> + <string name="theme_electric">Elektrisch marineblauw</string> + <string name="theme_electric_detail">Het blauw feller, op vlakken die naar marineblauw neigen in plaats van grijs.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Spatie</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Installeer eerst de runtime</string> + <string name="game_sync_err_steam_library">Steam-bibliotheek is niet beschikbaar</string> + <string name="game_sync_err_previous_sd">Vorige SD-bibliotheek is niet beschikbaar</string> + <string name="game_sync_err_game_storage">Gameopslag is niet beschikbaar</string> + <string name="game_sync_err_added_games">Map met toegevoegde games is niet beschikbaar</string> + <string name="game_sync_err_manifests">Steam-manifesten zijn niet beschikbaar</string> + <string name="content_system_many">Veel systemen</string> + <string name="fm_drive_internal">Intern</string> + <string name="fm_drive_linux">Linux-systeem</string> + <string name="fm_drive_sd">SD-kaart</string> + <string name="fm_drive_storage">Opslag</string> + <string name="fm_select">Selecteren</string> + <string name="fm_properties">Eigenschappen</string> + <string name="fm_favorite_add">Toevoegen aan favorieten</string> + <string name="fm_favorite_remove">Verwijderen uit favorieten</string> + <string name="fm_rename">Naam wijzigen</string> + <string name="fm_copy">Kopiëren</string> + <string name="fm_cut">Knippen</string> + <string name="fm_actions">Acties</string> + <string name="fm_favorites">Favorieten</string> + <string name="fm_pin_current">Huidige map vastzetten</string> + <string name="fm_no_favorites">Nog geen favorieten - zet een map vast via het ⋮-menu om hier snel naar terug te gaan.</string> + <string name="fm_unpin_favorite">Verwijderen uit favorieten</string> + <string name="fm_size_zero">0 bytes</string> + <string name="fm_unit_bytes">bytes</string> + <string name="fm_prop_location">Locatie</string> + <string name="fm_prop_type">Type</string> + <string name="fm_prop_size">Grootte</string> + <string name="fm_prop_modified">Gewijzigd</string> + <string name="fm_type_folder">Map</string> + <string name="fm_type_file">Bestand</string> + <string name="fm_type_ext_file">%1$s-bestand</string> + <string name="fm_read_only">Alleen-lezen</string> + <string name="fm_read_only_hint">Voorkomt dat games (en Wine) dit bestand overschrijven of verwijderen.</string> + <string name="fm_read_only_failed">Kan Alleen-lezen niet wijzigen</string> + <string name="fm_hidden">Verborgen</string> + <string name="fm_hidden_unsupported">Deze opslag kan de verborgen-markering niet opslaan.</string> + <string name="fm_hidden_hint">Markeert het bestand als verborgen in Windows (het verborgen-kenmerk van Wine).</string> + <string name="fm_hidden_failed">Kan Verborgen niet wijzigen op deze opslag</string> + <string name="fm_done">Klaar</string> + <string name="fm_op_deleting">Verwijderen...</string> + <string name="fm_delete_failed">Verwijderen mislukt</string> + <string name="fm_op_moving">Verplaatsen...</string> + <string name="fm_op_copying">Kopiëren...</string> + <string name="fm_op_moving_item">Verplaatsen - %1$s</string> + <string name="fm_op_copying_item">Kopiëren - %1$s</string> + <string name="fm_op_moving_batch">Verplaatsen %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Kopiëren %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d klaar, %2$d mislukt</string> + <string name="fm_paste_skipped">%1$d klaar, %2$d overgeslagen</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d item verplaatst</item> + <item quantity="other">%1$d items verplaatst</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d item gekopieerd</item> + <item quantity="other">%1$d items gekopieerd</item> + </plurals> + <string name="fm_already_exists">“%1$s” bestaat al</string> + <string name="fm_op_renaming">Naam wijzigen...</string> + <string name="fm_rename_failed">Naam wijzigen mislukt</string> + <string name="fm_op_creating_folder">Map maken...</string> + <string name="fm_create_folder_failed">Kan map niet maken</string> + <string name="fm_new_folder">Nieuwe map</string> + <string name="fm_folder_name">Mapnaam</string> + <string name="fm_create">Maken</string> + <string name="fm_new_name">Nieuwe naam</string> + <string name="fm_delete_title">Verwijderen?</string> + <string name="fm_delete_text">“%1$s” definitief verwijderen?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">%1$d item verwijderen?</item> + <item quantity="other">%1$d items verwijderen?</item> + </plurals> + <string name="fm_cannot_undo">Dit kan niet ongedaan worden gemaakt.</string> + <plurals name="fm_and_more"> + <item quantity="one">…en nog %1$d</item> + <item quantity="other">…en nog %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">Verwijderen %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d kon niet worden verwijderd</item> + <item quantity="other">%1$d konden niet worden verwijderd</item> + </plurals> + <string name="fm_conflict_merge_hint">Samenvoegen voegt bestanden toe aan de bestaande map en vervangt ze daar.</string> + <string name="fm_conflict_overwrite_hint">Overschrijven vervangt het bestaande bestand.</string> + <string name="fm_conflict_apply_all">Toepassen op alle conflicten</string> + <string name="fm_conflict_merge">Samenvoegen</string> + <string name="fm_conflict_overwrite">Overschrijven</string> + <string name="fm_conflict_keep_both">Beide behouden</string> + <string name="fm_conflict_skip">Overslaan</string> + <string name="fm_select_this_folder">Deze map selecteren</string> + <string name="fm_back">Terug</string> + <string name="fm_drive_not_readable">%1$s is gekoppeld, maar nu niet leesbaar</string> + <string name="fm_list_view">Lijstweergave</string> + <string name="fm_grid_view">Rasterweergave</string> + <string name="fm_search">Zoeken</string> + <string name="fm_sort">Sorteren</string> + <string name="fm_sort_name">Naam</string> + <string name="fm_sort_date">Datum gewijzigd</string> + <string name="fm_rows_comfortable">Ruime rijen</string> + <string name="fm_rows_compact">Compacte rijen</string> + <string name="fm_hide_hidden">Verborgen bestanden verbergen</string> + <string name="fm_show_hidden">Verborgen bestanden tonen</string> + <string name="fm_hide_favorites">Favorieten verbergen</string> + <string name="fm_show_favorites">Favorieten tonen</string> + <string name="fm_filter_folder">Deze map filteren</string> + <string name="fm_free_space">%1$s vrij</string> + <string name="fm_selected_count">%1$d geselecteerd</string> + <string name="fm_select_none">Geen</string> + <string name="fm_select_all">Alle</string> + <string name="fm_paste">Plakken</string> + <plurals name="fm_items"> + <item quantity="one">%1$d item</item> + <item quantity="other">%1$d items</item> + </plurals> + <string name="fm_paste_here">%1$s hier plakken</string> + <string name="fm_paste_move_here">%1$s hier plakken (verplaatsen)</string> + <string name="fm_rail_title">Bestanden</string> + <string name="fm_rail_storage">OPSLAG</string> + <string name="fm_rail_quick">SNEL</string> + <string name="fm_rail_favorites">FAVORIETEN</string> + <string name="fm_rail_downloads">Downloads</string> + <string name="fm_rail_downloads_short">Downlds</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Sessielogs</string> + <string name="fm_rail_pictures">Afbeeldingen</string> + <string name="fm_favorite_added">“%1$s” toegevoegd aan favorieten</string> + <string name="fm_favorite_removed">“%1$s” verwijderd uit favorieten</string> + <string name="fm_empty_directory">Lege map</string> + <string name="fm_up_one_level">Eén niveau omhoog</string> + <string name="fm_choose_folder">Kies een map</string> + <string name="fm_choose_file">Kies een bestand</string> + <string name="ctrl_tint_steam_blue">Steam-blauw</string> + <string name="ctrl_tint_sky">Hemelsblauw</string> + <string name="ctrl_tint_white">Wit</string> + <string name="ctrl_tint_violet">Violet</string> + <string name="ctrl_tint_green">Groen</string> + <string name="ctrl_tint_amber">Amber</string> + <string name="ctrl_tint_red">Rood</string> + <string name="ctrl_tint_pink">Roze</string> + <string name="ctrl_button_a">A-knop</string> + <string name="ctrl_button_b">B-knop</string> + <string name="ctrl_button_x">X-knop</string> + <string name="ctrl_button_y">Y-knop</string> + <string name="ctrl_button_lb">Linkerbumper</string> + <string name="ctrl_button_rb">Rechterbumper</string> + <string name="ctrl_button_lt">Linkertrigger</string> + <string name="ctrl_button_rt">Rechtertrigger</string> + <string name="ctrl_button_view">Weergaveknop</string> + <string name="ctrl_button_menu">Menuknop</string> + <string name="ctrl_target_view">Weergave</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad omhoog</string> + <string name="ctrl_target_down">D-pad omlaag</string> + <string name="ctrl_target_left">D-pad links</string> + <string name="ctrl_target_right">D-pad rechts</string> + <string name="ctrl_target_hidden">Verborgen</string> + <string name="ctrl_editor_drag">Sleep om te verplaatsen</string> + <string name="ctrl_editor_snap">Uitlijnen</string> + <string name="ctrl_editor_save">Opslaan</string> + <string name="second_mode_none">Geen</string> + <string name="second_mode_keyboard_trackpad">Toetsenbord + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Deck-grepen + trackpads</string> + + <string name="rtinst_removing">Linux-runtime verwijderen</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Linux-runtime verwijderen · %1$d item</item> + <item quantity="other">Linux-runtime verwijderen · %1$d items</item> + </plurals> + <string name="rtinst_removed">Linux-runtime verwijderd</string> + <string name="rtinst_removal_failed">Kan het verwijderen van de Linux-runtime niet voltooien. Probeer het opnieuw bij Installatie.</string> + <string name="rtinst_removing_leftovers">Restanten van de runtime verwijderen</string> + <string name="rtinst_downloading">Downloaden</string> + <string name="rtinst_verifying">Verifiëren</string> + <string name="rtinst_extracting">Uitpakken</string> + <string name="rtinst_channel_description">Verschijnt tijdens het installeren of verwijderen van de Linux-runtime</string> + <string name="rtinst_title_installing">Linux-runtime installeren</string> + <string name="rtinst_title_removing">Linux-runtime verwijderen</string> + + <string name="deskpkg_runtime_missing">De Linux-runtime is niet geïnstalleerd</string> + <string name="deskpkg_no_checksum">De catalogus heeft geen checksum voor %1$s</string> + <string name="deskpkg_checksum_mismatch">Checksum komt niet overeen - er is niets gewijzigd</string> + <string name="deskpkg_installing">%1$s installeren</string> + <string name="deskpkg_place_failed">Kan de AppImage niet plaatsen</string> + <string name="deskpkg_extract_failed">Uitpakken mislukt</string> + <string name="deskpkg_install_failed">Installatie mislukt</string> + + <string name="flatpakmgr_setup_failed">Flatpak instellen mislukt (exitcode %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Flatpak instellen is niet voltooid</string> + <string name="flatpakmgr_busy">Er loopt al een andere winkeltaak</string> + <string name="flatpakmgr_not_ready">Stel eerst Flatpak in</string> + <string name="flatpakmgr_starting">Starten</string> + <string name="flatpakmgr_exit_status">Flatpak is gestopt met status %1$d</string> + <string name="flatpakmgr_installing">%1$s installeren</string> + <string name="flatpakmgr_updating">%1$s updaten</string> + <string name="flatpakmgr_removing">%1$s verwijderen</string> + <string name="flatpakmgr_installing_step">%1$s installeren (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">%1$s updaten (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">%1$s verwijderen (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">vertalingen</string> + <string name="flatpakmgr_ref_graphics_drivers">grafische drivers</string> + <string name="flatpakmgr_ref_media_codecs">mediacodecs</string> + <string name="flatpakmgr_ref_runtime">%1$s-runtime</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s-runtime %2$s</string> + + <string name="appimg_too_small">Het bestand is te klein voor een AppImage</string> + <string name="appimg_unreadable">Het bestand kan niet worden gelezen: %1$s</string> + <string name="appimg_not_linux">Dit is geen AppImage (het is geen Linux-programma)</string> + <string name="appimg_wrong_arch">Deze AppImage is niet gebouwd voor ARM64 (aarch64) of x86-pc\'s</string> + <string name="appimg_not_appimage">Dit is een Linux-programma, maar geen AppImage</string> + <string name="appimg_wrong_type">Alleen AppImages van type 2 kunnen worden geïmporteerd (deze is type %1$d)</string> + <string name="appimg_no_space_import">Niet genoeg vrije ruimte: importeren vraagt ongeveer %1$s</string> + <string name="appimg_no_space_update">Niet genoeg vrije ruimte: updaten vraagt ongeveer %1$s</string> + <string name="appimg_import_failed">Importeren mislukt</string> + <string name="appimg_gone">Die AppImage bestaat niet meer</string> + <string name="appimg_update_failed">Update mislukt</string> + <string name="appimg_extracting">%1$s uitpakken</string> + <string name="appimg_extract_failed">De AppImage kan niet worden uitgepakt</string> + <string name="appimg_extract_failed_detail">De AppImage kan niet worden uitgepakt: %1$s</string> + + <string name="deckymgr_stop_session_loader">Stop de actieve sessie voordat je Decky Loader installeert</string> + <string name="deckymgr_download_failed">Downloaden van Decky Loader mislukt</string> + <string name="deckymgr_size_mismatch">De grootte van Decky Loader kwam niet overeen met de metadata van de release</string> + <string name="deckymgr_checksum_download_failed">Kan de checksum van de release niet downloaden</string> + <string name="deckymgr_checksum_missing">Checksum van de release ontbreekt</string> + <string name="deckymgr_checksum_invalid">Checksum van de release is ongeldig</string> + <string name="deckymgr_checksum_mismatch">Checksum van Decky Loader komt niet overeen</string> + <string name="deckymgr_not_elf">Release-bestand is geen compatibel 64-bit Linux-programma</string> + <string name="deckymgr_session_started_loader">Er is een sessie gestart tijdens het downloaden; stop die voordat je Decky Loader installeert</string> + <string name="deckymgr_loader_not_executable">Kan PluginLoader niet als uitvoerbaar markeren</string> + <string name="deckymgr_cef_failed">Kan foutopsporing op afstand voor Steam CEF niet inschakelen</string> + <string name="deckymgr_stage_failed">Kan PluginLoader niet klaarzetten</string> + <string name="deckymgr_loader_preserve_failed">Kan de bestaande PluginLoader niet behouden</string> + <string name="deckymgr_loader_activate_failed">Kan de nieuwe PluginLoader niet activeren</string> + <string name="deckymgr_stop_session_plugin">Stop de actieve sessie voordat je een plug-in installeert</string> + <string name="deckymgr_loader_required">Installeer Decky Loader voordat je een plug-in importeert</string> + <string name="deckymgr_zip_unreadable">Kan het geselecteerde zip-bestand niet lezen</string> + <string name="deckymgr_plugins_dir_failed">Kan de map voor Decky-plug-ins niet maken</string> + <string name="deckymgr_extracting_zip">Zip-bestand van de plug-in uitpakken</string> + <string name="deckymgr_zip_one_folder">Het zip-bestand van de plug-in moet precies één hoofdmap met de plug-in bevatten</string> + <string name="deckymgr_zip_missing_files">In het zip-bestand van de plug-in ontbreekt plugin.json, package.json of dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Naam van de plug-in ontbreekt</string> + <string name="deckymgr_session_started_plugin">Er is een sessie gestart tijdens de installatie; stop die voordat je een plug-in installeert</string> + <string name="deckymgr_plugin_installed">Plug-in geïnstalleerd · start Steam opnieuw om hem te laden</string> + <string name="deckymgr_plugin_install_failed">Installeren van het zip-bestand van de plug-in is mislukt</string> + <string name="deckymgr_zip_too_many">Het zip-bestand van de plug-in bevat te veel items</string> + <string name="deckymgr_zip_invalid_path">Het zip-bestand van de plug-in bevat een ongeldig pad</string> + <string name="deckymgr_zip_duplicate_paths">Het zip-bestand van de plug-in bevat dubbele paden</string> + <string name="deckymgr_zip_unsafe_path">Het zip-bestand van de plug-in bevat een onveilig pad</string> + <string name="deckymgr_folder_failed">Kan de map van de plug-in niet maken</string> + <string name="deckymgr_zip_too_large">Het zip-bestand van de plug-in is na uitpakken groter dan de limiet van 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Kan het meegeleverde binaire bestand van de plug-in niet als uitvoerbaar markeren</string> + <string name="deckymgr_remote_entry_invalid">Ongeldig remote_binary-item</string> + <string name="deckymgr_remote_name_invalid">Ongeldige naam voor extern binair bestand</string> + <string name="deckymgr_remote_url_https">De URL van het externe binaire bestand moet HTTPS gebruiken</string> + <string name="deckymgr_remote_hash_invalid">Extern binair bestand %1$s heeft een ongeldige SHA-256-hash</string> + <string name="deckymgr_bin_dir_failed">Kan de bin-map van de plug-in niet maken</string> + <string name="deckymgr_downloading_binary">Binair bestand van de plug-in downloaden · %1$s</string> + <string name="deckymgr_binary_download_failed">Kan het binaire bestand van de plug-in %1$s niet downloaden</string> + <string name="deckymgr_binary_checksum_mismatch">Checksum van het binaire bestand van de plug-in komt niet overeen · %1$s</string> + <string name="deckymgr_binary_not_executable">Kan het binaire bestand van de plug-in niet als uitvoerbaar markeren · %1$s</string> + <string name="deckymgr_binary_replace_failed">Kan het binaire bestand van de plug-in niet vervangen · %1$s</string> + <string name="deckymgr_binary_install_failed">Kan het binaire bestand van de plug-in niet installeren · %1$s</string> + <string name="deckymgr_folder_taken">Deze map hoort al bij een andere plug-in</string> + <string name="deckymgr_preserve_failed">Kan de bestaande plug-in niet behouden</string> + <string name="deckymgr_activate_failed">Kan de geïmporteerde plug-in niet activeren</string> + <string name="deckymgr_settings_failed">Kan de instellingen van de Decky-plug-in niet bijwerken</string> + <string name="deckymgr_restore_failed">Kan de bestaande plug-in niet herstellen</string> + + <string name="adbfix_save_failed">Kan de identiteit voor draadloze foutopsporing niet opslaan</string> + <string name="adbfix_command_failed">ADB-opdracht mislukt (%1$d)</string> + <string name="adbfix_not_confirmed">Android heeft niet bevestigd dat de limiet voor onderliggende processen is gewijzigd: %1$s</string> + <string name="adbfix_no_pairing">Er is geen koppeling voor draadloze foutopsporing opgeslagen</string> + <string name="adbfix_enter_address">Voer het huidige IP-adres en de poort voor draadloze foutopsporing in</string> + + <string name="adbpair_timed_out">Wachten op de pop-up met de koppelcode duurde te lang. Probeer het opnieuw vanuit DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Kan niet naar de pop-up met de koppelcode zoeken (%1$d). Controleer of wifi aan staat.</string> + <string name="adbpair_discovery_failed">Kan niet naar de pop-up met de koppelcode zoeken: %1$s</string> + <string name="adbpair_six_digits">Voer alle 6 cijfers van de code in</string> + <string name="adbpair_pairing">Koppelen…</string> + <string name="adbpair_code_rejected">Die code werkte niet. Open de pop-up met de koppelcode opnieuw en voer de nieuwe code in.</string> + <string name="adbpair_connecting">Gekoppeld. Verbinden…</string> + <string name="adbpair_port_not_found">Gekoppeld, maar de poort voor draadloze foutopsporing is niet gevonden. Laat draadloze foutopsporing aan staan en probeer het opnieuw.</string> + <string name="adbpair_applying">Instelling toepassen…</string> + <string name="adbpair_command_failed">Opdracht voor draadloze foutopsporing mislukt</string> + <string name="adbpair_channel_name">Draadloze foutopsporing instellen</string> + <string name="adbpair_channel_description">Vraagt om de koppelcode voor draadloze foutopsporing terwijl Instellingen open is</string> + <string name="adbpair_title_pair">Draadloze foutopsporing koppelen</string> + <string name="adbpair_waiting_text">Schakel draadloze foutopsporing in en tik vervolgens op “Apparaat koppelen met koppelcode”.</string> + <string name="adbpair_waiting_long">Schakel draadloze foutopsporing in en tik vervolgens op “Apparaat koppelen met koppelcode”. Blijf in Instellingen: de code komt in deze melding.</string> + <string name="adbpair_code_label">Koppelcode van 6 cijfers</string> + <string name="adbpair_code_hint">Tik op Code invoeren en typ de 6 cijfers die in Instellingen worden getoond.</string> + <string name="adbpair_title_code">Voer de Wi-Fi-koppelcode in</string> + <string name="adbpair_title_retry">Probeer de code opnieuw</string> + <string name="adbpair_enter_code">Code invoeren</string> + <string name="adbpair_title_working">Steam instellen</string> + <string name="adbpair_title_done">Steam is klaar</string> + <string name="adbpair_done_text">Tik om terug te gaan naar DroidDeck. Je kunt draadloze foutopsporing nu uitschakelen.</string> + <string name="adbpair_title_failed">Instellen van draadloze foutopsporing gestopt</string> + + <string name="selfinst_download_failed">Downloaden mislukt</string> + <string name="selfinst_size_mismatch">De downloadgrootte kwam niet overeen met de gepubliceerde APK en is verwijderd - probeer het opnieuw</string> + <string name="selfinst_checksum_mismatch">De download kwam niet overeen met de checksum en is verwijderd - probeer het opnieuw</string> + <string name="selfinst_wrong_package">De update is voor Android-package %1$s, niet voor %2$s</string> + <string name="selfinst_metadata_signer">De metadata van de update vermeldt niet de ondertekeningssleutel van DroidDecks release</string> + <string name="selfinst_unreadable">Android kon de gedownloade APK niet lezen</string> + <string name="selfinst_apk_wrong_package">De gedownloade APK is voor %1$s, niet voor %2$s</string> + <string name="selfinst_version_mismatch">De gedownloade APK geeft versionCode %1$d aan, niet de gepubliceerde %2$d</string> + <string name="selfinst_downgrade">Android installeert versionCode %1$d niet over de geïnstalleerde %2$d heen</string> + <string name="selfinst_no_signing">De gedownloade APK heeft geen ondertekeningsinformatie</string> + <string name="selfinst_wrong_signer">De gedownloade APK is niet ondertekend met de release-sleutel van DroidDeck</string> + <string name="appupd_http">De updatecatalogus antwoordde met HTTP %1$d</string> + + <string name="loadstate_starting">Sessie wordt gestart…</string> + <string name="loadstate_elapsed">%1$d:%2$02d verstreken · nog bezig</string> + <string name="loadstate_steam_update">Update van de Steam-client downloaden · %1$d%%</string> + <string name="loadstate_steam_client">Steam-client downloaden · %1$s</string> + + <string name="pextra_busy">Er wordt al een compatibiliteitstool geïnstalleerd</string> + <string name="pextra_stop_session">Stop de actieve sessie voordat je compatibiliteitstools installeert</string> + <string name="pextra_no_release">Kan geen ARM64-release vinden voor %1$s</string> + <string name="pextra_no_space">Om %1$s te installeren is minstens 4 GB vrije ruimte nodig, plus de downloadgrootte</string> + <string name="pextra_downloading">%1$s %2$s downloaden</string> + <string name="pextra_retrying">Download opnieuw proberen · poging %1$d van %2$d</string> + <string name="pextra_interrupted">Download onderbroken</string> + <string name="pextra_download_failed">Download mislukt; het deelbestand is bewaard zodat een nieuwe poging kan worden hervat</string> + <string name="pextra_too_big">Download was groter dan de release en is verwijderd</string> + <string name="pextra_incomplete">Download was niet volledig; het deelbestand is bewaard zodat de poging kan worden hervat</string> + <string name="pextra_verifying">Download verifiëren</string> + <string name="pextra_checksum_unreadable">Kan de checksum van de release niet lezen; probeer het opnieuw</string> + <string name="pextra_no_checksum">%1$s %2$s publiceert geen checksum; er is niets geïnstalleerd</string> + <string name="pextra_checksum_mismatch">Checksum komt niet overeen; de download is verwijderd</string> + <string name="pextra_session_started">Er is een sessie gestart tijdens het downloaden; stop die voordat je compatibiliteitstools installeert</string> + <string name="pextra_installing">%1$s installeren</string> + <string name="pextra_install_failed">Installeren van %1$s is mislukt (afsluitcode %2$d)</string> + <string name="pextra_could_not_install">Kan %1$s niet installeren</string> + <string name="esync_fetching">Pakket droiddeck-esync ophalen</string> + + <string name="cmgr_fex_linux_helpers">met Linux-hulpprogramma’s</string> + <string name="cmgr_fex_dlls_only">Alleen DLL’s</string> + <string name="cmgr_original_proton_updated">Origineel (Proton bijgewerkt sinds de laatste wissel)</string> + <string name="cmgr_changed_outside">Gewijzigd buiten Componenten</string> + <string name="cmgr_not_present">niet aanwezig</string> + <string name="cmgr_original_version">Origineel %1$s</string> + <string name="cmgr_original_from">Origineel van %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s wordt in %3$s geplaatst zodra de game die erop draait, wordt afgesloten.</string> + <string name="cmgr_swap_done">%1$s %2$s staat nu in %3$s. Dit wordt toegepast bij de volgende gamestart.</string> + <string name="cmgr_original_missing">Die originele bundel is niet opgeslagen</string> + <string name="cmgr_restore_queued">%1$s van %2$s gaat terug naar het origineel zodra de game die erop draait, wordt afgesloten.</string> + <string name="cmgr_restore_done">%1$s van %2$s is hersteld vanuit het %3$s-origineel.</string> + <string name="cmgr_package_in_use">%1$s is in gebruik in %2$s. Wissel die Proton eerst naar iets anders.</string> + <string name="cmgr_package_not_stored">%1$s is niet opgeslagen</string> + <string name="cmgr_deleted">%1$s verwijderd.</string> + <string name="cmgr_original_kept">Het origineel van de geïnstalleerde build wordt bewaard: dat is de weg terug.</string> + <string name="cmgr_not_stored">Niet opgeslagen</string> + <string name="cmgr_deleted_original">Het %1$s-origineel van %2$s is verwijderd.</string> + <string name="cmgr_nightlies_only">Downloads komen alleen van de Nightlies-releases</string> + <string name="cmgr_list_predates_checksums">Deze pakketlijst is ouder dan de checksums - vernieuw de lijst en probeer het opnieuw</string> + <string name="cmgr_checksum_mismatch">Checksum komt niet overeen</string> + + <string name="sprefs_upscaler_linear">Lineair</string> + <string name="sprefs_upscaler_nearest">Dichtstbijzijnde</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (kwaliteit)</string> + <string name="sprefs_upscaler_sharpen">Alleen verscherpen</string> + <string name="sprefs_lod_bias_auto">Automatisch (volgt de schaling)</string> + + <string name="look_off_desc">Niets toegepast.</string> + <string name="look_game_clarity">Game-helderheid</string> + <string name="look_game_clarity_desc">Verscherpen met een vleugje contrast - de dagelijkse optie.</string> + <string name="look_vivid">Levendig</string> + <string name="look_vivid_desc">Kleur flink opgevoerd. Deband staat aan zodat luchten niet strepen.</string> + <string name="look_cinematic">Cinematisch</string> + <string name="look_cinematic_desc">Dieper contrast, koelere kleur, randen afgevlakt.</string> + <string name="look_competitive">Competitief</string> + <string name="look_competitive_desc">Schaduwen opgelicht en zware verscherping - zie anderen als eerste.</string> + <string name="look_adaptive_sharpen">Adaptief verscherpen</string> + <string name="look_adaptive_sharpen_desc">Alleen verscherpen, kleur ongewijzigd.</string> + <string name="look_filmic">Filmisch</string> + <string name="look_filmic_desc">Filmachtige curve, licht gedempt.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Luid en krachtig.</string> + <string name="look_retro_crt">Retro CRT</string> + <string name="look_retro_crt_desc">De CRT-buis en het analoge signaal samen toegepast.</string> + <string name="look_upscale_sharp">Scherp opschalen</string> + <string name="look_upscale_sharp_desc">Voor gebruik onder de schermresolutie.</string> + <string name="look_pixel_clean">Scherpe pixels</string> + <string name="look_pixel_clean_desc">Scherpe pixels voor 2D- en oudere games.</string> + <string name="look_anime_edge">Anime-lijnen</string> + <string name="look_anime_edge_desc">Contourlijnen plus verscherping.</string> + + <string name="gpuinfo_not_adreno">Geen Adreno-GPU</string> + <string name="gpuinfo_supported">Ondersteund</string> + <string name="gpuinfo_experimental">Experimenteel: de drivers zijn testbuilds</string> + <string name="gpuinfo_below_tested">Onder de geteste hardware (Adreno 725 en nieuwer): werkt mogelijk niet</string> + <string name="gpuinfo_unsupported">Niet ondersteund: DroidDeck heeft een Adreno-GPU (Snapdragon) nodig</string> + + <string name="turnip_rate_limited">De ratelimiet van GitHub is bereikt - probeer het later opnieuw</string> + <string name="turnip_github_http">GitHub antwoordde met HTTP %1$d</string> + <string name="turnip_download_failed">Downloaden mislukt</string> + <string name="turnip_list_predates_checksums">Deze driverlijst is ouder dan de checksums - vernieuw de lijst en probeer het opnieuw</string> + <string name="turnip_checksum_mismatch">Checksum komt niet overeen - de download is verwijderd</string> + <string name="turnip_not_adrenotools">Geen AdrenoTools-driver: %1$s</string> + <string name="turnip_reject_no_meta">geen meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json is onleesbaar (%1$s)</string> + <string name="turnip_reject_linux_driver">dit is een Linux-runtimedriver (importeer die onder “Linux-runtimedriver”)</string> + <string name="turnip_reject_wayland">dit is een Wayland-gamedriver, waar deze app niets aan heeft</string> + <string name="turnip_reject_no_library_name">meta.json noemt geen libraryName, dus er kon niets aan AdrenoTools worden doorgegeven</string> + <string name="turnip_reject_library_missing">meta.json noemt %1$s, dat niet in de zip staat</string> + <string name="turnip_reject_not_aarch64">%1$s is geen 64-bit AArch64 ELF shared library</string> + <string name="turnip_reject_glibc">%1$s koppelt aan glibc - een “-Linux”-Turnip, die onder “Linux-runtimedriver” hoort</string> + <string name="lvd_no_library">Geen libvulkan_freedreno*.so in deze zip. Een Android-zip (AdrenoTools) of -Wayland-Turnip-zip is geen Linux-runtimedriver.</string> + <string name="lvd_not_aarch64">%1$s is geen 64-bit AArch64 ELF shared library.</string> + <string name="lvd_not_glibc">%1$s is geen glibc-driver - hij koppelt aan de libc van Android. De Linux-runtime heeft een “-Linux”-zip nodig; een gewone of “-Wayland”-Turnip kan door de Steam-client helemaal niet worden geladen.</string> + <string name="bundle_no_manifest">Geen driverbundel: geen manifest.json dat een android- en een linux-driver noemt</string> + <string name="bundle_entry_outside">Geen driverbundel: %1$s wijst buiten de bundel</string> + <string name="bundle_too_large">Geen driverbundel: na uitpakken is dit groter dan %1$d MB</string> + + <string name="gstore_sd_card">SD-kaart</string> + <string name="gstore_folder">Map</string> + + <string name="logshare_chooser">Sessielogs delen</string> + + <string name="hdr_needs_android_10">vereist Android 10 of nieuwer (schermlagen met een kleurruimte)</string> + <string name="hdr_none">dit scherm geeft geen ondersteuning voor HDR aan</string> + <string name="hdr_not_hdr10">dit scherm ondersteunt %1$s, niet HDR10</string> + + <string name="gpu_this_gpu">deze GPU</string> + <string name="phantom_title_on">Limiet voor onderliggende processen staat aan</string> + <string name="phantom_title_unset">Limiet voor onderliggende processen is niet ingesteld</string> + <string name="phantom_title_unreadable">Limiet voor onderliggende processen kon niet worden gecontroleerd</string> + <string name="phantom_title_off">Limiet voor onderliggende processen staat uit</string> + <string name="phantom_title_not_required">Limiet voor onderliggende processen niet nodig</string> + <string name="phantom_instructions_fix">%1$s Als dat niet mogelijk is, sluit dit apparaat aan op een computer met ADB en voer de onderstaande opdracht uit. Kom hierna terug en controleer opnieuw.</string> + <string name="phantom_instructions_off">Steam-sessies kunnen starten.</string> + <string name="phantom_instructions_not_applicable">Deze Android-versie gebruikt deze limiet niet.</string> + <string name="phantom_fix_toggle">Schakel “Beperkingen voor onderliggende processen uitzetten” in bij Ontwikkelaarsopties en laat Ontwikkelaarsopties daarna aan staan.</string> + <string name="phantom_fix_no_toggle">Deze Android-versie heeft hier geen schakelaar voor. Gebruik draadloze foutopsporing om dit vanaf dit apparaat te wijzigen.</string> + <string name="upd_block_no_apk">Deze build heeft geen download voor dit exemplaar van DroidDeck.</string> + <string name="upd_block_version_code">Android installeert dit niet over deze build heen, omdat de versionCode %1$d lager is dan de geïnstalleerde %2$d.</string> + <string name="upd_fail_downgrade">Android installeert geen oudere versie over een nieuwere heen. Blijf op deze build totdat het kanaal is bijgewerkt.</string> + <string name="upd_fail_signature">Dit exemplaar van DroidDeck is anders ondertekend (een lokale build?), waardoor Android het niet ter plekke kan bijwerken.</string> + <string name="upd_fail_storage">Er is niet genoeg vrije ruimte voor de update.</string> + <string name="upd_fail_aborted">De update is geannuleerd.</string> + <string name="upd_fail_with_message">De update is niet geïnstalleerd: %1$s</string> + <string name="upd_fail_generic">De update is niet geïnstalleerd.</string> + <string name="saves_layout_zip">%1$s-zip</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s is nog niet gestart</string> + <string name="saves_none_found">Geen savegames gevonden voor %1$s</string> + <string name="saves_not_save_zip">%1$s heeft geen drive_c-map, dus het is geen savegame-zip van GameHub of Winlator</string> + <string name="gstore_cannot_create">kan geen mappen maken in %1$s</string> + <string name="gstore_cannot_write">kan niet schrijven in %1$s</string> + <string name="gstore_cannot_write_detail">kan niet schrijven in %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Map is niet beschikbaar</string> + <string name="gfiles_name_taken">Een ander bestand gebruikt al %1$s</string> + <string name="gfiles_art_unavailable">Artwork-map is niet beschikbaar</string> + <string name="gfiles_unrelated_inventory">Map heeft een synchronisatie-inventaris die hier niet bij hoort</string> + <string name="gfiles_remove_failed">Kan %1$s niet verwijderen</string> + <string name="gfiles_outside_folder">Bestand verlaat de exportmap</string> + <string name="cmgr_fex_unnamed">FEX (build zonder versienaam)</string> + <string name="cmgr_no_profile">geen profile.json in %1$s</string> + <string name="cmgr_not_component_package">%1$s is geen Linux-componentpakket (type %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s vrij</string> + <string name="mode_storage_auto_short">Automatisch</string> + <string name="appupd_catalog_rejected">De updatecatalogus voldeed niet aan de controles (%1$s)</string> + <string name="main_adb_clip_label">DroidDeck-instelling voor onderliggende processen</string> + <string name="setup_signed_in_offline_unnamed">Aangemeld · offline modus</string> + <string name="setup_signed_in_unnamed">Aangemeld</string> + <string name="driver_tag_bundled">MEEGELEVERD</string> + <string name="driver_tag_downloaded">GEDOWNLOAD</string> + <string name="driver_tag_imported">GEÏMPORTEERD</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Sessiescherm</string> + <string name="display_resolution">Resolutie</string> + <string name="display_game_fit">16:9-beeldvulling</string> + <string name="display_game_fit_hint">Hoe 16:9-games dit scherm vullen. Volgende sessie.</string> + <string name="display_game_fit_unavailable">Kies Schermformaat of een aangepast formaat dat smaller is dan 16:9.</string> + <string name="display_preserve">Beeldverhouding behouden</string> + <string name="display_stretch">Uitrekken naar scherm</string> + <string name="display_image_scaling">Beeldschaling</string> + <string name="display_filter">Schaalfilter</string> + <string name="display_filter_hint">Gedeeld door Steam en Desktop.</string> + <string name="display_filter_live">Wordt direct toegepast. Gedeeld door Steam en Desktop.</string> + <string name="display_filter_note">FSR, GSR en NIS worden toegepast bij het vergroten van het sessiebeeld. Alleen verscherpen werkt ook zonder vergroting.</string> + <string name="display_sharpness">Filterscherpte</string> + <string name="display_frame_rate">Framerate</string> + <string name="display_look_filter">%1$s Zet schaling op %2$s.</string> + <string name="display_match_screen">Schermformaat (%1$d×%2$d)</string> + <string name="display_follow_screen">Scherm volgen (past formaat aan bij vouwen of uitvouwen)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Apparaatgegevens tonen</string> + <string name="device_info_hide">Apparaatgegevens verbergen</string> + <string name="device_info_loading">Apparaat lezen…</string> + <string name="device_info_copy">Kopiëren</string> + <string name="device_info_copy_hint">Kopieer deze gegevens in een bugrapport.</string> + <string name="device_info_copied">Gekopieerd.</string> + <string name="force_ssbs_title">SSBS forceren</string> + <string name="force_ssbs_hint">Houdt een CPU-snelheidsinstelling aan die Wine steeds uitschakelt. Kan Windows-games sneller maken op Snapdragon 8 Elite; op oudere chips is weinig verschil te zien. Geldt bij de volgende gamestart.</string> + + <string name="rail_stores">Winkels</string> + <string name="source_steam">Steam</string> + <string name="source_added">Aangepast</string> + <string name="setup_stores">Winkels</string> + <string name="setup_stores_open_on">Open een winkel op</string> + <string name="setup_stores_speed">Niveau voor downloadsnelheid</string> + <string name="setup_stores_engine">Winkels-engine</string> + <string name="setup_stores_engine_chip_ready">● Engine gereed</string> + <string name="setup_stores_engine_chip_missing">Niet gebouwd</string> + <string name="stores_tier_balanced">Gebalanceerd</string> + <string name="stores_tier_fast">Snel</string> + <string name="stores_tier_max">Max</string> + <string name="stores_title">Winkels</string> + <string name="stores_settings">Instellingen voor winkels</string> + <string name="stores_settings_eyebrow">Instellingen</string> + <string name="stores_chip_signed_out">(niet aangemeld)</string> + <string name="stores_tab_store">Winkel</string> + <string name="stores_tab_installed">Geïnstalleerd</string> + <string name="stores_tab_library">Bibliotheek</string> + <string name="stores_tab_all">Alle</string> + <string name="stores_tab_downloads">Downloads</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Aanmelden</string> + <string name="stores_signout_named">%1$s · afmelden</string> + <string name="stores_signout_title">Afmelden bij %1$s?</string> + <string name="stores_signout_note">Geïnstalleerde games blijven staan. De bibliotheek wordt opnieuw opgehaald wanneer je je weer aanmeldt.</string> + <string name="stores_signout_stay">Aangemeld blijven</string> + <string name="stores_signout_go">Afmelden</string> + <string name="stores_search_catalog">Zoeken in de catalogus van %1$s…</string> + <string name="stores_search_installed">Geïnstalleerde games zoeken…</string> + <string name="stores_search_library">Zoeken in je bibliotheek…</string> + <string name="stores_search_open">Zoeken</string> + <string name="stores_installed_empty">Niets geïnstalleerd</string> + <string name="stores_library_loading">Laden</string> + <string name="stores_nothing_matches">Geen games</string> + <string name="stores_shelves_loading">Winkel laden…</string> + <string name="stores_amazon_no_catalog">Geen catalogus</string> + <string name="stores_shelf_new">Nieuw</string> + <string name="stores_shelf_deals">Aanbiedingen</string> + <string name="stores_shelf_free">Gratis games</string> + <string name="stores_shelf_trending">Populair</string> + <string name="stores_shelf_library">Jouw bibliotheek</string> + <string name="stores_play">Spelen</string> + <string name="stores_install">Installeren</string> + <string name="stores_resume_install">Installatie hervatten</string> + <string name="stores_dl_interrupted">Onderbroken</string> + <string name="stores_install_size">Installeren · %1$s</string> + <string name="stores_get_free">Gratis verkrijgen</string> + <string name="stores_view_on">Bekijken op %1$s</string> + <string name="stores_buy_price">Kopen · %1$s</string> + <string name="stores_installed_chip">Geïnstalleerd</string> + <string name="stores_in_library">In bibliotheek</string> + <string name="stores_free">Gratis</string> + <string name="stores_resume">Hervatten</string> + <string name="stores_refresh">Vernieuwen</string> + <string name="stores_sort">Sorteren</string> + <string name="stores_sort_last_played">Onlangs gespeeld</string> + <string name="stores_sort_recently_installed">Onlangs geïnstalleerd</string> + <string name="stores_sort_title_asc">Titel A–Z</string> + <string name="stores_sort_title_desc">Titel Z–A</string> + <string name="stores_sort_size_desc">Grootte: grootste</string> + <string name="stores_sort_size_asc">Grootte: kleinste</string> + <string name="stores_sort_release_date">Releasedatum</string> + <string name="stores_view_list">Lijstweergave</string> + <string name="stores_view_cards">Kaartweergave</string> + <string name="stores_show_mature">Inhoud voor volwassenen tonen</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Uit</string> + <string name="epic_eos">Epic-aanmelding (EOS)</string> + <string name="epic_offline">Offline starten</string> + <string name="epic_resolve">Epic-aanmelding oplossen</string> + <string name="epic_client_version">Versie %1$s</string> + <string name="epic_client_no_runtime">Installeer eerst de Linux-runtime</string> + <string name="epic_client_checking">Nieuwste versie controleren…</string> + <string name="epic_client_unpacking">Uitpakken…</string> + <string name="epic_client_unreachable">De downloadserver reageerde niet</string> + <string name="epic_client_needs_fex">De Epic Games Launcher heeft FEX nodig, dat Steam downloadt. Open de launcher opnieuw zodra Steam is gestart.</string> + <string name="epic_client_download_failed">Downloaden mislukt: %1$s</string> + <string name="epic_client_unpack_failed">Kan de launcher niet uitpakken: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher accepteerde de aanmelding niet. Start het opnieuw vanuit de launcher.</string> + <string name="epic_client_uninstall_body">Verwijdert de launcher en maakt zijn ruimte vrij. Je Epic-games blijven geïnstalleerd en werken, en de aanmelding blijft bewaard voor als je hem opnieuw installeert.</string> + <string name="epic_client_uninstall_stops">De lopende sessie wordt eerst gesloten.</string> + <string name="epic_client_uninstalled">Epic Games Launcher verwijderd</string> + <string name="epic_client_uninstall_failed">Sommige launcherbestanden konden niet worden verwijderd. Probeer het opnieuw.</string> + <string name="epic_client_uninstalling">Wacht tot Epic Games Launcher klaar is met verwijderen</string> + <string name="store_cloud_saves">Cloudsaves</string> + <string name="cloud_upload">Uploaden naar cloud</string> + <string name="cloud_download">Downloaden vanaf cloud</string> + <string name="cloud_none">Geen cloudsaves</string> + <string name="cloud_conflict">Cloudconflict</string> + <string name="cloud_conflict_files">Cloudconflict · %1$d bestanden</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Cloud behouden</string> + <string name="cloud_keep_local">Lokaal behouden</string> + <string name="cloud_checking">Cloud controleren…</string> + <string name="cloud_last_sync">Laatste synchronisatie %1$s</string> + <string name="cloud_never">Nog niet gesynchroniseerd</string> + <string name="cloud_done">%1$d bestanden</string> + <string name="stores_eyebrow_installed">geïnstalleerd</string> + <string name="stores_eyebrow_library">in je bibliotheek</string> + <string name="stores_eyebrow_store">winkel</string> + <string name="achievements_title">Prestaties</string> + <string name="achievements_count">%1$d van %2$d ontgrendeld</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Ontgrendeld · %1$d</string> + <string name="achievements_group_locked">Vergrendeld · %1$d</string> + <string name="achievements_group_hidden">Verborgen · %1$d</string> + <string name="achievements_hidden">Verborgen prestatie</string> + <string name="achievements_hidden_detail">Details worden getoond zodra deze is ontgrendeld.</string> + <string name="achievements_all">Alle prestaties ontgrendeld</string> + <string name="achievements_reading">Laden…</string> + <string name="achievements_signed_out">Log in bij %1$s om je prestaties te bekijken.</string> + <string name="achievements_unreachable">Kan %1$s niet bereiken. Controleer opnieuw zodra je online bent.</string> + <string name="achievements_none">%1$s vermeldt geen prestaties voor deze game.</string> + <string name="achievements_show_all">Alle %1$d weergeven</string> + <string name="achievements_dialog_title">Prestaties · %1$s</string> + <string name="stores_in_steam">✓ In Steam</string> + <string name="stores_uninstall">Verwijderen</string> + <string name="stores_uninstalling">Verwijderen…</string> + <string name="stores_uninstall_title">%1$s verwijderen?</string> + <string name="stores_uninstall_body_size">Maakt %1$s vrij en verwijdert het uit Steam.</string> + <string name="stores_uninstall_body">Verwijdert de bestanden en de Steam-snelkoppeling.</string> + <string name="stores_launch_not_registered">Steam herkent de game zodra het de volgende keer start; start de game vanuit Steam, of start Steam nu.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Steams keuze per game</string> + <string name="stores_card_audio">Audio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Componenten</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Engine</string> + <string name="stores_card_engine_value">%1$s · native</string> + <string name="stores_card_engine_java">%1$s · ingebouwd</string> + <string name="stores_how_it_runs">Hoe het draait</string> + <string name="stores_kv_fetched">Opgehaald van</string> + <string name="stores_kv_fetched_value">%1$s, met jouw account</string> + <string name="stores_kv_installed_to">Geïnstalleerd op</string> + <string name="stores_kv_installed_to_value">Gameopslag (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Gestart door</string> + <string name="stores_kv_launched_by_value">Steam en Proton, hetzelfde pad als Steam-games</string> + <string name="stores_kv_launched_by_epic">Steam en Proton · Epic-aanmelding per start, EOS-overlay uit</string> + <string name="stores_kv_launched_by_amazon">Steam en Proton · Amazon Games Services-variabelen ingesteld</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">toegevoegd aan Steam bij installatie (Deck-UI + Steam Input)</string> + <string name="stores_downloads_empty">Geen downloads</string> + <string name="stores_dl_paused">Gepauzeerd</string> + <string name="stores_dl_queued">In wachtrij</string> + <string name="stores_dl_queued_at">In wachtrij · #%1$d</string> + <string name="stores_dl_cancelled">Geannuleerd</string> + <string name="stores_dl_failed">Mislukt</string> + <string name="stores_dl_failed_reason">Mislukt · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pauzeren</string> + <string name="stores_dl_resume">Hervatten</string> + <string name="stores_dl_cancel">Annuleren</string> + <string name="stores_dl_retry">Opnieuw proberen</string> + <string name="stores_dl_clear">Wissen</string> + <string name="stores_dl_clear_all">Voltooide wissen</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Download</string> + <string name="stores_stage_verify">Verifiëren</string> + <string name="stores_stage_install">Installeren</string> + <string name="stores_stage_done">Klaar</string> + <string name="stores_stage_checking">Controleren</string> + <string name="stores_stage_downloading">Downloaden</string> + <string name="stores_dl_cancel_confirm">Download verwijderen?</string> + <string name="stores_dl_failed_kept">Mislukt · %1$s bewaard</string> + <string name="stores_stage_verifying">Verifiëren</string> + <string name="stores_stage_installing">Installeren</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d bestanden</string> + <string name="stores_download_manager">Downloadbeheer</string> + <string name="stores_parallel">Downloads tegelijk</string> + <string name="stores_install_where">Installeren op</string> + <string name="stores_install_title">%1$s installeren:</string> + <string name="stores_target_internal">Intern</string> + <string name="stores_target_free">%1$s vrij</string> + <string name="stores_target_free_unknown">Vrije ruimte onbekend</string> + <string name="stores_storage_insufficient">Te weinig vrije ruimte: %1$s nodig, slechts %2$s vrij</string> + <string name="stores_storage_low">Te weinig ruimte (%1$s vrij, %2$s nodig)</string> + <string name="stores_notification_channel">Winkeldownloads</string> + <string name="stores_notification_channel_hint">Toont de voortgang van gamedownloads en houdt downloads op de achtergrond actief</string> + <string name="stores_notification_one">Downloaden</string> + <string name="stores_notification_many">%1$d downloads</string> + <string name="stores_notification_waiting">Voorbereiden…</string> + <string name="stores_notification_done_channel">Voltooide winkeldownloads</string> + <string name="stores_notification_installed">%1$s geïnstalleerd</string> + <string name="stores_notification_failed">Download van %1$s mislukt</string> + <string name="stores_notification_delete">Verwijderen</string> + <string name="stores_notification_keep">Bewaren</string> + <string name="stores_login_title">Aanmelden bij %1$s</string> + <string name="stores_login_provider_title">Aanmelden bij je provider</string> + <string name="stores_login_reload">Opnieuw laden</string> + <string name="stores_login_close">Sluiten</string> + <string name="stores_login_retry">Probeer het opnieuw</string> + <string name="stores_login_finishing">Aanmelden afronden…</string> + <string name="stores_login_error_network">De aanmeldpagina kon niet worden geladen: %1$s</string> + <string name="stores_login_error_idp_blocked">Deze provider staat geen aanmelding via een ingesloten pagina toe. Meld je in plaats daarvan aan met je winkelwachtwoord.</string> + <string name="stores_login_error_http">De aanmeldpagina gaf een foutmelding (HTTP %1$d).</string> + <string name="stores_login_error_ssl">De verbinding met de aanmeldpagina is niet beveiligd.</string> + <string name="stores_login_error_verification">De aanmelding kon niet worden geverifieerd. Probeer het opnieuw.</string> + <string name="stores_login_error_generic">Aanmelden mislukt. Probeer het opnieuw.</string> + <string name="common_close">Sluiten</string> + <string name="common_back">Terug</string> + <string name="common_edit">Bewerken</string> + <string name="games_add_all">Alle games in deze map toevoegen</string> + <string name="games_added_none">Niets nieuws in deze map</string> + <string name="edit_name">Naam</string> + <string name="edit_target">Doel</string> + <string name="edit_start_in">Beginnen in</string> + <string name="edit_launch_options">Opstartopties</string> + <string name="edit_artwork">Artwork</string> + <string name="edit_other_exe">Andere exe…</string> + <string name="edit_remove">Verwijderen</string> + <string name="art_cover">Cover</string> + <string name="art_wide_cover">Brede cover</string> + <string name="art_adjust_logo">Logo aanpassen</string> + <string name="logo_pos_default">Standaard</string> + <string name="logo_pos_upper_left">Linksboven</string> + <string name="logo_pos_upper_center">Boven midden</string> + <string name="logo_pos_center">Midden</string> + <string name="logo_pos_bottom_left">Linksonder</string> + <string name="logo_pos_bottom_center">Onder midden</string> + <string name="logo_pos_position">Positie</string> + <string name="logo_pos_size">Grootte</string> + <string name="logo_pos_save">Opslaan</string> + <string name="logo_pos_reset">Terug naar standaard</string> + <string name="logo_pos_hint">Wordt over de achtergrond van de game getekend, zoals Steam doet. De exacte positie kan een paar pixels afwijken.</string> + <string name="logo_pos_no_logo">Deze game heeft nog geen logo. Kies er een bij Logo om het hier te zien.</string> + <string name="logo_pos_failed">De logopositie kon niet worden opgeslagen. Probeer het opnieuw.</string> + <string name="art_background">Achtergrond</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Pictogram</string> + <string name="art_src_folder">Gamemap</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Jouw bestand</string> + <string name="art_src_exe">Vanuit de exe</string> + <string name="art_src_auto">Automatisch</string> + <string name="art_pick_image">Afbeelding kiezen…</string> + <string name="art_pick_title">Kies een afbeelding: %1$s</string> + <string name="art_reset">Terugzetten naar automatisch</string> + <string name="art_search_sgdb">Zoeken op SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Een game zoeken</string> + <string name="art_sgdb_other_games">Andere resultaten</string> + <string name="art_sgdb_none">Geen resultaten.</string> + <string name="art_sgdb_no_key">SteamGridDB heeft een API-sleutel nodig. Voeg de jouwe toe bij Instellingen › Launcher.</string> + <string name="art_sgdb_bad_key">SteamGridDB accepteerde de API-sleutel niet. Controleer hem bij Instellingen › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB beperkt nu het aantal verzoeken. Probeer het over een minuut opnieuw.</string> + <string name="art_sgdb_offline">SteamGridDB is niet bereikbaar. Controleer de verbinding.</string> + <string name="art_sgdb_server">Er ging iets mis bij SteamGridDB. Probeer het later opnieuw.</string> + <string name="art_sgdb_no_game">SteamGridDB heeft geen resultaten voor deze game. Probeer erop te zoeken.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d game toegevoegd</item> + <item quantity="other">%1$d games toegevoegd</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d al in Games</item> + <item quantity="other">%1$d al in Games</item> + </plurals> + <string name="hop_back">B · Terug naar %1$s</string> + <string name="hop_from_games">de game</string> + <string name="hop_from_play">Spelinstellingen</string> + <string name="sheet_graphics_drivers">Grafische drivers</string> + <string name="comp_this_proton">Deze Proton</string> + <string name="comp_every_proton">Elke Proton</string> + <string name="comp_for_every_proton">Voor elke Proton</string> + <string name="comp_available_count">Beschikbaar · %1$d</string> + <string name="comp_checked">Gecontroleerd %1$s</string> + <string name="comp_check_all">Controleren op nieuwe componenten en drivers</string> + <string name="comp_get">Ophalen</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton en FEX hieronder zijn van deze Proton</string> + <string name="comp_device_tested">%1$s · getest</string> + <string name="comp_device_untested">%1$s · ongetest</string> + <string name="comp_device_unsupported">%1$s · niet ondersteund</string> + <string name="gpu_auto_keeps">Houdt het aanbevolen paar actueel</string> + <string name="gpu_bar_auto">Automatisch · %1$s</string> + <string name="gpu_separately">Runtime- en weergavedriver afzonderlijk</string> + <string name="gpu_use_title">%1$s gebruiken?</string> + <string name="gpu_mode_title">Hoe drivers worden gekozen</string> + <string name="gpu_mode_auto_detail">Het beste paar voor deze GPU, altijd bijgewerkt</string> + <string name="gpu_mode_pair">Gekoppeld paar</string> + <string name="gpu_mode_pair_detail">Kies een paar; stelt beide drivers in</string> + <string name="gpu_mode_mix">Vrij combineren</string> + <string name="gpu_mode_mix_detail">Kies beeld en runtime apart</string> + <string name="gpu_mode_pair_short">Paar</string> + <string name="gpu_mode_mix_short">Gemengd</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAAR</string> + <string name="gpu_src_bundle">PAKKET</string> + <string name="gpu_src_chosen">GEKOZEN</string> + <string name="gpu_src_by_gpu">PER GPU</string> + <string name="gpu_src_default">STANDAARD</string> + <string name="gpu_display_live">Tekent nu</string> + <string name="gpu_display_pending">Herstart nodig · tot dan tekent %1$s</string> + <string name="gpu_runtime_live">Actief</string> + <string name="gpu_runtime_pending">Volgende sessie · deze houdt %1$s</string> + <string name="gpu_display_next">Tekent het scherm. Geldt vanaf de volgende sessie.</string> + <string name="gpu_previous_driver">de vorige driver</string> + <string name="gpu_restart_banner">Herstart om de beelddriver te wisselen.</string> + <string name="gpu_restart_blocked">Stop de huidige sessie en herstart DroidDeck om de beelddriver te wisselen.</string> + <string name="gpu_restart_now">Nu herstarten</string> + <string name="gpu_restart_later">Later</string> + <string name="gpu_auto_title">Automatisch koos dit paar voor je %1$s</string> + <string name="gpu_auto_builtin_title">Automatisch gebruikt de ingebouwde drivers voor je %1$s</string> + <string name="gpu_auto_reason">Gekozen voor de %1$s-familie. Nieuwe versies installeren op de achtergrond.</string> + <string name="gpu_pair_title">Kies een paar</string> + <string name="gpu_pair_hint">Een paar stelt de beelddriver en de runtimedriver samen in.</string> + <string name="gpu_mix_title">Kies elke driver</string> + <string name="gpu_mix_hint">Een pakket vult beide plekken. Beeldwijzigingen gelden na een herstart, runtimewijzigingen vanaf de volgende sessie.</string> + <string name="gpu_change_display">Beelddriver wisselen</string> + <string name="gpu_change_runtime">Runtimedriver wisselen</string> + <string name="gpu_autos_pick">KEUZE VAN AUTOMATISCH</string> + <string name="gpu_installed">Geïnstalleerd</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · herstart om toe te passen</string> + <string name="gpu_chip_restart">%1$s · herstart nodig</string> + <string name="comp_this_device">Dit apparaat</string> + <string name="proton_remove_title">%1$s verwijderen?</string> + <string name="setup_tab_diagnostics">Diagnostiek</string> + <string name="setup_ready">Klaar om te spelen</string> + <string name="setup_not_ready">Nog niet klaar om te spelen</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">proceslimiet uit</string> + <string name="setup_ready_signed_in">aangemeld als %1$s</string> + <string name="setup_needs_you">Als iets je aandacht nodig heeft</string> + <string name="setup_group_look">Weergave</string> + <string name="setup_group_device">Dit apparaat</string> + <string name="setup_group_art">Bibliotheekartwork</string> + <string name="setup_group_download">Downloaden</string> + <string name="setup_download_source">Bron</string> + <string name="setup_download_source_auto">Automatisch</string> + <string name="setup_download_source_direct">Direct</string> + <string name="setup_download_source_mirror">Mirror</string> + <string name="setup_download_source_custom">Eigen prefix</string> + <string name="setup_download_mirror">Site</string> + <string name="setup_download_prefix">Prefix</string> + <string name="flathub_eyebrow">LINUX-APPS</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Bureaubladapps voor het Linux-bureaublad, geopend vanuit Desktop.</string> + <string name="flathub_setup">Flathub instellen</string> + <string name="flathub_remove_title">%1$s verwijderen?</string> + <string name="flathub_remove_note">De instellingen en bestanden worden bewaard.</string> + <string name="flathub_keep">Bewaren</string> + <string name="desktop_size">Grootte op schijf</string> + <string name="desktop_uninstall_title">De desktop verwijderen?</string> + <string name="desktop_all_systems">Alle</string> + <string name="gog_achievements">GOG-prestaties</string> + <string name="gog_achievements_hint">Synchroniseert prestaties voor ondersteunde GOG-games. Geldt vanaf de volgende start.</string> + <string name="gog_achievements_off">Prestaties uit</string> + <string name="gog_achievements_on">Prestaties aan</string> + <string name="gog_achievements_signin">Log opnieuw in bij GOG</string> + <string name="gog_achievements_uploaded">Prestaties geüpload</string> + <string name="gog_achievements_pending">Uploaden van prestatie in behandeling</string> + <string name="gog_achievements_enable_store">Zet GOG-prestaties aan in de Stores-instellingen</string> + <string name="gog_achievements_unavailable">Prestaties niet beschikbaar; controleer sessielogs</string> + <string name="achievement_unlocked">Prestatie ontgrendeld</string> + <string name="touch_paste">Plakken</string> + <string name="touch_dpad">Richtingstoetsen</string> + <string name="touch_left_stick">Linkerstick</string> + <string name="touch_right_stick">Rechterstick</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Toetsenbord</string> + <string name="touch_dpad_up">Richtingstoetsen omhoog</string> + <string name="touch_dpad_down">Richtingstoetsen omlaag</string> + <string name="touch_dpad_left">Richtingstoetsen links</string> + <string name="touch_dpad_right">Richtingstoetsen rechts</string> + <string name="touch_title">Aanraakbediening</string> + <string name="touch_controller">Aanraakcontroller</string> + <string name="touch_mouse">Muis</string> + <string name="touch_on">Aan</string> + <string name="touch_off">Uit</string> + <string name="touch_speed_slow">Langzaam</string> + <string name="touch_speed_normal">Normaal</string> + <string name="touch_speed_fast">Snel</string> + <string name="touch_edit_layout">Indeling bewerken</string> + <string name="touch_droiddeck_menu">DroidDeck-menu</string> + <string name="touch_drag_hint">Sleep bedieningselementen naar het scherm</string> + <string name="touch_arrange">Schikken</string> + <string name="touch_discard">Negeren</string> + <string name="touch_saving">Opslaan…</string> + <string name="touch_icon">Pictogram</string> + <string name="touch_narrower">B−</string> + <string name="touch_wider">B+</string> + <string name="touch_shorter">H−</string> + <string name="touch_taller">H+</string> + <string name="touch_hide">Verbergen</string> + <string name="touch_color_opacity">Kleur en transparantie…</string> + <string name="touch_copy_layout">Deze indeling kopiëren</string> + <string name="touch_layout_copied">Indeling gekopieerd; plak deze in de aanraakindeling van elke game</string> + <string name="touch_paste_layout">Gekopieerde indeling plakken</string> + <string name="touch_reset_layout">Terugzetten naar Steams standaard</string> + <string name="touch_no_binding">Deze bediening heeft geen toewijzing in Steam om er een pictogram aan te geven</string> + <string name="touch_icon_for">Pictogram voor %1$s</string> + <string name="touch_layout_color">Kleur van aanraakindeling</string> + <string name="touch_done">Klaar</string> + <string name="touch_save_failed">De aanraakindeling kon niet worden opgeslagen</string> + <string name="touch_saved">Aanraakindeling opgeslagen in Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Label (optioneel)</string> + <string name="touch_icons_missing">Steams pictogrammen zijn niet gevonden</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d pictogram van Steam</item> + <item quantity="other">%1$d pictogrammen van Steam</item> + </plurals> + <string name="touch_icon_color">Pictogramkleur</string> + <string name="touch_button_color">Knopkleur</string> + <string name="touch_no_icon">Geen pictogram</string> + + <string name="stores_sync_sign_in">Aanmelding controleren…</string> + <string name="stores_sync_library">Je bibliotheek ophalen…</string> + <string name="stores_sync_game_list">Gamelijst ophalen…</string> + <string name="stores_sync_details">Gamedetails laden… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">%1$d game synchroniseren…</item> + <item quantity="other">%1$d games synchroniseren…</item> + </plurals> + <string name="stores_sync_progress">Synchroniseren… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Coverafbeeldingen ophalen…</string> + <string name="stores_sync_failed">Synchronisatie mislukt</string> + <string name="stores_sync_no_games">Geen games gevonden in je %1$s-bibliotheek</string> + <string name="stores_sync_amazon_no_answer">Amazon Games reageerde niet voor je bibliotheek: vernieuw, of meld je opnieuw aan</string> + <string name="stores_sync_gog_unreachable">Kan GOG niet bereiken</string> + <string name="stores_sync_gog_unreadable">Je GOG-bibliotheek kon niet worden gelezen</string> + <string name="stores_registering">Registreren bij Steam…</string> + <string name="mode_client_arch">Steam-client</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC-diagnose</string> + <string name="setup_vac_diag_hint">Source-games leggen hun console vast (-condebug); vac.txt in de sessielogs vermeldt beveiligd of onbeveiligd</string> + <string name="load_starting_steam_x64">Steam x86-64 wordt gestart</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Gebruikt door de x86-64-Steam-client</string> + <string name="storage_uninstall_in_x64">Deze kopie staat in de x86-64-Steam-client. Kies x86-64 bij Steam-client en verwijder hem daarna hier.</string> + <string name="storage_uninstall_in_arm64">Deze kopie staat in de ARM64-Steam-client. Kies ARM64 bij Steam-client en verwijder hem daarna hier.</string> + <string name="drawer_page_glasses">Bril</string> + <string name="glasses_open">VITURE-bril</string> + <string name="glasses_control">Brilbediening</string> + <string name="glasses_driver_missing">Deze build bevat geen driver voor deze bril.</string> + <string name="glasses_connection_failed">Kan geen verbinding maken met de bril. Sluit de kabel opnieuw aan of tik op Toestaan om het opnieuw te proberen.</string> + <string name="glasses_allow">Toestaan</string> + <string name="glasses_allow_hint">Laat DroidDeck de verversingssnelheid, 3D-modus, helderheid, het volume en de zonwering van de bril instellen en de hoofdtracking uitlezen.</string> + <string name="glasses_asking">Wachten tot je het toestaat in het Android-venster…</string> + <string name="glasses_denied">Bediening is geweigerd. Sta het toe om de instellingen van de bril te wijzigen.</string> + <string name="glasses_no_control">Deze bril toont de game, maar de instellingen ervan kunnen hier niet worden gewijzigd.</string> + <string name="glasses_output">Uitvoer</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Game op bril</string> + <string name="glasses_game_on_hint">Toon de game alleen op de bril. Uit: de telefoon toont de game en Android spiegelt de telefoon.</string> + <string name="glasses_display">Scherm</string> + <string name="glasses_refresh">Verversingssnelheid</string> + <string name="glasses_3d">3D (side-by-side)</string> + <string name="glasses_3d_hint">Schakel de smart glasses over naar side-by-side 3D. Hoofdtracking wordt apart aangestuurd.</string> + <string name="glasses_3d_failed">Het 3D-signaal is niet bevestigd. Probeer het opnieuw zodra het 2D-beeld terug is.</string> + <string name="glasses_no_signal">Geen beeld: de bril staat in een modus die deze telefoon niet kan versturen. Houd de 2D/3D-knop ingedrukt, of koppel de bril los en sluit hem opnieuw aan.</string> + <string name="glasses_3d_refresh">3D-verversingssnelheid</string> + <string name="glasses_auto3d">3D voor VR-games</string> + <string name="glasses_auto3d_hint">Schakelt naar 3D zolang SteamVR draait, en daarna weer terug.</string> + <string name="glasses_picture">Afbeelding</string> + <string name="glasses_picture_hint">Automatisch toont platte inhoud in beide ogen en detecteert SteamVR. Kies \'Side-by-side game\' voor SBS-inhoud.</string> + <string name="glasses_picture_auto">Automatisch</string> + <string name="glasses_picture_screen">Virtueel scherm</string> + <string name="glasses_picture_sbs">Side-by-side game</string> + <string name="glasses_screen_size">Schermbreedte</string> + <string name="glasses_screen_distance">Schermafstand</string> + <string name="glasses_screen_next_session">Breedte en afstand gelden wanneer een game als virtueel scherm op de bril draait.</string> + <string name="glasses_screen_no_output">Deze instellingen gelden zolang Game op bril aanstaat en de game daar wordt getoond.</string> + <string name="glasses_screen_flat_hint">Automatisch houdt deze 2D-game schermvullend. Gebruik een virtueel scherm om breedte, afstand en hoofdtracking aan te passen.</string> + <string name="glasses_screen_use">Virtueel scherm gebruiken</string> + <string name="glasses_screen_direct_hint">SteamVR vult het beeld. Pas het gezichtsveld aan in VR; breedte en afstand zijn alleen van toepassing op een virtueel scherm.</string> + <string name="glasses_screen_sbs_hint">Side-by-side games vullen elk oog. Breedte en afstand gelden alleen voor een virtueel scherm.</string> + <string name="glasses_tracking_flat_hint">Automatisch houdt deze 2D-game vast in beeld. Kies Virtueel scherm bij Scherm om hoofdtracking te gebruiken.</string> + <string name="glasses_tracking_sbs_hint">Hoofdtracking geldt voor een virtueel scherm of een actieve SteamVR-game.</string> + <string name="glasses_hardware">Apparaat</string> + <string name="glasses_brightness">Helderheid</string> + <string name="glasses_volume">Volume</string> + <string name="glasses_sunblock">Zonwering</string> + <string name="glasses_sunblock_hint">Maakt de voorste glazen donkerder.</string> + <string name="glasses_tracking">Tracking</string> + <string name="glasses_head_tracking">Hoofdtracking</string> + <string name="glasses_head_tracking_hint">De eigen sensoren van de bril laten het virtuele scherm en SteamVR met je hoofd meedraaien.</string> + <string name="glasses_recenter">Weergave centreren</string> + <string name="glasses_recenter_button">Scherm opnieuw centreren</string> + <string name="glasses_vr_fov">SteamVR-gezichtsveld</string> + <string name="glasses_vr_fov_hint">Lager brengt SteamVR dichterbij en vult de bril; hoger toont meer om je heen.</string> + <string name="glasses_playing">Je speelt op %1$s</string> + <string name="glasses_calibration">Trackingkalibratie</string> + <string name="glasses_calibration_hint">Vermindert drift en lijnt de horizontale referentie uit.</string> + <string name="glasses_calibration_saved_hint">De opgeslagen kalibratie wordt op deze bril toegepast.</string> + <string name="glasses_calibration_open">Kalibreren</string> + <string name="glasses_calibration_instructions">Leg de aangesloten bril ondersteboven op een vlak oppervlak, zodat het montuur gelijkmatig rust. Tik op Starten en laat de bril ongeveer 8 seconden onaangeroerd liggen. Bij beweging begint de meting opnieuw. Dit corrigeert drift en kanteling, niet de kijkrichting.</string> + <string name="glasses_calibration_settling">Laat de bril ondersteboven en onaangeroerd liggen. Wachten tot hij stilligt…</string> + <string name="glasses_calibration_collecting">De sensoren worden gemeten. Houd de bril stil.</string> + <string name="glasses_calibration_moving">Beweging gedetecteerd. Raak de bril niet aan; de meting begint automatisch opnieuw.</string> + <string name="glasses_calibration_turn_over">Leg de bril ondersteboven op een vlak oppervlak. De meting begint zodra hij goed ligt.</string> + <string name="glasses_calibration_complete">Kalibratie opgeslagen. Zet de bril op, kijk recht vooruit en tik dan op Klaar om te centreren.</string> + <string name="glasses_calibration_failed">De kalibratie kon niet worden voltooid. Controleer de verbinding, houd de bril stil en probeer het opnieuw. Je vorige kalibratie is ongewijzigd.</string> + <string name="glasses_calibration_start">Starten</string> + <string name="glasses_calibration_done">Klaar</string> + <string name="glasses_calibration_reset">Trackingkalibratie resetten</string> + <string name="glasses_calibration_reset_hint">De opgeslagen kalibratie verwijderen en de standaardwaarden van het model herstellen? Centreer opnieuw nadat je de bril weer hebt opgezet.</string> + <string name="glasses_calibration_reset_button">Resetten</string> + <string name="hand_camera_group">Handtracking</string> + <string name="hand_camera_prompt_title">Handen of Joy-Con-controllers volgen met de telefooncamera?</string> + <string name="hand_camera_prompt_body">Zonder aangesloten controller volgt de telefooncamera je blote handen in VR: knijp met je duim en wijsvinger om te klikken, sluit je hand om te grijpen en draai je handpalm naar je toe en knijp om het menu te openen. Met gekoppelde Joy-Con-controllers volgt de camera hun positie, terwijl de Joy-Con-controllers rotatie en knopbediening mogelijk maken. Foto\'s worden op dit apparaat verwerkt en nooit opgeslagen of verzonden.</string> + <string name="hand_camera_rear">Achtercamera</string> + <string name="hand_camera_rear_hint">Aanbevolen. Meestal scherper en breder.</string> + <string name="hand_camera_front">Voorcamera</string> + <string name="hand_camera_front_hint">Voor als de achterkant van het apparaat niet naar je toe kan wijzen.</string> + <string name="hand_camera_allow">Camera gebruiken</string> + <string name="hand_camera_not_now">Niet nu</string> + <string name="hand_camera_setting">Handtracking via camera</string> + <string name="hand_camera_setting_hint">Gebruik de telefooncamera voor gebaren met blote handen of om gekoppelde Joy-Con-controllers in VR te positioneren. Joy-Con-controllers bieden rotatie en knopbediening. Pauzeert terwijl de smartbril je handen of Joy-Con-controllers volgt. Beelden worden alleen op dit apparaat verwerkt.</string> + <string name="hand_camera_choice">Camera</string> + <string name="hand_camera_access">Cameratoegang</string> + <string name="hand_camera_access_hint">Sta cameratoegang toe zodat handtracking kan starten.</string> + <string name="hand_camera_access_denied">Cameratoegang staat uit. Zet dit aan in de Android-instellingen.</string> + <string name="hand_camera_allow_button">Toestaan</string> + <string name="hand_camera_open_settings">Instellingen openen</string> + <string name="hand_camera_placement">Cameraplaatsing</string> + <string name="hand_camera_placement_hint">Controleer of de camera je kan zien voordat je gaat spelen.</string> + <string name="hand_camera_check">Controleren</string> + <string name="hand_camera_check_title">Cameraplaatsing</string> + <string name="hand_camera_how_rear">Zet het apparaat rechtop op 1,5 tot 2 meter afstand, op borsthoogte, met de achtercamera naar je toe. Stap dan in beeld met je handen vooruit.</string> + <string name="hand_camera_how_front">Zet het apparaat rechtop op 1,5 tot 2 meter afstand, op borsthoogte, met het scherm naar je toe. Stap dan in beeld met je handen vooruit.</string> + <string name="hand_camera_starting">Camera wordt gestart…</string> + <string name="hand_camera_stand_up">Het apparaat ligt plat. Zet het rechtop zodat de camera naar je toe wijst.</string> + <string name="hand_camera_upright">Zet het apparaat rechter overeind zodat de camera naar je toe wijst.</string> + <string name="hand_camera_not_seen">Kan je nog niet zien. Stap in beeld zodat je hoofd en schouders zichtbaar zijn.</string> + <string name="hand_camera_move_back">Doe een stapje naar achteren.</string> + <string name="hand_camera_move_closer">Kom wat dichterbij.</string> + <string name="hand_camera_show_hands">Houd beide handen zo dat de camera ze kan zien.</string> + <string name="hand_camera_good">Ziet er goed uit.</string> + <string name="hand_camera_failed">De camera kon niet starten. Sluit andere apps die hem gebruiken en probeer het opnieuw.</string> + <string name="hand_camera_switch">Camera wisselen</string> + <string name="hand_camera_skip">Overslaan</string> + <string name="hand_camera_done">Klaar</string> + <string name="glasses_xreal_network_missing">Wachten op de USB Ethernet-verbinding van de bril. Deze telefoon maakt die mogelijk niet beschikbaar voor apps.</string> + <string name="glasses_xreal_connection_failed">De XREAL-verbinding is onderbroken of gaf een niet-ondersteund antwoord. Opnieuw proberen…</string> + <string name="glasses_xreal_experimental">Experimentele ondersteuning voor 1S. Gebruik de Follow-modus en schakel stabilisatie uit in het menu van de bril. Trackingrichtingen en weergavemodi moeten nog op een apparaat worden getest.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard-modus</string> + <string name="cardboard_mode_hint">Beelden voor linker- en rechteroog voor een VR-bril voor je telefoon.</string> + <string name="cardboard_source">Beeld</string> + <string name="cardboard_source_screen">Virtueel scherm</string> + <string name="cardboard_source_sbs">Side-by-side 3D</string> + <string name="cardboard_viewer">Bril</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Geen lens</string> + <string name="cardboard_ipd">Oogafstand</string> + <string name="cardboard_screen_width">Schermbreedte</string> + <string name="cardboard_screen_distance">Schermafstand</string> + <string name="cardboard_head_tracking">Hoofdtracking</string> + <string name="cardboard_no_sensor">Dit apparaat heeft geen rotatiesensor.</string> + <string name="cardboard_recenter">Weergave centreren</string> + <string name="cardboard_recenter_button">Centreren</string> + <string name="cardboard_steamvr">SteamVR (experimenteel)</string> + <string name="cardboard_steamvr_install">Installeren</string> + <string name="cardboard_steamvr_installing">SteamVR downloaden en uitpakken…</string> + <string name="cardboard_steamvr_start">Starten</string> + <string name="cardboard_steamvr_stop">Stoppen</string> + <string name="cardboard_steamvr_unavailable">Niet beschikbaar in deze sessie.</string> + <string name="cardboard_steamvr_failed">SteamVR reageerde niet; controleer het sessielog.</string> + <string name="drawer_component_downloads">Componenten downloaden</string> + <string name="drawer_component_downloads_hint">Downloads worden gedeeld met de pagina Componenten. Kies hierboven een gedownloade versie om die bij de volgende start van een game te gebruiken.</string> + <string name="drawer_component_choose_download">Kies een versie om te downloaden</string> + <string name="stores_fact_developer">Ontwikkelaar</string> + <string name="stores_fact_publisher">Uitgever</string> + <string name="stores_fact_released">Uitgebracht</string> + <string name="stores_hltb_main">Hoofdverhaal</string> + <string name="stores_hltb_extras">+ Extra\'s</string> + <string name="stores_hltb_completionist">Completionist</string> + <string name="stores_hltb_hours">%1$s u</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="display_picture_position">Positie van de afbeelding</string> + <string name="display_position_top">Boven</string> + <string name="display_position_bottom">Onder</string> + <string name="display_position_center">Midden (standaard)</string> + <string name="setup_tab_storage">Opslag</string> + <string name="storage_measuring">Opslag meten…</string> + <string name="storage_measuring_hint">De eerste keer duurt een paar seconden.</string> + <string name="storage_internal">Interne opslag</string> + <string name="storage_used_of">%1$s van %2$s gebruikt</string> + <string name="storage_free">%1$s vrij</string> + <string name="storage_droiddeck_uses">DroidDeck gebruikt %1$s. Gemeten op %2$s.</string> + <string name="storage_rescanning">opnieuw meten…</string> + <string name="storage_other_apps">Andere Android-apps</string> + <string name="storage_safe_now">Nu vrij te maken</string> + <string name="storage_safe_hint">Ongebruikte runtimes, resten, oude logs</string> + <string name="storage_clean_up">Opruimen…</string> + <string name="storage_session_running">Stop de sessie om op te ruimen of iets te verwijderen. De groottes blijven zichtbaar.</string> + <string name="storage_where">Waar het naartoe gaat</string> + <string name="storage_games">Steam-games</string> + <string name="storage_game_data">Gamegegevens</string> + <string name="storage_game_data_hint">Prefixen %1$s · workshop %2$s · shaders %3$s</string> + <string name="storage_tools">Proton en runtimes</string> + <string name="storage_tools_unused">%1$s ongebruikt</string> + <string name="storage_stores">GOG, Epic en andere winkels</string> + <string name="storage_stores_hint">Verwijder ze bij Winkels</string> + <string name="storage_desktop">Desktop-apps</string> + <string name="storage_desktop_hint">Flatpak-apps en runtimes</string> + <string name="storage_system">Linux-systeem en Steam-client</string> + <string name="storage_system_hint">Nodig om iets te kunnen draaien</string> + <string name="storage_app_data">DroidDeck-gegevens</string> + <string name="storage_app_data_hint">Logs van oude sessies %1$s · cache · drivers</string> + <string name="storage_legend_games">Games</string> + <string name="storage_legend_data">Gamegegevens</string> + <string name="storage_legend_tools">Proton en runtimes</string> + <string name="storage_legend_stores">Andere winkels</string> + <string name="storage_legend_desktop">Desktop-apps</string> + <string name="storage_legend_system">Linux-systeem</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Opruimen</string> + <string name="storage_clean_up_lede">Hier raakt niets geïnstalleerde games of lopende downloads aan.</string> + <string name="storage_nothing_to_clean">Er is nu niets om op te ruimen.</string> + <string name="storage_selected">Geselecteerd: %1$s · %2$s → %3$s vrij</string> + <string name="storage_cleaning">Opruimen…</string> + <string name="storage_free_button">%1$s vrijmaken</string> + <string name="storage_freed">%1$s vrijgemaakt.</string> + <string name="storage_item_runtimes">Ongebruikte Steam-runtimes en Proton</string> + <string name="storage_item_leftovers">Resten van verwijderde games</string> + <string name="storage_item_leftovers_unsure">Resten die saves kunnen bevatten</string> + <string name="storage_item_logs">Logs van oude sessies</string> + <string name="storage_item_logs_detail">Logs van de huidige sessie blijven bewaard</string> + <string name="storage_item_custom_detail">Geen game gebruikt het. Installeer het opnieuw bij Componenten als je het nodig hebt.</string> + <string name="storage_item_shaders">Shadercache van geïnstalleerde games</string> + <string name="storage_item_shaders_detail">Wordt opnieuw opgebouwd tijdens het spelen. De eerste minuten van elke game haperen weer.</string> + <string name="storage_tag_safe">Veilig</string> + <string name="storage_tag_unused">Ongebruikt</string> + <string name="storage_tag_stutter">Haperingen</string> + <string name="storage_tag_saves">Controleer saves</string> + <string name="storage_tag_default">Standaard</string> + <string name="storage_tag_required">Nodig</string> + <string name="storage_tag_not_used">Ongebruikt</string> + <string name="storage_back">Opslag</string> + <string name="storage_games_with_data">%1$s met hun gegevens</string> + <string name="storage_sort_largest">Grootste</string> + <string name="storage_sort_least_played">Minst gespeeld</string> + <string name="storage_sort_sd">Op SD-kaart</string> + <string name="storage_no_games">Er zijn hier geen games.</string> + <string name="storage_played">%1$s gespeeld</string> + <string name="storage_never_played">Nooit gespeeld</string> + <string name="storage_game_parts">Game %1$s · gegevens %2$s</string> + <string name="storage_uninstall">Verwijderen</string> + <string name="storage_games_note">Verwijderen opent het Steam-venster, zodat Steam het bijhoudt. Om een game naar de SD-kaart te verplaatsen gebruik je Steam › Instellingen › Opslag.</string> + <string name="storage_uninstall_title">%1$s verwijderen?</string> + <string name="storage_uninstall_body">Steam opent en vraagt om bevestiging. Dat maakt de %1$s van de game vrij. Het prefix blijft tot je de resten opruimt, en Steam Cloud-saves blijven in je account.</string> + <string name="storage_open_steam">Steam openen</string> + <string name="storage_tools_detail">%1$s · %2$s ongebruikt</string> + <string name="storage_remove_unused">Ongebruikte verwijderen · %1$s</string> + <string name="storage_in_use">In gebruik</string> + <string name="storage_not_used">Ongebruikt</string> + <string name="storage_remove">Verwijderen</string> + <string name="storage_remove_title">%1$s verwijderen?</string> + <string name="storage_remove_body">Maakt %1$s vrij. Steam downloadt het opnieuw als een game het nodig heeft.</string> + <string name="storage_tool_fex_runtime">Nodig voor Linux x86-games (FEX)</string> + <string name="storage_tool_arm_runtime">Nodig voor ARM64-Protons</string> + <string name="storage_tool_redist">VC++- en DirectX-installaties die games nodig hebben</string> + <string name="storage_tool_fex">Draait Linux x86-games</string> + <string name="storage_tool_steam">Steam-hulpprogramma</string> + <string name="storage_tool_old_runtime">DroidDeck draait games zonder deze runtime</string> + <string name="storage_tool_x86_proton">Proton x86, dat DroidDeck niet kan draaien</string> + <string name="storage_tool_custom_default">Standaard voor alle games</string> + <string name="storage_tool_custom_unused">Geen game gebruikt het</string> + <string name="storage_tool_custom_unknown">De Steam-instellingen zijn niet leesbaar, dus het blijft bewaard</string> + <string name="storage_cleanup_busy">Wacht tot het opruimen van de opslag klaar is</string> + <string name="storage_low_title">Slechts %1$s vrij</string> + <string name="storage_low_body">Steam heeft ruimte nodig voor updates en shadercache. Onder 10 GB kunnen game-updates halverwege mislukken.</string> + <string name="storage_low_safe">%1$s is veilig vrij te maken.</string> + <string name="storage_free_up">Ruimte vrijmaken</string> + <string name="storage_play_anyway">Toch spelen</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d geïnstalleerd</item> + <item quantity="other">%d geïnstalleerd</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d op SD-kaart</item> + <item quantity="other">%d op SD-kaart</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d hulpprogramma</item> + <item quantity="other">%d hulpprogramma\'s</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Lege prefixmappen en shadercache van %d game</item> + <item quantity="other">Lege prefixmappen en shadercache van %d games</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Het prefix van %d game bevat nog bestanden, waaronder lokale saves. Maak eerst een kopie als je die nodig hebt.</item> + <item quantity="other">De prefixen van %d games bevatten nog bestanden, waaronder lokale saves. Maak eerst een kopie als je die nodig hebt.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d game</item> + <item quantity="other">%d games</item> + </plurals> + <string name="storage_tool_default_proton">Standaard Proton van DroidDeck</string> + <string name="storage_tool_proton">Proton 11-optie van DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Gebruikt door %d game</item> + <item quantity="other">Gebruikt door %d games</item> + </plurals> + <string name="storage_legend_components">Componenten</string> + <string name="storage_components">Componenten</string> + <string name="storage_item_components">Ongebruikte componenten</string> + <string name="storage_component_original">Origineel %1$s · %2$s</string> + <string name="storage_original_confirm">Maakt %1$s vrij. Zet alleen een Proton-versie terug die niet meer is geïnstalleerd.</string> + <string name="storage_leftovers_unchecked">Niet gecontroleerd: het manifest van een Steam-app is niet leesbaar, dus prefixen van verwijderde games blijven tot dat wel kan.</string> + <string name="storage_failed">Niet gelukt: %1$s</string> + <string name="storage_desktop_shared">%1$s gedeeld</string> + <string name="storage_data_installed">Geïnstalleerde games</string> + <string name="storage_data_parts">Prefix %1$s · shaders %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Shaders wissen</string> + <string name="storage_data_leftovers">Verwijderde games</string> + <string name="storage_steam_app">Steam-app %1$d</string> + <string name="storage_leftover_unsure_detail">Het prefix bevat nog bestanden, waaronder mogelijk lokale saves</string> + <string name="storage_leftover_confirm">Wist het Wine-prefix en de shadercache (%1$s). Maak eerst een kopie van de saves die je nodig hebt; Steam Cloud-saves blijven in je account.</string> + <string name="storage_data_other">Bewaard</string> + <string name="storage_data_other_title">Niet-Steam-games en gedeeld Steam-prefix</string> + <string name="storage_data_other_detail">Prefixen van games die via winkels of handmatig zijn toegevoegd</string> + <string name="storage_components_packages">Gedownloade pakketten</string> + <string name="storage_components_originals">Bewaarde originelen</string> + <string name="storage_components_none">Geen componentpakketten gedownload.</string> + <string name="storage_component_in_use">Gekozen voor een Proton of game</string> + <string name="storage_component_unused">Nergens gekozen</string> + <string name="storage_original_kept">Zet de geïnstalleerde Proton terug</string> + <string name="storage_original_old">Proton-versie die niet meer is geïnstalleerd</string> + <string name="storage_tag_in_use">In gebruik</string> + <string name="storage_components_note">Componenten in gebruik blijven vergrendeld. Kies ze bij Componenten; wat je hier verwijdert kun je daar opnieuw downloaden.</string> + <string name="storage_component_confirm">Maakt %1$s vrij. Pakketten die je zelf hebt geïmporteerd kun je niet opnieuw downloaden.</string> + <string name="storage_desktop_detail">%1$s voor Flatpak-apps en wat ze delen</string> + <string name="storage_desktop_apps_title">Apps</string> + <string name="storage_desktop_none">Geen Flatpak-apps geïnstalleerd.</string> + <string name="storage_desktop_shared_title">Gedeeld door de apps</string> + <string name="storage_desktop_runtimes">Runtimes</string> + <string name="storage_desktop_runtimes_detail">Bibliotheken waarop de apps draaien; ongebruikte gaan weg met Ongebruikte verwijderen</string> + <string name="storage_desktop_cache">Downloadopslag</string> + <string name="storage_desktop_cache_detail">Object store en gedownloade cache van Flatpak</string> + <string name="storage_desktop_prune">Ongebruikte verwijderen</string> + <string name="storage_desktop_prune_body">Verwijdert runtimes die geen geïnstalleerde app nodig heeft en ruimt de object store van Flatpak op. Geïnstalleerde apps blijven werken.</string> + <string name="storage_flatpak_uninstall_body">Verwijdert de app (%1$s) en de runtimes die niemand anders gebruikt. De gegevens in je thuismap blijven.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d pakket</item> + <item quantity="other">%d pakketten</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d app</item> + <item quantity="other">%d apps</item> + </plurals> + <string name="boot_movie">Opstartvideo</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps oogt vloeiender maar gebruikt meer CPU terwijl Steam opstart. Een opstartvideo die in Steam zelf is gekozen heeft voorrang.</string> + <string name="boot_movie_sound">Geluid</string> + <string name="boot_movie_custom">Eigen video</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV of WebM. Andere formaten en bestanden boven %1$d MB worden op het apparaat omgezet naar 720p-WebM, tot %2$d seconden.</string> + <string name="boot_movie_import">Importeren</string> + <string name="boot_movie_remove">Verwijderen</string> + <string name="boot_movie_pick">Kies een opstartvideo</string> + <string name="boot_movie_imported">%1$s is nu de opstartvideo</string> + <string name="boot_movie_imported_silent">%1$s is nu de opstartvideo, zonder geluid</string> + <string name="boot_movie_too_long">Video\'s die omgezet moeten worden mogen maximaal %1$d seconden duren</string> + <string name="boot_movie_converting">Omzetten %1$d%%</string> + <string name="boot_movie_converting_started">%1$s wordt omgezet voor Steam. Houd DroidDeck open.</string> + <string name="boot_movie_unsupported">Dit apparaat kan deze video niet decoderen.</string> + <string name="boot_movie_import_failed">Kan deze video niet importeren</string> + <string name="glasses_experimental">Luma Ultra-camera\'s — Experimenteel</string> + <string name="glasses_joycons">Positietracking van Joy-Con-controllers</string> + <string name="glasses_joycons_hint">Gebruik de camera\'s van de smartbril om je gekoppelde Joy-Con-controllers te positioneren. Rotatie en knopbediening komen van de Joy-Con-controllers. De positie wordt geschat wanneer je polsen verborgen zijn. Vervangt controllers die met blote handen worden bediend en pauzeert de tracking door de telefooncamera. Richt de Joy-Con-controllers naar voren bij het verbinden of resetten van het trackingcentrum.</string> + <string name="glasses_joycons_requires_position">Schakel eerst positietracking in. Vereist Joy-Con-controllers met bewegingsondersteuning op Android 12 of hoger. Standaard uitgeschakeld.</string> + <string name="setup_tab_glasses">Smartbril</string> + <string name="setup_glasses_scope">Weergave- en hoofdtrackinginstellingen worden gedeeld tussen DroidDeck-menu\'s, games en desktopsessies.</string> + <string name="setup_glasses_connect">Verbind een smartbril om de weergave- en trackinginstellingen te wijzigen. Je opgeslagen instellingen blijven behouden wanneer je de verbinding verbreekt.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Weergavemodus</string> + <string name="glasses_output_2d">2D-uitvoer</string> + <string name="glasses_output_3d">3D-uitvoer</string> + <string name="glasses_picture_group">Beeld en virtueel scherm</string> + <string name="glasses_position_group">Positie en vloerniveau</string> + <string name="glasses_hands_group">Handen volgen — Experimenteel</string> + <string name="glasses_tracking_status">Volgstatus</string> + <string name="glasses_resolution_2d">2D-resolutie</string> + <string name="glasses_resolution_3d">3D-resolutie</string> + <string name="glasses_resolution_vr">VR-resolutie</string> + <string name="glasses_resolution_auto">Automatisch</string> + <string name="glasses_resolution_inherit">Zelfde als 2D / 3D</string> + <string name="glasses_resolution_hint">Uitvoerresolutie per oog.</string> + <string name="glasses_refresh_30_hint">Schakel \'Game on smart glasses\' in om de native 30 Hz-modus van het scherm te selecteren.</string> + <string name="glasses_3dof">3DoF virtueel scherm</string> + <string name="glasses_3dof_hint">Veranker platte games voor je, zodat je om je heen kunt kijken. Schakelt \'Game on smart glasses\' in zonder over te schakelen naar 3D.</string> + <string name="glasses_screen_app_wide">Breedte en afstand werken het virtuele scherm voor DroidDeck-menu\'s, games en desktopsessies direct bij.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Positionele tracking omvat hoofdrotatie in SteamVR. Schakel positionele tracking uit voor tracking met alleen rotatie.</string> + <string name="glasses_head_tracking_spatial_hint">Bestuurt hoofdbeweging op het virtuele scherm. Positionele tracking omvat hoofdrotatie in SteamVR.</string> + <string name="glasses_quick_actions">Snelle acties</string> + <string name="glasses_recenter_screen_hint">Kijk waar je het scherm wilt hebben en reset vervolgens het trackingcentrum om de hoogte en richting in te stellen.</string> + <string name="glasses_recenter_joycons_button">Joy-Con opnieuw centreren</string> + <string name="phone_camera_tracking_group">Telefooncamera — Experimenteel</string> + <string name="phone_camera_tracking_setting">Handen of Joy-Con-controllers volgen</string> + <string name="glasses_position">Positietracking — experimenteel</string> + <string name="glasses_position_hint">Fysieke beweging in VR en rond virtuele schermen. Het opnieuw starten van de tracking duurt even.</string> + <string name="glasses_eye_height">Huidige ooghoogte boven de vloer</string> + <string name="glasses_floor">Stel het vloerniveau in op basis van de huidige hoogte</string> + <string name="glasses_floor_set">Stel het vloerniveau in</string> + <string name="glasses_spatial_setup">Instellingen en diagnostiek van de stereocamera</string> + <string name="glasses_spatial_setup_hint">Controleer de camerakalibratie en de tracking van de handen voordat u gaat spelen.</string> + <string name="glasses_spatial_open">Instellingen openen</string> + <string name="glasses_hands">Controllers bediend met blote handen</string> + <string name="glasses_hands_hint">Gebruik de camera\'s van de smartbril om met uw handen te richten, knijp om te klikken en sluit uw hand om te grijpen in VR. De sticks van de gamepad bewegen en draaien. Vervangt de positietracking van de Joy-Con. Kan vertraging of verlies van tracking tijdens games veroorzaken.</string> + <string name="glasses_hands_ready_hint">Schakel \'Controllers bediend met blote handen\' in onder Luma Ultra-camera\'s in Tracking. Toon eerst open handen.</string> + <string name="glasses_hands_base">Gedeelde Luma Ultra-kalibratie</string> + <string name="glasses_hands_base_hint">Gebruik van de gedeelde Luma Ultra-basis. Kalibreer je eigen slimme bril om de nauwkeurigheid te controleren.</string> + <string name="glasses_hands_calibration_verified">Gemeten kalibratie geverifieerd</string> + <string name="glasses_hands_calibration_required">Validatie vereist</string> + <string name="glasses_hands_calibration_required_hint">Bedieningselementen die met de blote handen worden bediend, worden beschikbaar nadat de controle van de gemeten afstand is geslaagd.</string> + <string name="tracking_recovery_lost">Tracking verloren</string> + <string name="tracking_recovery_look">Kijk langzaam rond in een goed verlichte ruimte.\nHoud de trackingcamera\'s vrij en richt ze op meubels of andere zichtbare details.</string> + <string name="tracking_recovery_restart_help">Zit je nog steeds vast? Op uw telefoon: slimme bril → Volgen → Open instellingen → Diagnose weergeven → Volg opnieuw starten.</string> + <string name="tracking_recovery_disconnected">Slimme bril losgekoppeld</string> + <string name="tracking_recovery_connect">Controleer de USB-verbinding en sluit de slimme bril opnieuw aan.\nAccepteer de USB-toegangsprompt op uw telefoon als deze verschijnt.</string> + <string name="tracking_recovery_usb_help">Eenmaal verbonden, kijk langzaam rond in een goed verlichte kamer om de tracking te herstellen.</string> + <string name="tracking_recovery_recenter">Opnieuw centreren vereist</string> + <string name="tracking_recovery_recenter_steps">Tracking is teruggekeerd op een nieuwe positie.\nKijk naar voren en tik vervolgens op \'Trackingcentrum resetten\' op je telefoon.</string> + <string name="tracking_recovery_recenter_help">Je kunt het resetten van het trackingcentrum ook vinden in de smartbril → Tracking → Instellingen openen. Je opgeslagen camerakalibratie blijft behouden.</string> + <string name="tracking_recovery_stabilizing">Houd even stil</string> + <string name="tracking_recovery_hold">Het resetten van het trackingcentrum is bezig.\nHoud de smartbril stil terwijl de tracking stabiliseert.</string> + <string name="tracking_recovery_automatic">Dit scherm sluit automatisch als Head Tracking gereed is.</string> + <string name="glasses_steady_hand_aim">Gestabiliseerd richten met de handen</string> + <string name="glasses_steady_hand_aim_hint">Richt vanaf je schouder door je handpalm. Schakel uit voor polsgestuurde rotatie.</string> + <string name="spatial_title">Ruimtelijke instellingen</string> + <string name="spatial_wait_tracking">Wachten op tracking…</string> + <string name="spatial_cameras_description">Volgcamera\'s links en rechts</string> + <string name="spatial_camera_sync">Camerasynchronisatie</string> + <string name="spatial_ready">Klaar</string> + <string name="spatial_sync_hint">Wachten tot camera- en hoofdtracking op één lijn staan. Houd de slimme bril verbonden.</string> + <string name="spatial_prepare">1. Bereid het kalibratiedoel voor</string> + <string name="spatial_print_actual">Afdrukken op ware grootte</string> + <string name="spatial_print_hint">Elk vierkant moet 30 mm (1,181 inch) zijn. Monteer de plaat plat op een stevig oppervlak in een goed verlichte ruimte.</string> + <string name="spatial_print">Kalibratiepatroon afdrukken</string> + <string name="spatial_capture_group">2. Leg verschillende weergaven vast</string> + <string name="spatial_board_stationary">Houd het kalibratiedoel stil</string> + <string name="spatial_capture_hint">Plaats de slimme bril dichterbij, verder en zijwaarts. Draai ze naar links/rechts, kantel ze omhoog/omlaag en kantel ze zijwaarts. Bewaar het kalibratiedoel in beide camera\'s en pauzeer kort voor elke opname.</string> + <string name="spatial_start">Nieuwe kalibratie starten</string> + <string name="spatial_wait_sync">Wachten op camerasynchronisatie.</string> + <string name="spatial_start_hint">Start een nieuwe kalibratie om weergaven te verzamelen.</string> + <string name="spatial_views_hint">Houd het kalibratiedoel zichtbaar in beide voorbeelden. Leg minimaal 24 scherpe beelden vast vanuit verschillende hoeken.</string> + <string name="spatial_capturing">Vastleggen…</string> + <string name="spatial_capture">Kalibratiedoelweergave vastleggen</string> + <string name="spatial_alignment">Bereken de camera-uitlijning</string> + <string name="spatial_calculating">Berekenen…</string> + <string name="spatial_calculate">Kalibratie berekenen</string> + <string name="spatial_distance_group">3. Controleer de afstand</string> + <string name="spatial_distance">Gemeten afstand</string> + <string name="spatial_distance_hint">Begin met 30 cm of 12 inch, zodat de afgedrukte markeringen gemakkelijker te detecteren zijn. Kies de exacte maat die u gaat gebruiken.</string> + <string name="spatial_camera_board_distance">Linkercamera naar midden kalibratiedoel</string> + <string name="spatial_checking_distance">Afstand controleren…</string> + <string name="spatial_validate">Afstand valideren</string> + <string name="spatial_diagnostics">Diagnostiek</string> + <string name="spatial_show_diagnostics">Diagnose weergeven</string> + <string name="spatial_diagnostics_hint">Hersteltools voor cameratiming en tracking.</string> + <string name="spatial_camera_timing">Cameratiming</string> + <string name="spatial_hand_input">Invoer van het volgen van handen</string> + <string name="spatial_wait_timing">Wachten op cameratiming.</string> + <string name="spatial_frames">Camerabeelden</string> + <string name="spatial_gpu">GPU-detectie van handen</string> + <string name="spatial_gpu_hint">CPU is de standaardwaarde. GPU is experimenteel en kan ervoor zorgen dat SteamVR opnieuw opstart. Deze keuze wordt gereset wanneer het volgen opnieuw wordt gestart.</string> + <string name="spatial_lite">Lite-detectie van handmodellen</string> + <string name="spatial_lite_hint">Gebruik de Lite-handpalmdetector en Lite-sleutelpunten op de handen. Controleer de nauwkeurigheid van richten, knijpen en grijpen. Wordt gereset wanneer het volgen opnieuw wordt gestart.</string> + <string name="spatial_adaptive">Automatische invoerfrequentie voor het volgen van handen</string> + <string name="spatial_adaptive_hint">Pas de invoer aan de verwerkingssnelheid aan. Wordt gereset wanneer het volgen opnieuw wordt gestart.</string> + <string name="spatial_half_rate">Beperk de ingangsfrequentie voor het volgen van handen</string> + <string name="spatial_half_rate_hint">Gebruik de helft van de camerabeelden. Schakel uit om de maximale frequentie te vergelijken. Wordt gereset wanneer het volgen opnieuw wordt gestart.</string> + <string name="spatial_diagnostic_capture">Diagnostische registratie</string> + <string name="spatial_diagnostic_capture_hint">Eén stereobeeldpaar lokaal opslaan. Afbeeldingen worden alleen opgeslagen als daarom wordt gevraagd.</string> + <string name="spatial_save_frame">Camerabeeld opslaan</string> + <string name="spatial_restart_tracking">Start het volgen opnieuw</string> + <string name="spatial_restart_hint">Gebruiken als de tracking niet herstelt in een goed verlichte ruimte. Voor een herstart is een nieuwe trackingoorsprong vereist.</string> + <string name="spatial_restart">Opnieuw opstarten</string> + <string name="spatial_restart_title">Volgen opnieuw starten?</string> + <string name="spatial_restart_confirm">Niet-opgeslagen kalibratiebeelden gaan verloren. Houd de smartbril daarna stil en reset het trackingcentrum wanneer de tracking is hersteld.</string> + <string name="spatial_views_count">%1$d / 24 weergaven vastgelegd</string> + <string name="spatial_capture_paused">Opname onderbroken: %1$s</string> + <string name="spatial_measure_hint">Meet %1$s. Zorg dat het volledige kalibratiedoel in beide cameravoorbeelden zichtbaar is en houd de bril vervolgens stil.</string> + <string name="spatial_timing_values">%1$.1f Hz • beeldleeftijd %2$.1f ms • verwerking %3$.1f ms</string> + <string name="spatial_input_values">Ingangslimiet %1$.1f Hz • %2$.0f%% van camerabeelden. Het volgen van het hoofd gaat door op de maximale frequentie.</string> + <string name="spatial_frame_counts">%1$d verwerkt • %2$d verwijderd • %3$d overgeslagen op invoerlimiet</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra-kalibratie</string> + <string name="spatial_print_scale" formatted="false">Afdrukken op 100% / ware grootte. Elk vierkant: 30 mm (1,181 inch).</string> + <string name="spatial_print_stationary">Houd het kalibratiedoel vlak en stil; verplaats de slimme bril tussen opnames.</string> + <string name="spatial_print_check">Schaalcontrole: 100 mm (3,937 inch) tussen tikken</string> + <string name="spatial_distance_12in">12 inch (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 inch)</string> + <string name="spatial_distance_20in">20 inch (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 inch)</string> + <string name="spatial_disabled">Uitgeschakeld</string> + <string name="spatial_wait_stable">Wachten op stabiele tracking</string> + <string name="spatial_disconnected">Verbinding verbroken</string> + <string name="spatial_hands_off">Controllers die met blote handen worden bediend, zijn uitgeschakeld</string> + <string name="spatial_tracking_off">Positionele tracking is uitgeschakeld of de slimme bril is losgekoppeld</string> + <string name="spatial_recenter_pending">Resetten van het trackingcentrum aangevraagd — blijf stil staan ​​terwijl de tracking stabiliseert.</string> + <string name="spatial_tracking_lost">Tracering verloren: kijk naar een goed verlicht gebied met zichtbare details</string> + <string name="spatial_origin_changed">Trackingoorsprong gewijzigd — tik op \'Trackingcentrum resetten\' en blijf vervolgens stil staan.</string> + <string name="spatial_active">6DoF actief</string> + <string name="spatial_connect_hint">Sluit Luma Ultra aan en schakel positionele tracking in.</string> + <string name="spatial_validation_session">Kalibratie geverifieerd voor deze verbinding.</string> + <string name="spatial_validation_saved">Kalibratie geverifieerd en opgeslagen.</string> + <string name="spatial_wait_cameras">Wachten op stereocamera\'s</string> + <string name="spatial_wait_hands">Wachten op volgen van handen</string> + <string name="spatial_collect_instructions">Houd het 5 × 7-kalibratiedoel stationair. Leg meer dan 24 beelden vast terwijl u de slimme bril beweegt en draait.</string> + <string name="spatial_capture_pending">Wachten op het volgende camerabeeld. Houd de slimme bril stil.</string> + <string name="spatial_validation_pending">Het volgende camerabeeld controleren. Houd het volledige kalibratiedoel zichtbaar en blijf stil staan.</string> + <string name="spatial_start_first">Start eerst de kalibratie</string> + <string name="spatial_no_camera_frame">Er is geen nieuw camerabeeld binnengekomen. Controleer de slimme brilverbinding en cameravoorbeelden en probeer het opnieuw.</string> + <string name="spatial_clock_reset">Cameraklok opnieuw instellen</string> + <string name="spatial_frame_changed">Trackingcoördinatensysteem gewijzigd. Je beelden worden opgeslagen voor herberekening. Reset het trackingcentrum en start een nieuwe set om meer beelden vast te leggen.</string> + <string name="spatial_device_loaded">apparaatkalibratie geladen</string> + <string name="spatial_base_loaded">Luma Ultra-basiskalibratie geladen</string> + <string name="spatial_calibration_needed">kalibratie vereist</string> + <string name="spatial_tap_start">Tik op Start eerst nieuwe kalibratie.</string> + <string name="spatial_capture_recenter_pending">Het resetten van het trackingcentrum wacht op stabiele tracking. Blijf even stil staan.</string> + <string name="spatial_capture_recenter">Tracking gewijzigd. Tik één keer op \'Trackingcentrum resetten\' en blijf vervolgens stil staan ​​voordat je een opname maakt.</string> + <string name="spatial_capture_unsynchronized">Opname afgewezen: de hoofdtracking was niet gesynchroniseerd of is tijdens de opname veranderd. Houd de bril stil en probeer het opnieuw.</string> + <string name="spatial_align_first">Bereken de camera-uitlijning voordat u de afstand controleert.</string> + <string name="spatial_processing_failed">Cameraverwerking mislukt</string> + <string name="spatial_hand_head_changed">Volgen van hoofd gewijzigd tijdens detectie van handen</string> + <string name="spatial_hand_wait_sync">Wachten op camera- en hoofdsynchronisatie</string> + <string name="spatial_no_wrists">Geen polsen gedetecteerd. Houd de handgrepen van uw Joy-Con-controller vóór de slimme bril</string> + <string name="spatial_no_hands">Geen handen gedetecteerd. Toon open handpalmen voor de slimme bril</string> + <string name="spatial_one_camera_wrists">Polsen zichtbaar in slechts één camera; houd uw controllerhandvatten in de gedeelde weergave</string> + <string name="spatial_one_camera_hands">Handen zichtbaar in slechts één camera; houd beide handpalmen in het gedeelde zicht</string> + <string name="spatial_ambiguous_hands">Beide camera\'s zien handen, maar links/rechts matchen is dubbelzinnig</string> + <string name="spatial_inconsistent_depth">Handen gedetecteerd, maar de stereodiepte is inconsistent</string> + <string name="spatial_rejected_wrist">Polspositie afgewezen door stereo- of bewegingscontroles</string> + <string name="spatial_inconsistent_palm">Stereopunten gedetecteerd, maar de palmgeometrie is inconsistent</string> + <string name="spatial_hands_need_calibration">Voltooi de kalibratie en de afstandscontrole om de handen in te schakelen</string> + <string name="spatial_hands_wait_stable">Wachten op stabiele hoofdtracking; reset het trackingcentrum indien aangevraagd.</string> + <string name="spatial_old_frame">Cameraobservatie is te oud; wachtend op een nieuw paar</string> + <string name="spatial_fit_ready">Pas %1$.2f px aan. Meet de door u geselecteerde afstand vanaf de linkercamera tot het midden van het kalibratiedoel en valideer vervolgens.</string> + <string name="spatial_opencv_error">OpenCV niet beschikbaar: %1$s</string> + <string name="spatial_restored">%1$d opgeslagen weergaven hersteld. Bereken de kalibratie om het opnieuw te proberen, of start een nieuwe set om meer vast te leggen.</string> + <string name="spatial_captured">Vastgelegd %1$d / 24 weergaven. Houd het kalibratiedoel vast; verplaats de slimme bril voor de volgende weergave.</string> + <string name="spatial_capture_corners">Opname afgewezen: %1$d / 12 vereiste hoeken zichtbaar in beide camera\'s. Laat meer van het kalibratiedoel zien, blijf stil staan ​​en probeer het opnieuw.</string> + <string name="spatial_validation_error">Afstandscontrole kon niet worden voltooid: %1$s. Probeer het opnieuw.</string> + <string name="spatial_inference_error">Detectie van handen niet beschikbaar: %1$s. Wijzig CPU/GPU of schakel controllers die met blote handen worden bediend om het opnieuw te proberen.</string> + <string name="spatial_hand_timeout">De detectie van handen overschreed %1$d ms; observatie weggegooid</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con-polsposities gemeten in stereo</string> + <string name="spatial_palms_tracked">Gevolgde handpalmen: %1$d / 2; knijpgebaar gereed: %2$d; grijpgebaar gereed: %3$d</string> + <string name="spatial_capture_saved">Diagnostische opname opgeslagen in %1$s</string> + <string name="spatial_hand_error">Volgen van handen gestopt: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Hoofdtracking en het kalibratiedoel verschillen van elkaar met %1$s (limiet 5 cm / 2 inch). Houd het kalibratiedoel vast en wacht op een stabiele tracking voordat u met een nieuwe set begint. Draai en kantel de slimme bril voorzichtig; pauzeer vóór elke opname.</string> + <string name="spatial_need_views">Leg ten minste 24 gevarieerde weergaven vast van het stationaire kalibratiedoel.</string> + <string name="spatial_need_rotation">Draai de slimme bril naar links en rechts en kantel hem op en neer; beweging zonder rotatie kan de uitlijning van de camera niet kalibreren.</string> + <string name="spatial_bad_baseline">Ongeloofwaardige camerabasislijn</string> + <string name="spatial_need_orientations">Beweeg je hoofd door meer gevarieerde oriëntaties.</string> + <string name="spatial_bad_rotation">Ongeldige rotatie van camera naar hoofd</string> + <string name="spatial_bad_alignment">De uitlijning van de camera naar het hoofd is inconsistent.</string> + <string name="spatial_calibration_error">Kalibratie kon niet worden voltooid. %1$s Uw vastgelegde weergaven worden opgeslagen.</string> + <string name="spatial_reprojection_error">Vastgehouden herprojectiefout %1$.2f px is groter dan 2 px. Opnieuw kalibreren.</string> + <string name="spatial_distance_corners">%1$d / 24 schaakbordhoeken gedetecteerd in beide camera\'s. Houd het volledige kalibratiedoel zichtbaar en blijf stil staan. Als het al zichtbaar is, selecteert u 12 inch of 30 cm en meet u de kleinere afstand voordat u het opnieuw probeert.</string> + <string name="spatial_distance_depth">Het kalibratiedoel is zichtbaar, maar de diepte ervan kon niet betrouwbaar worden gemeten. Houd de slimme bril stil en houd het kalibratiedoel vlak en goed verlicht. Probeer het vervolgens opnieuw.</string> + <string name="spatial_distance_invalid">De camerameting was ongeldig. Houd stil en probeer het opnieuw.</string> + <string name="spatial_distance_passed">Afstandscontrole geslaagd.</string> + <string name="spatial_distance_retry">Controleer opnieuw de afstand van de linkercamera tot het midden van het kalibratiedoel en probeer het opnieuw.</string> + <string name="spatial_distance_result">Camera\'s gemeten %1$s; geselecteerde afstand %2$s. %3$s</string> + <string name="spatial_wait_previews">Wacht op beide cameravoorbeelden voordat u de kalibratie start.</string> + <string name="spatial_saved_views_hint">Opgeslagen weergaven kunnen opnieuw worden berekend. Start een nieuwe kalibratie om vast te leggen in het huidige volgcoördinatensysteem.</string> + <string name="spatial_model_checksum_error">Controlesom handmodel komt niet overeen</string> + <string name="spatial_opencv_load_error">OpenCV kon niet laden</string> + <string name="glasses_6dof">Virtueel scherm met 6DoF</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> +</resources> diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml new file mode 100644 index 0000000000..32634d99be --- /dev/null +++ b/app/src/main/res/values-pl/strings.xml @@ -0,0 +1,2955 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Grafika SteamVR przestała działać</string> + <string name="steamvr_recovery_countdown">DroidDeck uruchomi się ponownie za %1$d s, aby zresetować grafikę i ponownie otworzyć SteamVR. Uruchomiona gra zostanie zamknięta; niezapisanego postępu nie da się przywrócić.</string> + <string name="steamvr_recovery_repeated">Błąd grafiki powrócił wkrótce po ponownym uruchomieniu. Automatyczne odzyskiwanie wstrzymano, aby uniknąć pętli. Ponowne uruchomienie zamknie grę; niezapisanego postępu nie da się przywrócić.</string> + <string name="steamvr_recovery_restart">Uruchom ponownie</string> + <string name="steamvr_recovery_cancel">Nie zamykaj</string> + <string name="steamvr_recovery_restarting">Resetowanie grafiki i ponowne otwieranie SteamVR…</string> + <string name="steamvr_recovery_failed">Nie udało się automatycznie uruchomić ponownie DroidDeck. Całkowicie zamknij aplikację, a potem otwórz ją ponownie.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Przy pierwszym uruchomieniu pobierany jest Steam. Może to potrwać kilka minut.</item> + <item>Domyślnie wyjście z aplikacji wstrzymuje Steam; po powrocie wznowi on działanie tam, gdzie przerwał.</item> + <item>Twój kontroler jest widoczny jako pad Xbox 360. Bez niego użyj sterowania ekranowego.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Przy pierwszym uruchomieniu konfigurowany jest pulpit. Może to potrwać kilka minut.</item> + <item>Domyślnie wyjście z aplikacji wstrzymuje sesję; po powrocie wznowi się ona tam, gdzie została przerwana.</item> + <item>Ekran działa jak touchpad: przeciągnij, aby przesunąć kursor, dotknij, aby kliknąć.</item> + <item>Twój kontroler jest widoczny jako pad Xbox 360. Bez niego użyj sterowania ekranowego.</item> + </string-array> + <string name="session_channel">Sesja</string> + <string name="session_channel_description">Widoczne, gdy otwarta jest sesja Steam lub pulpitu</string> + <string name="session_notification">Steam działa</string> + <string name="session_notification_downloads">Trwa pobieranie w Steam</string> + <string name="session_notification_paused">Sesja wstrzymana – dotknij „Wznów”, aby kontynuować</string> + <string name="resume_session">Wznów</string> + <string name="suspend_now">Wstrzymaj teraz</string> + <string name="stop_session">Zatrzymaj sesję</string> + <string name="frame_gen_title">Generowanie klatek</string> + <string name="frame_gen_hint">Wybierz tryb generowania klatek</string> + <string name="frame_gen_off">Wył.</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG adaptacyjne %1$d</string> + <string name="lsfg_needs_steam">Wymaga Lossless Scaling ze Steam</string> + <string name="lsfg_needs_install">Zainstaluj Lossless Scaling w Steam lub zaimportuj Lossless.dll</string> + <string name="lsfg_import">Importuj Lossless.dll…</string> + <string name="lsfg_using_steam">Używana jest kopia ze Steam</string> + <string name="lsfg_using_import">Używana jest zaimportowana kopia</string> + <string name="lsfg_pick_title">Wybierz Lossless.dll</string> + <string name="lsfg_imported">Zaimportowano Lossless.dll</string> + <string name="lsfg_import_unchanged">Ten plik Lossless.dll jest już używany</string> + <string name="lsfg_import_not_owned">To konto Steam nie ma Lossless Scaling</string> + <string name="lsfg_import_invalid">Ten plik to nie Lossless.dll z Lossless Scaling</string> + <string name="lsfg_import_failed">Nie udało się przygotować LSFG z tego pliku Lossless.dll</string> + <string name="lsfg_problem_missing">LSFG wymaga Lossless Scaling ze Steam lub zaimportowanego pliku Lossless.dll</string> + <string name="lsfg_problem_failed">Nie udało się przygotować shaderów LSFG z pliku Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: nieobsługiwane</string> + <string name="hud_fg_failed">%1$s: błąd silnika</string> + <string name="hud_fg_needs_lossless">%1$s: wymaga Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · uruchamianie</string> + <string name="second_library_import_hint">Dodaje bibliotekę Steam i wyszukuje w niej gry na Windows. Posiadane gry korzystają ze swoich wpisów w Steam, a pozostałe stają się skrótami do gier spoza Steam.</string> + <string name="game_env_title">Środowisko gry</string> + <string name="game_env_hint">Zmienne środowiskowe dla gier uruchamianych przez Proton.</string> + <string name="game_env_edit">Edytuj</string> + <string name="game_env_shared">Wszystkie gry Proton</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">ID aplikacji Steam</string> + <string name="game_env_open">Otwórz</string> + <string name="game_env_profile">Gra %1$s</string> + <string name="game_env_add">Dodaj zmienną</string> + <string name="game_env_name">Nazwa zmiennej</string> + <string name="game_env_value">Wartość</string> + <string name="game_env_save">Zapisz</string> + <string name="game_env_remove">Usuń</string> + <string name="game_env_restore">Przywróć dziedziczenie</string> + <string name="game_env_reset">Wyczyść nadpisania środowiska</string> + <string name="game_env_unset">Nie ustawiaj w tym profilu</string> + <string name="game_env_empty">Brak ustawionych zmiennych.</string> + <string name="game_env_inherited">Dziedziczona</string> + <string name="game_env_custom">Własna zmienna</string> + <string name="game_env_error">Nie udało się wczytać ani zapisać. Sprawdź wolne miejsce i spróbuj ponownie.</string> + <string name="game_env_invalid">Podaj prawidłową nazwę i wartość do 8192 znaków.</string> + <string name="game_env_unused">Standardowe środowisko uruchomieniowe Proton nie odczytuje tej zmiennej.</string> + <string name="game_env_loading">Wczytywanie…</string> + <string name="game_env_feature">Wymuszenie poziomu funkcji D3D12. 12_2 zgłasza możliwości DirectX 12 Ultimate; nieobsługiwane funkcje mogą zawieść. Pozostaw nieustawione, aby wykrywać automatycznie.</string> + <string name="game_env_shader">Wymuszenie modelu shaderów D3D12. 6_9 wymaga odpowiednio nowego VKD3D i pasujących funkcji GPU. Pozostaw nieustawione, aby wykrywać automatycznie.</string> + <string name="game_env_cache">Pozostaw włączoną pamięć podręczną shaderów Mesa, aby ograniczyć ponowną kompilację. false włącza pamięć podręczną.</string> + <string name="game_env_cache_size">Maksymalny rozmiar pamięci podręcznej shaderów Mesa, np. 1G. Większa pamięć podręczna zajmuje więcej miejsca.</string> + <string name="game_env_vkd3d_config">Opcje VKD3D dla D3D12. nodxr wyłącza ray tracing; używaj tylko w grze, która tego wymaga.</string> + <string name="game_env_proton_log">Ustaw 1, aby tworzyć dziennik diagnostyczny Proton. Zapis dziennika może obniżyć wydajność i zajmuje miejsce.</string> + <string name="game_env_wined3d">Ustaw 1, aby do testów zgodności D3D9–11 używać WineD3D opartego na OpenGL zamiast DXVK.</string> + <string name="game_env_no_ntsync">Ustaw 1, aby ta gra nie korzystała z ntsync (droiddeck-ntsync ani sterownika jądra); użyje droiddeck-esync, jeśli istnieje pakiet, a w przeciwnym razie droiddeck-fsync.</string> + <string name="game_env_no_esync">Ustaw 1, aby wyłączyć droiddeck-esync w tej grze; zamiast niego użyje droiddeck-fsync lub droiddeck-ntsync, gdy fsync też jest wyłączone.</string> + <string name="game_env_no_fsync">Ustaw 1, aby ta gra nie korzystała z droiddeck-fsync; użyje droiddeck-esync, jeśli istnieje pakiet, a w przeciwnym razie droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Ustaw 1, aby uruchamiać tę grę na droiddeck-fsync, lub 0, aby preferować droiddeck-esync, gdy pakiet pasuje do jej wersji Proton.</string> + <string name="game_env_xalia">Ustaw 0, aby wyłączyć w tej grze pomocnika Proton do nawigacji kontrolerem.</string> + <string name="game_env_hud">Nakładka DXVK dla D3D9–11. fps pokazuje liczbę klatek; brak wartości ją ukrywa.</string> + <string name="game_env_dxvk_config">Ustawienia DXVK rozdzielone średnikami. Nowsze wersje ograniczają klatki przez dxvk.maxFrameRate; do zwykłej gry lepiej użyć limitu klatek sesji.</string> + <string name="game_env_vkd3d_limit">Limit liczby klatek D3D12. 0 wyłącza limit.</string> + <string name="game_env_glthread">Wielowątkowość OpenGL w Mesa. true może pomóc grom OpenGL ograniczonym przez CPU; testuj każdą grę osobno.</string> + <string name="sync_backend_title">Synchronizacja Wine</string> + <string name="sync_backend_hint">Jak gry synchronizują swoje wątki. Działa od następnej sesji.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Preset FEX</string> + <string name="fex_next_launch">Działa od następnego uruchomienia gry.</string> + <string name="game_settings_title">Gry</string> + <string name="fex_default_label">Domyślne FEX</string> + <string name="fex_default_detail">Używa domyślnych ustawień FEX.</string> + <string name="fex_stability_label">Stabilność</string> + <string name="fex_stability_detail">Najbezpieczniejsze, najwolniejsze ustawienia.</string> + <string name="fex_compatibility_label">Zgodność</string> + <string name="fex_compatibility_detail">Pełne TSO z multiblock.</string> + <string name="fex_intermediate_label">Pośredni</string> + <string name="fex_intermediate_detail">Zrównoważone TSO z obniżoną precyzją x87.</string> + <string name="fex_performance_label">Wydajność</string> + <string name="fex_performance_detail">Całe TSO wyłączone; multiblock.</string> + <string name="fex_performance_tso_label">Wydajność + TSO</string> + <string name="fex_performance_tso_detail">Ustawienia „Wydajność” z włączonym głównym TSO.</string> + <string name="fex_extreme_label">Ekstremalny</string> + <string name="fex_extreme_detail">Wyłącza kontrole kodu samomodyfikującego się. Gry z JIT i DRM mogą przestać działać.</string> + <string name="fex_extreme_tso_label">Ekstremalny + TSO</string> + <string name="fex_extreme_tso_detail">Ustawienia „Ekstremalny” z włączonym głównym TSO.</string> + <string name="fex_extreme_gn_label">Ekstremalny-gn</string> + <string name="fex_extreme_gn_detail">Wydajność z TSC i wskazówkami metadanych. Wypróbuj przed „Ekstremalnym”.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Wydajność z pełnymi kontrolami kodu i ukrytym bitem hiperwizora.</string> + <string name="game_env_custom_value">Własna wartość</string> + <string name="game_env_select_value">Wybierz wartość</string> + <string name="user_apps_section">Emulatory i aplikacje</string> + <string name="user_apps_add">Dodaj</string> + <string name="user_apps_add_detail">Twoja własna aplikacja lub gra</string> + <string name="user_apps_kind_script">Skrypt</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Uruchamianie…</string> + <string name="user_apps_added">Dodano: %1$s</string> + <string name="user_apps_removed">Usunięto: %1$s</string> + <string name="user_apps_back">Pulpit</string> + <string name="user_apps_gone">Tej aplikacji już nie ma. Wybierz ją ponownie z Pulpitu.</string> + <string name="user_apps_open">Otwórz %1$s</string> + <string name="user_apps_remove">Usuń</string> + <string name="user_apps_remove_confirm">Naciśnij ponownie, aby usunąć</string> + <string name="user_apps_stop_session">Zatrzymaj sesję, aby usunąć</string> + <string name="user_apps_script_linked">Uruchamia %1$s z jego folderu, podłączonego do sesji tam, gdzie się znajduje. Usunięcie aplikacji nie zmienia tego folderu.</string> + <string name="user_apps_script_copied">Uruchamia %1$s z kopii jego folderu w DroidDeck. Usunięcie aplikacji kasuje kopię, a nie oryginał.</string> + <string name="user_apps_runtime_required">Najpierw zainstaluj środowisko Linux</string> + <string name="user_apps_file_gone">Pliku już nie ma</string> + <string name="user_apps_no_space">Za mało wolnego miejsca: skopiowanie folderu wymaga %1$s</string> + <string name="user_apps_copying">Kopiowanie %1$s</string> + <string name="user_apps_failed">Nie udało się dodać aplikacji</string> + <string name="user_apps_github_checking">Szukanie wydania %1$s</string> + <string name="user_apps_github_unreachable">Nie udało się odczytać wydań %1$s</string> + <string name="user_apps_github_no_appimage">Żadne wydanie %1$s nie zawiera AppImage ARM64 ani x86_64</string> + <string name="user_apps_downloading">Pobieranie %1$s</string> + <string name="user_apps_download_failed">Pobieranie nie powiodło się</string> + <string name="user_apps_update_failed">Nie udało się zaktualizować aplikacji</string> + <string name="user_apps_icon_failed">Nie udało się odczytać tej ikony</string> + <string name="user_apps_saved">Zapisano: %1$s</string> + <string name="user_apps_edit">Edytuj</string> + <string name="user_apps_check_updates">Sprawdź aktualizacje</string> + <string name="user_apps_checking_updates">Sprawdzanie aktualizacji…</string> + <string name="user_apps_update_to">Aktualizuj do %1$s</string> + <string name="user_apps_up_to_date">Aktualna · %1$s</string> + <string name="user_apps_updated">Zaktualizowano: %1$s</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Dodaj aplikację</string> + <string name="add_app_tab_script">Skrypt</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Plik .sh. Uruchamia się z własnego folderu, na pełnym ekranie w gamescope.</string> + <string name="add_app_appimage_hint">AppImage ARM64 (aarch64) lub x86_64 uruchamiany przez FEX. Jest jednorazowo rozpakowywany do środowiska Linux.</string> + <string name="add_app_github_hint">Instaluje AppImage ARM64 z najnowszego wydania repozytorium lub wersję x86_64 przez FEX.</string> + <string name="app_fex_title">Używaj FEX</string> + <string name="app_fex_auto">Auto</string> + <string name="app_fex_on">Wł.</string> + <string name="app_fex_off">Wył.</string> + <string name="app_fex_hint">FEX uruchamia programy Linux x86 na tym urządzeniu ARM64. Auto używa go, gdy program jest zbudowany dla x86.</string> + <string name="app_fex_x86">%1$s przez FEX</string> + <string name="app_fex_not_ready">Ten program jest zbudowany dla komputerów %1$s i działa przez FEX, który nie jest jeszcze skonfigurowany. Otwórz raz Steam po zalogowaniu: DroidDeck pobierze wtedy FEX i potrzebne Steam Linux Runtime, a potem program się otworzy.</string> + <string name="session_end_program">Ten program</string> + <string name="session_end_fex_missing">%1$s jest zbudowany dla komputerów x86 i działa przez FEX, który nie jest jeszcze zainstalowany. Uruchom raz Steam po zalogowaniu i pozwól mu pobrać FEX oraz Steam Linux Runtime, a potem uruchom program ponownie.</string> + <string name="add_app_flatpak_hint">ID aplikacji z Flathub lub jej strona na Flathub. Jeśli Flatpak nie jest jeszcze skonfigurowany, zostanie skonfigurowany najpierw.</string> + <string name="add_app_file">Plik</string> + <string name="add_app_no_file">Nie wybrano pliku</string> + <string name="add_app_choose_file">Wybierz plik</string> + <string name="add_app_change_file">Zmień</string> + <string name="add_app_pick_script">Wybierz skrypt</string> + <string name="add_app_pick_appimage">Wybierz AppImage</string> + <string name="add_app_pick_icon">Wybierz ikonę</string> + <string name="add_app_repository">Repozytorium</string> + <string name="add_app_repository_placeholder">właściciel/repo lub link github.com</string> + <string name="add_app_repository_invalid">To nie jest repozytorium GitHub</string> + <string name="add_app_flatpak_id">ID aplikacji</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">To nie jest ID aplikacji z Flathub</string> + <string name="add_app_flatpak_bundle_hint">Lub plik .flatpak dla aplikacji spoza Flathub.</string> + <string name="add_app_pick_flatpak">Wybierz plik .flatpak</string> + <string name="add_app_source">Źródło</string> + <string name="add_app_appearance">Na pulpicie</string> + <string name="add_app_preview_name">Nowa aplikacja</string> + <string name="add_app_name">Nazwa</string> + <string name="add_app_name_placeholder">Z aplikacji</string> + <string name="add_app_icon">Ikona</string> + <string name="add_app_icon_default">Domyślna ikona</string> + <string name="add_app_choose_icon">Wybierz ikonę</string> + <string name="add_app_clear_icon">Wyczyść</string> + <string name="add_app_icon_suggestions">Z repozytorium</string> + <string name="add_app_icon_searching">Szukanie ikon…</string> + <string name="add_app_icon_reset">Domyślna</string> + <string name="edit_app_title">Edytuj %1$s</string> + <string name="edit_app_save">Zapisz</string> + <string name="add_app_checking_folder">Sprawdzanie folderu…</string> + <string name="add_app_folder_linked">Jego folder jest podłączony do sesji: %1$s</string> + <string name="add_app_folder_copied">Jego folder zawiera programy Linux, których nie można uruchomić z pamięci współdzielonej, więc zostanie skopiowany do DroidDeck (%1$s).</string> + <string name="add_app_confirm">Dodaj</string> + <string name="add_app_cancel">Anuluj</string> + <string name="add_app_runtime_required">Najpierw zainstaluj środowisko Linux w sekcji Konfiguracja.</string> + <string name="add_app_busy">Poczekaj, aż %1$s się zakończy.</string> + <string name="steam_compat_label">Zgodny</string> + <string name="proton_compatible_note">Wersje oznaczone „%1$s” w menu Zgodność w Steam mają poprawki prefiksu od DroidDeck i uruchamiają tu gry. Domyślnie jest to Proton Experimental ARM64 (%1$s) lub Proton 11.0 ARM64 (%1$s), gdy ta nowsza wersja jest zainstalowana. Własne wpisy Proton od Valve bez tego oznaczenia nie uruchomią gry na tym urządzeniu.</string> + <string name="proton_installed_compatible">Zainstalowano %1$s · %2$s</string> + <string name="common_cancel">Anuluj</string> + <string name="common_auto">Auto</string> + <string name="common_never">Nigdy</string> + <string name="common_always">Zawsze</string> + <string name="common_uninstall">Odinstaluj</string> + <string name="common_check">Sprawdź</string> + <string name="common_update">Aktualizuj</string> + <string name="common_checking">Sprawdzanie…</string> + <string name="common_working">Przetwarzanie…</string> + <string name="common_forget">Zapomnij</string> + <string name="common_add_ellipsis">Dodaj…</string> + <string name="common_use">Użyj</string> + <string name="common_applies_next_session">Działa od następnej sesji.</string> + <string name="mode_steam_title">Sesja Steam</string> + <string name="mode_desktop_title">Sesja pulpitu</string> + <string name="mode_display">Wyświetlacz</string> + <string name="mode_resolution">Rozdzielczość</string> + <string name="mode_res_720">Do 720p</string> + <string name="mode_res_900">Do 900p</string> + <string name="mode_res_1080">Do 1080p</string> + <string name="mode_res_native">Natywna</string> + <string name="mode_res_default">%1$s (domyślna)</string> + <string name="mode_res_custom_value">Własna · %1$d×%2$d</string> + <string name="mode_res_custom">Własna…</string> + <string name="mode_res_note">720p może poprawić responsywność menu.</string> + <string name="mode_ratio">Proporcje ekranu</string> + <string name="mode_ratio_custom">Ustalane przez własną rozdzielczość.</string> + <string name="mode_ratio_auto">Auto używa co najmniej 16:9.</string> + <string name="mode_fps">Limit klatek</string> + <string name="mode_fps_note">Ogranicza całą sesję. Wyświetlacz przełącza się na częstotliwość odświeżania będącą wielokrotnością limitu.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Wyjście HDR10</string> + <string name="mode_hdr_unavailable">Niedostępne: %1$s.</string> + <string name="mode_hdr_restart">Uruchom ponownie aplikację, aby zastosować.</string> + <string name="mode_drivers">Sterowniki</string> + <string name="mode_gpu_drivers">Sterowniki GPU</string> + <string name="mode_gpu_drivers_hint">Wspólne dla Steam i pulpitu. Ustawiane na stronie Komponenty.</string> + <string name="mode_touch_controls">Dotyk i sterowanie</string> + <string name="mode_touch">Dotyk</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Bezpośredni</string> + <string name="mode_touch_note">Auto: touchpad na pulpicie, bezpośredni w Steam.</string> + <string name="mode_osc">Sterowanie ekranowe</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Auto pokazuje sterowanie, gdy nie jest podłączony żaden kontroler.</string> + <string name="osc_steam_touch">Dotyk Steam (beta)</string> + <string name="osc_style_next_session">Sterowanie dotykowe Steam zacznie działać od następnej sesji Steam</string> + <string name="osc_steam_layout">Układ dotykowy Steam</string> + <string name="osc_steam_layout_hint">Przesuwaj, zmieniaj rozmiar lub ukrywaj sterowanie dotykowe tej gry; zapisywane w Steam</string> + <string name="mode_controller">Kontroler</string> + <string name="mode_controller_hint">Jak Steam widzi Twój kontroler. Działa od następnej sesji.</string> + <string name="mode_controller_deck">Kontroler Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Kontroler Xbox 360</string> + <string name="mode_controller_note">Deck: przycisk szybkiego dostępu i żyroskop. Steam Controller: to samo oraz wykrywanie chwytu na tylnych przyciskach. DualShock 4 i DualSense: żyroskop, a gładziki działają jako ich touchpad. Xbox 360: szybki dostęp otwiera Guide+A.</string> + <string name="mode_back">Wstecz</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Sesja</string> + <string name="mode_suspend">Działanie w tle</string> + <string name="mode_suspend_hint">Gdy aplikacja jest ukryta lub ekran się wyłącza.</string> + <string name="mode_suspend_manual">Ręcznie</string> + <string name="mode_suspend_native">Natywnie</string> + <string name="mode_suspend_steam_note">„Auto” wstrzymuje i wznawia po powrocie. „Natywnie” najpierw przygotowuje Steam do uśpienia. „Ręcznie” czeka na „Wznów”. „Nigdy” nie przerywa działania.</string> + <string name="mode_background_downloads">Nie przerywaj pobierania</string> + <string name="mode_background_downloads_hint">Opóźnia wstrzymanie w tle, gdy Steam aktywnie pobiera.</string> + <string name="mode_zram">Kompresja zRAM</string> + <string name="mode_zram_hint">Gdy gra działa, pamięć klienta Steam jest kompresowana do zram urządzenia, więc gra ma więcej RAM-u. Zadziała przy następnym uruchomieniu Steam.</string> + <string name="mode_zram_unsupported">Niedostępne: to urządzenie nie ma zram ani swapu, albo jądro jest starsze niż 5.4.</string> + <string name="mode_suspend_note">„Auto” wstrzymuje w tle i wznawia po powrocie. „Ręcznie” czeka na „Wznów”. „Nigdy” nie przerywa działania.</string> + <string name="mode_startup">Uruchamianie</string> + <string name="mode_steam_startup">Uruchamiaj Steam z DroidDeck</string> + <string name="mode_steam_startup_hint">Otwiera sesję Steam przy uruchomieniu DroidDeck.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Sprawdzanie wydań…</string> + <string name="mode_decky_ready">Gotowe do instalacji: %1$s.</string> + <string name="mode_decky_none">Nie znaleziono zgodnej wersji. Spróbuj ponownie później.</string> + <string name="mode_decky_installed">Zainstalowano · %1$s</string> + <string name="mode_decky_update">Dostępna aktualizacja · %1$s</string> + <string name="mode_decky_current">Aktualna · %1$s</string> + <string name="mode_decky_loader">Program ładujący</string> + <string name="mode_decky_install_latest">Zainstaluj najnowszą</string> + <string name="mode_decky_on">Uruchamia się ze Steam. Gdy jest włączony, inne aplikacje na tym urządzeniu mogą sterować Steam.</string> + <string name="mode_decky_off">Wyłączony. Port zdalnego debugowania Steam pozostaje zamknięty.</string> + <string name="mode_decky_remove_title">Odinstalować Decky Loader?</string> + <string name="mode_decky_remove_text">Usuwa program ładujący. Twoje wtyczki i ustawienia zostaną zachowane.</string> + <string name="mode_client">Klient</string> + <string name="mode_mangoapp">Nakładka wydajności</string> + <string name="mode_mangoapp_hint">Wyłącz, jeśli gry ulegają awarii lub mają czarny ekran w trybie Deck. Działa od następnej sesji.</string> + <string name="mode_steam_repair">Napraw klienta Steam</string> + <string name="mode_steam_repair_hint">Pobiera klienta Steam ponownie przy następnym uruchomieniu Steam. Użyj, jeśli Steam utknie na ekranie wczytywania. Gry, logowanie i ustawienia zostaną zachowane.</string> + <string name="mode_steam_repair_queued">Klient Steam zostanie pobrany ponownie przy następnym uruchomieniu Steam.</string> + <string name="mode_steam_repair_button">Napraw</string> + <string name="mode_added_art">Grafiki</string> + <string name="mode_sgdb_key">Klucz API SteamGridDB</string> + <string name="mode_sgdb_key_yours">Twój klucz</string> + <string name="mode_sgdb_edit">Edytuj…</string> + <string name="mode_added_art_hint">Uzupełnia brakujące grafiki ze Steam, a potem z SteamGridDB. Pierwszeństwo mają Twoje pliki cover.jpg, hero.jpg, logo.png lub icon.png w folderze gry.</string> + <string name="summary_remove_game">Usuń %1$s</string> + <string name="mode_added_remove_confirm">Usunąć?</string> + <string name="games_add">Dodaj grę</string> + <string name="games_add_title">Dodaj grę:</string> + <string name="games_pick_exe_title">Wybierz plik exe:</string> + <string name="games_add_unreachable">Ta lokalizacja nie jest dostępna w sesji</string> + <string name="mode_added_exe_check">Sprawdź ten plik exe</string> + <string name="wincomp_title">Komponenty Windows</string> + <string name="wincomp_pad_hint">LB / RB przełączają między sekcjami.</string> + <string name="wincomp_card_none">Brak</string> + <string name="wincomp_applies">Biblioteki DLL Windows, których Proton nie zawiera, z listy komponentów. Włącz te, których potrzebuje ta gra: trafiają do własnego folderu Windows gry, nigdy do jej plików, i zostają niezależnie od wersji Proton, na której działa.</string> + <string name="wincomp_offline">Nie udało się pobrać listy komponentów. Już pobrane komponenty nadal można przełączać.</string> + <string name="wincomp_recommended">Zalecane dla tej gry</string> + <string name="wincomp_checking">Sprawdzanie, czego potrzebuje ta gra…</string> + <string name="wincomp_when_online">Dostępne po połączeniu z internetem</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Włączanie %1$d komponentu…</item> + <item quantity="few">Włączanie %1$d komponentów…</item> + <item quantity="many">Włączanie %1$d komponentów…</item> + <item quantity="other">Włączanie %1$d komponentów…</item> + </plurals> + <string name="wincomp_auto_section">Włączone dla tej gry</string> + <string name="wincomp_auto_steam">Steam instaluje %1$s razem z %2$s (aplikacja %3$s)</string> + <string name="wincomp_auto_gog">Z listy GOG dla tej gry</string> + <string name="wincomp_auto_epic">Z wymagań wstępnych Epic dla tej gry</string> + <string name="wincomp_auto_amazon">Z kroków instalacji Amazon dla tej gry</string> + <string name="wincomp_steam_by_name">Steam instaluje %1$s z aplikacją %2$s, dopasowano po nazwie</string> + <string name="wincomp_suggestions">Również na liście</string> + <string name="wincomp_suggestion_reason">Wymienione przez %1$s; tutaj to nie jest komponent</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Gra dostarcza %1$s</string> + <string name="wincomp_found_shipped">Gra ma %1$s (często działa bez zmian)</string> + <string name="wincomp_already_here">Już jest w tej grze</string> + <string name="wincomp_no_recommendation">Nic w folderze gry nie wskazuje na żaden komponent.</string> + <string name="wincomp_active">Zainstalowane dla tej gry (%1$d)</string> + <string name="wincomp_all">Wszystkie komponenty (%1$d)</string> + <string name="wincomp_installers">Wymagają instalatora Windows (%1$d)</string> + <string name="wincomp_installers_note">To osobne programy instalacyjne bez pakietu w środku, który można rozebrać, i jeszcze bez nagrania tego, co instalują. Większość to stare środowiska uruchomieniowe, które Mono w Proton już zastępuje; nagrania są dodawane, gdy powstają.</string> + <string name="wincomp_show">Pokaż</string> + <string name="wincomp_hide">Ukryj</string> + <string name="wincomp_needs_installer">Uruchamia własny instalator (jeszcze brak nagrania)</string> + <string name="wincomp_unsupported">Tutaj jeszcze nieobsługiwane</string> + <string name="wincomp_loading">Wczytywanie komponentów…</string> + <string name="wincomp_failed">Nie udało się zainstalować: %1$s</string> + <string name="wincomp_downloaded">Pobrano</string> + <string name="wincomp_downloading">Pobieranie %1$s</string> + <string name="wincomp_installing">Instalowanie: %1$s</string> + <string name="wincomp_reverting">Wyłączanie…</string> + <string name="wincomp_download_size">Do pobrania: %1$s</string> + <string name="wincomp_next_launch">Zacznie działać przy następnym uruchomieniu gry.</string> + <string name="mode_stretch169">Rozciągaj gry 16:9</string> + <string name="mode_stretch169_hint">Na ekranach bardziej kwadratowych niż 16:9 rozciąga gry na cały ekran zamiast pokazywać pasy. Działa od następnej sesji.</string> + <string name="mode_audio">Dźwięk</string> + <string name="mode_directaudio">DirectAudio dla gier</string> + <string name="mode_directaudio_hint">Omija PulseAudio, aby zmniejszyć opóźnienie.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">Do czatu głosowego.</string> + <string name="mode_network">Sieć</string> + <string name="mode_wifi_discovery">Wykrywanie Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Pokazuj w Steam nazwy Wi-Fi i sieci w pobliżu.</string> + <string name="mode_wifi_location_off">Usługi lokalizacyjne są wyłączone.</string> + <string name="mode_wifi_permission_denied">Nie przyznano uprawnienia do lokalizacji.</string> + <string name="mode_wifi_open_settings">Otwórz ustawienia</string> + <string name="mode_wifi_continue">Dalej</string> + <string name="mode_wifi_explain_title">Włączyć wykrywanie Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android wymaga uprawnienia do lokalizacji, aby odczytywać nazwy Wi-Fi i wykrywać sieci w pobliżu. DroidDeck używa tego dostępu, aby pokazać te sieci w Steam. Nie śledzimy Twojej lokalizacji. Dostęp do internetu działa bez tego uprawnienia.</string> + <string name="mode_storage">Pamięć na gry</string> + <string name="mode_storage_auto">Automatycznie – karta SD, gdy jest, oraz Twoje foldery Games</string> + <string name="mode_storage_auto_none">Automatycznie – Twoje foldery Games oraz karta SD, gdy jest (teraz brak)</string> + <string name="mode_storage_internal">Tylko pamięć wewnętrzna</string> + <string name="mode_storage_folder">Folder: %1$s</string> + <string name="mode_second_library">Druga biblioteka</string> + <string name="mode_storage_note">Gry, które strumieniują zasoby z karty SD lub pamięci współdzielonej, mogą się zacinać.</string> + <string name="mode_storage_diagnostics">Diagnostyka pamięci</string> + <string name="mode_storage_diagnostics_hint">Zapisuje wyniki alokacji i próbkowane czasy dostępu do pamięci w „Udostępnij logi”. Po włączeniu może spowalniać instalacje. Działa od następnej sesji.</string> + <string name="mode_choose_folder">Wybierz folder…</string> + <string name="mode_custom_res_title">Własna rozdzielczość</string> + <string name="mode_custom_res_text">Zastępuje limit i proporcje. Przy rozmiarze niepasującym do ekranu pojawią się pasy.</string> + <string name="mode_width">Szerokość</string> + <string name="mode_height">Wysokość</string> + <string name="mode_custom_res_range">Od 320×240 do 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d gra</item> + <item quantity="few">%1$d gry</item> + <item quantity="many">%1$d gier</item> + <item quantity="other">%1$d gry</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Usuń</string> + <string name="common_restore">Przywróć</string> + <string name="common_download">Pobierz</string> + <string name="common_delete_named">Usuń %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Sterownik środowiska</string> + <string name="comp_runtime_driver_hint">Używany przez Steam, gry i pulpit. Działa od następnej sesji.</string> + <string name="comp_import_turnip">Importuj plik zip Turnip…</string> + <string name="comp_display_driver">Sterownik wyświetlania</string> + <string name="comp_display_driver_hint">Rysuje klatki na ekranie w obu trybach. Uruchom ponownie aplikację, aby zastosować.</string> + <string name="comp_import_adrenotools">Importuj plik zip AdrenoTools…</string> + <string name="comp_never">nigdy</string> + <string name="comp_nightlies_checked">Wersje nightly sprawdzono: %1$s</string> + <string name="comp_title">Komponenty</string> + <string name="comp_about">Informacje o Komponentach</string> + <string name="comp_check_drivers">Sprawdź nowe sterowniki</string> + <string name="comp_check_nightlies">Szukaj nowych pakietów w wersjach nightly</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Wybrany tutaj Proton uruchamia każdą grę, która nie ma własnego wyboru w Steam, a zmiana dokonana w Steam też się tu pojawia. Steam zastępuje Proton od Valve przy aktualizacji; oryginały są zachowywane dla każdej wersji.</string> + <string name="comp_scope">Konfiguracja</string> + <string name="comp_profile_configure">Skonfiguruj profil</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Profil domyślny</string> + <string name="comp_scope_general_detail">Używany automatycznie przez gry bez własnych ustawień.</string> + <string name="comp_profile_game_detail">Zapisane ustawienia używane automatycznie przy uruchomieniu %1$s.</string> + <string name="comp_game_hint">Wybierz tylko ustawienia, których potrzebuje ta gra. Cała reszta nadal korzysta z profilu domyślnego.</string> + <string name="comp_game_fex">Preset FEX</string> + <string name="comp_game_fex_inherited">Używany jest preset z profilu domyślnego.</string> + <string name="comp_game_fex_override">Zapisano własny preset dla tej gry.</string> + <string name="comp_game_fex_custom">Własne zmienne FEX</string> + <string name="comp_game_use_general">Użyj domyślnego</string> + <string name="comp_game_compatibility">Zgodność gry</string> + <string name="comp_game_environment_hint">Opcje środowiska Proton, DXVK, VKD3D i synchronizacji dla tej gry.</string> + <string name="comp_game_proton_inherited">Używany jest Proton z profilu domyślnego.</string> + <string name="comp_game_proton_override">Zapisano własny Proton dla tej gry przez mapowanie zgodności Steam.</string> + <string name="comp_no_proton_short">Brak Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Używa pakietu z profilu domyślnego z %1$s, chyba że ta gra wybierze inny pakiet.</string> + <string name="comp_game_component_general">Używa pakietu komponentów z profilu domyślnego.</string> + <string name="comp_game_component_override">Używa %1$s tylko w tej grze.</string> + <string name="comp_game_runtime_options">Opcje środowiska uruchomieniowego</string> + <string name="comp_game_environment_other_hint">Inne opcje środowiska Proton, DXVK, VKD3D-Proton i synchronizacji dla poszczególnych gier.</string> + <string name="comp_game_saved_next">Profil gry %1$s zapisano na następne uruchomienie gry.</string> + <string name="game_no_steam_title">Uruchom bez Steam</string> + <string name="game_no_steam_detail">Otwiera w Proton/FEX bez klienta Steam; funkcje Steam są wyłączone.</string> + <string name="game_no_steam_on">Wł.</string> + <string name="game_steam_with">Uruchamia się ze Steam</string> + <string name="game_steam_without">Uruchamia się bez Steam</string> + <string name="game_settings_card">Ustawienia</string> + <string name="game_settings_menu_title">Ustawienia: %1$s</string> + <string name="game_settings_default">Domyślne</string> + <string name="game_settings_default_detail">Przywraca wszystko, co zmieniono dla tej gry, do ustawień aplikacji.</string> + <string name="game_sync_custom">Własne zmienne synchronizacji</string> + <string name="comp_game_proton_live">Wybór Proton dla %1$s zapisano i jest już dostępny w Steam.</string> + <string name="comp_game_proton_next">Wybór Proton dla %1$s zapisano. Uruchom ponownie Steam przed uruchomieniem gry.</string> + <string name="comp_game_proton_not_runnable">%1$s nie może używać wybranego Proton na tym urządzeniu.</string> + <string name="comp_game_load_failed">Nie udało się wczytać profilu gry %1$s: %2$s</string> + <string name="comp_game_save_failed">Nie udało się zapisać profilu gry: %1$s</string> + <string name="comp_game_reset">Resetuj profil gry</string> + <string name="comp_game_reset_title">Zresetować profil gry %1$s?</string> + <string name="comp_game_reset_body">Usunąć ustawienia Proton, FEX, pakietu komponentów, środowiska, filtrowania tekstur i komponentów Windows dla tej gry? Będzie ona używać profilu domyślnego.</string> + <string name="comp_game_reset_done">%1$s używa teraz profilu domyślnego.</string> + <string name="comp_game_reset_failed">Nie udało się całkowicie zresetować profilu gry: %1$s</string> + <string name="comp_default_live">%1$s uruchamia teraz każdą grę, która nie ma własnego Proton wybranego w Steam.</string> + <string name="comp_default_next">%1$s będzie uruchamiać każdą grę bez własnego Proton od następnego uruchomienia Steam.</string> + <string name="comp_default_not_runnable">%1$s nie może tu uruchamiać gier, więc nie może być domyślny.</string> + <string name="comp_default_failed">Nie udało się zapisać domyślnego Proton: %1$s</string> + <string name="comp_swapped">%1$s · podmienione: %2$d</string> + <string name="comp_all_original">%1$s · wszystko oryginalne</string> + <string name="comp_game_running_suffix">%1$s · gra działa</string> + <string name="comp_esync_pack">%1$s · pakiet droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · brak pakietu droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · wbudowany esync, pakiet zbędny</string> + <string name="comp_gpu_drivers">Sterowniki GPU</string> + <string name="comp_reapplied">%1$s · ponownie zastosowano przy uruchomieniu %2$s</string> + <string name="comp_next_queued">Następnie: %1$s · po zamknięciu gry</string> + <string name="comp_in_use">%1$s w użyciu: %2$s</string> + <string name="comp_waits">Czeka na zamknięcie gry</string> + <string name="comp_applies_next_game">Działa od następnego uruchomienia gry</string> + <string name="comp_import_zip">Importuj .zip</string> + <string name="comp_reading">Odczytywanie wersji Proton…</string> + <string name="comp_no_proton">Nie zainstalowano jeszcze żadnego Proton. Uruchom raz Steam, aby pobrać jego Proton ARM64, lub dodaj GE-Proton, CachyOS albo DroidDeck-Proton w sekcji Konfiguracja.</string> + <string name="comp_original">Oryginał · %1$s</string> + <string name="comp_this_build">%1$s · ta wersja</string> + <string name="comp_earlier_build">%1$s · wcześniejsza wersja</string> + <string name="comp_installed_count">Zainstalowane · %1$d</string> + <string name="comp_nothing_stored">Nic jeszcze nie zapisano dla %1$s. Własne pliki tego Proton są zapisywane jako jego oryginał.</string> + <string name="comp_waits_long">Na tym Proton działa gra, więc zmiana poczeka do jej zamknięcia.</string> + <string name="comp_applies_long">Zacznie działać przy następnym uruchomieniu gry.</string> + <string name="comp_swap_title">Podmienić %1$s?</string> + <string name="comp_swap_body">Umieścić %1$s w %2$s? Jego oryginalne pliki pozostaną zapisane. %3$s</string> + <string name="comp_restore_title">Przywrócić %1$s?</string> + <string name="comp_restore_body">Przywrócić oryginał %1$s w %2$s? %3$s</string> + <string name="comp_delete_package_body">Usuwa pakiet z aplikacji. Możesz pobrać go ponownie.</string> + <string name="comp_delete_original_title">Usunąć ten oryginał?</string> + <string name="comp_delete_original_body">Ten oryginał %1$s pochodzi z wcześniejszej wersji %2$s. Oryginał bieżącej wersji jest zawsze zachowywany.</string> + <string name="comp_nightlies_count">W wersjach nightly · %1$d</string> + <string name="comp_refresh_to_list">Odśwież, aby wyświetlić pakiety w wersjach nightly.</string> + <string name="comp_nothing_new">Nic nowego od ostatniego sprawdzenia.</string> + <string name="comp_import_wcp">Importuj .wcp</string> + <string name="comp_restore_original">Przywróć oryginał tego Proton</string> + <string name="comp_restore_original_body">Przywrócić oryginalny %2$s w %1$s?</string> + <string name="comp_swap">Podmień</string> + <string name="comp_about_text">FEX, DXVK i VKD3D-Proton dla każdej wersji Proton, z którą Steam uruchamia gry.\n\nWybierz zainstalowany wiersz, aby go podmienić. Zmiana działa od następnego uruchomienia gry lub po zamknięciu działającej gry.\n\nTwoje wybory są sprawdzane przed każdym uruchomieniem i przywracane, jeśli coś je zmieniło. Oryginalne pliki każdej wersji Proton są zachowywane, więc aktualizacje Steam nigdy ich nie usuwają.</string> + <string name="comp_tag_original">Oryginał</string> + <string name="comp_tag_in_use">W użyciu</string> + <string name="comp_tag_new">Nowy</string> + <string name="comp_tag_stored">Zapisany</string> + <string name="perf_title">Wydajność</string> + <string name="perf_lede">Rdzenie CPU, poprawki sesji i nazwa hosta. Działa od następnej sesji.</string> + <string name="perf_client_cores_group">Rdzenie klienta Steam</string> + <string name="perf_override">Zastąp wybór rdzeni przez Steam</string> + <string name="perf_override_hint">Przypina Steam, jego pomocnika interfejsu i gamescope do rdzeni poniżej.</string> + <string name="perf_client_cores">Rdzenie klienta</string> + <string name="perf_client_cores_on">Rdzenie dla Steam.</string> + <string name="perf_client_cores_off">Włącz zastępowanie, aby wybrać.</string> + <string name="perf_game_cores_group">Rdzenie gier</string> + <string name="perf_game_cores">Rdzenie gier</string> + <string name="perf_game_cores_hint">Rdzenie dla gier. Gdy wszystkie są zaznaczone, Android swobodnie przydziela zadania.</string> + <string name="perf_client_ui">Interfejs klienta</string> + <string name="perf_glthread">Wielowątkowy GL</string> + <string name="perf_glthread_hint">Może poprawić responsywność menu Steam.</string> + <string name="perf_zink">Zink: leniwe deskryptory</string> + <string name="perf_zink_hint">Zalecane dla sterowników bez buforów deskryptorów.</string> + <string name="perf_noglerror">Pomijaj sprawdzanie błędów GL</string> + <string name="perf_noglerror_hint">Wyłącza walidację GL przy każdym wywołaniu.</string> + <string name="perf_gsrealtime">gamescope: kolejka GPU czasu rzeczywistego</string> + <string name="perf_gsrealtime_hint">Nadaje priorytet pracy GPU kompozytora. Może wygładzić tempo klatek kosztem części wydajności gier.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Utrzymuj GPU na najwyższym taktowaniu</string> + <string name="perf_gpuclock_hint">Tylko Adreno. Mniej przycięć, większe zużycie baterii i więcej ciepła.</string> + <string name="perf_fixes">Poprawki sesji</string> + <string name="perf_sysmem">Turnip: renderowanie sysmem</string> + <string name="perf_sysmem_hint">Szybsze dla Steam i większości gier. Wymagane na Adreno 710/720/722.</string> + <string name="perf_xalia">Pomijaj pomocnika xalia w Steam</string> + <string name="perf_fastsync">droiddeck-ntsync (eksperymentalne)</string> + <string name="perf_fastsync_hint">Zastępnik sterownika Linux ntsync w przestrzeni użytkownika, do testów. Gdy jest włączony, Proton używa go zamiast droiddeck-esync i droiddeck-fsync. Zgodny z Proton Experimental ARM64, GE-Proton i proton-cachyos. Działa od następnej sesji.</string> + <string name="perf_esync">droiddeck-esync</string> + <string name="perf_fsync">Najpierw droiddeck-fsync</string> + <string name="perf_fsync_hint">Uruchamia własny fsync Proton na standardowych plikach Proton, z futex_waitv dostarczanym w przestrzeni użytkownika, więc nie wymaga pakietu i działa od razu po aktualizacji Proton przez Steam. Gdy jest włączony, gry używają go przed droiddeck-esync, z wyjątkiem nielicznych, którym Proton wyłącza fsync. Działa od następnej sesji.</string> + <string name="perf_esync_hint">Wątki Windows w grach czekają na siebie przez eventfd i pamięć współdzieloną zamiast przez wymiany z wineserver. Używa pakietu droiddeck-esync przygotowanego dla dokładnie tej wersji Proton; pakiety są pobierane automatycznie. Dopóki nie ma pakietu dla nowej wersji Proton, zastępuje go droiddeck-fsync. Działa od następnej sesji.</string> + <string name="perf_xalia_hint">Wyłącza pomocnika Proton do nawigacji kontrolerem, który zużywa CPU w każdej grze.</string> + <string name="perf_seccomp">Uruchamiaj proot bez seccomp</string> + <string name="perf_seccomp_hint">Może naprawić błędy brakujących wywołań systemowych na niektórych jądrach. Może obniżyć wydajność.</string> + <string name="perf_fastpath">Szybka ścieżka proot</string> + <string name="perf_fastpath_needs_seccomp">Wymaga filtra seccomp proot.</string> + <string name="perf_fastpath_hint">Szybsze wyszukiwanie plików i mniej przycięć. Wyłącz, jeśli program nie może znaleźć swoich plików.</string> + <string name="perf_identity">Tożsamość sesji</string> + <string name="perf_hostname">Nazwa hosta</string> + <string name="perf_hostname_hint">Nazwa tego urządzenia widoczna dla Steam. Puste pole przywraca %1$s.</string> + <string name="perf_hostname_invalid">Tylko litery, cyfry i łączniki w środku, do 63 znaków.</string> + <string name="perf_phantom_warning">Android jest ustawiony tak, że zamknie tę sesję</string> + <string name="driver_installed">Zainstalowane</string> + <string name="driver_available">Do pobrania</string> + <string name="driver_nothing_new">Nic nowego od ostatniego sprawdzenia.</string> + <string name="driver_restore_builtin">Przywróć wbudowane sterowniki</string> + <string name="driver_delete_builtin">Wbudowany w aplikację: usuwa to jego rozpakowane pliki i go ukrywa. „Przywróć wbudowane sterowniki” przywraca go z powrotem.</string> + <string name="driver_delete_bundle">Połowa pakietu Android + Linux: obie połowy zostaną usunięte. Zamiast używanego sterownika zostanie użyty domyślny.</string> + <string name="driver_delete_plain">Jego pliki zostaną usunięte z aplikacji.</string> + <string name="driver_delete_in_use">Jego pliki zostaną usunięte. Jest w użyciu, więc zastąpi go domyślny.</string> + <string name="drawer_page_display">Wyświetlacz</string> + <string name="drawer_page_effects">Efekty</string> + <string name="drawer_page_controls">Sterowanie</string> + <string name="drawer_page_components">Komponenty</string> + <string name="drawer_page_controller">Kontroler</string> + <string name="drawer_page_settings">Ustawienia</string> + <string name="drawer_page_desc">Strona: %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Pulpit</string> + <string name="drawer_steam_menu">Menu Steam</string> + <string name="drawer_quick_access">Szybki dostęp</string> + <string name="drawer_open_qam">Otwórz menu szybkiego dostępu</string> + <string name="drawer_prev_page">Poprzednia strona</string> + <string name="drawer_next_page">Następna strona</string> + <string name="drawer_hud">HUD wydajności</string> + <string name="drawer_scaling">Tryb skalowania</string> + <string name="drawer_scaling_sharpness">Ostrość skalowania</string> + <string name="drawer_effects">Efekty ekranowe</string> + <string name="drawer_effects_hint">Na żywo. Zużywa trochę czasu GPU, gdy włączony jest dowolny efekt.</string> + <string name="drawer_look">Presety</string> + <string name="drawer_look_custom">Własny</string> + <string name="drawer_effects_advanced">Zaawansowane</string> + <string name="widgets_expanded">Rozwinięte</string> + <string name="widgets_collapsed">Zwinięte</string> + <string name="drawer_cas">Wyostrzanie (CAS)</string> + <string name="drawer_cas_level">Poziom wyostrzania</string> + <string name="drawer_fake_hdr">Sztuczne HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Uruchom SteamVR</string> + <string name="steamvr_checking">Sprawdzanie SteamVR…</string> + <string name="drawer_deband">Usuwanie bandingu</string> + <string name="drawer_deband_strength">Siła usuwania bandingu</string> + <string name="drawer_brightness">Jasność</string> + <string name="drawer_contrast">Kontrast</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Nasycenie</string> + <string name="drawer_fxaa">FXAA (wygładzanie krawędzi)</string> + <string name="drawer_toon">Kontury kreskówkowe</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Filtrowanie tekstur</string> + <string name="drawer_texture_hint">Gry DirectX 9–11, od następnego uruchomienia.</string> + <string name="drawer_anisotropy">Filtrowanie anizotropowe</string> + <string name="drawer_texture_sharpness">Ostrość tekstur</string> + <string name="drawer_texture_sharpness_note">Ujemny bias mipmap: ostrzejsze tekstury, trochę migotania. Auto dopasowuje się do tego, jak bardzo sesja jest powiększona na ekranie.</string> + <string name="drawer_touch_auto">Auto (%1$s)</string> + <string name="drawer_keyboard">Klawiatura</string> + <string name="drawer_latency">Opóźnienie</string> + <string name="drawer_low_latency_controller">Kontroler o niskim opóźnieniu</string> + <string name="drawer_low_latency_controller_hint">Kontroler raportuje z częstotliwością 1000 Hz zamiast 250 Hz. Nieco więcej CPU.</string> + <string name="drawer_low_latency_touch">Dotyk o niskim opóźnieniu</string> + <string name="drawer_low_latency_touch_hint">Dotknięcia pomijają łączenie klatek; sterowanie dotykiem Steam działa z 1000 Hz. Nieco więcej CPU.</string> + <string name="drawer_pc_keyboard">Klawiatura PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Drugi ekran</string> + <string name="drawer_second_screen_mode">Tryb</string> + <string name="drawer_second_screen_shows">Pokazuje</string> + <string name="drawer_android_apps">Aplikacje Android</string> + <string name="drawer_launch_app">Uruchom aplikację</string> + <string name="common_hide">Ukryj</string> + <string name="common_show">Pokaż</string> + <string name="drawer_no_apps">Brak aplikacji do uruchomienia</string> + <string name="drawer_session_behavior">Działanie sesji</string> + <string name="drawer_suspend_hint">Działa od teraz i w przyszłych sesjach w tym trybie.</string> + <string name="drawer_next_session">Następna sesja</string> + <string name="drawer_support">Pomoc</string> + <string name="drawer_logs">Logi sesji</string> + <string name="drawer_logs_hint">Dołącz do zgłoszenia błędu</string> + <string name="drawer_share_logs">Udostępnij logi</string> + <string name="drawer_background">Przenieś w tło</string> + <string name="drawer_stop">Zatrzymaj</string> + <string name="drawer_stop_title">Zatrzymać sesję?</string> + <string name="drawer_running_now">Teraz działa</string> + <string name="drawer_no_game">Żadna gra nie działa teraz przez Proton</string> + <string name="drawer_selected_profile">Profil gry</string> + <string name="drawer_selected_profile_none">Szczegóły profilu nie są jeszcze dostępne.</string> + <string name="drawer_profile_refresh_failed_initial">Nie udało się wczytać profili gier. Automatyczne ponawianie.</string> + <string name="drawer_profile_refresh_failed_stale">Nie udało się odświeżyć profili gier. Wyświetlane są ostatnie dostępne dane; automatyczne ponawianie.</string> + <string name="drawer_profile_inspect_hint">Wyświetl i edytuj zapisane ustawienia używane przy następnym uruchomieniu.</string> + <string name="drawer_profile_default">Używany jest profil domyślny</string> + <string name="drawer_profile_custom">Własny profil</string> + <string name="drawer_component_inherited">Używany jest %1$s z profilu domyślnego.</string> + <string name="drawer_game_components_note">Zmiany są zapisywane w profilu gry %1$s i działają od następnego uruchomienia gry.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d nadpisanie gry</item> + <item quantity="few">%1$d nadpisania gry</item> + <item quantity="many">%1$d nadpisań gry</item> + <item quantity="other">%1$d nadpisania gry</item> + </plurals> + <string name="drawer_no_proton">Nie zainstalowano jeszcze żadnego Proton.</string> + <string name="drawer_game_running">gra działa</string> + <string name="drawer_reapplied">ponownie zastosowano przy uruchomieniu %1$s</string> + <string name="drawer_original">Oryginał</string> + <string name="drawer_components_note">Importowanie i usuwanie na stronie Komponenty.</string> + <string name="setup_check_done">Gotowe</string> + <string name="setup_check_warn">Wymaga uwagi</string> + <string name="setup_check_busy">W toku</string> + <string name="setup_limit_adb_failed">Sprawdź adres IP i port w sekcji Debugowanie bezprzewodowe lub sparuj ponownie, jeśli Android usunął to urządzenie.</string> + <string name="setup_install">Zainstaluj</string> + <string name="setup_manage">Zarządzaj</string> + <string name="setup_tab_overview">Przegląd</string> + <string name="setup_tab_controller">Kontroler</string> + <string name="setup_tab_session">Sesja</string> + <string name="setup_tab_launcher">Aplikacja</string> + <string name="setup_title">Konfiguracja</string> + <string name="setup_all_set">● Wszystko gotowe</string> + <string name="setup_n_ready">Gotowe: %1$d z %2$d</string> + <string name="setup_system_check">Sprawdzenie systemu</string> + <string name="setup_gpu_supported">Urządzenie obsługiwane</string> + <string name="setup_gpu_untested">Nieprzetestowany GPU</string> + <string name="setup_gpu_unsupported">GPU nieobsługiwany</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam wymaga sterownika Adreno; %1$s może wyświetlać czarny ekran</string> + <string name="setup_runtime">Środowisko Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Nie zainstalowano · ok. 3 GB, instalowane przy pierwszym „Graj”</string> + <string name="setup_installed">Zainstalowano</string> + <string name="setup_runtime_update">%1$s · dostępna aktualizacja</string> + <string name="setup_runtime_current">%1$s · aktualne</string> + <string name="setup_limit">Limit procesów podrzędnych</string> + <string name="setup_limit_on">Wł. · Android może zamykać Steam. Wyłączenie zajmuje minutę.</string> + <string name="setup_limit_unset">Nieustawiony · Android może zamykać Steam. Wyłączenie zajmuje minutę.</string> + <string name="setup_limit_unknown">Nie udało się sprawdzić · wyłączenie zajmuje minutę.</string> + <string name="setup_fix_it">Napraw</string> + <string name="setup_details">Szczegóły</string> + <string name="setup_dev_options">Opcje programisty</string> + <string name="setup_use_wireless">Użyj debugowania bezprzewodowego</string> + <string name="setup_check_again">Sprawdź ponownie</string> + <string name="setup_limit_turn_on">Włącz limit</string> + <string name="setup_account">Konto Steam</string> + <string name="setup_signed_in_offline">Zalogowano jako %1$s · tryb offline</string> + <string name="setup_signed_in">Zalogowano jako %1$s</string> + <string name="setup_sign_in">Naciśnij „Graj” i zaloguj się do Steam</string> + <string name="setup_tools">Narzędzia</string> + <string name="setup_controller">Kontroler</string> + <string name="setup_controller_unavailable">Ustawienia kontrolera są niedostępne.</string> + <string name="setup_session">Sesja</string> + <string name="setup_logs">Logi sesji</string> + <string name="setup_logs_hint">Zapisywane po każdej sesji</string> + <string name="setup_agent_commands">Narzędzia debugowania</string> + <string name="setup_latest_logs">Najnowsze logi sesji</string> + <string name="setup_saved_logs">Zapisane logi sesji</string> + <string name="setup_saved_logs_hint">Zachowuje najnowsze: %1$d</string> + <string name="setup_clear_logs">Wyczyść logi</string> + <string name="setup_reset_settings">Zresetuj wszystkie ustawienia</string> + <string name="setup_reset_settings_hint">Przywróć każde ustawienie do wartości domyślnej</string> + <string name="setup_reset_settings_button">Resetuj</string> + <string name="setup_reset_settings_title">Zresetować wszystkie ustawienia?</string> + <string name="setup_reset_settings_body">Ustawienia obrazu, wydajności, kontrolera, motywu, języka i aplikacji wracają do wartości domyślnych. Twoje gry, logowanie do Steam, konta sklepów, pobrane sterowniki i foldery pamięci pozostają.</string> + <string name="setup_reset_settings_profiles">Zresetuj też profile gier (Proton, FEX, komponenty i środowisko dla każdej gry oraz środowisko profilu Domyślny)</string> + <string name="setup_reset_settings_session_running">Zatrzymaj sesję, zanim zresetujesz ustawienia.</string> + <string name="setup_reset_settings_partial">Ustawienia zostały zresetowane, ale nie wszystkie. Szczegóły są w logach.</string> + <string name="setup_offline">Tryb offline</string> + <string name="setup_sign_in_first">Najpierw zaloguj się do Steam</string> + <string name="setup_launcher">Aplikacja</string> + <string name="setup_language">Język</string> + <string name="setup_language_hint">Steam też go używa, od następnego uruchomienia.</string> + <string name="setup_language_system">Domyślny systemu (%1$s)</string> + <string name="setup_language_system_short">Domyślny systemu</string> + <string name="setup_app_scale">Skala aplikacji</string> + <string name="setup_app_scale_hint">Tekst i elementy sterujące DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (domyślnie)</string> + <string name="setup_theme">Motyw</string> + <string name="setup_theme_hint">Wygląd aplikacji</string> + <string name="setup_home">Użyj jako ekranu głównego</string> + <string name="setup_home_on">DroidDeck może być aplikacją ekranu głównego</string> + <string name="setup_home_off">DroidDeck nigdy nie jest proponowany jako aplikacja ekranu głównego</string> + <string name="setup_orientation">Orientacja</string> + <string name="setup_orientation_auto">Automatyczna pozioma</string> + <string name="setup_orientation_landscape">Pozioma</string> + <string name="setup_orientation_reverse">Odwrócona pozioma</string> + <string name="setup_fullscreen">Pełny ekran</string> + <string name="setup_fullscreen_on">Ukrywa systemowe paski stanu i nawigacji</string> + <string name="setup_fullscreen_off">Pokazuje systemowe paski stanu i nawigacji</string> + <string name="setup_default_home">Domyślna aplikacja ekranu głównego</string> + <string name="setup_choose_home">Wybierz aplikację ekranu głównego</string> + <string name="setup_choose">Wybierz</string> + <string name="setup_linux_apps">Aplikacje Linux (beta)</string> + <string name="setup_tool_files">Pliki</string> + <string name="setup_tool_files_hint">Przeglądaj pliki i zarządzaj nimi</string> + <string name="setup_tool_protons">Wersje Proton</string> + <string name="setup_tool_protons_hint">Instaluj wersje Proton ARM64</string> + <string name="setup_tool_performance">Wydajność</string> + <string name="setup_tool_performance_hint">Przydział rdzeni CPU</string> + <string name="setup_tool_roms">Folder ROM-ów</string> + <string name="setup_tool_roms_hint">Miejsce przechowywania gier do emulatorów</string> + <string name="setup_card_components">Komponenty</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Sterowanie</string> + <string name="setup_card_controls_hint">Mapowanie przycisków</string> + <string name="store_tab_discover">Odkrywaj</string> + <string name="store_tab_search">Szukaj</string> + <string name="store_tab_installed">Zainstalowane</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Sklep</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak gotowy</string> + <string name="store_needs_runtime">Najpierw zainstaluj środowisko Linux w sekcji Konfiguracja.</string> + <string name="store_setup_title">Skonfiguruj Flatpak</string> + <string name="store_setup_text">Dodaje Flatpak i łączy go z Flathub (ok. 20 MB). Pierwsza aplikacja pobiera też swoje środowisko uruchomieniowe.</string> + <string name="store_setting_up">Konfigurowanie…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Aktualizacje</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Uruchamianie…</string> + <string name="store_categories">Kategorie</string> + <string name="store_unreachable">Nie udało się połączyć z Flathub. Sprawdź połączenie i spróbuj ponownie.</string> + <string name="store_try_again">Spróbuj ponownie</string> + <string name="store_search_label">Szukaj w Flathub</string> + <string name="store_search_placeholder">Firefox, gry, emulatory…</string> + <string name="store_search">Szukaj</string> + <string name="store_all">Wszystkie</string> + <string name="store_searching">Wyszukiwanie…</string> + <string name="store_search_hint">Szukaj po nazwie lub wybierz kategorię. Wyświetlane są tylko aplikacje ARM64.</string> + <string name="store_no_results">Brak pasujących aplikacji ARM64 w Flathub.</string> + <string name="store_results">Wyniki</string> + <string name="store_check_updates">Sprawdź aktualizacje</string> + <string name="store_update_all">Aktualizuj wszystkie (%1$d)</string> + <string name="store_all_current">● Wszystko jest aktualne</string> + <string name="store_no_apps">Brak aplikacji. Znajdź je w sekcji Odkrywaj lub Szukaj.</string> + <string name="store_setup_first_note">Skonfiguruj Flatpak, aby instalować aplikacje.</string> + <string name="store_update_available_prefix">Dostępna aktualizacja · %1$s</string> + <string name="store_open">Otwórz</string> + <string name="store_details">Szczegóły</string> + <string name="store_remove">Usuń</string> + <string name="store_press_again">Naciśnij ponownie, aby usunąć</string> + <string name="store_installing">Instalowanie…</string> + <string name="store_install">Zainstaluj</string> + <string name="store_setup_first">Najpierw skonfiguruj Flatpak</string> + <string name="store_download_size">Do pobrania: %1$s</string> + <string name="store_installed_chip">● Zainstalowano</string> + <string name="store_details_failed">Nie udało się wczytać strony tej aplikacji w Flathub.</string> + <string name="store_loading">Wczytywanie z Flathub…</string> + <string name="store_no_arm">Brak wersji ARM64 w Flathub, więc nie można jej tu zainstalować.</string> + <string name="store_screenshots">Zrzuty ekranu</string> + <string name="store_about">Informacje</string> + <string name="store_app_id">ID aplikacji</string> + <string name="store_license">Licencja</string> + <string name="store_runtime">Środowisko uruchomieniowe</string> + <string name="store_installed_size">Rozmiar po instalacji</string> + <string name="store_installed_size_value">%1$s (plus współdzielone środowisko uruchomieniowe)</string> + <string name="store_website">Strona internetowa</string> + <string name="store_verified">Zweryfikowano</string> + <string name="upd_title">Aktualizacje</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Sprawdzono %1$s</string> + <string name="upd_not_checked">Jeszcze nie sprawdzono</string> + <string name="upd_perm_title">Pozwól DroidDeck się aktualizować</string> + <string name="upd_perm_text">Na następnym ekranie włącz „Zezwól z tego źródła” i wróć tutaj. Aktualizacja będzie kontynuowana sama.</string> + <string name="upd_open_settings">Otwórz ustawienia</string> + <string name="upd_not_now">Nie teraz</string> + <string name="upd_signed_status">Inny podpis</string> + <string name="upd_signed_headline">Nie można zaktualizować w miejscu</string> + <string name="upd_signed_detail">Ta kopia nie jest podpisana kluczem wydań DroidDeck, więc aktualizacje nie mogą jej zastąpić. Odinstaluj ją, aby przełączyć.</string> + <string name="upd_available">Dostępna aktualizacja</string> + <string name="upd_blocked_status">Nie można zainstalować</string> + <string name="upd_switch">Gotowe do przełączenia</string> + <string name="upd_ahead_status">Przed Stable</string> + <string name="upd_ahead_headline">Jesteś przed wersją Stable</string> + <string name="upd_ahead_detail">Ta kompilacja jest nowsza niż najnowsza Stable. Przejdziesz na Stable przy jej następnym wydaniu.</string> + <string name="upd_gone_status">Test zakończony</string> + <string name="upd_gone_headline">Ten test się zakończył</string> + <string name="upd_gone_detail">Jego poprawka została scalona albo odrzucona. Śledź Preview, aby mieć najnowsze poprawki.</string> + <string name="upd_current_status">Aktualne</string> + <string name="upd_current_headline">Masz najnowszą wersję %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Aktualizuj%1$s</string> + <string name="upd_install_button">Instaluj%1$s</string> + <string name="upd_install_anyway">Zainstaluj Stable %1$s mimo to</string> + <string name="upd_follow_preview">Śledź Preview</string> + <string name="upd_stop_session">Zatrzymaj działającą sesję, aby zaktualizować.</string> + <string name="upd_less">Mniej</string> + <string name="upd_more">Więcej</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Nowa kompilacja Preview</string> + <string name="upd_new_test">Kompilacja testowa PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">KANAŁ AKTUALIZACJI</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Przetestowane wydania, dla większości osób</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Najnowsze poprawki, zanim trafią do Stable</string> + <string name="upd_preview_current">Aktualne</string> + <string name="upd_tests">Kompilacje testowe</string> + <string name="upd_tests_hint">Wypróbuj poprawkę przed jej wydaniem</string> + <string name="upd_tests_none">Obecnie żadnych</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Nie zbudowano dla tej kopii DroidDeck</string> + <string name="upd_updated">Zaktualizowano %1$s</string> + <string name="upd_test_name">test PR #%1$d</string> + <string name="upd_while_ago">jakiś czas temu</string> + <string name="upd_just_now">przed chwilą</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d do wypróbowania</item> + <item quantity="few">%1$d do wypróbowania</item> + <item quantity="many">%1$d do wypróbowania</item> + <item quantity="other">%1$d do wypróbowania</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Zmiany od Twojej kompilacji · %1$d kompilacja wstecz</item> + <item quantity="few">Zmiany od Twojej kompilacji · %1$d kompilacje wstecz</item> + <item quantity="many">Zmiany od Twojej kompilacji · %1$d kompilacji wstecz</item> + <item quantity="other">Zmiany od Twojej kompilacji · %1$d kompilacji wstecz</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Niedawne zmiany · %1$d kompilacja</item> + <item quantity="few">Niedawne zmiany · %1$d kompilacje</item> + <item quantity="many">Niedawne zmiany · %1$d kompilacji</item> + <item quantity="other">Niedawne zmiany · %1$d kompilacji</item> + </plurals> + <string name="gate_title">Jedno ustawienie Androida do zmiany</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android zatrzymuje aplikacje, które uruchamiają wiele procesów w tle, a Steam uruchamia ich kilkadziesiąt. Dopóki to się nie zmieni, gry zamykają się bez błędu.</string> + <string name="gate_fix_for_me">Napraw to za mnie</string> + <string name="gate_toggle_steps">Włącz „Wyłącz ograniczenia procesów podrzędnych aplikacji” i wróć tutaj. Zostaw włączone Opcje programisty, bo inaczej przełącznik znowu się wyłączy.</string> + <string name="gate_open_dev">Otwórz Opcje programisty</string> + <string name="gate_no_toggle">Ta wersja Androida nie ma dla tego przełącznika, więc DroidDeck zmienia go przez debugowanie bezprzewodowe. Zajmuje to około minuty, bez potrzeby komputera.</string> + <string name="gate_needs_wifi">Debugowanie bezprzewodowe wymaga Wi-Fi. Działa każda sieć; nie musi mieć internetu.</string> + <string name="gate_needs_notifications">Kod parowania pojawia się w powiadomieniu. Zezwól DroidDeck na powiadomienia albo użyj sekcji „Inne sposoby”.</string> + <string name="gate_allow_notifications">Zezwól na powiadomienia</string> + <string name="gate_step1">Otwórz Ustawienia → Opcje programisty → Debugowanie bezprzewodowe i włącz je</string> + <string name="gate_step2">Dotknij „Sparuj urządzenie za pomocą kodu parowania”</string> + <string name="gate_step3">Wpisz kod w powiadomieniu DroidDeck</string> + <string name="gate_waiting">Czekanie na okienko parowania…</string> + <string name="gate_code_needed">Znaleziono okienko. Wpisz jego kod w powiadomieniu.</string> + <string name="gate_status">Stan</string> + <string name="gate_polling">Sprawdzanie co 2 sekundy. Ta strona zamknie się, gdy przełącznik będzie wyłączony.</string> + <string name="gate_other_ways">Inne sposoby</string> + <string name="gate_other_toggle">Debugowanie bezprzewodowe, adres ręczny, komputer z ADB</string> + <string name="gate_other_no_toggle">Adres ręczny, komputer z ADB, Opcje programisty</string> + <string name="gate_use_wireless_instead">Użyj za to debugowania bezprzewodowego</string> + <string name="gate_some_roms">Niektóre ROM-y dodają ten przełącznik mimo to. Poszukaj „child process” w Opcjach programisty.</string> + <string name="gate_manual_hint">Jeśli powiadomienie nie działa, wpisz adres i kod z okienka samodzielnie.</string> + <string name="gate_enter_manually">Wpisz adres ręcznie</string> + <string name="gate_from_computer">Z komputera z ADB:</string> + <string name="gate_copy_command">Kopiuj polecenie</string> + <string name="gate_choose_display">Wybierz, na którym ekranie otworzyć Ustawienia Androida.</string> + <string name="gate_main_screen">Ekran główny</string> + <string name="wadb_finding_port">Sparowano. Wyszukiwanie portu debugowania bezprzewodowego…</string> + <string name="wadb_enter_port">Sparowano. Wpisz port z Ustawień.</string> + <string name="wadb_applying">Znaleziono urządzenie. Stosowanie ustawienia…</string> + <string name="wadb_apply_failed">Nie udało się zastosować automatycznie. Sprawdź adres poniżej i spróbuj ponownie. %1$s</string> + <string name="wadb_title_wireless">Debugowanie bezprzewodowe</string> + <string name="wadb_title_done">Limit procesów podrzędnych zmieniony</string> + <string name="wadb_title">Zmień limit procesów podrzędnych</string> + <string name="wadb_lede_compact0">Jeśli opcja jest niedostępna, sparuj przez debugowanie bezprzewodowe.</string> + <string name="wadb_lede_compact1">Sparowano. Sprawdź adres IP i port w Debugowaniu bezprzewodowym.</string> + <string name="wadb_lede_done">Limit procesów podrzędnych został zmieniony.</string> + <string name="wadb_lede0">Użyj kroku 2, jeśli Opcje programisty nie mają ustawienia procesów podrzędnych. Otwórz Opcje programisty → Debugowanie bezprzewodowe → Sparuj urządzenie za pomocą kodu parowania.</string> + <string name="wadb_lede1">Sparowano. Użyj adresu poniżej lub zaktualizuj go z Debugowanie bezprzewodowe → Adres IP i port.</string> + <string name="wadb_lede_done_long">Limit procesów podrzędnych został zmieniony przez debugowanie bezprzewodowe.</string> + <string name="wadb_confirmed_on">Android potwierdził, że limit jest włączony.</string> + <string name="wadb_confirmed_off">Android potwierdził, że limit jest wyłączony.</string> + <string name="wadb_pair_group">2 · Sparuj debugowanie bezprzewodowe</string> + <string name="wadb_pair_address">Adres IP i port okienka parowania</string> + <string name="wadb_pin">Kod parowania (PIN)</string> + <string name="wadb_pin_placeholder">6 cyfr</string> + <string name="wadb_pair">Sparuj</string> + <string name="wadb_apply_group">2 · Zastosuj przez debugowanie bezprzewodowe</string> + <string name="wadb_connect_address">Adres IP i port połączenia</string> + <string name="wadb_pair_again">Sparuj ponownie</string> + <string name="wadb_turn_off">Wyłącz limit</string> + <string name="wadb_other_ways">Inne sposoby na zmianę tego</string> + <string name="wadb_dev_try_first">1 · Opcje programisty (spróbuj najpierw)</string> + <string name="wadb_restrict_on">Ustaw „Wyłącz ograniczenia procesów podrzędnych aplikacji” na wyłączone.</string> + <string name="wadb_restrict_off">Ustaw „Wyłącz ograniczenia procesów podrzędnych aplikacji” na włączone.</string> + <string name="wadb_computer_last">3 · Komputer z ADB (ostatnia opcja)</string> + <string name="wadb_only_if">Tylko jeśli debugowanie bezprzewodowe jest niedostępne.</string> + <string name="wadb_computer_group">3 · Komputer z ADB (ostatnia opcja)</string> + <string name="ctrl_osc_hint">Gdy w sesji pojawiają się sterowanie dotykowe</string> + <string name="ctrl_color">Kolor</string> + <string name="ctrl_color_hint">Odcień przycisków na ekranie</string> + <string name="ctrl_custom">Własny</string> + <string name="ctrl_opacity">Przezroczystość</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Rozmiar przycisków</string> + <string name="ctrl_size_hint" formatted="false">100% to rozmiar standardowy</string> + <string name="ctrl_stick_click">Kliknięcie gałki</string> + <string name="ctrl_stick_click_hint">Dotknij dwukrotnie i przytrzymaj gałkę, aby uzyskać L3 lub R3</string> + <string name="ctrl_adaptive">Adaptacyjne gałki</string> + <string name="ctrl_rumble">Wibracje gry</string> + <string name="ctrl_steam_button">Przycisk Steam</string> + <string name="ctrl_qam_button">Przycisk QAM</string> + <string name="ctrl_keyboard_button">Przycisk klawiatury</string> + <string name="ctrl_select_steam">Naciśnij Select, aby otworzyć menu Steam</string> + <string name="ctrl_select_steam_hint">Zamiast View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Cony jako kontrolery VR</string> + <string name="ctrl_joycon_vr_hint">Gdy działa SteamVR, każdy Joy-Con staje się dłonią. Skieruj go przed siebie i przytrzymaj Home lub Capture, aby go wyśrodkować.</string> + <string name="setup_animations">Animacje</string> + <string name="ctrl_adaptive_hint">Gałki pojawiają się tam, gdzie dotykasz, i chowają się po puszczeniu</string> + <string name="ctrl_layout">Układ</string> + <string name="ctrl_layout_custom">Zapisano własne pozycje</string> + <string name="ctrl_layout_default">Dopasowany do tego ekranu</string> + <string name="ctrl_edit">Edytuj</string> + <string name="ctrl_reset">Resetuj</string> + <string name="ctrl_mapping">Mapowanie przycisków</string> + <string name="ctrl_mapping_default">Każdy przycisk wysyła własny sygnał</string> + <string name="ctrl_mapping_count">Zmapowano %1$d z %2$d przycisków</string> + <string name="ctrl_configure">Skonfiguruj</string> + <string name="ctrl_reset_all">Resetuj kontroler</string> + <string name="ctrl_reset_all_hint">Przywraca wszystkie ustawienia kontrolera i układ</string> + <string name="ctrl_mapping_lede">Co wysyła do gry każdy przycisk na ekranie. Ukryty usuwa przycisk.</string> + <string name="ctrl_onscreen_buttons">Przyciski na ekranie</string> + <string name="ctrl_defaults">Domyślne</string> + <string name="ctrl_reset_mapping">Resetuj mapowanie</string> + <string name="content_android_apps">Aplikacje Android</string> + <string name="content_apps_count">%1$d aplikacji</string> + <string name="content_no_android_apps">Nie znaleziono żadnych aplikacji Android do uruchomienia.</string> + <string name="content_desktop_installed">● Pulpit zainstalowany</string> + <string name="content_desktop_first_open">Instaluje się przy pierwszym otwarciu</string> + <string name="content_available">Dostępne do instalacji</string> + <string name="content_not_installed">Nie zainstalowano.</string> + <string name="content_not_installed_suffix">%1$s · nie zainstalowano</string> + <string name="content_open_named">Otwórz %1$s</string> + <string name="content_games">Gry</string> + <string name="content_choose_roms">Wybierz folder ROM-ów.</string> + <string name="content_retroarch_roms">Przejdź do /root/ROMs w RetroArch.</string> + <string name="content_add_roms">Dodaj gry %1$s do ROMs/%2$s.</string> + <string name="content_install_named">Zainstaluj %1$s</string> + <string name="content_stop_to_install">Zatrzymaj sesję, aby zainstalować</string> + <string name="content_runtime_required">Wymagane środowisko uruchomieniowe</string> + <string name="content_loading_details">Wczytywanie szczegółów instalacji…</string> + <string name="content_details_unavailable">Szczegóły instalacji są niedostępne. Spróbuj ponownie później.</string> + <string name="content_needs_runtime">Najpierw zainstaluj środowisko Linux w sekcji Konfiguracja.</string> + <string name="content_stop_first">Zatrzymaj działającą sesję, aby zainstalować aplikacje pulpitu.</string> + <string name="content_install_into">Instaluje %1$s w pulpicie Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Ukrycie usuwa to z Pulpitu. Jego pliki zostają w środowisku Linux.</string> + <string name="content_rom_gone">Tej gry nie ma już w folderze ROM-ów.</string> + <string name="content_desktop_system">Pulpit · %1$s</string> + <string name="content_launch_in">Uruchom w %1$s</string> + <string name="content_also_in">Także w %1$s</string> + <string name="content_page_gone">Ta strona nie istnieje. Wybierz sekcję po lewej.</string> + <string name="content_open_desktop">Otwórz pulpit</string> + <string name="content_install_open_desktop">Zainstaluj i otwórz pulpit</string> + <string name="desktop_remove_title">Odinstaluj pulpit</string> + <string name="desktop_remove_text">Usuwa pulpit i jego dołączone aplikacje. Zachowuje gry, dodane aplikacje, ustawienia i współdzielone biblioteki.</string> + <string name="desktop_removing">Usuwanie pulpitu</string> + <string name="desktop_removed">Pulpit usunięty</string> + <string name="desktop_cleaning_legacy">Usuwanie starych plików LXQt</string> + <string name="desktop_removal_unknown">Zaktualizuj DroidDeck przed usunięciem tej wersji pulpitu.</string> + <string name="content_linux_desktop">Pulpit Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox i Twoje emulatory</string> + <string name="games_empty">Gry, które instalujesz w Steam, pojawią się tutaj po sesji.</string> + <string name="games_play_steam">Zagraj w Steam</string> + <string name="games_play_steamvr">Zagraj w SteamVR</string> + <string name="games_launch_settings">Ustawienia uruchamiania</string> + <string name="games_launch">Uruchom</string> + <string name="games_files">Pliki gry</string> + <string name="games_prefix">Prefiks Proton</string> + <string name="games_saves_looking">Wyszukiwanie zapisów…</string> + <string name="games_saves_none">Nie znaleziono folderu zapisów po nazwie. Eksport obejmuje cały folder użytkownika.</string> + <string name="games_saves_folders">%1$d folderów zapisów</string> + <string name="games_saves_summary">%1$s · %2$d plików · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Zarządzaj zapisami</string> + <string name="games_saves">Zapisy gry</string> + <string name="games_import_saves">Importuj zapisy…</string> + <string name="games_export_gamehub">Eksportuj jako zip GameHub…</string> + <string name="games_export_winlator">Eksportuj jako zip Winlator…</string> + <string name="games_open_save_folder">Otwórz folder zapisów</string> + <string name="games_never_played">Nigdy nie grano</string> + <string name="games_runtime_busy_percent">Środowisko zajęte · %1$d%%</string> + <string name="games_runtime_busy">Środowisko zajęte</string> + <string name="games_runtime_first_play">Środowisko instaluje się przy pierwszym uruchomieniu</string> + <string name="games_runtime_update">Dostępna aktualizacja środowiska</string> + <string name="games_runtime_ready">● Środowisko gotowe</string> + <string name="games_last_played">Ostatnio grano %1$s</string> + <string name="games_internal">Pamięć wewnętrzna</string> + <string name="games_added">Dodana gra</string> + <string name="games_custom">Własna gra</string> + <string name="games_store_storage">Miejsce na gry</string> + <string name="gpu_auto_hint">Najlepsza para dla tego GPU, aktualizowana automatycznie</string> + <string name="gpu_manual_hint">Wybierz parę samodzielnie</string> + <string name="gpu_checking">Sprawdzanie sterowników…</string> + <string name="gpu_none_listed">Brak sterowników na liście. Odśwież, aby ich poszukać.</string> + <string name="gpu_hide_other">Ukryj sterowniki innych GPU</string> + <string name="gpu_show_other">Pokaż sterowniki innych GPU</string> + <string name="gpu_advanced">Zaawansowane</string> + <string name="gpu_set_with_display">Ustawiany wraz ze sterownikiem wyświetlania: %1$s obejmuje oba.</string> + <string name="gpu_set_with_runtime">Ustawiany wraz ze sterownikiem środowiska: %1$s obejmuje oba.</string> + <string name="gpu_runtime_hint">Używany przez gry i pulpit.</string> + <string name="gpu_runtime_default">Domyślny dla środowiska</string> + <string name="gpu_auto_by_gpu">Auto – wybrany według GPU</string> + <string name="gpu_manage">Pobierz, zaimportuj lub usuń…</string> + <string name="gpu_in_use_caps">W UŻYCIU</string> + <string name="gpu_builtin">Sterowniki wbudowane w DroidDeck</string> + <string name="gpu_matched_pair">Sterowniki środowiska i wyświetlania ustawiane razem jako dobrana para.</string> + <string name="gpu_recommended_for">Polecany dla tego GPU: %1$s.</string> + <string name="gpu_refresh_hint">Odśwież, aby poszukać sterowników dla tego GPU.</string> + <string name="gpu_recommended_caps">POLECANY</string> + <string name="gpu_unavailable">Niedostępny</string> + <string name="load_runtime">Środowisko Linux</string> + <string name="load_runtime_detail">Przygotowywanie środowiska Linux</string> + <string name="load_session">Sesja</string> + <string name="load_session_detail">Uruchamianie obrazu i dźwięku</string> + <string name="load_steam">Klient Steam</string> + <string name="load_steam_detail">Sprawdzanie Steam i jego narzędzi zgodności</string> + <string name="load_opening_steam">Otwieranie Steam</string> + <string name="load_opening_steam_detail">Czekanie na pierwszą klatkę Steam</string> + <string name="load_desktop">Pulpit</string> + <string name="load_desktop_detail">Przygotowywanie pulpitu</string> + <string name="load_opening">Otwieranie</string> + <string name="load_opening_detail">Oczekiwanie na pierwszą klatkę</string> + <string name="load_starting_steam">Uruchamianie Steam</string> + <string name="load_ended">Sesja się zakończyła</string> + <string name="load_step">Krok %1$d z %2$d</string> + <string name="load_steam_paused">Steam jest wstrzymany</string> + <string name="deck_tab_grips">Uchwyty</string> + <string name="deck_tab_left">Lewy pad</string> + <string name="deck_tab_right">Prawy pad</string> + <string name="deck_tab_both">Oba</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Gałka</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Przełącz między gałką a trackpadem</string> + <string name="deck_more_controls">Więcej sterowania Deck</string> + <string name="deck_panels">PANELE</string> + <string name="deck_close">Zamknij sterowanie na drugim ekranie</string> + <string name="deck_open_steam_menu">Otwórz menu Steam</string> + <string name="deck_left_upper">Lewy · górny</string> + <string name="deck_left_lower">Lewy · dolny</string> + <string name="deck_right_upper">Prawy · górny</string> + <string name="deck_right_lower">Prawy · dolny</string> + <string name="deck_click">Kliknięcie</string> + <string name="deck_right_trackpad">Prawy trackpad</string> + <string name="deck_left_trackpad">Lewy trackpad</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Pokaż klawiaturę</string> + <string name="second_hide_keyboard">Ukryj klawiaturę</string> + <string name="second_terminal">Terminal Linux</string> + <string name="second_terminal_not_ready">Sesja Linux nie jest jeszcze gotowa na terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Gry</string> + <string name="rail_desktop">Pulpit</string> + <string name="rail_store">Sklep</string> + <string name="rail_components">Komponenty</string> + <string name="rail_apps">Aplikacje</string> + <string name="rail_setup">Konfiguracja</string> + <string name="rail_updates">Aktualizacje</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Wznów %1$s</string> + <string name="roms_text">W każdej sesji widoczny jako /root/ROMs. Pamięć wewnętrzna jest w /root/Storage.</string> + <string name="roms_none">Nie wybrano folderu</string> + <string name="roms_applies">Zadziała od następnej sesji. Karty SD są obsługiwane.</string> + <string name="roms_choose">Wybierz folder</string> + <string name="roms_change">Zmień folder</string> + <string name="proton_lede">Zainstaluj wersję Proton dla ARM64, a potem wybierz ją dla gry w Steam → Właściwości → Zgodność.</string> + <string name="proton_stop_first">Zatrzymaj działającą sesję, aby zainstalować lub usunąć narzędzie zgodności.</string> + <string name="proton_available">Dostępne wersje</string> + <string name="proton_installed">Zainstalowano %1$s</string> + <string name="proton_queued">Oczekuje z wcześniejszego żądania</string> + <string name="proton_not_installed">Nie zainstalowano</string> + <string name="proton_update_available">Dostępna aktualizacja → %1$s</string> + <string name="proton_remove_older">Usuń stare wersje %1$s</string> + <string name="proton_remove_older_body">Usuwa %1$s. Gry ustawione na te wersje trzeba przełączyć na inny Proton.</string> + <string name="proton_remove_body">Gry ustawione na tę wersję trzeba przełączyć na inny Proton.</string> + <string name="proton_install_now">Zainstaluj teraz</string> + <string name="proton_cancel_queued">Anuluj oczekujące</string> + <string name="pckb_android">Klawiatura Android</string> + <string name="pckb_hide">Ukryj ✕</string> + <string name="main_launch_named">Uruchom %1$s</string> + <string name="main_choose_screen">Wybierz ekran. Dodatkowy: %1$s.</string> + <string name="main_secondary_gone">Dodatkowy wyświetlacz nie jest już dostępny.</string> + <string name="main_primary">Ekran podstawowy</string> + <string name="main_secondary">Ekran dodatkowy</string> + <string name="widgets_prev_tab">Poprzednia karta</string> + <string name="widgets_next_tab">Następna karta</string> + <string name="widgets_on">Wł.</string> + <string name="widgets_all_n">Wszystkie %1$d</string> + <string name="widgets_none">Brak</string> + <string name="widgets_n_of_m">%1$d z %2$d</string> + <string name="widgets_off">Wył.</string> + <string name="screen_bottom">Dolny ekran</string> + <string name="game_env_applies">Zadziała przy następnym uruchomieniu gry. Profil gry zastępuje profil wspólny.</string> + <string name="game_env_other">Inna gra według ID aplikacji…</string> + <string name="game_env_done">Gotowe</string> + <string name="game_env_default">Domyślne</string> + <string name="game_env_off">Wył.</string> + <string name="game_env_change">Zmień…</string> + <string name="game_env_change_title">Zmień zmienną</string> + <string name="game_env_restore_default">Przywróć domyślne</string> + <string name="game_env_eyebrow">Gry Proton</string> + <string name="pip_title">Obraz w obrazie</string> + <string name="pip_auto">Automatycznie włączaj obraz w obrazie</string> + <string name="unfolded_controls">Sterowanie na rozłożonym ekranie</string> + <string name="unfolded_controls_hint">Po rozłożeniu gra jest nad trackpadami i tylnymi uchwytami Steam Deck. Po złożeniu gra zajmuje cały ekran.</string> + <string name="pip_suspended">Wstrzymano</string> + <string name="pip_not_ready">Obraz w obrazie będzie dostępny, gdy sesja będzie gotowa.</string> + <string name="pip_permission">Zezwól DroidDeck na obraz w obrazie w ustawieniach systemu Android.</string> + <string name="pip_unavailable">Android nie mógł otworzyć obrazu w obrazie.</string> + <string name="game_shortcut">Skrót</string> + <string name="game_shortcut_add">Dodaj do ekranu głównego</string> + <string name="game_shortcut_choose">Wybierz grę</string> + <string name="game_shortcut_scanning">Skanowanie zainstalowanych gier…</string> + <string name="game_link_copy">Kopiuj link uruchamiania</string> + <string name="game_link_copied">Skopiowano link uruchamiania</string> + <string name="game_shortcut_unsupported">Ten launcher nie może dodawać skrótów. Użyj opcji „Kopiuj link uruchamiania”.</string> + <string name="game_link_invalid">Nieprawidłowy link uruchamiania gry.</string> + <string name="game_link_missing">Tej gry nie ma już w bibliotece DroidDeck.</string> + <string name="game_link_session_busy">Zatrzymaj bieżącą sesję przed uruchomieniem gry Steam.</string> + <string name="game_link_failed">Nie udało się wysłać gry do Steam. Spróbuj uruchomić ją ponownie.</string> + <string name="setup_retry_removal">Ponów usuwanie</string> + <string name="runtime_removing">Usuwanie</string> + <string name="runtime_removal_incomplete">Usuwanie nieukończone</string> + <string name="game_file_export">Eksportuj plik gry</string> + <string name="game_file_sync">Synchronizuj wszystkie pliki gier z folderem</string> + <string name="game_file_stop_sync">Zatrzymaj synchronizację plików gier</string> + <string name="game_file_folder">Wybierz folder na pliki gier dla frontendów</string> + <string name="game_file_exported">Pliki gier zapisano w %1$s</string> + <string name="game_frontend_files">Pliki frontendów</string> + + <string name="main_wait_runtime">Poczekaj na zakończenie operacji na środowisku</string> + <string name="main_wait_proton_install">Poczekaj na zakończenie instalacji narzędzia zgodności</string> + <string name="main_wait_desktop_install">Poczekaj na zakończenie instalacji aplikacji desktopowej</string> + <string name="main_wait_install_game">Poczekaj na zakończenie instalacji, zanim uruchomisz grę</string> + <string name="main_saves_close_session">Najpierw zamknij sesję Steam, aby gra nie nadpisała importowanych zapisów</string> + <string name="main_saves_importing">Importowanie do %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Zaimportowano %1$d plik z %2$s do %3$s</item> + <item quantity="few">Zaimportowano %1$d pliki z %2$s do %3$s</item> + <item quantity="many">Zaimportowano %1$d plików z %2$s do %3$s</item> + <item quantity="other">Zaimportowano %1$d pliku z %2$s do %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Zaimportowano %1$d plik z %2$s do %3$s. Kopię starych zapisów umieszczono w Download/DroidDeck/Saves/backups</item> + <item quantity="few">Zaimportowano %1$d pliki z %2$s do %3$s. Kopię starych zapisów umieszczono w Download/DroidDeck/Saves/backups</item> + <item quantity="many">Zaimportowano %1$d plików z %2$s do %3$s. Kopię starych zapisów umieszczono w Download/DroidDeck/Saves/backups</item> + <item quantity="other">Zaimportowano %1$d pliku z %2$s do %3$s. Kopię starych zapisów umieszczono w Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Wybierz plik zip z zapisami dla %1$s</string> + <string name="main_saves_exporting">Eksportowanie %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Wyeksportowano %1$d plik jako %2$s: %3$s</item> + <item quantity="few">Wyeksportowano %1$d pliki jako %2$s: %3$s</item> + <item quantity="many">Wyeksportowano %1$d plików jako %2$s: %3$s</item> + <item quantity="other">Wyeksportowano %1$d pliku jako %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Wybierz, gdzie zapisać %1$s (%2$s)</string> + <string name="main_action_failed">%1$s nie powiodło się: %2$s</string> + <string name="main_no_logs_yet">Brak logów sesji: najpierw uruchom sesję.</string> + <string name="main_no_logs_to_clear">Brak logów sesji do wyczyszczenia.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Wyczyszczono %1$d folder logów sesji.</item> + <item quantity="few">Wyczyszczono %1$d foldery logów sesji.</item> + <item quantity="many">Wyczyszczono %1$d folderów logów sesji.</item> + <item quantity="other">Wyczyszczono %1$d folderu logów sesji.</item> + </plurals> + <string name="main_wadb_pair_failed">Parowanie przez debugowanie bezprzewodowe nie powiodło się</string> + <string name="main_wadb_command_failed">Polecenie debugowania bezprzewodowego nie powiodło się</string> + <string name="main_wadb_unavailable">Debugowanie bezprzewodowe jest niedostępne</string> + <string name="main_adb_copied">Skopiowano polecenie ADB</string> + <string name="main_pick_roms">Wybierz folder ROM-ów</string> + <string name="main_non_adreno_title">To nie jest GPU Adreno</string> + <string name="main_non_adreno_text">Turnip obsługuje GPU Adreno. Na tym urządzeniu (%1$s) Steam może wyświetlać czarny ekran. Pobieranie: %2$.0f MB.</string> + <string name="main_install_anyway">Zainstaluj mimo to</string> + <string name="main_remove_runtime_title">Usuń środowisko Linux</string> + <string name="main_remove_runtime_text">Spowoduje to usunięcie środowiska, klienta Steam w nim i wszystkich zainstalowanych tam gier.</string> + <string name="main_applied">Zastosowano: %1$s</string> + <string name="android_app_open_failed_primary">Nie udało się otworzyć %1$s na ekranie podstawowym</string> + <string name="android_app_open_failed_on">Nie udało się otworzyć %1$s na wyświetlaczu %2$s</string> + <string name="android_app_open_failed_display">Nie udało się otworzyć %1$s na wyświetlaczu %2$d</string> + <string name="comp_busy_importing">Importowanie</string> + <string name="comp_busy_swapping">Zamienianie</string> + <string name="comp_busy_restoring">Przywracanie</string> + <string name="comp_busy_cancelling">Anulowanie</string> + <string name="comp_busy_deleting">Usuwanie</string> + <string name="comp_cannot_read">nie można odczytać pliku</string> + <string name="comp_imported">Zaimportowano %1$s</string> + <string name="comp_swap_cancelled">Anulowano oczekującą zamianę.</string> + <string name="comp_pick_wcp">Wybierz pakiet komponentu (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nie udało się połączyć z Nightlies</string> + <string name="comp_stored">Zapisano %1$s</string> + <string name="comp_download_failed">Pobieranie nie powiodło się: %1$s</string> + <string name="drivers_pick_linux">Wybierz sterownik środowiska Linux (zip -Linux lub pakiet Android + Linux)</string> + <string name="drivers_pick_android">Wybierz sterownik wyświetlania (zip AdrenoTools lub pakiet Android + Linux)</string> + <string name="drivers_pick_any">Wybierz zip ze sterownikiem lub pakiet Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Usuwanie %1$s…</string> + <string name="main_forgetting_named">Zapominanie %1$s…</string> + <string name="main_pick_game_storage">Wybierz folder na gry</string> + <string name="main_pick_decky_zip">Wybierz plik ZIP wtyczki Decky</string> + <string name="main_storage_not_usable">Nie nadaje się: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Usuwanie środowiska Linux</string> + <string name="main_settings_main_screen">Nie udało się otworzyć Ustawień na dolnym ekranie; otwarto je na ekranie podstawowym.</string> + <string name="main_open_dev_options">Otwórz Opcje programisty w Ustawieniach</string> + + <string name="upd_unknown_apps_failed">Nie udało się otworzyć ustawienia systemu Android „Instalowanie nieznanych aplikacji”</string> + <string name="upd_couldnt_check">Nie udało się sprawdzić: %1$s</string> + <string name="upd_no_download">Ta wersja nie ma pliku do pobrania dla tej kopii DroidDeck</string> + <string name="upd_stop_first">Najpierw zatrzymaj działającą sesję, a potem zaktualizuj</string> + <string name="upd_stage_downloading">Pobieranie</string> + <string name="upd_stage_installing">Instalowanie</string> + <string name="upd_stage_confirm">Oczekiwanie na Twoje potwierdzenie</string> + <string name="upd_failed">Aktualizacja nie powiodła się</string> + <string name="upd_not_offered">Android nie zaproponował instalacji aktualizacji</string> + + <string name="decky_install_failed">Instalacja Decky nie powiodła się: %1$s</string> + <string name="decky_plugin_starting">Rozpoczynanie importu wtyczki…</string> + <string name="decky_plugin_failed">Import wtyczki nie powiódł się: %1$s</string> + <string name="decky_plugin_installed">Zainstalowano wtyczkę. Uruchom ponownie Steam, aby ją wczytać.</string> + + <string name="drivers_not_checked">Jeszcze nie sprawdzono – dotknij odświeżania, aby poszukać nowych sterowników</string> + <string name="drivers_bundle_sets_display">Android + Linux: ustawia też sterownik wyświetlania</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: ustawia też sterownik środowiska</string> + <string name="drivers_runtime_builtin">Turnip wbudowany w środowisko</string> + <string name="drivers_system_vulkan">systemowy Vulkan: brak dołączonej wersji dla tego GPU</string> + <string name="drivers_bundled">%1$s (dołączony)</string> + <string name="drivers_manual">Ręcznie</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Obecnie opublikowano tylko jedną połowę</string> + <string name="drivers_pair_size">%1$.0f MB łącznie</string> + <string name="drivers_none_to_set">Brak sterowników do ustawienia: %1$s</string> + <string name="drivers_checking_latest">Szukanie najnowszych sterowników…</string> + <string name="drivers_up_to_date_check_failed">Aktualne (nie udało się sprawdzić: %1$s)</string> + <string name="drivers_recommended_unpublished">Zalecane sterowniki nie są obecnie opublikowane</string> + <string name="drivers_downloading_pair">Pobieranie %1$s %2$s…</string> + <string name="drivers_updated_to">Zaktualizowano do %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Zaktualizowano do %1$s %2$s. Sterownik wyświetlania zadziała po ponownym uruchomieniu DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Aktualizacje sterowników poczekają, aż sesja się zakończy.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s zostanie pobrany, gdy wyłączysz transmisję danych i oszczędzanie baterii.</string> + <string name="drivers_skipping_bad">%1$s %2$s nie uruchomił tu sesji, więc Automatyczny zostaje przy sterownikach, które to zrobiły.</string> + <string name="drivers_rolled_back">%1$s dwa razy nie uruchomił sesji, więc Automatyczny wrócił do sterowników, które działały.</string> + <string name="drivers_switched_to">Przełączono na %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Przełączono na %1$s %2$s. Sterownik wyświetlania zadziała po ponownym uruchomieniu DroidDeck.</string> + <string name="drivers_using">Używany: %1$s %2$s.</string> + <string name="drivers_using_restart">Używany: %1$s %2$s. Sterownik wyświetlania zadziała po ponownym uruchomieniu DroidDeck.</string> + <string name="drivers_using_quest">Używany jest dołączony sterownik obrazu Quest i domyślne środowisko.</string> + <string name="drivers_using_quest_restart">Używany jest dołączony sterownik obrazu Quest i domyślne środowisko. Sterownik obrazu zadziała po ponownym uruchomieniu DroidDeck.</string> + <string name="drivers_not_a_driver">To nie jest zip ze sterownikiem: ani sterownik AdrenoTools, ani Turnip -Linux, ani pakiet Android + Linux</string> + <string name="drivers_import_failed">Import nie powiódł się: %1$s</string> + <string name="drivers_imported_unnamed">Zaimportowany sterownik</string> + <string name="drivers_using_bundle">%1$s służy teraz jako sterownik środowiska i wyświetlania.</string> + <string name="drivers_using_bundle_restart">%1$s służy teraz jako sterownik środowiska i wyświetlania. Sterownik wyświetlania zadziała po ponownym uruchomieniu DroidDeck.</string> + <string name="drivers_deleted_bundle">Usunięto %1$s (oba sterowniki)</string> + <string name="drivers_deleted">Usunięto %1$s</string> + <string name="drivers_release_status">Najnowsze: %1$s · sprawdzono %2$s</string> + <string name="drivers_release_status_failed">Najnowsze: %1$s · %2$s niedostępne · sprawdzono %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d min temu</item> + <item quantity="few">%1$d min temu</item> + <item quantity="many">%1$d min temu</item> + <item quantity="other">%1$d min temu</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d godz. temu</item> + <item quantity="few">%1$d godz. temu</item> + <item quantity="many">%1$d godz. temu</item> + <item quantity="other">%1$d godz. temu</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d dzień temu</item> + <item quantity="few">%1$d dni temu</item> + <item quantity="many">%1$d dni temu</item> + <item quantity="other">%1$d dnia temu</item> + </plurals> + <string name="drivers_checking_sources">Sprawdzanie Banners-Turnip, WinNative i DroidDeck…</string> + <string name="drivers_check_failed">błąd sprawdzania</string> + <string name="drivers_installed_pick_either">Zainstalowano %1$s – wybierz go na dowolnej liście, aby ustawić oba sterowniki</string> + <string name="drivers_installed_pick">Zainstalowano %1$s – wybierz go w menu</string> + + <string name="session_wait_removal">Poczekaj na zakończenie usuwania środowiska</string> + <string name="session_title_game">Gra</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">bezpośredni</string> + <string name="session_swap_failed">Zamiana nie powiodła się: %1$s</string> + <string name="session_profile_save_failed">Zapis profilu nie powiódł się: %1$s</string> + <string name="session_desktop_paused">Pulpit jest wstrzymany</string> + <string name="session_named_paused">%1$s – wstrzymano</string> + <string name="session_program_paused">Program jest wstrzymany</string> + <string name="session_starting_desktop">Uruchamianie pulpitu</string> + <string name="session_starting_named">Uruchamianie %1$s</string> + <string name="session_starting_program">Uruchamianie programu</string> + <string name="session_no_logs">Brak logów dla tej sesji.</string> + <string name="session_logs_archive_failed">Nie udało się utworzyć archiwum logów sesji.</string> + <string name="session_logs_share_failed">Nie udało się udostępnić logów sesji.</string> + <string name="session_starting_session">Uruchamianie sesji…</string> + <string name="session_runtime_downloading">pobieranie środowiska Linux</string> + <string name="session_runtime_downloading_mb">pobieranie środowiska Linux · %1$d z %2$d MB</string> + <string name="session_runtime_checking">sprawdzanie środowiska Linux</string> + <string name="session_runtime_unpacking">rozpakowywanie środowiska Linux</string> + <string name="session_desktop_downloading">pobieranie pulpitu</string> + <string name="session_desktop_downloading_mb">pobieranie pulpitu · %1$d z %2$d MB</string> + <string name="session_desktop_checking">sprawdzanie pulpitu</string> + <string name="session_desktop_unpacking">rozpakowywanie pulpitu</string> + <string name="session_proton_downloading">pobieranie Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">pobieranie Proton Experimental (ARM64) · %1$d z %2$d MB</string> + <string name="session_proton_checking">sprawdzanie Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">rozpakowywanie Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Nie udało się połączyć z katalogiem środowisk. Sprawdź połączenie i ponownie naciśnij Graj.</string> + <string name="session_runtime_install_failed">Środowisko Linux nie zostało zainstalowane. Sprawdź środowisko w sekcji Konfiguracja i ponownie naciśnij Graj.</string> + <string name="session_desktop_install_failed">Pulpit nie został zainstalowany (%1$s). Sprawdź połączenie i ponownie naciśnij Pulpit.</string> + <string name="session_ended_named">%1$s – nieoczekiwane zatrzymanie. Udostępnij logi w zgłoszeniu błędu lub spróbuj ponownie.</string> + <string name="session_ended_program">Program nieoczekiwanie się zatrzymał. Udostępnij logi w zgłoszeniu błędu lub spróbuj ponownie.</string> + <string name="session_ended_desktop">Pulpit nieoczekiwanie się zatrzymał. Udostępnij logi w zgłoszeniu błędu lub spróbuj ponownie.</string> + <string name="session_ended_detail">Kod wyjścia %1$d · %2$s</string> + <string name="session_ended_no_log">brak logu</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Log zawiera %1$d błąd „Function not implemented”: przyspieszenie seccomp w proot zawodzi przy procesie pomocniczym na tym urządzeniu. Wybierz %2$s → „%3$s” (lub „%4$s”) i uruchom ponownie.</item> + <item quantity="few">Log zawiera %1$d błędy „Function not implemented”: przyspieszenie seccomp w proot zawodzi przy procesie pomocniczym na tym urządzeniu. Wybierz %2$s → „%3$s” (lub „%4$s”) i uruchom ponownie.</item> + <item quantity="many">Log zawiera %1$d błędów „Function not implemented”: przyspieszenie seccomp w proot zawodzi przy procesie pomocniczym na tym urządzeniu. Wybierz %2$s → „%3$s” (lub „%4$s”) i uruchom ponownie.</item> + <item quantity="other">Log zawiera %1$d błędu „Function not implemented”: przyspieszenie seccomp w proot zawodzi przy procesie pomocniczym na tym urządzeniu. Wybierz %2$s → „%3$s” (lub „%4$s”) i uruchom ponownie.</item> + </plurals> + + <string name="mode_decky_plugins">Wtyczki</string> + <string name="mode_decky_plugins_hint">Zainstaluj wtyczkę z pliku ZIP na następną sesję Steam.</string> + <string name="mode_decky_plugin_downloading">Pobieranie…</string> + <string name="mode_decky_plugin_install_zip">Zainstaluj z pliku ZIP</string> + <string name="store_cat_games">Gry</string> + <string name="store_cat_audio_video">Audio i wideo</string> + <string name="store_cat_graphics">Grafika</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Biuro</string> + <string name="store_cat_developer">Programowanie</string> + <string name="store_cat_education">Edukacja</string> + <string name="store_cat_science">Nauka</string> + <string name="store_cat_system">System</string> + <string name="store_cat_utilities">Narzędzia</string> + <string name="store_section_popular">Popularne</string> + <string name="store_section_trending">Na czasie</string> + <string name="store_section_new">Nowe</string> + <string name="store_section_updated">Zaktualizowane</string> + <string name="store_section_loading">wczytywanie…</string> + <string name="store_flatpak_setup">Konfiguracja Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Nie udało się sprawdzić aktualizacji w Flathub</string> + <string name="content_rom_installed">zainstalowana</string> + <string name="content_rom_folder">folder</string> + <string name="theme_graphite">Grafit</string> + <string name="theme_graphite_detail">Grafitowe powierzchnie i niebieski kuli z logo dla wszystkiego, co zaznaczone, aktywne lub naciśnięte.</string> + <string name="theme_paper">Papier na czerni</string> + <string name="theme_paper_detail">Biel jest kolorem głównym, a niebieski z ikony wyróżnia linie, pierścienie i kropki.</string> + <string name="theme_icon_blue">Niebieski z ikony</string> + <string name="theme_icon_blue_detail">Czarne tło, biały tekst i niebieski dla wszystkiego, co zaznaczone, aktywne lub naciśnięte.</string> + <string name="theme_electric">Elektryczny granat</string> + <string name="theme_electric_detail">Jaśniejszy niebieski na powierzchniach wpadających w granat zamiast w szarość.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Spacja</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Najpierw zainstaluj środowisko</string> + <string name="game_sync_err_steam_library">Biblioteka Steam jest niedostępna</string> + <string name="game_sync_err_previous_sd">Poprzednia biblioteka na karcie SD jest niedostępna</string> + <string name="game_sync_err_game_storage">Miejsce na gry jest niedostępne</string> + <string name="game_sync_err_added_games">Folder dodanych gier jest niedostępny</string> + <string name="game_sync_err_manifests">Manifesty Steam są niedostępne</string> + <string name="content_system_many">Wiele systemów</string> + <string name="fm_drive_internal">Wewnętrzna</string> + <string name="fm_drive_linux">System Linux</string> + <string name="fm_drive_sd">Karta SD</string> + <string name="fm_drive_storage">Pamięć</string> + <string name="fm_select">Zaznacz</string> + <string name="fm_properties">Właściwości</string> + <string name="fm_favorite_add">Dodaj do ulubionych</string> + <string name="fm_favorite_remove">Usuń z ulubionych</string> + <string name="fm_rename">Zmień nazwę</string> + <string name="fm_copy">Kopiuj</string> + <string name="fm_cut">Wytnij</string> + <string name="fm_actions">Działania</string> + <string name="fm_favorites">Ulubione</string> + <string name="fm_pin_current">Przypnij bieżący folder</string> + <string name="fm_no_favorites">Brak ulubionych – przypnij folder w jego menu ⋮, aby szybko tu wracać.</string> + <string name="fm_unpin_favorite">Usuń z ulubionych</string> + <string name="fm_size_zero">0 bajtów</string> + <string name="fm_unit_bytes">B</string> + <string name="fm_prop_location">Lokalizacja</string> + <string name="fm_prop_type">Typ</string> + <string name="fm_prop_size">Rozmiar</string> + <string name="fm_prop_modified">Zmodyfikowano</string> + <string name="fm_type_folder">Folder</string> + <string name="fm_type_file">Plik</string> + <string name="fm_type_ext_file">Plik %1$s</string> + <string name="fm_read_only">Tylko do odczytu</string> + <string name="fm_read_only_hint">Chroni ten plik przed nadpisaniem lub usunięciem przez gry (i Wine).</string> + <string name="fm_read_only_failed">Nie udało się zmienić atrybutu Tylko do odczytu</string> + <string name="fm_hidden">Ukryty</string> + <string name="fm_hidden_unsupported">Ta pamięć nie obsługuje atrybutu ukrycia.</string> + <string name="fm_hidden_hint">Oznacza plik jako ukryty w Windows (atrybut ukrycia Wine).</string> + <string name="fm_hidden_failed">Nie udało się zmienić atrybutu Ukryty w tej pamięci</string> + <string name="fm_done">Gotowe</string> + <string name="fm_op_deleting">Usuwanie...</string> + <string name="fm_delete_failed">Usuwanie nie powiodło się</string> + <string name="fm_op_moving">Przenoszenie...</string> + <string name="fm_op_copying">Kopiowanie...</string> + <string name="fm_op_moving_item">Przenoszenie - %1$s</string> + <string name="fm_op_copying_item">Kopiowanie - %1$s</string> + <string name="fm_op_moving_batch">Przenoszenie %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Kopiowanie %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">Gotowe: %1$d, błędy: %2$d</string> + <string name="fm_paste_skipped">Gotowe: %1$d, pominięte: %2$d</string> + <plurals name="fm_paste_moved"> + <item quantity="one">Przeniesiono %1$d element</item> + <item quantity="few">Przeniesiono %1$d elementy</item> + <item quantity="many">Przeniesiono %1$d elementów</item> + <item quantity="other">Przeniesiono %1$d elementu</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">Skopiowano %1$d element</item> + <item quantity="few">Skopiowano %1$d elementy</item> + <item quantity="many">Skopiowano %1$d elementów</item> + <item quantity="other">Skopiowano %1$d elementu</item> + </plurals> + <string name="fm_already_exists">„%1$s” już istnieje</string> + <string name="fm_op_renaming">Zmiana nazwy...</string> + <string name="fm_rename_failed">Zmiana nazwy nie powiodła się</string> + <string name="fm_op_creating_folder">Tworzenie folderu...</string> + <string name="fm_create_folder_failed">Nie udało się utworzyć folderu</string> + <string name="fm_new_folder">Nowy folder</string> + <string name="fm_folder_name">Nazwa folderu</string> + <string name="fm_create">Utwórz</string> + <string name="fm_new_name">Nowa nazwa</string> + <string name="fm_delete_title">Usunąć?</string> + <string name="fm_delete_text">Trwale usunąć „%1$s”?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Usunąć %1$d element?</item> + <item quantity="few">Usunąć %1$d elementy?</item> + <item quantity="many">Usunąć %1$d elementów?</item> + <item quantity="other">Usunąć %1$d elementu?</item> + </plurals> + <string name="fm_cannot_undo">Tej operacji nie można cofnąć.</string> + <plurals name="fm_and_more"> + <item quantity="one">…i jeszcze %1$d</item> + <item quantity="few">…i jeszcze %1$d</item> + <item quantity="many">…i jeszcze %1$d</item> + <item quantity="other">…i jeszcze %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">Usuwanie %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">Nie udało się usunąć %1$d elementu</item> + <item quantity="few">Nie udało się usunąć %1$d elementów</item> + <item quantity="many">Nie udało się usunąć %1$d elementów</item> + <item quantity="other">Nie udało się usunąć %1$d elementu</item> + </plurals> + <string name="fm_conflict_merge_hint">„Scal” dodaje i zastępuje pliki w istniejącym folderze.</string> + <string name="fm_conflict_overwrite_hint">„Zastąp” podmienia istniejący plik.</string> + <string name="fm_conflict_apply_all">Zastosuj do wszystkich konfliktów</string> + <string name="fm_conflict_merge">Scal</string> + <string name="fm_conflict_overwrite">Zastąp</string> + <string name="fm_conflict_keep_both">Zachowaj oba</string> + <string name="fm_conflict_skip">Pomiń</string> + <string name="fm_select_this_folder">Wybierz ten folder</string> + <string name="fm_back">Wstecz</string> + <string name="fm_drive_not_readable">%1$s: zamontowano, ale obecnie nie można odczytać</string> + <string name="fm_list_view">Widok listy</string> + <string name="fm_grid_view">Widok siatki</string> + <string name="fm_search">Szukaj</string> + <string name="fm_sort">Sortuj</string> + <string name="fm_sort_name">Nazwa</string> + <string name="fm_sort_date">Data modyfikacji</string> + <string name="fm_rows_comfortable">Przestronne wiersze</string> + <string name="fm_rows_compact">Kompaktowe wiersze</string> + <string name="fm_hide_hidden">Ukryj ukryte pliki</string> + <string name="fm_show_hidden">Pokaż ukryte pliki</string> + <string name="fm_hide_favorites">Ukryj ulubione</string> + <string name="fm_show_favorites">Pokaż ulubione</string> + <string name="fm_filter_folder">Filtruj ten folder</string> + <string name="fm_free_space">Wolne: %1$s</string> + <string name="fm_selected_count">Zaznaczono: %1$d</string> + <string name="fm_select_none">Nic</string> + <string name="fm_select_all">Wszystko</string> + <string name="fm_paste">Wklej</string> + <plurals name="fm_items"> + <item quantity="one">%1$d element</item> + <item quantity="few">%1$d elementy</item> + <item quantity="many">%1$d elementów</item> + <item quantity="other">%1$d elementu</item> + </plurals> + <string name="fm_paste_here">Wklej tutaj: %1$s</string> + <string name="fm_paste_move_here">Wklej tutaj (przenieś): %1$s</string> + <string name="fm_rail_title">Pliki</string> + <string name="fm_rail_storage">PAMIĘĆ</string> + <string name="fm_rail_quick">SZYBKI DOSTĘP</string> + <string name="fm_rail_favorites">ULUBIONE</string> + <string name="fm_rail_downloads">Pobrane</string> + <string name="fm_rail_downloads_short">Pobrane</string> + <string name="fm_rail_roms">ROM-y</string> + <string name="fm_rail_session_logs">Logi sesji</string> + <string name="fm_rail_pictures">Obrazy</string> + <string name="fm_favorite_added">Dodano „%1$s” do ulubionych</string> + <string name="fm_favorite_removed">Usunięto „%1$s” z ulubionych</string> + <string name="fm_empty_directory">Pusty katalog</string> + <string name="fm_up_one_level">Poziom wyżej</string> + <string name="fm_choose_folder">Wybierz folder</string> + <string name="fm_choose_file">Wybierz plik</string> + <string name="ctrl_tint_steam_blue">Niebieski Steam</string> + <string name="ctrl_tint_sky">Błękitny</string> + <string name="ctrl_tint_white">Biały</string> + <string name="ctrl_tint_violet">Fioletowy</string> + <string name="ctrl_tint_green">Zielony</string> + <string name="ctrl_tint_amber">Bursztynowy</string> + <string name="ctrl_tint_red">Czerwony</string> + <string name="ctrl_tint_pink">Różowy</string> + <string name="ctrl_button_a">Przycisk A</string> + <string name="ctrl_button_b">Przycisk B</string> + <string name="ctrl_button_x">Przycisk X</string> + <string name="ctrl_button_y">Przycisk Y</string> + <string name="ctrl_button_lb">Lewy bumper</string> + <string name="ctrl_button_rb">Prawy bumper</string> + <string name="ctrl_button_lt">Lewy spust</string> + <string name="ctrl_button_rt">Prawy spust</string> + <string name="ctrl_button_view">Przycisk Widok</string> + <string name="ctrl_button_menu">Przycisk Menu</string> + <string name="ctrl_target_view">Widok</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">Krzyżak w górę</string> + <string name="ctrl_target_down">Krzyżak w dół</string> + <string name="ctrl_target_left">Krzyżak w lewo</string> + <string name="ctrl_target_right">Krzyżak w prawo</string> + <string name="ctrl_target_hidden">Ukryty</string> + <string name="ctrl_editor_drag">Przeciągnij, aby przenieść</string> + <string name="ctrl_editor_snap">Przyciąganie</string> + <string name="ctrl_editor_save">Zapisz</string> + <string name="second_mode_none">Brak</string> + <string name="second_mode_keyboard_trackpad">Klawiatura + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Uchwyty Deck + trackpady</string> + + <string name="rtinst_removing">Usuwanie środowiska Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Usuwanie środowiska Linux · %1$d wpis</item> + <item quantity="few">Usuwanie środowiska Linux · %1$d wpisy</item> + <item quantity="many">Usuwanie środowiska Linux · %1$d wpisów</item> + <item quantity="other">Usuwanie środowiska Linux · %1$d wpisu</item> + </plurals> + <string name="rtinst_removed">Usunięto środowisko Linux</string> + <string name="rtinst_removal_failed">Nie udało się dokończyć usuwania środowiska Linux. Ponów usuwanie w sekcji Konfiguracja.</string> + <string name="rtinst_removing_leftovers">Usuwanie pozostałości środowiska</string> + <string name="rtinst_downloading">Pobieranie</string> + <string name="rtinst_verifying">Weryfikowanie</string> + <string name="rtinst_extracting">Wypakowywanie</string> + <string name="rtinst_channel_description">Wyświetlane podczas instalowania lub usuwania środowiska Linux</string> + <string name="rtinst_title_installing">Instalowanie środowiska Linux</string> + <string name="rtinst_title_removing">Usuwanie środowiska Linux</string> + + <string name="deskpkg_runtime_missing">Środowisko Linux nie jest zainstalowane</string> + <string name="deskpkg_no_checksum">Katalog nie zawiera sumy kontrolnej dla %1$s</string> + <string name="deskpkg_checksum_mismatch">Niezgodna suma kontrolna – niczego nie zmieniono</string> + <string name="deskpkg_installing">Instalowanie %1$s</string> + <string name="deskpkg_place_failed">Nie udało się umieścić pliku AppImage</string> + <string name="deskpkg_extract_failed">Wypakowywanie nie powiodło się</string> + <string name="deskpkg_install_failed">Instalacja nie powiodła się</string> + + <string name="flatpakmgr_setup_failed">Konfiguracja Flatpak nie powiodła się (kod %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Konfiguracja Flatpak nie została ukończona</string> + <string name="flatpakmgr_busy">Trwa inne zadanie sklepu</string> + <string name="flatpakmgr_not_ready">Najpierw skonfiguruj Flatpak</string> + <string name="flatpakmgr_starting">Rozpoczynanie</string> + <string name="flatpakmgr_exit_status">Flatpak zakończył działanie z kodem %1$d</string> + <string name="flatpakmgr_installing">Instalowanie %1$s</string> + <string name="flatpakmgr_updating">Aktualizowanie %1$s</string> + <string name="flatpakmgr_removing">Usuwanie %1$s</string> + <string name="flatpakmgr_installing_step">Instalowanie %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Aktualizowanie %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Usuwanie %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">tłumaczeń</string> + <string name="flatpakmgr_ref_graphics_drivers">sterowników graficznych</string> + <string name="flatpakmgr_ref_media_codecs">kodeków multimedialnych</string> + <string name="flatpakmgr_ref_runtime">środowiska %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">środowiska %1$s %2$s</string> + + <string name="appimg_too_small">Plik jest za mały jak na AppImage</string> + <string name="appimg_unreadable">Nie można odczytać pliku: %1$s</string> + <string name="appimg_not_linux">To nie jest AppImage (to nie jest program dla systemu Linux)</string> + <string name="appimg_wrong_arch">Ten AppImage nie jest zbudowany ani dla ARM64 (aarch64), ani dla komputerów x86</string> + <string name="appimg_not_appimage">To program dla systemu Linux, ale nie AppImage</string> + <string name="appimg_wrong_type">Można importować tylko AppImage typu 2 (ten jest typu %1$d)</string> + <string name="appimg_no_space_import">Za mało wolnego miejsca: import wymaga około %1$s</string> + <string name="appimg_no_space_update">Za mało wolnego miejsca: aktualizacja wymaga około %1$s</string> + <string name="appimg_import_failed">Import nie powiódł się</string> + <string name="appimg_gone">Tego AppImage już nie ma</string> + <string name="appimg_update_failed">Aktualizacja nie powiodła się</string> + <string name="appimg_extracting">Wypakowywanie %1$s</string> + <string name="appimg_extract_failed">Nie udało się wypakować AppImage</string> + <string name="appimg_extract_failed_detail">Nie udało się wypakować AppImage: %1$s</string> + + <string name="deckymgr_stop_session_loader">Zatrzymaj aktywną sesję przed instalacją Decky Loader</string> + <string name="deckymgr_download_failed">Pobieranie Decky Loader nie powiodło się</string> + <string name="deckymgr_size_mismatch">Rozmiar Decky Loader nie zgadza się z metadanymi wydania</string> + <string name="deckymgr_checksum_download_failed">Nie udało się pobrać sumy kontrolnej wydania</string> + <string name="deckymgr_checksum_missing">Brak sumy kontrolnej wydania</string> + <string name="deckymgr_checksum_invalid">Suma kontrolna wydania jest nieprawidłowa</string> + <string name="deckymgr_checksum_mismatch">Niezgodna suma kontrolna Decky Loader</string> + <string name="deckymgr_not_elf">Plik wydania nie jest zgodnym 64-bitowym programem dla systemu Linux</string> + <string name="deckymgr_session_started_loader">Podczas pobierania uruchomiono sesję; zatrzymaj ją przed instalacją Decky Loader</string> + <string name="deckymgr_loader_not_executable">Nie udało się oznaczyć PluginLoader jako wykonywalnego</string> + <string name="deckymgr_cef_failed">Nie udało się włączyć zdalnego debugowania CEF w Steam</string> + <string name="deckymgr_stage_failed">Nie udało się przygotować PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Nie udało się zachować istniejącego PluginLoader</string> + <string name="deckymgr_loader_activate_failed">Nie udało się aktywować nowego PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Zatrzymaj aktywną sesję przed instalacją wtyczki</string> + <string name="deckymgr_loader_required">Zainstaluj Decky Loader przed importem wtyczki</string> + <string name="deckymgr_zip_unreadable">Nie udało się odczytać wybranego pliku ZIP</string> + <string name="deckymgr_plugins_dir_failed">Nie udało się utworzyć katalogu wtyczek Decky</string> + <string name="deckymgr_extracting_zip">Wypakowywanie pliku ZIP wtyczki</string> + <string name="deckymgr_zip_one_folder">ZIP wtyczki musi zawierać jeden główny folder wtyczki</string> + <string name="deckymgr_zip_missing_files">W pliku ZIP wtyczki brakuje plugin.json, package.json lub dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Brak nazwy wtyczki</string> + <string name="deckymgr_session_started_plugin">Podczas instalacji uruchomiono sesję; zatrzymaj ją przed instalacją wtyczki</string> + <string name="deckymgr_plugin_installed">Zainstalowano wtyczkę · uruchom ponownie Steam, aby ją wczytać</string> + <string name="deckymgr_plugin_install_failed">Instalacja wtyczki z pliku ZIP nie powiodła się</string> + <string name="deckymgr_zip_too_many">ZIP wtyczki zawiera zbyt wiele wpisów</string> + <string name="deckymgr_zip_invalid_path">ZIP wtyczki zawiera nieprawidłową ścieżkę</string> + <string name="deckymgr_zip_duplicate_paths">ZIP wtyczki zawiera powielone ścieżki</string> + <string name="deckymgr_zip_unsafe_path">ZIP wtyczki zawiera niebezpieczną ścieżkę</string> + <string name="deckymgr_folder_failed">Nie udało się utworzyć folderu wtyczki</string> + <string name="deckymgr_zip_too_large">Po rozpakowaniu ZIP wtyczki przekracza limit 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Nie udało się oznaczyć dołączonego pliku binarnego wtyczki jako wykonywalnego</string> + <string name="deckymgr_remote_entry_invalid">Nieprawidłowy wpis remote_binary</string> + <string name="deckymgr_remote_name_invalid">Nieprawidłowa nazwa zdalnego pliku binarnego</string> + <string name="deckymgr_remote_url_https">URL zdalnego pliku binarnego musi używać HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Zdalny plik binarny %1$s ma nieprawidłowy skrót SHA-256</string> + <string name="deckymgr_bin_dir_failed">Nie udało się utworzyć katalogu bin wtyczki</string> + <string name="deckymgr_downloading_binary">Pobieranie pliku binarnego wtyczki · %1$s</string> + <string name="deckymgr_binary_download_failed">Nie udało się pobrać pliku binarnego wtyczki %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Niezgodna suma kontrolna pliku binarnego wtyczki · %1$s</string> + <string name="deckymgr_binary_not_executable">Nie udało się oznaczyć pliku binarnego wtyczki jako wykonywalnego · %1$s</string> + <string name="deckymgr_binary_replace_failed">Nie udało się zastąpić pliku binarnego wtyczki · %1$s</string> + <string name="deckymgr_binary_install_failed">Nie udało się zainstalować pliku binarnego wtyczki · %1$s</string> + <string name="deckymgr_folder_taken">Folder wtyczki należy do innej wtyczki</string> + <string name="deckymgr_preserve_failed">Nie udało się zachować istniejącej wtyczki</string> + <string name="deckymgr_activate_failed">Nie udało się aktywować zaimportowanej wtyczki</string> + <string name="deckymgr_settings_failed">Nie udało się zaktualizować ustawień wtyczek Decky</string> + <string name="deckymgr_restore_failed">Nie udało się przywrócić istniejącej wtyczki</string> + + <string name="adbfix_save_failed">Nie udało się zapisać tożsamości debugowania bezprzewodowego</string> + <string name="adbfix_command_failed">Polecenie ADB nie powiodło się (%1$d)</string> + <string name="adbfix_not_confirmed">Android nie potwierdził zmiany limitu procesów podrzędnych: %1$s</string> + <string name="adbfix_no_pairing">Brak zapisanego parowania debugowania bezprzewodowego</string> + <string name="adbfix_enter_address">Wpisz bieżący adres IP i port z ekranu Debugowanie bezprzewodowe</string> + + <string name="adbpair_timed_out">Upłynął limit czasu oczekiwania na okienko parowania. Spróbuj ponownie z poziomu DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Nie udało się wyszukać okienka parowania (%1$d). Sprawdź, czy Wi-Fi jest włączone.</string> + <string name="adbpair_discovery_failed">Nie udało się wyszukać okienka parowania: %1$s</string> + <string name="adbpair_six_digits">Wpisz wszystkie 6 cyfr kodu</string> + <string name="adbpair_pairing">Parowanie…</string> + <string name="adbpair_code_rejected">Ten kod nie zadziałał. Otwórz ponownie okienko parowania i wpisz nowy kod.</string> + <string name="adbpair_connecting">Sparowano. Łączenie…</string> + <string name="adbpair_port_not_found">Sparowano, ale nie znaleziono portu debugowania bezprzewodowego. Nie wyłączaj debugowania bezprzewodowego i spróbuj ponownie.</string> + <string name="adbpair_applying">Stosowanie ustawienia…</string> + <string name="adbpair_command_failed">Polecenie debugowania bezprzewodowego nie powiodło się</string> + <string name="adbpair_channel_name">Konfiguracja debugowania bezprzewodowego</string> + <string name="adbpair_channel_description">Prosi o kod parowania debugowania bezprzewodowego, gdy Ustawienia są otwarte</string> + <string name="adbpair_title_pair">Sparuj debugowanie bezprzewodowe</string> + <string name="adbpair_waiting_text">Włącz Debugowanie bezprzewodowe, a potem dotknij „Sparuj urządzenie za pomocą kodu parowania”.</string> + <string name="adbpair_waiting_long">Włącz Debugowanie bezprzewodowe, a potem dotknij „Sparuj urządzenie za pomocą kodu parowania”. Pozostań w Ustawieniach: kod wpiszesz w tym powiadomieniu.</string> + <string name="adbpair_code_label">6-cyfrowy kod parowania</string> + <string name="adbpair_code_hint">Dotknij „Wpisz kod” i podaj 6 cyfr widocznych w Ustawieniach.</string> + <string name="adbpair_title_code">Wpisz kod parowania Wi-Fi</string> + <string name="adbpair_title_retry">Spróbuj wpisać kod ponownie</string> + <string name="adbpair_enter_code">Wpisz kod</string> + <string name="adbpair_title_working">Konfigurowanie Steam</string> + <string name="adbpair_title_done">Steam jest gotowy</string> + <string name="adbpair_done_text">Dotknij, aby wrócić do DroidDeck. Możesz już wyłączyć debugowanie bezprzewodowe.</string> + <string name="adbpair_title_failed">Konfiguracja debugowania bezprzewodowego została przerwana</string> + + <string name="selfinst_download_failed">Pobieranie nie powiodło się</string> + <string name="selfinst_size_mismatch">Rozmiar pobranego pliku nie zgadzał się z opublikowanym APK, więc go odrzucono – spróbuj ponownie</string> + <string name="selfinst_checksum_mismatch">Pobrany plik nie zgadzał się z sumą kontrolną, więc go odrzucono – spróbuj ponownie</string> + <string name="selfinst_wrong_package">Aktualizacja jest dla pakietu Android %1$s, a nie %2$s</string> + <string name="selfinst_metadata_signer">Metadane aktualizacji nie wskazują klucza podpisywania wydań DroidDeck</string> + <string name="selfinst_unreadable">Android nie mógł odczytać pobranego APK</string> + <string name="selfinst_apk_wrong_package">Pobrany APK jest dla %1$s, a nie %2$s</string> + <string name="selfinst_version_mismatch">Pobrany APK ma versionCode %1$d, a nie opublikowany %2$d</string> + <string name="selfinst_downgrade">Android nie zainstaluje versionCode %1$d na zainstalowanym %2$d</string> + <string name="selfinst_no_signing">Pobrany APK nie zawiera informacji o podpisie</string> + <string name="selfinst_wrong_signer">Pobrany APK nie jest podpisany kluczem wydań DroidDeck</string> + <string name="appupd_http">Katalog aktualizacji odpowiedział HTTP %1$d</string> + + <string name="loadstate_starting">Uruchamianie sesji…</string> + <string name="loadstate_elapsed">Minęło %1$d:%2$02d · nadal trwa</string> + <string name="loadstate_steam_update">Pobieranie aktualizacji klienta Steam · %1$d%%</string> + <string name="loadstate_steam_client">Pobieranie klienta Steam · %1$s</string> + + <string name="pextra_busy">Instalacja narzędzia zgodności już trwa</string> + <string name="pextra_stop_session">Zatrzymaj aktywną sesję przed instalacją narzędzi zgodności</string> + <string name="pextra_no_release">Nie znaleziono wydania ARM64 dla %1$s</string> + <string name="pextra_no_space">Do instalacji %1$s potrzeba co najmniej 4 GB wolnego miejsca plus rozmiar pobierania</string> + <string name="pextra_downloading">Pobieranie %1$s %2$s</string> + <string name="pextra_retrying">Ponawianie pobierania · próba %1$d z %2$d</string> + <string name="pextra_interrupted">Pobieranie przerwane</string> + <string name="pextra_download_failed">Pobieranie nie powiodło się; częściowy plik zachowano, aby można było je wznowić</string> + <string name="pextra_too_big">Pobierany plik przekroczył rozmiar wydania i został usunięty</string> + <string name="pextra_incomplete">Pobieranie było niepełne; częściowy plik zachowano, aby można było je wznowić</string> + <string name="pextra_verifying">Weryfikowanie pobranego pliku</string> + <string name="pextra_checksum_unreadable">Nie udało się odczytać sumy kontrolnej wydania; spróbuj ponownie</string> + <string name="pextra_no_checksum">%1$s %2$s nie publikuje sumy kontrolnej; niczego nie zainstalowano</string> + <string name="pextra_checksum_mismatch">Niezgodna suma kontrolna; pobrany plik usunięto</string> + <string name="pextra_session_started">Podczas pobierania uruchomiono sesję; zatrzymaj ją przed instalacją narzędzi zgodności</string> + <string name="pextra_installing">Instalowanie %1$s</string> + <string name="pextra_install_failed">Instalacja %1$s nie powiodła się (kod %2$d)</string> + <string name="pextra_could_not_install">Nie udało się zainstalować %1$s</string> + <string name="esync_fetching">Pobieranie pakietu droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">z modułami pomocniczymi Linux</string> + <string name="cmgr_fex_dlls_only">tylko biblioteki DLL</string> + <string name="cmgr_original_proton_updated">Oryginał (Proton zaktualizowany od ostatniej zamiany)</string> + <string name="cmgr_changed_outside">Zmieniono poza sekcją Komponenty</string> + <string name="cmgr_not_present">brak</string> + <string name="cmgr_original_version">Oryginał %1$s</string> + <string name="cmgr_original_from">Oryginał z %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s trafi do %3$s, gdy zostanie zamknięta działająca na nim gra.</string> + <string name="cmgr_swap_done">%1$s %2$s jest teraz w %3$s. Zadziała przy następnym uruchomieniu gry.</string> + <string name="cmgr_original_missing">Ten oryginalny pakiet nie jest przechowywany</string> + <string name="cmgr_restore_queued">%1$s w %2$s wróci do oryginału, gdy zostanie zamknięta działająca na nim gra.</string> + <string name="cmgr_restore_done">%1$s w %2$s przywrócono z oryginału %3$s.</string> + <string name="cmgr_package_in_use">Pakiet %1$s jest używany w %2$s. Najpierw przełącz ten Proton na coś innego.</string> + <string name="cmgr_package_not_stored">Pakiet %1$s nie jest przechowywany</string> + <string name="cmgr_deleted">Usunięto %1$s.</string> + <string name="cmgr_original_kept">Oryginał zainstalowanej wersji zostaje zachowany: to droga powrotu.</string> + <string name="cmgr_not_stored">Nie przechowywano</string> + <string name="cmgr_deleted_original">Usunięto oryginał %2$s z %1$s.</string> + <string name="cmgr_nightlies_only">Pobieranie odbywa się tylko z wydań Nightlies</string> + <string name="cmgr_list_predates_checksums">Ta lista pakietów jest starsza niż sumy kontrolne – odśwież ją i spróbuj ponownie</string> + <string name="cmgr_checksum_mismatch">Niezgodna suma kontrolna</string> + + <string name="sprefs_upscaler_linear">Liniowy</string> + <string name="sprefs_upscaler_nearest">Najbliższy sąsiad</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (jakość)</string> + <string name="sprefs_upscaler_sharpen">Tylko wyostrzanie</string> + <string name="sprefs_lod_bias_auto">Auto (zgodnie ze skalowaniem)</string> + + <string name="look_off_desc">Bez efektów.</string> + <string name="look_game_clarity">Wyrazistość</string> + <string name="look_game_clarity_desc">Wyostrzenie z odrobiną kontrastu – na co dzień.</string> + <string name="look_vivid">Żywe kolory</string> + <string name="look_vivid_desc">Mocno podbite kolory. Debanding włączony, by niebo nie miało pasów.</string> + <string name="look_cinematic">Kinowy</string> + <string name="look_cinematic_desc">Głębszy kontrast, chłodniejsze kolory, wygładzone krawędzie.</string> + <string name="look_competitive">Rywalizacja</string> + <string name="look_competitive_desc">Rozjaśnione cienie i mocne wyostrzenie – zauważ przeciwnika pierwszy.</string> + <string name="look_adaptive_sharpen">Adaptacyjne wyostrzanie</string> + <string name="look_adaptive_sharpen_desc">Tylko wyostrzanie, kolory bez zmian.</string> + <string name="look_filmic">Filmowy</string> + <string name="look_filmic_desc">Krzywa jak z taśmy filmowej, lekko stonowana.</string> + <string name="look_arcade">Salon gier</string> + <string name="look_arcade_desc">Głośno i z pazurem.</string> + <string name="look_retro_crt">Retro CRT</string> + <string name="look_retro_crt_desc">Kineskop CRT i analogowy sygnał razem.</string> + <string name="look_upscale_sharp">Ostre skalowanie</string> + <string name="look_upscale_sharp_desc">Do grania poniżej rozdzielczości ekranu.</string> + <string name="look_pixel_clean">Czyste piksele</string> + <string name="look_pixel_clean_desc">Ostre piksele dla gier 2D i starych tytułów.</string> + <string name="look_anime_edge">Krawędzie anime</string> + <string name="look_anime_edge_desc">Kreskówkowe kontury i wyostrzenie.</string> + + <string name="gpuinfo_not_adreno">To nie jest GPU Adreno</string> + <string name="gpuinfo_supported">Obsługiwany</string> + <string name="gpuinfo_experimental">Eksperymentalny: jego sterowniki to wersje testowe</string> + <string name="gpuinfo_below_tested">Poniżej testowanego sprzętu (Adreno 725 i nowsze): może nie działać</string> + <string name="gpuinfo_unsupported">Nieobsługiwany: DroidDeck wymaga GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Osiągnięto limit zapytań GitHub – spróbuj ponownie później</string> + <string name="turnip_github_http">GitHub odpowiedział HTTP %1$d</string> + <string name="turnip_download_failed">Pobieranie nie powiodło się</string> + <string name="turnip_list_predates_checksums">Ta lista sterowników jest starsza niż sumy kontrolne – odśwież ją i spróbuj ponownie</string> + <string name="turnip_checksum_mismatch">Niezgodna suma kontrolna – pobrany plik odrzucono</string> + <string name="turnip_not_adrenotools">To nie jest sterownik AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">brak meta.json</string> + <string name="turnip_reject_meta_unreadable">nie można odczytać meta.json (%1$s)</string> + <string name="turnip_reject_linux_driver">to sterownik środowiska Linux (zaimportuj go w sekcji „Sterownik środowiska Linux”)</string> + <string name="turnip_reject_wayland">to sterownik gier Wayland, który nie jest przydatny w tej aplikacji</string> + <string name="turnip_reject_no_library_name">meta.json nie podaje libraryName, więc nie można niczego przekazać do AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json wskazuje %1$s, którego nie ma w pliku zip</string> + <string name="turnip_reject_not_aarch64">%1$s nie jest 64-bitową biblioteką współdzieloną ELF AArch64</string> + <string name="turnip_reject_glibc">%1$s linkuje glibc – to Turnip „-Linux”, który należy do sekcji „Sterownik środowiska Linux”</string> + <string name="lvd_no_library">Brak libvulkan_freedreno*.so w tym pliku zip. Zip z Turnip dla Android (AdrenoTools) lub -Wayland nie jest sterownikiem środowiska Linux.</string> + <string name="lvd_not_aarch64">%1$s nie jest 64-bitową biblioteką współdzieloną ELF AArch64.</string> + <string name="lvd_not_glibc">%1$s nie jest sterownikiem glibc – linkuje libc systemu Android. Środowisko Linux wymaga pliku zip „-Linux”; zwykłego Turnip ani wersji „-Wayland” klient Steam w ogóle nie wczyta.</string> + <string name="bundle_no_manifest">To nie jest pakiet sterowników: brak manifest.json wskazującego sterownik Android i Linux</string> + <string name="bundle_entry_outside">To nie jest pakiet sterowników: %1$s wskazuje poza niego</string> + <string name="bundle_too_large">To nie jest pakiet sterowników: po rozpakowaniu przekracza %1$d MB</string> + + <string name="gstore_sd_card">Karta SD</string> + <string name="gstore_folder">Folder</string> + + <string name="logshare_chooser">Udostępnij logi sesji</string> + + <string name="hdr_needs_android_10">wymaga systemu Android 10 lub nowszego (warstwy wyświetlania z przestrzenią barw)</string> + <string name="hdr_none">ten wyświetlacz nie zgłasza obsługi HDR</string> + <string name="hdr_not_hdr10">ten wyświetlacz obsługuje %1$s, ale nie HDR10</string> + + <string name="gpu_this_gpu">ten GPU</string> + <string name="phantom_title_on">Limit procesów podrzędnych jest włączony</string> + <string name="phantom_title_unset">Limit procesów podrzędnych nie jest ustawiony</string> + <string name="phantom_title_unreadable">Nie udało się sprawdzić limitu procesów podrzędnych</string> + <string name="phantom_title_off">Limit procesów podrzędnych jest wyłączony</string> + <string name="phantom_title_not_required">Limit procesów podrzędnych: nie dotyczy</string> + <string name="phantom_instructions_fix">%1$s Jeśli to niemożliwe, podłącz to urządzenie do komputera z ADB i uruchom poniższe polecenie. Wróć tutaj i sprawdź ponownie.</string> + <string name="phantom_instructions_off">Sesje Steam mogą się uruchamiać.</string> + <string name="phantom_instructions_not_applicable">Ta wersja systemu Android nie używa tego limitu.</string> + <string name="phantom_fix_toggle">Włącz „Wyłącz ograniczenia procesów podrzędnych aplikacji” w Opcjach programisty i nie wyłączaj potem Opcji programisty.</string> + <string name="phantom_fix_no_toggle">Ta wersja systemu Android nie ma dla niego przełącznika. Użyj debugowania bezprzewodowego, aby zmienić go z tego urządzenia.</string> + <string name="upd_block_no_apk">Ta wersja nie ma pliku do pobrania dla tej kopii DroidDeck.</string> + <string name="upd_block_version_code">Android nie zainstaluje jej na tej wersji, bo jej versionCode %1$d jest niższy niż zainstalowany %2$d.</string> + <string name="upd_fail_downgrade">Android nie zainstaluje starszej wersji na nowszej. Zostań przy tej wersji, aż kanał ją dogoni.</string> + <string name="upd_fail_signature">Ta kopia DroidDeck ma inny podpis (lokalna kompilacja?), więc Android nie zaktualizuje jej w miejscu.</string> + <string name="upd_fail_storage">Za mało wolnego miejsca na aktualizację.</string> + <string name="upd_fail_aborted">Aktualizacja została anulowana.</string> + <string name="upd_fail_with_message">Aktualizacja nie została zainstalowana: %1$s</string> + <string name="upd_fail_generic">Aktualizacja nie została zainstalowana.</string> + <string name="saves_layout_zip">archiwum zip %1$s</string> + <string name="saves_zip">archiwum zip</string> + <string name="saves_not_launched">Gra %1$s nie była jeszcze uruchamiana</string> + <string name="saves_none_found">Nie znaleziono plików zapisu dla %1$s</string> + <string name="saves_not_save_zip">Plik %1$s nie zawiera folderu drive_c, więc nie jest archiwum zapisów GameHub ani Winlator</string> + <string name="gstore_cannot_create">nie można tworzyć folderów w %1$s</string> + <string name="gstore_cannot_write">nie można zapisywać w %1$s</string> + <string name="gstore_cannot_write_detail">nie można zapisywać w %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Folder jest niedostępny</string> + <string name="gfiles_name_taken">Inny plik już używa nazwy %1$s</string> + <string name="gfiles_art_unavailable">Folder grafik jest niedostępny</string> + <string name="gfiles_unrelated_inventory">Folder zawiera niepowiązany spis synchronizacji</string> + <string name="gfiles_remove_failed">Nie udało się usunąć %1$s</string> + <string name="gfiles_outside_folder">Plik wychodzi poza folder eksportu</string> + <string name="cmgr_fex_unnamed">FEX (wersja bez nazwy)</string> + <string name="cmgr_no_profile">brak profile.json w %1$s</string> + <string name="cmgr_not_component_package">%1$s nie jest pakietem komponentu Linux (typ %2$s)</string> + <string name="gstore_volume_free">%1$s · wolne: %2$s</string> + <string name="mode_storage_auto_short">Automatycznie</string> + <string name="appupd_catalog_rejected">Katalog aktualizacji nie przeszedł weryfikacji (%1$s)</string> + <string name="main_adb_clip_label">Ustawienie procesów podrzędnych DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Zalogowano · tryb offline</string> + <string name="setup_signed_in_unnamed">Zalogowano</string> + <string name="driver_tag_bundled">DOŁĄCZONY</string> + <string name="driver_tag_downloaded">POBRANY</string> + <string name="driver_tag_imported">ZAIMPORTOWANY</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Ekran sesji</string> + <string name="display_resolution">Rozdzielczość</string> + <string name="display_game_fit">Dopasowanie gier 16:9</string> + <string name="display_game_fit_hint">Jak gry 16:9 mieszczą się na tym ekranie. Od następnej sesji.</string> + <string name="display_game_fit_unavailable">Wybierz „Dopasuj do ekranu” lub własny rozmiar węższy niż 16:9.</string> + <string name="display_preserve">Zachowaj proporcje</string> + <string name="display_stretch">Rozciągnij do ekranu</string> + <string name="display_image_scaling">Skalowanie obrazu</string> + <string name="display_filter">Filtr skalowania</string> + <string name="display_filter_hint">Wspólny dla Steam i Pulpitu.</string> + <string name="display_filter_live">Działa od razu. Wspólny dla Steam i Pulpitu.</string> + <string name="display_filter_note">FSR, GSR i NIS działają przy powiększaniu obrazu sesji. „Tylko wyostrzanie” działa też bez powiększania.</string> + <string name="display_sharpness">Ostrość filtra</string> + <string name="display_frame_rate">Liczba klatek</string> + <string name="display_look_filter">%1$s Ustawia skalowanie na %2$s.</string> + <string name="display_match_screen">Dopasuj do ekranu (%1$d×%2$d)</string> + <string name="display_follow_screen">Dopasuj do ekranu (zmienia rozmiar po złożeniu lub rozłożeniu)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Pokaż szczegóły urządzenia</string> + <string name="device_info_hide">Skryj szczegóły urządzenia</string> + <string name="device_info_loading">Odczytywanie urządzenia…</string> + <string name="device_info_copy">Kopiuj</string> + <string name="device_info_copy_hint">Skopiuj te szczegóły do zgłoszenia błędu.</string> + <string name="device_info_copied">Skopiowano.</string> + <string name="force_ssbs_title">Wymuś SSBS</string> + <string name="force_ssbs_hint">Utrzymuje ustawienie szybkości CPU, które Wine wciąż wyłącza. Może przyspieszyć gry Windows na Snapdragon 8 Elite; na starszych chipsetach niewielka różnica. Działa od następnego uruchomienia gry.</string> + + <string name="rail_stores">Sklepy</string> + <string name="source_steam">Steam</string> + <string name="source_added">Własna</string> + <string name="setup_stores">Sklepy</string> + <string name="setup_stores_open_on">Otwórz sklep w</string> + <string name="setup_stores_speed">Poziom szybkości pobierania</string> + <string name="setup_stores_engine">Mechanizm sklepów</string> + <string name="setup_stores_engine_chip_ready">● Mechanizm gotowy</string> + <string name="setup_stores_engine_chip_missing">Nie zbudowano</string> + <string name="stores_tier_balanced">Zbalansowany</string> + <string name="stores_tier_fast">Szybki</string> + <string name="stores_tier_max">Maksymalny</string> + <string name="stores_title">Sklepy</string> + <string name="stores_settings">Ustawienia sklepów</string> + <string name="stores_settings_eyebrow">Ustawienia</string> + <string name="stores_chip_signed_out">(niezalogowano)</string> + <string name="stores_tab_store">Sklep</string> + <string name="stores_tab_installed">Zainstalowane</string> + <string name="stores_tab_library">Biblioteka</string> + <string name="stores_tab_all">Wszystkie</string> + <string name="stores_tab_downloads">Pobierania</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Zaloguj się</string> + <string name="stores_signout_named">%1$s · wyloguj się</string> + <string name="stores_signout_title">Wylogować się z %1$s?</string> + <string name="stores_signout_note">Zainstalowane gry zostają. Biblioteka zostanie pobrana ponownie po zalogowaniu.</string> + <string name="stores_signout_stay">Zostań zalogowany</string> + <string name="stores_signout_go">Wyloguj się</string> + <string name="stores_search_catalog">Szukaj w katalogu %1$s…</string> + <string name="stores_search_installed">Szukaj zainstalowanych gier…</string> + <string name="stores_search_library">Szukaj w Twojej bibliotece…</string> + <string name="stores_search_open">Szukaj</string> + <string name="stores_installed_empty">Nic nie zainstalowano</string> + <string name="stores_library_loading">Wczytywanie</string> + <string name="stores_nothing_matches">Brak gier</string> + <string name="stores_shelves_loading">Wczytywanie sklepu…</string> + <string name="stores_amazon_no_catalog">Brak katalogu</string> + <string name="stores_shelf_new">Nowości</string> + <string name="stores_shelf_deals">Promocje</string> + <string name="stores_shelf_free">Darmowe gry</string> + <string name="stores_shelf_trending">Popularne</string> + <string name="stores_shelf_library">Twoja biblioteka</string> + <string name="stores_play">Graj</string> + <string name="stores_install">Zainstaluj</string> + <string name="stores_resume_install">Wznów instalację</string> + <string name="stores_dl_interrupted">Przerwano</string> + <string name="stores_install_size">Instalacja · %1$s</string> + <string name="stores_get_free">Odbierz bezpłatnie</string> + <string name="stores_view_on">Zobacz w %1$s</string> + <string name="stores_buy_price">Kup · %1$s</string> + <string name="stores_installed_chip">Zainstalowano</string> + <string name="stores_in_library">W bibliotece</string> + <string name="stores_free">Bezpłatna</string> + <string name="stores_resume">Wznów</string> + <string name="stores_refresh">Odśwież</string> + <string name="stores_sort">Sortuj</string> + <string name="stores_sort_last_played">Ostatnio grane</string> + <string name="stores_sort_recently_installed">Ostatnio zainstalowane</string> + <string name="stores_sort_title_asc">Tytuł A–Z</string> + <string name="stores_sort_title_desc">Tytuł Z–A</string> + <string name="stores_sort_size_desc">Rozmiar: największy</string> + <string name="stores_sort_size_asc">Rozmiar: najmniejszy</string> + <string name="stores_sort_release_date">Data wydania</string> + <string name="stores_view_list">Widok listy</string> + <string name="stores_view_cards">Widok kart</string> + <string name="stores_show_mature">Pokaż treści dla dorosłych</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Wyłączone</string> + <string name="epic_eos">Logowanie Epic (EOS)</string> + <string name="epic_offline">Uruchom offline</string> + <string name="epic_resolve">Rozwiąż logowanie Epic</string> + <string name="epic_client_version">Wersja %1$s</string> + <string name="epic_client_no_runtime">Najpierw zainstaluj środowisko Linux</string> + <string name="epic_client_checking">Sprawdzanie najnowszej wersji…</string> + <string name="epic_client_unpacking">Rozpakowywanie…</string> + <string name="epic_client_unreachable">Serwer pobierania nie odpowiedział</string> + <string name="epic_client_needs_fex">Epic Games Launcher wymaga FEX, który pobiera Steam. Otwórz launcher ponownie po uruchomieniu Steam.</string> + <string name="epic_client_download_failed">Pobieranie nie powiodło się: %1$s</string> + <string name="epic_client_unpack_failed">Nie udało się rozpakować launchera: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher nie przyjął logowania. Uruchom go ponownie z launchera.</string> + <string name="epic_client_uninstall_body">Usuwa launcher i zwalnia jego miejsce. Twoje gry z Epic pozostają zainstalowane i działają, a logowanie zostaje zachowane na potrzeby ponownej instalacji.</string> + <string name="epic_client_uninstall_stops">Najpierw zostanie zamknięta bieżąca sesja.</string> + <string name="epic_client_uninstalled">Odinstalowano Epic Games Launcher</string> + <string name="epic_client_uninstall_failed">Nie udało się usunąć niektórych plików launchera. Spróbuj ponownie.</string> + <string name="epic_client_uninstalling">Poczekaj, aż Epic Games Launcher zostanie odinstalowany</string> + <string name="store_cloud_saves">Zapisy w chmurze</string> + <string name="cloud_upload">Wyślij do chmury</string> + <string name="cloud_download">Pobierz z chmury</string> + <string name="cloud_none">Brak zapisów w chmurze</string> + <string name="cloud_conflict">Konflikt w chmurze</string> + <string name="cloud_conflict_files">Konflikt w chmurze · %1$d plików</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Zachowaj z chmury</string> + <string name="cloud_keep_local">Zachowaj lokalne</string> + <string name="cloud_checking">Sprawdzanie chmury…</string> + <string name="cloud_last_sync">Ostatnia synchronizacja %1$s</string> + <string name="cloud_never">Jeszcze nie zsynchronizowano</string> + <string name="cloud_done">%1$d plików</string> + <string name="stores_eyebrow_installed">zainstalowana</string> + <string name="stores_eyebrow_library">w Twojej bibliotece</string> + <string name="stores_eyebrow_store">sklep</string> + <string name="achievements_title">Osiągnięcia</string> + <string name="achievements_count">%1$d z %2$d odblokowanych</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Odblokowane · %1$d</string> + <string name="achievements_group_locked">Zablokowane · %1$d</string> + <string name="achievements_group_hidden">Ukryte · %1$d</string> + <string name="achievements_hidden">Ukryte osiągnięcie</string> + <string name="achievements_hidden_detail">Szczegóły są widoczne po odblokowaniu.</string> + <string name="achievements_all">Wszystkie osiągnięcia odblokowane</string> + <string name="achievements_reading">Wczytywanie…</string> + <string name="achievements_signed_out">Zaloguj się do %1$s, aby zobaczyć swoje osiągnięcia.</string> + <string name="achievements_unreachable">Nie udało się połączyć z %1$s. Sprawdź ponownie, gdy będziesz online.</string> + <string name="achievements_none">%1$s nie wyświetla osiągnięć dla tej gry.</string> + <string name="achievements_show_all">Pokaż wszystkie (%1$d)</string> + <string name="achievements_dialog_title">Osiągnięcia · %1$s</string> + <string name="stores_in_steam">✓ W Steam</string> + <string name="stores_uninstall">Odinstaluj</string> + <string name="stores_uninstalling">Odinstalowywanie…</string> + <string name="stores_uninstall_title">Odinstalować %1$s?</string> + <string name="stores_uninstall_body_size">Zwolni %1$s i usunie ją ze Steam.</string> + <string name="stores_uninstall_body">Usuwa jej pliki i skrót w Steam.</string> + <string name="stores_launch_not_registered">Steam wykryje grę przy następnym uruchomieniu; uruchom ją stamtąd albo uruchom teraz Steam.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Wybór Steam dla każdej gry</string> + <string name="stores_card_audio">Dźwięk</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Komponenty</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Mechanizm</string> + <string name="stores_card_engine_value">%1$s · natywny</string> + <string name="stores_card_engine_java">%1$s · wbudowany</string> + <string name="stores_how_it_runs">Jak to działa</string> + <string name="stores_kv_fetched">Pobrano z</string> + <string name="stores_kv_fetched_value">%1$s, z Twoim kontem</string> + <string name="stores_kv_installed_to">Zainstalowano w</string> + <string name="stores_kv_installed_to_value">Miejsce na gry (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Uruchamiane przez</string> + <string name="stores_kv_launched_by_value">Steam i Proton, tą samą ścieżką co gry Steam</string> + <string name="stores_kv_launched_by_epic">Steam i Proton · logowanie Epic przy każdym uruchomieniu, nakładka EOS wyłączona</string> + <string name="stores_kv_launched_by_amazon">Steam i Proton · ustawione zmienne Amazon Games Services</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">dodawana do Steam przy instalacji (interfejs Deck + Steam Input)</string> + <string name="stores_downloads_empty">Brak pobierań</string> + <string name="stores_dl_paused">Wstrzymano</string> + <string name="stores_dl_queued">W kolejce</string> + <string name="stores_dl_queued_at">W kolejce · #%1$d</string> + <string name="stores_dl_cancelled">Anulowano</string> + <string name="stores_dl_failed">Niepowodzenie</string> + <string name="stores_dl_failed_reason">Niepowodzenie · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Wstrzymaj</string> + <string name="stores_dl_resume">Wznów</string> + <string name="stores_dl_cancel">Anuluj</string> + <string name="stores_dl_retry">Spróbuj ponownie</string> + <string name="stores_dl_clear">Wyczyść</string> + <string name="stores_dl_clear_all">Wyczyść zakończone</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Pobieranie</string> + <string name="stores_stage_verify">Weryfikacja</string> + <string name="stores_stage_install">Instalacja</string> + <string name="stores_stage_done">Gotowe</string> + <string name="stores_stage_checking">Sprawdzanie</string> + <string name="stores_stage_downloading">Pobieranie</string> + <string name="stores_dl_cancel_confirm">Usunąć pobieranie?</string> + <string name="stores_dl_failed_kept">Niepowodzenie · %1$s zachowano</string> + <string name="stores_stage_verifying">Weryfikowanie</string> + <string name="stores_stage_installing">Instalowanie</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d plików</string> + <string name="stores_download_manager">Menedżer pobierania</string> + <string name="stores_parallel">Pobierania naraz</string> + <string name="stores_install_where">Instaluj w</string> + <string name="stores_install_title">Zainstaluj %1$s:</string> + <string name="stores_target_internal">Wewnętrzna</string> + <string name="stores_target_free">%1$s wolnego miejsca</string> + <string name="stores_target_free_unknown">Wolne miejsce nieznane</string> + <string name="stores_storage_insufficient">Za mało wolnego miejsca: potrzeba %1$s, wolne jest tylko %2$s</string> + <string name="stores_storage_low">Za mało miejsca (wolne %1$s, potrzeba %2$s)</string> + <string name="stores_notification_channel">Pobierania ze sklepów</string> + <string name="stores_notification_channel_hint">Pokazuje postęp pobierania gier i utrzymuje pobierania w tle</string> + <string name="stores_notification_one">Pobieranie</string> + <string name="stores_notification_many">%1$d pobierań</string> + <string name="stores_notification_waiting">Przygotowywanie…</string> + <string name="stores_notification_done_channel">Zakończone pobierania ze sklepów</string> + <string name="stores_notification_installed">Zainstalowano %1$s</string> + <string name="stores_notification_failed">Pobieranie %1$s nie powiodło się</string> + <string name="stores_notification_delete">Usuń</string> + <string name="stores_notification_keep">Zachowaj</string> + <string name="stores_login_title">Zaloguj się do %1$s</string> + <string name="stores_login_provider_title">Zaloguj się przez swojego dostawcę</string> + <string name="stores_login_reload">Odśwież</string> + <string name="stores_login_close">Zamknij</string> + <string name="stores_login_retry">Spróbuj ponownie</string> + <string name="stores_login_finishing">Kończenie logowania…</string> + <string name="stores_login_error_network">Nie udało się wczytać strony logowania: %1$s</string> + <string name="stores_login_error_idp_blocked">Ten dostawca odmawia logowania z osadzonej strony. Zaloguj się za pomocą hasła do sklepu.</string> + <string name="stores_login_error_http">Strona logowania odpowiedziała błędem (HTTP %1$d).</string> + <string name="stores_login_error_ssl">Połączenie ze stroną logowania nie jest bezpieczne.</string> + <string name="stores_login_error_verification">Nie udało się zweryfikować logowania. Spróbuj ponownie.</string> + <string name="stores_login_error_generic">Logowanie nie powiodło się. Spróbuj ponownie.</string> + <string name="common_close">Zamknij</string> + <string name="common_back">Wstecz</string> + <string name="common_edit">Edytuj</string> + <string name="games_add_all">Dodaj wszystkie gry z tego folderu</string> + <string name="games_added_none">Brak nowych gier w tym folderze</string> + <string name="edit_name">Nazwa</string> + <string name="edit_target">Element docelowy</string> + <string name="edit_start_in">Uruchom w</string> + <string name="edit_launch_options">Opcje uruchamiania</string> + <string name="edit_artwork">Grafika</string> + <string name="edit_other_exe">Inny plik exe…</string> + <string name="edit_remove">Usuń</string> + <string name="art_cover">Okładka</string> + <string name="art_wide_cover">Szeroka okładka</string> + <string name="art_adjust_logo">Dostosuj logo</string> + <string name="logo_pos_default">Domyślnie</string> + <string name="logo_pos_upper_left">Lewy górny</string> + <string name="logo_pos_upper_center">Góra na środku</string> + <string name="logo_pos_center">Środek</string> + <string name="logo_pos_bottom_left">Lewy dolny</string> + <string name="logo_pos_bottom_center">Dół na środku</string> + <string name="logo_pos_position">Pozycja</string> + <string name="logo_pos_size">Rozmiar</string> + <string name="logo_pos_save">Zapisz</string> + <string name="logo_pos_reset">Przywróć domyślne</string> + <string name="logo_pos_hint">Logo jest rysowane na tle gry, tak jak robi to Steam. Dokładna pozycja może się różnić o kilka pikseli.</string> + <string name="logo_pos_no_logo">Ta gra nie ma jeszcze logo. Wybierz je w Logo, aby zobaczyć je tutaj.</string> + <string name="logo_pos_failed">Nie udało się zapisać pozycji logo. Spróbuj ponownie.</string> + <string name="art_background">Tło</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Ikona</string> + <string name="art_src_folder">Folder gry</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Twój plik</string> + <string name="art_src_exe">Z pliku exe</string> + <string name="art_src_auto">Automatycznie</string> + <string name="art_pick_image">Wybierz obraz…</string> + <string name="art_pick_title">Wybierz obraz: %1$s</string> + <string name="art_reset">Przywróć automatyczne</string> + <string name="art_search_sgdb">Szukaj w SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Szukaj gry</string> + <string name="art_sgdb_other_games">Inne wyniki</string> + <string name="art_sgdb_none">Brak wyników.</string> + <string name="art_sgdb_no_key">SteamGridDB wymaga klucza API. Dodaj swój w Ustawienia › Aplikacja.</string> + <string name="art_sgdb_bad_key">SteamGridDB nie przyjął klucza API. Sprawdź go w Ustawienia › Aplikacja.</string> + <string name="art_sgdb_limit">SteamGridDB ogranicza teraz liczbę zapytań. Spróbuj ponownie za minutę.</string> + <string name="art_sgdb_offline">Nie można połączyć się ze SteamGridDB. Sprawdź połączenie.</string> + <string name="art_sgdb_server">Coś poszło nie tak po stronie SteamGridDB. Spróbuj później.</string> + <string name="art_sgdb_no_game">SteamGridDB nie ma wyników dla tej gry. Spróbuj jej poszukać.</string> + <plurals name="games_added_n"> + <item quantity="one">Dodano %1$d grę</item> + <item quantity="few">Dodano %1$d gry</item> + <item quantity="many">Dodano %1$d gier</item> + <item quantity="other">Dodano %1$d gry</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d już w Grach</item> + <item quantity="few">%1$d już w Grach</item> + <item quantity="many">%1$d już w Grach</item> + <item quantity="other">%1$d już w Grach</item> + </plurals> + <string name="hop_back">B · Wstecz do %1$s</string> + <string name="hop_from_games">gry</string> + <string name="hop_from_play">Ustawień uruchamiania</string> + <string name="sheet_graphics_drivers">Sterowniki graficzne</string> + <string name="comp_this_proton">Ten Proton</string> + <string name="comp_every_proton">Każdy Proton</string> + <string name="comp_for_every_proton">Dla każdego Protona</string> + <string name="comp_available_count">Dostępne · %1$d</string> + <string name="comp_checked">Sprawdzono %1$s</string> + <string name="comp_check_all">Sprawdź nowe komponenty i sterowniki</string> + <string name="comp_get">Pobierz</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton i FEX poniżej należą do tego Protona</string> + <string name="comp_device_tested">%1$s · przetestowany</string> + <string name="comp_device_untested">%1$s · nieprzetestowany</string> + <string name="comp_device_unsupported">%1$s · nieobsługiwany</string> + <string name="gpu_auto_keeps">Utrzymuje polecaną parę aktualną</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Sterowniki środowiska i wyświetlania osobno</string> + <string name="gpu_use_title">Użyć %1$s?</string> + <string name="gpu_mode_title">Jak wybierane są sterowniki</string> + <string name="gpu_mode_auto_detail">Najlepsza para dla tego GPU, zawsze aktualna</string> + <string name="gpu_mode_pair">Dobrana para</string> + <string name="gpu_mode_pair_detail">Wybierz parę; ustawia oba sterowniki</string> + <string name="gpu_mode_mix">Dowolne łączenie</string> + <string name="gpu_mode_mix_detail">Wybierz obraz i środowisko osobno</string> + <string name="gpu_mode_pair_short">Para</string> + <string name="gpu_mode_mix_short">Mieszane</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PARA</string> + <string name="gpu_src_bundle">PAKIET</string> + <string name="gpu_src_chosen">WYBRANY</string> + <string name="gpu_src_by_gpu">WG GPU</string> + <string name="gpu_src_default">DOMYŚLNY</string> + <string name="gpu_display_live">Renderuje teraz</string> + <string name="gpu_display_pending">Wymaga restartu · do tego czasu renderuje %1$s</string> + <string name="gpu_runtime_live">Aktywny</string> + <string name="gpu_runtime_pending">Następna sesja · ta używa %1$s</string> + <string name="gpu_display_next">Renderuje ekran. Zadziała od następnej sesji.</string> + <string name="gpu_previous_driver">poprzedni sterownik</string> + <string name="gpu_restart_banner">Uruchom ponownie, aby zmienić sterownik obrazu.</string> + <string name="gpu_restart_blocked">Zatrzymaj bieżącą sesję i uruchom ponownie DroidDeck, aby zmienić sterownik obrazu.</string> + <string name="gpu_restart_now">Uruchom ponownie</string> + <string name="gpu_restart_later">Później</string> + <string name="gpu_auto_title">Automatyczny wybrał tę parę dla Twojego %1$s</string> + <string name="gpu_auto_builtin_title">Automatyczny używa dołączonych sterowników dla Twojego %1$s</string> + <string name="gpu_auto_reason">Wybrano dla rodziny %1$s. Nowe wersje instalują się w tle.</string> + <string name="gpu_pair_title">Wybierz parę</string> + <string name="gpu_pair_hint">Para ustawia razem sterownik obrazu i sterownik środowiska.</string> + <string name="gpu_mix_title">Wybierz każdy sterownik</string> + <string name="gpu_mix_hint">Pakiet wypełnia oba miejsca. Zmiany obrazu zadziałają po restarcie, zmiany środowiska od następnej sesji.</string> + <string name="gpu_change_display">Zmień sterownik obrazu</string> + <string name="gpu_change_runtime">Zmień sterownik środowiska</string> + <string name="gpu_autos_pick">WYBÓR AUTOMATYCZNEGO</string> + <string name="gpu_installed">Zainstalowany</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · restart, aby zastosować</string> + <string name="gpu_chip_restart">%1$s · wymaga restartu</string> + <string name="comp_this_device">To urządzenie</string> + <string name="proton_remove_title">Usunąć %1$s?</string> + <string name="setup_tab_diagnostics">Diagnostyka</string> + <string name="setup_ready">Gotowe do gry</string> + <string name="setup_not_ready">Jeszcze nie gotowe do gry</string> + <string name="setup_ready_runtime">środowisko %1$s</string> + <string name="setup_ready_limit_off">limit procesów wyłączony</string> + <string name="setup_ready_signed_in">zalogowano jako %1$s</string> + <string name="setup_needs_you">Gdy coś wymaga Twojej uwagi</string> + <string name="setup_group_look">Wygląd</string> + <string name="setup_group_device">To urządzenie</string> + <string name="setup_group_art">Grafika biblioteki</string> + <string name="setup_group_download">Pobieranie</string> + <string name="setup_download_source">Źródło</string> + <string name="setup_download_source_auto">Automatycznie</string> + <string name="setup_download_source_direct">Bezpośrednio</string> + <string name="setup_download_source_mirror">Serwer lustrzany</string> + <string name="setup_download_source_custom">Własny prefiks</string> + <string name="setup_download_mirror">Strona</string> + <string name="setup_download_prefix">Prefiks</string> + <string name="flathub_eyebrow">APLIKACJE LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Aplikacje pulpitowe dla pulpitu Linux, otwierane z Pulpitu.</string> + <string name="flathub_setup">Skonfiguruj Flathub</string> + <string name="flathub_remove_title">Usunąć %1$s?</string> + <string name="flathub_remove_note">Jej ustawienia i pliki zostają zachowane.</string> + <string name="flathub_keep">Zachowaj</string> + <string name="desktop_size">Rozmiar na dysku</string> + <string name="desktop_uninstall_title">Odinstalować pulpit?</string> + <string name="desktop_all_systems">Wszystkie</string> + <string name="gog_achievements">Osiągnięcia GOG</string> + <string name="gog_achievements_hint">Synchronizuje osiągnięcia dla obsługiwanych gier GOG. Zacznie działać od następnego uruchomienia.</string> + <string name="gog_achievements_off">Osiągnięcia wyłączone</string> + <string name="gog_achievements_on">Osiągnięcia włączone</string> + <string name="gog_achievements_signin">Zaloguj się ponownie do GOG</string> + <string name="gog_achievements_uploaded">Osiągnięcia wysłane</string> + <string name="gog_achievements_pending">Wysyłanie osiągnięcia w toku</string> + <string name="gog_achievements_enable_store">Włącz osiągnięcia GOG w ustawieniach Store</string> + <string name="gog_achievements_unavailable">Osiągnięcia niedostępne; sprawdź dzienniki sesji</string> + <string name="achievement_unlocked">Osiągnięcie odblokowane</string> + <string name="touch_paste">Wklej</string> + <string name="touch_dpad">Krzyżak</string> + <string name="touch_left_stick">Lewy drążek</string> + <string name="touch_right_stick">Prawy drążek</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Klawiatura</string> + <string name="touch_dpad_up">Krzyżak góra</string> + <string name="touch_dpad_down">Krzyżak dół</string> + <string name="touch_dpad_left">Krzyżak lewo</string> + <string name="touch_dpad_right">Krzyżak prawo</string> + <string name="touch_title">Sterowanie dotykowe</string> + <string name="touch_controller">Kontroler dotykowy</string> + <string name="touch_mouse">Mysz</string> + <string name="touch_on">Wł.</string> + <string name="touch_off">Wył.</string> + <string name="touch_speed_slow">Wolna</string> + <string name="touch_speed_normal">Normalna</string> + <string name="touch_speed_fast">Szybka</string> + <string name="touch_edit_layout">Edytuj układ</string> + <string name="touch_droiddeck_menu">Menu DroidDeck</string> + <string name="touch_drag_hint">Przeciągnij elementy sterujące na ekran</string> + <string name="touch_arrange">Rozmieść</string> + <string name="touch_discard">Odrzuć</string> + <string name="touch_saving">Zapisywanie…</string> + <string name="touch_icon">Ikona</string> + <string name="touch_narrower">Sz−</string> + <string name="touch_wider">Sz+</string> + <string name="touch_shorter">W−</string> + <string name="touch_taller">W+</string> + <string name="touch_hide">Skryj</string> + <string name="touch_color_opacity">Kolor i przezroczystość…</string> + <string name="touch_copy_layout">Skopiuj ten układ</string> + <string name="touch_layout_copied">Układ skopiowany; możesz go wkleić w układzie dotykowym każdej gry</string> + <string name="touch_paste_layout">Wklej skopiowany układ</string> + <string name="touch_reset_layout">Przywróć domyślny układ Steam</string> + <string name="touch_no_binding">Ten element sterujący nie ma przypisania w Steam, aby nadać mu ikonę</string> + <string name="touch_icon_for">Ikona dla %1$s</string> + <string name="touch_layout_color">Kolor układu dotykowego</string> + <string name="touch_done">Gotowe</string> + <string name="touch_save_failed">Nie udało się zapisać układu dotykowego</string> + <string name="touch_saved">Układ dotykowy zapisany w Steam</string> + <string name="touch_app_id">Aplikacja %1$d</string> + <string name="touch_label_hint">Etykieta (opcjonalnie)</string> + <string name="touch_icons_missing">Nie znaleziono ikon Steam</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d ikona ze Steam</item> + <item quantity="few">%1$d ikony ze Steam</item> + <item quantity="many">%1$d ikon ze Steam</item> + <item quantity="other">%1$d ikony ze Steam</item> + </plurals> + <string name="touch_icon_color">Kolor ikony</string> + <string name="touch_button_color">Kolor przycisku</string> + <string name="touch_no_icon">Brak ikony</string> + + <string name="stores_sync_sign_in">Sprawdzanie logowania…</string> + <string name="stores_sync_library">Pobieranie biblioteki…</string> + <string name="stores_sync_game_list">Pobieranie listy gier…</string> + <string name="stores_sync_details">Wczytywanie informacji o grach… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Synchronizowanie %1$d gry…</item> + <item quantity="few">Synchronizowanie %1$d gier…</item> + <item quantity="many">Synchronizowanie %1$d gier…</item> + <item quantity="other">Synchronizowanie %1$d gry…</item> + </plurals> + <string name="stores_sync_progress">Synchronizowanie… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Pobieranie okładek…</string> + <string name="stores_sync_failed">Synchronizacja nie powiodła się</string> + <string name="stores_sync_no_games">Nie znaleziono gier w Twojej bibliotece %1$s</string> + <string name="stores_sync_amazon_no_answer">Amazon Games nie odpowiedział w sprawie Twojej biblioteki: odśwież lub zaloguj się ponownie</string> + <string name="stores_sync_gog_unreachable">Nie udało się połączyć z GOG</string> + <string name="stores_sync_gog_unreadable">Nie udało się wczytać Twojej biblioteki GOG</string> + <string name="stores_registering">Rejestrowanie w Steam…</string> + <string name="mode_client_arch">Klient Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnostyka VAC</string> + <string name="setup_vac_diag_hint">Gry na Source zapisują swoją konsolę (-condebug); vac.txt w logach sesji pokazuje, czy gra jest chroniona przez VAC</string> + <string name="load_starting_steam_x64">Uruchamianie Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Używane przez klienta Steam x86-64</string> + <string name="storage_uninstall_in_x64">Ta kopia jest w kliencie Steam x86-64. Wybierz x86-64 w ustawieniu Klient Steam, a potem odinstaluj ją tutaj.</string> + <string name="storage_uninstall_in_arm64">Ta kopia jest w kliencie Steam ARM64. Wybierz ARM64 w ustawieniu Klient Steam, a potem odinstaluj ją tutaj.</string> + <string name="drawer_page_glasses">Okulary</string> + <string name="glasses_open">Okulary VITURE</string> + <string name="glasses_control">Sterowanie okularami</string> + <string name="glasses_driver_missing">Ta kompilacja nie zawiera sterownika dla tych okularów.</string> + <string name="glasses_connection_failed">Nie udało się połączyć z okularami. Podłącz ponownie kabel lub dotknij „Zezwól”, aby spróbować ponownie.</string> + <string name="glasses_allow">Zezwól</string> + <string name="glasses_allow_hint">Pozwól DroidDeck ustawiać częstotliwość odświeżania, tryb 3D, jasność, głośność i przyciemnianie okularów oraz odczytywać dane śledzenia głowy.</string> + <string name="glasses_asking">Oczekiwanie na zgodę w oknie systemu Android…</string> + <string name="glasses_denied">Nie przyznano zgody na sterowanie. Zezwól, aby zmieniać ustawienia okularów.</string> + <string name="glasses_no_control">Te okulary wyświetlają grę, ale ich ustawień nie można tu zmienić.</string> + <string name="glasses_output">Wyjście</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Gra w okularach</string> + <string name="glasses_game_on_hint">Pokazuje grę tylko w okularach. Wyłączone: grę pokazuje telefon, a Android powiela jego ekran.</string> + <string name="glasses_display">Wyświetlacz</string> + <string name="glasses_refresh">Częstotliwość odświeżania</string> + <string name="glasses_3d">3D (obok siebie)</string> + <string name="glasses_3d_hint">Przełącz inteligentne okulary na tryb 3D obok siebie. Śledzenie głowy jest kontrolowane oddzielnie.</string> + <string name="glasses_3d_failed">Nie udało się potwierdzić sygnału 3D. Spróbuj ponownie, gdy wróci obraz 2D.</string> + <string name="glasses_no_signal">Brak obrazu: okulary są w trybie, którego ten telefon nie obsługuje. Przytrzymaj ich przycisk 2D/3D albo odłącz je i podłącz ponownie.</string> + <string name="glasses_3d_refresh">Częstotliwość odświeżania w 3D</string> + <string name="glasses_auto3d">3D w grach VR</string> + <string name="glasses_auto3d_hint">Przełącza na 3D, gdy działa SteamVR, a potem wraca.</string> + <string name="glasses_picture">Obraz</string> + <string name="glasses_picture_hint">Automatycznie wyświetla płaską zawartość w obu oczach i wykrywa SteamVR. Wybierz opcję gry obok siebie dla treści SBS.</string> + <string name="glasses_picture_auto">Automatycznie</string> + <string name="glasses_picture_screen">Wirtualny ekran</string> + <string name="glasses_picture_sbs">Gra 3D obok siebie</string> + <string name="glasses_screen_size">Szerokość ekranu</string> + <string name="glasses_screen_distance">Odległość ekranu</string> + <string name="glasses_screen_next_session">Szerokość i odległość działają, gdy gra jest wyświetlana w okularach jako wirtualny ekran.</string> + <string name="glasses_screen_no_output">Te ustawienia działają, gdy opcja „Gra w okularach” jest włączona, a gra jest tam wyświetlana.</string> + <string name="glasses_screen_flat_hint">Tryb „Automatycznie” pokazuje tę grę 2D na pełnym ekranie. Użyj wirtualnego ekranu, aby dostosować jej szerokość, odległość i śledzenie głowy.</string> + <string name="glasses_screen_use">Użyj wirtualnego ekranu</string> + <string name="glasses_screen_direct_hint">SteamVR wypełnia widok. Dostosuj jego pole widzenia w VR; szerokość i odległość dotyczą tylko wirtualnego ekranu.</string> + <string name="glasses_screen_sbs_hint">Gry 3D obok siebie wypełniają obraz każdego oka. Szerokość i odległość dotyczą tylko wirtualnego ekranu.</string> + <string name="glasses_tracking_flat_hint">Tryb „Automatycznie” utrzymuje tę grę 2D nieruchomo w polu widzenia. Aby używać śledzenia głowy, wybierz „Wirtualny ekran” w sekcji „Wyświetlacz”.</string> + <string name="glasses_tracking_sbs_hint">Śledzenie głowy działa z wirtualnym ekranem lub uruchomioną grą SteamVR.</string> + <string name="glasses_hardware">Urządzenie</string> + <string name="glasses_brightness">Jasność</string> + <string name="glasses_volume">Głośność</string> + <string name="glasses_sunblock">Przyciemnianie</string> + <string name="glasses_sunblock_hint">Przyciemnia przednie szkła.</string> + <string name="glasses_tracking">Śledzenie</string> + <string name="glasses_head_tracking">Śledzenie głowy</string> + <string name="glasses_head_tracking_hint">Własne czujniki okularów obracają wirtualny ekran i SteamVR zgodnie z ruchem głowy.</string> + <string name="glasses_recenter">Wyśrodkuj widok</string> + <string name="glasses_recenter_button">Wyśrodkuj ekran ponownie</string> + <string name="glasses_vr_fov">Pole widzenia SteamVR</string> + <string name="glasses_vr_fov_hint">Mniejsze przybliża SteamVR i wypełnia okulary; większe pokazuje więcej dookoła.</string> + <string name="glasses_playing">Grasz na: %1$s</string> + <string name="glasses_calibration">Kalibracja śledzenia</string> + <string name="glasses_calibration_hint">Ogranicza dryf i wyrównuje poziom odniesienia.</string> + <string name="glasses_calibration_saved_hint">Dla tych okularów używana jest zapisana kalibracja.</string> + <string name="glasses_calibration_open">Kalibruj</string> + <string name="glasses_calibration_instructions">Połóż podłączone okulary do góry nogami na poziomej powierzchni, tak aby oprawka leżała równo. Dotknij „Rozpocznij” i nie ruszaj ich przez około 8 sekund. Ruch rozpoczyna pomiar od nowa. Kalibracja koryguje dryf i pochylenie, ale nie kierunek.</string> + <string name="glasses_calibration_settling">Zostaw okulary do góry nogami i ich nie dotykaj. Oczekiwanie, aż się ustabilizują…</string> + <string name="glasses_calibration_collecting">Pomiar czujników. Nie ruszaj okularów.</string> + <string name="glasses_calibration_moving">Wykryto ruch. Nie dotykaj okularów; pomiar rozpocznie się ponownie automatycznie.</string> + <string name="glasses_calibration_turn_over">Połóż okulary do góry nogami na poziomej powierzchni. Pomiar rozpocznie się, gdy będą prawidłowo ułożone.</string> + <string name="glasses_calibration_complete">Kalibracja zapisana. Załóż okulary i patrz prosto przed siebie, a potem dotknij „Gotowe”, aby wyśrodkować widok.</string> + <string name="glasses_calibration_failed">Nie udało się ukończyć kalibracji. Sprawdź połączenie i nie ruszaj okularów, a potem spróbuj ponownie. Poprzednia kalibracja pozostała bez zmian.</string> + <string name="glasses_calibration_start">Rozpocznij</string> + <string name="glasses_calibration_done">Gotowe</string> + <string name="glasses_calibration_reset">Resetuj kalibrację śledzenia</string> + <string name="glasses_calibration_reset_hint">Usunąć zapisaną kalibrację i przywrócić domyślne ustawienia modelu? Po ponownym założeniu okularów wyśrodkuj widok.</string> + <string name="glasses_calibration_reset_button">Resetuj</string> + <string name="hand_camera_group">Śledzenie dłoni</string> + <string name="hand_camera_prompt_title">Śledzić dłonie lub kontrolery Joy-Con za pomocą aparatu w telefonie?</string> + <string name="hand_camera_prompt_body">Bez podłączonego kontrolera aparat w telefonie śledzi Twoje gołe dłonie w VR: ściśnij kciuk i palec wskazujący, aby kliknąć, zamknij dłoń, aby ją chwycić, obróć dłoń do siebie i ściśnij, aby otworzyć menu. W przypadku sparowanych kontrolerów Joy-Con aparat śledzi ich położenie, a kontrolery Joy-Con umożliwiają obrót i sterowanie przyciskami. Zdjęcia są przetwarzane na tym urządzeniu i nigdy nie są zapisywane ani wysyłane.</string> + <string name="hand_camera_rear">Tylna kamera</string> + <string name="hand_camera_rear_hint">Zalecane. Zwykle ostrzejsza i szersza.</string> + <string name="hand_camera_front">Przednia kamera</string> + <string name="hand_camera_front_hint">Na wypadek, gdy tył urządzenia nie może być skierowany w Twoją stronę.</string> + <string name="hand_camera_allow">Użyj kamery</string> + <string name="hand_camera_not_now">Nie teraz</string> + <string name="hand_camera_setting">Śledzenie dłoni kamerą</string> + <string name="hand_camera_setting_hint">Użyj kamery w telefonie do gestów wykonywanych gołymi rękami lub do ustawienia sparowanych kontrolerów Joy-Con w VR. Kontrolery Joy-Con umożliwiają obrót i sterowanie przyciskami. Wstrzymuje, gdy inteligentne okulary śledzą Twoje dłonie lub kontrolery Joy-Con. Obrazy są przetwarzane tylko na tym urządzeniu.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Dostęp do kamery</string> + <string name="hand_camera_access_hint">Zezwól na dostęp do kamery, aby rozpocząć śledzenie dłoni.</string> + <string name="hand_camera_access_denied">Dostęp do kamery jest wyłączony. Włącz go w ustawieniach Androida.</string> + <string name="hand_camera_allow_button">Zezwól</string> + <string name="hand_camera_open_settings">Otwórz ustawienia</string> + <string name="hand_camera_placement">Położenie kamery</string> + <string name="hand_camera_placement_hint">Sprawdź, czy kamera Cię widzi, zanim zaczniesz grać.</string> + <string name="hand_camera_check">Sprawdź</string> + <string name="hand_camera_check_title">Położenie kamery</string> + <string name="hand_camera_how_rear">Ustaw urządzenie pionowo w odległości od 1,5 do 2 metrów, mniej więcej na wysokości klatki piersiowej, tylną kamerą skierowaną w Twoją stronę. Następnie wejdź w kadr z wyciągniętymi rękami.</string> + <string name="hand_camera_how_front">Ustaw urządzenie pionowo w odległości od 1,5 do 2 metrów, mniej więcej na wysokości klatki piersiowej, ekranem skierowanym w Twoją stronę. Następnie wejdź w kadr z wyciągniętymi rękami.</string> + <string name="hand_camera_starting">Uruchamianie kamery…</string> + <string name="hand_camera_stand_up">Urządzenie leży płasko. Ustaw je pionowo, aby kamera była skierowana w Twoją stronę.</string> + <string name="hand_camera_upright">Ustaw urządzenie bardziej pionowo, aby kamera była skierowana w Twoją stronę.</string> + <string name="hand_camera_not_seen">Jeszcze Cię nie widać. Wejdź w kadr tak, aby widoczne były głowa i ramiona.</string> + <string name="hand_camera_move_back">Cofnij się trochę.</string> + <string name="hand_camera_move_closer">Podejdź trochę bliżej.</string> + <string name="hand_camera_show_hands">Wyciągnij obie ręce tak, aby kamera je widziała.</string> + <string name="hand_camera_good">Wygląda dobrze.</string> + <string name="hand_camera_failed">Nie udało się uruchomić kamery. Zamknij inne aplikacje, które jej używają, i spróbuj ponownie.</string> + <string name="hand_camera_switch">Zmień kamerę</string> + <string name="hand_camera_skip">Pomiń</string> + <string name="hand_camera_done">Gotowe</string> + <string name="glasses_xreal_network_missing">Oczekiwanie na połączenie USB Ethernet okularów. Ten telefon może nie udostępniać go aplikacjom.</string> + <string name="glasses_xreal_connection_failed">Połączenie z XREAL zostało przerwane lub zwróciło nieobsługiwaną odpowiedź. Ponawianie…</string> + <string name="glasses_xreal_experimental">Eksperymentalna obsługa 1S. Użyj trybu Follow i wyłącz stabilizację w menu okularów. Kierunki śledzenia i tryby wyświetlania wymagają jeszcze testów na urządzeniu.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Tryb Cardboard</string> + <string name="cardboard_mode_hint">Obraz dla lewego i prawego oka do gogli VR na telefon.</string> + <string name="cardboard_source">Obraz</string> + <string name="cardboard_source_screen">Wirtualny ekran</string> + <string name="cardboard_source_sbs">3D obok siebie</string> + <string name="cardboard_viewer">Gogle</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Bez soczewek</string> + <string name="cardboard_ipd">Rozstaw oczu</string> + <string name="cardboard_screen_width">Szerokość ekranu</string> + <string name="cardboard_screen_distance">Odległość ekranu</string> + <string name="cardboard_head_tracking">Śledzenie głowy</string> + <string name="cardboard_no_sensor">To urządzenie nie ma czujnika obrotu.</string> + <string name="cardboard_recenter">Wyśrodkuj widok</string> + <string name="cardboard_recenter_button">Wyśrodkuj</string> + <string name="cardboard_steamvr">SteamVR (eksperymentalne)</string> + <string name="cardboard_steamvr_install">Zainstaluj</string> + <string name="cardboard_steamvr_installing">Pobieranie i rozpakowywanie SteamVR…</string> + <string name="cardboard_steamvr_start">Uruchom</string> + <string name="cardboard_steamvr_stop">Zatrzymaj</string> + <string name="cardboard_steamvr_unavailable">Niedostępne w tej sesji.</string> + <string name="cardboard_steamvr_failed">SteamVR nie odpowiada; sprawdź dziennik sesji.</string> + <string name="drawer_component_downloads">Pobierz komponenty</string> + <string name="drawer_component_downloads_hint">Pobrane pliki są wspólne ze stroną Komponenty. Wybierz powyżej pobraną wersję, aby użyć jej przy następnym uruchomieniu gry.</string> + <string name="drawer_component_choose_download">Wybierz wersję do pobrania</string> + <string name="stores_fact_developer">Producent</string> + <string name="stores_fact_publisher">Wydawca</string> + <string name="stores_fact_released">Premiera</string> + <string name="stores_hltb_main">Fabuła</string> + <string name="stores_hltb_extras">+ Dodatki</string> + <string name="stores_hltb_completionist">100%</string> + <string name="stores_hltb_hours">%1$s godz.</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="display_picture_position">Pozycja obrazu</string> + <string name="display_position_top">Góra</string> + <string name="display_position_bottom">Dół</string> + <string name="display_position_center">Środek (domyślnie)</string> + <string name="setup_tab_storage">Pamięć</string> + <string name="storage_measuring">Mierzenie pamięci…</string> + <string name="storage_measuring_hint">Pierwszy raz trwa kilka sekund.</string> + <string name="storage_internal">Pamięć wewnętrzna</string> + <string name="storage_used_of">użyto %1$s z %2$s</string> + <string name="storage_free">wolne %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck używa %1$s. Zmierzono o %2$s.</string> + <string name="storage_rescanning">mierzenie ponownie…</string> + <string name="storage_other_apps">Inne aplikacje Android</string> + <string name="storage_safe_now">Do zwolnienia teraz</string> + <string name="storage_safe_hint">Nieużywane środowiska, pozostałości, stare logi</string> + <string name="storage_clean_up">Czyszczenie…</string> + <string name="storage_session_running">Zatrzymaj sesję, aby wyczyścić lub coś usunąć. Rozmiary pozostają widoczne.</string> + <string name="storage_where">Gdzie to trafia</string> + <string name="storage_games">Gry Steam</string> + <string name="storage_game_data">Dane gier</string> + <string name="storage_game_data_hint">Prefiksy %1$s · warsztat %2$s · shadery %3$s</string> + <string name="storage_tools">Proton i środowiska</string> + <string name="storage_tools_unused">%1$s nieużywane</string> + <string name="storage_stores">GOG, Epic i inne sklepy</string> + <string name="storage_stores_hint">Usuń je w Sklepach</string> + <string name="storage_desktop">Aplikacje pulpitu</string> + <string name="storage_desktop_hint">Aplikacje Flatpak i środowiska</string> + <string name="storage_system">System Linux i klient Steam</string> + <string name="storage_system_hint">Potrzebne, żeby cokolwiek działało</string> + <string name="storage_app_data">Dane DroidDeck</string> + <string name="storage_app_data_hint">Logi starych sesji %1$s · pamięć podręczna · sterowniki</string> + <string name="storage_legend_games">Gry</string> + <string name="storage_legend_data">Dane gier</string> + <string name="storage_legend_tools">Proton i środowiska</string> + <string name="storage_legend_stores">Inne sklepy</string> + <string name="storage_legend_desktop">Aplikacje pulpitu</string> + <string name="storage_legend_system">System Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Czyszczenie</string> + <string name="storage_clean_up_lede">Nic tutaj nie dotyka zainstalowanych gier ani pobrań w toku.</string> + <string name="storage_nothing_to_clean">Nie ma teraz czego czyścić.</string> + <string name="storage_selected">Wybrano: %1$s · %2$s → zwolni się %3$s</string> + <string name="storage_cleaning">Czyszczenie…</string> + <string name="storage_free_button">Zwolnij %1$s</string> + <string name="storage_freed">Zwolniono %1$s.</string> + <string name="storage_item_runtimes">Nieużywane środowiska Steam i Proton</string> + <string name="storage_item_leftovers">Pozostałości po usuniętych grach</string> + <string name="storage_item_leftovers_unsure">Pozostałości, które mogą zawierać zapisy</string> + <string name="storage_item_logs">Logi starych sesji</string> + <string name="storage_item_logs_detail">Logi bieżącej sesji pozostają</string> + <string name="storage_item_custom_detail">Żadna gra tego nie używa. Zainstaluj ponownie w Komponentach, jeśli będzie potrzebne.</string> + <string name="storage_item_shaders">Pamięć podręczna shaderów zainstalowanych gier</string> + <string name="storage_item_shaders_detail">Odbuduje się podczas grania. Pierwsze minuty każdej gry znów będą się zacinać.</string> + <string name="storage_tag_safe">Bezpieczne</string> + <string name="storage_tag_unused">Nieużywane</string> + <string name="storage_tag_stutter">Zacięcia</string> + <string name="storage_tag_saves">Sprawdź zapisy</string> + <string name="storage_tag_default">Domyślne</string> + <string name="storage_tag_required">Wymagane</string> + <string name="storage_tag_not_used">Nieużywane</string> + <string name="storage_back">Pamięć</string> + <string name="storage_games_with_data">%1$s z danymi</string> + <string name="storage_sort_largest">Największe</string> + <string name="storage_sort_least_played">Najrzadziej grane</string> + <string name="storage_sort_sd">Na karcie SD</string> + <string name="storage_no_games">Nie ma tu żadnych gier.</string> + <string name="storage_played">grana %1$s</string> + <string name="storage_never_played">Nigdy nie grana</string> + <string name="storage_game_parts">Gra %1$s · dane %2$s</string> + <string name="storage_uninstall">Odinstaluj</string> + <string name="storage_games_note">Odinstalowanie otwiera okno Steam, żeby Steam to zarejestrował. Aby przenieść grę na kartę SD, użyj Steam › Ustawienia › Pamięć.</string> + <string name="storage_uninstall_title">Odinstalować %1$s?</string> + <string name="storage_uninstall_body">Steam otworzy się i poprosi o potwierdzenie. To zwolni %1$s gry. Prefiks zostanie do czasu wyczyszczenia pozostałości, a zapisy Steam Cloud pozostaną na koncie.</string> + <string name="storage_open_steam">Otwórz Steam</string> + <string name="storage_tools_detail">%1$s · %2$s nieużywane</string> + <string name="storage_remove_unused">Usuń nieużywane · %1$s</string> + <string name="storage_in_use">W użyciu</string> + <string name="storage_not_used">Nieużywane</string> + <string name="storage_remove">Usuń</string> + <string name="storage_remove_title">Usunąć %1$s?</string> + <string name="storage_remove_body">Zwolni %1$s. Steam pobierze to ponownie, jeśli gra będzie tego potrzebować.</string> + <string name="storage_tool_fex_runtime">Potrzebne dla gier Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Potrzebne dla Protonów ARM64</string> + <string name="storage_tool_redist">Instalacje VC++ i DirectX wymagane przez gry</string> + <string name="storage_tool_fex">Uruchamia gry Linux x86</string> + <string name="storage_tool_steam">Narzędzie Steam</string> + <string name="storage_tool_old_runtime">DroidDeck uruchamia gry bez tego środowiska</string> + <string name="storage_tool_x86_proton">Proton x86, którego DroidDeck nie potrafi uruchomić</string> + <string name="storage_tool_custom_default">Domyślne dla wszystkich gier</string> + <string name="storage_tool_custom_unused">Żadna gra tego nie używa</string> + <string name="storage_tool_custom_unknown">Nie można odczytać ustawień Steam, więc zostaje zachowane</string> + <string name="storage_cleanup_busy">Poczekaj, aż czyszczenie pamięci się skończy</string> + <string name="storage_low_title">Wolne tylko %1$s</string> + <string name="storage_low_body">Steam potrzebuje miejsca na aktualizacje i pamięć podręczną shaderów. Poniżej 10 GB aktualizacje gier mogą się przerwać w połowie.</string> + <string name="storage_low_safe">%1$s można bezpiecznie zwolnić.</string> + <string name="storage_free_up">Zwolnij miejsce</string> + <string name="storage_play_anyway">Mimo to zagraj</string> + <plurals name="storage_games_installed"> + <item quantity="one">zainstalowana %d</item> + <item quantity="other">zainstalowanych %d</item> + <item quantity="few">zainstalowane %d</item> + <item quantity="many">zainstalowanych %d</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d na karcie SD</item> + <item quantity="other">%d na karcie SD</item> + <item quantity="few">%d na karcie SD</item> + <item quantity="many">%d na karcie SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d narzędzie</item> + <item quantity="other">%d narzędzia</item> + <item quantity="few">%d narzędzia</item> + <item quantity="many">%d narzędzi</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Puste foldery prefiksów i pamięć podręczna shaderów z %d gry</item> + <item quantity="other">Puste foldery prefiksów i pamięć podręczna shaderów z %d gry</item> + <item quantity="few">Puste foldery prefiksów i pamięć podręczna shaderów z %d gier</item> + <item quantity="many">Puste foldery prefiksów i pamięć podręczna shaderów z %d gier</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Prefiks %d gry wciąż zawiera pliki, w tym zapisy lokalne. Najpierw zrób kopię, jeśli ich potrzebujesz.</item> + <item quantity="other">Prefiksy %d gier wciąż zawierają pliki, w tym zapisy lokalne. Najpierw zrób kopię, jeśli ich potrzebujesz.</item> + <item quantity="few">Prefiksy %d gier wciąż zawierają pliki, w tym zapisy lokalne. Najpierw zrób kopię, jeśli ich potrzebujesz.</item> + <item quantity="many">Prefiksy %d gier wciąż zawierają pliki, w tym zapisy lokalne. Najpierw zrób kopię, jeśli ich potrzebujesz.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d gra</item> + <item quantity="other">%d gry</item> + <item quantity="few">%d gry</item> + <item quantity="many">%d gier</item> + </plurals> + <string name="storage_tool_default_proton">Domyślny Proton DroidDeck</string> + <string name="storage_tool_proton">Opcja Proton 11 w DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Używane przez %d grę</item> + <item quantity="other">Używane przez %d gry</item> + <item quantity="few">Używane przez %d gry</item> + <item quantity="many">Używane przez %d gier</item> + </plurals> + <string name="storage_legend_components">Komponenty</string> + <string name="storage_components">Komponenty</string> + <string name="storage_item_components">Nieużywane komponenty</string> + <string name="storage_component_original">Oryginał %1$s · %2$s</string> + <string name="storage_original_confirm">Zwolni %1$s. Przywracaj tylko wersję Protona, która nie jest już zainstalowana.</string> + <string name="storage_leftovers_unchecked">Niesprawdzone: nie można odczytać manifestu aplikacji Steam, więc prefiksy usuniętych gier zostaną, dopóki to się nie zmieni.</string> + <string name="storage_failed">Nie udało się: %1$s</string> + <string name="storage_desktop_shared">%1$s współdzielone</string> + <string name="storage_data_installed">Zainstalowane gry</string> + <string name="storage_data_parts">Prefiks %1$s · shadery %2$s · warsztat %3$s</string> + <string name="storage_clear_shaders">Wyczyść shadery</string> + <string name="storage_data_leftovers">Usunięte gry</string> + <string name="storage_steam_app">Aplikacja Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Prefiks wciąż zawiera pliki, być może lokalne zapisy</string> + <string name="storage_leftover_confirm">Usuwa prefiks Wine i pamięć podręczną shaderów (%1$s). Najpierw zrób kopię potrzebnych zapisów; zapisy Steam Cloud pozostaną na koncie.</string> + <string name="storage_data_other">Zachowane</string> + <string name="storage_data_other_title">Gry poza Steam i współdzielony prefiks Steam</string> + <string name="storage_data_other_detail">Prefiksy gier dodanych przez sklepy lub ręcznie</string> + <string name="storage_components_packages">Pobrane pakiety</string> + <string name="storage_components_originals">Zachowane oryginały</string> + <string name="storage_components_none">Nie pobrano żadnych pakietów komponentów.</string> + <string name="storage_component_in_use">Wybrane dla Protona lub gry</string> + <string name="storage_component_unused">Nigdzie nie wybrane</string> + <string name="storage_original_kept">Przywraca zainstalowanego Protona</string> + <string name="storage_original_old">Wersja Protona, która nie jest już zainstalowana</string> + <string name="storage_tag_in_use">W użyciu</string> + <string name="storage_components_note">Używane komponenty pozostają zablokowane. Wybieraj je w Komponentach; to, co tu usuniesz, możesz tam pobrać ponownie.</string> + <string name="storage_component_confirm">Zwolni %1$s. Pakietów zaimportowanych samodzielnie nie da się pobrać ponownie.</string> + <string name="storage_desktop_detail">%1$s dla aplikacji Flatpak i tego, co dzielą</string> + <string name="storage_desktop_apps_title">Aplikacje</string> + <string name="storage_desktop_none">Nie zainstalowano aplikacji Flatpak.</string> + <string name="storage_desktop_shared_title">Współdzielone przez aplikacje</string> + <string name="storage_desktop_runtimes">Środowiska</string> + <string name="storage_desktop_runtimes_detail">Biblioteki, na których działają aplikacje; nieużywane znikają przez Usuń nieużywane</string> + <string name="storage_desktop_cache">Pamięć pobrań</string> + <string name="storage_desktop_cache_detail">Magazyn obiektów i pobrana pamięć podręczna Flatpak</string> + <string name="storage_desktop_prune">Usuń nieużywane</string> + <string name="storage_desktop_prune_body">Usuwa środowiska, których nie potrzebuje żadna zainstalowana aplikacja, i porządkuje magazyn obiektów Flatpak. Zainstalowane aplikacje nadal działają.</string> + <string name="storage_flatpak_uninstall_body">Usuwa aplikację (%1$s) i środowiska, których nikt inny nie używa. Dane w katalogu domowym pozostają.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d pakiet</item> + <item quantity="other">%d pakietu</item> + <item quantity="few">%d pakiety</item> + <item quantity="many">%d pakietów</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d aplikacja</item> + <item quantity="other">%d aplikacji</item> + <item quantity="few">%d aplikacje</item> + <item quantity="many">%d aplikacji</item> + </plurals> + <string name="boot_movie">Film startowy</string> + <string name="boot_movie_video">Film</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d kl./s</string> + <string name="boot_movie_note">60 kl./s wygląda płynniej, ale bardziej obciąża procesor podczas uruchamiania Steam. Film startowy wybrany w ustawieniach Steam ma pierwszeństwo.</string> + <string name="boot_movie_sound">Dźwięk</string> + <string name="boot_movie_custom">Własny film</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV lub WebM. Inne formaty i pliki powyżej %1$d MB są konwertowane na urządzeniu do WebM 720p, do %2$d sekund.</string> + <string name="boot_movie_import">Importuj</string> + <string name="boot_movie_remove">Usuń</string> + <string name="boot_movie_pick">Wybierz film startowy</string> + <string name="boot_movie_imported">%1$s jest teraz filmem startowym</string> + <string name="boot_movie_imported_silent">%1$s jest teraz filmem startowym, bez dźwięku</string> + <string name="boot_movie_too_long">Filmy do konwersji mogą trwać najwyżej %1$d sekund</string> + <string name="boot_movie_converting">Konwertowanie %1$d%%</string> + <string name="boot_movie_converting_started">Konwertowanie %1$s dla Steam. Nie zamykaj DroidDeck.</string> + <string name="boot_movie_unsupported">To urządzenie nie może zdekodować tego filmu.</string> + <string name="boot_movie_import_failed">Nie udało się zaimportować filmu</string> + <string name="glasses_experimental">Kamery Luma Ultra — Eksperymentalne</string> + <string name="glasses_joycons">Śledzenie pozycji Joy-Conów</string> + <string name="glasses_joycons_hint">Użyj kamer w inteligentnych okularach, aby ustawić sparowane kontrolery Joy-Con. Obrót i sterowanie przyciskami pochodzą z kontrolerów Joy-Con. Pozycja jest szacowana, gdy nadgarstki są ukryte. Zastępuje kontrolery obsługiwane gołymi rękami i wstrzymuje śledzenie kamery telefonu. Skieruj kontrolery Joy-Con do przodu podczas podłączania lub resetowania centrum śledzenia.</string> + <string name="glasses_joycons_requires_position">Najpierw włącz śledzenie pozycji. Wymaga kontrolerów Joy-Con z obsługą ruchu w systemie Android 12 lub nowszym. Domyślnie wyłączone.</string> + <string name="setup_tab_glasses">Inteligentne okulary</string> + <string name="setup_glasses_scope">Ustawienia wyświetlacza i śledzenia głowy są współdzielone w menu DroidDeck, grach i sesjach na komputerze.</string> + <string name="setup_glasses_connect">Podłącz inteligentne okulary, aby zmienić ich ustawienia wyświetlacza i śledzenia. Zapisane ustawienia zostaną zachowane po rozłączeniu.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Tryb wyświetlania</string> + <string name="glasses_output_2d">Wyjście 2D</string> + <string name="glasses_output_3d">Wyjście 3D</string> + <string name="glasses_picture_group">Obraz i ekran wirtualny</string> + <string name="glasses_position_group">Pozycja i poziom podłogi</string> + <string name="glasses_hands_group">Śledzenie dłoni — tryb eksperymentalny</string> + <string name="glasses_tracking_status">Stan śledzenia</string> + <string name="glasses_resolution_2d">Rozdzielczość 2D</string> + <string name="glasses_resolution_3d">Rozdzielczość 3D</string> + <string name="glasses_resolution_vr">Rozdzielczość VR</string> + <string name="glasses_resolution_auto">Automatyczna</string> + <string name="glasses_resolution_inherit">Tak samo jak 2D/3D</string> + <string name="glasses_resolution_hint">Rozdzielczość wyjściowa na oko.</string> + <string name="glasses_refresh_30_hint">Włącz tryb gry na inteligentnych okularach, aby wybrać natywny tryb 30 Hz wyświetlacza.</string> + <string name="glasses_3dof">Wirtualny ekran 3DoF</string> + <string name="glasses_3dof_hint">Zakotwicz płaskie gry przed sobą, aby móc się rozglądać. Włącza tryb gry na inteligentnych okularach bez przełączania się na tryb 3D.</string> + <string name="glasses_screen_app_wide">Szerokość i odległość natychmiast aktualizują śledzony wirtualny ekran dla menu, gier i sesji pulpitu DroidDeck.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Śledzenie położenia obejmuje obrót głowy w SteamVR. Aby śledzić tylko obrót, wyłącz śledzenie położenia.</string> + <string name="glasses_head_tracking_spatial_hint">Steruje ruchem głowy na wirtualnym ekranie. Śledzenie położenia obejmuje obrót głowy w SteamVR.</string> + <string name="glasses_quick_actions">Szybkie akcje</string> + <string name="glasses_recenter_screen_hint">Spójrz w miejsce, w którym chcesz umieścić ekran, a następnie zresetuj centrum śledzenia, aby ustawić jego wysokość i kierunek.</string> + <string name="glasses_recenter_joycons_button">Wyśrodkuj Joy-Con ponownie</string> + <string name="phone_camera_tracking_group">Aparat w telefonie — Eksperymentalny</string> + <string name="phone_camera_tracking_setting">Śledź dłonie lub kontrolery Joy-Con</string> + <string name="glasses_6dof">Wirtualny ekran 6DoF</string> + <string name="glasses_position">Śledzenie położenia — eksperymentalne</string> + <string name="glasses_position_hint">Ruch fizyczny w VR i wokół wirtualnych ekranów. Ponowne uruchomienie śledzenia zajmuje chwilę.</string> + <string name="glasses_eye_height">Aktualna wysokość oczu nad podłogą</string> + <string name="glasses_floor">Ustaw poziom podłogi na podstawie aktualnej wysokości</string> + <string name="glasses_floor_set">Ustaw poziom podłogi</string> + <string name="glasses_spatial_setup">Konfiguracja i diagnostyka kamery stereo</string> + <string name="glasses_spatial_setup_hint">Sprawdź kalibrację kamery i śledzenie dłoni przed rozpoczęciem gry.</string> + <string name="glasses_spatial_open">Otwórz konfigurację</string> + <string name="glasses_hands">Kontrolery obsługiwane gołymi rękami</string> + <string name="glasses_hands_hint">Użyj kamer okularów inteligentnych do celowania dłońmi, uszczypnij, aby kliknąć, i zamknij dłoń, aby chwycić w VR. Gałki gamepada poruszają się i obracają. Zastępuje śledzenie położenia Joy-Conów. Może wystąpić opóźnienie lub utrata śledzenia podczas gry.</string> + <string name="glasses_hands_ready_hint">Włącz kontrolery obsługiwane gołymi rękami pod kamerami Luma Ultra w opcji Śledzenie. Najpierw pokaż otwarte dłonie.</string> + <string name="glasses_hands_base">Współdzielona kalibracja Luma Ultra</string> + <string name="glasses_hands_base_hint">Korzystanie ze wspólnej podstawy Luma Ultra. Skalibruj swoje inteligentne okulary, aby sprawdzić ich dokładność.</string> + <string name="glasses_hands_calibration_verified">Zmierzona kalibracja została zweryfikowana</string> + <string name="glasses_hands_calibration_required">Wymagana walidacja</string> + <string name="glasses_hands_calibration_required_hint">Kontrolery obsługiwane gołymi rękami stają się dostępne po pomyślnym przejściu kontroli zmierzonej odległości.</string> + <string name="tracking_recovery_lost">Utrata śledzenia</string> + <string name="tracking_recovery_look">Rozejrzyj się powoli w dobrze oświetlonym pomieszczeniu.\nUtrzymuj kamery śledzące w czystości i kieruj się na meble lub inne widoczne szczegóły.</string> + <string name="tracking_recovery_restart_help">Nadal utknąłeś? Na Twoim telefonie: inteligentne okulary → Śledzenie → Otwórz konfigurację → Pokaż diagnostykę → Uruchom ponownie śledzenie.</string> + <string name="tracking_recovery_disconnected">Inteligentne okulary zostały odłączone</string> + <string name="tracking_recovery_connect">Sprawdź połączenie USB i podłącz ponownie inteligentne okulary.\nZaakceptuj monit o dostęp do USB w telefonie, jeśli się pojawi.</string> + <string name="tracking_recovery_usb_help">Po podłączeniu rozejrzyj się powoli po dobrze oświetlonym pomieszczeniu, aby przywrócić śledzenie.</string> + <string name="tracking_recovery_recenter">Wymagane ponowne wyśrodkowanie</string> + <string name="tracking_recovery_recenter_steps">Śledzenie powróciło do nowej pozycji.\nSpójrz przed siebie, a następnie dotknij opcji „Wyśrodkuj” na telefonie.</string> + <string name="tracking_recovery_recenter_help">Opcję „Wyśrodkuj” znajdziesz również w menu „Inteligentne okulary → Śledzenie → Otwórz konfigurację”. Zapisana kalibracja kamery zostanie zachowana.</string> + <string name="tracking_recovery_stabilizing">Nie ruszaj się przez chwilę</string> + <string name="tracking_recovery_hold">Trwa resetowanie centrum śledzenia.\nTrzymaj okulary inteligentne nieruchomo, aż śledzenie się ustabilizuje.</string> + <string name="tracking_recovery_automatic">Ten ekran zamyka się automatycznie, gdy śledzenie głowy jest gotowe.</string> + <string name="glasses_steady_hand_aim">Stabilizowane celowanie rękami</string> + <string name="glasses_steady_hand_aim_hint">Celuj od ramienia przez dłoń. Wyłącz, aby obracać się sterowanym nadgarstkiem.</string> + <string name="spatial_title">Konfiguracja przestrzenna</string> + <string name="spatial_wait_tracking">Oczekiwanie na śledzenie…</string> + <string name="spatial_cameras_description">Kamery śledzące lewe i prawe</string> + <string name="spatial_camera_sync">Synchronizacja kamery</string> + <string name="spatial_ready">Gotowe</string> + <string name="spatial_sync_hint">Oczekiwanie, aż śledzenie kamery i głowy zrówna się. Utrzymuj połączenie inteligentnych okularów.</string> + <string name="spatial_prepare">1. Przygotuj cel kalibracyjny</string> + <string name="spatial_print_actual">Drukuj w rzeczywistym rozmiarze</string> + <string name="spatial_print_hint">Każdy kwadrat musi mieć wymiary 30 mm (1,181 cala). Zamontuj arkusz płasko na sztywnej powierzchni w dobrze oświetlonym miejscu.</string> + <string name="spatial_print">Wydrukuj wzorzec kalibracyjny</string> + <string name="spatial_capture_group">2. Uchwyć różne widoki</string> + <string name="spatial_board_stationary">Utrzymuj cel kalibracji nieruchomo</string> + <string name="spatial_capture_hint">Przysuń inteligentne okulary bliżej, dalej i na boki. Obróć je w lewo/prawo, ustaw je pod kątem w górę/w dół i przechyl na boki. Zachowaj cel kalibracji w obu aparatach i zatrzymaj się na chwilę przed każdym wykonaniem zdjęcia.</string> + <string name="spatial_start">Rozpocznij nową kalibrację</string> + <string name="spatial_wait_sync">Oczekiwanie na synchronizację kamery.</string> + <string name="spatial_start_hint">Rozpocznij nową kalibrację, aby zebrać widoki.</string> + <string name="spatial_views_hint">Zachowaj widoczność celu kalibracji w obu podglądach. Uchwyć co najmniej 24 ostre widoki pod różnymi kątami.</string> + <string name="spatial_capturing">Przechwytywanie…</string> + <string name="spatial_capture">Przechwytywanie widoku celu kalibracji</string> + <string name="spatial_alignment">Oblicz ustawienie kamery</string> + <string name="spatial_calculating">Obliczanie…</string> + <string name="spatial_calculate">Oblicz kalibrację</string> + <string name="spatial_distance_group">3. Sprawdź odległość</string> + <string name="spatial_distance">Zmierzona odległość</string> + <string name="spatial_distance_hint">Zacznij od 12 cali lub 30 cm, aby wydrukowane znaczniki były łatwiejsze do wykrycia. Wybierz dokładny pomiar, którego będziesz używać.</string> + <string name="spatial_camera_board_distance">Lewa kamera do środka celu kalibracji</string> + <string name="spatial_checking_distance">Sprawdzanie odległości…</string> + <string name="spatial_validate">Sprawdź odległość</string> + <string name="spatial_diagnostics">Diagnostyka</string> + <string name="spatial_show_diagnostics">Pokaż diagnostykę</string> + <string name="spatial_diagnostics_hint">Narzędzia do odzyskiwania synchronizacji i śledzenia kamery.</string> + <string name="spatial_camera_timing">Czas pracy kamery</string> + <string name="spatial_hand_input">Dane wejściowe ze śledzenia rąk</string> + <string name="spatial_wait_timing">Oczekiwanie na synchronizację kamery.</string> + <string name="spatial_frames">Obrazy z kamery</string> + <string name="spatial_gpu">Wykrywanie rąk przez GPU</string> + <string name="spatial_lite">Lite wykrywanie modeli rąk</string> + <string name="spatial_lite_hint">Użyj detektora dłoni Lite i kluczowych punktów Lite na dłoniach. Sprawdź dokładność celowania, ściskania i chwytania. Resetuje się po ponownym uruchomieniu śledzenia.</string> + <string name="spatial_adaptive">Automatyczna częstotliwość wejściowa do śledzenia rąk</string> + <string name="spatial_adaptive_hint">Dostosuj wejście do szybkości przetwarzania. Resetuje się po ponownym uruchomieniu śledzenia.</string> + <string name="spatial_half_rate">Ogranicz częstotliwość wejściową dla śledzenia dłoni</string> + <string name="spatial_half_rate_hint">Wykorzystaj połowę obrazów z kamer. Wyłącz, aby porównać maksymalną częstotliwość. Resetuje się po ponownym uruchomieniu śledzenia.</string> + <string name="spatial_diagnostic_capture">Przechwytywanie diagnostyczne</string> + <string name="spatial_diagnostic_capture_hint">Zapisz lokalnie jedną parę obrazów stereo. Obrazy są zapisywane tylko na żądanie.</string> + <string name="spatial_save_frame">Zapisz obraz z kamery</string> + <string name="spatial_restart_tracking">Uruchom ponownie śledzenie</string> + <string name="spatial_restart_hint">Użyj, jeśli śledzenie nie zostaje przywrócone w dobrze oświetlonym obszarze. Ponowne uruchomienie wymaga nowego źródła śledzenia.</string> + <string name="spatial_restart">Uruchom ponownie</string> + <string name="spatial_restart_title">Zrestartować śledzenie?</string> + <string name="spatial_restart_confirm">Niezapisane widoki kalibracji zostaną utracone. Następnie trzymaj okulary inteligentne nieruchomo i zresetuj centrum śledzenia po przywróceniu śledzenia.</string> + <string name="spatial_views_count">Zarejestrowane widoki: %1$d / 24</string> + <string name="spatial_capture_paused">Przechwytywanie wstrzymane: %1$s</string> + <string name="spatial_measure_hint">Zmierz %1$s. Pokaż pełny cel kalibracji w obu podglądach, a następnie przytrzymaj nieruchomo.</string> + <string name="spatial_timing_values">%1$.1f Hz • wiek obrazu %2$.1f ms • przetwarzanie %3$.1f ms</string> + <string name="spatial_input_values">Limit wejściowy %1$.1f Hz • %2$.0f%% obrazów z kamer. Śledzenie głowy jest kontynuowane z maksymalną częstotliwością.</string> + <string name="spatial_frame_counts">%1$d przetworzone • %2$d odrzucone • %3$d pominięte przez limit wejściowy</string> + <string name="spatial_print_title">DroidDeck - Kalibracja Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Drukuj w 100% / Rzeczywisty rozmiar. Każdy kwadrat: 30 mm (1,181 cala).</string> + <string name="spatial_print_stationary">Utrzymuj cel kalibracji płasko i nieruchomo; przesuwaj inteligentne okulary pomiędzy ujęciami.</string> + <string name="spatial_print_check">Kontrola skali: 100 mm (3,937 cala) pomiędzy znacznikami</string> + <string name="spatial_distance_12in">12 cali (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 cala)</string> + <string name="spatial_distance_20in">20 cali (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 cala)</string> + <string name="spatial_disabled">Wyłączone</string> + <string name="spatial_wait_stable">Oczekiwanie na stabilne śledzenie</string> + <string name="spatial_disconnected">Rozłączono</string> + <string name="spatial_hands_off">Kontrolery obsługiwane gołymi rękami są wyłączone</string> + <string name="spatial_tracking_off">Śledzenie pozycji jest wyłączone lub inteligentne okulary są odłączone</string> + <string name="spatial_recenter_pending">Zażądano zresetowania centrum śledzenia — przytrzymaj w bezruchu, aż śledzenie się ustabilizuje</string> + <string name="spatial_tracking_lost">Utracono śledzenie — zwróć się w stronę dobrze oświetlonego obszaru z widocznymi szczegółami</string> + <string name="spatial_origin_changed">Zmieniono punkt początkowy śledzenia — dotknij opcji „Wyśrodkuj”, a następnie trzymaj okulary nieruchomo</string> + <string name="spatial_active">6DoF aktywne</string> + <string name="spatial_validation_session">Kalibracja zweryfikowana dla tego połączenia.</string> + <string name="spatial_validation_saved">Kalibracja zweryfikowana i zapisana.</string> + <string name="spatial_wait_cameras">Czekam na kamery stereo</string> + <string name="spatial_wait_hands">Oczekiwanie na śledzenie rąk</string> + <string name="spatial_collect_instructions">Utrzymuj cel kalibracji 5 × 7 nieruchomo. Uchwyć ponad 24 widoki podczas przesuwania i obracania inteligentnych okularów.</string> + <string name="spatial_capture_pending">Oczekiwanie na kolejny obraz z kamery. Trzymaj inteligentne okulary nieruchomo.</string> + <string name="spatial_validation_pending">Sprawdzanie obrazu z kolejnej kamery. Utrzymuj widoczny pełny cel kalibracji i trzymaj nieruchomo.</string> + <string name="spatial_start_first">Najpierw rozpocznij kalibrację</string> + <string name="spatial_no_camera_frame">Nie dotarł nowy obraz z kamery. Sprawdź połączenie inteligentnych okularów i podgląd aparatu, a następnie spróbuj ponownie.</string> + <string name="spatial_clock_reset">Reset zegara aparatu</string> + <string name="spatial_frame_changed">Zmieniono układ współrzędnych śledzenia. Twoje widoki zostały zapisane do ponownego obliczenia. Zresetuj centrum śledzenia, a następnie rozpocznij nowy zestaw, aby uchwycić więcej widoków.</string> + <string name="spatial_device_loaded">Załadowano kalibrację urządzenia</string> + <string name="spatial_base_loaded">Załadowano kalibrację bazową Luma Ultra</string> + <string name="spatial_calibration_needed">wymagana kalibracja</string> + <string name="spatial_tap_start">Najpierw dotknij „Rozpocznij nową kalibrację”.</string> + <string name="spatial_capture_recenter_pending">Resetowanie centrum śledzenia oczekuje na stabilne śledzenie. Przytrzymaj w bezruchu przez chwilę.</string> + <string name="spatial_capture_recenter">Zmieniono śledzenie. Dotknij raz opcji „Wyśrodkuj”, a następnie trzymaj okulary nieruchomo przed wykonaniem zdjęcia.</string> + <string name="spatial_capture_unsynchronized">Odrzucono zdjęcie: śledzenie głowy nie było zsynchronizowane lub zmieniło się podczas wykonywania zdjęcia. Nie ruszaj się i spróbuj ponownie.</string> + <string name="spatial_align_first">Oblicz ustawienie kamery przed sprawdzeniem odległości.</string> + <string name="spatial_processing_failed">Przetwarzanie kamery nie powiodło się</string> + <string name="spatial_hand_head_changed">Zmieniono śledzenie głowy podczas wykrywania rąk</string> + <string name="spatial_hand_wait_sync">Oczekiwanie na synchronizację kamery i głowy</string> + <string name="spatial_no_wrists">Nie wykryto nadgarstków. Trzymaj uchwyty kontrolera Joy-Con przed inteligentnymi okularami</string> + <string name="spatial_no_hands">Nie wykryto rąk. Pokaż otwarte dłonie przed inteligentnymi okularami</string> + <string name="spatial_one_camera_wrists">Nadgarstki widoczne tylko w jednym aparacie; trzymaj uchwyty kontrolera w widoku udostępnionym</string> + <string name="spatial_one_camera_hands">Dłonie widoczne tylko w jednej kamerze; trzymaj obie dłonie we wspólnym widoku</string> + <string name="spatial_ambiguous_hands">Obie kamery widzą ręce, ale dopasowanie lewa/prawa jest niejednoznaczne</string> + <string name="spatial_inconsistent_depth">Wykryto ręce, ale głębia stereo jest niespójna</string> + <string name="spatial_rejected_wrist">Pozycja nadgarstka odrzucona przez kontrolę stereo lub ruchu</string> + <string name="spatial_inconsistent_palm">Wykryto punkty stereo, ale geometria dłoni jest niespójna</string> + <string name="spatial_hands_need_calibration">Zakończ kalibrację i sprawdź odległość, aby włączyć ręce</string> + <string name="spatial_hands_wait_stable">Oczekiwanie na stabilne śledzenie głowy; zresetuj centrum śledzenia, jeśli zostaniesz o to poproszony.</string> + <string name="spatial_old_frame">Obserwacja kamerą jest zbyt stara; czekam na świeżą parę</string> + <string name="spatial_fit_ready">Dopasuj %1$.2f pikseli. Zmierz wybraną odległość od lewej kamery do środka celu kalibracji, a następnie zatwierdź.</string> + <string name="spatial_opencv_error">OpenCV niedostępne: %1$s</string> + <string name="spatial_restored">Przywrócono %1$d zapisane widoki. Oblicz kalibrację, aby spróbować ponownie, lub rozpocznij nową serię, aby uchwycić więcej.</string> + <string name="spatial_captured">Zarejestrowane widoki: %1$d / 24. Utrzymuj cel kalibracji nieruchomo; przesuń inteligentne okulary, aby uzyskać następny widok.</string> + <string name="spatial_capture_corners">Przechwytywanie odrzucone: %1$d / 12 wymaganych rogów widocznych w obu kamerach. Pokaż więcej celu kalibracji, przytrzymaj nieruchomo i spróbuj ponownie.</string> + <string name="spatial_validation_error">Sprawdzanie odległości nie mogło zostać zakończone: %1$s. Spróbuj ponownie.</string> + <string name="spatial_hand_timeout">Wykrywanie rąk przekroczyło %1$d ms; obserwacja odrzucona</string> + <string name="spatial_wrists_tracked">%1$d / 2 pozycje nadgarstków Joy-Con mierzone metodą stereo</string> + <string name="spatial_palms_tracked">Śledzone dłonie: %1$d / 2; gest szczypania gotowy: %2$d; chwyt gotowy: %3$d</string> + <string name="spatial_capture_saved">Zapisano przechwytywanie diagnostyczne w %1$s</string> + <string name="spatial_hand_error">Zatrzymano śledzenie rąk: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Śledzenie głowy i cel kalibracji różnią się o %1$s (limit 5 cm / 2 cale). Utrzymuj cel kalibracji na stałym poziomie i poczekaj na stabilne śledzenie przed rozpoczęciem nowej serii. Delikatnie obracaj i przechylaj inteligentne okulary; pauza przed każdym uchwyceniem.</string> + <string name="spatial_need_views">Uchwyć co najmniej 24 różne widoki stacjonarnego celu kalibracji.</string> + <string name="spatial_need_rotation">Obracaj inteligentne okulary w lewo i w prawo oraz przechyl je w górę i w dół; ruch bez obrotu nie może skalibrować wyrównania kamery.</string> + <string name="spatial_bad_baseline">Nieprawdopodobna linia bazowa kamery</string> + <string name="spatial_need_orientations">Poruszaj głową w bardziej zróżnicowanych orientacjach.</string> + <string name="spatial_bad_rotation">Nieprawidłowy obrót kamery względem głowy</string> + <string name="spatial_bad_alignment">Ustawienie kamery względem głowy jest niespójne.</string> + <string name="spatial_calibration_error">Kalibracja nie mogła zostać ukończona. %1$s Twoje przechwycone widoki są zapisywane.</string> + <string name="spatial_reprojection_error">Błąd wstrzymania ponownego odwzorowania %1$.2f px przekracza 2 px. Ponowna kalibracja.</string> + <string name="spatial_distance_corners">%1$d / 24 rogi szachownicy wykryte w obu kamerach. Utrzymuj widoczny pełny cel kalibracji i trzymaj nieruchomo. Jeśli jest już widoczny, wybierz 12 cali lub 30 cm i zmierz tę bliższą odległość przed ponowną próbą.</string> + <string name="spatial_distance_depth">Cel kalibracji jest widoczny, ale nie można wiarygodnie zmierzyć jego głębokości. Trzymaj inteligentne okulary nieruchomo, a cel kalibracji powinien być płaski i dobrze oświetlony, a następnie spróbuj ponownie.</string> + <string name="spatial_distance_invalid">Pomiar kamery był nieprawidłowy. Zatrzymaj się i spróbuj ponownie.</string> + <string name="spatial_distance_passed">Kontrola odległości zaliczona.</string> + <string name="spatial_distance_retry">Sprawdź ponownie odległość od lewej kamery do środka celu kalibracji i spróbuj ponownie.</string> + <string name="spatial_distance_result">Kamery zmierzyły %1$s; wybrana odległość %2$s. %3$s</string> + <string name="spatial_wait_previews">Przed rozpoczęciem kalibracji poczekaj na podgląd z obu kamer.</string> + <string name="spatial_saved_views_hint">Zapisane widoki można przeliczyć. Rozpocznij nową kalibrację, aby przechwycić bieżący układ współrzędnych śledzenia.</string> + <string name="spatial_model_checksum_error">Niezgodność sumy kontrolnej modelu ręki</string> + <string name="spatial_opencv_load_error">Nie można załadować OpenCV</string> + <string name="spatial_gpu_hint">Domyślnie używany jest CPU. GPU jest opcją eksperymentalną i może powodować ponowne uruchamianie SteamVR. Wybór jest resetowany po ponownym uruchomieniu śledzenia.</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_connect_hint">Podłącz Luma Ultra i włącz śledzenie pozycji.</string> + <string name="spatial_inference_error">Wykrywanie dłoni jest niedostępne: %1$s. Zmień ustawienie CPU/GPU lub wyłącz i ponownie włącz sterowanie dłońmi, aby spróbować ponownie.</string> +</resources> diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml new file mode 100644 index 0000000000..b33f525235 --- /dev/null +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -0,0 +1,2912 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Os gráficos do SteamVR pararam</string> + <string name="steamvr_recovery_countdown">O DroidDeck vai reiniciar dentro de %1$d segundos para repor os gráficos e reabrir o SteamVR. O jogo em execução será fechado; o progresso não guardado não pode ser recuperado.</string> + <string name="steamvr_recovery_repeated">A falha gráfica voltou após um reinício recente. A recuperação automática está em pausa para evitar um ciclo. Reiniciar fecha o jogo; o progresso não guardado não pode ser recuperado.</string> + <string name="steamvr_recovery_restart">Reiniciar agora</string> + <string name="steamvr_recovery_cancel">Manter aberto</string> + <string name="steamvr_recovery_restarting">A repor os gráficos e a reabrir o SteamVR…</string> + <string name="steamvr_recovery_failed">O DroidDeck não conseguiu reiniciar automaticamente. Feche completamente a app e volte a abri-la.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>A primeira execução transfere o Steam. Isto pode demorar alguns minutos.</item> + <item>Por predefinição, sair da app coloca o Steam em pausa; ao voltar, continua onde ficou.</item> + <item>O seu comando aparece como um comando Xbox 360. Se não tiver comando, utilize os controlos no ecrã.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>A primeira execução configura o ambiente de trabalho. Isto pode demorar alguns minutos.</item> + <item>Por predefinição, sair da app coloca a sessão em pausa; ao voltar, continua onde ficou.</item> + <item>O toque funciona como um painel tátil: arraste para mover o ponteiro, toque para clicar.</item> + <item>O seu comando aparece como um comando Xbox 360. Se não tiver comando, utilize os controlos no ecrã.</item> + </string-array> + <string name="session_channel">Sessão</string> + <string name="session_channel_description">Apresentada enquanto houver uma sessão do Steam ou do ambiente de trabalho aberta</string> + <string name="session_notification">O Steam está em execução</string> + <string name="session_notification_downloads">Transferência do Steam ativa</string> + <string name="session_notification_paused">Sessão em pausa - toque em Retomar quando estiver pronto</string> + <string name="resume_session">Retomar</string> + <string name="suspend_now">Suspender agora</string> + <string name="stop_session">Terminar sessão</string> + <string name="frame_gen_title">Geração de fotogramas</string> + <string name="frame_gen_hint">Selecione o modo de geração de fotogramas</string> + <string name="frame_gen_off">Desligado</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptativo %1$d</string> + <string name="lsfg_needs_steam">Requer o Lossless Scaling no Steam</string> + <string name="lsfg_needs_install">Instale o Lossless Scaling no Steam ou importe o Lossless.dll</string> + <string name="lsfg_import">Importar Lossless.dll…</string> + <string name="lsfg_using_steam">A utilizar a cópia do Steam</string> + <string name="lsfg_using_import">A utilizar uma cópia importada</string> + <string name="lsfg_pick_title">Escolher Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll importado</string> + <string name="lsfg_import_unchanged">Este Lossless.dll já está a ser utilizado</string> + <string name="lsfg_import_not_owned">Esta conta Steam não possui o Lossless Scaling</string> + <string name="lsfg_import_invalid">Este ficheiro não é o Lossless.dll do Lossless Scaling</string> + <string name="lsfg_import_failed">Não foi possível preparar o LSFG a partir deste Lossless.dll</string> + <string name="lsfg_problem_missing">O LSFG requer o Lossless Scaling do Steam ou um Lossless.dll importado</string> + <string name="lsfg_problem_failed">O LSFG não conseguiu preparar os shaders a partir do Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: não suportado</string> + <string name="hud_fg_failed">%1$s: falha do motor</string> + <string name="hud_fg_needs_lossless">%1$s: requer Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · a iniciar</string> + <string name="second_library_import_hint">Adiciona uma biblioteca Steam e procura jogos Windows nela. Os jogos que possui utilizam as respetivas entradas do Steam; os restantes tornam-se atalhos de jogos não Steam.</string> + <string name="game_env_title">Ambiente do jogo</string> + <string name="game_env_hint">Variáveis de ambiente para jogos Proton.</string> + <string name="game_env_edit">Editar</string> + <string name="game_env_shared">Todos os jogos Proton</string> + <string name="game_env_scope">Perfil</string> + <string name="game_env_app_id">ID da app Steam</string> + <string name="game_env_open">Abrir</string> + <string name="game_env_profile">Jogo %1$s</string> + <string name="game_env_add">Adicionar variável</string> + <string name="game_env_name">Nome da variável</string> + <string name="game_env_value">Valor</string> + <string name="game_env_save">Guardar</string> + <string name="game_env_remove">Remover</string> + <string name="game_env_restore">Voltar a herdar</string> + <string name="game_env_reset">Limpar substituições de ambiente</string> + <string name="game_env_unset">Não definir neste perfil</string> + <string name="game_env_empty">Nenhuma variável definida.</string> + <string name="game_env_inherited">Herdada</string> + <string name="game_env_custom">Variável personalizada</string> + <string name="game_env_error">Não foi possível carregar nem guardar. Verifique o armazenamento livre e tente novamente.</string> + <string name="game_env_invalid">Utilize um nome válido e um valor com até 8192 carateres.</string> + <string name="game_env_unused">O ambiente de execução padrão do Proton não lê esta variável.</string> + <string name="game_env_loading">A carregar…</string> + <string name="game_env_feature">Substituição do nível de funcionalidades D3D12. 12_2 indica as capacidades do DirectX 12 Ultimate; funcionalidades não suportadas podem falhar. Deixe por definir para deteção automática.</string> + <string name="game_env_shader">Substituição do modelo de shader D3D12. 6_9 requer um VKD3D suficientemente recente e funcionalidades de GPU compatíveis. Deixe por definir para deteção automática.</string> + <string name="game_env_cache">Mantenha a cache de shaders do Mesa ativa para reduzir compilações repetidas. false ativa a cache.</string> + <string name="game_env_cache_size">Tamanho máximo da cache de shaders do Mesa, por exemplo 1G. Caches maiores ocupam mais armazenamento.</string> + <string name="game_env_vkd3d_config">Opções do VKD3D para D3D12. nodxr desativa o ray tracing; utilize apenas num jogo que o exija.</string> + <string name="game_env_proton_log">Defina como 1 para obter um registo de diagnóstico do Proton. O registo pode reduzir o desempenho e ocupar armazenamento.</string> + <string name="game_env_wined3d">Defina como 1 para utilizar o WineD3D baseado em OpenGL em vez do DXVK, para testar a compatibilidade com D3D9–11.</string> + <string name="game_env_no_ntsync">Defina como 1 para manter este jogo fora do ntsync (droiddeck-ntsync ou um controlador do kernel); utiliza o droiddeck-esync onde existir um pacote, caso contrário o droiddeck-fsync.</string> + <string name="game_env_no_esync">Defina como 1 para desativar o droiddeck-esync neste jogo; utiliza o droiddeck-fsync em vez dele, ou o droiddeck-ntsync se o fsync também estiver desativado.</string> + <string name="game_env_no_fsync">Defina como 1 para manter este jogo fora do droiddeck-fsync; utiliza o droiddeck-esync onde existir um pacote, caso contrário o droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Defina como 1 para executar este jogo com o droiddeck-fsync, ou 0 para dar prioridade ao droiddeck-esync onde houver um pacote compatível com o respetivo Proton.</string> + <string name="game_env_xalia">Defina como 0 para desativar o assistente de navegação por comando do Proton neste jogo.</string> + <string name="game_env_hud">Sobreposição do DXVK para D3D9–11. fps mostra a taxa de fotogramas; sem valor, fica oculta.</string> + <string name="game_env_dxvk_config">Definições do DXVK separadas por ponto e vírgula. As versões recentes utilizam dxvk.maxFrameRate para limitar os fotogramas; para jogar normalmente, prefira o limitador de fotogramas da sessão.</string> + <string name="game_env_vkd3d_limit">Limite da taxa de fotogramas em D3D12. 0 desativa o limite.</string> + <string name="game_env_glthread">Threading OpenGL do Mesa. true pode ajudar jogos OpenGL limitados pela CPU; teste jogo a jogo.</string> + <string name="sync_backend_title">Sincronização do Wine</string> + <string name="sync_backend_hint">Como os jogos mantêm os seus threads sincronizados. Aplica-se na próxima sessão.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Predefinição do FEX</string> + <string name="fex_next_launch">Aplica-se quando iniciar o próximo jogo.</string> + <string name="game_settings_title">Jogos</string> + <string name="fex_default_label">Padrão do FEX</string> + <string name="fex_default_detail">Utiliza os valores padrão do FEX.</string> + <string name="fex_stability_label">Estabilidade</string> + <string name="fex_stability_detail">Definições mais seguras e mais lentas.</string> + <string name="fex_compatibility_label">Compatibilidade</string> + <string name="fex_compatibility_detail">TSO completo com multibloco.</string> + <string name="fex_intermediate_label">Intermédio</string> + <string name="fex_intermediate_detail">TSO equilibrado com precisão x87 reduzida.</string> + <string name="fex_performance_label">Desempenho</string> + <string name="fex_performance_detail">Todo o TSO desativado; multibloco.</string> + <string name="fex_performance_tso_label">Desempenho + TSO</string> + <string name="fex_performance_tso_detail">Definições de Desempenho com o TSO principal ativado.</string> + <string name="fex_extreme_label">Extremo</string> + <string name="fex_extreme_detail">Desativa as verificações de código automodificável. Jogos com JIT e DRM podem deixar de funcionar.</string> + <string name="fex_extreme_tso_label">Extremo + TSO</string> + <string name="fex_extreme_tso_detail">Definições de Extremo com o TSO principal ativado.</string> + <string name="fex_extreme_gn_label">Extremo-gn</string> + <string name="fex_extreme_gn_detail">Desempenho com sugestões de TSC e metadados. Experimente antes do Extremo.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Desempenho com verificações de código completas e o bit de hipervisor oculto.</string> + <string name="game_env_custom_value">Valor personalizado</string> + <string name="game_env_select_value">Selecionar valor</string> + <string name="user_apps_section">Emuladores e apps</string> + <string name="user_apps_add">Adicionar</string> + <string name="user_apps_add_detail">A sua própria app ou jogo</string> + <string name="user_apps_kind_script">Script</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">A iniciar…</string> + <string name="user_apps_added">%1$s adicionado</string> + <string name="user_apps_removed">%1$s removido</string> + <string name="user_apps_back">Ambiente de trabalho</string> + <string name="user_apps_gone">Essa app já não existe. Escolha-a novamente no Ambiente de trabalho.</string> + <string name="user_apps_open">Abrir %1$s</string> + <string name="user_apps_remove">Remover</string> + <string name="user_apps_remove_confirm">Prima novamente para remover</string> + <string name="user_apps_stop_session">Termine a sessão para remover</string> + <string name="user_apps_script_linked">Executa %1$s a partir da respetiva pasta, ligada à sessão no local onde se encontra. Remover a app não altera essa pasta.</string> + <string name="user_apps_script_copied">Executa %1$s a partir de uma cópia da respetiva pasta dentro do DroidDeck. Remover a app elimina a cópia, não o original.</string> + <string name="user_apps_runtime_required">Instale primeiro o ambiente de execução Linux</string> + <string name="user_apps_file_gone">O ficheiro já não existe</string> + <string name="user_apps_no_space">Espaço livre insuficiente: copiar a pasta requer %1$s</string> + <string name="user_apps_copying">A copiar %1$s</string> + <string name="user_apps_failed">Falha ao adicionar a app</string> + <string name="user_apps_github_checking">A procurar uma versão de %1$s</string> + <string name="user_apps_github_unreachable">Não foi possível ler as versões de %1$s</string> + <string name="user_apps_github_no_appimage">Nenhuma versão de %1$s tem uma AppImage ARM64 ou x86_64</string> + <string name="user_apps_downloading">A transferir %1$s</string> + <string name="user_apps_download_failed">A transferência falhou</string> + <string name="user_apps_update_failed">Falha ao atualizar a app</string> + <string name="user_apps_icon_failed">Não foi possível ler esse ícone</string> + <string name="user_apps_saved">%1$s guardado</string> + <string name="user_apps_edit">Editar</string> + <string name="user_apps_check_updates">Procurar atualizações</string> + <string name="user_apps_checking_updates">A procurar atualizações…</string> + <string name="user_apps_update_to">Atualizar para %1$s</string> + <string name="user_apps_up_to_date">Atualizado · %1$s</string> + <string name="user_apps_updated">%1$s atualizado</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Adicionar uma app</string> + <string name="add_app_tab_script">Script</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Um ficheiro .sh. É executado a partir da própria pasta, em ecrã inteiro no gamescope.</string> + <string name="add_app_appimage_hint">Uma AppImage ARM64 (aarch64), ou uma x86_64 executada através do FEX. É extraída para o ambiente de execução Linux uma única vez.</string> + <string name="add_app_github_hint">Instala a AppImage ARM64 da versão mais recente do repositório, ou a x86_64 através do FEX.</string> + <string name="app_fex_title">Utilizar FEX</string> + <string name="app_fex_auto">Automático</string> + <string name="app_fex_on">Ligado</string> + <string name="app_fex_off">Desligado</string> + <string name="app_fex_hint">O FEX executa programas Linux x86 neste dispositivo ARM64. Em Automático, é utilizado quando o programa foi compilado para x86.</string> + <string name="app_fex_x86">%1$s através do FEX</string> + <string name="app_fex_not_ready">Este programa foi compilado para PCs %1$s e é executado através do FEX, que ainda não está configurado. Abra o Steam uma vez com a sessão iniciada: o DroidDeck transfere o FEX e o Steam Linux Runtime necessários e, depois, este programa abre.</string> + <string name="session_end_program">Este programa</string> + <string name="session_end_fex_missing">%1$s foi compilado para PCs x86 e é executado através do FEX, que ainda não está instalado. Abra o Steam uma vez com a sessão iniciada e deixe-o transferir o FEX e o Steam Linux Runtime; depois, volte a iniciá-lo.</string> + <string name="add_app_flatpak_hint">Um ID de app do Flathub ou a respetiva página no Flathub. O Flatpak é configurado primeiro, se ainda não estiver.</string> + <string name="add_app_file">Ficheiro</string> + <string name="add_app_no_file">Nenhum ficheiro escolhido</string> + <string name="add_app_choose_file">Escolher ficheiro</string> + <string name="add_app_change_file">Alterar</string> + <string name="add_app_pick_script">Escolher um script</string> + <string name="add_app_pick_appimage">Escolher uma AppImage</string> + <string name="add_app_pick_icon">Escolher um ícone</string> + <string name="add_app_repository">Repositório</string> + <string name="add_app_repository_placeholder">proprietário/repo ou uma ligação do github.com</string> + <string name="add_app_repository_invalid">Não é um repositório GitHub</string> + <string name="add_app_flatpak_id">ID da app</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Não é um ID de app do Flathub</string> + <string name="add_app_flatpak_bundle_hint">Ou um ficheiro .flatpak, para uma app que não esteja no Flathub.</string> + <string name="add_app_pick_flatpak">Escolher um ficheiro .flatpak</string> + <string name="add_app_source">Origem</string> + <string name="add_app_appearance">No seu Ambiente de trabalho</string> + <string name="add_app_preview_name">Nova app</string> + <string name="add_app_name">Nome</string> + <string name="add_app_name_placeholder">Da app</string> + <string name="add_app_icon">Ícone</string> + <string name="add_app_icon_default">Ícone padrão</string> + <string name="add_app_choose_icon">Escolher ícone</string> + <string name="add_app_clear_icon">Limpar</string> + <string name="add_app_icon_suggestions">Do repositório</string> + <string name="add_app_icon_searching">A procurar ícones…</string> + <string name="add_app_icon_reset">Padrão</string> + <string name="edit_app_title">Editar %1$s</string> + <string name="edit_app_save">Guardar</string> + <string name="add_app_checking_folder">A verificar a pasta…</string> + <string name="add_app_folder_linked">A pasta está ligada à sessão: %1$s</string> + <string name="add_app_folder_copied">A pasta contém programas Linux, que o armazenamento partilhado não consegue executar, por isso é copiada para o DroidDeck (%1$s).</string> + <string name="add_app_confirm">Adicionar</string> + <string name="add_app_cancel">Cancelar</string> + <string name="add_app_runtime_required">Instale primeiro o ambiente de execução Linux na Configuração.</string> + <string name="add_app_busy">Aguarde que %1$s termine.</string> + <string name="steam_compat_label">Compatível</string> + <string name="proton_compatible_note">As versões marcadas com “%1$s” no menu Compatibilidade do Steam incluem as correções de prefixo do DroidDeck e iniciam jogos aqui. O padrão é o Proton Experimental ARM64 (%1$s), ou o Proton 11.0 ARM64 (%1$s) quando essa versão mais recente estiver instalada. As entradas do Proton da própria Valve sem a marca não conseguem iniciar jogos neste dispositivo.</string> + <string name="proton_installed_compatible">Instalado %1$s · %2$s</string> + <string name="common_cancel">Cancelar</string> + <string name="common_auto">Automático</string> + <string name="common_never">Nunca</string> + <string name="common_always">Sempre</string> + <string name="common_uninstall">Desinstalar</string> + <string name="common_check">Verificar</string> + <string name="common_update">Atualizar</string> + <string name="common_checking">A verificar…</string> + <string name="common_working">A processar…</string> + <string name="common_forget">Esquecer</string> + <string name="common_add_ellipsis">Adicionar…</string> + <string name="common_use">Utilizar</string> + <string name="common_applies_next_session">Aplica-se na próxima sessão.</string> + <string name="mode_steam_title">Sessão do Steam</string> + <string name="mode_desktop_title">Sessão do ambiente de trabalho</string> + <string name="mode_display">Ecrã</string> + <string name="mode_resolution">Resolução</string> + <string name="mode_res_720">Até 720p</string> + <string name="mode_res_900">Até 900p</string> + <string name="mode_res_1080">Até 1080p</string> + <string name="mode_res_native">Nativa</string> + <string name="mode_res_default">%1$s (padrão)</string> + <string name="mode_res_custom_value">Personalizada · %1$d×%2$d</string> + <string name="mode_res_custom">Personalizada…</string> + <string name="mode_res_note">Com 720p, os menus podem responder mais depressa.</string> + <string name="mode_ratio">Proporção do ecrã</string> + <string name="mode_ratio_custom">Definida pela resolução personalizada.</string> + <string name="mode_ratio_auto">Automático utiliza pelo menos 16:9.</string> + <string name="mode_fps">Limite de fotogramas</string> + <string name="mode_fps_note">Limita toda a sessão. O ecrã muda para uma taxa de atualização que seja múltipla do limite.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Saída HDR10</string> + <string name="mode_hdr_unavailable">Indisponível: %1$s.</string> + <string name="mode_hdr_restart">Reinicie a app para aplicar.</string> + <string name="mode_drivers">Controladores</string> + <string name="mode_gpu_drivers">Controladores da GPU</string> + <string name="mode_gpu_drivers_hint">Partilhados pelo Steam e pelo Ambiente de trabalho. Defina-os na página Componentes.</string> + <string name="mode_touch_controls">Toque e controlos</string> + <string name="mode_touch">Toque</string> + <string name="mode_touch_touchpad">Painel tátil</string> + <string name="mode_touch_direct">Direto</string> + <string name="mode_touch_note">Automático: painel tátil no Ambiente de trabalho, direto no Steam.</string> + <string name="mode_osc">Controlos no ecrã</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Em Automático, os controlos aparecem quando não há nenhum comando ligado.</string> + <string name="osc_steam_touch">Controlos táteis do Steam (beta)</string> + <string name="osc_style_next_session">Os controlos táteis do Steam começam na próxima sessão do Steam</string> + <string name="osc_steam_layout">Esquema tátil do Steam</string> + <string name="osc_steam_layout_hint">Mova, redimensione ou oculte os controlos táteis deste jogo; é guardado no Steam</string> + <string name="mode_controller">Comando</string> + <string name="mode_controller_hint">Como o Steam vê o seu comando. Aplica-se na próxima sessão.</string> + <string name="mode_controller_deck">Comando Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Comando Xbox 360</string> + <string name="mode_controller_note">Deck: botão de Acesso rápido e giroscópio. Steam Controller: o mesmo, com sensor de pega nos botões traseiros. DualShock 4 e DualSense: giroscópio, e os trackpads como o painel tátil do comando. Xbox 360: abra o Acesso rápido com Guide+A.</string> + <string name="mode_back">Voltar</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Sessão</string> + <string name="mode_suspend">Comportamento em segundo plano</string> + <string name="mode_suspend_hint">Quando a app fica oculta ou o ecrã se desliga.</string> + <string name="mode_suspend_manual">Manual</string> + <string name="mode_suspend_native">Nativo</string> + <string name="mode_suspend_steam_note">Automático: pausa e retoma ao voltar a ser apresentada. Nativo: prepara primeiro o Steam para a suspensão. Manual: aguarda por Retomar. Nunca: continua em execução.</string> + <string name="mode_background_downloads">Manter transferências ativas</string> + <string name="mode_background_downloads_hint">Adia a suspensão em segundo plano enquanto o Steam está a transferir.</string> + <string name="mode_suspend_note">Automático: pausa em segundo plano e retoma ao voltar a ser apresentada. Manual: aguarda por Retomar. Nunca: continua em execução.</string> + <string name="mode_startup">Arranque</string> + <string name="mode_steam_startup">Iniciar o Steam com o DroidDeck</string> + <string name="mode_steam_startup_hint">Abre a sessão do Steam quando o DroidDeck é iniciado.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">A procurar versões…</string> + <string name="mode_decky_ready">Pronto para instalar %1$s.</string> + <string name="mode_decky_none">Nenhuma versão compatível encontrada. Tente novamente mais tarde.</string> + <string name="mode_decky_installed">Instalado · %1$s</string> + <string name="mode_decky_update">Atualização disponível · %1$s</string> + <string name="mode_decky_current">Atualizado · %1$s</string> + <string name="mode_decky_loader">Carregador</string> + <string name="mode_decky_install_latest">Instalar a versão mais recente</string> + <string name="mode_decky_on">Inicia com o Steam. Enquanto estiver ligado, outras apps neste dispositivo poderão controlar o Steam.</string> + <string name="mode_decky_off">Desligado. A porta de depuração remota do Steam mantém-se fechada.</string> + <string name="mode_decky_remove_title">Desinstalar o Decky Loader?</string> + <string name="mode_decky_remove_text">Remove o carregador. Os seus plugins e definições são mantidos.</string> + <string name="mode_client">Cliente</string> + <string name="mode_mangoapp">Sobreposição de desempenho</string> + <string name="mode_mangoapp_hint">Desative se os jogos falharem ou ficarem a preto no Modo Deck. Aplica-se na próxima sessão.</string> + <string name="mode_steam_repair">Reparar cliente Steam</string> + <string name="mode_steam_repair_hint">Volta a transferir o cliente Steam na próxima vez que o Steam iniciar. Utilize se o Steam ficar preso no ecrã de carregamento. Os jogos, a sessão iniciada e as definições são mantidos.</string> + <string name="mode_steam_repair_queued">O cliente Steam será transferido novamente na próxima vez que o Steam iniciar.</string> + <string name="mode_steam_repair_button">Reparar</string> + <string name="mode_added_art">Imagens</string> + <string name="mode_sgdb_key">Chave da API do SteamGridDB</string> + <string name="mode_sgdb_key_yours">A sua chave</string> + <string name="mode_sgdb_edit">Editar…</string> + <string name="mode_added_art_hint">Preenche as imagens em falta a partir do Steam e, depois, do SteamGridDB. Os seus próprios cover.jpg, hero.jpg, logo.png ou icon.png na pasta do jogo têm prioridade.</string> + <string name="summary_remove_game">Remover %1$s</string> + <string name="mode_added_remove_confirm">Remover?</string> + <string name="games_add">Adicionar jogo</string> + <string name="games_add_title">Adicionar um jogo:</string> + <string name="games_pick_exe_title">Escolha o exe:</string> + <string name="games_add_unreachable">Esta localização não está disponível na sessão</string> + <string name="mode_added_exe_check">Verificar este exe</string> + <string name="wincomp_title">Componentes do Windows</string> + <string name="wincomp_pad_hint">LB / RB alternam entre as secções.</string> + <string name="wincomp_card_none">Nenhum</string> + <string name="wincomp_applies">DLLs do Windows que o Proton não inclui, da lista de componentes. Ative as de que este jogo precisa: vão para a pasta Windows própria do jogo, nunca para os ficheiros dele, e mantêm-se seja qual for o Proton em que é executado.</string> + <string name="wincomp_offline">Não foi possível aceder à lista de componentes. Os componentes já transferidos podem continuar a ser ativados ou desativados.</string> + <string name="wincomp_recommended">Recomendado para este jogo</string> + <string name="wincomp_checking">A verificar de que precisa este jogo…</string> + <string name="wincomp_when_online">Disponível quando houver ligação</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">A ativar %1$d componente…</item> + <item quantity="many">A ativar %1$d componentes…</item> + <item quantity="other">A ativar %1$d componentes…</item> + </plurals> + <string name="wincomp_auto_section">Ativos para este jogo</string> + <string name="wincomp_auto_steam">O Steam instala %1$s com %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">Da lista do GOG para este jogo</string> + <string name="wincomp_auto_epic">Dos pré-requisitos da Epic para este jogo</string> + <string name="wincomp_auto_amazon">Dos passos de instalação da Amazon para este jogo</string> + <string name="wincomp_steam_by_name">O Steam instala %1$s com a app %2$s, identificada pelo nome</string> + <string name="wincomp_suggestions">Também listados</string> + <string name="wincomp_suggestion_reason">Listado por %1$s; não é um componente aqui</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">O jogo inclui %1$s</string> + <string name="wincomp_found_shipped">O jogo tem %1$s (muitas vezes funciona assim)</string> + <string name="wincomp_already_here">Já está neste jogo</string> + <string name="wincomp_no_recommendation">Nada na pasta do jogo aponta para um componente.</string> + <string name="wincomp_active">Instalados para este jogo (%1$d)</string> + <string name="wincomp_all">Todos os componentes (%1$d)</string> + <string name="wincomp_installers">Requerem um instalador do Windows (%1$d)</string> + <string name="wincomp_installers_note">São programas de instalação próprios, sem nenhum pacote no interior para desmontar e ainda sem gravação do que instalam. A maioria são ambientes de execução antigos que o Mono incluído no Proton já substitui; as gravações são adicionadas à medida que são feitas.</string> + <string name="wincomp_show">Mostrar</string> + <string name="wincomp_hide">Ocultar</string> + <string name="wincomp_needs_installer">Executa o seu próprio programa de instalação (ainda sem gravação)</string> + <string name="wincomp_unsupported">Ainda não suportado aqui</string> + <string name="wincomp_loading">A carregar os componentes…</string> + <string name="wincomp_failed">Não foi possível instalar: %1$s</string> + <string name="wincomp_downloaded">Transferido</string> + <string name="wincomp_downloading">A transferir %1$s</string> + <string name="wincomp_installing">A instalar: %1$s</string> + <string name="wincomp_reverting">A desativar…</string> + <string name="wincomp_download_size">Transferência de %1$s</string> + <string name="wincomp_next_launch">Tem efeito na próxima vez que o jogo for iniciado.</string> + <string name="mode_stretch169">Esticar jogos 16:9</string> + <string name="mode_stretch169_hint">Em ecrãs mais quadrados do que 16:9, estica os jogos para preencher o ecrã em vez de mostrar barras. Aplica-se na próxima sessão.</string> + <string name="mode_audio">Áudio</string> + <string name="mode_directaudio">DirectAudio para jogos</string> + <string name="mode_directaudio_hint">Ignora o PulseAudio para reduzir a latência.</string> + <string name="mode_mic">Microfone</string> + <string name="mode_mic_hint">Para chat de voz.</string> + <string name="mode_network">Rede</string> + <string name="mode_wifi_discovery">Deteção de Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Mostrar nomes de Wi-Fi e redes próximas no Steam.</string> + <string name="mode_wifi_location_off">Os serviços de localização estão desativados.</string> + <string name="mode_wifi_permission_denied">Autorização de localização não concedida.</string> + <string name="mode_wifi_open_settings">Abrir definições</string> + <string name="mode_wifi_continue">Continuar</string> + <string name="mode_wifi_explain_title">Ativar a deteção de Wi-Fi?</string> + <string name="mode_wifi_explain_text">O Android requer a autorização de Localização para ler nomes de Wi-Fi e detetar redes próximas. O DroidDeck utiliza este acesso para mostrar essas redes no Steam. Não monitorizamos a sua localização. O acesso à Internet funciona sem esta autorização.</string> + <string name="mode_storage">Armazenamento de jogos</string> + <string name="mode_storage_auto">Automático - o cartão SD quando presente, mais as suas pastas Games</string> + <string name="mode_storage_auto_none">Automático - as suas pastas Games, mais o cartão SD quando presente (nenhum agora)</string> + <string name="mode_storage_internal">Apenas interno</string> + <string name="mode_storage_folder">Pasta: %1$s</string> + <string name="mode_second_library">Segunda biblioteca</string> + <string name="mode_storage_note">Os jogos que carregam recursos em streaming a partir do SD ou do armazenamento partilhado podem apresentar soluços.</string> + <string name="mode_storage_diagnostics">Diagnóstico de armazenamento</string> + <string name="mode_storage_diagnostics_hint">Regista os resultados de alocação e amostras de tempos de armazenamento em Partilhar registos. Pode tornar as instalações mais lentas enquanto estiver ativado. Aplica-se na próxima sessão.</string> + <string name="mode_choose_folder">Escolher uma pasta…</string> + <string name="mode_custom_res_title">Resolução personalizada</string> + <string name="mode_custom_res_text">Substitui o limite e a proporção. Um tamanho que não corresponda ao ecrã fica com barras.</string> + <string name="mode_width">Largura</string> + <string name="mode_height">Altura</string> + <string name="mode_custom_res_range">Entre 320×240 e 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d jogo</item> + <item quantity="many">%1$d jogos</item> + <item quantity="other">%1$d jogos</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Eliminar</string> + <string name="common_restore">Restaurar</string> + <string name="common_download">Transferir</string> + <string name="common_delete_named">Eliminar %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Controlador de execução</string> + <string name="comp_runtime_driver_hint">Utilizado pelo Steam, pelos jogos e pelo ambiente de trabalho. Aplica-se na próxima sessão.</string> + <string name="comp_import_turnip">Importar zip do Turnip…</string> + <string name="comp_display_driver">Controlador de ecrã</string> + <string name="comp_display_driver_hint">Desenha os fotogramas no ecrã em ambos os modos. Reinicie a app para aplicar.</string> + <string name="comp_import_adrenotools">Importar um zip do AdrenoTools…</string> + <string name="comp_never">nunca</string> + <string name="comp_nightlies_checked">Última verificação das Nightlies: %1$s</string> + <string name="comp_title">Componentes</string> + <string name="comp_about">Acerca dos Componentes</string> + <string name="comp_check_drivers">Procurar novos controladores</string> + <string name="comp_check_nightlies">Procurar novos pacotes nas Nightlies</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">O Proton escolhido aqui executa todos os jogos que não escolheram o seu próprio no Steam, e uma alteração feita no Steam também aparece aqui. O Steam substitui o Proton da Valve quando o atualiza; os originais são mantidos por versão.</string> + <string name="comp_scope">Configuração</string> + <string name="comp_profile_configure">Configurar perfil</string> + <string name="comp_profile">Perfil</string> + <string name="comp_scope_general">Perfil padrão</string> + <string name="comp_scope_general_detail">Utilizado automaticamente pelos jogos sem substituições.</string> + <string name="comp_profile_game_detail">Definições guardadas, utilizadas automaticamente quando %1$s é iniciado.</string> + <string name="comp_game_hint">Escolha apenas as definições de que este jogo precisa. Tudo o resto continua a utilizar o Perfil padrão.</string> + <string name="comp_game_fex">Predefinição do FEX</string> + <string name="comp_game_fex_inherited">A utilizar a predefinição do Perfil padrão.</string> + <string name="comp_game_fex_override">Predefinição personalizada guardada para este jogo.</string> + <string name="comp_game_fex_custom">Variáveis do FEX personalizadas</string> + <string name="comp_game_use_general">Utilizar padrão</string> + <string name="comp_game_compatibility">Compatibilidade do jogo</string> + <string name="comp_game_environment_hint">Opções de ambiente do Proton, DXVK, VKD3D e sincronização para este jogo.</string> + <string name="comp_game_proton_inherited">A utilizar o Proton do Perfil padrão.</string> + <string name="comp_game_proton_override">Proton personalizado guardado para este jogo através do mapeamento de compatibilidade do Steam.</string> + <string name="comp_no_proton_short">Sem Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Utiliza o pacote do Perfil padrão de %1$s, a menos que este jogo selecione outro pacote.</string> + <string name="comp_game_component_general">Utiliza o pacote de componentes do Perfil padrão.</string> + <string name="comp_game_component_override">Utiliza %1$s apenas neste jogo.</string> + <string name="comp_game_runtime_options">Opções de execução</string> + <string name="comp_game_environment_other_hint">Outras opções de ambiente por jogo do Proton, DXVK, VKD3D-Proton e sincronização.</string> + <string name="comp_game_saved_next">O perfil de %1$s foi guardado para o próximo arranque do jogo.</string> + <string name="game_no_steam_title">Iniciar sem o Steam</string> + <string name="game_no_steam_detail">Abre no Proton/FEX sem o cliente do Steam; as funcionalidades do Steam ficam desligadas.</string> + <string name="game_no_steam_on">Ativado</string> + <string name="game_steam_with">Inicia com o Steam</string> + <string name="game_steam_without">Inicia sem o Steam</string> + <string name="game_settings_card">Definições</string> + <string name="game_settings_menu_title">Definições de %1$s</string> + <string name="game_settings_default">Predefinição</string> + <string name="game_settings_default_detail">Repõe tudo o que foi alterado neste jogo nas definições da aplicação.</string> + <string name="game_sync_custom">Variáveis de sincronização personalizadas</string> + <string name="comp_game_proton_live">A escolha de Proton de %1$s foi guardada e já está disponível no Steam.</string> + <string name="comp_game_proton_next">A escolha de Proton de %1$s foi guardada. Reinicie o Steam antes de iniciar o jogo.</string> + <string name="comp_game_proton_not_runnable">%1$s não pode utilizar o Proton selecionado neste dispositivo.</string> + <string name="comp_game_load_failed">Não foi possível carregar o perfil de %1$s: %2$s</string> + <string name="comp_game_save_failed">Não foi possível guardar o perfil do jogo: %1$s</string> + <string name="comp_game_reset">Repor perfil do jogo</string> + <string name="comp_game_reset_title">Repor o perfil de %1$s?</string> + <string name="comp_game_reset_body">Remover as substituições de Proton, FEX, pacote de componentes, ambiente, filtragem de texturas e componentes do Windows deste jogo? Passará a utilizar o Perfil padrão.</string> + <string name="comp_game_reset_done">%1$s utiliza agora o Perfil padrão.</string> + <string name="comp_game_reset_failed">Não foi possível repor totalmente o perfil do jogo: %1$s</string> + <string name="comp_default_live">%1$s executa agora todos os jogos que não escolheram o seu próprio Proton no Steam.</string> + <string name="comp_default_next">A partir do próximo arranque do Steam, %1$s vai executar todos os jogos que não escolheram o seu próprio Proton.</string> + <string name="comp_default_not_runnable">%1$s não consegue iniciar jogos aqui, por isso não pode ser o padrão.</string> + <string name="comp_default_failed">Não foi possível guardar o Proton padrão: %1$s</string> + <string name="comp_swapped">%1$s · %2$d trocados</string> + <string name="comp_all_original">%1$s · todos originais</string> + <string name="comp_game_running_suffix">%1$s · jogo em execução</string> + <string name="comp_esync_pack">%1$s · pacote droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · ainda sem pacote droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync integrado, não precisa de pacote</string> + <string name="comp_gpu_drivers">Controladores da GPU</string> + <string name="comp_reapplied">%1$s · reaplicado no arranque %2$s</string> + <string name="comp_next_queued">Seguinte: %1$s · depois de o jogo fechar</string> + <string name="comp_in_use">%1$s em utilização: %2$s</string> + <string name="comp_waits">Aguarda até o jogo fechar</string> + <string name="comp_applies_next_game">Aplica-se na próxima vez que um jogo iniciar</string> + <string name="comp_import_zip">Importar .zip</string> + <string name="comp_reading">A ler os Protons…</string> + <string name="comp_no_proton">Ainda não há nenhum Proton instalado. Inicie o Steam uma vez para transferir o respetivo Proton ARM64, ou adicione o GE-Proton, o CachyOS ou o DroidDeck-Proton a partir da Configuração.</string> + <string name="comp_original">Original · %1$s</string> + <string name="comp_this_build">%1$s · esta versão</string> + <string name="comp_earlier_build">%1$s · versão anterior</string> + <string name="comp_installed_count">Instalados · %1$d</string> + <string name="comp_nothing_stored">Ainda nada guardado para %1$s. Os ficheiros deste Proton são guardados como o original.</string> + <string name="comp_waits_long">Há um jogo em execução com este Proton, por isso isto aguarda até que feche.</string> + <string name="comp_applies_long">Aplica-se na próxima vez que um jogo iniciar.</string> + <string name="comp_swap_title">Trocar %1$s?</string> + <string name="comp_swap_body">Colocar %1$s em %2$s? Os ficheiros originais ficam guardados. %3$s</string> + <string name="comp_restore_title">Restaurar %1$s?</string> + <string name="comp_restore_body">Repor o original de %1$s em %2$s? %3$s</string> + <string name="comp_delete_package_body">Remove o pacote da app. Pode transferi-lo novamente.</string> + <string name="comp_delete_original_title">Eliminar este original?</string> + <string name="comp_delete_original_body">Este original de %1$s é de uma versão anterior de %2$s. O original da versão atual é sempre mantido.</string> + <string name="comp_nightlies_count">Nas Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Atualize para listar os pacotes nas Nightlies.</string> + <string name="comp_nothing_new">Nada de novo desde a última verificação.</string> + <string name="comp_import_wcp">Importar .wcp</string> + <string name="comp_restore_original">Restaurar o original deste Proton</string> + <string name="comp_restore_original_body">Repor o %2$s original de %1$s?</string> + <string name="comp_swap">Trocar</string> + <string name="comp_about_text">FEX, DXVK e VKD3D-Proton para cada Proton com que o Steam executa jogos.\n\nSelecione uma linha instalada para a trocar. Aplica-se na próxima vez que um jogo iniciar, ou depois de o jogo em execução fechar.\n\nAs suas escolhas são verificadas novamente antes de cada arranque e repostas se algo as tiver alterado. Os ficheiros originais de cada Proton são mantidos, por isso as atualizações do Steam nunca os perdem.</string> + <string name="comp_tag_original">Original</string> + <string name="comp_tag_in_use">Em utilização</string> + <string name="comp_tag_new">Novo</string> + <string name="comp_tag_stored">Guardado</string> + <string name="perf_title">Desempenho</string> + <string name="perf_lede">Núcleos da CPU, correções da sessão e nome do anfitrião. Aplica-se na próxima sessão.</string> + <string name="perf_client_cores_group">Núcleos do cliente Steam</string> + <string name="perf_override">Substituir a escolha de núcleos do Steam</string> + <string name="perf_override_hint">Fixa o Steam, o respetivo auxiliar de interface e o gamescope nos núcleos abaixo.</string> + <string name="perf_client_cores">Núcleos do cliente</string> + <string name="perf_client_cores_on">Núcleos para o Steam.</string> + <string name="perf_client_cores_off">Ative a substituição para escolher.</string> + <string name="perf_game_cores_group">Núcleos dos jogos</string> + <string name="perf_game_cores">Núcleos dos jogos</string> + <string name="perf_game_cores_hint">Núcleos para os jogos. Com todos selecionados, o Android distribui livremente.</string> + <string name="perf_client_ui">Interface do cliente</string> + <string name="perf_glthread">GL multithread</string> + <string name="perf_glthread_hint">Pode fazer os menus do Steam responder mais depressa.</string> + <string name="perf_zink">Zink: descritores diferidos</string> + <string name="perf_zink_hint">Recomendado para controladores sem buffers de descritores.</string> + <string name="perf_noglerror">Ignorar verificações de erros GL</string> + <string name="perf_noglerror_hint">Desativa a validação GL em cada chamada.</string> + <string name="perf_gsrealtime">gamescope: fila de GPU em tempo real</string> + <string name="perf_gsrealtime_hint">Dá prioridade ao trabalho de GPU do compositor. Pode suavizar o ritmo de fotogramas, com algum custo para os jogos.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Manter a GPU na frequência máxima</string> + <string name="perf_gpuclock_hint">Apenas Adreno. Menos soluços, mais consumo de bateria e mais calor.</string> + <string name="perf_fixes">Correções da sessão</string> + <string name="perf_sysmem">Turnip: renderização em sysmem</string> + <string name="perf_sysmem_hint">Mais rápido para o Steam e a maioria dos jogos. Obrigatório no Adreno 710/720/722.</string> + <string name="perf_xalia">Ignorar o assistente xalia do Steam</string> + <string name="perf_fastsync">droiddeck-ntsync (experimental)</string> + <string name="perf_fastsync_hint">Um substituto em espaço de utilizador para o controlador ntsync do Linux, para testes. Enquanto estiver ativado, o Proton utiliza-o em vez do droiddeck-esync e do droiddeck-fsync. Funciona com o Proton Experimental ARM64, o GE-Proton e o proton-cachyos. Aplica-se na próxima sessão.</string> + <string name="perf_esync">droiddeck-esync</string> + <string name="perf_fsync">droiddeck-fsync primeiro</string> + <string name="perf_fsync_hint">Executa o fsync do próprio Proton sobre os ficheiros originais do Proton, com o futex_waitv fornecido em espaço de utilizador, por isso não precisa de pacote e continua a funcionar assim que o Steam atualiza o Proton. Enquanto estiver ativado, os jogos utilizam-no antes do droiddeck-esync, exceto os poucos que o Proton mantém fora do fsync. Aplica-se na próxima sessão.</string> + <string name="perf_esync_hint">Os threads Windows dos jogos esperam uns pelos outros através de eventfd e memória partilhada, em vez de idas e voltas pelo wineserver. Utiliza um pacote droiddeck-esync feito para essa versão exata do Proton; os pacotes são obtidos automaticamente. Até existir um para uma nova versão do Proton, o droiddeck-fsync assume o seu lugar. Aplica-se na próxima sessão.</string> + <string name="perf_xalia_hint">Desativa o assistente de navegação por comando do Proton, que gasta CPU em todos os jogos.</string> + <string name="perf_seccomp">Executar o proot sem seccomp</string> + <string name="perf_seccomp_hint">Pode corrigir erros de chamadas de sistema em falta em alguns kernels. Pode reduzir o desempenho.</string> + <string name="perf_fastpath">Caminho rápido do proot</string> + <string name="perf_fastpath_needs_seccomp">Requer o filtro seccomp do proot.</string> + <string name="perf_fastpath_hint">Pesquisas de ficheiros mais rápidas e menos soluços. Desative se um programa não encontrar os seus ficheiros.</string> + <string name="perf_identity">Identidade da sessão</string> + <string name="perf_hostname">Nome do anfitrião</string> + <string name="perf_hostname_hint">O nome com que o Steam vê este dispositivo. Em branco, repõe %1$s.</string> + <string name="perf_hostname_invalid">Apenas letras, algarismos e hífenes interiores, até 63 carateres.</string> + <string name="perf_phantom_warning">O Android está configurado para terminar esta sessão</string> + <string name="driver_installed">Instalado</string> + <string name="driver_available">Disponível para transferir</string> + <string name="driver_nothing_new">Nada de novo desde a última verificação.</string> + <string name="driver_restore_builtin">Restaurar controladores integrados</string> + <string name="driver_delete_builtin">Integrado na app: isto remove os ficheiros extraídos e oculta-o. Restaurar controladores integrados volta a mostrá-lo.</string> + <string name="driver_delete_bundle">Metade de um pacote Android + Linux: as duas metades são removidas. Um controlador em utilização volta ao padrão.</string> + <string name="driver_delete_plain">Os ficheiros são removidos da app.</string> + <string name="driver_delete_in_use">Os ficheiros são removidos. Como está em utilização, o padrão passa a ser utilizado.</string> + <string name="drawer_page_display">Ecrã</string> + <string name="drawer_page_effects">Efeitos</string> + <string name="drawer_page_controls">Controlos</string> + <string name="drawer_page_components">Componentes</string> + <string name="drawer_page_controller">Comando</string> + <string name="drawer_page_settings">Definições</string> + <string name="drawer_page_desc">Página %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Ambiente de trabalho</string> + <string name="drawer_steam_menu">Menu do Steam</string> + <string name="drawer_quick_access">Acesso rápido</string> + <string name="drawer_open_qam">Abrir o Menu de acesso rápido</string> + <string name="drawer_prev_page">Página anterior</string> + <string name="drawer_next_page">Página seguinte</string> + <string name="drawer_hud">HUD de desempenho</string> + <string name="drawer_scaling">Modo de escala</string> + <string name="drawer_scaling_sharpness">Nitidez da escala</string> + <string name="drawer_effects">Efeitos de ecrã</string> + <string name="drawer_effects_hint">Em tempo real. Gasta algum tempo de GPU enquanto houver um efeito ativo.</string> + <string name="drawer_look">Predefinições</string> + <string name="drawer_look_custom">Personalizado</string> + <string name="drawer_effects_advanced">Avançado</string> + <string name="widgets_expanded">Expandido</string> + <string name="widgets_collapsed">Recolhido</string> + <string name="drawer_cas">Nitidez (CAS)</string> + <string name="drawer_cas_level">Nível de nitidez</string> + <string name="drawer_fake_hdr">HDR simulado</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Entrar no SteamVR</string> + <string name="steamvr_checking">A verificar o SteamVR…</string> + <string name="drawer_deband">Redução de bandas</string> + <string name="drawer_deband_strength">Intensidade da redução de bandas</string> + <string name="drawer_brightness">Brilho</string> + <string name="drawer_contrast">Contraste</string> + <string name="drawer_gamma">Gama</string> + <string name="drawer_saturation">Saturação</string> + <string name="drawer_fxaa">FXAA (suavização de arestas)</string> + <string name="drawer_toon">Contornos de desenho animado</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Filtragem de texturas</string> + <string name="drawer_texture_hint">Jogos DirectX 9–11, a partir do próximo arranque.</string> + <string name="drawer_anisotropy">Filtragem anisotrópica</string> + <string name="drawer_texture_sharpness">Nitidez das texturas</string> + <string name="drawer_texture_sharpness_note">Um desvio de mip negativo: texturas mais nítidas, algum cintilar. Automático acompanha o quanto a sessão é ampliada para o ecrã.</string> + <string name="drawer_touch_auto">Automático (%1$s)</string> + <string name="drawer_keyboard">Teclado</string> + <string name="drawer_latency">Latência</string> + <string name="drawer_low_latency_controller">Comando de baixa latência</string> + <string name="drawer_low_latency_controller_hint">O comando comunica a 1000 Hz em vez de 250 Hz. Um pouco mais de CPU.</string> + <string name="drawer_low_latency_touch">Toque de baixa latência</string> + <string name="drawer_low_latency_touch_hint">Os toques ignoram o agrupamento de fotogramas; os controlos táteis do Steam passam a 1000 Hz. Um pouco mais de CPU.</string> + <string name="drawer_pc_keyboard">Teclado de PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Segundo ecrã</string> + <string name="drawer_second_screen_mode">Modo</string> + <string name="drawer_second_screen_shows">Mostra</string> + <string name="drawer_android_apps">Apps Android</string> + <string name="drawer_launch_app">Iniciar uma app</string> + <string name="common_hide">Ocultar</string> + <string name="common_show">Mostrar</string> + <string name="drawer_no_apps">Nenhuma app para iniciar</string> + <string name="drawer_session_behavior">Comportamento da sessão</string> + <string name="drawer_suspend_hint">Aplica-se agora e às próximas sessões neste modo.</string> + <string name="drawer_next_session">Próxima sessão</string> + <string name="drawer_support">Suporte</string> + <string name="drawer_logs">Registos da sessão</string> + <string name="drawer_logs_hint">Para anexar a um relatório de erros</string> + <string name="drawer_share_logs">Partilhar registos</string> + <string name="drawer_background">Segundo plano</string> + <string name="drawer_stop">Terminar</string> + <string name="drawer_stop_title">Terminar sessão?</string> + <string name="drawer_running_now">Em execução</string> + <string name="drawer_no_game">Nenhum jogo em execução num Proton</string> + <string name="drawer_selected_profile">Perfil do jogo</string> + <string name="drawer_selected_profile_none">Os detalhes do perfil ainda não estão disponíveis.</string> + <string name="drawer_profile_refresh_failed_initial">Não foi possível carregar os perfis dos jogos. A tentar novamente de forma automática.</string> + <string name="drawer_profile_refresh_failed_stale">Não foi possível atualizar os perfis dos jogos. A mostrar os últimos dados disponíveis; a tentar novamente de forma automática.</string> + <string name="drawer_profile_inspect_hint">Ver e editar as definições guardadas que são utilizadas no próximo arranque.</string> + <string name="drawer_profile_default">A utilizar o Perfil padrão</string> + <string name="drawer_profile_custom">Perfil personalizado</string> + <string name="drawer_component_inherited">A utilizar %1$s do Perfil padrão.</string> + <string name="drawer_game_components_note">As alterações são guardadas no perfil de %1$s e aplicam-se na próxima vez que o jogo for iniciado.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d substituição do jogo</item> + <item quantity="many">%1$d substituições do jogo</item> + <item quantity="other">%1$d substituições do jogo</item> + </plurals> + <string name="drawer_no_proton">Ainda não há nenhum Proton instalado.</string> + <string name="drawer_game_running">jogo em execução</string> + <string name="drawer_reapplied">reaplicado no arranque %1$s</string> + <string name="drawer_original">Original</string> + <string name="drawer_components_note">Importe e elimine na página Componentes.</string> + <string name="setup_check_done">Concluído</string> + <string name="setup_check_warn">Requer atenção</string> + <string name="setup_check_busy">A processar</string> + <string name="setup_limit_adb_failed">Verifique o endereço IP e a porta da Depuração sem fios, ou sincronize novamente se o Android tiver removido este dispositivo.</string> + <string name="setup_install">Instalar</string> + <string name="setup_manage">Gerir</string> + <string name="setup_tab_overview">Vista geral</string> + <string name="setup_tab_controller">Comando</string> + <string name="setup_tab_session">Sessão</string> + <string name="setup_tab_launcher">Iniciador</string> + <string name="setup_title">Configuração</string> + <string name="setup_all_set">● Tudo pronto</string> + <string name="setup_n_ready">%1$d de %2$d prontos</string> + <string name="setup_system_check">Verificação do sistema</string> + <string name="setup_gpu_supported">Dispositivo suportado</string> + <string name="setup_gpu_untested">GPU não testada</string> + <string name="setup_gpu_unsupported">GPU não suportada</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">O Steam requer um controlador Adreno; %1$s pode mostrar um ecrã preto</string> + <string name="setup_runtime">Ambiente de execução Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Não instalado · cerca de 3 GB, instalado ao tocar em Jogar pela primeira vez</string> + <string name="setup_installed">Instalado</string> + <string name="setup_runtime_update">%1$s · atualização disponível</string> + <string name="setup_runtime_current">%1$s · atualizado</string> + <string name="setup_limit">Limite de processos secundários</string> + <string name="setup_limit_on">Ativado · o Android pode fechar o Steam. Desativá-lo demora um minuto.</string> + <string name="setup_limit_unset">Não definido · o Android pode fechar o Steam. Desativá-lo demora um minuto.</string> + <string name="setup_limit_unknown">Não foi possível verificar · desativá-lo demora um minuto.</string> + <string name="setup_fix_it">Corrigir</string> + <string name="setup_details">Detalhes</string> + <string name="setup_dev_options">Opções de programador</string> + <string name="setup_use_wireless">Utilizar a Depuração sem fios</string> + <string name="setup_check_again">Verificar novamente</string> + <string name="setup_limit_turn_on">Ativar limite</string> + <string name="setup_account">Conta Steam</string> + <string name="setup_signed_in_offline">Sessão iniciada como %1$s · modo offline</string> + <string name="setup_signed_in">Sessão iniciada como %1$s</string> + <string name="setup_sign_in">Prima Jogar e inicie sessão no Steam</string> + <string name="setup_tools">Ferramentas</string> + <string name="setup_controller">Comando</string> + <string name="setup_controller_unavailable">As definições do comando não estão disponíveis.</string> + <string name="setup_session">Sessão</string> + <string name="setup_logs">Registos da sessão</string> + <string name="setup_logs_hint">Guardados após cada sessão</string> + <string name="setup_agent_commands">Ferramentas de depuração</string> + <string name="setup_latest_logs">Registos da última sessão</string> + <string name="setup_saved_logs">Registos de sessões guardados</string> + <string name="setup_saved_logs_hint">Mantém os %1$d mais recentes</string> + <string name="setup_clear_logs">Limpar registos</string> + <string name="setup_offline">Modo offline</string> + <string name="setup_sign_in_first">Inicie sessão no Steam primeiro</string> + <string name="setup_launcher">Iniciador</string> + <string name="setup_language">Idioma</string> + <string name="setup_language_hint">O Steam também o utiliza, a partir do próximo arranque.</string> + <string name="setup_language_system">Predefinição do sistema (%1$s)</string> + <string name="setup_language_system_short">Predefinição do sistema</string> + <string name="setup_app_scale">Escala da app</string> + <string name="setup_app_scale_hint">Texto e controlos do DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (padrão)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Aspeto do iniciador</string> + <string name="setup_home">Utilizar como página inicial</string> + <string name="setup_home_on">O DroidDeck pode ser a app de página inicial</string> + <string name="setup_home_off">O DroidDeck nunca é proposto como app de página inicial</string> + <string name="setup_orientation">Orientação</string> + <string name="setup_orientation_auto">Horizontal automática</string> + <string name="setup_orientation_landscape">Horizontal</string> + <string name="setup_orientation_reverse">Horizontal invertida</string> + <string name="setup_fullscreen">Ecrã inteiro</string> + <string name="setup_fullscreen_on">Oculta as barras de estado e de navegação do Android</string> + <string name="setup_fullscreen_off">Mostra as barras de estado e de navegação do Android</string> + <string name="setup_default_home">App de página inicial predefinida</string> + <string name="setup_choose_home">Escolher uma app de página inicial</string> + <string name="setup_choose">Escolher</string> + <string name="setup_linux_apps">Apps Linux (beta)</string> + <string name="setup_tool_files">Ficheiros</string> + <string name="setup_tool_files_hint">Explorar e gerir ficheiros</string> + <string name="setup_tool_protons">Versões do Proton</string> + <string name="setup_tool_protons_hint">Instalar versões ARM64 do Proton</string> + <string name="setup_tool_performance">Desempenho</string> + <string name="setup_tool_performance_hint">Atribuição de núcleos da CPU</string> + <string name="setup_tool_roms">Pasta de ROMs</string> + <string name="setup_tool_roms_hint">Onde são guardados os jogos de emuladores</string> + <string name="setup_card_components">Componentes</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Controlos</string> + <string name="setup_card_controls_hint">Mapeamento de botões</string> + <string name="store_tab_discover">Descobrir</string> + <string name="store_tab_search">Pesquisar</string> + <string name="store_tab_installed">Instaladas</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Loja</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak pronto</string> + <string name="store_needs_runtime">Instale primeiro o ambiente de execução Linux na Configuração.</string> + <string name="store_setup_title">Configurar o Flatpak</string> + <string name="store_setup_text">Adiciona o Flatpak e liga-o ao Flathub (cerca de 20 MB). A primeira app também transfere o respetivo ambiente de execução.</string> + <string name="store_setting_up">A configurar…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Atualizações</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">A iniciar…</string> + <string name="store_categories">Categorias</string> + <string name="store_unreachable">Não foi possível aceder ao Flathub. Verifique a sua ligação e tente novamente.</string> + <string name="store_try_again">Tentar novamente</string> + <string name="store_search_label">Pesquisar no Flathub</string> + <string name="store_search_placeholder">Firefox, jogos, emuladores…</string> + <string name="store_search">Pesquisar</string> + <string name="store_all">Todas</string> + <string name="store_searching">A pesquisar…</string> + <string name="store_search_hint">Pesquise por nome ou escolha uma categoria. Só são listadas apps ARM64.</string> + <string name="store_no_results">Nenhuma app ARM64 no Flathub corresponde a essa pesquisa.</string> + <string name="store_results">Resultados</string> + <string name="store_check_updates">Procurar atualizações</string> + <string name="store_update_all">Atualizar todas (%1$d)</string> + <string name="store_all_current">● Tudo atualizado</string> + <string name="store_no_apps">Ainda não há apps. Encontre algumas em Descobrir ou Pesquisar.</string> + <string name="store_setup_first_note">Configure o Flatpak para instalar apps.</string> + <string name="store_update_available_prefix">Atualização disponível · %1$s</string> + <string name="store_open">Abrir</string> + <string name="store_details">Detalhes</string> + <string name="store_remove">Remover</string> + <string name="store_press_again">Prima novamente para remover</string> + <string name="store_installing">A instalar…</string> + <string name="store_install">Instalar</string> + <string name="store_setup_first">Configure primeiro o Flatpak</string> + <string name="store_download_size">Transferência de %1$s</string> + <string name="store_installed_chip">● Instalada</string> + <string name="store_details_failed">Não foi possível carregar a página desta app no Flathub.</string> + <string name="store_loading">A carregar do Flathub…</string> + <string name="store_no_arm">Não há versão ARM64 no Flathub, por isso não pode ser instalada aqui.</string> + <string name="store_screenshots">Capturas de ecrã</string> + <string name="store_about">Acerca de</string> + <string name="store_app_id">ID da app</string> + <string name="store_license">Licença</string> + <string name="store_runtime">Ambiente de execução</string> + <string name="store_installed_size">Tamanho instalado</string> + <string name="store_installed_size_value">%1$s (mais o ambiente de execução partilhado)</string> + <string name="store_website">Site</string> + <string name="store_verified">Verificado</string> + <string name="upd_title">Atualizações</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Verificado %1$s</string> + <string name="upd_not_checked">Ainda não verificado</string> + <string name="upd_perm_title">Permitir que o DroidDeck se atualize</string> + <string name="upd_perm_text">No ecrã seguinte, ative Permitir desta fonte e depois volte. A atualização continua sozinha.</string> + <string name="upd_open_settings">Abrir definições</string> + <string name="upd_not_now">Agora não</string> + <string name="upd_signed_status">Assinatura diferente</string> + <string name="upd_signed_headline">Não é possível atualizar diretamente</string> + <string name="upd_signed_detail">Esta cópia não está assinada com a chave de lançamento do DroidDeck, por isso as atualizações não podem ser instaladas por cima dela. Desinstale-a para mudar.</string> + <string name="upd_available">Atualização disponível</string> + <string name="upd_blocked_status">Não é possível instalar</string> + <string name="upd_switch">Pronto para mudar</string> + <string name="upd_ahead_status">À frente do Estável</string> + <string name="upd_ahead_headline">Está à frente do Estável</string> + <string name="upd_ahead_detail">Esta versão é mais recente do que a última Estável. Passará para o Estável quando sair a próxima versão.</string> + <string name="upd_gone_status">Teste terminado</string> + <string name="upd_gone_headline">Este teste terminou</string> + <string name="upd_gone_detail">A correção foi integrada ou abandonada. Siga a Antevisão para obter as correções mais recentes.</string> + <string name="upd_current_status">Atualizado</string> + <string name="upd_current_headline">Já tem a versão mais recente: %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Atualizar%1$s</string> + <string name="upd_install_button">Instalar%1$s</string> + <string name="upd_install_anyway">Instalar a versão Estável %1$s mesmo assim</string> + <string name="upd_follow_preview">Seguir a Antevisão</string> + <string name="upd_stop_session">Termine a sessão em execução para atualizar.</string> + <string name="upd_less">Menos</string> + <string name="upd_more">Mais</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Nova versão de Antevisão</string> + <string name="upd_new_test">Versão de teste do PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">CANAL DE ATUALIZAÇÃO</string> + <string name="upd_stable">Estável</string> + <string name="upd_stable_hint">Versões testadas, para a maioria das pessoas</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Antevisão</string> + <string name="upd_preview_hint">As correções mais recentes, antes do Estável</string> + <string name="upd_preview_current">Atualizado</string> + <string name="upd_tests">Versões de teste</string> + <string name="upd_tests_hint">Experimente uma correção antes de ser lançada</string> + <string name="upd_tests_none">Nenhuma de momento</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Não compilada para esta cópia do DroidDeck</string> + <string name="upd_updated">Atualizado %1$s</string> + <string name="upd_test_name">o teste do PR #%1$d</string> + <string name="upd_while_ago">há algum tempo</string> + <string name="upd_just_now">agora mesmo</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d para experimentar</item> + <item quantity="many">%1$d para experimentar</item> + <item quantity="other">%1$d para experimentar</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Alterações desde a sua versão · %1$d versão em atraso</item> + <item quantity="many">Alterações desde a sua versão · %1$d versões em atraso</item> + <item quantity="other">Alterações desde a sua versão · %1$d versões em atraso</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Alterações recentes · %1$d versão</item> + <item quantity="many">Alterações recentes · %1$d versões</item> + <item quantity="other">Alterações recentes · %1$d versões</item> + </plurals> + <string name="gate_title">Uma definição do Android a alterar</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">O Android termina as apps que iniciam muitos processos em segundo plano, e o Steam inicia dezenas. Enquanto isto não for alterado, os jogos fecham sem qualquer erro.</string> + <string name="gate_fix_for_me">Corrigir por mim</string> + <string name="gate_toggle_steps">Ative “Desativar restrições de processos secundários” e depois volte. Mantenha as Opções de programador ativadas, ou o interruptor volta a desligar-se.</string> + <string name="gate_open_dev">Abrir Opções de programador</string> + <string name="gate_no_toggle">Esta versão do Android não tem um interruptor para isto, por isso o DroidDeck altera-o através da Depuração sem fios. Demora cerca de um minuto e não é preciso computador.</string> + <string name="gate_needs_wifi">A Depuração sem fios requer Wi-Fi. Qualquer rede serve; não precisa de Internet.</string> + <string name="gate_needs_notifications">O código de sincronização é introduzido numa notificação. Permita as notificações do DroidDeck ou utilize Outras formas.</string> + <string name="gate_allow_notifications">Permitir notificações</string> + <string name="gate_step1">Abra Definições → Opções de programador → Depuração sem fios e ative-a</string> + <string name="gate_step2">Toque em “Sincronizar dispositivo com código de sincronização”</string> + <string name="gate_step3">Escreva o código na notificação do DroidDeck</string> + <string name="gate_waiting">A aguardar a janela de sincronização…</string> + <string name="gate_code_needed">Janela encontrada. Introduza o código dela na notificação.</string> + <string name="gate_status">Estado</string> + <string name="gate_polling">A verificar a cada 2 segundos. Esta página fecha-se quando estiver desativado.</string> + <string name="gate_other_ways">Outras formas</string> + <string name="gate_other_toggle">Depuração sem fios, endereço manual, ADB num computador</string> + <string name="gate_other_no_toggle">Endereço manual, ADB num computador, Opções de programador</string> + <string name="gate_use_wireless_instead">Utilizar antes a Depuração sem fios</string> + <string name="gate_some_roms">Algumas ROMs adicionam o interruptor mesmo assim. Procure “processos secundários” nas Opções de programador.</string> + <string name="gate_manual_hint">Se a notificação não funcionar, introduza manualmente o endereço e o código da janela.</string> + <string name="gate_enter_manually">Introduzir endereço manualmente</string> + <string name="gate_from_computer">A partir de um computador com ADB:</string> + <string name="gate_copy_command">Copiar comando</string> + <string name="gate_choose_display">Escolha em que ecrã abrir as Definições do Android.</string> + <string name="gate_main_screen">Ecrã principal</string> + <string name="wadb_finding_port">Sincronizado. A procurar a porta da Depuração sem fios…</string> + <string name="wadb_enter_port">Sincronizado. Introduza a porta indicada nas Definições.</string> + <string name="wadb_applying">Dispositivo encontrado. A aplicar a definição…</string> + <string name="wadb_apply_failed">Não foi possível aplicar automaticamente. Verifique o endereço abaixo e tente novamente. %1$s</string> + <string name="wadb_title_wireless">Depuração sem fios</string> + <string name="wadb_title_done">Limite de processos secundários atualizado</string> + <string name="wadb_title">Alterar o limite de processos secundários</string> + <string name="wadb_lede_compact0">Se a opção não existir, sincronize através da Depuração sem fios.</string> + <string name="wadb_lede_compact1">Sincronizado. Verifique o endereço IP e a porta na Depuração sem fios.</string> + <string name="wadb_lede_done">O limite de processos secundários foi atualizado.</string> + <string name="wadb_lede0">Utilize o passo 2 se as Opções de programador não tiverem a definição de processos secundários. Abra Opções de programador → Depuração sem fios → Sincronizar dispositivo com código de sincronização.</string> + <string name="wadb_lede1">Sincronizado. Utilize o endereço abaixo ou atualize-o em Depuração sem fios → Endereço IP e porta.</string> + <string name="wadb_lede_done_long">O limite de processos secundários foi atualizado através da Depuração sem fios.</string> + <string name="wadb_confirmed_on">O Android confirmou que o limite está ativado.</string> + <string name="wadb_confirmed_off">O Android confirmou que o limite está desativado.</string> + <string name="wadb_pair_group">2 · Sincronizar a Depuração sem fios</string> + <string name="wadb_pair_address">Endereço IP e porta da janela de sincronização</string> + <string name="wadb_pin">Código de sincronização (PIN)</string> + <string name="wadb_pin_placeholder">6 dígitos</string> + <string name="wadb_pair">Sincronizar</string> + <string name="wadb_apply_group">2 · Aplicar através da Depuração sem fios</string> + <string name="wadb_connect_address">Endereço IP e porta de ligação</string> + <string name="wadb_pair_again">Sincronizar novamente</string> + <string name="wadb_turn_off">Desativar limite</string> + <string name="wadb_other_ways">Outras formas de o alterar</string> + <string name="wadb_dev_try_first">1 · Opções de programador (tente primeiro)</string> + <string name="wadb_restrict_on">Desative “Desativar restrições de processos secundários”.</string> + <string name="wadb_restrict_off">Ative “Desativar restrições de processos secundários”.</string> + <string name="wadb_computer_last">3 · ADB num computador (último recurso)</string> + <string name="wadb_only_if">Apenas se a Depuração sem fios não estiver disponível.</string> + <string name="wadb_computer_group">3 · ADB num computador (último recurso)</string> + <string name="ctrl_osc_hint">Quando os controlos táteis aparecem numa sessão</string> + <string name="ctrl_color">Cor</string> + <string name="ctrl_color_hint">Tonalidade dos botões no ecrã</string> + <string name="ctrl_custom">Personalizada</string> + <string name="ctrl_opacity">Opacidade</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Tamanho dos botões</string> + <string name="ctrl_size_hint" formatted="false">O tamanho padrão é 100%</string> + <string name="ctrl_stick_click">Clique do analógico</string> + <string name="ctrl_stick_click_hint">Toque duas vezes num analógico e mantenha para L3 ou R3</string> + <string name="ctrl_adaptive">Analógicos adaptáveis</string> + <string name="ctrl_rumble">Vibração do jogo</string> + <string name="ctrl_steam_button">Botão Steam</string> + <string name="ctrl_qam_button">Botão QAM</string> + <string name="ctrl_keyboard_button">Botão do teclado</string> + <string name="ctrl_select_steam">Premir Select para abrir o menu do Steam</string> + <string name="ctrl_select_steam_hint">Em vez de View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con como comandos de RV</string> + <string name="ctrl_joycon_vr_hint">Enquanto o SteamVR está a correr, cada Joy-Con torna-se uma mão. Aponte-o para a frente e mantenha Home ou Capture premido para o recentrar.</string> + <string name="setup_animations">Animações</string> + <string name="ctrl_adaptive_hint">Os analógicos aparecem onde tocar e ocultam-se ao soltar</string> + <string name="ctrl_layout">Esquema</string> + <string name="ctrl_layout_custom">Posições personalizadas guardadas</string> + <string name="ctrl_layout_default">Ajustado a este ecrã</string> + <string name="ctrl_edit">Editar</string> + <string name="ctrl_reset">Repor</string> + <string name="ctrl_mapping">Mapeamento de botões</string> + <string name="ctrl_mapping_default">Cada botão envia a sua própria entrada</string> + <string name="ctrl_mapping_count">%1$d de %2$d botões remapeados</string> + <string name="ctrl_configure">Configurar</string> + <string name="ctrl_reset_all">Repor comando</string> + <string name="ctrl_reset_all_hint">Restaura todas as definições do comando e o esquema</string> + <string name="ctrl_mapping_lede">O que cada botão no ecrã envia para o jogo. Oculto remove o botão.</string> + <string name="ctrl_onscreen_buttons">Botões no ecrã</string> + <string name="ctrl_defaults">Valores padrão</string> + <string name="ctrl_reset_mapping">Repor mapeamento</string> + <string name="content_android_apps">Apps Android</string> + <string name="content_apps_count">%1$d apps</string> + <string name="content_no_android_apps">Não foram encontradas apps Android para iniciar.</string> + <string name="content_desktop_installed">● Ambiente de trabalho instalado</string> + <string name="content_desktop_first_open">É instalado ao abrir pela primeira vez</string> + <string name="content_available">Disponível para instalar</string> + <string name="content_not_installed">Não instalado.</string> + <string name="content_not_installed_suffix">%1$s · não instalado</string> + <string name="content_open_named">Abrir %1$s</string> + <string name="content_games">Jogos</string> + <string name="content_choose_roms">Escolha uma pasta de ROMs.</string> + <string name="content_retroarch_roms">Navegue até /root/ROMs no RetroArch.</string> + <string name="content_add_roms">Adicione jogos de %1$s a ROMs/%2$s.</string> + <string name="content_install_named">Instalar %1$s</string> + <string name="content_stop_to_install">Termine a sessão para instalar</string> + <string name="content_runtime_required">Ambiente de execução necessário</string> + <string name="content_loading_details">A carregar os detalhes da instalação…</string> + <string name="content_details_unavailable">Os detalhes da instalação não estão disponíveis. Tente novamente mais tarde.</string> + <string name="content_needs_runtime">Instale primeiro o ambiente de execução Linux na Configuração.</string> + <string name="content_stop_first">Termine a sessão em execução para instalar apps do ambiente de trabalho.</string> + <string name="content_install_into">Instala %1$s no ambiente de trabalho Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Ocultar remove-o do Ambiente de trabalho. Os ficheiros permanecem no ambiente de execução Linux.</string> + <string name="content_rom_gone">Esse jogo já não está na pasta de ROMs.</string> + <string name="content_desktop_system">Ambiente de trabalho · %1$s</string> + <string name="content_launch_in">Iniciar em %1$s</string> + <string name="content_also_in">Também em %1$s</string> + <string name="content_page_gone">Essa página já não existe. Escolha uma secção à esquerda.</string> + <string name="content_open_desktop">Abrir ambiente de trabalho</string> + <string name="content_install_open_desktop">Instalar e abrir ambiente de trabalho</string> + <string name="desktop_remove_title">Desinstalar ambiente de trabalho</string> + <string name="desktop_remove_text">Remove o ambiente de trabalho e as apps incluídas. Mantém os jogos, as apps adicionadas, as definições e as bibliotecas partilhadas.</string> + <string name="desktop_removing">A remover o ambiente de trabalho</string> + <string name="desktop_removed">Ambiente de trabalho removido</string> + <string name="desktop_cleaning_legacy">A remover ficheiros antigos do LXQt</string> + <string name="desktop_removal_unknown">Atualize o DroidDeck antes de remover esta versão do ambiente de trabalho.</string> + <string name="content_linux_desktop">Ambiente de trabalho Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox e os seus emuladores</string> + <string name="games_empty">Os jogos que instalar no Steam aparecem aqui após a sessão.</string> + <string name="games_play_steam">Jogar no Steam</string> + <string name="games_play_steamvr">Jogar no SteamVR</string> + <string name="games_launch_settings">Definições de arranque</string> + <string name="games_launch">Iniciar</string> + <string name="games_files">Ficheiros do jogo</string> + <string name="games_prefix">Prefixo do Proton</string> + <string name="games_saves_looking">A procurar gravações…</string> + <string name="games_saves_none">Nenhuma pasta de gravações encontrada pelo nome. Exportar inclui toda a pasta do utilizador.</string> + <string name="games_saves_folders">%1$d pastas de gravações</string> + <string name="games_saves_summary">%1$s · %2$d ficheiros · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Gerir gravações</string> + <string name="games_saves">Gravações do jogo</string> + <string name="games_import_saves">Importar gravações…</string> + <string name="games_export_gamehub">Exportar como zip do GameHub…</string> + <string name="games_export_winlator">Exportar como zip do Winlator…</string> + <string name="games_open_save_folder">Abrir pasta de gravações</string> + <string name="games_never_played">Nunca jogado</string> + <string name="games_runtime_busy_percent">Ambiente de execução ocupado · %1$d%%</string> + <string name="games_runtime_busy">Ambiente de execução ocupado</string> + <string name="games_runtime_first_play">O ambiente de execução é instalado ao tocar em Jogar pela primeira vez</string> + <string name="games_runtime_update">Atualização do ambiente de execução disponível</string> + <string name="games_runtime_ready">● Ambiente de execução pronto</string> + <string name="games_last_played">Jogado pela última vez %1$s</string> + <string name="games_internal">Armazenamento interno</string> + <string name="games_added">Jogo adicionado</string> + <string name="games_custom">Jogo personalizado</string> + <string name="games_store_storage">Armazenamento de jogos</string> + <string name="gpu_auto_hint">O melhor par para esta GPU, sempre atualizado</string> + <string name="gpu_manual_hint">Escolha um par manualmente</string> + <string name="gpu_checking">A procurar controladores…</string> + <string name="gpu_none_listed">Ainda não há controladores listados. Atualize para os procurar.</string> + <string name="gpu_hide_other">Ocultar controladores para outras GPUs</string> + <string name="gpu_show_other">Mostrar controladores para outras GPUs</string> + <string name="gpu_advanced">Avançado</string> + <string name="gpu_set_with_display">Definido em conjunto com o controlador de ecrã: %1$s inclui ambos.</string> + <string name="gpu_set_with_runtime">Definido em conjunto com o controlador de execução: %1$s inclui ambos.</string> + <string name="gpu_runtime_hint">Utilizado pelos jogos e pelo ambiente de trabalho.</string> + <string name="gpu_runtime_default">Padrão do ambiente de execução</string> + <string name="gpu_auto_by_gpu">Automático - escolhido conforme a GPU</string> + <string name="gpu_manage">Transferir, importar ou eliminar…</string> + <string name="gpu_in_use_caps">EM UTILIZAÇÃO</string> + <string name="gpu_builtin">Os controladores integrados no DroidDeck</string> + <string name="gpu_matched_pair">Controladores de execução e de ecrã definidos em conjunto como um par correspondente.</string> + <string name="gpu_recommended_for">Recomendado para esta GPU: %1$s.</string> + <string name="gpu_refresh_hint">Atualize para procurar controladores para esta GPU.</string> + <string name="gpu_recommended_caps">RECOMENDADO</string> + <string name="gpu_unavailable">Indisponível</string> + <string name="load_runtime">Ambiente de execução Linux</string> + <string name="load_runtime_detail">A preparar o ambiente de execução Linux</string> + <string name="load_session">Sessão</string> + <string name="load_session_detail">A iniciar o ecrã e o áudio</string> + <string name="load_steam">Cliente Steam</string> + <string name="load_steam_detail">A verificar o Steam e as respetivas ferramentas de compatibilidade</string> + <string name="load_opening_steam">A abrir o Steam</string> + <string name="load_opening_steam_detail">A aguardar o primeiro fotograma do Steam</string> + <string name="load_desktop">Ambiente de trabalho</string> + <string name="load_desktop_detail">A preparar o ambiente de trabalho</string> + <string name="load_opening">A abrir</string> + <string name="load_opening_detail">A aguardar o primeiro fotograma</string> + <string name="load_starting_steam">A iniciar o Steam</string> + <string name="load_ended">A sessão terminou</string> + <string name="load_step">Passo %1$d de %2$d</string> + <string name="load_steam_paused">O Steam está em pausa</string> + <string name="deck_tab_grips">Pegas</string> + <string name="deck_tab_left">Painel esquerdo</string> + <string name="deck_tab_right">Painel direito</string> + <string name="deck_tab_both">Ambos</string> + <string name="deck_tab_gamepad">Comando</string> + <string name="deck_surface_stick">Joystick</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Alternar entre joystick e trackpad</string> + <string name="deck_more_controls">Mais controlos do Deck</string> + <string name="deck_panels">PAINÉIS</string> + <string name="deck_close">Fechar controlos do segundo ecrã</string> + <string name="deck_open_steam_menu">Abrir menu Steam</string> + <string name="deck_left_upper">Esquerda · superior</string> + <string name="deck_left_lower">Esquerda · inferior</string> + <string name="deck_right_upper">Direita · superior</string> + <string name="deck_right_lower">Direita · inferior</string> + <string name="deck_click">Clique</string> + <string name="deck_right_trackpad">Trackpad direito</string> + <string name="deck_left_trackpad">Trackpad esquerdo</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Mostrar teclado</string> + <string name="second_hide_keyboard">Ocultar teclado</string> + <string name="second_terminal">Terminal Linux</string> + <string name="second_terminal_not_ready">A sessão Linux ainda não está pronta para um terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Jogos</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Loja</string> + <string name="rail_components">Componentes</string> + <string name="rail_apps">Apps</string> + <string name="rail_setup">Configuração</string> + <string name="rail_updates">Atualizações</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Retomar %1$s</string> + <string name="roms_text">Aparece como /root/ROMs em cada sessão. O armazenamento interno está em /root/Storage.</string> + <string name="roms_none">Nenhuma pasta escolhida</string> + <string name="roms_applies">Aplica-se na próxima sessão. Funciona com cartões SD.</string> + <string name="roms_choose">Escolher pasta</string> + <string name="roms_change">Alterar pasta</string> + <string name="proton_lede">Instale uma versão ARM64 do Proton e escolha-a para cada jogo em Steam → Propriedades → Compatibilidade.</string> + <string name="proton_stop_first">Pare a sessão em curso para instalar ou remover uma ferramenta de compatibilidade.</string> + <string name="proton_available">Versões disponíveis</string> + <string name="proton_installed">Instalado: %1$s</string> + <string name="proton_queued">Pendente de um pedido anterior</string> + <string name="proton_not_installed">Não instalado</string> + <string name="proton_update_available">Atualização disponível → %1$s</string> + <string name="proton_remove_older">Remover versões antigas do %1$s</string> + <string name="proton_remove_older_body">Remove %1$s. Os jogos definidos para estas versões têm de mudar para outro Proton.</string> + <string name="proton_remove_body">Os jogos definidos para esta versão têm de mudar para outro Proton.</string> + <string name="proton_install_now">Instalar agora</string> + <string name="proton_cancel_queued">Cancelar pedido pendente</string> + <string name="pckb_android">Teclado Android</string> + <string name="pckb_hide">Ocultar ✕</string> + <string name="main_launch_named">Iniciar %1$s</string> + <string name="main_choose_screen">Escolha um ecrã. Secundário: %1$s.</string> + <string name="main_secondary_gone">O ecrã secundário já não está disponível.</string> + <string name="main_primary">Ecrã principal</string> + <string name="main_secondary">Ecrã secundário</string> + <string name="widgets_prev_tab">Separador anterior</string> + <string name="widgets_next_tab">Separador seguinte</string> + <string name="widgets_on">Ativado</string> + <string name="widgets_all_n">Todos (%1$d)</string> + <string name="widgets_none">Nenhum</string> + <string name="widgets_n_of_m">%1$d de %2$d</string> + <string name="widgets_off">Desativado</string> + <string name="screen_bottom">Ecrã inferior</string> + <string name="game_env_applies">Aplica-se no próximo arranque do jogo. O perfil de um jogo substitui o partilhado.</string> + <string name="game_env_other">Outro jogo por ID da app…</string> + <string name="game_env_done">Concluído</string> + <string name="game_env_default">Predefinido</string> + <string name="game_env_off">Desativado</string> + <string name="game_env_change">Alterar…</string> + <string name="game_env_change_title">Alterar variável</string> + <string name="game_env_restore_default">Repor predefinição</string> + <string name="game_env_eyebrow">Jogos Proton</string> + <string name="pip_title">Ecrã no ecrã</string> + <string name="pip_auto">Entrar automaticamente em ecrã no ecrã</string> + <string name="unfolded_controls">Controlos no ecrã desdobrado</string> + <string name="unfolded_controls_hint">Desdobrado, o jogo fica acima dos trackpads e das pegas traseiras do Steam Deck. Dobrado, o jogo ocupa o ecrã inteiro.</string> + <string name="pip_suspended">Suspenso</string> + <string name="pip_not_ready">O ecrã no ecrã fica disponível quando a sessão estiver pronta.</string> + <string name="pip_permission">Permita o ecrã no ecrã para o DroidDeck nas definições do Android.</string> + <string name="pip_unavailable">O Android não conseguiu abrir o ecrã no ecrã.</string> + <string name="game_shortcut">Atalho</string> + <string name="game_shortcut_add">Adicionar ao ecrã principal</string> + <string name="game_shortcut_choose">Escolher jogo</string> + <string name="game_shortcut_scanning">A procurar jogos instalados…</string> + <string name="game_link_copy">Copiar link de arranque</string> + <string name="game_link_copied">Link de arranque copiado</string> + <string name="game_shortcut_unsupported">Este iniciador não permite adicionar atalhos. Use antes «Copiar link de arranque».</string> + <string name="game_link_invalid">Link de arranque do jogo inválido.</string> + <string name="game_link_missing">Este jogo já não está na sua biblioteca do DroidDeck.</string> + <string name="game_link_session_busy">Pare a sessão atual antes de iniciar um jogo do Steam.</string> + <string name="game_link_failed">Não foi possível enviar o jogo para o Steam. Tente iniciá-lo novamente.</string> + <string name="setup_retry_removal">Tentar remover novamente</string> + <string name="runtime_removing">A remover</string> + <string name="runtime_removal_incomplete">Remoção incompleta</string> + <string name="game_file_export">Exportar ficheiro do jogo</string> + <string name="game_file_sync">Sincronizar todos os ficheiros de jogos com uma pasta</string> + <string name="game_file_stop_sync">Parar a sincronização dos ficheiros de jogos</string> + <string name="game_file_folder">Escolha uma pasta para os ficheiros de jogos do frontend</string> + <string name="game_file_exported">Ficheiros de jogos guardados em %1$s</string> + <string name="game_frontend_files">Ficheiros para frontends</string> + + <string name="main_wait_runtime">Aguarde que a operação do runtime termine</string> + <string name="main_wait_proton_install">Aguarde que a instalação da ferramenta de compatibilidade termine</string> + <string name="main_wait_desktop_install">Aguarde que a instalação da app de ambiente de trabalho termine</string> + <string name="main_wait_install_game">Aguarde que a instalação termine antes de iniciar um jogo</string> + <string name="main_saves_close_session">Feche primeiro a sessão do Steam, para que o jogo não grave por cima da importação</string> + <string name="main_saves_importing">A importar para %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">%1$d ficheiro importado do %2$s para %3$s</item> + <item quantity="many">%1$d ficheiros importados do %2$s para %3$s</item> + <item quantity="other">%1$d ficheiros importados do %2$s para %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">%1$d ficheiro importado do %2$s para %3$s. Cópia de segurança dos dados guardados antigos em Download/DroidDeck/Saves/backups</item> + <item quantity="many">%1$d ficheiros importados do %2$s para %3$s. Cópia de segurança dos dados guardados antigos em Download/DroidDeck/Saves/backups</item> + <item quantity="other">%1$d ficheiros importados do %2$s para %3$s. Cópia de segurança dos dados guardados antigos em Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Escolha um zip de dados guardados para %1$s</string> + <string name="main_saves_exporting">A exportar %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">%1$d ficheiro exportado como %2$s: %3$s</item> + <item quantity="many">%1$d ficheiros exportados como %2$s: %3$s</item> + <item quantity="other">%1$d ficheiros exportados como %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Escolha onde guardar %1$s (%2$s)</string> + <string name="main_action_failed">%1$s: falhou (%2$s)</string> + <string name="main_no_logs_yet">Ainda não há registos de sessão: execute primeiro uma sessão.</string> + <string name="main_no_logs_to_clear">Não há registos de sessão para limpar.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Foi limpa %1$d pasta de registos de sessão.</item> + <item quantity="many">Foram limpas %1$d pastas de registos de sessão.</item> + <item quantity="other">Foram limpas %1$d pastas de registos de sessão.</item> + </plurals> + <string name="main_wadb_pair_failed">Falha na sincronização da depuração sem fios</string> + <string name="main_wadb_command_failed">Falha no comando de depuração sem fios</string> + <string name="main_wadb_unavailable">A depuração sem fios não está disponível</string> + <string name="main_adb_copied">Comando ADB copiado</string> + <string name="main_pick_roms">Escolha a pasta de ROMs</string> + <string name="main_non_adreno_title">Não é uma GPU Adreno</string> + <string name="main_non_adreno_text">O Turnip suporta GPUs Adreno. Com %1$s, o Steam pode mostrar um ecrã preto. Transferência: %2$.0f MB.</string> + <string name="main_install_anyway">Instalar mesmo assim</string> + <string name="main_remove_runtime_title">Remover runtime Linux</string> + <string name="main_remove_runtime_text">Isto elimina o runtime, o cliente Steam que nele existe e todos os jogos lá instalados.</string> + <string name="main_applied">Aplicado: %1$s</string> + <string name="android_app_open_failed_primary">Não foi possível abrir %1$s no ecrã principal</string> + <string name="android_app_open_failed_on">Não foi possível abrir %1$s em %2$s</string> + <string name="android_app_open_failed_display">Não foi possível abrir %1$s no ecrã %2$d</string> + <string name="comp_busy_importing">A importar</string> + <string name="comp_busy_swapping">A trocar</string> + <string name="comp_busy_restoring">A restaurar</string> + <string name="comp_busy_cancelling">A cancelar</string> + <string name="comp_busy_deleting">A eliminar</string> + <string name="comp_cannot_read">não é possível ler o ficheiro</string> + <string name="comp_imported">%1$s importado</string> + <string name="comp_swap_cancelled">A troca pendente foi cancelada.</string> + <string name="comp_pick_wcp">Escolha um pacote de componente (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Não foi possível aceder às Nightlies</string> + <string name="comp_stored">%1$s guardado</string> + <string name="comp_download_failed">Falha na transferência: %1$s</string> + <string name="drivers_pick_linux">Escolha um controlador do runtime Linux (zip -Linux ou pacote Android + Linux)</string> + <string name="drivers_pick_android">Escolha um controlador de ecrã (zip AdrenoTools ou pacote Android + Linux)</string> + <string name="drivers_pick_any">Escolha um zip de controlador ou um pacote Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">A remover %1$s…</string> + <string name="main_forgetting_named">A esquecer %1$s…</string> + <string name="main_pick_game_storage">Escolha a pasta de armazenamento de jogos</string> + <string name="main_pick_decky_zip">Escolha um ZIP de plugin Decky</string> + <string name="main_storage_not_usable">Não utilizável: %1$s</string> + <string name="main_running_program">Programa</string> + <string name="main_removing_runtime">A remover o runtime Linux</string> + <string name="main_settings_main_screen">Não foi possível abrir as Definições no ecrã inferior; foram abertas no ecrã principal.</string> + <string name="main_open_dev_options">Abra as Opções de programador nas Definições</string> + + <string name="upd_unknown_apps_failed">Não foi possível abrir a definição «Instalar apps desconhecidas» do Android</string> + <string name="upd_couldnt_check">Não foi possível verificar: %1$s</string> + <string name="upd_no_download">Esta versão não tem transferência para esta cópia do DroidDeck</string> + <string name="upd_stop_first">Pare primeiro a sessão em curso e depois atualize</string> + <string name="upd_stage_downloading">A transferir</string> + <string name="upd_stage_installing">A instalar</string> + <string name="upd_stage_confirm">A aguardar a sua confirmação</string> + <string name="upd_failed">A atualização falhou</string> + <string name="upd_not_offered">O Android não ofereceu a instalação da atualização</string> + + <string name="decky_install_failed">Falha na instalação do Decky: %1$s</string> + <string name="decky_plugin_starting">A iniciar a importação do plugin…</string> + <string name="decky_plugin_failed">Falha na importação do plugin: %1$s</string> + <string name="decky_plugin_installed">Plugin instalado. Reinicie o Steam para o carregar.</string> + + <string name="drivers_not_checked">Ainda não verificado - toque em atualizar para procurar novos controladores</string> + <string name="drivers_bundle_sets_display">Android + Linux: define também o controlador de ecrã</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: define também o controlador do runtime</string> + <string name="drivers_runtime_builtin">o Turnip incluído no runtime</string> + <string name="drivers_system_vulkan">Vulkan do sistema: sem versão incluída para esta GPU</string> + <string name="drivers_bundled">%1$s (incluído)</string> + <string name="drivers_manual">Manual</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">De momento, só uma das metades está publicada</string> + <string name="drivers_pair_size">%1$.0f MB para ambos</string> + <string name="drivers_none_to_set">Nenhum controlador para definir: %1$s</string> + <string name="drivers_checking_latest">A procurar os controladores mais recentes…</string> + <string name="drivers_up_to_date_check_failed">Atualizado (não foi possível verificar: %1$s)</string> + <string name="drivers_recommended_unpublished">Os controladores recomendados não estão publicados de momento</string> + <string name="drivers_downloading_pair">A transferir %1$s %2$s…</string> + <string name="drivers_updated_to">Atualizado para %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Atualizado para %1$s %2$s. O controlador de ecrã aplica-se depois de reiniciar o DroidDeck.</string> + <string name="drivers_auto_waits_for_session">As atualizações de controladores esperam pelo fim da sessão.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s será transferido quando desligar os dados móveis e a poupança de bateria.</string> + <string name="drivers_skipping_bad">%1$s %2$s não iniciou uma sessão aqui, por isso o Automático fica nos controladores que funcionaram.</string> + <string name="drivers_rolled_back">%1$s não iniciou uma sessão duas vezes, por isso o Automático voltou aos controladores que funcionavam.</string> + <string name="drivers_switched_to">Alterado para %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Alterado para %1$s %2$s. O controlador de ecrã aplica-se depois de reiniciar o DroidDeck.</string> + <string name="drivers_using">A usar %1$s %2$s.</string> + <string name="drivers_using_restart">A usar %1$s %2$s. O controlador de ecrã aplica-se depois de reiniciar o DroidDeck.</string> + <string name="drivers_using_quest">A usar o controlador de vídeo Quest incluído e a predefinição do ambiente de execução.</string> + <string name="drivers_using_quest_restart">A usar o controlador de vídeo Quest incluído e a predefinição do ambiente de execução. O controlador de vídeo aplica-se depois de o DroidDeck reiniciar.</string> + <string name="drivers_not_a_driver">Não é um zip de controlador: não é um controlador AdrenoTools, um Turnip -Linux nem um pacote Android + Linux</string> + <string name="drivers_import_failed">Falha na importação: %1$s</string> + <string name="drivers_imported_unnamed">Controlador importado</string> + <string name="drivers_using_bundle">A usar %1$s como controlador do runtime e de ecrã.</string> + <string name="drivers_using_bundle_restart">A usar %1$s como controlador do runtime e de ecrã. O controlador de ecrã aplica-se depois de reiniciar o DroidDeck.</string> + <string name="drivers_deleted_bundle">%1$s eliminado (ambos os controladores)</string> + <string name="drivers_deleted">%1$s eliminado</string> + <string name="drivers_release_status">Mais recentes: %1$s · verificado %2$s</string> + <string name="drivers_release_status_failed">Mais recentes: %1$s · sem acesso a %2$s · verificado %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">há %1$d min</item> + <item quantity="many">há %1$d min</item> + <item quantity="other">há %1$d min</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">há %1$d h</item> + <item quantity="many">há %1$d h</item> + <item quantity="other">há %1$d h</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">há %1$d dia</item> + <item quantity="many">há %1$d dias</item> + <item quantity="other">há %1$d dias</item> + </plurals> + <string name="drivers_checking_sources">A verificar Banners-Turnip, WinNative e DroidDeck…</string> + <string name="drivers_check_failed">falha na verificação</string> + <string name="drivers_installed_pick_either">%1$s instalado - escolha-o em qualquer das listas para definir ambos os controladores</string> + <string name="drivers_installed_pick">%1$s instalado - escolha-o no menu</string> + + <string name="session_wait_removal">Aguarde que a remoção do runtime termine</string> + <string name="session_title_game">Jogo</string> + <string name="session_touch_auto_touchpad">painel tátil</string> + <string name="session_touch_auto_direct">direto</string> + <string name="session_swap_failed">Falha na troca: %1$s</string> + <string name="session_profile_save_failed">Falha ao guardar o perfil: %1$s</string> + <string name="session_desktop_paused">O ambiente de trabalho está em pausa</string> + <string name="session_named_paused">%1$s está em pausa</string> + <string name="session_program_paused">O programa está em pausa</string> + <string name="session_starting_desktop">A iniciar o ambiente de trabalho</string> + <string name="session_starting_named">A iniciar %1$s</string> + <string name="session_starting_program">A iniciar o programa</string> + <string name="session_no_logs">Não há registos para esta sessão.</string> + <string name="session_logs_archive_failed">Não foi possível criar o arquivo dos registos da sessão.</string> + <string name="session_logs_share_failed">Não foi possível partilhar os registos da sessão.</string> + <string name="session_starting_session">A iniciar a sessão…</string> + <string name="session_runtime_downloading">a transferir o runtime Linux</string> + <string name="session_runtime_downloading_mb">a transferir o runtime Linux · %1$d de %2$d MB</string> + <string name="session_runtime_checking">a verificar o runtime Linux</string> + <string name="session_runtime_unpacking">a descompactar o runtime Linux</string> + <string name="session_desktop_downloading">a transferir o ambiente de trabalho</string> + <string name="session_desktop_downloading_mb">a transferir o ambiente de trabalho · %1$d de %2$d MB</string> + <string name="session_desktop_checking">a verificar o ambiente de trabalho</string> + <string name="session_desktop_unpacking">a descompactar o ambiente de trabalho</string> + <string name="session_proton_downloading">a transferir o Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">a transferir o Proton Experimental (ARM64) · %1$d de %2$d MB</string> + <string name="session_proton_checking">a verificar o Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">a descompactar o Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Não foi possível aceder ao catálogo de runtimes. Verifique a ligação e prima Jogar novamente.</string> + <string name="session_runtime_install_failed">O runtime Linux não foi instalado. Verifique o runtime em Configuração e prima Jogar novamente.</string> + <string name="session_desktop_install_failed">O ambiente de trabalho não foi instalado (%1$s). Verifique a ligação e prima Ambiente de trabalho novamente.</string> + <string name="session_ended_named">%1$s parou inesperadamente. Partilhe os registos num relatório de erro ou tente novamente.</string> + <string name="session_ended_program">O programa parou inesperadamente. Partilhe os registos num relatório de erro ou tente novamente.</string> + <string name="session_ended_desktop">O ambiente de trabalho parou inesperadamente. Partilhe os registos num relatório de erro ou tente novamente.</string> + <string name="session_ended_detail">Código de saída %1$d · %2$s</string> + <string name="session_ended_no_log">sem registo</string> + <plurals name="session_hint_enosys"> + <item quantity="one">O registo mostra %1$d erro «Function not implemented»: a aceleração seccomp do proot está a fazer falhar um processo auxiliar neste dispositivo. Experimente %2$s → «%3$s» (ou «%4$s») e inicie novamente.</item> + <item quantity="many">O registo mostra %1$d erros «Function not implemented»: a aceleração seccomp do proot está a fazer falhar um processo auxiliar neste dispositivo. Experimente %2$s → «%3$s» (ou «%4$s») e inicie novamente.</item> + <item quantity="other">O registo mostra %1$d erros «Function not implemented»: a aceleração seccomp do proot está a fazer falhar um processo auxiliar neste dispositivo. Experimente %2$s → «%3$s» (ou «%4$s») e inicie novamente.</item> + </plurals> + + <string name="mode_decky_plugins">Plugins</string> + <string name="mode_decky_plugins_hint">Instale um ZIP de plugin para a próxima sessão do Steam.</string> + <string name="mode_decky_plugin_downloading">A transferir…</string> + <string name="mode_decky_plugin_install_zip">Instalar a partir de ZIP</string> + <string name="store_cat_games">Jogos</string> + <string name="store_cat_audio_video">Áudio e vídeo</string> + <string name="store_cat_graphics">Gráficos</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Escritório</string> + <string name="store_cat_developer">Programação</string> + <string name="store_cat_education">Educação</string> + <string name="store_cat_science">Ciência</string> + <string name="store_cat_system">Sistema</string> + <string name="store_cat_utilities">Utilitários</string> + <string name="store_section_popular">Populares</string> + <string name="store_section_trending">Tendências</string> + <string name="store_section_new">Novidades</string> + <string name="store_section_updated">Atualizadas</string> + <string name="store_section_loading">a carregar…</string> + <string name="store_flatpak_setup">Configuração do Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Não foi possível procurar atualizações no Flathub</string> + <string name="content_rom_installed">instalado</string> + <string name="content_rom_folder">pasta</string> + <string name="theme_graphite">Grafite</string> + <string name="theme_graphite_detail">Superfícies em grafite, com o azul da esfera do logótipo para tudo o que está selecionado, focado ou premido.</string> + <string name="theme_paper">Papel sobre preto</string> + <string name="theme_paper_detail">O branco é a cor principal; o azul do ícone é o sinal para linhas, anéis e pontos.</string> + <string name="theme_icon_blue">Azul do ícone</string> + <string name="theme_icon_blue_detail">Fundo preto, texto branco e o azul para tudo o que está selecionado, focado ou premido.</string> + <string name="theme_electric">Azul-marinho elétrico</string> + <string name="theme_electric_detail">O azul mais vivo, em superfícies que tendem para o azul-marinho em vez do cinzento.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Retrocesso</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Espaço</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Instale primeiro o runtime</string> + <string name="game_sync_err_steam_library">A biblioteca do Steam não está disponível</string> + <string name="game_sync_err_previous_sd">A biblioteca anterior do cartão SD não está disponível</string> + <string name="game_sync_err_game_storage">O armazenamento de jogos não está disponível</string> + <string name="game_sync_err_added_games">A pasta de jogos adicionados não está disponível</string> + <string name="game_sync_err_manifests">Os manifestos do Steam não estão disponíveis</string> + <string name="content_system_many">Vários sistemas</string> + <string name="fm_drive_internal">Interno</string> + <string name="fm_drive_linux">Sistema Linux</string> + <string name="fm_drive_sd">Cartão SD</string> + <string name="fm_drive_storage">Armazenamento</string> + <string name="fm_select">Selecionar</string> + <string name="fm_properties">Propriedades</string> + <string name="fm_favorite_add">Adicionar aos favoritos</string> + <string name="fm_favorite_remove">Remover dos favoritos</string> + <string name="fm_rename">Mudar o nome</string> + <string name="fm_copy">Copiar</string> + <string name="fm_cut">Cortar</string> + <string name="fm_actions">Ações</string> + <string name="fm_favorites">Favoritos</string> + <string name="fm_pin_current">Fixar pasta atual</string> + <string name="fm_no_favorites">Ainda não há favoritos - fixe uma pasta através do respetivo menu ⋮ para voltar aqui rapidamente.</string> + <string name="fm_unpin_favorite">Remover dos favoritos</string> + <string name="fm_size_zero">0 bytes</string> + <string name="fm_unit_bytes">bytes</string> + <string name="fm_prop_location">Localização</string> + <string name="fm_prop_type">Tipo</string> + <string name="fm_prop_size">Tamanho</string> + <string name="fm_prop_modified">Modificado</string> + <string name="fm_type_folder">Pasta</string> + <string name="fm_type_file">Ficheiro</string> + <string name="fm_type_ext_file">Ficheiro %1$s</string> + <string name="fm_read_only">Só de leitura</string> + <string name="fm_read_only_hint">Impede os jogos (e o Wine) de substituir ou eliminar este ficheiro.</string> + <string name="fm_read_only_failed">Não foi possível alterar «Só de leitura»</string> + <string name="fm_hidden">Oculto</string> + <string name="fm_hidden_unsupported">Este armazenamento não suporta o atributo de oculto.</string> + <string name="fm_hidden_hint">Marca o ficheiro como oculto no Windows (atributo oculto do Wine).</string> + <string name="fm_hidden_failed">Não foi possível alterar «Oculto» neste armazenamento</string> + <string name="fm_done">Concluído</string> + <string name="fm_op_deleting">A eliminar...</string> + <string name="fm_delete_failed">Falha ao eliminar</string> + <string name="fm_op_moving">A mover...</string> + <string name="fm_op_copying">A copiar...</string> + <string name="fm_op_moving_item">A mover - %1$s</string> + <string name="fm_op_copying_item">A copiar - %1$s</string> + <string name="fm_op_moving_batch">A mover %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">A copiar %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">Concluídos: %1$d, com falha: %2$d</string> + <string name="fm_paste_skipped">Concluídos: %1$d, ignorados: %2$d</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d item movido</item> + <item quantity="many">%1$d itens movidos</item> + <item quantity="other">%1$d itens movidos</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d item copiado</item> + <item quantity="many">%1$d itens copiados</item> + <item quantity="other">%1$d itens copiados</item> + </plurals> + <string name="fm_already_exists">«%1$s» já existe</string> + <string name="fm_op_renaming">A mudar o nome...</string> + <string name="fm_rename_failed">Falha ao mudar o nome</string> + <string name="fm_op_creating_folder">A criar pasta...</string> + <string name="fm_create_folder_failed">Não foi possível criar a pasta</string> + <string name="fm_new_folder">Nova pasta</string> + <string name="fm_folder_name">Nome da pasta</string> + <string name="fm_create">Criar</string> + <string name="fm_new_name">Novo nome</string> + <string name="fm_delete_title">Eliminar?</string> + <string name="fm_delete_text">Eliminar «%1$s» permanentemente?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Eliminar %1$d item?</item> + <item quantity="many">Eliminar %1$d itens?</item> + <item quantity="other">Eliminar %1$d itens?</item> + </plurals> + <string name="fm_cannot_undo">Esta ação não pode ser anulada.</string> + <plurals name="fm_and_more"> + <item quantity="one">…e mais %1$d</item> + <item quantity="many">…e mais %1$d</item> + <item quantity="other">…e mais %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">A eliminar %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">Não foi possível eliminar %1$d item</item> + <item quantity="many">Não foi possível eliminar %1$d itens</item> + <item quantity="other">Não foi possível eliminar %1$d itens</item> + </plurals> + <string name="fm_conflict_merge_hint">«Combinar» adiciona e substitui ficheiros dentro da pasta existente.</string> + <string name="fm_conflict_overwrite_hint">«Substituir» troca o ficheiro existente pelo novo.</string> + <string name="fm_conflict_apply_all">Aplicar a todos os conflitos</string> + <string name="fm_conflict_merge">Combinar</string> + <string name="fm_conflict_overwrite">Substituir</string> + <string name="fm_conflict_keep_both">Manter ambos</string> + <string name="fm_conflict_skip">Ignorar</string> + <string name="fm_select_this_folder">Selecionar esta pasta</string> + <string name="fm_back">Voltar</string> + <string name="fm_drive_not_readable">%1$s está montado, mas não é possível lê-lo de momento</string> + <string name="fm_list_view">Vista de lista</string> + <string name="fm_grid_view">Vista de grelha</string> + <string name="fm_search">Pesquisar</string> + <string name="fm_sort">Ordenar</string> + <string name="fm_sort_name">Nome</string> + <string name="fm_sort_date">Data de modificação</string> + <string name="fm_rows_comfortable">Linhas espaçosas</string> + <string name="fm_rows_compact">Linhas compactas</string> + <string name="fm_hide_hidden">Ocultar ficheiros ocultos</string> + <string name="fm_show_hidden">Mostrar ficheiros ocultos</string> + <string name="fm_hide_favorites">Ocultar favoritos</string> + <string name="fm_show_favorites">Mostrar favoritos</string> + <string name="fm_filter_folder">Filtrar esta pasta</string> + <string name="fm_free_space">%1$s livres</string> + <string name="fm_selected_count">Selecionados: %1$d</string> + <string name="fm_select_none">Nenhum</string> + <string name="fm_select_all">Todos</string> + <string name="fm_paste">Colar</string> + <plurals name="fm_items"> + <item quantity="one">%1$d item</item> + <item quantity="many">%1$d itens</item> + <item quantity="other">%1$d itens</item> + </plurals> + <string name="fm_paste_here">Colar %1$s aqui</string> + <string name="fm_paste_move_here">Colar %1$s aqui (mover)</string> + <string name="fm_rail_title">Ficheiros</string> + <string name="fm_rail_storage">ARMAZENAMENTO</string> + <string name="fm_rail_quick">ACESSO RÁPIDO</string> + <string name="fm_rail_favorites">FAVORITOS</string> + <string name="fm_rail_downloads">Transferências</string> + <string name="fm_rail_downloads_short">Transf.</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Registos de sessão</string> + <string name="fm_rail_pictures">Imagens</string> + <string name="fm_favorite_added">«%1$s» adicionado aos favoritos</string> + <string name="fm_favorite_removed">«%1$s» removido dos favoritos</string> + <string name="fm_empty_directory">Pasta vazia</string> + <string name="fm_up_one_level">Subir um nível</string> + <string name="fm_choose_folder">Escolha uma pasta</string> + <string name="fm_choose_file">Escolha um ficheiro</string> + <string name="ctrl_tint_steam_blue">Azul Steam</string> + <string name="ctrl_tint_sky">Céu</string> + <string name="ctrl_tint_white">Branco</string> + <string name="ctrl_tint_violet">Violeta</string> + <string name="ctrl_tint_green">Verde</string> + <string name="ctrl_tint_amber">Âmbar</string> + <string name="ctrl_tint_red">Vermelho</string> + <string name="ctrl_tint_pink">Rosa</string> + <string name="ctrl_button_a">Botão A</string> + <string name="ctrl_button_b">Botão B</string> + <string name="ctrl_button_x">Botão X</string> + <string name="ctrl_button_y">Botão Y</string> + <string name="ctrl_button_lb">Botão de ombro esquerdo</string> + <string name="ctrl_button_rb">Botão de ombro direito</string> + <string name="ctrl_button_lt">Gatilho esquerdo</string> + <string name="ctrl_button_rt">Gatilho direito</string> + <string name="ctrl_button_view">Botão Ver</string> + <string name="ctrl_button_menu">Botão Menu</string> + <string name="ctrl_target_view">Ver</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">Direcional para cima</string> + <string name="ctrl_target_down">Direcional para baixo</string> + <string name="ctrl_target_left">Direcional para a esquerda</string> + <string name="ctrl_target_right">Direcional para a direita</string> + <string name="ctrl_target_hidden">Oculto</string> + <string name="ctrl_editor_drag">Arraste para mover</string> + <string name="ctrl_editor_snap">Encaixar</string> + <string name="ctrl_editor_save">Guardar</string> + <string name="second_mode_none">Nenhum</string> + <string name="second_mode_keyboard_trackpad">Teclado + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Pegas + trackpads do Deck</string> + + <string name="rtinst_removing">A remover o runtime Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">A remover o runtime Linux · %1$d entrada</item> + <item quantity="many">A remover o runtime Linux · %1$d entradas</item> + <item quantity="other">A remover o runtime Linux · %1$d entradas</item> + </plurals> + <string name="rtinst_removed">Runtime Linux removido</string> + <string name="rtinst_removal_failed">Não foi possível concluir a remoção do runtime Linux. Use «Tentar remover novamente» em Configuração.</string> + <string name="rtinst_removing_leftovers">A remover restos do runtime</string> + <string name="rtinst_downloading">A transferir</string> + <string name="rtinst_verifying">A verificar</string> + <string name="rtinst_extracting">A extrair</string> + <string name="rtinst_channel_description">Aparece enquanto o runtime Linux é instalado ou removido</string> + <string name="rtinst_title_installing">A instalar o runtime Linux</string> + <string name="rtinst_title_removing">A remover o runtime Linux</string> + + <string name="deskpkg_runtime_missing">O runtime Linux não está instalado</string> + <string name="deskpkg_no_checksum">O catálogo não tem soma de verificação para %1$s</string> + <string name="deskpkg_checksum_mismatch">A soma de verificação não corresponde - nada foi alterado</string> + <string name="deskpkg_installing">A instalar %1$s</string> + <string name="deskpkg_place_failed">Não foi possível colocar a AppImage</string> + <string name="deskpkg_extract_failed">Falha na extração</string> + <string name="deskpkg_install_failed">Falha na instalação</string> + + <string name="flatpakmgr_setup_failed">Falha na configuração do Flatpak (saída %1$d)</string> + <string name="flatpakmgr_setup_unfinished">A configuração do Flatpak não terminou</string> + <string name="flatpakmgr_busy">Está em curso outra tarefa da loja</string> + <string name="flatpakmgr_not_ready">Configure primeiro o Flatpak</string> + <string name="flatpakmgr_starting">A iniciar</string> + <string name="flatpakmgr_exit_status">O Flatpak terminou com o código %1$d</string> + <string name="flatpakmgr_installing">A instalar %1$s</string> + <string name="flatpakmgr_updating">A atualizar %1$s</string> + <string name="flatpakmgr_removing">A remover %1$s</string> + <string name="flatpakmgr_installing_step">A instalar %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">A atualizar %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">A remover %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">traduções</string> + <string name="flatpakmgr_ref_graphics_drivers">controladores gráficos</string> + <string name="flatpakmgr_ref_media_codecs">codecs multimédia</string> + <string name="flatpakmgr_ref_runtime">runtime %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">runtime %1$s %2$s</string> + + <string name="appimg_too_small">O ficheiro é demasiado pequeno para ser uma AppImage</string> + <string name="appimg_unreadable">Não é possível ler o ficheiro: %1$s</string> + <string name="appimg_not_linux">Isto não é uma AppImage (não é um programa Linux)</string> + <string name="appimg_wrong_arch">Esta AppImage não foi compilada para ARM64 (aarch64) nem para PCs x86</string> + <string name="appimg_not_appimage">Isto é um programa Linux, mas não é uma AppImage</string> + <string name="appimg_wrong_type">Só é possível importar AppImages do tipo 2 (esta é do tipo %1$d)</string> + <string name="appimg_no_space_import">Espaço livre insuficiente: a importação precisa de cerca de %1$s</string> + <string name="appimg_no_space_update">Espaço livre insuficiente: a atualização precisa de cerca de %1$s</string> + <string name="appimg_import_failed">Falha na importação</string> + <string name="appimg_gone">Essa AppImage já não existe</string> + <string name="appimg_update_failed">Falha na atualização</string> + <string name="appimg_extracting">A extrair %1$s</string> + <string name="appimg_extract_failed">Não foi possível extrair a AppImage</string> + <string name="appimg_extract_failed_detail">Não foi possível extrair a AppImage: %1$s</string> + + <string name="deckymgr_stop_session_loader">Pare a sessão ativa antes de instalar o Decky Loader</string> + <string name="deckymgr_download_failed">Falha na transferência do Decky Loader</string> + <string name="deckymgr_size_mismatch">O tamanho do Decky Loader não corresponde aos metadados da versão</string> + <string name="deckymgr_checksum_download_failed">Não foi possível transferir a soma de verificação da versão</string> + <string name="deckymgr_checksum_missing">Falta a soma de verificação da versão</string> + <string name="deckymgr_checksum_invalid">A soma de verificação da versão é inválida</string> + <string name="deckymgr_checksum_mismatch">A soma de verificação do Decky Loader não corresponde</string> + <string name="deckymgr_not_elf">O ficheiro da versão não é um executável Linux de 64 bits compatível</string> + <string name="deckymgr_session_started_loader">Foi iniciada uma sessão durante a transferência; pare-a antes de instalar o Decky Loader</string> + <string name="deckymgr_loader_not_executable">Não foi possível tornar o PluginLoader executável</string> + <string name="deckymgr_cef_failed">Não foi possível ativar a depuração remota do CEF do Steam</string> + <string name="deckymgr_stage_failed">Não foi possível preparar o PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Não foi possível preservar o PluginLoader existente</string> + <string name="deckymgr_loader_activate_failed">Não foi possível ativar o novo PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Pare a sessão ativa antes de instalar um plugin</string> + <string name="deckymgr_loader_required">Instale o Decky Loader antes de importar um plugin</string> + <string name="deckymgr_zip_unreadable">Não foi possível ler o ficheiro ZIP selecionado</string> + <string name="deckymgr_plugins_dir_failed">Não foi possível criar a pasta de plugins do Decky</string> + <string name="deckymgr_extracting_zip">A extrair o ZIP do plugin</string> + <string name="deckymgr_zip_one_folder">O ZIP do plugin tem de conter uma única pasta de plugin no nível superior</string> + <string name="deckymgr_zip_missing_files">Faltam plugin.json, package.json ou dist/index.js no ZIP do plugin</string> + <string name="deckymgr_plugin_name_missing">Falta o nome do plugin</string> + <string name="deckymgr_session_started_plugin">Foi iniciada uma sessão durante a instalação; pare-a antes de instalar um plugin</string> + <string name="deckymgr_plugin_installed">Plugin instalado · reinicie o Steam para o carregar</string> + <string name="deckymgr_plugin_install_failed">Falha na instalação do ZIP do plugin</string> + <string name="deckymgr_zip_too_many">O ZIP do plugin contém demasiadas entradas</string> + <string name="deckymgr_zip_invalid_path">O ZIP do plugin contém um caminho inválido</string> + <string name="deckymgr_zip_duplicate_paths">O ZIP do plugin contém caminhos duplicados</string> + <string name="deckymgr_zip_unsafe_path">O ZIP do plugin contém um caminho inseguro</string> + <string name="deckymgr_folder_failed">Não foi possível criar a pasta do plugin</string> + <string name="deckymgr_zip_too_large">O ZIP do plugin excede o limite de 1 GiB depois de extraído</string> + <string name="deckymgr_bundled_not_executable">Não foi possível tornar executável o binário incluído no plugin</string> + <string name="deckymgr_remote_entry_invalid">Entrada remote_binary inválida</string> + <string name="deckymgr_remote_name_invalid">Nome de binário remoto inválido</string> + <string name="deckymgr_remote_url_https">O URL do binário remoto tem de usar HTTPS</string> + <string name="deckymgr_remote_hash_invalid">O binário remoto %1$s tem um hash SHA-256 inválido</string> + <string name="deckymgr_bin_dir_failed">Não foi possível criar a pasta bin do plugin</string> + <string name="deckymgr_downloading_binary">A transferir o binário do plugin · %1$s</string> + <string name="deckymgr_binary_download_failed">Não foi possível transferir o binário do plugin %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">A soma de verificação do binário do plugin não corresponde · %1$s</string> + <string name="deckymgr_binary_not_executable">Não foi possível tornar executável o binário do plugin · %1$s</string> + <string name="deckymgr_binary_replace_failed">Não foi possível substituir o binário do plugin · %1$s</string> + <string name="deckymgr_binary_install_failed">Não foi possível instalar o binário do plugin · %1$s</string> + <string name="deckymgr_folder_taken">A pasta do plugin pertence a outro plugin</string> + <string name="deckymgr_preserve_failed">Não foi possível preservar o plugin existente</string> + <string name="deckymgr_activate_failed">Não foi possível ativar o plugin importado</string> + <string name="deckymgr_settings_failed">Não foi possível atualizar as definições de plugins do Decky</string> + <string name="deckymgr_restore_failed">Não foi possível restaurar o plugin existente</string> + + <string name="adbfix_save_failed">Não foi possível guardar a identidade da depuração sem fios</string> + <string name="adbfix_command_failed">O comando ADB falhou (%1$d)</string> + <string name="adbfix_not_confirmed">O Android não confirmou a alteração do limite de processos secundários: %1$s</string> + <string name="adbfix_no_pairing">Não há nenhuma sincronização de depuração sem fios guardada</string> + <string name="adbfix_enter_address">Introduza o endereço IP e a porta atuais da depuração sem fios</string> + + <string name="adbpair_timed_out">Tempo esgotado à espera da janela de sincronização. Tente novamente a partir do DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Não foi possível procurar a janela de sincronização (%1$d). Verifique se o Wi-Fi está ativado.</string> + <string name="adbpair_discovery_failed">Não foi possível procurar a janela de sincronização: %1$s</string> + <string name="adbpair_six_digits">Introduza os 6 dígitos do código</string> + <string name="adbpair_pairing">A sincronizar…</string> + <string name="adbpair_code_rejected">Esse código não funcionou. Abra novamente a janela de sincronização e introduza o novo código.</string> + <string name="adbpair_connecting">Sincronizado. A ligar…</string> + <string name="adbpair_port_not_found">Sincronizado, mas a porta da depuração sem fios não foi encontrada. Mantenha a depuração sem fios ativada e tente novamente.</string> + <string name="adbpair_applying">A aplicar a definição…</string> + <string name="adbpair_command_failed">Falha no comando de depuração sem fios</string> + <string name="adbpair_channel_name">Configuração da depuração sem fios</string> + <string name="adbpair_channel_description">Pede o código de sincronização da depuração sem fios enquanto as Definições estão abertas</string> + <string name="adbpair_title_pair">Sincronizar a depuração sem fios</string> + <string name="adbpair_waiting_text">Ative a depuração sem fios e toque em «Sincronizar dispositivo com código de sincronização».</string> + <string name="adbpair_waiting_long">Ative a depuração sem fios e toque em «Sincronizar dispositivo com código de sincronização». Fique nas Definições: o código é introduzido nesta notificação.</string> + <string name="adbpair_code_label">Código de sincronização de 6 dígitos</string> + <string name="adbpair_code_hint">Toque em Introduzir código e escreva os 6 dígitos mostrados nas Definições.</string> + <string name="adbpair_title_code">Introduza o código de sincronização Wi-Fi</string> + <string name="adbpair_title_retry">Introduza o código novamente</string> + <string name="adbpair_enter_code">Introduzir código</string> + <string name="adbpair_title_working">A configurar o Steam</string> + <string name="adbpair_title_done">O Steam está pronto</string> + <string name="adbpair_done_text">Toque para voltar ao DroidDeck. Já pode desativar a depuração sem fios.</string> + <string name="adbpair_title_failed">A configuração da depuração sem fios parou</string> + + <string name="selfinst_download_failed">A transferência falhou</string> + <string name="selfinst_size_mismatch">O tamanho da transferência não correspondia ao APK publicado e foi descartada - tente novamente</string> + <string name="selfinst_checksum_mismatch">A transferência não correspondia à soma de verificação e foi descartada - tente novamente</string> + <string name="selfinst_wrong_package">A atualização é para o pacote Android %1$s, não para %2$s</string> + <string name="selfinst_metadata_signer">Os metadados da atualização não indicam a chave de assinatura de lançamento do DroidDeck</string> + <string name="selfinst_unreadable">O Android não conseguiu ler o APK transferido</string> + <string name="selfinst_apk_wrong_package">O APK transferido é para %1$s, não para %2$s</string> + <string name="selfinst_version_mismatch">O APK transferido indica o versionCode %1$d, não o %2$d publicado</string> + <string name="selfinst_downgrade">O Android não instala o versionCode %1$d por cima do %2$d instalado</string> + <string name="selfinst_no_signing">O APK transferido não tem informações de assinatura</string> + <string name="selfinst_wrong_signer">O APK transferido não está assinado com a chave de lançamento do DroidDeck</string> + <string name="appupd_http">O catálogo de atualizações respondeu HTTP %1$d</string> + + <string name="loadstate_starting">A iniciar a sessão…</string> + <string name="loadstate_elapsed">%1$d:%2$02d decorridos · ainda a trabalhar</string> + <string name="loadstate_steam_update">A transferir a atualização do cliente Steam · %1$d%%</string> + <string name="loadstate_steam_client">A transferir o cliente Steam · %1$s</string> + + <string name="pextra_busy">Já está em curso a instalação de uma ferramenta de compatibilidade</string> + <string name="pextra_stop_session">Pare a sessão ativa antes de instalar ferramentas de compatibilidade</string> + <string name="pextra_no_release">Não foi possível encontrar uma versão ARM64 de %1$s</string> + <string name="pextra_no_space">São necessários pelo menos 4 GB livres, mais o tamanho da transferência, para instalar %1$s</string> + <string name="pextra_downloading">A transferir %1$s %2$s</string> + <string name="pextra_retrying">A repetir a transferência · tentativa %1$d de %2$d</string> + <string name="pextra_interrupted">Transferência interrompida</string> + <string name="pextra_download_failed">A transferência falhou; o ficheiro parcial é mantido para que uma nova tentativa a possa retomar</string> + <string name="pextra_too_big">A transferência excedeu o tamanho da versão e foi eliminada</string> + <string name="pextra_incomplete">A transferência ficou incompleta; o ficheiro parcial é mantido para ser retomado numa nova tentativa</string> + <string name="pextra_verifying">A verificar a transferência</string> + <string name="pextra_checksum_unreadable">Não foi possível ler a soma de verificação da versão; tente novamente</string> + <string name="pextra_no_checksum">%1$s %2$s não publica soma de verificação; nada foi instalado</string> + <string name="pextra_checksum_mismatch">A soma de verificação não corresponde; a transferência foi eliminada</string> + <string name="pextra_session_started">Foi iniciada uma sessão durante a transferência; pare-a antes de instalar ferramentas de compatibilidade</string> + <string name="pextra_installing">A instalar %1$s</string> + <string name="pextra_install_failed">Falha na instalação de %1$s (saída %2$d)</string> + <string name="pextra_could_not_install">Não foi possível instalar %1$s</string> + <string name="esync_fetching">A obter o pacote droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">com auxiliares Linux</string> + <string name="cmgr_fex_dlls_only">Só DLLs</string> + <string name="cmgr_original_proton_updated">Original (Proton atualizado desde a última troca)</string> + <string name="cmgr_changed_outside">Alterado fora de Componentes</string> + <string name="cmgr_not_present">não presente</string> + <string name="cmgr_original_version">Original %1$s</string> + <string name="cmgr_original_from">Original de %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s será colocado em %3$s quando o jogo que o está a usar fechar.</string> + <string name="cmgr_swap_done">%1$s %2$s está agora em %3$s. Aplica-se da próxima vez que um jogo iniciar.</string> + <string name="cmgr_original_missing">Esse pacote original não está guardado</string> + <string name="cmgr_restore_queued">%1$s de %2$s volta ao original quando o jogo que o está a usar fechar.</string> + <string name="cmgr_restore_done">%1$s de %2$s restaurado a partir do original de %3$s.</string> + <string name="cmgr_package_in_use">%1$s está em uso em %2$s. Troque-o primeiro por outro nesse Proton.</string> + <string name="cmgr_package_not_stored">%1$s não está guardado</string> + <string name="cmgr_deleted">%1$s eliminado.</string> + <string name="cmgr_original_kept">O original da versão instalada é mantido: é o caminho de volta.</string> + <string name="cmgr_not_stored">Não guardado</string> + <string name="cmgr_deleted_original">Original de %1$s de %2$s eliminado.</string> + <string name="cmgr_nightlies_only">As transferências vêm apenas das versões Nightlies</string> + <string name="cmgr_list_predates_checksums">Esta lista de pacotes é anterior às somas de verificação - atualize-a e tente novamente</string> + <string name="cmgr_checksum_mismatch">A soma de verificação não corresponde</string> + + <string name="sprefs_upscaler_linear">Linear</string> + <string name="sprefs_upscaler_nearest">Mais próximo</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (qualidade)</string> + <string name="sprefs_upscaler_sharpen">Só nitidez</string> + <string name="sprefs_lod_bias_auto">Automático (acompanha a escala)</string> + + <string name="look_off_desc">Nada aplicado.</string> + <string name="look_game_clarity">Clareza de jogo</string> + <string name="look_game_clarity_desc">Nitidez com um toque de contraste - a do dia a dia.</string> + <string name="look_vivid">Vívido</string> + <string name="look_vivid_desc">Cor bem carregada. Debanding ativo para o céu não ficar às riscas.</string> + <string name="look_cinematic">Cinematográfico</string> + <string name="look_cinematic_desc">Contraste mais profundo, cor mais fria, contornos suavizados.</string> + <string name="look_competitive">Competitivo</string> + <string name="look_competitive_desc">Sombras realçadas e nitidez forte - aviste os adversários primeiro.</string> + <string name="look_adaptive_sharpen">Nitidez adaptativa</string> + <string name="look_adaptive_sharpen_desc">Só nitidez, cor intacta.</string> + <string name="look_filmic">Fílmico</string> + <string name="look_filmic_desc">Curva tipo película, ligeiramente esbatida.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Forte e com impacto.</string> + <string name="look_retro_crt">CRT retro</string> + <string name="look_retro_crt_desc">As passagens de tubo CRT e de sinal analógico, em conjunto.</string> + <string name="look_upscale_sharp">Ampliação nítida</string> + <string name="look_upscale_sharp_desc">Para jogar abaixo da resolução do ecrã.</string> + <string name="look_pixel_clean">Píxeis limpos</string> + <string name="look_pixel_clean_desc">Píxeis nítidos para 2D e jogos antigos.</string> + <string name="look_anime_edge">Contornos anime</string> + <string name="look_anime_edge_desc">Contornos de desenho animado mais nitidez.</string> + + <string name="gpuinfo_not_adreno">Não é uma GPU Adreno</string> + <string name="gpuinfo_supported">Suportada</string> + <string name="gpuinfo_experimental">Experimental: os controladores são versões de teste</string> + <string name="gpuinfo_below_tested">Abaixo do hardware testado (Adreno 725 e mais recentes): pode não funcionar</string> + <string name="gpuinfo_unsupported">Não suportada: o DroidDeck precisa de uma GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Foi atingido o limite de pedidos do GitHub - tente novamente mais tarde</string> + <string name="turnip_github_http">O GitHub respondeu HTTP %1$d</string> + <string name="turnip_download_failed">A transferência falhou</string> + <string name="turnip_list_predates_checksums">Esta lista de controladores é anterior às somas de verificação - atualize-a e tente novamente</string> + <string name="turnip_checksum_mismatch">A soma de verificação não corresponde - a transferência foi descartada</string> + <string name="turnip_not_adrenotools">Não é um controlador AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">sem meta.json</string> + <string name="turnip_reject_meta_unreadable">não é possível ler meta.json (%1$s)</string> + <string name="turnip_reject_linux_driver">este é um controlador do runtime Linux (importe-o em «Controlador do runtime Linux»)</string> + <string name="turnip_reject_wayland">este é um controlador de jogos Wayland, que esta app não utiliza</string> + <string name="turnip_reject_no_library_name">meta.json não indica libraryName, por isso nada pôde ser passado ao AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json indica %1$s, que não está no zip</string> + <string name="turnip_reject_not_aarch64">%1$s não é uma biblioteca partilhada ELF AArch64 de 64 bits</string> + <string name="turnip_reject_glibc">%1$s liga à glibc - é um Turnip «-Linux», que pertence a «Controlador do runtime Linux»</string> + <string name="lvd_no_library">Não há libvulkan_freedreno*.so neste zip. Um zip Turnip Android (AdrenoTools) ou -Wayland não é um controlador do runtime Linux.</string> + <string name="lvd_not_aarch64">%1$s não é uma biblioteca partilhada ELF AArch64 de 64 bits.</string> + <string name="lvd_not_glibc">%1$s não é um controlador glibc - liga à libc do Android. O runtime Linux precisa de um zip «-Linux»; um Turnip simples ou «-Wayland» não pode ser carregado pelo cliente Steam.</string> + <string name="bundle_no_manifest">Não é um pacote de controladores: não há manifest.json que indique um controlador Android e um Linux</string> + <string name="bundle_entry_outside">Não é um pacote de controladores: %1$s aponta para fora dele</string> + <string name="bundle_too_large">Não é um pacote de controladores: descompactado ocupa mais de %1$d MB</string> + + <string name="gstore_sd_card">Cartão SD</string> + <string name="gstore_folder">Pasta</string> + + <string name="logshare_chooser">Partilhar registos da sessão</string> + + <string name="hdr_needs_android_10">requer Android 10 ou mais recente (camadas de ecrã com espaço de cor)</string> + <string name="hdr_none">este ecrã não indica suporte HDR</string> + <string name="hdr_not_hdr10">este ecrã suporta %1$s, não HDR10</string> + + <string name="gpu_this_gpu">esta GPU</string> + <string name="phantom_title_on">O limite de processos secundários está ativado</string> + <string name="phantom_title_unset">O limite de processos secundários não está definido</string> + <string name="phantom_title_unreadable">Não foi possível verificar o limite de processos secundários</string> + <string name="phantom_title_off">O limite de processos secundários está desativado</string> + <string name="phantom_title_not_required">Limite de processos secundários não necessário</string> + <string name="phantom_instructions_fix">%1$s Se não for possível, ligue este dispositivo a um computador com ADB e execute o comando abaixo. Volte aqui e verifique novamente.</string> + <string name="phantom_instructions_off">As sessões Steam podem ser iniciadas.</string> + <string name="phantom_instructions_not_applicable">Esta versão do Android não usa este limite.</string> + <string name="phantom_fix_toggle">Ative «Desativar restrições de processos secundários» nas Opções de programador e mantenha as Opções de programador ativadas depois.</string> + <string name="phantom_fix_no_toggle">Esta versão do Android não tem um interruptor para isto. Use a depuração sem fios para o alterar a partir deste dispositivo.</string> + <string name="upd_block_no_apk">Esta versão não tem transferência para esta cópia do DroidDeck.</string> + <string name="upd_block_version_code">O Android não a instala por cima desta versão porque o versionCode %1$d é inferior ao %2$d instalado.</string> + <string name="upd_fail_downgrade">O Android não instala uma versão mais antiga por cima de uma mais recente. Mantenha esta versão até o canal a alcançar.</string> + <string name="upd_fail_signature">Esta cópia do DroidDeck tem uma assinatura diferente (compilação local?), por isso o Android não a atualiza no lugar.</string> + <string name="upd_fail_storage">Não há espaço livre suficiente para a atualização.</string> + <string name="upd_fail_aborted">A atualização foi cancelada.</string> + <string name="upd_fail_with_message">A atualização não foi instalada: %1$s</string> + <string name="upd_fail_generic">A atualização não foi instalada.</string> + <string name="saves_layout_zip">zip do %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s ainda não foi iniciado</string> + <string name="saves_none_found">Nenhum ficheiro de dados guardados encontrado para %1$s</string> + <string name="saves_not_save_zip">%1$s não tem pasta drive_c, por isso não é um zip de dados guardados do GameHub nem do Winlator</string> + <string name="gstore_cannot_create">não é possível criar pastas em %1$s</string> + <string name="gstore_cannot_write">não é possível escrever em %1$s</string> + <string name="gstore_cannot_write_detail">não é possível escrever em %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">A pasta não está disponível</string> + <string name="gfiles_name_taken">Outro ficheiro já usa %1$s</string> + <string name="gfiles_art_unavailable">A pasta de imagens não está disponível</string> + <string name="gfiles_unrelated_inventory">A pasta tem um inventário de sincronização não relacionado</string> + <string name="gfiles_remove_failed">Não foi possível remover %1$s</string> + <string name="gfiles_outside_folder">O ficheiro sai da pasta de exportação</string> + <string name="cmgr_fex_unnamed">FEX (compilação sem nome de versão)</string> + <string name="cmgr_no_profile">sem profile.json em %1$s</string> + <string name="cmgr_not_component_package">%1$s não é um pacote de componente Linux (tipo %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s livres</string> + <string name="mode_storage_auto_short">Automático</string> + <string name="appupd_catalog_rejected">O catálogo de atualizações falhou as verificações (%1$s)</string> + <string name="main_adb_clip_label">Definição de processos secundários do DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Sessão iniciada · modo offline</string> + <string name="setup_signed_in_unnamed">Sessão iniciada</string> + <string name="driver_tag_bundled">INCLUÍDO</string> + <string name="driver_tag_downloaded">TRANSFERIDO</string> + <string name="driver_tag_imported">IMPORTADO</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Ecrã da sessão</string> + <string name="display_resolution">Resolução</string> + <string name="display_game_fit">Ajuste de jogos 16:9</string> + <string name="display_game_fit_hint">Como os jogos 16:9 se ajustam a este ecrã. Próxima sessão.</string> + <string name="display_game_fit_unavailable">Escolha «Igual ao ecrã» ou um tamanho personalizado mais estreito do que 16:9.</string> + <string name="display_preserve">Manter proporções</string> + <string name="display_stretch">Esticar até ao ecrã</string> + <string name="display_image_scaling">Escala da imagem</string> + <string name="display_filter">Filtro de escala</string> + <string name="display_filter_hint">Partilhado pelo Steam e pelo Ambiente de trabalho.</string> + <string name="display_filter_live">Aplica-se em tempo real. Partilhado pelo Steam e pelo Ambiente de trabalho.</string> + <string name="display_filter_note">FSR, GSR e NIS aplicam-se ao ampliar a imagem da sessão. «Só nitidez» também funciona sem ampliação.</string> + <string name="display_sharpness">Nitidez do filtro</string> + <string name="display_frame_rate">Taxa de fotogramas</string> + <string name="display_look_filter">%1$s Define a escala como %2$s.</string> + <string name="display_match_screen">Igual ao ecrã (%1$d×%2$d)</string> + <string name="display_follow_screen">Seguir o ecrã (redimensiona ao dobrar ou desdobrar)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Mostrar detalhes do dispositivo</string> + <string name="device_info_hide">Ocultar detalhes do dispositivo</string> + <string name="device_info_loading">A ler o dispositivo…</string> + <string name="device_info_copy">Copiar</string> + <string name="device_info_copy_hint">Copie estes detalhes para um relatório de erro.</string> + <string name="device_info_copied">Copiado.</string> + <string name="force_ssbs_title">Forçar SSBS</string> + <string name="force_ssbs_hint">Mantém ativa uma definição de velocidade da CPU que o Wine está sempre a desativar. Pode tornar os jogos Windows mais rápidos no Snapdragon 8 Elite; pouca diferença nos chips mais antigos. Aplica-se no próximo arranque do jogo.</string> + + <string name="rail_stores">Lojas</string> + <string name="source_steam">Steam</string> + <string name="source_added">Personalizados</string> + <string name="setup_stores">Lojas</string> + <string name="setup_stores_open_on">Abrir uma loja em</string> + <string name="setup_stores_speed">Nível de velocidade de transferência</string> + <string name="setup_stores_engine">Motor das lojas</string> + <string name="setup_stores_engine_chip_ready">● Motor pronto</string> + <string name="setup_stores_engine_chip_missing">Não compilado</string> + <string name="stores_tier_balanced">Equilibrado</string> + <string name="stores_tier_fast">Rápido</string> + <string name="stores_tier_max">Máximo</string> + <string name="stores_title">Lojas</string> + <string name="stores_settings">Definições das lojas</string> + <string name="stores_settings_eyebrow">Definições</string> + <string name="stores_chip_signed_out">(sessão não iniciada)</string> + <string name="stores_tab_store">Loja</string> + <string name="stores_tab_installed">Instalados</string> + <string name="stores_tab_library">Biblioteca</string> + <string name="stores_tab_all">Todos</string> + <string name="stores_tab_downloads">Transferências</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Iniciar sessão</string> + <string name="stores_signout_named">%1$s · terminar sessão</string> + <string name="stores_signout_title">Terminar sessão em %1$s?</string> + <string name="stores_signout_note">Os jogos instalados mantêm-se. A biblioteca volta a ser obtida quando iniciar sessão novamente.</string> + <string name="stores_signout_stay">Manter sessão iniciada</string> + <string name="stores_signout_go">Terminar sessão</string> + <string name="stores_search_catalog">Pesquisar no catálogo %1$s…</string> + <string name="stores_search_installed">Pesquisar jogos instalados…</string> + <string name="stores_search_library">Pesquisar na sua biblioteca…</string> + <string name="stores_search_open">Pesquisar</string> + <string name="stores_installed_empty">Nada instalado</string> + <string name="stores_library_loading">A carregar</string> + <string name="stores_nothing_matches">Nenhum jogo</string> + <string name="stores_shelves_loading">A carregar a loja…</string> + <string name="stores_amazon_no_catalog">Sem catálogo</string> + <string name="stores_shelf_new">Novidades</string> + <string name="stores_shelf_deals">Promoções</string> + <string name="stores_shelf_free">Jogos gratuitos</string> + <string name="stores_shelf_trending">Tendências</string> + <string name="stores_shelf_library">A sua biblioteca</string> + <string name="stores_play">Jogar</string> + <string name="stores_install">Instalar</string> + <string name="stores_resume_install">Retomar instalação</string> + <string name="stores_dl_interrupted">Interrompida</string> + <string name="stores_install_size">Instalar · %1$s</string> + <string name="stores_get_free">Obter grátis</string> + <string name="stores_view_on">Ver em %1$s</string> + <string name="stores_buy_price">Comprar · %1$s</string> + <string name="stores_installed_chip">Instalado</string> + <string name="stores_in_library">Na biblioteca</string> + <string name="stores_free">Grátis</string> + <string name="stores_resume">Retomar</string> + <string name="stores_refresh">Atualizar</string> + <string name="stores_sort">Ordenar</string> + <string name="stores_sort_last_played">Jogados recentemente</string> + <string name="stores_sort_recently_installed">Instalados recentemente</string> + <string name="stores_sort_title_asc">Título A–Z</string> + <string name="stores_sort_title_desc">Título Z–A</string> + <string name="stores_sort_size_desc">Tamanho: maior</string> + <string name="stores_sort_size_asc">Tamanho: menor</string> + <string name="stores_sort_release_date">Data de lançamento</string> + <string name="stores_view_list">Vista de lista</string> + <string name="stores_view_cards">Vista de cartões</string> + <string name="stores_show_mature">Mostrar conteúdo para adultos</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Desativado</string> + <string name="epic_eos">Início de sessão Epic (EOS)</string> + <string name="epic_offline">Iniciar offline</string> + <string name="epic_resolve">Resolver início de sessão Epic</string> + <string name="epic_client_version">Versão %1$s</string> + <string name="epic_client_no_runtime">Instale primeiro o ambiente de execução Linux</string> + <string name="epic_client_checking">A verificar a versão mais recente…</string> + <string name="epic_client_unpacking">A descompactar…</string> + <string name="epic_client_unreachable">O servidor de transferência não respondeu</string> + <string name="epic_client_needs_fex">O Epic Games Launcher precisa do FEX, que o Steam transfere. Abra novamente o launcher depois de o Steam iniciar.</string> + <string name="epic_client_download_failed">Falha na transferência: %1$s</string> + <string name="epic_client_unpack_failed">Não foi possível descompactar o launcher: %1$s</string> + <string name="epic_client_sign_in_failed">O Epic Games Launcher não aceitou o início de sessão. Inicia-o novamente a partir do launcher.</string> + <string name="epic_client_uninstall_body">Remove o launcher e liberta o seu espaço. Os teus jogos da Epic continuam instalados e a funcionar, e a sessão iniciada é guardada para quando o voltares a instalar.</string> + <string name="epic_client_uninstall_stops">A sessão em curso é fechada primeiro.</string> + <string name="epic_client_uninstalled">Epic Games Launcher desinstalado</string> + <string name="epic_client_uninstall_failed">Não foi possível remover alguns ficheiros do launcher. Tenta novamente.</string> + <string name="epic_client_uninstalling">Aguarde que o Epic Games Launcher termine de ser desinstalado</string> + <string name="store_cloud_saves">Dados guardados na nuvem</string> + <string name="cloud_upload">Carregar para a nuvem</string> + <string name="cloud_download">Transferir da nuvem</string> + <string name="cloud_none">Sem dados guardados na nuvem</string> + <string name="cloud_conflict">Conflito na nuvem</string> + <string name="cloud_conflict_files">Conflito na nuvem · %1$d ficheiros</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Manter nuvem</string> + <string name="cloud_keep_local">Manter local</string> + <string name="cloud_checking">A verificar a nuvem…</string> + <string name="cloud_last_sync">Última sincronização: %1$s</string> + <string name="cloud_never">Ainda não sincronizado</string> + <string name="cloud_done">%1$d ficheiros</string> + <string name="stores_eyebrow_installed">instalado</string> + <string name="stores_eyebrow_library">na sua biblioteca</string> + <string name="stores_eyebrow_store">loja</string> + <string name="achievements_title">Conquistas</string> + <string name="achievements_count">%1$d de %2$d desbloqueadas</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Desbloqueadas · %1$d</string> + <string name="achievements_group_locked">Bloqueadas · %1$d</string> + <string name="achievements_group_hidden">Ocultas · %1$d</string> + <string name="achievements_hidden">Conquista oculta</string> + <string name="achievements_hidden_detail">Os detalhes são mostrados quando for desbloqueada.</string> + <string name="achievements_all">Todas as conquistas desbloqueadas</string> + <string name="achievements_reading">A carregar…</string> + <string name="achievements_signed_out">Inicia sessão no %1$s para ver as tuas conquistas.</string> + <string name="achievements_unreachable">Não foi possível aceder ao %1$s. Verifica novamente quando estiveres online.</string> + <string name="achievements_none">O %1$s não lista conquistas para este jogo.</string> + <string name="achievements_show_all">Mostrar todas as %1$d</string> + <string name="achievements_dialog_title">Conquistas · %1$s</string> + <string name="stores_in_steam">✓ No Steam</string> + <string name="stores_uninstall">Desinstalar</string> + <string name="stores_uninstalling">A desinstalar…</string> + <string name="stores_uninstall_title">Desinstalar %1$s?</string> + <string name="stores_uninstall_body_size">Liberta %1$s e remove-o do Steam.</string> + <string name="stores_uninstall_body">Remove os ficheiros e o atalho do Steam.</string> + <string name="stores_launch_not_registered">O Steam deteta o jogo no próximo arranque; inicie-o a partir daí ou inicie o Steam agora.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Escolha do Steam por jogo</string> + <string name="stores_card_audio">Áudio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Componentes</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motor</string> + <string name="stores_card_engine_value">%1$s · nativo</string> + <string name="stores_card_engine_java">%1$s · integrado</string> + <string name="stores_how_it_runs">Como funciona</string> + <string name="stores_kv_fetched">Obtido de</string> + <string name="stores_kv_fetched_value">%1$s, com a sua conta</string> + <string name="stores_kv_installed_to">Instalado em</string> + <string name="stores_kv_installed_to_value">Armazenamento de jogos (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Iniciado por</string> + <string name="stores_kv_launched_by_value">Steam e Proton, o mesmo caminho dos jogos Steam</string> + <string name="stores_kv_launched_by_epic">Steam e Proton · início de sessão Epic em cada arranque, sobreposição EOS desativada</string> + <string name="stores_kv_launched_by_amazon">Steam e Proton · variáveis do Amazon Games Services definidas</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">adicionado ao Steam na instalação (interface Deck + Steam Input)</string> + <string name="stores_downloads_empty">Sem transferências</string> + <string name="stores_dl_paused">Em pausa</string> + <string name="stores_dl_queued">Em fila</string> + <string name="stores_dl_queued_at">Em fila · #%1$d</string> + <string name="stores_dl_cancelled">Cancelada</string> + <string name="stores_dl_failed">Falhou</string> + <string name="stores_dl_failed_reason">Falhou · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pausar</string> + <string name="stores_dl_resume">Retomar</string> + <string name="stores_dl_cancel">Cancelar</string> + <string name="stores_dl_retry">Tentar novamente</string> + <string name="stores_dl_clear">Limpar</string> + <string name="stores_dl_clear_all">Limpar concluídas</string> + <string name="stores_stage_manifest">Manifesto</string> + <string name="stores_stage_download">Transferência</string> + <string name="stores_stage_verify">Verificação</string> + <string name="stores_stage_install">Instalação</string> + <string name="stores_stage_done">Concluído</string> + <string name="stores_stage_checking">A verificar</string> + <string name="stores_stage_downloading">A transferir</string> + <string name="stores_dl_cancel_confirm">Eliminar transferência?</string> + <string name="stores_dl_failed_kept">Falhou · %1$s mantidos</string> + <string name="stores_stage_verifying">A verificar</string> + <string name="stores_stage_installing">A instalar</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d ficheiros</string> + <string name="stores_download_manager">Gestor de transferências</string> + <string name="stores_parallel">Transferências em simultâneo</string> + <string name="stores_install_where">Instalar em</string> + <string name="stores_install_title">Instalar %1$s:</string> + <string name="stores_target_internal">Interno</string> + <string name="stores_target_free">%1$s livres</string> + <string name="stores_notification_channel">Transferências da loja</string> + <string name="stores_notification_channel_hint">Mostra o progresso das transferências de jogos e mantém as transferências ativas em segundo plano</string> + <string name="stores_notification_one">A transferir</string> + <string name="stores_notification_many">%1$d transferências</string> + <string name="stores_notification_waiting">A preparar…</string> + <string name="stores_notification_done_channel">Transferências da loja concluídas</string> + <string name="stores_notification_installed">%1$s instalado</string> + <string name="stores_notification_failed">Falha na transferência de %1$s</string> + <string name="stores_notification_delete">Eliminar</string> + <string name="stores_notification_keep">Manter</string> + <string name="stores_login_title">Iniciar sessão em %1$s</string> + <string name="stores_login_provider_title">Iniciar sessão com o seu fornecedor</string> + <string name="stores_login_reload">Recarregar</string> + <string name="stores_login_close">Fechar</string> + <string name="stores_login_retry">Tentar novamente</string> + <string name="stores_login_finishing">A concluir o início de sessão…</string> + <string name="stores_login_error_network">Não foi possível carregar a página de início de sessão: %1$s</string> + <string name="stores_login_error_idp_blocked">Este fornecedor recusa o início de sessão a partir de uma página incorporada. Inicie sessão com a palavra-passe da loja.</string> + <string name="stores_login_error_http">A página de início de sessão respondeu com um erro (HTTP %1$d).</string> + <string name="stores_login_error_ssl">A ligação à página de início de sessão não é segura.</string> + <string name="stores_login_error_verification">Não foi possível verificar o início de sessão. Tente novamente.</string> + <string name="stores_login_error_generic">Falha no início de sessão. Tente novamente.</string> + <string name="common_close">Fechar</string> + <string name="common_back">Voltar</string> + <string name="common_edit">Editar</string> + <string name="games_add_all">Adicionar todos os jogos desta pasta</string> + <string name="games_added_none">Nada de novo nesta pasta</string> + <string name="edit_name">Nome</string> + <string name="edit_target">Destino</string> + <string name="edit_start_in">Iniciar em</string> + <string name="edit_launch_options">Opções de arranque</string> + <string name="edit_artwork">Imagens</string> + <string name="edit_other_exe">Outro exe…</string> + <string name="edit_remove">Remover</string> + <string name="art_cover">Capa</string> + <string name="art_wide_cover">Capa larga</string> + <string name="art_adjust_logo">Ajustar logótipo</string> + <string name="logo_pos_default">Predefinida</string> + <string name="logo_pos_upper_left">Superior esquerdo</string> + <string name="logo_pos_upper_center">Superior centro</string> + <string name="logo_pos_center">Centro</string> + <string name="logo_pos_bottom_left">Inferior esquerdo</string> + <string name="logo_pos_bottom_center">Inferior centro</string> + <string name="logo_pos_position">Posição</string> + <string name="logo_pos_size">Tamanho</string> + <string name="logo_pos_save">Guardar</string> + <string name="logo_pos_reset">Repor predefinição</string> + <string name="logo_pos_hint">É desenhado sobre o fundo do jogo, como o Steam faz. A posição exata pode variar alguns píxeis.</string> + <string name="logo_pos_no_logo">Este jogo ainda não tem logótipo. Escolha um em Logótipo para o ver aqui.</string> + <string name="logo_pos_failed">Não foi possível guardar a posição do logótipo. Tente novamente.</string> + <string name="art_background">Fundo</string> + <string name="art_logo">Logótipo</string> + <string name="art_icon">Ícone</string> + <string name="art_src_folder">Pasta do jogo</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">O seu ficheiro</string> + <string name="art_src_exe">Do exe</string> + <string name="art_src_auto">Automático</string> + <string name="art_pick_image">Escolher imagem…</string> + <string name="art_pick_title">Escolha uma imagem: %1$s</string> + <string name="art_reset">Repor automático</string> + <string name="art_search_sgdb">Procurar no SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Procurar um jogo</string> + <string name="art_sgdb_other_games">Outros resultados</string> + <string name="art_sgdb_none">Sem resultados.</string> + <string name="art_sgdb_no_key">O SteamGridDB precisa de uma chave de API. Adicione a sua em Configuração › Iniciador.</string> + <string name="art_sgdb_bad_key">O SteamGridDB não aceitou a chave de API. Verifique-a em Configuração › Iniciador.</string> + <string name="art_sgdb_limit">O SteamGridDB está a limitar os pedidos neste momento. Tente novamente dentro de um minuto.</string> + <string name="art_sgdb_offline">Não foi possível contactar o SteamGridDB. Verifique a ligação.</string> + <string name="art_sgdb_server">O SteamGridDB teve um problema. Tente mais tarde.</string> + <string name="art_sgdb_no_game">O SteamGridDB não tem resultados para este jogo. Tente procurá-lo.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d jogo adicionado</item> + <item quantity="many">%1$d jogos adicionados</item> + <item quantity="other">%1$d jogos adicionados</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d já está em Jogos</item> + <item quantity="many">%1$d já estão em Jogos</item> + <item quantity="other">%1$d já estão em Jogos</item> + </plurals> + <string name="hop_back">B · Voltar para %1$s</string> + <string name="hop_from_games">o jogo</string> + <string name="hop_from_play">as definições de jogo</string> + <string name="sheet_graphics_drivers">Controladores gráficos</string> + <string name="comp_this_proton">Este Proton</string> + <string name="comp_every_proton">Todos os Proton</string> + <string name="comp_for_every_proton">Para todos os Proton</string> + <string name="comp_available_count">Disponíveis · %1$d</string> + <string name="comp_checked">Verificado %1$s</string> + <string name="comp_check_all">Procurar novos componentes e controladores</string> + <string name="comp_get">Obter</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton e FEX abaixo são deste Proton</string> + <string name="comp_device_tested">%1$s · testado</string> + <string name="comp_device_untested">%1$s · não testado</string> + <string name="comp_device_unsupported">%1$s · não suportado</string> + <string name="gpu_auto_keeps">Mantém o par recomendado atualizado</string> + <string name="gpu_bar_auto">Automático · %1$s</string> + <string name="gpu_separately">Controladores do runtime e de ecrã em separado</string> + <string name="gpu_use_title">Usar %1$s?</string> + <string name="gpu_mode_title">Como os controladores são escolhidos</string> + <string name="gpu_mode_auto_detail">O melhor par para esta GPU, sempre atualizado</string> + <string name="gpu_mode_pair">Par combinado</string> + <string name="gpu_mode_pair_detail">Escolha um par; define os dois controladores</string> + <string name="gpu_mode_mix">Combine livremente</string> + <string name="gpu_mode_mix_detail">Escolha vídeo e ambiente de execução em separado</string> + <string name="gpu_mode_pair_short">Par</string> + <string name="gpu_mode_mix_short">Misto</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAR</string> + <string name="gpu_src_bundle">PACOTE</string> + <string name="gpu_src_chosen">ESCOLHIDO</string> + <string name="gpu_src_by_gpu">POR GPU</string> + <string name="gpu_src_default">PREDEFINIÇÃO</string> + <string name="gpu_display_live">Desenha agora</string> + <string name="gpu_display_pending">Reinício pendente · até lá desenha %1$s</string> + <string name="gpu_runtime_live">Em execução</string> + <string name="gpu_runtime_pending">Próxima sessão · esta mantém %1$s</string> + <string name="gpu_display_next">Desenha o ecrã. Aplica-se a partir da próxima sessão.</string> + <string name="gpu_previous_driver">o controlador anterior</string> + <string name="gpu_restart_banner">Reinicie para mudar o controlador de vídeo.</string> + <string name="gpu_restart_blocked">Termine a sessão atual e reinicie o DroidDeck para mudar o controlador de vídeo.</string> + <string name="gpu_restart_now">Reiniciar agora</string> + <string name="gpu_restart_later">Mais tarde</string> + <string name="gpu_auto_title">O Automático escolheu este par para a sua %1$s</string> + <string name="gpu_auto_builtin_title">O Automático usa os controladores integrados para a sua %1$s</string> + <string name="gpu_auto_reason">Escolhido para a família %1$s. As versões novas instalam-se em segundo plano.</string> + <string name="gpu_pair_title">Escolha um par</string> + <string name="gpu_pair_hint">Um par define o controlador de vídeo e o do ambiente de execução em conjunto.</string> + <string name="gpu_mix_title">Escolha cada controlador</string> + <string name="gpu_mix_hint">Um pacote preenche os dois lugares. As mudanças de vídeo aplicam-se após um reinício, as do ambiente de execução na próxima sessão.</string> + <string name="gpu_change_display">Mudar controlador de vídeo</string> + <string name="gpu_change_runtime">Mudar controlador do ambiente de execução</string> + <string name="gpu_autos_pick">ESCOLHA DO AUTOMÁTICO</string> + <string name="gpu_installed">Instalado</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · reinicie para aplicar</string> + <string name="gpu_chip_restart">%1$s · reinício pendente</string> + <string name="comp_this_device">Este dispositivo</string> + <string name="proton_remove_title">Remover %1$s?</string> + <string name="setup_tab_diagnostics">Diagnóstico</string> + <string name="setup_ready">Pronto para jogar</string> + <string name="setup_not_ready">Ainda não está pronto para jogar</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">limite de processos desativado</string> + <string name="setup_ready_signed_in">sessão iniciada como %1$s</string> + <string name="setup_needs_you">Quando algo precisa de si</string> + <string name="setup_group_look">Aspeto</string> + <string name="setup_group_device">Este dispositivo</string> + <string name="setup_group_art">Imagens da biblioteca</string> + <string name="setup_group_download">Transferência</string> + <string name="setup_download_source">Origem</string> + <string name="setup_download_source_auto">Automática</string> + <string name="setup_download_source_direct">Direta</string> + <string name="setup_download_source_mirror">Espelho</string> + <string name="setup_download_source_custom">Prefixo personalizado</string> + <string name="setup_download_mirror">Site</string> + <string name="setup_download_prefix">Prefixo</string> + <string name="flathub_eyebrow">APPS LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Apps para o ambiente de trabalho Linux, abertas a partir de Ambiente de trabalho.</string> + <string name="flathub_setup">Configurar o Flathub</string> + <string name="flathub_remove_title">Remover %1$s?</string> + <string name="flathub_remove_note">As definições e os ficheiros da app são mantidos.</string> + <string name="flathub_keep">Manter</string> + <string name="desktop_size">Tamanho no disco</string> + <string name="desktop_uninstall_title">Desinstalar o ambiente de trabalho?</string> + <string name="desktop_all_systems">Todos</string> + <string name="gog_achievements">Conquistas da GOG</string> + <string name="gog_achievements_hint">Sincroniza conquistas dos jogos compatíveis da GOG. Aplica-se no próximo arranque.</string> + <string name="gog_achievements_off">Conquistas desativadas</string> + <string name="gog_achievements_on">Conquistas ativadas</string> + <string name="gog_achievements_signin">Inicia sessão na GOG novamente</string> + <string name="gog_achievements_uploaded">Conquistas enviadas</string> + <string name="gog_achievements_pending">Envio da conquista pendente</string> + <string name="gog_achievements_enable_store">Ativa as conquistas da GOG nas definições de Lojas</string> + <string name="gog_achievements_unavailable">Conquistas indisponíveis; verifica os registos da sessão</string> + <string name="achievement_unlocked">Conquista desbloqueada</string> + <string name="touch_paste">Colar</string> + <string name="touch_dpad">Direcional</string> + <string name="touch_left_stick">Stick esquerdo</string> + <string name="touch_right_stick">Stick direito</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Teclado</string> + <string name="touch_dpad_up">Direcional para cima</string> + <string name="touch_dpad_down">Direcional para baixo</string> + <string name="touch_dpad_left">Direcional para a esquerda</string> + <string name="touch_dpad_right">Direcional para a direita</string> + <string name="touch_title">Controlos táteis</string> + <string name="touch_controller">Controlador tátil</string> + <string name="touch_mouse">Rato</string> + <string name="touch_on">Ativado</string> + <string name="touch_off">Desativado</string> + <string name="touch_speed_slow">Lenta</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Rápida</string> + <string name="touch_edit_layout">Editar esquema</string> + <string name="touch_droiddeck_menu">Menu do DroidDeck</string> + <string name="touch_drag_hint">Arrasta os controlos para o ecrã</string> + <string name="touch_arrange">Organizar</string> + <string name="touch_discard">Rejeitar</string> + <string name="touch_saving">A guardar…</string> + <string name="touch_icon">Ícone</string> + <string name="touch_narrower">L−</string> + <string name="touch_wider">L+</string> + <string name="touch_shorter">A−</string> + <string name="touch_taller">A+</string> + <string name="touch_hide">Ocultar</string> + <string name="touch_color_opacity">Cor e opacidade…</string> + <string name="touch_copy_layout">Copiar este esquema</string> + <string name="touch_layout_copied">Esquema copiado; cola-o no esquema tátil de qualquer jogo</string> + <string name="touch_paste_layout">Colar esquema copiado</string> + <string name="touch_reset_layout">Restaurar o padrão da Steam</string> + <string name="touch_no_binding">Este controlo não tem uma ação atribuída na Steam para receber um ícone</string> + <string name="touch_icon_for">Ícone para %1$s</string> + <string name="touch_layout_color">Cor do esquema tátil</string> + <string name="touch_done">Concluído</string> + <string name="touch_save_failed">Não foi possível guardar o esquema tátil</string> + <string name="touch_saved">Esquema tátil guardado na Steam</string> + <string name="touch_app_id">Aplicação %1$d</string> + <string name="touch_label_hint">Etiqueta (opcional)</string> + <string name="touch_icons_missing">Os ícones da Steam não foram encontrados</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d ícone da Steam</item> + <item quantity="many">%1$d ícones da Steam</item> + <item quantity="other">%1$d ícones da Steam</item> + </plurals> + <string name="touch_icon_color">Cor do ícone</string> + <string name="touch_button_color">Cor do botão</string> + <string name="touch_no_icon">Sem ícone</string> + + <string name="stores_sync_sign_in">A verificar o início de sessão…</string> + <string name="stores_sync_library">A obter a tua biblioteca…</string> + <string name="stores_sync_game_list">A obter a lista de jogos…</string> + <string name="stores_sync_details">A carregar os detalhes dos jogos… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">A sincronizar %1$d jogo…</item> + <item quantity="many">A sincronizar %1$d jogos…</item> + <item quantity="other">A sincronizar %1$d jogos…</item> + </plurals> + <string name="stores_sync_progress">A sincronizar… %1$d/%2$d</string> + <string name="stores_sync_cover_art">A obter as capas…</string> + <string name="stores_sync_failed">Falha na sincronização</string> + <string name="stores_sync_no_games">Não foram encontrados jogos na tua biblioteca da %1$s</string> + <string name="stores_sync_amazon_no_answer">A Amazon Games não respondeu sobre a tua biblioteca: atualiza, ou inicia sessão novamente</string> + <string name="stores_sync_gog_unreachable">Não foi possível contactar a GOG</string> + <string name="stores_sync_gog_unreadable">Não foi possível ler a tua biblioteca da GOG</string> + <string name="stores_registering">A registar na Steam…</string> + <string name="mode_client_arch">Cliente Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnóstico do VAC</string> + <string name="setup_vac_diag_hint">Os jogos Source registam a consola (-condebug); o vac.txt nos registos da sessão indica se está seguro ou não</string> + <string name="load_starting_steam_x64">A iniciar o Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Usado pelo cliente Steam x86-64</string> + <string name="storage_uninstall_in_x64">Esta cópia está no cliente Steam x86-64. Escolha x86-64 em Cliente Steam e depois desinstale-a aqui.</string> + <string name="storage_uninstall_in_arm64">Esta cópia está no cliente Steam ARM64. Escolha ARM64 em Cliente Steam e depois desinstale-a aqui.</string> + <string name="drawer_page_glasses">Óculos</string> + <string name="glasses_open">Óculos VITURE</string> + <string name="glasses_control">Controlo dos óculos</string> + <string name="glasses_driver_missing">Esta versão não inclui o controlador para estes óculos.</string> + <string name="glasses_connection_failed">Não foi possível ligar aos óculos. Volte a ligar o cabo ou toque em Permitir para tentar novamente.</string> + <string name="glasses_allow">Permitir</string> + <string name="glasses_allow_hint">Permite que o DroidDeck defina a taxa de atualização, o modo 3D, o brilho, o volume e o escurecimento dos óculos, e leia o seguimento da cabeça.</string> + <string name="glasses_asking">A aguardar que permita no pedido do Android…</string> + <string name="glasses_denied">O controlo foi recusado. Permita-o para alterar as definições dos óculos.</string> + <string name="glasses_no_control">Estes óculos mostram o jogo, mas as definições deles não podem ser alteradas aqui.</string> + <string name="glasses_output">Saída</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Jogo nos óculos</string> + <string name="glasses_game_on_hint">Mostra o jogo só nos óculos. Desativado: o telemóvel mostra-o e o Android espelha o ecrã do telemóvel.</string> + <string name="glasses_display">Ecrã</string> + <string name="glasses_refresh">Taxa de atualização</string> + <string name="glasses_3d">3D (lado a lado)</string> + <string name="glasses_3d_hint">Alterne os óculos inteligentes para 3D lado a lado. O rastreio da cabeça é controlado separadamente.</string> + <string name="glasses_3d_failed">O sinal 3D não foi confirmado. Tenta novamente quando a imagem 2D voltar.</string> + <string name="glasses_no_signal">Sem imagem: os óculos estão num modo que este telemóvel não consegue enviar. Mantenha premido o botão 2D/3D ou desligue-os e volte a ligá-los.</string> + <string name="glasses_3d_refresh">Taxa de atualização em 3D</string> + <string name="glasses_auto3d">3D para jogos de RV</string> + <string name="glasses_auto3d_hint">Muda para 3D enquanto o SteamVR está em execução e volta depois.</string> + <string name="glasses_picture">Imagem</string> + <string name="glasses_picture_hint">O modo automático apresenta conteúdo plano em ambos os olhos e deteta o SteamVR. Selecione Jogo lado a lado para conteúdo SBS.</string> + <string name="glasses_picture_auto">Automático</string> + <string name="glasses_picture_screen">Ecrã virtual</string> + <string name="glasses_picture_sbs">Jogo lado a lado</string> + <string name="glasses_screen_size">Largura do ecrã</string> + <string name="glasses_screen_distance">Distância do ecrã</string> + <string name="glasses_screen_next_session">A largura e a distância aplicam-se quando um jogo é executado nos óculos como ecrã virtual.</string> + <string name="glasses_screen_no_output">Estas definições aplicam-se enquanto Jogo nos óculos estiver ativado e o jogo for mostrado nos óculos.</string> + <string name="glasses_screen_flat_hint">O modo Automático mantém este jogo 2D em ecrã inteiro. Utilize um ecrã virtual para ajustar a largura, a distância e o seguimento da cabeça.</string> + <string name="glasses_screen_use">Utilizar ecrã virtual</string> + <string name="glasses_screen_direct_hint">O SteamVR preenche a pré-visualização. Ajuste o seu campo de visão em VR; a largura e a distância aplicam-se apenas a um ecrã virtual.</string> + <string name="glasses_screen_sbs_hint">Os jogos lado a lado preenchem a vista de cada olho. A largura e a distância aplicam-se apenas a um ecrã virtual.</string> + <string name="glasses_tracking_flat_hint">O modo Automático mantém este jogo 2D fixo na vista. Escolha Ecrã virtual na secção Ecrã para utilizar o seguimento da cabeça.</string> + <string name="glasses_tracking_sbs_hint">O seguimento da cabeça aplica-se a um ecrã virtual ou a um jogo do SteamVR em execução.</string> + <string name="glasses_hardware">Dispositivo</string> + <string name="glasses_brightness">Brilho</string> + <string name="glasses_volume">Volume</string> + <string name="glasses_sunblock">Escurecimento</string> + <string name="glasses_sunblock_hint">Escurece as lentes frontais.</string> + <string name="glasses_tracking">Rastreio</string> + <string name="glasses_head_tracking">Seguimento da cabeça</string> + <string name="glasses_head_tracking_hint">Os sensores dos próprios óculos rodam o ecrã virtual e o SteamVR com a sua cabeça.</string> + <string name="glasses_recenter">Recentrar vista</string> + <string name="glasses_recenter_button">Recentralizar ecrã</string> + <string name="glasses_vr_fov">Campo de visão do SteamVR</string> + <string name="glasses_vr_fov_hint">Mais baixo aproxima o SteamVR e preenche os óculos; mais alto mostra mais à sua volta.</string> + <string name="glasses_playing">A jogar em %1$s</string> + <string name="glasses_calibration">Calibração do seguimento</string> + <string name="glasses_calibration_hint">Reduz a deriva e alinha a referência de nível.</string> + <string name="glasses_calibration_saved_hint">A calibração guardada é aplicada a estes óculos.</string> + <string name="glasses_calibration_open">Calibrar</string> + <string name="glasses_calibration_instructions">Coloque os óculos ligados de cabeça para baixo numa superfície nivelada, com a armação bem assente. Toque em Iniciar e não mexa neles durante cerca de 8 segundos. Qualquer movimento reinicia a medição. Isto ajusta a deriva e a inclinação, não a direção.</string> + <string name="glasses_calibration_settling">Deixe os óculos de cabeça para baixo, sem lhes tocar. A aguardar que estabilizem…</string> + <string name="glasses_calibration_collecting">A medir os sensores. Mantenha os óculos imóveis.</string> + <string name="glasses_calibration_moving">Movimento detetado. Não toque nos óculos; a medição recomeça automaticamente.</string> + <string name="glasses_calibration_turn_over">Pouse os óculos de cabeça para baixo numa superfície nivelada. A medição começa quando estiverem na posição correta.</string> + <string name="glasses_calibration_complete">Calibração guardada. Coloque os óculos e olhe em frente; depois toque em Concluído para recentrar.</string> + <string name="glasses_calibration_failed">Não foi possível concluir a calibração. Verifique a ligação, mantenha os óculos imóveis e tente novamente. A calibração anterior não foi alterada.</string> + <string name="glasses_calibration_start">Iniciar</string> + <string name="glasses_calibration_done">Concluído</string> + <string name="glasses_calibration_reset">Repor calibração do seguimento</string> + <string name="glasses_calibration_reset_hint">Remover a calibração guardada e repor as predefinições do modelo? Recentre depois de voltar a colocar os óculos.</string> + <string name="glasses_calibration_reset_button">Repor</string> + <string name="hand_camera_group">Seguimento das mãos</string> + <string name="hand_camera_prompt_title">Rastrear mãos ou comandos Joy-Con com a câmara do telemóvel?</string> + <string name="hand_camera_prompt_body">Sem qualquer comando ligado, a câmara do telemóvel segue as suas mãos nuas em VR: junte o polegar e o indicador para clicar, feche a mão para agarrar e vire a palma da mão na sua direção e junte para abrir o menu. Com os controlos Joy-Con emparelhados, a câmara acompanha a sua posição enquanto os controlos Joy-Con fornecem rotação e entradas de botão. As imagens são processadas neste dispositivo e nunca são guardadas ou enviadas.</string> + <string name="hand_camera_rear">Câmara traseira</string> + <string name="hand_camera_rear_hint">Recomendada. Costuma ser mais nítida e ampla.</string> + <string name="hand_camera_front">Câmara frontal</string> + <string name="hand_camera_front_hint">Para quando a parte de trás do dispositivo não puder ficar virada para ti.</string> + <string name="hand_camera_allow">Utilizar câmara</string> + <string name="hand_camera_not_now">Agora não</string> + <string name="hand_camera_setting">Seguimento das mãos pela câmara</string> + <string name="hand_camera_setting_hint">Utilize a câmara do telefone para gestos com as mãos nuas ou para posicionar os controlos Joy-Con emparelhados em RV. Os comandos Joy-Con proporcionam rotação e comandos dos botões. Pausa enquanto os óculos inteligentes rastreiam as suas mãos ou os comandos Joy-Con. As imagens são processadas apenas neste dispositivo.</string> + <string name="hand_camera_choice">Câmara</string> + <string name="hand_camera_access">Acesso à câmara</string> + <string name="hand_camera_access_hint">Permita o acesso à câmara para que o seguimento das mãos possa começar.</string> + <string name="hand_camera_access_denied">O acesso à câmara está desativado. Ative-o nas definições do Android.</string> + <string name="hand_camera_allow_button">Permitir</string> + <string name="hand_camera_open_settings">Abrir definições</string> + <string name="hand_camera_placement">Posição da câmara</string> + <string name="hand_camera_placement_hint">Verifique se a câmara te consegue ver antes de jogar.</string> + <string name="hand_camera_check">Verificar</string> + <string name="hand_camera_check_title">Posição da câmara</string> + <string name="hand_camera_how_rear">Coloque o dispositivo em pé a 1,5-2 metros de distância, à altura do peito, com a câmara traseira voltada para ti. Depois entre no campo de visão com as mãos estendidas.</string> + <string name="hand_camera_how_front">Coloque o dispositivo em pé a 1,5-2 metros de distância, à altura do peito, com o ecrã voltado para ti. Depois entre no campo de visão com as mãos estendidas.</string> + <string name="hand_camera_starting">A iniciar a câmara…</string> + <string name="hand_camera_stand_up">O dispositivo está deitado. Coloque-o em pé para a câmara ficar voltada para ti.</string> + <string name="hand_camera_upright">Coloque o dispositivo mais direito para a câmara ficar voltada para ti.</string> + <string name="hand_camera_not_seen">Ainda não consegue ver-te. Entre no campo de visão para mostrar a cabeça e os ombros.</string> + <string name="hand_camera_move_back">Afaste-se um pouco.</string> + <string name="hand_camera_move_closer">Aproxime-se um pouco mais.</string> + <string name="hand_camera_show_hands">Mostre as duas mãos onde a câmara as consiga ver.</string> + <string name="hand_camera_good">Parece bem.</string> + <string name="hand_camera_failed">Não foi possível iniciar a câmara. Feche outras apps que estejam a usar a câmara e tente novamente.</string> + <string name="hand_camera_switch">Mudar de câmara</string> + <string name="hand_camera_skip">Ignorar</string> + <string name="hand_camera_done">Concluído</string> + <string name="glasses_xreal_network_missing">A aguardar a ligação Ethernet por USB dos óculos. Este telemóvel pode não a disponibilizar às apps.</string> + <string name="glasses_xreal_connection_failed">A ligação aos óculos XREAL foi interrompida ou devolveu uma resposta não suportada. A tentar novamente…</string> + <string name="glasses_xreal_experimental">Suporte experimental para os 1S. Utilize o modo Follow e desative a estabilização no menu dos óculos. As direções de seguimento e os modos de ecrã ainda têm de ser testados no dispositivo.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Modo Cardboard</string> + <string name="cardboard_mode_hint">Imagens para o olho esquerdo e o direito, para uns óculos de RV para telemóvel.</string> + <string name="cardboard_source">Imagem</string> + <string name="cardboard_source_screen">Ecrã virtual</string> + <string name="cardboard_source_sbs">3D lado a lado</string> + <string name="cardboard_viewer">Óculos</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Sem lente</string> + <string name="cardboard_ipd">Distância entre os olhos</string> + <string name="cardboard_screen_width">Largura do ecrã</string> + <string name="cardboard_screen_distance">Distância do ecrã</string> + <string name="cardboard_head_tracking">Seguimento da cabeça</string> + <string name="cardboard_no_sensor">Este dispositivo não tem sensor de rotação.</string> + <string name="cardboard_recenter">Recentrar vista</string> + <string name="cardboard_recenter_button">Recentrar</string> + <string name="cardboard_steamvr">SteamVR (experimental)</string> + <string name="cardboard_steamvr_install">Instalar</string> + <string name="cardboard_steamvr_installing">A transferir e a descompactar o SteamVR…</string> + <string name="cardboard_steamvr_start">Iniciar</string> + <string name="cardboard_steamvr_stop">Parar</string> + <string name="cardboard_steamvr_unavailable">Indisponível nesta sessão.</string> + <string name="cardboard_steamvr_failed">O SteamVR não respondeu; verifica o registo da sessão.</string> + <string name="drawer_component_downloads">Transferir componentes</string> + <string name="drawer_component_downloads_hint">As transferências são partilhadas com a página Componentes. Escolhe acima uma versão transferida para a usar quando iniciares o próximo jogo.</string> + <string name="drawer_component_choose_download">Escolhe uma versão para transferir</string> + <string name="stores_fact_developer">Programadora</string> + <string name="stores_fact_publisher">Editora</string> + <string name="stores_fact_released">Lançamento</string> + <string name="stores_hltb_main">Principal</string> + <string name="stores_hltb_extras">+ Extras</string> + <string name="stores_hltb_completionist">Completista</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="setup_reset_settings">Repor todas as definições</string> + <string name="setup_reset_settings_title">Repor todas as definições?</string> + <string name="setup_reset_settings_body">As definições de ecrã, desempenho, comando, tema, idioma e iniciador voltam ao padrão. Os seus jogos, o início de sessão no Steam, as contas das lojas, os controladores transferidos e as pastas de armazenamento são mantidos.</string> + <string name="setup_reset_settings_hint">Repõe todas as definições para o padrão</string> + <string name="setup_reset_settings_partial">As definições foram repostas, mas algumas partes não puderam ser repostas. Os detalhes estão nos registos.</string> + <string name="setup_reset_settings_button">Repor</string> + <string name="setup_reset_settings_profiles">Repor também os perfis de jogo (Proton, FEX, componentes e ambiente de cada jogo e o ambiente do perfil Padrão)</string> + <string name="setup_reset_settings_session_running">Termine a sessão antes de repor as definições.</string> + <string name="mode_zram">Compressão zRAM</string> + <string name="mode_zram_unsupported">Indisponível: este dispositivo não tem swap ativo ou o kernel é anterior à versão 5.4.</string> + <string name="mode_zram_hint">Enquanto um jogo está a correr, a memória do cliente Steam é comprimida na zram do dispositivo, deixando mais RAM para o jogo. Aplica-se a partir da próxima vez que o Steam iniciar.</string> + <string name="stores_storage_low">Espaço insuficiente (%1$s livres, são necessários %2$s)</string> + <string name="stores_storage_insufficient">Espaço livre insuficiente: são necessários %1$s, só há %2$s livres</string> + <string name="stores_target_free_unknown">Espaço livre desconhecido</string> + <string name="display_picture_position">Posição da imagem</string> + <string name="display_position_top">Topo</string> + <string name="display_position_bottom">Fundo</string> + <string name="display_position_center">Centro (predefinido)</string> + <string name="setup_tab_storage">Armazenamento</string> + <string name="storage_measuring">A medir o armazenamento…</string> + <string name="storage_measuring_hint">Na primeira vez demora alguns segundos.</string> + <string name="storage_internal">Armazenamento interno</string> + <string name="storage_used_of">%1$s de %2$s usados</string> + <string name="storage_free">%1$s livres</string> + <string name="storage_droiddeck_uses">O DroidDeck ocupa %1$s. Medido a %2$s.</string> + <string name="storage_rescanning">a medir novamente…</string> + <string name="storage_other_apps">Outras aplicações Android</string> + <string name="storage_safe_now">Pode libertar-se agora</string> + <string name="storage_safe_hint">Ambientes de execução sem uso, resíduos, registos antigos</string> + <string name="storage_clean_up">Limpar…</string> + <string name="storage_session_running">Termine a sessão para limpar ou remover algo. Os tamanhos continuam visíveis.</string> + <string name="storage_where">Para onde vai</string> + <string name="storage_games">Jogos do Steam</string> + <string name="storage_game_data">Dados dos jogos</string> + <string name="storage_game_data_hint">Prefixos %1$s · workshop %2$s · shaders %3$s</string> + <string name="storage_tools">Proton e ambientes de execução</string> + <string name="storage_tools_unused">%1$s sem uso</string> + <string name="storage_stores">GOG, Epic e outras lojas</string> + <string name="storage_stores_hint">Desinstale em Lojas</string> + <string name="storage_desktop">Aplicações de ambiente de trabalho</string> + <string name="storage_desktop_hint">Aplicações e ambientes de execução Flatpak</string> + <string name="storage_system">Sistema Linux e cliente Steam</string> + <string name="storage_system_hint">Necessário para executar qualquer coisa</string> + <string name="storage_app_data">Dados do DroidDeck</string> + <string name="storage_app_data_hint">Registos de sessões antigas %1$s · cache · controladores</string> + <string name="storage_legend_games">Jogos</string> + <string name="storage_legend_data">Dados dos jogos</string> + <string name="storage_legend_tools">Proton e ambientes de execução</string> + <string name="storage_legend_stores">Outras lojas</string> + <string name="storage_legend_desktop">Aplicações de ambiente de trabalho</string> + <string name="storage_legend_system">Sistema Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Limpeza</string> + <string name="storage_clean_up_lede">Aqui nada toca nos jogos instalados nem nas transferências em curso.</string> + <string name="storage_nothing_to_clean">Não há nada para limpar neste momento.</string> + <string name="storage_selected">Selecionado: %1$s · %2$s → %3$s livres</string> + <string name="storage_cleaning">A limpar…</string> + <string name="storage_free_button">Libertar %1$s</string> + <string name="storage_freed">%1$s libertados.</string> + <string name="storage_item_runtimes">Ambientes de execução e Proton do Steam sem uso</string> + <string name="storage_item_leftovers">Resíduos de jogos desinstalados</string> + <string name="storage_item_leftovers_unsure">Resíduos que podem conter jogos guardados</string> + <string name="storage_item_logs">Registos de sessões antigas</string> + <string name="storage_item_logs_detail">Mantém os registos da sessão atual</string> + <string name="storage_item_custom_detail">Nenhum jogo o usa. Reinstale em Componentes se precisar.</string> + <string name="storage_item_shaders">Cache de shaders dos jogos instalados</string> + <string name="storage_item_shaders_detail">Voltam a ser criadas a jogar. Os primeiros minutos de cada jogo voltam a ter quebras.</string> + <string name="storage_tag_safe">Seguro</string> + <string name="storage_tag_unused">Sem uso</string> + <string name="storage_tag_stutter">Quebras</string> + <string name="storage_tag_saves">Verifique os jogos guardados</string> + <string name="storage_tag_default">Predefinido</string> + <string name="storage_tag_required">Necessário</string> + <string name="storage_tag_not_used">Sem uso</string> + <string name="storage_back">Armazenamento</string> + <string name="storage_games_with_data">%1$s com os seus dados</string> + <string name="storage_sort_largest">Maiores</string> + <string name="storage_sort_least_played">Menos jogados</string> + <string name="storage_sort_sd">No cartão SD</string> + <string name="storage_no_games">Não há jogos aqui.</string> + <string name="storage_played">Jogado %1$s</string> + <string name="storage_never_played">Nunca jogado</string> + <string name="storage_game_parts">Jogo %1$s · dados %2$s</string> + <string name="storage_uninstall">Desinstalar</string> + <string name="storage_games_note">Desinstalar abre a janela do Steam, para o Steam o registar. Para mover um jogo para o cartão SD, use Steam › Definições › Armazenamento.</string> + <string name="storage_uninstall_title">Desinstalar %1$s?</string> + <string name="storage_uninstall_body">O Steam abre e pede confirmação. Isto liberta os %1$s do jogo. O prefixo fica até limpar os resíduos, e os jogos guardados do Steam Cloud continuam na sua conta.</string> + <string name="storage_open_steam">Abrir o Steam</string> + <string name="storage_tools_detail">%1$s · %2$s sem uso</string> + <string name="storage_remove_unused">Remover sem uso · %1$s</string> + <string name="storage_in_use">Em uso</string> + <string name="storage_not_used">Sem uso</string> + <string name="storage_remove">Remover</string> + <string name="storage_remove_title">Remover %1$s?</string> + <string name="storage_remove_body">Liberta %1$s. O Steam volta a transferi-lo se um jogo precisar.</string> + <string name="storage_tool_fex_runtime">Necessário para jogos Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Necessário para os Proton ARM64</string> + <string name="storage_tool_redist">Instaladores VC++ e DirectX exigidos pelos jogos</string> + <string name="storage_tool_fex">Executa jogos Linux x86</string> + <string name="storage_tool_steam">Ferramenta do Steam</string> + <string name="storage_tool_old_runtime">O DroidDeck executa jogos sem este ambiente de execução</string> + <string name="storage_tool_x86_proton">Proton x86, que o DroidDeck não consegue executar</string> + <string name="storage_tool_custom_default">Predefinido para todos os jogos</string> + <string name="storage_tool_custom_unused">Nenhum jogo o usa</string> + <string name="storage_tool_custom_unknown">As definições do Steam não são legíveis, por isso é mantido</string> + <string name="storage_cleanup_busy">Aguarde o fim da limpeza do armazenamento</string> + <string name="storage_low_title">Apenas %1$s livres</string> + <string name="storage_low_body">O Steam precisa de espaço para atualizações e cache de shaders. Abaixo de 10 GB, as atualizações dos jogos podem falhar a meio.</string> + <string name="storage_low_safe">%1$s podem ser libertados sem risco.</string> + <string name="storage_free_up">Libertar espaço</string> + <string name="storage_play_anyway">Jogar mesmo assim</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d instalado</item> + <item quantity="other">%d instalados</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d no cartão SD</item> + <item quantity="other">%d no cartão SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d ferramenta</item> + <item quantity="other">%d ferramentas</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Pastas de prefixo vazias e cache de shaders de %d jogo</item> + <item quantity="other">Pastas de prefixo vazias e cache de shaders de %d jogos</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">O prefixo de %d jogo ainda tem ficheiros, que podem incluir jogos guardados locais. Se precisar deles, faça uma cópia antes.</item> + <item quantity="other">Os prefixos de %d jogos ainda têm ficheiros, que podem incluir jogos guardados locais. Se precisar deles, faça uma cópia antes.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d jogo</item> + <item quantity="other">%d jogos</item> + </plurals> + <string name="storage_tool_default_proton">Proton predefinido do DroidDeck</string> + <string name="storage_tool_proton">Opção Proton 11 do DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Usado por %d jogo</item> + <item quantity="other">Usado por %d jogos</item> + </plurals> + <string name="storage_legend_components">Componentes</string> + <string name="storage_components">Componentes</string> + <string name="storage_item_components">Componentes sem uso</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Liberta %1$s. Restaura apenas uma versão do Proton que já não está instalada.</string> + <string name="storage_leftovers_unchecked">Não verificado: o manifesto de uma aplicação Steam não é legível, por isso os prefixos de jogos desinstalados ficam até ser.</string> + <string name="storage_failed">Não foi possível concluir: %1$s</string> + <string name="storage_desktop_shared">%1$s partilhados</string> + <string name="storage_data_installed">Jogos instalados</string> + <string name="storage_data_parts">Prefixo %1$s · shaders %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Apagar shaders</string> + <string name="storage_data_leftovers">Jogos desinstalados</string> + <string name="storage_steam_app">Aplicação Steam %1$d</string> + <string name="storage_leftover_unsure_detail">O prefixo dele ainda tem ficheiros, que podem incluir jogos guardados locais</string> + <string name="storage_leftover_confirm">Apaga o prefixo Wine e a cache de shaders dele (%1$s). Faça antes uma cópia dos jogos guardados de que precisar; os do Steam Cloud ficam na sua conta.</string> + <string name="storage_data_other">Mantidos</string> + <string name="storage_data_other_title">Jogos não Steam e prefixo partilhado do Steam</string> + <string name="storage_data_other_detail">Prefixos de jogos adicionados pelas lojas ou à mão</string> + <string name="storage_components_packages">Pacotes transferidos</string> + <string name="storage_components_originals">Originais mantidos</string> + <string name="storage_components_none">Nenhum pacote de componentes transferido.</string> + <string name="storage_component_in_use">Escolhido para um Proton ou jogo</string> + <string name="storage_component_unused">Não escolhido em lado nenhum</string> + <string name="storage_original_kept">Restaura o Proton instalado</string> + <string name="storage_original_old">Versão do Proton que já não está instalada</string> + <string name="storage_tag_in_use">Em uso</string> + <string name="storage_components_note">Os componentes em uso ficam bloqueados. Escolha-os em Componentes; o que remover aqui pode ser transferido novamente lá.</string> + <string name="storage_component_confirm">Liberta %1$s. Os pacotes que importou não podem ser transferidos novamente.</string> + <string name="storage_desktop_detail">%1$s para aplicações Flatpak e o que elas partilham</string> + <string name="storage_desktop_apps_title">Aplicações</string> + <string name="storage_desktop_none">Nenhuma aplicação Flatpak instalada.</string> + <string name="storage_desktop_shared_title">Partilhado pelas aplicações</string> + <string name="storage_desktop_runtimes">Ambientes de execução</string> + <string name="storage_desktop_runtimes_detail">Bibliotecas em que as aplicações correm; os sem uso saem em Remover sem uso</string> + <string name="storage_desktop_cache">Depósito de transferências</string> + <string name="storage_desktop_cache_detail">Object store e transferências em cache do Flatpak</string> + <string name="storage_desktop_prune">Remover sem uso</string> + <string name="storage_desktop_prune_body">Remove os ambientes de execução que nenhuma aplicação instalada pede e limpa o object store do Flatpak. As aplicações instaladas continuam a funcionar.</string> + <string name="storage_flatpak_uninstall_body">Remove a aplicação (%1$s) e os ambientes de execução que mais ninguém usa. Os dados dela na pasta pessoal mantêm-se.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d pacote</item> + <item quantity="other">%d pacotes</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d aplicação</item> + <item quantity="other">%d aplicações</item> + </plurals> + <string name="boot_movie">Vídeo de arranque</string> + <string name="boot_movie_video">Vídeo</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps é mais fluido, mas usa mais CPU enquanto o Steam arranca. Um vídeo de arranque escolhido nas definições do Steam tem prioridade.</string> + <string name="boot_movie_sound">Som</string> + <string name="boot_movie_custom">O seu próprio vídeo</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV ou WebM. Outros formatos e ficheiros acima de %1$d MB são convertidos para WebM 720p no dispositivo, até %2$d segundos.</string> + <string name="boot_movie_import">Importar</string> + <string name="boot_movie_remove">Remover</string> + <string name="boot_movie_pick">Escolha um vídeo de arranque</string> + <string name="boot_movie_imported">%1$s é agora o vídeo de arranque</string> + <string name="boot_movie_imported_silent">%1$s é agora o vídeo de arranque, sem som</string> + <string name="boot_movie_too_long">Os vídeos a converter têm de ter %1$d segundos ou menos</string> + <string name="boot_movie_converting">A converter %1$d%%</string> + <string name="boot_movie_converting_started">A converter %1$s para o Steam. Mantenha o DroidDeck aberto.</string> + <string name="boot_movie_unsupported">Este dispositivo não consegue descodificar esse vídeo.</string> + <string name="boot_movie_import_failed">Não foi possível importar esse vídeo</string> + <string name="glasses_experimental">Câmaras Luma Ultra — Experimental</string> + <string name="glasses_joycons">Rastreio de posição do Joy-Con</string> + <string name="glasses_joycons_hint">Utilize as câmaras dos óculos inteligentes para posicionar os seus comandos Joy-Con emparelhados. A rotação e os comandos dos botões vêm dos comandos Joy-Con. A posição é estimada quando os seus pulsos estão escondidos. Substitui os controlos operados com as mãos nuas e pausa o rastreio da câmara do telefone. Aponte os controlos Joy-Con para a frente ao ligar ou repor o centro de seguimento.</string> + <string name="glasses_joycons_requires_position">Ative primeiro o seguimento de posição. Requer comandos Joy-Con com sensor de movimento no Android 12 ou posterior. Desativado por defeito.</string> + <string name="setup_tab_glasses">Óculos inteligentes</string> + <string name="setup_glasses_scope">As definições de visualização e rastreio de cabeça são partilhadas entre os menus do DroidDeck, jogos e sessões da área de trabalho.</string> + <string name="setup_glasses_connect">Ligue os óculos inteligentes para alterar as suas definições de visualização e rastreio. As suas configurações guardadas são mantidas ao desconectar.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Modo de visualização</string> + <string name="glasses_output_2d">Saída 2D</string> + <string name="glasses_output_3d">Saída 3D</string> + <string name="glasses_picture_group">Imagem e ecrã virtual</string> + <string name="glasses_position_group">Posição e nível do piso</string> + <string name="glasses_hands_group">Rastreio de mãos — Experimental</string> + <string name="glasses_tracking_status">Estado do rastreio</string> + <string name="glasses_resolution_2d">Resolução 2D</string> + <string name="glasses_resolution_3d">Resolução 3D</string> + <string name="glasses_resolution_vr">Resolução VR</string> + <string name="glasses_resolution_auto">Automático</string> + <string name="glasses_resolution_inherit">Igual ao 2D/3D</string> + <string name="glasses_resolution_hint">Resolução de saída por olho.</string> + <string name="glasses_refresh_30_hint">Ative a funcionalidade \"Jogar em óculos inteligentes\" para selecionar o modo nativo de 30 Hz do ecrã.</string> + <string name="glasses_3dof">Ecrã virtual 3DoF</string> + <string name="glasses_3dof_hint">Ancore jogos planos à sua frente para que possa olhar em redor. Ativa a funcionalidade \"Jogar em óculos inteligentes\" sem alternar para 3D.</string> + <string name="glasses_screen_app_wide">A largura e a distância atualizam o ecrã virtual rastreado para menus, jogos e sessões de ambiente de trabalho do DroidDeck imediatamente.</string> + <string name="glasses_head_tracking_spatial_vr_hint">O seguimento posicional inclui a rotação da cabeça no SteamVR. Para o seguimento apenas de rotação, desative o seguimento posicional.</string> + <string name="glasses_head_tracking_spatial_hint">Controla o movimento da cabeça no ecrã virtual. O seguimento posicional inclui a rotação da cabeça no SteamVR.</string> + <string name="glasses_quick_actions">Ações rápidas</string> + <string name="glasses_recenter_screen_hint">Olhe para onde pretende que o ecrã fique e, em seguida, reponha o centro de rastreio para definir a sua altura e direção.</string> + <string name="glasses_recenter_joycons_button">Recentralizar Joy-Con</string> + <string name="phone_camera_tracking_group">Câmara do telemóvel — Experimental</string> + <string name="phone_camera_tracking_setting">Rastrear mãos ou comandos Joy-Con</string> + <string name="glasses_6dof">Ecrã virtual 6DoF</string> + <string name="glasses_position">Rastreio posicional — experimental</string> + <string name="glasses_position_hint">Movimento físico em RV e em torno de ecrãs virtuais. Reiniciar o rastreio demora um instante.</string> + <string name="glasses_eye_height">Altura atual dos olhos em relação ao chão</string> + <string name="glasses_floor">Definir nível do chão a partir da altura atual</string> + <string name="glasses_floor_set">Definir nível do chão</string> + <string name="glasses_spatial_setup">Configuração e diagnóstico da câmara estéreo</string> + <string name="glasses_spatial_setup_hint">Verifique a calibração da câmara e o seguimento das mãos antes de jogar.</string> + <string name="glasses_spatial_open">Abrir configuração</string> + <string name="glasses_hands">Controladores operados com as mãos nuas</string> + <string name="glasses_hands_hint">Utilize as câmaras dos óculos inteligentes para fazer pontaria com as mãos, faça o gesto de pinça para clicar e feche a mão para agarrar em VR. Os joysticks do gamepad movem-se e giram. Substitui o seguimento de posição do Joy-Con. Pode haver atraso ou perda de rastreio durante os jogos.</string> + <string name="glasses_hands_ready_hint">Ative os controladores operados com as mãos nuas sob as câmaras Luma Ultra em Rastreio. Mostre primeiro as mãos abertas.</string> + <string name="glasses_hands_base">Calibração partilhada do Luma Ultra</string> + <string name="glasses_hands_base_hint">Utilizando a base partilhada do Luma Ultra. Calibre os seus próprios óculos inteligentes para verificar a sua precisão.</string> + <string name="glasses_hands_calibration_verified">Calibração medida verificada</string> + <string name="glasses_hands_calibration_required">Validação necessária</string> + <string name="glasses_hands_calibration_required_hint">Os controladores operados com as mãos nuas ficam disponíveis após a verificação da distância medida ser aprovada.</string> + <string name="tracking_recovery_lost">Rastreio perdido</string> + <string name="tracking_recovery_restart_help">Ainda preso? No seu telefone: óculos inteligentes → Rastreio → Abrir configuração → Mostrar diagnóstico → Reiniciar rastreio.</string> + <string name="tracking_recovery_disconnected">Óculos inteligentes desligados</string> + <string name="tracking_recovery_connect">Verifique a ligação USB e volte a ligar os óculos inteligentes.\nAceite o pedido de acesso USB no seu telefone, se este aparecer.</string> + <string name="tracking_recovery_usb_help">Uma vez ligado, olhe lentamente em redor numa sala bem iluminada para restaurar o rastreio.</string> + <string name="tracking_recovery_recenter">É necessário recentralizar</string> + <string name="tracking_recovery_recenter_steps">O rastreio retornou numa nova posição.\nOlhe em frente e toque em repor centro de rastreio no seu telefone.</string> + <string name="tracking_recovery_recenter_help">Também pode encontrar a opção de repor o centro de seguimento em óculos inteligentes → Rastreio → Abrir configuração. A sua calibração de câmara salva será mantida.</string> + <string name="tracking_recovery_stabilizing">Fique imóvel por um momento</string> + <string name="tracking_recovery_hold">A reposição do centro de seguimento está em curso.\nMantenha os óculos inteligentes firmes enquanto o rastreio estabiliza.</string> + <string name="tracking_recovery_automatic">Este ecrã fecha automaticamente quando o rastreio da cabeça está pronto.</string> + <string name="glasses_steady_hand_aim">Mira estabilizada com as mãos</string> + <string name="glasses_steady_hand_aim_hint">Aponte do ombro até à palma da mão. Desligue para rotação controlada pelo pulso.</string> + <string name="spatial_title">Configuração espacial</string> + <string name="spatial_wait_tracking">Aguarda rastreio…</string> + <string name="spatial_cameras_description">Câmaras de seguimento esquerda e direita</string> + <string name="spatial_camera_sync">Sincronização da câmara</string> + <string name="spatial_ready">Pronto</string> + <string name="spatial_sync_hint">Aguarda o alinhamento da câmara e do seguimento da cabeça. Mantenha os óculos inteligentes ligados.</string> + <string name="spatial_prepare">1. Preparar o alvo de calibração</string> + <string name="spatial_print_actual">Imprimir em tamanho real</string> + <string name="spatial_print_hint">Cada quadrado deverá medir 30 mm (1.181 in). Monte a folha plana sobre uma superfície rígida numa área bem iluminada.</string> + <string name="spatial_print">Imprimir padrão de calibração</string> + <string name="spatial_capture_group">2. Capturar diferentes visualizações</string> + <string name="spatial_board_stationary">Mantenha o alvo de calibração estacionário</string> + <string name="spatial_capture_hint">Aproxime, afaste e lateralmente os óculos inteligentes. Vire-os para a esquerda/direita, incline-os para cima/para baixo e incline-os lateralmente. Mantenha o alvo de calibração em ambas as câmaras e faça uma breve pausa antes de cada captura.</string> + <string name="spatial_start">Iniciar nova calibração</string> + <string name="spatial_wait_sync">Aguarda sincronização da câmara.</string> + <string name="spatial_start_hint">Iniciar uma nova calibração para recolher visualizações.</string> + <string name="spatial_views_hint">Mantenha o alvo de calibração visível em ambas as visualizações. Capte pelo menos 24 visualizações nítidas de diferentes ângulos.</string> + <string name="spatial_capturing">Capturar…</string> + <string name="spatial_capture">Capturar visualização do alvo de calibração</string> + <string name="spatial_alignment">Calcular o alinhamento da câmara</string> + <string name="spatial_calculating">Calculando…</string> + <string name="spatial_calculate">Calcular calibração</string> + <string name="spatial_distance_group">3. Verifique a distância</string> + <string name="spatial_distance">Distância medida</string> + <string name="spatial_distance_hint">Comece com 12 pol. ou 30 cm para que os marcadores impressos sejam mais fáceis de detetar. Escolha a medida exata que vai utilizar.</string> + <string name="spatial_camera_board_distance">Câmara esquerda para o centro do alvo de calibração</string> + <string name="spatial_checking_distance">Verificação de distância…</string> + <string name="spatial_validate">Validar distância</string> + <string name="spatial_diagnostics">Diagnóstico</string> + <string name="spatial_show_diagnostics">Mostrar diagnóstico</string> + <string name="spatial_diagnostics_hint">Ferramentas de temporização e recuperação do seguimento da câmara.</string> + <string name="spatial_camera_timing">Tempo da câmara</string> + <string name="spatial_hand_input">Entrada do rastreio de mãos</string> + <string name="spatial_wait_timing">Aguardar o tempo da câmara.</string> + <string name="spatial_frames">Imagens da câmara</string> + <string name="spatial_gpu">Detecção de mãos por GPU</string> + <string name="spatial_gpu_hint">CPU é o padrão. A GPU é experimental e pode fazer com que o SteamVR reinicie. Esta escolha é reposta quando o rastreio é reiniciado.</string> + <string name="spatial_lite">Detecção Lite de modelos de mãos</string> + <string name="spatial_lite_hint">Utilize o detetor de palma Lite e os pontos-chave Lite nas mãos. Verifique a mira, aperte e agarre a precisão. Repõe quando o rastreio é reiniciado.</string> + <string name="spatial_adaptive">Frequência de entrada automática para rastreio de mãos</string> + <string name="spatial_adaptive_hint">Ajuste a entrada à velocidade de processamento. Repõe quando o rastreio é reiniciado.</string> + <string name="spatial_half_rate">Limitar a frequência de entrada para rastreio de mãos</string> + <string name="spatial_half_rate_hint">Utilize metade das imagens da câmara. Desligue para comparar a frequência máxima. Repõe quando o rastreio é reiniciado.</string> + <string name="spatial_diagnostic_capture">Captura de diagnóstico</string> + <string name="spatial_diagnostic_capture_hint">Guarde localmente um par de imagens estéreo. As imagens são guardadas apenas quando solicitadas.</string> + <string name="spatial_save_frame">Guardar imagem da câmara</string> + <string name="spatial_restart_tracking">Reiniciar o rastreio</string> + <string name="spatial_restart_hint">Utilize se o rastreio não for recuperado numa área bem iluminada. Uma reinicialização requer uma nova origem de rastreio.</string> + <string name="spatial_restart">Reiniciar</string> + <string name="spatial_restart_title">Reiniciar o rastreio?</string> + <string name="spatial_restart_confirm">As visualizações de calibração não guardadas serão perdidas. Mantenha os óculos inteligentes imóveis posteriormente e volte a definir o centro de rastreio quando o rastreio for restaurado.</string> + <string name="spatial_views_count">%1$d / 24 visualizações capturadas</string> + <string name="spatial_capture_paused">Captura em pausa: %1$s</string> + <string name="spatial_measure_hint">Medida %1$s. Mostre o alvo de calibração completo em ambas as visualizações e mantenha-se imóvel.</string> + <string name="spatial_timing_values">%1$.1f Hz • idade da imagem %2$.1f ms • processamento %3$.1f ms</string> + <string name="spatial_input_values">Limite de entrada %1$.1f Hz • %2$.0f%% de imagens da câmara. O rastreio da cabeça continua na sua frequência máxima.</string> + <string name="spatial_frame_counts">%1$d processado • %2$d descartado • %3$d ignorado pelo limite de entrada</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Calibração Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Imprimir a 100%/tamanho real. Cada quadrado: 30 mm (1,181 pol.).</string> + <string name="spatial_print_stationary">Mantenha o alvo de calibração plano e estacionário; mova os óculos inteligentes entre capturas.</string> + <string name="spatial_print_check">Verificação da escala: 100 mm (3,937 pol.) entre marcas</string> + <string name="spatial_distance_12in">30,48 cm (12 pol.)</string> + <string name="spatial_distance_30cm">30 cm (11,81 pol.)</string> + <string name="spatial_distance_20in">50,8 cm (20 pol.)</string> + <string name="spatial_distance_50cm">50 cm (19,69 pol.)</string> + <string name="spatial_disabled">Desativado</string> + <string name="spatial_wait_stable">Aguarda rastreio estável</string> + <string name="spatial_disconnected">Desligado</string> + <string name="spatial_hands_off">Os controladores operados com as mãos nuas estão desligados</string> + <string name="spatial_tracking_off">O seguimento posicional está desativado ou os óculos inteligentes estão desligados</string> + <string name="spatial_recenter_pending">Reposição do centro de seguimento solicitada — mantenha os óculos imóveis enquanto o seguimento estabiliza.</string> + <string name="spatial_tracking_lost">Rastreio perdido — enfrente uma área bem iluminada com detalhes visíveis</string> + <string name="spatial_origin_changed">Origem do seguimento alterada — toque em repor o centro de seguimento e mantenha os óculos imóveis.</string> + <string name="spatial_active">6DoF ativo</string> + <string name="spatial_connect_hint">Ligue o Luma Ultra e ative o rastreio posicional.</string> + <string name="spatial_validation_session">Calibração verificada para esta ligação.</string> + <string name="spatial_validation_saved">Calibração verificada e guardada.</string> + <string name="spatial_wait_cameras">Esperando por câmaras estéreo</string> + <string name="spatial_wait_hands">Aguarda rastreamento de mãos</string> + <string name="spatial_collect_instructions">Mantenha o alvo de calibração 5 × 7 estacionário. Capte mais de 24 visualizações enquanto move e roda os óculos inteligentes.</string> + <string name="spatial_capture_pending">Aguarda-se a próxima imagem da câmara. Segure os óculos inteligentes imóveis.</string> + <string name="spatial_validation_pending">Verificação da próxima imagem da câmara. Mantenha o alvo de calibração completo visível e permaneça imóvel.</string> + <string name="spatial_start_first">Inicie primeiro a calibração</string> + <string name="spatial_no_camera_frame">Não chegou nenhuma imagem nova da câmara. Verifique a ligação dos óculos inteligentes e as visualizações da câmara e tente novamente.</string> + <string name="spatial_clock_reset">Reinicialização do relógio da câmara</string> + <string name="spatial_frame_changed">Sistema de coordenadas de rastreio alterado. As suas visualizações foram guardadas para recálculo. Reponha o centro de rastreio e inicie um novo conjunto para captar mais visualizações.</string> + <string name="spatial_device_loaded">calibração do dispositivo carregada</string> + <string name="spatial_base_loaded">Calibração básica do Luma Ultra carregada</string> + <string name="spatial_calibration_needed">calibração necessária</string> + <string name="spatial_tap_start">Toque primeiro em Iniciar nova calibração.</string> + <string name="spatial_capture_recenter_pending">A reposição do centro de rastreio está a aguardar um rastreio estável. Mantenha os óculos imóveis por um momento.</string> + <string name="spatial_capture_recenter">Rastreio alterado. Toque em repor o centro de rastreio uma vez e mantenha os óculos imóveis antes de capturar.</string> + <string name="spatial_capture_unsynchronized">Captura rejeitada: o rastreio da cabeça estava fora de sincronia ou mudou durante a captura. Fique imóvel e tente novamente.</string> + <string name="spatial_align_first">Calcule o alinhamento da câmara antes de verificar a distância.</string> + <string name="spatial_processing_failed">falha no processamento da câmara</string> + <string name="spatial_hand_head_changed">Rastreio da cabeça alterado durante a deteção das mãos</string> + <string name="spatial_hand_wait_sync">Aguarda sincronização da câmara e da cabeça</string> + <string name="spatial_no_wrists">Nenhum pulso detetado. Mantenha as pegas do comando Joy-Con na frente dos óculos inteligentes</string> + <string name="spatial_no_hands">Nenhuma mão detectada. Mostre as palmas das mãos abertas à frente dos óculos inteligentes</string> + <string name="spatial_one_camera_wrists">Pulsos visíveis em apenas uma câmara; mantenha as pegas do comando na vista partilhada</string> + <string name="spatial_one_camera_hands">Mãos visíveis em apenas uma câmara; mantenha as duas palmas na visualização partilhada</string> + <string name="spatial_ambiguous_hands">Ambas as câmaras veem mãos, mas a correspondência esquerda/direita é ambígua</string> + <string name="spatial_inconsistent_depth">Mãos detetadas, mas a profundidade estéreo é inconsistente</string> + <string name="spatial_rejected_wrist">Posição do pulso rejeitada por verificações de estéreo ou de movimento</string> + <string name="spatial_inconsistent_palm">Pontos estéreo detetados, mas a geometria da palma é inconsistente</string> + <string name="spatial_hands_need_calibration">Conclua a calibração e a verificação de distância para ativar o rastreio de mãos</string> + <string name="spatial_hands_wait_stable">Aguarda rastreio de cabeça estável; reponha o centro de rastreio se solicitado.</string> + <string name="spatial_old_frame">A observação da câmara é muito antiga; à espera de um novo par</string> + <string name="spatial_fit_ready">Ajustar %1$.2f px. Meça a distância selecionada da câmara esquerda até ao centro do alvo de calibração e valide.</string> + <string name="spatial_opencv_error">OpenCV indisponível: %1$s</string> + <string name="spatial_restored">%1$d visualizações guardadas restauradas. Calcule a calibração para tentar novamente ou inicie um novo conjunto para captar mais.</string> + <string name="spatial_captured">Capturado %1$d/24 visualizações. Mantenha o alvo de calibração fixo; mova os óculos inteligentes para a visualização seguinte.</string> + <string name="spatial_capture_corners">Captura rejeitada: %1$d/12 cantos necessários visíveis em ambas as câmaras. Mostre mais do alvo de calibração, mantenha-se imóvel e tente novamente.</string> + <string name="spatial_validation_error">A verificação da distância não pôde ser concluída: %1$s. Tente novamente.</string> + <string name="spatial_inference_error">Detecção de mãos indisponível: %1$s. Troque a CPU/GPU ou alterne os controladores operados com as mãos nuas para tentar novamente.</string> + <string name="spatial_hand_timeout">A deteção de mãos excedeu os %1$d ms; observação descartada</string> + <string name="spatial_wrists_tracked">%1$d / 2 posições de pulso do Joy-Con medidas por estéreo</string> + <string name="spatial_palms_tracked">Palmas seguidas: %1$d / 2; gesto de pinça pronto: %2$d; gesto de agarrar pronto: %3$d</string> + <string name="spatial_capture_saved">Captura de diagnóstico guardada em %1$s</string> + <string name="spatial_hand_error">Rastreio de mãos interrompido: %1$s</string> + <string name="spatial_stereo_loaded">Estéreo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">O seguimento da cabeça e o alvo de calibração discordam em %1$s (limite de 5 cm/2 pol.). Mantenha o alvo de calibração fixo e aguarde um seguimento estável antes de iniciar um novo conjunto. Rode e incline os óculos inteligentes suavemente; faça uma pausa antes de cada captura.</string> + <string name="spatial_need_views">Capte pelo menos 24 visualizações variadas do alvo de calibração estacionário.</string> + <string name="spatial_need_rotation">Rode os óculos inteligentes para a esquerda e para a direita e incline-os para cima e para baixo; o movimento sem rotação não pode calibrar o alinhamento da câmara.</string> + <string name="spatial_bad_baseline">Linha de base da câmara implausível</string> + <string name="spatial_need_orientations">Mova a cabeça em orientações mais variadas.</string> + <string name="spatial_bad_rotation">Rotação câmara-cabeça inválida</string> + <string name="spatial_bad_alignment">O alinhamento da câmara com a cabeça é inconsistente.</string> + <string name="spatial_calibration_error">A calibração não pôde ser concluída. %1$s As suas visualizações capturadas são guardadas.</string> + <string name="spatial_reprojection_error">Erro de reprojeção retido %1$.2f px excede 2 px. Recalibrar.</string> + <string name="spatial_distance_corners">%1$d / 24 cantos de tabuleiro de xadrez detetados em ambas as câmaras. Mantenha o alvo de calibração completo visível e permaneça imóvel. Se já estiver visível, seleccione 12 pol. ou 30 cm e meça a distância mais próxima antes de tentar novamente.</string> + <string name="spatial_distance_depth">O alvo de calibração está visível, mas a sua profundidade não pôde ser medida de forma fiável. Segure os óculos inteligentes e mantenha o alvo de calibração plano e bem iluminado e tente novamente.</string> + <string name="spatial_distance_invalid">A medição da câmara era inválida. Fique imóvel e tente novamente.</string> + <string name="spatial_distance_passed">Verificação de distância aprovada.</string> + <string name="spatial_distance_retry">Verifique novamente a distância da câmara esquerda ao centro do alvo de calibração e tente novamente.</string> + <string name="spatial_distance_result">Câmaras medidas %1$s; distância selecionada %2$s. %3$s</string> + <string name="spatial_wait_previews">Aguarde pelas visualizações de ambas as câmaras antes de iniciar a calibração.</string> + <string name="spatial_saved_views_hint">As visualizações guardadas podem ser recalculadas. Inicie uma nova calibração para captar no sistema de coordenadas de seguimento atual.</string> + <string name="spatial_model_checksum_error">Incompatibilidade de checksum do modelo de mãos</string> + <string name="spatial_opencv_load_error">O OpenCV não conseguiu carregar</string> + <string name="tracking_recovery_look">Olhe em redor lentamente num ambiente bem iluminado.\nMantenha as câmaras de seguimento desobstruídas e viradas para móveis ou outros detalhes visíveis.</string> +</resources> diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml new file mode 100644 index 0000000000..0dc9d0e576 --- /dev/null +++ b/app/src/main/res/values-pt/strings.xml @@ -0,0 +1,2912 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Os gráficos do SteamVR pararam</string> + <string name="steamvr_recovery_countdown">O DroidDeck vai reiniciar em %1$d segundos para redefinir os gráficos e reabrir o SteamVR. O jogo em execução será fechado; o progresso não salvo não poderá ser recuperado.</string> + <string name="steamvr_recovery_repeated">A falha gráfica voltou logo após uma reinicialização recente. A recuperação automática foi pausada para evitar um loop. Reiniciar vai fechar o jogo; o progresso não salvo não poderá ser recuperado.</string> + <string name="steamvr_recovery_restart">Reiniciar agora</string> + <string name="steamvr_recovery_cancel">Manter aberto</string> + <string name="steamvr_recovery_restarting">Redefinindo os gráficos e reabrindo o SteamVR…</string> + <string name="steamvr_recovery_failed">O DroidDeck não conseguiu reiniciar automaticamente. Feche o app completamente e abra-o de novo.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Na primeira execução, a Steam é baixada. Isso pode levar alguns minutos.</item> + <item>Por padrão, sair do app pausa a Steam; ela continua de onde parou quando você voltar.</item> + <item>Seu controle aparece como um controle de Xbox 360. Sem controle, use os controles na tela.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Na primeira execução, a área de trabalho é preparada. Isso pode levar alguns minutos.</item> + <item>Por padrão, sair do app pausa a sessão; ela continua de onde parou quando você voltar.</item> + <item>O toque funciona como um touchpad: arraste para mover o ponteiro, toque para clicar.</item> + <item>Seu controle aparece como um controle de Xbox 360. Sem controle, use os controles na tela.</item> + </string-array> + <string name="session_channel">Sessão</string> + <string name="session_channel_description">Aparece enquanto uma sessão da Steam ou da área de trabalho está aberta</string> + <string name="session_notification">A Steam está em execução</string> + <string name="session_notification_downloads">Download da Steam em andamento</string> + <string name="session_notification_paused">Sessão pausada - toque em Retomar quando quiser</string> + <string name="resume_session">Retomar</string> + <string name="suspend_now">Suspender agora</string> + <string name="stop_session">Encerrar sessão</string> + <string name="frame_gen_title">Geração de quadros</string> + <string name="frame_gen_hint">Selecione o modo de geração de quadros</string> + <string name="frame_gen_off">Desativada</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptativo %1$d</string> + <string name="lsfg_needs_steam">Requer o Lossless Scaling na Steam</string> + <string name="lsfg_needs_install">Instale o Lossless Scaling na Steam ou importe o Lossless.dll</string> + <string name="lsfg_import">Importar Lossless.dll…</string> + <string name="lsfg_using_steam">Usando a cópia da Steam</string> + <string name="lsfg_using_import">Usando uma cópia importada</string> + <string name="lsfg_pick_title">Escolha o Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll importado</string> + <string name="lsfg_import_unchanged">Este Lossless.dll já está em uso</string> + <string name="lsfg_import_not_owned">Esta conta Steam não tem o Lossless Scaling</string> + <string name="lsfg_import_invalid">Este arquivo não é o Lossless.dll do Lossless Scaling</string> + <string name="lsfg_import_failed">Não foi possível preparar o LSFG com este Lossless.dll</string> + <string name="lsfg_problem_missing">O LSFG requer o Lossless Scaling da Steam ou um Lossless.dll importado</string> + <string name="lsfg_problem_failed">O LSFG não conseguiu preparar os shaders a partir do Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: sem suporte</string> + <string name="hud_fg_failed">%1$s: falha no mecanismo</string> + <string name="hud_fg_needs_lossless">%1$s: requer Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · iniciando</string> + <string name="second_library_import_hint">Adiciona uma biblioteca Steam e procura jogos de Windows nela. Os jogos da sua conta usam as entradas da Steam; os demais viram atalhos não Steam.</string> + <string name="game_env_title">Ambiente do jogo</string> + <string name="game_env_hint">Variáveis de ambiente para jogos com Proton.</string> + <string name="game_env_edit">Editar</string> + <string name="game_env_shared">Todos os jogos com Proton</string> + <string name="game_env_scope">Perfil</string> + <string name="game_env_app_id">ID do app na Steam</string> + <string name="game_env_open">Abrir</string> + <string name="game_env_profile">Jogo %1$s</string> + <string name="game_env_add">Adicionar variável</string> + <string name="game_env_name">Nome da variável</string> + <string name="game_env_value">Valor</string> + <string name="game_env_save">Salvar</string> + <string name="game_env_remove">Remover</string> + <string name="game_env_restore">Herdar novamente</string> + <string name="game_env_reset">Limpar substituições de ambiente</string> + <string name="game_env_unset">Não definir neste perfil</string> + <string name="game_env_empty">Nenhuma variável definida.</string> + <string name="game_env_inherited">Herdada</string> + <string name="game_env_custom">Variável personalizada</string> + <string name="game_env_error">Não foi possível carregar ou salvar. Verifique o espaço livre e tente novamente.</string> + <string name="game_env_invalid">Use um nome válido e um valor de até 8192 caracteres.</string> + <string name="game_env_unused">O runtime padrão do Proton não lê esta variável.</string> + <string name="game_env_loading">Carregando…</string> + <string name="game_env_feature">Substitui o nível de recursos do D3D12. 12_2 informa os recursos do DirectX 12 Ultimate; recursos sem suporte podem falhar. Deixe sem definir para detecção automática.</string> + <string name="game_env_shader">Substitui o shader model do D3D12. 6_9 requer um VKD3D recente o bastante e recursos de GPU compatíveis. Deixe sem definir para detecção automática.</string> + <string name="game_env_cache">Mantenha o cache de shaders do Mesa ativado para reduzir compilações repetidas. false ativa o cache.</string> + <string name="game_env_cache_size">Tamanho máximo do cache de shaders do Mesa, como 1G. Caches maiores ocupam mais armazenamento.</string> + <string name="game_env_vkd3d_config">Opções do VKD3D para D3D12. nodxr desativa o ray tracing; use só em um jogo que precise disso.</string> + <string name="game_env_proton_log">Defina como 1 para gerar um log de diagnóstico do Proton. O log pode reduzir o desempenho e ocupar armazenamento.</string> + <string name="game_env_wined3d">Defina como 1 para usar o WineD3D (baseado em OpenGL) em vez do DXVK ao testar a compatibilidade com D3D9–11.</string> + <string name="game_env_no_ntsync">Defina como 1 para manter este jogo fora do ntsync (droiddeck-ntsync ou um driver do kernel); ele usa o droiddeck-esync onde houver um pacote, senão o droiddeck-fsync.</string> + <string name="game_env_no_esync">Defina como 1 para desativar o droiddeck-esync neste jogo; ele passa a usar o droiddeck-fsync, ou o droiddeck-ntsync onde o fsync também estiver desativado.</string> + <string name="game_env_no_fsync">Defina como 1 para manter este jogo fora do droiddeck-fsync; ele usa o droiddeck-esync onde houver um pacote, senão o droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Defina como 1 para rodar este jogo no droiddeck-fsync, ou como 0 para priorizar o droiddeck-esync onde houver um pacote compatível com o Proton dele.</string> + <string name="game_env_xalia">Defina como 0 para desativar o assistente de navegação por controle do Proton neste jogo.</string> + <string name="game_env_hud">Overlay do DXVK para D3D9–11. fps mostra a taxa de quadros; sem definir, fica oculto.</string> + <string name="game_env_dxvk_config">Configurações do DXVK separadas por ponto e vírgula. Versões recentes usam dxvk.maxFrameRate para limitar os quadros; para jogar normalmente, prefira o limitador de quadros da sessão.</string> + <string name="game_env_vkd3d_limit">Limite de taxa de quadros do D3D12. 0 desativa o limite.</string> + <string name="game_env_glthread">Threading do OpenGL no Mesa. true pode ajudar jogos OpenGL limitados pela CPU; teste jogo a jogo.</string> + <string name="sync_backend_title">Sincronização do Wine</string> + <string name="sync_backend_hint">Como os jogos mantêm suas threads em sincronia. Vale a partir da próxima sessão.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Predefinição do FEX</string> + <string name="fex_next_launch">Vale a partir da próxima vez que um jogo for aberto.</string> + <string name="game_settings_title">Jogos</string> + <string name="fex_default_label">Padrões do FEX</string> + <string name="fex_default_detail">Usa os padrões do FEX.</string> + <string name="fex_stability_label">Estabilidade</string> + <string name="fex_stability_detail">Configurações mais seguras e mais lentas.</string> + <string name="fex_compatibility_label">Compatibilidade</string> + <string name="fex_compatibility_detail">TSO completo com multiblock.</string> + <string name="fex_intermediate_label">Intermediário</string> + <string name="fex_intermediate_detail">TSO equilibrado com precisão x87 reduzida.</string> + <string name="fex_performance_label">Desempenho</string> + <string name="fex_performance_detail">Todo o TSO desativado; multiblock.</string> + <string name="fex_performance_tso_label">Desempenho + TSO</string> + <string name="fex_performance_tso_detail">Configurações de Desempenho com o TSO principal ativado.</string> + <string name="fex_extreme_label">Extremo</string> + <string name="fex_extreme_detail">Desativa as verificações de código automodificável. Jogos com JIT e DRM podem quebrar.</string> + <string name="fex_extreme_tso_label">Extremo + TSO</string> + <string name="fex_extreme_tso_detail">Configurações do Extremo com o TSO principal ativado.</string> + <string name="fex_extreme_gn_label">Extremo-gn</string> + <string name="fex_extreme_gn_detail">Desempenho com dicas de TSC e de metadados. Tente antes do Extremo.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Desempenho com verificações de código completas e o bit de hypervisor oculto.</string> + <string name="game_env_custom_value">Valor personalizado</string> + <string name="game_env_select_value">Selecionar valor</string> + <string name="user_apps_section">Emuladores e apps</string> + <string name="user_apps_add">Adicionar</string> + <string name="user_apps_add_detail">Seu próprio app ou jogo</string> + <string name="user_apps_kind_script">Script</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Iniciando…</string> + <string name="user_apps_added">%1$s adicionado</string> + <string name="user_apps_removed">%1$s removido</string> + <string name="user_apps_back">Área de trabalho</string> + <string name="user_apps_gone">Esse app não existe mais. Escolha-o de novo na Área de trabalho.</string> + <string name="user_apps_open">Abrir %1$s</string> + <string name="user_apps_remove">Remover</string> + <string name="user_apps_remove_confirm">Pressione de novo para remover</string> + <string name="user_apps_stop_session">Encerre a sessão para remover</string> + <string name="user_apps_script_linked">Executa %1$s a partir da própria pasta, vinculada à sessão no local onde está. Remover o app não mexe nessa pasta.</string> + <string name="user_apps_script_copied">Executa %1$s a partir de uma cópia da pasta dele dentro do DroidDeck. Remover o app apaga a cópia, não o original.</string> + <string name="user_apps_runtime_required">Instale primeiro o runtime do Linux</string> + <string name="user_apps_file_gone">O arquivo não existe mais</string> + <string name="user_apps_no_space">Espaço livre insuficiente: copiar a pasta requer %1$s</string> + <string name="user_apps_copying">Copiando %1$s</string> + <string name="user_apps_failed">Falha ao adicionar o app</string> + <string name="user_apps_github_checking">Procurando uma versão de %1$s</string> + <string name="user_apps_github_unreachable">Não foi possível ler as versões de %1$s</string> + <string name="user_apps_github_no_appimage">Nenhuma versão de %1$s tem um AppImage ARM64 ou x86_64</string> + <string name="user_apps_downloading">Baixando %1$s</string> + <string name="user_apps_download_failed">Falha no download</string> + <string name="user_apps_update_failed">Falha ao atualizar o app</string> + <string name="user_apps_icon_failed">Não foi possível ler esse ícone</string> + <string name="user_apps_saved">%1$s salvo</string> + <string name="user_apps_edit">Editar</string> + <string name="user_apps_check_updates">Verificar atualizações</string> + <string name="user_apps_checking_updates">Verificando atualizações…</string> + <string name="user_apps_update_to">Atualizar para %1$s</string> + <string name="user_apps_up_to_date">Atualizado · %1$s</string> + <string name="user_apps_updated">%1$s atualizado</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Adicionar um app</string> + <string name="add_app_tab_script">Script</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Um arquivo .sh. Ele roda a partir da própria pasta, em tela cheia no gamescope.</string> + <string name="add_app_appimage_hint">Um AppImage ARM64 (aarch64) ou um x86_64 que roda pelo FEX. Ele é descompactado no runtime do Linux uma única vez.</string> + <string name="add_app_github_hint">Instala o AppImage ARM64 da versão mais recente do repositório, ou o x86_64 dela pelo FEX.</string> + <string name="app_fex_title">Usar FEX</string> + <string name="app_fex_auto">Automático</string> + <string name="app_fex_on">Ativado</string> + <string name="app_fex_off">Desativado</string> + <string name="app_fex_hint">O FEX roda programas Linux x86 neste dispositivo ARM64. No Automático, ele é usado quando o programa é feito para x86.</string> + <string name="app_fex_x86">%1$s pelo FEX</string> + <string name="app_fex_not_ready">Este programa é feito para PCs %1$s e roda pelo FEX, que ainda não está configurado. Abra a Steam uma vez com a sessão iniciada: o DroidDeck faz com que ela baixe o FEX e o Steam Linux Runtime necessários, e então isto abre.</string> + <string name="session_end_program">Este programa</string> + <string name="session_end_fex_missing">%1$s é feito para PCs x86 e roda pelo FEX, que ainda não está instalado. Abra a Steam uma vez com a sessão iniciada e deixe-a baixar o FEX e o Steam Linux Runtime; depois, abra isto de novo.</string> + <string name="add_app_flatpak_hint">Um ID de app do Flathub ou a página dele no Flathub. O Flatpak é configurado antes, se ainda não estiver.</string> + <string name="add_app_file">Arquivo</string> + <string name="add_app_no_file">Nenhum arquivo escolhido</string> + <string name="add_app_choose_file">Escolher arquivo</string> + <string name="add_app_change_file">Alterar</string> + <string name="add_app_pick_script">Escolha um script</string> + <string name="add_app_pick_appimage">Escolha um AppImage</string> + <string name="add_app_pick_icon">Escolha um ícone</string> + <string name="add_app_repository">Repositório</string> + <string name="add_app_repository_placeholder">dono/repo ou um link do github.com</string> + <string name="add_app_repository_invalid">Não é um repositório do GitHub</string> + <string name="add_app_flatpak_id">ID do app</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Não é um ID de app do Flathub</string> + <string name="add_app_flatpak_bundle_hint">Ou um arquivo .flatpak, para um app que não está no Flathub.</string> + <string name="add_app_pick_flatpak">Escolha um arquivo .flatpak</string> + <string name="add_app_source">Origem</string> + <string name="add_app_appearance">Na sua Área de trabalho</string> + <string name="add_app_preview_name">Novo app</string> + <string name="add_app_name">Nome</string> + <string name="add_app_name_placeholder">Do app</string> + <string name="add_app_icon">Ícone</string> + <string name="add_app_icon_default">Ícone padrão</string> + <string name="add_app_choose_icon">Escolher ícone</string> + <string name="add_app_clear_icon">Limpar</string> + <string name="add_app_icon_suggestions">Do repositório</string> + <string name="add_app_icon_searching">Procurando ícones…</string> + <string name="add_app_icon_reset">Padrão</string> + <string name="edit_app_title">Editar %1$s</string> + <string name="edit_app_save">Salvar</string> + <string name="add_app_checking_folder">Verificando a pasta…</string> + <string name="add_app_folder_linked">A pasta dele é vinculada à sessão: %1$s</string> + <string name="add_app_folder_copied">A pasta dele contém programas Linux, que o armazenamento compartilhado não consegue executar, então ela é copiada para o DroidDeck (%1$s).</string> + <string name="add_app_confirm">Adicionar</string> + <string name="add_app_cancel">Cancelar</string> + <string name="add_app_runtime_required">Instale primeiro o runtime do Linux em Configuração.</string> + <string name="add_app_busy">Aguarde %1$s terminar.</string> + <string name="steam_compat_label">Compatível</string> + <string name="proton_compatible_note">As versões marcadas como “%1$s” no menu Compatibilidade da Steam têm as correções de prefixo do DroidDeck e iniciam jogos aqui. O padrão é o Proton Experimental ARM64 (%1$s), ou o Proton 11.0 ARM64 (%1$s) quando essa versão mais nova estiver instalada. As entradas do Proton da própria Valve sem a marca não conseguem iniciar jogos neste dispositivo.</string> + <string name="proton_installed_compatible">%1$s instalado · %2$s</string> + <string name="common_cancel">Cancelar</string> + <string name="common_auto">Automático</string> + <string name="common_never">Nunca</string> + <string name="common_always">Sempre</string> + <string name="common_uninstall">Desinstalar</string> + <string name="common_check">Verificar</string> + <string name="common_update">Atualizar</string> + <string name="common_checking">Verificando…</string> + <string name="common_working">Processando…</string> + <string name="common_forget">Esquecer</string> + <string name="common_add_ellipsis">Adicionar…</string> + <string name="common_use">Usar</string> + <string name="common_applies_next_session">Vale a partir da próxima sessão.</string> + <string name="mode_steam_title">Sessão da Steam</string> + <string name="mode_desktop_title">Sessão da área de trabalho</string> + <string name="mode_display">Tela</string> + <string name="mode_resolution">Resolução</string> + <string name="mode_res_720">Até 720p</string> + <string name="mode_res_900">Até 900p</string> + <string name="mode_res_1080">Até 1080p</string> + <string name="mode_res_native">Nativa</string> + <string name="mode_res_default">%1$s (padrão)</string> + <string name="mode_res_custom_value">Personalizada · %1$d×%2$d</string> + <string name="mode_res_custom">Personalizada…</string> + <string name="mode_res_note">Em 720p, os menus podem responder mais rápido.</string> + <string name="mode_ratio">Proporção da tela</string> + <string name="mode_ratio_custom">Definida pela resolução personalizada.</string> + <string name="mode_ratio_auto">O Automático usa no mínimo 16:9.</string> + <string name="mode_fps">Limite de quadros</string> + <string name="mode_fps_note">Limita a sessão inteira. A tela muda para uma taxa de atualização que seja múltipla do limite.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Saída HDR10</string> + <string name="mode_hdr_unavailable">Indisponível: %1$s.</string> + <string name="mode_hdr_restart">Reinicie o app para aplicar.</string> + <string name="mode_drivers">Drivers</string> + <string name="mode_gpu_drivers">Drivers de GPU</string> + <string name="mode_gpu_drivers_hint">Compartilhados pela Steam e pela Área de trabalho. Defina na página Componentes.</string> + <string name="mode_touch_controls">Toque e controles</string> + <string name="mode_touch">Toque</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Direto</string> + <string name="mode_touch_note">Automático: touchpad na Área de trabalho, direto na Steam.</string> + <string name="mode_osc">Controles na tela</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">No Automático, os controles na tela aparecem quando não há um controle conectado.</string> + <string name="osc_steam_touch">Toque da Steam (beta)</string> + <string name="osc_style_next_session">Os controles de toque da Steam começam na próxima sessão da Steam</string> + <string name="osc_steam_layout">Layout de toque da Steam</string> + <string name="osc_steam_layout_hint">Mova, redimensione ou oculte os controles de toque deste jogo; salvo na Steam</string> + <string name="mode_controller">Controle</string> + <string name="mode_controller_hint">Como a Steam vê seu controle. Vale a partir da próxima sessão.</string> + <string name="mode_controller_deck">Controle do Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Controle de Xbox 360</string> + <string name="mode_controller_note">Deck: botão de Acesso rápido e giroscópio. Steam Controller: o mesmo, com detecção de pegada nos botões traseiros. DualShock 4 e DualSense: giroscópio, e os trackpads como o touchpad deles. Xbox 360: abra o Acesso rápido com Guide+A.</string> + <string name="mode_back">Voltar</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Sessão</string> + <string name="mode_suspend">Comportamento em segundo plano</string> + <string name="mode_suspend_hint">Quando o app fica oculto ou a tela se apaga.</string> + <string name="mode_suspend_manual">Manual</string> + <string name="mode_suspend_native">Nativo</string> + <string name="mode_suspend_steam_note">Automático pausa e retoma quando o app reaparece. Nativo prepara a Steam para a suspensão antes. Manual aguarda Retomar. Nunca continua em execução.</string> + <string name="mode_background_downloads">Manter downloads ativos</string> + <string name="mode_background_downloads_hint">Adia a suspensão em segundo plano enquanto a Steam estiver baixando.</string> + <string name="mode_suspend_note">Automático pausa em segundo plano e retoma quando o app reaparece. Manual aguarda Retomar. Nunca continua em execução.</string> + <string name="mode_startup">Inicialização</string> + <string name="mode_steam_startup">Iniciar a Steam com o DroidDeck</string> + <string name="mode_steam_startup_hint">Abre a sessão da Steam quando o DroidDeck é iniciado.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Procurando versões…</string> + <string name="mode_decky_ready">Pronto para instalar %1$s.</string> + <string name="mode_decky_none">Nenhuma versão compatível encontrada. Tente novamente mais tarde.</string> + <string name="mode_decky_installed">Instalado · %1$s</string> + <string name="mode_decky_update">Atualização disponível · %1$s</string> + <string name="mode_decky_current">Atualizado · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Instalar a mais recente</string> + <string name="mode_decky_on">Inicia com a Steam. Enquanto estiver ativado, outros apps neste dispositivo podem conseguir controlar a Steam.</string> + <string name="mode_decky_off">Desativado. A porta de depuração remota da Steam fica fechada.</string> + <string name="mode_decky_remove_title">Desinstalar o Decky Loader?</string> + <string name="mode_decky_remove_text">Remove o loader. Seus plugins e configurações são mantidos.</string> + <string name="mode_client">Cliente</string> + <string name="mode_mangoapp">Overlay de desempenho</string> + <string name="mode_mangoapp_hint">Desative se os jogos travarem ou ficarem com a tela preta no modo Deck. Vale a partir da próxima sessão.</string> + <string name="mode_steam_repair">Reparar o cliente Steam</string> + <string name="mode_steam_repair_hint">Baixa o cliente Steam de novo na próxima vez que a Steam iniciar. Use se a Steam ficar presa na tela de carregamento. Jogos, login e configurações são mantidos.</string> + <string name="mode_steam_repair_queued">O cliente Steam será baixado de novo na próxima vez que a Steam iniciar.</string> + <string name="mode_steam_repair_button">Reparar</string> + <string name="mode_added_art">Artes</string> + <string name="mode_sgdb_key">Chave de API do SteamGridDB</string> + <string name="mode_sgdb_key_yours">Sua chave</string> + <string name="mode_sgdb_edit">Editar…</string> + <string name="mode_added_art_hint">Preenche as artes que faltam com a Steam e, depois, com o SteamGridDB. Seus próprios cover.jpg, hero.jpg, logo.png ou icon.png na pasta do jogo têm prioridade.</string> + <string name="summary_remove_game">Remover %1$s</string> + <string name="mode_added_remove_confirm">Remover?</string> + <string name="games_add">Adicionar jogo</string> + <string name="games_add_title">Adicionar um jogo:</string> + <string name="games_pick_exe_title">Escolha o exe:</string> + <string name="games_add_unreachable">Este local não está disponível na sessão</string> + <string name="mode_added_exe_check">Verificar este exe</string> + <string name="wincomp_title">Componentes do Windows</string> + <string name="wincomp_pad_hint">LB / RB alternam entre as seções.</string> + <string name="wincomp_card_none">Nenhum</string> + <string name="wincomp_applies">DLLs do Windows que o Proton não inclui, da lista de componentes. Ative as de que este jogo precisa: elas vão para a pasta do Windows do próprio jogo, nunca para os arquivos dele, e continuam lá em qualquer Proton que ele usar.</string> + <string name="wincomp_offline">Não foi possível acessar a lista de componentes. Os componentes já baixados ainda podem ser ativados ou desativados.</string> + <string name="wincomp_recommended">Recomendados para este jogo</string> + <string name="wincomp_checking">Verificando do que este jogo precisa…</string> + <string name="wincomp_when_online">Disponível quando on-line</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Ativando %1$d componente…</item> + <item quantity="many">Ativando %1$d componentes…</item> + <item quantity="other">Ativando %1$d componentes…</item> + </plurals> + <string name="wincomp_auto_section">Ativados para este jogo</string> + <string name="wincomp_auto_steam">A Steam instala %1$s com %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">Da lista do GOG para este jogo</string> + <string name="wincomp_auto_epic">Dos pré-requisitos da Epic para este jogo</string> + <string name="wincomp_auto_amazon">Das etapas de instalação da Amazon para este jogo</string> + <string name="wincomp_steam_by_name">A Steam instala %1$s com o app %2$s, identificado pelo nome</string> + <string name="wincomp_suggestions">Também listados</string> + <string name="wincomp_suggestion_reason">Listado por %1$s; não é um componente aqui</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">O jogo vem com %1$s</string> + <string name="wincomp_found_shipped">O jogo tem %1$s (costuma funcionar assim mesmo)</string> + <string name="wincomp_already_here">Já está neste jogo</string> + <string name="wincomp_no_recommendation">Nada na pasta do jogo indica um componente.</string> + <string name="wincomp_active">Instalados para este jogo (%1$d)</string> + <string name="wincomp_all">Todos os componentes (%1$d)</string> + <string name="wincomp_installers">Requerem um instalador do Windows (%1$d)</string> + <string name="wincomp_installers_note">Estes são programas de instalação próprios, sem um pacote dentro para desmontar, e ainda sem uma gravação do que instalam. A maioria são runtimes antigos que o Mono do Proton já substitui; as gravações são adicionadas à medida que são feitas.</string> + <string name="wincomp_show">Mostrar</string> + <string name="wincomp_hide">Ocultar</string> + <string name="wincomp_needs_installer">Executa o próprio programa de instalação (ainda sem gravação)</string> + <string name="wincomp_unsupported">Ainda sem suporte aqui</string> + <string name="wincomp_loading">Carregando os componentes…</string> + <string name="wincomp_failed">Não foi possível instalar: %1$s</string> + <string name="wincomp_downloaded">Baixado</string> + <string name="wincomp_downloading">Baixando %1$s</string> + <string name="wincomp_installing">Instalando: %1$s</string> + <string name="wincomp_reverting">Desativando…</string> + <string name="wincomp_download_size">Download de %1$s</string> + <string name="wincomp_next_launch">Entra em vigor na próxima vez que o jogo iniciar.</string> + <string name="mode_stretch169">Esticar jogos 16:9</string> + <string name="mode_stretch169_hint">Em telas mais quadradas que 16:9, estica os jogos para preencher a tela em vez de mostrar barras. Vale a partir da próxima sessão.</string> + <string name="mode_audio">Áudio</string> + <string name="mode_directaudio">DirectAudio para jogos</string> + <string name="mode_directaudio_hint">Ignora o PulseAudio para reduzir a latência.</string> + <string name="mode_mic">Microfone</string> + <string name="mode_mic_hint">Para chat de voz.</string> + <string name="mode_network">Rede</string> + <string name="mode_wifi_discovery">Descoberta de Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Mostra os nomes de Wi-Fi e as redes próximas na Steam.</string> + <string name="mode_wifi_location_off">Os serviços de localização estão desativados.</string> + <string name="mode_wifi_permission_denied">Permissão de localização não concedida.</string> + <string name="mode_wifi_open_settings">Abrir configurações</string> + <string name="mode_wifi_continue">Continuar</string> + <string name="mode_wifi_explain_title">Ativar a descoberta de Wi-Fi?</string> + <string name="mode_wifi_explain_text">O Android exige a permissão de localização para ler nomes de Wi-Fi e descobrir redes próximas. O DroidDeck usa esse acesso para mostrar essas redes na Steam. Não rastreamos sua localização. O acesso à internet funciona sem essa permissão.</string> + <string name="mode_storage">Armazenamento de jogos</string> + <string name="mode_storage_auto">Automático - o cartão SD, se houver, mais suas pastas Games</string> + <string name="mode_storage_auto_none">Automático - suas pastas Games, mais o cartão SD, se houver (nenhum agora)</string> + <string name="mode_storage_internal">Somente interno</string> + <string name="mode_storage_folder">Pasta: %1$s</string> + <string name="mode_second_library">Segunda biblioteca</string> + <string name="mode_storage_note">Jogos que carregam recursos do SD ou do armazenamento compartilhado durante o jogo podem ter engasgos.</string> + <string name="mode_storage_diagnostics">Diagnóstico de armazenamento</string> + <string name="mode_storage_diagnostics_hint">Registra os resultados de alocação e amostras de tempos de armazenamento em Compartilhar logs. Pode deixar as instalações mais lentas enquanto estiver ativado. Vale a partir da próxima sessão.</string> + <string name="mode_choose_folder">Escolher uma pasta…</string> + <string name="mode_custom_res_title">Resolução personalizada</string> + <string name="mode_custom_res_text">Substitui o limite e a proporção. Um tamanho que não corresponda à tela fica com barras.</string> + <string name="mode_width">Largura</string> + <string name="mode_height">Altura</string> + <string name="mode_custom_res_range">Entre 320×240 e 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d jogo</item> + <item quantity="many">%1$d jogos</item> + <item quantity="other">%1$d jogos</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Excluir</string> + <string name="common_restore">Restaurar</string> + <string name="common_download">Baixar</string> + <string name="common_delete_named">Excluir %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Driver do runtime</string> + <string name="comp_runtime_driver_hint">Usado pela Steam, pelos jogos e pela área de trabalho. Vale a partir da próxima sessão.</string> + <string name="comp_import_turnip">Importar zip do Turnip…</string> + <string name="comp_display_driver">Driver de exibição</string> + <string name="comp_display_driver_hint">Desenha os quadros na tela nos dois modos. Reinicie o app para aplicar.</string> + <string name="comp_import_adrenotools">Importar um zip do AdrenoTools…</string> + <string name="comp_never">nunca</string> + <string name="comp_nightlies_checked">Nightlies verificadas: %1$s</string> + <string name="comp_title">Componentes</string> + <string name="comp_about">Sobre Componentes</string> + <string name="comp_check_drivers">Procurar novos drivers</string> + <string name="comp_check_nightlies">Procurar novos pacotes nas Nightlies</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">O Proton escolhido aqui roda todos os jogos que não escolheram o próprio na Steam, e uma mudança feita na Steam também aparece aqui. A Steam substitui o Proton da Valve quando atualiza; os originais são mantidos para cada versão.</string> + <string name="comp_scope">Configuração</string> + <string name="comp_profile_configure">Configurar perfil</string> + <string name="comp_profile">Perfil</string> + <string name="comp_scope_general">Perfil padrão</string> + <string name="comp_scope_general_detail">Usado automaticamente por jogos sem substituições.</string> + <string name="comp_profile_game_detail">Configurações salvas, usadas automaticamente quando %1$s é iniciado.</string> + <string name="comp_game_hint">Escolha só as configurações de que este jogo precisa. Todo o resto continua usando o Perfil padrão.</string> + <string name="comp_game_fex">Predefinição do FEX</string> + <string name="comp_game_fex_inherited">Usando a predefinição do Perfil padrão.</string> + <string name="comp_game_fex_override">Predefinição personalizada salva para este jogo.</string> + <string name="comp_game_fex_custom">Variáveis personalizadas do FEX</string> + <string name="comp_game_use_general">Usar padrão</string> + <string name="comp_game_compatibility">Compatibilidade do jogo</string> + <string name="comp_game_environment_hint">Opções de ambiente do Proton, DXVK, VKD3D e de sincronização para este jogo.</string> + <string name="comp_game_proton_inherited">Usando o Proton do Perfil padrão.</string> + <string name="comp_game_proton_override">Proton personalizado salvo para este jogo pelo mapeamento de compatibilidade da Steam.</string> + <string name="comp_no_proton_short">Sem Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Usa o pacote do Perfil padrão de %1$s, a menos que este jogo selecione outro pacote.</string> + <string name="comp_game_component_general">Usa o pacote de componentes do Perfil padrão.</string> + <string name="comp_game_component_override">Usa %1$s só neste jogo.</string> + <string name="comp_game_runtime_options">Opções de runtime</string> + <string name="comp_game_environment_other_hint">Outras opções de ambiente por jogo do Proton, DXVK, VKD3D-Proton e de sincronização.</string> + <string name="comp_game_saved_next">O perfil de %1$s foi salvo para a próxima vez que o jogo for iniciado.</string> + <string name="game_no_steam_title">Iniciar sem o Steam</string> + <string name="game_no_steam_detail">Abre no Proton/FEX sem o cliente do Steam; os recursos do Steam ficam desligados.</string> + <string name="game_no_steam_on">Ativado</string> + <string name="game_steam_with">Inicia com o Steam</string> + <string name="game_steam_without">Inicia sem o Steam</string> + <string name="game_settings_card">Configurações</string> + <string name="game_settings_menu_title">Configurações de %1$s</string> + <string name="game_settings_default">Padrão</string> + <string name="game_settings_default_detail">Volta tudo o que foi alterado neste jogo para as configurações do app.</string> + <string name="game_sync_custom">Variáveis de sincronização personalizadas</string> + <string name="comp_game_proton_live">A escolha de Proton de %1$s foi salva e já está disponível na Steam.</string> + <string name="comp_game_proton_next">A escolha de Proton de %1$s foi salva. Reinicie a Steam antes de iniciar o jogo.</string> + <string name="comp_game_proton_not_runnable">%1$s não pode usar o Proton selecionado neste dispositivo.</string> + <string name="comp_game_load_failed">Não foi possível carregar o perfil de %1$s: %2$s</string> + <string name="comp_game_save_failed">Não foi possível salvar o perfil do jogo: %1$s</string> + <string name="comp_game_reset">Redefinir perfil do jogo</string> + <string name="comp_game_reset_title">Redefinir o perfil de %1$s?</string> + <string name="comp_game_reset_body">Remover as substituições de Proton, FEX, pacote de componentes, ambiente, filtragem de texturas e componentes do Windows deste jogo? Ele passará a usar o Perfil padrão.</string> + <string name="comp_game_reset_done">%1$s agora usa o Perfil padrão.</string> + <string name="comp_game_reset_failed">Não foi possível redefinir completamente o perfil do jogo: %1$s</string> + <string name="comp_default_live">%1$s agora roda todos os jogos que não escolheram o próprio Proton na Steam.</string> + <string name="comp_default_next">%1$s vai rodar todos os jogos que não escolheram o próprio Proton a partir da próxima vez que a Steam iniciar.</string> + <string name="comp_default_not_runnable">%1$s não consegue iniciar jogos aqui, então não pode ser o padrão.</string> + <string name="comp_default_failed">Não foi possível salvar o Proton padrão: %1$s</string> + <string name="comp_swapped">%1$s · %2$d trocados</string> + <string name="comp_all_original">%1$s · todos originais</string> + <string name="comp_game_running_suffix">%1$s · jogo em execução</string> + <string name="comp_esync_pack">%1$s · pacote droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · ainda sem pacote droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync integrado, sem necessidade de pacote</string> + <string name="comp_gpu_drivers">Drivers de GPU</string> + <string name="comp_reapplied">%1$s · reaplicado ao iniciar %2$s</string> + <string name="comp_next_queued">Próximo: %1$s · depois que o jogo fechar</string> + <string name="comp_in_use">%1$s em uso: %2$s</string> + <string name="comp_waits">Aguarda o jogo fechar</string> + <string name="comp_applies_next_game">Vale a partir da próxima vez que um jogo iniciar</string> + <string name="comp_import_zip">Importar .zip</string> + <string name="comp_reading">Lendo as versões do Proton…</string> + <string name="comp_no_proton">Nenhum Proton instalado ainda. Inicie a Steam uma vez para baixar o Proton ARM64 dela, ou adicione o GE-Proton, CachyOS ou DroidDeck-Proton em Configuração.</string> + <string name="comp_original">Original · %1$s</string> + <string name="comp_this_build">%1$s · esta versão</string> + <string name="comp_earlier_build">%1$s · versão anterior</string> + <string name="comp_installed_count">Instalados · %1$d</string> + <string name="comp_nothing_stored">Nada armazenado para %1$s ainda. Os arquivos deste Proton são salvos como o original dele.</string> + <string name="comp_waits_long">Há um jogo rodando neste Proton, então isto aguarda até ele fechar.</string> + <string name="comp_applies_long">Vale a partir da próxima vez que um jogo iniciar.</string> + <string name="comp_swap_title">Trocar %1$s?</string> + <string name="comp_swap_body">Colocar %1$s em %2$s? Os arquivos originais continuam salvos. %3$s</string> + <string name="comp_restore_title">Restaurar %1$s?</string> + <string name="comp_restore_body">Devolver o %1$s original para %2$s? %3$s</string> + <string name="comp_delete_package_body">Remove o pacote do app. Você pode baixá-lo de novo.</string> + <string name="comp_delete_original_title">Excluir este original?</string> + <string name="comp_delete_original_body">Este %1$s original é de uma versão anterior de %2$s. O original da versão atual é sempre mantido.</string> + <string name="comp_nightlies_count">Nas Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Atualize para listar os pacotes nas Nightlies.</string> + <string name="comp_nothing_new">Nada novo desde a última verificação.</string> + <string name="comp_import_wcp">Importar .wcp</string> + <string name="comp_restore_original">Restaurar o original deste Proton</string> + <string name="comp_restore_original_body">Devolver o %2$s original de %1$s?</string> + <string name="comp_swap">Trocar</string> + <string name="comp_about_text">FEX, DXVK e VKD3D-Proton para cada Proton com que a Steam roda jogos.\n\nSelecione uma linha instalada para colocá-la em uso. A troca vale a partir da próxima vez que um jogo iniciar, ou depois que o jogo em execução fechar.\n\nSuas escolhas são verificadas de novo antes de cada inicialização e restauradas se algo as tiver alterado. Os arquivos originais de cada Proton são mantidos, então as atualizações da Steam nunca os perdem.</string> + <string name="comp_tag_original">Original</string> + <string name="comp_tag_in_use">Em uso</string> + <string name="comp_tag_new">Novo</string> + <string name="comp_tag_stored">Armazenado</string> + <string name="perf_title">Desempenho</string> + <string name="perf_lede">Núcleos da CPU, correções da sessão e o nome do host. Vale a partir da próxima sessão.</string> + <string name="perf_client_cores_group">Núcleos do cliente Steam</string> + <string name="perf_override">Substituir a escolha de núcleos da Steam</string> + <string name="perf_override_hint">Fixa a Steam, o auxiliar de interface dela e o gamescope nos núcleos abaixo.</string> + <string name="perf_client_cores">Núcleos do cliente</string> + <string name="perf_client_cores_on">Núcleos para a Steam.</string> + <string name="perf_client_cores_off">Ative a substituição para escolher.</string> + <string name="perf_game_cores_group">Núcleos dos jogos</string> + <string name="perf_game_cores">Núcleos dos jogos</string> + <string name="perf_game_cores_hint">Núcleos para os jogos. Com todos selecionados, o Android distribui livremente.</string> + <string name="perf_client_ui">Interface do cliente</string> + <string name="perf_glthread">GL em threads</string> + <string name="perf_glthread_hint">Pode deixar os menus da Steam mais responsivos.</string> + <string name="perf_zink">Zink: descritores sob demanda</string> + <string name="perf_zink_hint">Recomendado para drivers sem buffers de descritores.</string> + <string name="perf_noglerror">Pular verificações de erro do GL</string> + <string name="perf_noglerror_hint">Desativa a validação do GL a cada chamada.</string> + <string name="perf_gsrealtime">gamescope: fila de GPU em tempo real</string> + <string name="perf_gsrealtime_hint">Prioriza o trabalho de GPU do compositor. Pode suavizar o ritmo dos quadros, com algum custo para os jogos.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Manter a GPU no clock máximo</string> + <string name="perf_gpuclock_hint">Só em Adreno. Menos engasgos, mais gasto de bateria e mais calor.</string> + <string name="perf_fixes">Correções da sessão</string> + <string name="perf_sysmem">Turnip: renderização sysmem</string> + <string name="perf_sysmem_hint">Mais rápido para a Steam e a maioria dos jogos. Obrigatório nas Adreno 710/720/722.</string> + <string name="perf_xalia">Pular o assistente xalia da Steam</string> + <string name="perf_fastsync">droiddeck-ntsync (experimental)</string> + <string name="perf_fastsync_hint">Um substituto em espaço de usuário para o driver ntsync do Linux, para testes. Enquanto estiver ativado, o Proton o usa no lugar do droiddeck-esync e do droiddeck-fsync. Funciona com o Proton Experimental ARM64, o GE-Proton e o proton-cachyos. Vale a partir da próxima sessão.</string> + <string name="perf_esync">droiddeck-esync</string> + <string name="perf_fsync">droiddeck-fsync primeiro</string> + <string name="perf_fsync_hint">Roda o fsync do próprio Proton nos arquivos originais do Proton, com o futex_waitv fornecido em espaço de usuário, então não precisa de pacote e continua funcionando assim que a Steam atualiza o Proton. Enquanto estiver ativado, os jogos o usam antes do droiddeck-esync, exceto os poucos que o Proton mantém fora do fsync. Vale a partir da próxima sessão.</string> + <string name="perf_esync_hint">As threads do Windows dos jogos esperam umas pelas outras via eventfd e memória compartilhada, em vez de idas e voltas pelo wineserver. Usa um pacote droiddeck-esync feito para aquela versão exata do Proton; os pacotes são obtidos automaticamente. Até existir um para uma nova versão do Proton, o droiddeck-fsync faz o papel dele. Vale a partir da próxima sessão.</string> + <string name="perf_xalia_hint">Desativa o assistente de navegação por controle do Proton, que consome CPU em todos os jogos.</string> + <string name="perf_seccomp">Rodar o proot sem seccomp</string> + <string name="perf_seccomp_hint">Pode corrigir erros de syscall ausente em alguns kernels. Pode reduzir o desempenho.</string> + <string name="perf_fastpath">Caminho rápido do proot</string> + <string name="perf_fastpath_needs_seccomp">Requer o filtro seccomp do proot.</string> + <string name="perf_fastpath_hint">Buscas de arquivos mais rápidas e menos engasgos. Desative se um programa não encontrar os arquivos dele.</string> + <string name="perf_identity">Identidade da sessão</string> + <string name="perf_hostname">Nome do host</string> + <string name="perf_hostname_hint">O nome que a Steam vê para este dispositivo. Em branco, volta a ser %1$s.</string> + <string name="perf_hostname_invalid">Só letras, dígitos e hifens internos, até 63 caracteres.</string> + <string name="perf_phantom_warning">O Android está configurado para encerrar esta sessão</string> + <string name="driver_installed">Instalados</string> + <string name="driver_available">Disponíveis para download</string> + <string name="driver_nothing_new">Nada novo desde a última verificação.</string> + <string name="driver_restore_builtin">Restaurar drivers integrados</string> + <string name="driver_delete_builtin">Integrado ao app: isto remove os arquivos descompactados dele e o oculta. Restaurar drivers integrados o traz de volta.</string> + <string name="driver_delete_bundle">Metade de um pacote Android + Linux: as duas metades são removidas. Um driver em uso volta para o padrão.</string> + <string name="driver_delete_plain">Os arquivos dele são removidos do app.</string> + <string name="driver_delete_in_use">Os arquivos dele são removidos. Ele está em uso, então o padrão assume.</string> + <string name="drawer_page_display">Tela</string> + <string name="drawer_page_effects">Efeitos</string> + <string name="drawer_page_controls">Controles</string> + <string name="drawer_page_components">Componentes</string> + <string name="drawer_page_controller">Controle</string> + <string name="drawer_page_settings">Configurações</string> + <string name="drawer_page_desc">Página %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Área de trabalho</string> + <string name="drawer_steam_menu">Menu Steam</string> + <string name="drawer_quick_access">Acesso rápido</string> + <string name="drawer_open_qam">Abrir o menu de Acesso rápido</string> + <string name="drawer_prev_page">Página anterior</string> + <string name="drawer_next_page">Próxima página</string> + <string name="drawer_hud">HUD de desempenho</string> + <string name="drawer_scaling">Modo de escala</string> + <string name="drawer_scaling_sharpness">Nitidez da escala</string> + <string name="drawer_effects">Efeitos de tela</string> + <string name="drawer_effects_hint">Em tempo real. Custa um pouco de tempo de GPU enquanto algum efeito estiver ativado.</string> + <string name="drawer_look">Predefinições</string> + <string name="drawer_look_custom">Personalizado</string> + <string name="drawer_effects_advanced">Avançado</string> + <string name="widgets_expanded">Expandido</string> + <string name="widgets_collapsed">Recolhido</string> + <string name="drawer_cas">Nitidez (CAS)</string> + <string name="drawer_cas_level">Nível de nitidez</string> + <string name="drawer_fake_hdr">HDR falso</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Entrar no SteamVR</string> + <string name="steamvr_checking">Verificando o SteamVR…</string> + <string name="drawer_deband">Redução de banding</string> + <string name="drawer_deband_strength">Intensidade da redução de banding</string> + <string name="drawer_brightness">Brilho</string> + <string name="drawer_contrast">Contraste</string> + <string name="drawer_gamma">Gama</string> + <string name="drawer_saturation">Saturação</string> + <string name="drawer_fxaa">FXAA (suavização de bordas)</string> + <string name="drawer_toon">Contornos cartoon</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Filtragem de texturas</string> + <string name="drawer_texture_hint">Jogos DirectX 9–11, a partir da próxima vez que forem iniciados.</string> + <string name="drawer_anisotropy">Filtragem anisotrópica</string> + <string name="drawer_texture_sharpness">Nitidez das texturas</string> + <string name="drawer_texture_sharpness_note">Um mip bias negativo: texturas mais nítidas, com um pouco de cintilação. O Automático acompanha o quanto a sessão é ampliada para a tela.</string> + <string name="drawer_touch_auto">Automático (%1$s)</string> + <string name="drawer_keyboard">Teclado</string> + <string name="drawer_latency">Latência</string> + <string name="drawer_low_latency_controller">Controle de baixa latência</string> + <string name="drawer_low_latency_controller_hint">O controle envia dados a 1000 Hz em vez de 250 Hz. Um pouco mais de CPU.</string> + <string name="drawer_low_latency_touch">Toque de baixa latência</string> + <string name="drawer_low_latency_touch_hint">Os toques ignoram o agrupamento de quadros; os controles de toque da Steam vão a 1000 Hz. Um pouco mais de CPU.</string> + <string name="drawer_pc_keyboard">Teclado de PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Segunda tela</string> + <string name="drawer_second_screen_mode">Modo</string> + <string name="drawer_second_screen_shows">Mostra</string> + <string name="drawer_android_apps">Apps Android</string> + <string name="drawer_launch_app">Abrir um app</string> + <string name="common_hide">Ocultar</string> + <string name="common_show">Mostrar</string> + <string name="drawer_no_apps">Nenhum app que possa ser aberto</string> + <string name="drawer_session_behavior">Comportamento da sessão</string> + <string name="drawer_suspend_hint">Vale agora e nas próximas sessões neste modo.</string> + <string name="drawer_next_session">Próxima sessão</string> + <string name="drawer_support">Suporte</string> + <string name="drawer_logs">Logs da sessão</string> + <string name="drawer_logs_hint">Anexe a um relatório de bug</string> + <string name="drawer_share_logs">Compartilhar logs</string> + <string name="drawer_background">Segundo plano</string> + <string name="drawer_stop">Encerrar</string> + <string name="drawer_stop_title">Encerrar a sessão?</string> + <string name="drawer_running_now">Em execução agora</string> + <string name="drawer_no_game">Nenhum jogo está rodando em um Proton</string> + <string name="drawer_selected_profile">Perfil do jogo</string> + <string name="drawer_selected_profile_none">Os detalhes do perfil ainda não estão disponíveis.</string> + <string name="drawer_profile_refresh_failed_initial">Não foi possível carregar os perfis de jogos. Tentando de novo automaticamente.</string> + <string name="drawer_profile_refresh_failed_stale">Não foi possível atualizar os perfis de jogos. Mostrando os últimos dados disponíveis; tentando de novo automaticamente.</string> + <string name="drawer_profile_inspect_hint">Veja e edite as configurações salvas usadas na próxima inicialização.</string> + <string name="drawer_profile_default">Usando o Perfil padrão</string> + <string name="drawer_profile_custom">Perfil personalizado</string> + <string name="drawer_component_inherited">Usando %1$s do Perfil padrão.</string> + <string name="drawer_game_components_note">As alterações são salvas no perfil de %1$s e valem a partir da próxima vez que o jogo for iniciado.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d substituição do jogo</item> + <item quantity="many">%1$d substituições do jogo</item> + <item quantity="other">%1$d substituições do jogo</item> + </plurals> + <string name="drawer_no_proton">Nenhum Proton instalado ainda.</string> + <string name="drawer_game_running">jogo em execução</string> + <string name="drawer_reapplied">reaplicado ao iniciar %1$s</string> + <string name="drawer_original">Original</string> + <string name="drawer_components_note">Importe e exclua na página Componentes.</string> + <string name="setup_check_done">Concluído</string> + <string name="setup_check_warn">Requer atenção</string> + <string name="setup_check_busy">Processando</string> + <string name="setup_limit_adb_failed">Verifique o endereço IP e a porta da Depuração por Wi-Fi, ou pareie de novo se o Android removeu este dispositivo.</string> + <string name="setup_install">Instalar</string> + <string name="setup_manage">Gerenciar</string> + <string name="setup_tab_overview">Visão geral</string> + <string name="setup_tab_controller">Controle</string> + <string name="setup_tab_session">Sessão</string> + <string name="setup_tab_launcher">Inicializador</string> + <string name="setup_title">Configuração</string> + <string name="setup_all_set">● Tudo pronto</string> + <string name="setup_n_ready">%1$d de %2$d prontos</string> + <string name="setup_system_check">Verificação do sistema</string> + <string name="setup_gpu_supported">Dispositivo compatível</string> + <string name="setup_gpu_untested">GPU não testada</string> + <string name="setup_gpu_unsupported">GPU sem suporte</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">A Steam requer um driver Adreno; %1$s pode mostrar uma tela preta</string> + <string name="setup_runtime">Runtime do Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Não instalado · cerca de 3 GB, instalado no primeiro Jogar</string> + <string name="setup_installed">Instalado</string> + <string name="setup_runtime_update">%1$s · atualização disponível</string> + <string name="setup_runtime_current">%1$s · atualizado</string> + <string name="setup_limit">Limite de processos filhos</string> + <string name="setup_limit_on">Ativado · o Android pode fechar a Steam. Desativá-lo leva um minuto.</string> + <string name="setup_limit_unset">Não definido · o Android pode fechar a Steam. Desativá-lo leva um minuto.</string> + <string name="setup_limit_unknown">Não foi possível verificar · desativá-lo leva um minuto.</string> + <string name="setup_fix_it">Corrigir</string> + <string name="setup_details">Detalhes</string> + <string name="setup_dev_options">Opções do desenvolvedor</string> + <string name="setup_use_wireless">Usar a Depuração por Wi-Fi</string> + <string name="setup_check_again">Verificar de novo</string> + <string name="setup_limit_turn_on">Ativar o limite</string> + <string name="setup_account">Conta Steam</string> + <string name="setup_signed_in_offline">Sessão iniciada como %1$s · modo offline</string> + <string name="setup_signed_in">Sessão iniciada como %1$s</string> + <string name="setup_sign_in">Pressione Jogar e inicie sessão na Steam</string> + <string name="setup_tools">Ferramentas</string> + <string name="setup_controller">Controle</string> + <string name="setup_controller_unavailable">As configurações de controle não estão disponíveis.</string> + <string name="setup_session">Sessão</string> + <string name="setup_logs">Logs da sessão</string> + <string name="setup_logs_hint">Salvos após cada sessão</string> + <string name="setup_agent_commands">Ferramentas de depuração</string> + <string name="setup_latest_logs">Logs da última sessão</string> + <string name="setup_saved_logs">Logs de sessão salvos</string> + <string name="setup_saved_logs_hint">Mantém os %1$d mais recentes</string> + <string name="setup_clear_logs">Limpar logs</string> + <string name="setup_offline">Modo offline</string> + <string name="setup_sign_in_first">Inicie sessão na Steam primeiro</string> + <string name="setup_launcher">Inicializador</string> + <string name="setup_language">Idioma</string> + <string name="setup_language_hint">A Steam também o usa, a partir da próxima vez que iniciar.</string> + <string name="setup_language_system">Padrão do sistema (%1$s)</string> + <string name="setup_language_system_short">Padrão do sistema</string> + <string name="setup_app_scale">Escala do app</string> + <string name="setup_app_scale_hint">Texto e controles do DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (padrão)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Aparência do inicializador</string> + <string name="setup_home">Usar como tela inicial</string> + <string name="setup_home_on">O DroidDeck pode ser o app de início</string> + <string name="setup_home_off">O DroidDeck nunca é oferecido como app de início</string> + <string name="setup_orientation">Orientação</string> + <string name="setup_orientation_auto">Paisagem automática</string> + <string name="setup_orientation_landscape">Paisagem</string> + <string name="setup_orientation_reverse">Paisagem invertida</string> + <string name="setup_fullscreen">Tela cheia</string> + <string name="setup_fullscreen_on">Oculta as barras de status e de navegação do Android</string> + <string name="setup_fullscreen_off">Mostra as barras de status e de navegação do Android</string> + <string name="setup_default_home">App de início padrão</string> + <string name="setup_choose_home">Escolher um app de início</string> + <string name="setup_choose">Escolher</string> + <string name="setup_linux_apps">Apps Linux (beta)</string> + <string name="setup_tool_files">Arquivos</string> + <string name="setup_tool_files_hint">Navegue e gerencie arquivos</string> + <string name="setup_tool_protons">Versões do Proton</string> + <string name="setup_tool_protons_hint">Instale versões ARM64 do Proton</string> + <string name="setup_tool_performance">Desempenho</string> + <string name="setup_tool_performance_hint">Atribuição de núcleos da CPU</string> + <string name="setup_tool_roms">Pasta de ROMs</string> + <string name="setup_tool_roms_hint">Onde os jogos de emuladores ficam armazenados</string> + <string name="setup_card_components">Componentes</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Controles</string> + <string name="setup_card_controls_hint">Mapeamento de botões</string> + <string name="store_tab_discover">Descobrir</string> + <string name="store_tab_search">Buscar</string> + <string name="store_tab_installed">Instalados</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Loja</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak pronto</string> + <string name="store_needs_runtime">Instale primeiro o runtime do Linux em Configuração.</string> + <string name="store_setup_title">Configurar o Flatpak</string> + <string name="store_setup_text">Adiciona o Flatpak e o conecta ao Flathub (cerca de 20 MB). O primeiro app também baixa o runtime dele.</string> + <string name="store_setting_up">Configurando…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Atualizações</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Iniciando…</string> + <string name="store_categories">Categorias</string> + <string name="store_unreachable">Não foi possível acessar o Flathub. Verifique sua conexão e tente novamente.</string> + <string name="store_try_again">Tentar novamente</string> + <string name="store_search_label">Buscar no Flathub</string> + <string name="store_search_placeholder">Firefox, jogos, emuladores…</string> + <string name="store_search">Buscar</string> + <string name="store_all">Todos</string> + <string name="store_searching">Buscando…</string> + <string name="store_search_hint">Busque pelo nome ou escolha uma categoria. Só apps ARM64 são listados.</string> + <string name="store_no_results">Nenhum app ARM64 no Flathub corresponde a isso.</string> + <string name="store_results">Resultados</string> + <string name="store_check_updates">Verificar atualizações</string> + <string name="store_update_all">Atualizar tudo (%1$d)</string> + <string name="store_all_current">● Tudo está atualizado</string> + <string name="store_no_apps">Nenhum app ainda. Encontre alguns em Descobrir ou Buscar.</string> + <string name="store_setup_first_note">Configure o Flatpak para instalar apps.</string> + <string name="store_update_available_prefix">Atualização disponível · %1$s</string> + <string name="store_open">Abrir</string> + <string name="store_details">Detalhes</string> + <string name="store_remove">Remover</string> + <string name="store_press_again">Pressione de novo para remover</string> + <string name="store_installing">Instalando…</string> + <string name="store_install">Instalar</string> + <string name="store_setup_first">Configure o Flatpak primeiro</string> + <string name="store_download_size">Download de %1$s</string> + <string name="store_installed_chip">● Instalado</string> + <string name="store_details_failed">Não foi possível carregar a página deste app no Flathub.</string> + <string name="store_loading">Carregando do Flathub…</string> + <string name="store_no_arm">Não há versão ARM64 no Flathub, então não é possível instalar aqui.</string> + <string name="store_screenshots">Capturas de tela</string> + <string name="store_about">Sobre</string> + <string name="store_app_id">ID do app</string> + <string name="store_license">Licença</string> + <string name="store_runtime">Runtime</string> + <string name="store_installed_size">Tamanho instalado</string> + <string name="store_installed_size_value">%1$s (mais o runtime compartilhado)</string> + <string name="store_website">Site</string> + <string name="store_verified">Verificado</string> + <string name="upd_title">Atualizações</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Verificado %1$s</string> + <string name="upd_not_checked">Ainda não verificado</string> + <string name="upd_perm_title">Permita que o DroidDeck se atualize</string> + <string name="upd_perm_text">Na próxima tela, ative Permitir desta fonte e volte. A atualização continua sozinha.</string> + <string name="upd_open_settings">Abrir configurações</string> + <string name="upd_not_now">Agora não</string> + <string name="upd_signed_status">Assinatura diferente</string> + <string name="upd_signed_headline">Não é possível atualizar por cima</string> + <string name="upd_signed_detail">Esta cópia não está assinada com a chave de lançamento do DroidDeck, então as atualizações não podem ser instaladas por cima dela. Desinstale-a para trocar.</string> + <string name="upd_available">Atualização disponível</string> + <string name="upd_blocked_status">Não é possível instalar</string> + <string name="upd_switch">Pronto para trocar</string> + <string name="upd_ahead_status">À frente da Estável</string> + <string name="upd_ahead_headline">Você está à frente da Estável</string> + <string name="upd_ahead_detail">Esta versão é mais nova que a Estável mais recente. Você passará para a Estável no próximo lançamento dela.</string> + <string name="upd_gone_status">Teste encerrado</string> + <string name="upd_gone_headline">Este teste foi encerrado</string> + <string name="upd_gone_detail">A correção dele foi incorporada ou descartada. Siga a Prévia para ter as correções mais recentes.</string> + <string name="upd_current_status">Atualizado</string> + <string name="upd_current_headline">Você tem a versão mais recente: %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Atualizar%1$s</string> + <string name="upd_install_button">Instalar%1$s</string> + <string name="upd_install_anyway">Instalar a Estável %1$s mesmo assim</string> + <string name="upd_follow_preview">Seguir a Prévia</string> + <string name="upd_stop_session">Encerre a sessão em execução para atualizar.</string> + <string name="upd_less">Menos</string> + <string name="upd_more">Mais</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Nova versão Prévia</string> + <string name="upd_new_test">Versão de teste do PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">CANAL DE ATUALIZAÇÃO</string> + <string name="upd_stable">Estável</string> + <string name="upd_stable_hint">Versões testadas, para a maioria das pessoas</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Prévia</string> + <string name="upd_preview_hint">As correções mais recentes, antes da Estável</string> + <string name="upd_preview_current">Atualizado</string> + <string name="upd_tests">Versões de teste</string> + <string name="upd_tests_hint">Experimente uma correção antes do lançamento</string> + <string name="upd_tests_none">Nenhuma no momento</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Não compilada para esta cópia do DroidDeck</string> + <string name="upd_updated">Atualizado %1$s</string> + <string name="upd_test_name">teste do PR #%1$d</string> + <string name="upd_while_ago">há algum tempo</string> + <string name="upd_just_now">agora mesmo</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d para testar</item> + <item quantity="many">%1$d para testar</item> + <item quantity="other">%1$d para testar</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Mudanças desde a sua versão · %1$d versão atrás</item> + <item quantity="many">Mudanças desde a sua versão · %1$d versões atrás</item> + <item quantity="other">Mudanças desde a sua versão · %1$d versões atrás</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Mudanças recentes · %1$d versão</item> + <item quantity="many">Mudanças recentes · %1$d versões</item> + <item quantity="other">Mudanças recentes · %1$d versões</item> + </plurals> + <string name="gate_title">Uma configuração do Android para mudar</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">O Android interrompe apps que iniciam muitos processos em segundo plano, e a Steam inicia dezenas. Até isso mudar, os jogos fecham sem mostrar erro.</string> + <string name="gate_fix_for_me">Corrigir para mim</string> + <string name="gate_toggle_steps">Ative “Desativar restrições de processos filhos” e volte. Deixe as Opções do desenvolvedor ativadas, ou a chave volta a ser desativada.</string> + <string name="gate_open_dev">Abrir as Opções do desenvolvedor</string> + <string name="gate_no_toggle">Esta versão do Android não tem uma chave para isso, então o DroidDeck faz a mudança pela Depuração por Wi-Fi. Leva cerca de um minuto, sem precisar de computador.</string> + <string name="gate_needs_wifi">A Depuração por Wi-Fi requer Wi-Fi. Qualquer rede serve; não precisa de internet.</string> + <string name="gate_needs_notifications">O código de pareamento é digitado em uma notificação. Permita notificações do DroidDeck ou use Outras formas.</string> + <string name="gate_allow_notifications">Permitir notificações</string> + <string name="gate_step1">Abra Configurações → Opções do desenvolvedor → Depuração por Wi-Fi e ative</string> + <string name="gate_step2">Toque em “Parear o dispositivo com um código de pareamento”</string> + <string name="gate_step3">Digite o código na notificação do DroidDeck</string> + <string name="gate_waiting">Aguardando o pop-up de pareamento…</string> + <string name="gate_code_needed">Pop-up encontrado. Digite o código dele na notificação.</string> + <string name="gate_status">Status</string> + <string name="gate_polling">Verificando a cada 2 segundos. Esta página fecha quando o limite for desativado.</string> + <string name="gate_other_ways">Outras formas</string> + <string name="gate_other_toggle">Depuração por Wi-Fi, endereço manual, ADB pelo computador</string> + <string name="gate_other_no_toggle">Endereço manual, ADB pelo computador, Opções do desenvolvedor</string> + <string name="gate_use_wireless_instead">Usar a Depuração por Wi-Fi</string> + <string name="gate_some_roms">Algumas ROMs adicionam a chave mesmo assim. Procure “processos filhos” nas Opções do desenvolvedor.</string> + <string name="gate_manual_hint">Se a notificação não funcionar, digite você mesmo o endereço e o código do pop-up.</string> + <string name="gate_enter_manually">Digitar endereço manualmente</string> + <string name="gate_from_computer">De um computador com ADB:</string> + <string name="gate_copy_command">Copiar comando</string> + <string name="gate_choose_display">Escolha em qual tela abrir as Configurações do Android.</string> + <string name="gate_main_screen">Tela principal</string> + <string name="wadb_finding_port">Pareado. Procurando a porta da Depuração por Wi-Fi…</string> + <string name="wadb_enter_port">Pareado. Digite a porta mostrada nas Configurações.</string> + <string name="wadb_applying">Dispositivo encontrado. Aplicando a configuração…</string> + <string name="wadb_apply_failed">Não foi possível aplicar automaticamente. Verifique o endereço abaixo e tente de novo. %1$s</string> + <string name="wadb_title_wireless">Depuração por Wi-Fi</string> + <string name="wadb_title_done">Limite de processos filhos atualizado</string> + <string name="wadb_title">Alterar o limite de processos filhos</string> + <string name="wadb_lede_compact0">Se a opção não existir, pareie pela Depuração por Wi-Fi.</string> + <string name="wadb_lede_compact1">Pareado. Verifique o endereço IP e a porta na Depuração por Wi-Fi.</string> + <string name="wadb_lede_done">O limite de processos filhos foi atualizado.</string> + <string name="wadb_lede0">Use a etapa 2 se as Opções do desenvolvedor não tiverem a configuração de processos filhos. Abra Opções do desenvolvedor → Depuração por Wi-Fi → Parear o dispositivo com um código de pareamento.</string> + <string name="wadb_lede1">Pareado. Use o endereço abaixo ou atualize-o em Depuração por Wi-Fi → Endereço IP e porta.</string> + <string name="wadb_lede_done_long">O limite de processos filhos foi atualizado pela Depuração por Wi-Fi.</string> + <string name="wadb_confirmed_on">O Android confirmou que o limite está ativado.</string> + <string name="wadb_confirmed_off">O Android confirmou que o limite está desativado.</string> + <string name="wadb_pair_group">2 · Parear pela Depuração por Wi-Fi</string> + <string name="wadb_pair_address">Endereço IP e porta do pop-up de pareamento</string> + <string name="wadb_pin">Código de pareamento (PIN)</string> + <string name="wadb_pin_placeholder">6 dígitos</string> + <string name="wadb_pair">Parear</string> + <string name="wadb_apply_group">2 · Aplicar pela Depuração por Wi-Fi</string> + <string name="wadb_connect_address">Endereço IP e porta de conexão</string> + <string name="wadb_pair_again">Parear de novo</string> + <string name="wadb_turn_off">Desativar o limite</string> + <string name="wadb_other_ways">Outras formas de alterar</string> + <string name="wadb_dev_try_first">1 · Opções do desenvolvedor (tente primeiro)</string> + <string name="wadb_restrict_on">Desative “Desativar restrições de processos filhos”.</string> + <string name="wadb_restrict_off">Ative “Desativar restrições de processos filhos”.</string> + <string name="wadb_computer_last">3 · ADB pelo computador (último recurso)</string> + <string name="wadb_only_if">Só se a Depuração por Wi-Fi não estiver disponível.</string> + <string name="wadb_computer_group">3 · ADB pelo computador (último recurso)</string> + <string name="ctrl_osc_hint">Quando os controles de toque aparecem em uma sessão</string> + <string name="ctrl_color">Cor</string> + <string name="ctrl_color_hint">Tom dos botões na tela</string> + <string name="ctrl_custom">Personalizada</string> + <string name="ctrl_opacity">Opacidade</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Tamanho dos botões</string> + <string name="ctrl_size_hint" formatted="false">100% é o tamanho padrão</string> + <string name="ctrl_stick_click">Clique do analógico</string> + <string name="ctrl_stick_click_hint">Toque duas vezes e segure um analógico para L3 ou R3</string> + <string name="ctrl_adaptive">Analógicos adaptáveis</string> + <string name="ctrl_rumble">Vibração do jogo</string> + <string name="ctrl_steam_button">Botão Steam</string> + <string name="ctrl_qam_button">Botão QAM</string> + <string name="ctrl_keyboard_button">Botão do teclado</string> + <string name="ctrl_select_steam">Pressione Select para abrir o menu Steam</string> + <string name="ctrl_select_steam_hint">Em vez de View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Cons como controles de RV</string> + <string name="ctrl_joycon_vr_hint">Enquanto o SteamVR está rodando, cada Joy-Con vira uma mão. Aponte-o para a frente e segure Home ou Capture para recentralizá-lo.</string> + <string name="setup_animations">Animações</string> + <string name="ctrl_adaptive_hint">Os analógicos aparecem onde você toca e somem ao soltar</string> + <string name="ctrl_layout">Layout</string> + <string name="ctrl_layout_custom">Posições personalizadas salvas</string> + <string name="ctrl_layout_default">Ajustado a esta tela</string> + <string name="ctrl_edit">Editar</string> + <string name="ctrl_reset">Redefinir</string> + <string name="ctrl_mapping">Mapeamento de botões</string> + <string name="ctrl_mapping_default">Cada botão envia o próprio comando</string> + <string name="ctrl_mapping_count">%1$d de %2$d botões remapeados</string> + <string name="ctrl_configure">Configurar</string> + <string name="ctrl_reset_all">Redefinir controle</string> + <string name="ctrl_reset_all_hint">Restaura todas as configurações do controle e o layout</string> + <string name="ctrl_mapping_lede">O que cada botão na tela envia ao jogo. Oculto remove o botão.</string> + <string name="ctrl_onscreen_buttons">Botões na tela</string> + <string name="ctrl_defaults">Padrões</string> + <string name="ctrl_reset_mapping">Redefinir mapeamento</string> + <string name="content_android_apps">Apps Android</string> + <string name="content_apps_count">%1$d apps</string> + <string name="content_no_android_apps">Nenhum app Android que possa ser aberto foi encontrado.</string> + <string name="content_desktop_installed">● Área de trabalho instalada</string> + <string name="content_desktop_first_open">Instalada ao abrir pela primeira vez</string> + <string name="content_available">Disponível para instalar</string> + <string name="content_not_installed">Não instalado.</string> + <string name="content_not_installed_suffix">%1$s · não instalado</string> + <string name="content_open_named">Abrir %1$s</string> + <string name="content_games">Jogos</string> + <string name="content_choose_roms">Escolha uma pasta de ROMs.</string> + <string name="content_retroarch_roms">Navegue até /root/ROMs no RetroArch.</string> + <string name="content_add_roms">Adicione jogos de %1$s em ROMs/%2$s.</string> + <string name="content_install_named">Instalar %1$s</string> + <string name="content_stop_to_install">Encerre a sessão para instalar</string> + <string name="content_runtime_required">Runtime necessário</string> + <string name="content_loading_details">Carregando detalhes da instalação…</string> + <string name="content_details_unavailable">Os detalhes da instalação não estão disponíveis. Tente novamente mais tarde.</string> + <string name="content_needs_runtime">Instale primeiro o runtime do Linux em Configuração.</string> + <string name="content_stop_first">Encerre a sessão em execução para instalar apps da área de trabalho.</string> + <string name="content_install_into">Instala %1$s na área de trabalho Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Ocultar tira o item da Área de trabalho. Os arquivos dele continuam no runtime do Linux.</string> + <string name="content_rom_gone">Esse jogo não está mais na pasta de ROMs.</string> + <string name="content_desktop_system">Área de trabalho · %1$s</string> + <string name="content_launch_in">Abrir em %1$s</string> + <string name="content_also_in">Também em %1$s</string> + <string name="content_page_gone">Essa página não existe mais. Escolha uma seção à esquerda.</string> + <string name="content_open_desktop">Abrir área de trabalho</string> + <string name="content_install_open_desktop">Instalar e abrir área de trabalho</string> + <string name="desktop_remove_title">Desinstalar área de trabalho</string> + <string name="desktop_remove_text">Remove a área de trabalho e os apps incluídos nela. Mantém jogos, apps adicionados, configurações e bibliotecas compartilhadas.</string> + <string name="desktop_removing">Removendo a área de trabalho</string> + <string name="desktop_removed">Área de trabalho removida</string> + <string name="desktop_cleaning_legacy">Removendo arquivos antigos do LXQt</string> + <string name="desktop_removal_unknown">Atualize o DroidDeck antes de remover esta versão da área de trabalho.</string> + <string name="content_linux_desktop">Área de trabalho Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox e seus emuladores</string> + <string name="games_empty">Os jogos que você instala na Steam aparecem aqui após a sessão.</string> + <string name="games_play_steam">Jogar na Steam</string> + <string name="games_play_steamvr">Jogar no SteamVR</string> + <string name="games_launch_settings">Configurações de inicialização</string> + <string name="games_launch">Iniciar</string> + <string name="games_files">Arquivos do jogo</string> + <string name="games_prefix">Prefixo do Proton</string> + <string name="games_saves_looking">Procurando jogos salvos…</string> + <string name="games_saves_none">Nenhuma pasta de jogos salvos encontrada pelo nome. A exportação inclui toda a pasta do usuário.</string> + <string name="games_saves_folders">%1$d pastas de jogos salvos</string> + <string name="games_saves_summary">%1$s · %2$d arquivos · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Gerenciar jogos salvos</string> + <string name="games_saves">Jogos salvos</string> + <string name="games_import_saves">Importar jogos salvos…</string> + <string name="games_export_gamehub">Exportar como zip do GameHub…</string> + <string name="games_export_winlator">Exportar como zip do Winlator…</string> + <string name="games_open_save_folder">Abrir pasta de jogos salvos</string> + <string name="games_never_played">Nunca jogado</string> + <string name="games_runtime_busy_percent">Runtime ocupado · %1$d%%</string> + <string name="games_runtime_busy">Runtime ocupado</string> + <string name="games_runtime_first_play">O runtime é instalado no primeiro Jogar</string> + <string name="games_runtime_update">Atualização do runtime disponível</string> + <string name="games_runtime_ready">● Runtime pronto</string> + <string name="games_last_played">Jogado por último: %1$s</string> + <string name="games_internal">Armazenamento interno</string> + <string name="games_added">Jogo adicionado</string> + <string name="games_custom">Jogo personalizado</string> + <string name="games_store_storage">Armazenamento de jogos</string> + <string name="gpu_auto_hint">O melhor par para esta GPU, sempre atualizado</string> + <string name="gpu_manual_hint">Escolha um par você mesmo</string> + <string name="gpu_checking">Procurando drivers…</string> + <string name="gpu_none_listed">Nenhum driver listado ainda. Atualize para procurá-los.</string> + <string name="gpu_hide_other">Ocultar drivers de outras GPUs</string> + <string name="gpu_show_other">Mostrar drivers de outras GPUs</string> + <string name="gpu_advanced">Avançado</string> + <string name="gpu_set_with_display">Definido junto com o driver de exibição: %1$s contém os dois.</string> + <string name="gpu_set_with_runtime">Definido junto com o driver do runtime: %1$s contém os dois.</string> + <string name="gpu_runtime_hint">Usado pelos jogos e pela área de trabalho.</string> + <string name="gpu_runtime_default">Padrão do runtime</string> + <string name="gpu_auto_by_gpu">Automático - escolhido pela GPU</string> + <string name="gpu_manage">Baixar, importar ou excluir…</string> + <string name="gpu_in_use_caps">EM USO</string> + <string name="gpu_builtin">Os drivers integrados ao DroidDeck</string> + <string name="gpu_matched_pair">Drivers do runtime e de exibição definidos juntos como um par compatível.</string> + <string name="gpu_recommended_for">Recomendado para esta GPU: %1$s.</string> + <string name="gpu_refresh_hint">Atualize para procurar drivers para esta GPU.</string> + <string name="gpu_recommended_caps">RECOMENDADO</string> + <string name="gpu_unavailable">Indisponível</string> + <string name="load_runtime">Runtime do Linux</string> + <string name="load_runtime_detail">Preparando o runtime do Linux</string> + <string name="load_session">Sessão</string> + <string name="load_session_detail">Iniciando a tela e o áudio</string> + <string name="load_steam">Cliente Steam</string> + <string name="load_steam_detail">Verificando a Steam e as ferramentas de compatibilidade dela</string> + <string name="load_opening_steam">Abrindo a Steam</string> + <string name="load_opening_steam_detail">Aguardando o primeiro quadro da Steam</string> + <string name="load_desktop">Área de trabalho</string> + <string name="load_desktop_detail">Preparando a área de trabalho</string> + <string name="load_opening">Abrindo</string> + <string name="load_opening_detail">Aguardando o primeiro quadro</string> + <string name="load_starting_steam">Iniciando o Steam</string> + <string name="load_ended">A sessão terminou</string> + <string name="load_step">Etapa %1$d de %2$d</string> + <string name="load_steam_paused">O Steam está pausado</string> + <string name="deck_tab_grips">Botões traseiros</string> + <string name="deck_tab_left">Lado esquerdo</string> + <string name="deck_tab_right">Lado direito</string> + <string name="deck_tab_both">Ambos</string> + <string name="deck_tab_gamepad">Controle</string> + <string name="deck_surface_stick">Analógico</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Alternar entre analógico e trackpad</string> + <string name="deck_more_controls">Mais controles do Deck</string> + <string name="deck_panels">PAINÉIS</string> + <string name="deck_close">Fechar controles da segunda tela</string> + <string name="deck_open_steam_menu">Abrir o menu Steam</string> + <string name="deck_left_upper">Esquerdo · superior</string> + <string name="deck_left_lower">Esquerdo · inferior</string> + <string name="deck_right_upper">Direito · superior</string> + <string name="deck_right_lower">Direito · inferior</string> + <string name="deck_click">Clique</string> + <string name="deck_right_trackpad">Trackpad direito</string> + <string name="deck_left_trackpad">Trackpad esquerdo</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Mostrar teclado</string> + <string name="second_hide_keyboard">Ocultar teclado</string> + <string name="second_terminal">Terminal Linux</string> + <string name="second_terminal_not_ready">A sessão Linux ainda não está pronta para um terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Jogos</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Loja</string> + <string name="rail_components">Componentes</string> + <string name="rail_apps">Apps</string> + <string name="rail_setup">Configuração</string> + <string name="rail_updates">Atualizações</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Retomar %1$s</string> + <string name="roms_text">Aparece como /root/ROMs em cada sessão. O armazenamento interno fica em /root/Storage.</string> + <string name="roms_none">Nenhuma pasta escolhida</string> + <string name="roms_applies">Vale a partir da próxima sessão. Cartões SD funcionam.</string> + <string name="roms_choose">Escolher pasta</string> + <string name="roms_change">Trocar pasta</string> + <string name="proton_lede">Instale uma versão ARM64 do Proton e escolha-a para cada jogo em Steam → Propriedades → Compatibilidade.</string> + <string name="proton_stop_first">Pare a sessão em execução para instalar ou remover uma ferramenta de compatibilidade.</string> + <string name="proton_available">Versões disponíveis</string> + <string name="proton_installed">Instalado: %1$s</string> + <string name="proton_queued">Pendente de uma solicitação anterior</string> + <string name="proton_not_installed">Não instalado</string> + <string name="proton_update_available">Atualização disponível → %1$s</string> + <string name="proton_remove_older">Remover versões antigas do %1$s</string> + <string name="proton_remove_older_body">Remove %1$s. Jogos configurados com essas versões precisam passar para outro Proton.</string> + <string name="proton_remove_body">Jogos configurados com esta versão precisam passar para outro Proton.</string> + <string name="proton_install_now">Instalar agora</string> + <string name="proton_cancel_queued">Cancelar pendente</string> + <string name="pckb_android">Teclado do Android</string> + <string name="pckb_hide">Ocultar ✕</string> + <string name="main_launch_named">Iniciar %1$s</string> + <string name="main_choose_screen">Escolha uma tela. Secundária: %1$s.</string> + <string name="main_secondary_gone">A tela secundária não está mais disponível.</string> + <string name="main_primary">Tela principal</string> + <string name="main_secondary">Tela secundária</string> + <string name="widgets_prev_tab">Aba anterior</string> + <string name="widgets_next_tab">Próxima aba</string> + <string name="widgets_on">Ativado</string> + <string name="widgets_all_n">Todos (%1$d)</string> + <string name="widgets_none">Nenhum</string> + <string name="widgets_n_of_m">%1$d de %2$d</string> + <string name="widgets_off">Desativado</string> + <string name="screen_bottom">Tela inferior</string> + <string name="game_env_applies">Vale a partir da próxima vez que o jogo for iniciado. O perfil de um jogo tem prioridade sobre o compartilhado.</string> + <string name="game_env_other">Outro jogo pelo ID do app…</string> + <string name="game_env_done">Concluído</string> + <string name="game_env_default">Padrão</string> + <string name="game_env_off">Desativado</string> + <string name="game_env_change">Alterar…</string> + <string name="game_env_change_title">Alterar variável</string> + <string name="game_env_restore_default">Voltar ao padrão</string> + <string name="game_env_eyebrow">Jogos no Proton</string> + <string name="pip_title">Picture-in-picture</string> + <string name="pip_auto">Entrar em PiP automaticamente</string> + <string name="unfolded_controls">Controles com a tela desdobrada</string> + <string name="unfolded_controls_hint">Desdobrado, o jogo fica acima dos trackpads e dos botões traseiros do Steam Deck. Dobrado, o jogo fica em tela cheia.</string> + <string name="pip_suspended">Suspenso</string> + <string name="pip_not_ready">O picture-in-picture fica disponível quando a sessão estiver pronta.</string> + <string name="pip_permission">Permita o picture-in-picture para o DroidDeck nas configurações do Android.</string> + <string name="pip_unavailable">O Android não conseguiu abrir o picture-in-picture.</string> + <string name="game_shortcut">Atalho</string> + <string name="game_shortcut_add">Adicionar à tela inicial</string> + <string name="game_shortcut_choose">Escolher jogo</string> + <string name="game_shortcut_scanning">Verificando os jogos instalados…</string> + <string name="game_link_copy">Copiar link de inicialização</string> + <string name="game_link_copied">Link de inicialização copiado</string> + <string name="game_shortcut_unsupported">Este launcher não pode adicionar atalhos. Use Copiar link de inicialização.</string> + <string name="game_link_invalid">Link de inicialização de jogo inválido.</string> + <string name="game_link_missing">Este jogo não está mais na sua biblioteca do DroidDeck.</string> + <string name="game_link_session_busy">Pare a sessão atual antes de iniciar um jogo do Steam.</string> + <string name="game_link_failed">Não foi possível enviar o jogo ao Steam. Tente iniciá-lo novamente.</string> + <string name="setup_retry_removal">Tentar remover de novo</string> + <string name="runtime_removing">Removendo</string> + <string name="runtime_removal_incomplete">Remoção incompleta</string> + <string name="game_file_export">Exportar arquivo do jogo</string> + <string name="game_file_sync">Sincronizar todos os arquivos de jogo com a pasta</string> + <string name="game_file_stop_sync">Parar de sincronizar arquivos de jogo</string> + <string name="game_file_folder">Escolha uma pasta para os arquivos de jogo do frontend</string> + <string name="game_file_exported">Arquivos de jogo salvos em %1$s</string> + <string name="game_frontend_files">Arquivos do frontend</string> + + <string name="main_wait_runtime">Aguarde a operação do runtime terminar</string> + <string name="main_wait_proton_install">Aguarde a instalação da ferramenta de compatibilidade terminar</string> + <string name="main_wait_desktop_install">Aguarde a instalação do app de área de trabalho terminar</string> + <string name="main_wait_install_game">Aguarde a instalação terminar antes de iniciar um jogo</string> + <string name="main_saves_close_session">Feche a sessão do Steam primeiro, para que o jogo não salve por cima da importação</string> + <string name="main_saves_importing">Importando para %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">%1$d arquivo importado de %2$s para %3$s</item> + <item quantity="many">%1$d arquivos importados de %2$s para %3$s</item> + <item quantity="other">%1$d arquivos importados de %2$s para %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">%1$d arquivo importado de %2$s para %3$s. Backup dos saves antigos em Download/DroidDeck/Saves/backups</item> + <item quantity="many">%1$d arquivos importados de %2$s para %3$s. Backup dos saves antigos em Download/DroidDeck/Saves/backups</item> + <item quantity="other">%1$d arquivos importados de %2$s para %3$s. Backup dos saves antigos em Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Escolha um zip de saves para %1$s</string> + <string name="main_saves_exporting">Exportando %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">%1$d arquivo exportado como %2$s: %3$s</item> + <item quantity="many">%1$d arquivos exportados como %2$s: %3$s</item> + <item quantity="other">%1$d arquivos exportados como %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Escolha onde salvar %1$s (%2$s)</string> + <string name="main_action_failed">Falha (%1$s): %2$s</string> + <string name="main_no_logs_yet">Ainda não há logs de sessão: inicie uma sessão primeiro.</string> + <string name="main_no_logs_to_clear">Não há logs de sessão para limpar.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">%1$d pasta de logs de sessão limpa.</item> + <item quantity="many">%1$d pastas de logs de sessão limpas.</item> + <item quantity="other">%1$d pastas de logs de sessão limpas.</item> + </plurals> + <string name="main_wadb_pair_failed">Falha no pareamento da depuração por Wi-Fi</string> + <string name="main_wadb_command_failed">Falha no comando de depuração por Wi-Fi</string> + <string name="main_wadb_unavailable">A depuração por Wi-Fi não está disponível</string> + <string name="main_adb_copied">Comando ADB copiado</string> + <string name="main_pick_roms">Escolha a pasta de ROMs</string> + <string name="main_non_adreno_title">Não é uma GPU Adreno</string> + <string name="main_non_adreno_text">O Turnip é compatível com GPUs Adreno. Com %1$s, o Steam pode mostrar uma tela preta. Download: %2$.0f MB.</string> + <string name="main_install_anyway">Instalar mesmo assim</string> + <string name="main_remove_runtime_title">Remover runtime Linux</string> + <string name="main_remove_runtime_text">Isso exclui o runtime, o cliente Steam dentro dele e todos os jogos instalados nele.</string> + <string name="main_applied">Aplicado: %1$s</string> + <string name="android_app_open_failed_primary">Não foi possível abrir %1$s na tela principal</string> + <string name="android_app_open_failed_on">Não foi possível abrir %1$s em %2$s</string> + <string name="android_app_open_failed_display">Não foi possível abrir %1$s na tela %2$d</string> + <string name="comp_busy_importing">Importando</string> + <string name="comp_busy_swapping">Trocando</string> + <string name="comp_busy_restoring">Restaurando</string> + <string name="comp_busy_cancelling">Cancelando</string> + <string name="comp_busy_deleting">Excluindo</string> + <string name="comp_cannot_read">não foi possível ler o arquivo</string> + <string name="comp_imported">%1$s importado</string> + <string name="comp_swap_cancelled">A troca pendente foi cancelada.</string> + <string name="comp_pick_wcp">Escolha um pacote de componente (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Não foi possível acessar as Nightlies</string> + <string name="comp_stored">%1$s armazenado</string> + <string name="comp_download_failed">Falha no download: %1$s</string> + <string name="drivers_pick_linux">Escolha um driver do runtime Linux (zip -Linux ou pacote Android + Linux)</string> + <string name="drivers_pick_android">Escolha um driver de vídeo (zip do AdrenoTools ou pacote Android + Linux)</string> + <string name="drivers_pick_any">Escolha um zip de driver ou um pacote Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Removendo %1$s…</string> + <string name="main_forgetting_named">Esquecendo %1$s…</string> + <string name="main_pick_game_storage">Escolha a pasta de armazenamento dos jogos</string> + <string name="main_pick_decky_zip">Escolha um ZIP de plugin do Decky</string> + <string name="main_storage_not_usable">Não utilizável: %1$s</string> + <string name="main_running_program">Programa</string> + <string name="main_removing_runtime">Removendo o runtime Linux</string> + <string name="main_settings_main_screen">Não foi possível abrir as Configurações na tela inferior; elas foram abertas na tela principal.</string> + <string name="main_open_dev_options">Abra as Opções do desenvolvedor nas Configurações</string> + + <string name="upd_unknown_apps_failed">Não foi possível abrir a configuração “Instalar apps desconhecidos” do Android</string> + <string name="upd_couldnt_check">Não foi possível verificar: %1$s</string> + <string name="upd_no_download">Esta versão não tem download para esta cópia do DroidDeck</string> + <string name="upd_stop_first">Pare a sessão em execução primeiro e depois atualize</string> + <string name="upd_stage_downloading">Baixando</string> + <string name="upd_stage_installing">Instalando</string> + <string name="upd_stage_confirm">Aguardando sua confirmação</string> + <string name="upd_failed">A atualização falhou</string> + <string name="upd_not_offered">O Android não ofereceu a instalação da atualização</string> + + <string name="decky_install_failed">Falha ao instalar o Decky: %1$s</string> + <string name="decky_plugin_starting">Iniciando a importação do plugin…</string> + <string name="decky_plugin_failed">Falha ao importar o plugin: %1$s</string> + <string name="decky_plugin_installed">Plugin instalado. Reinicie o Steam para carregá-lo.</string> + + <string name="drivers_not_checked">Ainda não verificado - toque em atualizar para procurar novos drivers</string> + <string name="drivers_bundle_sets_display">Android + Linux: define também o driver de vídeo</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: define também o driver do runtime</string> + <string name="drivers_runtime_builtin">o Turnip integrado ao runtime</string> + <string name="drivers_system_vulkan">Vulkan do sistema: não há versão incluída para esta GPU</string> + <string name="drivers_bundled">%1$s (incluído)</string> + <string name="drivers_manual">Manual</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">No momento, só uma das metades está publicada</string> + <string name="drivers_pair_size">%1$.0f MB para os dois</string> + <string name="drivers_none_to_set">Nenhum driver para definir: %1$s</string> + <string name="drivers_checking_latest">Verificando os drivers mais recentes…</string> + <string name="drivers_up_to_date_check_failed">Atualizado (não foi possível verificar: %1$s)</string> + <string name="drivers_recommended_unpublished">Os drivers recomendados não estão publicados no momento</string> + <string name="drivers_downloading_pair">Baixando %1$s %2$s…</string> + <string name="drivers_updated_to">Atualizado para %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Atualizado para %1$s %2$s. O driver de vídeo é aplicado depois que o DroidDeck reiniciar.</string> + <string name="drivers_auto_waits_for_session">As atualizações de driver esperam a sessão terminar.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s será baixado quando você sair dos dados móveis e da economia de bateria.</string> + <string name="drivers_skipping_bad">%1$s %2$s não iniciou uma sessão aqui, então o Automático continua nos drivers que funcionaram.</string> + <string name="drivers_rolled_back">%1$s não iniciou uma sessão duas vezes, então o Automático voltou aos drivers que funcionavam.</string> + <string name="drivers_switched_to">Alterado para %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Alterado para %1$s %2$s. O driver de vídeo é aplicado depois que o DroidDeck reiniciar.</string> + <string name="drivers_using">Usando %1$s %2$s.</string> + <string name="drivers_using_restart">Usando %1$s %2$s. O driver de vídeo é aplicado depois que o DroidDeck reiniciar.</string> + <string name="drivers_using_quest">Usando o driver de vídeo Quest incluído e o padrão do runtime.</string> + <string name="drivers_using_quest_restart">Usando o driver de vídeo Quest incluído e o padrão do runtime. O driver de vídeo vale depois que o DroidDeck reiniciar.</string> + <string name="drivers_not_a_driver">Não é um zip de driver: não é um driver AdrenoTools, um Turnip -Linux nem um pacote Android + Linux</string> + <string name="drivers_import_failed">Falha na importação: %1$s</string> + <string name="drivers_imported_unnamed">Driver importado</string> + <string name="drivers_using_bundle">Usando %1$s como driver do runtime e de vídeo.</string> + <string name="drivers_using_bundle_restart">Usando %1$s como driver do runtime e de vídeo. O driver de vídeo é aplicado depois que o DroidDeck reiniciar.</string> + <string name="drivers_deleted_bundle">%1$s excluído (os dois drivers)</string> + <string name="drivers_deleted">%1$s excluído</string> + <string name="drivers_release_status">Mais recente: %1$s · verificado %2$s</string> + <string name="drivers_release_status_failed">Mais recente: %1$s · %2$s inacessível · verificado %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">há %1$d min</item> + <item quantity="many">há %1$d min</item> + <item quantity="other">há %1$d min</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">há %1$d h</item> + <item quantity="many">há %1$d h</item> + <item quantity="other">há %1$d h</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">há %1$d dia</item> + <item quantity="many">há %1$d dias</item> + <item quantity="other">há %1$d dias</item> + </plurals> + <string name="drivers_checking_sources">Verificando Banners-Turnip, WinNative e DroidDeck…</string> + <string name="drivers_check_failed">falha na verificação</string> + <string name="drivers_installed_pick_either">%1$s instalado - escolha-o em qualquer uma das listas para definir os dois drivers</string> + <string name="drivers_installed_pick">%1$s instalado - escolha-o no menu</string> + + <string name="session_wait_removal">Aguarde a remoção do runtime terminar</string> + <string name="session_title_game">Jogo</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">direto</string> + <string name="session_swap_failed">Falha na troca: %1$s</string> + <string name="session_profile_save_failed">Falha ao salvar o perfil: %1$s</string> + <string name="session_desktop_paused">A área de trabalho está pausada</string> + <string name="session_named_paused">%1$s está pausado</string> + <string name="session_program_paused">O programa está pausado</string> + <string name="session_starting_desktop">Iniciando a área de trabalho</string> + <string name="session_starting_named">Iniciando %1$s</string> + <string name="session_starting_program">Iniciando o programa</string> + <string name="session_no_logs">Não há logs desta sessão.</string> + <string name="session_logs_archive_failed">Não foi possível criar o arquivo compactado dos logs da sessão.</string> + <string name="session_logs_share_failed">Não foi possível compartilhar os logs da sessão.</string> + <string name="session_starting_session">Iniciando a sessão…</string> + <string name="session_runtime_downloading">baixando o runtime Linux</string> + <string name="session_runtime_downloading_mb">baixando o runtime Linux · %1$d de %2$d MB</string> + <string name="session_runtime_checking">verificando o runtime Linux</string> + <string name="session_runtime_unpacking">descompactando o runtime Linux</string> + <string name="session_desktop_downloading">baixando a área de trabalho</string> + <string name="session_desktop_downloading_mb">baixando a área de trabalho · %1$d de %2$d MB</string> + <string name="session_desktop_checking">verificando a área de trabalho</string> + <string name="session_desktop_unpacking">descompactando a área de trabalho</string> + <string name="session_proton_downloading">baixando o Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">baixando o Proton Experimental (ARM64) · %1$d de %2$d MB</string> + <string name="session_proton_checking">verificando o Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">descompactando o Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Não foi possível acessar o catálogo de runtimes. Verifique a conexão e toque em Jogar novamente.</string> + <string name="session_runtime_install_failed">O runtime Linux não foi instalado. Verifique o runtime em Configuração e toque em Jogar novamente.</string> + <string name="session_desktop_install_failed">A área de trabalho não foi instalada (%1$s). Verifique a conexão e toque em Área de trabalho novamente.</string> + <string name="session_ended_named">%1$s parou inesperadamente. Compartilhe os logs em um relatório de bug ou tente de novo.</string> + <string name="session_ended_program">O programa parou inesperadamente. Compartilhe os logs em um relatório de bug ou tente de novo.</string> + <string name="session_ended_desktop">A área de trabalho parou inesperadamente. Compartilhe os logs em um relatório de bug ou tente de novo.</string> + <string name="session_ended_detail">Código de saída %1$d · %2$s</string> + <string name="session_ended_no_log">sem log</string> + <plurals name="session_hint_enosys"> + <item quantity="one">O log mostra %1$d erro “Function not implemented”: a aceleração seccomp do proot está falhando em um auxiliar neste dispositivo. Tente %2$s → “%3$s” (ou “%4$s”) e inicie de novo.</item> + <item quantity="many">O log mostra %1$d erros “Function not implemented”: a aceleração seccomp do proot está falhando em um auxiliar neste dispositivo. Tente %2$s → “%3$s” (ou “%4$s”) e inicie de novo.</item> + <item quantity="other">O log mostra %1$d erros “Function not implemented”: a aceleração seccomp do proot está falhando em um auxiliar neste dispositivo. Tente %2$s → “%3$s” (ou “%4$s”) e inicie de novo.</item> + </plurals> + + <string name="mode_decky_plugins">Plugins</string> + <string name="mode_decky_plugins_hint">Instale um ZIP de plugin para a próxima sessão do Steam.</string> + <string name="mode_decky_plugin_downloading">Baixando…</string> + <string name="mode_decky_plugin_install_zip">Instalar de um ZIP</string> + <string name="store_cat_games">Jogos</string> + <string name="store_cat_audio_video">Áudio e vídeo</string> + <string name="store_cat_graphics">Gráficos</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Escritório</string> + <string name="store_cat_developer">Desenvolvimento</string> + <string name="store_cat_education">Educação</string> + <string name="store_cat_science">Ciência</string> + <string name="store_cat_system">Sistema</string> + <string name="store_cat_utilities">Utilitários</string> + <string name="store_section_popular">Populares</string> + <string name="store_section_trending">Em alta</string> + <string name="store_section_new">Novidades</string> + <string name="store_section_updated">Atualizados</string> + <string name="store_section_loading">carregando…</string> + <string name="store_flatpak_setup">Configuração do Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Não foi possível verificar atualizações no Flathub</string> + <string name="content_rom_installed">instalado</string> + <string name="content_rom_folder">pasta</string> + <string name="theme_graphite">Grafite</string> + <string name="theme_graphite_detail">Superfícies grafite, com o azul do orbe do logo em tudo que estiver selecionado, em foco ou pressionado.</string> + <string name="theme_paper">Papel sobre preto</string> + <string name="theme_paper_detail">O branco é a cor principal; o azul do ícone sinaliza linhas, anéis e pontos.</string> + <string name="theme_icon_blue">Azul do ícone</string> + <string name="theme_icon_blue_detail">Fundo preto, texto branco e o azul em tudo que estiver selecionado, em foco ou pressionado.</string> + <string name="theme_electric">Marinho elétrico</string> + <string name="theme_electric_detail">O azul mais vivo, sobre superfícies puxadas para o marinho em vez do cinza.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Espaço</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Instale o runtime primeiro</string> + <string name="game_sync_err_steam_library">A biblioteca do Steam não está disponível</string> + <string name="game_sync_err_previous_sd">A biblioteca anterior no cartão SD não está disponível</string> + <string name="game_sync_err_game_storage">O armazenamento de jogos não está disponível</string> + <string name="game_sync_err_added_games">A pasta de jogos adicionados não está disponível</string> + <string name="game_sync_err_manifests">Os manifestos do Steam não estão disponíveis</string> + <string name="content_system_many">Vários sistemas</string> + <string name="fm_drive_internal">Interno</string> + <string name="fm_drive_linux">Sistema Linux</string> + <string name="fm_drive_sd">Cartão SD</string> + <string name="fm_drive_storage">Armazenamento</string> + <string name="fm_select">Selecionar</string> + <string name="fm_properties">Propriedades</string> + <string name="fm_favorite_add">Adicionar aos favoritos</string> + <string name="fm_favorite_remove">Remover dos favoritos</string> + <string name="fm_rename">Renomear</string> + <string name="fm_copy">Copiar</string> + <string name="fm_cut">Recortar</string> + <string name="fm_actions">Ações</string> + <string name="fm_favorites">Favoritos</string> + <string name="fm_pin_current">Fixar pasta atual</string> + <string name="fm_no_favorites">Nenhum favorito ainda - fixe uma pasta pelo menu ⋮ dela para voltar aqui rapidamente.</string> + <string name="fm_unpin_favorite">Remover dos favoritos</string> + <string name="fm_size_zero">0 bytes</string> + <string name="fm_unit_bytes">bytes</string> + <string name="fm_prop_location">Local</string> + <string name="fm_prop_type">Tipo</string> + <string name="fm_prop_size">Tamanho</string> + <string name="fm_prop_modified">Modificado em</string> + <string name="fm_type_folder">Pasta</string> + <string name="fm_type_file">Arquivo</string> + <string name="fm_type_ext_file">Arquivo %1$s</string> + <string name="fm_read_only">Somente leitura</string> + <string name="fm_read_only_hint">Impede que jogos (e o Wine) substituam ou excluam este arquivo.</string> + <string name="fm_read_only_failed">Não foi possível alterar Somente leitura</string> + <string name="fm_hidden">Oculto</string> + <string name="fm_hidden_unsupported">Este armazenamento não consegue guardar o atributo de oculto.</string> + <string name="fm_hidden_hint">Marca o arquivo como oculto no Windows (atributo de oculto do Wine).</string> + <string name="fm_hidden_failed">Não foi possível alterar Oculto neste armazenamento</string> + <string name="fm_done">Concluído</string> + <string name="fm_op_deleting">Excluindo...</string> + <string name="fm_delete_failed">Falha ao excluir</string> + <string name="fm_op_moving">Movendo...</string> + <string name="fm_op_copying">Copiando...</string> + <string name="fm_op_moving_item">Movendo - %1$s</string> + <string name="fm_op_copying_item">Copiando - %1$s</string> + <string name="fm_op_moving_batch">Movendo %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Copiando %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d concluídos, %2$d com falha</string> + <string name="fm_paste_skipped">%1$d concluídos, %2$d ignorados</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d item movido</item> + <item quantity="many">%1$d itens movidos</item> + <item quantity="other">%1$d itens movidos</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d item copiado</item> + <item quantity="many">%1$d itens copiados</item> + <item quantity="other">%1$d itens copiados</item> + </plurals> + <string name="fm_already_exists">“%1$s” já existe</string> + <string name="fm_op_renaming">Renomeando...</string> + <string name="fm_rename_failed">Falha ao renomear</string> + <string name="fm_op_creating_folder">Criando pasta...</string> + <string name="fm_create_folder_failed">Não foi possível criar a pasta</string> + <string name="fm_new_folder">Nova pasta</string> + <string name="fm_folder_name">Nome da pasta</string> + <string name="fm_create">Criar</string> + <string name="fm_new_name">Novo nome</string> + <string name="fm_delete_title">Excluir?</string> + <string name="fm_delete_text">Excluir “%1$s” permanentemente?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Excluir %1$d item?</item> + <item quantity="many">Excluir %1$d itens?</item> + <item quantity="other">Excluir %1$d itens?</item> + </plurals> + <string name="fm_cannot_undo">Não é possível desfazer essa ação.</string> + <plurals name="fm_and_more"> + <item quantity="one">…e mais %1$d</item> + <item quantity="many">…e mais %1$d</item> + <item quantity="other">…e mais %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">Excluindo %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d não pôde ser excluído</item> + <item quantity="many">%1$d não puderam ser excluídos</item> + <item quantity="other">%1$d não puderam ser excluídos</item> + </plurals> + <string name="fm_conflict_merge_hint">Mesclar adiciona e substitui arquivos dentro da pasta existente.</string> + <string name="fm_conflict_overwrite_hint">Substituir troca o arquivo existente.</string> + <string name="fm_conflict_apply_all">Aplicar a todos os conflitos</string> + <string name="fm_conflict_merge">Mesclar</string> + <string name="fm_conflict_overwrite">Substituir</string> + <string name="fm_conflict_keep_both">Manter ambos</string> + <string name="fm_conflict_skip">Pular</string> + <string name="fm_select_this_folder">Selecionar esta pasta</string> + <string name="fm_back">Voltar</string> + <string name="fm_drive_not_readable">%1$s está montado, mas não pode ser lido agora</string> + <string name="fm_list_view">Visualização em lista</string> + <string name="fm_grid_view">Visualização em grade</string> + <string name="fm_search">Pesquisar</string> + <string name="fm_sort">Ordenar</string> + <string name="fm_sort_name">Nome</string> + <string name="fm_sort_date">Data de modificação</string> + <string name="fm_rows_comfortable">Linhas confortáveis</string> + <string name="fm_rows_compact">Linhas compactas</string> + <string name="fm_hide_hidden">Ocultar arquivos ocultos</string> + <string name="fm_show_hidden">Mostrar arquivos ocultos</string> + <string name="fm_hide_favorites">Ocultar favoritos</string> + <string name="fm_show_favorites">Mostrar favoritos</string> + <string name="fm_filter_folder">Filtrar esta pasta</string> + <string name="fm_free_space">%1$s livres</string> + <string name="fm_selected_count">Selecionados: %1$d</string> + <string name="fm_select_none">Nenhum</string> + <string name="fm_select_all">Todos</string> + <string name="fm_paste">Colar</string> + <plurals name="fm_items"> + <item quantity="one">%1$d item</item> + <item quantity="many">%1$d itens</item> + <item quantity="other">%1$d itens</item> + </plurals> + <string name="fm_paste_here">Colar %1$s aqui</string> + <string name="fm_paste_move_here">Colar %1$s aqui (mover)</string> + <string name="fm_rail_title">Arquivos</string> + <string name="fm_rail_storage">ARMAZENAMENTO</string> + <string name="fm_rail_quick">ACESSO RÁPIDO</string> + <string name="fm_rail_favorites">FAVORITOS</string> + <string name="fm_rail_downloads">Downloads</string> + <string name="fm_rail_downloads_short">Downl.</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Logs de sessão</string> + <string name="fm_rail_pictures">Imagens</string> + <string name="fm_favorite_added">“%1$s” adicionado aos favoritos</string> + <string name="fm_favorite_removed">“%1$s” removido dos favoritos</string> + <string name="fm_empty_directory">Pasta vazia</string> + <string name="fm_up_one_level">Subir um nível</string> + <string name="fm_choose_folder">Escolha uma pasta</string> + <string name="fm_choose_file">Escolha um arquivo</string> + <string name="ctrl_tint_steam_blue">Azul Steam</string> + <string name="ctrl_tint_sky">Céu</string> + <string name="ctrl_tint_white">Branco</string> + <string name="ctrl_tint_violet">Violeta</string> + <string name="ctrl_tint_green">Verde</string> + <string name="ctrl_tint_amber">Âmbar</string> + <string name="ctrl_tint_red">Vermelho</string> + <string name="ctrl_tint_pink">Rosa</string> + <string name="ctrl_button_a">Botão A</string> + <string name="ctrl_button_b">Botão B</string> + <string name="ctrl_button_x">Botão X</string> + <string name="ctrl_button_y">Botão Y</string> + <string name="ctrl_button_lb">Botão de ombro esquerdo</string> + <string name="ctrl_button_rb">Botão de ombro direito</string> + <string name="ctrl_button_lt">Gatilho esquerdo</string> + <string name="ctrl_button_rt">Gatilho direito</string> + <string name="ctrl_button_view">Botão Exibir</string> + <string name="ctrl_button_menu">Botão Menu</string> + <string name="ctrl_target_view">Exibir</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">Direcional para cima</string> + <string name="ctrl_target_down">Direcional para baixo</string> + <string name="ctrl_target_left">Direcional para a esquerda</string> + <string name="ctrl_target_right">Direcional para a direita</string> + <string name="ctrl_target_hidden">Oculto</string> + <string name="ctrl_editor_drag">Arraste para mover</string> + <string name="ctrl_editor_snap">Encaixar</string> + <string name="ctrl_editor_save">Salvar</string> + <string name="second_mode_none">Nenhum</string> + <string name="second_mode_keyboard_trackpad">Teclado + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Botões traseiros + trackpads do Deck</string> + + <string name="rtinst_removing">Removendo o runtime Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Removendo o runtime Linux · %1$d entrada</item> + <item quantity="many">Removendo o runtime Linux · %1$d entradas</item> + <item quantity="other">Removendo o runtime Linux · %1$d entradas</item> + </plurals> + <string name="rtinst_removed">Runtime Linux removido</string> + <string name="rtinst_removal_failed">Não foi possível concluir a remoção do runtime Linux. Tente remover de novo em Configuração.</string> + <string name="rtinst_removing_leftovers">Removendo restos do runtime</string> + <string name="rtinst_downloading">Baixando</string> + <string name="rtinst_verifying">Verificando</string> + <string name="rtinst_extracting">Extraindo</string> + <string name="rtinst_channel_description">Aparece enquanto o runtime Linux é instalado ou removido</string> + <string name="rtinst_title_installing">Instalando o runtime Linux</string> + <string name="rtinst_title_removing">Removendo o runtime Linux</string> + + <string name="deskpkg_runtime_missing">O runtime Linux não está instalado</string> + <string name="deskpkg_no_checksum">O catálogo não tem soma de verificação para %1$s</string> + <string name="deskpkg_checksum_mismatch">A soma de verificação não confere - nada foi alterado</string> + <string name="deskpkg_installing">Instalando %1$s</string> + <string name="deskpkg_place_failed">Não foi possível colocar o AppImage no lugar</string> + <string name="deskpkg_extract_failed">Falha na extração</string> + <string name="deskpkg_install_failed">Falha na instalação</string> + + <string name="flatpakmgr_setup_failed">Falha na configuração do Flatpak (código de saída %1$d)</string> + <string name="flatpakmgr_setup_unfinished">A configuração do Flatpak não terminou</string> + <string name="flatpakmgr_busy">Outra tarefa da loja está em andamento</string> + <string name="flatpakmgr_not_ready">Configure o Flatpak primeiro</string> + <string name="flatpakmgr_starting">Iniciando</string> + <string name="flatpakmgr_exit_status">O Flatpak terminou com o código %1$d</string> + <string name="flatpakmgr_installing">Instalando %1$s</string> + <string name="flatpakmgr_updating">Atualizando %1$s</string> + <string name="flatpakmgr_removing">Removendo %1$s</string> + <string name="flatpakmgr_installing_step">Instalando %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Atualizando %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Removendo %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">traduções</string> + <string name="flatpakmgr_ref_graphics_drivers">drivers gráficos</string> + <string name="flatpakmgr_ref_media_codecs">codecs de mídia</string> + <string name="flatpakmgr_ref_runtime">runtime %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">runtime %1$s %2$s</string> + + <string name="appimg_too_small">O arquivo é pequeno demais para ser um AppImage</string> + <string name="appimg_unreadable">Não é possível ler o arquivo: %1$s</string> + <string name="appimg_not_linux">Isto não é um AppImage (não é um programa Linux)</string> + <string name="appimg_wrong_arch">Este AppImage não foi feito para ARM64 (aarch64) nem para PCs x86</string> + <string name="appimg_not_appimage">Isto é um programa Linux, mas não um AppImage</string> + <string name="appimg_wrong_type">Só AppImages do tipo 2 podem ser importados (este é do tipo %1$d)</string> + <string name="appimg_no_space_import">Espaço livre insuficiente: a importação precisa de cerca de %1$s</string> + <string name="appimg_no_space_update">Espaço livre insuficiente: a atualização precisa de cerca de %1$s</string> + <string name="appimg_import_failed">Falha na importação</string> + <string name="appimg_gone">Esse AppImage não existe mais</string> + <string name="appimg_update_failed">Falha na atualização</string> + <string name="appimg_extracting">Extraindo %1$s</string> + <string name="appimg_extract_failed">Não foi possível extrair o AppImage</string> + <string name="appimg_extract_failed_detail">Não foi possível extrair o AppImage: %1$s</string> + + <string name="deckymgr_stop_session_loader">Pare a sessão ativa antes de instalar o Decky Loader</string> + <string name="deckymgr_download_failed">Falha no download do Decky Loader</string> + <string name="deckymgr_size_mismatch">O tamanho do Decky Loader não corresponde aos metadados da versão</string> + <string name="deckymgr_checksum_download_failed">Não foi possível baixar a soma de verificação da versão</string> + <string name="deckymgr_checksum_missing">A soma de verificação da versão está ausente</string> + <string name="deckymgr_checksum_invalid">A soma de verificação da versão é inválida</string> + <string name="deckymgr_checksum_mismatch">A soma de verificação do Decky Loader não confere</string> + <string name="deckymgr_not_elf">O arquivo da versão não é um executável Linux de 64 bits compatível</string> + <string name="deckymgr_session_started_loader">Uma sessão foi iniciada durante o download; pare-a antes de instalar o Decky Loader</string> + <string name="deckymgr_loader_not_executable">Não foi possível tornar o PluginLoader executável</string> + <string name="deckymgr_cef_failed">Não foi possível ativar a depuração remota do CEF do Steam</string> + <string name="deckymgr_stage_failed">Não foi possível preparar o PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Não foi possível preservar o PluginLoader existente</string> + <string name="deckymgr_loader_activate_failed">Não foi possível ativar o novo PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Pare a sessão ativa antes de instalar um plugin</string> + <string name="deckymgr_loader_required">Instale o Decky Loader antes de importar um plugin</string> + <string name="deckymgr_zip_unreadable">Não foi possível ler o arquivo ZIP selecionado</string> + <string name="deckymgr_plugins_dir_failed">Não foi possível criar a pasta de plugins do Decky</string> + <string name="deckymgr_extracting_zip">Extraindo o ZIP do plugin</string> + <string name="deckymgr_zip_one_folder">O ZIP do plugin deve conter uma única pasta de plugin no nível superior</string> + <string name="deckymgr_zip_missing_files">Faltam plugin.json, package.json ou dist/index.js no ZIP do plugin</string> + <string name="deckymgr_plugin_name_missing">O nome do plugin está ausente</string> + <string name="deckymgr_session_started_plugin">Uma sessão foi iniciada durante a instalação; pare-a antes de instalar um plugin</string> + <string name="deckymgr_plugin_installed">Plugin instalado · reinicie o Steam para carregá-lo</string> + <string name="deckymgr_plugin_install_failed">Falha na instalação do ZIP do plugin</string> + <string name="deckymgr_zip_too_many">O ZIP do plugin contém entradas demais</string> + <string name="deckymgr_zip_invalid_path">O ZIP do plugin contém um caminho inválido</string> + <string name="deckymgr_zip_duplicate_paths">O ZIP do plugin contém caminhos duplicados</string> + <string name="deckymgr_zip_unsafe_path">O ZIP do plugin contém um caminho inseguro</string> + <string name="deckymgr_folder_failed">Não foi possível criar a pasta do plugin</string> + <string name="deckymgr_zip_too_large">O ZIP do plugin ultrapassa o limite de 1 GiB quando extraído</string> + <string name="deckymgr_bundled_not_executable">Não foi possível tornar executável o binário incluído no plugin</string> + <string name="deckymgr_remote_entry_invalid">Entrada remote_binary inválida</string> + <string name="deckymgr_remote_name_invalid">Nome de binário remoto inválido</string> + <string name="deckymgr_remote_url_https">A URL do binário remoto precisa usar HTTPS</string> + <string name="deckymgr_remote_hash_invalid">O binário remoto %1$s tem um hash SHA-256 inválido</string> + <string name="deckymgr_bin_dir_failed">Não foi possível criar a pasta bin do plugin</string> + <string name="deckymgr_downloading_binary">Baixando binário do plugin · %1$s</string> + <string name="deckymgr_binary_download_failed">Não foi possível baixar o binário do plugin %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">A soma de verificação do binário do plugin não confere · %1$s</string> + <string name="deckymgr_binary_not_executable">Não foi possível tornar executável o binário do plugin · %1$s</string> + <string name="deckymgr_binary_replace_failed">Não foi possível substituir o binário do plugin · %1$s</string> + <string name="deckymgr_binary_install_failed">Não foi possível instalar o binário do plugin · %1$s</string> + <string name="deckymgr_folder_taken">A pasta do plugin pertence a outro plugin</string> + <string name="deckymgr_preserve_failed">Não foi possível preservar o plugin existente</string> + <string name="deckymgr_activate_failed">Não foi possível ativar o plugin importado</string> + <string name="deckymgr_settings_failed">Não foi possível atualizar as configurações de plugins do Decky</string> + <string name="deckymgr_restore_failed">Não foi possível restaurar o plugin existente</string> + + <string name="adbfix_save_failed">Não foi possível salvar a identidade da depuração por Wi-Fi</string> + <string name="adbfix_command_failed">Falha no comando ADB (%1$d)</string> + <string name="adbfix_not_confirmed">O Android não confirmou a alteração do limite de processos filhos: %1$s</string> + <string name="adbfix_no_pairing">Nenhum pareamento de depuração por Wi-Fi salvo</string> + <string name="adbfix_enter_address">Digite o endereço IP e a porta atuais da depuração por Wi-Fi</string> + + <string name="adbpair_timed_out">Tempo esgotado esperando o pop-up de pareamento. Tente novamente pelo DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Não foi possível procurar o pop-up de pareamento (%1$d). Verifique se o Wi-Fi está ativado.</string> + <string name="adbpair_discovery_failed">Não foi possível procurar o pop-up de pareamento: %1$s</string> + <string name="adbpair_six_digits">Digite os 6 dígitos do código</string> + <string name="adbpair_pairing">Pareando…</string> + <string name="adbpair_code_rejected">Esse código não funcionou. Abra o pop-up de pareamento de novo e digite o novo código.</string> + <string name="adbpair_connecting">Pareado. Conectando…</string> + <string name="adbpair_port_not_found">Pareado, mas a porta da depuração por Wi-Fi não foi encontrada. Mantenha a depuração por Wi-Fi ativada e tente de novo.</string> + <string name="adbpair_applying">Aplicando a configuração…</string> + <string name="adbpair_command_failed">Falha no comando de depuração por Wi-Fi</string> + <string name="adbpair_channel_name">Configuração da depuração por Wi-Fi</string> + <string name="adbpair_channel_description">Pede o código de pareamento da depuração por Wi-Fi enquanto as Configurações estão abertas</string> + <string name="adbpair_title_pair">Parear depuração por Wi-Fi</string> + <string name="adbpair_waiting_text">Ative a depuração por Wi-Fi e toque em “Parear o dispositivo com um código de pareamento”.</string> + <string name="adbpair_waiting_long">Ative a depuração por Wi-Fi e toque em “Parear o dispositivo com um código de pareamento”. Fique nas Configurações: o código é digitado nesta notificação.</string> + <string name="adbpair_code_label">Código de pareamento de 6 dígitos</string> + <string name="adbpair_code_hint">Toque em Digitar código e insira os 6 dígitos mostrados nas Configurações.</string> + <string name="adbpair_title_code">Digite o código de pareamento por Wi-Fi</string> + <string name="adbpair_title_retry">Tente o código de novo</string> + <string name="adbpair_enter_code">Digitar código</string> + <string name="adbpair_title_working">Configurando o Steam</string> + <string name="adbpair_title_done">O Steam está pronto</string> + <string name="adbpair_done_text">Toque para voltar ao DroidDeck. Você já pode desativar a depuração por Wi-Fi.</string> + <string name="adbpair_title_failed">A configuração da depuração por Wi-Fi parou</string> + + <string name="selfinst_download_failed">Falha no download</string> + <string name="selfinst_size_mismatch">O tamanho do download não corresponde ao APK publicado, e ele foi descartado - tente de novo</string> + <string name="selfinst_checksum_mismatch">O download não corresponde à soma de verificação e foi descartado - tente de novo</string> + <string name="selfinst_wrong_package">A atualização é para o pacote Android %1$s, não %2$s</string> + <string name="selfinst_metadata_signer">Os metadados da atualização não indicam a chave de assinatura de versões do DroidDeck</string> + <string name="selfinst_unreadable">O Android não conseguiu ler o APK baixado</string> + <string name="selfinst_apk_wrong_package">O APK baixado é para %1$s, não %2$s</string> + <string name="selfinst_version_mismatch">O APK baixado informa versionCode %1$d, não o %2$d publicado</string> + <string name="selfinst_downgrade">O Android não instala o versionCode %1$d por cima do %2$d instalado</string> + <string name="selfinst_no_signing">O APK baixado não tem informações de assinatura</string> + <string name="selfinst_wrong_signer">O APK baixado não está assinado com a chave de versões do DroidDeck</string> + <string name="appupd_http">O catálogo de atualizações respondeu HTTP %1$d</string> + + <string name="loadstate_starting">Iniciando a sessão…</string> + <string name="loadstate_elapsed">%1$d:%2$02d decorridos · ainda em andamento</string> + <string name="loadstate_steam_update">Baixando a atualização do cliente Steam · %1$d%%</string> + <string name="loadstate_steam_client">Baixando o cliente Steam · %1$s</string> + + <string name="pextra_busy">Já há uma instalação de ferramenta de compatibilidade em andamento</string> + <string name="pextra_stop_session">Pare a sessão ativa antes de instalar ferramentas de compatibilidade</string> + <string name="pextra_no_release">Não foi possível encontrar uma versão ARM64 de %1$s</string> + <string name="pextra_no_space">É preciso ter pelo menos 4 GB livres, além do tamanho do download, para instalar %1$s</string> + <string name="pextra_downloading">Baixando %1$s %2$s</string> + <string name="pextra_retrying">Tentando baixar de novo · tentativa %1$d de %2$d</string> + <string name="pextra_interrupted">Download interrompido</string> + <string name="pextra_download_failed">Falha no download; o arquivo parcial foi mantido para que uma nova tentativa possa continuar</string> + <string name="pextra_too_big">O download ultrapassou o tamanho da versão e foi excluído</string> + <string name="pextra_incomplete">O download ficou incompleto; o arquivo parcial foi mantido para continuar em uma nova tentativa</string> + <string name="pextra_verifying">Verificando o download</string> + <string name="pextra_checksum_unreadable">Não foi possível ler a soma de verificação da versão; tente de novo</string> + <string name="pextra_no_checksum">%1$s %2$s não publica soma de verificação; nada foi instalado</string> + <string name="pextra_checksum_mismatch">A soma de verificação não confere; o download foi excluído</string> + <string name="pextra_session_started">Uma sessão foi iniciada durante o download; pare-a antes de instalar ferramentas de compatibilidade</string> + <string name="pextra_installing">Instalando %1$s</string> + <string name="pextra_install_failed">Falha na instalação do %1$s (código de saída %2$d)</string> + <string name="pextra_could_not_install">Não foi possível instalar o %1$s</string> + <string name="esync_fetching">Buscando o pacote droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">com auxiliares Linux</string> + <string name="cmgr_fex_dlls_only">só DLLs</string> + <string name="cmgr_original_proton_updated">Original (Proton atualizado desde a última troca)</string> + <string name="cmgr_changed_outside">Alterado fora de Componentes</string> + <string name="cmgr_not_present">ausente</string> + <string name="cmgr_original_version">Original (%1$s)</string> + <string name="cmgr_original_from">Original de %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s entra no %3$s quando o jogo que está rodando nele for fechado.</string> + <string name="cmgr_swap_done">%1$s %2$s agora está no %3$s. Vale a partir do próximo jogo iniciado.</string> + <string name="cmgr_original_missing">Esse pacote original não está armazenado</string> + <string name="cmgr_restore_queued">%1$s do %2$s volta ao original quando o jogo que está rodando nele for fechado.</string> + <string name="cmgr_restore_done">%1$s do %2$s restaurado a partir do original do %3$s.</string> + <string name="cmgr_package_in_use">%1$s está em uso no %2$s. Primeiro, troque esse Proton para outra versão.</string> + <string name="cmgr_package_not_stored">%1$s não está armazenado</string> + <string name="cmgr_deleted">%1$s excluído.</string> + <string name="cmgr_original_kept">O original da versão instalada é mantido: é o caminho de volta.</string> + <string name="cmgr_not_stored">Não armazenado</string> + <string name="cmgr_deleted_original">Original do %1$s de %2$s excluído.</string> + <string name="cmgr_nightlies_only">Os downloads vêm só das versões Nightlies</string> + <string name="cmgr_list_predates_checksums">Esta lista de pacotes é anterior às somas de verificação - atualize-a e tente de novo</string> + <string name="cmgr_checksum_mismatch">A soma de verificação não confere</string> + + <string name="sprefs_upscaler_linear">Linear</string> + <string name="sprefs_upscaler_nearest">Vizinho mais próximo</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (qualidade)</string> + <string name="sprefs_upscaler_sharpen">Só nitidez</string> + <string name="sprefs_lod_bias_auto">Automático (acompanha a escala)</string> + + <string name="look_off_desc">Nada aplicado.</string> + <string name="look_game_clarity">Clareza</string> + <string name="look_game_clarity_desc">Nitidez com um toque de contraste - o do dia a dia.</string> + <string name="look_vivid">Vívido</string> + <string name="look_vivid_desc">Cores bem fortes. Debanding ativado para o céu não ficar em faixas.</string> + <string name="look_cinematic">Cinematográfico</string> + <string name="look_cinematic_desc">Contraste mais profundo, cores mais frias, bordas suavizadas.</string> + <string name="look_competitive">Competitivo</string> + <string name="look_competitive_desc">Sombras clareadas e nitidez forte - aviste os outros primeiro.</string> + <string name="look_adaptive_sharpen">Nitidez adaptativa</string> + <string name="look_adaptive_sharpen_desc">Só nitidez, cores intactas.</string> + <string name="look_filmic">Fílmico</string> + <string name="look_filmic_desc">Curva de filme, cores levemente apagadas.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Intenso e vibrante.</string> + <string name="look_retro_crt">CRT retrô</string> + <string name="look_retro_crt_desc">Os passes de tubo CRT e de sinal analógico juntos.</string> + <string name="look_upscale_sharp">Upscale nítido</string> + <string name="look_upscale_sharp_desc">Para rodar abaixo da resolução da tela.</string> + <string name="look_pixel_clean">Pixels limpos</string> + <string name="look_pixel_clean_desc">Pixels nítidos para jogos 2D e antigos.</string> + <string name="look_anime_edge">Contorno anime</string> + <string name="look_anime_edge_desc">Contornos de desenho animado e nitidez.</string> + + <string name="gpuinfo_not_adreno">Não é uma GPU Adreno</string> + <string name="gpuinfo_supported">Compatível</string> + <string name="gpuinfo_experimental">Experimental: os drivers são versões de teste</string> + <string name="gpuinfo_below_tested">Abaixo do hardware testado (Adreno 725 ou mais recente): pode não funcionar</string> + <string name="gpuinfo_unsupported">Incompatível: o DroidDeck precisa de uma GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">O limite de requisições do GitHub foi atingido - tente mais tarde</string> + <string name="turnip_github_http">O GitHub respondeu HTTP %1$d</string> + <string name="turnip_download_failed">Falha no download</string> + <string name="turnip_list_predates_checksums">Esta lista de drivers é anterior às somas de verificação - atualize-a e tente de novo</string> + <string name="turnip_checksum_mismatch">A soma de verificação não confere - o download foi descartado</string> + <string name="turnip_not_adrenotools">Não é um driver AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">sem meta.json</string> + <string name="turnip_reject_meta_unreadable">não é possível ler o meta.json (%1$s)</string> + <string name="turnip_reject_linux_driver">este é um driver do runtime Linux (importe-o em “Driver do runtime Linux”)</string> + <string name="turnip_reject_wayland">este é um driver de jogos Wayland, que não tem utilidade neste app</string> + <string name="turnip_reject_no_library_name">o meta.json não indica libraryName, então nada pôde ser entregue ao AdrenoTools</string> + <string name="turnip_reject_library_missing">o meta.json indica %1$s, que não está no zip</string> + <string name="turnip_reject_not_aarch64">%1$s não é uma biblioteca compartilhada ELF AArch64 de 64 bits</string> + <string name="turnip_reject_glibc">%1$s usa glibc - é um Turnip “-Linux”, que vai em “Driver do runtime Linux”</string> + <string name="lvd_no_library">Não há libvulkan_freedreno*.so neste zip. Um zip de Turnip Android (AdrenoTools) ou -Wayland não é um driver do runtime Linux.</string> + <string name="lvd_not_aarch64">%1$s não é uma biblioteca compartilhada ELF AArch64 de 64 bits.</string> + <string name="lvd_not_glibc">%1$s não é um driver glibc - ele usa a libc do Android. O runtime Linux precisa de um zip “-Linux”; um Turnip comum ou “-Wayland” não pode ser carregado pelo cliente Steam de jeito nenhum.</string> + <string name="bundle_no_manifest">Não é um pacote de drivers: não há manifest.json indicando um driver android e um linux</string> + <string name="bundle_entry_outside">Não é um pacote de drivers: %1$s aponta para fora dele</string> + <string name="bundle_too_large">Não é um pacote de drivers: extraído, ele ocupa mais de %1$d MB</string> + + <string name="gstore_sd_card">Cartão SD</string> + <string name="gstore_folder">Pasta</string> + + <string name="logshare_chooser">Compartilhar logs da sessão</string> + + <string name="hdr_needs_android_10">requer Android 10 ou mais recente (camadas de exibição com espaço de cores)</string> + <string name="hdr_none">esta tela não informa suporte a HDR</string> + <string name="hdr_not_hdr10">esta tela é compatível com %1$s, não com HDR10</string> + + <string name="gpu_this_gpu">esta GPU</string> + <string name="phantom_title_on">O limite de processos filhos está ativado</string> + <string name="phantom_title_unset">O limite de processos filhos não está definido</string> + <string name="phantom_title_unreadable">Não foi possível verificar o limite de processos filhos</string> + <string name="phantom_title_off">O limite de processos filhos está desativado</string> + <string name="phantom_title_not_required">O limite de processos filhos não é necessário</string> + <string name="phantom_instructions_fix">%1$s Se não for possível, conecte este dispositivo a um computador com ADB e execute o comando abaixo. Depois volte aqui e verifique de novo.</string> + <string name="phantom_instructions_off">As sessões do Steam podem ser iniciadas.</string> + <string name="phantom_instructions_not_applicable">Esta versão do Android não usa esse limite.</string> + <string name="phantom_fix_toggle">Ative “Desativar restrições de processos filhos” nas Opções do desenvolvedor e mantenha as Opções do desenvolvedor ativadas depois.</string> + <string name="phantom_fix_no_toggle">Esta versão do Android não tem uma chave para isso. Use a depuração por Wi-Fi para alterar pelo próprio dispositivo.</string> + <string name="upd_block_no_apk">Esta versão não tem download para esta cópia do DroidDeck.</string> + <string name="upd_block_version_code">O Android não vai instalá-la por cima desta versão porque o versionCode %1$d é menor que o %2$d instalado.</string> + <string name="upd_fail_downgrade">O Android não instala uma versão mais antiga por cima de uma mais nova. Fique nesta versão até o canal alcançá-la.</string> + <string name="upd_fail_signature">Esta cópia do DroidDeck tem outra assinatura (uma build local?), então o Android não consegue atualizá-la diretamente.</string> + <string name="upd_fail_storage">Não há espaço livre suficiente para a atualização.</string> + <string name="upd_fail_aborted">A atualização foi cancelada.</string> + <string name="upd_fail_with_message">A atualização não foi instalada: %1$s</string> + <string name="upd_fail_generic">A atualização não foi instalada.</string> + <string name="saves_layout_zip">zip do %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s ainda não foi iniciado</string> + <string name="saves_none_found">Nenhum arquivo de save encontrado para %1$s</string> + <string name="saves_not_save_zip">%1$s não tem a pasta drive_c, então não é um zip de saves do GameHub ou do Winlator</string> + <string name="gstore_cannot_create">não é possível criar pastas em %1$s</string> + <string name="gstore_cannot_write">não é possível gravar em %1$s</string> + <string name="gstore_cannot_write_detail">não é possível gravar em %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">A pasta não está disponível</string> + <string name="gfiles_name_taken">Outro arquivo já usa %1$s</string> + <string name="gfiles_art_unavailable">A pasta de artes não está disponível</string> + <string name="gfiles_unrelated_inventory">A pasta tem um inventário de sincronização não relacionado</string> + <string name="gfiles_remove_failed">Não foi possível remover %1$s</string> + <string name="gfiles_outside_folder">O arquivo sai da pasta de exportação</string> + <string name="cmgr_fex_unnamed">FEX (build sem nome de versão)</string> + <string name="cmgr_no_profile">sem profile.json em %1$s</string> + <string name="cmgr_not_component_package">%1$s não é um pacote de componente Linux (tipo %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s livres</string> + <string name="mode_storage_auto_short">Automático</string> + <string name="appupd_catalog_rejected">O catálogo de atualizações não passou nas verificações (%1$s)</string> + <string name="main_adb_clip_label">Configuração de processos filhos do DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Conectado · modo offline</string> + <string name="setup_signed_in_unnamed">Conectado</string> + <string name="driver_tag_bundled">INCLUÍDO</string> + <string name="driver_tag_downloaded">BAIXADO</string> + <string name="driver_tag_imported">IMPORTADO</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Tela da sessão</string> + <string name="display_resolution">Resolução</string> + <string name="display_game_fit">Ajuste de jogos 16:9</string> + <string name="display_game_fit_hint">Como os jogos 16:9 se ajustam a esta tela. Na próxima sessão.</string> + <string name="display_game_fit_unavailable">Escolha Igual à tela ou um tamanho personalizado mais estreito que 16:9.</string> + <string name="display_preserve">Manter proporções</string> + <string name="display_stretch">Esticar para a tela</string> + <string name="display_image_scaling">Escala de imagem</string> + <string name="display_filter">Filtro de escala</string> + <string name="display_filter_hint">Compartilhado entre Steam e Área de trabalho.</string> + <string name="display_filter_live">Aplicado na hora. Compartilhado entre Steam e Área de trabalho.</string> + <string name="display_filter_note">FSR, GSR e NIS são aplicados ao ampliar a imagem da sessão. Só nitidez também funciona sem ampliação.</string> + <string name="display_sharpness">Nitidez do filtro</string> + <string name="display_frame_rate">Taxa de quadros</string> + <string name="display_look_filter">%1$s Define a escala como %2$s.</string> + <string name="display_match_screen">Igual à tela (%1$d×%2$d)</string> + <string name="display_follow_screen">Seguir a tela (redimensiona ao dobrar ou desdobrar)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Mostrar detalhes do dispositivo</string> + <string name="device_info_hide">Ocultar detalhes do dispositivo</string> + <string name="device_info_loading">Lendo o dispositivo…</string> + <string name="device_info_copy">Copiar</string> + <string name="device_info_copy_hint">Copie estes detalhes para um relatório de bug.</string> + <string name="device_info_copied">Copiado.</string> + <string name="force_ssbs_title">Forçar SSBS</string> + <string name="force_ssbs_hint">Mantém ativada uma configuração de velocidade da CPU que o Wine fica desativando. Pode deixar jogos do Windows mais rápidos no Snapdragon 8 Elite; pouca mudança em chips mais antigos. Vale a partir da próxima vez que um jogo for iniciado.</string> + + <string name="rail_stores">Lojas</string> + <string name="source_steam">Steam</string> + <string name="source_added">Personalizado</string> + <string name="setup_stores">Lojas</string> + <string name="setup_stores_open_on">Abrir uma loja em</string> + <string name="setup_stores_speed">Nível de velocidade de download</string> + <string name="setup_stores_engine">Mecanismo das lojas</string> + <string name="setup_stores_engine_chip_ready">● Mecanismo pronto</string> + <string name="setup_stores_engine_chip_missing">Não compilado</string> + <string name="stores_tier_balanced">Equilibrado</string> + <string name="stores_tier_fast">Rápido</string> + <string name="stores_tier_max">Máximo</string> + <string name="stores_title">Lojas</string> + <string name="stores_settings">Configurações das lojas</string> + <string name="stores_settings_eyebrow">Configurações</string> + <string name="stores_chip_signed_out">(sem login)</string> + <string name="stores_tab_store">Loja</string> + <string name="stores_tab_installed">Instalados</string> + <string name="stores_tab_library">Biblioteca</string> + <string name="stores_tab_all">Todos</string> + <string name="stores_tab_downloads">Downloads</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Fazer login</string> + <string name="stores_signout_named">%1$s · sair</string> + <string name="stores_signout_title">Sair de %1$s?</string> + <string name="stores_signout_note">Os jogos instalados continuam. A biblioteca é buscada de novo quando você fizer login outra vez.</string> + <string name="stores_signout_stay">Continuar conectado</string> + <string name="stores_signout_go">Sair</string> + <string name="stores_search_catalog">Pesquisar no catálogo de %1$s…</string> + <string name="stores_search_installed">Pesquisar jogos instalados…</string> + <string name="stores_search_library">Pesquisar na sua biblioteca…</string> + <string name="stores_search_open">Pesquisar</string> + <string name="stores_installed_empty">Nada instalado</string> + <string name="stores_library_loading">Carregando</string> + <string name="stores_nothing_matches">Nenhum jogo</string> + <string name="stores_shelves_loading">Carregando a loja…</string> + <string name="stores_amazon_no_catalog">Sem catálogo</string> + <string name="stores_shelf_new">Novidades</string> + <string name="stores_shelf_deals">Ofertas</string> + <string name="stores_shelf_free">Jogos grátis</string> + <string name="stores_shelf_trending">Em alta</string> + <string name="stores_shelf_library">Sua biblioteca</string> + <string name="stores_play">Jogar</string> + <string name="stores_install">Instalar</string> + <string name="stores_resume_install">Retomar instalação</string> + <string name="stores_dl_interrupted">Interrompido</string> + <string name="stores_install_size">Instalar · %1$s</string> + <string name="stores_get_free">Obter grátis</string> + <string name="stores_view_on">Ver em %1$s</string> + <string name="stores_buy_price">Comprar · %1$s</string> + <string name="stores_installed_chip">Instalado</string> + <string name="stores_in_library">Na biblioteca</string> + <string name="stores_free">Grátis</string> + <string name="stores_resume">Retomar</string> + <string name="stores_refresh">Atualizar</string> + <string name="stores_sort">Ordenar</string> + <string name="stores_sort_last_played">Jogados recentemente</string> + <string name="stores_sort_recently_installed">Instalados recentemente</string> + <string name="stores_sort_title_asc">Título A–Z</string> + <string name="stores_sort_title_desc">Título Z–A</string> + <string name="stores_sort_size_desc">Tamanho: maior</string> + <string name="stores_sort_size_asc">Tamanho: menor</string> + <string name="stores_sort_release_date">Data de lançamento</string> + <string name="stores_view_list">Vista de lista</string> + <string name="stores_view_cards">Vista de cartões</string> + <string name="stores_show_mature">Mostrar conteúdo adulto</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Desativado</string> + <string name="epic_eos">Login da Epic (EOS)</string> + <string name="epic_offline">Iniciar offline</string> + <string name="epic_resolve">Resolver login da Epic</string> + <string name="epic_client_version">Versão %1$s</string> + <string name="epic_client_no_runtime">Instale primeiro o runtime do Linux</string> + <string name="epic_client_checking">Verificando a versão mais recente…</string> + <string name="epic_client_unpacking">Descompactando…</string> + <string name="epic_client_unreachable">O servidor de download não respondeu</string> + <string name="epic_client_needs_fex">O Epic Games Launcher precisa do FEX, que o Steam baixa. Abra o launcher novamente depois que o Steam iniciar.</string> + <string name="epic_client_download_failed">Falha no download: %1$s</string> + <string name="epic_client_unpack_failed">Não foi possível descompactar o launcher: %1$s</string> + <string name="epic_client_sign_in_failed">O Epic Games Launcher não aceitou o login. Inicie-o novamente a partir do launcher.</string> + <string name="epic_client_uninstall_body">Remove o launcher e libera o espaço dele. Seus jogos da Epic continuam instalados e funcionando, e o login fica guardado para quando você instalar de novo.</string> + <string name="epic_client_uninstall_stops">A sessão em andamento será fechada primeiro.</string> + <string name="epic_client_uninstalled">Epic Games Launcher desinstalado</string> + <string name="epic_client_uninstall_failed">Não foi possível remover alguns arquivos do launcher. Tente novamente.</string> + <string name="epic_client_uninstalling">Aguarde o Epic Games Launcher terminar de ser desinstalado</string> + <string name="store_cloud_saves">Saves na nuvem</string> + <string name="cloud_upload">Enviar para a nuvem</string> + <string name="cloud_download">Baixar da nuvem</string> + <string name="cloud_none">Sem saves na nuvem</string> + <string name="cloud_conflict">Conflito na nuvem</string> + <string name="cloud_conflict_files">Conflito na nuvem · %1$d arquivos</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Manter da nuvem</string> + <string name="cloud_keep_local">Manter local</string> + <string name="cloud_checking">Verificando a nuvem…</string> + <string name="cloud_last_sync">Última sincronização: %1$s</string> + <string name="cloud_never">Ainda não sincronizado</string> + <string name="cloud_done">%1$d arquivos</string> + <string name="stores_eyebrow_installed">instalado</string> + <string name="stores_eyebrow_library">na sua biblioteca</string> + <string name="stores_eyebrow_store">loja</string> + <string name="achievements_title">Conquistas</string> + <string name="achievements_count">%1$d de %2$d desbloqueadas</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Desbloqueadas · %1$d</string> + <string name="achievements_group_locked">Bloqueadas · %1$d</string> + <string name="achievements_group_hidden">Ocultas · %1$d</string> + <string name="achievements_hidden">Conquista oculta</string> + <string name="achievements_hidden_detail">Os detalhes aparecem quando ela é desbloqueada.</string> + <string name="achievements_all">Todas as conquistas desbloqueadas</string> + <string name="achievements_reading">Carregando…</string> + <string name="achievements_signed_out">Entre no %1$s para ver suas conquistas.</string> + <string name="achievements_unreachable">Não foi possível acessar o %1$s. Verifique novamente quando estiver online.</string> + <string name="achievements_none">O %1$s não lista conquistas para este jogo.</string> + <string name="achievements_show_all">Mostrar todas as %1$d</string> + <string name="achievements_dialog_title">Conquistas · %1$s</string> + <string name="stores_in_steam">✓ No Steam</string> + <string name="stores_uninstall">Desinstalar</string> + <string name="stores_uninstalling">Desinstalando…</string> + <string name="stores_uninstall_title">Desinstalar %1$s?</string> + <string name="stores_uninstall_body_size">Libera %1$s e remove o jogo do Steam.</string> + <string name="stores_uninstall_body">Remove os arquivos e o atalho no Steam.</string> + <string name="stores_launch_not_registered">O Steam detecta o jogo na próxima vez que for iniciado; abra o jogo por lá ou inicie o Steam agora.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Escolha do Steam para cada jogo</string> + <string name="stores_card_audio">Áudio</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Componentes</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Mecanismo</string> + <string name="stores_card_engine_value">%1$s · nativo</string> + <string name="stores_card_engine_java">%1$s · integrado</string> + <string name="stores_how_it_runs">Como ele roda</string> + <string name="stores_kv_fetched">Obtido de</string> + <string name="stores_kv_fetched_value">%1$s, com sua conta</string> + <string name="stores_kv_installed_to">Instalado em</string> + <string name="stores_kv_installed_to_value">Armazenamento de jogos (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Iniciado por</string> + <string name="stores_kv_launched_by_value">Steam e Proton, o mesmo caminho dos jogos do Steam</string> + <string name="stores_kv_launched_by_epic">Steam e Proton · login da Epic a cada início, overlay do EOS desativado</string> + <string name="stores_kv_launched_by_amazon">Steam e Proton · variáveis do Amazon Games Services definidas</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">adicionado ao Steam na instalação (interface do Deck + Steam Input)</string> + <string name="stores_downloads_empty">Nenhum download</string> + <string name="stores_dl_paused">Pausado</string> + <string name="stores_dl_queued">Na fila</string> + <string name="stores_dl_queued_at">Na fila · #%1$d</string> + <string name="stores_dl_cancelled">Cancelado</string> + <string name="stores_dl_failed">Falhou</string> + <string name="stores_dl_failed_reason">Falhou · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pausar</string> + <string name="stores_dl_resume">Retomar</string> + <string name="stores_dl_cancel">Cancelar</string> + <string name="stores_dl_retry">Tentar de novo</string> + <string name="stores_dl_clear">Limpar</string> + <string name="stores_dl_clear_all">Limpar concluídos</string> + <string name="stores_stage_manifest">Manifesto</string> + <string name="stores_stage_download">Download</string> + <string name="stores_stage_verify">Verificação</string> + <string name="stores_stage_install">Instalação</string> + <string name="stores_stage_done">Concluído</string> + <string name="stores_stage_checking">Verificando</string> + <string name="stores_stage_downloading">Baixando</string> + <string name="stores_dl_cancel_confirm">Excluir download?</string> + <string name="stores_dl_failed_kept">Falhou · %1$s mantido</string> + <string name="stores_stage_verifying">Verificando</string> + <string name="stores_stage_installing">Instalando</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d arquivos</string> + <string name="stores_download_manager">Gerenciador de downloads</string> + <string name="stores_parallel">Downloads simultâneos</string> + <string name="stores_install_where">Instalar em</string> + <string name="stores_install_title">Instalar %1$s:</string> + <string name="stores_target_internal">Interno</string> + <string name="stores_target_free">%1$s livres</string> + <string name="stores_notification_channel">Downloads da loja</string> + <string name="stores_notification_channel_hint">Mostra o progresso dos downloads de jogos e mantém os downloads rodando em segundo plano</string> + <string name="stores_notification_one">Baixando</string> + <string name="stores_notification_many">%1$d downloads</string> + <string name="stores_notification_waiting">Preparando…</string> + <string name="stores_notification_done_channel">Downloads da loja concluídos</string> + <string name="stores_notification_installed">%1$s instalado</string> + <string name="stores_notification_failed">Falha no download de %1$s</string> + <string name="stores_notification_delete">Excluir</string> + <string name="stores_notification_keep">Manter</string> + <string name="stores_login_title">Fazer login em %1$s</string> + <string name="stores_login_provider_title">Fazer login com seu provedor</string> + <string name="stores_login_reload">Recarregar</string> + <string name="stores_login_close">Fechar</string> + <string name="stores_login_retry">Tentar de novo</string> + <string name="stores_login_finishing">Concluindo o login…</string> + <string name="stores_login_error_network">Não foi possível carregar a página de login: %1$s</string> + <string name="stores_login_error_idp_blocked">Este provedor não permite login a partir de uma página incorporada. Faça login com a senha da loja.</string> + <string name="stores_login_error_http">A página de login respondeu com um erro (HTTP %1$d).</string> + <string name="stores_login_error_ssl">A conexão com a página de login não é segura.</string> + <string name="stores_login_error_verification">Não foi possível verificar o login. Tente de novo.</string> + <string name="stores_login_error_generic">Falha no login. Tente de novo.</string> + <string name="common_close">Fechar</string> + <string name="common_back">Voltar</string> + <string name="common_edit">Editar</string> + <string name="games_add_all">Adicionar todos os jogos desta pasta</string> + <string name="games_added_none">Nada de novo nesta pasta</string> + <string name="edit_name">Nome</string> + <string name="edit_target">Destino</string> + <string name="edit_start_in">Iniciar em</string> + <string name="edit_launch_options">Opções de inicialização</string> + <string name="edit_artwork">Artes</string> + <string name="edit_other_exe">Outro exe…</string> + <string name="edit_remove">Remover</string> + <string name="art_cover">Capa</string> + <string name="art_wide_cover">Capa larga</string> + <string name="art_adjust_logo">Ajustar logo</string> + <string name="logo_pos_default">Padrão</string> + <string name="logo_pos_upper_left">Superior esquerdo</string> + <string name="logo_pos_upper_center">Superior centro</string> + <string name="logo_pos_center">Centro</string> + <string name="logo_pos_bottom_left">Inferior esquerdo</string> + <string name="logo_pos_bottom_center">Inferior centro</string> + <string name="logo_pos_position">Posição</string> + <string name="logo_pos_size">Tamanho</string> + <string name="logo_pos_save">Salvar</string> + <string name="logo_pos_reset">Voltar ao padrão</string> + <string name="logo_pos_hint">É desenhado sobre o plano de fundo do jogo, como a Steam faz. A posição exata pode variar alguns pixels.</string> + <string name="logo_pos_no_logo">Este jogo ainda não tem logo. Escolha um em Logo para vê-lo aqui.</string> + <string name="logo_pos_failed">Não foi possível salvar a posição do logo. Tente de novo.</string> + <string name="art_background">Fundo</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Ícone</string> + <string name="art_src_folder">Pasta do jogo</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Seu arquivo</string> + <string name="art_src_exe">Do exe</string> + <string name="art_src_auto">Automático</string> + <string name="art_pick_image">Escolher imagem…</string> + <string name="art_pick_title">Escolha uma imagem: %1$s</string> + <string name="art_reset">Voltar ao automático</string> + <string name="art_search_sgdb">Buscar no SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Buscar um jogo</string> + <string name="art_sgdb_other_games">Outros resultados</string> + <string name="art_sgdb_none">Nenhum resultado.</string> + <string name="art_sgdb_no_key">O SteamGridDB precisa de uma chave de API. Adicione a sua em Configuração › Inicializador.</string> + <string name="art_sgdb_bad_key">O SteamGridDB não aceitou a chave de API. Confira em Configuração › Inicializador.</string> + <string name="art_sgdb_limit">O SteamGridDB está limitando as solicitações agora. Tente de novo em um minuto.</string> + <string name="art_sgdb_offline">Não foi possível acessar o SteamGridDB. Verifique a conexão.</string> + <string name="art_sgdb_server">O SteamGridDB teve um problema. Tente mais tarde.</string> + <string name="art_sgdb_no_game">O SteamGridDB não tem resultados para este jogo. Tente buscá-lo.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d jogo adicionado</item> + <item quantity="many">%1$d jogos adicionados</item> + <item quantity="other">%1$d jogos adicionados</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d já está em Jogos</item> + <item quantity="many">%1$d já estão em Jogos</item> + <item quantity="other">%1$d já estão em Jogos</item> + </plurals> + <string name="hop_back">B · Voltar para %1$s</string> + <string name="hop_from_games">o jogo</string> + <string name="hop_from_play">Configurações de jogo</string> + <string name="sheet_graphics_drivers">Drivers gráficos</string> + <string name="comp_this_proton">Este Proton</string> + <string name="comp_every_proton">Todos os Protons</string> + <string name="comp_for_every_proton">Para todos os Protons</string> + <string name="comp_available_count">Disponíveis · %1$d</string> + <string name="comp_checked">Verificado %1$s</string> + <string name="comp_check_all">Procurar novos componentes e drivers</string> + <string name="comp_get">Obter</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton e FEX abaixo são deste Proton</string> + <string name="comp_device_tested">%1$s · testado</string> + <string name="comp_device_untested">%1$s · não testado</string> + <string name="comp_device_unsupported">%1$s · incompatível</string> + <string name="gpu_auto_keeps">Mantém o par recomendado atualizado</string> + <string name="gpu_bar_auto">Automático · %1$s</string> + <string name="gpu_separately">Drivers do runtime e de vídeo separados</string> + <string name="gpu_use_title">Usar %1$s?</string> + <string name="gpu_mode_title">Como os drivers são escolhidos</string> + <string name="gpu_mode_auto_detail">O melhor par para esta GPU, sempre atualizado</string> + <string name="gpu_mode_pair">Par combinado</string> + <string name="gpu_mode_pair_detail">Escolha um par; define os dois drivers</string> + <string name="gpu_mode_mix">Combine livremente</string> + <string name="gpu_mode_mix_detail">Escolha vídeo e runtime separadamente</string> + <string name="gpu_mode_pair_short">Par</string> + <string name="gpu_mode_mix_short">Misto</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAR</string> + <string name="gpu_src_bundle">PACOTE</string> + <string name="gpu_src_chosen">ESCOLHIDO</string> + <string name="gpu_src_by_gpu">POR GPU</string> + <string name="gpu_src_default">PADRÃO</string> + <string name="gpu_display_live">Desenha agora</string> + <string name="gpu_display_pending">Reinício pendente · até então desenha %1$s</string> + <string name="gpu_runtime_live">Em execução</string> + <string name="gpu_runtime_pending">Próxima sessão · esta fica com %1$s</string> + <string name="gpu_display_next">Desenha a tela. Vale a partir da próxima sessão.</string> + <string name="gpu_previous_driver">o driver anterior</string> + <string name="gpu_restart_banner">Reinicie para trocar o driver de vídeo.</string> + <string name="gpu_restart_blocked">Encerre a sessão atual e reinicie o DroidDeck para trocar o driver de vídeo.</string> + <string name="gpu_restart_now">Reiniciar agora</string> + <string name="gpu_restart_later">Depois</string> + <string name="gpu_auto_title">O Automático escolheu este par para sua %1$s</string> + <string name="gpu_auto_builtin_title">O Automático usa os drivers integrados para sua %1$s</string> + <string name="gpu_auto_reason">Escolhido para a família %1$s. Versões novas são instaladas em segundo plano.</string> + <string name="gpu_pair_title">Escolha um par</string> + <string name="gpu_pair_hint">Um par define o driver de vídeo e o do runtime juntos.</string> + <string name="gpu_mix_title">Escolha cada driver</string> + <string name="gpu_mix_hint">Um pacote preenche as duas vagas. Mudanças de vídeo valem depois de reiniciar, as do runtime a partir da próxima sessão.</string> + <string name="gpu_change_display">Trocar driver de vídeo</string> + <string name="gpu_change_runtime">Trocar driver do runtime</string> + <string name="gpu_autos_pick">ESCOLHA DO AUTOMÁTICO</string> + <string name="gpu_installed">Instalado</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · reinicie para aplicar</string> + <string name="gpu_chip_restart">%1$s · reinício pendente</string> + <string name="comp_this_device">Este aparelho</string> + <string name="proton_remove_title">Remover %1$s?</string> + <string name="setup_tab_diagnostics">Diagnóstico</string> + <string name="setup_ready">Pronto para jogar</string> + <string name="setup_not_ready">Ainda não está pronto para jogar</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">limite de processos desativado</string> + <string name="setup_ready_signed_in">conectado como %1$s</string> + <string name="setup_needs_you">Quando algo precisar de você</string> + <string name="setup_group_look">Aparência</string> + <string name="setup_group_device">Este dispositivo</string> + <string name="setup_group_art">Artes da biblioteca</string> + <string name="setup_group_download">Download</string> + <string name="setup_download_source">Origem</string> + <string name="setup_download_source_auto">Automática</string> + <string name="setup_download_source_direct">Direta</string> + <string name="setup_download_source_mirror">Espelho</string> + <string name="setup_download_source_custom">Prefixo personalizado</string> + <string name="setup_download_mirror">Site</string> + <string name="setup_download_prefix">Prefixo</string> + <string name="flathub_eyebrow">APPS LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Apps para a área de trabalho Linux, abertos pela Área de trabalho.</string> + <string name="flathub_setup">Configurar o Flathub</string> + <string name="flathub_remove_title">Remover %1$s?</string> + <string name="flathub_remove_note">As configurações e os arquivos dele são mantidos.</string> + <string name="flathub_keep">Manter</string> + <string name="desktop_size">Tamanho em disco</string> + <string name="desktop_uninstall_title">Desinstalar a área de trabalho?</string> + <string name="desktop_all_systems">Todos</string> + <string name="gog_achievements">Conquistas da GOG</string> + <string name="gog_achievements_hint">Sincroniza conquistas dos jogos compatíveis da GOG. Vale a partir da próxima abertura.</string> + <string name="gog_achievements_off">Conquistas desativadas</string> + <string name="gog_achievements_on">Conquistas ativadas</string> + <string name="gog_achievements_signin">Entre na GOG novamente</string> + <string name="gog_achievements_uploaded">Conquistas enviadas</string> + <string name="gog_achievements_pending">Envio de conquista pendente</string> + <string name="gog_achievements_enable_store">Ative as conquistas da GOG nas configurações de Lojas</string> + <string name="gog_achievements_unavailable">Conquistas indisponíveis; veja os registros da sessão</string> + <string name="achievement_unlocked">Conquista desbloqueada</string> + <string name="touch_paste">Colar</string> + <string name="touch_dpad">Direcional</string> + <string name="touch_left_stick">Analógico esquerdo</string> + <string name="touch_right_stick">Analógico direito</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Teclado</string> + <string name="touch_dpad_up">Direcional para cima</string> + <string name="touch_dpad_down">Direcional para baixo</string> + <string name="touch_dpad_left">Direcional para a esquerda</string> + <string name="touch_dpad_right">Direcional para a direita</string> + <string name="touch_title">Controles por toque</string> + <string name="touch_controller">Controle por toque</string> + <string name="touch_mouse">Mouse</string> + <string name="touch_on">Ativado</string> + <string name="touch_off">Desativado</string> + <string name="touch_speed_slow">Lenta</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Rápida</string> + <string name="touch_edit_layout">Editar layout</string> + <string name="touch_droiddeck_menu">Menu do DroidDeck</string> + <string name="touch_drag_hint">Arraste os controles para a tela</string> + <string name="touch_arrange">Organizar</string> + <string name="touch_discard">Descartar</string> + <string name="touch_saving">Salvando…</string> + <string name="touch_icon">Ícone</string> + <string name="touch_narrower">L−</string> + <string name="touch_wider">L+</string> + <string name="touch_shorter">A−</string> + <string name="touch_taller">A+</string> + <string name="touch_hide">Ocultar</string> + <string name="touch_color_opacity">Cor e opacidade…</string> + <string name="touch_copy_layout">Copiar este layout</string> + <string name="touch_layout_copied">Layout copiado; cole no layout de toque de qualquer jogo</string> + <string name="touch_paste_layout">Colar layout copiado</string> + <string name="touch_reset_layout">Restaurar o padrão da Steam</string> + <string name="touch_no_binding">Este controle não tem uma ação vinculada na Steam para receber um ícone</string> + <string name="touch_icon_for">Ícone para %1$s</string> + <string name="touch_layout_color">Cor do layout de toque</string> + <string name="touch_done">Concluído</string> + <string name="touch_save_failed">Não foi possível salvar o layout de toque</string> + <string name="touch_saved">Layout de toque salvo na Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Rótulo (opcional)</string> + <string name="touch_icons_missing">Os ícones da Steam não foram encontrados</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d ícone da Steam</item> + <item quantity="many">%1$d ícones da Steam</item> + <item quantity="other">%1$d ícones da Steam</item> + </plurals> + <string name="touch_icon_color">Cor do ícone</string> + <string name="touch_button_color">Cor do botão</string> + <string name="touch_no_icon">Sem ícone</string> + + <string name="stores_sync_sign_in">Verificando login…</string> + <string name="stores_sync_library">Buscando sua biblioteca…</string> + <string name="stores_sync_game_list">Buscando lista de jogos…</string> + <string name="stores_sync_details">Carregando detalhes dos jogos… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Sincronizando %1$d jogo…</item> + <item quantity="many">Sincronizando %1$d jogos…</item> + <item quantity="other">Sincronizando %1$d jogos…</item> + </plurals> + <string name="stores_sync_progress">Sincronizando… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Buscando capas dos jogos…</string> + <string name="stores_sync_failed">Falha na sincronização</string> + <string name="stores_sync_no_games">Nenhum jogo encontrado na sua biblioteca da %1$s</string> + <string name="stores_sync_amazon_no_answer">A Amazon Games não respondeu sobre sua biblioteca: atualize, ou faça login novamente</string> + <string name="stores_sync_gog_unreachable">Não foi possível conectar à GOG</string> + <string name="stores_sync_gog_unreadable">Não foi possível ler sua biblioteca da GOG</string> + <string name="stores_registering">Registrando na Steam…</string> + <string name="mode_client_arch">Cliente Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnóstico do VAC</string> + <string name="setup_vac_diag_hint">Jogos Source registram o console (-condebug); o vac.txt nos logs da sessão informa se está seguro ou não</string> + <string name="load_starting_steam_x64">Iniciando o Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Usado pelo cliente Steam x86-64</string> + <string name="storage_uninstall_in_x64">Esta cópia está no cliente Steam x86-64. Escolha x86-64 em Cliente Steam e depois desinstale-a aqui.</string> + <string name="storage_uninstall_in_arm64">Esta cópia está no cliente Steam ARM64. Escolha ARM64 em Cliente Steam e depois desinstale-a aqui.</string> + <string name="drawer_page_glasses">Óculos</string> + <string name="glasses_open">Óculos VITURE</string> + <string name="glasses_control">Controle dos óculos</string> + <string name="glasses_driver_missing">Esta versão não inclui o driver para estes óculos.</string> + <string name="glasses_connection_failed">Não foi possível conectar aos óculos. Reconecte o cabo ou toque em Permitir para tentar de novo.</string> + <string name="glasses_allow">Permitir</string> + <string name="glasses_allow_hint">Permite que o DroidDeck ajuste a taxa de atualização, o modo 3D, o brilho, o volume e o escurecimento dos óculos, e leia o rastreamento da cabeça deles.</string> + <string name="glasses_asking">Aguardando você permitir na solicitação do Android…</string> + <string name="glasses_denied">O controle foi recusado. Permita para alterar as configurações dos óculos.</string> + <string name="glasses_no_control">Estes óculos mostram o jogo, mas as configurações deles não podem ser alteradas por aqui.</string> + <string name="glasses_output">Saída</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Jogo nos óculos</string> + <string name="glasses_game_on_hint">Mostra o jogo só nos óculos. Desativado: o celular mostra o jogo e o Android espelha a tela do celular.</string> + <string name="glasses_display">Tela</string> + <string name="glasses_refresh">Taxa de atualização</string> + <string name="glasses_3d">3D (lado a lado)</string> + <string name="glasses_3d_hint">Alterne os óculos inteligentes para 3D lado a lado. O rastreamento da cabeça é controlado separadamente.</string> + <string name="glasses_3d_failed">O sinal 3D não foi confirmado. Tente novamente quando a imagem 2D voltar.</string> + <string name="glasses_no_signal">Sem imagem: os óculos estão em um modo que este celular não consegue enviar. Mantenha pressionado o botão 2D/3D deles ou desconecte e reconecte os óculos.</string> + <string name="glasses_3d_refresh">Taxa de atualização em 3D</string> + <string name="glasses_auto3d">3D para jogos de RV</string> + <string name="glasses_auto3d_hint">Muda para 3D enquanto o SteamVR está em execução e volta depois.</string> + <string name="glasses_picture">Imagem</string> + <string name="glasses_picture_hint">O modo automático exibe conteúdo plano em ambos os olhos e detecta o SteamVR. Selecione Jogo lado a lado para conteúdo SBS.</string> + <string name="glasses_picture_auto">Automático</string> + <string name="glasses_picture_screen">Tela virtual</string> + <string name="glasses_picture_sbs">Jogo lado a lado</string> + <string name="glasses_screen_size">Largura da tela</string> + <string name="glasses_screen_distance">Distância da tela</string> + <string name="glasses_screen_next_session">A largura e a distância valem quando um jogo roda nos óculos como tela virtual.</string> + <string name="glasses_screen_no_output">Estas configurações valem enquanto Jogo nos óculos estiver ativado e o jogo for exibido neles.</string> + <string name="glasses_screen_flat_hint">O modo Automático mantém este jogo 2D em tela cheia. Use uma tela virtual para ajustar a largura, a distância e o rastreamento da cabeça.</string> + <string name="glasses_screen_use">Usar tela virtual</string> + <string name="glasses_screen_direct_hint">O SteamVR preenche a visualização. Ajuste seu campo de visão em VR; a largura e a distância se aplicam somente a uma tela virtual.</string> + <string name="glasses_screen_sbs_hint">Jogos lado a lado preenchem a visão de cada olho. A largura e a distância valem só para uma tela virtual.</string> + <string name="glasses_tracking_flat_hint">O modo Automático mantém este jogo 2D fixo na visão. Escolha Tela virtual na seção Tela para usar o rastreamento da cabeça.</string> + <string name="glasses_tracking_sbs_hint">O rastreamento da cabeça vale para uma tela virtual ou um jogo do SteamVR em execução.</string> + <string name="glasses_hardware">Dispositivo</string> + <string name="glasses_brightness">Brilho</string> + <string name="glasses_volume">Volume</string> + <string name="glasses_sunblock">Escurecimento</string> + <string name="glasses_sunblock_hint">Escurece as lentes frontais.</string> + <string name="glasses_tracking">Rastreamento</string> + <string name="glasses_head_tracking">Rastreamento da cabeça</string> + <string name="glasses_head_tracking_hint">Os sensores dos próprios óculos giram a tela virtual e o SteamVR com a sua cabeça.</string> + <string name="glasses_recenter">Recentralizar visão</string> + <string name="glasses_recenter_button">Recentralizar tela</string> + <string name="glasses_vr_fov">Campo de visão do SteamVR</string> + <string name="glasses_vr_fov_hint">Menor aproxima o SteamVR e preenche os óculos; maior mostra mais ao seu redor.</string> + <string name="glasses_playing">Jogando em %1$s</string> + <string name="glasses_calibration">Calibração do rastreamento</string> + <string name="glasses_calibration_hint">Reduz a deriva e alinha a referência de nível.</string> + <string name="glasses_calibration_saved_hint">A calibração salva é aplicada a estes óculos.</string> + <string name="glasses_calibration_open">Calibrar</string> + <string name="glasses_calibration_instructions">Coloque os óculos conectados de cabeça para baixo em uma superfície nivelada, com a armação apoiada por igual. Toque em Iniciar e não mexa neles por cerca de 8 segundos. Qualquer movimento reinicia a medição. Isso ajusta a deriva e a inclinação, não a direção.</string> + <string name="glasses_calibration_settling">Deixe os óculos de cabeça para baixo, sem tocar neles. Aguardando que fiquem estáveis…</string> + <string name="glasses_calibration_collecting">Medindo os sensores. Mantenha os óculos parados.</string> + <string name="glasses_calibration_moving">Movimento detectado. Não toque nos óculos; a medição vai reiniciar automaticamente.</string> + <string name="glasses_calibration_turn_over">Apoie os óculos de cabeça para baixo em uma superfície nivelada. A medição começa quando eles estiverem na posição correta.</string> + <string name="glasses_calibration_complete">Calibração salva. Coloque os óculos e olhe para a frente; depois toque em Concluído para recentralizar.</string> + <string name="glasses_calibration_failed">Não foi possível concluir a calibração. Verifique a conexão, mantenha os óculos parados e tente novamente. Sua calibração anterior não foi alterada.</string> + <string name="glasses_calibration_start">Iniciar</string> + <string name="glasses_calibration_done">Concluído</string> + <string name="glasses_calibration_reset">Redefinir calibração do rastreamento</string> + <string name="glasses_calibration_reset_hint">Remover a calibração salva e restaurar o padrão do modelo? Recentralize depois de colocar os óculos de novo.</string> + <string name="glasses_calibration_reset_button">Redefinir</string> + <string name="hand_camera_group">Rastreamento das mãos</string> + <string name="hand_camera_prompt_title">Rastrear mãos ou controles Joy-Con com a câmera do celular?</string> + <string name="hand_camera_prompt_body">Sem nenhum controle conectado, a câmera do celular rastreia suas mãos nuas em VR: junte o polegar e o indicador para clicar, feche a mão para pegar e vire a palma da mão em sua direção e junte para abrir o menu. Com controles Joy-Con emparelhados, a câmera rastreia a posição deles enquanto os controles Joy-Con fornecem rotação e entradas de botão. As imagens são processadas neste dispositivo e nunca são salvas ou enviadas.</string> + <string name="hand_camera_rear">Câmera traseira</string> + <string name="hand_camera_rear_hint">Recomendada. Costuma ser mais nítida e ampla.</string> + <string name="hand_camera_front">Câmera frontal</string> + <string name="hand_camera_front_hint">Para quando a parte de trás do dispositivo não puder ficar voltada para você.</string> + <string name="hand_camera_allow">Usar câmera</string> + <string name="hand_camera_not_now">Agora não</string> + <string name="hand_camera_setting">Rastreamento das mãos pela câmera</string> + <string name="hand_camera_setting_hint">Use a câmera do telefone para gestos com as mãos nuas ou para posicionar os controles Joy-Con emparelhados em VR. Os controles Joy-Con fornecem rotação e comandos dos botões. Pausa enquanto os óculos inteligentes rastreiam suas mãos ou controles Joy-Con. As imagens são processadas apenas neste dispositivo.</string> + <string name="hand_camera_choice">Câmera</string> + <string name="hand_camera_access">Acesso à câmera</string> + <string name="hand_camera_access_hint">Permita o acesso à câmera para que o rastreamento das mãos possa começar.</string> + <string name="hand_camera_access_denied">O acesso à câmera está desativado. Ative-o nas configurações do Android.</string> + <string name="hand_camera_allow_button">Permitir</string> + <string name="hand_camera_open_settings">Abrir configurações</string> + <string name="hand_camera_placement">Posição da câmera</string> + <string name="hand_camera_placement_hint">Verifique se a câmera consegue ver você antes de jogar.</string> + <string name="hand_camera_check">Verificar</string> + <string name="hand_camera_check_title">Posição da câmera</string> + <string name="hand_camera_how_rear">Deixe o dispositivo em pé a 1,5-2 metros de distância, na altura do peito, com a câmera traseira voltada para você. Depois entre no campo de visão com as mãos estendidas.</string> + <string name="hand_camera_how_front">Deixe o dispositivo em pé a 1,5-2 metros de distância, na altura do peito, com a tela voltada para você. Depois entre no campo de visão com as mãos estendidas.</string> + <string name="hand_camera_starting">Iniciando a câmera…</string> + <string name="hand_camera_stand_up">O dispositivo está deitado. Deixe-o em pé para a câmera ficar voltada para você.</string> + <string name="hand_camera_upright">Deixe o dispositivo mais em pé para a câmera ficar voltada para você.</string> + <string name="hand_camera_not_seen">Ainda não consegue ver você. Entre no campo de visão para mostrar a cabeça e os ombros.</string> + <string name="hand_camera_move_back">Afaste-se um pouco.</string> + <string name="hand_camera_move_closer">Chegue um pouco mais perto.</string> + <string name="hand_camera_show_hands">Mostre as duas mãos onde a câmera possa vê-las.</string> + <string name="hand_camera_good">Tudo certo.</string> + <string name="hand_camera_failed">Não foi possível iniciar a câmera. Feche outros apps que estejam usando a câmera e tente de novo.</string> + <string name="hand_camera_switch">Trocar de câmera</string> + <string name="hand_camera_skip">Pular</string> + <string name="hand_camera_done">Concluído</string> + <string name="glasses_xreal_network_missing">Aguardando a conexão Ethernet por USB dos óculos. Este celular pode não disponibilizá-la para os apps.</string> + <string name="glasses_xreal_connection_failed">A conexão com os óculos XREAL foi interrompida ou retornou uma resposta incompatível. Tentando novamente…</string> + <string name="glasses_xreal_experimental">Suporte experimental ao 1S. Use o modo Follow e desative a estabilização no menu dos óculos. As direções do rastreamento e os modos de exibição ainda precisam de testes no dispositivo.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Modo Cardboard</string> + <string name="cardboard_mode_hint">Imagens para o olho esquerdo e o direito, para um óculos de RV de celular.</string> + <string name="cardboard_source">Imagem</string> + <string name="cardboard_source_screen">Tela virtual</string> + <string name="cardboard_source_sbs">3D lado a lado</string> + <string name="cardboard_viewer">Óculos</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Sem lente</string> + <string name="cardboard_ipd">Distância entre os olhos</string> + <string name="cardboard_screen_width">Largura da tela</string> + <string name="cardboard_screen_distance">Distância da tela</string> + <string name="cardboard_head_tracking">Rastreamento da cabeça</string> + <string name="cardboard_no_sensor">Este dispositivo não tem sensor de rotação.</string> + <string name="cardboard_recenter">Recentralizar visão</string> + <string name="cardboard_recenter_button">Recentralizar</string> + <string name="cardboard_steamvr">SteamVR (experimental)</string> + <string name="cardboard_steamvr_install">Instalar</string> + <string name="cardboard_steamvr_installing">Baixando e descompactando o SteamVR…</string> + <string name="cardboard_steamvr_start">Iniciar</string> + <string name="cardboard_steamvr_stop">Parar</string> + <string name="cardboard_steamvr_unavailable">Indisponível nesta sessão.</string> + <string name="cardboard_steamvr_failed">O SteamVR não respondeu; veja o registro da sessão.</string> + <string name="drawer_component_downloads">Baixar componentes</string> + <string name="drawer_component_downloads_hint">Os downloads são compartilhados com a página Componentes. Escolha acima uma versão baixada para usá-la na próxima vez que um jogo for aberto.</string> + <string name="drawer_component_choose_download">Escolha uma versão para baixar</string> + <string name="stores_fact_developer">Desenvolvedora</string> + <string name="stores_fact_publisher">Publicadora</string> + <string name="stores_fact_released">Lançamento</string> + <string name="stores_hltb_main">Principal</string> + <string name="stores_hltb_extras">+ Extras</string> + <string name="stores_hltb_completionist">Completista</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="mode_zram">Compressão zRAM</string> + <string name="mode_zram_hint">Enquanto um jogo roda, a memória do cliente Steam é comprimida na zram do dispositivo, deixando mais RAM para o jogo. Vale a partir da próxima vez que a Steam iniciar.</string> + <string name="mode_zram_unsupported">Indisponível: este dispositivo não tem swap ativo, ou o kernel é anterior à versão 5.4.</string> + <string name="setup_reset_settings">Redefinir todas as configurações</string> + <string name="setup_reset_settings_title">Redefinir todas as configurações?</string> + <string name="setup_reset_settings_body">As configurações de tela, desempenho, controle, tema, idioma e inicializador voltam ao padrão. Seus jogos, o login da Steam, as contas das lojas, os drivers baixados e as pastas de armazenamento são mantidos.</string> + <string name="setup_reset_settings_button">Redefinir</string> + <string name="setup_reset_settings_hint">Volta todas as configurações ao padrão</string> + <string name="setup_reset_settings_partial">As configurações foram redefinidas, mas algumas partes não puderam ser. Os detalhes estão nos registros.</string> + <string name="setup_reset_settings_profiles">Redefinir também os perfis de jogo (Proton, FEX, componentes e ambiente de cada jogo e o ambiente do perfil Padrão)</string> + <string name="setup_reset_settings_session_running">Encerre a sessão antes de redefinir as configurações.</string> + <string name="stores_storage_insufficient">Espaço livre insuficiente: são necessários %1$s, só há %2$s livres</string> + <string name="stores_storage_low">Espaço insuficiente (%1$s livres, são necessários %2$s)</string> + <string name="stores_target_free_unknown">Espaço livre desconhecido</string> + <string name="display_picture_position">Posição da imagem</string> + <string name="display_position_top">Topo</string> + <string name="display_position_bottom">Base</string> + <string name="display_position_center">Centro (padrão)</string> + <string name="setup_tab_storage">Armazenamento</string> + <string name="storage_measuring">Medindo o armazenamento…</string> + <string name="storage_measuring_hint">Na primeira vez leva alguns segundos.</string> + <string name="storage_internal">Armazenamento interno</string> + <string name="storage_used_of">%1$s de %2$s usados</string> + <string name="storage_free">%1$s livres</string> + <string name="storage_droiddeck_uses">O DroidDeck ocupa %1$s. Medido em %2$s.</string> + <string name="storage_rescanning">medindo de novo…</string> + <string name="storage_other_apps">Outros apps Android</string> + <string name="storage_safe_now">Dá para liberar agora</string> + <string name="storage_safe_hint">Runtimes sem uso, restos, logs antigos</string> + <string name="storage_clean_up">Limpar…</string> + <string name="storage_session_running">Encerre a sessão para limpar ou remover algo. Os tamanhos continuam visíveis.</string> + <string name="storage_where">Para onde vai</string> + <string name="storage_games">Jogos da Steam</string> + <string name="storage_game_data">Dados dos jogos</string> + <string name="storage_game_data_hint">Prefixos %1$s · workshop %2$s · shaders %3$s</string> + <string name="storage_tools">Proton e runtimes</string> + <string name="storage_tools_unused">%1$s sem uso</string> + <string name="storage_stores">GOG, Epic e outras lojas</string> + <string name="storage_stores_hint">Desinstale em Lojas</string> + <string name="storage_desktop">Apps de desktop</string> + <string name="storage_desktop_hint">Apps e runtimes Flatpak</string> + <string name="storage_system">Sistema Linux e cliente Steam</string> + <string name="storage_system_hint">Necessário para rodar qualquer coisa</string> + <string name="storage_app_data">Dados do DroidDeck</string> + <string name="storage_app_data_hint">Logs de sessões antigas %1$s · cache · drivers</string> + <string name="storage_legend_games">Jogos</string> + <string name="storage_legend_data">Dados dos jogos</string> + <string name="storage_legend_tools">Proton e runtimes</string> + <string name="storage_legend_stores">Outras lojas</string> + <string name="storage_legend_desktop">Apps de desktop</string> + <string name="storage_legend_system">Sistema Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Limpeza</string> + <string name="storage_clean_up_lede">Aqui nada toca nos jogos instalados nem nos downloads em andamento.</string> + <string name="storage_nothing_to_clean">Nada para limpar agora.</string> + <string name="storage_selected">Selecionado: %1$s · %2$s → %3$s livres</string> + <string name="storage_cleaning">Limpando…</string> + <string name="storage_free_button">Liberar %1$s</string> + <string name="storage_freed">%1$s liberados.</string> + <string name="storage_item_runtimes">Runtimes e Proton da Steam sem uso</string> + <string name="storage_item_leftovers">Restos de jogos desinstalados</string> + <string name="storage_item_leftovers_unsure">Restos que podem ter saves</string> + <string name="storage_item_logs">Logs de sessões antigas</string> + <string name="storage_item_logs_detail">Mantém os logs da sessão atual</string> + <string name="storage_item_custom_detail">Nenhum jogo usa. Instale de novo em Componentes se precisar.</string> + <string name="storage_item_shaders">Cache de shaders dos jogos instalados</string> + <string name="storage_item_shaders_detail">Voltam a ser criados jogando. Os primeiros minutos de cada jogo voltam a engasgar.</string> + <string name="storage_tag_safe">Seguro</string> + <string name="storage_tag_unused">Sem uso</string> + <string name="storage_tag_stutter">Engasgos</string> + <string name="storage_tag_saves">Confira os saves</string> + <string name="storage_tag_default">Padrão</string> + <string name="storage_tag_required">Necessário</string> + <string name="storage_tag_not_used">Sem uso</string> + <string name="storage_back">Armazenamento</string> + <string name="storage_games_with_data">%1$s com seus dados</string> + <string name="storage_sort_largest">Maiores</string> + <string name="storage_sort_least_played">Menos jogados</string> + <string name="storage_sort_sd">No cartão SD</string> + <string name="storage_no_games">Não há jogos aqui.</string> + <string name="storage_played">Jogado %1$s</string> + <string name="storage_never_played">Nunca jogado</string> + <string name="storage_game_parts">Jogo %1$s · dados %2$s</string> + <string name="storage_uninstall">Desinstalar</string> + <string name="storage_games_note">Desinstalar abre a janela da Steam, para a Steam registrar. Para mover um jogo para o cartão SD, use Steam › Configurações › Armazenamento.</string> + <string name="storage_uninstall_title">Desinstalar %1$s?</string> + <string name="storage_uninstall_body">A Steam abre e pede confirmação. Isso libera os %1$s do jogo. O prefixo fica até você limpar os restos, e os saves do Steam Cloud continuam na sua conta.</string> + <string name="storage_open_steam">Abrir a Steam</string> + <string name="storage_tools_detail">%1$s · %2$s sem uso</string> + <string name="storage_remove_unused">Remover sem uso · %1$s</string> + <string name="storage_in_use">Em uso</string> + <string name="storage_not_used">Sem uso</string> + <string name="storage_remove">Remover</string> + <string name="storage_remove_title">Remover %1$s?</string> + <string name="storage_remove_body">Libera %1$s. A Steam baixa de novo se algum jogo precisar.</string> + <string name="storage_tool_fex_runtime">Necessário para jogos Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Necessário para os Proton ARM64</string> + <string name="storage_tool_redist">Instaladores de VC++ e DirectX exigidos pelos jogos</string> + <string name="storage_tool_fex">Roda jogos Linux x86</string> + <string name="storage_tool_steam">Ferramenta da Steam</string> + <string name="storage_tool_old_runtime">O DroidDeck roda jogos sem este runtime</string> + <string name="storage_tool_x86_proton">Proton x86, que o DroidDeck não consegue rodar</string> + <string name="storage_tool_custom_default">Padrão para todos os jogos</string> + <string name="storage_tool_custom_unused">Nenhum jogo usa</string> + <string name="storage_tool_custom_unknown">As configurações da Steam não são legíveis, então é mantido</string> + <string name="storage_cleanup_busy">Aguarde a limpeza do armazenamento terminar</string> + <string name="storage_low_title">Só %1$s livres</string> + <string name="storage_low_body">A Steam precisa de espaço para atualizações e cache de shaders. Abaixo de 10 GB, atualizações de jogos podem falhar no meio.</string> + <string name="storage_low_safe">Dá para liberar %1$s sem risco.</string> + <string name="storage_free_up">Liberar espaço</string> + <string name="storage_play_anyway">Jogar assim mesmo</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d instalado</item> + <item quantity="other">%d instalados</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d no cartão SD</item> + <item quantity="other">%d no cartão SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d ferramenta</item> + <item quantity="other">%d ferramentas</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Pastas de prefixo vazias e cache de shaders de %d jogo</item> + <item quantity="other">Pastas de prefixo vazias e cache de shaders de %d jogos</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">O prefixo de %d jogo ainda tem arquivos, que podem incluir saves locais. Se precisar deles, faça uma cópia antes.</item> + <item quantity="other">Os prefixos de %d jogos ainda têm arquivos, que podem incluir saves locais. Se precisar deles, faça uma cópia antes.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d jogo</item> + <item quantity="other">%d jogos</item> + </plurals> + <string name="storage_tool_default_proton">Proton padrão do DroidDeck</string> + <string name="storage_tool_proton">Opção Proton 11 do DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Usado por %d jogo</item> + <item quantity="other">Usado por %d jogos</item> + </plurals> + <string name="storage_legend_components">Componentes</string> + <string name="storage_components">Componentes</string> + <string name="storage_item_components">Componentes sem uso</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Libera %1$s. Restaura só uma versão do Proton que não está mais instalada.</string> + <string name="storage_leftovers_unchecked">Não verificado: o manifesto de um app Steam não é legível, então os prefixos de jogos desinstalados ficam até ser.</string> + <string name="storage_failed">Não foi possível concluir: %1$s</string> + <string name="storage_desktop_shared">%1$s compartilhados</string> + <string name="storage_data_installed">Jogos instalados</string> + <string name="storage_data_parts">Prefixo %1$s · shaders %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Apagar shaders</string> + <string name="storage_data_leftovers">Jogos desinstalados</string> + <string name="storage_steam_app">App Steam %1$d</string> + <string name="storage_leftover_unsure_detail">O prefixo dele ainda tem arquivos, que podem incluir saves locais</string> + <string name="storage_leftover_confirm">Apaga o prefixo Wine e o cache de shaders dele (%1$s). Faça antes uma cópia dos saves que precisar; os do Steam Cloud ficam na sua conta.</string> + <string name="storage_data_other">Mantidos</string> + <string name="storage_data_other_title">Jogos não Steam e prefixo compartilhado da Steam</string> + <string name="storage_data_other_detail">Prefixos de jogos adicionados pelas lojas ou à mão</string> + <string name="storage_components_packages">Pacotes baixados</string> + <string name="storage_components_originals">Originais mantidos</string> + <string name="storage_components_none">Nenhum pacote de componentes baixado.</string> + <string name="storage_component_in_use">Escolhido para um Proton ou jogo</string> + <string name="storage_component_unused">Não escolhido em lugar nenhum</string> + <string name="storage_original_kept">Restaura o Proton instalado</string> + <string name="storage_original_old">Versão do Proton que não está mais instalada</string> + <string name="storage_tag_in_use">Em uso</string> + <string name="storage_components_note">Os componentes em uso ficam travados. Escolha em Componentes; o que você remover aqui pode ser baixado de novo lá.</string> + <string name="storage_component_confirm">Libera %1$s. Pacotes que você importou não podem ser baixados de novo.</string> + <string name="storage_desktop_detail">%1$s para apps Flatpak e o que eles compartilham</string> + <string name="storage_desktop_apps_title">Apps</string> + <string name="storage_desktop_none">Nenhum app Flatpak instalado.</string> + <string name="storage_desktop_shared_title">Compartilhado pelos apps</string> + <string name="storage_desktop_runtimes">Runtimes</string> + <string name="storage_desktop_runtimes_detail">Bibliotecas que os apps usam; os sem uso saem em Remover sem uso</string> + <string name="storage_desktop_cache">Depósito de downloads</string> + <string name="storage_desktop_cache_detail">Object store e downloads em cache do Flatpak</string> + <string name="storage_desktop_prune">Remover sem uso</string> + <string name="storage_desktop_prune_body">Remove os runtimes que nenhum app instalado pede e limpa o object store do Flatpak. Os apps instalados continuam funcionando.</string> + <string name="storage_flatpak_uninstall_body">Remove o app (%1$s) e os runtimes que mais ninguém usa. Os dados dele na pasta pessoal ficam.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d pacote</item> + <item quantity="other">%d pacotes</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d app</item> + <item quantity="other">%d apps</item> + </plurals> + <string name="boot_movie">Vídeo de inicialização</string> + <string name="boot_movie_video">Vídeo</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps fica mais fluido, mas usa mais CPU enquanto o Steam inicia. Um vídeo de inicialização escolhido nas configurações do Steam tem prioridade.</string> + <string name="boot_movie_sound">Som</string> + <string name="boot_movie_custom">Seu próprio vídeo</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV ou WebM. Outros formatos e arquivos acima de %1$d MB são convertidos para WebM 720p no aparelho, até %2$d segundos.</string> + <string name="boot_movie_import">Importar</string> + <string name="boot_movie_remove">Remover</string> + <string name="boot_movie_pick">Escolha um vídeo de inicialização</string> + <string name="boot_movie_imported">%1$s agora é o vídeo de inicialização</string> + <string name="boot_movie_imported_silent">%1$s agora é o vídeo de inicialização, sem som</string> + <string name="boot_movie_too_long">Vídeos que precisam de conversão devem ter até %1$d segundos</string> + <string name="boot_movie_converting">Convertendo %1$d%%</string> + <string name="boot_movie_converting_started">Convertendo %1$s para o Steam. Mantenha o DroidDeck aberto.</string> + <string name="boot_movie_unsupported">Este aparelho não consegue decodificar esse vídeo.</string> + <string name="boot_movie_import_failed">Não foi possível importar esse vídeo</string> + <string name="glasses_experimental">Câmeras Luma Ultra — Experimental</string> + <string name="glasses_joycons">Rastreamento de posição do Joy-Con</string> + <string name="glasses_joycons_hint">Use as câmeras dos óculos inteligentes para posicionar seus controles Joy-Con emparelhados. A rotação e os comandos dos botões vêm dos controles Joy-Con. A posição é estimada quando seus pulsos estão escondidos. Substitui os controles operados com as mãos nuas e pausa o rastreamento da câmera do telefone. Aponte os controles Joy-Con para frente ao conectar ou redefinir o centro de rastreamento.</string> + <string name="glasses_joycons_requires_position">Ative o rastreamento de posição primeiro. Requer controles Joy-Con com sensor de movimento no Android 12 ou posterior. Desativado por padrão.</string> + <string name="setup_tab_glasses">Óculos inteligentes</string> + <string name="setup_glasses_scope">As configurações de exibição e rastreamento de cabeça são compartilhadas entre os menus do DroidDeck, jogos e sessões da área de trabalho.</string> + <string name="setup_glasses_connect">Conecte os óculos inteligentes para alterar suas configurações de exibição e rastreamento. Suas configurações salvas são mantidas ao desconectar.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Modo de exibição</string> + <string name="glasses_output_2d">Saída 2D</string> + <string name="glasses_output_3d">Saída 3D</string> + <string name="glasses_picture_group">Imagem e tela virtual</string> + <string name="glasses_position_group">Posição e nível do piso</string> + <string name="glasses_hands_group">Rastreamento de mãos — Experimental</string> + <string name="glasses_tracking_status">Status do rastreamento</string> + <string name="glasses_resolution_2d">Resolução 2D</string> + <string name="glasses_resolution_3d">Resolução 3D</string> + <string name="glasses_resolution_vr">Resolução VR</string> + <string name="glasses_resolution_auto">Automático</string> + <string name="glasses_resolution_inherit">Igual a 2D/3D</string> + <string name="glasses_resolution_hint">Resolução de saída por olho.</string> + <string name="glasses_refresh_30_hint">Ative o recurso \"Jogar em óculos inteligentes\" para selecionar o modo nativo de 30 Hz da tela.</string> + <string name="glasses_3dof">Tela virtual 3DoF</string> + <string name="glasses_3dof_hint">Ancore jogos planos à sua frente para que você possa olhar ao redor. Ativa o recurso \"Jogar em óculos inteligentes\" sem alternar para 3D.</string> + <string name="glasses_screen_app_wide">A largura e a distância atualizam a tela virtual rastreada para menus, jogos e sessões de desktop do DroidDeck imediatamente.</string> + <string name="glasses_head_tracking_spatial_vr_hint">O rastreamento posicional inclui a rotação da cabeça no SteamVR. Para rastreamento somente de rotação, desative o rastreamento posicional.</string> + <string name="glasses_head_tracking_spatial_hint">Controla o movimento da cabeça na tela virtual. O rastreamento posicional inclui a rotação da cabeça no SteamVR.</string> + <string name="glasses_quick_actions">Ações rápidas</string> + <string name="glasses_recenter_screen_hint">Olhe para onde você quer que a tela fique e, em seguida, redefina o centro de rastreamento para definir sua altura e direção.</string> + <string name="glasses_recenter_joycons_button">Recentralizar Joy-Con</string> + <string name="phone_camera_tracking_group">Câmera do celular — Experimental</string> + <string name="phone_camera_tracking_setting">Rastrear mãos ou controles Joy-Con</string> + <string name="glasses_6dof">Tela virtual 6DoF</string> + <string name="glasses_position">Rastreamento posicional — experimental</string> + <string name="glasses_position_hint">Movimento físico em VR e ao redor de telas virtuais. Reiniciar o rastreamento leva um instante.</string> + <string name="glasses_eye_height">Altura atual dos olhos em relação ao chão</string> + <string name="glasses_floor">Definir nível do chão a partir da altura atual</string> + <string name="glasses_floor_set">Definir nível do chão</string> + <string name="glasses_spatial_setup">Configuração e diagnóstico da câmera estéreo</string> + <string name="glasses_spatial_setup_hint">Verifique a calibração da câmera e o rastreamento das mãos antes de jogar.</string> + <string name="glasses_spatial_open">Abrir configuração</string> + <string name="glasses_hands">Controladores operados com as mãos nuas</string> + <string name="glasses_hands_hint">Use as câmeras dos óculos inteligentes para mirar com as mãos, faça o gesto de pinça para clicar e feche a mão para agarrar em VR. Os joysticks do gamepad se movem e giram. Substitui o rastreamento de posição do Joy-Con. Pode haver atraso ou perda de rastreamento durante os jogos.</string> + <string name="glasses_hands_ready_hint">Ative os controladores operados com as mãos nuas sob as câmeras Luma Ultra em Rastreamento. Mostre as mãos abertas primeiro.</string> + <string name="glasses_hands_base">Calibração compartilhada do Luma Ultra</string> + <string name="glasses_hands_base_hint">Usando a base compartilhada do Luma Ultra. Calibre seus próprios óculos inteligentes para verificar a precisão deles.</string> + <string name="glasses_hands_calibration_verified">Calibração medida verificada</string> + <string name="glasses_hands_calibration_required">Validação necessária</string> + <string name="glasses_hands_calibration_required_hint">Controladores operados com as mãos nuas ficam disponíveis após a verificação da distância medida ser aprovada.</string> + <string name="tracking_recovery_lost">Rastreamento perdido</string> + <string name="tracking_recovery_restart_help">Ainda preso? No seu telefone: óculos inteligentes → Rastreamento → Abrir configuração → Mostrar diagnóstico → Reiniciar rastreamento.</string> + <string name="tracking_recovery_disconnected">Óculos inteligentes desconectados</string> + <string name="tracking_recovery_connect">Verifique a conexão USB e reconecte os óculos inteligentes.\nAceite a solicitação de acesso USB no seu telefone, se ela aparecer.</string> + <string name="tracking_recovery_usb_help">Uma vez conectado, olhe lentamente ao redor em uma sala bem iluminada para restaurar o rastreamento.</string> + <string name="tracking_recovery_recenter">É necessário recentralizar</string> + <string name="tracking_recovery_recenter_steps">O rastreamento retornou em uma nova posição.\nOlhe para frente e toque em redefinir centro de rastreamento no seu telefone.</string> + <string name="tracking_recovery_recenter_help">Você também pode encontrar a opção de redefinir o centro de rastreamento em óculos inteligentes → Rastreamento → Abrir configuração. Sua calibração de câmera salva será mantida.</string> + <string name="tracking_recovery_stabilizing">Fique parado por um momento</string> + <string name="tracking_recovery_hold">A redefinição do centro de rastreamento está em andamento.\nMantenha os óculos inteligentes firmes enquanto o rastreamento se estabiliza.</string> + <string name="tracking_recovery_automatic">Esta tela fecha automaticamente quando o rastreamento da cabeça está pronto.</string> + <string name="glasses_steady_hand_aim">Mira estabilizada com as mãos</string> + <string name="glasses_steady_hand_aim_hint">Mire do ombro até a palma da mão. Desligue para rotação controlada pelo pulso.</string> + <string name="spatial_title">Configuração espacial</string> + <string name="spatial_wait_tracking">Aguardando rastreamento…</string> + <string name="spatial_cameras_description">Câmeras de rastreamento esquerda e direita</string> + <string name="spatial_camera_sync">Sincronização de câmera</string> + <string name="spatial_ready">Pronto</string> + <string name="spatial_sync_hint">Aguardando o alinhamento da câmera e do rastreamento da cabeça. Mantenha os óculos inteligentes conectados.</string> + <string name="spatial_prepare">1. Preparar o alvo de calibração</string> + <string name="spatial_print_actual">Imprimir em tamanho real</string> + <string name="spatial_print_hint">Cada quadrado deverá medir 30 mm (1.181 in). Monte a folha plana sobre uma superfície rígida em uma área bem iluminada.</string> + <string name="spatial_print">Imprimir padrão de calibração</string> + <string name="spatial_capture_group">2. Capturar diferentes visualizações</string> + <string name="spatial_board_stationary">Mantenha o alvo de calibração estacionário</string> + <string name="spatial_capture_hint">Aproxime, afaste e lateralmente os óculos inteligentes. Vire-os para a esquerda/direita, incline-os para cima/para baixo e incline-os lateralmente. Mantenha o alvo de calibração em ambas as câmeras e faça uma breve pausa antes de cada captura.</string> + <string name="spatial_start">Iniciar nova calibração</string> + <string name="spatial_wait_sync">Aguardando sincronização da câmera.</string> + <string name="spatial_start_hint">Iniciar uma nova calibração para coletar visualizações.</string> + <string name="spatial_views_hint">Mantenha o alvo de calibração visível em ambas as visualizações. Capture pelo menos 24 visualizações nítidas de diferentes ângulos.</string> + <string name="spatial_capturing">Capturando…</string> + <string name="spatial_capture">Capturar visualização do alvo de calibração</string> + <string name="spatial_alignment">Calcular alinhamento da câmera</string> + <string name="spatial_calculating">Calculando…</string> + <string name="spatial_calculate">Calcular calibração</string> + <string name="spatial_distance_group">3. Verifique a distância</string> + <string name="spatial_distance">Distância medida</string> + <string name="spatial_distance_hint">Comece com 12 polegadas ou 30 cm para que os marcadores impressos sejam mais fáceis de detectar. Escolha a medida exata que você usará.</string> + <string name="spatial_camera_board_distance">Câmera esquerda para o centro do alvo de calibração</string> + <string name="spatial_checking_distance">Verificando distância…</string> + <string name="spatial_validate">Validar distância</string> + <string name="spatial_diagnostics">Diagnóstico</string> + <string name="spatial_show_diagnostics">Mostrar diagnóstico</string> + <string name="spatial_diagnostics_hint">Ferramentas de temporização e recuperação de rastreamento da câmera.</string> + <string name="spatial_camera_timing">Tempo da câmera</string> + <string name="spatial_hand_input">Entrada do rastreamento de mãos</string> + <string name="spatial_wait_timing">Aguardando o tempo da câmera.</string> + <string name="spatial_frames">Imagens da câmera</string> + <string name="spatial_gpu">Detecção de mãos por GPU</string> + <string name="spatial_gpu_hint">CPU é o padrão. A GPU é experimental e pode fazer com que o SteamVR reinicie. Esta escolha é redefinida quando o rastreamento é reiniciado.</string> + <string name="spatial_lite">Detecção Lite de modelos de mãos</string> + <string name="spatial_lite_hint">Use o detector de palma Lite e os pontos-chave Lite nas mãos. Verifique a mira, aperte e agarre a precisão. Redefine quando o rastreamento é reiniciado.</string> + <string name="spatial_adaptive">Frequência de entrada automática para rastreamento de mãos</string> + <string name="spatial_adaptive_hint">Ajuste a entrada à velocidade de processamento. Redefine quando o rastreamento é reiniciado.</string> + <string name="spatial_half_rate">Limitar a frequência de entrada para rastreamento de mãos</string> + <string name="spatial_half_rate_hint">Use metade das imagens da câmera. Desligue para comparar a frequência máxima. Redefine quando o rastreamento é reiniciado.</string> + <string name="spatial_diagnostic_capture">Captura de diagnóstico</string> + <string name="spatial_diagnostic_capture_hint">Salve localmente um par de imagens estéreo. As imagens são salvas somente quando solicitadas.</string> + <string name="spatial_save_frame">Salvar imagem da câmera</string> + <string name="spatial_restart_tracking">Reiniciar rastreamento</string> + <string name="spatial_restart_hint">Utilize se o rastreamento não for recuperado em uma área bem iluminada. Uma reinicialização requer uma nova origem de rastreamento.</string> + <string name="spatial_restart">Reiniciar</string> + <string name="spatial_restart_title">Reiniciar rastreamento?</string> + <string name="spatial_restart_confirm">As visualizações de calibração não salvas serão perdidas. Mantenha os óculos inteligentes imóveis posteriormente e redefina o centro de rastreamento quando o rastreamento for restaurado.</string> + <string name="spatial_views_count">%1$d / 24 visualizações capturadas</string> + <string name="spatial_capture_paused">Captura pausada: %1$s</string> + <string name="spatial_measure_hint">Medida %1$s. Mostre o alvo de calibração completo em ambas as visualizações e fique imóvel.</string> + <string name="spatial_timing_values">%1$.1f Hz • idade da imagem %2$.1f ms • processamento %3$.1f ms</string> + <string name="spatial_input_values">Limite de entrada %1$.1f Hz • %2$.0f%% de imagens da câmera. O rastreamento da cabeça continua em sua frequência máxima.</string> + <string name="spatial_frame_counts">%1$d processado • %2$d descartado • %3$d ignorado pelo limite de entrada</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Calibração Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Imprimir em 100%/tamanho real. Cada quadrado: 30 mm (1,181 pol.).</string> + <string name="spatial_print_stationary">Mantenha o alvo de calibração plano e estacionário; mova os óculos inteligentes entre as capturas.</string> + <string name="spatial_print_check">Verificação de escala: 100 mm (3,937 pol.) entre marcas</string> + <string name="spatial_distance_12in">30,48 cm (12 pol.)</string> + <string name="spatial_distance_30cm">30 cm (11,81 pol.)</string> + <string name="spatial_distance_20in">50,8 cm (20 pol.)</string> + <string name="spatial_distance_50cm">50 cm (19,69 pol.)</string> + <string name="spatial_disabled">Desativado</string> + <string name="spatial_wait_stable">Aguardando rastreamento estável</string> + <string name="spatial_disconnected">Desconectado</string> + <string name="spatial_hands_off">Os controladores operados com as mãos nuas estão desligados</string> + <string name="spatial_tracking_off">O rastreamento posicional está desativado ou os óculos inteligentes estão desconectados</string> + <string name="spatial_recenter_pending">Redefinição do centro de rastreamento solicitada — mantenha os óculos imóveis enquanto o rastreamento se estabiliza.</string> + <string name="spatial_tracking_lost">Rastreamento perdido — enfrente uma área bem iluminada com detalhes visíveis</string> + <string name="spatial_origin_changed">Origem do rastreamento alterada — toque em redefinir o centro de rastreamento e mantenha os óculos imóveis.</string> + <string name="spatial_active">6DoF ativo</string> + <string name="spatial_connect_hint">Conecte o Luma Ultra e ative o rastreamento posicional.</string> + <string name="spatial_validation_session">Calibração verificada para esta conexão.</string> + <string name="spatial_validation_saved">Calibração verificada e salva.</string> + <string name="spatial_wait_cameras">Esperando por câmeras estéreo</string> + <string name="spatial_wait_hands">Aguardando rastreamento de mãos</string> + <string name="spatial_collect_instructions">Mantenha o alvo de calibração 5 × 7 estacionário. Capture mais de 24 visualizações enquanto move e gira os óculos inteligentes.</string> + <string name="spatial_capture_pending">Aguardando a próxima imagem da câmera. Segure os óculos inteligentes imóveis.</string> + <string name="spatial_validation_pending">Verificando a próxima imagem da câmera. Mantenha o alvo de calibração completo visível e permaneça imóvel.</string> + <string name="spatial_start_first">Inicie a calibração primeiro</string> + <string name="spatial_no_camera_frame">Nenhuma imagem nova da câmera chegou. Verifique a conexão dos óculos inteligentes e as visualizações da câmera e tente novamente.</string> + <string name="spatial_clock_reset">Reinicialização do relógio da câmera</string> + <string name="spatial_frame_changed">Sistema de coordenadas de rastreamento alterado. Suas visualizações foram salvas para recálculo. Redefina o centro de rastreamento e inicie um novo conjunto para capturar mais visualizações.</string> + <string name="spatial_device_loaded">calibração do dispositivo carregada</string> + <string name="spatial_base_loaded">Calibração básica do Luma Ultra carregada</string> + <string name="spatial_calibration_needed">calibração necessária</string> + <string name="spatial_tap_start">Toque em Iniciar nova calibração primeiro.</string> + <string name="spatial_capture_recenter_pending">A redefinição do centro de rastreamento está aguardando um rastreamento estável. Mantenha os óculos imóveis por um momento.</string> + <string name="spatial_capture_recenter">Rastreamento alterado. Toque em redefinir o centro de rastreamento uma vez e mantenha os óculos imóveis antes de capturar.</string> + <string name="spatial_capture_unsynchronized">Captura rejeitada: o rastreamento da cabeça estava fora de sincronia ou mudou durante a captura. Fique parado e tente novamente.</string> + <string name="spatial_align_first">Calcule o alinhamento da câmera antes de verificar a distância.</string> + <string name="spatial_processing_failed">falha no processamento da câmera</string> + <string name="spatial_hand_head_changed">Rastreamento da cabeça alterado durante a detecção de mãos</string> + <string name="spatial_hand_wait_sync">Aguardando sincronização da câmera e da cabeça</string> + <string name="spatial_no_wrists">Nenhum pulso detectado. Mantenha as alças do controlador Joy-Con na frente dos óculos inteligentes</string> + <string name="spatial_no_hands">Nenhuma mão detectada. Mostre as palmas das mãos abertas na frente dos óculos inteligentes</string> + <string name="spatial_one_camera_wrists">Pulsos visíveis em apenas uma câmera; mantenha as alças do controle na visualização compartilhada</string> + <string name="spatial_one_camera_hands">Mãos visíveis em apenas uma câmera; mantenha as duas palmas na visualização compartilhada</string> + <string name="spatial_ambiguous_hands">Ambas as câmeras veem mãos, mas a correspondência esquerda/direita é ambígua</string> + <string name="spatial_inconsistent_depth">Mãos detectadas, mas a profundidade estéreo é inconsistente</string> + <string name="spatial_rejected_wrist">Posição do pulso rejeitada por verificações de estéreo ou de movimento</string> + <string name="spatial_inconsistent_palm">Pontos estéreo detectados, mas a geometria da palma é inconsistente</string> + <string name="spatial_hands_need_calibration">Conclua a calibração e a verificação de distância para ativar o rastreamento de mãos</string> + <string name="spatial_hands_wait_stable">Aguardando rastreamento de cabeça estável; redefina o centro de rastreamento se solicitado.</string> + <string name="spatial_old_frame">A observação da câmera é muito antiga; esperando por um novo par</string> + <string name="spatial_fit_ready">Ajustar %1$.2f px. Meça a distância selecionada da câmera esquerda até o centro do alvo de calibração e valide.</string> + <string name="spatial_opencv_error">OpenCV indisponível: %1$s</string> + <string name="spatial_restored">%1$d visualizações salvas restauradas. Calcule a calibração para tentar novamente ou inicie um novo conjunto para capturar mais.</string> + <string name="spatial_captured">Capturado %1$d/24 visualizações. Mantenha o alvo de calibração fixo; mova os óculos inteligentes para a próxima visualização.</string> + <string name="spatial_capture_corners">Captura rejeitada: %1$d/12 cantos necessários visíveis em ambas as câmeras. Mostre mais do alvo de calibração, fique imóvel e tente novamente.</string> + <string name="spatial_validation_error">A verificação de distância não pôde ser concluída: %1$s. Tente novamente.</string> + <string name="spatial_inference_error">Detecção de mãos indisponível: %1$s. Troque a CPU/GPU ou alterne os controladores operados com as mãos nuas para tentar novamente.</string> + <string name="spatial_hand_timeout">A detecção de mãos excedeu %1$d ms; observação descartada</string> + <string name="spatial_wrists_tracked">%1$d / 2 posições de pulso do Joy-Con medidas por estéreo</string> + <string name="spatial_palms_tracked">Palmas rastreadas: %1$d / 2; gesto de pinça pronto: %2$d; gesto de agarrar pronto: %3$d</string> + <string name="spatial_capture_saved">Captura de diagnóstico salva em %1$s</string> + <string name="spatial_hand_error">Rastreamento de mãos interrompido: %1$s</string> + <string name="spatial_stereo_loaded">Estéreo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">O rastreamento da cabeça e o alvo de calibração discordam em %1$s (limite de 5 cm/2 pol.). Mantenha o alvo de calibração fixo e aguarde um rastreamento estável antes de iniciar um novo conjunto. Gire e incline os óculos inteligentes suavemente; faça uma pausa antes de cada captura.</string> + <string name="spatial_need_views">Capture pelo menos 24 visualizações variadas do alvo de calibração estacionário.</string> + <string name="spatial_need_rotation">Gire os óculos inteligentes para a esquerda e para a direita e incline-os para cima e para baixo; o movimento sem rotação não pode calibrar o alinhamento da câmera.</string> + <string name="spatial_bad_baseline">Linha de base da câmera implausível</string> + <string name="spatial_need_orientations">Mova sua cabeça em orientações mais variadas.</string> + <string name="spatial_bad_rotation">Rotação câmera-cabeça inválida</string> + <string name="spatial_bad_alignment">O alinhamento da câmera com a cabeça é inconsistente.</string> + <string name="spatial_calibration_error">A calibração não pôde ser concluída. %1$s Suas visualizações capturadas são salvas.</string> + <string name="spatial_reprojection_error">Erro de reprojeção retido %1$.2f px excede 2 px. Recalibrar.</string> + <string name="spatial_distance_corners">%1$d / 24 cantos de tabuleiro de xadrez detectados em ambas as câmeras. Mantenha o alvo de calibração completo visível e permaneça imóvel. Se já estiver visível, selecione 12 pol. ou 30 cm e meça a distância mais próxima antes de tentar novamente.</string> + <string name="spatial_distance_depth">O alvo de calibração está visível, mas sua profundidade não pôde ser medida de forma confiável. Segure os óculos inteligentes e mantenha o alvo de calibração plano e bem iluminado e tente novamente.</string> + <string name="spatial_distance_invalid">A medição da câmera era inválida. Fique parado e tente novamente.</string> + <string name="spatial_distance_passed">Verificação de distância aprovada.</string> + <string name="spatial_distance_retry">Verifique novamente a distância da câmera esquerda até o centro do alvo de calibração e tente novamente.</string> + <string name="spatial_distance_result">Câmeras medidas %1$s; distância selecionada %2$s. %3$s</string> + <string name="spatial_wait_previews">Aguarde as visualizações de ambas as câmeras antes de iniciar a calibração.</string> + <string name="spatial_saved_views_hint">As visualizações salvas podem ser recalculadas. Inicie uma nova calibração para capturar no sistema de coordenadas de rastreamento atual.</string> + <string name="spatial_model_checksum_error">Incompatibilidade de soma de verificação do modelo de mãos</string> + <string name="spatial_opencv_load_error">OpenCV não pôde carregar</string> + <string name="tracking_recovery_look">Olhe ao redor lentamente em um ambiente bem iluminado.\nMantenha as câmeras de rastreamento desobstruídas e voltadas para móveis ou outros detalhes visíveis.</string> +</resources> diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml new file mode 100644 index 0000000000..d1ea591791 --- /dev/null +++ b/app/src/main/res/values-ro/strings.xml @@ -0,0 +1,2921 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Grafica SteamVR s-a oprit</string> + <string name="steamvr_recovery_countdown">DroidDeck va reporni în %1$d s pentru a reseta grafica și a redeschide SteamVR. Jocul care rulează se va închide; progresul nesalvat nu poate fi recuperat.</string> + <string name="steamvr_recovery_repeated">Eroarea grafică a revenit după o repornire recentă. Recuperarea automată este pusă pe pauză pentru a evita o buclă. Repornirea va închide jocul; progresul nesalvat nu poate fi recuperat.</string> + <string name="steamvr_recovery_restart">Repornește acum</string> + <string name="steamvr_recovery_cancel">Lasă deschis</string> + <string name="steamvr_recovery_restarting">Se resetează grafica și se redeschide SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck nu a putut reporni automat. Închide complet aplicația, apoi redeschide-o.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Prima rulare descarcă Steam. Poate dura câteva minute.</item> + <item>În mod implicit, la părăsirea aplicației, Steam este pus pe pauză; continuă de unde ai rămas când te întorci.</item> + <item>Controllerul tău apare ca un gamepad Xbox 360. Altfel, folosește comenzile de pe ecran.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Prima rulare configurează desktopul. Poate dura câteva minute.</item> + <item>În mod implicit, la părăsirea aplicației, sesiunea este pusă pe pauză; continuă de unde ai rămas când te întorci.</item> + <item>Atingerea funcționează ca un touchpad: trage pentru a mișca cursorul, apasă scurt pentru a face clic.</item> + <item>Controllerul tău apare ca un gamepad Xbox 360. Altfel, folosește comenzile de pe ecran.</item> + </string-array> + <string name="session_channel">Sesiune</string> + <string name="session_channel_description">Apare cât timp o sesiune Steam sau desktop este activă</string> + <string name="session_notification">Steam este în execuție</string> + <string name="session_notification_downloads">Descărcare Steam activă</string> + <string name="session_notification_paused">Sesiune pusă pe pauză - apasă Reluare când ești pregătit</string> + <string name="resume_session">Reluare</string> + <string name="suspend_now">Suspendă acum</string> + <string name="stop_session">Oprește sesiunea</string> + <string name="frame_gen_title">Generare de cadre</string> + <string name="frame_gen_hint">Selectează modul de generare a cadrelor</string> + <string name="frame_gen_off">Dezactivat</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Adaptiv %1$d</string> + <string name="lsfg_needs_steam">Necesită Lossless Scaling pe Steam</string> + <string name="lsfg_needs_install">Instalează Lossless Scaling în Steam sau importă Lossless.dll</string> + <string name="lsfg_import">Importă Lossless.dll…</string> + <string name="lsfg_using_steam">Se folosește copia din Steam</string> + <string name="lsfg_using_import">Se folosește o copie importată</string> + <string name="lsfg_pick_title">Alege Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll importat</string> + <string name="lsfg_import_unchanged">Acest Lossless.dll este deja în uz</string> + <string name="lsfg_import_not_owned">Lossless Scaling nu este deținut pe acest cont Steam</string> + <string name="lsfg_import_invalid">Acest fișier nu este Lossless.dll al Lossless Scaling</string> + <string name="lsfg_import_failed">Nu s-a putut pregăti LSFG din acest Lossless.dll</string> + <string name="lsfg_problem_missing">LSFG are nevoie de Lossless Scaling din Steam sau de un Lossless.dll importat</string> + <string name="lsfg_problem_failed">LSFG nu a putut pregăti shaderele din Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: neacceptat</string> + <string name="hud_fg_failed">%1$s: motor eșuat</string> + <string name="hud_fg_needs_lossless">%1$s: necesită Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · se pornește</string> + <string name="second_library_import_hint">Adaugă o bibliotecă Steam și o scanează pentru jocuri Windows. Jocurile deținute folosesc intrările lor Steam; restul devin comenzi rapide non-Steam.</string> + <string name="game_env_title">Mediu de joc</string> + <string name="game_env_hint">Variabile de mediu pentru jocurile Proton.</string> + <string name="game_env_edit">Editează</string> + <string name="game_env_shared">Toate jocurile Proton</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">ID-ul aplicației Steam</string> + <string name="game_env_open">Deschide</string> + <string name="game_env_profile">Jocul %1$s</string> + <string name="game_env_add">Adaugă variabilă</string> + <string name="game_env_name">Nume variabilă</string> + <string name="game_env_value">Valoare</string> + <string name="game_env_save">Salvează</string> + <string name="game_env_remove">Elimină</string> + <string name="game_env_restore">Moștenește din nou</string> + <string name="game_env_reset">Șterge toate suprascrierile de mediu</string> + <string name="game_env_unset">Dezactivează pentru acest profil</string> + <string name="game_env_empty">Nicio variabilă definită.</string> + <string name="game_env_inherited">Moștenită</string> + <string name="game_env_custom">Variabilă personalizată</string> + <string name="game_env_error">Nu s-a putut încărca sau salva. Verifică spațiul de stocare liber și încearcă din nou.</string> + <string name="game_env_invalid">Folosește un nume valid și o valoare de cel mult 8192 de caractere.</string> + <string name="game_env_unused">Mediul de execuție Proton standard nu citește această variabilă.</string> + <string name="game_env_loading">Se încarcă…</string> + <string name="game_env_feature">Suprascrierea nivelului de funcții D3D12. 12_2 raportează capabilitățile DirectX 12 Ultimate; funcțiile neacceptate pot eșua. Lasă nesetat pentru detectare automată.</string> + <string name="game_env_shader">Suprascrierea modelului de shadere D3D12. 6_9 necesită un VKD3D suficient de recent și funcții GPU corespunzătoare. Lasă nesetat pentru detectare automată.</string> + <string name="game_env_cache">Păstrează memorarea în cache a shaderelor Mesa activată pentru a reduce compilarea repetată. false activează memorarea în cache.</string> + <string name="game_env_cache_size">Dimensiunea maximă a cache-ului de shadere Mesa, de exemplu 1G. Cache-urile mai mari folosesc mai mult spațiu de stocare.</string> + <string name="game_env_vkd3d_config">Opțiuni VKD3D pentru D3D12. nodxr dezactivează ray tracing-ul; folosește doar pentru un joc care are nevoie de el.</string> + <string name="game_env_proton_log">Setează la 1 pentru un jurnal de diagnosticare Proton. Înregistrarea poate reduce performanța și folosește spațiu de stocare.</string> + <string name="game_env_wined3d">Setează la 1 pentru a folosi WineD3D bazat pe OpenGL în locul DXVK, pentru testarea compatibilității D3D9–11.</string> + <string name="game_env_no_ntsync">Setează la 1 pentru a păstra acest joc în afara ntsync (droiddeck-ntsync sau un driver de kernel); folosește droiddeck-esync unde există un pachet, altfel droiddeck-fsync.</string> + <string name="game_env_no_esync">Setează la 1 pentru a dezactiva droiddeck-esync pentru acest joc; folosește în schimb droiddeck-fsync, sau droiddeck-ntsync unde fsync este dezactivat și el.</string> + <string name="game_env_no_fsync">Setează la 1 pentru a păstra acest joc în afara droiddeck-fsync; folosește droiddeck-esync unde există un pachet, altfel droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Setează la 1 pentru a rula acest joc pe droiddeck-fsync, sau la 0 pentru a pune droiddeck-esync primul unde un pachet se potrivește cu Proton-ul său.</string> + <string name="game_env_xalia">Setează la 0 pentru a dezactiva asistentul de navigare cu gamepad al Proton pentru acest joc.</string> + <string name="game_env_hud">Suprapunere DXVK pentru D3D9–11. fps afișează rata de cadre; nesetat o ascunde.</string> + <string name="game_env_dxvk_config">Setări DXVK separate prin punct și virgulă. Versiunile recente folosesc dxvk.maxFrameRate pentru limitarea cadrelor; preferă limitatorul de cadre al sesiunii pentru joc obișnuit.</string> + <string name="game_env_vkd3d_limit">Limita ratei de cadre D3D12. 0 dezactivează limita.</string> + <string name="game_env_glthread">Procesarea pe fire a Mesa OpenGL. true poate ajuta jocurile OpenGL limitate de CPU; testează pentru fiecare joc.</string> + <string name="sync_backend_title">Sincronizare Wine</string> + <string name="sync_backend_hint">Modul în care jocurile își sincronizează firele. Se aplică la sesiunea următoare.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Preset FEX</string> + <string name="fex_next_launch">Se aplică la următoarea lansare a jocului.</string> + <string name="game_settings_title">Jocuri</string> + <string name="fex_default_label">Valori implicite FEX</string> + <string name="fex_default_detail">Folosește valorile implicite FEX.</string> + <string name="fex_stability_label">Stabilitate</string> + <string name="fex_stability_detail">Setările cele mai sigure, dar cele mai lente.</string> + <string name="fex_compatibility_label">Compatibilitate</string> + <string name="fex_compatibility_detail">TSO complet cu multiblock.</string> + <string name="fex_intermediate_label">Intermediar</string> + <string name="fex_intermediate_detail">TSO echilibrat cu precizie x87 redusă.</string> + <string name="fex_performance_label">Performanță</string> + <string name="fex_performance_detail">TSO complet dezactivat; multiblock.</string> + <string name="fex_performance_tso_label">Performanță + TSO</string> + <string name="fex_performance_tso_detail">Setările de performanță cu TSO principal activat.</string> + <string name="fex_extreme_label">Extrem</string> + <string name="fex_extreme_detail">Dezactivează verificările de cod auto-modificabil. Jocurile JIT și DRM-ul pot să nu mai funcționeze.</string> + <string name="fex_extreme_tso_label">Extrem + TSO</string> + <string name="fex_extreme_tso_detail">Setările extreme cu TSO principal activat.</string> + <string name="fex_extreme_gn_label">Extreme-gn</string> + <string name="fex_extreme_gn_detail">Performanță cu indicii TSC și metadate. Încearcă înainte de Extrem.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Performanță cu verificări complete de cod și bitul de hipervizor ascuns.</string> + <string name="game_env_custom_value">Valoare personalizată</string> + <string name="game_env_select_value">Selectează valoarea</string> + <string name="user_apps_section">Emulatoare & aplicații</string> + <string name="user_apps_add">Adaugă</string> + <string name="user_apps_add_detail">Propria ta aplicație sau joc</string> + <string name="user_apps_kind_script">Script</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Se pornește…</string> + <string name="user_apps_added">%1$s adăugat</string> + <string name="user_apps_removed">%1$s eliminat</string> + <string name="user_apps_back">Desktop</string> + <string name="user_apps_gone">Aplicația nu mai există. Alege-o din nou din Desktop.</string> + <string name="user_apps_open">Deschide %1$s</string> + <string name="user_apps_remove">Elimină</string> + <string name="user_apps_remove_confirm">Apasă din nou pentru a elimina</string> + <string name="user_apps_stop_session">Oprește sesiunea pentru a elimina</string> + <string name="user_apps_script_linked">Rulează %1$s din folderul său, conectat în sesiune acolo unde se află. Eliminarea aplicației nu afectează acel folder.</string> + <string name="user_apps_script_copied">Rulează %1$s dintr-o copie a folderului său din DroidDeck. Eliminarea aplicației șterge copia, nu originalul.</string> + <string name="user_apps_runtime_required">Instalează mai întâi mediul de execuție Linux</string> + <string name="user_apps_file_gone">Fișierul nu mai există</string> + <string name="user_apps_no_space">Spațiu liber insuficient: copierea folderului necesită %1$s</string> + <string name="user_apps_copying">Se copiază %1$s</string> + <string name="user_apps_failed">Adăugarea aplicației a eșuat</string> + <string name="user_apps_github_checking">Se caută o versiune a %1$s</string> + <string name="user_apps_github_unreachable">Nu s-au putut citi versiunile %1$s</string> + <string name="user_apps_github_no_appimage">Niciuna dintre versiunile %1$s nu are un AppImage ARM64 sau x86_64</string> + <string name="user_apps_downloading">Se descarcă %1$s</string> + <string name="user_apps_download_failed">Descărcarea a eșuat</string> + <string name="user_apps_update_failed">Actualizarea aplicației a eșuat</string> + <string name="user_apps_icon_failed">Acea iconiță nu a putut fi citită</string> + <string name="user_apps_saved">%1$s salvat</string> + <string name="user_apps_edit">Editează</string> + <string name="user_apps_check_updates">Verifică actualizările</string> + <string name="user_apps_checking_updates">Se verifică actualizările…</string> + <string name="user_apps_update_to">Actualizează la %1$s</string> + <string name="user_apps_up_to_date">Actualizat · %1$s</string> + <string name="user_apps_updated">%1$s actualizat</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Adaugă o aplicație</string> + <string name="add_app_tab_script">Script</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Un fișier .sh. Rulează din propriul folder, pe tot ecranul, sub gamescope.</string> + <string name="add_app_appimage_hint">Un AppImage ARM64 (aarch64), sau unul x86_64 care rulează prin FEX. Este despachetat o singură dată în mediul de execuție Linux.</string> + <string name="add_app_github_hint">Instalează AppImage-ul ARM64 din cea mai recentă versiune a depozitului, sau pe cel x86_64 prin FEX.</string> + <string name="app_fex_title">Folosește FEX</string> + <string name="app_fex_auto">Automat</string> + <string name="app_fex_on">Activat</string> + <string name="app_fex_off">Dezactivat</string> + <string name="app_fex_hint">FEX rulează programe Linux x86 pe acest dispozitiv ARM64. Automat îl folosește atunci când programul este compilat pentru x86.</string> + <string name="app_fex_x86">%1$s prin FEX</string> + <string name="app_fex_not_ready">Acest program este compilat pentru PC-uri %1$s și rulează prin FEX, care nu este încă configurat. Deschide Steam o dată, fiind autentificat: DroidDeck îl pune să descarce FEX și Steam Linux Runtime de care are nevoie, apoi acesta se deschide.</string> + <string name="session_end_program">Acest program</string> + <string name="session_end_fex_missing">%1$s este compilat pentru PC-uri x86 și rulează prin FEX, care nu este încă instalat. Pornește Steam o dată, fiind autentificat, și lasă-l să descarce FEX și Steam Linux Runtime, apoi pornește din nou acesta.</string> + <string name="add_app_flatpak_hint">Un ID de aplicație Flathub sau pagina sa Flathub. Flatpak este configurat mai întâi, dacă nu este deja.</string> + <string name="add_app_file">Fișier</string> + <string name="add_app_no_file">Niciun fișier ales</string> + <string name="add_app_choose_file">Alege fișierul</string> + <string name="add_app_change_file">Schimbă</string> + <string name="add_app_pick_script">Alege un script</string> + <string name="add_app_pick_appimage">Alege un AppImage</string> + <string name="add_app_pick_icon">Alege o iconiță</string> + <string name="add_app_repository">Depozit</string> + <string name="add_app_repository_placeholder">proprietar/depozit sau un link github.com</string> + <string name="add_app_repository_invalid">Nu este un depozit GitHub</string> + <string name="add_app_flatpak_id">ID aplicație</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Nu este un ID de aplicație Flathub</string> + <string name="add_app_flatpak_bundle_hint">Sau un fișier .flatpak, pentru o aplicație care nu este pe Flathub.</string> + <string name="add_app_pick_flatpak">Alege un fișier .flatpak</string> + <string name="add_app_source">Sursă</string> + <string name="add_app_appearance">Pe Desktopul tău</string> + <string name="add_app_preview_name">Aplicație nouă</string> + <string name="add_app_name">Nume</string> + <string name="add_app_name_placeholder">Din aplicație</string> + <string name="add_app_icon">Iconiță</string> + <string name="add_app_icon_default">Iconiță implicită</string> + <string name="add_app_choose_icon">Alege iconița</string> + <string name="add_app_clear_icon">Șterge</string> + <string name="add_app_icon_suggestions">Din depozit</string> + <string name="add_app_icon_searching">Se caută iconițe…</string> + <string name="add_app_icon_reset">Implicit</string> + <string name="edit_app_title">Editează %1$s</string> + <string name="edit_app_save">Salvează</string> + <string name="add_app_checking_folder">Se verifică folderul…</string> + <string name="add_app_folder_linked">Folderul său este conectat în sesiune: %1$s</string> + <string name="add_app_folder_copied">Folderul său conține programe Linux, pe care stocarea partajată nu le poate rula, așa că este copiat în DroidDeck (%1$s).</string> + <string name="add_app_confirm">Adaugă</string> + <string name="add_app_cancel">Anulează</string> + <string name="add_app_runtime_required">Instalează mai întâi mediul de execuție Linux din Configurare.</string> + <string name="add_app_busy">Așteaptă până se termină %1$s.</string> + <string name="steam_compat_label">Compatibil</string> + <string name="proton_compatible_note">Versiunile marcate „%1$s” din meniul Compatibilitate al Steam au remedierile de prefix ale DroidDeck și pornesc jocuri aici. Cea implicită este Proton Experimental ARM64 (%1$s), sau Proton 11.0 ARM64 (%1$s) după ce acea versiune mai nouă este instalată. Intrările Proton proprii ale Valve, fără marcaj, nu pot porni un joc pe acest dispozitiv.</string> + <string name="proton_installed_compatible">Instalat %1$s · %2$s</string> + <string name="common_cancel">Anulează</string> + <string name="common_auto">Automat</string> + <string name="common_never">Niciodată</string> + <string name="common_always">Întotdeauna</string> + <string name="common_uninstall">Dezinstalează</string> + <string name="common_check">Verifică</string> + <string name="common_update">Actualizează</string> + <string name="common_checking">Se verifică…</string> + <string name="common_working">Se procesează…</string> + <string name="common_forget">Uită</string> + <string name="common_add_ellipsis">Adaugă…</string> + <string name="common_use">Folosește</string> + <string name="common_applies_next_session">Se aplică la sesiunea următoare.</string> + <string name="mode_steam_title">Sesiune Steam</string> + <string name="mode_desktop_title">Sesiune Desktop</string> + <string name="mode_display">Afișaj</string> + <string name="mode_resolution">Rezoluție</string> + <string name="mode_res_720">Până la 720p</string> + <string name="mode_res_900">Până la 900p</string> + <string name="mode_res_1080">Până la 1080p</string> + <string name="mode_res_native">Nativă</string> + <string name="mode_res_default">%1$s (implicit)</string> + <string name="mode_res_custom_value">Personalizat · %1$d×%2$d</string> + <string name="mode_res_custom">Personalizat…</string> + <string name="mode_res_note">720p poate face meniurile mai receptive.</string> + <string name="mode_ratio">Raport de ecran</string> + <string name="mode_ratio_custom">Stabilit de rezoluția personalizată.</string> + <string name="mode_ratio_auto">Automat folosește cel puțin 16:9.</string> + <string name="mode_fps">Limită de cadre</string> + <string name="mode_fps_note">Limitează întreaga sesiune. Afișajul trece la o rată de reîmprospătare pe care limita o împarte exact.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Ieșire HDR10</string> + <string name="mode_hdr_unavailable">Indisponibil: %1$s.</string> + <string name="mode_hdr_restart">Repornește aplicația pentru a aplica.</string> + <string name="mode_drivers">Drivere</string> + <string name="mode_gpu_drivers">Drivere GPU</string> + <string name="mode_gpu_drivers_hint">Partajate de Steam și Desktop. Se stabilesc pe pagina Componente.</string> + <string name="mode_touch_controls">Atingere & comenzi</string> + <string name="mode_touch">Atingere</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Direct</string> + <string name="mode_touch_note">Automat: touchpad pe Desktop, direct în Steam.</string> + <string name="mode_osc">Comenzi pe ecran</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Automat afișează comenzile când niciun controller nu este conectat.</string> + <string name="osc_steam_touch">Atingere Steam (beta)</string> + <string name="osc_style_next_session">Comenzile tactile Steam pornesc odată cu următoarea sesiune Steam</string> + <string name="osc_steam_layout">Aranjament tactil Steam</string> + <string name="osc_steam_layout_hint">Mută, redimensionează sau ascunde comenzile tactile ale acestui joc; salvate în Steam</string> + <string name="mode_controller">Controller</string> + <string name="mode_controller_hint">Cum vede Steam controllerul tău. Se aplică la sesiunea următoare.</string> + <string name="mode_controller_deck">Controller Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Controller Xbox 360</string> + <string name="mode_controller_note">Deck: butonul Acces rapid și giroscopul. Steam Controller: la fel, cu senzori de strângere pe butoanele din spate. DualShock 4 și DualSense: giroscop, și trackpadurile ca touchpad propriu. Xbox 360: deschide Acces rapid cu Guide+A.</string> + <string name="mode_back">Înapoi</string> + <string name="back_menu_then_qam">Meniu → QAM</string> + <string name="back_qam_then_menu">QAM → Meniu</string> + <string name="mode_session">Sesiune</string> + <string name="mode_suspend">Comportament în fundal</string> + <string name="mode_suspend_hint">Când aplicația este ascunsă sau ecranul se stinge.</string> + <string name="mode_suspend_manual">Manual</string> + <string name="mode_suspend_native">Nativ</string> + <string name="mode_suspend_steam_note">Automat pune pe pauză și reia atunci când este afișată. Nativ pregătește Steam pentru repaus mai întâi. Manual așteaptă Reluare. Niciodată continuă să ruleze.</string> + <string name="mode_background_downloads">Continuă descărcările</string> + <string name="mode_background_downloads_hint">Întârzie suspendarea în fundal cât timp Steam descarcă activ.</string> + <string name="mode_zram">Compresie zRAM</string> + <string name="mode_zram_hint">În timpul jocului, memoria clientului Steam este comprimată în zram-ul dispozitivului, astfel încât jocul primește mai mult RAM. Se aplică la următoarea pornire a Steam.</string> + <string name="mode_zram_unsupported">Indisponibil: dispozitivul nu are zram sau swap, ori kernelul e mai vechi decât 5.4.</string> + <string name="mode_suspend_note">Automat pune pe pauză în fundal și reia atunci când este afișată. Manual așteaptă Reluare. Niciodată continuă să ruleze.</string> + <string name="mode_startup">Pornire</string> + <string name="mode_steam_startup">Pornește Steam odată cu DroidDeck</string> + <string name="mode_steam_startup_hint">Deschide sesiunea Steam la lansarea DroidDeck.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Se verifică versiunile…</string> + <string name="mode_decky_ready">Pregătit pentru instalarea %1$s.</string> + <string name="mode_decky_none">Nu s-a găsit o versiune compatibilă. Încearcă din nou mai târziu.</string> + <string name="mode_decky_installed">Instalat · %1$s</string> + <string name="mode_decky_update">Actualizare disponibilă · %1$s</string> + <string name="mode_decky_current">Actualizat · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Instalează cea mai recentă versiune</string> + <string name="mode_decky_on">Pornește odată cu Steam. Cât timp este activ, alte aplicații de pe acest dispozitiv pot fi capabile să controleze Steam.</string> + <string name="mode_decky_off">Dezactivat. Portul de depanare la distanță al Steam rămâne închis.</string> + <string name="mode_decky_remove_title">Dezinstalezi Decky Loader?</string> + <string name="mode_decky_remove_text">Elimină loader-ul. Pluginurile și setările tale sunt păstrate.</string> + <string name="mode_client">Client</string> + <string name="mode_mangoapp">Suprapunere de performanță</string> + <string name="mode_mangoapp_hint">Dezactivează dacă jocurile se blochează sau ecranul devine negru în modul Deck. Se aplică la sesiunea următoare.</string> + <string name="mode_steam_repair">Repară clientul Steam</string> + <string name="mode_steam_repair_hint">Descarcă din nou clientul Steam la următoarea pornire a Steam. Folosește-l dacă Steam rămâne blocat pe ecranul de încărcare. Jocurile, autentificarea și setările sunt păstrate.</string> + <string name="mode_steam_repair_queued">Clientul Steam va fi descărcat din nou la următoarea pornire a Steam.</string> + <string name="mode_steam_repair_button">Repară</string> + <string name="mode_added_art">Grafică</string> + <string name="mode_sgdb_key">Cheie API SteamGridDB</string> + <string name="mode_sgdb_key_yours">Cheia ta</string> + <string name="mode_sgdb_edit">Editează…</string> + <string name="mode_added_art_hint">Completează grafica lipsă din Steam, apoi din SteamGridDB. Propriile tale cover.jpg, hero.jpg, logo.png sau icon.png din folderul jocului au prioritate.</string> + <string name="summary_remove_game">Elimină %1$s</string> + <string name="mode_added_remove_confirm">Elimini?</string> + <string name="games_add">Adaugă joc</string> + <string name="games_add_title">Adaugă un joc:</string> + <string name="games_pick_exe_title">Alege fișierul exe:</string> + <string name="games_add_unreachable">Această locație nu este disponibilă în sesiune</string> + <string name="mode_added_exe_check">Verifică acest exe</string> + <string name="wincomp_title">Componente Windows</string> + <string name="wincomp_pad_hint">LB / RB trec între secțiuni.</string> + <string name="wincomp_card_none">Niciuna</string> + <string name="wincomp_applies">DLL-uri Windows pe care Proton nu le include, din lista de componente. Activează-le pe cele de care are nevoie acest joc: se adaugă în folderul Windows propriu al jocului, niciodată în fișierele sale, și rămân indiferent pe ce Proton rulează.</string> + <string name="wincomp_offline">Lista de componente nu a putut fi accesată. Componentele deja descărcate pot fi în continuare comutate.</string> + <string name="wincomp_recommended">Recomandate pentru acest joc</string> + <string name="wincomp_checking">Se verifică de ce are nevoie acest joc…</string> + <string name="wincomp_when_online">Disponibil când ești online</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Se activează %1$d componentă…</item> + <item quantity="few">Se activează %1$d componente…</item> + <item quantity="other">Se activează %1$d de componente…</item> + </plurals> + <string name="wincomp_auto_section">Activ pentru acest joc</string> + <string name="wincomp_auto_steam">Steam instalează %1$s cu %2$s (aplicația %3$s)</string> + <string name="wincomp_auto_gog">Din lista GOG pentru acest joc</string> + <string name="wincomp_auto_epic">Din cerințele preliminare Epic pentru acest joc</string> + <string name="wincomp_auto_amazon">Din pașii de instalare Amazon pentru acest joc</string> + <string name="wincomp_steam_by_name">Steam instalează %1$s cu aplicația %2$s, potrivită după nume</string> + <string name="wincomp_suggestions">De asemenea, listate</string> + <string name="wincomp_suggestion_reason">Listată de %1$s; nu este o componentă aici</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Jocul include %1$s</string> + <string name="wincomp_found_shipped">Jocul are %1$s (funcționează de obicei ca atare)</string> + <string name="wincomp_already_here">Deja prezentă în acest joc</string> + <string name="wincomp_no_recommendation">Nimic din folderul jocului nu indică o componentă.</string> + <string name="wincomp_active">Instalate pentru acest joc (%1$d)</string> + <string name="wincomp_all">Toate componentele (%1$d)</string> + <string name="wincomp_installers">Necesită un program de instalare Windows (%1$d)</string> + <string name="wincomp_installers_note">Acestea sunt propriile lor programe de instalare, fără pachet în interior de despachetat, și fără o înregistrare a ceea ce instalează încă. Majoritatea sunt medii de execuție vechi pe care Mono din Proton le înlocuiește deja; înregistrările sunt adăugate pe măsură ce sunt create.</string> + <string name="wincomp_show">Arată</string> + <string name="wincomp_hide">Ascunde</string> + <string name="wincomp_needs_installer">Rulează propriul program de instalare (fără înregistrare încă)</string> + <string name="wincomp_unsupported">Neacceptat încă aici</string> + <string name="wincomp_loading">Se încarcă componentele…</string> + <string name="wincomp_failed">Nu s-a putut instala: %1$s</string> + <string name="wincomp_downloaded">Descărcat</string> + <string name="wincomp_downloading">Se descarcă %1$s</string> + <string name="wincomp_installing">Se instalează: %1$s</string> + <string name="wincomp_reverting">Se dezactivează…</string> + <string name="wincomp_download_size">Descărcare de %1$s</string> + <string name="wincomp_next_launch">Are efect la următoarea pornire a jocului.</string> + <string name="mode_stretch169">Întinde jocurile 16:9</string> + <string name="mode_stretch169_hint">Pe ecrane mai pătrate decât 16:9, întinde jocurile pentru a umple ecranul, în loc să arate benzi. Se aplică la sesiunea următoare.</string> + <string name="mode_audio">Sunet</string> + <string name="mode_directaudio">DirectAudio pentru jocuri</string> + <string name="mode_directaudio_hint">Evită PulseAudio pentru o latență mai mică.</string> + <string name="mode_mic">Microfon</string> + <string name="mode_mic_hint">Pentru chat vocal.</string> + <string name="mode_network">Rețea</string> + <string name="mode_wifi_discovery">Descoperire Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Arată numele rețelelor Wi-Fi și rețelele din apropiere în Steam.</string> + <string name="mode_wifi_location_off">Serviciile de localizare sunt dezactivate.</string> + <string name="mode_wifi_permission_denied">Permisiunea de localizare nu a fost acordată.</string> + <string name="mode_wifi_open_settings">Deschide setările</string> + <string name="mode_wifi_continue">Continuă</string> + <string name="mode_wifi_explain_title">Activezi descoperirea Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android necesită permisiunea de localizare pentru a citi numele rețelelor Wi-Fi și a descoperi rețelele din apropiere. DroidDeck folosește acest acces pentru a arăta acele rețele în Steam. Nu îți urmărim locația. Accesul la internet funcționează și fără această permisiune.</string> + <string name="mode_storage">Stocarea jocurilor</string> + <string name="mode_storage_auto">Automat - cardul SD când este prezent, plus folderele tale Games</string> + <string name="mode_storage_auto_none">Automat - folderele tale Games, plus cardul SD când este prezent (niciunul acum)</string> + <string name="mode_storage_internal">Doar internă</string> + <string name="mode_storage_folder">Folder: %1$s</string> + <string name="mode_second_library">A doua bibliotecă</string> + <string name="mode_storage_note">Jocurile care transmit fișiere de pe SD sau din stocarea partajată pot avea sacadări.</string> + <string name="mode_storage_diagnostics">Diagnosticare stocare</string> + <string name="mode_storage_diagnostics_hint">Înregistrează rezultatele alocărilor și timpii de stocare eșantionați în Partajare jurnale. Poate încetini instalările cât este activă. Se aplică la sesiunea următoare.</string> + <string name="mode_choose_folder">Alege un folder…</string> + <string name="mode_custom_res_title">Rezoluție personalizată</string> + <string name="mode_custom_res_text">Înlocuiește limita și raportul. O dimensiune care nu se potrivește cu ecranul primește benzi.</string> + <string name="mode_width">Lățime</string> + <string name="mode_height">Înălțime</string> + <string name="mode_custom_res_range">Între 320×240 și 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d joc</item> + <item quantity="few">%1$d jocuri</item> + <item quantity="other">%1$d de jocuri</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Șterge</string> + <string name="common_restore">Restaurează</string> + <string name="common_download">Descarcă</string> + <string name="common_delete_named">Șterge %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Driver pentru mediul de execuție</string> + <string name="comp_runtime_driver_hint">Folosit de Steam, jocuri și desktop. Se aplică la sesiunea următoare.</string> + <string name="comp_import_turnip">Importă arhiva Turnip…</string> + <string name="comp_display_driver">Driver de afișaj</string> + <string name="comp_display_driver_hint">Desenează cadrele pe ecran în ambele moduri. Repornește aplicația pentru a aplica.</string> + <string name="comp_import_adrenotools">Importă o arhivă AdrenoTools…</string> + <string name="comp_never">niciodată</string> + <string name="comp_nightlies_checked">Versiunile nightly verificate %1$s</string> + <string name="comp_title">Componente</string> + <string name="comp_about">Despre Componente</string> + <string name="comp_check_drivers">Verifică drivere noi</string> + <string name="comp_check_nightlies">Verifică versiunile nightly pentru pachete noi</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Proton-ul ales aici rulează orice joc care nu și-a ales propriul în Steam, și o modificare făcută în Steam apare și aici. Steam înlocuiește Proton-ul Valve la actualizare; originalele sunt păstrate pentru fiecare versiune.</string> + <string name="comp_scope">Configurare</string> + <string name="comp_profile_configure">Configurează profilul</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Profil implicit</string> + <string name="comp_scope_general_detail">Folosit automat de jocurile fără suprascrieri.</string> + <string name="comp_profile_game_detail">Setări salvate, folosite automat la lansarea %1$s.</string> + <string name="comp_game_hint">Alege doar setările de care are nevoie acest joc. Tot restul continuă să folosească profilul implicit.</string> + <string name="comp_game_fex">Preset FEX</string> + <string name="comp_game_fex_inherited">Se folosește presetul profilului implicit.</string> + <string name="comp_game_fex_override">Preset personalizat salvat pentru acest joc.</string> + <string name="comp_game_fex_custom">Variabile FEX personalizate</string> + <string name="comp_game_use_general">Folosește implicit</string> + <string name="comp_game_compatibility">Compatibilitatea jocului</string> + <string name="comp_game_environment_hint">Opțiuni de mediu Proton, DXVK, VKD3D și sincronizare pentru acest joc.</string> + <string name="comp_game_proton_inherited">Se folosește Proton-ul profilului implicit.</string> + <string name="comp_game_proton_override">Proton personalizat salvat pentru acest joc prin maparea de compatibilitate Steam.</string> + <string name="comp_no_proton_short">Fără Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Folosește pachetul profilului implicit din %1$s, dacă acest joc nu selectează alt pachet.</string> + <string name="comp_game_component_general">Folosește pachetul de componente al profilului implicit.</string> + <string name="comp_game_component_override">Folosește %1$s doar pentru acest joc.</string> + <string name="comp_game_runtime_options">Opțiuni pentru mediul de execuție</string> + <string name="comp_game_environment_other_hint">Alte opțiuni de mediu Proton, DXVK, VKD3D-Proton și sincronizare, per joc.</string> + <string name="comp_game_saved_next">Profilul %1$s este salvat pentru următoarea lansare a jocului.</string> + <string name="game_no_steam_title">Pornește fără Steam</string> + <string name="game_no_steam_detail">Îl deschide în Proton/FEX fără clientul Steam; funcțiile Steam sunt oprite.</string> + <string name="game_no_steam_on">Activat</string> + <string name="game_steam_with">Pornește cu Steam</string> + <string name="game_steam_without">Pornește fără Steam</string> + <string name="game_settings_card">Setări</string> + <string name="game_settings_menu_title">Setări %1$s</string> + <string name="game_settings_default">Implicit</string> + <string name="game_settings_default_detail">Readuce tot ce s-a schimbat pentru acest joc la setările aplicației.</string> + <string name="game_sync_custom">Variabile de sincronizare personalizate</string> + <string name="comp_game_proton_live">Alegerea Proton pentru %1$s este salvată și disponibilă în Steam acum.</string> + <string name="comp_game_proton_next">Alegerea Proton pentru %1$s este salvată. Repornește Steam înainte de a lansa jocul.</string> + <string name="comp_game_proton_not_runnable">%1$s nu poate folosi Proton-ul selectat pe acest dispozitiv.</string> + <string name="comp_game_load_failed">Profilul %1$s nu a putut fi încărcat: %2$s</string> + <string name="comp_game_save_failed">Profilul jocului nu a putut fi salvat: %1$s</string> + <string name="comp_game_reset">Resetează profilul jocului</string> + <string name="comp_game_reset_title">Resetezi profilul %1$s?</string> + <string name="comp_game_reset_body">Elimini suprascrierile Proton, FEX, pachet de componente, mediu, filtrare de texturi și componente Windows ale acestui joc? Va folosi profilul implicit.</string> + <string name="comp_game_reset_done">%1$s folosește acum profilul implicit.</string> + <string name="comp_game_reset_failed">Profilul jocului nu a putut fi resetat complet: %1$s</string> + <string name="comp_default_live">%1$s rulează acum orice joc care nu și-a ales propriul Proton în Steam.</string> + <string name="comp_default_next">%1$s va rula orice joc care nu și-a ales propriul Proton, de la următoarea pornire a Steam.</string> + <string name="comp_default_not_runnable">%1$s nu poate porni jocuri aici, așa că nu poate fi implicit.</string> + <string name="comp_default_failed">Proton-ul implicit nu a putut fi salvat: %1$s</string> + <string name="comp_swapped">%1$s · %2$d schimbate</string> + <string name="comp_all_original">%1$s · toate originale</string> + <string name="comp_game_running_suffix">%1$s · joc în execuție</string> + <string name="comp_esync_pack">%1$s · pachet droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · niciun pachet droiddeck-esync încă</string> + <string name="comp_esync_builtin">%1$s · esync integrat, nu necesită pachet</string> + <string name="comp_gpu_drivers">Drivere GPU</string> + <string name="comp_reapplied">%1$s · reaplicat la pornirea %2$s</string> + <string name="comp_next_queued">Următorul: %1$s · după ce jocul se închide</string> + <string name="comp_in_use">%1$s în uz: %2$s</string> + <string name="comp_waits">Așteaptă până se închide jocul</string> + <string name="comp_applies_next_game">Se aplică la următoarea pornire a unui joc</string> + <string name="comp_import_zip">Importă .zip</string> + <string name="comp_reading">Se citesc versiunile Proton…</string> + <string name="comp_no_proton">Niciun Proton instalat încă. Pornește Steam o dată pentru a descărca Proton-ul său ARM64, sau adaugă GE-Proton, CachyOS sau DroidDeck-Proton din Configurare.</string> + <string name="comp_original">Original · %1$s</string> + <string name="comp_this_build">%1$s · această versiune</string> + <string name="comp_earlier_build">%1$s · versiune anterioară</string> + <string name="comp_installed_count">Instalate · %1$d</string> + <string name="comp_nothing_stored">Nimic salvat pentru %1$s încă. Fișierele proprii ale acestui Proton sunt salvate ca original al lui.</string> + <string name="comp_waits_long">Un joc rulează pe acest Proton, așa că aceasta așteaptă până se închide.</string> + <string name="comp_applies_long">Se aplică la următoarea pornire a unui joc.</string> + <string name="comp_swap_title">Schimbi %1$s?</string> + <string name="comp_swap_body">Pui %1$s în %2$s? Fișierele sale originale rămân salvate. %3$s</string> + <string name="comp_restore_title">Restaurezi %1$s?</string> + <string name="comp_restore_body">Pui originalul %1$s înapoi în %2$s? %3$s</string> + <string name="comp_delete_package_body">Elimină pachetul din aplicație. Îl poți descărca din nou.</string> + <string name="comp_delete_original_title">Ștergi acest original?</string> + <string name="comp_delete_original_body">Acest original %1$s este dintr-o versiune anterioară a %2$s. Originalul versiunii curente este păstrat mereu.</string> + <string name="comp_nightlies_count">Pe versiunile nightly · %1$d</string> + <string name="comp_refresh_to_list">Reîmprospătează pentru a lista pachetele de pe versiunile nightly.</string> + <string name="comp_nothing_new">Nimic nou de la ultima verificare.</string> + <string name="comp_import_wcp">Importă .wcp</string> + <string name="comp_restore_original">Restaurează originalul acestui Proton</string> + <string name="comp_restore_original_body">Pui originalul %1$s al %2$s înapoi?</string> + <string name="comp_swap">Schimbă</string> + <string name="comp_about_text">FEX, DXVK și VKD3D-Proton pentru fiecare Proton cu care Steam rulează jocuri.\n\nSelectează un rând instalat pentru a-l pune în uz. Se aplică la următoarea pornire a unui joc, sau după ce jocul în execuție se închide.\n\nAlegerile tale sunt reverificate înainte de fiecare lansare și puse înapoi dacă ceva le-a schimbat. Fișierele originale ale fiecărui Proton sunt păstrate, așa că actualizările Steam nu le pierd niciodată.</string> + <string name="comp_tag_original">Original</string> + <string name="comp_tag_in_use">În uz</string> + <string name="comp_tag_new">Nou</string> + <string name="comp_tag_stored">Salvat</string> + <string name="perf_title">Performanță</string> + <string name="perf_lede">Nuclee CPU, remedieri de sesiune și numele hostului. Se aplică la sesiunea următoare.</string> + <string name="perf_client_cores_group">Nuclee pentru clientul Steam</string> + <string name="perf_override">Suprascrie alegerea de nuclee a Steam</string> + <string name="perf_override_hint">Fixează Steam, asistentul său de interfață și gamescope pe nucleele de mai jos.</string> + <string name="perf_client_cores">Nuclee pentru client</string> + <string name="perf_client_cores_on">Nuclee pentru Steam.</string> + <string name="perf_client_cores_off">Activează suprascrierea pentru a alege.</string> + <string name="perf_game_cores_group">Nuclee pentru joc</string> + <string name="perf_game_cores">Nuclee pentru joc</string> + <string name="perf_game_cores_hint">Nuclee pentru jocuri. Cu toate selectate, Android le programează liber.</string> + <string name="perf_client_ui">Interfața clientului</string> + <string name="perf_glthread">GL pe fire</string> + <string name="perf_glthread_hint">Poate face meniurile Steam mai receptive.</string> + <string name="perf_zink">Zink: descriptori leneși</string> + <string name="perf_zink_hint">Recomandat pentru drivere fără buffere de descriptori.</string> + <string name="perf_noglerror">Omite verificările de erori GL</string> + <string name="perf_noglerror_hint">Dezactivează validarea GL pentru fiecare apel.</string> + <string name="perf_gsrealtime">gamescope: coadă GPU în timp real</string> + <string name="perf_gsrealtime_hint">Prioritizează lucrul GPU al compositorului. Poate netezi ritmul cadrelor, cu un cost pentru jocuri.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Fixează GPU-ul la frecvența maximă</string> + <string name="perf_gpuclock_hint">Doar Adreno. Mai puține întreruperi, consum mai mare de baterie și căldură.</string> + <string name="perf_fixes">Remedieri de sesiune</string> + <string name="perf_sysmem">Turnip: randare sysmem</string> + <string name="perf_sysmem_hint">Mai rapidă pentru Steam și majoritatea jocurilor. Necesară pe Adreno 710/720/722.</string> + <string name="perf_xalia">Omite asistentul xalia al Steam</string> + <string name="perf_fastsync">droiddeck-ntsync (experimental)</string> + <string name="perf_fastsync_hint">Un substitut la nivel de utilizator pentru driverul Linux ntsync, pentru testare. Cât timp este activ, Proton îl folosește în locul droiddeck-esync și droiddeck-fsync. Funcționează cu Proton Experimental ARM64, GE-Proton și proton-cachyos. Se aplică la sesiunea următoare.</string> + <string name="perf_esync">droiddeck-esync</string> + <string name="perf_fsync">droiddeck-fsync primul</string> + <string name="perf_fsync_hint">Rulează propriul fsync al Proton pe fișierele Proton standard, cu futex_waitv furnizat la nivel de utilizator, deci nu are nevoie de pachet și continuă să funcționeze imediat ce Steam actualizează Proton. Cât timp este activ, jocurile îl folosesc înaintea droiddeck-esync, cu excepția celor puține pe care Proton le ține în afara fsync. Se aplică la sesiunea următoare.</string> + <string name="perf_esync_hint">Firele Windows ale jocurilor se așteaptă unele pe altele prin eventfd și memorie partajată, în loc de drumuri dus-întors prin wineserver. Folosește un pachet droiddeck-esync creat pentru exact acea versiune de Proton; pachetele sunt obținute automat. Până când există unul pentru o versiune nouă de Proton, droiddeck-fsync îl înlocuiește. Se aplică la sesiunea următoare.</string> + <string name="perf_xalia_hint">Dezactivează asistentul de navigare cu gamepad al Proton, care costă CPU în fiecare joc.</string> + <string name="perf_seccomp">Rulează proot fără seccomp</string> + <string name="perf_seccomp_hint">Poate remedia erori de apel de sistem lipsă pe unele kernel-uri. Poate reduce performanța.</string> + <string name="perf_fastpath">Cale rapidă proot</string> + <string name="perf_fastpath_needs_seccomp">Necesită filtrul seccomp al proot.</string> + <string name="perf_fastpath_hint">Căutări de fișiere mai rapide și mai puține sacadări. Dezactivează dacă un program nu își găsește fișierele.</string> + <string name="perf_identity">Identitatea sesiunii</string> + <string name="perf_hostname">Nume de host</string> + <string name="perf_hostname_hint">Numele pe care Steam îl vede pentru acest dispozitiv. Gol restaurează %1$s.</string> + <string name="perf_hostname_invalid">Doar litere, cifre și liniuțe interioare, până la 63 de caractere.</string> + <string name="perf_phantom_warning">Android este setat să închidă această sesiune</string> + <string name="driver_installed">Instalat</string> + <string name="driver_available">Disponibil pentru descărcare</string> + <string name="driver_nothing_new">Nimic nou de la ultima verificare.</string> + <string name="driver_restore_builtin">Restaurează driverele integrate</string> + <string name="driver_delete_builtin">Integrat în aplicație: aceasta elimină fișierele sale despachetate și îl ascunde. Restaurează driverele integrate îl readuce.</string> + <string name="driver_delete_bundle">Jumătate dintr-un pachet Android + Linux: ambele jumătăți sunt eliminate. Un driver în uz revine la cel implicit.</string> + <string name="driver_delete_plain">Fișierele sale sunt eliminate din aplicație.</string> + <string name="driver_delete_in_use">Fișierele sale sunt eliminate. Este în uz, așa că cel implicit îi ia locul.</string> + <string name="drawer_page_display">Afișaj</string> + <string name="drawer_page_effects">Efecte</string> + <string name="drawer_page_controls">Comenzi</string> + <string name="drawer_page_components">Componente</string> + <string name="drawer_page_controller">Controller</string> + <string name="drawer_page_settings">Setări</string> + <string name="drawer_page_desc">Pagina %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Desktop</string> + <string name="drawer_steam_menu">Meniu Steam</string> + <string name="drawer_quick_access">Acces rapid</string> + <string name="drawer_open_qam">Deschide meniul de acces rapid</string> + <string name="drawer_prev_page">Pagina anterioară</string> + <string name="drawer_next_page">Pagina următoare</string> + <string name="drawer_hud">HUD de performanță</string> + <string name="drawer_scaling">Mod de scalare</string> + <string name="drawer_scaling_sharpness">Claritatea scalării</string> + <string name="drawer_effects">Efecte de ecran</string> + <string name="drawer_effects_hint">Live. Costă puțin timp GPU cât timp un efect este activ.</string> + <string name="drawer_look">Presetări</string> + <string name="drawer_look_custom">Personalizat</string> + <string name="drawer_effects_advanced">Avansat</string> + <string name="widgets_expanded">Expandat</string> + <string name="widgets_collapsed">Restrâns</string> + <string name="drawer_cas">Claritate (CAS)</string> + <string name="drawer_cas_level">Nivel de claritate</string> + <string name="drawer_fake_hdr">HDR fals</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Pornește SteamVR</string> + <string name="steamvr_checking">Se verifică SteamVR…</string> + <string name="drawer_deband">Elimină benzile</string> + <string name="drawer_deband_strength">Intensitatea eliminării benzilor</string> + <string name="drawer_brightness">Luminozitate</string> + <string name="drawer_contrast">Contrast</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Saturație</string> + <string name="drawer_fxaa">FXAA (netezirea marginilor)</string> + <string name="drawer_toon">Contururi toon</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Filtrare de texturi</string> + <string name="drawer_texture_hint">Jocuri DirectX 9–11, de la următoarea lor lansare.</string> + <string name="drawer_anisotropy">Filtrare anizotropă</string> + <string name="drawer_texture_sharpness">Claritatea texturilor</string> + <string name="drawer_texture_sharpness_note">O deviere mip negativă: texturi mai clare, cu puțin tremur. Automat se potrivește cu cât de mult este mărită sesiunea pentru ecran.</string> + <string name="drawer_touch_auto">Automat (%1$s)</string> + <string name="drawer_keyboard">Tastatură</string> + <string name="drawer_latency">Latență</string> + <string name="drawer_low_latency_controller">Controller cu latență mică</string> + <string name="drawer_low_latency_controller_hint">Controllerul raportează la 1000 Hz în loc de 250 Hz. Consum CPU puțin mai mare.</string> + <string name="drawer_low_latency_touch">Atingere cu latență mică</string> + <string name="drawer_low_latency_touch_hint">Atingerile sar peste gruparea cadrelor, deci controlul tactil Steam rulează la 1000 Hz. Consum CPU puțin mai mare.</string> + <string name="drawer_pc_keyboard">Tastatură de PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Al doilea ecran</string> + <string name="drawer_second_screen_mode">Mod</string> + <string name="drawer_second_screen_shows">Arată</string> + <string name="drawer_android_apps">Aplicații Android</string> + <string name="drawer_launch_app">Lansează o aplicație</string> + <string name="common_hide">Ascunde</string> + <string name="common_show">Arată</string> + <string name="drawer_no_apps">Nicio aplicație care poate fi lansată</string> + <string name="drawer_session_behavior">Comportamentul sesiunii</string> + <string name="drawer_suspend_hint">Se aplică acum și sesiunilor viitoare din acest mod.</string> + <string name="drawer_next_session">Sesiunea următoare</string> + <string name="drawer_support">Asistență</string> + <string name="drawer_logs">Jurnalele sesiunii</string> + <string name="drawer_logs_hint">Atașează la un raport de eroare</string> + <string name="drawer_share_logs">Partajează jurnalele</string> + <string name="drawer_background">Fundal</string> + <string name="drawer_stop">Oprește</string> + <string name="drawer_stop_title">Oprești sesiunea?</string> + <string name="drawer_running_now">În execuție acum</string> + <string name="drawer_no_game">Niciun joc nu rulează pe un Proton</string> + <string name="drawer_selected_profile">Profilul jocului</string> + <string name="drawer_selected_profile_none">Detaliile profilului nu sunt încă disponibile.</string> + <string name="drawer_profile_refresh_failed_initial">Profilurile jocurilor nu au putut fi încărcate. Se reîncearcă automat.</string> + <string name="drawer_profile_refresh_failed_stale">Profilurile jocurilor nu au putut fi reîmprospătate. Se arată ultimele date disponibile; se reîncearcă automat.</string> + <string name="drawer_profile_inspect_hint">Vezi și editează setările salvate folosite la următoarea lansare.</string> + <string name="drawer_profile_default">Se folosește profilul implicit</string> + <string name="drawer_profile_custom">Profil personalizat</string> + <string name="drawer_component_inherited">Se folosește %1$s din profilul implicit.</string> + <string name="drawer_game_components_note">Modificările sunt salvate în profilul %1$s și se aplică la următoarea lansare a jocului.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d suprascriere de joc</item> + <item quantity="few">%1$d suprascrieri de joc</item> + <item quantity="other">%1$d de suprascrieri de joc</item> + </plurals> + <string name="drawer_no_proton">Niciun Proton nu este instalat încă.</string> + <string name="drawer_game_running">joc în execuție</string> + <string name="drawer_reapplied">reaplicat la pornirea %1$s</string> + <string name="drawer_original">Original</string> + <string name="drawer_components_note">Importă și șterge pe pagina Componente.</string> + <string name="setup_check_done">Finalizat</string> + <string name="setup_check_warn">Necesită atenție</string> + <string name="setup_check_busy">Se procesează</string> + <string name="setup_limit_adb_failed">Verifică adresa IP și portul Depanării wireless, sau asociază din nou dacă Android a eliminat acest dispozitiv.</string> + <string name="setup_install">Instalează</string> + <string name="setup_manage">Gestionează</string> + <string name="setup_tab_overview">Prezentare generală</string> + <string name="setup_tab_controller">Controller</string> + <string name="setup_tab_session">Sesiune</string> + <string name="setup_tab_launcher">Launcher</string> + <string name="setup_title">Configurare</string> + <string name="setup_all_set">● Totul este pregătit</string> + <string name="setup_n_ready">%1$d din %2$d pregătite</string> + <string name="setup_system_check">Verificarea sistemului</string> + <string name="setup_gpu_supported">Dispozitiv acceptat</string> + <string name="setup_gpu_untested">GPU netestat</string> + <string name="setup_gpu_unsupported">GPU neacceptat</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam are nevoie de un driver Adreno; %1$s poate arăta un ecran negru</string> + <string name="setup_runtime">Mediul de execuție Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Neinstalat · circa 3 GB, instalat la prima apăsare pe Play</string> + <string name="setup_installed">Instalat</string> + <string name="setup_runtime_update">%1$s · actualizare disponibilă</string> + <string name="setup_runtime_current">%1$s · actualizat</string> + <string name="setup_limit">Limita proceselor-copil</string> + <string name="setup_limit_on">Activă · Android poate închide Steam. Dezactivarea durează un minut.</string> + <string name="setup_limit_unset">Nesetată · Android poate închide Steam. Dezactivarea durează un minut.</string> + <string name="setup_limit_unknown">Nu a putut fi verificată · dezactivarea durează un minut.</string> + <string name="setup_fix_it">Remediază</string> + <string name="setup_details">Detalii</string> + <string name="setup_dev_options">Opțiuni pentru dezvoltatori</string> + <string name="setup_use_wireless">Folosește Depanarea wireless</string> + <string name="setup_check_again">Verifică din nou</string> + <string name="setup_limit_turn_on">Activează limita</string> + <string name="setup_account">Cont Steam</string> + <string name="setup_signed_in_offline">Autentificat ca %1$s · mod offline</string> + <string name="setup_signed_in">Autentificat ca %1$s</string> + <string name="setup_sign_in">Apasă Play și autentifică-te în Steam</string> + <string name="setup_tools">Instrumente</string> + <string name="setup_controller">Controller</string> + <string name="setup_controller_unavailable">Setările controllerului nu sunt disponibile.</string> + <string name="setup_session">Sesiune</string> + <string name="setup_logs">Jurnalele sesiunii</string> + <string name="setup_logs_hint">Salvate după fiecare sesiune</string> + <string name="setup_agent_commands">Instrumente de depanare</string> + <string name="setup_latest_logs">Cele mai recente jurnale de sesiune</string> + <string name="setup_saved_logs">Jurnale de sesiune salvate</string> + <string name="setup_saved_logs_hint">Păstrează cele mai recente %1$d</string> + <string name="setup_clear_logs">Șterge jurnalele</string> + <string name="setup_reset_settings">Resetează toate setările</string> + <string name="setup_reset_settings_hint">Readuce fiecare setare la valoarea implicită</string> + <string name="setup_reset_settings_button">Resetează</string> + <string name="setup_reset_settings_title">Resetezi toate setările?</string> + <string name="setup_reset_settings_body">Setările de afișare, performanță, controller, temă, limbă și launcher revin la valorile implicite. Jocurile, autentificarea Steam, conturile de magazine, driverele descărcate și folderele de stocare rămân.</string> + <string name="setup_reset_settings_profiles">Resetează și profilurile jocurilor (Proton, FEX, componente și mediul de execuție pentru fiecare joc, plus mediul profilului Implicit)</string> + <string name="setup_reset_settings_session_running">Oprește sesiunea înainte de a reseta setările.</string> + <string name="setup_reset_settings_partial">Setările au fost resetate, dar nu toate. Detaliile sunt în jurnale.</string> + <string name="setup_offline">Mod offline</string> + <string name="setup_sign_in_first">Autentifică-te mai întâi în Steam</string> + <string name="setup_launcher">Launcher</string> + <string name="setup_language">Limbă</string> + <string name="setup_language_hint">Steam o folosește și el, de la următoarea pornire.</string> + <string name="setup_language_system">Cea implicită a sistemului (%1$s)</string> + <string name="setup_language_system_short">Cea implicită a sistemului</string> + <string name="setup_app_scale">Scala aplicației</string> + <string name="setup_app_scale_hint">Textul și comenzile DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (Implicit)</string> + <string name="setup_theme">Temă</string> + <string name="setup_theme_hint">Aspectul launcherului</string> + <string name="setup_home">Folosește ca ecran Acasă</string> + <string name="setup_home_on">DroidDeck poate fi aplicația Acasă</string> + <string name="setup_home_off">DroidDeck nu este niciodată oferit ca aplicație Acasă</string> + <string name="setup_orientation">Orientare</string> + <string name="setup_orientation_auto">Peisaj automat</string> + <string name="setup_orientation_landscape">Peisaj</string> + <string name="setup_orientation_reverse">Peisaj inversat</string> + <string name="setup_fullscreen">Ecran complet</string> + <string name="setup_fullscreen_on">Ascunde barele de stare și de navigare Android</string> + <string name="setup_fullscreen_off">Arată barele de stare și de navigare Android</string> + <string name="setup_default_home">Aplicația Acasă implicită</string> + <string name="setup_choose_home">Alege o aplicație Acasă</string> + <string name="setup_choose">Alege</string> + <string name="setup_linux_apps">Aplicații Linux (beta)</string> + <string name="setup_tool_files">Fișiere</string> + <string name="setup_tool_files_hint">Răsfoiește și gestionează fișiere</string> + <string name="setup_tool_protons">Versiuni Proton</string> + <string name="setup_tool_protons_hint">Instalează versiuni Proton ARM64</string> + <string name="setup_tool_performance">Performanță</string> + <string name="setup_tool_performance_hint">Alocarea nucleelor CPU</string> + <string name="setup_tool_roms">Folderul ROMs</string> + <string name="setup_tool_roms_hint">Unde sunt stocate jocurile emulatorului</string> + <string name="setup_card_components">Componente</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Comenzi</string> + <string name="setup_card_controls_hint">Maparea butoanelor</string> + <string name="store_tab_discover">Descoperă</string> + <string name="store_tab_search">Căutare</string> + <string name="store_tab_installed">Instalate</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Magazin</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak pregătit</string> + <string name="store_needs_runtime">Instalează mai întâi mediul de execuție Linux din Configurare.</string> + <string name="store_setup_title">Configurează Flatpak</string> + <string name="store_setup_text">Adaugă Flatpak și îl conectează la Flathub (circa 20 MB). Prima aplicație descarcă și mediul său de execuție.</string> + <string name="store_setting_up">Se configurează…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Actualizări</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Se pornește…</string> + <string name="store_categories">Categorii</string> + <string name="store_unreachable">Flathub nu a putut fi accesat. Verifică conexiunea și încearcă din nou.</string> + <string name="store_try_again">Încearcă din nou</string> + <string name="store_search_label">Caută pe Flathub</string> + <string name="store_search_placeholder">Firefox, jocuri, emulatoare…</string> + <string name="store_search">Caută</string> + <string name="store_all">Toate</string> + <string name="store_searching">Se caută…</string> + <string name="store_search_hint">Caută după nume sau alege o categorie. Sunt listate doar aplicații ARM64.</string> + <string name="store_no_results">Nicio aplicație ARM64 de pe Flathub nu se potrivește.</string> + <string name="store_results">Rezultate</string> + <string name="store_check_updates">Verifică actualizările</string> + <string name="store_update_all">Actualizează tot (%1$d)</string> + <string name="store_all_current">● Totul este actualizat</string> + <string name="store_no_apps">Nicio aplicație încă. Găsește câteva la Descoperă sau Căutare.</string> + <string name="store_setup_first_note">Configurează Flatpak pentru a instala aplicații.</string> + <string name="store_update_available_prefix">Actualizare disponibilă · %1$s</string> + <string name="store_open">Deschide</string> + <string name="store_details">Detalii</string> + <string name="store_remove">Elimină</string> + <string name="store_press_again">Apasă din nou pentru a elimina</string> + <string name="store_installing">Se instalează…</string> + <string name="store_install">Instalează</string> + <string name="store_setup_first">Configurează mai întâi Flatpak</string> + <string name="store_download_size">Descărcare de %1$s</string> + <string name="store_installed_chip">● Instalat</string> + <string name="store_details_failed">Pagina Flathub a acestei aplicații nu a putut fi încărcată.</string> + <string name="store_loading">Se încarcă de pe Flathub…</string> + <string name="store_no_arm">Nicio versiune ARM64 pe Flathub, deci nu poate fi instalată aici.</string> + <string name="store_screenshots">Capturi de ecran</string> + <string name="store_about">Despre</string> + <string name="store_app_id">ID aplicație</string> + <string name="store_license">Licență</string> + <string name="store_runtime">Mediu de execuție</string> + <string name="store_installed_size">Dimensiune instalată</string> + <string name="store_installed_size_value">%1$s (plus mediul de execuție partajat)</string> + <string name="store_website">Site web</string> + <string name="store_verified">Verificat</string> + <string name="upd_title">Actualizări</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Verificat %1$s</string> + <string name="upd_not_checked">Neverificat încă</string> + <string name="upd_perm_title">Permite DroidDeck să se actualizeze singur</string> + <string name="upd_perm_text">Pe ecranul următor, activează Permite din această sursă, apoi revino. Actualizarea continuă de la sine.</string> + <string name="upd_open_settings">Deschide setările</string> + <string name="upd_not_now">Nu acum</string> + <string name="upd_signed_status">Semnătură diferită</string> + <string name="upd_signed_headline">Nu se poate actualiza pe loc</string> + <string name="upd_signed_detail">Această copie nu este semnată cu cheia de lansare a DroidDeck, așa că actualizările nu se pot instala peste ea. Dezinstaleaz-o pentru a comuta.</string> + <string name="upd_available">Actualizare disponibilă</string> + <string name="upd_blocked_status">Nu se poate instala</string> + <string name="upd_switch">Pregătit pentru comutare</string> + <string name="upd_ahead_status">Înaintea versiunii Stabile</string> + <string name="upd_ahead_headline">Ești înaintea versiunii Stabile</string> + <string name="upd_ahead_detail">Această versiune este mai nouă decât cea mai recentă Stabilă. Vei trece la Stabilă odată cu următoarea sa lansare.</string> + <string name="upd_gone_status">Testul s-a terminat</string> + <string name="upd_gone_headline">Acest test s-a terminat</string> + <string name="upd_gone_detail">Remedierea sa a fost integrată sau abandonată. Urmărește Preview pentru cele mai noi remedieri.</string> + <string name="upd_current_status">Actualizat</string> + <string name="upd_current_headline">Ai cea mai recentă versiune %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Actualizează%1$s</string> + <string name="upd_install_button">Instalează%1$s</string> + <string name="upd_install_anyway">Instalează Stabilă %1$s oricum</string> + <string name="upd_follow_preview">Urmărește Preview</string> + <string name="upd_stop_session">Oprește sesiunea în curs pentru a actualiza.</string> + <string name="upd_less">Mai puțin</string> + <string name="upd_more">Mai mult</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Versiune nouă Preview</string> + <string name="upd_new_test">Versiune de test PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">CANAL DE ACTUALIZARE</string> + <string name="upd_stable">Stabilă</string> + <string name="upd_stable_hint">Versiuni testate, pentru majoritatea oamenilor</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Cele mai noi remedieri, înainte de Stabilă</string> + <string name="upd_preview_current">Actualizat</string> + <string name="upd_tests">Versiuni de test</string> + <string name="upd_tests_hint">Încearcă o remediere înainte de lansare</string> + <string name="upd_tests_none">Niciuna acum</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Nu este compilată pentru această copie de DroidDeck</string> + <string name="upd_updated">Actualizat %1$s</string> + <string name="upd_test_name">testul PR #%1$d</string> + <string name="upd_while_ago">cu un timp în urmă</string> + <string name="upd_just_now">chiar acum</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d de încercat</item> + <item quantity="few">%1$d de încercat</item> + <item quantity="other">%1$d de încercat</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Modificări de la versiunea ta · %1$d compilare în urmă</item> + <item quantity="few">Modificări de la versiunea ta · %1$d compilări în urmă</item> + <item quantity="other">Modificări de la versiunea ta · %1$d de compilări în urmă</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Modificări recente · %1$d compilare</item> + <item quantity="few">Modificări recente · %1$d compilări</item> + <item quantity="other">Modificări recente · %1$d de compilări</item> + </plurals> + <string name="gate_title">O setare Android de schimbat</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android oprește aplicațiile care pornesc multe procese în fundal, iar Steam pornește zeci. Până se schimbă asta, jocurile se închid fără o eroare.</string> + <string name="gate_fix_for_me">Repară pentru mine</string> + <string name="gate_toggle_steps">Activează „Dezactivează restricțiile pentru procese secundare”, apoi revino. Lasă Opțiunile pentru dezvoltatori activate, altfel comutatorul se dezactivează din nou.</string> + <string name="gate_open_dev">Deschide Opțiunile pentru dezvoltatori</string> + <string name="gate_no_toggle">Această versiune de Android nu are un comutator pentru asta, așa că DroidDeck o schimbă prin Depanarea wireless. Durează circa un minut, fără a avea nevoie de un computer.</string> + <string name="gate_needs_wifi">Depanarea wireless are nevoie de Wi-Fi. Orice rețea funcționează; nu are nevoie de internet.</string> + <string name="gate_needs_notifications">Codul de asociere apare într-o notificare. Permite notificările pentru DroidDeck, sau folosește Alte moduri.</string> + <string name="gate_allow_notifications">Permite notificările</string> + <string name="gate_step1">Deschide Setări → Opțiuni pentru dezvoltatori → Depanare wireless și activează-o</string> + <string name="gate_step2">Apasă „Asociază dispozitivul cu un cod de asociere”</string> + <string name="gate_step3">Introdu codul în notificarea DroidDeck</string> + <string name="gate_waiting">Se așteaptă fereastra de asociere…</string> + <string name="gate_code_needed">Fereastra a fost găsită. Introdu codul său în notificare.</string> + <string name="gate_status">Stare</string> + <string name="gate_polling">Se verifică la fiecare 2 secunde. Această pagină se închide când este dezactivată.</string> + <string name="gate_other_ways">Alte moduri</string> + <string name="gate_other_toggle">Depanare wireless, adresă manuală, ADB pe computer</string> + <string name="gate_other_no_toggle">Adresă manuală, ADB pe computer, Opțiuni pentru dezvoltatori</string> + <string name="gate_use_wireless_instead">Folosește Depanarea wireless în schimb</string> + <string name="gate_some_roms">Unele ROM-uri adaugă comutatorul oricum. Caută „procese-copil” în Opțiuni pentru dezvoltatori.</string> + <string name="gate_manual_hint">Dacă notificarea nu funcționează, introdu tu adresa și codul din fereastră.</string> + <string name="gate_enter_manually">Introdu adresa manual</string> + <string name="gate_from_computer">De pe un computer cu ADB:</string> + <string name="gate_copy_command">Copiază comanda</string> + <string name="gate_choose_display">Alege pe care afișaj se deschid Setările Android.</string> + <string name="gate_main_screen">Ecranul principal</string> + <string name="wadb_finding_port">Asociat. Se caută portul de Depanare wireless…</string> + <string name="wadb_enter_port">Asociat. Introdu portul din Setări.</string> + <string name="wadb_applying">Dispozitiv găsit. Se aplică setarea…</string> + <string name="wadb_apply_failed">Nu s-a putut aplica automat. Verifică adresa de mai jos și încearcă din nou. %1$s</string> + <string name="wadb_title_wireless">Depanare wireless</string> + <string name="wadb_title_done">Limita proceselor-copil a fost actualizată</string> + <string name="wadb_title">Schimbă limita proceselor-copil</string> + <string name="wadb_lede_compact0">Dacă opțiunea lipsește, asociază-te prin Depanare wireless.</string> + <string name="wadb_lede_compact1">Asociat. Verifică adresa IP și portul în Depanare wireless.</string> + <string name="wadb_lede_done">Limita proceselor-copil a fost actualizată.</string> + <string name="wadb_lede0">Folosește pasul 2 dacă Opțiunile pentru dezvoltatori nu au o setare pentru procese-copil. Deschide Opțiuni pentru dezvoltatori → Depanare wireless → Asociază dispozitivul cu un cod de asociere.</string> + <string name="wadb_lede1">Asociat. Folosește adresa de mai jos, sau actualizeaz-o din Depanare wireless → Adresă IP și port.</string> + <string name="wadb_lede_done_long">Limita proceselor-copil a fost actualizată prin Depanarea wireless.</string> + <string name="wadb_confirmed_on">Android a confirmat că limita este activă.</string> + <string name="wadb_confirmed_off">Android a confirmat că limita este dezactivată.</string> + <string name="wadb_pair_group">2 · Asociază Depanarea wireless</string> + <string name="wadb_pair_address">Adresa IP și portul ferestrei de asociere</string> + <string name="wadb_pin">Cod de asociere (PIN)</string> + <string name="wadb_pin_placeholder">6 cifre</string> + <string name="wadb_pair">Asociază</string> + <string name="wadb_apply_group">2 · Aplică prin Depanarea wireless</string> + <string name="wadb_connect_address">Adresa IP și portul de conexiune</string> + <string name="wadb_pair_again">Asociază din nou</string> + <string name="wadb_turn_off">Dezactivează limita</string> + <string name="wadb_other_ways">Alte moduri de a o schimba</string> + <string name="wadb_dev_try_first">1 · Opțiuni pentru dezvoltatori (încearcă mai întâi)</string> + <string name="wadb_restrict_on">Dezactivează „Dezactivează restricțiile pentru procese secundare”.</string> + <string name="wadb_restrict_off">Activează „Dezactivează restricțiile pentru procese secundare”.</string> + <string name="wadb_computer_last">3 · ADB pe computer (ultima soluție)</string> + <string name="wadb_only_if">Doar dacă Depanarea wireless nu este disponibilă.</string> + <string name="wadb_computer_group">3 · ADB pe computer (ultima soluție)</string> + <string name="ctrl_osc_hint">Când apar comenzile tactile într-o sesiune</string> + <string name="ctrl_color">Culoare</string> + <string name="ctrl_color_hint">Tenta butoanelor de pe ecran</string> + <string name="ctrl_custom">Personalizat</string> + <string name="ctrl_opacity">Opacitate</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Dimensiunea butoanelor</string> + <string name="ctrl_size_hint" formatted="false">100% este dimensiunea standard</string> + <string name="ctrl_stick_click">Apăsarea manșei</string> + <string name="ctrl_stick_click_hint">Apasă de două ori și ține apăsată o manșă pentru L3 sau R3</string> + <string name="ctrl_adaptive">Manșe adaptive</string> + <string name="ctrl_rumble">Vibrații de joc</string> + <string name="ctrl_steam_button">Butonul Steam</string> + <string name="ctrl_qam_button">Butonul QAM</string> + <string name="ctrl_keyboard_button">Butonul tastaturii</string> + <string name="ctrl_select_steam">Apasă Select pentru a deschide meniul Steam</string> + <string name="ctrl_select_steam_hint">În loc de View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con ca controllere VR</string> + <string name="ctrl_joycon_vr_hint">Cât timp rulează SteamVR, fiecare Joy-Con devine o mână. Îndreaptă-l înainte și ține apăsat Home sau Capture pentru a-l recentra.</string> + <string name="setup_animations">Animații</string> + <string name="ctrl_adaptive_hint">Manșele apar unde atingi ecranul și se ascund la eliberare</string> + <string name="ctrl_layout">Aranjament</string> + <string name="ctrl_layout_custom">Poziții personalizate salvate</string> + <string name="ctrl_layout_default">Adaptat pentru acest ecran</string> + <string name="ctrl_edit">Editează</string> + <string name="ctrl_reset">Resetează</string> + <string name="ctrl_mapping">Maparea butoanelor</string> + <string name="ctrl_mapping_default">Fiecare buton trimite propria intrare</string> + <string name="ctrl_mapping_count">%1$d din %2$d butoane remapate</string> + <string name="ctrl_configure">Configurează</string> + <string name="ctrl_reset_all">Resetează controllerul</string> + <string name="ctrl_reset_all_hint">Restaurează toate setările controllerului și aranjamentul</string> + <string name="ctrl_mapping_lede">Ce trimite jocului fiecare buton de pe ecran. Ascuns elimină butonul.</string> + <string name="ctrl_onscreen_buttons">Butoane pe ecran</string> + <string name="ctrl_defaults">Valori implicite</string> + <string name="ctrl_reset_mapping">Resetează maparea</string> + <string name="content_android_apps">Aplicații Android</string> + <string name="content_apps_count">%1$d aplicații</string> + <string name="content_no_android_apps">Nu s-a găsit nicio aplicație Android care poate fi lansată.</string> + <string name="content_desktop_installed">● Desktop instalat</string> + <string name="content_desktop_first_open">Se instalează la prima deschidere</string> + <string name="content_available">Disponibil pentru instalare</string> + <string name="content_not_installed">Neinstalat.</string> + <string name="content_not_installed_suffix">%1$s · neinstalat</string> + <string name="content_open_named">Deschide %1$s</string> + <string name="content_games">Jocuri</string> + <string name="content_choose_roms">Alege un folder ROMs.</string> + <string name="content_retroarch_roms">Navighează la /root/ROMs în RetroArch.</string> + <string name="content_add_roms">Adaugă jocuri %1$s în ROMs/%2$s.</string> + <string name="content_install_named">Instalează %1$s</string> + <string name="content_stop_to_install">Oprește sesiunea pentru a instala</string> + <string name="content_runtime_required">Mediu de execuție necesar</string> + <string name="content_loading_details">Se încarcă detaliile instalării…</string> + <string name="content_details_unavailable">Detaliile instalării nu sunt disponibile. Încearcă din nou mai târziu.</string> + <string name="content_needs_runtime">Instalează mai întâi mediul de execuție Linux din Configurare.</string> + <string name="content_stop_first">Oprește sesiunea în curs pentru a instala aplicații desktop.</string> + <string name="content_install_into">Instalează %1$s în desktopul Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Ascunderea o elimină din Desktop. Fișierele sale rămân în mediul de execuție Linux.</string> + <string name="content_rom_gone">Acel joc nu mai este în folderul ROMs.</string> + <string name="content_desktop_system">Desktop · %1$s</string> + <string name="content_launch_in">Lansează în %1$s</string> + <string name="content_also_in">De asemenea în %1$s</string> + <string name="content_page_gone">Acea pagină nu mai există. Alege o secțiune din stânga.</string> + <string name="content_open_desktop">Deschide desktopul</string> + <string name="content_install_open_desktop">Instalează și deschide desktopul</string> + <string name="desktop_remove_title">Dezinstalează desktopul</string> + <string name="desktop_remove_text">Elimină desktopul și aplicațiile sale incluse. Păstrează jocurile, aplicațiile adăugate, setările și bibliotecile partajate.</string> + <string name="desktop_removing">Se elimină desktopul</string> + <string name="desktop_removed">Desktop eliminat</string> + <string name="desktop_cleaning_legacy">Se elimină fișierele LXQt vechi</string> + <string name="desktop_removal_unknown">Actualizează DroidDeck înainte de a elimina această versiune de desktop.</string> + <string name="content_linux_desktop">Desktop Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox și emulatoarele tale</string> + <string name="games_empty">Jocurile pe care le instalezi în Steam apar aici după sesiune.</string> + <string name="games_play_steam">Joacă Steam</string> + <string name="games_play_steamvr">Joacă SteamVR</string> + <string name="games_launch_settings">Setări de lansare</string> + <string name="games_launch">Lansează</string> + <string name="games_files">Fișierele jocului</string> + <string name="games_prefix">Prefix Proton</string> + <string name="games_saves_looking">Se caută salvările…</string> + <string name="games_saves_none">Niciun folder de salvare găsit după nume. Exportul include tot folderul de utilizator.</string> + <string name="games_saves_folders">%1$d foldere de salvare</string> + <string name="games_saves_summary">%1$s · %2$d fișiere · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Gestionează salvările</string> + <string name="games_saves">Salvările jocului</string> + <string name="games_import_saves">Importă salvări…</string> + <string name="games_export_gamehub">Exportă ca arhivă GameHub…</string> + <string name="games_export_winlator">Exportă ca arhivă Winlator…</string> + <string name="games_open_save_folder">Deschide folderul de salvare</string> + <string name="games_never_played">Niciodată jucat</string> + <string name="games_runtime_busy_percent">Mediu de execuție ocupat · %1$d%%</string> + <string name="games_runtime_busy">Mediu de execuție ocupat</string> + <string name="games_runtime_first_play">Mediul de execuție se instalează la prima apăsare pe Play</string> + <string name="games_runtime_update">Actualizare disponibilă pentru mediul de execuție</string> + <string name="games_runtime_ready">● Mediu de execuție pregătit</string> + <string name="games_last_played">Jucat ultima dată %1$s</string> + <string name="games_internal">Stocare internă</string> + <string name="games_added">Joc adăugat</string> + <string name="games_custom">Joc personalizat</string> + <string name="games_store_storage">Stocarea jocurilor</string> + <string name="gpu_auto_hint">Cea mai bună pereche pentru acest GPU, păstrată actualizată</string> + <string name="gpu_manual_hint">Alege o pereche tu însuți</string> + <string name="gpu_checking">Se verifică driverele…</string> + <string name="gpu_none_listed">Niciun driver listat încă. Reîmprospătează pentru a le căuta.</string> + <string name="gpu_hide_other">Ascunde driverele pentru alte GPU-uri</string> + <string name="gpu_show_other">Arată driverele pentru alte GPU-uri</string> + <string name="gpu_advanced">Avansat</string> + <string name="gpu_set_with_display">Setat împreună cu driverul de afișaj: %1$s include ambele.</string> + <string name="gpu_set_with_runtime">Setat împreună cu driverul mediului de execuție: %1$s include ambele.</string> + <string name="gpu_runtime_hint">Folosit de jocuri și de desktop.</string> + <string name="gpu_runtime_default">Implicit pentru mediul de execuție</string> + <string name="gpu_auto_by_gpu">Automat - ales în funcție de GPU</string> + <string name="gpu_manage">Descarcă, importă sau șterge…</string> + <string name="gpu_in_use_caps">ÎN UZ</string> + <string name="gpu_builtin">Driverele integrate în DroidDeck</string> + <string name="gpu_matched_pair">Driverele mediului de execuție și de afișaj setate împreună ca pereche asortată.</string> + <string name="gpu_recommended_for">Recomandat pentru acest GPU: %1$s.</string> + <string name="gpu_refresh_hint">Reîmprospătează pentru a căuta drivere pentru acest GPU.</string> + <string name="gpu_recommended_caps">RECOMANDAT</string> + <string name="gpu_unavailable">Indisponibil</string> + <string name="load_runtime">Mediul de execuție Linux</string> + <string name="load_runtime_detail">Se pregătește mediul de execuție Linux</string> + <string name="load_session">Sesiune</string> + <string name="load_session_detail">Se pornesc afișajul și sunetul</string> + <string name="load_steam">Clientul Steam</string> + <string name="load_steam_detail">Se verifică Steam și instrumentele sale de compatibilitate</string> + <string name="load_opening_steam">Se deschide Steam</string> + <string name="load_opening_steam_detail">Se așteaptă primul cadru al Steam</string> + <string name="load_desktop">Desktop</string> + <string name="load_desktop_detail">Se pregătește desktopul</string> + <string name="load_opening">Se deschide</string> + <string name="load_opening_detail">Se așteaptă primul cadru</string> + <string name="load_starting_steam">Se pornește Steam</string> + <string name="load_ended">Sesiunea s-a terminat</string> + <string name="load_step">Pasul %1$d din %2$d</string> + <string name="load_steam_paused">Steam este pus pe pauză</string> + <string name="deck_tab_grips">Mânere</string> + <string name="deck_tab_left">Padul stâng</string> + <string name="deck_tab_right">Padul drept</string> + <string name="deck_tab_both">Ambele</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Manșă</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Comută între manșă și trackpad</string> + <string name="deck_more_controls">Mai multe comenzi Deck</string> + <string name="deck_panels">PANOURI</string> + <string name="deck_close">Închide comenzile celui de-al doilea ecran</string> + <string name="deck_open_steam_menu">Deschide meniul Steam</string> + <string name="deck_left_upper">Stânga · sus</string> + <string name="deck_left_lower">Stânga · jos</string> + <string name="deck_right_upper">Dreapta · sus</string> + <string name="deck_right_lower">Dreapta · jos</string> + <string name="deck_click">Clic</string> + <string name="deck_right_trackpad">Trackpad-ul drept</string> + <string name="deck_left_trackpad">Trackpad-ul stâng</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Arată tastatura</string> + <string name="second_hide_keyboard">Ascunde tastatura</string> + <string name="second_terminal">Terminal Linux</string> + <string name="second_terminal_not_ready">Sesiunea Linux nu este încă pregătită pentru un terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Jocuri</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Magazin</string> + <string name="rail_components">Componente</string> + <string name="rail_apps">Aplicații</string> + <string name="rail_setup">Configurare</string> + <string name="rail_updates">Actualizări</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Reluare %1$s</string> + <string name="roms_text">Apare ca /root/ROMs în fiecare sesiune. Stocarea internă este la /root/Storage.</string> + <string name="roms_none">Niciun folder ales</string> + <string name="roms_applies">Se aplică la sesiunea următoare. Cardurile SD funcționează.</string> + <string name="roms_choose">Alege folderul</string> + <string name="roms_change">Schimbă folderul</string> + <string name="proton_lede">Instalează o versiune Proton ARM64, apoi alege-o per joc în Steam → Proprietăți → Compatibilitate.</string> + <string name="proton_stop_first">Oprește sesiunea în curs pentru a instala sau elimina un instrument de compatibilitate.</string> + <string name="proton_available">Versiuni disponibile</string> + <string name="proton_installed">Instalat %1$s</string> + <string name="proton_queued">În așteptare de la o cerere anterioară</string> + <string name="proton_not_installed">Neinstalat</string> + <string name="proton_update_available">Actualizare disponibilă → %1$s</string> + <string name="proton_remove_older">Elimină versiunile vechi de %1$s</string> + <string name="proton_remove_older_body">Elimină %1$s. Jocurile setate pe aceste versiuni trebuie comutate pe alt Proton.</string> + <string name="proton_remove_body">Jocurile setate pe această versiune trebuie comutate pe alt Proton.</string> + <string name="proton_install_now">Instalează acum</string> + <string name="proton_cancel_queued">Anulează cererea în așteptare</string> + <string name="pckb_android">Tastatura Android</string> + <string name="pckb_hide">Ascunde ✕</string> + <string name="main_launch_named">Lansează %1$s</string> + <string name="main_choose_screen">Alege un ecran. Secundar: %1$s.</string> + <string name="main_secondary_gone">Ecranul secundar nu mai este disponibil.</string> + <string name="main_primary">Ecranul principal</string> + <string name="main_secondary">Ecranul secundar</string> + <string name="widgets_prev_tab">Fila anterioară</string> + <string name="widgets_next_tab">Fila următoare</string> + <string name="widgets_on">Activat</string> + <string name="widgets_all_n">Toate %1$d</string> + <string name="widgets_none">Niciuna</string> + <string name="widgets_n_of_m">%1$d din %2$d</string> + <string name="widgets_off">Dezactivat</string> + <string name="screen_bottom">Ecranul de jos</string> + <string name="game_env_applies">Se aplică la următoarea lansare a jocului. Profilul unui joc are prioritate față de cel comun.</string> + <string name="game_env_other">Alt joc după ID-ul aplicației…</string> + <string name="game_env_done">Terminat</string> + <string name="game_env_default">Implicit</string> + <string name="game_env_off">Dezactivat</string> + <string name="game_env_change">Schimbă…</string> + <string name="game_env_change_title">Schimbă variabila</string> + <string name="game_env_restore_default">Înapoi la implicit</string> + <string name="game_env_eyebrow">Jocuri Proton</string> + <string name="pip_title">Imagine în imagine</string> + <string name="pip_auto">Intră automat în PiP</string> + <string name="unfolded_controls">Comenzi pe ecranul desfăcut</string> + <string name="unfolded_controls_hint">Desfăcut, jocul se află peste trackpadurile și mânerele din spate ale Steam Deck. Împăturit, jocul este pe tot ecranul.</string> + <string name="pip_suspended">Suspendat</string> + <string name="pip_not_ready">Imaginea în imagine este disponibilă odată ce sesiunea este pregătită.</string> + <string name="pip_permission">Permite imaginea în imagine pentru DroidDeck în setările Android.</string> + <string name="pip_unavailable">Android nu a putut deschide imaginea în imagine.</string> + <string name="game_shortcut">Comandă rapidă</string> + <string name="game_shortcut_add">Adaugă pe ecranul principal</string> + <string name="game_shortcut_choose">Alege jocul</string> + <string name="game_shortcut_scanning">Se scanează jocurile instalate…</string> + <string name="game_link_copy">Copiază linkul de lansare</string> + <string name="game_link_copied">Link de lansare copiat</string> + <string name="game_shortcut_unsupported">Acest launcher nu poate adăuga comenzi rapide. Folosește Copiază linkul de lansare în schimb.</string> + <string name="game_link_invalid">Link de lansare a jocului invalid.</string> + <string name="game_link_missing">Acest joc nu mai este în biblioteca ta DroidDeck.</string> + <string name="game_link_session_busy">Oprește sesiunea curentă înainte de a lansa un joc Steam.</string> + <string name="game_link_failed">Jocul nu a putut fi trimis către Steam. Încearcă să îl lansezi din nou.</string> + <string name="setup_retry_removal">Reîncearcă eliminarea</string> + <string name="runtime_removing">Se elimină</string> + <string name="runtime_removal_incomplete">Eliminare incompletă</string> + <string name="game_file_export">Exportă fișierul jocului</string> + <string name="game_file_sync">Sincronizează toate fișierele jocurilor în folder</string> + <string name="game_file_stop_sync">Oprește sincronizarea fișierelor jocurilor</string> + <string name="game_file_folder">Alege un folder pentru fișierele frontend ale jocurilor</string> + <string name="game_file_exported">Fișierele jocului salvate în %1$s</string> + <string name="game_frontend_files">Fișiere frontend</string> + + <string name="main_wait_runtime">Așteaptă să se termine operația asupra mediului de execuție</string> + <string name="main_wait_proton_install">Așteaptă să se termine instalarea instrumentului de compatibilitate</string> + <string name="main_wait_desktop_install">Așteaptă să se termine instalarea aplicației desktop</string> + <string name="main_wait_install_game">Așteaptă să se termine instalarea înainte de a lansa un joc</string> + <string name="main_saves_close_session">Închide mai întâi sesiunea Steam, ca jocul să nu poată salva peste import</string> + <string name="main_saves_importing">Se importă în %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">S-a importat %1$d fișier din %2$s în %3$s</item> + <item quantity="few">S-au importat %1$d fișiere din %2$s în %3$s</item> + <item quantity="other">S-au importat %1$d de fișiere din %2$s în %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">S-a importat %1$d fișier din %2$s în %3$s. Salvările vechi au fost copiate de rezervă în Download/DroidDeck/Saves/backups</item> + <item quantity="few">S-au importat %1$d fișiere din %2$s în %3$s. Salvările vechi au fost copiate de rezervă în Download/DroidDeck/Saves/backups</item> + <item quantity="other">S-au importat %1$d de fișiere din %2$s în %3$s. Salvările vechi au fost copiate de rezervă în Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Alege o arhivă de salvare pentru %1$s</string> + <string name="main_saves_exporting">Se exportă %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">S-a exportat %1$d fișier ca %2$s: %3$s</item> + <item quantity="few">S-au exportat %1$d fișiere ca %2$s: %3$s</item> + <item quantity="other">S-au exportat %1$d de fișiere ca %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Alege unde se salvează %1$s (%2$s)</string> + <string name="main_action_failed">%1$s a eșuat: %2$s</string> + <string name="main_no_logs_yet">Niciun jurnal de sesiune încă: rulează mai întâi o sesiune.</string> + <string name="main_no_logs_to_clear">Niciun jurnal de sesiune de șters.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">S-a șters %1$d folder de jurnal de sesiune.</item> + <item quantity="few">S-au șters %1$d foldere de jurnal de sesiune.</item> + <item quantity="other">S-au șters %1$d de foldere de jurnal de sesiune.</item> + </plurals> + <string name="main_wadb_pair_failed">Asocierea Depanării wireless a eșuat</string> + <string name="main_wadb_command_failed">Comanda Depanării wireless a eșuat</string> + <string name="main_wadb_unavailable">Depanarea wireless nu este disponibilă</string> + <string name="main_adb_copied">Comanda ADB copiată</string> + <string name="main_pick_roms">Alege folderul ROMs</string> + <string name="main_non_adreno_title">Nu este un GPU Adreno</string> + <string name="main_non_adreno_text">Turnip acceptă GPU-uri Adreno. Pe %1$s, Steam poate arăta un ecran negru. Descărcare: %2$.0f MB.</string> + <string name="main_install_anyway">Instalează oricum</string> + <string name="main_remove_runtime_title">Elimină mediul de execuție Linux</string> + <string name="main_remove_runtime_text">Aceasta șterge mediul de execuție, clientul Steam din interiorul lui și fiecare joc instalat acolo.</string> + <string name="main_applied">Aplicat: %1$s</string> + <string name="android_app_open_failed_primary">%1$s nu a putut fi deschis pe ecranul principal</string> + <string name="android_app_open_failed_on">%1$s nu a putut fi deschis pe %2$s</string> + <string name="android_app_open_failed_display">%1$s nu a putut fi deschis pe afișajul %2$d</string> + <string name="comp_busy_importing">Se importă</string> + <string name="comp_busy_swapping">Se comută</string> + <string name="comp_busy_restoring">Se restaurează</string> + <string name="comp_busy_cancelling">Se anulează</string> + <string name="comp_busy_deleting">Se șterge</string> + <string name="comp_cannot_read">fișierul nu poate fi citit</string> + <string name="comp_imported">Importat %1$s</string> + <string name="comp_swap_cancelled">Comutarea în așteptare a fost anulată.</string> + <string name="comp_pick_wcp">Alege un pachet de componente (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Versiunile nightly nu au putut fi accesate</string> + <string name="comp_stored">Salvat %1$s</string> + <string name="comp_download_failed">Descărcarea a eșuat: %1$s</string> + <string name="drivers_pick_linux">Alege un driver pentru mediul de execuție Linux (arhivă -Linux sau pachet Android + Linux)</string> + <string name="drivers_pick_android">Alege un driver de afișaj (arhivă AdrenoTools sau pachet Android + Linux)</string> + <string name="drivers_pick_any">Alege o arhivă de driver sau un pachet Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Se elimină %1$s…</string> + <string name="main_forgetting_named">Se elimină din memorie %1$s…</string> + <string name="main_pick_game_storage">Alege folderul de stocare a jocurilor</string> + <string name="main_pick_decky_zip">Alege o arhivă ZIP cu un plugin Decky</string> + <string name="main_storage_not_usable">Nu poate fi folosit: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Se elimină mediul de execuție Linux</string> + <string name="main_settings_main_screen">Setările nu au putut fi deschise pe ecranul de jos; au fost deschise pe ecranul principal.</string> + <string name="main_open_dev_options">Deschide Opțiunile pentru dezvoltatori din Setări</string> + + <string name="upd_unknown_apps_failed">Setarea Android „Instalează aplicații necunoscute” nu a putut fi deschisă</string> + <string name="upd_couldnt_check">Nu s-a putut verifica: %1$s</string> + <string name="upd_no_download">Această versiune nu are o descărcare pentru această copie de DroidDeck</string> + <string name="upd_stop_first">Oprește mai întâi sesiunea în curs, apoi actualizează</string> + <string name="upd_stage_downloading">Se descarcă</string> + <string name="upd_stage_installing">Se instalează</string> + <string name="upd_stage_confirm">Se așteaptă confirmarea ta</string> + <string name="upd_failed">Actualizarea a eșuat</string> + <string name="upd_not_offered">Android nu a oferit instalarea actualizării</string> + + <string name="decky_install_failed">Instalarea Decky a eșuat: %1$s</string> + <string name="decky_plugin_starting">Se pornește importul pluginului…</string> + <string name="decky_plugin_failed">Importul pluginului a eșuat: %1$s</string> + <string name="decky_plugin_installed">Plugin instalat. Repornește Steam pentru a-l încărca.</string> + + <string name="drivers_not_checked">Neverificat încă - apasă reîmprospătare pentru a căuta drivere noi</string> + <string name="drivers_bundle_sets_display">Android + Linux: setează driverul de afișaj odată cu el</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: setează driverul mediului de execuție odată cu el</string> + <string name="drivers_runtime_builtin">Turnip-ul integrat în mediul de execuție</string> + <string name="drivers_system_vulkan">Vulkan de sistem: nicio versiune inclusă pentru acest GPU</string> + <string name="drivers_bundled">%1$s (inclus)</string> + <string name="drivers_manual">Manual</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Doar o jumătate este publicată acum</string> + <string name="drivers_pair_size">%1$.0f MB pentru ambele</string> + <string name="drivers_none_to_set">Niciun driver de setat: %1$s</string> + <string name="drivers_checking_latest">Se verifică cele mai noi drivere…</string> + <string name="drivers_up_to_date_check_failed">Actualizat (nu s-a putut verifica: %1$s)</string> + <string name="drivers_recommended_unpublished">Driverele recomandate nu sunt publicate acum</string> + <string name="drivers_downloading_pair">Se descarcă %1$s %2$s…</string> + <string name="drivers_updated_to">Actualizat la %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Actualizat la %1$s %2$s. Driverul de afișaj se aplică după repornirea DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Actualizările de drivere așteaptă oprirea sesiunii.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s se va descărca după ce ieși din datele mobile și din modul de economisire a bateriei.</string> + <string name="drivers_skipping_bad">%1$s %2$s nu a pornit o sesiune aici, așa că Automat rămâne la driverele care au funcționat.</string> + <string name="drivers_rolled_back">%1$s nu a pornit sesiunea de două ori, așa că Automat a revenit la driverele care funcționau.</string> + <string name="drivers_switched_to">Comutat la %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Comutat la %1$s %2$s. Driverul de afișaj se aplică după repornirea DroidDeck.</string> + <string name="drivers_using">Se folosește %1$s %2$s.</string> + <string name="drivers_using_restart">Se folosește %1$s %2$s. Driverul de afișaj se aplică după repornirea DroidDeck.</string> + <string name="drivers_using_quest">Se folosesc driverul de afișare livrat cu Quest și mediul de execuție implicit.</string> + <string name="drivers_using_quest_restart">Se folosesc driverul de afișare livrat cu Quest și mediul de execuție implicit. Driverul de afișare se aplică după repornirea DroidDeck.</string> + <string name="drivers_not_a_driver">Nu este o arhivă de driver: nici driver AdrenoTools, nici Turnip -Linux, nici pachet Android + Linux</string> + <string name="drivers_import_failed">Importul a eșuat: %1$s</string> + <string name="drivers_imported_unnamed">Driver importat</string> + <string name="drivers_using_bundle">Se folosește %1$s ca driver pentru mediul de execuție și pentru afișaj, deopotrivă.</string> + <string name="drivers_using_bundle_restart">Se folosește %1$s ca driver pentru mediul de execuție și pentru afișaj, deopotrivă. Driverul de afișaj se aplică după repornirea DroidDeck.</string> + <string name="drivers_deleted_bundle">Șters %1$s (ambele drivere)</string> + <string name="drivers_deleted">Șters %1$s</string> + <string name="drivers_release_status">Cele mai recente: %1$s · verificat %2$s</string> + <string name="drivers_release_status_failed">Cele mai recente: %1$s · %2$s inaccesibil · verificat %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">acum %1$d min</item> + <item quantity="few">acum %1$d min</item> + <item quantity="other">acum %1$d min</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">acum %1$d h</item> + <item quantity="few">acum %1$d h</item> + <item quantity="other">acum %1$d h</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">acum %1$d zi</item> + <item quantity="few">acum %1$d zile</item> + <item quantity="other">acum %1$d de zile</item> + </plurals> + <string name="drivers_checking_sources">Se verifică Banners-Turnip, WinNative și DroidDeck…</string> + <string name="drivers_check_failed">verificare eșuată</string> + <string name="drivers_installed_pick_either">Instalat %1$s - alege-l în orice listă pentru a seta ambele drivere</string> + <string name="drivers_installed_pick">Instalat %1$s - alege-l în meniu</string> + + <string name="session_wait_removal">Așteaptă să se termine eliminarea mediului de execuție</string> + <string name="session_title_game">Joc</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">direct</string> + <string name="session_swap_failed">Comutarea a eșuat: %1$s</string> + <string name="session_profile_save_failed">Salvarea profilului a eșuat: %1$s</string> + <string name="session_desktop_paused">Desktopul este pus pe pauză</string> + <string name="session_named_paused">%1$s este pus pe pauză</string> + <string name="session_program_paused">Programul este pus pe pauză</string> + <string name="session_starting_desktop">Se pornește desktopul</string> + <string name="session_starting_named">Se pornește %1$s</string> + <string name="session_starting_program">Se pornește programul</string> + <string name="session_no_logs">Niciun jurnal pentru această sesiune.</string> + <string name="session_logs_archive_failed">Arhiva jurnalelor sesiunii nu a putut fi creată.</string> + <string name="session_logs_share_failed">Jurnalele sesiunii nu au putut fi partajate.</string> + <string name="session_starting_session">Se pornește sesiunea…</string> + <string name="session_runtime_downloading">se descarcă mediul de execuție Linux</string> + <string name="session_runtime_downloading_mb">se descarcă mediul de execuție Linux · %1$d din %2$d MB</string> + <string name="session_runtime_checking">se verifică mediul de execuție Linux</string> + <string name="session_runtime_unpacking">se despachetează mediul de execuție Linux</string> + <string name="session_desktop_downloading">se descarcă desktopul</string> + <string name="session_desktop_downloading_mb">se descarcă desktopul · %1$d din %2$d MB</string> + <string name="session_desktop_checking">se verifică desktopul</string> + <string name="session_desktop_unpacking">se despachetează desktopul</string> + <string name="session_proton_downloading">se descarcă Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">se descarcă Proton Experimental (ARM64) · %1$d din %2$d MB</string> + <string name="session_proton_checking">se verifică Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">se despachetează Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Catalogul mediului de execuție nu a putut fi accesat. Verifică conexiunea și apasă din nou Play.</string> + <string name="session_runtime_install_failed">Mediul de execuție Linux nu s-a instalat. Verifică mediul de execuție în Configurare și apasă din nou Play.</string> + <string name="session_desktop_install_failed">Desktopul nu s-a instalat (%1$s). Verifică conexiunea și apasă din nou Desktop.</string> + <string name="session_ended_named">%1$s s-a oprit neașteptat. Partajează jurnalele cu un raport de eroare, sau încearcă din nou.</string> + <string name="session_ended_program">Programul s-a oprit neașteptat. Partajează jurnalele cu un raport de eroare, sau încearcă din nou.</string> + <string name="session_ended_desktop">Desktopul s-a oprit neașteptat. Partajează jurnalele cu un raport de eroare, sau încearcă din nou.</string> + <string name="session_ended_detail">Stare de ieșire %1$d · %2$s</string> + <string name="session_ended_no_log">niciun jurnal</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Jurnalul arată %1$d eroare „Function not implemented”: accelerarea seccomp a proot nu reușește să ruleze un auxiliar pe acest dispozitiv. Încearcă %2$s → „%3$s” (sau „%4$s”) și pornește din nou.</item> + <item quantity="few">Jurnalul arată %1$d erori „Function not implemented”: accelerarea seccomp a proot nu reușește să ruleze un auxiliar pe acest dispozitiv. Încearcă %2$s → „%3$s” (sau „%4$s”) și pornește din nou.</item> + <item quantity="other">Jurnalul arată %1$d de erori „Function not implemented”: accelerarea seccomp a proot nu reușește să ruleze un auxiliar pe acest dispozitiv. Încearcă %2$s → „%3$s” (sau „%4$s”) și pornește din nou.</item> + </plurals> + + <string name="mode_decky_plugins">Pluginuri</string> + <string name="mode_decky_plugins_hint">Instalează o arhivă ZIP cu un plugin pentru sesiunea Steam următoare.</string> + <string name="mode_decky_plugin_downloading">Se descarcă…</string> + <string name="mode_decky_plugin_install_zip">Instalează din ZIP</string> + <string name="store_cat_games">Jocuri</string> + <string name="store_cat_audio_video">Audio & video</string> + <string name="store_cat_graphics">Grafică</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Birou</string> + <string name="store_cat_developer">Dezvoltare</string> + <string name="store_cat_education">Educație</string> + <string name="store_cat_science">Știință</string> + <string name="store_cat_system">Sistem</string> + <string name="store_cat_utilities">Utilitare</string> + <string name="store_section_popular">Populare</string> + <string name="store_section_trending">În tendințe</string> + <string name="store_section_new">Noi</string> + <string name="store_section_updated">Actualizate</string> + <string name="store_section_loading">se încarcă…</string> + <string name="store_flatpak_setup">Configurare Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Nu s-au putut verifica actualizările pe Flathub</string> + <string name="content_rom_installed">instalat</string> + <string name="content_rom_folder">folder</string> + <string name="theme_graphite">Grafit</string> + <string name="theme_graphite_detail">Suprafețe grafit, cu albastrul propriu al orbului din logo pentru tot ce este selectat, focalizat sau apăsat.</string> + <string name="theme_paper">Hârtie pe negru</string> + <string name="theme_paper_detail">Albul este principal, albastrul iconiței este semnalul pentru linii, cercuri și puncte.</string> + <string name="theme_icon_blue">Albastru iconiță</string> + <string name="theme_icon_blue_detail">Fundal negru, text alb, albastrul pentru tot ce este selectat, focalizat sau apăsat.</string> + <string name="theme_electric">Bleumarin electric</string> + <string name="theme_electric_detail">Albastrul mai strălucitor, pe suprafețe care tind spre bleumarin în loc de gri.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Instalează mai întâi mediul de execuție</string> + <string name="game_sync_err_steam_library">Biblioteca Steam nu este disponibilă</string> + <string name="game_sync_err_previous_sd">Biblioteca SD anterioară nu este disponibilă</string> + <string name="game_sync_err_game_storage">Stocarea jocurilor nu este disponibilă</string> + <string name="game_sync_err_added_games">Folderul de jocuri adăugate nu este disponibil</string> + <string name="game_sync_err_manifests">Manifestele Steam nu sunt disponibile</string> + <string name="content_system_many">Multe sisteme</string> + <string name="fm_drive_internal">Internă</string> + <string name="fm_drive_linux">Sistem Linux</string> + <string name="fm_drive_sd">Card SD</string> + <string name="fm_drive_storage">Stocare</string> + <string name="fm_select">Selectează</string> + <string name="fm_properties">Proprietăți</string> + <string name="fm_favorite_add">Adaugă la Favorite</string> + <string name="fm_favorite_remove">Elimină din Favorite</string> + <string name="fm_rename">Redenumește</string> + <string name="fm_copy">Copiază</string> + <string name="fm_cut">Taie</string> + <string name="fm_actions">Acțiuni</string> + <string name="fm_favorites">Favorite</string> + <string name="fm_pin_current">Fixează folderul curent</string> + <string name="fm_no_favorites">Niciun favorit încă - fixează un folder din meniul său ⋮ pentru a reveni rapid aici.</string> + <string name="fm_unpin_favorite">Elimină din favorite</string> + <string name="fm_size_zero">0 bytes</string> + <string name="fm_unit_bytes">bytes</string> + <string name="fm_prop_location">Locație</string> + <string name="fm_prop_type">Tip</string> + <string name="fm_prop_size">Dimensiune</string> + <string name="fm_prop_modified">Modificat</string> + <string name="fm_type_folder">Folder</string> + <string name="fm_type_file">Fișier</string> + <string name="fm_type_ext_file">Fișier %1$s</string> + <string name="fm_read_only">Doar pentru citire</string> + <string name="fm_read_only_hint">Oprește jocurile (și Wine) de la a suprascrie sau șterge acest fișier.</string> + <string name="fm_read_only_failed">Nu s-a putut schimba Doar pentru citire</string> + <string name="fm_hidden">Ascuns</string> + <string name="fm_hidden_unsupported">Această stocare nu poate salva indicatorul ascuns.</string> + <string name="fm_hidden_hint">Marchează fișierul ca ascuns în Windows (atributul hidden al Wine).</string> + <string name="fm_hidden_failed">Nu s-a putut schimba Ascuns pe această stocare</string> + <string name="fm_done">Terminat</string> + <string name="fm_op_deleting">Se șterge...</string> + <string name="fm_delete_failed">Ștergerea a eșuat</string> + <string name="fm_op_moving">Se mută...</string> + <string name="fm_op_copying">Se copiază...</string> + <string name="fm_op_moving_item">Se mută - %1$s</string> + <string name="fm_op_copying_item">Se copiază - %1$s</string> + <string name="fm_op_moving_batch">Se mută %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Se copiază %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d finalizate, %2$d eșuate</string> + <string name="fm_paste_skipped">%1$d finalizate, %2$d omise</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d element mutat</item> + <item quantity="few">%1$d elemente mutate</item> + <item quantity="other">%1$d de elemente mutate</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d element copiat</item> + <item quantity="few">%1$d elemente copiate</item> + <item quantity="other">%1$d de elemente copiate</item> + </plurals> + <string name="fm_already_exists">„%1$s” deja există</string> + <string name="fm_op_renaming">Se redenumește...</string> + <string name="fm_rename_failed">Redenumirea a eșuat</string> + <string name="fm_op_creating_folder">Se creează folderul...</string> + <string name="fm_create_folder_failed">Folderul nu a putut fi creat</string> + <string name="fm_new_folder">Folder nou</string> + <string name="fm_folder_name">Nume folder</string> + <string name="fm_create">Creează</string> + <string name="fm_new_name">Nume nou</string> + <string name="fm_delete_title">Ștergi?</string> + <string name="fm_delete_text">Ștergi definitiv „%1$s”?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Ștergi %1$d element?</item> + <item quantity="few">Ștergi %1$d elemente?</item> + <item quantity="other">Ștergi %1$d de elemente?</item> + </plurals> + <string name="fm_cannot_undo">Această acțiune nu poate fi anulată.</string> + <plurals name="fm_and_more"> + <item quantity="one">…și încă %1$d</item> + <item quantity="few">…și încă %1$d</item> + <item quantity="other">…și încă %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">Se șterge %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d nu a putut fi șters</item> + <item quantity="few">%1$d nu au putut fi șterse</item> + <item quantity="other">%1$d nu au putut fi șterse</item> + </plurals> + <string name="fm_conflict_merge_hint">Îmbinare adaugă și înlocuiește fișiere în folderul existent.</string> + <string name="fm_conflict_overwrite_hint">Suprascrie înlocuiește fișierul existent.</string> + <string name="fm_conflict_apply_all">Aplică la toate conflictele</string> + <string name="fm_conflict_merge">Îmbinare</string> + <string name="fm_conflict_overwrite">Suprascrie</string> + <string name="fm_conflict_keep_both">Păstrează ambele</string> + <string name="fm_conflict_skip">Omite</string> + <string name="fm_select_this_folder">Selectează acest folder</string> + <string name="fm_back">Înapoi</string> + <string name="fm_drive_not_readable">%1$s este montat, dar nu poate fi citit acum</string> + <string name="fm_list_view">Vizualizare listă</string> + <string name="fm_grid_view">Vizualizare grilă</string> + <string name="fm_search">Căutare</string> + <string name="fm_sort">Sortează</string> + <string name="fm_sort_name">Nume</string> + <string name="fm_sort_date">Data modificării</string> + <string name="fm_rows_comfortable">Rânduri confortabile</string> + <string name="fm_rows_compact">Rânduri compacte</string> + <string name="fm_hide_hidden">Ascunde fișierele ascunse</string> + <string name="fm_show_hidden">Arată fișierele ascunse</string> + <string name="fm_hide_favorites">Ascunde favoritele</string> + <string name="fm_show_favorites">Arată favoritele</string> + <string name="fm_filter_folder">Filtrează acest folder</string> + <string name="fm_free_space">%1$s liber</string> + <string name="fm_selected_count">%1$d selectate</string> + <string name="fm_select_none">Niciunul</string> + <string name="fm_select_all">Toate</string> + <string name="fm_paste">Lipește</string> + <plurals name="fm_items"> + <item quantity="one">%1$d element</item> + <item quantity="few">%1$d elemente</item> + <item quantity="other">%1$d de elemente</item> + </plurals> + <string name="fm_paste_here">Lipește %1$s aici</string> + <string name="fm_paste_move_here">Lipește %1$s (mutare) aici</string> + <string name="fm_rail_title">Fișiere</string> + <string name="fm_rail_storage">STOCARE</string> + <string name="fm_rail_quick">RAPID</string> + <string name="fm_rail_favorites">FAVORITE</string> + <string name="fm_rail_downloads">Descărcări</string> + <string name="fm_rail_downloads_short">Descărc</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Jurnale de sesiune</string> + <string name="fm_rail_pictures">Imagini</string> + <string name="fm_favorite_added">„%1$s” a fost adăugat la Favorite</string> + <string name="fm_favorite_removed">„%1$s” a fost eliminat din Favorite</string> + <string name="fm_empty_directory">Director gol</string> + <string name="fm_up_one_level">Un nivel mai sus</string> + <string name="fm_choose_folder">Alege un folder</string> + <string name="fm_choose_file">Alege un fișier</string> + <string name="ctrl_tint_steam_blue">Albastru Steam</string> + <string name="ctrl_tint_sky">Cer</string> + <string name="ctrl_tint_white">Alb</string> + <string name="ctrl_tint_violet">Violet</string> + <string name="ctrl_tint_green">Verde</string> + <string name="ctrl_tint_amber">Amber</string> + <string name="ctrl_tint_red">Roșu</string> + <string name="ctrl_tint_pink">Roz</string> + <string name="ctrl_button_a">Butonul A</string> + <string name="ctrl_button_b">Butonul B</string> + <string name="ctrl_button_x">Butonul X</string> + <string name="ctrl_button_y">Butonul Y</string> + <string name="ctrl_button_lb">Bumperul stâng</string> + <string name="ctrl_button_rb">Bumperul drept</string> + <string name="ctrl_button_lt">Trigger-ul stâng</string> + <string name="ctrl_button_rt">Trigger-ul drept</string> + <string name="ctrl_button_view">Butonul View</string> + <string name="ctrl_button_menu">Butonul Menu</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad sus</string> + <string name="ctrl_target_down">D-pad jos</string> + <string name="ctrl_target_left">D-pad stânga</string> + <string name="ctrl_target_right">D-pad dreapta</string> + <string name="ctrl_target_hidden">Ascuns</string> + <string name="ctrl_editor_drag">Trage pentru a mișca</string> + <string name="ctrl_editor_snap">Aliniere</string> + <string name="ctrl_editor_save">Salvează</string> + <string name="second_mode_none">Niciunul</string> + <string name="second_mode_keyboard_trackpad">Tastatură + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Mânere + trackpaduri Deck</string> + + <string name="rtinst_removing">Se elimină mediul de execuție Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Se elimină mediul de execuție Linux · %1$d intrare</item> + <item quantity="few">Se elimină mediul de execuție Linux · %1$d intrări</item> + <item quantity="other">Se elimină mediul de execuție Linux · %1$d de intrări</item> + </plurals> + <string name="rtinst_removed">Mediul de execuție Linux eliminat</string> + <string name="rtinst_removal_failed">Eliminarea mediului de execuție Linux nu a putut fi terminată. Reîncearcă eliminarea din Configurare.</string> + <string name="rtinst_removing_leftovers">Se elimină resturile mediului de execuție</string> + <string name="rtinst_downloading">Se descarcă</string> + <string name="rtinst_verifying">Se verifică</string> + <string name="rtinst_extracting">Se extrage</string> + <string name="rtinst_channel_description">Apare cât timp mediul de execuție Linux este instalat sau eliminat</string> + <string name="rtinst_title_installing">Se instalează mediul de execuție Linux</string> + <string name="rtinst_title_removing">Se elimină mediul de execuție Linux</string> + + <string name="deskpkg_runtime_missing">Mediul de execuție Linux nu este instalat</string> + <string name="deskpkg_no_checksum">Catalogul nu are o sumă de control pentru %1$s</string> + <string name="deskpkg_checksum_mismatch">Sumă de control incorectă - nimic nu a fost modificat</string> + <string name="deskpkg_installing">Se instalează %1$s</string> + <string name="deskpkg_place_failed">AppImage-ul nu a putut fi plasat</string> + <string name="deskpkg_extract_failed">Extragerea a eșuat</string> + <string name="deskpkg_install_failed">Instalarea a eșuat</string> + + <string name="flatpakmgr_setup_failed">Configurarea Flatpak a eșuat (cod de ieșire %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Configurarea Flatpak nu s-a terminat</string> + <string name="flatpakmgr_busy">O altă sarcină a magazinului este în curs</string> + <string name="flatpakmgr_not_ready">Configurează mai întâi Flatpak</string> + <string name="flatpakmgr_starting">Se pornește</string> + <string name="flatpakmgr_exit_status">Flatpak s-a închis cu starea %1$d</string> + <string name="flatpakmgr_installing">Se instalează %1$s</string> + <string name="flatpakmgr_updating">Se actualizează %1$s</string> + <string name="flatpakmgr_removing">Se elimină %1$s</string> + <string name="flatpakmgr_installing_step">Se instalează %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Se actualizează %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Se elimină %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">traduceri</string> + <string name="flatpakmgr_ref_graphics_drivers">drivere grafice</string> + <string name="flatpakmgr_ref_media_codecs">codecuri media</string> + <string name="flatpakmgr_ref_runtime">mediul de execuție %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">mediul de execuție %1$s %2$s</string> + + <string name="appimg_too_small">Fișierul este prea mic pentru a fi un AppImage</string> + <string name="appimg_unreadable">Fișierul nu poate fi citit: %1$s</string> + <string name="appimg_not_linux">Acesta nu este un AppImage (nu este un program Linux)</string> + <string name="appimg_wrong_arch">Acest AppImage nu este compilat nici pentru ARM64 (aarch64), nici pentru PC-uri x86</string> + <string name="appimg_not_appimage">Acesta este un program Linux, dar nu este un AppImage</string> + <string name="appimg_wrong_type">Doar AppImage-urile de tip 2 pot fi importate (acesta este de tip %1$d)</string> + <string name="appimg_no_space_import">Spațiu liber insuficient: importul necesită circa %1$s</string> + <string name="appimg_no_space_update">Spațiu liber insuficient: actualizarea necesită circa %1$s</string> + <string name="appimg_import_failed">Importul a eșuat</string> + <string name="appimg_gone">Acel AppImage nu mai există</string> + <string name="appimg_update_failed">Actualizarea a eșuat</string> + <string name="appimg_extracting">Se extrage %1$s</string> + <string name="appimg_extract_failed">AppImage-ul nu a putut fi extras</string> + <string name="appimg_extract_failed_detail">AppImage-ul nu a putut fi extras: %1$s</string> + + <string name="deckymgr_stop_session_loader">Oprește sesiunea activă înainte de a instala Decky Loader</string> + <string name="deckymgr_download_failed">Descărcarea Decky Loader a eșuat</string> + <string name="deckymgr_size_mismatch">Dimensiunea Decky Loader nu s-a potrivit cu metadatele versiunii</string> + <string name="deckymgr_checksum_download_failed">Suma de control a versiunii nu a putut fi descărcată</string> + <string name="deckymgr_checksum_missing">Suma de control a versiunii lipsește</string> + <string name="deckymgr_checksum_invalid">Suma de control a versiunii este invalidă</string> + <string name="deckymgr_checksum_mismatch">Sumă de control incorectă pentru Decky Loader</string> + <string name="deckymgr_not_elf">Fișierul versiunii nu este un executabil Linux pe 64 de biți compatibil</string> + <string name="deckymgr_session_started_loader">O sesiune a pornit în timpul descărcării; oprește-o înainte de a instala Decky Loader</string> + <string name="deckymgr_loader_not_executable">PluginLoader nu a putut fi marcat executabil</string> + <string name="deckymgr_cef_failed">Depanarea la distanță Steam CEF nu a putut fi activată</string> + <string name="deckymgr_stage_failed">PluginLoader nu a putut fi pregătit</string> + <string name="deckymgr_loader_preserve_failed">PluginLoader-ul existent nu a putut fi păstrat</string> + <string name="deckymgr_loader_activate_failed">Noul PluginLoader nu a putut fi activat</string> + <string name="deckymgr_stop_session_plugin">Oprește sesiunea activă înainte de a instala un plugin</string> + <string name="deckymgr_loader_required">Instalează Decky Loader înainte de a importa un plugin</string> + <string name="deckymgr_zip_unreadable">Arhiva ZIP selectată nu a putut fi citită</string> + <string name="deckymgr_plugins_dir_failed">Directorul de pluginuri Decky nu a putut fi creat</string> + <string name="deckymgr_extracting_zip">Se extrage arhiva ZIP a pluginului</string> + <string name="deckymgr_zip_one_folder">Arhiva ZIP a pluginului trebuie să conțină un singur folder de plugin la nivel superior</string> + <string name="deckymgr_zip_missing_files">Arhivei ZIP a pluginului îi lipsesc plugin.json, package.json sau dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Numele pluginului lipsește</string> + <string name="deckymgr_session_started_plugin">O sesiune a pornit în timpul instalării; oprește-o înainte de a instala un plugin</string> + <string name="deckymgr_plugin_installed">Plugin instalat · repornește Steam pentru a-l încărca</string> + <string name="deckymgr_plugin_install_failed">Instalarea arhivei ZIP a pluginului a eșuat</string> + <string name="deckymgr_zip_too_many">Arhiva ZIP a pluginului conține prea multe intrări</string> + <string name="deckymgr_zip_invalid_path">Arhiva ZIP a pluginului conține o cale invalidă</string> + <string name="deckymgr_zip_duplicate_paths">Arhiva ZIP a pluginului conține căi duplicate</string> + <string name="deckymgr_zip_unsafe_path">Arhiva ZIP a pluginului conține o cale nesigură</string> + <string name="deckymgr_folder_failed">Folderul pluginului nu a putut fi creat</string> + <string name="deckymgr_zip_too_large">Arhiva ZIP a pluginului se extinde peste limita de 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Binarul pluginului inclus nu a putut fi marcat executabil</string> + <string name="deckymgr_remote_entry_invalid">Intrare remote_binary invalidă</string> + <string name="deckymgr_remote_name_invalid">Nume de binar la distanță invalid</string> + <string name="deckymgr_remote_url_https">URL-ul binarului la distanță trebuie să folosească HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Binarul la distanță %1$s are un hash SHA-256 invalid</string> + <string name="deckymgr_bin_dir_failed">Directorul bin al pluginului nu a putut fi creat</string> + <string name="deckymgr_downloading_binary">Se descarcă binarul pluginului · %1$s</string> + <string name="deckymgr_binary_download_failed">Binarul pluginului %1$s nu a putut fi descărcat</string> + <string name="deckymgr_binary_checksum_mismatch">Sumă de control incorectă pentru binarul pluginului · %1$s</string> + <string name="deckymgr_binary_not_executable">Binarul pluginului nu a putut fi marcat executabil · %1$s</string> + <string name="deckymgr_binary_replace_failed">Binarul pluginului nu a putut fi înlocuit · %1$s</string> + <string name="deckymgr_binary_install_failed">Binarul pluginului nu a putut fi instalat · %1$s</string> + <string name="deckymgr_folder_taken">Folderul pluginului aparține altui plugin</string> + <string name="deckymgr_preserve_failed">Pluginul existent nu a putut fi păstrat</string> + <string name="deckymgr_activate_failed">Pluginul importat nu a putut fi activat</string> + <string name="deckymgr_settings_failed">Setările pluginului Decky nu au putut fi actualizate</string> + <string name="deckymgr_restore_failed">Pluginul existent nu a putut fi restaurat</string> + + <string name="adbfix_save_failed">Identitatea Depanării wireless nu a putut fi salvată</string> + <string name="adbfix_command_failed">Comanda ADB a eșuat (%1$d)</string> + <string name="adbfix_not_confirmed">Android nu a confirmat modificarea limitei proceselor-copil: %1$s</string> + <string name="adbfix_no_pairing">Nicio asociere de Depanare wireless nu este salvată</string> + <string name="adbfix_enter_address">Introdu adresa IP și portul curente ale Depanării wireless</string> + + <string name="adbpair_timed_out">Timpul a expirat în așteptarea ferestrei de asociere. Încearcă din nou din DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Fereastra de asociere nu a putut fi căutată (%1$d). Verifică dacă Wi-Fi-ul este activat.</string> + <string name="adbpair_discovery_failed">Fereastra de asociere nu a putut fi căutată: %1$s</string> + <string name="adbpair_six_digits">Introdu toate cele 6 cifre ale codului</string> + <string name="adbpair_pairing">Se asociază…</string> + <string name="adbpair_code_rejected">Acel cod nu a funcționat. Deschide din nou fereastra de asociere și introdu noul său cod.</string> + <string name="adbpair_connecting">Asociat. Se conectează…</string> + <string name="adbpair_port_not_found">Asociat, dar portul de Depanare wireless nu a fost găsit. Lasă Depanarea wireless activată și încearcă din nou.</string> + <string name="adbpair_applying">Se aplică setarea…</string> + <string name="adbpair_command_failed">Comanda Depanării wireless a eșuat</string> + <string name="adbpair_channel_name">Configurarea Depanării wireless</string> + <string name="adbpair_channel_description">Cere codul de asociere al Depanării wireless cât timp Setările sunt deschise</string> + <string name="adbpair_title_pair">Asociază Depanarea wireless</string> + <string name="adbpair_waiting_text">Activează Depanarea wireless, apoi apasă „Asociază dispozitivul cu un cod de asociere”.</string> + <string name="adbpair_waiting_long">Activează Depanarea wireless, apoi apasă „Asociază dispozitivul cu un cod de asociere”. Rămâi în Setări: codul apare în această notificare.</string> + <string name="adbpair_code_label">Cod de asociere din 6 cifre</string> + <string name="adbpair_code_hint">Apasă Introdu codul și scrie cele 6 cifre arătate în Setări.</string> + <string name="adbpair_title_code">Introdu codul de asociere Wi-Fi</string> + <string name="adbpair_title_retry">Încearcă codul din nou</string> + <string name="adbpair_enter_code">Introdu codul</string> + <string name="adbpair_title_working">Se configurează Steam</string> + <string name="adbpair_title_done">Steam este pregătit</string> + <string name="adbpair_done_text">Apasă pentru a reveni la DroidDeck. Poți dezactiva acum Depanarea wireless.</string> + <string name="adbpair_title_failed">Configurarea Depanării wireless s-a oprit</string> + + <string name="selfinst_download_failed">Descărcarea a eșuat</string> + <string name="selfinst_size_mismatch">Dimensiunea descărcării nu s-a potrivit cu APK-ul publicat și a fost abandonată - încearcă din nou</string> + <string name="selfinst_checksum_mismatch">Descărcarea nu s-a potrivit cu suma sa de control și a fost abandonată - încearcă din nou</string> + <string name="selfinst_wrong_package">Actualizarea este pentru pachetul Android %1$s, nu %2$s</string> + <string name="selfinst_metadata_signer">Metadatele actualizării nu numesc cheia de semnare de lansare a DroidDeck</string> + <string name="selfinst_unreadable">Android nu a putut citi APK-ul descărcat</string> + <string name="selfinst_apk_wrong_package">APK-ul descărcat este pentru %1$s, nu %2$s</string> + <string name="selfinst_version_mismatch">APK-ul descărcat spune versionCode %1$d, nu cel publicat %2$d</string> + <string name="selfinst_downgrade">Android nu va instala versionCode %1$d peste cel instalat %2$d</string> + <string name="selfinst_no_signing">APK-ul descărcat nu are informații de semnare</string> + <string name="selfinst_wrong_signer">APK-ul descărcat nu este semnat cu cheia de lansare a DroidDeck</string> + <string name="appupd_http">Catalogul de actualizări a răspuns cu HTTP %1$d</string> + + <string name="loadstate_starting">Se pornește sesiunea…</string> + <string name="loadstate_elapsed">%1$d:%2$02d scurse · încă se lucrează</string> + <string name="loadstate_steam_update">Se descarcă actualizarea clientului Steam · %1$d%%</string> + <string name="loadstate_steam_client">Se descarcă clientul Steam · %1$s</string> + + <string name="pextra_busy">O instalare a unui instrument de compatibilitate este deja în curs</string> + <string name="pextra_stop_session">Oprește sesiunea activă înainte de a instala instrumente de compatibilitate</string> + <string name="pextra_no_release">Nu s-a găsit o versiune ARM64 pentru %1$s</string> + <string name="pextra_no_space">Este necesar cel puțin 4 GB liber, plus dimensiunea descărcării, pentru a instala %1$s</string> + <string name="pextra_downloading">Se descarcă %1$s %2$s</string> + <string name="pextra_retrying">Se reîncearcă descărcarea · tentativa %1$d din %2$d</string> + <string name="pextra_interrupted">Descărcare întreruptă</string> + <string name="pextra_download_failed">Descărcarea a eșuat; fișierul parțial este păstrat astfel încât o reîncercare să poată continua</string> + <string name="pextra_too_big">Descărcarea a depășit dimensiunea versiunii și a fost ștearsă</string> + <string name="pextra_incomplete">Descărcarea a fost incompletă; fișierul parțial este păstrat pentru o reîncercare care poate continua</string> + <string name="pextra_verifying">Se verifică descărcarea</string> + <string name="pextra_checksum_unreadable">Suma de control a versiunii nu a putut fi citită; încearcă din nou</string> + <string name="pextra_no_checksum">%1$s %2$s nu publică o sumă de control; nimic nu a fost instalat</string> + <string name="pextra_checksum_mismatch">Sumă de control incorectă; descărcarea a fost ștearsă</string> + <string name="pextra_session_started">O sesiune a pornit în timpul descărcării; oprește-o înainte de a instala instrumente de compatibilitate</string> + <string name="pextra_installing">Se instalează %1$s</string> + <string name="pextra_install_failed">Instalarea %1$s a eșuat (cod de ieșire %2$d)</string> + <string name="pextra_could_not_install">%1$s nu a putut fi instalat</string> + <string name="esync_fetching">Se obține pachetul droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">cu auxiliare Linux</string> + <string name="cmgr_fex_dlls_only">doar DLL-uri</string> + <string name="cmgr_original_proton_updated">Original (Proton actualizat de la ultima comutare)</string> + <string name="cmgr_changed_outside">Modificat în afara Componentelor</string> + <string name="cmgr_not_present">absent</string> + <string name="cmgr_original_version">Original %1$s</string> + <string name="cmgr_original_from">Original din %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s intră în %3$s când jocul care rulează pe el se închide.</string> + <string name="cmgr_swap_done">%1$s %2$s este acum în %3$s. Se aplică la următoarea pornire a unui joc.</string> + <string name="cmgr_original_missing">Acel pachet original nu este salvat</string> + <string name="cmgr_restore_queued">%1$s al %2$s revine la original când jocul care rulează pe el se închide.</string> + <string name="cmgr_restore_done">%1$s al %2$s restaurat din originalul său %3$s.</string> + <string name="cmgr_package_in_use">%1$s este în uz în %2$s. Comută mai întâi acel Proton la altceva.</string> + <string name="cmgr_package_not_stored">%1$s nu este salvat</string> + <string name="cmgr_deleted">Șters %1$s.</string> + <string name="cmgr_original_kept">Originalul versiunii instalate este păstrat: este calea de revenire.</string> + <string name="cmgr_not_stored">Nesalvat</string> + <string name="cmgr_deleted_original">S-a șters originalul %1$s al %2$s.</string> + <string name="cmgr_nightlies_only">Descărcările vin doar din versiunile Nightlies</string> + <string name="cmgr_list_predates_checksums">Această listă de pachete e anterioară sumelor de control - reîmprospătează-o și încearcă din nou</string> + <string name="cmgr_checksum_mismatch">Sumă de control incorectă</string> + + <string name="sprefs_upscaler_linear">Liniar</string> + <string name="sprefs_upscaler_nearest">Cel mai apropiat</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (calitate)</string> + <string name="sprefs_upscaler_sharpen">Doar claritate</string> + <string name="sprefs_lod_bias_auto">Automat (se potrivește cu scalarea)</string> + + <string name="look_off_desc">Nimic aplicat.</string> + <string name="look_game_clarity">Claritate de joc</string> + <string name="look_game_clarity_desc">Claritate cu puțin contrast - cea de zi cu zi.</string> + <string name="look_vivid">Viu</string> + <string name="look_vivid_desc">Culoare intensificată puternic. Eliminarea benzilor activată, ca cerurile să nu aibă dungi.</string> + <string name="look_cinematic">Cinematic</string> + <string name="look_cinematic_desc">Contrast mai profund, culoare mai rece, margini netezite.</string> + <string name="look_competitive">Competitiv</string> + <string name="look_competitive_desc">Umbre ridicate și claritate puternică - observă persoanele mai întâi.</string> + <string name="look_adaptive_sharpen">Claritate adaptivă</string> + <string name="look_adaptive_sharpen_desc">Doar claritate, culoarea neschimbată.</string> + <string name="look_filmic">Filmic</string> + <string name="look_filmic_desc">Curbă asemănătoare filmului, puțin estompată.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Zgomotos și intens.</string> + <string name="look_retro_crt">CRT retro</string> + <string name="look_retro_crt_desc">Tubul CRT și semnalul analogic trec împreună.</string> + <string name="look_upscale_sharp">Scalare clară</string> + <string name="look_upscale_sharp_desc">Pentru a rula sub rezoluția panoului.</string> + <string name="look_pixel_clean">Pixeli curați</string> + <string name="look_pixel_clean_desc">Pixeli clari pentru 2D și titluri vechi.</string> + <string name="look_anime_edge">Margini anime</string> + <string name="look_anime_edge_desc">Contururi toon plus claritate.</string> + + <string name="gpuinfo_not_adreno">Nu este un GPU Adreno</string> + <string name="gpuinfo_supported">Acceptat</string> + <string name="gpuinfo_experimental">Experimental: driverele sale sunt versiuni de test</string> + <string name="gpuinfo_below_tested">Sub hardware-ul testat (Adreno 725 și mai nou): poate să nu ruleze</string> + <string name="gpuinfo_unsupported">Neacceptat: DroidDeck are nevoie de un GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">S-a atins limita de solicitări a GitHub - încearcă din nou mai târziu</string> + <string name="turnip_github_http">GitHub a răspuns cu HTTP %1$d</string> + <string name="turnip_download_failed">Descărcarea a eșuat</string> + <string name="turnip_list_predates_checksums">Această listă de drivere e anterioară sumelor de control - reîmprospătează-o și încearcă din nou</string> + <string name="turnip_checksum_mismatch">Sumă de control incorectă - descărcarea a fost abandonată</string> + <string name="turnip_not_adrenotools">Nu este un driver AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">fără meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json nu poate fi citit (%1$s)</string> + <string name="turnip_reject_linux_driver">acesta este un driver pentru mediul de execuție Linux (importă-l la „Driver pentru mediul de execuție Linux”)</string> + <string name="turnip_reject_wayland">acesta este un driver de joc Wayland, pe care această aplicație nu îl poate folosi</string> + <string name="turnip_reject_no_library_name">meta.json nu numește niciun libraryName, așa că nimic nu a putut fi oferit către AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json numește %1$s, care nu este în arhivă</string> + <string name="turnip_reject_not_aarch64">%1$s nu este o bibliotecă partajată ELF AArch64 pe 64 de biți</string> + <string name="turnip_reject_glibc">%1$s leagă glibc - un Turnip „-Linux”, care aparține la „Driver pentru mediul de execuție Linux”</string> + <string name="lvd_no_library">Niciun libvulkan_freedreno*.so în această arhivă. O arhivă Turnip Android (AdrenoTools) sau „-Wayland” nu este un driver pentru mediul de execuție Linux.</string> + <string name="lvd_not_aarch64">%1$s nu este o bibliotecă partajată ELF AArch64 pe 64 de biți.</string> + <string name="lvd_not_glibc">%1$s nu este un driver glibc - leagă libc-ul Android. Mediul de execuție Linux are nevoie de o arhivă „-Linux”; un Turnip simplu sau „-Wayland” nu poate fi încărcat deloc de clientul Steam.</string> + <string name="bundle_no_manifest">Nu este un pachet de drivere: niciun manifest.json nu numește un driver android și unul linux</string> + <string name="bundle_entry_outside">Nu este un pachet de drivere: %1$s indică în afara lui</string> + <string name="bundle_too_large">Nu este un pachet de drivere: se despachetează la mai mult de %1$d MB</string> + + <string name="gstore_sd_card">Card SD</string> + <string name="gstore_folder">Folder</string> + + <string name="logshare_chooser">Partajează jurnalele sesiunii</string> + + <string name="hdr_needs_android_10">necesită Android 10 sau mai nou (straturi de afișaj cu un spațiu de culoare)</string> + <string name="hdr_none">acest afișaj nu raportează suport HDR</string> + <string name="hdr_not_hdr10">acest afișaj acceptă %1$s, nu HDR10</string> + + <string name="gpu_this_gpu">acest GPU</string> + <string name="phantom_title_on">Limita proceselor-copil este activă</string> + <string name="phantom_title_unset">Limita proceselor-copil nu este setată</string> + <string name="phantom_title_unreadable">Limita proceselor-copil nu a putut fi verificată</string> + <string name="phantom_title_off">Limita proceselor-copil este dezactivată</string> + <string name="phantom_title_not_required">Limita proceselor-copil nu este necesară</string> + <string name="phantom_instructions_fix">%1$s Dacă nu este posibil, conectează acest dispozitiv la un computer cu ADB și rulează comanda de mai jos. Revino aici și verifică din nou.</string> + <string name="phantom_instructions_off">Sesiunile Steam pot porni.</string> + <string name="phantom_instructions_not_applicable">Această versiune de Android nu folosește această limită.</string> + <string name="phantom_fix_toggle">Activează „Dezactivează restricțiile pentru procese secundare” în Opțiunile pentru dezvoltatori, și lasă Opțiunile pentru dezvoltatori activate după aceea.</string> + <string name="phantom_fix_no_toggle">Această versiune de Android nu are un comutator pentru asta. Folosește Depanarea wireless pentru a o schimba de pe acest dispozitiv.</string> + <string name="upd_block_no_apk">Această versiune nu are o descărcare pentru această copie de DroidDeck.</string> + <string name="upd_block_version_code">Android nu o va instala peste această versiune pentru că versionCode %1$d este sub cel instalat %2$d.</string> + <string name="upd_fail_downgrade">Android nu va instala o versiune mai veche peste una mai nouă. Rămâi pe această versiune până când canalul ajunge din urmă.</string> + <string name="upd_fail_signature">Această copie de DroidDeck este semnată diferit (o versiune locală?), așa că Android nu o va actualiza pe loc.</string> + <string name="upd_fail_storage">Nu este suficient spațiu liber pentru actualizare.</string> + <string name="upd_fail_aborted">Actualizarea a fost anulată.</string> + <string name="upd_fail_with_message">Actualizarea nu s-a instalat: %1$s</string> + <string name="upd_fail_generic">Actualizarea nu s-a instalat.</string> + <string name="saves_layout_zip">Arhivă %1$s</string> + <string name="saves_zip">arhivă</string> + <string name="saves_not_launched">%1$s nu a fost lansat încă</string> + <string name="saves_none_found">Niciun fișier de salvare găsit pentru %1$s</string> + <string name="saves_not_save_zip">%1$s nu are un folder drive_c, așa că nu este o arhivă de salvare GameHub sau Winlator</string> + <string name="gstore_cannot_create">nu se pot crea foldere în %1$s</string> + <string name="gstore_cannot_write">nu se poate scrie în %1$s</string> + <string name="gstore_cannot_write_detail">nu se poate scrie în %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Folderul nu este disponibil</string> + <string name="gfiles_name_taken">Un fișier diferit folosește deja %1$s</string> + <string name="gfiles_art_unavailable">Folderul de grafică nu este disponibil</string> + <string name="gfiles_unrelated_inventory">Folderul are un inventar de sincronizare neînrudit</string> + <string name="gfiles_remove_failed">%1$s nu a putut fi eliminat</string> + <string name="gfiles_outside_folder">Fișierul lasă folderul de export</string> + <string name="cmgr_fex_unnamed">FEX (versiune fără nume de versiune)</string> + <string name="cmgr_no_profile">niciun profile.json în %1$s</string> + <string name="cmgr_not_component_package">%1$s nu este un pachet de componente Linux (tip %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s liber</string> + <string name="mode_storage_auto_short">Automat</string> + <string name="appupd_catalog_rejected">Catalogul de actualizări nu a trecut verificările (%1$s)</string> + <string name="main_adb_clip_label">Setarea proceselor-copil DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Autentificat · mod offline</string> + <string name="setup_signed_in_unnamed">Autentificat</string> + <string name="driver_tag_bundled">INCLUS</string> + <string name="driver_tag_downloaded">DESCĂRCAT</string> + <string name="driver_tag_imported">IMPORTAT</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Afișajul sesiunii</string> + <string name="display_resolution">Rezoluție</string> + <string name="display_game_fit">Potrivire joc 16:9</string> + <string name="display_game_fit_hint">Cum se potrivesc jocurile 16:9 cu acest afișaj. Sesiunea următoare.</string> + <string name="display_game_fit_unavailable">Alege Potrivire ecran sau o dimensiune personalizată mai îngustă decât 16:9.</string> + <string name="display_preserve">Păstrează proporțiile</string> + <string name="display_stretch">Întinde pe afișaj</string> + <string name="display_image_scaling">Scalarea imaginii</string> + <string name="display_filter">Filtru de scalare</string> + <string name="display_filter_hint">Partajat de Steam și Desktop.</string> + <string name="display_filter_live">Se aplică live. Partajat de Steam și Desktop.</string> + <string name="display_filter_note">FSR, GSR și NIS se aplică la mărirea imaginii sesiunii. Doar claritate funcționează și fără mărire.</string> + <string name="display_sharpness">Claritatea filtrului</string> + <string name="display_frame_rate">Rata de cadre</string> + <string name="display_look_filter">%1$s Setează scalarea la %2$s.</string> + <string name="display_match_screen">Potrivire ecran (%1$d×%2$d)</string> + <string name="display_follow_screen">Urmărește ecranul (se redimensionează la împăturire sau desfacere)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Arată detaliile dispozitivului</string> + <string name="device_info_hide">Ascunde detaliile dispozitivului</string> + <string name="device_info_loading">Se citește dispozitivul…</string> + <string name="device_info_copy">Copiază</string> + <string name="device_info_copy_hint">Copiază aceste detalii într-un raport de eroare.</string> + <string name="device_info_copied">Copiat.</string> + <string name="force_ssbs_title">Forțează SSBS</string> + <string name="force_ssbs_hint">Păstrează o setare de viteză a CPU-ului pe care Wine o dezactivează mereu. Poate face jocurile Windows mai rapide pe Snapdragon 8 Elite; schimbare mică observată pe cipuri mai vechi. Se aplică la următoarea lansare a jocului.</string> + + <string name="rail_stores">Magazine</string> + <string name="source_steam">Steam</string> + <string name="source_added">Personalizat</string> + <string name="setup_stores">Magazine</string> + <string name="setup_stores_open_on">Deschide un magazin pe</string> + <string name="setup_stores_speed">Nivelul vitezei de descărcare</string> + <string name="setup_stores_engine">Motorul magazinelor</string> + <string name="setup_stores_engine_chip_ready">● Motor pregătit</string> + <string name="setup_stores_engine_chip_missing">Necompilat</string> + <string name="stores_tier_balanced">Echilibrat</string> + <string name="stores_tier_fast">Rapid</string> + <string name="stores_tier_max">Maxim</string> + <string name="stores_title">Magazine</string> + <string name="stores_settings">Setările magazinelor</string> + <string name="stores_settings_eyebrow">Setări</string> + <string name="stores_chip_signed_out">(neautentificat)</string> + <string name="stores_tab_store">Magazin</string> + <string name="stores_tab_installed">Instalate</string> + <string name="stores_tab_library">Bibliotecă</string> + <string name="stores_tab_all">Toate</string> + <string name="stores_tab_downloads">Descărcări</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Autentificare</string> + <string name="stores_signout_named">%1$s · deconectare</string> + <string name="stores_signout_title">Te deconectezi de la %1$s?</string> + <string name="stores_signout_note">Jocurile instalate rămân. Biblioteca este reîncărcată când te autentifici din nou.</string> + <string name="stores_signout_stay">Rămâi autentificat</string> + <string name="stores_signout_go">Deconectare</string> + <string name="stores_search_catalog">Caută în catalogul %1$s…</string> + <string name="stores_search_installed">Caută jocurile instalate…</string> + <string name="stores_search_library">Caută în biblioteca ta…</string> + <string name="stores_search_open">Căutare</string> + <string name="stores_installed_empty">Nimic instalat</string> + <string name="stores_library_loading">Se încarcă</string> + <string name="stores_nothing_matches">Niciun joc</string> + <string name="stores_shelves_loading">Se încarcă magazinul…</string> + <string name="stores_amazon_no_catalog">Niciun catalog</string> + <string name="stores_shelf_new">Noutăți</string> + <string name="stores_shelf_deals">Oferte</string> + <string name="stores_shelf_free">Jocuri gratuite</string> + <string name="stores_shelf_trending">În tendințe</string> + <string name="stores_shelf_library">Biblioteca ta</string> + <string name="stores_play">Joacă</string> + <string name="stores_install">Instalează</string> + <string name="stores_resume_install">Reia instalarea</string> + <string name="stores_dl_interrupted">Întreruptă</string> + <string name="stores_install_size">Instalare · %1$s</string> + <string name="stores_get_free">Obține gratuit</string> + <string name="stores_view_on">Vezi pe %1$s</string> + <string name="stores_buy_price">Cumpără · %1$s</string> + <string name="stores_installed_chip">Instalat</string> + <string name="stores_in_library">În bibliotecă</string> + <string name="stores_free">Gratuit</string> + <string name="stores_resume">Reluare</string> + <string name="stores_refresh">Reîmprospătează</string> + <string name="stores_sort">Sortează</string> + <string name="stores_sort_last_played">Jucate recent</string> + <string name="stores_sort_recently_installed">Instalate recent</string> + <string name="stores_sort_title_asc">Titlu A–Z</string> + <string name="stores_sort_title_desc">Titlu Z–A</string> + <string name="stores_sort_size_desc">Dimensiune: cea mai mare</string> + <string name="stores_sort_size_asc">Dimensiune: cea mai mică</string> + <string name="stores_sort_release_date">Data lansării</string> + <string name="stores_view_list">Vizualizare listă</string> + <string name="stores_view_cards">Vizualizare carduri</string> + <string name="stores_show_mature">Arată conținutul pentru adulți</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Dezactivat</string> + <string name="epic_eos">Autentificare Epic (EOS)</string> + <string name="epic_offline">Lansează offline</string> + <string name="epic_resolve">Rezolvă autentificarea Epic</string> + <string name="epic_client_version">Versiunea %1$s</string> + <string name="epic_client_no_runtime">Instalează mai întâi mediul de execuție Linux</string> + <string name="epic_client_checking">Se verifică cea mai recentă versiune…</string> + <string name="epic_client_unpacking">Se dezarhivează…</string> + <string name="epic_client_unreachable">Serverul de descărcare nu a răspuns</string> + <string name="epic_client_needs_fex">Epic Games Launcher are nevoie de FEX, pe care îl descarcă Steam. Deschide din nou launcherul după ce pornește Steam.</string> + <string name="epic_client_download_failed">Descărcarea a eșuat: %1$s</string> + <string name="epic_client_unpack_failed">Launcherul nu a putut fi dezarhivat: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher nu a acceptat autentificarea. Pornește-l din nou din launcher.</string> + <string name="epic_client_uninstall_body">Elimină lansatorul și îi eliberează spațiul. Jocurile Epic rămân instalate și funcționează, iar autentificarea se păstrează pentru o reinstalare.</string> + <string name="epic_client_uninstall_stops">Sesiunea în curs se închide mai întâi.</string> + <string name="epic_client_uninstalled">Epic Games Launcher a fost dezinstalat</string> + <string name="epic_client_uninstall_failed">Unele fișiere ale lansatorului nu au putut fi eliminate. Încearcă din nou.</string> + <string name="epic_client_uninstalling">Așteaptă să se termine dezinstalarea Epic Games Launcher</string> + <string name="store_cloud_saves">Salvări în cloud</string> + <string name="cloud_upload">Încarcă în cloud</string> + <string name="cloud_download">Descarcă din cloud</string> + <string name="cloud_none">Nicio salvare în cloud</string> + <string name="cloud_conflict">Conflict în cloud</string> + <string name="cloud_conflict_files">Conflict în cloud · %1$d fișiere</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Păstrează cloud</string> + <string name="cloud_keep_local">Păstrează local</string> + <string name="cloud_checking">Se verifică cloud-ul…</string> + <string name="cloud_last_sync">Ultima sincronizare %1$s</string> + <string name="cloud_never">Nesincronizat încă</string> + <string name="cloud_done">%1$d fișiere</string> + <string name="stores_eyebrow_installed">instalat</string> + <string name="stores_eyebrow_library">în biblioteca ta</string> + <string name="stores_eyebrow_store">magazin</string> + <string name="achievements_title">Realizări</string> + <string name="achievements_count">%1$d din %2$d deblocate</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Deblocate · %1$d</string> + <string name="achievements_group_locked">Blocate · %1$d</string> + <string name="achievements_group_hidden">Ascunse · %1$d</string> + <string name="achievements_hidden">Realizare ascunsă</string> + <string name="achievements_hidden_detail">Detaliile apar după deblocare.</string> + <string name="achievements_all">Toate realizările deblocate</string> + <string name="achievements_reading">Se încarcă…</string> + <string name="achievements_signed_out">Conectează-te la %1$s pentru a-ți vedea realizările.</string> + <string name="achievements_unreachable">Nu s-a putut contacta %1$s. Verifică din nou când ești online.</string> + <string name="achievements_none">%1$s nu listează realizări pentru acest joc.</string> + <string name="achievements_show_all">Arată toate cele %1$d</string> + <string name="achievements_dialog_title">Realizări · %1$s</string> + <string name="stores_in_steam">✓ În Steam</string> + <string name="stores_uninstall">Dezinstalează</string> + <string name="stores_uninstalling">Se dezinstalează…</string> + <string name="stores_uninstall_title">Dezinstalezi %1$s?</string> + <string name="stores_uninstall_body_size">Eliberează %1$s și îl elimină din Steam.</string> + <string name="stores_uninstall_body">Elimină fișierele sale și comanda rapidă din Steam.</string> + <string name="stores_launch_not_registered">Steam preia jocul la următoarea pornire; lansează-l de acolo, sau pornește Steam acum.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Alegerea Steam per joc</string> + <string name="stores_card_audio">Sunet</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Componente</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motor</string> + <string name="stores_card_engine_value">%1$s · nativ</string> + <string name="stores_card_engine_java">%1$s · integrat</string> + <string name="stores_how_it_runs">Cum rulează</string> + <string name="stores_kv_fetched">Obținut din</string> + <string name="stores_kv_fetched_value">%1$s, cu contul tău</string> + <string name="stores_kv_installed_to">Instalat în</string> + <string name="stores_kv_installed_to_value">Stocarea jocurilor (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Lansat de</string> + <string name="stores_kv_launched_by_value">Steam și Proton, aceeași cale ca jocurile Steam</string> + <string name="stores_kv_launched_by_epic">Steam și Proton · Autentificare Epic la fiecare lansare, suprapunerea EOS dezactivată</string> + <string name="stores_kv_launched_by_amazon">Steam și Proton · Variabile Amazon Games Services setate</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">adăugat la Steam la instalare (interfață Deck + Steam Input)</string> + <string name="stores_downloads_empty">Nicio descărcare</string> + <string name="stores_dl_paused">Pe pauză</string> + <string name="stores_dl_queued">În așteptare</string> + <string name="stores_dl_queued_at">În așteptare · #%1$d</string> + <string name="stores_dl_cancelled">Anulată</string> + <string name="stores_dl_failed">Eșuată</string> + <string name="stores_dl_failed_reason">Eșuată · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pauză</string> + <string name="stores_dl_resume">Reluare</string> + <string name="stores_dl_cancel">Anulează</string> + <string name="stores_dl_retry">Reîncearcă</string> + <string name="stores_dl_clear">Șterge</string> + <string name="stores_dl_clear_all">Șterge cele finalizate</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Descărcare</string> + <string name="stores_stage_verify">Verificare</string> + <string name="stores_stage_install">Instalare</string> + <string name="stores_stage_done">Terminat</string> + <string name="stores_stage_checking">Se verifică</string> + <string name="stores_stage_downloading">Se descarcă</string> + <string name="stores_dl_cancel_confirm">Ștergi descărcarea?</string> + <string name="stores_dl_failed_kept">Eșuată · %1$s păstrat</string> + <string name="stores_stage_verifying">Se verifică</string> + <string name="stores_stage_installing">Se instalează</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d fișiere</string> + <string name="stores_download_manager">Administrator de descărcări</string> + <string name="stores_parallel">Descărcări simultane</string> + <string name="stores_install_where">Instalează în</string> + <string name="stores_install_title">Instalezi %1$s:</string> + <string name="stores_target_internal">Internă</string> + <string name="stores_target_free">%1$s liber</string> + <string name="stores_target_free_unknown">Spațiu liber necunoscut</string> + <string name="stores_storage_insufficient">Spațiu liber insuficient: e nevoie de %1$s, sunt disponibili doar %2$s</string> + <string name="stores_storage_low">Spațiu redus (%1$s liber, e nevoie de %2$s)</string> + <string name="stores_notification_channel">Descărcări din magazin</string> + <string name="stores_notification_channel_hint">Arată progresul descărcării jocului și păstrează descărcările în execuție în fundal</string> + <string name="stores_notification_one">Se descarcă</string> + <string name="stores_notification_many">%1$d descărcări</string> + <string name="stores_notification_waiting">Se pregătește…</string> + <string name="stores_notification_done_channel">Descărcări din magazin finalizate</string> + <string name="stores_notification_installed">%1$s instalat</string> + <string name="stores_notification_failed">Descărcarea %1$s a eșuat</string> + <string name="stores_notification_delete">Șterge</string> + <string name="stores_notification_keep">Păstrează</string> + <string name="stores_login_title">Autentifică-te la %1$s</string> + <string name="stores_login_provider_title">Autentifică-te cu furnizorul tău</string> + <string name="stores_login_reload">Reîncarcă</string> + <string name="stores_login_close">Închide</string> + <string name="stores_login_retry">Încearcă din nou</string> + <string name="stores_login_finishing">Se finalizează autentificarea…</string> + <string name="stores_login_error_network">Pagina de autentificare nu a putut fi încărcată: %1$s</string> + <string name="stores_login_error_idp_blocked">Acest furnizor refuză autentificarea dintr-o pagină încorporată. Autentifică-te cu parola magazinului în schimb.</string> + <string name="stores_login_error_http">Pagina de autentificare a răspuns cu o eroare (HTTP %1$d).</string> + <string name="stores_login_error_ssl">Conexiunea la pagina de autentificare nu este sigură.</string> + <string name="stores_login_error_verification">Autentificarea nu a putut fi verificată. Încearcă din nou.</string> + <string name="stores_login_error_generic">Autentificarea a eșuat. Încearcă din nou.</string> + <string name="common_close">Închide</string> + <string name="common_back">Înapoi</string> + <string name="common_edit">Editează</string> + <string name="games_add_all">Adaugă toate jocurile din acest folder</string> + <string name="games_added_none">Nimic nou în acest folder</string> + <string name="edit_name">Nume</string> + <string name="edit_target">Țintă</string> + <string name="edit_start_in">Pornește în</string> + <string name="edit_launch_options">Opțiuni de lansare</string> + <string name="edit_artwork">Grafică</string> + <string name="edit_other_exe">Alt exe…</string> + <string name="edit_remove">Elimină</string> + <string name="art_cover">Copertă</string> + <string name="art_wide_cover">Copertă lată</string> + <string name="art_adjust_logo">Ajustează logo-ul</string> + <string name="logo_pos_default">Implicit</string> + <string name="logo_pos_upper_left">Sus stânga</string> + <string name="logo_pos_upper_center">Sus centru</string> + <string name="logo_pos_center">Centru</string> + <string name="logo_pos_bottom_left">Jos stânga</string> + <string name="logo_pos_bottom_center">Jos centru</string> + <string name="logo_pos_position">Poziție</string> + <string name="logo_pos_size">Dimensiune</string> + <string name="logo_pos_save">Salvează</string> + <string name="logo_pos_reset">Revino la implicit</string> + <string name="logo_pos_hint">Se desenează peste fundalul jocului, ca în Steam. Poziția exactă poate diferi cu câțiva pixeli.</string> + <string name="logo_pos_no_logo">Acest joc nu are încă un logo. Alege unul la Logo ca să îl vezi aici.</string> + <string name="logo_pos_failed">Poziția logo-ului nu a putut fi salvată. Încearcă din nou.</string> + <string name="art_background">Fundal</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Iconiță</string> + <string name="art_src_folder">Folderul jocului</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Fișierul tău</string> + <string name="art_src_exe">Din exe</string> + <string name="art_src_auto">Automat</string> + <string name="art_pick_image">Alege imaginea…</string> + <string name="art_pick_title">Alege o imagine: %1$s</string> + <string name="art_reset">Resetează la automat</string> + <string name="art_search_sgdb">Caută pe SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Caută joc</string> + <string name="art_sgdb_other_games">Alte rezultate</string> + <string name="art_sgdb_none">Niciun rezultat.</string> + <string name="art_sgdb_no_key">SteamGridDB cere o cheie API. Adaugă-ți cheia în Setări › Launcher.</string> + <string name="art_sgdb_bad_key">SteamGridDB a respins cheia API. Verifică în Setări › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB limitează cererile acum. Încearcă peste un minut.</string> + <string name="art_sgdb_offline">SteamGridDB nu poate fi contactat. Verifică conexiunea.</string> + <string name="art_sgdb_server">Ceva a mers greșit la SteamGridDB. Încearcă mai târziu.</string> + <string name="art_sgdb_no_game">SteamGridDB nu are rezultate pentru acest joc. Încearcă să îl cauți.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d joc adăugat</item> + <item quantity="few">%1$d jocuri adăugate</item> + <item quantity="other">%1$d de jocuri adăugate</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d deja în Jocuri</item> + <item quantity="few">%1$d deja în Jocuri</item> + <item quantity="other">%1$d deja în Jocuri</item> + </plurals> + <string name="hop_back">B · Înapoi la %1$s</string> + <string name="hop_from_games">joc</string> + <string name="hop_from_play">Setările de lansare</string> + <string name="sheet_graphics_drivers">Drivere grafice</string> + <string name="comp_this_proton">Acest Proton</string> + <string name="comp_every_proton">Fiecare Proton</string> + <string name="comp_for_every_proton">Pentru fiecare Proton</string> + <string name="comp_available_count">Disponibile · %1$d</string> + <string name="comp_checked">Verificat %1$s</string> + <string name="comp_check_all">Verifică componente și drivere noi</string> + <string name="comp_get">Obține</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton și FEX de mai jos sunt ale acestui Proton</string> + <string name="comp_device_tested">%1$s · testat</string> + <string name="comp_device_untested">%1$s · netestat</string> + <string name="comp_device_unsupported">%1$s · neacceptat</string> + <string name="gpu_auto_keeps">Păstrează perechea recomandată actualizată</string> + <string name="gpu_bar_auto">Automat · %1$s</string> + <string name="gpu_separately">Drivere pentru mediul de execuție și pentru afișaj, separat</string> + <string name="gpu_use_title">Folosești %1$s?</string> + <string name="gpu_mode_title">Cum se aleg driverele</string> + <string name="gpu_mode_auto_detail">Cea mai bună pereche pentru acest GPU, mereu actualizată</string> + <string name="gpu_mode_pair">Pereche potrivită</string> + <string name="gpu_mode_pair_detail">Alege o pereche; setează ambele drivere deodată</string> + <string name="gpu_mode_mix">Combinație liberă</string> + <string name="gpu_mode_mix_detail">Alege afișarea și mediul de execuție separat</string> + <string name="gpu_mode_pair_short">Pereche</string> + <string name="gpu_mode_mix_short">Mixt</string> + <string name="gpu_src_auto">AUTOMAT</string> + <string name="gpu_src_pair">PERECHE</string> + <string name="gpu_src_bundle">PACHET</string> + <string name="gpu_src_chosen">ALES</string> + <string name="gpu_src_by_gpu">DUPĂ GPU</string> + <string name="gpu_src_default">IMPLICIT</string> + <string name="gpu_display_live">Desenează acum</string> + <string name="gpu_display_pending">Necesită repornire · până atunci desenează %1$s</string> + <string name="gpu_runtime_live">Activ</string> + <string name="gpu_runtime_pending">Sesiunea următoare · această sesiune folosește %1$s</string> + <string name="gpu_display_next">Desenează ecranul. Se aplică de la sesiunea următoare.</string> + <string name="gpu_previous_driver">driverul anterior</string> + <string name="gpu_restart_banner">Repornește pentru a schimba driverul de afișare.</string> + <string name="gpu_restart_blocked">Oprește sesiunea curentă și repornește DroidDeck pentru a schimba driverul de afișare.</string> + <string name="gpu_restart_now">Repornește acum</string> + <string name="gpu_restart_later">Mai târziu</string> + <string name="gpu_auto_title">Automat a ales această pereche pentru %1$s</string> + <string name="gpu_auto_builtin_title">Automat folosește driverele incluse pentru %1$s</string> + <string name="gpu_auto_reason">Ales pentru familia %1$s. Versiunile noi se instalează în fundal.</string> + <string name="gpu_pair_title">Alege o pereche</string> + <string name="gpu_pair_hint">Perechea setează driverul de afișare și driverul de execuție împreună.</string> + <string name="gpu_mix_title">Alege fiecare driver</string> + <string name="gpu_mix_hint">Pachetul le completează pe amândouă. Schimbările de afișare se aplică după repornire, cele de execuție de la sesiunea următoare.</string> + <string name="gpu_change_display">Schimbă driverul de afișare</string> + <string name="gpu_change_runtime">Schimbă driverul de execuție</string> + <string name="gpu_autos_pick">ALEGEREA AUTOMATĂ</string> + <string name="gpu_installed">Instalat</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · repornește pentru a aplica</string> + <string name="gpu_chip_restart">%1$s · necesită repornire</string> + <string name="comp_this_device">Acest dispozitiv</string> + <string name="proton_remove_title">Elimini %1$s?</string> + <string name="setup_tab_diagnostics">Diagnosticare</string> + <string name="setup_ready">Pregătit de joc</string> + <string name="setup_not_ready">Încă nepregătit de joc</string> + <string name="setup_ready_runtime">mediu de execuție %1$s</string> + <string name="setup_ready_limit_off">limita proceselor dezactivată</string> + <string name="setup_ready_signed_in">autentificat ca %1$s</string> + <string name="setup_needs_you">Când ceva are nevoie de tine</string> + <string name="setup_group_look">Aspect</string> + <string name="setup_group_device">Acest dispozitiv</string> + <string name="setup_group_art">Grafica bibliotecii</string> + <string name="setup_group_download">Descărcare</string> + <string name="setup_download_source">Sursă</string> + <string name="setup_download_source_auto">Automat</string> + <string name="setup_download_source_direct">Direct</string> + <string name="setup_download_source_mirror">Oglindă</string> + <string name="setup_download_source_custom">Prefix propriu</string> + <string name="setup_download_mirror">Site</string> + <string name="setup_download_prefix">Prefix</string> + <string name="flathub_eyebrow">APLICAȚII LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Aplicații desktop pentru desktopul Linux, deschise din Desktop.</string> + <string name="flathub_setup">Configurează Flathub</string> + <string name="flathub_remove_title">Elimini %1$s?</string> + <string name="flathub_remove_note">Setările și fișierele sale sunt păstrate.</string> + <string name="flathub_keep">Păstrează</string> + <string name="desktop_size">Dimensiune pe disc</string> + <string name="desktop_uninstall_title">Dezinstalezi desktopul?</string> + <string name="desktop_all_systems">Toate</string> + <string name="gog_achievements">Realizări GOG</string> + <string name="gog_achievements_hint">Sincronizează realizările pentru jocurile GOG compatibile. Se aplică la următoarea lansare.</string> + <string name="gog_achievements_off">Realizări dezactivate</string> + <string name="gog_achievements_on">Realizări activate</string> + <string name="gog_achievements_signin">Conectează-te din nou la GOG</string> + <string name="gog_achievements_uploaded">Realizări încărcate</string> + <string name="gog_achievements_pending">Încărcarea realizării este în așteptare</string> + <string name="gog_achievements_enable_store">Activează realizările GOG din setările Stores</string> + <string name="gog_achievements_unavailable">Realizări indisponibile; verifică jurnalele sesiunii</string> + <string name="achievement_unlocked">Realizare deblocată</string> + <string name="touch_paste">Inserează</string> + <string name="touch_dpad">Cruce directională</string> + <string name="touch_left_stick">Stick stânga</string> + <string name="touch_right_stick">Stick dreapta</string> + <string name="touch_menu">Meniu</string> + <string name="touch_keyboard">Tastatură</string> + <string name="touch_dpad_up">Cruce directională sus</string> + <string name="touch_dpad_down">Cruce directională jos</string> + <string name="touch_dpad_left">Cruce directională stânga</string> + <string name="touch_dpad_right">Cruce directională dreapta</string> + <string name="touch_title">Comenzi tactile</string> + <string name="touch_controller">Controler tactil</string> + <string name="touch_mouse">Mouse</string> + <string name="touch_on">Activat</string> + <string name="touch_off">Dezactivat</string> + <string name="touch_speed_slow">Lentă</string> + <string name="touch_speed_normal">Normală</string> + <string name="touch_speed_fast">Rapidă</string> + <string name="touch_edit_layout">Editează aranjamentul</string> + <string name="touch_droiddeck_menu">Meniul DroidDeck</string> + <string name="touch_drag_hint">Trage elementele de control pe ecran</string> + <string name="touch_arrange">Aranjează</string> + <string name="touch_discard">Renunță</string> + <string name="touch_saving">Se salvează…</string> + <string name="touch_icon">Pictogramă</string> + <string name="touch_narrower">L−</string> + <string name="touch_wider">L+</string> + <string name="touch_shorter">Î−</string> + <string name="touch_taller">Î+</string> + <string name="touch_hide">Ascunde</string> + <string name="touch_color_opacity">Culoare și opacitate…</string> + <string name="touch_copy_layout">Copiază acest aranjament</string> + <string name="touch_layout_copied">Aranjament copiat; lipește-l în aranjamentul tactil al oricărui joc</string> + <string name="touch_paste_layout">Lipește aranjamentul copiat</string> + <string name="touch_reset_layout">Revino la cel implicit din Steam</string> + <string name="touch_no_binding">Acest element de control nu are o asociere în Steam pentru a i se atribui o pictogramă</string> + <string name="touch_icon_for">Pictogramă pentru %1$s</string> + <string name="touch_layout_color">Culoarea aranjamentului tactil</string> + <string name="touch_done">Terminat</string> + <string name="touch_save_failed">Aranjamentul tactil nu a putut fi salvat</string> + <string name="touch_saved">Aranjamentul tactil a fost salvat în Steam</string> + <string name="touch_app_id">Aplicația %1$d</string> + <string name="touch_label_hint">Etichetă (opțional)</string> + <string name="touch_icons_missing">Pictogramele Steam nu au fost găsite</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d pictogramă de la Steam</item> + <item quantity="few">%1$d pictograme de la Steam</item> + <item quantity="other">%1$d de pictograme de la Steam</item> + </plurals> + <string name="touch_icon_color">Culoarea pictogramei</string> + <string name="touch_button_color">Culoarea butonului</string> + <string name="touch_no_icon">Fără pictogramă</string> + + <string name="stores_sync_sign_in">Se verifică autentificarea…</string> + <string name="stores_sync_library">Se obține biblioteca ta…</string> + <string name="stores_sync_game_list">Se obține lista de jocuri…</string> + <string name="stores_sync_details">Se încarcă detaliile jocurilor… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Se sincronizează %1$d joc…</item> + <item quantity="few">Se sincronizează %1$d jocuri…</item> + <item quantity="other">Se sincronizează %1$d de jocuri…</item> + </plurals> + <string name="stores_sync_progress">Se sincronizează… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Se obțin copertele…</string> + <string name="stores_sync_failed">Sincronizarea a eșuat</string> + <string name="stores_sync_no_games">Nu s-au găsit jocuri în biblioteca ta %1$s</string> + <string name="stores_sync_amazon_no_answer">Amazon Games nu a răspuns pentru biblioteca ta: reîmprospătează sau autentifică-te din nou</string> + <string name="stores_sync_gog_unreachable">Nu s-a putut contacta GOG</string> + <string name="stores_sync_gog_unreadable">Biblioteca ta GOG nu a putut fi citită</string> + <string name="stores_registering">Se înregistrează la Steam…</string> + <string name="mode_client_arch">Client Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Diagnosticare VAC</string> + <string name="setup_vac_diag_hint">Jocurile Source își înregistrează consola (-condebug); vac.txt din jurnalele sesiunii arată dacă e securizat sau nu</string> + <string name="load_starting_steam_x64">Se pornește Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Folosit de clientul Steam x86-64</string> + <string name="storage_uninstall_in_x64">Această copie este în clientul Steam x86-64. Alege x86-64 la Client Steam, apoi dezinstaleaz-o aici.</string> + <string name="storage_uninstall_in_arm64">Această copie este în clientul Steam ARM64. Alege ARM64 la Client Steam, apoi dezinstaleaz-o aici.</string> + <string name="drawer_page_glasses">Ochelari</string> + <string name="glasses_open">Ochelari VITURE</string> + <string name="glasses_control">Controlul ochelarilor</string> + <string name="glasses_driver_missing">Această versiune nu include driverul pentru acești ochelari.</string> + <string name="glasses_connection_failed">Nu s-a putut realiza conexiunea cu ochelarii. Reconectează cablul sau apasă Permite pentru a reîncerca.</string> + <string name="glasses_allow">Permite</string> + <string name="glasses_allow_hint">Permite-i lui DroidDeck să seteze rata de reîmprospătare, modul 3D, luminozitatea, volumul și întunecarea ochelarilor și să le citească urmărirea capului.</string> + <string name="glasses_asking">Se așteaptă permisiunea ta în solicitarea Android…</string> + <string name="glasses_denied">Controlul a fost refuzat. Permite-l pentru a schimba setările ochelarilor.</string> + <string name="glasses_no_control">Acești ochelari afișează jocul, dar setările lor nu pot fi schimbate de aici.</string> + <string name="glasses_output">Ieșire</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Joc pe ochelari</string> + <string name="glasses_game_on_hint">Afișează jocul doar pe ochelari. Dezactivat: telefonul îl afișează, iar Android oglindește ecranul telefonului.</string> + <string name="glasses_display">Afișaj</string> + <string name="glasses_refresh">Rată de reîmprospătare</string> + <string name="glasses_3d">3D (alăturat)</string> + <string name="glasses_3d_hint">Comută ochelarii inteligenți la 3D alăturat. Urmărirea capului este controlată separat.</string> + <string name="glasses_3d_failed">Semnalul 3D nu a fost confirmat. Încearcă din nou când revine imaginea 2D.</string> + <string name="glasses_no_signal">Nicio imagine: ochelarii sunt într-un mod pe care acest telefon nu îl poate trimite. Ține apăsat butonul lor 2D/3D sau deconectează-i și reconectează-i.</string> + <string name="glasses_3d_refresh">Rată de reîmprospătare 3D</string> + <string name="glasses_auto3d">3D pentru jocuri VR</string> + <string name="glasses_auto3d_hint">Trece la 3D cât timp rulează SteamVR, apoi revine.</string> + <string name="glasses_picture">Imagine</string> + <string name="glasses_picture_hint">Afișează automat conținut plat în ambii ochi și detectează SteamVR. Alege Joc alăturat pentru conținutul SBS.</string> + <string name="glasses_picture_auto">Automat</string> + <string name="glasses_picture_screen">Ecran virtual</string> + <string name="glasses_picture_sbs">Joc alăturat</string> + <string name="glasses_screen_size">Lățimea ecranului</string> + <string name="glasses_screen_distance">Distanța ecranului</string> + <string name="glasses_screen_next_session">Lățimea și distanța se aplică atunci când un joc rulează pe ochelari ca ecran virtual.</string> + <string name="glasses_screen_no_output">Aceste setări se aplică cât timp Joc pe ochelari este activat și jocul este afișat acolo.</string> + <string name="glasses_screen_flat_hint">Modul Automat păstrează acest joc 2D pe tot ecranul. Folosește un ecran virtual pentru a-i ajusta lățimea, distanța și urmărirea capului.</string> + <string name="glasses_screen_use">Folosește ecranul virtual</string> + <string name="glasses_screen_direct_hint">SteamVR umple vizualizarea. Ajustează câmpul său vizual în VR; lățimea și distanța se aplică numai unui ecran virtual.</string> + <string name="glasses_screen_sbs_hint">Jocurile alăturate umplu vederea fiecărui ochi. Lățimea și distanța se aplică doar unui ecran virtual.</string> + <string name="glasses_tracking_flat_hint">Modul Automat menține acest joc 2D fix în câmpul vizual. Alege Ecran virtual în Afișaj pentru a folosi urmărirea capului.</string> + <string name="glasses_tracking_sbs_hint">Urmărirea capului se aplică unui ecran virtual sau unui joc SteamVR care rulează.</string> + <string name="glasses_hardware">Dispozitiv</string> + <string name="glasses_brightness">Luminozitate</string> + <string name="glasses_volume">Volum</string> + <string name="glasses_sunblock">Întunecare</string> + <string name="glasses_sunblock_hint">Întunecă lentilele din față.</string> + <string name="glasses_tracking">Urmărire</string> + <string name="glasses_head_tracking">Urmărirea capului</string> + <string name="glasses_head_tracking_hint">Senzorii proprii ai ochelarilor rotesc ecranul virtual și SteamVR odată cu capul tău.</string> + <string name="glasses_recenter">Recentrează vederea</string> + <string name="glasses_recenter_button">Recentrează ecranul</string> + <string name="glasses_vr_fov">Câmp vizual SteamVR</string> + <string name="glasses_vr_fov_hint">Mai mic aduce SteamVR mai aproape și umple ochelarii; mai mare arată mai mult din jurul tău.</string> + <string name="glasses_playing">Se joacă pe %1$s</string> + <string name="glasses_calibration">Calibrarea urmăririi</string> + <string name="glasses_calibration_hint">Reduce deriva și aliniază referința de nivel.</string> + <string name="glasses_calibration_saved_hint">Calibrarea salvată se aplică acestor ochelari.</string> + <string name="glasses_calibration_open">Calibrează</string> + <string name="glasses_calibration_instructions">Așază ochelarii conectați cu susul în jos pe o suprafață orizontală, cu rama sprijinită uniform. Apasă Pornește, apoi lasă-i neatinși circa 8 secunde. Orice mișcare repornește măsurarea. Calibrarea corectează deriva și înclinarea, nu direcția.</string> + <string name="glasses_calibration_settling">Lasă ochelarii cu susul în jos, neatinși. Se așteaptă stabilizarea lor…</string> + <string name="glasses_calibration_collecting">Se măsoară senzorii. Ține ochelarii nemișcați.</string> + <string name="glasses_calibration_moving">Mișcare detectată. Nu atinge ochelarii; măsurarea va reporni automat.</string> + <string name="glasses_calibration_turn_over">Așază ochelarii cu susul în jos pe o suprafață orizontală. Măsurarea va începe când sunt poziționați corect.</string> + <string name="glasses_calibration_complete">Calibrare salvată. Pune-ți ochelarii și privește drept înainte, apoi apasă Gata pentru a recentra.</string> + <string name="glasses_calibration_failed">Calibrarea nu a putut fi finalizată. Verifică conexiunea și ține ochelarii nemișcați, apoi încearcă din nou. Calibrarea anterioară a rămas neschimbată.</string> + <string name="glasses_calibration_start">Pornește</string> + <string name="glasses_calibration_done">Gata</string> + <string name="glasses_calibration_reset">Resetează calibrarea urmăririi</string> + <string name="glasses_calibration_reset_hint">Elimini calibrarea salvată și restaurezi valorile implicite ale modelului? Recentrează după ce îți pui ochelarii la loc.</string> + <string name="glasses_calibration_reset_button">Resetează</string> + <string name="hand_camera_group">Urmărirea mâinilor</string> + <string name="hand_camera_prompt_title">Urmărește mâinile sau controlerele Joy-Con cu camera telefonului?</string> + <string name="hand_camera_prompt_body">Fără niciun controler conectat, camera telefonului urmărește mâinile goale în VR: ciupește degetul mare și arătător pentru a face clic, închide mâna pentru a prinde și întoarce palma spre tine și ciupește pentru a deschide meniul. Cu controlerele Joy-Con asociate, camera urmărește poziția lor, în timp ce controlerele Joy-Con oferă intrări de rotație și butoane. Imaginile sunt procesate pe acest dispozitiv și nu sunt niciodată salvate sau trimise.</string> + <string name="hand_camera_rear">Camera din spate</string> + <string name="hand_camera_rear_hint">Recomandat. De obicei mai clară și mai largă.</string> + <string name="hand_camera_front">Camera frontală</string> + <string name="hand_camera_front_hint">Pentru atunci când spatele dispozitivului nu poate fi îndreptat spre tine.</string> + <string name="hand_camera_allow">Folosește camera</string> + <string name="hand_camera_not_now">Nu acum</string> + <string name="hand_camera_setting">Urmărirea mâinilor cu camera</string> + <string name="hand_camera_setting_hint">Folosește camera telefonului pentru gesturi cu mâinile goale sau pentru a poziționa controlerele Joy-Con asociate în VR. Controlerele Joy-Con oferă comenzi de rotație și comenzi de butoane. Pune pauză în timp ce ochelarii inteligenți urmăresc mâinile sau controlerele Joy-Con. Imaginile sunt procesate numai pe acest dispozitiv.</string> + <string name="hand_camera_choice">Camera</string> + <string name="hand_camera_access">Acces la cameră</string> + <string name="hand_camera_access_hint">Permite accesul la cameră pentru a putea începe urmărirea mâinilor.</string> + <string name="hand_camera_access_denied">Accesul la cameră este dezactivat. Activează-l din setările Android.</string> + <string name="hand_camera_allow_button">Permite</string> + <string name="hand_camera_open_settings">Deschide setările</string> + <string name="hand_camera_placement">Poziționarea camerei</string> + <string name="hand_camera_placement_hint">Verifică dacă te vede camera înainte de a juca.</string> + <string name="hand_camera_check">Verifică</string> + <string name="hand_camera_check_title">Poziționarea camerei</string> + <string name="hand_camera_how_rear">Așază dispozitivul vertical, la 1,5–2 metri distanță, cam la înălțimea pieptului, cu camera din spate îndreptată spre tine. Apoi intră în cadru cu mâinile întinse.</string> + <string name="hand_camera_how_front">Așază dispozitivul vertical, la 1,5–2 metri distanță, cam la înălțimea pieptului, cu ecranul îndreptat spre tine. Apoi intră în cadru cu mâinile întinse.</string> + <string name="hand_camera_starting">Se pornește camera…</string> + <string name="hand_camera_stand_up">Dispozitivul stă culcat. Așază-l vertical ca să fie camera îndreptată spre tine.</string> + <string name="hand_camera_upright">Așază dispozitivul mai vertical ca să fie camera îndreptată spre tine.</string> + <string name="hand_camera_not_seen">Încă nu ești vizibil. Intră în cadru astfel încât să se vadă capul și umerii tăi.</string> + <string name="hand_camera_move_back">Dă-te puțin înapoi.</string> + <string name="hand_camera_move_closer">Apropie-te puțin.</string> + <string name="hand_camera_show_hands">Întinde ambele mâini acolo unde le poate vedea camera.</string> + <string name="hand_camera_good">Arată bine.</string> + <string name="hand_camera_failed">Camera nu a putut porni. Închide celelalte aplicații care o folosesc și încearcă din nou.</string> + <string name="hand_camera_switch">Schimbă camera</string> + <string name="hand_camera_skip">Omite</string> + <string name="hand_camera_done">Gata</string> + <string name="glasses_xreal_network_missing">Se așteaptă conexiunea USB Ethernet a ochelarilor. Este posibil ca acest telefon să nu o expună aplicațiilor.</string> + <string name="glasses_xreal_connection_failed">Conexiunea XREAL a fost întreruptă sau a returnat un răspuns neacceptat. Se reîncearcă…</string> + <string name="glasses_xreal_experimental">Suport experimental pentru 1S. Folosește modul Follow și dezactivează stabilizarea din meniul ochelarilor. Direcțiile de urmărire și modurile de afișare trebuie încă testate pe dispozitiv.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Mod Cardboard</string> + <string name="cardboard_mode_hint">Imagini pentru ochiul stâng și cel drept, pentru un vizor VR pentru telefon.</string> + <string name="cardboard_source">Imagine</string> + <string name="cardboard_source_screen">Ecran virtual</string> + <string name="cardboard_source_sbs">3D alăturat</string> + <string name="cardboard_viewer">Vizor</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Fără lentilă</string> + <string name="cardboard_ipd">Distanța dintre ochi</string> + <string name="cardboard_screen_width">Lățimea ecranului</string> + <string name="cardboard_screen_distance">Distanța ecranului</string> + <string name="cardboard_head_tracking">Urmărirea capului</string> + <string name="cardboard_no_sensor">Acest dispozitiv nu are senzor de rotație.</string> + <string name="cardboard_recenter">Recentrează vederea</string> + <string name="cardboard_recenter_button">Recentrează</string> + <string name="cardboard_steamvr">SteamVR (experimental)</string> + <string name="cardboard_steamvr_install">Instalează</string> + <string name="cardboard_steamvr_installing">Se descarcă și se dezarhivează SteamVR…</string> + <string name="cardboard_steamvr_start">Pornește</string> + <string name="cardboard_steamvr_stop">Oprește</string> + <string name="cardboard_steamvr_unavailable">Indisponibil în această sesiune.</string> + <string name="cardboard_steamvr_failed">SteamVR nu a răspuns; verifică jurnalul sesiunii.</string> + <string name="drawer_component_downloads">Descarcă componente</string> + <string name="drawer_component_downloads_hint">Descărcările sunt comune cu pagina Componente. Alege mai sus o versiune descărcată pentru a o folosi la următoarea lansare a jocului.</string> + <string name="drawer_component_choose_download">Alege o versiune de descărcat</string> + <string name="stores_fact_developer">Dezvoltator</string> + <string name="stores_fact_publisher">Editor</string> + <string name="stores_fact_released">Lansare</string> + <string name="stores_hltb_main">Principal</string> + <string name="stores_hltb_extras">+ Extra</string> + <string name="stores_hltb_completionist">Completist</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="display_picture_position">Poziția imaginii</string> + <string name="display_position_top">Sus</string> + <string name="display_position_bottom">Jos</string> + <string name="display_position_center">Centru (implicit)</string> + <string name="setup_tab_storage">Stocare</string> + <string name="storage_measuring">Se măsoară stocarea…</string> + <string name="storage_measuring_hint">Prima dată durează câteva secunde.</string> + <string name="storage_internal">Stocare internă</string> + <string name="storage_used_of">%1$s din %2$s folosiți</string> + <string name="storage_free">%1$s liberi</string> + <string name="storage_droiddeck_uses">DroidDeck folosește %1$s. Măsurat pe %2$s.</string> + <string name="storage_rescanning">se rescannează…</string> + <string name="storage_other_apps">Alte aplicații Android</string> + <string name="storage_safe_now">Se poate elibera acum</string> + <string name="storage_safe_hint">Medii de execuție nefolosite, resturi, jurnale vechi</string> + <string name="storage_clean_up">Se curăță…</string> + <string name="storage_session_running">Oprește sesiunea pentru a curăța sau șterge ceva. Dimensiunile rămân vizibile.</string> + <string name="storage_where">Unde ajunge</string> + <string name="storage_games">Jocuri Steam</string> + <string name="storage_game_data">Datele jocurilor</string> + <string name="storage_game_data_hint">Prefixe %1$s · workshop %2$s · shadere %3$s</string> + <string name="storage_tools">Proton și medii de execuție</string> + <string name="storage_tools_unused">%1$s nefolosit</string> + <string name="storage_stores">GOG, Epic și alte magazine</string> + <string name="storage_stores_hint">Elimină-le din Magazine</string> + <string name="storage_desktop">Aplicații desktop</string> + <string name="storage_desktop_hint">Aplicații și medii de execuție Flatpak</string> + <string name="storage_system">Sistemul Linux și clientul Steam</string> + <string name="storage_system_hint">Necesar pentru ca orice să ruleze</string> + <string name="storage_app_data">Datele DroidDeck</string> + <string name="storage_app_data_hint">Jurnalele sesiunilor vechi %1$s · cache · drivere</string> + <string name="storage_legend_games">Jocuri</string> + <string name="storage_legend_data">Datele jocurilor</string> + <string name="storage_legend_tools">Proton și medii de execuție</string> + <string name="storage_legend_stores">Alte magazine</string> + <string name="storage_legend_desktop">Aplicații desktop</string> + <string name="storage_legend_system">Sistemul Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Curăță</string> + <string name="storage_clean_up_lede">Nimic de aici nu atinge jocurile instalate sau descărcările în curs.</string> + <string name="storage_nothing_to_clean">Nimic de curățat acum.</string> + <string name="storage_selected">Selectat: %1$s · %2$s → se eliberează %3$s</string> + <string name="storage_cleaning">Se curăță…</string> + <string name="storage_free_button">Eliberează %1$s</string> + <string name="storage_freed">%1$s eliberați.</string> + <string name="storage_item_runtimes">Medii de execuție Steam și Proton nefolosite</string> + <string name="storage_item_leftovers">Resturi de la jocuri șterse</string> + <string name="storage_item_leftovers_unsure">Resturi care pot conține salvări</string> + <string name="storage_item_logs">Jurnalele sesiunilor vechi</string> + <string name="storage_item_logs_detail">Jurnalele sesiunii curente rămân</string> + <string name="storage_item_custom_detail">Niciun joc nu îl folosește. Reinstalează-l din Componente dacă ai nevoie.</string> + <string name="storage_item_shaders">Cache-ul de shadere al jocurilor instalate</string> + <string name="storage_item_shaders_detail">Se reconstruiește în timpul jocului. Primele minute din fiecare joc vor avea din nou sacadări.</string> + <string name="storage_tag_safe">Sigur</string> + <string name="storage_tag_unused">Nefolosit</string> + <string name="storage_tag_stutter">Sacadări</string> + <string name="storage_tag_saves">Verifică salvările</string> + <string name="storage_tag_default">Implicit</string> + <string name="storage_tag_required">Necesar</string> + <string name="storage_tag_not_used">Nefolosit</string> + <string name="storage_back">Stocare</string> + <string name="storage_games_with_data">%1$s împreună cu datele lor</string> + <string name="storage_sort_largest">Cele mai mari</string> + <string name="storage_sort_least_played">Cele mai puțin jucate</string> + <string name="storage_sort_sd">Pe cardul SD</string> + <string name="storage_no_games">Nu există jocuri aici.</string> + <string name="storage_played">jucat %1$s</string> + <string name="storage_never_played">Nejucat niciodată</string> + <string name="storage_game_parts">Joc %1$s · date %2$s</string> + <string name="storage_uninstall">Dezinstalează</string> + <string name="storage_games_note">Dezinstalarea deschide fereastra Steam ca Steam să o înregistreze. Pentru a muta un joc pe cardul SD, folosește Steam › Setări › Stocare.</string> + <string name="storage_uninstall_title">Dezinstalezi %1$s?</string> + <string name="storage_uninstall_body">Steam se va deschide și va cere confirmarea. Asta eliberează %1$s din joc. Prefixul rămâne până când resturile sunt curățate, iar salvările din Steam Cloud rămân în contul tău.</string> + <string name="storage_open_steam">Deschide Steam</string> + <string name="storage_tools_detail">%1$s · %2$s nefolosit</string> + <string name="storage_remove_unused">Elimină cele nefolosite · %1$s</string> + <string name="storage_in_use">În uz</string> + <string name="storage_not_used">Nefolosit</string> + <string name="storage_remove">Elimină</string> + <string name="storage_remove_title">Elimini %1$s?</string> + <string name="storage_remove_body">Eliberează %1$s. Steam îl va descărca din nou dacă un joc are nevoie.</string> + <string name="storage_tool_fex_runtime">Necesar pentru jocurile Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Necesar pentru Proton ARM64</string> + <string name="storage_tool_redist">Instalări VC++ și DirectX cerute de jocuri</string> + <string name="storage_tool_fex">Rulează jocuri Linux x86</string> + <string name="storage_tool_steam">Unealtă Steam</string> + <string name="storage_tool_old_runtime">DroidDeck rulează jocuri fără acest mediu de execuție</string> + <string name="storage_tool_x86_proton">Proton x86, pe care DroidDeck nu îl poate rula</string> + <string name="storage_tool_custom_default">Implicit pentru toate jocurile</string> + <string name="storage_tool_custom_unused">Niciun joc nu îl folosește</string> + <string name="storage_tool_custom_unknown">Setările Steam nu pot fi citite, așa că acesta e păstrat</string> + <string name="storage_cleanup_busy">Așteaptă terminarea curățării stocării</string> + <string name="storage_low_title">Doar %1$s liberi</string> + <string name="storage_low_body">Steam are nevoie de spațiu pentru actualizări și cache-ul de shadere. Sub 10 GB, actualizările jocurilor pot eșua la mijloc.</string> + <string name="storage_low_safe">%1$s pot fi eliberați în siguranță.</string> + <string name="storage_free_up">Eliberează spațiu</string> + <string name="storage_play_anyway">Joacă oricum</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d instalat</item> + <item quantity="other">%d instalate</item> + <item quantity="few">%d instalate</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d pe cardul SD</item> + <item quantity="other">%d pe cardul SD</item> + <item quantity="few">%d pe cardul SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d unealtă</item> + <item quantity="other">%d unelte</item> + <item quantity="few">%d unelte</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Foldere de prefix și cache de shadere goale de la %d joc</item> + <item quantity="other">Foldere de prefix și cache de shadere goale de la %d de jocuri</item> + <item quantity="few">Foldere de prefix și cache de shadere goale de la %d jocuri</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Prefixul a %d joc mai conține fișiere, inclusiv salvări locale. Copiază-le întâi dacă e nevoie.</item> + <item quantity="other">Prefixele a %d de jocuri mai conțin fișiere, inclusiv salvări locale. Copiază-le întâi dacă e nevoie.</item> + <item quantity="few">Prefixele a %d jocuri mai conțin fișiere, inclusiv salvări locale. Copiază-le întâi dacă e nevoie.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d joc</item> + <item quantity="other">%d de jocuri</item> + <item quantity="few">%d jocuri</item> + </plurals> + <string name="storage_tool_default_proton">Protonul implicit al DroidDeck</string> + <string name="storage_tool_proton">Opțiunea Proton 11 a DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">folosit de %d joc</item> + <item quantity="other">folosit de %d de jocuri</item> + <item quantity="few">folosit de %d jocuri</item> + </plurals> + <string name="storage_legend_components">Componente</string> + <string name="storage_components">Componente</string> + <string name="storage_item_components">Componente nefolosite</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Eliberează %1$s. Readuce doar o versiune Proton care nu mai e instalată.</string> + <string name="storage_leftovers_unchecked">Neverificat: manifestul unei aplicații Steam nu poate fi citit, așa că prefixele jocurilor șterse rămân până când asta devine posibil.</string> + <string name="storage_failed">Eșuat: %1$s</string> + <string name="storage_desktop_shared">%1$s partajat</string> + <string name="storage_data_installed">Jocuri instalate</string> + <string name="storage_data_parts">Prefixe %1$s · shadere %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Șterge shaderele</string> + <string name="storage_data_leftovers">Jocuri șterse</string> + <string name="storage_steam_app">Aplicația Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Prefixul mai conține fișiere, probabil salvări locale</string> + <string name="storage_leftover_confirm">Șterge prefixul Wine și cache-ul de shadere (%1$s). Copiază întâi salvările importante; salvările Steam Cloud rămân în contul tău.</string> + <string name="storage_data_other">Păstrate</string> + <string name="storage_data_other_title">Jocuri non-Steam și prefixul Steam partajat</string> + <string name="storage_data_other_detail">Prefixele jocurilor din magazine sau adăugate manual</string> + <string name="storage_components_packages">Pachete descărcate</string> + <string name="storage_components_originals">Originale păstrate</string> + <string name="storage_components_none">Niciun pachet de componente descărcat.</string> + <string name="storage_component_in_use">Ales pentru un Proton sau un joc</string> + <string name="storage_component_unused">Necorespunzător ales nicăieri</string> + <string name="storage_original_kept">Readuce Protonul instalat</string> + <string name="storage_original_old">Versiune Proton care nu mai e instalată</string> + <string name="storage_tag_in_use">În uz</string> + <string name="storage_components_note">Componentele în uz rămân blocate. Alege-le din Componente; ce elimini aici poate fi descărcat din nou acolo.</string> + <string name="storage_component_confirm">Eliberează %1$s. Pachetele importate de tine nu mai pot fi descărcate.</string> + <string name="storage_desktop_detail">%1$s pentru aplicațiile Flatpak și ce partajează ele</string> + <string name="storage_desktop_apps_title">Aplicații</string> + <string name="storage_desktop_none">Nicio aplicație Flatpak instalată.</string> + <string name="storage_desktop_shared_title">Partajat între aplicații</string> + <string name="storage_desktop_runtimes">Medii de execuție</string> + <string name="storage_desktop_runtimes_detail">Bibliotecile pe care rulează aplicațiile; cele nefolosite pleacă prin Elimină cele nefolosite</string> + <string name="storage_desktop_cache">Stocare pentru descărcări</string> + <string name="storage_desktop_cache_detail">Object store-ul Flatpak și cache-ul de descărcări</string> + <string name="storage_desktop_prune">Elimină cele nefolosite</string> + <string name="storage_desktop_prune_body">Elimină mediile de execuție de care nu are nevoie nicio aplicație instalată și curăță object store-ul Flatpak. Aplicațiile instalate continuă să ruleze.</string> + <string name="storage_flatpak_uninstall_body">Elimină aplicația (%1$s) și mediile de execuție pe care nu le folosește altcineva. Datele din folderul tău home rămân.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d pachet</item> + <item quantity="other">%d de pachete</item> + <item quantity="few">%d pachete</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d aplicație</item> + <item quantity="other">%d de aplicații</item> + <item quantity="few">%d aplicații</item> + </plurals> + <string name="boot_movie">Videoclip de pornire</string> + <string name="boot_movie_video">Videoclip</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps arată mai fluid, dar folosește mai mult procesorul cât pornește Steam. Un videoclip de pornire ales în setările Steam are prioritate.</string> + <string name="boot_movie_sound">Sunet</string> + <string name="boot_movie_custom">Videoclipul tău</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV sau WebM. Alte formate și fișierele de peste %1$d MB sunt convertite pe dispozitiv în WebM 720p, până la %2$d secunde.</string> + <string name="boot_movie_import">Importă</string> + <string name="boot_movie_remove">Elimină</string> + <string name="boot_movie_pick">Alege un videoclip de pornire</string> + <string name="boot_movie_imported">%1$s este acum videoclipul de pornire</string> + <string name="boot_movie_imported_silent">%1$s este acum videoclipul de pornire, fără sunet</string> + <string name="boot_movie_too_long">Videoclipurile care trebuie convertite pot avea cel mult %1$d secunde</string> + <string name="boot_movie_converting">Se convertește %1$d%%</string> + <string name="boot_movie_converting_started">Se convertește %1$s pentru Steam. Lasă DroidDeck deschis.</string> + <string name="boot_movie_unsupported">Acest dispozitiv nu poate decoda videoclipul.</string> + <string name="boot_movie_import_failed">Videoclipul nu a putut fi importat</string> + <string name="glasses_experimental">Camere Luma Ultra — Experimentale</string> + <string name="glasses_joycons">Urmărirea poziției Joy-Con</string> + <string name="glasses_joycons_hint">Folosește camerele ochelarilor inteligenți pentru a poziționa controlerele Joy-Con asociate. Rotirea și comenzile de butoane provin de la controlerele Joy-Con. Poziția este estimată atunci când încheieturile mâinilor sunt ascunse. Înlocuiește controlerele acționate cu mâinile goale și întrerupe urmărirea camerei telefonului. Îndreaptă controlerele Joy-Con înainte atunci când conectezi sau resetezi centrul de urmărire.</string> + <string name="glasses_joycons_requires_position">Activează mai întâi urmărirea pozițională. Necesită controlere Joy-Con cu funcție de mișcare pe Android 12 sau o versiune ulterioară. Dezactivat în mod implicit.</string> + <string name="setup_tab_glasses">Ochelari inteligenți</string> + <string name="setup_glasses_scope">Setările de afișare și urmărire a capului sunt partajate între meniurile, jocurile și sesiunile desktop DroidDeck.</string> + <string name="setup_glasses_connect">Conectează ochelarii inteligenți pentru a modifica setările de afișare și urmărire. Setările salvate sunt păstrate atunci când te deconectezi.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Mod de afișare</string> + <string name="glasses_output_2d">Ieșire 2D</string> + <string name="glasses_output_3d">Ieșire 3D</string> + <string name="glasses_picture_group">Imagine și ecran virtual</string> + <string name="glasses_position_group">Poziție și nivelul podelei</string> + <string name="glasses_hands_group">Urmărirea mâinilor — Experimental</string> + <string name="glasses_tracking_status">Stare urmărire</string> + <string name="glasses_resolution_2d">Rezoluție 2D</string> + <string name="glasses_resolution_3d">Rezoluție 3D</string> + <string name="glasses_resolution_vr">Rezoluție VR</string> + <string name="glasses_resolution_auto">Automat</string> + <string name="glasses_resolution_inherit">La fel ca 2D / 3D</string> + <string name="glasses_resolution_hint">Rezoluție de ieșire per ochi.</string> + <string name="glasses_refresh_30_hint">Activează Joc pe ochelari pentru a selecta modul nativ de 30 Hz al afișajului.</string> + <string name="glasses_3dof">Ecran virtual 3DoF</string> + <string name="glasses_3dof_hint">Ancorează jocurile 2D în fața ta, astfel încât să poți privi în jur. Activează Joc pe ochelari fără a comuta la 3D.</string> + <string name="glasses_screen_app_wide">Lățimea și distanța actualizează imediat ecranul virtual urmărit pentru meniurile, jocurile și sesiunile desktop DroidDeck.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Urmărirea pozițională include rotirea capului în SteamVR. Pentru urmărirea doar prin rotație, dezactivează urmărirea pozițională.</string> + <string name="glasses_head_tracking_spatial_hint">Controlează mișcarea capului pe ecranul virtual. Urmărirea pozițională include rotirea capului în SteamVR.</string> + <string name="glasses_quick_actions">Acțiuni rapide</string> + <string name="glasses_recenter_screen_hint">Privește unde dorești ecranul, apoi resetează centrul de urmărire pentru a-i seta înălțimea și direcția.</string> + <string name="glasses_recenter_joycons_button">Recentrează Joy-Con</string> + <string name="phone_camera_tracking_group">Camera telefonului — Experimental</string> + <string name="phone_camera_tracking_setting">Urmărește mâinile sau controlerele Joy-Con</string> + <string name="glasses_6dof">Ecran virtual 6DoF</string> + <string name="glasses_position">Urmărirea pozițională — experimental</string> + <string name="glasses_position_hint">Mișcarea fizică în VR și în jurul ecranelor virtuale. Repornirea urmăririi durează un moment.</string> + <string name="glasses_eye_height">Înălțimea curentă a ochilor deasupra podelei</string> + <string name="glasses_floor">Setează nivelul podelei de la înălțimea curentă</string> + <string name="glasses_floor_set">Setează nivelul podelei</string> + <string name="glasses_spatial_setup">Configurarea și diagnosticarea camerei stereo</string> + <string name="glasses_spatial_setup_hint">Verifică calibrarea camerei și urmărirea mâinilor înainte de a juca.</string> + <string name="glasses_spatial_open">Deschide configurarea</string> + <string name="glasses_hands">Controlere acționate cu mâinile goale</string> + <string name="glasses_hands_hint">Folosește camerele ochelarilor inteligenți pentru a ținti cu mâinile, ciupește pentru a face clic și închide mâna pentru a prinde în VR. Manetele gamepad-ului se mișcă și se rotesc. Înlocuiește urmărirea poziției Joy-Con. Urmărirea poate avea întârziere sau poate fi pierdută în timpul jocurilor.</string> + <string name="glasses_hands_ready_hint">Activează controlerele acționate cu mâinile goale sub camerele Luma Ultra în Urmărire. Afișează mai întâi mâinile deschise.</string> + <string name="glasses_hands_base">Calibrare Luma Ultra partajată</string> + <string name="glasses_hands_base_hint">Folosește calibrarea Luma Ultra partajată. Calibrează-ți propriii ochelari inteligenți pentru a verifica precizia.</string> + <string name="glasses_hands_calibration_verified">Calibrare măsurată verificată</string> + <string name="glasses_hands_calibration_required">Validare necesară</string> + <string name="glasses_hands_calibration_required_hint">Controlerele acționate cu mâinile goale devin disponibile după trecerea verificării distanței măsurate.</string> + <string name="tracking_recovery_lost">Urmărire pierdută</string> + <string name="tracking_recovery_look">Privește încet în jur într-o cameră bine luminată.\nNu acoperi camerele de urmărire și privește spre mobilier sau alte detalii vizibile.</string> + <string name="tracking_recovery_restart_help">Încă blocat? Pe telefon: Ochelari inteligenți → Urmărire → Deschide configurarea → Afișează diagnostice → Repornește urmărirea.</string> + <string name="tracking_recovery_disconnected">Ochelari inteligenți deconectați</string> + <string name="tracking_recovery_connect">Verifică conexiunea USB și reconectează ochelarii inteligenți.\nAcceptă solicitarea de acces USB de pe telefon dacă apare.</string> + <string name="tracking_recovery_usb_help">După conectare, privește încet în jur într-o cameră bine luminată pentru a restabili urmărirea.</string> + <string name="tracking_recovery_recenter">Este necesară recentrarea</string> + <string name="tracking_recovery_recenter_steps">Urmărirea a revenit într-o nouă poziție.\nPrivește înainte, apoi atinge „Recentrează” pe telefon.</string> + <string name="tracking_recovery_recenter_help">Găsești opțiunea „Recentrează” și în Ochelari inteligenți → Urmărire → Deschide configurarea. Calibrarea salvată a camerei este păstrată.</string> + <string name="tracking_recovery_stabilizing">Stai nemișcat pentru o clipă</string> + <string name="tracking_recovery_hold">Recentrarea este în curs.\nȚine ochelarii inteligenți nemișcați în timp ce urmărirea se stabilizează.</string> + <string name="tracking_recovery_automatic">Acest ecran se închide automat când urmărirea capului este gata.</string> + <string name="glasses_steady_hand_aim">Țintirea stabilizată cu mâinile</string> + <string name="glasses_steady_hand_aim_hint">Țintește de la umăr prin palmă. Dezactivează această opțiune pentru rotație controlată de încheietura mâinii.</string> + <string name="spatial_title">Configurare spațială</string> + <string name="spatial_wait_tracking">Se așteaptă urmărirea...</string> + <string name="spatial_cameras_description">Camere de urmărire stânga și dreapta</string> + <string name="spatial_camera_sync">Sincronizarea camerei</string> + <string name="spatial_ready">Gata</string> + <string name="spatial_sync_hint">Se așteaptă ca camera și urmărirea capului să se alinieze. Păstrează ochelarii inteligenți conectați.</string> + <string name="spatial_prepare">1. Pregătește ținta de calibrare</string> + <string name="spatial_print_actual">Imprimă la dimensiunea reală</string> + <string name="spatial_print_hint">Fiecare pătrat trebuie să măsoare 30 mm (1,181 inchi). Montează foaia plat pe o suprafață rigidă într-o zonă bine luminată.</string> + <string name="spatial_print">Tipărește modelul de calibrare</string> + <string name="spatial_capture_group">2. Capturează vederi diferite</string> + <string name="spatial_board_stationary">Păstrează ținta de calibrare staționară</string> + <string name="spatial_capture_hint">Mută ochelarii inteligenți mai aproape, mai departe și în lateral. Rotește-i la stânga/dreapta, înclină-i în sus/jos și înclină-i lateral. Păstrează ținta de calibrare vizibilă în ambele camere și fă o pauză scurtă înainte de fiecare captură.</string> + <string name="spatial_start">Începe o nouă calibrare</string> + <string name="spatial_wait_sync">Se așteaptă sincronizarea camerei.</string> + <string name="spatial_start_hint">Începe o nouă calibrare pentru a colecta vizualizări.</string> + <string name="spatial_views_hint">Păstrează ținta de calibrare vizibilă în ambele previzualizări. Capturează cel puțin 24 de vizualizări clare din unghiuri diferite.</string> + <string name="spatial_capturing">Se captează...</string> + <string name="spatial_capture">Capturează vizualizarea țintei de calibrare</string> + <string name="spatial_alignment">Calculează alinierea camerei</string> + <string name="spatial_calculating">Se calculează...</string> + <string name="spatial_calculate">Calculează calibrarea</string> + <string name="spatial_distance_group">3. Verifică distanța</string> + <string name="spatial_distance">Distanța măsurată</string> + <string name="spatial_distance_hint">Începe cu 12 in sau 30 cm, astfel încât markerii imprimați să fie mai ușor de detectat. Alege măsura exactă pe care o vei folosi.</string> + <string name="spatial_camera_board_distance">Distanța de la camera din stânga la centrul țintei de calibrare</string> + <string name="spatial_checking_distance">Se verifică distanța...</string> + <string name="spatial_validate">Validează distanța</string> + <string name="spatial_diagnostics">Diagnosticare</string> + <string name="spatial_show_diagnostics">Afișează diagnostice</string> + <string name="spatial_diagnostics_hint">Instrumente de sincronizare și urmărire a camerei.</string> + <string name="spatial_camera_timing">Temporizarea camerei</string> + <string name="spatial_hand_input">Intrare din urmărirea mâinilor</string> + <string name="spatial_wait_timing">Se așteaptă temporizarea camerei.</string> + <string name="spatial_frames">Imagini ale camerei</string> + <string name="spatial_gpu">Detectarea mâinilor prin GPU</string> + <string name="spatial_gpu_hint">CPU este implicit. GPU-ul este experimental și poate determina repornirea SteamVR. Această alegere se resetează la repornirea urmăririi.</string> + <string name="spatial_lite">Detectarea mâinilor cu modele Lite</string> + <string name="spatial_lite_hint">Folosește detectorul de palme Lite și modelul Lite pentru punctele de reper ale mâinii. Verifică precizia țintirii și a gesturilor de ciupire și prindere. Se resetează la repornirea urmăririi.</string> + <string name="spatial_adaptive">Frecvența de intrare automată pentru urmărirea mâinilor</string> + <string name="spatial_adaptive_hint">Reglează intrarea la viteza de procesare. Se resetează la repornirea urmăririi.</string> + <string name="spatial_half_rate">Limitează frecvența de intrare pentru urmărirea mâinilor</string> + <string name="spatial_half_rate_hint">Folosește jumătate din imaginile camerei. Dezactivează pentru a compara frecvența maximă. Se resetează la repornirea urmăririi.</string> + <string name="spatial_diagnostic_capture">Captură diagnostică</string> + <string name="spatial_diagnostic_capture_hint">Salvează o pereche de imagini stereo local. Imaginile sunt salvate numai atunci când sunt solicitate.</string> + <string name="spatial_save_frame">Salvează imaginea camerei</string> + <string name="spatial_restart_tracking">Repornește urmărirea</string> + <string name="spatial_restart_hint">Folosește dacă urmărirea nu se recuperează într-o zonă bine iluminată. O repornire necesită o nouă origine de urmărire.</string> + <string name="spatial_restart">Repornește</string> + <string name="spatial_restart_title">Repornește urmărirea?</string> + <string name="spatial_restart_confirm">Vizualizările de calibrare nesalvate se vor pierde. Menține ochelarii inteligenți nemișcați ulterior și resetează centrul de urmărire când urmărirea este restabilită.</string> + <string name="spatial_views_count">%1$d / 24 de vizualizări capturate</string> + <string name="spatial_capture_paused">Captură întreruptă: %1$s</string> + <string name="spatial_measure_hint">Măsoară %1$s. Arată întreaga țintă de calibrare în ambele previzualizări, apoi ține ochelarii nemișcați.</string> + <string name="spatial_timing_values">%1$.1f Hz • vârsta imaginii %2$.1f ms • procesare %3$.1f ms</string> + <string name="spatial_input_values">Limita de intrare %1$.1f Hz • %2$.0f%% a imaginilor camerei. Urmărirea capului continuă la frecvența maximă.</string> + <string name="spatial_frame_counts">%1$d procesate • %2$d eliminate • %3$d omise de limita de intrare</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - calibrare Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Imprimă la 100%/Dimensiune reală. Fiecare pătrat: 30 mm (1,181 inchi).</string> + <string name="spatial_print_stationary">Păstrează ținta de calibrare plată și staționară; mută ochelarii inteligenți între capturi.</string> + <string name="spatial_print_check">Verificare scară: 100 mm (3,937 inchi) între repere</string> + <string name="spatial_distance_12in">12 inchi (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 inchi)</string> + <string name="spatial_distance_20in">20 inchi (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 inchi)</string> + <string name="spatial_disabled">Dezactivat</string> + <string name="spatial_wait_stable">Se așteaptă urmărirea stabilă</string> + <string name="spatial_disconnected">Deconectat</string> + <string name="spatial_hands_off">Controlerele operate cu mâinile goale sunt oprite</string> + <string name="spatial_tracking_off">Urmărirea poziției este dezactivată sau ochelarii inteligenți sunt deconectați</string> + <string name="spatial_recenter_pending">Recentrare solicitată — ține ochelarii nemișcați în timp ce urmărirea se stabilizează</string> + <string name="spatial_tracking_lost">Urmărire pierdută — privește spre o zonă bine luminată, cu detalii vizibile</string> + <string name="spatial_origin_changed">Originea urmăririi s-a schimbat — atinge „Recentrează”, apoi ține ochelarii nemișcați</string> + <string name="spatial_active">6DoF activ</string> + <string name="spatial_connect_hint">Conectează Luma Ultra și activează urmărirea pozițională.</string> + <string name="spatial_validation_session">Calibrare verificată pentru această conexiune.</string> + <string name="spatial_validation_saved">Calibrarea a fost verificată și salvată.</string> + <string name="spatial_wait_cameras">Se așteaptă camere stereo</string> + <string name="spatial_wait_hands">Se așteaptă urmărirea mâinilor</string> + <string name="spatial_collect_instructions">Ține nemișcată ținta de calibrare 5 × 7. Capturează cel puțin 24 de vederi în timp ce miști și rotești ochelarii inteligenți.</string> + <string name="spatial_capture_pending">Se așteaptă următoarea imagine a camerei. Ține ochelarii inteligenți nemișcați.</string> + <string name="spatial_validation_pending">Se verifică următoarea imagine a camerei. Păstrează întreaga țintă de calibrare vizibilă și stai nemișcat.</string> + <string name="spatial_start_first">Începe mai întâi calibrarea</string> + <string name="spatial_no_camera_frame">Nu a sosit nicio imagine nouă a camerei. Verifică conexiunea ochelarilor inteligenți și previzualizările camerei, apoi încearcă din nou.</string> + <string name="spatial_clock_reset">Resetarea ceasului camerei</string> + <string name="spatial_frame_changed">Sistemul de coordonate al urmăririi s-a schimbat. Vederile capturate sunt salvate pentru recalculare. Recentrează, apoi începe un set nou pentru a captura mai multe vederi.</string> + <string name="spatial_device_loaded">calibrarea dispozitivului a fost încărcată</string> + <string name="spatial_base_loaded">Calibrarea bazei Luma Ultra a fost încărcată</string> + <string name="spatial_calibration_needed">este necesară calibrarea</string> + <string name="spatial_tap_start">Atinge mai întâi „Începe o nouă calibrare”.</string> + <string name="spatial_capture_recenter_pending">Recentrarea așteaptă o urmărire stabilă. Ține ochelarii nemișcați pentru o clipă.</string> + <string name="spatial_capture_recenter">Urmărirea s-a schimbat. Atinge „Recentrează” o dată, apoi ține ochelarii nemișcați înainte de captură.</string> + <string name="spatial_capture_unsynchronized">Captură respinsă: urmărirea capului nu era sincronizată sau s-a schimbat în timpul capturii. Stai nemișcat și încearcă din nou.</string> + <string name="spatial_align_first">Calculează alinierea camerei înainte de a verifica distanța.</string> + <string name="spatial_processing_failed">Procesarea camerei a eșuat</string> + <string name="spatial_hand_head_changed">Urmărirea capului a fost schimbată în timpul detectării mâinilor</string> + <string name="spatial_hand_wait_sync">Se așteaptă sincronizarea camerei și a capului</string> + <string name="spatial_no_wrists">Nu au fost detectate încheieturi. Păstrează mânerele controlerului Joy-Con în fața ochelarilor inteligenți</string> + <string name="spatial_no_hands">Nu au fost detectate mâini. Arată palmele deschise în fața ochelarilor inteligenți</string> + <string name="spatial_one_camera_wrists">Încheieturile sunt vizibile doar într-o cameră; ține mânerele controlerului în câmpul vizual comun</string> + <string name="spatial_one_camera_hands">Mâinile sunt vizibile doar într-o cameră; ține ambele palme în câmpul vizual comun</string> + <string name="spatial_ambiguous_hands">Ambele camere văd mâini, dar potrivirea stânga/dreapta este ambiguă</string> + <string name="spatial_inconsistent_depth">Mâinile detectate, dar adâncimea stereo este inconsecventă</string> + <string name="spatial_rejected_wrist">Poziția încheieturii mâinii a fost respinsă de verificări stereo sau de mișcare</string> + <string name="spatial_inconsistent_palm">Au fost detectate puncte stereo, dar geometria palmei este inconsecventă</string> + <string name="spatial_hands_need_calibration">Finalizează calibrarea și verificarea distanței pentru a activa mâinile</string> + <string name="spatial_hands_wait_stable">Se așteaptă o urmărire stabilă a capului; resetează centrul de urmărire dacă este solicitat</string> + <string name="spatial_old_frame">Observarea camerei este prea veche; așteptând o pereche proaspătă</string> + <string name="spatial_fit_ready">Eroare de calibrare: %1$.2f px. Măsoară distanța selectată de la camera din stânga la centrul țintei de calibrare, apoi validează.</string> + <string name="spatial_opencv_error">OpenCV indisponibil: %1$s</string> + <string name="spatial_restored">Au fost restaurate %1$d vederi salvate. Calculează calibrarea pentru a reîncerca sau începe un set nou pentru a captura mai multe.</string> + <string name="spatial_captured">Captură %1$d / 24 de vizualizări. Păstrează ținta de calibrare fixă; mută ochelarii inteligenți pentru următoarea vizualizare.</string> + <string name="spatial_capture_corners">Captură respinsă: %1$d / 12 colțuri necesare sunt vizibile în ambele camere. Arată o porțiune mai mare din ținta de calibrare, stai nemișcat, apoi încearcă din nou.</string> + <string name="spatial_validation_error">Verificarea distanței nu s-a putut finaliza: %1$s. Încearcă din nou.</string> + <string name="spatial_inference_error">Detectarea mâinilor indisponibile: %1$s. Schimbă CPU/GPU sau comută controlerele operate cu mâinile goale pentru a reîncerca.</string> + <string name="spatial_hand_timeout">Detectarea mâinilor a depășit %1$d ms; observație eliminată</string> + <string name="spatial_wrists_tracked">%1$d / 2 poziții ale încheieturii Joy-Con măsurate prin stereo</string> + <string name="spatial_palms_tracked">Palme urmărite: %1$d / 2; gest de ciupire pregătit: %2$d; gest de prindere pregătit: %3$d</string> + <string name="spatial_capture_saved">Captură de diagnosticare salvată în %1$s</string> + <string name="spatial_hand_error">Urmărirea mâinilor oprită: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Diferența dintre urmărirea capului și ținta de calibrare este de %1$s (limită 5 cm / 2 inchi). Păstrează ținta nemișcată și așteaptă stabilizarea urmăririi înainte de a începe un set nou. Rotește și înclină ușor ochelarii inteligenți; fă o pauză înainte de fiecare captură.</string> + <string name="spatial_need_views">Capturează cel puțin 24 de vizualizări variate ale țintei staționare de calibrare.</string> + <string name="spatial_need_rotation">Rotește ochelarii inteligenți la stânga și la dreapta și înclină-i în sus și în jos; mișcarea fără rotație nu poate calibra alinierea camerei.</string> + <string name="spatial_bad_baseline">Linia de bază a camerei neplauzibilă</string> + <string name="spatial_need_orientations">Mișcă-ți capul prin orientări mai variate.</string> + <string name="spatial_bad_rotation">Rotire de la cameră la cap nevalidă</string> + <string name="spatial_bad_alignment">Alinierea camerei la cap este inconsecventă.</string> + <string name="spatial_calibration_error">Calibrarea nu s-a putut finaliza. %1$s Vizualizările tale capturate sunt salvate.</string> + <string name="spatial_reprojection_error">Eroarea de reproiectare de validare de %1$.2f px depășește 2 px. Recalibrează.</string> + <string name="spatial_distance_corners">%1$d / 24 de colțuri de șah detectate în ambele camere. Păstrează ținta completă de calibrare vizibilă și stai nemișcat. Dacă este deja vizibil, selectează 12 in sau 30 cm și măsoară distanța mai apropiată înainte de a reîncerca.</string> + <string name="spatial_distance_depth">Ținta de calibrare este vizibilă, dar adâncimea sa nu a putut fi măsurată în mod fiabil. Ține nemișcați ochelarii inteligenți și menține ținta de calibrare plată și bine iluminată, apoi încearcă din nou.</string> + <string name="spatial_distance_invalid">Măsurarea camerei nu a fost validă. Stai nemișcat și încearcă din nou.</string> + <string name="spatial_distance_passed">Verificarea distanței a reușit.</string> + <string name="spatial_distance_retry">Verifică din nou distanța de la camera din stânga la centrul țintei de calibrare, apoi încearcă din nou.</string> + <string name="spatial_distance_result">Camere măsurate %1$s; distanța selectată %2$s. %3$s</string> + <string name="spatial_wait_previews">Așteaptă ambele previzualizări ale camerei înainte de a începe calibrarea.</string> + <string name="spatial_saved_views_hint">Vizualizările salvate pot fi recalculate. Începe o nouă calibrare pentru a captura în sistemul de coordonate de urmărire curent.</string> + <string name="spatial_model_checksum_error">Nepotrivire a sumei de control a modelului de mâini</string> + <string name="spatial_opencv_load_error">OpenCV nu s-a putut încărca</string> +</resources> diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index be7523541e..65db27eaf4 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="steamvr_recovery_title">Графика SteamVR перестала работать</string> + <string name="steamvr_recovery_countdown">DroidDeck перезапустится через %1$d сек., чтобы сбросить графику и снова открыть SteamVR. Запущенная игра закроется; несохранённый прогресс восстановить не удастся.</string> + <string name="steamvr_recovery_repeated">Сбой графики повторился вскоре после перезапуска. Автоматическое восстановление приостановлено, чтобы избежать зацикливания. Перезапуск закроет игру; несохранённый прогресс восстановить не удастся.</string> + <string name="steamvr_recovery_restart">Перезапустить</string> + <string name="steamvr_recovery_cancel">Не закрывать</string> + <string name="steamvr_recovery_restarting">Сброс графики и повторный запуск SteamVR…</string> + <string name="steamvr_recovery_failed">Не удалось автоматически перезапустить DroidDeck. Полностью закройте приложение и откройте его снова.</string> <string name="app_name">DroidDeck</string> <string-array name="loading_hints"> <item>При первом запуске будет загружен Steam. Это может занять несколько минут.</item> @@ -15,8 +22,10 @@ <string name="session_channel">Сессия</string> <string name="session_channel_description">Отображается, пока открыта сессия Steam или рабочего стола</string> <string name="session_notification">Steam запущен</string> + <string name="session_notification_downloads">Идет загрузка в Steam</string> <string name="session_notification_paused">Сессия приостановлена — нажмите «Продолжить»</string> <string name="resume_session">Продолжить</string> + <string name="suspend_now">Приостановить сейчас</string> <string name="stop_session">Остановить сессию</string> <string name="frame_gen_title">Генерация кадров</string> <string name="frame_gen_hint">Выберите режим генерации кадров</string> @@ -56,7 +65,7 @@ <string name="game_env_save">Сохранить</string> <string name="game_env_remove">Удалить</string> <string name="game_env_restore">Восстановить наследование</string> - <string name="game_env_reset">Сбросить профиль</string> + <string name="game_env_reset">Очистить переопределения среды</string> <string name="game_env_unset">Не задавать в этом профиле</string> <string name="game_env_empty">Переменные не заданы.</string> <string name="game_env_inherited">Унаследовано</string> @@ -182,6 +191,8 @@ <string name="add_app_flatpak_id">ID приложения</string> <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> <string name="add_app_flatpak_invalid">Недействительный ID приложения Flathub</string> + <string name="add_app_flatpak_bundle_hint">Или файл .flatpak — для приложения, которого нет в Flathub.</string> + <string name="add_app_pick_flatpak">Выбрать файл .flatpak</string> <string name="add_app_source">Источник</string> <string name="add_app_appearance">На рабочем столе</string> <string name="add_app_preview_name">Новое приложение</string> @@ -251,6 +262,10 @@ <string name="mode_osc">Экранные элементы управления</string> <string name="mode_osc_qam">Steam + QAM</string> <string name="mode_osc_note">Автоматический режим показывает экранные элементы управления, если контроллер не подключен.</string> + <string name="osc_steam_touch">Сенсорное управление Steam (бета)</string> + <string name="osc_style_next_session">Сенсорное управление Steam включится со следующей сессии Steam</string> + <string name="osc_steam_layout">Сенсорная раскладка Steam</string> + <string name="osc_steam_layout_hint">Перемещайте, меняйте размер или скрывайте сенсорные кнопки этой игры; сохраняется в Steam</string> <string name="mode_controller">Контроллер</string> <string name="mode_controller_hint">Как Steam распознает ваш контроллер. Вступит в силу в следующей сессии.</string> <string name="mode_controller_deck">Контроллер Steam Deck</string> @@ -258,14 +273,18 @@ <string name="mode_controller_ds4">DualShock 4</string> <string name="mode_controller_dualsense">DualSense</string> <string name="mode_controller_x360">Контроллер Xbox 360</string> - <string name="mode_controller_note">Deck: кнопка быстрого доступа и гироскоп. Xbox 360: используйте Guide+A для быстрого доступа.</string> + <string name="mode_controller_note">Deck: кнопка быстрого доступа и гироскоп. Steam Controller: то же самое, с датчиком хвата на задних кнопках. DualShock 4 и DualSense: гироскоп, а трекпады работают как их тачпад. Xbox 360: используйте Guide+A для быстрого доступа.</string> <string name="mode_back">Назад</string> + <string name="back_menu_then_qam">Меню → QAM</string> + <string name="back_qam_then_menu">QAM → Меню</string> <string name="mode_session">Сессия</string> <string name="mode_suspend">Поведение в фоне</string> <string name="mode_suspend_hint">Поведение при скрытии приложения или выключении экрана.</string> <string name="mode_suspend_manual">Вручную</string> <string name="mode_suspend_native">Штатный</string> <string name="mode_suspend_steam_note">Авто: пауза и возобновление при показе. Штатный: сначала подготавливает Steam к переходу в режим сна. Вручную: ждет нажатия «Продолжить». Никогда: сессия продолжает работать.</string> + <string name="mode_background_downloads">Не прерывать загрузки</string> + <string name="mode_background_downloads_hint">Откладывает приостановку в фоне, пока Steam что-то скачивает.</string> <string name="mode_suspend_note">Авто: пауза в фоне и возобновление при показе. Вручную: ждет нажатия «Продолжить». Никогда: сессия продолжает работать.</string> <string name="mode_startup">Запуск</string> <string name="mode_steam_startup">Запускать Steam при открытии DroidDeck</string> @@ -294,14 +313,60 @@ <string name="mode_sgdb_key">API-ключ SteamGridDB</string> <string name="mode_sgdb_key_yours">Ваш ключ</string> <string name="mode_sgdb_edit">Изменить…</string> - <string name="mode_added_art_hint">Дополняет отсутствующие изображения по имени папки. Файлы cover.jpg, hero.jpg, logo.png или icon.png в папке с игрой имеют приоритет.</string> - <string name="summary_remove_game">Remove %1$s</string> + <string name="mode_added_art_hint">Дополняет отсутствующие изображения из Steam, затем из SteamGridDB. Файлы cover.jpg, hero.jpg, logo.png или icon.png в папке с игрой имеют приоритет.</string> + <string name="summary_remove_game">Убрать %1$s</string> <string name="mode_added_remove_confirm">Убрать?</string> <string name="games_add">Добавить игру</string> <string name="games_add_title">Добавить игру:</string> <string name="games_pick_exe_title">Выберите exe:</string> <string name="games_add_unreachable">Это расположение недоступно в сеансе</string> <string name="mode_added_exe_check">Проверьте этот exe</string> + <string name="wincomp_title">Компоненты Windows</string> + <string name="wincomp_pad_hint">LB / RB — переход между разделами.</string> + <string name="wincomp_card_none">Нет</string> + <string name="wincomp_applies">DLL для Windows из списка компонентов, которых нет в Proton. Включите те, что нужны этой игре: они попадают в собственную папку Windows игры (ее файлы не затрагиваются) и сохраняются при любой версии Proton.</string> + <string name="wincomp_offline">Не удалось получить список компонентов. Уже скачанные компоненты можно включать и выключать.</string> + <string name="wincomp_recommended">Рекомендуется для этой игры</string> + <string name="wincomp_checking">Проверка, что нужно этой игре…</string> + <string name="wincomp_when_online">Доступно при подключении к сети</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Включение %1$d компонента…</item> + <item quantity="few">Включение %1$d компонентов…</item> + <item quantity="many">Включение %1$d компонентов…</item> + <item quantity="other">Включение %1$d компонента…</item> + </plurals> + <string name="wincomp_auto_section">Включено для этой игры</string> + <string name="wincomp_auto_steam">Steam устанавливает %1$s вместе с %2$s (приложение %3$s)</string> + <string name="wincomp_auto_gog">Из списка GOG для этой игры</string> + <string name="wincomp_auto_epic">Из требований Epic для этой игры</string> + <string name="wincomp_auto_amazon">Из шагов установки Amazon для этой игры</string> + <string name="wincomp_steam_by_name">Steam устанавливает %1$s с приложением %2$s (совпадение по имени)</string> + <string name="wincomp_suggestions">Также в списке</string> + <string name="wincomp_suggestion_reason">В списке %1$s; здесь это не компонент</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Игра поставляется с %1$s</string> + <string name="wincomp_found_shipped">В игре есть %1$s (часто работает как есть)</string> + <string name="wincomp_already_here">Уже есть в этой игре</string> + <string name="wincomp_no_recommendation">Ничто в папке игры не указывает на нужный компонент.</string> + <string name="wincomp_active">Установлено для этой игры (%1$d)</string> + <string name="wincomp_all">Все компоненты (%1$d)</string> + <string name="wincomp_installers">Нужен установщик Windows (%1$d)</string> + <string name="wincomp_installers_note">Это отдельные программы установки: внутри нет пакета, который можно разобрать, и пока нет записи того, что они устанавливают. В основном это старые среды выполнения, которые уже заменяет Mono внутри Proton; записи добавляются по мере появления.</string> + <string name="wincomp_show">Показать</string> + <string name="wincomp_hide">Скрыть</string> + <string name="wincomp_needs_installer">Запускает свою программу установки (записи пока нет)</string> + <string name="wincomp_unsupported">Здесь пока не поддерживается</string> + <string name="wincomp_loading">Загрузка компонентов…</string> + <string name="wincomp_failed">Не удалось установить: %1$s</string> + <string name="wincomp_downloaded">Скачано</string> + <string name="wincomp_downloading">Загрузка %1$s</string> + <string name="wincomp_installing">Установка: %1$s</string> + <string name="wincomp_reverting">Отключение…</string> + <string name="wincomp_download_size">Загрузка: %1$s</string> + <string name="wincomp_next_launch">Вступит в силу при следующем запуске игры.</string> <string name="mode_stretch169">Растянуть игры 16:9</string> <string name="mode_stretch169_hint">На экранах уже 16:9 растягивает игры на весь экран вместо черных полос. Вступит в силу в следующей сессии.</string> <string name="mode_audio">Аудио</string> @@ -359,6 +424,51 @@ <string name="comp_check_nightlies">Проверить новые пакеты в Nightlies</string> <string name="comp_proton">Proton</string> <string name="comp_proton_note">Выбранный здесь Proton запускает все игры, для которых в Steam не выбран свой; изменение, сделанное в Steam, тоже отображается здесь. При обновлении Steam заменяет Proton от Valve; оригинальные файлы каждой сборки сохраняются.</string> + <string name="comp_scope">Конфигурация</string> + <string name="comp_profile_configure">Настроить профиль</string> + <string name="comp_profile">Профиль</string> + <string name="comp_scope_general">Профиль по умолчанию</string> + <string name="comp_scope_general_detail">Автоматически используется играми без переопределений.</string> + <string name="comp_profile_game_detail">Сохраненные настройки, которые автоматически применяются при запуске %1$s.</string> + <string name="comp_game_hint">Выберите только те настройки, которые нужны этой игре. Все остальное по-прежнему берется из профиля по умолчанию.</string> + <string name="comp_game_fex">Пресет FEX</string> + <string name="comp_game_fex_inherited">Используется пресет из профиля по умолчанию.</string> + <string name="comp_game_fex_override">Для этой игры сохранен свой пресет.</string> + <string name="comp_game_fex_custom">Свои переменные FEX</string> + <string name="comp_game_use_general">По умолчанию</string> + <string name="comp_game_compatibility">Совместимость игры</string> + <string name="comp_game_environment_hint">Параметры среды Proton, DXVK, VKD3D и синхронизации для этой игры.</string> + <string name="comp_game_proton_inherited">Используется Proton из профиля по умолчанию.</string> + <string name="comp_game_proton_override">Для этой игры сохранен свой Proton через настройку совместимости Steam.</string> + <string name="comp_no_proton_short">Без Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Использует пакет из профиля по умолчанию от %1$s, если для этой игры не выбран другой пакет.</string> + <string name="comp_game_component_general">Использует пакет компонентов из профиля по умолчанию.</string> + <string name="comp_game_component_override">Использует %1$s только для этой игры.</string> + <string name="comp_game_runtime_options">Параметры среды выполнения</string> + <string name="comp_game_environment_other_hint">Другие параметры среды Proton, DXVK, VKD3D-Proton и синхронизации для отдельной игры.</string> + <string name="comp_game_saved_next">Профиль %1$s сохранен и применится при следующем запуске игры.</string> + <string name="game_no_steam_title">Запуск без Steam</string> + <string name="game_no_steam_detail">Открывает в Proton/FEX без клиента Steam; функции Steam отключены.</string> + <string name="game_no_steam_on">Включено</string> + <string name="game_steam_with">Запускается со Steam</string> + <string name="game_steam_without">Запускается без Steam</string> + <string name="game_settings_card">Настройки</string> + <string name="game_settings_menu_title">Настройки %1$s</string> + <string name="game_settings_default">По умолчанию</string> + <string name="game_settings_default_detail">Возвращает всё, что изменено для этой игры, к настройкам приложения.</string> + <string name="game_sync_custom">Свои переменные синхронизации</string> + <string name="comp_game_proton_live">Выбор Proton для %1$s сохранен и уже доступен в Steam.</string> + <string name="comp_game_proton_next">Выбор Proton для %1$s сохранен. Перезапустите Steam перед запуском игры.</string> + <string name="comp_game_proton_not_runnable">%1$s не может использовать выбранный Proton на этом устройстве.</string> + <string name="comp_game_load_failed">Не удалось загрузить профиль %1$s: %2$s</string> + <string name="comp_game_save_failed">Не удалось сохранить профиль игры: %1$s</string> + <string name="comp_game_reset">Сбросить профиль игры</string> + <string name="comp_game_reset_title">Сбросить профиль %1$s?</string> + <string name="comp_game_reset_body">Удалить переопределения Proton, FEX, пакета компонентов, среды, фильтрации текстур и компонентов Windows для этой игры? Она будет использовать профиль по умолчанию.</string> + <string name="comp_game_reset_done">%1$s теперь использует профиль по умолчанию.</string> + <string name="comp_game_reset_failed">Не удалось полностью сбросить профиль игры: %1$s</string> <string name="comp_default_live">%1$s теперь запускает все игры, для которых в Steam не выбран свой Proton.</string> <string name="comp_default_next">%1$s будет запускать все игры, для которых не выбран свой Proton, со следующего запуска Steam.</string> <string name="comp_default_not_runnable">%1$s не может запускать игры здесь, поэтому не может быть Proton по умолчанию.</string> @@ -377,7 +487,7 @@ <string name="comp_applies_next_game">Вступит в силу при следующем запуске игры</string> <string name="comp_import_zip">Импорт .zip</string> <string name="comp_reading">Чтение Proton…</string> - <string name="comp_no_proton">Proton еще не установлен. Запустите Steam один раз, чтобы скачать ARM64 Proton, или добавьте GE-Proton или CachyOS на странице «Настройка».</string> + <string name="comp_no_proton">Proton еще не установлен. Запустите Steam один раз, чтобы скачать ARM64 Proton, или добавьте GE-Proton, CachyOS или DroidDeck-Proton на странице «Настройка».</string> <string name="comp_original">Оригинал · %1$s</string> <string name="comp_this_build">%1$s · текущая сборка</string> <string name="comp_earlier_build">%1$s · более ранняя сборка</string> @@ -483,6 +593,10 @@ <string name="drawer_cas">Резкость (CAS)</string> <string name="drawer_cas_level">Уровень резкости</string> <string name="drawer_fake_hdr">Псевдо-HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Запустить SteamVR</string> + <string name="steamvr_checking">Проверка SteamVR…</string> <string name="drawer_deband">Удаление полос (debanding)</string> <string name="drawer_deband_strength">Сила удаления полос</string> <string name="drawer_brightness">Яркость</string> @@ -500,6 +614,11 @@ <string name="drawer_texture_sharpness_note">Отрицательное смещение мип-уровней: текстуры резче, возможно мерцание. «Авто» подбирает значение по тому, насколько изображение сессии увеличено до размера экрана.</string> <string name="drawer_touch_auto">Авто (%1$s)</string> <string name="drawer_keyboard">Клавиатура</string> + <string name="drawer_latency">Задержка</string> + <string name="drawer_low_latency_controller">Контроллер с низкой задержкой</string> + <string name="drawer_low_latency_controller_hint">Контроллер опрашивается на 1000 Гц вместо 250 Гц. Немного больше нагрузки на CPU.</string> + <string name="drawer_low_latency_touch">Сенсор с низкой задержкой</string> + <string name="drawer_low_latency_touch_hint">Касания идут без объединения кадров; сенсорное управление Steam работает на 1000 Гц. Немного больше нагрузки на CPU.</string> <string name="drawer_pc_keyboard">Клавиатура ПК</string> <string name="drawer_android_keyboard">Android</string> <string name="drawer_second_screen">Второй экран</string> @@ -522,11 +641,26 @@ <string name="drawer_stop_title">Остановить сессию?</string> <string name="drawer_running_now">Сейчас выполняется</string> <string name="drawer_no_game">Сейчас нет игр, запущенных через Proton</string> + <string name="drawer_selected_profile">Профиль игры</string> + <string name="drawer_selected_profile_none">Сведения о профиле пока недоступны.</string> + <string name="drawer_profile_refresh_failed_initial">Не удалось загрузить профили игр. Повторная попытка будет выполнена автоматически.</string> + <string name="drawer_profile_refresh_failed_stale">Не удалось обновить профили игр. Показаны последние доступные данные; повторная попытка будет выполнена автоматически.</string> + <string name="drawer_profile_inspect_hint">Просмотр и изменение сохраненных настроек для следующего запуска.</string> + <string name="drawer_profile_default">Используется профиль по умолчанию</string> + <string name="drawer_profile_custom">Свой профиль</string> + <string name="drawer_component_inherited">Используется %1$s из профиля по умолчанию.</string> + <string name="drawer_game_components_note">Изменения сохраняются в профиль %1$s и вступят в силу при следующем запуске игры.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d переопределение для игры</item> + <item quantity="few">%1$d переопределения для игры</item> + <item quantity="many">%1$d переопределений для игры</item> + <item quantity="other">%1$d переопределения для игры</item> + </plurals> <string name="drawer_no_proton">Proton не установлен.</string> <string name="drawer_game_running">игра запущена</string> <string name="drawer_reapplied">повторно применено при запуске %1$s</string> <string name="drawer_original">Оригинал</string> - <string name="drawer_components_note">Скачивайте, импортируйте и удаляйте на странице «Компоненты».</string> + <string name="drawer_components_note">Импортируйте и удаляйте на странице «Компоненты».</string> <string name="setup_check_done">Готово</string> <string name="setup_check_warn">Требует внимания</string> <string name="setup_check_busy">Обработка</string> @@ -578,9 +712,21 @@ <string name="setup_saved_logs">Сохраненные журналы сессии</string> <string name="setup_saved_logs_hint">Хранятся последние %1$d</string> <string name="setup_clear_logs">Очистить журналы</string> + <string name="setup_reset_settings">Сбросить все настройки</string> + <string name="setup_reset_settings_hint">Возвращает все настройки к значениям по умолчанию</string> + <string name="setup_reset_settings_button">Сбросить</string> + <string name="setup_reset_settings_title">Сбросить все настройки?</string> + <string name="setup_reset_settings_body">Настройки экрана, производительности, контроллера, темы, языка и лаунчера вернутся к значениям по умолчанию. Ваши игры, вход в Steam, аккаунты магазинов, загруженные драйверы и папки хранилища сохранятся.</string> + <string name="setup_reset_settings_profiles">Также сбросить профили игр (Proton, FEX, компоненты и окружение каждой игры, а также окружение профиля по умолчанию)</string> + <string name="setup_reset_settings_session_running">Остановите сессию перед сбросом настроек.</string> + <string name="setup_reset_settings_partial">Настройки сброшены, но некоторые части сбросить не удалось. Подробности в журналах.</string> <string name="setup_offline">Автономный режим</string> <string name="setup_sign_in_first">Сначала войдите в Steam</string> <string name="setup_launcher">Лаунчер</string> + <string name="setup_language">Язык</string> + <string name="setup_language_hint">Steam тоже будет его использовать после следующего запуска.</string> + <string name="setup_language_system">Как в системе (%1$s)</string> + <string name="setup_language_system_short">Как в системе</string> <string name="setup_app_scale">Масштаб приложения</string> <string name="setup_app_scale_hint">Текст и элементы управления DroidDeck</string> <string name="setup_app_scale_default">%1$d%% (по умолчанию)</string> @@ -589,6 +735,10 @@ <string name="setup_home">Использовать как главный экран</string> <string name="setup_home_on">DroidDeck может использоваться как приложение главного экрана</string> <string name="setup_home_off">DroidDeck не будет доступен как приложение главного экрана</string> + <string name="setup_orientation">Ориентация</string> + <string name="setup_orientation_auto">Альбомная (авто)</string> + <string name="setup_orientation_landscape">Альбомная</string> + <string name="setup_orientation_reverse">Перевернутая альбомная</string> <string name="setup_fullscreen">Полноэкранный режим</string> <string name="setup_fullscreen_on">Скрывает строку состояния и панель навигации Android</string> <string name="setup_fullscreen_off">Показывает строку состояния и панель навигации Android</string> @@ -736,7 +886,7 @@ <string name="gate_eyebrow">Steam</string> <string name="gate_lede">Android останавливает приложения, запускающие множество фоновых процессов, а Steam запускает десятки. До изменения этой настройки игры могут закрываться без сообщения об ошибке.</string> <string name="gate_fix_for_me">Исправить автоматически</string> - <string name="gate_toggle_steps">Включите «Отключить ограничение дочерних процессов» и вернитесь. Оставьте раздел «Для разработчиков» включенным, иначе переключатель снова отключится.</string> + <string name="gate_toggle_steps">Включите «Отключить ограничения для дочерних процессов» и вернитесь. Оставьте раздел «Для разработчиков» включенным, иначе переключатель снова отключится.</string> <string name="gate_open_dev">Открыть «Для разработчиков»</string> <string name="gate_no_toggle">В этой версии Android нет такого переключателя, поэтому DroidDeck внесет изменения через отладку по Wi-Fi. Это займет около минуты, компьютер не нужен.</string> <string name="gate_needs_wifi">Для отладки по Wi-Fi требуется Wi-Fi. Подойдет любая сеть, интернет не нужен.</string> @@ -786,8 +936,8 @@ <string name="wadb_turn_off">Отключить ограничение</string> <string name="wadb_other_ways">Другие способы изменения</string> <string name="wadb_dev_try_first">1 · Для разработчиков (сначала попробуйте это)</string> - <string name="wadb_restrict_on">Включите «Ограничение дочерних процессов».</string> - <string name="wadb_restrict_off">Отключите «Ограничение дочерних процессов».</string> + <string name="wadb_restrict_on">Отключите «Отключить ограничения для дочерних процессов».</string> + <string name="wadb_restrict_off">Включите «Отключить ограничения для дочерних процессов».</string> <string name="wadb_computer_last">3 · ADB на ПК (крайняя мера)</string> <string name="wadb_only_if">Используйте только если отладка по Wi-Fi недоступна.</string> <string name="wadb_computer_group">3 · ADB на ПК (крайняя мера)</string> @@ -808,6 +958,8 @@ <string name="ctrl_keyboard_button">Кнопка клавиатуры</string> <string name="ctrl_select_steam">Нажмите Select, чтобы открыть меню Steam</string> <string name="ctrl_select_steam_hint">Вместо View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con как VR-контроллеры</string> + <string name="ctrl_joycon_vr_hint">Пока работает SteamVR, каждый Joy-Con становится рукой. Направьте его вперёд и удерживайте Home или Capture, чтобы снова его отцентрировать.</string> <string name="setup_animations">Анимации</string> <string name="ctrl_adaptive_hint">Стики появляются в месте касания и исчезают после отпускания</string> <string name="ctrl_layout">Раскладка</string> @@ -855,10 +1007,17 @@ <string name="content_page_gone">Эта страница больше не существует. Выберите раздел слева.</string> <string name="content_open_desktop">Открыть рабочий стол</string> <string name="content_install_open_desktop">Установить и открыть рабочий стол</string> + <string name="desktop_remove_title">Удалить рабочий стол</string> + <string name="desktop_remove_text">Удаление рабочего стола и встроенных в него приложений. Игры, добавленные приложения, настройки и общие библиотеки сохранятся.</string> + <string name="desktop_removing">Удаление рабочего стола</string> + <string name="desktop_removed">Рабочий стол удален</string> + <string name="desktop_cleaning_legacy">Удаление старых файлов LXQt</string> + <string name="desktop_removal_unknown">Обновите DroidDeck, прежде чем удалять эту версию рабочего стола.</string> <string name="content_linux_desktop">Рабочий стол Linux</string> <string name="content_linux_desktop_hint">KDE Plasma, Firefox и ваши эмуляторы</string> <string name="games_empty">Игры, установленные в Steam, появятся здесь после завершения сессии.</string> <string name="games_play_steam">Запустить Steam</string> + <string name="games_play_steamvr">Запустить SteamVR</string> <string name="games_launch_settings">Настройки запуска</string> <string name="games_launch">Запустить</string> <string name="games_files">Файлы игры</string> @@ -883,6 +1042,8 @@ <string name="games_last_played">Последний запуск %1$s</string> <string name="games_internal">Внутреннее хранилище</string> <string name="games_added">Добавленная игра</string> + <string name="games_custom">Своя игра</string> + <string name="games_store_storage">Хранилище игр</string> <string name="gpu_auto_hint">Лучшая пара для этого GPU, обновляется автоматически</string> <string name="gpu_manual_hint">Выбрать комбинацию драйверов вручную</string> <string name="gpu_checking">Проверка драйверов…</string> @@ -894,7 +1055,6 @@ <string name="gpu_set_with_runtime">Настраивается вместе с драйвером среды выполнения: %1$s включает оба.</string> <string name="gpu_runtime_hint">Используется играми и рабочим столом.</string> <string name="gpu_runtime_default">Стандартный драйвер среды выполнения</string> - <string name="gpu_display_hint">Отвечает за вывод изображения на экран. Вступит в силу после перезапуска DroidDeck.</string> <string name="gpu_auto_by_gpu">Авто — по GPU</string> <string name="gpu_manage">Скачать, импортировать или удалить…</string> <string name="gpu_in_use_caps">ИСПОЛЬЗУЕТСЯ</string> @@ -924,6 +1084,12 @@ <string name="deck_tab_left">Левый тачпад</string> <string name="deck_tab_right">Правый тачпад</string> <string name="deck_tab_both">Оба</string> + <string name="deck_tab_gamepad">Геймпад</string> + <string name="deck_surface_stick">Стик</string> + <string name="deck_surface_trackpad">Тачпад</string> + <string name="deck_surface_switch">Переключение между стиком и тачпадом</string> + <string name="deck_more_controls">Другие элементы управления Deck</string> + <string name="deck_panels">ПАНЕЛИ</string> <string name="deck_close">Закрыть управление вторым экраном</string> <string name="deck_open_steam_menu">Открыть меню Steam</string> <string name="deck_left_upper">Слева · сверху</string> @@ -959,6 +1125,10 @@ <string name="proton_installed">Установлено: %1$s</string> <string name="proton_queued">В очереди по предыдущему запросу</string> <string name="proton_not_installed">Не установлено</string> + <string name="proton_update_available">Доступно обновление → %1$s</string> + <string name="proton_remove_older">Удалить старые версии %1$s</string> + <string name="proton_remove_older_body">Будут удалены: %1$s. Игры, настроенные на эти версии, нужно переключить на другой Proton.</string> + <string name="proton_remove_body">Игры, настроенные на эту версию, нужно переключить на другой Proton.</string> <string name="proton_install_now">Установить сейчас</string> <string name="proton_cancel_queued">Убрать из очереди</string> <string name="pckb_android">Клавиатура Android</string> @@ -987,6 +1157,8 @@ <string name="game_env_eyebrow">Игры Proton</string> <string name="pip_title">Картинка в картинке</string> <string name="pip_auto">Автоматически переходить в режим PiP</string> + <string name="unfolded_controls">Управление на разложенном экране</string> + <string name="unfolded_controls_hint">В разложенном виде игра находится над тачпадами и грипсами Steam Deck. В сложенном — игра на весь экран.</string> <string name="pip_suspended">Приостановлено</string> <string name="pip_not_ready">PiP станет доступен после готовности сессии.</string> <string name="pip_permission">Разрешите DroidDeck использовать PiP в настройках Android.</string> @@ -1011,8 +1183,741 @@ <string name="game_file_folder">Выбрать папку для файлов игры фронтенда</string> <string name="game_file_exported">Файлы игры сохранены в %1$s</string> <string name="game_frontend_files">Файлы фронтенда</string> - <string name="fm_up_one_level">На уровень вверх</string> + + <string name="main_wait_runtime">Дождитесь завершения операции со средой выполнения</string> + <string name="main_wait_proton_install">Дождитесь завершения установки инструмента совместимости</string> + <string name="main_wait_desktop_install">Дождитесь завершения установки приложения рабочего стола</string> + <string name="main_wait_install_game">Дождитесь завершения установки, прежде чем запускать игру</string> + <string name="main_saves_close_session">Сначала закройте сессию Steam, чтобы игра не записала свои сохранения поверх импортированных</string> + <string name="main_saves_importing">Импорт в %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Импортирован %1$d файл (%2$s) в %3$s</item> + <item quantity="few">Импортировано %1$d файла (%2$s) в %3$s</item> + <item quantity="many">Импортировано %1$d файлов (%2$s) в %3$s</item> + <item quantity="other">Импортировано %1$d файла (%2$s) в %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Импортирован %1$d файл (%2$s) в %3$s. Старые сохранения скопированы в Download/DroidDeck/Saves/backups</item> + <item quantity="few">Импортировано %1$d файла (%2$s) в %3$s. Старые сохранения скопированы в Download/DroidDeck/Saves/backups</item> + <item quantity="many">Импортировано %1$d файлов (%2$s) в %3$s. Старые сохранения скопированы в Download/DroidDeck/Saves/backups</item> + <item quantity="other">Импортировано %1$d файла (%2$s) в %3$s. Старые сохранения скопированы в Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Выберите zip-архив сохранений для %1$s</string> + <string name="main_saves_exporting">Экспорт %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Экспортирован %1$d файл (%2$s): %3$s</item> + <item quantity="few">Экспортировано %1$d файла (%2$s): %3$s</item> + <item quantity="many">Экспортировано %1$d файлов (%2$s): %3$s</item> + <item quantity="other">Экспортировано %1$d файла (%2$s): %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Выберите, куда сохранить %1$s (%2$s)</string> + <string name="main_action_failed">Ошибка (%1$s): %2$s</string> + <string name="main_no_logs_yet">Журналов сессии пока нет: сначала запустите сессию.</string> + <string name="main_no_logs_to_clear">Нет журналов сессии для очистки.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Очищена %1$d папка журналов сессии.</item> + <item quantity="few">Очищено %1$d папки журналов сессии.</item> + <item quantity="many">Очищено %1$d папок журналов сессии.</item> + <item quantity="other">Очищено %1$d папки журналов сессии.</item> + </plurals> + <string name="main_wadb_pair_failed">Ошибка сопряжения для отладки по Wi-Fi</string> + <string name="main_wadb_command_failed">Ошибка команды отладки по Wi-Fi</string> + <string name="main_wadb_unavailable">Отладка по Wi-Fi недоступна</string> + <string name="main_adb_copied">Команда ADB скопирована</string> + <string name="main_pick_roms">Выберите папку ROM</string> + <string name="main_non_adreno_title">GPU не Adreno</string> + <string name="main_non_adreno_text">Turnip поддерживает GPU Adreno. На %1$s в Steam может быть черный экран. Загрузка: %2$.0f МБ.</string> + <string name="main_install_anyway">Все равно установить</string> + <string name="main_remove_runtime_title">Удалить среду выполнения Linux</string> + <string name="main_remove_runtime_text">Будут удалены среда выполнения, клиент Steam в ней и все установленные туда игры.</string> + <string name="main_applied">Применено: %1$s</string> + <string name="android_app_open_failed_primary">Не удалось открыть %1$s на главном экране</string> + <string name="android_app_open_failed_on">Не удалось открыть %1$s на экране «%2$s»</string> + <string name="android_app_open_failed_display">Не удалось открыть %1$s на экране %2$d</string> + <string name="comp_busy_importing">Импорт</string> + <string name="comp_busy_swapping">Замена</string> + <string name="comp_busy_restoring">Восстановление</string> + <string name="comp_busy_cancelling">Отмена</string> + <string name="comp_busy_deleting">Удаление</string> + <string name="comp_cannot_read">не удается прочитать файл</string> + <string name="comp_imported">Импортировано: %1$s</string> + <string name="comp_swap_cancelled">Ожидающая замена отменена.</string> + <string name="comp_pick_wcp">Выберите пакет компонентов (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Не удалось подключиться к Nightlies</string> + <string name="comp_stored">Сохранено: %1$s</string> + <string name="comp_download_failed">Ошибка загрузки: %1$s</string> + <string name="drivers_pick_linux">Выберите драйвер среды выполнения Linux (-Linux zip или пакет Android + Linux)</string> + <string name="drivers_pick_android">Выберите драйвер дисплея (AdrenoTools zip или пакет Android + Linux)</string> + <string name="drivers_pick_any">Выберите zip-архив драйвера или пакет Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Удаление %1$s…</string> + <string name="main_forgetting_named">Удаление %1$s из списка…</string> + <string name="main_pick_game_storage">Выберите папку хранилища игр</string> + <string name="main_pick_decky_zip">Выберите ZIP-файл плагина Decky</string> + <string name="main_storage_not_usable">Нельзя использовать: %1$s</string> + <string name="main_running_program">Программа</string> + <string name="main_removing_runtime">Удаление среды выполнения Linux</string> + <string name="main_settings_main_screen">Не удалось открыть настройки на нижнем экране; они открыты на главном экране.</string> + <string name="main_open_dev_options">Откройте раздел «Для разработчиков» в настройках</string> + + <string name="upd_unknown_apps_failed">Не удалось открыть настройку Android «Установка неизвестных приложений»</string> + <string name="upd_couldnt_check">Не удалось проверить: %1$s</string> + <string name="upd_no_download">В этой сборке нет файла для этой копии DroidDeck</string> + <string name="upd_stop_first">Сначала остановите текущую сессию, затем обновите</string> + <string name="upd_stage_downloading">Загрузка</string> + <string name="upd_stage_installing">Установка</string> + <string name="upd_stage_confirm">Ожидание вашего подтверждения</string> + <string name="upd_failed">Ошибка обновления</string> + <string name="upd_not_offered">Android не предложил установить обновление</string> + + <string name="decky_install_failed">Ошибка установки Decky: %1$s</string> + <string name="decky_plugin_starting">Начало импорта плагина…</string> + <string name="decky_plugin_failed">Ошибка импорта плагина: %1$s</string> + <string name="decky_plugin_installed">Плагин установлен. Перезапустите Steam, чтобы загрузить его.</string> + + <string name="drivers_not_checked">Еще не проверялось — нажмите «Обновить», чтобы найти новые драйверы</string> + <string name="drivers_bundle_sets_display">Android + Linux: заодно задает драйвер дисплея</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: заодно задает драйвер среды выполнения</string> + <string name="drivers_runtime_builtin">Turnip, встроенный в среду выполнения</string> + <string name="drivers_system_vulkan">системный Vulkan: для этого GPU нет встроенной сборки</string> + <string name="drivers_bundled">%1$s (встроенный)</string> + <string name="drivers_manual">Вручную</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Сейчас опубликована только одна половина</string> + <string name="drivers_pair_size">%1$.0f МБ за оба</string> + <string name="drivers_none_to_set">Нет драйверов для установки: %1$s</string> + <string name="drivers_checking_latest">Поиск последних драйверов…</string> + <string name="drivers_up_to_date_check_failed">Актуально (не удалось проверить: %1$s)</string> + <string name="drivers_recommended_unpublished">Рекомендуемые драйверы сейчас не опубликованы</string> + <string name="drivers_downloading_pair">Загрузка %1$s %2$s…</string> + <string name="drivers_updated_to">Обновлено до %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Обновлено до %1$s %2$s. Драйвер дисплея применится после перезапуска DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Обновления драйверов ждут окончания сессии.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s загрузится, когда вы отключите мобильные данные и экономию заряда.</string> + <string name="drivers_skipping_bad">%1$s %2$s не запустил сессию на этом устройстве, поэтому «Авто» остаётся на драйверах, которые работали.</string> + <string name="drivers_rolled_back">%1$s дважды не запустил сессию, поэтому «Авто» вернулся к драйверам, которые работали.</string> + <string name="drivers_switched_to">Выбран %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Выбран %1$s %2$s. Драйвер дисплея применится после перезапуска DroidDeck.</string> + <string name="drivers_using">Используется %1$s %2$s.</string> + <string name="drivers_using_restart">Используется %1$s %2$s. Драйвер дисплея применится после перезапуска DroidDeck.</string> + <string name="drivers_using_quest">Используются встроенный дисплейный драйвер Quest и стандартный драйвер среды выполнения.</string> + <string name="drivers_using_quest_restart">Используются встроенный дисплейный драйвер Quest и стандартный драйвер среды выполнения. Дисплейный драйвер применится после перезапуска DroidDeck.</string> + <string name="drivers_not_a_driver">Это не zip-архив драйвера: ни драйвер AdrenoTools, ни -Linux Turnip, ни пакет Android + Linux</string> + <string name="drivers_import_failed">Ошибка импорта: %1$s</string> + <string name="drivers_imported_unnamed">Импортированный драйвер</string> + <string name="drivers_using_bundle">%1$s используется как драйвер среды выполнения и драйвер дисплея.</string> + <string name="drivers_using_bundle_restart">%1$s используется как драйвер среды выполнения и драйвер дисплея. Драйвер дисплея применится после перезапуска DroidDeck.</string> + <string name="drivers_deleted_bundle">Удалено: %1$s (оба драйвера)</string> + <string name="drivers_deleted">Удалено: %1$s</string> + <string name="drivers_release_status">Последние: %1$s · проверено %2$s</string> + <string name="drivers_release_status_failed">Последние: %1$s · %2$s недоступно · проверено %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d мин назад</item> + <item quantity="few">%1$d мин назад</item> + <item quantity="many">%1$d мин назад</item> + <item quantity="other">%1$d мин назад</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d ч назад</item> + <item quantity="few">%1$d ч назад</item> + <item quantity="many">%1$d ч назад</item> + <item quantity="other">%1$d ч назад</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d день назад</item> + <item quantity="few">%1$d дня назад</item> + <item quantity="many">%1$d дней назад</item> + <item quantity="other">%1$d дня назад</item> + </plurals> + <string name="drivers_checking_sources">Проверка Banners-Turnip, WinNative и DroidDeck…</string> + <string name="drivers_check_failed">ошибка проверки</string> + <string name="drivers_installed_pick_either">Установлен %1$s — выберите его в любом из списков, чтобы задать оба драйвера</string> + <string name="drivers_installed_pick">Установлен %1$s — выберите его в меню</string> + + <string name="session_wait_removal">Дождитесь завершения удаления среды выполнения</string> + <string name="session_title_game">Игра</string> + <string name="session_touch_auto_touchpad">тачпад</string> + <string name="session_touch_auto_direct">прямой</string> + <string name="session_swap_failed">Ошибка замены: %1$s</string> + <string name="session_profile_save_failed">Ошибка сохранения профиля: %1$s</string> + <string name="session_desktop_paused">Рабочий стол приостановлен</string> + <string name="session_named_paused">%1$s на паузе</string> + <string name="session_program_paused">Программа приостановлена</string> + <string name="session_starting_desktop">Запуск рабочего стола</string> + <string name="session_starting_named">Запуск %1$s</string> + <string name="session_starting_program">Запуск программы</string> + <string name="session_no_logs">Для этой сессии нет журналов.</string> + <string name="session_logs_archive_failed">Не удалось создать архив журналов сессии.</string> + <string name="session_logs_share_failed">Не удалось поделиться журналами сессии.</string> + <string name="session_starting_session">Запуск сессии…</string> + <string name="session_runtime_downloading">загрузка среды выполнения Linux</string> + <string name="session_runtime_downloading_mb">загрузка среды выполнения Linux · %1$d из %2$d МБ</string> + <string name="session_runtime_checking">проверка среды выполнения Linux</string> + <string name="session_runtime_unpacking">распаковка среды выполнения Linux</string> + <string name="session_desktop_downloading">загрузка рабочего стола</string> + <string name="session_desktop_downloading_mb">загрузка рабочего стола · %1$d из %2$d МБ</string> + <string name="session_desktop_checking">проверка рабочего стола</string> + <string name="session_desktop_unpacking">распаковка рабочего стола</string> + <string name="session_proton_downloading">загрузка Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">загрузка Proton Experimental (ARM64) · %1$d из %2$d МБ</string> + <string name="session_proton_checking">проверка Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">распаковка Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Не удалось получить каталог сред выполнения. Проверьте подключение и снова нажмите Play.</string> + <string name="session_runtime_install_failed">Среда выполнения Linux не установилась. Проверьте ее на странице «Настройка» и снова нажмите Play.</string> + <string name="session_desktop_install_failed">Рабочий стол не установился (%1$s). Проверьте подключение и снова нажмите «Рабочий стол».</string> + <string name="session_ended_named">Работа %1$s неожиданно прервалась. Приложите журналы к отчету об ошибке или попробуйте снова.</string> + <string name="session_ended_program">Программа неожиданно завершила работу. Приложите журналы к отчету об ошибке или попробуйте снова.</string> + <string name="session_ended_desktop">Рабочий стол неожиданно завершил работу. Приложите журналы к отчету об ошибке или попробуйте снова.</string> + <string name="session_ended_detail">Код выхода %1$d · %2$s</string> + <string name="session_ended_no_log">нет журнала</string> + <plurals name="session_hint_enosys"> + <item quantity="one">В журнале %1$d ошибка «Function not implemented»: ускорение seccomp в proot вызывает сбой вспомогательной программы на этом устройстве. Попробуйте %2$s → «%3$s» (или «%4$s») и запустите снова.</item> + <item quantity="few">В журнале %1$d ошибки «Function not implemented»: ускорение seccomp в proot вызывает сбой вспомогательной программы на этом устройстве. Попробуйте %2$s → «%3$s» (или «%4$s») и запустите снова.</item> + <item quantity="many">В журнале %1$d ошибок «Function not implemented»: ускорение seccomp в proot вызывает сбой вспомогательной программы на этом устройстве. Попробуйте %2$s → «%3$s» (или «%4$s») и запустите снова.</item> + <item quantity="other">В журнале %1$d ошибки «Function not implemented»: ускорение seccomp в proot вызывает сбой вспомогательной программы на этом устройстве. Попробуйте %2$s → «%3$s» (или «%4$s») и запустите снова.</item> + </plurals> + + <string name="mode_decky_plugins">Плагины</string> + <string name="mode_decky_plugins_hint">Установите ZIP-архив плагина для следующей сессии Steam.</string> + <string name="mode_decky_plugin_downloading">Загрузка…</string> + <string name="mode_decky_plugin_install_zip">Установить из ZIP</string> + <string name="store_cat_games">Игры</string> + <string name="store_cat_audio_video">Аудио и видео</string> + <string name="store_cat_graphics">Графика</string> + <string name="store_cat_internet">Интернет</string> + <string name="store_cat_office">Офис</string> + <string name="store_cat_developer">Разработка</string> + <string name="store_cat_education">Образование</string> + <string name="store_cat_science">Наука</string> + <string name="store_cat_system">Система</string> + <string name="store_cat_utilities">Утилиты</string> + <string name="store_section_popular">Популярное</string> + <string name="store_section_trending">В тренде</string> + <string name="store_section_new">Новое</string> + <string name="store_section_updated">Обновленное</string> + <string name="store_section_loading">загрузка…</string> + <string name="store_flatpak_setup">Настройка Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Не удалось проверить обновления в Flathub</string> + <string name="content_rom_installed">установлено</string> + <string name="content_rom_folder">папка</string> + <string name="theme_graphite">Графит</string> + <string name="theme_graphite_detail">Графитовые поверхности; синий цвет сферы из логотипа выделяет все выбранное, активное и нажатое.</string> + <string name="theme_paper">Бумага на черном</string> + <string name="theme_paper_detail">Основной цвет — белый, синий цвет значка служит акцентом для линий, колец и точек.</string> + <string name="theme_icon_blue">Синий из значка</string> + <string name="theme_icon_blue_detail">Черный фон, белый текст, синий — для всего выбранного, активного или нажатого.</string> + <string name="theme_electric">Электрик</string> + <string name="theme_electric_detail">Более яркий синий на поверхностях темно-синего, а не серого оттенка.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Пробел</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Сначала установите среду выполнения</string> + <string name="game_sync_err_steam_library">Библиотека Steam недоступна</string> + <string name="game_sync_err_previous_sd">Предыдущая библиотека на SD-карте недоступна</string> + <string name="game_sync_err_game_storage">Хранилище игр недоступно</string> + <string name="game_sync_err_added_games">Папка добавленных игр недоступна</string> + <string name="game_sync_err_manifests">Манифесты Steam недоступны</string> + <string name="content_system_many">Множество систем</string> + <string name="fm_drive_internal">Внутреннее хранилище</string> <string name="fm_drive_linux">Система Linux</string> + <string name="fm_drive_sd">SD-карта</string> + <string name="fm_drive_storage">Хранилище</string> + <string name="fm_select">Выбрать</string> + <string name="fm_properties">Свойства</string> + <string name="fm_favorite_add">Добавить в избранное</string> + <string name="fm_favorite_remove">Удалить из избранного</string> + <string name="fm_rename">Переименовать</string> + <string name="fm_copy">Копировать</string> + <string name="fm_cut">Вырезать</string> + <string name="fm_actions">Действия</string> + <string name="fm_favorites">Избранное</string> + <string name="fm_pin_current">Закрепить текущую папку</string> + <string name="fm_no_favorites">Избранного пока нет — закрепите папку через ее меню ⋮, чтобы быстро возвращаться к ней.</string> + <string name="fm_unpin_favorite">Удалить из избранного</string> + <string name="fm_size_zero">0 байт</string> + <string name="fm_unit_bytes">байт</string> + <string name="fm_prop_location">Расположение</string> + <string name="fm_prop_type">Тип</string> + <string name="fm_prop_size">Размер</string> + <string name="fm_prop_modified">Изменено</string> + <string name="fm_type_folder">Папка</string> + <string name="fm_type_file">Файл</string> + <string name="fm_type_ext_file">Файл %1$s</string> + <string name="fm_read_only">Только чтение</string> + <string name="fm_read_only_hint">Не дает играм (и Wine) перезаписать или удалить этот файл.</string> + <string name="fm_read_only_failed">Не удалось изменить атрибут «Только чтение»</string> + <string name="fm_hidden">Скрытый</string> + <string name="fm_hidden_unsupported">Это хранилище не поддерживает атрибут «Скрытый».</string> + <string name="fm_hidden_hint">Помечает файл как скрытый в Windows (атрибут hidden в Wine).</string> + <string name="fm_hidden_failed">Не удалось изменить атрибут «Скрытый» в этом хранилище</string> + <string name="fm_done">Готово</string> + <string name="fm_op_deleting">Удаление...</string> + <string name="fm_delete_failed">Ошибка удаления</string> + <string name="fm_op_moving">Перемещение...</string> + <string name="fm_op_copying">Копирование...</string> + <string name="fm_op_moving_item">Перемещение — %1$s</string> + <string name="fm_op_copying_item">Копирование — %1$s</string> + <string name="fm_op_moving_batch">Перемещение %1$d/%2$d — %3$s</string> + <string name="fm_op_copying_batch">Копирование %1$d/%2$d — %3$s</string> + <string name="fm_paste_failed">Готово: %1$d, ошибок: %2$d</string> + <string name="fm_paste_skipped">Готово: %1$d, пропущено: %2$d</string> + <plurals name="fm_paste_moved"> + <item quantity="one">Перемещен %1$d элемент</item> + <item quantity="few">Перемещено %1$d элемента</item> + <item quantity="many">Перемещено %1$d элементов</item> + <item quantity="other">Перемещено %1$d элемента</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">Скопирован %1$d элемент</item> + <item quantity="few">Скопировано %1$d элемента</item> + <item quantity="many">Скопировано %1$d элементов</item> + <item quantity="other">Скопировано %1$d элемента</item> + </plurals> + <string name="fm_already_exists">«%1$s» уже существует</string> + <string name="fm_op_renaming">Переименование...</string> + <string name="fm_rename_failed">Ошибка переименования</string> + <string name="fm_op_creating_folder">Создание папки...</string> + <string name="fm_create_folder_failed">Не удалось создать папку</string> + <string name="fm_new_folder">Новая папка</string> + <string name="fm_folder_name">Имя папки</string> + <string name="fm_create">Создать</string> + <string name="fm_new_name">Новое имя</string> + <string name="fm_delete_title">Удалить?</string> + <string name="fm_delete_text">Удалить «%1$s» навсегда?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Удалить %1$d элемент?</item> + <item quantity="few">Удалить %1$d элемента?</item> + <item quantity="many">Удалить %1$d элементов?</item> + <item quantity="other">Удалить %1$d элемента?</item> + </plurals> + <string name="fm_cannot_undo">Это действие нельзя отменить.</string> + <plurals name="fm_and_more"> + <item quantity="one">…и еще %1$d</item> + <item quantity="few">…и еще %1$d</item> + <item quantity="many">…и еще %1$d</item> + <item quantity="other">…и еще %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">Удаление %1$d/%2$d — %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">Не удалось удалить %1$d элемент</item> + <item quantity="few">Не удалось удалить %1$d элемента</item> + <item quantity="many">Не удалось удалить %1$d элементов</item> + <item quantity="other">Не удалось удалить %1$d элемента</item> + </plurals> + <string name="fm_conflict_merge_hint">«Объединить» добавляет и заменяет файлы внутри существующей папки.</string> + <string name="fm_conflict_overwrite_hint">«Перезаписать» заменяет существующий файл.</string> + <string name="fm_conflict_apply_all">Применить ко всем конфликтам</string> + <string name="fm_conflict_merge">Объединить</string> + <string name="fm_conflict_overwrite">Перезаписать</string> + <string name="fm_conflict_keep_both">Оставить оба</string> + <string name="fm_conflict_skip">Пропустить</string> + <string name="fm_select_this_folder">Выбрать эту папку</string> + <string name="fm_back">Назад</string> + <string name="fm_drive_not_readable">%1$s: подключено, но сейчас недоступно для чтения</string> + <string name="fm_list_view">Список</string> + <string name="fm_grid_view">Сетка</string> + <string name="fm_search">Поиск</string> + <string name="fm_sort">Сортировка</string> + <string name="fm_sort_name">Имя</string> + <string name="fm_sort_date">Дата изменения</string> + <string name="fm_rows_comfortable">Просторные строки</string> + <string name="fm_rows_compact">Компактные строки</string> + <string name="fm_hide_hidden">Не показывать скрытые файлы</string> + <string name="fm_show_hidden">Показывать скрытые файлы</string> + <string name="fm_hide_favorites">Скрыть избранное</string> + <string name="fm_show_favorites">Показать избранное</string> + <string name="fm_filter_folder">Фильтр по этой папке</string> + <string name="fm_free_space">Свободно: %1$s</string> + <string name="fm_selected_count">Выбрано: %1$d</string> + <string name="fm_select_none">Снять</string> + <string name="fm_select_all">Все</string> + <string name="fm_paste">Вставить</string> + <plurals name="fm_items"> + <item quantity="one">%1$d элемент</item> + <item quantity="few">%1$d элемента</item> + <item quantity="many">%1$d элементов</item> + <item quantity="other">%1$d элемента</item> + </plurals> + <string name="fm_paste_here">Вставить сюда: %1$s</string> + <string name="fm_paste_move_here">Переместить сюда: %1$s</string> + <string name="fm_rail_title">Файлы</string> + <string name="fm_rail_storage">ХРАНИЛИЩЕ</string> + <string name="fm_rail_quick">БЫСТРЫЙ ДОСТУП</string> + <string name="fm_rail_favorites">ИЗБРАННОЕ</string> + <string name="fm_rail_downloads">Загрузки</string> + <string name="fm_rail_downloads_short">Загрузки</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Журналы сессии</string> + <string name="fm_rail_pictures">Изображения</string> + <string name="fm_favorite_added">Папка «%1$s» добавлена в избранное</string> + <string name="fm_favorite_removed">Папка «%1$s» удалена из избранного</string> + <string name="fm_empty_directory">Пустая папка</string> + <string name="fm_up_one_level">На уровень вверх</string> + <string name="fm_choose_folder">Выберите папку</string> + <string name="fm_choose_file">Выберите файл</string> + <string name="ctrl_tint_steam_blue">Синий Steam</string> + <string name="ctrl_tint_sky">Небесный</string> + <string name="ctrl_tint_white">Белый</string> + <string name="ctrl_tint_violet">Фиолетовый</string> + <string name="ctrl_tint_green">Зеленый</string> + <string name="ctrl_tint_amber">Янтарный</string> + <string name="ctrl_tint_red">Красный</string> + <string name="ctrl_tint_pink">Розовый</string> + <string name="ctrl_button_a">Кнопка A</string> + <string name="ctrl_button_b">Кнопка B</string> + <string name="ctrl_button_x">Кнопка X</string> + <string name="ctrl_button_y">Кнопка Y</string> + <string name="ctrl_button_lb">Левый бампер</string> + <string name="ctrl_button_rb">Правый бампер</string> + <string name="ctrl_button_lt">Левый триггер</string> + <string name="ctrl_button_rt">Правый триггер</string> + <string name="ctrl_button_view">Кнопка View</string> + <string name="ctrl_button_menu">Кнопка «Меню»</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Меню</string> + <string name="ctrl_target_up">Крестовина вверх</string> + <string name="ctrl_target_down">Крестовина вниз</string> + <string name="ctrl_target_left">Крестовина влево</string> + <string name="ctrl_target_right">Крестовина вправо</string> + <string name="ctrl_target_hidden">Скрыто</string> + <string name="ctrl_editor_drag">Перетащите для перемещения</string> + <string name="ctrl_editor_snap">Привязка</string> + <string name="ctrl_editor_save">Сохранить</string> + <string name="second_mode_none">Ничего</string> + <string name="second_mode_keyboard_trackpad">Клавиатура + тачпад</string> + <string name="second_mode_terminal">Терминал</string> + <string name="second_mode_deck_controls">Грипсы и тачпады Deck</string> + + <string name="rtinst_removing">Удаление среды выполнения Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Удаление среды выполнения Linux · %1$d элемент</item> + <item quantity="few">Удаление среды выполнения Linux · %1$d элемента</item> + <item quantity="many">Удаление среды выполнения Linux · %1$d элементов</item> + <item quantity="other">Удаление среды выполнения Linux · %1$d элемента</item> + </plurals> + <string name="rtinst_removed">Среда выполнения Linux удалена</string> + <string name="rtinst_removal_failed">Не удалось завершить удаление среды выполнения Linux. Повторите удаление на странице «Настройка».</string> + <string name="rtinst_removing_leftovers">Удаление остатков среды выполнения</string> + <string name="rtinst_downloading">Загрузка</string> + <string name="rtinst_verifying">Проверка</string> + <string name="rtinst_extracting">Распаковка</string> + <string name="rtinst_channel_description">Отображается во время установки или удаления среды выполнения Linux</string> + <string name="rtinst_title_installing">Установка среды выполнения Linux</string> + <string name="rtinst_title_removing">Удаление среды выполнения Linux</string> + + <string name="deskpkg_runtime_missing">Среда выполнения Linux не установлена</string> + <string name="deskpkg_no_checksum">В каталоге нет контрольной суммы для %1$s</string> + <string name="deskpkg_checksum_mismatch">Контрольная сумма не совпадает — ничего не изменено</string> + <string name="deskpkg_installing">Установка %1$s</string> + <string name="deskpkg_place_failed">Не удалось разместить AppImage</string> + <string name="deskpkg_extract_failed">Ошибка распаковки</string> + <string name="deskpkg_install_failed">Ошибка установки</string> + + <string name="flatpakmgr_setup_failed">Ошибка настройки Flatpak (код %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Настройка Flatpak не завершилась</string> + <string name="flatpakmgr_busy">Выполняется другая задача магазина</string> + <string name="flatpakmgr_not_ready">Сначала настройте Flatpak</string> + <string name="flatpakmgr_starting">Запуск</string> + <string name="flatpakmgr_exit_status">Flatpak завершился с кодом %1$d</string> + <string name="flatpakmgr_installing">Установка %1$s</string> + <string name="flatpakmgr_updating">Обновление %1$s</string> + <string name="flatpakmgr_removing">Удаление %1$s</string> + <string name="flatpakmgr_installing_step">Установка %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Обновление %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Удаление %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">переводы</string> + <string name="flatpakmgr_ref_graphics_drivers">графические драйверы</string> + <string name="flatpakmgr_ref_media_codecs">медиакодеки</string> + <string name="flatpakmgr_ref_runtime">среда выполнения %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">среда выполнения %1$s %2$s</string> + + <string name="appimg_too_small">Файл слишком мал для AppImage</string> + <string name="appimg_unreadable">Не удается прочитать файл: %1$s</string> + <string name="appimg_not_linux">Это не AppImage (это не программа Linux)</string> + <string name="appimg_wrong_arch">Этот AppImage собран не для ARM64 (aarch64) и не для x86-ПК</string> + <string name="appimg_not_appimage">Это программа Linux, но не AppImage</string> + <string name="appimg_wrong_type">Импортировать можно только AppImage типа 2 (у этого тип %1$d)</string> + <string name="appimg_no_space_import">Недостаточно свободного места: для импорта нужно около %1$s</string> + <string name="appimg_no_space_update">Недостаточно свободного места: для обновления нужно около %1$s</string> + <string name="appimg_import_failed">Ошибка импорта</string> + <string name="appimg_gone">Этот AppImage больше недоступен</string> + <string name="appimg_update_failed">Ошибка обновления</string> + <string name="appimg_extracting">Распаковка %1$s</string> + <string name="appimg_extract_failed">Не удалось распаковать AppImage</string> + <string name="appimg_extract_failed_detail">Не удалось распаковать AppImage: %1$s</string> + + <string name="deckymgr_stop_session_loader">Остановите текущую сессию перед установкой Decky Loader</string> + <string name="deckymgr_download_failed">Ошибка загрузки Decky Loader</string> + <string name="deckymgr_size_mismatch">Размер Decky Loader не совпадает с метаданными выпуска</string> + <string name="deckymgr_checksum_download_failed">Не удалось скачать контрольную сумму выпуска</string> + <string name="deckymgr_checksum_missing">Контрольная сумма выпуска отсутствует</string> + <string name="deckymgr_checksum_invalid">Недопустимая контрольная сумма выпуска</string> + <string name="deckymgr_checksum_mismatch">Контрольная сумма Decky Loader не совпадает</string> + <string name="deckymgr_not_elf">Файл выпуска не является совместимым 64-битным исполняемым файлом Linux</string> + <string name="deckymgr_session_started_loader">Во время загрузки запустилась сессия; остановите ее перед установкой Decky Loader</string> + <string name="deckymgr_loader_not_executable">Не удалось сделать PluginLoader исполняемым</string> + <string name="deckymgr_cef_failed">Не удалось включить удаленную отладку CEF в Steam</string> + <string name="deckymgr_stage_failed">Не удалось подготовить PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Не удалось сохранить текущий PluginLoader</string> + <string name="deckymgr_loader_activate_failed">Не удалось активировать новый PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Остановите текущую сессию перед установкой плагина</string> + <string name="deckymgr_loader_required">Установите Decky Loader перед импортом плагина</string> + <string name="deckymgr_zip_unreadable">Не удалось прочитать выбранный ZIP-файл</string> + <string name="deckymgr_plugins_dir_failed">Не удалось создать папку плагинов Decky</string> + <string name="deckymgr_extracting_zip">Распаковка ZIP-архива плагина</string> + <string name="deckymgr_zip_one_folder">ZIP-архив плагина должен содержать одну папку плагина верхнего уровня</string> + <string name="deckymgr_zip_missing_files">В ZIP-архиве плагина нет plugin.json, package.json или dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Не указано имя плагина</string> + <string name="deckymgr_session_started_plugin">Во время установки запустилась сессия; остановите ее перед установкой плагина</string> + <string name="deckymgr_plugin_installed">Плагин установлен · перезапустите Steam, чтобы загрузить его</string> + <string name="deckymgr_plugin_install_failed">Ошибка установки ZIP-архива плагина</string> + <string name="deckymgr_zip_too_many">В ZIP-архиве плагина слишком много записей</string> + <string name="deckymgr_zip_invalid_path">ZIP-архив плагина содержит недопустимый путь</string> + <string name="deckymgr_zip_duplicate_paths">ZIP-архив плагина содержит повторяющиеся пути</string> + <string name="deckymgr_zip_unsafe_path">ZIP-архив плагина содержит небезопасный путь</string> + <string name="deckymgr_folder_failed">Не удалось создать папку плагина</string> + <string name="deckymgr_zip_too_large">После распаковки ZIP-архив плагина превышает лимит 1 ГиБ</string> + <string name="deckymgr_bundled_not_executable">Не удалось сделать исполняемым встроенный бинарный файл плагина</string> + <string name="deckymgr_remote_entry_invalid">Недопустимая запись remote_binary</string> + <string name="deckymgr_remote_name_invalid">Недопустимое имя удаленного бинарного файла</string> + <string name="deckymgr_remote_url_https">URL удаленного бинарного файла должен использовать HTTPS</string> + <string name="deckymgr_remote_hash_invalid">У удаленного бинарного файла %1$s недопустимый хеш SHA-256</string> + <string name="deckymgr_bin_dir_failed">Не удалось создать папку bin плагина</string> + <string name="deckymgr_downloading_binary">Загрузка бинарного файла плагина · %1$s</string> + <string name="deckymgr_binary_download_failed">Не удалось скачать бинарный файл плагина %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Контрольная сумма бинарного файла плагина не совпадает · %1$s</string> + <string name="deckymgr_binary_not_executable">Не удалось сделать бинарный файл плагина исполняемым · %1$s</string> + <string name="deckymgr_binary_replace_failed">Не удалось заменить бинарный файл плагина · %1$s</string> + <string name="deckymgr_binary_install_failed">Не удалось установить бинарный файл плагина · %1$s</string> + <string name="deckymgr_folder_taken">Папка плагина принадлежит другому плагину</string> + <string name="deckymgr_preserve_failed">Не удалось сохранить текущий плагин</string> + <string name="deckymgr_activate_failed">Не удалось активировать импортированный плагин</string> + <string name="deckymgr_settings_failed">Не удалось обновить настройки плагинов Decky</string> + <string name="deckymgr_restore_failed">Не удалось восстановить прежний плагин</string> + + <string name="adbfix_save_failed">Не удалось сохранить идентификатор для отладки по Wi-Fi</string> + <string name="adbfix_command_failed">Ошибка команды ADB (%1$d)</string> + <string name="adbfix_not_confirmed">Android не подтвердил изменение ограничения дочерних процессов: %1$s</string> + <string name="adbfix_no_pairing">Нет сохраненного сопряжения для отладки по Wi-Fi</string> + <string name="adbfix_enter_address">Введите текущие IP-адрес и порт отладки по Wi-Fi</string> + + <string name="adbpair_timed_out">Время ожидания окна сопряжения истекло. Повторите попытку из DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Не удалось найти окно сопряжения (%1$d). Убедитесь, что Wi-Fi включен.</string> + <string name="adbpair_discovery_failed">Не удалось найти окно сопряжения: %1$s</string> + <string name="adbpair_six_digits">Введите все 6 цифр кода</string> + <string name="adbpair_pairing">Сопряжение…</string> + <string name="adbpair_code_rejected">Код не подошел. Снова откройте окно сопряжения и введите новый код.</string> + <string name="adbpair_connecting">Сопряжено. Подключение…</string> + <string name="adbpair_port_not_found">Сопряжено, но порт отладки по Wi-Fi не найден. Не отключайте отладку по Wi-Fi и повторите попытку.</string> + <string name="adbpair_applying">Применение настройки…</string> + <string name="adbpair_command_failed">Ошибка команды отладки по Wi-Fi</string> + <string name="adbpair_channel_name">Настройка отладки по Wi-Fi</string> + <string name="adbpair_channel_description">Запрашивает код сопряжения для отладки по Wi-Fi, пока открыты Настройки</string> + <string name="adbpair_title_pair">Сопряжение отладки по Wi-Fi</string> + <string name="adbpair_waiting_text">Включите отладку по Wi-Fi и нажмите «Сопряжение устройства с помощью кода».</string> + <string name="adbpair_waiting_long">Включите отладку по Wi-Fi и нажмите «Сопряжение устройства с помощью кода». Не выходите из Настроек: код вводится в этом уведомлении.</string> + <string name="adbpair_code_label">6-значный код сопряжения</string> + <string name="adbpair_code_hint">Нажмите «Ввести код» и введите 6 цифр, показанных в Настройках.</string> + <string name="adbpair_title_code">Введите код сопряжения Wi-Fi</string> + <string name="adbpair_title_retry">Введите код еще раз</string> + <string name="adbpair_enter_code">Ввести код</string> + <string name="adbpair_title_working">Настройка Steam</string> + <string name="adbpair_title_done">Steam готов</string> + <string name="adbpair_done_text">Нажмите, чтобы вернуться в DroidDeck. Теперь отладку по Wi-Fi можно отключить.</string> + <string name="adbpair_title_failed">Настройка отладки по Wi-Fi остановлена</string> + + <string name="selfinst_download_failed">Ошибка загрузки</string> + <string name="selfinst_size_mismatch">Размер загруженного файла не совпал с опубликованным APK, файл удален — повторите попытку</string> + <string name="selfinst_checksum_mismatch">Загруженный файл не совпал с контрольной суммой и был удален — повторите попытку</string> + <string name="selfinst_wrong_package">Обновление предназначено для пакета Android %1$s, а не %2$s</string> + <string name="selfinst_metadata_signer">В метаданных обновления не указан ключ подписи релизов DroidDeck</string> + <string name="selfinst_unreadable">Android не удалось прочитать загруженный APK</string> + <string name="selfinst_apk_wrong_package">Загруженный APK предназначен для %1$s, а не %2$s</string> + <string name="selfinst_version_mismatch">В загруженном APK указан versionCode %1$d, а опубликован %2$d</string> + <string name="selfinst_downgrade">Android не установит versionCode %1$d поверх установленного %2$d</string> + <string name="selfinst_no_signing">В загруженном APK нет сведений о подписи</string> + <string name="selfinst_wrong_signer">Загруженный APK не подписан ключом релизов DroidDeck</string> + <string name="appupd_http">Каталог обновлений ответил HTTP %1$d</string> + + <string name="loadstate_starting">Запуск сессии…</string> + <string name="loadstate_elapsed">Прошло %1$d:%2$02d · работа продолжается</string> + <string name="loadstate_steam_update">Загрузка обновления клиента Steam · %1$d%%</string> + <string name="loadstate_steam_client">Загрузка клиента Steam · %1$s</string> + + <string name="pextra_busy">Инструмент совместимости уже устанавливается</string> + <string name="pextra_stop_session">Остановите текущую сессию перед установкой инструментов совместимости</string> + <string name="pextra_no_release">Не найден выпуск %1$s для ARM64</string> + <string name="pextra_no_space">Для установки %1$s нужно не менее 4 ГБ свободного места плюс размер загрузки</string> + <string name="pextra_downloading">Загрузка %1$s %2$s</string> + <string name="pextra_retrying">Повторная загрузка · попытка %1$d из %2$d</string> + <string name="pextra_interrupted">Загрузка прервана</string> + <string name="pextra_download_failed">Ошибка загрузки; частично скачанный файл сохранен, чтобы повторная попытка продолжила с того же места</string> + <string name="pextra_too_big">Загрузка превысила размер выпуска и была удалена</string> + <string name="pextra_incomplete">Загрузка не завершена; частично скачанный файл сохранен, чтобы ее можно было продолжить</string> + <string name="pextra_verifying">Проверка загрузки</string> + <string name="pextra_checksum_unreadable">Не удалось прочитать контрольную сумму выпуска; повторите попытку</string> + <string name="pextra_no_checksum">%1$s %2$s не публикует контрольную сумму; ничего не установлено</string> + <string name="pextra_checksum_mismatch">Контрольная сумма не совпадает; загруженный файл удален</string> + <string name="pextra_session_started">Во время загрузки запустилась сессия; остановите ее перед установкой инструментов совместимости</string> + <string name="pextra_installing">Установка %1$s</string> + <string name="pextra_install_failed">Ошибка установки %1$s (код выхода %2$d)</string> + <string name="pextra_could_not_install">Не удалось установить %1$s</string> + <string name="esync_fetching">Загрузка пакета droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">с помощниками Linux</string> + <string name="cmgr_fex_dlls_only">только DLL</string> + <string name="cmgr_original_proton_updated">Оригинал (Proton обновлен после последней замены)</string> + <string name="cmgr_changed_outside">Изменено вне «Компонентов»</string> + <string name="cmgr_not_present">отсутствует</string> + <string name="cmgr_original_version">Оригинал %1$s</string> + <string name="cmgr_original_from">Оригинал из %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s будет помещен в %3$s после закрытия запущенной на нем игры.</string> + <string name="cmgr_swap_done">%1$s %2$s теперь в %3$s. Вступит в силу при следующем запуске игры.</string> + <string name="cmgr_original_missing">Этот оригинальный набор не сохранен</string> + <string name="cmgr_restore_queued">%1$s в %2$s вернется к оригиналу после закрытия запущенной на нем игры.</string> + <string name="cmgr_restore_done">%1$s в %2$s восстановлен из оригинала %3$s.</string> + <string name="cmgr_package_in_use">%1$s используется в %2$s. Сначала замените его в этом Proton на другой.</string> + <string name="cmgr_package_not_stored">%1$s не сохранен</string> + <string name="cmgr_deleted">Удалено: %1$s.</string> + <string name="cmgr_original_kept">Оригинал установленной сборки сохраняется: через него можно вернуться.</string> + <string name="cmgr_not_stored">Не сохранено</string> + <string name="cmgr_deleted_original">Удален оригинал %2$s из сборки %1$s.</string> + <string name="cmgr_nightlies_only">Загрузки доступны только из выпусков Nightlies</string> + <string name="cmgr_list_predates_checksums">Этот список пакетов создан до появления контрольных сумм — обновите его и повторите попытку</string> + <string name="cmgr_checksum_mismatch">Контрольная сумма не совпадает</string> + + <string name="sprefs_upscaler_linear">Линейный</string> + <string name="sprefs_upscaler_nearest">Ближайший</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (качество)</string> + <string name="sprefs_upscaler_sharpen">Только резкость</string> + <string name="sprefs_lod_bias_auto">Авто (по масштабированию)</string> + + <string name="look_off_desc">Без эффектов.</string> + <string name="look_game_clarity">Игровая четкость</string> + <string name="look_game_clarity_desc">Резкость с легким добавлением контраста — на каждый день.</string> + <string name="look_vivid">Яркий</string> + <string name="look_vivid_desc">Сильно усиленные цвета. Удаление полос включено, чтобы небо не шло полосами.</string> + <string name="look_cinematic">Кинематографичный</string> + <string name="look_cinematic_desc">Глубже контраст, холоднее цвета, сглаженные края.</string> + <string name="look_competitive">Соревновательный</string> + <string name="look_competitive_desc">Высветленные тени и сильная резкость — замечайте противников первым.</string> + <string name="look_adaptive_sharpen">Адаптивная резкость</string> + <string name="look_adaptive_sharpen_desc">Только резкость, цвета не меняются.</string> + <string name="look_filmic">Пленочный</string> + <string name="look_filmic_desc">Кривая как у кинопленки, слегка приглушенная.</string> + <string name="look_arcade">Аркада</string> + <string name="look_arcade_desc">Броско и сочно.</string> + <string name="look_retro_crt">Ретро-CRT</string> + <string name="look_retro_crt_desc">Эффекты кинескопа CRT и аналогового сигнала вместе.</string> + <string name="look_upscale_sharp">Четкое увеличение</string> + <string name="look_upscale_sharp_desc">Для работы ниже разрешения экрана.</string> + <string name="look_pixel_clean">Чистые пиксели</string> + <string name="look_pixel_clean_desc">Четкие пиксели для 2D и старых игр.</string> + <string name="look_anime_edge">Аниме-контуры</string> + <string name="look_anime_edge_desc">Мультяшные контуры плюс резкость.</string> + + <string name="gpuinfo_not_adreno">GPU не Adreno</string> + <string name="gpuinfo_supported">Поддерживается</string> + <string name="gpuinfo_experimental">Экспериментально: его драйверы — тестовые сборки</string> + <string name="gpuinfo_below_tested">Ниже проверенного оборудования (Adreno 725 и новее): может не работать</string> + <string name="gpuinfo_unsupported">Не поддерживается: DroidDeck требует GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Превышен лимит запросов GitHub — повторите попытку позже</string> + <string name="turnip_github_http">GitHub ответил HTTP %1$d</string> + <string name="turnip_download_failed">Ошибка загрузки</string> + <string name="turnip_list_predates_checksums">Этот список драйверов создан до появления контрольных сумм — обновите его и повторите попытку</string> + <string name="turnip_checksum_mismatch">Контрольная сумма не совпадает — загруженный файл удален</string> + <string name="turnip_not_adrenotools">Не драйвер AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">нет meta.json</string> + <string name="turnip_reject_meta_unreadable">не удается прочитать meta.json (%1$s)</string> + <string name="turnip_reject_linux_driver">это драйвер среды выполнения Linux (импортируйте его в разделе «Драйвер среды выполнения Linux»)</string> + <string name="turnip_reject_wayland">это драйвер игр для Wayland, который этому приложению не нужен</string> + <string name="turnip_reject_no_library_name">в meta.json не указан libraryName, поэтому AdrenoTools нечего передать</string> + <string name="turnip_reject_library_missing">в meta.json указан %1$s, которого нет в zip-архиве</string> + <string name="turnip_reject_not_aarch64">%1$s не является 64-битной общей библиотекой AArch64 ELF</string> + <string name="turnip_reject_glibc">%1$s связан с glibc — это Turnip «-Linux», его место в разделе «Драйвер среды выполнения Linux»</string> + <string name="lvd_no_library">В этом zip-архиве нет libvulkan_freedreno*.so. Zip-архив Turnip для Android (AdrenoTools) или -Wayland не является драйвером среды выполнения Linux.</string> + <string name="lvd_not_aarch64">%1$s не является 64-битной общей библиотекой AArch64 ELF.</string> + <string name="lvd_not_glibc">%1$s не является драйвером glibc — он связан с libc Android. Среде выполнения Linux нужен zip-архив «-Linux»; обычный Turnip или Turnip «-Wayland» клиент Steam вообще не может загрузить.</string> + <string name="bundle_no_manifest">Не пакет драйверов: нет manifest.json с указанием драйверов для Android и Linux</string> + <string name="bundle_entry_outside">Не пакет драйверов: %1$s указывает за его пределы</string> + <string name="bundle_too_large">Не пакет драйверов: после распаковки занимает больше %1$d МБ</string> + + <string name="gstore_sd_card">SD-карта</string> + <string name="gstore_folder">Папка</string> + + <string name="logshare_chooser">Поделиться журналами сессии</string> + + <string name="hdr_needs_android_10">требуется Android 10 или новее (слои дисплея с цветовым пространством)</string> + <string name="hdr_none">этот дисплей не сообщает о поддержке HDR</string> + <string name="hdr_not_hdr10">этот дисплей поддерживает %1$s, но не HDR10</string> + + <string name="gpu_this_gpu">этот GPU</string> + <string name="phantom_title_on">Ограничение дочерних процессов включено</string> + <string name="phantom_title_unset">Ограничение дочерних процессов не задано</string> + <string name="phantom_title_unreadable">Не удалось проверить ограничение дочерних процессов</string> + <string name="phantom_title_off">Ограничение дочерних процессов отключено</string> + <string name="phantom_title_not_required">Отключать ограничение дочерних процессов не нужно</string> + <string name="phantom_instructions_fix">%1$s Если это невозможно, подключите устройство к компьютеру с ADB и выполните команду ниже. Затем вернитесь сюда и проверьте снова.</string> + <string name="phantom_instructions_off">Сессии Steam могут запускаться.</string> + <string name="phantom_instructions_not_applicable">Эта версия Android не использует это ограничение.</string> + <string name="phantom_fix_toggle">Включите «Отключить ограничения для дочерних процессов» в разделе «Для разработчиков» и оставьте этот раздел включенным.</string> + <string name="phantom_fix_no_toggle">В этой версии Android нет такого переключателя. Измените настройку с этого устройства через отладку по Wi-Fi.</string> + <string name="upd_block_no_apk">В этой сборке нет загрузки для этой копии DroidDeck.</string> + <string name="upd_block_version_code">Android не установит ее поверх этой сборки, так как ее versionCode %1$d ниже установленного %2$d.</string> + <string name="upd_fail_downgrade">Android не устанавливает более старую версию поверх новой. Оставайтесь на этой сборке, пока канал не догонит ее.</string> + <string name="upd_fail_signature">Эта копия DroidDeck подписана другим ключом (локальная сборка?), поэтому Android не может обновить ее на месте.</string> + <string name="upd_fail_storage">Недостаточно свободного места для обновления.</string> + <string name="upd_fail_aborted">Обновление отменено.</string> + <string name="upd_fail_with_message">Обновление не установлено: %1$s</string> + <string name="upd_fail_generic">Обновление не установлено.</string> + <string name="saves_layout_zip">Архив %1$s</string> + <string name="saves_zip">zip-архив</string> + <string name="saves_not_launched">Игра %1$s еще не запускалась</string> + <string name="saves_none_found">Файлы сохранений для %1$s не найдены</string> + <string name="saves_not_save_zip">В %1$s нет папки drive_c, поэтому это не архив сохранений GameHub или Winlator</string> + <string name="gstore_cannot_create">невозможно создать папки в %1$s</string> + <string name="gstore_cannot_write">невозможно записать в %1$s</string> + <string name="gstore_cannot_write_detail">невозможно записать в %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Папка недоступна</string> + <string name="gfiles_name_taken">Имя %1$s уже занято другим файлом</string> + <string name="gfiles_art_unavailable">Папка обложек недоступна</string> + <string name="gfiles_unrelated_inventory">В папке уже есть чужой список синхронизации</string> + <string name="gfiles_remove_failed">Не удалось удалить %1$s</string> + <string name="gfiles_outside_folder">Файл выходит за пределы папки экспорта</string> + <string name="cmgr_fex_unnamed">FEX (сборка без названия версии)</string> + <string name="cmgr_no_profile">нет profile.json в %1$s</string> + <string name="cmgr_not_component_package">%1$s не является пакетом компонента Linux (тип %2$s)</string> + <string name="gstore_volume_free">%1$s · свободно %2$s</string> + <string name="mode_storage_auto_short">Авто</string> + <string name="appupd_catalog_rejected">Каталог обновлений не прошел проверку (%1$s)</string> + <string name="main_adb_clip_label">Настройка дочерних процессов DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Вход выполнен · автономный режим</string> + <string name="setup_signed_in_unnamed">Вход выполнен</string> + <string name="driver_tag_bundled">ВСТРОЕННЫЙ</string> + <string name="driver_tag_downloaded">СКАЧАННЫЙ</string> + <string name="driver_tag_imported">ИМПОРТИРОВАННЫЙ</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> <string name="display_session">Экран сессии</string> <string name="display_resolution">Разрешение</string> <string name="display_game_fit">Игры 16:9</string> @@ -1029,6 +1934,7 @@ <string name="display_frame_rate">Частота кадров</string> <string name="display_look_filter">%1$s Устанавливает масштабирование: %2$s.</string> <string name="display_match_screen">По размеру экрана (%1$d×%2$d)</string> + <string name="display_follow_screen">По экрану (меняется при складывании и раскладывании)</string> <string name="mode_tab_steam">Steam</string> <string name="device_info_show">Показать сведения об устройстве</string> <string name="device_info_hide">Скрыть сведения об устройстве</string> @@ -1036,6 +1942,212 @@ <string name="device_info_copy">Копировать</string> <string name="device_info_copy_hint">Скопируйте эти сведения в отчет об ошибке.</string> <string name="device_info_copied">Скопировано.</string> + <string name="force_ssbs_title">Принудительный SSBS</string> + <string name="force_ssbs_hint">Удерживает включенной настройку скорости CPU, которую Wine постоянно отключает. Может ускорить игры Windows на Snapdragon 8 Elite; на старых чипах разница почти не заметна. Вступит в силу при следующем запуске игры.</string> + + <string name="rail_stores">Магазины</string> + <string name="source_steam">Steam</string> + <string name="source_added">Свои</string> + <string name="setup_stores">Магазины</string> + <string name="setup_stores_open_on">Открывать магазин на</string> + <string name="setup_stores_speed">Уровень скорости загрузки</string> + <string name="setup_stores_engine">Движок магазинов</string> + <string name="setup_stores_engine_chip_ready">● Движок готов</string> + <string name="setup_stores_engine_chip_missing">Не собран</string> + <string name="stores_tier_balanced">Сбалансированный</string> + <string name="stores_tier_fast">Быстрый</string> + <string name="stores_tier_max">Максимальный</string> + <string name="stores_title">Магазины</string> + <string name="stores_settings">Настройки магазинов</string> + <string name="stores_settings_eyebrow">Настройки</string> + <string name="stores_chip_signed_out">(вход не выполнен)</string> + <string name="stores_tab_store">Магазин</string> + <string name="stores_tab_installed">Установлено</string> + <string name="stores_tab_library">Библиотека</string> + <string name="stores_tab_all">Все</string> + <string name="stores_tab_downloads">Загрузки</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Войти</string> + <string name="stores_signout_named">%1$s · выйти</string> + <string name="stores_signout_title">Выйти из %1$s?</string> + <string name="stores_signout_note">Установленные игры останутся. Библиотека загрузится снова, когда вы войдете.</string> + <string name="stores_signout_stay">Не выходить</string> + <string name="stores_signout_go">Выйти</string> + <string name="stores_search_catalog">Поиск в каталоге %1$s…</string> + <string name="stores_search_installed">Поиск установленных игр…</string> + <string name="stores_search_library">Поиск в библиотеке…</string> + <string name="stores_search_open">Поиск</string> + <string name="stores_installed_empty">Ничего не установлено</string> + <string name="stores_library_loading">Загрузка</string> + <string name="stores_nothing_matches">Нет игр</string> + <string name="stores_shelves_loading">Загрузка магазина…</string> + <string name="stores_amazon_no_catalog">Нет каталога</string> + <string name="stores_shelf_new">Новинки</string> + <string name="stores_shelf_deals">Скидки</string> + <string name="stores_shelf_free">Бесплатные игры</string> + <string name="stores_shelf_trending">Популярное</string> + <string name="stores_shelf_library">Ваша библиотека</string> + <string name="stores_play">Играть</string> + <string name="stores_install">Установить</string> + <string name="stores_resume_install">Продолжить установку</string> + <string name="stores_dl_interrupted">Прервано</string> + <string name="stores_install_size">Установить · %1$s</string> + <string name="stores_get_free">Получить бесплатно</string> + <string name="stores_view_on">Открыть в %1$s</string> + <string name="stores_buy_price">Купить · %1$s</string> + <string name="stores_installed_chip">Установлено</string> + <string name="stores_in_library">В библиотеке</string> + <string name="stores_free">Бесплатно</string> + <string name="stores_resume">Продолжить</string> + <string name="stores_refresh">Обновить</string> + <string name="stores_sort">Сортировка</string> + <string name="stores_sort_last_played">Недавно запущенные</string> + <string name="stores_sort_recently_installed">Недавно установленные</string> + <string name="stores_sort_title_asc">Название А–Я</string> + <string name="stores_sort_title_desc">Название Я–А</string> + <string name="stores_sort_size_desc">Размер: по убыванию</string> + <string name="stores_sort_size_asc">Размер: по возрастанию</string> + <string name="stores_sort_release_date">Дата выхода</string> + <string name="stores_view_list">Вид списком</string> + <string name="stores_view_cards">Вид карточками</string> + <string name="stores_show_mature">Показывать контент для взрослых</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Офлайн</string> + <string name="epic_card_none">Выкл.</string> + <string name="epic_eos">Вход в Epic (EOS)</string> + <string name="epic_offline">Запускать офлайн</string> + <string name="epic_resolve">Устранить проблему входа в Epic</string> + <string name="epic_client_version">Версия %1$s</string> + <string name="epic_client_no_runtime">Сначала установите среду выполнения Linux</string> + <string name="epic_client_checking">Проверка последней версии…</string> + <string name="epic_client_unpacking">Распаковка…</string> + <string name="epic_client_unreachable">Сервер загрузки не ответил</string> + <string name="epic_client_needs_fex">Epic Games Launcher нужен FEX, который скачивает Steam. Откройте лаунчер снова после запуска Steam.</string> + <string name="epic_client_download_failed">Ошибка загрузки: %1$s</string> + <string name="epic_client_unpack_failed">Не удалось распаковать лаунчер: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher не принял вход. Запустите его снова из лаунчера.</string> + <string name="epic_client_uninstall_body">Удаляет лаунчер и освобождает место. Ваши игры Epic остаются установленными и работают, а вход сохраняется для повторной установки.</string> + <string name="epic_client_uninstall_stops">Сначала будет закрыт текущий сеанс.</string> + <string name="epic_client_uninstalled">Epic Games Launcher удалён</string> + <string name="epic_client_uninstall_failed">Не удалось удалить некоторые файлы лаунчера. Попробуйте ещё раз.</string> + <string name="epic_client_uninstalling">Дождитесь завершения удаления Epic Games Launcher</string> + <string name="store_cloud_saves">Облачные сохранения</string> + <string name="cloud_upload">Загрузить в облако</string> + <string name="cloud_download">Скачать из облака</string> + <string name="cloud_none">Нет облачных сохранений</string> + <string name="cloud_conflict">Конфликт с облаком</string> + <string name="cloud_conflict_files">Конфликт с облаком · файлов: %1$d</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Оставить облачные</string> + <string name="cloud_keep_local">Оставить локальные</string> + <string name="cloud_checking">Проверка облака…</string> + <string name="cloud_last_sync">Последняя синхронизация: %1$s</string> + <string name="cloud_never">Еще не синхронизировано</string> + <string name="cloud_done">Файлов: %1$d</string> + <string name="stores_eyebrow_installed">установлено</string> + <string name="stores_eyebrow_library">в вашей библиотеке</string> + <string name="stores_eyebrow_store">магазин</string> + <string name="achievements_title">Достижения</string> + <string name="achievements_count">Получено %1$d из %2$d</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Получены · %1$d</string> + <string name="achievements_group_locked">Не получены · %1$d</string> + <string name="achievements_group_hidden">Скрытые · %1$d</string> + <string name="achievements_hidden">Скрытое достижение</string> + <string name="achievements_hidden_detail">Подробности появятся после получения.</string> + <string name="achievements_all">Все достижения получены</string> + <string name="achievements_reading">Загрузка…</string> + <string name="achievements_signed_out">Войдите в %1$s, чтобы увидеть свои достижения.</string> + <string name="achievements_unreachable">Не удалось связаться с %1$s. Проверьте снова, когда будете в сети.</string> + <string name="achievements_none">В %1$s нет достижений для этой игры.</string> + <string name="achievements_show_all">Показать все (%1$d)</string> + <string name="achievements_dialog_title">Достижения · %1$s</string> + <string name="stores_in_steam">✓ В Steam</string> + <string name="stores_uninstall">Удалить</string> + <string name="stores_uninstalling">Удаление…</string> + <string name="stores_uninstall_title">Удалить %1$s?</string> + <string name="stores_uninstall_body_size">Освободит %1$s и уберет игру из Steam.</string> + <string name="stores_uninstall_body">Удаляет файлы игры и ее ярлык в Steam.</string> + <string name="stores_launch_not_registered">Steam подхватит игру при следующем запуске; запустите ее оттуда или запустите Steam сейчас.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Выбор Steam для каждой игры</string> + <string name="stores_card_audio">Аудио</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Компоненты</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Движок</string> + <string name="stores_card_engine_value">%1$s · нативный</string> + <string name="stores_card_engine_java">%1$s · встроенный</string> + <string name="stores_how_it_runs">Как запускается</string> + <string name="stores_kv_fetched">Получено из</string> + <string name="stores_kv_fetched_value">%1$s, с вашим аккаунтом</string> + <string name="stores_kv_installed_to">Установлено в</string> + <string name="stores_kv_installed_to_value">Хранилище игр (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Запускается через</string> + <string name="stores_kv_launched_by_value">Steam и Proton, так же как игры Steam</string> + <string name="stores_kv_launched_by_epic">Steam и Proton · вход в Epic при каждом запуске, оверлей EOS отключен</string> + <string name="stores_kv_launched_by_amazon">Steam и Proton · заданы переменные Amazon Games Services</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">добавляется в Steam при установке (интерфейс Deck + Steam Input)</string> + <string name="stores_downloads_empty">Нет загрузок</string> + <string name="stores_dl_paused">Приостановлено</string> + <string name="stores_dl_queued">В очереди</string> + <string name="stores_dl_queued_at">В очереди · №%1$d</string> + <string name="stores_dl_cancelled">Отменено</string> + <string name="stores_dl_failed">Ошибка</string> + <string name="stores_dl_failed_reason">Ошибка · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Пауза</string> + <string name="stores_dl_resume">Продолжить</string> + <string name="stores_dl_cancel">Отмена</string> + <string name="stores_dl_retry">Повторить</string> + <string name="stores_dl_clear">Убрать</string> + <string name="stores_dl_clear_all">Убрать завершенные</string> + <string name="stores_stage_manifest">Манифест</string> + <string name="stores_stage_download">Загрузка</string> + <string name="stores_stage_verify">Проверка</string> + <string name="stores_stage_install">Установка</string> + <string name="stores_stage_done">Готово</string> + <string name="stores_stage_checking">Проверка</string> + <string name="stores_stage_downloading">Загрузка</string> + <string name="stores_dl_cancel_confirm">Удалить загрузку?</string> + <string name="stores_dl_failed_kept">Ошибка · %1$s сохранено</string> + <string name="stores_stage_verifying">Проверка</string> + <string name="stores_stage_installing">Установка</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">Файлы: %1$d/%2$d</string> + <string name="stores_download_manager">Менеджер загрузок</string> + <string name="stores_parallel">Одновременных загрузок</string> + <string name="stores_install_where">Установить в</string> + <string name="stores_install_title">Установка %1$s:</string> + <string name="stores_target_internal">Внутреннее хранилище</string> + <string name="stores_target_free">Свободно: %1$s</string> + <string name="stores_notification_channel">Загрузки магазинов</string> + <string name="stores_notification_channel_hint">Показывает ход загрузки игр и продолжает загрузки в фоне</string> + <string name="stores_notification_one">Загрузка</string> + <string name="stores_notification_many">Загрузок: %1$d</string> + <string name="stores_notification_waiting">Подготовка…</string> + <string name="stores_notification_done_channel">Завершенные загрузки магазинов</string> + <string name="stores_notification_installed">Установлено: %1$s</string> + <string name="stores_notification_failed">Ошибка загрузки %1$s</string> + <string name="stores_notification_delete">Удалить</string> + <string name="stores_notification_keep">Оставить</string> + <string name="stores_login_title">Вход в %1$s</string> + <string name="stores_login_provider_title">Вход через сторонний аккаунт</string> + <string name="stores_login_reload">Перезагрузить</string> + <string name="stores_login_close">Закрыть</string> + <string name="stores_login_retry">Повторить</string> + <string name="stores_login_finishing">Завершение входа…</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> + <string name="stores_login_error_ssl">Подключение к странице входа не защищено.</string> + <string name="stores_login_error_verification">Не удалось подтвердить вход. Повторите попытку.</string> + <string name="stores_login_error_generic">Ошибка входа. Повторите попытку.</string> <string name="common_close">Закрыть</string> <string name="common_back">Назад</string> <string name="common_edit">Изменить</string> @@ -1049,6 +2161,21 @@ <string name="edit_other_exe">Другой exe…</string> <string name="edit_remove">Убрать</string> <string name="art_cover">Обложка</string> + <string name="art_wide_cover">Широкая обложка</string> + <string name="art_adjust_logo">Настроить логотип</string> + <string name="logo_pos_default">По умолчанию</string> + <string name="logo_pos_upper_left">Сверху слева</string> + <string name="logo_pos_upper_center">Сверху по центру</string> + <string name="logo_pos_center">По центру</string> + <string name="logo_pos_bottom_left">Снизу слева</string> + <string name="logo_pos_bottom_center">Снизу по центру</string> + <string name="logo_pos_position">Положение</string> + <string name="logo_pos_size">Размер</string> + <string name="logo_pos_save">Сохранить</string> + <string name="logo_pos_reset">Вернуть по умолчанию</string> + <string name="logo_pos_hint">Рисуется поверх фона игры, как в Steam. Точное положение может отличаться на несколько пикселей.</string> + <string name="logo_pos_no_logo">У этой игры пока нет логотипа. Выберите его в разделе «Логотип», чтобы увидеть здесь.</string> + <string name="logo_pos_failed">Не удалось сохранить положение логотипа. Попробуйте ещё раз.</string> <string name="art_background">Фон</string> <string name="art_logo">Логотип</string> <string name="art_icon">Значок</string> @@ -1061,6 +2188,17 @@ <string name="art_pick_image">Выбрать изображение…</string> <string name="art_pick_title">Выберите изображение: %1$s</string> <string name="art_reset">Сбросить на автоматически</string> + <string name="art_search_sgdb">Искать в SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Найти игру</string> + <string name="art_sgdb_other_games">Другие результаты</string> + <string name="art_sgdb_none">Ничего не найдено.</string> + <string name="art_sgdb_no_key">Для SteamGridDB нужен ключ API. Добавьте свой в разделе «Настройки › Лаунчер».</string> + <string name="art_sgdb_bad_key">SteamGridDB не принял ключ API. Проверьте его в разделе «Настройки › Лаунчер».</string> + <string name="art_sgdb_limit">SteamGridDB сейчас ограничивает запросы. Повторите попытку через минуту.</string> + <string name="art_sgdb_offline">Не удалось связаться со SteamGridDB. Проверьте подключение.</string> + <string name="art_sgdb_server">У SteamGridDB произошла ошибка. Повторите попытку позже.</string> + <string name="art_sgdb_no_game">В SteamGridDB нет результатов для этой игры. Попробуйте найти её вручную.</string> <plurals name="games_added_n"> <item quantity="one">Добавлена %1$d игра</item> <item quantity="few">Добавлено %1$d игры</item> @@ -1073,4 +2211,745 @@ <item quantity="many">%1$d уже в «Играх»</item> <item quantity="other">%1$d уже в «Играх»</item> </plurals> -</resources> \ No newline at end of file + <string name="hop_back">B · Назад к %1$s</string> + <string name="hop_from_games">игре</string> + <string name="hop_from_play">настройкам запуска</string> + <string name="sheet_graphics_drivers">Графические драйверы</string> + <string name="comp_this_proton">Этот Proton</string> + <string name="comp_every_proton">Все Proton</string> + <string name="comp_for_every_proton">Для всех Proton</string> + <string name="comp_available_count">Доступно · %1$d</string> + <string name="comp_checked">Проверено %1$s</string> + <string name="comp_check_all">Проверить новые компоненты и драйверы</string> + <string name="comp_get">Получить</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton и FEX ниже относятся к этому Proton</string> + <string name="comp_device_tested">%1$s · проверено</string> + <string name="comp_device_untested">%1$s · не проверено</string> + <string name="comp_device_unsupported">%1$s · не поддерживается</string> + <string name="gpu_auto_keeps">Поддерживает рекомендуемую пару актуальной</string> + <string name="gpu_bar_auto">Авто · %1$s</string> + <string name="gpu_separately">Драйверы среды выполнения и дисплея по отдельности</string> + <string name="gpu_use_title">Использовать %1$s?</string> + <string name="gpu_mode_title">Как выбираются драйверы</string> + <string name="gpu_mode_auto_detail">Лучшая пара для этой GPU, всегда актуальная</string> + <string name="gpu_mode_pair">Готовая пара</string> + <string name="gpu_mode_pair_detail">Выберите пару; задаёт оба драйвера</string> + <string name="gpu_mode_mix">Собрать вручную</string> + <string name="gpu_mode_mix_detail">Выберите дисплейный драйвер и драйвер среды выполнения отдельно</string> + <string name="gpu_mode_pair_short">Пара</string> + <string name="gpu_mode_mix_short">Вручную</string> + <string name="gpu_src_auto">АВТО</string> + <string name="gpu_src_pair">ПАРА</string> + <string name="gpu_src_bundle">НАБОР</string> + <string name="gpu_src_chosen">ВЫБРАН</string> + <string name="gpu_src_by_gpu">ПО GPU</string> + <string name="gpu_src_default">ПО УМОЛЧАНИЮ</string> + <string name="gpu_display_live">Выводит изображение</string> + <string name="gpu_display_pending">Нужен перезапуск · до него выводит %1$s</string> + <string name="gpu_runtime_live">Работает</string> + <string name="gpu_runtime_pending">Со следующей сессии · в этой остаётся %1$s</string> + <string name="gpu_display_next">Выводит изображение. Применится со следующей сессии.</string> + <string name="gpu_previous_driver">предыдущий драйвер</string> + <string name="gpu_restart_banner">Перезапустите, чтобы сменить дисплейный драйвер.</string> + <string name="gpu_restart_blocked">Остановите текущую сессию, затем перезапустите DroidDeck, чтобы сменить дисплейный драйвер.</string> + <string name="gpu_restart_now">Перезапустить</string> + <string name="gpu_restart_later">Позже</string> + <string name="gpu_auto_title">«Авто» выбрал эту пару для вашей %1$s</string> + <string name="gpu_auto_builtin_title">«Авто» использует встроенные драйверы для вашей %1$s</string> + <string name="gpu_auto_reason">Выбрано для семейства %1$s. Новые версии ставятся в фоне.</string> + <string name="gpu_pair_title">Выберите пару</string> + <string name="gpu_pair_hint">Пара задаёт дисплейный драйвер и драйвер среды выполнения вместе.</string> + <string name="gpu_mix_title">Выберите каждый драйвер</string> + <string name="gpu_mix_hint">Набор заполняет оба слота. Изменения дисплейного драйвера применяются после перезапуска, изменения среды выполнения — со следующей сессии.</string> + <string name="gpu_change_display">Сменить дисплейный драйвер</string> + <string name="gpu_change_runtime">Сменить драйвер среды выполнения</string> + <string name="gpu_autos_pick">ВЫБОР «АВТО»</string> + <string name="gpu_installed">Установлен</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · перезапустите для применения</string> + <string name="gpu_chip_restart">%1$s · нужен перезапуск</string> + <string name="comp_this_device">Это устройство</string> + <string name="proton_remove_title">Удалить %1$s?</string> + <string name="setup_tab_diagnostics">Диагностика</string> + <string name="setup_ready">Готово к игре</string> + <string name="setup_not_ready">Пока не готово к игре</string> + <string name="setup_ready_runtime">среда выполнения %1$s</string> + <string name="setup_ready_limit_off">ограничение процессов отключено</string> + <string name="setup_ready_signed_in">вход как %1$s</string> + <string name="setup_needs_you">Когда требуется ваше участие</string> + <string name="setup_group_look">Внешний вид</string> + <string name="setup_group_device">Это устройство</string> + <string name="setup_group_art">Обложки библиотеки</string> + <string name="setup_group_download">Загрузка</string> + <string name="setup_download_source">Источник</string> + <string name="setup_download_source_auto">Автоматически</string> + <string name="setup_download_source_direct">Напрямую</string> + <string name="setup_download_source_mirror">Зеркало</string> + <string name="setup_download_source_custom">Свой префикс</string> + <string name="setup_download_mirror">Сайт</string> + <string name="setup_download_prefix">Префикс</string> + <string name="flathub_eyebrow">ПРИЛОЖЕНИЯ LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Приложения для рабочего стола Linux, запускаются на рабочем столе.</string> + <string name="flathub_setup">Настроить Flathub</string> + <string name="flathub_remove_title">Удалить %1$s?</string> + <string name="flathub_remove_note">Его настройки и файлы сохранятся.</string> + <string name="flathub_keep">Оставить</string> + <string name="desktop_size">Размер на диске</string> + <string name="desktop_uninstall_title">Удалить рабочий стол?</string> + <string name="desktop_all_systems">Все</string> + <string name="gog_achievements">Достижения GOG</string> + <string name="gog_achievements_hint">Синхронизирует достижения для поддерживаемых игр GOG. Применится при следующем запуске.</string> + <string name="gog_achievements_off">Достижения отключены</string> + <string name="gog_achievements_on">Достижения включены</string> + <string name="gog_achievements_signin">Войдите в GOG снова</string> + <string name="gog_achievements_uploaded">Достижения отправлены</string> + <string name="gog_achievements_pending">Отправка достижения в ожидании</string> + <string name="gog_achievements_enable_store">Включите достижения GOG в настройках магазинов</string> + <string name="gog_achievements_unavailable">Достижения недоступны; проверьте журналы сессии</string> + <string name="achievement_unlocked">Достижение открыто</string> + <string name="touch_paste">Вставить</string> + <string name="touch_dpad">Крестовина</string> + <string name="touch_left_stick">Левый стик</string> + <string name="touch_right_stick">Правый стик</string> + <string name="touch_menu">Меню</string> + <string name="touch_keyboard">Клавиатура</string> + <string name="touch_dpad_up">Крестовина вверх</string> + <string name="touch_dpad_down">Крестовина вниз</string> + <string name="touch_dpad_left">Крестовина влево</string> + <string name="touch_dpad_right">Крестовина вправо</string> + <string name="touch_title">Сенсорное управление</string> + <string name="touch_controller">Сенсорный контроллер</string> + <string name="touch_mouse">Мышь</string> + <string name="touch_on">Вкл.</string> + <string name="touch_off">Выкл.</string> + <string name="touch_speed_slow">Медленно</string> + <string name="touch_speed_normal">Обычно</string> + <string name="touch_speed_fast">Быстро</string> + <string name="touch_edit_layout">Изменить раскладку</string> + <string name="touch_droiddeck_menu">Меню DroidDeck</string> + <string name="touch_drag_hint">Перетащите элементы управления на экран</string> + <string name="touch_arrange">Расположить</string> + <string name="touch_discard">Отменить</string> + <string name="touch_saving">Сохранение…</string> + <string name="touch_icon">Значок</string> + <string name="touch_narrower">Ш−</string> + <string name="touch_wider">Ш+</string> + <string name="touch_shorter">В−</string> + <string name="touch_taller">В+</string> + <string name="touch_hide">Скрыть</string> + <string name="touch_color_opacity">Цвет и непрозрачность…</string> + <string name="touch_copy_layout">Скопировать эту раскладку</string> + <string name="touch_layout_copied">Раскладка скопирована; вставьте её в сенсорную раскладку любой игры</string> + <string name="touch_paste_layout">Вставить скопированную раскладку</string> + <string name="touch_reset_layout">Восстановить раскладку Steam</string> + <string name="touch_no_binding">У этого элемента нет привязки в Steam, чтобы назначить значок</string> + <string name="touch_icon_for">Значок для %1$s</string> + <string name="touch_layout_color">Цвет сенсорной раскладки</string> + <string name="touch_done">Готово</string> + <string name="touch_save_failed">Не удалось сохранить сенсорную раскладку</string> + <string name="touch_saved">Сенсорная раскладка сохранена в Steam</string> + <string name="touch_app_id">Приложение %1$d</string> + <string name="touch_label_hint">Подпись (необязательно)</string> + <string name="touch_icons_missing">Значки Steam не найдены</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d значок из Steam</item> + <item quantity="few">%1$d значка из Steam</item> + <item quantity="many">%1$d значков из Steam</item> + <item quantity="other">%1$d значка из Steam</item> + </plurals> + <string name="touch_icon_color">Цвет значка</string> + <string name="touch_button_color">Цвет кнопки</string> + <string name="touch_no_icon">Без значка</string> + + <string name="stores_sync_sign_in">Проверка входа…</string> + <string name="stores_sync_library">Получение вашей библиотеки…</string> + <string name="stores_sync_game_list">Получение списка игр…</string> + <string name="stores_sync_details">Загрузка сведений об играх… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Синхронизация %1$d игры…</item> + <item quantity="few">Синхронизация %1$d игр…</item> + <item quantity="many">Синхронизация %1$d игр…</item> + <item quantity="other">Синхронизация %1$d игры…</item> + </plurals> + <string name="stores_sync_progress">Синхронизация… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Получение обложек…</string> + <string name="stores_sync_failed">Синхронизация не удалась</string> + <string name="stores_sync_no_games">В вашей библиотеке %1$s игр не найдено</string> + <string name="stores_sync_amazon_no_answer">Amazon Games не ответил насчёт вашей библиотеки: обновите или войдите снова</string> + <string name="stores_sync_gog_unreachable">Не удалось связаться с GOG</string> + <string name="stores_sync_gog_unreadable">Не удалось прочитать вашу библиотеку GOG</string> + <string name="stores_registering">Регистрация в Steam…</string> + <string name="mode_client_arch">Клиент Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Диагностика VAC</string> + <string name="setup_vac_diag_hint">Игры на Source записывают консоль (-condebug); vac.txt в журналах сессии показывает, защищена ли игра VAC</string> + <string name="load_starting_steam_x64">Запуск Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Используется клиентом Steam x86-64</string> + <string name="storage_uninstall_in_x64">Эта копия находится в клиенте Steam x86-64. Выберите x86-64 в пункте «Клиент Steam», затем удалите её здесь.</string> + <string name="storage_uninstall_in_arm64">Эта копия находится в клиенте Steam ARM64. Выберите ARM64 в пункте «Клиент Steam», затем удалите её здесь.</string> + <string name="drawer_page_glasses">Очки</string> + <string name="glasses_open">Очки VITURE</string> + <string name="glasses_control">Управление очками</string> + <string name="glasses_driver_missing">В этой сборке нет драйвера для этих очков.</string> + <string name="glasses_connection_failed">Не удалось подключиться к очкам. Переподключите кабель или нажмите «Разрешить», чтобы повторить попытку.</string> + <string name="glasses_allow">Разрешить</string> + <string name="glasses_allow_hint">Разрешите DroidDeck менять частоту обновления, режим 3D, яркость, громкость и затемнение очков и считывать отслеживание головы.</string> + <string name="glasses_asking">Ожидание разрешения в окне Android…</string> + <string name="glasses_denied">Управление отклонено. Разрешите его, чтобы менять настройки очков.</string> + <string name="glasses_no_control">Эти очки показывают игру, но их настройки нельзя изменить отсюда.</string> + <string name="glasses_output">Вывод</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Игра на очках</string> + <string name="glasses_game_on_hint">Показывать игру только на очках. Выкл.: игру показывает телефон, а Android дублирует экран телефона.</string> + <string name="glasses_display">Экран</string> + <string name="glasses_refresh">Частота обновления</string> + <string name="glasses_3d">3D (стереопара)</string> + <string name="glasses_3d_hint">Переключите умные очки в режим 3D «бок о бок». Отслеживание головы управляется отдельно.</string> + <string name="glasses_3d_failed">Сигнал 3D не подтверждён. Повторите попытку, когда вернётся изображение 2D.</string> + <string name="glasses_no_signal">Нет изображения: очки в режиме, который этот телефон не может передать. Удерживайте их кнопку 2D/3D или отключите и снова подключите очки.</string> + <string name="glasses_3d_refresh">Частота в 3D</string> + <string name="glasses_auto3d">3D для VR-игр</string> + <string name="glasses_auto3d_hint">Включает 3D, пока работает SteamVR, и возвращает обратно после.</string> + <string name="glasses_picture">Изображение</string> + <string name="glasses_picture_hint">Автоматическое отображение плоского контента для обоих глаз и обнаружение SteamVR. Выберите игру «Рядом» для контента SBS.</string> + <string name="glasses_picture_auto">Автоматически</string> + <string name="glasses_picture_screen">Виртуальный экран</string> + <string name="glasses_picture_sbs">Игра в стереопаре</string> + <string name="glasses_screen_size">Ширина экрана</string> + <string name="glasses_screen_distance">Расстояние до экрана</string> + <string name="glasses_screen_next_session">Ширина и расстояние применяются, когда игра выводится на очки как виртуальный экран.</string> + <string name="glasses_screen_no_output">Эти настройки действуют, когда включена «Игра на очках» и игра показывается на них.</string> + <string name="glasses_screen_flat_hint">В режиме «Автоматически» эта 2D-игра занимает весь экран. Чтобы настроить ширину, расстояние и отслеживание головы, используйте виртуальный экран.</string> + <string name="glasses_screen_use">Использовать виртуальный экран</string> + <string name="glasses_screen_direct_hint">SteamVR заполняет поле зрения. Настройте его поле зрения в VR; ширина и расстояние применяются только к виртуальному экрану.</string> + <string name="glasses_screen_sbs_hint">Игры в стереопаре заполняют обзор каждого глаза. Ширина и расстояние применяются только к виртуальному экрану.</string> + <string name="glasses_tracking_flat_hint">В режиме «Автоматически» эта 2D-игра неподвижна в поле зрения. Чтобы использовать отслеживание головы, выберите «Виртуальный экран» в разделе «Экран».</string> + <string name="glasses_tracking_sbs_hint">Отслеживание головы работает с виртуальным экраном или запущенной игрой SteamVR.</string> + <string name="glasses_hardware">Устройство</string> + <string name="glasses_brightness">Яркость</string> + <string name="glasses_volume">Громкость</string> + <string name="glasses_sunblock">Затемнение</string> + <string name="glasses_sunblock_hint">Затемняет передние линзы.</string> + <string name="glasses_tracking">Отслеживание</string> + <string name="glasses_head_tracking">Отслеживание головы</string> + <string name="glasses_head_tracking_hint">Датчики очков поворачивают виртуальный экран и SteamVR вслед за головой.</string> + <string name="glasses_recenter">Сбросить вид</string> + <string name="glasses_recenter_button">Центрировать экран заново</string> + <string name="glasses_vr_fov">Поле зрения SteamVR</string> + <string name="glasses_vr_fov_hint">Меньше — SteamVR ближе и заполняет очки; больше — шире обзор вокруг.</string> + <string name="glasses_playing">Игра на %1$s</string> + <string name="glasses_calibration">Калибровка отслеживания</string> + <string name="glasses_calibration_hint">Уменьшает дрейф и выравнивает опорный горизонт.</string> + <string name="glasses_calibration_saved_hint">Для этих очков применяется сохранённая калибровка.</string> + <string name="glasses_calibration_open">Калибровать</string> + <string name="glasses_calibration_instructions">Положите подключённые очки перевёрнутыми на горизонтальную поверхность так, чтобы оправа опиралась равномерно. Нажмите «Начать» и не трогайте их около 8 секунд. При движении измерение начнётся заново. Калибровка корректирует дрейф и наклон, но не направление.</string> + <string name="glasses_calibration_settling">Оставьте очки перевёрнутыми и не трогайте их. Ожидание стабилизации…</string> + <string name="glasses_calibration_collecting">Измерение показаний датчиков. Не двигайте очки.</string> + <string name="glasses_calibration_moving">Обнаружено движение. Не трогайте очки; измерение начнётся заново автоматически.</string> + <string name="glasses_calibration_turn_over">Положите очки перевёрнутыми на горизонтальную поверхность. Измерение начнётся, когда они будут расположены правильно.</string> + <string name="glasses_calibration_complete">Калибровка сохранена. Наденьте очки, смотрите прямо перед собой и нажмите «Готово», чтобы отцентрировать вид.</string> + <string name="glasses_calibration_failed">Не удалось завершить калибровку. Проверьте подключение, держите очки неподвижно и повторите попытку. Предыдущая калибровка не изменена.</string> + <string name="glasses_calibration_start">Начать</string> + <string name="glasses_calibration_done">Готово</string> + <string name="glasses_calibration_reset">Сбросить калибровку отслеживания</string> + <string name="glasses_calibration_reset_hint">Удалить сохранённую калибровку и вернуть настройки модели по умолчанию? Снова надев очки, отцентрируйте вид.</string> + <string name="glasses_calibration_reset_button">Сбросить</string> + <string name="hand_camera_group">Отслеживание рук</string> + <string name="hand_camera_prompt_title">Отслеживание рук или контроллеров Joy-Con с помощью камеры телефона?</string> + <string name="hand_camera_prompt_body">Без подключенного контроллера камера телефона отслеживает ваши голые руки в VR: сожмите большой и указательный пальцы, чтобы нажать, сомкните руку, чтобы схватить, и поверните ладонь к себе, сжав пальцы, чтобы открыть меню. При подключенных контроллерах Joy-Con камера отслеживает их положение, в то время как контроллеры Joy-Con обеспечивают вращение и ввод с кнопок. Изображения обрабатываются на этом устройстве и никогда не сохраняются и не отправляются.</string> + <string name="hand_camera_rear">Задняя камера</string> + <string name="hand_camera_rear_hint">Рекомендуется. Обычно резче и шире.</string> + <string name="hand_camera_front">Фронтальная камера</string> + <string name="hand_camera_front_hint">Для случаев, когда заднюю часть устройства нельзя направить на себя.</string> + <string name="hand_camera_allow">Использовать камеру</string> + <string name="hand_camera_not_now">Не сейчас</string> + <string name="hand_camera_setting">Отслеживание рук камерой</string> + <string name="hand_camera_setting_hint">Используйте камеру телефона для жестов голыми руками или для позиционирования сопряженных контроллеров Joy-Con в VR. Контроллеры Joy-Con обеспечивают вращение и ввод с кнопок. Приостанавливается, пока умные очки отслеживают ваши руки или контроллеры Joy-Con. Изображения обрабатываются только на этом устройстве.</string> + <string name="hand_camera_choice">Камера</string> + <string name="hand_camera_access">Доступ к камере</string> + <string name="hand_camera_access_hint">Разрешите доступ к камере, чтобы начать отслеживание рук.</string> + <string name="hand_camera_access_denied">Доступ к камере отключён. Включите его в настройках Android.</string> + <string name="hand_camera_allow_button">Разрешить</string> + <string name="hand_camera_open_settings">Открыть настройки</string> + <string name="hand_camera_placement">Расположение камеры</string> + <string name="hand_camera_placement_hint">Проверьте, что камера видит вас, прежде чем начать игру.</string> + <string name="hand_camera_check">Проверить</string> + <string name="hand_camera_check_title">Расположение камеры</string> + <string name="hand_camera_how_rear">Поставьте устройство вертикально на расстоянии от 1,5 до 2 метров, примерно на уровне груди, направив заднюю камеру на себя. Затем встаньте в кадр, вытянув руки.</string> + <string name="hand_camera_how_front">Поставьте устройство вертикально на расстоянии от 1,5 до 2 метров, примерно на уровне груди, направив экран на себя. Затем встаньте в кадр, вытянув руки.</string> + <string name="hand_camera_starting">Запуск камеры…</string> + <string name="hand_camera_stand_up">Устройство лежит плашмя. Поставьте его вертикально, чтобы камера была направлена на вас.</string> + <string name="hand_camera_upright">Поставьте устройство более вертикально, чтобы камера была направлена на вас.</string> + <string name="hand_camera_not_seen">Пока вас не видно. Встаньте в кадр так, чтобы были видны голова и плечи.</string> + <string name="hand_camera_move_back">Отойдите немного назад.</string> + <string name="hand_camera_move_closer">Подойдите немного ближе.</string> + <string name="hand_camera_show_hands">Вытяните обе руки так, чтобы камера их видела.</string> + <string name="hand_camera_good">Хорошо.</string> + <string name="hand_camera_failed">Не удалось запустить камеру. Закройте другие приложения, использующие её, и попробуйте снова.</string> + <string name="hand_camera_switch">Сменить камеру</string> + <string name="hand_camera_skip">Пропустить</string> + <string name="hand_camera_done">Готово</string> + <string name="glasses_xreal_network_missing">Ожидание подключения очков по USB Ethernet. Этот телефон может не предоставлять его приложениям.</string> + <string name="glasses_xreal_connection_failed">Подключение к XREAL прервано или получен неподдерживаемый ответ. Повторная попытка…</string> + <string name="glasses_xreal_experimental">Экспериментальная поддержка 1S. Включите режим Follow и отключите стабилизацию в меню очков. Направления отслеживания и режимы отображения ещё нужно проверить на устройстве.</string> + <string name="stores_fact_developer">Разработчик</string> + <string name="stores_fact_publisher">Издатель</string> + <string name="stores_fact_released">Дата выхода</string> + <string name="stores_hltb_main">Сюжет</string> + <string name="stores_hltb_extras">+ Доп. задания</string> + <string name="stores_hltb_completionist">Полностью</string> + <string name="stores_hltb_hours">%1$s ч</string> + <string name="stores_hltb_minutes">%1$d мин</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Режим Cardboard</string> + <string name="cardboard_mode_hint">Изображения для левого и правого глаза для VR-очков под телефон.</string> + <string name="cardboard_source">Изображение</string> + <string name="cardboard_source_screen">Виртуальный экран</string> + <string name="cardboard_source_sbs">Стереопара 3D</string> + <string name="cardboard_viewer">Очки</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Без линз</string> + <string name="cardboard_ipd">Расстояние между глазами</string> + <string name="cardboard_screen_width">Ширина экрана</string> + <string name="cardboard_screen_distance">Расстояние до экрана</string> + <string name="cardboard_head_tracking">Отслеживание головы</string> + <string name="cardboard_no_sensor">На этом устройстве нет датчика поворота.</string> + <string name="cardboard_recenter">Отцентрировать вид</string> + <string name="cardboard_recenter_button">Отцентрировать</string> + <string name="cardboard_steamvr">SteamVR (экспериментально)</string> + <string name="cardboard_steamvr_install">Установить</string> + <string name="cardboard_steamvr_installing">Скачивание и распаковка SteamVR…</string> + <string name="cardboard_steamvr_start">Запустить</string> + <string name="cardboard_steamvr_stop">Остановить</string> + <string name="cardboard_steamvr_unavailable">Недоступно в этой сессии.</string> + <string name="cardboard_steamvr_failed">SteamVR не отвечает; проверьте журнал сессии.</string> + <string name="drawer_component_downloads">Скачать компоненты</string> + <string name="drawer_component_downloads_hint">Загрузки общие со страницей «Компоненты». Выберите выше скачанную версию, чтобы использовать её при следующем запуске игры.</string> + <string name="drawer_component_choose_download">Выберите версию для скачивания</string> + <string name="mode_zram">Сжатие zRAM</string> + <string name="mode_zram_hint">Пока идёт игра, память клиента Steam сжимается в zram устройства, и игре остаётся больше ОЗУ. Применяется при следующем запуске Steam.</string> + <string name="mode_zram_unsupported">Недоступно: на устройстве нет zram или swap, либо его ядро старше 5.4.</string> + <string name="stores_storage_insufficient">Недостаточно свободного места: нужно %1$s, свободно только %2$s</string> + <string name="stores_storage_low">Недостаточно места (свободно %1$s, нужно %2$s)</string> + <string name="stores_target_free_unknown">Свободное место неизвестно</string> + <string name="display_picture_position">Положение изображения</string> + <string name="display_position_top">Сверху</string> + <string name="display_position_bottom">Снизу</string> + <string name="display_position_center">По центру (по умолчанию)</string> + <string name="setup_tab_storage">Хранилище</string> + <string name="storage_measuring">Измерение хранилища…</string> + <string name="storage_measuring_hint">В первый раз занимает несколько секунд.</string> + <string name="storage_internal">Внутреннее хранилище</string> + <string name="storage_used_of">Занято %1$s из %2$s</string> + <string name="storage_free">Свободно %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck занимает %1$s. Измерено %2$s.</string> + <string name="storage_rescanning">повторное измерение…</string> + <string name="storage_other_apps">Другие приложения Android</string> + <string name="storage_safe_now">Можно освободить сейчас</string> + <string name="storage_safe_hint">Неиспользуемые среды выполнения, остатки, старые журналы</string> + <string name="storage_clean_up">Очистить…</string> + <string name="storage_session_running">Остановите сессию, чтобы очистить или удалить что-либо. Размеры останутся видны.</string> + <string name="storage_where">Куда уходит</string> + <string name="storage_games">Игры Steam</string> + <string name="storage_game_data">Данные игр</string> + <string name="storage_game_data_hint">Префиксы %1$s · мастерская %2$s · шейдеры %3$s</string> + <string name="storage_tools">Proton и среды выполнения</string> + <string name="storage_tools_unused">Не используются: %1$s</string> + <string name="storage_stores">GOG, Epic и другие магазины</string> + <string name="storage_stores_hint">Удаляйте в разделе «Магазины»</string> + <string name="storage_desktop">Настольные приложения</string> + <string name="storage_desktop_hint">Приложения и среды выполнения Flatpak</string> + <string name="storage_system">Система Linux и клиент Steam</string> + <string name="storage_system_hint">Без этого ничего не запустится</string> + <string name="storage_app_data">Данные DroidDeck</string> + <string name="storage_app_data_hint">Журналы старых сессий %1$s · кэш · драйверы</string> + <string name="storage_legend_games">Игры</string> + <string name="storage_legend_data">Данные игр</string> + <string name="storage_legend_tools">Proton и среды выполнения</string> + <string name="storage_legend_stores">Другие магазины</string> + <string name="storage_legend_desktop">Настольные приложения</string> + <string name="storage_legend_system">Система Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Очистка</string> + <string name="storage_clean_up_lede">Здесь ничего не трогает установленные игры и текущие загрузки.</string> + <string name="storage_nothing_to_clean">Сейчас чистить нечего.</string> + <string name="storage_selected">Выбрано: %1$s · %2$s → свободно %3$s</string> + <string name="storage_cleaning">Очистка…</string> + <string name="storage_free_button">Освободить %1$s</string> + <string name="storage_freed">Освобождено %1$s.</string> + <string name="storage_item_runtimes">Неиспользуемые среды выполнения и Proton из Steam</string> + <string name="storage_item_leftovers">Остатки удалённых игр</string> + <string name="storage_item_leftovers_unsure">Остатки, где могут быть сохранения</string> + <string name="storage_item_logs">Журналы старых сессий</string> + <string name="storage_item_logs_detail">Журналы текущей сессии сохраняются</string> + <string name="storage_item_custom_detail">Ни одна игра его не использует. При необходимости поставьте заново в разделе «Компоненты».</string> + <string name="storage_item_shaders">Кэш шейдеров установленных игр</string> + <string name="storage_item_shaders_detail">Создаётся заново во время игры. Первые минуты каждой игры снова будут с рывками.</string> + <string name="storage_tag_safe">Безопасно</string> + <string name="storage_tag_unused">Не используется</string> + <string name="storage_tag_stutter">Рывки</string> + <string name="storage_tag_saves">Проверьте сохранения</string> + <string name="storage_tag_default">По умолчанию</string> + <string name="storage_tag_required">Обязательно</string> + <string name="storage_tag_not_used">Не используется</string> + <string name="storage_back">Хранилище</string> + <string name="storage_games_with_data">%1$s вместе с данными</string> + <string name="storage_sort_largest">Самые большие</string> + <string name="storage_sort_least_played">Реже всего играли</string> + <string name="storage_sort_sd">На SD-карте</string> + <string name="storage_no_games">Здесь нет игр.</string> + <string name="storage_played">Играли %1$s</string> + <string name="storage_never_played">Ни разу не запускали</string> + <string name="storage_game_parts">Игра %1$s · данные %2$s</string> + <string name="storage_uninstall">Удалить</string> + <string name="storage_games_note">Удаление открывает окно Steam, чтобы Steam его учёл. Чтобы перенести игру на SD-карту, используйте Steam › Настройки › Хранилище.</string> + <string name="storage_uninstall_title">Удалить %1$s?</string> + <string name="storage_uninstall_body">Откроется Steam и спросит подтверждение. Это освободит %1$s игры. Префикс останется, пока вы не очистите остатки, а сохранения Steam Cloud останутся в аккаунте.</string> + <string name="storage_open_steam">Открыть Steam</string> + <string name="storage_tools_detail">%1$s · не используются: %2$s</string> + <string name="storage_remove_unused">Удалить неиспользуемые · %1$s</string> + <string name="storage_in_use">Используется</string> + <string name="storage_not_used">Не используется</string> + <string name="storage_remove">Удалить</string> + <string name="storage_remove_title">Удалить %1$s?</string> + <string name="storage_remove_body">Освободит %1$s. Steam скачает его снова, если он понадобится игре.</string> + <string name="storage_tool_fex_runtime">Нужно для игр Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Нужно для Proton ARM64</string> + <string name="storage_tool_redist">Установщики VC++ и DirectX, которые требуют игры</string> + <string name="storage_tool_fex">Запускает игры Linux x86</string> + <string name="storage_tool_steam">Инструмент Steam</string> + <string name="storage_tool_old_runtime">DroidDeck запускает игры без этой среды выполнения</string> + <string name="storage_tool_x86_proton">Proton x86, который DroidDeck не может запустить</string> + <string name="storage_tool_custom_default">По умолчанию для всех игр</string> + <string name="storage_tool_custom_unused">Ни одна игра не использует</string> + <string name="storage_tool_custom_unknown">Настройки Steam не читаются, поэтому он сохранён</string> + <string name="storage_cleanup_busy">Дождитесь окончания очистки хранилища</string> + <string name="storage_low_title">Свободно только %1$s</string> + <string name="storage_low_body">Steam нужно место для обновлений и кэша шейдеров. Ниже 10 ГБ обновления игр могут срываться на середине.</string> + <string name="storage_low_safe">%1$s можно освободить без риска.</string> + <string name="storage_free_up">Освободить место</string> + <string name="storage_play_anyway">Всё равно играть</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d установлена</item> + <item quantity="other">%d установлено</item> + <item quantity="few">%d установлены</item> + <item quantity="many">%d установлено</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d на SD-карте</item> + <item quantity="other">%d на SD-карте</item> + <item quantity="few">%d на SD-карте</item> + <item quantity="many">%d на SD-карте</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d инструмент</item> + <item quantity="other">%d инструмента</item> + <item quantity="few">%d инструмента</item> + <item quantity="many">%d инструментов</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Пустые папки префиксов и кэш шейдеров %d игры</item> + <item quantity="other">Пустые папки префиксов и кэш шейдеров %d игры</item> + <item quantity="few">Пустые папки префиксов и кэш шейдеров %d игр</item> + <item quantity="many">Пустые папки префиксов и кэш шейдеров %d игр</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">В префиксе %d игры ещё есть файлы, среди них могут быть локальные сохранения. Если они нужны, сначала сделайте копию.</item> + <item quantity="other">В префиксах %d игр ещё есть файлы, среди них могут быть локальные сохранения. Если они нужны, сначала сделайте копию.</item> + <item quantity="few">В префиксах %d игр ещё есть файлы, среди них могут быть локальные сохранения. Если они нужны, сначала сделайте копию.</item> + <item quantity="many">В префиксах %d игр ещё есть файлы, среди них могут быть локальные сохранения. Если они нужны, сначала сделайте копию.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d игра</item> + <item quantity="other">%d игры</item> + <item quantity="few">%d игры</item> + <item quantity="many">%d игр</item> + </plurals> + <string name="storage_tool_default_proton">Proton по умолчанию в DroidDeck</string> + <string name="storage_tool_proton">Вариант Proton 11 в DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Используется в %d игре</item> + <item quantity="other">Используется в %d играх</item> + <item quantity="few">Используется в %d играх</item> + <item quantity="many">Используется в %d играх</item> + </plurals> + <string name="storage_legend_components">Компоненты</string> + <string name="storage_components">Компоненты</string> + <string name="storage_item_components">Неиспользуемые компоненты</string> + <string name="storage_component_original">Оригинал %1$s · %2$s</string> + <string name="storage_original_confirm">Освободит %1$s. Вернёт только версию Proton, которая больше не установлена.</string> + <string name="storage_leftovers_unchecked">Не проверено: манифест приложения Steam не читается, поэтому префиксы удалённых игр остаются, пока он не станет доступен.</string> + <string name="storage_failed">Не удалось выполнить: %1$s</string> + <string name="storage_desktop_shared">Общие: %1$s</string> + <string name="storage_data_installed">Установленные игры</string> + <string name="storage_data_parts">Префикс %1$s · шейдеры %2$s · мастерская %3$s</string> + <string name="storage_clear_shaders">Удалить шейдеры</string> + <string name="storage_data_leftovers">Удалённые игры</string> + <string name="storage_steam_app">Приложение Steam %1$d</string> + <string name="storage_leftover_unsure_detail">В его префиксе ещё есть файлы, среди них могут быть локальные сохранения</string> + <string name="storage_leftover_confirm">Удалит его префикс Wine и кэш шейдеров (%1$s). Сначала сделайте копию нужных сохранений; сохранения Steam Cloud останутся в аккаунте.</string> + <string name="storage_data_other">Сохранённые</string> + <string name="storage_data_other_title">Игры не из Steam и общий префикс Steam</string> + <string name="storage_data_other_detail">Префиксы игр, добавленных магазинами или вручную</string> + <string name="storage_components_packages">Загруженные пакеты</string> + <string name="storage_components_originals">Сохранённые оригиналы</string> + <string name="storage_components_none">Пакеты компонентов не загружены.</string> + <string name="storage_component_in_use">Выбран для Proton или игры</string> + <string name="storage_component_unused">Нигде не выбран</string> + <string name="storage_original_kept">Вернёт установленный Proton</string> + <string name="storage_original_old">Версия Proton, которая больше не установлена</string> + <string name="storage_tag_in_use">Используется</string> + <string name="storage_components_note">Используемые компоненты заблокированы. Выбирайте их в разделе «Компоненты»; то, что удалите здесь, можно скачать там заново.</string> + <string name="storage_component_confirm">Освободит %1$s. Импортированные вами пакеты заново не скачать.</string> + <string name="storage_desktop_detail">%1$s для приложений Flatpak и то, что они используют совместно</string> + <string name="storage_desktop_apps_title">Приложения</string> + <string name="storage_desktop_none">Приложения Flatpak не установлены.</string> + <string name="storage_desktop_shared_title">Общее для приложений</string> + <string name="storage_desktop_runtimes">Среды выполнения</string> + <string name="storage_desktop_runtimes_detail">Библиотеки, на которых работают приложения; неиспользуемые уходят через «Удалить неиспользуемые»</string> + <string name="storage_desktop_cache">Хранилище загрузок</string> + <string name="storage_desktop_cache_detail">Object store и кэш загрузок Flatpak</string> + <string name="storage_desktop_prune">Удалить неиспользуемые</string> + <string name="storage_desktop_prune_body">Удаляет среды выполнения, которые не нужны ни одному установленному приложению, и очищает object store Flatpak. Установленные приложения продолжат работать.</string> + <string name="storage_flatpak_uninstall_body">Удалит приложение (%1$s) и среды выполнения, которые больше никому не нужны. Его данные в домашней папке останутся.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d пакет</item> + <item quantity="other">%d пакета</item> + <item quantity="few">%d пакета</item> + <item quantity="many">%d пакетов</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d приложение</item> + <item quantity="other">%d приложения</item> + <item quantity="few">%d приложения</item> + <item quantity="many">%d приложений</item> + </plurals> + <string name="boot_movie">Загрузочное видео</string> + <string name="boot_movie_video">Видео</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d кадр/с</string> + <string name="boot_movie_note">60 кадр/с выглядит плавнее, но сильнее нагружает процессор при запуске Steam. Видео при запуске, выбранное в настройках самого Steam, имеет приоритет.</string> + <string name="boot_movie_sound">Звук</string> + <string name="boot_movie_custom">Своё видео</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV или WebM. Другие форматы и файлы больше %1$d МБ преобразуются на устройстве в WebM 720p, до %2$d секунд.</string> + <string name="boot_movie_import">Импорт</string> + <string name="boot_movie_remove">Удалить</string> + <string name="boot_movie_pick">Выберите загрузочное видео</string> + <string name="boot_movie_imported">%1$s теперь загрузочное видео</string> + <string name="boot_movie_imported_silent">%1$s теперь загрузочное видео, без звука</string> + <string name="boot_movie_too_long">Видео для преобразования должно быть не длиннее %1$d секунд</string> + <string name="boot_movie_converting">Преобразование %1$d%%</string> + <string name="boot_movie_converting_started">%1$s преобразуется для Steam. Не закрывайте DroidDeck.</string> + <string name="boot_movie_unsupported">Устройство не может декодировать это видео.</string> + <string name="boot_movie_import_failed">Не удалось импортировать видео</string> + <string name="glasses_experimental">Камеры Luma Ultra — Экспериментальная</string> + <string name="glasses_joycons">Отслеживание положения Joy-Con</string> + <string name="glasses_joycons_hint">Используйте камеры умных очков для позиционирования сопряженных контроллеров Joy-Con. Вращение и ввод с кнопок осуществляются с помощью контроллеров Joy-Con. Положение оценивается, когда ваши запястья скрыты. Заменяет контроллеры, управляемые голыми руками, и приостанавливает отслеживание камерой телефона. Направьте контроллеры Joy-Con вперед при подключении или сбросе центра отслеживания.</string> + <string name="glasses_joycons_requires_position">Сначала включите отслеживание положения. Требуется контроллер Joy-Con с поддержкой движения на Android 12 или более поздней версии. По умолчанию отключено.</string> + <string name="setup_tab_glasses">Умные очки</string> + <string name="setup_glasses_scope">Настройки отображения и отслеживания положения головы используются совместно в меню DroidDeck, играх и сеансах рабочего стола.</string> + <string name="setup_glasses_connect">Подключите умные очки, чтобы изменить их настройки отображения и отслеживания. Сохраненные настройки сохраняются при отключении.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Режим отображения</string> + <string name="glasses_output_2d">Вывод 2D</string> + <string name="glasses_output_3d">Вывод 3D</string> + <string name="glasses_picture_group">Изображение и виртуальный экран</string> + <string name="glasses_position_group">Положение и уровень пола</string> + <string name="glasses_hands_group">Отслеживание рук — экспериментальное</string> + <string name="glasses_tracking_status">Статус отслеживания</string> + <string name="glasses_resolution_2d">Разрешение 2D</string> + <string name="glasses_resolution_3d">Разрешение 3D</string> + <string name="glasses_resolution_vr">Разрешение VR</string> + <string name="glasses_resolution_auto">Автоматическое</string> + <string name="glasses_resolution_inherit">То же, что и 2D/3D</string> + <string name="glasses_resolution_hint">Разрешение вывода для каждого глаза.</string> + <string name="glasses_refresh_30_hint">Включите функцию «Игра на умных очках», чтобы выбрать собственный режим дисплея 30 Гц.</string> + <string name="glasses_3dof">Виртуальный экран 3DoF</string> + <string name="glasses_3dof_hint">Закрепите плоские игры перед собой, чтобы вы могли осматриваться. Включает функцию «Игра на умных очках» без переключения в 3D.</string> + <string name="glasses_screen_app_wide">Ширина и расстояние мгновенно обновляют отслеживаемый виртуальный экран для меню DroidDeck, игр и сеансов рабочего стола.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Позиционное отслеживание включает вращение головы в SteamVR. Для отслеживания только вращения отключите позиционное отслеживание.</string> + <string name="glasses_head_tracking_spatial_hint">Управляет движением головы на виртуальном экране. Позиционное отслеживание включает вращение головы в SteamVR.</string> + <string name="glasses_quick_actions">Быстрые действия</string> + <string name="glasses_recenter_screen_hint">Посмотрите туда, куда хотите направить экран, затем сбросьте центр отслеживания, чтобы установить его высоту и направление.</string> + <string name="glasses_recenter_joycons_button">Центрировать Joy-Con заново</string> + <string name="phone_camera_tracking_group">Камера телефона — экспериментальная функция</string> + <string name="phone_camera_tracking_setting">Отслеживание рук или контроллеров Joy-Con</string> + <string name="glasses_position">Позиционное отслеживание — экспериментальное</string> + <string name="glasses_position_hint">Физическое движение в VR и вокруг виртуальных экранов. Перезапуск отслеживания занимает некоторое время.</string> + <string name="glasses_eye_height">Текущая высота глаз над полом</string> + <string name="glasses_floor">Установка уровня пола от текущей высоты</string> + <string name="glasses_floor_set">Установка уровня пола</string> + <string name="glasses_spatial_setup">Настройка и диагностика стереокамеры</string> + <string name="glasses_spatial_setup_hint">Перед игрой проверьте калибровку камеры и отслеживание рук.</string> + <string name="glasses_spatial_open">Открыть настройки</string> + <string name="glasses_hands">Управление контроллерами голыми руками</string> + <string name="glasses_hands_hint">Используйте камеры умных очков для прицеливания руками, масштабируйте для щелчка и сжимайте руку для захвата в VR. Стики геймпада двигаются и поворачиваются. Заменяет отслеживание положения Joy-Con. Во время игр может наблюдаться задержка или потеря отслеживания.</string> + <string name="glasses_hands_ready_hint">Включить управление контроллерами голыми руками под камерами Luma Ultra в разделе «Отслеживание». Сначала отображать открытые руки.</string> + <string name="glasses_hands_base">Общая калибровка Luma Ultra</string> + <string name="glasses_hands_base_hint">Использование общей базы Luma Ultra. Откалибруйте свои умные очки, чтобы проверить их точность.</string> + <string name="glasses_hands_calibration_verified">Калибровка измерена и подтверждена</string> + <string name="glasses_hands_calibration_required">Требуется проверка</string> + <string name="glasses_hands_calibration_required_hint">Контроллеры, управляемые голыми руками, становятся доступны после успешного прохождения проверки расстояния.</string> + <string name="tracking_recovery_lost">Отслеживание потеряно</string> + <string name="tracking_recovery_look">Медленно осмотритесь в хорошо освещённой комнате.\nНе закрывайте камеры слежения и смотрите на мебель или другие хорошо различимые детали.</string> + <string name="tracking_recovery_restart_help">Все еще застряли? На телефоне: умные очки → Отслеживание → Открыть настройку → Показать диагностику → Перезапустить отслеживание.</string> + <string name="tracking_recovery_disconnected">Умные очки отключены</string> + <string name="tracking_recovery_connect">Проверьте USB-соединение и повторно подключите смарт-очки.\nПримите запрос на USB-доступ на телефоне, если он появится.</string> + <string name="tracking_recovery_usb_help">После подключения медленно осмотритесь в хорошо освещенной комнате, чтобы восстановить отслеживание.</string> + <string name="tracking_recovery_recenter">Требуется повторное центрирование</string> + <string name="tracking_recovery_recenter_steps">Отслеживание вернулось в новое положение.\nПосмотрите вперед, затем нажмите «Сбросить центр отслеживания» на телефоне.</string> + <string name="tracking_recovery_recenter_help">Вы также можете найти функцию сброса центра отслеживания в умных очках → Отслеживание → Открыть настройки. Сохраненная калибровка камеры сохранена.</string> + <string name="tracking_recovery_stabilizing">Постой на мгновение неподвижно</string> + <string name="tracking_recovery_hold">Выполняется сброс центра отслеживания.\nДержите умные очки неподвижно, пока отслеживание не стабилизируется.</string> + <string name="tracking_recovery_automatic">Этот экран закрывается автоматически, когда отслеживание положения головы готово.</string> + <string name="glasses_steady_hand_aim">Стабилизированное прицеливание руками</string> + <string name="glasses_steady_hand_aim_hint">Цельтесь из плеча через ладонь. Выключите для вращения, управляемого запястьем.</string> + <string name="spatial_title">Пространственная настройка</string> + <string name="spatial_wait_tracking">Ожидание отслеживания…</string> + <string name="spatial_cameras_description">Левая и правая камеры слежения</string> + <string name="spatial_camera_sync">Синхронизация камеры</string> + <string name="spatial_ready">Готово</string> + <string name="spatial_sync_hint">Ожидание совмещения камеры и отслеживания головы. Держите умные очки подключенными.</string> + <string name="spatial_prepare">1. Подготовьте калибровочную мишень.</string> + <string name="spatial_print_actual">Печать в натуральную величину</string> + <string name="spatial_print_hint">Размер каждого квадрата должен составлять 30 мм (1,181 дюйма). Установите лист на твердую поверхность в хорошо освещенном месте.</string> + <string name="spatial_print">Напечатать калибровочную мишень</string> + <string name="spatial_capture_group">2. Снимайте разные виды</string> + <string name="spatial_board_stationary">Держите калибровочную мишень неподвижной.</string> + <string name="spatial_capture_hint">Перемещайте умные очки ближе, дальше и в стороны. Поверните их влево/вправо, наклоните вверх/вниз и наклоните в сторону. Сохраняйте калибровочную цель в обеих камерах и делайте небольшую паузу перед каждым захватом.</string> + <string name="spatial_start">Начать новую калибровку</string> + <string name="spatial_wait_sync">Ожидание синхронизации камеры.</string> + <string name="spatial_start_hint">Запустите новую калибровку для сбора представлений.</string> + <string name="spatial_views_hint">Сохраняйте видимость цели калибровки в обоих окнах предварительного просмотра. Сделайте как минимум 24 четких изображения под разными углами.</string> + <string name="spatial_capturing">Захват…</string> + <string name="spatial_capture">Захват изображения цели калибровки</string> + <string name="spatial_alignment">Вычисление выравнивания камеры</string> + <string name="spatial_calculating">Вычисление…</string> + <string name="spatial_calculate">Расчет калибровки</string> + <string name="spatial_distance_group">3. Проверьте расстояние.</string> + <string name="spatial_distance">Измеренное расстояние</string> + <string name="spatial_distance_hint">Начните с 12 дюймов или 30 см, чтобы напечатанные маркеры было легче обнаружить. Выберите точное измерение, которое вы будете использовать.</string> + <string name="spatial_camera_board_distance">Левая камера к центру калибровочной цели</string> + <string name="spatial_checking_distance">Проверка расстояния…</string> + <string name="spatial_validate">Проверка расстояния</string> + <string name="spatial_diagnostics">Диагностика</string> + <string name="spatial_show_diagnostics">Показать диагностику</string> + <string name="spatial_diagnostics_hint">Инструменты восстановления синхронизации и отслеживания камеры.</string> + <string name="spatial_camera_timing">Синхронизация камеры</string> + <string name="spatial_hand_input">Ввод от отслеживания рук</string> + <string name="spatial_wait_timing">Ожидание синхронизации камеры.</string> + <string name="spatial_frames">Изображения с камеры</string> + <string name="spatial_lite">Упрощенное обнаружение моделей рук</string> + <string name="spatial_lite_hint">Используйте детектор ладоней Lite и ключевые точки Lite на руках. Проверьте точность прицеливания, захвата и захвата. Сбрасывается при перезапуске отслеживания.</string> + <string name="spatial_adaptive">Автоматический ввод частоты для отслеживания рук</string> + <string name="spatial_adaptive_hint">Отрегулируйте ввод в соответствии со скоростью обработки. Сбрасывается при перезапуске отслеживания.</string> + <string name="spatial_half_rate">Ограничение входной частоты для отслеживания рук</string> + <string name="spatial_half_rate_hint">Используйте половину изображений с камеры. Выключите, чтобы сравнить максимальную частоту. Сбрасывается при перезапуске отслеживания.</string> + <string name="spatial_diagnostic_capture">Диагностический захват</string> + <string name="spatial_diagnostic_capture_hint">Сохраните одну пару стереоизображений локально. Изображения сохраняются только по запросу.</string> + <string name="spatial_save_frame">Сохранить изображение с камеры</string> + <string name="spatial_restart_tracking">Перезапустить отслеживание</string> + <string name="spatial_restart_hint">Используйте, если слежение не восстанавливается в хорошо освещенном месте. Для перезапуска требуется новый источник отслеживания.</string> + <string name="spatial_restart">Перезапуск</string> + <string name="spatial_restart_title">Возобновить отслеживание?</string> + <string name="spatial_restart_confirm">Несохраненные калибровочные изображения будут потеряны. После этого держите умные очки неподвижно и сбросьте центр отслеживания, когда отслеживание восстановится.</string> + <string name="spatial_views_count">%1$d / захвачено 24 просмотра</string> + <string name="spatial_capture_paused">Захват приостановлен: %1$s</string> + <string name="spatial_measure_hint">Измерение %1$s. Покажите полную калибровочную цель в обоих окнах предварительного просмотра, затем задержитесь.</string> + <string name="spatial_timing_values">%1$.1f Гц • возраст изображения %2$.1f мс • обработка %3$.1f мс</string> + <string name="spatial_input_values">Предел ввода %1$.1f Гц • %2$.0f%% изображений с камеры. Отслеживание головы продолжается с максимальной частотой.</string> + <string name="spatial_frame_counts">%1$d обработано • %2$d удалено • %3$d пропущено из-за ограничения ввода</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck — калибровка Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Печать в размере 100% / Реальный размер. Каждый квадрат: 30 мм (1,181 дюйма).</string> + <string name="spatial_print_stationary">Держите калибровочную мишень плоской и неподвижной; перемещайте умные очки между снимками.</string> + <string name="spatial_print_check">Проверка шкалы: расстояние между делениями 100 мм (3,937 дюйма).</string> + <string name="spatial_distance_12in">12 дюймов (30,48 см)</string> + <string name="spatial_distance_30cm">30 см (11,81 дюйма)</string> + <string name="spatial_distance_20in">20 дюймов (50,8 см)</string> + <string name="spatial_distance_50cm">50 см (19,69 дюйма)</string> + <string name="spatial_disabled">Отключено</string> + <string name="spatial_wait_stable">Ожидание стабильного отслеживания</string> + <string name="spatial_disconnected">Отключено</string> + <string name="spatial_hands_off">Контроллеры, управляемые голыми руками, выключены.</string> + <string name="spatial_tracking_off">Отслеживание положения выключено или умные очки отключены.</string> + <string name="spatial_recenter_pending">Запрошен сброс центра отслеживания — удерживайте неподвижно, пока отслеживание стабилизируется.</string> + <string name="spatial_tracking_lost">Слежение потеряно — смотрите в хорошо освещенное место с видимыми деталями.</string> + <string name="spatial_origin_changed">Начало координат отслеживания изменено — нажмите «Сбросить центр отслеживания», затем удерживайте неподвижно.</string> + <string name="spatial_active">6DoF активна</string> + <string name="spatial_connect_hint">Подключите Luma Ultra и включите отслеживание положения.</string> + <string name="spatial_validation_session">Калибровка для этого соединения проверена.</string> + <string name="spatial_validation_saved">Калибровка проверена и сохранена.</string> + <string name="spatial_wait_cameras">Ожидание стереокамер</string> + <string name="spatial_wait_hands">Ожидание отслеживания рук</string> + <string name="spatial_collect_instructions">Держите калибровочную мишень 5 × 7 неподвижно. Снимайте более 24 изображений, перемещая и вращая умные очки.</string> + <string name="spatial_capture_pending">Ожидание следующего изображения с камеры. Держите умные очки неподвижно.</string> + <string name="spatial_validation_pending">Проверка следующего изображения с камеры. Держите полную калибровочную цель видимой и держитесь неподвижно.</string> + <string name="spatial_start_first">Сначала запустите калибровку</string> + <string name="spatial_no_camera_frame">Свежее изображение с камеры не поступило. Проверьте подключение смарт-очков и предварительный просмотр камеры, затем повторите попытку.</string> + <string name="spatial_clock_reset">Сброс часов камеры</string> + <string name="spatial_frame_changed">Система координат отслеживания изменена. Ваши изображения сохранены для перерасчета. Сбросьте центр отслеживания, затем начните новый набор, чтобы получить больше изображений.</string> + <string name="spatial_device_loaded">калибровка устройства загружена</string> + <string name="spatial_base_loaded">Базовая калибровка Luma Ultra загружена.</string> + <string name="spatial_calibration_needed">требуется калибровка</string> + <string name="spatial_tap_start">Нажмите «Сначала начать новую калибровку».</string> + <string name="spatial_capture_recenter_pending">Сброс центра отслеживания ожидает стабилизации отслеживания. Удерживайте неподвижно некоторое время.</string> + <string name="spatial_capture_recenter">Отслеживание изменилось. Нажмите один раз, чтобы сбросить центр отслеживания, затем удерживайте неподвижно перед захватом.</string> + <string name="spatial_capture_unsynchronized">Снимок отклонён: отслеживание головы не было синхронизировано либо изменилось во время съёмки. Не двигайтесь и попробуйте снова.</string> + <string name="spatial_align_first">Перед проверкой расстояния рассчитайте выравнивание камеры.</string> + <string name="spatial_processing_failed">ошибка обработки камеры</string> + <string name="spatial_hand_head_changed">Изменено отслеживание головы при обнаружении рук.</string> + <string name="spatial_hand_wait_sync">Ожидание синхронизации камеры и головы.</string> + <string name="spatial_no_wrists">Запястья не обнаружены. Держите ручки контроллера Joy-Con перед умными очками.</string> + <string name="spatial_no_hands">Руки не обнаружены. Покажите раскрытые ладони перед умными очками</string> + <string name="spatial_one_camera_wrists">Запястья видны только на одной камере; держите дескрипторы вашего контроллера в общем представлении</string> + <string name="spatial_one_camera_hands">Руки видны только на одной камере; держите обе ладони на виду</string> + <string name="spatial_ambiguous_hands">Обе камеры видят руки, но соответствие левого и правого неоднозначно.</string> + <string name="spatial_inconsistent_depth">Руки обнаружены, но глубина стерео непостоянна.</string> + <string name="spatial_rejected_wrist">Положение запястья отклонено проверками стерео или движения.</string> + <string name="spatial_inconsistent_palm">Обнаружены стереоточки, но геометрия ладони противоречива.</string> + <string name="spatial_hands_need_calibration">Завершите калибровку и проверку расстояния, чтобы включить руки.</string> + <string name="spatial_hands_wait_stable">Ожидание стабильного отслеживания головы; сбросьте центр отслеживания, если потребуется.</string> + <string name="spatial_old_frame">Камера наблюдения устарела; жду новую пару</string> + <string name="spatial_fit_ready">По размеру %1$.2f пикселей. Измерьте выбранное расстояние от левой камеры до центра калибровочной цели, а затем подтвердите.</string> + <string name="spatial_opencv_error">OpenCV недоступен: %1$s</string> + <string name="spatial_restored">%1$d сохраненные просмотры восстановлены. Рассчитайте калибровку, чтобы повторить попытку, или начните новую настройку, чтобы захватить больше.</string> + <string name="spatial_captured">Снято %1$d / 24 просмотра. Держите цель калибровки фиксированной; переместите умные очки для следующего просмотра.</string> + <string name="spatial_capture_corners">Захват отклонен: %1$d / 12 требуемых углов видны в обеих камерах. Покажите больше калибровочной цели, задержитесь и повторите попытку.</string> + <string name="spatial_validation_error">Не удалось завершить дистанционную проверку: %1$s. Попробуйте еще раз.</string> + <string name="spatial_hand_timeout">Обнаружение рук превысило %1$d мс; наблюдение отклонено</string> + <string name="spatial_wrists_tracked">%1$d / 2 положения запястья Joy-Con, измеренные с помощью стереосистемы.</string> + <string name="spatial_palms_tracked">Отслеживаемые ладони: %1$d / 2; готовность к щипку: %2$d; готовность к захвату: %3$d</string> + <string name="spatial_capture_saved">Диагностический захват сохранен в %1$s.</string> + <string name="spatial_hand_error">Отслеживание рук остановлено: %1$s</string> + <string name="spatial_stereo_loaded">Стерео %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Отслеживание положения головы и цель калибровки расходятся на %1$s (предел 5 см / 2 дюйма). Держите цель калибровки фиксированной и дождитесь устойчивого отслеживания, прежде чем начинать новый набор. Аккуратно поворачивайте и наклоняйте умные очки; пауза перед каждым захватом.</string> + <string name="spatial_need_views">Сделайте не менее 24 различных видов неподвижной калибровочной цели.</string> + <string name="spatial_need_rotation">Поворачивайте умные очки влево и вправо, а также наклоняйте их вверх и вниз; движение без вращения не может откалибровать выравнивание камеры.</string> + <string name="spatial_bad_baseline">Неправдоподобная базовая линия камеры.</string> + <string name="spatial_need_orientations">Поворачивайте голову в разных направлениях.</string> + <string name="spatial_bad_rotation">Недопустимое вращение камеры к голове.</string> + <string name="spatial_bad_alignment">Неправильное выравнивание камеры по отношению к голове.</string> + <string name="spatial_calibration_error">Не удалось завершить калибровку. %1$s Ваши захваченные виды сохраняются.</string> + <string name="spatial_reprojection_error">Задержка перепроецирования %1$.2f пикселей превышает 2 пикселя. Перекалибровать.</string> + <string name="spatial_distance_corners">%1$d / В обеих камерах обнаружено 24 угла шахматной доски. Держите полную калибровочную цель видимой и держитесь неподвижно. Если оно уже видно, выберите 12 дюймов или 30 см и измерьте это более близкое расстояние, прежде чем повторить попытку.</string> + <string name="spatial_distance_depth">Цель калибровки видна, но ее глубину невозможно измерить достоверно. Держите смарт-очки неподвижно и держите калибровочную мишень плоской и хорошо освещенной, а затем повторите попытку.</string> + <string name="spatial_distance_invalid">Неверные измерения камеры. Держитесь спокойно и попробуйте еще раз.</string> + <string name="spatial_distance_passed">Дистанционная проверка пройдена.</string> + <string name="spatial_distance_retry">Еще раз проверьте расстояние от левой камеры до центра калибровочной цели, затем повторите попытку.</string> + <string name="spatial_distance_result">Камеры измерения %1$s; выбранное расстояние %2$s. %3$s</string> + <string name="spatial_wait_previews">Перед началом калибровки дождитесь предварительного просмотра обеих камер.</string> + <string name="spatial_saved_views_hint">Сохраненные представления можно пересчитать. Запустите новую калибровку для захвата текущей системы координат отслеживания.</string> + <string name="spatial_model_checksum_error">Несоответствие контрольной суммы модели руки.</string> + <string name="spatial_opencv_load_error">OpenCV не удалось загрузить.</string> + <string name="glasses_6dof">Виртуальный экран 6DoF</string> + <string name="spatial_gpu">Распознавание рук на GPU</string> + <string name="spatial_gpu_hint">По умолчанию используется CPU. Режим GPU экспериментальный и может вызывать перезапуск SteamVR. Выбор сбрасывается при перезапуске отслеживания.</string> + <string name="spatial_inference_error">Распознавание рук недоступно: %1$s. Измените режим CPU/GPU или выключите и снова включите управление руками, чтобы повторить попытку.</string> +</resources> diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml new file mode 100644 index 0000000000..4ddc7eacca --- /dev/null +++ b/app/src/main/res/values-sv/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">SteamVR-grafiken slutade fungera</string> + <string name="steamvr_recovery_countdown">DroidDeck startar om om %1$d sekunder för att återställa grafiken och öppna SteamVR igen. Spelet som körs stängs; osparade framsteg kan inte återställas.</string> + <string name="steamvr_recovery_repeated">Grafikfelet kom tillbaka strax efter en omstart. Automatisk återställning är pausad för att undvika en loop. En omstart stänger spelet; osparade framsteg kan inte återställas.</string> + <string name="steamvr_recovery_restart">Starta om nu</string> + <string name="steamvr_recovery_cancel">Stäng inte</string> + <string name="steamvr_recovery_restarting">Återställer grafiken och öppnar SteamVR igen…</string> + <string name="steamvr_recovery_failed">DroidDeck kunde inte starta om automatiskt. Stäng appen helt och öppna den sedan igen.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Första starten laddar ned Steam. Det kan ta några minuter.</item> + <item>Som standard pausas Steam när du lämnar appen. Det fortsätter där det slutade när du kommer tillbaka.</item> + <item>Din handkontroll visas som en Xbox 360-kontroll. Annars kan du använda skärmkontrollerna.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Första starten konfigurerar skrivbordet. Det kan ta några minuter.</item> + <item>Som standard pausas sessionen när du lämnar appen. Den fortsätter där den slutade när du kommer tillbaka.</item> + <item>Pekskärmen fungerar som en pekplatta: dra för att flytta pekaren, tryck för att klicka.</item> + <item>Din handkontroll visas som en Xbox 360-kontroll. Annars kan du använda skärmkontrollerna.</item> + </string-array> + <string name="session_channel">Session</string> + <string name="session_channel_description">Visas medan en Steam- eller skrivbordssession är öppen</string> + <string name="session_notification">Steam körs</string> + <string name="session_notification_downloads">Steam-nedladdning pågår</string> + <string name="session_notification_paused">Sessionen är pausad - tryck på Återuppta när du är redo</string> + <string name="resume_session">Återuppta</string> + <string name="suspend_now">Pausa nu</string> + <string name="stop_session">Stoppa sessionen</string> + <string name="frame_gen_title">Bildrutegenerering</string> + <string name="frame_gen_hint">Välj läge för bildrutegenerering</string> + <string name="frame_gen_off">Av</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG adaptiv %1$d</string> + <string name="lsfg_needs_steam">Kräver Lossless Scaling på Steam</string> + <string name="lsfg_needs_install">Installera Lossless Scaling i Steam eller importera Lossless.dll</string> + <string name="lsfg_import">Importera Lossless.dll…</string> + <string name="lsfg_using_steam">Använder kopian från Steam</string> + <string name="lsfg_using_import">Använder en importerad kopia</string> + <string name="lsfg_pick_title">Välj Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll har importerats</string> + <string name="lsfg_import_unchanged">Den här Lossless.dll används redan</string> + <string name="lsfg_import_not_owned">Lossless Scaling ägs inte på det här Steam-kontot</string> + <string name="lsfg_import_invalid">Filen är inte Lossless.dll från Lossless Scaling</string> + <string name="lsfg_import_failed">Kunde inte förbereda LSFG från den här Lossless.dll</string> + <string name="lsfg_problem_missing">LSFG kräver Lossless Scaling från Steam eller en importerad Lossless.dll</string> + <string name="lsfg_problem_failed">LSFG kunde inte förbereda sina shaders från Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: stöds inte</string> + <string name="hud_fg_failed">%1$s: motorn misslyckades</string> + <string name="hud_fg_needs_lossless">%1$s: kräver Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · startar</string> + <string name="second_library_import_hint">Lägger till ett Steam-bibliotek och söker igenom det efter Windows-spel. Spel du äger använder sina Steam-poster; resten blir icke-Steam-genvägar.</string> + <string name="game_env_title">Spelmiljö</string> + <string name="game_env_hint">Miljövariabler för Proton-spel.</string> + <string name="game_env_edit">Redigera</string> + <string name="game_env_shared">Alla Proton-spel</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">Steam-app-ID</string> + <string name="game_env_open">Öppna</string> + <string name="game_env_profile">Spel %1$s</string> + <string name="game_env_add">Lägg till variabel</string> + <string name="game_env_name">Variabelnamn</string> + <string name="game_env_value">Värde</string> + <string name="game_env_save">Spara</string> + <string name="game_env_remove">Ta bort</string> + <string name="game_env_restore">Ärv igen</string> + <string name="game_env_reset">Rensa miljöåsidosättningar</string> + <string name="game_env_unset">Ta bort värdet i den här profilen</string> + <string name="game_env_empty">Inga variabler angivna.</string> + <string name="game_env_inherited">Ärvd</string> + <string name="game_env_custom">Anpassad variabel</string> + <string name="game_env_error">Kunde inte läsa in eller spara. Kontrollera ledigt lagringsutrymme och försök igen.</string> + <string name="game_env_invalid">Använd ett giltigt namn och ett värde på högst 8192 tecken.</string> + <string name="game_env_unused">Den vanliga Proton-körmiljön läser inte den här variabeln.</string> + <string name="game_env_loading">Läser in…</string> + <string name="game_env_feature">Åsidosätter D3D12-funktionsnivån. 12_2 rapporterar DirectX 12 Ultimate-funktioner; funktioner som inte stöds kan misslyckas. Lämna tomt för automatisk identifiering.</string> + <string name="game_env_shader">Åsidosätter D3D12-shadermodellen. 6_9 kräver en tillräckligt ny VKD3D och matchande GPU-funktioner. Lämna tomt för automatisk identifiering.</string> + <string name="game_env_cache">Behåll Mesas shadercache aktiverad för att minska upprepad kompilering. false aktiverar cachning.</string> + <string name="game_env_cache_size">Största storlek på Mesas shadercache, t.ex. 1G. Större cache använder mer lagringsutrymme.</string> + <string name="game_env_vkd3d_config">VKD3D-alternativ för D3D12. nodxr inaktiverar strålspårning; använd bara för ett spel som behöver det.</string> + <string name="game_env_proton_log">Ange 1 för en diagnostiklogg från Proton. Loggning kan sänka prestandan och tar lagringsutrymme.</string> + <string name="game_env_wined3d">Ange 1 för att använda OpenGL-baserade WineD3D i stället för DXVK vid kompatibilitetstester för D3D9–11.</string> + <string name="game_env_no_ntsync">Ange 1 för att hålla spelet borta från ntsync (droiddeck-ntsync eller en kärndrivrutin); det använder droiddeck-esync där ett paket finns, annars droiddeck-fsync.</string> + <string name="game_env_no_esync">Ange 1 för att stänga av droiddeck-esync för det här spelet; det använder droiddeck-fsync i stället, eller droiddeck-ntsync där även fsync är av.</string> + <string name="game_env_no_fsync">Ange 1 för att hålla spelet borta från droiddeck-fsync; det använder droiddeck-esync där ett paket finns, annars droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Ange 1 för att köra spelet på droiddeck-fsync, eller 0 för att prioritera droiddeck-esync där ett paket passar dess Proton.</string> + <string name="game_env_xalia">Ange 0 för att inaktivera Protons hjälp för handkontrollsnavigering i det här spelet.</string> + <string name="game_env_hud">DXVK-överlägg för D3D9–11. fps visar bildfrekvensen; utan värde döljs det.</string> + <string name="game_env_dxvk_config">DXVK-inställningar avgränsade med semikolon. Nyare versioner använder dxvk.maxFrameRate för bildbegränsning; använd hellre sessionens bildbegränsare vid vanligt spelande.</string> + <string name="game_env_vkd3d_limit">Gräns för bildfrekvens i D3D12. 0 inaktiverar gränsen.</string> + <string name="game_env_glthread">Trådning för Mesa OpenGL. true kan hjälpa CPU-begränsade OpenGL-spel; testa för varje spel.</string> + <string name="sync_backend_title">Wine-synk</string> + <string name="sync_backend_hint">Hur spel håller sina trådar i takt. Gäller från nästa session.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">FEX-förinställning</string> + <string name="fex_next_launch">Gäller nästa gång ett spel startas.</string> + <string name="game_settings_title">Spel</string> + <string name="fex_default_label">FEX-standard</string> + <string name="fex_default_detail">Använder FEX:s standardinställningar.</string> + <string name="fex_stability_label">Stabilitet</string> + <string name="fex_stability_detail">Säkraste och långsammaste inställningarna.</string> + <string name="fex_compatibility_label">Kompatibilitet</string> + <string name="fex_compatibility_detail">Full TSO med multiblock.</string> + <string name="fex_intermediate_label">Mellannivå</string> + <string name="fex_intermediate_detail">Balanserad TSO med sänkt x87-precision.</string> + <string name="fex_performance_label">Prestanda</string> + <string name="fex_performance_detail">All TSO inaktiverad; multiblock.</string> + <string name="fex_performance_tso_label">Prestanda + TSO</string> + <string name="fex_performance_tso_detail">Prestandainställningar med huvud-TSO aktiverad.</string> + <string name="fex_extreme_label">Extrem</string> + <string name="fex_extreme_detail">Inaktiverar kontroller av självmodifierande kod. JIT-spel och DRM kan sluta fungera.</string> + <string name="fex_extreme_tso_label">Extrem + TSO</string> + <string name="fex_extreme_tso_detail">Extrema inställningar med huvud-TSO aktiverad.</string> + <string name="fex_extreme_gn_label">Extrem-gn</string> + <string name="fex_extreme_gn_detail">Prestanda med TSC- och metadatatips. Prova före Extrem.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Prestanda med fullständiga kodkontroller och dold hypervisor-bit.</string> + <string name="game_env_custom_value">Anpassat värde</string> + <string name="game_env_select_value">Välj värde</string> + <string name="user_apps_section">Emulatorer & appar</string> + <string name="user_apps_add">Lägg till</string> + <string name="user_apps_add_detail">Din egen app eller ditt eget spel</string> + <string name="user_apps_kind_script">Skript</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d %%</string> + <string name="user_apps_starting">Startar…</string> + <string name="user_apps_added">%1$s har lagts till</string> + <string name="user_apps_removed">%1$s har tagits bort</string> + <string name="user_apps_back">Skrivbord</string> + <string name="user_apps_gone">Appen finns inte längre. Välj den igen från skrivbordet.</string> + <string name="user_apps_open">Öppna %1$s</string> + <string name="user_apps_remove">Ta bort</string> + <string name="user_apps_remove_confirm">Tryck igen för att ta bort</string> + <string name="user_apps_stop_session">Stoppa sessionen för att ta bort</string> + <string name="user_apps_script_linked">Kör %1$s från sin mapp, som länkas in i sessionen där den ligger. Om du tar bort appen lämnas mappen orörd.</string> + <string name="user_apps_script_copied">Kör %1$s från en kopia av mappen i DroidDeck. Om du tar bort appen raderas kopian, inte originalet.</string> + <string name="user_apps_runtime_required">Installera Linux-körmiljön först</string> + <string name="user_apps_file_gone">Filen finns inte längre</string> + <string name="user_apps_no_space">Inte tillräckligt med ledigt utrymme: att kopiera mappen kräver %1$s</string> + <string name="user_apps_copying">Kopierar %1$s</string> + <string name="user_apps_failed">Det gick inte att lägga till appen</string> + <string name="user_apps_github_checking">Söker efter en utgåva av %1$s</string> + <string name="user_apps_github_unreachable">Kunde inte läsa utgåvorna av %1$s</string> + <string name="user_apps_github_no_appimage">Ingen utgåva av %1$s har en AppImage för ARM64 eller x86_64</string> + <string name="user_apps_downloading">Laddar ned %1$s</string> + <string name="user_apps_download_failed">Nedladdningen misslyckades</string> + <string name="user_apps_update_failed">Det gick inte att uppdatera appen</string> + <string name="user_apps_icon_failed">Ikonen kunde inte läsas</string> + <string name="user_apps_saved">%1$s har sparats</string> + <string name="user_apps_edit">Redigera</string> + <string name="user_apps_check_updates">Sök efter uppdateringar</string> + <string name="user_apps_checking_updates">Söker efter uppdateringar…</string> + <string name="user_apps_update_to">Uppdatera till %1$s</string> + <string name="user_apps_up_to_date">Senaste versionen · %1$s</string> + <string name="user_apps_updated">%1$s har uppdaterats</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Lägg till en app</string> + <string name="add_app_tab_script">Skript</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">En .sh-fil. Den körs från sin egen mapp, i helskärm under gamescope.</string> + <string name="add_app_appimage_hint">En ARM64-AppImage (aarch64), eller en x86_64-AppImage som körs via FEX. Den packas upp i Linux-körmiljön en gång.</string> + <string name="add_app_github_hint">Installerar ARM64-AppImagen från repots senaste utgåva, eller dess x86_64-variant via FEX.</string> + <string name="app_fex_title">Använd FEX</string> + <string name="app_fex_auto">Auto</string> + <string name="app_fex_on">På</string> + <string name="app_fex_off">Av</string> + <string name="app_fex_hint">FEX kör Linux-program för x86 på den här ARM64-enheten. Auto använder det när programmet är byggt för x86.</string> + <string name="app_fex_x86">%1$s via FEX</string> + <string name="app_fex_not_ready">Programmet är byggt för %1$s-datorer och körs via FEX, som inte har konfigurerats än. Öppna Steam en gång medan du är inloggad: DroidDeck låter Steam ladda ned FEX och den Steam Linux Runtime som behövs, sedan öppnas detta.</string> + <string name="session_end_program">Det här programmet</string> + <string name="session_end_fex_missing">%1$s är byggt för x86-datorer och körs via FEX, som inte är installerat än. Starta Steam en gång medan du är inloggad och låt det ladda ned FEX och Steam Linux Runtime. Starta sedan detta igen.</string> + <string name="add_app_flatpak_hint">Ett app-ID från Flathub eller appens Flathub-sida. Flatpak konfigureras först om det inte redan är gjort.</string> + <string name="add_app_file">Fil</string> + <string name="add_app_no_file">Ingen fil vald</string> + <string name="add_app_choose_file">Välj fil</string> + <string name="add_app_change_file">Ändra</string> + <string name="add_app_pick_script">Välj ett skript</string> + <string name="add_app_pick_appimage">Välj en AppImage</string> + <string name="add_app_pick_icon">Välj en ikon</string> + <string name="add_app_repository">Repo</string> + <string name="add_app_repository_placeholder">ägare/repo eller en github.com-länk</string> + <string name="add_app_repository_invalid">Inte ett GitHub-repo</string> + <string name="add_app_flatpak_id">App-ID</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Inte ett app-ID från Flathub</string> + <string name="add_app_flatpak_bundle_hint">Eller en .flatpak-fil, för en app som inte finns på Flathub.</string> + <string name="add_app_pick_flatpak">Välj en .flatpak-fil</string> + <string name="add_app_source">Källa</string> + <string name="add_app_appearance">På ditt skrivbord</string> + <string name="add_app_preview_name">Ny app</string> + <string name="add_app_name">Namn</string> + <string name="add_app_name_placeholder">Från appen</string> + <string name="add_app_icon">Ikon</string> + <string name="add_app_icon_default">Standardikon</string> + <string name="add_app_choose_icon">Välj ikon</string> + <string name="add_app_clear_icon">Rensa</string> + <string name="add_app_icon_suggestions">Från repot</string> + <string name="add_app_icon_searching">Söker efter ikoner…</string> + <string name="add_app_icon_reset">Standard</string> + <string name="edit_app_title">Redigera %1$s</string> + <string name="edit_app_save">Spara</string> + <string name="add_app_checking_folder">Kontrollerar mappen…</string> + <string name="add_app_folder_linked">Mappen länkas in i sessionen: %1$s</string> + <string name="add_app_folder_copied">Mappen innehåller Linux-program, som inte kan köras från delad lagring, så den kopieras till DroidDeck (%1$s).</string> + <string name="add_app_confirm">Lägg till</string> + <string name="add_app_cancel">Avbryt</string> + <string name="add_app_runtime_required">Installera Linux-körmiljön från Konfiguration först.</string> + <string name="add_app_busy">Vänta tills %1$s är klart.</string> + <string name="steam_compat_label">Kompatibel</string> + <string name="proton_compatible_note">Versioner märkta ”%1$s” i Steams kompatibilitetsmeny har DroidDecks prefixkorrigeringar och startar spel här. Standard är Proton Experimental ARM64 (%1$s), eller Proton 11.0 ARM64 (%1$s) när den nyare versionen är installerad. Valves egna Proton-poster utan märkningen kan inte starta spel på den här enheten.</string> + <string name="proton_installed_compatible">Installerad %1$s · %2$s</string> + <string name="common_cancel">Avbryt</string> + <string name="common_auto">Auto</string> + <string name="common_never">Aldrig</string> + <string name="common_always">Alltid</string> + <string name="common_uninstall">Avinstallera</string> + <string name="common_check">Kontrollera</string> + <string name="common_update">Uppdatera</string> + <string name="common_checking">Kontrollerar…</string> + <string name="common_working">Arbetar…</string> + <string name="common_forget">Glöm</string> + <string name="common_add_ellipsis">Lägg till…</string> + <string name="common_use">Använd</string> + <string name="common_applies_next_session">Gäller från nästa session.</string> + <string name="mode_steam_title">Steam-session</string> + <string name="mode_desktop_title">Skrivbordssession</string> + <string name="mode_display">Skärm</string> + <string name="mode_resolution">Upplösning</string> + <string name="mode_res_720">Upp till 720p</string> + <string name="mode_res_900">Upp till 900p</string> + <string name="mode_res_1080">Upp till 1080p</string> + <string name="mode_res_native">Inbyggd</string> + <string name="mode_res_default">%1$s (standard)</string> + <string name="mode_res_custom_value">Anpassad · %1$d×%2$d</string> + <string name="mode_res_custom">Anpassad…</string> + <string name="mode_res_note">720p kan få menyer att reagera snabbare.</string> + <string name="mode_ratio">Bildförhållande</string> + <string name="mode_ratio_custom">Bestäms av den anpassade upplösningen.</string> + <string name="mode_ratio_auto">Auto använder minst 16:9.</string> + <string name="mode_fps">Bildgräns</string> + <string name="mode_fps_note">Begränsar hela sessionen. Skärmen byter till en uppdateringsfrekvens som är en jämn multipel av gränsen.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10-utgång</string> + <string name="mode_hdr_unavailable">Inte tillgängligt: %1$s.</string> + <string name="mode_hdr_restart">Starta om appen för att tillämpa.</string> + <string name="mode_drivers">Drivrutiner</string> + <string name="mode_gpu_drivers">GPU-drivrutiner</string> + <string name="mode_gpu_drivers_hint">Delas av Steam och skrivbordet. Ställs in på sidan Komponenter.</string> + <string name="mode_touch_controls">Pekskärm & kontroller</string> + <string name="mode_touch">Pekskärm</string> + <string name="mode_touch_touchpad">Pekplatta</string> + <string name="mode_touch_direct">Direkt</string> + <string name="mode_touch_note">Auto: pekplatta på skrivbordet, direkt i Steam.</string> + <string name="mode_osc">Skärmkontroller</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Auto visar kontrollerna när ingen handkontroll är ansluten.</string> + <string name="osc_steam_touch">Steam-pekstyrning (beta)</string> + <string name="osc_style_next_session">Steams pekstyrning startar med nästa Steam-session</string> + <string name="osc_steam_layout">Steams peklayout</string> + <string name="osc_steam_layout_hint">Flytta, ändra storlek på eller dölj spelets pekkontroller; sparas i Steam</string> + <string name="mode_controller">Handkontroll</string> + <string name="mode_controller_hint">Hur Steam ser din handkontroll. Gäller från nästa session.</string> + <string name="mode_controller_deck">Steam Deck-kontroll</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Xbox 360-kontroll</string> + <string name="mode_controller_note">Deck: snabbåtkomstknappen och gyro. Steam Controller: samma, med greppkänsla på bakknapparna. DualShock 4 och DualSense: gyro, och styrplattorna som deras pekplatta. Xbox 360: öppna snabbåtkomst med Guide+A.</string> + <string name="mode_back">Back</string> + <string name="back_menu_then_qam">Meny → QAM</string> + <string name="back_qam_then_menu">QAM → Meny</string> + <string name="mode_session">Session</string> + <string name="mode_suspend">Bakgrundsbeteende</string> + <string name="mode_suspend_hint">När appen är dold eller skärmen stängs av.</string> + <string name="mode_suspend_manual">Manuell</string> + <string name="mode_suspend_native">Inbyggd</string> + <string name="mode_suspend_steam_note">Auto pausar och återupptar när den visas. Inbyggd förbereder Steam för vila först. Manuell väntar på Återuppta. Aldrig fortsätter köra.</string> + <string name="mode_background_downloads">Håll nedladdningar igång</string> + <string name="mode_background_downloads_hint">Skjut upp bakgrundspausning medan Steam aktivt laddar ned.</string> + <string name="mode_zram">zRAM-komprimering</string> + <string name="mode_zram_hint">Medan ett spel körs komprimeras Steam-klientens minne till enhetens zram så att spelet får mer RAM. Gäller nästa gång Steam startar.</string> + <string name="mode_zram_unsupported">Inte tillgängligt: enheten har ingen zram eller swap, eller så är kärnan äldre än 5.4.</string> + <string name="mode_suspend_note">Auto pausar i bakgrunden och återupptar när den visas. Manuell väntar på Återuppta. Aldrig fortsätter köra.</string> + <string name="mode_startup">Uppstart</string> + <string name="mode_steam_startup">Starta Steam med DroidDeck</string> + <string name="mode_steam_startup_hint">Öppnar Steam-sessionen när DroidDeck startar.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Söker efter utgåvor…</string> + <string name="mode_decky_ready">Redo att installera %1$s.</string> + <string name="mode_decky_none">Inget kompatibelt bygge hittades. Försök igen senare.</string> + <string name="mode_decky_installed">Installerad · %1$s</string> + <string name="mode_decky_update">Uppdatering tillgänglig · %1$s</string> + <string name="mode_decky_current">Senaste versionen · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Installera senaste</string> + <string name="mode_decky_on">Startar med Steam. Medan det är på kan andra appar på enheten eventuellt styra Steam.</string> + <string name="mode_decky_off">Av. Steams fjärrfelsökningsport förblir stängd.</string> + <string name="mode_decky_remove_title">Avinstallera Decky Loader?</string> + <string name="mode_decky_remove_text">Tar bort inläsaren. Dina tillägg och inställningar behålls.</string> + <string name="mode_client">Klient</string> + <string name="mode_mangoapp">Prestandaöverlägg</string> + <string name="mode_mangoapp_hint">Stäng av om spel kraschar eller blir svarta i Deck-läge. Gäller från nästa session.</string> + <string name="mode_steam_repair">Reparera Steam-klienten</string> + <string name="mode_steam_repair_hint">Laddar ned Steam-klienten igen nästa gång Steam startar. Använd det om Steam fastnar på sin inläsningsskärm. Spel, inloggning och inställningar behålls.</string> + <string name="mode_steam_repair_queued">Steam-klienten laddas ned igen nästa gång Steam startar.</string> + <string name="mode_steam_repair_button">Reparera</string> + <string name="mode_added_art">Grafik</string> + <string name="mode_sgdb_key">SteamGridDB API-nyckel</string> + <string name="mode_sgdb_key_yours">Din nyckel</string> + <string name="mode_sgdb_edit">Redigera…</string> + <string name="mode_added_art_hint">Fyller i saknad grafik från Steam, sedan SteamGridDB. Din egen cover.jpg, hero.jpg, logo.png eller icon.png i spelmappen har företräde.</string> + <string name="summary_remove_game">Ta bort %1$s</string> + <string name="mode_added_remove_confirm">Ta bort?</string> + <string name="games_add">Lägg till spel</string> + <string name="games_add_title">Lägg till ett spel:</string> + <string name="games_pick_exe_title">Välj exe-filen:</string> + <string name="games_add_unreachable">Den här platsen är inte tillgänglig i sessionen</string> + <string name="mode_added_exe_check">Kontrollera den här exe-filen</string> + <string name="wincomp_title">Windows-komponenter</string> + <string name="wincomp_pad_hint">LB/RB hoppar mellan avsnitten.</string> + <string name="wincomp_card_none">Ingen</string> + <string name="wincomp_applies">Windows-DLL:er som Proton inte innehåller, från komponentlistan. Slå på de som det här spelet behöver: de hamnar i spelets egen Windows-mapp, aldrig bland dess filer, och finns kvar oavsett vilken Proton det körs på.</string> + <string name="wincomp_offline">Kunde inte nå komponentlistan. Komponenter som redan laddats ned kan fortfarande växlas.</string> + <string name="wincomp_recommended">Rekommenderas för det här spelet</string> + <string name="wincomp_checking">Kontrollerar vad det här spelet behöver…</string> + <string name="wincomp_when_online">Tillgängligt när du är uppkopplad</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Slår på %1$d komponent…</item> + <item quantity="other">Slår på %1$d komponenter…</item> + </plurals> + <string name="wincomp_auto_section">På för det här spelet</string> + <string name="wincomp_auto_steam">Steam installerar %1$s med %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">Från GOG:s lista för det här spelet</string> + <string name="wincomp_auto_epic">Från Epics förutsättningar för det här spelet</string> + <string name="wincomp_auto_amazon">Från Amazons installationssteg för det här spelet</string> + <string name="wincomp_steam_by_name">Steam installerar %1$s med app %2$s, matchad på namn</string> + <string name="wincomp_suggestions">Listas även</string> + <string name="wincomp_suggestion_reason">Listad av %1$s; inte en komponent här</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Spelet levereras med %1$s</string> + <string name="wincomp_found_shipped">Spelet har %1$s (fungerar ofta som det är)</string> + <string name="wincomp_already_here">Redan i det här spelet</string> + <string name="wincomp_no_recommendation">Inget i spelets mapp pekar på en komponent.</string> + <string name="wincomp_active">Installerade för det här spelet (%1$d)</string> + <string name="wincomp_all">Alla komponenter (%1$d)</string> + <string name="wincomp_installers">Behöver ett Windows-installationsprogram (%1$d)</string> + <string name="wincomp_installers_note">Dessa är egna installationsprogram utan något paket inuti att plocka isär, och det finns ännu ingen uppteckning av vad de installerar. De flesta är gamla körmiljöer som Mono inuti Proton redan ersätter; uppteckningar läggs till när de görs.</string> + <string name="wincomp_show">Visa</string> + <string name="wincomp_hide">Dölj</string> + <string name="wincomp_needs_installer">Körs med sitt eget installationsprogram (ingen uppteckning än)</string> + <string name="wincomp_unsupported">Stöds inte här än</string> + <string name="wincomp_loading">Läser in komponenterna…</string> + <string name="wincomp_failed">Kunde inte installera: %1$s</string> + <string name="wincomp_downloaded">Nedladdad</string> + <string name="wincomp_downloading">Laddar ned %1$s</string> + <string name="wincomp_installing">Installerar: %1$s</string> + <string name="wincomp_reverting">Stänger av…</string> + <string name="wincomp_download_size">%1$s nedladdning</string> + <string name="wincomp_next_launch">Börjar gälla nästa gång spelet startar.</string> + <string name="mode_stretch169">Sträck ut 16:9-spel</string> + <string name="mode_stretch169_hint">På skärmar som är fyrkantigare än 16:9 sträcks spel ut för att fylla skärmen i stället för att visa svarta ränder. Gäller från nästa session.</string> + <string name="mode_audio">Ljud</string> + <string name="mode_directaudio">DirectAudio för spel</string> + <string name="mode_directaudio_hint">Kringgår PulseAudio för lägre latens.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">För röstchatt.</string> + <string name="mode_network">Nätverk</string> + <string name="mode_wifi_discovery">Wi-Fi-identifiering</string> + <string name="mode_wifi_discovery_hint">Visa Wi-Fi-namn och nätverk i närheten i Steam.</string> + <string name="mode_wifi_location_off">Platstjänster är av.</string> + <string name="mode_wifi_permission_denied">Platsbehörighet har inte beviljats.</string> + <string name="mode_wifi_open_settings">Öppna inställningar</string> + <string name="mode_wifi_continue">Fortsätt</string> + <string name="mode_wifi_explain_title">Aktivera Wi-Fi-identifiering?</string> + <string name="mode_wifi_explain_text">Android kräver platsbehörighet för att läsa Wi-Fi-namn och upptäcka nätverk i närheten. DroidDeck använder den här åtkomsten för att visa dessa nätverk i Steam. Vi spårar inte din plats. Internetåtkomst fungerar utan den här behörigheten.</string> + <string name="mode_storage">Spellagring</string> + <string name="mode_storage_auto">Automatiskt – SD-kortet när det finns, plus dina Games-mappar</string> + <string name="mode_storage_auto_none">Automatiskt – dina Games-mappar, plus SD-kortet när det finns (inget nu)</string> + <string name="mode_storage_internal">Endast internt</string> + <string name="mode_storage_folder">Mapp: %1$s</string> + <string name="mode_second_library">Andra biblioteket</string> + <string name="mode_storage_note">Spel som strömmar tillgångar från SD-kortet eller delad lagring kan hacka.</string> + <string name="mode_storage_diagnostics">Lagringsdiagnostik</string> + <string name="mode_storage_diagnostics_hint">Registrerar allokeringsresultat och uppmätta lagringstider i Dela loggar. Kan göra installationer långsammare medan funktionen är aktiverad. Gäller från nästa session.</string> + <string name="mode_choose_folder">Välj en mapp…</string> + <string name="mode_custom_res_title">Anpassad upplösning</string> + <string name="mode_custom_res_text">Ersätter gränsen och bildförhållandet. En storlek som inte matchar skärmen får ränder.</string> + <string name="mode_width">Bredd</string> + <string name="mode_height">Höjd</string> + <string name="mode_custom_res_range">Mellan 320×240 och 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d spel</item> + <item quantity="other">%1$d spel</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Ta bort</string> + <string name="common_restore">Återställ</string> + <string name="common_download">Ladda ned</string> + <string name="common_delete_named">Ta bort %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Körmiljödrivrutin</string> + <string name="comp_runtime_driver_hint">Används av Steam, spel och skrivbordet. Gäller från nästa session.</string> + <string name="comp_import_turnip">Importera Turnip-zip…</string> + <string name="comp_display_driver">Skärmdrivrutin</string> + <string name="comp_display_driver_hint">Ritar bildrutor på skärmen i båda lägena. Starta om appen för att verkställa.</string> + <string name="comp_import_adrenotools">Importera en AdrenoTools-zip…</string> + <string name="comp_never">aldrig</string> + <string name="comp_nightlies_checked">Nattbyggena kontrollerade %1$s</string> + <string name="comp_title">Komponenter</string> + <string name="comp_about">Om komponenter</string> + <string name="comp_check_drivers">Sök efter nya drivrutiner</string> + <string name="comp_check_nightlies">Sök i nattbyggena efter nya paket</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Den Proton som väljs här kör varje spel som inte har valt sin egen i Steam, och en ändring som görs i Steam visas även här. Steam ersätter Valves Proton när den uppdateras; originalen behålls för varje bygge.</string> + <string name="comp_scope">Konfiguration</string> + <string name="comp_profile_configure">Konfigurera profil</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Standardprofil</string> + <string name="comp_scope_general_detail">Används automatiskt av spel utan åsidosättningar.</string> + <string name="comp_profile_game_detail">Sparade inställningar som används automatiskt när %1$s startar.</string> + <string name="comp_game_hint">Välj bara de inställningar det här spelet behöver. Allt annat fortsätter att använda standardprofilen.</string> + <string name="comp_game_fex">FEX-förinställning</string> + <string name="comp_game_fex_inherited">Använder standardprofilens förinställning.</string> + <string name="comp_game_fex_override">Anpassad förinställning sparad för det här spelet.</string> + <string name="comp_game_fex_custom">Anpassade FEX-variabler</string> + <string name="comp_game_use_general">Använd standard</string> + <string name="comp_game_compatibility">Spelkompatibilitet</string> + <string name="comp_game_environment_hint">Miljöalternativ för Proton, DXVK, VKD3D och synkronisering för det här spelet.</string> + <string name="comp_game_proton_inherited">Använder standardprofilens Proton.</string> + <string name="comp_game_proton_override">Anpassad Proton sparad för det här spelet via Steams kompatibilitetsmappning.</string> + <string name="comp_no_proton_short">Ingen Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Använder standardprofilens paket från %1$s om inte det här spelet väljer ett annat paket.</string> + <string name="comp_game_component_general">Använder standardprofilens komponentpaket.</string> + <string name="comp_game_component_override">Använder %1$s bara för det här spelet.</string> + <string name="comp_game_runtime_options">Körmiljöalternativ</string> + <string name="comp_game_environment_other_hint">Övriga miljöalternativ per spel för Proton, DXVK, VKD3D-Proton och synkronisering.</string> + <string name="comp_game_saved_next">%1$s:s profil är sparad för nästa spelstart.</string> + <string name="game_no_steam_title">Starta utan Steam</string> + <string name="game_no_steam_detail">Öppnar det i Proton/FEX utan Steam-klienten; Steam-funktioner är av.</string> + <string name="game_no_steam_on">På</string> + <string name="game_steam_with">Startar med Steam</string> + <string name="game_steam_without">Startar utan Steam</string> + <string name="game_settings_card">Inställningar</string> + <string name="game_settings_menu_title">Inställningar för %1$s</string> + <string name="game_settings_default">Standard</string> + <string name="game_settings_default_detail">Återställer allt som ändrats för det här spelet till appens inställningar.</string> + <string name="game_sync_custom">Anpassade synkvariabler</string> + <string name="comp_game_proton_live">%1$s:s Proton-val är sparat och tillgängligt i Steam nu.</string> + <string name="comp_game_proton_next">%1$s:s Proton-val är sparat. Starta om Steam innan du startar spelet.</string> + <string name="comp_game_proton_not_runnable">%1$s kan inte använda den valda Proton på den här enheten.</string> + <string name="comp_game_load_failed">Kunde inte läsa in %1$s:s profil: %2$s</string> + <string name="comp_game_save_failed">Spelprofilen kunde inte sparas: %1$s</string> + <string name="comp_game_reset">Återställ spelprofil</string> + <string name="comp_game_reset_title">Återställ %1$s:s profil?</string> + <string name="comp_game_reset_body">Ta bort det här spelets Proton, FEX, komponentpaket, miljö, texturfiltrering och Windows-komponentåsidosättningar? Det kommer att använda standardprofilen.</string> + <string name="comp_game_reset_done">%1$s använder nu standardprofilen.</string> + <string name="comp_game_reset_failed">Spelprofilen kunde inte återställas helt: %1$s</string> + <string name="comp_default_live">%1$s körs nu för varje spel som inte har valt sin egen Proton i Steam.</string> + <string name="comp_default_next">%1$s kommer att köras för varje spel som inte har valt sin egen Proton, från nästa gång Steam startar.</string> + <string name="comp_default_not_runnable">%1$s kan inte starta spel här och kan därför inte vara standard.</string> + <string name="comp_default_failed">Standard-Proton kunde inte sparas: %1$s</string> + <string name="comp_swapped">%1$s · %2$d utbytta</string> + <string name="comp_all_original">%1$s · allt är original</string> + <string name="comp_game_running_suffix">%1$s · spel körs</string> + <string name="comp_esync_pack">%1$s · droiddeck-esync-paket</string> + <string name="comp_esync_wanted">%1$s · inget droiddeck-esync-paket än</string> + <string name="comp_esync_builtin">%1$s · esync inbyggt, inget paket behövs</string> + <string name="comp_gpu_drivers">GPU-drivrutiner</string> + <string name="comp_reapplied">%1$s · återapplicerad vid start %2$s</string> + <string name="comp_next_queued">Nästa: %1$s · efter att spelet stängs</string> + <string name="comp_in_use">%1$s används: %2$s</string> + <string name="comp_waits">Väntar tills spelet stängs</string> + <string name="comp_applies_next_game">Gäller nästa gång ett spel startar</string> + <string name="comp_import_zip">Importera .zip</string> + <string name="comp_reading">Läser in Proton-versioner…</string> + <string name="comp_no_proton">Ingen Proton installerad än. Starta Steam en gång för att ladda ned dess ARM64-Proton, eller lägg till GE-Proton, CachyOS eller DroidDeck-Proton från Konfiguration.</string> + <string name="comp_original">Original · %1$s</string> + <string name="comp_this_build">%1$s · det här bygget</string> + <string name="comp_earlier_build">%1$s · tidigare bygge</string> + <string name="comp_installed_count">Installerade · %1$d</string> + <string name="comp_nothing_stored">Inget sparat för %1$s än. Den här Protonens egna filer sparas som dess original.</string> + <string name="comp_waits_long">Ett spel körs på den här Proton, så detta väntar tills det stängs.</string> + <string name="comp_applies_long">Gäller nästa gång ett spel startar.</string> + <string name="comp_swap_title">Byt ut %1$s?</string> + <string name="comp_swap_body">Lägg %1$s i %2$s? De ursprungliga filerna förblir sparade. %3$s</string> + <string name="comp_restore_title">Återställ %1$s?</string> + <string name="comp_restore_body">Lägg tillbaka originalet av %1$s i %2$s? %3$s</string> + <string name="comp_delete_package_body">Tar bort paketet från appen. Du kan ladda ned det igen.</string> + <string name="comp_delete_original_title">Ta bort det här originalet?</string> + <string name="comp_delete_original_body">Det här originalet av %1$s är från ett tidigare bygge av %2$s. Originalet från det aktuella bygget behålls alltid.</string> + <string name="comp_nightlies_count">I nattbyggena · %1$d</string> + <string name="comp_refresh_to_list">Uppdatera för att lista paket i nattbyggena.</string> + <string name="comp_nothing_new">Inget nytt sedan senaste kontrollen.</string> + <string name="comp_import_wcp">Importera .wcp</string> + <string name="comp_restore_original">Återställ den här Protonens original</string> + <string name="comp_restore_original_body">Lägg tillbaka %1$s:s original %2$s?</string> + <string name="comp_swap">Byt</string> + <string name="comp_about_text">FEX, DXVK och VKD3D-Proton för varje Proton som Steam kör spel med.\n\nVälj en installerad rad för att byta till den. Det börjar gälla nästa gång ett spel startar, eller efter att det körande spelet stängs.\n\nDina val kontrolleras igen före varje start och återställs om något har ändrat dem. Varje Protons originalfiler behålls, så Steam-uppdateringar förlorar dem aldrig.</string> + <string name="comp_tag_original">Original</string> + <string name="comp_tag_in_use">I bruk</string> + <string name="comp_tag_new">Ny</string> + <string name="comp_tag_stored">Sparad</string> + <string name="perf_title">Prestanda</string> + <string name="perf_lede">CPU-kärnor, sessionsfixar och värdnamnet. Gäller från nästa session.</string> + <string name="perf_client_cores_group">Steam-klientens kärnor</string> + <string name="perf_override">Åsidosätt Steams kärnval</string> + <string name="perf_override_hint">Fäster Steam, dess UI-hjälpprocess och gamescope vid kärnorna nedan.</string> + <string name="perf_client_cores">Klientkärnor</string> + <string name="perf_client_cores_on">Kärnor för Steam.</string> + <string name="perf_client_cores_off">Slå på åsidosättningen för att välja.</string> + <string name="perf_game_cores_group">Spelkärnor</string> + <string name="perf_game_cores">Spelkärnor</string> + <string name="perf_game_cores_hint">Kärnor för spel. Med alla valda schemalägger Android fritt.</string> + <string name="perf_client_ui">Klientgränssnitt</string> + <string name="perf_glthread">Trådad GL</string> + <string name="perf_glthread_hint">Kan göra Steams menyer mer responsiva.</string> + <string name="perf_zink">Zink: lata deskriptorer</string> + <string name="perf_zink_hint">Rekommenderas för drivrutiner utan deskriptorbuffertar.</string> + <string name="perf_noglerror">Hoppa över GL-felkontroller</string> + <string name="perf_noglerror_hint">Stänger av GL-validering per anrop.</string> + <string name="perf_gsrealtime">gamescope: GPU-kö i realtid</string> + <string name="perf_gsrealtime_hint">Prioriterar kompositorns GPU-arbete. Kan jämna ut bildtakten till viss kostnad för spelen.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Håll GPU:n på dess högsta klockfrekvens</string> + <string name="perf_gpuclock_hint">Bara Adreno. Färre hack, högre batteriförbrukning och mer värme.</string> + <string name="perf_fixes">Sessionsfixar</string> + <string name="perf_sysmem">Turnip: sysmem-rendering</string> + <string name="perf_sysmem_hint">Snabbare för Steam och de flesta spel. Krävs på Adreno 710/720/722.</string> + <string name="perf_xalia">Hoppa över Steams xalia-hjälp</string> + <string name="perf_fastsync">droiddeck-ntsync (experimentell)</string> + <string name="perf_fastsync_hint">En ersättning i användarutrymmet för Linux ntsync-drivrutinen, för testning. Medan det är på använder Proton det i stället för droiddeck-esync och droiddeck-fsync. Fungerar med Proton Experimental ARM64, GE-Proton och proton-cachyos. Gäller från nästa session.</string> + <string name="perf_esync">droiddeck-esync</string> + <string name="perf_fsync">droiddeck-fsync först</string> + <string name="perf_fsync_hint">Kör Protons egen fsync på de ursprungliga Proton-filerna, med futex_waitv tillhandahållen i användarutrymmet, så det behöver inget paket och fortsätter fungera så snart Steam uppdaterar Proton. Medan det är på använder spel det före droiddeck-esync, förutom de få som Proton håller borta från fsync. Gäller från nästa session.</string> + <string name="perf_esync_hint">Spelens Windows-trådar väntar på varandra via eventfd och delat minne i stället för tur-och-returer genom wineserver. Använder ett droiddeck-esync-paket som är gjort för exakt det Proton-bygget; paket hämtas automatiskt. Tills ett sådant finns för ett nytt Proton-bygge används droiddeck-fsync i stället. Gäller från nästa session.</string> + <string name="perf_xalia_hint">Inaktiverar Protons hjälp för handkontrollsnavigering, vilket kostar CPU i alla spel.</string> + <string name="perf_seccomp">Kör proot utan seccomp</string> + <string name="perf_seccomp_hint">Kan åtgärda fel med saknade systemanrop på vissa Linux-kärnor. Kan minska prestandan.</string> + <string name="perf_fastpath">proot snabbväg</string> + <string name="perf_fastpath_needs_seccomp">Kräver proots seccomp-filter.</string> + <string name="perf_fastpath_hint">Snabbare filuppslagningar och mindre hack. Stäng av om ett program inte hittar sina filer.</string> + <string name="perf_identity">Sessionsidentitet</string> + <string name="perf_hostname">Värdnamn</string> + <string name="perf_hostname_hint">Namnet Steam ser för den här enheten. Lämna tomt för att återställa till %1$s.</string> + <string name="perf_hostname_invalid">Endast bokstäver, siffror och bindestreck inuti, upp till 63 tecken.</string> + <string name="perf_phantom_warning">Android är inställt på att avsluta den här sessionen</string> + <string name="driver_installed">Installerad</string> + <string name="driver_available">Tillgänglig att ladda ned</string> + <string name="driver_nothing_new">Inget nytt sedan senaste kontrollen.</string> + <string name="driver_restore_builtin">Återställ inbyggda drivrutiner</string> + <string name="driver_delete_builtin">Inbyggd i appen: detta tar bort dess uppackade filer och döljer den. Återställ inbyggda drivrutiner tar tillbaka den.</string> + <string name="driver_delete_bundle">Hälften av ett Android + Linux-paket: båda halvorna tas bort. En drivrutin som används faller tillbaka till standard.</string> + <string name="driver_delete_plain">Dess filer tas bort från appen.</string> + <string name="driver_delete_in_use">Dess filer tas bort. Den används, så standarden tar över.</string> + <string name="drawer_page_display">Skärm</string> + <string name="drawer_page_effects">Effekter</string> + <string name="drawer_page_controls">Kontroller</string> + <string name="drawer_page_components">Komponenter</string> + <string name="drawer_page_controller">Handkontroll</string> + <string name="drawer_page_settings">Inställningar</string> + <string name="drawer_page_desc">%1$s-sidan</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Skrivbord</string> + <string name="drawer_steam_menu">Steam-meny</string> + <string name="drawer_quick_access">Snabbåtkomst</string> + <string name="drawer_open_qam">Öppna snabbåtkomstmenyn</string> + <string name="drawer_prev_page">Föregående sida</string> + <string name="drawer_next_page">Nästa sida</string> + <string name="drawer_hud">Prestanda-HUD</string> + <string name="drawer_scaling">Skalningsläge</string> + <string name="drawer_scaling_sharpness">Skalningsskärpa</string> + <string name="drawer_effects">Skärmeffekter</string> + <string name="drawer_effects_hint">Live. Kostar lite GPU-tid medan någon effekt är på.</string> + <string name="drawer_look">Förinställningar</string> + <string name="drawer_look_custom">Anpassad</string> + <string name="drawer_effects_advanced">Avancerat</string> + <string name="widgets_expanded">Expanderad</string> + <string name="widgets_collapsed">Hopfälld</string> + <string name="drawer_cas">Skärpning (CAS)</string> + <string name="drawer_cas_level">Skärpningsnivå</string> + <string name="drawer_fake_hdr">Falsk HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Starta SteamVR</string> + <string name="steamvr_checking">Kontrollerar SteamVR…</string> + <string name="drawer_deband">Avbandning</string> + <string name="drawer_deband_strength">Avbandningsstyrka</string> + <string name="drawer_brightness">Ljusstyrka</string> + <string name="drawer_contrast">Kontrast</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Mättnad</string> + <string name="drawer_fxaa">FXAA (kantutjämning)</string> + <string name="drawer_toon">Toon-konturer</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Texturfiltrering</string> + <string name="drawer_texture_hint">DirectX 9–11-spel, från nästa start.</string> + <string name="drawer_anisotropy">Anisotropisk filtrering</string> + <string name="drawer_texture_sharpness">Texturskärpa</string> + <string name="drawer_texture_sharpness_note">En negativ mip-bias: skarpare texturer, lite skimmer. Auto matchar hur mycket sessionen förstoras till skärmen.</string> + <string name="drawer_touch_auto">Auto (%1$s)</string> + <string name="drawer_keyboard">Tangentbord</string> + <string name="drawer_latency">Latens</string> + <string name="drawer_low_latency_controller">Handkontroll med låg latens</string> + <string name="drawer_low_latency_controller_hint">Handkontrollen rapporterar i 1000 Hz i stället för 250 Hz. Något mer CPU.</string> + <string name="drawer_low_latency_touch">Pekning med låg latens</string> + <string name="drawer_low_latency_touch_hint">Pekningar hoppar över bildrutebatchning; Steams pekstyrning går i 1000 Hz. Något mer CPU.</string> + <string name="drawer_pc_keyboard">PC-tangentbord</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Andra skärmen</string> + <string name="drawer_second_screen_mode">Läge</string> + <string name="drawer_second_screen_shows">Visar</string> + <string name="drawer_android_apps">Android-appar</string> + <string name="drawer_launch_app">Starta en app</string> + <string name="common_hide">Dölj</string> + <string name="common_show">Visa</string> + <string name="drawer_no_apps">Inga startbara appar</string> + <string name="drawer_session_behavior">Sessionsbeteende</string> + <string name="drawer_suspend_hint">Gäller nu och för framtida sessioner i det här läget.</string> + <string name="drawer_next_session">Nästa session</string> + <string name="drawer_support">Support</string> + <string name="drawer_logs">Sessionsloggar</string> + <string name="drawer_logs_hint">Bifoga till en felrapport</string> + <string name="drawer_share_logs">Dela loggar</string> + <string name="drawer_background">Bakgrund</string> + <string name="drawer_stop">Stoppa</string> + <string name="drawer_stop_title">Stoppa sessionen?</string> + <string name="drawer_running_now">Körs nu</string> + <string name="drawer_no_game">Inget spel körs på en Proton</string> + <string name="drawer_selected_profile">Spelprofil</string> + <string name="drawer_selected_profile_none">Profildetaljer är inte tillgängliga än.</string> + <string name="drawer_profile_refresh_failed_initial">Kunde inte läsa in spelprofiler. Försöker igen automatiskt.</string> + <string name="drawer_profile_refresh_failed_stale">Kunde inte uppdatera spelprofiler. Visar senast tillgängliga data; försöker igen automatiskt.</string> + <string name="drawer_profile_inspect_hint">Visa och redigera de sparade inställningarna som används vid nästa start.</string> + <string name="drawer_profile_default">Använder standardprofilen</string> + <string name="drawer_profile_custom">Anpassad profil</string> + <string name="drawer_component_inherited">Använder %1$s från standardprofilen.</string> + <string name="drawer_game_components_note">Ändringar sparas i %1$s:s profil och gäller nästa gång spelet startar.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d spelåsidosättning</item> + <item quantity="other">%1$d spelåsidosättningar</item> + </plurals> + <string name="drawer_no_proton">Ingen Proton är installerad än.</string> + <string name="drawer_game_running">spel körs</string> + <string name="drawer_reapplied">återapplicerad vid start %1$s</string> + <string name="drawer_original">Original</string> + <string name="drawer_components_note">Importera och ta bort på sidan Komponenter.</string> + <string name="setup_check_done">Klart</string> + <string name="setup_check_warn">Behöver åtgärdas</string> + <string name="setup_check_busy">Arbetar</string> + <string name="setup_limit_adb_failed">Kontrollera IP-adressen och porten för Trådlös felsökning, eller para ihop enheten igen om Android tog bort den.</string> + <string name="setup_install">Installera</string> + <string name="setup_manage">Hantera</string> + <string name="setup_tab_overview">Översikt</string> + <string name="setup_tab_controller">Handkontroll</string> + <string name="setup_tab_session">Session</string> + <string name="setup_tab_launcher">Startprogram</string> + <string name="setup_title">Konfiguration</string> + <string name="setup_all_set">● Allt klart</string> + <string name="setup_n_ready">%1$d av %2$d klara</string> + <string name="setup_system_check">Systemkontroll</string> + <string name="setup_gpu_supported">Enheten stöds</string> + <string name="setup_gpu_untested">Otestad GPU</string> + <string name="setup_gpu_unsupported">GPU stöds inte</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam behöver en Adreno-drivrutin; %1$s kan visa en svart skärm</string> + <string name="setup_runtime">Linux-körmiljö</string> + <string name="setup_runtime_progress">%1$s · %2$d %%</string> + <string name="setup_runtime_missing">Inte installerad · cirka 3 GB, installeras första gången du trycker på Play</string> + <string name="setup_installed">Installerad</string> + <string name="setup_runtime_update">%1$s · uppdatering tillgänglig</string> + <string name="setup_runtime_current">%1$s · senaste versionen</string> + <string name="setup_limit">Gräns för underprocesser</string> + <string name="setup_limit_on">På · Android kan stänga Steam. Det tar en minut att stänga av den.</string> + <string name="setup_limit_unset">Inte inställd · Android kan stänga Steam. Det tar en minut att stänga av den.</string> + <string name="setup_limit_unknown">Kunde inte kontrolleras · det tar en minut att stänga av den.</string> + <string name="setup_fix_it">Åtgärda</string> + <string name="setup_details">Detaljer</string> + <string name="setup_dev_options">Utvecklaralternativ</string> + <string name="setup_use_wireless">Använd Trådlös felsökning</string> + <string name="setup_check_again">Kontrollera igen</string> + <string name="setup_limit_turn_on">Slå på gränsen</string> + <string name="setup_account">Steam-konto</string> + <string name="setup_signed_in_offline">Inloggad som %1$s · offlineläge</string> + <string name="setup_signed_in">Inloggad som %1$s</string> + <string name="setup_sign_in">Tryck på Play och logga in på Steam</string> + <string name="setup_tools">Verktyg</string> + <string name="setup_controller">Handkontroll</string> + <string name="setup_controller_unavailable">Handkontrollsinställningar är inte tillgängliga.</string> + <string name="setup_session">Session</string> + <string name="setup_logs">Sessionsloggar</string> + <string name="setup_logs_hint">Sparas efter varje session</string> + <string name="setup_agent_commands">Felsökningsverktyg</string> + <string name="setup_latest_logs">Senaste sessionsloggar</string> + <string name="setup_saved_logs">Sparade sessionsloggar</string> + <string name="setup_saved_logs_hint">Behåller de %1$d senaste</string> + <string name="setup_clear_logs">Rensa loggar</string> + <string name="setup_reset_settings">Återställ alla inställningar</string> + <string name="setup_reset_settings_hint">Sätt tillbaka varje inställning till standardvärdet</string> + <string name="setup_reset_settings_button">Återställ</string> + <string name="setup_reset_settings_title">Återställa alla inställningar?</string> + <string name="setup_reset_settings_body">Inställningar för bild, prestanda, handkontroll, tema, språk och startprogram går tillbaka till standard. Dina spel, Steam-inloggningen, butikskonton, hämtade drivrutiner och lagringsmappar finns kvar.</string> + <string name="setup_reset_settings_profiles">Återställ även spelprofiler (Proton, FEX, komponenter och körmiljö per spel, samt körmiljön för Standard-profilen)</string> + <string name="setup_reset_settings_session_running">Stoppa sessionen innan du återställer inställningar.</string> + <string name="setup_reset_settings_partial">Inställningarna återställdes, men inte alla. Detaljerna finns i loggen.</string> + <string name="setup_offline">Offlineläge</string> + <string name="setup_sign_in_first">Logga in på Steam först</string> + <string name="setup_launcher">Startprogram</string> + <string name="setup_language">Språk</string> + <string name="setup_language_hint">Steam använder det också, från nästa gång det startar.</string> + <string name="setup_language_system">Systemstandard (%1$s)</string> + <string name="setup_language_system_short">Systemstandard</string> + <string name="setup_app_scale">Appskala</string> + <string name="setup_app_scale_hint">DroidDecks text och kontroller</string> + <string name="setup_app_scale_default">%1$d %% (Standard)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Startprogrammets utseende</string> + <string name="setup_home">Använd som startskärm</string> + <string name="setup_home_on">DroidDeck kan vara startskärmsappen</string> + <string name="setup_home_off">DroidDeck erbjuds aldrig som startskärmsapp</string> + <string name="setup_orientation">Orientering</string> + <string name="setup_orientation_auto">Automatiskt liggande</string> + <string name="setup_orientation_landscape">Liggande</string> + <string name="setup_orientation_reverse">Liggande, upp och ned</string> + <string name="setup_fullscreen">Helskärm</string> + <string name="setup_fullscreen_on">Döljer Androids statusfält och navigeringsfält</string> + <string name="setup_fullscreen_off">Visar Androids statusfält och navigeringsfält</string> + <string name="setup_default_home">Standardapp för startskärmen</string> + <string name="setup_choose_home">Välj en app för startskärmen</string> + <string name="setup_choose">Välj</string> + <string name="setup_linux_apps">Linux-appar (beta)</string> + <string name="setup_tool_files">Filer</string> + <string name="setup_tool_files_hint">Bläddra och hantera filer</string> + <string name="setup_tool_protons">Proton-versioner</string> + <string name="setup_tool_protons_hint">Installera ARM64-byggen av Proton</string> + <string name="setup_tool_performance">Prestanda</string> + <string name="setup_tool_performance_hint">Tilldelning av CPU-kärnor</string> + <string name="setup_tool_roms">ROM-mapp</string> + <string name="setup_tool_roms_hint">Där emulatorspel lagras</string> + <string name="setup_card_components">Komponenter</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Kontroller</string> + <string name="setup_card_controls_hint">Knappmappning</string> + <string name="store_tab_discover">Upptäck</string> + <string name="store_tab_search">Sök</string> + <string name="store_tab_installed">Installerade</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Butik</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak redo</string> + <string name="store_needs_runtime">Installera Linux-körmiljön från Konfiguration först.</string> + <string name="store_setup_title">Konfigurera Flatpak</string> + <string name="store_setup_text">Lägger till Flatpak och ansluter det till Flathub (cirka 20 MB). Den första appen laddar även ned sin körmiljö.</string> + <string name="store_setting_up">Konfigurerar…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Uppdateringar</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d %%</string> + <string name="store_starting">Startar…</string> + <string name="store_categories">Kategorier</string> + <string name="store_unreachable">Kunde inte nå Flathub. Kontrollera din anslutning och försök igen.</string> + <string name="store_try_again">Försök igen</string> + <string name="store_search_label">Sök på Flathub</string> + <string name="store_search_placeholder">Firefox, spel, emulatorer…</string> + <string name="store_search">Sök</string> + <string name="store_all">Alla</string> + <string name="store_searching">Söker…</string> + <string name="store_search_hint">Sök efter namn eller välj en kategori. Bara ARM64-appar listas.</string> + <string name="store_no_results">Inga ARM64-appar på Flathub matchar det.</string> + <string name="store_results">Resultat</string> + <string name="store_check_updates">Sök efter uppdateringar</string> + <string name="store_update_all">Uppdatera alla (%1$d)</string> + <string name="store_all_current">● Allt är uppdaterat</string> + <string name="store_no_apps">Inga appar än. Hitta några under Upptäck eller Sök.</string> + <string name="store_setup_first_note">Konfigurera Flatpak för att installera appar.</string> + <string name="store_update_available_prefix">Uppdatering tillgänglig · %1$s</string> + <string name="store_open">Öppna</string> + <string name="store_details">Detaljer</string> + <string name="store_remove">Ta bort</string> + <string name="store_press_again">Tryck igen för att ta bort</string> + <string name="store_installing">Installerar…</string> + <string name="store_install">Installera</string> + <string name="store_setup_first">Konfigurera Flatpak först</string> + <string name="store_download_size">%1$s nedladdning</string> + <string name="store_installed_chip">● Installerad</string> + <string name="store_details_failed">Kunde inte läsa in appens Flathub-sida.</string> + <string name="store_loading">Läser in från Flathub…</string> + <string name="store_no_arm">Inget ARM64-bygge på Flathub, så den kan inte installeras här.</string> + <string name="store_screenshots">Skärmbilder</string> + <string name="store_about">Om</string> + <string name="store_app_id">App-ID</string> + <string name="store_license">Licens</string> + <string name="store_runtime">Körmiljö</string> + <string name="store_installed_size">Installerad storlek</string> + <string name="store_installed_size_value">%1$s (plus dess delade körmiljö)</string> + <string name="store_website">Webbplats</string> + <string name="store_verified">Verifierad</string> + <string name="upd_title">Uppdateringar</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Kontrollerad %1$s</string> + <string name="upd_not_checked">Inte kontrollerad än</string> + <string name="upd_perm_title">Låt DroidDeck uppdatera sig själv</string> + <string name="upd_perm_text">På nästa skärm, slå på Tillåt från den här källan och kom sedan tillbaka. Uppdateringen fortsätter själv.</string> + <string name="upd_open_settings">Öppna inställningar</string> + <string name="upd_not_now">Inte nu</string> + <string name="upd_signed_status">Signerad annorlunda</string> + <string name="upd_signed_headline">Kan inte uppdateras på plats</string> + <string name="upd_signed_detail">Den här kopian är inte signerad med DroidDecks utgivningsnyckel, så uppdateringar kan inte installeras över den. Avinstallera den för att byta.</string> + <string name="upd_available">Uppdatering tillgänglig</string> + <string name="upd_blocked_status">Kan inte installeras</string> + <string name="upd_switch">Redo att byta</string> + <string name="upd_ahead_status">Före Stabil</string> + <string name="upd_ahead_headline">Du ligger före Stabil</string> + <string name="upd_ahead_detail">Det här bygget är nyare än senaste Stabil. Du flyttas till Stabil vid dess nästa utgåva.</string> + <string name="upd_gone_status">Test avslutat</string> + <string name="upd_gone_headline">Det här testet har avslutats</string> + <string name="upd_gone_detail">Dess fix har slagits samman eller slopats. Följ Förhandsversion för de senaste fixarna.</string> + <string name="upd_current_status">Senaste versionen</string> + <string name="upd_current_headline">Du har den senaste %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d %%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Uppdatera%1$s</string> + <string name="upd_install_button">Installera%1$s</string> + <string name="upd_install_anyway">Installera Stabil %1$s trots allt</string> + <string name="upd_follow_preview">Följ Förhandsversion</string> + <string name="upd_stop_session">Stoppa den körande sessionen för att uppdatera.</string> + <string name="upd_less">Mindre</string> + <string name="upd_more">Mer</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Nytt bygge av Förhandsversion</string> + <string name="upd_new_test">Testbygge för PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">UPPDATERINGSKANAL</string> + <string name="upd_stable">Stabil</string> + <string name="upd_stable_hint">Testade utgåvor, för de flesta</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Förhandsversion</string> + <string name="upd_preview_hint">De senaste fixarna, före Stabil</string> + <string name="upd_preview_current">Senaste versionen</string> + <string name="upd_tests">Testbyggen</string> + <string name="upd_tests_hint">Prova en fix innan den släpps</string> + <string name="upd_tests_none">Inga just nu</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Inte byggd för den här kopian av DroidDeck</string> + <string name="upd_updated">Uppdaterad %1$s</string> + <string name="upd_test_name">testet för PR #%1$d</string> + <string name="upd_while_ago">för ett tag sedan</string> + <string name="upd_just_now">just nu</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d att prova</item> + <item quantity="other">%1$d att prova</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Ändringar sedan ditt bygge · %1$d bygge efter</item> + <item quantity="other">Ändringar sedan ditt bygge · %1$d byggen efter</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Senaste ändringar · %1$d bygge</item> + <item quantity="other">Senaste ändringar · %1$d byggen</item> + </plurals> + <string name="gate_title">En Android-inställning att ändra</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android stoppar appar som startar många bakgrundsprocesser, och Steam startar dussintals. Tills detta ändras stängs spel utan felmeddelande.</string> + <string name="gate_fix_for_me">Fixa det åt mig</string> + <string name="gate_toggle_steps">Slå på ”Inaktivera begränsningar på underordnade processer” och kom sedan tillbaka. Lämna Utvecklaralternativ på, annars stängs omkopplaren av igen.</string> + <string name="gate_open_dev">Öppna Utvecklaralternativ</string> + <string name="gate_no_toggle">Den här Android-versionen har ingen omkopplare för det, så DroidDeck ändrar det via Trådlös felsökning. Tar ungefär en minut, ingen dator behövs.</string> + <string name="gate_needs_wifi">Trådlös felsökning kräver Wi-Fi. Alla nätverk fungerar; det behöver inte internet.</string> + <string name="gate_needs_notifications">Ihopkopplingskoden skickas i en avisering. Tillåt aviseringar för DroidDeck, eller använd Andra sätt.</string> + <string name="gate_allow_notifications">Tillåt aviseringar</string> + <string name="gate_step1">Öppna Inställningar → Utvecklaralternativ → Trådlös felsökning och slå på det</string> + <string name="gate_step2">Tryck på ”Para ihop enhet med ihopkopplingskod”</string> + <string name="gate_step3">Skriv in koden i DroidDeck-aviseringen</string> + <string name="gate_waiting">Väntar på popup-fönstret för ihopkoppling…</string> + <string name="gate_code_needed">Popup-fönster hittat. Ange dess kod i aviseringen.</string> + <string name="gate_status">Status</string> + <string name="gate_polling">Kontrollerar var 2 sekunder. Den här sidan stängs när det är av.</string> + <string name="gate_other_ways">Andra sätt</string> + <string name="gate_other_toggle">Trådlös felsökning, manuell adress, dator-ADB</string> + <string name="gate_other_no_toggle">Manuell adress, dator-ADB, Utvecklaralternativ</string> + <string name="gate_use_wireless_instead">Använd Trådlös felsökning i stället</string> + <string name="gate_some_roms">Vissa ROM:ar lägger till omkopplaren trots allt. Leta efter ”underprocess” i Utvecklaralternativ.</string> + <string name="gate_manual_hint">Om aviseringen inte fungerar, ange popup-fönstrets adress och kod själv.</string> + <string name="gate_enter_manually">Ange adress manuellt</string> + <string name="gate_from_computer">Från en dator med ADB:</string> + <string name="gate_copy_command">Kopiera kommando</string> + <string name="gate_choose_display">Välj vilken skärm Android-inställningar ska öppnas på.</string> + <string name="gate_main_screen">Huvudskärm</string> + <string name="wadb_finding_port">Ihopkopplad. Letar efter porten för Trådlös felsökning…</string> + <string name="wadb_enter_port">Ihopkopplad. Ange porten från Inställningar.</string> + <string name="wadb_applying">Enhet hittad. Tillämpar inställningen…</string> + <string name="wadb_apply_failed">Kunde inte tillämpas automatiskt. Kontrollera adressen nedan och försök igen. %1$s</string> + <string name="wadb_title_wireless">Trådlös felsökning</string> + <string name="wadb_title_done">Gränsen för underprocesser har uppdaterats</string> + <string name="wadb_title">Ändra gränsen för underprocesser</string> + <string name="wadb_lede_compact0">Om alternativet saknas, para ihop via Trådlös felsökning.</string> + <string name="wadb_lede_compact1">Ihopkopplad. Kontrollera IP-adressen och porten i Trådlös felsökning.</string> + <string name="wadb_lede_done">Gränsen för underprocesser har uppdaterats.</string> + <string name="wadb_lede0">Använd steg 2 om Utvecklaralternativ inte har någon inställning för underprocesser. Öppna Utvecklaralternativ → Trådlös felsökning → Para ihop enhet med ihopkopplingskod.</string> + <string name="wadb_lede1">Ihopkopplad. Använd adressen nedan, eller uppdatera den från Trådlös felsökning → IP-adress & port.</string> + <string name="wadb_lede_done_long">Gränsen för underprocesser uppdaterades via Trådlös felsökning.</string> + <string name="wadb_confirmed_on">Android bekräftade att gränsen är på.</string> + <string name="wadb_confirmed_off">Android bekräftade att gränsen är av.</string> + <string name="wadb_pair_group">2 · Para ihop Trådlös felsökning</string> + <string name="wadb_pair_address">Ihopkopplingsrutans IP-adress & port</string> + <string name="wadb_pin">Ihopkopplingskod (PIN)</string> + <string name="wadb_pin_placeholder">6 siffror</string> + <string name="wadb_pair">Para ihop</string> + <string name="wadb_apply_group">2 · Tillämpa via Trådlös felsökning</string> + <string name="wadb_connect_address">Anslutningens IP-adress & port</string> + <string name="wadb_pair_again">Para ihop igen</string> + <string name="wadb_turn_off">Stäng av gränsen</string> + <string name="wadb_other_ways">Andra sätt att ändra det</string> + <string name="wadb_dev_try_first">1 · Utvecklaralternativ (prova först)</string> + <string name="wadb_restrict_on">Slå av ”Inaktivera begränsningar på underordnade processer”.</string> + <string name="wadb_restrict_off">Slå på ”Inaktivera begränsningar på underordnade processer”.</string> + <string name="wadb_computer_last">3 · Dator-ADB (sista utväg)</string> + <string name="wadb_only_if">Bara om Trådlös felsökning inte är tillgänglig.</string> + <string name="wadb_computer_group">3 · Dator-ADB (sista utväg)</string> + <string name="ctrl_osc_hint">När skärmkontrollerna visas i en session</string> + <string name="ctrl_color">Färg</string> + <string name="ctrl_color_hint">Nyans på skärmknapparna</string> + <string name="ctrl_custom">Anpassad</string> + <string name="ctrl_opacity">Opacitet</string> + <string name="ctrl_percent">%1$d %%</string> + <string name="ctrl_size">Knappstorlek</string> + <string name="ctrl_size_hint" formatted="false">100 % är standardstorleken</string> + <string name="ctrl_stick_click">Spakklick</string> + <string name="ctrl_stick_click_hint">Dubbeltryck och håll en spak för L3 eller R3</string> + <string name="ctrl_adaptive">Adaptiva spakar</string> + <string name="ctrl_rumble">Spelvibration</string> + <string name="ctrl_steam_button">Steam-knappen</string> + <string name="ctrl_qam_button">QAM-knappen</string> + <string name="ctrl_keyboard_button">Tangentbordsknappen</string> + <string name="ctrl_select_steam">Tryck på Select för att öppna Steam-menyn</string> + <string name="ctrl_select_steam_hint">I stället för View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con som VR-handkontroller</string> + <string name="ctrl_joycon_vr_hint">Medan SteamVR körs blir varje Joy-Con en hand. Rikta den framåt och håll in Home eller Capture för att centrera den igen.</string> + <string name="setup_animations">Animationer</string> + <string name="ctrl_adaptive_hint">Spakarna visas där du trycker och döljs när du släpper</string> + <string name="ctrl_layout">Layout</string> + <string name="ctrl_layout_custom">Anpassade positioner sparade</string> + <string name="ctrl_layout_default">Anpassad till den här skärmen</string> + <string name="ctrl_edit">Redigera</string> + <string name="ctrl_reset">Återställ</string> + <string name="ctrl_mapping">Knappmappning</string> + <string name="ctrl_mapping_default">Varje knapp skickar sin egen inmatning</string> + <string name="ctrl_mapping_count">%1$d av %2$d knappar ommappade</string> + <string name="ctrl_configure">Konfigurera</string> + <string name="ctrl_reset_all">Återställ handkontroll</string> + <string name="ctrl_reset_all_hint">Återställer alla handkontrollsinställningar och layouten</string> + <string name="ctrl_mapping_lede">Vad varje skärmknapp skickar till spelet. Dold tar bort knappen.</string> + <string name="ctrl_onscreen_buttons">Skärmknappar</string> + <string name="ctrl_defaults">Standardvärden</string> + <string name="ctrl_reset_mapping">Återställ mappning</string> + <string name="content_android_apps">Android-appar</string> + <string name="content_apps_count">%1$d appar</string> + <string name="content_no_android_apps">Inga startbara Android-appar hittades.</string> + <string name="content_desktop_installed">● Skrivbord installerat</string> + <string name="content_desktop_first_open">Installeras vid första öppningen</string> + <string name="content_available">Tillgänglig att installera</string> + <string name="content_not_installed">Inte installerad.</string> + <string name="content_not_installed_suffix">%1$s · inte installerad</string> + <string name="content_open_named">Öppna %1$s</string> + <string name="content_games">Spel</string> + <string name="content_choose_roms">Välj en ROM-mapp.</string> + <string name="content_retroarch_roms">Bläddra till /root/ROMs i RetroArch.</string> + <string name="content_add_roms">Lägg till %1$s-spel i ROMs/%2$s.</string> + <string name="content_install_named">Installera %1$s</string> + <string name="content_stop_to_install">Stoppa sessionen för att installera</string> + <string name="content_runtime_required">Körmiljö krävs</string> + <string name="content_loading_details">Läser in installationsdetaljer…</string> + <string name="content_details_unavailable">Installationsdetaljer är inte tillgängliga. Försök igen senare.</string> + <string name="content_needs_runtime">Installera Linux-körmiljön från Konfiguration först.</string> + <string name="content_stop_first">Stoppa den körande sessionen för att installera skrivbordsappar.</string> + <string name="content_install_into">Installerar %1$s i Linux-skrivbordet.</string> + <string name="store_busy_percent_short">%1$s · %2$d %%</string> + <string name="content_hide_note">Att dölja tar bort den från Skrivbord. Dess filer finns kvar i Linux-körmiljön.</string> + <string name="content_rom_gone">Det spelet finns inte längre i ROM-mappen.</string> + <string name="content_desktop_system">Skrivbord · %1$s</string> + <string name="content_launch_in">Starta i %1$s</string> + <string name="content_also_in">Även i %1$s</string> + <string name="content_page_gone">Den sidan finns inte längre. Välj ett avsnitt till vänster.</string> + <string name="content_open_desktop">Öppna skrivbordet</string> + <string name="content_install_open_desktop">Installera & öppna skrivbordet</string> + <string name="desktop_remove_title">Avinstallera skrivbordet</string> + <string name="desktop_remove_text">Ta bort skrivbordet och dess medföljande appar. Behåll spel, tillagda appar, inställningar och delade bibliotek.</string> + <string name="desktop_removing">Tar bort skrivbordet</string> + <string name="desktop_removed">Skrivbordet har tagits bort</string> + <string name="desktop_cleaning_legacy">Tar bort gamla LXQt-filer</string> + <string name="desktop_removal_unknown">Uppdatera DroidDeck innan du tar bort den här skrivbordsversionen.</string> + <string name="content_linux_desktop">Linux-skrivbord</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox och dina emulatorer</string> + <string name="games_empty">Spel du installerar i Steam visas här efter sessionen.</string> + <string name="games_play_steam">Spela Steam</string> + <string name="games_play_steamvr">Spela SteamVR</string> + <string name="games_launch_settings">Startinställningar</string> + <string name="games_launch">Starta</string> + <string name="games_files">Spelfiler</string> + <string name="games_prefix">Proton-prefix</string> + <string name="games_saves_looking">Letar efter sparfiler…</string> + <string name="games_saves_none">Ingen sparmapp hittades efter namn. Export tar hela användarmappen.</string> + <string name="games_saves_folders">%1$d sparmappar</string> + <string name="games_saves_summary">%1$s · %2$d filer · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Hantera sparfiler</string> + <string name="games_saves">Sparfiler</string> + <string name="games_import_saves">Importera sparfiler…</string> + <string name="games_export_gamehub">Exportera som GameHub-zip…</string> + <string name="games_export_winlator">Exportera som Winlator-zip…</string> + <string name="games_open_save_folder">Öppna sparmappen</string> + <string name="games_never_played">Aldrig spelat</string> + <string name="games_runtime_busy_percent">Körmiljö upptagen · %1$d %%</string> + <string name="games_runtime_busy">Körmiljö upptagen</string> + <string name="games_runtime_first_play">Körmiljön installeras första gången du trycker på Play</string> + <string name="games_runtime_update">Uppdatering av körmiljön tillgänglig</string> + <string name="games_runtime_ready">● Körmiljö redo</string> + <string name="games_last_played">Senast spelad %1$s</string> + <string name="games_internal">Internt lagringsutrymme</string> + <string name="games_added">Tillagt spel</string> + <string name="games_custom">Anpassat spel</string> + <string name="games_store_storage">Spellagring</string> + <string name="gpu_auto_hint">Det bästa paret för den här GPU:n, hålls uppdaterat</string> + <string name="gpu_manual_hint">Välj ett par själv</string> + <string name="gpu_checking">Söker efter drivrutiner…</string> + <string name="gpu_none_listed">Inga drivrutiner listade än. Uppdatera för att söka efter dem.</string> + <string name="gpu_hide_other">Dölj drivrutiner för andra GPU:er</string> + <string name="gpu_show_other">Visa drivrutiner för andra GPU:er</string> + <string name="gpu_advanced">Avancerat</string> + <string name="gpu_set_with_display">Ställs in tillsammans med skärmdrivrutinen: %1$s innehåller båda.</string> + <string name="gpu_set_with_runtime">Ställs in tillsammans med körmiljödrivrutinen: %1$s innehåller båda.</string> + <string name="gpu_runtime_hint">Används av spel och skrivbordet.</string> + <string name="gpu_runtime_default">Standard för körmiljön</string> + <string name="gpu_auto_by_gpu">Auto – valt efter GPU</string> + <string name="gpu_manage">Ladda ned, importera eller ta bort…</string> + <string name="gpu_in_use_caps">I BRUK</string> + <string name="gpu_builtin">Drivrutinerna som är inbyggda i DroidDeck</string> + <string name="gpu_matched_pair">Körmiljö- och skärmdrivrutiner inställda tillsammans som ett matchat par.</string> + <string name="gpu_recommended_for">Rekommenderas för den här GPU:n: %1$s.</string> + <string name="gpu_refresh_hint">Uppdatera för att söka efter drivrutiner för den här GPU:n.</string> + <string name="gpu_recommended_caps">REKOMMENDERAS</string> + <string name="gpu_unavailable">Inte tillgänglig</string> + <string name="load_runtime">Linux-körmiljö</string> + <string name="load_runtime_detail">Förbereder Linux-körmiljön</string> + <string name="load_session">Session</string> + <string name="load_session_detail">Startar skärm och ljud</string> + <string name="load_steam">Steam-klient</string> + <string name="load_steam_detail">Kontrollerar Steam och dess kompatibilitetsverktyg</string> + <string name="load_opening_steam">Öppnar Steam</string> + <string name="load_opening_steam_detail">Väntar på Steams första bildruta</string> + <string name="load_desktop">Skrivbord</string> + <string name="load_desktop_detail">Förbereder skrivbordet</string> + <string name="load_opening">Öppnar</string> + <string name="load_opening_detail">Väntar på den första bildrutan</string> + <string name="load_starting_steam">Startar Steam</string> + <string name="load_ended">Sessionen avslutades</string> + <string name="load_step">Steg %1$d av %2$d</string> + <string name="load_steam_paused">Steam är pausat</string> + <string name="deck_tab_grips">Grepp</string> + <string name="deck_tab_left">Vänster platta</string> + <string name="deck_tab_right">Höger platta</string> + <string name="deck_tab_both">Båda</string> + <string name="deck_tab_gamepad">Handkontroll</string> + <string name="deck_surface_stick">Styrspak</string> + <string name="deck_surface_trackpad">Styrplatta</string> + <string name="deck_surface_switch">Växla mellan styrspak och styrplatta</string> + <string name="deck_more_controls">Fler Deck-kontroller</string> + <string name="deck_panels">PANELER</string> + <string name="deck_close">Stäng kontrollerna på andra skärmen</string> + <string name="deck_open_steam_menu">Öppna Steam-menyn</string> + <string name="deck_left_upper">Vänster · övre</string> + <string name="deck_left_lower">Vänster · nedre</string> + <string name="deck_right_upper">Höger · övre</string> + <string name="deck_right_lower">Höger · nedre</string> + <string name="deck_click">Klick</string> + <string name="deck_right_trackpad">Höger styrplatta</string> + <string name="deck_left_trackpad">Vänster styrplatta</string> + <string name="second_trackpad">Styrplatta</string> + <string name="second_show_keyboard">Visa tangentbord</string> + <string name="second_hide_keyboard">Dölj tangentbord</string> + <string name="second_terminal">Linux-terminal</string> + <string name="second_terminal_not_ready">Linux-sessionen är inte redo för en terminal än.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Spel</string> + <string name="rail_desktop">Skrivbord</string> + <string name="rail_store">Butik</string> + <string name="rail_components">Komponenter</string> + <string name="rail_apps">Appar</string> + <string name="rail_setup">Konfiguration</string> + <string name="rail_updates">Uppdateringar</string> + <string name="rail_percent">%1$d %%</string> + <string name="rail_resume_named">Återuppta %1$s</string> + <string name="roms_text">Visas som /root/ROMs i varje session. Det interna lagringsutrymmet finns på /root/Storage.</string> + <string name="roms_none">Ingen mapp vald</string> + <string name="roms_applies">Gäller från nästa session. SD-kort fungerar.</string> + <string name="roms_choose">Välj mapp</string> + <string name="roms_change">Byt mapp</string> + <string name="proton_lede">Installera en ARM64-version av Proton och välj den per spel i Steam → Egenskaper → Kompatibilitet.</string> + <string name="proton_stop_first">Stoppa den pågående sessionen för att installera eller ta bort ett kompatibilitetsverktyg.</string> + <string name="proton_available">Tillgängliga versioner</string> + <string name="proton_installed">Installerad %1$s</string> + <string name="proton_queued">Väntar sedan en tidigare begäran</string> + <string name="proton_not_installed">Inte installerad</string> + <string name="proton_update_available">Uppdatering tillgänglig → %1$s</string> + <string name="proton_remove_older">Ta bort gamla %1$s-versioner</string> + <string name="proton_remove_older_body">Tar bort %1$s. Spel som är inställda på dessa versioner måste bytas till en annan Proton.</string> + <string name="proton_remove_body">Spel som är inställda på den här versionen måste bytas till en annan Proton.</string> + <string name="proton_install_now">Installera nu</string> + <string name="proton_cancel_queued">Avbryt kön</string> + <string name="pckb_android">Android-tangentbord</string> + <string name="pckb_hide">Dölj ✕</string> + <string name="main_launch_named">Starta %1$s</string> + <string name="main_choose_screen">Välj en skärm. Sekundär: %1$s.</string> + <string name="main_secondary_gone">Den sekundära skärmen är inte längre tillgänglig.</string> + <string name="main_primary">Primär skärm</string> + <string name="main_secondary">Sekundär skärm</string> + <string name="widgets_prev_tab">Föregående flik</string> + <string name="widgets_next_tab">Nästa flik</string> + <string name="widgets_on">På</string> + <string name="widgets_all_n">Alla %1$d</string> + <string name="widgets_none">Inga</string> + <string name="widgets_n_of_m">%1$d av %2$d</string> + <string name="widgets_off">Av</string> + <string name="screen_bottom">Nedre skärm</string> + <string name="game_env_applies">Gäller från nästa spelstart. Ett spels profil åsidosätter den delade.</string> + <string name="game_env_other">Ett annat spel via app-ID…</string> + <string name="game_env_done">Klar</string> + <string name="game_env_default">Standard</string> + <string name="game_env_off">Av</string> + <string name="game_env_change">Ändra…</string> + <string name="game_env_change_title">Ändra variabel</string> + <string name="game_env_restore_default">Tillbaka till standard</string> + <string name="game_env_eyebrow">Proton-spel</string> + <string name="pip_title">Bild-i-bild</string> + <string name="pip_auto">Öppna bild-i-bild automatiskt</string> + <string name="unfolded_controls">Kontroller på den uppfällda skärmen</string> + <string name="unfolded_controls_hint">Uppfälld ligger spelet ovanför Steam Decks styrplattor och greppknappar. Hopfälld visas spelet i helskärm.</string> + <string name="pip_suspended">Pausad</string> + <string name="pip_not_ready">Bild-i-bild blir tillgängligt när sessionen är redo.</string> + <string name="pip_permission">Tillåt bild-i-bild för DroidDeck i Android-inställningarna.</string> + <string name="pip_unavailable">Android kunde inte öppna bild-i-bild.</string> + <string name="game_shortcut">Genväg</string> + <string name="game_shortcut_add">Lägg till på hemskärmen</string> + <string name="game_shortcut_choose">Välj spel</string> + <string name="game_shortcut_scanning">Söker igenom installerade spel…</string> + <string name="game_link_copy">Kopiera startlänk</string> + <string name="game_link_copied">Startlänken har kopierats</string> + <string name="game_shortcut_unsupported">Den här launchern kan inte lägga till genvägar. Använd Kopiera startlänk i stället.</string> + <string name="game_link_invalid">Ogiltig startlänk för spelet.</string> + <string name="game_link_missing">Det här spelet finns inte längre i ditt DroidDeck-bibliotek.</string> + <string name="game_link_session_busy">Stoppa den aktuella sessionen innan du startar ett Steam-spel.</string> + <string name="game_link_failed">Kunde inte skicka spelet till Steam. Försök starta det igen.</string> + <string name="setup_retry_removal">Försök ta bort igen</string> + <string name="runtime_removing">Tar bort</string> + <string name="runtime_removal_incomplete">Borttagningen är inte klar</string> + <string name="game_file_export">Exportera spelfil</string> + <string name="game_file_sync">Synka alla spelfiler till mapp</string> + <string name="game_file_stop_sync">Sluta synka spelfiler</string> + <string name="game_file_folder">Välj en mapp för frontend-spelfiler</string> + <string name="game_file_exported">Spelfiler sparade till %1$s</string> + <string name="game_frontend_files">Frontend-filer</string> + + <string name="main_wait_runtime">Vänta tills åtgärden på körmiljön är klar</string> + <string name="main_wait_proton_install">Vänta tills installationen av kompatibilitetsverktyget är klar</string> + <string name="main_wait_desktop_install">Vänta tills installationen av skrivbordsappen är klar</string> + <string name="main_wait_install_game">Vänta tills installationen är klar innan du startar ett spel</string> + <string name="main_saves_close_session">Stäng Steam-sessionen först, så att spelet inte skriver över importen</string> + <string name="main_saves_importing">Importerar till %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Importerade %1$d fil från %2$s till %3$s</item> + <item quantity="other">Importerade %1$d filer från %2$s till %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Importerade %1$d fil från %2$s till %3$s. Gamla sparfiler säkerhetskopierades till Download/DroidDeck/Saves/backups</item> + <item quantity="other">Importerade %1$d filer från %2$s till %3$s. Gamla sparfiler säkerhetskopierades till Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Välj en zip-fil med sparfiler för %1$s</string> + <string name="main_saves_exporting">Exporterar %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Exporterade %1$d fil som %2$s: %3$s</item> + <item quantity="other">Exporterade %1$d filer som %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Välj var %1$s ska sparas (%2$s)</string> + <string name="main_action_failed">%1$s misslyckades: %2$s</string> + <string name="main_no_logs_yet">Inga sessionsloggar än: kör en session först.</string> + <string name="main_no_logs_to_clear">Inga sessionsloggar att rensa.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Rensade %1$d sessionsloggmapp.</item> + <item quantity="other">Rensade %1$d sessionsloggmappar.</item> + </plurals> + <string name="main_wadb_pair_failed">Parkopplingen för trådlös felsökning misslyckades</string> + <string name="main_wadb_command_failed">Kommandot för trådlös felsökning misslyckades</string> + <string name="main_wadb_unavailable">Trådlös felsökning är inte tillgänglig</string> + <string name="main_adb_copied">ADB-kommandot har kopierats</string> + <string name="main_pick_roms">Välj ROM-mappen</string> + <string name="main_non_adreno_title">Inte en Adreno-GPU</string> + <string name="main_non_adreno_text">Turnip stöder Adreno-GPU:er. På %1$s kan Steam visa en svart skärm. Nedladdning: %2$.0f MB.</string> + <string name="main_install_anyway">Installera trots det</string> + <string name="main_remove_runtime_title">Ta bort Linux-körmiljön</string> + <string name="main_remove_runtime_text">Det här tar bort körmiljön, Steam-klienten i den och alla spel som är installerade där.</string> + <string name="main_applied">Tillämpat: %1$s</string> + <string name="android_app_open_failed_primary">Kunde inte öppna %1$s på den primära skärmen</string> + <string name="android_app_open_failed_on">Kunde inte öppna %1$s på %2$s</string> + <string name="android_app_open_failed_display">Kunde inte öppna %1$s på skärm %2$d</string> + <string name="comp_busy_importing">Importerar</string> + <string name="comp_busy_swapping">Byter</string> + <string name="comp_busy_restoring">Återställer</string> + <string name="comp_busy_cancelling">Avbryter</string> + <string name="comp_busy_deleting">Tar bort</string> + <string name="comp_cannot_read">kan inte läsa filen</string> + <string name="comp_imported">Importerade %1$s</string> + <string name="comp_swap_cancelled">Det väntande bytet avbröts.</string> + <string name="comp_pick_wcp">Välj ett komponentpaket (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nightlies kunde inte nås</string> + <string name="comp_stored">Sparade %1$s</string> + <string name="comp_download_failed">Nedladdningen misslyckades: %1$s</string> + <string name="drivers_pick_linux">Välj en drivrutin för Linux-körmiljön (-Linux-zip eller Android + Linux-paket)</string> + <string name="drivers_pick_android">Välj en skärmdrivrutin (AdrenoTools-zip eller Android + Linux-paket)</string> + <string name="drivers_pick_any">Välj en drivrutins-zip eller ett Android + Linux-paket</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Tar bort %1$s…</string> + <string name="main_forgetting_named">Glömmer %1$s…</string> + <string name="main_pick_game_storage">Välj mappen för spellagring</string> + <string name="main_pick_decky_zip">Välj en Decky-plugin-zip</string> + <string name="main_storage_not_usable">Inte användbar: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Tar bort Linux-körmiljön</string> + <string name="main_settings_main_screen">Kunde inte öppna Inställningar på den nedre skärmen. Öppnade den på huvudskärmen i stället.</string> + <string name="main_open_dev_options">Öppna Utvecklaralternativ i Inställningar</string> + + <string name="upd_unknown_apps_failed">Det gick inte att öppna Androids inställning ”Installera okända appar”</string> + <string name="upd_couldnt_check">Kunde inte kontrollera: %1$s</string> + <string name="upd_no_download">Den här versionen har ingen nedladdning för den här kopian av DroidDeck</string> + <string name="upd_stop_first">Stoppa den pågående sessionen innan du uppdaterar</string> + <string name="upd_stage_downloading">Laddar ned</string> + <string name="upd_stage_installing">Installerar</string> + <string name="upd_stage_confirm">Väntar på att du bekräftar</string> + <string name="upd_failed">Uppdateringen misslyckades</string> + <string name="upd_not_offered">Android erbjöd inte att installera uppdateringen</string> + + <string name="decky_install_failed">Decky-installationen misslyckades: %1$s</string> + <string name="decky_plugin_starting">Startar import av plugin…</string> + <string name="decky_plugin_failed">Import av plugin misslyckades: %1$s</string> + <string name="decky_plugin_installed">Plugin installerad. Starta om Steam för att läsa in den.</string> + + <string name="drivers_not_checked">Inte kontrollerat än - tryck på uppdatera för att söka efter nya drivrutiner</string> + <string name="drivers_bundle_sets_display">Android + Linux: ställer in skärmdrivrutinen samtidigt</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: ställer in körmiljödrivrutinen samtidigt</string> + <string name="drivers_runtime_builtin">Turnip som är inbyggd i körmiljön</string> + <string name="drivers_system_vulkan">systemets Vulkan: ingen paketerad version för den här GPU:n</string> + <string name="drivers_bundled">%1$s (paketerad)</string> + <string name="drivers_manual">Manuell</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Bara hälften är publicerad just nu</string> + <string name="drivers_pair_size">%1$.0f MB för båda</string> + <string name="drivers_none_to_set">Inga drivrutiner att ställa in: %1$s</string> + <string name="drivers_checking_latest">Söker efter de senaste drivrutinerna…</string> + <string name="drivers_up_to_date_check_failed">Senaste versionen (kunde inte kontrollera: %1$s)</string> + <string name="drivers_recommended_unpublished">De rekommenderade drivrutinerna är inte publicerade just nu</string> + <string name="drivers_downloading_pair">Laddar ned %1$s %2$s…</string> + <string name="drivers_updated_to">Uppdaterad till %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Uppdaterad till %1$s %2$s. Skärmdrivrutinen tillämpas efter att DroidDeck har startats om.</string> + <string name="drivers_auto_waits_for_session">Drivrutinsuppdateringar väntar tills sessionen stoppas.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s hämtas när du lämnar mobildata och batterisparläge.</string> + <string name="drivers_skipping_bad">%1$s %2$s startade ingen session här, så Automatiskt håller sig till de drivrutiner som gjorde det.</string> + <string name="drivers_rolled_back">%1$s misslyckades med att starta en session två gånger, så Automatiskt gick tillbaka till drivrutinerna som fungerade.</string> + <string name="drivers_switched_to">Bytte till %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Bytte till %1$s %2$s. Skärmdrivrutinen tillämpas efter att DroidDeck har startats om.</string> + <string name="drivers_using">Använder %1$s %2$s.</string> + <string name="drivers_using_restart">Använder %1$s %2$s. Skärmdrivrutinen tillämpas efter att DroidDeck har startats om.</string> + <string name="drivers_using_quest">Den medföljande bilddrivrutinen för Quest och standardkörmiljön används.</string> + <string name="drivers_using_quest_restart">Den medföljande bilddrivrutinen för Quest och standardkörmiljön används. Bilddrivrutinen gäller efter en omstart av DroidDeck.</string> + <string name="drivers_not_a_driver">Inte en drivrutins-zip: varken en AdrenoTools-drivrutin, en -Linux-Turnip eller ett Android + Linux-paket</string> + <string name="drivers_import_failed">Importen misslyckades: %1$s</string> + <string name="drivers_imported_unnamed">Importerad drivrutin</string> + <string name="drivers_using_bundle">Använder %1$s som både körmiljö- och skärmdrivrutin.</string> + <string name="drivers_using_bundle_restart">Använder %1$s som både körmiljö- och skärmdrivrutin. Skärmdrivrutinen tillämpas efter att DroidDeck har startats om.</string> + <string name="drivers_deleted_bundle">Tog bort %1$s (båda drivrutinerna)</string> + <string name="drivers_deleted">Tog bort %1$s</string> + <string name="drivers_release_status">Senaste: %1$s · kontrollerad %2$s</string> + <string name="drivers_release_status_failed">Senaste: %1$s · %2$s gick inte att nå · kontrollerad %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">för %1$d min sedan</item> + <item quantity="other">för %1$d min sedan</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">för %1$d h sedan</item> + <item quantity="other">för %1$d h sedan</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">för %1$d dag sedan</item> + <item quantity="other">för %1$d dagar sedan</item> + </plurals> + <string name="drivers_checking_sources">Kontrollerar Banners-Turnip, WinNative och DroidDeck…</string> + <string name="drivers_check_failed">kontrollen misslyckades</string> + <string name="drivers_installed_pick_either">Installerad %1$s - välj den i endera listan för att ställa in båda drivrutinerna</string> + <string name="drivers_installed_pick">Installerad %1$s - välj den i menyn</string> + + <string name="session_wait_removal">Vänta tills borttagningen av körmiljön är klar</string> + <string name="session_title_game">Spel</string> + <string name="session_touch_auto_touchpad">pekplatta</string> + <string name="session_touch_auto_direct">direkt</string> + <string name="session_swap_failed">Bytet misslyckades: %1$s</string> + <string name="session_profile_save_failed">Kunde inte spara profilen: %1$s</string> + <string name="session_desktop_paused">Skrivbordet är pausat</string> + <string name="session_named_paused">%1$s är pausad</string> + <string name="session_program_paused">Programmet är pausat</string> + <string name="session_starting_desktop">Startar skrivbordet</string> + <string name="session_starting_named">Startar %1$s</string> + <string name="session_starting_program">Startar programmet</string> + <string name="session_no_logs">Inga loggar för den här sessionen.</string> + <string name="session_logs_archive_failed">Kunde inte skapa arkivet med sessionsloggar.</string> + <string name="session_logs_share_failed">Kunde inte dela sessionsloggarna.</string> + <string name="session_starting_session">Startar sessionen…</string> + <string name="session_runtime_downloading">laddar ned Linux-körmiljön</string> + <string name="session_runtime_downloading_mb">laddar ned Linux-körmiljön · %1$d av %2$d MB</string> + <string name="session_runtime_checking">kontrollerar Linux-körmiljön</string> + <string name="session_runtime_unpacking">packar upp Linux-körmiljön</string> + <string name="session_desktop_downloading">laddar ned skrivbordet</string> + <string name="session_desktop_downloading_mb">laddar ned skrivbordet · %1$d av %2$d MB</string> + <string name="session_desktop_checking">kontrollerar skrivbordet</string> + <string name="session_desktop_unpacking">packar upp skrivbordet</string> + <string name="session_proton_downloading">laddar ned Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">laddar ned Proton Experimental (ARM64) · %1$d av %2$d MB</string> + <string name="session_proton_checking">kontrollerar Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">packar upp Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Kunde inte nå körmiljökatalogen. Kontrollera anslutningen och tryck på Spela igen.</string> + <string name="session_runtime_install_failed">Linux-körmiljön installerades inte. Kontrollera körmiljön i Konfiguration och tryck på Spela igen.</string> + <string name="session_desktop_install_failed">Skrivbordet installerades inte (%1$s). Kontrollera anslutningen och tryck på Skrivbord igen.</string> + <string name="session_ended_named">%1$s stoppades oväntat. Dela loggarna i en felrapport, eller försök igen.</string> + <string name="session_ended_program">Programmet stoppades oväntat. Dela loggarna i en felrapport, eller försök igen.</string> + <string name="session_ended_desktop">Skrivbordet stoppades oväntat. Dela loggarna i en felrapport, eller försök igen.</string> + <string name="session_ended_detail">Avslutningsstatus %1$d · %2$s</string> + <string name="session_ended_no_log">ingen logg</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Loggen visar %1$d ”Function not implemented”-fel: proots seccomp-acceleration misslyckas med en hjälpprocess på den här enheten. Prova %2$s → ”%3$s” (eller ”%4$s”) och starta igen.</item> + <item quantity="other">Loggen visar %1$d ”Function not implemented”-fel: proots seccomp-acceleration misslyckas med en hjälpprocess på den här enheten. Prova %2$s → ”%3$s” (eller ”%4$s”) och starta igen.</item> + </plurals> + + <string name="mode_decky_plugins">Plugins</string> + <string name="mode_decky_plugins_hint">Installera en plugin-zip för nästa Steam-session.</string> + <string name="mode_decky_plugin_downloading">Laddar ned…</string> + <string name="mode_decky_plugin_install_zip">Installera från zip</string> + <string name="store_cat_games">Spel</string> + <string name="store_cat_audio_video">Ljud & video</string> + <string name="store_cat_graphics">Grafik</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Kontor</string> + <string name="store_cat_developer">Utveckling</string> + <string name="store_cat_education">Utbildning</string> + <string name="store_cat_science">Vetenskap</string> + <string name="store_cat_system">System</string> + <string name="store_cat_utilities">Verktyg</string> + <string name="store_section_popular">Populärt</string> + <string name="store_section_trending">Trendande</string> + <string name="store_section_new">Nytt</string> + <string name="store_section_updated">Uppdaterat</string> + <string name="store_section_loading">läser in…</string> + <string name="store_flatpak_setup">Flatpak-konfiguration</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Kunde inte kontrollera Flathub efter uppdateringar</string> + <string name="content_rom_installed">installerat</string> + <string name="content_rom_folder">mapp</string> + <string name="theme_graphite">Grafit</string> + <string name="theme_graphite_detail">Grafitgrå ytor, med den blå färgen från logotypens klot för allt som är markerat, i fokus eller nedtryckt.</string> + <string name="theme_paper">Papper på svart</string> + <string name="theme_paper_detail">Vit är primärfärgen, ikonens blå är signalfärgen för linjer, ringar och punkter.</string> + <string name="theme_icon_blue">Ikonblå</string> + <string name="theme_icon_blue_detail">Svart bakgrund, vit text, den blå färgen för allt som är markerat, i fokus eller nedtryckt.</string> + <string name="theme_electric">Elektrisk marinblå</string> + <string name="theme_electric_detail">Den blå färgen klarare, på ytor som lutar åt marinblått i stället för grått.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Installera körmiljön först</string> + <string name="game_sync_err_steam_library">Steam-biblioteket är inte tillgängligt</string> + <string name="game_sync_err_previous_sd">Det tidigare SD-biblioteket är inte tillgängligt</string> + <string name="game_sync_err_game_storage">Spellagringen är inte tillgänglig</string> + <string name="game_sync_err_added_games">Mappen för tillagda spel är inte tillgänglig</string> + <string name="game_sync_err_manifests">Steam-manifesten är inte tillgängliga</string> + <string name="content_system_many">Många system</string> + <string name="fm_drive_internal">Internt</string> + <string name="fm_drive_linux">Linux-system</string> + <string name="fm_drive_sd">SD-kort</string> + <string name="fm_drive_storage">Lagring</string> + <string name="fm_select">Markera</string> + <string name="fm_properties">Egenskaper</string> + <string name="fm_favorite_add">Lägg till i Favoriter</string> + <string name="fm_favorite_remove">Ta bort från Favoriter</string> + <string name="fm_rename">Byt namn</string> + <string name="fm_copy">Kopiera</string> + <string name="fm_cut">Klipp ut</string> + <string name="fm_actions">Åtgärder</string> + <string name="fm_favorites">Favoriter</string> + <string name="fm_pin_current">Fäst aktuell mapp</string> + <string name="fm_no_favorites">Inga favoriter än - fäst en mapp med dess ⋮-meny för att snabbt komma tillbaka hit.</string> + <string name="fm_unpin_favorite">Ta bort från favoriter</string> + <string name="fm_size_zero">0 byte</string> + <string name="fm_unit_bytes">byte</string> + <string name="fm_prop_location">Plats</string> + <string name="fm_prop_type">Typ</string> + <string name="fm_prop_size">Storlek</string> + <string name="fm_prop_modified">Ändrad</string> + <string name="fm_type_folder">Mapp</string> + <string name="fm_type_file">Fil</string> + <string name="fm_type_ext_file">%1$s-fil</string> + <string name="fm_read_only">Skrivskyddad</string> + <string name="fm_read_only_hint">Förhindrar att spel (och Wine) skriver över eller tar bort filen.</string> + <string name="fm_read_only_failed">Kunde inte ändra Skrivskyddad</string> + <string name="fm_hidden">Dold</string> + <string name="fm_hidden_unsupported">Den här lagringen kan inte spara attributet Dold.</string> + <string name="fm_hidden_hint">Markerar filen som dold i Windows (Wines dolda attribut).</string> + <string name="fm_hidden_failed">Kunde inte ändra Dold på den här lagringen</string> + <string name="fm_done">Klar</string> + <string name="fm_op_deleting">Tar bort...</string> + <string name="fm_delete_failed">Borttagning misslyckades</string> + <string name="fm_op_moving">Flyttar...</string> + <string name="fm_op_copying">Kopierar...</string> + <string name="fm_op_moving_item">Flyttar - %1$s</string> + <string name="fm_op_copying_item">Kopierar - %1$s</string> + <string name="fm_op_moving_batch">Flyttar %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Kopierar %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d klara, %2$d misslyckades</string> + <string name="fm_paste_skipped">%1$d klara, %2$d hoppades över</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d objekt flyttat</item> + <item quantity="other">%1$d objekt flyttade</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d objekt kopierat</item> + <item quantity="other">%1$d objekt kopierade</item> + </plurals> + <string name="fm_already_exists">”%1$s” finns redan</string> + <string name="fm_op_renaming">Byter namn...</string> + <string name="fm_rename_failed">Namnbytet misslyckades</string> + <string name="fm_op_creating_folder">Skapar mapp...</string> + <string name="fm_create_folder_failed">Kunde inte skapa mappen</string> + <string name="fm_new_folder">Ny mapp</string> + <string name="fm_folder_name">Mappnamn</string> + <string name="fm_create">Skapa</string> + <string name="fm_new_name">Nytt namn</string> + <string name="fm_delete_title">Ta bort?</string> + <string name="fm_delete_text">Ta bort ”%1$s” permanent?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Ta bort %1$d objekt?</item> + <item quantity="other">Ta bort %1$d objekt?</item> + </plurals> + <string name="fm_cannot_undo">Det går inte att ångra.</string> + <plurals name="fm_and_more"> + <item quantity="one">…och %1$d till</item> + <item quantity="other">…och %1$d till</item> + </plurals> + <string name="fm_op_deleting_batch">Tar bort %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d kunde inte tas bort</item> + <item quantity="other">%1$d kunde inte tas bort</item> + </plurals> + <string name="fm_conflict_merge_hint">Sammanfoga lägger till och ersätter filer i den befintliga mappen.</string> + <string name="fm_conflict_overwrite_hint">Skriv över ersätter den befintliga filen.</string> + <string name="fm_conflict_apply_all">Tillämpa på alla konflikter</string> + <string name="fm_conflict_merge">Sammanfoga</string> + <string name="fm_conflict_overwrite">Skriv över</string> + <string name="fm_conflict_keep_both">Behåll båda</string> + <string name="fm_conflict_skip">Hoppa över</string> + <string name="fm_select_this_folder">Välj den här mappen</string> + <string name="fm_back">Tillbaka</string> + <string name="fm_drive_not_readable">%1$s är monterad men inte läsbar just nu</string> + <string name="fm_list_view">Listvy</string> + <string name="fm_grid_view">Rutnätsvy</string> + <string name="fm_search">Sök</string> + <string name="fm_sort">Sortera</string> + <string name="fm_sort_name">Namn</string> + <string name="fm_sort_date">Ändringsdatum</string> + <string name="fm_rows_comfortable">Bekväma rader</string> + <string name="fm_rows_compact">Kompakta rader</string> + <string name="fm_hide_hidden">Dölj dolda filer</string> + <string name="fm_show_hidden">Visa dolda filer</string> + <string name="fm_hide_favorites">Dölj favoriter</string> + <string name="fm_show_favorites">Visa favoriter</string> + <string name="fm_filter_folder">Filtrera den här mappen</string> + <string name="fm_free_space">%1$s ledigt</string> + <string name="fm_selected_count">%1$d markerade</string> + <string name="fm_select_none">Inga</string> + <string name="fm_select_all">Alla</string> + <string name="fm_paste">Klistra in</string> + <plurals name="fm_items"> + <item quantity="one">%1$d objekt</item> + <item quantity="other">%1$d objekt</item> + </plurals> + <string name="fm_paste_here">Klistra in %1$s här</string> + <string name="fm_paste_move_here">Klistra in %1$s (flytta) här</string> + <string name="fm_rail_title">Filer</string> + <string name="fm_rail_storage">LAGRING</string> + <string name="fm_rail_quick">SNABBT</string> + <string name="fm_rail_favorites">FAVORITER</string> + <string name="fm_rail_downloads">Hämtningar</string> + <string name="fm_rail_downloads_short">Hämtn.</string> + <string name="fm_rail_roms">ROM</string> + <string name="fm_rail_session_logs">Sessionsloggar</string> + <string name="fm_rail_pictures">Bilder</string> + <string name="fm_favorite_added">Lade till ”%1$s” i Favoriter</string> + <string name="fm_favorite_removed">Tog bort ”%1$s” från Favoriter</string> + <string name="fm_empty_directory">Tom mapp</string> + <string name="fm_up_one_level">Upp en nivå</string> + <string name="fm_choose_folder">Välj en mapp</string> + <string name="fm_choose_file">Välj en fil</string> + <string name="ctrl_tint_steam_blue">Steamblå</string> + <string name="ctrl_tint_sky">Himmelsblå</string> + <string name="ctrl_tint_white">Vit</string> + <string name="ctrl_tint_violet">Lila</string> + <string name="ctrl_tint_green">Grön</string> + <string name="ctrl_tint_amber">Amber</string> + <string name="ctrl_tint_red">Röd</string> + <string name="ctrl_tint_pink">Rosa</string> + <string name="ctrl_button_a">A-knappen</string> + <string name="ctrl_button_b">B-knappen</string> + <string name="ctrl_button_x">X-knappen</string> + <string name="ctrl_button_y">Y-knappen</string> + <string name="ctrl_button_lb">Vänster kantknapp</string> + <string name="ctrl_button_rb">Höger kantknapp</string> + <string name="ctrl_button_lt">Vänster avtryckare</string> + <string name="ctrl_button_rt">Höger avtryckare</string> + <string name="ctrl_button_view">Visa-knappen</string> + <string name="ctrl_button_menu">Meny-knappen</string> + <string name="ctrl_target_view">Visa</string> + <string name="ctrl_target_menu">Meny</string> + <string name="ctrl_target_up">D-pad upp</string> + <string name="ctrl_target_down">D-pad ned</string> + <string name="ctrl_target_left">D-pad vänster</string> + <string name="ctrl_target_right">D-pad höger</string> + <string name="ctrl_target_hidden">Dold</string> + <string name="ctrl_editor_drag">Dra för att flytta</string> + <string name="ctrl_editor_snap">Fäst</string> + <string name="ctrl_editor_save">Spara</string> + <string name="second_mode_none">Inget</string> + <string name="second_mode_keyboard_trackpad">Tangentbord + styrplatta</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Deck-grepp + styrplattor</string> + + <string name="rtinst_removing">Tar bort Linux-körmiljön</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Tar bort Linux-körmiljön · %1$d post</item> + <item quantity="other">Tar bort Linux-körmiljön · %1$d poster</item> + </plurals> + <string name="rtinst_removed">Linux-körmiljön har tagits bort</string> + <string name="rtinst_removal_failed">Kunde inte slutföra borttagningen av Linux-körmiljön. Försök ta bort den igen i Konfiguration.</string> + <string name="rtinst_removing_leftovers">Tar bort rester av körmiljön</string> + <string name="rtinst_downloading">Laddar ned</string> + <string name="rtinst_verifying">Verifierar</string> + <string name="rtinst_extracting">Packar upp</string> + <string name="rtinst_channel_description">Visas medan Linux-körmiljön installeras eller tas bort</string> + <string name="rtinst_title_installing">Installerar Linux-körmiljön</string> + <string name="rtinst_title_removing">Tar bort Linux-körmiljön</string> + + <string name="deskpkg_runtime_missing">Linux-körmiljön är inte installerad</string> + <string name="deskpkg_no_checksum">Katalogen har ingen kontrollsumma för %1$s</string> + <string name="deskpkg_checksum_mismatch">Kontrollsumman stämmer inte - ingenting ändrades</string> + <string name="deskpkg_installing">Installerar %1$s</string> + <string name="deskpkg_place_failed">Kunde inte placera AppImage-filen</string> + <string name="deskpkg_extract_failed">Uppackningen misslyckades</string> + <string name="deskpkg_install_failed">Installationen misslyckades</string> + + <string name="flatpakmgr_setup_failed">Flatpak-konfigurationen misslyckades (avslutningskod %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Flatpak-konfigurationen slutfördes inte</string> + <string name="flatpakmgr_busy">En annan butiksåtgärd pågår</string> + <string name="flatpakmgr_not_ready">Konfigurera Flatpak först</string> + <string name="flatpakmgr_starting">Startar</string> + <string name="flatpakmgr_exit_status">Flatpak avslutades med status %1$d</string> + <string name="flatpakmgr_installing">Installerar %1$s</string> + <string name="flatpakmgr_updating">Uppdaterar %1$s</string> + <string name="flatpakmgr_removing">Tar bort %1$s</string> + <string name="flatpakmgr_installing_step">Installerar %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Uppdaterar %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Tar bort %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">översättningar</string> + <string name="flatpakmgr_ref_graphics_drivers">grafikdrivrutiner</string> + <string name="flatpakmgr_ref_media_codecs">mediekodekar</string> + <string name="flatpakmgr_ref_runtime">%1$s-körmiljö</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s-körmiljö %2$s</string> + + <string name="appimg_too_small">Filen är för liten för att vara en AppImage</string> + <string name="appimg_unreadable">Filen kan inte läsas: %1$s</string> + <string name="appimg_not_linux">Det här är inte en AppImage (det är inte ett Linux-program)</string> + <string name="appimg_wrong_arch">Den här AppImage-filen är byggd för varken ARM64 (aarch64) eller x86-datorer</string> + <string name="appimg_not_appimage">Det här är ett Linux-program men inte en AppImage</string> + <string name="appimg_wrong_type">Endast typ 2-AppImages kan importeras (den här är typ %1$d)</string> + <string name="appimg_no_space_import">Inte tillräckligt med ledigt utrymme: import kräver cirka %1$s</string> + <string name="appimg_no_space_update">Inte tillräckligt med ledigt utrymme: uppdatering kräver cirka %1$s</string> + <string name="appimg_import_failed">Importen misslyckades</string> + <string name="appimg_gone">Den AppImage-filen finns inte längre</string> + <string name="appimg_update_failed">Uppdateringen misslyckades</string> + <string name="appimg_extracting">Packar upp %1$s</string> + <string name="appimg_extract_failed">AppImage-filen kunde inte packas upp</string> + <string name="appimg_extract_failed_detail">AppImage-filen kunde inte packas upp: %1$s</string> + + <string name="deckymgr_stop_session_loader">Stoppa den aktiva sessionen innan du installerar Decky Loader</string> + <string name="deckymgr_download_failed">Nedladdningen av Decky Loader misslyckades</string> + <string name="deckymgr_size_mismatch">Storleken på Decky Loader matchade inte utgåvans metadata</string> + <string name="deckymgr_checksum_download_failed">Kunde inte ladda ned utgåvans kontrollsumma</string> + <string name="deckymgr_checksum_missing">Utgåvans kontrollsumma saknas</string> + <string name="deckymgr_checksum_invalid">Utgåvans kontrollsumma är ogiltig</string> + <string name="deckymgr_checksum_mismatch">Kontrollsumman för Decky Loader stämmer inte</string> + <string name="deckymgr_not_elf">Utgåvans fil är inte en kompatibel 64-bitars körbar Linux-fil</string> + <string name="deckymgr_session_started_loader">En session startade under nedladdningen. Stoppa den innan du installerar Decky Loader</string> + <string name="deckymgr_loader_not_executable">Kunde inte markera PluginLoader som körbar</string> + <string name="deckymgr_cef_failed">Kunde inte aktivera Steams CEF-fjärrfelsökning</string> + <string name="deckymgr_stage_failed">Kunde inte förbereda PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Kunde inte bevara den befintliga PluginLoader</string> + <string name="deckymgr_loader_activate_failed">Kunde inte aktivera den nya PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Stoppa den aktiva sessionen innan du installerar en plugin</string> + <string name="deckymgr_loader_required">Installera Decky Loader innan du importerar en plugin</string> + <string name="deckymgr_zip_unreadable">Kunde inte läsa den valda zip-filen</string> + <string name="deckymgr_plugins_dir_failed">Kunde inte skapa mappen för Decky-plugins</string> + <string name="deckymgr_extracting_zip">Packar upp plugin-zip</string> + <string name="deckymgr_zip_one_folder">Plugin-zipen måste innehålla en plugin-mapp på toppnivå</string> + <string name="deckymgr_zip_missing_files">Plugin-zipen saknar plugin.json, package.json eller dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Plugin-namnet saknas</string> + <string name="deckymgr_session_started_plugin">En session startade under installationen. Stoppa den innan du installerar en plugin</string> + <string name="deckymgr_plugin_installed">Plugin installerad · starta om Steam för att läsa in den</string> + <string name="deckymgr_plugin_install_failed">Installationen av plugin-zipen misslyckades</string> + <string name="deckymgr_zip_too_many">Plugin-zipen innehåller för många poster</string> + <string name="deckymgr_zip_invalid_path">Plugin-zipen innehåller en ogiltig sökväg</string> + <string name="deckymgr_zip_duplicate_paths">Plugin-zipen innehåller dubbletter av sökvägar</string> + <string name="deckymgr_zip_unsafe_path">Plugin-zipen innehåller en osäker sökväg</string> + <string name="deckymgr_folder_failed">Kunde inte skapa plugin-mappen</string> + <string name="deckymgr_zip_too_large">Plugin-zipen packas upp till mer än gränsen på 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Kunde inte markera den medföljande plugin-binären som körbar</string> + <string name="deckymgr_remote_entry_invalid">Ogiltig remote_binary-post</string> + <string name="deckymgr_remote_name_invalid">Ogiltigt namn på fjärrbinär</string> + <string name="deckymgr_remote_url_https">URL:en för fjärrbinären måste använda HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Fjärrbinären %1$s har en ogiltig SHA-256-hash</string> + <string name="deckymgr_bin_dir_failed">Kunde inte skapa bin-mappen för pluginen</string> + <string name="deckymgr_downloading_binary">Laddar ned plugin-binär · %1$s</string> + <string name="deckymgr_binary_download_failed">Kunde inte ladda ned plugin-binären %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Kontrollsumman för plugin-binären stämmer inte · %1$s</string> + <string name="deckymgr_binary_not_executable">Kunde inte markera plugin-binären som körbar · %1$s</string> + <string name="deckymgr_binary_replace_failed">Kunde inte ersätta plugin-binären · %1$s</string> + <string name="deckymgr_binary_install_failed">Kunde inte installera plugin-binären · %1$s</string> + <string name="deckymgr_folder_taken">Plugin-mappen tillhör en annan plugin</string> + <string name="deckymgr_preserve_failed">Kunde inte bevara den befintliga pluginen</string> + <string name="deckymgr_activate_failed">Kunde inte aktivera den importerade pluginen</string> + <string name="deckymgr_settings_failed">Kunde inte uppdatera inställningarna för Decky-plugin</string> + <string name="deckymgr_restore_failed">Kunde inte återställa den befintliga pluginen</string> + + <string name="adbfix_save_failed">Kunde inte spara identiteten för trådlös felsökning</string> + <string name="adbfix_command_failed">ADB-kommandot misslyckades (%1$d)</string> + <string name="adbfix_not_confirmed">Android bekräftade inte att gränsen för underprocesser ändrades: %1$s</string> + <string name="adbfix_no_pairing">Ingen parkoppling för trådlös felsökning är sparad</string> + <string name="adbfix_enter_address">Ange den aktuella IP-adressen och porten för trådlös felsökning</string> + + <string name="adbpair_timed_out">Tidsgränsen överskreds när appen väntade på popup-fönstret för parkoppling. Försök igen från DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Kunde inte söka efter popup-fönstret för parkoppling (%1$d). Kontrollera att Wi-Fi är på.</string> + <string name="adbpair_discovery_failed">Kunde inte söka efter popup-fönstret för parkoppling: %1$s</string> + <string name="adbpair_six_digits">Ange alla 6 siffror i koden</string> + <string name="adbpair_pairing">Parkopplar…</string> + <string name="adbpair_code_rejected">Den koden fungerade inte. Öppna popup-fönstret för parkoppling igen och ange den nya koden.</string> + <string name="adbpair_connecting">Parkopplad. Ansluter…</string> + <string name="adbpair_port_not_found">Parkopplad, men porten för trådlös felsökning hittades inte. Låt trådlös felsökning vara på och försök igen.</string> + <string name="adbpair_applying">Tillämpar inställningen…</string> + <string name="adbpair_command_failed">Kommandot för trådlös felsökning misslyckades</string> + <string name="adbpair_channel_name">Konfiguration av trådlös felsökning</string> + <string name="adbpair_channel_description">Frågar efter parkopplingskoden för trådlös felsökning medan Inställningar är öppen</string> + <string name="adbpair_title_pair">Parkoppla trådlös felsökning</string> + <string name="adbpair_waiting_text">Slå på trådlös felsökning och tryck sedan på ”Parkoppla enhet med parkopplingskod”.</string> + <string name="adbpair_waiting_long">Slå på trådlös felsökning och tryck sedan på ”Parkoppla enhet med parkopplingskod”. Stanna kvar i Inställningar: koden skrivs in i den här aviseringen.</string> + <string name="adbpair_code_label">6-siffrig parkopplingskod</string> + <string name="adbpair_code_hint">Tryck på Ange kod och skriv de 6 siffrorna som visas i Inställningar.</string> + <string name="adbpair_title_code">Ange Wi-Fi-parkopplingskoden</string> + <string name="adbpair_title_retry">Försök med koden igen</string> + <string name="adbpair_enter_code">Ange kod</string> + <string name="adbpair_title_working">Konfigurerar Steam</string> + <string name="adbpair_title_done">Steam är redo</string> + <string name="adbpair_done_text">Tryck för att gå tillbaka till DroidDeck. Du kan stänga av trådlös felsökning nu.</string> + <string name="adbpair_title_failed">Konfigurationen av trådlös felsökning avbröts</string> + + <string name="selfinst_download_failed">Hämtningen misslyckades</string> + <string name="selfinst_size_mismatch">Nedladdningens storlek matchade inte den publicerade APK-filen och förkastades - försök igen</string> + <string name="selfinst_checksum_mismatch">Nedladdningen matchade inte sin kontrollsumma och förkastades - försök igen</string> + <string name="selfinst_wrong_package">Uppdateringen är för Android-paketet %1$s, inte %2$s</string> + <string name="selfinst_metadata_signer">Uppdateringens metadata anger inte DroidDecks signeringsnyckel för utgåvan</string> + <string name="selfinst_unreadable">Android kunde inte läsa den nedladdade APK-filen</string> + <string name="selfinst_apk_wrong_package">Den nedladdade APK-filen är för %1$s, inte %2$s</string> + <string name="selfinst_version_mismatch">Den nedladdade APK-filen anger versionCode %1$d, inte den publicerade %2$d</string> + <string name="selfinst_downgrade">Android installerar inte versionCode %1$d över den installerade %2$d</string> + <string name="selfinst_no_signing">Den nedladdade APK-filen har ingen signeringsinformation</string> + <string name="selfinst_wrong_signer">Den nedladdade APK-filen är inte signerad med DroidDecks nyckel för utgåvan</string> + <string name="appupd_http">Uppdateringskatalogen svarade HTTP %1$d</string> + + <string name="loadstate_starting">Startar sessionen…</string> + <string name="loadstate_elapsed">%1$d:%2$02d förflutit · arbetar fortfarande</string> + <string name="loadstate_steam_update">Laddar ned uppdateringen av Steam-klienten · %1$d %%</string> + <string name="loadstate_steam_client">Laddar ned Steam-klienten · %1$s</string> + + <string name="pextra_busy">En installation av ett kompatibilitetsverktyg pågår redan</string> + <string name="pextra_stop_session">Stoppa den aktiva sessionen innan du installerar kompatibilitetsverktyg</string> + <string name="pextra_no_release">Kunde inte hitta en ARM64-utgåva av %1$s</string> + <string name="pextra_no_space">Minst 4 GB ledigt utrymme plus nedladdningens storlek krävs för att installera %1$s</string> + <string name="pextra_downloading">Laddar ned %1$s %2$s</string> + <string name="pextra_retrying">Försöker ladda ned igen · försök %1$d av %2$d</string> + <string name="pextra_interrupted">Nedladdningen avbröts</string> + <string name="pextra_download_failed">Nedladdningen misslyckades. Den delvisa filen behålls så att ett nytt försök kan återupptas</string> + <string name="pextra_too_big">Nedladdningen översteg utgåvans storlek och togs bort</string> + <string name="pextra_incomplete">Nedladdningen var ofullständig. Den delvisa filen behålls för ett återupptagbart försök</string> + <string name="pextra_verifying">Verifierar nedladdningen</string> + <string name="pextra_checksum_unreadable">Kunde inte läsa utgåvans kontrollsumma. Försök igen</string> + <string name="pextra_no_checksum">%1$s %2$s publicerar ingen kontrollsumma. Inget installerades</string> + <string name="pextra_checksum_mismatch">Kontrollsumman stämmer inte. Nedladdningen togs bort</string> + <string name="pextra_session_started">En session startade under nedladdningen. Stoppa den innan du installerar kompatibilitetsverktyg</string> + <string name="pextra_installing">Installerar %1$s</string> + <string name="pextra_install_failed">Installationen av %1$s misslyckades (avslutningskod %2$d)</string> + <string name="pextra_could_not_install">Kunde inte installera %1$s</string> + <string name="esync_fetching">Hämtar droiddeck-esync-paket</string> + + <string name="cmgr_fex_linux_helpers">med Linux-hjälpprogram</string> + <string name="cmgr_fex_dlls_only">Endast DLL-filer</string> + <string name="cmgr_original_proton_updated">Original (Proton har uppdaterats sedan senaste bytet)</string> + <string name="cmgr_changed_outside">Ändrad utanför Komponenter</string> + <string name="cmgr_not_present">saknas</string> + <string name="cmgr_original_version">Original %1$s</string> + <string name="cmgr_original_from">Original från %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s läggs in i %3$s när spelet som körs på den stängs.</string> + <string name="cmgr_swap_done">%1$s %2$s finns nu i %3$s. Det börjar gälla nästa gång ett spel startar.</string> + <string name="cmgr_original_missing">Det originalpaketet är inte sparat</string> + <string name="cmgr_restore_queued">%1$s i %2$s återgår till originalet när spelet som körs på den stängs.</string> + <string name="cmgr_restore_done">%1$s i %2$s återställdes från sitt %3$s-original.</string> + <string name="cmgr_package_in_use">%1$s används i %2$s. Byt den Protonen till något annat först.</string> + <string name="cmgr_package_not_stored">%1$s är inte sparad</string> + <string name="cmgr_deleted">Tog bort %1$s.</string> + <string name="cmgr_original_kept">Den installerade versionens original behålls: det är vägen tillbaka.</string> + <string name="cmgr_not_stored">Inte sparad</string> + <string name="cmgr_deleted_original">Tog bort %1$s-originalet av %2$s.</string> + <string name="cmgr_nightlies_only">Nedladdningar kommer bara från Nightlies-utgåvorna</string> + <string name="cmgr_list_predates_checksums">Den här paketlistan är från innan kontrollsummor fanns - uppdatera den och försök igen</string> + <string name="cmgr_checksum_mismatch">Kontrollsumman stämmer inte</string> + + <string name="sprefs_upscaler_linear">Linjär</string> + <string name="sprefs_upscaler_nearest">Närmaste</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (kvalitet)</string> + <string name="sprefs_upscaler_sharpen">Endast skärpa</string> + <string name="sprefs_lod_bias_auto">Auto (matcha skalning)</string> + + <string name="look_off_desc">Inget tillämpat.</string> + <string name="look_game_clarity">Spelklarhet</string> + <string name="look_game_clarity_desc">Skärpa med en nypa kontrast - vardagsvalet.</string> + <string name="look_vivid">Levande</string> + <string name="look_vivid_desc">Färgen pressad hårt. Deband är på så att himlar inte strimmar.</string> + <string name="look_cinematic">Cinematisk</string> + <string name="look_cinematic_desc">Djupare kontrast, kallare färg, kanter jämnade ut.</string> + <string name="look_competitive">Tävling</string> + <string name="look_competitive_desc">Skuggor lyfta och tung skärpa - för att se motståndare snabbare.</string> + <string name="look_adaptive_sharpen">Adaptiv skärpa</string> + <string name="look_adaptive_sharpen_desc">Endast skärpa, färgen orörd.</string> + <string name="look_filmic">Filmisk</string> + <string name="look_filmic_desc">Filmlik kurva, lätt dämpad.</string> + <string name="look_arcade">Arkad</string> + <string name="look_arcade_desc">Högljudd och kraftfull.</string> + <string name="look_retro_crt">Retro-CRT</string> + <string name="look_retro_crt_desc">Simulerar både CRT-röret och den analoga signalen tillsammans.</string> + <string name="look_upscale_sharp">Skarp uppskalning</string> + <string name="look_upscale_sharp_desc">För körning under skärmens upplösning.</string> + <string name="look_pixel_clean">Pixelrent</string> + <string name="look_pixel_clean_desc">Skarpa pixlar för 2D och äldre titlar.</string> + <string name="look_anime_edge">Anime-kant</string> + <string name="look_anime_edge_desc">Tecknade konturer plus skärpa.</string> + + <string name="gpuinfo_not_adreno">Inte en Adreno-GPU</string> + <string name="gpuinfo_supported">Stöds</string> + <string name="gpuinfo_experimental">Experimentell: dess drivrutiner är testversioner</string> + <string name="gpuinfo_below_tested">Under testad maskinvara (Adreno 725 och nyare): det kan hända att det inte fungerar</string> + <string name="gpuinfo_unsupported">Stöds inte: DroidDeck behöver en Adreno-GPU (Snapdragon)</string> + + <string name="turnip_rate_limited">GitHubs hastighetsgräns nåddes - försök igen senare</string> + <string name="turnip_github_http">GitHub svarade HTTP %1$d</string> + <string name="turnip_download_failed">Hämtningen misslyckades</string> + <string name="turnip_list_predates_checksums">Den här drivrutinslistan är från innan kontrollsummor fanns - uppdatera den och försök igen</string> + <string name="turnip_checksum_mismatch">Kontrollsumman stämmer inte - nedladdningen förkastades</string> + <string name="turnip_not_adrenotools">Inte en AdrenoTools-drivrutin: %1$s</string> + <string name="turnip_reject_no_meta">ingen meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json kan inte läsas (%1$s)</string> + <string name="turnip_reject_linux_driver">det här är en drivrutin för Linux-körmiljön (importera den under ”Linux-körmiljödrivrutin”)</string> + <string name="turnip_reject_wayland">det här är en spel-drivrutin för Wayland, som den här appen inte har någon användning för</string> + <string name="turnip_reject_no_library_name">meta.json anger inget libraryName, så ingenting kunde skickas till AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json anger %1$s, som inte finns i zip-filen</string> + <string name="turnip_reject_not_aarch64">%1$s är inte ett 64-bitars delat ELF-bibliotek för AArch64</string> + <string name="turnip_reject_glibc">%1$s länkar mot glibc - en ”-Linux”-Turnip, som hör hemma under ”Linux-körmiljödrivrutin”</string> + <string name="lvd_no_library">Ingen libvulkan_freedreno*.so i den här zip-filen. En Android-zip (AdrenoTools) eller -Wayland-Turnip-zip är inte en Linux-körmiljödrivrutin.</string> + <string name="lvd_not_aarch64">%1$s är inte ett 64-bitars delat ELF-bibliotek för AArch64.</string> + <string name="lvd_not_glibc">%1$s är inte en glibc-drivrutin - den länkar mot Androids libc. Linux-körmiljön behöver en ”-Linux”-zip; en vanlig eller ”-Wayland”-Turnip kan inte läsas in av Steam-klienten alls.</string> + <string name="bundle_no_manifest">Inte ett drivrutinspaket: ingen manifest.json som anger en android- och en linux-drivrutin</string> + <string name="bundle_entry_outside">Inte ett drivrutinspaket: %1$s pekar utanför det</string> + <string name="bundle_too_large">Inte ett drivrutinspaket: det packas upp till mer än %1$d MB</string> + + <string name="gstore_sd_card">SD-kort</string> + <string name="gstore_folder">Mapp</string> + + <string name="logshare_chooser">Dela sessionsloggar</string> + + <string name="hdr_needs_android_10">kräver Android 10 eller senare (skärmlager med en färgrymd)</string> + <string name="hdr_none">den här skärmen rapporterar inget HDR-stöd</string> + <string name="hdr_not_hdr10">den här skärmen stöder %1$s, inte HDR10</string> + + <string name="gpu_this_gpu">den här GPU:n</string> + <string name="phantom_title_on">Gränsen för underprocesser är på</string> + <string name="phantom_title_unset">Gränsen för underprocesser är inte inställd</string> + <string name="phantom_title_unreadable">Gränsen för underprocesser kunde inte kontrolleras</string> + <string name="phantom_title_off">Gränsen för underprocesser är av</string> + <string name="phantom_title_not_required">Gränsen för underprocesser krävs inte</string> + <string name="phantom_instructions_fix">%1$s Om det inte är möjligt ansluter du den här enheten till en dator med ADB och kör kommandot nedan. Kom tillbaka hit och kontrollera igen.</string> + <string name="phantom_instructions_off">Steam-sessioner kan starta.</string> + <string name="phantom_instructions_not_applicable">Den här Android-versionen använder inte den här gränsen.</string> + <string name="phantom_fix_toggle">Slå på ”Inaktivera begränsningar på underordnade processer” i Utvecklaralternativ, och låt Utvecklaralternativ vara kvar på efteråt.</string> + <string name="phantom_fix_no_toggle">Den här Android-versionen har ingen växel för det. Använd trådlös felsökning för att ändra det från den här enheten.</string> + <string name="upd_block_no_apk">Den här versionen har ingen nedladdning för den här kopian av DroidDeck.</string> + <string name="upd_block_version_code">Android installerar inte den över den här versionen eftersom dess versionCode %1$d är lägre än den installerade %2$d.</string> + <string name="upd_fail_downgrade">Android installerar inte en äldre version över en nyare. Stanna på den här versionen tills kanalen hinner i kapp.</string> + <string name="upd_fail_signature">Den här kopian av DroidDeck är signerad på ett annat sätt (en lokal version?), så Android uppdaterar den inte på plats.</string> + <string name="upd_fail_storage">Det finns inte tillräckligt med ledigt utrymme för uppdateringen.</string> + <string name="upd_fail_aborted">Uppdateringen avbröts.</string> + <string name="upd_fail_with_message">Uppdateringen installerades inte: %1$s</string> + <string name="upd_fail_generic">Uppdateringen installerades inte.</string> + <string name="saves_layout_zip">%1$s-zip</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s har inte startats än</string> + <string name="saves_none_found">Inga sparfiler hittades för %1$s</string> + <string name="saves_not_save_zip">%1$s har ingen drive_c-mapp, så det är inte en sparfils-zip från GameHub eller Winlator</string> + <string name="gstore_cannot_create">kan inte skapa mappar i %1$s</string> + <string name="gstore_cannot_write">kan inte skriva i %1$s</string> + <string name="gstore_cannot_write_detail">kan inte skriva i %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Mappen är inte tillgänglig</string> + <string name="gfiles_name_taken">En annan fil använder redan %1$s</string> + <string name="gfiles_art_unavailable">Mappen för omslagsbilder är inte tillgänglig</string> + <string name="gfiles_unrelated_inventory">Mappen har en orelaterad synkinventering</string> + <string name="gfiles_remove_failed">Kunde inte ta bort %1$s</string> + <string name="gfiles_outside_folder">Filen hamnar utanför exportmappen</string> + <string name="cmgr_fex_unnamed">FEX (version utan versionsnamn)</string> + <string name="cmgr_no_profile">ingen profile.json i %1$s</string> + <string name="cmgr_not_component_package">%1$s är inte ett Linux-komponentpaket (typ %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s ledigt</string> + <string name="mode_storage_auto_short">Automatiskt</string> + <string name="appupd_catalog_rejected">Uppdateringskatalogen klarade inte sina kontroller (%1$s)</string> + <string name="main_adb_clip_label">DroidDecks inställning för underprocesser</string> + <string name="setup_signed_in_offline_unnamed">Inloggad · offlineläge</string> + <string name="setup_signed_in_unnamed">Inloggad</string> + <string name="driver_tag_bundled">PAKETERAD</string> + <string name="driver_tag_downloaded">NEDLADDAD</string> + <string name="driver_tag_imported">IMPORTERAD</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Sessionsskärm</string> + <string name="display_resolution">Upplösning</string> + <string name="display_game_fit">16:9-spelanpassning</string> + <string name="display_game_fit_hint">Hur 16:9-spel anpassas till den här skärmen. Nästa session.</string> + <string name="display_game_fit_unavailable">Välj Matcha skärmen eller en anpassad storlek som är smalare än 16:9.</string> + <string name="display_preserve">Behåll proportionerna</string> + <string name="display_stretch">Sträck ut till skärmen</string> + <string name="display_image_scaling">Bildskalning</string> + <string name="display_filter">Skalningsfilter</string> + <string name="display_filter_hint">Delas av Steam och skrivbordet.</string> + <string name="display_filter_live">Tillämpas direkt. Delas av Steam och skrivbordet.</string> + <string name="display_filter_note">FSR, GSR och NIS tillämpas när sessionens bild förstoras. Endast skärpa fungerar även utan förstoring.</string> + <string name="display_sharpness">Filterskärpa</string> + <string name="display_frame_rate">Bildfrekvens</string> + <string name="display_look_filter">%1$s Ställer in skalning till %2$s.</string> + <string name="display_match_screen">Matcha skärmen (%1$d×%2$d)</string> + <string name="display_follow_screen">Följ skärmen (ändrar storlek vid vikning)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Visa enhetsinformation</string> + <string name="device_info_hide">Dölj enhetsinformation</string> + <string name="device_info_loading">Läser av enheten…</string> + <string name="device_info_copy">Kopiera</string> + <string name="device_info_copy_hint">Kopiera denna information till en felrapport.</string> + <string name="device_info_copied">Kopierat.</string> + <string name="force_ssbs_title">Tvinga SSBS</string> + <string name="force_ssbs_hint">Håller kvar en CPU-hastighetsinställning som Wine annars stänger av. Kan göra Windows-spel snabbare på Snapdragon 8 Elite; liten skillnad på äldre chip. Gäller från nästa spelstart.</string> + + <string name="rail_stores">Butiker</string> + <string name="source_steam">Steam</string> + <string name="source_added">Egna</string> + <string name="setup_stores">Butiker</string> + <string name="setup_stores_open_on">Öppna en butik på</string> + <string name="setup_stores_speed">Nedladdningshastighet</string> + <string name="setup_stores_engine">Butiksmotor</string> + <string name="setup_stores_engine_chip_ready">● Motor redo</string> + <string name="setup_stores_engine_chip_missing">Inte byggd</string> + <string name="stores_tier_balanced">Balanserad</string> + <string name="stores_tier_fast">Snabb</string> + <string name="stores_tier_max">Max</string> + <string name="stores_title">Butiker</string> + <string name="stores_settings">Butiksinställningar</string> + <string name="stores_settings_eyebrow">Inställningar</string> + <string name="stores_chip_signed_out">(inte inloggad)</string> + <string name="stores_tab_store">Butik</string> + <string name="stores_tab_installed">Installerade</string> + <string name="stores_tab_library">Bibliotek</string> + <string name="stores_tab_all">Alla</string> + <string name="stores_tab_downloads">Nedladdningar</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Logga in</string> + <string name="stores_signout_named">%1$s · logga ut</string> + <string name="stores_signout_title">Logga ut från %1$s?</string> + <string name="stores_signout_note">Installerade spel finns kvar. Biblioteket hämtas igen när du loggar in på nytt.</string> + <string name="stores_signout_stay">Fortsätt vara inloggad</string> + <string name="stores_signout_go">Logga ut</string> + <string name="stores_search_catalog">Sök i %1$s-katalogen…</string> + <string name="stores_search_installed">Sök installerade spel…</string> + <string name="stores_search_library">Sök i ditt bibliotek…</string> + <string name="stores_search_open">Sök</string> + <string name="stores_installed_empty">Inget installerat</string> + <string name="stores_library_loading">Läser in</string> + <string name="stores_nothing_matches">Inga spel</string> + <string name="stores_shelves_loading">Läser in butiken…</string> + <string name="stores_amazon_no_catalog">Ingen katalog</string> + <string name="stores_shelf_new">Nytt</string> + <string name="stores_shelf_deals">Erbjudanden</string> + <string name="stores_shelf_free">Gratisspel</string> + <string name="stores_shelf_trending">Populärt nu</string> + <string name="stores_shelf_library">Ditt bibliotek</string> + <string name="stores_play">Spela</string> + <string name="stores_install">Installera</string> + <string name="stores_resume_install">Återuppta installation</string> + <string name="stores_dl_interrupted">Avbruten</string> + <string name="stores_install_size">Installation · %1$s</string> + <string name="stores_get_free">Hämta gratis</string> + <string name="stores_view_on">Visa på %1$s</string> + <string name="stores_buy_price">Köp · %1$s</string> + <string name="stores_installed_chip">Installerat</string> + <string name="stores_in_library">I biblioteket</string> + <string name="stores_free">Gratis</string> + <string name="stores_resume">Återuppta</string> + <string name="stores_refresh">Uppdatera</string> + <string name="stores_sort">Sortera</string> + <string name="stores_sort_last_played">Senast spelade</string> + <string name="stores_sort_recently_installed">Senast installerade</string> + <string name="stores_sort_title_asc">Titel A–Ö</string> + <string name="stores_sort_title_desc">Titel Ö–A</string> + <string name="stores_sort_size_desc">Storlek: störst</string> + <string name="stores_sort_size_asc">Storlek: minst</string> + <string name="stores_sort_release_date">Utgivningsdatum</string> + <string name="stores_view_list">Listvy</string> + <string name="stores_view_cards">Kortvy</string> + <string name="stores_show_mature">Visa innehåll för vuxna</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Offline</string> + <string name="epic_card_none">Av</string> + <string name="epic_eos">Epic-inloggning (EOS)</string> + <string name="epic_offline">Starta offline</string> + <string name="epic_resolve">Lös Epic-inloggningen</string> + <string name="epic_client_version">Version %1$s</string> + <string name="epic_client_no_runtime">Installera Linux-körmiljön först</string> + <string name="epic_client_checking">Kontrollerar senaste versionen…</string> + <string name="epic_client_unpacking">Packar upp…</string> + <string name="epic_client_unreachable">Nedladdningsservern svarade inte</string> + <string name="epic_client_needs_fex">Epic Games Launcher behöver FEX, som Steam laddar ner. Öppna launchern igen när Steam har startat.</string> + <string name="epic_client_download_failed">Nedladdningen misslyckades: %1$s</string> + <string name="epic_client_unpack_failed">Det gick inte att packa upp launchern: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher accepterade inte inloggningen. Starta den igen från launchern.</string> + <string name="epic_client_uninstall_body">Tar bort startprogrammet och frigör utrymmet. Dina Epic-spel förblir installerade och fungerar, och inloggningen sparas tills du installerar det igen.</string> + <string name="epic_client_uninstall_stops">Den pågående sessionen stängs först.</string> + <string name="epic_client_uninstalled">Epic Games Launcher har avinstallerats</string> + <string name="epic_client_uninstall_failed">Vissa filer för startprogrammet kunde inte tas bort. Försök igen.</string> + <string name="epic_client_uninstalling">Vänta tills Epic Games Launcher har avinstallerats</string> + <string name="store_cloud_saves">Molnsparfiler</string> + <string name="cloud_upload">Ladda upp till molnet</string> + <string name="cloud_download">Hämta från molnet</string> + <string name="cloud_none">Inga molnsparfiler</string> + <string name="cloud_conflict">Molnkonflikt</string> + <string name="cloud_conflict_files">Molnkonflikt · %1$d filer</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Behåll molnet</string> + <string name="cloud_keep_local">Behåll lokal</string> + <string name="cloud_checking">Kontrollerar molnet…</string> + <string name="cloud_last_sync">Senast synkad %1$s</string> + <string name="cloud_never">Inte synkad än</string> + <string name="cloud_done">%1$d filer</string> + <string name="stores_eyebrow_installed">installerat</string> + <string name="stores_eyebrow_library">i ditt bibliotek</string> + <string name="stores_eyebrow_store">butik</string> + <string name="achievements_title">Prestationer</string> + <string name="achievements_count">%1$d av %2$d upplåsta</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Upplåsta · %1$d</string> + <string name="achievements_group_locked">Låsta · %1$d</string> + <string name="achievements_group_hidden">Dolda · %1$d</string> + <string name="achievements_hidden">Dold prestation</string> + <string name="achievements_hidden_detail">Detaljer visas när den är upplåst.</string> + <string name="achievements_all">Alla prestationer upplåsta</string> + <string name="achievements_reading">Läser in…</string> + <string name="achievements_signed_out">Logga in på %1$s för att se dina prestationer.</string> + <string name="achievements_unreachable">Kunde inte nå %1$s. Kontrollera igen när du är online.</string> + <string name="achievements_none">%1$s listar inga prestationer för det här spelet.</string> + <string name="achievements_show_all">Visa alla %1$d</string> + <string name="achievements_dialog_title">Prestationer · %1$s</string> + <string name="stores_in_steam">✓ I Steam</string> + <string name="stores_uninstall">Avinstallera</string> + <string name="stores_uninstalling">Avinstallerar…</string> + <string name="stores_uninstall_title">Avinstallera %1$s?</string> + <string name="stores_uninstall_body_size">Frigör %1$s och tar bort det från Steam.</string> + <string name="stores_uninstall_body">Tar bort dess filer och Steam-genväg.</string> + <string name="stores_launch_not_registered">Steam upptäcker spelet nästa gång det startar; starta det därifrån, eller starta Steam nu.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Steams val per spel</string> + <string name="stores_card_audio">Ljud</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Komponenter</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motor</string> + <string name="stores_card_engine_value">%1$s · nativ</string> + <string name="stores_card_engine_java">%1$s · inbyggd</string> + <string name="stores_how_it_runs">Så körs det</string> + <string name="stores_kv_fetched">Hämtat från</string> + <string name="stores_kv_fetched_value">%1$s, med ditt konto</string> + <string name="stores_kv_installed_to">Installerat till</string> + <string name="stores_kv_installed_to_value">Spellagring (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Startas av</string> + <string name="stores_kv_launched_by_value">Steam och Proton, samma väg som Steam-spel</string> + <string name="stores_kv_launched_by_epic">Steam och Proton · Epic-inloggning per start, EOS-overlay av</string> + <string name="stores_kv_launched_by_amazon">Steam och Proton · Amazon Games Services-variabler inställda</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">läggs till i Steam vid installation (Deck-gränssnitt + Steam Input)</string> + <string name="stores_downloads_empty">Inga nedladdningar</string> + <string name="stores_dl_paused">Pausad</string> + <string name="stores_dl_queued">I kö</string> + <string name="stores_dl_queued_at">I kö · #%1$d</string> + <string name="stores_dl_cancelled">Avbruten</string> + <string name="stores_dl_failed">Misslyckades</string> + <string name="stores_dl_failed_reason">Misslyckades · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Pausa</string> + <string name="stores_dl_resume">Återuppta</string> + <string name="stores_dl_cancel">Avbryt</string> + <string name="stores_dl_retry">Försök igen</string> + <string name="stores_dl_clear">Rensa</string> + <string name="stores_dl_clear_all">Rensa avslutade</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Nedladdning</string> + <string name="stores_stage_verify">Verifiering</string> + <string name="stores_stage_install">Installation</string> + <string name="stores_stage_done">Klart</string> + <string name="stores_stage_checking">Kontrollerar</string> + <string name="stores_stage_downloading">Laddar ned</string> + <string name="stores_dl_cancel_confirm">Ta bort nedladdning?</string> + <string name="stores_dl_failed_kept">Misslyckades · %1$s behålls</string> + <string name="stores_stage_verifying">Verifierar</string> + <string name="stores_stage_installing">Installerar</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d filer</string> + <string name="stores_download_manager">Nedladdningshanterare</string> + <string name="stores_parallel">Samtidiga nedladdningar</string> + <string name="stores_install_where">Installera till</string> + <string name="stores_install_title">Installera %1$s:</string> + <string name="stores_target_internal">Internminne</string> + <string name="stores_target_free">%1$s ledigt</string> + <string name="stores_target_free_unknown">Ledigt utrymme okänt</string> + <string name="stores_storage_insufficient">För lite ledigt utrymme: %1$s behövs, bara %2$s ledigt</string> + <string name="stores_storage_low">För lite utrymme (%1$s ledigt, %2$s behövs)</string> + <string name="stores_notification_channel">Butiksnedladdningar</string> + <string name="stores_notification_channel_hint">Visar nedladdningsförlopp för spel och håller nedladdningar igång i bakgrunden</string> + <string name="stores_notification_one">Laddar ned</string> + <string name="stores_notification_many">%1$d nedladdningar</string> + <string name="stores_notification_waiting">Förbereder…</string> + <string name="stores_notification_done_channel">Avslutade butiksnedladdningar</string> + <string name="stores_notification_installed">%1$s installerat</string> + <string name="stores_notification_failed">Nedladdningen av %1$s misslyckades</string> + <string name="stores_notification_delete">Ta bort</string> + <string name="stores_notification_keep">Behåll</string> + <string name="stores_login_title">Logga in på %1$s</string> + <string name="stores_login_provider_title">Logga in med din leverantör</string> + <string name="stores_login_reload">Läs in på nytt</string> + <string name="stores_login_close">Stäng</string> + <string name="stores_login_retry">Försök igen</string> + <string name="stores_login_finishing">Slutför inloggningen…</string> + <string name="stores_login_error_network">Inloggningssidan kunde inte läsas in: %1$s</string> + <string name="stores_login_error_idp_blocked">Den här leverantören vägrar logga in från en inbäddad sida. Logga in med ditt butikslösenord istället.</string> + <string name="stores_login_error_http">Inloggningssidan svarade med ett fel (HTTP %1$d).</string> + <string name="stores_login_error_ssl">Anslutningen till inloggningssidan är inte säker.</string> + <string name="stores_login_error_verification">Inloggningen kunde inte verifieras. Försök igen.</string> + <string name="stores_login_error_generic">Inloggningen misslyckades. Försök igen.</string> + <string name="common_close">Stäng</string> + <string name="common_back">Tillbaka</string> + <string name="common_edit">Redigera</string> + <string name="games_add_all">Lägg till alla spel i den här mappen</string> + <string name="games_added_none">Inget nytt i den här mappen</string> + <string name="edit_name">Namn</string> + <string name="edit_target">Mål</string> + <string name="edit_start_in">Starta i</string> + <string name="edit_launch_options">Startalternativ</string> + <string name="edit_artwork">Bildmaterial</string> + <string name="edit_other_exe">Annan exe…</string> + <string name="edit_remove">Ta bort</string> + <string name="art_cover">Omslag</string> + <string name="art_wide_cover">Brett omslag</string> + <string name="art_adjust_logo">Justera logotyp</string> + <string name="logo_pos_default">Standard</string> + <string name="logo_pos_upper_left">Övre vänster</string> + <string name="logo_pos_upper_center">Övre mitten</string> + <string name="logo_pos_center">Mitten</string> + <string name="logo_pos_bottom_left">Nedre vänster</string> + <string name="logo_pos_bottom_center">Nedre mitten</string> + <string name="logo_pos_position">Position</string> + <string name="logo_pos_size">Storlek</string> + <string name="logo_pos_save">Spara</string> + <string name="logo_pos_reset">Tillbaka till standard</string> + <string name="logo_pos_hint">Ritas ovanpå spelets bakgrund, som Steam gör. Exakt position kan skilja några pixlar.</string> + <string name="logo_pos_no_logo">Det här spelet har ingen logotyp än. Välj en under Logotyp för att se den här.</string> + <string name="logo_pos_failed">Logotypens position kunde inte sparas. Försök igen.</string> + <string name="art_background">Bakgrund</string> + <string name="art_logo">Logotyp</string> + <string name="art_icon">Ikon</string> + <string name="art_src_folder">Spelmapp</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Din fil</string> + <string name="art_src_exe">Från exe-filen</string> + <string name="art_src_auto">Automatiskt</string> + <string name="art_pick_image">Välj bild…</string> + <string name="art_pick_title">Välj en bild: %1$s</string> + <string name="art_reset">Återställ till automatiskt</string> + <string name="art_search_sgdb">Sök på SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Sök ett spel</string> + <string name="art_sgdb_other_games">Andra träffar</string> + <string name="art_sgdb_none">Inga träffar.</string> + <string name="art_sgdb_no_key">SteamGridDB kräver en API-nyckel. Lägg till din under Inställningar › Startprogram.</string> + <string name="art_sgdb_bad_key">SteamGridDB godtog inte API-nyckeln. Kontrollera den under Inställningar › Startprogram.</string> + <string name="art_sgdb_limit">SteamGridDB begränsar antalet förfrågningar just nu. Försök igen om en minut.</string> + <string name="art_sgdb_offline">SteamGridDB går inte att nå. Kontrollera anslutningen.</string> + <string name="art_sgdb_server">Något gick fel hos SteamGridDB. Försök igen senare.</string> + <string name="art_sgdb_no_game">SteamGridDB har inga träffar för det här spelet. Prova att söka på det.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d spel tillagt</item> + <item quantity="other">%1$d spel tillagda</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d redan i Spel</item> + <item quantity="other">%1$d redan i Spel</item> + </plurals> + <string name="hop_back">B · Tillbaka till %1$s</string> + <string name="hop_from_games">spelet</string> + <string name="hop_from_play">Spelinställningar</string> + <string name="sheet_graphics_drivers">Grafikdrivrutiner</string> + <string name="comp_this_proton">Denna Proton</string> + <string name="comp_every_proton">Alla Proton</string> + <string name="comp_for_every_proton">För alla Proton</string> + <string name="comp_available_count">Tillgängliga · %1$d</string> + <string name="comp_checked">Kontrollerade %1$s</string> + <string name="comp_check_all">Sök efter nya komponenter och drivrutiner</string> + <string name="comp_get">Hämta</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton och FEX nedan hör till denna Proton</string> + <string name="comp_device_tested">%1$s · testad</string> + <string name="comp_device_untested">%1$s · otestad</string> + <string name="comp_device_unsupported">%1$s · stöds inte</string> + <string name="gpu_auto_keeps">Håller det rekommenderade paret uppdaterat</string> + <string name="gpu_bar_auto">Auto · %1$s</string> + <string name="gpu_separately">Runtime- och visningsdrivrutiner separat</string> + <string name="gpu_use_title">Använda %1$s?</string> + <string name="gpu_mode_title">Hur drivrutiner väljs</string> + <string name="gpu_mode_auto_detail">Bästa paret för den här GPU:n, alltid uppdaterat</string> + <string name="gpu_mode_pair">Matchat par</string> + <string name="gpu_mode_pair_detail">Välj ett par; ställer in båda drivrutinerna</string> + <string name="gpu_mode_mix">Blanda fritt</string> + <string name="gpu_mode_mix_detail">Välj bild och körmiljö var för sig</string> + <string name="gpu_mode_pair_short">Par</string> + <string name="gpu_mode_mix_short">Blandat</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAR</string> + <string name="gpu_src_bundle">PAKET</string> + <string name="gpu_src_chosen">VALD</string> + <string name="gpu_src_by_gpu">PER GPU</string> + <string name="gpu_src_default">STANDARD</string> + <string name="gpu_display_live">Ritar nu</string> + <string name="gpu_display_pending">Kräver omstart · tills dess ritar %1$s</string> + <string name="gpu_runtime_live">Aktiv</string> + <string name="gpu_runtime_pending">Nästa session · den här behåller %1$s</string> + <string name="gpu_display_next">Ritar skärmen. Gäller från nästa session.</string> + <string name="gpu_previous_driver">föregående drivrutin</string> + <string name="gpu_restart_banner">Starta om för att byta bilddrivrutin.</string> + <string name="gpu_restart_blocked">Stoppa den pågående sessionen och starta om DroidDeck för att byta bilddrivrutin.</string> + <string name="gpu_restart_now">Starta om nu</string> + <string name="gpu_restart_later">Senare</string> + <string name="gpu_auto_title">Automatiskt valde det här paret för din %1$s</string> + <string name="gpu_auto_builtin_title">Automatiskt använder de inbyggda drivrutinerna för din %1$s</string> + <string name="gpu_auto_reason">Valt för %1$s-familjen. Nya versioner installeras i bakgrunden.</string> + <string name="gpu_pair_title">Välj ett par</string> + <string name="gpu_pair_hint">Ett par ställer in bilddrivrutinen och körmiljödrivrutinen tillsammans.</string> + <string name="gpu_mix_title">Välj varje drivrutin</string> + <string name="gpu_mix_hint">Ett paket fyller båda platserna. Bildändringar gäller efter en omstart, körmiljöändringar från nästa session.</string> + <string name="gpu_change_display">Byt bilddrivrutin</string> + <string name="gpu_change_runtime">Byt körmiljödrivrutin</string> + <string name="gpu_autos_pick">AUTOMATISKT VAL</string> + <string name="gpu_installed">Installerad</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · starta om för att tillämpa</string> + <string name="gpu_chip_restart">%1$s · kräver omstart</string> + <string name="comp_this_device">Den här enheten</string> + <string name="proton_remove_title">Ta bort %1$s?</string> + <string name="setup_tab_diagnostics">Diagnostik</string> + <string name="setup_ready">Redo att spela</string> + <string name="setup_not_ready">Inte redo att spela än</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">processgräns av</string> + <string name="setup_ready_signed_in">inloggad som %1$s</string> + <string name="setup_needs_you">När något behöver dig</string> + <string name="setup_group_look">Utseende</string> + <string name="setup_group_device">Den här enheten</string> + <string name="setup_group_art">Biblioteksbilder</string> + <string name="setup_group_download">Hämtning</string> + <string name="setup_download_source">Källa</string> + <string name="setup_download_source_auto">Automatiskt</string> + <string name="setup_download_source_direct">Direkt</string> + <string name="setup_download_source_mirror">Spegel</string> + <string name="setup_download_source_custom">Eget prefix</string> + <string name="setup_download_mirror">Webbplats</string> + <string name="setup_download_prefix">Prefix</string> + <string name="flathub_eyebrow">LINUX-APPAR</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Skrivbordsappar för Linux-skrivbordet, öppnas från Skrivbordsläge.</string> + <string name="flathub_setup">Konfigurera Flathub</string> + <string name="flathub_remove_title">Ta bort %1$s?</string> + <string name="flathub_remove_note">Dess inställningar och filer behålls.</string> + <string name="flathub_keep">Behåll</string> + <string name="desktop_size">Storlek på disk</string> + <string name="desktop_uninstall_title">Avinstallera skrivbordet?</string> + <string name="desktop_all_systems">Alla</string> + <string name="gog_achievements">GOG-prestationer</string> + <string name="gog_achievements_hint">Synkroniserar prestationer för GOG-spel som stöds. Gäller från nästa start.</string> + <string name="gog_achievements_off">Prestationer av</string> + <string name="gog_achievements_on">Prestationer på</string> + <string name="gog_achievements_signin">Logga in på GOG igen</string> + <string name="gog_achievements_uploaded">Prestationer uppladdade</string> + <string name="gog_achievements_pending">Uppladdning av prestation väntar</string> + <string name="gog_achievements_enable_store">Aktivera GOG-prestationer i butiksinställningarna</string> + <string name="gog_achievements_unavailable">Prestationer inte tillgängliga; kontrollera sessionsloggarna</string> + <string name="achievement_unlocked">Prestation upplåst</string> + <string name="touch_paste">Klistra in</string> + <string name="touch_dpad">Styrkors</string> + <string name="touch_left_stick">Vänster styrspak</string> + <string name="touch_right_stick">Höger styrspak</string> + <string name="touch_menu">Meny</string> + <string name="touch_keyboard">Tangentbord</string> + <string name="touch_dpad_up">Styrkors upp</string> + <string name="touch_dpad_down">Styrkors ner</string> + <string name="touch_dpad_left">Styrkors vänster</string> + <string name="touch_dpad_right">Styrkors höger</string> + <string name="touch_title">Pekskärmskontroller</string> + <string name="touch_controller">Pekskärmskontroll</string> + <string name="touch_mouse">Mus</string> + <string name="touch_on">På</string> + <string name="touch_off">Av</string> + <string name="touch_speed_slow">Långsam</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Snabb</string> + <string name="touch_edit_layout">Redigera layout</string> + <string name="touch_droiddeck_menu">DroidDeck-meny</string> + <string name="touch_drag_hint">Dra kontroller till skärmen</string> + <string name="touch_arrange">Ordna</string> + <string name="touch_discard">Kasta</string> + <string name="touch_saving">Sparar…</string> + <string name="touch_icon">Ikon</string> + <string name="touch_narrower">B−</string> + <string name="touch_wider">B+</string> + <string name="touch_shorter">H−</string> + <string name="touch_taller">H+</string> + <string name="touch_hide">Dölj</string> + <string name="touch_color_opacity">Färg och opacitet…</string> + <string name="touch_copy_layout">Kopiera denna layout</string> + <string name="touch_layout_copied">Layouten kopierad; klistra in den i pekskärmslayouten för valfritt spel</string> + <string name="touch_paste_layout">Klistra in kopierad layout</string> + <string name="touch_reset_layout">Återställ till Steams standard</string> + <string name="touch_no_binding">Den här kontrollen har ingen bindning i Steam att ge en ikon</string> + <string name="touch_icon_for">Ikon för %1$s</string> + <string name="touch_layout_color">Färg på pekskärmslayout</string> + <string name="touch_done">Klar</string> + <string name="touch_save_failed">Det gick inte att spara pekskärmslayouten</string> + <string name="touch_saved">Pekskärmslayout sparad till Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Etikett (valfritt)</string> + <string name="touch_icons_missing">Steams ikoner hittades inte</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d ikon från Steam</item> + <item quantity="other">%1$d ikoner från Steam</item> + </plurals> + <string name="touch_icon_color">Ikonfärg</string> + <string name="touch_button_color">Knappfärg</string> + <string name="touch_no_icon">Ingen ikon</string> + + <string name="stores_sync_sign_in">Kontrollerar inloggning…</string> + <string name="stores_sync_library">Hämtar ditt bibliotek…</string> + <string name="stores_sync_game_list">Hämtar spellista…</string> + <string name="stores_sync_details">Läser in speldetaljer… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Synkroniserar %1$d spel…</item> + <item quantity="other">Synkroniserar %1$d spel…</item> + </plurals> + <string name="stores_sync_progress">Synkroniserar… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Hämtar omslagsbilder…</string> + <string name="stores_sync_failed">Synkroniseringen misslyckades</string> + <string name="stores_sync_no_games">Inga spel hittades i ditt %1$s-bibliotek</string> + <string name="stores_sync_amazon_no_answer">Amazon Games svarade inte för ditt bibliotek: uppdatera, eller logga in igen</string> + <string name="stores_sync_gog_unreachable">Det gick inte att nå GOG</string> + <string name="stores_sync_gog_unreadable">Det gick inte att läsa ditt GOG-bibliotek</string> + <string name="stores_registering">Registrerar hos Steam…</string> + <string name="mode_client_arch">Steam-klient</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC-diagnostik</string> + <string name="setup_vac_diag_hint">Source-spel loggar sin konsol (-condebug); vac.txt i sessionsloggarna visar om det är säkrat eller inte</string> + <string name="load_starting_steam_x64">Startar Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Används av x86-64-Steam-klienten</string> + <string name="storage_uninstall_in_x64">Den här kopian finns i x86-64-Steam-klienten. Välj x86-64 under Steam-klient och avinstallera den sedan här.</string> + <string name="storage_uninstall_in_arm64">Den här kopian finns i ARM64-Steam-klienten. Välj ARM64 under Steam-klient och avinstallera den sedan här.</string> + <string name="drawer_page_glasses">Glasögon</string> + <string name="glasses_open">VITURE-glasögon</string> + <string name="glasses_control">Glasögonstyrning</string> + <string name="glasses_driver_missing">Det här bygget saknar drivrutinen för de här glasögonen.</string> + <string name="glasses_connection_failed">Kunde inte ansluta till glasögonen. Anslut kabeln igen eller tryck på Tillåt för att försöka igen.</string> + <string name="glasses_allow">Tillåt</string> + <string name="glasses_allow_hint">Låt DroidDeck ställa in glasögonens uppdateringsfrekvens, 3D-läge, ljusstyrka, volym och solskydd och läsa av deras huvudspårning.</string> + <string name="glasses_asking">Väntar på att du tillåter det i Androids dialogruta…</string> + <string name="glasses_denied">Styrningen nekades. Tillåt den för att ändra glasögonens inställningar.</string> + <string name="glasses_no_control">Glasögonen visar spelet, men deras inställningar kan inte ändras härifrån.</string> + <string name="glasses_output">Utgång</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Spel i glasögonen</string> + <string name="glasses_game_on_hint">Visa spelet bara i glasögonen. Av: telefonen visar det och Android speglar telefonen.</string> + <string name="glasses_display">Skärm</string> + <string name="glasses_refresh">Uppdateringsfrekvens</string> + <string name="glasses_3d">3D (sida vid sida)</string> + <string name="glasses_3d_hint">Växla de smarta glasögonen till sida-vid-sida 3D. Huvudspårning styrs separat.</string> + <string name="glasses_3d_failed">3D-signalen kunde inte bekräftas. Försök igen när 2D-bilden är tillbaka.</string> + <string name="glasses_no_signal">Ingen bild: glasögonen är i ett läge som den här telefonen inte kan skicka. Håll in deras 2D/3D-knapp, eller koppla ur dem och anslut dem igen.</string> + <string name="glasses_3d_refresh">3D-uppdateringsfrekvens</string> + <string name="glasses_auto3d">3D för VR-spel</string> + <string name="glasses_auto3d_hint">Växlar till 3D medan SteamVR körs och tillbaka efteråt.</string> + <string name="glasses_picture">Bild</string> + <string name="glasses_picture_hint">Automatiskt visar platt innehåll i båda ögonen och detekterar SteamVR. Välj Sida-vid-sida-spel för SBS-innehåll.</string> + <string name="glasses_picture_auto">Automatiskt</string> + <string name="glasses_picture_screen">Virtuell skärm</string> + <string name="glasses_picture_sbs">Sida vid sida-spel</string> + <string name="glasses_screen_size">Skärmbredd</string> + <string name="glasses_screen_distance">Skärmavstånd</string> + <string name="glasses_screen_next_session">Bredd och avstånd gäller när ett spel körs i glasögonen som en virtuell skärm.</string> + <string name="glasses_screen_no_output">De här inställningarna gäller när Spel i glasögonen är på och spelet visas där.</string> + <string name="glasses_screen_flat_hint">Automatiskt visar det här 2D-spelet i helskärm. Använd en virtuell skärm för att justera bredd, avstånd och huvudspårning.</string> + <string name="glasses_screen_use">Använd virtuell skärm</string> + <string name="glasses_screen_direct_hint">SteamVR fyller vyn. Justera dess synfält i VR; bredd och avstånd gäller endast för en virtuell skärm.</string> + <string name="glasses_screen_sbs_hint">Sida vid sida-spel fyller varje ögas bild. Bredd och avstånd gäller bara en virtuell skärm.</string> + <string name="glasses_tracking_flat_hint">Automatiskt håller det här 2D-spelet fast i synfältet. Välj Virtuell skärm under Skärm för att använda huvudspårning.</string> + <string name="glasses_tracking_sbs_hint">Huvudspårning gäller en virtuell skärm eller ett SteamVR-spel som körs.</string> + <string name="glasses_hardware">Enhet</string> + <string name="glasses_brightness">Ljusstyrka</string> + <string name="glasses_volume">Volym</string> + <string name="glasses_sunblock">Solskydd</string> + <string name="glasses_sunblock_hint">Gör de främre glasen mörkare.</string> + <string name="glasses_tracking">Spårning</string> + <string name="glasses_head_tracking">Huvudspårning</string> + <string name="glasses_head_tracking_hint">Glasögonens egna sensorer vrider den virtuella skärmen och SteamVR med ditt huvud.</string> + <string name="glasses_recenter">Centrera vyn</string> + <string name="glasses_recenter_button">Centrera skärmen igen</string> + <string name="glasses_vr_fov">SteamVR-synfält</string> + <string name="glasses_vr_fov_hint">Lägre för SteamVR närmare och fyller glasögonen; högre visar mer runt dig.</string> + <string name="glasses_playing">Spelar på %1$s</string> + <string name="glasses_calibration">Spårningskalibrering</string> + <string name="glasses_calibration_hint">Minskar drift och justerar horisontreferensen.</string> + <string name="glasses_calibration_saved_hint">Sparad kalibrering används för de här glasögonen.</string> + <string name="glasses_calibration_open">Kalibrera</string> + <string name="glasses_calibration_instructions">Lägg de anslutna glasögonen upp och ned på en vågrät yta så att bågen vilar jämnt. Tryck på Starta och rör dem sedan inte på cirka 8 sekunder. Rörelse startar om mätningen. Detta justerar drift och lutning, inte riktning.</string> + <string name="glasses_calibration_settling">Låt glasögonen ligga upp och ned utan att röra dem. Väntar på att de ska bli stilla…</string> + <string name="glasses_calibration_collecting">Mäter sensorerna. Håll glasögonen stilla.</string> + <string name="glasses_calibration_moving">Rörelse upptäcktes. Rör inte glasögonen; mätningen startar om automatiskt.</string> + <string name="glasses_calibration_turn_over">Lägg glasögonen upp och ned på en vågrät yta. Mätningen startar när de ligger rätt.</string> + <string name="glasses_calibration_complete">Kalibreringen har sparats. Ta på glasögonen och titta rakt fram, tryck sedan på Klar för att centrera.</string> + <string name="glasses_calibration_failed">Kalibreringen kunde inte slutföras. Kontrollera anslutningen och håll glasögonen stilla, försök sedan igen. Din tidigare kalibrering är oförändrad.</string> + <string name="glasses_calibration_start">Starta</string> + <string name="glasses_calibration_done">Klar</string> + <string name="glasses_calibration_reset">Återställ spårningskalibrering</string> + <string name="glasses_calibration_reset_hint">Ta bort den sparade kalibreringen och återställ modellens standardvärden? Centrera vyn när du har tagit på dig glasögonen igen.</string> + <string name="glasses_calibration_reset_button">Återställ</string> + <string name="hand_camera_group">Handspårning</string> + <string name="hand_camera_prompt_title">Spåra händer eller Joy-Con-kontroller med telefonkameran?</string> + <string name="hand_camera_prompt_body">Utan någon kontroll ansluten spårar telefonkameran dina bara händer i VR: nyp ihop tummen och pekfingret för att klicka, stäng handen för att gripa tag och vänd handflatan mot dig och nyp ihop för att öppna menyn. Med parade Joy-Con-kontroller spårar kameran deras position medan Joy-Con-kontrollerna ger rotation och knappinmatning. Bilder bearbetas på den här enheten och sparas eller skickas aldrig.</string> + <string name="hand_camera_rear">Bakre kameran</string> + <string name="hand_camera_rear_hint">Rekommenderas. Oftast skarpare och bredare.</string> + <string name="hand_camera_front">Främre kameran</string> + <string name="hand_camera_front_hint">För när enhetens baksida inte kan vara vänd mot dig.</string> + <string name="hand_camera_allow">Använd kameran</string> + <string name="hand_camera_not_now">Inte nu</string> + <string name="hand_camera_setting">Handspårning med kamera</string> + <string name="hand_camera_setting_hint">Använd telefonkameran för gester med bara händer eller för att placera parade Joy-Con-kontroller i VR. Joy-Con-kontrollerna ger rotation och knappinmatningar. Pausar medan de smarta glasögonen spårar dina händer eller Joy-Con-kontroller. Bilder bearbetas endast på den här enheten.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Kameraåtkomst</string> + <string name="hand_camera_access_hint">Tillåt kameraåtkomst så att handspårningen kan starta.</string> + <string name="hand_camera_access_denied">Kameraåtkomst är avstängd. Slå på den i Android-inställningarna.</string> + <string name="hand_camera_allow_button">Tillåt</string> + <string name="hand_camera_open_settings">Öppna inställningar</string> + <string name="hand_camera_placement">Kameraplacering</string> + <string name="hand_camera_placement_hint">Kontrollera att kameran kan se dig innan du spelar.</string> + <string name="hand_camera_check">Kontrollera</string> + <string name="hand_camera_check_title">Kameraplacering</string> + <string name="hand_camera_how_rear">Ställ enheten upprätt 1,5 till 2 meter bort, på ungefär bröstnivå, med den bakre kameran vänd mot dig. Kliv sedan in i bild med händerna ute.</string> + <string name="hand_camera_how_front">Ställ enheten upprätt 1,5 till 2 meter bort, på ungefär bröstnivå, med skärmen vänd mot dig. Kliv sedan in i bild med händerna ute.</string> + <string name="hand_camera_starting">Startar kameran…</string> + <string name="hand_camera_stand_up">Enheten ligger platt. Ställ upp den så att kameran är vänd mot dig.</string> + <string name="hand_camera_upright">Ställ enheten mer upprätt så att kameran är vänd mot dig.</string> + <string name="hand_camera_not_seen">Kan inte se dig än. Kliv in i bild så att huvud och axlar syns.</string> + <string name="hand_camera_move_back">Ta ett steg bakåt.</string> + <string name="hand_camera_move_closer">Kom lite närmare.</string> + <string name="hand_camera_show_hands">Håll ut båda händerna där kameran kan se dem.</string> + <string name="hand_camera_good">Ser bra ut.</string> + <string name="hand_camera_failed">Kameran kunde inte startas. Stäng andra appar som använder den och försök igen.</string> + <string name="hand_camera_switch">Byt kamera</string> + <string name="hand_camera_skip">Hoppa över</string> + <string name="hand_camera_done">Klar</string> + <string name="glasses_xreal_network_missing">Väntar på glasögonens USB Ethernet-anslutning. Telefonen kanske inte gör den tillgänglig för appar.</string> + <string name="glasses_xreal_connection_failed">XREAL-anslutningen avbröts eller gav ett svar som inte stöds. Försöker igen…</string> + <string name="glasses_xreal_experimental">Experimentellt stöd för 1S. Använd Follow-läget och stäng av stabiliseringen i glasögonens meny. Spårningsriktningar och visningslägen behöver fortfarande testas på enheten.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard-läge</string> + <string name="cardboard_mode_hint">Bilder för vänster och höger öga till ett VR-headset för mobilen.</string> + <string name="cardboard_source">Bild</string> + <string name="cardboard_source_screen">Virtuell skärm</string> + <string name="cardboard_source_sbs">Sida vid sida-3D</string> + <string name="cardboard_viewer">Glasögon</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Ingen lins</string> + <string name="cardboard_ipd">Ögonavstånd</string> + <string name="cardboard_screen_width">Skärmbredd</string> + <string name="cardboard_screen_distance">Skärmavstånd</string> + <string name="cardboard_head_tracking">Huvudspårning</string> + <string name="cardboard_no_sensor">Den här enheten saknar rotationssensor.</string> + <string name="cardboard_recenter">Centrera vyn</string> + <string name="cardboard_recenter_button">Centrera</string> + <string name="cardboard_steamvr">SteamVR (experimentellt)</string> + <string name="cardboard_steamvr_install">Installera</string> + <string name="cardboard_steamvr_installing">Laddar ned och packar upp SteamVR…</string> + <string name="cardboard_steamvr_start">Starta</string> + <string name="cardboard_steamvr_stop">Stoppa</string> + <string name="cardboard_steamvr_unavailable">Inte tillgängligt i den här sessionen.</string> + <string name="cardboard_steamvr_failed">SteamVR svarade inte; kontrollera sessionsloggen.</string> + <string name="drawer_component_downloads">Ladda ned komponenter</string> + <string name="drawer_component_downloads_hint">Nedladdningar delas med sidan Komponenter. Välj en nedladdad version ovan för att använda den nästa gång ett spel startas.</string> + <string name="drawer_component_choose_download">Välj en version att ladda ned</string> + <string name="stores_fact_developer">Utvecklare</string> + <string name="stores_fact_publisher">Utgivare</string> + <string name="stores_fact_released">Släppt</string> + <string name="stores_hltb_main">Huvudspel</string> + <string name="stores_hltb_extras">+ Extra</string> + <string name="stores_hltb_completionist">Komplettering</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> + <string name="display_picture_position">Bildens position</string> + <string name="display_position_top">Överst</string> + <string name="display_position_bottom">Nederst</string> + <string name="display_position_center">Mitten (standard)</string> + <string name="setup_tab_storage">Lagring</string> + <string name="storage_measuring">Mäter lagring…</string> + <string name="storage_measuring_hint">Första gången tar några sekunder.</string> + <string name="storage_internal">Intern lagring</string> + <string name="storage_used_of">%1$s av %2$s använt</string> + <string name="storage_free">%1$s ledigt</string> + <string name="storage_droiddeck_uses">DroidDeck använder %1$s. Mätt %2$s.</string> + <string name="storage_rescanning">mäter igen…</string> + <string name="storage_other_apps">Andra Android-appar</string> + <string name="storage_safe_now">Kan frigöras nu</string> + <string name="storage_safe_hint">Oanvända körmiljöer, rester, gamla loggar</string> + <string name="storage_clean_up">Rensar…</string> + <string name="storage_session_running">Stoppa sessionen för att rensa eller ta bort något. Storlekarna syns fortfarande.</string> + <string name="storage_where">Vart det tar vägen</string> + <string name="storage_games">Steam-spel</string> + <string name="storage_game_data">Speldata</string> + <string name="storage_game_data_hint">Prefix %1$s · workshop %2$s · shaders %3$s</string> + <string name="storage_tools">Proton och körmiljöer</string> + <string name="storage_tools_unused">%1$s oanvänt</string> + <string name="storage_stores">GOG, Epic och andra butiker</string> + <string name="storage_stores_hint">Ta bort dem i Butiker</string> + <string name="storage_desktop">Skrivbordsappar</string> + <string name="storage_desktop_hint">Flatpak-appar och körmiljöer</string> + <string name="storage_system">Linux-systemet och Steam-klienten</string> + <string name="storage_system_hint">Behövs för att något ska kunna köras</string> + <string name="storage_app_data">DroidDeck-data</string> + <string name="storage_app_data_hint">Loggar från gamla sessioner %1$s · cache · drivrutiner</string> + <string name="storage_legend_games">Spel</string> + <string name="storage_legend_data">Speldata</string> + <string name="storage_legend_tools">Proton och körmiljöer</string> + <string name="storage_legend_stores">Andra butiker</string> + <string name="storage_legend_desktop">Skrivbordsappar</string> + <string name="storage_legend_system">Linux-systemet</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Rensa</string> + <string name="storage_clean_up_lede">Inget här rör installerade spel eller pågående hämtningar.</string> + <string name="storage_nothing_to_clean">Det finns inget att rensa just nu.</string> + <string name="storage_selected">Valt: %1$s · %2$s → %3$s frigörs</string> + <string name="storage_cleaning">Rensar…</string> + <string name="storage_free_button">Frigör %1$s</string> + <string name="storage_freed">Frigjorde %1$s.</string> + <string name="storage_item_runtimes">Oanvända Steam-körmiljöer och Proton</string> + <string name="storage_item_leftovers">Rester efter borttagna spel</string> + <string name="storage_item_leftovers_unsure">Rester som kan innehålla sparfiler</string> + <string name="storage_item_logs">Loggar från gamla sessioner</string> + <string name="storage_item_logs_detail">Loggar från den här sessionen finns kvar</string> + <string name="storage_item_custom_detail">Inget spel använder det. Installera om det under Komponenter om du behöver det.</string> + <string name="storage_item_shaders">Shadercache för installerade spel</string> + <string name="storage_item_shaders_detail">Byggs upp igen medan du spelar. Första minuterna av varje spel hackar igen.</string> + <string name="storage_tag_safe">Säkert</string> + <string name="storage_tag_unused">Oanvänt</string> + <string name="storage_tag_stutter">Hackningar</string> + <string name="storage_tag_saves">Kontrollera sparfiler</string> + <string name="storage_tag_default">Standard</string> + <string name="storage_tag_required">Behövs</string> + <string name="storage_tag_not_used">Oanvänt</string> + <string name="storage_back">Lagring</string> + <string name="storage_games_with_data">%1$s med sin data</string> + <string name="storage_sort_largest">Störst</string> + <string name="storage_sort_least_played">Minst spelade</string> + <string name="storage_sort_sd">På SD-kort</string> + <string name="storage_no_games">Det finns inga spel här.</string> + <string name="storage_played">spelat %1$s</string> + <string name="storage_never_played">Aldrig spelat</string> + <string name="storage_game_parts">Spel %1$s · data %2$s</string> + <string name="storage_uninstall">Avinstallera</string> + <string name="storage_games_note">Avinstallering öppnar Steam-fönstret så att Steam håller reda på det. För att flytta ett spel till SD-kortet använder du Steam › Inställningar › Lagring.</string> + <string name="storage_uninstall_title">Avinstallera %1$s?</string> + <string name="storage_uninstall_body">Steam öppnas och ber om bekräftelse. Det frigör spelets %1$s. Prefixet finns kvar tills du rensar resterna, och Steam Cloud-sparfiler ligger kvar på kontot.</string> + <string name="storage_open_steam">Öppna Steam</string> + <string name="storage_tools_detail">%1$s · %2$s oanvänt</string> + <string name="storage_remove_unused">Ta bort oanvänt · %1$s</string> + <string name="storage_in_use">Används</string> + <string name="storage_not_used">Oanvänt</string> + <string name="storage_remove">Ta bort</string> + <string name="storage_remove_title">Ta bort %1$s?</string> + <string name="storage_remove_body">Frigör %1$s. Steam hämtar det igen om ett spel behöver det.</string> + <string name="storage_tool_fex_runtime">Behövs för Linux x86-spel (FEX)</string> + <string name="storage_tool_arm_runtime">Behövs för ARM64-Proton</string> + <string name="storage_tool_redist">VC++- och DirectX-installationer som spel behöver</string> + <string name="storage_tool_fex">Kör Linux x86-spel</string> + <string name="storage_tool_steam">Steam-verktyg</string> + <string name="storage_tool_old_runtime">DroidDeck kör spel utan den här körmiljön</string> + <string name="storage_tool_x86_proton">Proton x86, som DroidDeck inte kan köra</string> + <string name="storage_tool_custom_default">Standard för alla spel</string> + <string name="storage_tool_custom_unused">Inget spel använder det</string> + <string name="storage_tool_custom_unknown">Steam-inställningarna går inte att läsa, så det behålls</string> + <string name="storage_cleanup_busy">Vänta tills lagringsrensningen är klar</string> + <string name="storage_low_title">Bara %1$s ledigt</string> + <string name="storage_low_body">Steam behöver utrymme för uppdateringar och shadercache. Under 10 GB kan speluppdateringar avbrytas halvvägs.</string> + <string name="storage_low_safe">%1$s kan frigöras säkert.</string> + <string name="storage_free_up">Frigör utrymme</string> + <string name="storage_play_anyway">Spela ändå</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d installerat</item> + <item quantity="other">%d installerade</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d på SD-kort</item> + <item quantity="other">%d på SD-kort</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d verktyg</item> + <item quantity="other">%d verktyg</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Tomma prefixmappar och shadercache från %d spel</item> + <item quantity="other">Tomma prefixmappar och shadercache från %d spel</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Prefixet för %d spel innehåller fortfarande filer, bland annat lokala sparfiler. Ta en kopia först om du behöver dem.</item> + <item quantity="other">Prefixen för %d spel innehåller fortfarande filer, bland annat lokala sparfiler. Ta en kopia först om du behöver dem.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d spel</item> + <item quantity="other">%d spel</item> + </plurals> + <string name="storage_tool_default_proton">DroidDecks standard-Proton</string> + <string name="storage_tool_proton">DroidDecks Proton 11-alternativ</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Används av %d spel</item> + <item quantity="other">Används av %d spel</item> + </plurals> + <string name="storage_legend_components">Komponenter</string> + <string name="storage_components">Komponenter</string> + <string name="storage_item_components">Oanvända komponenter</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Frigör %1$s. Lägg bara tillbaka en Proton-version som inte längre är installerad.</string> + <string name="storage_leftovers_unchecked">Inte kontrollerat: en Steam-apps manifest går inte att läsa, så prefix för borttagna spel ligger kvar tills det går.</string> + <string name="storage_failed">Misslyckades: %1$s</string> + <string name="storage_desktop_shared">%1$s delat</string> + <string name="storage_data_installed">Installerade spel</string> + <string name="storage_data_parts">Prefix %1$s · shaders %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Rensa shaders</string> + <string name="storage_data_leftovers">Borttagna spel</string> + <string name="storage_steam_app">Steam-app %1$d</string> + <string name="storage_leftover_unsure_detail">Prefixet innehåller fortfarande filer, kanske lokala sparfiler</string> + <string name="storage_leftover_confirm">Rensar Wine-prefixet och shadercachen (%1$s). Ta först en kopia av de sparfiler du behöver; Steam Cloud-sparfiler ligger kvar på kontot.</string> + <string name="storage_data_other">Behålls</string> + <string name="storage_data_other_title">Icke-Steam-spel och delat Steam-prefix</string> + <string name="storage_data_other_detail">Prefix för spel som lagts till via butiker eller manuellt</string> + <string name="storage_components_packages">Hämtade paket</string> + <string name="storage_components_originals">Behållna original</string> + <string name="storage_components_none">Inga komponentpaket hämtade.</string> + <string name="storage_component_in_use">Vald för en Proton eller ett spel</string> + <string name="storage_component_unused">Inte vald någonstans</string> + <string name="storage_original_kept">Lägger tillbaka den installerade Proton-versionen</string> + <string name="storage_original_old">Proton-version som inte längre är installerad</string> + <string name="storage_tag_in_use">Används</string> + <string name="storage_components_note">Komponenter som används är låsta. Välj dem under Komponenter; det du tar bort här kan hämtas igen där.</string> + <string name="storage_component_confirm">Frigör %1$s. Paket du importerat själv går inte att hämta igen.</string> + <string name="storage_desktop_detail">%1$s för Flatpak-appar och det de delar</string> + <string name="storage_desktop_apps_title">Appar</string> + <string name="storage_desktop_none">Inga Flatpak-appar installerade.</string> + <string name="storage_desktop_shared_title">Delas av apparna</string> + <string name="storage_desktop_runtimes">Körmiljöer</string> + <string name="storage_desktop_runtimes_detail">Biblioteken apparna kör på; oanvända försvinner med Ta bort oanvänt</string> + <string name="storage_desktop_cache">Hämtningslagring</string> + <string name="storage_desktop_cache_detail">Flatpaks objektlager och hämtade cache</string> + <string name="storage_desktop_prune">Ta bort oanvänt</string> + <string name="storage_desktop_prune_body">Tar bort körmiljöer som ingen installerad app behöver och städar Flatpaks objektlager. Installerade appar fortsätter fungera.</string> + <string name="storage_flatpak_uninstall_body">Tar bort appen (%1$s) och de körmiljöer ingen annan använder. Data i din hemkatalog finns kvar.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d paket</item> + <item quantity="other">%d paket</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d app</item> + <item quantity="other">%d appar</item> + </plurals> + <string name="boot_movie">Startvideo</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps ser jämnare ut men använder mer CPU medan Steam startar. En startvideo vald i Steams egna inställningar har företräde.</string> + <string name="boot_movie_sound">Ljud</string> + <string name="boot_movie_custom">Egen video</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV eller WebM. Andra format och filer över %1$d MB konverteras till 720p-WebM på enheten, upp till %2$d sekunder.</string> + <string name="boot_movie_import">Importera</string> + <string name="boot_movie_remove">Ta bort</string> + <string name="boot_movie_pick">Välj en startvideo</string> + <string name="boot_movie_imported">%1$s är nu startvideon</string> + <string name="boot_movie_imported_silent">%1$s är nu startvideon, utan ljud</string> + <string name="boot_movie_too_long">Videor som ska konverteras får vara högst %1$d sekunder</string> + <string name="boot_movie_converting">Konverterar %1$d %%</string> + <string name="boot_movie_converting_started">Konverterar %1$s för Steam. Håll DroidDeck öppet.</string> + <string name="boot_movie_unsupported">Enheten kan inte avkoda videon.</string> + <string name="boot_movie_import_failed">Kunde inte importera videon</string> + <string name="glasses_experimental">Luma Ultra-kameror — Experimentell</string> + <string name="glasses_joycons">Joy-Con-positionsspårning</string> + <string name="glasses_joycons_hint">Använd smartglasögonens kameror för att placera dina parade Joy-Con-kontroller. Rotation och knappinmatningar kommer från Joy-Con-kontrollerna. Positionen uppskattas när dina handleder är dolda. Ersätter kontroller som manövreras med bara händer och pausar telefonkameran. Rikta Joy-Con-kontrollerna framåt när du ansluter eller återställer spårningscentret.</string> + <string name="glasses_joycons_requires_position">Aktivera positionsspårning först. Kräver rörelsekompatibla Joy-Con-kontroller på Android 12 eller senare. Av som standard.</string> + <string name="setup_tab_glasses">Smarta glasögon</string> + <string name="setup_glasses_scope">Skärm- och huvudspårningsinställningar delas mellan DroidDeck-menyer, spel och skrivbordssessioner.</string> + <string name="setup_glasses_connect">Anslut smartglasögon för att ändra deras skärm- och spårningsinställningar. Dina sparade inställningar sparas när du kopplar från.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Visningsläge</string> + <string name="glasses_output_2d">2D-utgång</string> + <string name="glasses_output_3d">3D-utgång</string> + <string name="glasses_picture_group">Bild och virtuell skärm</string> + <string name="glasses_position_group">Position och golvnivå</string> + <string name="glasses_hands_group">Spårning av händer — Experimentell</string> + <string name="glasses_tracking_status">Spårningsstatus</string> + <string name="glasses_resolution_2d">2D-upplösning</string> + <string name="glasses_resolution_3d">3D-upplösning</string> + <string name="glasses_resolution_vr">VR-upplösning</string> + <string name="glasses_resolution_auto">Automatisk</string> + <string name="glasses_resolution_inherit">Samma som 2D/3D</string> + <string name="glasses_resolution_hint">Utgångsupplösning per öga.</string> + <string name="glasses_refresh_30_hint">Aktivera Spel på smarta glasögon för att välja skärmens ursprungliga 30 Hz-läge.</string> + <string name="glasses_3dof">3DoF virtuell skärm</string> + <string name="glasses_3dof_hint">Förankra platta spel framför dig så att du kan titta dig omkring. Aktiverar Spel på smarta glasögon utan att växla till 3D.</string> + <string name="glasses_screen_app_wide">Bredd och avstånd uppdaterar den spårade virtuella skärmen för DroidDeck-menyer, spel och skrivbordssessioner omedelbart.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Positionsspårning inkluderar huvudrotation i SteamVR. För spårning endast med rotation, stäng av positionsspårning.</string> + <string name="glasses_head_tracking_spatial_hint">Styr huvudrörelser på den virtuella skärmen. Positionsspårning inkluderar huvudrotation i SteamVR.</string> + <string name="glasses_quick_actions">Snabbåtgärder</string> + <string name="glasses_recenter_screen_hint">Titta dit du vill ha skärmen och återställ sedan spårningscentret för att ställa in dess höjd och riktning.</string> + <string name="glasses_recenter_joycons_button">Centrera Joy-Con igen</string> + <string name="phone_camera_tracking_group">Telefonkamera — Experimentell</string> + <string name="phone_camera_tracking_setting">Spåra händer eller Joy-Con-kontroller</string> + <string name="glasses_position">Positionsspårning — experimentell</string> + <string name="glasses_position_hint">Fysisk rörelse i VR och runt virtuella skärmar. Det tar en stund att starta om spårningen.</string> + <string name="glasses_eye_height">Aktuell ögonhöjd över golvet</string> + <string name="glasses_floor">Ställ in golvnivå från aktuell höjd</string> + <string name="glasses_floor_set">Ställ in golvnivå</string> + <string name="glasses_spatial_setup">Stereokamerainställningar och diagnostik</string> + <string name="glasses_spatial_setup_hint">Kontrollera kamerakalibreringen och spårningen av händerna innan du spelar.</string> + <string name="glasses_spatial_open">Öppna inställningar</string> + <string name="glasses_hands">Kontroller som används med bara händer</string> + <string name="glasses_hands_hint">Använd de smarta glasögons kameror för att sikta med händerna, nyp för att klicka och stäng handen för att gripa i VR. Gamepad-spakarna rör sig och vrider sig. Ersätter Joy-Con positionsspårning. Kan lagga eller förlora spårning under spel.</string> + <string name="glasses_hands_ready_hint">Aktivera kontroller som används med bara händer under Luma Ultra-kameror i Spårning. Visa öppna händer först.</string> + <string name="glasses_hands_base">Delad Luma Ultra-kalibrering</string> + <string name="glasses_hands_base_hint">Använd den delade Luma Ultra-basen. Kalibrera dina egna smarta glasögon för att verifiera deras noggrannhet.</string> + <string name="glasses_hands_calibration_verified">Uppmätt kalibrering verifierad</string> + <string name="glasses_hands_calibration_required">Validering krävs</string> + <string name="glasses_hands_calibration_required_hint">Kontroller som används med bara händer blir tillgängliga efter att den uppmätta avståndskontrollen har godkänts.</string> + <string name="tracking_recovery_lost">Spårning förlorad</string> + <string name="tracking_recovery_look">Titta långsamt omkring i ett väl upplyst rum.\nHåll spårningskamerorna borta och vänd dig mot möbler eller andra synliga detaljer.</string> + <string name="tracking_recovery_restart_help">Fortfarande fast? På din telefon: smarta glasögon → Spårning → Öppna inställning → Visa diagnostik → Starta om spårning.</string> + <string name="tracking_recovery_disconnected">Smarta glasögon bortkopplade</string> + <string name="tracking_recovery_connect">Kontrollera USB-anslutningen och anslut de smarta glasögonen igen.\nAcceptera USB-åtkomstprompten på din telefon om den visas.</string> + <string name="tracking_recovery_usb_help">När du är ansluten, titta långsamt runt i ett väl upplyst rum för att återställa spårningen.</string> + <string name="tracking_recovery_recenter">Omcentrering behövs</string> + <string name="tracking_recovery_recenter_steps">Spårningen har återvänt till en ny position.\nTitta framåt och tryck sedan på återställ spårningscenter på din telefon.</string> + <string name="tracking_recovery_recenter_help">Du kan även hitta återställning av spårningscenter i smarta glasögon → Spårning → Öppna inställningar. Din sparade kamerakalibrering sparas.</string> + <string name="tracking_recovery_stabilizing">Håll still ett ögonblick</string> + <string name="tracking_recovery_hold">Återställning av spårningscenter pågår.\nHåll de smarta glasögonen stilla medan spårningen stabiliseras.</string> + <string name="tracking_recovery_automatic">Den här skärmen stängs automatiskt när huvudspårning är klar.</string> + <string name="glasses_steady_hand_aim">Stabiliserad siktning med händerna</string> + <string name="glasses_steady_hand_aim_hint">Sikta från din axel genom din handflata. Stäng av för handledskontrollerad rotation.</string> + <string name="spatial_title">Rumsliga inställningar</string> + <string name="spatial_wait_tracking">Väntar på spårning...</string> + <string name="spatial_cameras_description">Vänster och höger spårningskameror</string> + <string name="spatial_camera_sync">Kamerasynkronisering</string> + <string name="spatial_ready">Klar</string> + <string name="spatial_sync_hint">Väntar på att kamera och huvudspårning ska ställa upp. Håll de smarta glasögonen anslutna.</string> + <string name="spatial_prepare">1. Förbered kalibreringsmålet</string> + <string name="spatial_print_actual">Skriv ut i verklig storlek</string> + <string name="spatial_print_hint">Varje kvadrat måste mäta 30 mm (1,181 tum). Montera arket plant på en styv yta i ett väl upplyst område.</string> + <string name="spatial_print">Skriv ut kalibreringsmönster</string> + <string name="spatial_capture_group">2. Fånga olika vyer</string> + <string name="spatial_board_stationary">Håll kalibreringsmålet stillastående</string> + <string name="spatial_capture_hint">Flytta de smarta glasögonen närmare, längre och i sidled. Vrid dem åt vänster/höger, vinkla dem upp/ned och luta dem i sidled. Behåll kalibreringsmålet i båda kamerorna och pausa en kort stund före varje tagning.</string> + <string name="spatial_start">Starta ny kalibrering</string> + <string name="spatial_wait_sync">Väntar på kamerasynkronisering.</string> + <string name="spatial_start_hint">Starta en ny kalibrering för att samla in vyer.</string> + <string name="spatial_views_hint">Håll kalibreringsmålet synligt i båda förhandsvisningarna. Fånga minst 24 skarpa vyer från olika vinklar.</string> + <string name="spatial_capturing">Fångar...</string> + <string name="spatial_capture">Fånga kalibreringsmålvy</string> + <string name="spatial_alignment">Beräkna kamerainriktning</string> + <string name="spatial_calculating">Beräknar...</string> + <string name="spatial_calculate">Beräkna kalibrering</string> + <string name="spatial_distance_group">3. Kontrollera avståndet</string> + <string name="spatial_distance">Uppmätt avstånd</string> + <string name="spatial_distance_hint">Börja med 12 tum eller 30 cm så att de tryckta markörerna är lättare att upptäcka. Välj det exakta mått du ska använda.</string> + <string name="spatial_camera_board_distance">Vänster kamera till mitten av kalibreringsmålet</string> + <string name="spatial_checking_distance">Kontrollerar avstånd...</string> + <string name="spatial_validate">Validera avstånd</string> + <string name="spatial_diagnostics">Diagnostik</string> + <string name="spatial_show_diagnostics">Visa diagnostik</string> + <string name="spatial_diagnostics_hint">Verktyg för återställning av kameratiming och spårning.</string> + <string name="spatial_camera_timing">Kameratiming</string> + <string name="spatial_hand_input">Indata från spårning av händer</string> + <string name="spatial_wait_timing">Väntar på kameratiming.</string> + <string name="spatial_frames">Kamerabilder</string> + <string name="spatial_gpu">GPU-detektering av händer</string> + <string name="spatial_gpu_hint">CPU är standard. GPU är experimentell och kan få SteamVR att starta om. Detta val återställs när spårningen startar om.</string> + <string name="spatial_lite">Lite detektering av händermodeller</string> + <string name="spatial_lite_hint">Använd Lite handflatsdetektor och Lite nyckelpunkter på händerna. Kontrollera siktnings-, nyp- och greppprecisionen. Återställs när spårningen startar om.</string> + <string name="spatial_adaptive">Automatisk ingångsfrekvens för spårning av händer</string> + <string name="spatial_adaptive_hint">Justera ingången till bearbetningshastighet. Återställs när spårningen startar om.</string> + <string name="spatial_half_rate">Begränsa ingångsfrekvensen för spårning av händer</string> + <string name="spatial_half_rate_hint">Använd hälften av kamerabilderna. Stäng av för att jämföra den maximala frekvensen. Återställs när spårningen startar om.</string> + <string name="spatial_diagnostic_capture">Diagnostisk infångning</string> + <string name="spatial_diagnostic_capture_hint">Spara ett stereobildpar lokalt. Bilder sparas endast på begäran.</string> + <string name="spatial_save_frame">Spara kamerabild</string> + <string name="spatial_restart_tracking">Starta om spårning</string> + <string name="spatial_restart_hint">Används om spårningen inte återhämtar sig i ett väl upplyst område. En omstart kräver ett nytt spårningsursprung.</string> + <string name="spatial_restart">Starta om</string> + <string name="spatial_restart_title">Starta om spårning?</string> + <string name="spatial_restart_confirm">Osparade kalibreringsvyer kommer att gå förlorade. Håll de smarta glasögonen stilla efteråt och återställ spårningscentret när spårningen återställs.</string> + <string name="spatial_views_count">%1$d / 24 visningar tagna</string> + <string name="spatial_capture_paused">Inspelning pausad: %1$s</string> + <string name="spatial_measure_hint">Mät %1$s. Visa hela kalibreringsmålet i båda förhandsvisningarna och håll sedan stilla.</string> + <string name="spatial_timing_values">%1$.1f Hz • bildålder %2$.1f ms • bearbetning %3$.1f ms</string> + <string name="spatial_input_values">Ingångsgräns %1$.1f Hz • %2$.0f%% för kamerabilder. Huvudspårning fortsätter med sin maximala frekvens.</string> + <string name="spatial_frame_counts">%1$d bearbetade • %2$d tappade • %3$d hoppade över inmatningsgräns</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra-kalibrering</string> + <string name="spatial_print_scale" formatted="false">Skriv ut vid 100%/verklig storlek. Varje kvadrat: 30 mm (1,181 tum).</string> + <string name="spatial_print_stationary">Håll kalibreringsmålet plant och stationärt; flytta de smarta glasögonen mellan bilderna.</string> + <string name="spatial_print_check">Skalkontroll: 100 mm (3,937 tum) mellan fästingar</string> + <string name="spatial_distance_12in">12 tum (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 tum)</string> + <string name="spatial_distance_20in">20 tum (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 tum)</string> + <string name="spatial_disabled">Inaktiverad</string> + <string name="spatial_wait_stable">Väntar på stabil spårning</string> + <string name="spatial_disconnected">Frånkopplad</string> + <string name="spatial_hands_off">Styrenheter som manövreras med bara händer är avstängda</string> + <string name="spatial_tracking_off">Positionsspårning är avstängd eller smarta glasögon är bortkopplade</string> + <string name="spatial_recenter_pending">Återställning av spårningscenter begärs — håll still medan spårningen stabiliseras</string> + <string name="spatial_tracking_lost">Spårning förlorad – möta ett väl upplyst område med synliga detaljer</string> + <string name="spatial_origin_changed">Spårningsursprung ändras — tryck på återställ spårningscenter och håll sedan still</string> + <string name="spatial_active">6DoF aktiv</string> + <string name="spatial_connect_hint">Anslut Luma Ultra och aktivera positionsspårning.</string> + <string name="spatial_validation_session">Kalibrering verifierad för denna anslutning.</string> + <string name="spatial_validation_saved">Kalibrering verifierad och sparad.</string> + <string name="spatial_wait_cameras">Väntar på stereokameror</string> + <string name="spatial_wait_hands">Väntar på spårning av händer</string> + <string name="spatial_collect_instructions">Håll 5 × 7 kalibreringsmålet stillastående. Fånga 24+ vyer medan du flyttar och roterar de smarta glasögonen.</string> + <string name="spatial_capture_pending">Väntar på nästa kamerabild. Håll de smarta glasögonen stilla.</string> + <string name="spatial_validation_pending">Kontrollerar nästa kamerabild. Håll hela kalibreringsmålet synligt och håll stilla.</string> + <string name="spatial_start_first">Starta kalibreringen först</string> + <string name="spatial_no_camera_frame">Ingen ny kamerabild kom. Kontrollera anslutningen för smarta glasögon och kameraförhandsvisningar och försök sedan igen.</string> + <string name="spatial_clock_reset">Kameraklockan återställd</string> + <string name="spatial_frame_changed">Spårningskoordinatsystemet har ändrats. Dina vyer sparas för omberäkning. Återställ spårningscenter och starta sedan en ny uppsättning för att fånga fler vyer.</string> + <string name="spatial_device_loaded">enhetskalibrering laddad</string> + <string name="spatial_base_loaded">Luma Ultra-baskalibrering laddad</string> + <string name="spatial_calibration_needed">kalibrering krävs</string> + <string name="spatial_tap_start">Tryck på Starta ny kalibrering först.</string> + <string name="spatial_capture_recenter_pending">Återställning av spårningscenter väntar på stabil spårning. Håll still en stund.</string> + <string name="spatial_capture_recenter">Spårning ändras. Tryck på återställ spårningscenter en gång och håll sedan still innan du fångar.</string> + <string name="spatial_capture_unsynchronized">Bilden avvisades: huvudspårningen var inte synkroniserad eller ändrades under bildtagningen. Håll stilla och försök igen.</string> + <string name="spatial_align_first">Beräkna kamerainriktningen innan du kontrollerar avståndet.</string> + <string name="spatial_processing_failed">kamerabehandling misslyckades</string> + <string name="spatial_hand_head_changed">Huvudspårningen ändrades under detektering av händer</string> + <string name="spatial_hand_wait_sync">Väntar på kamera- och huvudsynkronisering</string> + <string name="spatial_no_wrists">Inga handleder upptäcktes. Håll dina Joy-Con-handtag framför de smarta glasögonen</string> + <string name="spatial_no_hands">Inga händer upptäckts. Visa öppna handflattor framför de smarta glasögonen</string> + <string name="spatial_one_camera_wrists">Handleder synliga i endast en kamera; håll dina kontroller i den delade vyn</string> + <string name="spatial_one_camera_hands">Händer synliga i endast en kamera; håll båda handflatorna i den delade vyn</string> + <string name="spatial_ambiguous_hands">Båda kamerorna ser händer, men vänster/höger-matchning är tvetydig</string> + <string name="spatial_inconsistent_depth">Händer upptäcktes, men stereodjupet är inkonsekvent</string> + <string name="spatial_rejected_wrist">Handledsposition avvisad av stereo- eller rörelsekontroller</string> + <string name="spatial_inconsistent_palm">Stereopunkter upptäcktes, men palmgeometrin är inkonsekvent</string> + <string name="spatial_hands_need_calibration">Komplett kalibrering och avståndskontrollen för att aktivera händer</string> + <string name="spatial_hands_wait_stable">Väntar på stabil huvudspårning; återställ spårningscenter om det begärs.</string> + <string name="spatial_old_frame">Kameraobservation är för gammal; väntar på ett nytt par</string> + <string name="spatial_fit_ready">Fit %1$.2f px. Mät det valda avståndet från den vänstra kameran till kalibreringsmålets centrum och validera sedan.</string> + <string name="spatial_opencv_error">OpenCV inte tillgängligt: %1$s</string> + <string name="spatial_restored">%1$d sparade vyer återställda. Beräkna kalibreringen för att försöka igen, eller starta en ny uppsättning för att fånga mer.</string> + <string name="spatial_captured">Fångad %1$d / 24 visningar. Håll kalibreringsmålet fixerat; flytta de smarta glasögonen för nästa vy.</string> + <string name="spatial_capture_corners">Bilden avvisades: %1$d / 12 nödvändiga hörn synliga i båda kamerorna. Visa mer av kalibreringsmålet, håll stilla och försök sedan igen.</string> + <string name="spatial_validation_error">Avståndskontrollen kunde inte avslutas: %1$s. Försök igen.</string> + <string name="spatial_inference_error">Detektering av händer otillgänglig: %1$s. Byt CPU/GPU eller växla kontroller som manövreras med bara händer för att försöka igen.</string> + <string name="spatial_hand_timeout">Detektering av händer överskred %1$d ms; observation förkastad</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con handledspositioner uppmätt med stereo</string> + <string name="spatial_palms_tracked">Spårade handflator: %1$d / 2; nypgest redo: %2$d; greppgest redo: %3$d</string> + <string name="spatial_capture_saved">Sparad diagnostik till %1$s</string> + <string name="spatial_hand_error">Spårning av händer stoppade: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Huvudspårning och kalibreringsmålet inte överensstämmer med %1$s (gräns 5 cm / 2 in). Håll kalibreringsmålet fixerat och vänta på stadig spårning innan du startar en ny uppsättning. Vrid och luta de smarta glasögonen försiktigt; pausa före varje tagning.</string> + <string name="spatial_need_views">Fånga minst 24 olika vyer av det stationära kalibreringsmålet.</string> + <string name="spatial_need_rotation">Vrid de smarta glasögonen åt vänster och höger och luta dem upp och ner; rörelse utan rotation kan inte kalibrera kamerainriktningen.</string> + <string name="spatial_bad_baseline">Otrolig kamerabaslinje</string> + <string name="spatial_need_orientations">Flytta huvudet genom mer varierande orienteringar.</string> + <string name="spatial_bad_rotation">Ogiltig kamera-till-huvud-rotation</string> + <string name="spatial_bad_alignment">Kamera-till-huvud-inriktningen är inkonsekvent.</string> + <string name="spatial_calibration_error">Kalibreringen kunde inte avslutas. %1$s Dina tagna vyer sparas.</string> + <string name="spatial_reprojection_error">Uthållet omprojektionsfel %1$.2f px överstiger 2 px. Omkalibrera.</string> + <string name="spatial_distance_corners">%1$d / 24 rutiga hörn upptäckts i båda kamerorna. Håll hela kalibreringsmålet synligt och håll stilla. Om det redan är synligt, välj 12 tum eller 30 cm och mät det närmare avståndet innan du försöker igen.</string> + <string name="spatial_distance_depth">Kalibreringsmålet är synligt, men dess djup kunde inte mätas tillförlitligt. Håll de smarta glasögonen stilla och håll kalibreringsmålet plant och väl upplyst, försök sedan igen.</string> + <string name="spatial_distance_invalid">Kameramåttet var ogiltigt. Håll still och försök igen.</string> + <string name="spatial_distance_passed">Avståndskontroll godkänd.</string> + <string name="spatial_distance_retry">Kontrollera avståndet från vänster kamera till kalibreringsmålets mitt och försök sedan igen.</string> + <string name="spatial_distance_result">Kameror uppmätt %1$s; valt avstånd %2$s. %3$s</string> + <string name="spatial_wait_previews">Vänta på båda kameraförhandsvisningarna innan du börjar kalibrera.</string> + <string name="spatial_saved_views_hint">Sparade vyer kan räknas om. Starta en ny kalibrering för att fånga i det aktuella spårningskoordinatsystemet.</string> + <string name="spatial_model_checksum_error">Kontrollsumman för handmodellen inte överensstämmer</string> + <string name="spatial_opencv_load_error">OpenCV kunde inte laddas</string> + <string name="glasses_6dof">Virtuell skärm med 6DoF</string> +</resources> diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml new file mode 100644 index 0000000000..c9cac80c45 --- /dev/null +++ b/app/src/main/res/values-th/strings.xml @@ -0,0 +1,2862 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">กราฟิกของ SteamVR หยุดทำงาน</string> + <string name="steamvr_recovery_countdown">DroidDeck จะรีสตาร์ทใน %1$d วินาทีเพื่อรีเซ็ตกราฟิกและเปิด SteamVR อีกครั้ง เกมที่กำลังเล่นอยู่จะถูกปิด และความคืบหน้าที่ยังไม่ได้บันทึกจะกู้คืนไม่ได้</string> + <string name="steamvr_recovery_repeated">ปัญหากราฟิกกลับมาอีกหลังรีสตาร์ทไปไม่นาน จึงหยุดการกู้คืนอัตโนมัติไว้ชั่วคราวเพื่อไม่ให้วนซ้ำ การรีสตาร์ทจะปิดเกมของคุณ และความคืบหน้าที่ยังไม่ได้บันทึกจะกู้คืนไม่ได้</string> + <string name="steamvr_recovery_restart">รีสตาร์ทเลย</string> + <string name="steamvr_recovery_cancel">เปิดไว้ต่อ</string> + <string name="steamvr_recovery_restarting">กำลังรีเซ็ตกราฟิกและเปิด SteamVR อีกครั้ง…</string> + <string name="steamvr_recovery_failed">DroidDeck รีสตาร์ทโดยอัตโนมัติไม่ได้ ปิดแอปให้สนิทแล้วเปิดใหม่อีกครั้ง</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>การเริ่มใช้งานครั้งแรกจะดาวน์โหลด Steam ซึ่งอาจใช้เวลาสักครู่</item> + <item>ตามค่าเริ่มต้น การออกจากแอปจะหยุด Steam ไว้ชั่วคราว แล้วกลับมาทำงานต่อจากจุดเดิมเมื่อคุณเปิดแอปอีกครั้ง</item> + <item>คอนโทรลเลอร์ของคุณจะปรากฏเป็นจอย Xbox 360 หากไม่เช่นนั้นให้ใช้ปุ่มควบคุมบนหน้าจอ</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>การเริ่มใช้งานครั้งแรกจะตั้งค่าเดสก์ท็อป ซึ่งอาจใช้เวลาสักครู่</item> + <item>ตามค่าเริ่มต้น การออกจากแอปจะหยุดเซสชันไว้ชั่วคราว แล้วกลับมาทำงานต่อจากจุดเดิมเมื่อคุณเปิดแอปอีกครั้ง</item> + <item>การสัมผัสหน้าจอทำงานเหมือนทัชแพด ลากเพื่อเลื่อนตัวชี้ แตะเพื่อคลิก</item> + <item>คอนโทรลเลอร์ของคุณจะปรากฏเป็นจอย Xbox 360 หากไม่เช่นนั้นให้ใช้ปุ่มควบคุมบนหน้าจอ</item> + </string-array> + <string name="session_channel">เซสชัน</string> + <string name="session_channel_description">แสดงขณะมีเซสชัน Steam หรือเดสก์ท็อปเปิดอยู่</string> + <string name="session_notification">Steam กำลังทำงาน</string> + <string name="session_notification_downloads">กำลังดาวน์โหลดใน Steam</string> + <string name="session_notification_paused">หยุดเซสชันไว้ชั่วคราว - แตะดำเนินการต่อเมื่อพร้อม</string> + <string name="resume_session">ดำเนินการต่อ</string> + <string name="suspend_now">หยุดชั่วคราวตอนนี้</string> + <string name="stop_session">หยุดเซสชัน</string> + <string name="frame_gen_title">การสร้างเฟรม</string> + <string name="frame_gen_hint">เลือกโหมดการสร้างเฟรม</string> + <string name="frame_gen_off">ปิด</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG แบบปรับอัตโนมัติ %1$d</string> + <string name="lsfg_needs_steam">ต้องมี Lossless Scaling บน Steam</string> + <string name="lsfg_needs_install">ติดตั้ง Lossless Scaling ใน Steam หรือนำเข้า Lossless.dll</string> + <string name="lsfg_import">นำเข้า Lossless.dll…</string> + <string name="lsfg_using_steam">ใช้ชุดที่มาจาก Steam</string> + <string name="lsfg_using_import">ใช้ชุดที่นำเข้ามา</string> + <string name="lsfg_pick_title">เลือก Lossless.dll</string> + <string name="lsfg_imported">นำเข้า Lossless.dll แล้ว</string> + <string name="lsfg_import_unchanged">Lossless.dll นี้ถูกใช้งานอยู่แล้ว</string> + <string name="lsfg_import_not_owned">บัญชี Steam นี้ไม่ได้เป็นเจ้าของ Lossless Scaling</string> + <string name="lsfg_import_invalid">ไฟล์นี้ไม่ใช่ Lossless.dll ของ Lossless Scaling</string> + <string name="lsfg_import_failed">ไม่สามารถเตรียม LSFG จาก Lossless.dll นี้ได้</string> + <string name="lsfg_problem_missing">LSFG ต้องใช้ Lossless Scaling จาก Steam หรือ Lossless.dll ที่นำเข้ามา</string> + <string name="lsfg_problem_failed">LSFG ไม่สามารถเตรียมเชดเดอร์จาก Lossless.dll ได้</string> + <string name="hud_fg_unsupported">%1$s: ไม่รองรับ</string> + <string name="hud_fg_failed">%1$s: เอนจินล้มเหลว</string> + <string name="hud_fg_needs_lossless">%1$s: ต้องใช้ Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · กำลังเริ่ม</string> + <string name="second_library_import_hint">เพิ่มไลบรารี Steam และสแกนหาเกม Windows เกมที่เป็นเจ้าของอยู่แล้วจะใช้รายการ Steam เดิม ส่วนที่เหลือจะกลายเป็นช็อตคัตแบบไม่ใช่ Steam</string> + <string name="game_env_title">สภาพแวดล้อมของเกม</string> + <string name="game_env_hint">ตัวแปรสภาพแวดล้อมสำหรับเกม Proton</string> + <string name="game_env_edit">แก้ไข</string> + <string name="game_env_shared">เกม Proton ทั้งหมด</string> + <string name="game_env_scope">โปรไฟล์</string> + <string name="game_env_app_id">รหัสแอป Steam</string> + <string name="game_env_open">เปิด</string> + <string name="game_env_profile">เกม %1$s</string> + <string name="game_env_add">เพิ่มตัวแปร</string> + <string name="game_env_name">ชื่อตัวแปร</string> + <string name="game_env_value">ค่า</string> + <string name="game_env_save">บันทึก</string> + <string name="game_env_remove">ลบ</string> + <string name="game_env_restore">รับค่าสืบทอดอีกครั้ง</string> + <string name="game_env_reset">ล้างการปรับแต่งสภาพแวดล้อม</string> + <string name="game_env_unset">ยกเลิกสำหรับโปรไฟล์นี้</string> + <string name="game_env_empty">ไม่มีตัวแปรที่ตั้งไว้</string> + <string name="game_env_inherited">สืบทอดมา</string> + <string name="game_env_custom">ตัวแปรกำหนดเอง</string> + <string name="game_env_error">โหลดหรือบันทึกไม่ได้ ตรวจสอบพื้นที่จัดเก็บว่าง แล้วลองใหม่</string> + <string name="game_env_invalid">ใช้ชื่อที่ถูกต้องและค่าที่มีความยาวไม่เกิน 8192 ตัวอักษร</string> + <string name="game_env_unused">รันไทม์ Proton มาตรฐานไม่อ่านตัวแปรนี้</string> + <string name="game_env_loading">กำลังโหลด…</string> + <string name="game_env_feature">การปรับแต่งระดับคุณสมบัติ D3D12 12_2 รายงานความสามารถ DirectX 12 Ultimate คุณสมบัติที่ไม่รองรับอาจทำงานล้มเหลว เว้นค่าไว้เพื่อให้ตรวจหาโดยอัตโนมัติ</string> + <string name="game_env_shader">การปรับแต่งโมเดลเชดเดอร์ D3D12 6_9 ต้องใช้ VKD3D รุ่นใหม่พอและคุณสมบัติ GPU ที่ตรงกัน เว้นค่าไว้เพื่อให้ตรวจหาโดยอัตโนมัติ</string> + <string name="game_env_cache">เปิดใช้แคชเชดเดอร์ของ Mesa เพื่อลดการคอมไพล์ซ้ำ false จะเปิดใช้แคช</string> + <string name="game_env_cache_size">ขนาดสูงสุดของแคชเชดเดอร์ Mesa เช่น 1G แคชที่ใหญ่ขึ้นจะใช้พื้นที่จัดเก็บมากขึ้น</string> + <string name="game_env_vkd3d_config">ตัวเลือก VKD3D สำหรับ D3D12 nodxr ปิดการเรย์เทรซิง ใช้เฉพาะกับเกมที่จำเป็นต้องปิด</string> + <string name="game_env_proton_log">ตั้งเป็น 1 เพื่อบันทึกล็อกวินิจฉัยของ Proton การบันทึกล็อกอาจลดประสิทธิภาพและใช้พื้นที่จัดเก็บ</string> + <string name="game_env_wined3d">ตั้งเป็น 1 เพื่อใช้ WineD3D แบบ OpenGL แทน DXVK สำหรับทดสอบความเข้ากันได้ของ D3D9–11</string> + <string name="game_env_no_ntsync">ตั้งเป็น 1 เพื่อให้เกมนี้ไม่ใช้ ntsync (droiddeck-ntsync หรือไดรเวอร์เคอร์เนล) โดยจะใช้ droiddeck-esync เมื่อมีแพ็กที่เหมาะสม มิฉะนั้นใช้ droiddeck-fsync</string> + <string name="game_env_no_esync">ตั้งเป็น 1 เพื่อปิด droiddeck-esync สำหรับเกมนี้ โดยจะใช้ droiddeck-fsync แทน หรือ droiddeck-ntsync เมื่อ fsync ปิดอยู่ด้วย</string> + <string name="game_env_no_fsync">ตั้งเป็น 1 เพื่อให้เกมนี้ไม่ใช้ droiddeck-fsync โดยจะใช้ droiddeck-esync เมื่อมีแพ็กที่เหมาะสม มิฉะนั้นใช้ droiddeck-ntsync</string> + <string name="game_env_fsync_first">ตั้งเป็น 1 เพื่อให้เกมนี้ทำงานบน droiddeck-fsync หรือ 0 เพื่อให้ droiddeck-esync มาก่อนเมื่อมีแพ็กที่เข้ากับ Proton นี้</string> + <string name="game_env_xalia">ตั้งเป็น 0 เพื่อปิดตัวช่วยควบคุมด้วยคอนโทรลเลอร์ของ Proton สำหรับเกมนี้</string> + <string name="game_env_hud">โอเวอร์เลย์ DXVK สำหรับ D3D9–11 fps จะแสดงอัตราเฟรม หากไม่ตั้งค่าจะซ่อนไว้</string> + <string name="game_env_dxvk_config">ตั้งค่า DXVK คั่นด้วยเซมิโคลอน รุ่นใหม่ใช้ dxvk.maxFrameRate สำหรับจำกัดเฟรมเรต ควรใช้ตัวจำกัดเฟรมของเซสชันสำหรับการเล่นทั่วไป</string> + <string name="game_env_vkd3d_limit">ขีดจำกัดอัตราเฟรม D3D12 0 คือไม่จำกัด</string> + <string name="game_env_glthread">การทำเธรด OpenGL ของ Mesa true อาจช่วยเกม OpenGL ที่ติดขัดจาก CPU ทดสอบดูตามแต่ละเกม</string> + <string name="sync_backend_title">การซิงค์ของ Wine</string> + <string name="sync_backend_hint">วิธีที่เกมประสานเธรดให้ตรงกัน จะมีผลในเซสชันถัดไป</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">ค่าตั้งล่วงหน้าของ FEX</string> + <string name="fex_next_launch">จะมีผลในการเปิดเกมครั้งถัดไป</string> + <string name="game_settings_title">เกม</string> + <string name="fex_default_label">ค่าเริ่มต้นของ FEX</string> + <string name="fex_default_detail">ใช้ค่าเริ่มต้นของ FEX</string> + <string name="fex_stability_label">เสถียรภาพ</string> + <string name="fex_stability_detail">ตั้งค่าที่ปลอดภัยที่สุดแต่ช้าที่สุด</string> + <string name="fex_compatibility_label">ความเข้ากันได้</string> + <string name="fex_compatibility_detail">TSO เต็มรูปแบบพร้อมมัลติบล็อก</string> + <string name="fex_intermediate_label">ระดับกลาง</string> + <string name="fex_intermediate_detail">TSO แบบสมดุลพร้อมลดความแม่นยำ x87</string> + <string name="fex_performance_label">ประสิทธิภาพ</string> + <string name="fex_performance_detail">ปิด TSO ทั้งหมด พร้อมมัลติบล็อก</string> + <string name="fex_performance_tso_label">ประสิทธิภาพ + TSO</string> + <string name="fex_performance_tso_detail">ค่าตั้งประสิทธิภาพพร้อมเปิด TSO หลัก</string> + <string name="fex_extreme_label">สูงสุด</string> + <string name="fex_extreme_detail">ปิดการตรวจสอบโค้ดที่ปรับเปลี่ยนตัวเอง เกมที่ใช้ JIT และ DRM อาจทำงานผิดพลาด</string> + <string name="fex_extreme_tso_label">สูงสุด + TSO</string> + <string name="fex_extreme_tso_detail">ค่าตั้งระดับสูงสุดพร้อมเปิด TSO หลัก</string> + <string name="fex_extreme_gn_label">สูงสุด-gn</string> + <string name="fex_extreme_gn_detail">ประสิทธิภาพพร้อมคำแนะนำ TSC และข้อมูลเมตา ควรลองก่อนสูงสุด</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">ประสิทธิภาพพร้อมตรวจสอบโค้ดเต็มรูปแบบและซ่อนบิตไฮเปอร์ไวเซอร์</string> + <string name="game_env_custom_value">ค่ากำหนดเอง</string> + <string name="game_env_select_value">เลือกค่า</string> + <string name="user_apps_section">โปรแกรมจำลองและแอป</string> + <string name="user_apps_add">เพิ่ม</string> + <string name="user_apps_add_detail">แอปหรือเกมของคุณเอง</string> + <string name="user_apps_kind_script">สคริปต์</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">กำลังเริ่ม…</string> + <string name="user_apps_added">เพิ่ม %1$s แล้ว</string> + <string name="user_apps_removed">ลบ %1$s แล้ว</string> + <string name="user_apps_back">เดสก์ท็อป</string> + <string name="user_apps_gone">แอปนั้นหายไปแล้ว เลือกใหม่จากเดสก์ท็อป</string> + <string name="user_apps_open">เปิด %1$s</string> + <string name="user_apps_remove">ลบ</string> + <string name="user_apps_remove_confirm">กดอีกครั้งเพื่อลบ</string> + <string name="user_apps_stop_session">หยุดเซสชันก่อนเพื่อลบ</string> + <string name="user_apps_script_linked">เรียกใช้ %1$s จากโฟลเดอร์ของมัน โดยเชื่อมโยงเข้าสู่เซสชันในตำแหน่งเดิม การลบแอปจะไม่กระทบโฟลเดอร์นั้น</string> + <string name="user_apps_script_copied">เรียกใช้ %1$s จากสำเนาโฟลเดอร์ของมันภายใน DroidDeck การลบแอปจะลบสำเนานี้ ไม่ใช่ต้นฉบับ</string> + <string name="user_apps_runtime_required">ติดตั้งรันไทม์ Linux ก่อน</string> + <string name="user_apps_file_gone">ไฟล์หายไปแล้ว</string> + <string name="user_apps_no_space">พื้นที่ว่างไม่พอ: การคัดลอกโฟลเดอร์ต้องใช้ %1$s</string> + <string name="user_apps_copying">กำลังคัดลอก %1$s</string> + <string name="user_apps_failed">เพิ่มแอปไม่สำเร็จ</string> + <string name="user_apps_github_checking">กำลังค้นหารุ่นที่เผยแพร่ของ %1$s</string> + <string name="user_apps_github_unreachable">ไม่สามารถอ่านรุ่นที่เผยแพร่ของ %1$s ได้</string> + <string name="user_apps_github_no_appimage">รุ่นที่เผยแพร่ของ %1$s ไม่มี AppImage แบบ ARM64 หรือ x86_64</string> + <string name="user_apps_downloading">กำลังดาวน์โหลด %1$s</string> + <string name="user_apps_download_failed">ดาวน์โหลดไม่สำเร็จ</string> + <string name="user_apps_update_failed">อัปเดตแอปไม่สำเร็จ</string> + <string name="user_apps_icon_failed">ไม่สามารถอ่านไอคอนนั้นได้</string> + <string name="user_apps_saved">บันทึก %1$s แล้ว</string> + <string name="user_apps_edit">แก้ไข</string> + <string name="user_apps_check_updates">ตรวจสอบการอัปเดต</string> + <string name="user_apps_checking_updates">กำลังตรวจสอบการอัปเดต…</string> + <string name="user_apps_update_to">อัปเดตเป็น %1$s</string> + <string name="user_apps_up_to_date">เป็นรุ่นล่าสุดแล้ว · %1$s</string> + <string name="user_apps_updated">อัปเดต %1$s แล้ว</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">เพิ่มแอป</string> + <string name="add_app_tab_script">สคริปต์</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">ไฟล์ .sh จะรันจากโฟลเดอร์ของตัวเอง แบบเต็มจอภายใต้ gamescope</string> + <string name="add_app_appimage_hint">AppImage แบบ ARM64 (aarch64) หรือแบบ x86_64 ที่รันผ่าน FEX จะถูกแตกไฟล์เข้าสู่รันไทม์ Linux เพียงครั้งเดียว</string> + <string name="add_app_github_hint">ติดตั้ง AppImage แบบ ARM64 จากรุ่นที่เผยแพร่ล่าสุดของที่เก็บ หรือแบบ x86_64 ผ่าน FEX</string> + <string name="app_fex_title">ใช้ FEX</string> + <string name="app_fex_auto">อัตโนมัติ</string> + <string name="app_fex_on">เปิด</string> + <string name="app_fex_off">ปิด</string> + <string name="app_fex_hint">FEX รันโปรแกรม Linux x86 บนอุปกรณ์ ARM64 นี้ อัตโนมัติจะใช้งานเมื่อโปรแกรมถูกสร้างมาสำหรับ x86</string> + <string name="app_fex_x86">%1$s ผ่าน FEX</string> + <string name="app_fex_not_ready">โปรแกรมนี้สร้างมาสำหรับพีซี %1$s และรันผ่าน FEX ซึ่งยังไม่ได้ตั้งค่า เปิด Steam สักครั้งขณะลงชื่อเข้าใช้: DroidDeck จะดาวน์โหลด FEX และ Steam Linux Runtime ที่จำเป็น จากนั้นโปรแกรมนี้จะเปิดขึ้น</string> + <string name="session_end_program">โปรแกรมนี้</string> + <string name="session_end_fex_missing">%1$s สร้างมาสำหรับพีซี x86 และรันผ่าน FEX ซึ่งยังไม่ได้ติดตั้ง เริ่ม Steam สักครั้งขณะลงชื่อเข้าใช้และให้ดาวน์โหลด FEX และ Steam Linux Runtime จากนั้นเริ่มโปรแกรมนี้อีกครั้ง</string> + <string name="add_app_flatpak_hint">รหัสแอป Flathub หรือหน้า Flathub ของมัน จะตั้งค่า Flatpak ก่อนหากยังไม่ได้ตั้งค่า</string> + <string name="add_app_file">ไฟล์</string> + <string name="add_app_no_file">ยังไม่เลือกไฟล์</string> + <string name="add_app_choose_file">เลือกไฟล์</string> + <string name="add_app_change_file">เปลี่ยน</string> + <string name="add_app_pick_script">เลือกสคริปต์</string> + <string name="add_app_pick_appimage">เลือก AppImage</string> + <string name="add_app_pick_icon">เลือกไอคอน</string> + <string name="add_app_repository">ที่เก็บ</string> + <string name="add_app_repository_placeholder">owner/repo หรือลิงก์ github.com</string> + <string name="add_app_repository_invalid">ไม่ใช่ที่เก็บ GitHub</string> + <string name="add_app_flatpak_id">รหัสแอป</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">ไม่ใช่รหัสแอป Flathub</string> + <string name="add_app_flatpak_bundle_hint">หรือไฟล์ .flatpak สำหรับแอปที่ไม่มีใน Flathub</string> + <string name="add_app_pick_flatpak">เลือกไฟล์ .flatpak</string> + <string name="add_app_source">แหล่งที่มา</string> + <string name="add_app_appearance">บนเดสก์ท็อปของคุณ</string> + <string name="add_app_preview_name">แอปใหม่</string> + <string name="add_app_name">ชื่อ</string> + <string name="add_app_name_placeholder">จากตัวแอป</string> + <string name="add_app_icon">ไอคอน</string> + <string name="add_app_icon_default">ไอคอนเริ่มต้น</string> + <string name="add_app_choose_icon">เลือกไอคอน</string> + <string name="add_app_clear_icon">ล้าง</string> + <string name="add_app_icon_suggestions">จากที่เก็บ</string> + <string name="add_app_icon_searching">กำลังค้นหาไอคอน…</string> + <string name="add_app_icon_reset">ค่าเริ่มต้น</string> + <string name="edit_app_title">แก้ไข %1$s</string> + <string name="edit_app_save">บันทึก</string> + <string name="add_app_checking_folder">กำลังตรวจสอบโฟลเดอร์…</string> + <string name="add_app_folder_linked">โฟลเดอร์ของมันเชื่อมโยงเข้าสู่เซสชัน: %1$s</string> + <string name="add_app_folder_copied">โฟลเดอร์ของมันมีโปรแกรม Linux ซึ่งพื้นที่จัดเก็บที่ใช้ร่วมกันไม่สามารถรันได้ จึงถูกคัดลอกเข้าสู่ DroidDeck (%1$s)</string> + <string name="add_app_confirm">เพิ่ม</string> + <string name="add_app_cancel">ยกเลิก</string> + <string name="add_app_runtime_required">ติดตั้งรันไทม์ Linux จากการตั้งค่าก่อน</string> + <string name="add_app_busy">รอให้ %1$s เสร็จก่อน</string> + <string name="steam_compat_label">เข้ากันได้</string> + <string name="proton_compatible_note">บิลด์ที่มีเครื่องหมาย “%1$s” ในเมนู Compatibility ของ Steam มีการแก้ไข prefix ของ DroidDeck และสามารถเริ่มเกมบนอุปกรณ์นี้ได้ ค่าเริ่มต้นคือ Proton Experimental ARM64 (%1$s) หรือ Proton 11.0 ARM64 (%1$s) เมื่อติดตั้งบิลด์ใหม่กว่านั้นแล้ว รายการ Proton ของ Valve เองที่ไม่มีเครื่องหมายนี้ไม่สามารถเริ่มเกมบนอุปกรณ์นี้ได้</string> + <string name="proton_installed_compatible">ติดตั้งแล้ว %1$s · %2$s</string> + <string name="common_cancel">ยกเลิก</string> + <string name="common_auto">อัตโนมัติ</string> + <string name="common_never">ไม่เลย</string> + <string name="common_always">เสมอ</string> + <string name="common_uninstall">ถอนการติดตั้ง</string> + <string name="common_check">ตรวจสอบ</string> + <string name="common_update">อัปเดต</string> + <string name="common_checking">กำลังตรวจสอบ…</string> + <string name="common_working">กำลังดำเนินการ…</string> + <string name="common_forget">ลืม</string> + <string name="common_add_ellipsis">เพิ่ม…</string> + <string name="common_use">ใช้</string> + <string name="common_applies_next_session">จะมีผลในเซสชันถัดไป</string> + <string name="mode_steam_title">เซสชัน Steam</string> + <string name="mode_desktop_title">เซสชันเดสก์ท็อป</string> + <string name="mode_display">หน้าจอ</string> + <string name="mode_resolution">ความละเอียด</string> + <string name="mode_res_720">สูงสุด 720p</string> + <string name="mode_res_900">สูงสุด 900p</string> + <string name="mode_res_1080">สูงสุด 1080p</string> + <string name="mode_res_native">ความละเอียดจริง</string> + <string name="mode_res_default">%1$s (ค่าเริ่มต้น)</string> + <string name="mode_res_custom_value">กำหนดเอง · %1$d×%2$d</string> + <string name="mode_res_custom">กำหนดเอง…</string> + <string name="mode_res_note">720p อาจทำให้เมนูตอบสนองไวขึ้น</string> + <string name="mode_ratio">อัตราส่วนหน้าจอ</string> + <string name="mode_ratio_custom">กำหนดโดยความละเอียดกำหนดเอง</string> + <string name="mode_ratio_auto">อัตโนมัติใช้อย่างน้อย 16:9</string> + <string name="mode_fps">ขีดจำกัดเฟรม</string> + <string name="mode_fps_note">จำกัดทั้งเซสชัน หน้าจอจะเปลี่ยนไปใช้อัตรารีเฟรชที่หารขีดจำกัดได้พอดี</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">เอาต์พุต HDR10</string> + <string name="mode_hdr_unavailable">ไม่พร้อมใช้งาน: %1$s</string> + <string name="mode_hdr_restart">รีสตาร์ทแอปเพื่อให้มีผล</string> + <string name="mode_drivers">ไดรเวอร์</string> + <string name="mode_gpu_drivers">ไดรเวอร์ GPU</string> + <string name="mode_gpu_drivers_hint">ใช้ร่วมกันระหว่าง Steam และเดสก์ท็อป ตั้งค่าได้ที่หน้า Components</string> + <string name="mode_touch_controls">การสัมผัสและการควบคุม</string> + <string name="mode_touch">การสัมผัส</string> + <string name="mode_touch_touchpad">ทัชแพด</string> + <string name="mode_touch_direct">โดยตรง</string> + <string name="mode_touch_note">อัตโนมัติ: ทัชแพดในเดสก์ท็อป โดยตรงใน Steam</string> + <string name="mode_osc">ปุ่มควบคุมบนหน้าจอ</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">อัตโนมัติจะแสดงปุ่มควบคุมเมื่อไม่มีคอนโทรลเลอร์เชื่อมต่ออยู่</string> + <string name="osc_steam_touch">การสัมผัสของ Steam (ทดลอง)</string> + <string name="osc_style_next_session">ปุ่มสัมผัสของ Steam จะเริ่มใช้งานในเซสชัน Steam ถัดไป</string> + <string name="osc_steam_layout">รูปแบบปุ่มสัมผัสของ Steam</string> + <string name="osc_steam_layout_hint">ย้าย ปรับขนาด หรือซ่อนปุ่มสัมผัสของเกมนี้ บันทึกไปยัง Steam</string> + <string name="mode_controller">คอนโทรลเลอร์</string> + <string name="mode_controller_hint">วิธีที่ Steam มองเห็นคอนโทรลเลอร์ของคุณ จะมีผลในเซสชันถัดไป</string> + <string name="mode_controller_deck">คอนโทรลเลอร์ Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">คอนโทรลเลอร์ Xbox 360</string> + <string name="mode_controller_note">Deck: ปุ่ม Quick Access และไจโร Steam Controller: เหมือนกัน พร้อมเซนเซอร์แรงจับที่ปุ่มด้านหลัง DualShock 4 และ DualSense: ไจโร และแทร็กแพดทำหน้าที่เป็นทัชแพด Xbox 360: เปิด Quick Access ด้วย Guide+A</string> + <string name="mode_back">กลับ</string> + <string name="back_menu_then_qam">เมนู → QAM</string> + <string name="back_qam_then_menu">QAM → เมนู</string> + <string name="mode_session">เซสชัน</string> + <string name="mode_suspend">การทำงานในพื้นหลัง</string> + <string name="mode_suspend_hint">เมื่อซ่อนแอปหรือปิดหน้าจอ</string> + <string name="mode_suspend_manual">กำหนดเอง</string> + <string name="mode_suspend_native">ดั้งเดิม</string> + <string name="mode_suspend_steam_note">อัตโนมัติจะหยุดชั่วคราวและดำเนินการต่อเมื่อแสดงผล ดั้งเดิมเตรียม Steam เข้าสู่โหมดพักก่อน กำหนดเองรอการกดดำเนินการต่อ ไม่มีวันทำงานต่อเนื่องตลอด</string> + <string name="mode_background_downloads">ให้การดาวน์โหลดทำงานต่อไป</string> + <string name="mode_background_downloads_hint">เลื่อนการหยุดพื้นหลังชั่วคราวออกไปขณะ Steam กำลังดาวน์โหลดอยู่</string> + <string name="mode_zram">การบีบอัด zRAM</string> + <string name="mode_zram_hint">ระหว่างเล่นเกม หน่วยความจำของไคลเอนต์ Steam จะถูกบีบอัดลง zram ของอุปกรณ์ ทำให้เกมได้ RAM มากขึ้น มีผลเมื่อเริ่ม Steam ครั้งถัดไป</string> + <string name="mode_zram_unsupported">ใช้ไม่ได้: อุปกรณ์นี้ไม่มี zram หรือ swap หรือเคอร์เนลเก่ากว่า 5.4</string> + <string name="mode_suspend_note">อัตโนมัติจะหยุดชั่วคราวเมื่ออยู่ในพื้นหลังและดำเนินการต่อเมื่อแสดงผล กำหนดเองรอการกดดำเนินการต่อ ไม่มีวันทำงานต่อเนื่องตลอด</string> + <string name="mode_startup">การเริ่มทำงาน</string> + <string name="mode_steam_startup">เริ่ม Steam พร้อมกับ DroidDeck</string> + <string name="mode_steam_startup_hint">เปิดเซสชัน Steam เมื่อ DroidDeck เริ่มทำงาน</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">กำลังค้นหารุ่นที่เผยแพร่…</string> + <string name="mode_decky_ready">พร้อมติดตั้ง %1$s</string> + <string name="mode_decky_none">ไม่พบบิลด์ที่เข้ากันได้ ลองใหม่อีกครั้งในหลัง</string> + <string name="mode_decky_installed">ติดตั้งแล้ว · %1$s</string> + <string name="mode_decky_update">มีอัปเดต · %1$s</string> + <string name="mode_decky_current">เป็นรุ่นล่าสุดแล้ว · %1$s</string> + <string name="mode_decky_loader">ตัวโหลด</string> + <string name="mode_decky_install_latest">ติดตั้งรุ่นล่าสุด</string> + <string name="mode_decky_on">เริ่มพร้อมกับ Steam เมื่อเปิดใช้งาน แอปอื่นบนอุปกรณ์นี้อาจสามารถควบคุม Steam ได้</string> + <string name="mode_decky_off">ปิดอยู่ พอร์ตดีบักระยะไกลของ Steam ยังคงปิดอยู่</string> + <string name="mode_decky_remove_title">ถอนการติดตั้ง Decky Loader?</string> + <string name="mode_decky_remove_text">ลบตัวโหลดออก พลักอินและการตั้งค่าของคุณจะยังคงอยู่</string> + <string name="mode_client">ไคลเอนต์</string> + <string name="mode_mangoapp">โอเวอร์เลย์แสดงประสิทธิภาพ</string> + <string name="mode_mangoapp_hint">ปิดหากเกมขัดข้องหรือจอดำในโหมด Deck จะมีผลในเซสชันถัดไป</string> + <string name="mode_steam_repair">ซ่อมแซมไคลเอนต์ Steam</string> + <string name="mode_steam_repair_hint">ดาวน์โหลดไคลเอนต์ Steam ใหม่อีกครั้งในครั้งถัดไปที่ Steam เริ่มทำงาน ใช้เมื่อ Steam ค้างอยู่ที่หน้าจอโหลด เกม การลงชื่อเข้าใช้ และการตั้งค่ายังคงอยู่</string> + <string name="mode_steam_repair_queued">ไคลเอนต์ Steam จะถูกดาวน์โหลดใหม่อีกครั้งในครั้งถัดไปที่ Steam เริ่มทำงาน</string> + <string name="mode_steam_repair_button">ซ่อมแซม</string> + <string name="mode_added_art">ภาพปก</string> + <string name="mode_sgdb_key">คีย์ API ของ SteamGridDB</string> + <string name="mode_sgdb_key_yours">คีย์ของคุณ</string> + <string name="mode_sgdb_edit">แก้ไข…</string> + <string name="mode_added_art_hint">เติมภาพปกที่ขาดไปจาก Steam จากนั้นจาก SteamGridDB ไฟล์ cover.jpg, hero.jpg, logo.png หรือ icon.png ของคุณเองในโฟลเดอร์เกมจะมีสิทธิ์ก่อน</string> + <string name="summary_remove_game">ลบ %1$s</string> + <string name="mode_added_remove_confirm">ลบหรือไม่?</string> + <string name="games_add">เพิ่มเกม</string> + <string name="games_add_title">เพิ่มเกม:</string> + <string name="games_pick_exe_title">เลือกไฟล์ exe:</string> + <string name="games_add_unreachable">ตำแหน่งนี้ไม่พร้อมใช้งานในเซสชัน</string> + <string name="mode_added_exe_check">ตรวจสอบไฟล์ exe นี้</string> + <string name="wincomp_title">คอมโพเนนต์ของ Windows</string> + <string name="wincomp_pad_hint">LB / RB สลับระหว่างส่วนต่าง ๆ</string> + <string name="wincomp_card_none">ไม่มี</string> + <string name="wincomp_applies">DLL ของ Windows ที่ Proton ไม่มีให้ จากรายการคอมโพเนนต์ เปิดใช้รายการที่เกมนี้ต้องการ: รายการเหล่านั้นจะถูกใส่ไว้ในโฟลเดอร์ Windows ของเกมเอง ไม่ใช่ไฟล์ของเกม และจะคงอยู่ไม่ว่าเกมจะรันบน Proton รุ่นใด</string> + <string name="wincomp_offline">ไม่สามารถเข้าถึงรายการคอมโพเนนต์ได้ คอมโพเนนต์ที่ดาวน์โหลดไว้แล้วยังสามารถสลับได้</string> + <string name="wincomp_recommended">แนะนำสำหรับเกมนี้</string> + <string name="wincomp_checking">กำลังตรวจสอบว่าเกมนี้ต้องการอะไร…</string> + <string name="wincomp_when_online">พร้อมใช้งานเมื่อออนไลน์</string> + <plurals name="wincomp_turning_on"> + <item quantity="other">กำลังเปิดใช้คอมโพเนนต์ %1$d รายการ…</item> + </plurals> + <string name="wincomp_auto_section">เปิดใช้สำหรับเกมนี้</string> + <string name="wincomp_auto_steam">Steam ติดตั้ง %1$s ร่วมกับ %2$s (แอป %3$s)</string> + <string name="wincomp_auto_gog">จากรายการของ GOG สำหรับเกมนี้</string> + <string name="wincomp_auto_epic">จากข้อกำหนดเบื้องต้นของ Epic สำหรับเกมนี้</string> + <string name="wincomp_auto_amazon">จากขั้นตอนติดตั้งของ Amazon สำหรับเกมนี้</string> + <string name="wincomp_steam_by_name">Steam ติดตั้ง %1$s ร่วมกับแอป %2$s โดยจับคู่ตามชื่อ</string> + <string name="wincomp_suggestions">ยังมีการแนะนำเพิ่ม</string> + <string name="wincomp_suggestion_reason">แนะนำโดย %1$s; ไม่ใช่คอมโพเนนต์ในที่นี้</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">เกมนี้มี %1$s มาด้วย</string> + <string name="wincomp_found_shipped">เกมนี้มี %1$s (ส่วนมากใช้งานได้ตามเดิม)</string> + <string name="wincomp_already_here">มีอยู่ในเกมนี้แล้ว</string> + <string name="wincomp_no_recommendation">ไม่มีสิ่งใดในโฟลเดอร์เกมที่ชี้ไปยังคอมโพเนนต์</string> + <string name="wincomp_active">ติดตั้งสำหรับเกมนี้ (%1$d)</string> + <string name="wincomp_all">คอมโพเนนต์ทั้งหมด (%1$d)</string> + <string name="wincomp_installers">ต้องใช้ตัวติดตั้งของ Windows (%1$d)</string> + <string name="wincomp_installers_note">รายการเหล่านี้เป็นโปรแกรมติดตั้งของตัวเอง ไม่มีแพ็กเกจภายในให้แยกส่วน และยังไม่มีการบันทึกสิ่งที่ติดตั้ง ส่วนใหญ่เป็นรันไทม์รุ่นเก่าที่ Mono ภายใน Proton ทำหน้าที่แทนอยู่แล้ว การบันทึกจะถูกเพิ่มเมื่อจัดทำแล้ว</string> + <string name="wincomp_show">แสดง</string> + <string name="wincomp_hide">ซ่อน</string> + <string name="wincomp_needs_installer">รันโปรแกรมติดตั้งของตัวเอง (ยังไม่มีการบันทึก)</string> + <string name="wincomp_unsupported">ยังไม่รองรับในที่นี้</string> + <string name="wincomp_loading">กำลังโหลดคอมโพเนนต์…</string> + <string name="wincomp_failed">ติดตั้งไม่ได้: %1$s</string> + <string name="wincomp_downloaded">ดาวน์โหลดแล้ว</string> + <string name="wincomp_downloading">กำลังดาวน์โหลด %1$s</string> + <string name="wincomp_installing">กำลังติดตั้ง: %1$s</string> + <string name="wincomp_reverting">กำลังปิดใช้…</string> + <string name="wincomp_download_size">ดาวน์โหลด %1$s</string> + <string name="wincomp_next_launch">จะมีผลในครั้งถัดไปที่เริ่มเกม</string> + <string name="mode_stretch169">ยืดเกม 16:9</string> + <string name="mode_stretch169_hint">บนหน้าจอที่เป็นสี่เหลี่ยมจัตุรัสกว่า 16:9 จะยืดเกมให้เต็มจอแทนการแสดงแถบดำ จะมีผลในเซสชันถัดไป</string> + <string name="mode_audio">เสียง</string> + <string name="mode_directaudio">DirectAudio สำหรับเกม</string> + <string name="mode_directaudio_hint">ข้าม PulseAudio เพื่อลดความหน่วง</string> + <string name="mode_mic">ไมโครโฟน</string> + <string name="mode_mic_hint">สำหรับการแชทด้วยเสียง</string> + <string name="mode_network">เครือข่าย</string> + <string name="mode_wifi_discovery">การค้นหา Wi-Fi</string> + <string name="mode_wifi_discovery_hint">แสดงชื่อ Wi-Fi และเครือข่ายใกล้เคียงใน Steam</string> + <string name="mode_wifi_location_off">บริการตำแหน่งปิดอยู่</string> + <string name="mode_wifi_permission_denied">ไม่ได้รับสิทธิ์ตำแหน่ง</string> + <string name="mode_wifi_open_settings">เปิดการตั้งค่า</string> + <string name="mode_wifi_continue">ดำเนินการต่อ</string> + <string name="mode_wifi_explain_title">เปิดการค้นหา Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android กำหนดให้ต้องมีสิทธิ์ตำแหน่งเพื่ออ่านชื่อ Wi-Fi และค้นหาเครือข่ายใกล้เคียง DroidDeck ใช้สิทธิ์นี้เพื่อแสดงเครือข่ายเหล่านั้นใน Steam เราไม่ติดตามตำแหน่งของคุณ การเข้าถึงอินเทอร์เน็ตทำงานได้โดยไม่ต้องมีสิทธิ์นี้</string> + <string name="mode_storage">พื้นที่จัดเก็บเกม</string> + <string name="mode_storage_auto">อัตโนมัติ - การ์ด SD เมื่อมีอยู่ รวมกับโฟลเดอร์ Games ของคุณ</string> + <string name="mode_storage_auto_none">อัตโนมัติ - โฟลเดอร์ Games ของคุณ รวมกับการ์ด SD เมื่อมีอยู่ (ยังไม่มีในขณะนี้)</string> + <string name="mode_storage_internal">พื้นที่ภายในเท่านั้น</string> + <string name="mode_storage_folder">โฟลเดอร์: %1$s</string> + <string name="mode_second_library">ไลบรารีที่สอง</string> + <string name="mode_storage_note">เกมที่สตรีมข้อมูลจาก SD หรือพื้นที่จัดเก็บที่ใช้ร่วมกันอาจกระตุก</string> + <string name="mode_storage_diagnostics">การวินิจฉัยพื้นที่จัดเก็บ</string> + <string name="mode_storage_diagnostics_hint">บันทึกผลการจัดสรรและเวลาพื้นที่จัดเก็บที่สุ่มตรวจไว้ในล็อกที่แชร์ อาจทำให้การติดตั้งช้าลงขณะเปิดใช้งาน จะมีผลในเซสชันถัดไป</string> + <string name="mode_choose_folder">เลือกโฟลเดอร์…</string> + <string name="mode_custom_res_title">ความละเอียดกำหนดเอง</string> + <string name="mode_custom_res_text">แทนที่ขีดจำกัดและอัตราส่วน ขนาดที่ไม่ตรงกับหน้าจอจะมีแถบดำ</string> + <string name="mode_width">ความกว้าง</string> + <string name="mode_height">ความสูง</string> + <string name="mode_custom_res_range">ระหว่าง 320×240 ถึง 3840×2160</string> + <plurals name="mode_added_count"> + <item quantity="other">%1$d เกม</item> + </plurals> + <string name="common_ok">ตกลง</string> + <string name="common_delete">ลบ</string> + <string name="common_restore">คืนค่า</string> + <string name="common_download">ดาวน์โหลด</string> + <string name="common_delete_named">ลบ %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">ไดรเวอร์รันไทม์</string> + <string name="comp_runtime_driver_hint">ใช้โดย Steam เกม และเดสก์ท็อป จะมีผลในเซสชันถัดไป</string> + <string name="comp_import_turnip">นำเข้า Turnip zip…</string> + <string name="comp_display_driver">ไดรเวอร์แสดงผล</string> + <string name="comp_display_driver_hint">วาดเฟรมบนหน้าจอในทั้งสองโหมด รีสตาร์ทแอปเพื่อให้มีผล</string> + <string name="comp_import_adrenotools">นำเข้า AdrenoTools zip…</string> + <string name="comp_never">ไม่เคย</string> + <string name="comp_nightlies_checked">ตรวจสอบ Nightlies ครั้งล่าสุด %1$s</string> + <string name="comp_title">Components</string> + <string name="comp_about">เกี่ยวกับ Components</string> + <string name="comp_check_drivers">ตรวจสอบไดรเวอร์ใหม่</string> + <string name="comp_check_nightlies">ตรวจสอบแพ็กเกจใหม่ใน Nightlies</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Proton ที่เลือกไว้ที่นี่จะรันทุกเกมที่ยังไม่ได้เลือก Proton ของตัวเองใน Steam และการเปลี่ยนแปลงใน Steam ก็จะแสดงที่นี่ด้วย Steam จะแทนที่ Proton ของ Valve เมื่ออัปเดต ต้นฉบับจะถูกเก็บไว้ตามแต่ละบิลด์</string> + <string name="comp_scope">การตั้งค่า</string> + <string name="comp_profile_configure">ตั้งค่าโปรไฟล์</string> + <string name="comp_profile">โปรไฟล์</string> + <string name="comp_scope_general">โปรไฟล์เริ่มต้น</string> + <string name="comp_scope_general_detail">ใช้โดยอัตโนมัติกับเกมที่ไม่มีการปรับแต่งเฉพาะ</string> + <string name="comp_profile_game_detail">การตั้งค่าที่บันทึกไว้จะใช้โดยอัตโนมัติเมื่อ %1$s เปิดขึ้น</string> + <string name="comp_game_hint">เลือกเฉพาะการตั้งค่าที่เกมนี้ต้องการ ส่วนที่เหลือจะยังใช้โปรไฟล์เริ่มต้นต่อไป</string> + <string name="comp_game_fex">ค่าตั้งล่วงหน้าของ FEX</string> + <string name="comp_game_fex_inherited">ใช้ค่าตั้งล่วงหน้าจากโปรไฟล์เริ่มต้น</string> + <string name="comp_game_fex_override">บันทึกค่าตั้งล่วงหน้ากำหนดเองสำหรับเกมนี้แล้ว</string> + <string name="comp_game_fex_custom">ตัวแปร FEX กำหนดเอง</string> + <string name="comp_game_use_general">ใช้ค่าเริ่มต้น</string> + <string name="comp_game_compatibility">ความเข้ากันได้ของเกม</string> + <string name="comp_game_environment_hint">ตัวเลือกสภาพแวดล้อมของ Proton, DXVK, VKD3D และการซิงค์สำหรับเกมนี้</string> + <string name="comp_game_proton_inherited">ใช้ Proton จากโปรไฟล์เริ่มต้น</string> + <string name="comp_game_proton_override">บันทึก Proton กำหนดเองสำหรับเกมนี้ผ่านการจับคู่ความเข้ากันได้ของ Steam แล้ว</string> + <string name="comp_no_proton_short">ไม่มี Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">ใช้แพ็กเกจของโปรไฟล์เริ่มต้นจาก %1$s เว้นแต่เกมนี้เลือกแพ็กเกจอื่น</string> + <string name="comp_game_component_general">ใช้แพ็กเกจคอมโพเนนต์ของโปรไฟล์เริ่มต้น</string> + <string name="comp_game_component_override">ใช้ %1$s เฉพาะสำหรับเกมนี้เท่านั้น</string> + <string name="comp_game_runtime_options">ตัวเลือกรันไทม์</string> + <string name="comp_game_environment_other_hint">ตัวเลือกสภาพแวดล้อมอื่น ๆ ของ Proton, DXVK, VKD3D-Proton และการซิงค์เฉพาะเกม</string> + <string name="comp_game_saved_next">บันทึกโปรไฟล์ของ %1$s ไว้สำหรับการเปิดเกมครั้งถัดไป</string> + <string name="game_no_steam_title">เริ่มโดยไม่ใช้ Steam</string> + <string name="game_no_steam_detail">เปิดใน Proton/FEX โดยไม่ใช้ไคลเอนต์ Steam ฟีเจอร์ของ Steam จะปิดอยู่</string> + <string name="game_no_steam_on">เปิด</string> + <string name="game_steam_with">เริ่มพร้อม Steam</string> + <string name="game_steam_without">เริ่มโดยไม่ใช้ Steam</string> + <string name="game_settings_card">การตั้งค่า</string> + <string name="game_settings_menu_title">การตั้งค่า %1$s</string> + <string name="game_settings_default">ค่าเริ่มต้น</string> + <string name="game_settings_default_detail">คืนทุกอย่างที่เปลี่ยนสำหรับเกมนี้กลับเป็นการตั้งค่าของแอป</string> + <string name="game_sync_custom">ตัวแปรซิงก์แบบกำหนดเอง</string> + <string name="comp_game_proton_live">บันทึกการเลือก Proton ของ %1$s แล้ว และพร้อมใช้งานใน Steam ตอนนี้</string> + <string name="comp_game_proton_next">บันทึกการเลือก Proton ของ %1$s แล้ว รีสตาร์ท Steam ก่อนเปิดเกม</string> + <string name="comp_game_proton_not_runnable">%1$s ไม่สามารถใช้ Proton ที่เลือกบนอุปกรณ์นี้ได้</string> + <string name="comp_game_load_failed">ไม่สามารถโหลดโปรไฟล์ของ %1$s ได้: %2$s</string> + <string name="comp_game_save_failed">ไม่สามารถบันทึกโปรไฟล์เกมได้: %1$s</string> + <string name="comp_game_reset">รีเซ็ตโปรไฟล์เกม</string> + <string name="comp_game_reset_title">รีเซ็ตโปรไฟล์ของ %1$s?</string> + <string name="comp_game_reset_body">ลบการปรับแต่ง Proton, FEX, แพ็กเกจคอมโพเนนต์, สภาพแวดล้อม, การกรองพื้นผิว และคอมโพเนนต์ Windows ของเกมนี้หรือไม่? เกมจะใช้โปรไฟล์เริ่มต้นแทน</string> + <string name="comp_game_reset_done">%1$s ใช้โปรไฟล์เริ่มต้นแล้วตอนนี้</string> + <string name="comp_game_reset_failed">ไม่สามารถรีเซ็ตโปรไฟล์เกมได้ทั้งหมด: %1$s</string> + <string name="comp_default_live">%1$s รันทุกเกมที่ยังไม่ได้เลือก Proton ของตัวเองใน Steam แล้วตอนนี้</string> + <string name="comp_default_next">%1$s จะรันทุกเกมที่ยังไม่ได้เลือก Proton ของตัวเอง ตั้งแต่ครั้งถัดไปที่ Steam เริ่มทำงาน</string> + <string name="comp_default_not_runnable">%1$s ไม่สามารถเริ่มเกมบนอุปกรณ์นี้ได้ จึงไม่สามารถเป็นค่าเริ่มต้นได้</string> + <string name="comp_default_failed">ไม่สามารถบันทึก Proton เริ่มต้นได้: %1$s</string> + <string name="comp_swapped">%1$s · สลับแล้ว %2$d รายการ</string> + <string name="comp_all_original">%1$s · เป็นต้นฉบับทั้งหมด</string> + <string name="comp_game_running_suffix">%1$s · เกมกำลังทำงาน</string> + <string name="comp_esync_pack">%1$s · แพ็ก droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · ยังไม่มีแพ็ก droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · มี esync อยู่ในตัวแล้ว ไม่ต้องใช้แพ็ก</string> + <string name="comp_gpu_drivers">ไดรเวอร์ GPU</string> + <string name="comp_reapplied">%1$s · นำมาใช้ใหม่เมื่อเปิด %2$s</string> + <string name="comp_next_queued">ถัดไป: %1$s · หลังจากปิดเกม</string> + <string name="comp_in_use">กำลังใช้ %1$s: %2$s</string> + <string name="comp_waits">รอจนกว่าเกมจะปิด</string> + <string name="comp_applies_next_game">จะมีผลในครั้งถัดไปที่เกมเริ่มทำงาน</string> + <string name="comp_import_zip">นำเข้า .zip</string> + <string name="comp_reading">กำลังอ่าน Proton…</string> + <string name="comp_no_proton">ยังไม่มี Proton ติดตั้งอยู่ เริ่ม Steam สักครั้งเพื่อดาวน์โหลด Proton ARM64 ของมัน หรือเพิ่ม GE-Proton, CachyOS หรือ DroidDeck-Proton จากการตั้งค่า</string> + <string name="comp_original">ต้นฉบับ · %1$s</string> + <string name="comp_this_build">%1$s · บิลด์นี้</string> + <string name="comp_earlier_build">%1$s · บิลด์ก่อนหน้า</string> + <string name="comp_installed_count">ติดตั้งแล้ว · %1$d</string> + <string name="comp_nothing_stored">ยังไม่มีอะไรบันทึกไว้สำหรับ %1$s ไฟล์ดั้งเดิมของ Proton นี้ถูกบันทึกเป็นต้นฉบับ</string> + <string name="comp_waits_long">มีเกมกำลังทำงานบน Proton นี้ ดังนั้นจะรอจนกว่าเกมจะปิด</string> + <string name="comp_applies_long">จะมีผลในครั้งถัดไปที่เกมเริ่มทำงาน</string> + <string name="comp_swap_title">สลับ %1$s?</string> + <string name="comp_swap_body">ใส่ %1$s เข้าไปใน %2$s หรือไม่? ไฟล์ต้นฉบับจะยังถูกบันทึกไว้ %3$s</string> + <string name="comp_restore_title">คืนค่า %1$s?</string> + <string name="comp_restore_body">นำต้นฉบับของ %1$s กลับมาไว้ใน %2$s หรือไม่? %3$s</string> + <string name="comp_delete_package_body">ลบแพ็กเกจออกจากแอป คุณสามารถดาวน์โหลดใหม่ได้อีก</string> + <string name="comp_delete_original_title">ลบต้นฉบับนี้?</string> + <string name="comp_delete_original_body">ต้นฉบับ %1$s นี้มาจากบิลด์ก่อนหน้าของ %2$s ต้นฉบับของบิลด์ปัจจุบันจะถูกเก็บไว้เสมอ</string> + <string name="comp_nightlies_count">ใน Nightlies · %1$d</string> + <string name="comp_refresh_to_list">รีเฟรชเพื่อแสดงรายการแพ็กเกจใน Nightlies</string> + <string name="comp_nothing_new">ไม่มีอะไรใหม่ตั้งแต่การตรวจสอบครั้งล่าสุด</string> + <string name="comp_import_wcp">นำเข้า .wcp</string> + <string name="comp_restore_original">คืนค่าต้นฉบับของ Proton นี้</string> + <string name="comp_restore_original_body">นำต้นฉบับ %2$s ของ %1$s กลับมาหรือไม่?</string> + <string name="comp_swap">สลับ</string> + <string name="comp_about_text">FEX, DXVK และ VKD3D-Proton สำหรับ Proton แต่ละตัวที่ Steam ใช้รันเกม\n\nเลือกแถวที่ติดตั้งไว้เพื่อสลับเข้าใช้งาน จะมีผลในครั้งถัดไปที่เกมเริ่มทำงาน หรือหลังจากเกมที่กำลังทำงานปิดลง\n\nตัวเลือกของคุณจะถูกตรวจสอบใหม่ก่อนการเริ่มเกมทุกครั้ง และนำกลับมาใช้หากมีสิ่งใดเปลี่ยนไป ไฟล์ต้นฉบับของ Proton แต่ละตัวจะถูกเก็บไว้ ดังนั้นการอัปเดตของ Steam จะไม่ทำให้สูญหาย</string> + <string name="comp_tag_original">ต้นฉบับ</string> + <string name="comp_tag_in_use">ใช้งานอยู่</string> + <string name="comp_tag_new">ใหม่</string> + <string name="comp_tag_stored">บันทึกไว้</string> + <string name="perf_title">ประสิทธิภาพ</string> + <string name="perf_lede">คอร์ CPU การแก้ไขเซสชัน และชื่อโฮสต์ จะมีผลในเซสชันถัดไป</string> + <string name="perf_client_cores_group">คอร์สำหรับไคลเอนต์ Steam</string> + <string name="perf_override">กำหนดคอร์เองแทนการเลือกของ Steam</string> + <string name="perf_override_hint">ตรึง Steam ตัวช่วย UI และ gamescope ไว้ที่คอร์ด้านล่าง</string> + <string name="perf_client_cores">คอร์ไคลเอนต์</string> + <string name="perf_client_cores_on">คอร์สำหรับ Steam</string> + <string name="perf_client_cores_off">เปิดการกำหนดเองเพื่อเลือก</string> + <string name="perf_game_cores_group">คอร์สำหรับเกม</string> + <string name="perf_game_cores">คอร์เกม</string> + <string name="perf_game_cores_hint">คอร์สำหรับเกม เมื่อเลือกทั้งหมด Android จะจัดสรรได้อย่างอิสระ</string> + <string name="perf_client_ui">อินเทอร์เฟซไคลเอนต์</string> + <string name="perf_glthread">GL แบบเธรด</string> + <string name="perf_glthread_hint">อาจทำให้เมนู Steam ตอบสนองไวขึ้น</string> + <string name="perf_zink">Zink: descriptor แบบเลซี่</string> + <string name="perf_zink_hint">แนะนำสำหรับไดรเวอร์ที่ไม่มี descriptor buffer</string> + <string name="perf_noglerror">ข้ามการตรวจสอบข้อผิดพลาด GL</string> + <string name="perf_noglerror_hint">ปิดการตรวจสอบความถูกต้องของ GL ในทุกการเรียก</string> + <string name="perf_gsrealtime">gamescope: คิว GPU แบบเรียลไทม์</string> + <string name="perf_gsrealtime_hint">ให้ความสำคัญกับงาน GPU ของตัวประกอบภาพก่อน อาจทำให้การเรียงเฟรมราบรื่นขึ้นโดยแลกกับประสิทธิภาพของเกมบางส่วน</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">ตรึง GPU ไว้ที่ความเร็วสัญญาณนาฬิกาสูงสุด</string> + <string name="perf_gpuclock_hint">สำหรับ Adreno เท่านั้น สะดุดน้อยลง แต่ใช้แบตเตอรี่และเกิดความร้อนมากขึ้น</string> + <string name="perf_fixes">การแก้ไขเซสชัน</string> + <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_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> + <string name="perf_esync_hint">เธรด Windows ของเกมรอกันผ่าน eventfd และหน่วยความจำที่ใช้ร่วมกัน แทนการเดินทางไปกลับผ่าน wineserver ใช้แพ็ก droiddeck-esync ที่สร้างไว้สำหรับบิลด์ Proton นั้นโดยเฉพาะ แพ็กจะถูกดึงมาโดยอัตโนมัติ จนกว่าจะมีแพ็กสำหรับบิลด์ Proton ใหม่ droiddeck-fsync จะทำหน้าที่แทน จะมีผลในเซสชันถัดไป</string> + <string name="perf_xalia_hint">ปิดตัวช่วยควบคุมด้วยคอนโทรลเลอร์ของ Proton ซึ่งกินพลัง CPU ในทุกเกม</string> + <string name="perf_seccomp">รัน proot โดยไม่ใช้ seccomp</string> + <string name="perf_seccomp_hint">อาจแก้ข้อผิดพลาด syscall ที่ขาดหายบนบางเคอร์เนล อาจลดประสิทธิภาพ</string> + <string name="perf_fastpath">เส้นทางลัดของ proot</string> + <string name="perf_fastpath_needs_seccomp">ต้องใช้ตัวกรอง seccomp ของ proot</string> + <string name="perf_fastpath_hint">ค้นหาไฟล์เร็วขึ้นและสะดุดน้อยลง ปิดหากโปรแกรมหาไฟล์ของตัวเองไม่พบ</string> + <string name="perf_identity">ข้อมูลประจำตัวของเซสชัน</string> + <string name="perf_hostname">ชื่อโฮสต์</string> + <string name="perf_hostname_hint">ชื่อที่ Steam มองเห็นสำหรับอุปกรณ์นี้ เว้นว่างไว้เพื่อคืนค่าเป็น %1$s</string> + <string name="perf_hostname_invalid">ใช้ได้เฉพาะตัวอักษร ตัวเลข และยัติภังค์ตรงกลาง ไม่เกิน 63 ตัวอักษร</string> + <string name="perf_phantom_warning">Android ถูกตั้งให้ปิดเซสชันนี้</string> + <string name="driver_installed">ติดตั้งแล้ว</string> + <string name="driver_available">พร้อมดาวน์โหลด</string> + <string name="driver_nothing_new">ไม่มีอะไรใหม่ตั้งแต่การตรวจสอบครั้งล่าสุด</string> + <string name="driver_restore_builtin">คืนค่าไดรเวอร์ที่มีในตัว</string> + <string name="driver_delete_builtin">มีอยู่ในตัวแอป: การลบนี้จะลบไฟล์ที่แตกไว้ออกและซ่อนมัน คืนค่าไดรเวอร์ที่มีในตัวจะนำกลับมา</string> + <string name="driver_delete_bundle">ครึ่งหนึ่งของแพ็ก Android + Linux: ทั้งสองครึ่งจะถูกลบ ไดรเวอร์ที่ใช้งานอยู่จะกลับไปใช้ค่าเริ่มต้น</string> + <string name="driver_delete_plain">ไฟล์ของมันจะถูกลบออกจากแอป</string> + <string name="driver_delete_in_use">ไฟล์ของมันถูกลบออก เนื่องจากกำลังใช้งานอยู่ ค่าเริ่มต้นจะเข้ามาแทนที่</string> + <string name="drawer_page_display">หน้าจอ</string> + <string name="drawer_page_effects">เอฟเฟกต์</string> + <string name="drawer_page_controls">การควบคุม</string> + <string name="drawer_page_components">Components</string> + <string name="drawer_page_controller">คอนโทรลเลอร์</string> + <string name="drawer_page_settings">การตั้งค่า</string> + <string name="drawer_page_desc">หน้า %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">เดสก์ท็อป</string> + <string name="drawer_steam_menu">เมนู Steam</string> + <string name="drawer_quick_access">Quick Access</string> + <string name="drawer_open_qam">เปิดเมนู Quick Access</string> + <string name="drawer_prev_page">หน้าก่อนหน้า</string> + <string name="drawer_next_page">หน้าถัดไป</string> + <string name="drawer_hud">HUD ประสิทธิภาพ</string> + <string name="drawer_scaling">โหมดการปรับขนาด</string> + <string name="drawer_scaling_sharpness">ความคมชัดของการปรับขนาด</string> + <string name="drawer_effects">เอฟเฟกต์หน้าจอ</string> + <string name="drawer_effects_hint">แบบเรียลไทม์ ใช้เวลา GPU เล็กน้อยขณะเปิดเอฟเฟกต์ใด ๆ อยู่</string> + <string name="drawer_look">ค่าที่กำหนดไว้ล่วงหน้า</string> + <string name="drawer_look_custom">กำหนดเอง</string> + <string name="drawer_effects_advanced">ขั้นสูง</string> + <string name="widgets_expanded">ขยายแล้ว</string> + <string name="widgets_collapsed">ย่อแล้ว</string> + <string name="drawer_cas">ความคมชัด (CAS)</string> + <string name="drawer_cas_level">ระดับความคมชัด</string> + <string name="drawer_fake_hdr">HDR จำลอง</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">เริ่ม SteamVR</string> + <string name="steamvr_checking">กำลังตรวจสอบ SteamVR…</string> + <string name="drawer_deband">ลดลายแถบสี</string> + <string name="drawer_deband_strength">ความเข้มของการลดลายแถบสี</string> + <string name="drawer_brightness">ความสว่าง</string> + <string name="drawer_contrast">ความเข้มสี</string> + <string name="drawer_gamma">แกมมา</string> + <string name="drawer_saturation">ความอิ่มตัวของสี</string> + <string name="drawer_fxaa">FXAA (ลบขอบหยัก)</string> + <string name="drawer_toon">เส้นขอบแบบการ์ตูน</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">การกรองพื้นผิว</string> + <string name="drawer_texture_hint">เกม DirectX 9–11 มีผลตั้งแต่ครั้งถัดไปที่เปิดเกม</string> + <string name="drawer_anisotropy">การกรองแบบ Anisotropic</string> + <string name="drawer_texture_sharpness">ความคมชัดของพื้นผิว</string> + <string name="drawer_texture_sharpness_note">ค่าไบแอส mip ติดลบ: พื้นผิวคมขึ้น มีประกายวูบวาบบ้าง อัตโนมัติจะปรับตามระดับที่เซสชันถูกขยายให้พอดีหน้าจอ</string> + <string name="drawer_touch_auto">อัตโนมัติ (%1$s)</string> + <string name="drawer_keyboard">แป้นพิมพ์</string> + <string name="drawer_latency">ความหน่วง</string> + <string name="drawer_low_latency_controller">คอนโทรลเลอร์ความหน่วงต่ำ</string> + <string name="drawer_low_latency_controller_hint">คอนโทรลเลอร์รายงานที่ 1000 Hz แทน 250 Hz ใช้ CPU เพิ่มขึ้นเล็กน้อย</string> + <string name="drawer_low_latency_touch">การสัมผัสความหน่วงต่ำ</string> + <string name="drawer_low_latency_touch_hint">การสัมผัสข้ามการรวมเฟรม ทำให้ระบบสัมผัสของ Steam ทำงานที่ 1000 Hz ใช้ CPU เพิ่มขึ้นเล็กน้อย</string> + <string name="drawer_pc_keyboard">แป้นพิมพ์พีซี</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">หน้าจอที่สอง</string> + <string name="drawer_second_screen_mode">โหมด</string> + <string name="drawer_second_screen_shows">แสดง</string> + <string name="drawer_android_apps">แอป Android</string> + <string name="drawer_launch_app">เปิดแอป</string> + <string name="common_hide">ซ่อน</string> + <string name="common_show">แสดง</string> + <string name="drawer_no_apps">ไม่มีแอปที่เปิดได้</string> + <string name="drawer_session_behavior">การทำงานของเซสชัน</string> + <string name="drawer_suspend_hint">มีผลตั้งแต่ตอนนี้และกับเซสชันในอนาคตในโหมดนี้</string> + <string name="drawer_next_session">เซสชันถัดไป</string> + <string name="drawer_support">การสนับสนุน</string> + <string name="drawer_logs">ล็อกเซสชัน</string> + <string name="drawer_logs_hint">แนบไปกับรายงานข้อบกพร่อง</string> + <string name="drawer_share_logs">แชร์ล็อก</string> + <string name="drawer_background">พื้นหลัง</string> + <string name="drawer_stop">หยุด</string> + <string name="drawer_stop_title">หยุดเซสชัน?</string> + <string name="drawer_running_now">กำลังทำงานอยู่ตอนนี้</string> + <string name="drawer_no_game">ไม่มีเกมกำลังทำงานบน Proton</string> + <string name="drawer_selected_profile">โปรไฟล์เกม</string> + <string name="drawer_selected_profile_none">รายละเอียดโปรไฟล์ยังไม่พร้อมใช้งาน</string> + <string name="drawer_profile_refresh_failed_initial">โหลดโปรไฟล์เกมไม่ได้ กำลังลองใหม่โดยอัตโนมัติ</string> + <string name="drawer_profile_refresh_failed_stale">รีเฟรชโปรไฟล์เกมไม่ได้ แสดงข้อมูลล่าสุดที่มีอยู่ กำลังลองใหม่โดยอัตโนมัติ</string> + <string name="drawer_profile_inspect_hint">ดูและแก้ไขการตั้งค่าที่บันทึกไว้สำหรับการเปิดครั้งถัดไป</string> + <string name="drawer_profile_default">ใช้โปรไฟล์เริ่มต้น</string> + <string name="drawer_profile_custom">โปรไฟล์กำหนดเอง</string> + <string name="drawer_component_inherited">ใช้ %1$s จากโปรไฟล์เริ่มต้น</string> + <string name="drawer_game_components_note">การเปลี่ยนแปลงจะถูกบันทึกในโปรไฟล์ของ %1$s และมีผลในครั้งถัดไปที่เกมเปิดขึ้น</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="other">การปรับแต่งเกม %1$d รายการ</item> + </plurals> + <string name="drawer_no_proton">ยังไม่มี Proton ติดตั้งอยู่</string> + <string name="drawer_game_running">เกมกำลังทำงาน</string> + <string name="drawer_reapplied">นำมาใช้ใหม่เมื่อเปิด %1$s</string> + <string name="drawer_original">ต้นฉบับ</string> + <string name="drawer_components_note">นำเข้าและลบได้ที่หน้า Components</string> + <string name="setup_check_done">เสร็จแล้ว</string> + <string name="setup_check_warn">ต้องดำเนินการ</string> + <string name="setup_check_busy">กำลังดำเนินการ</string> + <string name="setup_limit_adb_failed">ตรวจสอบที่อยู่ IP และพอร์ตของ Wireless debugging หรือจับคู่ใหม่หาก Android ลบอุปกรณ์นี้ไปแล้ว</string> + <string name="setup_install">ติดตั้ง</string> + <string name="setup_manage">จัดการ</string> + <string name="setup_tab_overview">ภาพรวม</string> + <string name="setup_tab_controller">คอนโทรลเลอร์</string> + <string name="setup_tab_session">เซสชัน</string> + <string name="setup_tab_launcher">ตัวเปิดแอป</string> + <string name="setup_title">การตั้งค่า</string> + <string name="setup_all_set">● พร้อมทั้งหมด</string> + <string name="setup_n_ready">พร้อม %1$d จาก %2$d</string> + <string name="setup_system_check">ตรวจสอบระบบ</string> + <string name="setup_gpu_supported">รองรับอุปกรณ์นี้</string> + <string name="setup_gpu_untested">GPU ที่ยังไม่ผ่านการทดสอบ</string> + <string name="setup_gpu_unsupported">ไม่รองรับ GPU นี้</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam ต้องใช้ไดรเวอร์ Adreno; %1$s อาจแสดงจอดำ</string> + <string name="setup_runtime">รันไทม์ Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">ยังไม่ติดตั้ง · ประมาณ 3 GB จะติดตั้งเมื่อกด Play ครั้งแรก</string> + <string name="setup_installed">ติดตั้งแล้ว</string> + <string name="setup_runtime_update">%1$s · มีอัปเดต</string> + <string name="setup_runtime_current">%1$s · เป็นรุ่นล่าสุดแล้ว</string> + <string name="setup_limit">ขีดจำกัดโพรเซสลูก</string> + <string name="setup_limit_on">เปิดอยู่ · Android อาจปิด Steam การปิดใช้งานใช้เวลาประมาณหนึ่งนาที</string> + <string name="setup_limit_unset">ยังไม่ตั้งค่า · Android อาจปิด Steam การปิดใช้งานใช้เวลาประมาณหนึ่งนาที</string> + <string name="setup_limit_unknown">ไม่สามารถตรวจสอบได้ · การปิดใช้งานใช้เวลาประมาณหนึ่งนาที</string> + <string name="setup_fix_it">แก้ไข</string> + <string name="setup_details">รายละเอียด</string> + <string name="setup_dev_options">ตัวเลือกสำหรับนักพัฒนา</string> + <string name="setup_use_wireless">ใช้ Wireless debugging</string> + <string name="setup_check_again">ตรวจสอบอีกครั้ง</string> + <string name="setup_limit_turn_on">เปิดขีดจำกัด</string> + <string name="setup_account">บัญชี Steam</string> + <string name="setup_signed_in_offline">ลงชื่อเข้าใช้เป็น %1$s · โหมดออฟไลน์</string> + <string name="setup_signed_in">ลงชื่อเข้าใช้เป็น %1$s</string> + <string name="setup_sign_in">กด Play แล้วลงชื่อเข้าใช้ Steam</string> + <string name="setup_tools">เครื่องมือ</string> + <string name="setup_controller">คอนโทรลเลอร์</string> + <string name="setup_controller_unavailable">การตั้งค่าคอนโทรลเลอร์ไม่พร้อมใช้งาน</string> + <string name="setup_session">เซสชัน</string> + <string name="setup_logs">ล็อกเซสชัน</string> + <string name="setup_logs_hint">บันทึกไว้หลังจบแต่ละเซสชัน</string> + <string name="setup_agent_commands">เครื่องมือดีบัก</string> + <string name="setup_latest_logs">ล็อกเซสชันล่าสุด</string> + <string name="setup_saved_logs">ล็อกเซสชันที่บันทึกไว้</string> + <string name="setup_saved_logs_hint">เก็บ %1$d รายการล่าสุด</string> + <string name="setup_clear_logs">ล้างล็อก</string> + <string name="setup_reset_settings">รีเซ็ตการตั้งค่าทั้งหมด</string> + <string name="setup_reset_settings_hint">คืนค่าทุกการตั้งค่าเป็นค่าเริ่มต้น</string> + <string name="setup_reset_settings_button">รีเซ็ต</string> + <string name="setup_reset_settings_title">รีเซ็ตการตั้งค่าทั้งหมดหรือไม่</string> + <string name="setup_reset_settings_body">การตั้งค่าจอ ประสิทธิภาพ คอนโทรลเลอร์ ธีม ภาษา และตัวเปิดแอปจะกลับเป็นค่าเริ่มต้น เกม การเข้าสู่ระบบ Steam บัญชีสโตร์ ไดรเวอร์ที่ดาวน์โหลด และโฟลเดอร์จัดเก็บจะยังอยู่</string> + <string name="setup_reset_settings_profiles">รีเซ็ตโปรไฟล์เกมด้วย (Proton, FEX, คอมโพเนนต์ และสภาพแวดล้อมรันไทม์ของแต่ละเกม รวมถึงสภาพแวดล้อมของโปรไฟล์ค่าเริ่มต้น)</string> + <string name="setup_reset_settings_session_running">หยุดเซสชันก่อนรีเซ็ตการตั้งค่า</string> + <string name="setup_reset_settings_partial">รีเซ็ตการตั้งค่าแล้ว แต่ไม่ทั้งหมด รายละเอียดอยู่ในล็อก</string> + <string name="setup_offline">โหมดออฟไลน์</string> + <string name="setup_sign_in_first">ลงชื่อเข้าใช้ Steam ก่อน</string> + <string name="setup_launcher">ตัวเปิดแอป</string> + <string name="setup_language">ภาษา</string> + <string name="setup_language_hint">Steam ก็ใช้ภาษานี้ด้วย ตั้งแต่ครั้งถัดไปที่เริ่มทำงาน</string> + <string name="setup_language_system">ค่าเริ่มต้นของระบบ (%1$s)</string> + <string name="setup_language_system_short">ค่าเริ่มต้นของระบบ</string> + <string name="setup_app_scale">ขนาดแอป</string> + <string name="setup_app_scale_hint">ข้อความและการควบคุมของ DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (ค่าเริ่มต้น)</string> + <string name="setup_theme">ธีม</string> + <string name="setup_theme_hint">รูปลักษณ์ของตัวเปิดแอป</string> + <string name="setup_home">ใช้เป็นหน้าจอหลัก</string> + <string name="setup_home_on">DroidDeck สามารถเป็นแอปหน้าจอหลักได้</string> + <string name="setup_home_off">DroidDeck จะไม่ถูกเสนอให้เป็นแอปหน้าจอหลัก</string> + <string name="setup_orientation">การวางแนว</string> + <string name="setup_orientation_auto">แนวนอนอัตโนมัติ</string> + <string name="setup_orientation_landscape">แนวนอน</string> + <string name="setup_orientation_reverse">แนวนอนกลับด้าน</string> + <string name="setup_fullscreen">เต็มจอ</string> + <string name="setup_fullscreen_on">ซ่อนแถบสถานะและแถบนำทางของ Android</string> + <string name="setup_fullscreen_off">แสดงแถบสถานะและแถบนำทางของ Android</string> + <string name="setup_default_home">แอปหน้าจอหลักเริ่มต้น</string> + <string name="setup_choose_home">เลือกแอปหน้าจอหลัก</string> + <string name="setup_choose">เลือก</string> + <string name="setup_linux_apps">แอป Linux (ทดลอง)</string> + <string name="setup_tool_files">ไฟล์</string> + <string name="setup_tool_files_hint">เรียกดูและจัดการไฟล์</string> + <string name="setup_tool_protons">รุ่นของ Proton</string> + <string name="setup_tool_protons_hint">ติดตั้งบิลด์ Proton แบบ ARM64</string> + <string name="setup_tool_performance">ประสิทธิภาพ</string> + <string name="setup_tool_performance_hint">การกำหนดคอร์ CPU</string> + <string name="setup_tool_roms">โฟลเดอร์ ROM</string> + <string name="setup_tool_roms_hint">ตำแหน่งที่เก็บเกมของโปรแกรมจำลอง</string> + <string name="setup_card_components">Components</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">การควบคุม</string> + <string name="setup_card_controls_hint">การกำหนดปุ่ม</string> + <string name="store_tab_discover">ค้นพบ</string> + <string name="store_tab_search">ค้นหา</string> + <string name="store_tab_installed">ติดตั้งแล้ว</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">สโตร์</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak พร้อมใช้งาน</string> + <string name="store_needs_runtime">ติดตั้งรันไทม์ Linux จากการตั้งค่าก่อน</string> + <string name="store_setup_title">ตั้งค่า Flatpak</string> + <string name="store_setup_text">เพิ่ม Flatpak และเชื่อมต่อกับ Flathub (ประมาณ 20 MB) แอปแรกจะดาวน์โหลดรันไทม์ของตัวเองด้วย</string> + <string name="store_setting_up">กำลังตั้งค่า…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">การอัปเดต</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">กำลังเริ่ม…</string> + <string name="store_categories">หมวดหมู่</string> + <string name="store_unreachable">ไม่สามารถเชื่อมต่อ Flathub ได้ ตรวจสอบการเชื่อมต่อแล้วลองใหม่</string> + <string name="store_try_again">ลองใหม่</string> + <string name="store_search_label">ค้นหาใน Flathub</string> + <string name="store_search_placeholder">Firefox, เกม, โปรแกรมจำลอง…</string> + <string name="store_search">ค้นหา</string> + <string name="store_all">ทั้งหมด</string> + <string name="store_searching">กำลังค้นหา…</string> + <string name="store_search_hint">ค้นหาตามชื่อ หรือเลือกหมวดหมู่ แสดงเฉพาะแอป ARM64</string> + <string name="store_no_results">ไม่มีแอป ARM64 บน Flathub ที่ตรงกับคำค้นนี้</string> + <string name="store_results">ผลลัพธ์</string> + <string name="store_check_updates">ตรวจสอบการอัปเดต</string> + <string name="store_update_all">อัปเดตทั้งหมด (%1$d)</string> + <string name="store_all_current">● ทุกอย่างเป็นรุ่นล่าสุดแล้ว</string> + <string name="store_no_apps">ยังไม่มีแอป ค้นหาได้จากค้นพบหรือค้นหา</string> + <string name="store_setup_first_note">ตั้งค่า Flatpak ก่อนเพื่อติดตั้งแอป</string> + <string name="store_update_available_prefix">มีอัปเดต · %1$s</string> + <string name="store_open">เปิด</string> + <string name="store_details">รายละเอียด</string> + <string name="store_remove">ลบ</string> + <string name="store_press_again">กดอีกครั้งเพื่อลบ</string> + <string name="store_installing">กำลังติดตั้ง…</string> + <string name="store_install">ติดตั้ง</string> + <string name="store_setup_first">ตั้งค่า Flatpak ก่อน</string> + <string name="store_download_size">ดาวน์โหลด %1$s</string> + <string name="store_installed_chip">● ติดตั้งแล้ว</string> + <string name="store_details_failed">ไม่สามารถโหลดหน้า Flathub ของแอปนี้ได้</string> + <string name="store_loading">กำลังโหลดจาก Flathub…</string> + <string name="store_no_arm">ไม่มีบิลด์ ARM64 บน Flathub จึงติดตั้งที่นี่ไม่ได้</string> + <string name="store_screenshots">ภาพหน้าจอ</string> + <string name="store_about">เกี่ยวกับ</string> + <string name="store_app_id">รหัสแอป</string> + <string name="store_license">สัญญาอนุญาต</string> + <string name="store_runtime">รันไทม์</string> + <string name="store_installed_size">ขนาดที่ติดตั้ง</string> + <string name="store_installed_size_value">%1$s (รวมรันไทม์ที่ใช้ร่วมกัน)</string> + <string name="store_website">เว็บไซต์</string> + <string name="store_verified">ยืนยันแล้ว</string> + <string name="upd_title">การอัปเดต</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">ตรวจสอบล่าสุด %1$s</string> + <string name="upd_not_checked">ยังไม่ตรวจสอบ</string> + <string name="upd_perm_title">ให้ DroidDeck อัปเดตตัวเองได้</string> + <string name="upd_perm_text">ในหน้าจอถัดไป เปิด “อนุญาตจากแหล่งนี้” แล้วกลับมาที่นี่ การอัปเดตจะดำเนินต่อไปเอง</string> + <string name="upd_open_settings">เปิดการตั้งค่า</string> + <string name="upd_not_now">ไม่ใช่ตอนนี้</string> + <string name="upd_signed_status">ลงนามต่างกัน</string> + <string name="upd_signed_headline">อัปเดตทับไม่ได้</string> + <string name="upd_signed_detail">สำเนานี้ไม่ได้ลงนามด้วยคีย์รุ่นวางจำหน่ายของ DroidDeck จึงไม่สามารถติดตั้งอัปเดตทับได้ ถอนการติดตั้งเพื่อเปลี่ยน</string> + <string name="upd_available">มีอัปเดต</string> + <string name="upd_blocked_status">ติดตั้งไม่ได้</string> + <string name="upd_switch">พร้อมเปลี่ยน</string> + <string name="upd_ahead_status">นำหน้า Stable</string> + <string name="upd_ahead_headline">คุณนำหน้า Stable อยู่</string> + <string name="upd_ahead_detail">บิลด์นี้ใหม่กว่า Stable รุ่นล่าสุด คุณจะเปลี่ยนไปใช้ Stable เมื่อมีการเผยแพร่รุ่นถัดไป</string> + <string name="upd_gone_status">การทดสอบสิ้นสุดแล้ว</string> + <string name="upd_gone_headline">การทดสอบนี้สิ้นสุดแล้ว</string> + <string name="upd_gone_detail">การแก้ไขของมันถูกรวมเข้าหรือถูกยกเลิกไปแล้ว ติดตาม Preview เพื่อรับการแก้ไขล่าสุด</string> + <string name="upd_current_status">เป็นรุ่นล่าสุดแล้ว</string> + <string name="upd_current_headline">คุณมี %1$s รุ่นล่าสุดแล้ว</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">อัปเดต%1$s</string> + <string name="upd_install_button">ติดตั้ง%1$s</string> + <string name="upd_install_anyway">ติดตั้ง Stable %1$s อยู่ดี</string> + <string name="upd_follow_preview">ติดตาม Preview</string> + <string name="upd_stop_session">หยุดเซสชันที่กำลังทำงานอยู่เพื่ออัปเดต</string> + <string name="upd_less">น้อยลง</string> + <string name="upd_more">เพิ่มเติม</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">บิลด์ Preview ใหม่</string> + <string name="upd_new_test">บิลด์ทดสอบ PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">ช่องทางอัปเดต</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">รุ่นที่ผ่านการทดสอบแล้ว เหมาะกับคนส่วนใหญ่</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">การแก้ไขล่าสุด ก่อนถึง Stable</string> + <string name="upd_preview_current">เป็นรุ่นล่าสุดแล้ว</string> + <string name="upd_tests">บิลด์ทดสอบ</string> + <string name="upd_tests_hint">ลองการแก้ไขก่อนเผยแพร่จริง</string> + <string name="upd_tests_none">ไม่มีในขณะนี้</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">ไม่ได้สร้างไว้สำหรับสำเนานี้ของ DroidDeck</string> + <string name="upd_updated">อัปเดตแล้ว %1$s</string> + <string name="upd_test_name">การทดสอบ PR #%1$d</string> + <string name="upd_while_ago">สักพักที่แล้ว</string> + <string name="upd_just_now">เมื่อสักครู่</string> + <plurals name="upd_tests_count"> + <item quantity="other">%1$d รายการให้ลอง</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="other">การเปลี่ยนแปลงตั้งแต่บิลด์ของคุณ · ล้าหลัง %1$d บิลด์</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="other">การเปลี่ยนแปลงล่าสุด · %1$d บิลด์</item> + </plurals> + <string name="gate_title">มีการตั้งค่า Android หนึ่งอย่างที่ต้องเปลี่ยน</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android หยุดแอปที่เริ่มโพรเซสพื้นหลังจำนวนมาก และ Steam เริ่มหลายสิบโพรเซส จนกว่าจะเปลี่ยนค่านี้ เกมจะปิดตัวโดยไม่มีข้อผิดพลาด</string> + <string name="gate_fix_for_me">แก้ให้ฉันเลย</string> + <string name="gate_toggle_steps">เปิด “ปิดการจำกัดการประมวลผลข้อมูลย่อย” แล้วกลับมาที่นี่ เปิดตัวเลือกสำหรับนักพัฒนาไว้เสมอ ไม่เช่นนั้นสวิตช์จะปิดลงอีก</string> + <string name="gate_open_dev">เปิดตัวเลือกสำหรับนักพัฒนา</string> + <string name="gate_no_toggle">Android รุ่นนี้ไม่มีสวิตช์สำหรับสิ่งนี้ ดังนั้น DroidDeck จะเปลี่ยนค่าผ่าน Wireless debugging ใช้เวลาประมาณหนึ่งนาที ไม่ต้องใช้คอมพิวเตอร์</string> + <string name="gate_needs_wifi">Wireless debugging ต้องใช้ Wi-Fi เครือข่ายใดก็ได้ ไม่จำเป็นต้องมีอินเทอร์เน็ต</string> + <string name="gate_needs_notifications">รหัสจับคู่จะแสดงในการแจ้งเตือน อนุญาตการแจ้งเตือนสำหรับ DroidDeck หรือใช้วิธีอื่น</string> + <string name="gate_allow_notifications">อนุญาตการแจ้งเตือน</string> + <string name="gate_step1">เปิดการตั้งค่า → ตัวเลือกสำหรับนักพัฒนา → Wireless debugging แล้วเปิดใช้งาน</string> + <string name="gate_step2">แตะ “Pair device with pairing code”</string> + <string name="gate_step3">พิมพ์รหัสลงในการแจ้งเตือนของ DroidDeck</string> + <string name="gate_waiting">กำลังรอป๊อปอัปการจับคู่…</string> + <string name="gate_code_needed">พบป๊อปอัปแล้ว กรอกรหัสในการแจ้งเตือน</string> + <string name="gate_status">สถานะ</string> + <string name="gate_polling">กำลังตรวจสอบทุก 2 วินาที หน้านี้จะปิดเมื่อปิดใช้งานแล้ว</string> + <string name="gate_other_ways">วิธีอื่น</string> + <string name="gate_other_toggle">Wireless debugging, ที่อยู่แบบกำหนดเอง, ADB จากคอมพิวเตอร์</string> + <string name="gate_other_no_toggle">ที่อยู่แบบกำหนดเอง, ADB จากคอมพิวเตอร์, ตัวเลือกสำหรับนักพัฒนา</string> + <string name="gate_use_wireless_instead">ใช้ Wireless debugging แทน</string> + <string name="gate_some_roms">บาง ROM เพิ่มสวิตช์นี้มาเองเลย ลองหา “child process” ในตัวเลือกสำหรับนักพัฒนา</string> + <string name="gate_manual_hint">หากการแจ้งเตือนไม่ทำงาน ให้กรอกที่อยู่และรหัสจากป๊อปอัปด้วยตัวเอง</string> + <string name="gate_enter_manually">กรอกที่อยู่ด้วยตัวเอง</string> + <string name="gate_from_computer">จากคอมพิวเตอร์ที่มี ADB:</string> + <string name="gate_copy_command">คัดลอกคำสั่ง</string> + <string name="gate_choose_display">เลือกหน้าจอที่จะเปิดการตั้งค่า Android</string> + <string name="gate_main_screen">หน้าจอหลัก</string> + <string name="wadb_finding_port">จับคู่แล้ว กำลังค้นหาพอร์ตของ Wireless debugging…</string> + <string name="wadb_enter_port">จับคู่แล้ว กรอกพอร์ตจากการตั้งค่า</string> + <string name="wadb_applying">พบอุปกรณ์แล้ว กำลังปรับใช้การตั้งค่า…</string> + <string name="wadb_apply_failed">ไม่สามารถปรับใช้โดยอัตโนมัติได้ ตรวจสอบที่อยู่ด้านล่างแล้วลองใหม่ %1$s</string> + <string name="wadb_title_wireless">Wireless debugging</string> + <string name="wadb_title_done">อัปเดตขีดจำกัดโพรเซสลูกแล้ว</string> + <string name="wadb_title">เปลี่ยนขีดจำกัดโพรเซสลูก</string> + <string name="wadb_lede_compact0">หากไม่พบตัวเลือกนี้ ให้จับคู่ผ่าน Wireless debugging</string> + <string name="wadb_lede_compact1">จับคู่แล้ว ตรวจสอบที่อยู่ IP และพอร์ตใน Wireless debugging</string> + <string name="wadb_lede_done">อัปเดตขีดจำกัดโพรเซสลูกแล้ว</string> + <string name="wadb_lede0">ใช้ขั้นตอนที่ 2 หากตัวเลือกสำหรับนักพัฒนาไม่มีการตั้งค่าโพรเซสลูก เปิดตัวเลือกสำหรับนักพัฒนา → Wireless debugging → Pair device with pairing code</string> + <string name="wadb_lede1">จับคู่แล้ว ใช้ที่อยู่ด้านล่าง หรืออัปเดตจาก Wireless debugging → IP address & Port</string> + <string name="wadb_lede_done_long">อัปเดตขีดจำกัดโพรเซสลูกผ่าน Wireless debugging แล้ว</string> + <string name="wadb_confirmed_on">Android ยืนยันแล้วว่าขีดจำกัดเปิดอยู่</string> + <string name="wadb_confirmed_off">Android ยืนยันแล้วว่าขีดจำกัดปิดอยู่</string> + <string name="wadb_pair_group">2 · จับคู่ Wireless debugging</string> + <string name="wadb_pair_address">ที่อยู่ IP และพอร์ตของป๊อปอัปการจับคู่</string> + <string name="wadb_pin">รหัสจับคู่ (PIN)</string> + <string name="wadb_pin_placeholder">6 หลัก</string> + <string name="wadb_pair">จับคู่</string> + <string name="wadb_apply_group">2 · ปรับใช้ผ่าน Wireless debugging</string> + <string name="wadb_connect_address">ที่อยู่ IP และพอร์ตสำหรับเชื่อมต่อ</string> + <string name="wadb_pair_again">จับคู่อีกครั้ง</string> + <string name="wadb_turn_off">ปิดขีดจำกัด</string> + <string name="wadb_other_ways">วิธีอื่นในการเปลี่ยนค่านี้</string> + <string name="wadb_dev_try_first">1 · ตัวเลือกสำหรับนักพัฒนา (ลองก่อน)</string> + <string name="wadb_restrict_on">ปิด “ปิดการจำกัดการประมวลผลข้อมูลย่อย”</string> + <string name="wadb_restrict_off">เปิด “ปิดการจำกัดการประมวลผลข้อมูลย่อย”</string> + <string name="wadb_computer_last">3 · ADB จากคอมพิวเตอร์ (ทางเลือกสุดท้าย)</string> + <string name="wadb_only_if">ใช้เฉพาะเมื่อ Wireless debugging ใช้งานไม่ได้</string> + <string name="wadb_computer_group">3 · ADB จากคอมพิวเตอร์ (ทางเลือกสุดท้าย)</string> + <string name="ctrl_osc_hint">เมื่อปุ่มสัมผัสจะปรากฏในเซสชัน</string> + <string name="ctrl_color">สี</string> + <string name="ctrl_color_hint">สีของปุ่มบนหน้าจอ</string> + <string name="ctrl_custom">กำหนดเอง</string> + <string name="ctrl_opacity">ความโปร่งใส</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">ขนาดปุ่ม</string> + <string name="ctrl_size_hint" formatted="false">100% คือขนาดมาตรฐาน</string> + <string name="ctrl_stick_click">การกดสติ๊ก</string> + <string name="ctrl_stick_click_hint">แตะสองครั้งแล้วกดสติ๊กค้างไว้สำหรับ L3 หรือ R3</string> + <string name="ctrl_adaptive">สติ๊กแบบปรับอัตโนมัติ</string> + <string name="ctrl_rumble">การสั่นของเกม</string> + <string name="ctrl_steam_button">ปุ่ม Steam</string> + <string name="ctrl_qam_button">ปุ่ม QAM</string> + <string name="ctrl_keyboard_button">ปุ่มแป้นพิมพ์</string> + <string name="ctrl_select_steam">กด Select เพื่อเปิดเมนู Steam</string> + <string name="ctrl_select_steam_hint">แทน View/Select</string> + <string name="ctrl_joycon_vr">ใช้ Joy-Con เป็นคอนโทรลเลอร์ VR</string> + <string name="ctrl_joycon_vr_hint">ขณะที่ SteamVR ทำงาน Joy-Con แต่ละตัวจะกลายเป็นมือ ชี้ไปข้างหน้าแล้วกด Home หรือ Capture ค้างไว้เพื่อจัดให้อยู่ตรงกลางอีกครั้ง</string> + <string name="setup_animations">ภาพเคลื่อนไหว</string> + <string name="ctrl_adaptive_hint">สติ๊กจะปรากฏที่ตำแหน่งที่คุณแตะและซ่อนเมื่อปล่อย</string> + <string name="ctrl_layout">การจัดวาง</string> + <string name="ctrl_layout_custom">บันทึกตำแหน่งกำหนดเองไว้แล้ว</string> + <string name="ctrl_layout_default">ปรับให้พอดีกับหน้าจอนี้</string> + <string name="ctrl_edit">แก้ไข</string> + <string name="ctrl_reset">รีเซ็ต</string> + <string name="ctrl_mapping">การกำหนดปุ่ม</string> + <string name="ctrl_mapping_default">ทุกปุ่มส่งอินพุตของตัวเอง</string> + <string name="ctrl_mapping_count">กำหนดใหม่ %1$d จาก %2$d ปุ่ม</string> + <string name="ctrl_configure">ตั้งค่า</string> + <string name="ctrl_reset_all">รีเซ็ตคอนโทรลเลอร์</string> + <string name="ctrl_reset_all_hint">คืนค่าการตั้งค่าคอนโทรลเลอร์ทั้งหมดและการจัดวาง</string> + <string name="ctrl_mapping_lede">สิ่งที่ปุ่มบนหน้าจอแต่ละปุ่มส่งไปยังเกม ซ่อนจะเอาปุ่มนั้นออก</string> + <string name="ctrl_onscreen_buttons">ปุ่มบนหน้าจอ</string> + <string name="ctrl_defaults">ค่าเริ่มต้น</string> + <string name="ctrl_reset_mapping">รีเซ็ตการกำหนดปุ่ม</string> + <string name="content_android_apps">แอป Android</string> + <string name="content_apps_count">%1$d แอป</string> + <string name="content_no_android_apps">ไม่พบแอป Android ที่เปิดได้</string> + <string name="content_desktop_installed">● ติดตั้งเดสก์ท็อปแล้ว</string> + <string name="content_desktop_first_open">ติดตั้งเมื่อเปิดครั้งแรก</string> + <string name="content_available">พร้อมติดตั้ง</string> + <string name="content_not_installed">ยังไม่ติดตั้ง</string> + <string name="content_not_installed_suffix">%1$s · ยังไม่ติดตั้ง</string> + <string name="content_open_named">เปิด %1$s</string> + <string name="content_games">เกม</string> + <string name="content_choose_roms">เลือกโฟลเดอร์ ROM</string> + <string name="content_retroarch_roms">ไปที่ /root/ROMs ใน RetroArch</string> + <string name="content_add_roms">เพิ่มเกม %1$s ลงใน ROMs/%2$s</string> + <string name="content_install_named">ติดตั้ง %1$s</string> + <string name="content_stop_to_install">หยุดเซสชันเพื่อติดตั้ง</string> + <string name="content_runtime_required">ต้องมีรันไทม์</string> + <string name="content_loading_details">กำลังโหลดรายละเอียดการติดตั้ง…</string> + <string name="content_details_unavailable">รายละเอียดการติดตั้งไม่พร้อมใช้งาน ลองใหม่ในหลัง</string> + <string name="content_needs_runtime">ติดตั้งรันไทม์ Linux จากการตั้งค่าก่อน</string> + <string name="content_stop_first">หยุดเซสชันที่กำลังทำงานเพื่อติดตั้งแอปเดสก์ท็อป</string> + <string name="content_install_into">ติดตั้ง %1$s ลงในเดสก์ท็อป Linux</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">การซ่อนจะเอาออกจากเดสก์ท็อป ไฟล์ของมันยังอยู่ในรันไทม์ Linux</string> + <string name="content_rom_gone">เกมนั้นไม่มีอยู่ในโฟลเดอร์ ROM แล้ว</string> + <string name="content_desktop_system">เดสก์ท็อป · %1$s</string> + <string name="content_launch_in">เปิดใน %1$s</string> + <string name="content_also_in">มีอยู่ใน %1$s ด้วย</string> + <string name="content_page_gone">หน้านั้นหายไปแล้ว เลือกส่วนทางด้านซ้าย</string> + <string name="content_open_desktop">เปิดเดสก์ท็อป</string> + <string name="content_install_open_desktop">ติดตั้งและเปิดเดสก์ท็อป</string> + <string name="desktop_remove_title">ถอนการติดตั้งเดสก์ท็อป</string> + <string name="desktop_remove_text">ลบเดสก์ท็อปและแอปที่มาพร้อมกัน เกม แอปที่เพิ่มเข้ามา การตั้งค่า และไลบรารีที่ใช้ร่วมกันจะยังคงอยู่</string> + <string name="desktop_removing">กำลังลบเดสก์ท็อป</string> + <string name="desktop_removed">ลบเดสก์ท็อปแล้ว</string> + <string name="desktop_cleaning_legacy">กำลังลบไฟล์ LXQt เก่า</string> + <string name="desktop_removal_unknown">อัปเดต DroidDeck ก่อนลบเดสก์ท็อปรุ่นนี้</string> + <string name="content_linux_desktop">เดสก์ท็อป Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox และโปรแกรมจำลองของคุณ</string> + <string name="games_empty">เกมที่คุณติดตั้งใน Steam จะปรากฏที่นี่หลังจากจบเซสชัน</string> + <string name="games_play_steam">เล่น Steam</string> + <string name="games_play_steamvr">เล่น SteamVR</string> + <string name="games_launch_settings">การตั้งค่าการเปิดเกม</string> + <string name="games_launch">เปิดเกม</string> + <string name="games_files">ไฟล์เกม</string> + <string name="games_prefix">Prefix ของ Proton</string> + <string name="games_saves_looking">กำลังค้นหาเซฟ…</string> + <string name="games_saves_none">ไม่พบโฟลเดอร์เซฟที่ตรงชื่อ การส่งออกจะนำทั้งโฟลเดอร์ผู้ใช้ไป</string> + <string name="games_saves_folders">%1$d โฟลเดอร์เซฟ</string> + <string name="games_saves_summary">%1$s · %2$d ไฟล์ · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">จัดการเซฟ</string> + <string name="games_saves">เซฟของเกม</string> + <string name="games_import_saves">นำเข้าเซฟ…</string> + <string name="games_export_gamehub">ส่งออกเป็น GameHub zip…</string> + <string name="games_export_winlator">ส่งออกเป็น Winlator zip…</string> + <string name="games_open_save_folder">เปิดโฟลเดอร์เซฟ</string> + <string name="games_never_played">ยังไม่เคยเล่น</string> + <string name="games_runtime_busy_percent">รันไทม์กำลังทำงาน · %1$d%%</string> + <string name="games_runtime_busy">รันไทม์กำลังทำงาน</string> + <string name="games_runtime_first_play">รันไทม์จะติดตั้งเมื่อกด Play ครั้งแรก</string> + <string name="games_runtime_update">มีอัปเดตรันไทม์</string> + <string name="games_runtime_ready">● รันไทม์พร้อมใช้งาน</string> + <string name="games_last_played">เล่นล่าสุด %1$s</string> + <string name="games_internal">พื้นที่จัดเก็บภายใน</string> + <string name="games_added">เกมที่เพิ่ม</string> + <string name="games_custom">เกมกำหนดเอง</string> + <string name="games_store_storage">พื้นที่จัดเก็บเกม</string> + <string name="gpu_auto_hint">คู่ที่ดีที่สุดสำหรับ GPU นี้ อัปเดตให้ล่าสุดเสมอ</string> + <string name="gpu_manual_hint">เลือกคู่ด้วยตัวเอง</string> + <string name="gpu_checking">กำลังตรวจสอบไดรเวอร์…</string> + <string name="gpu_none_listed">ยังไม่มีไดรเวอร์ในรายการ รีเฟรชเพื่อค้นหา</string> + <string name="gpu_hide_other">ซ่อนไดรเวอร์สำหรับ GPU อื่น</string> + <string name="gpu_show_other">แสดงไดรเวอร์สำหรับ GPU อื่น</string> + <string name="gpu_advanced">ขั้นสูง</string> + <string name="gpu_set_with_display">ตั้งค่าร่วมกับไดรเวอร์แสดงผล: %1$s รวมทั้งสองอย่าง</string> + <string name="gpu_set_with_runtime">ตั้งค่าร่วมกับไดรเวอร์รันไทม์: %1$s รวมทั้งสองอย่าง</string> + <string name="gpu_runtime_hint">ใช้โดยเกมและเดสก์ท็อป</string> + <string name="gpu_runtime_default">ค่าเริ่มต้นของรันไทม์</string> + <string name="gpu_auto_by_gpu">อัตโนมัติ - เลือกตาม GPU</string> + <string name="gpu_manage">ดาวน์โหลด นำเข้า หรือลบ…</string> + <string name="gpu_in_use_caps">กำลังใช้งาน</string> + <string name="gpu_builtin">ไดรเวอร์ที่มีในตัว DroidDeck</string> + <string name="gpu_matched_pair">ไดรเวอร์รันไทม์และแสดงผลตั้งค่าร่วมกันเป็นคู่ที่เข้ากัน</string> + <string name="gpu_recommended_for">แนะนำสำหรับ GPU นี้: %1$s</string> + <string name="gpu_refresh_hint">รีเฟรชเพื่อค้นหาไดรเวอร์สำหรับ GPU นี้</string> + <string name="gpu_recommended_caps">แนะนำ</string> + <string name="gpu_unavailable">ไม่พร้อมใช้งาน</string> + <string name="load_runtime">รันไทม์ Linux</string> + <string name="load_runtime_detail">กำลังเตรียมรันไทม์ Linux</string> + <string name="load_session">เซสชัน</string> + <string name="load_session_detail">กำลังเริ่มการแสดงผลและเสียง</string> + <string name="load_steam">ไคลเอนต์ Steam</string> + <string name="load_steam_detail">กำลังตรวจสอบ Steam และเครื่องมือความเข้ากันได้</string> + <string name="load_opening_steam">กำลังเปิด Steam</string> + <string name="load_opening_steam_detail">กำลังรอเฟรมแรกของ Steam</string> + <string name="load_desktop">เดสก์ท็อป</string> + <string name="load_desktop_detail">กำลังเตรียมเดสก์ท็อป</string> + <string name="load_opening">กำลังเปิด</string> + <string name="load_opening_detail">กำลังรอเฟรมแรก</string> + <string name="load_starting_steam">กำลังเริ่ม Steam</string> + <string name="load_ended">เซสชันสิ้นสุดแล้ว</string> + <string name="load_step">ขั้นตอนที่ %1$d จาก %2$d</string> + <string name="load_steam_paused">Steam หยุดชั่วคราว</string> + <string name="deck_tab_grips">ปุ่มด้านหลัง</string> + <string name="deck_tab_left">แพดซ้าย</string> + <string name="deck_tab_right">แพดขวา</string> + <string name="deck_tab_both">ทั้งสองข้าง</string> + <string name="deck_tab_gamepad">เกมแพด</string> + <string name="deck_surface_stick">สติ๊ก</string> + <string name="deck_surface_trackpad">แทร็กแพด</string> + <string name="deck_surface_switch">สลับระหว่างสติ๊กและแทร็กแพด</string> + <string name="deck_more_controls">การควบคุม Deck เพิ่มเติม</string> + <string name="deck_panels">แผง</string> + <string name="deck_close">ปิดการควบคุมหน้าจอที่สอง</string> + <string name="deck_open_steam_menu">เปิดเมนู Steam</string> + <string name="deck_left_upper">ซ้าย · บน</string> + <string name="deck_left_lower">ซ้าย · ล่าง</string> + <string name="deck_right_upper">ขวา · บน</string> + <string name="deck_right_lower">ขวา · ล่าง</string> + <string name="deck_click">คลิก</string> + <string name="deck_right_trackpad">แทร็กแพดขวา</string> + <string name="deck_left_trackpad">แทร็กแพดซ้าย</string> + <string name="second_trackpad">แทร็กแพด</string> + <string name="second_show_keyboard">แสดงแป้นพิมพ์</string> + <string name="second_hide_keyboard">ซ่อนแป้นพิมพ์</string> + <string name="second_terminal">เทอร์มินัล Linux</string> + <string name="second_terminal_not_ready">เซสชัน Linux ยังไม่พร้อมสำหรับเทอร์มินัล</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">เกม</string> + <string name="rail_desktop">เดสก์ท็อป</string> + <string name="rail_store">สโตร์</string> + <string name="rail_components">Components</string> + <string name="rail_apps">แอป</string> + <string name="rail_setup">การตั้งค่า</string> + <string name="rail_updates">การอัปเดต</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">ดำเนินการต่อ %1$s</string> + <string name="roms_text">แสดงเป็น /root/ROMs ในแต่ละเซสชัน พื้นที่จัดเก็บภายในอยู่ที่ /root/Storage</string> + <string name="roms_none">ยังไม่เลือกโฟลเดอร์</string> + <string name="roms_applies">มีผลในเซสชันถัดไป ใช้การ์ด SD ได้</string> + <string name="roms_choose">เลือกโฟลเดอร์</string> + <string name="roms_change">เปลี่ยนโฟลเดอร์</string> + <string name="proton_lede">ติดตั้งบิลด์ Proton แบบ ARM64 แล้วเลือกให้แต่ละเกมใน Steam → Properties → Compatibility</string> + <string name="proton_stop_first">หยุดเซสชันที่กำลังทำงานเพื่อติดตั้งหรือลบเครื่องมือความเข้ากันได้</string> + <string name="proton_available">บิลด์ที่พร้อมใช้งาน</string> + <string name="proton_installed">ติดตั้ง %1$s แล้ว</string> + <string name="proton_queued">รอดำเนินการจากคำขอก่อนหน้า</string> + <string name="proton_not_installed">ยังไม่ติดตั้ง</string> + <string name="proton_update_available">มีอัปเดต → %1$s</string> + <string name="proton_remove_older">ลบรุ่นเก่าของ %1$s</string> + <string name="proton_remove_older_body">ลบ %1$s เกมที่ตั้งไว้ให้ใช้รุ่นเหล่านี้ต้องเปลี่ยนไปใช้ Proton อื่น</string> + <string name="proton_remove_body">เกมที่ตั้งไว้ให้ใช้รุ่นนี้ต้องเปลี่ยนไปใช้ Proton อื่น</string> + <string name="proton_install_now">ติดตั้งตอนนี้</string> + <string name="proton_cancel_queued">ยกเลิกรายการที่รออยู่</string> + <string name="pckb_android">แป้นพิมพ์ Android</string> + <string name="pckb_hide">ซ่อน ✕</string> + <string name="main_launch_named">เปิด %1$s</string> + <string name="main_choose_screen">เลือกหน้าจอ หน้าจอที่สอง: %1$s</string> + <string name="main_secondary_gone">หน้าจอที่สองไม่พร้อมใช้งานแล้ว</string> + <string name="main_primary">หน้าจอหลัก</string> + <string name="main_secondary">หน้าจอที่สอง</string> + <string name="widgets_prev_tab">แท็บก่อนหน้า</string> + <string name="widgets_next_tab">แท็บถัดไป</string> + <string name="widgets_on">เปิด</string> + <string name="widgets_all_n">ทั้งหมด %1$d</string> + <string name="widgets_none">ไม่มี</string> + <string name="widgets_n_of_m">%1$d จาก %2$d</string> + <string name="widgets_off">ปิด</string> + <string name="screen_bottom">หน้าจอด้านล่าง</string> + <string name="game_env_applies">มีผลในการเปิดเกมครั้งถัดไป โปรไฟล์ของเกมจะมีสิทธิ์เหนือค่าที่ใช้ร่วมกัน</string> + <string name="game_env_other">เกมอื่นตามรหัสแอป…</string> + <string name="game_env_done">เสร็จสิ้น</string> + <string name="game_env_default">ค่าเริ่มต้น</string> + <string name="game_env_off">ปิด</string> + <string name="game_env_change">เปลี่ยน…</string> + <string name="game_env_change_title">เปลี่ยนตัวแปร</string> + <string name="game_env_restore_default">กลับไปใช้ค่าเริ่มต้น</string> + <string name="game_env_eyebrow">เกม Proton</string> + <string name="pip_title">ภาพซ้อนภาพ</string> + <string name="pip_auto">เข้าสู่ภาพซ้อนภาพโดยอัตโนมัติ</string> + <string name="unfolded_controls">การควบคุมบนหน้าจอที่กางออก</string> + <string name="unfolded_controls_hint">เมื่อกางออก เกมจะอยู่เหนือแทร็กแพดและปุ่มด้านหลังของ Steam Deck เมื่อพับ เกมจะแสดงเต็มจอ</string> + <string name="pip_suspended">หยุดชั่วคราว</string> + <string name="pip_not_ready">ภาพซ้อนภาพจะพร้อมใช้งานเมื่อเซสชันพร้อม</string> + <string name="pip_permission">อนุญาตภาพซ้อนภาพสำหรับ DroidDeck ในการตั้งค่า Android</string> + <string name="pip_unavailable">Android ไม่สามารถเปิดภาพซ้อนภาพได้</string> + <string name="game_shortcut">ช็อตคัต</string> + <string name="game_shortcut_add">เพิ่มไปยังหน้าจอหลัก</string> + <string name="game_shortcut_choose">เลือกเกม</string> + <string name="game_shortcut_scanning">กำลังสแกนเกมที่ติดตั้งไว้…</string> + <string name="game_link_copy">คัดลอกลิงก์เปิดเกม</string> + <string name="game_link_copied">คัดลอกลิงก์เปิดเกมแล้ว</string> + <string name="game_shortcut_unsupported">ตัวเปิดแอปนี้ไม่สามารถเพิ่มช็อตคัตได้ ใช้คัดลอกลิงก์เปิดเกมแทน</string> + <string name="game_link_invalid">ลิงก์เปิดเกมไม่ถูกต้อง</string> + <string name="game_link_missing">เกมนี้ไม่มีอยู่ในไลบรารี DroidDeck ของคุณแล้ว</string> + <string name="game_link_session_busy">หยุดเซสชันปัจจุบันก่อนเปิดเกม Steam</string> + <string name="game_link_failed">ไม่สามารถส่งเกมไปยัง Steam ได้ ลองเปิดอีกครั้ง</string> + <string name="setup_retry_removal">ลองลบใหม่</string> + <string name="runtime_removing">กำลังลบ</string> + <string name="runtime_removal_incomplete">การลบไม่สมบูรณ์</string> + <string name="game_file_export">ส่งออกไฟล์เกม</string> + <string name="game_file_sync">ซิงค์ไฟล์เกมทั้งหมดไปยังโฟลเดอร์</string> + <string name="game_file_stop_sync">หยุดการซิงค์ไฟล์เกม</string> + <string name="game_file_folder">เลือกโฟลเดอร์สำหรับไฟล์เกมของฟรอนต์เอนด์</string> + <string name="game_file_exported">บันทึกไฟล์เกมไปยัง %1$s แล้ว</string> + <string name="game_frontend_files">ไฟล์ของฟรอนต์เอนด์</string> + + <string name="main_wait_runtime">รอให้การดำเนินการของรันไทม์เสร็จสิ้น</string> + <string name="main_wait_proton_install">รอให้การติดตั้งเครื่องมือความเข้ากันได้เสร็จสิ้น</string> + <string name="main_wait_desktop_install">รอให้การติดตั้งแอปเดสก์ท็อปเสร็จสิ้น</string> + <string name="main_wait_install_game">รอให้การติดตั้งเสร็จสิ้นก่อนเปิดเกม</string> + <string name="main_saves_close_session">ปิดเซสชัน Steam ก่อน เพื่อไม่ให้เกมบันทึกทับการนำเข้า</string> + <string name="main_saves_importing">กำลังนำเข้าสู่ %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="other">นำเข้า %1$d ไฟล์จาก %2$s สู่ %3$s แล้ว</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="other">นำเข้า %1$d ไฟล์จาก %2$s สู่ %3$s แล้ว เซฟเก่าสำรองไว้ที่ Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">เลือกไฟล์ zip เซฟสำหรับ %1$s</string> + <string name="main_saves_exporting">กำลังส่งออก %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="other">ส่งออก %1$d ไฟล์เป็น %2$s: %3$s แล้ว</item> + </plurals> + <string name="main_saves_pick_folder">เลือกตำแหน่งบันทึก %1$s (%2$s)</string> + <string name="main_action_failed">%1$s ล้มเหลว: %2$s</string> + <string name="main_no_logs_yet">ยังไม่มีล็อกเซสชัน: รันเซสชันก่อน</string> + <string name="main_no_logs_to_clear">ไม่มีล็อกเซสชันให้ล้าง</string> + <plurals name="main_logs_cleared"> + <item quantity="other">ล้างโฟลเดอร์ล็อกเซสชัน %1$d โฟลเดอร์แล้ว</item> + </plurals> + <string name="main_wadb_pair_failed">การจับคู่ Wireless debugging ล้มเหลว</string> + <string name="main_wadb_command_failed">คำสั่ง Wireless debugging ล้มเหลว</string> + <string name="main_wadb_unavailable">Wireless debugging ไม่พร้อมใช้งาน</string> + <string name="main_adb_copied">คัดลอกคำสั่ง ADB แล้ว</string> + <string name="main_pick_roms">เลือกโฟลเดอร์ ROM</string> + <string name="main_non_adreno_title">ไม่ใช่ GPU Adreno</string> + <string name="main_non_adreno_text">Turnip รองรับ GPU Adreno บน %1$s Steam อาจแสดงจอดำ ดาวน์โหลด: %2$.0f MB</string> + <string name="main_install_anyway">ติดตั้งอยู่ดี</string> + <string name="main_remove_runtime_title">ลบรันไทม์ Linux</string> + <string name="main_remove_runtime_text">การลบนี้จะลบรันไทม์ ไคลเอนต์ Steam ภายใน และเกมทุกเกมที่ติดตั้งอยู่ในนั้น</string> + <string name="main_applied">นำมาใช้แล้ว: %1$s</string> + <string name="android_app_open_failed_primary">ไม่สามารถเปิด %1$s บนหน้าจอหลักได้</string> + <string name="android_app_open_failed_on">ไม่สามารถเปิด %1$s บน %2$s ได้</string> + <string name="android_app_open_failed_display">ไม่สามารถเปิด %1$s บนหน้าจอ %2$d ได้</string> + <string name="comp_busy_importing">กำลังนำเข้า</string> + <string name="comp_busy_swapping">กำลังสลับ</string> + <string name="comp_busy_restoring">กำลังคืนค่า</string> + <string name="comp_busy_cancelling">กำลังยกเลิก</string> + <string name="comp_busy_deleting">กำลังลบ</string> + <string name="comp_cannot_read">ไม่สามารถอ่านไฟล์ได้</string> + <string name="comp_imported">นำเข้า %1$s แล้ว</string> + <string name="comp_swap_cancelled">ยกเลิกการสลับที่รออยู่แล้ว</string> + <string name="comp_pick_wcp">เลือกแพ็กเกจคอมโพเนนต์ (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">ไม่สามารถเข้าถึง Nightlies ได้</string> + <string name="comp_stored">บันทึก %1$s แล้ว</string> + <string name="comp_download_failed">ดาวน์โหลดล้มเหลว: %1$s</string> + <string name="drivers_pick_linux">เลือกไดรเวอร์รันไทม์ Linux (-Linux zip หรือแพ็ก Android + Linux)</string> + <string name="drivers_pick_android">เลือกไดรเวอร์แสดงผล (AdrenoTools zip หรือแพ็ก Android + Linux)</string> + <string name="drivers_pick_any">เลือกไฟล์ zip ไดรเวอร์ หรือแพ็ก Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">กำลังลบ %1$s…</string> + <string name="main_forgetting_named">กำลังลืม %1$s…</string> + <string name="main_pick_game_storage">เลือกโฟลเดอร์พื้นที่จัดเก็บเกม</string> + <string name="main_pick_decky_zip">เลือกไฟล์ ZIP พลักอิน Decky</string> + <string name="main_storage_not_usable">ใช้งานไม่ได้: %1$s</string> + <string name="main_running_program">โปรแกรม</string> + <string name="main_removing_runtime">กำลังลบรันไทม์ Linux</string> + <string name="main_settings_main_screen">ไม่สามารถเปิดการตั้งค่าบนหน้าจอด้านล่างได้ จึงเปิดบนหน้าจอหลักแทน</string> + <string name="main_open_dev_options">เปิดตัวเลือกสำหรับนักพัฒนาในการตั้งค่า</string> + + <string name="upd_unknown_apps_failed">ไม่สามารถเปิดการตั้งค่า “Install unknown apps” ของ Android ได้</string> + <string name="upd_couldnt_check">ไม่สามารถตรวจสอบได้: %1$s</string> + <string name="upd_no_download">บิลด์นี้ไม่มีให้ดาวน์โหลดสำหรับสำเนานี้ของ DroidDeck</string> + <string name="upd_stop_first">หยุดเซสชันที่กำลังทำงานก่อน แล้วจึงอัปเดต</string> + <string name="upd_stage_downloading">กำลังดาวน์โหลด</string> + <string name="upd_stage_installing">กำลังติดตั้ง</string> + <string name="upd_stage_confirm">กำลังรอให้คุณยืนยัน</string> + <string name="upd_failed">การอัปเดตล้มเหลว</string> + <string name="upd_not_offered">Android ไม่ได้เสนอให้ติดตั้งอัปเดต</string> + + <string name="decky_install_failed">ติดตั้ง Decky ล้มเหลว: %1$s</string> + <string name="decky_plugin_starting">กำลังเริ่มนำเข้าพลักอิน…</string> + <string name="decky_plugin_failed">นำเข้าพลักอินล้มเหลว: %1$s</string> + <string name="decky_plugin_installed">ติดตั้งพลักอินแล้ว รีสตาร์ท Steam เพื่อโหลด</string> + + <string name="drivers_not_checked">ยังไม่ตรวจสอบ - แตะรีเฟรชเพื่อค้นหาไดรเวอร์ใหม่</string> + <string name="drivers_bundle_sets_display">Android + Linux: ตั้งไดรเวอร์แสดงผลไปด้วย</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: ตั้งไดรเวอร์รันไทม์ไปด้วย</string> + <string name="drivers_runtime_builtin">Turnip ที่มีในตัวรันไทม์</string> + <string name="drivers_system_vulkan">Vulkan ของระบบ: ไม่มีบิลด์ที่รวมไว้สำหรับ GPU นี้</string> + <string name="drivers_bundled">%1$s (รวมมาด้วย)</string> + <string name="drivers_manual">กำหนดเอง</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">มีการเผยแพร่เพียงครึ่งหนึ่งในขณะนี้</string> + <string name="drivers_pair_size">%1$.0f MB สำหรับทั้งคู่</string> + <string name="drivers_none_to_set">ไม่มีไดรเวอร์ให้ตั้งค่า: %1$s</string> + <string name="drivers_checking_latest">กำลังตรวจสอบไดรเวอร์ล่าสุด…</string> + <string name="drivers_up_to_date_check_failed">เป็นรุ่นล่าสุดแล้ว (ตรวจสอบไม่ได้: %1$s)</string> + <string name="drivers_recommended_unpublished">ไดรเวอร์ที่แนะนำยังไม่ได้เผยแพร่ในขณะนี้</string> + <string name="drivers_downloading_pair">กำลังดาวน์โหลด %1$s %2$s…</string> + <string name="drivers_updated_to">อัปเดตเป็น %1$s %2$s แล้ว</string> + <string name="drivers_updated_to_restart">อัปเดตเป็น %1$s %2$s แล้ว ไดรเวอร์แสดงผลจะมีผลหลัง DroidDeck รีสตาร์ท</string> + <string name="drivers_auto_waits_for_session">การอัปเดตไดรเวอร์จะรอจนกว่าเซสชันจะหยุด</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s จะดาวน์โหลดเมื่อคุณออกจากข้อมูลมือถือและโหมดประหยัดแบตเตอรี่</string> + <string name="drivers_skipping_bad">%1$s %2$s ไม่ได้เริ่มเซสชันที่นี่ อัตโนมัติจึงใช้ไดรเวอร์ที่เริ่มได้</string> + <string name="drivers_rolled_back">%1$s เริ่มเซสชันไม่สำเร็จสองครั้ง อัตโนมัติจึงกลับไปใช้ไดรเวอร์ที่ทำงานได้</string> + <string name="drivers_switched_to">สลับเป็น %1$s %2$s แล้ว</string> + <string name="drivers_switched_to_restart">สลับเป็น %1$s %2$s แล้ว ไดรเวอร์แสดงผลจะมีผลหลัง DroidDeck รีสตาร์ท</string> + <string name="drivers_using">กำลังใช้ %1$s %2$s</string> + <string name="drivers_using_restart">กำลังใช้ %1$s %2$s ไดรเวอร์แสดงผลจะมีผลหลัง DroidDeck รีสตาร์ท</string> + <string name="drivers_using_quest">กำลังใช้ไดรเวอร์จอที่มากับ Quest และรันไทม์ค่าเริ่มต้น</string> + <string name="drivers_using_quest_restart">กำลังใช้ไดรเวอร์จอที่มากับ Quest และรันไทม์ค่าเริ่มต้น ไดรเวอร์จอจะมีผลหลังรีสตาร์ต DroidDeck</string> + <string name="drivers_not_a_driver">ไม่ใช่ไฟล์ zip ไดรเวอร์: ไม่ใช่ไดรเวอร์ AdrenoTools, Turnip -Linux หรือแพ็ก Android + Linux</string> + <string name="drivers_import_failed">นำเข้าล้มเหลว: %1$s</string> + <string name="drivers_imported_unnamed">นำเข้าไดรเวอร์แล้ว</string> + <string name="drivers_using_bundle">กำลังใช้ %1$s เป็นทั้งไดรเวอร์รันไทม์และแสดงผล</string> + <string name="drivers_using_bundle_restart">กำลังใช้ %1$s เป็นทั้งไดรเวอร์รันไทม์และแสดงผล ไดรเวอร์แสดงผลจะมีผลหลัง DroidDeck รีสตาร์ท</string> + <string name="drivers_deleted_bundle">ลบ %1$s แล้ว (ไดรเวอร์ทั้งสอง)</string> + <string name="drivers_deleted">ลบ %1$s แล้ว</string> + <string name="drivers_release_status">ล่าสุด: %1$s · ตรวจสอบเมื่อ %2$s</string> + <string name="drivers_release_status_failed">ล่าสุด: %1$s · %2$s เข้าถึงไม่ได้ · ตรวจสอบเมื่อ %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="other">%1$d นาทีที่แล้ว</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="other">%1$d ชั่วโมงที่แล้ว</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="other">%1$d วันที่แล้ว</item> + </plurals> + <string name="drivers_checking_sources">กำลังตรวจสอบ Banners-Turnip, WinNative และ DroidDeck…</string> + <string name="drivers_check_failed">ตรวจสอบล้มเหลว</string> + <string name="drivers_installed_pick_either">ติดตั้ง %1$s แล้ว - เลือกจากรายการใดก็ได้เพื่อตั้งค่าไดรเวอร์ทั้งสอง</string> + <string name="drivers_installed_pick">ติดตั้ง %1$s แล้ว - เลือกจากเมนู</string> + + <string name="session_wait_removal">รอให้การลบรันไทม์เสร็จสิ้น</string> + <string name="session_title_game">เกม</string> + <string name="session_touch_auto_touchpad">ทัชแพด</string> + <string name="session_touch_auto_direct">โดยตรง</string> + <string name="session_swap_failed">สลับล้มเหลว: %1$s</string> + <string name="session_profile_save_failed">บันทึกโปรไฟล์ล้มเหลว: %1$s</string> + <string name="session_desktop_paused">เดสก์ท็อปหยุดชั่วคราว</string> + <string name="session_named_paused">%1$s หยุดชั่วคราว</string> + <string name="session_program_paused">โปรแกรมหยุดชั่วคราว</string> + <string name="session_starting_desktop">กำลังเริ่มเดสก์ท็อป</string> + <string name="session_starting_named">กำลังเริ่ม %1$s</string> + <string name="session_starting_program">กำลังเริ่มโปรแกรม</string> + <string name="session_no_logs">ไม่มีล็อกสำหรับเซสชันนี้</string> + <string name="session_logs_archive_failed">ไม่สามารถสร้างไฟล์เก็บถาวรล็อกเซสชันได้</string> + <string name="session_logs_share_failed">ไม่สามารถแชร์ล็อกเซสชันได้</string> + <string name="session_starting_session">กำลังเริ่มเซสชัน…</string> + <string name="session_runtime_downloading">กำลังดาวน์โหลดรันไทม์ Linux</string> + <string name="session_runtime_downloading_mb">กำลังดาวน์โหลดรันไทม์ Linux · %1$d จาก %2$d MB</string> + <string name="session_runtime_checking">กำลังตรวจสอบรันไทม์ Linux</string> + <string name="session_runtime_unpacking">กำลังแตกไฟล์รันไทม์ Linux</string> + <string name="session_desktop_downloading">กำลังดาวน์โหลดเดสก์ท็อป</string> + <string name="session_desktop_downloading_mb">กำลังดาวน์โหลดเดสก์ท็อป · %1$d จาก %2$d MB</string> + <string name="session_desktop_checking">กำลังตรวจสอบเดสก์ท็อป</string> + <string name="session_desktop_unpacking">กำลังแตกไฟล์เดสก์ท็อป</string> + <string name="session_proton_downloading">กำลังดาวน์โหลด Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">กำลังดาวน์โหลด Proton Experimental (ARM64) · %1$d จาก %2$d MB</string> + <string name="session_proton_checking">กำลังตรวจสอบ Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">กำลังแตกไฟล์ Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">ไม่สามารถเข้าถึงแคตตาล็อกรันไทม์ได้ ตรวจสอบการเชื่อมต่อแล้วกด Play อีกครั้ง</string> + <string name="session_runtime_install_failed">รันไทม์ Linux ติดตั้งไม่สำเร็จ ตรวจสอบรันไทม์ในการตั้งค่าแล้วกด Play อีกครั้ง</string> + <string name="session_desktop_install_failed">เดสก์ท็อปติดตั้งไม่สำเร็จ (%1$s) ตรวจสอบการเชื่อมต่อแล้วกดเดสก์ท็อปอีกครั้ง</string> + <string name="session_ended_named">%1$s หยุดทำงานกะทันหัน แชร์ล็อกพร้อมรายงานข้อบกพร่อง หรือลองใหม่</string> + <string name="session_ended_program">โปรแกรมหยุดทำงานกะทันหัน แชร์ล็อกพร้อมรายงานข้อบกพร่อง หรือลองใหม่</string> + <string name="session_ended_desktop">เดสก์ท็อปหยุดทำงานกะทันหัน แชร์ล็อกพร้อมรายงานข้อบกพร่อง หรือลองใหม่</string> + <string name="session_ended_detail">สถานะออก %1$d · %2$s</string> + <string name="session_ended_no_log">ไม่มีล็อก</string> + <plurals name="session_hint_enosys"> + <item quantity="other">ล็อกแสดงข้อผิดพลาด “Function not implemented” %1$d รายการ: การเร่งความเร็ว seccomp ของ proot ทำให้ตัวช่วยบนอุปกรณ์นี้ล้มเหลว ลอง %2$s → “%3$s” (หรือ “%4$s”) แล้วเริ่มใหม่</item> + </plurals> + + <string name="mode_decky_plugins">พลักอิน</string> + <string name="mode_decky_plugins_hint">ติดตั้งไฟล์ ZIP พลักอินสำหรับเซสชัน Steam ครั้งถัดไป</string> + <string name="mode_decky_plugin_downloading">กำลังดาวน์โหลด…</string> + <string name="mode_decky_plugin_install_zip">ติดตั้งจาก ZIP</string> + <string name="store_cat_games">เกม</string> + <string name="store_cat_audio_video">เสียงและวิดีโอ</string> + <string name="store_cat_graphics">กราฟิก</string> + <string name="store_cat_internet">อินเทอร์เน็ต</string> + <string name="store_cat_office">สำนักงาน</string> + <string name="store_cat_developer">นักพัฒนา</string> + <string name="store_cat_education">การศึกษา</string> + <string name="store_cat_science">วิทยาศาสตร์</string> + <string name="store_cat_system">ระบบ</string> + <string name="store_cat_utilities">ยูทิลิตี</string> + <string name="store_section_popular">ได้รับความนิยม</string> + <string name="store_section_trending">กำลังเป็นที่นิยม</string> + <string name="store_section_new">ใหม่</string> + <string name="store_section_updated">อัปเดตแล้ว</string> + <string name="store_section_loading">กำลังโหลด…</string> + <string name="store_flatpak_setup">การตั้งค่า Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">ไม่สามารถตรวจสอบการอัปเดตจาก Flathub ได้</string> + <string name="content_rom_installed">ติดตั้งแล้ว</string> + <string name="content_rom_folder">โฟลเดอร์</string> + <string name="theme_graphite">Graphite</string> + <string name="theme_graphite_detail">พื้นผิวสีเทาแกรไฟต์ พร้อมสีฟ้าของโลโก้สำหรับทุกสิ่งที่ถูกเลือก โฟกัส หรือกด</string> + <string name="theme_paper">กระดาษบนพื้นดำ</string> + <string name="theme_paper_detail">สีขาวเป็นหลัก สีฟ้าของไอคอนเป็นสัญญาณสำหรับเส้น วงแหวน และจุด</string> + <string name="theme_icon_blue">ฟ้าไอคอน</string> + <string name="theme_icon_blue_detail">พื้นดำ ตัวอักษรขาว สีฟ้าสำหรับทุกสิ่งที่ถูกเลือก โฟกัส หรือกด</string> + <string name="theme_electric">กรมท่าไฟฟ้า</string> + <string name="theme_electric_detail">สีฟ้าสว่างขึ้น บนพื้นผิวที่เอียงไปทางกรมท่ามากกว่าเทา</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">ติดตั้งรันไทม์ก่อน</string> + <string name="game_sync_err_steam_library">ไลบรารี Steam ไม่พร้อมใช้งาน</string> + <string name="game_sync_err_previous_sd">ไลบรารี SD ก่อนหน้าไม่พร้อมใช้งาน</string> + <string name="game_sync_err_game_storage">พื้นที่จัดเก็บเกมไม่พร้อมใช้งาน</string> + <string name="game_sync_err_added_games">โฟลเดอร์เกมที่เพิ่มไม่พร้อมใช้งาน</string> + <string name="game_sync_err_manifests">ไฟล์ manifest ของ Steam ไม่พร้อมใช้งาน</string> + <string name="content_system_many">หลายระบบ</string> + <string name="fm_drive_internal">ภายใน</string> + <string name="fm_drive_linux">ระบบ Linux</string> + <string name="fm_drive_sd">การ์ด SD</string> + <string name="fm_drive_storage">พื้นที่จัดเก็บ</string> + <string name="fm_select">เลือก</string> + <string name="fm_properties">คุณสมบัติ</string> + <string name="fm_favorite_add">เพิ่มในรายการโปรด</string> + <string name="fm_favorite_remove">ลบจากรายการโปรด</string> + <string name="fm_rename">เปลี่ยนชื่อ</string> + <string name="fm_copy">คัดลอก</string> + <string name="fm_cut">ตัด</string> + <string name="fm_actions">การดำเนินการ</string> + <string name="fm_favorites">รายการโปรด</string> + <string name="fm_pin_current">ปักหมุดโฟลเดอร์นี้</string> + <string name="fm_no_favorites">ยังไม่มีรายการโปรด - ปักหมุดโฟลเดอร์ด้วยเมนู ⋮ เพื่อย้อนกลับมาที่นี่ได้เร็ว</string> + <string name="fm_unpin_favorite">ลบออกจากรายการโปรด</string> + <string name="fm_size_zero">0 ไบต์</string> + <string name="fm_unit_bytes">ไบต์</string> + <string name="fm_prop_location">ตำแหน่ง</string> + <string name="fm_prop_type">ชนิด</string> + <string name="fm_prop_size">ขนาด</string> + <string name="fm_prop_modified">แก้ไขล่าสุด</string> + <string name="fm_type_folder">โฟลเดอร์</string> + <string name="fm_type_file">ไฟล์</string> + <string name="fm_type_ext_file">ไฟล์ %1$s</string> + <string name="fm_read_only">อ่านอย่างเดียว</string> + <string name="fm_read_only_hint">ป้องกันไม่ให้เกม (และ Wine) เขียนทับหรือลบไฟล์นี้</string> + <string name="fm_read_only_failed">ไม่สามารถเปลี่ยนสถานะอ่านอย่างเดียวได้</string> + <string name="fm_hidden">ซ่อน</string> + <string name="fm_hidden_unsupported">พื้นที่จัดเก็บนี้ไม่สามารถเก็บสถานะซ่อนได้</string> + <string name="fm_hidden_hint">ตั้งค่าไฟล์เป็นซ่อนสำหรับ Windows (แอตทริบิวต์ซ่อนของ Wine)</string> + <string name="fm_hidden_failed">ไม่สามารถเปลี่ยนสถานะซ่อนบนพื้นที่จัดเก็บนี้ได้</string> + <string name="fm_done">เสร็จสิ้น</string> + <string name="fm_op_deleting">กำลังลบ...</string> + <string name="fm_delete_failed">ลบล้มเหลว</string> + <string name="fm_op_moving">กำลังย้าย...</string> + <string name="fm_op_copying">กำลังคัดลอก...</string> + <string name="fm_op_moving_item">กำลังย้าย - %1$s</string> + <string name="fm_op_copying_item">กำลังคัดลอก - %1$s</string> + <string name="fm_op_moving_batch">กำลังย้าย %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">กำลังคัดลอก %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">เสร็จ %1$d รายการ ล้มเหลว %2$d รายการ</string> + <string name="fm_paste_skipped">เสร็จ %1$d รายการ ข้าม %2$d รายการ</string> + <plurals name="fm_paste_moved"> + <item quantity="other">ย้าย %1$d รายการแล้ว</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="other">คัดลอก %1$d รายการแล้ว</item> + </plurals> + <string name="fm_already_exists">“%1$s” มีอยู่แล้ว</string> + <string name="fm_op_renaming">กำลังเปลี่ยนชื่อ...</string> + <string name="fm_rename_failed">เปลี่ยนชื่อล้มเหลว</string> + <string name="fm_op_creating_folder">กำลังสร้างโฟลเดอร์...</string> + <string name="fm_create_folder_failed">ไม่สามารถสร้างโฟลเดอร์ได้</string> + <string name="fm_new_folder">โฟลเดอร์ใหม่</string> + <string name="fm_folder_name">ชื่อโฟลเดอร์</string> + <string name="fm_create">สร้าง</string> + <string name="fm_new_name">ชื่อใหม่</string> + <string name="fm_delete_title">ลบหรือไม่?</string> + <string name="fm_delete_text">ลบ “%1$s” อย่างถาวรหรือไม่?</string> + <plurals name="fm_delete_items_title"> + <item quantity="other">ลบ %1$d รายการหรือไม่?</item> + </plurals> + <string name="fm_cannot_undo">ไม่สามารถยกเลิกการดำเนินการนี้ได้</string> + <plurals name="fm_and_more"> + <item quantity="other">…และอีก %1$d รายการ</item> + </plurals> + <string name="fm_op_deleting_batch">กำลังลบ %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="other">ลบไม่ได้ %1$d รายการ</item> + </plurals> + <string name="fm_conflict_merge_hint">ผสานจะเพิ่มและแทนที่ไฟล์ภายในโฟลเดอร์ที่มีอยู่</string> + <string name="fm_conflict_overwrite_hint">เขียนทับจะแทนที่ไฟล์ที่มีอยู่</string> + <string name="fm_conflict_apply_all">ใช้กับความขัดแย้งทั้งหมด</string> + <string name="fm_conflict_merge">ผสาน</string> + <string name="fm_conflict_overwrite">เขียนทับ</string> + <string name="fm_conflict_keep_both">เก็บไว้ทั้งสอง</string> + <string name="fm_conflict_skip">ข้าม</string> + <string name="fm_select_this_folder">เลือกโฟลเดอร์นี้</string> + <string name="fm_back">กลับ</string> + <string name="fm_drive_not_readable">%1$s ติดตั้งอยู่แต่อ่านไม่ได้ในขณะนี้</string> + <string name="fm_list_view">มุมมองรายการ</string> + <string name="fm_grid_view">มุมมองตาราง</string> + <string name="fm_search">ค้นหา</string> + <string name="fm_sort">จัดเรียง</string> + <string name="fm_sort_name">ชื่อ</string> + <string name="fm_sort_date">วันที่แก้ไข</string> + <string name="fm_rows_comfortable">แถวแบบสบาย</string> + <string name="fm_rows_compact">แถวแบบกระชับ</string> + <string name="fm_hide_hidden">ซ่อนไฟล์ที่ซ่อนอยู่</string> + <string name="fm_show_hidden">แสดงไฟล์ที่ซ่อนอยู่</string> + <string name="fm_hide_favorites">ซ่อนรายการโปรด</string> + <string name="fm_show_favorites">แสดงรายการโปรด</string> + <string name="fm_filter_folder">กรองโฟลเดอร์นี้</string> + <string name="fm_free_space">เหลือ %1$s</string> + <string name="fm_selected_count">เลือกแล้ว %1$d รายการ</string> + <string name="fm_select_none">ไม่มี</string> + <string name="fm_select_all">ทั้งหมด</string> + <string name="fm_paste">วาง</string> + <plurals name="fm_items"> + <item quantity="other">%1$d รายการ</item> + </plurals> + <string name="fm_paste_here">วาง %1$s ที่นี่</string> + <string name="fm_paste_move_here">วาง %1$s (ย้าย) ที่นี่</string> + <string name="fm_rail_title">ไฟล์</string> + <string name="fm_rail_storage">พื้นที่จัดเก็บ</string> + <string name="fm_rail_quick">ด่วน</string> + <string name="fm_rail_favorites">รายการโปรด</string> + <string name="fm_rail_downloads">ดาวน์โหลด</string> + <string name="fm_rail_downloads_short">ดาวน์โหลด</string> + <string name="fm_rail_roms">ROM</string> + <string name="fm_rail_session_logs">ล็อกเซสชัน</string> + <string name="fm_rail_pictures">รูปภาพ</string> + <string name="fm_favorite_added">เพิ่ม “%1$s” ในรายการโปรดแล้ว</string> + <string name="fm_favorite_removed">ลบ “%1$s” จากรายการโปรดแล้ว</string> + <string name="fm_empty_directory">ไดเรกทอรีว่างเปล่า</string> + <string name="fm_up_one_level">ขึ้นหนึ่งระดับ</string> + <string name="fm_choose_folder">เลือกโฟลเดอร์</string> + <string name="fm_choose_file">เลือกไฟล์</string> + <string name="ctrl_tint_steam_blue">ฟ้า Steam</string> + <string name="ctrl_tint_sky">ฟ้าสดใส</string> + <string name="ctrl_tint_white">ขาว</string> + <string name="ctrl_tint_violet">ม่วง</string> + <string name="ctrl_tint_green">เขียว</string> + <string name="ctrl_tint_amber">อำพัน</string> + <string name="ctrl_tint_red">แดง</string> + <string name="ctrl_tint_pink">ชมพู</string> + <string name="ctrl_button_a">ปุ่ม A</string> + <string name="ctrl_button_b">ปุ่ม B</string> + <string name="ctrl_button_x">ปุ่ม X</string> + <string name="ctrl_button_y">ปุ่ม Y</string> + <string name="ctrl_button_lb">ปุ่มกระดกซ้าย</string> + <string name="ctrl_button_rb">ปุ่มกระดกขวา</string> + <string name="ctrl_button_lt">ทริกเกอร์ซ้าย</string> + <string name="ctrl_button_rt">ทริกเกอร์ขวา</string> + <string name="ctrl_button_view">ปุ่ม View</string> + <string name="ctrl_button_menu">ปุ่ม Menu</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad ขึ้น</string> + <string name="ctrl_target_down">D-pad ลง</string> + <string name="ctrl_target_left">D-pad ซ้าย</string> + <string name="ctrl_target_right">D-pad ขวา</string> + <string name="ctrl_target_hidden">ซ่อน</string> + <string name="ctrl_editor_drag">ลากเพื่อย้าย</string> + <string name="ctrl_editor_snap">จัดให้พอดี</string> + <string name="ctrl_editor_save">บันทึก</string> + <string name="second_mode_none">ไม่มี</string> + <string name="second_mode_keyboard_trackpad">แป้นพิมพ์ + แทร็กแพด</string> + <string name="second_mode_terminal">เทอร์มินัล</string> + <string name="second_mode_deck_controls">ปุ่มด้านหลังและแทร็กแพดของ Deck</string> + + <string name="rtinst_removing">กำลังลบรันไทม์ Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="other">กำลังลบรันไทม์ Linux · %1$d รายการ</item> + </plurals> + <string name="rtinst_removed">ลบรันไทม์ Linux แล้ว</string> + <string name="rtinst_removal_failed">ไม่สามารถลบรันไทม์ Linux ให้เสร็จสมบูรณ์ได้ ลองลบใหม่ในการตั้งค่า</string> + <string name="rtinst_removing_leftovers">กำลังลบเศษไฟล์รันไทม์ที่เหลือ</string> + <string name="rtinst_downloading">กำลังดาวน์โหลด</string> + <string name="rtinst_verifying">กำลังตรวจสอบ</string> + <string name="rtinst_extracting">กำลังแตกไฟล์</string> + <string name="rtinst_channel_description">แสดงขณะติดตั้งหรือลบรันไทม์ Linux</string> + <string name="rtinst_title_installing">กำลังติดตั้งรันไทม์ Linux</string> + <string name="rtinst_title_removing">กำลังลบรันไทม์ Linux</string> + + <string name="deskpkg_runtime_missing">ยังไม่ติดตั้งรันไทม์ Linux</string> + <string name="deskpkg_no_checksum">แคตตาล็อกไม่มีค่าตรวจสอบสำหรับ %1$s</string> + <string name="deskpkg_checksum_mismatch">ค่าตรวจสอบไม่ตรงกัน - ไม่มีการเปลี่ยนแปลงใด ๆ</string> + <string name="deskpkg_installing">กำลังติดตั้ง %1$s</string> + <string name="deskpkg_place_failed">ไม่สามารถวาง AppImage ได้</string> + <string name="deskpkg_extract_failed">การแตกไฟล์ล้มเหลว</string> + <string name="deskpkg_install_failed">การติดตั้งล้มเหลว</string> + + <string name="flatpakmgr_setup_failed">การตั้งค่า Flatpak ล้มเหลว (ออกด้วยสถานะ %1$d)</string> + <string name="flatpakmgr_setup_unfinished">การตั้งค่า Flatpak ไม่เสร็จสมบูรณ์</string> + <string name="flatpakmgr_busy">มีงานสโตร์อื่นกำลังทำงานอยู่</string> + <string name="flatpakmgr_not_ready">ตั้งค่า Flatpak ก่อน</string> + <string name="flatpakmgr_starting">กำลังเริ่ม</string> + <string name="flatpakmgr_exit_status">Flatpak ออกด้วยสถานะ %1$d</string> + <string name="flatpakmgr_installing">กำลังติดตั้ง %1$s</string> + <string name="flatpakmgr_updating">กำลังอัปเดต %1$s</string> + <string name="flatpakmgr_removing">กำลังลบ %1$s</string> + <string name="flatpakmgr_installing_step">กำลังติดตั้ง %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">กำลังอัปเดต %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">กำลังลบ %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">คำแปล</string> + <string name="flatpakmgr_ref_graphics_drivers">ไดรเวอร์กราฟิก</string> + <string name="flatpakmgr_ref_media_codecs">ตัวแปลงรหัสสื่อ</string> + <string name="flatpakmgr_ref_runtime">รันไทม์ %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">รันไทม์ %1$s %2$s</string> + + <string name="appimg_too_small">ไฟล์มีขนาดเล็กเกินกว่าจะเป็น AppImage</string> + <string name="appimg_unreadable">ไม่สามารถอ่านไฟล์ได้: %1$s</string> + <string name="appimg_not_linux">นี่ไม่ใช่ AppImage (ไม่ใช่โปรแกรม Linux)</string> + <string name="appimg_wrong_arch">AppImage นี้ไม่ได้สร้างมาสำหรับ ARM64 (aarch64) หรือพีซี x86</string> + <string name="appimg_not_appimage">นี่เป็นโปรแกรม Linux แต่ไม่ใช่ AppImage</string> + <string name="appimg_wrong_type">นำเข้าได้เฉพาะ AppImage ประเภท 2 เท่านั้น (ไฟล์นี้เป็นประเภท %1$d)</string> + <string name="appimg_no_space_import">พื้นที่ว่างไม่พอ: การนำเข้าต้องใช้ประมาณ %1$s</string> + <string name="appimg_no_space_update">พื้นที่ว่างไม่พอ: การอัปเดตต้องใช้ประมาณ %1$s</string> + <string name="appimg_import_failed">นำเข้าล้มเหลว</string> + <string name="appimg_gone">AppImage นั้นหายไปแล้ว</string> + <string name="appimg_update_failed">อัปเดตล้มเหลว</string> + <string name="appimg_extracting">กำลังแตกไฟล์ %1$s</string> + <string name="appimg_extract_failed">ไม่สามารถแตกไฟล์ AppImage ได้</string> + <string name="appimg_extract_failed_detail">ไม่สามารถแตกไฟล์ AppImage ได้: %1$s</string> + + <string name="deckymgr_stop_session_loader">หยุดเซสชันที่กำลังทำงานก่อนติดตั้ง Decky Loader</string> + <string name="deckymgr_download_failed">ดาวน์โหลด Decky Loader ล้มเหลว</string> + <string name="deckymgr_size_mismatch">ขนาด Decky Loader ไม่ตรงกับข้อมูลเมตาของรุ่นที่เผยแพร่</string> + <string name="deckymgr_checksum_download_failed">ไม่สามารถดาวน์โหลดค่าตรวจสอบของรุ่นที่เผยแพร่ได้</string> + <string name="deckymgr_checksum_missing">ไม่มีค่าตรวจสอบของรุ่นที่เผยแพร่</string> + <string name="deckymgr_checksum_invalid">ค่าตรวจสอบของรุ่นที่เผยแพร่ไม่ถูกต้อง</string> + <string name="deckymgr_checksum_mismatch">ค่าตรวจสอบของ Decky Loader ไม่ตรงกัน</string> + <string name="deckymgr_not_elf">ไฟล์ของรุ่นที่เผยแพร่ไม่ใช่โปรแกรม Linux 64 บิตที่ใช้ได้</string> + <string name="deckymgr_session_started_loader">มีเซสชันเริ่มขึ้นระหว่างการดาวน์โหลด หยุดเซสชันก่อนติดตั้ง Decky Loader</string> + <string name="deckymgr_loader_not_executable">ไม่สามารถตั้งค่า PluginLoader ให้รันได้</string> + <string name="deckymgr_cef_failed">ไม่สามารถเปิดการดีบักระยะไกล CEF ของ Steam ได้</string> + <string name="deckymgr_stage_failed">ไม่สามารถเตรียม PluginLoader ได้</string> + <string name="deckymgr_loader_preserve_failed">ไม่สามารถเก็บ PluginLoader เดิมไว้ได้</string> + <string name="deckymgr_loader_activate_failed">ไม่สามารถเปิดใช้ PluginLoader ใหม่ได้</string> + <string name="deckymgr_stop_session_plugin">หยุดเซสชันที่กำลังทำงานก่อนติดตั้งพลักอิน</string> + <string name="deckymgr_loader_required">ติดตั้ง Decky Loader ก่อนนำเข้าพลักอิน</string> + <string name="deckymgr_zip_unreadable">ไม่สามารถอ่านไฟล์ ZIP ที่เลือกได้</string> + <string name="deckymgr_plugins_dir_failed">ไม่สามารถสร้างไดเรกทอรีพลักอินของ Decky ได้</string> + <string name="deckymgr_extracting_zip">กำลังแตกไฟล์ ZIP พลักอิน</string> + <string name="deckymgr_zip_one_folder">ไฟล์ ZIP พลักอินต้องมีโฟลเดอร์พลักอินระดับบนสุดเพียงหนึ่งโฟลเดอร์</string> + <string name="deckymgr_zip_missing_files">ไฟล์ ZIP พลักอินไม่มี plugin.json, package.json หรือ dist/index.js</string> + <string name="deckymgr_plugin_name_missing">ไม่มีชื่อพลักอิน</string> + <string name="deckymgr_session_started_plugin">มีเซสชันเริ่มขึ้นระหว่างการติดตั้ง หยุดเซสชันก่อนติดตั้งพลักอิน</string> + <string name="deckymgr_plugin_installed">ติดตั้งพลักอินแล้ว · รีสตาร์ท Steam เพื่อโหลด</string> + <string name="deckymgr_plugin_install_failed">การติดตั้งไฟล์ ZIP พลักอินล้มเหลว</string> + <string name="deckymgr_zip_too_many">ไฟล์ ZIP พลักอินมีรายการมากเกินไป</string> + <string name="deckymgr_zip_invalid_path">ไฟล์ ZIP พลักอินมีพาธที่ไม่ถูกต้อง</string> + <string name="deckymgr_zip_duplicate_paths">ไฟล์ ZIP พลักอินมีพาธซ้ำกัน</string> + <string name="deckymgr_zip_unsafe_path">ไฟล์ ZIP พลักอินมีพาธที่ไม่ปลอดภัย</string> + <string name="deckymgr_folder_failed">ไม่สามารถสร้างโฟลเดอร์พลักอินได้</string> + <string name="deckymgr_zip_too_large">ไฟล์ ZIP พลักอินขยายเกินขีดจำกัด 1 GiB</string> + <string name="deckymgr_bundled_not_executable">ไม่สามารถตั้งค่าไฟล์ไบนารีพลักอินที่มาด้วยให้รันได้</string> + <string name="deckymgr_remote_entry_invalid">รายการ remote_binary ไม่ถูกต้อง</string> + <string name="deckymgr_remote_name_invalid">ชื่อไบนารีระยะไกลไม่ถูกต้อง</string> + <string name="deckymgr_remote_url_https">URL ไบนารีระยะไกลต้องใช้ HTTPS</string> + <string name="deckymgr_remote_hash_invalid">ไบนารีระยะไกล %1$s มีแฮช SHA-256 ที่ไม่ถูกต้อง</string> + <string name="deckymgr_bin_dir_failed">ไม่สามารถสร้างไดเรกทอรี bin ของพลักอินได้</string> + <string name="deckymgr_downloading_binary">กำลังดาวน์โหลดไบนารีพลักอิน · %1$s</string> + <string name="deckymgr_binary_download_failed">ไม่สามารถดาวน์โหลดไบนารีพลักอิน %1$s ได้</string> + <string name="deckymgr_binary_checksum_mismatch">ค่าตรวจสอบของไบนารีพลักอินไม่ตรงกัน · %1$s</string> + <string name="deckymgr_binary_not_executable">ไม่สามารถตั้งค่าไบนารีพลักอิน %1$s ให้รันได้</string> + <string name="deckymgr_binary_replace_failed">ไม่สามารถแทนที่ไบนารีพลักอิน %1$s ได้</string> + <string name="deckymgr_binary_install_failed">ไม่สามารถติดตั้งไบนารีพลักอิน %1$s ได้</string> + <string name="deckymgr_folder_taken">โฟลเดอร์พลักอินนี้เป็นของพลักอินอื่น</string> + <string name="deckymgr_preserve_failed">ไม่สามารถเก็บพลักอินเดิมไว้ได้</string> + <string name="deckymgr_activate_failed">ไม่สามารถเปิดใช้พลักอินที่นำเข้าได้</string> + <string name="deckymgr_settings_failed">ไม่สามารถอัปเดตการตั้งค่าพลักอินของ Decky ได้</string> + <string name="deckymgr_restore_failed">ไม่สามารถคืนค่าพลักอินเดิมได้</string> + + <string name="adbfix_save_failed">ไม่สามารถบันทึกข้อมูลประจำตัวของ Wireless debugging ได้</string> + <string name="adbfix_command_failed">คำสั่ง ADB ล้มเหลว (%1$d)</string> + <string name="adbfix_not_confirmed">Android ไม่ได้ยืนยันว่าขีดจำกัดโพรเซสลูกถูกเปลี่ยน: %1$s</string> + <string name="adbfix_no_pairing">ไม่มีการจับคู่ Wireless debugging ที่บันทึกไว้</string> + <string name="adbfix_enter_address">กรอกที่อยู่ IP และพอร์ตปัจจุบันของ Wireless debugging</string> + + <string name="adbpair_timed_out">รอป๊อปอัปการจับคู่หมดเวลา ลองใหม่จาก DroidDeck</string> + <string name="adbpair_discovery_failed_code">ไม่สามารถค้นหาป๊อปอัปการจับคู่ได้ (%1$d) ตรวจสอบว่าเปิด Wi-Fi อยู่</string> + <string name="adbpair_discovery_failed">ไม่สามารถค้นหาป๊อปอัปการจับคู่ได้: %1$s</string> + <string name="adbpair_six_digits">กรอกรหัสให้ครบทั้ง 6 หลัก</string> + <string name="adbpair_pairing">กำลังจับคู่…</string> + <string name="adbpair_code_rejected">รหัสนั้นใช้ไม่ได้ เปิดป๊อปอัปการจับคู่อีกครั้งและกรอกรหัสใหม่</string> + <string name="adbpair_connecting">จับคู่แล้ว กำลังเชื่อมต่อ…</string> + <string name="adbpair_port_not_found">จับคู่แล้ว แต่ไม่พบพอร์ตของ Wireless debugging เปิด Wireless debugging ไว้แล้วลองใหม่</string> + <string name="adbpair_applying">กำลังปรับใช้การตั้งค่า…</string> + <string name="adbpair_command_failed">คำสั่ง Wireless debugging ล้มเหลว</string> + <string name="adbpair_channel_name">การตั้งค่า Wireless debugging</string> + <string name="adbpair_channel_description">ขอรหัสจับคู่ Wireless debugging ขณะเปิดการตั้งค่าอยู่</string> + <string name="adbpair_title_pair">จับคู่ Wireless debugging</string> + <string name="adbpair_waiting_text">เปิด Wireless debugging แล้วแตะ “Pair device with pairing code”</string> + <string name="adbpair_waiting_long">เปิด Wireless debugging แล้วแตะ “Pair device with pairing code” อยู่ในการตั้งค่าต่อไป: รหัสจะอยู่ในการแจ้งเตือนนี้</string> + <string name="adbpair_code_label">รหัสจับคู่ 6 หลัก</string> + <string name="adbpair_code_hint">แตะกรอกรหัสแล้วพิมพ์ตัวเลข 6 หลักที่แสดงในการตั้งค่า</string> + <string name="adbpair_title_code">กรอกรหัสจับคู่ Wi-Fi</string> + <string name="adbpair_title_retry">ลองกรอกรหัสอีกครั้ง</string> + <string name="adbpair_enter_code">กรอกรหัส</string> + <string name="adbpair_title_working">กำลังตั้งค่า Steam</string> + <string name="adbpair_title_done">Steam พร้อมแล้ว</string> + <string name="adbpair_done_text">แตะเพื่อกลับไปที่ DroidDeck คุณสามารถปิด Wireless debugging ได้แล้วตอนนี้</string> + <string name="adbpair_title_failed">การตั้งค่า Wireless debugging หยุดแล้ว</string> + + <string name="selfinst_download_failed">ดาวน์โหลดไม่สำเร็จ</string> + <string name="selfinst_size_mismatch">ขนาดการดาวน์โหลดไม่ตรงกับ APK ที่เผยแพร่และถูกยกเลิก - ลองใหม่</string> + <string name="selfinst_checksum_mismatch">การดาวน์โหลดไม่ตรงกับค่าตรวจสอบและถูกยกเลิก - ลองใหม่</string> + <string name="selfinst_wrong_package">อัปเดตนี้สำหรับแพ็กเกจ Android %1$s ไม่ใช่ %2$s</string> + <string name="selfinst_metadata_signer">ข้อมูลเมตาของอัปเดตไม่ได้ระบุคีย์ลงนามรุ่นวางจำหน่ายของ DroidDeck</string> + <string name="selfinst_unreadable">Android ไม่สามารถอ่าน APK ที่ดาวน์โหลดได้</string> + <string name="selfinst_apk_wrong_package">APK ที่ดาวน์โหลดสำหรับ %1$s ไม่ใช่ %2$s</string> + <string name="selfinst_version_mismatch">APK ที่ดาวน์โหลดระบุ versionCode %1$d ไม่ใช่ %2$d ที่เผยแพร่</string> + <string name="selfinst_downgrade">Android จะไม่ติดตั้ง versionCode %1$d ทับ %2$d ที่ติดตั้งอยู่</string> + <string name="selfinst_no_signing">APK ที่ดาวน์โหลดไม่มีข้อมูลการลงนาม</string> + <string name="selfinst_wrong_signer">APK ที่ดาวน์โหลดไม่ได้ลงนามด้วยคีย์รุ่นวางจำหน่ายของ DroidDeck</string> + <string name="appupd_http">แคตตาล็อกอัปเดตตอบกลับด้วย HTTP %1$d</string> + + <string name="loadstate_starting">กำลังเริ่มเซสชัน…</string> + <string name="loadstate_elapsed">ผ่านไป %1$d:%2$02d · ยังทำงานอยู่</string> + <string name="loadstate_steam_update">กำลังดาวน์โหลดอัปเดตไคลเอนต์ Steam · %1$d%%</string> + <string name="loadstate_steam_client">กำลังดาวน์โหลดไคลเอนต์ Steam · %1$s</string> + + <string name="pextra_busy">มีการติดตั้งเครื่องมือความเข้ากันได้อื่นกำลังทำงานอยู่แล้ว</string> + <string name="pextra_stop_session">หยุดเซสชันที่กำลังทำงานก่อนติดตั้งเครื่องมือความเข้ากันได้</string> + <string name="pextra_no_release">ไม่พบรุ่นที่เผยแพร่แบบ ARM64 สำหรับ %1$s</string> + <string name="pextra_no_space">ต้องมีพื้นที่ว่างอย่างน้อย 4 GB รวมกับขนาดดาวน์โหลดเพื่อติดตั้ง %1$s</string> + <string name="pextra_downloading">กำลังดาวน์โหลด %1$s %2$s</string> + <string name="pextra_retrying">กำลังลองดาวน์โหลดใหม่ · ครั้งที่ %1$d จาก %2$d</string> + <string name="pextra_interrupted">การดาวน์โหลดถูกขัดจังหวะ</string> + <string name="pextra_download_failed">ดาวน์โหลดล้มเหลว ไฟล์ที่ดาวน์โหลดไม่ครบถูกเก็บไว้เพื่อลองใหม่ต่อได้</string> + <string name="pextra_too_big">การดาวน์โหลดมีขนาดเกินรุ่นที่เผยแพร่และถูกลบ</string> + <string name="pextra_incomplete">การดาวน์โหลดไม่สมบูรณ์ ไฟล์ที่ดาวน์โหลดไม่ครบถูกเก็บไว้เพื่อลองใหม่ต่อได้</string> + <string name="pextra_verifying">กำลังตรวจสอบการดาวน์โหลด</string> + <string name="pextra_checksum_unreadable">ไม่สามารถอ่านค่าตรวจสอบของรุ่นที่เผยแพร่ได้ ลองใหม่</string> + <string name="pextra_no_checksum">%1$s %2$s ไม่ได้เผยแพร่ค่าตรวจสอบ จึงไม่มีการติดตั้งใด ๆ</string> + <string name="pextra_checksum_mismatch">ค่าตรวจสอบไม่ตรงกัน การดาวน์โหลดถูกลบแล้ว</string> + <string name="pextra_session_started">มีเซสชันเริ่มขึ้นระหว่างการดาวน์โหลด หยุดเซสชันก่อนติดตั้งเครื่องมือความเข้ากันได้</string> + <string name="pextra_installing">กำลังติดตั้ง %1$s</string> + <string name="pextra_install_failed">การติดตั้ง %1$s ล้มเหลว (ออกด้วยสถานะ %2$d)</string> + <string name="pextra_could_not_install">ไม่สามารถติดตั้ง %1$s ได้</string> + <string name="esync_fetching">กำลังดึงแพ็ก droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">พร้อมตัวช่วย Linux</string> + <string name="cmgr_fex_dlls_only">DLL เท่านั้น</string> + <string name="cmgr_original_proton_updated">ต้นฉบับ (Proton ถูกอัปเดตตั้งแต่การสลับครั้งล่าสุด)</string> + <string name="cmgr_changed_outside">ถูกเปลี่ยนแปลงนอก Components</string> + <string name="cmgr_not_present">ไม่มีอยู่</string> + <string name="cmgr_original_version">ต้นฉบับ %1$s</string> + <string name="cmgr_original_from">ต้นฉบับจาก %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s จะถูกใส่เข้าไปใน %3$s เมื่อเกมที่กำลังทำงานบนนั้นปิดลง</string> + <string name="cmgr_swap_done">%1$s %2$s อยู่ใน %3$s แล้วตอนนี้ จะมีผลในครั้งถัดไปที่เกมเริ่มทำงาน</string> + <string name="cmgr_original_missing">ไม่มีการบันทึกชุดต้นฉบับนั้นไว้</string> + <string name="cmgr_restore_queued">%1$s ของ %2$s จะกลับไปเป็นต้นฉบับเมื่อเกมที่กำลังทำงานบนนั้นปิดลง</string> + <string name="cmgr_restore_done">คืนค่า %1$s ของ %2$s จากต้นฉบับ %3$s แล้ว</string> + <string name="cmgr_package_in_use">%1$s กำลังใช้งานอยู่ใน %2$s สลับ Proton นั้นไปเป็นอย่างอื่นก่อน</string> + <string name="cmgr_package_not_stored">ไม่มีการบันทึก %1$s ไว้</string> + <string name="cmgr_deleted">ลบ %1$s แล้ว</string> + <string name="cmgr_original_kept">ต้นฉบับของบิลด์ที่ติดตั้งไว้ถูกเก็บไว้: นี่คือทางกลับ</string> + <string name="cmgr_not_stored">ไม่ได้บันทึกไว้</string> + <string name="cmgr_deleted_original">ลบต้นฉบับ %1$s ของ %2$s แล้ว</string> + <string name="cmgr_nightlies_only">การดาวน์โหลดมาจากรุ่นที่เผยแพร่ใน Nightlies เท่านั้น</string> + <string name="cmgr_list_predates_checksums">รายการแพ็กเกจนี้เก่ากว่าระบบค่าตรวจสอบ - รีเฟรชแล้วลองใหม่</string> + <string name="cmgr_checksum_mismatch">ค่าตรวจสอบไม่ตรงกัน</string> + + <string name="sprefs_upscaler_linear">Linear</string> + <string name="sprefs_upscaler_nearest">Nearest</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (คุณภาพ)</string> + <string name="sprefs_upscaler_sharpen">เพิ่มความคมชัดเท่านั้น</string> + <string name="sprefs_lod_bias_auto">อัตโนมัติ (ตามอัตราขยาย)</string> + + <string name="look_off_desc">ไม่ใช้เอฟเฟกต์ใด ๆ</string> + <string name="look_game_clarity">ความชัดของเกม</string> + <string name="look_game_clarity_desc">เพิ่มความคมชัดพร้อมคอนทราสต์เล็กน้อย - ใช้งานทั่วไป</string> + <string name="look_vivid">สดใส</string> + <string name="look_vivid_desc">เน้นสีจัดจ้าน เปิดลดลายแถบสีเพื่อไม่ให้ท้องฟ้าเป็นลาย</string> + <string name="look_cinematic">ภาพยนตร์</string> + <string name="look_cinematic_desc">คอนทราสต์เข้มขึ้น สีเย็นลง ขอบภาพเรียบขึ้น</string> + <string name="look_competitive">แข่งขัน</string> + <string name="look_competitive_desc">ยกเงาให้สว่างขึ้นและเพิ่มความคมชัดมาก - มองเห็นคนก่อนใคร</string> + <string name="look_adaptive_sharpen">เพิ่มความคมชัดแบบปรับอัตโนมัติ</string> + <string name="look_adaptive_sharpen_desc">เพิ่มความคมชัดเท่านั้น ไม่แตะสี</string> + <string name="look_filmic">ฟิล์ม</string> + <string name="look_filmic_desc">โทนภาพแบบฟิล์ม นวลลงเล็กน้อย</string> + <string name="look_arcade">อาร์เคด</string> + <string name="look_arcade_desc">จัดจ้านและมีพลัง</string> + <string name="look_retro_crt">CRT เรโทร</string> + <string name="look_retro_crt_desc">หลอด CRT และสัญญาณอนาล็อกมาด้วยกัน</string> + <string name="look_upscale_sharp">ขยายภาพแบบคม</string> + <string name="look_upscale_sharp_desc">สำหรับการรันที่ต่ำกว่าความละเอียดจอ</string> + <string name="look_pixel_clean">พิกเซลคมชัด</string> + <string name="look_pixel_clean_desc">พิกเซลคมชัดสำหรับเกม 2D และเกมรุ่นเก่า</string> + <string name="look_anime_edge">ขอบแอนิเมะ</string> + <string name="look_anime_edge_desc">เส้นขอบแบบการ์ตูนพร้อมเพิ่มความคมชัด</string> + + <string name="gpuinfo_not_adreno">ไม่ใช่ GPU Adreno</string> + <string name="gpuinfo_supported">รองรับ</string> + <string name="gpuinfo_experimental">ทดลอง: ไดรเวอร์เป็นบิลด์ทดสอบ</string> + <string name="gpuinfo_below_tested">ต่ำกว่าฮาร์ดแวร์ที่ทดสอบแล้ว (Adreno 725 และรุ่นใหม่กว่า): อาจรันไม่ได้</string> + <string name="gpuinfo_unsupported">ไม่รองรับ: DroidDeck ต้องใช้ GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">ติดขีดจำกัดอัตราของ GitHub - ลองใหม่ในหลัง</string> + <string name="turnip_github_http">GitHub ตอบกลับด้วย HTTP %1$d</string> + <string name="turnip_download_failed">ดาวน์โหลดไม่สำเร็จ</string> + <string name="turnip_list_predates_checksums">รายการไดรเวอร์นี้เก่ากว่าระบบค่าตรวจสอบ - รีเฟรชแล้วลองใหม่</string> + <string name="turnip_checksum_mismatch">ค่าตรวจสอบไม่ตรงกัน - การดาวน์โหลดถูกยกเลิก</string> + <string name="turnip_not_adrenotools">ไม่ใช่ไดรเวอร์ AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">ไม่มี meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json อ่านไม่ได้ (%1$s)</string> + <string name="turnip_reject_linux_driver">นี่เป็นไดรเวอร์รันไทม์ Linux (นำเข้าภายใต้ “ไดรเวอร์รันไทม์ Linux” แทน)</string> + <string name="turnip_reject_wayland">นี่เป็นไดรเวอร์เกม Wayland ซึ่งแอปนี้ไม่ได้ใช้</string> + <string name="turnip_reject_no_library_name">meta.json ไม่ได้ระบุ libraryName จึงไม่มีอะไรส่งให้ AdrenoTools ได้</string> + <string name="turnip_reject_library_missing">meta.json ระบุ %1$s ซึ่งไม่มีอยู่ในไฟล์ zip</string> + <string name="turnip_reject_not_aarch64">%1$s ไม่ใช่ไลบรารีที่ใช้ร่วมแบบ ELF AArch64 64 บิต</string> + <string name="turnip_reject_glibc">%1$s เชื่อมโยงกับ glibc - เป็น Turnip แบบ “-Linux” ซึ่งควรอยู่ภายใต้ “ไดรเวอร์รันไทม์ Linux”</string> + <string name="lvd_no_library">ไม่มี libvulkan_freedreno*.so ในไฟล์ zip นี้ ไฟล์ zip แบบ Android (AdrenoTools) หรือ -Wayland Turnip ไม่ใช่ไดรเวอร์รันไทม์ Linux</string> + <string name="lvd_not_aarch64">%1$s ไม่ใช่ไลบรารีที่ใช้ร่วมแบบ ELF AArch64 64 บิต</string> + <string name="lvd_not_glibc">%1$s ไม่ใช่ไดรเวอร์ glibc - ไฟล์นี้เชื่อมโยงกับ libc ของ Android รันไทม์ Linux ต้องใช้ไฟล์ zip แบบ “-Linux” ส่วน Turnip แบบปกติหรือ “-Wayland” ไคลเอนต์ Steam ไม่สามารถโหลดได้เลย</string> + <string name="bundle_no_manifest">ไม่ใช่แพ็กไดรเวอร์: ไม่มี manifest.json ที่ระบุไดรเวอร์ android และ linux</string> + <string name="bundle_entry_outside">ไม่ใช่แพ็กไดรเวอร์: %1$s ชี้ไปนอกแพ็ก</string> + <string name="bundle_too_large">ไม่ใช่แพ็กไดรเวอร์: แตกไฟล์แล้วมีขนาดเกิน %1$d MB</string> + + <string name="gstore_sd_card">การ์ด SD</string> + <string name="gstore_folder">โฟลเดอร์</string> + + <string name="logshare_chooser">แชร์ล็อกเซสชัน</string> + + <string name="hdr_needs_android_10">ต้องใช้ Android 10 หรือใหม่กว่า (เลเยอร์แสดงผลที่มีพื้นที่สี)</string> + <string name="hdr_none">หน้าจอนี้ไม่รองรับ HDR</string> + <string name="hdr_not_hdr10">หน้าจอนี้รองรับ %1$s ไม่ใช่ HDR10</string> + + <string name="gpu_this_gpu">GPU นี้</string> + <string name="phantom_title_on">ขีดจำกัดโพรเซสลูกเปิดอยู่</string> + <string name="phantom_title_unset">ยังไม่ตั้งค่าขีดจำกัดโพรเซสลูก</string> + <string name="phantom_title_unreadable">ไม่สามารถตรวจสอบขีดจำกัดโพรเซสลูกได้</string> + <string name="phantom_title_off">ขีดจำกัดโพรเซสลูกปิดอยู่</string> + <string name="phantom_title_not_required">ไม่จำเป็นต้องใช้ขีดจำกัดโพรเซสลูก</string> + <string name="phantom_instructions_fix">%1$s หากทำไม่ได้ ให้เชื่อมต่ออุปกรณ์นี้กับคอมพิวเตอร์ที่มี ADB แล้วรันคำสั่งด้านล่าง กลับมาที่นี่แล้วตรวจสอบอีกครั้ง</string> + <string name="phantom_instructions_off">เซสชัน Steam สามารถเริ่มได้</string> + <string name="phantom_instructions_not_applicable">Android รุ่นนี้ไม่ใช้ขีดจำกัดนี้</string> + <string name="phantom_fix_toggle">เปิด “ปิดการจำกัดการประมวลผลข้อมูลย่อย” ในตัวเลือกสำหรับนักพัฒนา และเปิดตัวเลือกสำหรับนักพัฒนาไว้ต่อไปหลังจากนั้น</string> + <string name="phantom_fix_no_toggle">Android รุ่นนี้ไม่มีสวิตช์สำหรับสิ่งนี้ ใช้ Wireless debugging เพื่อเปลี่ยนค่าจากอุปกรณ์นี้</string> + <string name="upd_block_no_apk">บิลด์นี้ไม่มีให้ดาวน์โหลดสำหรับสำเนานี้ของ DroidDeck</string> + <string name="upd_block_version_code">Android จะไม่ติดตั้งทับบิลด์นี้ เพราะ versionCode %1$d ต่ำกว่า %2$d ที่ติดตั้งอยู่</string> + <string name="upd_fail_downgrade">Android จะไม่ติดตั้งรุ่นเก่าทับรุ่นใหม่ ใช้บิลด์นี้ต่อไปจนกว่าช่องทางนี้จะตามทัน</string> + <string name="upd_fail_signature">สำเนานี้ของ DroidDeck ลงนามต่างกัน (อาจเป็นบิลด์ที่สร้างเอง) จึง Android จะไม่อัปเดตทับให้</string> + <string name="upd_fail_storage">มีพื้นที่ว่างไม่พอสำหรับการอัปเดต</string> + <string name="upd_fail_aborted">การอัปเดตถูกยกเลิก</string> + <string name="upd_fail_with_message">อัปเดตไม่สามารถติดตั้งได้: %1$s</string> + <string name="upd_fail_generic">อัปเดตไม่สามารถติดตั้งได้</string> + <string name="saves_layout_zip">zip ของ %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s ยังไม่ถูกเปิด</string> + <string name="saves_none_found">ไม่พบไฟล์เซฟสำหรับ %1$s</string> + <string name="saves_not_save_zip">%1$s ไม่มีโฟลเดอร์ drive_c จึงไม่ใช่ไฟล์ zip เซฟของ GameHub หรือ Winlator</string> + <string name="gstore_cannot_create">ไม่สามารถสร้างโฟลเดอร์ใน %1$s ได้</string> + <string name="gstore_cannot_write">ไม่สามารถเขียนใน %1$s ได้</string> + <string name="gstore_cannot_write_detail">ไม่สามารถเขียนใน %1$s ได้ (%2$s)</string> + <string name="gfiles_folder_unavailable">โฟลเดอร์ไม่พร้อมใช้งาน</string> + <string name="gfiles_name_taken">มีไฟล์อื่นใช้ชื่อ %1$s อยู่แล้ว</string> + <string name="gfiles_art_unavailable">โฟลเดอร์ภาพปกไม่พร้อมใช้งาน</string> + <string name="gfiles_unrelated_inventory">โฟลเดอร์มีรายการซิงค์ที่ไม่เกี่ยวข้อง</string> + <string name="gfiles_remove_failed">ไม่สามารถลบ %1$s ได้</string> + <string name="gfiles_outside_folder">ไฟล์ออกไปนอกโฟลเดอร์ส่งออก</string> + <string name="cmgr_fex_unnamed">FEX (บิลด์ที่ไม่มีชื่อรุ่น)</string> + <string name="cmgr_no_profile">ไม่มี profile.json ใน %1$s</string> + <string name="cmgr_not_component_package">%1$s ไม่ใช่แพ็กเกจคอมโพเนนต์ Linux (ประเภท %2$s)</string> + <string name="gstore_volume_free">%1$s · เหลือ %2$s</string> + <string name="mode_storage_auto_short">อัตโนมัติ</string> + <string name="appupd_catalog_rejected">แคตตาล็อกอัปเดตไม่ผ่านการตรวจสอบ (%1$s)</string> + <string name="main_adb_clip_label">การตั้งค่าโพรเซสลูกของ DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">ลงชื่อเข้าใช้แล้ว · โหมดออฟไลน์</string> + <string name="setup_signed_in_unnamed">ลงชื่อเข้าใช้แล้ว</string> + <string name="driver_tag_bundled">มีในตัว</string> + <string name="driver_tag_downloaded">ดาวน์โหลดแล้ว</string> + <string name="driver_tag_imported">นำเข้าแล้ว</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s %2$s\n\n%3$s</string> + <string name="display_session">การแสดงผลของเซสชัน</string> + <string name="display_resolution">ความละเอียด</string> + <string name="display_game_fit">การแสดงเกม 16:9 ให้พอดี</string> + <string name="display_game_fit_hint">วิธีที่เกม 16:9 แสดงพอดีกับหน้าจอนี้ มีผลในเซสชันถัดไป</string> + <string name="display_game_fit_unavailable">เลือกพอดีหน้าจอ หรือขนาดกำหนดเองที่แคบกว่า 16:9</string> + <string name="display_preserve">คงสัดส่วนไว้</string> + <string name="display_stretch">ยืดให้พอดีหน้าจอ</string> + <string name="display_image_scaling">การปรับขนาดภาพ</string> + <string name="display_filter">ตัวกรองการปรับขนาด</string> + <string name="display_filter_hint">ใช้ร่วมกันระหว่าง Steam และเดสก์ท็อป</string> + <string name="display_filter_live">มีผลทันที ใช้ร่วมกันระหว่าง Steam และเดสก์ท็อป</string> + <string name="display_filter_note">FSR, GSR และ NIS จะมีผลเมื่อขยายภาพของเซสชัน เพิ่มความคมชัดเท่านั้นทำงานได้โดยไม่ต้องขยายภาพด้วย</string> + <string name="display_sharpness">ความคมชัดของตัวกรอง</string> + <string name="display_frame_rate">อัตราเฟรม</string> + <string name="display_look_filter">%1$s ตั้งการปรับขนาดเป็น %2$s</string> + <string name="display_match_screen">พอดีหน้าจอ (%1$d×%2$d)</string> + <string name="display_follow_screen">ตามหน้าจอ (ปรับขนาดเมื่อพับหรือกาง)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">แสดงรายละเอียดอุปกรณ์</string> + <string name="device_info_hide">ซ่อนรายละเอียดอุปกรณ์</string> + <string name="device_info_loading">กำลังอ่านข้อมูลอุปกรณ์…</string> + <string name="device_info_copy">คัดลอก</string> + <string name="device_info_copy_hint">คัดลอกรายละเอียดเหล่านี้ลงในรายงานข้อบกพร่อง</string> + <string name="device_info_copied">คัดลอกแล้ว</string> + <string name="force_ssbs_title">บังคับ SSBS</string> + <string name="force_ssbs_hint">คงการตั้งค่าความเร็ว CPU ที่ Wine มักปิดอยู่เสมอ อาจทำให้เกม Windows เร็วขึ้นบน Snapdragon 8 Elite แต่เห็นความเปลี่ยนแปลงน้อยบนชิปรุ่นเก่า มีผลในการเปิดเกมครั้งถัดไป</string> + + <string name="rail_stores">สโตร์</string> + <string name="source_steam">Steam</string> + <string name="source_added">กำหนดเอง</string> + <string name="setup_stores">สโตร์</string> + <string name="setup_stores_open_on">เปิดสโตร์บน</string> + <string name="setup_stores_speed">ระดับความเร็วการดาวน์โหลด</string> + <string name="setup_stores_engine">เอนจินสโตร์</string> + <string name="setup_stores_engine_chip_ready">● เอนจินพร้อมใช้งาน</string> + <string name="setup_stores_engine_chip_missing">ยังไม่สร้าง</string> + <string name="stores_tier_balanced">สมดุล</string> + <string name="stores_tier_fast">เร็ว</string> + <string name="stores_tier_max">สูงสุด</string> + <string name="stores_title">สโตร์</string> + <string name="stores_settings">การตั้งค่าสโตร์</string> + <string name="stores_settings_eyebrow">การตั้งค่า</string> + <string name="stores_chip_signed_out">(ยังไม่ลงชื่อเข้าใช้)</string> + <string name="stores_tab_store">สโตร์</string> + <string name="stores_tab_installed">ติดตั้งแล้ว</string> + <string name="stores_tab_library">ไลบรารี</string> + <string name="stores_tab_all">ทั้งหมด</string> + <string name="stores_tab_downloads">การดาวน์โหลด</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">ลงชื่อเข้าใช้</string> + <string name="stores_signout_named">%1$s · ลงชื่อออก</string> + <string name="stores_signout_title">ลงชื่อออกจาก %1$s?</string> + <string name="stores_signout_note">เกมที่ติดตั้งไว้จะยังคงอยู่ ไลบรารีจะถูกดึงมาใหม่เมื่อคุณลงชื่อเข้าใช้อีกครั้ง</string> + <string name="stores_signout_stay">ลงชื่อเข้าใช้ต่อไป</string> + <string name="stores_signout_go">ลงชื่อออก</string> + <string name="stores_search_catalog">ค้นหาแคตตาล็อกของ %1$s…</string> + <string name="stores_search_installed">ค้นหาเกมที่ติดตั้งไว้…</string> + <string name="stores_search_library">ค้นหาไลบรารีของคุณ…</string> + <string name="stores_search_open">ค้นหา</string> + <string name="stores_installed_empty">ไม่มีสิ่งที่ติดตั้งไว้</string> + <string name="stores_library_loading">กำลังโหลด</string> + <string name="stores_nothing_matches">ไม่มีเกม</string> + <string name="stores_shelves_loading">กำลังโหลดสโตร์…</string> + <string name="stores_amazon_no_catalog">ไม่มีแคตตาล็อก</string> + <string name="stores_shelf_new">มีอะไรใหม่</string> + <string name="stores_shelf_deals">ดีล</string> + <string name="stores_shelf_free">เกมฟรี</string> + <string name="stores_shelf_trending">กำลังเป็นที่นิยม</string> + <string name="stores_shelf_library">ไลบรารีของคุณ</string> + <string name="stores_play">เล่น</string> + <string name="stores_install">ติดตั้ง</string> + <string name="stores_resume_install">ดำเนินการติดตั้งต่อ</string> + <string name="stores_dl_interrupted">ถูกขัดจังหวะ</string> + <string name="stores_install_size">ติดตั้ง · %1$s</string> + <string name="stores_get_free">รับไปเลยฟรี</string> + <string name="stores_view_on">ดูบน %1$s</string> + <string name="stores_buy_price">ซื้อ · %1$s</string> + <string name="stores_installed_chip">ติดตั้งแล้ว</string> + <string name="stores_in_library">อยู่ในไลบรารี</string> + <string name="stores_free">ฟรี</string> + <string name="stores_resume">ดำเนินการต่อ</string> + <string name="stores_refresh">รีเฟรช</string> + <string name="stores_sort">จัดเรียง</string> + <string name="stores_sort_last_played">เล่นล่าสุด</string> + <string name="stores_sort_recently_installed">เพิ่งติดตั้ง</string> + <string name="stores_sort_title_asc">ชื่อ A–Z</string> + <string name="stores_sort_title_desc">ชื่อ Z–A</string> + <string name="stores_sort_size_desc">ขนาด: ใหญ่สุด</string> + <string name="stores_sort_size_asc">ขนาด: เล็กสุด</string> + <string name="stores_sort_release_date">วันวางจำหน่าย</string> + <string name="stores_view_list">มุมมองรายการ</string> + <string name="stores_view_cards">มุมมองการ์ด</string> + <string name="stores_show_mature">แสดงเนื้อหาสำหรับผู้ใหญ่</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">ออฟไลน์</string> + <string name="epic_card_none">ปิด</string> + <string name="epic_eos">ลงชื่อเข้าใช้ Epic (EOS)</string> + <string name="epic_offline">เปิดแบบออฟไลน์</string> + <string name="epic_resolve">แก้ไขการลงชื่อเข้าใช้ Epic</string> + <string name="epic_client_version">เวอร์ชัน %1$s</string> + <string name="epic_client_no_runtime">ติดตั้งรันไทม์ Linux ก่อน</string> + <string name="epic_client_checking">กำลังตรวจสอบเวอร์ชันล่าสุด…</string> + <string name="epic_client_unpacking">กำลังแตกไฟล์…</string> + <string name="epic_client_unreachable">เซิร์ฟเวอร์ดาวน์โหลดไม่ตอบสนอง</string> + <string name="epic_client_needs_fex">Epic Games Launcher ต้องใช้ FEX ซึ่ง Steam จะดาวน์โหลดให้ เปิด launcher อีกครั้งหลังจาก Steam เริ่มทำงานแล้ว</string> + <string name="epic_client_download_failed">ดาวน์โหลดล้มเหลว: %1$s</string> + <string name="epic_client_unpack_failed">แตกไฟล์ตัวเรียกใช้งานไม่ได้: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher ไม่ยอมรับการลงชื่อเข้าใช้ เริ่มใหม่อีกครั้งจากตัวเรียกใช้งาน</string> + <string name="epic_client_uninstall_body">ลบตัวเปิดเกมและคืนพื้นที่ เกม Epic ของคุณยังติดตั้งอยู่และเล่นได้ และการลงชื่อเข้าใช้จะถูกเก็บไว้สำหรับการติดตั้งครั้งถัดไป</string> + <string name="epic_client_uninstall_stops">เซสชันที่กำลังทำงานจะถูกปิดก่อน</string> + <string name="epic_client_uninstalled">ถอนการติดตั้ง Epic Games Launcher แล้ว</string> + <string name="epic_client_uninstall_failed">ไม่สามารถลบไฟล์ของตัวเปิดเกมบางไฟล์ได้ ลองอีกครั้ง</string> + <string name="epic_client_uninstalling">รอให้ถอนการติดตั้ง Epic Games Launcher เสร็จก่อน</string> + <string name="store_cloud_saves">เซฟบนคลาวด์</string> + <string name="cloud_upload">อัปโหลดขึ้นคลาวด์</string> + <string name="cloud_download">ดาวน์โหลดจากคลาวด์</string> + <string name="cloud_none">ไม่มีเซฟบนคลาวด์</string> + <string name="cloud_conflict">ข้อขัดแย้งบนคลาวด์</string> + <string name="cloud_conflict_files">ข้อขัดแย้งบนคลาวด์ · %1$d ไฟล์</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">เก็บของคลาวด์</string> + <string name="cloud_keep_local">เก็บของเครื่อง</string> + <string name="cloud_checking">กำลังตรวจสอบคลาวด์…</string> + <string name="cloud_last_sync">ซิงค์ล่าสุด %1$s</string> + <string name="cloud_never">ยังไม่ได้ซิงค์</string> + <string name="cloud_done">%1$d ไฟล์</string> + <string name="stores_eyebrow_installed">ติดตั้งแล้ว</string> + <string name="stores_eyebrow_library">อยู่ในไลบรารีของคุณ</string> + <string name="stores_eyebrow_store">สโตร์</string> + <string name="achievements_title">ความสำเร็จ</string> + <string name="achievements_count">ปลดล็อกแล้ว %1$d จาก %2$d</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">ปลดล็อกแล้ว · %1$d</string> + <string name="achievements_group_locked">ล็อกอยู่ · %1$d</string> + <string name="achievements_group_hidden">ซ่อนอยู่ · %1$d</string> + <string name="achievements_hidden">ความสำเร็จที่ซ่อนอยู่</string> + <string name="achievements_hidden_detail">รายละเอียดจะแสดงเมื่อปลดล็อกแล้ว</string> + <string name="achievements_all">ปลดล็อกความสำเร็จครบทุกรายการ</string> + <string name="achievements_reading">กำลังโหลด…</string> + <string name="achievements_signed_out">ลงชื่อเข้าใช้ %1$s เพื่อดูความสำเร็จของคุณ</string> + <string name="achievements_unreachable">ไม่สามารถเชื่อมต่อ %1$s ได้ ลองตรวจสอบอีกครั้งเมื่อออนไลน์</string> + <string name="achievements_none">%1$s ไม่มีรายการความสำเร็จสำหรับเกมนี้</string> + <string name="achievements_show_all">แสดงทั้งหมด %1$d รายการ</string> + <string name="achievements_dialog_title">ความสำเร็จ · %1$s</string> + <string name="stores_in_steam">✓ อยู่ใน Steam</string> + <string name="stores_uninstall">ถอนการติดตั้ง</string> + <string name="stores_uninstalling">กำลังถอนการติดตั้ง…</string> + <string name="stores_uninstall_title">ถอนการติดตั้ง %1$s?</string> + <string name="stores_uninstall_body_size">คืนพื้นที่ %1$s และลบออกจาก Steam</string> + <string name="stores_uninstall_body">ลบไฟล์และช็อตคัตใน Steam ของเกมนี้</string> + <string name="stores_launch_not_registered">Steam จะรับเกมนี้เข้ามาเมื่อเริ่มครั้งถัดไป เปิดจากที่นั่น หรือเริ่ม Steam ตอนนี้</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">การเลือกของ Steam ต่อเกม</string> + <string name="stores_card_audio">เสียง</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Components</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">เอนจิน</string> + <string name="stores_card_engine_value">%1$s · เนทีฟ</string> + <string name="stores_card_engine_java">%1$s · มีในตัว</string> + <string name="stores_how_it_runs">วิธีที่ทำงาน</string> + <string name="stores_kv_fetched">ดึงมาจาก</string> + <string name="stores_kv_fetched_value">%1$s ด้วยบัญชีของคุณ</string> + <string name="stores_kv_installed_to">ติดตั้งไปที่</string> + <string name="stores_kv_installed_to_value">พื้นที่จัดเก็บเกม (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">เปิดโดย</string> + <string name="stores_kv_launched_by_value">Steam และ Proton เส้นทางเดียวกับเกม Steam</string> + <string name="stores_kv_launched_by_epic">Steam และ Proton · ลงชื่อเข้าใช้ Epic ทุกครั้งที่เปิด ปิดโอเวอร์เลย์ EOS</string> + <string name="stores_kv_launched_by_amazon">Steam และ Proton · ตั้งค่าตัวแปรของ Amazon Games Services แล้ว</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">เพิ่มเข้า Steam เมื่อติดตั้ง (Deck UI + Steam Input)</string> + <string name="stores_downloads_empty">ไม่มีการดาวน์โหลด</string> + <string name="stores_dl_paused">หยุดชั่วคราว</string> + <string name="stores_dl_queued">อยู่ในคิว</string> + <string name="stores_dl_queued_at">อยู่ในคิว · #%1$d</string> + <string name="stores_dl_cancelled">ยกเลิกแล้ว</string> + <string name="stores_dl_failed">ล้มเหลว</string> + <string name="stores_dl_failed_reason">ล้มเหลว · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">หยุดชั่วคราว</string> + <string name="stores_dl_resume">ดำเนินการต่อ</string> + <string name="stores_dl_cancel">ยกเลิก</string> + <string name="stores_dl_retry">ลองใหม่</string> + <string name="stores_dl_clear">ล้าง</string> + <string name="stores_dl_clear_all">ล้างรายการที่เสร็จแล้ว</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">ดาวน์โหลด</string> + <string name="stores_stage_verify">ตรวจสอบ</string> + <string name="stores_stage_install">ติดตั้ง</string> + <string name="stores_stage_done">เสร็จสิ้น</string> + <string name="stores_stage_checking">กำลังตรวจสอบ</string> + <string name="stores_stage_downloading">กำลังดาวน์โหลด</string> + <string name="stores_dl_cancel_confirm">ลบการดาวน์โหลด?</string> + <string name="stores_dl_failed_kept">ล้มเหลว · เก็บ %1$s ไว้</string> + <string name="stores_stage_verifying">กำลังตรวจสอบ</string> + <string name="stores_stage_installing">กำลังติดตั้ง</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d ไฟล์</string> + <string name="stores_download_manager">ตัวจัดการดาวน์โหลด</string> + <string name="stores_parallel">การดาวน์โหลดพร้อมกัน</string> + <string name="stores_install_where">ติดตั้งไปที่</string> + <string name="stores_install_title">ติดตั้ง %1$s:</string> + <string name="stores_target_internal">ภายใน</string> + <string name="stores_target_free">เหลือ %1$s</string> + <string name="stores_target_free_unknown">ไม่ทราบพื้นที่ว่าง</string> + <string name="stores_storage_insufficient">พื้นที่ว่างไม่พอ: ต้องใช้ %1$s แต่เหลือเพียง %2$s</string> + <string name="stores_storage_low">พื้นที่ใกล้เต็ม (เหลือ %1$s ต้องใช้ %2$s)</string> + <string name="stores_notification_channel">การดาวน์โหลดสโตร์</string> + <string name="stores_notification_channel_hint">แสดงความคืบหน้าการดาวน์โหลดเกมและให้การดาวน์โหลดทำงานต่อในพื้นหลัง</string> + <string name="stores_notification_one">กำลังดาวน์โหลด</string> + <string name="stores_notification_many">กำลังดาวน์โหลด %1$d รายการ</string> + <string name="stores_notification_waiting">กำลังเตรียม…</string> + <string name="stores_notification_done_channel">การดาวน์โหลดสโตร์เสร็จสิ้น</string> + <string name="stores_notification_installed">ติดตั้ง %1$s แล้ว</string> + <string name="stores_notification_failed">ดาวน์โหลด %1$s ล้มเหลว</string> + <string name="stores_notification_delete">ลบ</string> + <string name="stores_notification_keep">เก็บไว้</string> + <string name="stores_login_title">ลงชื่อเข้าใช้ %1$s</string> + <string name="stores_login_provider_title">ลงชื่อเข้าใช้ด้วยผู้ให้บริการของคุณ</string> + <string name="stores_login_reload">โหลดใหม่</string> + <string name="stores_login_close">ปิด</string> + <string name="stores_login_retry">ลองใหม่</string> + <string name="stores_login_finishing">กำลังเสร็จสิ้นการลงชื่อเข้าใช้…</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> + <string name="stores_login_error_ssl">การเชื่อมต่อไปยังหน้าลงชื่อเข้าใช้ไม่ปลอดภัย</string> + <string name="stores_login_error_verification">ไม่สามารถยืนยันการลงชื่อเข้าใช้ได้ ลองใหม่</string> + <string name="stores_login_error_generic">ลงชื่อเข้าใช้ล้มเหลว ลองใหม่</string> + <string name="common_close">ปิด</string> + <string name="common_back">กลับ</string> + <string name="common_edit">แก้ไข</string> + <string name="games_add_all">เพิ่มเกมทั้งหมดในโฟลเดอร์นี้</string> + <string name="games_added_none">ไม่มีอะไรใหม่ในโฟลเดอร์นี้</string> + <string name="edit_name">ชื่อ</string> + <string name="edit_target">เป้าหมาย</string> + <string name="edit_start_in">เริ่มที่</string> + <string name="edit_launch_options">ตัวเลือกการเปิด</string> + <string name="edit_artwork">ภาพปก</string> + <string name="edit_other_exe">exe อื่น…</string> + <string name="edit_remove">ลบ</string> + <string name="art_cover">ภาพปก</string> + <string name="art_wide_cover">ภาพปกกว้าง</string> + <string name="art_adjust_logo">ปรับโลโก้</string> + <string name="logo_pos_default">ค่าเริ่มต้น</string> + <string name="logo_pos_upper_left">บนซ้าย</string> + <string name="logo_pos_upper_center">บนกลาง</string> + <string name="logo_pos_center">กลาง</string> + <string name="logo_pos_bottom_left">ล่างซ้าย</string> + <string name="logo_pos_bottom_center">ล่างกลาง</string> + <string name="logo_pos_position">ตำแหน่ง</string> + <string name="logo_pos_size">ขนาด</string> + <string name="logo_pos_save">บันทึก</string> + <string name="logo_pos_reset">กลับเป็นค่าเริ่มต้น</string> + <string name="logo_pos_hint">วาดทับพื้นหลังของเกมเหมือนที่ Steam ทำ ตำแหน่งจริงอาจต่างไปสองสามพิกเซล</string> + <string name="logo_pos_no_logo">เกมนี้ยังไม่มีโลโก้ เลือกในโลโก้เพื่อดูที่นี่</string> + <string name="logo_pos_failed">บันทึกตำแหน่งโลโก้ไม่ได้ ลองอีกครั้ง</string> + <string name="art_background">พื้นหลัง</string> + <string name="art_logo">โลโก้</string> + <string name="art_icon">ไอคอน</string> + <string name="art_src_folder">โฟลเดอร์เกม</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">ไฟล์ของคุณ</string> + <string name="art_src_exe">จากไฟล์ exe</string> + <string name="art_src_auto">อัตโนมัติ</string> + <string name="art_pick_image">เลือกภาพ…</string> + <string name="art_pick_title">เลือกภาพ: %1$s</string> + <string name="art_reset">กลับไปใช้อัตโนมัติ</string> + <string name="art_search_sgdb">ค้นหาบน SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">ค้นหาเกม</string> + <string name="art_sgdb_other_games">ผลลัพธ์อื่น</string> + <string name="art_sgdb_none">ไม่พบผลลัพธ์</string> + <string name="art_sgdb_no_key">SteamGridDB ต้องใช้คีย์ API เพิ่มคีย์ของคุณในการตั้งค่า › ตัวเปิดแอป</string> + <string name="art_sgdb_bad_key">SteamGridDB ไม่รับคีย์ API ตรวจสอบในการตั้งค่า › ตัวเปิดแอป</string> + <string name="art_sgdb_limit">SteamGridDB กำลังจำกัดคำขอ ลองใหม่ในอีกสักครู่</string> + <string name="art_sgdb_offline">ติดต่อ SteamGridDB ไม่ได้ ตรวจสอบการเชื่อมต่อ</string> + <string name="art_sgdb_server">เกิดปัญหาที่ SteamGridDB ลองใหม่ภายหลัง</string> + <string name="art_sgdb_no_game">SteamGridDB ไม่มีผลลัพธ์สำหรับเกมนี้ ลองค้นหาเอง</string> + <plurals name="games_added_n"> + <item quantity="other">เพิ่มเกมแล้ว %1$d เกม</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="other">มีอยู่ใน Games แล้ว %1$d เกม</item> + </plurals> + <string name="hop_back">B · กลับไปที่ %1$s</string> + <string name="hop_from_games">เกม</string> + <string name="hop_from_play">การตั้งค่า Play</string> + <string name="sheet_graphics_drivers">ไดรเวอร์กราฟิก</string> + <string name="comp_this_proton">Proton นี้</string> + <string name="comp_every_proton">Proton ทุกตัว</string> + <string name="comp_for_every_proton">สำหรับ Proton ทุกตัว</string> + <string name="comp_available_count">พร้อมใช้งาน · %1$d</string> + <string name="comp_checked">ตรวจสอบล่าสุด %1$s</string> + <string name="comp_check_all">ตรวจสอบคอมโพเนนต์และไดรเวอร์ใหม่</string> + <string name="comp_get">รับ</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton และ FEX ด้านล่างเป็นของ Proton นี้</string> + <string name="comp_device_tested">%1$s · ทดสอบแล้ว</string> + <string name="comp_device_untested">%1$s · ยังไม่ทดสอบ</string> + <string name="comp_device_unsupported">%1$s · ไม่รองรับ</string> + <string name="gpu_auto_keeps">คงคู่ที่แนะนำให้เป็นรุ่นล่าสุดเสมอ</string> + <string name="gpu_bar_auto">อัตโนมัติ · %1$s</string> + <string name="gpu_separately">ไดรเวอร์รันไทม์และแสดงผลแยกกัน</string> + <string name="gpu_use_title">ใช้ %1$s?</string> + <string name="gpu_mode_title">วิธีเลือกไดรเวอร์</string> + <string name="gpu_mode_auto_detail">คู่ที่ดีที่สุดสำหรับ GPU นี้ อัปเดตเสมอ</string> + <string name="gpu_mode_pair">คู่ที่เข้าชุดกัน</string> + <string name="gpu_mode_pair_detail">เลือกคู่ ตั้งค่าไดรเวอร์ทั้งสองพร้อมกัน</string> + <string name="gpu_mode_mix">ผสมอิสระ</string> + <string name="gpu_mode_mix_detail">เลือกจอและรันไทม์แยกกัน</string> + <string name="gpu_mode_pair_short">คู่</string> + <string name="gpu_mode_mix_short">ผสม</string> + <string name="gpu_src_auto">อัตโนมัติ</string> + <string name="gpu_src_pair">คู่</string> + <string name="gpu_src_bundle">ชุด</string> + <string name="gpu_src_chosen">เลือกแล้ว</string> + <string name="gpu_src_by_gpu">ตาม GPU</string> + <string name="gpu_src_default">ค่าเริ่มต้น</string> + <string name="gpu_display_live">กำลังวาดอยู่</string> + <string name="gpu_display_pending">ต้องรีสตาร์ต · ระหว่างนี้ %1$s วาดอยู่</string> + <string name="gpu_runtime_live">ใช้งานอยู่</string> + <string name="gpu_runtime_pending">เซสชันถัดไป · เซสชันนี้ใช้ %1$s</string> + <string name="gpu_display_next">วาดหน้าจอ มีผลตั้งแต่เซสชันถัดไป</string> + <string name="gpu_previous_driver">ไดรเวอร์ก่อนหน้า</string> + <string name="gpu_restart_banner">รีสตาร์ตเพื่อเปลี่ยนไดรเวอร์จอ</string> + <string name="gpu_restart_blocked">หยุดเซสชันปัจจุบันและรีสตาร์ต DroidDeck เพื่อเปลี่ยนไดรเวอร์จอ</string> + <string name="gpu_restart_now">รีสตาร์ตเลย</string> + <string name="gpu_restart_later">ไว้ทีหลัง</string> + <string name="gpu_auto_title">อัตโนมัติเลือกคู่นี้สำหรับ %1$s ของคุณ</string> + <string name="gpu_auto_builtin_title">อัตโนมัติใช้ไดรเวอร์ที่มีมาให้สำหรับ %1$s ของคุณ</string> + <string name="gpu_auto_reason">เลือกสำหรับตระกูล %1$s เวอร์ชันใหม่จะติดตั้งเบื้องหลัง</string> + <string name="gpu_pair_title">เลือกคู่</string> + <string name="gpu_pair_hint">คู่จะตั้งค่าไดรเวอร์จอและไดรเวอร์รันไทม์พร้อมกัน</string> + <string name="gpu_mix_title">เลือกไดรเวอร์แต่ละตัว</string> + <string name="gpu_mix_hint">ชุดจะเติมทั้งสองช่อง การเปลี่ยนจอมีผลหลังรีสตาร์ต การเปลี่ยนรันไทม์มีผลตั้งแต่เซสชันถัดไป</string> + <string name="gpu_change_display">เปลี่ยนไดรเวอร์จอ</string> + <string name="gpu_change_runtime">เปลี่ยนไดรเวอร์รันไทม์</string> + <string name="gpu_autos_pick">ตัวเลือกของอัตโนมัติ</string> + <string name="gpu_installed">ติดตั้งแล้ว</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · รีสตาร์ตเพื่อใช้งาน</string> + <string name="gpu_chip_restart">%1$s · ต้องรีสตาร์ต</string> + <string name="comp_this_device">อุปกรณ์นี้</string> + <string name="proton_remove_title">ลบ %1$s?</string> + <string name="setup_tab_diagnostics">การวินิจฉัย</string> + <string name="setup_ready">พร้อมเล่นแล้ว</string> + <string name="setup_not_ready">ยังไม่พร้อมเล่น</string> + <string name="setup_ready_runtime">รันไทม์ %1$s</string> + <string name="setup_ready_limit_off">ปิดขีดจำกัดโพรเซส</string> + <string name="setup_ready_signed_in">ลงชื่อเข้าใช้เป็น %1$s</string> + <string name="setup_needs_you">เมื่อต้องการให้คุณดำเนินการ</string> + <string name="setup_group_look">รูปลักษณ์</string> + <string name="setup_group_device">อุปกรณ์นี้</string> + <string name="setup_group_art">ภาพปกไลบรารี</string> + <string name="setup_group_download">ดาวน์โหลด</string> + <string name="setup_download_source">แหล่ง</string> + <string name="setup_download_source_auto">อัตโนมัติ</string> + <string name="setup_download_source_direct">ตรง</string> + <string name="setup_download_source_mirror">มิเรอร์</string> + <string name="setup_download_source_custom">Prefix ของตัวเอง</string> + <string name="setup_download_mirror">เว็บไซต์</string> + <string name="setup_download_prefix">Prefix</string> + <string name="flathub_eyebrow">แอป LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">แอปเดสก์ท็อปสำหรับเดสก์ท็อป Linux เปิดจากเดสก์ท็อป</string> + <string name="flathub_setup">ตั้งค่า Flathub</string> + <string name="flathub_remove_title">ลบ %1$s?</string> + <string name="flathub_remove_note">การตั้งค่าและไฟล์ของมันจะยังคงอยู่</string> + <string name="flathub_keep">เก็บไว้</string> + <string name="desktop_size">ขนาดบนดิสก์</string> + <string name="desktop_uninstall_title">ถอนการติดตั้งเดสก์ท็อป?</string> + <string name="desktop_all_systems">ทั้งหมด</string> + <string name="gog_achievements">ความสำเร็จของ GOG</string> + <string name="gog_achievements_hint">ซิงค์ความสำเร็จสำหรับเกม GOG ที่รองรับ มีผลในการเปิดครั้งถัดไป</string> + <string name="gog_achievements_off">ปิดความสำเร็จ</string> + <string name="gog_achievements_on">เปิดใช้ความสำเร็จ</string> + <string name="gog_achievements_signin">ลงชื่อเข้าใช้ GOG อีกครั้ง</string> + <string name="gog_achievements_uploaded">อัปโหลดความสำเร็จแล้ว</string> + <string name="gog_achievements_pending">กำลังรออัปโหลดความสำเร็จ</string> + <string name="gog_achievements_enable_store">เปิดใช้ความสำเร็จของ GOG ในการตั้งค่า Stores</string> + <string name="gog_achievements_unavailable">ไม่พบความสำเร็จ ตรวจสอบบันทึกเซสชัน</string> + <string name="achievement_unlocked">ปลดล็อกความสำเร็จแล้ว</string> + <string name="touch_paste">วาง</string> + <string name="touch_dpad">ปุ่มกากบาท</string> + <string name="touch_left_stick">อนาล็อกซ้าย</string> + <string name="touch_right_stick">อนาล็อกขวา</string> + <string name="touch_menu">เมนู</string> + <string name="touch_keyboard">แป้นพิมพ์</string> + <string name="touch_dpad_up">ปุ่มกากบาทขึ้น</string> + <string name="touch_dpad_down">ปุ่มกากบาทลง</string> + <string name="touch_dpad_left">ปุ่มกากบาทซ้าย</string> + <string name="touch_dpad_right">ปุ่มกากบาทขวา</string> + <string name="touch_title">การควบคุมแบบสัมผัส</string> + <string name="touch_controller">คอนโทรลเลอร์สัมผัส</string> + <string name="touch_mouse">เมาส์</string> + <string name="touch_on">เปิด</string> + <string name="touch_off">ปิด</string> + <string name="touch_speed_slow">ช้า</string> + <string name="touch_speed_normal">ปกติ</string> + <string name="touch_speed_fast">เร็ว</string> + <string name="touch_edit_layout">แก้ไขเค้าโครง</string> + <string name="touch_droiddeck_menu">เมนู DroidDeck</string> + <string name="touch_drag_hint">ลากปุ่มควบคุมไปวางบนหน้าจอ</string> + <string name="touch_arrange">จัดเรียง</string> + <string name="touch_discard">ละทิ้ง</string> + <string name="touch_saving">กำลังบันทึก…</string> + <string name="touch_icon">ไอคอน</string> + <string name="touch_narrower">ก−</string> + <string name="touch_wider">ก+</string> + <string name="touch_shorter">ส−</string> + <string name="touch_taller">ส+</string> + <string name="touch_hide">ซ่อน</string> + <string name="touch_color_opacity">สีและความโปร่งใส…</string> + <string name="touch_copy_layout">คัดลอกเค้าโครงนี้</string> + <string name="touch_layout_copied">คัดลอกเค้าโครงแล้ว นำไปวางในเค้าโครงสัมผัสของเกมใดก็ได้</string> + <string name="touch_paste_layout">วางเค้าโครงที่คัดลอก</string> + <string name="touch_reset_layout">รีเซ็ตเป็นค่าเริ่มต้นของ Steam</string> + <string name="touch_no_binding">ปุ่มควบคุมนี้ไม่มีการผูกคำสั่งใน Steam ที่จะใส่ไอคอนให้ได้</string> + <string name="touch_icon_for">ไอคอนสำหรับ %1$s</string> + <string name="touch_layout_color">สีของเค้าโครงสัมผัส</string> + <string name="touch_done">เสร็จสิ้น</string> + <string name="touch_save_failed">ไม่สามารถบันทึกเค้าโครงสัมผัสได้</string> + <string name="touch_saved">บันทึกเค้าโครงสัมผัสลง Steam แล้ว</string> + <string name="touch_app_id">แอป %1$d</string> + <string name="touch_label_hint">ป้ายชื่อ (ไม่บังคับ)</string> + <string name="touch_icons_missing">ไม่พบไอคอนของ Steam</string> + <plurals name="touch_icons_found"> + <item quantity="other">ไอคอน %1$d รายการจาก Steam</item> + </plurals> + <string name="touch_icon_color">สีไอคอน</string> + <string name="touch_button_color">สีปุ่ม</string> + <string name="touch_no_icon">ไม่มีไอคอน</string> + + <string name="stores_sync_sign_in">กำลังตรวจสอบการลงชื่อเข้าใช้…</string> + <string name="stores_sync_library">กำลังดึงข้อมูลคลังเกมของคุณ…</string> + <string name="stores_sync_game_list">กำลังดึงรายการเกม…</string> + <string name="stores_sync_details">กำลังโหลดรายละเอียดเกม… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="other">กำลังซิงค์เกม %1$d เกม…</item> + </plurals> + <string name="stores_sync_progress">กำลังซิงค์… %1$d/%2$d</string> + <string name="stores_sync_cover_art">กำลังดึงภาพปก…</string> + <string name="stores_sync_failed">การซิงค์ล้มเหลว</string> + <string name="stores_sync_no_games">ไม่พบเกมในคลังเกม %1$s ของคุณ</string> + <string name="stores_sync_amazon_no_answer">Amazon Games ไม่ตอบสนองสำหรับคลังเกมของคุณ: รีเฟรช หรือลงชื่อเข้าใช้อีกครั้ง</string> + <string name="stores_sync_gog_unreachable">เชื่อมต่อกับ GOG ไม่ได้</string> + <string name="stores_sync_gog_unreadable">ไม่สามารถอ่านคลังเกม GOG ของคุณได้</string> + <string name="stores_registering">กำลังลงทะเบียนกับ Steam…</string> + <string name="mode_client_arch">ไคลเอนต์ Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">การวินิจฉัย VAC</string> + <string name="setup_vac_diag_hint">เกม Source บันทึกคอนโซลของเกม (-condebug); vac.txt ในล็อกเซสชันบอกว่าปลอดภัยหรือไม่</string> + <string name="load_starting_steam_x64">กำลังเริ่ม Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">ใช้โดยไคลเอนต์ Steam x86-64</string> + <string name="storage_uninstall_in_x64">สำเนานี้อยู่ในไคลเอนต์ Steam x86-64 เลือก x86-64 ในไคลเอนต์ Steam แล้วถอนการติดตั้งที่นี่</string> + <string name="storage_uninstall_in_arm64">สำเนานี้อยู่ในไคลเอนต์ Steam ARM64 เลือก ARM64 ในไคลเอนต์ Steam แล้วถอนการติดตั้งที่นี่</string> + <string name="drawer_page_glasses">แว่นตา</string> + <string name="glasses_open">แว่นตา VITURE</string> + <string name="glasses_control">การควบคุมแว่นตา</string> + <string name="glasses_driver_missing">บิลด์นี้ไม่มีไดรเวอร์สำหรับแว่นตานี้</string> + <string name="glasses_connection_failed">เชื่อมต่อกับแว่นตาไม่ได้ เสียบสายใหม่ หรือแตะ “อนุญาต” เพื่อลองอีกครั้ง</string> + <string name="glasses_allow">อนุญาต</string> + <string name="glasses_allow_hint">ให้ DroidDeck ตั้งค่าอัตรารีเฟรช โหมด 3D ความสว่าง ระดับเสียง และการกันแดดของแว่นตา รวมถึงอ่านข้อมูลการติดตามศีรษะ</string> + <string name="glasses_asking">กำลังรอให้คุณอนุญาตในกล่องโต้ตอบของ Android…</string> + <string name="glasses_denied">การควบคุมถูกปฏิเสธ โปรดอนุญาตเพื่อเปลี่ยนการตั้งค่าของแว่นตา</string> + <string name="glasses_no_control">แว่นตานี้แสดงเกมได้ แต่เปลี่ยนการตั้งค่าจากที่นี่ไม่ได้</string> + <string name="glasses_output">เอาต์พุต</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">แสดงเกมบนแว่นตา</string> + <string name="glasses_game_on_hint">แสดงเกมบนแว่นตาเท่านั้น เมื่อปิด: เกมจะแสดงบนโทรศัพท์ และ Android จะสะท้อนหน้าจอโทรศัพท์</string> + <string name="glasses_display">หน้าจอ</string> + <string name="glasses_refresh">อัตรารีเฟรช</string> + <string name="glasses_3d">3D (แบบเคียงข้าง)</string> + <string name="glasses_3d_hint">เปลี่ยนแว่นตาอัจฉริยะเป็น 3 มิติแบบ side-by-side การติดตามศีรษะจะถูกควบคุมแยกต่างหาก</string> + <string name="glasses_3d_failed">ยังยืนยันสัญญาณ 3D ไม่ได้ ลองอีกครั้งเมื่อภาพ 2D กลับมา</string> + <string name="glasses_no_signal">ไม่มีภาพ: แว่นตาอยู่ในโหมดที่โทรศัพท์นี้ส่งสัญญาณให้ไม่ได้ กดปุ่ม 2D/3D ของแว่นตาค้างไว้ หรือถอดสายแล้วเสียบใหม่</string> + <string name="glasses_3d_refresh">อัตรารีเฟรช 3D</string> + <string name="glasses_auto3d">3D สำหรับเกม VR</string> + <string name="glasses_auto3d_hint">เปลี่ยนเป็น 3D ขณะที่ SteamVR ทำงาน และเปลี่ยนกลับเมื่อเลิกใช้</string> + <string name="glasses_picture">รูปภาพ</string> + <string name="glasses_picture_hint">แสดงเนื้อหาแบบแบนราบโดยอัตโนมัติในทั้งสองตาและตรวจจับ SteamVR เลือกเกมแบบ Side-by-side สำหรับเนื้อหา SBS</string> + <string name="glasses_picture_auto">อัตโนมัติ</string> + <string name="glasses_picture_screen">หน้าจอเสมือน</string> + <string name="glasses_picture_sbs">เกมแบบเคียงข้าง</string> + <string name="glasses_screen_size">ความกว้างหน้าจอ</string> + <string name="glasses_screen_distance">ระยะห่างหน้าจอ</string> + <string name="glasses_screen_next_session">ความกว้างและระยะห่างจะมีผลเมื่อเกมแสดงบนแว่นตาเป็นหน้าจอเสมือน</string> + <string name="glasses_screen_no_output">การตั้งค่าเหล่านี้จะมีผลเมื่อเปิด “แสดงเกมบนแว่นตา” และเกมกำลังแสดงอยู่บนแว่นตา</string> + <string name="glasses_screen_flat_hint">โหมดอัตโนมัติจะแสดงเกม 2D นี้แบบเต็มจอ ใช้หน้าจอเสมือนเพื่อปรับความกว้าง ระยะห่าง และการติดตามศีรษะ</string> + <string name="glasses_screen_use">ใช้หน้าจอเสมือน</string> + <string name="glasses_screen_direct_hint">SteamVR เต็มมุมมอง ปรับมุมมองใน VR ความกว้างและระยะทางจะใช้กับหน้าจอเสมือนเท่านั้น</string> + <string name="glasses_screen_sbs_hint">เกมแบบเคียงข้างจะแสดงเต็มภาพในตาแต่ละข้าง ความกว้างและระยะห่างใช้กับหน้าจอเสมือนเท่านั้น</string> + <string name="glasses_tracking_flat_hint">โหมดอัตโนมัติจะตรึงเกม 2D นี้ไว้ในมุมมอง เลือก “หน้าจอเสมือน” ในส่วน “หน้าจอ” เพื่อใช้การติดตามศีรษะ</string> + <string name="glasses_tracking_sbs_hint">การติดตามศีรษะใช้กับหน้าจอเสมือนหรือเกม SteamVR ที่กำลังทำงาน</string> + <string name="glasses_hardware">อุปกรณ์</string> + <string name="glasses_brightness">ความสว่าง</string> + <string name="glasses_volume">ระดับเสียง</string> + <string name="glasses_sunblock">กันแดด</string> + <string name="glasses_sunblock_hint">ทำให้เลนส์ด้านหน้ามืดลง</string> + <string name="glasses_tracking">การติดตาม</string> + <string name="glasses_head_tracking">การติดตามศีรษะ</string> + <string name="glasses_head_tracking_hint">เซ็นเซอร์ในตัวแว่นตาจะหมุนหน้าจอเสมือนและ SteamVR ตามศีรษะของคุณ</string> + <string name="glasses_recenter">จัดมุมมองให้อยู่ตรงกลาง</string> + <string name="glasses_recenter_button">ตั้งศูนย์หน้าจอใหม่</string> + <string name="glasses_vr_fov">ขอบเขตการมองเห็นของ SteamVR</string> + <string name="glasses_vr_fov_hint">ค่าต่ำจะดึง SteamVR เข้ามาใกล้และเต็มแว่นตา ค่าสูงจะแสดงสิ่งรอบตัวคุณได้มากขึ้น</string> + <string name="glasses_playing">กำลังเล่นบน %1$s</string> + <string name="glasses_calibration">การปรับเทียบการติดตาม</string> + <string name="glasses_calibration_hint">ลดการดริฟต์และปรับแนวระดับอ้างอิงให้ตรง</string> + <string name="glasses_calibration_saved_hint">ใช้การปรับเทียบที่บันทึกไว้กับแว่นตานี้แล้ว</string> + <string name="glasses_calibration_open">ปรับเทียบ</string> + <string name="glasses_calibration_instructions">วางแว่นตาที่เชื่อมต่ออยู่แบบกลับหัวบนพื้นผิวที่ได้ระดับ โดยให้กรอบแว่นวางราบเสมอกัน แตะ “เริ่ม” แล้วอย่าแตะต้องแว่นประมาณ 8 วินาที หากมีการขยับ การวัดจะเริ่มใหม่ การปรับเทียบนี้แก้การดริฟต์และการเอียง แต่ไม่แก้ทิศทางที่หัน</string> + <string name="glasses_calibration_settling">วางแว่นตากลับหัวไว้และอย่าแตะต้อง กำลังรอให้แว่นนิ่ง…</string> + <string name="glasses_calibration_collecting">กำลังวัดค่าเซ็นเซอร์ อย่าขยับแว่นตา</string> + <string name="glasses_calibration_moving">ตรวจพบการเคลื่อนไหว อย่าแตะต้องแว่นตา การวัดจะเริ่มใหม่โดยอัตโนมัติ</string> + <string name="glasses_calibration_turn_over">วางแว่นตากลับหัวบนพื้นผิวที่ได้ระดับ การวัดจะเริ่มเมื่อวางแว่นในตำแหน่งที่ถูกต้อง</string> + <string name="glasses_calibration_complete">บันทึกการปรับเทียบแล้ว สวมแว่นตาและมองตรงไปข้างหน้า แล้วแตะ “เสร็จสิ้น” เพื่อจัดกึ่งกลาง</string> + <string name="glasses_calibration_failed">ปรับเทียบไม่สำเร็จ ตรวจสอบการเชื่อมต่อและอย่าขยับแว่นตา แล้วลองอีกครั้ง การปรับเทียบก่อนหน้ายังคงเดิม</string> + <string name="glasses_calibration_start">เริ่ม</string> + <string name="glasses_calibration_done">เสร็จสิ้น</string> + <string name="glasses_calibration_reset">รีเซ็ตการปรับเทียบการติดตาม</string> + <string name="glasses_calibration_reset_hint">ลบการปรับเทียบที่บันทึกไว้และคืนค่าเริ่มต้นของรุ่น? สวมแว่นตาอีกครั้งแล้วจัดกึ่งกลางใหม่</string> + <string name="glasses_calibration_reset_button">รีเซ็ต</string> + <string name="hand_camera_group">การติดตามมือ</string> + <string name="hand_camera_prompt_title">ติดตามมือหรือคอนโทรลเลอร์ Joy-Con ด้วยกล้องโทรศัพท์?</string> + <string name="hand_camera_prompt_body">หากไม่มีคอนโทรลเลอร์เชื่อมต่อ กล้องโทรศัพท์จะติดตามมือเปล่าของคุณใน VR: บีบนิ้วโป้งและนิ้วชี้เพื่อคลิก ปิดมือเพื่อจับ และหันฝ่ามือเข้าหาตัวแล้วบีบเพื่อเปิดเมนู หากเชื่อมต่อคอนโทรลเลอร์ Joy-Con กล้องจะติดตามตำแหน่งของคอนโทรลเลอร์ ในขณะที่คอนโทรลเลอร์ Joy-Con จะให้การหมุนและการกดปุ่ม รูปภาพจะถูกประมวลผลบนอุปกรณ์นี้และจะไม่ถูกบันทึกหรือส่ง</string> + <string name="hand_camera_rear">กล้องหลัง</string> + <string name="hand_camera_rear_hint">แนะนำ โดยทั่วไปจะคมชัดและมีมุมมองกว้างกว่า</string> + <string name="hand_camera_front">กล้องหน้า</string> + <string name="hand_camera_front_hint">ใช้เมื่อด้านหลังของอุปกรณ์ไม่สามารถหันมาทางคุณได้</string> + <string name="hand_camera_allow">ใช้กล้อง</string> + <string name="hand_camera_not_now">ไม่ใช่ตอนนี้</string> + <string name="hand_camera_setting">การติดตามมือด้วยกล้อง</string> + <string name="hand_camera_setting_hint">ใช้กล้องโทรศัพท์สำหรับการใช้ท่าทางมือเปล่าหรือเพื่อกำหนดตำแหน่งคอนโทรลเลอร์ Joy-Con ที่จับคู่ไว้ใน VR คอนโทรลเลอร์ Joy-Con จะให้การหมุนและการกดปุ่ม หยุดชั่วคราวในขณะที่แว่นตาอัจฉริยะติดตามมือหรือคอนโทรลเลอร์ Joy-Con ของคุณ รูปภาพจะถูกประมวลผลบนอุปกรณ์นี้เท่านั้น</string> + <string name="hand_camera_choice">กล้อง</string> + <string name="hand_camera_access">สิทธิ์กล้อง</string> + <string name="hand_camera_access_hint">อนุญาตสิทธิ์กล้องเพื่อให้เริ่มการติดตามมือได้</string> + <string name="hand_camera_access_denied">สิทธิ์กล้องปิดอยู่ กรุณาเปิดในการตั้งค่า Android</string> + <string name="hand_camera_allow_button">อนุญาต</string> + <string name="hand_camera_open_settings">เปิดการตั้งค่า</string> + <string name="hand_camera_placement">ตำแหน่งกล้อง</string> + <string name="hand_camera_placement_hint">ตรวจสอบว่ากล้องมองเห็นคุณก่อนเริ่มเล่น</string> + <string name="hand_camera_check">ตรวจสอบ</string> + <string name="hand_camera_check_title">ตำแหน่งกล้อง</string> + <string name="hand_camera_how_rear">ตั้งอุปกรณ์ให้ห่างออกไป 1.5 ถึง 2 เมตร ที่ระดับความสูงประมาณหน้าอก โดยให้กล้องหลังหันมาทางคุณ จากนั้นเดินเข้ามาในมุมมองพร้อมยื่นมือทั้งสองข้างออกมา</string> + <string name="hand_camera_how_front">ตั้งอุปกรณ์ให้ห่างออกไป 1.5 ถึง 2 เมตร ที่ระดับความสูงประมาณหน้าอก โดยให้หน้าจอหันมาทางคุณ จากนั้นเดินเข้ามาในมุมมองพร้อมยื่นมือทั้งสองข้างออกมา</string> + <string name="hand_camera_starting">กำลังเริ่มกล้อง…</string> + <string name="hand_camera_stand_up">อุปกรณ์วางราบอยู่ กรุณาตั้งให้กล้องหันมาทางคุณ</string> + <string name="hand_camera_upright">ตั้งอุปกรณ์ให้ตรงขึ้นอีกหน่อยเพื่อให้กล้องหันมาทางคุณ</string> + <string name="hand_camera_not_seen">ยังมองไม่เห็นคุณ กรุณาเข้ามาในมุมมองให้เห็นศีรษะและไหล่ของคุณ</string> + <string name="hand_camera_move_back">ถอยหลังอีกนิด</string> + <string name="hand_camera_move_closer">เข้ามาใกล้อีกนิด</string> + <string name="hand_camera_show_hands">ยื่นมือทั้งสองข้างออกมาในตำแหน่งที่กล้องมองเห็นได้</string> + <string name="hand_camera_good">ดูดีแล้ว</string> + <string name="hand_camera_failed">กล้องเริ่มทำงานไม่ได้ กรุณาปิดแอปอื่นที่ใช้กล้องอยู่แล้วลองอีกครั้ง</string> + <string name="hand_camera_switch">สลับกล้อง</string> + <string name="hand_camera_skip">ข้าม</string> + <string name="hand_camera_done">เสร็จสิ้น</string> + <string name="glasses_xreal_network_missing">กำลังรอการเชื่อมต่อ USB Ethernet ของแว่นตา โทรศัพท์นี้อาจไม่เปิดให้แอปเข้าถึงการเชื่อมต่อนี้</string> + <string name="glasses_xreal_connection_failed">การเชื่อมต่อ XREAL ขาดหายหรือได้รับการตอบกลับที่ไม่รองรับ กำลังลองใหม่…</string> + <string name="glasses_xreal_experimental">รองรับ 1S แบบทดลอง ใช้โหมด Follow และปิดการกันสั่นในเมนูของแว่นตา ทิศทางการติดตามและโหมดการแสดงผลยังต้องทดสอบกับอุปกรณ์จริง</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">โหมด Cardboard</string> + <string name="cardboard_mode_hint">ภาพสำหรับตาซ้ายและตาขวาสำหรับแว่น VR ของโทรศัพท์</string> + <string name="cardboard_source">ภาพ</string> + <string name="cardboard_source_screen">หน้าจอเสมือน</string> + <string name="cardboard_source_sbs">3D แบบเคียงข้าง</string> + <string name="cardboard_viewer">แว่น</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">ไม่มีเลนส์</string> + <string name="cardboard_ipd">ระยะห่างระหว่างตา</string> + <string name="cardboard_screen_width">ความกว้างหน้าจอ</string> + <string name="cardboard_screen_distance">ระยะห่างหน้าจอ</string> + <string name="cardboard_head_tracking">การติดตามศีรษะ</string> + <string name="cardboard_no_sensor">อุปกรณ์นี้ไม่มีเซ็นเซอร์การหมุน</string> + <string name="cardboard_recenter">จัดมุมมองให้อยู่ตรงกลาง</string> + <string name="cardboard_recenter_button">จัดกึ่งกลาง</string> + <string name="cardboard_steamvr">SteamVR (ทดลอง)</string> + <string name="cardboard_steamvr_install">ติดตั้ง</string> + <string name="cardboard_steamvr_installing">กำลังดาวน์โหลดและแตกไฟล์ SteamVR…</string> + <string name="cardboard_steamvr_start">เริ่ม</string> + <string name="cardboard_steamvr_stop">หยุด</string> + <string name="cardboard_steamvr_unavailable">ใช้ไม่ได้ในเซสชันนี้</string> + <string name="cardboard_steamvr_failed">SteamVR ไม่ตอบสนอง ตรวจสอบบันทึกเซสชัน</string> + <string name="drawer_component_downloads">ดาวน์โหลดคอมโพเนนต์</string> + <string name="drawer_component_downloads_hint">ไฟล์ที่ดาวน์โหลดใช้ร่วมกับหน้า Components เลือกเวอร์ชันที่ดาวน์โหลดแล้วด้านบนเพื่อใช้ในการเปิดเกมครั้งถัดไป</string> + <string name="drawer_component_choose_download">เลือกเวอร์ชันที่จะดาวน์โหลด</string> + <string name="stores_fact_developer">ผู้พัฒนา</string> + <string name="stores_fact_publisher">ผู้จัดจำหน่าย</string> + <string name="stores_fact_released">วางจำหน่าย</string> + <string name="stores_hltb_main">เนื้อเรื่องหลัก</string> + <string name="stores_hltb_extras">+ ส่วนเสริม</string> + <string name="stores_hltb_completionist">เก็บครบ</string> + <string name="stores_hltb_hours">%1$s ชม.</string> + <string name="stores_hltb_minutes">%1$d นาที</string> + <string name="display_picture_position">ตำแหน่งภาพ</string> + <string name="display_position_top">บน</string> + <string name="display_position_bottom">ล่าง</string> + <string name="display_position_center">กลาง (ค่าเริ่มต้น)</string> + <string name="setup_tab_storage">พื้นที่จัดเก็บ</string> + <string name="storage_measuring">กำลังวัดพื้นที่…</string> + <string name="storage_measuring_hint">ครั้งแรกใช้เวลาสองสามวินาที</string> + <string name="storage_internal">พื้นที่จัดเก็บภายใน</string> + <string name="storage_used_of">ใช้ %1$s จาก %2$s</string> + <string name="storage_free">ว่าง %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck ใช้ %1$s วัดเมื่อ %2$s</string> + <string name="storage_rescanning">กำลังสแกนใหม่…</string> + <string name="storage_other_apps">แอป Android อื่น</string> + <string name="storage_safe_now">ล้างได้ตอนนี้</string> + <string name="storage_safe_hint">รันไทม์ที่ไม่ได้ใช้ เศษที่เหลือ ล็อกเก่า</string> + <string name="storage_clean_up">กำลังล้าง…</string> + <string name="storage_session_running">หยุดเซสชันเพื่อล้างหรือลบอะไรก็ตาม ขนาดจะยังแสดงอยู่</string> + <string name="storage_where">ไปอยู่ที่ไหน</string> + <string name="storage_games">เกม Steam</string> + <string name="storage_game_data">ข้อมูลเกม</string> + <string name="storage_game_data_hint">Prefix %1$s · เวิร์กชอป %2$s · เชเดอร์ %3$s</string> + <string name="storage_tools">Proton และรันไทม์</string> + <string name="storage_tools_unused">%1$s ไม่ได้ใช้</string> + <string name="storage_stores">GOG, Epic และสโตร์อื่น</string> + <string name="storage_stores_hint">นำออกได้ที่สโตร์</string> + <string name="storage_desktop">แอปเดสก์ท็อป</string> + <string name="storage_desktop_hint">แอปและรันไทม์ Flatpak</string> + <string name="storage_system">ระบบ Linux และไคลเอนต์ Steam</string> + <string name="storage_system_hint">จำเป็นต่อการทำงานของทุกอย่าง</string> + <string name="storage_app_data">ข้อมูล DroidDeck</string> + <string name="storage_app_data_hint">ล็อกเซสชันเก่า %1$s · แคช · ไดรเวอร์</string> + <string name="storage_legend_games">เกม</string> + <string name="storage_legend_data">ข้อมูลเกม</string> + <string name="storage_legend_tools">Proton และรันไทม์</string> + <string name="storage_legend_stores">สโตร์อื่น</string> + <string name="storage_legend_desktop">แอปเดสก์ท็อป</string> + <string name="storage_legend_system">ระบบ Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">ล้าง</string> + <string name="storage_clean_up_lede">ไม่มีอะไรตรงนี้แตะเกมที่ติดตั้งหรือดาวน์โหลดที่กำลังทำงาน</string> + <string name="storage_nothing_to_clean">ไม่มีอะไรให้ล้างตอนนี้</string> + <string name="storage_selected">เลือกแล้ว: %1$s · %2$s → จะว่าง %3$s</string> + <string name="storage_cleaning">กำลังล้าง…</string> + <string name="storage_free_button">ล้าง %1$s</string> + <string name="storage_freed">ล้างแล้ว %1$s</string> + <string name="storage_item_runtimes">รันไทม์ Steam และ Proton ที่ไม่ได้ใช้</string> + <string name="storage_item_leftovers">เศษของเกมที่ลบแล้ว</string> + <string name="storage_item_leftovers_unsure">เศษที่อาจมีเซฟอยู่</string> + <string name="storage_item_logs">ล็อกเซสชันเก่า</string> + <string name="storage_item_logs_detail">ล็อกของเซสชันปัจจุบันจะยังอยู่</string> + <string name="storage_item_custom_detail">ไม่มีเกมใช้ ติดตั้งใหม่ในคอมโพเนนต์ถ้าต้องการ</string> + <string name="storage_item_shaders">แคชเชเดอร์ของเกมที่ติดตั้ง</string> + <string name="storage_item_shaders_detail">สร้างใหม่ระหว่างเล่น สองสามนาทีแรกของทุกเกมจะกระตุกอีกครั้ง</string> + <string name="storage_tag_safe">ปลอดภัย</string> + <string name="storage_tag_unused">ไม่ได้ใช้</string> + <string name="storage_tag_stutter">กระตุก</string> + <string name="storage_tag_saves">ตรวจเซฟ</string> + <string name="storage_tag_default">ค่าเริ่มต้น</string> + <string name="storage_tag_required">จำเป็น</string> + <string name="storage_tag_not_used">ไม่ได้ใช้</string> + <string name="storage_back">พื้นที่จัดเก็บ</string> + <string name="storage_games_with_data">%1$s พร้อมข้อมูล</string> + <string name="storage_sort_largest">ใหญ่สุด</string> + <string name="storage_sort_least_played">เล่นน้อยสุด</string> + <string name="storage_sort_sd">บนการ์ด SD</string> + <string name="storage_no_games">ไม่มีเกมที่นี่</string> + <string name="storage_played">เล่น %1$s</string> + <string name="storage_never_played">ไม่เคยเล่น</string> + <string name="storage_game_parts">เกม %1$s · ข้อมูล %2$s</string> + <string name="storage_uninstall">ถอนการติดตั้ง</string> + <string name="storage_games_note">การถอนการติดตั้งจะเปิดหน้าต่าง Steam เพื่อให้ Steam บันทึกไว้ ย้ายเกมไปการ์ด SD ได้ที่ Steam › การตั้งค่า › พื้นที่จัดเก็บ</string> + <string name="storage_uninstall_title">ถอนการติดตั้ง %1$s หรือไม่</string> + <string name="storage_uninstall_body">Steam จะเปิดขึ้นและขอการยืนยัน การทำเช่นนี้จะล้าง %1$s ของเกม Prefix จะยังอยู่จนกว่าจะล้างเศษ และเซฟ Steam Cloud ยังอยู่ในบัญชีของคุณ</string> + <string name="storage_open_steam">เปิด Steam</string> + <string name="storage_tools_detail">%1$s · %2$s ไม่ได้ใช้</string> + <string name="storage_remove_unused">นำตัวที่ไม่ได้ใช้ออก · %1$s</string> + <string name="storage_in_use">กำลังใช้</string> + <string name="storage_not_used">ไม่ได้ใช้</string> + <string name="storage_remove">นำออก</string> + <string name="storage_remove_title">นำ %1$s ออกหรือไม่</string> + <string name="storage_remove_body">ล้าง %1$s Steam จะดาวน์โหลดใหม่ถ้ามีเกมต้องการ</string> + <string name="storage_tool_fex_runtime">จำเป็นสำหรับเกม Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">จำเป็นสำหรับ Proton ARM64</string> + <string name="storage_tool_redist">ตัวติดตั้ง VC++ และ DirectX ที่เกมต้องใช้</string> + <string name="storage_tool_fex">รันเกม Linux x86</string> + <string name="storage_tool_steam">เครื่องมือ Steam</string> + <string name="storage_tool_old_runtime">DroidDeck รันเกมได้โดยไม่ต้องใช้รันไทม์นี้</string> + <string name="storage_tool_x86_proton">Proton x86 ซึ่ง DroidDeck รันไม่ได้</string> + <string name="storage_tool_custom_default">ค่าเริ่มต้นสำหรับทุกเกม</string> + <string name="storage_tool_custom_unused">ไม่มีเกมใช้</string> + <string name="storage_tool_custom_unknown">อ่านการตั้งค่า Steam ไม่ได้ จึงเก็บไว้</string> + <string name="storage_cleanup_busy">รอให้การล้างพื้นที่เสร็จก่อน</string> + <string name="storage_low_title">เหลือเพียง %1$s</string> + <string name="storage_low_body">Steam ต้องใช้พื้นที่สำหรับอัปเดตและแคชเชเดอร์ ถ้าต่ำกว่า 10 GB การอัปเดตเกมอาจล้มเหลวกลางทาง</string> + <string name="storage_low_safe">ล้าง %1$s ได้อย่างปลอดภัย</string> + <string name="storage_free_up">เพิ่มพื้นที่ว่าง</string> + <string name="storage_play_anyway">เล่นต่อ</string> + <plurals name="storage_games_installed"> + <item quantity="one">ติดตั้ง %d เกม</item> + <item quantity="other">ติดตั้ง %d เกม</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d เกมบนการ์ด SD</item> + <item quantity="other">%d เกมบนการ์ด SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d เครื่องมือ</item> + <item quantity="other">%d เครื่องมือ</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">โฟลเดอร์ Prefix และแคชเชเดอร์ที่ว่างจาก %d เกม</item> + <item quantity="other">โฟลเดอร์ Prefix และแคชเชเดอร์ที่ว่างจาก %d เกม</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Prefix ของ %d เกมยังมีไฟล์อยู่ รวมถึงเซฟในเครื่อง สำรองไว้ก่อนหากจำเป็น</item> + <item quantity="other">Prefix ของ %d เกมยังมีไฟล์อยู่ รวมถึงเซฟในเครื่อง สำรองไว้ก่อนหากจำเป็น</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d เกม</item> + <item quantity="other">%d เกม</item> + </plurals> + <string name="storage_tool_default_proton">Proton ค่าเริ่มต้นของ DroidDeck</string> + <string name="storage_tool_proton">ตัวเลือก Proton 11 ของ DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d เกมใช้</item> + <item quantity="other">%d เกมใช้</item> + </plurals> + <string name="storage_legend_components">คอมโพเนนต์</string> + <string name="storage_components">คอมโพเนนต์</string> + <string name="storage_item_components">คอมโพเนนต์ที่ไม่ได้ใช้</string> + <string name="storage_component_original">ต้นฉบับ %1$s · %2$s</string> + <string name="storage_original_confirm">ล้าง %1$s คืนค่าเฉพาะ Proton เวอร์ชันที่ไม่ได้ติดตั้งแล้ว</string> + <string name="storage_leftovers_unchecked">ยังไม่ได้ตรวจ: อ่านไฟล์รายการของแอป Steam ไม่ได้ Prefix ของเกมที่ลบแล้วจะยังอยู่จนกว่าจะทำได้</string> + <string name="storage_failed">ไม่สำเร็จ: %1$s</string> + <string name="storage_desktop_shared">%1$s ใช้ร่วมกัน</string> + <string name="storage_data_installed">เกมที่ติดตั้ง</string> + <string name="storage_data_parts">Prefix %1$s · เชเดอร์ %2$s · เวิร์กชอป %3$s</string> + <string name="storage_clear_shaders">ล้างเชเดอร์</string> + <string name="storage_data_leftovers">เกมที่ลบแล้ว</string> + <string name="storage_steam_app">แอป Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Prefix ยังมีไฟล์อยู่ อาจเป็นเซฟในเครื่อง</string> + <string name="storage_leftover_confirm">ลบ Prefix ของ Wine และแคชเชเดอร์ (%1$s) สำรองเซฟที่สำคัญไว้ก่อน เซฟ Steam Cloud ยังอยู่ในบัญชีของคุณ</string> + <string name="storage_data_other">เก็บไว้</string> + <string name="storage_data_other_title">เกมนอก Steam และ Prefix Steam ที่ใช้ร่วมกัน</string> + <string name="storage_data_other_detail">Prefix ของเกมจากสโตร์หรือที่เพิ่มเอง</string> + <string name="storage_components_packages">แพ็กเกจที่ดาวน์โหลด</string> + <string name="storage_components_originals">ต้นฉบับที่เก็บไว้</string> + <string name="storage_components_none">ยังไม่มีแพ็กเกจคอมโพเนนต์ที่ดาวน์โหลด</string> + <string name="storage_component_in_use">เลือกไว้ให้ Proton หรือเกม</string> + <string name="storage_component_unused">ไม่ได้เลือกไว้ที่ไหน</string> + <string name="storage_original_kept">คืน Proton ที่ติดตั้งไว้</string> + <string name="storage_original_old">Proton เวอร์ชันที่ไม่ได้ติดตั้งแล้ว</string> + <string name="storage_tag_in_use">กำลังใช้</string> + <string name="storage_components_note">คอมโพเนนต์ที่ใช้อยู่จะถูกล็อก เลือกได้ในคอมโพเนนต์ สิ่งที่นำออกที่นี่ดาวน์โหลดใหม่ได้ที่นั่น</string> + <string name="storage_component_confirm">ล้าง %1$s แพ็กเกจที่คุณนำเข้าเองจะดาวน์โหลดใหม่ไม่ได้</string> + <string name="storage_desktop_detail">%1$s สำหรับแอป Flatpak และสิ่งที่ใช้ร่วมกัน</string> + <string name="storage_desktop_apps_title">แอป</string> + <string name="storage_desktop_none">ไม่มีแอป Flatpak ที่ติดตั้ง</string> + <string name="storage_desktop_shared_title">ใช้ร่วมกันระหว่างแอป</string> + <string name="storage_desktop_runtimes">รันไทม์</string> + <string name="storage_desktop_runtimes_detail">ไลบรารีที่แอปใช้ทำงาน ตัวที่ไม่ได้ใช้จะหายไปเมื่อนำตัวที่ไม่ได้ใช้ออก</string> + <string name="storage_desktop_cache">พื้นที่ดาวน์โหลด</string> + <string name="storage_desktop_cache_detail">Object store และแคชดาวน์โหลดของ Flatpak</string> + <string name="storage_desktop_prune">นำตัวที่ไม่ได้ใช้ออก</string> + <string name="storage_desktop_prune_body">นำรันไทม์ที่ไม่มีแอปที่ติดตั้งต้องการออก และจัดระเบียบ object store ของ Flatpak แอปที่ติดตั้งยังทำงานได้</string> + <string name="storage_flatpak_uninstall_body">นำแอป (%1$s) และรันไทม์ที่ไม่มีใครอื่นใช้ออก ข้อมูลในโฟลเดอร์ home ของคุณยังอยู่</string> + <plurals name="storage_components_count"> + <item quantity="one">%d แพ็กเกจ</item> + <item quantity="other">%d แพ็กเกจ</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d แอป</item> + <item quantity="other">%d แอป</item> + </plurals> + <string name="boot_movie">วิดีโอบูต</string> + <string name="boot_movie_video">วิดีโอ</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps ลื่นกว่าแต่ใช้ CPU มากขึ้นระหว่างที่ Steam กำลังเริ่ม วิดีโอเริ่มต้นที่เลือกในการตั้งค่าของ Steam เองจะมีลำดับความสำคัญกว่า</string> + <string name="boot_movie_sound">เสียง</string> + <string name="boot_movie_custom">วิดีโอของคุณเอง</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV หรือ WebM รูปแบบอื่นและไฟล์ที่ใหญ่กว่า %1$d MB จะถูกแปลงเป็น WebM 720p บนอุปกรณ์ ความยาวไม่เกิน %2$d วินาที</string> + <string name="boot_movie_import">นำเข้า</string> + <string name="boot_movie_remove">ลบ</string> + <string name="boot_movie_pick">เลือกวิดีโอบูต</string> + <string name="boot_movie_imported">%1$s เป็นวิดีโอบูตแล้ว</string> + <string name="boot_movie_imported_silent">%1$s เป็นวิดีโอบูตแล้ว แบบไม่มีเสียง</string> + <string name="boot_movie_too_long">วิดีโอที่ต้องแปลงต้องยาวไม่เกิน %1$d วินาที</string> + <string name="boot_movie_converting">กำลังแปลง %1$d%%</string> + <string name="boot_movie_converting_started">กำลังแปลง %1$s สำหรับ Steam โปรดเปิด DroidDeck ค้างไว้</string> + <string name="boot_movie_unsupported">อุปกรณ์นี้ถอดรหัสวิดีโอนั้นไม่ได้</string> + <string name="boot_movie_import_failed">นำเข้าวิดีโอนี้ไม่ได้</string> + <string name="glasses_experimental">กล้อง Luma Ultra — ทดลอง</string> + <string name="glasses_joycons">การติดตามตำแหน่ง Joy-Con</string> + <string name="glasses_joycons_hint">ใช้กล้องของแว่นตาอัจฉริยะเพื่อกำหนดตำแหน่งคอนโทรลเลอร์ Joy-Con ที่จับคู่ไว้ การหมุนและการกดปุ่มจะมาจากคอนโทรลเลอร์ Joy-Con ตำแหน่งจะถูกประมาณเมื่อข้อมือของคุณถูกซ่อนอยู่ แทนที่คอนโทรลเลอร์ที่ใช้งานด้วยมือเปล่าและหยุดการติดตามของกล้องโทรศัพท์ชั่วคราว ชี้คอนโทรลเลอร์ Joy-Con ไปข้างหน้าเมื่อเชื่อมต่อหรือรีเซ็ตศูนย์กลางการติดตาม</string> + <string name="glasses_joycons_requires_position">เปิดใช้งานการติดตามตำแหน่งก่อน ต้องใช้คอนโทรลเลอร์ Joy-Con ที่รองรับการเคลื่อนไหวบน Android 12 หรือใหม่กว่า ปิดใช้งานโดยค่าเริ่มต้น</string> + <string name="setup_tab_glasses">แว่นตาอัจฉริยะ</string> + <string name="setup_glasses_scope">การตั้งค่าการแสดงผลและการติดตามศีรษะจะใช้ร่วมกันในเมนู DroidDeck เกม และเซสชันเดสก์ท็อป</string> + <string name="setup_glasses_connect">เชื่อมต่อแว่นตาอัจฉริยะเพื่อเปลี่ยนการตั้งค่าการแสดงผลและการติดตาม การตั้งค่าที่บันทึกไว้ของคุณจะยังคงอยู่เมื่อคุณตัดการเชื่อมต่อ</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">โหมดการแสดงผล</string> + <string name="glasses_output_2d">เอาต์พุต 2 มิติ</string> + <string name="glasses_output_3d">เอาต์พุต 3 มิติ</string> + <string name="glasses_picture_group">รูปภาพและหน้าจอเสมือน</string> + <string name="glasses_position_group">ตำแหน่งและระดับพื้น</string> + <string name="glasses_hands_group">การติดตามมือ — ทดลอง</string> + <string name="glasses_tracking_status">สถานะการติดตาม</string> + <string name="glasses_resolution_2d">ความละเอียด 2 มิติ</string> + <string name="glasses_resolution_3d">ความละเอียด 3 มิติ</string> + <string name="glasses_resolution_vr">ความละเอียด VR</string> + <string name="glasses_resolution_auto">อัตโนมัติ</string> + <string name="glasses_resolution_inherit">เหมือนกับ 2 มิติ / 3 มิติ</string> + <string name="glasses_resolution_hint">ความละเอียดเอาต์พุตต่อตา</string> + <string name="glasses_refresh_30_hint">เปิดใช้งาน Game on smart glasses เพื่อเลือกโหมด 30 Hz ดั้งเดิมของจอแสดงผล</string> + <string name="glasses_3dof">หน้าจอเสมือน 3DoF</string> + <string name="glasses_3dof_hint">ตรึงเกมแบบแบนไว้ข้างหน้าคุณเพื่อให้คุณสามารถมองไปรอบๆ ได้ เปิดใช้งาน Game on smart glasses โดยไม่ต้องเปลี่ยนเป็น 3 มิติ</string> + <string name="glasses_screen_app_wide">ความกว้างและระยะทางจะอัปเดตหน้าจอเสมือนที่ติดตามสำหรับเมนู เกม และเซสชันเดสก์ท็อปของ DroidDeck ทันที</string> + <string name="glasses_head_tracking_spatial_vr_hint">การติดตามตำแหน่งรวมถึงการหมุนศีรษะใน SteamVR สำหรับการติดตามการหมุนอย่างเดียว ให้ปิดการติดตามตำแหน่ง</string> + <string name="glasses_head_tracking_spatial_hint">ควบคุมการเคลื่อนไหวของศีรษะบนหน้าจอเสมือน การติดตามตำแหน่งรวมถึงการหมุนศีรษะใน SteamVR</string> + <string name="glasses_quick_actions">การดำเนินการด่วน</string> + <string name="glasses_recenter_screen_hint">มองไปยังตำแหน่งที่คุณต้องการให้หน้าจออยู่ จากนั้นรีเซ็ตศูนย์กลางการติดตามเพื่อตั้งค่าความสูงและทิศทาง</string> + <string name="glasses_recenter_joycons_button">ตั้งศูนย์ Joy-Con ใหม่</string> + <string name="phone_camera_tracking_group">กล้องโทรศัพท์ — ทดลอง</string> + <string name="phone_camera_tracking_setting">ติดตามมือหรือคอนโทรลเลอร์ Joy-Con</string> + <string name="glasses_6dof">หน้าจอเสมือน 6DoF</string> + <string name="glasses_position">การติดตามตำแหน่ง — ทดลอง</string> + <string name="glasses_position_hint">การเคลื่อนไหวทางกายภาพใน VR และรอบๆ หน้าจอเสมือน การเริ่มต้นการติดตามใหม่ใช้เวลาสักครู่</string> + <string name="glasses_eye_height">ความสูงของดวงตาปัจจุบันเหนือพื้น</string> + <string name="glasses_floor">ตั้งระดับพื้นจากความสูงปัจจุบัน</string> + <string name="glasses_floor_set">ตั้งระดับพื้น</string> + <string name="glasses_spatial_setup">การตั้งค่าและการวินิจฉัยกล้องสเตอริโอ</string> + <string name="glasses_spatial_setup_hint">ตรวจสอบการปรับเทียบกล้องและการติดตามมือก่อนเล่น</string> + <string name="glasses_spatial_open">เปิดการตั้งค่า</string> + <string name="glasses_hands">คอนโทรลเลอร์ที่ใช้งานด้วยมือเปล่า</string> + <string name="glasses_hands_hint">ใช้กล้องแว่นตาอัจฉริยะเพื่อเล็งด้วยมือของคุณ บีบเพื่อคลิก และกำมือเพื่อจับใน VR จอยสติ๊กของเกมแพดจะเคลื่อนที่และหมุน แทนที่การติดตามตำแหน่งของ Joy-Con อาจเกิดอาการหน่วงหรือสูญเสียการติดตามระหว่างเล่นเกม</string> + <string name="glasses_hands_ready_hint">เปิดใช้งานคอนโทรลเลอร์ที่ใช้งานด้วยมือเปล่าภายใต้กล้อง Luma Ultra ในการติดตาม แสดงมือที่เปิดอยู่ก่อน</string> + <string name="glasses_hands_base">การปรับเทียบ Luma Ultra ที่ใช้ร่วมกัน</string> + <string name="glasses_hands_base_hint">การใช้ฐาน Luma Ultra ที่ใช้ร่วมกัน ปรับเทียบแว่นตาอัจฉริยะของคุณเองเพื่อตรวจสอบความถูกต้อง</string> + <string name="glasses_hands_calibration_verified">การวัดค่าการปรับเทียบได้รับการตรวจสอบแล้ว</string> + <string name="glasses_hands_calibration_required">ต้องมีการตรวจสอบความถูกต้อง</string> + <string name="glasses_hands_calibration_required_hint">ตัวควบคุมที่ใช้งานด้วยมือเปล่าจะพร้อมใช้งานหลังจากผ่านการตรวจสอบระยะทางที่วัดได้</string> + <string name="tracking_recovery_lost">การติดตามหายไป</string> + <string name="tracking_recovery_look">มองไปรอบๆ อย่างช้าๆ ในห้องที่มีแสงสว่างเพียงพอ\nรักษาให้กล้องติดตามอยู่ในตำแหน่งที่ชัดเจนและหันหน้าไปทางเฟอร์นิเจอร์หรือรายละเอียดอื่นๆ ที่มองเห็นได้</string> + <string name="tracking_recovery_restart_help">ยังติดอยู่เหรอ? บนโทรศัพท์ของคุณ: แว่นตาอัจฉริยะ → การติดตาม → เปิดการตั้งค่า → แสดงการวินิจฉัย → เริ่มการติดตามอีกครั้ง</string> + <string name="tracking_recovery_disconnected">แว่นตาอัจฉริยะถูกตัดการเชื่อมต่อ</string> + <string name="tracking_recovery_connect">ตรวจสอบการเชื่อมต่อ USB และเชื่อมต่อแว่นตาอัจฉริยะอีกครั้ง\nยอมรับข้อความแจ้งการเข้าถึง USB บนโทรศัพท์ของคุณหากปรากฏขึ้น</string> + <string name="tracking_recovery_usb_help">เมื่อเชื่อมต่อแล้ว ให้มองไปรอบๆ อย่างช้าๆ ในห้องที่มีแสงสว่างเพียงพอเพื่อคืนค่าการติดตาม</string> + <string name="tracking_recovery_recenter">จำเป็นต้องตั้งศูนย์ใหม่</string> + <string name="tracking_recovery_recenter_steps">การติดตามกลับมาอยู่ในตำแหน่งใหม่แล้ว\nมองไปข้างหน้า จากนั้นแตะรีเซ็ตศูนย์กลางการติดตามบนโทรศัพท์ของคุณ</string> + <string name="tracking_recovery_recenter_help">คุณสามารถค้นหาตัวเลือกการรีเซ็ตจุดศูนย์กลางการติดตามได้ในแว่นตาอัจฉริยะ → การติดตาม → เปิดการตั้งค่า การปรับเทียบกล้องที่คุณบันทึกไว้จะยังคงอยู่</string> + <string name="tracking_recovery_stabilizing">จงนิ่งไว้ครู่หนึ่ง</string> + <string name="tracking_recovery_hold">กำลังดำเนินการรีเซ็ตจุดศูนย์กลางการติดตาม\nโปรดรักษาแว่นตาอัจฉริยะให้นิ่งในขณะที่การติดตามกำลังเสถียร</string> + <string name="tracking_recovery_automatic">หน้าจอนี้จะปิดโดยอัตโนมัติเมื่อพร้อมการติดตามศีรษะ</string> + <string name="glasses_steady_hand_aim">การเล็งด้วยมืออย่างมั่นคง</string> + <string name="glasses_steady_hand_aim_hint">เล็งจากไหล่ผ่านฝ่ามือ ปิดเพื่อควบคุมการหมุนด้วยข้อมือ</string> + <string name="spatial_title">การตั้งค่าเชิงพื้นที่</string> + <string name="spatial_wait_tracking">กำลังรอการติดตาม...</string> + <string name="spatial_cameras_description">กล้องติดตามด้านซ้ายและขวา</string> + <string name="spatial_camera_sync">การซิงโครไนซ์กล้อง</string> + <string name="spatial_ready">พร้อมแล้ว</string> + <string name="spatial_sync_hint">กำลังรอให้กล้องและการติดตามศีรษะเข้าแถว เชื่อมต่อแว่นตาอัจฉริยะไว้</string> + <string name="spatial_prepare">1. เตรียมเป้าหมายการสอบเทียบ</string> + <string name="spatial_print_actual">พิมพ์ตามขนาดจริง</string> + <string name="spatial_print_hint">แต่ละสี่เหลี่ยมจัตุรัสต้องวัดได้ 30 มม. (1.181 นิ้ว) ติดแผ่นเรียบบนพื้นผิวแข็งในบริเวณที่มีแสงสว่างเพียงพอ</string> + <string name="spatial_print">พิมพ์แผ่นปรับเทียบ</string> + <string name="spatial_capture_group">2. เก็บภาพมุมมองที่แตกต่าง</string> + <string name="spatial_board_stationary">ทำให้เป้าหมายการสอบเทียบอยู่กับที่</string> + <string name="spatial_capture_hint">เลื่อนแว่นตาอัจฉริยะเข้ามาใกล้ ไกลขึ้น และไปด้านข้าง หมุนไปทางซ้าย/ขวา เอียงขึ้น/ลง และเอียงไปด้านข้าง เก็บเป้าหมายการปรับเทียบไว้ในกล้องทั้งสองตัวและหยุดชั่วคราวก่อนจับภาพแต่ละครั้ง</string> + <string name="spatial_start">เริ่มการปรับเทียบใหม่</string> + <string name="spatial_wait_sync">กำลังรอการซิงโครไนซ์กล้อง</string> + <string name="spatial_start_hint">เริ่มการปรับเทียบใหม่เพื่อรวบรวมมุมมอง</string> + <string name="spatial_views_hint">ทำให้เป้าหมายการปรับเทียบมองเห็นได้ในหน้าตัวอย่างทั้งสอง ถ่ายภาพมุมที่คมชัดอย่างน้อย 24 ภาพจากมุมที่แตกต่างกัน</string> + <string name="spatial_capturing">กำลังจับภาพ...</string> + <string name="spatial_capture">บันทึกมุมมองเป้าหมายการปรับเทียบ</string> + <string name="spatial_alignment">คำนวณการจัดตำแหน่งกล้อง</string> + <string name="spatial_calculating">กำลังคำนวณ...</string> + <string name="spatial_calculate">คำนวณการปรับเทียบ</string> + <string name="spatial_distance_group">3. ตรวจสอบระยะทาง</string> + <string name="spatial_distance">ระยะทางที่วัดได้</string> + <string name="spatial_distance_hint">เริ่มต้นด้วย 12 นิ้วหรือ 30 ซม. เพื่อให้ตรวจจับมาร์กเกอร์ที่พิมพ์ได้ง่ายขึ้น เลือกการวัดที่แน่นอนที่คุณจะใช้</string> + <string name="spatial_camera_board_distance">ระยะจากกล้องด้านซ้ายถึงจุดกึ่งกลางของเป้าสอบเทียบ</string> + <string name="spatial_checking_distance">กำลังตรวจสอบระยะทาง...</string> + <string name="spatial_validate">ตรวจสอบระยะทาง</string> + <string name="spatial_diagnostics">การวินิจฉัย</string> + <string name="spatial_show_diagnostics">แสดงการวินิจฉัย</string> + <string name="spatial_diagnostics_hint">เครื่องมือกู้คืนเวลาและการติดตามของกล้อง</string> + <string name="spatial_camera_timing">จังหวะเวลาของกล้อง</string> + <string name="spatial_hand_input">อินพุตจากการติดตามมือ</string> + <string name="spatial_wait_timing">กำลังรอจังหวะการทำงานของกล้อง</string> + <string name="spatial_frames">ภาพจากกล้อง</string> + <string name="spatial_gpu">การตรวจจับ GPU ของมือ</string> + <string name="spatial_gpu_hint">CPU เป็นค่าเริ่มต้น GPU อยู่ระหว่างการทดลอง และอาจทำให้ SteamVR รีสตาร์ทได้ ตัวเลือกนี้จะรีเซ็ตเมื่อเริ่มการติดตามอีกครั้ง</string> + <string name="spatial_lite">ตรวจจับมือด้วยโมเดล Lite</string> + <string name="spatial_lite_hint">ใช้เครื่องตรวจจับฝ่ามือ Lite และจุดสำคัญ Lite บนมือ ตรวจสอบความแม่นยำในการเล็ง หยิก และคว้า รีเซ็ตเมื่อการติดตามเริ่มต้นใหม่</string> + <string name="spatial_adaptive">ปรับอัตราอินพุตการติดตามมืออัตโนมัติ</string> + <string name="spatial_adaptive_hint">ปรับอินพุตตามความเร็วในการประมวลผล รีเซ็ตเมื่อการติดตามเริ่มต้นใหม่</string> + <string name="spatial_half_rate">จำกัดอัตราอินพุตการติดตามมือ</string> + <string name="spatial_half_rate_hint">ใช้ภาพจากกล้องครึ่งหนึ่ง ปิดเพื่อเปรียบเทียบความถี่สูงสุด รีเซ็ตเมื่อการติดตามเริ่มต้นใหม่</string> + <string name="spatial_diagnostic_capture">การจับเพื่อการวินิจฉัย</string> + <string name="spatial_diagnostic_capture_hint">บันทึกคู่ภาพสเตอริโอหนึ่งคู่ในเครื่อง รูปภาพจะถูกบันทึกเมื่อมีการร้องขอเท่านั้น</string> + <string name="spatial_save_frame">บันทึกภาพจากกล้อง</string> + <string name="spatial_restart_tracking">เริ่มการติดตามอีกครั้ง</string> + <string name="spatial_restart_hint">ใช้หากการติดตามไม่ฟื้นตัวในพื้นที่ที่มีแสงสว่างเพียงพอ การรีสตาร์ทจำเป็นต้องมีจุดเริ่มต้นการติดตามใหม่</string> + <string name="spatial_restart">เริ่มต้นใหม่</string> + <string name="spatial_restart_title">เริ่มการติดตามใหม่หรือไม่?</string> + <string name="spatial_restart_confirm">มุมมองการปรับเทียบที่ไม่ได้บันทึกไว้จะหายไป โปรดรักษาแว่นตาอัจฉริยะให้นิ่งหลังจากนั้น และรีเซ็ตจุดศูนย์กลางการติดตามเมื่อการติดตามกลับมาใช้งานได้</string> + <string name="spatial_views_count">%1$d / มีการดู 24 ครั้ง</string> + <string name="spatial_capture_paused">การจับภาพหยุดชั่วคราว: %1$s</string> + <string name="spatial_measure_hint">วัด %1$s แสดงเป้าหมายการสอบเทียบที่สมบูรณ์ในหน้าตัวอย่างทั้งสอง จากนั้นให้นิ่งไว้</string> + <string name="spatial_timing_values">%1$.1f Hz • อายุภาพ %2$.1f ms • การประมวลผล %3$.1f ms</string> + <string name="spatial_input_values">ขีดจำกัดอินพุต %1$.1f Hz • %2$.0f%% ของภาพของกล้อง การติดตามศีรษะยังคงดำเนินต่อไปที่ความถี่สูงสุด</string> + <string name="spatial_frame_counts">%1$d ประมวลผลแล้ว • %2$d ลดลง • %3$d ข้ามตามขีดจำกัดอินพุต</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - การสอบเทียบ Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">พิมพ์ที่ 100% / ขนาดจริง แต่ละสี่เหลี่ยมจัตุรัส: 30 มม. (1.181 นิ้ว)</string> + <string name="spatial_print_stationary">รักษาเป้าหมายการสอบเทียบให้เรียบและอยู่กับที่ ย้ายแว่นตาอัจฉริยะระหว่างการจับภาพ</string> + <string name="spatial_print_check">การตรวจสอบสเกล: 100 มม. (3.937 นิ้ว) ระหว่างขีด</string> + <string name="spatial_distance_12in">12 นิ้ว (30.48 ซม.)</string> + <string name="spatial_distance_30cm">30 ซม. (11.81 นิ้ว)</string> + <string name="spatial_distance_20in">20 นิ้ว (50.8 ซม.)</string> + <string name="spatial_distance_50cm">50 ซม. (19.69 นิ้ว)</string> + <string name="spatial_disabled">ปิดการใช้งาน</string> + <string name="spatial_wait_stable">กำลังรอการติดตามที่เสถียร</string> + <string name="spatial_disconnected">ตัดการเชื่อมต่อ</string> + <string name="spatial_hands_off">ตัวควบคุมที่ทำงานด้วยมือเปล่าปิดอยู่</string> + <string name="spatial_tracking_off">การติดตามตำแหน่งปิดอยู่หรือแว่นตาอัจฉริยะถูกตัดการเชื่อมต่อ</string> + <string name="spatial_recenter_pending">ร้องขอการรีเซ็ตจุดศูนย์กลางการติดตาม — โปรดอยู่นิ่งในขณะที่การติดตามเสถียร</string> + <string name="spatial_tracking_lost">สูญเสียการติดตาม — หันหน้าไปทางบริเวณที่มีแสงสว่างเพียงพอพร้อมรายละเอียดที่มองเห็นได้</string> + <string name="spatial_origin_changed">จุดกำเนิดการติดตามเปลี่ยนไป — แตะรีเซ็ตจุดศูนย์กลางการติดตาม จากนั้นโปรดอยู่นิ่ง</string> + <string name="spatial_active">6DoF ใช้งานอยู่</string> + <string name="spatial_connect_hint">เชื่อมต่อ Luma Ultra และเปิดใช้งานการติดตามตำแหน่ง</string> + <string name="spatial_validation_session">การสอบเทียบได้รับการยืนยันสำหรับการเชื่อมต่อนี้</string> + <string name="spatial_validation_saved">ตรวจสอบและบันทึกการสอบเทียบแล้ว</string> + <string name="spatial_wait_cameras">กำลังรอกล้องสเตอริโอ</string> + <string name="spatial_wait_hands">รอการติดตามมือ</string> + <string name="spatial_collect_instructions">ทำให้เป้าหมายการปรับเทียบ 5 × 7 อยู่กับที่ จับภาพได้มากกว่า 24 มุมมองขณะเคลื่อนย้ายและหมุนแว่นตาอัจฉริยะ</string> + <string name="spatial_capture_pending">กำลังรอภาพจากกล้องถัดไป ถือแว่นตาอัจฉริยะให้นิ่ง</string> + <string name="spatial_validation_pending">ตรวจสอบภาพจากกล้องถัดไป ให้มองเห็นเป้าหมายการสอบเทียบแบบเต็มและค้างไว้นิ่งๆ</string> + <string name="spatial_start_first">เริ่มการปรับเทียบก่อน</string> + <string name="spatial_no_camera_frame">ไม่มีภาพจากกล้องใหม่มาถึง ตรวจสอบการเชื่อมต่อแว่นตาอัจฉริยะและตัวอย่างกล้อง จากนั้นลองอีกครั้ง</string> + <string name="spatial_clock_reset">รีเซ็ตนาฬิกาในกล้อง</string> + <string name="spatial_frame_changed">ระบบพิกัดการติดตามเปลี่ยนไป มุมมองของคุณจะถูกบันทึกไว้สำหรับการคำนวณใหม่ รีเซ็ตจุดศูนย์กลางการติดตาม จากนั้นเริ่มต้นชุดใหม่เพื่อจับภาพมุมมองเพิ่มเติม</string> + <string name="spatial_device_loaded">โหลดการปรับเทียบอุปกรณ์แล้ว</string> + <string name="spatial_base_loaded">โหลดการปรับเทียบฐาน Luma Ultra แล้ว</string> + <string name="spatial_calibration_needed">ต้องมีการสอบเทียบ</string> + <string name="spatial_tap_start">แตะเริ่มการปรับเทียบใหม่ก่อน</string> + <string name="spatial_capture_recenter_pending">การรีเซ็ตจุดศูนย์กลางการติดตามกำลังรอการติดตามที่เสถียร โปรดอยู่นิ่งสักครู่</string> + <string name="spatial_capture_recenter">การติดตามเปลี่ยนไป แตะรีเซ็ตจุดศูนย์กลางการติดตามหนึ่งครั้ง จากนั้นโปรดอยู่นิ่งก่อนจับภาพ</string> + <string name="spatial_capture_unsynchronized">การจับภาพถูกปฏิเสธ: การติดตามศีรษะไม่ซิงโครไนซ์ หรือมีการเปลี่ยนแปลงระหว่างการจับภาพ อยู่นิ่ง ๆ แล้วลองอีกครั้ง</string> + <string name="spatial_align_first">คำนวณการจัดตำแหน่งกล้องก่อนตรวจสอบระยะห่าง</string> + <string name="spatial_processing_failed">การประมวลผลกล้องล้มเหลว</string> + <string name="spatial_hand_head_changed">การติดตามศีรษะเปลี่ยนไประหว่างการตรวจจับมือ</string> + <string name="spatial_hand_wait_sync">กำลังรอการซิงโครไนซ์กล้องและศีรษะ</string> + <string name="spatial_no_wrists">ตรวจไม่พบข้อมือ วางที่จับคอนโทรลเลอร์ Joy-Con ไว้ด้านหน้าแว่นตาอัจฉริยะ</string> + <string name="spatial_no_hands">ตรวจไม่พบมือ แสดงฝ่ามือที่เปิดอยู่ด้านหน้าแว่นตาอัจฉริยะ</string> + <string name="spatial_one_camera_wrists">ข้อมือมองเห็นได้ในกล้องเพียงตัวเดียว ให้ที่จับคอนโทรลเลอร์ของคุณอยู่ในมุมมองที่ใช้ร่วมกัน</string> + <string name="spatial_one_camera_hands">มือมองเห็นได้ในกล้องเพียงตัวเดียว เก็บฝ่ามือทั้งสองไว้ในมุมมองที่ใช้ร่วมกัน</string> + <string name="spatial_ambiguous_hands">กล้องทั้งสองมองเห็นมือ แต่การจับคู่ซ้าย/ขวาไม่ชัดเจน</string> + <string name="spatial_inconsistent_depth">ตรวจพบมือ แต่ความลึกของสเตอริโอไม่สอดคล้องกัน</string> + <string name="spatial_rejected_wrist">ตำแหน่งข้อมือถูกปฏิเสธโดยการตรวจสอบสเตอริโอหรือการเคลื่อนไหว</string> + <string name="spatial_inconsistent_palm">ตรวจพบจุดสเตอริโอ แต่รูปทรงของฝ่ามือไม่สอดคล้องกัน</string> + <string name="spatial_hands_need_calibration">ทำการสอบเทียบและตรวจสอบระยะทางให้เสร็จสิ้นเพื่อเปิดใช้การติดตามมือ</string> + <string name="spatial_hands_wait_stable">กำลังรอการติดตามศีรษะที่เสถียร รีเซ็ตจุดศูนย์กลางการติดตามหากมีการร้องขอ</string> + <string name="spatial_old_frame">การสังเกตด้วยกล้องเก่าเกินไป รอคู่ใหม่ครับ</string> + <string name="spatial_fit_ready">พอดี %1$.2f พิกเซล วัดระยะทางที่คุณเลือกจากกล้องด้านซ้ายไปยังศูนย์กลางเป้าหมายการสอบเทียบ จากนั้นตรวจสอบ</string> + <string name="spatial_opencv_error">OpenCV ไม่พร้อมใช้งาน: %1$s</string> + <string name="spatial_captured">ถ่ายแล้ว %1$d / 24 ครั้ง รักษาเป้าหมายการสอบเทียบให้คงที่ เลื่อนแว่นตาอัจฉริยะเพื่อดูมุมมองถัดไป</string> + <string name="spatial_capture_corners">การจับภาพถูกปฏิเสธ: %1$d / 12 มุมที่ต้องมองเห็นได้ในกล้องทั้งสองตัว แสดงเป้าหมายการสอบเทียบเพิ่มเติม ให้ค้างไว้แล้วลองอีกครั้ง</string> + <string name="spatial_validation_error">การตรวจสอบระยะทางไม่เสร็จสิ้น: %1$s ลองอีกครั้ง</string> + <string name="spatial_inference_error">การตรวจจับมือไม่พร้อมใช้งาน: %1$s เปลี่ยน CPU/GPU หรือตัวควบคุมสลับที่ทำงานด้วยมือเปล่าเพื่อลองอีกครั้ง</string> + <string name="spatial_hand_timeout">การตรวจจับมือเกิน %1$d ms; การสังเกตถูกยกเลิก</string> + <string name="spatial_wrists_tracked">%1$d / 2 ตำแหน่งข้อมือ Joy-Con วัดด้วยระบบสเตอริโอ</string> + <string name="spatial_palms_tracked">ฝ่ามือที่ติดตาม: %1$d / 2; พร้อมใช้ท่าจีบนิ้ว: %2$d; พร้อมใช้ท่ากำมือ: %3$d</string> + <string name="spatial_capture_saved">บันทึกการจับเพื่อวินิจฉัยไปที่ %1$s</string> + <string name="spatial_hand_error">การติดตามมือหยุดลง: %1$s</string> + <string name="spatial_stereo_loaded">สเตอริโอ %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">การติดตามศีรษะและเป้าหมายการปรับเทียบไม่ตรงกันภายใน %1$s (จำกัด 5 ซม. / 2 นิ้ว) รักษาเป้าหมายการสอบเทียบให้คงที่และรอการติดตามอย่างคงที่ก่อนที่จะเริ่มชุดใหม่ หมุนและเอียงแว่นตาอัจฉริยะเบาๆ หยุดชั่วคราวก่อนการถ่ายภาพแต่ละครั้ง</string> + <string name="spatial_need_views">จับภาพมุมมองที่แตกต่างกันอย่างน้อย 24 มุมมองของเป้าหมายการสอบเทียบที่อยู่นิ่ง</string> + <string name="spatial_need_rotation">หมุนแว่นตาอัจฉริยะไปทางซ้ายและขวา แล้วเอียงขึ้นและลง การเคลื่อนไหวโดยไม่มีการหมุนไม่สามารถปรับเทียบการจัดตำแหน่งกล้องได้</string> + <string name="spatial_bad_baseline">พื้นฐานกล้องที่ไม่น่าเชื่อ</string> + <string name="spatial_need_orientations">ขยับศีรษะไปตามทิศทางที่หลากหลายมากขึ้น</string> + <string name="spatial_bad_rotation">การหมุนกล้องต่อศีรษะไม่ถูกต้อง</string> + <string name="spatial_bad_alignment">การจัดตำแหน่งกล้องกับศีรษะไม่สอดคล้องกัน</string> + <string name="spatial_calibration_error">การปรับเทียบไม่สามารถเสร็จสิ้นได้ %1$s มุมมองที่บันทึกไว้ของคุณจะถูกบันทึกไว้</string> + <string name="spatial_reprojection_error">ข้อผิดพลาดในการฉายซ้ำที่จัดขึ้น %1$.2f px เกิน 2 px ปรับเทียบใหม่</string> + <string name="spatial_distance_corners">%1$d / ตรวจพบมุมกระดานหมากรุก 24 มุมในกล้องทั้งสองตัว ให้มองเห็นเป้าหมายการสอบเทียบแบบเต็มและค้างไว้นิ่งๆ หากมองเห็นได้อยู่แล้ว ให้เลือก 12 นิ้วหรือ 30 ซม. แล้ววัดระยะห่างที่ใกล้กว่านั้นก่อนลองอีกครั้ง</string> + <string name="spatial_distance_depth">สามารถมองเห็นเป้าหมายการปรับเทียบได้ แต่ไม่สามารถวัดความลึกได้อย่างน่าเชื่อถือ จับแว่นตาอัจฉริยะให้นิ่ง และรักษาเป้าหมายการปรับเทียบให้เรียบและมีแสงสว่างเพียงพอ จากนั้นลองอีกครั้ง</string> + <string name="spatial_distance_invalid">การวัดของกล้องไม่ถูกต้อง ให้นิ่งไว้แล้วลองอีกครั้ง</string> + <string name="spatial_distance_passed">ผ่านการตรวจสอบระยะทางแล้ว</string> + <string name="spatial_distance_retry">ตรวจสอบระยะห่างจากกล้องด้านซ้ายไปยังศูนย์กลางเป้าหมายการสอบเทียบอีกครั้ง จากนั้นลองอีกครั้ง</string> + <string name="spatial_distance_result">กล้องวัดได้ %1$s; ระยะทางที่เลือก %2$s %3$s</string> + <string name="spatial_wait_previews">รอให้แสดงตัวอย่างกล้องทั้งสองตัวก่อนเริ่มการปรับเทียบ</string> + <string name="spatial_saved_views_hint">มุมมองที่บันทึกไว้สามารถคำนวณใหม่ได้ เริ่มการสอบเทียบใหม่เพื่อบันทึกในระบบพิกัดการติดตามปัจจุบัน</string> + <string name="spatial_model_checksum_error">ผลรวมตรวจสอบแบบจำลองมือไม่ตรงกัน</string> + <string name="spatial_opencv_load_error">OpenCV ไม่สามารถโหลดได้</string> + <string name="spatial_restored">กู้คืนมุมมองที่บันทึกไว้แล้ว %1$d รายการ คำนวณการสอบเทียบเพื่อลองอีกครั้ง หรือเริ่มชุดใหม่เพื่อบันทึกข้อมูลเพิ่มเติม</string> +</resources> diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml new file mode 100644 index 0000000000..3322f1c92a --- /dev/null +++ b/app/src/main/res/values-tr/strings.xml @@ -0,0 +1,2887 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">SteamVR grafikleri durdu</string> + <string name="steamvr_recovery_countdown">DroidDeck, grafikleri sıfırlamak ve SteamVR\'ı yeniden açmak için %1$d saniye içinde yeniden başlayacak. Çalışan oyununuz kapanacak; kaydedilmemiş ilerleme geri yüklenemez.</string> + <string name="steamvr_recovery_repeated">Grafik hatası, kısa süre önceki yeniden başlatmanın ardından yine oluştu. Döngüye girmemek için otomatik kurtarma duraklatıldı. Yeniden başlatma oyununuzu kapatır; kaydedilmemiş ilerleme geri yüklenemez.</string> + <string name="steamvr_recovery_restart">Şimdi yeniden başlat</string> + <string name="steamvr_recovery_cancel">Açık kalsın</string> + <string name="steamvr_recovery_restarting">Grafikler sıfırlanıyor ve SteamVR yeniden açılıyor…</string> + <string name="steamvr_recovery_failed">DroidDeck otomatik olarak yeniden başlatılamadı. Uygulamayı tamamen kapatıp yeniden açın.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>İlk çalıştırmada Steam indirilir. Bu işlem birkaç dakika sürebilir.</item> + <item>Varsayılan olarak uygulamadan çıkınca Steam duraklatılır; geri döndüğünüzde kaldığı yerden devam eder.</item> + <item>Kumandanız Xbox 360 kumandası olarak görünür. Kumanda yoksa ekran üstü kontrolleri kullanın.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>İlk çalıştırmada masaüstü kurulur. Bu işlem birkaç dakika sürebilir.</item> + <item>Varsayılan olarak uygulamadan çıkınca oturum duraklatılır; geri döndüğünüzde kaldığı yerden devam eder.</item> + <item>Dokunma, dokunmatik yüzey gibi çalışır: işaretçiyi taşımak için sürükleyin, tıklamak için dokunun.</item> + <item>Kumandanız Xbox 360 kumandası olarak görünür. Kumanda yoksa ekran üstü kontrolleri kullanın.</item> + </string-array> + <string name="session_channel">Oturum</string> + <string name="session_channel_description">Steam veya masaüstü oturumu açıkken gösterilir</string> + <string name="session_notification">Steam çalışıyor</string> + <string name="session_notification_downloads">Steam indirmesi sürüyor</string> + <string name="session_notification_paused">Oturum duraklatıldı - hazır olduğunuzda Devam et\'e dokunun</string> + <string name="resume_session">Devam et</string> + <string name="suspend_now">Şimdi askıya al</string> + <string name="stop_session">Oturumu durdur</string> + <string name="frame_gen_title">Kare oluşturma</string> + <string name="frame_gen_hint">Kare oluşturma modunu seçin</string> + <string name="frame_gen_off">Kapalı</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG Uyarlanabilir %1$d</string> + <string name="lsfg_needs_steam">Steam\'de Lossless Scaling gerekli</string> + <string name="lsfg_needs_install">Lossless Scaling\'i Steam\'den yükleyin veya Lossless.dll dosyasını içe aktarın</string> + <string name="lsfg_import">Lossless.dll içe aktar…</string> + <string name="lsfg_using_steam">Steam\'deki kopya kullanılıyor</string> + <string name="lsfg_using_import">İçe aktarılan kopya kullanılıyor</string> + <string name="lsfg_pick_title">Lossless.dll seçin</string> + <string name="lsfg_imported">Lossless.dll içe aktarıldı</string> + <string name="lsfg_import_unchanged">Bu Lossless.dll zaten kullanılıyor</string> + <string name="lsfg_import_not_owned">Bu Steam hesabı Lossless Scaling\'e sahip değil</string> + <string name="lsfg_import_invalid">Bu dosya Lossless Scaling\'in Lossless.dll dosyası değil</string> + <string name="lsfg_import_failed">Bu Lossless.dll ile LSFG hazırlanamadı</string> + <string name="lsfg_problem_missing">LSFG için Steam\'den Lossless Scaling veya içe aktarılmış bir Lossless.dll gerekir</string> + <string name="lsfg_problem_failed">LSFG, gölgelendiricilerini Lossless.dll dosyasından hazırlayamadı</string> + <string name="hud_fg_unsupported">%1$s: desteklenmiyor</string> + <string name="hud_fg_failed">%1$s: motor hatası</string> + <string name="hud_fg_needs_lossless">%1$s: Lossless Scaling gerekli</string> + <string name="hud_fg_starting">%1$s %2$s · başlatılıyor</string> + <string name="second_library_import_hint">Bir Steam kütüphanesi ekler ve Windows oyunları için tarar. Sahip olduğunuz oyunlar Steam kayıtlarını kullanır; geri kalanlar Steam dışı kısayollar olur.</string> + <string name="game_env_title">Oyun ortamı</string> + <string name="game_env_hint">Proton oyunları için ortam değişkenleri.</string> + <string name="game_env_edit">Düzenle</string> + <string name="game_env_shared">Tüm Proton oyunları</string> + <string name="game_env_scope">Profil</string> + <string name="game_env_app_id">Steam uygulama kimliği</string> + <string name="game_env_open">Aç</string> + <string name="game_env_profile">Oyun %1$s</string> + <string name="game_env_add">Değişken ekle</string> + <string name="game_env_name">Değişken adı</string> + <string name="game_env_value">Değer</string> + <string name="game_env_save">Kaydet</string> + <string name="game_env_remove">Kaldır</string> + <string name="game_env_restore">Yeniden devral</string> + <string name="game_env_reset">Ortam geçersiz kılmalarını temizle</string> + <string name="game_env_unset">Bu profilde tanımsız bırak</string> + <string name="game_env_empty">Ayarlanmış değişken yok.</string> + <string name="game_env_inherited">Devralındı</string> + <string name="game_env_custom">Özel değişken</string> + <string name="game_env_error">Yüklenemedi veya kaydedilemedi. Boş depolama alanını kontrol edip tekrar deneyin.</string> + <string name="game_env_invalid">Geçerli bir ad ve en fazla 8192 karakterlik bir değer kullanın.</string> + <string name="game_env_unused">Standart Proton çalışma zamanı bu değişkeni okumaz.</string> + <string name="game_env_loading">Yükleniyor…</string> + <string name="game_env_feature">D3D12 özellik düzeyi geçersiz kılma. 12_2, DirectX 12 Ultimate özelliklerini bildirir; desteklenmeyen özellikler hata verebilir. Otomatik algılama için boş bırakın.</string> + <string name="game_env_shader">D3D12 gölgelendirici modeli geçersiz kılma. 6_9 için yeterince yeni bir VKD3D ve uygun GPU özellikleri gerekir. Otomatik algılama için boş bırakın.</string> + <string name="game_env_cache">Tekrarlanan derlemeyi azaltmak için Mesa gölgelendirici önbelleğini açık tutun. false önbelleği etkinleştirir.</string> + <string name="game_env_cache_size">Azami Mesa gölgelendirici önbelleği boyutu, ör. 1G. Daha büyük önbellekler daha fazla depolama alanı kullanır.</string> + <string name="game_env_vkd3d_config">D3D12 için VKD3D seçenekleri. nodxr ışın izlemeyi kapatır; yalnızca buna ihtiyaç duyan bir oyunda kullanın.</string> + <string name="game_env_proton_log">Proton tanılama günlüğü için 1 olarak ayarlayın. Günlük kaydı performansı düşürebilir ve depolama alanı kullanır.</string> + <string name="game_env_wined3d">D3D9–11 uyumluluk testi için DXVK yerine OpenGL tabanlı WineD3D kullanmak üzere 1 olarak ayarlayın.</string> + <string name="game_env_no_ntsync">Bu oyunda ntsync\'i (droiddeck-ntsync veya çekirdek sürücüsü) kapatmak için 1 olarak ayarlayın; paket varsa droiddeck-esync, yoksa droiddeck-fsync kullanılır.</string> + <string name="game_env_no_esync">Bu oyunda droiddeck-esync\'i kapatmak için 1 olarak ayarlayın; yerine droiddeck-fsync, fsync de kapalıysa droiddeck-ntsync kullanılır.</string> + <string name="game_env_no_fsync">Bu oyunda droiddeck-fsync\'i kapatmak için 1 olarak ayarlayın; paket varsa droiddeck-esync, yoksa droiddeck-ntsync kullanılır.</string> + <string name="game_env_fsync_first">Bu oyunu droiddeck-fsync ile çalıştırmak için 1, Proton sürümüne uyan bir paket varsa droiddeck-esync\'i öne almak için 0 olarak ayarlayın.</string> + <string name="game_env_xalia">Bu oyunda Proton’un kumandayla gezinme yardımcısını kapatmak için 0 olarak ayarlayın.</string> + <string name="game_env_hud">D3D9–11 için DXVK katmanı. fps kare hızını gösterir; boş bırakılırsa gizlenir.</string> + <string name="game_env_dxvk_config">Noktalı virgülle ayrılmış DXVK ayarları. Yeni sürümler kare sınırlama için dxvk.maxFrameRate kullanır; normal oyun için oturumun kare sınırlayıcısını tercih edin.</string> + <string name="game_env_vkd3d_limit">D3D12 kare hızı sınırı. 0 sınırı kaldırır.</string> + <string name="game_env_glthread">Mesa OpenGL iş parçacığı kullanımı. true, CPU sınırlı OpenGL oyunlarına yardımcı olabilir; her oyunda ayrı deneyin.</string> + <string name="sync_backend_title">Wine senkronizasyonu</string> + <string name="sync_backend_hint">Oyunların iş parçacıklarını nasıl eşzamanladığı. Sonraki oturumda uygulanır.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">FEX ön ayarı</string> + <string name="fex_next_launch">Oyun bir sonraki başlatıldığında uygulanır.</string> + <string name="game_settings_title">Oyunlar</string> + <string name="fex_default_label">FEX varsayılanları</string> + <string name="fex_default_detail">FEX varsayılanlarını kullanır.</string> + <string name="fex_stability_label">Kararlılık</string> + <string name="fex_stability_detail">En güvenli, en yavaş ayarlar.</string> + <string name="fex_compatibility_label">Uyumluluk</string> + <string name="fex_compatibility_detail">Multiblock ile tam TSO.</string> + <string name="fex_intermediate_label">Orta</string> + <string name="fex_intermediate_detail">Düşürülmüş x87 hassasiyetiyle dengeli TSO.</string> + <string name="fex_performance_label">Performans</string> + <string name="fex_performance_detail">Tüm TSO kapalı; multiblock.</string> + <string name="fex_performance_tso_label">Performans + TSO</string> + <string name="fex_performance_tso_detail">Ana TSO açık Performans ayarları.</string> + <string name="fex_extreme_label">Ekstrem</string> + <string name="fex_extreme_detail">Kendini değiştiren kod denetimlerini kapatır. JIT kullanan oyunlar ve DRM bozulabilir.</string> + <string name="fex_extreme_tso_label">Ekstrem + TSO</string> + <string name="fex_extreme_tso_detail">Ana TSO açık Ekstrem ayarları.</string> + <string name="fex_extreme_gn_label">Ekstrem-gn</string> + <string name="fex_extreme_gn_detail">TSC ve meta veri ipuçlarıyla Performans. Ekstrem\'den önce deneyin.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Tam kod denetimleri ve gizlenmiş hipervizör bitiyle Performans.</string> + <string name="game_env_custom_value">Özel değer</string> + <string name="game_env_select_value">Değer seçin</string> + <string name="user_apps_section">Emülatörler ve uygulamalar</string> + <string name="user_apps_add">Ekle</string> + <string name="user_apps_add_detail">Kendi uygulamanız veya oyununuz</string> + <string name="user_apps_kind_script">Betik</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %%%3$d</string> + <string name="user_apps_starting">Başlatılıyor…</string> + <string name="user_apps_added">%1$s eklendi</string> + <string name="user_apps_removed">%1$s kaldırıldı</string> + <string name="user_apps_back">Masaüstü</string> + <string name="user_apps_gone">Bu uygulama artık yok. Masaüstünden yeniden seçin.</string> + <string name="user_apps_open">%1$s uygulamasını aç</string> + <string name="user_apps_remove">Kaldır</string> + <string name="user_apps_remove_confirm">Kaldırmak için tekrar basın</string> + <string name="user_apps_stop_session">Kaldırmak için oturumu durdurun</string> + <string name="user_apps_script_linked">%1$s kendi klasöründen çalışır; klasör bulunduğu yerden oturuma bağlanır. Uygulamayı kaldırmak o klasöre dokunmaz.</string> + <string name="user_apps_script_copied">%1$s, klasörünün DroidDeck içindeki bir kopyasından çalışır. Uygulamayı kaldırmak orijinali değil, kopyayı siler.</string> + <string name="user_apps_runtime_required">Önce Linux çalışma zamanını yükleyin</string> + <string name="user_apps_file_gone">Dosya artık yok</string> + <string name="user_apps_no_space">Yeterli boş alan yok: klasörü kopyalamak için %1$s gerekli</string> + <string name="user_apps_copying">%1$s kopyalanıyor</string> + <string name="user_apps_failed">Uygulama eklenemedi</string> + <string name="user_apps_github_checking">%1$s için sürüm aranıyor</string> + <string name="user_apps_github_unreachable">%1$s sürümleri okunamadı</string> + <string name="user_apps_github_no_appimage">%1$s sürümlerinin hiçbirinde ARM64 veya x86_64 AppImage yok</string> + <string name="user_apps_downloading">%1$s indiriliyor</string> + <string name="user_apps_download_failed">İndirme başarısız oldu</string> + <string name="user_apps_update_failed">Uygulama güncellenemedi</string> + <string name="user_apps_icon_failed">Bu simge okunamadı</string> + <string name="user_apps_saved">%1$s kaydedildi</string> + <string name="user_apps_edit">Düzenle</string> + <string name="user_apps_check_updates">Güncellemeleri kontrol et</string> + <string name="user_apps_checking_updates">Güncellemeler kontrol ediliyor…</string> + <string name="user_apps_update_to">%1$s sürümüne güncelle</string> + <string name="user_apps_up_to_date">Güncel · %1$s</string> + <string name="user_apps_updated">%1$s güncellendi</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Uygulama ekle</string> + <string name="add_app_tab_script">Betik</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Bir .sh dosyası. Kendi klasöründen, gamescope altında tam ekran çalışır.</string> + <string name="add_app_appimage_hint">ARM64 (aarch64) bir AppImage ya da FEX ile çalışan x86_64 bir AppImage. Linux çalışma zamanına bir kez çıkarılır.</string> + <string name="add_app_github_hint">Deponun en yeni sürümündeki ARM64 AppImage dosyasını ya da FEX ile çalışacak x86_64 dosyasını yükler.</string> + <string name="app_fex_title">FEX kullan</string> + <string name="app_fex_auto">Otomatik</string> + <string name="app_fex_on">Açık</string> + <string name="app_fex_off">Kapalı</string> + <string name="app_fex_hint">FEX, x86 Linux programlarını bu ARM64 cihazda çalıştırır. Otomatik, program x86 için derlenmişse FEX\'i kullanır.</string> + <string name="app_fex_x86">FEX ile %1$s</string> + <string name="app_fex_not_ready">Bu program %1$s PC\'ler için derlenmiş ve FEX ile çalışır, ancak FEX henüz kurulmadı. Oturum açmışken Steam\'i bir kez açın: DroidDeck, FEX\'i ve gereken Steam Linux Runtime\'ı indirtir, ardından bu program açılır.</string> + <string name="session_end_program">Bu program</string> + <string name="session_end_fex_missing">%1$s x86 PC\'ler için derlenmiş ve FEX ile çalışır, ancak FEX henüz yüklü değil. Oturum açmışken Steam\'i bir kez başlatıp FEX\'i ve Steam Linux Runtime\'ı indirmesini bekleyin, ardından bunu yeniden başlatın.</string> + <string name="add_app_flatpak_hint">Bir Flathub uygulama kimliği veya Flathub sayfası. Flatpak henüz kurulu değilse önce o kurulur.</string> + <string name="add_app_file">Dosya</string> + <string name="add_app_no_file">Dosya seçilmedi</string> + <string name="add_app_choose_file">Dosya seç</string> + <string name="add_app_change_file">Değiştir</string> + <string name="add_app_pick_script">Bir betik seçin</string> + <string name="add_app_pick_appimage">Bir AppImage seçin</string> + <string name="add_app_pick_icon">Bir simge seçin</string> + <string name="add_app_repository">Depo</string> + <string name="add_app_repository_placeholder">sahip/depo veya github.com bağlantısı</string> + <string name="add_app_repository_invalid">GitHub deposu değil</string> + <string name="add_app_flatpak_id">Uygulama kimliği</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Flathub uygulama kimliği değil</string> + <string name="add_app_flatpak_bundle_hint">Ya da Flathub\'da olmayan bir uygulama için .flatpak dosyası.</string> + <string name="add_app_pick_flatpak">Bir .flatpak dosyası seçin</string> + <string name="add_app_source">Kaynak</string> + <string name="add_app_appearance">Masaüstünüzde</string> + <string name="add_app_preview_name">Yeni uygulama</string> + <string name="add_app_name">Ad</string> + <string name="add_app_name_placeholder">Uygulamadan</string> + <string name="add_app_icon">Simge</string> + <string name="add_app_icon_default">Varsayılan simge</string> + <string name="add_app_choose_icon">Simge seç</string> + <string name="add_app_clear_icon">Temizle</string> + <string name="add_app_icon_suggestions">Depodan</string> + <string name="add_app_icon_searching">Simgeler aranıyor…</string> + <string name="add_app_icon_reset">Varsayılan</string> + <string name="edit_app_title">Düzenle: %1$s</string> + <string name="edit_app_save">Kaydet</string> + <string name="add_app_checking_folder">Klasör kontrol ediliyor…</string> + <string name="add_app_folder_linked">Klasörü oturuma bağlanır: %1$s</string> + <string name="add_app_folder_copied">Klasöründe paylaşılan depolamanın çalıştıramadığı Linux programları var, bu yüzden DroidDeck içine kopyalanır (%1$s).</string> + <string name="add_app_confirm">Ekle</string> + <string name="add_app_cancel">İptal</string> + <string name="add_app_runtime_required">Önce Kurulum sayfasından Linux çalışma zamanını yükleyin.</string> + <string name="add_app_busy">%1$s bitene kadar bekleyin.</string> + <string name="steam_compat_label">Uyumlu</string> + <string name="proton_compatible_note">Steam’in Uyumluluk menüsünde “%1$s” ile işaretli sürümler DroidDeck’in önek düzeltmelerini içerir ve oyunları burada başlatır. Varsayılan Proton Experimental ARM64’tür (%1$s); daha yeni Proton 11.0 ARM64 (%1$s) yüklüyse o kullanılır. Valve’ın bu işareti taşımayan kendi Proton girdileri bu cihazda oyun başlatamaz.</string> + <string name="proton_installed_compatible">Yüklü: %1$s · %2$s</string> + <string name="common_cancel">İptal</string> + <string name="common_auto">Otomatik</string> + <string name="common_never">Asla</string> + <string name="common_always">Her zaman</string> + <string name="common_uninstall">Yüklemeyi kaldır</string> + <string name="common_check">Kontrol et</string> + <string name="common_update">Güncelle</string> + <string name="common_checking">Kontrol ediliyor…</string> + <string name="common_working">İşleniyor…</string> + <string name="common_forget">Unut</string> + <string name="common_add_ellipsis">Ekle…</string> + <string name="common_use">Kullan</string> + <string name="common_applies_next_session">Sonraki oturumda uygulanır.</string> + <string name="mode_steam_title">Steam oturumu</string> + <string name="mode_desktop_title">Masaüstü oturumu</string> + <string name="mode_display">Ekran</string> + <string name="mode_resolution">Çözünürlük</string> + <string name="mode_res_720">En fazla 720p</string> + <string name="mode_res_900">En fazla 900p</string> + <string name="mode_res_1080">En fazla 1080p</string> + <string name="mode_res_native">Yerel</string> + <string name="mode_res_default">%1$s (varsayılan)</string> + <string name="mode_res_custom_value">Özel · %1$d×%2$d</string> + <string name="mode_res_custom">Özel…</string> + <string name="mode_res_note">720p, menülerin daha hızlı tepki vermesini sağlayabilir.</string> + <string name="mode_ratio">Ekran oranı</string> + <string name="mode_ratio_custom">Özel çözünürlüğe göre ayarlanır.</string> + <string name="mode_ratio_auto">Otomatik en az 16:9 kullanır.</string> + <string name="mode_fps">Kare sınırı</string> + <string name="mode_fps_note">Tüm oturumu sınırlar. Ekran, sınırın tam katı olan bir yenileme hızına geçer.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">HDR10 çıkışı</string> + <string name="mode_hdr_unavailable">Kullanılamıyor: %1$s.</string> + <string name="mode_hdr_restart">Uygulamak için uygulamayı yeniden başlatın.</string> + <string name="mode_drivers">Sürücüler</string> + <string name="mode_gpu_drivers">GPU sürücüleri</string> + <string name="mode_gpu_drivers_hint">Steam ve Masaüstü tarafından paylaşılır. Bileşenler sayfasından ayarlanır.</string> + <string name="mode_touch_controls">Dokunma ve kontroller</string> + <string name="mode_touch">Dokunma</string> + <string name="mode_touch_touchpad">Dokunmatik yüzey</string> + <string name="mode_touch_direct">Doğrudan</string> + <string name="mode_touch_note">Otomatik: Masaüstünde dokunmatik yüzey, Steam\'de doğrudan.</string> + <string name="mode_osc">Ekran üstü kontroller</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Otomatik, kumanda bağlı değilken kontrolleri gösterir.</string> + <string name="osc_steam_touch">Steam dokunmatik (beta)</string> + <string name="osc_style_next_session">Steam\'in dokunmatik kontrolleri sonraki Steam oturumunda başlar</string> + <string name="osc_steam_layout">Steam dokunmatik düzeni</string> + <string name="osc_steam_layout_hint">Bu oyunun dokunmatik kontrollerini taşıyın, boyutlandırın veya gizleyin; Steam\'e kaydedilir</string> + <string name="mode_controller">Kumanda</string> + <string name="mode_controller_hint">Steam\'in kumandanızı nasıl gördüğü. Sonraki oturumda uygulanır.</string> + <string name="mode_controller_deck">Steam Deck kumandası</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Xbox 360 kumandası</string> + <string name="mode_controller_note">Deck: Hızlı Erişim düğmesi ve jiroskop. Steam Controller: aynısı, ayrıca arka düğmelerde kavrama algılama. DualShock 4 ve DualSense: jiroskop; dokunmatik yüzeyler kumandanın dokunmatik paneli olur. Xbox 360: Hızlı Erişim\'i Guide+A ile açın.</string> + <string name="mode_back">Geri</string> + <string name="back_menu_then_qam">Menü → QAM</string> + <string name="back_qam_then_menu">QAM → Menü</string> + <string name="mode_session">Oturum</string> + <string name="mode_suspend">Arka plan davranışı</string> + <string name="mode_suspend_hint">Uygulama gizlendiğinde veya ekran kapandığında.</string> + <string name="mode_suspend_manual">Manuel</string> + <string name="mode_suspend_native">Yerel</string> + <string name="mode_suspend_steam_note">Otomatik: duraklatır, gösterilince devam eder. Yerel: önce Steam\'i uykuya hazırlar. Manuel: Devam et\'i bekler. Asla: çalışmaya devam eder.</string> + <string name="mode_background_downloads">İndirmeleri sürdür</string> + <string name="mode_background_downloads_hint">Steam etkin olarak indirme yaparken arka planda askıya almayı erteler.</string> + <string name="mode_suspend_note">Otomatik: arka planda duraklatır, gösterilince devam eder. Manuel: Devam et\'i bekler. Asla: çalışmaya devam eder.</string> + <string name="mode_startup">Başlangıç</string> + <string name="mode_steam_startup">Steam\'i DroidDeck ile başlat</string> + <string name="mode_steam_startup_hint">DroidDeck açıldığında Steam oturumunu açar.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Sürümler kontrol ediliyor…</string> + <string name="mode_decky_ready">%1$s yüklenmeye hazır.</string> + <string name="mode_decky_none">Uyumlu derleme bulunamadı. Daha sonra tekrar deneyin.</string> + <string name="mode_decky_installed">Yüklü · %1$s</string> + <string name="mode_decky_update">Güncelleme var · %1$s</string> + <string name="mode_decky_current">Güncel · %1$s</string> + <string name="mode_decky_loader">Yükleyici</string> + <string name="mode_decky_install_latest">En yenisini yükle</string> + <string name="mode_decky_on">Steam ile başlar. Açıkken bu cihazdaki diğer uygulamalar Steam\'i kontrol edebilir.</string> + <string name="mode_decky_off">Kapalı. Steam\'in uzaktan hata ayıklama bağlantı noktası kapalı kalır.</string> + <string name="mode_decky_remove_title">Decky Loader kaldırılsın mı?</string> + <string name="mode_decky_remove_text">Yükleyiciyi kaldırır. Eklentileriniz ve ayarlarınız korunur.</string> + <string name="mode_client">İstemci</string> + <string name="mode_mangoapp">Performans katmanı</string> + <string name="mode_mangoapp_hint">Oyunlar Deck modunda çökerse veya ekran kararırsa kapatın. Sonraki oturumda uygulanır.</string> + <string name="mode_steam_repair">Steam istemcisini onar</string> + <string name="mode_steam_repair_hint">Steam bir sonraki başlatıldığında Steam istemcisini yeniden indirir. Steam yükleme ekranında takılı kalırsa kullanın. Oyunlar, oturum bilgileri ve ayarlar korunur.</string> + <string name="mode_steam_repair_queued">Steam istemcisi, Steam bir sonraki başlatıldığında yeniden indirilecek.</string> + <string name="mode_steam_repair_button">Onar</string> + <string name="mode_added_art">Görseller</string> + <string name="mode_sgdb_key">SteamGridDB API anahtarı</string> + <string name="mode_sgdb_key_yours">Kendi anahtarınız</string> + <string name="mode_sgdb_edit">Düzenle…</string> + <string name="mode_added_art_hint">Eksik görselleri önce Steam\'den, sonra SteamGridDB\'den tamamlar. Oyun klasöründeki kendi cover.jpg, hero.jpg, logo.png veya icon.png dosyalarınız önceliklidir.</string> + <string name="summary_remove_game">Kaldır: %1$s</string> + <string name="mode_added_remove_confirm">Kaldırılsın mı?</string> + <string name="games_add">Oyun ekle</string> + <string name="games_add_title">Oyun ekle:</string> + <string name="games_pick_exe_title">Exe dosyasını seçin:</string> + <string name="games_add_unreachable">Bu konum oturumda kullanılamıyor</string> + <string name="mode_added_exe_check">Bu exe dosyasını kontrol et</string> + <string name="wincomp_title">Windows bileşenleri</string> + <string name="wincomp_pad_hint">LB / RB ile bölümler arasında geçin.</string> + <string name="wincomp_card_none">Yok</string> + <string name="wincomp_applies">Proton\'un içermediği Windows DLL\'leri, bileşen listesinden. Bu oyunun ihtiyaç duyduklarını açın: oyunun dosyalarına değil, kendi Windows klasörüne yüklenir ve oyun hangi Proton ile çalışırsa çalışsın yerinde kalır.</string> + <string name="wincomp_offline">Bileşen listesine ulaşılamadı. Önceden indirilmiş bileşenler yine de açılıp kapatılabilir.</string> + <string name="wincomp_recommended">Bu oyun için önerilenler</string> + <string name="wincomp_checking">Bu oyunun ihtiyaçları kontrol ediliyor…</string> + <string name="wincomp_when_online">Çevrimiçi olunca kullanılabilir</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">%1$d bileşen açılıyor…</item> + <item quantity="other">%1$d bileşen açılıyor…</item> + </plurals> + <string name="wincomp_auto_section">Bu oyun için açık</string> + <string name="wincomp_auto_steam">Steam, %1$s bileşenini %2$s ile yükler (uygulama %3$s)</string> + <string name="wincomp_auto_gog">Bu oyun için GOG listesinden</string> + <string name="wincomp_auto_epic">Bu oyun için Epic ön koşullarından</string> + <string name="wincomp_auto_amazon">Bu oyun için Amazon kurulum adımlarından</string> + <string name="wincomp_steam_by_name">Steam, %1$s bileşenini %2$s uygulamasıyla yükler (adla eşleştirildi)</string> + <string name="wincomp_suggestions">Ayrıca listelenenler</string> + <string name="wincomp_suggestion_reason">%1$s tarafından listelendi; burada bir bileşen değil</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Oyun %1$s ile birlikte gelir</string> + <string name="wincomp_found_shipped">Oyunda %1$s var (çoğu zaman olduğu gibi çalışır)</string> + <string name="wincomp_already_here">Bu oyunda zaten var</string> + <string name="wincomp_no_recommendation">Oyunun klasöründe bir bileşene işaret eden bir şey yok.</string> + <string name="wincomp_active">Bu oyun için yüklü (%1$d)</string> + <string name="wincomp_all">Tüm bileşenler (%1$d)</string> + <string name="wincomp_installers">Windows yükleyicisi gerekenler (%1$d)</string> + <string name="wincomp_installers_note">Bunlar, içinde açılacak bir paket bulunmayan kendi kurulum programlarıdır ve yükledikleri şeylerin henüz bir kaydı yok. Çoğu, Proton içindeki Mono\'nun zaten yerini tuttuğu eski çalışma zamanlarıdır; kayıtlar hazırlandıkça eklenir.</string> + <string name="wincomp_show">Göster</string> + <string name="wincomp_hide">Gizle</string> + <string name="wincomp_needs_installer">Kendi kurulum programını çalıştırır (henüz kayıt yok)</string> + <string name="wincomp_unsupported">Burada henüz desteklenmiyor</string> + <string name="wincomp_loading">Bileşenler yükleniyor…</string> + <string name="wincomp_failed">Yüklenemedi: %1$s</string> + <string name="wincomp_downloaded">İndirildi</string> + <string name="wincomp_downloading">%1$s indiriliyor</string> + <string name="wincomp_installing">Yükleniyor: %1$s</string> + <string name="wincomp_reverting">Kapatılıyor…</string> + <string name="wincomp_download_size">İndirme: %1$s</string> + <string name="wincomp_next_launch">Oyun bir sonraki başlatıldığında etkili olur.</string> + <string name="mode_stretch169">16:9 oyunları uzat</string> + <string name="mode_stretch169_hint">16:9\'dan daha kare ekranlarda oyunları siyah şerit göstermek yerine ekranı dolduracak şekilde uzatır. Sonraki oturumda uygulanır.</string> + <string name="mode_audio">Ses</string> + <string name="mode_directaudio">Oyunlar için DirectAudio</string> + <string name="mode_directaudio_hint">Daha düşük gecikme için PulseAudio\'yu atlar.</string> + <string name="mode_mic">Mikrofon</string> + <string name="mode_mic_hint">Sesli sohbet için.</string> + <string name="mode_network">Ağ</string> + <string name="mode_wifi_discovery">Wi-Fi keşfi</string> + <string name="mode_wifi_discovery_hint">Steam\'de Wi-Fi adlarını ve yakındaki ağları göster.</string> + <string name="mode_wifi_location_off">Konum hizmetleri kapalı.</string> + <string name="mode_wifi_permission_denied">Konum izni verilmedi.</string> + <string name="mode_wifi_open_settings">Ayarları aç</string> + <string name="mode_wifi_continue">Devam</string> + <string name="mode_wifi_explain_title">Wi-Fi keşfi etkinleştirilsin mi?</string> + <string name="mode_wifi_explain_text">Android, Wi-Fi adlarını okumak ve yakındaki ağları keşfetmek için Konum izni gerektirir. DroidDeck bu erişimi, bu ağları Steam\'de göstermek için kullanır. Konumunuzu takip etmeyiz. İnternet erişimi bu izin olmadan da çalışır.</string> + <string name="mode_storage">Oyun depolama alanı</string> + <string name="mode_storage_auto">Otomatik - varsa SD kart, ayrıca Games klasörleriniz</string> + <string name="mode_storage_auto_none">Otomatik - Games klasörleriniz, ayrıca varsa SD kart (şu an yok)</string> + <string name="mode_storage_internal">Yalnızca dahili</string> + <string name="mode_storage_folder">Klasör: %1$s</string> + <string name="mode_second_library">İkinci kütüphane</string> + <string name="mode_storage_note">Varlıkları SD karttan veya paylaşılan depolamadan akışla yükleyen oyunlarda takılmalar olabilir.</string> + <string name="mode_storage_diagnostics">Depolama tanılaması</string> + <string name="mode_storage_diagnostics_hint">Ayırma sonuçlarını ve örneklenmiş depolama sürelerini “Günlükleri paylaş” çıktısına ekler. Açıkken yüklemeleri yavaşlatabilir. Sonraki oturumda uygulanır.</string> + <string name="mode_choose_folder">Klasör seçin…</string> + <string name="mode_custom_res_title">Özel çözünürlük</string> + <string name="mode_custom_res_text">Sınırın ve oranın yerine geçer. Ekrana uymayan bir boyutta siyah şeritler görünür.</string> + <string name="mode_width">Genişlik</string> + <string name="mode_height">Yükseklik</string> + <string name="mode_custom_res_range">320×240 ile 3840×2160 arasında.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d oyun</item> + <item quantity="other">%1$d oyun</item> + </plurals> + <string name="common_ok">Tamam</string> + <string name="common_delete">Sil</string> + <string name="common_restore">Geri yükle</string> + <string name="common_download">İndir</string> + <string name="common_delete_named">Sil: %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Çalışma zamanı sürücüsü</string> + <string name="comp_runtime_driver_hint">Steam, oyunlar ve masaüstü tarafından kullanılır. Sonraki oturumda uygulanır.</string> + <string name="comp_import_turnip">Turnip zip dosyası içe aktar…</string> + <string name="comp_display_driver">Ekran sürücüsü</string> + <string name="comp_display_driver_hint">Her iki modda kareleri ekrana çizer. Uygulamak için uygulamayı yeniden başlatın.</string> + <string name="comp_import_adrenotools">AdrenoTools zip dosyası içe aktar…</string> + <string name="comp_never">hiçbir zaman</string> + <string name="comp_nightlies_checked">Nightlies son kontrol: %1$s</string> + <string name="comp_title">Bileşenler</string> + <string name="comp_about">Bileşenler hakkında</string> + <string name="comp_check_drivers">Yeni sürücüleri kontrol et</string> + <string name="comp_check_nightlies">Yeni paketler için Nightlies\'i kontrol et</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Burada seçilen Proton, Steam\'de kendi Proton\'unu seçmemiş her oyunu çalıştırır; Steam\'de yapılan bir değişiklik de burada görünür. Steam güncellenince Valve\'ın Proton\'unu değiştirir; orijinaller her derleme için saklanır.</string> + <string name="comp_scope">Yapılandırma</string> + <string name="comp_profile_configure">Profili yapılandır</string> + <string name="comp_profile">Profil</string> + <string name="comp_scope_general">Varsayılan profil</string> + <string name="comp_scope_general_detail">Geçersiz kılma ayarı olmayan oyunlarda otomatik kullanılır.</string> + <string name="comp_profile_game_detail">%1$s başlatıldığında otomatik kullanılan kayıtlı ayarlar.</string> + <string name="comp_game_hint">Yalnızca bu oyunun ihtiyaç duyduğu ayarları seçin. Geri kalan her şey Varsayılan profili kullanmaya devam eder.</string> + <string name="comp_game_fex">FEX ön ayarı</string> + <string name="comp_game_fex_inherited">Varsayılan profilin ön ayarı kullanılıyor.</string> + <string name="comp_game_fex_override">Bu oyun için özel ön ayar kaydedildi.</string> + <string name="comp_game_fex_custom">Özel FEX değişkenleri</string> + <string name="comp_game_use_general">Varsayılanı kullan</string> + <string name="comp_game_compatibility">Oyun uyumluluğu</string> + <string name="comp_game_environment_hint">Bu oyun için Proton, DXVK, VKD3D ve senkronizasyon ortam seçenekleri.</string> + <string name="comp_game_proton_inherited">Varsayılan profilin Proton\'u kullanılıyor.</string> + <string name="comp_game_proton_override">Bu oyun için özel Proton, Steam uyumluluk eşlemesiyle kaydedildi.</string> + <string name="comp_no_proton_short">Proton yok</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Bu oyun başka bir paket seçmedikçe %1$s kaynağındaki Varsayılan profil paketini kullanır.</string> + <string name="comp_game_component_general">Varsayılan profilin bileşen paketini kullanır.</string> + <string name="comp_game_component_override">Yalnızca bu oyun için %1$s kullanır.</string> + <string name="comp_game_runtime_options">Çalışma zamanı seçenekleri</string> + <string name="comp_game_environment_other_hint">Oyuna özel diğer Proton, DXVK, VKD3D-Proton ve senkronizasyon ortam seçenekleri.</string> + <string name="comp_game_saved_next">%1$s profili kaydedildi; oyun bir sonraki başlatıldığında uygulanır.</string> + <string name="game_no_steam_title">Steam olmadan başlat</string> + <string name="game_no_steam_detail">Steam istemcisi olmadan Proton/FEX\'te açar; Steam özellikleri kapalıdır.</string> + <string name="game_no_steam_on">Açık</string> + <string name="game_steam_with">Steam ile başlar</string> + <string name="game_steam_without">Steam olmadan başlar</string> + <string name="game_settings_card">Ayarlar</string> + <string name="game_settings_menu_title">%1$s Ayarları</string> + <string name="game_settings_default">Varsayılan</string> + <string name="game_settings_default_detail">Bu oyun için değiştirilen her şeyi uygulamanın ayarlarına döndürür.</string> + <string name="game_sync_custom">Özel eşitleme değişkenleri</string> + <string name="comp_game_proton_live">%1$s için Proton seçimi kaydedildi ve şimdi Steam\'de kullanılabilir.</string> + <string name="comp_game_proton_next">%1$s için Proton seçimi kaydedildi. Oyunu başlatmadan önce Steam\'i yeniden başlatın.</string> + <string name="comp_game_proton_not_runnable">%1$s bu cihazda seçili Proton\'u kullanamaz.</string> + <string name="comp_game_load_failed">%1$s profili yüklenemedi: %2$s</string> + <string name="comp_game_save_failed">Oyun profili kaydedilemedi: %1$s</string> + <string name="comp_game_reset">Oyun profilini sıfırla</string> + <string name="comp_game_reset_title">%1$s profili sıfırlansın mı?</string> + <string name="comp_game_reset_body">Bu oyunun Proton, FEX, bileşen paketi, ortam, doku filtreleme ve Windows bileşeni geçersiz kılmaları kaldırılsın mı? Oyun Varsayılan profili kullanır.</string> + <string name="comp_game_reset_done">%1$s artık Varsayılan profili kullanıyor.</string> + <string name="comp_game_reset_failed">Oyun profili tamamen sıfırlanamadı: %1$s</string> + <string name="comp_default_live">%1$s artık Steam\'de kendi Proton\'unu seçmemiş her oyunu çalıştırıyor.</string> + <string name="comp_default_next">%1$s, Steam bir sonraki başlatıldığından itibaren kendi Proton\'unu seçmemiş her oyunu çalıştıracak.</string> + <string name="comp_default_not_runnable">%1$s burada oyun başlatamaz, bu yüzden varsayılan olamaz.</string> + <string name="comp_default_failed">Varsayılan Proton kaydedilemedi: %1$s</string> + <string name="comp_swapped">%1$s · %2$d değiştirildi</string> + <string name="comp_all_original">%1$s · tümü orijinal</string> + <string name="comp_game_running_suffix">%1$s · oyun çalışıyor</string> + <string name="comp_esync_pack">%1$s · droiddeck-esync paketi</string> + <string name="comp_esync_wanted">%1$s · henüz droiddeck-esync paketi yok</string> + <string name="comp_esync_builtin">%1$s · esync yerleşik, paket gerekmez</string> + <string name="comp_gpu_drivers">GPU sürücüleri</string> + <string name="comp_reapplied">%1$s · başlatmada yeniden uygulandı %2$s</string> + <string name="comp_next_queued">Sıradaki: %1$s · oyun kapandıktan sonra</string> + <string name="comp_in_use">%1$s kullanımda: %2$s</string> + <string name="comp_waits">Oyun kapanana kadar bekler</string> + <string name="comp_applies_next_game">Bir oyun bir sonraki başlatıldığında uygulanır</string> + <string name="comp_import_zip">.zip içe aktar</string> + <string name="comp_reading">Proton sürümleri okunuyor…</string> + <string name="comp_no_proton">Henüz Proton yüklü değil. ARM64 Proton\'u indirmesi için Steam\'i bir kez başlatın veya Kurulum sayfasından GE-Proton, CachyOS ya da DroidDeck-Proton ekleyin.</string> + <string name="comp_original">Orijinal · %1$s</string> + <string name="comp_this_build">%1$s · bu derleme</string> + <string name="comp_earlier_build">%1$s · önceki derleme</string> + <string name="comp_installed_count">Yüklü · %1$d</string> + <string name="comp_nothing_stored">%1$s için henüz saklanan bir şey yok. Bu Proton\'un kendi dosyaları orijinali olarak kaydedilir.</string> + <string name="comp_waits_long">Bu Proton\'da bir oyun çalışıyor, bu yüzden oyun kapanana kadar beklenir.</string> + <string name="comp_applies_long">Bir oyun bir sonraki başlatıldığında uygulanır.</string> + <string name="comp_swap_title">%1$s ile değiştirilsin mi?</string> + <string name="comp_swap_body">%1$s, %2$s içine yerleştirilsin mi? Orijinal dosyaları kayıtlı kalır. %3$s</string> + <string name="comp_restore_title">%1$s geri yüklensin mi?</string> + <string name="comp_restore_body">%1$s orijinali %2$s içine geri konulsun mu? %3$s</string> + <string name="comp_delete_package_body">Paketi uygulamadan kaldırır. Yeniden indirebilirsiniz.</string> + <string name="comp_delete_original_title">Bu orijinal silinsin mi?</string> + <string name="comp_delete_original_body">Bu %1$s orijinali, %2$s sürümünün önceki bir derlemesine ait. Geçerli derlemenin orijinali her zaman saklanır.</string> + <string name="comp_nightlies_count">Nightlies içinde · %1$d</string> + <string name="comp_refresh_to_list">Nightlies paketlerini listelemek için yenileyin.</string> + <string name="comp_nothing_new">Son kontrolden beri yeni bir şey yok.</string> + <string name="comp_import_wcp">.wcp içe aktar</string> + <string name="comp_restore_original">Bu Proton\'un orijinalini geri yükle</string> + <string name="comp_restore_original_body">%1$s için orijinal %2$s geri yüklensin mi?</string> + <string name="comp_swap">Değiştir</string> + <string name="comp_about_text">Steam\'in oyunları çalıştırdığı her Proton için FEX, DXVK ve VKD3D-Proton.\n\nDeğiştirmek için yüklü bir satırı seçin. Bir oyun bir sonraki başlatıldığında ya da çalışan oyun kapandıktan sonra uygulanır.\n\nSeçimleriniz her başlatmadan önce yeniden kontrol edilir ve bir şey onları değiştirdiyse geri konur. Her Proton\'un orijinal dosyaları saklanır, böylece Steam güncellemeleri onları asla kaybettirmez.</string> + <string name="comp_tag_original">Orijinal</string> + <string name="comp_tag_in_use">Kullanımda</string> + <string name="comp_tag_new">Yeni</string> + <string name="comp_tag_stored">Saklandı</string> + <string name="perf_title">Performans</string> + <string name="perf_lede">CPU çekirdekleri, oturum düzeltmeleri ve ana bilgisayar adı. Sonraki oturumda uygulanır.</string> + <string name="perf_client_cores_group">Steam istemcisi çekirdekleri</string> + <string name="perf_override">Steam\'in çekirdek seçimini geçersiz kıl</string> + <string name="perf_override_hint">Steam\'i, arayüz yardımcısını ve gamescope\'u aşağıdaki çekirdeklere sabitler.</string> + <string name="perf_client_cores">İstemci çekirdekleri</string> + <string name="perf_client_cores_on">Steam için çekirdekler.</string> + <string name="perf_client_cores_off">Seçmek için geçersiz kılmayı açın.</string> + <string name="perf_game_cores_group">Oyun çekirdekleri</string> + <string name="perf_game_cores">Oyun çekirdekleri</string> + <string name="perf_game_cores_hint">Oyunlar için çekirdekler. Tümü seçiliyse Android serbestçe zamanlar.</string> + <string name="perf_client_ui">İstemci arayüzü</string> + <string name="perf_glthread">İş parçacıklı GL</string> + <string name="perf_glthread_hint">Steam menülerinin daha hızlı tepki vermesini sağlayabilir.</string> + <string name="perf_zink">Zink: tembel tanımlayıcılar</string> + <string name="perf_zink_hint">Tanımlayıcı arabelleği olmayan sürücüler için önerilir.</string> + <string name="perf_noglerror">GL hata denetimlerini atla</string> + <string name="perf_noglerror_hint">Çağrı başına GL doğrulamasını kapatır.</string> + <string name="perf_gsrealtime">gamescope: gerçek zamanlı GPU kuyruğu</string> + <string name="perf_gsrealtime_hint">Bileştiricinin GPU işine öncelik verir. Oyunlardan biraz feda ederek kare zamanlamasını yumuşatabilir.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">GPU\'yu en yüksek saat hızında tut</string> + <string name="perf_gpuclock_hint">Yalnızca Adreno. Daha az takılma, daha fazla pil tüketimi ve ısınma.</string> + <string name="perf_fixes">Oturum düzeltmeleri</string> + <string name="perf_sysmem">Turnip: sysmem işleme</string> + <string name="perf_sysmem_hint">Steam ve çoğu oyun için daha hızlı. Adreno 710/720/722\'de gereklidir.</string> + <string name="perf_xalia">Steam\'in xalia yardımcısını atla</string> + <string name="perf_fastsync">droiddeck-ntsync (deneysel)</string> + <string name="perf_fastsync_hint">Linux ntsync sürücüsünün test amaçlı, kullanıcı alanında çalışan bir yedeği. Açıkken Proton, droiddeck-esync ve droiddeck-fsync yerine bunu kullanır. Proton Experimental ARM64, GE-Proton ve proton-cachyos ile çalışır. Sonraki oturumda uygulanır.</string> + <string name="perf_esync">droiddeck-esync</string> + <string name="perf_fsync">Önce droiddeck-fsync</string> + <string name="perf_fsync_hint">Proton\'un kendi fsync\'ini standart Proton dosyalarıyla, futex_waitv kullanıcı alanında sağlanarak çalıştırır; bu yüzden paket gerektirmez ve Steam Proton\'u güncellediği anda da çalışmaya devam eder. Açıkken oyunlar, Proton\'un fsync dışında tuttuğu birkaç oyun hariç, bunu droiddeck-esync\'ten önce kullanır. Sonraki oturumda uygulanır.</string> + <string name="perf_esync_hint">Oyunların Windows iş parçacıkları, wineserver üzerinden gidip gelmek yerine eventfd ve paylaşılan bellek aracılığıyla birbirini bekler. Tam olarak o Proton derlemesi için hazırlanmış bir droiddeck-esync paketi kullanır; paketler otomatik indirilir. Yeni bir Proton derlemesi için paket çıkana kadar droiddeck-fsync devreye girer. Sonraki oturumda uygulanır.</string> + <string name="perf_xalia_hint">Proton\'un her oyunda CPU harcayan kumandayla gezinme yardımcısını kapatır.</string> + <string name="perf_seccomp">proot\'u seccomp olmadan çalıştır</string> + <string name="perf_seccomp_hint">Bazı çekirdeklerde eksik sistem çağrısı hatalarını düzeltebilir. Performansı düşürebilir.</string> + <string name="perf_fastpath">proot hızlı yolu</string> + <string name="perf_fastpath_needs_seccomp">proot\'un seccomp filtresi gerekir.</string> + <string name="perf_fastpath_hint">Daha hızlı dosya aramaları ve daha az takılma. Bir program dosyalarını bulamıyorsa kapatın.</string> + <string name="perf_identity">Oturum kimliği</string> + <string name="perf_hostname">Ana bilgisayar adı</string> + <string name="perf_hostname_hint">Steam\'in bu cihaz için gördüğü ad. Boş bırakılırsa %1$s geri yüklenir.</string> + <string name="perf_hostname_invalid">Yalnızca harf, rakam ve arada kısa çizgi; en fazla 63 karakter.</string> + <string name="perf_phantom_warning">Android bu oturumu sonlandıracak şekilde ayarlı</string> + <string name="driver_installed">Yüklü</string> + <string name="driver_available">İndirilebilir</string> + <string name="driver_nothing_new">Son kontrolden beri yeni bir şey yok.</string> + <string name="driver_restore_builtin">Yerleşik sürücüleri geri yükle</string> + <string name="driver_delete_builtin">Uygulamada yerleşik: bu işlem açılmış dosyalarını kaldırır ve sürücüyü gizler. “Yerleşik sürücüleri geri yükle” onu geri getirir.</string> + <string name="driver_delete_bundle">Bir Android + Linux paketinin yarısı: iki yarı da kaldırılır. Kullanımdaki bir sürücü varsayılana döner.</string> + <string name="driver_delete_plain">Dosyaları uygulamadan kaldırılır.</string> + <string name="driver_delete_in_use">Dosyaları kaldırılır. Kullanımda olduğu için varsayılan devreye girer.</string> + <string name="drawer_page_display">Ekran</string> + <string name="drawer_page_effects">Efektler</string> + <string name="drawer_page_controls">Kontroller</string> + <string name="drawer_page_components">Bileşenler</string> + <string name="drawer_page_controller">Kumanda</string> + <string name="drawer_page_settings">Ayarlar</string> + <string name="drawer_page_desc">%1$s sayfası</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Masaüstü</string> + <string name="drawer_steam_menu">Steam menüsü</string> + <string name="drawer_quick_access">Hızlı erişim</string> + <string name="drawer_open_qam">Hızlı Erişim Menüsünü aç</string> + <string name="drawer_prev_page">Önceki sayfa</string> + <string name="drawer_next_page">Sonraki sayfa</string> + <string name="drawer_hud">Performans HUD\'u</string> + <string name="drawer_scaling">Ölçekleme modu</string> + <string name="drawer_scaling_sharpness">Ölçekleme keskinliği</string> + <string name="drawer_effects">Ekran efektleri</string> + <string name="drawer_effects_hint">Anında uygulanır. Herhangi bir efekt açıkken biraz GPU süresi harcar.</string> + <string name="drawer_look">Ön ayarlar</string> + <string name="drawer_look_custom">Özel</string> + <string name="drawer_effects_advanced">Gelişmiş</string> + <string name="widgets_expanded">Genişletildi</string> + <string name="widgets_collapsed">Daraltıldı</string> + <string name="drawer_cas">Keskinleştirme (CAS)</string> + <string name="drawer_cas_level">Keskinleştirme düzeyi</string> + <string name="drawer_fake_hdr">Sahte HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">SteamVR\'ı başlat</string> + <string name="steamvr_checking">SteamVR denetleniyor…</string> + <string name="drawer_deband">Bant giderme</string> + <string name="drawer_deband_strength">Bant giderme gücü</string> + <string name="drawer_brightness">Parlaklık</string> + <string name="drawer_contrast">Kontrast</string> + <string name="drawer_gamma">Gama</string> + <string name="drawer_saturation">Doygunluk</string> + <string name="drawer_fxaa">FXAA (kenar yumuşatma)</string> + <string name="drawer_toon">Çizgi film konturları</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Doku filtreleme</string> + <string name="drawer_texture_hint">DirectX 9–11 oyunları, bir sonraki başlatmadan itibaren.</string> + <string name="drawer_anisotropy">Anizotropik filtreleme</string> + <string name="drawer_texture_sharpness">Doku keskinliği</string> + <string name="drawer_texture_sharpness_note">Negatif mip sapması: daha keskin dokular, biraz titreşim. Otomatik, oturumun ekrana ne kadar büyütüldüğüne göre ayarlanır.</string> + <string name="drawer_touch_auto">Otomatik (%1$s)</string> + <string name="drawer_keyboard">Klavye</string> + <string name="drawer_latency">Gecikme</string> + <string name="drawer_low_latency_controller">Düşük gecikmeli kumanda</string> + <string name="drawer_low_latency_controller_hint">Kumanda 250 Hz yerine 1000 Hz bildirir. Biraz daha fazla CPU.</string> + <string name="drawer_low_latency_touch">Düşük gecikmeli dokunma</string> + <string name="drawer_low_latency_touch_hint">Dokunuşlar kare birleştirmeyi atlar; Steam dokunmatik kontrolleri 1000 Hz çalışır. Biraz daha fazla CPU.</string> + <string name="drawer_pc_keyboard">PC klavyesi</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">İkinci ekran</string> + <string name="drawer_second_screen_mode">Mod</string> + <string name="drawer_second_screen_shows">Gösterilen</string> + <string name="drawer_android_apps">Android uygulamaları</string> + <string name="drawer_launch_app">Uygulama başlat</string> + <string name="common_hide">Gizle</string> + <string name="common_show">Göster</string> + <string name="drawer_no_apps">Başlatılabilir uygulama yok</string> + <string name="drawer_session_behavior">Oturum davranışı</string> + <string name="drawer_suspend_hint">Hemen ve bu moddaki sonraki oturumlarda uygulanır.</string> + <string name="drawer_next_session">Sonraki oturum</string> + <string name="drawer_support">Destek</string> + <string name="drawer_logs">Oturum günlükleri</string> + <string name="drawer_logs_hint">Hata raporuna ekleyin</string> + <string name="drawer_share_logs">Günlükleri paylaş</string> + <string name="drawer_background">Arka plan</string> + <string name="drawer_stop">Durdur</string> + <string name="drawer_stop_title">Oturum durdurulsun mu?</string> + <string name="drawer_running_now">Şu anda çalışan</string> + <string name="drawer_no_game">Proton üzerinde çalışan oyun yok</string> + <string name="drawer_selected_profile">Oyun profili</string> + <string name="drawer_selected_profile_none">Profil ayrıntıları henüz kullanılamıyor.</string> + <string name="drawer_profile_refresh_failed_initial">Oyun profilleri yüklenemedi. Otomatik olarak yeniden deneniyor.</string> + <string name="drawer_profile_refresh_failed_stale">Oyun profilleri yenilenemedi. Son mevcut veriler gösteriliyor; otomatik olarak yeniden deneniyor.</string> + <string name="drawer_profile_inspect_hint">Bir sonraki başlatmada kullanılacak kayıtlı ayarları görüntüleyin ve düzenleyin.</string> + <string name="drawer_profile_default">Varsayılan profil kullanılıyor</string> + <string name="drawer_profile_custom">Özel profil</string> + <string name="drawer_component_inherited">Varsayılan profildeki %1$s kullanılıyor.</string> + <string name="drawer_game_components_note">Değişiklikler %1$s profiline kaydedilir ve oyun bir sonraki başlatıldığında uygulanır.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d oyun geçersiz kılması</item> + <item quantity="other">%1$d oyun geçersiz kılması</item> + </plurals> + <string name="drawer_no_proton">Henüz Proton yüklü değil.</string> + <string name="drawer_game_running">oyun çalışıyor</string> + <string name="drawer_reapplied">başlatmada yeniden uygulandı %1$s</string> + <string name="drawer_original">Orijinal</string> + <string name="drawer_components_note">İçe aktarma ve silme işlemleri Bileşenler sayfasında yapılır.</string> + <string name="setup_check_done">Tamamlandı</string> + <string name="setup_check_warn">Dikkat gerekiyor</string> + <string name="setup_check_busy">İşleniyor</string> + <string name="setup_limit_adb_failed">Kablosuz hata ayıklama IP adresini ve bağlantı noktasını kontrol edin ya da Android bu cihazı kaldırdıysa yeniden eşleyin.</string> + <string name="setup_install">Yükle</string> + <string name="setup_manage">Yönet</string> + <string name="setup_tab_overview">Genel bakış</string> + <string name="setup_tab_controller">Kumanda</string> + <string name="setup_tab_session">Oturum</string> + <string name="setup_tab_launcher">Başlatıcı</string> + <string name="setup_title">Kurulum</string> + <string name="setup_all_set">● Her şey hazır</string> + <string name="setup_n_ready">%1$d / %2$d hazır</string> + <string name="setup_system_check">Sistem kontrolü</string> + <string name="setup_gpu_supported">Cihaz destekleniyor</string> + <string name="setup_gpu_untested">Test edilmemiş GPU</string> + <string name="setup_gpu_unsupported">GPU desteklenmiyor</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam için Adreno sürücüsü gerekir; %1$s siyah ekran gösterebilir</string> + <string name="setup_runtime">Linux çalışma zamanı</string> + <string name="setup_runtime_progress">%1$s · %%%2$d</string> + <string name="setup_runtime_missing">Yüklü değil · yaklaşık 3 GB, ilk kez Oyna\'ya basınca yüklenir</string> + <string name="setup_installed">Yüklü</string> + <string name="setup_runtime_update">%1$s · güncelleme var</string> + <string name="setup_runtime_current">%1$s · güncel</string> + <string name="setup_limit">Alt süreç sınırı</string> + <string name="setup_limit_on">Açık · Android Steam\'i kapatabilir. Kapatmak bir dakika sürer.</string> + <string name="setup_limit_unset">Ayarlanmadı · Android Steam\'i kapatabilir. Kapatmak bir dakika sürer.</string> + <string name="setup_limit_unknown">Kontrol edilemedi · kapatmak bir dakika sürer.</string> + <string name="setup_fix_it">Düzelt</string> + <string name="setup_details">Ayrıntılar</string> + <string name="setup_dev_options">Geliştirici seçenekleri</string> + <string name="setup_use_wireless">Kablosuz hata ayıklamayı kullan</string> + <string name="setup_check_again">Tekrar kontrol et</string> + <string name="setup_limit_turn_on">Sınırı aç</string> + <string name="setup_account">Steam hesabı</string> + <string name="setup_signed_in_offline">%1$s olarak oturum açıldı · çevrimdışı mod</string> + <string name="setup_signed_in">%1$s olarak oturum açıldı</string> + <string name="setup_sign_in">Oyna\'ya basın ve Steam\'de oturum açın</string> + <string name="setup_tools">Araçlar</string> + <string name="setup_controller">Kumanda</string> + <string name="setup_controller_unavailable">Kumanda ayarları kullanılamıyor.</string> + <string name="setup_session">Oturum</string> + <string name="setup_logs">Oturum günlükleri</string> + <string name="setup_logs_hint">Her oturumdan sonra kaydedilir</string> + <string name="setup_agent_commands">Hata ayıklama araçları</string> + <string name="setup_latest_logs">Son oturum günlükleri</string> + <string name="setup_saved_logs">Kayıtlı oturum günlükleri</string> + <string name="setup_saved_logs_hint">En yeni %1$d tanesini saklar</string> + <string name="setup_clear_logs">Günlükleri temizle</string> + <string name="setup_offline">Çevrimdışı mod</string> + <string name="setup_sign_in_first">Önce Steam\'de oturum açın</string> + <string name="setup_launcher">Başlatıcı</string> + <string name="setup_language">Dil</string> + <string name="setup_language_hint">Steam de bir sonraki başlatılışından itibaren bunu kullanır.</string> + <string name="setup_language_system">Sistem varsayılanı (%1$s)</string> + <string name="setup_language_system_short">Sistem varsayılanı</string> + <string name="setup_app_scale">Uygulama ölçeği</string> + <string name="setup_app_scale_hint">DroidDeck metinleri ve kontrolleri</string> + <string name="setup_app_scale_default">%%%1$d (Varsayılan)</string> + <string name="setup_theme">Tema</string> + <string name="setup_theme_hint">Başlatıcı görünümü</string> + <string name="setup_home">Ana ekran olarak kullan</string> + <string name="setup_home_on">DroidDeck ana ekran uygulaması olabilir</string> + <string name="setup_home_off">DroidDeck hiçbir zaman ana ekran uygulaması olarak sunulmaz</string> + <string name="setup_orientation">Yön</string> + <string name="setup_orientation_auto">Otomatik yatay</string> + <string name="setup_orientation_landscape">Yatay</string> + <string name="setup_orientation_reverse">Ters yatay</string> + <string name="setup_fullscreen">Tam ekran</string> + <string name="setup_fullscreen_on">Android durum ve gezinme çubuklarını gizler</string> + <string name="setup_fullscreen_off">Android durum ve gezinme çubuklarını gösterir</string> + <string name="setup_default_home">Varsayılan ana ekran uygulaması</string> + <string name="setup_choose_home">Ana ekran uygulaması seçin</string> + <string name="setup_choose">Seç</string> + <string name="setup_linux_apps">Linux uygulamaları (beta)</string> + <string name="setup_tool_files">Dosyalar</string> + <string name="setup_tool_files_hint">Dosyalara göz atın ve yönetin</string> + <string name="setup_tool_protons">Proton sürümleri</string> + <string name="setup_tool_protons_hint">ARM64 Proton derlemelerini yükleyin</string> + <string name="setup_tool_performance">Performans</string> + <string name="setup_tool_performance_hint">CPU çekirdeği ataması</string> + <string name="setup_tool_roms">ROM klasörü</string> + <string name="setup_tool_roms_hint">Emülatör oyunlarının saklandığı yer</string> + <string name="setup_card_components">Bileşenler</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Kontroller</string> + <string name="setup_card_controls_hint">Düğme eşleme</string> + <string name="store_tab_discover">Keşfet</string> + <string name="store_tab_search">Ara</string> + <string name="store_tab_installed">Yüklü</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Mağaza</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak hazır</string> + <string name="store_needs_runtime">Önce Kurulum sayfasından Linux çalışma zamanını yükleyin.</string> + <string name="store_setup_title">Flatpak\'i kur</string> + <string name="store_setup_text">Flatpak\'i ekler ve Flathub\'a bağlar (yaklaşık 20 MB). İlk uygulama kendi çalışma zamanını da indirir.</string> + <string name="store_setting_up">Kuruluyor…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Güncellemeler</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %%%3$d</string> + <string name="store_starting">Başlatılıyor…</string> + <string name="store_categories">Kategoriler</string> + <string name="store_unreachable">Flathub\'a ulaşılamadı. Bağlantınızı kontrol edip tekrar deneyin.</string> + <string name="store_try_again">Tekrar dene</string> + <string name="store_search_label">Flathub\'da ara</string> + <string name="store_search_placeholder">Firefox, oyunlar, emülatörler…</string> + <string name="store_search">Ara</string> + <string name="store_all">Tümü</string> + <string name="store_searching">Aranıyor…</string> + <string name="store_search_hint">Ada göre arayın veya bir kategori seçin. Yalnızca ARM64 uygulamaları listelenir.</string> + <string name="store_no_results">Flathub\'da bununla eşleşen ARM64 uygulaması yok.</string> + <string name="store_results">Sonuçlar</string> + <string name="store_check_updates">Güncellemeleri kontrol et</string> + <string name="store_update_all">Tümünü güncelle (%1$d)</string> + <string name="store_all_current">● Her şey güncel</string> + <string name="store_no_apps">Henüz uygulama yok. Keşfet veya Ara bölümünden bulabilirsiniz.</string> + <string name="store_setup_first_note">Uygulama yüklemek için Flatpak\'i kurun.</string> + <string name="store_update_available_prefix">Güncelleme var · %1$s</string> + <string name="store_open">Aç</string> + <string name="store_details">Ayrıntılar</string> + <string name="store_remove">Kaldır</string> + <string name="store_press_again">Kaldırmak için tekrar basın</string> + <string name="store_installing">Yükleniyor…</string> + <string name="store_install">Yükle</string> + <string name="store_setup_first">Önce Flatpak\'i kurun</string> + <string name="store_download_size">İndirme: %1$s</string> + <string name="store_installed_chip">● Yüklü</string> + <string name="store_details_failed">Bu uygulamanın Flathub sayfası yüklenemedi.</string> + <string name="store_loading">Flathub\'dan yükleniyor…</string> + <string name="store_no_arm">Flathub\'da ARM64 derlemesi yok, bu yüzden burada yüklenemez.</string> + <string name="store_screenshots">Ekran görüntüleri</string> + <string name="store_about">Hakkında</string> + <string name="store_app_id">Uygulama kimliği</string> + <string name="store_license">Lisans</string> + <string name="store_runtime">Çalışma zamanı</string> + <string name="store_installed_size">Yüklü boyut</string> + <string name="store_installed_size_value">%1$s (ayrıca paylaşılan çalışma ortamı)</string> + <string name="store_website">Web sitesi</string> + <string name="store_verified">Doğrulandı</string> + <string name="upd_title">Güncellemeler</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Kontrol edildi %1$s</string> + <string name="upd_not_checked">Henüz kontrol edilmedi</string> + <string name="upd_perm_title">DroidDeck kendini güncellesin</string> + <string name="upd_perm_text">Sonraki ekranda “Bu kaynağa izin ver” seçeneğini açın, sonra buraya dönün. Güncelleme kendiliğinden sürer.</string> + <string name="upd_open_settings">Ayarları aç</string> + <string name="upd_not_now">Şimdi değil</string> + <string name="upd_signed_status">Farklı imzalanmış</string> + <string name="upd_signed_headline">Yerinde güncellenemez</string> + <string name="upd_signed_detail">Bu kopya DroidDeck\'in yayın anahtarıyla imzalanmamış, bu yüzden güncellemeler üzerine yüklenemez. Geçmek için önce kaldırın.</string> + <string name="upd_available">Güncelleme var</string> + <string name="upd_blocked_status">Yüklenemiyor</string> + <string name="upd_switch">Geçişe hazır</string> + <string name="upd_ahead_status">Kararlı\'nın önünde</string> + <string name="upd_ahead_headline">Kararlı\'nın önündesiniz</string> + <string name="upd_ahead_detail">Bu derleme en yeni Kararlı sürümden daha yeni. Bir sonraki sürümüyle Kararlı\'ya geçeceksiniz.</string> + <string name="upd_gone_status">Test sona erdi</string> + <string name="upd_gone_headline">Bu test sona erdi</string> + <string name="upd_gone_detail">Düzeltmesi birleştirildi veya bırakıldı. En yeni düzeltmeler için Önizleme\'yi takip edin.</string> + <string name="upd_current_status">Güncel</string> + <string name="upd_current_headline">En yeni %1$s\'e sahipsiniz</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Güncelle%1$s</string> + <string name="upd_install_button">Yükle%1$s</string> + <string name="upd_install_anyway">Yine de Kararlı %1$s\'i yükle</string> + <string name="upd_follow_preview">Önizleme\'yi takip et</string> + <string name="upd_stop_session">Güncellemek için çalışan oturumu durdurun.</string> + <string name="upd_less">Daha az</string> + <string name="upd_more">Daha fazla</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Yeni Önizleme derlemesi</string> + <string name="upd_new_test">PR #%1$d test derlemesi</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">GÜNCELLEME KANALI</string> + <string name="upd_stable">Kararlı</string> + <string name="upd_stable_hint">Test edilmiş sürümler, çoğu kişi için</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Önizleme</string> + <string name="upd_preview_hint">En yeni düzeltmeler, Kararlı\'dan önce</string> + <string name="upd_preview_current">Güncel</string> + <string name="upd_tests">Test derlemeleri</string> + <string name="upd_tests_hint">Yayınlanmadan önce bir düzeltmeyi deneyin</string> + <string name="upd_tests_none">Şu anda yok</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Bu DroidDeck kopyası için derlenmedi</string> + <string name="upd_updated">Güncellendi %1$s</string> + <string name="upd_test_name">PR #%1$d testi</string> + <string name="upd_while_ago">bir süre önce</string> + <string name="upd_just_now">az önce</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d denenecek</item> + <item quantity="other">%1$d denenecek</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Derlemenizden sonraki değişiklikler · %1$d derleme geride</item> + <item quantity="other">Derlemenizden sonraki değişiklikler · %1$d derleme geride</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Son değişiklikler · %1$d derleme</item> + <item quantity="other">Son değişiklikler · %1$d derleme</item> + </plurals> + <string name="gate_title">Değiştirilecek bir Android ayarı</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android, çok sayıda arka plan süreci başlatan uygulamaları durdurur; Steam da onlarca süreç başlatır. Bu değişmeden oyunlar hata vermeden kapanır.</string> + <string name="gate_fix_for_me">Benim için düzelt</string> + <string name="gate_toggle_steps">“Alt işlem kısıtlamalarını devre dışı bırak” seçeneğini açın, sonra buraya dönün. Geliştirici seçeneklerini açık bırakın, yoksa anahtar yeniden kapanır.</string> + <string name="gate_open_dev">Geliştirici seçeneklerini aç</string> + <string name="gate_no_toggle">Bu Android sürümünde bunun için bir anahtar yok, bu yüzden DroidDeck bunu Kablosuz hata ayıklama üzerinden değiştirir. Yaklaşık bir dakika sürer, bilgisayar gerekmez.</string> + <string name="gate_needs_wifi">Kablosuz hata ayıklama Wi-Fi gerektirir. Herhangi bir ağ işe yarar; internet gerekmez.</string> + <string name="gate_needs_notifications">Eşleştirme kodu bir bildirime gelir. DroidDeck için bildirimlere izin verin veya Diğer yollar\'ı kullanın.</string> + <string name="gate_allow_notifications">Bildirimlere izin ver</string> + <string name="gate_step1">Ayarlar → Geliştirici seçenekleri → Kablosuz hata ayıklama\'yı açın</string> + <string name="gate_step2">“Eşleştirme koduyla cihaz eşle” seçeneğine dokunun</string> + <string name="gate_step3">Kodu DroidDeck bildirimine yazın</string> + <string name="gate_waiting">Eşleştirme açılır penceresi bekleniyor…</string> + <string name="gate_code_needed">Açılır pencere bulundu. Kodunu bildirime girin.</string> + <string name="gate_status">Durum</string> + <string name="gate_polling">Her 2 saniyede bir kontrol ediliyor. Kapandığında bu sayfa kapanır.</string> + <string name="gate_other_ways">Diğer yollar</string> + <string name="gate_other_toggle">Kablosuz hata ayıklama, elle adres girme, bilgisayardan ADB</string> + <string name="gate_other_no_toggle">Elle adres girme, bilgisayardan ADB, Geliştirici seçenekleri</string> + <string name="gate_use_wireless_instead">Bunun yerine Kablosuz hata ayıklamayı kullan</string> + <string name="gate_some_roms">Bazı ROM\'lar bu anahtarı yine de ekler. Geliştirici seçenekleri\'nde “alt süreç” ifadesini arayın.</string> + <string name="gate_manual_hint">Bildirim işe yaramazsa açılır penceredeki adresi ve kodu kendiniz girin.</string> + <string name="gate_enter_manually">Adresi elle girin</string> + <string name="gate_from_computer">ADB\'li bir bilgisayardan:</string> + <string name="gate_copy_command">Komutu kopyala</string> + <string name="gate_choose_display">Android Ayarları\'nın hangi ekranda açılacağını seçin.</string> + <string name="gate_main_screen">Ana ekran</string> + <string name="wadb_finding_port">Eşleşti. Kablosuz hata ayıklama bağlantı noktası bulunuyor…</string> + <string name="wadb_enter_port">Eşleşti. Bağlantı noktasını Ayarlar\'dan girin.</string> + <string name="wadb_applying">Cihaz bulundu. Ayar uygulanıyor…</string> + <string name="wadb_apply_failed">Otomatik olarak uygulanamadı. Aşağıdaki adresi kontrol edip yeniden deneyin. %1$s</string> + <string name="wadb_title_wireless">Kablosuz hata ayıklama</string> + <string name="wadb_title_done">Alt süreç sınırı güncellendi</string> + <string name="wadb_title">Alt süreç sınırını değiştir</string> + <string name="wadb_lede_compact0">Seçenek yoksa Kablosuz hata ayıklama üzerinden eşleyin.</string> + <string name="wadb_lede_compact1">Eşleşti. IP adresini ve bağlantı noktasını Kablosuz hata ayıklama\'da kontrol edin.</string> + <string name="wadb_lede_done">Alt süreç sınırı güncellendi.</string> + <string name="wadb_lede0">Geliştirici seçenekleri\'nde alt süreç ayarı yoksa 2. adımı kullanın. Geliştirici seçenekleri → Kablosuz hata ayıklama → Eşleştirme koduyla cihaz eşle\'yi açın.</string> + <string name="wadb_lede1">Eşleşti. Aşağıdaki adresi kullanın veya Kablosuz hata ayıklama → IP adresi ve bağlantı noktası\'ndan güncelleyin.</string> + <string name="wadb_lede_done_long">Alt süreç sınırı Kablosuz hata ayıklama üzerinden güncellendi.</string> + <string name="wadb_confirmed_on">Android sınırın açık olduğunu onayladı.</string> + <string name="wadb_confirmed_off">Android sınırın kapalı olduğunu onayladı.</string> + <string name="wadb_pair_group">2 · Kablosuz hata ayıklamayı eşle</string> + <string name="wadb_pair_address">Eşleştirme açılır penceresinin IP adresi ve bağlantı noktası</string> + <string name="wadb_pin">Eşleştirme kodu (PIN)</string> + <string name="wadb_pin_placeholder">6 hane</string> + <string name="wadb_pair">Eşle</string> + <string name="wadb_apply_group">2 · Kablosuz hata ayıklama üzerinden uygula</string> + <string name="wadb_connect_address">Bağlantı IP adresi ve bağlantı noktası</string> + <string name="wadb_pair_again">Yeniden eşle</string> + <string name="wadb_turn_off">Sınırı kapat</string> + <string name="wadb_other_ways">Değiştirmenin diğer yolları</string> + <string name="wadb_dev_try_first">1 · Geliştirici seçenekleri (önce bunu deneyin)</string> + <string name="wadb_restrict_on">“Alt işlem kısıtlamalarını devre dışı bırak” seçeneğini kapalı olarak ayarlayın.</string> + <string name="wadb_restrict_off">“Alt işlem kısıtlamalarını devre dışı bırak” seçeneğini açık olarak ayarlayın.</string> + <string name="wadb_computer_last">3 · Bilgisayardan ADB (son yöntem)</string> + <string name="wadb_only_if">Yalnızca Kablosuz hata ayıklama kullanılamıyorsa.</string> + <string name="wadb_computer_group">3 · Bilgisayardan ADB (son yöntem)</string> + <string name="ctrl_osc_hint">Dokunmatik kontrollerin bir oturumda ne zaman görüneceği</string> + <string name="ctrl_color">Renk</string> + <string name="ctrl_color_hint">Ekrandaki düğmelerin rengi</string> + <string name="ctrl_custom">Özel</string> + <string name="ctrl_opacity">Opaklık</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Düğme boyutu</string> + <string name="ctrl_size_hint" formatted="false">%100 standart boyuttur</string> + <string name="ctrl_stick_click">Çubuk tıklaması</string> + <string name="ctrl_stick_click_hint">L3 veya R3 için bir çubuğa çift dokunup basılı tutun</string> + <string name="ctrl_adaptive">Uyarlanabilir çubuklar</string> + <string name="ctrl_rumble">Oyun titreşimi</string> + <string name="ctrl_steam_button">Steam düğmesi</string> + <string name="ctrl_qam_button">QAM düğmesi</string> + <string name="ctrl_keyboard_button">Klavye düğmesi</string> + <string name="ctrl_select_steam">Steam menüsünü açmak için Select\'e basın</string> + <string name="ctrl_select_steam_hint">Görünüm/Select yerine.</string> + <string name="ctrl_joycon_vr">VR kumandası olarak Joy-Con\'lar</string> + <string name="ctrl_joycon_vr_hint">SteamVR çalışırken her Joy-Con bir el olur. Öne doğrultun ve yeniden ortalamak için Home veya Capture düğmesini basılı tutun.</string> + <string name="setup_animations">Animasyonlar</string> + <string name="ctrl_adaptive_hint">Çubuklar dokunduğunuz yerde görünür, bıraktığınızda gizlenir</string> + <string name="ctrl_layout">Düzen</string> + <string name="ctrl_layout_custom">Özel konumlar kaydedildi</string> + <string name="ctrl_layout_default">Bu ekrana uyarlandı</string> + <string name="ctrl_edit">Düzenle</string> + <string name="ctrl_reset">Sıfırla</string> + <string name="ctrl_mapping">Düğme eşlemesi</string> + <string name="ctrl_mapping_default">Her düğme kendi girdisini gönderir</string> + <string name="ctrl_mapping_count">%2$d düğmeden %1$d\'i yeniden eşlendi</string> + <string name="ctrl_configure">Yapılandır</string> + <string name="ctrl_reset_all">Kumandayı sıfırla</string> + <string name="ctrl_reset_all_hint">Tüm kumanda ayarlarını ve düzeni geri yükler</string> + <string name="ctrl_mapping_lede">Ekrandaki her düğmenin oyuna gönderdiği girdi. Gizli, düğmeyi kaldırır.</string> + <string name="ctrl_onscreen_buttons">Ekrandaki düğmeler</string> + <string name="ctrl_defaults">Varsayılanlar</string> + <string name="ctrl_reset_mapping">Eşlemeyi sıfırla</string> + <string name="content_android_apps">Android uygulamaları</string> + <string name="content_apps_count">%1$d uygulama</string> + <string name="content_no_android_apps">Başlatılabilir Android uygulaması bulunamadı.</string> + <string name="content_desktop_installed">● Masaüstü yüklü</string> + <string name="content_desktop_first_open">İlk açılışta yüklenir</string> + <string name="content_available">Yüklenebilir</string> + <string name="content_not_installed">Yüklü değil.</string> + <string name="content_not_installed_suffix">%1$s · yüklü değil</string> + <string name="content_open_named">%1$s\'i aç</string> + <string name="content_games">Oyunlar</string> + <string name="content_choose_roms">Bir ROM\'lar klasörü seçin.</string> + <string name="content_retroarch_roms">RetroArch\'ta /root/ROMs\'a göz atın.</string> + <string name="content_add_roms">%1$s oyunlarını ROMs/%2$s\'e ekleyin.</string> + <string name="content_install_named">%1$s\'i yükle</string> + <string name="content_stop_to_install">Yüklemek için oturumu durdurun</string> + <string name="content_runtime_required">Çalışma ortamı gerekli</string> + <string name="content_loading_details">Yükleme ayrıntıları yükleniyor…</string> + <string name="content_details_unavailable">Yükleme ayrıntıları kullanılamıyor. Daha sonra tekrar deneyin.</string> + <string name="content_needs_runtime">Önce Kurulum\'dan Linux çalışma ortamını yükleyin.</string> + <string name="content_stop_first">Masaüstü uygulamalarını yüklemek için çalışan oturumu durdurun.</string> + <string name="content_install_into">%1$s\'i Linux masaüstüne yükler.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Gizlemek onu Masaüstü\'nden kaldırır. Dosyaları Linux çalışma ortamında kalır.</string> + <string name="content_rom_gone">Bu oyun artık ROM\'lar klasöründe değil.</string> + <string name="content_desktop_system">Masaüstü · %1$s</string> + <string name="content_launch_in">%1$s\'de başlat</string> + <string name="content_also_in">%1$s\'de de var</string> + <string name="content_page_gone">Bu sayfa artık yok. Soldan bir bölüm seçin.</string> + <string name="content_open_desktop">Masaüstünü aç</string> + <string name="content_install_open_desktop">Masaüstünü yükle ve aç</string> + <string name="desktop_remove_title">Masaüstünü kaldır</string> + <string name="desktop_remove_text">Masaüstünü ve birlikte gelen uygulamaları kaldırır. Oyunlar, eklenen uygulamalar, ayarlar ve paylaşılan kitaplıklar saklanır.</string> + <string name="desktop_removing">Masaüstü kaldırılıyor</string> + <string name="desktop_removed">Masaüstü kaldırıldı</string> + <string name="desktop_cleaning_legacy">Eski LXQt dosyaları kaldırılıyor</string> + <string name="desktop_removal_unknown">Bu masaüstü sürümünü kaldırmadan önce DroidDeck\'i güncelleyin.</string> + <string name="content_linux_desktop">Linux masaüstü</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox ve emülatörleriniz</string> + <string name="games_empty">Steam\'de yüklediğiniz oyunlar oturumdan sonra burada görünür.</string> + <string name="games_play_steam">Steam\'de oyna</string> + <string name="games_play_steamvr">SteamVR\'da oyna</string> + <string name="games_launch_settings">Başlatma ayarları</string> + <string name="games_launch">Başlat</string> + <string name="games_files">Oyun dosyaları</string> + <string name="games_prefix">Proton öneki</string> + <string name="games_saves_looking">Kayıtlar aranıyor…</string> + <string name="games_saves_none">Ada göre bir kayıt klasörü bulunamadı. Dışa aktarma tüm kullanıcı klasörünü alır.</string> + <string name="games_saves_folders">%1$d kayıt klasörü</string> + <string name="games_saves_summary">%1$s · %2$d dosya · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Kayıtları yönet</string> + <string name="games_saves">Oyun kayıtları</string> + <string name="games_import_saves">Kayıtları içe aktar…</string> + <string name="games_export_gamehub">GameHub zip\'i olarak dışa aktar…</string> + <string name="games_export_winlator">Winlator zip\'i olarak dışa aktar…</string> + <string name="games_open_save_folder">Kayıt klasörünü aç</string> + <string name="games_never_played">Hiç oynanmadı</string> + <string name="games_runtime_busy_percent">Çalışma ortamı meşgul · %1$d%%</string> + <string name="games_runtime_busy">Çalışma ortamı meşgul</string> + <string name="games_runtime_first_play">Çalışma ortamı ilk Oyna\'da yüklenir</string> + <string name="games_runtime_update">Çalışma ortamı güncellemesi var</string> + <string name="games_runtime_ready">● Çalışma ortamı hazır</string> + <string name="games_last_played">Son oynanma %1$s</string> + <string name="games_internal">Dahili depolama</string> + <string name="games_added">Eklenen oyun</string> + <string name="games_custom">Özel oyun</string> + <string name="games_store_storage">Oyun depolama alanı</string> + <string name="gpu_auto_hint">Bu GPU için en iyi çift, güncel tutulur</string> + <string name="gpu_manual_hint">Çifti kendiniz seçin</string> + <string name="gpu_checking">Sürücüler kontrol ediliyor…</string> + <string name="gpu_none_listed">Henüz listelenen sürücü yok. Aramak için yenileyin.</string> + <string name="gpu_hide_other">Diğer GPU\'lara ait sürücüleri gizle</string> + <string name="gpu_show_other">Diğer GPU\'lara ait sürücüleri göster</string> + <string name="gpu_advanced">Gelişmiş</string> + <string name="gpu_set_with_display">Ekran sürücüsüyle birlikte ayarlanır: %1$s ikisini de taşır.</string> + <string name="gpu_set_with_runtime">Çalışma ortamı sürücüsüyle birlikte ayarlanır: %1$s ikisini de taşır.</string> + <string name="gpu_runtime_hint">Oyunlar ve masaüstü tarafından kullanılır.</string> + <string name="gpu_runtime_default">Çalışma ortamı varsayılanı</string> + <string name="gpu_auto_by_gpu">Otomatik - GPU\'ya göre seçilir</string> + <string name="gpu_manage">İndir, içe aktar veya sil…</string> + <string name="gpu_in_use_caps">KULLANIMDA</string> + <string name="gpu_builtin">DroidDeck\'e yerleşik sürücüler</string> + <string name="gpu_matched_pair">Çalışma ortamı ve ekran sürücüleri eşleşen bir çift olarak birlikte ayarlanır.</string> + <string name="gpu_recommended_for">Bu GPU için önerilir: %1$s.</string> + <string name="gpu_refresh_hint">Bu GPU için sürücü aramak için yenileyin.</string> + <string name="gpu_recommended_caps">ÖNERİLİR</string> + <string name="gpu_unavailable">Kullanılamıyor</string> + <string name="load_runtime">Linux çalışma ortamı</string> + <string name="load_runtime_detail">Linux çalışma ortamı hazırlanıyor</string> + <string name="load_session">Oturum</string> + <string name="load_session_detail">Ekran ve ses başlatılıyor</string> + <string name="load_steam">Steam istemcisi</string> + <string name="load_steam_detail">Steam ve uyumluluk araçları kontrol ediliyor</string> + <string name="load_opening_steam">Steam açılıyor</string> + <string name="load_opening_steam_detail">Steam\'in ilk karesi bekleniyor</string> + <string name="load_desktop">Masaüstü</string> + <string name="load_desktop_detail">Masaüstü hazırlanıyor</string> + <string name="load_opening">Açılıyor</string> + <string name="load_opening_detail">İlk kare bekleniyor</string> + <string name="load_starting_steam">Steam başlatılıyor</string> + <string name="load_ended">Oturum sona erdi</string> + <string name="load_step">Adım %1$d / %2$d</string> + <string name="load_steam_paused">Steam duraklatıldı</string> + <string name="deck_tab_grips">Tutamaklar</string> + <string name="deck_tab_left">Sol taraf</string> + <string name="deck_tab_right">Sağ taraf</string> + <string name="deck_tab_both">Her ikisi</string> + <string name="deck_tab_gamepad">Oyun kolu</string> + <string name="deck_surface_stick">Çubuk</string> + <string name="deck_surface_trackpad">Dokunmatik yüzey</string> + <string name="deck_surface_switch">Çubuk ile dokunmatik yüzey arasında geçiş yap</string> + <string name="deck_more_controls">Diğer Deck kontrolleri</string> + <string name="deck_panels">PANELLER</string> + <string name="deck_close">İkinci ekran kontrollerini kapat</string> + <string name="deck_open_steam_menu">Steam menüsünü aç</string> + <string name="deck_left_upper">Sol · üst</string> + <string name="deck_left_lower">Sol · alt</string> + <string name="deck_right_upper">Sağ · üst</string> + <string name="deck_right_lower">Sağ · alt</string> + <string name="deck_click">Tıkla</string> + <string name="deck_right_trackpad">Sağ dokunmatik yüzey</string> + <string name="deck_left_trackpad">Sol dokunmatik yüzey</string> + <string name="second_trackpad">Dokunmatik yüzey</string> + <string name="second_show_keyboard">Klavyeyi göster</string> + <string name="second_hide_keyboard">Klavyeyi gizle</string> + <string name="second_terminal">Linux terminali</string> + <string name="second_terminal_not_ready">Linux oturumu henüz terminal için hazır değil.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Oyunlar</string> + <string name="rail_desktop">Masaüstü</string> + <string name="rail_store">Mağaza</string> + <string name="rail_components">Bileşenler</string> + <string name="rail_apps">Uygulamalar</string> + <string name="rail_setup">Kurulum</string> + <string name="rail_updates">Güncellemeler</string> + <string name="rail_percent">%%%1$d</string> + <string name="rail_resume_named">Devam et: %1$s</string> + <string name="roms_text">Her oturumda /root/ROMs olarak görünür. Dahili depolama /root/Storage konumundadır.</string> + <string name="roms_none">Klasör seçilmedi</string> + <string name="roms_applies">Sonraki oturumda uygulanır. SD kartlar da çalışır.</string> + <string name="roms_choose">Klasör seç</string> + <string name="roms_change">Klasörü değiştir</string> + <string name="proton_lede">Bir ARM64 Proton derlemesi yükleyin, ardından Steam → Özellikler → Uyumluluk bölümünde oyun bazında seçin.</string> + <string name="proton_stop_first">Uyumluluk aracı yüklemek veya kaldırmak için çalışan oturumu durdurun.</string> + <string name="proton_available">Mevcut derlemeler</string> + <string name="proton_installed">Yüklü: %1$s</string> + <string name="proton_queued">Önceki bir istekten bekliyor</string> + <string name="proton_not_installed">Yüklü değil</string> + <string name="proton_update_available">Güncelleme mevcut → %1$s</string> + <string name="proton_remove_older">Eski %1$s sürümlerini kaldır</string> + <string name="proton_remove_older_body">%1$s kaldırılır. Bu sürümlere ayarlı oyunlar başka bir Proton sürümüne geçirilmelidir.</string> + <string name="proton_remove_body">Bu sürüme ayarlı oyunlar başka bir Proton sürümüne geçirilmelidir.</string> + <string name="proton_install_now">Şimdi yükle</string> + <string name="proton_cancel_queued">Sıradakini iptal et</string> + <string name="pckb_android">Android klavyesi</string> + <string name="pckb_hide">Gizle ✕</string> + <string name="main_launch_named">Başlat: %1$s</string> + <string name="main_choose_screen">Bir ekran seçin. İkincil: %1$s.</string> + <string name="main_secondary_gone">İkincil ekran artık kullanılamıyor.</string> + <string name="main_primary">Birincil ekran</string> + <string name="main_secondary">İkincil ekran</string> + <string name="widgets_prev_tab">Önceki sekme</string> + <string name="widgets_next_tab">Sonraki sekme</string> + <string name="widgets_on">Açık</string> + <string name="widgets_all_n">Tümü (%1$d)</string> + <string name="widgets_none">Hiçbiri</string> + <string name="widgets_n_of_m">%1$d / %2$d</string> + <string name="widgets_off">Kapalı</string> + <string name="screen_bottom">Alt ekran</string> + <string name="game_env_applies">Oyun bir sonraki başlatıldığında uygulanır. Oyunun profili ortak profili geçersiz kılar.</string> + <string name="game_env_other">Uygulama kimliğiyle başka bir oyun…</string> + <string name="game_env_done">Bitti</string> + <string name="game_env_default">Varsayılan</string> + <string name="game_env_off">Kapalı</string> + <string name="game_env_change">Değiştir…</string> + <string name="game_env_change_title">Değişkeni değiştir</string> + <string name="game_env_restore_default">Varsayılana dön</string> + <string name="game_env_eyebrow">Proton oyunları</string> + <string name="pip_title">Pencere içinde pencere</string> + <string name="pip_auto">Otomatik olarak PiP moduna geç</string> + <string name="unfolded_controls">Açılmış ekrandaki kontroller</string> + <string name="unfolded_controls_hint">Cihaz açıkken oyun, Steam Deck dokunmatik yüzeylerinin ve arka tutamaklarının üstünde durur. Katlıyken oyun tam ekran olur.</string> + <string name="pip_suspended">Askıya alındı</string> + <string name="pip_not_ready">Pencere içinde pencere, oturum hazır olduğunda kullanılabilir.</string> + <string name="pip_permission">Android ayarlarında DroidDeck için pencere içinde pencereye izin verin.</string> + <string name="pip_unavailable">Android, pencere içinde pencereyi açamadı.</string> + <string name="game_shortcut">Kısayol</string> + <string name="game_shortcut_add">Ana ekrana ekle</string> + <string name="game_shortcut_choose">Oyun seç</string> + <string name="game_shortcut_scanning">Yüklü oyunlar taranıyor…</string> + <string name="game_link_copy">Başlatma bağlantısını kopyala</string> + <string name="game_link_copied">Başlatma bağlantısı kopyalandı</string> + <string name="game_shortcut_unsupported">Bu başlatıcı kısayol ekleyemiyor. Bunun yerine “Başlatma bağlantısını kopyala” seçeneğini kullanın.</string> + <string name="game_link_invalid">Geçersiz oyun başlatma bağlantısı.</string> + <string name="game_link_missing">Bu oyun artık DroidDeck kütüphanenizde değil.</string> + <string name="game_link_session_busy">Bir Steam oyunu başlatmadan önce mevcut oturumu durdurun.</string> + <string name="game_link_failed">Oyun Steam\'e gönderilemedi. Yeniden başlatmayı deneyin.</string> + <string name="setup_retry_removal">Kaldırmayı yeniden dene</string> + <string name="runtime_removing">Kaldırılıyor</string> + <string name="runtime_removal_incomplete">Kaldırma tamamlanmadı</string> + <string name="game_file_export">Oyun dosyasını dışa aktar</string> + <string name="game_file_sync">Tüm oyun dosyalarını klasörle eşitle</string> + <string name="game_file_stop_sync">Oyun dosyalarını eşitlemeyi durdur</string> + <string name="game_file_folder">Ön yüz oyun dosyaları için bir klasör seçin</string> + <string name="game_file_exported">Oyun dosyaları şuraya kaydedildi: %1$s</string> + <string name="game_frontend_files">Ön yüz dosyaları</string> + + <string name="main_wait_runtime">Çalışma ortamı işleminin bitmesini bekleyin</string> + <string name="main_wait_proton_install">Uyumluluk aracı yüklemesinin bitmesini bekleyin</string> + <string name="main_wait_desktop_install">Masaüstü uygulaması yüklemesinin bitmesini bekleyin</string> + <string name="main_wait_install_game">Oyun başlatmadan önce yüklemenin bitmesini bekleyin</string> + <string name="main_saves_close_session">Önce Steam oturumunu kapatın; böylece oyun, içe aktarılan kayıtların üzerine yazamaz</string> + <string name="main_saves_importing">İçe aktarılıyor: %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">%2$s içinden %1$d dosya %3$s oyununa aktarıldı</item> + <item quantity="other">%2$s içinden %1$d dosya %3$s oyununa aktarıldı</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">%2$s içinden %1$d dosya %3$s oyununa aktarıldı. Eski kayıtlar Download/DroidDeck/Saves/backups klasörüne yedeklendi</item> + <item quantity="other">%2$s içinden %1$d dosya %3$s oyununa aktarıldı. Eski kayıtlar Download/DroidDeck/Saves/backups klasörüne yedeklendi</item> + </plurals> + <string name="main_saves_pick_zip">%1$s için bir kayıt zip dosyası seçin</string> + <string name="main_saves_exporting">Dışa aktarılıyor: %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">%1$d dosya %2$s olarak dışa aktarıldı: %3$s</item> + <item quantity="other">%1$d dosya %2$s olarak dışa aktarıldı: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">%1$s kayıtlarının konumunu seçin (%2$s)</string> + <string name="main_action_failed">İşlem başarısız (%1$s): %2$s</string> + <string name="main_no_logs_yet">Henüz oturum günlüğü yok: önce bir oturum çalıştırın.</string> + <string name="main_no_logs_to_clear">Temizlenecek oturum günlüğü yok.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">%1$d oturum günlüğü klasörü temizlendi.</item> + <item quantity="other">%1$d oturum günlüğü klasörü temizlendi.</item> + </plurals> + <string name="main_wadb_pair_failed">Kablosuz hata ayıklama eşlemesi başarısız oldu</string> + <string name="main_wadb_command_failed">Kablosuz hata ayıklama komutu başarısız oldu</string> + <string name="main_wadb_unavailable">Kablosuz hata ayıklama kullanılamıyor</string> + <string name="main_adb_copied">ADB komutu kopyalandı</string> + <string name="main_pick_roms">ROM klasörünü seçin</string> + <string name="main_non_adreno_title">Adreno GPU değil</string> + <string name="main_non_adreno_text">Turnip, Adreno GPU\'larını destekler. %1$s üzerinde Steam siyah ekran gösterebilir. İndirme: %2$.0f MB.</string> + <string name="main_install_anyway">Yine de yükle</string> + <string name="main_remove_runtime_title">Linux çalışma ortamını kaldır</string> + <string name="main_remove_runtime_text">Bu işlem çalışma ortamını, içindeki Steam istemcisini ve oraya yüklenen tüm oyunları siler.</string> + <string name="main_applied">Uygulandı: %1$s</string> + <string name="android_app_open_failed_primary">%1$s birincil ekranda açılamadı</string> + <string name="android_app_open_failed_on">%1$s, %2$s üzerinde açılamadı</string> + <string name="android_app_open_failed_display">%1$s, %2$d numaralı ekranda açılamadı</string> + <string name="comp_busy_importing">İçe aktarılıyor</string> + <string name="comp_busy_swapping">Değiştiriliyor</string> + <string name="comp_busy_restoring">Geri yükleniyor</string> + <string name="comp_busy_cancelling">İptal ediliyor</string> + <string name="comp_busy_deleting">Siliniyor</string> + <string name="comp_cannot_read">dosya okunamıyor</string> + <string name="comp_imported">İçe aktarıldı: %1$s</string> + <string name="comp_swap_cancelled">Bekleyen değişim iptal edildi.</string> + <string name="comp_pick_wcp">Bir bileşen paketi seçin (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Nightlies kaynağına ulaşılamadı</string> + <string name="comp_stored">Kaydedildi: %1$s</string> + <string name="comp_download_failed">İndirme başarısız oldu: %1$s</string> + <string name="drivers_pick_linux">Bir Linux çalışma ortamı sürücüsü seçin (-Linux zip veya Android + Linux paketi)</string> + <string name="drivers_pick_android">Bir ekran sürücüsü seçin (AdrenoTools zip veya Android + Linux paketi)</string> + <string name="drivers_pick_any">Bir sürücü zip dosyası veya Android + Linux paketi seçin</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">%1$s kaldırılıyor…</string> + <string name="main_forgetting_named">%1$s unutuluyor…</string> + <string name="main_pick_game_storage">Oyun depolama klasörünü seçin</string> + <string name="main_pick_decky_zip">Bir Decky eklentisi ZIP dosyası seçin</string> + <string name="main_storage_not_usable">Kullanılamaz: %1$s</string> + <string name="main_running_program">Program</string> + <string name="main_removing_runtime">Linux çalışma ortamı kaldırılıyor</string> + <string name="main_settings_main_screen">Ayarlar alt ekranda açılamadı; ana ekranda açıldı.</string> + <string name="main_open_dev_options">Ayarlar\'da Geliştirici seçeneklerini açın</string> + + <string name="upd_unknown_apps_failed">Android\'in “Bilinmeyen uygulamaları yükle” ayarı açılamadı</string> + <string name="upd_couldnt_check">Kontrol edilemedi: %1$s</string> + <string name="upd_no_download">Bu sürümde DroidDeck\'in bu kopyası için indirme yok</string> + <string name="upd_stop_first">Önce çalışan oturumu durdurun, ardından güncelleyin</string> + <string name="upd_stage_downloading">İndiriliyor</string> + <string name="upd_stage_installing">Yükleniyor</string> + <string name="upd_stage_confirm">Onayınız bekleniyor</string> + <string name="upd_failed">Güncelleme başarısız oldu</string> + <string name="upd_not_offered">Android güncellemeyi yüklemeyi önermedi</string> + + <string name="decky_install_failed">Decky yüklemesi başarısız oldu: %1$s</string> + <string name="decky_plugin_starting">Eklenti içe aktarma başlatılıyor…</string> + <string name="decky_plugin_failed">Eklenti içe aktarma başarısız oldu: %1$s</string> + <string name="decky_plugin_installed">Eklenti yüklendi. Etkinleştirmek için Steam\'i yeniden başlatın.</string> + + <string name="drivers_not_checked">Henüz kontrol edilmedi - yeni sürücüleri aramak için yenile düğmesine dokunun</string> + <string name="drivers_bundle_sets_display">Android + Linux: ekran sürücüsünü de birlikte ayarlar</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: çalışma ortamı sürücüsünü de birlikte ayarlar</string> + <string name="drivers_runtime_builtin">çalışma ortamına yerleşik Turnip</string> + <string name="drivers_system_vulkan">sistem Vulkan sürücüsü: bu GPU için dahili derleme yok</string> + <string name="drivers_bundled">%1$s (dahili)</string> + <string name="drivers_manual">Manuel</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Şu anda yalnızca bir yarısı yayımlanmış</string> + <string name="drivers_pair_size">İkisi için %1$.0f MB</string> + <string name="drivers_none_to_set">Ayarlanacak sürücü yok: %1$s</string> + <string name="drivers_checking_latest">En son sürücüler kontrol ediliyor…</string> + <string name="drivers_up_to_date_check_failed">Güncel (kontrol edilemedi: %1$s)</string> + <string name="drivers_recommended_unpublished">Önerilen sürücüler şu anda yayımlanmış değil</string> + <string name="drivers_downloading_pair">%1$s %2$s indiriliyor…</string> + <string name="drivers_updated_to">%1$s %2$s sürümüne güncellendi.</string> + <string name="drivers_updated_to_restart">%1$s %2$s sürümüne güncellendi. Ekran sürücüsü, DroidDeck yeniden başlatıldıktan sonra uygulanır.</string> + <string name="drivers_auto_waits_for_session">Sürücü güncellemeleri oturum bitene kadar bekler.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s, mobil veriyi ve pil tasarrufunu kapattığınızda indirilecek.</string> + <string name="drivers_skipping_bad">%1$s %2$s burada oturum başlatmadı, bu yüzden Otomatik çalışan sürücülerde kalıyor.</string> + <string name="drivers_rolled_back">%1$s iki kez oturum başlatmadı, bu yüzden Otomatik çalışan sürücülere geri döndü.</string> + <string name="drivers_switched_to">%1$s %2$s sürümüne geçildi.</string> + <string name="drivers_switched_to_restart">%1$s %2$s sürümüne geçildi. Ekran sürücüsü, DroidDeck yeniden başlatıldıktan sonra uygulanır.</string> + <string name="drivers_using">Kullanılan: %1$s %2$s.</string> + <string name="drivers_using_restart">Kullanılan: %1$s %2$s. Ekran sürücüsü, DroidDeck yeniden başlatıldıktan sonra uygulanır.</string> + <string name="drivers_using_quest">Pakette gelen Quest görüntü sürücüsü ve varsayılan çalışma zamanı kullanılıyor.</string> + <string name="drivers_using_quest_restart">Pakette gelen Quest görüntü sürücüsü ve varsayılan çalışma zamanı kullanılıyor. Görüntü sürücüsü DroidDeck yeniden başladıktan sonra geçerli olur.</string> + <string name="drivers_not_a_driver">Sürücü zip dosyası değil: ne AdrenoTools sürücüsü, ne -Linux Turnip ne de Android + Linux paketi</string> + <string name="drivers_import_failed">İçe aktarma başarısız oldu: %1$s</string> + <string name="drivers_imported_unnamed">İçe aktarılan sürücü</string> + <string name="drivers_using_bundle">%1$s hem çalışma ortamı hem de ekran sürücüsü olarak kullanılıyor.</string> + <string name="drivers_using_bundle_restart">%1$s hem çalışma ortamı hem de ekran sürücüsü olarak kullanılıyor. Ekran sürücüsü, DroidDeck yeniden başlatıldıktan sonra uygulanır.</string> + <string name="drivers_deleted_bundle">Silindi: %1$s (iki sürücü de)</string> + <string name="drivers_deleted">Silindi: %1$s</string> + <string name="drivers_release_status">En son: %1$s · %2$s kontrol edildi</string> + <string name="drivers_release_status_failed">En son: %1$s · %2$s ulaşılamıyor · %3$s kontrol edildi</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d dk önce</item> + <item quantity="other">%1$d dk önce</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d sa önce</item> + <item quantity="other">%1$d sa önce</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d gün önce</item> + <item quantity="other">%1$d gün önce</item> + </plurals> + <string name="drivers_checking_sources">Banners-Turnip, WinNative ve DroidDeck kontrol ediliyor…</string> + <string name="drivers_check_failed">kontrol başarısız oldu</string> + <string name="drivers_installed_pick_either">%1$s yüklendi - iki sürücüyü de ayarlamak için listelerden birinde seçin</string> + <string name="drivers_installed_pick">%1$s yüklendi - menüden seçin</string> + + <string name="session_wait_removal">Çalışma ortamının kaldırılmasının bitmesini bekleyin</string> + <string name="session_title_game">Oyun</string> + <string name="session_touch_auto_touchpad">dokunmatik yüzey</string> + <string name="session_touch_auto_direct">doğrudan</string> + <string name="session_swap_failed">Değiştirme başarısız oldu: %1$s</string> + <string name="session_profile_save_failed">Profil kaydedilemedi: %1$s</string> + <string name="session_desktop_paused">Masaüstü duraklatıldı</string> + <string name="session_named_paused">%1$s duraklatıldı</string> + <string name="session_program_paused">Program duraklatıldı</string> + <string name="session_starting_desktop">Masaüstü başlatılıyor</string> + <string name="session_starting_named">%1$s başlatılıyor</string> + <string name="session_starting_program">Program başlatılıyor</string> + <string name="session_no_logs">Bu oturum için günlük yok.</string> + <string name="session_logs_archive_failed">Oturum günlüğü arşivi oluşturulamadı.</string> + <string name="session_logs_share_failed">Oturum günlükleri paylaşılamadı.</string> + <string name="session_starting_session">Oturum başlatılıyor…</string> + <string name="session_runtime_downloading">Linux çalışma ortamı indiriliyor</string> + <string name="session_runtime_downloading_mb">Linux çalışma ortamı indiriliyor · %1$d / %2$d MB</string> + <string name="session_runtime_checking">Linux çalışma ortamı kontrol ediliyor</string> + <string name="session_runtime_unpacking">Linux çalışma ortamı ayıklanıyor</string> + <string name="session_desktop_downloading">masaüstü indiriliyor</string> + <string name="session_desktop_downloading_mb">masaüstü indiriliyor · %1$d / %2$d MB</string> + <string name="session_desktop_checking">masaüstü kontrol ediliyor</string> + <string name="session_desktop_unpacking">masaüstü ayıklanıyor</string> + <string name="session_proton_downloading">Proton Experimental (ARM64) indiriliyor</string> + <string name="session_proton_downloading_mb">Proton Experimental (ARM64) indiriliyor · %1$d / %2$d MB</string> + <string name="session_proton_checking">Proton Experimental (ARM64) kontrol ediliyor</string> + <string name="session_proton_unpacking">Proton Experimental (ARM64) ayıklanıyor</string> + <string name="session_runtime_catalog_unreachable">Çalışma ortamı kataloğuna ulaşılamadı. Bağlantıyı kontrol edip yeniden Oyna\'ya basın.</string> + <string name="session_runtime_install_failed">Linux çalışma ortamı yüklenmedi. Kurulum bölümünde çalışma ortamını kontrol edip yeniden Oyna\'ya basın.</string> + <string name="session_desktop_install_failed">Masaüstü yüklenmedi (%1$s). Bağlantıyı kontrol edip yeniden Masaüstü\'ne basın.</string> + <string name="session_ended_named">%1$s beklenmedik şekilde durdu. Günlükleri bir hata raporuyla paylaşın veya yeniden deneyin.</string> + <string name="session_ended_program">Program beklenmedik şekilde durdu. Günlükleri bir hata raporuyla paylaşın veya yeniden deneyin.</string> + <string name="session_ended_desktop">Masaüstü beklenmedik şekilde durdu. Günlükleri bir hata raporuyla paylaşın veya yeniden deneyin.</string> + <string name="session_ended_detail">Çıkış durumu %1$d · %2$s</string> + <string name="session_ended_no_log">günlük yok</string> + <plurals name="session_hint_enosys"> + <item quantity="one">Günlükte %1$d “Function not implemented” hatası görünüyor: proot\'un seccomp hızlandırması bu cihazda bir yardımcı işlemi bozuyor. %2$s → “%3$s” (veya “%4$s”) seçeneğini deneyip yeniden başlatın.</item> + <item quantity="other">Günlükte %1$d “Function not implemented” hatası görünüyor: proot\'un seccomp hızlandırması bu cihazda bir yardımcı işlemi bozuyor. %2$s → “%3$s” (veya “%4$s”) seçeneğini deneyip yeniden başlatın.</item> + </plurals> + + <string name="mode_decky_plugins">Eklentiler</string> + <string name="mode_decky_plugins_hint">Sonraki Steam oturumu için bir eklenti ZIP dosyası yükleyin.</string> + <string name="mode_decky_plugin_downloading">İndiriliyor…</string> + <string name="mode_decky_plugin_install_zip">ZIP dosyasından yükle</string> + <string name="store_cat_games">Oyunlar</string> + <string name="store_cat_audio_video">Ses ve Video</string> + <string name="store_cat_graphics">Grafik</string> + <string name="store_cat_internet">İnternet</string> + <string name="store_cat_office">Ofis</string> + <string name="store_cat_developer">Geliştirici</string> + <string name="store_cat_education">Eğitim</string> + <string name="store_cat_science">Bilim</string> + <string name="store_cat_system">Sistem</string> + <string name="store_cat_utilities">Araçlar</string> + <string name="store_section_popular">Popüler</string> + <string name="store_section_trending">Gündemde</string> + <string name="store_section_new">Yeni</string> + <string name="store_section_updated">Güncellenen</string> + <string name="store_section_loading">yükleniyor…</string> + <string name="store_flatpak_setup">Flatpak kurulumu</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Flathub\'da güncellemeler kontrol edilemedi</string> + <string name="content_rom_installed">yüklü</string> + <string name="content_rom_folder">klasör</string> + <string name="theme_graphite">Grafit</string> + <string name="theme_graphite_detail">Grafit yüzeyler; seçilen, odaklanan veya basılan her şey için logonun kendi küre mavisi.</string> + <string name="theme_paper">Siyah üzerine kâğıt</string> + <string name="theme_paper_detail">Ana renk beyaz; simgenin mavisi çizgiler, halkalar ve noktalar için vurgu rengi.</string> + <string name="theme_icon_blue">Simge mavisi</string> + <string name="theme_icon_blue_detail">Siyah zemin, beyaz yazı; seçilen, odaklanan veya basılan her şey için mavi.</string> + <string name="theme_electric">Elektrik laciverti</string> + <string name="theme_electric_detail">Daha parlak mavi; gri yerine laciverte çalan yüzeylerde.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Boşluk</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Önce çalışma ortamını yükleyin</string> + <string name="game_sync_err_steam_library">Steam kütüphanesi kullanılamıyor</string> + <string name="game_sync_err_previous_sd">Önceki SD kütüphanesi kullanılamıyor</string> + <string name="game_sync_err_game_storage">Oyun depolama alanı kullanılamıyor</string> + <string name="game_sync_err_added_games">Eklenen oyunlar klasörü kullanılamıyor</string> + <string name="game_sync_err_manifests">Steam manifest dosyaları kullanılamıyor</string> + <string name="content_system_many">Birçok sistem</string> + <string name="fm_drive_internal">Dahili</string> + <string name="fm_drive_linux">Linux sistemi</string> + <string name="fm_drive_sd">SD kart</string> + <string name="fm_drive_storage">Depolama</string> + <string name="fm_select">Seç</string> + <string name="fm_properties">Özellikler</string> + <string name="fm_favorite_add">Favorilere ekle</string> + <string name="fm_favorite_remove">Favorilerden kaldır</string> + <string name="fm_rename">Yeniden adlandır</string> + <string name="fm_copy">Kopyala</string> + <string name="fm_cut">Kes</string> + <string name="fm_actions">İşlemler</string> + <string name="fm_favorites">Favoriler</string> + <string name="fm_pin_current">Geçerli klasörü sabitle</string> + <string name="fm_no_favorites">Henüz favori yok - buraya hızlıca dönmek için bir klasörü ⋮ menüsünden sabitleyin.</string> + <string name="fm_unpin_favorite">Favorilerden kaldır</string> + <string name="fm_size_zero">0 bayt</string> + <string name="fm_unit_bytes">bayt</string> + <string name="fm_prop_location">Konum</string> + <string name="fm_prop_type">Tür</string> + <string name="fm_prop_size">Boyut</string> + <string name="fm_prop_modified">Değiştirilme</string> + <string name="fm_type_folder">Klasör</string> + <string name="fm_type_file">Dosya</string> + <string name="fm_type_ext_file">%1$s dosyası</string> + <string name="fm_read_only">Salt okunur</string> + <string name="fm_read_only_hint">Oyunların (ve Wine\'ın) bu dosyanın üzerine yazmasını veya onu silmesini engeller.</string> + <string name="fm_read_only_failed">Salt okunur ayarı değiştirilemedi</string> + <string name="fm_hidden">Gizli</string> + <string name="fm_hidden_unsupported">Bu depolama alanı gizli işaretini saklayamaz.</string> + <string name="fm_hidden_hint">Dosyayı Windows\'ta gizli olarak işaretler (Wine\'ın gizli özniteliği).</string> + <string name="fm_hidden_failed">Bu depolama alanında Gizli ayarı değiştirilemedi</string> + <string name="fm_done">Bitti</string> + <string name="fm_op_deleting">Siliniyor...</string> + <string name="fm_delete_failed">Silinemedi</string> + <string name="fm_op_moving">Taşınıyor...</string> + <string name="fm_op_copying">Kopyalanıyor...</string> + <string name="fm_op_moving_item">Taşınıyor - %1$s</string> + <string name="fm_op_copying_item">Kopyalanıyor - %1$s</string> + <string name="fm_op_moving_batch">Taşınıyor %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Kopyalanıyor %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d tamamlandı, %2$d başarısız</string> + <string name="fm_paste_skipped">%1$d tamamlandı, %2$d atlandı</string> + <plurals name="fm_paste_moved"> + <item quantity="one">%1$d öğe taşındı</item> + <item quantity="other">%1$d öğe taşındı</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">%1$d öğe kopyalandı</item> + <item quantity="other">%1$d öğe kopyalandı</item> + </plurals> + <string name="fm_already_exists">“%1$s” zaten var</string> + <string name="fm_op_renaming">Yeniden adlandırılıyor...</string> + <string name="fm_rename_failed">Yeniden adlandırılamadı</string> + <string name="fm_op_creating_folder">Klasör oluşturuluyor...</string> + <string name="fm_create_folder_failed">Klasör oluşturulamadı</string> + <string name="fm_new_folder">Yeni Klasör</string> + <string name="fm_folder_name">Klasör adı</string> + <string name="fm_create">Oluştur</string> + <string name="fm_new_name">Yeni ad</string> + <string name="fm_delete_title">Silinsin mi?</string> + <string name="fm_delete_text">“%1$s” kalıcı olarak silinsin mi?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">%1$d öğe silinsin mi?</item> + <item quantity="other">%1$d öğe silinsin mi?</item> + </plurals> + <string name="fm_cannot_undo">Bu işlem geri alınamaz.</string> + <plurals name="fm_and_more"> + <item quantity="one">…ve %1$d tane daha</item> + <item quantity="other">…ve %1$d tane daha</item> + </plurals> + <string name="fm_op_deleting_batch">Siliniyor %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">%1$d öğe silinemedi</item> + <item quantity="other">%1$d öğe silinemedi</item> + </plurals> + <string name="fm_conflict_merge_hint">Birleştir, mevcut klasörün içine dosya ekler ve dosyaları değiştirir.</string> + <string name="fm_conflict_overwrite_hint">Üzerine yaz, mevcut dosyayı değiştirir.</string> + <string name="fm_conflict_apply_all">Tüm çakışmalara uygula</string> + <string name="fm_conflict_merge">Birleştir</string> + <string name="fm_conflict_overwrite">Üzerine yaz</string> + <string name="fm_conflict_keep_both">İkisini de koru</string> + <string name="fm_conflict_skip">Atla</string> + <string name="fm_select_this_folder">Bu klasörü seç</string> + <string name="fm_back">Geri</string> + <string name="fm_drive_not_readable">%1$s bağlı ancak şu anda okunamıyor</string> + <string name="fm_list_view">Liste görünümü</string> + <string name="fm_grid_view">Izgara görünümü</string> + <string name="fm_search">Ara</string> + <string name="fm_sort">Sırala</string> + <string name="fm_sort_name">Ad</string> + <string name="fm_sort_date">Değiştirilme tarihi</string> + <string name="fm_rows_comfortable">Geniş satırlar</string> + <string name="fm_rows_compact">Kompakt satırlar</string> + <string name="fm_hide_hidden">Gizli dosyaları gizle</string> + <string name="fm_show_hidden">Gizli dosyaları göster</string> + <string name="fm_hide_favorites">Favorileri gizle</string> + <string name="fm_show_favorites">Favorileri göster</string> + <string name="fm_filter_folder">Bu klasörü filtrele</string> + <string name="fm_free_space">%1$s boş</string> + <string name="fm_selected_count">%1$d seçildi</string> + <string name="fm_select_none">Hiçbiri</string> + <string name="fm_select_all">Tümü</string> + <string name="fm_paste">Yapıştır</string> + <plurals name="fm_items"> + <item quantity="one">%1$d öğe</item> + <item quantity="other">%1$d öğe</item> + </plurals> + <string name="fm_paste_here">Buraya yapıştır: %1$s</string> + <string name="fm_paste_move_here">Buraya yapıştır (taşı): %1$s</string> + <string name="fm_rail_title">Dosyalar</string> + <string name="fm_rail_storage">DEPOLAMA</string> + <string name="fm_rail_quick">HIZLI ERİŞİM</string> + <string name="fm_rail_favorites">FAVORİLER</string> + <string name="fm_rail_downloads">İndirilenler</string> + <string name="fm_rail_downloads_short">İndirilen</string> + <string name="fm_rail_roms">ROM\'lar</string> + <string name="fm_rail_session_logs">Oturum günlükleri</string> + <string name="fm_rail_pictures">Resimler</string> + <string name="fm_favorite_added">“%1$s” Favorilere eklendi</string> + <string name="fm_favorite_removed">“%1$s” Favorilerden kaldırıldı</string> + <string name="fm_empty_directory">Boş klasör</string> + <string name="fm_up_one_level">Bir üst düzey</string> + <string name="fm_choose_folder">Bir klasör seçin</string> + <string name="fm_choose_file">Bir dosya seçin</string> + <string name="ctrl_tint_steam_blue">Steam mavisi</string> + <string name="ctrl_tint_sky">Gök mavisi</string> + <string name="ctrl_tint_white">Beyaz</string> + <string name="ctrl_tint_violet">Mor</string> + <string name="ctrl_tint_green">Yeşil</string> + <string name="ctrl_tint_amber">Kehribar</string> + <string name="ctrl_tint_red">Kırmızı</string> + <string name="ctrl_tint_pink">Pembe</string> + <string name="ctrl_button_a">A düğmesi</string> + <string name="ctrl_button_b">B düğmesi</string> + <string name="ctrl_button_x">X düğmesi</string> + <string name="ctrl_button_y">Y düğmesi</string> + <string name="ctrl_button_lb">Sol omuz tuşu</string> + <string name="ctrl_button_rb">Sağ omuz tuşu</string> + <string name="ctrl_button_lt">Sol tetik</string> + <string name="ctrl_button_rt">Sağ tetik</string> + <string name="ctrl_button_view">Görünüm düğmesi</string> + <string name="ctrl_button_menu">Menü düğmesi</string> + <string name="ctrl_target_view">Görünüm</string> + <string name="ctrl_target_menu">Menü</string> + <string name="ctrl_target_up">Yön tuşu yukarı</string> + <string name="ctrl_target_down">Yön tuşu aşağı</string> + <string name="ctrl_target_left">Yön tuşu sol</string> + <string name="ctrl_target_right">Yön tuşu sağ</string> + <string name="ctrl_target_hidden">Gizli</string> + <string name="ctrl_editor_drag">Taşımak için sürükleyin</string> + <string name="ctrl_editor_snap">Hizala</string> + <string name="ctrl_editor_save">Kaydet</string> + <string name="second_mode_none">Hiçbiri</string> + <string name="second_mode_keyboard_trackpad">Klavye + dokunmatik yüzey</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Deck tutamakları + dokunmatik yüzeyler</string> + + <string name="rtinst_removing">Linux çalışma ortamı kaldırılıyor</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Linux çalışma ortamı kaldırılıyor · %1$d öğe</item> + <item quantity="other">Linux çalışma ortamı kaldırılıyor · %1$d öğe</item> + </plurals> + <string name="rtinst_removed">Linux çalışma ortamı kaldırıldı</string> + <string name="rtinst_removal_failed">Linux çalışma ortamının kaldırılması tamamlanamadı. Kurulum bölümünden kaldırmayı yeniden deneyin.</string> + <string name="rtinst_removing_leftovers">Çalışma ortamı kalıntıları kaldırılıyor</string> + <string name="rtinst_downloading">İndiriliyor</string> + <string name="rtinst_verifying">Doğrulanıyor</string> + <string name="rtinst_extracting">Ayıklanıyor</string> + <string name="rtinst_channel_description">Linux çalışma ortamı yüklenirken veya kaldırılırken gösterilir</string> + <string name="rtinst_title_installing">Linux çalışma ortamı yükleniyor</string> + <string name="rtinst_title_removing">Linux çalışma ortamı kaldırılıyor</string> + + <string name="deskpkg_runtime_missing">Linux çalışma ortamı yüklü değil</string> + <string name="deskpkg_no_checksum">Katalogda %1$s için sağlama toplamı yok</string> + <string name="deskpkg_checksum_mismatch">Sağlama toplamı uyuşmuyor - hiçbir şey değiştirilmedi</string> + <string name="deskpkg_installing">%1$s yükleniyor</string> + <string name="deskpkg_place_failed">AppImage yerleştirilemedi</string> + <string name="deskpkg_extract_failed">Ayıklama başarısız oldu</string> + <string name="deskpkg_install_failed">Yükleme başarısız oldu</string> + + <string name="flatpakmgr_setup_failed">Flatpak kurulumu başarısız oldu (çıkış %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Flatpak kurulumu tamamlanmadı</string> + <string name="flatpakmgr_busy">Başka bir mağaza görevi çalışıyor</string> + <string name="flatpakmgr_not_ready">Önce Flatpak\'i kurun</string> + <string name="flatpakmgr_starting">Başlatılıyor</string> + <string name="flatpakmgr_exit_status">Flatpak %1$d durum koduyla çıktı</string> + <string name="flatpakmgr_installing">%1$s yükleniyor</string> + <string name="flatpakmgr_updating">%1$s güncelleniyor</string> + <string name="flatpakmgr_removing">%1$s kaldırılıyor</string> + <string name="flatpakmgr_installing_step">%1$s yükleniyor (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">%1$s güncelleniyor (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">%1$s kaldırılıyor (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">çeviriler</string> + <string name="flatpakmgr_ref_graphics_drivers">grafik sürücüleri</string> + <string name="flatpakmgr_ref_media_codecs">medya kodekleri</string> + <string name="flatpakmgr_ref_runtime">%1$s çalışma ortamı</string> + <string name="flatpakmgr_ref_runtime_branch">%1$s çalışma ortamı %2$s</string> + + <string name="appimg_too_small">Dosya, AppImage olamayacak kadar küçük</string> + <string name="appimg_unreadable">Dosya okunamıyor: %1$s</string> + <string name="appimg_not_linux">Bu bir AppImage değil (Linux programı değil)</string> + <string name="appimg_wrong_arch">Bu AppImage ne ARM64 (aarch64) ne de x86 bilgisayarlar için derlenmiş</string> + <string name="appimg_not_appimage">Bu bir Linux programı ama AppImage değil</string> + <string name="appimg_wrong_type">Yalnızca Tür 2 AppImage dosyaları içe aktarılabilir (bu dosya Tür %1$d)</string> + <string name="appimg_no_space_import">Yeterli boş alan yok: içe aktarma için yaklaşık %1$s gerekiyor</string> + <string name="appimg_no_space_update">Yeterli boş alan yok: güncelleme için yaklaşık %1$s gerekiyor</string> + <string name="appimg_import_failed">İçe aktarma başarısız oldu</string> + <string name="appimg_gone">Bu AppImage artık yok</string> + <string name="appimg_update_failed">Güncelleme başarısız oldu</string> + <string name="appimg_extracting">%1$s ayıklanıyor</string> + <string name="appimg_extract_failed">AppImage ayıklanamadı</string> + <string name="appimg_extract_failed_detail">AppImage ayıklanamadı: %1$s</string> + + <string name="deckymgr_stop_session_loader">Decky Loader\'ı yüklemeden önce etkin oturumu durdurun</string> + <string name="deckymgr_download_failed">Decky Loader indirilemedi</string> + <string name="deckymgr_size_mismatch">Decky Loader boyutu yayın meta verileriyle eşleşmedi</string> + <string name="deckymgr_checksum_download_failed">Yayının sağlama toplamı indirilemedi</string> + <string name="deckymgr_checksum_missing">Yayının sağlama toplamı eksik</string> + <string name="deckymgr_checksum_invalid">Yayının sağlama toplamı geçersiz</string> + <string name="deckymgr_checksum_mismatch">Decky Loader sağlama toplamı uyuşmuyor</string> + <string name="deckymgr_not_elf">Yayın dosyası uyumlu bir 64 bit Linux çalıştırılabilir dosyası değil</string> + <string name="deckymgr_session_started_loader">İndirme sırasında bir oturum başladı; Decky Loader\'ı yüklemeden önce durdurun</string> + <string name="deckymgr_loader_not_executable">PluginLoader çalıştırılabilir olarak işaretlenemedi</string> + <string name="deckymgr_cef_failed">Steam CEF uzaktan hata ayıklaması etkinleştirilemedi</string> + <string name="deckymgr_stage_failed">PluginLoader hazırlanamadı</string> + <string name="deckymgr_loader_preserve_failed">Mevcut PluginLoader korunamadı</string> + <string name="deckymgr_loader_activate_failed">Yeni PluginLoader etkinleştirilemedi</string> + <string name="deckymgr_stop_session_plugin">Bir eklenti yüklemeden önce etkin oturumu durdurun</string> + <string name="deckymgr_loader_required">Bir eklenti içe aktarmadan önce Decky Loader\'ı yükleyin</string> + <string name="deckymgr_zip_unreadable">Seçilen ZIP dosyası okunamadı</string> + <string name="deckymgr_plugins_dir_failed">Decky eklentiler dizini oluşturulamadı</string> + <string name="deckymgr_extracting_zip">Eklenti ZIP\'i ayıklanıyor</string> + <string name="deckymgr_zip_one_folder">Eklenti ZIP\'i en üst düzeyde tek bir eklenti klasörü içermelidir</string> + <string name="deckymgr_zip_missing_files">Eklenti ZIP\'inde plugin.json, package.json veya dist/index.js eksik</string> + <string name="deckymgr_plugin_name_missing">Eklenti adı eksik</string> + <string name="deckymgr_session_started_plugin">Yükleme sırasında bir oturum başladı; bir eklenti yüklemeden önce durdurun</string> + <string name="deckymgr_plugin_installed">Eklenti yüklendi · yüklemek için Steam\'i yeniden başlatın</string> + <string name="deckymgr_plugin_install_failed">Eklenti ZIP\'i yüklemesi başarısız oldu</string> + <string name="deckymgr_zip_too_many">Eklenti ZIP\'i çok fazla öğe içeriyor</string> + <string name="deckymgr_zip_invalid_path">Eklenti ZIP\'i geçersiz bir yol içeriyor</string> + <string name="deckymgr_zip_duplicate_paths">Eklenti ZIP\'i yinelenen yollar içeriyor</string> + <string name="deckymgr_zip_unsafe_path">Eklenti ZIP\'i güvenli olmayan bir yol içeriyor</string> + <string name="deckymgr_folder_failed">Eklenti klasörü oluşturulamadı</string> + <string name="deckymgr_zip_too_large">Eklenti ZIP\'i 1 GiB sınırının üzerine çıkıyor</string> + <string name="deckymgr_bundled_not_executable">Pakete dahil eklenti ikili dosyası çalıştırılabilir olarak işaretlenemedi</string> + <string name="deckymgr_remote_entry_invalid">Geçersiz remote_binary girdisi</string> + <string name="deckymgr_remote_name_invalid">Geçersiz uzak ikili dosya adı</string> + <string name="deckymgr_remote_url_https">Uzak ikili dosya URL\'si HTTPS kullanmalıdır</string> + <string name="deckymgr_remote_hash_invalid">Uzak ikili dosya %1$s geçersiz bir SHA-256 karmasına sahip</string> + <string name="deckymgr_bin_dir_failed">Eklenti bin dizini oluşturulamadı</string> + <string name="deckymgr_downloading_binary">Eklenti ikili dosyası indiriliyor · %1$s</string> + <string name="deckymgr_binary_download_failed">Eklenti ikili dosyası %1$s indirilemedi</string> + <string name="deckymgr_binary_checksum_mismatch">Eklenti ikili dosyası sağlama toplamı uyuşmuyor · %1$s</string> + <string name="deckymgr_binary_not_executable">Eklenti ikili dosyası çalıştırılabilir olarak işaretlenemedi · %1$s</string> + <string name="deckymgr_binary_replace_failed">Eklenti ikili dosyası değiştirilemedi · %1$s</string> + <string name="deckymgr_binary_install_failed">Eklenti ikili dosyası yüklenemedi · %1$s</string> + <string name="deckymgr_folder_taken">Eklenti klasörü başka bir eklentiye ait</string> + <string name="deckymgr_preserve_failed">Mevcut eklenti korunamadı</string> + <string name="deckymgr_activate_failed">İçe aktarılan eklenti etkinleştirilemedi</string> + <string name="deckymgr_settings_failed">Decky eklenti ayarları güncellenemedi</string> + <string name="deckymgr_restore_failed">Mevcut eklenti geri yüklenemedi</string> + + <string name="adbfix_save_failed">Kablosuz hata ayıklama kimliği kaydedilemedi</string> + <string name="adbfix_command_failed">ADB komutu başarısız oldu (%1$d)</string> + <string name="adbfix_not_confirmed">Android, alt süreç sınırının değiştirildiğini onaylamadı: %1$s</string> + <string name="adbfix_no_pairing">Kayıtlı bir Kablosuz hata ayıklama eşleşmesi yok</string> + <string name="adbfix_enter_address">Geçerli Kablosuz hata ayıklama IP adresini ve bağlantı noktasını girin</string> + + <string name="adbpair_timed_out">Eşleştirme açılır penceresi beklenirken zaman aşımına uğradı. DroidDeck\'ten yeniden deneyin.</string> + <string name="adbpair_discovery_failed_code">Eşleştirme açılır penceresi aranamadı (%1$d). Wi-Fi\'nin açık olduğunu kontrol edin.</string> + <string name="adbpair_discovery_failed">Eşleştirme açılır penceresi aranamadı: %1$s</string> + <string name="adbpair_six_digits">Kodun 6 hanesinin tamamını girin</string> + <string name="adbpair_pairing">Eşleştiriliyor…</string> + <string name="adbpair_code_rejected">O kod işe yaramadı. Eşleştirme açılır penceresini yeniden açıp yeni kodunu girin.</string> + <string name="adbpair_connecting">Eşleşti. Bağlanıyor…</string> + <string name="adbpair_port_not_found">Eşleşti, ancak Kablosuz hata ayıklama bağlantı noktası bulunamadı. Kablosuz hata ayıklamayı açık tutup yeniden deneyin.</string> + <string name="adbpair_applying">Ayar uygulanıyor…</string> + <string name="adbpair_command_failed">Kablosuz hata ayıklama komutu başarısız oldu</string> + <string name="adbpair_channel_name">Kablosuz hata ayıklama kurulumu</string> + <string name="adbpair_channel_description">Ayarlar açıkken Kablosuz hata ayıklama eşleştirme kodunu ister</string> + <string name="adbpair_title_pair">Kablosuz hata ayıklamayı eşle</string> + <string name="adbpair_waiting_text">Kablosuz hata ayıklamayı açın, sonra “Eşleştirme koduyla cihaz eşle” seçeneğine dokunun.</string> + <string name="adbpair_waiting_long">Kablosuz hata ayıklamayı açın, sonra “Eşleştirme koduyla cihaz eşle” seçeneğine dokunun. Ayarlar\'dan çıkmayın: kod bu bildirime gelir.</string> + <string name="adbpair_code_label">6 haneli eşleştirme kodu</string> + <string name="adbpair_code_hint">Kodu gir\'e dokunun ve Ayarlar\'da gösterilen 6 haneyi yazın.</string> + <string name="adbpair_title_code">Wi-Fi eşleştirme kodunu girin</string> + <string name="adbpair_title_retry">Kodu yeniden deneyin</string> + <string name="adbpair_enter_code">Kodu gir</string> + <string name="adbpair_title_working">Steam kuruluyor</string> + <string name="adbpair_title_done">Steam hazır</string> + <string name="adbpair_done_text">DroidDeck\'e geri dönmek için dokunun. Kablosuz hata ayıklamayı şimdi kapatabilirsiniz.</string> + <string name="adbpair_title_failed">Kablosuz hata ayıklama kurulumu durdu</string> + + <string name="selfinst_download_failed">İndirme başarısız oldu</string> + <string name="selfinst_size_mismatch">İndirme boyutu yayınlanan APK ile eşleşmedi ve atıldı - yeniden deneyin</string> + <string name="selfinst_checksum_mismatch">İndirme, sağlama toplamıyla eşleşmedi ve atıldı - yeniden deneyin</string> + <string name="selfinst_wrong_package">Güncelleme, %2$s değil %1$s Android paketi içindir</string> + <string name="selfinst_metadata_signer">Güncelleme meta verileri DroidDeck\'in yayın imzalama anahtarını belirtmiyor</string> + <string name="selfinst_unreadable">Android indirilen APK\'yı okuyamadı</string> + <string name="selfinst_apk_wrong_package">İndirilen APK, %2$s değil %1$s içindir</string> + <string name="selfinst_version_mismatch">İndirilen APK, yayınlanan %2$d değil versionCode %1$d diyor</string> + <string name="selfinst_downgrade">Android, yüklü %2$d üzerine versionCode %1$d\'i yüklemez</string> + <string name="selfinst_no_signing">İndirilen APK\'da imza bilgisi yok</string> + <string name="selfinst_wrong_signer">İndirilen APK, DroidDeck\'in yayın anahtarıyla imzalanmamış</string> + <string name="appupd_http">Güncelleme kataloğu HTTP %1$d yanıtı verdi</string> + + <string name="loadstate_starting">Oturum başlatılıyor…</string> + <string name="loadstate_elapsed">%1$d:%2$02d geçti · hâlâ çalışıyor</string> + <string name="loadstate_steam_update">Steam istemcisi güncellemesi indiriliyor · %1$d%%</string> + <string name="loadstate_steam_client">Steam istemcisi indiriliyor · %1$s</string> + + <string name="pextra_busy">Zaten çalışan bir uyumluluk aracı yüklemesi var</string> + <string name="pextra_stop_session">Uyumluluk araçlarını yüklemeden önce etkin oturumu durdurun</string> + <string name="pextra_no_release">%1$s için bir ARM64 yayını bulunamadı</string> + <string name="pextra_no_space">%1$s\'i yüklemek için indirme boyutuna ek olarak en az 4 GB boş alan gerekir</string> + <string name="pextra_downloading">%1$s %2$s indiriliyor</string> + <string name="pextra_retrying">İndirme yeniden deneniyor · %2$d denemenin %1$d\'i</string> + <string name="pextra_interrupted">İndirme kesintiye uğradı</string> + <string name="pextra_download_failed">İndirme başarısız oldu; yeniden deneme devam edebilsin diye yarım dosya tutuluyor</string> + <string name="pextra_too_big">İndirme, yayın boyutunu aştı ve silindi</string> + <string name="pextra_incomplete">İndirme tamamlanmadı; devam edilebilir bir yeniden deneme için yarım dosya tutuluyor</string> + <string name="pextra_verifying">İndirme doğrulanıyor</string> + <string name="pextra_checksum_unreadable">Yayının sağlama toplamı okunamadı; yeniden deneyin</string> + <string name="pextra_no_checksum">%1$s %2$s sağlama toplamı yayınlamıyor; hiçbir şey yüklenmedi</string> + <string name="pextra_checksum_mismatch">Sağlama toplamı uyuşmuyor; indirme silindi</string> + <string name="pextra_session_started">İndirme sırasında bir oturum başladı; uyumluluk araçlarını yüklemeden önce durdurun</string> + <string name="pextra_installing">%1$s yükleniyor</string> + <string name="pextra_install_failed">%1$s yüklemesi başarısız oldu (çıkış %2$d)</string> + <string name="pextra_could_not_install">%1$s yüklenemedi</string> + <string name="esync_fetching">droiddeck-esync paketi getiriliyor</string> + + <string name="cmgr_fex_linux_helpers">Linux yardımcılarıyla</string> + <string name="cmgr_fex_dlls_only">Yalnızca DLL\'ler</string> + <string name="cmgr_original_proton_updated">Orijinal (son değişimden sonra Proton güncellendi)</string> + <string name="cmgr_changed_outside">Bileşenler\'in dışında değiştirildi</string> + <string name="cmgr_not_present">yok</string> + <string name="cmgr_original_version">Orijinal %1$s</string> + <string name="cmgr_original_from">%1$s\'ten orijinal</string> + <string name="cmgr_swap_queued">%1$s %2$s, üzerinde çalışan oyun kapandığında %3$s\'e geçer.</string> + <string name="cmgr_swap_done">%1$s %2$s artık %3$s\'te. Bir sonraki oyun başlatıldığında uygulanır.</string> + <string name="cmgr_original_missing">Bu orijinal paket saklanmıyor</string> + <string name="cmgr_restore_queued">%2$s\'nin %1$s\'i, üzerinde çalışan oyun kapandığında orijinaline döner.</string> + <string name="cmgr_restore_done">%2$s\'nin %1$s\'i %3$s orijinalinden geri yüklendi.</string> + <string name="cmgr_package_in_use">%1$s, %2$s\'te kullanımda. Önce o Proton\'u başka bir şeyle değiştirin.</string> + <string name="cmgr_package_not_stored">%1$s saklanmıyor</string> + <string name="cmgr_deleted">%1$s silindi.</string> + <string name="cmgr_original_kept">Yüklü derlemenin orijinali saklanır: geri dönüş yolu budur.</string> + <string name="cmgr_not_stored">Saklanmıyor</string> + <string name="cmgr_deleted_original">%2$s\'nin %1$s orijinali silindi.</string> + <string name="cmgr_nightlies_only">İndirmeler yalnızca Nightlies yayınlarından gelir</string> + <string name="cmgr_list_predates_checksums">Bu paket listesi sağlama toplamlarından önceki bir tarihe ait - yenileyip yeniden deneyin</string> + <string name="cmgr_checksum_mismatch">Sağlama toplamı uyuşmuyor</string> + + <string name="sprefs_upscaler_linear">Doğrusal</string> + <string name="sprefs_upscaler_nearest">En yakın</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (kalite)</string> + <string name="sprefs_upscaler_sharpen">Yalnızca keskinleştirme</string> + <string name="sprefs_lod_bias_auto">Otomatik (ölçeklemeye göre)</string> + + <string name="look_off_desc">Hiçbir şey uygulanmadı.</string> + <string name="look_game_clarity">Oyun Netliği</string> + <string name="look_game_clarity_desc">Hafif kontrastla keskinleştirme - günlük kullanım için.</string> + <string name="look_vivid">Canlı</string> + <string name="look_vivid_desc">Renk sonuna kadar zorlanır. Gökyüzü çizgilenmesin diye bant giderme açık.</string> + <string name="look_cinematic">Sinematik</string> + <string name="look_cinematic_desc">Daha derin kontrast, daha soğuk renk, yumuşatılmış kenarlar.</string> + <string name="look_competitive">Rekabetçi</string> + <string name="look_competitive_desc">Gölgeler açılır ve ağır keskinleştirme - önce insanları fark edin.</string> + <string name="look_adaptive_sharpen">Uyarlanabilir Keskinleştirme</string> + <string name="look_adaptive_sharpen_desc">Yalnızca keskinleştirme, renk dokunulmadan kalır.</string> + <string name="look_filmic">Filmsel</string> + <string name="look_filmic_desc">Film benzeri eğri, hafifçe kısık.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Abartılı ve çarpıcı.</string> + <string name="look_retro_crt">Retro CRT</string> + <string name="look_retro_crt_desc">CRT tüpü ve analog sinyal geçişleri bir arada.</string> + <string name="look_upscale_sharp">Keskin Büyütme</string> + <string name="look_upscale_sharp_desc">Panel çözünürlüğünün altında çalıştırmak için.</string> + <string name="look_pixel_clean">Temiz Piksel</string> + <string name="look_pixel_clean_desc">2D ve eski oyunlar için net pikseller.</string> + <string name="look_anime_edge">Anime Kenar</string> + <string name="look_anime_edge_desc">Çizgi film konturları ve keskinleştirme.</string> + + <string name="gpuinfo_not_adreno">Adreno GPU değil</string> + <string name="gpuinfo_supported">Destekleniyor</string> + <string name="gpuinfo_experimental">Deneysel: sürücüleri test derlemeleri</string> + <string name="gpuinfo_below_tested">Test edilen donanımın altında (Adreno 725 ve daha yenisi): çalışmayabilir</string> + <string name="gpuinfo_unsupported">Desteklenmiyor: DroidDeck bir Adreno (Snapdragon) GPU\'su gerektirir</string> + + <string name="turnip_rate_limited">GitHub\'ın hız sınırına ulaşıldı - daha sonra yeniden deneyin</string> + <string name="turnip_github_http">GitHub HTTP %1$d yanıtı verdi</string> + <string name="turnip_download_failed">İndirme başarısız oldu</string> + <string name="turnip_list_predates_checksums">Bu sürücü listesi sağlama toplamlarından önceki bir tarihe ait - yenileyip yeniden deneyin</string> + <string name="turnip_checksum_mismatch">Sağlama toplamı uyuşmuyor - indirme atıldı</string> + <string name="turnip_not_adrenotools">Bir AdrenoTools sürücüsü değil: %1$s</string> + <string name="turnip_reject_no_meta">meta.json yok</string> + <string name="turnip_reject_meta_unreadable">meta.json okunamıyor (%1$s)</string> + <string name="turnip_reject_linux_driver">bu bir Linux çalışma ortamı sürücüsü (“Linux çalışma ortamı sürücüsü” altında içe aktarın)</string> + <string name="turnip_reject_wayland">bu bir Wayland oyun sürücüsü, bu uygulamanın buna bir kullanımı yok</string> + <string name="turnip_reject_no_library_name">meta.json bir libraryName belirtmiyor, bu yüzden AdrenoTools\'a hiçbir şey verilemedi</string> + <string name="turnip_reject_library_missing">meta.json, zip içinde olmayan %1$s\'i belirtiyor</string> + <string name="turnip_reject_not_aarch64">%1$s 64 bit AArch64 ELF paylaşılan kitaplığı değil</string> + <string name="turnip_reject_glibc">%1$s glibc\'ye bağlanıyor - bir “-Linux” Turnip\'i, “Linux çalışma ortamı sürücüsü” altına ait</string> + <string name="lvd_no_library">Bu zip içinde libvulkan_freedreno*.so yok. Bir Android (AdrenoTools) veya -Wayland Turnip zip\'i bir Linux çalışma ortamı sürücüsü değildir.</string> + <string name="lvd_not_aarch64">%1$s 64 bit AArch64 ELF paylaşılan kitaplığı değil.</string> + <string name="lvd_not_glibc">%1$s bir glibc sürücüsü değil - Android\'in libc\'sine bağlanıyor. Linux çalışma ortamı bir “-Linux” zip\'i gerektirir; düz veya “-Wayland” bir Turnip, Steam istemcisi tarafından hiç yüklenemez.</string> + <string name="bundle_no_manifest">Bir sürücü paketi değil: bir android ve bir linux sürücüsü belirten manifest.json yok</string> + <string name="bundle_entry_outside">Bir sürücü paketi değil: %1$s dışına işaret ediyor</string> + <string name="bundle_too_large">Bir sürücü paketi değil: %1$d MB\'den fazla alana açılıyor</string> + + <string name="gstore_sd_card">SD kart</string> + <string name="gstore_folder">Klasör</string> + + <string name="logshare_chooser">Oturum günlüklerini paylaş</string> + + <string name="hdr_needs_android_10">Android 10 veya daha yenisi gerekir (renk uzayına sahip ekran katmanları)</string> + <string name="hdr_none">bu ekran HDR desteği bildirmiyor</string> + <string name="hdr_not_hdr10">bu ekran HDR10 değil, %1$s destekliyor</string> + + <string name="gpu_this_gpu">bu GPU</string> + <string name="phantom_title_on">Alt süreç sınırı açık</string> + <string name="phantom_title_unset">Alt süreç sınırı ayarlanmamış</string> + <string name="phantom_title_unreadable">Alt süreç sınırı kontrol edilemedi</string> + <string name="phantom_title_off">Alt süreç sınırı kapalı</string> + <string name="phantom_title_not_required">Alt süreç sınırı gerekli değil</string> + <string name="phantom_instructions_fix">%1$s Bu mümkün değilse bu cihazı ADB\'li bir bilgisayara bağlayıp aşağıdaki komutu çalıştırın. Buraya dönüp yeniden kontrol edin.</string> + <string name="phantom_instructions_off">Steam oturumları başlayabilir.</string> + <string name="phantom_instructions_not_applicable">Bu Android sürümü bu sınırı kullanmaz.</string> + <string name="phantom_fix_toggle">Geliştirici seçenekleri\'nde “Alt işlem kısıtlamalarını devre dışı bırak” seçeneğini açın ve sonrasında Geliştirici seçeneklerini açık tutun.</string> + <string name="phantom_fix_no_toggle">Bu Android sürümünde bunun için bir anahtar yok. Bu cihazdan değiştirmek için Kablosuz hata ayıklamayı kullanın.</string> + <string name="upd_block_no_apk">Bu derlemede bu DroidDeck kopyası için bir indirme yok.</string> + <string name="upd_block_version_code">Android, versionCode %1$d yüklü %2$d\'nin altında olduğu için bunu bu derlemenin üzerine yüklemez.</string> + <string name="upd_fail_downgrade">Android, daha eski bir sürümü daha yeni birinin üzerine yüklemez. Kanal yetişene kadar bu derlemede kalın.</string> + <string name="upd_fail_signature">Bu DroidDeck kopyası farklı imzalanmış (yerel bir derleme mi?), bu yüzden Android onu yerinde güncellemez.</string> + <string name="upd_fail_storage">Güncelleme için yeterli boş alan yok.</string> + <string name="upd_fail_aborted">Güncelleme iptal edildi.</string> + <string name="upd_fail_with_message">Güncelleme yüklenmedi: %1$s</string> + <string name="upd_fail_generic">Güncelleme yüklenmedi.</string> + <string name="saves_layout_zip">%1$s zip\'i</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s henüz başlatılmadı</string> + <string name="saves_none_found">%1$s için kayıt dosyası bulunamadı</string> + <string name="saves_not_save_zip">%1$s\'de drive_c klasörü yok, bu yüzden bir GameHub veya Winlator kayıt zip\'i değil</string> + <string name="gstore_cannot_create">%1$s içinde klasör oluşturulamıyor</string> + <string name="gstore_cannot_write">%1$s içine yazılamıyor</string> + <string name="gstore_cannot_write_detail">%1$s içine yazılamıyor (%2$s)</string> + <string name="gfiles_folder_unavailable">Klasör kullanılamıyor</string> + <string name="gfiles_name_taken">Başka bir dosya zaten %1$s\'i kullanıyor</string> + <string name="gfiles_art_unavailable">Görsel klasörü kullanılamıyor</string> + <string name="gfiles_unrelated_inventory">Klasörde ilgisiz bir eşitleme envanteri var</string> + <string name="gfiles_remove_failed">%1$s kaldırılamadı</string> + <string name="gfiles_outside_folder">Dosya dışa aktarma klasörünün dışına çıkıyor</string> + <string name="cmgr_fex_unnamed">FEX (sürüm adı olmayan derleme)</string> + <string name="cmgr_no_profile">%1$s içinde profile.json yok</string> + <string name="cmgr_not_component_package">%1$s bir Linux bileşen paketi değil (tür %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s boş</string> + <string name="mode_storage_auto_short">Otomatik</string> + <string name="appupd_catalog_rejected">Güncelleme kataloğu kontrollerini geçemedi (%1$s)</string> + <string name="main_adb_clip_label">DroidDeck alt süreç ayarı</string> + <string name="setup_signed_in_offline_unnamed">Oturum açıldı · çevrimdışı mod</string> + <string name="setup_signed_in_unnamed">Oturum açıldı</string> + <string name="driver_tag_bundled">PAKETLİ</string> + <string name="driver_tag_downloaded">İNDİRİLDİ</string> + <string name="driver_tag_imported">İÇE AKTARILDI</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Oturum ekranı</string> + <string name="display_resolution">Çözünürlük</string> + <string name="display_game_fit">16:9 oyun sığdırma</string> + <string name="display_game_fit_hint">16:9 oyunların bu ekrana nasıl sığacağı. Sonraki oturumda.</string> + <string name="display_game_fit_unavailable">Ekrana Uydur\'u veya 16:9\'dan daha dar özel bir boyutu seçin.</string> + <string name="display_preserve">Oranları koru</string> + <string name="display_stretch">Ekrana uzat</string> + <string name="display_image_scaling">Görüntü ölçekleme</string> + <string name="display_filter">Ölçekleme filtresi</string> + <string name="display_filter_hint">Steam ve Masaüstü tarafından paylaşılır.</string> + <string name="display_filter_live">Anında uygulanır. Steam ve Masaüstü tarafından paylaşılır.</string> + <string name="display_filter_note">FSR, GSR ve NIS, oturum görüntüsü büyütülürken uygulanır. Yalnızca keskinleştirme büyütme olmadan da çalışır.</string> + <string name="display_sharpness">Filtre keskinliği</string> + <string name="display_frame_rate">Kare hızı</string> + <string name="display_look_filter">%1$s Ölçeklemeyi %2$s olarak ayarlar.</string> + <string name="display_match_screen">Ekrana Uydur (%1$d×%2$d)</string> + <string name="display_follow_screen">Ekranı takip et (katlanıp açıldığında yeniden boyutlanır)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Cihaz ayrıntılarını göster</string> + <string name="device_info_hide">Cihaz ayrıntılarını gizle</string> + <string name="device_info_loading">Cihaz okunuyor…</string> + <string name="device_info_copy">Kopyala</string> + <string name="device_info_copy_hint">Bu ayrıntıları bir hata raporuna kopyalayın.</string> + <string name="device_info_copied">Kopyalandı.</string> + <string name="force_ssbs_title">SSBS\'i zorla</string> + <string name="force_ssbs_hint">Wine\'ın sürekli kapattığı bir CPU hız ayarını açık tutar. Snapdragon 8 Elite\'te Windows oyunlarını hızlandırabilir; daha eski yongalarda pek fark görülmez. Bir sonraki oyun başlatmasında uygulanır.</string> + + <string name="rail_stores">Mağazalar</string> + <string name="source_steam">Steam</string> + <string name="source_added">Özel</string> + <string name="setup_stores">Mağazalar</string> + <string name="setup_stores_open_on">Bir mağazayı şurada aç</string> + <string name="setup_stores_speed">İndirme hızı katmanı</string> + <string name="setup_stores_engine">Mağazalar motoru</string> + <string name="setup_stores_engine_chip_ready">● Motor hazır</string> + <string name="setup_stores_engine_chip_missing">Derlenmedi</string> + <string name="stores_tier_balanced">Dengeli</string> + <string name="stores_tier_fast">Hızlı</string> + <string name="stores_tier_max">Maks</string> + <string name="stores_title">Mağazalar</string> + <string name="stores_settings">Mağaza ayarları</string> + <string name="stores_settings_eyebrow">Ayarlar</string> + <string name="stores_chip_signed_out">(oturum açılmadı)</string> + <string name="stores_tab_store">Mağaza</string> + <string name="stores_tab_installed">Yüklü</string> + <string name="stores_tab_library">Kütüphane</string> + <string name="stores_tab_all">Tümü</string> + <string name="stores_tab_downloads">İndirmeler</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Oturum aç</string> + <string name="stores_signout_named">%1$s · oturumu kapat</string> + <string name="stores_signout_title">%1$s\'ten oturum kapatılsın mı?</string> + <string name="stores_signout_note">Yüklü oyunlar kalır. Tekrar oturum açtığınızda kütüphane yeniden getirilir.</string> + <string name="stores_signout_stay">Oturumu açık tut</string> + <string name="stores_signout_go">Oturumu kapat</string> + <string name="stores_search_catalog">%1$s kataloğunda ara…</string> + <string name="stores_search_installed">Yüklü oyunlarda ara…</string> + <string name="stores_search_library">Kütüphanenizde ara…</string> + <string name="stores_search_open">Ara</string> + <string name="stores_installed_empty">Yüklü bir şey yok</string> + <string name="stores_library_loading">Yükleniyor</string> + <string name="stores_nothing_matches">Oyun yok</string> + <string name="stores_shelves_loading">Mağaza yükleniyor…</string> + <string name="stores_amazon_no_catalog">Katalog yok</string> + <string name="stores_shelf_new">Yenilikler</string> + <string name="stores_shelf_deals">Fırsatlar</string> + <string name="stores_shelf_free">Ücretsiz oyunlar</string> + <string name="stores_shelf_trending">Gündemde</string> + <string name="stores_shelf_library">Kütüphaneniz</string> + <string name="stores_play">Oyna</string> + <string name="stores_install">Yükle</string> + <string name="stores_resume_install">Yüklemeyi sürdür</string> + <string name="stores_dl_interrupted">Kesintiye uğradı</string> + <string name="stores_install_size">Yükle · %1$s</string> + <string name="stores_get_free">Ücretsiz al</string> + <string name="stores_view_on">%1$s\'te görüntüle</string> + <string name="stores_buy_price">Satın al · %1$s</string> + <string name="stores_installed_chip">Yüklü</string> + <string name="stores_in_library">Kütüphanede</string> + <string name="stores_free">Ücretsiz</string> + <string name="stores_resume">Sürdür</string> + <string name="stores_refresh">Yenile</string> + <string name="stores_sort">Sırala</string> + <string name="stores_sort_last_played">Son oynanan</string> + <string name="stores_sort_recently_installed">Son yüklenen</string> + <string name="stores_sort_title_asc">Başlık A–Z</string> + <string name="stores_sort_title_desc">Başlık Z–A</string> + <string name="stores_sort_size_desc">Boyut: en büyük</string> + <string name="stores_sort_size_asc">Boyut: en küçük</string> + <string name="stores_sort_release_date">Çıkış tarihi</string> + <string name="stores_view_list">Liste görünümü</string> + <string name="stores_view_cards">Kart görünümü</string> + <string name="stores_show_mature">Yetişkin içeriği göster</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Çevrimdışı</string> + <string name="epic_card_none">Kapalı</string> + <string name="epic_eos">Epic oturum açma (EOS)</string> + <string name="epic_offline">Çevrimdışı başlat</string> + <string name="epic_resolve">Epic oturum açmayı düzelt</string> + <string name="epic_client_version">Sürüm %1$s</string> + <string name="epic_client_no_runtime">Önce Linux çalışma zamanını yükleyin</string> + <string name="epic_client_checking">En son sürüm kontrol ediliyor…</string> + <string name="epic_client_unpacking">Ayıklanıyor…</string> + <string name="epic_client_unreachable">İndirme sunucusu yanıt vermedi</string> + <string name="epic_client_needs_fex">Epic Games Launcher, Steam\'in indirdiği FEX\'e ihtiyaç duyar. Steam başladıktan sonra başlatıcıyı yeniden açın.</string> + <string name="epic_client_download_failed">İndirme başarısız oldu: %1$s</string> + <string name="epic_client_unpack_failed">Başlatıcı ayıklanamadı: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher oturum açmayı kabul etmedi. Başlatıcıdan yeniden başlatın.</string> + <string name="epic_client_uninstall_body">Başlatıcıyı kaldırır ve yerini boşaltır. Epic oyunlarınız yüklü kalır ve çalışmaya devam eder, oturum açma bilgisi yeniden yüklediğinizde kullanılmak üzere saklanır.</string> + <string name="epic_client_uninstall_stops">Önce çalışan oturum kapatılır.</string> + <string name="epic_client_uninstalled">Epic Games Launcher kaldırıldı</string> + <string name="epic_client_uninstall_failed">Başlatıcının bazı dosyaları kaldırılamadı. Tekrar deneyin.</string> + <string name="epic_client_uninstalling">Epic Games Launcher\'ın kaldırılmasının bitmesini bekleyin</string> + <string name="store_cloud_saves">Bulut kayıtları</string> + <string name="cloud_upload">Buluta yükle</string> + <string name="cloud_download">Buluttan indir</string> + <string name="cloud_none">Bulut kaydı yok</string> + <string name="cloud_conflict">Bulut çakışması</string> + <string name="cloud_conflict_files">Bulut çakışması · %1$d dosya</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Bulutu koru</string> + <string name="cloud_keep_local">Yerel olanı koru</string> + <string name="cloud_checking">Bulut kontrol ediliyor…</string> + <string name="cloud_last_sync">Son eşitleme %1$s</string> + <string name="cloud_never">Henüz eşitlenmedi</string> + <string name="cloud_done">%1$d dosya</string> + <string name="stores_eyebrow_installed">yüklü</string> + <string name="stores_eyebrow_library">kütüphanenizde</string> + <string name="stores_eyebrow_store">mağaza</string> + <string name="achievements_title">Başarımlar</string> + <string name="achievements_count">%2$d başarımdan %1$d açıldı</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Açık · %1$d</string> + <string name="achievements_group_locked">Kilitli · %1$d</string> + <string name="achievements_group_hidden">Gizli · %1$d</string> + <string name="achievements_hidden">Gizli başarım</string> + <string name="achievements_hidden_detail">Kilidi açıldığında ayrıntılar gösterilir.</string> + <string name="achievements_all">Tüm başarımların kilidi açıldı</string> + <string name="achievements_reading">Yükleniyor…</string> + <string name="achievements_signed_out">Başarımlarını görmek için %1$s hesabına giriş yap.</string> + <string name="achievements_unreachable">%1$s\'e bağlanılamadı. Çevrimiçi olduğunda tekrar kontrol et.</string> + <string name="achievements_none">%1$s bu oyun için başarım listelemiyor.</string> + <string name="achievements_show_all">Tümünü göster (%1$d)</string> + <string name="achievements_dialog_title">Başarımlar · %1$s</string> + <string name="stores_in_steam">✓ Steam\'de</string> + <string name="stores_uninstall">Yüklemeyi kaldır</string> + <string name="stores_uninstalling">Kaldırılıyor…</string> + <string name="stores_uninstall_title">%1$s kaldırılsın mı?</string> + <string name="stores_uninstall_body_size">%1$s\'lık yer açar ve onu Steam\'den kaldırır.</string> + <string name="stores_uninstall_body">Dosyalarını ve Steam kısayolunu kaldırır.</string> + <string name="stores_launch_not_registered">Steam bir sonraki başladığında oyunu fark eder; oradan başlatın veya Steam\'i şimdi başlatın.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Steam\'in oyun başına seçimi</string> + <string name="stores_card_audio">Ses</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Bileşenler</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Motor</string> + <string name="stores_card_engine_value">%1$s · yerel</string> + <string name="stores_card_engine_java">%1$s · yerleşik</string> + <string name="stores_how_it_runs">Nasıl çalışır</string> + <string name="stores_kv_fetched">Şuradan getirildi</string> + <string name="stores_kv_fetched_value">%1$s, hesabınızla</string> + <string name="stores_kv_installed_to">Şuraya yüklendi</string> + <string name="stores_kv_installed_to_value">Oyun depolama alanı (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Şununla başlatılır</string> + <string name="stores_kv_launched_by_value">Steam ve Proton, Steam oyunlarıyla aynı yol</string> + <string name="stores_kv_launched_by_epic">Steam ve Proton · her başlatmada Epic oturum açma, EOS kaplaması kapalı</string> + <string name="stores_kv_launched_by_amazon">Steam ve Proton · Amazon Games Services değişkenleri ayarlı</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">yüklemede Steam\'e eklenir (Deck arayüzü + Steam Input)</string> + <string name="stores_downloads_empty">İndirme yok</string> + <string name="stores_dl_paused">Duraklatıldı</string> + <string name="stores_dl_queued">Kuyrukta</string> + <string name="stores_dl_queued_at">Kuyrukta · #%1$d</string> + <string name="stores_dl_cancelled">İptal edildi</string> + <string name="stores_dl_failed">Başarısız oldu</string> + <string name="stores_dl_failed_reason">Başarısız oldu · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Duraklat</string> + <string name="stores_dl_resume">Sürdür</string> + <string name="stores_dl_cancel">İptal et</string> + <string name="stores_dl_retry">Yeniden dene</string> + <string name="stores_dl_clear">Temizle</string> + <string name="stores_dl_clear_all">Bitenleri temizle</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">İndirme</string> + <string name="stores_stage_verify">Doğrulama</string> + <string name="stores_stage_install">Yükleme</string> + <string name="stores_stage_done">Tamamlandı</string> + <string name="stores_stage_checking">Kontrol ediliyor</string> + <string name="stores_stage_downloading">İndiriliyor</string> + <string name="stores_dl_cancel_confirm">İndirme silinsin mi?</string> + <string name="stores_dl_failed_kept">Başarısız oldu · %1$s tutuldu</string> + <string name="stores_stage_verifying">Doğrulanıyor</string> + <string name="stores_stage_installing">Yükleniyor</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d dosya</string> + <string name="stores_download_manager">İndirme yöneticisi</string> + <string name="stores_parallel">Aynı anda indirme sayısı</string> + <string name="stores_install_where">Şuraya yükle</string> + <string name="stores_install_title">%1$s\'i yükle:</string> + <string name="stores_target_internal">Dahili</string> + <string name="stores_target_free">%1$s boş</string> + <string name="stores_notification_channel">Mağaza indirmeleri</string> + <string name="stores_notification_channel_hint">Oyun indirme ilerlemesini gösterir ve indirmelerin arka planda sürmesini sağlar</string> + <string name="stores_notification_one">İndiriliyor</string> + <string name="stores_notification_many">%1$d indirme</string> + <string name="stores_notification_waiting">Hazırlanıyor…</string> + <string name="stores_notification_done_channel">Tamamlanan mağaza indirmeleri</string> + <string name="stores_notification_installed">%1$s yüklendi</string> + <string name="stores_notification_failed">%1$s indirmesi başarısız oldu</string> + <string name="stores_notification_delete">Sil</string> + <string name="stores_notification_keep">Tut</string> + <string name="stores_login_title">%1$s\'e oturum aç</string> + <string name="stores_login_provider_title">Sağlayıcınızla oturum açın</string> + <string name="stores_login_reload">Yeniden yükle</string> + <string name="stores_login_close">Kapat</string> + <string name="stores_login_retry">Yeniden dene</string> + <string name="stores_login_finishing">Oturum açma tamamlanıyor…</string> + <string name="stores_login_error_network">Oturum açma sayfası yüklenemedi: %1$s</string> + <string name="stores_login_error_idp_blocked">Bu sağlayıcı yerleşik bir sayfadan oturum açmayı reddediyor. Bunun yerine mağaza parolanızla oturum açın.</string> + <string name="stores_login_error_http">Oturum açma sayfası bir hatayla yanıt verdi (HTTP %1$d).</string> + <string name="stores_login_error_ssl">Oturum açma sayfasına bağlantı güvenli değil.</string> + <string name="stores_login_error_verification">Oturum açma doğrulanamadı. Yeniden deneyin.</string> + <string name="stores_login_error_generic">Oturum açma başarısız oldu. Yeniden deneyin.</string> + <string name="common_close">Kapat</string> + <string name="common_back">Geri</string> + <string name="common_edit">Düzenle</string> + <string name="games_add_all">Bu klasördeki tüm oyunları ekle</string> + <string name="games_added_none">Bu klasörde yeni bir şey yok</string> + <string name="edit_name">Ad</string> + <string name="edit_target">Hedef</string> + <string name="edit_start_in">Başlangıç yeri</string> + <string name="edit_launch_options">Başlatma seçenekleri</string> + <string name="edit_artwork">Görsel</string> + <string name="edit_other_exe">Diğer exe…</string> + <string name="edit_remove">Kaldır</string> + <string name="art_cover">Kapak</string> + <string name="art_wide_cover">Geniş kapak</string> + <string name="art_adjust_logo">Logoyu ayarla</string> + <string name="logo_pos_default">Varsayılan</string> + <string name="logo_pos_upper_left">Sol üst</string> + <string name="logo_pos_upper_center">Üst orta</string> + <string name="logo_pos_center">Orta</string> + <string name="logo_pos_bottom_left">Sol alt</string> + <string name="logo_pos_bottom_center">Alt orta</string> + <string name="logo_pos_position">Konum</string> + <string name="logo_pos_size">Boyut</string> + <string name="logo_pos_save">Kaydet</string> + <string name="logo_pos_reset">Varsayılana döndür</string> + <string name="logo_pos_hint">Steam\'in yaptığı gibi oyunun arka planının üzerine çizilir. Tam konum birkaç piksel değişebilir.</string> + <string name="logo_pos_no_logo">Bu oyunun henüz logosu yok. Burada görmek için Logo bölümünden bir tane seçin.</string> + <string name="logo_pos_failed">Logo konumu kaydedilemedi. Yeniden deneyin.</string> + <string name="art_background">Arka plan</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Simge</string> + <string name="art_src_folder">Oyun klasörü</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Dosyanız</string> + <string name="art_src_exe">Exe\'den</string> + <string name="art_src_auto">Otomatik</string> + <string name="art_pick_image">Görsel seç…</string> + <string name="art_pick_title">Bir görsel seçin: %1$s</string> + <string name="art_reset">Otomatiğe sıfırla</string> + <string name="art_search_sgdb">SteamGridDB\'de ara…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Oyun ara</string> + <string name="art_sgdb_other_games">Diğer sonuçlar</string> + <string name="art_sgdb_none">Sonuç yok.</string> + <string name="art_sgdb_no_key">SteamGridDB bir API anahtarı gerektiriyor. Kendinizinkini Kurulum › Başlatıcı bölümüne ekleyin.</string> + <string name="art_sgdb_bad_key">SteamGridDB API anahtarını kabul etmedi. Kurulum › Başlatıcı bölümünden denetleyin.</string> + <string name="art_sgdb_limit">SteamGridDB şu anda istekleri sınırlıyor. Bir dakika sonra yeniden deneyin.</string> + <string name="art_sgdb_offline">SteamGridDB\'ye ulaşılamadı. Bağlantınızı denetleyin.</string> + <string name="art_sgdb_server">SteamGridDB\'de bir sorun oluştu. Daha sonra yeniden deneyin.</string> + <string name="art_sgdb_no_game">SteamGridDB\'de bu oyun için sonuç yok. Aramayı deneyin.</string> + <plurals name="games_added_n"> + <item quantity="one">%1$d oyun eklendi</item> + <item quantity="other">%1$d oyun eklendi</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d zaten Oyunlar\'da</item> + <item quantity="other">%1$d zaten Oyunlar\'da</item> + </plurals> + <string name="hop_back">B · %1$s geri dön</string> + <string name="hop_from_games">oyuna</string> + <string name="hop_from_play">Oyna ayarlarına</string> + <string name="sheet_graphics_drivers">Grafik sürücüleri</string> + <string name="comp_this_proton">Bu Proton</string> + <string name="comp_every_proton">Her Proton</string> + <string name="comp_for_every_proton">Her Proton için</string> + <string name="comp_available_count">Kullanılabilir · %1$d</string> + <string name="comp_checked">Kontrol edildi %1$s</string> + <string name="comp_check_all">Yeni bileşenleri ve sürücüleri kontrol et</string> + <string name="comp_get">Al</string> + <string name="comp_proton_bar">%1$s · aşağıdaki DXVK, VKD3D-Proton ve FEX bu Proton\'a ait</string> + <string name="comp_device_tested">%1$s · test edildi</string> + <string name="comp_device_untested">%1$s · test edilmedi</string> + <string name="comp_device_unsupported">%1$s · desteklenmiyor</string> + <string name="gpu_auto_keeps">Önerilen çifti güncel tutar</string> + <string name="gpu_bar_auto">Otomatik · %1$s</string> + <string name="gpu_separately">Çalışma ortamı ve ekran sürücülerini ayrı ayrı</string> + <string name="gpu_use_title">%1$s kullanılsın mı?</string> + <string name="gpu_mode_title">Sürücüler nasıl seçilir</string> + <string name="gpu_mode_auto_detail">Bu GPU için en iyi eşleşme, her zaman güncel</string> + <string name="gpu_mode_pair">Eşleşen çift</string> + <string name="gpu_mode_pair_detail">Bir çift seçin; iki sürücüyü birden ayarlar</string> + <string name="gpu_mode_mix">Serbest eşleştir</string> + <string name="gpu_mode_mix_detail">Görüntü ve çalışma zamanını ayrı ayrı seçin</string> + <string name="gpu_mode_pair_short">Çift</string> + <string name="gpu_mode_mix_short">Karışık</string> + <string name="gpu_src_auto">OTO</string> + <string name="gpu_src_pair">ÇİFT</string> + <string name="gpu_src_bundle">PAKET</string> + <string name="gpu_src_chosen">SEÇİLİ</string> + <string name="gpu_src_by_gpu">GPU\'YA GÖRE</string> + <string name="gpu_src_default">VARSAYILAN</string> + <string name="gpu_display_live">Şimdi çiziyor</string> + <string name="gpu_display_pending">Yeniden başlatma bekliyor · o zamana kadar %1$s çiziyor</string> + <string name="gpu_runtime_live">Çalışıyor</string> + <string name="gpu_runtime_pending">Sonraki oturum · bu oturumda %1$s kalır</string> + <string name="gpu_display_next">Ekranı çizer. Sonraki oturumdan itibaren geçerli.</string> + <string name="gpu_previous_driver">önceki sürücü</string> + <string name="gpu_restart_banner">Görüntü sürücüsünü değiştirmek için yeniden başlatın.</string> + <string name="gpu_restart_blocked">Görüntü sürücüsünü değiştirmek için oturumu durdurup DroidDeck\'i yeniden başlatın.</string> + <string name="gpu_restart_now">Şimdi yeniden başlat</string> + <string name="gpu_restart_later">Sonra</string> + <string name="gpu_auto_title">Otomatik, %1$s için bu çifti seçti</string> + <string name="gpu_auto_builtin_title">Otomatik, %1$s için yerleşik sürücüleri kullanıyor</string> + <string name="gpu_auto_reason">%1$s ailesi için seçildi. Yeni sürümler arka planda kurulur.</string> + <string name="gpu_pair_title">Bir çift seçin</string> + <string name="gpu_pair_hint">Bir çift, görüntü sürücüsünü ve çalışma zamanı sürücüsünü birlikte ayarlar.</string> + <string name="gpu_mix_title">Her sürücüyü seçin</string> + <string name="gpu_mix_hint">Bir paket iki yuvayı da doldurur. Görüntü değişiklikleri yeniden başlatmadan sonra, çalışma zamanı değişiklikleri sonraki oturumdan itibaren geçerli olur.</string> + <string name="gpu_change_display">Görüntü sürücüsünü değiştir</string> + <string name="gpu_change_runtime">Çalışma zamanı sürücüsünü değiştir</string> + <string name="gpu_autos_pick">OTOMATİK SEÇİMİ</string> + <string name="gpu_installed">Kurulu</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · uygulamak için yeniden başlatın</string> + <string name="gpu_chip_restart">%1$s · yeniden başlatma bekliyor</string> + <string name="comp_this_device">Bu aygıt</string> + <string name="proton_remove_title">%1$s kaldırılsın mı?</string> + <string name="setup_tab_diagnostics">Tanılama</string> + <string name="setup_ready">Oynamaya hazır</string> + <string name="setup_not_ready">Henüz oynamaya hazır değil</string> + <string name="setup_ready_runtime">çalışma ortamı %1$s</string> + <string name="setup_ready_limit_off">alt süreç sınırı kapalı</string> + <string name="setup_ready_signed_in">%1$s olarak oturum açıldı</string> + <string name="setup_needs_you">Sizden bir şey istendiğinde</string> + <string name="setup_group_look">Görünüm</string> + <string name="setup_group_device">Bu cihaz</string> + <string name="setup_group_art">Kütüphane görselleri</string> + <string name="setup_group_download">İndirme</string> + <string name="setup_download_source">Kaynak</string> + <string name="setup_download_source_auto">Otomatik</string> + <string name="setup_download_source_direct">Doğrudan</string> + <string name="setup_download_source_mirror">Ayna</string> + <string name="setup_download_source_custom">Özel önek</string> + <string name="setup_download_mirror">Site</string> + <string name="setup_download_prefix">Önek</string> + <string name="flathub_eyebrow">LINUX UYGULAMALARI</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Linux masaüstü için masaüstü uygulamaları, Masaüstü\'nden açılır.</string> + <string name="flathub_setup">Flathub\'ı kur</string> + <string name="flathub_remove_title">%1$s kaldırılsın mı?</string> + <string name="flathub_remove_note">Ayarları ve dosyaları saklanır.</string> + <string name="flathub_keep">Tut</string> + <string name="desktop_size">Diskteki boyut</string> + <string name="desktop_uninstall_title">Masaüstü kaldırılsın mı?</string> + <string name="desktop_all_systems">Tümü</string> + <string name="gog_achievements">GOG başarımları</string> + <string name="gog_achievements_hint">Desteklenen GOG oyunları için başarımları eşitler. Sonraki başlatmada uygulanır.</string> + <string name="gog_achievements_off">Başarımlar kapalı</string> + <string name="gog_achievements_on">Başarımlar açık</string> + <string name="gog_achievements_signin">GOG\'a tekrar giriş yap</string> + <string name="gog_achievements_uploaded">Başarımlar yüklendi</string> + <string name="gog_achievements_pending">Başarım yüklemesi beklemede</string> + <string name="gog_achievements_enable_store">Mağaza ayarlarında GOG başarımlarını aç</string> + <string name="gog_achievements_unavailable">Başarımlar kullanılamıyor; oturum günlüklerini kontrol et</string> + <string name="achievement_unlocked">Başarımın kilidi açıldı</string> + <string name="touch_paste">Yapıştır</string> + <string name="touch_dpad">Yön tuşu</string> + <string name="touch_left_stick">Sol analog çubuk</string> + <string name="touch_right_stick">Sağ analog çubuk</string> + <string name="touch_menu">Menü</string> + <string name="touch_keyboard">Klavye</string> + <string name="touch_dpad_up">Yön tuşu yukarı</string> + <string name="touch_dpad_down">Yön tuşu aşağı</string> + <string name="touch_dpad_left">Yön tuşu sol</string> + <string name="touch_dpad_right">Yön tuşu sağ</string> + <string name="touch_title">Dokunmatik kontroller</string> + <string name="touch_controller">Dokunmatik kontrolcü</string> + <string name="touch_mouse">Fare</string> + <string name="touch_on">Açık</string> + <string name="touch_off">Kapalı</string> + <string name="touch_speed_slow">Yavaş</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Hızlı</string> + <string name="touch_edit_layout">Düzeni düzenle</string> + <string name="touch_droiddeck_menu">DroidDeck menüsü</string> + <string name="touch_drag_hint">Kontrolleri ekrana sürükle</string> + <string name="touch_arrange">Düzenle</string> + <string name="touch_discard">Vazgeç</string> + <string name="touch_saving">Kaydediliyor…</string> + <string name="touch_icon">Simge</string> + <string name="touch_narrower">G−</string> + <string name="touch_wider">G+</string> + <string name="touch_shorter">Y−</string> + <string name="touch_taller">Y+</string> + <string name="touch_hide">Gizle</string> + <string name="touch_color_opacity">Renk ve opaklık…</string> + <string name="touch_copy_layout">Bu düzeni kopyala</string> + <string name="touch_layout_copied">Düzen kopyalandı; herhangi bir oyunun dokunmatik düzenine yapıştırabilirsin</string> + <string name="touch_paste_layout">Kopyalanan düzeni yapıştır</string> + <string name="touch_reset_layout">Steam\'in varsayılanına sıfırla</string> + <string name="touch_no_binding">Bu kontrolün simge eklenebilecek bir Steam ataması yok</string> + <string name="touch_icon_for">%1$s için simge</string> + <string name="touch_layout_color">Dokunmatik düzen rengi</string> + <string name="touch_done">Bitti</string> + <string name="touch_save_failed">Dokunmatik düzen kaydedilemedi</string> + <string name="touch_saved">Dokunmatik düzen Steam\'e kaydedildi</string> + <string name="touch_app_id">Uygulama %1$d</string> + <string name="touch_label_hint">Etiket (isteğe bağlı)</string> + <string name="touch_icons_missing">Steam\'in simgeleri bulunamadı</string> + <plurals name="touch_icons_found"> + <item quantity="one">Steam\'den %1$d simge</item> + <item quantity="other">Steam\'den %1$d simge</item> + </plurals> + <string name="touch_icon_color">Simge rengi</string> + <string name="touch_button_color">Düğme rengi</string> + <string name="touch_no_icon">Simge yok</string> + + <string name="stores_sync_sign_in">Oturum açma durumu kontrol ediliyor…</string> + <string name="stores_sync_library">Kitaplığın alınıyor…</string> + <string name="stores_sync_game_list">Oyun listesi alınıyor…</string> + <string name="stores_sync_details">Oyun bilgileri yükleniyor… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">%1$d oyun eşitleniyor…</item> + <item quantity="other">%1$d oyun eşitleniyor…</item> + </plurals> + <string name="stores_sync_progress">Eşitleniyor… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Kapak görselleri alınıyor…</string> + <string name="stores_sync_failed">Eşitleme başarısız oldu</string> + <string name="stores_sync_no_games">%1$s kitaplığında oyun bulunamadı</string> + <string name="stores_sync_amazon_no_answer">Amazon Games kitaplığın için yanıt vermedi: yenile veya yeniden oturum aç</string> + <string name="stores_sync_gog_unreachable">GOG\'a bağlanılamadı</string> + <string name="stores_sync_gog_unreadable">GOG kitaplığın okunamadı</string> + <string name="stores_registering">Steam\'e kaydediliyor…</string> + <string name="mode_client_arch">Steam istemcisi</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC tanılaması</string> + <string name="setup_vac_diag_hint">Source oyunları konsollarını kaydeder (-condebug); oturum günlüklerindeki vac.txt güvenli olup olmadığını gösterir</string> + <string name="load_starting_steam_x64">Steam x86-64 başlatılıyor</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">x86-64 Steam istemcisi tarafından kullanılıyor</string> + <string name="storage_uninstall_in_x64">Bu kopya x86-64 Steam istemcisinde. Steam istemcisi altında x86-64 seçin, ardından burada kaldırın.</string> + <string name="storage_uninstall_in_arm64">Bu kopya ARM64 Steam istemcisinde. Steam istemcisi altında ARM64 seçin, ardından burada kaldırın.</string> + <string name="drawer_page_glasses">Gözlük</string> + <string name="glasses_open">VITURE gözlüğü</string> + <string name="glasses_control">Gözlük kontrolü</string> + <string name="glasses_driver_missing">Bu derleme, bu gözlüğün sürücüsünü içermiyor.</string> + <string name="glasses_connection_failed">Gözlüğe bağlanılamadı. Kabloyu yeniden takın veya yeniden denemek için İzin ver\'e dokunun.</string> + <string name="glasses_allow">İzin ver</string> + <string name="glasses_allow_hint">DroidDeck\'in gözlüğün yenileme hızını, 3D modunu, parlaklığını, ses düzeyini ve güneş korumasını ayarlamasına ve kafa takibini okumasına izin verir.</string> + <string name="glasses_asking">Android penceresinde izin vermeniz bekleniyor…</string> + <string name="glasses_denied">Kontrol reddedildi. Gözlüğün ayarlarını değiştirmek için izin verin.</string> + <string name="glasses_no_control">Bu gözlük oyunu gösterir ama ayarları buradan değiştirilemez.</string> + <string name="glasses_output">Çıkış</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Oyun gözlükte</string> + <string name="glasses_game_on_hint">Oyunu yalnızca gözlükte gösterir. Kapalı: oyunu telefon gösterir ve Android telefon ekranını yansıtır.</string> + <string name="glasses_display">Ekran</string> + <string name="glasses_refresh">Yenileme hızı</string> + <string name="glasses_3d">3D (yan yana)</string> + <string name="glasses_3d_hint">Akıllı gözlükleri yan yana 3B\'ye geçirin. Baş takibi ayrı olarak kontrol edilir.</string> + <string name="glasses_3d_failed">3D sinyali doğrulanamadı. 2D görüntü geri geldiğinde tekrar deneyin.</string> + <string name="glasses_no_signal">Görüntü yok: gözlük bu telefonun gönderemediği bir modda. Gözlüğün 2D/3D düğmesini basılı tutun ya da kablosunu çıkarıp yeniden takın.</string> + <string name="glasses_3d_refresh">3D yenileme hızı</string> + <string name="glasses_auto3d">VR oyunlarında 3D</string> + <string name="glasses_auto3d_hint">SteamVR çalışırken 3D\'ye geçer, sonra geri döner.</string> + <string name="glasses_picture">Resim</string> + <string name="glasses_picture_hint">Otomatik mod, düz içeriği her iki göze de gösterir ve SteamVR’ı algılar. SBS içeriği için Yan yana oyun seçeneğini seçin.</string> + <string name="glasses_picture_auto">Otomatik</string> + <string name="glasses_picture_screen">Sanal ekran</string> + <string name="glasses_picture_sbs">Yan yana oyun</string> + <string name="glasses_screen_size">Ekran genişliği</string> + <string name="glasses_screen_distance">Ekran uzaklığı</string> + <string name="glasses_screen_next_session">Genişlik ve uzaklık, oyun gözlükte sanal ekran olarak çalıştığında uygulanır.</string> + <string name="glasses_screen_no_output">Bu ayarlar, “Oyun gözlükte” açıkken ve oyun orada gösterilirken geçerlidir.</string> + <string name="glasses_screen_flat_hint">Otomatik, bu 2D oyunu tam ekran tutar. Genişliğini, uzaklığını ve kafa takibini ayarlamak için sanal ekran kullanın.</string> + <string name="glasses_screen_use">Sanal ekranı kullan</string> + <string name="glasses_screen_direct_hint">SteamVR görünümü doldurur. VR\'da görüş alanını ayarlayın; genişlik ve mesafe yalnızca sanal ekrana uygulanır.</string> + <string name="glasses_screen_sbs_hint">Yan yana oyunlar her gözü doldurur. Genişlik ve uzaklık yalnızca sanal ekranda geçerlidir.</string> + <string name="glasses_tracking_flat_hint">Otomatik, bu 2D oyunu görüşte sabit tutar. Kafa takibini kullanmak için “Ekran” bölümünde “Sanal ekran” seçeneğine geçin.</string> + <string name="glasses_tracking_sbs_hint">Kafa takibi, sanal ekranda veya çalışan bir SteamVR oyununda geçerlidir.</string> + <string name="glasses_hardware">Cihaz</string> + <string name="glasses_brightness">Parlaklık</string> + <string name="glasses_volume">Ses düzeyi</string> + <string name="glasses_sunblock">Güneş koruması</string> + <string name="glasses_sunblock_hint">Ön camları karartır.</string> + <string name="glasses_tracking">İzleme</string> + <string name="glasses_head_tracking">Kafa takibi</string> + <string name="glasses_head_tracking_hint">Gözlüğün kendi sensörleri sanal ekranı ve SteamVR\'ı başınızla birlikte döndürür.</string> + <string name="glasses_recenter">Görünümü ortala</string> + <string name="glasses_recenter_button">Ekranı yeniden ortala</string> + <string name="glasses_vr_fov">SteamVR görüş alanı</string> + <string name="glasses_vr_fov_hint">Düşük değer SteamVR\'ı yaklaştırır ve gözlüğü doldurur; yüksek değer çevrenizi daha çok gösterir.</string> + <string name="glasses_playing">%1$s ile oynanıyor</string> + <string name="glasses_calibration">Takip kalibrasyonu</string> + <string name="glasses_calibration_hint">Kaymayı azaltır ve yatay düzlem referansını hizalar.</string> + <string name="glasses_calibration_saved_hint">Kayıtlı kalibrasyon bu gözlüğe uygulanır.</string> + <string name="glasses_calibration_open">Kalibre et</string> + <string name="glasses_calibration_instructions">Bağlı gözlüğü, çerçevesi düzgünce oturacak şekilde düz bir yüzeye ters çevirerek koyun. Başlat\'a dokunun, sonra gözlüğe yaklaşık 8 saniye dokunmayın. Hareket ölçümü yeniden başlatır. Bu işlem kaymayı ve eğimi düzeltir, bakış yönünü değil.</string> + <string name="glasses_calibration_settling">Gözlüğü ters çevrili bırakın ve dokunmayın. Hareketsiz kalması bekleniyor…</string> + <string name="glasses_calibration_collecting">Sensörler ölçülüyor. Gözlüğü sabit tutun.</string> + <string name="glasses_calibration_moving">Hareket algılandı. Gözlüğe dokunmayın; ölçüm otomatik olarak yeniden başlayacak.</string> + <string name="glasses_calibration_turn_over">Gözlüğü düz bir yüzeye ters çevirerek koyun. Doğru konumlandığında ölçüm başlayacak.</string> + <string name="glasses_calibration_complete">Kalibrasyon kaydedildi. Gözlüğü takıp tam karşıya bakın, ardından ortalamak için Bitti\'ye dokunun.</string> + <string name="glasses_calibration_failed">Kalibrasyon tamamlanamadı. Bağlantıyı kontrol edin, gözlüğü sabit tutup tekrar deneyin. Önceki kalibrasyonunuz değişmedi.</string> + <string name="glasses_calibration_start">Başlat</string> + <string name="glasses_calibration_done">Bitti</string> + <string name="glasses_calibration_reset">Takip kalibrasyonunu sıfırla</string> + <string name="glasses_calibration_reset_hint">Kayıtlı kalibrasyon kaldırılsın ve model varsayılanları geri yüklensin mi? Gözlüğü yeniden taktıktan sonra ortalayın.</string> + <string name="glasses_calibration_reset_button">Sıfırla</string> + <string name="hand_camera_group">El takibi</string> + <string name="hand_camera_prompt_title">Telefon kamerasıyla elleri veya Joy-Con kumandalarını takip etme?</string> + <string name="hand_camera_prompt_body">Bağlı bir kumanda yokken, telefon kamerası VR\'da çıplak ellerinizi takip eder: tıklamak için baş parmağınızı ve işaret parmağınızı sıkıştırın, kavramak için elinizi kapatın ve menüyü açmak için avucunuzu kendinize doğru çevirin ve sıkıştırın. Eşleştirilmiş Joy-Con kumandalarıyla, kamera konumlarını takip ederken Joy-Con kumandaları döndürme ve düğme girişleri sağlar. Resimler bu cihazda işlenir ve asla kaydedilmez veya gönderilmez.</string> + <string name="hand_camera_rear">Arka kamera</string> + <string name="hand_camera_rear_hint">Önerilir. Genellikle daha net ve daha geniş.</string> + <string name="hand_camera_front">Ön kamera</string> + <string name="hand_camera_front_hint">Cihazın arkası size dönük olamadığında kullanın.</string> + <string name="hand_camera_allow">Kamerayı kullan</string> + <string name="hand_camera_not_now">Şimdi değil</string> + <string name="hand_camera_setting">Kamerayla el takibi</string> + <string name="hand_camera_setting_hint">Çıplak el hareketleri için veya VR\'da eşleştirilmiş Joy-Con kumandalarını konumlandırmak için telefon kamerasını kullanın. Joy-Con kumandaları döndürme ve düğme girişleri sağlar. Akıllı gözlükler ellerinizi veya Joy-Con kumandalarınızı izlerken duraklatır. Görüntüler yalnızca bu cihazda işlenir.</string> + <string name="hand_camera_choice">Kamera</string> + <string name="hand_camera_access">Kamera erişimi</string> + <string name="hand_camera_access_hint">El takibinin başlayabilmesi için kamera erişimine izin verin.</string> + <string name="hand_camera_access_denied">Kamera erişimi kapalı. Android ayarlarından açın.</string> + <string name="hand_camera_allow_button">İzin ver</string> + <string name="hand_camera_open_settings">Ayarları aç</string> + <string name="hand_camera_placement">Kamera konumu</string> + <string name="hand_camera_placement_hint">Oynamadan önce kameranın sizi görebildiğini kontrol edin.</string> + <string name="hand_camera_check">Kontrol et</string> + <string name="hand_camera_check_title">Kamera konumu</string> + <string name="hand_camera_how_rear">Cihazı yaklaşık göğüs hizasında, 1,5 ila 2 metre uzağa, arka kamera size dönük olacak şekilde dik durdurun. Ardından ellerinizi açarak görüntüye girin.</string> + <string name="hand_camera_how_front">Cihazı yaklaşık göğüs hizasında, 1,5 ila 2 metre uzağa, ekran size dönük olacak şekilde dik durdurun. Ardından ellerinizi açarak görüntüye girin.</string> + <string name="hand_camera_starting">Kamera başlatılıyor…</string> + <string name="hand_camera_stand_up">Cihaz düz yatıyor. Kamera size dönük olacak şekilde dik durdurun.</string> + <string name="hand_camera_upright">Kamera size dönük olacak şekilde cihazı daha dik durdurun.</string> + <string name="hand_camera_not_seen">Henüz sizi göremiyor. Baş ve omuzlarınız görünecek şekilde görüntüye girin.</string> + <string name="hand_camera_move_back">Biraz geri gidin.</string> + <string name="hand_camera_move_closer">Biraz daha yaklaşın.</string> + <string name="hand_camera_show_hands">Kameranın görebileceği şekilde iki elinizi de açın.</string> + <string name="hand_camera_good">İyi görünüyor.</string> + <string name="hand_camera_failed">Kamera başlatılamadı. Kamerayı kullanan diğer uygulamaları kapatıp tekrar deneyin.</string> + <string name="hand_camera_switch">Kamerayı değiştir</string> + <string name="hand_camera_skip">Atla</string> + <string name="hand_camera_done">Bitti</string> + <string name="glasses_xreal_network_missing">Gözlüğün USB Ethernet bağlantısı bekleniyor. Bu telefon bu bağlantıyı uygulamalara açmıyor olabilir.</string> + <string name="glasses_xreal_connection_failed">XREAL bağlantısı kesildi veya desteklenmeyen bir yanıt döndü. Yeniden deneniyor…</string> + <string name="glasses_xreal_experimental">Deneysel 1S desteği. Gözlük menüsünde Follow modunu kullanın ve görüntü sabitlemeyi kapatın. Takip yönlerinin ve ekran modlarının hâlâ cihazda test edilmesi gerekiyor.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard modu</string> + <string name="cardboard_mode_hint">Telefon VR gözlüğü için sol ve sağ göz görüntüleri.</string> + <string name="cardboard_source">Görüntü</string> + <string name="cardboard_source_screen">Sanal ekran</string> + <string name="cardboard_source_sbs">Yan yana 3D</string> + <string name="cardboard_viewer">Gözlük</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Lens yok</string> + <string name="cardboard_ipd">Göz arası mesafe</string> + <string name="cardboard_screen_width">Ekran genişliği</string> + <string name="cardboard_screen_distance">Ekran uzaklığı</string> + <string name="cardboard_head_tracking">Kafa takibi</string> + <string name="cardboard_no_sensor">Bu cihazda dönüş sensörü yok.</string> + <string name="cardboard_recenter">Görünümü ortala</string> + <string name="cardboard_recenter_button">Ortala</string> + <string name="cardboard_steamvr">SteamVR (deneysel)</string> + <string name="cardboard_steamvr_install">Yükle</string> + <string name="cardboard_steamvr_installing">SteamVR indiriliyor ve açılıyor…</string> + <string name="cardboard_steamvr_start">Başlat</string> + <string name="cardboard_steamvr_stop">Durdur</string> + <string name="cardboard_steamvr_unavailable">Bu oturumda kullanılamaz.</string> + <string name="cardboard_steamvr_failed">SteamVR yanıt vermedi; oturum günlüğünü kontrol et.</string> + <string name="drawer_component_downloads">Bileşenleri indir</string> + <string name="drawer_component_downloads_hint">İndirmeler Bileşenler sayfasıyla paylaşılır. Bir sonraki oyun başlatmada kullanmak için yukarıdan indirilmiş bir sürüm seç.</string> + <string name="drawer_component_choose_download">İndirilecek sürümü seç</string> + <string name="stores_fact_developer">Geliştirici</string> + <string name="stores_fact_publisher">Yayıncı</string> + <string name="stores_fact_released">Çıkış</string> + <string name="stores_hltb_main">Ana hikâye</string> + <string name="stores_hltb_extras">+ Ekstralar</string> + <string name="stores_hltb_completionist">Tamamlayıcı</string> + <string name="stores_hltb_hours">%1$s sa</string> + <string name="stores_hltb_minutes">%1$d dk</string> + <string name="mode_zram">zRAM sıkıştırma</string> + <string name="mode_zram_hint">Bir oyun çalışırken Steam istemcisinin belleği cihazın zram\'ına sıkıştırılır ve oyuna daha fazla RAM kalır. Steam\'in bir sonraki başlatılışında uygulanır.</string> + <string name="mode_zram_unsupported">Kullanılamıyor: bu cihazda zram veya swap yok ya da çekirdeği 5.4\'ten eski.</string> + <string name="setup_reset_settings">Tüm ayarları sıfırla</string> + <string name="setup_reset_settings_title">Tüm ayarlar sıfırlansın mı?</string> + <string name="setup_reset_settings_body">Ekran, performans, denetleyici, tema, dil ve başlatıcı ayarları varsayılanlarına döner. Oyunlarınız, Steam oturum bilgileriniz, mağaza hesaplarınız, indirilen sürücüler ve depolama klasörleriniz korunur.</string> + <string name="setup_reset_settings_button">Sıfırla</string> + <string name="setup_reset_settings_hint">Her ayarı varsayılanına döndürür</string> + <string name="setup_reset_settings_partial">Ayarlar sıfırlandı, ancak bazı bölümler sıfırlanamadı. Ayrıntılar günlüklerde.</string> + <string name="setup_reset_settings_profiles">Oyun profillerini de sıfırla (her oyunun Proton, FEX, bileşenleri ve ortamı ile Varsayılan profilin ortamı)</string> + <string name="setup_reset_settings_session_running">Ayarları sıfırlamadan önce oturumu durdurun.</string> + <string name="stores_storage_insufficient">Yeterli boş alan yok: %1$s gerekli, yalnızca %2$s boş</string> + <string name="stores_storage_low">Yetersiz alan (%1$s boş, %2$s gerekli)</string> + <string name="stores_target_free_unknown">Boş alan bilinmiyor</string> + <string name="display_picture_position">Resim konumu</string> + <string name="display_position_top">Üst</string> + <string name="display_position_bottom">Alt</string> + <string name="display_position_center">Orta (varsayılan)</string> + <string name="setup_tab_storage">Depolama</string> + <string name="storage_measuring">Depolama ölçülüyor…</string> + <string name="storage_measuring_hint">İlk seferde birkaç saniye sürer.</string> + <string name="storage_internal">Dahili depolama</string> + <string name="storage_used_of">%2$s alanın %1$s kadarı kullanılıyor</string> + <string name="storage_free">%1$s boş</string> + <string name="storage_droiddeck_uses">DroidDeck %1$s yer kaplıyor. Ölçüm: %2$s.</string> + <string name="storage_rescanning">yeniden ölçülüyor…</string> + <string name="storage_other_apps">Diğer Android uygulamaları</string> + <string name="storage_safe_now">Şimdi boşaltılabilir</string> + <string name="storage_safe_hint">Kullanılmayan çalışma zamanları, kalıntılar, eski günlükler</string> + <string name="storage_clean_up">Temizle…</string> + <string name="storage_session_running">Temizlemek veya kaldırmak için oturumu durdurun. Boyutlar görünmeye devam eder.</string> + <string name="storage_where">Nereye gidiyor</string> + <string name="storage_games">Steam oyunları</string> + <string name="storage_game_data">Oyun verileri</string> + <string name="storage_game_data_hint">Önekler %1$s · atölye %2$s · gölgelendiriciler %3$s</string> + <string name="storage_tools">Proton ve çalışma zamanları</string> + <string name="storage_tools_unused">%1$s kullanılmıyor</string> + <string name="storage_stores">GOG, Epic ve diğer mağazalar</string> + <string name="storage_stores_hint">Mağazalar bölümünden kaldırın</string> + <string name="storage_desktop">Masaüstü uygulamaları</string> + <string name="storage_desktop_hint">Flatpak uygulamaları ve çalışma zamanları</string> + <string name="storage_system">Linux sistemi ve Steam istemcisi</string> + <string name="storage_system_hint">Herhangi bir şeyin çalışması için gerekli</string> + <string name="storage_app_data">DroidDeck verileri</string> + <string name="storage_app_data_hint">Eski oturum günlükleri %1$s · önbellek · sürücüler</string> + <string name="storage_legend_games">Oyunlar</string> + <string name="storage_legend_data">Oyun verileri</string> + <string name="storage_legend_tools">Proton ve çalışma zamanları</string> + <string name="storage_legend_stores">Diğer mağazalar</string> + <string name="storage_legend_desktop">Masaüstü uygulamaları</string> + <string name="storage_legend_system">Linux sistemi</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Temizlik</string> + <string name="storage_clean_up_lede">Burada hiçbir şey kurulu oyunlara veya süren indirmelere dokunmaz.</string> + <string name="storage_nothing_to_clean">Şu anda temizlenecek bir şey yok.</string> + <string name="storage_selected">Seçili: %1$s · %2$s → %3$s boş</string> + <string name="storage_cleaning">Temizleniyor…</string> + <string name="storage_free_button">%1$s boşalt</string> + <string name="storage_freed">%1$s boşaltıldı.</string> + <string name="storage_item_runtimes">Kullanılmayan Steam çalışma zamanları ve Proton</string> + <string name="storage_item_leftovers">Kaldırılmış oyunların kalıntıları</string> + <string name="storage_item_leftovers_unsure">Kayıt içerebilecek kalıntılar</string> + <string name="storage_item_logs">Eski oturum günlükleri</string> + <string name="storage_item_logs_detail">Geçerli oturumun günlükleri tutulur</string> + <string name="storage_item_custom_detail">Hiçbir oyun kullanmıyor. Gerekirse Bileşenler bölümünden yeniden yükleyin.</string> + <string name="storage_item_shaders">Kurulu oyunların gölgelendirici önbelleği</string> + <string name="storage_item_shaders_detail">Oynarken yeniden oluşur. Her oyunun ilk dakikaları yine takılır.</string> + <string name="storage_tag_safe">Güvenli</string> + <string name="storage_tag_unused">Kullanılmıyor</string> + <string name="storage_tag_stutter">Takılma</string> + <string name="storage_tag_saves">Kayıtları denetleyin</string> + <string name="storage_tag_default">Varsayılan</string> + <string name="storage_tag_required">Gerekli</string> + <string name="storage_tag_not_used">Kullanılmıyor</string> + <string name="storage_back">Depolama</string> + <string name="storage_games_with_data">Verileriyle birlikte %1$s</string> + <string name="storage_sort_largest">En büyük</string> + <string name="storage_sort_least_played">En az oynanan</string> + <string name="storage_sort_sd">SD kartta</string> + <string name="storage_no_games">Burada oyun yok.</string> + <string name="storage_played">%1$s oynandı</string> + <string name="storage_never_played">Hiç oynanmadı</string> + <string name="storage_game_parts">Oyun %1$s · veri %2$s</string> + <string name="storage_uninstall">Kaldır</string> + <string name="storage_games_note">Kaldırma, Steam\'in kaydetmesi için Steam penceresini açar. Bir oyunu SD karta taşımak için Steam › Ayarlar › Depolama yolunu kullanın.</string> + <string name="storage_uninstall_title">%1$s kaldırılsın mı?</string> + <string name="storage_uninstall_body">Steam açılır ve onay ister. Bu, oyunun %1$s alanını boşaltır. Kalıntıları temizleyene kadar önek kalır ve Steam Cloud kayıtları hesabınızda kalır.</string> + <string name="storage_open_steam">Steam\'i aç</string> + <string name="storage_tools_detail">%1$s · %2$s kullanılmıyor</string> + <string name="storage_remove_unused">Kullanılmayanları kaldır · %1$s</string> + <string name="storage_in_use">Kullanımda</string> + <string name="storage_not_used">Kullanılmıyor</string> + <string name="storage_remove">Kaldır</string> + <string name="storage_remove_title">%1$s kaldırılsın mı?</string> + <string name="storage_remove_body">%1$s boşaltır. Bir oyun gerektirirse Steam yeniden indirir.</string> + <string name="storage_tool_fex_runtime">Linux x86 oyunları için gerekli (FEX)</string> + <string name="storage_tool_arm_runtime">ARM64 Proton\'lar için gerekli</string> + <string name="storage_tool_redist">Oyunların istediği VC++ ve DirectX kurulumları</string> + <string name="storage_tool_fex">Linux x86 oyunlarını çalıştırır</string> + <string name="storage_tool_steam">Steam aracı</string> + <string name="storage_tool_old_runtime">DroidDeck oyunları bu çalışma zamanı olmadan çalıştırır</string> + <string name="storage_tool_x86_proton">DroidDeck\'in çalıştıramadığı Proton x86</string> + <string name="storage_tool_custom_default">Tüm oyunlar için varsayılan</string> + <string name="storage_tool_custom_unused">Hiçbir oyun kullanmıyor</string> + <string name="storage_tool_custom_unknown">Steam ayarları okunamıyor, bu yüzden tutuluyor</string> + <string name="storage_cleanup_busy">Depolama temizliğinin bitmesini bekleyin</string> + <string name="storage_low_title">Yalnızca %1$s boş</string> + <string name="storage_low_body">Steam\'in güncellemeler ve gölgelendirici önbelleği için alana ihtiyacı var. 10 GB altında oyun güncellemeleri yarıda kalabilir.</string> + <string name="storage_low_safe">%1$s risksiz boşaltılabilir.</string> + <string name="storage_free_up">Yer aç</string> + <string name="storage_play_anyway">Yine de oyna</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d kurulu</item> + <item quantity="other">%d kurulu</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d SD kartta</item> + <item quantity="other">%d SD kartta</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d araç</item> + <item quantity="other">%d araç</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">%d oyunun boş önek klasörleri ve gölgelendirici önbelleği</item> + <item quantity="other">%d oyunun boş önek klasörleri ve gölgelendirici önbelleği</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">%d oyunun önekinde hâlâ dosyalar var; yerel kayıtlar da olabilir. Gerekirse önce bir kopya alın.</item> + <item quantity="other">%d oyunun önekinde hâlâ dosyalar var; yerel kayıtlar da olabilir. Gerekirse önce bir kopya alın.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d oyun</item> + <item quantity="other">%d oyun</item> + </plurals> + <string name="storage_tool_default_proton">DroidDeck varsayılan Proton</string> + <string name="storage_tool_proton">DroidDeck Proton 11 seçeneği</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d oyun kullanıyor</item> + <item quantity="other">%d oyun kullanıyor</item> + </plurals> + <string name="storage_legend_components">Bileşenler</string> + <string name="storage_components">Bileşenler</string> + <string name="storage_item_components">Kullanılmayan bileşenler</string> + <string name="storage_component_original">Orijinal %1$s · %2$s</string> + <string name="storage_original_confirm">%1$s boşaltır. Yalnızca artık kurulu olmayan bir Proton sürümünü geri yükler.</string> + <string name="storage_leftovers_unchecked">Denetlenmedi: bir Steam uygulamasının manifest dosyası okunamıyor, bu yüzden kaldırılmış oyunların önekleri okunana kadar kalır.</string> + <string name="storage_failed">Tamamlanamadı: %1$s</string> + <string name="storage_desktop_shared">Paylaşılan %1$s</string> + <string name="storage_data_installed">Kurulu oyunlar</string> + <string name="storage_data_parts">Önek %1$s · gölgelendiriciler %2$s · atölye %3$s</string> + <string name="storage_clear_shaders">Gölgelendiricileri sil</string> + <string name="storage_data_leftovers">Kaldırılmış oyunlar</string> + <string name="storage_steam_app">Steam uygulaması %1$d</string> + <string name="storage_leftover_unsure_detail">Önekinde hâlâ dosyalar var; yerel kayıtlar da olabilir</string> + <string name="storage_leftover_confirm">Önekini (Wine) ve gölgelendirici önbelleğini siler (%1$s). Gerekli kayıtların önce bir kopyasını alın; Steam Cloud kayıtları hesabınızda kalır.</string> + <string name="storage_data_other">Tutulanlar</string> + <string name="storage_data_other_title">Steam dışı oyunlar ve ortak Steam öneki</string> + <string name="storage_data_other_detail">Mağazaların veya elle eklenen oyunların önekleri</string> + <string name="storage_components_packages">İndirilen paketler</string> + <string name="storage_components_originals">Tutulan orijinaller</string> + <string name="storage_components_none">İndirilmiş bileşen paketi yok.</string> + <string name="storage_component_in_use">Bir Proton veya oyun için seçili</string> + <string name="storage_component_unused">Hiçbir yerde seçili değil</string> + <string name="storage_original_kept">Kurulu Proton\'ı geri yükler</string> + <string name="storage_original_old">Artık kurulu olmayan Proton sürümü</string> + <string name="storage_tag_in_use">Kullanımda</string> + <string name="storage_components_note">Kullanımdaki bileşenler kilitli kalır. Onları Bileşenler bölümünden seçin; burada kaldırdığınız paketler oradan yeniden indirilebilir.</string> + <string name="storage_component_confirm">%1$s boşaltır. Kendi içe aktardığınız paketler yeniden indirilemez.</string> + <string name="storage_desktop_detail">Flatpak uygulamaları için %1$s ve bunların paylaştıkları</string> + <string name="storage_desktop_apps_title">Uygulamalar</string> + <string name="storage_desktop_none">Kurulu Flatpak uygulaması yok.</string> + <string name="storage_desktop_shared_title">Uygulamaların paylaştıkları</string> + <string name="storage_desktop_runtimes">Çalışma zamanları</string> + <string name="storage_desktop_runtimes_detail">Uygulamaların üzerinde çalıştığı kitaplıklar; kullanılmayanlar Kullanılmayanları kaldır ile gider</string> + <string name="storage_desktop_cache">İndirme deposu</string> + <string name="storage_desktop_cache_detail">Flatpak object store ve önbelleğe alınmış indirmeler</string> + <string name="storage_desktop_prune">Kullanılmayanları kaldır</string> + <string name="storage_desktop_prune_body">Kurulu hiçbir uygulamanın istemediği çalışma zamanlarını kaldırır ve Flatpak object store\'u temizler. Kurulu uygulamalar çalışmaya devam eder.</string> + <string name="storage_flatpak_uninstall_body">Uygulamayı (%1$s) ve başka kimsenin kullanmadığı çalışma zamanlarını kaldırır. Ev klasöründeki verileri kalır.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d paket</item> + <item quantity="other">%d paket</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d uygulama</item> + <item quantity="other">%d uygulama</item> + </plurals> + <string name="boot_movie">Açılış videosu</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps daha akıcı görünür ama Steam açılırken işlemciyi daha çok kullanır. Steam\'in kendi ayarlarında seçilen açılış videosu önceliklidir.</string> + <string name="boot_movie_sound">Ses</string> + <string name="boot_movie_custom">Kendi videon</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV veya WebM. Diğer biçimler ve %1$d MB üzeri dosyalar cihazda 720p WebM\'e dönüştürülür, en fazla %2$d saniye.</string> + <string name="boot_movie_import">İçe aktar</string> + <string name="boot_movie_remove">Kaldır</string> + <string name="boot_movie_pick">Bir açılış videosu seç</string> + <string name="boot_movie_imported">%1$s artık açılış videosu</string> + <string name="boot_movie_imported_silent">%1$s artık açılış videosu, sessiz</string> + <string name="boot_movie_too_long">Dönüştürülecek videolar en fazla %1$d saniye olabilir</string> + <string name="boot_movie_converting">Dönüştürülüyor %%%1$d</string> + <string name="boot_movie_converting_started">%1$s Steam için dönüştürülüyor. DroidDeck\'i açık tut.</string> + <string name="boot_movie_unsupported">Bu cihaz o videonun kodunu çözemiyor.</string> + <string name="boot_movie_import_failed">Video içe aktarılamadı</string> + <string name="glasses_experimental">Luma Ultra kameralar — Deneysel</string> + <string name="glasses_joycons">Joy-Con konum takibi</string> + <string name="glasses_joycons_hint">Eşleştirilmiş Joy-Con kumandalarınızı konumlandırmak için akıllı gözlük kameralarını kullanın. Döndürme ve düğme girişleri Joy-Con kumandalarından gelir. Bilekleriniz gizlendiğinde konum tahmin edilir. Çıplak elle çalıştırılan kumandaların yerini alır ve telefon kamerası izlemesini duraklatır. İzleme merkezini bağlarken veya sıfırlarken Joy-Con kumandalarını ileriye doğru çevirin.</string> + <string name="glasses_joycons_requires_position">Önce konum takibini etkinleştirin. Android 12 veya üzeri sürümlerde hareket algılama özelliğine sahip Joy-Con kumandaları gerektirir. Varsayılan olarak kapalıdır.</string> + <string name="setup_tab_glasses">Akıllı gözlükler</string> + <string name="setup_glasses_scope">Ekran ve baş izleme ayarları DroidDeck menüleri, oyunlar ve masaüstü oturumları arasında paylaşılır.</string> + <string name="setup_glasses_connect">Ekran ve izleme ayarlarını değiştirmek için akıllı gözlükleri bağlayın. Bağlantıyı kestiğinizde kaydedilmiş ayarlarınız korunur.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Görüntüleme modu</string> + <string name="glasses_output_2d">2B çıktı</string> + <string name="glasses_output_3d">3B çıktı</string> + <string name="glasses_picture_group">Resim ve sanal ekran</string> + <string name="glasses_position_group">Konum ve zemin seviyesi</string> + <string name="glasses_hands_group">El takibi — Deneysel</string> + <string name="glasses_tracking_status">Takip durumu</string> + <string name="glasses_resolution_2d">2B çözünürlük</string> + <string name="glasses_resolution_3d">3B çözünürlük</string> + <string name="glasses_resolution_vr">VR çözünürlük</string> + <string name="glasses_resolution_auto">Otomatik</string> + <string name="glasses_resolution_inherit">2B / 3B ile aynı</string> + <string name="glasses_resolution_hint">Göz başına çıktı çözünürlüğü.</string> + <string name="glasses_refresh_30_hint">Ekranın yerel 30 Hz modunu seçmek için Akıllı gözlüklerde Oyun özelliğini etkinleştirin.</string> + <string name="glasses_3dof">3DoF sanal ekran</string> + <string name="glasses_3dof_hint">Etrafınıza bakabilmeniz için düz oyunları önünüze sabitleyin. 3B\'ye geçmeden Akıllı gözlüklerde Oyun özelliğini etkinleştirir.</string> + <string name="glasses_screen_app_wide">Genişlik ve mesafe, DroidDeck menüleri, oyunları ve masaüstü oturumları için izlenen sanal ekranı anında günceller.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Konumsal izleme, SteamVR\'da baş döndürmeyi içerir. Yalnızca döndürme izleme için konumsal izlemeyi kapatın.</string> + <string name="glasses_head_tracking_spatial_hint">Sanal ekranda baş hareketini kontrol eder. Konumsal izleme, SteamVR\'da baş döndürmeyi içerir.</string> + <string name="glasses_quick_actions">Hızlı işlemler</string> + <string name="glasses_recenter_screen_hint">Ekranın nerede olmasını istediğinize bakın, ardından yüksekliğini ve yönünü ayarlamak için izleme merkezini sıfırlayın.</string> + <string name="glasses_recenter_joycons_button">Joy-Con cihazlarını yeniden ortala</string> + <string name="phone_camera_tracking_group">Telefon kamerası — Deneysel</string> + <string name="phone_camera_tracking_setting">Elleri veya Joy-Con kumandalarını takip etme</string> + <string name="glasses_6dof">6DoF sanal ekran</string> + <string name="glasses_position">Konumsal izleme — deneysel</string> + <string name="glasses_position_hint">VR\'da ve sanal ekranlar etrafında fiziksel hareket. İzlemeyi yeniden başlatmak biraz zaman alır.</string> + <string name="glasses_eye_height">Zeminden mevcut göz yüksekliği</string> + <string name="glasses_floor">Mevcut yükseklikten zemin seviyesini ayarlayın</string> + <string name="glasses_floor_set">Zemin seviyesini ayarlayın</string> + <string name="glasses_spatial_setup">Stereo kamera kurulumu ve teşhis</string> + <string name="glasses_spatial_setup_hint">Oynamadan önce kamera kalibrasyonunu ve ellerin izlenmesini kontrol edin.</string> + <string name="glasses_spatial_open">Kurulumu açın</string> + <string name="glasses_hands">Çıplak elle kullanılan kumandalar</string> + <string name="glasses_hands_hint">VR\'da ellerinizle nişan almak, tıklamak için sıkıştırmak ve yakalamak için elinizi kapatmak için akıllı gözlük kameralarını kullanın. Oyun kumandası çubukları hareket eder ve döner. Joy-Con konum izlemesinin yerini alır. Oyunlar sırasında gecikme yaşanabilir veya izleme kaybolabilir.</string> + <string name="glasses_hands_ready_hint">İzleme bölümünde Luma Ultra kameraları altında çıplak elle kullanılan kumandaları etkinleştirin. Önce açık elleri gösterin.</string> + <string name="glasses_hands_base">Paylaşılan Luma Ultra kalibrasyonu</string> + <string name="glasses_hands_base_hint">Paylaşılan Luma Ultra tabanını kullanma. Doğruluğunu doğrulamak için kendi akıllı gözlüklerinizi kalibre edin.</string> + <string name="glasses_hands_calibration_verified">Ölçülen kalibrasyon doğrulandı</string> + <string name="glasses_hands_calibration_required">Doğrulama gerekli</string> + <string name="glasses_hands_calibration_required_hint">Ölçülen mesafe kontrolü geçtikten sonra çıplak elle çalıştırılan kumandalar kullanılabilir hale gelir.</string> + <string name="tracking_recovery_lost">İzleme kayboldu</string> + <string name="tracking_recovery_restart_help">Hala takılıp kaldınız mı? Telefonunuzda: akıllı gözlük → İzleme → Kurulumu aç → Tanılamayı göster → İzlemeyi yeniden başlatın.</string> + <string name="tracking_recovery_disconnected">Akıllı gözlük bağlantısı kesildi</string> + <string name="tracking_recovery_connect">USB bağlantısını kontrol edin ve akıllı gözlükleri yeniden bağlayın.\nTelefonunuzda USB erişim istemi belirirse, kabul edin.</string> + <string name="tracking_recovery_usb_help">Bağlandıktan sonra, izlemeyi yeniden başlatmak için iyi aydınlatılmış bir odada yavaşça etrafınıza bakın.</string> + <string name="tracking_recovery_recenter">Yeniden ortalama gerekli</string> + <string name="tracking_recovery_recenter_steps">İzleme yeni bir konumda geri döndü.\nİleriye bakın, ardından telefonunuzda izleme merkezini sıfırla seçeneğine dokunun.</string> + <string name="tracking_recovery_recenter_help">İzleme merkezini sıfırlama seçeneğini akıllı gözlükler → İzleme → Kurulumu aç bölümünde de bulabilirsiniz. Kaydedilen kamera kalibrasyonunuz korunur.</string> + <string name="tracking_recovery_stabilizing">Bir an hareketsiz dur</string> + <string name="tracking_recovery_hold">İzleme merkezi sıfırlama işlemi devam ediyor.\nİzleme sabitlenirken akıllı gözlükleri sabit tutun.</string> + <string name="tracking_recovery_automatic">Kafa takibi hazır olduğunda bu ekran otomatik olarak kapanır.</string> + <string name="glasses_steady_hand_aim">Ellerle stabilize nişan alma</string> + <string name="glasses_steady_hand_aim_hint">Omzunuzdan avucunuzun içine doğru nişan alın. Bilek kontrollü dönüş için kapatın.</string> + <string name="spatial_title">Uzamsal kurulum</string> + <string name="spatial_wait_tracking">Takip bekleniyor…</string> + <string name="spatial_cameras_description">Sol ve sağ izleme kameraları</string> + <string name="spatial_camera_sync">Kamera senkronizasyonu</string> + <string name="spatial_ready">Hazır</string> + <string name="spatial_sync_hint">Kamera ve kafa takibinin hizalanması bekleniyor. Akıllı gözlükleri bağlı tutun.</string> + <string name="spatial_prepare">1. Kalibrasyon hedefini hazırlayın</string> + <string name="spatial_print_actual">Gerçek boyutta yazdır</string> + <string name="spatial_print_hint">Her karenin ölçüsü 30 mm (1,181 inç) olmalıdır. Levhayı iyi aydınlatılmış bir alanda sert bir yüzeye düz olarak monte edin.</string> + <string name="spatial_print">Kalibrasyon desenini yazdır</string> + <string name="spatial_capture_group">2. Farklı görünümler yakalayın</string> + <string name="spatial_board_stationary">Kalibrasyon hedefini sabit tutun</string> + <string name="spatial_capture_hint">Akıllı gözlükleri yaklaştırın, uzaklaştırın ve yanlara doğru hareket ettirin. Bunları sola/sağa çevirin, yukarı/aşağı açı verin ve yanlara doğru eğin. Kalibrasyon hedefini her iki kamerada da tutun ve her çekimden önce kısa bir süre duraklayın.</string> + <string name="spatial_start">Yeni kalibrasyonu başlat</string> + <string name="spatial_wait_sync">Kamera senkronizasyonu bekleniyor.</string> + <string name="spatial_start_hint">Görünümleri toplamak için yeni bir kalibrasyon başlatın.</string> + <string name="spatial_views_hint">Kalibrasyon hedefini her iki önizlemede de görünür tutun. Farklı açılardan en az 24 keskin görüntü yakalayın.</string> + <string name="spatial_capturing">Yakalanıyor…</string> + <string name="spatial_capture">Kalibrasyon hedefi görünümünü yakala</string> + <string name="spatial_alignment">Kamera hizalamasını hesapla</string> + <string name="spatial_calculating">Hesaplanıyor…</string> + <string name="spatial_calculate">Kalibrasyonu hesapla</string> + <string name="spatial_distance_group">3. Mesafeyi kontrol edin</string> + <string name="spatial_distance">Ölçülen mesafe</string> + <string name="spatial_distance_hint">Yazdırılan işaretlerin daha kolay algılanması için 12 inç veya 30 cm ile başlayın. Kullanacağınız tam ölçümü seçin.</string> + <string name="spatial_camera_board_distance">Sol kamera kalibrasyon hedefinin merkezine</string> + <string name="spatial_checking_distance">Mesafe kontrol ediliyor…</string> + <string name="spatial_validate">Mesafeyi doğrula</string> + <string name="spatial_diagnostics">Teşhis</string> + <string name="spatial_show_diagnostics">Tanılamayı göster</string> + <string name="spatial_diagnostics_hint">Kamera zamanlaması ve izleme kurtarma araçları.</string> + <string name="spatial_camera_timing">Kamera zamanlaması</string> + <string name="spatial_hand_input">Ellerin takibinden gelen girdi</string> + <string name="spatial_wait_timing">Kamera zamanlaması bekleniyor.</string> + <string name="spatial_frames">Kamera görüntüleri</string> + <string name="spatial_gpu">Ellerin GPU tespiti</string> + <string name="spatial_gpu_hint">CPU varsayılandır. GPU deneyseldir ve SteamVR\'nin yeniden başlatılmasına neden olabilir. İzleme yeniden başlatıldığında bu seçim sıfırlanır.</string> + <string name="spatial_lite">El modellerinin Lite tespiti</string> + <string name="spatial_lite_hint">Lite avuç içi dedektörünü ve ellerdeki Lite anahtar noktalarını kullanın. Nişan alma, sıkıştırma ve yakalama doğruluğunu kontrol edin. İzleme yeniden başlatıldığında sıfırlanır.</string> + <string name="spatial_adaptive">Ellerin takibi için otomatik giriş frekansı</string> + <string name="spatial_adaptive_hint">Girişi işlem hızına ayarlayın. İzleme yeniden başlatıldığında sıfırlanır.</string> + <string name="spatial_half_rate">Ellerin takibi için giriş frekansını sınırlayın</string> + <string name="spatial_half_rate_hint">Kamera görüntülerinin yarısını kullanın. Maksimum frekansı karşılaştırmak için kapatın. İzleme yeniden başlatıldığında sıfırlanır.</string> + <string name="spatial_diagnostic_capture">Tanısal yakalama</string> + <string name="spatial_diagnostic_capture_hint">Bir stereo görüntü çiftini yerel olarak kaydedin. Resimler yalnızca istendiğinde kaydedilir.</string> + <string name="spatial_save_frame">Kamera görüntüsünü kaydet</string> + <string name="spatial_restart_tracking">Takibi yeniden başlat</string> + <string name="spatial_restart_hint">İyi aydınlatılmış bir alanda izleme düzelmezse kullanın. Yeniden başlatma, yeni bir izleme kaynağı gerektirir.</string> + <string name="spatial_restart">Yeniden başlat</string> + <string name="spatial_restart_title">İzleme yeniden başlatılsın mı?</string> + <string name="spatial_restart_confirm">Kaydedilmemiş kalibrasyon görüntüleri kaybolacaktır. Daha sonra akıllı gözlükleri sabit tutun ve izleme geri yüklendiğinde izleme merkezini sıfırlayın.</string> + <string name="spatial_views_count">%1$d / 24 görüntüleme yakalandı</string> + <string name="spatial_capture_paused">Yakalama duraklatıldı: %1$s</string> + <string name="spatial_measure_hint">Ölçün %1$s. Kalibrasyon hedefinin tamamını her iki önizlemede de gösterin ve ardından sabit tutun.</string> + <string name="spatial_timing_values">%1$.1f Hz • görüntü yaşı %2$.1f ms • işleme %3$.1f ms</string> + <string name="spatial_input_values">Kamera görüntülerinin giriş sınırı %1$.1f Hz • %2$.0f%%. Kafa takibi maksimum frekansında devam eder.</string> + <string name="spatial_frame_counts">%1$d işlendi • %2$d bırakıldı • %3$d giriş sınırına göre atlandı</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra kalibrasyonu</string> + <string name="spatial_print_scale" formatted="false">100% / Gerçek boyutta yazdırın. Her kare: 30 mm (1,181 inç).</string> + <string name="spatial_print_stationary">Kalibrasyon hedefini düz ve sabit tutun; akıllı gözlükleri çekimler arasında hareket ettirin.</string> + <string name="spatial_print_check">Ölçek kontrolü: İşaretler arasında 100 mm (3,937 inç)</string> + <string name="spatial_distance_12in">12 inç (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 inç)</string> + <string name="spatial_distance_20in">20 inç (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 inç)</string> + <string name="spatial_disabled">Devre Dışı</string> + <string name="spatial_wait_stable">Kararlı izleme bekleniyor</string> + <string name="spatial_disconnected">Bağlantı kesildi</string> + <string name="spatial_hands_off">Çıplak elle çalıştırılan denetleyiciler kapalı</string> + <string name="spatial_tracking_off">Konumsal izleme kapalı veya akıllı gözlüklerin bağlantısı kesilmiş</string> + <string name="spatial_recenter_pending">İzleme merkezi sıfırlama isteği - izleme sabitlenirken sabit tutun</string> + <string name="spatial_tracking_lost">Takip kaybı — görünür ayrıntılara sahip, iyi aydınlatılmış bir alanla yüzleşin</string> + <string name="spatial_origin_changed">İzleme orijini değişti - izleme merkezini sıfırla\'ya dokunun, ardından sabit tutun</string> + <string name="spatial_active">6DoF aktif</string> + <string name="spatial_connect_hint">Luma Ultra\'yı bağlayın ve konumsal izlemeyi etkinleştirin.</string> + <string name="spatial_validation_session">Bu bağlantı için kalibrasyon doğrulandı.</string> + <string name="spatial_validation_saved">Kalibrasyon doğrulandı ve kaydedildi.</string> + <string name="spatial_wait_cameras">Stereo kameralar bekleniyor</string> + <string name="spatial_wait_hands">Ellerin takibi bekleniyor</string> + <string name="spatial_collect_instructions">5 × 7 kalibrasyon hedefini sabit tutun. Akıllı gözlükleri hareket ettirirken ve döndürürken 24\'ten fazla görüntü yakalayın.</string> + <string name="spatial_capture_pending">Sonraki kamera görüntüsü bekleniyor. Akıllı gözlüğü sabit tutun.</string> + <string name="spatial_validation_pending">Sonraki kamera görüntüsü kontrol ediliyor. Tam kalibrasyon hedefini görünür tutun ve sabit tutun.</string> + <string name="spatial_start_first">Önce kalibrasyonu başlatın</string> + <string name="spatial_no_camera_frame">Yeni kamera görüntüsü gelmedi. Akıllı gözlük bağlantısını ve kamera önizlemelerini kontrol edip tekrar deneyin.</string> + <string name="spatial_clock_reset">Kamera saatini sıfırlama</string> + <string name="spatial_frame_changed">İzleme koordinat sistemi değişti. Görüntüleriniz yeniden hesaplama için kaydedildi. İzleme merkezini sıfırlayın, ardından daha fazla görüntü yakalamak için yeni bir set başlatın.</string> + <string name="spatial_device_loaded">cihaz kalibrasyonu yüklendi</string> + <string name="spatial_base_loaded">Luma Ultra temel kalibrasyonu yüklendi</string> + <string name="spatial_calibration_needed">kalibrasyon gerekli</string> + <string name="spatial_tap_start">Önce yeni kalibrasyonu başlat\'a dokunun.</string> + <string name="spatial_capture_recenter_pending">İzleme merkezi sıfırlama, sabit izlemeyi bekliyor. Bir an için sabit tutun.</string> + <string name="spatial_capture_recenter">İzleme değişti. Yakalamadan önce izleme merkezini sıfırla\'ya bir kez dokunun, ardından sabit tutun.</string> + <string name="spatial_capture_unsynchronized">Yakalama reddedildi: Baş takibi yakalama sırasında senkronize değildi veya değişti. Hareketsiz kal ve tekrar dene.</string> + <string name="spatial_align_first">Mesafeyi kontrol etmeden önce kamera hizalamasını hesaplayın.</string> + <string name="spatial_processing_failed">kamera işleme başarısız oldu</string> + <string name="spatial_hand_head_changed">Ellerin tespiti sırasında kafa takibi değişti</string> + <string name="spatial_hand_wait_sync">Kamera ve kafa senkronizasyonu bekleniyor</string> + <string name="spatial_no_wrists">Bilek algılanmadı. Joy-Con kumandanızın tutacaklarını akıllı gözlüğün önünde tutun</string> + <string name="spatial_no_hands">El algılanmadı. Akıllı gözlüklerin önünde açık avuç içi göster</string> + <string name="spatial_one_camera_wrists">Bilekler yalnızca bir kamerada görünüyor; denetleyici tutamaçlarınızı paylaşılan görünümde tutun</string> + <string name="spatial_one_camera_hands">Eller yalnızca bir kamerada görünüyor; her iki avucunuzu da paylaşılan görünümde tutun</string> + <string name="spatial_ambiguous_hands">Her iki kamera da elleri görüyor ancak sol/sağ eşleşmesi belirsiz</string> + <string name="spatial_inconsistent_depth">Eller algılandı ancak stereo derinliği tutarsız</string> + <string name="spatial_rejected_wrist">Bilek konumu stereo veya hareket kontrolleri tarafından reddedildi</string> + <string name="spatial_inconsistent_palm">Stereo noktalar algılandı ancak avuç içi geometrisi tutarsız</string> + <string name="spatial_hands_need_calibration">Elleri etkinleştirmek için kalibrasyonu ve mesafe kontrolünü tamamlayın</string> + <string name="spatial_hands_wait_stable">Sabit kafa izlemesi bekleniyor; istenirse izleme merkezini sıfırlayın</string> + <string name="spatial_old_frame">Kamera gözlemi çok eski; yeni bir çift bekliyorum</string> + <string name="spatial_fit_ready">%1$.2f piksele sığdır. Sol kameradan kalibrasyon hedef merkezine kadar seçtiğiniz mesafeyi ölçün ve ardından doğrulayın.</string> + <string name="spatial_opencv_error">OpenCV kullanılamıyor: %1$s</string> + <string name="spatial_restored">%1$d kayıtlı görünüm geri yüklendi. Yeniden denemek için kalibrasyonu hesaplayın veya daha fazlasını yakalamak için yeni bir set başlatın.</string> + <string name="spatial_captured">Yakalandı %1$d / 24 görüntüleme. Kalibrasyon hedefini sabit tutun; Bir sonraki görünüm için akıllı gözlükleri hareket ettirin.</string> + <string name="spatial_capture_corners">Yakalama reddedildi: %1$d / 12 gerekli köşe her iki kamerada da görünüyor. Kalibrasyon hedefinin daha fazlasını gösterin, sabit durun ve tekrar deneyin.</string> + <string name="spatial_validation_error">Mesafe kontrolü tamamlanamadı: %1$s. Tekrar deneyin.</string> + <string name="spatial_inference_error">Ellerin algılanması kullanılamıyor: %1$s. Yeniden denemek için CPU/GPU\'yu değiştirin veya çıplak elle çalıştırılan denetleyicileri değiştirin.</string> + <string name="spatial_hand_timeout">Ellerin tespiti %1$d ms\'yi aştı; gözlem atıldı</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con bilek konumu stereo ile ölçüldü</string> + <string name="spatial_palms_tracked">İzlenen avuç içi: %1$d / 2; çimdik hareketi hazır: %2$d; kavrama hareketi hazır: %3$d</string> + <string name="spatial_capture_saved">Teşhis yakalaması %1$s\'a kaydedildi</string> + <string name="spatial_hand_error">Ellerin takibi durduruldu: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Kafa takibi ve kalibrasyon hedefi %1$s (sınır 5 cm / 2 inç) kadar uyuşmuyor. Kalibrasyon hedefini sabit tutun ve yeni bir sete başlamadan önce istikrarlı izlemeyi bekleyin. Akıllı gözlükleri yavaşça çevirin ve eğin; her yakalamadan önce duraklatın.</string> + <string name="spatial_bad_baseline">Mantıksız kamera temel çizgisi</string> + <string name="spatial_need_orientations">Başınızı daha çeşitli yönlere doğru hareket ettirin.</string> + <string name="spatial_bad_rotation">Geçersiz kamera-kafa dönüşü</string> + <string name="spatial_bad_alignment">Kamera-kafa hizalaması tutarsız.</string> + <string name="spatial_calibration_error">Kalibrasyon tamamlanamadı. %1$s Yakalanan görünümleriniz kaydedilir.</string> + <string name="spatial_reprojection_error">Bekletilen yeniden projeksiyon hatası %1$.2f piksel, 2 pikseli aşıyor. Yeniden kalibre edin.</string> + <string name="spatial_distance_corners">%1$d / Her iki kamerada da 24 dama tahtası köşesi algılandı. Tam kalibrasyon hedefini görünür tutun ve sabit tutun. Zaten görünüyorsa, 12 inç veya 30 cm\'yi seçin ve tekrar denemeden önce bu yakın mesafeyi ölçün.</string> + <string name="spatial_distance_depth">Kalibrasyon hedefi görünür ancak derinliği güvenilir bir şekilde ölçülemedi. Akıllı gözlüğü sabit tutun ve kalibrasyon hedefini düz ve iyi aydınlatılmış halde tutun, ardından yeniden deneyin.</string> + <string name="spatial_distance_invalid">Kamera ölçümü geçersizdi. Kımıldama ve tekrar dene.</string> + <string name="spatial_distance_passed">Mesafe kontrolü başarılı oldu.</string> + <string name="spatial_distance_retry">Sol kamera ile kalibrasyon hedefinin merkezi arasındaki mesafeyi yeniden kontrol edin ve ardından yeniden deneyin.</string> + <string name="spatial_distance_result">Kameralar ölçüldü %1$s; seçilen mesafe %2$s. %3$s</string> + <string name="spatial_wait_previews">Kalibrasyona başlamadan önce her iki kamera önizlemesini bekleyin.</string> + <string name="spatial_saved_views_hint">Kaydedilen görünümler yeniden hesaplanabilir. Geçerli izleme koordinat sistemini yakalamak için yeni bir kalibrasyon başlatın.</string> + <string name="spatial_model_checksum_error">El modeli sağlama toplamı uyuşmazlığı</string> + <string name="spatial_opencv_load_error">OpenCV yüklenemedi</string> + <string name="tracking_recovery_look">İyi aydınlatılmış bir odada yavaşça etrafa bakın.\nİzleme kameralarını temiz tutun ve mobilyalara veya diğer görünür ayrıntılara doğru bakın.</string> + <string name="spatial_need_views">Sabit kalibrasyon hedefinin en az 24 farklı görünümünü yakalayın.</string> + <string name="spatial_need_rotation">Akıllı gözlükleri sola ve sağa çevirin, yukarı ve aşağı eğin; dönme olmadan hareket, kamera hizalamasını kalibre edemez.</string> +</resources> diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml new file mode 100644 index 0000000000..fb30a8e4e3 --- /dev/null +++ b/app/src/main/res/values-uk/strings.xml @@ -0,0 +1,2955 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Графіка SteamVR зупинилася</string> + <string name="steamvr_recovery_countdown">DroidDeck перезапуститься через %1$d с, щоб скинути графіку й знову відкрити SteamVR. Запущену гру буде закрито; незбережений прогрес не вдасться відновити.</string> + <string name="steamvr_recovery_repeated">Збій графіки повторився після нещодавнього перезапуску. Автоматичне відновлення призупинено, щоб уникнути циклу. Перезапуск закриє гру; незбережений прогрес не вдасться відновити.</string> + <string name="steamvr_recovery_restart">Перезапустити зараз</string> + <string name="steamvr_recovery_cancel">Не закривати</string> + <string name="steamvr_recovery_restarting">Скидання графіки й повторне відкриття SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck не вдалося перезапуститися автоматично. Повністю закрийте додаток, а потім відкрийте його знову.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Під час першого запуску завантажується Steam. Це може зайняти кілька хвилин.</item> + <item>За замовчуванням вихід із додатка ставить Steam на паузу; коли ви повернетеся, усе продовжиться з того самого місця.</item> + <item>Ваш контролер відображається як геймпад Xbox 360. Якщо контролера немає, скористайтеся екранним керуванням.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Під час першого запуску налаштовується робочий стіл. Це може зайняти кілька хвилин.</item> + <item>За замовчуванням вихід із додатка ставить сеанс на паузу; коли ви повернетеся, усе продовжиться з того самого місця.</item> + <item>Екран працює як сенсорна панель: проводьте пальцем, щоб рухати вказівник, і торкайтеся, щоб клацнути.</item> + <item>Ваш контролер відображається як геймпад Xbox 360. Якщо контролера немає, скористайтеся екранним керуванням.</item> + </string-array> + <string name="session_channel">Сеанс</string> + <string name="session_channel_description">Відображається, поки відкрито сеанс Steam або робочого столу</string> + <string name="session_notification">Steam працює</string> + <string name="session_notification_downloads">Триває завантаження в Steam</string> + <string name="session_notification_paused">Сеанс призупинено — торкніться «Відновити», коли будете готові</string> + <string name="resume_session">Відновити</string> + <string name="suspend_now">Призупинити зараз</string> + <string name="stop_session">Завершити сеанс</string> + <string name="frame_gen_title">Генерація кадрів</string> + <string name="frame_gen_hint">Виберіть режим генерації кадрів</string> + <string name="frame_gen_off">Вимк.</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG адаптивний %1$d</string> + <string name="lsfg_needs_steam">Потрібен Lossless Scaling зі Steam</string> + <string name="lsfg_needs_install">Установіть Lossless Scaling у Steam або імпортуйте Lossless.dll</string> + <string name="lsfg_import">Імпортувати Lossless.dll…</string> + <string name="lsfg_using_steam">Використовується копія зі Steam</string> + <string name="lsfg_using_import">Використовується імпортована копія</string> + <string name="lsfg_pick_title">Виберіть Lossless.dll</string> + <string name="lsfg_imported">Lossless.dll імпортовано</string> + <string name="lsfg_import_unchanged">Цей Lossless.dll уже використовується</string> + <string name="lsfg_import_not_owned">У цьому обліковому записі Steam немає Lossless Scaling</string> + <string name="lsfg_import_invalid">Цей файл не є Lossless.dll від Lossless Scaling</string> + <string name="lsfg_import_failed">Не вдалося підготувати LSFG із цього Lossless.dll</string> + <string name="lsfg_problem_missing">Для LSFG потрібен Lossless Scaling зі Steam або імпортований Lossless.dll</string> + <string name="lsfg_problem_failed">LSFG не вдалося підготувати шейдери з Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: не підтримується</string> + <string name="hud_fg_failed">%1$s: збій рушія</string> + <string name="hud_fg_needs_lossless">%1$s: потрібен Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · запуск</string> + <string name="second_library_import_hint">Додає бібліотеку Steam і шукає в ній ігри для Windows. Придбані ігри використовують свої записи в Steam, решта стають ярликами сторонніх ігор.</string> + <string name="game_env_title">Середовище гри</string> + <string name="game_env_hint">Змінні середовища для ігор Proton.</string> + <string name="game_env_edit">Змінити</string> + <string name="game_env_shared">Усі ігри Proton</string> + <string name="game_env_scope">Профіль</string> + <string name="game_env_app_id">ID додатка Steam</string> + <string name="game_env_open">Відкрити</string> + <string name="game_env_profile">Гра %1$s</string> + <string name="game_env_add">Додати змінну</string> + <string name="game_env_name">Назва змінної</string> + <string name="game_env_value">Значення</string> + <string name="game_env_save">Зберегти</string> + <string name="game_env_remove">Видалити</string> + <string name="game_env_restore">Знову успадковувати</string> + <string name="game_env_reset">Скинути перевизначення середовища</string> + <string name="game_env_unset">Не задавати в цьому профілі</string> + <string name="game_env_empty">Змінних не задано.</string> + <string name="game_env_inherited">Успадковано</string> + <string name="game_env_custom">Власна змінна</string> + <string name="game_env_error">Не вдалося завантажити або зберегти. Перевірте вільне місце й спробуйте ще раз.</string> + <string name="game_env_invalid">Укажіть коректну назву та значення до 8192 символів.</string> + <string name="game_env_unused">Стандартне середовище Proton не читає цю змінну.</string> + <string name="game_env_loading">Завантаження…</string> + <string name="game_env_feature">Перевизначення рівня функцій D3D12. 12_2 повідомляє можливості DirectX 12 Ultimate; непідтримувані функції можуть давати збої. Не задавайте для автоматичного визначення.</string> + <string name="game_env_shader">Перевизначення моделі шейдерів D3D12. Для 6_9 потрібні досить новий VKD3D і відповідні можливості GPU. Не задавайте для автоматичного визначення.</string> + <string name="game_env_cache">Залиште кешування шейдерів Mesa ввімкненим, щоб зменшити повторну компіляцію. false вмикає кешування.</string> + <string name="game_env_cache_size">Максимальний розмір кешу шейдерів Mesa, наприклад 1G. Більший кеш займає більше місця.</string> + <string name="game_env_vkd3d_config">Параметри VKD3D для D3D12. nodxr вимикає трасування променів; використовуйте лише для гри, якій це потрібно.</string> + <string name="game_env_proton_log">Установіть 1, щоб вести діагностичний журнал Proton. Журналювання може знизити продуктивність і займає місце.</string> + <string name="game_env_wined3d">Установіть 1, щоб використовувати WineD3D на основі OpenGL замість DXVK для перевірки сумісності D3D9–11.</string> + <string name="game_env_no_ntsync">Установіть 1, щоб ця гра не використовувала ntsync (droiddeck-ntsync або драйвер ядра); тоді вона працює на droiddeck-esync, якщо є пакет, інакше на droiddeck-fsync.</string> + <string name="game_env_no_esync">Установіть 1, щоб вимкнути droiddeck-esync для цієї гри; замість нього використовується droiddeck-fsync або droiddeck-ntsync, якщо fsync теж вимкнено.</string> + <string name="game_env_no_fsync">Установіть 1, щоб ця гра не використовувала droiddeck-fsync; тоді вона працює на droiddeck-esync, якщо є пакет, інакше на droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Установіть 1, щоб запускати цю гру на droiddeck-fsync, або 0, щоб надавати перевагу droiddeck-esync, якщо є пакет для її Proton.</string> + <string name="game_env_xalia">Установіть 0, щоб вимкнути в цій грі помічник Proton для навігації геймпадом.</string> + <string name="game_env_hud">Оверлей DXVK для D3D9–11. fps показує частоту кадрів; якщо не задано, оверлей приховано.</string> + <string name="game_env_dxvk_config">Параметри DXVK, розділені крапкою з комою. Нові збірки обмежують частоту кадрів через dxvk.maxFrameRate; для звичайної гри краще використовувати обмеження кадрів сеансу.</string> + <string name="game_env_vkd3d_limit">Обмеження частоти кадрів D3D12. 0 вимикає обмеження.</string> + <string name="game_env_glthread">Багатопотоковість OpenGL у Mesa. true може допомогти іграм OpenGL, які впираються в CPU; перевіряйте для кожної гри окремо.</string> + <string name="sync_backend_title">Синхронізація Wine</string> + <string name="sync_backend_hint">Як ігри синхронізують свої потоки. Застосовується в наступному сеансі.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Пресет FEX</string> + <string name="fex_next_launch">Застосовується під час наступного запуску гри.</string> + <string name="game_settings_title">Ігри</string> + <string name="fex_default_label">Стандартний FEX</string> + <string name="fex_default_detail">Використовує стандартні налаштування FEX.</string> + <string name="fex_stability_label">Стабільність</string> + <string name="fex_stability_detail">Найбезпечніші й найповільніші налаштування.</string> + <string name="fex_compatibility_label">Сумісність</string> + <string name="fex_compatibility_detail">Повний TSO і multiblock.</string> + <string name="fex_intermediate_label">Середній</string> + <string name="fex_intermediate_detail">Збалансований TSO зі зниженою точністю x87.</string> + <string name="fex_performance_label">Продуктивність</string> + <string name="fex_performance_detail">TSO повністю вимкнено; multiblock.</string> + <string name="fex_performance_tso_label">Продуктивність + TSO</string> + <string name="fex_performance_tso_detail">Налаштування «Продуктивність» з увімкненим основним TSO.</string> + <string name="fex_extreme_label">Екстрим</string> + <string name="fex_extreme_detail">Вимикає перевірки самозмінного коду. Ігри з JIT і DRM можуть не працювати.</string> + <string name="fex_extreme_tso_label">Екстрим + TSO</string> + <string name="fex_extreme_tso_detail">Налаштування «Екстрим» з увімкненим основним TSO.</string> + <string name="fex_extreme_gn_label">Екстрим-gn</string> + <string name="fex_extreme_gn_detail">«Продуктивність» із підказками TSC і метаданих. Спробуйте його перед «Екстримом».</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">«Продуктивність» з повною перевіркою коду та прихованим бітом гіпервізора.</string> + <string name="game_env_custom_value">Власне значення</string> + <string name="game_env_select_value">Виберіть значення</string> + <string name="user_apps_section">Емулятори та додатки</string> + <string name="user_apps_add">Додати</string> + <string name="user_apps_add_detail">Ваш власний додаток або гра</string> + <string name="user_apps_kind_script">Скрипт</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Запуск…</string> + <string name="user_apps_added">%1$s додано</string> + <string name="user_apps_removed">%1$s видалено</string> + <string name="user_apps_back">Робочий стіл</string> + <string name="user_apps_gone">Цього додатка вже немає. Виберіть його знову на робочому столі.</string> + <string name="user_apps_open">Відкрити %1$s</string> + <string name="user_apps_remove">Видалити</string> + <string name="user_apps_remove_confirm">Натисніть ще раз, щоб видалити</string> + <string name="user_apps_stop_session">Завершіть сеанс, щоб видалити</string> + <string name="user_apps_script_linked">Запускає %1$s з його папки, яку підключено до сеансу там, де вона лежить. Видалення додатка не зачіпає цю папку.</string> + <string name="user_apps_script_copied">Запускає %1$s з копії його папки всередині DroidDeck. Видалення додатка видаляє копію, а не оригінал.</string> + <string name="user_apps_runtime_required">Спершу встановіть середовище Linux</string> + <string name="user_apps_file_gone">Файлу більше немає</string> + <string name="user_apps_no_space">Недостатньо вільного місця: для копіювання папки потрібно %1$s</string> + <string name="user_apps_copying">Копіювання %1$s</string> + <string name="user_apps_failed">Не вдалося додати додаток</string> + <string name="user_apps_github_checking">Пошук випуску %1$s</string> + <string name="user_apps_github_unreachable">Не вдалося прочитати випуски %1$s</string> + <string name="user_apps_github_no_appimage">Жоден випуск %1$s не містить AppImage для ARM64 або x86_64</string> + <string name="user_apps_downloading">Завантаження %1$s</string> + <string name="user_apps_download_failed">Помилка завантаження</string> + <string name="user_apps_update_failed">Не вдалося оновити додаток</string> + <string name="user_apps_icon_failed">Не вдалося прочитати цей значок</string> + <string name="user_apps_saved">%1$s збережено</string> + <string name="user_apps_edit">Змінити</string> + <string name="user_apps_check_updates">Перевірити оновлення</string> + <string name="user_apps_checking_updates">Перевірка оновлень…</string> + <string name="user_apps_update_to">Оновити до %1$s</string> + <string name="user_apps_up_to_date">Актуальна версія · %1$s</string> + <string name="user_apps_updated">%1$s оновлено</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Додавання додатка</string> + <string name="add_app_tab_script">Скрипт</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Файл .sh. Запускається зі своєї папки на весь екран через gamescope.</string> + <string name="add_app_appimage_hint">AppImage для ARM64 (aarch64) або для x86_64, що працює через FEX. Його один раз розпаковують у середовище Linux.</string> + <string name="add_app_github_hint">Установлює AppImage для ARM64 з найновішого випуску репозиторію або версію для x86_64 через FEX.</string> + <string name="app_fex_title">Використовувати FEX</string> + <string name="app_fex_auto">Авто</string> + <string name="app_fex_on">Увімк.</string> + <string name="app_fex_off">Вимк.</string> + <string name="app_fex_hint">FEX запускає програми Linux для x86 на цьому пристрої ARM64. У режимі «Авто» він вмикається, якщо програму зібрано для x86.</string> + <string name="app_fex_x86">%1$s через FEX</string> + <string name="app_fex_not_ready">Цю програму зібрано для ПК з архітектурою %1$s, і вона працює через FEX, який ще не налаштовано. Один раз відкрийте Steam, увійшовши в обліковий запис: DroidDeck завантажить FEX і потрібний йому Steam Linux Runtime, після чого програма відкриється.</string> + <string name="session_end_program">Ця програма</string> + <string name="session_end_fex_missing">%1$s зібрано для ПК x86; для запуску потрібен FEX, який ще не встановлено. Один раз запустіть Steam, увійшовши в обліковий запис, дайте йому завантажити FEX і Steam Linux Runtime, а потім запустіть це знову.</string> + <string name="add_app_flatpak_hint">ID додатка Flathub або його сторінка на Flathub. Якщо Flatpak ще не налаштовано, його буде налаштовано спочатку.</string> + <string name="add_app_file">Файл</string> + <string name="add_app_no_file">Файл не вибрано</string> + <string name="add_app_choose_file">Вибрати файл</string> + <string name="add_app_change_file">Змінити</string> + <string name="add_app_pick_script">Виберіть скрипт</string> + <string name="add_app_pick_appimage">Виберіть AppImage</string> + <string name="add_app_pick_icon">Виберіть значок</string> + <string name="add_app_repository">Репозиторій</string> + <string name="add_app_repository_placeholder">власник/репозиторій або посилання на github.com</string> + <string name="add_app_repository_invalid">Це не репозиторій GitHub</string> + <string name="add_app_flatpak_id">ID додатка</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Це не ID додатка Flathub</string> + <string name="add_app_flatpak_bundle_hint">Або файл .flatpak для додатка, якого немає на Flathub.</string> + <string name="add_app_pick_flatpak">Виберіть файл .flatpak</string> + <string name="add_app_source">Джерело</string> + <string name="add_app_appearance">На вашому робочому столі</string> + <string name="add_app_preview_name">Новий додаток</string> + <string name="add_app_name">Назва</string> + <string name="add_app_name_placeholder">З додатка</string> + <string name="add_app_icon">Значок</string> + <string name="add_app_icon_default">Стандартний значок</string> + <string name="add_app_choose_icon">Вибрати значок</string> + <string name="add_app_clear_icon">Очистити</string> + <string name="add_app_icon_suggestions">З репозиторію</string> + <string name="add_app_icon_searching">Пошук значків…</string> + <string name="add_app_icon_reset">Стандартний</string> + <string name="edit_app_title">Змінити %1$s</string> + <string name="edit_app_save">Зберегти</string> + <string name="add_app_checking_folder">Перевірка папки…</string> + <string name="add_app_folder_linked">Папку додатка підключено до сеансу: %1$s</string> + <string name="add_app_folder_copied">Папка містить програми Linux, які не можна запускати зі спільного сховища, тому її буде скопійовано в DroidDeck (%1$s).</string> + <string name="add_app_confirm">Додати</string> + <string name="add_app_cancel">Скасувати</string> + <string name="add_app_runtime_required">Спершу встановіть середовище Linux у розділі «Налаштування».</string> + <string name="add_app_busy">Зачекайте, поки завершиться %1$s.</string> + <string name="steam_compat_label">Сумісно</string> + <string name="proton_compatible_note">Збірки з позначкою «%1$s» у меню «Сумісність» Steam мають виправлення префіксів від DroidDeck і запускають тут ігри. За замовчуванням використовується Proton Experimental ARM64 (%1$s) або Proton 11.0 ARM64 (%1$s), щойно встановлено цю новішу збірку. Власні збірки Proton від Valve без цієї позначки не можуть запустити гру на цьому пристрої.</string> + <string name="proton_installed_compatible">Установлено %1$s · %2$s</string> + <string name="common_cancel">Скасувати</string> + <string name="common_auto">Авто</string> + <string name="common_never">Ніколи</string> + <string name="common_always">Завжди</string> + <string name="common_uninstall">Видалити</string> + <string name="common_check">Перевірити</string> + <string name="common_update">Оновити</string> + <string name="common_checking">Перевірка…</string> + <string name="common_working">Виконується…</string> + <string name="common_forget">Забути</string> + <string name="common_add_ellipsis">Додати…</string> + <string name="common_use">Використати</string> + <string name="common_applies_next_session">Застосовується в наступному сеансі.</string> + <string name="mode_steam_title">Сеанс Steam</string> + <string name="mode_desktop_title">Сеанс робочого столу</string> + <string name="mode_display">Екран</string> + <string name="mode_resolution">Роздільна здатність</string> + <string name="mode_res_720">До 720p</string> + <string name="mode_res_900">До 900p</string> + <string name="mode_res_1080">До 1080p</string> + <string name="mode_res_native">Рідна</string> + <string name="mode_res_default">%1$s (за замовчуванням)</string> + <string name="mode_res_custom_value">Власна · %1$d×%2$d</string> + <string name="mode_res_custom">Власна…</string> + <string name="mode_res_note">З 720p меню можуть реагувати швидше.</string> + <string name="mode_ratio">Співвідношення сторін</string> + <string name="mode_ratio_custom">Визначається власною роздільною здатністю.</string> + <string name="mode_ratio_auto">«Авто» використовує щонайменше 16:9.</string> + <string name="mode_fps">Обмеження кадрів</string> + <string name="mode_fps_note">Обмежує весь сеанс. Екран перемикається на частоту оновлення, кратну цьому обмеженню.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Вивід HDR10</string> + <string name="mode_hdr_unavailable">Недоступно: %1$s.</string> + <string name="mode_hdr_restart">Перезапустіть додаток, щоб застосувати.</string> + <string name="mode_drivers">Драйвери</string> + <string name="mode_gpu_drivers">Драйвери GPU</string> + <string name="mode_gpu_drivers_hint">Спільні для Steam і робочого столу. Налаштовуються на сторінці «Компоненти».</string> + <string name="mode_touch_controls">Сенсор і керування</string> + <string name="mode_touch">Сенсорне введення</string> + <string name="mode_touch_touchpad">Сенсорна панель</string> + <string name="mode_touch_direct">Пряме</string> + <string name="mode_touch_note">«Авто»: сенсорна панель на робочому столі, пряме введення в Steam.</string> + <string name="mode_osc">Екранне керування</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">«Авто» показує екранне керування, коли контролер не під’єднано.</string> + <string name="osc_steam_touch">Сенсорне керування Steam (бета)</string> + <string name="osc_style_next_session">Сенсорне керування Steam увімкнеться з наступним сеансом Steam</string> + <string name="osc_steam_layout">Розкладка сенсорного керування Steam</string> + <string name="osc_steam_layout_hint">Переміщуйте, змінюйте розмір або приховуйте сенсорні елементи керування цієї гри; зберігається в Steam</string> + <string name="mode_controller">Контролер</string> + <string name="mode_controller_hint">Яким Steam бачить ваш контролер. Застосовується в наступному сеансі.</string> + <string name="mode_controller_deck">Контролер Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Контролер Xbox 360</string> + <string name="mode_controller_note">Deck: кнопка швидкого доступу й гіроскоп. Steam Controller: те саме плюс датчики хвату на задніх кнопках. DualShock 4 і DualSense: гіроскоп, а трекпади працюють як їхня сенсорна панель. Xbox 360: меню швидкого доступу відкривається комбінацією Guide+A.</string> + <string name="mode_back">Кнопка Back</string> + <string name="back_menu_then_qam">Меню → QAM</string> + <string name="back_qam_then_menu">QAM → Меню</string> + <string name="mode_session">Сеанс</string> + <string name="mode_suspend">Робота у фоні</string> + <string name="mode_suspend_hint">Коли додаток приховано або екран вимикається.</string> + <string name="mode_suspend_manual">Вручну</string> + <string name="mode_suspend_native">Нативний</string> + <string name="mode_suspend_steam_note">«Авто» призупиняє сеанс і відновлює його, коли додаток знову на екрані. «Нативний» спершу готує Steam до сну. «Вручну» чекає на «Відновити». «Ніколи» — сеанс працює далі.</string> + <string name="mode_background_downloads">Не переривати завантаження</string> + <string name="mode_background_downloads_hint">Відкладає призупинення у фоні, поки Steam активно щось завантажує.</string> + <string name="mode_zram">Стиснення zRAM</string> + <string name="mode_zram_hint">Під час гри пам\'ять клієнта Steam стискається в zram пристрою, тож гра отримує більше RAM. Застосується під час наступного запуску Steam.</string> + <string name="mode_zram_unsupported">Недоступно: на пристрої немає zram або swap, чи ядро старіше за 5.4.</string> + <string name="mode_suspend_note">«Авто» призупиняє сеанс у фоні й відновлює, коли додаток знову на екрані. «Вручну» чекає на «Відновити». «Ніколи» — сеанс працює далі.</string> + <string name="mode_startup">Запуск</string> + <string name="mode_steam_startup">Запускати Steam разом із DroidDeck</string> + <string name="mode_steam_startup_hint">Відкриває сеанс Steam під час запуску DroidDeck.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Пошук випусків…</string> + <string name="mode_decky_ready">Можна встановити %1$s.</string> + <string name="mode_decky_none">Сумісну збірку не знайдено. Спробуйте пізніше.</string> + <string name="mode_decky_installed">Установлено · %1$s</string> + <string name="mode_decky_update">Доступне оновлення · %1$s</string> + <string name="mode_decky_current">Актуальна версія · %1$s</string> + <string name="mode_decky_loader">Завантажувач</string> + <string name="mode_decky_install_latest">Установити останню версію</string> + <string name="mode_decky_on">Запускається разом зі Steam. Поки його ввімкнено, інші додатки на цьому пристрої можуть керувати Steam.</string> + <string name="mode_decky_off">Вимкнено. Порт віддаленого налагодження Steam залишається закритим.</string> + <string name="mode_decky_remove_title">Видалити Decky Loader?</string> + <string name="mode_decky_remove_text">Видаляє завантажувач. Ваші плагіни й налаштування зберігаються.</string> + <string name="mode_client">Клієнт</string> + <string name="mode_mangoapp">Оверлей продуктивності</string> + <string name="mode_mangoapp_hint">Вимкніть, якщо в режимі Deck ігри вилітають або показують чорний екран. Застосовується в наступному сеансі.</string> + <string name="mode_steam_repair">Відновити клієнт Steam</string> + <string name="mode_steam_repair_hint">Повторно завантажує клієнт Steam під час наступного запуску Steam. Скористайтеся цим, якщо Steam не виходить з екрана завантаження. Ігри, вхід і налаштування зберігаються.</string> + <string name="mode_steam_repair_queued">Клієнт Steam буде повторно завантажено під час наступного запуску Steam.</string> + <string name="mode_steam_repair_button">Відновити</string> + <string name="mode_added_art">Графіка</string> + <string name="mode_sgdb_key">Ключ API SteamGridDB</string> + <string name="mode_sgdb_key_yours">Ваш ключ</string> + <string name="mode_sgdb_edit">Змінити…</string> + <string name="mode_added_art_hint">Доповнює відсутню графіку зі Steam, а потім із SteamGridDB. Ваші власні cover.jpg, hero.jpg, logo.png або icon.png у папці гри мають пріоритет.</string> + <string name="summary_remove_game">Видалити %1$s</string> + <string name="mode_added_remove_confirm">Видалити?</string> + <string name="games_add">Додати гру</string> + <string name="games_add_title">Додайте гру:</string> + <string name="games_pick_exe_title">Виберіть exe-файл:</string> + <string name="games_add_unreachable">Це розташування недоступне в сеансі</string> + <string name="mode_added_exe_check">Перевірити цей exe-файл</string> + <string name="wincomp_title">Компоненти Windows</string> + <string name="wincomp_pad_hint">LB / RB — перехід між розділами.</string> + <string name="wincomp_card_none">Немає</string> + <string name="wincomp_applies">Бібліотеки DLL Windows, яких немає в Proton, зі списку компонентів. Увімкніть ті, що потрібні цій грі: вони потрапляють у власну папку Windows гри, а не до її файлів, і залишаються, хоч на якому Proton вона працює.</string> + <string name="wincomp_offline">Не вдалося отримати список компонентів. Уже завантажені компоненти можна вмикати й вимикати.</string> + <string name="wincomp_recommended">Рекомендовано для цієї гри</string> + <string name="wincomp_checking">Перевірка, що потрібно цій грі…</string> + <string name="wincomp_when_online">Доступно, коли є інтернет</string> + <plurals name="wincomp_turning_on"> + <item quantity="one">Вмикається %1$d компонент…</item> + <item quantity="few">Вмикаються %1$d компоненти…</item> + <item quantity="many">Вмикається %1$d компонентів…</item> + <item quantity="other">Вмикається %1$d компонента…</item> + </plurals> + <string name="wincomp_auto_section">Увімкнено для цієї гри</string> + <string name="wincomp_auto_steam">Steam установлює %1$s разом із %2$s (додаток %3$s)</string> + <string name="wincomp_auto_gog">Зі списку GOG для цієї гри</string> + <string name="wincomp_auto_epic">Із необхідних компонентів Epic для цієї гри</string> + <string name="wincomp_auto_amazon">Із кроків установлення Amazon для цієї гри</string> + <string name="wincomp_steam_by_name">Steam установлює %1$s разом із додатком %2$s (збіг за назвою)</string> + <string name="wincomp_suggestions">Також у списку</string> + <string name="wincomp_suggestion_reason">Є в списку %1$s; тут це не компонент</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Гра постачається з %1$s</string> + <string name="wincomp_found_shipped">У грі є %1$s (часто працює як є)</string> + <string name="wincomp_already_here">Уже є в цій грі</string> + <string name="wincomp_no_recommendation">Ніщо в папці гри не вказує на якийсь компонент.</string> + <string name="wincomp_active">Установлено для цієї гри (%1$d)</string> + <string name="wincomp_all">Усі компоненти (%1$d)</string> + <string name="wincomp_installers">Потрібен інсталятор Windows (%1$d)</string> + <string name="wincomp_installers_note">Це окремі програми встановлення без пакета всередині, який можна розібрати, і для них ще немає запису того, що вони встановлюють. Більшість — старі середовища виконання, які вже замінює Mono у складі Proton; записи додаються в міру створення.</string> + <string name="wincomp_show">Показати</string> + <string name="wincomp_hide">Приховати</string> + <string name="wincomp_needs_installer">Запускає власну програму встановлення (запису ще немає)</string> + <string name="wincomp_unsupported">Тут поки не підтримується</string> + <string name="wincomp_loading">Завантаження компонентів…</string> + <string name="wincomp_failed">Не вдалося встановити: %1$s</string> + <string name="wincomp_downloaded">Завантажено</string> + <string name="wincomp_downloading">Завантаження %1$s</string> + <string name="wincomp_installing">Установлення: %1$s</string> + <string name="wincomp_reverting">Вимкнення…</string> + <string name="wincomp_download_size">%1$s для завантаження</string> + <string name="wincomp_next_launch">Набуде чинності під час наступного запуску гри.</string> + <string name="mode_stretch169">Розтягувати ігри 16:9</string> + <string name="mode_stretch169_hint">На екранах, ближчих до квадрата, ніж 16:9, розтягує ігри на весь екран замість смуг. Застосовується в наступному сеансі.</string> + <string name="mode_audio">Звук</string> + <string name="mode_directaudio">DirectAudio для ігор</string> + <string name="mode_directaudio_hint">Обходить PulseAudio для меншої затримки.</string> + <string name="mode_mic">Мікрофон</string> + <string name="mode_mic_hint">Для голосового чату.</string> + <string name="mode_network">Мережа</string> + <string name="mode_wifi_discovery">Пошук Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Показувати в Steam назви Wi-Fi і мережі поблизу.</string> + <string name="mode_wifi_location_off">Геодані вимкнено.</string> + <string name="mode_wifi_permission_denied">Дозвіл на доступ до геоданих не надано.</string> + <string name="mode_wifi_open_settings">Відкрити налаштування</string> + <string name="mode_wifi_continue">Продовжити</string> + <string name="mode_wifi_explain_title">Увімкнути пошук Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android вимагає дозволу на доступ до геоданих, щоб читати назви Wi-Fi і шукати мережі поблизу. DroidDeck використовує цей доступ, щоб показувати ці мережі в Steam. Ми не відстежуємо ваше місцезнаходження. Доступ до інтернету працює і без цього дозволу.</string> + <string name="mode_storage">Сховище ігор</string> + <string name="mode_storage_auto">Автоматично — SD-карта, якщо вставлена, плюс ваші папки Games</string> + <string name="mode_storage_auto_none">Автоматично — ваші папки Games, плюс SD-карта, якщо вставлена (зараз немає)</string> + <string name="mode_storage_internal">Лише внутрішня пам’ять</string> + <string name="mode_storage_folder">Папка: %1$s</string> + <string name="mode_second_library">Друга бібліотека</string> + <string name="mode_storage_note">Ігри, які підвантажують ресурси з SD-карти або спільного сховища, можуть працювати ривками.</string> + <string name="mode_storage_diagnostics">Діагностика сховища</string> + <string name="mode_storage_diagnostics_hint">Записує результати виділення місця та вибіркові заміри швидкості сховища в «Поділитися журналами». Поки ввімкнено, встановлення може сповільнюватися. Застосовується в наступному сеансі.</string> + <string name="mode_choose_folder">Вибрати папку…</string> + <string name="mode_custom_res_title">Власна роздільна здатність</string> + <string name="mode_custom_res_text">Замінює обмеження та співвідношення сторін. Якщо розмір не збігається з екраном, з’являться смуги.</string> + <string name="mode_width">Ширина</string> + <string name="mode_height">Висота</string> + <string name="mode_custom_res_range">Від 320×240 до 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="one">%1$d гра</item> + <item quantity="few">%1$d гри</item> + <item quantity="many">%1$d ігор</item> + <item quantity="other">%1$d гри</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Видалити</string> + <string name="common_restore">Відновити</string> + <string name="common_download">Завантажити</string> + <string name="common_delete_named">Видалити %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Драйвер середовища</string> + <string name="comp_runtime_driver_hint">Використовується Steam, іграми та робочим столом. Застосовується в наступному сеансі.</string> + <string name="comp_import_turnip">Імпортувати zip Turnip…</string> + <string name="comp_display_driver">Драйвер відображення</string> + <string name="comp_display_driver_hint">Виводить кадри на екран в обох режимах. Перезапустіть додаток, щоб застосувати.</string> + <string name="comp_import_adrenotools">Імпортувати zip AdrenoTools…</string> + <string name="comp_never">ніколи</string> + <string name="comp_nightlies_checked">Нічні збірки перевірено %1$s</string> + <string name="comp_title">Компоненти</string> + <string name="comp_about">Про компоненти</string> + <string name="comp_check_drivers">Шукати нові драйвери</string> + <string name="comp_check_nightlies">Шукати нові пакети в нічних збірках</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Вибраний тут Proton запускає кожну гру, для якої в Steam не вибрано власний, а зміна, зроблена в Steam, теж відображається тут. Під час оновлення Steam замінює Proton від Valve; оригінали зберігаються для кожної збірки.</string> + <string name="comp_scope">Конфігурація</string> + <string name="comp_profile_configure">Налаштувати профіль</string> + <string name="comp_profile">Профіль</string> + <string name="comp_scope_general">Основний профіль</string> + <string name="comp_scope_general_detail">Автоматично використовується іграми без перевизначень.</string> + <string name="comp_profile_game_detail">Збережені налаштування, які автоматично застосовуються під час запуску %1$s.</string> + <string name="comp_game_hint">Вибирайте лише ті налаштування, які потрібні цій грі. Усе інше й надалі береться з основного профілю.</string> + <string name="comp_game_fex">Пресет FEX</string> + <string name="comp_game_fex_inherited">Використовується пресет основного профілю.</string> + <string name="comp_game_fex_override">Для цієї гри збережено власний пресет.</string> + <string name="comp_game_fex_custom">Власні змінні FEX</string> + <string name="comp_game_use_general">Як в основному</string> + <string name="comp_game_compatibility">Сумісність гри</string> + <string name="comp_game_environment_hint">Параметри середовища Proton, DXVK, VKD3D і синхронізації для цієї гри.</string> + <string name="comp_game_proton_inherited">Використовується Proton основного профілю.</string> + <string name="comp_game_proton_override">Для цієї гри збережено власний Proton через зіставлення сумісності Steam.</string> + <string name="comp_no_proton_short">Немає Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Використовує пакет основного профілю з %1$s, якщо ця гра не вибирає інший пакет.</string> + <string name="comp_game_component_general">Використовує пакет компонентів основного профілю.</string> + <string name="comp_game_component_override">Використовує %1$s лише для цієї гри.</string> + <string name="comp_game_runtime_options">Параметри середовища виконання</string> + <string name="comp_game_environment_other_hint">Інші параметри середовища Proton, DXVK, VKD3D-Proton і синхронізації для окремої гри.</string> + <string name="comp_game_saved_next">Профіль %1$s збережено для наступного запуску гри.</string> + <string name="game_no_steam_title">Запустити без Steam</string> + <string name="game_no_steam_detail">Відкриває в Proton/FEX без клієнта Steam; функції Steam вимкнено.</string> + <string name="game_no_steam_on">Увімкнено</string> + <string name="game_steam_with">Запускається зі Steam</string> + <string name="game_steam_without">Запускається без Steam</string> + <string name="game_settings_card">Налаштування</string> + <string name="game_settings_menu_title">Налаштування %1$s</string> + <string name="game_settings_default">За замовчуванням</string> + <string name="game_settings_default_detail">Повертає все, що змінено для цієї гри, до налаштувань застосунку.</string> + <string name="game_sync_custom">Власні змінні синхронізації</string> + <string name="comp_game_proton_live">Вибір Proton для %1$s збережено, і він уже доступний у Steam.</string> + <string name="comp_game_proton_next">Вибір Proton для %1$s збережено. Перезапустіть Steam перед запуском гри.</string> + <string name="comp_game_proton_not_runnable">%1$s не може використовувати вибраний Proton на цьому пристрої.</string> + <string name="comp_game_load_failed">Не вдалося завантажити профіль %1$s: %2$s</string> + <string name="comp_game_save_failed">Не вдалося зберегти профіль гри: %1$s</string> + <string name="comp_game_reset">Скинути профіль гри</string> + <string name="comp_game_reset_title">Скинути профіль %1$s?</string> + <string name="comp_game_reset_body">Видалити для цієї гри перевизначення Proton, FEX, пакета компонентів, середовища, фільтрації текстур і компонентів Windows? Гра використовуватиме основний профіль.</string> + <string name="comp_game_reset_done">%1$s тепер використовує основний профіль.</string> + <string name="comp_game_reset_failed">Не вдалося повністю скинути профіль гри: %1$s</string> + <string name="comp_default_live">%1$s тепер запускає кожну гру, для якої в Steam не вибрано власний Proton.</string> + <string name="comp_default_next">%1$s запускатиме кожну гру, для якої не вибрано власний Proton, починаючи з наступного запуску Steam.</string> + <string name="comp_default_not_runnable">%1$s не може запускати тут ігри, тому його не можна вибрати за замовчуванням.</string> + <string name="comp_default_failed">Не вдалося зберегти Proton за замовчуванням: %1$s</string> + <string name="comp_swapped">%1$s · замінено: %2$d</string> + <string name="comp_all_original">%1$s · усе оригінальне</string> + <string name="comp_game_running_suffix">%1$s · гра запущена</string> + <string name="comp_esync_pack">%1$s · пакет droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · пакета droiddeck-esync ще немає</string> + <string name="comp_esync_builtin">%1$s · esync вбудовано, пакет не потрібен</string> + <string name="comp_gpu_drivers">Драйвери GPU</string> + <string name="comp_reapplied">%1$s · повторно застосовано під час запуску %2$s</string> + <string name="comp_next_queued">Далі: %1$s · після закриття гри</string> + <string name="comp_in_use">Використовується %1$s: %2$s</string> + <string name="comp_waits">Очікує, доки гру буде закрито</string> + <string name="comp_applies_next_game">Застосовується під час наступного запуску гри</string> + <string name="comp_import_zip">Імпортувати .zip</string> + <string name="comp_reading">Читання версій Proton…</string> + <string name="comp_no_proton">Proton ще не встановлено. Один раз запустіть Steam, щоб завантажити його Proton для ARM64, або додайте GE-Proton, CachyOS чи DroidDeck-Proton у розділі «Налаштування».</string> + <string name="comp_original">Оригінал · %1$s</string> + <string name="comp_this_build">%1$s · ця збірка</string> + <string name="comp_earlier_build">%1$s · попередня збірка</string> + <string name="comp_installed_count">Установлено · %1$d</string> + <string name="comp_nothing_stored">Для %1$s ще нічого не збережено. Власні файли цього Proton зберігаються як його оригінал.</string> + <string name="comp_waits_long">На цьому Proton запущено гру, тож зміна чекатиме, доки її закриють.</string> + <string name="comp_applies_long">Застосовується під час наступного запуску гри.</string> + <string name="comp_swap_title">Замінити на %1$s?</string> + <string name="comp_swap_body">Помістити %1$s у %2$s? Оригінальні файли залишаться збереженими. %3$s</string> + <string name="comp_restore_title">Відновити %1$s?</string> + <string name="comp_restore_body">Повернути оригінал %1$s у %2$s? %3$s</string> + <string name="comp_delete_package_body">Видаляє пакет із додатка. Ви зможете завантажити його знову.</string> + <string name="comp_delete_original_title">Видалити цей оригінал?</string> + <string name="comp_delete_original_body">Цей оригінал %1$s походить із попередньої збірки %2$s. Оригінал поточної збірки зберігається завжди.</string> + <string name="comp_nightlies_count">У нічних збірках · %1$d</string> + <string name="comp_refresh_to_list">Оновіть, щоб побачити пакети з нічних збірок.</string> + <string name="comp_nothing_new">Нічого нового з часу останньої перевірки.</string> + <string name="comp_import_wcp">Імпортувати .wcp</string> + <string name="comp_restore_original">Відновити оригінал цього Proton</string> + <string name="comp_restore_original_body">Повернути оригінальний %2$s у %1$s?</string> + <string name="comp_swap">Замінити</string> + <string name="comp_about_text">FEX, DXVK і VKD3D-Proton для кожного Proton, на якому Steam запускає ігри.\n\nВиберіть установлений рядок, щоб підставити його. Зміна застосовується під час наступного запуску гри або після закриття запущеної гри.\n\nВаш вибір перевіряється перед кожним запуском і відновлюється, якщо щось його змінило. Оригінальні файли кожного Proton зберігаються, тож оновлення Steam ніколи їх не втратять.</string> + <string name="comp_tag_original">Оригінал</string> + <string name="comp_tag_in_use">Використовується</string> + <string name="comp_tag_new">Нове</string> + <string name="comp_tag_stored">Збережено</string> + <string name="perf_title">Продуктивність</string> + <string name="perf_lede">Ядра CPU, виправлення сеансу та ім’я хоста. Застосовується в наступному сеансі.</string> + <string name="perf_client_cores_group">Ядра клієнта Steam</string> + <string name="perf_override">Перевизначити вибір ядер Steam</string> + <string name="perf_override_hint">Прив’язує Steam, його допоміжний процес інтерфейсу та gamescope до ядер нижче.</string> + <string name="perf_client_cores">Ядра клієнта</string> + <string name="perf_client_cores_on">Ядра для Steam.</string> + <string name="perf_client_cores_off">Увімкніть перевизначення, щоб вибрати.</string> + <string name="perf_game_cores_group">Ядра для ігор</string> + <string name="perf_game_cores">Ядра для ігор</string> + <string name="perf_game_cores_hint">Ядра для ігор. Якщо вибрано всі, Android розподіляє навантаження вільно.</string> + <string name="perf_client_ui">Інтерфейс клієнта</string> + <string name="perf_glthread">Багатопотоковий GL</string> + <string name="perf_glthread_hint">Меню Steam можуть реагувати швидше.</string> + <string name="perf_zink">Zink: ліниві дескриптори</string> + <string name="perf_zink_hint">Рекомендовано для драйверів без буферів дескрипторів.</string> + <string name="perf_noglerror">Пропускати перевірку помилок GL</string> + <string name="perf_noglerror_hint">Вимикає перевірку GL для кожного виклику.</string> + <string name="perf_gsrealtime">gamescope: черга GPU реального часу</string> + <string name="perf_gsrealtime_hint">Надає пріоритет роботі композитора на GPU. Може вирівняти темп кадрів ціною частини продуктивності ігор.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Тримати GPU на максимальній частоті</string> + <string name="perf_gpuclock_hint">Лише Adreno. Менше запинок, вища витрата заряду та нагрів.</string> + <string name="perf_fixes">Виправлення сеансу</string> + <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">Програмна заміна драйвера 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> + <string name="perf_esync_hint">Потоки Windows у грах чекають одне одного через eventfd і спільну пам’ять замість звернень до wineserver. Використовує пакет droiddeck-esync, створений саме для цієї збірки Proton; пакети завантажуються автоматично. Доки такого пакета немає для нової збірки Proton, його замінює droiddeck-fsync. Застосовується в наступному сеансі.</string> + <string name="perf_xalia_hint">Вимикає помічник Proton для навігації геймпадом, який споживає ресурси CPU в кожній грі.</string> + <string name="perf_seccomp">Запускати proot без seccomp</string> + <string name="perf_seccomp_hint">Може усунути помилки відсутніх системних викликів на деяких ядрах. Може знизити продуктивність.</string> + <string name="perf_fastpath">Швидкий шлях proot</string> + <string name="perf_fastpath_needs_seccomp">Потребує фільтра seccomp у proot.</string> + <string name="perf_fastpath_hint">Швидший пошук файлів і менше запинок. Вимкніть, якщо програма не може знайти свої файли.</string> + <string name="perf_identity">Ідентифікація сеансу</string> + <string name="perf_hostname">Ім’я хоста</string> + <string name="perf_hostname_hint">Ім’я, яке Steam бачить для цього пристрою. Порожнє значення відновлює %1$s.</string> + <string name="perf_hostname_invalid">Лише літери, цифри та дефіси всередині, до 63 символів.</string> + <string name="perf_phantom_warning">Android налаштовано завершувати цей сеанс</string> + <string name="driver_installed">Встановлено</string> + <string name="driver_available">Доступно для завантаження</string> + <string name="driver_nothing_new">Нічого нового з часу останньої перевірки.</string> + <string name="driver_restore_builtin">Відновити вбудовані драйвери</string> + <string name="driver_delete_builtin">Вбудовано в додаток: це видаляє його розпаковані файли та приховує його. «Відновити вбудовані драйвери» повертає його.</string> + <string name="driver_delete_bundle">Половина набору Android + Linux: видаляються обидві половини. Драйвер, що використовується, повертається до стандартного.</string> + <string name="driver_delete_plain">Його файли видаляються з додатка.</string> + <string name="driver_delete_in_use">Його файли видаляються. Він зараз використовується, тому його замінює стандартний драйвер.</string> + <string name="drawer_page_display">Екран</string> + <string name="drawer_page_effects">Ефекти</string> + <string name="drawer_page_controls">Керування</string> + <string name="drawer_page_components">Компоненти</string> + <string name="drawer_page_controller">Контролер</string> + <string name="drawer_page_settings">Налаштування</string> + <string name="drawer_page_desc">Сторінка «%1$s»</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Робочий стіл</string> + <string name="drawer_steam_menu">Меню Steam</string> + <string name="drawer_quick_access">Швидкий доступ</string> + <string name="drawer_open_qam">Відкрити меню швидкого доступу</string> + <string name="drawer_prev_page">Попередня сторінка</string> + <string name="drawer_next_page">Наступна сторінка</string> + <string name="drawer_hud">HUD продуктивності</string> + <string name="drawer_scaling">Режим масштабування</string> + <string name="drawer_scaling_sharpness">Чіткість масштабування</string> + <string name="drawer_effects">Ефекти екрана</string> + <string name="drawer_effects_hint">У реальному часі. Трохи навантажує GPU, поки увімкнено будь-який ефект.</string> + <string name="drawer_look">Пресети</string> + <string name="drawer_look_custom">Власний</string> + <string name="drawer_effects_advanced">Додатково</string> + <string name="widgets_expanded">Розгорнуто</string> + <string name="widgets_collapsed">Згорнуто</string> + <string name="drawer_cas">Чіткість (CAS)</string> + <string name="drawer_cas_level">Рівень чіткості</string> + <string name="drawer_fake_hdr">Імітація HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Запустити SteamVR</string> + <string name="steamvr_checking">Перевірка SteamVR…</string> + <string name="drawer_deband">Усунення смугастості</string> + <string name="drawer_deband_strength">Сила усунення смугастості</string> + <string name="drawer_brightness">Яскравість</string> + <string name="drawer_contrast">Контраст</string> + <string name="drawer_gamma">Гамма</string> + <string name="drawer_saturation">Насиченість</string> + <string name="drawer_fxaa">FXAA (згладжування країв)</string> + <string name="drawer_toon">Мультиплікаційні контури</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Фільтрація текстур</string> + <string name="drawer_texture_hint">Ігри на DirectX 9–11, з наступного запуску.</string> + <string name="drawer_anisotropy">Анізотропна фільтрація</string> + <string name="drawer_texture_sharpness">Чіткість текстур</string> + <string name="drawer_texture_sharpness_note">Негативне зміщення mip-рівня: чіткіші текстури, трохи мерехтіння. «Авто» підлаштовується під те, наскільки сеанс збільшено до розміру екрана.</string> + <string name="drawer_touch_auto">Авто (%1$s)</string> + <string name="drawer_keyboard">Клавіатура</string> + <string name="drawer_latency">Затримка</string> + <string name="drawer_low_latency_controller">Контролер із низькою затримкою</string> + <string name="drawer_low_latency_controller_hint">Контролер звітує на 1000 Hz замість 250 Hz. Трохи більше навантаження на CPU.</string> + <string name="drawer_low_latency_touch">Дотик із низькою затримкою</string> + <string name="drawer_low_latency_touch_hint">Дотики обходять групування кадрів, тож сенсорне керування Steam працює на 1000 Hz. Трохи більше навантаження на CPU.</string> + <string name="drawer_pc_keyboard">Клавіатура ПК</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Другий екран</string> + <string name="drawer_second_screen_mode">Режим</string> + <string name="drawer_second_screen_shows">Показує</string> + <string name="drawer_android_apps">Додатки Android</string> + <string name="drawer_launch_app">Запустити додаток</string> + <string name="common_hide">Приховати</string> + <string name="common_show">Показати</string> + <string name="drawer_no_apps">Немає додатків для запуску</string> + <string name="drawer_session_behavior">Поведінка сеансу</string> + <string name="drawer_suspend_hint">Застосовується зараз і до майбутніх сеансів у цьому режимі.</string> + <string name="drawer_next_session">Наступний сеанс</string> + <string name="drawer_support">Підтримка</string> + <string name="drawer_logs">Журнали сеансу</string> + <string name="drawer_logs_hint">Додайте до звіту про помилку</string> + <string name="drawer_share_logs">Поділитися журналами</string> + <string name="drawer_background">Фон</string> + <string name="drawer_stop">Завершити</string> + <string name="drawer_stop_title">Завершити сеанс?</string> + <string name="drawer_running_now">Зараз виконується</string> + <string name="drawer_no_game">Жодна гра не запущена на Proton</string> + <string name="drawer_selected_profile">Профіль гри</string> + <string name="drawer_selected_profile_none">Дані профілю ще не доступні.</string> + <string name="drawer_profile_refresh_failed_initial">Не вдалося завантажити профілі гри. Повторна спроба виконується автоматично.</string> + <string name="drawer_profile_refresh_failed_stale">Не вдалося оновити профілі гри. Показано останні доступні дані; повторна спроба виконується автоматично.</string> + <string name="drawer_profile_inspect_hint">Переглядайте та редагуйте збережені налаштування, які застосуються під час наступного запуску.</string> + <string name="drawer_profile_default">Використовується профіль «Стандартний»</string> + <string name="drawer_profile_custom">Власний профіль</string> + <string name="drawer_component_inherited">Використовується %1$s зі стандартного профілю.</string> + <string name="drawer_game_components_note">Зміни зберігаються в профілі %1$s і застосовуються під час наступного запуску гри.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d перевизначення гри</item> + <item quantity="few">%1$d перевизначення гри</item> + <item quantity="many">%1$d перевизначень гри</item> + <item quantity="other">%1$d перевизначення гри</item> + </plurals> + <string name="drawer_no_proton">Proton ще не встановлено.</string> + <string name="drawer_game_running">гра запущена</string> + <string name="drawer_reapplied">повторно застосовано під час запуску %1$s</string> + <string name="drawer_original">Оригінал</string> + <string name="drawer_components_note">Імпортуйте та видаляйте на сторінці «Компоненти».</string> + <string name="setup_check_done">Готово</string> + <string name="setup_check_warn">Потрібна увага</string> + <string name="setup_check_busy">Виконується</string> + <string name="setup_limit_adb_failed">Перевірте IP-адресу та порт бездротового налагодження або повторіть поєднання, якщо Android видалив цей пристрій.</string> + <string name="setup_install">Установити</string> + <string name="setup_manage">Керувати</string> + <string name="setup_tab_overview">Огляд</string> + <string name="setup_tab_controller">Контролер</string> + <string name="setup_tab_session">Сеанс</string> + <string name="setup_tab_launcher">Лаунчер</string> + <string name="setup_title">Налаштування</string> + <string name="setup_all_set">● Усе готово</string> + <string name="setup_n_ready">%1$d з %2$d готово</string> + <string name="setup_system_check">Перевірка системи</string> + <string name="setup_gpu_supported">Пристрій підтримується</string> + <string name="setup_gpu_untested">GPU не перевірено</string> + <string name="setup_gpu_unsupported">GPU не підтримується</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam потребує драйвера Adreno; %1$s може показувати чорний екран</string> + <string name="setup_runtime">Середовище Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Не встановлено · приблизно 3 GB, встановлюється під час першого натискання «Грати»</string> + <string name="setup_installed">Встановлено</string> + <string name="setup_runtime_update">%1$s · є оновлення</string> + <string name="setup_runtime_current">%1$s · актуальна версія</string> + <string name="setup_limit">Обмеження дочірніх процесів</string> + <string name="setup_limit_on">Увімкнено · Android може закрити Steam. Вимкнення займає хвилину.</string> + <string name="setup_limit_unset">Не задано · Android може закрити Steam. Вимкнення займає хвилину.</string> + <string name="setup_limit_unknown">Не вдалося перевірити · вимкнення займає хвилину.</string> + <string name="setup_fix_it">Виправити</string> + <string name="setup_details">Подробиці</string> + <string name="setup_dev_options">Параметри розробника</string> + <string name="setup_use_wireless">Використати бездротове налагодження</string> + <string name="setup_check_again">Перевірити ще раз</string> + <string name="setup_limit_turn_on">Увімкнути обмеження</string> + <string name="setup_account">Обліковий запис Steam</string> + <string name="setup_signed_in_offline">Увійшли як %1$s · офлайн-режим</string> + <string name="setup_signed_in">Увійшли як %1$s</string> + <string name="setup_sign_in">Натисніть «Грати» та увійдіть у Steam</string> + <string name="setup_tools">Інструменти</string> + <string name="setup_controller">Контролер</string> + <string name="setup_controller_unavailable">Налаштування контролера недоступні.</string> + <string name="setup_session">Сеанс</string> + <string name="setup_logs">Журнали сеансу</string> + <string name="setup_logs_hint">Зберігаються після кожного сеансу</string> + <string name="setup_agent_commands">Засоби діагностики</string> + <string name="setup_latest_logs">Останні журнали сеансу</string> + <string name="setup_saved_logs">Збережені журнали сеансу</string> + <string name="setup_saved_logs_hint">Зберігає %1$d найновіших</string> + <string name="setup_clear_logs">Очистити журнали</string> + <string name="setup_reset_settings">Скинути всі налаштування</string> + <string name="setup_reset_settings_hint">Повернути кожне налаштування до типового значення</string> + <string name="setup_reset_settings_button">Скинути</string> + <string name="setup_reset_settings_title">Скинути всі налаштування?</string> + <string name="setup_reset_settings_body">Налаштування зображення, продуктивності, контролера, теми, мови й лаунчера повернуться до типових. Ігри, вхід у Steam, облікові записи магазинів, завантажені драйвери й теки сховища залишаться.</string> + <string name="setup_reset_settings_profiles">Також скинути профілі ігор (Proton, FEX, компоненти й середовище виконання для кожної гри, а також середовище типового профілю)</string> + <string name="setup_reset_settings_session_running">Зупиніть сеанс перед скиданням налаштувань.</string> + <string name="setup_reset_settings_partial">Налаштування скинуто, але не всі. Подробиці в журналах.</string> + <string name="setup_offline">Офлайн-режим</string> + <string name="setup_sign_in_first">Спершу увійдіть у Steam</string> + <string name="setup_launcher">Лаунчер</string> + <string name="setup_language">Мова</string> + <string name="setup_language_hint">Steam теж використовує її, з наступного запуску.</string> + <string name="setup_language_system">Системна мова (%1$s)</string> + <string name="setup_language_system_short">Системна мова</string> + <string name="setup_app_scale">Масштаб додатка</string> + <string name="setup_app_scale_hint">Текст і елементи керування DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (стандартно)</string> + <string name="setup_theme">Тема</string> + <string name="setup_theme_hint">Вигляд лаунчера</string> + <string name="setup_home">Використовувати як головний екран</string> + <string name="setup_home_on">DroidDeck може бути додатком головного екрана</string> + <string name="setup_home_off">DroidDeck ніколи не пропонується як додаток головного екрана</string> + <string name="setup_orientation">Орієнтація</string> + <string name="setup_orientation_auto">Автоматично альбомна</string> + <string name="setup_orientation_landscape">Альбомна</string> + <string name="setup_orientation_reverse">Перевернута альбомна</string> + <string name="setup_fullscreen">Повний екран</string> + <string name="setup_fullscreen_on">Приховує рядок стану та панель навігації Android</string> + <string name="setup_fullscreen_off">Показує рядок стану та панель навігації Android</string> + <string name="setup_default_home">Стандартний додаток головного екрана</string> + <string name="setup_choose_home">Виберіть додаток головного екрана</string> + <string name="setup_choose">Вибрати</string> + <string name="setup_linux_apps">Додатки Linux (бета)</string> + <string name="setup_tool_files">Файли</string> + <string name="setup_tool_files_hint">Перегляд і керування файлами</string> + <string name="setup_tool_protons">Версії Proton</string> + <string name="setup_tool_protons_hint">Встановлення збірок Proton для ARM64</string> + <string name="setup_tool_performance">Продуктивність</string> + <string name="setup_tool_performance_hint">Розподіл ядер CPU</string> + <string name="setup_tool_roms">Папка ROMs</string> + <string name="setup_tool_roms_hint">Де зберігаються ігри для емуляторів</string> + <string name="setup_card_components">Компоненти</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Керування</string> + <string name="setup_card_controls_hint">Призначення кнопок</string> + <string name="store_tab_discover">Огляд</string> + <string name="store_tab_search">Пошук</string> + <string name="store_tab_installed">Встановлено</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Магазин</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak готовий</string> + <string name="store_needs_runtime">Спершу встановіть середовище Linux у розділі «Налаштування».</string> + <string name="store_setup_title">Налаштувати Flatpak</string> + <string name="store_setup_text">Додає Flatpak і підключає його до Flathub (приблизно 20 MB). Перший додаток також завантажує своє середовище виконання.</string> + <string name="store_setting_up">Налаштування…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Оновлення</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Запуск…</string> + <string name="store_categories">Категорії</string> + <string name="store_unreachable">Не вдалося з’єднатися з Flathub. Перевірте з’єднання й спробуйте ще раз.</string> + <string name="store_try_again">Спробувати ще раз</string> + <string name="store_search_label">Пошук у Flathub</string> + <string name="store_search_placeholder">Firefox, ігри, емулятори…</string> + <string name="store_search">Пошук</string> + <string name="store_all">Усі</string> + <string name="store_searching">Пошук…</string> + <string name="store_search_hint">Шукайте за назвою або виберіть категорію. У списку лише додатки ARM64.</string> + <string name="store_no_results">На Flathub немає відповідних додатків ARM64.</string> + <string name="store_results">Результати</string> + <string name="store_check_updates">Перевірити оновлення</string> + <string name="store_update_all">Оновити всі (%1$d)</string> + <string name="store_all_current">● Усе актуально</string> + <string name="store_no_apps">Поки немає додатків. Знайдіть їх у розділах «Огляд» або «Пошук».</string> + <string name="store_setup_first_note">Налаштуйте Flatpak, щоб встановлювати додатки.</string> + <string name="store_update_available_prefix">Є оновлення · %1$s</string> + <string name="store_open">Відкрити</string> + <string name="store_details">Подробиці</string> + <string name="store_remove">Видалити</string> + <string name="store_press_again">Натисніть ще раз, щоб видалити</string> + <string name="store_installing">Встановлення…</string> + <string name="store_install">Установити</string> + <string name="store_setup_first">Спершу налаштуйте Flatpak</string> + <string name="store_download_size">Завантаження %1$s</string> + <string name="store_installed_chip">● Встановлено</string> + <string name="store_details_failed">Не вдалося завантажити сторінку цього додатка на Flathub.</string> + <string name="store_loading">Завантаження з Flathub…</string> + <string name="store_no_arm">На Flathub немає збірки ARM64, тому встановити це тут не можна.</string> + <string name="store_screenshots">Знімки екрана</string> + <string name="store_about">Про додаток</string> + <string name="store_app_id">ID додатка</string> + <string name="store_license">Ліцензія</string> + <string name="store_runtime">Середовище виконання</string> + <string name="store_installed_size">Розмір після встановлення</string> + <string name="store_installed_size_value">%1$s (плюс спільне середовище виконання)</string> + <string name="store_website">Веб-сайт</string> + <string name="store_verified">Перевірено</string> + <string name="upd_title">Оновлення</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Перевірено %1$s</string> + <string name="upd_not_checked">Ще не перевірено</string> + <string name="upd_perm_title">Дозволити DroidDeck оновлюватися самостійно</string> + <string name="upd_perm_text">На наступному екрані увімкніть «Дозволити з цього джерела», а потім поверніться. Оновлення продовжиться самостійно.</string> + <string name="upd_open_settings">Відкрити налаштування</string> + <string name="upd_not_now">Не зараз</string> + <string name="upd_signed_status">Підписано інакше</string> + <string name="upd_signed_headline">Неможливо оновити на місці</string> + <string name="upd_signed_detail">Цю копію не підписано релізним ключем DroidDeck, тому оновлення не можуть установитися над нею. Щоб перейти на іншу, видаліть цю копію.</string> + <string name="upd_available">Є оновлення</string> + <string name="upd_blocked_status">Неможливо встановити</string> + <string name="upd_switch">Готово до переходу</string> + <string name="upd_ahead_status">Попереду стабільного</string> + <string name="upd_ahead_headline">Ви попереду стабільного каналу</string> + <string name="upd_ahead_detail">Ця збірка новіша за останню стабільну. Ви перейдете на стабільний канал з його наступним випуском.</string> + <string name="upd_gone_status">Тест завершено</string> + <string name="upd_gone_headline">Цей тест завершено</string> + <string name="upd_gone_detail">Його виправлення об’єднано або відхилено. Перейдіть на попередній канал, щоб отримувати найновіші виправлення.</string> + <string name="upd_current_status">Актуальна версія</string> + <string name="upd_current_headline">У вас найновіша версія %1$s</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Оновити%1$s</string> + <string name="upd_install_button">Установити%1$s</string> + <string name="upd_install_anyway">Усе одно встановити стабільну %1$s</string> + <string name="upd_follow_preview">Перейти на попередній канал</string> + <string name="upd_stop_session">Завершіть поточний сеанс, щоб оновити.</string> + <string name="upd_less">Згорнути</string> + <string name="upd_more">Розгорнути</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Нова попередня збірка</string> + <string name="upd_new_test">Тестова збірка PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">КАНАЛ ОНОВЛЕНЬ</string> + <string name="upd_stable">Стабільний</string> + <string name="upd_stable_hint">Перевірені випуски, для більшості людей</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Попередній</string> + <string name="upd_preview_hint">Найновіші виправлення, до стабільного каналу</string> + <string name="upd_preview_current">Актуальна версія</string> + <string name="upd_tests">Тестові збірки</string> + <string name="upd_tests_hint">Спробуйте виправлення до його випуску</string> + <string name="upd_tests_none">Поки що немає</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Не зібрано для цієї копії DroidDeck</string> + <string name="upd_updated">Оновлено %1$s</string> + <string name="upd_test_name">тест PR #%1$d</string> + <string name="upd_while_ago">деякий час тому</string> + <string name="upd_just_now">щойно</string> + <plurals name="upd_tests_count"> + <item quantity="one">%1$d на спробу</item> + <item quantity="few">%1$d на спробу</item> + <item quantity="many">%1$d на спробу</item> + <item quantity="other">%1$d на спробу</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="one">Зміни з часу вашої збірки · позаду на %1$d збірку</item> + <item quantity="few">Зміни з часу вашої збірки · позаду на %1$d збірки</item> + <item quantity="many">Зміни з часу вашої збірки · позаду на %1$d збірок</item> + <item quantity="other">Зміни з часу вашої збірки · позаду на %1$d збірки</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="one">Останні зміни · %1$d збірка</item> + <item quantity="few">Останні зміни · %1$d збірки</item> + <item quantity="many">Останні зміни · %1$d збірок</item> + <item quantity="other">Останні зміни · %1$d збірки</item> + </plurals> + <string name="gate_title">Один параметр Android, який потрібно змінити</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android зупиняє додатки, які запускають багато фонових процесів, а Steam запускає їх десятки. Доки це не змінити, ігри закриватимуться без помилки.</string> + <string name="gate_fix_for_me">Виправити за мене</string> + <string name="gate_toggle_steps">Увімкніть «Вимкнути обмеження для дочірніх процесів», а потім поверніться. Залиште «Параметри розробника» увімкненими, інакше перемикач вимкнеться знову.</string> + <string name="gate_open_dev">Відкрити «Параметри розробника»</string> + <string name="gate_no_toggle">У цій версії Android немає перемикача для цього, тож DroidDeck змінює налаштування через бездротове налагодження. Займає приблизно хвилину, комп’ютер не потрібен.</string> + <string name="gate_needs_wifi">Бездротове налагодження потребує Wi-Fi. Підійде будь-яка мережа; інтернет не потрібен.</string> + <string name="gate_needs_notifications">Код поєднання приходить у сповіщенні. Дозвольте сповіщення для DroidDeck або скористайтеся розділом «Інші способи».</string> + <string name="gate_allow_notifications">Дозволити сповіщення</string> + <string name="gate_step1">Відкрийте «Налаштування» → «Параметри розробника» → «Бездротове налагодження» і увімкніть його</string> + <string name="gate_step2">Натисніть «Поєднати пристрій за кодом»</string> + <string name="gate_step3">Введіть код у сповіщення DroidDeck</string> + <string name="gate_waiting">Очікування вікна поєднання…</string> + <string name="gate_code_needed">Вікно знайдено. Введіть його код у сповіщенні.</string> + <string name="gate_status">Статус</string> + <string name="gate_polling">Перевірка кожні 2 секунди. Ця сторінка закриється, коли це вимкнено.</string> + <string name="gate_other_ways">Інші способи</string> + <string name="gate_other_toggle">Бездротове налагодження, адреса вручну, ADB з комп’ютера</string> + <string name="gate_other_no_toggle">Адреса вручну, ADB з комп’ютера, параметри розробника</string> + <string name="gate_use_wireless_instead">Використати бездротове налагодження замість цього</string> + <string name="gate_some_roms">Деякі прошивки все одно додають цей перемикач. Пошукайте «дочірній процес» у параметрах розробника.</string> + <string name="gate_manual_hint">Якщо сповіщення не працює, введіть адресу та код із вікна вручну.</string> + <string name="gate_enter_manually">Ввести адресу вручну</string> + <string name="gate_from_computer">З комп’ютера з ADB:</string> + <string name="gate_copy_command">Копіювати команду</string> + <string name="gate_choose_display">Виберіть, на якому екрані відкрити налаштування Android.</string> + <string name="gate_main_screen">Головний екран</string> + <string name="wadb_finding_port">Поєднано. Пошук порту бездротового налагодження…</string> + <string name="wadb_enter_port">Поєднано. Введіть порт із налаштувань.</string> + <string name="wadb_applying">Пристрій знайдено. Застосування налаштування…</string> + <string name="wadb_apply_failed">Не вдалося застосувати автоматично. Перевірте адресу нижче і повторіть спробу. %1$s</string> + <string name="wadb_title_wireless">Бездротове налагодження</string> + <string name="wadb_title_done">Обмеження дочірніх процесів оновлено</string> + <string name="wadb_title">Змінити обмеження дочірніх процесів</string> + <string name="wadb_lede_compact0">Якщо цього параметра немає, поєднайтеся через бездротове налагодження.</string> + <string name="wadb_lede_compact1">Поєднано. Перевірте IP-адресу і порт у бездротовому налагодженні.</string> + <string name="wadb_lede_done">Обмеження дочірніх процесів оновлено.</string> + <string name="wadb_lede0">Використайте крок 2, якщо в параметрах розробника немає налаштування дочірніх процесів. Відкрийте «Параметри розробника» → «Бездротове налагодження» → «Поєднати пристрій за кодом».</string> + <string name="wadb_lede1">Поєднано. Використайте адресу нижче або оновіть її в розділі «Бездротове налагодження» → «IP-адреса та порт».</string> + <string name="wadb_lede_done_long">Обмеження дочірніх процесів оновлено через бездротове налагодження.</string> + <string name="wadb_confirmed_on">Android підтвердив, що обмеження увімкнено.</string> + <string name="wadb_confirmed_off">Android підтвердив, що обмеження вимкнено.</string> + <string name="wadb_pair_group">2 · Поєднати бездротове налагодження</string> + <string name="wadb_pair_address">IP-адреса і порт із вікна поєднання</string> + <string name="wadb_pin">Код поєднання (PIN)</string> + <string name="wadb_pin_placeholder">6 цифр</string> + <string name="wadb_pair">Поєднати</string> + <string name="wadb_apply_group">2 · Застосувати через бездротове налагодження</string> + <string name="wadb_connect_address">IP-адреса і порт з’єднання</string> + <string name="wadb_pair_again">Поєднати ще раз</string> + <string name="wadb_turn_off">Вимкнути обмеження</string> + <string name="wadb_other_ways">Інші способи змінити це</string> + <string name="wadb_dev_try_first">1 · Параметри розробника (спробуйте спершу)</string> + <string name="wadb_restrict_on">Вимкніть «Вимкнути обмеження для дочірніх процесів».</string> + <string name="wadb_restrict_off">Увімкніть «Вимкнути обмеження для дочірніх процесів».</string> + <string name="wadb_computer_last">3 · ADB з комп’ютера (останній варіант)</string> + <string name="wadb_only_if">Лише якщо бездротове налагодження недоступне.</string> + <string name="wadb_computer_group">3 · ADB з комп’ютера (останній варіант)</string> + <string name="ctrl_osc_hint">Коли сенсорне керування з’являється в сеансі</string> + <string name="ctrl_color">Колір</string> + <string name="ctrl_color_hint">Відтінок екранних кнопок</string> + <string name="ctrl_custom">Власний</string> + <string name="ctrl_opacity">Непрозорість</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Розмір кнопок</string> + <string name="ctrl_size_hint" formatted="false">100% — стандартний розмір</string> + <string name="ctrl_stick_click">Натискання стика</string> + <string name="ctrl_stick_click_hint">Двічі торкніться і затримайте стик, щоб отримати L3 або R3</string> + <string name="ctrl_adaptive">Адаптивні стики</string> + <string name="ctrl_rumble">Вібрація гри</string> + <string name="ctrl_steam_button">Кнопка Steam</string> + <string name="ctrl_qam_button">Кнопка QAM</string> + <string name="ctrl_keyboard_button">Кнопка клавіатури</string> + <string name="ctrl_select_steam">Натисніть Select, щоб відкрити меню Steam</string> + <string name="ctrl_select_steam_hint">Замість View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Con як VR-контролери</string> + <string name="ctrl_joycon_vr_hint">Поки працює SteamVR, кожен Joy-Con стає рукою. Спрямуйте його вперед і утримуйте Home або Capture, щоб знову його відцентрувати.</string> + <string name="setup_animations">Анімації</string> + <string name="ctrl_adaptive_hint">Стики з’являються там, де ви торкаєтеся, і зникають після відпускання</string> + <string name="ctrl_layout">Розкладка</string> + <string name="ctrl_layout_custom">Збережено власне розташування</string> + <string name="ctrl_layout_default">Підлаштовано під цей екран</string> + <string name="ctrl_edit">Змінити</string> + <string name="ctrl_reset">Скинути</string> + <string name="ctrl_mapping">Призначення кнопок</string> + <string name="ctrl_mapping_default">Кожна кнопка надсилає власне введення</string> + <string name="ctrl_mapping_count">Перепризначено %1$d з %2$d кнопок</string> + <string name="ctrl_configure">Налаштувати</string> + <string name="ctrl_reset_all">Скинути контролер</string> + <string name="ctrl_reset_all_hint">Відновлює всі налаштування контролера та розкладку</string> + <string name="ctrl_mapping_lede">Що кожна екранна кнопка надсилає грі. «Приховано» прибирає кнопку.</string> + <string name="ctrl_onscreen_buttons">Екранні кнопки</string> + <string name="ctrl_defaults">Стандартні</string> + <string name="ctrl_reset_mapping">Скинути призначення</string> + <string name="content_android_apps">Додатки Android</string> + <string name="content_apps_count">%1$d додатків</string> + <string name="content_no_android_apps">Не знайдено жодного додатка Android для запуску.</string> + <string name="content_desktop_installed">● Робочий стіл встановлено</string> + <string name="content_desktop_first_open">Встановлюється під час першого відкриття</string> + <string name="content_available">Доступно для встановлення</string> + <string name="content_not_installed">Не встановлено.</string> + <string name="content_not_installed_suffix">%1$s · не встановлено</string> + <string name="content_open_named">Відкрити %1$s</string> + <string name="content_games">Ігри</string> + <string name="content_choose_roms">Виберіть папку ROMs.</string> + <string name="content_retroarch_roms">Перейдіть до /root/ROMs у RetroArch.</string> + <string name="content_add_roms">Додайте ігри %1$s у ROMs/%2$s.</string> + <string name="content_install_named">Установити %1$s</string> + <string name="content_stop_to_install">Завершіть сеанс, щоб установити</string> + <string name="content_runtime_required">Потрібне середовище Linux</string> + <string name="content_loading_details">Завантаження відомостей про встановлення…</string> + <string name="content_details_unavailable">Відомості про встановлення недоступні. Спробуйте пізніше.</string> + <string name="content_needs_runtime">Спершу встановіть середовище Linux у розділі «Налаштування».</string> + <string name="content_stop_first">Завершіть поточний сеанс, щоб установлювати додатки робочого столу.</string> + <string name="content_install_into">Установлює %1$s у робочий стіл Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Приховування вилучає його з робочого столу. Його файли залишаються в середовищі Linux.</string> + <string name="content_rom_gone">Цієї гри вже немає в папці ROMs.</string> + <string name="content_desktop_system">Робочий стіл · %1$s</string> + <string name="content_launch_in">Запустити в %1$s</string> + <string name="content_also_in">Також у %1$s</string> + <string name="content_page_gone">Цієї сторінки більше немає. Виберіть розділ зліва.</string> + <string name="content_open_desktop">Відкрити робочий стіл</string> + <string name="content_install_open_desktop">Установити й відкрити робочий стіл</string> + <string name="desktop_remove_title">Видалити робочий стіл</string> + <string name="desktop_remove_text">Видаляє робочий стіл та вбудовані в нього додатки. Ігри, додані додатки, налаштування та спільні бібліотеки залишаються.</string> + <string name="desktop_removing">Видалення робочого столу</string> + <string name="desktop_removed">Робочий стіл видалено</string> + <string name="desktop_cleaning_legacy">Видалення старих файлів LXQt</string> + <string name="desktop_removal_unknown">Оновіть DroidDeck, перш ніж видаляти цю версію робочого столу.</string> + <string name="content_linux_desktop">Робочий стіл Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox і ваші емулятори</string> + <string name="games_empty">Ігри, які ви встановите в Steam, з’являться тут після сеансу.</string> + <string name="games_play_steam">Грати в Steam</string> + <string name="games_play_steamvr">Грати в SteamVR</string> + <string name="games_launch_settings">Налаштування запуску</string> + <string name="games_launch">Запустити</string> + <string name="games_files">Файли гри</string> + <string name="games_prefix">Префікс Proton</string> + <string name="games_saves_looking">Пошук збережень…</string> + <string name="games_saves_none">Папку збережень за назвою не знайдено. Експорт візьме всю папку користувача.</string> + <string name="games_saves_folders">%1$d папок збережень</string> + <string name="games_saves_summary">%1$s · %2$d файлів · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Керування збереженнями</string> + <string name="games_saves">Збереження гри</string> + <string name="games_import_saves">Імпортувати збереження…</string> + <string name="games_export_gamehub">Експортувати як zip GameHub…</string> + <string name="games_export_winlator">Експортувати як zip Winlator…</string> + <string name="games_open_save_folder">Відкрити папку збережень</string> + <string name="games_never_played">Ще не грали</string> + <string name="games_runtime_busy_percent">Середовище зайняте · %1$d%%</string> + <string name="games_runtime_busy">Середовище зайняте</string> + <string name="games_runtime_first_play">Середовище встановлюється під час першого натискання «Грати»</string> + <string name="games_runtime_update">Є оновлення середовища</string> + <string name="games_runtime_ready">● Середовище готове</string> + <string name="games_last_played">Останній раз грали %1$s</string> + <string name="games_internal">Внутрішнє сховище</string> + <string name="games_added">Додана гра</string> + <string name="games_custom">Власна гра</string> + <string name="games_store_storage">Сховище ігор</string> + <string name="gpu_auto_hint">Найкраща пара для цього GPU, завжди в актуальному стані</string> + <string name="gpu_manual_hint">Виберіть пару самостійно</string> + <string name="gpu_checking">Перевірка драйверів…</string> + <string name="gpu_none_listed">Драйверів у списку ще немає. Оновіть, щоб їх знайти.</string> + <string name="gpu_hide_other">Приховати драйвери для інших GPU</string> + <string name="gpu_show_other">Показати драйвери для інших GPU</string> + <string name="gpu_advanced">Додатково</string> + <string name="gpu_set_with_display">Задається разом із драйвером дисплея: %1$s містить обидва.</string> + <string name="gpu_set_with_runtime">Задається разом із драйвером середовища: %1$s містить обидва.</string> + <string name="gpu_runtime_hint">Використовується іграми та робочим столом.</string> + <string name="gpu_runtime_default">Стандартний для середовища</string> + <string name="gpu_auto_by_gpu">Авто — вибирається за GPU</string> + <string name="gpu_manage">Завантажити, імпортувати або видалити…</string> + <string name="gpu_in_use_caps">ВИКОРИСТОВУЄТЬСЯ</string> + <string name="gpu_builtin">Драйвери, вбудовані в DroidDeck</string> + <string name="gpu_matched_pair">Драйвери середовища і дисплея задаються разом як узгоджена пара.</string> + <string name="gpu_recommended_for">Рекомендовано для цього GPU: %1$s.</string> + <string name="gpu_refresh_hint">Оновіть, щоб знайти драйвери для цього GPU.</string> + <string name="gpu_recommended_caps">РЕКОМЕНДОВАНО</string> + <string name="gpu_unavailable">Недоступно</string> + <string name="load_runtime">Середовище Linux</string> + <string name="load_runtime_detail">Підготовка середовища Linux</string> + <string name="load_session">Сеанс</string> + <string name="load_session_detail">Запуск відео та звуку</string> + <string name="load_steam">Клієнт Steam</string> + <string name="load_steam_detail">Перевірка Steam та його засобів сумісності</string> + <string name="load_opening_steam">Відкриття Steam</string> + <string name="load_opening_steam_detail">Очікування першого кадру Steam</string> + <string name="load_desktop">Робочий стіл</string> + <string name="load_desktop_detail">Підготовка робочого столу</string> + <string name="load_opening">Відкриття</string> + <string name="load_opening_detail">Очікування першого кадру</string> + <string name="load_starting_steam">Запуск Steam</string> + <string name="load_ended">Сеанс завершено</string> + <string name="load_step">Крок %1$d з %2$d</string> + <string name="load_steam_paused">Steam призупинено</string> + <string name="deck_tab_grips">Задні кнопки</string> + <string name="deck_tab_left">Ліва сторона</string> + <string name="deck_tab_right">Права сторона</string> + <string name="deck_tab_both">Обидві</string> + <string name="deck_tab_gamepad">Геймпад</string> + <string name="deck_surface_stick">Стік</string> + <string name="deck_surface_trackpad">Трекпад</string> + <string name="deck_surface_switch">Перемкнути між стіком і трекпадом</string> + <string name="deck_more_controls">Більше елементів керування Deck</string> + <string name="deck_panels">ПАНЕЛІ</string> + <string name="deck_close">Закрити керування на другому екрані</string> + <string name="deck_open_steam_menu">Відкрити меню Steam</string> + <string name="deck_left_upper">Ліва · верхня</string> + <string name="deck_left_lower">Ліва · нижня</string> + <string name="deck_right_upper">Права · верхня</string> + <string name="deck_right_lower">Права · нижня</string> + <string name="deck_click">Натискання</string> + <string name="deck_right_trackpad">Правий трекпад</string> + <string name="deck_left_trackpad">Лівий трекпад</string> + <string name="second_trackpad">Трекпад</string> + <string name="second_show_keyboard">Показати клавіатуру</string> + <string name="second_hide_keyboard">Сховати клавіатуру</string> + <string name="second_terminal">Термінал Linux</string> + <string name="second_terminal_not_ready">Сеанс Linux ще не готовий до роботи з терміналом.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Ігри</string> + <string name="rail_desktop">Робочий стіл</string> + <string name="rail_store">Магазин</string> + <string name="rail_components">Компоненти</string> + <string name="rail_apps">Додатки</string> + <string name="rail_setup">Налаштування</string> + <string name="rail_updates">Оновлення</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Продовжити %1$s</string> + <string name="roms_text">У кожному сеансі з’являється як /root/ROMs. Внутрішня пам’ять доступна в /root/Storage.</string> + <string name="roms_none">Папку не вибрано</string> + <string name="roms_applies">Діє з наступного сеансу. SD-карти підтримуються.</string> + <string name="roms_choose">Вибрати папку</string> + <string name="roms_change">Змінити папку</string> + <string name="proton_lede">Встановіть збірку Proton для ARM64, а потім виберіть її для гри в Steam → Властивості → Сумісність.</string> + <string name="proton_stop_first">Зупиніть поточний сеанс, щоб встановити або видалити інструмент сумісності.</string> + <string name="proton_available">Доступні збірки</string> + <string name="proton_installed">Встановлено %1$s</string> + <string name="proton_queued">Очікує з попереднього запиту</string> + <string name="proton_not_installed">Не встановлено</string> + <string name="proton_update_available">Доступне оновлення → %1$s</string> + <string name="proton_remove_older">Видалити старі версії %1$s</string> + <string name="proton_remove_older_body">Буде видалено %1$s. Для ігор, налаштованих на ці версії, доведеться вибрати інший Proton.</string> + <string name="proton_remove_body">Для ігор, налаштованих на цю версію, доведеться вибрати інший Proton.</string> + <string name="proton_install_now">Встановити зараз</string> + <string name="proton_cancel_queued">Прибрати з черги</string> + <string name="pckb_android">Клавіатура Android</string> + <string name="pckb_hide">Сховати ✕</string> + <string name="main_launch_named">Запустити %1$s</string> + <string name="main_choose_screen">Виберіть екран. Додатковий: %1$s.</string> + <string name="main_secondary_gone">Додатковий дисплей більше не доступний.</string> + <string name="main_primary">Основний екран</string> + <string name="main_secondary">Додатковий екран</string> + <string name="widgets_prev_tab">Попередня вкладка</string> + <string name="widgets_next_tab">Наступна вкладка</string> + <string name="widgets_on">Увімк.</string> + <string name="widgets_all_n">Усі %1$d</string> + <string name="widgets_none">Жодного</string> + <string name="widgets_n_of_m">%1$d з %2$d</string> + <string name="widgets_off">Вимк.</string> + <string name="screen_bottom">Нижній екран</string> + <string name="game_env_applies">Діє з наступного запуску гри. Профіль гри має пріоритет над спільним.</string> + <string name="game_env_other">Інша гра за ID додатка…</string> + <string name="game_env_done">Готово</string> + <string name="game_env_default">За умовчанням</string> + <string name="game_env_off">Вимк.</string> + <string name="game_env_change">Змінити…</string> + <string name="game_env_change_title">Змінити змінну</string> + <string name="game_env_restore_default">Повернути значення за умовчанням</string> + <string name="game_env_eyebrow">Ігри Proton</string> + <string name="pip_title">Картинка в картинці</string> + <string name="pip_auto">Автоматично вмикати режим PiP</string> + <string name="unfolded_controls">Керування на розгорнутому екрані</string> + <string name="unfolded_controls_hint">У розгорнутому стані гра розташована над трекпадами й задніми кнопками Steam Deck. У складеному — гра на весь екран.</string> + <string name="pip_suspended">Призупинено</string> + <string name="pip_not_ready">Режим «Картинка в картинці» стане доступним, щойно сеанс буде готовий.</string> + <string name="pip_permission">Дозвольте DroidDeck режим «Картинка в картинці» в налаштуваннях Android.</string> + <string name="pip_unavailable">Android не вдалося відкрити режим «Картинка в картинці».</string> + <string name="game_shortcut">Ярлик</string> + <string name="game_shortcut_add">Додати на головний екран</string> + <string name="game_shortcut_choose">Вибрати гру</string> + <string name="game_shortcut_scanning">Пошук встановлених ігор…</string> + <string name="game_link_copy">Копіювати посилання для запуску</string> + <string name="game_link_copied">Посилання для запуску скопійовано</string> + <string name="game_shortcut_unsupported">Цей лаунчер не підтримує ярлики. Скористайтеся пунктом «Копіювати посилання для запуску».</string> + <string name="game_link_invalid">Недійсне посилання для запуску гри.</string> + <string name="game_link_missing">Цієї гри більше немає у вашій бібліотеці DroidDeck.</string> + <string name="game_link_session_busy">Зупиніть поточний сеанс, перш ніж запускати гру Steam.</string> + <string name="game_link_failed">Не вдалося передати гру в Steam. Спробуйте запустити її ще раз.</string> + <string name="setup_retry_removal">Повторити видалення</string> + <string name="runtime_removing">Видалення</string> + <string name="runtime_removal_incomplete">Видалення не завершено</string> + <string name="game_file_export">Експортувати файл гри</string> + <string name="game_file_sync">Синхронізувати всі файли ігор із папкою</string> + <string name="game_file_stop_sync">Зупинити синхронізацію файлів ігор</string> + <string name="game_file_folder">Виберіть папку для файлів ігор для фронтендів</string> + <string name="game_file_exported">Файли ігор збережено в %1$s</string> + <string name="game_frontend_files">Файли для фронтендів</string> + + <string name="main_wait_runtime">Дочекайтеся завершення операції із середовищем</string> + <string name="main_wait_proton_install">Дочекайтеся завершення встановлення інструмента сумісності</string> + <string name="main_wait_desktop_install">Дочекайтеся завершення встановлення програми для робочого столу</string> + <string name="main_wait_install_game">Дочекайтеся завершення встановлення, перш ніж запускати гру</string> + <string name="main_saves_close_session">Спершу закрийте сеанс Steam, щоб гра не перезаписала імпортовані збереження</string> + <string name="main_saves_importing">Імпорт у %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="one">Імпортовано %1$d файл з %2$s у %3$s</item> + <item quantity="few">Імпортовано %1$d файли з %2$s у %3$s</item> + <item quantity="many">Імпортовано %1$d файлів з %2$s у %3$s</item> + <item quantity="other">Імпортовано %1$d файлу з %2$s у %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="one">Імпортовано %1$d файл з %2$s у %3$s. Резервну копію старих збережень записано в Download/DroidDeck/Saves/backups</item> + <item quantity="few">Імпортовано %1$d файли з %2$s у %3$s. Резервну копію старих збережень записано в Download/DroidDeck/Saves/backups</item> + <item quantity="many">Імпортовано %1$d файлів з %2$s у %3$s. Резервну копію старих збережень записано в Download/DroidDeck/Saves/backups</item> + <item quantity="other">Імпортовано %1$d файлу з %2$s у %3$s. Резервну копію старих збережень записано в Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Виберіть zip-архів збережень для %1$s</string> + <string name="main_saves_exporting">Експорт %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="one">Експортовано %1$d файл як %2$s: %3$s</item> + <item quantity="few">Експортовано %1$d файли як %2$s: %3$s</item> + <item quantity="many">Експортовано %1$d файлів як %2$s: %3$s</item> + <item quantity="other">Експортовано %1$d файлу як %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Виберіть, куди зберегти %1$s (%2$s)</string> + <string name="main_action_failed">%1$s — помилка: %2$s</string> + <string name="main_no_logs_yet">Журналів сеансів ще немає: спершу запустіть сеанс.</string> + <string name="main_no_logs_to_clear">Немає журналів сеансів для очищення.</string> + <plurals name="main_logs_cleared"> + <item quantity="one">Очищено %1$d папку журналів сеансів.</item> + <item quantity="few">Очищено %1$d папки журналів сеансів.</item> + <item quantity="many">Очищено %1$d папок журналів сеансів.</item> + <item quantity="other">Очищено %1$d папки журналів сеансів.</item> + </plurals> + <string name="main_wadb_pair_failed">Не вдалося створити пару через бездротове налагодження</string> + <string name="main_wadb_command_failed">Помилка команди бездротового налагодження</string> + <string name="main_wadb_unavailable">Бездротове налагодження недоступне</string> + <string name="main_adb_copied">Команду ADB скопійовано</string> + <string name="main_pick_roms">Виберіть папку ROMs</string> + <string name="main_non_adreno_title">GPU не Adreno</string> + <string name="main_non_adreno_text">Turnip підтримує GPU Adreno. На %1$s Steam може показувати чорний екран. Завантаження: %2$.0f MB.</string> + <string name="main_install_anyway">Усе одно встановити</string> + <string name="main_remove_runtime_title">Видалити середовище Linux</string> + <string name="main_remove_runtime_text">Буде видалено середовище, клієнт Steam у ньому та всі встановлені там ігри.</string> + <string name="main_applied">Застосовано: %1$s</string> + <string name="android_app_open_failed_primary">Не вдалося відкрити %1$s на основному екрані</string> + <string name="android_app_open_failed_on">Не вдалося відкрити %1$s на %2$s</string> + <string name="android_app_open_failed_display">Не вдалося відкрити %1$s на дисплеї %2$d</string> + <string name="comp_busy_importing">Імпорт</string> + <string name="comp_busy_swapping">Заміна</string> + <string name="comp_busy_restoring">Відновлення</string> + <string name="comp_busy_cancelling">Скасування</string> + <string name="comp_busy_deleting">Видалення</string> + <string name="comp_cannot_read">не вдається прочитати файл</string> + <string name="comp_imported">Імпортовано %1$s</string> + <string name="comp_swap_cancelled">Заміну в очікуванні скасовано.</string> + <string name="comp_pick_wcp">Виберіть пакет компонента (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Сервер Nightlies недоступний</string> + <string name="comp_stored">Збережено %1$s</string> + <string name="comp_download_failed">Помилка завантаження: %1$s</string> + <string name="drivers_pick_linux">Виберіть драйвер для середовища Linux (zip -Linux або набір Android + Linux)</string> + <string name="drivers_pick_android">Виберіть драйвер дисплея (zip AdrenoTools або набір Android + Linux)</string> + <string name="drivers_pick_any">Виберіть zip-файл драйвера або набір Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Видалення %1$s…</string> + <string name="main_forgetting_named">Вилучення %1$s зі списку…</string> + <string name="main_pick_game_storage">Виберіть папку для зберігання ігор</string> + <string name="main_pick_decky_zip">Виберіть ZIP плагіна Decky</string> + <string name="main_storage_not_usable">Не можна використати: %1$s</string> + <string name="main_running_program">Програма</string> + <string name="main_removing_runtime">Видалення середовища Linux</string> + <string name="main_settings_main_screen">Не вдалося відкрити налаштування на нижньому екрані, тож їх відкрито на основному.</string> + <string name="main_open_dev_options">Відкрийте «Параметри розробника» в налаштуваннях</string> + + <string name="upd_unknown_apps_failed">Не вдалося відкрити налаштування Android «Встановлення невідомих додатків»</string> + <string name="upd_couldnt_check">Не вдалося перевірити: %1$s</string> + <string name="upd_no_download">У цій збірці немає завантаження для вашої копії DroidDeck</string> + <string name="upd_stop_first">Спершу зупиніть поточний сеанс, потім оновлюйте</string> + <string name="upd_stage_downloading">Завантаження</string> + <string name="upd_stage_installing">Встановлення</string> + <string name="upd_stage_confirm">Очікування вашого підтвердження</string> + <string name="upd_failed">Не вдалося оновити</string> + <string name="upd_not_offered">Android не запропонував встановити оновлення</string> + + <string name="decky_install_failed">Не вдалося встановити Decky: %1$s</string> + <string name="decky_plugin_starting">Початок імпорту плагіна…</string> + <string name="decky_plugin_failed">Не вдалося імпортувати плагін: %1$s</string> + <string name="decky_plugin_installed">Плагін встановлено. Перезапустіть Steam, щоб завантажити його.</string> + + <string name="drivers_not_checked">Ще не перевірено — натисніть «Оновити», щоб пошукати нові драйвери</string> + <string name="drivers_bundle_sets_display">Android + Linux: заодно встановлює драйвер дисплея</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: заодно встановлює драйвер середовища</string> + <string name="drivers_runtime_builtin">вбудований у середовище Turnip</string> + <string name="drivers_system_vulkan">системний Vulkan: немає вбудованої збірки для цього GPU</string> + <string name="drivers_bundled">%1$s (вбудований)</string> + <string name="drivers_manual">Вручну</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Наразі опубліковано лише одну частину</string> + <string name="drivers_pair_size">%1$.0f MB за обидва</string> + <string name="drivers_none_to_set">Немає драйверів для встановлення: %1$s</string> + <string name="drivers_checking_latest">Пошук найновіших драйверів…</string> + <string name="drivers_up_to_date_check_failed">Актуальна версія (не вдалося перевірити: %1$s)</string> + <string name="drivers_recommended_unpublished">Рекомендовані драйвери зараз не опубліковано</string> + <string name="drivers_downloading_pair">Завантаження %1$s %2$s…</string> + <string name="drivers_updated_to">Оновлено до %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Оновлено до %1$s %2$s. Драйвер дисплея запрацює після перезапуску DroidDeck.</string> + <string name="drivers_auto_waits_for_session">Оновлення драйверів чекатимуть на зупинку сеансу.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s завантажиться, коли ви вийдете з мобільних даних і режиму економії батареї.</string> + <string name="drivers_skipping_bad">%1$s %2$s не запустив сеанс тут, тож Автоматично залишиться на драйверах, які працювали.</string> + <string name="drivers_rolled_back">%1$s двічі не запустив сеанс, тож Автоматично повернулося до робочих драйверів.</string> + <string name="drivers_switched_to">Перемкнено на %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Перемкнено на %1$s %2$s. Драйвер дисплея запрацює після перезапуску DroidDeck.</string> + <string name="drivers_using">Використовується %1$s %2$s.</string> + <string name="drivers_using_restart">Використовується %1$s %2$s. Драйвер дисплея запрацює після перезапуску DroidDeck.</string> + <string name="drivers_using_quest">Використовуються драйвер дисплея з комплекту Quest і типове середовище виконання.</string> + <string name="drivers_using_quest_restart">Використовуються драйвер дисплея з комплекту Quest і типове середовище виконання. Драйвер дисплея застосується після перезапуску DroidDeck.</string> + <string name="drivers_not_a_driver">Це не zip-файл драйвера: не драйвер AdrenoTools, не Turnip -Linux і не набір Android + Linux</string> + <string name="drivers_import_failed">Не вдалося імпортувати: %1$s</string> + <string name="drivers_imported_unnamed">Імпортований драйвер</string> + <string name="drivers_using_bundle">%1$s використовується і як драйвер середовища, і як драйвер дисплея.</string> + <string name="drivers_using_bundle_restart">%1$s використовується і як драйвер середовища, і як драйвер дисплея. Драйвер дисплея запрацює після перезапуску DroidDeck.</string> + <string name="drivers_deleted_bundle">Видалено %1$s (обидва драйвери)</string> + <string name="drivers_deleted">Видалено %1$s</string> + <string name="drivers_release_status">Найновіші: %1$s · перевірено %2$s</string> + <string name="drivers_release_status_failed">Найновіші: %1$s · %2$s недоступно · перевірено %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="one">%1$d хв тому</item> + <item quantity="few">%1$d хв тому</item> + <item quantity="many">%1$d хв тому</item> + <item quantity="other">%1$d хв тому</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="one">%1$d год тому</item> + <item quantity="few">%1$d год тому</item> + <item quantity="many">%1$d год тому</item> + <item quantity="other">%1$d год тому</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="one">%1$d день тому</item> + <item quantity="few">%1$d дні тому</item> + <item quantity="many">%1$d днів тому</item> + <item quantity="other">%1$d дня тому</item> + </plurals> + <string name="drivers_checking_sources">Перевірка Banners-Turnip, WinNative і DroidDeck…</string> + <string name="drivers_check_failed">помилка перевірки</string> + <string name="drivers_installed_pick_either">Встановлено %1$s — виберіть його в будь-якому зі списків, щоб задати обидва драйвери</string> + <string name="drivers_installed_pick">Встановлено %1$s — виберіть його в меню</string> + + <string name="session_wait_removal">Дочекайтеся завершення видалення середовища</string> + <string name="session_title_game">Гра</string> + <string name="session_touch_auto_touchpad">тачпад</string> + <string name="session_touch_auto_direct">прямий</string> + <string name="session_swap_failed">Не вдалося замінити: %1$s</string> + <string name="session_profile_save_failed">Не вдалося зберегти профіль: %1$s</string> + <string name="session_desktop_paused">Робочий стіл призупинено</string> + <string name="session_named_paused">%1$s призупинено</string> + <string name="session_program_paused">Програму призупинено</string> + <string name="session_starting_desktop">Запуск робочого столу</string> + <string name="session_starting_named">Запуск %1$s</string> + <string name="session_starting_program">Запуск програми</string> + <string name="session_no_logs">Для цього сеансу немає журналів.</string> + <string name="session_logs_archive_failed">Не вдалося створити архів журналів сеансу.</string> + <string name="session_logs_share_failed">Не вдалося поділитися журналами сеансу.</string> + <string name="session_starting_session">Запуск сеансу…</string> + <string name="session_runtime_downloading">завантаження середовища Linux</string> + <string name="session_runtime_downloading_mb">завантаження середовища Linux · %1$d з %2$d MB</string> + <string name="session_runtime_checking">перевірка середовища Linux</string> + <string name="session_runtime_unpacking">розпакування середовища Linux</string> + <string name="session_desktop_downloading">завантаження робочого столу</string> + <string name="session_desktop_downloading_mb">завантаження робочого столу · %1$d з %2$d MB</string> + <string name="session_desktop_checking">перевірка робочого столу</string> + <string name="session_desktop_unpacking">розпакування робочого столу</string> + <string name="session_proton_downloading">завантаження Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">завантаження Proton Experimental (ARM64) · %1$d з %2$d MB</string> + <string name="session_proton_checking">перевірка Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">розпакування Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Не вдалося отримати каталог середовищ. Перевірте з’єднання й натисніть «Грати» ще раз.</string> + <string name="session_runtime_install_failed">Середовище Linux не встановилося. Перевірте його в розділі «Налаштування» й натисніть «Грати» ще раз.</string> + <string name="session_desktop_install_failed">Робочий стіл не встановився (%1$s). Перевірте з’єднання й натисніть «Робочий стіл» ще раз.</string> + <string name="session_ended_named">Роботу %1$s несподівано завершено. Додайте журнали до звіту про помилку або спробуйте ще раз.</string> + <string name="session_ended_program">Програма несподівано зупинилася. Додайте журнали до звіту про помилку або спробуйте ще раз.</string> + <string name="session_ended_desktop">Робочий стіл несподівано зупинився. Додайте журнали до звіту про помилку або спробуйте ще раз.</string> + <string name="session_ended_detail">Код завершення %1$d · %2$s</string> + <string name="session_ended_no_log">немає журналу</string> + <plurals name="session_hint_enosys"> + <item quantity="one">У журналі %1$d помилка «Function not implemented»: прискорення seccomp у proot порушує роботу допоміжної програми на цьому пристрої. Спробуйте %2$s → «%3$s» (або «%4$s») і запустіть знову.</item> + <item quantity="few">У журналі %1$d помилки «Function not implemented»: прискорення seccomp у proot порушує роботу допоміжної програми на цьому пристрої. Спробуйте %2$s → «%3$s» (або «%4$s») і запустіть знову.</item> + <item quantity="many">У журналі %1$d помилок «Function not implemented»: прискорення seccomp у proot порушує роботу допоміжної програми на цьому пристрої. Спробуйте %2$s → «%3$s» (або «%4$s») і запустіть знову.</item> + <item quantity="other">У журналі %1$d помилки «Function not implemented»: прискорення seccomp у proot порушує роботу допоміжної програми на цьому пристрої. Спробуйте %2$s → «%3$s» (або «%4$s») і запустіть знову.</item> + </plurals> + + <string name="mode_decky_plugins">Плагіни</string> + <string name="mode_decky_plugins_hint">Встановіть плагін із ZIP для наступного сеансу Steam.</string> + <string name="mode_decky_plugin_downloading">Завантаження…</string> + <string name="mode_decky_plugin_install_zip">Встановити із ZIP</string> + <string name="store_cat_games">Ігри</string> + <string name="store_cat_audio_video">Аудіо й відео</string> + <string name="store_cat_graphics">Графіка</string> + <string name="store_cat_internet">Інтернет</string> + <string name="store_cat_office">Офіс</string> + <string name="store_cat_developer">Розробка</string> + <string name="store_cat_education">Освіта</string> + <string name="store_cat_science">Наука</string> + <string name="store_cat_system">Система</string> + <string name="store_cat_utilities">Утиліти</string> + <string name="store_section_popular">Популярне</string> + <string name="store_section_trending">У тренді</string> + <string name="store_section_new">Нове</string> + <string name="store_section_updated">Оновлене</string> + <string name="store_section_loading">завантаження…</string> + <string name="store_flatpak_setup">Налаштування Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Не вдалося перевірити оновлення на Flathub</string> + <string name="content_rom_installed">встановлено</string> + <string name="content_rom_folder">папка</string> + <string name="theme_graphite">Графіт</string> + <string name="theme_graphite_detail">Графітові поверхні й синій колір кулі з логотипа для всього вибраного, у фокусі чи натиснутого.</string> + <string name="theme_paper">Папір на чорному</string> + <string name="theme_paper_detail">Основний колір — білий, а синій з іконки позначає лінії, кільця й точки.</string> + <string name="theme_icon_blue">Синій з іконки</string> + <string name="theme_icon_blue_detail">Чорне тло, білий текст і синій для всього вибраного, у фокусі чи натиснутого.</string> + <string name="theme_electric">Електричний темно-синій</string> + <string name="theme_electric_detail">Яскравіший синій на поверхнях із темно-синім відтінком замість сірого.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Пробіл</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Спершу встановіть середовище</string> + <string name="game_sync_err_steam_library">Бібліотека Steam недоступна</string> + <string name="game_sync_err_previous_sd">Попередня бібліотека на SD-карті недоступна</string> + <string name="game_sync_err_game_storage">Сховище ігор недоступне</string> + <string name="game_sync_err_added_games">Папка доданих ігор недоступна</string> + <string name="game_sync_err_manifests">Маніфести Steam недоступні</string> + <string name="content_system_many">Багато систем</string> + <string name="fm_drive_internal">Внутрішня пам’ять</string> + <string name="fm_drive_linux">Система Linux</string> + <string name="fm_drive_sd">SD-карта</string> + <string name="fm_drive_storage">Сховище</string> + <string name="fm_select">Вибрати</string> + <string name="fm_properties">Властивості</string> + <string name="fm_favorite_add">Додати в обране</string> + <string name="fm_favorite_remove">Вилучити з обраного</string> + <string name="fm_rename">Перейменувати</string> + <string name="fm_copy">Копіювати</string> + <string name="fm_cut">Вирізати</string> + <string name="fm_actions">Дії</string> + <string name="fm_favorites">Обране</string> + <string name="fm_pin_current">Закріпити поточну папку</string> + <string name="fm_no_favorites">Обраного ще немає — закріпіть папку через її меню ⋮, щоб швидко повертатися до неї.</string> + <string name="fm_unpin_favorite">Вилучити з обраного</string> + <string name="fm_size_zero">0 Б</string> + <string name="fm_unit_bytes">Б</string> + <string name="fm_prop_location">Розташування</string> + <string name="fm_prop_type">Тип</string> + <string name="fm_prop_size">Розмір</string> + <string name="fm_prop_modified">Змінено</string> + <string name="fm_type_folder">Папка</string> + <string name="fm_type_file">Файл</string> + <string name="fm_type_ext_file">Файл %1$s</string> + <string name="fm_read_only">Лише читання</string> + <string name="fm_read_only_hint">Не дає іграм (і Wine) перезаписати або видалити цей файл.</string> + <string name="fm_read_only_failed">Не вдалося змінити атрибут «Лише читання»</string> + <string name="fm_hidden">Прихований</string> + <string name="fm_hidden_unsupported">Це сховище не підтримує атрибут «Прихований».</string> + <string name="fm_hidden_hint">Позначає файл як прихований у Windows (атрибут «Прихований» у Wine).</string> + <string name="fm_hidden_failed">Не вдалося змінити атрибут «Прихований» у цьому сховищі</string> + <string name="fm_done">Готово</string> + <string name="fm_op_deleting">Видалення...</string> + <string name="fm_delete_failed">Не вдалося видалити</string> + <string name="fm_op_moving">Переміщення...</string> + <string name="fm_op_copying">Копіювання...</string> + <string name="fm_op_moving_item">Переміщення — %1$s</string> + <string name="fm_op_copying_item">Копіювання — %1$s</string> + <string name="fm_op_moving_batch">Переміщення %1$d/%2$d — %3$s</string> + <string name="fm_op_copying_batch">Копіювання %1$d/%2$d — %3$s</string> + <string name="fm_paste_failed">Виконано: %1$d, не вдалося: %2$d</string> + <string name="fm_paste_skipped">Виконано: %1$d, пропущено: %2$d</string> + <plurals name="fm_paste_moved"> + <item quantity="one">Переміщено %1$d елемент</item> + <item quantity="few">Переміщено %1$d елементи</item> + <item quantity="many">Переміщено %1$d елементів</item> + <item quantity="other">Переміщено %1$d елемента</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="one">Скопійовано %1$d елемент</item> + <item quantity="few">Скопійовано %1$d елементи</item> + <item quantity="many">Скопійовано %1$d елементів</item> + <item quantity="other">Скопійовано %1$d елемента</item> + </plurals> + <string name="fm_already_exists">«%1$s» уже існує</string> + <string name="fm_op_renaming">Перейменування...</string> + <string name="fm_rename_failed">Не вдалося перейменувати</string> + <string name="fm_op_creating_folder">Створення папки...</string> + <string name="fm_create_folder_failed">Не вдалося створити папку</string> + <string name="fm_new_folder">Нова папка</string> + <string name="fm_folder_name">Назва папки</string> + <string name="fm_create">Створити</string> + <string name="fm_new_name">Нова назва</string> + <string name="fm_delete_title">Видалити?</string> + <string name="fm_delete_text">Остаточно видалити «%1$s»?</string> + <plurals name="fm_delete_items_title"> + <item quantity="one">Видалити %1$d елемент?</item> + <item quantity="few">Видалити %1$d елементи?</item> + <item quantity="many">Видалити %1$d елементів?</item> + <item quantity="other">Видалити %1$d елемента?</item> + </plurals> + <string name="fm_cannot_undo">Цю дію не можна скасувати.</string> + <plurals name="fm_and_more"> + <item quantity="one">…і ще %1$d</item> + <item quantity="few">…і ще %1$d</item> + <item quantity="many">…і ще %1$d</item> + <item quantity="other">…і ще %1$d</item> + </plurals> + <string name="fm_op_deleting_batch">Видалення %1$d/%2$d — %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="one">Не вдалося видалити %1$d елемент</item> + <item quantity="few">Не вдалося видалити %1$d елементи</item> + <item quantity="many">Не вдалося видалити %1$d елементів</item> + <item quantity="other">Не вдалося видалити %1$d елемента</item> + </plurals> + <string name="fm_conflict_merge_hint">«Об’єднати» додає та замінює файли в наявній папці.</string> + <string name="fm_conflict_overwrite_hint">«Перезаписати» замінює наявний файл.</string> + <string name="fm_conflict_apply_all">Застосувати до всіх конфліктів</string> + <string name="fm_conflict_merge">Об’єднати</string> + <string name="fm_conflict_overwrite">Перезаписати</string> + <string name="fm_conflict_keep_both">Залишити обидва</string> + <string name="fm_conflict_skip">Пропустити</string> + <string name="fm_select_this_folder">Вибрати цю папку</string> + <string name="fm_back">Назад</string> + <string name="fm_drive_not_readable">%1$s: підключено, але читання зараз недоступне</string> + <string name="fm_list_view">Список</string> + <string name="fm_grid_view">Сітка</string> + <string name="fm_search">Пошук</string> + <string name="fm_sort">Сортування</string> + <string name="fm_sort_name">Назва</string> + <string name="fm_sort_date">Дата зміни</string> + <string name="fm_rows_comfortable">Просторі рядки</string> + <string name="fm_rows_compact">Компактні рядки</string> + <string name="fm_hide_hidden">Сховати приховані файли</string> + <string name="fm_show_hidden">Показати приховані файли</string> + <string name="fm_hide_favorites">Сховати обране</string> + <string name="fm_show_favorites">Показати обране</string> + <string name="fm_filter_folder">Фільтрувати цю папку</string> + <string name="fm_free_space">Вільно: %1$s</string> + <string name="fm_selected_count">Вибрано: %1$d</string> + <string name="fm_select_none">Нічого</string> + <string name="fm_select_all">Усі</string> + <string name="fm_paste">Вставити</string> + <plurals name="fm_items"> + <item quantity="one">%1$d елемент</item> + <item quantity="few">%1$d елементи</item> + <item quantity="many">%1$d елементів</item> + <item quantity="other">%1$d елемента</item> + </plurals> + <string name="fm_paste_here">Вставити %1$s сюди</string> + <string name="fm_paste_move_here">Вставити %1$s сюди (перемістити)</string> + <string name="fm_rail_title">Файли</string> + <string name="fm_rail_storage">СХОВИЩЕ</string> + <string name="fm_rail_quick">ШВИДКИЙ ДОСТУП</string> + <string name="fm_rail_favorites">ОБРАНЕ</string> + <string name="fm_rail_downloads">Завантаження</string> + <string name="fm_rail_downloads_short">Завант.</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Журнали сеансів</string> + <string name="fm_rail_pictures">Зображення</string> + <string name="fm_favorite_added">«%1$s» додано в обране</string> + <string name="fm_favorite_removed">«%1$s» вилучено з обраного</string> + <string name="fm_empty_directory">Порожня папка</string> + <string name="fm_up_one_level">На рівень вище</string> + <string name="fm_choose_folder">Виберіть папку</string> + <string name="fm_choose_file">Виберіть файл</string> + <string name="ctrl_tint_steam_blue">Синій Steam</string> + <string name="ctrl_tint_sky">Небесний</string> + <string name="ctrl_tint_white">Білий</string> + <string name="ctrl_tint_violet">Фіолетовий</string> + <string name="ctrl_tint_green">Зелений</string> + <string name="ctrl_tint_amber">Бурштиновий</string> + <string name="ctrl_tint_red">Червоний</string> + <string name="ctrl_tint_pink">Рожевий</string> + <string name="ctrl_button_a">Кнопка A</string> + <string name="ctrl_button_b">Кнопка B</string> + <string name="ctrl_button_x">Кнопка X</string> + <string name="ctrl_button_y">Кнопка Y</string> + <string name="ctrl_button_lb">Лівий бампер</string> + <string name="ctrl_button_rb">Правий бампер</string> + <string name="ctrl_button_lt">Лівий тригер</string> + <string name="ctrl_button_rt">Правий тригер</string> + <string name="ctrl_button_view">Кнопка «Перегляд»</string> + <string name="ctrl_button_menu">Кнопка «Меню»</string> + <string name="ctrl_target_view">Перегляд</string> + <string name="ctrl_target_menu">Меню</string> + <string name="ctrl_target_up">Хрестовина вгору</string> + <string name="ctrl_target_down">Хрестовина вниз</string> + <string name="ctrl_target_left">Хрестовина вліво</string> + <string name="ctrl_target_right">Хрестовина вправо</string> + <string name="ctrl_target_hidden">Приховано</string> + <string name="ctrl_editor_drag">Перетягніть, щоб перемістити</string> + <string name="ctrl_editor_snap">Прив’язка</string> + <string name="ctrl_editor_save">Зберегти</string> + <string name="second_mode_none">Нічого</string> + <string name="second_mode_keyboard_trackpad">Клавіатура + трекпад</string> + <string name="second_mode_terminal">Термінал</string> + <string name="second_mode_deck_controls">Задні кнопки + трекпади Deck</string> + + <string name="rtinst_removing">Видалення середовища Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="one">Видалення середовища Linux · %1$d запис</item> + <item quantity="few">Видалення середовища Linux · %1$d записи</item> + <item quantity="many">Видалення середовища Linux · %1$d записів</item> + <item quantity="other">Видалення середовища Linux · %1$d запису</item> + </plurals> + <string name="rtinst_removed">Середовище Linux видалено</string> + <string name="rtinst_removal_failed">Не вдалося завершити видалення середовища Linux. Повторіть видалення в розділі «Налаштування».</string> + <string name="rtinst_removing_leftovers">Видалення залишків середовища</string> + <string name="rtinst_downloading">Завантаження</string> + <string name="rtinst_verifying">Перевірка</string> + <string name="rtinst_extracting">Розпакування</string> + <string name="rtinst_channel_description">Показується під час встановлення або видалення середовища Linux</string> + <string name="rtinst_title_installing">Встановлення середовища Linux</string> + <string name="rtinst_title_removing">Видалення середовища Linux</string> + + <string name="deskpkg_runtime_missing">Середовище Linux не встановлено</string> + <string name="deskpkg_no_checksum">У каталозі немає контрольної суми для %1$s</string> + <string name="deskpkg_checksum_mismatch">Контрольна сума не збігається — нічого не змінено</string> + <string name="deskpkg_installing">Встановлення %1$s</string> + <string name="deskpkg_place_failed">Не вдалося розмістити AppImage</string> + <string name="deskpkg_extract_failed">Не вдалося розпакувати</string> + <string name="deskpkg_install_failed">Не вдалося встановити</string> + + <string name="flatpakmgr_setup_failed">Не вдалося налаштувати Flatpak (код %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Налаштування Flatpak не завершено</string> + <string name="flatpakmgr_busy">Виконується інше завдання магазину</string> + <string name="flatpakmgr_not_ready">Спершу налаштуйте Flatpak</string> + <string name="flatpakmgr_starting">Запуск</string> + <string name="flatpakmgr_exit_status">Flatpak завершився з кодом %1$d</string> + <string name="flatpakmgr_installing">Встановлення %1$s</string> + <string name="flatpakmgr_updating">Оновлення %1$s</string> + <string name="flatpakmgr_removing">Видалення %1$s</string> + <string name="flatpakmgr_installing_step">Встановлення %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Оновлення %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Видалення %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">перекладів</string> + <string name="flatpakmgr_ref_graphics_drivers">графічних драйверів</string> + <string name="flatpakmgr_ref_media_codecs">медіакодеків</string> + <string name="flatpakmgr_ref_runtime">середовища виконання %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">середовища виконання %1$s %2$s</string> + + <string name="appimg_too_small">Файл замалий для AppImage</string> + <string name="appimg_unreadable">Не вдається прочитати файл: %1$s</string> + <string name="appimg_not_linux">Це не AppImage (це не програма для Linux)</string> + <string name="appimg_wrong_arch">Цей AppImage зібрано не для ARM64 (aarch64) і не для x86-ПК</string> + <string name="appimg_not_appimage">Це програма для Linux, але не AppImage</string> + <string name="appimg_wrong_type">Можна імпортувати лише AppImage типу 2 (цей має тип %1$d)</string> + <string name="appimg_no_space_import">Недостатньо вільного місця: для імпорту потрібно близько %1$s</string> + <string name="appimg_no_space_update">Недостатньо вільного місця: для оновлення потрібно близько %1$s</string> + <string name="appimg_import_failed">Не вдалося імпортувати</string> + <string name="appimg_gone">Цього AppImage більше немає</string> + <string name="appimg_update_failed">Не вдалося оновити</string> + <string name="appimg_extracting">Розпакування %1$s</string> + <string name="appimg_extract_failed">Не вдалося розпакувати AppImage</string> + <string name="appimg_extract_failed_detail">Не вдалося розпакувати AppImage: %1$s</string> + + <string name="deckymgr_stop_session_loader">Зупиніть активний сеанс, перш ніж встановлювати Decky Loader</string> + <string name="deckymgr_download_failed">Не вдалося завантажити Decky Loader</string> + <string name="deckymgr_size_mismatch">Розмір Decky Loader не збігся з метаданими випуску</string> + <string name="deckymgr_checksum_download_failed">Не вдалося завантажити контрольну суму випуску</string> + <string name="deckymgr_checksum_missing">Контрольна сума випуску відсутня</string> + <string name="deckymgr_checksum_invalid">Контрольна сума випуску недійсна</string> + <string name="deckymgr_checksum_mismatch">Контрольна сума Decky Loader не збіглася</string> + <string name="deckymgr_not_elf">Файл випуску не є сумісним 64-бітним виконуваним файлом Linux</string> + <string name="deckymgr_session_started_loader">Під час завантаження розпочався сеанс; зупиніть його, перш ніж встановлювати Decky Loader</string> + <string name="deckymgr_loader_not_executable">Не вдалося позначити PluginLoader як виконуваний файл</string> + <string name="deckymgr_cef_failed">Не вдалося увімкнути віддалене налагодження Steam CEF</string> + <string name="deckymgr_stage_failed">Не вдалося підготувати PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Не вдалося зберегти наявний PluginLoader</string> + <string name="deckymgr_loader_activate_failed">Не вдалося активувати новий PluginLoader</string> + <string name="deckymgr_stop_session_plugin">Зупиніть активний сеанс, перш ніж встановлювати плагін</string> + <string name="deckymgr_loader_required">Встановіть Decky Loader, перш ніж імпортувати плагін</string> + <string name="deckymgr_zip_unreadable">Не вдалося прочитати вибраний zip-файл</string> + <string name="deckymgr_plugins_dir_failed">Не вдалося створити папку плагінів Decky</string> + <string name="deckymgr_extracting_zip">Розпакування zip-файлу плагіна</string> + <string name="deckymgr_zip_one_folder">Zip-файл плагіна повинен містити одну папку плагіна верхнього рівня</string> + <string name="deckymgr_zip_missing_files">У zip-файлі плагіна відсутні plugin.json, package.json або dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Назва плагіна відсутня</string> + <string name="deckymgr_session_started_plugin">Під час встановлення розпочався сеанс; зупиніть його, перш ніж встановлювати плагін</string> + <string name="deckymgr_plugin_installed">Плагін встановлено · перезапустіть Steam, щоб завантажити його</string> + <string name="deckymgr_plugin_install_failed">Встановлення zip-файлу плагіна не вдалося</string> + <string name="deckymgr_zip_too_many">Zip-файл плагіна містить занадто багато елементів</string> + <string name="deckymgr_zip_invalid_path">Zip-файл плагіна містить недійсний шлях</string> + <string name="deckymgr_zip_duplicate_paths">Zip-файл плагіна містить шляхи, що повторюються</string> + <string name="deckymgr_zip_unsafe_path">Zip-файл плагіна містить небезпечний шлях</string> + <string name="deckymgr_folder_failed">Не вдалося створити папку плагіна</string> + <string name="deckymgr_zip_too_large">Zip-файл плагіна розпаковується в обсяг понад обмеження 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Не вдалося позначити вбудований бінарний файл плагіна як виконуваний</string> + <string name="deckymgr_remote_entry_invalid">Недійсний запис remote_binary</string> + <string name="deckymgr_remote_name_invalid">Недійсна назва віддаленого бінарного файлу</string> + <string name="deckymgr_remote_url_https">URL-адреса віддаленого бінарного файлу повинна використовувати HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Віддалений бінарний файл %1$s має недійсний хеш SHA-256</string> + <string name="deckymgr_bin_dir_failed">Не вдалося створити папку bin плагіна</string> + <string name="deckymgr_downloading_binary">Завантаження бінарного файлу плагіна · %1$s</string> + <string name="deckymgr_binary_download_failed">Не вдалося завантажити бінарний файл плагіна %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Контрольна сума бінарного файлу плагіна не збіглася · %1$s</string> + <string name="deckymgr_binary_not_executable">Не вдалося позначити бінарний файл плагіна як виконуваний · %1$s</string> + <string name="deckymgr_binary_replace_failed">Не вдалося замінити бінарний файл плагіна · %1$s</string> + <string name="deckymgr_binary_install_failed">Не вдалося встановити бінарний файл плагіна · %1$s</string> + <string name="deckymgr_folder_taken">Папка плагіна належить іншому плагіну</string> + <string name="deckymgr_preserve_failed">Не вдалося зберегти наявний плагін</string> + <string name="deckymgr_activate_failed">Не вдалося активувати імпортований плагін</string> + <string name="deckymgr_settings_failed">Не вдалося оновити налаштування плагінів Decky</string> + <string name="deckymgr_restore_failed">Не вдалося відновити наявний плагін</string> + + <string name="adbfix_save_failed">Не вдалося зберегти ідентифікаційні дані бездротового налагодження</string> + <string name="adbfix_command_failed">Команда ADB завершилася помилкою (%1$d)</string> + <string name="adbfix_not_confirmed">Android не підтвердив зміну обмеження дочірніх процесів: %1$s</string> + <string name="adbfix_no_pairing">Немає збереженої прив’язки бездротового налагодження</string> + <string name="adbfix_enter_address">Введіть поточну IP-адресу та порт бездротового налагодження</string> + + <string name="adbpair_timed_out">Час очікування вікна прив’язки минув. Спробуйте ще раз із DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Не вдалося знайти вікно прив’язки (%1$d). Перевірте, що Wi-Fi увімкнено.</string> + <string name="adbpair_discovery_failed">Не вдалося знайти вікно прив’язки: %1$s</string> + <string name="adbpair_six_digits">Введіть усі 6 цифр коду</string> + <string name="adbpair_pairing">Прив’язка…</string> + <string name="adbpair_code_rejected">Цей код не підійшов. Відкрийте вікно прив’язки знову і введіть новий код.</string> + <string name="adbpair_connecting">Прив’язано. Підключення…</string> + <string name="adbpair_port_not_found">Прив’язано, але порт бездротового налагодження не знайдено. Залиште бездротове налагодження увімкненим і спробуйте ще раз.</string> + <string name="adbpair_applying">Застосування налаштування…</string> + <string name="adbpair_command_failed">Помилка команди бездротового налагодження</string> + <string name="adbpair_channel_name">Налаштування бездротового налагодження</string> + <string name="adbpair_channel_description">Запитує код прив’язки бездротового налагодження, коли відкрито «Налаштування»</string> + <string name="adbpair_title_pair">Прив’язати бездротове налагодження</string> + <string name="adbpair_waiting_text">Увімкніть бездротове налагодження, потім торкніться «Прив’язати пристрій за кодом прив’язки».</string> + <string name="adbpair_waiting_long">Увімкніть бездротове налагодження, потім торкніться «Прив’язати пристрій за кодом прив’язки». Залишайтеся в «Налаштуваннях»: код з’явиться в цьому сповіщенні.</string> + <string name="adbpair_code_label">6-значний код прив’язки</string> + <string name="adbpair_code_hint">Торкніться «Ввести код» і введіть 6 цифр, показаних у «Налаштуваннях».</string> + <string name="adbpair_title_code">Введіть код прив’язки Wi-Fi</string> + <string name="adbpair_title_retry">Спробуйте код ще раз</string> + <string name="adbpair_enter_code">Ввести код</string> + <string name="adbpair_title_working">Налаштування Steam</string> + <string name="adbpair_title_done">Steam готовий</string> + <string name="adbpair_done_text">Торкніться, щоб повернутися до DroidDeck. Тепер можна вимкнути бездротове налагодження.</string> + <string name="adbpair_title_failed">Налаштування бездротового налагодження зупинено</string> + + <string name="selfinst_download_failed">Не вдалося завантажити</string> + <string name="selfinst_size_mismatch">Розмір завантаження не збігся з опублікованим APK, тож його відхилено - спробуйте ще раз</string> + <string name="selfinst_checksum_mismatch">Завантаження не збіглося з контрольною сумою, тож його відхилено - спробуйте ще раз</string> + <string name="selfinst_wrong_package">Оновлення призначене для пакета Android %1$s, а не %2$s</string> + <string name="selfinst_metadata_signer">Метадані оновлення не вказують ключ підпису випуску DroidDeck</string> + <string name="selfinst_unreadable">Android не вдалося прочитати завантажений APK</string> + <string name="selfinst_apk_wrong_package">Завантажений APK призначений для %1$s, а не %2$s</string> + <string name="selfinst_version_mismatch">Завантажений APK має versionCode %1$d, а не опублікований %2$d</string> + <string name="selfinst_downgrade">Android не встановить versionCode %1$d над встановленим %2$d</string> + <string name="selfinst_no_signing">Завантажений APK не містить інформації про підпис</string> + <string name="selfinst_wrong_signer">Завантажений APK не підписано ключем випуску DroidDeck</string> + <string name="appupd_http">Каталог оновлень відповів HTTP %1$d</string> + + <string name="loadstate_starting">Запуск сеансу…</string> + <string name="loadstate_elapsed">%1$d:%2$02d минуло · досі триває</string> + <string name="loadstate_steam_update">Завантаження оновлення клієнта Steam · %1$d%%</string> + <string name="loadstate_steam_client">Завантаження клієнта Steam · %1$s</string> + + <string name="pextra_busy">Встановлення інструмента сумісності вже триває</string> + <string name="pextra_stop_session">Зупиніть активний сеанс, перш ніж встановлювати інструменти сумісності</string> + <string name="pextra_no_release">Не вдалося знайти випуск ARM64 для %1$s</string> + <string name="pextra_no_space">Щоб встановити %1$s, потрібно щонайменше 4 GB вільного місця плюс розмір завантаження</string> + <string name="pextra_downloading">Завантаження %1$s %2$s</string> + <string name="pextra_retrying">Повтор завантаження · спроба %1$d з %2$d</string> + <string name="pextra_interrupted">Завантаження перервано</string> + <string name="pextra_download_failed">Помилка завантаження; частковий файл збережено для відновлення спроби</string> + <string name="pextra_too_big">Завантаження перевищило розмір випуску і було видалено</string> + <string name="pextra_incomplete">Завантаження не завершилося; частковий файл збережено для відновлюваної повторної спроби</string> + <string name="pextra_verifying">Перевірка завантаження</string> + <string name="pextra_checksum_unreadable">Не вдалося прочитати контрольну суму випуску; спробуйте ще раз</string> + <string name="pextra_no_checksum">%1$s %2$s не публікує контрольну суму; нічого не встановлено</string> + <string name="pextra_checksum_mismatch">Контрольна сума не збіглася; завантаження видалено</string> + <string name="pextra_session_started">Під час завантаження розпочався сеанс; зупиніть його, перш ніж встановлювати інструменти сумісності</string> + <string name="pextra_installing">Встановлення %1$s</string> + <string name="pextra_install_failed">Встановлення %1$s не вдалося (код виходу %2$d)</string> + <string name="pextra_could_not_install">Не вдалося встановити %1$s</string> + <string name="esync_fetching">Отримання пакета droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">з допоміжними засобами Linux</string> + <string name="cmgr_fex_dlls_only">лише DLL</string> + <string name="cmgr_original_proton_updated">Оригінал (Proton оновлено з часу останньої заміни)</string> + <string name="cmgr_changed_outside">Змінено поза розділом «Компоненти»</string> + <string name="cmgr_not_present">відсутній</string> + <string name="cmgr_original_version">Оригінал %1$s</string> + <string name="cmgr_original_from">Оригінал з %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s буде встановлено в %3$s, коли гра, що на ньому працює, закриється.</string> + <string name="cmgr_swap_done">%1$s %2$s тепер у %3$s. Застосується під час наступного запуску гри.</string> + <string name="cmgr_original_missing">Цей оригінальний набір не збережено</string> + <string name="cmgr_restore_queued">%1$s із %2$s повернеться до оригіналу, коли гра, що на ньому працює, закриється.</string> + <string name="cmgr_restore_done">%1$s із %2$s відновлено з оригіналу %3$s.</string> + <string name="cmgr_package_in_use">%1$s використовується в %2$s. Спершу замініть цей Proton на інший.</string> + <string name="cmgr_package_not_stored">%1$s не збережено</string> + <string name="cmgr_deleted">Видалено %1$s.</string> + <string name="cmgr_original_kept">Оригінал встановленої збірки збережено: це шлях назад.</string> + <string name="cmgr_not_stored">Не збережено</string> + <string name="cmgr_deleted_original">Видалено оригінал %2$s зі збірки %1$s.</string> + <string name="cmgr_nightlies_only">Завантаження надходять лише з випусків Nightlies</string> + <string name="cmgr_list_predates_checksums">Цей список пакетів створено до появи контрольних сум - оновіть його і спробуйте ще раз</string> + <string name="cmgr_checksum_mismatch">Контрольна сума не збіглася</string> + + <string name="sprefs_upscaler_linear">Лінійний</string> + <string name="sprefs_upscaler_nearest">Найближчий</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (якість)</string> + <string name="sprefs_upscaler_sharpen">Лише різкість</string> + <string name="sprefs_lod_bias_auto">Автоматично (відповідно до масштабування)</string> + + <string name="look_off_desc">Нічого не застосовано.</string> + <string name="look_game_clarity">Ігрова чіткість</string> + <string name="look_game_clarity_desc">Різкість із ноткою контрасту - варіант на щодень.</string> + <string name="look_vivid">Яскравий</string> + <string name="look_vivid_desc">Колір підсилено максимально. Усунення смугастості увімкнено, щоб небо не смугастилося.</string> + <string name="look_cinematic">Кінематографічний</string> + <string name="look_cinematic_desc">Глибший контраст, холодніші кольори, згладжені краї.</string> + <string name="look_competitive">Змагальний</string> + <string name="look_competitive_desc">Підняті тіні та посилена різкість - щоб першим помічати суперників.</string> + <string name="look_adaptive_sharpen">Адаптивна різкість</string> + <string name="look_adaptive_sharpen_desc">Лише різкість, колір не змінюється.</string> + <string name="look_filmic">Фільмовий</string> + <string name="look_filmic_desc">Крива в стилі кіноплівки, трохи приглушена.</string> + <string name="look_arcade">Аркадний</string> + <string name="look_arcade_desc">Соковито та яскраво.</string> + <string name="look_retro_crt">Ретро CRT</string> + <string name="look_retro_crt_desc">Ефекти трубки CRT та аналогового сигналу разом.</string> + <string name="look_upscale_sharp">Різке масштабування</string> + <string name="look_upscale_sharp_desc">Для запуску в роздільній здатності, нижчій за панель.</string> + <string name="look_pixel_clean">Чисті пікселі</string> + <string name="look_pixel_clean_desc">Чіткі пікселі для 2D та старих ігор.</string> + <string name="look_anime_edge">Аніме-контур</string> + <string name="look_anime_edge_desc">Контури у стилі мультфільму плюс різкість.</string> + + <string name="gpuinfo_not_adreno">Не GPU Adreno</string> + <string name="gpuinfo_supported">Підтримується</string> + <string name="gpuinfo_experimental">Експериментально: його драйвери - тестові збірки</string> + <string name="gpuinfo_below_tested">Нижче за протестоване обладнання (Adreno 725 і новіші): може не запрацювати</string> + <string name="gpuinfo_unsupported">Не підтримується: DroidDeck потребує GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Перевищено ліміт запитів GitHub - спробуйте пізніше</string> + <string name="turnip_github_http">GitHub відповів HTTP %1$d</string> + <string name="turnip_download_failed">Не вдалося завантажити</string> + <string name="turnip_list_predates_checksums">Цей список драйверів створено до появи контрольних сум - оновіть його і спробуйте ще раз</string> + <string name="turnip_checksum_mismatch">Контрольна сума не збіглася - завантаження відхилено</string> + <string name="turnip_not_adrenotools">Не драйвер AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">немає meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json неможливо прочитати (%1$s)</string> + <string name="turnip_reject_linux_driver">це драйвер середовища Linux (імпортуйте його в розділі «Драйвер середовища Linux»)</string> + <string name="turnip_reject_wayland">це ігровий драйвер Wayland, який цьому додатку не потрібен</string> + <string name="turnip_reject_no_library_name">meta.json не вказує libraryName, тож нічого не можна передати AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json вказує %1$s, якого немає в zip-файлі</string> + <string name="turnip_reject_not_aarch64">%1$s не є 64-бітною спільною бібліотекою ELF для AArch64</string> + <string name="turnip_reject_glibc">%1$s пов’язаний з glibc - це Turnip «-Linux», який належить до розділу «Драйвер середовища Linux»</string> + <string name="lvd_no_library">У цьому zip немає libvulkan_freedreno*.so. Zip Android (AdrenoTools) або -Wayland Turnip не є драйвером середовища Linux.</string> + <string name="lvd_not_aarch64">%1$s не є 64-бітною спільною бібліотекою ELF для AArch64.</string> + <string name="lvd_not_glibc">%1$s не є драйвером glibc - він пов’язаний з libc Android. Середовищу Linux потрібен zip «-Linux»; звичайний Turnip або Turnip «-Wayland» клієнт Steam взагалі не може завантажити.</string> + <string name="bundle_no_manifest">Не є набором драйверів: немає manifest.json із вказаними драйверами android і linux</string> + <string name="bundle_entry_outside">Не є набором драйверів: %1$s вказує за його межі</string> + <string name="bundle_too_large">Не є набором драйверів: розпаковується в обсяг понад %1$d MB</string> + + <string name="gstore_sd_card">SD-карта</string> + <string name="gstore_folder">Папка</string> + + <string name="logshare_chooser">Поділитися журналами сеансу</string> + + <string name="hdr_needs_android_10">потрібен Android 10 або новіший (шари дисплея з кольоровим простором)</string> + <string name="hdr_none">цей дисплей не повідомляє про підтримку HDR</string> + <string name="hdr_not_hdr10">цей дисплей підтримує %1$s, а не HDR10</string> + + <string name="gpu_this_gpu">цей GPU</string> + <string name="phantom_title_on">Обмеження дочірніх процесів увімкнено</string> + <string name="phantom_title_unset">Обмеження дочірніх процесів не задано</string> + <string name="phantom_title_unreadable">Не вдалося перевірити обмеження дочірніх процесів</string> + <string name="phantom_title_off">Обмеження дочірніх процесів вимкнено</string> + <string name="phantom_title_not_required">Обмеження дочірніх процесів не потрібне</string> + <string name="phantom_instructions_fix">%1$s Якщо це неможливо, підключіть цей пристрій до комп’ютера з ADB і виконайте команду нижче. Потім поверніться сюди і перевірте ще раз.</string> + <string name="phantom_instructions_off">Сеанси Steam можуть запускатися.</string> + <string name="phantom_instructions_not_applicable">Ця версія Android не використовує це обмеження.</string> + <string name="phantom_fix_toggle">Увімкніть «Вимкнути обмеження для дочірніх процесів» у розділі «Параметри розробника» і залишіть «Параметри розробника» увімкненими після цього.</string> + <string name="phantom_fix_no_toggle">У цій версії Android немає перемикача для цього. Змініть це з цього пристрою за допомогою бездротового налагодження.</string> + <string name="upd_block_no_apk">У цій збірці немає завантаження для цієї копії DroidDeck.</string> + <string name="upd_block_version_code">Android не встановить це над цією збіркою, бо її versionCode %1$d нижчий за встановлений %2$d.</string> + <string name="upd_fail_downgrade">Android не встановить старішу версію над новішою. Залишайтеся на цій збірці, доки канал не наздожене.</string> + <string name="upd_fail_signature">Цю копію DroidDeck підписано інакше (локальна збірка?), тож Android не оновить її на місці.</string> + <string name="upd_fail_storage">Недостатньо вільного місця для оновлення.</string> + <string name="upd_fail_aborted">Оновлення скасовано.</string> + <string name="upd_fail_with_message">Оновлення не встановилося: %1$s</string> + <string name="upd_fail_generic">Оновлення не встановилося.</string> + <string name="saves_layout_zip">zip-архів %1$s</string> + <string name="saves_zip">zip-архів</string> + <string name="saves_not_launched">%1$s ще не запускали</string> + <string name="saves_none_found">Не знайдено файлів збережень для %1$s</string> + <string name="saves_not_save_zip">%1$s не містить папки drive_c, тож це не zip-архів збережень GameHub або Winlator</string> + <string name="gstore_cannot_create">не вдається створити папки в %1$s</string> + <string name="gstore_cannot_write">не вдається записати в %1$s</string> + <string name="gstore_cannot_write_detail">не вдається записати в %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Папка недоступна</string> + <string name="gfiles_name_taken">Інший файл уже використовує %1$s</string> + <string name="gfiles_art_unavailable">Папка графіки недоступна</string> + <string name="gfiles_unrelated_inventory">Папка містить непов’язаний перелік синхронізації</string> + <string name="gfiles_remove_failed">Не вдалося видалити %1$s</string> + <string name="gfiles_outside_folder">Файл виходить за межі папки експорту</string> + <string name="cmgr_fex_unnamed">FEX (збірка без назви версії)</string> + <string name="cmgr_no_profile">немає profile.json у %1$s</string> + <string name="cmgr_not_component_package">%1$s не є пакетом компонента Linux (тип %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s вільно</string> + <string name="mode_storage_auto_short">Автоматично</string> + <string name="appupd_catalog_rejected">Каталог оновлень не пройшов перевірку (%1$s)</string> + <string name="main_adb_clip_label">Параметр дочірніх процесів DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Виконано вхід · офлайн-режим</string> + <string name="setup_signed_in_unnamed">Виконано вхід</string> + <string name="driver_tag_bundled">ВБУДОВАНО</string> + <string name="driver_tag_downloaded">ЗАВАНТАЖЕНО</string> + <string name="driver_tag_imported">ІМПОРТОВАНО</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Дисплей сеансу</string> + <string name="display_resolution">Роздільна здатність</string> + <string name="display_game_fit">Вписування гри 16:9</string> + <string name="display_game_fit_hint">Як ігри 16:9 вписуються в цей дисплей. З наступного сеансу.</string> + <string name="display_game_fit_unavailable">Виберіть «Під екран» або власний розмір, вужчий за 16:9.</string> + <string name="display_preserve">Зберігати пропорції</string> + <string name="display_stretch">Розтягнути на весь дисплей</string> + <string name="display_image_scaling">Масштабування зображення</string> + <string name="display_filter">Фільтр масштабування</string> + <string name="display_filter_hint">Спільний для Steam і Робочого столу.</string> + <string name="display_filter_live">Застосовується відразу. Спільний для Steam і Робочого столу.</string> + <string name="display_filter_note">FSR, GSR і NIS застосовуються під час збільшення зображення сеансу. «Лише різкість» працює і без збільшення.</string> + <string name="display_sharpness">Різкість фільтра</string> + <string name="display_frame_rate">Частота кадрів</string> + <string name="display_look_filter">%1$s Встановлює масштабування на %2$s.</string> + <string name="display_match_screen">Під екран (%1$d×%2$d)</string> + <string name="display_follow_screen">Слідувати за екраном (змінює розмір при згортанні чи розгортанні)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Показати відомості про пристрій</string> + <string name="device_info_hide">Сховати відомості про пристрій</string> + <string name="device_info_loading">Читання даних пристрою…</string> + <string name="device_info_copy">Копіювати</string> + <string name="device_info_copy_hint">Скопіюйте ці відомості у звіт про помилку.</string> + <string name="device_info_copied">Скопійовано.</string> + <string name="force_ssbs_title">Примусовий SSBS</string> + <string name="force_ssbs_hint">Утримує увімкненим налаштування швидкості CPU, яке Wine постійно вимикає. Може прискорити ігри Windows на Snapdragon 8 Elite; на старших чипах зміни майже непомітні. Застосовується під час наступного запуску гри.</string> + + <string name="rail_stores">Магазини</string> + <string name="source_steam">Steam</string> + <string name="source_added">Власна</string> + <string name="setup_stores">Магазини</string> + <string name="setup_stores_open_on">Відкривати магазин на</string> + <string name="setup_stores_speed">Рівень швидкості завантаження</string> + <string name="setup_stores_engine">Рушій магазинів</string> + <string name="setup_stores_engine_chip_ready">● Рушій готовий</string> + <string name="setup_stores_engine_chip_missing">Не зібрано</string> + <string name="stores_tier_balanced">Збалансований</string> + <string name="stores_tier_fast">Швидкий</string> + <string name="stores_tier_max">Максимальний</string> + <string name="stores_title">Магазини</string> + <string name="stores_settings">Налаштування магазинів</string> + <string name="stores_settings_eyebrow">Налаштування</string> + <string name="stores_chip_signed_out">(вхід не виконано)</string> + <string name="stores_tab_store">Магазин</string> + <string name="stores_tab_installed">Встановлені</string> + <string name="stores_tab_library">Бібліотека</string> + <string name="stores_tab_all">Усі</string> + <string name="stores_tab_downloads">Завантаження</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Увійти</string> + <string name="stores_signout_named">%1$s · вийти</string> + <string name="stores_signout_title">Вийти з %1$s?</string> + <string name="stores_signout_note">Встановлені ігри залишаються. Бібліотеку буде отримано знову, коли ви увійдете знову.</string> + <string name="stores_signout_stay">Не виходити</string> + <string name="stores_signout_go">Вийти</string> + <string name="stores_search_catalog">Пошук у каталозі %1$s…</string> + <string name="stores_search_installed">Пошук встановлених ігор…</string> + <string name="stores_search_library">Пошук у вашій бібліотеці…</string> + <string name="stores_search_open">Пошук</string> + <string name="stores_installed_empty">Нічого не встановлено</string> + <string name="stores_library_loading">Завантаження</string> + <string name="stores_nothing_matches">Немає ігор</string> + <string name="stores_shelves_loading">Завантаження магазину…</string> + <string name="stores_amazon_no_catalog">Немає каталогу</string> + <string name="stores_shelf_new">Нове</string> + <string name="stores_shelf_deals">Знижки</string> + <string name="stores_shelf_free">Безкоштовні ігри</string> + <string name="stores_shelf_trending">Популярне</string> + <string name="stores_shelf_library">Ваша бібліотека</string> + <string name="stores_play">Грати</string> + <string name="stores_install">Встановити</string> + <string name="stores_resume_install">Продовжити встановлення</string> + <string name="stores_dl_interrupted">Перервано</string> + <string name="stores_install_size">Встановити · %1$s</string> + <string name="stores_get_free">Отримати безкоштовно</string> + <string name="stores_view_on">Переглянути на %1$s</string> + <string name="stores_buy_price">Купити · %1$s</string> + <string name="stores_installed_chip">Встановлено</string> + <string name="stores_in_library">У бібліотеці</string> + <string name="stores_free">Безкоштовно</string> + <string name="stores_resume">Продовжити</string> + <string name="stores_refresh">Оновити</string> + <string name="stores_sort">Сортувати</string> + <string name="stores_sort_last_played">Нещодавно запущені</string> + <string name="stores_sort_recently_installed">Нещодавно встановлені</string> + <string name="stores_sort_title_asc">Назва А–Я</string> + <string name="stores_sort_title_desc">Назва Я–А</string> + <string name="stores_sort_size_desc">Розмір: найбільший</string> + <string name="stores_sort_size_asc">Розмір: найменший</string> + <string name="stores_sort_release_date">Дата виходу</string> + <string name="stores_view_list">Вигляд списком</string> + <string name="stores_view_cards">Вигляд картками</string> + <string name="stores_show_mature">Показувати контент для дорослих</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Офлайн</string> + <string name="epic_card_none">Вимк.</string> + <string name="epic_eos">Вхід Epic (EOS)</string> + <string name="epic_offline">Запускати офлайн</string> + <string name="epic_resolve">Виправити вхід Epic</string> + <string name="epic_client_version">Версія %1$s</string> + <string name="epic_client_no_runtime">Спершу встановіть середовище Linux</string> + <string name="epic_client_checking">Перевірка найновішої версії…</string> + <string name="epic_client_unpacking">Розпакування…</string> + <string name="epic_client_unreachable">Сервер завантаження не відповів</string> + <string name="epic_client_needs_fex">Epic Games Launcher потребує FEX, який завантажує Steam. Відкрийте лаунчер знову після запуску Steam.</string> + <string name="epic_client_download_failed">Помилка завантаження: %1$s</string> + <string name="epic_client_unpack_failed">Не вдалося розпакувати лаунчер: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher не прийняв вхід. Запустіть його знову з лаунчера.</string> + <string name="epic_client_uninstall_body">Видаляє лаунчер і звільняє місце. Ваші ігри Epic залишаються встановленими й працюють, а вхід зберігається для повторного встановлення.</string> + <string name="epic_client_uninstall_stops">Спершу буде закрито поточний сеанс.</string> + <string name="epic_client_uninstalled">Epic Games Launcher видалено</string> + <string name="epic_client_uninstall_failed">Не вдалося видалити деякі файли лаунчера. Спробуйте ще раз.</string> + <string name="epic_client_uninstalling">Зачекайте, доки Epic Games Launcher буде видалено</string> + <string name="store_cloud_saves">Хмарні збереження</string> + <string name="cloud_upload">Завантажити в хмару</string> + <string name="cloud_download">Завантажити з хмари</string> + <string name="cloud_none">Немає хмарних збережень</string> + <string name="cloud_conflict">Конфлікт у хмарі</string> + <string name="cloud_conflict_files">Конфлікт у хмарі · %1$d файлів</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Залишити хмарну</string> + <string name="cloud_keep_local">Залишити локальну</string> + <string name="cloud_checking">Перевірка хмари…</string> + <string name="cloud_last_sync">Остання синхронізація %1$s</string> + <string name="cloud_never">Ще не синхронізовано</string> + <string name="cloud_done">%1$d файлів</string> + <string name="stores_eyebrow_installed">встановлено</string> + <string name="stores_eyebrow_library">у вашій бібліотеці</string> + <string name="stores_eyebrow_store">магазин</string> + <string name="achievements_title">Досягнення</string> + <string name="achievements_count">%1$d з %2$d відкрито</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Відкрито · %1$d</string> + <string name="achievements_group_locked">Заблоковано · %1$d</string> + <string name="achievements_group_hidden">Сховано · %1$d</string> + <string name="achievements_hidden">Сховане досягнення</string> + <string name="achievements_hidden_detail">Деталі з\'являться після відкриття.</string> + <string name="achievements_all">Усі досягнення відкрито</string> + <string name="achievements_reading">Завантаження…</string> + <string name="achievements_signed_out">Увійдіть у %1$s, щоб побачити свої досягнення.</string> + <string name="achievements_unreachable">Не вдалося з\'єднатися з %1$s. Перевірте ще раз, коли будете онлайн.</string> + <string name="achievements_none">%1$s не має досягнень для цієї гри.</string> + <string name="achievements_show_all">Показати всі %1$d</string> + <string name="achievements_dialog_title">Досягнення · %1$s</string> + <string name="stores_in_steam">✓ У Steam</string> + <string name="stores_uninstall">Видалити</string> + <string name="stores_uninstalling">Видалення…</string> + <string name="stores_uninstall_title">Видалити %1$s?</string> + <string name="stores_uninstall_body_size">Звільнить %1$s і видалить гру зі Steam.</string> + <string name="stores_uninstall_body">Видалить її файли та ярлик у Steam.</string> + <string name="stores_launch_not_registered">Steam побачить гру під час наступного запуску; запустіть її звідти або відкрийте Steam зараз.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Вибір Steam для кожної гри</string> + <string name="stores_card_audio">Звук</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Компоненти</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Рушій</string> + <string name="stores_card_engine_value">%1$s · нативний</string> + <string name="stores_card_engine_java">%1$s · вбудований</string> + <string name="stores_how_it_runs">Як це працює</string> + <string name="stores_kv_fetched">Отримано з</string> + <string name="stores_kv_fetched_value">%1$s, з вашим обліковим записом</string> + <string name="stores_kv_installed_to">Встановлено в</string> + <string name="stores_kv_installed_to_value">Сховище ігор (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Запускається через</string> + <string name="stores_kv_launched_by_value">Steam і Proton, так само як ігри Steam</string> + <string name="stores_kv_launched_by_epic">Steam і Proton · вхід Epic під час кожного запуску, оверлей EOS вимкнено</string> + <string name="stores_kv_launched_by_amazon">Steam і Proton · встановлено змінні Amazon Games Services</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">додається до Steam під час встановлення (інтерфейс Deck + Steam Input)</string> + <string name="stores_downloads_empty">Немає завантажень</string> + <string name="stores_dl_paused">Призупинено</string> + <string name="stores_dl_queued">У черзі</string> + <string name="stores_dl_queued_at">У черзі · #%1$d</string> + <string name="stores_dl_cancelled">Скасовано</string> + <string name="stores_dl_failed">Помилка</string> + <string name="stores_dl_failed_reason">Помилка · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Пауза</string> + <string name="stores_dl_resume">Продовжити</string> + <string name="stores_dl_cancel">Скасувати</string> + <string name="stores_dl_retry">Повторити</string> + <string name="stores_dl_clear">Очистити</string> + <string name="stores_dl_clear_all">Очистити завершені</string> + <string name="stores_stage_manifest">Маніфест</string> + <string name="stores_stage_download">Завантаження</string> + <string name="stores_stage_verify">Перевірка</string> + <string name="stores_stage_install">Встановлення</string> + <string name="stores_stage_done">Готово</string> + <string name="stores_stage_checking">Перевірка</string> + <string name="stores_stage_downloading">Завантаження</string> + <string name="stores_dl_cancel_confirm">Видалити завантаження?</string> + <string name="stores_dl_failed_kept">Помилка · %1$s збережено</string> + <string name="stores_stage_verifying">Перевіряється</string> + <string name="stores_stage_installing">Встановлюється</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d файлів</string> + <string name="stores_download_manager">Менеджер завантажень</string> + <string name="stores_parallel">Одночасних завантажень</string> + <string name="stores_install_where">Встановити в</string> + <string name="stores_install_title">Встановити %1$s:</string> + <string name="stores_target_internal">Внутрішня пам’ять</string> + <string name="stores_target_free">%1$s вільно</string> + <string name="stores_target_free_unknown">Вільний простір невідомий</string> + <string name="stores_storage_insufficient">Мало вільного місця: потрібно %1$s, вільно лише %2$s</string> + <string name="stores_storage_low">Мало місця (вільно %1$s, потрібно %2$s)</string> + <string name="stores_notification_channel">Завантаження магазинів</string> + <string name="stores_notification_channel_hint">Показує перебіг завантаження ігор і підтримує завантаження у фоновому режимі</string> + <string name="stores_notification_one">Завантаження</string> + <string name="stores_notification_many">%1$d завантажень</string> + <string name="stores_notification_waiting">Підготовка…</string> + <string name="stores_notification_done_channel">Завершені завантаження магазинів</string> + <string name="stores_notification_installed">%1$s встановлено</string> + <string name="stores_notification_failed">Помилка завантаження %1$s</string> + <string name="stores_notification_delete">Видалити</string> + <string name="stores_notification_keep">Залишити</string> + <string name="stores_login_title">Увійти в %1$s</string> + <string name="stores_login_provider_title">Увійдіть через свого провайдера</string> + <string name="stores_login_reload">Перезавантажити</string> + <string name="stores_login_close">Закрити</string> + <string name="stores_login_retry">Спробувати ще раз</string> + <string name="stores_login_finishing">Завершення входу…</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> + <string name="stores_login_error_ssl">З’єднання зі сторінкою входу не захищене.</string> + <string name="stores_login_error_verification">Не вдалося підтвердити вхід. Спробуйте ще раз.</string> + <string name="stores_login_error_generic">Вхід не вдався. Спробуйте ще раз.</string> + <string name="common_close">Закрити</string> + <string name="common_back">Назад</string> + <string name="common_edit">Редагувати</string> + <string name="games_add_all">Додати всі ігри в цій папці</string> + <string name="games_added_none">Нічого нового в цій папці</string> + <string name="edit_name">Назва</string> + <string name="edit_target">Ціль</string> + <string name="edit_start_in">Робоча папка</string> + <string name="edit_launch_options">Параметри запуску</string> + <string name="edit_artwork">Графіка</string> + <string name="edit_other_exe">Інший exe…</string> + <string name="edit_remove">Вилучити</string> + <string name="art_cover">Обкладинка</string> + <string name="art_wide_cover">Широка обкладинка</string> + <string name="art_adjust_logo">Налаштувати логотип</string> + <string name="logo_pos_default">Типово</string> + <string name="logo_pos_upper_left">Угорі ліворуч</string> + <string name="logo_pos_upper_center">Угорі по центру</string> + <string name="logo_pos_center">По центру</string> + <string name="logo_pos_bottom_left">Унизу ліворуч</string> + <string name="logo_pos_bottom_center">Унизу по центру</string> + <string name="logo_pos_position">Позиція</string> + <string name="logo_pos_size">Розмір</string> + <string name="logo_pos_save">Зберегти</string> + <string name="logo_pos_reset">Повернути типове</string> + <string name="logo_pos_hint">Малюється поверх тла гри, як це робить Steam. Точна позиція може відрізнятися на кілька пікселів.</string> + <string name="logo_pos_no_logo">У цієї гри ще немає логотипу. Виберіть його в розділі Логотип, щоб побачити тут.</string> + <string name="logo_pos_failed">Не вдалося зберегти позицію логотипу. Спробуйте ще раз.</string> + <string name="art_background">Фон</string> + <string name="art_logo">Логотип</string> + <string name="art_icon">Значок</string> + <string name="art_src_folder">Папка гри</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Ваш файл</string> + <string name="art_src_exe">З exe-файлу</string> + <string name="art_src_auto">Автоматично</string> + <string name="art_pick_image">Вибрати зображення…</string> + <string name="art_pick_title">Виберіть зображення: %1$s</string> + <string name="art_reset">Скинути до автоматичного</string> + <string name="art_search_sgdb">Пошук у SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Знайти гру</string> + <string name="art_sgdb_other_games">Інші результати</string> + <string name="art_sgdb_none">Немає результатів.</string> + <string name="art_sgdb_no_key">SteamGridDB потребує ключа API. Додайте свій у Налаштування › Лаунчер.</string> + <string name="art_sgdb_bad_key">SteamGridDB відхилив ключ API. Перевірте його в Налаштування › Лаунчер.</string> + <string name="art_sgdb_limit">SteamGridDB обмежує запити. Спробуйте за хвилину.</string> + <string name="art_sgdb_offline">Не вдається зв\'язатися зі SteamGridDB. Перевірте з\'єднання.</string> + <string name="art_sgdb_server">На SteamGridDB сталася помилка. Спробуйте пізніше.</string> + <string name="art_sgdb_no_game">SteamGridDB не має результатів для цієї гри. Спробуйте пошукати її.</string> + <plurals name="games_added_n"> + <item quantity="one">Додано %1$d гру</item> + <item quantity="few">Додано %1$d гри</item> + <item quantity="many">Додано %1$d ігор</item> + <item quantity="other">Додано %1$d гри</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="one">%1$d вже в Іграх</item> + <item quantity="few">%1$d вже в Іграх</item> + <item quantity="many">%1$d вже в Іграх</item> + <item quantity="other">%1$d вже в Іграх</item> + </plurals> + <string name="hop_back">B · Назад до %1$s</string> + <string name="hop_from_games">гри</string> + <string name="hop_from_play">налаштувань запуску</string> + <string name="sheet_graphics_drivers">Графічні драйвери</string> + <string name="comp_this_proton">Цей Proton</string> + <string name="comp_every_proton">Кожен Proton</string> + <string name="comp_for_every_proton">Для кожного Proton</string> + <string name="comp_available_count">Доступно · %1$d</string> + <string name="comp_checked">Перевірено %1$s</string> + <string name="comp_check_all">Перевірити наявність нових компонентів і драйверів</string> + <string name="comp_get">Отримати</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton і FEX нижче належать цьому Proton</string> + <string name="comp_device_tested">%1$s · протестовано</string> + <string name="comp_device_untested">%1$s · не протестовано</string> + <string name="comp_device_unsupported">%1$s · не підтримується</string> + <string name="gpu_auto_keeps">Підтримує рекомендовану пару актуальною</string> + <string name="gpu_bar_auto">Авто · %1$s</string> + <string name="gpu_separately">Драйвери середовища і дисплея окремо</string> + <string name="gpu_use_title">Використати %1$s?</string> + <string name="gpu_mode_title">Як вибираються драйвери</string> + <string name="gpu_mode_auto_detail">Найкраща пара для цього GPU, завжди оновлена</string> + <string name="gpu_mode_pair">Зіставлена пара</string> + <string name="gpu_mode_pair_detail">Виберіть пару; встановлює обидва драйвери одразу</string> + <string name="gpu_mode_mix">Вільне поєднання</string> + <string name="gpu_mode_mix_detail">Виберіть дисплей і середовище виконання окремо</string> + <string name="gpu_mode_pair_short">Пара</string> + <string name="gpu_mode_mix_short">Мікс</string> + <string name="gpu_src_auto">АВТО</string> + <string name="gpu_src_pair">ПАРА</string> + <string name="gpu_src_bundle">ПАКЕТ</string> + <string name="gpu_src_chosen">ВИБРАНО</string> + <string name="gpu_src_by_gpu">ЗА GPU</string> + <string name="gpu_src_default">ТИПОВО</string> + <string name="gpu_display_live">Малює зараз</string> + <string name="gpu_display_pending">Потрібен перезапуск · доти малює %1$s</string> + <string name="gpu_runtime_live">Активне</string> + <string name="gpu_runtime_pending">Наступний сеанс · цей сеанс використовує %1$s</string> + <string name="gpu_display_next">Малює екран. Застосується з наступного сеансу.</string> + <string name="gpu_previous_driver">попередній драйвер</string> + <string name="gpu_restart_banner">Перезапустіть, щоб змінити драйвер дисплея.</string> + <string name="gpu_restart_blocked">Зупиніть поточний сеанс і перезапустіть DroidDeck, щоб змінити драйвер дисплея.</string> + <string name="gpu_restart_now">Перезапустити зараз</string> + <string name="gpu_restart_later">Пізніше</string> + <string name="gpu_auto_title">Автоматично вибрано цю пару для вашого %1$s</string> + <string name="gpu_auto_builtin_title">Автоматично використовуються вбудовані драйвери для вашого %1$s</string> + <string name="gpu_auto_reason">Вибрано для родини %1$s. Нові версії встановлюються у фоні.</string> + <string name="gpu_pair_title">Виберіть пару</string> + <string name="gpu_pair_hint">Пара встановлює драйвер дисплея й драйвер середовища виконання разом.</string> + <string name="gpu_mix_title">Виберіть кожен драйвер</string> + <string name="gpu_mix_hint">Пакет заповнює обидва. Зміни дисплея застосуються після перезапуску, зміни середовища виконання — з наступного сеансу.</string> + <string name="gpu_change_display">Змінити драйвер дисплея</string> + <string name="gpu_change_runtime">Змінити драйвер середовища виконання</string> + <string name="gpu_autos_pick">ВИБІР АВТОМАТИКИ</string> + <string name="gpu_installed">Встановлено</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · перезапуск для застосування</string> + <string name="gpu_chip_restart">%1$s · потрібен перезапуск</string> + <string name="comp_this_device">Цей пристрій</string> + <string name="proton_remove_title">Видалити %1$s?</string> + <string name="setup_tab_diagnostics">Діагностика</string> + <string name="setup_ready">Готово до гри</string> + <string name="setup_not_ready">Ще не готово до гри</string> + <string name="setup_ready_runtime">середовище %1$s</string> + <string name="setup_ready_limit_off">обмеження дочірніх процесів вимкнено</string> + <string name="setup_ready_signed_in">вхід виконано як %1$s</string> + <string name="setup_needs_you">Коли потрібна ваша увага</string> + <string name="setup_group_look">Вигляд</string> + <string name="setup_group_device">Цей пристрій</string> + <string name="setup_group_art">Графіка бібліотеки</string> + <string name="setup_group_download">Завантаження</string> + <string name="setup_download_source">Джерело</string> + <string name="setup_download_source_auto">Автоматично</string> + <string name="setup_download_source_direct">Пряме</string> + <string name="setup_download_source_mirror">Дзеркало</string> + <string name="setup_download_source_custom">Власний префікс</string> + <string name="setup_download_mirror">Сайт</string> + <string name="setup_download_prefix">Префікс</string> + <string name="flathub_eyebrow">ПРОГРАМИ LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Програми для стільниці Linux, які відкриваються з Робочого столу.</string> + <string name="flathub_setup">Налаштувати Flathub</string> + <string name="flathub_remove_title">Видалити %1$s?</string> + <string name="flathub_remove_note">Його налаштування та файли зберігаються.</string> + <string name="flathub_keep">Залишити</string> + <string name="desktop_size">Розмір на диску</string> + <string name="desktop_uninstall_title">Видалити Робочий стіл?</string> + <string name="desktop_all_systems">Усі</string> + <string name="gog_achievements">Досягнення GOG</string> + <string name="gog_achievements_hint">Синхронізує досягнення для підтримуваних ігор GOG. Застосується під час наступного запуску.</string> + <string name="gog_achievements_off">Досягнення вимкнено</string> + <string name="gog_achievements_on">Досягнення увімкнено</string> + <string name="gog_achievements_signin">Увійдіть у GOG знову</string> + <string name="gog_achievements_uploaded">Досягнення завантажено</string> + <string name="gog_achievements_pending">Завантаження досягнення очікує</string> + <string name="gog_achievements_enable_store">Увімкніть досягнення GOG у налаштуваннях магазинів</string> + <string name="gog_achievements_unavailable">Досягнення недоступні; перевірте журнали сесії</string> + <string name="achievement_unlocked">Досягнення відкрито</string> + <string name="touch_paste">Вставити</string> + <string name="touch_dpad">Хрестовина</string> + <string name="touch_left_stick">Лівий стик</string> + <string name="touch_right_stick">Правий стик</string> + <string name="touch_menu">Меню</string> + <string name="touch_keyboard">Клавіатура</string> + <string name="touch_dpad_up">Хрестовина вгору</string> + <string name="touch_dpad_down">Хрестовина вниз</string> + <string name="touch_dpad_left">Хрестовина вліво</string> + <string name="touch_dpad_right">Хрестовина вправо</string> + <string name="touch_title">Сенсорне керування</string> + <string name="touch_controller">Сенсорний контролер</string> + <string name="touch_mouse">Миша</string> + <string name="touch_on">Увімк.</string> + <string name="touch_off">Вимк.</string> + <string name="touch_speed_slow">Повільна</string> + <string name="touch_speed_normal">Звичайна</string> + <string name="touch_speed_fast">Швидка</string> + <string name="touch_edit_layout">Змінити розкладку</string> + <string name="touch_droiddeck_menu">Меню DroidDeck</string> + <string name="touch_drag_hint">Перетягніть елементи керування на екран</string> + <string name="touch_arrange">Розташувати</string> + <string name="touch_discard">Відхилити</string> + <string name="touch_saving">Збереження…</string> + <string name="touch_icon">Значок</string> + <string name="touch_narrower">Ш−</string> + <string name="touch_wider">Ш+</string> + <string name="touch_shorter">В−</string> + <string name="touch_taller">В+</string> + <string name="touch_hide">Сховати</string> + <string name="touch_color_opacity">Колір і непрозорість…</string> + <string name="touch_copy_layout">Копіювати цю розкладку</string> + <string name="touch_layout_copied">Розкладку скопійовано; вставте її в сенсорну розкладку будь-якої гри</string> + <string name="touch_paste_layout">Вставити скопійовану розкладку</string> + <string name="touch_reset_layout">Відновити типову розкладку Steam</string> + <string name="touch_no_binding">У цього елемента немає прив\'язки в Steam, щоб призначити йому значок</string> + <string name="touch_icon_for">Значок для %1$s</string> + <string name="touch_layout_color">Колір сенсорної розкладки</string> + <string name="touch_done">Готово</string> + <string name="touch_save_failed">Не вдалося зберегти сенсорну розкладку</string> + <string name="touch_saved">Сенсорну розкладку збережено в Steam</string> + <string name="touch_app_id">Застосунок %1$d</string> + <string name="touch_label_hint">Підпис (необов\'язково)</string> + <string name="touch_icons_missing">Значки Steam не знайдено</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d значок зі Steam</item> + <item quantity="few">%1$d значки зі Steam</item> + <item quantity="many">%1$d значків зі Steam</item> + <item quantity="other">%1$d значка зі Steam</item> + </plurals> + <string name="touch_icon_color">Колір значка</string> + <string name="touch_button_color">Колір кнопки</string> + <string name="touch_no_icon">Без значка</string> + + <string name="stores_sync_sign_in">Перевірка входу…</string> + <string name="stores_sync_library">Отримання вашої бібліотеки…</string> + <string name="stores_sync_game_list">Отримання списку ігор…</string> + <string name="stores_sync_details">Завантаження відомостей про ігри… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Синхронізація %1$d гри…</item> + <item quantity="few">Синхронізація %1$d ігор…</item> + <item quantity="many">Синхронізація %1$d ігор…</item> + <item quantity="other">Синхронізація %1$d гри…</item> + </plurals> + <string name="stores_sync_progress">Синхронізація… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Отримання обкладинок…</string> + <string name="stores_sync_failed">Синхронізація не вдалася</string> + <string name="stores_sync_no_games">У вашій бібліотеці %1$s не знайдено ігор</string> + <string name="stores_sync_amazon_no_answer">Amazon Games не відповів щодо вашої бібліотеки: оновіть або увійдіть знову</string> + <string name="stores_sync_gog_unreachable">Не вдалося з\'єднатися з GOG</string> + <string name="stores_sync_gog_unreadable">Не вдалося прочитати вашу бібліотеку GOG</string> + <string name="stores_registering">Реєстрація в Steam…</string> + <string name="mode_client_arch">Клієнт Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Діагностика VAC</string> + <string name="setup_vac_diag_hint">Ігри на Source записують свою консоль (-condebug); vac.txt у журналах сеансу показує, чи захищена гра VAC</string> + <string name="load_starting_steam_x64">Запуск Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Використовується клієнтом Steam x86-64</string> + <string name="storage_uninstall_in_x64">Ця копія в клієнті Steam x86-64. Виберіть x86-64 у пункті «Клієнт Steam», потім видаліть її тут.</string> + <string name="storage_uninstall_in_arm64">Ця копія в клієнті Steam ARM64. Виберіть ARM64 у пункті «Клієнт Steam», потім видаліть її тут.</string> + <string name="drawer_page_glasses">Окуляри</string> + <string name="glasses_open">Окуляри VITURE</string> + <string name="glasses_control">Керування окулярами</string> + <string name="glasses_driver_missing">Ця збірка не містить драйвера для цих окулярів.</string> + <string name="glasses_connection_failed">Не вдалося під’єднатися до окулярів. Під’єднайте кабель повторно або торкніться «Дозволити», щоб спробувати ще раз.</string> + <string name="glasses_allow">Дозволити</string> + <string name="glasses_allow_hint">Дозвольте DroidDeck змінювати частоту оновлення, режим 3D, яскравість, гучність і затемнення окулярів, а також зчитувати дані відстеження голови.</string> + <string name="glasses_asking">Очікування вашого дозволу у вікні Android…</string> + <string name="glasses_denied">Керування відхилено. Дозвольте його, щоб змінювати налаштування окулярів.</string> + <string name="glasses_no_control">Ці окуляри показують гру, але їхні налаштування не можна змінити звідси.</string> + <string name="glasses_output">Вихід</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Гра на окулярах</string> + <string name="glasses_game_on_hint">Показує гру лише на окулярах. Вимкнено: гру показує телефон, а Android дублює його екран.</string> + <string name="glasses_display">Екран</string> + <string name="glasses_refresh">Частота оновлення</string> + <string name="glasses_3d">3D (стереопара)</string> + <string name="glasses_3d_hint">Перемикайте смарт-окуляри в режим 3D поруч. Відстеження голови контролюється окремо.</string> + <string name="glasses_3d_failed">Сигнал 3D не підтверджено. Спробуйте знову, коли повернеться зображення 2D.</string> + <string name="glasses_no_signal">Немає зображення: окуляри в режимі, який цей телефон не може передати. Утримуйте їхню кнопку 2D/3D або від’єднайте й знову під’єднайте їх.</string> + <string name="glasses_3d_refresh">Частота оновлення в 3D</string> + <string name="glasses_auto3d">3D для VR-ігор</string> + <string name="glasses_auto3d_hint">Перемикає на 3D, поки працює SteamVR, а потім назад.</string> + <string name="glasses_picture">Зображення</string> + <string name="glasses_picture_hint">Автоматично відображає плоский контент для обох очей та виявляє SteamVR. Виберіть «Гра поруч» для контенту SBS.</string> + <string name="glasses_picture_auto">Автоматично</string> + <string name="glasses_picture_screen">Віртуальний екран</string> + <string name="glasses_picture_sbs">Стереопара з гри</string> + <string name="glasses_screen_size">Ширина екрана</string> + <string name="glasses_screen_distance">Відстань до екрана</string> + <string name="glasses_screen_next_session">Ширина й відстань застосовуються, коли гра працює на окулярах як віртуальний екран.</string> + <string name="glasses_screen_no_output">Ці налаштування діють, коли ввімкнено «Гра на окулярах» і гра показується на них.</string> + <string name="glasses_screen_flat_hint">«Автоматично» показує цю 2D-гру на весь екран. Щоб налаштувати її ширину, відстань і відстеження голови, використайте віртуальний екран.</string> + <string name="glasses_screen_use">Використати віртуальний екран</string> + <string name="glasses_screen_direct_hint">SteamVR заповнює поле зору. Налаштуйте поле зору у VR; ширина та відстань застосовуються лише до віртуального екрана.</string> + <string name="glasses_screen_sbs_hint">Ігри зі стереопарою займають усе поле зору кожного ока. Ширина й відстань стосуються лише віртуального екрана.</string> + <string name="glasses_tracking_flat_hint">«Автоматично» тримає цю 2D-гру нерухомою в полі зору. Щоб використовувати відстеження голови, виберіть «Віртуальний екран» у розділі «Екран».</string> + <string name="glasses_tracking_sbs_hint">Відстеження голови діє для віртуального екрана або запущеної гри SteamVR.</string> + <string name="glasses_hardware">Пристрій</string> + <string name="glasses_brightness">Яскравість</string> + <string name="glasses_volume">Гучність</string> + <string name="glasses_sunblock">Затемнення</string> + <string name="glasses_sunblock_hint">Затемнює передні лінзи.</string> + <string name="glasses_tracking">Відстеження</string> + <string name="glasses_head_tracking">Відстеження голови</string> + <string name="glasses_head_tracking_hint">Власні датчики окулярів повертають віртуальний екран і SteamVR услід за головою.</string> + <string name="glasses_recenter">Відцентрувати вигляд</string> + <string name="glasses_recenter_button">Повторно центрувати екран</string> + <string name="glasses_vr_fov">Поле зору SteamVR</string> + <string name="glasses_vr_fov_hint">Нижче значення наближає SteamVR і заповнює окуляри; вище — показує більше навколо вас.</string> + <string name="glasses_playing">Гра на %1$s</string> + <string name="glasses_calibration">Калібрування відстеження</string> + <string name="glasses_calibration_hint">Зменшує дрейф і вирівнює опорний горизонт.</string> + <string name="glasses_calibration_saved_hint">До цих окулярів застосовано збережене калібрування.</string> + <string name="glasses_calibration_open">Калібрувати</string> + <string name="glasses_calibration_instructions">Покладіть під’єднані окуляри догори дном на рівну горизонтальну поверхню, щоб оправа лежала рівно. Торкніться «Почати» й не чіпайте їх приблизно 8 секунд. Рух перезапускає вимірювання. Це виправляє дрейф і нахил, але не напрямок погляду.</string> + <string name="glasses_calibration_settling">Залиште окуляри догори дном і не чіпайте їх. Очікування, поки вони стабілізуються…</string> + <string name="glasses_calibration_collecting">Вимірювання показань датчиків. Не рухайте окуляри.</string> + <string name="glasses_calibration_moving">Виявлено рух. Не чіпайте окуляри; вимірювання перезапуститься автоматично.</string> + <string name="glasses_calibration_turn_over">Покладіть окуляри догори дном на рівну горизонтальну поверхню. Вимірювання почнеться, коли їх буде розміщено правильно.</string> + <string name="glasses_calibration_complete">Калібрування збережено. Надіньте окуляри, подивіться прямо перед собою, а потім торкніться «Готово», щоб відцентрувати.</string> + <string name="glasses_calibration_failed">Не вдалося завершити калібрування. Перевірте з’єднання, тримайте окуляри нерухомо й спробуйте ще раз. Попереднє калібрування не змінено.</string> + <string name="glasses_calibration_start">Почати</string> + <string name="glasses_calibration_done">Готово</string> + <string name="glasses_calibration_reset">Скинути калібрування відстеження</string> + <string name="glasses_calibration_reset_hint">Видалити збережене калібрування й відновити стандартні значення моделі? Відцентруйте вигляд, коли знову надінете окуляри.</string> + <string name="glasses_calibration_reset_button">Скинути</string> + <string name="hand_camera_group">Відстеження рук</string> + <string name="hand_camera_prompt_title">Відстежувати руки або контролери Joy-Con за допомогою камери телефону?</string> + <string name="hand_camera_prompt_body">Якщо контролер не підключено, камера телефону відстежує ваші руки голими руками у VR: зведіть великий та вказівний пальці, щоб клацнути, стисніть руку, щоб схопити, та поверніть долоню до себе та зведіть, щоб відкрити меню. Зі сполученими контролерами Joy-Con камера відстежує їхнє положення, тоді як контролери Joy-Con забезпечують обертання та натискання кнопок. Зображення обробляються на цьому пристрої та ніколи не зберігаються та не надсилаються.</string> + <string name="hand_camera_rear">Задня камера</string> + <string name="hand_camera_rear_hint">Рекомендовано. Зазвичай різкіша і ширша.</string> + <string name="hand_camera_front">Фронтальна камера</string> + <string name="hand_camera_front_hint">Для випадків, коли задню частину пристрою не можна спрямувати на себе.</string> + <string name="hand_camera_allow">Використати камеру</string> + <string name="hand_camera_not_now">Не зараз</string> + <string name="hand_camera_setting">Відстеження рук камерою</string> + <string name="hand_camera_setting_hint">Використовуйте камеру телефону для жестів голими руками або для розташування парних контролерів Joy-Con у віртуальній реальності. Контролери Joy-Con забезпечують обертання та введення кнопок. Призупиняється, поки розумні окуляри відстежують ваші руки або контролери Joy-Con. Зображення обробляються лише на цьому пристрої.</string> + <string name="hand_camera_choice">Камера</string> + <string name="hand_camera_access">Доступ до камери</string> + <string name="hand_camera_access_hint">Дозвольте доступ до камери, щоб розпочати відстеження рук.</string> + <string name="hand_camera_access_denied">Доступ до камери вимкнено. Увімкніть його в налаштуваннях Android.</string> + <string name="hand_camera_allow_button">Дозволити</string> + <string name="hand_camera_open_settings">Відкрити налаштування</string> + <string name="hand_camera_placement">Розташування камери</string> + <string name="hand_camera_placement_hint">Перевірте, що камера бачить вас, перш ніж почати гру.</string> + <string name="hand_camera_check">Перевірити</string> + <string name="hand_camera_check_title">Розташування камери</string> + <string name="hand_camera_how_rear">Поставте пристрій вертикально на відстані від 1,5 до 2 метрів, приблизно на рівні грудей, спрямувавши задню камеру на себе. Потім станьте в кадр, витягнувши руки.</string> + <string name="hand_camera_how_front">Поставте пристрій вертикально на відстані від 1,5 до 2 метрів, приблизно на рівні грудей, спрямувавши екран на себе. Потім станьте в кадр, витягнувши руки.</string> + <string name="hand_camera_starting">Запуск камери…</string> + <string name="hand_camera_stand_up">Пристрій лежить плиском. Поставте його вертикально, щоб камера була спрямована на вас.</string> + <string name="hand_camera_upright">Поставте пристрій більш вертикально, щоб камера була спрямована на вас.</string> + <string name="hand_camera_not_seen">Поки вас не видно. Станьте в кадр так, щоб було видно голову і плечі.</string> + <string name="hand_camera_move_back">Відійдіть трохи назад.</string> + <string name="hand_camera_move_closer">Підійдіть трохи ближче.</string> + <string name="hand_camera_show_hands">Витягніть обидві руки так, щоб камера їх бачила.</string> + <string name="hand_camera_good">Добре.</string> + <string name="hand_camera_failed">Не вдалося запустити камеру. Закрийте інші додатки, які її використовують, і спробуйте ще раз.</string> + <string name="hand_camera_switch">Змінити камеру</string> + <string name="hand_camera_skip">Пропустити</string> + <string name="hand_camera_done">Готово</string> + <string name="glasses_xreal_network_missing">Очікування з’єднання USB Ethernet від окулярів. Цей телефон може не надавати його додаткам.</string> + <string name="glasses_xreal_connection_failed">З’єднання з XREAL перервалося або повернуло непідтримувану відповідь. Повторна спроба…</string> + <string name="glasses_xreal_experimental">Експериментальна підтримка 1S. Увімкніть режим Follow і вимкніть стабілізацію в меню окулярів. Напрямки відстеження й режими відображення ще потрібно перевірити на пристрої.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Режим Cardboard</string> + <string name="cardboard_mode_hint">Зображення для лівого й правого ока для VR-окулярів під телефон.</string> + <string name="cardboard_source">Зображення</string> + <string name="cardboard_source_screen">Віртуальний екран</string> + <string name="cardboard_source_sbs">Стереопара 3D</string> + <string name="cardboard_viewer">Окуляри</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Без лінз</string> + <string name="cardboard_ipd">Відстань між очима</string> + <string name="cardboard_screen_width">Ширина екрана</string> + <string name="cardboard_screen_distance">Відстань до екрана</string> + <string name="cardboard_head_tracking">Відстеження голови</string> + <string name="cardboard_no_sensor">На цьому пристрої немає датчика повороту.</string> + <string name="cardboard_recenter">Відцентрувати вигляд</string> + <string name="cardboard_recenter_button">Відцентрувати</string> + <string name="cardboard_steamvr">SteamVR (експериментально)</string> + <string name="cardboard_steamvr_install">Установити</string> + <string name="cardboard_steamvr_installing">Завантаження й розпакування SteamVR…</string> + <string name="cardboard_steamvr_start">Запустити</string> + <string name="cardboard_steamvr_stop">Зупинити</string> + <string name="cardboard_steamvr_unavailable">Недоступно в цій сесії.</string> + <string name="cardboard_steamvr_failed">SteamVR не відповідає; перевірте журнал сесії.</string> + <string name="drawer_component_downloads">Завантажити компоненти</string> + <string name="drawer_component_downloads_hint">Завантаження спільні зі сторінкою «Компоненти». Виберіть вище завантажену версію, щоб використати її під час наступного запуску гри.</string> + <string name="drawer_component_choose_download">Виберіть версію для завантаження</string> + <string name="stores_fact_developer">Розробник</string> + <string name="stores_fact_publisher">Видавець</string> + <string name="stores_fact_released">Дата виходу</string> + <string name="stores_hltb_main">Сюжет</string> + <string name="stores_hltb_extras">+ Додатково</string> + <string name="stores_hltb_completionist">100%</string> + <string name="stores_hltb_hours">%1$s год</string> + <string name="stores_hltb_minutes">%1$d хв</string> + <string name="display_picture_position">Позиція зображення</string> + <string name="display_position_top">Угорі</string> + <string name="display_position_bottom">Унизу</string> + <string name="display_position_center">По центру (типово)</string> + <string name="setup_tab_storage">Сховище</string> + <string name="storage_measuring">Вимірювання сховища…</string> + <string name="storage_measuring_hint">Уперше триває кілька секунд.</string> + <string name="storage_internal">Внутрішнє сховище</string> + <string name="storage_used_of">Використано %1$s з %2$s</string> + <string name="storage_free">Вільно %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck використовує %1$s. Виміряно на %2$s.</string> + <string name="storage_rescanning">повторне сканування…</string> + <string name="storage_other_apps">Інші застосунки Android</string> + <string name="storage_safe_now">Можна звільнити зараз</string> + <string name="storage_safe_hint">Невикористані середовища виконання, залишки, старі журнали</string> + <string name="storage_clean_up">Очищення…</string> + <string name="storage_session_running">Зупиніть сеанс, щоб очистити або видалити будь-що. Розміри залишаться видними.</string> + <string name="storage_where">Куди йде</string> + <string name="storage_games">Ігри Steam</string> + <string name="storage_game_data">Дані ігор</string> + <string name="storage_game_data_hint">Префікси %1$s · майстерня %2$s · шейдери %3$s</string> + <string name="storage_tools">Proton і середовища виконання</string> + <string name="storage_tools_unused">%1$s не використовується</string> + <string name="storage_stores">GOG, Epic та інші магазини</string> + <string name="storage_stores_hint">Видаліть їх у Магазини</string> + <string name="storage_desktop">Настільні застосунки</string> + <string name="storage_desktop_hint">Застосунки та середовища виконання Flatpak</string> + <string name="storage_system">Система Linux і клієнт Steam</string> + <string name="storage_system_hint">Потрібно, щоб усе працювало</string> + <string name="storage_app_data">Дані DroidDeck</string> + <string name="storage_app_data_hint">Журнали старих сеансів %1$s · кеш · драйвери</string> + <string name="storage_legend_games">Ігри</string> + <string name="storage_legend_data">Дані ігор</string> + <string name="storage_legend_tools">Proton і середовища виконання</string> + <string name="storage_legend_stores">Інші магазини</string> + <string name="storage_legend_desktop">Настільні застосунки</string> + <string name="storage_legend_system">Система Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Очистити</string> + <string name="storage_clean_up_lede">Ніщо тут не зачіпає встановлені ігри чи поточні завантаження.</string> + <string name="storage_nothing_to_clean">Зараз немає чого очищати.</string> + <string name="storage_selected">Вибрано: %1$s · %2$s → звільниться %3$s</string> + <string name="storage_cleaning">Очищення…</string> + <string name="storage_free_button">Звільнити %1$s</string> + <string name="storage_freed">Звільнено %1$s.</string> + <string name="storage_item_runtimes">Невикористані середовища виконання Steam і Proton</string> + <string name="storage_item_leftovers">Залишки видалених ігор</string> + <string name="storage_item_leftovers_unsure">Залишки, що можуть містити збереження</string> + <string name="storage_item_logs">Журнали старих сеансів</string> + <string name="storage_item_logs_detail">Журнали поточного сеансу залишаться</string> + <string name="storage_item_custom_detail">Жодна гра його не використовує. За потреби встановіть знову в Компоненти.</string> + <string name="storage_item_shaders">Кеш шейдерів встановлених ігор</string> + <string name="storage_item_shaders_detail">Відновлюється під час гри. Перші хвилини кожної гри знову будуть із присіданнями.</string> + <string name="storage_tag_safe">Безпечно</string> + <string name="storage_tag_unused">Не використовується</string> + <string name="storage_tag_stutter">Присідання</string> + <string name="storage_tag_saves">Перевірте збереження</string> + <string name="storage_tag_default">Типово</string> + <string name="storage_tag_required">Потрібно</string> + <string name="storage_tag_not_used">Не використовується</string> + <string name="storage_back">Сховище</string> + <string name="storage_games_with_data">%1$s разом з даними</string> + <string name="storage_sort_largest">Найбільші</string> + <string name="storage_sort_least_played">Найменш грали</string> + <string name="storage_sort_sd">На SD-карті</string> + <string name="storage_no_games">Тут немає ігор.</string> + <string name="storage_played">зіграно %1$s</string> + <string name="storage_never_played">Ніколи не грали</string> + <string name="storage_game_parts">Гра %1$s · дані %2$s</string> + <string name="storage_uninstall">Видалити</string> + <string name="storage_games_note">Видалення відкриває вікно Steam, щоб Steam це зафіксував. Щоб перемістити гру на SD-карту, скористайтеся Steam › Налаштування › Сховище.</string> + <string name="storage_uninstall_title">Видалити %1$s?</string> + <string name="storage_uninstall_body">Steam відкриється й попросить підтвердження. Це звільнить %1$s гри. Префікс залишиться, доки не очищено залишки, а збереження Steam Cloud залишаться у вашому обліковому записі.</string> + <string name="storage_open_steam">Відкрити Steam</string> + <string name="storage_tools_detail">%1$s · %2$s не використовується</string> + <string name="storage_remove_unused">Видалити невикористані · %1$s</string> + <string name="storage_in_use">Використовується</string> + <string name="storage_not_used">Не використовується</string> + <string name="storage_remove">Видалити</string> + <string name="storage_remove_title">Видалити %1$s?</string> + <string name="storage_remove_body">Звільнить %1$s. Steam завантажить його знову, якщо якійсь грі знадобиться.</string> + <string name="storage_tool_fex_runtime">Потрібно для ігор Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Потрібно для Proton ARM64</string> + <string name="storage_tool_redist">Інсталятори VC++ і DirectX, потрібні іграм</string> + <string name="storage_tool_fex">Запускає ігри Linux x86</string> + <string name="storage_tool_steam">Інструмент Steam</string> + <string name="storage_tool_old_runtime">DroidDeck запускає ігри без цього середовища виконання</string> + <string name="storage_tool_x86_proton">Proton x86, який DroidDeck не може запустити</string> + <string name="storage_tool_custom_default">Типове для всіх ігор</string> + <string name="storage_tool_custom_unused">Жодна гра не використовує</string> + <string name="storage_tool_custom_unknown">Налаштування Steam не читаються, тому це збережено</string> + <string name="storage_cleanup_busy">Зачекайте завершення очищення сховища</string> + <string name="storage_low_title">Вільно лише %1$s</string> + <string name="storage_low_body">Steam потрібне місце для оновлень і кешу шейдерів. Нижче 10 GB оновлення ігор можуть зірватися на півдорозі.</string> + <string name="storage_low_safe">%1$s можна безпечно звільнити.</string> + <string name="storage_free_up">Звільнити місце</string> + <string name="storage_play_anyway">Грати все одно</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d встановлено</item> + <item quantity="other">%d встановлено</item> + <item quantity="few">%d встановлено</item> + <item quantity="many">%d встановлено</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d на SD-карті</item> + <item quantity="other">%d на SD-карті</item> + <item quantity="few">%d на SD-карті</item> + <item quantity="many">%d на SD-карті</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d інструмент</item> + <item quantity="other">%d інструменту</item> + <item quantity="few">%d інструменти</item> + <item quantity="many">%d інструментів</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Порожні теки префіксів і кеш шейдерів від %d гри</item> + <item quantity="other">Порожні теки префіксів і кеш шейдерів від %d гри</item> + <item quantity="few">Порожні теки префіксів і кеш шейдерів від %d ігор</item> + <item quantity="many">Порожні теки префіксів і кеш шейдерів від %d ігор</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Префікс %d гри ще містить файли, зокрема локальні збереження. За потреби спершу зробіть копію.</item> + <item quantity="other">Префікси %d гри ще містять файли, зокрема локальні збереження. За потреби спершу зробіть копію.</item> + <item quantity="few">Префікси %d ігор ще містять файли, зокрема локальні збереження. За потреби спершу зробіть копію.</item> + <item quantity="many">Префікси %d ігор ще містять файли, зокрема локальні збереження. За потреби спершу зробіть копію.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d гра</item> + <item quantity="other">%d гри</item> + <item quantity="few">%d гри</item> + <item quantity="many">%d ігор</item> + </plurals> + <string name="storage_tool_default_proton">Типовий Proton DroidDeck</string> + <string name="storage_tool_proton">Варіант Proton 11 від DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">використовує %d гра</item> + <item quantity="other">використовує %d гри</item> + <item quantity="few">використовують %d гри</item> + <item quantity="many">використовують %d ігор</item> + </plurals> + <string name="storage_legend_components">Компоненти</string> + <string name="storage_components">Компоненти</string> + <string name="storage_item_components">Невикористані компоненти</string> + <string name="storage_component_original">Оригінал %1$s · %2$s</string> + <string name="storage_original_confirm">Звільнить %1$s. Повертає лише ту версію Proton, яка вже не встановлена.</string> + <string name="storage_leftovers_unchecked">Не перевірено: маніфест застосунку Steam не читається, тож префікси видалених ігор залишаться, доки це не стане можливим.</string> + <string name="storage_failed">Не вдалося: %1$s</string> + <string name="storage_desktop_shared">%1$s спільно</string> + <string name="storage_data_installed">Встановлені ігри</string> + <string name="storage_data_parts">Префікси %1$s · шейдери %2$s · майстерня %3$s</string> + <string name="storage_clear_shaders">Очистити шейдери</string> + <string name="storage_data_leftovers">Видалені ігри</string> + <string name="storage_steam_app">Застосунок Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Префікс ще містить файли, можливо локальні збереження</string> + <string name="storage_leftover_confirm">Видаляє префікс Wine і кеш шейдерів (%1$s). Спершу зробіть копію важливих збережень; збереження Steam Cloud залишаться у вашому обліковому записі.</string> + <string name="storage_data_other">Збережено</string> + <string name="storage_data_other_title">Не-Steam ігри та спільний префікс Steam</string> + <string name="storage_data_other_detail">Префікси ігор із магазинів або доданих вручну</string> + <string name="storage_components_packages">Завантажені пакети</string> + <string name="storage_components_originals">Збережені оригінали</string> + <string name="storage_components_none">Жодного завантаженого пакета компонентів.</string> + <string name="storage_component_in_use">Вибрано для Proton або гри</string> + <string name="storage_component_unused">Ніде не вибрано</string> + <string name="storage_original_kept">Повертає встановлений Proton</string> + <string name="storage_original_old">Версія Proton, яка вже не встановлена</string> + <string name="storage_tag_in_use">Використовується</string> + <string name="storage_components_note">Компоненти в роботі залишаються заблокованими. Вибирайте їх у Компоненти; видалене тут можна знову завантажити там.</string> + <string name="storage_component_confirm">Звільнить %1$s. Пакети, імпортовані вами, не можна завантажити повторно.</string> + <string name="storage_desktop_detail">%1$s для застосунків Flatpak і спільного</string> + <string name="storage_desktop_apps_title">Застосунки</string> + <string name="storage_desktop_none">Немає встановлених застосунків Flatpak.</string> + <string name="storage_desktop_shared_title">Спільне між застосунками</string> + <string name="storage_desktop_runtimes">Середовища виконання</string> + <string name="storage_desktop_runtimes_detail">Бібліотеки, на яких працюють застосунки; невикористані зникають через Видалити невикористані</string> + <string name="storage_desktop_cache">Сховище завантажень</string> + <string name="storage_desktop_cache_detail">Сховище об\'єктів Flatpak і кеш завантажень</string> + <string name="storage_desktop_prune">Видалити невикористані</string> + <string name="storage_desktop_prune_body">Видаляє середовища виконання, які не потрібні жодному встановленому застосунку, і впорядковує сховище об\'єктів Flatpak. Встановлені застосунки працюють далі.</string> + <string name="storage_flatpak_uninstall_body">Видаляє застосунок (%1$s) і середовища виконання, які більше нікому не потрібні. Дані в домашній теці залишаться.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d пакет</item> + <item quantity="other">%d пакета</item> + <item quantity="few">%d пакети</item> + <item quantity="many">%d пакетів</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d застосунок</item> + <item quantity="other">%d застосунку</item> + <item quantity="few">%d застосунки</item> + <item quantity="many">%d застосунків</item> + </plurals> + <string name="boot_movie">Завантажувальне відео</string> + <string name="boot_movie_video">Відео</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d кадр/с</string> + <string name="boot_movie_note">60 кадр/с виглядає плавніше, але більше навантажує процесор під час запуску Steam. Відео запуску, вибране в налаштуваннях самого Steam, має пріоритет.</string> + <string name="boot_movie_sound">Звук</string> + <string name="boot_movie_custom">Власне відео</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV або WebM. Інші формати й файли понад %1$d МБ перетворюються на пристрої на WebM 720p, до %2$d секунд.</string> + <string name="boot_movie_import">Імпорт</string> + <string name="boot_movie_remove">Видалити</string> + <string name="boot_movie_pick">Виберіть завантажувальне відео</string> + <string name="boot_movie_imported">%1$s тепер завантажувальне відео</string> + <string name="boot_movie_imported_silent">%1$s тепер завантажувальне відео, без звуку</string> + <string name="boot_movie_too_long">Відео для перетворення має бути не довше %1$d секунд</string> + <string name="boot_movie_converting">Перетворення %1$d%%</string> + <string name="boot_movie_converting_started">%1$s перетворюється для Steam. Не закривайте DroidDeck.</string> + <string name="boot_movie_unsupported">Пристрій не може декодувати це відео.</string> + <string name="boot_movie_import_failed">Не вдалося імпортувати відео</string> + <string name="glasses_experimental">Камери Luma Ultra — Експериментально</string> + <string name="glasses_joycons">Відстеження положення Joy-Con</string> + <string name="glasses_joycons_hint">Використовуйте камери розумних окулярів, щоб розташувати парні контролери Joy-Con. Обертання та введення кнопок надходять від контролерів Joy-Con. Положення оцінюється, коли ваші зап\'ястя приховані. Замінює контролери, якими керують голими руками, та призупиняє відстеження камерою телефону. Направте контролери Joy-Con вперед під час підключення або скидання центру відстеження.</string> + <string name="glasses_joycons_requires_position">Спочатку ввімкніть відстеження положення. Потрібні контролери Joy-Con з функцією руху на Android 12 або пізнішої версії. Вимкнено за замовчуванням.</string> + <string name="setup_tab_glasses">Розумні окуляри</string> + <string name="setup_glasses_scope">Налаштування дисплея та відстеження голови спільні для меню DroidDeck, ігор та сеансів робочого столу.</string> + <string name="setup_glasses_connect">Підключіть розумні окуляри, щоб змінити їх налаштування дисплея та відстеження. Ваші збережені налаштування зберігаються після відключення.</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Режим відображення</string> + <string name="glasses_output_2d">Вихід 2D</string> + <string name="glasses_output_3d">Вихід 3D</string> + <string name="glasses_picture_group">Зображення та віртуальний екран</string> + <string name="glasses_position_group">Положення та рівень підлоги</string> + <string name="glasses_hands_group">Відстеження рук — Експериментально</string> + <string name="glasses_tracking_status">Стан відстеження</string> + <string name="glasses_resolution_2d">Роздільна здатність 2D</string> + <string name="glasses_resolution_3d">Роздільна здатність 3D</string> + <string name="glasses_resolution_vr">Роздільна здатність VR</string> + <string name="glasses_resolution_auto">Автоматично</string> + <string name="glasses_resolution_inherit">Те саме, що 2D / 3D</string> + <string name="glasses_resolution_hint">Роздільна здатність виходу для кожного ока.</string> + <string name="glasses_refresh_30_hint">Увімкніть «Гра на смарт-окулярах», щоб вибрати власний режим дисплея 30 Гц.</string> + <string name="glasses_3dof">Віртуальний екран 3DoF</string> + <string name="glasses_3dof_hint">Закріпіть плоскі ігри перед собою, щоб ви могли дивитися навколо. Увімкне «Гра на смарт-окулярах» без перемикання в 3D.</string> + <string name="glasses_screen_app_wide">Ширина та відстань миттєво оновлюють відстежуваний віртуальний екран для меню DroidDeck, ігор та сеансів робочого столу.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Відстеження позиції включає обертання голови у SteamVR. Для відстеження лише обертання вимкніть відстеження позиції.</string> + <string name="glasses_head_tracking_spatial_hint">Керує рухом голови на віртуальному екрані. Відстеження позиції включає обертання голови у SteamVR.</string> + <string name="glasses_quick_actions">Швидкі дії</string> + <string name="glasses_recenter_screen_hint">Подивіться, куди ви хочете розмістити екран, а потім скиньте центр відстеження, щоб встановити його висоту та напрямок.</string> + <string name="glasses_recenter_joycons_button">Повторно центрувати Joy-Con</string> + <string name="phone_camera_tracking_group">Камера телефону — Експериментальна функція</string> + <string name="phone_camera_tracking_setting">Відстежувати руки або контролери Joy-Con</string> + <string name="glasses_6dof">Віртуальний екран 6DoF</string> + <string name="glasses_position">Відстеження позиції — експериментальна функція</string> + <string name="glasses_position_hint">Фізичний рух у VR та навколо віртуальних екранів. Перезапуск відстеження займає деякий час.</string> + <string name="glasses_eye_height">Поточна висота очей над підлогою</string> + <string name="glasses_floor">Встановити рівень підлоги з поточної висоти</string> + <string name="glasses_floor_set">Встановити рівень підлоги</string> + <string name="glasses_spatial_setup">Налаштування та діагностика стереокамери</string> + <string name="glasses_spatial_setup_hint">Перевірте калібрування камери та відстеження рук перед грою.</string> + <string name="glasses_spatial_open">Відкрити налаштування</string> + <string name="glasses_hands">Контролери, що працюють голими руками</string> + <string name="glasses_hands_hint">Використовуйте камери розумних окулярів для прицілювання руками, щіпніть, щоб клацнути, та стисніть руку, щоб захопити у VR. Геймпади рухаються та повертаються. Замінює відстеження положення Joy-Con. Може затримуватися або втрачатися відстеження під час ігор.</string> + <string name="glasses_hands_ready_hint">Увімкніть контролери, що працюють голими руками, під камерами Luma Ultra у режимі відстеження. Спочатку покажіть відкриті руки.</string> + <string name="glasses_hands_base">Спільне калібрування Luma Ultra</string> + <string name="glasses_hands_base_hint">Використання спільної бази Luma Ultra. Калібруйте власні розумні окуляри, щоб перевірити їхню точність.</string> + <string name="glasses_hands_calibration_verified">Виміряне калібрування перевірено</string> + <string name="glasses_hands_calibration_required">Потрібна перевірка</string> + <string name="glasses_hands_calibration_required_hint">Контролери, що працюють голими руками, стають доступними після проходження перевірки виміряної відстані.</string> + <string name="tracking_recovery_lost">Втрачено відстеження</string> + <string name="tracking_recovery_look">Повільно озирніться навколо в добре освітленій кімнаті.\nТримайте камери відстеження чистими та повертайте їх до меблів або інших видимих ​​деталей.</string> + <string name="tracking_recovery_restart_help">Все ще застрягли? На вашому телефоні: розумні окуляри → Відстеження → Відкрити налаштування → Показати діагностику → Перезапустити відстеження.</string> + <string name="tracking_recovery_disconnected">Смарт-окуляри від’єднано</string> + <string name="tracking_recovery_connect">Перевірте USB-з’єднання та знову підключіть розумні окуляри.\nПрийміть підказку USB-доступу на телефоні, якщо вона з’явиться.</string> + <string name="tracking_recovery_usb_help">Після підключення повільно озирніться в добре освітленій кімнаті, щоб відновити відстеження.</string> + <string name="tracking_recovery_recenter">Потрібне повторне центрування</string> + <string name="tracking_recovery_recenter_steps">Відстеження повернулося в нове положення.\nПодивіться вперед, а потім натисніть \"скинути центр відстеження\" на телефоні.</string> + <string name="tracking_recovery_recenter_help">Ви також можете знайти опцію скидання центру відстеження в розділі «Смарт-окуляри» → «Відстеження» → «Відкрити налаштування». Збережене калібрування камери зберігається.</string> + <string name="tracking_recovery_stabilizing">Затримайтеся на мить</string> + <string name="tracking_recovery_hold">Триває скидання центру відстеження.\nТримайте смарт-окуляри нерухомо, поки відстеження стабілізується.</string> + <string name="tracking_recovery_automatic">Цей екран автоматично закривається, коли відстеження голови готове.</string> + <string name="glasses_steady_hand_aim">Стабілізоване прицілювання руками</string> + <string name="glasses_steady_hand_aim_hint">Цілься від плеча через долоню. Вимкніть для керування обертанням зап’ястя.</string> + <string name="spatial_title">Просторові налаштування</string> + <string name="spatial_wait_tracking">Очікування відстеження…</string> + <string name="spatial_cameras_description">Ліва та права камери стеження</string> + <string name="spatial_camera_sync">Синхронізація камери</string> + <string name="spatial_ready">Готовий</string> + <string name="spatial_sync_hint">Очікування камери та відстеження голови на одну лінію. Тримайте розумні окуляри підключеними.</string> + <string name="spatial_prepare">1. Підготуйте мішень для калібрування</string> + <string name="spatial_print_actual">Роздрукувати в реальному розмірі</string> + <string name="spatial_print_hint">Кожен квадрат має мати розмір 30 мм (1,181 дюйма). Встановіть лист рівно на тверду поверхню в добре освітленому місці.</string> + <string name="spatial_print">Надрукувати калібрувальну мішень</string> + <string name="spatial_capture_group">2. Знімайте різні види</string> + <string name="spatial_board_stationary">Тримайте калібрувальну мішень нерухомо</string> + <string name="spatial_capture_hint">Пересувайте розумні окуляри ближче, далі та вбік. Повертайте їх ліворуч/праворуч, нахиляйте вгору/вниз і нахиляйте вбік. Тримайте калібрувальну мішень в обох камерах і робіть коротку паузу перед кожним знімком.</string> + <string name="spatial_start">Розпочати нове калібрування</string> + <string name="spatial_wait_sync">Очікування синхронізації камери.</string> + <string name="spatial_start_hint">Розпочніть нове калібрування для збору переглядів.</string> + <string name="spatial_views_hint">Зберігайте калібрувальну ціль видимою в обох попередніх переглядах. Зробіть щонайменше 24 різких кадри з різних кутів.</string> + <string name="spatial_capturing">Захоплення…</string> + <string name="spatial_capture">Захоплення виду калібрування</string> + <string name="spatial_alignment">Розрахувати вирівнювання камери</string> + <string name="spatial_calculating">Обчислення…</string> + <string name="spatial_calculate">Розрахувати калібрування</string> + <string name="spatial_distance_group">3. Перевірте відстань</string> + <string name="spatial_distance">Виміряна відстань</string> + <string name="spatial_distance_hint">Почніть із 12 дюймів або 30 см, щоб надруковані маркери було легше виявити. Виберіть точне вимірювання, яке ви будете використовувати.</string> + <string name="spatial_camera_board_distance">Ліва камера до центру калібрувальної мішені</string> + <string name="spatial_checking_distance">Перевірка відстані…</string> + <string name="spatial_validate">Перевірка відстані</string> + <string name="spatial_diagnostics">Діагностика</string> + <string name="spatial_show_diagnostics">Показати діагностику</string> + <string name="spatial_diagnostics_hint">Інструменти відновлення синхронізації камери та відстеження.</string> + <string name="spatial_camera_timing">Хронометраж камери</string> + <string name="spatial_hand_input">Вхід із відстеження рук</string> + <string name="spatial_wait_timing">Очікування часу камери.</string> + <string name="spatial_frames">Зображення камери</string> + <string name="spatial_gpu">GPU виявлення рук</string> + <string name="spatial_lite">Полегшене визначення моделей рук</string> + <string name="spatial_lite_hint">Використовуйте детектор долоні Lite і ключові точки Lite на руках. Перевірте точність прицілювання, щипка та захоплення. Скидається під час перезапуску відстеження.</string> + <string name="spatial_adaptive">Автоматична вхідна частота для відстеження рук</string> + <string name="spatial_adaptive_hint">Налаштування введення відповідно до швидкості обробки. Скидається під час перезапуску відстеження.</string> + <string name="spatial_half_rate">Обмеження частоти введення для відстеження рук</string> + <string name="spatial_half_rate_hint">Використовуйте половину зображень камери. Вимкніть, щоб порівняти максимальну частоту. Скидається під час перезапуску відстеження.</string> + <string name="spatial_diagnostic_capture">Діагностичне захоплення</string> + <string name="spatial_diagnostic_capture_hint">Збережіть одну пару стереозображень локально. Зображення зберігаються лише за запитом.</string> + <string name="spatial_save_frame">Зберегти зображення камери</string> + <string name="spatial_restart_tracking">Відновити відстеження</string> + <string name="spatial_restart_hint">Використовуйте, якщо відстеження не відновлюється в добре освітленому місці. Перезапуск вимагає нового джерела відстеження.</string> + <string name="spatial_restart">Перезапустити</string> + <string name="spatial_restart_title">Відновити відстеження?</string> + <string name="spatial_restart_confirm">Незбережені калібрувальні зображення будуть втрачені. Після цього тримайте смарт-окуляри нерухомо та скиньте центр відстеження, коли відстеження відновиться.</string> + <string name="spatial_views_count">%1$d / Зафіксовано 24 перегляди</string> + <string name="spatial_capture_paused">Запис призупинено: %1$s</string> + <string name="spatial_measure_hint">Міра %1$s. Покажіть повну ціль калібрування в обох попередніх переглядах, а потім затримайтеся.</string> + <string name="spatial_timing_values">%1$.1f Гц • вік зображення %2$.1f мс • обробка %3$.1f мс</string> + <string name="spatial_input_values">Вхідний ліміт %1$.1f Гц • %2$.0f%% зображень камери. Відстеження голови продовжується на максимальній частоті.</string> + <string name="spatial_frame_counts">%1$d оброблено • %2$d видалено • %3$d пропущено обмеженням введення</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck – калібрування Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">Друк на 100% / Реальний розмір. Кожен квадрат: 30 мм (1,181 дюйма).</string> + <string name="spatial_print_stationary">Тримайте калібрувальну мішень рівною та нерухомою; переміщайте розумні окуляри між знімками.</string> + <string name="spatial_print_check">Перевірка масштабу: 100 мм (3,937 дюйма) між позначками</string> + <string name="spatial_distance_12in">12 дюймів (30,48 см)</string> + <string name="spatial_distance_30cm">30 см (11,81 дюйма)</string> + <string name="spatial_distance_20in">20 дюймів (50,8 см)</string> + <string name="spatial_distance_50cm">50 см (19,69 дюйма)</string> + <string name="spatial_disabled">Вимкнено</string> + <string name="spatial_wait_stable">Очікування стабільного відстеження</string> + <string name="spatial_disconnected">Відключено</string> + <string name="spatial_hands_off">Контролери, якими керують голими руками, вимкнені</string> + <string name="spatial_tracking_off">Відстеження позиції вимкнено або розумні окуляри від’єднано</string> + <string name="spatial_recenter_pending">Запит на скидання центру відстеження — тримайте нерухомо, поки відстеження стабілізується.</string> + <string name="spatial_tracking_lost">Відстеження втрачено — обличчям до добре освітленої області з видимими деталями</string> + <string name="spatial_origin_changed">Початок відстеження змінено — натисніть «Скинути центр відстеження», а потім тримайте нерухомо.</string> + <string name="spatial_active">6DoF активний</string> + <string name="spatial_connect_hint">Підключіть Luma Ultra та ввімкніть відстеження позиції.</string> + <string name="spatial_validation_session">Калібрування перевірено для цього підключення.</string> + <string name="spatial_validation_saved">Калібрування перевірено та збережено.</string> + <string name="spatial_wait_cameras">Очікування стереокамер</string> + <string name="spatial_wait_hands">Очікування відстеження рук</string> + <string name="spatial_collect_instructions">Тримайте калібрувальну мішень 5 × 7 нерухомо. Робіть понад 24 перегляди, переміщаючи та обертаючи розумні окуляри.</string> + <string name="spatial_capture_pending">Очікування наступного зображення камери. Тримайте розумні окуляри нерухомо.</string> + <string name="spatial_validation_pending">Перевірка наступного зображення камери. Тримайте повну калібрувальну мішень видимою та тримайтеся нерухомо.</string> + <string name="spatial_start_first">Спочатку почніть калібрування</string> + <string name="spatial_no_camera_frame">Нове зображення камери не надійшло. Перевірте підключення розумних окулярів і попередній перегляд камери, а потім повторіть спробу.</string> + <string name="spatial_clock_reset">Скидання годинника камери</string> + <string name="spatial_frame_changed">Система координат відстеження змінена. Ваші зображення зберігаються для перерахунку. Скиньте центр відстеження, а потім почніть новий набір, щоб захопити більше зображень.</string> + <string name="spatial_device_loaded">завантажено калібрування пристрою</string> + <string name="spatial_base_loaded">Базове калібрування Luma Ultra завантажено</string> + <string name="spatial_calibration_needed">потрібне калібрування</string> + <string name="spatial_tap_start">Торкніться «Спочатку почати нове калібрування».</string> + <string name="spatial_capture_recenter_pending">Центр скидання відстеження очікує на стабільне відстеження. Затримайтеся нерухомо на мить.</string> + <string name="spatial_capture_recenter">Відстеження змінено. Натисніть «Скинути центр відстеження» один раз, а потім тримайте нерухомо перед зйомкою.</string> + <string name="spatial_capture_unsynchronized">Знімок відхилено: відстеження голови не було синхронізоване або змінилося під час зйомки. Не рухайтеся та спробуйте ще раз.</string> + <string name="spatial_align_first">Розрахуйте вирівнювання камери перед перевіркою відстані.</string> + <string name="spatial_processing_failed">Помилка обробки камери</string> + <string name="spatial_hand_head_changed">Відстеження голови змінено під час виявлення рук</string> + <string name="spatial_hand_wait_sync">Очікування синхронізації камери та голови</string> + <string name="spatial_no_wrists">Зап\'ястя не виявлено. Тримайте ручки контролера Joy-Con перед розумними окулярами</string> + <string name="spatial_no_hands">Руки не виявлено. Покажіть відкриті долоні перед розумними окулярами</string> + <string name="spatial_one_camera_wrists">Зап’ястя видно лише в одній камері; тримайте ручки контролера в спільному поданні</string> + <string name="spatial_one_camera_hands">Руки видно лише в одній камері; тримайте обидві долоні в загальному вигляді</string> + <string name="spatial_ambiguous_hands">Обидві камери бачать руки, але відповідність ліворуч/праворуч неоднозначна</string> + <string name="spatial_inconsistent_depth">Руки виявлено, але стереоглибина неузгоджена</string> + <string name="spatial_rejected_wrist">Положення зап’ястя відхилено стереосистемою чи перевіркою руху</string> + <string name="spatial_inconsistent_palm">Виявлено стереоточки, але геометрія долоні суперечлива</string> + <string name="spatial_hands_need_calibration">Завершіть калібрування та перевірте відстань, щоб увімкнути руки</string> + <string name="spatial_hands_wait_stable">Очікування стабільного відстеження голови; скиньте центр відстеження, якщо запитується.</string> + <string name="spatial_old_frame">Камера спостереження занадто стара; в очікуванні свіжої пари</string> + <string name="spatial_fit_ready">Розмістити %1$.2f пікс. Виміряйте вибрану відстань від лівої камери до центру калібрувальної мішені, а потім перевірте.</string> + <string name="spatial_opencv_error">OpenCV недоступний: %1$s</string> + <string name="spatial_restored">%1$d збережені перегляди відновлено. Обчисліть калібрування, щоб повторити спробу, або почніть новий набір, щоб отримати більше.</string> + <string name="spatial_captured">Знято %1$d / 24 перегляди. Тримайте цілі калібрування фіксованими; перемістіть розумні окуляри для наступного перегляду.</string> + <string name="spatial_capture_corners">Зйомку відхилено: %1$d / 12 необхідних кутів видно в обох камерах. Покажіть більше калібрувальної мішені, затримайтеся та повторіть спробу.</string> + <string name="spatial_validation_error">Не вдалося завершити перевірку відстані: %1$s. Спробуйте знову.</string> + <string name="spatial_inference_error">Виявлення рук недоступні: %1$s. Змініть CPU/GPU або перемкніть контролери, якими керуєте голими руками, щоб повторити спробу.</string> + <string name="spatial_hand_timeout">Виявлення рук перевищило %1$d мс; спостереження відхилено</string> + <string name="spatial_wrists_tracked">%1$d / 2 позиції зап’ястя Joy-Con, виміряні стереосистемою</string> + <string name="spatial_palms_tracked">Відстежувані долоні: %1$d / 2; готовність до щипка: %2$d; готовність до захоплення: %3$d</string> + <string name="spatial_capture_saved">Діагностичний запис збережено в %1$s</string> + <string name="spatial_hand_error">Відстеження рук припинено: %1$s</string> + <string name="spatial_stereo_loaded">Стерео %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Відстеження голови та ціль калібрування не збігаються на %1$s (обмеження 5 см / 2 дюйми). Зберігайте ціль калібрування фіксованою та дочекайтеся стабільного відстеження перед початком нового набору. Обережно повертайте та нахиляйте розумні окуляри; пауза перед кожним захопленням.</string> + <string name="spatial_need_views">Зробіть принаймні 24 різноманітні види стаціонарної мішені для калібрування.</string> + <string name="spatial_need_rotation">Повертайте розумні окуляри ліворуч і праворуч, нахиляйте їх угору та вниз; рух без обертання не може відкалібрувати вирівнювання камери.</string> + <string name="spatial_bad_baseline">Неправдоподібна базова лінія камери</string> + <string name="spatial_need_orientations">Рухайте головою в різних положеннях.</string> + <string name="spatial_bad_rotation">Недійсне обертання камери до голови</string> + <string name="spatial_bad_alignment">Вирівнювання камери до голови невідповідне.</string> + <string name="spatial_calibration_error">Не вдалося завершити калібрування. %1$s Ваші захоплені види збережено.</string> + <string name="spatial_reprojection_error">Помилка повторної проекції %1$.2f пікселів перевищує 2 пікселі. Перекалібруйте.</string> + <string name="spatial_distance_corners">%1$d / 24 кути шахової дошки виявлено в обох камерах. Тримайте повну калібрувальну мішень видимою та тримайтеся нерухомо. Якщо його вже видно, виберіть 12 дюймів або 30 см і виміряйте ближчу відстань перед повторною спробою.</string> + <string name="spatial_distance_depth">Мішень для калібрування видно, але її глибину не можна достовірно виміряти. Тримайте розумні окуляри нерухомо та тримайте калібрувальну мішень рівною та добре освітленою, а потім повторіть спробу.</string> + <string name="spatial_distance_invalid">Вимірювання камери недійсне. Затримайтеся та спробуйте ще раз.</string> + <string name="spatial_distance_passed">Перевірку дистанції пройдено.</string> + <string name="spatial_distance_retry">Повторно перевірте відстань від лівої камери до центру калібрувальної мішені та повторіть спробу.</string> + <string name="spatial_distance_result">Виміряно камерами %1$s; вибрана відстань %2$s. %3$s</string> + <string name="spatial_wait_previews">Перед початком калібрування зачекайте на попередній перегляд обох камер.</string> + <string name="spatial_saved_views_hint">Збережені перегляди можна перерахувати. Розпочніть нове калібрування для запису в поточній системі координат відстеження.</string> + <string name="spatial_model_checksum_error">Невідповідність контрольної суми моделі руки</string> + <string name="spatial_opencv_load_error">Не вдалося завантажити OpenCV</string> + <string name="spatial_gpu_hint">Типово використовується CPU. Режим GPU є експериментальним і може спричинити перезапуск SteamVR. Вибір скидається після перезапуску відстеження.</string> +</resources> diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml new file mode 100644 index 0000000000..05ff91a856 --- /dev/null +++ b/app/src/main/res/values-vi/strings.xml @@ -0,0 +1,2862 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="steamvr_recovery_title">Đồ họa SteamVR đã dừng</string> + <string name="steamvr_recovery_countdown">DroidDeck sẽ khởi động lại sau %1$d giây để đặt lại đồ họa và mở lại SteamVR. Game đang chạy sẽ bị đóng; tiến trình chưa lưu sẽ không thể khôi phục.</string> + <string name="steamvr_recovery_repeated">Lỗi đồ họa lại xuất hiện sau lần khởi động lại gần đây. Tự động khôi phục đã tạm dừng để tránh lặp vô hạn. Khởi động lại sẽ đóng game của bạn; tiến trình chưa lưu sẽ không thể khôi phục.</string> + <string name="steamvr_recovery_restart">Khởi động lại ngay</string> + <string name="steamvr_recovery_cancel">Giữ mở</string> + <string name="steamvr_recovery_restarting">Đang đặt lại đồ họa và mở lại SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck không thể tự khởi động lại. Hãy đóng hẳn ứng dụng rồi mở lại.</string> + <string name="app_name">DroidDeck</string> + <string-array name="loading_hints"> + <item>Lần chạy đầu tải Steam. Quá trình này có thể mất vài phút.</item> + <item>Theo mặc định, rời khỏi ứng dụng sẽ tạm dừng Steam; nó tiếp tục từ nơi bạn dừng lại khi bạn quay lại.</item> + <item>Tay cầm của bạn hiện ra như tay cầm Xbox 360. Nếu không, hãy dùng các nút điều khiển trên màn hình.</item> + </string-array> + <string-array name="loading_hints_desktop"> + <item>Lần chạy đầu thiết lập desktop. Quá trình này có thể mất vài phút.</item> + <item>Theo mặc định, rời khỏi ứng dụng sẽ tạm dừng phiên; nó tiếp tục từ nơi bạn dừng lại khi bạn quay lại.</item> + <item>Chạm hoạt động như touchpad: kéo để di chuyển con trỏ, chạm để nhấp.</item> + <item>Tay cầm của bạn hiện ra như tay cầm Xbox 360. Nếu không, hãy dùng các nút điều khiển trên màn hình.</item> + </string-array> + <string name="session_channel">Phiên</string> + <string name="session_channel_description">Hiển thị khi có phiên Steam hoặc desktop đang mở</string> + <string name="session_notification">Steam đang chạy</string> + <string name="session_notification_downloads">Đang tải Steam</string> + <string name="session_notification_paused">Phiên đã tạm dừng - nhấn Tiếp tục khi sẵn sàng</string> + <string name="resume_session">Tiếp tục</string> + <string name="suspend_now">Tạm dừng ngay</string> + <string name="stop_session">Dừng phiên</string> + <string name="frame_gen_title">Tạo khung hình</string> + <string name="frame_gen_hint">Chọn chế độ tạo khung hình</string> + <string name="frame_gen_off">Tắt</string> + <string name="frame_gen_winfg">Win-FG %1$d×</string> + <string name="frame_gen_lsfg">LSFG %1$d×</string> + <string name="frame_gen_lsfg_adaptive">LSFG thích ứng %1$d</string> + <string name="lsfg_needs_steam">Cần Lossless Scaling trên Steam</string> + <string name="lsfg_needs_install">Cài Lossless Scaling trong Steam hoặc nhập Lossless.dll</string> + <string name="lsfg_import">Nhập Lossless.dll…</string> + <string name="lsfg_using_steam">Đang dùng bản sao từ Steam</string> + <string name="lsfg_using_import">Đang dùng bản đã nhập</string> + <string name="lsfg_pick_title">Chọn Lossless.dll</string> + <string name="lsfg_imported">Đã nhập Lossless.dll</string> + <string name="lsfg_import_unchanged">Lossless.dll này đã đang được dùng</string> + <string name="lsfg_import_not_owned">Tài khoản Steam này không sở hữu Lossless Scaling</string> + <string name="lsfg_import_invalid">Tệp này không phải là Lossless.dll của Lossless Scaling</string> + <string name="lsfg_import_failed">Không thể chuẩn bị LSFG từ Lossless.dll này</string> + <string name="lsfg_problem_missing">LSFG cần Lossless Scaling từ Steam hoặc một Lossless.dll đã nhập</string> + <string name="lsfg_problem_failed">LSFG không thể chuẩn bị shader từ Lossless.dll</string> + <string name="hud_fg_unsupported">%1$s: không hỗ trợ</string> + <string name="hud_fg_failed">%1$s: engine lỗi</string> + <string name="hud_fg_needs_lossless">%1$s: cần Lossless Scaling</string> + <string name="hud_fg_starting">%1$s %2$s · đang khởi động</string> + <string name="second_library_import_hint">Thêm một thư viện Steam và quét để tìm game Windows. Game đã sở hữu dùng mục Steam của nó; phần còn lại trở thành shortcut ngoài Steam.</string> + <string name="game_env_title">Môi trường game</string> + <string name="game_env_hint">Biến môi trường cho game Proton.</string> + <string name="game_env_edit">Sửa</string> + <string name="game_env_shared">Tất cả game Proton</string> + <string name="game_env_scope">Hồ sơ</string> + <string name="game_env_app_id">ID ứng dụng Steam</string> + <string name="game_env_open">Mở</string> + <string name="game_env_profile">Game %1$s</string> + <string name="game_env_add">Thêm biến</string> + <string name="game_env_name">Tên biến</string> + <string name="game_env_value">Giá trị</string> + <string name="game_env_save">Lưu</string> + <string name="game_env_remove">Xóa</string> + <string name="game_env_restore">Kế thừa lại</string> + <string name="game_env_reset">Xóa các ghi đè môi trường</string> + <string name="game_env_unset">Bỏ đặt cho hồ sơ này</string> + <string name="game_env_empty">Chưa có biến nào được đặt.</string> + <string name="game_env_inherited">Được kế thừa</string> + <string name="game_env_custom">Biến tùy chỉnh</string> + <string name="game_env_error">Không thể tải hoặc lưu. Kiểm tra dung lượng trống và thử lại.</string> + <string name="game_env_invalid">Dùng tên hợp lệ và giá trị tối đa 8192 ký tự.</string> + <string name="game_env_unused">Runtime Proton chuẩn không đọc biến này.</string> + <string name="game_env_loading">Đang tải…</string> + <string name="game_env_feature">Ghi đè cấp tính năng D3D12. 12_2 báo cáo khả năng DirectX 12 Ultimate; các tính năng không được hỗ trợ có thể gây lỗi. Để trống để tự động phát hiện.</string> + <string name="game_env_shader">Ghi đè shader model D3D12. 6_9 cần VKD3D đủ mới và tính năng GPU phù hợp. Để trống để tự động phát hiện.</string> + <string name="game_env_cache">Giữ bộ nhớ đệm shader của Mesa luôn bật để giảm biên dịch lặp lại. false sẽ bật bộ nhớ đệm.</string> + <string name="game_env_cache_size">Kích thước tối đa của bộ nhớ đệm shader Mesa, ví dụ 1G. Bộ nhớ đệm lớn hơn dùng nhiều dung lượng hơn.</string> + <string name="game_env_vkd3d_config">Tùy chọn VKD3D cho D3D12. nodxr tắt dò tia; chỉ dùng cho game cần nó.</string> + <string name="game_env_proton_log">Đặt thành 1 để có log chẩn đoán Proton. Ghi log có thể giảm hiệu năng và dùng dung lượng.</string> + <string name="game_env_wined3d">Đặt thành 1 để dùng WineD3D dựa trên OpenGL thay cho DXVK khi kiểm tra tương thích D3D9–11.</string> + <string name="game_env_no_ntsync">Đặt thành 1 để giữ game này không dùng ntsync (droiddeck-ntsync hoặc driver kernel); nó sẽ dùng droiddeck-esync nếu có pack phù hợp, nếu không thì droiddeck-fsync.</string> + <string name="game_env_no_esync">Đặt thành 1 để tắt droiddeck-esync cho game này; nó sẽ dùng droiddeck-fsync thay vào đó, hoặc droiddeck-ntsync nếu fsync cũng tắt.</string> + <string name="game_env_no_fsync">Đặt thành 1 để giữ game này không dùng droiddeck-fsync; nó sẽ dùng droiddeck-esync nếu có pack phù hợp, nếu không thì droiddeck-ntsync.</string> + <string name="game_env_fsync_first">Đặt thành 1 để chạy game này trên droiddeck-fsync, hoặc 0 để ưu tiên droiddeck-esync nếu có pack phù hợp với Proton.</string> + <string name="game_env_xalia">Đặt thành 0 để tắt trình hỗ trợ điều hướng bằng tay cầm của Proton cho game này.</string> + <string name="game_env_hud">Lớp phủ DXVK cho D3D9–11. fps hiển thị tốc độ khung hình; để trống để ẩn.</string> + <string name="game_env_dxvk_config">Các thiết lập DXVK ngăn cách bằng dấu chấm phẩy. Các bản build gần đây dùng dxvk.maxFrameRate để giới hạn khung hình; nên dùng bộ giới hạn khung hình của phiên khi chơi thông thường.</string> + <string name="game_env_vkd3d_limit">Giới hạn tốc độ khung hình D3D12. 0 tắt giới hạn.</string> + <string name="game_env_glthread">Luồng OpenGL của Mesa. true có thể giúp các game OpenGL bị giới hạn bởi CPU; hãy thử trên từng game.</string> + <string name="sync_backend_title">Đồng bộ Wine</string> + <string name="sync_backend_hint">Cách game giữ các luồng đồng bộ. Áp dụng từ phiên sau.</string> + <string name="sync_backend_esync">esync</string> + <string name="sync_backend_ntsync">ntsync</string> + <string name="sync_backend_fsync">fsync</string> + <string name="sync_backend_wineserver">wineserver</string> + <string name="fex_preset_title">Thiết lập trước FEX</string> + <string name="fex_next_launch">Áp dụng vào lần khởi chạy game kế tiếp.</string> + <string name="game_settings_title">Game</string> + <string name="fex_default_label">Mặc định FEX</string> + <string name="fex_default_detail">Dùng thiết lập mặc định của FEX.</string> + <string name="fex_stability_label">Ổn định</string> + <string name="fex_stability_detail">Thiết lập an toàn nhất, chậm nhất.</string> + <string name="fex_compatibility_label">Tương thích</string> + <string name="fex_compatibility_detail">TSO đầy đủ với multiblock.</string> + <string name="fex_intermediate_label">Trung bình</string> + <string name="fex_intermediate_detail">TSO cân bằng với độ chính xác x87 giảm.</string> + <string name="fex_performance_label">Hiệu năng</string> + <string name="fex_performance_detail">Tắt toàn bộ TSO; multiblock.</string> + <string name="fex_performance_tso_label">Hiệu năng + TSO</string> + <string name="fex_performance_tso_detail">Thiết lập hiệu năng với TSO chính được bật.</string> + <string name="fex_extreme_label">Cực hạn</string> + <string name="fex_extreme_detail">Tắt kiểm tra mã tự sửa đổi. Game dùng JIT và DRM có thể lỗi.</string> + <string name="fex_extreme_tso_label">Cực hạn + TSO</string> + <string name="fex_extreme_tso_detail">Thiết lập cực hạn với TSO chính được bật.</string> + <string name="fex_extreme_gn_label">Cực hạn-gn</string> + <string name="fex_extreme_gn_detail">Hiệu năng với gợi ý TSC và metadata. Thử trước khi dùng Cực hạn.</string> + <string name="fex_denuvo_label">Denuvo</string> + <string name="fex_denuvo_detail">Hiệu năng với kiểm tra mã đầy đủ và ẩn bit hypervisor.</string> + <string name="game_env_custom_value">Giá trị tùy chỉnh</string> + <string name="game_env_select_value">Chọn giá trị</string> + <string name="user_apps_section">Trình giả lập & ứng dụng</string> + <string name="user_apps_add">Thêm</string> + <string name="user_apps_add_detail">Ứng dụng hoặc game của riêng bạn</string> + <string name="user_apps_kind_script">Script</string> + <string name="user_apps_kind_appimage">AppImage</string> + <string name="user_apps_kind_flatpak">Flatpak</string> + <string name="user_apps_progress">%1$s · %2$s</string> + <string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string> + <string name="user_apps_starting">Đang khởi động…</string> + <string name="user_apps_added">Đã thêm %1$s</string> + <string name="user_apps_removed">Đã xóa %1$s</string> + <string name="user_apps_back">Desktop</string> + <string name="user_apps_gone">Ứng dụng đó không còn nữa. Chọn lại từ Desktop.</string> + <string name="user_apps_open">Mở %1$s</string> + <string name="user_apps_remove">Xóa</string> + <string name="user_apps_remove_confirm">Nhấn lại để xóa</string> + <string name="user_apps_stop_session">Dừng phiên để xóa</string> + <string name="user_apps_script_linked">Chạy %1$s từ thư mục của nó, được liên kết vào phiên tại chính vị trí đó. Xóa ứng dụng sẽ không ảnh hưởng đến thư mục đó.</string> + <string name="user_apps_script_copied">Chạy %1$s từ một bản sao thư mục của nó bên trong DroidDeck. Xóa ứng dụng sẽ xóa bản sao, không phải bản gốc.</string> + <string name="user_apps_runtime_required">Cài runtime Linux trước</string> + <string name="user_apps_file_gone">Tệp không còn tồn tại</string> + <string name="user_apps_no_space">Không đủ dung lượng trống: sao chép thư mục cần %1$s</string> + <string name="user_apps_copying">Đang sao chép %1$s</string> + <string name="user_apps_failed">Thêm ứng dụng không thành công</string> + <string name="user_apps_github_checking">Đang tìm bản phát hành của %1$s</string> + <string name="user_apps_github_unreachable">Không thể đọc bản phát hành của %1$s</string> + <string name="user_apps_github_no_appimage">Không có bản phát hành nào của %1$s có AppImage ARM64 hoặc x86_64</string> + <string name="user_apps_downloading">Đang tải %1$s</string> + <string name="user_apps_download_failed">Tải xuống không thành công</string> + <string name="user_apps_update_failed">Cập nhật ứng dụng không thành công</string> + <string name="user_apps_icon_failed">Không thể đọc biểu tượng đó</string> + <string name="user_apps_saved">Đã lưu %1$s</string> + <string name="user_apps_edit">Sửa</string> + <string name="user_apps_check_updates">Kiểm tra cập nhật</string> + <string name="user_apps_checking_updates">Đang kiểm tra cập nhật…</string> + <string name="user_apps_update_to">Cập nhật lên %1$s</string> + <string name="user_apps_up_to_date">Đã mới nhất · %1$s</string> + <string name="user_apps_updated">Đã cập nhật %1$s</string> + <string name="user_apps_github_version">%1$s · %2$s</string> + <string name="add_app_title">Thêm ứng dụng</string> + <string name="add_app_tab_script">Script</string> + <string name="add_app_tab_appimage">AppImage</string> + <string name="add_app_tab_github">GitHub</string> + <string name="add_app_tab_flatpak">Flatpak</string> + <string name="add_app_script_hint">Một tệp .sh. Nó chạy từ thư mục của chính nó, toàn màn hình dưới gamescope.</string> + <string name="add_app_appimage_hint">Một AppImage ARM64 (aarch64), hoặc một bản x86_64 chạy qua FEX. Nó được giải nén vào runtime Linux một lần.</string> + <string name="add_app_github_hint">Cài AppImage ARM64 từ bản phát hành mới nhất của repository, hoặc bản x86_64 của nó qua FEX.</string> + <string name="app_fex_title">Dùng FEX</string> + <string name="app_fex_auto">Tự động</string> + <string name="app_fex_on">Bật</string> + <string name="app_fex_off">Tắt</string> + <string name="app_fex_hint">FEX chạy các chương trình Linux x86 trên thiết bị ARM64 này. Tự động sẽ dùng nó khi chương trình được build cho x86.</string> + <string name="app_fex_x86">%1$s qua FEX</string> + <string name="app_fex_not_ready">Chương trình này được build cho PC %1$s và chạy qua FEX, hiện chưa được thiết lập. Mở Steam một lần khi đã đăng nhập: DroidDeck sẽ tải FEX và Steam Linux Runtime cần thiết, sau đó ứng dụng này sẽ mở.</string> + <string name="session_end_program">Chương trình này</string> + <string name="session_end_fex_missing">%1$s được build cho PC x86 và chạy qua FEX, hiện chưa được cài. Khởi động Steam một lần khi đã đăng nhập và để nó tải FEX cùng Steam Linux Runtime, sau đó khởi động lại ứng dụng này.</string> + <string name="add_app_flatpak_hint">Một app ID Flathub hoặc trang Flathub của nó. Flatpak sẽ được thiết lập trước nếu chưa có.</string> + <string name="add_app_file">Tệp</string> + <string name="add_app_no_file">Chưa chọn tệp</string> + <string name="add_app_choose_file">Chọn tệp</string> + <string name="add_app_change_file">Đổi</string> + <string name="add_app_pick_script">Chọn một script</string> + <string name="add_app_pick_appimage">Chọn một AppImage</string> + <string name="add_app_pick_icon">Chọn một biểu tượng</string> + <string name="add_app_repository">Repository</string> + <string name="add_app_repository_placeholder">owner/repo hoặc một liên kết github.com</string> + <string name="add_app_repository_invalid">Không phải một repository GitHub</string> + <string name="add_app_flatpak_id">ID ứng dụng</string> + <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> + <string name="add_app_flatpak_invalid">Không phải một app ID Flathub</string> + <string name="add_app_flatpak_bundle_hint">Hoặc một tệp .flatpak, cho ứng dụng không có trên Flathub.</string> + <string name="add_app_pick_flatpak">Chọn một tệp .flatpak</string> + <string name="add_app_source">Nguồn</string> + <string name="add_app_appearance">Trên Desktop của bạn</string> + <string name="add_app_preview_name">Ứng dụng mới</string> + <string name="add_app_name">Tên</string> + <string name="add_app_name_placeholder">Từ ứng dụng</string> + <string name="add_app_icon">Biểu tượng</string> + <string name="add_app_icon_default">Biểu tượng mặc định</string> + <string name="add_app_choose_icon">Chọn biểu tượng</string> + <string name="add_app_clear_icon">Xóa</string> + <string name="add_app_icon_suggestions">Từ repository</string> + <string name="add_app_icon_searching">Đang tìm biểu tượng…</string> + <string name="add_app_icon_reset">Mặc định</string> + <string name="edit_app_title">Sửa %1$s</string> + <string name="edit_app_save">Lưu</string> + <string name="add_app_checking_folder">Đang kiểm tra thư mục…</string> + <string name="add_app_folder_linked">Thư mục của nó được liên kết vào phiên: %1$s</string> + <string name="add_app_folder_copied">Thư mục của nó chứa các chương trình Linux, mà bộ nhớ dùng chung không thể chạy, nên nó được sao chép vào DroidDeck (%1$s).</string> + <string name="add_app_confirm">Thêm</string> + <string name="add_app_cancel">Hủy</string> + <string name="add_app_runtime_required">Cài runtime Linux từ Thiết lập trước.</string> + <string name="add_app_busy">Đợi %1$s hoàn tất.</string> + <string name="steam_compat_label">Tương thích</string> + <string name="proton_compatible_note">Các bản build được đánh dấu “%1$s” trong menu Compatibility của Steam có các bản sửa prefix của DroidDeck và chạy game được ở đây. Mặc định là Proton Experimental ARM64 (%1$s), hoặc Proton 11.0 ARM64 (%1$s) khi bản mới hơn đó đã được cài. Các mục Proton gốc của Valve không có dấu này không thể chạy game trên thiết bị này.</string> + <string name="proton_installed_compatible">Đã cài %1$s · %2$s</string> + <string name="common_cancel">Hủy</string> + <string name="common_auto">Tự động</string> + <string name="common_never">Không bao giờ</string> + <string name="common_always">Luôn luôn</string> + <string name="common_uninstall">Gỡ cài đặt</string> + <string name="common_check">Kiểm tra</string> + <string name="common_update">Cập nhật</string> + <string name="common_checking">Đang kiểm tra…</string> + <string name="common_working">Đang xử lý…</string> + <string name="common_forget">Quên</string> + <string name="common_add_ellipsis">Thêm…</string> + <string name="common_use">Dùng</string> + <string name="common_applies_next_session">Áp dụng từ phiên sau.</string> + <string name="mode_steam_title">Phiên Steam</string> + <string name="mode_desktop_title">Phiên Desktop</string> + <string name="mode_display">Hiển thị</string> + <string name="mode_resolution">Độ phân giải</string> + <string name="mode_res_720">Tối đa 720p</string> + <string name="mode_res_900">Tối đa 900p</string> + <string name="mode_res_1080">Tối đa 1080p</string> + <string name="mode_res_native">Gốc</string> + <string name="mode_res_default">%1$s (mặc định)</string> + <string name="mode_res_custom_value">Tùy chỉnh · %1$d×%2$d</string> + <string name="mode_res_custom">Tùy chỉnh…</string> + <string name="mode_res_note">720p có thể giúp menu phản hồi nhanh hơn.</string> + <string name="mode_ratio">Tỷ lệ màn hình</string> + <string name="mode_ratio_custom">Được đặt theo độ phân giải tùy chỉnh.</string> + <string name="mode_ratio_auto">Tự động dùng tối thiểu 16:9.</string> + <string name="mode_fps">Giới hạn khung hình</string> + <string name="mode_fps_note">Giới hạn toàn bộ phiên. Màn hình chuyển sang tốc độ làm mới mà giới hạn chia hết.</string> + <string name="mode_hdr">HDR</string> + <string name="mode_hdr10">Xuất HDR10</string> + <string name="mode_hdr_unavailable">Không khả dụng: %1$s.</string> + <string name="mode_hdr_restart">Khởi động lại ứng dụng để áp dụng.</string> + <string name="mode_drivers">Driver</string> + <string name="mode_gpu_drivers">Driver GPU</string> + <string name="mode_gpu_drivers_hint">Dùng chung cho Steam và Desktop. Đặt ở trang Components.</string> + <string name="mode_touch_controls">Chạm & điều khiển</string> + <string name="mode_touch">Chạm</string> + <string name="mode_touch_touchpad">Touchpad</string> + <string name="mode_touch_direct">Trực tiếp</string> + <string name="mode_touch_note">Tự động: touchpad ở Desktop, trực tiếp ở Steam.</string> + <string name="mode_osc">Điều khiển trên màn hình</string> + <string name="mode_osc_qam">Steam + QAM</string> + <string name="mode_osc_note">Tự động hiện các nút điều khiển khi không có tay cầm kết nối.</string> + <string name="osc_steam_touch">Chạm Steam (beta)</string> + <string name="osc_style_next_session">Các nút chạm của Steam bắt đầu từ phiên Steam kế tiếp</string> + <string name="osc_steam_layout">Bố cục chạm Steam</string> + <string name="osc_steam_layout_hint">Di chuyển, đổi kích thước hoặc ẩn các nút chạm của game này; được lưu vào Steam</string> + <string name="mode_controller">Tay cầm</string> + <string name="mode_controller_hint">Cách Steam nhận dạng tay cầm của bạn. Áp dụng từ phiên sau.</string> + <string name="mode_controller_deck">Tay cầm Steam Deck</string> + <string name="mode_controller_steam">Steam Controller</string> + <string name="mode_controller_ds4">DualShock 4</string> + <string name="mode_controller_dualsense">DualSense</string> + <string name="mode_controller_x360">Tay cầm Xbox 360</string> + <string name="mode_controller_note">Deck: nút Quick Access và con quay hồi chuyển. Steam Controller: tương tự, cộng với cảm biến nắm ở các nút phía sau. DualShock 4 và DualSense: con quay hồi chuyển, và touchpad dùng làm bàn di chuột. Xbox 360: mở Quick Access bằng Guide+A.</string> + <string name="mode_back">Quay lại</string> + <string name="back_menu_then_qam">Menu → QAM</string> + <string name="back_qam_then_menu">QAM → Menu</string> + <string name="mode_session">Phiên</string> + <string name="mode_suspend">Hành vi khi ở nền</string> + <string name="mode_suspend_hint">Khi ứng dụng bị ẩn hoặc màn hình tắt.</string> + <string name="mode_suspend_manual">Thủ công</string> + <string name="mode_suspend_native">Gốc</string> + <string name="mode_suspend_steam_note">Tự động tạm dừng và tiếp tục khi được hiển thị lại. Gốc chuẩn bị Steam để ngủ trước. Thủ công chờ nhấn Tiếp tục. Không bao giờ giữ nó luôn chạy.</string> + <string name="mode_background_downloads">Giữ tải xuống tiếp tục chạy</string> + <string name="mode_background_downloads_hint">Trì hoãn tạm dừng nền khi Steam đang tải xuống.</string> + <string name="mode_zram">Nén zRAM</string> + <string name="mode_zram_hint">Khi chơi, bộ nhớ của ứng dụng Steam được nén vào zram của thiết bị để game có thêm RAM. Áp dụng từ lần khởi động Steam tiếp theo.</string> + <string name="mode_zram_unsupported">Không khả dụng: thiết bị không có zram hoặc swap, hoặc nhân cũ hơn 5.4.</string> + <string name="mode_suspend_note">Tự động tạm dừng ở nền và tiếp tục khi hiển thị lại. Thủ công chờ nhấn Tiếp tục. Không bao giờ giữ nó luôn chạy.</string> + <string name="mode_startup">Khởi động</string> + <string name="mode_steam_startup">Khởi động Steam cùng DroidDeck</string> + <string name="mode_steam_startup_hint">Mở phiên Steam khi DroidDeck khởi chạy.</string> + <string name="mode_decky">Decky</string> + <string name="mode_decky_checking">Đang kiểm tra bản phát hành…</string> + <string name="mode_decky_ready">Sẵn sàng cài %1$s.</string> + <string name="mode_decky_none">Không tìm thấy bản build tương thích. Hãy thử lại sau.</string> + <string name="mode_decky_installed">Đã cài · %1$s</string> + <string name="mode_decky_update">Có cập nhật · %1$s</string> + <string name="mode_decky_current">Đã mới nhất · %1$s</string> + <string name="mode_decky_loader">Loader</string> + <string name="mode_decky_install_latest">Cài bản mới nhất</string> + <string name="mode_decky_on">Khởi động cùng Steam. Khi đang bật, các ứng dụng khác trên thiết bị này có thể điều khiển được Steam.</string> + <string name="mode_decky_off">Tắt. Cổng gỡ lỗi từ xa của Steam luôn đóng.</string> + <string name="mode_decky_remove_title">Gỡ cài đặt Decky Loader?</string> + <string name="mode_decky_remove_text">Gỡ bỏ loader. Plugin và thiết lập của bạn được giữ lại.</string> + <string name="mode_client">Client</string> + <string name="mode_mangoapp">Lớp phủ hiệu năng</string> + <string name="mode_mangoapp_hint">Tắt nếu game bị crash hoặc màn hình đen ở Chế độ Deck. Áp dụng từ phiên sau.</string> + <string name="mode_steam_repair">Sửa chữa client Steam</string> + <string name="mode_steam_repair_hint">Tải lại client Steam vào lần Steam khởi động kế tiếp. Dùng khi Steam bị kẹt ở màn hình tải. Game, đăng nhập và thiết lập được giữ lại.</string> + <string name="mode_steam_repair_queued">Client Steam sẽ được tải lại vào lần Steam khởi động kế tiếp.</string> + <string name="mode_steam_repair_button">Sửa chữa</string> + <string name="mode_added_art">Hình ảnh</string> + <string name="mode_sgdb_key">API key SteamGridDB</string> + <string name="mode_sgdb_key_yours">Key của bạn</string> + <string name="mode_sgdb_edit">Sửa…</string> + <string name="mode_added_art_hint">Điền hình ảnh còn thiếu từ Steam, sau đó từ SteamGridDB. Tệp cover.jpg, hero.jpg, logo.png hoặc icon.png của riêng bạn trong thư mục game được ưu tiên.</string> + <string name="summary_remove_game">Xóa %1$s</string> + <string name="mode_added_remove_confirm">Xóa?</string> + <string name="games_add">Thêm game</string> + <string name="games_add_title">Thêm một game:</string> + <string name="games_pick_exe_title">Chọn tệp exe:</string> + <string name="games_add_unreachable">Vị trí này không khả dụng trong phiên</string> + <string name="mode_added_exe_check">Kiểm tra tệp exe này</string> + <string name="wincomp_title">Thành phần Windows</string> + <string name="wincomp_pad_hint">LB / RB để chuyển giữa các mục.</string> + <string name="wincomp_card_none">Không có</string> + <string name="wincomp_applies">Các DLL Windows mà Proton không bao gồm, từ danh sách thành phần. Bật những thành phần game này cần: chúng được đặt vào thư mục Windows riêng của game, không phải tệp của nó, và được giữ lại dù nó chạy trên Proton nào.</string> + <string name="wincomp_offline">Không thể kết nối danh sách thành phần. Các thành phần đã tải trước đó vẫn có thể chuyển đổi.</string> + <string name="wincomp_recommended">Được đề xuất cho game này</string> + <string name="wincomp_checking">Đang kiểm tra game này cần gì…</string> + <string name="wincomp_when_online">Khả dụng khi có mạng</string> + <plurals name="wincomp_turning_on"> + <item quantity="other">Đang bật %1$d thành phần…</item> + </plurals> + <string name="wincomp_auto_section">Đang bật cho game này</string> + <string name="wincomp_auto_steam">Steam cài %1$s cùng %2$s (app %3$s)</string> + <string name="wincomp_auto_gog">Từ danh sách của GOG cho game này</string> + <string name="wincomp_auto_epic">Từ các yêu cầu của Epic cho game này</string> + <string name="wincomp_auto_amazon">Từ các bước cài đặt của Amazon cho game này</string> + <string name="wincomp_steam_by_name">Steam cài %1$s cùng app %2$s, khớp theo tên</string> + <string name="wincomp_suggestions">Cũng được liệt kê</string> + <string name="wincomp_suggestion_reason">Được %1$s liệt kê; không phải thành phần ở đây</string> + <string name="wincomp_src_steam">Steam</string> + <string name="wincomp_src_gog">GOG</string> + <string name="wincomp_src_epic">Epic Games</string> + <string name="wincomp_src_amazon">Amazon Games</string> + <string name="wincomp_found_bundled">Game đi kèm %1$s</string> + <string name="wincomp_found_shipped">Game có %1$s (thường hoạt động được ngay)</string> + <string name="wincomp_already_here">Đã có trong game này</string> + <string name="wincomp_no_recommendation">Không có gì trong thư mục game chỉ đến một thành phần.</string> + <string name="wincomp_active">Đã cài cho game này (%1$d)</string> + <string name="wincomp_all">Tất cả thành phần (%1$d)</string> + <string name="wincomp_installers">Cần bộ cài Windows (%1$d)</string> + <string name="wincomp_installers_note">Đây là các chương trình cài đặt riêng, không có gói bên trong để phân tích, và chưa có ghi nhận về những gì chúng cài. Hầu hết là các runtime cũ mà Mono trong Proton đã thay thế; các ghi nhận được bổ sung khi có.</string> + <string name="wincomp_show">Hiện</string> + <string name="wincomp_hide">Ẩn</string> + <string name="wincomp_needs_installer">Chạy chương trình cài đặt riêng (chưa có ghi nhận)</string> + <string name="wincomp_unsupported">Chưa được hỗ trợ ở đây</string> + <string name="wincomp_loading">Đang tải các thành phần…</string> + <string name="wincomp_failed">Không thể cài: %1$s</string> + <string name="wincomp_downloaded">Đã tải</string> + <string name="wincomp_downloading">Đang tải %1$s</string> + <string name="wincomp_installing">Đang cài: %1$s</string> + <string name="wincomp_reverting">Đang tắt…</string> + <string name="wincomp_download_size">Tải %1$s</string> + <string name="wincomp_next_launch">Có hiệu lực vào lần game khởi động kế tiếp.</string> + <string name="mode_stretch169">Kéo giãn game 16:9</string> + <string name="mode_stretch169_hint">Trên màn hình vuông hơn 16:9, kéo giãn game để lấp đầy thay vì hiện viền đen. Áp dụng từ phiên sau.</string> + <string name="mode_audio">Âm thanh</string> + <string name="mode_directaudio">DirectAudio cho game</string> + <string name="mode_directaudio_hint">Bỏ qua PulseAudio để giảm độ trễ.</string> + <string name="mode_mic">Microphone</string> + <string name="mode_mic_hint">Dùng cho chat bằng giọng nói.</string> + <string name="mode_network">Mạng</string> + <string name="mode_wifi_discovery">Dò tìm Wi-Fi</string> + <string name="mode_wifi_discovery_hint">Hiện tên Wi-Fi và các mạng gần đó trong Steam.</string> + <string name="mode_wifi_location_off">Dịch vụ vị trí đang tắt.</string> + <string name="mode_wifi_permission_denied">Chưa cấp quyền vị trí.</string> + <string name="mode_wifi_open_settings">Mở thiết lập</string> + <string name="mode_wifi_continue">Tiếp tục</string> + <string name="mode_wifi_explain_title">Bật dò tìm Wi-Fi?</string> + <string name="mode_wifi_explain_text">Android yêu cầu quyền Vị trí để đọc tên Wi-Fi và dò tìm các mạng gần đó. DroidDeck dùng quyền này để hiện các mạng đó trong Steam. Chúng tôi không theo dõi vị trí của bạn. Truy cập Internet vẫn hoạt động mà không cần quyền này.</string> + <string name="mode_storage">Lưu trữ game</string> + <string name="mode_storage_auto">Tự động - thẻ SD khi có, cùng các thư mục Games của bạn</string> + <string name="mode_storage_auto_none">Tự động - các thư mục Games của bạn, cùng thẻ SD khi có (hiện không có)</string> + <string name="mode_storage_internal">Chỉ bộ nhớ trong</string> + <string name="mode_storage_folder">Thư mục: %1$s</string> + <string name="mode_second_library">Thư viện thứ hai</string> + <string name="mode_storage_note">Game truyền dữ liệu từ thẻ SD hoặc bộ nhớ dùng chung có thể bị giật.</string> + <string name="mode_storage_diagnostics">Chẩn đoán lưu trữ</string> + <string name="mode_storage_diagnostics_hint">Ghi lại kết quả cấp phát và thời gian lưu trữ mẫu vào Share logs. Có thể làm chậm cài đặt khi đang bật. Áp dụng từ phiên sau.</string> + <string name="mode_choose_folder">Chọn một thư mục…</string> + <string name="mode_custom_res_title">Độ phân giải tùy chỉnh</string> + <string name="mode_custom_res_text">Thay thế giới hạn và tỷ lệ. Kích thước không khớp màn hình sẽ có viền đen.</string> + <string name="mode_width">Chiều rộng</string> + <string name="mode_height">Chiều cao</string> + <string name="mode_custom_res_range">Từ 320×240 đến 3840×2160.</string> + <plurals name="mode_added_count"> + <item quantity="other">%1$d game</item> + </plurals> + <string name="common_ok">OK</string> + <string name="common_delete">Xóa</string> + <string name="common_restore">Khôi phục</string> + <string name="common_download">Tải xuống</string> + <string name="common_delete_named">Xóa %1$s</string> + <string name="common_size_mb">%1$.1f MB</string> + <string name="comp_runtime_driver">Driver runtime</string> + <string name="comp_runtime_driver_hint">Dùng bởi Steam, game và desktop. Áp dụng từ phiên sau.</string> + <string name="comp_import_turnip">Nhập tệp zip Turnip…</string> + <string name="comp_display_driver">Driver hiển thị</string> + <string name="comp_display_driver_hint">Vẽ khung hình lên màn hình ở cả hai chế độ. Khởi động lại ứng dụng để áp dụng.</string> + <string name="comp_import_adrenotools">Nhập tệp zip AdrenoTools…</string> + <string name="comp_never">chưa bao giờ</string> + <string name="comp_nightlies_checked">Đã kiểm tra Nightlies %1$s</string> + <string name="comp_title">Thành phần</string> + <string name="comp_about">Về Thành phần</string> + <string name="comp_check_drivers">Kiểm tra driver mới</string> + <string name="comp_check_nightlies">Kiểm tra Nightlies để tìm gói mới</string> + <string name="comp_proton">Proton</string> + <string name="comp_proton_note">Proton được chọn ở đây chạy mọi game chưa chọn Proton riêng trong Steam, và một thay đổi thực hiện trong Steam cũng hiện ở đây. Steam thay thế Proton của Valve khi nó cập nhật; các bản gốc được giữ lại theo từng build.</string> + <string name="comp_scope">Cấu hình</string> + <string name="comp_profile_configure">Cấu hình hồ sơ</string> + <string name="comp_profile">Hồ sơ</string> + <string name="comp_scope_general">Hồ sơ mặc định</string> + <string name="comp_scope_general_detail">Được dùng tự động cho game không có ghi đè.</string> + <string name="comp_profile_game_detail">Thiết lập đã lưu được dùng tự động khi %1$s khởi chạy.</string> + <string name="comp_game_hint">Chỉ chọn những thiết lập game này cần. Mọi thứ khác tiếp tục dùng Hồ sơ mặc định.</string> + <string name="comp_game_fex">Thiết lập trước FEX</string> + <string name="comp_game_fex_inherited">Đang dùng thiết lập trước của Hồ sơ mặc định.</string> + <string name="comp_game_fex_override">Thiết lập trước tùy chỉnh đã lưu cho game này.</string> + <string name="comp_game_fex_custom">Biến FEX tùy chỉnh</string> + <string name="comp_game_use_general">Dùng Mặc định</string> + <string name="comp_game_compatibility">Tương thích game</string> + <string name="comp_game_environment_hint">Các tùy chọn môi trường Proton, DXVK, VKD3D và đồng bộ hóa cho game này.</string> + <string name="comp_game_proton_inherited">Đang dùng Proton của Hồ sơ mặc định.</string> + <string name="comp_game_proton_override">Proton tùy chỉnh đã lưu cho game này qua ánh xạ tương thích của Steam.</string> + <string name="comp_no_proton_short">Không có Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Dùng gói của Hồ sơ mặc định từ %1$s trừ khi game này chọn gói khác.</string> + <string name="comp_game_component_general">Dùng gói thành phần của Hồ sơ mặc định.</string> + <string name="comp_game_component_override">Chỉ dùng %1$s cho game này.</string> + <string name="comp_game_runtime_options">Tùy chọn runtime</string> + <string name="comp_game_environment_other_hint">Các tùy chọn môi trường Proton, DXVK, VKD3D-Proton và đồng bộ hóa khác cho từng game.</string> + <string name="comp_game_saved_next">Hồ sơ của %1$s được lưu cho lần khởi chạy game kế tiếp.</string> + <string name="game_no_steam_title">Khởi động không cần Steam</string> + <string name="game_no_steam_detail">Mở trong Proton/FEX mà không có ứng dụng Steam; các tính năng Steam bị tắt.</string> + <string name="game_no_steam_on">Bật</string> + <string name="game_steam_with">Khởi động cùng Steam</string> + <string name="game_steam_without">Khởi động không cần Steam</string> + <string name="game_settings_card">Thiết lập</string> + <string name="game_settings_menu_title">Thiết lập %1$s</string> + <string name="game_settings_default">Mặc định</string> + <string name="game_settings_default_detail">Đưa mọi thứ đã thay đổi cho trò chơi này về thiết lập của ứng dụng.</string> + <string name="game_sync_custom">Biến đồng bộ tùy chỉnh</string> + <string name="comp_game_proton_live">Lựa chọn Proton của %1$s đã được lưu và khả dụng ngay trong Steam.</string> + <string name="comp_game_proton_next">Lựa chọn Proton của %1$s đã được lưu. Khởi động lại Steam trước khi chạy game.</string> + <string name="comp_game_proton_not_runnable">%1$s không thể dùng Proton đã chọn trên thiết bị này.</string> + <string name="comp_game_load_failed">Không thể tải hồ sơ của %1$s: %2$s</string> + <string name="comp_game_save_failed">Không thể lưu hồ sơ game: %1$s</string> + <string name="comp_game_reset">Đặt lại hồ sơ game</string> + <string name="comp_game_reset_title">Đặt lại hồ sơ của %1$s?</string> + <string name="comp_game_reset_body">Xóa Proton, FEX, gói thành phần, môi trường, lọc texture và các ghi đè thành phần Windows của game này? Nó sẽ dùng Hồ sơ mặc định.</string> + <string name="comp_game_reset_done">%1$s giờ dùng Hồ sơ mặc định.</string> + <string name="comp_game_reset_failed">Không thể đặt lại hoàn toàn hồ sơ game: %1$s</string> + <string name="comp_default_live">%1$s giờ chạy mọi game chưa chọn Proton riêng trong Steam.</string> + <string name="comp_default_next">%1$s sẽ chạy mọi game chưa chọn Proton riêng, từ lần Steam khởi động kế tiếp.</string> + <string name="comp_default_not_runnable">%1$s không thể khởi chạy game ở đây, nên không thể là mặc định.</string> + <string name="comp_default_failed">Không thể lưu Proton mặc định: %1$s</string> + <string name="comp_swapped">%1$s · %2$d đã thay</string> + <string name="comp_all_original">%1$s · toàn bộ gốc</string> + <string name="comp_game_running_suffix">%1$s · game đang chạy</string> + <string name="comp_esync_pack">%1$s · pack droiddeck-esync</string> + <string name="comp_esync_wanted">%1$s · chưa có pack droiddeck-esync</string> + <string name="comp_esync_builtin">%1$s · esync có sẵn, không cần pack</string> + <string name="comp_gpu_drivers">Driver GPU</string> + <string name="comp_reapplied">%1$s · đã áp dụng lại lúc khởi chạy %2$s</string> + <string name="comp_next_queued">Tiếp theo: %1$s · sau khi game đóng</string> + <string name="comp_in_use">%1$s đang dùng: %2$s</string> + <string name="comp_waits">Chờ đến khi game đóng</string> + <string name="comp_applies_next_game">Áp dụng vào lần game khởi động kế tiếp</string> + <string name="comp_import_zip">Nhập tệp .zip</string> + <string name="comp_reading">Đang đọc Proton…</string> + <string name="comp_no_proton">Chưa cài Proton nào. Khởi động Steam một lần để tải Proton ARM64 của nó, hoặc thêm GE-Proton, CachyOS hay DroidDeck-Proton từ Thiết lập.</string> + <string name="comp_original">Gốc · %1$s</string> + <string name="comp_this_build">%1$s · build này</string> + <string name="comp_earlier_build">%1$s · build trước</string> + <string name="comp_installed_count">Đã cài · %1$d</string> + <string name="comp_nothing_stored">Chưa có gì được lưu cho %1$s. Các tệp gốc của Proton này được lưu làm bản gốc.</string> + <string name="comp_waits_long">Một game đang chạy trên Proton này, nên việc này chờ đến khi nó đóng.</string> + <string name="comp_applies_long">Áp dụng vào lần game khởi động kế tiếp.</string> + <string name="comp_swap_title">Thay %1$s?</string> + <string name="comp_swap_body">Đưa %1$s vào %2$s? Các tệp gốc của nó vẫn được giữ lại. %3$s</string> + <string name="comp_restore_title">Khôi phục %1$s?</string> + <string name="comp_restore_body">Đưa bản gốc %1$s trở lại %2$s? %3$s</string> + <string name="comp_delete_package_body">Xóa gói khỏi ứng dụng. Bạn có thể tải lại nó.</string> + <string name="comp_delete_original_title">Xóa bản gốc này?</string> + <string name="comp_delete_original_body">Bản gốc %1$s này là từ một build trước của %2$s. Bản gốc của build hiện tại luôn được giữ lại.</string> + <string name="comp_nightlies_count">Trên Nightlies · %1$d</string> + <string name="comp_refresh_to_list">Làm mới để liệt kê các gói trên Nightlies.</string> + <string name="comp_nothing_new">Không có gì mới từ lần kiểm tra trước.</string> + <string name="comp_import_wcp">Nhập tệp .wcp</string> + <string name="comp_restore_original">Khôi phục bản gốc của Proton này</string> + <string name="comp_restore_original_body">Đưa %2$s gốc của %1$s trở lại?</string> + <string name="comp_swap">Thay</string> + <string name="comp_about_text">FEX, DXVK và VKD3D-Proton cho mỗi Proton mà Steam dùng để chạy game.\n\nChọn một dòng đã cài để thay vào. Áp dụng vào lần game khởi động kế tiếp, hoặc sau khi game đang chạy đóng lại.\n\nCác lựa chọn của bạn được kiểm tra lại trước mỗi lần khởi chạy và được đặt lại nếu có gì thay đổi chúng. Các tệp gốc của mỗi Proton được giữ lại, nên các bản cập nhật Steam không bao giờ làm mất chúng.</string> + <string name="comp_tag_original">Gốc</string> + <string name="comp_tag_in_use">Đang dùng</string> + <string name="comp_tag_new">Mới</string> + <string name="comp_tag_stored">Đã lưu</string> + <string name="perf_title">Hiệu năng</string> + <string name="perf_lede">Lõi CPU, các bản sửa phiên và tên máy chủ. Áp dụng từ phiên sau.</string> + <string name="perf_client_cores_group">Lõi client Steam</string> + <string name="perf_override">Ghi đè lựa chọn lõi của Steam</string> + <string name="perf_override_hint">Ghim Steam, trình trợ giúp giao diện của nó và gamescope vào các lõi dưới đây.</string> + <string name="perf_client_cores">Lõi client</string> + <string name="perf_client_cores_on">Lõi dành cho Steam.</string> + <string name="perf_client_cores_off">Bật ghi đè để chọn.</string> + <string name="perf_game_cores_group">Lõi game</string> + <string name="perf_game_cores">Lõi game</string> + <string name="perf_game_cores_hint">Lõi dành cho game. Khi chọn tất cả, Android tự do lập lịch.</string> + <string name="perf_client_ui">Giao diện client</string> + <string name="perf_glthread">GL đa luồng</string> + <string name="perf_glthread_hint">Có thể giúp menu Steam phản hồi nhanh hơn.</string> + <string name="perf_zink">Zink: descriptor trễ (lazy)</string> + <string name="perf_zink_hint">Khuyến nghị cho driver không có descriptor buffer.</string> + <string name="perf_noglerror">Bỏ qua kiểm tra lỗi GL</string> + <string name="perf_noglerror_hint">Tắt kiểm tra hợp lệ GL theo từng lệnh gọi.</string> + <string name="perf_gsrealtime">gamescope: hàng đợi GPU thời gian thực</string> + <string name="perf_gsrealtime_hint">Ưu tiên công việc GPU của compositor. Có thể làm nhịp khung hình mượt hơn với một phần chi phí cho game.</string> + <string name="perf_gpu">GPU</string> + <string name="perf_gpuclock">Giữ GPU ở xung nhịp cao nhất</string> + <string name="perf_gpuclock_hint">Chỉ dành cho Adreno. Ít giật hơn, dùng nhiều pin và nhiệt hơn.</string> + <string name="perf_fixes">Các bản sửa phiên</string> + <string name="perf_sysmem">Turnip: render sysmem</string> + <string name="perf_sysmem_hint">Nhanh hơn cho Steam và hầu hết game. Bắt buộc trên Adreno 710/720/722.</string> + <string name="perf_xalia">Bỏ qua trình trợ giúp xalia của Steam</string> + <string name="perf_fastsync">droiddeck-ntsync (thử nghiệm)</string> + <string name="perf_fastsync_hint">Một bản thay thế ở không gian người dùng cho driver ntsync của Linux, dùng để thử nghiệm. Khi đang bật, Proton dùng nó thay cho droiddeck-esync và droiddeck-fsync. Hoạt động với Proton Experimental ARM64, GE-Proton và proton-cachyos. Áp dụng từ phiên sau.</string> + <string name="perf_esync">droiddeck-esync</string> + <string name="perf_fsync">droiddeck-fsync trước</string> + <string name="perf_fsync_hint">Chạy fsync riêng của Proton trên các tệp Proton gốc, với futex_waitv được cung cấp ở không gian người dùng, nên không cần pack và vẫn hoạt động ngay khi Steam cập nhật Proton. Khi đang bật, game dùng nó trước droiddeck-esync, trừ một số ít Proton giữ fsync tắt. Áp dụng từ phiên sau.</string> + <string name="perf_esync_hint">Các luồng Windows của game chờ nhau qua eventfd và bộ nhớ dùng chung, thay vì đi vòng qua wineserver. Dùng pack droiddeck-esync được làm riêng cho đúng bản build Proton đó; pack được tự động tải về. Cho đến khi có pack cho một bản build Proton mới, droiddeck-fsync sẽ thay thế. Áp dụng từ phiên sau.</string> + <string name="perf_xalia_hint">Tắt trình hỗ trợ điều hướng bằng tay cầm của Proton, vốn tốn CPU trong mọi game.</string> + <string name="perf_seccomp">Chạy proot không có seccomp</string> + <string name="perf_seccomp_hint">Có thể sửa lỗi thiếu syscall trên một số kernel. Có thể giảm hiệu năng.</string> + <string name="perf_fastpath">Fast path của proot</string> + <string name="perf_fastpath_needs_seccomp">Cần bộ lọc seccomp của proot.</string> + <string name="perf_fastpath_hint">Tra cứu tệp nhanh hơn và ít giật hơn. Tắt nếu một chương trình không tìm thấy tệp của nó.</string> + <string name="perf_identity">Danh tính phiên</string> + <string name="perf_hostname">Tên máy chủ</string> + <string name="perf_hostname_hint">Tên mà Steam thấy cho thiết bị này. Để trống để khôi phục %1$s.</string> + <string name="perf_hostname_invalid">Chỉ chữ, số và gạch ngang ở giữa, tối đa 63 ký tự.</string> + <string name="perf_phantom_warning">Android được đặt để tắt phiên này</string> + <string name="driver_installed">Đã cài</string> + <string name="driver_available">Có thể tải</string> + <string name="driver_nothing_new">Không có gì mới từ lần kiểm tra trước.</string> + <string name="driver_restore_builtin">Khôi phục driver tích hợp</string> + <string name="driver_delete_builtin">Được tích hợp trong ứng dụng: việc này xóa các tệp đã giải nén của nó và ẩn nó đi. Khôi phục driver tích hợp sẽ đưa nó trở lại.</string> + <string name="driver_delete_bundle">Một nửa của gói Android + Linux: cả hai nửa đều bị xóa. Driver đang dùng sẽ chuyển về mặc định.</string> + <string name="driver_delete_plain">Các tệp của nó bị xóa khỏi ứng dụng.</string> + <string name="driver_delete_in_use">Các tệp của nó bị xóa. Nó đang được dùng, nên mặc định sẽ thay thế.</string> + <string name="drawer_page_display">Hiển thị</string> + <string name="drawer_page_effects">Hiệu ứng</string> + <string name="drawer_page_controls">Điều khiển</string> + <string name="drawer_page_components">Thành phần</string> + <string name="drawer_page_controller">Tay cầm</string> + <string name="drawer_page_settings">Thiết lập</string> + <string name="drawer_page_desc">Trang %1$s</string> + <string name="drawer_steam">Steam</string> + <string name="drawer_desktop">Desktop</string> + <string name="drawer_steam_menu">Menu Steam</string> + <string name="drawer_quick_access">Truy cập nhanh</string> + <string name="drawer_open_qam">Mở Quick Access Menu</string> + <string name="drawer_prev_page">Trang trước</string> + <string name="drawer_next_page">Trang sau</string> + <string name="drawer_hud">HUD hiệu năng</string> + <string name="drawer_scaling">Chế độ chia tỷ lệ</string> + <string name="drawer_scaling_sharpness">Độ sắc nét khi chia tỷ lệ</string> + <string name="drawer_effects">Hiệu ứng màn hình</string> + <string name="drawer_effects_hint">Thời gian thực. Tốn một ít thời gian GPU khi có hiệu ứng đang bật.</string> + <string name="drawer_look">Thiết lập dựng sẵn</string> + <string name="drawer_look_custom">Tùy chỉnh</string> + <string name="drawer_effects_advanced">Nâng cao</string> + <string name="widgets_expanded">Mở rộng</string> + <string name="widgets_collapsed">Thu gọn</string> + <string name="drawer_cas">Làm nét (CAS)</string> + <string name="drawer_cas_level">Mức làm nét</string> + <string name="drawer_fake_hdr">HDR giả</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Chạy SteamVR</string> + <string name="steamvr_checking">Đang kiểm tra SteamVR…</string> + <string name="drawer_deband">Khử dải màu</string> + <string name="drawer_deband_strength">Cường độ khử dải màu</string> + <string name="drawer_brightness">Độ sáng</string> + <string name="drawer_contrast">Độ tương phản</string> + <string name="drawer_gamma">Gamma</string> + <string name="drawer_saturation">Độ bão hòa</string> + <string name="drawer_fxaa">FXAA (làm mượt cạnh)</string> + <string name="drawer_toon">Viền hoạt hình</string> + <string name="drawer_crt">CRT</string> + <string name="drawer_ntsc">NTSC</string> + <string name="drawer_texture">Lọc texture</string> + <string name="drawer_texture_hint">Game DirectX 9–11, từ lần khởi chạy kế tiếp.</string> + <string name="drawer_anisotropy">Lọc dị hướng (anisotropic)</string> + <string name="drawer_texture_sharpness">Độ sắc nét texture</string> + <string name="drawer_texture_sharpness_note">Một độ lệch mip âm: texture sắc nét hơn, có thể nhấp nháy nhẹ. Tự động khớp với mức phiên được phóng to so với màn hình.</string> + <string name="drawer_touch_auto">Tự động (%1$s)</string> + <string name="drawer_keyboard">Bàn phím</string> + <string name="drawer_latency">Độ trễ</string> + <string name="drawer_low_latency_controller">Tay cầm độ trễ thấp</string> + <string name="drawer_low_latency_controller_hint">Tay cầm báo cáo ở 1000 Hz thay vì 250 Hz. Tốn thêm một chút CPU.</string> + <string name="drawer_low_latency_touch">Cảm ứng độ trễ thấp</string> + <string name="drawer_low_latency_touch_hint">Cảm ứng bỏ qua việc gộp khung hình, nên điều khiển cảm ứng của Steam chạy ở 1000 Hz. Tốn thêm một chút CPU.</string> + <string name="drawer_pc_keyboard">Bàn phím PC</string> + <string name="drawer_android_keyboard">Android</string> + <string name="drawer_second_screen">Màn hình thứ hai</string> + <string name="drawer_second_screen_mode">Chế độ</string> + <string name="drawer_second_screen_shows">Hiển thị</string> + <string name="drawer_android_apps">Ứng dụng Android</string> + <string name="drawer_launch_app">Khởi chạy một ứng dụng</string> + <string name="common_hide">Ẩn</string> + <string name="common_show">Hiện</string> + <string name="drawer_no_apps">Không có ứng dụng nào để khởi chạy</string> + <string name="drawer_session_behavior">Hành vi phiên</string> + <string name="drawer_suspend_hint">Áp dụng ngay và cho các phiên sau ở chế độ này.</string> + <string name="drawer_next_session">Phiên sau</string> + <string name="drawer_support">Hỗ trợ</string> + <string name="drawer_logs">Log phiên</string> + <string name="drawer_logs_hint">Đính kèm vào báo cáo lỗi</string> + <string name="drawer_share_logs">Chia sẻ log</string> + <string name="drawer_background">Nền</string> + <string name="drawer_stop">Dừng</string> + <string name="drawer_stop_title">Dừng phiên?</string> + <string name="drawer_running_now">Đang chạy</string> + <string name="drawer_no_game">Không có game nào đang chạy trên một Proton</string> + <string name="drawer_selected_profile">Hồ sơ game</string> + <string name="drawer_selected_profile_none">Chi tiết hồ sơ chưa khả dụng.</string> + <string name="drawer_profile_refresh_failed_initial">Không thể tải hồ sơ game. Đang tự động thử lại.</string> + <string name="drawer_profile_refresh_failed_stale">Không thể làm mới hồ sơ game. Đang hiện dữ liệu khả dụng gần nhất; đang tự động thử lại.</string> + <string name="drawer_profile_inspect_hint">Xem và sửa các thiết lập đã lưu được dùng ở lần khởi chạy kế tiếp.</string> + <string name="drawer_profile_default">Đang dùng Hồ sơ mặc định</string> + <string name="drawer_profile_custom">Hồ sơ tùy chỉnh</string> + <string name="drawer_component_inherited">Đang dùng %1$s từ Hồ sơ mặc định.</string> + <string name="drawer_game_components_note">Thay đổi được lưu vào hồ sơ của %1$s và áp dụng vào lần game khởi chạy kế tiếp.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="other">%1$d ghi đè game</item> + </plurals> + <string name="drawer_no_proton">Chưa cài Proton nào.</string> + <string name="drawer_game_running">game đang chạy</string> + <string name="drawer_reapplied">đã áp dụng lại lúc khởi chạy %1$s</string> + <string name="drawer_original">Gốc</string> + <string name="drawer_components_note">Nhập và xóa ở trang Components.</string> + <string name="setup_check_done">Hoàn tất</string> + <string name="setup_check_warn">Cần chú ý</string> + <string name="setup_check_busy">Đang xử lý</string> + <string name="setup_limit_adb_failed">Kiểm tra địa chỉ IP và cổng của Gỡ lỗi qua mạng không dây, hoặc ghép nối lại nếu Android đã gỡ thiết bị này.</string> + <string name="setup_install">Cài</string> + <string name="setup_manage">Quản lý</string> + <string name="setup_tab_overview">Tổng quan</string> + <string name="setup_tab_controller">Tay cầm</string> + <string name="setup_tab_session">Phiên</string> + <string name="setup_tab_launcher">Launcher</string> + <string name="setup_title">Thiết lập</string> + <string name="setup_all_set">● Đã sẵn sàng</string> + <string name="setup_n_ready">%1$d trong %2$d đã sẵn sàng</string> + <string name="setup_system_check">Kiểm tra hệ thống</string> + <string name="setup_gpu_supported">Thiết bị được hỗ trợ</string> + <string name="setup_gpu_untested">GPU chưa được kiểm thử</string> + <string name="setup_gpu_unsupported">GPU không được hỗ trợ</string> + <string name="setup_gpu_detail">%1$s · %2$s</string> + <string name="setup_gpu_untested_detail">%1$s: %2$s</string> + <string name="setup_gpu_unsupported_detail">Steam cần driver Adreno; %1$s có thể hiện màn hình đen</string> + <string name="setup_runtime">Runtime Linux</string> + <string name="setup_runtime_progress">%1$s · %2$d%%</string> + <string name="setup_runtime_missing">Chưa cài · khoảng 3 GB, được cài vào lần Play đầu tiên</string> + <string name="setup_installed">Đã cài</string> + <string name="setup_runtime_update">%1$s · có cập nhật</string> + <string name="setup_runtime_current">%1$s · đã mới nhất</string> + <string name="setup_limit">Giới hạn tiến trình con</string> + <string name="setup_limit_on">Đang bật · Android có thể đóng Steam. Tắt nó mất khoảng một phút.</string> + <string name="setup_limit_unset">Chưa đặt · Android có thể đóng Steam. Tắt nó mất khoảng một phút.</string> + <string name="setup_limit_unknown">Không thể kiểm tra · tắt nó mất khoảng một phút.</string> + <string name="setup_fix_it">Khắc phục</string> + <string name="setup_details">Chi tiết</string> + <string name="setup_dev_options">Tùy chọn cho nhà phát triển</string> + <string name="setup_use_wireless">Dùng Gỡ lỗi qua mạng không dây</string> + <string name="setup_check_again">Kiểm tra lại</string> + <string name="setup_limit_turn_on">Bật giới hạn</string> + <string name="setup_account">Tài khoản Steam</string> + <string name="setup_signed_in_offline">Đã đăng nhập với %1$s · chế độ ngoại tuyến</string> + <string name="setup_signed_in">Đã đăng nhập với %1$s</string> + <string name="setup_sign_in">Nhấn Play và đăng nhập vào Steam</string> + <string name="setup_tools">Công cụ</string> + <string name="setup_controller">Tay cầm</string> + <string name="setup_controller_unavailable">Thiết lập tay cầm không khả dụng.</string> + <string name="setup_session">Phiên</string> + <string name="setup_logs">Log phiên</string> + <string name="setup_logs_hint">Được lưu sau mỗi phiên</string> + <string name="setup_agent_commands">Công cụ gỡ lỗi</string> + <string name="setup_latest_logs">Log phiên gần nhất</string> + <string name="setup_saved_logs">Log phiên đã lưu</string> + <string name="setup_saved_logs_hint">Giữ lại %1$d bản mới nhất</string> + <string name="setup_clear_logs">Xóa log</string> + <string name="setup_reset_settings">Đặt lại toàn bộ thiết lập</string> + <string name="setup_reset_settings_hint">Đưa mọi thiết lập về giá trị mặc định</string> + <string name="setup_reset_settings_button">Đặt lại</string> + <string name="setup_reset_settings_title">Đặt lại toàn bộ thiết lập?</string> + <string name="setup_reset_settings_body">Thiết lập hiển thị, hiệu năng, tay cầm, giao diện, ngôn ngữ và launcher sẽ trở về mặc định. Game, đăng nhập Steam, tài khoản cửa hàng, driver đã tải và thư mục lưu trữ vẫn giữ nguyên.</string> + <string name="setup_reset_settings_profiles">Đặt lại cả hồ sơ game (Proton, FEX, thành phần và môi trường runtime cho từng game, cùng môi trường của hồ sơ Mặc định)</string> + <string name="setup_reset_settings_session_running">Dừng phiên trước khi đặt lại thiết lập.</string> + <string name="setup_reset_settings_partial">Đã đặt lại thiết lập, nhưng chưa phải tất cả. Chi tiết có trong log.</string> + <string name="setup_offline">Chế độ ngoại tuyến</string> + <string name="setup_sign_in_first">Đăng nhập Steam trước</string> + <string name="setup_launcher">Launcher</string> + <string name="setup_language">Ngôn ngữ</string> + <string name="setup_language_hint">Steam cũng dùng ngôn ngữ này, từ lần khởi động kế tiếp.</string> + <string name="setup_language_system">Theo hệ thống (%1$s)</string> + <string name="setup_language_system_short">Theo hệ thống</string> + <string name="setup_app_scale">Tỷ lệ ứng dụng</string> + <string name="setup_app_scale_hint">Văn bản và điều khiển của DroidDeck</string> + <string name="setup_app_scale_default">%1$d%% (Mặc định)</string> + <string name="setup_theme">Giao diện</string> + <string name="setup_theme_hint">Giao diện launcher</string> + <string name="setup_home">Dùng làm màn hình chính</string> + <string name="setup_home_on">DroidDeck có thể là ứng dụng Màn hình chính</string> + <string name="setup_home_off">DroidDeck không bao giờ được đề xuất làm ứng dụng Màn hình chính</string> + <string name="setup_orientation">Hướng màn hình</string> + <string name="setup_orientation_auto">Ngang tự động</string> + <string name="setup_orientation_landscape">Ngang</string> + <string name="setup_orientation_reverse">Ngang ngược</string> + <string name="setup_fullscreen">Toàn màn hình</string> + <string name="setup_fullscreen_on">Ẩn thanh trạng thái và thanh điều hướng của Android</string> + <string name="setup_fullscreen_off">Hiện thanh trạng thái và thanh điều hướng của Android</string> + <string name="setup_default_home">Ứng dụng Màn hình chính mặc định</string> + <string name="setup_choose_home">Chọn một ứng dụng Màn hình chính</string> + <string name="setup_choose">Chọn</string> + <string name="setup_linux_apps">Ứng dụng Linux (beta)</string> + <string name="setup_tool_files">Tệp</string> + <string name="setup_tool_files_hint">Duyệt và quản lý tệp</string> + <string name="setup_tool_protons">Phiên bản Proton</string> + <string name="setup_tool_protons_hint">Cài các bản build Proton ARM64</string> + <string name="setup_tool_performance">Hiệu năng</string> + <string name="setup_tool_performance_hint">Phân bổ lõi CPU</string> + <string name="setup_tool_roms">Thư mục ROM</string> + <string name="setup_tool_roms_hint">Nơi lưu game của trình giả lập</string> + <string name="setup_card_components">Thành phần</string> + <string name="setup_card_components_hint">FEX, DXVK, VKD3D</string> + <string name="setup_card_controls">Điều khiển</string> + <string name="setup_card_controls_hint">Gán nút</string> + <string name="store_tab_discover">Khám phá</string> + <string name="store_tab_search">Tìm kiếm</string> + <string name="store_tab_installed">Đã cài</string> + <string name="store_tab_count">%1$s · %2$d</string> + <string name="store_title">Store</string> + <string name="store_chip_flathub">Flathub · ARM64</string> + <string name="store_chip_ready">● Flatpak đã sẵn sàng</string> + <string name="store_needs_runtime">Cài runtime Linux từ Thiết lập trước.</string> + <string name="store_setup_title">Thiết lập Flatpak</string> + <string name="store_setup_text">Thêm Flatpak và kết nối nó với Flathub (khoảng 20 MB). Ứng dụng đầu tiên cũng tải runtime của nó.</string> + <string name="store_setting_up">Đang thiết lập…</string> + <string name="store_flatpak">Flatpak</string> + <string name="store_updates">Cập nhật</string> + <string name="store_busy">%1$s · %2$s</string> + <string name="store_busy_percent">%1$s · %2$s · %3$d%%</string> + <string name="store_starting">Đang khởi động…</string> + <string name="store_categories">Danh mục</string> + <string name="store_unreachable">Không thể kết nối Flathub. Kiểm tra kết nối của bạn và thử lại.</string> + <string name="store_try_again">Thử lại</string> + <string name="store_search_label">Tìm trên Flathub</string> + <string name="store_search_placeholder">Firefox, game, trình giả lập…</string> + <string name="store_search">Tìm kiếm</string> + <string name="store_all">Tất cả</string> + <string name="store_searching">Đang tìm…</string> + <string name="store_search_hint">Tìm theo tên hoặc chọn một danh mục. Chỉ các ứng dụng ARM64 được liệt kê.</string> + <string name="store_no_results">Không có ứng dụng ARM64 nào trên Flathub khớp với nội dung đó.</string> + <string name="store_results">Kết quả</string> + <string name="store_check_updates">Kiểm tra cập nhật</string> + <string name="store_update_all">Cập nhật tất cả (%1$d)</string> + <string name="store_all_current">● Mọi thứ đã mới nhất</string> + <string name="store_no_apps">Chưa có ứng dụng nào. Tìm vài ứng dụng ở Khám phá hoặc Tìm kiếm.</string> + <string name="store_setup_first_note">Thiết lập Flatpak để cài ứng dụng.</string> + <string name="store_update_available_prefix">Có cập nhật · %1$s</string> + <string name="store_open">Mở</string> + <string name="store_details">Chi tiết</string> + <string name="store_remove">Xóa</string> + <string name="store_press_again">Nhấn lại để xóa</string> + <string name="store_installing">Đang cài…</string> + <string name="store_install">Cài</string> + <string name="store_setup_first">Thiết lập Flatpak trước</string> + <string name="store_download_size">Tải %1$s</string> + <string name="store_installed_chip">● Đã cài</string> + <string name="store_details_failed">Không thể tải trang Flathub của ứng dụng này.</string> + <string name="store_loading">Đang tải từ Flathub…</string> + <string name="store_no_arm">Không có bản build ARM64 trên Flathub, nên không thể cài ở đây.</string> + <string name="store_screenshots">Ảnh chụp màn hình</string> + <string name="store_about">Giới thiệu</string> + <string name="store_app_id">ID ứng dụng</string> + <string name="store_license">Giấy phép</string> + <string name="store_runtime">Runtime</string> + <string name="store_installed_size">Kích thước đã cài</string> + <string name="store_installed_size_value">%1$s (cộng với runtime dùng chung của nó)</string> + <string name="store_website">Trang web</string> + <string name="store_verified">Đã xác minh</string> + <string name="upd_title">Cập nhật</string> + <string name="upd_build">DroidDeck %1$s · %2$s</string> + <string name="upd_checked">Đã kiểm tra %1$s</string> + <string name="upd_not_checked">Chưa kiểm tra</string> + <string name="upd_perm_title">Cho phép DroidDeck tự cập nhật</string> + <string name="upd_perm_text">Ở màn hình kế tiếp, bật Cho phép từ nguồn này, rồi quay lại. Việc cập nhật sẽ tự tiếp tục.</string> + <string name="upd_open_settings">Mở thiết lập</string> + <string name="upd_not_now">Không phải bây giờ</string> + <string name="upd_signed_status">Ký khác nhau</string> + <string name="upd_signed_headline">Không thể cập nhật tại chỗ</string> + <string name="upd_signed_detail">Bản này không được ký bằng khóa phát hành của DroidDeck, nên bản cập nhật không thể cài chồng lên nó. Gỡ cài đặt nó để chuyển.</string> + <string name="upd_available">Có cập nhật</string> + <string name="upd_blocked_status">Không thể cài</string> + <string name="upd_switch">Sẵn sàng chuyển</string> + <string name="upd_ahead_status">Trước Stable</string> + <string name="upd_ahead_headline">Bạn đang trước Stable</string> + <string name="upd_ahead_detail">Bản build này mới hơn bản Stable gần nhất. Bạn sẽ chuyển sang Stable ở bản phát hành kế tiếp của nó.</string> + <string name="upd_gone_status">Thử nghiệm đã kết thúc</string> + <string name="upd_gone_headline">Thử nghiệm này đã kết thúc</string> + <string name="upd_gone_detail">Bản sửa của nó đã được gộp hoặc bỏ. Theo dõi Preview để có các bản sửa mới nhất.</string> + <string name="upd_current_status">Đã mới nhất</string> + <string name="upd_current_headline">Bạn đã có bản %1$s mới nhất</string> + <string name="upd_dot_ago">· %1$s</string> + <string name="upd_stage_percent">%1$s… %2$d%%</string> + <string name="upd_stage">%1$s…</string> + <string name="upd_update_button">Cập nhật%1$s</string> + <string name="upd_install_button">Cài%1$s</string> + <string name="upd_install_anyway">Vẫn cài Stable %1$s</string> + <string name="upd_follow_preview">Theo dõi Preview</string> + <string name="upd_stop_session">Dừng phiên đang chạy để cập nhật.</string> + <string name="upd_less">Ít hơn</string> + <string name="upd_more">Thêm</string> + <string name="upd_new_stable">DroidDeck %1$s</string> + <string name="upd_new_preview">Bản Preview mới</string> + <string name="upd_new_test">Bản thử nghiệm PR #%1$d</string> + <string name="upd_mb">%1$d MB</string> + <string name="upd_channel">KÊNH CẬP NHẬT</string> + <string name="upd_stable">Stable</string> + <string name="upd_stable_hint">Các bản phát hành đã kiểm thử, dành cho hầu hết người dùng</string> + <string name="upd_version_ago">%1$s · %2$s</string> + <string name="upd_preview">Preview</string> + <string name="upd_preview_hint">Các bản sửa mới nhất, trước Stable</string> + <string name="upd_preview_current">Đã mới nhất</string> + <string name="upd_tests">Bản thử nghiệm</string> + <string name="upd_tests_hint">Thử một bản sửa trước khi nó được phát hành</string> + <string name="upd_tests_none">Hiện không có</string> + <string name="upd_pr">PR #%1$d</string> + <string name="upd_not_built">Không được build cho bản DroidDeck này</string> + <string name="upd_updated">Đã cập nhật %1$s</string> + <string name="upd_test_name">thử nghiệm PR #%1$d</string> + <string name="upd_while_ago">một lúc trước</string> + <string name="upd_just_now">vừa xong</string> + <plurals name="upd_tests_count"> + <item quantity="other">%1$d để thử</item> + </plurals> + <plurals name="upd_preview_behind"> + <item quantity="other">Thay đổi từ bản của bạn · chậm %1$d bản build</item> + </plurals> + <plurals name="upd_preview_recent"> + <item quantity="other">Thay đổi gần đây · %1$d bản build</item> + </plurals> + <string name="gate_title">Một thiết lập Android cần đổi</string> + <string name="gate_eyebrow">Steam</string> + <string name="gate_lede">Android dừng các ứng dụng khởi chạy nhiều tiến trình nền, và Steam khởi chạy hàng chục tiến trình. Cho đến khi thay đổi điều này, game sẽ đóng mà không có lỗi.</string> + <string name="gate_fix_for_me">Khắc phục giúp tôi</string> + <string name="gate_toggle_steps">Bật “Tắt các mục hạn chế đối với tiến trình con”, rồi quay lại. Giữ Tùy chọn cho nhà phát triển luôn mở, nếu không công tắc sẽ tắt lại.</string> + <string name="gate_open_dev">Mở Tùy chọn cho nhà phát triển</string> + <string name="gate_no_toggle">Phiên bản Android này không có công tắc cho việc đó, nên DroidDeck thay đổi nó qua Gỡ lỗi qua mạng không dây. Mất khoảng một phút, không cần máy tính.</string> + <string name="gate_needs_wifi">Gỡ lỗi qua mạng không dây cần Wi-Fi. Mạng nào cũng được; không cần Internet.</string> + <string name="gate_needs_notifications">Mã ghép nối nằm trong một thông báo. Hãy cho phép thông báo cho DroidDeck, hoặc dùng Cách khác.</string> + <string name="gate_allow_notifications">Cho phép thông báo</string> + <string name="gate_step1">Mở Settings → Developer options → Wireless debugging và bật nó lên</string> + <string name="gate_step2">Nhấn “Pair device with pairing code”</string> + <string name="gate_step3">Nhập mã vào thông báo của DroidDeck</string> + <string name="gate_waiting">Đang chờ cửa sổ bật lên ghép nối…</string> + <string name="gate_code_needed">Đã tìm thấy cửa sổ bật lên. Nhập mã của nó vào thông báo.</string> + <string name="gate_status">Trạng thái</string> + <string name="gate_polling">Đang kiểm tra mỗi 2 giây. Trang này sẽ đóng khi nó tắt.</string> + <string name="gate_other_ways">Cách khác</string> + <string name="gate_other_toggle">Gỡ lỗi qua mạng không dây, địa chỉ thủ công, ADB từ máy tính</string> + <string name="gate_other_no_toggle">Địa chỉ thủ công, ADB từ máy tính, Tùy chọn cho nhà phát triển</string> + <string name="gate_use_wireless_instead">Dùng Gỡ lỗi qua mạng không dây thay vào đó</string> + <string name="gate_some_roms">Một số ROM vẫn thêm công tắc này. Tìm “child process” trong Tùy chọn cho nhà phát triển.</string> + <string name="gate_manual_hint">Nếu thông báo không hoạt động, hãy tự nhập địa chỉ và mã của cửa sổ bật lên.</string> + <string name="gate_enter_manually">Nhập địa chỉ thủ công</string> + <string name="gate_from_computer">Từ một máy tính có ADB:</string> + <string name="gate_copy_command">Sao chép lệnh</string> + <string name="gate_choose_display">Chọn màn hình để mở Android Settings.</string> + <string name="gate_main_screen">Màn hình chính</string> + <string name="wadb_finding_port">Đã ghép nối. Đang tìm cổng Gỡ lỗi qua mạng không dây…</string> + <string name="wadb_enter_port">Đã ghép nối. Nhập cổng từ Settings.</string> + <string name="wadb_applying">Đã tìm thấy thiết bị. Đang áp dụng thiết lập…</string> + <string name="wadb_apply_failed">Không thể áp dụng tự động. Kiểm tra địa chỉ dưới đây và thử lại. %1$s</string> + <string name="wadb_title_wireless">Gỡ lỗi qua mạng không dây</string> + <string name="wadb_title_done">Đã cập nhật giới hạn tiến trình con</string> + <string name="wadb_title">Đổi giới hạn tiến trình con</string> + <string name="wadb_lede_compact0">Nếu thiếu tùy chọn này, hãy ghép nối qua Gỡ lỗi qua mạng không dây.</string> + <string name="wadb_lede_compact1">Đã ghép nối. Kiểm tra địa chỉ IP và cổng trong Gỡ lỗi qua mạng không dây.</string> + <string name="wadb_lede_done">Giới hạn tiến trình con đã được cập nhật.</string> + <string name="wadb_lede0">Dùng bước 2 nếu Tùy chọn cho nhà phát triển không có thiết lập tiến trình con. Mở Developer options → Wireless debugging → Pair device with pairing code.</string> + <string name="wadb_lede1">Đã ghép nối. Dùng địa chỉ dưới đây, hoặc cập nhật nó từ Wireless debugging → IP address & Port.</string> + <string name="wadb_lede_done_long">Giới hạn tiến trình con đã được cập nhật qua Gỡ lỗi qua mạng không dây.</string> + <string name="wadb_confirmed_on">Android xác nhận giới hạn đang bật.</string> + <string name="wadb_confirmed_off">Android xác nhận giới hạn đang tắt.</string> + <string name="wadb_pair_group">2 · Ghép nối Gỡ lỗi qua mạng không dây</string> + <string name="wadb_pair_address">Địa chỉ IP & cổng của cửa sổ bật lên ghép nối</string> + <string name="wadb_pin">Mã ghép nối (PIN)</string> + <string name="wadb_pin_placeholder">6 số</string> + <string name="wadb_pair">Ghép nối</string> + <string name="wadb_apply_group">2 · Áp dụng qua Gỡ lỗi qua mạng không dây</string> + <string name="wadb_connect_address">Địa chỉ IP & cổng kết nối</string> + <string name="wadb_pair_again">Ghép nối lại</string> + <string name="wadb_turn_off">Tắt giới hạn</string> + <string name="wadb_other_ways">Cách khác để đổi nó</string> + <string name="wadb_dev_try_first">1 · Tùy chọn cho nhà phát triển (thử trước)</string> + <string name="wadb_restrict_on">Đặt “Tắt các mục hạn chế đối với tiến trình con” thành tắt.</string> + <string name="wadb_restrict_off">Đặt “Tắt các mục hạn chế đối với tiến trình con” thành bật.</string> + <string name="wadb_computer_last">3 · ADB từ máy tính (phương án cuối)</string> + <string name="wadb_only_if">Chỉ khi Gỡ lỗi qua mạng không dây không khả dụng.</string> + <string name="wadb_computer_group">3 · ADB từ máy tính (phương án cuối)</string> + <string name="ctrl_osc_hint">Khi các nút điều khiển chạm xuất hiện trong một phiên</string> + <string name="ctrl_color">Màu</string> + <string name="ctrl_color_hint">Màu sắc của các nút trên màn hình</string> + <string name="ctrl_custom">Tùy chỉnh</string> + <string name="ctrl_opacity">Độ mờ</string> + <string name="ctrl_percent">%1$d%%</string> + <string name="ctrl_size">Kích thước nút</string> + <string name="ctrl_size_hint" formatted="false">100% là kích thước chuẩn</string> + <string name="ctrl_stick_click">Nhấn cần</string> + <string name="ctrl_stick_click_hint">Chạm hai lần và giữ một cần để dùng L3 hoặc R3</string> + <string name="ctrl_adaptive">Cần thích ứng</string> + <string name="ctrl_rumble">Rung khi chơi game</string> + <string name="ctrl_steam_button">Nút Steam</string> + <string name="ctrl_qam_button">Nút QAM</string> + <string name="ctrl_keyboard_button">Nút bàn phím</string> + <string name="ctrl_select_steam">Nhấn Select để mở menu Steam</string> + <string name="ctrl_select_steam_hint">Thay cho View/Select.</string> + <string name="ctrl_joycon_vr">Dùng Joy-Con làm tay cầm VR</string> + <string name="ctrl_joycon_vr_hint">Khi SteamVR đang chạy, mỗi Joy-Con trở thành một bàn tay. Hướng nó về phía trước rồi giữ Home hoặc Capture để căn giữa lại.</string> + <string name="setup_animations">Hiệu ứng chuyển động</string> + <string name="ctrl_adaptive_hint">Cần xuất hiện ở nơi bạn chạm và ẩn khi thả ra</string> + <string name="ctrl_layout">Bố cục</string> + <string name="ctrl_layout_custom">Vị trí tùy chỉnh đã lưu</string> + <string name="ctrl_layout_default">Vừa khớp với màn hình này</string> + <string name="ctrl_edit">Sửa</string> + <string name="ctrl_reset">Đặt lại</string> + <string name="ctrl_mapping">Gán nút</string> + <string name="ctrl_mapping_default">Mỗi nút gửi tín hiệu riêng của nó</string> + <string name="ctrl_mapping_count">%1$d trong %2$d nút đã được gán lại</string> + <string name="ctrl_configure">Cấu hình</string> + <string name="ctrl_reset_all">Đặt lại tay cầm</string> + <string name="ctrl_reset_all_hint">Khôi phục mọi thiết lập tay cầm và bố cục</string> + <string name="ctrl_mapping_lede">Mỗi nút trên màn hình gửi gì đến game. Ẩn sẽ xóa nút đó.</string> + <string name="ctrl_onscreen_buttons">Nút trên màn hình</string> + <string name="ctrl_defaults">Mặc định</string> + <string name="ctrl_reset_mapping">Đặt lại gán nút</string> + <string name="content_android_apps">Ứng dụng Android</string> + <string name="content_apps_count">%1$d ứng dụng</string> + <string name="content_no_android_apps">Không tìm thấy ứng dụng Android nào có thể khởi chạy.</string> + <string name="content_desktop_installed">● Đã cài desktop</string> + <string name="content_desktop_first_open">Cài ở lần mở đầu tiên</string> + <string name="content_available">Có thể cài</string> + <string name="content_not_installed">Chưa cài.</string> + <string name="content_not_installed_suffix">%1$s · chưa cài</string> + <string name="content_open_named">Mở %1$s</string> + <string name="content_games">Games</string> + <string name="content_choose_roms">Chọn một thư mục ROM.</string> + <string name="content_retroarch_roms">Duyệt đến /root/ROMs trong RetroArch.</string> + <string name="content_add_roms">Thêm game %1$s vào ROMs/%2$s.</string> + <string name="content_install_named">Cài %1$s</string> + <string name="content_stop_to_install">Dừng phiên để cài</string> + <string name="content_runtime_required">Cần runtime</string> + <string name="content_loading_details">Đang tải chi tiết cài đặt…</string> + <string name="content_details_unavailable">Chi tiết cài đặt không khả dụng. Thử lại sau.</string> + <string name="content_needs_runtime">Cài runtime Linux từ Thiết lập trước.</string> + <string name="content_stop_first">Dừng phiên đang chạy để cài ứng dụng desktop.</string> + <string name="content_install_into">Cài %1$s vào desktop Linux.</string> + <string name="store_busy_percent_short">%1$s · %2$d%%</string> + <string name="content_hide_note">Ẩn sẽ gỡ nó khỏi Desktop. Các tệp của nó vẫn ở trong runtime Linux.</string> + <string name="content_rom_gone">Game đó không còn trong thư mục ROM.</string> + <string name="content_desktop_system">Desktop · %1$s</string> + <string name="content_launch_in">Khởi chạy trong %1$s</string> + <string name="content_also_in">Cũng có trong %1$s</string> + <string name="content_page_gone">Trang đó không còn nữa. Chọn một mục ở bên trái.</string> + <string name="content_open_desktop">Mở desktop</string> + <string name="content_install_open_desktop">Cài & mở desktop</string> + <string name="desktop_remove_title">Gỡ cài đặt desktop</string> + <string name="desktop_remove_text">Gỡ desktop và các ứng dụng đi kèm. Giữ lại game, ứng dụng đã thêm, thiết lập và thư viện dùng chung.</string> + <string name="desktop_removing">Đang gỡ desktop</string> + <string name="desktop_removed">Đã gỡ desktop</string> + <string name="desktop_cleaning_legacy">Đang xóa tệp LXQt cũ</string> + <string name="desktop_removal_unknown">Cập nhật DroidDeck trước khi gỡ phiên bản desktop này.</string> + <string name="content_linux_desktop">Desktop Linux</string> + <string name="content_linux_desktop_hint">KDE Plasma, Firefox và các trình giả lập của bạn</string> + <string name="games_empty">Game bạn cài trong Steam sẽ xuất hiện ở đây sau phiên.</string> + <string name="games_play_steam">Chơi trên Steam</string> + <string name="games_play_steamvr">Chơi trên SteamVR</string> + <string name="games_launch_settings">Thiết lập khởi chạy</string> + <string name="games_launch">Khởi chạy</string> + <string name="games_files">Tệp game</string> + <string name="games_prefix">Prefix Proton</string> + <string name="games_saves_looking">Đang tìm các lần lưu…</string> + <string name="games_saves_none">Không tìm thấy thư mục lưu theo tên. Xuất sẽ lấy toàn bộ thư mục người dùng.</string> + <string name="games_saves_folders">%1$d thư mục lưu</string> + <string name="games_saves_summary">%1$s · %2$d tệp · %3$s</string> + <string name="games_kb">%1$d KB</string> + <string name="games_manage_saves">Quản lý tệp lưu</string> + <string name="games_saves">Tệp lưu game</string> + <string name="games_import_saves">Nhập tệp lưu…</string> + <string name="games_export_gamehub">Xuất dưới dạng zip GameHub…</string> + <string name="games_export_winlator">Xuất dưới dạng zip Winlator…</string> + <string name="games_open_save_folder">Mở thư mục lưu</string> + <string name="games_never_played">Chưa chơi bao giờ</string> + <string name="games_runtime_busy_percent">Runtime đang bận · %1$d%%</string> + <string name="games_runtime_busy">Runtime đang bận</string> + <string name="games_runtime_first_play">Runtime sẽ cài ở lần Play đầu tiên</string> + <string name="games_runtime_update">Có cập nhật runtime</string> + <string name="games_runtime_ready">● Runtime đã sẵn sàng</string> + <string name="games_last_played">Chơi lần cuối %1$s</string> + <string name="games_internal">Bộ nhớ trong</string> + <string name="games_added">Game đã thêm</string> + <string name="games_custom">Game tùy chỉnh</string> + <string name="games_store_storage">Lưu trữ game</string> + <string name="gpu_auto_hint">Cặp tốt nhất cho GPU này, luôn được cập nhật</string> + <string name="gpu_manual_hint">Tự chọn một cặp</string> + <string name="gpu_checking">Đang kiểm tra driver…</string> + <string name="gpu_none_listed">Chưa có driver nào được liệt kê. Làm mới để tìm.</string> + <string name="gpu_hide_other">Ẩn driver cho GPU khác</string> + <string name="gpu_show_other">Hiện driver cho GPU khác</string> + <string name="gpu_advanced">Nâng cao</string> + <string name="gpu_set_with_display">Được đặt cùng với driver hiển thị: %1$s mang cả hai.</string> + <string name="gpu_set_with_runtime">Được đặt cùng với driver runtime: %1$s mang cả hai.</string> + <string name="gpu_runtime_hint">Dùng bởi game và desktop.</string> + <string name="gpu_runtime_default">Mặc định runtime</string> + <string name="gpu_auto_by_gpu">Tự động - chọn theo GPU</string> + <string name="gpu_manage">Tải, nhập hoặc xóa…</string> + <string name="gpu_in_use_caps">ĐANG DÙNG</string> + <string name="gpu_builtin">Các driver tích hợp trong DroidDeck</string> + <string name="gpu_matched_pair">Driver runtime và hiển thị được đặt cùng nhau thành một cặp khớp.</string> + <string name="gpu_recommended_for">Được đề xuất cho GPU này: %1$s.</string> + <string name="gpu_refresh_hint">Làm mới để tìm driver cho GPU này.</string> + <string name="gpu_recommended_caps">ĐỀ XUẤT</string> + <string name="gpu_unavailable">Không khả dụng</string> + <string name="load_runtime">Runtime Linux</string> + <string name="load_runtime_detail">Đang chuẩn bị runtime Linux</string> + <string name="load_session">Phiên</string> + <string name="load_session_detail">Đang khởi động hiển thị và âm thanh</string> + <string name="load_steam">Client Steam</string> + <string name="load_steam_detail">Đang kiểm tra Steam và các công cụ tương thích của nó</string> + <string name="load_opening_steam">Đang mở Steam</string> + <string name="load_opening_steam_detail">Đang chờ khung hình đầu tiên của Steam</string> + <string name="load_desktop">Desktop</string> + <string name="load_desktop_detail">Đang chuẩn bị desktop</string> + <string name="load_opening">Đang mở</string> + <string name="load_opening_detail">Đang chờ khung hình đầu tiên</string> + <string name="load_starting_steam">Đang khởi động Steam</string> + <string name="load_ended">Phiên đã kết thúc</string> + <string name="load_step">Bước %1$d trong %2$d</string> + <string name="load_steam_paused">Steam đang tạm dừng</string> + <string name="deck_tab_grips">Grip</string> + <string name="deck_tab_left">Pad trái</string> + <string name="deck_tab_right">Pad phải</string> + <string name="deck_tab_both">Cả hai</string> + <string name="deck_tab_gamepad">Gamepad</string> + <string name="deck_surface_stick">Cần</string> + <string name="deck_surface_trackpad">Trackpad</string> + <string name="deck_surface_switch">Chuyển giữa cần và trackpad</string> + <string name="deck_more_controls">Thêm điều khiển Deck</string> + <string name="deck_panels">BẢNG</string> + <string name="deck_close">Đóng điều khiển màn hình phụ</string> + <string name="deck_open_steam_menu">Mở menu Steam</string> + <string name="deck_left_upper">Trái · trên</string> + <string name="deck_left_lower">Trái · dưới</string> + <string name="deck_right_upper">Phải · trên</string> + <string name="deck_right_lower">Phải · dưới</string> + <string name="deck_click">Nhấn</string> + <string name="deck_right_trackpad">Trackpad phải</string> + <string name="deck_left_trackpad">Trackpad trái</string> + <string name="second_trackpad">Trackpad</string> + <string name="second_show_keyboard">Hiện bàn phím</string> + <string name="second_hide_keyboard">Ẩn bàn phím</string> + <string name="second_terminal">Terminal Linux</string> + <string name="second_terminal_not_ready">Phiên Linux chưa sẵn sàng cho terminal.</string> + <string name="rail_steam">Steam</string> + <string name="rail_games">Games</string> + <string name="rail_desktop">Desktop</string> + <string name="rail_store">Store</string> + <string name="rail_components">Components</string> + <string name="rail_apps">Ứng dụng</string> + <string name="rail_setup">Thiết lập</string> + <string name="rail_updates">Cập nhật</string> + <string name="rail_percent">%1$d%%</string> + <string name="rail_resume_named">Tiếp tục %1$s</string> + <string name="roms_text">Hiển thị như /root/ROMs trong mỗi phiên. Bộ nhớ trong ở /root/Storage.</string> + <string name="roms_none">Chưa chọn thư mục</string> + <string name="roms_applies">Áp dụng từ phiên sau. Thẻ SD hoạt động được.</string> + <string name="roms_choose">Chọn thư mục</string> + <string name="roms_change">Đổi thư mục</string> + <string name="proton_lede">Cài một bản build Proton ARM64, sau đó chọn nó cho từng game trong Steam → Properties → Compatibility.</string> + <string name="proton_stop_first">Dừng phiên đang chạy để cài hoặc gỡ một công cụ tương thích.</string> + <string name="proton_available">Các bản build khả dụng</string> + <string name="proton_installed">Đã cài %1$s</string> + <string name="proton_queued">Đang chờ từ một yêu cầu trước</string> + <string name="proton_not_installed">Chưa cài</string> + <string name="proton_update_available">Có cập nhật → %1$s</string> + <string name="proton_remove_older">Xóa các phiên bản %1$s cũ</string> + <string name="proton_remove_older_body">Xóa %1$s. Game đang đặt dùng các phiên bản này phải chuyển sang một Proton khác.</string> + <string name="proton_remove_body">Game đang đặt dùng phiên bản này phải chuyển sang một Proton khác.</string> + <string name="proton_install_now">Cài ngay</string> + <string name="proton_cancel_queued">Hủy hàng chờ</string> + <string name="pckb_android">Bàn phím Android</string> + <string name="pckb_hide">Ẩn ✕</string> + <string name="main_launch_named">Khởi chạy %1$s</string> + <string name="main_choose_screen">Chọn một màn hình. Phụ: %1$s.</string> + <string name="main_secondary_gone">Màn hình phụ không còn khả dụng.</string> + <string name="main_primary">Màn hình chính</string> + <string name="main_secondary">Màn hình phụ</string> + <string name="widgets_prev_tab">Tab trước</string> + <string name="widgets_next_tab">Tab sau</string> + <string name="widgets_on">Bật</string> + <string name="widgets_all_n">Tất cả %1$d</string> + <string name="widgets_none">Không có</string> + <string name="widgets_n_of_m">%1$d trong %2$d</string> + <string name="widgets_off">Tắt</string> + <string name="screen_bottom">Màn hình dưới</string> + <string name="game_env_applies">Áp dụng vào lần game khởi động kế tiếp. Hồ sơ của một game sẽ ghi đè hồ sơ dùng chung.</string> + <string name="game_env_other">Một game khác theo app ID…</string> + <string name="game_env_done">Xong</string> + <string name="game_env_default">Mặc định</string> + <string name="game_env_off">Tắt</string> + <string name="game_env_change">Đổi…</string> + <string name="game_env_change_title">Đổi biến</string> + <string name="game_env_restore_default">Quay về mặc định</string> + <string name="game_env_eyebrow">Game Proton</string> + <string name="pip_title">Hình trong hình</string> + <string name="pip_auto">Tự động vào hình trong hình</string> + <string name="unfolded_controls">Điều khiển trên màn hình mở</string> + <string name="unfolded_controls_hint">Khi mở, game nằm phía trên trackpad và grip phía sau của Steam Deck. Khi gập, game chiếm toàn màn hình.</string> + <string name="pip_suspended">Đã tạm dừng</string> + <string name="pip_not_ready">Hình trong hình chỉ khả dụng khi phiên đã sẵn sàng.</string> + <string name="pip_permission">Cho phép hình trong hình cho DroidDeck trong thiết lập Android.</string> + <string name="pip_unavailable">Android không thể mở hình trong hình.</string> + <string name="game_shortcut">Shortcut</string> + <string name="game_shortcut_add">Thêm vào màn hình chính</string> + <string name="game_shortcut_choose">Chọn game</string> + <string name="game_shortcut_scanning">Đang quét game đã cài…</string> + <string name="game_link_copy">Sao chép liên kết khởi chạy</string> + <string name="game_link_copied">Đã sao chép liên kết khởi chạy</string> + <string name="game_shortcut_unsupported">Launcher này không thể thêm shortcut. Hãy dùng Sao chép liên kết khởi chạy.</string> + <string name="game_link_invalid">Liên kết khởi chạy game không hợp lệ.</string> + <string name="game_link_missing">Game này không còn trong thư viện DroidDeck của bạn.</string> + <string name="game_link_session_busy">Dừng phiên hiện tại trước khi khởi chạy một game Steam.</string> + <string name="game_link_failed">Không thể gửi game đến Steam. Hãy thử khởi chạy lại.</string> + <string name="setup_retry_removal">Thử gỡ lại</string> + <string name="runtime_removing">Đang gỡ</string> + <string name="runtime_removal_incomplete">Gỡ chưa hoàn tất</string> + <string name="game_file_export">Xuất tệp game</string> + <string name="game_file_sync">Đồng bộ tất cả tệp game vào thư mục</string> + <string name="game_file_stop_sync">Ngừng đồng bộ tệp game</string> + <string name="game_file_folder">Chọn một thư mục cho các tệp game frontend</string> + <string name="game_file_exported">Đã lưu tệp game vào %1$s</string> + <string name="game_frontend_files">Tệp frontend</string> + + <string name="main_wait_runtime">Chờ hoạt động runtime hoàn tất</string> + <string name="main_wait_proton_install">Chờ việc cài công cụ tương thích hoàn tất</string> + <string name="main_wait_desktop_install">Chờ việc cài ứng dụng desktop hoàn tất</string> + <string name="main_wait_install_game">Chờ việc cài hoàn tất trước khi khởi chạy một game</string> + <string name="main_saves_close_session">Hãy đóng phiên Steam trước, để game không ghi đè lên tệp vừa nhập</string> + <string name="main_saves_importing">Đang nhập vào %1$s</string> + <plurals name="main_saves_imported"> + <item quantity="other">Đã nhập %1$d tệp từ %2$s vào %3$s</item> + </plurals> + <plurals name="main_saves_imported_backup"> + <item quantity="other">Đã nhập %1$d tệp từ %2$s vào %3$s. Tệp lưu cũ đã được sao lưu vào Download/DroidDeck/Saves/backups</item> + </plurals> + <string name="main_saves_pick_zip">Chọn một tệp zip lưu cho %1$s</string> + <string name="main_saves_exporting">Đang xuất %1$s</string> + <plurals name="main_saves_exported"> + <item quantity="other">Đã xuất %1$d tệp dưới dạng %2$s: %3$s</item> + </plurals> + <string name="main_saves_pick_folder">Chọn nơi lưu %1$s (%2$s)</string> + <string name="main_action_failed">%1$s thất bại: %2$s</string> + <string name="main_no_logs_yet">Chưa có log phiên: hãy chạy một phiên trước.</string> + <string name="main_no_logs_to_clear">Không có log phiên để xóa.</string> + <plurals name="main_logs_cleared"> + <item quantity="other">Đã xóa %1$d thư mục log phiên.</item> + </plurals> + <string name="main_wadb_pair_failed">Ghép nối Gỡ lỗi qua mạng không dây thất bại</string> + <string name="main_wadb_command_failed">Lệnh Gỡ lỗi qua mạng không dây thất bại</string> + <string name="main_wadb_unavailable">Gỡ lỗi qua mạng không dây không khả dụng</string> + <string name="main_adb_copied">Đã sao chép lệnh ADB</string> + <string name="main_pick_roms">Chọn thư mục ROM</string> + <string name="main_non_adreno_title">Không phải GPU Adreno</string> + <string name="main_non_adreno_text">Turnip hỗ trợ GPU Adreno. Trên %1$s, Steam có thể hiện màn hình đen. Tải xuống: %2$.0f MB.</string> + <string name="main_install_anyway">Vẫn cài</string> + <string name="main_remove_runtime_title">Gỡ runtime Linux</string> + <string name="main_remove_runtime_text">Việc này xóa runtime, client Steam bên trong nó, và mọi game đã cài ở đó.</string> + <string name="main_applied">Đã áp dụng: %1$s</string> + <string name="android_app_open_failed_primary">Không thể mở %1$s trên màn hình chính</string> + <string name="android_app_open_failed_on">Không thể mở %1$s trên %2$s</string> + <string name="android_app_open_failed_display">Không thể mở %1$s trên màn hình %2$d</string> + <string name="comp_busy_importing">Đang nhập</string> + <string name="comp_busy_swapping">Đang thay</string> + <string name="comp_busy_restoring">Đang khôi phục</string> + <string name="comp_busy_cancelling">Đang hủy</string> + <string name="comp_busy_deleting">Đang xóa</string> + <string name="comp_cannot_read">không thể đọc tệp</string> + <string name="comp_imported">Đã nhập %1$s</string> + <string name="comp_swap_cancelled">Lượt thay đang chờ đã bị hủy.</string> + <string name="comp_pick_wcp">Chọn một gói thành phần (-linux .wcp)</string> + <string name="comp_nightlies_unreachable">Không thể kết nối Nightlies</string> + <string name="comp_stored">Đã lưu %1$s</string> + <string name="comp_download_failed">Tải xuống thất bại: %1$s</string> + <string name="drivers_pick_linux">Chọn một driver runtime Linux (zip -Linux hoặc gói Android + Linux)</string> + <string name="drivers_pick_android">Chọn một driver hiển thị (zip AdrenoTools hoặc gói Android + Linux)</string> + <string name="drivers_pick_any">Chọn một zip driver hoặc một gói Android + Linux</string> + <string name="main_pkg_problem">%1$s: %2$s</string> + <string name="main_removing_named">Đang gỡ %1$s…</string> + <string name="main_forgetting_named">Đang quên %1$s…</string> + <string name="main_pick_game_storage">Chọn thư mục lưu trữ game</string> + <string name="main_pick_decky_zip">Chọn một tệp ZIP plugin Decky</string> + <string name="main_storage_not_usable">Không thể dùng: %1$s</string> + <string name="main_running_program">Chương trình</string> + <string name="main_removing_runtime">Đang gỡ runtime Linux</string> + <string name="main_settings_main_screen">Không thể mở Settings trên màn hình dưới; đã mở nó trên màn hình chính.</string> + <string name="main_open_dev_options">Mở Developer options trong Settings</string> + + <string name="upd_unknown_apps_failed">Không thể mở thiết lập \"Install unknown apps\" của Android</string> + <string name="upd_couldnt_check">Không thể kiểm tra: %1$s</string> + <string name="upd_no_download">Bản build này không có tệp tải cho bản DroidDeck này</string> + <string name="upd_stop_first">Dừng phiên đang chạy trước, rồi cập nhật</string> + <string name="upd_stage_downloading">Đang tải</string> + <string name="upd_stage_installing">Đang cài</string> + <string name="upd_stage_confirm">Đang chờ bạn xác nhận</string> + <string name="upd_failed">Cập nhật thất bại</string> + <string name="upd_not_offered">Android không đề nghị cài bản cập nhật</string> + + <string name="decky_install_failed">Cài Decky thất bại: %1$s</string> + <string name="decky_plugin_starting">Đang bắt đầu nhập plugin…</string> + <string name="decky_plugin_failed">Nhập plugin thất bại: %1$s</string> + <string name="decky_plugin_installed">Đã cài plugin. Khởi động lại Steam để tải nó.</string> + + <string name="drivers_not_checked">Chưa kiểm tra - nhấn làm mới để tìm driver mới</string> + <string name="drivers_bundle_sets_display">Android + Linux: cùng đặt driver hiển thị</string> + <string name="drivers_bundle_sets_runtime">Android + Linux: cùng đặt driver runtime</string> + <string name="drivers_runtime_builtin">Turnip tích hợp trong runtime</string> + <string name="drivers_system_vulkan">Vulkan hệ thống: không có bản build đi kèm cho GPU này</string> + <string name="drivers_bundled">%1$s (đi kèm)</string> + <string name="drivers_manual">Thủ công</string> + <string name="drivers_summary">%1$s · %2$s</string> + <string name="drivers_half_published">Hiện chỉ một nửa được phát hành</string> + <string name="drivers_pair_size">%1$.0f MB cho cả hai</string> + <string name="drivers_none_to_set">Không có driver để đặt: %1$s</string> + <string name="drivers_checking_latest">Đang kiểm tra driver mới nhất…</string> + <string name="drivers_up_to_date_check_failed">Đã mới nhất (không thể kiểm tra: %1$s)</string> + <string name="drivers_recommended_unpublished">Các driver được đề xuất hiện không được phát hành</string> + <string name="drivers_downloading_pair">Đang tải %1$s %2$s…</string> + <string name="drivers_updated_to">Đã cập nhật lên %1$s %2$s.</string> + <string name="drivers_updated_to_restart">Đã cập nhật lên %1$s %2$s. Driver hiển thị áp dụng sau khi DroidDeck khởi động lại.</string> + <string name="drivers_auto_waits_for_session">Bản cập nhật driver sẽ chờ phiên dừng.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s sẽ tải xuống khi bạn thoát dữ liệu di động và chế độ tiết kiệm pin.</string> + <string name="drivers_skipping_bad">%1$s %2$s không khởi động được phiên ở đây, nên Tự động giữ các driver đã chạy được.</string> + <string name="drivers_rolled_back">%1$s không khởi động được phiên hai lần, nên Tự động quay lại các driver đang hoạt động.</string> + <string name="drivers_switched_to">Đã chuyển sang %1$s %2$s.</string> + <string name="drivers_switched_to_restart">Đã chuyển sang %1$s %2$s. Driver hiển thị áp dụng sau khi DroidDeck khởi động lại.</string> + <string name="drivers_using">Đang dùng %1$s %2$s.</string> + <string name="drivers_using_restart">Đang dùng %1$s %2$s. Driver hiển thị áp dụng sau khi DroidDeck khởi động lại.</string> + <string name="drivers_using_quest">Đang dùng driver hiển thị đi kèm Quest và runtime mặc định.</string> + <string name="drivers_using_quest_restart">Đang dùng driver hiển thị đi kèm Quest và runtime mặc định. Driver hiển thị áp dụng sau khi khởi động lại DroidDeck.</string> + <string name="drivers_not_a_driver">Không phải zip driver: không phải driver AdrenoTools, Turnip -Linux, cũng không phải gói Android + Linux</string> + <string name="drivers_import_failed">Nhập thất bại: %1$s</string> + <string name="drivers_imported_unnamed">Driver đã nhập</string> + <string name="drivers_using_bundle">Đang dùng %1$s làm cả driver runtime và hiển thị.</string> + <string name="drivers_using_bundle_restart">Đang dùng %1$s làm cả driver runtime và hiển thị. Driver hiển thị áp dụng sau khi DroidDeck khởi động lại.</string> + <string name="drivers_deleted_bundle">Đã xóa %1$s (cả hai driver)</string> + <string name="drivers_deleted">Đã xóa %1$s</string> + <string name="drivers_release_status">Mới nhất: %1$s · đã kiểm tra %2$s</string> + <string name="drivers_release_status_failed">Mới nhất: %1$s · %2$s không thể kết nối · đã kiểm tra %3$s</string> + <plurals name="drivers_ago_minutes"> + <item quantity="other">%1$d phút trước</item> + </plurals> + <plurals name="drivers_ago_hours"> + <item quantity="other">%1$d giờ trước</item> + </plurals> + <plurals name="drivers_ago_days"> + <item quantity="other">%1$d ngày trước</item> + </plurals> + <string name="drivers_checking_sources">Đang kiểm tra Banners-Turnip, WinNative và DroidDeck…</string> + <string name="drivers_check_failed">kiểm tra thất bại</string> + <string name="drivers_installed_pick_either">Đã cài %1$s - chọn nó ở một trong hai danh sách để đặt cả hai driver</string> + <string name="drivers_installed_pick">Đã cài %1$s - chọn nó trong menu</string> + + <string name="session_wait_removal">Chờ việc gỡ runtime hoàn tất</string> + <string name="session_title_game">Game</string> + <string name="session_touch_auto_touchpad">touchpad</string> + <string name="session_touch_auto_direct">trực tiếp</string> + <string name="session_swap_failed">Thay thất bại: %1$s</string> + <string name="session_profile_save_failed">Lưu hồ sơ thất bại: %1$s</string> + <string name="session_desktop_paused">Desktop đang tạm dừng</string> + <string name="session_named_paused">%1$s đang tạm dừng</string> + <string name="session_program_paused">Chương trình đang tạm dừng</string> + <string name="session_starting_desktop">Đang khởi động desktop</string> + <string name="session_starting_named">Đang khởi động %1$s</string> + <string name="session_starting_program">Đang khởi động chương trình</string> + <string name="session_no_logs">Không có log cho phiên này.</string> + <string name="session_logs_archive_failed">Không thể tạo tệp lưu trữ log phiên.</string> + <string name="session_logs_share_failed">Không thể chia sẻ log phiên.</string> + <string name="session_starting_session">Đang khởi động phiên…</string> + <string name="session_runtime_downloading">đang tải runtime Linux</string> + <string name="session_runtime_downloading_mb">đang tải runtime Linux · %1$d trong %2$d MB</string> + <string name="session_runtime_checking">đang kiểm tra runtime Linux</string> + <string name="session_runtime_unpacking">đang giải nén runtime Linux</string> + <string name="session_desktop_downloading">đang tải desktop</string> + <string name="session_desktop_downloading_mb">đang tải desktop · %1$d trong %2$d MB</string> + <string name="session_desktop_checking">đang kiểm tra desktop</string> + <string name="session_desktop_unpacking">đang giải nén desktop</string> + <string name="session_proton_downloading">đang tải Proton Experimental (ARM64)</string> + <string name="session_proton_downloading_mb">đang tải Proton Experimental (ARM64) · %1$d trong %2$d MB</string> + <string name="session_proton_checking">đang kiểm tra Proton Experimental (ARM64)</string> + <string name="session_proton_unpacking">đang giải nén Proton Experimental (ARM64)</string> + <string name="session_runtime_catalog_unreachable">Không thể kết nối danh mục runtime. Kiểm tra kết nối và nhấn Play lại.</string> + <string name="session_runtime_install_failed">Runtime Linux chưa cài được. Kiểm tra runtime trong Thiết lập và nhấn Play lại.</string> + <string name="session_desktop_install_failed">Desktop chưa cài được (%1$s). Kiểm tra kết nối và nhấn Desktop lại.</string> + <string name="session_ended_named">%1$s đã dừng ngoài ý muốn. Hãy chia sẻ log cùng báo cáo lỗi, hoặc thử lại.</string> + <string name="session_ended_program">Chương trình đã dừng ngoài ý muốn. Hãy chia sẻ log cùng báo cáo lỗi, hoặc thử lại.</string> + <string name="session_ended_desktop">Desktop đã dừng ngoài ý muốn. Hãy chia sẻ log cùng báo cáo lỗi, hoặc thử lại.</string> + <string name="session_ended_detail">Mã thoát %1$d · %2$s</string> + <string name="session_ended_no_log">không có log</string> + <plurals name="session_hint_enosys"> + <item quantity="other">Log cho thấy %1$d lỗi \"Function not implemented\": khả năng tăng tốc seccomp của proot đang làm hỏng một helper trên thiết bị này. Hãy thử %2$s → \"%3$s\" (hoặc \"%4$s\") rồi khởi động lại.</item> + </plurals> + + <string name="mode_decky_plugins">Plugin</string> + <string name="mode_decky_plugins_hint">Cài một tệp ZIP plugin cho phiên Steam kế tiếp.</string> + <string name="mode_decky_plugin_downloading">Đang tải…</string> + <string name="mode_decky_plugin_install_zip">Cài từ ZIP</string> + <string name="store_cat_games">Games</string> + <string name="store_cat_audio_video">Âm thanh & Video</string> + <string name="store_cat_graphics">Đồ họa</string> + <string name="store_cat_internet">Internet</string> + <string name="store_cat_office">Văn phòng</string> + <string name="store_cat_developer">Nhà phát triển</string> + <string name="store_cat_education">Giáo dục</string> + <string name="store_cat_science">Khoa học</string> + <string name="store_cat_system">Hệ thống</string> + <string name="store_cat_utilities">Công cụ</string> + <string name="store_section_popular">Phổ biến</string> + <string name="store_section_trending">Xu hướng</string> + <string name="store_section_new">Mới</string> + <string name="store_section_updated">Đã cập nhật</string> + <string name="store_section_loading">đang tải…</string> + <string name="store_flatpak_setup">Thiết lập Flatpak</string> + <string name="store_problem">%1$s: %2$s</string> + <string name="store_updates_check_failed">Không thể kiểm tra cập nhật trên Flathub</string> + <string name="content_rom_installed">đã cài</string> + <string name="content_rom_folder">thư mục</string> + <string name="theme_graphite">Than chì</string> + <string name="theme_graphite_detail">Các bề mặt than chì, với màu xanh quả cầu riêng của logo cho mọi thứ được chọn, lấy nét hoặc nhấn.</string> + <string name="theme_paper">Giấy trên đen</string> + <string name="theme_paper_detail">Trắng là màu chính, xanh của biểu tượng là tín hiệu cho các đường kẻ, vòng và điểm.</string> + <string name="theme_icon_blue">Xanh biểu tượng</string> + <string name="theme_icon_blue_detail">Nền đen, chữ trắng, xanh cho mọi thứ được chọn, lấy nét hoặc nhấn.</string> + <string name="theme_electric">Xanh điện navy</string> + <string name="theme_electric_detail">Màu xanh sáng hơn, trên các bề mặt nghiêng về navy thay vì xám.</string> + <string name="pckb_key_esc">Esc</string> + <string name="pckb_key_ins">Ins</string> + <string name="pckb_key_del">Del</string> + <string name="pckb_key_home">Home</string> + <string name="pckb_key_end">End</string> + <string name="pckb_key_pgup">PgUp</string> + <string name="pckb_key_pgdn">PgDn</string> + <string name="pckb_key_backspace">⌫ Backspace</string> + <string name="pckb_key_tab">Tab ⇥</string> + <string name="pckb_key_caps">Caps</string> + <string name="pckb_key_enter">Enter ⏎</string> + <string name="pckb_key_shift">⇧ Shift</string> + <string name="pckb_key_ctrl">Ctrl</string> + <string name="pckb_key_super">Super</string> + <string name="pckb_key_alt">Alt</string> + <string name="pckb_key_space">Space</string> + <string name="pckb_key_altgr">AltGr</string> + <string name="second_key_tab">Tab</string> + <string name="second_key_on">%1$s ✓</string> + <string name="second_key_ctrl_c">Ctrl+C</string> + <string name="second_key_ctrl_d">Ctrl+D</string> + <string name="game_sync_err_runtime">Cài runtime trước</string> + <string name="game_sync_err_steam_library">Thư viện Steam không khả dụng</string> + <string name="game_sync_err_previous_sd">Thư viện SD trước đó không khả dụng</string> + <string name="game_sync_err_game_storage">Lưu trữ game không khả dụng</string> + <string name="game_sync_err_added_games">Thư mục game đã thêm không khả dụng</string> + <string name="game_sync_err_manifests">Manifest của Steam không khả dụng</string> + <string name="content_system_many">Nhiều hệ máy</string> + <string name="fm_drive_internal">Nội bộ</string> + <string name="fm_drive_linux">Hệ thống Linux</string> + <string name="fm_drive_sd">Thẻ SD</string> + <string name="fm_drive_storage">Lưu trữ</string> + <string name="fm_select">Chọn</string> + <string name="fm_properties">Thuộc tính</string> + <string name="fm_favorite_add">Thêm vào Yêu thích</string> + <string name="fm_favorite_remove">Xóa khỏi Yêu thích</string> + <string name="fm_rename">Đổi tên</string> + <string name="fm_copy">Sao chép</string> + <string name="fm_cut">Cắt</string> + <string name="fm_actions">Hành động</string> + <string name="fm_favorites">Yêu thích</string> + <string name="fm_pin_current">Ghim thư mục hiện tại</string> + <string name="fm_no_favorites">Chưa có mục yêu thích nào - ghim một thư mục bằng menu ⋮ của nó để quay lại đây nhanh.</string> + <string name="fm_unpin_favorite">Bỏ khỏi mục yêu thích</string> + <string name="fm_size_zero">0 byte</string> + <string name="fm_unit_bytes">byte</string> + <string name="fm_prop_location">Vị trí</string> + <string name="fm_prop_type">Loại</string> + <string name="fm_prop_size">Kích thước</string> + <string name="fm_prop_modified">Đã sửa đổi</string> + <string name="fm_type_folder">Thư mục</string> + <string name="fm_type_file">Tệp</string> + <string name="fm_type_ext_file">Tệp %1$s</string> + <string name="fm_read_only">Chỉ đọc</string> + <string name="fm_read_only_hint">Ngăn game (và Wine) ghi đè hoặc xóa tệp này.</string> + <string name="fm_read_only_failed">Không thể đổi Chỉ đọc</string> + <string name="fm_hidden">Ẩn</string> + <string name="fm_hidden_unsupported">Bộ lưu trữ này không thể lưu cờ ẩn.</string> + <string name="fm_hidden_hint">Đánh dấu tệp là ẩn trong Windows (thuộc tính hidden của Wine).</string> + <string name="fm_hidden_failed">Không thể đổi Ẩn trên bộ lưu trữ này</string> + <string name="fm_done">Xong</string> + <string name="fm_op_deleting">Đang xóa...</string> + <string name="fm_delete_failed">Xóa thất bại</string> + <string name="fm_op_moving">Đang di chuyển...</string> + <string name="fm_op_copying">Đang sao chép...</string> + <string name="fm_op_moving_item">Đang di chuyển - %1$s</string> + <string name="fm_op_copying_item">Đang sao chép - %1$s</string> + <string name="fm_op_moving_batch">Đang di chuyển %1$d/%2$d - %3$s</string> + <string name="fm_op_copying_batch">Đang sao chép %1$d/%2$d - %3$s</string> + <string name="fm_paste_failed">%1$d xong, %2$d thất bại</string> + <string name="fm_paste_skipped">%1$d xong, %2$d đã bỏ qua</string> + <plurals name="fm_paste_moved"> + <item quantity="other">%1$d mục đã di chuyển</item> + </plurals> + <plurals name="fm_paste_copied"> + <item quantity="other">%1$d mục đã sao chép</item> + </plurals> + <string name="fm_already_exists">\"%1$s\" đã tồn tại</string> + <string name="fm_op_renaming">Đang đổi tên...</string> + <string name="fm_rename_failed">Đổi tên thất bại</string> + <string name="fm_op_creating_folder">Đang tạo thư mục...</string> + <string name="fm_create_folder_failed">Không thể tạo thư mục</string> + <string name="fm_new_folder">Thư mục mới</string> + <string name="fm_folder_name">Tên thư mục</string> + <string name="fm_create">Tạo</string> + <string name="fm_new_name">Tên mới</string> + <string name="fm_delete_title">Xóa?</string> + <string name="fm_delete_text">Xóa \"%1$s\" vĩnh viễn?</string> + <plurals name="fm_delete_items_title"> + <item quantity="other">Xóa %1$d mục?</item> + </plurals> + <string name="fm_cannot_undo">Không thể hoàn tác việc này.</string> + <plurals name="fm_and_more"> + <item quantity="other">…và %1$d mục nữa</item> + </plurals> + <string name="fm_op_deleting_batch">Đang xóa %1$d/%2$d - %3$s</string> + <plurals name="fm_delete_some_failed"> + <item quantity="other">%1$d mục không thể xóa</item> + </plurals> + <string name="fm_conflict_merge_hint">Gộp sẽ thêm và thay thế các tệp trong thư mục hiện có.</string> + <string name="fm_conflict_overwrite_hint">Ghi đè sẽ thay thế tệp hiện có.</string> + <string name="fm_conflict_apply_all">Áp dụng cho mọi xung đột</string> + <string name="fm_conflict_merge">Gộp</string> + <string name="fm_conflict_overwrite">Ghi đè</string> + <string name="fm_conflict_keep_both">Giữ cả hai</string> + <string name="fm_conflict_skip">Bỏ qua</string> + <string name="fm_select_this_folder">Chọn thư mục này</string> + <string name="fm_back">Quay lại</string> + <string name="fm_drive_not_readable">%1$s đã được gắn nhưng hiện không đọc được</string> + <string name="fm_list_view">Xem dạng danh sách</string> + <string name="fm_grid_view">Xem dạng lưới</string> + <string name="fm_search">Tìm kiếm</string> + <string name="fm_sort">Sắp xếp</string> + <string name="fm_sort_name">Tên</string> + <string name="fm_sort_date">Ngày sửa đổi</string> + <string name="fm_rows_comfortable">Hàng thoải mái</string> + <string name="fm_rows_compact">Hàng gọn</string> + <string name="fm_hide_hidden">Ẩn tệp ẩn</string> + <string name="fm_show_hidden">Hiện tệp ẩn</string> + <string name="fm_hide_favorites">Ẩn mục yêu thích</string> + <string name="fm_show_favorites">Hiện mục yêu thích</string> + <string name="fm_filter_folder">Lọc thư mục này</string> + <string name="fm_free_space">%1$s trống</string> + <string name="fm_selected_count">%1$d đã chọn</string> + <string name="fm_select_none">Không chọn</string> + <string name="fm_select_all">Tất cả</string> + <string name="fm_paste">Dán</string> + <plurals name="fm_items"> + <item quantity="other">%1$d mục</item> + </plurals> + <string name="fm_paste_here">Dán %1$s vào đây</string> + <string name="fm_paste_move_here">Dán %1$s (di chuyển) vào đây</string> + <string name="fm_rail_title">Tệp</string> + <string name="fm_rail_storage">LƯU TRỮ</string> + <string name="fm_rail_quick">NHANH</string> + <string name="fm_rail_favorites">YÊU THÍCH</string> + <string name="fm_rail_downloads">Downloads</string> + <string name="fm_rail_downloads_short">Downlds</string> + <string name="fm_rail_roms">ROMs</string> + <string name="fm_rail_session_logs">Log phiên</string> + <string name="fm_rail_pictures">Pictures</string> + <string name="fm_favorite_added">Đã thêm \"%1$s\" vào Yêu thích</string> + <string name="fm_favorite_removed">Đã xóa \"%1$s\" khỏi Yêu thích</string> + <string name="fm_empty_directory">Thư mục trống</string> + <string name="fm_up_one_level">Lên một cấp</string> + <string name="fm_choose_folder">Chọn một thư mục</string> + <string name="fm_choose_file">Chọn một tệp</string> + <string name="ctrl_tint_steam_blue">Xanh Steam</string> + <string name="ctrl_tint_sky">Xanh da trời</string> + <string name="ctrl_tint_white">Trắng</string> + <string name="ctrl_tint_violet">Tím</string> + <string name="ctrl_tint_green">Xanh lá</string> + <string name="ctrl_tint_amber">Hổ phách</string> + <string name="ctrl_tint_red">Đỏ</string> + <string name="ctrl_tint_pink">Hồng</string> + <string name="ctrl_button_a">Nút A</string> + <string name="ctrl_button_b">Nút B</string> + <string name="ctrl_button_x">Nút X</string> + <string name="ctrl_button_y">Nút Y</string> + <string name="ctrl_button_lb">Bumper trái</string> + <string name="ctrl_button_rb">Bumper phải</string> + <string name="ctrl_button_lt">Trigger trái</string> + <string name="ctrl_button_rt">Trigger phải</string> + <string name="ctrl_button_view">Nút View</string> + <string name="ctrl_button_menu">Nút Menu</string> + <string name="ctrl_target_view">View</string> + <string name="ctrl_target_menu">Menu</string> + <string name="ctrl_target_up">D-pad lên</string> + <string name="ctrl_target_down">D-pad xuống</string> + <string name="ctrl_target_left">D-pad trái</string> + <string name="ctrl_target_right">D-pad phải</string> + <string name="ctrl_target_hidden">Ẩn</string> + <string name="ctrl_editor_drag">Kéo để di chuyển</string> + <string name="ctrl_editor_snap">Hít vào lưới (snap)</string> + <string name="ctrl_editor_save">Lưu</string> + <string name="second_mode_none">Không có</string> + <string name="second_mode_keyboard_trackpad">Bàn phím + trackpad</string> + <string name="second_mode_terminal">Terminal</string> + <string name="second_mode_deck_controls">Grip + trackpad Deck</string> + + <string name="rtinst_removing">Đang gỡ runtime Linux</string> + <plurals name="rtinst_removing_entries"> + <item quantity="other">Đang gỡ runtime Linux · %1$d mục</item> + </plurals> + <string name="rtinst_removed">Đã gỡ runtime Linux</string> + <string name="rtinst_removal_failed">Không thể hoàn tất việc gỡ runtime Linux. Thử gỡ lại trong Thiết lập.</string> + <string name="rtinst_removing_leftovers">Đang xóa phần còn lại của runtime</string> + <string name="rtinst_downloading">Đang tải</string> + <string name="rtinst_verifying">Đang xác minh</string> + <string name="rtinst_extracting">Đang giải nén</string> + <string name="rtinst_channel_description">Hiển thị khi runtime Linux đang được cài hoặc gỡ</string> + <string name="rtinst_title_installing">Đang cài runtime Linux</string> + <string name="rtinst_title_removing">Đang gỡ runtime Linux</string> + + <string name="deskpkg_runtime_missing">Runtime Linux chưa được cài</string> + <string name="deskpkg_no_checksum">Danh mục không có checksum cho %1$s</string> + <string name="deskpkg_checksum_mismatch">Checksum không khớp - không có gì bị thay đổi</string> + <string name="deskpkg_installing">Đang cài %1$s</string> + <string name="deskpkg_place_failed">Không thể đặt AppImage</string> + <string name="deskpkg_extract_failed">Giải nén thất bại</string> + <string name="deskpkg_install_failed">Cài thất bại</string> + + <string name="flatpakmgr_setup_failed">Thiết lập Flatpak thất bại (mã thoát %1$d)</string> + <string name="flatpakmgr_setup_unfinished">Thiết lập Flatpak chưa hoàn tất</string> + <string name="flatpakmgr_busy">Một tác vụ store khác đang chạy</string> + <string name="flatpakmgr_not_ready">Thiết lập Flatpak trước</string> + <string name="flatpakmgr_starting">Đang khởi động</string> + <string name="flatpakmgr_exit_status">Flatpak đã thoát với mã %1$d</string> + <string name="flatpakmgr_installing">Đang cài %1$s</string> + <string name="flatpakmgr_updating">Đang cập nhật %1$s</string> + <string name="flatpakmgr_removing">Đang gỡ %1$s</string> + <string name="flatpakmgr_installing_step">Đang cài %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_updating_step">Đang cập nhật %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_removing_step">Đang gỡ %1$s (%2$d/%3$d)</string> + <string name="flatpakmgr_ref_translations">bản dịch</string> + <string name="flatpakmgr_ref_graphics_drivers">driver đồ họa</string> + <string name="flatpakmgr_ref_media_codecs">codec media</string> + <string name="flatpakmgr_ref_runtime">runtime %1$s</string> + <string name="flatpakmgr_ref_runtime_branch">runtime %1$s %2$s</string> + + <string name="appimg_too_small">Tệp này quá nhỏ để là một AppImage</string> + <string name="appimg_unreadable">Không thể đọc tệp: %1$s</string> + <string name="appimg_not_linux">Đây không phải AppImage (không phải chương trình Linux)</string> + <string name="appimg_wrong_arch">AppImage này không được build cho ARM64 (aarch64) hay PC x86</string> + <string name="appimg_not_appimage">Đây là chương trình Linux nhưng không phải AppImage</string> + <string name="appimg_wrong_type">Chỉ có thể nhập AppImage loại 2 (tệp này là loại %1$d)</string> + <string name="appimg_no_space_import">Không đủ dung lượng trống: nhập cần khoảng %1$s</string> + <string name="appimg_no_space_update">Không đủ dung lượng trống: cập nhật cần khoảng %1$s</string> + <string name="appimg_import_failed">Nhập thất bại</string> + <string name="appimg_gone">AppImage đó không còn nữa</string> + <string name="appimg_update_failed">Cập nhật thất bại</string> + <string name="appimg_extracting">Đang giải nén %1$s</string> + <string name="appimg_extract_failed">Không thể giải nén AppImage</string> + <string name="appimg_extract_failed_detail">Không thể giải nén AppImage: %1$s</string> + + <string name="deckymgr_stop_session_loader">Dừng phiên đang hoạt động trước khi cài Decky Loader</string> + <string name="deckymgr_download_failed">Tải Decky Loader thất bại</string> + <string name="deckymgr_size_mismatch">Kích thước Decky Loader không khớp với metadata của bản phát hành</string> + <string name="deckymgr_checksum_download_failed">Không thể tải checksum của bản phát hành</string> + <string name="deckymgr_checksum_missing">Thiếu checksum của bản phát hành</string> + <string name="deckymgr_checksum_invalid">Checksum của bản phát hành không hợp lệ</string> + <string name="deckymgr_checksum_mismatch">Checksum Decky Loader không khớp</string> + <string name="deckymgr_not_elf">Tài sản phát hành không phải là file thực thi Linux 64-bit tương thích</string> + <string name="deckymgr_session_started_loader">Một phiên đã bắt đầu trong khi tải; hãy dừng nó trước khi cài Decky Loader</string> + <string name="deckymgr_loader_not_executable">Không thể đánh dấu PluginLoader có thể thực thi</string> + <string name="deckymgr_cef_failed">Không thể bật gỡ lỗi CEF từ xa của Steam</string> + <string name="deckymgr_stage_failed">Không thể dàn (stage) PluginLoader</string> + <string name="deckymgr_loader_preserve_failed">Không thể giữ lại PluginLoader hiện có</string> + <string name="deckymgr_loader_activate_failed">Không thể kích hoạt PluginLoader mới</string> + <string name="deckymgr_stop_session_plugin">Dừng phiên đang hoạt động trước khi cài một plugin</string> + <string name="deckymgr_loader_required">Cài Decky Loader trước khi nhập một plugin</string> + <string name="deckymgr_zip_unreadable">Không thể đọc tệp ZIP đã chọn</string> + <string name="deckymgr_plugins_dir_failed">Không thể tạo thư mục plugin Decky</string> + <string name="deckymgr_extracting_zip">Đang giải nén ZIP plugin</string> + <string name="deckymgr_zip_one_folder">ZIP plugin phải chứa một thư mục plugin cấp cao nhất</string> + <string name="deckymgr_zip_missing_files">ZIP plugin thiếu plugin.json, package.json, hoặc dist/index.js</string> + <string name="deckymgr_plugin_name_missing">Thiếu tên plugin</string> + <string name="deckymgr_session_started_plugin">Một phiên đã bắt đầu trong khi cài đặt; hãy dừng nó trước khi cài một plugin</string> + <string name="deckymgr_plugin_installed">Đã cài plugin · khởi động lại Steam để tải nó</string> + <string name="deckymgr_plugin_install_failed">Cài ZIP plugin thất bại</string> + <string name="deckymgr_zip_too_many">ZIP plugin chứa quá nhiều mục</string> + <string name="deckymgr_zip_invalid_path">ZIP plugin chứa một đường dẫn không hợp lệ</string> + <string name="deckymgr_zip_duplicate_paths">ZIP plugin chứa các đường dẫn trùng lặp</string> + <string name="deckymgr_zip_unsafe_path">ZIP plugin chứa một đường dẫn không an toàn</string> + <string name="deckymgr_folder_failed">Không thể tạo thư mục plugin</string> + <string name="deckymgr_zip_too_large">ZIP plugin giải nén vượt quá giới hạn 1 GiB</string> + <string name="deckymgr_bundled_not_executable">Không thể đánh dấu tệp nhị phân plugin đi kèm có thể thực thi</string> + <string name="deckymgr_remote_entry_invalid">Mục remote_binary không hợp lệ</string> + <string name="deckymgr_remote_name_invalid">Tên tệp nhị phân từ xa không hợp lệ</string> + <string name="deckymgr_remote_url_https">URL tệp nhị phân từ xa phải dùng HTTPS</string> + <string name="deckymgr_remote_hash_invalid">Tệp nhị phân từ xa %1$s có mã băm SHA-256 không hợp lệ</string> + <string name="deckymgr_bin_dir_failed">Không thể tạo thư mục bin của plugin</string> + <string name="deckymgr_downloading_binary">Đang tải tệp nhị phân plugin · %1$s</string> + <string name="deckymgr_binary_download_failed">Không thể tải tệp nhị phân plugin %1$s</string> + <string name="deckymgr_binary_checksum_mismatch">Checksum tệp nhị phân plugin không khớp · %1$s</string> + <string name="deckymgr_binary_not_executable">Không thể đánh dấu tệp nhị phân plugin có thể thực thi · %1$s</string> + <string name="deckymgr_binary_replace_failed">Không thể thay thế tệp nhị phân plugin · %1$s</string> + <string name="deckymgr_binary_install_failed">Không thể cài tệp nhị phân plugin · %1$s</string> + <string name="deckymgr_folder_taken">Thư mục plugin thuộc về một plugin khác</string> + <string name="deckymgr_preserve_failed">Không thể giữ lại plugin hiện có</string> + <string name="deckymgr_activate_failed">Không thể kích hoạt plugin đã nhập</string> + <string name="deckymgr_settings_failed">Không thể cập nhật thiết lập plugin Decky</string> + <string name="deckymgr_restore_failed">Không thể khôi phục plugin hiện có</string> + + <string name="adbfix_save_failed">Không thể lưu danh tính Gỡ lỗi qua mạng không dây</string> + <string name="adbfix_command_failed">Lệnh ADB thất bại (%1$d)</string> + <string name="adbfix_not_confirmed">Android không xác nhận giới hạn tiến trình con đã được đổi: %1$s</string> + <string name="adbfix_no_pairing">Chưa có ghép nối Gỡ lỗi qua mạng không dây nào được lưu</string> + <string name="adbfix_enter_address">Nhập địa chỉ IP & cổng Gỡ lỗi qua mạng không dây hiện tại</string> + + <string name="adbpair_timed_out">Hết thời gian chờ cửa sổ bật lên ghép nối. Hãy thử lại từ DroidDeck.</string> + <string name="adbpair_discovery_failed_code">Không thể tìm cửa sổ bật lên ghép nối (%1$d). Kiểm tra Wi-Fi đã bật.</string> + <string name="adbpair_discovery_failed">Không thể tìm cửa sổ bật lên ghép nối: %1$s</string> + <string name="adbpair_six_digits">Nhập đủ 6 số của mã</string> + <string name="adbpair_pairing">Đang ghép nối…</string> + <string name="adbpair_code_rejected">Mã đó không hoạt động. Mở lại cửa sổ bật lên ghép nối và nhập mã mới của nó.</string> + <string name="adbpair_connecting">Đã ghép nối. Đang kết nối…</string> + <string name="adbpair_port_not_found">Đã ghép nối, nhưng không tìm thấy cổng Gỡ lỗi qua mạng không dây. Giữ Gỡ lỗi qua mạng không dây luôn mở và thử lại.</string> + <string name="adbpair_applying">Đang áp dụng thiết lập…</string> + <string name="adbpair_command_failed">Lệnh Gỡ lỗi qua mạng không dây thất bại</string> + <string name="adbpair_channel_name">Thiết lập Gỡ lỗi qua mạng không dây</string> + <string name="adbpair_channel_description">Hỏi mã ghép nối Gỡ lỗi qua mạng không dây khi Settings đang mở</string> + <string name="adbpair_title_pair">Ghép nối Gỡ lỗi qua mạng không dây</string> + <string name="adbpair_waiting_text">Bật Gỡ lỗi qua mạng không dây, rồi nhấn “Pair device with pairing code”.</string> + <string name="adbpair_waiting_long">Bật Gỡ lỗi qua mạng không dây, rồi nhấn “Pair device with pairing code”. Ở lại trong Settings: mã sẽ hiện trong thông báo này.</string> + <string name="adbpair_code_label">Mã ghép nối 6 số</string> + <string name="adbpair_code_hint">Nhấn Enter code và nhập 6 số hiện trong Settings.</string> + <string name="adbpair_title_code">Nhập mã ghép nối Wi-Fi</string> + <string name="adbpair_title_retry">Thử lại mã</string> + <string name="adbpair_enter_code">Nhập mã</string> + <string name="adbpair_title_working">Đang thiết lập Steam</string> + <string name="adbpair_title_done">Steam đã sẵn sàng</string> + <string name="adbpair_done_text">Nhấn để quay lại DroidDeck. Bạn có thể tắt Gỡ lỗi qua mạng không dây ngay bây giờ.</string> + <string name="adbpair_title_failed">Thiết lập Gỡ lỗi qua mạng không dây đã dừng</string> + + <string name="selfinst_download_failed">Tải xuống thất bại</string> + <string name="selfinst_size_mismatch">Kích thước tải xuống không khớp với APK đã phát hành và đã bị loại bỏ - hãy thử lại</string> + <string name="selfinst_checksum_mismatch">Tệp tải xuống không khớp checksum và đã bị loại bỏ - hãy thử lại</string> + <string name="selfinst_wrong_package">Bản cập nhật này dành cho package Android %1$s, không phải %2$s</string> + <string name="selfinst_metadata_signer">Metadata cập nhật không ghi tên khóa ký phát hành của DroidDeck</string> + <string name="selfinst_unreadable">Android không thể đọc APK đã tải xuống</string> + <string name="selfinst_apk_wrong_package">APK đã tải xuống dành cho %1$s, không phải %2$s</string> + <string name="selfinst_version_mismatch">APK đã tải xuống ghi versionCode %1$d, không phải %2$d đã phát hành</string> + <string name="selfinst_downgrade">Android sẽ không cài versionCode %1$d chồng lên %2$d đã cài</string> + <string name="selfinst_no_signing">APK đã tải xuống không có thông tin ký</string> + <string name="selfinst_wrong_signer">APK đã tải xuống không được ký bằng khóa phát hành của DroidDeck</string> + <string name="appupd_http">Danh mục cập nhật trả về HTTP %1$d</string> + + <string name="loadstate_starting">Đang khởi động phiên…</string> + <string name="loadstate_elapsed">%1$d:%2$02d đã trôi qua · vẫn đang xử lý</string> + <string name="loadstate_steam_update">Đang tải bản cập nhật client Steam · %1$d%%</string> + <string name="loadstate_steam_client">Đang tải client Steam · %1$s</string> + + <string name="pextra_busy">Một lượt cài công cụ tương thích đang chạy</string> + <string name="pextra_stop_session">Dừng phiên đang hoạt động trước khi cài công cụ tương thích</string> + <string name="pextra_no_release">Không tìm thấy bản phát hành ARM64 cho %1$s</string> + <string name="pextra_no_space">Cần ít nhất 4 GB trống cộng với kích thước tải xuống để cài %1$s</string> + <string name="pextra_downloading">Đang tải %1$s %2$s</string> + <string name="pextra_retrying">Đang thử lại tải · lần %1$d trong %2$d</string> + <string name="pextra_interrupted">Tải xuống bị gián đoạn</string> + <string name="pextra_download_failed">Tải xuống thất bại; tệp dở được giữ lại để lần thử lại có thể tiếp tục</string> + <string name="pextra_too_big">Tải xuống vượt quá kích thước bản phát hành và đã bị xóa</string> + <string name="pextra_incomplete">Tải xuống chưa hoàn tất; tệp dở được giữ lại để thử lại tiếp tục</string> + <string name="pextra_verifying">Đang xác minh tải xuống</string> + <string name="pextra_checksum_unreadable">Không thể đọc checksum bản phát hành; hãy thử lại</string> + <string name="pextra_no_checksum">%1$s %2$s không công bố checksum; không có gì được cài</string> + <string name="pextra_checksum_mismatch">Checksum không khớp; tệp tải xuống đã bị xóa</string> + <string name="pextra_session_started">Một phiên đã bắt đầu trong khi tải; hãy dừng nó trước khi cài công cụ tương thích</string> + <string name="pextra_installing">Đang cài %1$s</string> + <string name="pextra_install_failed">Cài %1$s thất bại (mã thoát %2$d)</string> + <string name="pextra_could_not_install">Không thể cài %1$s</string> + <string name="esync_fetching">Đang lấy pack droiddeck-esync</string> + + <string name="cmgr_fex_linux_helpers">có trợ giúp Linux</string> + <string name="cmgr_fex_dlls_only">chỉ DLL</string> + <string name="cmgr_original_proton_updated">Gốc (Proton đã cập nhật từ lần thay gần nhất)</string> + <string name="cmgr_changed_outside">Đã thay đổi bên ngoài Components</string> + <string name="cmgr_not_present">không có</string> + <string name="cmgr_original_version">Gốc %1$s</string> + <string name="cmgr_original_from">Gốc từ %1$s</string> + <string name="cmgr_swap_queued">%1$s %2$s sẽ vào %3$s khi game đang chạy trên đó đóng lại.</string> + <string name="cmgr_swap_done">%1$s %2$s giờ đã ở trong %3$s. Áp dụng vào lần game khởi động kế tiếp.</string> + <string name="cmgr_original_missing">Gói gốc đó không được lưu</string> + <string name="cmgr_restore_queued">%1$s của %2$s sẽ trở về bản gốc khi game đang chạy trên đó đóng lại.</string> + <string name="cmgr_restore_done">%1$s của %2$s đã được khôi phục từ bản gốc %3$s.</string> + <string name="cmgr_package_in_use">%1$s đang được dùng trong %2$s. Hãy thay Proton đó sang thứ khác trước.</string> + <string name="cmgr_package_not_stored">%1$s không được lưu</string> + <string name="cmgr_deleted">Đã xóa %1$s.</string> + <string name="cmgr_original_kept">Bản gốc của build đã cài được giữ lại: đó là đường quay về.</string> + <string name="cmgr_not_stored">Chưa được lưu</string> + <string name="cmgr_deleted_original">Đã xóa bản gốc %1$s của %2$s.</string> + <string name="cmgr_nightlies_only">Lượt tải chỉ đến từ các bản phát hành Nightlies</string> + <string name="cmgr_list_predates_checksums">Danh sách gói này có trước checksum - hãy làm mới và thử lại</string> + <string name="cmgr_checksum_mismatch">Checksum không khớp</string> + + <string name="sprefs_upscaler_linear">Tuyến tính</string> + <string name="sprefs_upscaler_nearest">Gần nhất</string> + <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (chất lượng)</string> + <string name="sprefs_upscaler_sharpen">Chỉ làm nét</string> + <string name="sprefs_lod_bias_auto">Tự động (khớp tỷ lệ)</string> + + <string name="look_off_desc">Không áp dụng gì.</string> + <string name="look_game_clarity">Game Clarity</string> + <string name="look_game_clarity_desc">Làm nét với một chút tương phản - lựa chọn hàng ngày.</string> + <string name="look_vivid">Vivid</string> + <string name="look_vivid_desc">Màu sắc được đẩy mạnh. Khử dải màu được bật để bầu trời không bị sọc.</string> + <string name="look_cinematic">Cinematic</string> + <string name="look_cinematic_desc">Tương phản sâu hơn, màu lạnh hơn, cạnh được làm mượt.</string> + <string name="look_competitive">Competitive</string> + <string name="look_competitive_desc">Vùng tối được nâng lên và làm nét mạnh - phát hiện người trước tiên.</string> + <string name="look_adaptive_sharpen">Adaptive Sharpen</string> + <string name="look_adaptive_sharpen_desc">Chỉ làm nét, không đổi màu sắc.</string> + <string name="look_filmic">Filmic</string> + <string name="look_filmic_desc">Đường cong giống phim, hơi trầm.</string> + <string name="look_arcade">Arcade</string> + <string name="look_arcade_desc">Mạnh mẽ và rực rỡ.</string> + <string name="look_retro_crt">Retro CRT</string> + <string name="look_retro_crt_desc">Ống CRT và tín hiệu analog cùng áp dụng.</string> + <string name="look_upscale_sharp">Upscale Sharp</string> + <string name="look_upscale_sharp_desc">Dùng khi chạy dưới độ phân giải màn hình.</string> + <string name="look_pixel_clean">Pixel Clean</string> + <string name="look_pixel_clean_desc">Pixel sắc nét cho game 2D và các game cũ.</string> + <string name="look_anime_edge">Anime Edge</string> + <string name="look_anime_edge_desc">Viền hoạt hình cộng làm nét.</string> + + <string name="gpuinfo_not_adreno">Không phải GPU Adreno</string> + <string name="gpuinfo_supported">Được hỗ trợ</string> + <string name="gpuinfo_experimental">Thử nghiệm: driver của nó là bản build thử nghiệm</string> + <string name="gpuinfo_below_tested">Dưới mức phần cứng đã kiểm thử (Adreno 725 và mới hơn): có thể không chạy được</string> + <string name="gpuinfo_unsupported">Không được hỗ trợ: DroidDeck cần GPU Adreno (Snapdragon)</string> + + <string name="turnip_rate_limited">Đã đạt giới hạn tốc độ của GitHub - hãy thử lại sau</string> + <string name="turnip_github_http">GitHub trả về HTTP %1$d</string> + <string name="turnip_download_failed">Tải xuống thất bại</string> + <string name="turnip_list_predates_checksums">Danh sách driver này có trước checksum - hãy làm mới và thử lại</string> + <string name="turnip_checksum_mismatch">Checksum không khớp - tệp tải xuống đã bị loại bỏ</string> + <string name="turnip_not_adrenotools">Không phải driver AdrenoTools: %1$s</string> + <string name="turnip_reject_no_meta">không có meta.json</string> + <string name="turnip_reject_meta_unreadable">meta.json không đọc được (%1$s)</string> + <string name="turnip_reject_linux_driver">đây là driver runtime Linux (hãy nhập nó dưới \"Linux runtime driver\")</string> + <string name="turnip_reject_wayland">đây là driver game Wayland, mà ứng dụng này không dùng đến</string> + <string name="turnip_reject_no_library_name">meta.json không ghi tên libraryName, nên không có gì để gửi cho AdrenoTools</string> + <string name="turnip_reject_library_missing">meta.json ghi tên %1$s, nhưng không có trong zip</string> + <string name="turnip_reject_not_aarch64">%1$s không phải là thư viện chia sẻ ELF AArch64 64-bit</string> + <string name="turnip_reject_glibc">%1$s liên kết glibc - một Turnip \"-Linux\", thuộc về mục \"Linux runtime driver\"</string> + <string name="lvd_no_library">Không có libvulkan_freedreno*.so trong zip này. Một zip Turnip Android (AdrenoTools) hoặc -Wayland không phải là driver runtime Linux.</string> + <string name="lvd_not_aarch64">%1$s không phải là thư viện chia sẻ ELF AArch64 64-bit.</string> + <string name="lvd_not_glibc">%1$s không phải là driver glibc - nó liên kết libc của Android. Runtime Linux cần một zip \"-Linux\"; một Turnip thường hoặc \"-Wayland\" hoàn toàn không thể được client Steam tải.</string> + <string name="bundle_no_manifest">Không phải gói driver: không có manifest.json ghi tên một driver android và một driver linux</string> + <string name="bundle_entry_outside">Không phải gói driver: %1$s trỏ ra ngoài nó</string> + <string name="bundle_too_large">Không phải gói driver: nó giải nén vượt quá %1$d MB</string> + + <string name="gstore_sd_card">Thẻ SD</string> + <string name="gstore_folder">Thư mục</string> + + <string name="logshare_chooser">Chia sẻ log phiên</string> + + <string name="hdr_needs_android_10">cần Android 10 hoặc mới hơn (lớp hiển thị có không gian màu)</string> + <string name="hdr_none">màn hình này báo không hỗ trợ HDR</string> + <string name="hdr_not_hdr10">màn hình này hỗ trợ %1$s, không phải HDR10</string> + + <string name="gpu_this_gpu">GPU này</string> + <string name="phantom_title_on">Giới hạn tiến trình con đang bật</string> + <string name="phantom_title_unset">Giới hạn tiến trình con chưa được đặt</string> + <string name="phantom_title_unreadable">Không thể kiểm tra giới hạn tiến trình con</string> + <string name="phantom_title_off">Giới hạn tiến trình con đang tắt</string> + <string name="phantom_title_not_required">Không cần giới hạn tiến trình con</string> + <string name="phantom_instructions_fix">%1$s Nếu không thể, hãy kết nối thiết bị này với một máy tính có ADB và chạy lệnh dưới đây. Quay lại đây và kiểm tra lại.</string> + <string name="phantom_instructions_off">Phiên Steam có thể khởi động.</string> + <string name="phantom_instructions_not_applicable">Phiên bản Android này không dùng giới hạn này.</string> + <string name="phantom_fix_toggle">Bật “Tắt các mục hạn chế đối với tiến trình con” trong Developer options, và giữ Developer options luôn mở sau đó.</string> + <string name="phantom_fix_no_toggle">Phiên bản Android này không có công tắc cho việc đó. Dùng Gỡ lỗi qua mạng không dây để đổi nó từ thiết bị này.</string> + <string name="upd_block_no_apk">Bản build này không có tệp tải cho bản DroidDeck này.</string> + <string name="upd_block_version_code">Android sẽ không cài nó chồng lên bản này vì versionCode %1$d của nó thấp hơn %2$d đã cài.</string> + <string name="upd_fail_downgrade">Android sẽ không cài một phiên bản cũ hơn chồng lên phiên bản mới hơn. Hãy giữ nguyên bản này cho đến khi kênh bắt kịp.</string> + <string name="upd_fail_signature">Bản DroidDeck này được ký khác (có thể là bản build cục bộ?), nên Android sẽ không cập nhật tại chỗ.</string> + <string name="upd_fail_storage">Không đủ dung lượng trống cho bản cập nhật.</string> + <string name="upd_fail_aborted">Bản cập nhật đã bị hủy.</string> + <string name="upd_fail_with_message">Bản cập nhật không cài được: %1$s</string> + <string name="upd_fail_generic">Bản cập nhật không cài được.</string> + <string name="saves_layout_zip">zip %1$s</string> + <string name="saves_zip">zip</string> + <string name="saves_not_launched">%1$s chưa được khởi chạy</string> + <string name="saves_none_found">Không tìm thấy tệp lưu nào cho %1$s</string> + <string name="saves_not_save_zip">%1$s không có thư mục drive_c, nên nó không phải tệp zip lưu GameHub hoặc Winlator</string> + <string name="gstore_cannot_create">không thể tạo thư mục trong %1$s</string> + <string name="gstore_cannot_write">không thể ghi trong %1$s</string> + <string name="gstore_cannot_write_detail">không thể ghi trong %1$s (%2$s)</string> + <string name="gfiles_folder_unavailable">Thư mục không khả dụng</string> + <string name="gfiles_name_taken">Một tệp khác đã dùng tên %1$s</string> + <string name="gfiles_art_unavailable">Thư mục hình ảnh không khả dụng</string> + <string name="gfiles_unrelated_inventory">Thư mục có một inventory đồng bộ không liên quan</string> + <string name="gfiles_remove_failed">Không thể xóa %1$s</string> + <string name="gfiles_outside_folder">Tệp nằm ngoài thư mục xuất</string> + <string name="cmgr_fex_unnamed">FEX (bản build không có tên phiên bản)</string> + <string name="cmgr_no_profile">không có profile.json trong %1$s</string> + <string name="cmgr_not_component_package">%1$s không phải là gói thành phần Linux (loại %2$s)</string> + <string name="gstore_volume_free">%1$s · %2$s trống</string> + <string name="mode_storage_auto_short">Tự động</string> + <string name="appupd_catalog_rejected">Danh mục cập nhật không qua được kiểm tra (%1$s)</string> + <string name="main_adb_clip_label">Thiết lập tiến trình con của DroidDeck</string> + <string name="setup_signed_in_offline_unnamed">Đã đăng nhập · chế độ ngoại tuyến</string> + <string name="setup_signed_in_unnamed">Đã đăng nhập</string> + <string name="driver_tag_bundled">ĐI KÈM</string> + <string name="driver_tag_downloaded">ĐÃ TẢI</string> + <string name="driver_tag_imported">ĐÃ NHẬP</string> + <string name="driver_tag_bundle">ANDROID + LINUX</string> + <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> + <string name="display_session">Hiển thị phiên</string> + <string name="display_resolution">Độ phân giải</string> + <string name="display_game_fit">Khớp game 16:9</string> + <string name="display_game_fit_hint">Cách game 16:9 khớp với màn hình này. Từ phiên sau.</string> + <string name="display_game_fit_unavailable">Chọn Khớp màn hình hoặc một kích thước tùy chỉnh hẹp hơn 16:9.</string> + <string name="display_preserve">Giữ tỷ lệ</string> + <string name="display_stretch">Kéo giãn để khớp màn hình</string> + <string name="display_image_scaling">Chia tỷ lệ hình ảnh</string> + <string name="display_filter">Bộ lọc chia tỷ lệ</string> + <string name="display_filter_hint">Dùng chung cho Steam và Desktop.</string> + <string name="display_filter_live">Áp dụng ngay. Dùng chung cho Steam và Desktop.</string> + <string name="display_filter_note">FSR, GSR và NIS áp dụng khi phóng to hình ảnh phiên. Chỉ làm nét cũng hoạt động mà không cần phóng to.</string> + <string name="display_sharpness">Độ sắc nét bộ lọc</string> + <string name="display_frame_rate">Tốc độ khung hình</string> + <string name="display_look_filter">%1$s Đặt chia tỷ lệ thành %2$s.</string> + <string name="display_match_screen">Khớp màn hình (%1$d×%2$d)</string> + <string name="display_follow_screen">Theo màn hình (đổi kích thước khi gập hoặc mở)</string> + <string name="mode_tab_steam">Steam</string> + <string name="device_info_show">Hiện chi tiết thiết bị</string> + <string name="device_info_hide">Ẩn chi tiết thiết bị</string> + <string name="device_info_loading">Đang đọc thiết bị…</string> + <string name="device_info_copy">Sao chép</string> + <string name="device_info_copy_hint">Sao chép các chi tiết này vào báo cáo lỗi.</string> + <string name="device_info_copied">Đã sao chép.</string> + <string name="force_ssbs_title">Buộc SSBS</string> + <string name="force_ssbs_hint">Giữ một thiết lập tốc độ CPU mà Wine liên tục tắt. Có thể giúp game Windows nhanh hơn trên Snapdragon 8 Elite; thay đổi ít thấy trên chip cũ hơn. Áp dụng vào lần game khởi động kế tiếp.</string> + + <string name="rail_stores">Stores</string> + <string name="source_steam">Steam</string> + <string name="source_added">Tùy chỉnh</string> + <string name="setup_stores">Stores</string> + <string name="setup_stores_open_on">Mở một store trên</string> + <string name="setup_stores_speed">Mức tốc độ tải</string> + <string name="setup_stores_engine">Engine stores</string> + <string name="setup_stores_engine_chip_ready">● Engine sẵn sàng</string> + <string name="setup_stores_engine_chip_missing">Chưa build</string> + <string name="stores_tier_balanced">Cân bằng</string> + <string name="stores_tier_fast">Nhanh</string> + <string name="stores_tier_max">Tối đa</string> + <string name="stores_title">Stores</string> + <string name="stores_settings">Thiết lập Stores</string> + <string name="stores_settings_eyebrow">Thiết lập</string> + <string name="stores_chip_signed_out">(chưa đăng nhập)</string> + <string name="stores_tab_store">Store</string> + <string name="stores_tab_installed">Đã cài</string> + <string name="stores_tab_library">Thư viện</string> + <string name="stores_tab_all">Tất cả</string> + <string name="stores_tab_downloads">Downloads</string> + <string name="stores_tab_count">%1$s (%2$d)</string> + <string name="stores_signin">Đăng nhập</string> + <string name="stores_signout_named">%1$s · đăng xuất</string> + <string name="stores_signout_title">Đăng xuất khỏi %1$s?</string> + <string name="stores_signout_note">Game đã cài vẫn giữ. Thư viện sẽ được tải lại khi bạn đăng nhập lại.</string> + <string name="stores_signout_stay">Vẫn đăng nhập</string> + <string name="stores_signout_go">Đăng xuất</string> + <string name="stores_search_catalog">Tìm trong danh mục %1$s…</string> + <string name="stores_search_installed">Tìm game đã cài…</string> + <string name="stores_search_library">Tìm trong thư viện của bạn…</string> + <string name="stores_search_open">Tìm kiếm</string> + <string name="stores_installed_empty">Chưa cài gì</string> + <string name="stores_library_loading">Đang tải</string> + <string name="stores_nothing_matches">Không có game</string> + <string name="stores_shelves_loading">Đang tải store…</string> + <string name="stores_amazon_no_catalog">Không có danh mục</string> + <string name="stores_shelf_new">Mới</string> + <string name="stores_shelf_deals">Ưu đãi</string> + <string name="stores_shelf_free">Game miễn phí</string> + <string name="stores_shelf_trending">Xu hướng</string> + <string name="stores_shelf_library">Thư viện của bạn</string> + <string name="stores_play">Chơi</string> + <string name="stores_install">Cài</string> + <string name="stores_resume_install">Tiếp tục cài</string> + <string name="stores_dl_interrupted">Bị gián đoạn</string> + <string name="stores_install_size">Cài · %1$s</string> + <string name="stores_get_free">Lấy miễn phí</string> + <string name="stores_view_on">Xem trên %1$s</string> + <string name="stores_buy_price">Mua · %1$s</string> + <string name="stores_installed_chip">Đã cài</string> + <string name="stores_in_library">Trong thư viện</string> + <string name="stores_free">Miễn phí</string> + <string name="stores_resume">Tiếp tục</string> + <string name="stores_refresh">Làm mới</string> + <string name="stores_sort">Sắp xếp</string> + <string name="stores_sort_last_played">Chơi gần đây</string> + <string name="stores_sort_recently_installed">Cài gần đây</string> + <string name="stores_sort_title_asc">Tên A–Z</string> + <string name="stores_sort_title_desc">Tên Z–A</string> + <string name="stores_sort_size_desc">Kích thước: lớn nhất</string> + <string name="stores_sort_size_asc">Kích thước: nhỏ nhất</string> + <string name="stores_sort_release_date">Ngày phát hành</string> + <string name="stores_view_list">Chế độ danh sách</string> + <string name="stores_view_cards">Chế độ thẻ</string> + <string name="stores_show_mature">Hiện nội dung người lớn</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">Ngoại tuyến</string> + <string name="epic_card_none">Tắt</string> + <string name="epic_eos">Đăng nhập Epic (EOS)</string> + <string name="epic_offline">Khởi chạy ngoại tuyến</string> + <string name="epic_resolve">Giải quyết đăng nhập Epic</string> + <string name="epic_client_version">Phiên bản %1$s</string> + <string name="epic_client_no_runtime">Cài runtime Linux trước</string> + <string name="epic_client_checking">Đang kiểm tra phiên bản mới nhất…</string> + <string name="epic_client_unpacking">Đang giải nén…</string> + <string name="epic_client_unreachable">Máy chủ tải xuống không phản hồi</string> + <string name="epic_client_needs_fex">Epic Games Launcher cần FEX, do Steam tải xuống. Hãy mở lại launcher sau khi Steam đã khởi động.</string> + <string name="epic_client_download_failed">Tải xuống thất bại: %1$s</string> + <string name="epic_client_unpack_failed">Không thể giải nén launcher: %1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher không nhận đăng nhập. Khởi động lại từ launcher.</string> + <string name="epic_client_uninstall_body">Gỡ trình khởi chạy và giải phóng dung lượng. Các trò chơi Epic vẫn được cài đặt và hoạt động, còn thông tin đăng nhập được giữ lại cho lần cài đặt sau.</string> + <string name="epic_client_uninstall_stops">Phiên đang chạy sẽ được đóng trước.</string> + <string name="epic_client_uninstalled">Đã gỡ cài đặt Epic Games Launcher</string> + <string name="epic_client_uninstall_failed">Không thể xóa một số tệp của trình khởi chạy. Hãy thử lại.</string> + <string name="epic_client_uninstalling">Hãy chờ Epic Games Launcher gỡ cài đặt xong</string> + <string name="store_cloud_saves">Tệp lưu trên cloud</string> + <string name="cloud_upload">Tải lên cloud</string> + <string name="cloud_download">Tải xuống từ cloud</string> + <string name="cloud_none">Không có tệp lưu trên cloud</string> + <string name="cloud_conflict">Xung đột cloud</string> + <string name="cloud_conflict_files">Xung đột cloud · %1$d tệp</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">Giữ bản cloud</string> + <string name="cloud_keep_local">Giữ bản cục bộ</string> + <string name="cloud_checking">Đang kiểm tra cloud…</string> + <string name="cloud_last_sync">Đồng bộ lần cuối %1$s</string> + <string name="cloud_never">Chưa đồng bộ</string> + <string name="cloud_done">%1$d tệp</string> + <string name="stores_eyebrow_installed">đã cài</string> + <string name="stores_eyebrow_library">trong thư viện của bạn</string> + <string name="stores_eyebrow_store">store</string> + <string name="achievements_title">Thành tích</string> + <string name="achievements_count">Đã mở khóa %1$d/%2$d</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Đã mở khóa · %1$d</string> + <string name="achievements_group_locked">Đang khóa · %1$d</string> + <string name="achievements_group_hidden">Đang ẩn · %1$d</string> + <string name="achievements_hidden">Thành tích ẩn</string> + <string name="achievements_hidden_detail">Chi tiết sẽ hiện ra khi mở khóa.</string> + <string name="achievements_all">Đã mở khóa mọi thành tích</string> + <string name="achievements_reading">Đang tải…</string> + <string name="achievements_signed_out">Đăng nhập %1$s để xem thành tích của bạn.</string> + <string name="achievements_unreachable">Không thể kết nối tới %1$s. Hãy kiểm tra lại khi có mạng.</string> + <string name="achievements_none">%1$s không liệt kê thành tích nào cho game này.</string> + <string name="achievements_show_all">Hiện tất cả %1$d</string> + <string name="achievements_dialog_title">Thành tích · %1$s</string> + <string name="stores_in_steam">✓ Trong Steam</string> + <string name="stores_uninstall">Gỡ cài đặt</string> + <string name="stores_uninstalling">Đang gỡ cài đặt…</string> + <string name="stores_uninstall_title">Gỡ cài đặt %1$s?</string> + <string name="stores_uninstall_body_size">Giải phóng %1$s và gỡ nó khỏi Steam.</string> + <string name="stores_uninstall_body">Xóa các tệp của nó và shortcut Steam của nó.</string> + <string name="stores_launch_not_registered">Steam sẽ nhận ra game vào lần khởi động kế tiếp; hãy khởi chạy từ đó, hoặc mở Steam ngay.</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">Lựa chọn của Steam cho mỗi game</string> + <string name="stores_card_audio">Âm thanh</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">Components</string> + <string name="stores_card_components_value">FEX, DXVK, VKD3D</string> + <string name="stores_card_engine">Engine</string> + <string name="stores_card_engine_value">%1$s · gốc</string> + <string name="stores_card_engine_java">%1$s · tích hợp</string> + <string name="stores_how_it_runs">Cách nó chạy</string> + <string name="stores_kv_fetched">Lấy từ</string> + <string name="stores_kv_fetched_value">%1$s, bằng tài khoản của bạn</string> + <string name="stores_kv_installed_to">Cài vào</string> + <string name="stores_kv_installed_to_value">Lưu trữ game (Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">Khởi chạy bởi</string> + <string name="stores_kv_launched_by_value">Steam và Proton, cùng đường dẫn với game Steam</string> + <string name="stores_kv_launched_by_epic">Steam và Proton · đăng nhập Epic mỗi lần khởi chạy, lớp phủ EOS tắt</string> + <string name="stores_kv_launched_by_amazon">Steam và Proton · đã đặt biến Amazon Games Services</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">được thêm vào Steam khi cài (Deck UI + Steam Input)</string> + <string name="stores_downloads_empty">Không có lượt tải</string> + <string name="stores_dl_paused">Đã tạm dừng</string> + <string name="stores_dl_queued">Đang chờ</string> + <string name="stores_dl_queued_at">Đang chờ · #%1$d</string> + <string name="stores_dl_cancelled">Đã hủy</string> + <string name="stores_dl_failed">Thất bại</string> + <string name="stores_dl_failed_reason">Thất bại · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">Tạm dừng</string> + <string name="stores_dl_resume">Tiếp tục</string> + <string name="stores_dl_cancel">Hủy</string> + <string name="stores_dl_retry">Thử lại</string> + <string name="stores_dl_clear">Xóa</string> + <string name="stores_dl_clear_all">Xóa các mục đã xong</string> + <string name="stores_stage_manifest">Manifest</string> + <string name="stores_stage_download">Tải xuống</string> + <string name="stores_stage_verify">Xác minh</string> + <string name="stores_stage_install">Cài</string> + <string name="stores_stage_done">Xong</string> + <string name="stores_stage_checking">Đang kiểm tra</string> + <string name="stores_stage_downloading">Đang tải</string> + <string name="stores_dl_cancel_confirm">Xóa lượt tải?</string> + <string name="stores_dl_failed_kept">Thất bại · %1$s được giữ lại</string> + <string name="stores_stage_verifying">Đang xác minh</string> + <string name="stores_stage_installing">Đang cài</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d tệp</string> + <string name="stores_download_manager">Quản lý tải xuống</string> + <string name="stores_parallel">Số lượt tải cùng lúc</string> + <string name="stores_install_where">Cài vào</string> + <string name="stores_install_title">Cài %1$s:</string> + <string name="stores_target_internal">Nội bộ</string> + <string name="stores_target_free">%1$s trống</string> + <string name="stores_target_free_unknown">Không rõ dung lượng trống</string> + <string name="stores_storage_insufficient">Không đủ dung lượng trống: cần %1$s, chỉ còn %2$s</string> + <string name="stores_storage_low">Sắp hết dung lượng (còn %1$s, cần %2$s)</string> + <string name="stores_notification_channel">Tải xuống Store</string> + <string name="stores_notification_channel_hint">Hiển thị tiến trình tải game và giữ các lượt tải tiếp tục chạy ở nền</string> + <string name="stores_notification_one">Đang tải</string> + <string name="stores_notification_many">%1$d lượt tải</string> + <string name="stores_notification_waiting">Đang chuẩn bị…</string> + <string name="stores_notification_done_channel">Đã hoàn tất tải Store</string> + <string name="stores_notification_installed">Đã cài %1$s</string> + <string name="stores_notification_failed">Tải %1$s thất bại</string> + <string name="stores_notification_delete">Xóa</string> + <string name="stores_notification_keep">Giữ</string> + <string name="stores_login_title">Đăng nhập vào %1$s</string> + <string name="stores_login_provider_title">Đăng nhập bằng nhà cung cấp của bạn</string> + <string name="stores_login_reload">Tải lại</string> + <string name="stores_login_close">Đóng</string> + <string name="stores_login_retry">Thử lại</string> + <string name="stores_login_finishing">Đang hoàn tất đăng nhập…</string> + <string name="stores_login_error_network">Không thể tải trang đăng nhập: %1$s</string> + <string name="stores_login_error_idp_blocked">Nhà cung cấp này từ chối đăng nhập từ một trang nhúng. Hãy đăng nhập bằng mật khẩu store của bạn thay vào đó.</string> + <string name="stores_login_error_http">Trang đăng nhập trả về lỗi (HTTP %1$d).</string> + <string name="stores_login_error_ssl">Kết nối đến trang đăng nhập không an toàn.</string> + <string name="stores_login_error_verification">Không thể xác minh đăng nhập. Hãy thử lại.</string> + <string name="stores_login_error_generic">Đăng nhập thất bại. Hãy thử lại.</string> + <string name="common_close">Đóng</string> + <string name="common_back">Quay lại</string> + <string name="common_edit">Sửa</string> + <string name="games_add_all">Thêm tất cả game trong thư mục này</string> + <string name="games_added_none">Không có gì mới trong thư mục này</string> + <string name="edit_name">Tên</string> + <string name="edit_target">Đích</string> + <string name="edit_start_in">Khởi chạy trong</string> + <string name="edit_launch_options">Tùy chọn khởi chạy</string> + <string name="edit_artwork">Hình ảnh</string> + <string name="edit_other_exe">Exe khác…</string> + <string name="edit_remove">Xóa</string> + <string name="art_cover">Ảnh bìa</string> + <string name="art_wide_cover">Ảnh bìa rộng</string> + <string name="art_adjust_logo">Chỉnh logo</string> + <string name="logo_pos_default">Mặc định</string> + <string name="logo_pos_upper_left">Trên trái</string> + <string name="logo_pos_upper_center">Trên giữa</string> + <string name="logo_pos_center">Giữa</string> + <string name="logo_pos_bottom_left">Dưới trái</string> + <string name="logo_pos_bottom_center">Dưới giữa</string> + <string name="logo_pos_position">Vị trí</string> + <string name="logo_pos_size">Kích thước</string> + <string name="logo_pos_save">Lưu</string> + <string name="logo_pos_reset">Về mặc định</string> + <string name="logo_pos_hint">Được vẽ đè lên nền game như Steam làm. Vị trí chính xác có thể lệch vài pixel.</string> + <string name="logo_pos_no_logo">Game này chưa có logo. Chọn một logo để xem tại đây.</string> + <string name="logo_pos_failed">Không lưu được vị trí logo. Thử lại.</string> + <string name="art_background">Hình nền</string> + <string name="art_logo">Logo</string> + <string name="art_icon">Biểu tượng</string> + <string name="art_src_folder">Thư mục game</string> + <string name="art_src_steam">Steam</string> + <string name="art_src_sgdb">SteamGridDB</string> + <string name="art_src_file">Tệp của bạn</string> + <string name="art_src_exe">Từ exe</string> + <string name="art_src_auto">Tự động</string> + <string name="art_pick_image">Chọn hình ảnh…</string> + <string name="art_pick_title">Chọn một hình ảnh: %1$s</string> + <string name="art_reset">Đặt lại về tự động</string> + <string name="art_search_sgdb">Tìm trên SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Tìm game</string> + <string name="art_sgdb_other_games">Kết quả khác</string> + <string name="art_sgdb_none">Không có kết quả.</string> + <string name="art_sgdb_no_key">SteamGridDB cần khóa API. Thêm khóa của bạn trong Thiết lập › Launcher.</string> + <string name="art_sgdb_bad_key">SteamGridDB từ chối khóa API. Kiểm tra trong Thiết lập › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB đang giới hạn yêu cầu. Thử lại sau một phút.</string> + <string name="art_sgdb_offline">Không kết nối được SteamGridDB. Kiểm tra kết nối.</string> + <string name="art_sgdb_server">SteamGridDB gặp sự cố. Thử lại sau.</string> + <string name="art_sgdb_no_game">SteamGridDB không có kết quả cho game này. Thử tự tìm.</string> + <plurals name="games_added_n"> + <item quantity="other">%1$d game đã được thêm</item> + </plurals> + <plurals name="games_already_n"> + <item quantity="other">%1$d đã có trong Games</item> + </plurals> + <string name="hop_back">B · Về lại %1$s</string> + <string name="hop_from_games">game đó</string> + <string name="hop_from_play">Thiết lập Play</string> + <string name="sheet_graphics_drivers">Driver đồ họa</string> + <string name="comp_this_proton">Proton này</string> + <string name="comp_every_proton">Mọi Proton</string> + <string name="comp_for_every_proton">Cho mọi Proton</string> + <string name="comp_available_count">Khả dụng · %1$d</string> + <string name="comp_checked">Đã kiểm tra %1$s</string> + <string name="comp_check_all">Kiểm tra thành phần và driver mới</string> + <string name="comp_get">Lấy</string> + <string name="comp_proton_bar">%1$s · DXVK, VKD3D-Proton và FEX dưới đây thuộc về Proton này</string> + <string name="comp_device_tested">%1$s · đã kiểm thử</string> + <string name="comp_device_untested">%1$s · chưa kiểm thử</string> + <string name="comp_device_unsupported">%1$s · không hỗ trợ</string> + <string name="gpu_auto_keeps">Giữ cặp được đề xuất luôn mới</string> + <string name="gpu_bar_auto">Tự động · %1$s</string> + <string name="gpu_separately">Driver runtime và hiển thị riêng biệt</string> + <string name="gpu_use_title">Dùng %1$s?</string> + <string name="gpu_mode_title">Cách chọn driver</string> + <string name="gpu_mode_auto_detail">Cặp tốt nhất cho GPU này, luôn được cập nhật</string> + <string name="gpu_mode_pair">Cặp tương thích</string> + <string name="gpu_mode_pair_detail">Chọn một cặp; đặt cả hai driver cùng lúc</string> + <string name="gpu_mode_mix">Kết hợp tự do</string> + <string name="gpu_mode_mix_detail">Chọn hiển thị và runtime riêng</string> + <string name="gpu_mode_pair_short">Cặp</string> + <string name="gpu_mode_mix_short">Kết hợp</string> + <string name="gpu_src_auto">TỰ ĐỘNG</string> + <string name="gpu_src_pair">CẶP</string> + <string name="gpu_src_bundle">GÓI</string> + <string name="gpu_src_chosen">ĐÃ CHỌN</string> + <string name="gpu_src_by_gpu">THEO GPU</string> + <string name="gpu_src_default">MẶC ĐỊNH</string> + <string name="gpu_display_live">Đang vẽ</string> + <string name="gpu_display_pending">Cần khởi động lại · tới lúc đó %1$s vẽ</string> + <string name="gpu_runtime_live">Đang hoạt động</string> + <string name="gpu_runtime_pending">Phiên sau · phiên này dùng %1$s</string> + <string name="gpu_display_next">Vẽ màn hình. Áp dụng từ phiên sau.</string> + <string name="gpu_previous_driver">driver trước</string> + <string name="gpu_restart_banner">Khởi động lại để đổi driver hiển thị.</string> + <string name="gpu_restart_blocked">Dừng phiên hiện tại và khởi động lại DroidDeck để đổi driver hiển thị.</string> + <string name="gpu_restart_now">Khởi động lại ngay</string> + <string name="gpu_restart_later">Để sau</string> + <string name="gpu_auto_title">Tự động đã chọn cặp này cho %1$s của bạn</string> + <string name="gpu_auto_builtin_title">Tự động dùng driver có sẵn cho %1$s của bạn</string> + <string name="gpu_auto_reason">Được chọn cho dòng %1$s. Bản mới được cài trong nền.</string> + <string name="gpu_pair_title">Chọn một cặp</string> + <string name="gpu_pair_hint">Cặp đặt driver hiển thị và driver runtime cùng lúc.</string> + <string name="gpu_mix_title">Chọn từng driver</string> + <string name="gpu_mix_hint">Gói điền cả hai. Thay đổi hiển thị áp dụng sau khi khởi động lại, thay đổi runtime từ phiên sau.</string> + <string name="gpu_change_display">Đổi driver hiển thị</string> + <string name="gpu_change_runtime">Đổi driver runtime</string> + <string name="gpu_autos_pick">LỰA CHỌN CỦA TỰ ĐỘNG</string> + <string name="gpu_installed">Đã cài</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · khởi động lại để áp dụng</string> + <string name="gpu_chip_restart">%1$s · cần khởi động lại</string> + <string name="comp_this_device">Thiết bị này</string> + <string name="proton_remove_title">Xóa %1$s?</string> + <string name="setup_tab_diagnostics">Chẩn đoán</string> + <string name="setup_ready">Sẵn sàng để chơi</string> + <string name="setup_not_ready">Chưa sẵn sàng để chơi</string> + <string name="setup_ready_runtime">runtime %1$s</string> + <string name="setup_ready_limit_off">giới hạn tiến trình đã tắt</string> + <string name="setup_ready_signed_in">đã đăng nhập với %1$s</string> + <string name="setup_needs_you">Khi có gì cần bạn</string> + <string name="setup_group_look">Giao diện</string> + <string name="setup_group_device">Thiết bị này</string> + <string name="setup_group_art">Hình ảnh thư viện</string> + <string name="setup_group_download">Tải xuống</string> + <string name="setup_download_source">Nguồn</string> + <string name="setup_download_source_auto">Tự động</string> + <string name="setup_download_source_direct">Trực tiếp</string> + <string name="setup_download_source_mirror">Máy chủ gương</string> + <string name="setup_download_source_custom">Prefix riêng</string> + <string name="setup_download_mirror">Trang</string> + <string name="setup_download_prefix">Prefix</string> + <string name="flathub_eyebrow">ỨNG DỤNG LINUX</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Ứng dụng desktop cho desktop Linux, mở từ Desktop.</string> + <string name="flathub_setup">Thiết lập Flathub</string> + <string name="flathub_remove_title">Xóa %1$s?</string> + <string name="flathub_remove_note">Thiết lập và tệp của nó được giữ lại.</string> + <string name="flathub_keep">Giữ</string> + <string name="desktop_size">Dung lượng trên đĩa</string> + <string name="desktop_uninstall_title">Gỡ cài đặt desktop?</string> + <string name="desktop_all_systems">Tất cả</string> + <string name="gog_achievements">Thành tích GOG</string> + <string name="gog_achievements_hint">Đồng bộ thành tích cho các game GOG được hỗ trợ. Áp dụng từ lần khởi động kế tiếp.</string> + <string name="gog_achievements_off">Đã tắt thành tích</string> + <string name="gog_achievements_on">Đã bật thành tích</string> + <string name="gog_achievements_signin">Đăng nhập lại GOG</string> + <string name="gog_achievements_uploaded">Đã tải thành tích lên</string> + <string name="gog_achievements_pending">Đang chờ tải thành tích lên</string> + <string name="gog_achievements_enable_store">Bật thành tích GOG trong phần cài đặt Stores</string> + <string name="gog_achievements_unavailable">Không có thành tích; hãy kiểm tra nhật ký phiên</string> + <string name="achievement_unlocked">Đã mở khóa thành tích</string> + <string name="touch_paste">Dán</string> + <string name="touch_dpad">Phím chữ thập</string> + <string name="touch_left_stick">Cần analog trái</string> + <string name="touch_right_stick">Cần analog phải</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Bàn phím</string> + <string name="touch_dpad_up">Phím chữ thập lên</string> + <string name="touch_dpad_down">Phím chữ thập xuống</string> + <string name="touch_dpad_left">Phím chữ thập trái</string> + <string name="touch_dpad_right">Phím chữ thập phải</string> + <string name="touch_title">Điều khiển chạm</string> + <string name="touch_controller">Bộ điều khiển chạm</string> + <string name="touch_mouse">Chuột</string> + <string name="touch_on">Bật</string> + <string name="touch_off">Tắt</string> + <string name="touch_speed_slow">Chậm</string> + <string name="touch_speed_normal">Bình thường</string> + <string name="touch_speed_fast">Nhanh</string> + <string name="touch_edit_layout">Chỉnh sửa bố cục</string> + <string name="touch_droiddeck_menu">Menu DroidDeck</string> + <string name="touch_drag_hint">Kéo các nút điều khiển vào màn hình</string> + <string name="touch_arrange">Sắp xếp</string> + <string name="touch_discard">Hủy bỏ</string> + <string name="touch_saving">Đang lưu…</string> + <string name="touch_icon">Biểu tượng</string> + <string name="touch_narrower">R−</string> + <string name="touch_wider">R+</string> + <string name="touch_shorter">C−</string> + <string name="touch_taller">C+</string> + <string name="touch_hide">Ẩn</string> + <string name="touch_color_opacity">Màu và độ mờ…</string> + <string name="touch_copy_layout">Sao chép bố cục này</string> + <string name="touch_layout_copied">Đã sao chép bố cục; hãy dán vào bố cục chạm của bất kỳ trò chơi nào</string> + <string name="touch_paste_layout">Dán bố cục đã sao chép</string> + <string name="touch_reset_layout">Đặt lại về mặc định của Steam</string> + <string name="touch_no_binding">Nút điều khiển này không có liên kết nào trong Steam để gắn biểu tượng</string> + <string name="touch_icon_for">Biểu tượng cho %1$s</string> + <string name="touch_layout_color">Màu bố cục chạm</string> + <string name="touch_done">Xong</string> + <string name="touch_save_failed">Không thể lưu bố cục chạm</string> + <string name="touch_saved">Đã lưu bố cục chạm vào Steam</string> + <string name="touch_app_id">Ứng dụng %1$d</string> + <string name="touch_label_hint">Nhãn (không bắt buộc)</string> + <string name="touch_icons_missing">Không tìm thấy biểu tượng của Steam</string> + <plurals name="touch_icons_found"> + <item quantity="other">%1$d biểu tượng từ Steam</item> + </plurals> + <string name="touch_icon_color">Màu biểu tượng</string> + <string name="touch_button_color">Màu nút</string> + <string name="touch_no_icon">Không có biểu tượng</string> + + <string name="stores_sync_sign_in">Đang kiểm tra đăng nhập…</string> + <string name="stores_sync_library">Đang lấy thư viện của bạn…</string> + <string name="stores_sync_game_list">Đang lấy danh sách trò chơi…</string> + <string name="stores_sync_details">Đang tải chi tiết trò chơi… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="other">Đang đồng bộ %1$d trò chơi…</item> + </plurals> + <string name="stores_sync_progress">Đang đồng bộ… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Đang lấy ảnh bìa…</string> + <string name="stores_sync_failed">Đồng bộ không thành công</string> + <string name="stores_sync_no_games">Không tìm thấy trò chơi nào trong thư viện %1$s của bạn</string> + <string name="stores_sync_amazon_no_answer">Amazon Games không phản hồi về thư viện của bạn: hãy làm mới, hoặc đăng nhập lại</string> + <string name="stores_sync_gog_unreachable">Không thể kết nối với GOG</string> + <string name="stores_sync_gog_unreadable">Không thể đọc thư viện GOG của bạn</string> + <string name="stores_registering">Đang đăng ký với Steam…</string> + <string name="mode_client_arch">Client Steam</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">Chẩn đoán VAC</string> + <string name="setup_vac_diag_hint">Game Source ghi lại console (-condebug); vac.txt trong log phiên cho biết có an toàn hay không</string> + <string name="load_starting_steam_x64">Đang khởi động Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Được client Steam x86-64 sử dụng</string> + <string name="storage_uninstall_in_x64">Bản này nằm trong client Steam x86-64. Chọn x86-64 trong Client Steam, rồi gỡ cài đặt tại đây.</string> + <string name="storage_uninstall_in_arm64">Bản này nằm trong client Steam ARM64. Chọn ARM64 trong Client Steam, rồi gỡ cài đặt tại đây.</string> + <string name="drawer_page_glasses">Kính</string> + <string name="glasses_open">Kính VITURE</string> + <string name="glasses_control">Điều khiển kính</string> + <string name="glasses_driver_missing">Bản build này không có driver cho kính này.</string> + <string name="glasses_connection_failed">Không thể kết nối với kính. Hãy cắm lại cáp hoặc nhấn “Cho phép” để thử lại.</string> + <string name="glasses_allow">Cho phép</string> + <string name="glasses_allow_hint">Để DroidDeck đặt tốc độ làm mới, chế độ 3D, độ sáng, âm lượng và chống nắng của kính, đồng thời đọc dữ liệu theo dõi đầu của kính.</string> + <string name="glasses_asking">Đang chờ bạn cho phép trong hộp thoại của Android…</string> + <string name="glasses_denied">Quyền điều khiển đã bị từ chối. Hãy cho phép để thay đổi thiết lập của kính.</string> + <string name="glasses_no_control">Kính này hiển thị game, nhưng không thể thay đổi thiết lập của kính từ đây.</string> + <string name="glasses_output">Đầu ra</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Game trên kính</string> + <string name="glasses_game_on_hint">Chỉ hiển thị game trên kính. Khi tắt: điện thoại hiển thị game và Android phản chiếu màn hình điện thoại.</string> + <string name="glasses_display">Hiển thị</string> + <string name="glasses_refresh">Tốc độ làm mới</string> + <string name="glasses_3d">3D (cạnh nhau)</string> + <string name="glasses_3d_hint">Chuyển kính thông minh sang chế độ 3D song song. Chức năng theo dõi đầu được điều khiển riêng.</string> + <string name="glasses_3d_failed">Chưa xác nhận được tín hiệu 3D. Hãy thử lại khi hình ảnh 2D trở lại.</string> + <string name="glasses_no_signal">Không có hình: kính đang ở chế độ mà điện thoại này không thể xuất. Hãy giữ nút 2D/3D của kính, hoặc rút ra rồi cắm lại.</string> + <string name="glasses_3d_refresh">Tốc độ làm mới 3D</string> + <string name="glasses_auto3d">3D cho game VR</string> + <string name="glasses_auto3d_hint">Chuyển sang 3D khi SteamVR chạy, rồi chuyển lại sau đó.</string> + <string name="glasses_picture">Hình ảnh</string> + <string name="glasses_picture_hint">Tự động hiển thị nội dung phẳng ở cả hai mắt và phát hiện SteamVR. Chọn trò chơi Song song cho nội dung SBS.</string> + <string name="glasses_picture_auto">Tự động</string> + <string name="glasses_picture_screen">Màn hình ảo</string> + <string name="glasses_picture_sbs">Game 3D cạnh nhau</string> + <string name="glasses_screen_size">Chiều rộng màn hình</string> + <string name="glasses_screen_distance">Khoảng cách màn hình</string> + <string name="glasses_screen_next_session">Chiều rộng và khoảng cách được áp dụng khi game chạy trên kính dưới dạng màn hình ảo.</string> + <string name="glasses_screen_no_output">Các thiết lập này áp dụng khi “Game trên kính” đang bật và game đang hiển thị trên kính.</string> + <string name="glasses_screen_flat_hint">Tự động giữ game 2D này ở chế độ toàn màn hình. Dùng màn hình ảo để chỉnh chiều rộng, khoảng cách và theo dõi đầu.</string> + <string name="glasses_screen_use">Dùng màn hình ảo</string> + <string name="glasses_screen_direct_hint">SteamVR lấp đầy tầm nhìn. Điều chỉnh trường nhìn của nó trong VR; chiều rộng và khoảng cách chỉ áp dụng cho màn hình ảo.</string> + <string name="glasses_screen_sbs_hint">Game 3D cạnh nhau lấp đầy từng mắt. Chiều rộng và khoảng cách chỉ áp dụng cho màn hình ảo.</string> + <string name="glasses_tracking_flat_hint">Tự động giữ game 2D này cố định trong tầm nhìn. Chọn “Màn hình ảo” trong “Hiển thị” để dùng theo dõi đầu.</string> + <string name="glasses_tracking_sbs_hint">Theo dõi đầu áp dụng cho màn hình ảo hoặc game SteamVR đang chạy.</string> + <string name="glasses_hardware">Thiết bị</string> + <string name="glasses_brightness">Độ sáng</string> + <string name="glasses_volume">Âm lượng</string> + <string name="glasses_sunblock">Chống nắng</string> + <string name="glasses_sunblock_hint">Làm tối tròng kính phía trước.</string> + <string name="glasses_tracking">Theo dõi</string> + <string name="glasses_head_tracking">Theo dõi đầu</string> + <string name="glasses_head_tracking_hint">Cảm biến riêng của kính xoay màn hình ảo và SteamVR theo đầu bạn.</string> + <string name="glasses_recenter">Căn giữa lại góc nhìn</string> + <string name="glasses_recenter_button">Căn giữa lại màn hình</string> + <string name="glasses_vr_fov">Trường nhìn của SteamVR</string> + <string name="glasses_vr_fov_hint">Thấp hơn sẽ đưa SteamVR lại gần và lấp đầy kính; cao hơn cho thấy nhiều hơn xung quanh bạn.</string> + <string name="glasses_playing">Đang chơi trên %1$s</string> + <string name="glasses_calibration">Hiệu chỉnh theo dõi</string> + <string name="glasses_calibration_hint">Giảm hiện tượng trôi và căn lại mốc thăng bằng.</string> + <string name="glasses_calibration_saved_hint">Hiệu chỉnh đã lưu đang được áp dụng cho kính này.</string> + <string name="glasses_calibration_open">Hiệu chỉnh</string> + <string name="glasses_calibration_instructions">Đặt kính đang kết nối lật úp trên mặt phẳng nằm ngang, sao cho gọng kính tựa đều. Nhấn “Bắt đầu”, rồi để yên kính khoảng 8 giây. Chuyển động sẽ khiến phép đo bắt đầu lại. Thao tác này chỉnh độ trôi và độ nghiêng, không chỉnh hướng nhìn.</string> + <string name="glasses_calibration_settling">Để kính lật úp và không chạm vào. Đang chờ kính ổn định…</string> + <string name="glasses_calibration_collecting">Đang đo cảm biến. Hãy giữ yên kính.</string> + <string name="glasses_calibration_moving">Phát hiện chuyển động. Đừng chạm vào kính; phép đo sẽ tự động bắt đầu lại.</string> + <string name="glasses_calibration_turn_over">Đặt kính lật úp trên mặt phẳng nằm ngang. Phép đo sẽ bắt đầu khi kính được đặt đúng vị trí.</string> + <string name="glasses_calibration_complete">Đã lưu hiệu chỉnh. Đeo kính vào và nhìn thẳng về phía trước, rồi nhấn “Xong” để căn giữa lại.</string> + <string name="glasses_calibration_failed">Không thể hoàn tất hiệu chỉnh. Hãy kiểm tra kết nối và giữ yên kính, rồi thử lại. Hiệu chỉnh trước đó vẫn được giữ nguyên.</string> + <string name="glasses_calibration_start">Bắt đầu</string> + <string name="glasses_calibration_done">Xong</string> + <string name="glasses_calibration_reset">Đặt lại hiệu chỉnh theo dõi</string> + <string name="glasses_calibration_reset_hint">Xóa hiệu chỉnh đã lưu và khôi phục mặc định của mẫu kính? Hãy căn giữa lại sau khi đeo kính vào.</string> + <string name="glasses_calibration_reset_button">Đặt lại</string> + <string name="hand_camera_group">Theo dõi tay</string> + <string name="hand_camera_prompt_title">Theo dõi tay hoặc bộ điều khiển Joy-Con bằng camera điện thoại?</string> + <string name="hand_camera_prompt_body">Khi không có bộ điều khiển nào được kết nối, camera điện thoại sẽ theo dõi bàn tay trần của bạn trong VR: chụm ngón cái và ngón trỏ để nhấp, khép bàn tay để cầm, và xoay lòng bàn tay về phía bạn và chụm để mở menu. Với bộ điều khiển Joy-Con được ghép nối, camera sẽ theo dõi vị trí của chúng trong khi bộ điều khiển Joy-Con cung cấp khả năng xoay và nhập nút. Hình ảnh được xử lý trên thiết bị này và không bao giờ được lưu hoặc gửi đi.</string> + <string name="hand_camera_rear">Camera sau</string> + <string name="hand_camera_rear_hint">Nên dùng. Thường sắc nét và có góc nhìn rộng hơn.</string> + <string name="hand_camera_front">Camera trước</string> + <string name="hand_camera_front_hint">Dùng khi không thể hướng mặt sau thiết bị về phía bạn.</string> + <string name="hand_camera_allow">Dùng camera</string> + <string name="hand_camera_not_now">Không phải bây giờ</string> + <string name="hand_camera_setting">Theo dõi tay bằng camera</string> + <string name="hand_camera_setting_hint">Sử dụng camera điện thoại để thực hiện các cử chỉ bằng tay không hoặc để định vị bộ điều khiển Joy-Con đã ghép nối trong VR. Bộ điều khiển Joy-Con cung cấp khả năng xoay và nhập nút. Tạm dừng trong khi kính thông minh theo dõi tay hoặc bộ điều khiển Joy-Con của bạn. Hình ảnh chỉ được xử lý trên thiết bị này.</string> + <string name="hand_camera_choice">Camera</string> + <string name="hand_camera_access">Quyền camera</string> + <string name="hand_camera_access_hint">Hãy cho phép quyền camera để bắt đầu theo dõi tay.</string> + <string name="hand_camera_access_denied">Quyền camera đang tắt. Hãy bật trong thiết lập Android.</string> + <string name="hand_camera_allow_button">Cho phép</string> + <string name="hand_camera_open_settings">Mở thiết lập</string> + <string name="hand_camera_placement">Vị trí camera</string> + <string name="hand_camera_placement_hint">Hãy kiểm tra xem camera có thấy bạn không trước khi chơi.</string> + <string name="hand_camera_check">Kiểm tra</string> + <string name="hand_camera_check_title">Vị trí camera</string> + <string name="hand_camera_how_rear">Dựng thiết bị cách xa khoảng 1,5 đến 2 mét, ở độ cao ngang ngực, với camera sau hướng về phía bạn. Sau đó bước vào khung hình và đưa cả hai tay ra.</string> + <string name="hand_camera_how_front">Dựng thiết bị cách xa khoảng 1,5 đến 2 mét, ở độ cao ngang ngực, với màn hình hướng về phía bạn. Sau đó bước vào khung hình và đưa cả hai tay ra.</string> + <string name="hand_camera_starting">Đang khởi động camera…</string> + <string name="hand_camera_stand_up">Thiết bị đang nằm ngang. Hãy dựng đứng để camera hướng về phía bạn.</string> + <string name="hand_camera_upright">Hãy dựng thiết bị thẳng đứng hơn để camera hướng về phía bạn.</string> + <string name="hand_camera_not_seen">Chưa thấy bạn. Hãy bước vào khung hình để thấy rõ đầu và vai bạn.</string> + <string name="hand_camera_move_back">Hãy lùi lại một chút.</string> + <string name="hand_camera_move_closer">Hãy lại gần hơn một chút.</string> + <string name="hand_camera_show_hands">Hãy đưa cả hai tay ra nơi camera có thể nhìn thấy.</string> + <string name="hand_camera_good">Trông ổn rồi.</string> + <string name="hand_camera_failed">Không thể khởi động camera. Hãy đóng các ứng dụng khác đang dùng camera rồi thử lại.</string> + <string name="hand_camera_switch">Đổi camera</string> + <string name="hand_camera_skip">Bỏ qua</string> + <string name="hand_camera_done">Xong</string> + <string name="glasses_xreal_network_missing">Đang chờ kết nối USB Ethernet của kính. Điện thoại này có thể không cho ứng dụng truy cập kết nối đó.</string> + <string name="glasses_xreal_connection_failed">Kết nối XREAL bị gián đoạn hoặc trả về phản hồi không được hỗ trợ. Đang thử lại…</string> + <string name="glasses_xreal_experimental">Hỗ trợ 1S thử nghiệm. Dùng chế độ Follow và tắt ổn định hình ảnh trong menu của kính. Hướng theo dõi và các chế độ hiển thị vẫn cần thử nghiệm trên thiết bị.</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Chế độ Cardboard</string> + <string name="cardboard_mode_hint">Hình cho mắt trái và mắt phải dành cho kính VR điện thoại.</string> + <string name="cardboard_source">Hình ảnh</string> + <string name="cardboard_source_screen">Màn hình ảo</string> + <string name="cardboard_source_sbs">3D cạnh nhau</string> + <string name="cardboard_viewer">Kính</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">Không có thấu kính</string> + <string name="cardboard_ipd">Khoảng cách mắt</string> + <string name="cardboard_screen_width">Chiều rộng màn hình</string> + <string name="cardboard_screen_distance">Khoảng cách màn hình</string> + <string name="cardboard_head_tracking">Theo dõi đầu</string> + <string name="cardboard_no_sensor">Thiết bị này không có cảm biến xoay.</string> + <string name="cardboard_recenter">Căn giữa lại góc nhìn</string> + <string name="cardboard_recenter_button">Căn giữa lại</string> + <string name="cardboard_steamvr">SteamVR (thử nghiệm)</string> + <string name="cardboard_steamvr_install">Cài đặt</string> + <string name="cardboard_steamvr_installing">Đang tải và giải nén SteamVR…</string> + <string name="cardboard_steamvr_start">Bắt đầu</string> + <string name="cardboard_steamvr_stop">Dừng</string> + <string name="cardboard_steamvr_unavailable">Không khả dụng trong phiên này.</string> + <string name="cardboard_steamvr_failed">SteamVR không phản hồi; hãy xem nhật ký phiên.</string> + <string name="drawer_component_downloads">Tải thành phần</string> + <string name="drawer_component_downloads_hint">Bản tải xuống được dùng chung với trang Components. Chọn một phiên bản đã tải ở trên để dùng vào lần khởi chạy game kế tiếp.</string> + <string name="drawer_component_choose_download">Chọn phiên bản để tải</string> + <string name="stores_fact_developer">Nhà phát triển</string> + <string name="stores_fact_publisher">Nhà phát hành</string> + <string name="stores_fact_released">Phát hành</string> + <string name="stores_hltb_main">Cốt truyện chính</string> + <string name="stores_hltb_extras">+ Nội dung phụ</string> + <string name="stores_hltb_completionist">Hoàn thành 100%</string> + <string name="stores_hltb_hours">%1$s giờ</string> + <string name="stores_hltb_minutes">%1$d phút</string> + <string name="display_picture_position">Vị trí ảnh</string> + <string name="display_position_top">Trên</string> + <string name="display_position_bottom">Dưới</string> + <string name="display_position_center">Giữa (mặc định)</string> + <string name="setup_tab_storage">Lưu trữ</string> + <string name="storage_measuring">Đang đo dung lượng…</string> + <string name="storage_measuring_hint">Lần đầu mất vài giây.</string> + <string name="storage_internal">Bộ nhớ trong</string> + <string name="storage_used_of">Đã dùng %1$s trên %2$s</string> + <string name="storage_free">Trống %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck dùng %1$s. Đo trên %2$s.</string> + <string name="storage_rescanning">đang quét lại…</string> + <string name="storage_other_apps">Ứng dụng Android khác</string> + <string name="storage_safe_now">Có thể dọn ngay</string> + <string name="storage_safe_hint">Runtime không dùng, phần còn lại, log cũ</string> + <string name="storage_clean_up">Đang dọn…</string> + <string name="storage_session_running">Dừng phiên để dọn hoặc xóa bất cứ thứ gì. Kích thước vẫn hiển thị.</string> + <string name="storage_where">Đi đâu</string> + <string name="storage_games">Game Steam</string> + <string name="storage_game_data">Dữ liệu game</string> + <string name="storage_game_data_hint">Prefix %1$s · workshop %2$s · shader %3$s</string> + <string name="storage_tools">Proton và runtime</string> + <string name="storage_tools_unused">%1$s không dùng</string> + <string name="storage_stores">GOG, Epic và cửa hàng khác</string> + <string name="storage_stores_hint">Gỡ chúng trong Cửa hàng</string> + <string name="storage_desktop">Ứng dụng máy tính</string> + <string name="storage_desktop_hint">Ứng dụng và runtime Flatpak</string> + <string name="storage_system">Hệ thống Linux và ứng dụng Steam</string> + <string name="storage_system_hint">Cần để mọi thứ chạy được</string> + <string name="storage_app_data">Dữ liệu DroidDeck</string> + <string name="storage_app_data_hint">Log phiên cũ %1$s · bộ nhớ đệm · driver</string> + <string name="storage_legend_games">Game</string> + <string name="storage_legend_data">Dữ liệu game</string> + <string name="storage_legend_tools">Proton và runtime</string> + <string name="storage_legend_stores">Cửa hàng khác</string> + <string name="storage_legend_desktop">Ứng dụng máy tính</string> + <string name="storage_legend_system">Hệ thống Linux</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Dọn</string> + <string name="storage_clean_up_lede">Không mục nào ở đây đụng vào game đã cài hay bản tải đang chạy.</string> + <string name="storage_nothing_to_clean">Hiện không có gì để dọn.</string> + <string name="storage_selected">Đã chọn: %1$s · %2$s → sẽ trống %3$s</string> + <string name="storage_cleaning">Đang dọn…</string> + <string name="storage_free_button">Dọn %1$s</string> + <string name="storage_freed">Đã dọn %1$s.</string> + <string name="storage_item_runtimes">Runtime Steam và Proton không dùng</string> + <string name="storage_item_leftovers">Phần còn lại của game đã xóa</string> + <string name="storage_item_leftovers_unsure">Phần còn lại có thể chứa bản lưu</string> + <string name="storage_item_logs">Log phiên cũ</string> + <string name="storage_item_logs_detail">Log của phiên hiện tại vẫn giữ</string> + <string name="storage_item_custom_detail">Không game nào dùng. Cài lại trong Thành phần nếu cần.</string> + <string name="storage_item_shaders">Bộ nhớ đệm shader của game đã cài</string> + <string name="storage_item_shaders_detail">Được tạo lại khi chơi. Vài phút đầu của mỗi game sẽ giật lại.</string> + <string name="storage_tag_safe">An toàn</string> + <string name="storage_tag_unused">Không dùng</string> + <string name="storage_tag_stutter">Giật</string> + <string name="storage_tag_saves">Kiểm tra bản lưu</string> + <string name="storage_tag_default">Mặc định</string> + <string name="storage_tag_required">Cần thiết</string> + <string name="storage_tag_not_used">Không dùng</string> + <string name="storage_back">Lưu trữ</string> + <string name="storage_games_with_data">%1$s cùng dữ liệu</string> + <string name="storage_sort_largest">Lớn nhất</string> + <string name="storage_sort_least_played">Ít chơi nhất</string> + <string name="storage_sort_sd">Trên thẻ SD</string> + <string name="storage_no_games">Không có game nào ở đây.</string> + <string name="storage_played">đã chơi %1$s</string> + <string name="storage_never_played">Chưa từng chơi</string> + <string name="storage_game_parts">Game %1$s · dữ liệu %2$s</string> + <string name="storage_uninstall">Gỡ cài đặt</string> + <string name="storage_games_note">Gỡ cài đặt sẽ mở cửa sổ Steam để Steam ghi nhận. Để chuyển game sang thẻ SD, dùng Steam › Thiết lập › Lưu trữ.</string> + <string name="storage_uninstall_title">Gỡ cài đặt %1$s?</string> + <string name="storage_uninstall_body">Steam sẽ mở và yêu cầu xác nhận. Việc này dọn %1$s của game. Prefix vẫn còn cho tới khi dọn phần còn lại, và bản lưu Steam Cloud vẫn ở trong tài khoản của bạn.</string> + <string name="storage_open_steam">Mở Steam</string> + <string name="storage_tools_detail">%1$s · %2$s không dùng</string> + <string name="storage_remove_unused">Gỡ phần không dùng · %1$s</string> + <string name="storage_in_use">Đang dùng</string> + <string name="storage_not_used">Không dùng</string> + <string name="storage_remove">Gỡ</string> + <string name="storage_remove_title">Gỡ %1$s?</string> + <string name="storage_remove_body">Dọn %1$s. Steam sẽ tải lại nếu có game cần.</string> + <string name="storage_tool_fex_runtime">Cần cho game Linux x86 (FEX)</string> + <string name="storage_tool_arm_runtime">Cần cho Proton ARM64</string> + <string name="storage_tool_redist">Bộ cài VC++ và DirectX mà game cần</string> + <string name="storage_tool_fex">Chạy game Linux x86</string> + <string name="storage_tool_steam">Công cụ Steam</string> + <string name="storage_tool_old_runtime">DroidDeck chạy game mà không cần runtime này</string> + <string name="storage_tool_x86_proton">Proton x86, DroidDeck không chạy được</string> + <string name="storage_tool_custom_default">Mặc định cho mọi game</string> + <string name="storage_tool_custom_unused">Không game nào dùng</string> + <string name="storage_tool_custom_unknown">Không đọc được thiết lập Steam nên giữ lại</string> + <string name="storage_cleanup_busy">Chờ dọn dung lượng xong</string> + <string name="storage_low_title">Chỉ còn %1$s</string> + <string name="storage_low_body">Steam cần chỗ cho bản cập nhật và bộ nhớ đệm shader. Dưới 10 GB, cập nhật game có thể hỏng giữa chừng.</string> + <string name="storage_low_safe">Có thể dọn an toàn %1$s.</string> + <string name="storage_free_up">Dọn chỗ trống</string> + <string name="storage_play_anyway">Vẫn chơi</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d đã cài</item> + <item quantity="other">%d đã cài</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d trên thẻ SD</item> + <item quantity="other">%d trên thẻ SD</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d công cụ</item> + <item quantity="other">%d công cụ</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">Thư mục prefix và bộ nhớ đệm shader trống của %d game</item> + <item quantity="other">Thư mục prefix và bộ nhớ đệm shader trống của %d game</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">Prefix của %d game vẫn còn tệp, kể cả bản lưu cục bộ. Sao lưu trước nếu cần.</item> + <item quantity="other">Prefix của %d game vẫn còn tệp, kể cả bản lưu cục bộ. Sao lưu trước nếu cần.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d game</item> + <item quantity="other">%d game</item> + </plurals> + <string name="storage_tool_default_proton">Proton mặc định của DroidDeck</string> + <string name="storage_tool_proton">Tùy chọn Proton 11 của DroidDeck</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d game dùng</item> + <item quantity="other">%d game dùng</item> + </plurals> + <string name="storage_legend_components">Thành phần</string> + <string name="storage_components">Thành phần</string> + <string name="storage_item_components">Thành phần không dùng</string> + <string name="storage_component_original">Bản gốc %1$s · %2$s</string> + <string name="storage_original_confirm">Dọn %1$s. Chỉ khôi phục phiên bản Proton không còn được cài.</string> + <string name="storage_leftovers_unchecked">Chưa kiểm tra: không đọc được tệp kê khai của ứng dụng Steam, nên prefix của game đã xóa vẫn còn cho tới khi làm được.</string> + <string name="storage_failed">Thất bại: %1$s</string> + <string name="storage_desktop_shared">%1$s dùng chung</string> + <string name="storage_data_installed">Game đã cài</string> + <string name="storage_data_parts">Prefix %1$s · shader %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Dọn shader</string> + <string name="storage_data_leftovers">Game đã xóa</string> + <string name="storage_steam_app">Ứng dụng Steam %1$d</string> + <string name="storage_leftover_unsure_detail">Prefix vẫn còn tệp, có thể là bản lưu cục bộ</string> + <string name="storage_leftover_confirm">Xóa prefix Wine và bộ nhớ đệm shader (%1$s). Sao lưu trước những bản lưu quan trọng; bản lưu Steam Cloud vẫn ở trong tài khoản của bạn.</string> + <string name="storage_data_other">Đã giữ</string> + <string name="storage_data_other_title">Game ngoài Steam và prefix Steam dùng chung</string> + <string name="storage_data_other_detail">Prefix của game từ cửa hàng hoặc thêm thủ công</string> + <string name="storage_components_packages">Gói đã tải</string> + <string name="storage_components_originals">Bản gốc đã giữ</string> + <string name="storage_components_none">Chưa tải gói thành phần nào.</string> + <string name="storage_component_in_use">Được chọn cho Proton hoặc game</string> + <string name="storage_component_unused">Không được chọn ở đâu</string> + <string name="storage_original_kept">Khôi phục Proton đã cài</string> + <string name="storage_original_old">Phiên bản Proton không còn được cài</string> + <string name="storage_tag_in_use">Đang dùng</string> + <string name="storage_components_note">Thành phần đang dùng vẫn bị khóa. Chọn chúng trong Thành phần; mục gỡ ở đây có thể tải lại ở đó.</string> + <string name="storage_component_confirm">Dọn %1$s. Gói bạn tự nhập không tải lại được.</string> + <string name="storage_desktop_detail">%1$s cho ứng dụng Flatpak và phần dùng chung</string> + <string name="storage_desktop_apps_title">Ứng dụng</string> + <string name="storage_desktop_none">Chưa cài ứng dụng Flatpak nào.</string> + <string name="storage_desktop_shared_title">Dùng chung giữa ứng dụng</string> + <string name="storage_desktop_runtimes">Runtime</string> + <string name="storage_desktop_runtimes_detail">Thư viện để ứng dụng chạy; mục không dùng sẽ mất qua Gỡ phần không dùng</string> + <string name="storage_desktop_cache">Dung lượng tải xuống</string> + <string name="storage_desktop_cache_detail">Kho đối tượng và bộ nhớ đệm tải xuống của Flatpak</string> + <string name="storage_desktop_prune">Gỡ phần không dùng</string> + <string name="storage_desktop_prune_body">Gỡ các runtime không ứng dụng nào đã cài cần và dọn kho đối tượng Flatpak. Ứng dụng đã cài vẫn chạy.</string> + <string name="storage_flatpak_uninstall_body">Gỡ ứng dụng (%1$s) và các runtime không ai khác dùng. Dữ liệu trong thư mục home của bạn vẫn còn.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d gói</item> + <item quantity="other">%d gói</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d ứng dụng</item> + <item quantity="other">%d ứng dụng</item> + </plurals> + <string name="boot_movie">Video khởi động</string> + <string name="boot_movie_video">Video</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps mượt hơn nhưng tốn CPU hơn khi Steam đang khởi động. Video khởi động chọn trong cài đặt của chính Steam sẽ được ưu tiên.</string> + <string name="boot_movie_sound">Âm thanh</string> + <string name="boot_movie_custom">Video của bạn</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV hoặc WebM. Định dạng khác và tệp trên %1$d MB được chuyển sang WebM 720p ngay trên thiết bị, tối đa %2$d giây.</string> + <string name="boot_movie_import">Nhập</string> + <string name="boot_movie_remove">Xóa</string> + <string name="boot_movie_pick">Chọn video khởi động</string> + <string name="boot_movie_imported">%1$s giờ là video khởi động</string> + <string name="boot_movie_imported_silent">%1$s giờ là video khởi động, không có tiếng</string> + <string name="boot_movie_too_long">Video cần chuyển đổi phải dài tối đa %1$d giây</string> + <string name="boot_movie_converting">Đang chuyển đổi %1$d%%</string> + <string name="boot_movie_converting_started">Đang chuyển đổi %1$s cho Steam. Hãy để DroidDeck mở.</string> + <string name="boot_movie_unsupported">Thiết bị này không giải mã được video đó.</string> + <string name="boot_movie_import_failed">Không thể nhập video này</string> + <string name="glasses_experimental">Camera Luma Ultra — Thử nghiệm</string> + <string name="glasses_joycons">Theo dõi vị trí Joy-Con</string> + <string name="glasses_joycons_hint">Sử dụng camera của kính thông minh để định vị bộ điều khiển Joy-Con đã ghép nối. Xoay và nhập nút đến từ bộ điều khiển Joy-Con. Vị trí được ước tính khi cổ tay của bạn bị che khuất. Thay thế bộ điều khiển được điều khiển bằng tay không và tạm dừng theo dõi bằng camera điện thoại. Hướng bộ điều khiển Joy-Con về phía trước khi kết nối hoặc đặt lại trung tâm theo dõi.</string> + <string name="glasses_joycons_requires_position">Trước tiên hãy bật tính năng theo dõi vị trí. Yêu cầu bộ điều khiển Joy-Con có khả năng chuyển động trên Android 12 trở lên. Mặc định là tắt.</string> + <string name="setup_tab_glasses">Kính thông minh</string> + <string name="setup_glasses_scope">Cài đặt hiển thị và theo dõi đầu được chia sẻ trên các menu, trò chơi và phiên máy tính để bàn của DroidDeck.</string> + <string name="setup_glasses_connect">Kết nối kính thông minh để thay đổi cài đặt hiển thị và theo dõi của chúng. Các cài đặt đã lưu của bạn sẽ được giữ lại khi bạn ngắt kết nối.</string> + <string name="glasses_vr">Thực tế ảo (VR)</string> + <string name="glasses_display_mode">Chế độ hiển thị</string> + <string name="glasses_output_2d">Đầu ra 2D</string> + <string name="glasses_output_3d">Đầu ra 3D</string> + <string name="glasses_picture_group">Hình ảnh và màn hình ảo</string> + <string name="glasses_position_group">Vị trí và độ cao sàn</string> + <string name="glasses_hands_group">Theo dõi tay — Thử nghiệm</string> + <string name="glasses_tracking_status">Trạng thái theo dõi</string> + <string name="glasses_resolution_2d">Độ phân giải 2D</string> + <string name="glasses_resolution_3d">Độ phân giải 3D</string> + <string name="glasses_resolution_vr">Độ phân giải VR</string> + <string name="glasses_resolution_auto">Tự động</string> + <string name="glasses_resolution_inherit">Giống như 2D / 3D</string> + <string name="glasses_resolution_hint">Độ phân giải đầu ra cho mỗi mắt.</string> + <string name="glasses_refresh_30_hint">Bật Chơi game trên kính thông minh để chọn chế độ 30 Hz gốc của màn hình.</string> + <string name="glasses_3dof">Màn hình ảo 3DoF</string> + <string name="glasses_3dof_hint">Neo các trò chơi phẳng trước mặt bạn để bạn có thể nhìn xung quanh. Cho phép Chơi game trên kính thông minh mà không cần chuyển sang 3D.</string> + <string name="glasses_screen_app_wide">Chiều rộng và khoảng cách cập nhật màn hình ảo được theo dõi cho menu, trò chơi và phiên máy tính để bàn của DroidDeck ngay lập tức.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Theo dõi vị trí bao gồm xoay đầu trong SteamVR. Để chỉ theo dõi xoay, hãy tắt theo dõi vị trí.</string> + <string name="glasses_head_tracking_spatial_hint">Điều khiển chuyển động đầu trên màn hình ảo. Theo dõi vị trí bao gồm xoay đầu trong SteamVR.</string> + <string name="glasses_quick_actions">Thao tác nhanh</string> + <string name="glasses_recenter_screen_hint">Nhìn vào vị trí bạn muốn màn hình, sau đó đặt lại trung tâm theo dõi để thiết lập chiều cao và hướng của nó.</string> + <string name="glasses_recenter_joycons_button">Căn giữa lại Joy-Con</string> + <string name="phone_camera_tracking_group">Camera điện thoại — Thử nghiệm</string> + <string name="phone_camera_tracking_setting">Theo dõi tay hoặc bộ điều khiển Joy-Con</string> + <string name="glasses_6dof">Màn hình ảo 6DoF</string> + <string name="glasses_position">Theo dõi vị trí — thử nghiệm</string> + <string name="glasses_position_hint">Chuyển động vật lý trong VR và xung quanh màn hình ảo. Khởi động lại theo dõi mất một chút thời gian.</string> + <string name="glasses_eye_height">Chiều cao mắt hiện tại so với sàn nhà</string> + <string name="glasses_floor">Đặt mức sàn từ chiều cao hiện tại</string> + <string name="glasses_floor_set">Đặt mức sàn</string> + <string name="glasses_spatial_setup">Thiết lập và chẩn đoán camera stereo</string> + <string name="glasses_spatial_setup_hint">Kiểm tra hiệu chuẩn camera và theo dõi tay trước khi chơi.</string> + <string name="glasses_spatial_open">Mở thiết lập</string> + <string name="glasses_hands">Bộ điều khiển được vận hành bằng tay trần</string> + <string name="glasses_hands_hint">Sử dụng camera kính thông minh để nhắm mục tiêu bằng tay, chụm để nhấp và khép tay để nắm trong VR. Cần điều khiển của gamepad di chuyển và xoay. Thay thế tính năng theo dõi vị trí của Joy-Con. Có thể bị lag hoặc mất theo dõi trong khi chơi game.</string> + <string name="glasses_hands_ready_hint">Cho phép bộ điều khiển được vận hành bằng tay trần dưới camera Luma Ultra trong phần Theo dõi. Hiển thị bàn tay mở trước.</string> + <string name="glasses_hands_base">Hiệu chuẩn Luma Ultra dùng chung</string> + <string name="glasses_hands_base_hint">Sử dụng cơ sở Luma Ultra dùng chung. Hiệu chuẩn kính thông minh của riêng bạn để xác minh độ chính xác của chúng.</string> + <string name="glasses_hands_calibration_verified">Đã xác minh hiệu chuẩn đo được</string> + <string name="glasses_hands_calibration_required">Cần xác thực</string> + <string name="glasses_hands_calibration_required_hint">Bộ điều khiển được vận hành bằng tay trần sẽ khả dụng sau khi kiểm tra khoảng cách đo được hoàn tất.</string> + <string name="tracking_recovery_lost">Mất theo dõi</string> + <string name="tracking_recovery_restart_help">Vẫn còn mắc kẹt? Trên điện thoại của bạn: kính thông minh → Theo dõi → Mở thiết lập → Hiển thị chẩn đoán → Khởi động lại theo dõi.</string> + <string name="tracking_recovery_disconnected">Kính thông minh bị ngắt kết nối</string> + <string name="tracking_recovery_connect">Kiểm tra kết nối USB và kết nối lại kính thông minh.\nChấp nhận lời nhắc truy cập USB trên điện thoại của bạn nếu nó xuất hiện.</string> + <string name="tracking_recovery_usb_help">Sau khi kết nối, hãy từ từ nhìn xung quanh trong phòng có đủ ánh sáng để khôi phục tính năng theo dõi.</string> + <string name="tracking_recovery_recenter">Cần căn giữa lại</string> + <string name="tracking_recovery_recenter_steps">Quá trình theo dõi đã trở lại ở vị trí mới.\nNhìn về phía trước, sau đó chạm vào đặt lại trung tâm theo dõi trên điện thoại của bạn.</string> + <string name="tracking_recovery_recenter_help">Bạn cũng có thể tìm thấy tùy chọn đặt lại trung tâm theo dõi trong kính thông minh → Theo dõi → Mở thiết lập. Hiệu chuẩn camera đã lưu của bạn sẽ được giữ nguyên.</string> + <string name="tracking_recovery_stabilizing">Giữ yên một lát</string> + <string name="tracking_recovery_hold">Quá trình đặt lại trung tâm theo dõi đang diễn ra.\nGiữ kính thông minh ổn định trong khi quá trình theo dõi ổn định.</string> + <string name="tracking_recovery_automatic">Màn hình này tự động đóng khi tính năng theo dõi đầu đã sẵn sàng.</string> + <string name="glasses_steady_hand_aim">Ổn định mục tiêu bằng tay</string> + <string name="glasses_steady_hand_aim_hint">Nhắm từ vai qua lòng bàn tay của bạn. Tắt để xoay điều khiển bằng cổ tay.</string> + <string name="spatial_title">Thiết lập không gian</string> + <string name="spatial_wait_tracking">Đang chờ theo dõi…</string> + <string name="spatial_cameras_description">Camera theo dõi trái và phải</string> + <string name="spatial_camera_sync">Đồng bộ hóa máy ảnh</string> + <string name="spatial_ready">Sẵn sàng</string> + <string name="spatial_sync_hint">Đang chờ camera và theo dõi đầu xếp hàng. Giữ kính thông minh được kết nối.</string> + <string name="spatial_prepare">1. Chuẩn bị mục tiêu hiệu chuẩn</string> + <string name="spatial_print_actual">In ở kích thước thực tế</string> + <string name="spatial_print_hint">Mỗi hình vuông phải có kích thước 30 mm (1,181 in). Đặt tấm phẳng trên bề mặt cứng ở khu vực có nhiều ánh sáng.</string> + <string name="spatial_print">In bảng hiệu chuẩn</string> + <string name="spatial_capture_group">2. Chụp các góc nhìn khác nhau</string> + <string name="spatial_board_stationary">Giữ mục tiêu hiệu chuẩn cố định</string> + <string name="spatial_capture_hint">Di chuyển kính thông minh lại gần, xa hơn và sang một bên. Xoay chúng sang trái/phải, nghiêng chúng lên/xuống và nghiêng chúng sang một bên. Giữ mục tiêu hiệu chỉnh trong cả hai máy ảnh và tạm dừng một thời gian ngắn trước mỗi lần chụp.</string> + <string name="spatial_start">Bắt đầu hiệu chuẩn mới</string> + <string name="spatial_wait_sync">Đang chờ đồng bộ hóa camera.</string> + <string name="spatial_start_hint">Bắt đầu hiệu chỉnh mới để thu thập lượt xem.</string> + <string name="spatial_views_hint">Giữ mục tiêu hiệu chỉnh hiển thị trong cả hai bản xem trước. Chụp ít nhất 24 góc nhìn sắc nét từ các góc khác nhau.</string> + <string name="spatial_capturing">Đang nắm bắt…</string> + <string name="spatial_capture">Chụp ảnh mục tiêu hiệu chỉnh</string> + <string name="spatial_alignment">Tính toán căn chỉnh camera</string> + <string name="spatial_calculating">Đang tính…</string> + <string name="spatial_calculate">Tính toán hiệu chuẩn</string> + <string name="spatial_distance_group">3. Kiểm tra khoảng cách</string> + <string name="spatial_distance">Khoảng cách đo được</string> + <string name="spatial_distance_hint">Bắt đầu với 12 inch hoặc 30 cm để các điểm đánh dấu được in dễ phát hiện hơn. Chọn phép đo chính xác mà bạn sẽ sử dụng.</string> + <string name="spatial_camera_board_distance">Camera trái đến trung tâm mục tiêu hiệu chỉnh</string> + <string name="spatial_checking_distance">Đang kiểm tra khoảng cách…</string> + <string name="spatial_validate">Xác thực khoảng cách</string> + <string name="spatial_diagnostics">Chẩn đoán</string> + <string name="spatial_show_diagnostics">Hiển thị chẩn đoán</string> + <string name="spatial_diagnostics_hint">Công cụ phục hồi theo dõi và định giờ của máy ảnh.</string> + <string name="spatial_camera_timing">Thời gian của máy ảnh</string> + <string name="spatial_hand_input">Đầu vào từ theo dõi bàn tay</string> + <string name="spatial_wait_timing">Đang chờ thời gian của máy ảnh.</string> + <string name="spatial_frames">Hình ảnh máy ảnh</string> + <string name="spatial_gpu">GPU phát hiện bàn tay</string> + <string name="spatial_gpu_hint">CPU là mặc định. GPU đang ở giai đoạn thử nghiệm và có thể khiến SteamVR khởi động lại. Lựa chọn này sẽ đặt lại khi quá trình theo dõi khởi động lại.</string> + <string name="spatial_lite">Phát hiện mẫu bàn tay nhẹ nhàng</string> + <string name="spatial_lite_hint">Sử dụng bộ dò tìm lòng bàn tay Lite và các điểm chính Lite trên bàn tay. Kiểm tra độ chính xác của việc nhắm, chụm và lấy. Đặt lại khi theo dõi khởi động lại.</string> + <string name="spatial_adaptive">Tần số đầu vào tự động để theo dõi bàn tay</string> + <string name="spatial_adaptive_hint">Điều chỉnh đầu vào theo tốc độ xử lý. Đặt lại khi theo dõi khởi động lại.</string> + <string name="spatial_half_rate">Giới hạn tần số đầu vào để theo dõi bàn tay</string> + <string name="spatial_half_rate_hint">Sử dụng một nửa số hình ảnh của camera. Tắt để so sánh tần số tối đa. Đặt lại khi theo dõi khởi động lại.</string> + <string name="spatial_diagnostic_capture">Chụp chẩn đoán</string> + <string name="spatial_diagnostic_capture_hint">Lưu cục bộ một cặp hình ảnh nổi. Hình ảnh chỉ được lưu khi được yêu cầu.</string> + <string name="spatial_save_frame">Lưu hình ảnh camera</string> + <string name="spatial_restart_tracking">Khởi động lại theo dõi</string> + <string name="spatial_restart_hint">Sử dụng nếu việc theo dõi không phục hồi ở khu vực có đủ ánh sáng. Việc khởi động lại yêu cầu nguồn gốc theo dõi mới.</string> + <string name="spatial_restart">Khởi động lại</string> + <string name="spatial_restart_title">Khởi động lại theo dõi?</string> + <string name="spatial_restart_confirm">Các chế độ xem hiệu chuẩn chưa được lưu sẽ bị mất. Sau đó, giữ kính thông minh yên và đặt lại trung tâm theo dõi khi quá trình theo dõi được khôi phục.</string> + <string name="spatial_views_count">%1$d / 24 lượt xem được chụp</string> + <string name="spatial_capture_paused">Đã tạm dừng chụp: %1$s</string> + <string name="spatial_measure_hint">Biện pháp %1$s. Hiển thị mục tiêu hiệu chỉnh hoàn chỉnh trong cả hai bản xem trước, sau đó giữ yên.</string> + <string name="spatial_timing_values">%1$.1f Hz • tuổi hình ảnh %2$.1f ms • xử lý %3$.1f ms</string> + <string name="spatial_input_values">Giới hạn đầu vào %1$.1f Hz • %2$.0f%% hình ảnh camera. Theo dõi đầu tiếp tục ở tần số tối đa.</string> + <string name="spatial_frame_counts">%1$d đã xử lý • %2$d bị loại bỏ • %3$d bị bỏ qua theo giới hạn đầu vào</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Hiệu chuẩn Luma Ultra</string> + <string name="spatial_print_scale" formatted="false">In ở tỷ lệ 100% / Kích thước thực tế. Mỗi hình vuông: 30 mm (1,181 in).</string> + <string name="spatial_print_stationary">Giữ mục tiêu hiệu chỉnh bằng phẳng và cố định; di chuyển kính thông minh giữa các lần chụp.</string> + <string name="spatial_print_check">Kiểm tra tỷ lệ: 100 mm (3,937 in) giữa các dấu tích</string> + <string name="spatial_distance_12in">12 inch (30,48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11,81 inch)</string> + <string name="spatial_distance_20in">20 inch (50,8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19,69 in)</string> + <string name="spatial_disabled">Vô hiệu hóa</string> + <string name="spatial_wait_stable">Đang chờ theo dõi ổn định</string> + <string name="spatial_disconnected">Đã ngắt kết nối</string> + <string name="spatial_hands_off">Bộ điều khiển được vận hành bằng tay trần đã tắt</string> + <string name="spatial_tracking_off">Tính năng theo dõi vị trí bị tắt hoặc kính thông minh bị ngắt kết nối</string> + <string name="spatial_recenter_pending">Yêu cầu đặt lại trung tâm theo dõi — giữ yên trong khi quá trình theo dõi ổn định</string> + <string name="spatial_tracking_lost">Mất dấu vết — đối mặt với khu vực đủ ánh sáng với chi tiết rõ ràng</string> + <string name="spatial_origin_changed">Gốc theo dõi đã thay đổi — chạm vào đặt lại trung tâm theo dõi, sau đó giữ yên</string> + <string name="spatial_active">6DoF hoạt động</string> + <string name="spatial_connect_hint">Kết nối Luma Ultra và bật theo dõi vị trí.</string> + <string name="spatial_validation_session">Đã xác minh hiệu chuẩn cho kết nối này.</string> + <string name="spatial_validation_saved">Đã xác minh và lưu hiệu chuẩn.</string> + <string name="spatial_wait_cameras">Đang chờ camera lập thể</string> + <string name="spatial_wait_hands">Chờ theo dõi bàn tay</string> + <string name="spatial_collect_instructions">Giữ mục tiêu hiệu chỉnh 5 × 7 cố định. Chụp hơn 24 góc nhìn trong khi di chuyển và xoay kính thông minh.</string> + <string name="spatial_capture_pending">Đang chờ hình ảnh camera tiếp theo. Giữ yên kính thông minh.</string> + <string name="spatial_validation_pending">Kiểm tra hình ảnh camera tiếp theo. Giữ mục tiêu hiệu chỉnh đầy đủ hiển thị và giữ yên.</string> + <string name="spatial_start_first">Bắt đầu hiệu chỉnh trước</string> + <string name="spatial_no_camera_frame">Không có hình ảnh máy ảnh mới nào được gửi đến. Hãy kiểm tra kết nối của kính thông minh và các bản xem trước của máy ảnh, sau đó thử lại.</string> + <string name="spatial_clock_reset">Đặt lại đồng hồ máy ảnh</string> + <string name="spatial_frame_changed">Hệ tọa độ theo dõi đã thay đổi. Các chế độ xem của bạn được lưu để tính toán lại. Đặt lại trung tâm theo dõi, sau đó bắt đầu một bộ mới để chụp thêm chế độ xem.</string> + <string name="spatial_device_loaded">đã tải hiệu chuẩn thiết bị</string> + <string name="spatial_base_loaded">Đã tải hiệu chuẩn cơ sở Luma Ultra</string> + <string name="spatial_calibration_needed">cần hiệu chuẩn</string> + <string name="spatial_tap_start">Trước tiên hãy nhấn vào Bắt đầu hiệu chuẩn mới.</string> + <string name="spatial_capture_recenter_pending">Đang chờ theo dõi ổn định. Giữ yên trong giây lát.</string> + <string name="spatial_capture_recenter">Quá trình theo dõi đã thay đổi. Chạm vào đặt lại trung tâm theo dõi một lần, sau đó giữ yên trước khi chụp.</string> + <string name="spatial_capture_unsynchronized">Không thể chụp: tính năng theo dõi đầu chưa đồng bộ hoặc đã thay đổi trong khi chụp. Giữ yên và thử lại.</string> + <string name="spatial_align_first">Tính toán căn chỉnh camera trước khi kiểm tra khoảng cách.</string> + <string name="spatial_processing_failed">xử lý máy ảnh không thành công</string> + <string name="spatial_hand_head_changed">Tính năng theo dõi đầu đã thay đổi trong quá trình phát hiện bàn tay</string> + <string name="spatial_hand_wait_sync">Đang chờ đồng bộ hóa camera và đầu</string> + <string name="spatial_no_wrists">Không phát hiện thấy cổ tay. Giữ tay cầm điều khiển Joy-Con của bạn ở phía trước kính thông minh</string> + <string name="spatial_no_hands">Không phát hiện thấy bàn tay nào. Hiển thị lòng bàn tay mở trước kính thông minh</string> + <string name="spatial_one_camera_wrists">Chỉ có thể nhìn thấy cổ tay trong một camera; giữ các tay cầm điều khiển của bạn ở chế độ xem chung</string> + <string name="spatial_one_camera_hands">Chỉ nhìn thấy bàn tay trong một camera; giữ cả hai lòng bàn tay trong chế độ xem chung</string> + <string name="spatial_ambiguous_hands">Cả hai camera đều nhìn thấy bàn tay, nhưng việc khớp trái/phải không rõ ràng</string> + <string name="spatial_inconsistent_depth">Đã phát hiện thấy bàn tay nhưng độ sâu lập thể không nhất quán</string> + <string name="spatial_rejected_wrist">Vị trí cổ tay bị từ chối bởi kiểm tra lập thể hoặc chuyển động</string> + <string name="spatial_inconsistent_palm">Đã phát hiện thấy các điểm nổi, nhưng hình dạng lòng bàn tay không nhất quán</string> + <string name="spatial_hands_need_calibration">Hoàn tất hiệu chỉnh và kiểm tra khoảng cách để kích hoạt tay</string> + <string name="spatial_hands_wait_stable">Đang chờ theo dõi đầu ổn định; đặt lại trung tâm theo dõi nếu được yêu cầu</string> + <string name="spatial_old_frame">Camera quan sát quá cũ; đang chờ một cặp mới</string> + <string name="spatial_fit_ready">Vừa vặn %1$.2f px. Đo khoảng cách đã chọn của bạn từ camera bên trái đến trung tâm mục tiêu hiệu chỉnh, sau đó xác thực.</string> + <string name="spatial_opencv_error">OpenCV không có sẵn: %1$s</string> + <string name="spatial_restored">%1$d lượt xem đã lưu được khôi phục. Tính toán hiệu chuẩn để thử lại hoặc bắt đầu một bộ mới để thu được nhiều dữ liệu hơn.</string> + <string name="spatial_captured">Đã chụp được %1$d / 24 lượt xem. Giữ mục tiêu hiệu chuẩn cố định; di chuyển kính thông minh để xem tiếp theo.</string> + <string name="spatial_capture_corners">Ảnh chụp bị từ chối: %1$d / 12 góc bắt buộc hiển thị ở cả hai máy ảnh. Hiển thị thêm mục tiêu hiệu chỉnh, giữ yên rồi thử lại.</string> + <string name="spatial_validation_error">Kiểm tra khoảng cách không thể hoàn thành: %1$s. Hãy thử lại.</string> + <string name="spatial_inference_error">Không thể phát hiện bàn tay: %1$s. Thay đổi CPU/GPU hoặc bộ điều khiển chuyển đổi được vận hành bằng tay trần để thử lại.</string> + <string name="spatial_hand_timeout">Phát hiện bàn tay vượt quá %1$d ms; quan sát bị loại bỏ</string> + <string name="spatial_wrists_tracked">%1$d/2 vị trí cổ tay Joy-Con được đo bằng lập thể</string> + <string name="spatial_palms_tracked">Lòng bàn tay được theo dõi: %1$d / 2; sẵn sàng chụm ngón: %2$d; sẵn sàng nắm: %3$d</string> + <string name="spatial_capture_saved">Đã lưu bản chụp chẩn đoán vào %1$s</string> + <string name="spatial_hand_error">Đã ngừng theo dõi bàn tay: %1$s</string> + <string name="spatial_stereo_loaded">Lập thể %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Theo dõi đầu và mục tiêu hiệu chỉnh không đồng nhất ở mức %1$s (giới hạn 5 cm / 2 in). Giữ mục tiêu hiệu chuẩn cố định và chờ theo dõi ổn định trước khi bắt đầu thiết lập mới. Xoay và nghiêng kính thông minh một cách nhẹ nhàng; tạm dừng trước mỗi lần chụp.</string> + <string name="spatial_need_views">Chụp ít nhất 24 góc nhìn khác nhau của mục tiêu hiệu chỉnh cố định.</string> + <string name="spatial_need_rotation">Xoay kính thông minh sang trái và phải và nghiêng lên xuống; chuyển động không xoay không thể hiệu chỉnh căn chỉnh camera.</string> + <string name="spatial_bad_baseline">Đường cơ sở máy ảnh đáng kinh ngạc</string> + <string name="spatial_need_orientations">Di chuyển đầu của bạn theo nhiều hướng khác nhau.</string> + <string name="spatial_bad_rotation">Xoay camera đối đầu không hợp lệ</string> + <string name="spatial_bad_alignment">Căn chỉnh giữa máy ảnh và đầu không nhất quán.</string> + <string name="spatial_calibration_error">Hiệu chỉnh không thể hoàn tất. %1$s Chế độ xem đã chụp của bạn sẽ được lưu.</string> + <string name="spatial_reprojection_error">Lỗi chiếu lại bị giữ lại %1$.2f px vượt quá 2 px. Hiệu chỉnh lại.</string> + <string name="spatial_distance_corners">%1$d / Đã phát hiện 24 góc bàn cờ ở cả hai máy ảnh. Giữ mục tiêu hiệu chỉnh đầy đủ hiển thị và giữ yên. Nếu nó đã hiển thị, hãy chọn 12 inch hoặc 30 cm và đo khoảng cách gần hơn đó trước khi thử lại.</string> + <string name="spatial_distance_depth">Mục tiêu hiệu chuẩn có thể nhìn thấy được nhưng độ sâu của nó không thể đo được một cách đáng tin cậy. Giữ cố định kính thông minh và giữ mục tiêu hiệu chỉnh bằng phẳng và đủ ánh sáng, sau đó thử lại.</string> + <string name="spatial_distance_invalid">Phép đo của camera không hợp lệ. Giữ yên và thử lại.</string> + <string name="spatial_distance_passed">Đã vượt qua kiểm tra khoảng cách.</string> + <string name="spatial_distance_retry">Kiểm tra lại khoảng cách từ máy ảnh bên trái đến tâm mục tiêu hiệu chỉnh, sau đó thử lại.</string> + <string name="spatial_distance_result">Máy ảnh đo được %1$s; khoảng cách đã chọn %2$s. %3$s</string> + <string name="spatial_wait_previews">Đợi cả hai bản xem trước của máy ảnh trước khi bắt đầu hiệu chỉnh.</string> + <string name="spatial_saved_views_hint">Các lượt xem đã lưu có thể được tính toán lại. Bắt đầu hiệu chuẩn mới để chụp trong hệ tọa độ theo dõi hiện tại.</string> + <string name="spatial_model_checksum_error">Tổng kiểm tra mô hình bàn tay không khớp</string> + <string name="spatial_opencv_load_error">OpenCV không thể tải</string> + <string name="tracking_recovery_look">Nhìn xung quanh chậm rãi trong phòng có đủ ánh sáng.\nGiữ cho camera theo dõi rõ ràng và hướng về phía đồ nội thất hoặc các chi tiết có thể nhìn thấy khác.</string> +</resources> diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 4386993cb2..c0acbc7785 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="steamvr_recovery_title">SteamVR 图形已停止工作</string> + <string name="steamvr_recovery_countdown">DroidDeck 将在 %1$d 秒后重启,以重置图形并重新打开 SteamVR。正在运行的游戏将被关闭,未保存的进度无法恢复。</string> + <string name="steamvr_recovery_repeated">最近一次重启后,图形故障再次出现。为避免循环,自动恢复已暂停。重启会关闭你的游戏,未保存的进度无法恢复。</string> + <string name="steamvr_recovery_restart">立即重启</string> + <string name="steamvr_recovery_cancel">保持打开</string> + <string name="steamvr_recovery_restarting">正在重置图形并重新打开 SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck 无法自动重启。请完全关闭应用,然后重新打开。</string> <string name="app_name">DroidDeck</string> <string-array name="loading_hints"> <item>首次运行会下载 Steam,这可能需要几分钟。</item> @@ -15,8 +22,10 @@ <string name="session_channel">会话</string> <string name="session_channel_description">在 Steam 或桌面会话打开时显示</string> <string name="session_notification">Steam 正在运行</string> + <string name="session_notification_downloads">Steam 正在下载</string> <string name="session_notification_paused">会话已暂停 — 准备好后点按恢复</string> <string name="resume_session">恢复</string> + <string name="suspend_now">立即暂停</string> <string name="stop_session">停止会话</string> <string name="frame_gen_title">帧生成</string> <string name="frame_gen_hint">选择帧生成模式</string> @@ -182,6 +191,8 @@ <string name="add_app_flatpak_id">应用 ID</string> <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> <string name="add_app_flatpak_invalid">不是 Flathub 应用 ID</string> + <string name="add_app_flatpak_bundle_hint">或选择 .flatpak 文件,用于不在 Flathub 上的应用。</string> + <string name="add_app_pick_flatpak">选择 .flatpak 文件</string> <string name="add_app_source">来源</string> <string name="add_app_appearance">在你的桌面上</string> <string name="add_app_preview_name">新应用</string> @@ -215,7 +226,7 @@ <string name="common_update">更新</string> <string name="common_checking">检查中…</string> <string name="common_working">处理中…</string> - <string name="common_forget">移除</string> + <string name="common_forget">清除</string> <string name="common_add_ellipsis">添加…</string> <string name="common_use">使用</string> <string name="common_applies_next_session">将在下次会话生效。</string> @@ -251,6 +262,10 @@ <string name="mode_osc">屏幕控制</string> <string name="mode_osc_qam">Steam + QAM</string> <string name="mode_osc_note">自动模式会在未连接手柄时显示屏幕控制。</string> + <string name="osc_steam_touch">Steam 触控(测试版)</string> + <string name="osc_style_next_session">Steam 的触控按键将从下次 Steam 会话开始生效</string> + <string name="osc_steam_layout">Steam 触控布局</string> + <string name="osc_steam_layout_hint">移动、调整大小或隐藏此游戏的触控按键;保存到 Steam</string> <string name="mode_controller">手柄</string> <string name="mode_controller_hint">决定 Steam 把你的手柄识别为哪种类型,将在下次会话生效。</string> <string name="mode_controller_deck">Steam Deck 手柄</string> @@ -268,6 +283,11 @@ <string name="mode_suspend_manual">手动</string> <string name="mode_suspend_native">原生</string> <string name="mode_suspend_steam_note">自动会暂停并在显示时恢复。原生会先让 Steam 做好睡眠准备。手动会等待点按恢复。“从不”则保持运行。</string> + <string name="mode_background_downloads">后台继续下载</string> + <string name="mode_background_downloads_hint">Steam 正在下载时推迟后台暂停。</string> + <string name="mode_zram">zRAM 压缩</string> + <string name="mode_zram_hint">游戏运行时,Steam 客户端的内存会压缩进设备的 zram,为游戏留出更多内存。下次启动 Steam 时生效。</string> + <string name="mode_zram_unsupported">不可用:此设备没有 zram 或 swap,或其内核低于 5.4。</string> <string name="mode_suspend_note">自动会在后台暂停并在显示时恢复。手动会等待点按恢复。“从不”则保持运行。</string> <string name="mode_startup">启动</string> <string name="mode_steam_startup">随 DroidDeck 启动 Steam</string> @@ -296,8 +316,8 @@ <string name="mode_sgdb_key">SteamGridDB API 密钥</string> <string name="mode_sgdb_key_yours">你的密钥</string> <string name="mode_sgdb_edit">编辑…</string> - <string name="mode_added_art_hint">按文件夹名补齐缺失的美术图。游戏文件夹中你自己的 cover.jpg、hero.jpg、logo.png 或 icon.png 优先。</string> - <string name="summary_remove_game">Remove %1$s</string> + <string name="mode_added_art_hint">自动从 Steam、其次从 SteamGridDB 补齐缺失的美术图。游戏文件夹中你自己的 cover.jpg、hero.jpg、logo.png 或 icon.png 优先。</string> + <string name="summary_remove_game">移除 %1$s</string> <string name="mode_added_remove_confirm">移除?</string> <string name="games_add">添加游戏</string> <string name="games_add_title">添加游戏:</string> @@ -331,16 +351,20 @@ <string name="wincomp_found_shipped">游戏含有 %1$s(通常可直接使用)</string> <string name="wincomp_already_here">此游戏中已有</string> <string name="wincomp_no_recommendation">游戏文件夹中没有指向任何组件的内容。</string> + <string name="wincomp_active">已为此游戏安装(%1$d)</string> <string name="wincomp_all">全部组件(%1$d)</string> <string name="wincomp_installers">需要 Windows 安装程序(%1$d)</string> - <string name="wincomp_installers_note">这些组件需要在前缀中运行真正的安装程序(.NET、PhysX、XNA、完整的 Visual C++ 安装程序等)。DroidDeck 暂时无法做到,接下来会支持。</string> + <string name="wincomp_installers_note">这些是各自的安装程序,内部没有可拆出的软件包,目前也还没有记录它们会安装什么。其中多数是 Proton 内置 Mono 已能替代的旧运行时;安装记录会陆续补充。</string> <string name="wincomp_show">显示</string> <string name="wincomp_hide">隐藏</string> - <string name="wincomp_needs_installer">需要 Windows 安装程序(即将支持)</string> + <string name="wincomp_needs_installer">会执行自己的安装程序(暂无安装记录)</string> <string name="wincomp_unsupported">此处暂不支持</string> <string name="wincomp_loading">正在加载组件…</string> <string name="wincomp_failed">无法安装:%1$s</string> <string name="wincomp_downloaded">已下载</string> + <string name="wincomp_downloading">正在下载 %1$s</string> + <string name="wincomp_installing">正在安装:%1$s</string> + <string name="wincomp_reverting">正在关闭…</string> <string name="wincomp_download_size">下载 %1$s</string> <string name="wincomp_next_launch">将在下次启动游戏时生效。</string> <string name="mode_stretch169">拉伸 16:9 比例的游戏</string> @@ -397,6 +421,51 @@ <string name="comp_check_nightlies">检查 Nightlies 上的新软件包</string> <string name="comp_proton">Proton</string> <string name="comp_proton_note">此处选择的 Proton 会运行所有未在 Steam 中单独选择 Proton 的游戏,在 Steam 中所做的更改也会显示在这里。Steam 更新时会替换 Valve 的 Proton;每个构建的原件都会保留。</string> + <string name="comp_scope">配置</string> + <string name="comp_profile_configure">设置配置档案</string> + <string name="comp_profile">配置档案</string> + <string name="comp_scope_general">默认配置档案</string> + <string name="comp_scope_general_detail">没有覆盖设置的游戏会自动使用。</string> + <string name="comp_profile_game_detail">%1$s 启动时自动使用的已保存设置。</string> + <string name="comp_game_hint">只选择此游戏需要的设置。其余设置仍使用默认配置档案。</string> + <string name="comp_game_fex">FEX 预设</string> + <string name="comp_game_fex_inherited">正在使用默认配置档案的预设。</string> + <string name="comp_game_fex_override">已为此游戏保存自定义预设。</string> + <string name="comp_game_fex_custom">自定义 FEX 变量</string> + <string name="comp_game_use_general">使用默认</string> + <string name="comp_game_compatibility">游戏兼容性</string> + <string name="comp_game_environment_hint">此游戏的 Proton、DXVK、VKD3D 及同步环境选项。</string> + <string name="comp_game_proton_inherited">正在使用默认配置档案的 Proton。</string> + <string name="comp_game_proton_override">已通过 Steam 兼容性映射为此游戏保存自定义 Proton。</string> + <string name="comp_no_proton_short">无 Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">使用默认配置档案中来自 %1$s 的组件包,除非此游戏另选了其他组件包。</string> + <string name="comp_game_component_general">使用默认配置档案的组件包。</string> + <string name="comp_game_component_override">仅此游戏使用 %1$s。</string> + <string name="comp_game_runtime_options">运行时选项</string> + <string name="comp_game_environment_other_hint">其他按游戏设置的 Proton、DXVK、VKD3D-Proton 及同步环境选项。</string> + <string name="comp_game_saved_next">%1$s 的配置档案已保存,将在下次启动游戏时生效。</string> + <string name="game_no_steam_title">不启动 Steam 直接开始</string> + <string name="game_no_steam_detail">在不启动 Steam 客户端的情况下用 Proton/FEX 打开;Steam 功能关闭。</string> + <string name="game_no_steam_on">开</string> + <string name="game_steam_with">随 Steam 启动</string> + <string name="game_steam_without">不通过 Steam 启动</string> + <string name="game_settings_card">设置</string> + <string name="game_settings_menu_title">%1$s 设置</string> + <string name="game_settings_default">默认</string> + <string name="game_settings_default_detail">将为此游戏更改的所有内容恢复为应用的设置。</string> + <string name="game_sync_custom">自定义同步变量</string> + <string name="comp_game_proton_live">%1$s 的 Proton 选择已保存,现已在 Steam 中可用。</string> + <string name="comp_game_proton_next">%1$s 的 Proton 选择已保存。启动游戏前请重启 Steam。</string> + <string name="comp_game_proton_not_runnable">%1$s 无法在此设备上使用所选的 Proton。</string> + <string name="comp_game_load_failed">无法加载 %1$s 的配置档案:%2$s</string> + <string name="comp_game_save_failed">无法保存游戏配置档案:%1$s</string> + <string name="comp_game_reset">重置游戏配置档案</string> + <string name="comp_game_reset_title">重置 %1$s 的配置档案?</string> + <string name="comp_game_reset_body">移除此游戏的 Proton、FEX、组件包、环境变量、纹理过滤和 Windows 组件覆盖设置?之后它将使用默认配置档案。</string> + <string name="comp_game_reset_done">%1$s 现在使用默认配置档案。</string> + <string name="comp_game_reset_failed">无法完全重置游戏配置档案:%1$s</string> <string name="comp_default_live">%1$s 现在将运行所有未在 Steam 中单独选择 Proton 的游戏。</string> <string name="comp_default_next">从下次 Steam 启动起,%1$s 将运行所有未单独选择 Proton 的游戏。</string> <string name="comp_default_not_runnable">%1$s 无法在此设备启动游戏,因此不能设为默认。</string> @@ -408,7 +477,7 @@ <string name="comp_esync_wanted">%1$s · 尚无 droiddeck-esync 包</string> <string name="comp_esync_builtin">%1$s · 内置 esync,无需包</string> <string name="comp_gpu_drivers">GPU 驱动</string> - <string name="comp_reapplied">%1$s · 于启动 %2$s 时重新应用</string> + <string name="comp_reapplied">%1$s · 于 %2$s 启动时重新应用</string> <string name="comp_next_queued">下一个:%1$s · 在游戏关闭后</string> <string name="comp_in_use">正在使用 %1$s:%2$s</string> <string name="comp_waits">等待游戏关闭</string> @@ -521,6 +590,10 @@ <string name="drawer_cas">锐化(CAS)</string> <string name="drawer_cas_level">锐化级别</string> <string name="drawer_fake_hdr">伪 HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">进入 SteamVR</string> + <string name="steamvr_checking">正在检查 SteamVR…</string> <string name="drawer_deband">去色带</string> <string name="drawer_deband_strength">去色带强度</string> <string name="drawer_brightness">亮度</string> @@ -538,6 +611,11 @@ <string name="drawer_texture_sharpness_note">负 mipmap 偏移:纹理更锐利,可能有轻微闪烁。自动模式会匹配会话放大到屏幕的程度。</string> <string name="drawer_touch_auto">自动(%1$s)</string> <string name="drawer_keyboard">键盘</string> + <string name="drawer_latency">延迟</string> + <string name="drawer_low_latency_controller">低延迟手柄</string> + <string name="drawer_low_latency_controller_hint">手柄以 1000 Hz 而非 250 Hz 上报。CPU 占用略高。</string> + <string name="drawer_low_latency_touch">低延迟触控</string> + <string name="drawer_low_latency_touch_hint">触控跳过帧合并,Steam 触控以 1000 Hz 上报。CPU 占用略高。</string> <string name="drawer_pc_keyboard">PC 键盘</string> <string name="drawer_android_keyboard">Android</string> <string name="drawer_second_screen">副屏</string> @@ -560,11 +638,23 @@ <string name="drawer_stop_title">停止会话?</string> <string name="drawer_running_now">当前正在运行</string> <string name="drawer_no_game">没有游戏在 Proton 上运行</string> + <string name="drawer_selected_profile">游戏配置档案</string> + <string name="drawer_selected_profile_none">配置档案详情暂不可用。</string> + <string name="drawer_profile_refresh_failed_initial">无法加载游戏配置档案。正在自动重试。</string> + <string name="drawer_profile_refresh_failed_stale">无法刷新游戏配置档案。正在显示上次可用的数据,并自动重试。</string> + <string name="drawer_profile_inspect_hint">查看和编辑下次启动时使用的已保存设置。</string> + <string name="drawer_profile_default">正在使用默认配置档案</string> + <string name="drawer_profile_custom">自定义配置档案</string> + <string name="drawer_component_inherited">正在使用默认配置档案中的 %1$s。</string> + <string name="drawer_game_components_note">更改会保存到 %1$s 的配置档案,并在下次启动游戏时生效。</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="other">%1$d 项游戏覆盖设置</item> + </plurals> <string name="drawer_no_proton">尚未安装 Proton。</string> <string name="drawer_game_running">游戏运行中</string> - <string name="drawer_reapplied">于启动 %1$s 时重新应用</string> + <string name="drawer_reapplied">于 %1$s 启动时重新应用</string> <string name="drawer_original">原件</string> - <string name="drawer_components_note">在“组件”页面下载、导入和删除。</string> + <string name="drawer_components_note">在“组件”页面导入和删除。</string> <string name="setup_check_done">完成</string> <string name="setup_check_warn">需要处理</string> <string name="setup_check_busy">处理中</string> @@ -616,6 +706,14 @@ <string name="setup_saved_logs">已保存的会话日志</string> <string name="setup_saved_logs_hint">保留最新的 %1$d 个</string> <string name="setup_clear_logs">清除日志</string> + <string name="setup_reset_settings">重置所有设置</string> + <string name="setup_reset_settings_hint">将所有设置恢复为默认值</string> + <string name="setup_reset_settings_button">重置</string> + <string name="setup_reset_settings_title">重置所有设置?</string> + <string name="setup_reset_settings_body">显示、性能、手柄、主题、语言和启动器设置将恢复为默认值。你的游戏、Steam 登录、商店账户、已下载的驱动和存储文件夹会被保留。</string> + <string name="setup_reset_settings_profiles">同时重置游戏配置档案(每个游戏的 Proton、FEX、组件和环境,以及默认配置档案的环境)</string> + <string name="setup_reset_settings_session_running">请先停止会话再重置设置。</string> + <string name="setup_reset_settings_partial">设置已重置,但部分内容未能重置。详情请查看日志。</string> <string name="setup_offline">离线模式</string> <string name="setup_sign_in_first">请先登录 Steam</string> <string name="setup_launcher">启动器</string> @@ -631,6 +729,10 @@ <string name="setup_home">用作主屏幕</string> <string name="setup_home_on">DroidDeck 可以设为主屏幕应用</string> <string name="setup_home_off">系统不会把 DroidDeck 作为主屏幕应用提供</string> + <string name="setup_orientation">屏幕方向</string> + <string name="setup_orientation_auto">自动横屏</string> + <string name="setup_orientation_landscape">横屏</string> + <string name="setup_orientation_reverse">反向横屏</string> <string name="setup_fullscreen">全屏</string> <string name="setup_fullscreen_on">隐藏 Android 状态栏和导航栏</string> <string name="setup_fullscreen_off">显示 Android 状态栏和导航栏</string> @@ -638,6 +740,88 @@ <string name="setup_choose_home">选择主屏幕应用</string> <string name="setup_choose">选择</string> <string name="setup_linux_apps">Linux 应用(测试版)</string> + <string name="drivers_auto_waits_for_session">驱动更新会等到会话结束后进行。</string> + <string name="drivers_auto_waits_for_network">退出移动数据与省电模式后,将下载 %1$s %2$s。</string> + <string name="drivers_skipping_bad">%1$s %2$s 在此设备上未能启动会话,自动模式继续使用可用的驱动。</string> + <string name="drivers_rolled_back">%1$s 两次未能启动会话,自动模式已回到可用的驱动。</string> + <string name="drivers_using_quest">使用内置的 Quest 显示驱动与运行时默认值。</string> + <string name="drivers_using_quest_restart">使用内置的 Quest 显示驱动与运行时默认值。显示驱动将在 DroidDeck 重启后生效。</string> + <string name="stores_target_free_unknown">可用空间未知</string> + <string name="stores_storage_insufficient">可用空间不足:需要 %1$s,仅剩 %2$s</string> + <string name="stores_storage_low">空间不足(可用 %1$s,需要 %2$s)</string> + <string name="art_wide_cover">宽封面</string> + <string name="art_adjust_logo">调整标志</string> + <string name="logo_pos_default">默认</string> + <string name="logo_pos_upper_left">左上</string> + <string name="logo_pos_upper_center">中上</string> + <string name="logo_pos_center">居中</string> + <string name="logo_pos_bottom_left">左下</string> + <string name="logo_pos_bottom_center">中下</string> + <string name="logo_pos_position">位置</string> + <string name="logo_pos_size">大小</string> + <string name="logo_pos_save">保存</string> + <string name="logo_pos_reset">重置为默认</string> + <string name="logo_pos_hint">显示在游戏背景上,与 Steam 的绘制方式一致。具体位置可能相差几个像素。</string> + <string name="logo_pos_no_logo">该游戏还没有标志。在标志中选择一个即可在此查看。</string> + <string name="logo_pos_failed">无法保存标志位置。请重试。</string> + <string name="art_search_sgdb">搜索 SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB:%1$s</string> + <string name="art_sgdb_search_label">搜索游戏</string> + <string name="art_sgdb_other_games">其他匹配</string> + <string name="art_sgdb_none">未找到。</string> + <string name="art_sgdb_no_key">SteamGridDB 需要 API 密钥。请在设置 › 启动器中添加。</string> + <string name="art_sgdb_bad_key">SteamGridDB 未接受该 API 密钥。请在设置 › 启动器中检查。</string> + <string name="art_sgdb_limit">SteamGridDB 当前请求受限。请稍后再试。</string> + <string name="art_sgdb_offline">无法连接 SteamGridDB。请检查网络连接。</string> + <string name="art_sgdb_server">SteamGridDB 出现问题。请稍后再试。</string> + <string name="art_sgdb_no_game">SteamGridDB 中没有该游戏的匹配项。请尝试搜索。</string> + <string name="gpu_mode_title">驱动的选择方式</string> + <string name="gpu_mode_auto_detail">为此 GPU 自动选择最佳组合并保持更新</string> + <string name="gpu_mode_pair">配对组合</string> + <string name="gpu_mode_pair_detail">选择一个组合,同时设置两个驱动</string> + <string name="gpu_mode_mix">自由搭配</string> + <string name="gpu_mode_mix_detail">分别选择显示驱动与运行时驱动</string> + <string name="gpu_mode_pair_short">配对</string> + <string name="gpu_mode_mix_short">混合</string> + <string name="gpu_src_auto">自动</string> + <string name="gpu_src_pair">配对</string> + <string name="gpu_src_bundle">内置</string> + <string name="gpu_src_chosen">已选</string> + <string name="gpu_src_by_gpu">按 GPU</string> + <string name="gpu_src_default">默认</string> + <string name="gpu_display_live">正在绘制</string> + <string name="gpu_display_pending">等待重启 · 此前由 %1$s 绘制</string> + <string name="gpu_runtime_live">正在运行</string> + <string name="gpu_runtime_pending">下次会话生效 · 本次会话继续使用 %1$s</string> + <string name="gpu_display_next">负责绘制屏幕。下次会话起生效。</string> + <string name="gpu_previous_driver">上一个驱动</string> + <string name="gpu_restart_banner">重启以切换显示驱动。</string> + <string name="gpu_restart_blocked">请先停止正在运行的会话,再重启 DroidDeck 以切换显示驱动。</string> + <string name="gpu_restart_now">立即重启</string> + <string name="gpu_restart_later">稍后</string> + <string name="gpu_auto_title">自动为你的 %1$s 选择了此组合</string> + <string name="gpu_auto_builtin_title">自动模式正在为你的 %1$s 使用内置驱动</string> + <string name="gpu_auto_reason">为 %1$s 系列选择。新版本会在后台安装。</string> + <string name="gpu_pair_title">选择组合</string> + <string name="gpu_pair_hint">组合会同时设置显示驱动与运行时驱动。</string> + <string name="gpu_mix_title">分别选择驱动</string> + <string name="gpu_mix_hint">内置包会同时填充两处。显示驱动改动在重启后生效,运行时驱动在下次会话生效。</string> + <string name="gpu_change_display">更换显示驱动</string> + <string name="gpu_change_runtime">更换运行时驱动</string> + <string name="gpu_autos_pick">自动选择</string> + <string name="gpu_installed">已安装</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · 重启后生效</string> + <string name="gpu_chip_restart">%1$s · 等待重启</string> + <string name="comp_this_device">此设备</string> + <string name="setup_group_download">下载</string> + <string name="setup_download_source">下载源</string> + <string name="setup_download_source_auto">自动</string> + <string name="setup_download_source_direct">直连</string> + <string name="setup_download_source_mirror">镜像</string> + <string name="setup_download_source_custom">自定义前缀</string> + <string name="setup_download_mirror">镜像站点</string> + <string name="setup_download_prefix">前缀</string> <string name="setup_tool_files">文件</string> <string name="setup_tool_files_hint">浏览和管理文件</string> <string name="setup_tool_protons">Proton 版本</string> @@ -769,7 +953,7 @@ <string name="gate_eyebrow">Steam</string> <string name="gate_lede">Android 会终止启动了大量后台进程的应用,而 Steam 会启动数十个。在更改此设置之前,游戏会在没有报错的情况下关闭。</string> <string name="gate_fix_for_me">帮我修复</string> - <string name="gate_toggle_steps">打开“禁用子进程限制”,然后返回。保持开发者选项开启,否则开关会再次关闭。</string> + <string name="gate_toggle_steps">打开“停止限制子进程”,然后返回。保持开发者选项开启,否则开关会再次关闭。</string> <string name="gate_open_dev">打开开发者选项</string> <string name="gate_no_toggle">此 Android 版本没有该开关,因此 DroidDeck 通过无线调试来修改。大约需要一分钟,无需电脑。</string> <string name="gate_needs_wifi">无线调试需要 Wi-Fi。任何网络都可以,不需要互联网。</string> @@ -819,8 +1003,8 @@ <string name="wadb_turn_off">关闭限制</string> <string name="wadb_other_ways">其他修改方式</string> <string name="wadb_dev_try_first">1 · 开发者选项(优先尝试)</string> - <string name="wadb_restrict_on">把“限制子进程”设为开。</string> - <string name="wadb_restrict_off">把“限制子进程”设为关。</string> + <string name="wadb_restrict_on">把“停止限制子进程”设为关。</string> + <string name="wadb_restrict_off">把“停止限制子进程”设为开。</string> <string name="wadb_computer_last">3 · 电脑 ADB(最后手段)</string> <string name="wadb_only_if">仅在无线调试不可用时使用。</string> <string name="wadb_computer_group">3 · 电脑 ADB(最后手段)</string> @@ -841,6 +1025,8 @@ <string name="ctrl_keyboard_button">键盘按钮</string> <string name="ctrl_select_steam">按 Select 打开 Steam 菜单</string> <string name="ctrl_select_steam_hint">代替 View/Select。</string> + <string name="ctrl_joycon_vr">将 Joy-Con 用作 VR 手柄</string> + <string name="ctrl_joycon_vr_hint">SteamVR 运行时,每个 Joy-Con 都会成为一只手。将其指向前方并按住 HOME 键或截图键即可重新居中。</string> <string name="setup_animations">动画</string> <string name="ctrl_adaptive_hint">摇杆出现在触摸处,松手后隐藏</string> <string name="ctrl_layout">布局</string> @@ -888,10 +1074,17 @@ <string name="content_page_gone">该页面已不存在。请在左侧选择一个分区。</string> <string name="content_open_desktop">打开桌面</string> <string name="content_install_open_desktop">安装并打开桌面</string> + <string name="desktop_remove_title">卸载桌面</string> + <string name="desktop_remove_text">移除桌面及其自带应用。游戏、已添加的应用、设置和共享库会保留。</string> + <string name="desktop_removing">正在移除桌面</string> + <string name="desktop_removed">桌面已移除</string> + <string name="desktop_cleaning_legacy">正在移除旧的 LXQt 文件</string> + <string name="desktop_removal_unknown">请先更新 DroidDeck,再移除此桌面版本。</string> <string name="content_linux_desktop">Linux 桌面</string> <string name="content_linux_desktop_hint">KDE Plasma、Firefox 和你的模拟器</string> <string name="games_empty">你在 Steam 安装的游戏会在会话结束后显示在这里。</string> <string name="games_play_steam">游玩 Steam</string> + <string name="games_play_steamvr">游玩 SteamVR</string> <string name="games_launch_settings">启动设置</string> <string name="games_launch">启动</string> <string name="games_files">游戏文件</string> @@ -916,6 +1109,8 @@ <string name="games_last_played">上次游玩于 %1$s</string> <string name="games_internal">内部存储</string> <string name="games_added">已添加游戏</string> + <string name="games_custom">自定义游戏</string> + <string name="games_store_storage">游戏存储</string> <string name="gpu_auto_hint">为此 GPU 挑选的最佳组合,并保持更新</string> <string name="gpu_manual_hint">自行挑选驱动组合</string> <string name="gpu_checking">正在检查驱动…</string> @@ -927,7 +1122,6 @@ <string name="gpu_set_with_runtime">与运行时驱动一起设置:%1$s 同时携带两者。</string> <string name="gpu_runtime_hint">由游戏和桌面使用。</string> <string name="gpu_runtime_default">运行时默认</string> - <string name="gpu_display_hint">把帧绘制到屏幕。重启 DroidDeck 后生效。</string> <string name="gpu_auto_by_gpu">自动 — 按 GPU 选择</string> <string name="gpu_manage">下载、导入或删除…</string> <string name="gpu_in_use_caps">使用中</string> @@ -957,6 +1151,12 @@ <string name="deck_tab_left">左触控板</string> <string name="deck_tab_right">右触控板</string> <string name="deck_tab_both">两侧</string> + <string name="deck_tab_gamepad">手柄</string> + <string name="deck_surface_stick">摇杆</string> + <string name="deck_surface_trackpad">触控板</string> + <string name="deck_surface_switch">在摇杆与触控板之间切换</string> + <string name="deck_more_controls">更多 Deck 控制</string> + <string name="deck_panels">面板</string> <string name="deck_close">关闭副屏控制</string> <string name="deck_open_steam_menu">打开 Steam 菜单</string> <string name="deck_left_upper">左 · 上</string> @@ -992,6 +1192,10 @@ <string name="proton_installed">已安装 %1$s</string> <string name="proton_queued">来自较早请求的待处理项</string> <string name="proton_not_installed">未安装</string> + <string name="proton_update_available">有可用更新 → %1$s</string> + <string name="proton_remove_older">移除旧版 %1$s</string> + <string name="proton_remove_older_body">将移除 %1$s。设为使用这些版本的游戏必须改用其他 Proton。</string> + <string name="proton_remove_body">设为使用此版本的游戏必须改用其他 Proton。</string> <string name="proton_install_now">立即安装</string> <string name="proton_cancel_queued">取消排队</string> <string name="pckb_android">Android 键盘</string> @@ -1020,6 +1224,8 @@ <string name="game_env_eyebrow">Proton 游戏</string> <string name="pip_title">画中画</string> <string name="pip_auto">自动进入画中画</string> + <string name="unfolded_controls">展开屏幕上的控制</string> + <string name="unfolded_controls_hint">展开时,游戏画面位于 Steam Deck 触控板和背键上方。折叠时,游戏全屏显示。</string> <string name="pip_suspended">已暂停</string> <string name="pip_not_ready">会话就绪后即可使用画中画。</string> <string name="pip_permission">请在 Android 设置中允许 DroidDeck 的画中画。</string> @@ -1045,19 +1251,12 @@ <string name="game_file_exported">游戏文件已保存到 %1$s</string> <string name="game_frontend_files">前端文件</string> - <!-- Launcher, session and menus --> - - <!-- Launcher (MainActivity) --> <string name="main_wait_runtime">请等待运行时操作完成</string> <string name="main_wait_proton_install">请等待兼容性工具安装完成</string> <string name="main_wait_desktop_install">请等待桌面应用安装完成</string> <string name="main_wait_install_game">请等待安装完成后再启动游戏</string> <string name="main_saves_close_session">请先关闭 Steam 会话,以免游戏存档覆盖导入的内容</string> - - <!-- Busy line while saves are imported; %1$s is the game's name --> <string name="main_saves_importing">正在导入到 %1$s</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the game's name --> <plurals name="main_saves_imported"> <item quantity="other">已从 %2$s 导入 %1$d 个文件到 %3$s</item> </plurals> @@ -1065,20 +1264,12 @@ <item quantity="other">已从 %2$s 导入 %1$d 个文件到 %3$s。旧存档已备份到 Download/DroidDeck/Saves/backups</item> </plurals> <string name="main_saves_pick_zip">为 %1$s 选择存档 zip 包</string> - - <!-- Busy line while saves are exported; %1$s is the game's name --> <string name="main_saves_exporting">正在导出 %1$s</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the zip's path --> <plurals name="main_saves_exported"> <item quantity="other">已将 %1$d 个文件导出为 %2$s:%3$s</item> </plurals> - - <!-- %1$s is the game's name, %2$s the save layout --> <string name="main_saves_pick_folder">选择 %1$s 的保存位置(%2$s)</string> - - <!-- %1$s is what was being done (e.g. Importing into Portal 2, Swapping), %2$s the error --> - <string name="main_action_failed">%1$s失败:%2$s</string> + <string name="main_action_failed">%1$s 失败:%2$s</string> <string name="main_no_logs_yet">还没有会话日志:请先运行一次会话。</string> <string name="main_no_logs_to_clear">没有可清除的会话日志。</string> <plurals name="main_logs_cleared"> @@ -1090,78 +1281,55 @@ <string name="main_adb_copied">已复制 ADB 命令</string> <string name="main_pick_roms">选择 ROM 文件夹</string> <string name="main_non_adreno_title">不是 Adreno GPU</string> - - <!-- %1$s is the GPU's name, %2$.0f the download size in MB --> <string name="main_non_adreno_text">Turnip 支持 Adreno GPU。在 %1$s 上,Steam 可能显示黑屏。需下载:%2$.0f MB。</string> <string name="main_install_anyway">仍要安装</string> <string name="main_remove_runtime_title">移除 Linux 运行时</string> <string name="main_remove_runtime_text">这会删除运行时、其中的 Steam 客户端,以及安装在其中的所有游戏。</string> - - <!-- Toast; %1$s is a list of components, separated by commas --> <string name="main_applied">已应用:%1$s</string> <string name="android_app_open_failed_primary">无法在主屏幕上打开 %1$s</string> - - <!-- %1$s is the app, %2$s the name of the display --> <string name="android_app_open_failed_on">无法在 %2$s 上打开 %1$s</string> - - <!-- %1$s is the app, %2$d the display's number --> <string name="android_app_open_failed_display">无法在显示器 %2$d 上打开 %1$s</string> - - <!-- Components page busy lines, shown with … after them --> <string name="comp_busy_importing">正在导入</string> <string name="comp_busy_swapping">正在替换</string> <string name="comp_busy_restoring">正在还原</string> <string name="comp_busy_cancelling">正在取消</string> <string name="comp_busy_deleting">正在删除</string> <string name="comp_cannot_read">无法读取该文件</string> - - <!-- %1$s is a version or a name --> <string name="comp_imported">已导入 %1$s</string> <string name="comp_swap_cancelled">等待中的替换已取消。</string> <string name="comp_pick_wcp">选择组件包(-linux .wcp)</string> <string name="comp_nightlies_unreachable">无法连接 Nightlies</string> - - <!-- %1$s is the package version --> <string name="comp_stored">已存储 %1$s</string> <string name="comp_download_failed">下载失败:%1$s</string> <string name="drivers_pick_linux">选择 Linux 运行时驱动(-Linux zip 包或 Android + Linux 组合包)</string> <string name="drivers_pick_android">选择显示驱动(AdrenoTools zip 包或 Android + Linux 组合包)</string> <string name="drivers_pick_any">选择驱动 zip 包或 Android + Linux 组合包</string> - - <!-- %1$s is a desktop app's name, %2$s what went wrong --> <string name="main_pkg_problem">%1$s:%2$s</string> <string name="main_removing_named">正在移除 %1$s…</string> - <string name="main_forgetting_named">正在移除 %1$s…</string> + <string name="main_forgetting_named">正在清除 %1$s…</string> <string name="main_pick_game_storage">选择游戏存储文件夹</string> <string name="main_pick_decky_zip">选择 Decky 插件 ZIP 包</string> <string name="main_storage_not_usable">无法使用:%1$s</string> - - <!-- What is running, when it is a program without a known name --> <string name="main_running_program">程序</string> <string name="main_removing_runtime">正在移除 Linux 运行时</string> <string name="main_settings_main_screen">无法在底部屏幕上打开设置,已改为在主屏幕上打开。</string> <string name="main_open_dev_options">在设置中打开开发者选项</string> - <!-- Updates --> <string name="upd_unknown_apps_failed">无法打开 Android 的“安装未知应用”设置</string> <string name="upd_couldnt_check">无法检查:%1$s</string> <string name="upd_no_download">此构建没有适用于此 DroidDeck 副本的下载</string> <string name="upd_stop_first">请先停止正在运行的会话,再进行更新</string> - - <!-- Update stages, shown with … after them --> <string name="upd_stage_downloading">正在下载</string> <string name="upd_stage_installing">正在安装</string> <string name="upd_stage_confirm">等待你确认</string> <string name="upd_failed">更新失败</string> <string name="upd_not_offered">Android 未提供安装此更新的选项</string> - <!-- Decky --> <string name="decky_install_failed">Decky 安装失败:%1$s</string> <string name="decky_plugin_starting">正在开始导入插件…</string> <string name="decky_plugin_failed">插件导入失败:%1$s</string> <string name="decky_plugin_installed">插件已安装。重启 Steam 即可加载。</string> - <!-- GPU drivers --> <string name="drivers_not_checked">尚未检查 — 点按刷新以查找新驱动</string> <string name="drivers_bundle_sets_display">Android + Linux:同时设置显示驱动</string> <string name="drivers_bundle_sets_runtime">Android + Linux:同时设置运行时驱动</string> @@ -1169,19 +1337,13 @@ <string name="drivers_system_vulkan">系统 Vulkan:没有适用于此 GPU 的内置构建</string> <string name="drivers_bundled">%1$s(内置)</string> <string name="drivers_manual">手动</string> - - <!-- Driver mode, then the driver pair in use --> <string name="drivers_summary">%1$s · %2$s</string> <string name="drivers_half_published">目前只发布了其中一半</string> <string name="drivers_pair_size">两者共 %1$.0f MB</string> - - <!-- %1$s says why (the GPU's support status) --> <string name="drivers_none_to_set">没有可设置的驱动:%1$s</string> <string name="drivers_checking_latest">正在检查最新驱动…</string> <string name="drivers_up_to_date_check_failed">已是最新(无法检查:%1$s)</string> <string name="drivers_recommended_unpublished">推荐的驱动目前尚未发布</string> - - <!-- %1$s is the driver pair's name, %2$s its version --> <string name="drivers_downloading_pair">正在下载 %1$s %2$s…</string> <string name="drivers_updated_to">已更新到 %1$s %2$s。</string> <string name="drivers_updated_to_restart">已更新到 %1$s %2$s。显示驱动将在 DroidDeck 重启后生效。</string> @@ -1196,11 +1358,7 @@ <string name="drivers_using_bundle_restart">正在将 %1$s 同时用作运行时驱动和显示驱动。显示驱动将在 DroidDeck 重启后生效。</string> <string name="drivers_deleted_bundle">已删除 %1$s(两个驱动)</string> <string name="drivers_deleted">已删除 %1$s</string> - - <!-- %1$s lists the latest releases, %2$s when they were checked (e.g. 5 min ago) --> <string name="drivers_release_status">最新:%1$s · %2$s检查</string> - - <!-- %1$s lists the latest releases, %2$s the sources that could not be reached, %3$s when they were checked --> <string name="drivers_release_status_failed">最新:%1$s · 无法连接 %2$s · %3$s检查</string> <plurals name="drivers_ago_minutes"> <item quantity="other">%1$d 分钟前</item> @@ -1213,39 +1371,25 @@ </plurals> <string name="drivers_checking_sources">正在检查 Banners-Turnip、WinNative 和 DroidDeck…</string> <string name="drivers_check_failed">检查失败</string> - - <!-- %1$s is the driver's name --> <string name="drivers_installed_pick_either">已安装 %1$s — 在任一列表中选择它即可同时设置两个驱动</string> <string name="drivers_installed_pick">已安装 %1$s — 请在菜单中选择它</string> - <!-- Session (SessionActivity) --> <string name="session_wait_removal">请等待运行时移除完成</string> - - <!-- Drawer title when the running program has no known name --> <string name="session_title_game">游戏</string> - - <!-- Shown as "Auto (touchpad)" in the drawer's touch setting --> <string name="session_touch_auto_touchpad">触控板</string> - - <!-- Shown as "Auto (direct)" in the drawer's touch setting --> <string name="session_touch_auto_direct">直接</string> <string name="session_swap_failed">替换失败:%1$s</string> + <string name="session_profile_save_failed">配置档案保存失败:%1$s</string> <string name="session_desktop_paused">桌面已暂停</string> - - <!-- %1$s is the program's name --> <string name="session_named_paused">%1$s 已暂停</string> <string name="session_program_paused">程序已暂停</string> <string name="session_starting_desktop">正在启动桌面</string> - - <!-- %1$s is the program's name --> <string name="session_starting_named">正在启动 %1$s</string> <string name="session_starting_program">正在启动程序</string> <string name="session_no_logs">此会话没有日志。</string> <string name="session_logs_archive_failed">无法创建会话日志压缩包。</string> <string name="session_logs_share_failed">无法分享会话日志。</string> <string name="session_starting_session">正在启动会话…</string> - - <!-- Loading screen lines while packages download; %1$d and %2$d are megabytes --> <string name="session_runtime_downloading">正在下载 Linux 运行时</string> <string name="session_runtime_downloading_mb">正在下载 Linux 运行时 · %1$d / %2$d MB</string> <string name="session_runtime_checking">正在检查 Linux 运行时</string> @@ -1260,33 +1404,20 @@ <string name="session_proton_unpacking">正在解包 Proton Experimental(ARM64)</string> <string name="session_runtime_catalog_unreachable">无法连接运行时目录。请检查网络连接,然后再次点“游玩”。</string> <string name="session_runtime_install_failed">Linux 运行时未能安装。请在“配置”中检查运行时,然后再次点“游玩”。</string> - - <!-- %1$s says what went wrong --> <string name="session_desktop_install_failed">桌面未能安装(%1$s)。请检查网络连接,然后再次点“桌面”。</string> - - <!-- %1$s is the program's name, or Steam --> <string name="session_ended_named">%1$s 意外停止。请将日志随错误报告一起分享,或重试。</string> <string name="session_ended_program">程序意外停止。请将日志随错误报告一起分享,或重试。</string> <string name="session_ended_desktop">桌面意外停止。请将日志随错误报告一起分享,或重试。</string> - - <!-- %1$d is the exit status, %2$s the log file's path --> <string name="session_ended_detail">退出状态 %1$d · %2$s</string> <string name="session_ended_no_log">无日志</string> - - <!-- %1$d errors; %2$s, %3$s and %4$s are the Performance page and its two settings --> <plurals name="session_hint_enosys"> <item quantity="other">日志中有 %1$d 个“Function not implemented”错误:proot 的 seccomp 加速在此设备上导致某个辅助进程失败。请尝试 %2$s → “%3$s”(或“%4$s”),然后重新启动。</item> </plurals> - <!-- Screens, files, controller and store --> - - <!-- Mode settings --> <string name="mode_decky_plugins">插件</string> <string name="mode_decky_plugins_hint">安装插件 ZIP 包,将在下次 Steam 会话中生效。</string> <string name="mode_decky_plugin_downloading">正在下载…</string> <string name="mode_decky_plugin_install_zip">从 ZIP 安装</string> - - <!-- Store --> <string name="store_cat_games">游戏</string> <string name="store_cat_audio_video">影音</string> <string name="store_cat_graphics">图形</string> @@ -1299,28 +1430,14 @@ <string name="store_cat_utilities">实用工具</string> <string name="store_section_popular">热门</string> <string name="store_section_trending">趋势</string> - - <!-- Store front-page section of recently added apps --> <string name="store_section_new">新上架</string> - - <!-- Store front-page section of recently updated apps --> <string name="store_section_updated">最近更新</string> <string name="store_section_loading">加载中…</string> <string name="store_flatpak_setup">Flatpak 配置</string> - - <!-- %1$s is what failed (an app name or "Flatpak setup"), %2$s the error --> <string name="store_problem">%1$s:%2$s</string> <string name="store_updates_check_failed">无法从 Flathub 检查更新</string> - - <!-- Library tiles --> - - <!-- Subtitle of a game tile whose cover art was found --> <string name="content_rom_installed">已安装</string> - - <!-- Subtitle of a game that is a folder rather than a single file --> <string name="content_rom_folder">文件夹</string> - - <!-- Launcher themes --> <string name="theme_graphite">石墨</string> <string name="theme_graphite_detail">石墨色界面,选中、聚焦或按下的元素均使用标志自带的球形蓝色。</string> <string name="theme_paper">黑底白纸</string> @@ -1329,8 +1446,6 @@ <string name="theme_icon_blue_detail">黑色背景、白色文字,选中、聚焦或按下的元素使用蓝色。</string> <string name="theme_electric">电光藏青</string> <string name="theme_electric_detail">更明亮的蓝色,配以偏藏青而非灰色的界面。</string> - - <!-- PC keyboard key caps (keep them short; they label physical PC keys) --> <string name="pckb_key_esc">Esc</string> <string name="pckb_key_ins">Ins</string> <string name="pckb_key_del">Del</string> @@ -1348,27 +1463,17 @@ <string name="pckb_key_alt">Alt</string> <string name="pckb_key_space">空格</string> <string name="pckb_key_altgr">AltGr</string> - - <!-- Terminal key strip on the second screen --> <string name="second_key_tab">Tab</string> - - <!-- A modifier key (%1$s, e.g. Ctrl) that is currently held --> <string name="second_key_on">%1$s ✓</string> <string name="second_key_ctrl_c">Ctrl+C</string> <string name="second_key_ctrl_d">Ctrl+D</string> - - <!-- Game file sync errors --> <string name="game_sync_err_runtime">请先安装运行时</string> <string name="game_sync_err_steam_library">Steam 库不可用</string> <string name="game_sync_err_previous_sd">之前的 SD 卡库不可用</string> <string name="game_sync_err_game_storage">游戏存储不可用</string> <string name="game_sync_err_added_games">已添加游戏的文件夹不可用</string> <string name="game_sync_err_manifests">Steam 清单文件不可用</string> - - <!-- The systems RetroArch emulates, shown under its name --> <string name="content_system_many">多种平台</string> - - <!-- File manager --> <string name="fm_drive_internal">内部存储</string> <string name="fm_drive_linux">Linux 系统</string> <string name="fm_drive_sd">SD 卡</string> @@ -1386,8 +1491,6 @@ <string name="fm_no_favorites">还没有收藏 — 用文件夹的 ⋮ 菜单固定它,之后即可快速跳回。</string> <string name="fm_unpin_favorite">从收藏夹移除</string> <string name="fm_size_zero">0 字节</string> - - <!-- Size unit for sizes under 1 KB, shown after a number --> <string name="fm_unit_bytes">字节</string> <string name="fm_prop_location">位置</string> <string name="fm_prop_type">类型</string> @@ -1395,8 +1498,6 @@ <string name="fm_prop_modified">修改时间</string> <string name="fm_type_folder">文件夹</string> <string name="fm_type_file">文件</string> - - <!-- File type in Properties; %1$s is the file extension in capitals, e.g. TXT --> <string name="fm_type_ext_file">%1$s 文件</string> <string name="fm_read_only">只读</string> <string name="fm_read_only_hint">防止游戏(及 Wine)覆盖或删除此文件。</string> @@ -1410,19 +1511,11 @@ <string name="fm_delete_failed">删除失败</string> <string name="fm_op_moving">正在移动…</string> <string name="fm_op_copying">正在复制…</string> - - <!-- %1$s is the file name --> <string name="fm_op_moving_item">正在移动 - %1$s</string> <string name="fm_op_copying_item">正在复制 - %1$s</string> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_moving_batch">正在移动 %1$d/%2$d - %3$s</string> <string name="fm_op_copying_batch">正在复制 %1$d/%2$d - %3$s</string> - - <!-- Paste result; %1$d items done, %2$d items failed --> <string name="fm_paste_failed">%1$d 项完成,%2$d 项失败</string> - - <!-- Paste result; %1$d items done, %2$d items skipped --> <string name="fm_paste_skipped">%1$d 项完成,%2$d 项已跳过</string> <plurals name="fm_paste_moved"> <item quantity="other">已移动 %1$d 项</item> @@ -1430,8 +1523,6 @@ <plurals name="fm_paste_copied"> <item quantity="other">已复制 %1$d 项</item> </plurals> - - <!-- %1$s is a file or folder name --> <string name="fm_already_exists">“%1$s”已存在</string> <string name="fm_op_renaming">正在重命名…</string> <string name="fm_rename_failed">重命名失败</string> @@ -1442,20 +1533,14 @@ <string name="fm_create">创建</string> <string name="fm_new_name">新名称</string> <string name="fm_delete_title">删除?</string> - - <!-- %1$s is a file or folder name --> <string name="fm_delete_text">要永久删除“%1$s”吗?</string> <plurals name="fm_delete_items_title"> <item quantity="other">删除 %1$d 项?</item> </plurals> <string name="fm_cannot_undo">此操作无法撤销。</string> - - <!-- After a list of the first five names in a delete confirmation --> <plurals name="fm_and_more"> <item quantity="other">…以及其他 %1$d 项</item> </plurals> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_deleting_batch">正在删除 %1$d/%2$d - %3$s</string> <plurals name="fm_delete_some_failed"> <item quantity="other">%1$d 项无法删除</item> @@ -1469,8 +1554,6 @@ <string name="fm_conflict_skip">跳过</string> <string name="fm_select_this_folder">选择此文件夹</string> <string name="fm_back">返回</string> - - <!-- %1$s is a storage name, e.g. SD card --> <string name="fm_drive_not_readable">%1$s 已挂载,但当前无法读取</string> <string name="fm_list_view">列表视图</string> <string name="fm_grid_view">网格视图</string> @@ -1485,51 +1568,31 @@ <string name="fm_hide_favorites">隐藏收藏夹</string> <string name="fm_show_favorites">显示收藏夹</string> <string name="fm_filter_folder">筛选此文件夹</string> - - <!-- Free space on the storage being browsed; %1$s is a size, e.g. 12.50 GB --> <string name="fm_free_space">可用 %1$s</string> <string name="fm_selected_count">已选择 %1$d 项</string> - - <!-- Selection bar: clear the selection --> <string name="fm_select_none">不选</string> - - <!-- Selection bar: select every item --> <string name="fm_select_all">全选</string> <string name="fm_paste">粘贴</string> <plurals name="fm_items"> <item quantity="other">%1$d 项</item> </plurals> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_here">将 %1$s 粘贴到此处</string> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_move_here">将 %1$s 移动到此处</string> <string name="fm_rail_title">文件</string> <string name="fm_rail_storage">存储</string> - - <!-- Rail section of shortcut folders (Downloads, ROMs, …) --> <string name="fm_rail_quick">快速访问</string> <string name="fm_rail_favorites">收藏夹</string> <string name="fm_rail_downloads">下载</string> - - <!-- Downloads shortened to fit under an icon (about 8 characters) --> <string name="fm_rail_downloads_short">下载</string> <string name="fm_rail_roms">ROM</string> <string name="fm_rail_session_logs">会话日志</string> <string name="fm_rail_pictures">图片</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_added">已将“%1$s”添加到收藏夹</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_removed">已将“%1$s”从收藏夹移除</string> <string name="fm_empty_directory">空文件夹</string> <string name="fm_up_one_level">返回上一级</string> <string name="fm_choose_folder">选择文件夹</string> <string name="fm_choose_file">选择文件</string> - - <!-- On-screen controller tint colors --> <string name="ctrl_tint_steam_blue">Steam 蓝</string> <string name="ctrl_tint_sky">天蓝</string> <string name="ctrl_tint_white">白色</string> @@ -1538,8 +1601,6 @@ <string name="ctrl_tint_amber">琥珀</string> <string name="ctrl_tint_red">红色</string> <string name="ctrl_tint_pink">粉色</string> - - <!-- On-screen buttons that can be remapped --> <string name="ctrl_button_a">A 键</string> <string name="ctrl_button_b">B 键</string> <string name="ctrl_button_x">X 键</string> @@ -1550,34 +1611,21 @@ <string name="ctrl_button_rt">右扳机</string> <string name="ctrl_button_view">视图键</string> <string name="ctrl_button_menu">菜单键</string> - - <!-- What a remapped on-screen button sends; letters and Steam are controller button names --> - - <!-- Controller View button --> <string name="ctrl_target_view">视图</string> - - <!-- Controller Menu button --> <string name="ctrl_target_menu">菜单</string> <string name="ctrl_target_up">方向键上</string> <string name="ctrl_target_down">方向键下</string> <string name="ctrl_target_left">方向键左</string> <string name="ctrl_target_right">方向键右</string> - - <!-- The on-screen button is not shown --> <string name="ctrl_target_hidden">隐藏</string> <string name="ctrl_editor_drag">拖动以移动</string> <string name="ctrl_editor_snap">对齐</string> <string name="ctrl_editor_save">保存</string> - - <!-- What the second screen shows during a session --> <string name="second_mode_none">无</string> <string name="second_mode_keyboard_trackpad">键盘 + 触控板</string> <string name="second_mode_terminal">终端</string> <string name="second_mode_deck_controls">Deck 背键 + 触控板</string> - <!-- Runtime, updates and setup helpers --> - - <!-- Linux runtime install / removal (LinuxRuntimeInstaller, RuntimeInstallService) --> <string name="rtinst_removing">正在移除 Linux 运行时</string> <plurals name="rtinst_removing_entries"> <item quantity="other">正在移除 Linux 运行时 · %1$d 项</item> @@ -1592,75 +1640,47 @@ <string name="rtinst_title_installing">正在安装 Linux 运行时</string> <string name="rtinst_title_removing">正在移除 Linux 运行时</string> - <!-- Hosted desktop and emulator packages (DesktopCatalog) --> <string name="deskpkg_runtime_missing">未安装 Linux 运行时</string> - - <!-- %1$s: package name --> <string name="deskpkg_no_checksum">目录中没有 %1$s 的校验和</string> <string name="deskpkg_checksum_mismatch">校验和不匹配 — 未做任何更改</string> - - <!-- %1$s: package name --> <string name="deskpkg_installing">正在安装 %1$s</string> <string name="deskpkg_place_failed">无法放置 AppImage</string> <string name="deskpkg_extract_failed">解压失败</string> <string name="deskpkg_install_failed">安装失败</string> - <!-- Flatpak store operations (FlatpakManager) --> <string name="flatpakmgr_setup_failed">Flatpak 配置失败(退出代码 %1$d)</string> <string name="flatpakmgr_setup_unfinished">Flatpak 配置未完成</string> <string name="flatpakmgr_busy">另一个商店任务正在运行</string> <string name="flatpakmgr_not_ready">请先配置 Flatpak</string> <string name="flatpakmgr_starting">启动中</string> <string name="flatpakmgr_exit_status">Flatpak 已退出,状态码 %1$d</string> - - <!-- %1$s: an app or runtime name, e.g. "SuperTux" or "GNOME runtime 50" --> <string name="flatpakmgr_installing">正在安装 %1$s</string> <string name="flatpakmgr_updating">正在更新 %1$s</string> <string name="flatpakmgr_removing">正在移除 %1$s</string> - - <!-- %1$s: an app or runtime name; %2$d of %3$d: this step and the number of steps --> <string name="flatpakmgr_installing_step">正在安装 %1$s(%2$d/%3$d)</string> <string name="flatpakmgr_updating_step">正在更新 %1$s(%2$d/%3$d)</string> <string name="flatpakmgr_removing_step">正在移除 %1$s(%2$d/%3$d)</string> - - <!-- Names for Flatpak runtime parts, shown inside "Installing %1$s" --> <string name="flatpakmgr_ref_translations">翻译</string> <string name="flatpakmgr_ref_graphics_drivers">图形驱动</string> <string name="flatpakmgr_ref_media_codecs">媒体编解码器</string> - - <!-- %1$s: runtime vendor, e.g. GNOME, KDE, Freedesktop --> <string name="flatpakmgr_ref_runtime">%1$s 运行时</string> - - <!-- %1$s: runtime vendor, e.g. GNOME; %2$s: its version, e.g. 50 --> <string name="flatpakmgr_ref_runtime_branch">%1$s 运行时 %2$s</string> - <!-- Imported AppImages (AppImageManager) --> <string name="appimg_too_small">文件太小,不可能是 AppImage</string> - - <!-- %1$s: the system's reason --> <string name="appimg_unreadable">无法读取文件:%1$s</string> <string name="appimg_not_linux">这不是 AppImage(不是 Linux 程序)</string> <string name="appimg_wrong_arch">此 AppImage 既不是为 ARM64(aarch64)构建,也不是为 x86 PC 构建</string> <string name="appimg_not_appimage">这是 Linux 程序,但不是 AppImage</string> <string name="appimg_wrong_type">只能导入类型 2 的 AppImage(此文件为类型 %1$d)</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_import">可用空间不足:导入约需 %1$s</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_update">可用空间不足:更新约需 %1$s</string> <string name="appimg_import_failed">导入失败</string> <string name="appimg_gone">该 AppImage 已不存在</string> <string name="appimg_update_failed">更新失败</string> - - <!-- %1$s: file name --> <string name="appimg_extracting">正在解压 %1$s</string> <string name="appimg_extract_failed">无法解压该 AppImage</string> - - <!-- %1$s: the last line the extractor printed --> <string name="appimg_extract_failed_detail">无法解压该 AppImage:%1$s</string> - <!-- Decky Loader and plugin installs (DeckyManager) --> <string name="deckymgr_stop_session_loader">安装 Decky Loader 前请先停止当前会话</string> <string name="deckymgr_download_failed">Decky Loader 下载失败</string> <string name="deckymgr_size_mismatch">Decky Loader 的大小与发布元数据不符</string> @@ -1696,27 +1716,13 @@ <string name="deckymgr_remote_entry_invalid">无效的 remote_binary 条目</string> <string name="deckymgr_remote_name_invalid">无效的远程二进制文件名</string> <string name="deckymgr_remote_url_https">远程二进制文件的 URL 必须使用 HTTPS</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_remote_hash_invalid">远程二进制文件 %1$s 的 SHA-256 哈希无效</string> <string name="deckymgr_bin_dir_failed">无法创建插件 bin 目录</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_downloading_binary">正在下载插件二进制文件 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_download_failed">无法下载插件二进制文件 %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_checksum_mismatch">插件二进制文件校验和不匹配 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_not_executable">无法将插件二进制文件设为可执行 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_replace_failed">无法替换插件二进制文件 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_install_failed">无法安装插件二进制文件 · %1$s</string> <string name="deckymgr_folder_taken">该插件文件夹属于另一个插件</string> <string name="deckymgr_preserve_failed">无法保留现有插件</string> @@ -1724,24 +1730,14 @@ <string name="deckymgr_settings_failed">无法更新 Decky 插件设置</string> <string name="deckymgr_restore_failed">无法恢复现有插件</string> - <!-- Child-process limit change over Wireless debugging (WirelessAdbFix) --> <string name="adbfix_save_failed">无法保存无线调试身份信息</string> - - <!-- %1$d: the command's exit status --> <string name="adbfix_command_failed">ADB 命令执行失败(%1$d)</string> - - <!-- %1$s: what Android answered --> <string name="adbfix_not_confirmed">Android 未确认子进程限制已更改:%1$s</string> <string name="adbfix_no_pairing">未保存任何无线调试配对</string> <string name="adbfix_enter_address">请输入当前的无线调试 IP 地址与端口</string> - <!-- Wireless debugging pairing notification (WirelessAdbPairingService) --> <string name="adbpair_timed_out">等待配对弹窗超时。请从 DroidDeck 重试。</string> - - <!-- %1$d: Android's error code --> <string name="adbpair_discovery_failed_code">无法查找配对弹窗(%1$d)。请检查 Wi-Fi 是否已开启。</string> - - <!-- %1$s: the system's reason --> <string name="adbpair_discovery_failed">无法查找配对弹窗:%1$s</string> <string name="adbpair_six_digits">请输入完整的 6 位配对码</string> <string name="adbpair_pairing">正在配对…</string> @@ -1755,31 +1751,22 @@ <string name="adbpair_title_pair">配对无线调试</string> <string name="adbpair_waiting_text">开启无线调试,然后点按“使用配对码配对设备”。</string> <string name="adbpair_waiting_long">开启无线调试,然后点按“使用配对码配对设备”。请停留在“设置”中:配对码在此通知中输入。</string> - - <!-- Label of the notification's reply field --> <string name="adbpair_code_label">6 位配对码</string> <string name="adbpair_code_hint">点按“输入配对码”,然后输入“设置”中显示的 6 位数字。</string> <string name="adbpair_title_code">输入 Wi-Fi 配对码</string> <string name="adbpair_title_retry">请重新输入配对码</string> - - <!-- Notification action button --> <string name="adbpair_enter_code">输入配对码</string> <string name="adbpair_title_working">正在配置 Steam</string> <string name="adbpair_title_done">Steam 已就绪</string> <string name="adbpair_done_text">点按即可返回 DroidDeck。现在可以关闭无线调试了。</string> <string name="adbpair_title_failed">无线调试配置已中止</string> - <!-- DroidDeck's own updates (SelfInstaller, AppUpdates) --> - <string name="selfinst_http">下载服务器返回 HTTP %1$d</string> + <string name="selfinst_download_failed">下载失败</string> <string name="selfinst_size_mismatch">下载的文件大小与发布的 APK 不符,已丢弃 — 请重试</string> <string name="selfinst_checksum_mismatch">下载的文件与校验和不符,已丢弃 — 请重试</string> - - <!-- %1$s: the update's Android package name; %2$s: this app's --> <string name="selfinst_wrong_package">此更新适用于 Android 软件包 %1$s,而不是 %2$s</string> <string name="selfinst_metadata_signer">更新元数据中未指明 DroidDeck 的发布签名密钥</string> <string name="selfinst_unreadable">Android 无法读取下载的 APK</string> - - <!-- %1$s: the APK's Android package name; %2$s: this app's --> <string name="selfinst_apk_wrong_package">下载的 APK 适用于 %1$s,而不是 %2$s</string> <string name="selfinst_version_mismatch">下载的 APK 的 versionCode 为 %1$d,而不是已发布的 %2$d</string> <string name="selfinst_downgrade">Android 不会用 versionCode %1$d 覆盖已安装的 %2$d</string> @@ -1787,19 +1774,11 @@ <string name="selfinst_wrong_signer">下载的 APK 未使用 DroidDeck 的发布密钥签名</string> <string name="appupd_http">更新目录返回 HTTP %1$d</string> - <!-- Session, GPU and display --> - - <!-- Session loading screen --> <string name="loadstate_starting">正在启动会话…</string> - - <!-- %1$d minutes, %2$02d seconds since the session started --> <string name="loadstate_elapsed">已用时 %1$d:%2$02d · 仍在处理</string> <string name="loadstate_steam_update">正在下载 Steam 客户端更新 · %1$d%%</string> - - <!-- %1$s is the client's own download progress, as it prints it --> <string name="loadstate_steam_client">正在下载 Steam 客户端 · %1$s</string> - <!-- Installing GE-Proton / proton-cachyos (%1$s is the tool's name, %2$s its release tag) --> <string name="pextra_busy">已有兼容性工具正在安装</string> <string name="pextra_stop_session">安装兼容性工具前请先停止当前会话</string> <string name="pextra_no_release">找不到 %1$s 的 ARM64 发布版本</string> @@ -1816,55 +1795,38 @@ <string name="pextra_checksum_mismatch">校验和不匹配;已删除下载的文件</string> <string name="pextra_session_started">下载期间有会话启动;请先停止它,再安装兼容性工具</string> <string name="pextra_installing">正在安装 %1$s</string> - - <!-- %2$d is the installer's exit status --> <string name="pextra_install_failed">%1$s 安装失败(退出代码 %2$d)</string> <string name="pextra_could_not_install">无法安装 %1$s</string> <string name="esync_fetching">正在获取 droiddeck-esync 包</string> - <!-- Components (FEX / DXVK / VKD3D-Proton swapped into a Proton). %1$s component, %2$s version, %3$s Proton --> <string name="cmgr_fex_linux_helpers">含 Linux 辅助组件</string> <string name="cmgr_fex_dlls_only">仅 DLL</string> <string name="cmgr_original_proton_updated">原件(上次替换后 Proton 已更新)</string> <string name="cmgr_changed_outside">已在“组件”之外被更改</string> - - <!-- A component version that could not be found in a Proton --> <string name="cmgr_not_present">不存在</string> - - <!-- %1$s is the Proton build the original files were saved from --> <string name="cmgr_original_version">原件 %1$s</string> <string name="cmgr_original_from">原件来自 %1$s</string> <string name="cmgr_swap_queued">%1$s %2$s 将在 %3$s 上运行的游戏关闭后放入其中。</string> <string name="cmgr_swap_done">%1$s %2$s 已放入 %3$s,将在下次启动游戏时生效。</string> <string name="cmgr_original_missing">未存储该原件包</string> - - <!-- %1$s component, %2$s Proton --> <string name="cmgr_restore_queued">%2$s 的 %1$s 将在其上运行的游戏关闭后恢复为原件。</string> - - <!-- %1$s component, %2$s Proton, %3$s the Proton build the original came from --> <string name="cmgr_restore_done">已从 %3$s 原件还原 %2$s 的 %1$s。</string> - - <!-- %1$s package file, %2$s Proton id --> <string name="cmgr_package_in_use">%1$s 正在 %2$s 中使用。请先将该 Proton 替换为其他版本。</string> <string name="cmgr_package_not_stored">%1$s 未存储</string> <string name="cmgr_deleted">已删除 %1$s。</string> <string name="cmgr_original_kept">已安装构建的原件会保留:它是还原的途径。</string> <string name="cmgr_not_stored">未存储</string> - - <!-- %1$s Proton build, %2$s component --> <string name="cmgr_deleted_original">已删除 %2$s 的 %1$s 原件。</string> <string name="cmgr_nightlies_only">只能从 Nightlies 发布版本下载</string> <string name="cmgr_list_predates_checksums">此软件包列表早于校验和功能 — 请刷新后重试</string> <string name="cmgr_checksum_mismatch">校验和不匹配</string> - <!-- Display choices --> <string name="sprefs_upscaler_linear">线性</string> <string name="sprefs_upscaler_nearest">最近邻</string> <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR(质量)</string> <string name="sprefs_upscaler_sharpen">仅锐化</string> <string name="sprefs_lod_bias_auto">自动(匹配缩放)</string> - <!-- Screen effect Looks: preset names and the line under the row --> <string name="look_off_desc">不应用任何效果。</string> <string name="look_game_clarity">游戏清晰</string> <string name="look_game_clarity_desc">锐化并略增对比度 — 适合日常使用。</string> @@ -1889,29 +1851,23 @@ <string name="look_anime_edge">动漫描边</string> <string name="look_anime_edge_desc">卡通描边加锐化。</string> - <!-- GPU support line --> <string name="gpuinfo_not_adreno">不是 Adreno GPU</string> <string name="gpuinfo_supported">受支持</string> <string name="gpuinfo_experimental">实验性:其驱动为测试构建</string> <string name="gpuinfo_below_tested">低于已测试的硬件(Adreno 725 及更新):可能无法运行</string> <string name="gpuinfo_unsupported">不受支持:DroidDeck 需要 Adreno(骁龙)GPU</string> - <!-- Driver downloads and imports --> <string name="turnip_rate_limited">已达到 GitHub 的请求频率限制 — 请稍后重试</string> <string name="turnip_github_http">GitHub 返回 HTTP %1$d</string> - <string name="turnip_download_http">下载返回 HTTP %1$d</string> + <string name="turnip_download_failed">下载失败</string> <string name="turnip_list_predates_checksums">此驱动列表早于校验和功能 — 请刷新后重试</string> <string name="turnip_checksum_mismatch">校验和不匹配 — 已丢弃下载的文件</string> - - <!-- %1$s is one of the turnip_reject_* reasons --> <string name="turnip_not_adrenotools">不是 AdrenoTools 驱动:%1$s</string> <string name="turnip_reject_no_meta">缺少 meta.json</string> <string name="turnip_reject_meta_unreadable">无法读取 meta.json(%1$s)</string> <string name="turnip_reject_linux_driver">这是 Linux 运行时驱动(请在“运行时驱动”下导入)</string> <string name="turnip_reject_wayland">这是 Wayland 游戏驱动,本应用用不到它</string> <string name="turnip_reject_no_library_name">meta.json 未指定 libraryName,因此无法交给 AdrenoTools</string> - - <!-- %1$s is a library file name --> <string name="turnip_reject_library_missing">meta.json 指定了 %1$s,但它不在 zip 包中</string> <string name="turnip_reject_not_aarch64">%1$s 不是 64 位 AArch64 ELF 共享库</string> <string name="turnip_reject_glibc">%1$s 链接了 glibc — 这是“-Linux”Turnip,应在“运行时驱动”下导入</string> @@ -1922,115 +1878,61 @@ <string name="bundle_entry_outside">不是驱动组合包:%1$s 指向包外</string> <string name="bundle_too_large">不是驱动组合包:解包后超过 %1$d MB</string> - <!-- Game storage --> <string name="gstore_sd_card">SD 卡</string> - - <!-- %1$s is a size, like 12.3 GB --> <string name="gstore_folder">文件夹</string> + <string name="logshare_chooser">分享会话日志</string> - <!-- Stands in for the Steam account name when the client did not record one --> - - <!-- Why the HDR switch is greyed out --> <string name="hdr_needs_android_10">需要 Android 10 或更高版本(支持色彩空间的显示图层)</string> <string name="hdr_none">此显示器未报告支持 HDR</string> - - <!-- %1$s lists HDR formats, like Dolby Vision, HDR10+ --> <string name="hdr_not_hdr10">此显示器支持 %1$s,但不支持 HDR10</string> - <!-- Follow-up --> - - <!-- Stands in for the GPU name when the device does not report one --> <string name="gpu_this_gpu">此 GPU</string> <string name="phantom_title_on">子进程限制已开启</string> <string name="phantom_title_unset">子进程限制未设置</string> <string name="phantom_title_unreadable">无法检查子进程限制</string> <string name="phantom_title_off">子进程限制已关闭</string> <string name="phantom_title_not_required">无需更改子进程限制</string> - - <!-- %1$s is the sentence saying how to turn the limit off on this device --> <string name="phantom_instructions_fix">%1$s 如果无法做到,请将此设备连接到装有 ADB 的电脑并运行下方命令,然后返回此处重新检查。</string> <string name="phantom_instructions_off">可以启动 Steam 会话了。</string> <string name="phantom_instructions_not_applicable">此 Android 版本不使用该限制。</string> - <string name="phantom_fix_toggle">在开发者选项中打开“禁用子进程限制”,之后请保持开发者选项开启。</string> + <string name="phantom_fix_toggle">在开发者选项中打开“停止限制子进程”,之后请保持开发者选项开启。</string> <string name="phantom_fix_no_toggle">此 Android 版本没有该开关。请使用无线调试在此设备上更改。</string> <string name="upd_block_no_apk">此构建没有适用于此 DroidDeck 副本的下载。</string> - - <!-- %1$d is the offered build's versionCode, %2$d the installed one's --> <string name="upd_block_version_code">Android 不会用它覆盖此构建,因为它的 versionCode %1$d 低于已安装的 %2$d。</string> <string name="upd_fail_downgrade">Android 不会用旧版本覆盖新版本。请继续使用此构建,直到该通道的版本跟上。</string> <string name="upd_fail_signature">此 DroidDeck 副本的签名不同(可能是本地构建?),因此 Android 无法就地更新。</string> <string name="upd_fail_storage">可用空间不足,无法更新。</string> <string name="upd_fail_aborted">更新已取消。</string> - - <!-- %1$s is Android's own (English) installer message --> <string name="upd_fail_with_message">更新未能安装:%1$s</string> <string name="upd_fail_generic">更新未能安装。</string> - - <!-- A save zip's layout; %1$s is the app it comes from (GameHub, Winlator) --> <string name="saves_layout_zip">%1$s zip 包</string> - - <!-- A save zip whose layout is not known --> <string name="saves_zip">zip 包</string> - - <!-- %1$s is the game's name --> <string name="saves_not_launched">%1$s 尚未启动过</string> <string name="saves_none_found">未找到 %1$s 的存档文件</string> - - <!-- %1$s is the zip's file name --> <string name="saves_not_save_zip">%1$s 中没有 drive_c 文件夹,因此不是 GameHub 或 Winlator 存档 zip 包</string> - - <!-- %1$s is a folder path --> <string name="gstore_cannot_create">无法在 %1$s 中创建文件夹</string> <string name="gstore_cannot_write">无法写入 %1$s</string> - - <!-- %1$s is a folder path, %2$s the system's error --> <string name="gstore_cannot_write_detail">无法写入 %1$s(%2$s)</string> <string name="gfiles_folder_unavailable">文件夹不可用</string> - - <!-- %1$s is a file name --> <string name="gfiles_name_taken">已有另一个文件使用 %1$s</string> <string name="gfiles_art_unavailable">美术图文件夹不可用</string> <string name="gfiles_unrelated_inventory">文件夹中有无关的同步清单</string> - - <!-- %1$s is a file name --> <string name="gfiles_remove_failed">无法移除 %1$s</string> <string name="gfiles_outside_folder">文件超出了导出文件夹</string> - - <!-- A FEX build whose DLL carries no version name --> <string name="cmgr_fex_unnamed">FEX(无版本名称的构建)</string> - - <!-- %1$s is a package file name --> <string name="cmgr_no_profile">%1$s 中没有 profile.json</string> - - <!-- %1$s is a package file name, %2$s the type its profile.json gives --> <string name="cmgr_not_component_package">%1$s 不是 Linux 组件包(类型为 %2$s)</string> - - <!-- A storage volume in the second-library menu; %1$s is its name, %2$s its free space, like 12.3 GB --> <string name="gstore_volume_free">%1$s · 可用 %2$s</string> - - <!-- The second-library setting's value when it is automatic (short form of mode_storage_auto) --> <string name="mode_storage_auto_short">自动</string> - - <!-- %1$s is the technical reason, kept in English --> <string name="appupd_catalog_rejected">更新目录未通过校验(%1$s)</string> - - <!-- Label of the copied ADB command on the clipboard --> <string name="main_adb_clip_label">DroidDeck 子进程设置</string> - - <!-- Signed in, but the Steam client recorded no account name --> <string name="setup_signed_in_offline_unnamed">已登录 · 离线模式</string> <string name="setup_signed_in_unnamed">已登录</string> - - <!-- Small uppercase tags beside a driver's name: where it came from --> <string name="driver_tag_bundled">内置</string> <string name="driver_tag_downloaded">已下载</string> <string name="driver_tag_imported">已导入</string> - - <!-- The driver is one half of a bundle that sets both drivers --> <string name="driver_tag_bundle">Android + Linux</string> - - <!-- %1$s is the limit's state (e.g. Child-process limit is on), %2$s what to do, %3$s the ADB command --> <string name="phantom_warning">%1$s。%2$s\n\n%3$s</string> <string name="display_session">会话显示</string> <string name="display_resolution">分辨率</string> @@ -2048,6 +1950,7 @@ <string name="display_frame_rate">帧率</string> <string name="display_look_filter">%1$s 将缩放设为 %2$s。</string> <string name="display_match_screen">匹配屏幕(%1$d×%2$d)</string> + <string name="display_follow_screen">跟随屏幕(折叠或展开时调整大小)</string> <string name="mode_tab_steam">Steam</string> <string name="device_info_show">显示设备详情</string> <string name="device_info_hide">隐藏设备详情</string> @@ -2057,6 +1960,210 @@ <string name="device_info_copied">已复制。</string> <string name="force_ssbs_title">强制 SSBS</string> <string name="force_ssbs_hint">保持开启一项 Wine 会不断关闭的 CPU 速度设置。在骁龙 8 至尊版上可能让 Windows 游戏更快;在较旧芯片上变化不大。下次启动游戏时生效。</string> + + <string name="rail_stores">游戏商店</string> + <string name="source_steam">Steam</string> + <string name="source_added">自定义</string> + <string name="setup_stores">游戏商店</string> + <string name="setup_stores_open_on">打开商店时显示</string> + <string name="setup_stores_speed">下载速度档位</string> + <string name="setup_stores_engine">商店引擎</string> + <string name="setup_stores_engine_chip_ready">● 引擎就绪</string> + <string name="setup_stores_engine_chip_missing">未构建</string> + <string name="stores_tier_balanced">均衡</string> + <string name="stores_tier_fast">快速</string> + <string name="stores_tier_max">最高</string> + <string name="stores_title">游戏商店</string> + <string name="stores_settings">游戏商店设置</string> + <string name="stores_settings_eyebrow">设置</string> + <string name="stores_chip_signed_out">(未登录)</string> + <string name="stores_tab_store">商店</string> + <string name="stores_tab_installed">已安装</string> + <string name="stores_tab_library">库</string> + <string name="stores_tab_all">全部</string> + <string name="stores_tab_downloads">下载</string> + <string name="stores_tab_count">%1$s(%2$d)</string> + <string name="stores_signin">登录</string> + <string name="stores_signout_named">%1$s · 退出登录</string> + <string name="stores_signout_title">要从 %1$s 退出登录吗?</string> + <string name="stores_signout_note">已安装的游戏会保留。重新登录后将再次获取游戏库。</string> + <string name="stores_signout_stay">保持登录</string> + <string name="stores_signout_go">退出登录</string> + <string name="stores_search_catalog">搜索 %1$s 目录…</string> + <string name="stores_search_installed">搜索已安装的游戏…</string> + <string name="stores_search_library">搜索你的库…</string> + <string name="stores_search_open">搜索</string> + <string name="stores_installed_empty">尚未安装任何内容</string> + <string name="stores_library_loading">加载中</string> + <string name="stores_nothing_matches">没有游戏</string> + <string name="stores_shelves_loading">正在加载商店…</string> + <string name="stores_amazon_no_catalog">无目录</string> + <string name="stores_shelf_new">新上架</string> + <string name="stores_shelf_deals">特惠</string> + <string name="stores_shelf_free">免费游戏</string> + <string name="stores_shelf_trending">趋势</string> + <string name="stores_shelf_library">你的库</string> + <string name="stores_play">游玩</string> + <string name="stores_install">安装</string> + <string name="stores_resume_install">继续安装</string> + <string name="stores_dl_interrupted">已中断</string> + <string name="stores_install_size">安装 · %1$s</string> + <string name="stores_get_free">免费领取</string> + <string name="stores_view_on">在 %1$s 上查看</string> + <string name="stores_buy_price">购买 · %1$s</string> + <string name="stores_installed_chip">已安装</string> + <string name="stores_in_library">已在库中</string> + <string name="stores_free">免费</string> + <string name="stores_resume">继续</string> + <string name="stores_refresh">刷新</string> + <string name="stores_sort">排序</string> + <string name="stores_sort_last_played">最近游玩</string> + <string name="stores_sort_recently_installed">最近安装</string> + <string name="stores_sort_title_asc">标题 A–Z</string> + <string name="stores_sort_title_desc">标题 Z–A</string> + <string name="stores_sort_size_desc">大小: 从大到小</string> + <string name="stores_sort_size_asc">大小: 从小到大</string> + <string name="stores_sort_release_date">发行日期</string> + <string name="stores_view_list">列表视图</string> + <string name="stores_view_cards">卡片视图</string> + <string name="stores_show_mature">显示成人内容</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">离线</string> + <string name="epic_card_none">关闭</string> + <string name="epic_eos">Epic 登录(EOS)</string> + <string name="epic_offline">离线启动</string> + <string name="epic_resolve">解决 Epic 登录问题</string> + <string name="epic_client_version">版本 %1$s</string> + <string name="epic_client_no_runtime">请先安装 Linux 运行时</string> + <string name="epic_client_checking">正在检查最新版本…</string> + <string name="epic_client_unpacking">正在解包…</string> + <string name="epic_client_unreachable">下载服务器未响应</string> + <string name="epic_client_needs_fex">Epic Games Launcher 需要 FEX,FEX 由 Steam 下载。请在 Steam 启动后再次打开启动器。</string> + <string name="epic_client_download_failed">下载失败:%1$s</string> + <string name="epic_client_unpack_failed">无法解包启动器:%1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher 未接受登录。请从启动器重新启动它。</string> + <string name="epic_client_uninstall_body">移除启动器并释放其空间。你的 Epic 游戏仍保持安装并可正常运行,登录信息也会保留,以便重新安装时使用。</string> + <string name="epic_client_uninstall_stops">将先关闭正在运行的会话。</string> + <string name="epic_client_uninstalled">已卸载 Epic Games Launcher</string> + <string name="epic_client_uninstall_failed">部分启动器文件无法删除。请重试。</string> + <string name="epic_client_uninstalling">请等待 Epic Games Launcher 卸载完成</string> + <string name="store_cloud_saves">云存档</string> + <string name="cloud_upload">上传到云端</string> + <string name="cloud_download">从云端下载</string> + <string name="cloud_none">无云存档</string> + <string name="cloud_conflict">云存档冲突</string> + <string name="cloud_conflict_files">云存档冲突 · %1$d 个文件</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">保留云端版本</string> + <string name="cloud_keep_local">保留本地版本</string> + <string name="cloud_checking">正在检查云存档…</string> + <string name="cloud_last_sync">上次同步:%1$s</string> + <string name="cloud_never">尚未同步</string> + <string name="cloud_done">%1$d 个文件</string> + <string name="stores_eyebrow_installed">已安装</string> + <string name="stores_eyebrow_library">在你的库中</string> + <string name="stores_eyebrow_store">商店</string> + <string name="achievements_title">成就</string> + <string name="achievements_count">已解锁 %1$d / %2$d</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">已解锁 · %1$d</string> + <string name="achievements_group_locked">未解锁 · %1$d</string> + <string name="achievements_group_hidden">隐藏 · %1$d</string> + <string name="achievements_hidden">隐藏成就</string> + <string name="achievements_hidden_detail">解锁后显示详情。</string> + <string name="achievements_all">已解锁全部成就</string> + <string name="achievements_reading">读取中…</string> + <string name="achievements_signed_out">登录 %1$s 以查看你的成就。</string> + <string name="achievements_unreachable">无法连接到 %1$s。请在联网后再查看。</string> + <string name="achievements_none">%1$s 未列出此游戏的成就。</string> + <string name="achievements_show_all">显示全部 %1$d 项</string> + <string name="achievements_dialog_title">成就 · %1$s</string> + <string name="stores_in_steam">✓ 已在 Steam 中</string> + <string name="stores_uninstall">卸载</string> + <string name="stores_uninstalling">正在卸载…</string> + <string name="stores_uninstall_title">卸载 %1$s?</string> + <string name="stores_uninstall_body_size">将释放 %1$s,并从 Steam 中移除。</string> + <string name="stores_uninstall_body">将移除其文件和 Steam 快捷方式。</string> + <string name="stores_launch_not_registered">Steam 下次启动时会识别该游戏;请从 Steam 中启动它,或立即启动 Steam。</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">由 Steam 按游戏选择</string> + <string name="stores_card_audio">音频</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">组件</string> + <string name="stores_card_components_value">FEX、DXVK、VKD3D</string> + <string name="stores_card_engine">引擎</string> + <string name="stores_card_engine_value">%1$s · 原生</string> + <string name="stores_card_engine_java">%1$s · 内置</string> + <string name="stores_how_it_runs">运行方式</string> + <string name="stores_kv_fetched">获取来源</string> + <string name="stores_kv_fetched_value">%1$s(使用你的账户)</string> + <string name="stores_kv_installed_to">安装位置</string> + <string name="stores_kv_installed_to_value">游戏存储(Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">启动方式</string> + <string name="stores_kv_launched_by_value">Steam 和 Proton,与 Steam 游戏方式相同</string> + <string name="stores_kv_launched_by_epic">Steam 和 Proton · 每次启动时登录 Epic,关闭 EOS 覆盖层</string> + <string name="stores_kv_launched_by_amazon">Steam 和 Proton · 已设置 Amazon Games Services 变量</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">安装时添加到 Steam(Deck 界面 + Steam 输入)</string> + <string name="stores_downloads_empty">没有下载</string> + <string name="stores_dl_paused">已暂停</string> + <string name="stores_dl_queued">排队中</string> + <string name="stores_dl_queued_at">排队中 · 第 %1$d 位</string> + <string name="stores_dl_cancelled">已取消</string> + <string name="stores_dl_failed">失败</string> + <string name="stores_dl_failed_reason">失败 · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">暂停</string> + <string name="stores_dl_resume">继续</string> + <string name="stores_dl_cancel">取消</string> + <string name="stores_dl_retry">重试</string> + <string name="stores_dl_clear">清除</string> + <string name="stores_dl_clear_all">清除已完成</string> + <string name="stores_stage_manifest">清单</string> + <string name="stores_stage_download">下载</string> + <string name="stores_stage_verify">校验</string> + <string name="stores_stage_install">安装</string> + <string name="stores_stage_done">完成</string> + <string name="stores_stage_checking">检查中</string> + <string name="stores_stage_downloading">下载中</string> + <string name="stores_dl_cancel_confirm">删除下载?</string> + <string name="stores_dl_failed_kept">失败 · 已保留 %1$s</string> + <string name="stores_stage_verifying">校验中</string> + <string name="stores_stage_installing">安装中</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d 个文件</string> + <string name="stores_download_manager">下载管理</string> + <string name="stores_parallel">同时下载数</string> + <string name="stores_install_where">安装到</string> + <string name="stores_install_title">安装 %1$s:</string> + <string name="stores_target_internal">内部存储</string> + <string name="stores_target_free">可用 %1$s</string> + <string name="stores_notification_channel">商店下载</string> + <string name="stores_notification_channel_hint">显示游戏下载进度,并让下载在后台继续进行</string> + <string name="stores_notification_one">正在下载</string> + <string name="stores_notification_many">%1$d 个下载</string> + <string name="stores_notification_waiting">正在准备…</string> + <string name="stores_notification_done_channel">已完成的商店下载</string> + <string name="stores_notification_installed">%1$s 已安装</string> + <string name="stores_notification_failed">%1$s 下载失败</string> + <string name="stores_notification_delete">删除</string> + <string name="stores_notification_keep">保留</string> + <string name="stores_login_title">登录 %1$s</string> + <string name="stores_login_provider_title">使用第三方账号登录</string> + <string name="stores_login_reload">重新加载</string> + <string name="stores_login_close">关闭</string> + <string name="stores_login_retry">重试</string> + <string name="stores_login_finishing">正在完成登录…</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> + <string name="stores_login_error_ssl">与登录页面的连接不安全。</string> + <string name="stores_login_error_verification">无法验证登录。请重试。</string> + <string name="stores_login_error_generic">登录失败。请重试。</string> <string name="common_close">关闭</string> <string name="common_back">返回</string> <string name="common_edit">编辑</string> @@ -2088,4 +2195,668 @@ <plurals name="games_already_n"> <item quantity="other">%1$d 个已在游戏中</item> </plurals> + <string name="hop_back">B · 返回%1$s</string> + <string name="hop_from_games">游戏</string> + <string name="hop_from_play">游玩设置</string> + <string name="sheet_graphics_drivers">图形驱动</string> + <string name="comp_this_proton">此 Proton</string> + <string name="comp_every_proton">所有 Proton</string> + <string name="comp_for_every_proton">适用于所有 Proton</string> + <string name="comp_available_count">可用 · %1$d</string> + <string name="comp_checked">上次检查:%1$s</string> + <string name="comp_check_all">检查新组件和驱动</string> + <string name="comp_get">获取</string> + <string name="comp_proton_bar">%1$s · 下方的 DXVK、VKD3D-Proton 和 FEX 属于此 Proton</string> + <string name="comp_device_tested">%1$s · 已测试</string> + <string name="comp_device_untested">%1$s · 未测试</string> + <string name="comp_device_unsupported">%1$s · 不受支持</string> + <string name="gpu_auto_keeps">让推荐的驱动组合保持最新</string> + <string name="gpu_bar_auto">自动 · %1$s</string> + <string name="gpu_separately">分别设置运行时驱动和显示驱动</string> + <string name="gpu_use_title">使用 %1$s?</string> + <string name="proton_remove_title">移除 %1$s?</string> + <string name="setup_tab_diagnostics">诊断</string> + <string name="setup_ready">可以游玩了</string> + <string name="setup_not_ready">暂时还不能游玩</string> + <string name="setup_ready_runtime">运行时 %1$s</string> + <string name="setup_ready_limit_off">进程限制已关闭</string> + <string name="setup_ready_signed_in">已登录为 %1$s</string> + <string name="setup_needs_you">需要你处理</string> + <string name="setup_group_look">外观</string> + <string name="setup_group_device">此设备</string> + <string name="setup_group_art">游戏库美术图</string> + <string name="flathub_eyebrow">LINUX 应用</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">适用于 Linux 桌面的桌面应用,从“桌面”打开。</string> + <string name="flathub_setup">配置 Flathub</string> + <string name="flathub_remove_title">移除 %1$s?</string> + <string name="flathub_remove_note">其设置和文件会保留。</string> + <string name="flathub_keep">保留</string> + <string name="desktop_size">占用空间</string> + <string name="desktop_uninstall_title">卸载桌面?</string> + <string name="desktop_all_systems">全部</string> + <string name="gog_achievements">GOG 成就</string> + <string name="gog_achievements_hint">为受支持的 GOG 游戏同步成就。下次启动时生效。</string> + <string name="gog_achievements_off">成就已关闭</string> + <string name="gog_achievements_on">成就已开启</string> + <string name="gog_achievements_signin">重新登录 GOG</string> + <string name="gog_achievements_uploaded">成就已上传</string> + <string name="gog_achievements_pending">成就上传待处理</string> + <string name="gog_achievements_enable_store">在「商店」设置中开启 GOG 成就</string> + <string name="gog_achievements_unavailable">成就不可用;请查看会话日志</string> + <string name="achievement_unlocked">成就已解锁</string> + <string name="touch_paste">粘贴</string> + <string name="touch_dpad">方向键</string> + <string name="touch_left_stick">左摇杆</string> + <string name="touch_right_stick">右摇杆</string> + <string name="touch_menu">菜单</string> + <string name="touch_keyboard">键盘</string> + <string name="touch_dpad_up">方向键上</string> + <string name="touch_dpad_down">方向键下</string> + <string name="touch_dpad_left">方向键左</string> + <string name="touch_dpad_right">方向键右</string> + <string name="touch_title">触控</string> + <string name="touch_controller">触控控制器</string> + <string name="touch_mouse">鼠标</string> + <string name="touch_on">开</string> + <string name="touch_off">关</string> + <string name="touch_speed_slow">慢</string> + <string name="touch_speed_normal">正常</string> + <string name="touch_speed_fast">快</string> + <string name="touch_edit_layout">编辑布局</string> + <string name="touch_droiddeck_menu">DroidDeck 菜单</string> + <string name="touch_drag_hint">将控件拖到屏幕上</string> + <string name="touch_arrange">排列</string> + <string name="touch_discard">放弃</string> + <string name="touch_saving">正在保存…</string> + <string name="touch_icon">图标</string> + <string name="touch_narrower">宽−</string> + <string name="touch_wider">宽+</string> + <string name="touch_shorter">高−</string> + <string name="touch_taller">高+</string> + <string name="touch_hide">隐藏</string> + <string name="touch_color_opacity">颜色和不透明度…</string> + <string name="touch_copy_layout">复制此布局</string> + <string name="touch_layout_copied">布局已复制,可粘贴到任意游戏的触控布局中</string> + <string name="touch_paste_layout">粘贴已复制的布局</string> + <string name="touch_reset_layout">恢复为 Steam 的默认布局</string> + <string name="touch_no_binding">此控件在 Steam 中没有绑定,无法设置图标</string> + <string name="touch_icon_for">%1$s 的图标</string> + <string name="touch_layout_color">触控布局颜色</string> + <string name="touch_done">完成</string> + <string name="touch_save_failed">无法保存触控布局</string> + <string name="touch_saved">触控布局已保存到 Steam</string> + <string name="touch_app_id">应用 %1$d</string> + <string name="touch_label_hint">标签(可选)</string> + <string name="touch_icons_missing">未找到 Steam 的图标</string> + <plurals name="touch_icons_found"> + <item quantity="other">来自 Steam 的 %1$d 个图标</item> + </plurals> + <string name="touch_icon_color">图标颜色</string> + <string name="touch_button_color">按钮颜色</string> + <string name="touch_no_icon">无图标</string> + + <string name="stores_sync_sign_in">正在检查登录状态…</string> + <string name="stores_sync_library">正在获取你的游戏库…</string> + <string name="stores_sync_game_list">正在获取游戏列表…</string> + <string name="stores_sync_details">正在加载游戏详情…(%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="other">正在同步 %1$d 个游戏…</item> + </plurals> + <string name="stores_sync_progress">正在同步… %1$d/%2$d</string> + <string name="stores_sync_cover_art">正在获取封面图片…</string> + <string name="stores_sync_failed">同步失败</string> + <string name="stores_sync_no_games">在你的 %1$s 游戏库中未找到游戏</string> + <string name="stores_sync_amazon_no_answer">Amazon Games 未返回你的游戏库信息:请刷新,或重新登录</string> + <string name="stores_sync_gog_unreachable">无法连接到 GOG</string> + <string name="stores_sync_gog_unreadable">无法读取你的 GOG 游戏库</string> + <string name="stores_registering">正在向 Steam 注册…</string> + <string name="mode_client_arch">Steam 客户端</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC 诊断</string> + <string name="setup_vac_diag_hint">Source 游戏会记录控制台(-condebug);会话日志中的 vac.txt 会显示是否安全</string> + <string name="load_starting_steam_x64">正在启动 Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">由 x86-64 Steam 客户端使用</string> + <string name="storage_uninstall_in_x64">此副本位于 x86-64 Steam 客户端中。请在“Steam 客户端”中选择 x86-64,然后在此处卸载。</string> + <string name="storage_uninstall_in_arm64">此副本位于 ARM64 Steam 客户端中。请在“Steam 客户端”中选择 ARM64,然后在此处卸载。</string> + <string name="drawer_page_glasses">眼镜</string> + <string name="glasses_open">VITURE 眼镜</string> + <string name="glasses_control">眼镜控制</string> + <string name="glasses_driver_missing">此版本未包含这副眼镜的驱动。</string> + <string name="glasses_connection_failed">无法连接眼镜。请重新插好线缆,或点按“允许”重试。</string> + <string name="glasses_allow">允许</string> + <string name="glasses_allow_hint">允许 DroidDeck 设置眼镜的刷新率、3D 模式、亮度、音量和遮光,并读取其头部追踪。</string> + <string name="glasses_asking">正在等待你在 Android 提示中允许…</string> + <string name="glasses_denied">控制已被拒绝。允许后才能更改眼镜设置。</string> + <string name="glasses_no_control">这副眼镜可以显示游戏,但无法在此更改其设置。</string> + <string name="glasses_output">输出</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">在眼镜上显示游戏</string> + <string name="glasses_game_on_hint">只在眼镜上显示游戏。关闭:由手机显示,Android 会镜像手机画面。</string> + <string name="glasses_display">显示</string> + <string name="glasses_refresh">刷新率</string> + <string name="glasses_3d">3D(左右分屏)</string> + <string name="glasses_3d_hint">将智能眼镜切换至并排 3D 模式。头部追踪单独控制。</string> + <string name="glasses_3d_failed">未能确认 3D 信号。请在 2D 画面恢复后重试。</string> + <string name="glasses_no_signal">无画面:眼镜处于这部手机无法输出的模式。请长按眼镜的 2D/3D 按钮,或拔下后重新连接。</string> + <string name="glasses_3d_refresh">3D 刷新率</string> + <string name="glasses_auto3d">VR 游戏使用 3D</string> + <string name="glasses_auto3d_hint">SteamVR 运行时切换到 3D,结束后切回。</string> + <string name="glasses_picture">图片</string> + <string name="glasses_picture_hint">自动模式会在双眼显示平面内容并检测 SteamVR。选择“并排游戏”模式可显示 SBS 内容。</string> + <string name="glasses_picture_auto">自动</string> + <string name="glasses_picture_screen">虚拟屏幕</string> + <string name="glasses_picture_sbs">左右分屏游戏</string> + <string name="glasses_screen_size">屏幕宽度</string> + <string name="glasses_screen_distance">屏幕距离</string> + <string name="glasses_screen_next_session">当游戏以虚拟屏幕形式在眼镜上运行时,宽度和距离才会生效。</string> + <string name="glasses_screen_no_output">这些设置在开启“在眼镜上显示游戏”且游戏显示在眼镜上时生效。</string> + <string name="glasses_screen_flat_hint">“自动”会让这款 2D 游戏全屏显示。使用虚拟屏幕可调整其宽度、距离和头部追踪。</string> + <string name="glasses_screen_use">使用虚拟屏幕</string> + <string name="glasses_screen_direct_hint">SteamVR 会充满整个视野。在 VR 中调整其视野范围;宽度和距离仅适用于虚拟屏幕。</string> + <string name="glasses_screen_sbs_hint">左右分屏游戏会填满每只眼睛的视野。宽度和距离仅适用于虚拟屏幕。</string> + <string name="glasses_tracking_flat_hint">“自动”会让这款 2D 游戏固定在视野中。要使用头部追踪,请在“显示”中选择“虚拟屏幕”。</string> + <string name="glasses_tracking_sbs_hint">头部追踪适用于虚拟屏幕或正在运行的 SteamVR 游戏。</string> + <string name="glasses_hardware">设备</string> + <string name="glasses_brightness">亮度</string> + <string name="glasses_volume">音量</string> + <string name="glasses_sunblock">遮光</string> + <string name="glasses_sunblock_hint">让前镜片变暗。</string> + <string name="glasses_tracking">追踪</string> + <string name="glasses_head_tracking">头部追踪</string> + <string name="glasses_head_tracking_hint">眼镜自带的传感器会随头部转动虚拟屏幕和 SteamVR。</string> + <string name="glasses_recenter">重新居中视角</string> + <string name="glasses_recenter_button">重置屏幕中心</string> + <string name="glasses_vr_fov">SteamVR 视场角</string> + <string name="glasses_vr_fov_hint">调低让 SteamVR 更近并填满眼镜;调高可看到更多周围内容。</string> + <string name="glasses_playing">正在 %1$s 上游玩</string> + <string name="glasses_calibration">追踪校准</string> + <string name="glasses_calibration_hint">减少漂移并对齐水平基准。</string> + <string name="glasses_calibration_saved_hint">这副眼镜已应用保存的校准。</string> + <string name="glasses_calibration_open">校准</string> + <string name="glasses_calibration_instructions">将已连接的眼镜倒置放在水平面上,让镜框平稳贴合。点按“开始”,然后约 8 秒内不要触碰。一旦移动,测量会重新开始。此操作校正漂移和倾斜,不校正朝向。</string> + <string name="glasses_calibration_settling">保持眼镜倒置,不要触碰。正在等待其静止…</string> + <string name="glasses_calibration_collecting">正在测量传感器。请保持眼镜静止。</string> + <string name="glasses_calibration_moving">检测到移动。请勿触碰眼镜;测量将自动重新开始。</string> + <string name="glasses_calibration_turn_over">请将眼镜倒置放在水平面上。放置正确后将开始测量。</string> + <string name="glasses_calibration_complete">校准已保存。戴上眼镜并直视前方,然后点按“完成”以重新居中。</string> + <string name="glasses_calibration_failed">校准未能完成。请检查连接并保持眼镜静止,然后重试。之前的校准保持不变。</string> + <string name="glasses_calibration_start">开始</string> + <string name="glasses_calibration_done">完成</string> + <string name="glasses_calibration_reset">重置追踪校准</string> + <string name="glasses_calibration_reset_hint">删除已保存的校准并恢复该型号的默认值?重新戴上眼镜后请重新居中。</string> + <string name="glasses_calibration_reset_button">重置</string> + <string name="hand_camera_group">手部追踪</string> + <string name="hand_camera_prompt_title">使用手机摄像头追踪手部或 Joy-Con 控制器?</string> + <string name="hand_camera_prompt_body">未连接控制器时,手机摄像头会在 VR 中追踪您的裸手:拇指和食指捏合即可点击,握紧拳头即可抓取,掌心朝向自己并捏合即可打开菜单。连接 Joy-Con 控制器后,摄像头会追踪其位置,同时 Joy-Con 控制器会提供旋转和按键输入。照片会在本设备上处理,不会保存或发送。</string> + <string name="hand_camera_rear">后置相机</string> + <string name="hand_camera_rear_hint">推荐使用。通常更清晰、视野更广。</string> + <string name="hand_camera_front">前置相机</string> + <string name="hand_camera_front_hint">适用于设备背面无法朝向你的情况。</string> + <string name="hand_camera_allow">使用相机</string> + <string name="hand_camera_not_now">暂不</string> + <string name="hand_camera_setting">相机手部追踪</string> + <string name="hand_camera_setting_hint">使用手机摄像头进行徒手手势操作或在 VR 中定位已配对的 Joy-Con 控制器。Joy-Con 控制器提供旋转和按键输入。当智能眼镜追踪您的手或 Joy-Con 控制器时,此功能会暂停。图像仅在此设备上处理。</string> + <string name="hand_camera_choice">相机</string> + <string name="hand_camera_access">相机权限</string> + <string name="hand_camera_access_hint">请允许相机权限,以便开始手部追踪。</string> + <string name="hand_camera_access_denied">相机权限已关闭。请在 Android 设置中开启。</string> + <string name="hand_camera_allow_button">允许</string> + <string name="hand_camera_open_settings">打开设置</string> + <string name="hand_camera_placement">相机位置</string> + <string name="hand_camera_placement_hint">开始游戏前,请确认相机能看到你。</string> + <string name="hand_camera_check">检查</string> + <string name="hand_camera_check_title">相机位置</string> + <string name="hand_camera_how_rear">将设备立在距离 1.5 到 2 米、约胸口高度的地方,让后置相机对着你。然后张开双手走进画面。</string> + <string name="hand_camera_how_front">将设备立在距离 1.5 到 2 米、约胸口高度的地方,让屏幕对着你。然后张开双手走进画面。</string> + <string name="hand_camera_starting">正在启动相机…</string> + <string name="hand_camera_stand_up">设备平放着。请将它立起来,让相机对着你。</string> + <string name="hand_camera_upright">请把设备立得更直一些,让相机对着你。</string> + <string name="hand_camera_not_seen">还看不到你。请走进画面,让头和肩膀露出来。</string> + <string name="hand_camera_move_back">请稍微往后退一点。</string> + <string name="hand_camera_move_closer">请再靠近一点。</string> + <string name="hand_camera_show_hands">请在相机能看到的位置伸出双手。</string> + <string name="hand_camera_good">看起来不错。</string> + <string name="hand_camera_failed">相机无法启动。请关闭正在使用相机的其他应用,然后重试。</string> + <string name="hand_camera_switch">切换相机</string> + <string name="hand_camera_skip">跳过</string> + <string name="hand_camera_done">完成</string> + <string name="glasses_xreal_network_missing">正在等待眼镜的 USB Ethernet 连接。这部手机可能不向应用开放此连接。</string> + <string name="glasses_xreal_connection_failed">XREAL 连接中断或返回了不受支持的响应。正在重试…</string> + <string name="glasses_xreal_experimental">实验性 1S 支持。请在眼镜菜单中使用跟随模式并关闭防抖。追踪方向和显示模式仍需在设备上测试。</string> + <string name="stores_fact_developer">开发商</string> + <string name="stores_fact_publisher">发行商</string> + <string name="stores_fact_released">发行日期</string> + <string name="stores_hltb_main">主线</string> + <string name="stores_hltb_extras">+ 支线</string> + <string name="stores_hltb_completionist">全收集</string> + <string name="stores_hltb_hours">%1$s 小时</string> + <string name="stores_hltb_minutes">%1$d 分钟</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard 模式</string> + <string name="cardboard_mode_hint">为手机 VR 眼镜提供左右眼画面。</string> + <string name="cardboard_source">画面</string> + <string name="cardboard_source_screen">虚拟屏幕</string> + <string name="cardboard_source_sbs">左右并排 3D</string> + <string name="cardboard_viewer">眼镜</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard(2014)</string> + <string name="cardboard_viewer_none">无镜片</string> + <string name="cardboard_ipd">瞳距</string> + <string name="cardboard_screen_width">屏幕宽度</string> + <string name="cardboard_screen_distance">屏幕距离</string> + <string name="cardboard_head_tracking">头部追踪</string> + <string name="cardboard_no_sensor">此设备没有旋转传感器。</string> + <string name="cardboard_recenter">重置视角</string> + <string name="cardboard_recenter_button">重置</string> + <string name="cardboard_steamvr">SteamVR(实验性)</string> + <string name="cardboard_steamvr_install">安装</string> + <string name="cardboard_steamvr_installing">正在下载并解压 SteamVR…</string> + <string name="cardboard_steamvr_start">启动</string> + <string name="cardboard_steamvr_stop">停止</string> + <string name="cardboard_steamvr_unavailable">此会话中不可用。</string> + <string name="cardboard_steamvr_failed">SteamVR 未响应;请查看会话日志。</string> + <string name="drawer_component_downloads">下载组件</string> + <string name="drawer_component_downloads_hint">下载内容与“组件”页面共享。在上方选择已下载的版本,即可在下次启动游戏时使用。</string> + <string name="drawer_component_choose_download">选择要下载的版本</string> + <string name="display_picture_position">画面位置</string> + <string name="display_position_top">置顶</string> + <string name="display_position_bottom">置底</string> + <string name="display_position_center">居中(默认)</string> + <string name="setup_tab_storage">存储</string> + <string name="storage_measuring">正在统计存储…</string> + <string name="storage_measuring_hint">首次统计需要几秒钟。</string> + <string name="storage_internal">内部存储</string> + <string name="storage_used_of">已用 %1$s / %2$s</string> + <string name="storage_free">可用 %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck 占用 %1$s。统计时间 %2$s。</string> + <string name="storage_rescanning">正在重新统计…</string> + <string name="storage_other_apps">其他 Android 应用</string> + <string name="storage_safe_now">现在可安全释放</string> + <string name="storage_safe_hint">未使用的运行时、残留、旧日志</string> + <string name="storage_clean_up">清理…</string> + <string name="storage_session_running">停止会话后才能清理或移除。容量仍会显示。</string> + <string name="storage_where">占用去向</string> + <string name="storage_games">Steam 游戏</string> + <string name="storage_game_data">游戏数据</string> + <string name="storage_game_data_hint">前缀 %1$s · 创意工坊 %2$s · 着色器 %3$s</string> + <string name="storage_tools">Proton 与运行时</string> + <string name="storage_tools_unused">%1$s 未使用</string> + <string name="storage_stores">GOG、Epic 及其他商店</string> + <string name="storage_stores_hint">在商店中卸载</string> + <string name="storage_desktop">桌面应用</string> + <string name="storage_desktop_hint">Flatpak 应用与运行时</string> + <string name="storage_system">Linux 系统与 Steam 客户端</string> + <string name="storage_system_hint">运行任何内容所必需</string> + <string name="storage_app_data">DroidDeck 数据</string> + <string name="storage_app_data_hint">旧会话日志 %1$s · 缓存 · 驱动</string> + <string name="storage_legend_games">游戏</string> + <string name="storage_legend_data">游戏数据</string> + <string name="storage_legend_tools">Proton 与运行时</string> + <string name="storage_legend_stores">其他商店</string> + <string name="storage_legend_desktop">桌面应用</string> + <string name="storage_legend_system">Linux 系统</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">清理</string> + <string name="storage_clean_up_lede">此处不会影响已安装的游戏或进行中的下载。</string> + <string name="storage_nothing_to_clean">目前没有可清理的内容。</string> + <string name="storage_selected">已选:%1$s · %2$s → 可用 %3$s</string> + <string name="storage_cleaning">正在清理…</string> + <string name="storage_free_button">释放 %1$s</string> + <string name="storage_freed">已释放 %1$s。</string> + <string name="storage_item_runtimes">未使用的 Steam 运行时与 Proton</string> + <string name="storage_item_leftovers">已卸载游戏的残留</string> + <string name="storage_item_leftovers_unsure">可能含存档的残留</string> + <string name="storage_item_logs">旧会话日志</string> + <string name="storage_item_logs_detail">保留当前会话的日志</string> + <string name="storage_item_custom_detail">没有游戏使用它。如需使用,请在组件中重新安装。</string> + <string name="storage_item_shaders">已安装游戏的着色器缓存</string> + <string name="storage_item_shaders_detail">会随着游玩重新生成。每个游戏开头几分钟会再次卡顿。</string> + <string name="storage_tag_safe">安全</string> + <string name="storage_tag_unused">未使用</string> + <string name="storage_tag_stutter">卡顿</string> + <string name="storage_tag_saves">检查存档</string> + <string name="storage_tag_default">默认</string> + <string name="storage_tag_required">必需</string> + <string name="storage_tag_not_used">未使用</string> + <string name="storage_back">存储</string> + <string name="storage_games_with_data">%1$s 及其数据</string> + <string name="storage_sort_largest">最大</string> + <string name="storage_sort_least_played">最少游玩</string> + <string name="storage_sort_sd">在 SD 卡上</string> + <string name="storage_no_games">此处没有游戏。</string> + <string name="storage_played">游玩 %1$s</string> + <string name="storage_never_played">从未游玩</string> + <string name="storage_game_parts">游戏 %1$s · 数据 %2$s</string> + <string name="storage_uninstall">卸载</string> + <string name="storage_games_note">卸载会打开 Steam 自带的对话框,以便 Steam 记录。要将游戏移到 SD 卡,请使用 Steam › 设置 › 存储。</string> + <string name="storage_uninstall_title">卸载 %1$s?</string> + <string name="storage_uninstall_body">Steam 会打开并要求确认。这将释放该游戏的 %1$s。其前缀会保留到清理残留时,Steam 云存档仍留在你的账号中。</string> + <string name="storage_open_steam">打开 Steam</string> + <string name="storage_tools_detail">%1$s · %2$s 未使用</string> + <string name="storage_remove_unused">移除未使用 · %1$s</string> + <string name="storage_in_use">使用中</string> + <string name="storage_not_used">未使用</string> + <string name="storage_remove">移除</string> + <string name="storage_remove_title">移除 %1$s?</string> + <string name="storage_remove_body">释放 %1$s。若之后有游戏需要,Steam 会重新下载。</string> + <string name="storage_tool_fex_runtime">Linux x86 游戏所需(FEX)</string> + <string name="storage_tool_arm_runtime">ARM64 Proton 所需</string> + <string name="storage_tool_redist">游戏请求的 VC++ 与 DirectX 安装程序</string> + <string name="storage_tool_fex">运行 Linux x86 游戏</string> + <string name="storage_tool_steam">Steam 工具</string> + <string name="storage_tool_old_runtime">DroidDeck 无需此运行时即可运行游戏</string> + <string name="storage_tool_x86_proton">x86 Proton,DroidDeck 无法运行</string> + <string name="storage_tool_custom_default">所有游戏的默认项</string> + <string name="storage_tool_custom_unused">没有游戏使用它</string> + <string name="storage_tool_custom_unknown">无法读取 Steam 的设置,因此保留</string> + <string name="storage_cleanup_busy">请等待存储清理完成</string> + <string name="storage_low_title">仅剩 %1$s 可用</string> + <string name="storage_low_body">Steam 需要空间用于更新与着色器缓存。低于 10 GB 时,游戏更新可能中途失败。</string> + <string name="storage_low_safe">%1$s 可安全释放。</string> + <string name="storage_free_up">释放空间</string> + <string name="storage_play_anyway">仍然游玩</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d 个已安装</item> + <item quantity="other">%d 个已安装</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d 个在 SD 卡上</item> + <item quantity="other">%d 个在 SD 卡上</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d 个工具</item> + <item quantity="other">%d 个工具</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">%d 个游戏的空前缀文件夹与着色器缓存</item> + <item quantity="other">%d 个游戏的空前缀文件夹与着色器缓存</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">%d 个游戏的前缀仍含文件,其中可能有本地存档。如需保留请先备份。</item> + <item quantity="other">%d 个游戏的前缀仍含文件,其中可能有本地存档。如需保留请先备份。</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d 个游戏</item> + <item quantity="other">%d 个游戏</item> + </plurals> + <string name="storage_tool_default_proton">DroidDeck 的默认 Proton</string> + <string name="storage_tool_proton">DroidDeck 的 Proton 11 选项</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d 个游戏使用</item> + <item quantity="other">%d 个游戏使用</item> + </plurals> + <string name="storage_legend_components">组件</string> + <string name="storage_components">组件</string> + <string name="storage_item_components">未使用的组件</string> + <string name="storage_component_original">原始 %1$s · %2$s</string> + <string name="storage_original_confirm">释放 %1$s。它只会恢复一个已不再安装的 Proton 版本。</string> + <string name="storage_leftovers_unchecked">未检查:无法读取某个 Steam 应用清单,因此在可读取前会保留已卸载游戏的前缀。</string> + <string name="storage_failed">未能完成:%1$s</string> + <string name="storage_desktop_shared">共享 %1$s</string> + <string name="storage_data_installed">已安装游戏</string> + <string name="storage_data_parts">前缀 %1$s · 着色器 %2$s · 创意工坊 %3$s</string> + <string name="storage_clear_shaders">清除着色器</string> + <string name="storage_data_leftovers">已卸载游戏</string> + <string name="storage_steam_app">Steam 应用 %1$d</string> + <string name="storage_leftover_unsure_detail">其前缀仍含文件,其中可能有本地存档</string> + <string name="storage_leftover_confirm">删除其 Wine 前缀与着色器缓存(%1$s)。请先备份需要的存档;Steam 云存档仍留在你的账号中。</string> + <string name="storage_data_other">保留</string> + <string name="storage_data_other_title">非 Steam 游戏与 Steam 的共享前缀</string> + <string name="storage_data_other_detail">从商店或手动添加的游戏的前缀</string> + <string name="storage_components_packages">已下载的包</string> + <string name="storage_components_originals">已保存的原始文件</string> + <string name="storage_components_none">没有已下载的组件包。</string> + <string name="storage_component_in_use">已为某个 Proton 或游戏选中</string> + <string name="storage_component_unused">未在任何地方选中</string> + <string name="storage_original_kept">恢复已安装的 Proton</string> + <string name="storage_original_old">不再安装的 Proton 版本</string> + <string name="storage_tag_in_use">使用中</string> + <string name="storage_components_note">使用中的组件会被锁定。请在组件中选择它们;在此移除的内容可以在那里重新下载。</string> + <string name="storage_component_confirm">释放 %1$s。你自己导入的包无法再次下载。</string> + <string name="storage_desktop_detail">%1$s,用于 Flatpak 应用及其共享内容</string> + <string name="storage_desktop_apps_title">应用</string> + <string name="storage_desktop_none">未安装 Flatpak 应用。</string> + <string name="storage_desktop_shared_title">应用共享</string> + <string name="storage_desktop_runtimes">运行时</string> + <string name="storage_desktop_runtimes_detail">应用所依赖的库;未使用的会随“移除未使用”一起清理</string> + <string name="storage_desktop_cache">下载仓库</string> + <string name="storage_desktop_cache_detail">Flatpak 的对象仓库与缓存的下载</string> + <string name="storage_desktop_prune">移除未使用</string> + <string name="storage_desktop_prune_body">移除没有已安装应用需要的运行时,并清理 Flatpak 的对象仓库。已安装的应用照常工作。</string> + <string name="storage_flatpak_uninstall_body">移除该应用(%1$s)以及没有其他应用使用的运行时。其主目录中的数据会保留。</string> + <plurals name="storage_components_count"> + <item quantity="one">%d 个包</item> + <item quantity="other">%d 个包</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d 个应用</item> + <item quantity="other">%d 个应用</item> + </plurals> + <string name="boot_movie">开机动画</string> + <string name="boot_movie_video">视频</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps 更流畅,但 Steam 启动时会占用更多 CPU。在 Steam 自身设置中选择的启动动画优先。</string> + <string name="boot_movie_sound">声音</string> + <string name="boot_movie_custom">自定义视频</string> + <string name="boot_movie_custom_hint">MP4、MOV、MKV 或 WebM。其他格式及超过 %1$d MB 的文件会在设备上转换为 720p WebM,最长 %2$d 秒。</string> + <string name="boot_movie_import">导入</string> + <string name="boot_movie_remove">移除</string> + <string name="boot_movie_pick">选择开机动画</string> + <string name="boot_movie_imported">%1$s 现在是开机动画</string> + <string name="boot_movie_imported_silent">%1$s 现在是开机动画(无声)</string> + <string name="boot_movie_too_long">需要转换的视频不能超过 %1$d 秒</string> + <string name="boot_movie_converting">正在转换 %1$d%%</string> + <string name="boot_movie_converting_started">正在为 Steam 转换 %1$s。请保持 DroidDeck 打开。</string> + <string name="boot_movie_unsupported">此设备无法解码该视频。</string> + <string name="boot_movie_import_failed">无法导入该视频</string> + <string name="glasses_experimental">Luma Ultra 摄像头 — 实验性功能</string> + <string name="glasses_joycons">Joy-Con 位置追踪</string> + <string name="glasses_joycons_hint">使用智能眼镜摄像头定位已配对的 Joy-Con 控制器。旋转和按键输入来自 Joy-Con 控制器。当您的手腕被遮挡时,系统会估算位置。此功能会取代徒手操作的控制器,并暂停手机摄像头追踪。连接或重置追踪中心时,请将 Joy-Con 控制器指向前方。</string> + <string name="glasses_joycons_requires_position">请先启用位置追踪功能。需要 Android 12 或更高版本且 Joy-Con 控制器支持体感功能。默认关闭。</string> + <string name="setup_tab_glasses">智能眼镜</string> + <string name="setup_glasses_scope">显示和头部追踪设置可在 DroidDeck 菜单、游戏和桌面会话之间共享。</string> + <string name="setup_glasses_connect">连接智能眼镜以更改其显示和追踪设置。断开连接后,您保存的设置将被保留。</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">显示模式</string> + <string name="glasses_output_2d">2D 输出</string> + <string name="glasses_output_3d">3D 输出</string> + <string name="glasses_picture_group">画面和虚拟屏幕</string> + <string name="glasses_position_group">位置和地面高度</string> + <string name="glasses_hands_group">手部追踪 — 实验性功能</string> + <string name="glasses_tracking_status">追踪状态</string> + <string name="glasses_resolution_2d">2D 分辨率</string> + <string name="glasses_resolution_3d">3D 分辨率</string> + <string name="glasses_resolution_vr">VR 分辨率</string> + <string name="glasses_resolution_auto">自动</string> + <string name="glasses_resolution_inherit">与 2D / 3D 相同</string> + <string name="glasses_resolution_hint">单眼输出分辨率</string> + <string name="glasses_refresh_30_hint">启用智能眼镜游戏功能,选择显示器的原生 30 Hz 模式。</string> + <string name="glasses_3dof">3DoF 虚拟屏幕</string> + <string name="glasses_3dof_hint">将平面游戏固定在您面前,以便您可以环顾四周。无需切换到 3D 模式即可启用智能眼镜游戏功能。</string> + <string name="glasses_screen_app_wide">宽度和距离会立即更新 DroidDeck 菜单、游戏和桌面会话的追踪虚拟屏幕。</string> + <string name="glasses_head_tracking_spatial_vr_hint">位置追踪包含 SteamVR 中的头部旋转。如需仅进行旋转追踪,请关闭位置追踪。</string> + <string name="glasses_head_tracking_spatial_hint">控制虚拟屏幕上的头部移动。位置追踪包含 SteamVR 中的头部旋转。</string> + <string name="glasses_quick_actions">快捷操作</string> + <string name="glasses_recenter_screen_hint">看向您希望屏幕显示的位置,然后重置追踪中心以设置其高度和方向。</string> + <string name="glasses_recenter_joycons_button">重置 Joy-Con 中心</string> + <string name="phone_camera_tracking_group">手机摄像头 — 实验性功能</string> + <string name="phone_camera_tracking_setting">追踪手部或 Joy-Con 控制器</string> + <string name="glasses_position">位置追踪 — 实验性功能</string> + <string name="glasses_position_hint">在VR中以及虚拟屏幕周围进行物理移动。重新开始追踪需要一些时间。</string> + <string name="glasses_eye_height">当前眼睛距地面的高度</string> + <string name="glasses_floor">根据当前高度设置地面高度</string> + <string name="glasses_floor_set">设置地面高度</string> + <string name="glasses_spatial_setup">立体摄像头设置和诊断</string> + <string name="glasses_spatial_setup_hint">游戏前检查摄像头校准和手部追踪。</string> + <string name="glasses_spatial_open">打开设置</string> + <string name="glasses_hands">用手操作控制器</string> + <string name="glasses_hands_hint">使用智能眼镜摄像头用手瞄准,捏合点击,握紧手掌抓取VR中的物品。游戏手柄摇杆可以移动和旋转。取代Joy-Con的位置追踪。游戏过程中可能会出现延迟或追踪丢失。</string> + <string name="glasses_hands_ready_hint">在追踪设置中,启用Luma Ultra摄像头下的徒手操作控制器。首先显示张开的手。</string> + <string name="glasses_hands_base">共享Luma Ultra校准</string> + <string name="glasses_hands_base_hint">使用共享的Luma Ultra底座。校准您的智能眼镜以验证其准确性。</string> + <string name="glasses_hands_calibration_verified">测量校准已验证</string> + <string name="glasses_hands_calibration_required">需要验证</string> + <string name="glasses_hands_calibration_required_hint">通过测量距离检查后,即可使用裸手操作控制器。</string> + <string name="tracking_recovery_lost">追踪丢失</string> + <string name="tracking_recovery_restart_help">还卡住了吗?在手机上:智能眼镜→跟踪→打开设置→显示诊断→重新启动跟踪。</string> + <string name="tracking_recovery_disconnected">智能眼镜断开连接</string> + <string name="tracking_recovery_connect">检查 USB 连接并重新连接智能眼镜。\n如果手机上出现 USB 访问提示,请接受该提示。</string> + <string name="tracking_recovery_usb_help">连接后,在光线充足的房间中慢慢环顾四周以恢复跟踪。</string> + <string name="tracking_recovery_recenter">需要重置中心</string> + <string name="tracking_recovery_recenter_steps">追踪已恢复到新位置。\n看向前方,然后在手机上点击“重置追踪中心”。</string> + <string name="tracking_recovery_recenter_help">您也可以在智能眼镜 → 追踪 → 打开设置中找到重置追踪中心。您保存的相机校准信息将被保留。</string> + <string name="tracking_recovery_stabilizing">稍等一下</string> + <string name="tracking_recovery_hold">重置追踪中心正在进行中。\n请在追踪稳定期间保持智能眼镜静止。</string> + <string name="tracking_recovery_automatic">当头部跟踪准备就绪时,该屏幕自动关闭。</string> + <string name="glasses_steady_hand_aim">稳定双手瞄准</string> + <string name="glasses_steady_hand_aim_hint">从肩膀到手掌瞄准。关闭以进行手腕控制旋转。</string> + <string name="spatial_title">空间设置</string> + <string name="spatial_wait_tracking">等待追踪……</string> + <string name="spatial_cameras_description">左、右跟踪摄像机</string> + <string name="spatial_camera_sync">相机同步</string> + <string name="spatial_ready">准备好了</string> + <string name="spatial_sync_hint">等待相机和头部跟踪对齐。保持智能眼镜连接。</string> + <string name="spatial_prepare">1.准备校准目标</string> + <string name="spatial_print_actual">按实际尺寸打印</string> + <string name="spatial_print_hint">每个正方形的尺寸必须为 30 毫米(1.181 英寸)。将板材平坦地安装在光线充足区域的刚性表面上。</string> + <string name="spatial_print">打印校准板</string> + <string name="spatial_capture_group">2.捕捉不同的观点</string> + <string name="spatial_board_stationary">保持校准目标静止</string> + <string name="spatial_capture_hint">将智能眼镜移近、移远和侧向移动。向左/向右转动它们,向上/向下倾斜它们,并向侧面倾斜它们。将校准目标保留在两个相机中,并在每次捕获之前短暂暂停。</string> + <string name="spatial_start">开始新的校准</string> + <string name="spatial_wait_sync">等待相机同步。</string> + <string name="spatial_start_hint">开始新的校准以收集视图。</string> + <string name="spatial_views_hint">保持校准目标在两个预览中可见。从不同角度捕捉至少 24 个清晰视图。</string> + <string name="spatial_capturing">捕捉……</string> + <string name="spatial_capture">捕获校准目标视图</string> + <string name="spatial_alignment">计算相机对准</string> + <string name="spatial_calculating">正在计算……</string> + <string name="spatial_calculate">计算校准</string> + <string name="spatial_distance_group">3.检查距离</string> + <string name="spatial_distance">测量距离</string> + <string name="spatial_distance_hint">从 12 英寸或 30 厘米开始,以便打印的标记更容易检测到。选择您将使用的精确测量值。</string> + <string name="spatial_camera_board_distance">左相机至标定目标中心</string> + <string name="spatial_checking_distance">检查距离……</string> + <string name="spatial_validate">验证距离</string> + <string name="spatial_diagnostics">诊断</string> + <string name="spatial_show_diagnostics">显示诊断</string> + <string name="spatial_diagnostics_hint">相机定时和跟踪恢复工具。</string> + <string name="spatial_camera_timing">相机计时</string> + <string name="spatial_hand_input">来自手部跟踪的输入</string> + <string name="spatial_wait_timing">等待相机计时。</string> + <string name="spatial_frames">相机图像</string> + <string name="spatial_gpu">GPU检测手部</string> + <string name="spatial_gpu_hint">CPU 是默认值。 GPU 是实验性的,可能会导致 SteamVR 重新启动。当跟踪重新启动时,此选择会重置。</string> + <string name="spatial_lite">手部模型的精简检测</string> + <string name="spatial_lite_hint">使用 Lite 手掌检测器和手上的 Lite 关键点。检查瞄准、捏合和抓取的准确性。跟踪重新启动时重置。</string> + <string name="spatial_adaptive">自动输入频率以跟踪手部</string> + <string name="spatial_adaptive_hint">调整输入处理速度。跟踪重新启动时重置。</string> + <string name="spatial_half_rate">限制手部追踪的输入频率</string> + <string name="spatial_half_rate_hint">使用一半的相机图像。关闭以比较最大频率。跟踪重新启动时重置。</string> + <string name="spatial_diagnostic_capture">诊断捕获</string> + <string name="spatial_diagnostic_capture_hint">在本地保存一对立体图像。仅在请求时才保存图像。</string> + <string name="spatial_save_frame">保存相机图像</string> + <string name="spatial_restart_tracking">重新开始追踪</string> + <string name="spatial_restart_hint">如果跟踪在光线充足的区域中无法恢复,请使用。重新启动需要新的跟踪源。</string> + <string name="spatial_restart">重启</string> + <string name="spatial_restart_title">重新开始追踪?</string> + <string name="spatial_restart_confirm">未保存的校准视图将会丢失。之后请保持智能眼镜静止,并在追踪恢复后重置追踪中心。</string> + <string name="spatial_views_count">%1$d / 已捕获 24 次观看</string> + <string name="spatial_capture_paused">捕获已暂停:%1$s</string> + <string name="spatial_measure_hint">测量%1$s。在两个预览中显示完整的校准目标,然后保持不动。</string> + <string name="spatial_timing_values">%1$.1f Hz • 图像年龄 %2$.1f ms • 处理 %3$.1f ms</string> + <string name="spatial_input_values">输入限制%1$.1f Hz • 摄像机图像的%2$.0f%%。头部跟踪继续以其最大频率进行。</string> + <string name="spatial_frame_counts">%1$d 已处理 • %2$d 已丢弃 • %3$d 因输入限制而被跳过</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra 校准</string> + <string name="spatial_print_scale" formatted="false">以 100%/实际尺寸打印。每个正方形:30 毫米(1.181 英寸)。</string> + <string name="spatial_print_stationary">保持校准目标平坦且静止;在拍摄之间移动智能眼镜。</string> + <string name="spatial_print_check">刻度检查:刻度之间 100 毫米(3.937 英寸)</string> + <string name="spatial_distance_12in">12 英寸(30.48 厘米)</string> + <string name="spatial_distance_30cm">30 厘米(11.81 英寸)</string> + <string name="spatial_distance_20in">20 英寸(50.8 厘米)</string> + <string name="spatial_distance_50cm">50 厘米(19.69 英寸)</string> + <string name="spatial_disabled">已停用</string> + <string name="spatial_wait_stable">等待稳定跟踪</string> + <string name="spatial_disconnected">已断开连接</string> + <string name="spatial_hands_off">徒手操作的控制器已关闭</string> + <string name="spatial_tracking_off">位置跟踪已关闭或智能眼镜已断开连接</string> + <string name="spatial_recenter_pending">已请求重置追踪中心 — 请在追踪稳定期间保持静止。</string> + <string name="spatial_tracking_lost">跟踪丢失 — 面对光线充足且细节可见的区域</string> + <string name="spatial_origin_changed">追踪原点已更改 — 点击“重置追踪中心”,然后保持静止。</string> + <string name="spatial_active">6DoF 主动</string> + <string name="spatial_connect_hint">连接 Luma Ultra 并启用位置跟踪。</string> + <string name="spatial_validation_session">已验证此连接的校准。</string> + <string name="spatial_validation_saved">校准已验证并保存。</string> + <string name="spatial_wait_cameras">等待立体摄像头</string> + <string name="spatial_wait_hands">等待手部追踪</string> + <string name="spatial_collect_instructions">保持 5 × 7 校准目标静止。移动和旋转智能眼镜时捕获 24 个以上视图。</string> + <string name="spatial_capture_pending">等待下一个摄像机图像。保持智能眼镜不动。</string> + <string name="spatial_validation_pending">检查下一个摄像机图像。保持完整校准目标可见并保持静止。</string> + <string name="spatial_start_first">首先开始校准</string> + <string name="spatial_no_camera_frame">没有新的相机图像到达。检查智能眼镜连接和相机预览,然后重试。</string> + <string name="spatial_clock_reset">相机时钟重置</string> + <string name="spatial_frame_changed">追踪坐标系已更改。您的视图已保存以供重新计算。重置追踪中心,然后开始新的设置以捕获更多视图。</string> + <string name="spatial_device_loaded">设备校准已加载</string> + <string name="spatial_base_loaded">Luma Ultra 基本校准已加载</string> + <string name="spatial_calibration_needed">需要校准</string> + <string name="spatial_tap_start">点击首先开始新的校准。</string> + <string name="spatial_capture_recenter_pending">重置追踪中心正在等待稳定的追踪。请保持静止片刻。</string> + <string name="spatial_capture_recenter">追踪已更改。点击“重置追踪中心”一次,然后在捕获之前保持静止。</string> + <string name="spatial_capture_unsynchronized">采集被拒绝:头部跟踪未同步,或在采集过程中发生了变化。保持不动后重试。</string> + <string name="spatial_align_first">在检查距离之前计算相机对准。</string> + <string name="spatial_processing_failed">相机处理失败</string> + <string name="spatial_hand_head_changed">检测手部期间头部追踪发生变化</string> + <string name="spatial_hand_wait_sync">等待相机和云台同步</string> + <string name="spatial_no_wrists">未检测到手腕。将 Joy-Con 控制器手柄放在智能眼镜前面</string> + <string name="spatial_no_hands">未检测到手。在智能眼镜前展示张开的手掌</string> + <string name="spatial_one_camera_wrists">仅在一台摄像机中可以看到手腕;将控制器句柄保留在共享视图中</string> + <string name="spatial_one_camera_hands">仅在一台摄像机中可以看到手;将双手掌保持在共享视图中</string> + <string name="spatial_ambiguous_hands">两个摄像头都能看到手,但左/右匹配不明确</string> + <string name="spatial_inconsistent_depth">检测到手,但立体深度不一致</string> + <string name="spatial_rejected_wrist">立体或运动检查拒绝手腕位置</string> + <string name="spatial_inconsistent_palm">检测到立体点,但手掌几何形状不一致</string> + <string name="spatial_hands_need_calibration">完成校准和距离检查以启用指针</string> + <string name="spatial_hands_wait_stable">正在等待稳定的头部追踪;如果需要,请重置追踪中心。</string> + <string name="spatial_old_frame">相机观察太旧;等待一双新的</string> + <string name="spatial_fit_ready">适合 %1$.2f 像素。测量您选择的从左摄像头到校准目标中心的距离,然后进行验证。</string> + <string name="spatial_opencv_error">OpenCV 不可用:%1$s</string> + <string name="spatial_restored">%1$d 已恢复保存的视图。计算校准以重试,或开始新的一组以捕获更多。</string> + <string name="spatial_captured">已捕获 %1$d / 24 次观看。保持校准目标固定;移动智能眼镜以查看下一个视图。</string> + <string name="spatial_capture_corners">捕获被拒绝:%1$d / 12 个必需的角在两个摄像头中均可见。显示更多校准目标,保持不动,然后重试。</string> + <string name="spatial_validation_error">距离检查无法完成:%1$s。再试一次。</string> + <string name="spatial_inference_error">检测到手不可用:%1$s。更换CPU/GPU或切换徒手操作的控制器重试。</string> + <string name="spatial_hand_timeout">检测手部超过%1$d毫秒;观察被丢弃</string> + <string name="spatial_wrists_tracked">%1$d / 2 个通过立体声测量的 Joy-Con 手腕位置</string> + <string name="spatial_palms_tracked">已追踪手掌:%1$d / 2;可用捏合手势:%2$d;可用抓取手势:%3$d</string> + <string name="spatial_capture_saved">已将诊断捕获保存到 %1$s</string> + <string name="spatial_hand_error">手部追踪已停止:%1$s</string> + <string name="spatial_stereo_loaded">立体声%1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">头部跟踪和校准目标不一致 %1$s(限制 5 厘米/2 英寸)。保持校准目标固定并等待稳定跟踪,然后再开始新的一组。轻轻转动、倾斜智能眼镜;每次捕获之前暂停。</string> + <string name="spatial_need_views">捕获固定校准目标的至少24个不同视图。</string> + <string name="spatial_need_rotation">左右转动智能眼镜,上下倾斜;不旋转的移动无法校准相机对准。</string> + <string name="spatial_bad_baseline">难以置信的相机基线</string> + <string name="spatial_need_orientations">通过更多不同的方向移动您的头部。</string> + <string name="spatial_bad_rotation">相机到头部旋转无效</string> + <string name="spatial_bad_alignment">相机与头部的对齐不一致。</string> + <string name="spatial_calibration_error">校准无法完成。 %1$s 您捕获的视图已保存。</string> + <string name="spatial_reprojection_error">保留重投影错误 %1$.2f 像素超过 2 像素。重新校准。</string> + <string name="spatial_distance_corners">%1$d / 两个摄像头均检测到 24 个棋盘角。保持完整校准目标可见并保持静止。如果已经可见,请选择 12 英寸或 30 厘米,并在重试之前测量更近的距离。</string> + <string name="spatial_distance_depth">校准目标是可见的,但无法可靠地测量其深度。保持智能眼镜不动,并保持校准目标平坦且光线充足,然后重试。</string> + <string name="spatial_distance_invalid">相机测量无效。保持不动,然后再试一次。</string> + <string name="spatial_distance_passed">距离检查已通过。</string> + <string name="spatial_distance_retry">重新检查左摄像机到校准目标中心的距离,然后重试。</string> + <string name="spatial_distance_result">测量相机%1$s;选择的距离%2$s。 %3$s</string> + <string name="spatial_wait_previews">开始校准之前等待两个摄像头预览。</string> + <string name="spatial_saved_views_hint">可以重新计算保存的视图。开始新的校准以在当前跟踪坐标系中捕获。</string> + <string name="spatial_model_checksum_error">手模型校验和不匹配</string> + <string name="spatial_opencv_load_error">OpenCV 无法加载</string> + <string name="glasses_6dof">6DoF 虚拟屏幕</string> + <string name="tracking_recovery_look">在光线充足的房间内缓慢环顾四周。\n不要遮挡追踪摄像头,并面向家具等有明显细节的物体。</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> </resources> diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 1cb3f71b5d..a8978f4543 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="steamvr_recovery_title">SteamVR 圖形已停止運作</string> + <string name="steamvr_recovery_countdown">DroidDeck 將於 %1$d 秒後重新啟動,以重設圖形並重新開啟 SteamVR。正在運行的遊戲會被關閉,未儲存的進度無法還原。</string> + <string name="steamvr_recovery_repeated">最近一次重新啟動後,圖形故障再次出現。為避免不斷循環,自動復原已暫停。重新啟動會關閉你的遊戲,未儲存的進度無法還原。</string> + <string name="steamvr_recovery_restart">立即重新啟動</string> + <string name="steamvr_recovery_cancel">保持開啟</string> + <string name="steamvr_recovery_restarting">正在重設圖形並重新開啟 SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck 無法自動重新啟動。請完全關閉應用程式,然後重新開啟。</string> <string name="app_name">DroidDeck</string> <string-array name="loading_hints"> <item>首次執行會下載 Steam,可能需要幾分鐘。</item> @@ -15,8 +22,10 @@ <string name="session_channel">會話</string> <string name="session_channel_description">Steam 或桌面會話開啟時顯示</string> <string name="session_notification">Steam 正在執行</string> + <string name="session_notification_downloads">Steam 正在下載</string> <string name="session_notification_paused">會話已暫停 - 準備好後請輕按「繼續」</string> <string name="resume_session">繼續</string> + <string name="suspend_now">立即暫停</string> <string name="stop_session">結束會話</string> <string name="frame_gen_title">幀生成</string> <string name="frame_gen_hint">選擇幀生成模式</string> @@ -36,7 +45,7 @@ <string name="lsfg_import_invalid">此檔案不是 Lossless Scaling 的 Lossless.dll</string> <string name="lsfg_import_failed">無法從此 Lossless.dll 準備 LSFG</string> <string name="lsfg_problem_missing">LSFG 需要 Steam 上的 Lossless Scaling 或已匯入的 Lossless.dll</string> - <string name="lsfg_problem_failed">LSFG 無法從 Lossless.dll 準備着色器</string> + <string name="lsfg_problem_failed">LSFG 無法從 Lossless.dll 準備著色器</string> <string name="hud_fg_unsupported">%1$s:不支援</string> <string name="hud_fg_failed">%1$s:引擎故障</string> <string name="hud_fg_needs_lossless">%1$s:需要 Lossless Scaling</string> @@ -66,9 +75,9 @@ <string name="game_env_unused">標準 Proton 運行環境不會讀取此變數。</string> <string name="game_env_loading">正在載入…</string> <string name="game_env_feature">D3D12 功能級別覆寫。12_2 會回報 DirectX 12 Ultimate 功能;不支援的功能可能會出錯。不設定則自動偵測。</string> - <string name="game_env_shader">D3D12 着色器模型覆寫。6_9 需要夠新的 VKD3D 及相應的 GPU 功能。不設定則自動偵測。</string> - <string name="game_env_cache">保持啟用 Mesa 着色器快取,以減少重複編譯。設為 false 即啟用快取。</string> - <string name="game_env_cache_size">Mesa 着色器快取的大小上限,例如 1G。快取越大,佔用的儲存空間越多。</string> + <string name="game_env_shader">D3D12 著色器模型覆寫。6_9 需要夠新的 VKD3D 及相應的 GPU 功能。不設定則自動偵測。</string> + <string name="game_env_cache">保持啟用 Mesa 著色器快取,以減少重複編譯。設為 false 即啟用快取。</string> + <string name="game_env_cache_size">Mesa 著色器快取的大小上限,例如 1G。快取越大,佔用的儲存空間越多。</string> <string name="game_env_vkd3d_config">D3D12 的 VKD3D 選項。nodxr 會停用光線追蹤;只在個別遊戲需要時使用。</string> <string name="game_env_proton_log">設為 1 以產生 Proton 診斷記錄。記錄可能會降低效能並佔用儲存空間。</string> <string name="game_env_wined3d">設為 1 以改用基於 OpenGL 的 WineD3D 代替 DXVK,用於 D3D9–11 兼容性測試。</string> @@ -90,7 +99,7 @@ <string name="fex_preset_title">FEX 預設</string> <string name="fex_next_launch">下次啟動遊戲時生效。</string> <string name="game_settings_title">遊戲</string> - <string name="fex_default_label">FEX 預設</string> + <string name="fex_default_label">FEX 預設值</string> <string name="fex_default_detail">使用 FEX 預設設定。</string> <string name="fex_stability_label">穩定</string> <string name="fex_stability_detail">最安全但最慢的設定。</string> @@ -182,6 +191,8 @@ <string name="add_app_flatpak_id">應用程式 ID</string> <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> <string name="add_app_flatpak_invalid">不是 Flathub 應用程式 ID</string> + <string name="add_app_flatpak_bundle_hint">亦可使用 .flatpak 檔案,適用於 Flathub 上沒有的應用程式。</string> + <string name="add_app_pick_flatpak">選擇 .flatpak 檔案</string> <string name="add_app_source">來源</string> <string name="add_app_appearance">顯示在桌面</string> <string name="add_app_preview_name">新應用程式</string> @@ -201,7 +212,7 @@ <string name="add_app_folder_copied">該資料夾包含 Linux 程式,而共用儲存空間無法執行這些程式,因此會複製到 DroidDeck(%1$s)。</string> <string name="add_app_confirm">新增</string> <string name="add_app_cancel">取消</string> - <string name="add_app_runtime_required">請先在「設定」中安裝 Linux 運行環境。</string> + <string name="add_app_runtime_required">請先在「初始設定」中安裝 Linux 運行環境。</string> <string name="add_app_busy">請等待 %1$s 完成。</string> <string name="steam_compat_label">兼容</string> <string name="proton_compatible_note">在 Steam「兼容性」選單中標示為「%1$s」的版本已包含 DroidDeck 的前綴修正,可在此啟動遊戲。預設為 Proton Experimental ARM64(%1$s);安裝較新的 Proton 11.0 ARM64(%1$s)後則改用該版本。Valve 本身沒有此標示的 Proton 項目無法在此裝置上啟動遊戲。</string> @@ -215,7 +226,7 @@ <string name="common_update">更新</string> <string name="common_checking">正在檢查…</string> <string name="common_working">處理中…</string> - <string name="common_forget">忘記</string> + <string name="common_forget">清除</string> <string name="common_add_ellipsis">新增…</string> <string name="common_use">使用</string> <string name="common_applies_next_session">下次會話生效。</string> @@ -242,7 +253,7 @@ <string name="mode_hdr_restart">重新啟動應用程式後生效。</string> <string name="mode_drivers">驅動程式</string> <string name="mode_gpu_drivers">GPU 驅動程式</string> - <string name="mode_gpu_drivers_hint">Steam 和桌面共用,請在「元件」頁面設定。</string> + <string name="mode_gpu_drivers_hint">Steam 和桌面共用,請在「組件」頁面設定。</string> <string name="mode_touch_controls">觸控與控制</string> <string name="mode_touch">觸控</string> <string name="mode_touch_touchpad">觸控板</string> @@ -251,6 +262,10 @@ <string name="mode_osc">螢幕控制</string> <string name="mode_osc_qam">Steam + QAM</string> <string name="mode_osc_note">「自動」會在未連接控制器時顯示螢幕控制。</string> + <string name="osc_steam_touch">Steam 觸控(測試版)</string> + <string name="osc_style_next_session">Steam 的觸控控制會在下次 Steam 會話啟用</string> + <string name="osc_steam_layout">Steam 觸控佈局</string> + <string name="osc_steam_layout_hint">移動、調整大小或隱藏此遊戲的觸控控制;會儲存至 Steam</string> <string name="mode_controller">控制器</string> <string name="mode_controller_hint">Steam 如何識別你的控制器。下次會話生效。</string> <string name="mode_controller_deck">Steam Deck 控制器</string> @@ -268,6 +283,11 @@ <string name="mode_suspend_manual">手動</string> <string name="mode_suspend_native">原生</string> <string name="mode_suspend_steam_note">「自動」會暫停,並在重新顯示時繼續;「原生」會先讓 Steam 準備好休眠;「手動」會等你按「繼續」;「從不」會保持執行。</string> + <string name="mode_background_downloads">保持下載進行</string> + <string name="mode_background_downloads_hint">Steam 正在下載時,延遲在背景暫停。</string> + <string name="mode_zram">zRAM 壓縮</string> + <string name="mode_zram_hint">遊戲運行時,Steam 用戶端的記憶體會壓縮進裝置的 zram,為遊戲騰出更多記憶體。下次啟動 Steam 時生效。</string> + <string name="mode_zram_unsupported">無法使用:此裝置沒有 zram 或 swap,或核心版本低於 5.4。</string> <string name="mode_suspend_note">「自動」會在背景時暫停,並在重新顯示時繼續;「手動」會等你按「繼續」;「從不」會保持執行。</string> <string name="mode_startup">啟動</string> <string name="mode_steam_startup">隨 DroidDeck 啟動 Steam</string> @@ -296,13 +316,13 @@ <string name="mode_sgdb_key">SteamGridDB API 密鑰</string> <string name="mode_sgdb_key_yours">你的密鑰</string> <string name="mode_sgdb_edit">編輯…</string> - <string name="mode_added_art_hint">按資料夾名稱補上缺少的圖片。遊戲資料夾中你自己的 cover.jpg、hero.jpg、logo.png 或 icon.png 會優先使用。</string> - <string name="summary_remove_game">Remove %1$s</string> + <string name="mode_added_art_hint">自動從 Steam、其次從 SteamGridDB 補上缺少的圖片。遊戲資料夾中你自己的 cover.jpg、hero.jpg、logo.png 或 icon.png 優先使用。</string> + <string name="summary_remove_game">移除 %1$s</string> <string name="mode_added_remove_confirm">移除?</string> <string name="games_add">加入遊戲</string> <string name="games_add_title">加入遊戲:</string> <string name="games_pick_exe_title">選擇 exe:</string> - <string name="games_add_unreachable">工作階段無法存取此位置</string> + <string name="games_add_unreachable">會話無法存取此位置</string> <string name="mode_added_exe_check">請檢查此 exe</string> <string name="wincomp_title">Windows 組件</string> <string name="wincomp_pad_hint">按 LB / RB 在各部分之間切換。</string> @@ -331,16 +351,20 @@ <string name="wincomp_found_shipped">遊戲含有 %1$s(通常可直接使用)</string> <string name="wincomp_already_here">這款遊戲中已有</string> <string name="wincomp_no_recommendation">遊戲資料夾內沒有指向任何組件的內容。</string> + <string name="wincomp_active">已為這款遊戲安裝(%1$d)</string> <string name="wincomp_all">所有組件(%1$d)</string> <string name="wincomp_installers">需要 Windows 安裝程式(%1$d)</string> - <string name="wincomp_installers_note">這些組件需要在前綴內執行真正的安裝程式(.NET、PhysX、XNA、完整的 Visual C++ 安裝程式等)。DroidDeck 暫時未能做到,下一步就會支援。</string> + <string name="wincomp_installers_note">這些是各自的安裝程式,內部沒有可拆出的軟件包,目前也還沒有記錄它們會安裝什麼。其中多數是 Proton 內建 Mono 已能取代的舊運行環境;安裝記錄會陸續補充。</string> <string name="wincomp_show">顯示</string> <string name="wincomp_hide">隱藏</string> - <string name="wincomp_needs_installer">需要 Windows 安裝程式(即將支援)</string> + <string name="wincomp_needs_installer">會執行自己的安裝程式(暫無安裝記錄)</string> <string name="wincomp_unsupported">這裏暫不支援</string> <string name="wincomp_loading">正在載入組件…</string> <string name="wincomp_failed">無法安裝:%1$s</string> <string name="wincomp_downloaded">已下載</string> + <string name="wincomp_downloading">正在下載 %1$s</string> + <string name="wincomp_installing">正在安裝:%1$s</string> + <string name="wincomp_reverting">正在關閉…</string> <string name="wincomp_download_size">下載 %1$s</string> <string name="wincomp_next_launch">會在下次啟動遊戲時生效。</string> <string name="mode_stretch169">拉伸 16:9 遊戲</string> @@ -390,13 +414,58 @@ <string name="comp_display_driver_hint">在兩種模式下負責將畫面繪製到螢幕。重新啟動應用程式後生效。</string> <string name="comp_import_adrenotools">匯入 AdrenoTools zip…</string> <string name="comp_never">從未</string> - <string name="comp_nightlies_checked">已於 %1$s 檢查 Nightlies</string> - <string name="comp_title">元件</string> - <string name="comp_about">關於元件</string> + <string name="comp_nightlies_checked">Nightlies 檢查時間:%1$s</string> + <string name="comp_title">組件</string> + <string name="comp_about">關於組件</string> <string name="comp_check_drivers">檢查新驅動程式</string> <string name="comp_check_nightlies">在 Nightlies 檢查新軟件包</string> <string name="comp_proton">Proton</string> <string name="comp_proton_note">在此選擇的 Proton 會執行所有未在 Steam 中自選 Proton 的遊戲;在 Steam 中所作的變更也會在此顯示。Steam 更新時會取代 Valve 的 Proton;每個版本的原始檔案都會保留。</string> + <string name="comp_scope">配置</string> + <string name="comp_profile_configure">配置設定檔</string> + <string name="comp_profile">設定檔</string> + <string name="comp_scope_general">預設設定檔</string> + <string name="comp_scope_general_detail">沒有覆寫設定的遊戲會自動使用。</string> + <string name="comp_profile_game_detail">%1$s 啟動時會自動使用的已儲存設定。</string> + <string name="comp_game_hint">只需選擇這款遊戲需要的設定,其餘設定會繼續使用預設設定檔。</string> + <string name="comp_game_fex">FEX 預設</string> + <string name="comp_game_fex_inherited">正在沿用預設設定檔的 FEX 預設。</string> + <string name="comp_game_fex_override">已為這款遊戲儲存自訂 FEX 預設。</string> + <string name="comp_game_fex_custom">自訂 FEX 變數</string> + <string name="comp_game_use_general">使用預設</string> + <string name="comp_game_compatibility">遊戲兼容性</string> + <string name="comp_game_environment_hint">這款遊戲的 Proton、DXVK、VKD3D 及同步環境選項。</string> + <string name="comp_game_proton_inherited">正在使用預設設定檔的 Proton。</string> + <string name="comp_game_proton_override">已透過 Steam 兼容性對應為這款遊戲儲存自訂 Proton。</string> + <string name="comp_no_proton_short">無 Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">使用預設設定檔中來自 %1$s 的套件,除非這款遊戲選擇了其他套件。</string> + <string name="comp_game_component_general">使用預設設定檔的元件套件。</string> + <string name="comp_game_component_override">只在這款遊戲使用 %1$s。</string> + <string name="comp_game_runtime_options">運行環境選項</string> + <string name="comp_game_environment_other_hint">其他個別遊戲的 Proton、DXVK、VKD3D-Proton 及同步環境選項。</string> + <string name="comp_game_saved_next">已儲存 %1$s 的設定檔,下次啟動遊戲時生效。</string> + <string name="game_no_steam_title">不啟動 Steam 直接開始</string> + <string name="game_no_steam_detail">在不啟動 Steam 用戶端的情況下用 Proton/FEX 開啟;Steam 功能關閉。</string> + <string name="game_no_steam_on">開</string> + <string name="game_steam_with">隨 Steam 啟動</string> + <string name="game_steam_without">不經 Steam 啟動</string> + <string name="game_settings_card">設定</string> + <string name="game_settings_menu_title">%1$s 設定</string> + <string name="game_settings_default">預設</string> + <string name="game_settings_default_detail">將為此遊戲更改的所有內容還原為應用程式的設定。</string> + <string name="game_sync_custom">自訂同步變數</string> + <string name="comp_game_proton_live">已儲存 %1$s 的 Proton 選擇,現已可在 Steam 中使用。</string> + <string name="comp_game_proton_next">已儲存 %1$s 的 Proton 選擇。請先重新啟動 Steam,再啟動遊戲。</string> + <string name="comp_game_proton_not_runnable">%1$s 無法在此裝置上使用所選的 Proton。</string> + <string name="comp_game_load_failed">無法載入 %1$s 的設定檔:%2$s</string> + <string name="comp_game_save_failed">無法儲存遊戲設定檔:%1$s</string> + <string name="comp_game_reset">重設遊戲設定檔</string> + <string name="comp_game_reset_title">重設 %1$s 的設定檔?</string> + <string name="comp_game_reset_body">移除這款遊戲的 Proton、FEX、元件套件、環境、紋理過濾及 Windows 組件覆寫設定?遊戲會改用預設設定檔。</string> + <string name="comp_game_reset_done">%1$s 現已使用預設設定檔。</string> + <string name="comp_game_reset_failed">無法完全重設遊戲設定檔:%1$s</string> <string name="comp_default_live">%1$s 現在會執行所有未在 Steam 中自選 Proton 的遊戲。</string> <string name="comp_default_next">從下次啟動 Steam 起,%1$s 會執行所有未自選 Proton 的遊戲。</string> <string name="comp_default_not_runnable">%1$s 無法在此啟動遊戲,因此不能設為預設。</string> @@ -497,7 +566,7 @@ <string name="drawer_page_display">顯示</string> <string name="drawer_page_effects">效果</string> <string name="drawer_page_controls">控制</string> - <string name="drawer_page_components">元件</string> + <string name="drawer_page_components">組件</string> <string name="drawer_page_controller">控制器</string> <string name="drawer_page_settings">設定</string> <string name="drawer_page_desc">%1$s頁面</string> @@ -513,7 +582,7 @@ <string name="drawer_scaling_sharpness">縮放銳利度</string> <string name="drawer_effects">畫面效果</string> <string name="drawer_effects_hint">即時生效。開啟任何效果都會略為佔用 GPU 時間。</string> - <string name="drawer_look">預設</string> + <string name="drawer_look">預設集</string> <string name="drawer_look_custom">自訂</string> <string name="drawer_effects_advanced">進階</string> <string name="widgets_expanded">已展開</string> @@ -521,6 +590,10 @@ <string name="drawer_cas">銳化 (CAS)</string> <string name="drawer_cas_level">銳化程度</string> <string name="drawer_fake_hdr">模擬 HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">進入 SteamVR</string> + <string name="steamvr_checking">正在檢查 SteamVR…</string> <string name="drawer_deband">去色帶</string> <string name="drawer_deband_strength">去色帶強度</string> <string name="drawer_brightness">亮度</string> @@ -538,6 +611,11 @@ <string name="drawer_texture_sharpness_note">負 mip 偏移:紋理更銳利,但會有少許閃爍。「自動」會按會話放大至螢幕的倍數調整。</string> <string name="drawer_touch_auto">自動(%1$s)</string> <string name="drawer_keyboard">鍵盤</string> + <string name="drawer_latency">延遲</string> + <string name="drawer_low_latency_controller">低延遲控制器</string> + <string name="drawer_low_latency_controller_hint">控制器以 1000 Hz 而非 250 Hz 回報。CPU 使用率略高。</string> + <string name="drawer_low_latency_touch">低延遲觸控</string> + <string name="drawer_low_latency_touch_hint">觸控略過幀合併,Steam 觸控以 1000 Hz 回報。CPU 使用率略高。</string> <string name="drawer_pc_keyboard">電腦鍵盤</string> <string name="drawer_android_keyboard">Android</string> <string name="drawer_second_screen">第二螢幕</string> @@ -560,11 +638,23 @@ <string name="drawer_stop_title">停止會話?</string> <string name="drawer_running_now">正在執行</string> <string name="drawer_no_game">沒有遊戲正在 Proton 上執行</string> + <string name="drawer_selected_profile">遊戲設定檔</string> + <string name="drawer_selected_profile_none">暫時未有設定檔詳情。</string> + <string name="drawer_profile_refresh_failed_initial">無法載入遊戲設定檔,正在自動重試。</string> + <string name="drawer_profile_refresh_failed_stale">無法重新整理遊戲設定檔。正在顯示最後可用的資料,並會自動重試。</string> + <string name="drawer_profile_inspect_hint">查看及編輯下次啟動時使用的已儲存設定。</string> + <string name="drawer_profile_default">正在使用預設設定檔</string> + <string name="drawer_profile_custom">自訂設定檔</string> + <string name="drawer_component_inherited">正在使用預設設定檔中的 %1$s。</string> + <string name="drawer_game_components_note">變更會儲存至 %1$s 的設定檔,並在下次啟動遊戲時生效。</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="other">%1$d 項遊戲覆寫設定</item> + </plurals> <string name="drawer_no_proton">尚未安裝 Proton。</string> <string name="drawer_game_running">遊戲執行中</string> <string name="drawer_reapplied">於 %1$s 啟動時重新套用</string> <string name="drawer_original">原始</string> - <string name="drawer_components_note">請在「元件」頁面下載、匯入及刪除。</string> + <string name="drawer_components_note">請在「元件」頁面匯入及刪除。</string> <string name="setup_check_done">完成</string> <string name="setup_check_warn">需要處理</string> <string name="setup_check_busy">處理中</string> @@ -616,6 +706,14 @@ <string name="setup_saved_logs">已儲存的會話記錄</string> <string name="setup_saved_logs_hint">保留最新的 %1$d 個</string> <string name="setup_clear_logs">清除記錄</string> + <string name="setup_reset_settings">重設所有設定</string> + <string name="setup_reset_settings_hint">將所有設定還原為預設值</string> + <string name="setup_reset_settings_button">重設</string> + <string name="setup_reset_settings_title">要重設所有設定嗎?</string> + <string name="setup_reset_settings_body">顯示、效能、控制器、主題、語言和啟動器設定將還原為預設值。你的遊戲、Steam 登入、商店帳戶、已下載的驅動程式和儲存資料夾都會保留。</string> + <string name="setup_reset_settings_profiles">同時重設遊戲設定檔(每個遊戲的 Proton、FEX、元件和環境,以及預設設定檔的環境)</string> + <string name="setup_reset_settings_session_running">請先停止會話再重設設定。</string> + <string name="setup_reset_settings_partial">設定已重設,但部分項目未能重設。詳情請查看記錄。</string> <string name="setup_offline">離線模式</string> <string name="setup_sign_in_first">請先登入 Steam</string> <string name="setup_launcher">啟動器</string> @@ -631,6 +729,10 @@ <string name="setup_home">用作主畫面</string> <string name="setup_home_on">DroidDeck 可用作主畫面應用程式</string> <string name="setup_home_off">DroidDeck 不會作為主畫面應用程式的選項</string> + <string name="setup_orientation">螢幕方向</string> + <string name="setup_orientation_auto">自動橫向</string> + <string name="setup_orientation_landscape">橫向</string> + <string name="setup_orientation_reverse">反向橫向</string> <string name="setup_fullscreen">全螢幕</string> <string name="setup_fullscreen_on">隱藏 Android 狀態列和導覽列</string> <string name="setup_fullscreen_off">顯示 Android 狀態列和導覽列</string> @@ -646,7 +748,7 @@ <string name="setup_tool_performance_hint">CPU 核心分配</string> <string name="setup_tool_roms">ROM 資料夾</string> <string name="setup_tool_roms_hint">模擬器遊戲的存放位置</string> - <string name="setup_card_components">元件</string> + <string name="setup_card_components">組件</string> <string name="setup_card_components_hint">FEX、DXVK、VKD3D</string> <string name="setup_card_controls">控制</string> <string name="setup_card_controls_hint">按鍵對應</string> @@ -657,7 +759,7 @@ <string name="store_title">商店</string> <string name="store_chip_flathub">Flathub · ARM64</string> <string name="store_chip_ready">● Flatpak 已就緒</string> - <string name="store_needs_runtime">請先在「設定」中安裝 Linux 運行環境。</string> + <string name="store_needs_runtime">請先在「初始設定」中安裝 Linux 運行環境。</string> <string name="store_setup_title">設定 Flatpak</string> <string name="store_setup_text">新增 Flatpak 並連接到 Flathub(約 20 MB)。安裝第一個應用程式時亦會下載其運行環境。</string> <string name="store_setting_up">正在設定…</string> @@ -767,21 +869,21 @@ </plurals> <string name="gate_title">需要更改一項 Android 設定</string> <string name="gate_eyebrow">Steam</string> - <string name="gate_lede">Android 會停止啟動大量背景程序的應用程式,而 Steam 會啟動數十個。更改此設定前,遊戲會在沒有任何錯誤訊息的情況下關閉。</string> + <string name="gate_lede">Android 會停止啟動大量背景程序的應用程式,而 Steam 會啟動數十個。在變更此設定前,遊戲會在沒有任何錯誤訊息的情況下關閉。</string> <string name="gate_fix_for_me">幫我修復</string> - <string name="gate_toggle_steps">開啟「停用子進程限制」,然後返回。請保持開發人員選項開啟,否則此開關會再次關閉。</string> + <string name="gate_toggle_steps">開啟「停用對子處理過程的限制」,然後返回。請保持開發人員選項開啟,否則此開關會再次關閉。</string> <string name="gate_open_dev">開啟開發人員選項</string> <string name="gate_no_toggle">此 Android 版本沒有此開關,因此 DroidDeck 會透過無線偵錯更改。約需一分鐘,無需電腦。</string> <string name="gate_needs_wifi">無線偵錯需要 Wi-Fi。任何網絡都可以,無需連接互聯網。</string> <string name="gate_needs_notifications">配對碼需在通知中輸入。請允許 DroidDeck 發出通知,或使用「其他方式」。</string> <string name="gate_allow_notifications">允許通知</string> - <string name="gate_step1">開啟「設定」→「開發人員選項」→「無線偵錯」,並將其開啟</string> + <string name="gate_step1">開啟「系統設定」→「開發人員選項」→「無線偵錯」,並將其開啟</string> <string name="gate_step2">輕按「使用配對碼配對裝置」</string> <string name="gate_step3">在 DroidDeck 通知中輸入配對碼</string> <string name="gate_waiting">正在等待配對彈出式視窗…</string> <string name="gate_code_needed">已找到彈出式視窗,請在通知中輸入其中的配對碼。</string> <string name="gate_status">狀態</string> - <string name="gate_polling">每 2 秒檢查一次。關閉後此頁面會自動關閉。</string> + <string name="gate_polling">每 2 秒檢查一次。關閉此開關後,本頁面會自動關閉。</string> <string name="gate_other_ways">其他方式</string> <string name="gate_other_toggle">無線偵錯、手動輸入位址、電腦 ADB</string> <string name="gate_other_no_toggle">手動輸入位址、電腦 ADB、開發人員選項</string> @@ -794,7 +896,7 @@ <string name="gate_choose_display">選擇要在哪個螢幕開啟 Android 設定。</string> <string name="gate_main_screen">主螢幕</string> <string name="wadb_finding_port">已配對,正在尋找無線偵錯連接埠…</string> - <string name="wadb_enter_port">已配對,請輸入「設定」中顯示的連接埠。</string> + <string name="wadb_enter_port">已配對,請輸入「系統設定」中顯示的連接埠。</string> <string name="wadb_applying">已找到裝置,正在套用設定…</string> <string name="wadb_apply_failed">無法自動套用。請檢查下方的位址,然後重試。%1$s</string> <string name="wadb_title_wireless">無線偵錯</string> @@ -819,8 +921,8 @@ <string name="wadb_turn_off">關閉限制</string> <string name="wadb_other_ways">其他更改方式</string> <string name="wadb_dev_try_first">1 · 開發人員選項(請先嘗試)</string> - <string name="wadb_restrict_on">開啟「限制子進程」。</string> - <string name="wadb_restrict_off">關閉「限制子進程」。</string> + <string name="wadb_restrict_on">關閉「停用對子處理過程的限制」。</string> + <string name="wadb_restrict_off">開啟「停用對子處理過程的限制」。</string> <string name="wadb_computer_last">3 · 電腦 ADB(最後手段)</string> <string name="wadb_only_if">只在無法使用無線偵錯時使用。</string> <string name="wadb_computer_group">3 · 電腦 ADB(最後手段)</string> @@ -841,6 +943,8 @@ <string name="ctrl_keyboard_button">鍵盤按鈕</string> <string name="ctrl_select_steam">按 Select 開啟 Steam 選單</string> <string name="ctrl_select_steam_hint">代替 View/Select。</string> + <string name="ctrl_joycon_vr">將 Joy-Con 用作 VR 控制器</string> + <string name="ctrl_joycon_vr_hint">SteamVR 執行時,每個 Joy-Con 都會變成一隻手。將它指向前方並按住 HOME 鍵或擷取鍵,即可重新置中。</string> <string name="setup_animations">動畫</string> <string name="ctrl_adaptive_hint">搖桿會在你觸控的位置出現,放開後隱藏</string> <string name="ctrl_layout">佈局</string> @@ -876,7 +980,7 @@ <string name="content_runtime_required">需要運行環境</string> <string name="content_loading_details">正在載入安裝詳情…</string> <string name="content_details_unavailable">無法取得安裝詳情,請稍後再試。</string> - <string name="content_needs_runtime">請先在「設定」中安裝 Linux 運行環境。</string> + <string name="content_needs_runtime">請先在「初始設定」中安裝 Linux 運行環境。</string> <string name="content_stop_first">請先停止正在執行的會話,再安裝桌面應用程式。</string> <string name="content_install_into">將 %1$s 安裝到 Linux 桌面。</string> <string name="store_busy_percent_short">%1$s · %2$d%%</string> @@ -888,10 +992,17 @@ <string name="content_page_gone">該頁面已不存在,請在左側選擇一個部分。</string> <string name="content_open_desktop">開啟桌面</string> <string name="content_install_open_desktop">安裝並開啟桌面</string> + <string name="desktop_remove_title">解除安裝桌面</string> + <string name="desktop_remove_text">移除桌面及其內置應用程式。遊戲、已新增的應用程式、設定及共用程式庫會保留。</string> + <string name="desktop_removing">正在移除桌面</string> + <string name="desktop_removed">已移除桌面</string> + <string name="desktop_cleaning_legacy">正在移除舊的 LXQt 檔案</string> + <string name="desktop_removal_unknown">請先更新 DroidDeck,再移除此桌面版本。</string> <string name="content_linux_desktop">Linux 桌面</string> <string name="content_linux_desktop_hint">KDE Plasma、Firefox 和你的模擬器</string> <string name="games_empty">你在 Steam 安裝的遊戲會在會話結束後顯示在這裡。</string> <string name="games_play_steam">開啟 Steam</string> + <string name="games_play_steamvr">開啟 SteamVR</string> <string name="games_launch_settings">啟動設定</string> <string name="games_launch">啟動</string> <string name="games_files">遊戲檔案</string> @@ -916,6 +1027,8 @@ <string name="games_last_played">上次遊玩:%1$s</string> <string name="games_internal">內部儲存空間</string> <string name="games_added">已新增的遊戲</string> + <string name="games_custom">自訂遊戲</string> + <string name="games_store_storage">遊戲儲存位置</string> <string name="gpu_auto_hint">此 GPU 的最佳組合,並會保持最新</string> <string name="gpu_manual_hint">自行選擇組合</string> <string name="gpu_checking">正在檢查驅動程式…</string> @@ -927,7 +1040,6 @@ <string name="gpu_set_with_runtime">與運行環境驅動程式一併設定:%1$s 同時包含兩者。</string> <string name="gpu_runtime_hint">供遊戲和桌面使用。</string> <string name="gpu_runtime_default">運行環境預設</string> - <string name="gpu_display_hint">負責將畫面繪製到螢幕。DroidDeck 重新啟動後生效。</string> <string name="gpu_auto_by_gpu">自動 - 按 GPU 選擇</string> <string name="gpu_manage">下載、匯入或刪除…</string> <string name="gpu_in_use_caps">正在使用</string> @@ -957,6 +1069,12 @@ <string name="deck_tab_left">左側觸控板</string> <string name="deck_tab_right">右側觸控板</string> <string name="deck_tab_both">兩側</string> + <string name="deck_tab_gamepad">控制器</string> + <string name="deck_surface_stick">搖桿</string> + <string name="deck_surface_trackpad">觸控板</string> + <string name="deck_surface_switch">在搖桿和觸控板之間切換</string> + <string name="deck_more_controls">更多 Deck 控制</string> + <string name="deck_panels">面板</string> <string name="deck_close">關閉第二螢幕控制</string> <string name="deck_open_steam_menu">開啟 Steam 選單</string> <string name="deck_left_upper">左側 · 上方</string> @@ -975,7 +1093,7 @@ <string name="rail_games">遊戲</string> <string name="rail_desktop">桌面</string> <string name="rail_store">商店</string> - <string name="rail_components">元件</string> + <string name="rail_components">組件</string> <string name="rail_apps">應用程式</string> <string name="rail_setup">設定</string> <string name="rail_updates">更新</string> @@ -992,6 +1110,10 @@ <string name="proton_installed">已安裝 %1$s</string> <string name="proton_queued">先前的要求尚待處理</string> <string name="proton_not_installed">未安裝</string> + <string name="proton_update_available">有可用更新 → %1$s</string> + <string name="proton_remove_older">移除舊版 %1$s</string> + <string name="proton_remove_older_body">將移除 %1$s。設為使用這些版本的遊戲須改用其他 Proton。</string> + <string name="proton_remove_body">設為使用此版本的遊戲須改用其他 Proton。</string> <string name="proton_install_now">立即安裝</string> <string name="proton_cancel_queued">取消排隊</string> <string name="pckb_android">Android 鍵盤</string> @@ -1020,6 +1142,8 @@ <string name="game_env_eyebrow">Proton 遊戲</string> <string name="pip_title">畫中畫</string> <string name="pip_auto">自動進入畫中畫</string> + <string name="unfolded_controls">展開螢幕時的控制</string> + <string name="unfolded_controls_hint">展開時,遊戲會顯示在 Steam Deck 觸控板和背面握把上方;摺疊時,遊戲會全螢幕顯示。</string> <string name="pip_suspended">已暫停</string> <string name="pip_not_ready">會話準備就緒後即可使用畫中畫。</string> <string name="pip_permission">請在 Android 設定中允許 DroidDeck 使用畫中畫。</string> @@ -1045,19 +1169,12 @@ <string name="game_file_exported">遊戲檔案已儲存至 %1$s</string> <string name="game_frontend_files">前端檔案</string> - <!-- Launcher, session and menus --> - - <!-- Launcher (MainActivity) --> <string name="main_wait_runtime">請等待運行環境操作完成</string> <string name="main_wait_proton_install">請等待兼容性工具安裝完成</string> <string name="main_wait_desktop_install">請等待桌面應用程式安裝完成</string> <string name="main_wait_install_game">請等待安裝完成後再啟動遊戲</string> <string name="main_saves_close_session">請先關閉 Steam 會話,以免遊戲存檔覆蓋匯入的內容</string> - - <!-- Busy line while saves are imported; %1$s is the game's name --> <string name="main_saves_importing">正在匯入至 %1$s</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the game's name --> <plurals name="main_saves_imported"> <item quantity="other">已從 %2$s 匯入 %1$d 個檔案至 %3$s</item> </plurals> @@ -1065,19 +1182,11 @@ <item quantity="other">已從 %2$s 匯入 %1$d 個檔案至 %3$s。舊存檔已備份至 Download/DroidDeck/Saves/backups</item> </plurals> <string name="main_saves_pick_zip">為 %1$s 選擇存檔 zip</string> - - <!-- Busy line while saves are exported; %1$s is the game's name --> <string name="main_saves_exporting">正在匯出 %1$s</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the zip's path --> <plurals name="main_saves_exported"> <item quantity="other">已將 %1$d 個檔案匯出為 %2$s:%3$s</item> </plurals> - - <!-- %1$s is the game's name, %2$s the save layout --> <string name="main_saves_pick_folder">選擇 %1$s 的儲存位置(%2$s)</string> - - <!-- %1$s is what was being done (e.g. Importing into Portal 2, Swapping), %2$s the error --> <string name="main_action_failed">操作失敗(%1$s):%2$s</string> <string name="main_no_logs_yet">尚未有會話記錄:請先執行一次會話。</string> <string name="main_no_logs_to_clear">沒有可清除的會話記錄。</string> @@ -1090,78 +1199,55 @@ <string name="main_adb_copied">已複製 ADB 指令</string> <string name="main_pick_roms">選擇 ROM 資料夾</string> <string name="main_non_adreno_title">不是 Adreno GPU</string> - - <!-- %1$s is the GPU's name, %2$.0f the download size in MB --> <string name="main_non_adreno_text">Turnip 支援 Adreno GPU。在 %1$s 上,Steam 可能會出現黑畫面。下載大小:%2$.0f MB。</string> <string name="main_install_anyway">仍要安裝</string> <string name="main_remove_runtime_title">移除 Linux 運行環境</string> <string name="main_remove_runtime_text">此操作會刪除運行環境、其中的 Steam 用戶端,以及安裝在其中的所有遊戲。</string> - - <!-- Toast; %1$s is a list of components, separated by commas --> <string name="main_applied">已套用:%1$s</string> <string name="android_app_open_failed_primary">無法在主螢幕開啟 %1$s</string> - - <!-- %1$s is the app, %2$s the name of the display --> <string name="android_app_open_failed_on">無法在 %2$s 開啟 %1$s</string> - - <!-- %1$s is the app, %2$d the display's number --> <string name="android_app_open_failed_display">無法在顯示器 %2$d 開啟 %1$s</string> - - <!-- Components page busy lines, shown with … after them --> <string name="comp_busy_importing">正在匯入</string> <string name="comp_busy_swapping">正在替換</string> <string name="comp_busy_restoring">正在還原</string> <string name="comp_busy_cancelling">正在取消</string> <string name="comp_busy_deleting">正在刪除</string> <string name="comp_cannot_read">無法讀取檔案</string> - - <!-- %1$s is a version or a name --> <string name="comp_imported">已匯入 %1$s</string> <string name="comp_swap_cancelled">已取消等待中的替換。</string> - <string name="comp_pick_wcp">選擇元件套件(-linux .wcp)</string> + <string name="comp_pick_wcp">選擇組件套件(-linux .wcp)</string> <string name="comp_nightlies_unreachable">無法連接 Nightlies</string> - - <!-- %1$s is the package version --> <string name="comp_stored">已儲存 %1$s</string> <string name="comp_download_failed">下載失敗:%1$s</string> <string name="drivers_pick_linux">選擇 Linux 運行環境驅動程式(-Linux zip 或 Android + Linux 組合包)</string> <string name="drivers_pick_android">選擇顯示驅動程式(AdrenoTools zip 或 Android + Linux 組合包)</string> <string name="drivers_pick_any">選擇驅動程式 zip 或 Android + Linux 組合包</string> - - <!-- %1$s is a desktop app's name, %2$s what went wrong --> <string name="main_pkg_problem">%1$s:%2$s</string> <string name="main_removing_named">正在移除 %1$s…</string> - <string name="main_forgetting_named">正在忘記 %1$s…</string> + <string name="main_forgetting_named">正在清除 %1$s…</string> <string name="main_pick_game_storage">選擇遊戲儲存資料夾</string> <string name="main_pick_decky_zip">選擇 Decky 插件 ZIP</string> <string name="main_storage_not_usable">無法使用:%1$s</string> - - <!-- What is running, when it is a program without a known name --> <string name="main_running_program">程式</string> <string name="main_removing_runtime">正在移除 Linux 運行環境</string> <string name="main_settings_main_screen">無法在下方螢幕開啟「設定」,已改為在主螢幕開啟。</string> - <string name="main_open_dev_options">在「設定」中開啟開發人員選項</string> + <string name="main_open_dev_options">在「系統設定」中開啟開發人員選項</string> - <!-- Updates --> <string name="upd_unknown_apps_failed">無法開啟 Android 的「安裝不明應用程式」設定</string> <string name="upd_couldnt_check">無法檢查:%1$s</string> <string name="upd_no_download">此版本沒有適用於此 DroidDeck 版本的下載</string> <string name="upd_stop_first">請先停止正在執行的會話,然後再更新</string> - - <!-- Update stages, shown with … after them --> <string name="upd_stage_downloading">正在下載</string> <string name="upd_stage_installing">正在安裝</string> <string name="upd_stage_confirm">正在等待你確認</string> <string name="upd_failed">更新失敗</string> <string name="upd_not_offered">Android 沒有提供安裝更新的選項</string> - <!-- Decky --> <string name="decky_install_failed">Decky 安裝失敗:%1$s</string> <string name="decky_plugin_starting">正在開始匯入插件…</string> <string name="decky_plugin_failed">插件匯入失敗:%1$s</string> <string name="decky_plugin_installed">已安裝插件。請重新啟動 Steam 以載入。</string> - <!-- GPU drivers --> <string name="drivers_not_checked">尚未檢查 - 輕按重新整理以尋找新驅動程式</string> <string name="drivers_bundle_sets_display">Android + Linux:同時設定顯示驅動程式</string> <string name="drivers_bundle_sets_runtime">Android + Linux:同時設定運行環境驅動程式</string> @@ -1169,26 +1255,26 @@ <string name="drivers_system_vulkan">系統 Vulkan:沒有適用於此 GPU 的內置版本</string> <string name="drivers_bundled">%1$s(內置)</string> <string name="drivers_manual">手動</string> - - <!-- Driver mode, then the driver pair in use --> <string name="drivers_summary">%1$s · %2$s</string> <string name="drivers_half_published">目前只發佈了其中一半</string> <string name="drivers_pair_size">兩者合共 %1$.0f MB</string> - - <!-- %1$s says why (the GPU's support status) --> <string name="drivers_none_to_set">沒有可設定的驅動程式:%1$s</string> <string name="drivers_checking_latest">正在檢查最新驅動程式…</string> <string name="drivers_up_to_date_check_failed">已是最新(無法檢查:%1$s)</string> <string name="drivers_recommended_unpublished">建議的驅動程式目前尚未發佈</string> - - <!-- %1$s is the driver pair's name, %2$s its version --> <string name="drivers_downloading_pair">正在下載 %1$s %2$s…</string> <string name="drivers_updated_to">已更新至 %1$s %2$s。</string> <string name="drivers_updated_to_restart">已更新至 %1$s %2$s。顯示驅動程式會在 DroidDeck 重新啟動後生效。</string> + <string name="drivers_auto_waits_for_session">驅動程式更新會等到會話結束後進行。</string> + <string name="drivers_auto_waits_for_network">結束流動數據與省電模式後,將下載 %1$s %2$s。</string> + <string name="drivers_skipping_bad">%1$s %2$s 在此裝置上未能啟動會話,自動模式繼續使用可用的驅動程式。</string> + <string name="drivers_rolled_back">%1$s 兩次未能啟動會話,自動模式已回到可用的驅動程式。</string> <string name="drivers_switched_to">已切換至 %1$s %2$s。</string> <string name="drivers_switched_to_restart">已切換至 %1$s %2$s。顯示驅動程式會在 DroidDeck 重新啟動後生效。</string> <string name="drivers_using">正在使用 %1$s %2$s。</string> <string name="drivers_using_restart">正在使用 %1$s %2$s。顯示驅動程式會在 DroidDeck 重新啟動後生效。</string> + <string name="drivers_using_quest">使用內建的 Quest 顯示驅動程式與運行環境預設值。</string> + <string name="drivers_using_quest_restart">使用內建的 Quest 顯示驅動程式與運行環境預設值。顯示驅動程式將在 DroidDeck 重新啟動後生效。</string> <string name="drivers_not_a_driver">不是驅動程式 zip:既非 AdrenoTools 驅動程式、-Linux Turnip,亦非 Android + Linux 組合包</string> <string name="drivers_import_failed">匯入失敗:%1$s</string> <string name="drivers_imported_unnamed">已匯入的驅動程式</string> @@ -1196,11 +1282,7 @@ <string name="drivers_using_bundle_restart">正在使用 %1$s 作為運行環境及顯示驅動程式。顯示驅動程式會在 DroidDeck 重新啟動後生效。</string> <string name="drivers_deleted_bundle">已刪除 %1$s(兩個驅動程式)</string> <string name="drivers_deleted">已刪除 %1$s</string> - - <!-- %1$s lists the latest releases, %2$s when they were checked (e.g. 5 min ago) --> <string name="drivers_release_status">最新:%1$s · %2$s檢查</string> - - <!-- %1$s lists the latest releases, %2$s the sources that could not be reached, %3$s when they were checked --> <string name="drivers_release_status_failed">最新:%1$s · 無法連接 %2$s · %3$s檢查</string> <plurals name="drivers_ago_minutes"> <item quantity="other">%1$d 分鐘前</item> @@ -1213,39 +1295,25 @@ </plurals> <string name="drivers_checking_sources">正在檢查 Banners-Turnip、WinNative 和 DroidDeck…</string> <string name="drivers_check_failed">檢查失敗</string> - - <!-- %1$s is the driver's name --> <string name="drivers_installed_pick_either">已安裝 %1$s - 在任一清單中選擇即可同時設定兩個驅動程式</string> <string name="drivers_installed_pick">已安裝 %1$s - 請在選單中選擇</string> - <!-- Session (SessionActivity) --> <string name="session_wait_removal">請等待運行環境移除完成</string> - - <!-- Drawer title when the running program has no known name --> <string name="session_title_game">遊戲</string> - - <!-- Shown as "Auto (touchpad)" in the drawer's touch setting --> <string name="session_touch_auto_touchpad">觸控板</string> - - <!-- Shown as "Auto (direct)" in the drawer's touch setting --> <string name="session_touch_auto_direct">直接</string> <string name="session_swap_failed">替換失敗:%1$s</string> + <string name="session_profile_save_failed">設定檔儲存失敗:%1$s</string> <string name="session_desktop_paused">桌面已暫停</string> - - <!-- %1$s is the program's name --> <string name="session_named_paused">%1$s 已暫停</string> <string name="session_program_paused">程式已暫停</string> <string name="session_starting_desktop">正在啟動桌面</string> - - <!-- %1$s is the program's name --> <string name="session_starting_named">正在啟動 %1$s</string> <string name="session_starting_program">正在啟動程式</string> <string name="session_no_logs">此會話沒有記錄。</string> <string name="session_logs_archive_failed">無法建立會話記錄封存檔。</string> <string name="session_logs_share_failed">無法分享會話記錄。</string> <string name="session_starting_session">正在啟動會話…</string> - - <!-- Loading screen lines while packages download; %1$d and %2$d are megabytes --> <string name="session_runtime_downloading">正在下載 Linux 運行環境</string> <string name="session_runtime_downloading_mb">正在下載 Linux 運行環境 · %1$d/%2$d MB</string> <string name="session_runtime_checking">正在檢查 Linux 運行環境</string> @@ -1260,33 +1328,20 @@ <string name="session_proton_unpacking">正在解壓 Proton Experimental (ARM64)</string> <string name="session_runtime_catalog_unreachable">無法連接運行環境目錄。請檢查網絡連線,然後再按「開啟 Steam」。</string> <string name="session_runtime_install_failed">Linux 運行環境未能安裝。請在「設定」中檢查運行環境,然後再按「開啟 Steam」。</string> - - <!-- %1$s says what went wrong --> <string name="session_desktop_install_failed">桌面未能安裝(%1$s)。請檢查網絡連線,然後再按「桌面」。</string> - - <!-- %1$s is the program's name, or Steam --> <string name="session_ended_named">%1$s 意外停止。請在錯誤報告中附上記錄,或再試一次。</string> <string name="session_ended_program">程式意外停止。請在錯誤報告中附上記錄,或再試一次。</string> <string name="session_ended_desktop">桌面意外停止。請在錯誤報告中附上記錄,或再試一次。</string> - - <!-- %1$d is the exit status, %2$s the log file's path --> <string name="session_ended_detail">結束狀態 %1$d · %2$s</string> <string name="session_ended_no_log">沒有記錄</string> - - <!-- %1$d errors; %2$s, %3$s and %4$s are the Performance page and its two settings --> <plurals name="session_hint_enosys"> <item quantity="other">記錄顯示 %1$d 個「Function not implemented」錯誤:proot 的 seccomp 加速令此裝置上的一個輔助程式失敗。請嘗試 %2$s →「%3$s」(或「%4$s」),然後重新啟動。</item> </plurals> - <!-- Screens, files, controller and store --> - - <!-- Mode settings --> <string name="mode_decky_plugins">插件</string> <string name="mode_decky_plugins_hint">安裝插件 ZIP,在下次 Steam 會話使用。</string> <string name="mode_decky_plugin_downloading">正在下載…</string> <string name="mode_decky_plugin_install_zip">從 ZIP 安裝</string> - - <!-- Store --> <string name="store_cat_games">遊戲</string> <string name="store_cat_audio_video">音訊及影片</string> <string name="store_cat_graphics">圖形</string> @@ -1299,28 +1354,14 @@ <string name="store_cat_utilities">公用程式</string> <string name="store_section_popular">熱門</string> <string name="store_section_trending">趨勢</string> - - <!-- Store front-page section of recently added apps --> <string name="store_section_new">最新</string> - - <!-- Store front-page section of recently updated apps --> <string name="store_section_updated">最近更新</string> <string name="store_section_loading">正在載入…</string> <string name="store_flatpak_setup">Flatpak 設定</string> - - <!-- %1$s is what failed (an app name or "Flatpak setup"), %2$s the error --> <string name="store_problem">%1$s:%2$s</string> <string name="store_updates_check_failed">無法在 Flathub 檢查更新</string> - - <!-- Library tiles --> - - <!-- Subtitle of a game tile whose cover art was found --> <string name="content_rom_installed">已安裝</string> - - <!-- Subtitle of a game that is a folder rather than a single file --> <string name="content_rom_folder">資料夾</string> - - <!-- Launcher themes --> <string name="theme_graphite">石墨</string> <string name="theme_graphite_detail">石墨色介面,所有已選取、焦點所在或按下的項目都使用標誌本身的球體藍色。</string> <string name="theme_paper">黑底白紙</string> @@ -1329,8 +1370,6 @@ <string name="theme_icon_blue_detail">黑色背景、白色文字,所有已選取、焦點所在或按下的項目都使用藍色。</string> <string name="theme_electric">電光海軍藍</string> <string name="theme_electric_detail">更明亮的藍色,搭配偏海軍藍而非灰色的介面。</string> - - <!-- PC keyboard key caps (keep them short; they label physical PC keys) --> <string name="pckb_key_esc">Esc</string> <string name="pckb_key_ins">Ins</string> <string name="pckb_key_del">Del</string> @@ -1348,27 +1387,17 @@ <string name="pckb_key_alt">Alt</string> <string name="pckb_key_space">空格</string> <string name="pckb_key_altgr">AltGr</string> - - <!-- Terminal key strip on the second screen --> <string name="second_key_tab">Tab</string> - - <!-- A modifier key (%1$s, e.g. Ctrl) that is currently held --> <string name="second_key_on">%1$s ✓</string> <string name="second_key_ctrl_c">Ctrl+C</string> <string name="second_key_ctrl_d">Ctrl+D</string> - - <!-- Game file sync errors --> <string name="game_sync_err_runtime">請先安裝運行環境</string> <string name="game_sync_err_steam_library">無法使用 Steam 收藏庫</string> <string name="game_sync_err_previous_sd">無法使用先前的 SD 卡收藏庫</string> <string name="game_sync_err_game_storage">無法使用遊戲儲存位置</string> <string name="game_sync_err_added_games">無法使用已新增遊戲的資料夾</string> <string name="game_sync_err_manifests">無法使用 Steam 清單檔案</string> - - <!-- The systems RetroArch emulates, shown under its name --> <string name="content_system_many">多個系統</string> - - <!-- File manager --> <string name="fm_drive_internal">內部</string> <string name="fm_drive_linux">Linux 系統</string> <string name="fm_drive_sd">SD 卡</string> @@ -1386,8 +1415,6 @@ <string name="fm_no_favorites">尚未有我的最愛 - 使用資料夾的 ⋮ 選單將其釘選,即可快速返回。</string> <string name="fm_unpin_favorite">從我的最愛移除</string> <string name="fm_size_zero">0 位元組</string> - - <!-- Size unit for sizes under 1 KB, shown after a number --> <string name="fm_unit_bytes">位元組</string> <string name="fm_prop_location">位置</string> <string name="fm_prop_type">類型</string> @@ -1395,8 +1422,6 @@ <string name="fm_prop_modified">修改日期</string> <string name="fm_type_folder">資料夾</string> <string name="fm_type_file">檔案</string> - - <!-- File type in Properties; %1$s is the file extension in capitals, e.g. TXT --> <string name="fm_type_ext_file">%1$s 檔案</string> <string name="fm_read_only">唯讀</string> <string name="fm_read_only_hint">防止遊戲(及 Wine)覆寫或刪除此檔案。</string> @@ -1410,19 +1435,11 @@ <string name="fm_delete_failed">刪除失敗</string> <string name="fm_op_moving">正在移動...</string> <string name="fm_op_copying">正在複製...</string> - - <!-- %1$s is the file name --> <string name="fm_op_moving_item">正在移動 - %1$s</string> <string name="fm_op_copying_item">正在複製 - %1$s</string> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_moving_batch">正在移動 %1$d/%2$d - %3$s</string> <string name="fm_op_copying_batch">正在複製 %1$d/%2$d - %3$s</string> - - <!-- Paste result; %1$d items done, %2$d items failed --> <string name="fm_paste_failed">%1$d 個完成,%2$d 個失敗</string> - - <!-- Paste result; %1$d items done, %2$d items skipped --> <string name="fm_paste_skipped">%1$d 個完成,%2$d 個已略過</string> <plurals name="fm_paste_moved"> <item quantity="other">已移動 %1$d 個項目</item> @@ -1430,8 +1447,6 @@ <plurals name="fm_paste_copied"> <item quantity="other">已複製 %1$d 個項目</item> </plurals> - - <!-- %1$s is a file or folder name --> <string name="fm_already_exists">「%1$s」已存在</string> <string name="fm_op_renaming">正在重新命名...</string> <string name="fm_rename_failed">重新命名失敗</string> @@ -1442,20 +1457,14 @@ <string name="fm_create">建立</string> <string name="fm_new_name">新名稱</string> <string name="fm_delete_title">刪除?</string> - - <!-- %1$s is a file or folder name --> <string name="fm_delete_text">要永久刪除「%1$s」嗎?</string> <plurals name="fm_delete_items_title"> <item quantity="other">刪除 %1$d 個項目?</item> </plurals> <string name="fm_cannot_undo">此操作無法復原。</string> - - <!-- After a list of the first five names in a delete confirmation --> <plurals name="fm_and_more"> <item quantity="other">…及另外 %1$d 個</item> </plurals> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_deleting_batch">正在刪除 %1$d/%2$d - %3$s</string> <plurals name="fm_delete_some_failed"> <item quantity="other">%1$d 個無法刪除</item> @@ -1469,8 +1478,6 @@ <string name="fm_conflict_skip">略過</string> <string name="fm_select_this_folder">選擇此資料夾</string> <string name="fm_back">返回</string> - - <!-- %1$s is a storage name, e.g. SD card --> <string name="fm_drive_not_readable">%1$s 已掛載,但目前無法讀取</string> <string name="fm_list_view">清單檢視</string> <string name="fm_grid_view">格狀檢視</string> @@ -1485,51 +1492,31 @@ <string name="fm_hide_favorites">隱藏我的最愛</string> <string name="fm_show_favorites">顯示我的最愛</string> <string name="fm_filter_folder">篩選此資料夾</string> - - <!-- Free space on the storage being browsed; %1$s is a size, e.g. 12.50 GB --> <string name="fm_free_space">可用 %1$s</string> <string name="fm_selected_count">已選取 %1$d 個</string> - - <!-- Selection bar: clear the selection --> <string name="fm_select_none">無</string> - - <!-- Selection bar: select every item --> <string name="fm_select_all">全部</string> <string name="fm_paste">貼上</string> <plurals name="fm_items"> <item quantity="other">%1$d 個項目</item> </plurals> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_here">在此貼上 %1$s</string> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_move_here">移動 %1$s 至此</string> <string name="fm_rail_title">檔案</string> <string name="fm_rail_storage">儲存空間</string> - - <!-- Rail section of shortcut folders (Downloads, ROMs, …) --> <string name="fm_rail_quick">快速</string> <string name="fm_rail_favorites">我的最愛</string> <string name="fm_rail_downloads">下載</string> - - <!-- Downloads shortened to fit under an icon (about 8 characters) --> <string name="fm_rail_downloads_short">下載</string> <string name="fm_rail_roms">ROMs</string> <string name="fm_rail_session_logs">會話記錄</string> <string name="fm_rail_pictures">圖片</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_added">已將「%1$s」加入我的最愛</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_removed">已將「%1$s」從我的最愛移除</string> <string name="fm_empty_directory">空白目錄</string> <string name="fm_up_one_level">返回上一層</string> <string name="fm_choose_folder">選擇資料夾</string> <string name="fm_choose_file">選擇檔案</string> - - <!-- On-screen controller tint colors --> <string name="ctrl_tint_steam_blue">Steam 藍</string> <string name="ctrl_tint_sky">天藍</string> <string name="ctrl_tint_white">白色</string> @@ -1538,8 +1525,6 @@ <string name="ctrl_tint_amber">琥珀色</string> <string name="ctrl_tint_red">紅色</string> <string name="ctrl_tint_pink">粉紅色</string> - - <!-- On-screen buttons that can be remapped --> <string name="ctrl_button_a">A 鍵</string> <string name="ctrl_button_b">B 鍵</string> <string name="ctrl_button_x">X 鍵</string> @@ -1550,34 +1535,21 @@ <string name="ctrl_button_rt">右扳機鍵</string> <string name="ctrl_button_view">檢視按鈕</string> <string name="ctrl_button_menu">選單按鈕</string> - - <!-- What a remapped on-screen button sends; letters and Steam are controller button names --> - - <!-- Controller View button --> <string name="ctrl_target_view">檢視</string> - - <!-- Controller Menu button --> <string name="ctrl_target_menu">選單</string> <string name="ctrl_target_up">十字鍵上</string> <string name="ctrl_target_down">十字鍵下</string> <string name="ctrl_target_left">十字鍵左</string> <string name="ctrl_target_right">十字鍵右</string> - - <!-- The on-screen button is not shown --> <string name="ctrl_target_hidden">隱藏</string> <string name="ctrl_editor_drag">拖曳以移動</string> <string name="ctrl_editor_snap">對齊</string> <string name="ctrl_editor_save">儲存</string> - - <!-- What the second screen shows during a session --> <string name="second_mode_none">無</string> <string name="second_mode_keyboard_trackpad">鍵盤 + 觸控板</string> <string name="second_mode_terminal">終端機</string> <string name="second_mode_deck_controls">Deck 握把 + 觸控板</string> - <!-- Runtime, updates and setup helpers --> - - <!-- Linux runtime install / removal (LinuxRuntimeInstaller, RuntimeInstallService) --> <string name="rtinst_removing">正在移除 Linux 運行環境</string> <plurals name="rtinst_removing_entries"> <item quantity="other">正在移除 Linux 運行環境 · %1$d 個項目</item> @@ -1592,75 +1564,47 @@ <string name="rtinst_title_installing">正在安裝 Linux 運行環境</string> <string name="rtinst_title_removing">正在移除 Linux 運行環境</string> - <!-- Hosted desktop and emulator packages (DesktopCatalog) --> <string name="deskpkg_runtime_missing">尚未安裝 Linux 運行環境</string> - - <!-- %1$s: package name --> <string name="deskpkg_no_checksum">目錄中沒有 %1$s 的校驗和</string> <string name="deskpkg_checksum_mismatch">校驗和不符 - 未作任何更改</string> - - <!-- %1$s: package name --> <string name="deskpkg_installing">正在安裝 %1$s</string> <string name="deskpkg_place_failed">無法放置 AppImage</string> <string name="deskpkg_extract_failed">解壓縮失敗</string> <string name="deskpkg_install_failed">安裝失敗</string> - <!-- Flatpak store operations (FlatpakManager) --> <string name="flatpakmgr_setup_failed">Flatpak 設定失敗(結束代碼 %1$d)</string> <string name="flatpakmgr_setup_unfinished">Flatpak 設定未完成</string> <string name="flatpakmgr_busy">另一項商店工作正在進行</string> <string name="flatpakmgr_not_ready">請先設定 Flatpak</string> <string name="flatpakmgr_starting">正在開始</string> <string name="flatpakmgr_exit_status">Flatpak 已結束,狀態為 %1$d</string> - - <!-- %1$s: an app or runtime name, e.g. "SuperTux" or "GNOME runtime 50" --> <string name="flatpakmgr_installing">正在安裝 %1$s</string> <string name="flatpakmgr_updating">正在更新 %1$s</string> <string name="flatpakmgr_removing">正在移除 %1$s</string> - - <!-- %1$s: an app or runtime name; %2$d of %3$d: this step and the number of steps --> <string name="flatpakmgr_installing_step">正在安裝 %1$s(%2$d/%3$d)</string> <string name="flatpakmgr_updating_step">正在更新 %1$s(%2$d/%3$d)</string> <string name="flatpakmgr_removing_step">正在移除 %1$s(%2$d/%3$d)</string> - - <!-- Names for Flatpak runtime parts, shown inside "Installing %1$s" --> <string name="flatpakmgr_ref_translations">翻譯</string> <string name="flatpakmgr_ref_graphics_drivers">圖形驅動程式</string> <string name="flatpakmgr_ref_media_codecs">媒體編解碼器</string> - - <!-- %1$s: runtime vendor, e.g. GNOME, KDE, Freedesktop --> <string name="flatpakmgr_ref_runtime">%1$s 運行環境</string> - - <!-- %1$s: runtime vendor, e.g. GNOME; %2$s: its version, e.g. 50 --> <string name="flatpakmgr_ref_runtime_branch">%1$s 運行環境 %2$s</string> - <!-- Imported AppImages (AppImageManager) --> <string name="appimg_too_small">檔案太小,不可能是 AppImage</string> - - <!-- %1$s: the system's reason --> <string name="appimg_unreadable">無法讀取檔案:%1$s</string> <string name="appimg_not_linux">這不是 AppImage(它不是 Linux 程式)</string> <string name="appimg_wrong_arch">此 AppImage 既不是為 ARM64 (aarch64) 亦不是為 x86 電腦而設</string> <string name="appimg_not_appimage">這是 Linux 程式,但不是 AppImage</string> <string name="appimg_wrong_type">只可匯入第 2 類 AppImage(此檔案為第 %1$d 類)</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_import">可用空間不足:匯入約需 %1$s</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_update">可用空間不足:更新約需 %1$s</string> <string name="appimg_import_failed">匯入失敗</string> <string name="appimg_gone">該 AppImage 已不存在</string> <string name="appimg_update_failed">更新失敗</string> - - <!-- %1$s: file name --> <string name="appimg_extracting">正在解壓縮 %1$s</string> <string name="appimg_extract_failed">無法解壓縮 AppImage</string> - - <!-- %1$s: the last line the extractor printed --> <string name="appimg_extract_failed_detail">無法解壓縮 AppImage:%1$s</string> - <!-- Decky Loader and plugin installs (DeckyManager) --> <string name="deckymgr_stop_session_loader">請先停止目前的會話,再安裝 Decky Loader</string> <string name="deckymgr_download_failed">Decky Loader 下載失敗</string> <string name="deckymgr_size_mismatch">Decky Loader 的大小與發佈中繼資料不符</string> @@ -1696,27 +1640,13 @@ <string name="deckymgr_remote_entry_invalid">remote_binary 項目無效</string> <string name="deckymgr_remote_name_invalid">遠端二進位檔名稱無效</string> <string name="deckymgr_remote_url_https">遠端二進位檔網址必須使用 HTTPS</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_remote_hash_invalid">遠端二進位檔 %1$s 的 SHA-256 雜湊值無效</string> <string name="deckymgr_bin_dir_failed">無法建立插件 bin 目錄</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_downloading_binary">正在下載插件二進位檔 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_download_failed">無法下載插件二進位檔 %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_checksum_mismatch">插件二進位檔校驗和不符 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_not_executable">無法將插件二進位檔設為可執行 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_replace_failed">無法取代插件二進位檔 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_install_failed">無法安裝插件二進位檔 · %1$s</string> <string name="deckymgr_folder_taken">插件資料夾已屬於另一個插件</string> <string name="deckymgr_preserve_failed">無法保留現有插件</string> @@ -1724,24 +1654,14 @@ <string name="deckymgr_settings_failed">無法更新 Decky 插件設定</string> <string name="deckymgr_restore_failed">無法還原現有插件</string> - <!-- Child-process limit change over Wireless debugging (WirelessAdbFix) --> <string name="adbfix_save_failed">無法儲存無線偵錯身分</string> - - <!-- %1$d: the command's exit status --> <string name="adbfix_command_failed">ADB 指令失敗(%1$d)</string> - - <!-- %1$s: what Android answered --> <string name="adbfix_not_confirmed">Android 未確認子進程限制已更改:%1$s</string> <string name="adbfix_no_pairing">沒有已儲存的無線偵錯配對</string> <string name="adbfix_enter_address">請輸入目前的無線偵錯 IP 位址和連接埠</string> - <!-- Wireless debugging pairing notification (WirelessAdbPairingService) --> <string name="adbpair_timed_out">等待配對彈出式視窗逾時,請在 DroidDeck 重試。</string> - - <!-- %1$d: Android's error code --> <string name="adbpair_discovery_failed_code">無法尋找配對彈出式視窗(%1$d)。請確認 Wi-Fi 已開啟。</string> - - <!-- %1$s: the system's reason --> <string name="adbpair_discovery_failed">無法尋找配對彈出式視窗:%1$s</string> <string name="adbpair_six_digits">請輸入完整的 6 位數配對碼</string> <string name="adbpair_pairing">正在配對…</string> @@ -1751,35 +1671,26 @@ <string name="adbpair_applying">正在套用設定…</string> <string name="adbpair_command_failed">無線偵錯指令失敗</string> <string name="adbpair_channel_name">無線偵錯設定</string> - <string name="adbpair_channel_description">在「設定」開啟時要求輸入無線偵錯配對碼</string> + <string name="adbpair_channel_description">在「系統設定」開啟時要求輸入無線偵錯配對碼</string> <string name="adbpair_title_pair">配對無線偵錯</string> <string name="adbpair_waiting_text">開啟無線偵錯,然後輕按「使用配對碼配對裝置」。</string> <string name="adbpair_waiting_long">開啟無線偵錯,然後輕按「使用配對碼配對裝置」。請留在「設定」中:配對碼需在此通知中輸入。</string> - - <!-- Label of the notification's reply field --> <string name="adbpair_code_label">6 位數配對碼</string> - <string name="adbpair_code_hint">輕按「輸入配對碼」,然後輸入「設定」中顯示的 6 位數字。</string> + <string name="adbpair_code_hint">輕按「輸入配對碼」,然後輸入「系統設定」中顯示的 6 位數字。</string> <string name="adbpair_title_code">輸入 Wi-Fi 配對碼</string> <string name="adbpair_title_retry">請再次輸入配對碼</string> - - <!-- Notification action button --> <string name="adbpair_enter_code">輸入配對碼</string> <string name="adbpair_title_working">正在設定 Steam</string> <string name="adbpair_title_done">Steam 已準備就緒</string> <string name="adbpair_done_text">輕按即可返回 DroidDeck。你現在可以關閉無線偵錯。</string> <string name="adbpair_title_failed">無線偵錯設定已停止</string> - <!-- DroidDeck's own updates (SelfInstaller, AppUpdates) --> - <string name="selfinst_http">下載回應 HTTP %1$d</string> + <string name="selfinst_download_failed">下載失敗</string> <string name="selfinst_size_mismatch">下載的大小與已發佈的 APK 不符,已被捨棄 - 請再試一次</string> <string name="selfinst_checksum_mismatch">下載的檔案與其校驗和不符,已被捨棄 - 請再試一次</string> - - <!-- %1$s: the update's Android package name; %2$s: this app's --> <string name="selfinst_wrong_package">此更新屬於 Android 套件 %1$s,而非 %2$s</string> <string name="selfinst_metadata_signer">更新中繼資料未指明 DroidDeck 的發佈簽署金鑰</string> <string name="selfinst_unreadable">Android 無法讀取已下載的 APK</string> - - <!-- %1$s: the APK's Android package name; %2$s: this app's --> <string name="selfinst_apk_wrong_package">已下載的 APK 屬於 %1$s,而非 %2$s</string> <string name="selfinst_version_mismatch">已下載的 APK 的 versionCode 為 %1$d,而非已發佈的 %2$d</string> <string name="selfinst_downgrade">Android 不會以 versionCode %1$d 覆蓋已安裝的 %2$d</string> @@ -1787,19 +1698,11 @@ <string name="selfinst_wrong_signer">已下載的 APK 並非使用 DroidDeck 的發佈金鑰簽署</string> <string name="appupd_http">更新目錄回應 HTTP %1$d</string> - <!-- Session, GPU and display --> - - <!-- Session loading screen --> <string name="loadstate_starting">正在啟動會話…</string> - - <!-- %1$d minutes, %2$02d seconds since the session started --> <string name="loadstate_elapsed">已過 %1$d:%2$02d · 仍在處理</string> <string name="loadstate_steam_update">正在下載 Steam 用戶端更新 · %1$d%%</string> - - <!-- %1$s is the client's own download progress, as it prints it --> <string name="loadstate_steam_client">正在下載 Steam 用戶端 · %1$s</string> - <!-- Installing GE-Proton / proton-cachyos (%1$s is the tool's name, %2$s its release tag) --> <string name="pextra_busy">已有兼容性工具正在安裝</string> <string name="pextra_stop_session">請先停止目前的會話,再安裝兼容性工具</string> <string name="pextra_no_release">找不到 %1$s 的 ARM64 發佈版本</string> @@ -1816,55 +1719,38 @@ <string name="pextra_checksum_mismatch">校驗和不符;已刪除下載的檔案</string> <string name="pextra_session_started">下載期間有會話啟動;請先停止該會話,再安裝兼容性工具</string> <string name="pextra_installing">正在安裝 %1$s</string> - - <!-- %2$d is the installer's exit status --> <string name="pextra_install_failed">%1$s 安裝失敗(結束代碼 %2$d)</string> <string name="pextra_could_not_install">無法安裝 %1$s</string> <string name="esync_fetching">正在下載 droiddeck-esync 套件</string> - <!-- Components (FEX / DXVK / VKD3D-Proton swapped into a Proton). %1$s component, %2$s version, %3$s Proton --> <string name="cmgr_fex_linux_helpers">包含 Linux 輔助程式</string> <string name="cmgr_fex_dlls_only">只有 DLL</string> <string name="cmgr_original_proton_updated">原始(上次替換後 Proton 已更新)</string> <string name="cmgr_changed_outside">已在「元件」以外更改</string> - - <!-- A component version that could not be found in a Proton --> <string name="cmgr_not_present">不存在</string> - - <!-- %1$s is the Proton build the original files were saved from --> <string name="cmgr_original_version">原始 %1$s</string> <string name="cmgr_original_from">原始版本來自 %1$s</string> <string name="cmgr_swap_queued">%1$s %2$s 會在 %3$s 上執行的遊戲關閉後放入其中。</string> <string name="cmgr_swap_done">%1$s %2$s 現已放入 %3$s,會在下次啟動遊戲時生效。</string> <string name="cmgr_original_missing">未儲存該原始組合包</string> - - <!-- %1$s component, %2$s Proton --> <string name="cmgr_restore_queued">%2$s 的 %1$s 會在其上執行的遊戲關閉後還原為原始版本。</string> - - <!-- %1$s component, %2$s Proton, %3$s the Proton build the original came from --> <string name="cmgr_restore_done">已從 %3$s 的原始版本還原 %2$s 的 %1$s。</string> - - <!-- %1$s package file, %2$s Proton id --> <string name="cmgr_package_in_use">%1$s 正在 %2$s 中使用。請先將該 Proton 替換為其他版本。</string> <string name="cmgr_package_not_stored">未儲存 %1$s</string> <string name="cmgr_deleted">已刪除 %1$s。</string> <string name="cmgr_original_kept">已安裝版本的原始版本會保留,以便還原。</string> <string name="cmgr_not_stored">未儲存</string> - - <!-- %1$s Proton build, %2$s component --> <string name="cmgr_deleted_original">已刪除 %2$s 的 %1$s 原始版本。</string> <string name="cmgr_nightlies_only">只會從 Nightlies 發佈版本下載</string> <string name="cmgr_list_predates_checksums">此軟件包清單早於校驗和推出 - 請重新整理後再試一次</string> <string name="cmgr_checksum_mismatch">校驗和不符</string> - <!-- Display choices --> <string name="sprefs_upscaler_linear">線性</string> <string name="sprefs_upscaler_nearest">最近鄰</string> <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR(品質)</string> <string name="sprefs_upscaler_sharpen">只銳化</string> <string name="sprefs_lod_bias_auto">自動(配合縮放)</string> - <!-- Screen effect Looks: preset names and the line under the row --> <string name="look_off_desc">沒有套用任何效果。</string> <string name="look_game_clarity">遊戲清晰</string> <string name="look_game_clarity_desc">銳化並略增對比度 - 日常之選。</string> @@ -1889,29 +1775,23 @@ <string name="look_anime_edge">動畫描邊</string> <string name="look_anime_edge_desc">卡通描邊加上銳化。</string> - <!-- GPU support line --> <string name="gpuinfo_not_adreno">不是 Adreno GPU</string> <string name="gpuinfo_supported">受支援</string> <string name="gpuinfo_experimental">實驗性:其驅動程式為測試版本</string> <string name="gpuinfo_below_tested">低於已測試的硬件(Adreno 725 或更新):可能無法執行</string> <string name="gpuinfo_unsupported">不受支援:DroidDeck 需要 Adreno (Snapdragon) GPU</string> - <!-- Driver downloads and imports --> <string name="turnip_rate_limited">已達 GitHub 的速率限制 - 請稍後再試</string> <string name="turnip_github_http">GitHub 回應 HTTP %1$d</string> - <string name="turnip_download_http">下載回應 HTTP %1$d</string> + <string name="turnip_download_failed">下載失敗</string> <string name="turnip_list_predates_checksums">此驅動程式清單早於校驗和推出 - 請重新整理後再試一次</string> <string name="turnip_checksum_mismatch">校驗和不符 - 已捨棄下載的檔案</string> - - <!-- %1$s is one of the turnip_reject_* reasons --> <string name="turnip_not_adrenotools">不是 AdrenoTools 驅動程式:%1$s</string> <string name="turnip_reject_no_meta">沒有 meta.json</string> <string name="turnip_reject_meta_unreadable">無法讀取 meta.json(%1$s)</string> <string name="turnip_reject_linux_driver">這是 Linux 運行環境驅動程式(請在「運行環境驅動程式」下匯入)</string> <string name="turnip_reject_wayland">這是 Wayland 遊戲驅動程式,此應用程式用不上</string> <string name="turnip_reject_no_library_name">meta.json 沒有指明 libraryName,因此無法交給 AdrenoTools</string> - - <!-- %1$s is a library file name --> <string name="turnip_reject_library_missing">meta.json 指明了 %1$s,但 zip 中沒有此檔案</string> <string name="turnip_reject_not_aarch64">%1$s 不是 64 位元 AArch64 ELF 共用程式庫</string> <string name="turnip_reject_glibc">%1$s 連結 glibc - 這是「-Linux」Turnip,應在「運行環境驅動程式」下匯入</string> @@ -1922,115 +1802,61 @@ <string name="bundle_entry_outside">不是驅動程式組合包:%1$s 指向組合包以外</string> <string name="bundle_too_large">不是驅動程式組合包:解壓後超過 %1$d MB</string> - <!-- Game storage --> <string name="gstore_sd_card">SD 卡</string> - - <!-- %1$s is a size, like 12.3 GB --> <string name="gstore_folder">資料夾</string> + <string name="logshare_chooser">分享會話記錄</string> - <!-- Stands in for the Steam account name when the client did not record one --> - - <!-- Why the HDR switch is greyed out --> <string name="hdr_needs_android_10">需要 Android 10 或更新版本(支援色彩空間的顯示圖層)</string> <string name="hdr_none">此螢幕沒有回報支援 HDR</string> - - <!-- %1$s lists HDR formats, like Dolby Vision, HDR10+ --> <string name="hdr_not_hdr10">此螢幕支援 %1$s,但不支援 HDR10</string> - <!-- Follow-up --> - - <!-- Stands in for the GPU name when the device does not report one --> <string name="gpu_this_gpu">此 GPU</string> <string name="phantom_title_on">子進程限制已開啟</string> <string name="phantom_title_unset">子進程限制未設定</string> <string name="phantom_title_unreadable">無法檢查子進程限制</string> <string name="phantom_title_off">子進程限制已關閉</string> <string name="phantom_title_not_required">無需理會子進程限制</string> - - <!-- %1$s is the sentence saying how to turn the limit off on this device --> <string name="phantom_instructions_fix">%1$s 如無法這樣做,請將此裝置連接到已安裝 ADB 的電腦,並執行以下指令,然後返回這裡再檢查一次。</string> <string name="phantom_instructions_off">可以啟動 Steam 會話。</string> <string name="phantom_instructions_not_applicable">此 Android 版本不使用此限制。</string> - <string name="phantom_fix_toggle">在開發人員選項中開啟「停用子進程限制」,之後請保持開發人員選項開啟。</string> + <string name="phantom_fix_toggle">在開發人員選項中開啟「停用對子處理過程的限制」,之後請保持開發人員選項開啟。</string> <string name="phantom_fix_no_toggle">此 Android 版本沒有此開關。請使用無線偵錯,直接在此裝置上更改。</string> <string name="upd_block_no_apk">此版本沒有適用於此 DroidDeck 版本的下載。</string> - - <!-- %1$d is the offered build's versionCode, %2$d the installed one's --> <string name="upd_block_version_code">Android 不會以此版本覆蓋安裝,因為其 versionCode %1$d 低於已安裝的 %2$d。</string> <string name="upd_fail_downgrade">Android 不會以舊版本覆蓋較新的版本。請繼續使用此版本,直至該頻道追上為止。</string> <string name="upd_fail_signature">此 DroidDeck 的簽署方式不同(可能是本機自行建置的版本?),因此 Android 無法直接更新。</string> <string name="upd_fail_storage">可用空間不足,無法更新。</string> <string name="upd_fail_aborted">已取消更新。</string> - - <!-- %1$s is Android's own (English) installer message --> <string name="upd_fail_with_message">更新未能安裝:%1$s</string> <string name="upd_fail_generic">更新未能安裝。</string> - - <!-- A save zip's layout; %1$s is the app it comes from (GameHub, Winlator) --> <string name="saves_layout_zip">%1$s zip</string> - - <!-- A save zip whose layout is not known --> <string name="saves_zip">zip</string> - - <!-- %1$s is the game's name --> <string name="saves_not_launched">%1$s 尚未啟動過</string> <string name="saves_none_found">找不到 %1$s 的存檔</string> - - <!-- %1$s is the zip's file name --> <string name="saves_not_save_zip">%1$s 沒有 drive_c 資料夾,因此不是 GameHub 或 Winlator 存檔 zip</string> - - <!-- %1$s is a folder path --> <string name="gstore_cannot_create">無法在 %1$s 中建立資料夾</string> <string name="gstore_cannot_write">無法寫入 %1$s</string> - - <!-- %1$s is a folder path, %2$s the system's error --> <string name="gstore_cannot_write_detail">無法寫入 %1$s(%2$s)</string> <string name="gfiles_folder_unavailable">無法使用資料夾</string> - - <!-- %1$s is a file name --> <string name="gfiles_name_taken">另一個檔案已使用 %1$s</string> <string name="gfiles_art_unavailable">無法使用圖片資料夾</string> <string name="gfiles_unrelated_inventory">資料夾中有不相關的同步清單</string> - - <!-- %1$s is a file name --> <string name="gfiles_remove_failed">無法移除 %1$s</string> <string name="gfiles_outside_folder">檔案超出匯出資料夾範圍</string> - - <!-- A FEX build whose DLL carries no version name --> <string name="cmgr_fex_unnamed">FEX(沒有版本名稱的版本)</string> - - <!-- %1$s is a package file name --> <string name="cmgr_no_profile">%1$s 中沒有 profile.json</string> - - <!-- %1$s is a package file name, %2$s the type its profile.json gives --> <string name="cmgr_not_component_package">%1$s 不是 Linux 元件套件(類型為 %2$s)</string> - - <!-- A storage volume in the second-library menu; %1$s is its name, %2$s its free space, like 12.3 GB --> <string name="gstore_volume_free">%1$s · 可用 %2$s</string> - - <!-- The second-library setting's value when it is automatic (short form of mode_storage_auto) --> <string name="mode_storage_auto_short">自動</string> - - <!-- %1$s is the technical reason, kept in English --> <string name="appupd_catalog_rejected">更新目錄未通過檢查(%1$s)</string> - - <!-- Label of the copied ADB command on the clipboard --> <string name="main_adb_clip_label">DroidDeck 子進程設定</string> - - <!-- Signed in, but the Steam client recorded no account name --> <string name="setup_signed_in_offline_unnamed">已登入 · 離線模式</string> <string name="setup_signed_in_unnamed">已登入</string> - - <!-- Small uppercase tags beside a driver's name: where it came from --> <string name="driver_tag_bundled">內置</string> <string name="driver_tag_downloaded">已下載</string> <string name="driver_tag_imported">已匯入</string> - - <!-- The driver is one half of a bundle that sets both drivers --> <string name="driver_tag_bundle">ANDROID + LINUX</string> - - <!-- %1$s is the limit's state (e.g. Child-process limit is on), %2$s what to do, %3$s the ADB command --> <string name="phantom_warning">%1$s。%2$s\n\n%3$s</string> <string name="display_session">會話顯示</string> <string name="display_resolution">解像度</string> @@ -2048,6 +1874,7 @@ <string name="display_frame_rate">幀率</string> <string name="display_look_filter">%1$s 將縮放設為 %2$s。</string> <string name="display_match_screen">配合螢幕(%1$d×%2$d)</string> + <string name="display_follow_screen">跟隨螢幕(摺疊或展開時調整大小)</string> <string name="mode_tab_steam">Steam</string> <string name="device_info_show">顯示裝置詳情</string> <string name="device_info_hide">隱藏裝置詳情</string> @@ -2057,6 +1884,213 @@ <string name="device_info_copied">已複製。</string> <string name="force_ssbs_title">強制 SSBS</string> <string name="force_ssbs_hint">讓一項 Wine 會不斷關閉的 CPU 速度設定保持開啟。在 Snapdragon 8 Elite 上可能令 Windows 遊戲更快;在較舊的晶片上變化不大。下次啟動遊戲時生效。</string> + + <string name="rail_stores">商店</string> + <string name="source_steam">Steam</string> + <string name="source_added">自訂</string> + <string name="setup_stores">商店</string> + <string name="setup_stores_open_on">開啟商店時顯示</string> + <string name="setup_stores_speed">下載速度等級</string> + <string name="setup_stores_engine">商店引擎</string> + <string name="setup_stores_engine_chip_ready">● 引擎已就緒</string> + <string name="setup_stores_engine_chip_missing">未建置</string> + <string name="stores_tier_balanced">平衡</string> + <string name="stores_tier_fast">快速</string> + <string name="stores_tier_max">最高</string> + <string name="stores_title">商店</string> + <string name="stores_settings">商店設定</string> + <string name="stores_settings_eyebrow">設定</string> + <string name="stores_chip_signed_out">(未登入)</string> + <string name="stores_tab_store">商店</string> + <string name="stores_tab_installed">已安裝</string> + <string name="stores_tab_library">收藏庫</string> + <string name="stores_tab_all">全部</string> + <string name="stores_tab_downloads">下載</string> + <string name="stores_tab_count">%1$s(%2$d)</string> + <string name="stores_signin">登入</string> + <string name="stores_signout_named">%1$s · 登出</string> + <string name="stores_signout_title">登出 %1$s?</string> + <string name="stores_signout_note">已安裝的遊戲會保留。重新登入後會再次取得你的收藏庫。</string> + <string name="stores_signout_stay">保持登入</string> + <string name="stores_signout_go">登出</string> + <string name="stores_search_catalog">搜尋 %1$s 目錄…</string> + <string name="stores_search_installed">搜尋已安裝的遊戲…</string> + <string name="stores_search_library">搜尋你的收藏庫…</string> + <string name="stores_search_open">搜尋</string> + <string name="stores_installed_empty">未安裝任何遊戲</string> + <string name="stores_library_loading">正在載入</string> + <string name="stores_nothing_matches">沒有遊戲</string> + <string name="stores_shelves_loading">正在載入商店…</string> + <string name="stores_amazon_no_catalog">沒有目錄</string> + <string name="stores_shelf_new">最新推出</string> + <string name="stores_shelf_deals">優惠</string> + <string name="stores_shelf_free">免費遊戲</string> + <string name="stores_shelf_trending">趨勢</string> + <string name="stores_shelf_library">你的收藏庫</string> + <string name="stores_play">開啟遊戲</string> + <string name="stores_install">安裝</string> + <string name="stores_resume_install">繼續安裝</string> + <string name="stores_dl_interrupted">已中斷</string> + <string name="stores_install_size">安裝 · %1$s</string> + <string name="stores_get_free">免費領取</string> + <string name="stores_view_on">在 %1$s 查看</string> + <string name="stores_buy_price">購買 · %1$s</string> + <string name="stores_installed_chip">已安裝</string> + <string name="stores_in_library">已在收藏庫中</string> + <string name="stores_free">免費</string> + <string name="stores_resume">繼續</string> + <string name="stores_refresh">重新整理</string> + <string name="stores_sort">排序</string> + <string name="stores_sort_last_played">最近遊玩</string> + <string name="stores_sort_recently_installed">最近安裝</string> + <string name="stores_sort_title_asc">標題 A–Z</string> + <string name="stores_sort_title_desc">標題 Z–A</string> + <string name="stores_sort_size_desc">大小: 由大到小</string> + <string name="stores_sort_size_asc">大小: 由小到大</string> + <string name="stores_sort_release_date">發行日期</string> + <string name="stores_view_list">列表檢視</string> + <string name="stores_view_cards">卡片檢視</string> + <string name="stores_show_mature">顯示成人內容</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">離線</string> + <string name="epic_card_none">關閉</string> + <string name="epic_eos">Epic 登入(EOS)</string> + <string name="epic_offline">離線啟動</string> + <string name="epic_resolve">解決 Epic 登入問題</string> + <string name="epic_client_version">版本 %1$s</string> + <string name="epic_client_no_runtime">請先安裝 Linux 運行環境</string> + <string name="epic_client_checking">正在檢查最新版本…</string> + <string name="epic_client_unpacking">正在解壓…</string> + <string name="epic_client_unreachable">下載伺服器沒有回應</string> + <string name="epic_client_needs_fex">Epic Games Launcher 需要 FEX,FEX 由 Steam 下載。請在 Steam 啟動後再次開啟啟動器。</string> + <string name="epic_client_download_failed">下載失敗:%1$s</string> + <string name="epic_client_unpack_failed">無法解壓啟動器:%1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher 沒有接受登入。請從啟動器重新啟動它。</string> + <string name="epic_client_uninstall_body">移除啟動器並釋放其空間。你的 Epic 遊戲會保持安裝並可正常運作,登入資料亦會保留,方便重新安裝時使用。</string> + <string name="epic_client_uninstall_stops">會先關閉正在運行的工作階段。</string> + <string name="epic_client_uninstalled">已解除安裝 Epic Games Launcher</string> + <string name="epic_client_uninstall_failed">部分啟動器檔案無法刪除。請再試一次。</string> + <string name="epic_client_uninstalling">請等待 Epic Games Launcher 解除安裝完成</string> + <string name="store_cloud_saves">雲端存檔</string> + <string name="cloud_upload">上載至雲端</string> + <string name="cloud_download">從雲端下載</string> + <string name="cloud_none">沒有雲端存檔</string> + <string name="cloud_conflict">雲端衝突</string> + <string name="cloud_conflict_files">雲端衝突 · %1$d 個檔案</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">保留雲端版本</string> + <string name="cloud_keep_local">保留本機版本</string> + <string name="cloud_checking">正在檢查雲端…</string> + <string name="cloud_last_sync">上次同步:%1$s</string> + <string name="cloud_never">尚未同步</string> + <string name="cloud_done">%1$d 個檔案</string> + <string name="stores_eyebrow_installed">已安裝</string> + <string name="stores_eyebrow_library">在你的收藏庫中</string> + <string name="stores_eyebrow_store">商店</string> + <string name="achievements_title">成就</string> + <string name="achievements_count">已解鎖 %1$d / %2$d</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">已解鎖 · %1$d</string> + <string name="achievements_group_locked">未解鎖 · %1$d</string> + <string name="achievements_group_hidden">隱藏 · %1$d</string> + <string name="achievements_hidden">隱藏成就</string> + <string name="achievements_hidden_detail">解鎖後會顯示詳情。</string> + <string name="achievements_all">已解鎖全部成就</string> + <string name="achievements_reading">正在讀取…</string> + <string name="achievements_signed_out">登入 %1$s 以查看你的成就。</string> + <string name="achievements_unreachable">無法連接 %1$s。請在連線後再查看。</string> + <string name="achievements_none">%1$s 未列出此遊戲的成就。</string> + <string name="achievements_show_all">顯示全部 %1$d 項</string> + <string name="achievements_dialog_title">成就 · %1$s</string> + <string name="stores_in_steam">✓ 已在 Steam</string> + <string name="stores_uninstall">解除安裝</string> + <string name="stores_uninstalling">正在解除安裝…</string> + <string name="stores_uninstall_title">解除安裝 %1$s?</string> + <string name="stores_uninstall_body_size">將釋放 %1$s,並從 Steam 移除。</string> + <string name="stores_uninstall_body">將移除其檔案及 Steam 捷徑。</string> + <string name="stores_launch_not_registered">Steam 下次啟動時會加入此遊戲;請從 Steam 啟動,或立即啟動 Steam。</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">由 Steam 按遊戲選擇</string> + <string name="stores_card_audio">音訊</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">元件</string> + <string name="stores_card_components_value">FEX、DXVK、VKD3D</string> + <string name="stores_card_engine">引擎</string> + <string name="stores_card_engine_value">%1$s · 原生</string> + <string name="stores_card_engine_java">%1$s · 內置</string> + <string name="stores_how_it_runs">運行方式</string> + <string name="stores_kv_fetched">取自</string> + <string name="stores_kv_fetched_value">%1$s,使用你的帳戶</string> + <string name="stores_kv_installed_to">安裝位置</string> + <string name="stores_kv_installed_to_value">遊戲儲存位置(Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">啟動方式</string> + <string name="stores_kv_launched_by_value">Steam 及 Proton,與 Steam 遊戲相同</string> + <string name="stores_kv_launched_by_epic">Steam 及 Proton · 每次啟動時登入 Epic,EOS 疊加層關閉</string> + <string name="stores_kv_launched_by_amazon">Steam 及 Proton · 已設定 Amazon Games Services 變數</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">安裝時加入 Steam(Deck 介面 + Steam Input)</string> + <string name="stores_downloads_empty">沒有下載項目</string> + <string name="stores_dl_paused">已暫停</string> + <string name="stores_dl_queued">排隊中</string> + <string name="stores_dl_queued_at">排隊中 · 第 %1$d 位</string> + <string name="stores_dl_cancelled">已取消</string> + <string name="stores_dl_failed">失敗</string> + <string name="stores_dl_failed_reason">失敗 · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">暫停</string> + <string name="stores_dl_resume">繼續</string> + <string name="stores_dl_cancel">取消</string> + <string name="stores_dl_retry">重試</string> + <string name="stores_dl_clear">清除</string> + <string name="stores_dl_clear_all">清除已完成</string> + <string name="stores_stage_manifest">清單</string> + <string name="stores_stage_download">下載</string> + <string name="stores_stage_verify">驗證</string> + <string name="stores_stage_install">安裝</string> + <string name="stores_stage_done">完成</string> + <string name="stores_stage_checking">正在檢查</string> + <string name="stores_stage_downloading">正在下載</string> + <string name="stores_dl_cancel_confirm">刪除下載?</string> + <string name="stores_dl_failed_kept">失敗 · 已保留 %1$s</string> + <string name="stores_stage_verifying">正在驗證</string> + <string name="stores_stage_installing">正在安裝</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d 個檔案</string> + <string name="stores_download_manager">下載管理員</string> + <string name="stores_parallel">同時下載數目</string> + <string name="stores_install_where">安裝至</string> + <string name="stores_install_title">安裝 %1$s:</string> + <string name="stores_target_internal">內部儲存空間</string> + <string name="stores_target_free">可用 %1$s</string> + <string name="stores_target_free_unknown">可用空間不明</string> + <string name="stores_storage_insufficient">可用空間不足:需要 %1$s,僅剩 %2$s</string> + <string name="stores_storage_low">空間不足(可用 %1$s,需要 %2$s)</string> + <string name="stores_notification_channel">商店下載</string> + <string name="stores_notification_channel_hint">顯示遊戲下載進度,並讓下載在背景繼續進行</string> + <string name="stores_notification_one">正在下載</string> + <string name="stores_notification_many">%1$d 項下載</string> + <string name="stores_notification_waiting">正在準備…</string> + <string name="stores_notification_done_channel">已完成的商店下載</string> + <string name="stores_notification_installed">已安裝 %1$s</string> + <string name="stores_notification_failed">%1$s 下載失敗</string> + <string name="stores_notification_delete">刪除</string> + <string name="stores_notification_keep">保留</string> + <string name="stores_login_title">登入 %1$s</string> + <string name="stores_login_provider_title">使用你的服務商帳戶登入</string> + <string name="stores_login_reload">重新載入</string> + <string name="stores_login_close">關閉</string> + <string name="stores_login_retry">再試一次</string> + <string name="stores_login_finishing">正在完成登入…</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> + <string name="stores_login_error_ssl">與登入頁面的連線不安全。</string> + <string name="stores_login_error_verification">無法驗證登入,請再試一次。</string> + <string name="stores_login_error_generic">登入失敗,請再試一次。</string> <string name="common_close">關閉</string> <string name="common_back">返回</string> <string name="common_edit">編輯</string> @@ -2070,6 +2104,21 @@ <string name="edit_other_exe">其他 exe…</string> <string name="edit_remove">移除</string> <string name="art_cover">封面</string> + <string name="art_wide_cover">寬封面</string> + <string name="art_adjust_logo">調整標誌</string> + <string name="logo_pos_default">預設</string> + <string name="logo_pos_upper_left">左上</string> + <string name="logo_pos_upper_center">中上</string> + <string name="logo_pos_center">居中</string> + <string name="logo_pos_bottom_left">左下</string> + <string name="logo_pos_bottom_center">中下</string> + <string name="logo_pos_position">位置</string> + <string name="logo_pos_size">大小</string> + <string name="logo_pos_save">儲存</string> + <string name="logo_pos_reset">還原預設</string> + <string name="logo_pos_hint">顯示在遊戲背景上,與 Steam 的繪製方式一致。實際位置可能相差幾個像素。</string> + <string name="logo_pos_no_logo">此遊戲尚無標誌。請在標誌中選擇一個,即可在此檢視。</string> + <string name="logo_pos_failed">無法儲存標誌位置。請再試一次。</string> <string name="art_background">背景</string> <string name="art_logo">標誌</string> <string name="art_icon">圖示</string> @@ -2082,10 +2131,732 @@ <string name="art_pick_image">選擇圖片…</string> <string name="art_pick_title">選擇圖片:%1$s</string> <string name="art_reset">重設為自動</string> + <string name="art_search_sgdb">搜尋 SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB:%1$s</string> + <string name="art_sgdb_search_label">搜尋遊戲</string> + <string name="art_sgdb_other_games">其他相符結果</string> + <string name="art_sgdb_none">找不到。</string> + <string name="art_sgdb_no_key">SteamGridDB 需要 API 金鑰。請在設定 › 啟動器中新增。</string> + <string name="art_sgdb_bad_key">SteamGridDB 未接受此 API 金鑰。請在設定 › 啟動器中檢查。</string> + <string name="art_sgdb_limit">SteamGridDB 目前受到請求限制。請稍後再試。</string> + <string name="art_sgdb_offline">無法連線至 SteamGridDB。請檢查網絡連線。</string> + <string name="art_sgdb_server">SteamGridDB 發生問題。請稍後再試。</string> + <string name="art_sgdb_no_game">SteamGridDB 沒有此遊戲的相符項目。請改用搜尋。</string> <plurals name="games_added_n"> <item quantity="other">已加入 %1$d 個遊戲</item> </plurals> <plurals name="games_already_n"> <item quantity="other">%1$d 個已在遊戲中</item> </plurals> + <string name="hop_back">B · 返回%1$s</string> + <string name="hop_from_games">遊戲</string> + <string name="hop_from_play">遊玩設定</string> + <string name="sheet_graphics_drivers">圖形驅動程式</string> + <string name="comp_this_proton">此 Proton</string> + <string name="comp_every_proton">所有 Proton</string> + <string name="comp_for_every_proton">適用於所有 Proton</string> + <string name="comp_available_count">可用 · %1$d</string> + <string name="comp_checked">上次檢查:%1$s</string> + <string name="comp_check_all">檢查新元件及驅動程式</string> + <string name="comp_get">取得</string> + <string name="comp_proton_bar">%1$s · 以下的 DXVK、VKD3D-Proton 和 FEX 屬於此 Proton</string> + <string name="comp_device_tested">%1$s · 已測試</string> + <string name="comp_device_untested">%1$s · 未經測試</string> + <string name="comp_device_unsupported">%1$s · 不支援</string> + <string name="gpu_auto_keeps">讓建議的組合保持最新</string> + <string name="gpu_bar_auto">自動 · %1$s</string> + <string name="gpu_separately">分別設定運行環境及顯示驅動程式</string> + <string name="gpu_use_title">使用 %1$s?</string> + <string name="gpu_mode_title">驅動程式的選擇方式</string> + <string name="gpu_mode_auto_detail">為此 GPU 自動選擇最佳組合並保持更新</string> + <string name="gpu_mode_pair">配對組合</string> + <string name="gpu_mode_pair_detail">選擇一組組合,同時設定兩個驅動程式</string> + <string name="gpu_mode_mix">自由搭配</string> + <string name="gpu_mode_mix_detail">分別選擇顯示驅動程式與運行環境驅動程式</string> + <string name="gpu_mode_pair_short">配對</string> + <string name="gpu_mode_mix_short">混合</string> + <string name="gpu_src_auto">自動</string> + <string name="gpu_src_pair">配對</string> + <string name="gpu_src_bundle">內建</string> + <string name="gpu_src_chosen">已選</string> + <string name="gpu_src_by_gpu">依 GPU</string> + <string name="gpu_src_default">預設</string> + <string name="gpu_display_live">正在繪製</string> + <string name="gpu_display_pending">等待重新啟動 · 目前由 %1$s 繪製</string> + <string name="gpu_runtime_live">正在運行</string> + <string name="gpu_runtime_pending">下次會話生效 · 本次會話繼續使用 %1$s</string> + <string name="gpu_display_next">負責繪製畫面。從下次會話起生效。</string> + <string name="gpu_previous_driver">上一個驅動程式</string> + <string name="gpu_restart_banner">重新啟動以切換顯示驅動程式。</string> + <string name="gpu_restart_blocked">請先停止運行中的會話,再重新啟動 DroidDeck 以切換顯示驅動程式。</string> + <string name="gpu_restart_now">立即重新啟動</string> + <string name="gpu_restart_later">稍後</string> + <string name="gpu_auto_title">已為你的 %1$s 自動選擇此組合</string> + <string name="gpu_auto_builtin_title">自動模式正為你的 %1$s 使用內建驅動程式</string> + <string name="gpu_auto_reason">為 %1$s 系列選擇。新版本會在背景安裝。</string> + <string name="gpu_pair_title">選擇組合</string> + <string name="gpu_pair_hint">組合會同時設定顯示驅動程式與運行環境驅動程式。</string> + <string name="gpu_mix_title">分別選擇驅動程式</string> + <string name="gpu_mix_hint">內建組合包會同時填入兩者。顯示驅動程式的變更在重新啟動後生效,運行環境驅動程式在下次會話生效。</string> + <string name="gpu_change_display">更換顯示驅動程式</string> + <string name="gpu_change_runtime">更換運行環境驅動程式</string> + <string name="gpu_autos_pick">自動選擇</string> + <string name="gpu_installed">已安裝</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · 重新啟動後生效</string> + <string name="gpu_chip_restart">%1$s · 等待重新啟動</string> + <string name="comp_this_device">此裝置</string> + <string name="proton_remove_title">移除 %1$s?</string> + <string name="setup_tab_diagnostics">診斷</string> + <string name="setup_ready">可以開始遊戲</string> + <string name="setup_not_ready">尚未可以開始遊戲</string> + <string name="setup_ready_runtime">運行環境 %1$s</string> + <string name="setup_ready_limit_off">子進程限制已關閉</string> + <string name="setup_ready_signed_in">已登入為 %1$s</string> + <string name="setup_needs_you">需要你處理時</string> + <string name="setup_group_look">外觀</string> + <string name="setup_group_device">此裝置</string> + <string name="setup_group_art">收藏庫圖片</string> + <string name="setup_group_download">下載</string> + <string name="setup_download_source">來源</string> + <string name="setup_download_source_auto">自動</string> + <string name="setup_download_source_direct">直連</string> + <string name="setup_download_source_mirror">鏡像</string> + <string name="setup_download_source_custom">自訂前綴</string> + <string name="setup_download_mirror">站點</string> + <string name="setup_download_prefix">前綴</string> + <string name="flathub_eyebrow">Linux 應用程式</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">Linux 桌面的桌面應用程式,可從「桌面」開啟。</string> + <string name="flathub_setup">設定 Flathub</string> + <string name="flathub_remove_title">移除 %1$s?</string> + <string name="flathub_remove_note">其設定和檔案會保留。</string> + <string name="flathub_keep">保留</string> + <string name="desktop_size">佔用空間</string> + <string name="desktop_uninstall_title">解除安裝桌面?</string> + <string name="desktop_all_systems">全部</string> + <string name="gog_achievements">GOG 成就</string> + <string name="gog_achievements_hint">為受支援的 GOG 遊戲同步成就。下次啟動時生效。</string> + <string name="gog_achievements_off">成就已關閉</string> + <string name="gog_achievements_on">成就已開啟</string> + <string name="gog_achievements_signin">重新登入 GOG</string> + <string name="gog_achievements_uploaded">成就已上載</string> + <string name="gog_achievements_pending">成就上載待處理</string> + <string name="gog_achievements_enable_store">在「商店」設定中開啟 GOG 成就</string> + <string name="gog_achievements_unavailable">成就不可用;請查看工作階段日誌</string> + <string name="achievement_unlocked">成就已解鎖</string> + <string name="touch_paste">貼上</string> + <string name="touch_dpad">方向鍵</string> + <string name="touch_left_stick">左搖桿</string> + <string name="touch_right_stick">右搖桿</string> + <string name="touch_menu">選單</string> + <string name="touch_keyboard">鍵盤</string> + <string name="touch_dpad_up">方向鍵上</string> + <string name="touch_dpad_down">方向鍵下</string> + <string name="touch_dpad_left">方向鍵左</string> + <string name="touch_dpad_right">方向鍵右</string> + <string name="touch_title">觸控操作</string> + <string name="touch_controller">觸控控制器</string> + <string name="touch_mouse">滑鼠</string> + <string name="touch_on">開</string> + <string name="touch_off">關</string> + <string name="touch_speed_slow">慢</string> + <string name="touch_speed_normal">正常</string> + <string name="touch_speed_fast">快</string> + <string name="touch_edit_layout">編輯佈局</string> + <string name="touch_droiddeck_menu">DroidDeck 選單</string> + <string name="touch_drag_hint">將控制項拖曳到畫面上</string> + <string name="touch_arrange">排列</string> + <string name="touch_discard">放棄</string> + <string name="touch_saving">儲存中…</string> + <string name="touch_icon">圖示</string> + <string name="touch_narrower">闊−</string> + <string name="touch_wider">闊+</string> + <string name="touch_shorter">高−</string> + <string name="touch_taller">高+</string> + <string name="touch_hide">隱藏</string> + <string name="touch_color_opacity">顏色及不透明度…</string> + <string name="touch_copy_layout">複製此佈局</string> + <string name="touch_layout_copied">佈局已複製,可貼到任何遊戲的觸控佈局中</string> + <string name="touch_paste_layout">貼上已複製的佈局</string> + <string name="touch_reset_layout">還原為 Steam 的預設佈局</string> + <string name="touch_no_binding">此控制項在 Steam 中未綁定操作,無法設定圖示</string> + <string name="touch_icon_for">%1$s 的圖示</string> + <string name="touch_layout_color">觸控佈局顏色</string> + <string name="touch_done">完成</string> + <string name="touch_save_failed">無法儲存觸控佈局</string> + <string name="touch_saved">觸控佈局已儲存至 Steam</string> + <string name="touch_app_id">應用程式 %1$d</string> + <string name="touch_label_hint">標籤(選用)</string> + <string name="touch_icons_missing">找不到 Steam 的圖示</string> + <plurals name="touch_icons_found"> + <item quantity="other">來自 Steam 的 %1$d 個圖示</item> + </plurals> + <string name="touch_icon_color">圖示顏色</string> + <string name="touch_button_color">按鈕顏色</string> + <string name="touch_no_icon">沒有圖示</string> + + <string name="stores_sync_sign_in">正在檢查登入狀態…</string> + <string name="stores_sync_library">正在取得你的遊戲庫…</string> + <string name="stores_sync_game_list">正在取得遊戲清單…</string> + <string name="stores_sync_details">正在載入遊戲詳情…(%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="other">正在同步 %1$d 個遊戲…</item> + </plurals> + <string name="stores_sync_progress">正在同步… %1$d/%2$d</string> + <string name="stores_sync_cover_art">正在取得封面圖片…</string> + <string name="stores_sync_failed">同步失敗</string> + <string name="stores_sync_no_games">在你的 %1$s 遊戲庫中找不到遊戲</string> + <string name="stores_sync_amazon_no_answer">Amazon Games 未回應你的遊戲庫要求:請重新整理,或重新登入</string> + <string name="stores_sync_gog_unreachable">無法連線至 GOG</string> + <string name="stores_sync_gog_unreadable">無法讀取你的 GOG 遊戲庫</string> + <string name="stores_registering">正在向 Steam 註冊…</string> + <string name="mode_client_arch">Steam 用戶端</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC 診斷</string> + <string name="setup_vac_diag_hint">Source 遊戲會記錄主控台(-condebug);會話記錄中的 vac.txt 會顯示是否安全</string> + <string name="load_starting_steam_x64">正在啟動 Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">由 x86-64 Steam 用戶端使用</string> + <string name="storage_uninstall_in_x64">此副本位於 x86-64 Steam 用戶端中。請在「Steam 用戶端」中選擇 x86-64,然後在此解除安裝。</string> + <string name="storage_uninstall_in_arm64">此副本位於 ARM64 Steam 用戶端中。請在「Steam 用戶端」中選擇 ARM64,然後在此解除安裝。</string> + <string name="drawer_page_glasses">眼鏡</string> + <string name="glasses_open">VITURE 眼鏡</string> + <string name="glasses_control">眼鏡控制</string> + <string name="glasses_driver_missing">此版本不包含這副眼鏡的驅動程式。</string> + <string name="glasses_connection_failed">無法連接眼鏡。請重新插上連接線,或輕按「允許」重試。</string> + <string name="glasses_allow">允許</string> + <string name="glasses_allow_hint">允許 DroidDeck 設定眼鏡的更新率、3D 模式、亮度、音量和遮光,並讀取其頭部追蹤。</string> + <string name="glasses_asking">正在等候你在 Android 提示中允許…</string> + <string name="glasses_denied">控制已被拒絕。允許後才可更改眼鏡設定。</string> + <string name="glasses_no_control">這副眼鏡可以顯示遊戲,但無法在此更改其設定。</string> + <string name="glasses_output">輸出</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">在眼鏡上顯示遊戲</string> + <string name="glasses_game_on_hint">只在眼鏡上顯示遊戲。關閉:由手機顯示,Android 會鏡像手機畫面。</string> + <string name="glasses_display">顯示</string> + <string name="glasses_refresh">更新率</string> + <string name="glasses_3d">3D(左右並排)</string> + <string name="glasses_3d_hint">將智慧眼鏡切換至並排 3D 模式。頭部追蹤單獨控制。</string> + <string name="glasses_3d_failed">未能確認 3D 訊號。請在 2D 畫面恢復後重試。</string> + <string name="glasses_no_signal">沒有畫面:眼鏡處於這部手機無法輸出的模式。請長按眼鏡的 2D/3D 按鈕,或拔除後重新連接。</string> + <string name="glasses_3d_refresh">3D 更新率</string> + <string name="glasses_auto3d">VR 遊戲使用 3D</string> + <string name="glasses_auto3d_hint">SteamVR 運行時切換到 3D,結束後切回。</string> + <string name="glasses_picture">圖片</string> + <string name="glasses_picture_hint">自動模式會在雙眼顯示平面內容並偵測 SteamVR。選擇「並排遊戲」模式可顯示 SBS 內容。</string> + <string name="glasses_picture_auto">自動</string> + <string name="glasses_picture_screen">虛擬螢幕</string> + <string name="glasses_picture_sbs">左右並排遊戲</string> + <string name="glasses_screen_size">螢幕寬度</string> + <string name="glasses_screen_distance">螢幕距離</string> + <string name="glasses_screen_next_session">當遊戲以虛擬螢幕形式在眼鏡上運行時,寬度和距離才會生效。</string> + <string name="glasses_screen_no_output">這些設定在開啟「在眼鏡上顯示遊戲」且遊戲顯示於眼鏡上時生效。</string> + <string name="glasses_screen_flat_hint">「自動」會令這款 2D 遊戲全螢幕顯示。使用虛擬螢幕可調整其寬度、距離和頭部追蹤。</string> + <string name="glasses_screen_use">使用虛擬螢幕</string> + <string name="glasses_screen_direct_hint">SteamVR 將充滿整個視野。在 VR 中調整其視野範圍;寬度和距離僅適用於虛擬螢幕。</string> + <string name="glasses_screen_sbs_hint">左右並排遊戲會填滿每隻眼睛的視野。寬度和距離只適用於虛擬螢幕。</string> + <string name="glasses_tracking_flat_hint">「自動」會令這款 2D 遊戲固定在視野中。如要使用頭部追蹤,請在「顯示」中選擇「虛擬螢幕」。</string> + <string name="glasses_tracking_sbs_hint">頭部追蹤適用於虛擬螢幕或正在運行的 SteamVR 遊戲。</string> + <string name="glasses_hardware">設備</string> + <string name="glasses_brightness">亮度</string> + <string name="glasses_volume">音量</string> + <string name="glasses_sunblock">遮光</string> + <string name="glasses_sunblock_hint">令前鏡片變暗。</string> + <string name="glasses_tracking">追蹤</string> + <string name="glasses_head_tracking">頭部追蹤</string> + <string name="glasses_head_tracking_hint">眼鏡自帶的感應器會隨頭部轉動虛擬螢幕和 SteamVR。</string> + <string name="glasses_recenter">重新置中視角</string> + <string name="glasses_recenter_button">重設螢幕中心</string> + <string name="glasses_vr_fov">SteamVR 視場角</string> + <string name="glasses_vr_fov_hint">調低令 SteamVR 更近並填滿眼鏡;調高可看到更多周圍內容。</string> + <string name="glasses_playing">正在 %1$s 上遊玩</string> + <string name="glasses_calibration">追蹤校準</string> + <string name="glasses_calibration_hint">減少漂移並對齊水平基準。</string> + <string name="glasses_calibration_saved_hint">這副眼鏡已套用儲存的校準。</string> + <string name="glasses_calibration_open">校準</string> + <string name="glasses_calibration_instructions">將已連接的眼鏡倒轉放在水平面上,使鏡框平穩貼合。輕按「開始」,然後約 8 秒內不要觸碰。一旦移動,測量會重新開始。此操作校正漂移和傾斜,但不校正朝向。</string> + <string name="glasses_calibration_settling">保持眼鏡倒轉,不要觸碰。正在等候其靜止…</string> + <string name="glasses_calibration_collecting">正在測量感應器。請保持眼鏡靜止。</string> + <string name="glasses_calibration_moving">偵測到移動。請勿觸碰眼鏡;測量會自動重新開始。</string> + <string name="glasses_calibration_turn_over">請將眼鏡倒轉放在水平面上。放置正確後便會開始測量。</string> + <string name="glasses_calibration_complete">校準已儲存。戴上眼鏡並直視前方,然後輕按「完成」以重新置中。</string> + <string name="glasses_calibration_failed">未能完成校準。請檢查連接並保持眼鏡靜止,然後再試一次。之前的校準保持不變。</string> + <string name="glasses_calibration_start">開始</string> + <string name="glasses_calibration_done">完成</string> + <string name="glasses_calibration_reset">重設追蹤校準</string> + <string name="glasses_calibration_reset_hint">要移除已儲存的校準並還原此型號的預設值嗎?重新戴上眼鏡後請重新置中。</string> + <string name="glasses_calibration_reset_button">重設</string> + <string name="hand_camera_group">手部追蹤</string> + <string name="hand_camera_prompt_title">使用手機相機追蹤手部或 Joy-Con 控制器?</string> + <string name="hand_camera_prompt_body">未連接控制器時,手機相機會在 VR 中追蹤您的裸手:拇指和食指捏合即可點擊,握緊拳頭即可抓取,掌心朝向自己並捏合即可打開選單。連接 Joy-Con 控制器後,相機會追蹤其位置,同時 Joy-Con 控制器會提供旋轉和按鍵輸入。照片會在本設備上處理,不會儲存或傳送。</string> + <string name="hand_camera_rear">後置相機</string> + <string name="hand_camera_rear_hint">建議使用。通常更清晰、視野更廣。</string> + <string name="hand_camera_front">前置相機</string> + <string name="hand_camera_front_hint">適用於裝置背面無法朝向你的情況。</string> + <string name="hand_camera_allow">使用相機</string> + <string name="hand_camera_not_now">稍後</string> + <string name="hand_camera_setting">相機手部追蹤</string> + <string name="hand_camera_setting_hint">使用手機相機進行徒手手勢操作或在 VR 中定位已配對的 Joy-Con 控制器。 Joy-Con 控制器提供旋轉和按鍵輸入。當智慧眼鏡追蹤您的手或 Joy-Con 控制器時,此功能會暫停。影像僅在此裝置上處理。</string> + <string name="hand_camera_choice">相機</string> + <string name="hand_camera_access">相機權限</string> + <string name="hand_camera_access_hint">請允許相機權限,才能開始手部追蹤。</string> + <string name="hand_camera_access_denied">相機權限已關閉。請在 Android 設定中開啟。</string> + <string name="hand_camera_allow_button">允許</string> + <string name="hand_camera_open_settings">開啟設定</string> + <string name="hand_camera_placement">相機位置</string> + <string name="hand_camera_placement_hint">開始玩之前,請確認相機能看到你。</string> + <string name="hand_camera_check">檢查</string> + <string name="hand_camera_check_title">相機位置</string> + <string name="hand_camera_how_rear">將裝置立在距離 1.5 到 2 米、約胸口高度的地方,讓後置相機對著你。然後張開雙手走進畫面。</string> + <string name="hand_camera_how_front">將裝置立在距離 1.5 到 2 米、約胸口高度的地方,讓螢幕對著你。然後張開雙手走進畫面。</string> + <string name="hand_camera_starting">正在啟動相機…</string> + <string name="hand_camera_stand_up">裝置平放著。請將它立起來,讓相機對著你。</string> + <string name="hand_camera_upright">請把裝置立得更直一點,讓相機對著你。</string> + <string name="hand_camera_not_seen">還看不到你。請走進畫面,讓頭和肩膀露出來。</string> + <string name="hand_camera_move_back">請稍微往後退一點。</string> + <string name="hand_camera_move_closer">請再靠近一點。</string> + <string name="hand_camera_show_hands">請在相機能看到的位置伸出雙手。</string> + <string name="hand_camera_good">看起來不錯。</string> + <string name="hand_camera_failed">相機無法啟動。請關閉正在使用相機的其他應用程式,然後再試一次。</string> + <string name="hand_camera_switch">切換相機</string> + <string name="hand_camera_skip">略過</string> + <string name="hand_camera_done">完成</string> + <string name="glasses_xreal_network_missing">正在等候眼鏡的 USB Ethernet 連線。這部手機可能不會向應用程式開放此連線。</string> + <string name="glasses_xreal_connection_failed">XREAL 連線中斷或傳回不支援的回應。正在重試…</string> + <string name="glasses_xreal_experimental">實驗性 1S 支援。請在眼鏡選單中使用跟隨模式並關閉畫面穩定。追蹤方向和顯示模式仍需在裝置上測試。</string> + <string name="stores_fact_developer">開發商</string> + <string name="stores_fact_publisher">發行商</string> + <string name="stores_fact_released">發行日期</string> + <string name="stores_hltb_main">主線</string> + <string name="stores_hltb_extras">+ 支線</string> + <string name="stores_hltb_completionist">全收集</string> + <string name="stores_hltb_hours">%1$s 小時</string> + <string name="stores_hltb_minutes">%1$d 分鐘</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard 模式</string> + <string name="cardboard_mode_hint">為手機 VR 眼鏡提供左右眼畫面。</string> + <string name="cardboard_source">畫面</string> + <string name="cardboard_source_screen">虛擬螢幕</string> + <string name="cardboard_source_sbs">左右並排 3D</string> + <string name="cardboard_viewer">眼鏡</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard(2014)</string> + <string name="cardboard_viewer_none">無鏡片</string> + <string name="cardboard_ipd">瞳距</string> + <string name="cardboard_screen_width">螢幕闊度</string> + <string name="cardboard_screen_distance">螢幕距離</string> + <string name="cardboard_head_tracking">頭部追蹤</string> + <string name="cardboard_no_sensor">此裝置沒有旋轉感應器。</string> + <string name="cardboard_recenter">重設視角</string> + <string name="cardboard_recenter_button">重設</string> + <string name="cardboard_steamvr">SteamVR(實驗性)</string> + <string name="cardboard_steamvr_install">安裝</string> + <string name="cardboard_steamvr_installing">正在下載並解壓 SteamVR…</string> + <string name="cardboard_steamvr_start">啟動</string> + <string name="cardboard_steamvr_stop">停止</string> + <string name="cardboard_steamvr_unavailable">此工作階段中無法使用。</string> + <string name="cardboard_steamvr_failed">SteamVR 沒有回應;請查看工作階段日誌。</string> + <string name="drawer_component_downloads">下載元件</string> + <string name="drawer_component_downloads_hint">下載內容與「元件」頁面共用。在上方選擇已下載的版本,即可在下次啟動遊戲時使用。</string> + <string name="drawer_component_choose_download">選擇要下載的版本</string> + <string name="display_picture_position">畫面位置</string> + <string name="display_position_top">置頂</string> + <string name="display_position_bottom">置底</string> + <string name="display_position_center">置中(預設)</string> + <string name="setup_tab_storage">儲存空間</string> + <string name="storage_measuring">正在統計儲存空間…</string> + <string name="storage_measuring_hint">首次統計需要幾秒鐘。</string> + <string name="storage_internal">內部儲存空間</string> + <string name="storage_used_of">已用 %1$s / %2$s</string> + <string name="storage_free">可用 %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck 使用 %1$s。統計時間 %2$s。</string> + <string name="storage_rescanning">正在重新統計…</string> + <string name="storage_other_apps">其他 Android 應用程式</string> + <string name="storage_safe_now">現在可安全釋放</string> + <string name="storage_safe_hint">未使用的運行環境、殘留、舊記錄</string> + <string name="storage_clean_up">清理…</string> + <string name="storage_session_running">停止會話後才能清理或移除。容量仍會顯示。</string> + <string name="storage_where">空間去向</string> + <string name="storage_games">Steam 遊戲</string> + <string name="storage_game_data">遊戲資料</string> + <string name="storage_game_data_hint">前綴 %1$s · 工作坊 %2$s · 著色器 %3$s</string> + <string name="storage_tools">Proton 與運行環境</string> + <string name="storage_tools_unused">%1$s 未使用</string> + <string name="storage_stores">GOG、Epic 及其他商店</string> + <string name="storage_stores_hint">在商店中解除安裝</string> + <string name="storage_desktop">桌面應用程式</string> + <string name="storage_desktop_hint">Flatpak 應用程式與運行環境</string> + <string name="storage_system">Linux 系統與 Steam 用戶端</string> + <string name="storage_system_hint">運行任何內容所必需</string> + <string name="storage_app_data">DroidDeck 資料</string> + <string name="storage_app_data_hint">舊會話記錄 %1$s · 快取 · 驅動程式</string> + <string name="storage_legend_games">遊戲</string> + <string name="storage_legend_data">遊戲資料</string> + <string name="storage_legend_tools">Proton 與運行環境</string> + <string name="storage_legend_stores">其他商店</string> + <string name="storage_legend_desktop">桌面應用程式</string> + <string name="storage_legend_system">Linux 系統</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">清理</string> + <string name="storage_clean_up_lede">此處不會影響已安裝的遊戲或進行中的下載。</string> + <string name="storage_nothing_to_clean">目前沒有可清理的內容。</string> + <string name="storage_selected">已選:%1$s · %2$s → 可用 %3$s</string> + <string name="storage_cleaning">正在清理…</string> + <string name="storage_free_button">釋放 %1$s</string> + <string name="storage_freed">已釋放 %1$s。</string> + <string name="storage_item_runtimes">未使用的 Steam 運行環境與 Proton</string> + <string name="storage_item_leftovers">已解除安裝遊戲的殘留</string> + <string name="storage_item_leftovers_unsure">可能含存檔的殘留</string> + <string name="storage_item_logs">舊會話記錄</string> + <string name="storage_item_logs_detail">保留目前會話的記錄</string> + <string name="storage_item_custom_detail">沒有遊戲使用它。如需使用,請在組件中重新安裝。</string> + <string name="storage_item_shaders">已安裝遊戲的著色器快取</string> + <string name="storage_item_shaders_detail">會隨著遊玩重新產生。每個遊戲開頭幾分鐘會再次卡頓。</string> + <string name="storage_tag_safe">安全</string> + <string name="storage_tag_unused">未使用</string> + <string name="storage_tag_stutter">卡頓</string> + <string name="storage_tag_saves">檢查存檔</string> + <string name="storage_tag_default">預設</string> + <string name="storage_tag_required">必需</string> + <string name="storage_tag_not_used">未使用</string> + <string name="storage_back">儲存空間</string> + <string name="storage_games_with_data">%1$s 及其資料</string> + <string name="storage_sort_largest">最大</string> + <string name="storage_sort_least_played">最少遊玩</string> + <string name="storage_sort_sd">在 SD 卡上</string> + <string name="storage_no_games">此處沒有遊戲。</string> + <string name="storage_played">遊玩 %1$s</string> + <string name="storage_never_played">從未遊玩</string> + <string name="storage_game_parts">遊戲 %1$s · 資料 %2$s</string> + <string name="storage_uninstall">解除安裝</string> + <string name="storage_games_note">解除安裝會開啟 Steam 內建的對話方塊,以便 Steam 記錄。若要將遊戲移到 SD 卡,請使用 Steam › 設定 › 儲存空間。</string> + <string name="storage_uninstall_title">要解除安裝 %1$s 嗎?</string> + <string name="storage_uninstall_body">Steam 會開啟並要求確認。這會釋放此遊戲的 %1$s。其前綴會保留到清理殘留時,Steam 雲端存檔仍留在你的帳號中。</string> + <string name="storage_open_steam">開啟 Steam</string> + <string name="storage_tools_detail">%1$s · %2$s 未使用</string> + <string name="storage_remove_unused">移除未使用 · %1$s</string> + <string name="storage_in_use">使用中</string> + <string name="storage_not_used">未使用</string> + <string name="storage_remove">移除</string> + <string name="storage_remove_title">要移除 %1$s 嗎?</string> + <string name="storage_remove_body">釋放 %1$s。若之後有遊戲需要,Steam 會重新下載。</string> + <string name="storage_tool_fex_runtime">Linux x86 遊戲所需(FEX)</string> + <string name="storage_tool_arm_runtime">ARM64 Proton 所需</string> + <string name="storage_tool_redist">遊戲要求的 VC++ 與 DirectX 安裝程式</string> + <string name="storage_tool_fex">運行 Linux x86 遊戲</string> + <string name="storage_tool_steam">Steam 工具</string> + <string name="storage_tool_old_runtime">DroidDeck 不需要此運行環境即可運行遊戲</string> + <string name="storage_tool_x86_proton">x86 Proton,DroidDeck 無法運行</string> + <string name="storage_tool_custom_default">所有遊戲的預設項目</string> + <string name="storage_tool_custom_unused">沒有遊戲使用它</string> + <string name="storage_tool_custom_unknown">無法讀取 Steam 的設定,因此保留</string> + <string name="storage_cleanup_busy">請等待儲存空間清理完成</string> + <string name="storage_low_title">僅剩 %1$s 可用</string> + <string name="storage_low_body">Steam 需要空間用於更新與著色器快取。低於 10 GB 時,遊戲更新可能中途失敗。</string> + <string name="storage_low_safe">%1$s 可安全釋放。</string> + <string name="storage_free_up">釋放空間</string> + <string name="storage_play_anyway">仍要遊玩</string> + <plurals name="storage_games_installed"> + <item quantity="one">已安裝 %d 個</item> + <item quantity="other">已安裝 %d 個</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d 個在 SD 卡上</item> + <item quantity="other">%d 個在 SD 卡上</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d 個工具</item> + <item quantity="other">%d 個工具</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">%d 個遊戲的空前綴資料夾與著色器快取</item> + <item quantity="other">%d 個遊戲的空前綴資料夾與著色器快取</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">%d 個遊戲的前綴仍含檔案,其中可能有本機存檔。如需保留請先備份。</item> + <item quantity="other">%d 個遊戲的前綴仍含檔案,其中可能有本機存檔。如需保留請先備份。</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d 個遊戲</item> + <item quantity="other">%d 個遊戲</item> + </plurals> + <string name="storage_tool_default_proton">DroidDeck 的預設 Proton</string> + <string name="storage_tool_proton">DroidDeck 的 Proton 11 選項</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d 個遊戲使用</item> + <item quantity="other">%d 個遊戲使用</item> + </plurals> + <string name="storage_legend_components">組件</string> + <string name="storage_components">組件</string> + <string name="storage_item_components">未使用的組件</string> + <string name="storage_component_original">原始 %1$s · %2$s</string> + <string name="storage_original_confirm">釋放 %1$s。它只會還原一個已不再安裝的 Proton 版本。</string> + <string name="storage_leftovers_unchecked">未檢查:無法讀取某個 Steam 應用程式清單,因此在可讀取前會保留已解除安裝遊戲的前綴。</string> + <string name="storage_failed">未能完成:%1$s</string> + <string name="storage_desktop_shared">共用 %1$s</string> + <string name="storage_data_installed">已安裝遊戲</string> + <string name="storage_data_parts">前綴 %1$s · 著色器 %2$s · 工作坊 %3$s</string> + <string name="storage_clear_shaders">清除著色器</string> + <string name="storage_data_leftovers">已解除安裝遊戲</string> + <string name="storage_steam_app">Steam 應用程式 %1$d</string> + <string name="storage_leftover_unsure_detail">其前綴仍含檔案,其中可能有本機存檔</string> + <string name="storage_leftover_confirm">刪除其 Wine 前綴與著色器快取(%1$s)。請先備份需要的存檔;Steam 雲端存檔仍留在你的帳號中。</string> + <string name="storage_data_other">保留</string> + <string name="storage_data_other_title">非 Steam 遊戲與 Steam 的共用前綴</string> + <string name="storage_data_other_detail">從商店或手動新增的遊戲的前綴</string> + <string name="storage_components_packages">已下載的套件</string> + <string name="storage_components_originals">已儲存的原始檔案</string> + <string name="storage_components_none">沒有已下載的組件套件。</string> + <string name="storage_component_in_use">已為某個 Proton 或遊戲選取</string> + <string name="storage_component_unused">未在任何地方選取</string> + <string name="storage_original_kept">還原已安裝的 Proton</string> + <string name="storage_original_old">不再安裝的 Proton 版本</string> + <string name="storage_tag_in_use">使用中</string> + <string name="storage_components_note">使用中的組件會被鎖定。請在組件中選取它們;在此移除的內容可以在那裡重新下載。</string> + <string name="storage_component_confirm">釋放 %1$s。你自己匯入的套件無法再次下載。</string> + <string name="storage_desktop_detail">%1$s,用於 Flatpak 應用程式及其共用內容</string> + <string name="storage_desktop_apps_title">應用程式</string> + <string name="storage_desktop_none">未安裝 Flatpak 應用程式。</string> + <string name="storage_desktop_shared_title">應用程式共用</string> + <string name="storage_desktop_runtimes">運行環境</string> + <string name="storage_desktop_runtimes_detail">應用程式所依賴的程式庫;未使用的會隨「移除未使用」一併清理</string> + <string name="storage_desktop_cache">下載倉庫</string> + <string name="storage_desktop_cache_detail">Flatpak 的物件倉庫與快取的下載</string> + <string name="storage_desktop_prune">移除未使用</string> + <string name="storage_desktop_prune_body">移除沒有已安裝應用程式需要的運行環境,並清理 Flatpak 的物件倉庫。已安裝的應用程式照常運作。</string> + <string name="storage_flatpak_uninstall_body">移除此應用程式(%1$s)以及沒有其他應用程式使用的運行環境。其主目錄中的資料會保留。</string> + <plurals name="storage_components_count"> + <item quantity="one">%d 個套件</item> + <item quantity="other">%d 個套件</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d 個應用程式</item> + <item quantity="other">%d 個應用程式</item> + </plurals> + <string name="boot_movie">開機動畫</string> + <string name="boot_movie_video">影片</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps 較流暢,但 Steam 啟動時會使用較多 CPU。在 Steam 本身設定中選擇的啟動動畫優先。</string> + <string name="boot_movie_sound">聲音</string> + <string name="boot_movie_custom">自訂影片</string> + <string name="boot_movie_custom_hint">MP4、MOV、MKV 或 WebM。其他格式及超過 %1$d MB 的檔案會在裝置上轉換為 720p WebM,最長 %2$d 秒。</string> + <string name="boot_movie_import">匯入</string> + <string name="boot_movie_remove">移除</string> + <string name="boot_movie_pick">選擇開機動畫</string> + <string name="boot_movie_imported">%1$s 現在是開機動畫</string> + <string name="boot_movie_imported_silent">%1$s 現在是開機動畫(無聲)</string> + <string name="boot_movie_too_long">需要轉換的影片不能超過 %1$d 秒</string> + <string name="boot_movie_converting">正在轉換 %1$d%%</string> + <string name="boot_movie_converting_started">正在為 Steam 轉換 %1$s。請保持 DroidDeck 開啟。</string> + <string name="boot_movie_unsupported">此裝置無法解碼該影片。</string> + <string name="boot_movie_import_failed">無法匯入此影片</string> + <string name="glasses_experimental">Luma Ultra 相機 — 實驗性功能</string> + <string name="glasses_joycons">Joy-Con 位置追踪</string> + <string name="glasses_joycons_hint">使用智慧眼鏡攝影機定位已配對的 Joy-Con 控制器。旋轉和按鍵輸入來自 Joy-Con 控制器。當您的手腕被遮住時,系統會估算位置。此功能會取代徒手操作的控制器,並暫停手機相機追蹤。連接或重設追蹤中心時,請將 Joy-Con 控制器指向前方。</string> + <string name="glasses_joycons_requires_position">請先啟用位置追蹤功能。需要 Android 12 或更高版本且 Joy-Con 控制器支援體感功能。預設關閉。</string> + <string name="setup_tab_glasses">智慧眼鏡</string> + <string name="setup_glasses_scope">顯示和頭部追蹤設定可在 DroidDeck 選單、遊戲和桌面會話之間共用。</string> + <string name="setup_glasses_connect">連接智慧眼鏡以變更其顯示和追蹤設定。斷開連線後,您儲存的設定將被保留。</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">顯示模式</string> + <string name="glasses_output_2d">2D 輸出</string> + <string name="glasses_output_3d">3D 輸出</string> + <string name="glasses_picture_group">畫面與虛擬螢幕</string> + <string name="glasses_position_group">位置與地面高度</string> + <string name="glasses_hands_group">手部追蹤 — 實驗性功能</string> + <string name="glasses_tracking_status">追蹤狀態</string> + <string name="glasses_resolution_2d">2D 分辨率</string> + <string name="glasses_resolution_3d">3D 分辨率</string> + <string name="glasses_resolution_vr">VR 分辨率</string> + <string name="glasses_resolution_auto">自動</string> + <string name="glasses_resolution_inherit">與 2D / 3D 相同</string> + <string name="glasses_resolution_hint">單眼輸出分辨率</string> + <string name="glasses_refresh_30_hint">啟用智慧眼鏡遊戲功能,選擇顯示器的原生 30 Hz 模式。</string> + <string name="glasses_3dof">3DoF 虛擬螢幕</string> + <string name="glasses_3dof_hint">將平面遊戲固定在您面前,以便您可以環顧四周。無需切換到 3D 模式即可啟用智慧眼鏡遊戲功能。</string> + <string name="glasses_screen_app_wide">寬度和距離會立即更新 DroidDeck 選單、遊戲和桌面會話的追蹤虛擬畫面。</string> + <string name="glasses_head_tracking_spatial_vr_hint">位置追蹤包含 SteamVR 中的頭部旋轉。如需僅進行旋轉追踪,請關閉位置追蹤。</string> + <string name="glasses_head_tracking_spatial_hint">控制虛擬螢幕上的頭部移動。位置追蹤包含 SteamVR 中的頭部旋轉。</string> + <string name="glasses_quick_actions">快速操作</string> + <string name="glasses_recenter_screen_hint">看向您希望螢幕顯示的位置,然後重設追蹤中心以設定其高度和方向。</string> + <string name="glasses_recenter_joycons_button">重設 Joy-Con 中心</string> + <string name="phone_camera_tracking_group">手機相機 — 實驗性功能</string> + <string name="phone_camera_tracking_setting">追蹤手部或 Joy-Con 控制器</string> + <string name="glasses_position">位置追蹤 — 實驗性功能</string> + <string name="glasses_position_hint">在VR中以及虛擬螢幕周圍進行實體移動。重新開始追蹤需要一些時間。</string> + <string name="glasses_eye_height">當前眼睛離地面的高度</string> + <string name="glasses_floor">依照目前高度設定地面高度</string> + <string name="glasses_floor_set">設定地面高度</string> + <string name="glasses_spatial_setup">立體攝影機設定與診斷</string> + <string name="glasses_spatial_setup_hint">遊戲前檢查相機校準和手部追蹤。</string> + <string name="glasses_spatial_open">開啟設定</string> + <string name="glasses_hands">用手操作控制器</string> + <string name="glasses_hands_hint">使用智慧眼鏡攝影機用手瞄準,捏合點擊,握緊手掌抓取VR中的物品。遊戲手把搖桿可以移動和旋轉。取代Joy-Con的位置追蹤。遊戲過程中可能會出現延遲或追蹤遺失。</string> + <string name="glasses_hands_ready_hint">在追蹤設定中,啟用Luma Ultra攝影機下的徒手操作控制器。首先顯示張開的手。</string> + <string name="glasses_hands_base">共享Luma Ultra校準</string> + <string name="glasses_hands_base_hint">使用共用的Luma Ultra底座。校準您的智慧眼鏡以驗證其準確性。</string> + <string name="glasses_hands_calibration_verified">測量校準已驗證</string> + <string name="glasses_hands_calibration_required">需要驗證</string> + <string name="glasses_hands_calibration_required_hint">測量距離檢查後,即可使用裸手操作控制器。</string> + <string name="tracking_recovery_lost">追蹤遺失</string> + <string name="tracking_recovery_restart_help">還卡住了嗎?在手機上:智慧型眼鏡→追蹤→開啟設定→顯示診斷→重新啟動追蹤。</string> + <string name="tracking_recovery_disconnected">智慧眼鏡斷開連接</string> + <string name="tracking_recovery_connect">檢查 USB 連接並重新連接智慧眼鏡。\n如果手機上出現 USB 存取提示,請接受該提示。</string> + <string name="tracking_recovery_usb_help">連結後,在光線充足的房間中慢慢環顧四周以恢復跟踪。</string> + <string name="tracking_recovery_recenter">需要重設中心</string> + <string name="tracking_recovery_recenter_steps">追蹤已恢復到新位置。\n看向前方,然後在手機上點選「重置追蹤中心」。</string> + <string name="tracking_recovery_recenter_help">您也可以在智慧眼鏡 → 追蹤 → 開啟設定中找到重置追蹤中心。您儲存的相機校準資訊將會保留。</string> + <string name="tracking_recovery_stabilizing">等一下</string> + <string name="tracking_recovery_hold">重置追蹤中心正在進行中。\n請在追蹤穩定期間保持智慧眼鏡靜止。</string> + <string name="tracking_recovery_automatic">當頭部追蹤準備就緒時,此畫面自動關閉。</string> + <string name="glasses_steady_hand_aim">穩定雙手瞄準</string> + <string name="glasses_steady_hand_aim_hint">從肩膀到手掌瞄準。關閉以進行手腕控制旋轉。</string> + <string name="spatial_title">空間設定</string> + <string name="spatial_wait_tracking">等待追蹤…</string> + <string name="spatial_cameras_description">左、右跟蹤攝影機</string> + <string name="spatial_camera_sync">相機同步</string> + <string name="spatial_ready">準備好了</string> + <string name="spatial_sync_hint">等待相機和頭部追蹤對齊。保持智慧眼鏡連接。</string> + <string name="spatial_prepare">1.準備校準目標</string> + <string name="spatial_print_actual">以實際尺寸列印</string> + <string name="spatial_print_hint">每個正方形的尺寸必須為 30 毫米(1.181 吋)。將板材平坦地安裝在光線充足區域的剛性表面上。</string> + <string name="spatial_print">列印校準板</string> + <string name="spatial_capture_group">2.捕捉不同的觀點</string> + <string name="spatial_board_stationary">保持校準目標靜止</string> + <string name="spatial_capture_hint">將智慧眼鏡移近、移遠和側向移動。向左/向右轉動它們,向上/向下傾斜它們,並向側面傾斜它們。將校準目標保留在兩台相機中,並在每次捕獲之前短暫暫停。</string> + <string name="spatial_start">開始新的校準</string> + <string name="spatial_wait_sync">等待相機同步。</string> + <string name="spatial_start_hint">開始新的校準以收集視圖。</string> + <string name="spatial_views_hint">保持校準目標在兩個預覽中可見。從不同角度捕捉至少 24 個清晰視野。</string> + <string name="spatial_capturing">捕捉…</string> + <string name="spatial_capture">捕捉校準目標視圖</string> + <string name="spatial_alignment">計算相機對準</string> + <string name="spatial_calculating">正在計算中…</string> + <string name="spatial_calculate">計算校準</string> + <string name="spatial_distance_group">3.檢查距離</string> + <string name="spatial_distance">測量距離</string> + <string name="spatial_distance_hint">從 12 英吋或 30 公分開始,以便列印的標記更容易檢測到。選擇您將使用的精確測量值。</string> + <string name="spatial_camera_board_distance">左相機至標定目標中心</string> + <string name="spatial_checking_distance">檢查距離…</string> + <string name="spatial_validate">驗證距離</string> + <string name="spatial_diagnostics">診斷</string> + <string name="spatial_show_diagnostics">顯示診斷</string> + <string name="spatial_diagnostics_hint">相機定時與追蹤恢復工具。</string> + <string name="spatial_camera_timing">相機計時</string> + <string name="spatial_hand_input">來自手部追蹤的輸入</string> + <string name="spatial_wait_timing">等待相機計時。</string> + <string name="spatial_frames">相機影像</string> + <string name="spatial_gpu">GPU檢測手部</string> + <string name="spatial_gpu_hint">CPU 是預設值。 GPU 是實驗性的,可能會導致 SteamVR 重新啟動。當追蹤重新啟動時,此選擇會重置。</string> + <string name="spatial_lite">手部模型的精簡檢測</string> + <string name="spatial_lite_hint">使用 Lite 手掌偵測器和手上的 Lite 重點。檢查瞄準、捏合和抓取的準確性。追蹤重新啟動時重置。</string> + <string name="spatial_adaptive">自動輸入頻率以追蹤手部</string> + <string name="spatial_adaptive_hint">調整輸入處理速度。追蹤重新啟動時重置。</string> + <string name="spatial_half_rate">限製手部追蹤的輸入頻率</string> + <string name="spatial_half_rate_hint">使用一半的相機影像。關閉以比較最大頻率。追蹤重新啟動時重置。</string> + <string name="spatial_diagnostic_capture">診斷捕獲</string> + <string name="spatial_diagnostic_capture_hint">在本地保存一對立體影像。僅在請求時才儲存影像。</string> + <string name="spatial_save_frame">儲存相機影像</string> + <string name="spatial_restart_tracking">重新開始追蹤</string> + <string name="spatial_restart_hint">如果追蹤在光線充足的區域中無法恢復,請使用。重新啟動需要新的追蹤來源。</string> + <string name="spatial_restart">重啟</string> + <string name="spatial_restart_title">重新開始追蹤?</string> + <string name="spatial_restart_confirm">未儲存的校準視圖將會遺失。之後請保持智慧眼鏡靜止,並在追蹤恢復後重置追蹤中心。</string> + <string name="spatial_views_count">%1$d / 已捕獲 24 次觀看</string> + <string name="spatial_capture_paused">擷取已暫停:%1$s</string> + <string name="spatial_measure_hint">測量%1$s。在兩個預覽中顯示完整的校準目標,然後保持不動。</string> + <string name="spatial_timing_values">%1$.1f Hz • 影像年齡 %2$.1f ms • 處理 %3$.1f ms</string> + <string name="spatial_input_values">輸入限制%1$.1f Hz • 攝影機影像的%2$.0f%%。頭部追蹤繼續以其最大頻率進行。</string> + <string name="spatial_frame_counts">%1$d 已處理 • %2$d 已丟棄 • %3$d 因輸入限製而被跳過</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra 校準</string> + <string name="spatial_print_scale" formatted="false">以 100%/實際尺寸列印。每個正方形:30 毫米(1.181 吋)。</string> + <string name="spatial_print_stationary">保持校準目標平坦且靜止;在拍攝之間移動智慧眼鏡。</string> + <string name="spatial_print_check">刻度檢查:刻度之間 100 毫米(3.937 吋)</string> + <string name="spatial_distance_12in">12 吋(30.48 公分)</string> + <string name="spatial_distance_30cm">30 公分(11.81 吋)</string> + <string name="spatial_distance_20in">20 吋(50.8 公分)</string> + <string name="spatial_distance_50cm">50 公分(19.69 吋)</string> + <string name="spatial_disabled">已停用</string> + <string name="spatial_wait_stable">等待穩定跟踪</string> + <string name="spatial_disconnected">已斷開連接</string> + <string name="spatial_hands_off">徒手操作的控制器已關閉</string> + <string name="spatial_tracking_off">位置追蹤已關閉或智慧眼鏡已斷開連接</string> + <string name="spatial_recenter_pending">已要求重置追蹤中心 — 請在追蹤穩定期間保持靜止。</string> + <string name="spatial_tracking_lost">追蹤失去 — 面對光線充足且細節可見的區域</string> + <string name="spatial_origin_changed">追蹤原點已更改 — 點擊“重置追蹤中心”,然後保持靜止。</string> + <string name="spatial_active">6DoF 主動</string> + <string name="spatial_connect_hint">連接 Luma Ultra 並啟用位置追蹤。</string> + <string name="spatial_validation_session">已驗證此連接的校準。</string> + <string name="spatial_validation_saved">校準已驗證並儲存。</string> + <string name="spatial_wait_cameras">等待立體攝影機</string> + <string name="spatial_wait_hands">等待手部追蹤</string> + <string name="spatial_collect_instructions">保持 5 × 7 校準目標靜止。移動和旋轉智慧眼鏡時可捕捉 24 個以上視圖。</string> + <string name="spatial_capture_pending">等待下一個攝影機影像。保持智慧眼鏡不動。</string> + <string name="spatial_validation_pending">檢查下一個攝影機影像。保持完整校準目標可見並保持靜止。</string> + <string name="spatial_start_first">先開始校準</string> + <string name="spatial_no_camera_frame">沒有新的相機影像到達。檢查智慧眼鏡連接和相機預覽,然後重試。</string> + <string name="spatial_clock_reset">相機時鐘重置</string> + <string name="spatial_frame_changed">追蹤座標系已更改。您的視圖已儲存以供重新計算。重置追蹤中心,然後開始新的設定以捕獲更多視圖。</string> + <string name="spatial_device_loaded">設備校準已載入</string> + <string name="spatial_base_loaded">Luma Ultra 基本校準已載入</string> + <string name="spatial_calibration_needed">需要校準</string> + <string name="spatial_tap_start">點選先開始新的校準。</string> + <string name="spatial_capture_recenter_pending">重置追蹤中心正在等待穩定的追蹤。請保持靜止片刻。</string> + <string name="spatial_capture_recenter">追蹤已更改。點擊“重置追蹤中心”一次,然後在捕獲之前保持靜止。</string> + <string name="spatial_capture_unsynchronized">擷取被拒絕:頭部追蹤未同步,或在擷取過程中發生了變化。保持不動後重試。</string> + <string name="spatial_align_first">在檢查距離之前計算相機對準。</string> + <string name="spatial_processing_failed">相機處理失敗</string> + <string name="spatial_hand_head_changed">偵測手部期間頭部追蹤發生變化</string> + <string name="spatial_hand_wait_sync">等待相機和雲台同步</string> + <string name="spatial_no_wrists">未偵測到手腕。將 Joy-Con 控制器手把放在智慧眼鏡前面</string> + <string name="spatial_no_hands">未偵測到手。在智慧眼鏡前展示張開的手掌</string> + <string name="spatial_one_camera_wrists">僅在一台攝影機中可以看到手腕;將控制器句柄保留在共享視圖中</string> + <string name="spatial_one_camera_hands">僅在一台攝影機中可以看到手;將雙手掌保持在共享視圖中</string> + <string name="spatial_ambiguous_hands">兩個攝影機都能看到手,但左/右匹配不明確</string> + <string name="spatial_inconsistent_depth">偵測到手,但立體深度不一致</string> + <string name="spatial_rejected_wrist">立體或運動檢查拒絕手腕位置</string> + <string name="spatial_inconsistent_palm">偵測到立體點,但手掌幾何形狀不一致</string> + <string name="spatial_hands_need_calibration">完成校準和距離檢查以啟用指針</string> + <string name="spatial_hands_wait_stable">正在等待穩定的頭部追蹤;如果需要,請重設追蹤中心。</string> + <string name="spatial_old_frame">相機觀察太舊;等待一雙新的</string> + <string name="spatial_fit_ready">適合 %1$.2f 像素。測量您選擇的從左側攝影機到校準目標中心的距離,然後進行驗證。</string> + <string name="spatial_opencv_error">OpenCV 不可用:%1$s</string> + <string name="spatial_restored">%1$d 已恢復已儲存的視圖。計算校準以重試,或開始新的一組以捕獲更多。</string> + <string name="spatial_captured">已捕獲 %1$d / 24 次觀看。保持校準目標固定;移動智慧眼鏡以查看下一個視圖。</string> + <string name="spatial_capture_corners">捕捉被拒絕:%1$d / 12 個必需的角落在兩個攝影機中均可見。顯示更多校準目標,保持不動,然後重試。</string> + <string name="spatial_validation_error">距離檢查無法完成:%1$s。再試一次。</string> + <string name="spatial_inference_error">偵測到手部不可用:%1$s。更換CPU/GPU或切換徒手操作的控制器重試。</string> + <string name="spatial_hand_timeout">偵測手部超過%1$d毫秒;觀察被丟棄</string> + <string name="spatial_wrists_tracked">%1$d / 2 以立體聲測量的 Joy-Con 手腕位置</string> + <string name="spatial_palms_tracked">已追蹤手掌:%1$d / 2;可用捏合手勢:%2$d;可用抓取手勢:%3$d</string> + <string name="spatial_capture_saved">已將診斷擷取儲存到 %1$s</string> + <string name="spatial_hand_error">手部追蹤已停止:%1$s</string> + <string name="spatial_stereo_loaded">立體聲%1$d×%2$d;%3$s</string> + <string name="spatial_alignment_error">頭部追蹤和校準目標不一致 %1$s(限制 5 公分/2 英吋)。保持校準目標固定並等待穩定跟踪,然後再開始新的一組。輕輕轉動、傾斜智慧眼鏡;每次捕獲前暫停。</string> + <string name="spatial_need_views">捕捉固定校準目標的至少24個不同視圖。</string> + <string name="spatial_need_rotation">左右轉動智慧眼鏡,上下傾斜;不旋轉的移動無法校準相機對準。</string> + <string name="spatial_bad_baseline">難以置信的相機基線</string> + <string name="spatial_need_orientations">透過更多不同的方向移動您的頭部。</string> + <string name="spatial_bad_rotation">相機到頭旋轉無效</string> + <string name="spatial_bad_alignment">相機與頭部的對齊不一致。</string> + <string name="spatial_calibration_error">校準無法完成。 %1$s 您所擷取的視圖已儲存。</string> + <string name="spatial_reprojection_error">保留重投影錯誤 %1$.2f 像素超過 2 像素。重新校準。</string> + <string name="spatial_distance_corners">%1$d / 兩個相機都偵測到 24 個棋盤角。保持完整校準目標可見並保持靜止。如果已經可見,請選擇 12 英寸或 30 厘米,並在重試之前測量更近的距離。</string> + <string name="spatial_distance_depth">校準目標是可見的,但無法可靠地測量其深度。保持智慧眼鏡不動,並保持校準目標平坦且光線充足,然後重試。</string> + <string name="spatial_distance_invalid">相機測量無效。保持不動,然後再試一次。</string> + <string name="spatial_distance_passed">距離檢查已通過。</string> + <string name="spatial_distance_retry">重新檢查左攝影機到校準目標中心的距離,然後重試。</string> + <string name="spatial_distance_result">測量相機%1$s;所選的距離%2$s。 %3$s</string> + <string name="spatial_wait_previews">開始校準之前等待兩個攝影機預覽。</string> + <string name="spatial_saved_views_hint">可以重新計算已儲存的視圖。開始新的校準以在當前追蹤座標系中捕獲。</string> + <string name="spatial_model_checksum_error">手模型校驗與不匹配</string> + <string name="spatial_opencv_load_error">OpenCV 無法載入</string> + <string name="glasses_6dof">6DoF 虛擬螢幕</string> + <string name="tracking_recovery_look">在光線充足的房間內緩慢環顧四周。\n不要遮擋追蹤攝影機,並面向家具等有明顯細節的物體。</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> </resources> diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 2078bafbbe..84195dcd7c 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -1,5 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="steamvr_recovery_title">SteamVR 圖形已停止運作</string> + <string name="steamvr_recovery_countdown">DroidDeck 將在 %1$d 秒後重新啟動,以重設圖形並重新開啟 SteamVR。執行中的遊戲會被關閉,未儲存的進度將無法復原。</string> + <string name="steamvr_recovery_repeated">最近一次重新啟動後,圖形故障再次發生。為避免無限循環,已暫停自動復原。重新啟動會關閉你的遊戲,未儲存的進度將無法復原。</string> + <string name="steamvr_recovery_restart">立即重新啟動</string> + <string name="steamvr_recovery_cancel">保持開啟</string> + <string name="steamvr_recovery_restarting">正在重設圖形並重新開啟 SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck 無法自動重新啟動。請完全關閉應用程式,然後重新開啟。</string> <string name="app_name">DroidDeck</string> <string-array name="loading_hints"> <item>首次執行會下載 Steam。這可能需要幾分鐘。</item> @@ -15,8 +22,10 @@ <string name="session_channel">工作階段</string> <string name="session_channel_description">在 Steam 或桌面工作階段開啟時顯示</string> <string name="session_notification">Steam 正在執行</string> + <string name="session_notification_downloads">Steam 正在下載</string> <string name="session_notification_paused">工作階段已暫停 - 準備好後點擊繼續</string> <string name="resume_session">繼續</string> + <string name="suspend_now">立即暫停</string> <string name="stop_session">結束此工作階段</string> <string name="frame_gen_title">影格生成</string> <string name="frame_gen_hint">請選擇你要使用的影格生成模式</string> @@ -90,7 +99,7 @@ <string name="fex_preset_title">FEX 預設</string> <string name="fex_next_launch">下次啟動遊戲時生效。</string> <string name="game_settings_title">遊戲</string> - <string name="fex_default_label">FEX 預設</string> + <string name="fex_default_label">FEX 預設值</string> <string name="fex_default_detail">使用 FEX 預設設定。</string> <string name="fex_stability_label">穩定</string> <string name="fex_stability_detail">最安全、最慢的設定。</string> @@ -182,6 +191,8 @@ <string name="add_app_flatpak_id">應用程式 ID</string> <string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string> <string name="add_app_flatpak_invalid">不是有效的 Flathub 應用程式 ID</string> + <string name="add_app_flatpak_bundle_hint">或是 .flatpak 檔案,適用於 Flathub 上沒有的應用程式。</string> + <string name="add_app_pick_flatpak">選擇 .flatpak 檔案</string> <string name="add_app_source">來源</string> <string name="add_app_appearance">顯示在桌面</string> <string name="add_app_preview_name">新應用程式</string> @@ -201,7 +212,7 @@ <string name="add_app_folder_copied">該資料夾包含 Linux 程式,共用儲存空間無法執行這些程式,因此會將其複製到 DroidDeck(%1$s)。</string> <string name="add_app_confirm">新增</string> <string name="add_app_cancel">取消</string> - <string name="add_app_runtime_required">請先從「設定」中安裝 Linux 執行環境。</string> + <string name="add_app_runtime_required">請先從「初始設定」中安裝 Linux 執行環境。</string> <string name="add_app_busy">請等待 %1$s 完成。</string> <string name="steam_compat_label">相容</string> <string name="proton_compatible_note">在 Steam 的「相容性」選單中標示「%1$s」的組建版本包含 DroidDeck 的 前綴修正,可在此啟動遊戲。預設為 Proton Experimental ARM64(%1$s);安裝較新的 Proton 11.0 ARM64(%1$s)後則改用該版本。Valve 自己未帶此標示的 Proton 項目無法在這部裝置上啟動遊戲。</string> @@ -215,7 +226,7 @@ <string name="common_update">更新</string> <string name="common_checking">正在檢查…</string> <string name="common_working">處理中…</string> - <string name="common_forget">忘記</string> + <string name="common_forget">清除</string> <string name="common_add_ellipsis">新增…</string> <string name="common_use">使用</string> <string name="common_applies_next_session">下次工作階段生效。</string> @@ -251,6 +262,10 @@ <string name="mode_osc">螢幕控制</string> <string name="mode_osc_qam">Steam + QAM</string> <string name="mode_osc_note">自動模式會在未連接控制器時顯示螢幕控制。</string> + <string name="osc_steam_touch">Steam 觸控(測試版)</string> + <string name="osc_style_next_session">Steam 觸控控制會在下次 Steam 工作階段啟用</string> + <string name="osc_steam_layout">Steam 觸控版面配置</string> + <string name="osc_steam_layout_hint">移動、調整大小或隱藏這款遊戲的觸控控制;會儲存到 Steam</string> <string name="mode_controller">控制器</string> <string name="mode_controller_hint">Steam 辨識你的控制器的方式。下次工作階段生效。</string> <string name="mode_controller_deck">Steam Deck 控制器</string> @@ -268,6 +283,11 @@ <string name="mode_suspend_manual">手動</string> <string name="mode_suspend_native">原生</string> <string name="mode_suspend_steam_note">「自動」會暫停,並在重新顯示時繼續。「原生」會先讓 Steam 做好睡眠準備。「手動」會等你點擊「繼續」。「從不」則會持續執行。</string> + <string name="mode_background_downloads">讓下載持續進行</string> + <string name="mode_background_downloads_hint">Steam 正在下載時,延後在背景暫停。</string> + <string name="mode_zram">zRAM 壓縮</string> + <string name="mode_zram_hint">遊戲執行時,Steam 用戶端記憶體會壓縮進裝置的 zram,為遊戲騰出更多記憶體。下次啟動 Steam 時生效。</string> + <string name="mode_zram_unsupported">無法使用:此裝置沒有 zram 或 swap,或核心版本低於 5.4。</string> <string name="mode_suspend_note">「自動」會在背景時暫停,並在重新顯示時繼續。「手動」會等你點擊「繼續」。「從不」則會持續執行。</string> <string name="mode_startup">啟動</string> <string name="mode_steam_startup">隨 DroidDeck 啟動 Steam</string> @@ -296,8 +316,8 @@ <string name="mode_sgdb_key">SteamGridDB API 金鑰</string> <string name="mode_sgdb_key_yours">你的金鑰</string> <string name="mode_sgdb_edit">編輯…</string> - <string name="mode_added_art_hint">按資料夾名稱補全缺少的圖片。遊戲資料夾中的 cover.jpg、hero.jpg、logo.png 或 icon.png 優先使用。</string> - <string name="summary_remove_game">Remove %1$s</string> + <string name="mode_added_art_hint">自動從 Steam、其次從 SteamGridDB 補齊缺少的圖片。遊戲資料夾中你自己的 cover.jpg、hero.jpg、logo.png 或 icon.png 優先使用。</string> + <string name="summary_remove_game">移除 %1$s</string> <string name="mode_added_remove_confirm">移除?</string> <string name="games_add">新增遊戲</string> <string name="games_add_title">新增遊戲:</string> @@ -331,16 +351,20 @@ <string name="wincomp_found_shipped">遊戲含有 %1$s(通常可直接使用)</string> <string name="wincomp_already_here">這款遊戲中已有</string> <string name="wincomp_no_recommendation">遊戲資料夾中沒有指向任何元件的內容。</string> + <string name="wincomp_active">已為這款遊戲安裝(%1$d)</string> <string name="wincomp_all">所有元件(%1$d)</string> <string name="wincomp_installers">需要 Windows 安裝程式(%1$d)</string> - <string name="wincomp_installers_note">這些元件需要在前綴中執行真正的安裝程式(.NET、PhysX、XNA、完整的 Visual C++ 安裝程式等)。DroidDeck 目前還做不到,接下來就會支援。</string> + <string name="wincomp_installers_note">這些是各自的安裝程式,內部沒有可拆出的軟體包,目前也還沒有記錄它們會安裝什麼。其中多數是 Proton 內建 Mono 已能取代的舊執行環境;安裝記錄會陸續補充。</string> <string name="wincomp_show">顯示</string> <string name="wincomp_hide">隱藏</string> - <string name="wincomp_needs_installer">需要 Windows 安裝程式(即將支援)</string> + <string name="wincomp_needs_installer">會執行自己的安裝程式(暫無安裝記錄)</string> <string name="wincomp_unsupported">這裡尚不支援</string> <string name="wincomp_loading">正在載入元件…</string> <string name="wincomp_failed">無法安裝:%1$s</string> <string name="wincomp_downloaded">已下載</string> + <string name="wincomp_downloading">正在下載 %1$s</string> + <string name="wincomp_installing">正在安裝:%1$s</string> + <string name="wincomp_reverting">正在關閉…</string> <string name="wincomp_download_size">下載 %1$s</string> <string name="wincomp_next_launch">將在下次啟動遊戲時生效。</string> <string name="mode_stretch169">拉伸 16:9 遊戲</string> @@ -390,13 +414,58 @@ <string name="comp_display_driver_hint">在兩種模式下都負責將畫面輸出到螢幕。重新啟動應用程式後生效。</string> <string name="comp_import_adrenotools">匯入 AdrenoTools zip…</string> <string name="comp_never">從未</string> - <string name="comp_nightlies_checked">已於 %1$s 檢查 Nightlies</string> + <string name="comp_nightlies_checked">Nightlies 檢查時間:%1$s</string> <string name="comp_title">元件</string> <string name="comp_about">關於元件</string> <string name="comp_check_drivers">檢查新驅動程式</string> <string name="comp_check_nightlies">檢查 Nightlies 中的新套件</string> <string name="comp_proton">Proton</string> <string name="comp_proton_note">這裡選擇的 Proton 會執行所有未在 Steam 中自選 Proton 的遊戲,在 Steam 中所做的變更也會顯示在這裡。Steam 更新時會取代 Valve 的 Proton;每個組建版本的原始檔案都會保留。</string> + <string name="comp_scope">設定</string> + <string name="comp_profile_configure">調整設定檔</string> + <string name="comp_profile">設定檔</string> + <string name="comp_scope_general">預設設定檔</string> + <string name="comp_scope_general_detail">沒有覆寫設定的遊戲會自動使用。</string> + <string name="comp_profile_game_detail">%1$s 啟動時自動使用的已儲存設定。</string> + <string name="comp_game_hint">只選擇這款遊戲需要的設定,其餘設定會繼續使用預設設定檔。</string> + <string name="comp_game_fex">FEX 預設集</string> + <string name="comp_game_fex_inherited">使用預設設定檔的預設集。</string> + <string name="comp_game_fex_override">已為這款遊戲儲存自訂預設集。</string> + <string name="comp_game_fex_custom">自訂 FEX 變數</string> + <string name="comp_game_use_general">使用預設</string> + <string name="comp_game_compatibility">遊戲相容性</string> + <string name="comp_game_environment_hint">這款遊戲的 Proton、DXVK、VKD3D 與同步環境選項。</string> + <string name="comp_game_proton_inherited">使用預設設定檔的 Proton。</string> + <string name="comp_game_proton_override">已透過 Steam 相容性對應為這款遊戲儲存自訂 Proton。</string> + <string name="comp_no_proton_short">無 Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">使用預設設定檔中來自 %1$s 的套件,除非這款遊戲另選其他套件。</string> + <string name="comp_game_component_general">使用預設設定檔的元件套件。</string> + <string name="comp_game_component_override">僅這款遊戲使用 %1$s。</string> + <string name="comp_game_runtime_options">執行環境選項</string> + <string name="comp_game_environment_other_hint">其他個別遊戲的 Proton、DXVK、VKD3D-Proton 與同步環境選項。</string> + <string name="comp_game_saved_next">已儲存 %1$s 的設定檔,下次啟動遊戲時生效。</string> + <string name="game_no_steam_title">不啟動 Steam 直接開始</string> + <string name="game_no_steam_detail">在不啟動 Steam 用戶端的情況下用 Proton/FEX 開啟;Steam 功能關閉。</string> + <string name="game_no_steam_on">開</string> + <string name="game_steam_with">隨 Steam 啟動</string> + <string name="game_steam_without">不經 Steam 啟動</string> + <string name="game_settings_card">設定</string> + <string name="game_settings_menu_title">%1$s 設定</string> + <string name="game_settings_default">預設</string> + <string name="game_settings_default_detail">將為此遊戲變更的所有內容還原為應用程式的設定。</string> + <string name="game_sync_custom">自訂同步變數</string> + <string name="comp_game_proton_live">已儲存 %1$s 的 Proton 選擇,現在即可在 Steam 中使用。</string> + <string name="comp_game_proton_next">已儲存 %1$s 的 Proton 選擇。啟動遊戲前請重新啟動 Steam。</string> + <string name="comp_game_proton_not_runnable">%1$s 無法在這部裝置上使用所選的 Proton。</string> + <string name="comp_game_load_failed">無法載入 %1$s 的設定檔:%2$s</string> + <string name="comp_game_save_failed">無法儲存遊戲設定檔:%1$s</string> + <string name="comp_game_reset">重設遊戲設定檔</string> + <string name="comp_game_reset_title">要重設 %1$s 的設定檔嗎?</string> + <string name="comp_game_reset_body">要移除這款遊戲的 Proton、FEX、元件套件、環境、材質過濾和 Windows 元件覆寫嗎?遊戲將改用預設設定檔。</string> + <string name="comp_game_reset_done">%1$s 現在使用預設設定檔。</string> + <string name="comp_game_reset_failed">無法完全重設遊戲設定檔:%1$s</string> <string name="comp_default_live">%1$s 現在會執行所有未在 Steam 中自選 Proton 的遊戲。</string> <string name="comp_default_next">從下次啟動 Steam 起,%1$s 會執行所有未自選 Proton 的遊戲。</string> <string name="comp_default_not_runnable">%1$s 無法在此啟動遊戲,因此不能設為預設。</string> @@ -408,7 +477,7 @@ <string name="comp_esync_wanted">%1$s · 尚無 droiddeck-esync 套件</string> <string name="comp_esync_builtin">%1$s · 內建 esync,不需要套件</string> <string name="comp_gpu_drivers">GPU 驅動程式</string> - <string name="comp_reapplied">%1$s · 已在啟動 %2$s 時重新套用</string> + <string name="comp_reapplied">%1$s · 已於 %2$s 啟動時重新套用</string> <string name="comp_next_queued">下一項:%1$s · 遊戲關閉後</string> <string name="comp_in_use">正在使用 %1$s:%2$s</string> <string name="comp_waits">等待遊戲關閉</string> @@ -521,6 +590,10 @@ <string name="drawer_cas">銳化(CAS)</string> <string name="drawer_cas_level">銳化程度</string> <string name="drawer_fake_hdr">模擬 HDR</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">進入 SteamVR</string> + <string name="steamvr_checking">正在檢查 SteamVR…</string> <string name="drawer_deband">去色帶</string> <string name="drawer_deband_strength">去色帶強度</string> <string name="drawer_brightness">亮度</string> @@ -538,6 +611,11 @@ <string name="drawer_texture_sharpness_note">負的 mip 偏移:材質更銳利,但會有些閃爍。「自動」會依工作階段畫面放大到螢幕的倍率調整。</string> <string name="drawer_touch_auto">自動(%1$s)</string> <string name="drawer_keyboard">鍵盤</string> + <string name="drawer_latency">延遲</string> + <string name="drawer_low_latency_controller">低延遲控制器</string> + <string name="drawer_low_latency_controller_hint">控制器以 1000 Hz 而非 250 Hz 回報。CPU 使用率略高。</string> + <string name="drawer_low_latency_touch">低延遲觸控</string> + <string name="drawer_low_latency_touch_hint">觸控略過影格合併,Steam 觸控以 1000 Hz 回報。CPU 使用率略高。</string> <string name="drawer_pc_keyboard">電腦鍵盤</string> <string name="drawer_android_keyboard">Android</string> <string name="drawer_second_screen">第二螢幕</string> @@ -560,11 +638,23 @@ <string name="drawer_stop_title">停止工作階段?</string> <string name="drawer_running_now">目前正在執行</string> <string name="drawer_no_game">目前沒有使用 Proton 執行的遊戲</string> + <string name="drawer_selected_profile">遊戲設定檔</string> + <string name="drawer_selected_profile_none">尚無法取得設定檔詳細資料。</string> + <string name="drawer_profile_refresh_failed_initial">無法載入遊戲設定檔,正在自動重試。</string> + <string name="drawer_profile_refresh_failed_stale">無法重新整理遊戲設定檔。目前顯示最後取得的資料,正在自動重試。</string> + <string name="drawer_profile_inspect_hint">檢視並編輯下次啟動時使用的已儲存設定。</string> + <string name="drawer_profile_default">使用預設設定檔</string> + <string name="drawer_profile_custom">自訂設定檔</string> + <string name="drawer_component_inherited">使用預設設定檔中的 %1$s。</string> + <string name="drawer_game_components_note">變更會儲存到 %1$s 的設定檔,並在下次啟動遊戲時生效。</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="other">%1$d 項遊戲覆寫</item> + </plurals> <string name="drawer_no_proton">尚未安裝 Proton。</string> <string name="drawer_game_running">遊戲執行中</string> - <string name="drawer_reapplied">已在啟動 %1$s 時重新套用</string> + <string name="drawer_reapplied">已於 %1$s 啟動時重新套用</string> <string name="drawer_original">原始</string> - <string name="drawer_components_note">請在「元件」頁面下載、匯入和刪除。</string> + <string name="drawer_components_note">請在「元件」頁面匯入和刪除。</string> <string name="setup_check_done">完成</string> <string name="setup_check_warn">需要處理</string> <string name="setup_check_busy">處理中</string> @@ -616,6 +706,14 @@ <string name="setup_saved_logs">已儲存的工作階段日誌</string> <string name="setup_saved_logs_hint">保留最新的 %1$d 個</string> <string name="setup_clear_logs">清除日誌</string> + <string name="setup_reset_settings">重設所有設定</string> + <string name="setup_reset_settings_hint">將所有設定還原為預設值</string> + <string name="setup_reset_settings_button">重設</string> + <string name="setup_reset_settings_title">要重設所有設定嗎?</string> + <string name="setup_reset_settings_body">顯示、效能、控制器、佈景主題、語言和啟動器設定將還原為預設值。你的遊戲、Steam 登入、商店帳戶、已下載的驅動程式和儲存資料夾都會保留。</string> + <string name="setup_reset_settings_profiles">同時重設遊戲設定檔(每個遊戲的 Proton、FEX、元件和環境,以及預設設定檔的環境)</string> + <string name="setup_reset_settings_session_running">請先停止工作階段再重設設定。</string> + <string name="setup_reset_settings_partial">設定已重設,但部分項目無法重設。詳細資訊請查看日誌。</string> <string name="setup_offline">離線模式</string> <string name="setup_sign_in_first">請先登入 Steam</string> <string name="setup_launcher">啟動器</string> @@ -631,6 +729,10 @@ <string name="setup_home">用作主螢幕</string> <string name="setup_home_on">DroidDeck 可以作為主螢幕應用程式</string> <string name="setup_home_off">DroidDeck 不會作為主螢幕應用程式提供</string> + <string name="setup_orientation">螢幕方向</string> + <string name="setup_orientation_auto">自動橫向</string> + <string name="setup_orientation_landscape">橫向</string> + <string name="setup_orientation_reverse">反向橫向</string> <string name="setup_fullscreen">全螢幕</string> <string name="setup_fullscreen_on">隱藏 Android 狀態列和導覽列</string> <string name="setup_fullscreen_off">顯示 Android 狀態列和導覽列</string> @@ -657,7 +759,7 @@ <string name="store_title">商店</string> <string name="store_chip_flathub">Flathub · ARM64</string> <string name="store_chip_ready">● Flatpak 已就緒</string> - <string name="store_needs_runtime">請先從「設定」中安裝 Linux 執行環境。</string> + <string name="store_needs_runtime">請先從「初始設定」中安裝 Linux 執行環境。</string> <string name="store_setup_title">設定 Flatpak</string> <string name="store_setup_text">新增 Flatpak 並連線到 Flathub(約 20 MB)。第一個應用程式還會下載其執行環境。</string> <string name="store_setting_up">正在設定…</string> @@ -769,13 +871,13 @@ <string name="gate_eyebrow">Steam</string> <string name="gate_lede">Android 會停止那些啟動大量背景處理程序的應用程式,而 Steam 會啟動數十個處理程序。在變更此設定前,遊戲可能會在沒有錯誤提示的情況下關閉。</string> <string name="gate_fix_for_me">幫我修復</string> - <string name="gate_toggle_steps">開啟「停用子處理程序限制」,然後返回。請保持開發人員選項開啟,否則該開關會再次關閉。</string> + <string name="gate_toggle_steps">開啟「停止限制子程序」,然後返回。請保持開發人員選項開啟,否則該開關會再次關閉。</string> <string name="gate_open_dev">開啟開發人員選項</string> <string name="gate_no_toggle">此 Android 版本沒有該開關,因此 DroidDeck 會透過無線偵錯進行修改。大約需要一分鐘,無需電腦。</string> <string name="gate_needs_wifi">無線偵錯需要 Wi-Fi。任何網路都可以,不需要網際網路。</string> <string name="gate_needs_notifications">配對碼會顯示在通知中。請允許 DroidDeck 傳送通知,或使用「其他方式」。</string> <string name="gate_allow_notifications">允許通知</string> - <string name="gate_step1">開啟設定 → 開發人員選項 → 無線偵錯,並將其開啟</string> + <string name="gate_step1">開啟「Android 設定」→「開發人員選項」→「無線偵錯」,並將其開啟</string> <string name="gate_step2">點擊「使用配對碼配對裝置」</string> <string name="gate_step3">將配對碼輸入 DroidDeck 通知中</string> <string name="gate_waiting">正在等待配對彈出視窗…</string> @@ -819,8 +921,8 @@ <string name="wadb_turn_off">關閉限制</string> <string name="wadb_other_ways">其他變更方式</string> <string name="wadb_dev_try_first">1 · 開發人員選項(優先嘗試)</string> - <string name="wadb_restrict_on">開啟「限制子處理程序」。</string> - <string name="wadb_restrict_off">關閉「限制子處理程序」。</string> + <string name="wadb_restrict_on">關閉「停止限制子程序」。</string> + <string name="wadb_restrict_off">開啟「停止限制子程序」。</string> <string name="wadb_computer_last">3 · 電腦 ADB(最後手段)</string> <string name="wadb_only_if">僅在無線偵錯無法使用時使用。</string> <string name="wadb_computer_group">3 · 電腦 ADB(最後手段)</string> @@ -841,6 +943,8 @@ <string name="ctrl_keyboard_button">鍵盤按鈕</string> <string name="ctrl_select_steam">按 Select 開啟 Steam 功能表</string> <string name="ctrl_select_steam_hint">代替 View/Select。</string> + <string name="ctrl_joycon_vr">將 Joy-Con 當作 VR 控制器</string> + <string name="ctrl_joycon_vr_hint">SteamVR 執行時,每個 Joy-Con 都會變成一隻手。將它指向前方並按住 HOME 鍵或擷取鍵,即可重新置中。</string> <string name="setup_animations">動畫</string> <string name="ctrl_adaptive_hint">搖桿會出現在你觸控的位置,並在放開後隱藏</string> <string name="ctrl_layout">版面配置</string> @@ -876,7 +980,7 @@ <string name="content_runtime_required">需要執行環境</string> <string name="content_loading_details">正在載入安裝詳細資料…</string> <string name="content_details_unavailable">安裝詳細資料無法使用。請稍後重試。</string> - <string name="content_needs_runtime">請先從「設定」中安裝 Linux 執行環境。</string> + <string name="content_needs_runtime">請先從「初始設定」中安裝 Linux 執行環境。</string> <string name="content_stop_first">請停止正在執行的工作階段後再安裝桌面應用程式。</string> <string name="content_install_into">將 %1$s 安裝到 Linux 桌面。</string> <string name="store_busy_percent_short">%1$s · %2$d%%</string> @@ -888,10 +992,17 @@ <string name="content_page_gone">該頁面已不存在。請從左側選擇一個區段。</string> <string name="content_open_desktop">開啟桌面</string> <string name="content_install_open_desktop">安裝並開啟桌面</string> + <string name="desktop_remove_title">解除安裝桌面</string> + <string name="desktop_remove_text">移除桌面及其內建的應用程式。遊戲、已新增的應用程式、設定和共用程式庫都會保留。</string> + <string name="desktop_removing">正在移除桌面</string> + <string name="desktop_removed">已移除桌面</string> + <string name="desktop_cleaning_legacy">正在移除舊的 LXQt 檔案</string> + <string name="desktop_removal_unknown">請先更新 DroidDeck,再移除此桌面版本。</string> <string name="content_linux_desktop">Linux 桌面</string> <string name="content_linux_desktop_hint">KDE Plasma、Firefox 和你的模擬器</string> <string name="games_empty">在 Steam 中安裝的遊戲會在工作階段結束後顯示在這裡。</string> <string name="games_play_steam">執行 Steam</string> + <string name="games_play_steamvr">執行 SteamVR</string> <string name="games_launch_settings">啟動設定</string> <string name="games_launch">啟動</string> <string name="games_files">遊戲檔案</string> @@ -916,6 +1027,8 @@ <string name="games_last_played">上次執行 %1$s</string> <string name="games_internal">內部儲存空間</string> <string name="games_added">已新增的遊戲</string> + <string name="games_custom">自訂遊戲</string> + <string name="games_store_storage">遊戲儲存空間</string> <string name="gpu_auto_hint">為此 GPU 選擇最佳驅動程式組合,並保持最新</string> <string name="gpu_manual_hint">自行選擇驅動程式組合</string> <string name="gpu_checking">正在檢查驅動程式…</string> @@ -927,7 +1040,6 @@ <string name="gpu_set_with_runtime">與執行環境驅動程式一起設定:%1$s 同時包含兩者。</string> <string name="gpu_runtime_hint">供遊戲和桌面使用。</string> <string name="gpu_runtime_default">執行環境預設</string> - <string name="gpu_display_hint">負責將畫面輸出到螢幕。重新啟動 DroidDeck 後生效。</string> <string name="gpu_auto_by_gpu">自動 - 按 GPU 選擇</string> <string name="gpu_manage">下載、匯入或刪除…</string> <string name="gpu_in_use_caps">正在使用</string> @@ -957,6 +1069,12 @@ <string name="deck_tab_left">左側觸控板</string> <string name="deck_tab_right">右側觸控板</string> <string name="deck_tab_both">兩側</string> + <string name="deck_tab_gamepad">手把</string> + <string name="deck_surface_stick">搖桿</string> + <string name="deck_surface_trackpad">觸控板</string> + <string name="deck_surface_switch">在搖桿與觸控板之間切換</string> + <string name="deck_more_controls">更多 Deck 控制</string> + <string name="deck_panels">面板</string> <string name="deck_close">關閉第二螢幕控制</string> <string name="deck_open_steam_menu">開啟 Steam 選單</string> <string name="deck_left_upper">左側 · 上方</string> @@ -992,6 +1110,10 @@ <string name="proton_installed">已安裝 %1$s</string> <string name="proton_queued">上一次要求留下的待處理項</string> <string name="proton_not_installed">未安裝</string> + <string name="proton_update_available">有可用更新 → %1$s</string> + <string name="proton_remove_older">移除舊版 %1$s</string> + <string name="proton_remove_older_body">將移除 %1$s。設定為使用這些版本的遊戲必須改用其他 Proton。</string> + <string name="proton_remove_body">設定為使用此版本的遊戲必須改用其他 Proton。</string> <string name="proton_install_now">立即安裝</string> <string name="proton_cancel_queued">取消排隊</string> <string name="pckb_android">Android 鍵盤</string> @@ -1020,6 +1142,8 @@ <string name="game_env_eyebrow">Proton 遊戲</string> <string name="pip_title">子母畫面</string> <string name="pip_auto">自動進入子母畫面</string> + <string name="unfolded_controls">展開螢幕時的控制</string> + <string name="unfolded_controls_hint">展開時,遊戲會顯示在 Steam Deck 觸控板和背面握把上方。摺疊時,遊戲以全螢幕顯示。</string> <string name="pip_suspended">已暫停</string> <string name="pip_not_ready">工作階段準備就緒後即可使用子母畫面。</string> <string name="pip_permission">請在 Android 設定中允許 DroidDeck 使用子母畫面。</string> @@ -1045,19 +1169,12 @@ <string name="game_file_exported">遊戲檔案已儲存到 %1$s</string> <string name="game_frontend_files">前端檔案</string> - <!-- Launcher, session and menus --> - - <!-- Launcher (MainActivity) --> <string name="main_wait_runtime">請等待執行環境作業完成</string> <string name="main_wait_proton_install">請等待相容性工具安裝完成</string> <string name="main_wait_desktop_install">請等待桌面應用程式安裝完成</string> <string name="main_wait_install_game">請等待安裝完成後再啟動遊戲</string> <string name="main_saves_close_session">請先關閉 Steam 工作階段,以免遊戲存檔覆蓋匯入的內容</string> - - <!-- Busy line while saves are imported; %1$s is the game's name --> <string name="main_saves_importing">正在匯入到 %1$s</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the game's name --> <plurals name="main_saves_imported"> <item quantity="other">已從 %2$s 匯入 %1$d 個檔案到 %3$s</item> </plurals> @@ -1065,20 +1182,12 @@ <item quantity="other">已從 %2$s 匯入 %1$d 個檔案到 %3$s。舊存檔已備份到 Download/DroidDeck/Saves/backups</item> </plurals> <string name="main_saves_pick_zip">選擇 %1$s 的存檔壓縮檔</string> - - <!-- Busy line while saves are exported; %1$s is the game's name --> <string name="main_saves_exporting">正在匯出 %1$s</string> - - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the zip's path --> <plurals name="main_saves_exported"> <item quantity="other">已將 %1$d 個檔案匯出為 %2$s:%3$s</item> </plurals> - - <!-- %1$s is the game's name, %2$s the save layout --> <string name="main_saves_pick_folder">選擇 %1$s 的儲存位置(%2$s)</string> - - <!-- %1$s is what was being done (e.g. Importing into Portal 2, Swapping), %2$s the error --> - <string name="main_action_failed">失敗(%1$s):%2$s</string> + <string name="main_action_failed">%1$s 失敗:%2$s</string> <string name="main_no_logs_yet">還沒有工作階段日誌:請先執行一次工作階段。</string> <string name="main_no_logs_to_clear">沒有可清除的工作階段日誌。</string> <plurals name="main_logs_cleared"> @@ -1090,78 +1199,55 @@ <string name="main_adb_copied">已複製 ADB 指令</string> <string name="main_pick_roms">選擇 ROM 資料夾</string> <string name="main_non_adreno_title">不是 Adreno GPU</string> - - <!-- %1$s is the GPU's name, %2$.0f the download size in MB --> <string name="main_non_adreno_text">Turnip 支援 Adreno GPU。在 %1$s 上,Steam 可能會出現黑畫面。下載大小:%2$.0f MB。</string> <string name="main_install_anyway">仍要安裝</string> <string name="main_remove_runtime_title">移除 Linux 執行環境</string> <string name="main_remove_runtime_text">這會刪除執行環境、其中的 Steam 用戶端,以及安裝在其中的所有遊戲。</string> - - <!-- Toast; %1$s is a list of components, separated by commas --> <string name="main_applied">已套用:%1$s</string> <string name="android_app_open_failed_primary">無法在主螢幕上開啟 %1$s</string> - - <!-- %1$s is the app, %2$s the name of the display --> <string name="android_app_open_failed_on">無法在 %2$s 上開啟 %1$s</string> - - <!-- %1$s is the app, %2$d the display's number --> <string name="android_app_open_failed_display">無法在螢幕 %2$d 上開啟 %1$s</string> - - <!-- Components page busy lines, shown with … after them --> <string name="comp_busy_importing">正在匯入</string> <string name="comp_busy_swapping">正在換入</string> <string name="comp_busy_restoring">正在還原</string> <string name="comp_busy_cancelling">正在取消</string> <string name="comp_busy_deleting">正在刪除</string> <string name="comp_cannot_read">無法讀取檔案</string> - - <!-- %1$s is a version or a name --> <string name="comp_imported">已匯入 %1$s</string> <string name="comp_swap_cancelled">已取消等待中的換入。</string> <string name="comp_pick_wcp">選擇元件套件(-linux .wcp)</string> <string name="comp_nightlies_unreachable">無法連線到 Nightlies</string> - - <!-- %1$s is the package version --> <string name="comp_stored">已儲存 %1$s</string> <string name="comp_download_failed">下載失敗:%1$s</string> <string name="drivers_pick_linux">選擇 Linux 執行環境驅動程式(-Linux zip 或 Android + Linux 套件組合)</string> <string name="drivers_pick_android">選擇顯示驅動程式(AdrenoTools zip 或 Android + Linux 套件組合)</string> <string name="drivers_pick_any">選擇驅動程式 zip 或 Android + Linux 套件組合</string> - - <!-- %1$s is a desktop app's name, %2$s what went wrong --> <string name="main_pkg_problem">%1$s:%2$s</string> <string name="main_removing_named">正在移除 %1$s…</string> - <string name="main_forgetting_named">正在忘記 %1$s…</string> + <string name="main_forgetting_named">正在清除 %1$s…</string> <string name="main_pick_game_storage">選擇遊戲儲存資料夾</string> <string name="main_pick_decky_zip">選擇 Decky 外掛程式 ZIP</string> <string name="main_storage_not_usable">無法使用:%1$s</string> - - <!-- What is running, when it is a program without a known name --> <string name="main_running_program">程式</string> <string name="main_removing_runtime">正在移除 Linux 執行環境</string> <string name="main_settings_main_screen">無法在底部螢幕開啟「設定」,已改在主螢幕上開啟。</string> - <string name="main_open_dev_options">在「設定」中開啟開發人員選項</string> + <string name="main_open_dev_options">在「Android 設定」中開啟開發人員選項</string> - <!-- Updates --> <string name="upd_unknown_apps_failed">無法開啟 Android 的「安裝不明應用程式」設定</string> <string name="upd_couldnt_check">無法檢查:%1$s</string> <string name="upd_no_download">此組建版本沒有適用於此 DroidDeck 複本的下載檔案</string> <string name="upd_stop_first">請先停止正在執行的工作階段,再進行更新</string> - - <!-- Update stages, shown with … after them --> <string name="upd_stage_downloading">正在下載</string> <string name="upd_stage_installing">正在安裝</string> <string name="upd_stage_confirm">等待你確認</string> <string name="upd_failed">更新失敗</string> <string name="upd_not_offered">Android 未提供安裝此更新的選項</string> - <!-- Decky --> <string name="decky_install_failed">Decky 安裝失敗:%1$s</string> <string name="decky_plugin_starting">正在開始匯入外掛程式…</string> <string name="decky_plugin_failed">外掛程式匯入失敗:%1$s</string> <string name="decky_plugin_installed">外掛程式已安裝。請重新啟動 Steam 以載入。</string> - <!-- GPU drivers --> <string name="drivers_not_checked">尚未檢查 - 點擊重新整理以尋找新驅動程式</string> <string name="drivers_bundle_sets_display">Android + Linux:同時設定顯示驅動程式</string> <string name="drivers_bundle_sets_runtime">Android + Linux:同時設定執行環境驅動程式</string> @@ -1169,26 +1255,26 @@ <string name="drivers_system_vulkan">系統 Vulkan:沒有適用於此 GPU 的內建版本</string> <string name="drivers_bundled">%1$s(內建)</string> <string name="drivers_manual">手動</string> - - <!-- Driver mode, then the driver pair in use --> <string name="drivers_summary">%1$s · %2$s</string> <string name="drivers_half_published">目前只發布了其中一半</string> <string name="drivers_pair_size">兩者共 %1$.0f MB</string> - - <!-- %1$s says why (the GPU's support status) --> <string name="drivers_none_to_set">沒有可設定的驅動程式:%1$s</string> <string name="drivers_checking_latest">正在檢查最新驅動程式…</string> <string name="drivers_up_to_date_check_failed">已是最新(無法檢查:%1$s)</string> <string name="drivers_recommended_unpublished">建議的驅動程式目前尚未發布</string> - - <!-- %1$s is the driver pair's name, %2$s its version --> <string name="drivers_downloading_pair">正在下載 %1$s %2$s…</string> <string name="drivers_updated_to">已更新到 %1$s %2$s。</string> <string name="drivers_updated_to_restart">已更新到 %1$s %2$s。顯示驅動程式會在 DroidDeck 重新啟動後生效。</string> + <string name="drivers_auto_waits_for_session">驅動程式更新會等到工作階段結束後進行。</string> + <string name="drivers_auto_waits_for_network">結束行動數據與省電模式後,將下載 %1$s %2$s。</string> + <string name="drivers_skipping_bad">%1$s %2$s 在此裝置上未能啟動工作階段,自動模式繼續使用可用的驅動程式。</string> + <string name="drivers_rolled_back">%1$s 兩次未能啟動工作階段,自動模式已回到可用的驅動程式。</string> <string name="drivers_switched_to">已切換到 %1$s %2$s。</string> <string name="drivers_switched_to_restart">已切換到 %1$s %2$s。顯示驅動程式會在 DroidDeck 重新啟動後生效。</string> <string name="drivers_using">正在使用 %1$s %2$s。</string> <string name="drivers_using_restart">正在使用 %1$s %2$s。顯示驅動程式會在 DroidDeck 重新啟動後生效。</string> + <string name="drivers_using_quest">使用內建的 Quest 顯示驅動程式與執行環境預設值。</string> + <string name="drivers_using_quest_restart">使用內建的 Quest 顯示驅動程式與執行環境預設值。顯示驅動程式將在 DroidDeck 重新啟動後生效。</string> <string name="drivers_not_a_driver">不是驅動程式 zip:既不是 AdrenoTools 驅動程式、-Linux Turnip,也不是 Android + Linux 套件組合</string> <string name="drivers_import_failed">匯入失敗:%1$s</string> <string name="drivers_imported_unnamed">已匯入的驅動程式</string> @@ -1196,11 +1282,7 @@ <string name="drivers_using_bundle_restart">正在將 %1$s 同時用作執行環境驅動程式和顯示驅動程式。顯示驅動程式會在 DroidDeck 重新啟動後生效。</string> <string name="drivers_deleted_bundle">已刪除 %1$s(兩個驅動程式)</string> <string name="drivers_deleted">已刪除 %1$s</string> - - <!-- %1$s lists the latest releases, %2$s when they were checked (e.g. 5 min ago) --> <string name="drivers_release_status">最新:%1$s · 檢查於 %2$s</string> - - <!-- %1$s lists the latest releases, %2$s the sources that could not be reached, %3$s when they were checked --> <string name="drivers_release_status_failed">最新:%1$s · 無法連線到 %2$s · 檢查於 %3$s</string> <plurals name="drivers_ago_minutes"> <item quantity="other">%1$d 分鐘前</item> @@ -1213,39 +1295,25 @@ </plurals> <string name="drivers_checking_sources">正在檢查 Banners-Turnip、WinNative 和 DroidDeck…</string> <string name="drivers_check_failed">檢查失敗</string> - - <!-- %1$s is the driver's name --> <string name="drivers_installed_pick_either">已安裝 %1$s - 在任一清單中選擇它即可同時設定兩個驅動程式</string> <string name="drivers_installed_pick">已安裝 %1$s - 請在選單中選擇</string> - <!-- Session (SessionActivity) --> <string name="session_wait_removal">請等待執行環境移除完成</string> - - <!-- Drawer title when the running program has no known name --> <string name="session_title_game">遊戲</string> - - <!-- Shown as "Auto (touchpad)" in the drawer's touch setting --> <string name="session_touch_auto_touchpad">觸控板</string> - - <!-- Shown as "Auto (direct)" in the drawer's touch setting --> <string name="session_touch_auto_direct">直接</string> <string name="session_swap_failed">換入失敗:%1$s</string> + <string name="session_profile_save_failed">設定檔儲存失敗:%1$s</string> <string name="session_desktop_paused">桌面已暫停</string> - - <!-- %1$s is the program's name --> <string name="session_named_paused">%1$s 已暫停</string> <string name="session_program_paused">程式已暫停</string> <string name="session_starting_desktop">正在啟動桌面</string> - - <!-- %1$s is the program's name --> <string name="session_starting_named">正在啟動 %1$s</string> <string name="session_starting_program">正在啟動程式</string> <string name="session_no_logs">此工作階段沒有日誌。</string> <string name="session_logs_archive_failed">無法建立工作階段日誌封存檔。</string> <string name="session_logs_share_failed">無法分享工作階段日誌。</string> <string name="session_starting_session">正在啟動工作階段…</string> - - <!-- Loading screen lines while packages download; %1$d and %2$d are megabytes --> <string name="session_runtime_downloading">正在下載 Linux 執行環境</string> <string name="session_runtime_downloading_mb">正在下載 Linux 執行環境 · %1$d/%2$d MB</string> <string name="session_runtime_checking">正在檢查 Linux 執行環境</string> @@ -1260,33 +1328,20 @@ <string name="session_proton_unpacking">正在解壓縮 Proton Experimental(ARM64)</string> <string name="session_runtime_catalog_unreachable">無法連線到執行環境目錄。請檢查網路連線,然後再按一次「執行」。</string> <string name="session_runtime_install_failed">Linux 執行環境未能安裝。請在「設定」中檢查執行環境,然後再按一次「執行」。</string> - - <!-- %1$s says what went wrong --> <string name="session_desktop_install_failed">桌面未能安裝(%1$s)。請檢查網路連線,然後再按一次「桌面」。</string> - - <!-- %1$s is the program's name, or Steam --> <string name="session_ended_named">%1$s 意外停止。請在錯誤報告中附上日誌,或再試一次。</string> <string name="session_ended_program">程式意外停止。請在錯誤報告中附上日誌,或再試一次。</string> <string name="session_ended_desktop">桌面意外停止。請在錯誤報告中附上日誌,或再試一次。</string> - - <!-- %1$d is the exit status, %2$s the log file's path --> <string name="session_ended_detail">結束狀態 %1$d · %2$s</string> <string name="session_ended_no_log">沒有日誌</string> - - <!-- %1$d errors; %2$s, %3$s and %4$s are the Performance page and its two settings --> <plurals name="session_hint_enosys"> <item quantity="other">日誌中出現 %1$d 個「Function not implemented」錯誤:proot 的 seccomp 加速在這部裝置上導致輔助程式失敗。請嘗試 %2$s →「%3$s」(或「%4$s」),然後重新啟動。</item> </plurals> - <!-- Screens, files, controller and store --> - - <!-- Mode settings --> <string name="mode_decky_plugins">外掛程式</string> <string name="mode_decky_plugins_hint">安裝外掛程式 ZIP,供下次 Steam 工作階段使用。</string> <string name="mode_decky_plugin_downloading">正在下載…</string> <string name="mode_decky_plugin_install_zip">從 ZIP 安裝</string> - - <!-- Store --> <string name="store_cat_games">遊戲</string> <string name="store_cat_audio_video">影音</string> <string name="store_cat_graphics">圖形</string> @@ -1299,28 +1354,14 @@ <string name="store_cat_utilities">工具程式</string> <string name="store_section_popular">熱門</string> <string name="store_section_trending">趨勢</string> - - <!-- Store front-page section of recently added apps --> <string name="store_section_new">最新上架</string> - - <!-- Store front-page section of recently updated apps --> <string name="store_section_updated">最近更新</string> <string name="store_section_loading">正在載入…</string> <string name="store_flatpak_setup">Flatpak 設定</string> - - <!-- %1$s is what failed (an app name or "Flatpak setup"), %2$s the error --> <string name="store_problem">%1$s:%2$s</string> <string name="store_updates_check_failed">無法從 Flathub 檢查更新</string> - - <!-- Library tiles --> - - <!-- Subtitle of a game tile whose cover art was found --> <string name="content_rom_installed">已安裝</string> - - <!-- Subtitle of a game that is a folder rather than a single file --> <string name="content_rom_folder">資料夾</string> - - <!-- Launcher themes --> <string name="theme_graphite">石墨</string> <string name="theme_graphite_detail">石墨色介面,選取、聚焦或按下的項目都使用標誌本身的球體藍。</string> <string name="theme_paper">黑底白紙</string> @@ -1329,8 +1370,6 @@ <string name="theme_icon_blue_detail">黑色背景、白色文字,選取、聚焦或按下的項目使用藍色。</string> <string name="theme_electric">電光藏青</string> <string name="theme_electric_detail">更亮的藍色,搭配偏藏青而非灰色的介面。</string> - - <!-- PC keyboard key caps (keep them short; they label physical PC keys) --> <string name="pckb_key_esc">Esc</string> <string name="pckb_key_ins">Ins</string> <string name="pckb_key_del">Del</string> @@ -1348,27 +1387,17 @@ <string name="pckb_key_alt">Alt</string> <string name="pckb_key_space">Space</string> <string name="pckb_key_altgr">AltGr</string> - - <!-- Terminal key strip on the second screen --> <string name="second_key_tab">Tab</string> - - <!-- A modifier key (%1$s, e.g. Ctrl) that is currently held --> <string name="second_key_on">%1$s ✓</string> <string name="second_key_ctrl_c">Ctrl+C</string> <string name="second_key_ctrl_d">Ctrl+D</string> - - <!-- Game file sync errors --> <string name="game_sync_err_runtime">請先安裝執行環境</string> <string name="game_sync_err_steam_library">無法使用 Steam 收藏庫</string> <string name="game_sync_err_previous_sd">無法使用先前的 SD 卡收藏庫</string> <string name="game_sync_err_game_storage">無法使用遊戲儲存空間</string> <string name="game_sync_err_added_games">無法使用已新增遊戲的資料夾</string> <string name="game_sync_err_manifests">無法使用 Steam 資訊清單</string> - - <!-- The systems RetroArch emulates, shown under its name --> <string name="content_system_many">多種主機</string> - - <!-- File manager --> <string name="fm_drive_internal">內部</string> <string name="fm_drive_linux">Linux 系統</string> <string name="fm_drive_sd">SD 卡</string> @@ -1386,8 +1415,6 @@ <string name="fm_no_favorites">還沒有我的最愛 - 透過資料夾的 ⋮ 選單釘選,即可快速回到這裡。</string> <string name="fm_unpin_favorite">從我的最愛移除</string> <string name="fm_size_zero">0 位元組</string> - - <!-- Size unit for sizes under 1 KB, shown after a number --> <string name="fm_unit_bytes">位元組</string> <string name="fm_prop_location">位置</string> <string name="fm_prop_type">類型</string> @@ -1395,8 +1422,6 @@ <string name="fm_prop_modified">修改日期</string> <string name="fm_type_folder">資料夾</string> <string name="fm_type_file">檔案</string> - - <!-- File type in Properties; %1$s is the file extension in capitals, e.g. TXT --> <string name="fm_type_ext_file">%1$s 檔案</string> <string name="fm_read_only">唯讀</string> <string name="fm_read_only_hint">防止遊戲(和 Wine)覆寫或刪除此檔案。</string> @@ -1410,19 +1435,11 @@ <string name="fm_delete_failed">刪除失敗</string> <string name="fm_op_moving">正在移動...</string> <string name="fm_op_copying">正在複製...</string> - - <!-- %1$s is the file name --> <string name="fm_op_moving_item">正在移動 - %1$s</string> <string name="fm_op_copying_item">正在複製 - %1$s</string> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_moving_batch">正在移動 %1$d/%2$d - %3$s</string> <string name="fm_op_copying_batch">正在複製 %1$d/%2$d - %3$s</string> - - <!-- Paste result; %1$d items done, %2$d items failed --> <string name="fm_paste_failed">%1$d 個完成,%2$d 個失敗</string> - - <!-- Paste result; %1$d items done, %2$d items skipped --> <string name="fm_paste_skipped">%1$d 個完成,%2$d 個略過</string> <plurals name="fm_paste_moved"> <item quantity="other">已移動 %1$d 個項目</item> @@ -1430,8 +1447,6 @@ <plurals name="fm_paste_copied"> <item quantity="other">已複製 %1$d 個項目</item> </plurals> - - <!-- %1$s is a file or folder name --> <string name="fm_already_exists">「%1$s」已存在</string> <string name="fm_op_renaming">正在重新命名...</string> <string name="fm_rename_failed">重新命名失敗</string> @@ -1442,20 +1457,14 @@ <string name="fm_create">建立</string> <string name="fm_new_name">新名稱</string> <string name="fm_delete_title">要刪除嗎?</string> - - <!-- %1$s is a file or folder name --> <string name="fm_delete_text">要永久刪除「%1$s」嗎?</string> <plurals name="fm_delete_items_title"> <item quantity="other">要刪除 %1$d 個項目嗎?</item> </plurals> <string name="fm_cannot_undo">此動作無法復原。</string> - - <!-- After a list of the first five names in a delete confirmation --> <plurals name="fm_and_more"> <item quantity="other">…及其他 %1$d 個</item> </plurals> - - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_deleting_batch">正在刪除 %1$d/%2$d - %3$s</string> <plurals name="fm_delete_some_failed"> <item quantity="other">有 %1$d 個無法刪除</item> @@ -1469,8 +1478,6 @@ <string name="fm_conflict_skip">略過</string> <string name="fm_select_this_folder">選擇此資料夾</string> <string name="fm_back">返回</string> - - <!-- %1$s is a storage name, e.g. SD card --> <string name="fm_drive_not_readable">%1$s 已掛載,但目前無法讀取</string> <string name="fm_list_view">清單檢視</string> <string name="fm_grid_view">格狀檢視</string> @@ -1485,51 +1492,31 @@ <string name="fm_hide_favorites">隱藏我的最愛</string> <string name="fm_show_favorites">顯示我的最愛</string> <string name="fm_filter_folder">篩選此資料夾</string> - - <!-- Free space on the storage being browsed; %1$s is a size, e.g. 12.50 GB --> <string name="fm_free_space">可用 %1$s</string> <string name="fm_selected_count">已選取 %1$d 個</string> - - <!-- Selection bar: clear the selection --> <string name="fm_select_none">全不選</string> - - <!-- Selection bar: select every item --> <string name="fm_select_all">全選</string> <string name="fm_paste">貼上</string> <plurals name="fm_items"> <item quantity="other">%1$d 個項目</item> </plurals> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_here">將 %1$s 貼到這裡</string> - - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_move_here">將 %1$s 移動到這裡</string> <string name="fm_rail_title">檔案</string> <string name="fm_rail_storage">儲存空間</string> - - <!-- Rail section of shortcut folders (Downloads, ROMs, …) --> <string name="fm_rail_quick">快速存取</string> <string name="fm_rail_favorites">我的最愛</string> <string name="fm_rail_downloads">下載</string> - - <!-- Downloads shortened to fit under an icon (about 8 characters) --> <string name="fm_rail_downloads_short">下載</string> <string name="fm_rail_roms">ROM</string> <string name="fm_rail_session_logs">工作階段日誌</string> <string name="fm_rail_pictures">圖片</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_added">已將「%1$s」加入我的最愛</string> - - <!-- %1$s is a folder name --> <string name="fm_favorite_removed">已將「%1$s」從我的最愛移除</string> <string name="fm_empty_directory">空的資料夾</string> <string name="fm_up_one_level">返回上一層</string> <string name="fm_choose_folder">選擇資料夾</string> <string name="fm_choose_file">選擇檔案</string> - - <!-- On-screen controller tint colors --> <string name="ctrl_tint_steam_blue">Steam 藍</string> <string name="ctrl_tint_sky">天藍</string> <string name="ctrl_tint_white">白色</string> @@ -1538,8 +1525,6 @@ <string name="ctrl_tint_amber">琥珀</string> <string name="ctrl_tint_red">紅色</string> <string name="ctrl_tint_pink">粉紅</string> - - <!-- On-screen buttons that can be remapped --> <string name="ctrl_button_a">A 按鈕</string> <string name="ctrl_button_b">B 按鈕</string> <string name="ctrl_button_x">X 按鈕</string> @@ -1550,34 +1535,21 @@ <string name="ctrl_button_rt">右扳機</string> <string name="ctrl_button_view">檢視按鈕</string> <string name="ctrl_button_menu">選單按鈕</string> - - <!-- What a remapped on-screen button sends; letters and Steam are controller button names --> - - <!-- Controller View button --> <string name="ctrl_target_view">檢視</string> - - <!-- Controller Menu button --> <string name="ctrl_target_menu">選單</string> <string name="ctrl_target_up">方向鍵上</string> <string name="ctrl_target_down">方向鍵下</string> <string name="ctrl_target_left">方向鍵左</string> <string name="ctrl_target_right">方向鍵右</string> - - <!-- The on-screen button is not shown --> <string name="ctrl_target_hidden">隱藏</string> <string name="ctrl_editor_drag">拖曳以移動</string> <string name="ctrl_editor_snap">對齊</string> <string name="ctrl_editor_save">儲存</string> - - <!-- What the second screen shows during a session --> <string name="second_mode_none">無</string> <string name="second_mode_keyboard_trackpad">鍵盤 + 觸控板</string> <string name="second_mode_terminal">終端機</string> <string name="second_mode_deck_controls">Deck 握把 + 觸控板</string> - <!-- Runtime, updates and setup helpers --> - - <!-- Linux runtime install / removal (LinuxRuntimeInstaller, RuntimeInstallService) --> <string name="rtinst_removing">正在移除 Linux 執行環境</string> <plurals name="rtinst_removing_entries"> <item quantity="other">正在移除 Linux 執行環境 · %1$d 個項目</item> @@ -1592,75 +1564,47 @@ <string name="rtinst_title_installing">正在安裝 Linux 執行環境</string> <string name="rtinst_title_removing">正在移除 Linux 執行環境</string> - <!-- Hosted desktop and emulator packages (DesktopCatalog) --> <string name="deskpkg_runtime_missing">尚未安裝 Linux 執行環境</string> - - <!-- %1$s: package name --> <string name="deskpkg_no_checksum">目錄中沒有 %1$s 的校驗碼</string> <string name="deskpkg_checksum_mismatch">校驗碼不符 - 未進行任何變更</string> - - <!-- %1$s: package name --> <string name="deskpkg_installing">正在安裝 %1$s</string> <string name="deskpkg_place_failed">無法放置 AppImage</string> <string name="deskpkg_extract_failed">解壓縮失敗</string> <string name="deskpkg_install_failed">安裝失敗</string> - <!-- Flatpak store operations (FlatpakManager) --> <string name="flatpakmgr_setup_failed">Flatpak 設定失敗(結束代碼 %1$d)</string> <string name="flatpakmgr_setup_unfinished">Flatpak 設定未完成</string> <string name="flatpakmgr_busy">另一個商店工作正在執行</string> <string name="flatpakmgr_not_ready">請先設定 Flatpak</string> <string name="flatpakmgr_starting">正在啟動</string> <string name="flatpakmgr_exit_status">Flatpak 已結束,狀態碼 %1$d</string> - - <!-- %1$s: an app or runtime name, e.g. "SuperTux" or "GNOME runtime 50" --> <string name="flatpakmgr_installing">正在安裝 %1$s</string> <string name="flatpakmgr_updating">正在更新 %1$s</string> <string name="flatpakmgr_removing">正在移除 %1$s</string> - - <!-- %1$s: an app or runtime name; %2$d of %3$d: this step and the number of steps --> <string name="flatpakmgr_installing_step">正在安裝 %1$s(%2$d/%3$d)</string> <string name="flatpakmgr_updating_step">正在更新 %1$s(%2$d/%3$d)</string> <string name="flatpakmgr_removing_step">正在移除 %1$s(%2$d/%3$d)</string> - - <!-- Names for Flatpak runtime parts, shown inside "Installing %1$s" --> <string name="flatpakmgr_ref_translations">翻譯</string> <string name="flatpakmgr_ref_graphics_drivers">圖形驅動程式</string> <string name="flatpakmgr_ref_media_codecs">媒體轉碼器</string> - - <!-- %1$s: runtime vendor, e.g. GNOME, KDE, Freedesktop --> <string name="flatpakmgr_ref_runtime">%1$s 執行環境</string> - - <!-- %1$s: runtime vendor, e.g. GNOME; %2$s: its version, e.g. 50 --> <string name="flatpakmgr_ref_runtime_branch">%1$s 執行環境 %2$s</string> - <!-- Imported AppImages (AppImageManager) --> <string name="appimg_too_small">檔案太小,不可能是 AppImage</string> - - <!-- %1$s: the system's reason --> <string name="appimg_unreadable">無法讀取檔案:%1$s</string> <string name="appimg_not_linux">這不是 AppImage(不是 Linux 程式)</string> <string name="appimg_wrong_arch">此 AppImage 既不是為 ARM64(aarch64)也不是為 x86 電腦組建的</string> <string name="appimg_not_appimage">這是 Linux 程式,但不是 AppImage</string> <string name="appimg_wrong_type">只能匯入第 2 型 AppImage(此檔案為第 %1$d 型)</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_import">可用空間不足:匯入需要約 %1$s</string> - - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_update">可用空間不足:更新需要約 %1$s</string> <string name="appimg_import_failed">匯入失敗</string> <string name="appimg_gone">該 AppImage 已不存在</string> <string name="appimg_update_failed">更新失敗</string> - - <!-- %1$s: file name --> <string name="appimg_extracting">正在解壓縮 %1$s</string> <string name="appimg_extract_failed">無法解壓縮 AppImage</string> - - <!-- %1$s: the last line the extractor printed --> <string name="appimg_extract_failed_detail">無法解壓縮 AppImage:%1$s</string> - <!-- Decky Loader and plugin installs (DeckyManager) --> <string name="deckymgr_stop_session_loader">安裝 Decky Loader 前,請先停止執行中的工作階段</string> <string name="deckymgr_download_failed">Decky Loader 下載失敗</string> <string name="deckymgr_size_mismatch">Decky Loader 的大小與發行版本中繼資料不符</string> @@ -1696,27 +1640,13 @@ <string name="deckymgr_remote_entry_invalid">remote_binary 項目無效</string> <string name="deckymgr_remote_name_invalid">遠端二進位檔名稱無效</string> <string name="deckymgr_remote_url_https">遠端二進位檔 URL 必須使用 HTTPS</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_remote_hash_invalid">遠端二進位檔 %1$s 的 SHA-256 雜湊值無效</string> <string name="deckymgr_bin_dir_failed">無法建立外掛程式的 bin 目錄</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_downloading_binary">正在下載外掛程式二進位檔 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_download_failed">無法下載外掛程式二進位檔 %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_checksum_mismatch">外掛程式二進位檔校驗碼不符 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_not_executable">無法將外掛程式二進位檔標示為可執行 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_replace_failed">無法取代外掛程式二進位檔 · %1$s</string> - - <!-- %1$s: binary file name --> <string name="deckymgr_binary_install_failed">無法安裝外掛程式二進位檔 · %1$s</string> <string name="deckymgr_folder_taken">外掛程式資料夾屬於另一個外掛程式</string> <string name="deckymgr_preserve_failed">無法保留現有的外掛程式</string> @@ -1724,24 +1654,14 @@ <string name="deckymgr_settings_failed">無法更新 Decky 外掛程式設定</string> <string name="deckymgr_restore_failed">無法還原現有的外掛程式</string> - <!-- Child-process limit change over Wireless debugging (WirelessAdbFix) --> <string name="adbfix_save_failed">無法儲存無線偵錯身分</string> - - <!-- %1$d: the command's exit status --> <string name="adbfix_command_failed">ADB 指令失敗(%1$d)</string> - - <!-- %1$s: what Android answered --> <string name="adbfix_not_confirmed">Android 未確認子處理程序限制已變更:%1$s</string> <string name="adbfix_no_pairing">尚未儲存任何無線偵錯配對</string> <string name="adbfix_enter_address">請輸入目前的無線偵錯 IP 位址和連接埠</string> - <!-- Wireless debugging pairing notification (WirelessAdbPairingService) --> <string name="adbpair_timed_out">等待配對彈出視窗逾時。請從 DroidDeck 再試一次。</string> - - <!-- %1$d: Android's error code --> <string name="adbpair_discovery_failed_code">無法尋找配對彈出視窗(%1$d)。請確認 Wi-Fi 已開啟。</string> - - <!-- %1$s: the system's reason --> <string name="adbpair_discovery_failed">無法尋找配對彈出視窗:%1$s</string> <string name="adbpair_six_digits">請輸入完整的 6 位數配對碼</string> <string name="adbpair_pairing">正在配對…</string> @@ -1751,35 +1671,26 @@ <string name="adbpair_applying">正在套用設定…</string> <string name="adbpair_command_failed">無線偵錯指令失敗</string> <string name="adbpair_channel_name">無線偵錯設定</string> - <string name="adbpair_channel_description">在「設定」開啟時要求輸入無線偵錯配對碼</string> + <string name="adbpair_channel_description">在「Android 設定」開啟時要求輸入無線偵錯配對碼</string> <string name="adbpair_title_pair">配對無線偵錯</string> <string name="adbpair_waiting_text">開啟無線偵錯,然後點擊「使用配對碼配對裝置」。</string> <string name="adbpair_waiting_long">開啟無線偵錯,然後點擊「使用配對碼配對裝置」。請留在「設定」中:配對碼要輸入在這則通知裡。</string> - - <!-- Label of the notification's reply field --> <string name="adbpair_code_label">6 位數配對碼</string> - <string name="adbpair_code_hint">點擊「輸入配對碼」,然後輸入「設定」中顯示的 6 位數字。</string> + <string name="adbpair_code_hint">點擊「輸入配對碼」,然後輸入「Android 設定」中顯示的 6 位數字。</string> <string name="adbpair_title_code">輸入 Wi-Fi 配對碼</string> <string name="adbpair_title_retry">請再次輸入配對碼</string> - - <!-- Notification action button --> <string name="adbpair_enter_code">輸入配對碼</string> <string name="adbpair_title_working">正在設定 Steam</string> <string name="adbpair_title_done">Steam 已就緒</string> <string name="adbpair_done_text">點擊即可返回 DroidDeck。現在可以關閉無線偵錯了。</string> <string name="adbpair_title_failed">無線偵錯設定已停止</string> - <!-- DroidDeck's own updates (SelfInstaller, AppUpdates) --> - <string name="selfinst_http">下載回應 HTTP %1$d</string> + <string name="selfinst_download_failed">下載失敗</string> <string name="selfinst_size_mismatch">下載的大小與發布的 APK 不符,已捨棄 - 請再試一次</string> <string name="selfinst_checksum_mismatch">下載的檔案與校驗碼不符,已捨棄 - 請再試一次</string> - - <!-- %1$s: the update's Android package name; %2$s: this app's --> <string name="selfinst_wrong_package">此更新適用於 Android 套件 %1$s,而非 %2$s</string> <string name="selfinst_metadata_signer">更新中繼資料未列出 DroidDeck 的發行簽署金鑰</string> <string name="selfinst_unreadable">Android 無法讀取下載的 APK</string> - - <!-- %1$s: the APK's Android package name; %2$s: this app's --> <string name="selfinst_apk_wrong_package">下載的 APK 適用於 %1$s,而非 %2$s</string> <string name="selfinst_version_mismatch">下載的 APK 標示 versionCode 為 %1$d,與發布的 %2$d 不符</string> <string name="selfinst_downgrade">Android 不會以 versionCode %1$d 覆蓋已安裝的 %2$d</string> @@ -1787,19 +1698,11 @@ <string name="selfinst_wrong_signer">下載的 APK 並非以 DroidDeck 的發行金鑰簽署</string> <string name="appupd_http">更新目錄回應 HTTP %1$d</string> - <!-- Session, GPU and display --> - - <!-- Session loading screen --> <string name="loadstate_starting">正在啟動工作階段…</string> - - <!-- %1$d minutes, %2$02d seconds since the session started --> <string name="loadstate_elapsed">已經過 %1$d:%2$02d · 仍在處理中</string> <string name="loadstate_steam_update">正在下載 Steam 用戶端更新 · %1$d%%</string> - - <!-- %1$s is the client's own download progress, as it prints it --> <string name="loadstate_steam_client">正在下載 Steam 用戶端 · %1$s</string> - <!-- Installing GE-Proton / proton-cachyos (%1$s is the tool's name, %2$s its release tag) --> <string name="pextra_busy">已有相容性工具正在安裝</string> <string name="pextra_stop_session">安裝相容性工具前,請先停止執行中的工作階段</string> <string name="pextra_no_release">找不到 %1$s 的 ARM64 發行版本</string> @@ -1816,55 +1719,38 @@ <string name="pextra_checksum_mismatch">校驗碼不符;已刪除下載內容</string> <string name="pextra_session_started">下載期間有工作階段啟動;請先停止它,再安裝相容性工具</string> <string name="pextra_installing">正在安裝 %1$s</string> - - <!-- %2$d is the installer's exit status --> <string name="pextra_install_failed">%1$s 安裝失敗(結束代碼 %2$d)</string> <string name="pextra_could_not_install">無法安裝 %1$s</string> <string name="esync_fetching">正在取得 droiddeck-esync 套件</string> - <!-- Components (FEX / DXVK / VKD3D-Proton swapped into a Proton). %1$s component, %2$s version, %3$s Proton --> <string name="cmgr_fex_linux_helpers">含 Linux 輔助程式</string> <string name="cmgr_fex_dlls_only">僅 DLL</string> <string name="cmgr_original_proton_updated">原始(上次換入後 Proton 已更新)</string> <string name="cmgr_changed_outside">已在「元件」之外變更</string> - - <!-- A component version that could not be found in a Proton --> <string name="cmgr_not_present">不存在</string> - - <!-- %1$s is the Proton build the original files were saved from --> <string name="cmgr_original_version">原始 %1$s</string> <string name="cmgr_original_from">原始版本來自 %1$s</string> <string name="cmgr_swap_queued">%1$s %2$s 會在 %3$s 上執行的遊戲關閉後換入。</string> <string name="cmgr_swap_done">%1$s %2$s 已換入 %3$s。下次啟動遊戲時生效。</string> <string name="cmgr_original_missing">未儲存該原始套件組合</string> - - <!-- %1$s component, %2$s Proton --> <string name="cmgr_restore_queued">%2$s 的 %1$s 會在其上執行的遊戲關閉後還原為原始版本。</string> - - <!-- %1$s component, %2$s Proton, %3$s the Proton build the original came from --> <string name="cmgr_restore_done">已從 %3$s 的原始版本還原 %2$s 的 %1$s。</string> - - <!-- %1$s package file, %2$s Proton id --> <string name="cmgr_package_in_use">%2$s 正在使用 %1$s。請先為該 Proton 換入其他版本。</string> <string name="cmgr_package_not_stored">未儲存 %1$s</string> <string name="cmgr_deleted">已刪除 %1$s。</string> <string name="cmgr_original_kept">已安裝組建的原始版本會保留,以便還原。</string> <string name="cmgr_not_stored">未儲存</string> - - <!-- %1$s Proton build, %2$s component --> <string name="cmgr_deleted_original">已刪除 %2$s 來自 %1$s 的原始版本。</string> <string name="cmgr_nightlies_only">只會從 Nightlies 發行版本下載</string> <string name="cmgr_list_predates_checksums">此套件清單早於校驗碼機制 - 請重新整理後再試一次</string> <string name="cmgr_checksum_mismatch">校驗碼不符</string> - <!-- Display choices --> <string name="sprefs_upscaler_linear">線性</string> <string name="sprefs_upscaler_nearest">最近鄰</string> <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR(品質)</string> <string name="sprefs_upscaler_sharpen">僅銳化</string> <string name="sprefs_lod_bias_auto">自動(依縮放)</string> - <!-- Screen effect Looks: preset names and the line under the row --> <string name="look_off_desc">未套用任何效果。</string> <string name="look_game_clarity">遊戲清晰</string> <string name="look_game_clarity_desc">銳化並稍微提高對比 - 適合日常使用。</string> @@ -1889,29 +1775,23 @@ <string name="look_anime_edge">動畫描邊</string> <string name="look_anime_edge_desc">卡通描邊加上銳化。</string> - <!-- GPU support line --> <string name="gpuinfo_not_adreno">不是 Adreno GPU</string> <string name="gpuinfo_supported">受支援</string> <string name="gpuinfo_experimental">實驗性:其驅動程式為測試版本</string> <string name="gpuinfo_below_tested">低於已測試的硬體(Adreno 725 及更新機型):可能無法執行</string> <string name="gpuinfo_unsupported">不受支援:DroidDeck 需要 Adreno(Snapdragon)GPU</string> - <!-- Driver downloads and imports --> <string name="turnip_rate_limited">已達 GitHub 速率限制 - 請稍後再試</string> <string name="turnip_github_http">GitHub 回應 HTTP %1$d</string> - <string name="turnip_download_http">下載回應 HTTP %1$d</string> + <string name="turnip_download_failed">下載失敗</string> <string name="turnip_list_predates_checksums">此驅動程式清單早於校驗碼機制 - 請重新整理後再試一次</string> <string name="turnip_checksum_mismatch">校驗碼不符 - 已捨棄下載內容</string> - - <!-- %1$s is one of the turnip_reject_* reasons --> <string name="turnip_not_adrenotools">不是 AdrenoTools 驅動程式:%1$s</string> <string name="turnip_reject_no_meta">沒有 meta.json</string> <string name="turnip_reject_meta_unreadable">無法讀取 meta.json(%1$s)</string> <string name="turnip_reject_linux_driver">這是 Linux 執行環境驅動程式(請在「執行環境驅動程式」下匯入)</string> <string name="turnip_reject_wayland">這是 Wayland 遊戲驅動程式,此應用程式用不到</string> <string name="turnip_reject_no_library_name">meta.json 未指定 libraryName,因此無法交給 AdrenoTools</string> - - <!-- %1$s is a library file name --> <string name="turnip_reject_library_missing">meta.json 指定了 %1$s,但 zip 中沒有此檔案</string> <string name="turnip_reject_not_aarch64">%1$s 不是 64 位元 AArch64 ELF 共用程式庫</string> <string name="turnip_reject_glibc">%1$s 連結 glibc - 這是「-Linux」Turnip,應放在「執行環境驅動程式」下</string> @@ -1922,115 +1802,61 @@ <string name="bundle_entry_outside">不是驅動程式套件組合:%1$s 指向組合外部</string> <string name="bundle_too_large">不是驅動程式套件組合:解壓縮後超過 %1$d MB</string> - <!-- Game storage --> <string name="gstore_sd_card">SD 卡</string> - - <!-- %1$s is a size, like 12.3 GB --> <string name="gstore_folder">資料夾</string> + <string name="logshare_chooser">分享工作階段日誌</string> - <!-- Stands in for the Steam account name when the client did not record one --> - - <!-- Why the HDR switch is greyed out --> <string name="hdr_needs_android_10">需要 Android 10 或更新版本(具備色彩空間的顯示圖層)</string> <string name="hdr_none">此顯示器未回報支援 HDR</string> - - <!-- %1$s lists HDR formats, like Dolby Vision, HDR10+ --> <string name="hdr_not_hdr10">此顯示器支援 %1$s,但不支援 HDR10</string> - <!-- Follow-up --> - - <!-- Stands in for the GPU name when the device does not report one --> <string name="gpu_this_gpu">此 GPU</string> <string name="phantom_title_on">子處理程序限制已開啟</string> <string name="phantom_title_unset">子處理程序限制未設定</string> <string name="phantom_title_unreadable">無法檢查子處理程序限制</string> <string name="phantom_title_off">子處理程序限制已關閉</string> <string name="phantom_title_not_required">不需要變更子處理程序限制</string> - - <!-- %1$s is the sentence saying how to turn the limit off on this device --> <string name="phantom_instructions_fix">%1$s 如果無法這麼做,請將此裝置連接到裝有 ADB 的電腦並執行下方指令,然後返回這裡重新檢查。</string> <string name="phantom_instructions_off">可以啟動 Steam 工作階段。</string> <string name="phantom_instructions_not_applicable">此 Android 版本不使用這項限制。</string> - <string name="phantom_fix_toggle">在開發人員選項中開啟「停用子處理程序限制」,之後請保持開發人員選項開啟。</string> + <string name="phantom_fix_toggle">在開發人員選項中開啟「停止限制子程序」,之後請保持開發人員選項開啟。</string> <string name="phantom_fix_no_toggle">此 Android 版本沒有這個開關。請使用無線偵錯,直接在此裝置上變更。</string> <string name="upd_block_no_apk">此組建版本沒有適用於此 DroidDeck 複本的下載檔案。</string> - - <!-- %1$d is the offered build's versionCode, %2$d the installed one's --> <string name="upd_block_version_code">Android 不會以此版本覆蓋目前的組建,因為它的 versionCode %1$d 低於已安裝的 %2$d。</string> <string name="upd_fail_downgrade">Android 不會以舊版本覆蓋新版本。請先留在此組建版本,等更新頻道趕上。</string> <string name="upd_fail_signature">此 DroidDeck 複本的簽章不同(是本機組建的嗎?),因此 Android 無法直接覆寫更新。</string> <string name="upd_fail_storage">可用空間不足,無法更新。</string> <string name="upd_fail_aborted">已取消更新。</string> - - <!-- %1$s is Android's own (English) installer message --> <string name="upd_fail_with_message">未能安裝更新:%1$s</string> <string name="upd_fail_generic">未能安裝更新。</string> - - <!-- A save zip's layout; %1$s is the app it comes from (GameHub, Winlator) --> <string name="saves_layout_zip">%1$s 壓縮檔</string> - - <!-- A save zip whose layout is not known --> <string name="saves_zip">壓縮檔</string> - - <!-- %1$s is the game's name --> <string name="saves_not_launched">%1$s 尚未啟動過</string> <string name="saves_none_found">找不到 %1$s 的存檔</string> - - <!-- %1$s is the zip's file name --> <string name="saves_not_save_zip">%1$s 中沒有 drive_c 資料夾,因此不是 GameHub 或 Winlator 存檔壓縮檔</string> - - <!-- %1$s is a folder path --> <string name="gstore_cannot_create">無法在 %1$s 中建立資料夾</string> <string name="gstore_cannot_write">無法寫入 %1$s</string> - - <!-- %1$s is a folder path, %2$s the system's error --> <string name="gstore_cannot_write_detail">無法寫入 %1$s(%2$s)</string> <string name="gfiles_folder_unavailable">無法使用資料夾</string> - - <!-- %1$s is a file name --> <string name="gfiles_name_taken">已有其他檔案使用 %1$s</string> <string name="gfiles_art_unavailable">無法使用圖片資料夾</string> <string name="gfiles_unrelated_inventory">資料夾中有不相關的同步清單</string> - - <!-- %1$s is a file name --> <string name="gfiles_remove_failed">無法移除 %1$s</string> <string name="gfiles_outside_folder">檔案位於匯出資料夾之外</string> - - <!-- A FEX build whose DLL carries no version name --> <string name="cmgr_fex_unnamed">FEX(未標示版本名稱的組建)</string> - - <!-- %1$s is a package file name --> <string name="cmgr_no_profile">%1$s 中沒有 profile.json</string> - - <!-- %1$s is a package file name, %2$s the type its profile.json gives --> <string name="cmgr_not_component_package">%1$s 不是 Linux 元件套件(類型 %2$s)</string> - - <!-- A storage volume in the second-library menu; %1$s is its name, %2$s its free space, like 12.3 GB --> <string name="gstore_volume_free">%1$s · 可用 %2$s</string> - - <!-- The second-library setting's value when it is automatic (short form of mode_storage_auto) --> <string name="mode_storage_auto_short">自動</string> - - <!-- %1$s is the technical reason, kept in English --> <string name="appupd_catalog_rejected">更新目錄未通過檢查(%1$s)</string> - - <!-- Label of the copied ADB command on the clipboard --> <string name="main_adb_clip_label">DroidDeck 子處理程序設定</string> - - <!-- Signed in, but the Steam client recorded no account name --> <string name="setup_signed_in_offline_unnamed">已登入 · 離線模式</string> <string name="setup_signed_in_unnamed">已登入</string> - - <!-- Small uppercase tags beside a driver's name: where it came from --> <string name="driver_tag_bundled">內建</string> <string name="driver_tag_downloaded">已下載</string> <string name="driver_tag_imported">已匯入</string> - - <!-- The driver is one half of a bundle that sets both drivers --> <string name="driver_tag_bundle">ANDROID + LINUX</string> - - <!-- %1$s is the limit's state (e.g. Child-process limit is on), %2$s what to do, %3$s the ADB command --> <string name="phantom_warning">%1$s。%2$s\n\n%3$s</string> <string name="display_session">工作階段顯示</string> <string name="display_resolution">解析度</string> @@ -2048,6 +1874,7 @@ <string name="display_frame_rate">影格率</string> <string name="display_look_filter">%1$s 將縮放設為 %2$s。</string> <string name="display_match_screen">符合螢幕(%1$d×%2$d)</string> + <string name="display_follow_screen">跟隨螢幕(摺疊或展開時調整大小)</string> <string name="mode_tab_steam">Steam</string> <string name="device_info_show">顯示裝置詳細資料</string> <string name="device_info_hide">隱藏裝置詳細資料</string> @@ -2057,6 +1884,213 @@ <string name="device_info_copied">已複製。</string> <string name="force_ssbs_title">強制 SSBS</string> <string name="force_ssbs_hint">讓一項 Wine 會不斷關閉的 CPU 速度設定保持開啟。在 Snapdragon 8 Elite 上可能讓 Windows 遊戲更快;在較舊的晶片上變化不大。下次啟動遊戲時生效。</string> + + <string name="rail_stores">遊戲商店</string> + <string name="source_steam">Steam</string> + <string name="source_added">自訂</string> + <string name="setup_stores">遊戲商店</string> + <string name="setup_stores_open_on">開啟商店時顯示</string> + <string name="setup_stores_speed">下載速度等級</string> + <string name="setup_stores_engine">商店引擎</string> + <string name="setup_stores_engine_chip_ready">● 引擎已就緒</string> + <string name="setup_stores_engine_chip_missing">尚未組建</string> + <string name="stores_tier_balanced">平衡</string> + <string name="stores_tier_fast">快速</string> + <string name="stores_tier_max">最高</string> + <string name="stores_title">遊戲商店</string> + <string name="stores_settings">遊戲商店設定</string> + <string name="stores_settings_eyebrow">設定</string> + <string name="stores_chip_signed_out">(未登入)</string> + <string name="stores_tab_store">商店</string> + <string name="stores_tab_installed">已安裝</string> + <string name="stores_tab_library">收藏庫</string> + <string name="stores_tab_all">全部</string> + <string name="stores_tab_downloads">下載</string> + <string name="stores_tab_count">%1$s(%2$d)</string> + <string name="stores_signin">登入</string> + <string name="stores_signout_named">%1$s · 登出</string> + <string name="stores_signout_title">要登出 %1$s 嗎?</string> + <string name="stores_signout_note">已安裝的遊戲會保留。重新登入後會再次取得你的收藏庫。</string> + <string name="stores_signout_stay">保持登入</string> + <string name="stores_signout_go">登出</string> + <string name="stores_search_catalog">搜尋 %1$s 目錄…</string> + <string name="stores_search_installed">搜尋已安裝的遊戲…</string> + <string name="stores_search_library">搜尋你的收藏庫…</string> + <string name="stores_search_open">搜尋</string> + <string name="stores_installed_empty">尚未安裝任何內容</string> + <string name="stores_library_loading">正在載入</string> + <string name="stores_nothing_matches">沒有遊戲</string> + <string name="stores_shelves_loading">正在載入商店…</string> + <string name="stores_amazon_no_catalog">沒有目錄</string> + <string name="stores_shelf_new">最新上架</string> + <string name="stores_shelf_deals">特惠</string> + <string name="stores_shelf_free">免費遊戲</string> + <string name="stores_shelf_trending">趨勢</string> + <string name="stores_shelf_library">你的收藏庫</string> + <string name="stores_play">執行</string> + <string name="stores_install">安裝</string> + <string name="stores_resume_install">繼續安裝</string> + <string name="stores_dl_interrupted">已中斷</string> + <string name="stores_install_size">安裝 · %1$s</string> + <string name="stores_get_free">免費取得</string> + <string name="stores_view_on">在 %1$s 檢視</string> + <string name="stores_buy_price">購買 · %1$s</string> + <string name="stores_installed_chip">已安裝</string> + <string name="stores_in_library">已在收藏庫中</string> + <string name="stores_free">免費</string> + <string name="stores_resume">繼續</string> + <string name="stores_refresh">重新整理</string> + <string name="stores_sort">排序</string> + <string name="stores_sort_last_played">最近遊玩</string> + <string name="stores_sort_recently_installed">最近安裝</string> + <string name="stores_sort_title_asc">標題 A–Z</string> + <string name="stores_sort_title_desc">標題 Z–A</string> + <string name="stores_sort_size_desc">大小: 由大到小</string> + <string name="stores_sort_size_asc">大小: 由小到大</string> + <string name="stores_sort_release_date">發行日期</string> + <string name="stores_view_list">列表檢視</string> + <string name="stores_view_cards">卡片檢視</string> + <string name="stores_show_mature">顯示成人內容</string> + <string name="epic_card_title">Epic</string> + <string name="epic_card_eos">EOS</string> + <string name="epic_card_offline">離線</string> + <string name="epic_card_none">關閉</string> + <string name="epic_eos">Epic 登入(EOS)</string> + <string name="epic_offline">離線啟動</string> + <string name="epic_resolve">解決 Epic 登入問題</string> + <string name="epic_client_version">版本 %1$s</string> + <string name="epic_client_no_runtime">請先安裝 Linux 執行環境</string> + <string name="epic_client_checking">正在檢查最新版本…</string> + <string name="epic_client_unpacking">正在解壓縮…</string> + <string name="epic_client_unreachable">下載伺服器沒有回應</string> + <string name="epic_client_needs_fex">Epic Games Launcher 需要 FEX,FEX 由 Steam 下載。請在 Steam 啟動後再次開啟啟動器。</string> + <string name="epic_client_download_failed">下載失敗:%1$s</string> + <string name="epic_client_unpack_failed">無法解壓縮啟動器:%1$s</string> + <string name="epic_client_sign_in_failed">Epic Games Launcher 沒有接受登入。請從啟動器重新啟動它。</string> + <string name="epic_client_uninstall_body">移除啟動器並釋放其空間。你的 Epic 遊戲會保持安裝並可正常運作,登入資訊也會保留,以便重新安裝時使用。</string> + <string name="epic_client_uninstall_stops">會先關閉正在執行的工作階段。</string> + <string name="epic_client_uninstalled">已解除安裝 Epic Games Launcher</string> + <string name="epic_client_uninstall_failed">部分啟動器檔案無法刪除。請再試一次。</string> + <string name="epic_client_uninstalling">請等待 Epic Games Launcher 解除安裝完成</string> + <string name="store_cloud_saves">雲端存檔</string> + <string name="cloud_upload">上傳到雲端</string> + <string name="cloud_download">從雲端下載</string> + <string name="cloud_none">沒有雲端存檔</string> + <string name="cloud_conflict">雲端衝突</string> + <string name="cloud_conflict_files">雲端衝突 · %1$d 個檔案</string> + <string name="cloud_pending">…</string> + <string name="cloud_keep_cloud">保留雲端版本</string> + <string name="cloud_keep_local">保留本機版本</string> + <string name="cloud_checking">正在檢查雲端…</string> + <string name="cloud_last_sync">上次同步:%1$s</string> + <string name="cloud_never">尚未同步</string> + <string name="cloud_done">%1$d 個檔案</string> + <string name="stores_eyebrow_installed">已安裝</string> + <string name="stores_eyebrow_library">在你的收藏庫中</string> + <string name="stores_eyebrow_store">商店</string> + <string name="achievements_title">成就</string> + <string name="achievements_count">已解鎖 %1$d / %2$d</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">已解鎖 · %1$d</string> + <string name="achievements_group_locked">未解鎖 · %1$d</string> + <string name="achievements_group_hidden">隱藏 · %1$d</string> + <string name="achievements_hidden">隱藏成就</string> + <string name="achievements_hidden_detail">解鎖後會顯示詳細資訊。</string> + <string name="achievements_all">已解鎖所有成就</string> + <string name="achievements_reading">正在讀取…</string> + <string name="achievements_signed_out">登入 %1$s 以查看你的成就。</string> + <string name="achievements_unreachable">無法連線到 %1$s。請在連上網路後再查看。</string> + <string name="achievements_none">%1$s 沒有列出這款遊戲的成就。</string> + <string name="achievements_show_all">顯示全部 %1$d 項</string> + <string name="achievements_dialog_title">成就 · %1$s</string> + <string name="stores_in_steam">✓ 已在 Steam 中</string> + <string name="stores_uninstall">解除安裝</string> + <string name="stores_uninstalling">正在解除安裝…</string> + <string name="stores_uninstall_title">要解除安裝 %1$s 嗎?</string> + <string name="stores_uninstall_body_size">將釋放 %1$s,並從 Steam 中移除。</string> + <string name="stores_uninstall_body">將移除其檔案和 Steam 捷徑。</string> + <string name="stores_launch_not_registered">Steam 下次啟動時會加入這款遊戲;請從 Steam 啟動,或立即啟動 Steam。</string> + <string name="stores_card_proton">Proton</string> + <string name="stores_card_proton_value">由 Steam 依遊戲選擇</string> + <string name="stores_card_audio">音訊</string> + <string name="stores_card_audio_value">DirectAudio</string> + <string name="stores_card_components">元件</string> + <string name="stores_card_components_value">FEX、DXVK、VKD3D</string> + <string name="stores_card_engine">引擎</string> + <string name="stores_card_engine_value">%1$s · 原生</string> + <string name="stores_card_engine_java">%1$s · 內建</string> + <string name="stores_how_it_runs">執行方式</string> + <string name="stores_kv_fetched">取得來源</string> + <string name="stores_kv_fetched_value">%1$s,使用你的帳號</string> + <string name="stores_kv_installed_to">安裝位置</string> + <string name="stores_kv_installed_to_value">遊戲儲存空間(Games/%1$s/%2$s)</string> + <string name="stores_kv_launched_by">啟動方式</string> + <string name="stores_kv_launched_by_value">透過 Steam 和 Proton,與 Steam 遊戲的方式相同</string> + <string name="stores_kv_launched_by_epic">Steam 和 Proton · 每次啟動時登入 Epic,EOS 重疊層關閉</string> + <string name="stores_kv_launched_by_amazon">Steam 和 Proton · 已設定 Amazon Games Services 變數</string> + <string name="stores_kv_steam">Steam</string> + <string name="stores_kv_steam_on">安裝時加入 Steam(Deck 介面 + Steam Input)</string> + <string name="stores_downloads_empty">沒有下載項目</string> + <string name="stores_dl_paused">已暫停</string> + <string name="stores_dl_queued">排隊中</string> + <string name="stores_dl_queued_at">排隊中 · #%1$d</string> + <string name="stores_dl_cancelled">已取消</string> + <string name="stores_dl_failed">失敗</string> + <string name="stores_dl_failed_reason">失敗 · %1$s</string> + <string name="stores_dl_stage_percent">%1$s · %2$d%%</string> + <string name="stores_dl_bytes">%1$s / %2$s · %3$d%%</string> + <string name="stores_dl_pause">暫停</string> + <string name="stores_dl_resume">繼續</string> + <string name="stores_dl_cancel">取消</string> + <string name="stores_dl_retry">重試</string> + <string name="stores_dl_clear">清除</string> + <string name="stores_dl_clear_all">清除已完成項目</string> + <string name="stores_stage_manifest">資訊清單</string> + <string name="stores_stage_download">下載</string> + <string name="stores_stage_verify">驗證</string> + <string name="stores_stage_install">安裝</string> + <string name="stores_stage_done">完成</string> + <string name="stores_stage_checking">正在檢查</string> + <string name="stores_stage_downloading">正在下載</string> + <string name="stores_dl_cancel_confirm">要刪除下載內容嗎?</string> + <string name="stores_dl_failed_kept">失敗 · 已保留 %1$s</string> + <string name="stores_stage_verifying">正在驗證</string> + <string name="stores_stage_installing">正在安裝</string> + <string name="stores_dl_active_percent">%1$s %2$d%%</string> + <string name="stores_dl_with">%1$s · %2$s</string> + <string name="stores_dl_amount">%1$s / %2$s</string> + <string name="stores_dl_items">%1$d/%2$d 個檔案</string> + <string name="stores_download_manager">下載管理員</string> + <string name="stores_parallel">同時下載數</string> + <string name="stores_install_where">安裝到</string> + <string name="stores_install_title">安裝 %1$s:</string> + <string name="stores_target_internal">內部</string> + <string name="stores_target_free">可用 %1$s</string> + <string name="stores_target_free_unknown">可用空間不明</string> + <string name="stores_storage_insufficient">可用空間不足:需要 %1$s,僅剩 %2$s</string> + <string name="stores_storage_low">空間不足(可用 %1$s,需要 %2$s)</string> + <string name="stores_notification_channel">商店下載</string> + <string name="stores_notification_channel_hint">顯示遊戲下載進度,並讓下載在背景持續進行</string> + <string name="stores_notification_one">正在下載</string> + <string name="stores_notification_many">%1$d 個下載項目</string> + <string name="stores_notification_waiting">正在準備…</string> + <string name="stores_notification_done_channel">已完成的商店下載</string> + <string name="stores_notification_installed">已安裝 %1$s</string> + <string name="stores_notification_failed">%1$s 下載失敗</string> + <string name="stores_notification_delete">刪除</string> + <string name="stores_notification_keep">保留</string> + <string name="stores_login_title">登入 %1$s</string> + <string name="stores_login_provider_title">使用你的服務商帳號登入</string> + <string name="stores_login_reload">重新載入</string> + <string name="stores_login_close">關閉</string> + <string name="stores_login_retry">再試一次</string> + <string name="stores_login_finishing">正在完成登入…</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> + <string name="stores_login_error_ssl">與登入頁面的連線不安全。</string> + <string name="stores_login_error_verification">無法驗證登入。請再試一次。</string> + <string name="stores_login_error_generic">登入失敗。請再試一次。</string> <string name="common_close">關閉</string> <string name="common_back">返回</string> <string name="common_edit">編輯</string> @@ -2070,6 +2104,21 @@ <string name="edit_other_exe">其他 exe…</string> <string name="edit_remove">移除</string> <string name="art_cover">封面</string> + <string name="art_wide_cover">寬封面</string> + <string name="art_adjust_logo">調整標誌</string> + <string name="logo_pos_default">預設</string> + <string name="logo_pos_upper_left">左上</string> + <string name="logo_pos_upper_center">中上</string> + <string name="logo_pos_center">置中</string> + <string name="logo_pos_bottom_left">左下</string> + <string name="logo_pos_bottom_center">中下</string> + <string name="logo_pos_position">位置</string> + <string name="logo_pos_size">大小</string> + <string name="logo_pos_save">儲存</string> + <string name="logo_pos_reset">還原預設</string> + <string name="logo_pos_hint">顯示在遊戲背景上,與 Steam 的繪製方式一致。實際位置可能相差幾個像素。</string> + <string name="logo_pos_no_logo">此遊戲尚無標誌。請在標誌中選擇一個,即可在此檢視。</string> + <string name="logo_pos_failed">無法儲存標誌位置。請再試一次。</string> <string name="art_background">背景</string> <string name="art_logo">標誌</string> <string name="art_icon">圖示</string> @@ -2082,10 +2131,732 @@ <string name="art_pick_image">選擇圖片…</string> <string name="art_pick_title">選擇圖片:%1$s</string> <string name="art_reset">重設為自動</string> + <string name="art_search_sgdb">搜尋 SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB:%1$s</string> + <string name="art_sgdb_search_label">搜尋遊戲</string> + <string name="art_sgdb_other_games">其他相符結果</string> + <string name="art_sgdb_none">找不到。</string> + <string name="art_sgdb_no_key">SteamGridDB 需要 API 金鑰。請在設定 › 啟動器中新增。</string> + <string name="art_sgdb_bad_key">SteamGridDB 未接受此 API 金鑰。請在設定 › 啟動器中檢查。</string> + <string name="art_sgdb_limit">SteamGridDB 目前受到請求限制。請稍後再試。</string> + <string name="art_sgdb_offline">無法連線至 SteamGridDB。請檢查網路連線。</string> + <string name="art_sgdb_server">SteamGridDB 發生問題。請稍後再試。</string> + <string name="art_sgdb_no_game">SteamGridDB 沒有此遊戲的相符項目。請改用搜尋。</string> <plurals name="games_added_n"> <item quantity="other">已新增 %1$d 個遊戲</item> </plurals> <plurals name="games_already_n"> <item quantity="other">%1$d 個已在遊戲中</item> </plurals> + <string name="hop_back">B · 返回%1$s</string> + <string name="hop_from_games">遊戲</string> + <string name="hop_from_play">執行設定</string> + <string name="sheet_graphics_drivers">圖形驅動程式</string> + <string name="comp_this_proton">此 Proton</string> + <string name="comp_every_proton">所有 Proton</string> + <string name="comp_for_every_proton">適用於所有 Proton</string> + <string name="comp_available_count">可用 · %1$d</string> + <string name="comp_checked">已檢查 %1$s</string> + <string name="comp_check_all">檢查新元件和驅動程式</string> + <string name="comp_get">取得</string> + <string name="comp_proton_bar">%1$s · 下方的 DXVK、VKD3D-Proton 和 FEX 屬於此 Proton</string> + <string name="comp_device_tested">%1$s · 已測試</string> + <string name="comp_device_untested">%1$s · 未測試</string> + <string name="comp_device_unsupported">%1$s · 不支援</string> + <string name="gpu_auto_keeps">讓建議的驅動程式組合保持最新</string> + <string name="gpu_bar_auto">自動 · %1$s</string> + <string name="gpu_separately">分別設定執行環境驅動程式和顯示驅動程式</string> + <string name="gpu_use_title">要使用 %1$s 嗎?</string> + <string name="gpu_mode_title">驅動程式的選擇方式</string> + <string name="gpu_mode_auto_detail">為此 GPU 自動選擇最佳組合並保持更新</string> + <string name="gpu_mode_pair">配對組合</string> + <string name="gpu_mode_pair_detail">選擇一組組合,同時設定兩個驅動程式</string> + <string name="gpu_mode_mix">自由搭配</string> + <string name="gpu_mode_mix_detail">分別選擇顯示驅動程式與執行環境驅動程式</string> + <string name="gpu_mode_pair_short">配對</string> + <string name="gpu_mode_mix_short">混合</string> + <string name="gpu_src_auto">自動</string> + <string name="gpu_src_pair">配對</string> + <string name="gpu_src_bundle">內建</string> + <string name="gpu_src_chosen">已選</string> + <string name="gpu_src_by_gpu">依 GPU</string> + <string name="gpu_src_default">預設</string> + <string name="gpu_display_live">正在繪製</string> + <string name="gpu_display_pending">等待重新啟動 · 目前由 %1$s 繪製</string> + <string name="gpu_runtime_live">正在執行</string> + <string name="gpu_runtime_pending">下次工作階段生效 · 本次工作階段繼續使用 %1$s</string> + <string name="gpu_display_next">負責繪製畫面。從下次工作階段起生效。</string> + <string name="gpu_previous_driver">上一個驅動程式</string> + <string name="gpu_restart_banner">重新啟動以切換顯示驅動程式。</string> + <string name="gpu_restart_blocked">請先停止執行中的工作階段,再重新啟動 DroidDeck 以切換顯示驅動程式。</string> + <string name="gpu_restart_now">立即重新啟動</string> + <string name="gpu_restart_later">稍後</string> + <string name="gpu_auto_title">已為你的 %1$s 自動選擇此組合</string> + <string name="gpu_auto_builtin_title">自動模式正為你的 %1$s 使用內建驅動程式</string> + <string name="gpu_auto_reason">為 %1$s 系列選擇。新版本會在背景安裝。</string> + <string name="gpu_pair_title">選擇組合</string> + <string name="gpu_pair_hint">組合會同時設定顯示驅動程式與執行環境驅動程式。</string> + <string name="gpu_mix_title">分別選擇驅動程式</string> + <string name="gpu_mix_hint">內建組合包會同時填入兩者。顯示驅動程式的變更在重新啟動後生效,執行環境驅動程式在下次工作階段生效。</string> + <string name="gpu_change_display">更換顯示驅動程式</string> + <string name="gpu_change_runtime">更換執行環境驅動程式</string> + <string name="gpu_autos_pick">自動選擇</string> + <string name="gpu_installed">已安裝</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · 重新啟動後生效</string> + <string name="gpu_chip_restart">%1$s · 等待重新啟動</string> + <string name="comp_this_device">此裝置</string> + <string name="proton_remove_title">要移除 %1$s 嗎?</string> + <string name="setup_tab_diagnostics">診斷</string> + <string name="setup_ready">已可開始遊戲</string> + <string name="setup_not_ready">尚未準備好開始遊戲</string> + <string name="setup_ready_runtime">執行環境 %1$s</string> + <string name="setup_ready_limit_off">處理程序限制已關閉</string> + <string name="setup_ready_signed_in">已登入為 %1$s</string> + <string name="setup_needs_you">需要你處理的項目</string> + <string name="setup_group_look">外觀</string> + <string name="setup_group_device">這部裝置</string> + <string name="setup_group_art">收藏庫圖片</string> + <string name="setup_group_download">下載</string> + <string name="setup_download_source">來源</string> + <string name="setup_download_source_auto">自動</string> + <string name="setup_download_source_direct">直連</string> + <string name="setup_download_source_mirror">鏡像</string> + <string name="setup_download_source_custom">自訂前綴</string> + <string name="setup_download_mirror">站點</string> + <string name="setup_download_prefix">前綴</string> + <string name="flathub_eyebrow">LINUX 應用程式</string> + <string name="flathub_name">Flathub</string> + <string name="flathub_line">適用於 Linux 桌面的應用程式,從「桌面」開啟。</string> + <string name="flathub_setup">設定 Flathub</string> + <string name="flathub_remove_title">要移除 %1$s 嗎?</string> + <string name="flathub_remove_note">其設定和檔案會保留。</string> + <string name="flathub_keep">保留</string> + <string name="desktop_size">佔用空間</string> + <string name="desktop_uninstall_title">要解除安裝桌面嗎?</string> + <string name="desktop_all_systems">全部</string> + <string name="gog_achievements">GOG 成就</string> + <string name="gog_achievements_hint">為支援的 GOG 遊戲同步成就。下次啟動時生效。</string> + <string name="gog_achievements_off">成就已關閉</string> + <string name="gog_achievements_on">成就已開啟</string> + <string name="gog_achievements_signin">重新登入 GOG</string> + <string name="gog_achievements_uploaded">成就已上傳</string> + <string name="gog_achievements_pending">成就上傳待處理</string> + <string name="gog_achievements_enable_store">在「商店」設定中開啟 GOG 成就</string> + <string name="gog_achievements_unavailable">成就無法使用;請查看工作階段記錄</string> + <string name="achievement_unlocked">成就已解鎖</string> + <string name="touch_paste">貼上</string> + <string name="touch_dpad">方向鍵</string> + <string name="touch_left_stick">左搖桿</string> + <string name="touch_right_stick">右搖桿</string> + <string name="touch_menu">選單</string> + <string name="touch_keyboard">鍵盤</string> + <string name="touch_dpad_up">方向鍵上</string> + <string name="touch_dpad_down">方向鍵下</string> + <string name="touch_dpad_left">方向鍵左</string> + <string name="touch_dpad_right">方向鍵右</string> + <string name="touch_title">觸控操作</string> + <string name="touch_controller">觸控控制器</string> + <string name="touch_mouse">滑鼠</string> + <string name="touch_on">開</string> + <string name="touch_off">關</string> + <string name="touch_speed_slow">慢</string> + <string name="touch_speed_normal">正常</string> + <string name="touch_speed_fast">快</string> + <string name="touch_edit_layout">編輯版面配置</string> + <string name="touch_droiddeck_menu">DroidDeck 選單</string> + <string name="touch_drag_hint">將控制項拖曳到畫面上</string> + <string name="touch_arrange">排列</string> + <string name="touch_discard">放棄</string> + <string name="touch_saving">儲存中…</string> + <string name="touch_icon">圖示</string> + <string name="touch_narrower">寬−</string> + <string name="touch_wider">寬+</string> + <string name="touch_shorter">高−</string> + <string name="touch_taller">高+</string> + <string name="touch_hide">隱藏</string> + <string name="touch_color_opacity">顏色與不透明度…</string> + <string name="touch_copy_layout">複製這個版面配置</string> + <string name="touch_layout_copied">版面配置已複製,可貼到任何遊戲的觸控版面配置中</string> + <string name="touch_paste_layout">貼上複製的版面配置</string> + <string name="touch_reset_layout">還原為 Steam 的預設值</string> + <string name="touch_no_binding">這個控制項在 Steam 中沒有綁定,無法設定圖示</string> + <string name="touch_icon_for">%1$s 的圖示</string> + <string name="touch_layout_color">觸控版面配置顏色</string> + <string name="touch_done">完成</string> + <string name="touch_save_failed">無法儲存觸控版面配置</string> + <string name="touch_saved">觸控版面配置已儲存至 Steam</string> + <string name="touch_app_id">應用程式 %1$d</string> + <string name="touch_label_hint">標籤(選用)</string> + <string name="touch_icons_missing">找不到 Steam 的圖示</string> + <plurals name="touch_icons_found"> + <item quantity="other">來自 Steam 的 %1$d 個圖示</item> + </plurals> + <string name="touch_icon_color">圖示顏色</string> + <string name="touch_button_color">按鈕顏色</string> + <string name="touch_no_icon">沒有圖示</string> + + <string name="stores_sync_sign_in">正在檢查登入狀態…</string> + <string name="stores_sync_library">正在取得你的遊戲庫…</string> + <string name="stores_sync_game_list">正在取得遊戲清單…</string> + <string name="stores_sync_details">正在載入遊戲詳細資料…(%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="other">正在同步 %1$d 個遊戲…</item> + </plurals> + <string name="stores_sync_progress">正在同步… %1$d/%2$d</string> + <string name="stores_sync_cover_art">正在取得封面圖片…</string> + <string name="stores_sync_failed">同步失敗</string> + <string name="stores_sync_no_games">在你的 %1$s 遊戲庫中找不到遊戲</string> + <string name="stores_sync_amazon_no_answer">Amazon Games 未回應你的遊戲庫要求:請重新整理,或重新登入</string> + <string name="stores_sync_gog_unreachable">無法連線到 GOG</string> + <string name="stores_sync_gog_unreadable">無法讀取你的 GOG 遊戲庫</string> + <string name="stores_registering">正在向 Steam 註冊…</string> + <string name="mode_client_arch">Steam 用戶端</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC 診斷</string> + <string name="setup_vac_diag_hint">Source 遊戲會記錄主控台(-condebug);工作階段日誌中的 vac.txt 會顯示是否安全</string> + <string name="load_starting_steam_x64">正在啟動 Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">由 x86-64 Steam 用戶端使用</string> + <string name="storage_uninstall_in_x64">此副本位於 x86-64 Steam 用戶端中。請在「Steam 用戶端」中選擇 x86-64,然後在此解除安裝。</string> + <string name="storage_uninstall_in_arm64">此副本位於 ARM64 Steam 用戶端中。請在「Steam 用戶端」中選擇 ARM64,然後在此解除安裝。</string> + <string name="drawer_page_glasses">眼鏡</string> + <string name="glasses_open">VITURE 眼鏡</string> + <string name="glasses_control">眼鏡控制</string> + <string name="glasses_driver_missing">這個版本未包含這副眼鏡的驅動程式。</string> + <string name="glasses_connection_failed">無法連線到眼鏡。請重新插上傳輸線,或點擊「允許」重試。</string> + <string name="glasses_allow">允許</string> + <string name="glasses_allow_hint">允許 DroidDeck 設定眼鏡的更新率、3D 模式、亮度、音量和遮光,並讀取其頭部追蹤。</string> + <string name="glasses_asking">正在等待你在 Android 提示中允許…</string> + <string name="glasses_denied">控制已被拒絕。允許後才能變更眼鏡設定。</string> + <string name="glasses_no_control">這副眼鏡可以顯示遊戲,但無法在此變更其設定。</string> + <string name="glasses_output">輸出</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">在眼鏡上顯示遊戲</string> + <string name="glasses_game_on_hint">只在眼鏡上顯示遊戲。關閉:由手機顯示,Android 會鏡像手機畫面。</string> + <string name="glasses_display">顯示</string> + <string name="glasses_refresh">更新率</string> + <string name="glasses_3d">3D(左右並排)</string> + <string name="glasses_3d_hint">將智慧眼鏡切換至並排 3D 模式。頭部追蹤單獨控制。</string> + <string name="glasses_3d_failed">未能確認 3D 訊號。請在 2D 畫面恢復後再試。</string> + <string name="glasses_no_signal">沒有畫面:眼鏡處於這支手機無法輸出的模式。請長按眼鏡的 2D/3D 按鈕,或拔除後重新連接。</string> + <string name="glasses_3d_refresh">3D 更新率</string> + <string name="glasses_auto3d">VR 遊戲使用 3D</string> + <string name="glasses_auto3d_hint">SteamVR 執行時切換到 3D,結束後切回。</string> + <string name="glasses_picture">圖片</string> + <string name="glasses_picture_hint">自動模式會在雙眼顯示平面內容並偵測 SteamVR。選擇「並排遊戲」模式可顯示 SBS 內容。</string> + <string name="glasses_picture_auto">自動</string> + <string name="glasses_picture_screen">虛擬螢幕</string> + <string name="glasses_picture_sbs">左右並排遊戲</string> + <string name="glasses_screen_size">螢幕寬度</string> + <string name="glasses_screen_distance">螢幕距離</string> + <string name="glasses_screen_next_session">當遊戲以虛擬螢幕形式在眼鏡上執行時,寬度和距離才會生效。</string> + <string name="glasses_screen_no_output">這些設定會在開啟「在眼鏡上顯示遊戲」且遊戲顯示於眼鏡上時生效。</string> + <string name="glasses_screen_flat_hint">「自動」會讓這款 2D 遊戲全螢幕顯示。使用虛擬螢幕即可調整其寬度、距離和頭部追蹤。</string> + <string name="glasses_screen_use">使用虛擬螢幕</string> + <string name="glasses_screen_direct_hint">SteamVR 將充滿整個視野。在 VR 中調整其視野範圍;寬度和距離僅適用於虛擬螢幕。</string> + <string name="glasses_screen_sbs_hint">左右並排遊戲會填滿每隻眼睛的視野。寬度和距離只適用於虛擬螢幕。</string> + <string name="glasses_tracking_flat_hint">「自動」會讓這款 2D 遊戲固定在視野中。如要使用頭部追蹤,請在「顯示」中選擇「虛擬螢幕」。</string> + <string name="glasses_tracking_sbs_hint">頭部追蹤適用於虛擬螢幕或執行中的 SteamVR 遊戲。</string> + <string name="glasses_hardware">設備</string> + <string name="glasses_brightness">亮度</string> + <string name="glasses_volume">音量</string> + <string name="glasses_sunblock">遮光</string> + <string name="glasses_sunblock_hint">讓前鏡片變暗。</string> + <string name="glasses_tracking">追蹤</string> + <string name="glasses_head_tracking">頭部追蹤</string> + <string name="glasses_head_tracking_hint">眼鏡內建的感測器會隨頭部轉動虛擬螢幕和 SteamVR。</string> + <string name="glasses_recenter">重新置中視角</string> + <string name="glasses_recenter_button">重設螢幕中心</string> + <string name="glasses_vr_fov">SteamVR 視野角度</string> + <string name="glasses_vr_fov_hint">調低讓 SteamVR 更近並填滿眼鏡;調高可看到更多周圍內容。</string> + <string name="glasses_playing">正在 %1$s 上遊玩</string> + <string name="glasses_calibration">追蹤校正</string> + <string name="glasses_calibration_hint">減少漂移並對齊水平基準。</string> + <string name="glasses_calibration_saved_hint">這副眼鏡已套用儲存的校正資料。</string> + <string name="glasses_calibration_open">校正</string> + <string name="glasses_calibration_instructions">將已連接的眼鏡上下顛倒放在水平面上,讓鏡框平穩貼合。點擊「開始」,然後約 8 秒內不要碰觸。只要移動,測量就會重新開始。這項操作會校正漂移和傾斜,但不校正朝向。</string> + <string name="glasses_calibration_settling">請保持眼鏡上下顛倒且不要碰觸。正在等待眼鏡靜止…</string> + <string name="glasses_calibration_collecting">正在測量感測器。請保持眼鏡靜止。</string> + <string name="glasses_calibration_moving">偵測到移動。請勿碰觸眼鏡;測量會自動重新開始。</string> + <string name="glasses_calibration_turn_over">請將眼鏡上下顛倒放在水平面上。放置正確後就會開始測量。</string> + <string name="glasses_calibration_complete">校正已儲存。戴上眼鏡並直視前方,然後點擊「完成」以重新置中。</string> + <string name="glasses_calibration_failed">無法完成校正。請檢查連線並保持眼鏡靜止,然後再試一次。先前的校正不受影響。</string> + <string name="glasses_calibration_start">開始</string> + <string name="glasses_calibration_done">完成</string> + <string name="glasses_calibration_reset">重設追蹤校正</string> + <string name="glasses_calibration_reset_hint">要移除已儲存的校正並還原此型號的預設值嗎?重新戴上眼鏡後請重新置中。</string> + <string name="glasses_calibration_reset_button">重設</string> + <string name="hand_camera_group">手部追蹤</string> + <string name="hand_camera_prompt_title">使用手機相機追蹤手部或 Joy-Con 控制器?</string> + <string name="hand_camera_prompt_body">未連接控制器時,手機相機會在 VR 中追蹤您的裸手:拇指和食指捏合即可點擊,握緊拳頭即可抓取,掌心朝向自己並捏合即可打開選單。連接 Joy-Con 控制器後,相機會追蹤其位置,同時 Joy-Con 控制器會提供旋轉和按鍵輸入。照片會在本設備上處理,不會儲存或傳送。</string> + <string name="hand_camera_rear">後置相機</string> + <string name="hand_camera_rear_hint">建議使用。通常更清晰、視野更廣。</string> + <string name="hand_camera_front">前置相機</string> + <string name="hand_camera_front_hint">適用於裝置背面無法朝向你的情況。</string> + <string name="hand_camera_allow">使用相機</string> + <string name="hand_camera_not_now">暫時不要</string> + <string name="hand_camera_setting">相機手部追蹤</string> + <string name="hand_camera_setting_hint">使用手機相機進行徒手手勢操作或在 VR 中定位已配對的 Joy-Con 控制器。 Joy-Con 控制器提供旋轉和按鍵輸入。當智慧眼鏡追蹤您的手或 Joy-Con 控制器時,此功能會暫停。影像僅在此裝置上處理。</string> + <string name="hand_camera_choice">相機</string> + <string name="hand_camera_access">相機權限</string> + <string name="hand_camera_access_hint">請允許相機權限,才能開始手部追蹤。</string> + <string name="hand_camera_access_denied">相機權限已關閉。請在 Android 設定中開啟。</string> + <string name="hand_camera_allow_button">允許</string> + <string name="hand_camera_open_settings">開啟設定</string> + <string name="hand_camera_placement">相機位置</string> + <string name="hand_camera_placement_hint">開始遊玩前,請確認相機能看到你。</string> + <string name="hand_camera_check">檢查</string> + <string name="hand_camera_check_title">相機位置</string> + <string name="hand_camera_how_rear">將裝置立在距離 1.5 到 2 公尺、約胸口高度的地方,讓後置相機對著你。然後張開雙手走進畫面。</string> + <string name="hand_camera_how_front">將裝置立在距離 1.5 到 2 公尺、約胸口高度的地方,讓螢幕對著你。然後張開雙手走進畫面。</string> + <string name="hand_camera_starting">正在啟動相機…</string> + <string name="hand_camera_stand_up">裝置平放著。請將它立起來,讓相機對著你。</string> + <string name="hand_camera_upright">請把裝置立得更直一點,讓相機對著你。</string> + <string name="hand_camera_not_seen">還看不到你。請走進畫面,讓頭和肩膀露出來。</string> + <string name="hand_camera_move_back">請稍微往後退一點。</string> + <string name="hand_camera_move_closer">請再靠近一點。</string> + <string name="hand_camera_show_hands">請在相機能看到的位置伸出雙手。</string> + <string name="hand_camera_good">看起來不錯。</string> + <string name="hand_camera_failed">相機無法啟動。請關閉正在使用相機的其他應用程式,然後再試一次。</string> + <string name="hand_camera_switch">切換相機</string> + <string name="hand_camera_skip">略過</string> + <string name="hand_camera_done">完成</string> + <string name="glasses_xreal_network_missing">正在等待眼鏡的 USB Ethernet 連線。這支手機可能不會向應用程式開放此連線。</string> + <string name="glasses_xreal_connection_failed">XREAL 連線中斷或傳回不支援的回應。正在重試…</string> + <string name="glasses_xreal_experimental">實驗性 1S 支援。請在眼鏡選單中使用跟隨模式並關閉畫面穩定。追蹤方向和顯示模式仍需在實機上測試。</string> + <string name="stores_fact_developer">開發商</string> + <string name="stores_fact_publisher">發行商</string> + <string name="stores_fact_released">發行日期</string> + <string name="stores_hltb_main">主線</string> + <string name="stores_hltb_extras">+ 支線</string> + <string name="stores_hltb_completionist">全收集</string> + <string name="stores_hltb_hours">%1$s 小時</string> + <string name="stores_hltb_minutes">%1$d 分鐘</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard 模式</string> + <string name="cardboard_mode_hint">為手機 VR 眼鏡提供左右眼畫面。</string> + <string name="cardboard_source">畫面</string> + <string name="cardboard_source_screen">虛擬螢幕</string> + <string name="cardboard_source_sbs">左右並排 3D</string> + <string name="cardboard_viewer">眼鏡</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard(2014)</string> + <string name="cardboard_viewer_none">無鏡片</string> + <string name="cardboard_ipd">瞳距</string> + <string name="cardboard_screen_width">螢幕寬度</string> + <string name="cardboard_screen_distance">螢幕距離</string> + <string name="cardboard_head_tracking">頭部追蹤</string> + <string name="cardboard_no_sensor">這部裝置沒有旋轉感測器。</string> + <string name="cardboard_recenter">重設視角</string> + <string name="cardboard_recenter_button">重設</string> + <string name="cardboard_steamvr">SteamVR(實驗性)</string> + <string name="cardboard_steamvr_install">安裝</string> + <string name="cardboard_steamvr_installing">正在下載並解壓縮 SteamVR…</string> + <string name="cardboard_steamvr_start">啟動</string> + <string name="cardboard_steamvr_stop">停止</string> + <string name="cardboard_steamvr_unavailable">這個工作階段無法使用。</string> + <string name="cardboard_steamvr_failed">SteamVR 沒有回應;請查看工作階段記錄。</string> + <string name="drawer_component_downloads">下載元件</string> + <string name="drawer_component_downloads_hint">下載內容與「元件」頁面共用。在上方選擇已下載的版本,即可在下次啟動遊戲時使用。</string> + <string name="drawer_component_choose_download">選擇要下載的版本</string> + <string name="display_picture_position">畫面位置</string> + <string name="display_position_top">置頂</string> + <string name="display_position_bottom">置底</string> + <string name="display_position_center">置中(預設)</string> + <string name="setup_tab_storage">儲存空間</string> + <string name="storage_measuring">正在統計儲存空間…</string> + <string name="storage_measuring_hint">首次統計需要幾秒鐘。</string> + <string name="storage_internal">內部儲存空間</string> + <string name="storage_used_of">已用 %1$s / %2$s</string> + <string name="storage_free">可用 %1$s</string> + <string name="storage_droiddeck_uses">DroidDeck 使用 %1$s。統計時間 %2$s。</string> + <string name="storage_rescanning">正在重新統計…</string> + <string name="storage_other_apps">其他 Android 應用程式</string> + <string name="storage_safe_now">現在可安全釋放</string> + <string name="storage_safe_hint">未使用的執行環境、殘留、舊日誌</string> + <string name="storage_clean_up">清理…</string> + <string name="storage_session_running">停止工作階段後才能清理或移除。容量仍會顯示。</string> + <string name="storage_where">空間去向</string> + <string name="storage_games">Steam 遊戲</string> + <string name="storage_game_data">遊戲資料</string> + <string name="storage_game_data_hint">前綴 %1$s · 工作坊 %2$s · 著色器 %3$s</string> + <string name="storage_tools">Proton 與執行環境</string> + <string name="storage_tools_unused">%1$s 未使用</string> + <string name="storage_stores">GOG、Epic 及其他商店</string> + <string name="storage_stores_hint">在商店中解除安裝</string> + <string name="storage_desktop">桌面應用程式</string> + <string name="storage_desktop_hint">Flatpak 應用程式與執行環境</string> + <string name="storage_system">Linux 系統與 Steam 用戶端</string> + <string name="storage_system_hint">執行任何內容所必需</string> + <string name="storage_app_data">DroidDeck 資料</string> + <string name="storage_app_data_hint">舊工作階段日誌 %1$s · 快取 · 驅動程式</string> + <string name="storage_legend_games">遊戲</string> + <string name="storage_legend_data">遊戲資料</string> + <string name="storage_legend_tools">Proton 與執行環境</string> + <string name="storage_legend_stores">其他商店</string> + <string name="storage_legend_desktop">桌面應用程式</string> + <string name="storage_legend_system">Linux 系統</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">清理</string> + <string name="storage_clean_up_lede">此處不會影響已安裝的遊戲或進行中的下載。</string> + <string name="storage_nothing_to_clean">目前沒有可清理的內容。</string> + <string name="storage_selected">已選:%1$s · %2$s → 可用 %3$s</string> + <string name="storage_cleaning">正在清理…</string> + <string name="storage_free_button">釋放 %1$s</string> + <string name="storage_freed">已釋放 %1$s。</string> + <string name="storage_item_runtimes">未使用的 Steam 執行環境與 Proton</string> + <string name="storage_item_leftovers">已解除安裝遊戲的殘留</string> + <string name="storage_item_leftovers_unsure">可能含存檔的殘留</string> + <string name="storage_item_logs">舊工作階段日誌</string> + <string name="storage_item_logs_detail">保留目前工作階段的日誌</string> + <string name="storage_item_custom_detail">沒有遊戲使用它。如需使用,請在元件中重新安裝。</string> + <string name="storage_item_shaders">已安裝遊戲的著色器快取</string> + <string name="storage_item_shaders_detail">會隨著遊玩重新產生。每個遊戲開頭幾分鐘會再次卡頓。</string> + <string name="storage_tag_safe">安全</string> + <string name="storage_tag_unused">未使用</string> + <string name="storage_tag_stutter">卡頓</string> + <string name="storage_tag_saves">檢查存檔</string> + <string name="storage_tag_default">預設</string> + <string name="storage_tag_required">必需</string> + <string name="storage_tag_not_used">未使用</string> + <string name="storage_back">儲存空間</string> + <string name="storage_games_with_data">%1$s 及其資料</string> + <string name="storage_sort_largest">最大</string> + <string name="storage_sort_least_played">最少遊玩</string> + <string name="storage_sort_sd">在 SD 卡上</string> + <string name="storage_no_games">此處沒有遊戲。</string> + <string name="storage_played">遊玩 %1$s</string> + <string name="storage_never_played">從未遊玩</string> + <string name="storage_game_parts">遊戲 %1$s · 資料 %2$s</string> + <string name="storage_uninstall">解除安裝</string> + <string name="storage_games_note">解除安裝會開啟 Steam 內建的對話方塊,以便 Steam 記錄。若要將遊戲移到 SD 卡,請使用 Steam › 設定 › 儲存空間。</string> + <string name="storage_uninstall_title">要解除安裝 %1$s 嗎?</string> + <string name="storage_uninstall_body">Steam 會開啟並要求確認。這會釋放此遊戲的 %1$s。其前綴會保留到清理殘留時,Steam 雲端存檔仍留在你的帳號中。</string> + <string name="storage_open_steam">開啟 Steam</string> + <string name="storage_tools_detail">%1$s · %2$s 未使用</string> + <string name="storage_remove_unused">移除未使用 · %1$s</string> + <string name="storage_in_use">使用中</string> + <string name="storage_not_used">未使用</string> + <string name="storage_remove">移除</string> + <string name="storage_remove_title">要移除 %1$s 嗎?</string> + <string name="storage_remove_body">釋放 %1$s。若之後有遊戲需要,Steam 會重新下載。</string> + <string name="storage_tool_fex_runtime">Linux x86 遊戲所需(FEX)</string> + <string name="storage_tool_arm_runtime">ARM64 Proton 所需</string> + <string name="storage_tool_redist">遊戲要求的 VC++ 與 DirectX 安裝程式</string> + <string name="storage_tool_fex">執行 Linux x86 遊戲</string> + <string name="storage_tool_steam">Steam 工具</string> + <string name="storage_tool_old_runtime">DroidDeck 不需要此執行環境即可執行遊戲</string> + <string name="storage_tool_x86_proton">x86 Proton,DroidDeck 無法執行</string> + <string name="storage_tool_custom_default">所有遊戲的預設項目</string> + <string name="storage_tool_custom_unused">沒有遊戲使用它</string> + <string name="storage_tool_custom_unknown">無法讀取 Steam 的設定,因此保留</string> + <string name="storage_cleanup_busy">請等待儲存空間清理完成</string> + <string name="storage_low_title">僅剩 %1$s 可用</string> + <string name="storage_low_body">Steam 需要空間用於更新與著色器快取。低於 10 GB 時,遊戲更新可能中途失敗。</string> + <string name="storage_low_safe">%1$s 可安全釋放。</string> + <string name="storage_free_up">釋放空間</string> + <string name="storage_play_anyway">仍要遊玩</string> + <plurals name="storage_games_installed"> + <item quantity="one">已安裝 %d 個</item> + <item quantity="other">已安裝 %d 個</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d 個在 SD 卡上</item> + <item quantity="other">%d 個在 SD 卡上</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d 個工具</item> + <item quantity="other">%d 個工具</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">%d 個遊戲的空前綴資料夾與著色器快取</item> + <item quantity="other">%d 個遊戲的空前綴資料夾與著色器快取</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">%d 個遊戲的前綴仍含檔案,其中可能有本機存檔。如需保留請先備份。</item> + <item quantity="other">%d 個遊戲的前綴仍含檔案,其中可能有本機存檔。如需保留請先備份。</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d 個遊戲</item> + <item quantity="other">%d 個遊戲</item> + </plurals> + <string name="storage_tool_default_proton">DroidDeck 的預設 Proton</string> + <string name="storage_tool_proton">DroidDeck 的 Proton 11 選項</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">%d 個遊戲使用</item> + <item quantity="other">%d 個遊戲使用</item> + </plurals> + <string name="storage_legend_components">元件</string> + <string name="storage_components">元件</string> + <string name="storage_item_components">未使用的元件</string> + <string name="storage_component_original">原始 %1$s · %2$s</string> + <string name="storage_original_confirm">釋放 %1$s。它只會還原一個已不再安裝的 Proton 版本。</string> + <string name="storage_leftovers_unchecked">未檢查:無法讀取某個 Steam 應用程式清單,因此在可讀取前會保留已解除安裝遊戲的前綴。</string> + <string name="storage_failed">未能完成:%1$s</string> + <string name="storage_desktop_shared">共用 %1$s</string> + <string name="storage_data_installed">已安裝遊戲</string> + <string name="storage_data_parts">前綴 %1$s · 著色器 %2$s · 工作坊 %3$s</string> + <string name="storage_clear_shaders">清除著色器</string> + <string name="storage_data_leftovers">已解除安裝遊戲</string> + <string name="storage_steam_app">Steam 應用程式 %1$d</string> + <string name="storage_leftover_unsure_detail">其前綴仍含檔案,其中可能有本機存檔</string> + <string name="storage_leftover_confirm">刪除其 Wine 前綴與著色器快取(%1$s)。請先備份需要的存檔;Steam 雲端存檔仍留在你的帳號中。</string> + <string name="storage_data_other">保留</string> + <string name="storage_data_other_title">非 Steam 遊戲與 Steam 的共用前綴</string> + <string name="storage_data_other_detail">從商店或手動新增的遊戲的前綴</string> + <string name="storage_components_packages">已下載的套件</string> + <string name="storage_components_originals">已儲存的原始檔案</string> + <string name="storage_components_none">沒有已下載的元件套件。</string> + <string name="storage_component_in_use">已為某個 Proton 或遊戲選取</string> + <string name="storage_component_unused">未在任何地方選取</string> + <string name="storage_original_kept">還原已安裝的 Proton</string> + <string name="storage_original_old">不再安裝的 Proton 版本</string> + <string name="storage_tag_in_use">使用中</string> + <string name="storage_components_note">使用中的元件會被鎖定。請在元件中選取它們;在此移除的內容可以在那裡重新下載。</string> + <string name="storage_component_confirm">釋放 %1$s。你自己匯入的套件無法再次下載。</string> + <string name="storage_desktop_detail">%1$s,用於 Flatpak 應用程式及其共用內容</string> + <string name="storage_desktop_apps_title">應用程式</string> + <string name="storage_desktop_none">未安裝 Flatpak 應用程式。</string> + <string name="storage_desktop_shared_title">應用程式共用</string> + <string name="storage_desktop_runtimes">執行環境</string> + <string name="storage_desktop_runtimes_detail">應用程式所依賴的程式庫;未使用的會隨「移除未使用」一併清理</string> + <string name="storage_desktop_cache">下載倉庫</string> + <string name="storage_desktop_cache_detail">Flatpak 的物件倉庫與快取的下載</string> + <string name="storage_desktop_prune">移除未使用</string> + <string name="storage_desktop_prune_body">移除沒有已安裝應用程式需要的執行環境,並清理 Flatpak 的物件倉庫。已安裝的應用程式照常運作。</string> + <string name="storage_flatpak_uninstall_body">移除此應用程式(%1$s)以及沒有其他應用程式使用的執行環境。其主目錄中的資料會保留。</string> + <plurals name="storage_components_count"> + <item quantity="one">%d 個套件</item> + <item quantity="other">%d 個套件</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d 個應用程式</item> + <item quantity="other">%d 個應用程式</item> + </plurals> + <string name="boot_movie">開機動畫</string> + <string name="boot_movie_video">影片</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps 較流暢,但 Steam 啟動時會使用較多 CPU。在 Steam 本身設定中選擇的啟動動畫優先。</string> + <string name="boot_movie_sound">聲音</string> + <string name="boot_movie_custom">自訂影片</string> + <string name="boot_movie_custom_hint">MP4、MOV、MKV 或 WebM。其他格式及超過 %1$d MB 的檔案會在裝置上轉換為 720p WebM,最長 %2$d 秒。</string> + <string name="boot_movie_import">匯入</string> + <string name="boot_movie_remove">移除</string> + <string name="boot_movie_pick">選擇開機動畫</string> + <string name="boot_movie_imported">%1$s 現在是開機動畫</string> + <string name="boot_movie_imported_silent">%1$s 現在是開機動畫(無聲)</string> + <string name="boot_movie_too_long">需要轉換的影片不能超過 %1$d 秒</string> + <string name="boot_movie_converting">正在轉換 %1$d%%</string> + <string name="boot_movie_converting_started">正在為 Steam 轉換 %1$s。請保持 DroidDeck 開啟。</string> + <string name="boot_movie_unsupported">此裝置無法解碼該影片。</string> + <string name="boot_movie_import_failed">無法匯入此影片</string> + <string name="glasses_experimental">Luma Ultra 相機 — 實驗性功能</string> + <string name="glasses_joycons">Joy-Con 位置追踪</string> + <string name="glasses_joycons_hint">使用智慧眼鏡攝影機定位已配對的 Joy-Con 控制器。旋轉和按鍵輸入來自 Joy-Con 控制器。當您的手腕被遮住時,系統會估算位置。此功能會取代徒手操作的控制器,並暫停手機相機追蹤。連接或重設追蹤中心時,請將 Joy-Con 控制器指向前方。</string> + <string name="glasses_joycons_requires_position">請先啟用位置追蹤功能。需要 Android 12 或更高版本且 Joy-Con 控制器支援體感功能。預設關閉。</string> + <string name="setup_tab_glasses">智慧眼鏡</string> + <string name="setup_glasses_scope">顯示和頭部追蹤設定可在 DroidDeck 選單、遊戲和桌面會話之間共用。</string> + <string name="setup_glasses_connect">連接智慧眼鏡以變更其顯示和追蹤設定。斷開連線後,您儲存的設定將被保留。</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">顯示模式</string> + <string name="glasses_output_2d">2D 輸出</string> + <string name="glasses_output_3d">3D 輸出</string> + <string name="glasses_picture_group">畫面與虛擬螢幕</string> + <string name="glasses_position_group">位置與地面高度</string> + <string name="glasses_hands_group">手部追蹤 — 實驗性功能</string> + <string name="glasses_tracking_status">追蹤狀態</string> + <string name="glasses_resolution_2d">2D 分辨率</string> + <string name="glasses_resolution_3d">3D 分辨率</string> + <string name="glasses_resolution_vr">VR 分辨率</string> + <string name="glasses_resolution_auto">自動</string> + <string name="glasses_resolution_inherit">與 2D / 3D 相同</string> + <string name="glasses_resolution_hint">單眼輸出分辨率</string> + <string name="glasses_refresh_30_hint">啟用智慧眼鏡遊戲功能,選擇顯示器的原生 30 Hz 模式。</string> + <string name="glasses_3dof">3DoF 虛擬螢幕</string> + <string name="glasses_3dof_hint">將平面遊戲固定在您面前,以便您可以環顧四周。無需切換到 3D 模式即可啟用智慧眼鏡遊戲功能。</string> + <string name="glasses_screen_app_wide">寬度和距離會立即更新 DroidDeck 選單、遊戲和桌面會話的追蹤虛擬畫面。</string> + <string name="glasses_head_tracking_spatial_vr_hint">位置追蹤包含 SteamVR 中的頭部旋轉。如需僅進行旋轉追踪,請關閉位置追蹤。</string> + <string name="glasses_head_tracking_spatial_hint">控制虛擬螢幕上的頭部移動。位置追蹤包含 SteamVR 中的頭部旋轉。</string> + <string name="glasses_quick_actions">快速操作</string> + <string name="glasses_recenter_screen_hint">看向您希望螢幕顯示的位置,然後重設追蹤中心以設定其高度和方向。</string> + <string name="glasses_recenter_joycons_button">重設 Joy-Con 中心</string> + <string name="phone_camera_tracking_group">手機相機 — 實驗性功能</string> + <string name="phone_camera_tracking_setting">追蹤手部或 Joy-Con 控制器</string> + <string name="glasses_position">位置追蹤 — 實驗性功能</string> + <string name="glasses_position_hint">在VR中以及虛擬螢幕周圍進行實體移動。重新開始追蹤需要一些時間。</string> + <string name="glasses_eye_height">當前眼睛離地面的高度</string> + <string name="glasses_floor">依照目前高度設定地面高度</string> + <string name="glasses_floor_set">設定地面高度</string> + <string name="glasses_spatial_setup">立體攝影機設定與診斷</string> + <string name="glasses_spatial_setup_hint">遊戲前檢查相機校準和手部追蹤。</string> + <string name="glasses_spatial_open">開啟設定</string> + <string name="glasses_hands">用手操作控制器</string> + <string name="glasses_hands_hint">使用智慧眼鏡攝影機用手瞄準,捏合點擊,握緊手掌抓取VR中的物品。遊戲手把搖桿可以移動和旋轉。取代Joy-Con的位置追蹤。遊戲過程中可能會出現延遲或追蹤遺失。</string> + <string name="glasses_hands_ready_hint">在追蹤設定中,啟用Luma Ultra攝影機下的徒手操作控制器。首先顯示張開的手。</string> + <string name="glasses_hands_base">共享Luma Ultra校準</string> + <string name="glasses_hands_base_hint">使用共用的Luma Ultra底座。校準您的智慧眼鏡以驗證其準確性。</string> + <string name="glasses_hands_calibration_verified">測量校準已驗證</string> + <string name="glasses_hands_calibration_required">需要驗證</string> + <string name="glasses_hands_calibration_required_hint">測量距離檢查後,即可使用裸手操作控制器。</string> + <string name="tracking_recovery_lost">追蹤遺失</string> + <string name="tracking_recovery_restart_help">還卡住了嗎?在手機上:智慧型眼鏡→追蹤→開啟設定→顯示診斷→重新啟動追蹤。</string> + <string name="tracking_recovery_disconnected">智慧眼鏡斷開連接</string> + <string name="tracking_recovery_connect">檢查 USB 連接並重新連接智慧眼鏡。\n如果手機上出現 USB 存取提示,請接受該提示。</string> + <string name="tracking_recovery_usb_help">連結後,在光線充足的房間中慢慢環顧四周以恢復跟踪。</string> + <string name="tracking_recovery_recenter">需要重設中心</string> + <string name="tracking_recovery_recenter_steps">追蹤已恢復到新位置。\n看向前方,然後在手機上點選「重置追蹤中心」。</string> + <string name="tracking_recovery_recenter_help">您也可以在智慧眼鏡 → 追蹤 → 開啟設定中找到重置追蹤中心。您儲存的相機校準資訊將會保留。</string> + <string name="tracking_recovery_stabilizing">等一下</string> + <string name="tracking_recovery_hold">重置追蹤中心正在進行中。\n請在追蹤穩定期間保持智慧眼鏡靜止。</string> + <string name="tracking_recovery_automatic">當頭部追蹤準備就緒時,此畫面自動關閉。</string> + <string name="glasses_steady_hand_aim">穩定雙手瞄準</string> + <string name="glasses_steady_hand_aim_hint">從肩膀到手掌瞄準。關閉以進行手腕控制旋轉。</string> + <string name="spatial_title">空間設定</string> + <string name="spatial_wait_tracking">等待追蹤…</string> + <string name="spatial_cameras_description">左、右跟蹤攝影機</string> + <string name="spatial_camera_sync">相機同步</string> + <string name="spatial_ready">準備好了</string> + <string name="spatial_sync_hint">等待相機和頭部追蹤對齊。保持智慧眼鏡連接。</string> + <string name="spatial_prepare">1.準備校準目標</string> + <string name="spatial_print_actual">以實際尺寸列印</string> + <string name="spatial_print_hint">每個正方形的尺寸必須為 30 毫米(1.181 吋)。將板材平坦地安裝在光線充足區域的剛性表面上。</string> + <string name="spatial_print">列印校準板</string> + <string name="spatial_capture_group">2.捕捉不同的觀點</string> + <string name="spatial_board_stationary">保持校準目標靜止</string> + <string name="spatial_capture_hint">將智慧眼鏡移近、移遠和側向移動。向左/向右轉動它們,向上/向下傾斜它們,並向側面傾斜它們。將校準目標保留在兩台相機中,並在每次捕獲之前短暫暫停。</string> + <string name="spatial_start">開始新的校準</string> + <string name="spatial_wait_sync">等待相機同步。</string> + <string name="spatial_start_hint">開始新的校準以收集視圖。</string> + <string name="spatial_views_hint">保持校準目標在兩個預覽中可見。從不同角度捕捉至少 24 個清晰視野。</string> + <string name="spatial_capturing">捕捉…</string> + <string name="spatial_capture">捕捉校準目標視圖</string> + <string name="spatial_alignment">計算相機對準</string> + <string name="spatial_calculating">正在計算中…</string> + <string name="spatial_calculate">計算校準</string> + <string name="spatial_distance_group">3.檢查距離</string> + <string name="spatial_distance">測量距離</string> + <string name="spatial_distance_hint">從 12 英吋或 30 公分開始,以便列印的標記更容易檢測到。選擇您將使用的精確測量值。</string> + <string name="spatial_camera_board_distance">左相機至標定目標中心</string> + <string name="spatial_checking_distance">檢查距離…</string> + <string name="spatial_validate">驗證距離</string> + <string name="spatial_diagnostics">診斷</string> + <string name="spatial_show_diagnostics">顯示診斷</string> + <string name="spatial_diagnostics_hint">相機定時與追蹤恢復工具。</string> + <string name="spatial_camera_timing">相機計時</string> + <string name="spatial_hand_input">來自手部追蹤的輸入</string> + <string name="spatial_wait_timing">等待相機計時。</string> + <string name="spatial_frames">相機影像</string> + <string name="spatial_gpu">GPU檢測手部</string> + <string name="spatial_gpu_hint">CPU 是預設值。 GPU 是實驗性的,可能會導致 SteamVR 重新啟動。當追蹤重新啟動時,此選擇會重置。</string> + <string name="spatial_lite">手部模型的精簡檢測</string> + <string name="spatial_lite_hint">使用 Lite 手掌偵測器和手上的 Lite 重點。檢查瞄準、捏合和抓取的準確性。追蹤重新啟動時重置。</string> + <string name="spatial_adaptive">自動輸入頻率以追蹤手部</string> + <string name="spatial_adaptive_hint">調整輸入處理速度。追蹤重新啟動時重置。</string> + <string name="spatial_half_rate">限製手部追蹤的輸入頻率</string> + <string name="spatial_half_rate_hint">使用一半的相機影像。關閉以比較最大頻率。追蹤重新啟動時重置。</string> + <string name="spatial_diagnostic_capture">診斷捕獲</string> + <string name="spatial_diagnostic_capture_hint">在本地保存一對立體影像。僅在請求時才儲存影像。</string> + <string name="spatial_save_frame">儲存相機影像</string> + <string name="spatial_restart_tracking">重新開始追蹤</string> + <string name="spatial_restart_hint">如果追蹤在光線充足的區域中無法恢復,請使用。重新啟動需要新的追蹤來源。</string> + <string name="spatial_restart">重啟</string> + <string name="spatial_restart_title">重新開始追蹤?</string> + <string name="spatial_restart_confirm">未儲存的校準視圖將會遺失。之後請保持智慧眼鏡靜止,並在追蹤恢復後重置追蹤中心。</string> + <string name="spatial_views_count">%1$d / 已捕獲 24 次觀看</string> + <string name="spatial_capture_paused">擷取已暫停:%1$s</string> + <string name="spatial_measure_hint">測量%1$s。在兩個預覽中顯示完整的校準目標,然後保持不動。</string> + <string name="spatial_timing_values">%1$.1f Hz • 影像年齡 %2$.1f ms • 處理 %3$.1f ms</string> + <string name="spatial_input_values">輸入限制%1$.1f Hz • 攝影機影像的%2$.0f%%。頭部追蹤繼續以其最大頻率進行。</string> + <string name="spatial_frame_counts">%1$d 已處理 • %2$d 已丟棄 • %3$d 因輸入限製而被跳過</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra 校準</string> + <string name="spatial_print_scale" formatted="false">以 100%/實際尺寸列印。每個正方形:30 毫米(1.181 吋)。</string> + <string name="spatial_print_stationary">保持校準目標平坦且靜止;在拍攝之間移動智慧眼鏡。</string> + <string name="spatial_print_check">刻度檢查:刻度之間 100 毫米(3.937 吋)</string> + <string name="spatial_distance_12in">12 吋(30.48 公分)</string> + <string name="spatial_distance_30cm">30 公分(11.81 吋)</string> + <string name="spatial_distance_20in">20 吋(50.8 公分)</string> + <string name="spatial_distance_50cm">50 公分(19.69 吋)</string> + <string name="spatial_disabled">已停用</string> + <string name="spatial_wait_stable">等待穩定跟踪</string> + <string name="spatial_disconnected">已斷開連接</string> + <string name="spatial_hands_off">徒手操作的控制器已關閉</string> + <string name="spatial_tracking_off">位置追蹤已關閉或智慧眼鏡已斷開連接</string> + <string name="spatial_recenter_pending">已要求重置追蹤中心 — 請在追蹤穩定期間保持靜止。</string> + <string name="spatial_tracking_lost">追蹤失去 — 面對光線充足且細節可見的區域</string> + <string name="spatial_origin_changed">追蹤原點已更改 — 點擊“重置追蹤中心”,然後保持靜止。</string> + <string name="spatial_active">6DoF 主動</string> + <string name="spatial_connect_hint">連接 Luma Ultra 並啟用位置追蹤。</string> + <string name="spatial_validation_session">已驗證此連接的校準。</string> + <string name="spatial_validation_saved">校準已驗證並儲存。</string> + <string name="spatial_wait_cameras">等待立體攝影機</string> + <string name="spatial_wait_hands">等待手部追蹤</string> + <string name="spatial_collect_instructions">保持 5 × 7 校準目標靜止。移動和旋轉智慧眼鏡時可捕捉 24 個以上視圖。</string> + <string name="spatial_capture_pending">等待下一個攝影機影像。保持智慧眼鏡不動。</string> + <string name="spatial_validation_pending">檢查下一個攝影機影像。保持完整校準目標可見並保持靜止。</string> + <string name="spatial_start_first">先開始校準</string> + <string name="spatial_no_camera_frame">沒有新的相機影像到達。檢查智慧眼鏡連接和相機預覽,然後重試。</string> + <string name="spatial_clock_reset">相機時鐘重置</string> + <string name="spatial_frame_changed">追蹤座標系已更改。您的視圖已儲存以供重新計算。重置追蹤中心,然後開始新的設定以捕獲更多視圖。</string> + <string name="spatial_device_loaded">設備校準已載入</string> + <string name="spatial_base_loaded">Luma Ultra 基本校準已載入</string> + <string name="spatial_calibration_needed">需要校準</string> + <string name="spatial_tap_start">點選先開始新的校準。</string> + <string name="spatial_capture_recenter_pending">重置追蹤中心正在等待穩定的追蹤。請保持靜止片刻。</string> + <string name="spatial_capture_recenter">追蹤已更改。點擊“重置追蹤中心”一次,然後在捕獲之前保持靜止。</string> + <string name="spatial_capture_unsynchronized">擷取被拒絕:頭部追蹤未同步,或在擷取過程中發生了變化。保持不動後重試。</string> + <string name="spatial_align_first">在檢查距離之前計算相機對準。</string> + <string name="spatial_processing_failed">相機處理失敗</string> + <string name="spatial_hand_head_changed">偵測手部期間頭部追蹤發生變化</string> + <string name="spatial_hand_wait_sync">等待相機和雲台同步</string> + <string name="spatial_no_wrists">未偵測到手腕。將 Joy-Con 控制器手把放在智慧眼鏡前面</string> + <string name="spatial_no_hands">未偵測到手。在智慧眼鏡前展示張開的手掌</string> + <string name="spatial_one_camera_wrists">僅在一台攝影機中可以看到手腕;將控制器句柄保留在共享視圖中</string> + <string name="spatial_one_camera_hands">僅在一台攝影機中可以看到手;將雙手掌保持在共享視圖中</string> + <string name="spatial_ambiguous_hands">兩個攝影機都能看到手,但左/右匹配不明確</string> + <string name="spatial_inconsistent_depth">偵測到手,但立體深度不一致</string> + <string name="spatial_rejected_wrist">立體或運動檢查拒絕手腕位置</string> + <string name="spatial_inconsistent_palm">偵測到立體點,但手掌幾何形狀不一致</string> + <string name="spatial_hands_need_calibration">完成校準和距離檢查以啟用指針</string> + <string name="spatial_hands_wait_stable">正在等待穩定的頭部追蹤;如果需要,請重設追蹤中心。</string> + <string name="spatial_old_frame">相機觀察太舊;等待一雙新的</string> + <string name="spatial_fit_ready">適合 %1$.2f 像素。測量您選擇的從左側攝影機到校準目標中心的距離,然後進行驗證。</string> + <string name="spatial_opencv_error">OpenCV 不可用:%1$s</string> + <string name="spatial_restored">%1$d 已恢復已儲存的視圖。計算校準以重試,或開始新的一組以捕獲更多。</string> + <string name="spatial_captured">已捕獲 %1$d / 24 次觀看。保持校準目標固定;移動智慧眼鏡以查看下一個視圖。</string> + <string name="spatial_capture_corners">捕捉被拒絕:%1$d / 12 個必需的角落在兩個攝影機中均可見。顯示更多校準目標,保持不動,然後重試。</string> + <string name="spatial_validation_error">距離檢查無法完成:%1$s。再試一次。</string> + <string name="spatial_inference_error">偵測到手部不可用:%1$s。更換CPU/GPU或切換徒手操作的控制器重試。</string> + <string name="spatial_hand_timeout">偵測手部超過%1$d毫秒;觀察被丟棄</string> + <string name="spatial_wrists_tracked">%1$d / 2 以立體聲測量的 Joy-Con 手腕位置</string> + <string name="spatial_palms_tracked">已追蹤手掌:%1$d / 2;可用捏合手勢:%2$d;可用抓取手勢:%3$d</string> + <string name="spatial_capture_saved">已將診斷擷取儲存到 %1$s</string> + <string name="spatial_hand_error">手部追蹤已停止:%1$s</string> + <string name="spatial_stereo_loaded">立體聲%1$d×%2$d;%3$s</string> + <string name="spatial_alignment_error">頭部追蹤和校準目標不一致 %1$s(限制 5 公分/2 英吋)。保持校準目標固定並等待穩定跟踪,然後再開始新的一組。輕輕轉動、傾斜智慧眼鏡;每次捕獲前暫停。</string> + <string name="spatial_need_views">捕捉固定校準目標的至少24個不同視圖。</string> + <string name="spatial_need_rotation">左右轉動智慧眼鏡,上下傾斜;不旋轉的移動無法校準相機對準。</string> + <string name="spatial_bad_baseline">難以置信的相機基線</string> + <string name="spatial_need_orientations">透過更多不同的方向移動您的頭部。</string> + <string name="spatial_bad_rotation">相機到頭旋轉無效</string> + <string name="spatial_bad_alignment">相機與頭部的對齊不一致。</string> + <string name="spatial_calibration_error">校準無法完成。 %1$s 您所擷取的視圖已儲存。</string> + <string name="spatial_reprojection_error">保留重投影錯誤 %1$.2f 像素超過 2 像素。重新校準。</string> + <string name="spatial_distance_corners">%1$d / 兩個相機都偵測到 24 個棋盤角。保持完整校準目標可見並保持靜止。如果已經可見,請選擇 12 英寸或 30 厘米,並在重試之前測量更近的距離。</string> + <string name="spatial_distance_depth">校準目標是可見的,但無法可靠地測量其深度。保持智慧眼鏡不動,並保持校準目標平坦且光線充足,然後重試。</string> + <string name="spatial_distance_invalid">相機測量無效。保持不動,然後再試一次。</string> + <string name="spatial_distance_passed">距離檢查已通過。</string> + <string name="spatial_distance_retry">重新檢查左攝影機到校準目標中心的距離,然後重試。</string> + <string name="spatial_distance_result">測量相機%1$s;所選的距離%2$s。 %3$s</string> + <string name="spatial_wait_previews">開始校準之前等待兩個攝影機預覽。</string> + <string name="spatial_saved_views_hint">可以重新計算已儲存的視圖。開始新的校準以在當前追蹤座標系中捕獲。</string> + <string name="spatial_model_checksum_error">手模型校驗與不匹配</string> + <string name="spatial_opencv_load_error">OpenCV 無法載入</string> + <string name="glasses_6dof">6DoF 虛擬螢幕</string> + <string name="tracking_recovery_look">在光線充足的房間內緩慢環顧四周。\n不要遮擋追蹤攝影機,並面向家具等有明顯細節的物體。</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> </resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4537ab3699..d1f8c0203a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string name="glasses_experimental">Luma Ultra cameras — Experimental</string> + <string name="glasses_joycons">Joy-Con position tracking</string> + <string name="glasses_joycons_hint">Use the glasses cameras to position your paired Joy-Cons. Rotation and button inputs come from the Joy-Cons. Position is estimated when your wrists are hidden. Replaces bare-hand controllers and pauses phone-camera tracking. Point the Joy-Cons forward when connecting or recentering.</string> + <string name="glasses_joycons_requires_position">Enable positional tracking first. Requires motion-capable Joy-Cons on Android 12 or later. Off by default.</string> + <string name="steamvr_recovery_title">SteamVR graphics stopped</string> + <string name="steamvr_recovery_countdown">DroidDeck will restart in %1$d seconds to reset graphics and reopen SteamVR. Your running game will close; unsaved progress cannot be restored.</string> + <string name="steamvr_recovery_repeated">The graphics fault returned after a recent restart. Automatic recovery is paused to prevent a loop. Restarting will close your game; unsaved progress cannot be restored.</string> + <string name="steamvr_recovery_restart">Restart now</string> + <string name="steamvr_recovery_cancel">Keep open</string> + <string name="steamvr_recovery_restarting">Resetting graphics and reopening SteamVR…</string> + <string name="steamvr_recovery_failed">DroidDeck could not restart automatically. Close the app completely, then reopen it.</string> <string name="app_name">DroidDeck</string> <string-array name="loading_hints"> <item>First run downloads Steam. This may take a few minutes.</item> @@ -58,7 +69,7 @@ <string name="game_env_save">Save</string> <string name="game_env_remove">Remove</string> <string name="game_env_restore">Inherit again</string> - <string name="game_env_reset">Reset this profile</string> + <string name="game_env_reset">Clear environment overrides</string> <string name="game_env_unset">Unset for this profile</string> <string name="game_env_empty">No variables set.</string> <string name="game_env_inherited">Inherited</string> @@ -278,6 +289,9 @@ <string name="mode_suspend_steam_note">Auto pauses and resumes when shown. Native prepares Steam for sleep first. Manual waits for Resume. Never keeps running.</string> <string name="mode_background_downloads">Keep downloads running</string> <string name="mode_background_downloads_hint">Delay background suspension while Steam is actively downloading.</string> + <string name="mode_zram">zRAM compression</string> + <string name="mode_zram_hint">While a game runs, the Steam client\'s memory is compressed into the device\'s zram, leaving more RAM for the game. Applies the next time Steam starts.</string> + <string name="mode_zram_unsupported">Unavailable: this device has no zram or swap, or its kernel is older than 5.4.</string> <string name="mode_suspend_note">Auto pauses in the background and resumes when shown. Manual waits for Resume. Never keeps running.</string> <string name="mode_startup">Startup</string> <string name="mode_steam_startup">Start Steam with DroidDeck</string> @@ -413,6 +427,51 @@ <string name="comp_check_nightlies">Check the Nightlies for new packages</string> <string name="comp_proton">Proton</string> <string name="comp_proton_note">The Proton chosen here runs every game that has not picked its own in Steam, and a change made in Steam shows here too. Steam replaces Valve\'s Proton when it updates; originals are kept per build.</string> + <string name="comp_scope">Configuration</string> + <string name="comp_profile_configure">Configure profile</string> + <string name="comp_profile">Profile</string> + <string name="comp_scope_general">Default profile</string> + <string name="comp_scope_general_detail">Used automatically by games without overrides.</string> + <string name="comp_profile_game_detail">Saved settings used automatically when %1$s launches.</string> + <string name="comp_game_hint">Choose only the settings this game needs. Everything else continues to use the Default profile.</string> + <string name="comp_game_fex">FEX preset</string> + <string name="comp_game_fex_inherited">Using the Default profile preset.</string> + <string name="comp_game_fex_override">Custom preset saved for this game.</string> + <string name="comp_game_fex_custom">Custom FEX variables</string> + <string name="comp_game_use_general">Use Default</string> + <string name="comp_game_compatibility">Game compatibility</string> + <string name="comp_game_environment_hint">Proton, DXVK, VKD3D and synchronization environment options for this game.</string> + <string name="comp_game_proton_inherited">Using the Default profile Proton.</string> + <string name="comp_game_proton_override">Custom Proton saved for this game through Steam compatibility mapping.</string> + <string name="comp_no_proton_short">No Proton</string> + <string name="comp_game_dxvk">DXVK</string> + <string name="comp_game_vkd3d">VKD3D-Proton</string> + <string name="comp_game_component_runtime">Uses the Default profile package from %1$s unless this game selects another package.</string> + <string name="comp_game_component_general">Uses the Default profile component package.</string> + <string name="comp_game_component_override">Uses %1$s only for this game.</string> + <string name="comp_game_runtime_options">Runtime options</string> + <string name="comp_game_environment_other_hint">Other per-game Proton, DXVK, VKD3D-Proton and synchronization environment options.</string> + <string name="comp_game_saved_next">%1$s\'s profile is saved for the next game launch.</string> + <string name="game_no_steam_title">Start without Steam</string> + <string name="game_no_steam_detail">Opens it in Proton/FEX without the Steam client; Steam features are off.</string> + <string name="game_no_steam_on">On</string> + <string name="game_steam_with">Starts with Steam</string> + <string name="game_steam_without">Starts without Steam</string> + <string name="game_settings_card">Settings</string> + <string name="game_settings_menu_title">%1$s Settings</string> + <string name="game_settings_default">Default</string> + <string name="game_settings_default_detail">Puts everything changed for this game back to the app\'s settings.</string> + <string name="game_sync_custom">Custom sync variables</string> + <string name="comp_game_proton_live">%1$s\'s Proton choice is saved and available in Steam now.</string> + <string name="comp_game_proton_next">%1$s\'s Proton choice is saved. Restart Steam before launching the game.</string> + <string name="comp_game_proton_not_runnable">%1$s cannot use the selected Proton on this device.</string> + <string name="comp_game_load_failed">Could not load %1$s\'s profile: %2$s</string> + <string name="comp_game_save_failed">The game profile could not be saved: %1$s</string> + <string name="comp_game_reset">Reset game profile</string> + <string name="comp_game_reset_title">Reset %1$s\'s profile?</string> + <string name="comp_game_reset_body">Remove this game\'s Proton, FEX, component package, environment, texture filtering, and Windows component overrides? It will use the Default profile.</string> + <string name="comp_game_reset_done">%1$s now uses the Default profile.</string> + <string name="comp_game_reset_failed">The game profile could not be reset completely: %1$s</string> <string name="comp_default_live">%1$s now runs every game that has not picked its own Proton in Steam.</string> <string name="comp_default_next">%1$s will run every game that has not picked its own Proton, from the next time Steam starts.</string> <string name="comp_default_not_runnable">%1$s cannot start games here, so it cannot be the default.</string> @@ -431,7 +490,7 @@ <string name="comp_applies_next_game">Applies the next time a game starts</string> <string name="comp_import_zip">Import .zip</string> <string name="comp_reading">Reading Protons…</string> - <string name="comp_no_proton">No Proton installed yet. Start Steam once to download its ARM64 Proton, or add GE-Proton or CachyOS from Setup.</string> + <string name="comp_no_proton">No Proton installed yet. Start Steam once to download its ARM64 Proton, or add GE-Proton, CachyOS or DroidDeck-Proton from Setup.</string> <string name="comp_original">Original · %1$s</string> <string name="comp_this_build">%1$s · this build</string> <string name="comp_earlier_build">%1$s · earlier build</string> @@ -537,6 +596,34 @@ <string name="drawer_cas">Sharpening (CAS)</string> <string name="drawer_cas_level">Sharpening level</string> <string name="drawer_fake_hdr">Fake HDR</string> + <string name="cardboard_title">Cardboard VR</string> + <string name="cardboard_mode">Cardboard mode</string> + <string name="cardboard_mode_hint">Left and right eye views for a phone VR viewer.</string> + <string name="cardboard_source">Picture</string> + <string name="cardboard_source_screen">Virtual screen</string> + <string name="cardboard_source_sbs">Side-by-side 3D</string> + <string name="cardboard_viewer">Viewer</string> + <string name="cardboard_viewer_v2">Cardboard</string> + <string name="cardboard_viewer_v1">Cardboard (2014)</string> + <string name="cardboard_viewer_none">No lens</string> + <string name="cardboard_ipd">Eye distance</string> + <string name="cardboard_screen_width">Screen width</string> + <string name="cardboard_screen_distance">Screen distance</string> + <string name="cardboard_head_tracking">Head tracking</string> + <string name="cardboard_no_sensor">This device has no rotation sensor.</string> + <string name="cardboard_recenter">Recenter view</string> + <string name="cardboard_recenter_button">Recenter</string> + <string name="vr_title">VR</string> + <string name="steamvr_title">SteamVR</string> + <string name="steamvr_enter">Enter SteamVR</string> + <string name="steamvr_checking">Checking SteamVR…</string> + <string name="cardboard_steamvr">SteamVR (experimental)</string> + <string name="cardboard_steamvr_install">Install</string> + <string name="cardboard_steamvr_installing">Downloading and unpacking SteamVR…</string> + <string name="cardboard_steamvr_start">Start</string> + <string name="cardboard_steamvr_stop">Stop</string> + <string name="cardboard_steamvr_unavailable">Not available in this session.</string> + <string name="cardboard_steamvr_failed">SteamVR did not respond; see the session log.</string> <string name="drawer_deband">Debanding</string> <string name="drawer_deband_strength">Debanding strength</string> <string name="drawer_brightness">Brightness</string> @@ -554,6 +641,11 @@ <string name="drawer_texture_sharpness_note">A negative mip bias: sharper textures, some shimmer. Auto matches how far the session is enlarged to the screen.</string> <string name="drawer_touch_auto">Auto (%1$s)</string> <string name="drawer_keyboard">Keyboard</string> + <string name="drawer_latency">Latency</string> + <string name="drawer_low_latency_controller">Low-latency controller</string> + <string name="drawer_low_latency_controller_hint">Pad reports at 1000 Hz instead of 250 Hz. Slightly more CPU.</string> + <string name="drawer_low_latency_touch">Low-latency touch</string> + <string name="drawer_low_latency_touch_hint">Touches skip frame batching; Steam touch controls at 1000 Hz. Slightly more CPU.</string> <string name="drawer_pc_keyboard">PC keyboard</string> <string name="drawer_android_keyboard">Android</string> <string name="drawer_second_screen">Second screen</string> @@ -576,11 +668,27 @@ <string name="drawer_stop_title">Stop session?</string> <string name="drawer_running_now">Running now</string> <string name="drawer_no_game">No game is running on a Proton</string> + <string name="drawer_selected_profile">Game profile</string> + <string name="drawer_selected_profile_none">Profile details are not available yet.</string> + <string name="drawer_profile_refresh_failed_initial">Couldn\'t load game profiles. Retrying automatically.</string> + <string name="drawer_profile_refresh_failed_stale">Couldn\'t refresh game profiles. Showing the last available data; retrying automatically.</string> + <string name="drawer_profile_inspect_hint">View and edit the saved settings used on the next launch.</string> + <string name="drawer_profile_default">Using Default profile</string> + <string name="drawer_profile_custom">Custom profile</string> + <string name="drawer_component_inherited">Using %1$s from the Default profile.</string> + <string name="drawer_game_components_note">Changes are saved to %1$s\'s profile and apply the next time the game launches.</string> + <plurals name="drawer_profile_environment_overrides"> + <item quantity="one">%1$d game override</item> + <item quantity="other">%1$d game overrides</item> + </plurals> <string name="drawer_no_proton">No Proton is installed yet.</string> <string name="drawer_game_running">game running</string> <string name="drawer_reapplied">re-applied at launch %1$s</string> <string name="drawer_original">Original</string> - <string name="drawer_components_note">Download, import and delete on the Components page.</string> + <string name="drawer_components_note">Import and delete on the Components page.</string> + <string name="drawer_component_downloads">Download components</string> + <string name="drawer_component_downloads_hint">Downloads are shared with the Components page. Choose a downloaded version above to use it on the next game launch.</string> + <string name="drawer_component_choose_download">Choose a version to download</string> <string name="setup_check_done">Done</string> <string name="setup_check_warn">Needs attention</string> <string name="setup_check_busy">Working</string> @@ -632,6 +740,14 @@ <string name="setup_saved_logs">Saved session logs</string> <string name="setup_saved_logs_hint">Keeps the newest %1$d</string> <string name="setup_clear_logs">Clear logs</string> + <string name="setup_reset_settings">Reset all settings</string> + <string name="setup_reset_settings_hint">Puts every setting back to its default</string> + <string name="setup_reset_settings_button">Reset</string> + <string name="setup_reset_settings_title">Reset all settings?</string> + <string name="setup_reset_settings_body">Display, performance, controller, theme, language and launcher settings go back to their defaults. Your games, Steam sign-in, store accounts, downloaded drivers and storage folders are kept.</string> + <string name="setup_reset_settings_profiles">Also reset game profiles (each game\'s Proton, FEX, components and environment, and the Default profile\'s environment)</string> + <string name="setup_reset_settings_session_running">Stop the session before resetting settings.</string> + <string name="setup_reset_settings_partial">Settings were reset, but some parts could not be. The logs have the details.</string> <string name="setup_offline">Offline mode</string> <string name="setup_sign_in_first">Sign in to Steam first</string> <string name="setup_launcher">Launcher</string> @@ -842,8 +958,8 @@ <string name="wadb_turn_off">Turn limit off</string> <string name="wadb_other_ways">Other ways to change it</string> <string name="wadb_dev_try_first">1 · Developer options (try first)</string> - <string name="wadb_restrict_on">Set “Restrict child processes” on.</string> - <string name="wadb_restrict_off">Set “Restrict child processes” off.</string> + <string name="wadb_restrict_on">Turn off “Disable child process restrictions”.</string> + <string name="wadb_restrict_off">Turn on “Disable child process restrictions”.</string> <string name="wadb_computer_last">3 · Computer ADB (last resort)</string> <string name="wadb_only_if">Only if Wireless debugging is unavailable.</string> <string name="wadb_computer_group">3 · Computer ADB (last resort)</string> @@ -864,6 +980,8 @@ <string name="ctrl_keyboard_button">Keyboard button</string> <string name="ctrl_select_steam">Press Select to open the Steam menu</string> <string name="ctrl_select_steam_hint">Instead of View/Select.</string> + <string name="ctrl_joycon_vr">Joy-Cons as VR controllers</string> + <string name="ctrl_joycon_vr_hint">While SteamVR runs, each Joy-Con becomes a hand. Point it ahead and hold Home or Capture to recenter it.</string> <string name="setup_animations">Animations</string> <string name="ctrl_adaptive_hint">Sticks appear where you touch and hide on release</string> <string name="ctrl_layout">Layout</string> @@ -921,6 +1039,7 @@ <string name="content_linux_desktop_hint">KDE Plasma, Firefox and your emulators</string> <string name="games_empty">Games you install in Steam show up here after the session.</string> <string name="games_play_steam">Play Steam</string> + <string name="games_play_steamvr">Play SteamVR</string> <string name="games_launch_settings">Launch settings</string> <string name="games_launch">Launch</string> <string name="games_files">Game files</string> @@ -958,7 +1077,6 @@ <string name="gpu_set_with_runtime">Set together with the runtime driver: %1$s carries both.</string> <string name="gpu_runtime_hint">Used by games and the desktop.</string> <string name="gpu_runtime_default">Runtime default</string> - <string name="gpu_display_hint">Draws frames to the screen. Applies after DroidDeck restarts.</string> <string name="gpu_auto_by_gpu">Auto - picked by GPU</string> <string name="gpu_manage">Download, import or delete…</string> <string name="gpu_in_use_caps">IN USE</string> @@ -1029,6 +1147,10 @@ <string name="proton_installed">Installed %1$s</string> <string name="proton_queued">Pending from an earlier request</string> <string name="proton_not_installed">Not installed</string> + <string name="proton_update_available">Update available → %1$s</string> + <string name="proton_remove_older">Remove old %1$s versions</string> + <string name="proton_remove_older_body">Removes %1$s. Games set to these versions must be switched to another Proton.</string> + <string name="proton_remove_body">Games set to this version must be switched to another Proton.</string> <string name="proton_install_now">Install now</string> <string name="proton_cancel_queued">Cancel queued</string> <string name="pckb_android">Android keyboard</string> @@ -1084,16 +1206,12 @@ <string name="game_file_exported">Game files saved to %1$s</string> <string name="game_frontend_files">Frontend files</string> - <!-- Launcher, session and menus --> - <!-- Launcher (MainActivity) --> <string name="main_wait_runtime">Wait for the runtime operation to finish</string> <string name="main_wait_proton_install">Wait for the compatibility tool install to finish</string> <string name="main_wait_desktop_install">Wait for the desktop app install to finish</string> <string name="main_wait_install_game">Wait for the install to finish before launching a game</string> <string name="main_saves_close_session">Close the Steam session first, so the game can\'t save over the import</string> - <!-- Busy line while saves are imported; %1$s is the game's name --> <string name="main_saves_importing">Importing into %1$s</string> - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the game's name --> <plurals name="main_saves_imported"> <item quantity="one">Imported %1$d file from the %2$s into %3$s</item> <item quantity="other">Imported %1$d files from the %2$s into %3$s</item> @@ -1103,16 +1221,12 @@ <item quantity="other">Imported %1$d files from the %2$s into %3$s. Old saves backed up to Download/DroidDeck/Saves/backups</item> </plurals> <string name="main_saves_pick_zip">Choose a save zip for %1$s</string> - <!-- Busy line while saves are exported; %1$s is the game's name --> <string name="main_saves_exporting">Exporting %1$s</string> - <!-- %1$d files, %2$s the save layout (e.g. GameHub zip), %3$s the zip's path --> <plurals name="main_saves_exported"> <item quantity="one">Exported %1$d file as a %2$s: %3$s</item> <item quantity="other">Exported %1$d files as a %2$s: %3$s</item> </plurals> - <!-- %1$s is the game's name, %2$s the save layout --> <string name="main_saves_pick_folder">Choose where to save %1$s (%2$s)</string> - <!-- %1$s is what was being done (e.g. Importing into Portal 2, Swapping), %2$s the error --> <string name="main_action_failed">%1$s failed: %2$s</string> <string name="main_no_logs_yet">No session logs yet: run a session first.</string> <string name="main_no_logs_to_clear">No session logs to clear.</string> @@ -1126,68 +1240,55 @@ <string name="main_adb_copied">ADB command copied</string> <string name="main_pick_roms">Choose the ROMs folder</string> <string name="main_non_adreno_title">Not an Adreno GPU</string> - <!-- %1$s is the GPU's name, %2$.0f the download size in MB --> <string name="main_non_adreno_text">Turnip supports Adreno GPUs. On %1$s, Steam may show a black screen. Download: %2$.0f MB.</string> <string name="main_install_anyway">Install anyway</string> <string name="main_remove_runtime_title">Remove Linux runtime</string> <string name="main_remove_runtime_text">This deletes the runtime, the Steam client inside it, and every game installed there.</string> - <!-- Toast; %1$s is a list of components, separated by commas --> <string name="main_applied">Applied: %1$s</string> <string name="android_app_open_failed_primary">Could not open %1$s on the primary screen</string> - <!-- %1$s is the app, %2$s the name of the display --> <string name="android_app_open_failed_on">Could not open %1$s on %2$s</string> - <!-- %1$s is the app, %2$d the display's number --> <string name="android_app_open_failed_display">Could not open %1$s on display %2$d</string> - <!-- Components page busy lines, shown with … after them --> <string name="comp_busy_importing">Importing</string> <string name="comp_busy_swapping">Swapping</string> <string name="comp_busy_restoring">Restoring</string> <string name="comp_busy_cancelling">Cancelling</string> <string name="comp_busy_deleting">Deleting</string> <string name="comp_cannot_read">cannot read the file</string> - <!-- %1$s is a version or a name --> <string name="comp_imported">Imported %1$s</string> <string name="comp_swap_cancelled">The waiting swap was cancelled.</string> <string name="comp_pick_wcp">Choose a component package (-linux .wcp)</string> <string name="comp_nightlies_unreachable">The Nightlies could not be reached</string> - <!-- %1$s is the package version --> <string name="comp_stored">Stored %1$s</string> <string name="comp_download_failed">Download failed: %1$s</string> <string name="drivers_pick_linux">Choose a Linux runtime driver (-Linux zip or Android + Linux bundle)</string> <string name="drivers_pick_android">Choose a display driver (AdrenoTools zip or Android + Linux bundle)</string> <string name="drivers_pick_any">Choose a driver zip or an Android + Linux bundle</string> - <!-- %1$s is a desktop app's name, %2$s what went wrong --> <string name="main_pkg_problem">%1$s: %2$s</string> <string name="main_removing_named">Removing %1$s…</string> <string name="main_forgetting_named">Forgetting %1$s…</string> <string name="main_pick_game_storage">Choose the game storage folder</string> <string name="main_pick_decky_zip">Choose a Decky plugin ZIP</string> <string name="main_storage_not_usable">Not usable: %1$s</string> - <!-- What is running, when it is a program without a known name --> <string name="main_running_program">Program</string> <string name="main_removing_runtime">Removing Linux runtime</string> <string name="main_settings_main_screen">Could not open Settings on the bottom screen; opened it on the main screen.</string> <string name="main_open_dev_options">Open Developer options in Settings</string> - <!-- Updates --> <string name="upd_unknown_apps_failed">Couldn\'t open Android\'s \"Install unknown apps\" setting</string> <string name="upd_couldnt_check">Couldn\'t check: %1$s</string> <string name="upd_no_download">This build has no download for this copy of DroidDeck</string> <string name="upd_stop_first">Stop the running session first, then update</string> - <!-- Update stages, shown with … after them --> <string name="upd_stage_downloading">Downloading</string> <string name="upd_stage_installing">Installing</string> <string name="upd_stage_confirm">Waiting for you to confirm</string> <string name="upd_failed">The update failed</string> <string name="upd_not_offered">Android didn\'t offer to install the update</string> - <!-- Decky --> <string name="decky_install_failed">Decky install failed: %1$s</string> <string name="decky_plugin_starting">Starting plugin import…</string> <string name="decky_plugin_failed">Plugin import failed: %1$s</string> <string name="decky_plugin_installed">Plugin installed. Restart Steam to load it.</string> - <!-- GPU drivers --> <string name="drivers_not_checked">Not checked yet - tap refresh to look for new drivers</string> <string name="drivers_bundle_sets_display">Android + Linux: sets the display driver with it</string> <string name="drivers_bundle_sets_runtime">Android + Linux: sets the runtime driver with it</string> @@ -1195,23 +1296,26 @@ <string name="drivers_system_vulkan">system Vulkan: no bundled build for this GPU</string> <string name="drivers_bundled">%1$s (bundled)</string> <string name="drivers_manual">Manual</string> - <!-- Driver mode, then the driver pair in use --> <string name="drivers_summary">%1$s · %2$s</string> <string name="drivers_half_published">Only one half is published right now</string> <string name="drivers_pair_size">%1$.0f MB for both</string> - <!-- %1$s says why (the GPU's support status) --> <string name="drivers_none_to_set">No drivers to set: %1$s</string> <string name="drivers_checking_latest">Checking for the latest drivers…</string> <string name="drivers_up_to_date_check_failed">Up to date (couldn\'t check: %1$s)</string> <string name="drivers_recommended_unpublished">The recommended drivers aren\'t published right now</string> - <!-- %1$s is the driver pair's name, %2$s its version --> <string name="drivers_downloading_pair">Downloading %1$s %2$s…</string> <string name="drivers_updated_to">Updated to %1$s %2$s.</string> <string name="drivers_updated_to_restart">Updated to %1$s %2$s. The display driver applies after DroidDeck restarts.</string> + <string name="drivers_auto_waits_for_session">Driver updates wait until the session ends.</string> + <string name="drivers_auto_waits_for_network">%1$s %2$s will download once you\'re off mobile data and battery saver.</string> + <string name="drivers_skipping_bad">%1$s %2$s didn\'t start a session here, so Auto is staying on the drivers that did.</string> + <string name="drivers_rolled_back">%1$s didn\'t start a session twice, so Auto went back to the drivers that worked.</string> <string name="drivers_switched_to">Switched to %1$s %2$s.</string> <string name="drivers_switched_to_restart">Switched to %1$s %2$s. The display driver applies after DroidDeck restarts.</string> <string name="drivers_using">Using %1$s %2$s.</string> <string name="drivers_using_restart">Using %1$s %2$s. The display driver applies after DroidDeck restarts.</string> + <string name="drivers_using_quest">Using the bundled Quest display driver and runtime default.</string> + <string name="drivers_using_quest_restart">Using the bundled Quest display driver and runtime default. The display driver applies after DroidDeck restarts.</string> <string name="drivers_not_a_driver">Not a driver zip: neither an AdrenoTools driver, a -Linux Turnip nor an Android + Linux bundle</string> <string name="drivers_import_failed">Import failed: %1$s</string> <string name="drivers_imported_unnamed">Imported driver</string> @@ -1219,9 +1323,7 @@ <string name="drivers_using_bundle_restart">Using %1$s as both the runtime and display driver. The display driver applies after DroidDeck restarts.</string> <string name="drivers_deleted_bundle">Deleted %1$s (both drivers)</string> <string name="drivers_deleted">Deleted %1$s</string> - <!-- %1$s lists the latest releases, %2$s when they were checked (e.g. 5 min ago) --> <string name="drivers_release_status">Latest: %1$s · checked %2$s</string> - <!-- %1$s lists the latest releases, %2$s the sources that could not be reached, %3$s when they were checked --> <string name="drivers_release_status_failed">Latest: %1$s · %2$s unreachable · checked %3$s</string> <plurals name="drivers_ago_minutes"> <item quantity="one">%1$d min ago</item> @@ -1237,32 +1339,25 @@ </plurals> <string name="drivers_checking_sources">Checking Banners-Turnip, WinNative and DroidDeck…</string> <string name="drivers_check_failed">check failed</string> - <!-- %1$s is the driver's name --> <string name="drivers_installed_pick_either">Installed %1$s - pick it in either list to set both drivers</string> <string name="drivers_installed_pick">Installed %1$s - pick it in the menu</string> - <!-- Session (SessionActivity) --> <string name="session_wait_removal">Wait for runtime removal to finish</string> - <!-- Drawer title when the running program has no known name --> <string name="session_title_game">Game</string> - <!-- Shown as "Auto (touchpad)" in the drawer's touch setting --> <string name="session_touch_auto_touchpad">touchpad</string> - <!-- Shown as "Auto (direct)" in the drawer's touch setting --> <string name="session_touch_auto_direct">direct</string> <string name="session_swap_failed">Swap failed: %1$s</string> + <string name="session_profile_save_failed">Profile save failed: %1$s</string> <string name="session_desktop_paused">The desktop is paused</string> - <!-- %1$s is the program's name --> <string name="session_named_paused">%1$s is paused</string> <string name="session_program_paused">The program is paused</string> <string name="session_starting_desktop">Starting the desktop</string> - <!-- %1$s is the program's name --> <string name="session_starting_named">Starting %1$s</string> <string name="session_starting_program">Starting the program</string> <string name="session_no_logs">No logs for this session.</string> <string name="session_logs_archive_failed">Could not create the session log archive.</string> <string name="session_logs_share_failed">Could not share the session logs.</string> <string name="session_starting_session">Starting the session…</string> - <!-- Loading screen lines while packages download; %1$d and %2$d are megabytes --> <string name="session_runtime_downloading">downloading the Linux runtime</string> <string name="session_runtime_downloading_mb">downloading the Linux runtime · %1$d of %2$d MB</string> <string name="session_runtime_checking">checking the Linux runtime</string> @@ -1277,28 +1372,21 @@ <string name="session_proton_unpacking">unpacking Proton Experimental (ARM64)</string> <string name="session_runtime_catalog_unreachable">Could not reach the runtime catalog. Check the connection and press Play again.</string> <string name="session_runtime_install_failed">The Linux runtime did not install. Check the runtime in Setup and press Play again.</string> - <!-- %1$s says what went wrong --> <string name="session_desktop_install_failed">The desktop did not install (%1$s). Check the connection and press Desktop again.</string> - <!-- %1$s is the program's name, or Steam --> <string name="session_ended_named">%1$s stopped unexpectedly. Share the logs with a bug report, or try again.</string> <string name="session_ended_program">The program stopped unexpectedly. Share the logs with a bug report, or try again.</string> <string name="session_ended_desktop">The desktop stopped unexpectedly. Share the logs with a bug report, or try again.</string> - <!-- %1$d is the exit status, %2$s the log file's path --> <string name="session_ended_detail">Exit status %1$d · %2$s</string> <string name="session_ended_no_log">no log</string> - <!-- %1$d errors; %2$s, %3$s and %4$s are the Performance page and its two settings --> <plurals name="session_hint_enosys"> <item quantity="one">The log shows %1$d \"Function not implemented\" error: proot\'s seccomp acceleration is failing a helper on this device. Try %2$s → \"%3$s\" (or \"%4$s\") and start again.</item> <item quantity="other">The log shows %1$d \"Function not implemented\" errors: proot\'s seccomp acceleration is failing a helper on this device. Try %2$s → \"%3$s\" (or \"%4$s\") and start again.</item> </plurals> - <!-- Screens, files, controller and store --> - <!-- Mode settings --> <string name="mode_decky_plugins">Plugins</string> <string name="mode_decky_plugins_hint">Install a plugin ZIP for the next Steam session.</string> <string name="mode_decky_plugin_downloading">Downloading…</string> <string name="mode_decky_plugin_install_zip">Install from ZIP</string> - <!-- Store --> <string name="store_cat_games">Games</string> <string name="store_cat_audio_video">Audio & Video</string> <string name="store_cat_graphics">Graphics</string> @@ -1311,21 +1399,14 @@ <string name="store_cat_utilities">Utilities</string> <string name="store_section_popular">Popular</string> <string name="store_section_trending">Trending</string> - <!-- Store front-page section of recently added apps --> <string name="store_section_new">New</string> - <!-- Store front-page section of recently updated apps --> <string name="store_section_updated">Updated</string> <string name="store_section_loading">loading…</string> <string name="store_flatpak_setup">Flatpak setup</string> - <!-- %1$s is what failed (an app name or "Flatpak setup"), %2$s the error --> <string name="store_problem">%1$s: %2$s</string> <string name="store_updates_check_failed">Could not check Flathub for updates</string> - <!-- Library tiles --> - <!-- Subtitle of a game tile whose cover art was found --> <string name="content_rom_installed">installed</string> - <!-- Subtitle of a game that is a folder rather than a single file --> <string name="content_rom_folder">folder</string> - <!-- Launcher themes --> <string name="theme_graphite">Graphite</string> <string name="theme_graphite_detail">Graphite surfaces, with the logo\'s own orb blue for everything selected, focused or pressed.</string> <string name="theme_paper">Paper on black</string> @@ -1334,7 +1415,6 @@ <string name="theme_icon_blue_detail">Black ground, white type, the blue for everything selected, focused or pressed.</string> <string name="theme_electric">Electric navy</string> <string name="theme_electric_detail">The blue brighter, on surfaces that lean navy instead of grey.</string> - <!-- PC keyboard key caps (keep them short; they label physical PC keys) --> <string name="pckb_key_esc">Esc</string> <string name="pckb_key_ins">Ins</string> <string name="pckb_key_del">Del</string> @@ -1352,22 +1432,17 @@ <string name="pckb_key_alt">Alt</string> <string name="pckb_key_space">Space</string> <string name="pckb_key_altgr">AltGr</string> - <!-- Terminal key strip on the second screen --> <string name="second_key_tab">Tab</string> - <!-- A modifier key (%1$s, e.g. Ctrl) that is currently held --> <string name="second_key_on">%1$s ✓</string> <string name="second_key_ctrl_c">Ctrl+C</string> <string name="second_key_ctrl_d">Ctrl+D</string> - <!-- Game file sync errors --> <string name="game_sync_err_runtime">Install the runtime first</string> <string name="game_sync_err_steam_library">Steam library is unavailable</string> <string name="game_sync_err_previous_sd">Previous SD library is unavailable</string> <string name="game_sync_err_game_storage">Game storage is unavailable</string> <string name="game_sync_err_added_games">Added games folder is unavailable</string> <string name="game_sync_err_manifests">Steam manifests are unavailable</string> - <!-- The systems RetroArch emulates, shown under its name --> <string name="content_system_many">Many systems</string> - <!-- File manager --> <string name="fm_drive_internal">Internal</string> <string name="fm_drive_linux">Linux system</string> <string name="fm_drive_sd">SD card</string> @@ -1385,7 +1460,6 @@ <string name="fm_no_favorites">No favorites yet - pin a folder with its ⋮ menu to jump back here fast.</string> <string name="fm_unpin_favorite">Remove from favorites</string> <string name="fm_size_zero">0 bytes</string> - <!-- Size unit for sizes under 1 KB, shown after a number --> <string name="fm_unit_bytes">bytes</string> <string name="fm_prop_location">Location</string> <string name="fm_prop_type">Type</string> @@ -1393,7 +1467,6 @@ <string name="fm_prop_modified">Modified</string> <string name="fm_type_folder">Folder</string> <string name="fm_type_file">File</string> - <!-- File type in Properties; %1$s is the file extension in capitals, e.g. TXT --> <string name="fm_type_ext_file">%1$s file</string> <string name="fm_read_only">Read-only</string> <string name="fm_read_only_hint">Stops games (and Wine) from overwriting or deleting this file.</string> @@ -1407,15 +1480,11 @@ <string name="fm_delete_failed">Delete failed</string> <string name="fm_op_moving">Moving...</string> <string name="fm_op_copying">Copying...</string> - <!-- %1$s is the file name --> <string name="fm_op_moving_item">Moving - %1$s</string> <string name="fm_op_copying_item">Copying - %1$s</string> - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_moving_batch">Moving %1$d/%2$d - %3$s</string> <string name="fm_op_copying_batch">Copying %1$d/%2$d - %3$s</string> - <!-- Paste result; %1$d items done, %2$d items failed --> <string name="fm_paste_failed">%1$d done, %2$d failed</string> - <!-- Paste result; %1$d items done, %2$d items skipped --> <string name="fm_paste_skipped">%1$d done, %2$d skipped</string> <plurals name="fm_paste_moved"> <item quantity="one">%1$d item moved</item> @@ -1425,7 +1494,6 @@ <item quantity="one">%1$d item copied</item> <item quantity="other">%1$d items copied</item> </plurals> - <!-- %1$s is a file or folder name --> <string name="fm_already_exists">\"%1$s\" already exists</string> <string name="fm_op_renaming">Renaming...</string> <string name="fm_rename_failed">Rename failed</string> @@ -1436,19 +1504,16 @@ <string name="fm_create">Create</string> <string name="fm_new_name">New name</string> <string name="fm_delete_title">Delete?</string> - <!-- %1$s is a file or folder name --> <string name="fm_delete_text">Delete \"%1$s\" permanently?</string> <plurals name="fm_delete_items_title"> <item quantity="one">Delete %1$d item?</item> <item quantity="other">Delete %1$d items?</item> </plurals> <string name="fm_cannot_undo">This can\'t be undone.</string> - <!-- After a list of the first five names in a delete confirmation --> <plurals name="fm_and_more"> <item quantity="one">…and %1$d more</item> <item quantity="other">…and %1$d more</item> </plurals> - <!-- %1$d is the item number, %2$d the number of items, %3$s the file name --> <string name="fm_op_deleting_batch">Deleting %1$d/%2$d - %3$s</string> <plurals name="fm_delete_some_failed"> <item quantity="one">%1$d couldn\'t be deleted</item> @@ -1463,7 +1528,6 @@ <string name="fm_conflict_skip">Skip</string> <string name="fm_select_this_folder">Select this folder</string> <string name="fm_back">Back</string> - <!-- %1$s is a storage name, e.g. SD card --> <string name="fm_drive_not_readable">%1$s is mounted but not readable right now</string> <string name="fm_list_view">List view</string> <string name="fm_grid_view">Grid view</string> @@ -1478,42 +1542,32 @@ <string name="fm_hide_favorites">Hide favorites</string> <string name="fm_show_favorites">Show favorites</string> <string name="fm_filter_folder">Filter this folder</string> - <!-- Free space on the storage being browsed; %1$s is a size, e.g. 12.50 GB --> <string name="fm_free_space">%1$s free</string> <string name="fm_selected_count">%1$d selected</string> - <!-- Selection bar: clear the selection --> <string name="fm_select_none">None</string> - <!-- Selection bar: select every item --> <string name="fm_select_all">All</string> <string name="fm_paste">Paste</string> <plurals name="fm_items"> <item quantity="one">%1$d item</item> <item quantity="other">%1$d items</item> </plurals> - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_here">Paste %1$s here</string> - <!-- %1$s is a file name or a number of items --> <string name="fm_paste_move_here">Paste %1$s (move) here</string> <string name="fm_rail_title">Files</string> <string name="fm_rail_storage">STORAGE</string> - <!-- Rail section of shortcut folders (Downloads, ROMs, …) --> <string name="fm_rail_quick">QUICK</string> <string name="fm_rail_favorites">FAVORITES</string> <string name="fm_rail_downloads">Downloads</string> - <!-- Downloads shortened to fit under an icon (about 8 characters) --> <string name="fm_rail_downloads_short">Downlds</string> <string name="fm_rail_roms">ROMs</string> <string name="fm_rail_session_logs">Session logs</string> <string name="fm_rail_pictures">Pictures</string> - <!-- %1$s is a folder name --> <string name="fm_favorite_added">Added \"%1$s\" to Favorites</string> - <!-- %1$s is a folder name --> <string name="fm_favorite_removed">Removed \"%1$s\" from Favorites</string> <string name="fm_empty_directory">Empty directory</string> <string name="fm_up_one_level">Up one level</string> <string name="fm_choose_folder">Choose a folder</string> <string name="fm_choose_file">Choose a file</string> - <!-- On-screen controller tint colors --> <string name="ctrl_tint_steam_blue">Steam blue</string> <string name="ctrl_tint_sky">Sky</string> <string name="ctrl_tint_white">White</string> @@ -1522,7 +1576,6 @@ <string name="ctrl_tint_amber">Amber</string> <string name="ctrl_tint_red">Red</string> <string name="ctrl_tint_pink">Pink</string> - <!-- On-screen buttons that can be remapped --> <string name="ctrl_button_a">A button</string> <string name="ctrl_button_b">B button</string> <string name="ctrl_button_x">X button</string> @@ -1533,7 +1586,6 @@ <string name="ctrl_button_rt">Right trigger</string> <string name="ctrl_button_view">View button</string> <string name="ctrl_button_menu">Menu button</string> - <!-- What a remapped on-screen button sends; letters and Steam are controller button names --> <string name="ctrl_target_a" translatable="false">A</string> <string name="ctrl_target_b" translatable="false">B</string> <string name="ctrl_target_x" translatable="false">X</string> @@ -1545,27 +1597,21 @@ <string name="ctrl_target_l3" translatable="false">L3</string> <string name="ctrl_target_r3" translatable="false">R3</string> <string name="ctrl_target_steam" translatable="false">Steam</string> - <!-- Controller View button --> <string name="ctrl_target_view">View</string> - <!-- Controller Menu button --> <string name="ctrl_target_menu">Menu</string> <string name="ctrl_target_up">D-pad up</string> <string name="ctrl_target_down">D-pad down</string> <string name="ctrl_target_left">D-pad left</string> <string name="ctrl_target_right">D-pad right</string> - <!-- The on-screen button is not shown --> <string name="ctrl_target_hidden">Hidden</string> <string name="ctrl_editor_drag">Drag to move</string> <string name="ctrl_editor_snap">Snap</string> <string name="ctrl_editor_save">Save</string> - <!-- What the second screen shows during a session --> <string name="second_mode_none">None</string> <string name="second_mode_keyboard_trackpad">Keyboard + trackpad</string> <string name="second_mode_terminal">Terminal</string> <string name="second_mode_deck_controls">Deck grips + trackpads</string> - <!-- Runtime, updates and setup helpers --> - <!-- Linux runtime install / removal (LinuxRuntimeInstaller, RuntimeInstallService) --> <string name="rtinst_removing">Removing Linux runtime</string> <plurals name="rtinst_removing_entries"> <item quantity="one">Removing Linux runtime · %1$d entry</item> @@ -1581,63 +1627,47 @@ <string name="rtinst_title_installing">Installing the Linux runtime</string> <string name="rtinst_title_removing">Removing the Linux runtime</string> - <!-- Hosted desktop and emulator packages (DesktopCatalog) --> <string name="deskpkg_runtime_missing">The Linux runtime is not installed</string> - <!-- %1$s: package name --> <string name="deskpkg_no_checksum">The catalog has no checksum for %1$s</string> <string name="deskpkg_checksum_mismatch">Checksum mismatch - nothing was changed</string> - <!-- %1$s: package name --> <string name="deskpkg_installing">Installing %1$s</string> <string name="deskpkg_place_failed">Could not place the AppImage</string> <string name="deskpkg_extract_failed">Extraction failed</string> <string name="deskpkg_install_failed">Install failed</string> - <!-- Flatpak store operations (FlatpakManager) --> <string name="flatpakmgr_setup_failed">Flatpak setup failed (exit %1$d)</string> <string name="flatpakmgr_setup_unfinished">Flatpak setup did not finish</string> <string name="flatpakmgr_busy">Another store task is running</string> <string name="flatpakmgr_not_ready">Set up Flatpak first</string> <string name="flatpakmgr_starting">Starting</string> <string name="flatpakmgr_exit_status">Flatpak exited with status %1$d</string> - <!-- %1$s: an app or runtime name, e.g. "SuperTux" or "GNOME runtime 50" --> <string name="flatpakmgr_installing">Installing %1$s</string> <string name="flatpakmgr_updating">Updating %1$s</string> <string name="flatpakmgr_removing">Removing %1$s</string> - <!-- %1$s: an app or runtime name; %2$d of %3$d: this step and the number of steps --> <string name="flatpakmgr_installing_step">Installing %1$s (%2$d/%3$d)</string> <string name="flatpakmgr_updating_step">Updating %1$s (%2$d/%3$d)</string> <string name="flatpakmgr_removing_step">Removing %1$s (%2$d/%3$d)</string> - <!-- Names for Flatpak runtime parts, shown inside "Installing %1$s" --> <string name="flatpakmgr_ref_translations">translations</string> <string name="flatpakmgr_ref_graphics_drivers">graphics drivers</string> <string name="flatpakmgr_ref_media_codecs">media codecs</string> - <!-- %1$s: runtime vendor, e.g. GNOME, KDE, Freedesktop --> <string name="flatpakmgr_ref_runtime">%1$s runtime</string> - <!-- %1$s: runtime vendor, e.g. GNOME; %2$s: its version, e.g. 50 --> <string name="flatpakmgr_ref_runtime_branch">%1$s runtime %2$s</string> - <!-- Imported AppImages (AppImageManager) --> <string name="appimg_too_small">The file is too small to be an AppImage</string> - <!-- %1$s: the system's reason --> <string name="appimg_unreadable">The file cannot be read: %1$s</string> <string name="appimg_not_linux">This is not an AppImage (it is not a Linux program)</string> <string name="appimg_wrong_arch">This AppImage is built for neither ARM64 (aarch64) nor x86 PCs</string> <string name="appimg_not_appimage">This is a Linux program but not an AppImage</string> <string name="appimg_wrong_type">Only type 2 AppImages can be imported (this one is type %1$d)</string> - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_import">Not enough free space: importing needs about %1$s</string> - <!-- %1$s: a size such as "3.2 GB" --> <string name="appimg_no_space_update">Not enough free space: updating needs about %1$s</string> <string name="appimg_import_failed">Import failed</string> <string name="appimg_gone">That AppImage is gone</string> <string name="appimg_update_failed">Update failed</string> - <!-- %1$s: file name --> <string name="appimg_extracting">Extracting %1$s</string> <string name="appimg_extract_failed">The AppImage could not be extracted</string> - <!-- %1$s: the last line the extractor printed --> <string name="appimg_extract_failed_detail">The AppImage could not be extracted: %1$s</string> - <!-- Decky Loader and plugin installs (DeckyManager) --> <string name="deckymgr_stop_session_loader">Stop the active session before installing Decky Loader</string> <string name="deckymgr_download_failed">Decky Loader download failed</string> <string name="deckymgr_size_mismatch">Decky Loader size did not match the release metadata</string> @@ -1673,20 +1703,13 @@ <string name="deckymgr_remote_entry_invalid">Invalid remote_binary entry</string> <string name="deckymgr_remote_name_invalid">Invalid remote binary name</string> <string name="deckymgr_remote_url_https">Remote binary URL must use HTTPS</string> - <!-- %1$s: binary file name --> <string name="deckymgr_remote_hash_invalid">Remote binary %1$s has an invalid SHA-256 hash</string> <string name="deckymgr_bin_dir_failed">Could not create plugin bin directory</string> - <!-- %1$s: binary file name --> <string name="deckymgr_downloading_binary">Downloading plugin binary · %1$s</string> - <!-- %1$s: binary file name --> <string name="deckymgr_binary_download_failed">Could not download plugin binary %1$s</string> - <!-- %1$s: binary file name --> <string name="deckymgr_binary_checksum_mismatch">Plugin binary checksum mismatch · %1$s</string> - <!-- %1$s: binary file name --> <string name="deckymgr_binary_not_executable">Could not mark plugin binary executable · %1$s</string> - <!-- %1$s: binary file name --> <string name="deckymgr_binary_replace_failed">Could not replace plugin binary · %1$s</string> - <!-- %1$s: binary file name --> <string name="deckymgr_binary_install_failed">Could not install plugin binary · %1$s</string> <string name="deckymgr_folder_taken">Plugin folder belongs to another plugin</string> <string name="deckymgr_preserve_failed">Could not preserve the existing plugin</string> @@ -1694,20 +1717,14 @@ <string name="deckymgr_settings_failed">Could not update Decky plugin settings</string> <string name="deckymgr_restore_failed">Could not restore the existing plugin</string> - <!-- Child-process limit change over Wireless debugging (WirelessAdbFix) --> <string name="adbfix_save_failed">Could not save Wireless debugging identity</string> - <!-- %1$d: the command's exit status --> <string name="adbfix_command_failed">ADB command failed (%1$d)</string> - <!-- %1$s: what Android answered --> <string name="adbfix_not_confirmed">Android did not confirm the child-process limit was changed: %1$s</string> <string name="adbfix_no_pairing">No Wireless debugging pairing is saved</string> <string name="adbfix_enter_address">Enter the current Wireless debugging IP address & Port</string> - <!-- Wireless debugging pairing notification (WirelessAdbPairingService) --> <string name="adbpair_timed_out">Timed out waiting for the pairing pop-up. Try again from DroidDeck.</string> - <!-- %1$d: Android's error code --> <string name="adbpair_discovery_failed_code">Could not look for the pairing pop-up (%1$d). Check that Wi-Fi is on.</string> - <!-- %1$s: the system's reason --> <string name="adbpair_discovery_failed">Could not look for the pairing pop-up: %1$s</string> <string name="adbpair_six_digits">Enter all 6 digits of the code</string> <string name="adbpair_pairing">Pairing…</string> @@ -1721,27 +1738,22 @@ <string name="adbpair_title_pair">Pair Wireless debugging</string> <string name="adbpair_waiting_text">Turn on Wireless debugging, then tap “Pair device with pairing code”.</string> <string name="adbpair_waiting_long">Turn on Wireless debugging, then tap “Pair device with pairing code”. Stay in Settings: the code goes in this notification.</string> - <!-- Label of the notification's reply field --> <string name="adbpair_code_label">6-digit pairing code</string> <string name="adbpair_code_hint">Tap Enter code and type the 6 digits shown in Settings.</string> <string name="adbpair_title_code">Enter the Wi-Fi pairing code</string> <string name="adbpair_title_retry">Try the code again</string> - <!-- Notification action button --> <string name="adbpair_enter_code">Enter code</string> <string name="adbpair_title_working">Setting up Steam</string> <string name="adbpair_title_done">Steam is ready</string> <string name="adbpair_done_text">Tap to go back to DroidDeck. You can turn Wireless debugging off now.</string> <string name="adbpair_title_failed">Wireless debugging setup stopped</string> - <!-- DroidDeck's own updates (SelfInstaller, AppUpdates) --> - <string name="selfinst_http">The download answered HTTP %1$d</string> + <string name="selfinst_download_failed">Download failed</string> <string name="selfinst_size_mismatch">The download size didn\'t match the published APK and was discarded - try again</string> <string name="selfinst_checksum_mismatch">The download didn\'t match its checksum and was discarded - try again</string> - <!-- %1$s: the update's Android package name; %2$s: this app's --> <string name="selfinst_wrong_package">The update is for Android package %1$s, not %2$s</string> <string name="selfinst_metadata_signer">The update metadata doesn\'t name DroidDeck\'s release signing key</string> <string name="selfinst_unreadable">Android couldn\'t read the downloaded APK</string> - <!-- %1$s: the APK's Android package name; %2$s: this app's --> <string name="selfinst_apk_wrong_package">The downloaded APK is for %1$s, not %2$s</string> <string name="selfinst_version_mismatch">The downloaded APK says versionCode %1$d, not the published %2$d</string> <string name="selfinst_downgrade">Android won\'t install versionCode %1$d over the installed %2$d</string> @@ -1749,16 +1761,11 @@ <string name="selfinst_wrong_signer">The downloaded APK isn\'t signed with DroidDeck\'s release key</string> <string name="appupd_http">The update catalog answered HTTP %1$d</string> - <!-- Session, GPU and display --> - <!-- Session loading screen --> <string name="loadstate_starting">Starting the session…</string> - <!-- %1$d minutes, %2$02d seconds since the session started --> <string name="loadstate_elapsed">%1$d:%2$02d elapsed · still working</string> <string name="loadstate_steam_update">Downloading the Steam client update · %1$d%%</string> - <!-- %1$s is the client's own download progress, as it prints it --> <string name="loadstate_steam_client">Downloading the Steam client · %1$s</string> - <!-- Installing GE-Proton / proton-cachyos (%1$s is the tool's name, %2$s its release tag) --> <string name="pextra_busy">A compatibility tool install is already running</string> <string name="pextra_stop_session">Stop the active session before installing compatibility tools</string> <string name="pextra_no_release">Could not find an ARM64 release for %1$s</string> @@ -1775,48 +1782,38 @@ <string name="pextra_checksum_mismatch">Checksum mismatch; the download was deleted</string> <string name="pextra_session_started">A session started during the download; stop it before installing compatibility tools</string> <string name="pextra_installing">Installing %1$s</string> - <!-- %2$d is the installer's exit status --> <string name="pextra_install_failed">%1$s installation failed (exit %2$d)</string> <string name="pextra_could_not_install">Could not install %1$s</string> <string name="esync_fetching">Fetching droiddeck-esync pack</string> - <!-- Components (FEX / DXVK / VKD3D-Proton swapped into a Proton). %1$s component, %2$s version, %3$s Proton --> <string name="cmgr_fex_linux_helpers">with Linux helpers</string> <string name="cmgr_fex_dlls_only">DLLs only</string> <string name="cmgr_original_proton_updated">Original (Proton updated since the last swap)</string> <string name="cmgr_changed_outside">Changed outside Components</string> - <!-- A component version that could not be found in a Proton --> <string name="cmgr_not_present">not present</string> - <!-- %1$s is the Proton build the original files were saved from --> <string name="cmgr_original_version">Original %1$s</string> <string name="cmgr_original_from">Original from %1$s</string> <string name="cmgr_swap_queued">%1$s %2$s goes into %3$s when the game running on it closes.</string> <string name="cmgr_swap_done">%1$s %2$s is now in %3$s. It applies the next time a game starts.</string> <string name="cmgr_original_missing">That original bundle is not stored</string> - <!-- %1$s component, %2$s Proton --> <string name="cmgr_restore_queued">%1$s of %2$s goes back to its original when the game running on it closes.</string> - <!-- %1$s component, %2$s Proton, %3$s the Proton build the original came from --> <string name="cmgr_restore_done">%1$s of %2$s restored from its %3$s original.</string> - <!-- %1$s package file, %2$s Proton id --> <string name="cmgr_package_in_use">%1$s is in use in %2$s. Swap that Proton to something else first.</string> <string name="cmgr_package_not_stored">%1$s is not stored</string> <string name="cmgr_deleted">Deleted %1$s.</string> <string name="cmgr_original_kept">The installed build\'s original is kept: it is the way back.</string> <string name="cmgr_not_stored">Not stored</string> - <!-- %1$s Proton build, %2$s component --> <string name="cmgr_deleted_original">Deleted the %1$s original of %2$s.</string> <string name="cmgr_nightlies_only">Downloads come only from the Nightlies releases</string> <string name="cmgr_list_predates_checksums">This package list predates checksums - refresh it and try again</string> <string name="cmgr_checksum_mismatch">Checksum mismatch</string> - <!-- Display choices --> <string name="sprefs_upscaler_linear">Linear</string> <string name="sprefs_upscaler_nearest">Nearest</string> <string name="sprefs_upscaler_gsr_quality">Snapdragon GSR (quality)</string> <string name="sprefs_upscaler_sharpen">Sharpen only</string> <string name="sprefs_lod_bias_auto">Auto (match scaling)</string> - <!-- Screen effect Looks: preset names and the line under the row --> <string name="look_off_desc">Nothing applied.</string> <string name="look_game_clarity">Game Clarity</string> <string name="look_game_clarity_desc">Sharpening with a touch of contrast - the everyday one.</string> @@ -1841,27 +1838,23 @@ <string name="look_anime_edge">Anime Edge</string> <string name="look_anime_edge_desc">Toon outlines plus sharpening.</string> - <!-- GPU support line --> <string name="gpuinfo_not_adreno">Not an Adreno GPU</string> <string name="gpuinfo_supported">Supported</string> <string name="gpuinfo_experimental">Experimental: its drivers are test builds</string> <string name="gpuinfo_below_tested">Below tested hardware (Adreno 725 and newer): it may not run</string> <string name="gpuinfo_unsupported">Not supported: DroidDeck needs an Adreno (Snapdragon) GPU</string> - <!-- Driver downloads and imports --> <string name="turnip_rate_limited">GitHub\'s rate limit was hit - try again later</string> <string name="turnip_github_http">GitHub answered HTTP %1$d</string> - <string name="turnip_download_http">download answered HTTP %1$d</string> + <string name="turnip_download_failed">Download failed</string> <string name="turnip_list_predates_checksums">This driver list predates checksums - refresh it and try again</string> <string name="turnip_checksum_mismatch">Checksum mismatch - the download was discarded</string> - <!-- %1$s is one of the turnip_reject_* reasons --> <string name="turnip_not_adrenotools">Not an AdrenoTools driver: %1$s</string> <string name="turnip_reject_no_meta">no meta.json</string> <string name="turnip_reject_meta_unreadable">meta.json is unreadable (%1$s)</string> <string name="turnip_reject_linux_driver">this is a Linux runtime driver (import it under \"Linux runtime driver\")</string> <string name="turnip_reject_wayland">this is a Wayland game driver, which this app has no use for</string> <string name="turnip_reject_no_library_name">meta.json names no libraryName, so nothing could be handed to AdrenoTools</string> - <!-- %1$s is a library file name --> <string name="turnip_reject_library_missing">meta.json names %1$s, which is not in the zip</string> <string name="turnip_reject_not_aarch64">%1$s is not a 64-bit AArch64 ELF shared library</string> <string name="turnip_reject_glibc">%1$s links glibc - a \"-Linux\" Turnip, which belongs under \"Linux runtime driver\"</string> @@ -1872,91 +1865,62 @@ <string name="bundle_entry_outside">Not a driver bundle: %1$s points outside it</string> <string name="bundle_too_large">Not a driver bundle: it unpacks to more than %1$d MB</string> - <!-- Game storage --> <string name="gstore_sd_card">SD card</string> - <!-- %1$s is a size, like 12.3 GB --> <string name="gstore_folder">Folder</string> <string name="gstore_folder_on_volume" translatable="false">%1$s (%2$s)</string> <string name="logshare_chooser">Share session logs</string> - <!-- Stands in for the Steam account name when the client did not record one --> - <!-- Why the HDR switch is greyed out --> <string name="hdr_needs_android_10">needs Android 10 or newer (display layers with a color space)</string> <string name="hdr_none">this display reports no HDR support</string> - <!-- %1$s lists HDR formats, like Dolby Vision, HDR10+ --> <string name="hdr_not_hdr10">this display supports %1$s, not HDR10</string> - <!-- Follow-up --> - <!-- Stands in for the GPU name when the device does not report one --> <string name="gpu_this_gpu">this GPU</string> <string name="phantom_title_on">Child-process limit is on</string> <string name="phantom_title_unset">Child-process limit is unset</string> <string name="phantom_title_unreadable">Child-process limit could not be checked</string> <string name="phantom_title_off">Child-process limit is off</string> <string name="phantom_title_not_required">Child-process limit not required</string> - <!-- %1$s is the sentence saying how to turn the limit off on this device --> <string name="phantom_instructions_fix">%1$s If that is not possible, connect this device to a computer with ADB and run the command below. Return here and check again.</string> <string name="phantom_instructions_off">Steam sessions can start.</string> <string name="phantom_instructions_not_applicable">This Android version does not use this limit.</string> <string name="phantom_fix_toggle">Turn on “Disable child process restrictions” in Developer options, and keep Developer options on afterwards.</string> <string name="phantom_fix_no_toggle">This Android version has no switch for it. Use Wireless debugging to change it from this device.</string> <string name="upd_block_no_apk">This build has no download for this copy of DroidDeck.</string> - <!-- %1$d is the offered build's versionCode, %2$d the installed one's --> <string name="upd_block_version_code">Android won\'t install it over this build because its versionCode %1$d is below the installed %2$d.</string> <string name="upd_fail_downgrade">Android won\'t install an older version over a newer one. Stay on this build until the channel catches up.</string> <string name="upd_fail_signature">This copy of DroidDeck is signed differently (a local build?), so Android won\'t update it in place.</string> <string name="upd_fail_storage">There isn\'t enough free space for the update.</string> <string name="upd_fail_aborted">The update was cancelled.</string> - <!-- %1$s is Android's own (English) installer message --> <string name="upd_fail_with_message">The update didn\'t install: %1$s</string> <string name="upd_fail_generic">The update didn\'t install.</string> - <!-- A save zip's layout; %1$s is the app it comes from (GameHub, Winlator) --> <string name="saves_layout_zip">%1$s zip</string> - <!-- A save zip whose layout is not known --> <string name="saves_zip">zip</string> - <!-- %1$s is the game's name --> <string name="saves_not_launched">%1$s has not been launched yet</string> <string name="saves_none_found">No save files found for %1$s</string> - <!-- %1$s is the zip's file name --> <string name="saves_not_save_zip">%1$s has no drive_c folder, so it isn\'t a GameHub or Winlator save zip</string> - <!-- %1$s is a folder path --> <string name="gstore_cannot_create">cannot create folders in %1$s</string> <string name="gstore_cannot_write">cannot write in %1$s</string> - <!-- %1$s is a folder path, %2$s the system's error --> <string name="gstore_cannot_write_detail">cannot write in %1$s (%2$s)</string> <string name="gfiles_folder_unavailable">Folder is unavailable</string> - <!-- %1$s is a file name --> <string name="gfiles_name_taken">A different file already uses %1$s</string> <string name="gfiles_art_unavailable">Artwork folder is unavailable</string> <string name="gfiles_unrelated_inventory">Folder has an unrelated sync inventory</string> - <!-- %1$s is a file name --> <string name="gfiles_remove_failed">Could not remove %1$s</string> <string name="gfiles_outside_folder">File leaves the export folder</string> - <!-- A FEX build whose DLL carries no version name --> <string name="cmgr_fex_unnamed">FEX (build without a version name)</string> - <!-- %1$s is a package file name --> <string name="cmgr_no_profile">no profile.json in %1$s</string> - <!-- %1$s is a package file name, %2$s the type its profile.json gives --> <string name="cmgr_not_component_package">%1$s is not a Linux component package (type %2$s)</string> - <!-- A storage volume in the second-library menu; %1$s is its name, %2$s its free space, like 12.3 GB --> <string name="gstore_volume_free">%1$s · %2$s free</string> - <!-- The second-library setting's value when it is automatic (short form of mode_storage_auto) --> <string name="mode_storage_auto_short">Automatic</string> - <!-- %1$s is the technical reason, kept in English --> <string name="appupd_catalog_rejected">The update catalog failed its checks (%1$s)</string> - <!-- Label of the copied ADB command on the clipboard --> <string name="main_adb_clip_label">DroidDeck child-process setting</string> - <!-- Signed in, but the Steam client recorded no account name --> <string name="setup_signed_in_offline_unnamed">Signed in · offline mode</string> <string name="setup_signed_in_unnamed">Signed in</string> - <!-- Small uppercase tags beside a driver's name: where it came from --> <string name="driver_tag_bundled">BUNDLED</string> <string name="driver_tag_downloaded">DOWNLOADED</string> <string name="driver_tag_imported">IMPORTED</string> - <!-- The driver is one half of a bundle that sets both drivers --> <string name="driver_tag_bundle">ANDROID + LINUX</string> - <!-- %1$s is the limit's state (e.g. Child-process limit is on), %2$s what to do, %3$s the ADB command --> <string name="phantom_warning">%1$s. %2$s\n\n%3$s</string> <string name="display_session">Session display</string> <string name="display_resolution">Resolution</string> @@ -1985,7 +1949,6 @@ <string name="force_ssbs_title">Force SSBS</string> <string name="force_ssbs_hint">Keeps a CPU speed setting on that Wine keeps turning off. Can make Windows games faster on Snapdragon 8 Elite; little change seen on older chips. Applies on the next game launch.</string> - <!-- Stores: GOG, Epic Games and Amazon Games --> <string name="rail_stores">Stores</string> <string name="source_steam">Steam</string> <string name="source_added">Custom</string> @@ -2031,6 +1994,7 @@ <string name="stores_play">Play</string> <string name="stores_install">Install</string> <string name="stores_resume_install">Resume install</string> + <string name="stores_dl_interrupted">Interrupted</string> <string name="stores_install_size">Install · %1$s</string> <string name="stores_get_free">Get for free</string> <string name="stores_view_on">View on %1$s</string> @@ -2040,6 +2004,16 @@ <string name="stores_free">Free</string> <string name="stores_resume">Resume</string> <string name="stores_refresh">Refresh</string> + <string name="stores_sort">Sort</string> + <string name="stores_sort_last_played">Recently played</string> + <string name="stores_sort_recently_installed">Recently installed</string> + <string name="stores_sort_title_asc">Title A–Z</string> + <string name="stores_sort_title_desc">Title Z–A</string> + <string name="stores_sort_size_desc">Size: largest</string> + <string name="stores_sort_size_asc">Size: smallest</string> + <string name="stores_sort_release_date">Release date</string> + <string name="stores_view_list">List view</string> + <string name="stores_view_cards">Card view</string> <string name="stores_show_mature">Show mature content</string> <string name="epic_card_title">Epic</string> <string name="epic_card_eos">EOS</string> @@ -2048,6 +2022,21 @@ <string name="epic_eos">Epic sign-in (EOS)</string> <string name="epic_offline">Launch offline</string> <string name="epic_resolve">Resolve Epic sign-in</string> + <string name="epic_client_title" translatable="false">Epic Games Launcher</string> + <string name="epic_client_version">Version %1$s</string> + <string name="epic_client_no_runtime">Install the Linux runtime first</string> + <string name="epic_client_checking">Checking for the latest version…</string> + <string name="epic_client_unpacking">Unpacking…</string> + <string name="epic_client_unreachable">The download server did not answer</string> + <string name="epic_client_needs_fex">The Epic Games Launcher needs FEX, which Steam downloads. Open the launcher again after Steam has started.</string> + <string name="epic_client_download_failed">Download failed: %1$s</string> + <string name="epic_client_unpack_failed">Could not unpack the launcher: %1$s</string> + <string name="epic_client_sign_in_failed">The Epic Games Launcher did not take the sign-in. Start it again from the launcher.</string> + <string name="epic_client_uninstall_body">Removes the launcher and frees its space. Your Epic games stay installed and keep working, and its sign-in is kept for when you install it again.</string> + <string name="epic_client_uninstall_stops">The running session closes first.</string> + <string name="epic_client_uninstalled">Epic Games Launcher uninstalled</string> + <string name="epic_client_uninstall_failed">Some launcher files could not be removed. Try again.</string> + <string name="epic_client_uninstalling">Wait for the Epic Games Launcher to finish uninstalling</string> <string name="store_cloud_saves">Cloud saves</string> <string name="cloud_upload">Upload to cloud</string> <string name="cloud_download">Download from cloud</string> @@ -2064,9 +2053,37 @@ <string name="stores_eyebrow_installed">installed</string> <string name="stores_eyebrow_library">in your library</string> <string name="stores_eyebrow_store">store</string> + <string name="achievements_title">Achievements</string> + <string name="achievements_count">%1$d of %2$d unlocked</string> + <string name="achievements_count_short">%1$d / %2$d</string> + <string name="achievements_group_unlocked">Unlocked · %1$d</string> + <string name="achievements_group_locked">Locked · %1$d</string> + <string name="achievements_group_hidden">Hidden · %1$d</string> + <string name="achievements_hidden">Hidden achievement</string> + <string name="achievements_hidden_detail">Details are shown once it is unlocked.</string> + <string name="achievements_all">Every achievement unlocked</string> + <string name="achievements_reading">Reading…</string> + <string name="achievements_signed_out">Sign in to %1$s to see your achievements.</string> + <string name="achievements_unreachable">Could not reach %1$s. Check back once you are online.</string> + <string name="achievements_none">%1$s lists no achievements for this game.</string> + <string name="achievements_show_all">Show all %1$d</string> + <string name="achievements_dialog_title">Achievements · %1$s</string> + <string name="stores_fact_developer">Developer</string> + <string name="stores_fact_publisher">Publisher</string> + <string name="stores_fact_released">Released</string> + <string name="stores_fact_metacritic" translatable="false">Metacritic</string> + <string name="stores_fact_hltb" translatable="false">HowLongToBeat</string> + <string name="stores_hltb_main">Main</string> + <string name="stores_hltb_extras">+ Extras</string> + <string name="stores_hltb_completionist">Completionist</string> + <string name="stores_hltb_hours">%1$s h</string> + <string name="stores_hltb_minutes">%1$d min</string> <string name="stores_in_steam">✓ In Steam</string> <string name="stores_uninstall">Uninstall</string> - <string name="stores_uninstall_confirm">Press again to uninstall</string> + <string name="stores_uninstalling">Uninstalling…</string> + <string name="stores_uninstall_title">Uninstall %1$s?</string> + <string name="stores_uninstall_body_size">Frees %1$s and removes it from Steam.</string> + <string name="stores_uninstall_body">Removes its files and its Steam shortcut.</string> <string name="stores_launch_not_registered">Steam picks the game up when it next starts; launch it from there, or start Steam now.</string> <string name="stores_card_proton">Proton</string> <string name="stores_card_proton_value">Steam\'s choice per game</string> @@ -2124,6 +2141,9 @@ <string name="stores_install_title">Install %1$s:</string> <string name="stores_target_internal">Internal</string> <string name="stores_target_free">%1$s free</string> + <string name="stores_target_free_unknown">Free space unknown</string> + <string name="stores_storage_insufficient">Not enough free space: need %1$s, only %2$s free</string> + <string name="stores_storage_low">Insufficient space (%1$s free, need %2$s)</string> <string name="stores_notification_channel">Store downloads</string> <string name="stores_notification_channel_hint">Shows game download progress and keeps downloads running in the background</string> <string name="stores_notification_one">Downloading</string> @@ -2159,6 +2179,21 @@ <string name="edit_other_exe">Other exe…</string> <string name="edit_remove">Remove</string> <string name="art_cover">Cover</string> + <string name="art_wide_cover">Wide cover</string> + <string name="art_adjust_logo">Adjust logo</string> + <string name="logo_pos_default">Default</string> + <string name="logo_pos_upper_left">Top left</string> + <string name="logo_pos_upper_center">Top center</string> + <string name="logo_pos_center">Center</string> + <string name="logo_pos_bottom_left">Bottom left</string> + <string name="logo_pos_bottom_center">Bottom center</string> + <string name="logo_pos_position">Position</string> + <string name="logo_pos_size">Size</string> + <string name="logo_pos_save">Save</string> + <string name="logo_pos_reset">Reset to default</string> + <string name="logo_pos_hint">Shown on the game\'s background, the way Steam draws it. The exact spot can differ by a few pixels.</string> + <string name="logo_pos_no_logo">This game has no logo yet. Choose one under Logo to see it here.</string> + <string name="logo_pos_failed">Couldn\'t save the logo position. Try again.</string> <string name="art_background">Background</string> <string name="art_logo">Logo</string> <string name="art_icon">Icon</string> @@ -2171,6 +2206,17 @@ <string name="art_pick_image">Pick image…</string> <string name="art_pick_title">Pick an image: %1$s</string> <string name="art_reset">Reset to automatic</string> + <string name="art_search_sgdb">Search SteamGridDB…</string> + <string name="art_sgdb_title">SteamGridDB: %1$s</string> + <string name="art_sgdb_search_label">Search for a game</string> + <string name="art_sgdb_other_games">Other matches</string> + <string name="art_sgdb_none">Nothing found.</string> + <string name="art_sgdb_no_key">SteamGridDB needs an API key. Add yours in Setup › Launcher.</string> + <string name="art_sgdb_bad_key">SteamGridDB did not accept the API key. Check it in Setup › Launcher.</string> + <string name="art_sgdb_limit">SteamGridDB is limiting requests right now. Try again in a minute.</string> + <string name="art_sgdb_offline">SteamGridDB could not be reached. Check the connection.</string> + <string name="art_sgdb_server">SteamGridDB had a problem. Try again later.</string> + <string name="art_sgdb_no_game">SteamGridDB has no match for this game. Try a search.</string> <plurals name="games_added_n"> <item quantity="one">%1$d game added</item> <item quantity="other">%1$d games added</item> @@ -2179,13 +2225,10 @@ <item quantity="one">%1$d already in Games</item> <item quantity="other">%1$d already in Games</item> </plurals> - <!-- A page reached through a link from another section: the way back, named for where it came from. --> <string name="hop_back">B · Back to %1$s</string> <string name="hop_from_games">the game</string> <string name="hop_from_play">Play settings</string> - <!-- The lifted settings sheets under Play and Open desktop. --> <string name="sheet_graphics_drivers">Graphics drivers</string> - <!-- Components as one stack of layers. --> <string name="comp_this_proton">This Proton</string> <string name="comp_every_proton">Every Proton</string> <string name="comp_for_every_proton">For every Proton</string> @@ -2201,9 +2244,50 @@ <string name="gpu_bar_auto">Auto · %1$s</string> <string name="gpu_separately">Runtime and display drivers separately</string> <string name="gpu_use_title">Use %1$s?</string> + <string name="gpu_mode_title">How drivers are chosen</string> + <string name="gpu_mode_auto_detail">Best pair for this GPU, kept current</string> + <string name="gpu_mode_pair">Matched pair</string> + <string name="gpu_mode_pair_detail">Pick one pair; it sets both drivers</string> + <string name="gpu_mode_mix">Mix and match</string> + <string name="gpu_mode_mix_detail">Choose display and runtime separately</string> + <string name="gpu_mode_pair_short">Pair</string> + <string name="gpu_mode_mix_short">Mixed</string> + <string name="gpu_src_auto">AUTO</string> + <string name="gpu_src_pair">PAIR</string> + <string name="gpu_src_bundle">BUNDLE</string> + <string name="gpu_src_chosen">CHOSEN</string> + <string name="gpu_src_by_gpu">BY GPU</string> + <string name="gpu_src_default">DEFAULT</string> + <string name="gpu_display_live">Drawing now</string> + <string name="gpu_display_pending">Restart pending · %1$s draws until then</string> + <string name="gpu_runtime_live">Running now</string> + <string name="gpu_runtime_pending">Next session · this session keeps %1$s</string> + <string name="gpu_display_next">Draws the screen. Applies from the next session.</string> + <string name="gpu_previous_driver">the previous driver</string> + <string name="gpu_restart_banner">Restart to switch the display driver.</string> + <string name="gpu_restart_blocked">Stop the running session, then restart DroidDeck to switch the display driver.</string> + <string name="gpu_restart_now">Restart now</string> + <string name="gpu_restart_later">Later</string> + <string name="gpu_auto_title">Auto picked this pair for your %1$s</string> + <string name="gpu_auto_builtin_title">Auto is using the built-in drivers for your %1$s</string> + <string name="gpu_auto_reason">Chosen for the %1$s family. New releases install in the background.</string> + <string name="gpu_pair_title">Pick a pair</string> + <string name="gpu_pair_hint">A pair sets the display and runtime drivers together.</string> + <string name="gpu_mix_title">Choose each driver</string> + <string name="gpu_mix_hint">A bundle fills both slots. Display changes apply after a restart, runtime changes on the next session.</string> + <string name="gpu_change_display">Change display driver</string> + <string name="gpu_change_runtime">Change runtime driver</string> + <string name="gpu_autos_pick">AUTO\'S PICK</string> + <string name="gpu_installed">Installed</string> + <string name="gpu_summary_mix">%1$s + %2$s</string> + <string name="gpu_summary_restart">%1$s · restart to apply</string> + <string name="gpu_chip_restart">%1$s · restart pending</string> + <string name="comp_this_device">This device</string> <string name="proton_remove_title">Remove %1$s?</string> - <!-- Setup sorted by scope. --> <string name="setup_tab_diagnostics">Diagnostics</string> + <string name="setup_tab_glasses">Smart glasses</string> + <string name="setup_glasses_scope">Display and head-tracking settings are shared across DroidDeck menus, games and desktop sessions.</string> + <string name="setup_glasses_connect">Connect smart glasses to change their display and tracking settings. Your saved settings are kept when you disconnect.</string> <string name="setup_ready">Ready to play</string> <string name="setup_not_ready">Not ready to play yet</string> <string name="setup_ready_runtime">runtime %1$s</string> @@ -2213,7 +2297,14 @@ <string name="setup_group_look">Look</string> <string name="setup_group_device">This device</string> <string name="setup_group_art">Library art</string> - <!-- Flathub, in the stores' style. --> + <string name="setup_group_download">Downloads</string> + <string name="setup_download_source">Source</string> + <string name="setup_download_source_auto">Automatic</string> + <string name="setup_download_source_direct">Direct</string> + <string name="setup_download_source_mirror">Mirror</string> + <string name="setup_download_source_custom">Custom prefix</string> + <string name="setup_download_mirror">Site</string> + <string name="setup_download_prefix">Prefix</string> <string name="flathub_eyebrow">LINUX APPS</string> <string name="flathub_name">Flathub</string> <string name="flathub_line">Desktop apps for the Linux desktop, opened from Desktop.</string> @@ -2221,8 +2312,591 @@ <string name="flathub_remove_title">Remove %1$s?</string> <string name="flathub_remove_note">Its settings and files are kept.</string> <string name="flathub_keep">Keep</string> - <!-- Desktop in the Steam tab's shape. --> <string name="desktop_size">Size on disk</string> <string name="desktop_uninstall_title">Uninstall the desktop?</string> <string name="desktop_all_systems">All</string> + <string name="gog_achievements">GOG achievements</string> + <string name="gog_achievements_hint">Sync achievements for supported GOG games. Applies on the next launch.</string> + <string name="gog_achievements_off">Achievements off</string> + <string name="gog_achievements_on">Achievements enabled</string> + <string name="gog_achievements_signin">Sign in to GOG again</string> + <string name="gog_achievements_uploaded">Achievements uploaded</string> + <string name="gog_achievements_pending">Achievement upload pending</string> + <string name="gog_achievements_enable_store">Enable GOG achievements in Stores settings</string> + <string name="gog_achievements_unavailable">Achievements unavailable; check session logs</string> + <string name="achievement_unlocked">Achievement unlocked</string> + <string name="touch_paste">Paste</string> + <string name="touch_dpad">D-pad</string> + <string name="touch_left_stick">Left stick</string> + <string name="touch_right_stick">Right stick</string> + <string name="touch_menu">Menu</string> + <string name="touch_keyboard">Keyboard</string> + <string name="touch_dpad_up">D-pad up</string> + <string name="touch_dpad_down">D-pad down</string> + <string name="touch_dpad_left">D-pad left</string> + <string name="touch_dpad_right">D-pad right</string> + <string name="touch_title">Touch controls</string> + <string name="touch_controller">Touch Controller</string> + <string name="touch_mouse">Mouse</string> + <string name="touch_on">On</string> + <string name="touch_off">Off</string> + <string name="touch_speed_slow">Slow</string> + <string name="touch_speed_normal">Normal</string> + <string name="touch_speed_fast">Fast</string> + <string name="touch_edit_layout">Edit layout</string> + <string name="touch_droiddeck_menu">DroidDeck menu</string> + <string name="touch_drag_hint">Drag controls onto the screen</string> + <string name="touch_arrange">Arrange</string> + <string name="touch_discard">Discard</string> + <string name="touch_saving">Saving…</string> + <string name="touch_icon">Icon</string> + <string name="touch_narrower">W−</string> + <string name="touch_wider">W+</string> + <string name="touch_shorter">H−</string> + <string name="touch_taller">H+</string> + <string name="touch_hide">Hide</string> + <string name="touch_color_opacity">Color and opacity…</string> + <string name="touch_copy_layout">Copy this layout</string> + <string name="touch_layout_copied">Layout copied; paste it into any game\'s touch layout</string> + <string name="touch_paste_layout">Paste copied layout</string> + <string name="touch_reset_layout">Reset to Steam\'s default</string> + <string name="touch_no_binding">This control has no binding in Steam to put an icon on</string> + <string name="touch_icon_for">Icon for %1$s</string> + <string name="touch_layout_color">Touch layout color</string> + <string name="touch_done">Done</string> + <string name="touch_save_failed">Could not save the touch layout</string> + <string name="touch_saved">Touch layout saved to Steam</string> + <string name="touch_app_id">App %1$d</string> + <string name="touch_label_hint">Label (optional)</string> + <string name="touch_icons_missing">Steam\'s icons were not found</string> + <plurals name="touch_icons_found"> + <item quantity="one">%1$d icon from Steam</item> + <item quantity="other">%1$d icons from Steam</item> + </plurals> + <string name="touch_icon_color">Icon color</string> + <string name="touch_button_color">Button color</string> + <string name="touch_no_icon">No icon</string> + + <string name="stores_sync_sign_in">Checking sign-in…</string> + <string name="stores_sync_library">Fetching your library…</string> + <string name="stores_sync_game_list">Fetching game list…</string> + <string name="stores_sync_details">Loading game details… (%1$d/%2$d)</string> + <plurals name="stores_sync_games"> + <item quantity="one">Syncing %1$d game…</item> + <item quantity="other">Syncing %1$d games…</item> + </plurals> + <string name="stores_sync_progress">Syncing… %1$d/%2$d</string> + <string name="stores_sync_cover_art">Fetching cover art…</string> + <string name="stores_sync_failed">Sync failed</string> + <string name="stores_sync_no_games">No games found in your %1$s library</string> + <string name="stores_sync_amazon_no_answer">Amazon Games did not answer for your library: refresh, or sign in again</string> + <string name="stores_sync_gog_unreachable">Couldn\'t reach GOG</string> + <string name="stores_sync_gog_unreadable">Could not read your GOG library</string> + <string name="stores_registering">Registering with Steam…</string> + <string name="mode_client_arch">Steam client</string> + <string name="mode_client_arch_fex">FEX %1$s</string> + <string name="mode_client_arch_arm64">ARM64</string> + <string name="mode_client_arch_x64">x86-64</string> + <string name="setup_vac_diag">VAC diagnostics</string> + <string name="setup_vac_diag_hint">Source games log their console (-condebug); vac.txt in the session logs says secure or insecure</string> + <string name="load_starting_steam_x64">Starting Steam x86-64</string> + <string name="storage_game_x64">%1$s · x86-64</string> + <string name="storage_tool_x64_client">Used by the x86-64 Steam client</string> + <string name="storage_uninstall_in_x64">This copy is in the x86-64 Steam client. Choose x86-64 under Steam client, then uninstall it here.</string> + <string name="storage_uninstall_in_arm64">This copy is in the ARM64 Steam client. Choose ARM64 under Steam client, then uninstall it here.</string> + <string name="drawer_page_glasses">Glasses</string> + <string name="glasses_open">VITURE glasses</string> + <string name="glasses_control">Glasses control</string> + <string name="glasses_driver_missing">This build does not include the driver for these glasses.</string> + <string name="glasses_connection_failed">Could not connect to the glasses. Reconnect the cable or tap Allow to retry.</string> + <string name="glasses_allow">Allow</string> + <string name="glasses_allow_hint">Let DroidDeck set the glasses\' refresh rate, 3D mode, brightness, volume and sunblock, and read their head tracking.</string> + <string name="glasses_asking">Waiting for you to allow it in Android\'s prompt…</string> + <string name="glasses_denied">Control was declined. Allow it to change the glasses\' settings.</string> + <string name="glasses_no_control">These glasses show the game, but their settings can\'t be changed from here.</string> + <string name="glasses_output">Output</string> + <string name="glasses_status">%1$d×%2$d · %3$d Hz · %4$s</string> + <string name="glasses_mode_2d">2D</string> + <string name="glasses_mode_3d">3D</string> + <string name="glasses_game_on">Game on glasses</string> + <string name="glasses_game_on_hint">Show the game only on the glasses. Off: the phone shows it and Android mirrors the phone.</string> + <string name="glasses_display">Display</string> + <string name="glasses_vr">VR</string> + <string name="glasses_display_mode">Display mode</string> + <string name="glasses_output_2d">2D output</string> + <string name="glasses_output_3d">3D output</string> + <string name="glasses_picture_group">Picture and virtual screen</string> + <string name="glasses_position_group">Position and floor</string> + <string name="glasses_hands_group">Hand tracking — Experimental</string> + <string name="glasses_tracking_status">Tracking status</string> + <string name="glasses_resolution_2d">2D resolution</string> + <string name="glasses_resolution_3d">3D resolution</string> + <string name="glasses_resolution_vr">VR resolution</string> + <string name="glasses_resolution_auto">Automatic</string> + <string name="glasses_resolution_inherit">Same as 2D / 3D</string> + <string name="glasses_resolution_hint">Output resolution per eye.</string> + <string name="glasses_refresh">Refresh rate</string> + <string name="glasses_refresh_30_hint">Enable Game on glasses to select the display’s native 30 Hz mode.</string> + <string name="glasses_3d">3D (side-by-side)</string> + <string name="glasses_3d_hint">Switch the glasses to side-by-side 3D. Head tracking is controlled separately.</string> + <string name="glasses_3dof">3DoF virtual screen</string> + <string name="glasses_3dof_hint">Anchor flat games in front of you so you can look around. Enables Game on glasses without switching to 3D.</string> + <string name="glasses_3d_failed">The 3D signal was not confirmed. Try again once the 2D picture returns.</string> + <string name="glasses_no_signal">No picture: the glasses are in a mode this phone can\'t send. Hold their 2D/3D button, or unplug and replug them.</string> + <string name="glasses_3d_refresh">3D refresh rate</string> + <string name="glasses_auto3d">3D for VR games</string> + <string name="glasses_auto3d_hint">Switches to 3D while SteamVR runs, and back after.</string> + <string name="glasses_picture">Picture</string> + <string name="glasses_picture_hint">Automatic shows flat content in both eyes and detects SteamVR. Choose Side-by-side game for SBS content.</string> + <string name="glasses_picture_auto">Automatic</string> + <string name="glasses_picture_screen">Virtual screen</string> + <string name="glasses_picture_sbs">Side-by-side game</string> + <string name="glasses_screen_size">Screen width</string> + <string name="glasses_screen_distance">Screen distance</string> + <string name="glasses_screen_next_session">Width and distance apply when a game runs on the glasses as a virtual screen.</string> + <string name="glasses_screen_app_wide">Width and distance update the tracked virtual screen for DroidDeck menus, games and desktop sessions immediately.</string> + <string name="glasses_screen_no_output">These settings apply while Game on glasses is enabled and the game is displayed there.</string> + <string name="glasses_screen_flat_hint">Automatic keeps this 2D game full-screen. Use a virtual screen to adjust its width, distance and head tracking.</string> + <string name="glasses_screen_use">Use virtual screen</string> + <string name="glasses_screen_direct_hint">SteamVR fills the view. Adjust its field of view in VR; width and distance apply only to a virtual screen.</string> + <string name="glasses_screen_sbs_hint">Side-by-side games fill each eye. Width and distance apply only to a virtual screen.</string> + <string name="glasses_tracking_flat_hint">Automatic keeps this 2D game fixed in view. Choose Virtual screen in Display to use head tracking.</string> + <string name="glasses_tracking_sbs_hint">Head tracking applies to a virtual screen or a running SteamVR game.</string> + <string name="glasses_hardware">Device</string> + <string name="glasses_brightness">Brightness</string> + <string name="glasses_volume">Volume</string> + <string name="glasses_sunblock">Sunblock</string> + <string name="glasses_sunblock_hint">Darkens the front lenses.</string> + <string name="glasses_tracking">Tracking</string> + <string name="glasses_head_tracking">Head tracking</string> + <string name="glasses_head_tracking_hint">The glasses\' own sensors turn the virtual screen and SteamVR with your head.</string> + <string name="glasses_head_tracking_spatial_vr_hint">Positional tracking includes head rotation in SteamVR. For rotation-only tracking, turn off positional tracking.</string> + <string name="glasses_head_tracking_spatial_hint">Controls head movement on the virtual screen. Positional tracking includes head rotation in SteamVR.</string> + <string name="glasses_quick_actions">Quick actions</string> + <string name="glasses_recenter">Recenter view</string> + <string name="glasses_recenter_screen_hint">Look where you want the screen, then recenter to set its height and direction.</string> + <string name="glasses_recenter_button">Recenter Screen</string> + <string name="glasses_recenter_joycons_button">Recenter Joy-Cons</string> + <string name="glasses_vr_fov">SteamVR field of view</string> + <string name="glasses_vr_fov_hint">Lower brings SteamVR closer and fills the glasses; higher shows more around you.</string> + <string name="glasses_playing">Playing on %1$s</string> + <string name="glasses_calibration">Tracking calibration</string> + <string name="glasses_calibration_hint">Reduce drift and align the level reference.</string> + <string name="glasses_calibration_saved_hint">Saved calibration is applied to these glasses.</string> + <string name="glasses_calibration_open">Calibrate</string> + <string name="glasses_calibration_instructions">Place the connected glasses upside down on a level surface, with the frame resting evenly. Tap Start, then leave them untouched for about 8 seconds. Movement restarts the measurement. This adjusts drift and tilt, not heading.</string> + <string name="glasses_calibration_settling">Leave the glasses upside down and untouched. Waiting for them to settle…</string> + <string name="glasses_calibration_collecting">Measuring the sensors. Keep the glasses still.</string> + <string name="glasses_calibration_moving">Movement detected. Leave the glasses untouched; measurement will restart automatically.</string> + <string name="glasses_calibration_turn_over">Rest the glasses upside down on a level surface. Measurement will start when they are positioned correctly.</string> + <string name="glasses_calibration_complete">Calibration saved. Put the glasses on and look straight ahead, then tap Done to recenter.</string> + <string name="glasses_calibration_failed">Calibration could not finish. Check the connection and keep the glasses still, then try again. Your previous calibration is unchanged.</string> + <string name="glasses_calibration_start">Start</string> + <string name="glasses_calibration_done">Done</string> + <string name="glasses_calibration_reset">Reset tracking calibration</string> + <string name="glasses_calibration_reset_hint">Remove the saved calibration and restore the model defaults? Recenter after putting the glasses back on.</string> + <string name="glasses_calibration_reset_button">Reset</string> + <string name="hand_camera_group">Hand tracking</string> + <string name="phone_camera_tracking_group">Phone camera — Experimental</string> + <string name="hand_camera_prompt_title">Track hands or Joy-Cons with the phone camera?</string> + <string name="hand_camera_prompt_body">With no controller connected, the phone camera tracks your bare hands in VR: pinch your thumb and index finger to click, close your hand to grab, and turn your palm toward you and pinch to open the menu. With paired Joy-Cons, the camera tracks their position while the Joy-Cons provide rotation and button inputs. Pictures are processed on this device and never saved or sent.</string> + <string name="hand_camera_rear">Back camera</string> + <string name="hand_camera_rear_hint">Recommended. Usually sharper and wider.</string> + <string name="hand_camera_front">Front camera</string> + <string name="hand_camera_front_hint">For when the back of the device can\'t face you.</string> + <string name="hand_camera_allow">Use camera</string> + <string name="hand_camera_not_now">Not now</string> + <string name="hand_camera_setting">Camera hand tracking</string> + <string name="phone_camera_tracking_setting">Track hands or Joy-Cons</string> + <string name="hand_camera_setting_hint">Use the phone camera for bare-hand gestures or to position paired Joy-Cons in VR. Joy-Cons provide rotation and button inputs. Pauses while the glasses track your hands or Joy-Cons. Pictures stay on this device.</string> + <string name="hand_camera_choice">Camera</string> + <string name="hand_camera_access">Camera access</string> + <string name="hand_camera_access_hint">Allow camera access so hand tracking can start.</string> + <string name="hand_camera_access_denied">Camera access is off. Turn it on in Android settings.</string> + <string name="hand_camera_allow_button">Allow</string> + <string name="hand_camera_open_settings">Open settings</string> + <string name="hand_camera_placement">Camera placement</string> + <string name="hand_camera_placement_hint">Check that the camera can see you before you play.</string> + <string name="hand_camera_check">Check</string> + <string name="hand_camera_check_title">Camera placement</string> + <string name="hand_camera_how_rear">Stand the device up 1.5 to 2 metres away at about chest height, with the back camera facing you. Then step into view with your hands out.</string> + <string name="hand_camera_how_front">Stand the device up 1.5 to 2 metres away at about chest height, with the screen facing you. Then step into view with your hands out.</string> + <string name="hand_camera_starting">Starting the camera…</string> + <string name="hand_camera_stand_up">The device is lying flat. Stand it up so the camera faces you.</string> + <string name="hand_camera_upright">Stand the device more upright so the camera faces you.</string> + <string name="hand_camera_not_seen">Can\'t see you yet. Step into view so your head and shoulders show.</string> + <string name="hand_camera_move_back">Step back a little.</string> + <string name="hand_camera_move_closer">Come a little closer.</string> + <string name="hand_camera_show_hands">Hold both hands out where the camera can see them.</string> + <string name="hand_camera_good">Looks good.</string> + <string name="hand_camera_failed">The camera couldn\'t start. Close other apps that use it and try again.</string> + <string name="hand_camera_switch">Switch camera</string> + <string name="hand_camera_skip">Skip</string> + <string name="hand_camera_done">Done</string> + <string name="glasses_xreal_network_missing">Waiting for the glasses’ USB Ethernet connection. This phone may not expose it to apps.</string> + <string name="glasses_xreal_connection_failed">The XREAL connection was interrupted or returned an unsupported response. Retrying…</string> + <string name="glasses_xreal_experimental">Experimental 1S support. Use Follow mode and disable stabilization in the glasses menu. Tracking directions and display modes still need device testing.</string> + <string name="display_picture_position">Picture position</string> + <string name="display_position_top">Top</string> + <string name="display_position_bottom">Bottom</string> + <string name="display_position_center">Center (default)</string> + <string name="glasses_6dof">6DoF virtual screen</string> + <string name="glasses_position">Positional tracking — experimental</string> + <string name="glasses_position_hint">Physical movement in VR and around virtual screens. Restarting tracking takes a moment.</string> + <string name="glasses_eye_height">Current eye height above floor</string> + <string name="glasses_floor">Set floor from current height</string> + <string name="glasses_floor_set">Set floor</string> + <string name="glasses_spatial_setup">Stereo camera setup and diagnostics</string> + <string name="glasses_spatial_setup_hint">Check camera calibration and hand tracking before playing.</string> + <string name="glasses_spatial_open">Open setup</string> + <string name="setup_tab_storage">Storage</string> + <string name="storage_measuring">Measuring storage…</string> + <string name="storage_measuring_hint">This takes a few seconds the first time.</string> + <string name="storage_internal">Internal storage</string> + <string name="storage_used_of">%1$s of %2$s used</string> + <string name="storage_free">%1$s free</string> + <string name="storage_droiddeck_uses">DroidDeck uses %1$s. Measured at %2$s.</string> + <string name="storage_rescanning">measuring again…</string> + <string name="storage_other_apps">Other Android apps</string> + <string name="storage_safe_now">Safe to free now</string> + <string name="storage_safe_hint">Unused runtimes, leftovers, old logs</string> + <string name="storage_clean_up">Clean up…</string> + <string name="storage_session_running">Stop the session to clean up or remove anything. Sizes are still shown.</string> + <string name="storage_where">Where it goes</string> + <string name="storage_games">Steam games</string> + <string name="storage_game_data">Game data</string> + <string name="storage_game_data_hint">Prefixes %1$s · workshop %2$s · shaders %3$s</string> + <string name="storage_tools">Proton & runtimes</string> + <string name="storage_tools_unused">%1$s not used</string> + <string name="storage_stores">GOG, Epic & other stores</string> + <string name="storage_stores_hint">Uninstall these from Stores</string> + <string name="storage_desktop">Desktop apps</string> + <string name="storage_desktop_hint">Flatpak apps and runtimes</string> + <string name="storage_system">Linux system & Steam client</string> + <string name="storage_system_hint">Needed to run anything</string> + <string name="storage_app_data">DroidDeck data</string> + <string name="storage_app_data_hint">Old session logs %1$s · caches · drivers</string> + <string name="storage_legend_games">Games</string> + <string name="storage_legend_data">Game data</string> + <string name="storage_legend_tools">Proton & runtimes</string> + <string name="storage_legend_stores">Other stores</string> + <string name="storage_legend_desktop">Desktop apps</string> + <string name="storage_legend_system">Linux system</string> + <string name="storage_legend_app">DroidDeck</string> + <string name="storage_clean_up_title">Clean up</string> + <string name="storage_clean_up_lede">Nothing here touches your installed games or downloads in progress.</string> + <string name="storage_nothing_to_clean">Nothing to clean up right now.</string> + <string name="storage_selected">Selected: %1$s · %2$s → %3$s free</string> + <string name="storage_cleaning">Cleaning up…</string> + <string name="storage_free_button">Free %1$s</string> + <string name="storage_freed">Freed %1$s.</string> + <string name="storage_item_runtimes">Unused Steam runtimes and Protons</string> + <string name="storage_item_leftovers">Leftovers from uninstalled games</string> + <string name="storage_item_leftovers_unsure">Leftovers that may hold saves</string> + <string name="storage_item_logs">Old session logs</string> + <string name="storage_item_logs_detail">Keeps the current session’s logs</string> + <string name="storage_item_custom_detail">No game is set to it. Reinstall it from Components if you need it.</string> + <string name="storage_item_shaders">Shader caches of installed games</string> + <string name="storage_item_shaders_detail">Rebuilt as you play. The first minutes of each game stutter again.</string> + <string name="storage_tag_safe">Safe</string> + <string name="storage_tag_unused">Not used</string> + <string name="storage_tag_stutter">Stutter</string> + <string name="storage_tag_saves">Check saves</string> + <string name="storage_tag_default">Default</string> + <string name="storage_tag_required">Required</string> + <string name="storage_tag_not_used">Not used</string> + <string name="storage_back">Storage</string> + <string name="storage_games_with_data">%1$s with their data</string> + <string name="storage_sort_largest">Largest</string> + <string name="storage_sort_least_played">Least played</string> + <string name="storage_sort_sd">On SD card</string> + <string name="storage_no_games">No games here.</string> + <string name="storage_played">Played %1$s</string> + <string name="storage_never_played">Never played</string> + <string name="storage_game_parts">Game %1$s · data %2$s</string> + <string name="storage_uninstall">Uninstall</string> + <string name="storage_games_note">Uninstall opens Steam’s own dialog so Steam keeps track. To move a game to the SD card, use Steam › Settings › Storage.</string> + <string name="storage_uninstall_title">Uninstall %1$s?</string> + <string name="storage_uninstall_body">Steam opens and asks you to confirm. This frees the game’s %1$s. Its prefix stays until you clean up leftovers, and Steam Cloud saves stay in your account.</string> + <string name="storage_open_steam">Open Steam</string> + <string name="storage_tools_detail">%1$s · %2$s not used</string> + <string name="storage_remove_unused">Remove unused · %1$s</string> + <string name="storage_in_use">In use</string> + <string name="storage_not_used">Not used</string> + <string name="storage_remove">Remove</string> + <string name="storage_remove_title">Remove %1$s?</string> + <string name="storage_remove_body">Frees %1$s. Steam downloads it again if a game ever asks for it.</string> + <string name="storage_tool_fex_runtime">Needed for Linux x86 games (FEX)</string> + <string name="storage_tool_arm_runtime">Needed by the ARM64 Protons</string> + <string name="storage_tool_redist">VC++ and DirectX installers games ask for</string> + <string name="storage_tool_fex">Runs Linux x86 games</string> + <string name="storage_tool_steam">Steam tool</string> + <string name="storage_tool_old_runtime">DroidDeck runs games without this runtime</string> + <string name="storage_tool_x86_proton">x86 Proton, which DroidDeck cannot run</string> + <string name="storage_tool_custom_default">Default for every game</string> + <string name="storage_tool_custom_unused">No game is set to it</string> + <string name="storage_tool_custom_unknown">Steam’s settings could not be read, so it is kept</string> + <string name="storage_cleanup_busy">Wait for the storage clean-up to finish</string> + <string name="storage_low_title">Only %1$s free</string> + <string name="storage_low_body">Steam needs room for updates and shader caches. Below 10 GB, game updates can fail partway.</string> + <string name="storage_low_safe">%1$s can be freed safely.</string> + <string name="storage_free_up">Free up space</string> + <string name="storage_play_anyway">Play anyway</string> + <plurals name="storage_games_installed"> + <item quantity="one">%d installed</item> + <item quantity="other">%d installed</item> + </plurals> + <plurals name="storage_games_on_sd"> + <item quantity="one">%d on the SD card</item> + <item quantity="other">%d on the SD card</item> + </plurals> + <plurals name="storage_tools_count"> + <item quantity="one">%d tool</item> + <item quantity="other">%d tools</item> + </plurals> + <plurals name="storage_item_leftovers_detail"> + <item quantity="one">%d game’s empty prefix folders and shader cache</item> + <item quantity="other">%d games’ empty prefix folders and shader caches</item> + </plurals> + <plurals name="storage_item_leftovers_unsure_detail"> + <item quantity="one">%d game’s prefix still holds files, which can include local saves. Back them up first if you want them.</item> + <item quantity="other">%d games’ prefixes still hold files, which can include local saves. Back them up first if you want them.</item> + </plurals> + <plurals name="storage_tag_games"> + <item quantity="one">%d game</item> + <item quantity="other">%d games</item> + </plurals> + <string name="storage_tool_default_proton">DroidDeck’s default Proton</string> + <string name="storage_tool_proton">DroidDeck’s Proton 11 option</string> + <plurals name="storage_tool_custom_games"> + <item quantity="one">Used by %d game</item> + <item quantity="other">Used by %d games</item> + </plurals> + <string name="storage_legend_components">Components</string> + <string name="storage_components">Components</string> + <string name="storage_item_components">Unused components</string> + <string name="storage_component_original">Original %1$s · %2$s</string> + <string name="storage_original_confirm">Frees %1$s. It only restores a Proton version that is no longer installed.</string> + <string name="storage_leftovers_unchecked">Not checked: a Steam app manifest could not be read, so prefixes of uninstalled games are kept until it can.</string> + <string name="storage_failed">Could not finish: %1$s</string> + <string name="storage_desktop_shared">shared %1$s</string> + <string name="storage_data_installed">Installed games</string> + <string name="storage_data_parts">Prefix %1$s · shaders %2$s · workshop %3$s</string> + <string name="storage_clear_shaders">Clear shaders</string> + <string name="storage_data_leftovers">Uninstalled games</string> + <string name="storage_steam_app">Steam app %1$d</string> + <string name="storage_leftover_unsure_detail">Its prefix still holds files, which can include local saves</string> + <string name="storage_leftover_confirm">Deletes its Wine prefix and shader cache (%1$s). Back up any saves you want first; Steam Cloud saves stay in your account.</string> + <string name="storage_data_other">Kept</string> + <string name="storage_data_other_title">Non-Steam games and Steam’s shared prefix</string> + <string name="storage_data_other_detail">Prefixes of games added from stores or by hand</string> + <string name="storage_components_packages">Downloaded packages</string> + <string name="storage_components_originals">Saved originals</string> + <string name="storage_components_none">No component packages downloaded.</string> + <string name="storage_component_in_use">Selected for a Proton or a game</string> + <string name="storage_component_unused">Not selected anywhere</string> + <string name="storage_original_kept">Restores the installed Proton</string> + <string name="storage_original_old">Proton version no longer installed</string> + <string name="storage_tag_in_use">In use</string> + <string name="storage_components_note">Components in use stay locked. Choose them in Components; anything removed here can be downloaded there again.</string> + <string name="storage_component_confirm">Frees %1$s. Packages you imported yourself cannot be downloaded again.</string> + <string name="storage_desktop_detail">%1$s for Flatpak apps and what they share</string> + <string name="storage_desktop_apps_title">Apps</string> + <string name="storage_desktop_none">No Flatpak apps installed.</string> + <string name="storage_desktop_shared_title">Shared by apps</string> + <string name="storage_desktop_runtimes">Runtimes</string> + <string name="storage_desktop_runtimes_detail">Libraries the apps run on; unused ones go with Remove unused</string> + <string name="storage_desktop_cache">Download store</string> + <string name="storage_desktop_cache_detail">Flatpak’s object store and cached downloads</string> + <string name="storage_desktop_prune">Remove unused</string> + <string name="storage_desktop_prune_body">Removes runtimes no installed app needs and prunes Flatpak’s object store. Installed apps keep working.</string> + <string name="storage_flatpak_uninstall_body">Removes the app (%1$s) and any runtime nothing else uses. Its data in your home folder stays.</string> + <plurals name="storage_components_count"> + <item quantity="one">%d package</item> + <item quantity="other">%d packages</item> + </plurals> + <plurals name="storage_desktop_apps"> + <item quantity="one">%d app</item> + <item quantity="other">%d apps</item> + </plurals> + <string name="glasses_hands">Bare-hand controllers</string> + <string name="glasses_hands_hint">Use the glasses cameras to aim with your hands, pinch to click and close your hand to grab in VR. Gamepad sticks move and turn. Replaces Joy-Con position tracking. May lag or lose tracking during games.</string> + <string name="glasses_hands_ready_hint">Enable Bare-hand controllers under Luma Ultra cameras in Tracking. Show open hands first.</string> + <string name="glasses_hands_base">Shared Luma Ultra calibration</string> + <string name="glasses_hands_base_hint">Using the shared Luma Ultra base. Calibrate your own glasses to verify their accuracy.</string> + <string name="glasses_hands_calibration_verified">Measured calibration verified</string> + <string name="glasses_hands_calibration_required">Validation required</string> + <string name="glasses_hands_calibration_required_hint">Hand controllers become available after the measured distance check passes.</string> + <string name="tracking_recovery_lost">Tracking lost</string> + <string name="tracking_recovery_look">Look around slowly in a well-lit room.\nKeep the tracking cameras clear and face furniture or other visible detail.</string> + <string name="tracking_recovery_restart_help">Still stuck? On your phone: Glasses → Tracking → Open setup → Show diagnostics → Restart tracking.</string> + <string name="tracking_recovery_disconnected">Glasses disconnected</string> + <string name="tracking_recovery_connect">Check the USB connection and reconnect the glasses.\nAccept the USB-access prompt on your phone if it appears.</string> + <string name="tracking_recovery_usb_help">Once connected, look around slowly in a well-lit room to restore tracking.</string> + <string name="tracking_recovery_recenter">Recenter needed</string> + <string name="tracking_recovery_recenter_steps">Tracking has returned in a new position.\nLook forward, then tap Recenter on your phone.</string> + <string name="tracking_recovery_recenter_help">You can also find Recenter in Glasses → Tracking → Open setup. Your saved camera calibration is kept.</string> + <string name="tracking_recovery_stabilizing">Hold still for a moment</string> + <string name="tracking_recovery_hold">Recenter is in progress.\nKeep the glasses steady while tracking settles.</string> + <string name="tracking_recovery_automatic">This screen closes automatically when head tracking is ready.</string> + <string name="boot_movie">Boot movie</string> + <string name="boot_movie_video">Movie</string> + <string name="boot_movie_droiddeck">DroidDeck · %1$d fps</string> + <string name="boot_movie_note">60 fps looks smoother but uses more CPU while Steam starts. A startup movie picked in Steam\'s own settings takes priority.</string> + <string name="boot_movie_sound">Sound</string> + <string name="boot_movie_custom">Your own movie</string> + <string name="boot_movie_custom_hint">MP4, MOV, MKV or WebM. Other formats and files over %1$d MB are converted to 720p WebM on the device, up to %2$d seconds.</string> + <string name="boot_movie_import">Import</string> + <string name="boot_movie_remove">Remove</string> + <string name="boot_movie_pick">Choose a boot movie</string> + <string name="boot_movie_imported">%1$s is now the boot movie</string> + <string name="boot_movie_imported_silent">%1$s is now the boot movie, without sound</string> + <string name="boot_movie_too_long">Movies that need converting must be %1$d seconds or shorter</string> + <string name="boot_movie_converting">Converting %1$d%%</string> + <string name="boot_movie_converting_started">Converting %1$s for Steam. Keep DroidDeck open.</string> + <string name="boot_movie_unsupported">This device cannot decode that video.</string> + <string name="boot_movie_import_failed">Could not import that movie</string> + <string name="glasses_steady_hand_aim">Steady hand aim</string> + <string name="glasses_steady_hand_aim_hint">Aim from your shoulder through your palm. Turn off for wrist-controlled rotation.</string> + <string name="spatial_title">Spatial setup</string> + <string name="spatial_wait_tracking">Waiting for tracking…</string> + <string name="spatial_cameras_description">Left and right tracking cameras</string> + <string name="spatial_camera_sync">Camera synchronization</string> + <string name="spatial_ready">Ready</string> + <string name="spatial_sync_hint">Waiting for camera and head tracking to line up. Keep the glasses connected.</string> + <string name="spatial_prepare">1. Prepare the board</string> + <string name="spatial_print_actual">Print at actual size</string> + <string name="spatial_print_hint">Each square must measure 30 mm (1.181 in). Mount the sheet flat on a rigid surface in a well-lit area.</string> + <string name="spatial_print">Print board</string> + <string name="spatial_capture_group">2. Capture different views</string> + <string name="spatial_board_stationary">Keep the board stationary</string> + <string name="spatial_capture_hint">Move the glasses closer, farther and sideways. Turn them left/right, angle them up/down, and tilt them sideways. Keep the board in both cameras and pause briefly before each capture.</string> + <string name="spatial_start">Start new calibration</string> + <string name="spatial_wait_sync">Waiting for camera synchronization.</string> + <string name="spatial_start_hint">Start a new calibration to collect views.</string> + <string name="spatial_views_hint">Keep the board visible in both previews. Capture at least 24 sharp views from different angles.</string> + <string name="spatial_capturing">Capturing…</string> + <string name="spatial_capture">Capture board view</string> + <string name="spatial_alignment">Calculate camera alignment</string> + <string name="spatial_calculating">Calculating…</string> + <string name="spatial_calculate">Calculate calibration</string> + <string name="spatial_distance_group">3. Check the distance</string> + <string name="spatial_distance">Measured distance</string> + <string name="spatial_distance_hint">Start with 12 in or 30 cm so the printed markers are easier to detect. Choose the exact measurement you will use.</string> + <string name="spatial_camera_board_distance">Left camera to board center</string> + <string name="spatial_checking_distance">Checking distance…</string> + <string name="spatial_validate">Validate distance</string> + <string name="spatial_diagnostics">Diagnostics</string> + <string name="spatial_show_diagnostics">Show diagnostics</string> + <string name="spatial_diagnostics_hint">Camera timing and tracking recovery tools.</string> + <string name="spatial_camera_timing">Camera timing</string> + <string name="spatial_hand_input">Hand input</string> + <string name="spatial_wait_timing">Waiting for camera timing.</string> + <string name="spatial_frames">Frames</string> + <string name="spatial_gpu">GPU hand inference</string> + <string name="spatial_gpu_hint">CPU is the default. GPU is experimental and can cause SteamVR to restart. This choice resets when tracking restarts.</string> + <string name="spatial_lite">Lite hand models</string> + <string name="spatial_lite_hint">Use the Lite palm detector and Lite hand landmarks. Check aiming, pinch and grab accuracy. Resets when tracking restarts.</string> + <string name="spatial_adaptive">Automatic hand input rate</string> + <string name="spatial_adaptive_hint">Adjust input to processing speed. Resets when tracking restarts.</string> + <string name="spatial_half_rate">Limit hand input rate</string> + <string name="spatial_half_rate_hint">Use half the camera frames. Turn off to compare the full rate. Resets when tracking restarts.</string> + <string name="spatial_diagnostic_capture">Diagnostic capture</string> + <string name="spatial_diagnostic_capture_hint">Save one stereo frame locally. Images are saved only when requested.</string> + <string name="spatial_save_frame">Save frame</string> + <string name="spatial_restart_tracking">Restart tracking</string> + <string name="spatial_restart_hint">Use if tracking does not recover in a well-lit area. A restart requires a new tracking origin.</string> + <string name="spatial_restart">Restart</string> + <string name="spatial_restart_title">Restart tracking?</string> + <string name="spatial_restart_confirm">Unsaved calibration views will be lost. Keep the glasses still afterward and recenter when tracking returns.</string> + <string name="spatial_views_count">%1$d / 24 views captured</string> + <string name="spatial_capture_paused">Capture paused: %1$s</string> + <string name="spatial_measure_hint">Measure %1$s. Show the complete board in both previews, then hold still.</string> + <string name="spatial_timing_values">%1$.1f Hz • frame age %2$.1f ms • processing %3$.1f ms</string> + <string name="spatial_input_values">Input limit %1$.1f Hz • %2$.0f%% of camera frames. Head tracking stays at full rate.</string> + <string name="spatial_frame_counts">%1$d processed • %2$d dropped • %3$d skipped by input limit</string> + <string name="spatial_print_job">DroidDeck ChArUco 30 mm</string> + <string name="spatial_print_title">DroidDeck - Luma Ultra calibration</string> + <string name="spatial_print_scale" formatted="false">Print at 100% / Actual size. Each square: 30 mm (1.181 in).</string> + <string name="spatial_print_stationary">Keep the board flat and stationary; move the glasses between captures.</string> + <string name="spatial_print_check">Scale check: 100 mm (3.937 in) between ticks</string> + <string name="spatial_distance_12in">12 in (30.48 cm)</string> + <string name="spatial_distance_30cm">30 cm (11.81 in)</string> + <string name="spatial_distance_20in">20 in (50.8 cm)</string> + <string name="spatial_distance_50cm">50 cm (19.69 in)</string> + <string name="spatial_disabled">Disabled</string> + <string name="spatial_wait_stable">Waiting for stable tracking</string> + <string name="spatial_disconnected">Disconnected</string> + <string name="spatial_hands_off">Hand controllers are off</string> + <string name="spatial_tracking_off">Positional tracking is off or glasses are disconnected</string> + <string name="spatial_recenter_pending">Recenter requested — hold still while tracking stabilizes</string> + <string name="spatial_tracking_lost">Tracking lost — face a well-lit area with visible detail</string> + <string name="spatial_origin_changed">Tracking origin changed — tap Recenter, then hold still</string> + <string name="spatial_active">6DoF active</string> + <string name="spatial_connect_hint">Connect Luma Ultra and enable positional tracking.</string> + <string name="spatial_validation_session">Calibration verified for this connection.</string> + <string name="spatial_validation_saved">Calibration verified and saved.</string> + <string name="spatial_wait_cameras">Waiting for stereo cameras</string> + <string name="spatial_wait_hands">Waiting for hand tracking</string> + <string name="spatial_collect_instructions">Keep the 5 × 7 board stationary. Capture 24+ views while moving and rotating the glasses.</string> + <string name="spatial_capture_pending">Waiting for the next camera image. Hold the glasses still.</string> + <string name="spatial_validation_pending">Checking the next camera image. Keep the full board visible and hold still.</string> + <string name="spatial_start_first">Start calibration first</string> + <string name="spatial_no_camera_frame">No fresh camera image arrived. Check the glasses connection and camera previews, then retry.</string> + <string name="spatial_clock_reset">Camera clock reset</string> + <string name="spatial_frame_changed">Tracking frame changed. Your views are saved for recalculation. Recenter, then start a new set to capture more views.</string> + <string name="spatial_device_loaded">device calibration loaded</string> + <string name="spatial_base_loaded">Luma Ultra base calibration loaded</string> + <string name="spatial_calibration_needed">calibration required</string> + <string name="spatial_tap_start">Tap Start new calibration first.</string> + <string name="spatial_capture_recenter_pending">Recenter is waiting for steady tracking. Hold still for a moment.</string> + <string name="spatial_capture_recenter">Tracking changed. Tap Recenter once, then hold still before capturing.</string> + <string name="spatial_capture_unsynchronized">Capture rejected: head tracking was out of sync, or it changed during capture. Hold still and try again.</string> + <string name="spatial_align_first">Calculate camera alignment before checking the distance.</string> + <string name="spatial_processing_failed">camera processing failed</string> + <string name="spatial_hand_head_changed">Head tracking changed during hand detection</string> + <string name="spatial_hand_wait_sync">Waiting for camera and head synchronization</string> + <string name="spatial_no_wrists">No wrists detected. Keep your Joy-Con grips in front of the glasses</string> + <string name="spatial_no_hands">No hands detected. Show open palms in front of the glasses</string> + <string name="spatial_one_camera_wrists">Wrists visible in only one camera; keep your grips in the shared view</string> + <string name="spatial_one_camera_hands">Hands visible in only one camera; keep both palms in the shared view</string> + <string name="spatial_ambiguous_hands">Both cameras see hands, but left/right matching is ambiguous</string> + <string name="spatial_inconsistent_depth">Hands detected, but stereo depth is inconsistent</string> + <string name="spatial_rejected_wrist">Wrist position rejected by stereo or motion checks</string> + <string name="spatial_inconsistent_palm">Stereo points detected, but palm geometry is inconsistent</string> + <string name="spatial_hands_need_calibration">Complete calibration and the distance check to enable hands</string> + <string name="spatial_hands_wait_stable">Waiting for stable head tracking; recenter if requested</string> + <string name="spatial_old_frame">Camera observation is too old; waiting for a fresh pair</string> + <string name="spatial_fit_ready">Fit %1$.2f px. Measure your selected distance from the left camera to the board center, then validate.</string> + <string name="spatial_opencv_error">OpenCV unavailable: %1$s</string> + <string name="spatial_restored">%1$d saved views restored. Calculate calibration to retry, or start a new set to capture more.</string> + <string name="spatial_captured">Captured %1$d / 24 views. Keep the board fixed; move the glasses for the next view.</string> + <string name="spatial_capture_corners">Capture rejected: %1$d / 12 required corners visible in both cameras. Show more of the board, hold still, then try again.</string> + <string name="spatial_validation_error">Distance check could not finish: %1$s. Try again.</string> + <string name="spatial_inference_error">Hand detection unavailable: %1$s. Change CPU/GPU or toggle hand controllers to retry.</string> + <string name="spatial_hand_timeout">Hand detection exceeded %1$d ms; observation discarded</string> + <string name="spatial_wrists_tracked">%1$d / 2 Joy-Con wrist positions measured by stereo</string> + <string name="spatial_palms_tracked">%1$d / 2 palms tracked; pinch ready: %2$d; grip ready: %3$d</string> + <string name="spatial_capture_saved">Saved diagnostic capture to %1$s</string> + <string name="spatial_hand_error">Hand tracking stopped: %1$s</string> + <string name="spatial_stereo_loaded">Stereo %1$d×%2$d; %3$s</string> + <string name="spatial_alignment_error">Head tracking and the board disagree by %1$s (limit 5 cm / 2 in). Keep the board fixed and wait for steady tracking before starting a new set. Turn and tilt the glasses gently; pause before each capture.</string> + <string name="spatial_need_views">Capture at least 24 varied views of the stationary board.</string> + <string name="spatial_need_rotation">Rotate the glasses through both yaw and pitch; translation alone cannot calibrate camera alignment.</string> + <string name="spatial_bad_baseline">Implausible camera baseline</string> + <string name="spatial_need_orientations">Move your head through more varied orientations.</string> + <string name="spatial_bad_rotation">Invalid camera-to-head rotation</string> + <string name="spatial_bad_alignment">Camera-to-head alignment is inconsistent.</string> + <string name="spatial_calibration_error">Calibration could not finish. %1$s Your captured views are saved.</string> + <string name="spatial_reprojection_error">Held-out reprojection error %1$.2f px exceeds 2 px. Recalibrate.</string> + <string name="spatial_distance_corners">%1$d / 24 checkerboard corners detected in both cameras. Keep the full board visible and hold still. If it is already visible, select 12 in or 30 cm and measure that closer distance before retrying.</string> + <string name="spatial_distance_depth">The board is visible, but its depth could not be measured reliably. Hold the glasses still and keep the board flat and well lit, then retry.</string> + <string name="spatial_distance_invalid">The camera measurement was invalid. Hold still and try again.</string> + <string name="spatial_distance_passed">Distance check passed.</string> + <string name="spatial_distance_retry">Recheck the distance from the left camera to the board center, then retry.</string> + <string name="spatial_distance_result">Cameras measured %1$s; selected distance %2$s. %3$s</string> + <string name="spatial_wait_previews">Wait for both camera previews before starting calibration.</string> + <string name="spatial_saved_views_hint">Saved views can be recalculated. Start a new calibration to capture in the current tracking frame.</string> + <string name="spatial_model_checksum_error">Hand model checksum mismatch</string> + <string name="spatial_opencv_load_error">OpenCV could not load</string> </resources> diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index bf4532ceac..005841e7a1 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -3,7 +3,6 @@ <style name="AppTheme" parent="@android:style/Theme.Material.NoActionBar"> <item name="android:colorBackground">#FF101418</item> </style> - <!-- A session owns the whole panel: no bars, no title, and black behind the compositor. --> <style name="SessionTheme" parent="@android:style/Theme.Material.NoActionBar.Fullscreen"> <item name="android:windowBackground">@android:color/black</item> </style> diff --git a/app/src/main/res/xml/game_mode_config.xml b/app/src/main/res/xml/game_mode_config.xml index b3f3e0d313..adf601e009 100644 --- a/app/src/main/res/xml/game_mode_config.xml +++ b/app/src/main/res/xml/game_mode_config.xml @@ -1,13 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- - What Android's GameManager (12+) and the OEM game services keyed to it may do to a session. - Performance mode is welcome: it is what raises the clock floor on a regular flagship the way a - gaming phone's mode does out of the box. What is refused is the two "helpful" interventions - that make a game look slow: Samsung's Game Optimizing Service and its cousins cap unknown - games' frame rate (allowGameFpsOverride) and render them at a lower resolution - (allowGameDownscaling). gamescope already owns the output size; a cap on top of Big Picture's - own pacing is exactly the low-fps-on-a-flagship symptom. ---> <game-mode-config xmlns:android="http://schemas.android.com/apk/res/android" android:supportsPerformanceGameMode="true" android:supportsBatteryGameMode="true" diff --git a/app/src/main/res/xml/locales_config.xml b/app/src/main/res/xml/locales_config.xml index 86bafa9b13..c6ade4b065 100644 --- a/app/src/main/res/xml/locales_config.xml +++ b/app/src/main/res/xml/locales_config.xml @@ -1,11 +1,33 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- The languages DroidDeck ships, for Android's per-app language setting. Keep in step with - AppLanguage.supported and the values-* folders. --> <locale-config xmlns:android="http://schemas.android.com/apk/res/android"> <locale android:name="en" /> + <locale android:name="id" /> + <locale android:name="ms" /> + <locale android:name="cs" /> + <locale android:name="da" /> + <locale android:name="de" /> <locale android:name="es" /> + <locale android:name="es-419" /> <locale android:name="fr" /> + <locale android:name="it" /> + <locale android:name="hu" /> + <locale android:name="nl" /> + <locale android:name="nb" /> + <locale android:name="pl" /> + <locale android:name="pt-BR" /> + <locale android:name="pt-PT" /> + <locale android:name="ro" /> + <locale android:name="fi" /> + <locale android:name="sv" /> + <locale android:name="vi" /> + <locale android:name="tr" /> + <locale android:name="el" /> + <locale android:name="bg" /> <locale android:name="ru" /> + <locale android:name="uk" /> + <locale android:name="ar" /> + <locale android:name="hi" /> + <locale android:name="th" /> <locale android:name="ja" /> <locale android:name="ko" /> <locale android:name="zh-CN" /> diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000000..5ade7336eb --- /dev/null +++ b/app/src/main/res/xml/network_security_config.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<network-security-config> + <domain-config cleartextTrafficPermitted="true"> + <domain includeSubdomains="false">127.0.0.1</domain> + <domain includeSubdomains="false">localhost</domain> + </domain-config> +</network-security-config> diff --git a/app/src/main/rust/stores/Cargo.lock b/app/src/main/rust/stores/Cargo.lock index b259f7d3b1..90055ee4c7 100644 --- a/app/src/main/rust/stores/Cargo.lock +++ b/app/src/main/rust/stores/Cargo.lock @@ -1,5 +1,3 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. version = 4 [[package]] @@ -53,6 +51,12 @@ version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.11.1" @@ -123,6 +127,21 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" + [[package]] name = "crc32fast" version = "1.5.0" @@ -171,6 +190,7 @@ dependencies = [ "futures-util", "jni", "libc", + "lzma-rs", "reqwest", "serde_json", "sha1", @@ -594,6 +614,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", +] + [[package]] name = "memchr" version = "2.8.1" diff --git a/app/src/main/rust/stores/Cargo.toml b/app/src/main/rust/stores/Cargo.toml index 49c36453ef..d21d5132be 100644 --- a/app/src/main/rust/stores/Cargo.toml +++ b/app/src/main/rust/stores/Cargo.toml @@ -2,9 +2,6 @@ name = "droiddeckstores" version = "0.1.0" edition = "2021" -# The engines are a port of Bannerlator's bl-steam-client store modules (GPL-3.0-or-later, derived -# from WinNative's wn-steam-client; the Epic selection/verify rules trace back to GameNative and -# Legendary, both GPL-3.0). DroidDeck is GPL-3.0, so the crate keeps the licence it came with. license = "GPL-3.0-or-later" publish = false @@ -14,24 +11,13 @@ crate-type = ["cdylib"] [dependencies] jni = "0.21" -# setpriority/gettid: every engine thread runs at nice +10 (see src/priority.rs). Already in the -# dependency tree through tokio, at the version Cargo.lock pins. libc = "0.2" -# zlib inflate for GOG gen2 chunks and Epic chunk bodies. The pure-Rust backend keeps the .so free -# of a C zlib and of the NDK sysroot's libz, which the apk does not ship. +lzma-rs = { version = "0.3", default-features = false } flate2 = { version = "1", default-features = false, features = ["rust_backend"] } -# The fetch core drives every request through ONE tokio current-thread runtime and feeds a sync -# process pool; rustls (via ring) is the TLS stack so there is no OpenSSL to cross-compile. `gzip` -# transparently inflates a CDN answer that comes back content-encoded. No `blocking` client: the -# three engines are async-fetch only. reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "gzip"] } tokio = { version = "1", default-features = false, features = ["rt", "net", "time", "sync"] } futures-util = { version = "0.3", default-features = false, features = ["std"] } -# preserve_order keeps JSON object keys in source order, as in Bannerlator, so the GOG depot plan -# walks a manifest's files in the order the manifest lists them (largest-first sorting happens -# after, explicitly). serde_json = { version = "1", features = ["preserve_order"] } -# Epic chunks are SHA-1 verified, Amazon files SHA-256; GOG's MD5 is the in-tree md5_small. sha1 = "0.10" sha2 = "0.10" diff --git a/app/src/main/rust/stores/JNI.md b/app/src/main/rust/stores/JNI.md index 9f1b385504..c5cd077443 100644 --- a/app/src/main/rust/stores/JNI.md +++ b/app/src/main/rust/stores/JNI.md @@ -2,9 +2,12 @@ The Kotlin side of the store download engines mirrors this file exactly. Every symbol the library exports is listed here with the class it binds to, the JNI signature, when it is called and on -which thread. The engines came from Bannerlator's `bl-steam-client` crate; the method names and -signatures are identical to Bannerlator's `BlGogDownload` / `BlEpicDownload` / `BlAmazonDownload`, -only the package and class names changed. +which thread. The GOG engine and the shared fetch core came from Bannerlator's +`bl-steam-client` crate (method names and signatures match Bannerlator's `BlGogDownload`, only the +package and class names changed). The Epic module (`src/epic/`) and the Amazon module +(`src/amazon/`) are DroidDeck's own, each written from a functional spec (see +`docs/development/epic-cleanroom.md` and `docs/development/amazon-cleanroom.md`); their JNI +surfaces below are new. Load it once with `System.loadLibrary("droiddeckstores")`. The library is built by Gradle (`buildRustStores`, see `app/build.gradle`) and is absent from a `-PskipRust=true` build, so every @@ -112,161 +115,173 @@ On-disk protocol (what a resumed run, by either engine, relies on): a file is as ## `com.droiddeck.launcher.stores.epic.EpicNative` -Two runs make up the native half of an Epic install: +Everything Epic runs in the Rust `epic` module: the web-service calls (sign-in, refresh, exchange +codes, library, catalog, build information, shop shelves, achievements, cloud saves), manifest +parsing and the install engine. Tokens are passed in per call and never stored or logged by the +library; the Kotlin facade keeps them in the shared Keystore-sealed account store. Requests send +`DroidDeck/<versionName>` (`epic/net.rs::USER_AGENT_PRODUCT`; the version comes from +`nativeConfigure`), except achievements, which Epic only answers for its launcher agent +(`epic/net.rs::EPIC_LAUNCHER_USER_AGENT`). -1. **Fetch** (`nativeStart`): fills the chunk cache with verified, decompressed chunks for the - files the manager says are pending. The Kotlin manager still fetches and parses the manifest - API JSON, downloads the manifest, selects files (install tags), runs the delta/verify pass and - does every post-install step. The engine re-parses the same manifest bytes (ChunksV4 binary - or legacy JSON), rebuilds the chunk plan for the pending files, skips chunks already in the - cache, and writes verified chunks with a `.part` + rename protocol, so the on-disk state is the - same whichever side fetched. -2. **Assemble** (`nativeAssemble`): writes the pending files from the cache, one sequential write - per file, SHA-1 checked as the bytes go out when the manifest hashes the file. This is the - same loop the Kotlin manager runs today (`for part in file.parts: write(chunk[offset..+size])`, - same "Missing chunk X for Y" wording); the Kotlin loop remains a valid fallback. - -**The chunk cache directory** is the `chunkCacheDir` parameter of both calls (always pass the -same value to both for one install): - -- `""` — today's behaviour: the cache is `<installDir>/.chunks`. The fetch leaves it in place; - `nativeAssemble` removes it whole at the end of a successful run (as the Kotlin loop's - `deleteDir(.chunks)` does), and never deletes a chunk early. -- any other absolute path — a **scratch cache**, meant for internal storage when the game - installs to an SD card (each byte then hits the card once instead of twice; the card's write - speed stops starving the fetchers). The fetch fills it exactly like `.chunks`. The assembler - reference-counts chunk GUIDs across the files it was given and **deletes each cached chunk as - soon as the last file that uses it has been written and verified**, then removes the directory - at the end of a successful run. A cancelled or failed run (fetch or assembly) leaves the cache - exactly as it stands, for resume: the next run's delta pass skips finished files and the next - fetch skips chunks still cached. The directory is created by the fetch if it does not exist; - give each install its own (e.g. `<cacheRoot>/epic/<appName>`), since a successful assembly - removes it. - -| Method | JNI signature | Symbol | +| Method | JNI signature | Symbol suffix | |---|---|---| -| `nativeStart(...)`: Long | `([BLjava/lang/String;Ljava/lang/String;[Ljava/lang/String;[IIJLjava/lang/String;IILjava/lang/Object;)J` (last parameter is the listener) | `Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeStart` | -| `nativeAssemble(...)`: Long | `([BLjava/lang/String;Ljava/lang/String;[ILjava/lang/Object;)J` (last parameter is the listener) | `Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeAssemble` | -| `nativeCancel(handle: Long)` | `(J)V` | `Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeCancel` | -| `nativeRelease(handle: Long)` | `(J)V` | `Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeRelease` | +| `nativeConfigure(appVersion: String)` | `(Ljava/lang/String;)V` | `nativeConfigure` | +| `nativeCall(op: String, request: String): String?` | `(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;` | `nativeCall` | +| `nativeFetch(op: String, request: String): ByteArray?` | `(Ljava/lang/String;Ljava/lang/String;)[B` | `nativeFetch` | +| `nativeSend(op: String, request: String, body: ByteArray): String?` | `(Ljava/lang/String;Ljava/lang/String;[B)Ljava/lang/String;` | `nativeSend` | +| `nativeInspect(manifest: ByteArray, request: String): String?` | `([BLjava/lang/String;)Ljava/lang/String;` | `nativeInspect` | +| `nativeInstall(request: String, listener: InstallListener): Long` | `(Ljava/lang/String;Lcom/droiddeck/launcher/stores/epic/EpicNative$InstallListener;)J` | `nativeInstall` | +| `nativeCancel(handle: Long)` | `(J)V` | `nativeCancel` | +| `nativeRelease(handle: Long)` | `(J)V` | `nativeRelease` | -`nativeCancel` / `nativeRelease` take the handle of either run. There is no `nativeProbe`; -Bannerlator probes by catching the `Throwable` from `loadLibrary` / the first `nativeStart`. +Full symbols are `Java_com_droiddeck_launcher_stores_epic_EpicNative_<suffix>`. Every call is +synchronous on the calling thread (network calls block: call them off the main thread) except +`nativeInstall`, which returns at once. A Rust panic is caught at the boundary (`null` / 0 result). -```kotlin -@JvmStatic private external fun nativeStart( - manifest: ByteArray, installDir: String, chunkCacheDir: String, cdnPrefixes: Array<String>, - pendingFileIdx: IntArray, expectedChunks: Int, expectedBytes: Long, caBundlePath: String, - maxWorkers: Int, processWorkers: Int, listener: Listener, -): Long -@JvmStatic private external fun nativeAssemble( - manifest: ByteArray, installDir: String, chunkCacheDir: String, fileIdx: IntArray, listener: Listener, -): Long -``` +### `nativeCall` operations -### `nativeStart` parameters, in order +`request` and the answer are JSON objects. A failure answers `{"error": "…"}`. -| # | Parameter | Meaning | +| op | request | answer | |---|---|---| -| 1 | `manifest: ByteArray` | the raw manifest bytes the manager downloaded (binary ChunksV4 or JSON) | -| 2 | `installDir: String` | absolute install directory | -| 3 | `chunkCacheDir: String` | `""` = `<installDir>/.chunks`; else the scratch cache directory (see above) | -| 4 | `cdnPrefixes: Array<String>` | the CDN base URLs from the manifest API answer (`.../ChunksV4/<n>/` style); one or many, distinct hosts widen the window | -| 5 | `pendingFileIdx: IntArray` | indices into the manifest's file list of the files still to fetch (the manager's delta/verify result) | -| 6 | `expectedChunks: Int` | the manager's own needed-chunk count for a cross-check; `-1` = no cross-check | -| 7 | `expectedBytes: Long` | the manager's `Σ max(fileSize, 1)` for a cross-check; `-1` = no cross-check | -| 8 | `caBundlePath: String` | see conventions | -| 9 | `maxWorkers: Int` | window ceiling (Bannerlator: 8) | -| 10 | `processWorkers: Int` | inflate/verify/write threads | -| 11 | `listener` | see below | +| `auth.config` | – | `startUrl`, `redirectPrefix`, `webViewUserAgent` for the login WebView | +| `auth.codeFromPage` | `text` (the redirect page body as the WebView returns it) | `code`, or `{}` | +| `auth.signIn` | `code` | `access_token`, `refresh_token`?, `account_id`?, `display_name`?, `expires_at` (epoch ms) | +| `auth.refresh` | `refreshToken` | same as `auth.signIn` (absent fields: keep the stored ones) | +| `auth.exchange` | `accessToken` | `code` (single-use launch exchange code) | +| `library.owned` | `accessToken` | `records[]` of `appName`, `namespace`, `catalogItemId` (all pages; filtered to installable Windows games). A refused token answers `{"error":…, "signIn": true}`; any failed page fails the whole call | +| `catalog.details` | `accessToken`, `namespace`, `catalogItemId` | `details`: `title`, `developer`, `description`, `publisher`, `releaseDate`, `tall`, `wide`, `canRunOffline`, `dlc`, `mainGameId` | +| `catalog.attribute` | `accessToken`, `namespace`, `catalogItemId`, `name` | `value` (`""` = absent), or `unknown: true` when the service could not be asked | +| `build.info` | `accessToken`, `namespace`, `catalogItemId`, `appName` | `info`: the opaque build description (`manifest`, `buildVersion`, `deploymentId`, `cdns[]` of `base`/`dir`/`auth`) | +| `build.cdns` | `info` | `cdns[]` | +| `build.prereq` | `info` | `name`, `path`, `read` (downloads and parses the manifest) | +| `shop.shelves` | `country` | `new`, `deals`, `free`, `trending`: arrays in the `store_featured` item shape plus `allTags`; `art`: cover URLs from every promotion, for the signed-out wall | +| `achievements` | `accessToken`, `namespace`, `accountId`, `locale` | `list[]` of `id`, `name`, `description`, `hidden`, `unlocked`, `unlockedAt` (s), `icon`, `iconLocked` | +| `cloud.list` | `accessToken`, `accountId`, `appName` | `files[]` of `name`, `modified` (ms, -1 unknown), `hash`, `readLink` | +| `cloud.writeLinks` | `accessToken`, `accountId`, `appName`, `names[]` | `links`: name → write link | +| `launch.args` | `displayName`, `accountId`, `namespace`, `locale`, `appName`, `deploymentId`, `additional` | `args[]` | +| `locale` | `language`, `region` | `key`, `tags[]`, `launchLocale` | -Planning (manifest parse + plan + cross-check) runs synchronously on the calling thread, so a -plan failure returns `0` BEFORE any fetch; the manager then runs its own fallback loop. On `0`, -`onComplete(false, reason, 0)` has already been called synchronously (except for a null listener). -On success, `onPlan` has been called synchronously before `nativeStart` returns, then the fetch -runs on a new thread. The engine's `plan` log line names the cache: -`plan chunk_dir=ChunksV4 cache_dir=<dir> scratch=<bool> files_pending=… chunks=… bytes=… …`. +`nativeFetch` ops: `manifest.download` (`info`, optional `cdns`) → the manifest bytes; +`cloud.read` (`url`) → the file. `null` = failed. `nativeSend` op: `cloud.write` (`url`) with the +body → `{"ok": true}` or an error. `nativeInspect` parses manifest bytes: `{"op":"summary"}` → +`buildVersion`, `launchExe`, `prereqName`, `prereqPath`, `prereqRead`, `files[]` (`path`, `size`, +`tags`); `{"op":"select","tags":[…]}` → `indices[]` of the files an install with those tags gets. -### `nativeAssemble` parameters, in order +### `nativeInstall` -| # | Parameter | Meaning | +`request` (JSON): `info` (from `build.info`), absolute `gameDir`, `scratchDir` (`""` or the internal +scratch cache for a card install), `storageLabel` (for space messages), `tags[]` (device install +tags), `maxWorkers` (network window, 1–128), `processWorkers` (decode/write threads), `caBundle` +(`""` = the roots rustls ships with). + +An unreadable request returns `0` after a synchronous `onComplete(false, false, error, "")`. +Otherwise the run happens on a thread named `epic-install` (background priority) and +`onComplete` fires exactly once, last. `nativeCancel` is idempotent and may be called at any time +before `nativeRelease`; call `nativeRelease` exactly once per non-zero handle, after `onComplete`. +The Kotlin wrapper (`EpicNative.install`) polls its cancel flag every 250 ms, forwards it, and waits +for `onComplete` without a time limit: the run removes its unfinished stage files before it +completes. + +| `InstallListener` method | JNI signature | When | |---|---|---| -| 1 | `manifest: ByteArray` | the same manifest bytes as the fetch | -| 2 | `installDir: String` | absolute install directory (files are written at `installDir/<filename with \\ → />`) | -| 3 | `chunkCacheDir: String` | the same value the fetch was given (`""` or the scratch directory) | -| 4 | `fileIdx: IntArray` | indices into the manifest's file list of the files to write — the fetch's `pendingFileIdx`, in one call | -| 5 | `listener` | see below | +| `onStatus(text)` | `(Ljava/lang/String;)V` | manifest-stage status lines | +| `onCheck(doneBytes, totalBytes, files, filesTotal)` | `(JJII)V` | the delta pass, every 16 files and at its end | +| `onSizes(pendingBytes, diskBytes)` | `(JJ)V` | once pending work is known | +| `onProgress(written, total, files, filesTotal)` | `(JJII)V` | pending-file bytes written; at most every 50 ms plus per finished file; may arrive out of order from several threads | +| `onInstall(done, total, files, filesTotal)` | `(JJII)V` | every file is written and verified | +| `onLog(line)` | `(Ljava/lang/String;)V` | `manifest …`, `plan …`, the fetch core's lines, `summary …`; also in logcat under `EpicNative` | +| `beforeReplace(): Boolean` | `()Z` | once, before the first file replaces its destination; `false` or a throw fails the run with nothing replaced | +| `onComplete(success, cancelled, error, result)` | `(ZZLjava/lang/String;Ljava/lang/String;)V` | terminal. `result` (on success) is JSON: `buildVersion`, `launchExe`, `prereqName`, `prereqPath`, `prereqRead`, `deploymentId`, `diskBytes`, `bytesWritten`, `filesWritten`; `error` is `"cancelled"` on cancel | -Parse + plan run on the calling thread: an unparsable manifest, an index out of range or an -empty `installDir` returns `0` after a synchronous `onComplete(false, reason, 0)` and nothing is -written. Otherwise the assembly runs on a new thread. Each file is created fresh and written in -part order; on any error (missing chunk, short chunk, I/O error, SHA-1 mismatch) the file being -written is deleted, the run fails with that error, no further files are touched and the cache is -left as it is. A manifest SHA-1 of all zeros (and a JSON manifest, which has none) means no hash -check — the Kotlin delta pass treats those the same way. The run's log lines: -`assemble cache_dir=… scratch=… files=… bytes=… chunks_referenced=…`, then `cache removed …` / -`cache not removed …: <why>` (not fatal) and `assembled files=… bytes=… chunks_removed_early=…`. - -### Listener - -Suggested: `com.droiddeck.launcher.stores.epic.EpicNative.Listener` (nested interface, as in -Bannerlator). One interface serves both runs. - -| Listener method | JNI signature | When | -|---|---|---| -| `onPlan(chunksTotal: Int, bytesTotal: Long, chunkDir: String)` | `(IJLjava/lang/String;)V` | fetch only: once, synchronously inside `nativeStart`, before any fetch: the plan the engine derived (`chunkDir` is the manifest's, e.g. `ChunksV4`, not the cache directory) | -| `onProgress(bytesDone: Long, bytesTotal: Long, done: Int, total: Int)` | `(JJII)V` | fetch: per accounted chunk (cached-skip or fetched), `done`/`total` = chunks; assembly: after each file written, `bytesDone` = bytes written so far, `done`/`total` = files. Native threads. | -| `onLog(line: String)` | `(Ljava/lang/String;)V` | engine log line, already in logcat under `EpicNative`; any native thread (also synchronously from `nativeStart`/`nativeAssemble` for the start line) | -| `onComplete(success: Boolean, error: String, bytes: Long)` | `(ZLjava/lang/String;J)V` | terminal, exactly once (worker thread; or synchronously when the call returns `0`). Fetch: `bytes` = credited bytes (cached-skip + fetched). Assembly: `bytes` = bytes written. `error` is `"cancelled"` on cancel. | - -Bannerlator's `BlEpicDownload.run(...)` wraps `nativeStart` in a blocking call that polls an -`AtomicBoolean` cancel flag every 250 ms, calls `nativeCancel` on cancel, waits up to 5 s for -`onComplete`, then `nativeRelease` in `finally`. The same wrapper shape fits `nativeAssemble` -(cancel is honoured between files; a multi-GB file finishes before the run stops). +On-disk protocol: game files are staged in `<gameDir>/.droiddeck-epic-staging/*.stage` (owner +marker `owner` = `DroidDeck Epic staging v1\n`) and renamed over their destination after size and +SHA-1 checks; reusable chunks live, decompressed, as `<GUID>` (extra copies `<GUID>.<n>`, writes via +`.part`) in `<gameDir>/.chunks` or the scratch directory. ## `com.droiddeck.launcher.stores.amazon.AmazonNative` -The file-fetch pool of an Amazon Games install: one streamed HTTP GET per manifest file, SHA-256 -checked, written as `<dest>.tmp` and renamed. The manager keeps manifest/auth/markers/post-install -and hands the engine a JSON plan. +Everything Amazon Games runs in the Rust `amazon` module (`src/amazon/`, written from a functional +spec, see `docs/development/amazon-cleanroom.md`): device sign-in values and registration, token +refresh, deregistration, the entitlement library, the download lookup, manifest framing, +decompression and parsing, the install engine, and the launch details (exe, arguments, FuelPump +environment). Tokens are passed in per call and never stored or logged by the library; the Kotlin +facade keeps them in the shared Keystore-sealed account store. -| Method | JNI signature | Symbol | +User-Agents (all in `amazon/net.rs`): the sign-in WebView and `api.amazon.com` get a desktop +Firefox string (`BROWSER_USER_AGENT`); the distribution service (`gaming.amazon.com`) gets the +Windows games launcher's `User-Agent: AGSLauncher/1.0.0` plus its non-standard +`UserAgent: com.amazon.agslauncher.win/3.0.9202.1` header; the CDN (manifest and files) gets +`DroidDeck/<versionName>` (`USER_AGENT_PRODUCT`; the version comes from `nativeConfigure`). + +| Method | JNI signature | Symbol suffix | |---|---|---| -| `nativeStart(...)`: Long | `(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/lang/Object;)J` (last parameter is the listener) | `Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeStart` | -| `nativeCancel(handle: Long)` | `(J)V` | `Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeCancel` | -| `nativeRelease(handle: Long)` | `(J)V` | `Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeRelease` | +| `nativeConfigure(appVersion: String)` | `(Ljava/lang/String;)V` | `nativeConfigure` | +| `nativeCall(op: String, request: String): String?` | `(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;` | `nativeCall` | +| `nativeFetch(op: String, request: String): ByteArray?` | `(Ljava/lang/String;Ljava/lang/String;)[B` | `nativeFetch` | +| `nativeInspect(manifest: ByteArray, request: String): String?` | `([BLjava/lang/String;)Ljava/lang/String;` | `nativeInspect` | +| `nativeInstall(request: String, listener: InstallListener): Long` | `(Ljava/lang/String;Lcom/droiddeck/launcher/stores/amazon/AmazonNative$InstallListener;)J` | `nativeInstall` | +| `nativeCancel(handle: Long)` | `(J)V` | `nativeCancel` | +| `nativeRelease(handle: Long)` | `(J)V` | `nativeRelease` | -`nativeStart` parameters, in order: +Full symbols are `Java_com_droiddeck_launcher_stores_amazon_AmazonNative_<suffix>`. Every call is +synchronous on the calling thread (network calls block: call them off the main thread) except +`nativeInstall`, which returns at once. A Rust panic is caught at the boundary (`null` / 0 result). +The Amazon module writes nothing to logcat itself; install lines reach the app through `onLog`. -| # | Parameter | Meaning | +### `nativeCall` operations + +`request` and the answer are JSON objects. A failure answers `{"error": "…"}`. + +| op | request | answer | |---|---|---| -| 1 | `planJson: String` | a JSON array, one object per manifest file: `{"relPath": "...", "url": "https://...", "size": <long>, "sha256hex": "..."}` (`sha256hex` may be `""` = no hash check). Every manifest file goes in: the engine applies the size-based resume-skip itself. | -| 2 | `installDir: String` | absolute install directory | -| 3 | `caBundlePath: String` | see conventions | -| 4 | `maxWorkers: Int` | window size; `<= 0` = the engine default (8, Amazon's own `MAX_PARALLEL`) | -| 5 | `processWorkers: Int` | sync verify+write threads (`<= 0` → 1) | -| 6 | `listener` | see below | +| `auth.start` | – | `startUrl` (the sign-in page with a fresh PKCE challenge), `userAgent` (for the WebView), `redirectMarker` (`openid.oa2.authorization_code=`), and the attempt's `serial`, `clientId`, `verifier` (kept by the flow object until `auth.register`) | +| `auth.register` | `url` (the return URL) or `code`, plus `serial`, `clientId`, `verifier` | `access_token`, `refresh_token`, `expires_at` (epoch ms), `device_serial`, `client_id`, `display_name`? — the credential record's own key names; `{"error":…, "noCode": true}` when the URL carries no code | +| `auth.refresh` | `refreshToken` | `access_token`, `expires_at` (the refresh token does not change) | +| `auth.deregister` | `accessToken` | `{}` (the answer is not interpreted) | +| `library.entitlements` | `accessToken`, `deviceSerial` | `total` (entitlements before filtering) and `games[]` of `productId`, `entitlementId`, `title`, `sku`, `art`, `hero`, `developer`, `publisher`, `dlc`, `parentProductId` — all pages, de-duplicated by product id, add-ons with a parent hidden (unless that hides everything), sorted by title. A refused token (HTTP 401/403, or 400 `NotAuthorizedException`) answers `{"error":…, "signIn": true}`; any failed page fails the whole call | +| `download.lookup` | `accessToken`, `entitlementId` | `downloadUrl`, `versionId` | +| `download.size` | `accessToken`, `entitlementId` | `bytes` (0 = unknown) | +| `launch.spec` | `gameDir`, `title` | `exe` (relative, `/`, `""` when the folder has no `.exe`), `args[]`, `source` (`fuel` / `score`), `warning` (or null) | +| `launch.env` | `entitlementId`, `sku`, `displayName` | `env[]` of `[name, value]` pairs, in order | -Returns `0` when the listener is null (no callback), or when `planJson` / `installDir` is empty -(`onComplete(false, "empty plan or install dir", 0)` fires synchronously first), or when the -listener `GlobalRef` cannot be taken (no callback). The engine keeps the `JavaVM` it takes from -the first `nativeStart`. +`nativeFetch` op: `cdn.get` (`url`, optional `accessToken` sent as `x-amzn-token`) → the body, or +`null`. `nativeInspect` parses a manifest object: `totalBytes`, `files`, or an error. -Suggested listener: `com.droiddeck.launcher.stores.amazon.AmazonNative.Listener` (an interface). +### `nativeInstall` -| Listener method | JNI signature | When | +`request` (JSON): `accessToken`, `entitlementId`, absolute `gameDir`, `maxWorkers` (request window, +1–128), `processWorkers` (verify/write workers; the engine uses at least half the CPU cores), +`caBundle` (`""` = the roots rustls ships with). + +An unusable request returns `0` after a synchronous `onComplete(false, false, error, "")`. +Otherwise the run happens on a thread named `amazon-install` (background priority) and +`onComplete` fires exactly once, last. `nativeCancel` is idempotent and may be called at any time +before `nativeRelease`; call `nativeRelease` exactly once per non-zero handle, after `onComplete`. +The Kotlin wrapper (`AmazonNative.install`) polls its cancel flag every 250 ms, forwards it once, +and waits for `onComplete` without a time limit: the run removes its `.tmp` files before it +completes. + +| `InstallListener` method | JNI signature | When | |---|---|---| -| `onProgress(bytesDone: Long, bytesTotal: Long, filesDone: Long, filesTotal: Long)` | `(JJJJ)V` | once up front with the resume-skipped credit, then after each committed file (and as pieces stream in); `bytesDone` includes skipped files. Native threads. | -| `onLog(line: String)` | `(Ljava/lang/String;)V` | one diagnostic line (`engine=rust …`, `fetch-window …`, `summary …`). The Amazon engine does NOT write to logcat itself: the Kotlin side is the one place that logs these, so each line appears once. | -| `onComplete(success: Boolean, error: String, bytesWritten: Long)` | `(ZLjava/lang/String;J)V` | exactly once, when the run succeeds, fails or is cancelled (`error = "cancelled"`). | +| `onStatus(text)` | `(Ljava/lang/String;)V` | manifest-stage status lines | +| `onCheck(doneBytes, totalBytes, files, filesTotal)` | `(JJII)V` | the check of files already on disk, at most every 200 ms and at its end | +| `onSizes(pendingBytes, totalBytes)` | `(JJ)V` | once the pending work is known | +| `onProgress(done, total, files, filesTotal)` | `(JJII)V` | bytes of the whole install that are complete (skipped files included); at most every 50 ms plus per placed file; never moves backwards on the native side, but may arrive out of order from several threads | +| `onLog(line)` | `(Ljava/lang/String;)V` | `manifest …`, `resume …`, `engine …`, the fetch core's lines, `summary …` (URL query strings removed) | +| `beforeReplace(): Boolean` | `()Z` | once, before the first file is put in place; `false` or a throw fails the run with nothing replaced | +| `onComplete(success, cancelled, error, result)` | `(ZZLjava/lang/String;Ljava/lang/String;)V` | terminal. `result` (on success) is JSON: `versionId`, `totalBytes`, `fileCount`, `filesWritten`, `bytesWritten`; `error` is `"cancelled"` on cancel, else a user-facing message | -Bannerlator's `BlAmazonDownload.runBlocking(...)` polls a cancel probe every 100 ms, calls -`nativeCancel` once, and `nativeRelease` in `finally` after `onComplete`; on thread interrupt it -cancels and waits up to 30 s for the run to wind down before releasing. +On-disk protocol: each file is written to `<file>.tmp` beside its destination and renamed over it +after the size and SHA-256 checks; leftover `.tmp` siblings of manifest files are removed when a +run starts. A file whose size and SHA-256 already match is skipped. Empty files whose hash is +absent or that of empty input are created without a request. `.amazon_download_in_progress` is +created when a run starts and removed when it succeeds, which also creates +`.amazon_download_complete`; nothing reads either marker. ## Log tags -Lines go to logcat under `GogNative` and `EpicNative` (the Amazon engine logs only through -`onLog`). Bannerlator used `BL_GOG_DL` / `BL_EPIC_DL` / `BL_AMAZON_DL`; the line grammar +Lines go to logcat under `GogNative` and `EpicNative` (the Amazon module logs only through +`onLog`). Bannerlator used `BL_GOG_DL` for the GOG engine; the fetch core's line grammar (`fetch-start`, `fetch-window`, `throughput`, `fetch-end`, `summary`) is unchanged, so its tuning notes still read against a DroidDeck log. diff --git a/app/src/main/rust/stores/src/amazon.rs b/app/src/main/rust/stores/src/amazon.rs deleted file mode 100644 index 55826f9417..0000000000 --- a/app/src/main/rust/stores/src/amazon.rs +++ /dev/null @@ -1,990 +0,0 @@ -//! Amazon Games download adapter over the shared fetch core. -//! -//! Replaces ONLY the byte-fetching pool of `AmazonDownloadManager.install()` (Step 4). -//! Java still resolves the download spec, fetches and parses `manifest.proto`, and hands -//! this module the resolved file list (one JSON entry per manifest file with the exact -//! URL the Java loop would have opened). The adapter mirrors the Java rules 1:1 where the -//! core allows it — see Bannerlator's `docs/RUST_AMAZON_PARITY.md` §4 / §9 for the table and the -//! documented deviations: -//! -//! * one `FetchItem` per WHOLE file, streamed (`FetchOptions.stream = true`): pieces are -//! appended to `<dest>.tmp` as they arrive, 8 files wide like Java's pool, memory bounded -//! to the pieces not yet written; -//! * resume-skip = `st_size == manifest size`, no hash check on skip (Java `:250`); -//! * SHA-256 is accumulated while streaming and checked in `on_finish` when the manifest -//! carries a hash; a mismatch deletes the tmp and is a retryable failure (Java `:269`); -//! * `<dest>.tmp` → delete existing dest → rename (Java `:280`); rename failure is fatal -//! without retry (Java `:281`); -//! * a piece credits its wire length to progress as it is written (Java `:347`), and pieces -//! of an attempt that later fails stay counted (Java never rolls `totalDownloaded` back). - -pub mod jni; - -use crate::fetch_core::{run_fetch, FetchItem, FetchOptions, FetchSink, SinkError}; -use sha2::{Digest, Sha256}; -use std::collections::HashMap; -use std::fs::{self, File}; -use std::io::Write; -use std::path::PathBuf; -use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; -use std::sync::{Arc, Mutex}; -use std::time::{Duration, Instant}; - -/// Java `AmazonDownloadManager.MAX_PARALLEL`. -pub const MAX_PARALLEL: usize = 8; -/// Java `AmazonDownloadManager.DOWNLOAD_USER_AGENT`. -pub const DOWNLOAD_USER_AGENT: &str = "nile/0.1 Amazon"; -/// Java `conn.setReadTimeout(120000)`; in stream mode the core applies this to the response -/// headers and then as an idle deadline per received piece — the same shape as a read timeout. -pub const REQUEST_TIMEOUT: Duration = Duration::from_secs(120); -/// Java `new File(installDir, file.unixPath() + ".tmp")`. -pub const TMP_SUFFIX: &str = ".tmp"; -/// Log label used in the core's `fetch-window` lines. -pub const LABEL: &str = "amazon"; - -/// One resolved manifest file as serialised by Java (`AmazonDownloadManager.buildRustPlan`). -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct PlanEntry { - /// `ManifestFile.unixPath()` — relative to the install dir, forward slashes. - pub rel_path: String, - /// `AmazonApiClient.appendPath(downloadUrl, "files/" + hashHex)` — signed, whole file. - pub url: String, - /// `ManifestFile.size`. - pub size: u64, - /// SHA-256 to verify against; EMPTY = Java would not verify (`hashAlgorithm != 0` or - /// no hash bytes). - pub sha256: Vec<u8>, -} - -/// Parse the JSON array `[{relPath, url, size, sha256hex}]`. `relPath` is normalised the same -/// way as `ManifestFile.unixPath()` so a caller that forgot is still byte-identical. -pub fn parse_plan(json: &str) -> Result<Vec<PlanEntry>, String> { - let value: serde_json::Value = - serde_json::from_str(json).map_err(|err| format!("plan json: {err}"))?; - let Some(array) = value.as_array() else { - return Err("plan json: expected an array".to_string()); - }; - let mut entries = Vec::with_capacity(array.len()); - for (index, item) in array.iter().enumerate() { - let rel_path = item - .get("relPath") - .and_then(|v| v.as_str()) - .map(unix_path) - .unwrap_or_default(); - if rel_path.is_empty() { - return Err(format!("plan json: entry {index} has no relPath")); - } - let url = item - .get("url") - .and_then(|v| v.as_str()) - .unwrap_or_default() - .to_string(); - if url.is_empty() { - return Err(format!("plan json: entry {index} ({rel_path}) has no url")); - } - let size = item - .get("size") - .and_then(|v| v.as_u64().or_else(|| v.as_i64().map(|s| s.max(0) as u64))) - .unwrap_or(0); - let sha_hex = item - .get("sha256hex") - .and_then(|v| v.as_str()) - .unwrap_or_default(); - let sha256 = if sha_hex.is_empty() { - Vec::new() - } else { - hex_decode(sha_hex) - .ok_or_else(|| format!("plan json: entry {index} ({rel_path}) bad sha256hex"))? - }; - entries.push(PlanEntry { - rel_path, - url, - size, - sha256, - }); - } - Ok(entries) -} - -/// `ManifestFile.unixPath()`. -pub fn unix_path(path: &str) -> String { - path.replace('\\', "/") -} - -/// Lowercase/uppercase hex → bytes; `None` on odd length or a non-hex digit. -pub fn hex_decode(hex: &str) -> Option<Vec<u8>> { - let bytes = hex.as_bytes(); - if bytes.len() % 2 != 0 { - return None; - } - let nibble = |b: u8| -> Option<u8> { - match b { - b'0'..=b'9' => Some(b - b'0'), - b'a'..=b'f' => Some(b - b'a' + 10), - b'A'..=b'F' => Some(b - b'A' + 10), - _ => None, - } - }; - let mut out = Vec::with_capacity(bytes.len() / 2); - for pair in bytes.chunks(2) { - out.push((nibble(pair[0])? << 4) | nibble(pair[1])?); - } - Some(out) -} - -/// `new File(installDir, rel)` — Java resolves the child textually under the parent, so -/// build the path by concatenation (never `Path::join`, which would let a leading `/` escape). -pub fn dest_path(install_dir: &str, rel_path: &str) -> PathBuf { - let base = install_dir.trim_end_matches('/'); - PathBuf::from(format!("{base}/{rel_path}")) -} - -/// `new File(installDir, rel + ".tmp")`. -pub fn tmp_path(install_dir: &str, rel_path: &str) -> PathBuf { - dest_path(install_dir, &format!("{rel_path}{TMP_SUFFIX}")) -} - -/// Java `:250`: `destFile.exists() && destFile.length() == file.size`. `File.length()` is -/// `st_size`, which is what `Metadata::len()` returns — including for a directory, so the -/// (degenerate) behaviours match too. No hash is checked on skip, on purpose. -pub fn is_present_and_complete(install_dir: &str, entry: &PlanEntry) -> bool { - fs::metadata(dest_path(install_dir, &entry.rel_path)) - .map(|meta| meta.len() == entry.size) - .unwrap_or(false) -} - -/// `scheme://host[:port]` of a URL — the per-host cap key. Amazon serves every file from the -/// one signed CDN base, so this yields a single host. -pub fn host_key(url: &str) -> String { - let (scheme, rest) = match url.find("://") { - Some(idx) => (&url[..idx], &url[idx + 3..]), - None => ("https", url), - }; - let end = rest.find(['/', '?', '#']).unwrap_or(rest.len()); - format!("{scheme}://{}", &rest[..end]) -} - -/// Improvements round 1: `max(6, ceil(max_workers / distinct_hosts))` — a single-host store -/// (Amazon's one signed a2z base) gets the whole ceiling on its one host; the core clamps the -/// window to `hosts × per_host_cap`, so anything smaller would silently cut the ceiling. -pub fn per_host_cap_for(max_workers: usize, distinct_hosts: usize) -> usize { - let hosts = distinct_hosts.max(1); - let per_host = max_workers.max(1).div_ceil(hosts); - per_host.max(crate::fetch_tuning::PER_HOST_CAP) -} - -/// The resolved work for one run. -#[derive(Debug, Default)] -pub struct Plan { - /// Items to fetch (index into `entries` via `FetchItem.id`). - pub items: Vec<FetchItem>, - /// Every manifest file, in manifest order (fetched and skipped alike). - pub entries: Vec<PlanEntry>, - /// Σ size of all entries = `ParsedManifest.totalInstallSize`. - pub total_bytes: u64, - /// Bytes credited up front for files that passed the resume check. - pub skipped_bytes: u64, - /// Number of files that passed the resume check. - pub skipped_files: u64, - /// Distinct host keys in fetch order. - pub hosts: Vec<String>, -} - -/// Apply the Java resume-skip rule to every entry and turn the rest into whole-file items. -pub fn build_plan(entries: Vec<PlanEntry>, install_dir: &str) -> Plan { - let mut plan = Plan { - total_bytes: entries.iter().map(|e| e.size).sum(), - ..Plan::default() - }; - for (index, entry) in entries.iter().enumerate() { - if is_present_and_complete(install_dir, entry) { - plan.skipped_bytes = plan.skipped_bytes.saturating_add(entry.size); - plan.skipped_files += 1; - continue; - } - let host = host_key(&entry.url); - if !plan.hosts.contains(&host) { - plan.hosts.push(host); - } - plan.items.push(FetchItem { - id: index as u64, - urls: vec![entry.url.clone()], - reserve: entry.size, - range: None, - }); - } - if plan.hosts.is_empty() { - plan.hosts.push("https://amazon".to_string()); - } - plan.entries = entries; - plan -} - -/// One `<dest>.tmp` being streamed: the open handle, the running hash and the bytes written -/// by the current attempt. -struct OpenTmp { - file: File, - hasher: Sha256, - written: u64, -} - -/// Sink: stream pieces into `<dest>.tmp` (SHA-256 accumulated on the fly), verify and rename -/// in `on_finish`. `process` (whole-body mode) does the same in one step. -pub struct AmazonSink { - install_dir: String, - entries: Vec<PlanEntry>, - cancel: Arc<AtomicBool>, - files_done: AtomicU64, - /// Per-item open tmp files. The map lock is held only to look the entry up; the write - /// itself happens under the per-item lock so 8 streams never serialise on one mutex. - open: Mutex<HashMap<u64, Arc<Mutex<OpenTmp>>>>, -} - -impl AmazonSink { - pub fn new(install_dir: &str, entries: Vec<PlanEntry>, cancel: Arc<AtomicBool>) -> Self { - Self { - install_dir: install_dir.to_string(), - entries, - cancel, - files_done: AtomicU64::new(0), - open: Mutex::new(HashMap::new()), - } - } - - pub fn files_done(&self) -> u64 { - self.files_done.load(Ordering::Relaxed) - } - - fn entry(&self, item: &FetchItem) -> Result<&PlanEntry, SinkError> { - self.entries - .get(item.id as usize) - .ok_or_else(|| SinkError::Fatal(format!("plan index {} out of range", item.id))) - } - - /// Java `:260` — `destFile.getParentFile().mkdirs()` before each attempt; a failure - /// surfaces on the create/write below, like Java's. - fn ensure_parent(&self, entry: &PlanEntry) { - if let Some(parent) = dest_path(&self.install_dir, &entry.rel_path).parent() { - let _ = fs::create_dir_all(parent); - } - } - - /// Java `:280-284`: delete an existing dest, rename tmp → dest; rename failure fails the - /// file with NO retry (→ whole install fails). - fn rename_into_place(&self, entry: &PlanEntry) -> Result<(), SinkError> { - let dest = dest_path(&self.install_dir, &entry.rel_path); - let tmp = tmp_path(&self.install_dir, &entry.rel_path); - if dest.exists() { - let _ = fs::remove_file(&dest); - } - if let Err(err) = fs::rename(&tmp, &dest) { - let _ = fs::remove_file(&tmp); - return Err(SinkError::Fatal(format!( - "Failed to rename tmp → {} ({err})", - dest.display() - ))); - } - self.files_done.fetch_add(1, Ordering::Relaxed); - Ok(()) - } - - /// Java `:267-277`: SHA-256 check when the manifest carries a hash; a mismatch deletes the - /// tmp and is retried. - fn verify(&self, entry: &PlanEntry, digest: &[u8]) -> Result<(), SinkError> { - if !entry.sha256.is_empty() && digest != entry.sha256.as_slice() { - let _ = fs::remove_file(tmp_path(&self.install_dir, &entry.rel_path)); - return Err(SinkError::Retry(format!( - "SHA-256 mismatch for: {}", - entry.rel_path - ))); - } - Ok(()) - } - - /// Whole-body path (`FetchOptions.stream = false`): verify → write tmp → rename. - pub fn commit(&self, entry: &PlanEntry, body: &[u8]) -> Result<u64, SinkError> { - if !entry.sha256.is_empty() { - let digest = Sha256::digest(body); - if digest.as_slice() != entry.sha256.as_slice() { - return Err(SinkError::Retry(format!( - "SHA-256 mismatch for: {}", - entry.rel_path - ))); - } - } - self.ensure_parent(entry); - let tmp = tmp_path(&self.install_dir, &entry.rel_path); - if let Err(err) = fs::write(&tmp, body) { - let _ = fs::remove_file(&tmp); - return Err(SinkError::Retry(format!("write {}: {err}", tmp.display()))); - } - self.rename_into_place(entry)?; - Ok(body.len() as u64) - } - - /// After the run: close and delete every tmp that never reached `on_finish` (a stream that - /// failed after max attempts, or was cut by cancel / a fatal error). Java deletes the tmp - /// of every failed or cancelled attempt (`:271`, `:288`, `:293`, `:297`), so no `.tmp` - /// may survive a run on either engine. Returns how many were removed. - pub fn cleanup_partials(&self) -> usize { - let leftovers: Vec<(u64, Arc<Mutex<OpenTmp>>)> = match self.open.lock() { - Ok(mut open) => open.drain().collect(), - Err(_) => return 0, - }; - let mut removed = 0; - for (id, open) in leftovers { - drop(open); - if let Some(entry) = self.entries.get(id as usize) { - if fs::remove_file(tmp_path(&self.install_dir, &entry.rel_path)).is_ok() { - removed += 1; - } - } - } - removed - } -} - -impl FetchSink for AmazonSink { - fn process(&self, item: &FetchItem, body: Vec<u8>) -> Result<u64, SinkError> { - if self.cancel.load(Ordering::Relaxed) { - return Err(SinkError::Fatal("cancelled".to_string())); - } - let entry = self.entry(item)?; - self.commit(entry, &body) - } - - fn on_chunk(&self, item: &FetchItem, offset: u64, data: &[u8]) -> Result<(), SinkError> { - if self.cancel.load(Ordering::Relaxed) { - // Java `:342-344`: cancel inside the read loop → tmp deleted (cleanup_partials). - return Err(SinkError::Fatal("cancelled".to_string())); - } - let entry = self.entry(item)?; - let tmp = tmp_path(&self.install_dir, &entry.rel_path); - let open = if offset == 0 { - // (Re)start of an attempt: Java opens a fresh FileOutputStream (truncating). - self.ensure_parent(entry); - let file = File::create(&tmp).map_err(|err| { - let _ = fs::remove_file(&tmp); - SinkError::Retry(format!("create {}: {err}", tmp.display())) - })?; - let open = Arc::new(Mutex::new(OpenTmp { - file, - hasher: Sha256::new(), - written: 0, - })); - match self.open.lock() { - Ok(mut map) => { - map.insert(item.id, Arc::clone(&open)); - } - Err(_) => return Err(SinkError::Fatal("sink map poisoned".to_string())), - } - open - } else { - let found = match self.open.lock() { - Ok(map) => map.get(&item.id).cloned(), - Err(_) => return Err(SinkError::Fatal("sink map poisoned".to_string())), - }; - match found { - Some(open) => open, - None => { - return Err(SinkError::Retry(format!( - "piece at offset {offset} without a stream start for: {}", - entry.rel_path - ))) - } - } - }; - let Ok(mut state) = open.lock() else { - return Err(SinkError::Fatal("sink item poisoned".to_string())); - }; - if state.written != offset { - let _ = fs::remove_file(&tmp); - return Err(SinkError::Retry(format!( - "piece out of order ({} != {offset}) for: {}", - state.written, entry.rel_path - ))); - } - if let Err(err) = state.file.write_all(data) { - // Java: IOException inside downloadFile → tmp deleted → next attempt. - let _ = fs::remove_file(&tmp); - return Err(SinkError::Retry(format!("write {}: {err}", tmp.display()))); - } - state.hasher.update(data); - state.written = state.written.saturating_add(data.len() as u64); - Ok(()) - } - - fn on_finish(&self, item: &FetchItem, total_len: u64) -> Result<u64, SinkError> { - let entry = self.entry(item)?; - let tmp = tmp_path(&self.install_dir, &entry.rel_path); - let taken = match self.open.lock() { - Ok(mut map) => map.remove(&item.id), - Err(_) => return Err(SinkError::Fatal("sink map poisoned".to_string())), - }; - let (written, digest) = match taken { - Some(open) => { - let Ok(mut state) = open.lock() else { - return Err(SinkError::Fatal("sink item poisoned".to_string())); - }; - if let Err(err) = state.file.flush() { - let _ = fs::remove_file(&tmp); - return Err(SinkError::Retry(format!("flush {}: {err}", tmp.display()))); - } - let written = state.written; - let digest = std::mem::replace(&mut state.hasher, Sha256::new()).finalize(); - (written, digest) - } - None => { - // Zero-byte body: no piece ever arrived. Java would have created an empty tmp. - if total_len != 0 { - return Err(SinkError::Retry(format!( - "finish without a stream for: {}", - entry.rel_path - ))); - } - self.ensure_parent(entry); - if let Err(err) = File::create(&tmp) { - return Err(SinkError::Retry(format!("create {}: {err}", tmp.display()))); - } - (0, Sha256::new().finalize()) - } - }; - if written != total_len { - let _ = fs::remove_file(&tmp); - return Err(SinkError::Retry(format!( - "stream length {written} != {total_len} for: {}", - entry.rel_path - ))); - } - self.verify(entry, digest.as_slice())?; - self.rename_into_place(entry)?; - Ok(0) - } -} - -/// Outcome of one `run_download`. -#[derive(Clone, Debug, Default)] -pub struct RunResult { - pub success: bool, - pub cancelled: bool, - pub error: String, - /// Bytes fetched by this run (skipped files excluded; failed attempts' pieces included, - /// like Java's `totalDownloaded`). - pub bytes_written: u64, - /// Files committed by this run plus files skipped by the resume check. - pub files_done: u64, - pub files_total: u64, -} - -/// Throughput bookkeeping for the final summary line (avg over the run, peak over ≥500 ms -/// progress intervals — the same sampling window the Java speed label uses). -struct SpeedMeter { - started: Instant, - last_at: Instant, - last_bytes: u64, - peak_bps: f64, -} - -impl SpeedMeter { - fn new() -> Self { - let now = Instant::now(); - Self { - started: now, - last_at: now, - last_bytes: 0, - peak_bps: 0.0, - } - } - - fn observe(&mut self, bytes: u64) { - let now = Instant::now(); - let dt = now.duration_since(self.last_at).as_secs_f64(); - if dt >= 0.5 { - let bps = bytes.saturating_sub(self.last_bytes) as f64 / dt; - if bps > self.peak_bps { - self.peak_bps = bps; - } - self.last_at = now; - self.last_bytes = bytes; - } - } - - fn summary(&self, bytes: u64) -> (f64, f64, f64) { - let elapsed = self.started.elapsed().as_secs_f64().max(0.001); - let avg = bytes as f64 / elapsed; - (elapsed, avg * 8.0 / 1_000_000.0, self.peak_bps * 8.0 / 1_000_000.0) - } -} - -/// Blocking: plan → stream-fetch → verify/rename, calling `progress(bytes_done, bytes_total, -/// files_done, files_total)` after each written piece and each finished file (skipped files -/// are pre-credited) and `log` for every diagnostic line. `bytes_done` includes skipped bytes, -/// matching Java's `totalDownloaded` (which credits skipped files at `:251`). -pub fn run_download( - plan_json: &str, - install_dir: &str, - ca_bundle_path: &str, - max_workers: usize, - process_workers: usize, - cancel: Arc<AtomicBool>, - progress: &(dyn Fn(u64, u64, u64, u64) + Sync), - log: &(dyn Fn(&str) + Sync), -) -> RunResult { - let max_workers = if max_workers == 0 { MAX_PARALLEL } else { max_workers }; - let process_workers = process_workers.max(1); - let entries = match parse_plan(plan_json) { - Ok(entries) => entries, - Err(err) => { - log(&format!("engine=rust plan error: {err}")); - return RunResult { - error: err, - ..RunResult::default() - }; - } - }; - let plan = build_plan(entries, install_dir); - let files_total = plan.entries.len() as u64; - let fetch_bytes: u64 = plan.items.iter().map(|item| item.reserve).sum(); - let per_host_cap = per_host_cap_for(max_workers, plan.hosts.len()); - log(&format!( - "engine=rust mode=stream plan={} files skip={} ({} bytes) fetch={} ({} bytes) hosts={} workers={} per_host_cap={} process={} dir={} {}", - files_total, - plan.skipped_files, - plan.skipped_bytes, - plan.items.len(), - fetch_bytes, - plan.hosts.len(), - max_workers, - per_host_cap, - process_workers, - install_dir, - crate::priority::log_field() - )); - progress(plan.skipped_bytes, plan.total_bytes, plan.skipped_files, files_total); - if plan.items.is_empty() { - log("summary bytes=0 elapsed=0.000 avg_mbps=0.0 peak_mbps=0.0 files=all-present"); - return RunResult { - success: true, - files_done: plan.skipped_files, - files_total, - ..RunResult::default() - }; - } - if cancel.load(Ordering::Relaxed) { - return RunResult { - cancelled: true, - error: "cancelled".to_string(), - files_done: plan.skipped_files, - files_total, - ..RunResult::default() - }; - } - - let opts = FetchOptions { - max_workers, - // Every Amazon file comes from the one signed CDN base: give that host the whole - // ceiling (`per_host_cap_for`), or the core would clamp the window to hosts × cap. - per_host_cap, - timeout: REQUEST_TIMEOUT, - headers: vec![("User-Agent".to_string(), DOWNLOAD_USER_AGENT.to_string())], - ca_bundle_path: ca_bundle_path.to_string(), - process_workers, - label: LABEL.to_string(), - // Whole files, streamed into the tmp as they arrive: 8 wide like Java's pool, memory - // bounded to the pieces not yet written. - stream: true, - ..FetchOptions::default() - }; - let sink = AmazonSink::new(install_dir, plan.entries.clone(), Arc::clone(&cancel)); - let meter = Mutex::new(SpeedMeter::new()); - let skipped_bytes = plan.skipped_bytes; - let skipped_files = plan.skipped_files; - let total_bytes = plan.total_bytes; - let progress_cb = |credited: u64, items_ok: u64| { - if let Ok(mut meter) = meter.lock() { - meter.observe(credited); - } - progress( - skipped_bytes.saturating_add(credited), - total_bytes, - skipped_files.saturating_add(items_ok), - files_total, - ); - }; - let outcome = run_fetch( - plan.items, - &plan.hosts, - &opts, - &sink, - cancel.as_ref(), - &progress_cb, - log, - ); - let leftovers = sink.cleanup_partials(); - let (elapsed, avg_mbps, peak_mbps) = meter - .lock() - .map(|meter| meter.summary(outcome.bytes_credited)) - .unwrap_or((0.0, 0.0, 0.0)); - let files_done = skipped_files.saturating_add(sink.files_done()); - log(&format!( - "summary bytes={} elapsed={:.3} avg_mbps={:.1} peak_mbps={:.1} files={}/{} items_ok={} tmp_removed={} cancelled={} error={}", - outcome.bytes_credited, - elapsed, - avg_mbps, - peak_mbps, - files_done, - files_total, - outcome.items_ok, - leftovers, - outcome.cancelled, - outcome.error.as_deref().unwrap_or("") - )); - let cancelled = outcome.cancelled || cancel.load(Ordering::Relaxed); - let error = if cancelled { - outcome.error.unwrap_or_else(|| "cancelled".to_string()) - } else { - outcome.error.unwrap_or_default() - }; - RunResult { - success: !cancelled && error.is_empty(), - cancelled, - error, - bytes_written: outcome.bytes_credited, - files_done, - files_total, - } -} - -#[cfg(test)] -mod tests { - use super::*; - use std::sync::atomic::AtomicUsize; - - static COUNTER: AtomicUsize = AtomicUsize::new(0); - - fn scratch_dir() -> String { - let n = COUNTER.fetch_add(1, Ordering::Relaxed); - let dir = std::env::temp_dir().join(format!( - "amazon-test-{}-{}", - std::process::id(), - n - )); - let _ = fs::remove_dir_all(&dir); - fs::create_dir_all(&dir).unwrap(); - dir.to_string_lossy().into_owned() - } - - fn sha_hex(data: &[u8]) -> String { - crate::gog::to_hex(Sha256::digest(data).as_slice()) - } - - fn item_for(entry: &PlanEntry, id: u64) -> FetchItem { - FetchItem { - id, - urls: vec![entry.url.clone()], - reserve: entry.size, - range: None, - } - } - - const PLAN: &str = r#"[ - {"relPath":"Binaries\\Win64\\Game.exe","url":"https://d1.cdn.example/base/files/aa?Sig=1","size":4,"sha256hex":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"}, - {"relPath":"data/level1.pak","url":"https://d1.cdn.example/base/files/bb?Sig=1","size":2,"sha256hex":""}, - {"relPath":"readme.txt","url":"https://d2.cdn.example/base/files/cc?Sig=1","size":0,"sha256hex":""} - ]"#; - - #[test] - fn parses_plan_and_normalises_paths() { - let entries = parse_plan(PLAN).unwrap(); - assert_eq!(entries.len(), 3); - assert_eq!(entries[0].rel_path, "Binaries/Win64/Game.exe"); - assert_eq!(entries[0].size, 4); - assert_eq!(entries[0].sha256.len(), 32); - assert!(entries[1].sha256.is_empty()); - assert_eq!(entries[2].size, 0); - } - - #[test] - fn rejects_bad_plan() { - assert!(parse_plan("{}").is_err()); - assert!(parse_plan(r#"[{"url":"x","size":1}]"#).is_err()); - assert!(parse_plan(r#"[{"relPath":"a","size":1}]"#).is_err()); - assert!(parse_plan(r#"[{"relPath":"a","url":"u","size":1,"sha256hex":"zz"}]"#).is_err()); - } - - #[test] - fn hex_roundtrip() { - assert_eq!(hex_decode("00ff10"), Some(vec![0x00, 0xff, 0x10])); - assert_eq!(hex_decode("00FF"), Some(vec![0x00, 0xff])); - assert_eq!(hex_decode("0"), None); - assert_eq!(hex_decode("0g"), None); - } - - #[test] - fn per_host_cap_gives_single_host_the_whole_ceiling() { - assert_eq!(per_host_cap_for(32, 1), 32); - assert_eq!(per_host_cap_for(32, 3), 11); - assert_eq!(per_host_cap_for(8, 1), 8); - assert_eq!(per_host_cap_for(4, 1), 6); - assert_eq!(per_host_cap_for(0, 0), 6); - } - - #[test] - fn host_key_strips_path_and_query() { - assert_eq!( - host_key("https://d1.cdn.example/base/files/aa?Sig=1"), - "https://d1.cdn.example" - ); - assert_eq!(host_key("http://h:8080/x"), "http://h:8080"); - assert_eq!(host_key("nohost"), "https://nohost"); - } - - #[test] - fn dest_path_never_escapes_install_dir() { - assert_eq!( - dest_path("/inst/", "a/b.txt"), - PathBuf::from("/inst/a/b.txt") - ); - assert_eq!(dest_path("/inst", "/abs.txt"), PathBuf::from("/inst//abs.txt")); - assert_eq!(tmp_path("/inst", "a.bin"), PathBuf::from("/inst/a.bin.tmp")); - } - - #[test] - fn build_plan_skips_only_size_matched_files() { - let dir = scratch_dir(); - let entries = parse_plan(PLAN).unwrap(); - // Entry 1 present with the right size → skipped (no hash check even if wrong bytes). - fs::create_dir_all(format!("{dir}/data")).unwrap(); - fs::write(format!("{dir}/data/level1.pak"), b"zz").unwrap(); - // Entry 0 present with the wrong size → fetched. - fs::create_dir_all(format!("{dir}/Binaries/Win64")).unwrap(); - fs::write(format!("{dir}/Binaries/Win64/Game.exe"), b"tes").unwrap(); - let plan = build_plan(entries, &dir); - assert_eq!(plan.total_bytes, 6); - assert_eq!(plan.skipped_files, 1); - assert_eq!(plan.skipped_bytes, 2); - assert_eq!(plan.items.len(), 2); - assert_eq!(plan.items[0].id, 0); - assert_eq!(plan.items[0].reserve, 4); - assert!(plan.items[0].range.is_none()); - assert_eq!(plan.items[1].id, 2); - assert_eq!( - plan.hosts, - vec!["https://d1.cdn.example".to_string(), "https://d2.cdn.example".to_string()] - ); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn zero_size_missing_file_is_fetched_and_present_zero_is_skipped() { - let dir = scratch_dir(); - let entry = PlanEntry { - rel_path: "empty.txt".into(), - url: "https://h/x".into(), - size: 0, - sha256: Vec::new(), - }; - assert!(!is_present_and_complete(&dir, &entry)); - fs::write(format!("{dir}/empty.txt"), b"").unwrap(); - assert!(is_present_and_complete(&dir, &entry)); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn whole_body_sink_verifies_writes_and_renames() { - let dir = scratch_dir(); - let body = b"test".to_vec(); - let entry = PlanEntry { - rel_path: "sub/Game.exe".into(), - url: "https://h/x".into(), - size: 4, - sha256: hex_decode(&sha_hex(&body)).unwrap(), - }; - let cancel = Arc::new(AtomicBool::new(false)); - let sink = AmazonSink::new(&dir, vec![entry.clone()], Arc::clone(&cancel)); - let item = item_for(&entry, 0); - // Mismatch → Retry, nothing on disk. - match sink.process(&item, b"nope".to_vec()) { - Err(SinkError::Retry(msg)) => assert!(msg.contains("SHA-256 mismatch")), - Err(SinkError::Fatal(msg)) => panic!("expected Retry, got Fatal({msg})"), - Ok(_) => panic!("expected Retry, got Ok"), - } - assert!(!dest_path(&dir, "sub/Game.exe").exists()); - assert!(!tmp_path(&dir, "sub/Game.exe").exists()); - // Match → written, renamed, tmp gone, credited body length. - assert_eq!(sink.process(&item, body.clone()).unwrap(), 4); - assert_eq!(fs::read(dest_path(&dir, "sub/Game.exe")).unwrap(), body); - assert!(!tmp_path(&dir, "sub/Game.exe").exists()); - assert_eq!(sink.files_done(), 1); - // Existing dest is replaced (Java `:280`). - assert_eq!(sink.process(&item, body.clone()).unwrap(), 4); - // Cancel → Fatal, no write. - cancel.store(true, Ordering::Relaxed); - assert!(matches!( - sink.process(&item, body), - Err(SinkError::Fatal(_)) - )); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn stream_sink_appends_verifies_and_renames() { - let dir = scratch_dir(); - let body = b"hello world".to_vec(); - let entry = PlanEntry { - rel_path: "sub/big.bin".into(), - url: "https://h/x".into(), - size: body.len() as u64, - sha256: hex_decode(&sha_hex(&body)).unwrap(), - }; - let sink = AmazonSink::new(&dir, vec![entry.clone()], Arc::new(AtomicBool::new(false))); - let item = item_for(&entry, 0); - sink.on_chunk(&item, 0, b"hello").unwrap(); - assert!(tmp_path(&dir, "sub/big.bin").exists()); - sink.on_chunk(&item, 5, b" wor").unwrap(); - sink.on_chunk(&item, 9, b"ld").unwrap(); - assert_eq!(sink.on_finish(&item, 11).unwrap(), 0); - assert_eq!(fs::read(dest_path(&dir, "sub/big.bin")).unwrap(), body); - assert!(!tmp_path(&dir, "sub/big.bin").exists()); - assert_eq!(sink.files_done(), 1); - assert_eq!(sink.cleanup_partials(), 0); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn stream_sink_restart_truncates_and_mismatch_retries() { - let dir = scratch_dir(); - let body = b"abcdef".to_vec(); - let entry = PlanEntry { - rel_path: "f.bin".into(), - url: "https://h/x".into(), - size: 6, - sha256: hex_decode(&sha_hex(&body)).unwrap(), - }; - let sink = AmazonSink::new(&dir, vec![entry.clone()], Arc::new(AtomicBool::new(false))); - let item = item_for(&entry, 0); - // Attempt 1 delivers garbage, then the core restarts at offset 0. - sink.on_chunk(&item, 0, b"zzzz").unwrap(); - sink.on_chunk(&item, 0, b"abc").unwrap(); - sink.on_chunk(&item, 3, b"xyz").unwrap(); - match sink.on_finish(&item, 6) { - Err(SinkError::Retry(msg)) => assert!(msg.contains("SHA-256 mismatch")), - Err(SinkError::Fatal(msg)) => panic!("expected Retry, got Fatal({msg})"), - Ok(_) => panic!("expected Retry, got Ok"), - } - assert!(!tmp_path(&dir, "f.bin").exists()); - assert!(!dest_path(&dir, "f.bin").exists()); - // Out-of-order piece → Retry. - sink.on_chunk(&item, 0, b"abc").unwrap(); - assert!(matches!( - sink.on_chunk(&item, 5, b"f"), - Err(SinkError::Retry(_)) - )); - // Length mismatch at finish → Retry. - sink.on_chunk(&item, 0, b"abc").unwrap(); - assert!(matches!(sink.on_finish(&item, 6), Err(SinkError::Retry(_)))); - // Piece without a start → Retry. - assert!(matches!( - sink.on_chunk(&item, 3, b"def"), - Err(SinkError::Retry(_)) - )); - // Good attempt. - sink.on_chunk(&item, 0, b"abc").unwrap(); - sink.on_chunk(&item, 3, b"def").unwrap(); - assert_eq!(sink.on_finish(&item, 6).unwrap(), 0); - assert_eq!(fs::read(dest_path(&dir, "f.bin")).unwrap(), body); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn stream_sink_cleanup_removes_unfinished_tmp_and_zero_len_finishes() { - let dir = scratch_dir(); - let big = PlanEntry { - rel_path: "cut.bin".into(), - url: "https://h/x".into(), - size: 10, - sha256: Vec::new(), - }; - let empty = PlanEntry { - rel_path: "empty.bin".into(), - url: "https://h/y".into(), - size: 0, - sha256: Vec::new(), - }; - let cancel = Arc::new(AtomicBool::new(false)); - let sink = AmazonSink::new(&dir, vec![big.clone(), empty.clone()], Arc::clone(&cancel)); - sink.on_chunk(&item_for(&big, 0), 0, b"12345").unwrap(); - assert!(tmp_path(&dir, "cut.bin").exists()); - // Zero-byte body: on_finish with no pieces creates and commits an empty file. - assert_eq!(sink.on_finish(&item_for(&empty, 1), 0).unwrap(), 0); - assert_eq!(fs::read(dest_path(&dir, "empty.bin")).unwrap(), b""); - // Cancel mid-stream → Fatal; cleanup deletes the partial tmp like Java does. - cancel.store(true, Ordering::Relaxed); - assert!(matches!( - sink.on_chunk(&item_for(&big, 0), 5, b"6"), - Err(SinkError::Fatal(_)) - )); - assert_eq!(sink.cleanup_partials(), 1); - assert!(!tmp_path(&dir, "cut.bin").exists()); - assert!(!dest_path(&dir, "cut.bin").exists()); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn stream_sink_skips_hash_when_manifest_has_none() { - let dir = scratch_dir(); - let entry = PlanEntry { - rel_path: "a.bin".into(), - url: "https://h/x".into(), - size: 3, - sha256: Vec::new(), - }; - let sink = AmazonSink::new(&dir, vec![entry.clone()], Arc::new(AtomicBool::new(false))); - let item = item_for(&entry, 0); - sink.on_chunk(&item, 0, b"abc").unwrap(); - assert_eq!(sink.on_finish(&item, 3).unwrap(), 0); - assert_eq!(fs::read(dest_path(&dir, "a.bin")).unwrap(), b"abc"); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn run_download_all_present_short_circuits() { - let dir = scratch_dir(); - fs::write(format!("{dir}/a.bin"), b"abc").unwrap(); - let plan = r#"[{"relPath":"a.bin","url":"https://h/x","size":3,"sha256hex":""}]"#; - let seen = Mutex::new(Vec::new()); - let logs = Mutex::new(Vec::new()); - let result = run_download( - plan, - &dir, - "", - 0, - 1, - Arc::new(AtomicBool::new(false)), - &|done, total, fd, ft| seen.lock().unwrap().push((done, total, fd, ft)), - &|line| logs.lock().unwrap().push(line.to_string()), - ); - assert!(result.success); - assert_eq!(result.files_done, 1); - assert_eq!(result.files_total, 1); - assert_eq!(seen.lock().unwrap().as_slice(), &[(3, 3, 1, 1)]); - assert!(logs.lock().unwrap()[0].starts_with("engine=rust mode=stream")); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn run_download_reports_plan_error() { - let result = run_download( - "not json", - "/nonexistent", - "", - 8, - 2, - Arc::new(AtomicBool::new(false)), - &|_, _, _, _| {}, - &|_| {}, - ); - assert!(!result.success); - assert!(result.error.contains("plan json")); - } -} diff --git a/app/src/main/rust/stores/src/amazon/auth.rs b/app/src/main/rust/stores/src/amazon/auth.rs new file mode 100644 index 0000000000..8f0e87f171 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/auth.rs @@ -0,0 +1,292 @@ +use std::io::Read; + +use serde_json::{json, Value}; +use sha2::{Digest, Sha256}; + +use super::net::{self, Call}; + +pub const DEVICE_TYPE: &str = "A2UMVHOX7UP4V7"; +pub const APP_NAME: &str = "AGSLauncher for Windows"; +pub const APP_VERSION: &str = "1.0.0"; +pub const OS_VERSION: &str = "10.0.19044.0"; +pub const DEVICE_MODEL: &str = "Windows"; +pub const CLIENT_DOMAIN: &str = "DeviceLegacy"; +pub const REGISTRATION_DOMAIN: &str = "Device"; +pub const ASSOCIATION_HANDLE: &str = "amzn_sonic_games_launcher"; +pub const MARKETPLACE_US: &str = "ATVPDKIKX0DER"; + +pub const SIGN_IN_PAGE: &str = "https://www.amazon.com/ap/signin"; +pub const RETURN_TO: &str = "https://www.amazon.com"; +pub const CODE_PARAMETER: &str = "openid.oa2.authorization_code"; +pub const REDIRECT_MARKER: &str = "openid.oa2.authorization_code="; + +const REGISTER_URL: &str = "https://api.amazon.com/auth/register"; +const TOKEN_URL: &str = "https://api.amazon.com/auth/token"; +const DEREGISTER_URL: &str = "https://api.amazon.com/auth/deregister"; +const DEFAULT_EXPIRES_IN: i64 = 3600; + +fn random_bytes(n: usize) -> Result<Vec<u8>, String> { + let mut out = vec![0u8; n]; + std::fs::File::open("/dev/urandom") + .and_then(|mut f| f.read_exact(&mut out)) + .map_err(|e| format!("no randomness: {e}"))?; + Ok(out) +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Attempt { + pub serial: String, + pub client_id: String, + pub verifier: String, +} + +pub fn serial_from(random: &[u8; 16]) -> String { + let mut b = *random; + b[6] = (b[6] & 0x0f) | 0x40; + b[8] = (b[8] & 0x3f) | 0x80; + net::hex_upper(&b) +} + +pub fn client_id_for(serial: &str) -> String { + net::hex_lower(format!("{serial}#{DEVICE_TYPE}").as_bytes()) +} + +pub fn challenge_for(verifier: &str) -> String { + net::base64url(&Sha256::digest(verifier.as_bytes())) +} + +impl Attempt { + pub fn new() -> Result<Attempt, String> { + let random = random_bytes(48)?; + let uuid: [u8; 16] = random[..16].try_into().expect("16 bytes"); + let serial = serial_from(&uuid); + Ok(Attempt { client_id: client_id_for(&serial), serial, verifier: net::base64url(&random[16..48]) }) + } + + pub fn start_url(&self) -> String { + let client = format!("device:{}", self.client_id); + let challenge = challenge_for(&self.verifier); + let params: [(&str, &str); 17] = [ + ("openid.ns", "http://specs.openid.net/auth/2.0"), + ("openid.claimed_id", "http://specs.openid.net/auth/2.0/identifier_select"), + ("openid.identity", "http://specs.openid.net/auth/2.0/identifier_select"), + ("openid.mode", "checkid_setup"), + ("openid.oa2.scope", "device_auth_access"), + ("openid.ns.oa2", "http://www.amazon.com/ap/ext/oauth/2"), + ("openid.oa2.response_type", "code"), + ("openid.oa2.code_challenge_method", "S256"), + ("openid.oa2.client_id", client.as_str()), + ("language", "en_US"), + ("marketPlaceId", MARKETPLACE_US), + ("openid.return_to", RETURN_TO), + ("openid.pape.max_auth_age", "0"), + ("openid.ns.pape", "http://specs.openid.net/extensions/pape/1.0"), + ("openid.assoc_handle", ASSOCIATION_HANDLE), + ("pageId", ASSOCIATION_HANDLE), + ("openid.oa2.code_challenge", challenge.as_str()), + ]; + let query: Vec<String> = params.iter().map(|(k, v)| format!("{k}={}", net::percent_encode(v))).collect(); + format!("{SIGN_IN_PAGE}?{}", query.join("&")) + } +} + +pub fn code_from_url(url: &str) -> Option<String> { + let query = &url[url.find('?')? + 1..]; + let query = query.split('#').next().unwrap_or(""); + query + .split('&') + .filter_map(|pair| pair.split_once('=')) + .find(|(k, _)| *k == CODE_PARAMETER) + .map(|(_, v)| net::percent_decode(v)) + .filter(|v| !v.is_empty()) +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Registered { + pub access_token: String, + pub refresh_token: String, + pub expires_at_ms: i64, + pub device_serial: String, + pub client_id: String, + pub display_name: String, +} + +impl Registered { + pub fn to_json(&self) -> Value { + let mut out = json!({ + "access_token": self.access_token, + "refresh_token": self.refresh_token, + "device_serial": self.device_serial, + "client_id": self.client_id, + "expires_at": self.expires_at_ms, + }); + if !self.display_name.is_empty() { + out["display_name"] = json!(self.display_name); + } + out + } +} + +fn expires_in(v: Option<&Value>) -> i64 { + let secs = v.and_then(|v| v.as_i64().or_else(|| v.as_str().and_then(|s| s.trim().parse().ok()))); + secs.filter(|s| *s > 0).unwrap_or(DEFAULT_EXPIRES_IN) +} + +pub fn registration_body(code: &str, attempt: &Attempt) -> Value { + json!({ + "auth_data": { + "authorization_code": code, + "client_domain": CLIENT_DOMAIN, + "client_id": attempt.client_id, + "code_algorithm": "SHA-256", + "code_verifier": attempt.verifier, + "use_global_authentication": false, + }, + "registration_data": { + "app_name": APP_NAME, + "app_version": APP_VERSION, + "device_model": DEVICE_MODEL, + "device_name": null, + "device_serial": attempt.serial, + "device_type": DEVICE_TYPE, + "domain": REGISTRATION_DOMAIN, + "os_version": OS_VERSION, + }, + "requested_extensions": ["customer_info", "device_info"], + "requested_token_type": ["bearer", "mac_dms"], + "user_context_map": {}, + }) +} + +pub fn read_registration(answer: &Value, attempt: &Attempt, now_ms: i64) -> Option<Registered> { + let success = answer.get("response")?.get("success")?; + let bearer = success.get("tokens")?.get("bearer")?; + let access_token = net::str_of(bearer, "access_token"); + let refresh_token = net::str_of(bearer, "refresh_token"); + if access_token.is_empty() || refresh_token.is_empty() { + return None; + } + let serial = net::str_at(success, &["extensions", "device_info", "device_serial_number"]); + Some(Registered { + access_token: access_token.to_string(), + refresh_token: refresh_token.to_string(), + expires_at_ms: now_ms + expires_in(bearer.get("expires_in")) * 1000, + device_serial: if serial.is_empty() { attempt.serial.clone() } else { serial.to_string() }, + client_id: attempt.client_id.clone(), + display_name: net::str_at(success, &["extensions", "customer_info", "name"]).trim().to_string(), + }) +} + +fn identity_call(url: &str, body: &Value) -> Call { + Call::post_json(url, net::BROWSER_USER_AGENT.to_string(), body) +} + +pub fn register(code: &str, attempt: &Attempt) -> Result<Registered, String> { + let reply = net::send(identity_call(REGISTER_URL, ®istration_body(code, attempt)))?; + if !reply.ok() { + return Err(format!("registration answered HTTP {}", reply.status)); + } + let answer = reply.json().ok_or("registration answer is not JSON")?; + read_registration(&answer, attempt, net::now_ms()).ok_or_else(|| "registration answer has no tokens".into()) +} + +pub fn refresh(refresh_token: &str) -> Result<(String, i64), String> { + let body = json!({ + "source_token": refresh_token, + "source_token_type": "refresh_token", + "requested_token_type": "access_token", + "app_name": APP_NAME, + "app_version": APP_VERSION, + }); + let call = identity_call(TOKEN_URL, &body).header("x-amzn-identity-auth-domain", "api.amazon.com"); + let reply = net::send(call)?; + if !reply.ok() { + return Err(format!("token refresh answered HTTP {}", reply.status)); + } + let answer = reply.json().ok_or("token answer is not JSON")?; + let access = net::str_of(&answer, "access_token"); + if access.is_empty() { + return Err("token answer has no access token".into()); + } + Ok((access.to_string(), net::now_ms() + expires_in(answer.get("expires_in")) * 1000)) +} + +pub fn deregister(access_token: &str) -> Result<(), String> { + let body = json!({ "requested_extensions": ["device_info", "customer_info"] }); + let call = identity_call(DEREGISTER_URL, &body).header("Authorization", &format!("Bearer {access_token}")); + net::send(call).map(|_| ()) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn attempt() -> Attempt { + let serial = serial_from(&[0xab; 16]); + Attempt { client_id: client_id_for(&serial), serial, verifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk".into() } + } + + #[test] + fn device_values() { + let a = attempt(); + assert_eq!(a.serial, "ABABABABABAB4BABABABABABABABABAB"); + assert_eq!(a.serial.len(), 32); + assert_eq!(a.client_id.len(), 94); + assert_eq!(a.client_id, net::hex_lower(format!("{}#A2UMVHOX7UP4V7", a.serial).as_bytes())); + assert!(a.client_id.starts_with("4142")); + assert_eq!(challenge_for("dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"), "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"); + let fresh = Attempt::new().unwrap(); + assert_eq!(fresh.verifier.len(), 43); + assert!(fresh.serial.chars().all(|c| c.is_ascii_hexdigit() && !c.is_ascii_lowercase())); + assert_eq!(&fresh.serial[12..13], "4"); + assert_ne!(fresh, Attempt::new().unwrap()); + } + + #[test] + fn sign_in_url() { + let a = attempt(); + let url = a.start_url(); + assert!(url.starts_with("https://www.amazon.com/ap/signin?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&")); + assert!(url.contains(&format!("&openid.oa2.client_id=device%3A{}&", a.client_id))); + assert!(url.contains("&marketPlaceId=ATVPDKIKX0DER&")); + assert!(url.contains("&openid.assoc_handle=amzn_sonic_games_launcher&pageId=amzn_sonic_games_launcher&")); + assert!(url.ends_with("&openid.oa2.code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM")); + assert_eq!(url.matches('&').count(), 16); + } + + #[test] + fn codes_from_return_urls() { + assert_eq!( + code_from_url("https://www.amazon.com/?openid.assoc_handle=x&openid.oa2.authorization_code=ANabc%2Bd&openid.mode=id_res").as_deref(), + Some("ANabc+d") + ); + assert_eq!(code_from_url("https://www.amazon.com/?openid.oa2.authorization_code=Z#frag").as_deref(), Some("Z")); + assert_eq!(code_from_url("https://www.amazon.com/?openid.oa2.authorization_code=&x=1"), None); + assert_eq!(code_from_url("https://www.amazon.com/?x.openid.oa2.authorization_code=1"), None); + assert_eq!(code_from_url("https://www.amazon.com/"), None); + } + + #[test] + fn registration_round() { + let a = attempt(); + let body = registration_body("CODE", &a); + assert_eq!(body["auth_data"]["client_id"], a.client_id.as_str()); + assert_eq!(body["auth_data"]["use_global_authentication"], false); + assert!(body["registration_data"]["device_name"].is_null()); + assert_eq!(body["registration_data"]["device_serial"], a.serial.as_str()); + let answer = json!({"response":{"success":{ + "tokens":{"bearer":{"access_token":"Atna|x","refresh_token":"Atnr|y","expires_in":"3600"},"mac_dms":{}}, + "extensions":{"customer_info":{"name":"Sam"},"device_info":{"device_serial_number":"SERVER"}}}}}); + let r = read_registration(&answer, &a, 1000).unwrap(); + assert_eq!(r.expires_at_ms, 3_601_000); + assert_eq!(r.device_serial, "SERVER"); + assert_eq!(r.client_id, a.client_id); + assert_eq!(r.to_json()["display_name"], "Sam"); + let bare = json!({"response":{"success":{"tokens":{"bearer":{"access_token":"A","refresh_token":"R"}}}}}); + let r = read_registration(&bare, &a, 0).unwrap(); + assert_eq!(r.device_serial, a.serial); + assert_eq!(r.expires_at_ms, 3_600_000); + assert!(r.to_json().get("display_name").is_none()); + assert!(read_registration(&json!({"response":{"error":{}}}), &a, 0).is_none()); + } +} diff --git a/app/src/main/rust/stores/src/amazon/cdn.rs b/app/src/main/rust/stores/src/amazon/cdn.rs new file mode 100644 index 0000000000..de3b43c242 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/cdn.rs @@ -0,0 +1,58 @@ +use super::net::{self, Call}; + +pub const MANIFEST_SEGMENT: &str = "manifest.proto"; + +pub fn append_path(base: &str, segment: &str) -> String { + match base.find('?') { + Some(q) => format!("{}/{segment}{}", &base[..q], &base[q..]), + None => format!("{base}/{segment}"), + } +} + +pub fn file_url(base: &str, cdn_name: &str) -> String { + append_path(base, &format!("files/{cdn_name}")) +} + +pub fn origin(url: &str) -> String { + let after_scheme = url.find("://").map(|i| i + 3).unwrap_or(0); + let end = url[after_scheme..].find(['/', '?', '#']).map(|i| after_scheme + i).unwrap_or(url.len()); + url[..end].to_string() +} + +pub fn get(url: &str, access_token: Option<&str>) -> Result<Vec<u8>, String> { + let mut call = Call::get(url, net::user_agent()).read_timeout(net::BYTES_READ_TIMEOUT); + if let Some(token) = access_token.filter(|t| !t.is_empty()) { + call = call.header("x-amzn-token", token); + } + let reply = net::send(call)?; + if !reply.ok() { + return Err(format!("the CDN answered HTTP {}", reply.status)); + } + Ok(reply.body) +} + +pub fn fetch_manifest(base: &str, access_token: &str) -> Result<Vec<u8>, String> { + get(&append_path(base, MANIFEST_SEGMENT), Some(access_token)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn segments_go_before_the_query() { + assert_eq!( + append_path("https://cdn.example/v1/abc?Expires=1&Signature=x%2By", "manifest.proto"), + "https://cdn.example/v1/abc/manifest.proto?Expires=1&Signature=x%2By" + ); + assert_eq!(append_path("https://cdn.example/v1/abc", "manifest.proto"), "https://cdn.example/v1/abc/manifest.proto"); + assert_eq!(append_path("https://h/p?a=1?b=2", "s"), "https://h/p/s?a=1?b=2"); + assert_eq!(file_url("https://h/base?q", "00ff"), "https://h/base/files/00ff?q"); + } + + #[test] + fn origins() { + assert_eq!(origin("https://cdn.example:8443/x?y"), "https://cdn.example:8443"); + assert_eq!(origin("https://cdn.example?y"), "https://cdn.example"); + } +} diff --git a/app/src/main/rust/stores/src/amazon/codec.rs b/app/src/main/rust/stores/src/amazon/codec.rs new file mode 100644 index 0000000000..36da49d10b --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/codec.rs @@ -0,0 +1,95 @@ +use std::io::{self, Write}; + +const XZ_MAGIC_PREFIX: [u8; 2] = [0xfd, 0x37]; + +pub const MAX_MESSAGE_BYTES: usize = 256 * 1024 * 1024; + +pub fn body(object: &[u8]) -> Result<&[u8], String> { + if object.len() < 4 { + return Err("the manifest is too short".into()); + } + let header_len = u32::from_be_bytes([object[0], object[1], object[2], object[3]]); + if header_len > i32::MAX as u32 || 4 + header_len as u64 > object.len() as u64 { + return Err(format!("the manifest has an invalid header size ({header_len})")); + } + Ok(&object[4 + header_len as usize..]) +} + +struct Capped(Vec<u8>); + +impl Write for Capped { + fn write(&mut self, buf: &[u8]) -> io::Result<usize> { + if self.0.len() + buf.len() > MAX_MESSAGE_BYTES { + return Err(io::Error::other("the manifest decompresses to more than the allowed size")); + } + self.0.extend_from_slice(buf); + Ok(buf.len()) + } + + fn flush(&mut self) -> io::Result<()> { + Ok(()) + } +} + +pub fn decompress(body: &[u8]) -> Result<Vec<u8>, String> { + if body.len() < 2 { + return Ok(body.to_vec()); + } + let mut input = io::BufReader::new(body); + let mut out = Capped(Vec::new()); + if body[..2] == XZ_MAGIC_PREFIX { + lzma_rs::xz_decompress(&mut input, &mut out).map_err(|e| format!("xz body: {e:?}"))?; + } else { + lzma_rs::lzma_decompress(&mut input, &mut out).map_err(|e| format!("lzma body: {e:?}"))?; + } + Ok(out.0) +} + +pub fn message(object: &[u8]) -> Result<Vec<u8>, String> { + decompress(body(object)?) +} + +#[cfg(test)] +pub mod testing { + pub fn frame(message: &[u8], header: &[u8], xz: bool) -> Vec<u8> { + let mut body = Vec::new(); + let mut input = std::io::BufReader::new(message); + if xz { + lzma_rs::xz_compress(&mut input, &mut body).unwrap(); + } else { + lzma_rs::lzma_compress(&mut input, &mut body).unwrap(); + } + let mut out = (header.len() as u32).to_be_bytes().to_vec(); + out.extend_from_slice(header); + out.extend_from_slice(&body); + out + } +} + +#[cfg(test)] +mod tests { + use super::testing::frame; + use super::*; + + #[test] + fn both_containers_round_trip() { + let message: Vec<u8> = (0..5000u32).flat_map(|i| (i % 251).to_le_bytes()).collect(); + let xz = frame(&message, b"\x08\x01", true); + assert_eq!(&xz[6..8], &XZ_MAGIC_PREFIX); + assert_eq!(super::message(&xz).unwrap(), message); + let alone = frame(&message, b"", false); + assert_eq!(super::message(&alone).unwrap(), message); + } + + #[test] + fn framing_is_validated() { + assert!(body(&[0, 0, 0]).is_err()); + assert!(body(&[0, 0, 0, 5, 1, 2]).is_err()); + assert!(body(&[0x80, 0, 0, 0, 1]).is_err()); + assert_eq!(body(&[0, 0, 0, 1, 9, 7, 8]).unwrap(), &[7, 8]); + assert_eq!(body(&[0, 0, 0, 0]).unwrap(), &[] as &[u8]); + assert_eq!(decompress(&[5]).unwrap(), vec![5]); + assert!(decompress(&[0xfd, 0x37, 1, 2, 3]).is_err()); + assert!(decompress(&[0xff, 0, 0, 0, 1]).is_err(), "invalid LZMA properties byte"); + } +} diff --git a/app/src/main/rust/stores/src/amazon/distribution.rs b/app/src/main/rust/stores/src/amazon/distribution.rs new file mode 100644 index 0000000000..208e94d9a4 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/distribution.rs @@ -0,0 +1,92 @@ +use serde_json::{json, Value}; + +use super::net::{self, Call, Reply}; + +pub const ENTITLEMENTS_URL: &str = "https://gaming.amazon.com/api/distribution/entitlements"; +pub const PUBLIC_URL: &str = "https://gaming.amazon.com/api/distribution/v2/public"; + +pub const ENTITLEMENTS_TARGET: &str = + "com.amazon.animusdistributionservice.entitlement.AnimusEntitlementsService.GetEntitlements"; +pub const GAME_DOWNLOAD_TARGET: &str = + "com.amazon.animusdistributionservice.external.AnimusDistributionService.GetGameDownload"; + +#[derive(Debug, PartialEq, Eq)] +pub enum Failure { + SignIn, + Other(String), +} + +impl Failure { + pub fn message(&self) -> String { + match self { + Failure::SignIn => "Amazon refused the session".into(), + Failure::Other(m) => m.clone(), + } + } +} + +pub fn refused(reply: &Reply) -> bool { + matches!(reply.status, 401 | 403) + || (reply.status == 400 && String::from_utf8_lossy(&reply.body).contains("NotAuthorizedException")) +} + +pub fn call(url: &str, target: &str, access_token: &str, body: &Value) -> Result<Value, Failure> { + let call = Call::post_json(url, net::LAUNCHER_USER_AGENT.to_string(), body) + .header("X-Amz-Target", target) + .header("x-amzn-token", access_token) + .header(net::LAUNCHER_PACKAGE.0, net::LAUNCHER_PACKAGE.1) + .header("Content-Encoding", "amz-1.0"); + let reply = net::send(call).map_err(Failure::Other)?; + if !reply.ok() { + if refused(&reply) { + return Err(Failure::SignIn); + } + return Err(Failure::Other(format!("Amazon answered HTTP {} ({})", reply.status, reply.snippet()))); + } + reply.json().ok_or_else(|| Failure::Other("Amazon's answer could not be read".into())) +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Download { + pub base_url: String, + pub version_id: String, +} + +pub fn read_download(answer: &Value) -> Option<Download> { + let base_url = net::str_of(answer, "downloadUrl"); + if base_url.is_empty() { + return None; + } + Some(Download { base_url: base_url.to_string(), version_id: net::str_of(answer, "versionId").to_string() }) +} + +pub fn game_download(access_token: &str, entitlement_id: &str) -> Result<Download, Failure> { + let body = json!({ "entitlementId": entitlement_id, "Operation": "GetGameDownload" }); + let answer = call(PUBLIC_URL, GAME_DOWNLOAD_TARGET, access_token, &body)?; + read_download(&answer).ok_or_else(|| Failure::Other("the answer has no download URL".into())) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn download_answers() { + let d = read_download(&json!({"downloadUrl":"https://cdn/x?sig=1","versionId":"v7"})).unwrap(); + assert_eq!(d.base_url, "https://cdn/x?sig=1"); + assert_eq!(d.version_id, "v7"); + assert_eq!(read_download(&json!({"downloadUrl":"","versionId":"v"})), None); + assert_eq!(read_download(&json!({})), None); + assert_eq!(read_download(&json!({"downloadUrl":"https://cdn/x"})).unwrap().version_id, ""); + } + + #[test] + fn refusals() { + let r = |status, body: &str| Reply { status, body: body.as_bytes().to_vec() }; + assert!(refused(&r(401, "<NotAuthorizedException/>"))); + assert!(refused(&r(403, ""))); + assert!(refused(&r(400, r#"{"__type":"com.amazon.coral.service#NotAuthorizedException"}"#))); + assert!(!refused(&r(400, r#"{"__type":"com.amazon.coral.validate#ValidationException"}"#))); + assert!(!refused(&r(500, ""))); + } +} diff --git a/app/src/main/rust/stores/src/amazon/ffi.rs b/app/src/main/rust/stores/src/amazon/ffi.rs new file mode 100644 index 0000000000..8c0ca0cd06 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/ffi.rs @@ -0,0 +1,248 @@ +use std::panic::{catch_unwind, AssertUnwindSafe}; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Arc; + +use jni::objects::{GlobalRef, JByteArray, JClass, JObject, JString, JValue}; +use jni::sys::{jlong, jstring, jbyteArray, JNI_FALSE, JNI_TRUE}; +use jni::{JNIEnv, JavaVM}; + +use super::install::{self, Events, Stop}; +use super::{net, service}; + +fn read_string(env: &mut JNIEnv, value: &JString) -> String { + if value.is_null() { + return String::new(); + } + env.get_string(value).map(|s| s.to_string_lossy().into_owned()).unwrap_or_default() +} + +fn new_string(env: &mut JNIEnv, text: &str) -> jstring { + env.new_string(text).map(|s| s.into_raw()).unwrap_or(std::ptr::null_mut()) +} + +fn guarded<T>(fallback: T, f: impl FnOnce() -> T) -> T { + catch_unwind(AssertUnwindSafe(f)).unwrap_or(fallback) +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeConfigure( + mut env: JNIEnv, + _class: JClass, + app_version: JString, +) { + let version = read_string(&mut env, &app_version); + net::set_app_version(&version); +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeCall( + mut env: JNIEnv, + _class: JClass, + op: JString, + request: JString, +) -> jstring { + let op = read_string(&mut env, &op); + let request = read_string(&mut env, &request); + match guarded(None, || Some(service::call(&op, &request))) { + Some(text) => new_string(&mut env, &text), + None => std::ptr::null_mut(), + } +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeFetch( + mut env: JNIEnv, + _class: JClass, + op: JString, + request: JString, +) -> jbyteArray { + let op = read_string(&mut env, &op); + let request = read_string(&mut env, &request); + match guarded(None, || service::fetch(&op, &request)) { + Some(bytes) => env.byte_array_from_slice(&bytes).map(|a| a.into_raw()).unwrap_or(std::ptr::null_mut()), + None => std::ptr::null_mut(), + } +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeInspect( + mut env: JNIEnv, + _class: JClass, + manifest: JByteArray, + request: JString, +) -> jstring { + let request = read_string(&mut env, &request); + let bytes = if manifest.is_null() { Vec::new() } else { env.convert_byte_array(&manifest).unwrap_or_default() }; + match guarded(None, || Some(service::inspect(&bytes, &request))) { + Some(text) => new_string(&mut env, &text), + None => std::ptr::null_mut(), + } +} + +struct Listener { + vm: JavaVM, + target: GlobalRef, +} + +impl Listener { + fn with_env<R>(&self, fallback: R, f: impl FnOnce(&mut JNIEnv) -> R) -> R { + let Ok(mut env) = self.vm.attach_current_thread_as_daemon() else { + return fallback; + }; + let out = f(&mut env); + if env.exception_check().unwrap_or(false) { + let _ = env.exception_clear(); + } + out + } + + fn text(&self, method: &str, text: &str) { + self.with_env((), |env| { + let Ok(s) = env.new_string(text) else { return }; + let s = JObject::from(s); + let _ = env.call_method(self.target.as_obj(), method, "(Ljava/lang/String;)V", &[JValue::Object(&s)]); + let _ = env.delete_local_ref(s); + }); + } + + fn counts(&self, method: &str, a: u64, b: u64, c: u32, d: u32) { + self.with_env((), |env| { + let _ = env.call_method( + self.target.as_obj(), + method, + "(JJII)V", + &[ + JValue::Long(a.min(i64::MAX as u64) as i64), + JValue::Long(b.min(i64::MAX as u64) as i64), + JValue::Int(c.min(i32::MAX as u32) as i32), + JValue::Int(d.min(i32::MAX as u32) as i32), + ], + ); + }); + } + + fn complete(&self, success: bool, cancelled: bool, error: &str, result: &str) { + self.with_env((), |env| { + let (Ok(e), Ok(r)) = (env.new_string(error), env.new_string(result)) else { return }; + let (e, r) = (JObject::from(e), JObject::from(r)); + let _ = env.call_method( + self.target.as_obj(), + "onComplete", + "(ZZLjava/lang/String;Ljava/lang/String;)V", + &[ + JValue::Bool(if success { JNI_TRUE } else { JNI_FALSE }), + JValue::Bool(if cancelled { JNI_TRUE } else { JNI_FALSE }), + JValue::Object(&e), + JValue::Object(&r), + ], + ); + let _ = env.delete_local_ref(e); + let _ = env.delete_local_ref(r); + }); + } +} + +impl Events for Listener { + fn log(&self, line: &str) { + self.text("onLog", &net::scrub_urls(line)); + } + + fn status(&self, text: &str) { + self.text("onStatus", text); + } + + fn checking(&self, done_bytes: u64, total_bytes: u64, files: u32, files_total: u32) { + self.counts("onCheck", done_bytes, total_bytes, files, files_total); + } + + fn sizes(&self, pending_bytes: u64, total_bytes: u64) { + self.with_env((), |env| { + let _ = env.call_method( + self.target.as_obj(), + "onSizes", + "(JJ)V", + &[ + JValue::Long(pending_bytes.min(i64::MAX as u64) as i64), + JValue::Long(total_bytes.min(i64::MAX as u64) as i64), + ], + ); + }); + } + + fn progress(&self, done: u64, total: u64, files: u32, files_total: u32) { + self.counts("onProgress", done, total, files, files_total); + } + + fn before_replace(&self) -> bool { + self.with_env(false, |env| match env.call_method(self.target.as_obj(), "beforeReplace", "()Z", &[]) { + Ok(v) => v.z().unwrap_or(false), + Err(_) => false, + }) + } +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeInstall( + mut env: JNIEnv, + _class: JClass, + request: JString, + listener: JObject, +) -> jlong { + if listener.is_null() { + return 0; + } + let Ok(vm) = env.get_java_vm() else { return 0 }; + let Ok(target) = env.new_global_ref(&listener) else { return 0 }; + let listener = Listener { vm, target }; + let text = read_string(&mut env, &request); + let parsed = serde_json::from_str::<serde_json::Value>(&text) + .map_err(|_| "The install request could not be read".to_string()) + .and_then(|v| install::Request::from_json(&v)); + let request = match parsed { + Ok(r) => r, + Err(e) => { + listener.complete(false, false, &e, ""); + return 0; + } + }; + let cancel = Arc::new(AtomicBool::new(false)); + let worker_cancel = Arc::clone(&cancel); + let spawned = std::thread::Builder::new().name("amazon-install".into()).spawn(move || { + crate::priority::background(); + let result = catch_unwind(AssertUnwindSafe(|| install::run(&request, &worker_cancel, &listener))) + .unwrap_or_else(|_| Err(Stop::Failed("The Amazon install stopped on an internal error".into()))); + match result { + Ok(done) => listener.complete(true, false, "", &done.to_json().to_string()), + Err(Stop::Cancelled) => listener.complete(false, true, "cancelled", ""), + Err(Stop::Failed(e)) => listener.complete(false, false, &e, ""), + } + }); + if spawned.is_err() { + return 0; + } + Box::into_raw(Box::new(cancel)) as jlong +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeCancel( + _env: JNIEnv, + _class: JClass, + handle: jlong, +) { + let ptr = handle as *const Arc<AtomicBool>; + if let Some(cancel) = unsafe { ptr.as_ref() } { + cancel.store(true, Ordering::SeqCst); + } +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeRelease( + _env: JNIEnv, + _class: JClass, + handle: jlong, +) { + let ptr = handle as *mut Arc<AtomicBool>; + if !ptr.is_null() { + drop(unsafe { Box::from_raw(ptr) }); + } +} diff --git a/app/src/main/rust/stores/src/amazon/install/check.rs b/app/src/main/rust/stores/src/amazon/install/check.rs new file mode 100644 index 0000000000..e53a082bf4 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/install/check.rs @@ -0,0 +1,165 @@ +use std::fs; +use std::io::Read; +use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicBool, Ordering}; + +use sha2::{Digest, Sha256}; + +use crate::amazon::manifest::{GameFile, TEMP_SUFFIX}; + +#[derive(Debug, PartialEq, Eq)] +pub enum State { + Complete, + Pending, + Cancelled, +} + +pub fn sha256_of(path: &Path, cancel: &AtomicBool) -> Result<Option<[u8; 32]>, ()> { + let Ok(mut f) = fs::File::open(path) else { return Ok(None) }; + let mut hasher = Sha256::new(); + let mut buf = vec![0u8; 1024 * 1024]; + loop { + if cancel.load(Ordering::Relaxed) { + return Err(()); + } + match f.read(&mut buf) { + Ok(0) => return Ok(Some(hasher.finalize().into())), + Ok(n) => hasher.update(&buf[..n]), + Err(e) if e.kind() == std::io::ErrorKind::Interrupted => {} + Err(_) => return Ok(None), + } + } +} + +pub fn state(dest: &Path, file: &GameFile, cancel: &AtomicBool) -> State { + match fs::symlink_metadata(dest) { + Ok(m) if m.is_file() && m.len() == file.size => {} + _ => return State::Pending, + } + let Some(expected) = file.sha256() else { return State::Complete }; + match sha256_of(dest, cancel) { + Err(()) => State::Cancelled, + Ok(Some(got)) if got == expected => State::Complete, + Ok(_) => State::Pending, + } +} + +pub fn temp_path(dest: &Path) -> PathBuf { + let mut name = dest.as_os_str().to_owned(); + name.push(TEMP_SUFFIX); + PathBuf::from(name) +} + +pub fn remove_stray_temps(game_dir: &Path, files: &[GameFile]) -> usize { + files + .iter() + .map(|f| temp_path(&game_dir.join(&f.path))) + .filter(|t| fs::symlink_metadata(t).map(|m| m.is_file() || m.file_type().is_symlink()).unwrap_or(false)) + .filter(|t| fs::remove_file(t).is_ok()) + .count() +} + +pub fn free_bytes(path: &Path) -> i64 { + let mut probe = Some(path); + while let Some(p) = probe { + if p.exists() { + return available(p); + } + probe = p.parent(); + } + -1 +} + +#[cfg(unix)] +fn available(path: &Path) -> i64 { + use std::os::unix::ffi::OsStrExt; + let Ok(c) = std::ffi::CString::new(path.as_os_str().as_bytes()) else { return -1 }; + let mut st: libc::statvfs = unsafe { std::mem::zeroed() }; + if unsafe { libc::statvfs(c.as_ptr(), &mut st) } != 0 { + return -1; + } + (st.f_bavail as u64).saturating_mul(st.f_frsize as u64).min(i64::MAX as u64) as i64 +} + +#[cfg(not(unix))] +fn available(_path: &Path) -> i64 { + -1 +} + +pub fn human(bytes: u64) -> String { + const KIB: f64 = 1024.0; + let b = bytes as f64; + if b >= KIB * KIB * KIB { + format!("{:.1} GB", b / (KIB * KIB * KIB)) + } else if b >= KIB * KIB { + format!("{:.1} MB", b / (KIB * KIB)) + } else { + format!("{:.1} KB", b / KIB) + } +} + +pub fn space_problem(needed: u64, free: i64) -> Option<String> { + if needed > 0 && free >= 0 && (free as u64) < needed { + Some(format!("Not enough free space: need {}, only {} free", human(needed), human(free as u64))) + } else { + None + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn file(path: &str, size: u64, digest: Vec<u8>) -> GameFile { + GameFile { path: path.into(), size, algorithm: 0, digest } + } + + #[test] + fn complete_needs_size_and_hash() { + let dir = std::env::temp_dir().join(format!("dd-amazon-check-{}", std::process::id())); + let _ = fs::remove_dir_all(&dir); + fs::create_dir_all(&dir).unwrap(); + let p = dir.join("a.bin"); + fs::write(&p, b"hello").unwrap(); + let good = Sha256::digest(b"hello").to_vec(); + let cancel = AtomicBool::new(false); + assert_eq!(state(&p, &file("a.bin", 5, good.clone()), &cancel), State::Complete); + assert_eq!(state(&p, &file("a.bin", 5, Sha256::digest(b"HELLO").to_vec()), &cancel), State::Pending); + assert_eq!(state(&p, &file("a.bin", 6, good.clone()), &cancel), State::Pending); + let other = GameFile { path: "a.bin".into(), size: 5, algorithm: 3, digest: vec![1, 2] }; + assert_eq!(state(&p, &other, &cancel), State::Complete, "no SHA-256: size decides"); + assert_eq!(state(&dir, &file("x", 0, vec![]), &cancel), State::Pending, "a directory is not a file"); + assert_eq!(state(&dir.join("missing"), &file("m", 0, vec![]), &cancel), State::Pending); + cancel.store(true, Ordering::Relaxed); + assert_eq!(state(&p, &file("a.bin", 5, good), &cancel), State::Cancelled); + let _ = fs::remove_dir_all(&dir); + } + + #[test] + fn stray_temps_are_removed_only_for_manifest_files() { + let dir = std::env::temp_dir().join(format!("dd-amazon-temps-{}", std::process::id())); + let _ = fs::remove_dir_all(&dir); + fs::create_dir_all(dir.join("sub")).unwrap(); + fs::write(dir.join("sub/a.bin.tmp"), b"x").unwrap(); + fs::write(dir.join("save.tmp"), b"keep").unwrap(); + let files = vec![file("sub/a.bin", 1, vec![0; 32]), file("b.bin", 1, vec![0; 32])]; + assert_eq!(temp_path(&dir.join("sub/a.bin")), dir.join("sub/a.bin.tmp")); + assert_eq!(remove_stray_temps(&dir, &files), 1); + assert!(!dir.join("sub/a.bin.tmp").exists()); + assert!(dir.join("save.tmp").exists()); + let _ = fs::remove_dir_all(&dir); + } + + #[test] + fn space_messages() { + assert_eq!(space_problem(0, 0), None); + assert_eq!(space_problem(10, -1), None); + assert_eq!(space_problem(10, 10), None); + assert_eq!( + space_problem(3 * 1024 * 1024 * 1024, 512 * 1024 * 1024).unwrap(), + "Not enough free space: need 3.0 GB, only 512.0 MB free" + ); + assert_eq!(space_problem(2048, 0).unwrap(), "Not enough free space: need 2.0 KB, only 0.0 KB free"); + assert!(free_bytes(&std::env::temp_dir()) != 0); + } +} diff --git a/app/src/main/rust/stores/src/amazon/install/mod.rs b/app/src/main/rust/stores/src/amazon/install/mod.rs new file mode 100644 index 0000000000..f9e85122cf --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/install/mod.rs @@ -0,0 +1,293 @@ +pub mod check; +pub mod writer; + +use std::fs; +use std::path::PathBuf; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Mutex; +use std::time::{Duration, Instant}; + +use serde_json::{json, Value}; +use sha2::{Digest, Sha256}; + +use super::distribution::{self, Download}; +use super::manifest::{self, GameFile}; +use super::{cdn, net}; + +pub const IN_PROGRESS_MARKER: &str = ".amazon_download_in_progress"; +pub const COMPLETE_MARKER: &str = ".amazon_download_complete"; + +pub const NOT_SIGNED_IN: &str = "Not signed in to Amazon Games"; +pub const NO_DOWNLOAD: &str = "Amazon gave no download for this game"; +pub const NO_MANIFEST: &str = "The manifest could not be downloaded"; +pub const FILE_FAILED: &str = "A file failed to download"; +pub const REPLACE_REFUSED: &str = "The install record could not be switched to updating; nothing was replaced"; + +const CHECK_REPORT_EVERY: Duration = Duration::from_millis(200); + +pub trait Events: Sync { + fn log(&self, line: &str); + fn status(&self, text: &str); + fn checking(&self, done_bytes: u64, total_bytes: u64, files: u32, files_total: u32); + fn sizes(&self, pending_bytes: u64, total_bytes: u64); + fn progress(&self, done: u64, total: u64, files: u32, files_total: u32); + fn before_replace(&self) -> bool; +} + +#[derive(Debug, PartialEq, Eq)] +pub enum Stop { + Cancelled, + Failed(String), +} + +pub struct ReplaceGate(Mutex<Option<bool>>); + +impl ReplaceGate { + pub fn new() -> Self { + ReplaceGate(Mutex::new(None)) + } + + pub fn allow(&self, events: &dyn Events) -> bool { + let mut answer = self.0.lock().expect("gate lock"); + if answer.is_none() { + *answer = Some(events.before_replace()); + } + *answer == Some(true) + } +} + +impl Default for ReplaceGate { + fn default() -> Self { + Self::new() + } +} + +pub struct Request { + pub access_token: String, + pub entitlement_id: String, + pub game_dir: PathBuf, + pub max_workers: usize, + pub process_workers: usize, + pub ca_bundle: String, +} + +impl Request { + pub fn from_json(v: &Value) -> Result<Request, String> { + let game_dir = net::str_of(v, "gameDir"); + if game_dir.is_empty() || !game_dir.starts_with('/') { + return Err("No install folder was given".into()); + } + let access_token = net::str_of(v, "accessToken"); + if access_token.is_empty() { + return Err(NOT_SIGNED_IN.into()); + } + let entitlement_id = net::str_of(v, "entitlementId"); + if entitlement_id.is_empty() { + return Err(NO_DOWNLOAD.into()); + } + Ok(Request { + access_token: access_token.to_string(), + entitlement_id: entitlement_id.to_string(), + game_dir: PathBuf::from(game_dir), + max_workers: v.get("maxWorkers").and_then(|n| n.as_u64()).unwrap_or(8) as usize, + process_workers: v.get("processWorkers").and_then(|n| n.as_u64()).unwrap_or(2) as usize, + ca_bundle: net::str_of(v, "caBundle").to_string(), + }) + } +} + +#[derive(Debug, Default)] +pub struct Finished { + pub version_id: String, + pub total_bytes: u64, + pub file_count: usize, + pub files_written: usize, + pub bytes_written: u64, +} + +impl Finished { + pub fn to_json(&self) -> Value { + json!({ + "versionId": self.version_id, + "totalBytes": self.total_bytes, + "fileCount": self.file_count, + "filesWritten": self.files_written, + "bytesWritten": self.bytes_written, + }) + } +} + +fn cancelled(cancel: &AtomicBool) -> Result<(), Stop> { + if cancel.load(Ordering::SeqCst) { + Err(Stop::Cancelled) + } else { + Ok(()) + } +} + +pub fn load_manifest(download: &Download, access_token: &str, log: &dyn Fn(&str)) -> Result<manifest::Manifest, String> { + let bytes = cdn::fetch_manifest(&download.base_url, access_token).map_err(|e| { + log(&format!("manifest download: {e}")); + NO_MANIFEST.to_string() + })?; + manifest::parse(&bytes).map_err(|e| { + log(&format!("manifest parse: {e}")); + if e.starts_with("The manifest") { + e + } else { + format!("The manifest could not be read: {e}") + } + }) +} + +pub fn run(req: &Request, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finished, Stop> { + ev.status("Asking Amazon for the download…"); + fs::create_dir_all(&req.game_dir).map_err(|e| Stop::Failed(format!("Could not create the install folder: {e}")))?; + let _ = fs::File::create(req.game_dir.join(IN_PROGRESS_MARKER)); + let download = distribution::game_download(&req.access_token, &req.entitlement_id).map_err(|f| { + ev.log(&format!("download lookup: {}", f.message())); + Stop::Failed(NO_DOWNLOAD.into()) + })?; + cancelled(cancel)?; + run_download(req, &download, cancel, ev) +} + +fn empty_sha256() -> [u8; 32] { + Sha256::digest(b"").into() +} + +pub fn run_download(req: &Request, download: &Download, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finished, Stop> { + let failed = Stop::Failed; + let started = Instant::now(); + fs::create_dir_all(&req.game_dir).map_err(|e| failed(format!("Could not create the install folder: {e}")))?; + let _ = fs::File::create(req.game_dir.join(IN_PROGRESS_MARKER)); + + ev.status("Downloading manifest…"); + let log = |line: &str| ev.log(line); + let manifest = load_manifest(download, &req.access_token, &log).map_err(failed)?; + cancelled(cancel)?; + for w in &manifest.warnings { + ev.log(w); + } + let total = manifest.total_size(); + let files_total = manifest.files.len() as u32; + ev.log(&format!( + "manifest version={} files={} entries={} total_bytes={total}", + if download.version_id.is_empty() { "?" } else { download.version_id.as_str() }, + manifest.files.len(), + manifest.entries, + )); + + let strays = check::remove_stray_temps(&req.game_dir, &manifest.files); + if strays > 0 { + ev.log(&format!("removed {strays} leftover temporary files")); + } + + ev.status("Checking files…"); + let mut pending: Vec<&GameFile> = Vec::new(); + let mut checked = 0u64; + let mut last_report = Instant::now(); + for (n, f) in manifest.files.iter().enumerate() { + match check::state(&req.game_dir.join(&f.path), f, cancel) { + check::State::Cancelled => return Err(Stop::Cancelled), + check::State::Complete => {} + check::State::Pending => pending.push(f), + } + checked += f.size; + if last_report.elapsed() >= CHECK_REPORT_EVERY || n + 1 == manifest.files.len() { + ev.checking(checked, total, (n + 1) as u32, files_total); + last_report = Instant::now(); + } + cancelled(cancel)?; + } + let pending_bytes: u64 = pending.iter().map(|f| f.size).sum(); + let skipped_files = manifest.files.len() - pending.len(); + ev.log(&format!("resume skipped_files={skipped_files} skipped_bytes={} pending_files={} pending_bytes={pending_bytes}", total - pending_bytes, pending.len())); + ev.sizes(pending_bytes, total); + + let free = check::free_bytes(&req.game_dir); + if let Some(message) = check::space_problem(pending_bytes, free) { + ev.log(&format!("space pending={pending_bytes} free={free}")); + return Err(failed(message)); + } + + let gate = ReplaceGate::new(); + let empty = empty_sha256(); + let (local, remote): (Vec<&GameFile>, Vec<&GameFile>) = pending + .into_iter() + .partition(|f| f.size == 0 && (f.digest.is_empty() || f.sha256() == Some(empty))); + for f in &local { + let dest = req.game_dir.join(&f.path); + if let Some(parent) = dest.parent() { + fs::create_dir_all(parent).map_err(|e| failed(format!("Could not create the folder for {}: {e}", f.path)))?; + } + let tmp = check::temp_path(&dest); + fs::File::create(&tmp).map_err(|e| failed(format!("Could not write {}: {e}", f.path)))?; + if !gate.allow(ev) { + let _ = fs::remove_file(&tmp); + return Err(failed(REPLACE_REFUSED.into())); + } + if let Err(e) = fs::rename(&tmp, &dest) { + let _ = fs::remove_file(&tmp); + return Err(failed(format!("Could not put {} in place: {e}", f.path))); + } + } + cancelled(cancel)?; + + let jobs: Vec<writer::Job> = remote + .iter() + .map(|f| writer::Job { + path: f.path.clone(), + dest: req.game_dir.join(&f.path), + size: f.size, + sha256: f.sha256(), + url: cdn::file_url(&download.base_url, &f.cdn_name()), + }) + .collect(); + let settings = writer::Settings { + max_workers: req.max_workers, + process_workers: req.process_workers, + ca_bundle: req.ca_bundle.clone(), + user_agent: net::user_agent(), + hosts: vec![cdn::origin(&download.base_url)], + }; + let base = writer::Baseline { + done_bytes: total - pending_bytes, + done_files: (skipped_files + local.len()) as u32, + total_bytes: total, + total_files: files_total, + }; + let result = writer::run(&jobs, &settings, base, &gate, cancel, ev); + let elapsed = started.elapsed().as_secs_f64().max(0.001); + let bytes_written = result.as_ref().map(|s| s.bytes_written).unwrap_or(0); + ev.log(&format!( + "summary files={}/{} bytes_written={bytes_written} elapsed_s={elapsed:.1} avg_mbps={:.1} cancelled={} error={}", + if result.is_ok() { manifest.files.len() } else { skipped_files + local.len() }, + manifest.files.len(), + bytes_written as f64 / 1_048_576.0 / elapsed, + matches!(result, Err(Stop::Cancelled)), + match &result { + Err(Stop::Failed(m)) => m.as_str(), + _ => "none", + }, + )); + let stats = result?; + + let _ = fs::remove_file(req.game_dir.join(IN_PROGRESS_MARKER)); + let _ = fs::File::create(req.game_dir.join(COMPLETE_MARKER)); + Ok(Finished { + version_id: download.version_id.clone(), + total_bytes: total, + file_count: manifest.files.len(), + files_written: stats.files_written + local.len(), + bytes_written, + }) +} + +pub fn size_of(access_token: &str, entitlement_id: &str) -> u64 { + let Ok(download) = distribution::game_download(access_token, entitlement_id) else { return 0 }; + load_manifest(&download, access_token, &|_: &str| {}).map(|m| m.total_size()).unwrap_or(0) +} + +#[cfg(test)] +mod tests; diff --git a/app/src/main/rust/stores/src/amazon/install/tests.rs b/app/src/main/rust/stores/src/amazon/install/tests.rs new file mode 100644 index 0000000000..0667186444 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/install/tests.rs @@ -0,0 +1,313 @@ +use std::collections::HashMap; +use std::io::{BufRead, BufReader, Write}; +use std::net::{TcpListener, TcpStream}; +use std::path::Path; +use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; +use std::sync::{Arc, Mutex}; + +use sha2::{Digest, Sha256}; + +use super::*; +use crate::amazon::codec::testing::frame; +use crate::amazon::manifest::testing::{message, Entry}; + +#[derive(Default)] +struct Seen { + paths: Vec<String>, + queries_ok: bool, + manifest_token: Option<String>, + file_tokens: usize, + agents: Vec<String>, +} + +struct Server { + base: String, + seen: Arc<Mutex<Seen>>, + files: Arc<Mutex<HashMap<String, Vec<u8>>>>, +} + +fn serve(files: HashMap<String, Vec<u8>>) -> Server { + let listener = TcpListener::bind("127.0.0.1:0").unwrap(); + let addr = listener.local_addr().unwrap(); + let files = Arc::new(Mutex::new(files)); + let seen = Arc::new(Mutex::new(Seen { queries_ok: true, ..Default::default() })); + let (f2, s2) = (Arc::clone(&files), Arc::clone(&seen)); + std::thread::spawn(move || { + for stream in listener.incoming() { + let Ok(stream) = stream else { continue }; + let (files, seen) = (Arc::clone(&f2), Arc::clone(&s2)); + std::thread::spawn(move || answer(stream, &files, &seen)); + } + }); + Server { base: format!("http://{addr}/v/abc?sig=s%2Bt&e=1"), seen, files } +} + +fn answer(mut stream: TcpStream, files: &Mutex<HashMap<String, Vec<u8>>>, seen: &Mutex<Seen>) { + let mut reader = BufReader::new(stream.try_clone().unwrap()); + let mut first = String::new(); + if reader.read_line(&mut first).is_err() { + return; + } + let mut token = None; + let mut agent = String::new(); + loop { + let mut line = String::new(); + match reader.read_line(&mut line) { + Ok(0) | Err(_) => break, + Ok(_) if line == "\r\n" => break, + Ok(_) => { + let lower = line.to_ascii_lowercase(); + if let Some(v) = lower.strip_prefix("x-amzn-token:") { + token = Some(v.trim().to_string()); + } + if lower.starts_with("user-agent:") { + agent = line["user-agent:".len()..].trim().to_string(); + } + } + } + } + let target = first.split_whitespace().nth(1).unwrap_or("/").to_string(); + let (path, query) = target.split_once('?').unwrap_or((target.as_str(), "")); + { + let mut s = seen.lock().unwrap(); + s.paths.push(path.to_string()); + s.queries_ok &= query == "sig=s%2Bt&e=1"; + s.agents.push(agent); + if path.ends_with("/manifest.proto") { + s.manifest_token = token; + } else if token.is_some() { + s.file_tokens += 1; + } + } + let body = files.lock().unwrap().get(path).cloned(); + let (status, body) = match body { + Some(b) => ("200 OK", b), + None => ("404 Not Found", Vec::new()), + }; + let head = format!("HTTP/1.1 {status}\r\nContent-Length: {}\r\nConnection: close\r\n\r\n", body.len()); + let _ = stream.write_all(head.as_bytes()); + let _ = stream.write_all(&body); + let _ = stream.flush(); +} + +#[derive(Default)] +struct Recorder { + logs: Mutex<Vec<String>>, + gate_calls: AtomicUsize, + refuse: bool, + last: Mutex<(u64, u64, u32, u32)>, + backwards: AtomicBool, + sizes: Mutex<(u64, u64)>, +} + +impl Events for Recorder { + fn log(&self, line: &str) { + self.logs.lock().unwrap().push(line.to_string()); + } + fn status(&self, _text: &str) {} + fn checking(&self, _d: u64, _t: u64, _f: u32, _ft: u32) {} + fn sizes(&self, pending: u64, total: u64) { + *self.sizes.lock().unwrap() = (pending, total); + } + fn progress(&self, done: u64, total: u64, files: u32, files_total: u32) { + let mut last = self.last.lock().unwrap(); + if done < last.0 { + self.backwards.store(true, Ordering::SeqCst); + } + *last = (done, total, files, files_total); + } + fn before_replace(&self) -> bool { + self.gate_calls.fetch_add(1, Ordering::SeqCst); + !self.refuse + } +} + +fn pattern(seed: u8, len: usize) -> Vec<u8> { + (0..len).map(|i| seed.wrapping_mul(29).wrapping_add((i * 13 % 251) as u8)).collect() +} + +struct Fixture { + server: Server, + expected: Vec<(&'static str, Vec<u8>)>, +} + +fn fixture_with(paths: &[(&'static str, Vec<u8>)]) -> Fixture { + let digests: Vec<Vec<u8>> = paths.iter().map(|(_, b)| Sha256::digest(b).to_vec()).collect(); + let mut packages = vec![Vec::new(), Vec::new()]; + for (i, (path, bytes)) in paths.iter().enumerate() { + let digest: &[u8] = if bytes.is_empty() { &[] } else { &digests[i] }; + packages[i % 2].push(Entry { path, size: bytes.len() as u64, algorithm: Some(0), digest }); + } + let manifest = frame(&message(&packages), b"\x08\x01\x12\x00", true); + let mut files = HashMap::new(); + files.insert("/v/abc/manifest.proto".to_string(), manifest); + for (i, (_, bytes)) in paths.iter().enumerate() { + files.insert(format!("/v/abc/files/{}", net::hex_lower(&digests[i])), bytes.clone()); + } + Fixture { server: serve(files), expected: paths.iter().map(|(p, b)| (*p, b.clone())).collect() } +} + +fn fixture() -> Fixture { + fixture_with(&[ + ("Game.exe", pattern(1, 300_000)), + ("Data\\pak0.pak", pattern(2, 70_000)), + ("Data\\Sub\\readme.txt", b"hello".to_vec()), + ("Data\\empty.cfg", Vec::new()), + ("fuel.json", br#"{"Main":{"Command":"Game.exe","Args":["-w"]}}"#.to_vec()), + ]) +} + +fn request(game: &Path) -> Request { + Request { + access_token: "token-1".into(), + entitlement_id: "ent".into(), + game_dir: game.to_path_buf(), + max_workers: 4, + process_workers: 2, + ca_bundle: String::new(), + } +} + +fn download(fx: &Fixture) -> Download { + Download { base_url: fx.server.base.clone(), version_id: "ver-9".into() } +} + +fn temp_game(name: &str) -> PathBuf { + let dir = std::env::temp_dir().join(format!("dd-amazon-install-{name}-{}", std::process::id())); + let _ = fs::remove_dir_all(&dir); + dir +} + +fn requests(fx: &Fixture) -> usize { + fx.server.seen.lock().unwrap().paths.len() +} + +fn no_temps(dir: &Path) -> bool { + fn walk(dir: &Path) -> bool { + fs::read_dir(dir).unwrap().flatten().all(|e| { + let p = e.path(); + if p.is_dir() { + walk(&p) + } else { + !e.file_name().to_string_lossy().ends_with(".tmp") + } + }) + } + walk(dir) +} + +#[test] +fn fresh_install_then_rerun_then_repair() { + let fx = fixture(); + let game = temp_game("e2e"); + let cancel = AtomicBool::new(false); + + let ev = Recorder::default(); + let done = run_download(&request(&game), &download(&fx), &cancel, &ev).unwrap(); + for (path, bytes) in &fx.expected { + assert_eq!(&fs::read(game.join(path.replace('\\', "/"))).unwrap(), bytes, "{path}"); + } + let total: u64 = fx.expected.iter().map(|(_, b)| b.len() as u64).sum(); + assert_eq!(done.version_id, "ver-9"); + assert_eq!(done.total_bytes, total); + assert_eq!(done.file_count, 5); + assert_eq!(done.files_written, 5); + assert_eq!(ev.gate_calls.load(Ordering::SeqCst), 1); + assert_eq!(*ev.last.lock().unwrap(), (total, total, 5, 5)); + assert!(!ev.backwards.load(Ordering::SeqCst)); + assert!(game.join(COMPLETE_MARKER).exists()); + assert!(!game.join(IN_PROGRESS_MARKER).exists()); + assert!(no_temps(&game)); + { + let seen = fx.server.seen.lock().unwrap(); + assert_eq!(seen.paths.len(), 5, "{:?}", seen.paths); + assert!(seen.queries_ok, "the signed query is kept on every URL"); + assert_eq!(seen.manifest_token.as_deref(), Some("token-1")); + assert_eq!(seen.file_tokens, 0, "file requests carry no token"); + assert!(seen.agents.iter().all(|a| a.starts_with("droiddeck/") || a.starts_with("DroidDeck/")), "{:?}", seen.agents); + } + + let before = requests(&fx); + let again = Recorder::default(); + run_download(&request(&game), &download(&fx), &cancel, &again).unwrap(); + assert_eq!(requests(&fx) - before, 1); + assert_eq!(again.sizes.lock().unwrap().0, 0); + assert_eq!(again.gate_calls.load(Ordering::SeqCst), 0); + + fs::write(game.join("Data/pak0.pak"), vec![0u8; 70_000]).unwrap(); + fs::write(game.join("Game.exe.tmp"), b"junk").unwrap(); + fs::write(game.join("notes.txt"), b"not in the manifest").unwrap(); + let before = requests(&fx); + let repair = Recorder::default(); + run_download(&request(&game), &download(&fx), &cancel, &repair).unwrap(); + assert_eq!(requests(&fx) - before, 2, "manifest + the damaged file"); + assert_eq!(fs::read(game.join("Data/pak0.pak")).unwrap(), fx.expected[1].1); + assert_eq!(*repair.sizes.lock().unwrap(), (70_000, total)); + assert_eq!(repair.gate_calls.load(Ordering::SeqCst), 1); + assert!(!game.join("Game.exe.tmp").exists()); + assert!(game.join("notes.txt").exists(), "files outside the manifest are left alone"); + let _ = fs::remove_dir_all(&game); +} + +#[test] +fn a_corrupt_file_fails_the_run_and_leaves_no_temporary_files() { + let fx = fixture(); + let digest = net::hex_lower(&Sha256::digest(&fx.expected[1].1)); + fx.server.files.lock().unwrap().insert(format!("/v/abc/files/{digest}"), vec![7u8; 70_000]); + let game = temp_game("corrupt"); + let cancel = AtomicBool::new(false); + let ev = Recorder::default(); + let err = run_download(&request(&game), &download(&fx), &cancel, &ev).unwrap_err(); + assert_eq!(err, Stop::Failed(FILE_FAILED.into())); + assert!(!game.join("Data/pak0.pak").exists()); + assert!(no_temps(&game)); + assert!(game.join(IN_PROGRESS_MARKER).exists()); + assert!(ev.logs.lock().unwrap().iter().any(|l| l.contains("SHA-256 mismatch"))); + let _ = fs::remove_dir_all(&game); +} + +#[test] +fn a_refused_switch_to_updating_replaces_nothing() { + let fx = fixture(); + let game = temp_game("refuse"); + fs::create_dir_all(&game).unwrap(); + fs::write(game.join("Game.exe"), b"old").unwrap(); + let cancel = AtomicBool::new(false); + let ev = Recorder { refuse: true, ..Default::default() }; + let err = run_download(&request(&game), &download(&fx), &cancel, &ev).unwrap_err(); + assert_eq!(err, Stop::Failed(REPLACE_REFUSED.into())); + assert_eq!(fs::read(game.join("Game.exe")).unwrap(), b"old"); + assert!(no_temps(&game)); + let _ = fs::remove_dir_all(&game); +} + +#[test] +fn cancel_and_bad_manifests() { + let fx = fixture(); + let game = temp_game("cancel"); + let cancel = AtomicBool::new(true); + assert_eq!(run_download(&request(&game), &download(&fx), &cancel, &Recorder::default()).unwrap_err(), Stop::Cancelled); + + let bad = fixture_with(&[("..\\escape.dll", b"x".to_vec())]); + let cancel = AtomicBool::new(false); + let err = run_download(&request(&game), &download(&bad), &cancel, &Recorder::default()).unwrap_err(); + match err { + Stop::Failed(m) => assert!(m.contains("..\\escape.dll"), "{m}"), + other => panic!("{other:?}"), + } + assert!(!game.parent().unwrap().join("escape.dll").exists()); + + let missing = Download { base_url: format!("{}x", fx.server.base.split('?').next().unwrap()), version_id: String::new() }; + let err = run_download(&request(&game), &missing, &cancel, &Recorder::default()).unwrap_err(); + assert_eq!(err, Stop::Failed(NO_MANIFEST.into())); + let _ = fs::remove_dir_all(&game); +} + +#[test] +fn requests_from_json() { + let ok = Request::from_json(&json!({"accessToken":"t","entitlementId":"e","gameDir":"/g","maxWorkers":16})).unwrap(); + assert_eq!((ok.max_workers, ok.process_workers), (16, 2)); + assert!(Request::from_json(&json!({"accessToken":"t","entitlementId":"e","gameDir":"rel"})).is_err()); + assert_eq!(Request::from_json(&json!({"entitlementId":"e","gameDir":"/g"})).err().unwrap(), NOT_SIGNED_IN); + assert!(Request::from_json(&json!({"accessToken":"t","gameDir":"/g"})).is_err()); +} diff --git a/app/src/main/rust/stores/src/amazon/install/writer.rs b/app/src/main/rust/stores/src/amazon/install/writer.rs new file mode 100644 index 0000000000..09aa5e0a6f --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/install/writer.rs @@ -0,0 +1,303 @@ +use std::fs::{self, File}; +use std::io::Write; +use std::path::PathBuf; +use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering}; +use std::sync::Mutex; +use std::time::{Duration, Instant}; + +use sha2::{Digest, Sha256}; + +use super::check::temp_path; +use super::{Events, ReplaceGate, Stop}; +use crate::fetch_core::{distinct_host_count, run_fetch, FetchItem, FetchOptions, FetchSink, SinkError}; + +const PROGRESS_EVERY_MS: u64 = 50; +const REQUEST_TIMEOUT: Duration = Duration::from_secs(120); + +pub struct Job { + pub path: String, + pub dest: PathBuf, + pub size: u64, + pub sha256: Option<[u8; 32]>, + pub url: String, +} + +pub struct Settings { + pub max_workers: usize, + pub process_workers: usize, + pub ca_bundle: String, + pub user_agent: String, + pub hosts: Vec<String>, +} + +#[derive(Clone, Copy, Debug, Default)] +pub struct Baseline { + pub done_bytes: u64, + pub done_files: u32, + pub total_bytes: u64, + pub total_files: u32, +} + +#[derive(Debug, Default)] +pub struct Stats { + pub bytes_written: u64, + pub files_written: usize, +} + +struct Active { + file: File, + tmp: PathBuf, + hasher: Sha256, + written: u64, +} + +struct Placer<'a> { + jobs: &'a [Job], + slots: Vec<Mutex<Option<Active>>>, + placed: Vec<AtomicBool>, + events: &'a dyn Events, + gate: &'a ReplaceGate, + stop: &'a AtomicBool, + failure: Mutex<Option<String>>, + base: Baseline, + placed_bytes: AtomicU64, + in_flight: AtomicU64, + shown: AtomicU64, + bytes_written: AtomicU64, + files_placed: AtomicUsize, + last_emit: AtomicU64, + started: Instant, +} + +fn discard(active: Active) { + drop(active.file); + let _ = fs::remove_file(&active.tmp); +} + +impl Placer<'_> { + fn fail(&self, message: String) -> String { + let mut slot = self.failure.lock().expect("failure lock"); + if slot.is_none() { + *slot = Some(message.clone()); + } + drop(slot); + self.stop.store(true, Ordering::SeqCst); + message + } + + fn emit(&self, force: bool) { + let now = self.started.elapsed().as_millis() as u64; + let last = self.last_emit.load(Ordering::Relaxed); + if !force && now < last + PROGRESS_EVERY_MS { + return; + } + if !force && self.last_emit.compare_exchange(last, now, Ordering::Relaxed, Ordering::Relaxed).is_err() { + return; + } + self.last_emit.store(now, Ordering::Relaxed); + let value = self.base.done_bytes + + self.placed_bytes.load(Ordering::Relaxed) + + self.in_flight.load(Ordering::Relaxed); + let shown = self.shown.fetch_max(value, Ordering::Relaxed).max(value); + self.events.progress( + shown.min(self.base.total_bytes), + self.base.total_bytes, + self.base.done_files + self.files_placed.load(Ordering::Relaxed) as u32, + self.base.total_files, + ); + } + + fn start(&self, job: &Job) -> Result<Active, String> { + if let Some(parent) = job.dest.parent() { + fs::create_dir_all(parent).map_err(|e| format!("Could not create the folder for {}: {e}", job.path))?; + } + let tmp = temp_path(&job.dest); + let file = File::create(&tmp).map_err(|e| format!("Could not write {}: {e}", job.path))?; + Ok(Active { file, tmp, hasher: Sha256::new(), written: 0 }) + } + + fn piece(&self, i: usize, offset: u64, data: &[u8]) -> Result<(), SinkError> { + let job = &self.jobs[i]; + let mut slot = self.slots[i].lock().expect("slot lock"); + if offset == 0 { + if let Some(old) = slot.take() { + self.in_flight.fetch_sub(old.written, Ordering::Relaxed); + discard(old); + } + *slot = Some(self.start(job).map_err(|e| SinkError::Fatal(self.fail(e)))?); + } + let Some(active) = slot.as_mut() else { + return Err(SinkError::Retry(format!("{}: data arrived before the start of the file", job.path))); + }; + if offset != active.written { + return Err(SinkError::Retry(format!("{}: a piece arrived out of order", job.path))); + } + if active.written + data.len() as u64 > job.size { + return Err(SinkError::Retry(format!("{}: the CDN sent more than the manifest size", job.path))); + } + active + .file + .write_all(data) + .map_err(|e| SinkError::Fatal(self.fail(format!("Could not write {}: {e}", job.path))))?; + active.hasher.update(data); + active.written += data.len() as u64; + self.in_flight.fetch_add(data.len() as u64, Ordering::Relaxed); + self.bytes_written.fetch_add(data.len() as u64, Ordering::Relaxed); + drop(slot); + self.emit(false); + Ok(()) + } + + fn finish(&self, i: usize) -> Result<u64, SinkError> { + let job = &self.jobs[i]; + let taken = self.slots[i].lock().expect("slot lock").take(); + let active = match taken { + Some(a) => a, + None => self.start(job).map_err(|e| SinkError::Fatal(self.fail(e)))?, + }; + self.in_flight.fetch_sub(active.written, Ordering::Relaxed); + if active.written != job.size { + let got = active.written; + discard(active); + return Err(SinkError::Retry(format!("{}: {got} bytes arrived, the manifest says {}", job.path, job.size))); + } + let Active { file, tmp, hasher, .. } = active; + if let Some(expected) = job.sha256 { + let got: [u8; 32] = hasher.finalize().into(); + if got != expected { + drop(file); + let _ = fs::remove_file(&tmp); + return Err(SinkError::Retry(format!("{}: SHA-256 mismatch", job.path))); + } + } + if let Err(e) = file.sync_all() { + drop(file); + let _ = fs::remove_file(&tmp); + return Err(SinkError::Fatal(self.fail(format!("Could not write {}: {e}", job.path)))); + } + drop(file); + if self.stop.load(Ordering::SeqCst) { + let _ = fs::remove_file(&tmp); + return Ok(0); + } + if !self.gate.allow(self.events) { + let _ = fs::remove_file(&tmp); + return Err(SinkError::Fatal(self.fail(super::REPLACE_REFUSED.into()))); + } + if let Err(e) = fs::rename(&tmp, &job.dest) { + let _ = fs::remove_file(&tmp); + return Err(SinkError::Fatal(self.fail(format!("Could not put {} in place: {e}", job.path)))); + } + self.placed[i].store(true, Ordering::SeqCst); + self.placed_bytes.fetch_add(job.size, Ordering::Relaxed); + self.files_placed.fetch_add(1, Ordering::Relaxed); + self.emit(true); + Ok(0) + } +} + +struct Sink<'p, 'a>(&'p Placer<'a>); + +impl FetchSink for Sink<'_, '_> { + fn process(&self, item: &FetchItem, _body: Vec<u8>) -> Result<u64, SinkError> { + Err(SinkError::Fatal(format!("item {} arrived whole; streaming was expected", item.id))) + } + + fn on_chunk(&self, item: &FetchItem, offset: u64, data: &[u8]) -> Result<(), SinkError> { + self.0.piece(item.id as usize, offset, data) + } + + fn on_finish(&self, item: &FetchItem, _total_len: u64) -> Result<u64, SinkError> { + self.0.finish(item.id as usize) + } +} + +pub fn worker_counts(max_workers: usize, process_workers: usize) -> (usize, usize) { + let cores = std::thread::available_parallelism().map(|n| n.get()).unwrap_or(2); + (max_workers.clamp(1, 128), process_workers.max(cores / 2).max(1)) +} + +pub fn run(jobs: &[Job], settings: &Settings, base: Baseline, gate: &ReplaceGate, stop: &AtomicBool, events: &dyn Events) -> Result<Stats, Stop> { + let placer = Placer { + jobs, + slots: jobs.iter().map(|_| Mutex::new(None)).collect(), + placed: jobs.iter().map(|_| AtomicBool::new(false)).collect(), + events, + gate, + stop, + failure: Mutex::new(None), + base, + placed_bytes: AtomicU64::new(0), + in_flight: AtomicU64::new(0), + shown: AtomicU64::new(0), + bytes_written: AtomicU64::new(0), + files_placed: AtomicUsize::new(0), + last_emit: AtomicU64::new(0), + started: Instant::now(), + }; + let (window, process) = worker_counts(settings.max_workers, settings.process_workers); + let distinct = distinct_host_count(&settings.hosts).max(1); + let options = FetchOptions { + max_workers: window, + per_host_cap: 6usize.max(window.div_ceil(distinct)), + timeout: REQUEST_TIMEOUT, + headers: vec![("User-Agent".to_string(), settings.user_agent.clone())], + ca_bundle_path: settings.ca_bundle.clone(), + process_workers: process, + label: "amazon".to_string(), + stream: true, + }; + let items: Vec<FetchItem> = jobs + .iter() + .enumerate() + .map(|(i, j)| FetchItem { id: i as u64, urls: vec![j.url.clone()], reserve: j.size, range: None }) + .collect(); + events.log(&format!( + "engine files={} window={window} process_workers={process} per_host_cap={} hosts={}", + jobs.len(), + options.per_host_cap, + settings.hosts.join(","), + )); + placer.emit(true); + let log = |line: &str| events.log(line); + let outcome = if items.is_empty() { + None + } else { + Some(run_fetch(items, &settings.hosts, &options, &Sink(&placer), stop, &|_: u64, _: u64| {}, &log)) + }; + + for slot in &placer.slots { + if let Some(active) = slot.lock().expect("slot lock").take() { + discard(active); + } + } + let placed_all = placer.placed.iter().all(|p| p.load(Ordering::SeqCst)); + if !placed_all { + for (job, placed) in jobs.iter().zip(&placer.placed) { + if !placed.load(Ordering::SeqCst) { + let _ = fs::remove_file(temp_path(&job.dest)); + } + } + } + placer.emit(true); + + let failure = placer.failure.lock().expect("failure lock").take(); + let stats = Stats { + bytes_written: placer.bytes_written.load(Ordering::Relaxed), + files_written: placer.files_placed.load(Ordering::Relaxed), + }; + if let Some(message) = failure { + return Err(Stop::Failed(message)); + } + if placed_all { + return Ok(stats); + } + if let Some(error) = outcome.as_ref().and_then(|o| o.error.clone()) { + events.log(&format!("download failed: {error}")); + return Err(Stop::Failed(super::FILE_FAILED.into())); + } + if stop.load(Ordering::SeqCst) { + return Err(Stop::Cancelled); + } + Err(Stop::Failed("The download ended before every file was written".into())) +} diff --git a/app/src/main/rust/stores/src/amazon/jni.rs b/app/src/main/rust/stores/src/amazon/jni.rs deleted file mode 100644 index 26797773b8..0000000000 --- a/app/src/main/rust/stores/src/amazon/jni.rs +++ /dev/null @@ -1,229 +0,0 @@ -//! JNI facade for the Amazon download adapter. -//! -//! Kotlin side: `com.droiddeck.launcher.stores.amazon.AmazonNative` (`nativeStart` / -//! `nativeCancel` / `nativeRelease`) with an `AmazonNative.Listener` -//! (`onProgress(JJJJ)V`, `onLog(String)V`, `onComplete(ZString;J)V`). Mirrors the shape of -//! the GOG and Epic facades: the run happens on a spawned native -//! thread, callbacks attach the JavaVM as daemon threads and hold a `GlobalRef` to the -//! listener; cancel flips an `AtomicBool`. This module keeps its own `JavaVM` handle (taken -//! from the calling `JNIEnv` on first use) so it depends on nothing outside this module. - -use crate::amazon::{run_download, MAX_PARALLEL}; -use jni::objects::{GlobalRef, JClass, JObject, JString, JValue}; -use jni::sys::{jint, jlong, JNI_FALSE, JNI_TRUE}; -use jni::{JNIEnv, JavaVM}; -use std::sync::atomic::{AtomicBool, Ordering}; -use std::sync::{Arc, OnceLock}; -use std::thread; - -/// Logcat tag (`adb logcat -s AmazonNative`). Every engine line reaches logcat exactly ONCE: -/// this module only forwards lines to the listener (`onLog`), and the Java manager is the one -/// place that writes them to `android.util.Log` + its debug file. (Round 1 fix: the native side -/// used to also call `__android_log_write`, so each line appeared twice.) -pub const LOG_TAG: &str = "AmazonNative"; - -static JVM: OnceLock<JavaVM> = OnceLock::new(); - -fn clear_pending_exception(env: &mut JNIEnv) { - if env.exception_check().unwrap_or(false) { - let _ = env.exception_clear(); - } -} - -fn jstring_to_string(env: &mut JNIEnv, value: &JString) -> Option<String> { - env.get_string(value) - .ok() - .map(|s| s.to_string_lossy().into_owned()) -} - -/// One live run; boxed and handed to Kotlin as an opaque `jlong`. -struct AmazonRun { - cancel: Arc<AtomicBool>, -} - -fn to_handle(run: Box<AmazonRun>) -> jlong { - Box::into_raw(run) as jlong -} - -unsafe fn from_handle<'a>(handle: jlong) -> Option<&'a AmazonRun> { - if handle == 0 { - None - } else { - Some(&*(handle as *const AmazonRun)) - } -} - -fn call_log(env: &mut JNIEnv, listener: &JObject, line: &str) { - let Ok(text) = env.new_string(line) else { - clear_pending_exception(env); - return; - }; - let text_obj = JObject::from(text); - let _ = env.call_method( - listener, - "onLog", - "(Ljava/lang/String;)V", - &[JValue::Object(&text_obj)], - ); - clear_pending_exception(env); -} - -fn call_progress( - env: &mut JNIEnv, - listener: &JObject, - bytes_done: u64, - bytes_total: u64, - files_done: u64, - files_total: u64, -) { - let _ = env.call_method( - listener, - "onProgress", - "(JJJJ)V", - &[ - JValue::Long(bytes_done as jlong), - JValue::Long(bytes_total as jlong), - JValue::Long(files_done as jlong), - JValue::Long(files_total as jlong), - ], - ); - clear_pending_exception(env); -} - -fn call_complete( - env: &mut JNIEnv, - listener: &JObject, - success: bool, - error: &str, - bytes_written: u64, -) { - let Ok(error) = env.new_string(error) else { - clear_pending_exception(env); - return; - }; - let error_obj = JObject::from(error); - let _ = env.call_method( - listener, - "onComplete", - "(ZLjava/lang/String;J)V", - &[ - JValue::Bool(if success { JNI_TRUE } else { JNI_FALSE }), - JValue::Object(&error_obj), - JValue::Long(bytes_written as jlong), - ], - ); - clear_pending_exception(env); -} - -/// Attach the current (native) thread and run `f` with the listener object. -fn with_attached_env(listener: &GlobalRef, f: impl FnOnce(&mut JNIEnv, &JObject)) { - let Some(vm) = JVM.get() else { - return; - }; - let Ok(mut env) = vm.attach_current_thread_as_daemon() else { - return; - }; - f(&mut env, listener.as_obj()); -} - -/// `AmazonNative.nativeStart(planJson, installDir, caBundlePath, maxWorkers, -/// processWorkers, listener) -> handle`. Returns 0 (and fires `onComplete(false, …)`) when the -/// inputs are unusable. The run itself happens on a spawned thread. -#[no_mangle] -pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeStart( - mut env: JNIEnv, - _class: JClass, - plan_json: JString, - install_dir: JString, - ca_bundle_path: JString, - max_workers: jint, - process_workers: jint, - listener: JObject, -) -> jlong { - if listener.is_null() { - return 0; - } - if JVM.get().is_none() { - if let Ok(vm) = env.get_java_vm() { - let _ = JVM.set(vm); - } - } - let plan_json = jstring_to_string(&mut env, &plan_json).unwrap_or_default(); - let install_dir = jstring_to_string(&mut env, &install_dir).unwrap_or_default(); - let ca_bundle_path = jstring_to_string(&mut env, &ca_bundle_path).unwrap_or_default(); - if plan_json.is_empty() || install_dir.is_empty() { - call_complete(&mut env, &listener, false, "empty plan or install dir", 0); - return 0; - } - let Ok(listener) = env.new_global_ref(&listener) else { - clear_pending_exception(&mut env); - return 0; - }; - let max_workers = if max_workers <= 0 { - MAX_PARALLEL - } else { - max_workers as usize - }; - let process_workers = process_workers.max(1) as usize; - let cancel = Arc::new(AtomicBool::new(false)); - let run = Box::new(AmazonRun { - cancel: Arc::clone(&cancel), - }); - - thread::spawn(move || { - crate::priority::background(); - let log_listener = listener.clone(); - let log = move |line: &str| { - with_attached_env(&log_listener, |env, obj| call_log(env, obj, line)); - }; - let progress_listener = listener.clone(); - let progress = move |bytes_done: u64, bytes_total: u64, files_done: u64, files_total: u64| { - with_attached_env(&progress_listener, |env, obj| { - call_progress(env, obj, bytes_done, bytes_total, files_done, files_total) - }); - }; - let result = run_download( - &plan_json, - &install_dir, - &ca_bundle_path, - max_workers, - process_workers, - cancel, - &progress, - &log, - ); - with_attached_env(&listener, |env, obj| { - call_complete(env, obj, result.success, &result.error, result.bytes_written) - }); - }); - - to_handle(run) -} - -/// `AmazonNative.nativeCancel(handle)` — flips the run's cancel flag; the core stops -/// issuing requests, in-flight bodies are dropped, `onComplete(false, "cancelled", …)` follows. -#[no_mangle] -pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeCancel( - _env: JNIEnv, - _class: JClass, - handle: jlong, -) { - if let Some(run) = unsafe { from_handle(handle) } { - run.cancel.store(true, Ordering::Relaxed); - } -} - -/// `AmazonNative.nativeRelease(handle)` — frees the handle. Safe at any time: the worker -/// thread owns its own `Arc` of the cancel flag and the listener `GlobalRef`. -#[no_mangle] -pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeRelease( - _env: JNIEnv, - _class: JClass, - handle: jlong, -) { - if handle != 0 { - unsafe { - drop(Box::from_raw(handle as *mut AmazonRun)); - } - } -} diff --git a/app/src/main/rust/stores/src/amazon/launch.rs b/app/src/main/rust/stores/src/amazon/launch.rs new file mode 100644 index 0000000000..248dfc93c5 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/launch.rs @@ -0,0 +1,306 @@ +use std::fs; +use std::path::{Path, PathBuf}; + +use serde_json::Value; + +pub const FUEL_FILE: &str = "fuel.json"; +const MAX_DEPTH: usize = 16; +const STUB_BYTES: u64 = 1_000_000; +const STUB_WORDS: &[&str] = &["crash", "handler", "viewer", "compiler", "tool", "setup", "unins", "eac", "launcher", "steam"]; +const SHIPPING_SUFFIXES: &[&str] = &["-win32.exe", "-win64.exe", "-win32-shipping.exe", "-win64-shipping.exe"]; +const UNREAL_DIRS: &[&str] = &["/binaries/win32/", "/binaries/win64/"]; + +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct FuelMain { + pub command: String, + pub args: Vec<String>, +} + +pub fn parse_fuel(text: &str) -> Option<FuelMain> { + let v: Value = serde_json::from_str(text.trim_start_matches('\u{feff}')).ok()?; + let main = v.get("Main").filter(|m| m.is_object())?; + let command = main.get("Command").and_then(|c| c.as_str()).unwrap_or("").trim().to_string(); + let args = main + .get("Args") + .and_then(|a| a.as_array()) + .map(|a| a.iter().filter_map(|x| x.as_str()).filter(|s| !s.is_empty()).map(str::to_string).collect()) + .unwrap_or_default(); + Some(FuelMain { command, args }) +} + +fn relative_command(command: &str) -> Option<String> { + let mut path = command.replace('\\', "/"); + while let Some(rest) = path.strip_prefix("./") { + path = rest.to_string(); + } + let path = path.trim_start_matches('/').to_string(); + let ok = !path.is_empty() && !path.contains(':') && path.split('/').all(|s| !s.is_empty() && s != "." && s != ".."); + ok.then_some(path) +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Candidate { + pub path: String, + pub size: u64, +} + +fn file_name(path: &str) -> &str { + path.rsplit('/').next().unwrap_or(path) +} + +fn letter_digits_name(name_lower: &str) -> bool { + let Some(stem) = name_lower.strip_suffix(".exe") else { return false }; + let b = stem.as_bytes(); + (2..=4).contains(&b.len()) && b[0].is_ascii_lowercase() && b[1..].iter().all(u8::is_ascii_digit) +} + +pub fn likely_stub(c: &Candidate) -> bool { + let name = file_name(&c.path).to_lowercase(); + letter_digits_name(&name) || c.size < STUB_BYTES || STUB_WORDS.iter().any(|w| name.contains(w)) +} + +fn letters(text: &str) -> String { + text.to_lowercase().chars().filter(|c| c.is_ascii_lowercase()).collect() +} + +pub fn score(c: &Candidate, title: &str) -> i64 { + let rel = format!("/{}", c.path.to_lowercase()); + let name = file_name(&rel).to_string(); + let mut s = 50; + if SHIPPING_SUFFIXES.iter().any(|x| rel.ends_with(x)) { + s += 300; + } + if UNREAL_DIRS.iter().any(|x| rel.contains(x)) { + s += 250; + } + let title_lower = title.trim().to_lowercase(); + let title_letters = letters(title); + let stem_letters = letters(name.strip_suffix(".exe").unwrap_or(&name)); + let title_in_path = !title_lower.is_empty() && rel.contains(&title_lower); + let same_start = title_letters.len() >= 5 && stem_letters.len() >= 5 && title_letters[..5] == stem_letters[..5]; + if title_in_path || same_start { + s += 100; + } + if STUB_WORDS.iter().any(|w| rel.contains(w)) { + s -= 150; + } + if letter_digits_name(&name) { + s -= 200; + } + s +} + +pub fn choose(candidates: &[Candidate], title: &str) -> Option<Candidate> { + let real: Vec<&Candidate> = candidates.iter().filter(|c| !likely_stub(c)).collect(); + let pool: Vec<&Candidate> = if real.is_empty() { candidates.iter().collect() } else { real }; + pool.into_iter() + .max_by(|a, b| { + score(a, title) + .cmp(&score(b, title)) + .then(a.size.cmp(&b.size)) + .then_with(|| b.path.cmp(&a.path)) + }) + .cloned() +} + +fn collect(dir: &Path, rel: &str, depth: usize, out: &mut Vec<Candidate>) { + if depth > MAX_DEPTH { + return; + } + let Ok(entries) = fs::read_dir(dir) else { return }; + let mut entries: Vec<_> = entries.flatten().collect(); + entries.sort_by_key(|e| e.file_name()); + for entry in entries { + let Ok(meta) = entry.metadata() else { continue }; + let name = entry.file_name().to_string_lossy().into_owned(); + let child = if rel.is_empty() { name.clone() } else { format!("{rel}/{name}") }; + if meta.file_type().is_symlink() { + continue; + } else if meta.is_dir() { + collect(&entry.path(), &child, depth + 1, out); + } else if meta.is_file() && name.to_lowercase().ends_with(".exe") { + out.push(Candidate { path: child, size: meta.len() }); + } + } +} + +pub fn executables(game_dir: &Path) -> Vec<Candidate> { + let mut out = Vec::new(); + collect(game_dir, "", 0, &mut out); + out +} + +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct LaunchSpec { + pub exe: String, + pub args: Vec<String>, + pub source: &'static str, + pub warning: Option<String>, +} + +fn fuel_path(game_dir: &Path) -> Option<PathBuf> { + let exact = game_dir.join(FUEL_FILE); + if exact.is_file() { + return Some(exact); + } + fs::read_dir(game_dir) + .ok()? + .flatten() + .find(|e| e.file_name().to_string_lossy().eq_ignore_ascii_case(FUEL_FILE) && e.path().is_file()) + .map(|e| e.path()) +} + +pub fn launch_spec(game_dir: &Path, title: &str) -> LaunchSpec { + let mut spec = LaunchSpec::default(); + if let Some(path) = fuel_path(game_dir) { + match fs::read_to_string(&path).ok().as_deref().and_then(parse_fuel) { + Some(main) => { + spec.args = main.args; + if let Some(rel) = relative_command(&main.command) { + let target = game_dir.join(&rel); + let regular = fs::symlink_metadata(&target).map(|m| m.is_file()).unwrap_or(false); + if regular { + spec.exe = rel; + spec.source = "fuel"; + return spec; + } + } + } + None => spec.warning = Some("fuel.json could not be read; choosing the exe by name".into()), + } + } + if let Some(best) = choose(&executables(game_dir), title) { + spec.exe = best.path; + spec.source = "score"; + } + spec +} + +pub fn fuel_environment(entitlement_id: &str, sku: &str, display_name: &str) -> Vec<(String, String)> { + let name = display_name.trim(); + let player = if name.is_empty() || name == "Amazon Games" { "Player" } else { name }; + vec![ + ("FUEL_DIR".into(), r"C:\ProgramData\Amazon Games Services\Legacy".into()), + ("AMAZON_GAMES_SDK_PATH".into(), r"C:\ProgramData\Amazon Games Services\AmazonGamesSDK".into()), + ("AMAZON_GAMES_FUEL_ENTITLEMENT_ID".into(), entitlement_id.into()), + ("AMAZON_GAMES_FUEL_PRODUCT_SKU".into(), sku.into()), + ("AMAZON_GAMES_FUEL_DISPLAY_NAME".into(), player.into()), + ] +} + +#[cfg(test)] +mod tests { + use super::*; + + const BIG: u64 = 50_000_000; + + fn c(path: &str, size: u64) -> Candidate { + Candidate { path: path.into(), size } + } + + #[test] + fn fuel_json_main_block() { + let f = parse_fuel(r#"{"Main":{"Command":" Bin\\Game.exe ","Args":["-a","",3,"-b"]},"PostInstall":[]}"#).unwrap(); + assert_eq!(f.command, "Bin\\Game.exe"); + assert_eq!(f.args, vec!["-a", "-b"]); + assert_eq!(parse_fuel(r#"{"Main":{}}"#).unwrap(), FuelMain::default()); + assert!(parse_fuel(r#"{"Main":"x"}"#).is_none()); + assert!(parse_fuel("not json").is_none()); + assert!(parse_fuel("\u{feff}{\"Main\":{\"Command\":\"a.exe\"}}").is_some()); + assert_eq!(relative_command("\\Bin\\Game.exe").as_deref(), Some("Bin/Game.exe")); + assert_eq!(relative_command("./Game.exe").as_deref(), Some("Game.exe")); + assert_eq!(relative_command("..\\Other\\x.exe"), None); + assert_eq!(relative_command("C:\\x.exe"), None); + assert_eq!(relative_command(""), None); + } + + #[test] + fn stubs() { + assert!(likely_stub(&c("a1.exe", BIG))); + assert!(likely_stub(&c("sub/X123.exe", BIG))); + assert!(!likely_stub(&c("ab1.exe", BIG))); + assert!(!likely_stub(&c("a1234.exe", BIG))); + assert!(likely_stub(&c("Game.exe", 999_999))); + assert!(likely_stub(&c("CrashReporter.exe", BIG))); + assert!(likely_stub(&c("UnityCrashHandler64.exe", BIG))); + assert!(!likely_stub(&c("Game.exe", BIG))); + } + + #[test] + fn unreal_shipping_binary_wins() { + let list = [ + c("Game.exe", 300_000_000), + c("MyGame/Binaries/Win64/MyGame-Win64-Shipping.exe", 80_000_000), + c("Engine/Extras/Redist/en-us/UE4PrereqSetup_x64.exe", 40_000_000), + ]; + assert_eq!(choose(&list, "My Game").unwrap().path, "MyGame/Binaries/Win64/MyGame-Win64-Shipping.exe"); + } + + #[test] + fn scoring_uses_relative_paths() { + let a = c("Dread Templar.exe", 10_000_000); + let b = c("bin/engine.exe", 20_000_000); + assert_eq!(score(&a, "Dread Templar"), 150); + assert_eq!(score(&b, "Dread Templar"), 50); + assert_eq!(choose(&[a.clone(), b.clone()], "Dread Templar").unwrap().path, "Dread Templar.exe"); + assert_eq!(score(&c("DreadT.exe", BIG), "Dread Templar"), 150); + assert_eq!(score(&c("Binaries/Win64/x.exe", BIG), ""), 300); + assert_eq!(score(&c("tools/a12.exe", BIG), "z"), 50 - 150 - 200); + } + + #[test] + fn ties_go_to_the_larger_file_and_stubs_are_a_last_resort() { + let list = [c("one.exe", 5_000_000), c("two.exe", 9_000_000)]; + assert_eq!(choose(&list, "zzz").unwrap().path, "two.exe"); + let stubs = [c("setup.exe", 5_000_000), c("small.exe", 10)]; + assert_eq!(choose(&stubs, "zzz").unwrap().path, "small.exe"); + assert_eq!(choose(&[], "zzz"), None); + } + + #[test] + fn spec_from_a_folder() { + let dir = std::env::temp_dir().join(format!("dd-amazon-launch-{}", std::process::id())); + let _ = fs::remove_dir_all(&dir); + fs::create_dir_all(dir.join("Bin")).unwrap(); + fs::write(dir.join("Bin/Game.exe"), vec![0u8; 1_100_000]).unwrap(); + fs::write(dir.join("Other.exe"), vec![0u8; 2_000_000]).unwrap(); + fs::write(dir.join("fuel.json"), r#"{"Main":{"Command":"Bin\\Game.exe","Args":["-x"]}}"#).unwrap(); + let s = launch_spec(&dir, "Something"); + assert_eq!((s.exe.as_str(), s.source), ("Bin/Game.exe", "fuel")); + assert_eq!(s.args, vec!["-x"]); + fs::write(dir.join("fuel.json"), r#"{"Main":{"Command":"Missing.exe","Args":["-y"]}}"#).unwrap(); + let s = launch_spec(&dir, "Something"); + assert_eq!((s.exe.as_str(), s.source), ("Other.exe", "score")); + assert_eq!(s.args, vec!["-y"]); + fs::write(dir.join("fuel.json"), "{").unwrap(); + let s = launch_spec(&dir, "Something"); + assert!(s.args.is_empty() && s.warning.is_some()); + assert_eq!(s.exe, "Other.exe"); + let empty = std::env::temp_dir().join(format!("dd-amazon-launch-empty-{}", std::process::id())); + fs::create_dir_all(&empty).unwrap(); + assert_eq!(launch_spec(&empty, "x").exe, ""); + let _ = fs::remove_dir_all(&dir); + let _ = fs::remove_dir_all(&empty); + } + + #[test] + fn environment() { + let env = fuel_environment("ent", "sku", "Amazon Games"); + let names: Vec<&str> = env.iter().map(|(k, _)| k.as_str()).collect(); + assert_eq!( + names, + vec![ + "FUEL_DIR", + "AMAZON_GAMES_SDK_PATH", + "AMAZON_GAMES_FUEL_ENTITLEMENT_ID", + "AMAZON_GAMES_FUEL_PRODUCT_SKU", + "AMAZON_GAMES_FUEL_DISPLAY_NAME" + ] + ); + assert_eq!(env[0].1, "C:\\ProgramData\\Amazon Games Services\\Legacy"); + assert_eq!(env[4].1, "Player"); + assert_eq!(fuel_environment("e", "", " ")[4].1, "Player"); + assert_eq!(fuel_environment("e", "", "Sam")[4].1, "Sam"); + assert_eq!(fuel_environment("e", "", "Sam")[2].1, "e"); + } +} diff --git a/app/src/main/rust/stores/src/amazon/library.rs b/app/src/main/rust/stores/src/amazon/library.rs new file mode 100644 index 0000000000..ec9ba55f86 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/library.rs @@ -0,0 +1,228 @@ +use std::collections::HashMap; + +use serde_json::{json, Value}; +use sha2::{Digest, Sha256}; + +use super::distribution::{self, Failure}; +use super::net::{self, str_at, str_of}; + +pub const CLIENT_ID: &str = "Sonic"; +pub const KEY_ID: &str = "d5dc8b8b-86c8-4fc4-ae93-18c0def5314d"; +pub const PAGE_SIZE: u32 = 50; +const MAX_PAGES: usize = 1000; + +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct Game { + pub product_id: String, + pub entitlement_id: String, + pub title: String, + pub sku: String, + pub product_type: String, + pub parent_product_id: String, + pub art: String, + pub hero: String, + pub developer: String, + pub publisher: String, +} + +impl Game { + pub fn is_dlc(&self) -> bool { + (!self.product_type.is_empty() && !self.product_type.eq_ignore_ascii_case("GAME")) + || !self.parent_product_id.is_empty() + } + + pub fn to_json(&self) -> Value { + json!({ + "productId": self.product_id, + "entitlementId": self.entitlement_id, + "title": self.title, + "sku": self.sku, + "art": self.art, + "hero": self.hero, + "developer": self.developer, + "publisher": self.publisher, + "dlc": self.is_dlc(), + "parentProductId": self.parent_product_id, + }) + } +} + +pub fn hardware_hash(device_serial: &str) -> String { + net::hex_upper(&Sha256::digest(device_serial.as_bytes())) +} + +fn first<'v>(product: &'v Value, paths: &[&[&str]]) -> &'v str { + paths.iter().map(|p| str_at(product, p)).find(|s| !s.is_empty()).unwrap_or("") +} + +pub fn read_entitlement(e: &Value) -> Option<Game> { + let product = e.get("product").filter(|p| p.is_object())?; + let product_id = str_of(product, "id"); + if product_id.is_empty() { + return None; + } + let title = str_of(product, "title"); + Some(Game { + product_id: product_id.to_string(), + entitlement_id: str_of(e, "id").to_string(), + title: if title.is_empty() { "Unknown".to_string() } else { title.to_string() }, + sku: str_of(product, "sku").to_string(), + product_type: first(product, &[&["productType"], &["type"], &["productDetail", "details", "productType"]]).to_string(), + parent_product_id: first( + product, + &[&["parentProductId"], &["baseProductId"], &["parentId"], &["productDetail", "details", "parentProductId"]], + ) + .to_string(), + art: first(product, &[&["productDetail", "iconUrl"], &["productDetail", "details", "pgCrownImageUrl"]]).to_string(), + hero: first( + product, + &[ + &["productDetail", "details", "backgroundUrl2"], + &["productDetail", "details", "backgroundUrl1"], + &["productDetail", "details", "pgCrownImageUrl"], + ], + ) + .to_string(), + developer: str_at(product, &["productDetail", "details", "developer"]).to_string(), + publisher: str_at(product, &["productDetail", "details", "publisher"]).to_string(), + }) +} + +pub fn read_page(body: &Value) -> (Vec<Game>, Option<String>) { + let games = body + .get("entitlements") + .and_then(|e| e.as_array()) + .map(|a| a.iter().filter_map(read_entitlement).collect()) + .unwrap_or_default(); + let next = Some(str_of(body, "nextToken")).filter(|t| !t.is_empty()).map(str::to_string); + (games, next) +} + +pub fn dedupe(games: Vec<Game>) -> Vec<Game> { + let mut out: Vec<Game> = Vec::with_capacity(games.len()); + let mut index: HashMap<String, usize> = HashMap::new(); + for g in games { + match index.get(&g.product_id) { + Some(&i) => out[i] = g, + None => { + index.insert(g.product_id.clone(), out.len()); + out.push(g); + } + } + } + out +} + +pub fn visible(games: Vec<Game>) -> Vec<Game> { + let kept: Vec<Game> = games.iter().filter(|g| !(g.is_dlc() && !g.parent_product_id.is_empty())).cloned().collect(); + let mut out = if kept.is_empty() { games } else { kept }; + out.sort_by_key(|g| g.title.to_lowercase()); + out +} + +pub fn page_body(device_serial: &str, next: Option<&str>) -> Value { + json!({ + "Operation": "GetEntitlements", + "clientId": CLIENT_ID, + "syncPoint": null, + "nextToken": next, + "maxResults": PAGE_SIZE, + "productIdFilter": null, + "keyId": KEY_ID, + "hardwareHash": hardware_hash(device_serial), + }) +} + +pub fn list(access_token: &str, device_serial: &str) -> Result<Vec<Game>, Failure> { + let mut all = Vec::new(); + let mut next: Option<String> = None; + for _ in 0..MAX_PAGES { + let body = page_body(device_serial, next.as_deref()); + let answer = distribution::call( + distribution::ENTITLEMENTS_URL, + distribution::ENTITLEMENTS_TARGET, + access_token, + &body, + )?; + let (games, cursor) = read_page(&answer); + all.extend(games); + match cursor { + Some(c) if Some(&c) != next.as_ref() => next = Some(c), + Some(_) => return Err(Failure::Other("Amazon repeated a library page cursor".into())), + None => return Ok(dedupe(all)), + } + } + Err(Failure::Other("the Amazon library has too many pages".into())) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn game(id: &str, title: &str, kind: &str, parent: &str) -> Game { + Game { + product_id: id.into(), + title: title.into(), + product_type: kind.into(), + parent_product_id: parent.into(), + ..Default::default() + } + } + + #[test] + fn hardware_hash_is_upper_hex_sha256() { + assert_eq!(hardware_hash("abc"), "BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD"); + } + + #[test] + fn entitlement_fields_and_fallbacks() { + let e = json!({"id":"ent-1","product":{"id":"amzn1.adg.product.x","title":"Game","sku":"SKU1", + "productDetail":{"iconUrl":"","details":{"pgCrownImageUrl":"crown","backgroundUrl1":"bg1", + "developer":"Dev","publisher":"Pub","productType":"GAME"}}}}); + let g = read_entitlement(&e).unwrap(); + assert_eq!(g.entitlement_id, "ent-1"); + assert_eq!(g.art, "crown"); + assert_eq!(g.hero, "bg1"); + assert_eq!(g.product_type, "GAME"); + assert!(!g.is_dlc()); + let untitled = read_entitlement(&json!({"product":{"id":"p","type":"DLC","baseProductId":"q"}})).unwrap(); + assert_eq!(untitled.title, "Unknown"); + assert_eq!(untitled.entitlement_id, ""); + assert_eq!(untitled.parent_product_id, "q"); + assert!(untitled.is_dlc()); + assert!(read_entitlement(&json!({"id":"x"})).is_none()); + assert!(read_entitlement(&json!({"id":"x","product":{"id":""}})).is_none()); + } + + #[test] + fn pages_and_cursors() { + let (games, next) = read_page(&json!({"entitlements":[{"product":{"id":"a"}},{"product":{}}],"nextToken":"n2"})); + assert_eq!(games.len(), 1); + assert_eq!(next.as_deref(), Some("n2")); + assert_eq!(read_page(&json!({"nextToken":null})).1, None); + assert_eq!(read_page(&json!({"nextToken":""})).1, None); + assert!(read_page(&json!({})).0.is_empty()); + let first = page_body("SERIAL", None); + assert!(first["nextToken"].is_null()); + assert_eq!(first["maxResults"], 50); + assert_eq!(page_body("SERIAL", Some("n2"))["nextToken"], "n2"); + } + + #[test] + fn duplicates_and_visibility() { + let games = dedupe(vec![game("a", "b-old", "", ""), game("c", "zeta", "", ""), game("a", "Beta", "", "")]); + assert_eq!(games.len(), 2); + assert_eq!(games[0].title, "Beta"); + let shown = visible(vec![ + game("1", "zed", "GAME", ""), + game("2", "alpha", "", ""), + game("3", "addon", "DLC", "1"), + game("4", "soundtrack", "DLC", ""), + game("5", "Bravo", "game", ""), + ]); + let titles: Vec<&str> = shown.iter().map(|g| g.title.as_str()).collect(); + assert_eq!(titles, vec!["alpha", "Bravo", "soundtrack", "zed"]); + let only_addons = visible(vec![game("3", "addon", "DLC", "1")]); + assert_eq!(only_addons.len(), 1); + } +} diff --git a/app/src/main/rust/stores/src/amazon/manifest.rs b/app/src/main/rust/stores/src/amazon/manifest.rs new file mode 100644 index 0000000000..8bffbbead1 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/manifest.rs @@ -0,0 +1,304 @@ +use std::collections::HashMap; + +use super::codec; +use super::net::hex_lower; +use super::proto::{Fields, Value}; + +pub const SHA256_ALGORITHM: u64 = 0; + +pub const RESERVED_ROOT_NAMES: &[&str] = &[ + ".droiddeck-store.json", + ".droiddeck-store.json.tmp", + ".droiddeck-launch.bat", + ".amazon_download_in_progress", + ".amazon_download_complete", +]; + +pub const TEMP_SUFFIX: &str = ".tmp"; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct GameFile { + pub path: String, + pub size: u64, + pub algorithm: u64, + pub digest: Vec<u8>, +} + +impl GameFile { + pub fn sha256(&self) -> Option<[u8; 32]> { + if self.algorithm == SHA256_ALGORITHM { + self.digest.as_slice().try_into().ok() + } else { + None + } + } + + pub fn cdn_name(&self) -> String { + hex_lower(&self.digest) + } +} + +#[derive(Debug, Default)] +pub struct Manifest { + pub files: Vec<GameFile>, + pub entries: usize, + pub warnings: Vec<String>, +} + +impl Manifest { + pub fn total_size(&self) -> u64 { + self.files.iter().map(|f| f.size).sum() + } +} + +pub fn check_path(raw: &str) -> Result<String, String> { + let path = raw.replace('\\', "/"); + let refuse = |why: &str| Err(format!("The manifest has an unsafe path ({why}): {raw}")); + if path.starts_with('/') { + return refuse("absolute"); + } + if path.contains(':') { + return refuse("drive letter or stream name"); + } + if path.contains('\0') { + return refuse("NUL character"); + } + for segment in path.split('/') { + match segment { + "" => return refuse("empty segment"), + "." | ".." => return refuse("relative segment"), + _ => {} + } + } + if !path.contains('/') && RESERVED_ROOT_NAMES.iter().any(|r| r.eq_ignore_ascii_case(&path)) { + return refuse("DroidDeck's own file"); + } + Ok(path) +} + +fn parse_hash(data: &[u8]) -> Result<(u64, Vec<u8>), String> { + let mut algorithm = SHA256_ALGORITHM; + let mut digest = Vec::new(); + let mut fields = Fields::new(data); + while let Some((n, v)) = fields.next_field()? { + match (n, v) { + (1, Value::Varint(a)) => algorithm = a, + (2, Value::Bytes(b)) => digest = b.to_vec(), + (1 | 2, _) => return Err(format!("hash field {n} has the wrong type")), + _ => {} + } + } + Ok((algorithm, digest)) +} + +fn parse_file(data: &[u8]) -> Result<Option<GameFile>, String> { + let mut path = String::new(); + let mut size = 0u64; + let mut hash = (SHA256_ALGORITHM, Vec::new()); + let mut fields = Fields::new(data); + while let Some((n, v)) = fields.next_field()? { + match (n, v) { + (1, Value::Bytes(b)) => { + path = String::from_utf8(b.to_vec()).map_err(|_| "a file path is not UTF-8".to_string())? + } + (3, Value::Varint(s)) => size = s, + (5, Value::Bytes(b)) => hash = parse_hash(b)?, + (1 | 3 | 5, _) => return Err(format!("file field {n} has the wrong type")), + _ => {} + } + } + if path.is_empty() { + return Ok(None); + } + let path = check_path(&path)?; + let (algorithm, digest) = hash; + if size > 0 && digest.is_empty() { + return Err(format!("The manifest gives no hash for {path}")); + } + if algorithm == SHA256_ALGORITHM && !digest.is_empty() && digest.len() != 32 { + return Err(format!("The manifest has a {}-byte SHA-256 for {path}", digest.len())); + } + Ok(Some(GameFile { path, size, algorithm, digest })) +} + +pub fn parse_message(data: &[u8]) -> Result<Manifest, String> { + let mut out = Manifest::default(); + let mut index: HashMap<String, usize> = HashMap::new(); + let mut top = Fields::new(data); + while let Some((n, v)) = top.next_field()? { + let package = match (n, v) { + (1, Value::Bytes(b)) => b, + (1, _) => return Err("package field has the wrong type".into()), + _ => continue, + }; + let mut fields = Fields::new(package); + while let Some((n, v)) = fields.next_field()? { + let entry = match (n, v) { + (2, Value::Bytes(b)) => b, + (2, _) => return Err("file field has the wrong type".into()), + _ => continue, + }; + let Some(file) = parse_file(entry)? else { continue }; + out.entries += 1; + match index.get(&file.path) { + Some(&i) => { + out.warnings.push(format!("duplicate manifest path {}; the later entry wins", file.path)); + out.files[i] = file; + } + None => { + index.insert(file.path.clone(), out.files.len()); + out.files.push(file); + } + } + } + } + for f in &out.files { + if let Some(base) = f.path.strip_suffix(TEMP_SUFFIX) { + if index.contains_key(base) { + return Err(format!("The manifest has a file that clashes with a temporary file: {}", f.path)); + } + } + } + Ok(out) +} + +pub fn parse(object: &[u8]) -> Result<Manifest, String> { + parse_message(&codec::message(object)?) +} + +#[cfg(test)] +pub mod testing { + use crate::amazon::proto::write; + + pub struct Entry<'a> { + pub path: &'a str, + pub size: u64, + pub algorithm: Option<u64>, + pub digest: &'a [u8], + } + + pub fn file_message(e: &Entry<'_>) -> Vec<u8> { + let mut hash = Vec::new(); + if let Some(a) = e.algorithm { + write::uint(&mut hash, 1, a); + } + write::bytes(&mut hash, 2, e.digest); + let mut f = Vec::new(); + write::bytes(&mut f, 1, e.path.as_bytes()); + write::uint(&mut f, 2, 1_700_000_000); + write::uint(&mut f, 3, e.size); + write::bytes(&mut f, 5, &hash); + f + } + + pub fn message(packages: &[Vec<Entry<'_>>]) -> Vec<u8> { + let mut m = Vec::new(); + write::uint(&mut m, 7, 3); + for files in packages { + let mut p = Vec::new(); + write::bytes(&mut p, 1, b"package-name"); + for e in files { + write::bytes(&mut p, 2, &file_message(e)); + } + write::bytes(&mut m, 1, &p); + } + m + } +} + +#[cfg(test)] +mod tests { + use super::testing::{message, Entry}; + use super::*; + use crate::amazon::codec::testing::frame; + use sha2::{Digest, Sha256}; + + #[test] + fn parses_files_across_packages() { + let d1: Vec<u8> = Sha256::digest(b"one").to_vec(); + let d2: Vec<u8> = Sha256::digest(b"two").to_vec(); + let msg = message(&[ + vec![ + Entry { path: "Binaries\\Win64\\Game.exe", size: 3, algorithm: Some(0), digest: &d1 }, + Entry { path: "", size: 9, algorithm: None, digest: &d1 }, + ], + vec![Entry { path: "fuel.json", size: 3, algorithm: None, digest: &d2 }], + ]); + for xz in [true, false] { + let m = parse(&frame(&msg, b"\x0a\x00", xz)).unwrap(); + assert_eq!(m.files.len(), 2); + assert_eq!(m.entries, 2); + assert_eq!(m.files[0].path, "Binaries/Win64/Game.exe"); + assert_eq!(m.files[0].sha256().unwrap().to_vec(), d1); + assert_eq!(m.files[0].cdn_name(), hex_lower(&d1)); + assert_eq!(m.files[1].algorithm, 0, "absent algorithm means SHA-256"); + assert_eq!(m.total_size(), 6); + } + } + + #[test] + fn other_algorithms_are_not_verified_but_still_named() { + let msg = message(&[vec![Entry { path: "a", size: 1, algorithm: Some(7), digest: &[0xab, 0xcd] }]]); + let m = parse_message(&msg).unwrap(); + assert_eq!(m.files[0].sha256(), None); + assert_eq!(m.files[0].cdn_name(), "abcd"); + } + + #[test] + fn duplicate_paths_keep_the_later_entry() { + let a = [1u8; 32]; + let b = [2u8; 32]; + let msg = message(&[vec![ + Entry { path: "x\\y.bin", size: 1, algorithm: Some(0), digest: &a }, + Entry { path: "x/y.bin", size: 2, algorithm: Some(0), digest: &b }, + ]]); + let m = parse_message(&msg).unwrap(); + assert_eq!(m.files.len(), 1); + assert_eq!(m.entries, 2); + assert_eq!(m.files[0].size, 2); + assert_eq!(m.warnings.len(), 1); + } + + #[test] + fn unsafe_paths_are_refused() { + for bad in [ + "\\abs.exe", + "/abs.exe", + "C:\\Windows\\x.dll", + "a\\..\\..\\b", + "..", + "a\\\\b", + "a\\", + "a\\.\\b", + ".droiddeck-store.json", + ".DroidDeck-Launch.BAT", + ".amazon_download_complete", + ] { + assert!(check_path(bad).is_err(), "{bad}"); + let msg = message(&[vec![Entry { path: bad, size: 1, algorithm: Some(0), digest: &[0; 32] }]]); + let err = parse_message(&msg).unwrap_err(); + assert!(err.contains(bad), "{err}"); + } + assert_eq!(check_path("sub\\.droiddeck-store.json").unwrap(), "sub/.droiddeck-store.json"); + assert_eq!(check_path("..hidden\\x..y").unwrap(), "..hidden/x..y"); + } + + #[test] + fn malformed_entries_are_errors() { + let no_hash = message(&[vec![Entry { path: "a", size: 5, algorithm: Some(0), digest: &[] }]]); + assert!(parse_message(&no_hash).is_err()); + let empty_ok = message(&[vec![Entry { path: "e", size: 0, algorithm: Some(0), digest: &[] }]]); + assert_eq!(parse_message(&empty_ok).unwrap().files[0].sha256(), None); + let short = message(&[vec![Entry { path: "a", size: 5, algorithm: Some(0), digest: &[1, 2] }]]); + assert!(parse_message(&short).is_err()); + let clash = message(&[vec![ + Entry { path: "a.bin", size: 1, algorithm: Some(0), digest: &[1; 32] }, + Entry { path: "a.bin.tmp", size: 1, algorithm: Some(0), digest: &[2; 32] }, + ]]); + assert!(parse_message(&clash).is_err()); + let mut truncated = message(&[vec![Entry { path: "a", size: 1, algorithm: Some(0), digest: &[1; 32] }]]); + truncated.truncate(truncated.len() - 3); + assert!(parse_message(&truncated).is_err()); + assert!(parse_message(&[0x08, 0x01]).is_err()); + } +} diff --git a/app/src/main/rust/stores/src/amazon/mod.rs b/app/src/main/rust/stores/src/amazon/mod.rs new file mode 100644 index 0000000000..dd2f1f7db8 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/mod.rs @@ -0,0 +1,12 @@ +pub mod auth; +pub mod cdn; +pub mod codec; +pub mod distribution; +pub mod ffi; +pub mod install; +pub mod launch; +pub mod library; +pub mod manifest; +pub mod net; +pub mod proto; +pub mod service; diff --git a/app/src/main/rust/stores/src/amazon/net.rs b/app/src/main/rust/stores/src/amazon/net.rs new file mode 100644 index 0000000000..2fc319ce28 --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/net.rs @@ -0,0 +1,295 @@ +use std::sync::OnceLock; +use std::time::Duration; + +pub const USER_AGENT_PRODUCT: &str = "DroidDeck"; + +pub const BROWSER_USER_AGENT: &str = + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"; + +pub const LAUNCHER_USER_AGENT: &str = "AGSLauncher/1.0.0"; + +pub const LAUNCHER_PACKAGE: (&str, &str) = ("UserAgent", "com.amazon.agslauncher.win/3.0.9202.1"); + +static APP_VERSION: OnceLock<String> = OnceLock::new(); + +pub fn set_app_version(version: &str) { + let clean: String = version.trim().chars().filter(|c| !c.is_control()).collect(); + if !clean.is_empty() { + let _ = APP_VERSION.set(clean); + } +} + +pub fn user_agent() -> String { + let version = APP_VERSION.get().map(String::as_str).unwrap_or(crate::stores_jni::VERSION); + format!("{USER_AGENT_PRODUCT}/{version}") +} + +pub const CONNECT_TIMEOUT: Duration = Duration::from_secs(30); +pub const JSON_READ_TIMEOUT: Duration = Duration::from_secs(30); +pub const BYTES_READ_TIMEOUT: Duration = Duration::from_secs(120); +const WHOLE_REQUEST_CAP: Duration = Duration::from_secs(600); +const MAX_BODY: usize = 256 * 1024 * 1024; + +pub struct Call { + pub post: bool, + pub url: String, + pub user_agent: String, + pub headers: Vec<(String, String)>, + pub json_body: Option<String>, + pub read_timeout: Duration, +} + +impl Call { + pub fn get(url: &str, user_agent: String) -> Call { + Call { + post: false, + url: url.to_string(), + user_agent, + headers: Vec::new(), + json_body: None, + read_timeout: JSON_READ_TIMEOUT, + } + } + + pub fn post_json(url: &str, user_agent: String, body: &serde_json::Value) -> Call { + Call { post: true, json_body: Some(body.to_string()), ..Call::get(url, user_agent) } + } + + pub fn header(mut self, name: &str, value: &str) -> Call { + self.headers.push((name.to_string(), value.to_string())); + self + } + + pub fn read_timeout(mut self, timeout: Duration) -> Call { + self.read_timeout = timeout; + self + } +} + +pub struct Reply { + pub status: u16, + pub body: Vec<u8>, +} + +impl Reply { + pub fn ok(&self) -> bool { + (200..300).contains(&self.status) + } + + pub fn json(&self) -> Option<serde_json::Value> { + serde_json::from_slice(&self.body).ok() + } + + pub fn snippet(&self) -> String { + let text = String::from_utf8_lossy(&self.body[..self.body.len().min(200)]).into_owned(); + text.chars().map(|c| if c.is_control() { ' ' } else { c }).collect() + } +} + +pub fn send(call: Call) -> Result<Reply, String> { + let runtime = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .map_err(|e| format!("runtime: {e}"))?; + runtime.block_on(send_async(call)) +} + +async fn send_async(call: Call) -> Result<Reply, String> { + use reqwest::header::{ACCEPT, CONTENT_TYPE}; + let client = reqwest::Client::builder() + .user_agent(call.user_agent.as_str()) + .connect_timeout(CONNECT_TIMEOUT) + .read_timeout(call.read_timeout) + .timeout(WHOLE_REQUEST_CAP) + .build() + .map_err(|e| format!("http client: {}", e.without_url()))?; + let mut builder = if call.post { client.post(call.url.as_str()) } else { client.get(call.url.as_str()) }; + for (name, value) in &call.headers { + builder = builder.header(name.as_str(), value.as_str()); + } + if let Some(body) = call.json_body { + builder = builder.header(CONTENT_TYPE, "application/json").header(ACCEPT, "application/json").body(body); + } + let mut response = builder.send().await.map_err(describe)?; + let status = response.status().as_u16(); + let mut body = Vec::new(); + while let Some(piece) = response.chunk().await.map_err(describe)? { + if body.len() + piece.len() > MAX_BODY { + return Err("answer is too large".into()); + } + body.extend_from_slice(&piece); + } + Ok(Reply { status, body }) +} + +fn describe(err: reqwest::Error) -> String { + let kind = if err.is_timeout() { + "timed out" + } else if err.is_connect() { + "could not connect" + } else if err.is_body() || err.is_decode() { + "answer could not be read" + } else { + "request failed" + }; + format!("{kind}: {}", err.without_url()) +} + +const HEX_LOWER: &[u8; 16] = b"0123456789abcdef"; +const HEX_UPPER: &[u8; 16] = b"0123456789ABCDEF"; + +pub fn hex_lower(bytes: &[u8]) -> String { + bytes.iter().flat_map(|b| [HEX_LOWER[(b >> 4) as usize] as char, HEX_LOWER[(b & 15) as usize] as char]).collect() +} + +pub fn hex_upper(bytes: &[u8]) -> String { + bytes.iter().flat_map(|b| [HEX_UPPER[(b >> 4) as usize] as char, HEX_UPPER[(b & 15) as usize] as char]).collect() +} + +pub fn percent_encode(text: &str) -> String { + let mut out = String::with_capacity(text.len()); + for b in text.bytes() { + if b.is_ascii_alphanumeric() || matches!(b, b'-' | b'_' | b'.' | b'~') { + out.push(b as char); + } else { + out.push('%'); + out.push(HEX_UPPER[(b >> 4) as usize] as char); + out.push(HEX_UPPER[(b & 15) as usize] as char); + } + } + out +} + +pub fn percent_decode(text: &str) -> String { + fn nibble(b: u8) -> Option<u8> { + match b { + b'0'..=b'9' => Some(b - b'0'), + b'a'..=b'f' => Some(b - b'a' + 10), + b'A'..=b'F' => Some(b - b'A' + 10), + _ => None, + } + } + let bytes = text.as_bytes(); + let mut out = Vec::with_capacity(bytes.len()); + let mut i = 0; + while i < bytes.len() { + if bytes[i] == b'%' && i + 2 < bytes.len() { + if let (Some(h), Some(l)) = (nibble(bytes[i + 1]), nibble(bytes[i + 2])) { + out.push(h << 4 | l); + i += 3; + continue; + } + } + out.push(bytes[i]); + i += 1; + } + String::from_utf8_lossy(&out).into_owned() +} + +pub fn base64url(data: &[u8]) -> String { + const TABLE: &[u8; 64] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; + let mut out = String::with_capacity(data.len().div_ceil(3) * 4); + for group in data.chunks(3) { + let n = (group[0] as u32) << 16 | (*group.get(1).unwrap_or(&0) as u32) << 8 | *group.get(2).unwrap_or(&0) as u32; + out.push(TABLE[(n >> 18) as usize & 63] as char); + out.push(TABLE[(n >> 12) as usize & 63] as char); + if group.len() > 1 { + out.push(TABLE[(n >> 6) as usize & 63] as char); + } + if group.len() > 2 { + out.push(TABLE[n as usize & 63] as char); + } + } + out +} + +pub fn scrub_urls(line: &str) -> String { + let mut out = String::with_capacity(line.len()); + let mut rest = line; + loop { + let at = [rest.find("https://"), rest.find("http://")].into_iter().flatten().min(); + let Some(at) = at else { + out.push_str(rest); + return out; + }; + out.push_str(&rest[..at]); + let tail = &rest[at..]; + let end = tail.find(|c: char| c.is_whitespace() || matches!(c, ')' | '"' | '\'' | '>' | ',')).unwrap_or(tail.len()); + let url = &tail[..end]; + let cut = url.find(['?', '#']).unwrap_or(url.len()); + out.push_str(&url[..cut]); + rest = &tail[end..]; + } +} + +pub fn str_of<'v>(value: &'v serde_json::Value, key: &str) -> &'v str { + value.get(key).and_then(|v| v.as_str()).unwrap_or("") +} + +pub fn str_at<'v>(value: &'v serde_json::Value, path: &[&str]) -> &'v str { + let mut v = value; + for key in path { + match v.get(key) { + Some(next) => v = next, + None => return "", + } + } + v.as_str().unwrap_or("") +} + +pub fn now_ms() -> i64 { + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map(|d| d.as_millis() as i64) + .unwrap_or(0) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn hex_both_cases() { + assert_eq!(hex_lower(&[0x00, 0xab, 0x7f]), "00ab7f"); + assert_eq!(hex_upper(&[0x00, 0xab, 0x7f]), "00AB7F"); + } + + #[test] + fn percent_round_trip() { + assert_eq!(percent_encode("device:ab/c d"), "device%3Aab%2Fc%20d"); + assert_eq!(percent_decode("a%3Ab%2fc+d"), "a:b/c+d"); + assert_eq!(percent_decode("bad%zzend%4"), "bad%zzend%4"); + assert_eq!(percent_decode("%41"), "A"); + } + + #[test] + fn base64url_vectors() { + assert_eq!(base64url(b""), ""); + assert_eq!(base64url(b"f"), "Zg"); + assert_eq!(base64url(b"fo"), "Zm8"); + assert_eq!(base64url(b"foo"), "Zm9v"); + assert_eq!(base64url(&[0xfb, 0xff]), "-_8"); + } + + #[test] + fn urls_lose_their_query_in_logs() { + assert_eq!( + scrub_urls("GET https://cdn.example/x/files/ab?sig=SECRET&e=1 failed (https://a.b/c#frag)"), + "GET https://cdn.example/x/files/ab failed (https://a.b/c)" + ); + assert_eq!(scrub_urls("no url here"), "no url here"); + } + + #[test] + fn nested_strings() { + let v = serde_json::json!({"a":{"b":{"c":"x"}},"n":1}); + assert_eq!(str_at(&v, &["a", "b", "c"]), "x"); + assert_eq!(str_at(&v, &["a", "z"]), ""); + assert_eq!(str_of(&v, "n"), ""); + } + + #[test] + fn product_user_agent() { + assert!(user_agent().starts_with("DroidDeck/")); + } +} diff --git a/app/src/main/rust/stores/src/amazon/proto.rs b/app/src/main/rust/stores/src/amazon/proto.rs new file mode 100644 index 0000000000..60712d9e0a --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/proto.rs @@ -0,0 +1,155 @@ +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Value<'a> { + Varint(u64), + Fixed64(u64), + Bytes(&'a [u8]), + Fixed32(u32), +} + +pub struct Fields<'a> { + data: &'a [u8], + pos: usize, +} + +impl<'a> Fields<'a> { + pub fn new(data: &'a [u8]) -> Self { + Fields { data, pos: 0 } + } + + fn varint(&mut self) -> Result<u64, String> { + let mut value = 0u64; + for i in 0..10 { + let Some(&b) = self.data.get(self.pos) else { + return Err("a number runs past the end of the message".into()); + }; + self.pos += 1; + if i == 9 && b > 1 { + return Err("a number is longer than 64 bits".into()); + } + value |= ((b & 0x7f) as u64) << (7 * i); + if b & 0x80 == 0 { + return Ok(value); + } + } + Err("a number is longer than 10 bytes".into()) + } + + fn take(&mut self, n: u64) -> Result<&'a [u8], String> { + let left = (self.data.len() - self.pos) as u64; + if n > left { + return Err(format!("a field of {n} bytes runs past the end of the message ({left} left)")); + } + let start = self.pos; + self.pos += n as usize; + Ok(&self.data[start..self.pos]) + } + + pub fn next_field(&mut self) -> Result<Option<(u32, Value<'a>)>, String> { + if self.pos >= self.data.len() { + return Ok(None); + } + let key = self.varint()?; + let field = key >> 3; + if field == 0 || field > u32::MAX as u64 { + return Err(format!("invalid field number {field}")); + } + let value = match key & 7 { + 0 => Value::Varint(self.varint()?), + 1 => { + let b = self.take(8)?; + Value::Fixed64(u64::from_le_bytes(b.try_into().expect("8 bytes"))) + } + 2 => { + let n = self.varint()?; + Value::Bytes(self.take(n)?) + } + 5 => { + let b = self.take(4)?; + Value::Fixed32(u32::from_le_bytes(b.try_into().expect("4 bytes"))) + } + other => return Err(format!("unsupported wire type {other} for field {field}")), + }; + Ok(Some((field as u32, value))) + } +} + +#[cfg(test)] +pub mod write { + pub fn varint(out: &mut Vec<u8>, mut v: u64) { + loop { + let b = (v & 0x7f) as u8; + v >>= 7; + if v == 0 { + out.push(b); + return; + } + out.push(b | 0x80); + } + } + + pub fn key(out: &mut Vec<u8>, field: u32, wire: u8) { + varint(out, (field as u64) << 3 | wire as u64); + } + + pub fn uint(out: &mut Vec<u8>, field: u32, v: u64) { + key(out, field, 0); + varint(out, v); + } + + pub fn bytes(out: &mut Vec<u8>, field: u32, data: &[u8]) { + key(out, field, 2); + varint(out, data.len() as u64); + out.extend_from_slice(data); + } +} + +#[cfg(test)] +mod tests { + use super::write; + use super::*; + + fn all(data: &[u8]) -> Result<Vec<(u32, Value<'_>)>, String> { + let mut f = Fields::new(data); + let mut out = Vec::new(); + while let Some(x) = f.next_field()? { + out.push(x); + } + Ok(out) + } + + #[test] + fn reads_every_supported_wire_type() { + let mut m = Vec::new(); + write::uint(&mut m, 1, 300); + write::key(&mut m, 2, 1); + m.extend_from_slice(&7u64.to_le_bytes()); + write::bytes(&mut m, 3, b"hi"); + write::key(&mut m, 4, 5); + m.extend_from_slice(&9u32.to_le_bytes()); + write::uint(&mut m, 5, u64::MAX); + let got = all(&m).unwrap(); + assert_eq!( + got, + vec![ + (1, Value::Varint(300)), + (2, Value::Fixed64(7)), + (3, Value::Bytes(b"hi")), + (4, Value::Fixed32(9)), + (5, Value::Varint(u64::MAX)), + ] + ); + } + + #[test] + fn malformed_messages_are_errors() { + assert!(all(&[0x0a, 0x05, b'a']).is_err()); + assert!(all(&[0x08, 0xff, 0xff]).is_err()); + assert!(all(&[0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01]).is_err()); + assert!(all(&[0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02]).is_err()); + assert!(all(&[0x0b]).is_err()); + assert!(all(&[0x0f]).is_err()); + assert!(all(&[0x00, 0x01]).is_err()); + assert!(all(&[0x0d, 1, 2]).is_err()); + assert_eq!(all(&[]).unwrap(), vec![]); + } +} diff --git a/app/src/main/rust/stores/src/amazon/service.rs b/app/src/main/rust/stores/src/amazon/service.rs new file mode 100644 index 0000000000..b009e0aece --- /dev/null +++ b/app/src/main/rust/stores/src/amazon/service.rs @@ -0,0 +1,150 @@ +use std::path::Path; + +use serde_json::{json, Value}; + +use super::auth::{self, Attempt}; +use super::distribution::{self, Failure}; +use super::net::str_of; +use super::{cdn, install, launch, library, manifest}; + +fn error(message: impl Into<String>) -> Value { + json!({ "error": message.into() }) +} + +pub fn call(op: &str, request: &str) -> String { + let req: Value = serde_json::from_str(request).unwrap_or(Value::Null); + dispatch(op, &req).to_string() +} + +fn dispatch(op: &str, req: &Value) -> Value { + let token = str_of(req, "accessToken"); + match op { + "auth.start" => match Attempt::new() { + Ok(a) => json!({ + "startUrl": a.start_url(), + "userAgent": super::net::BROWSER_USER_AGENT, + "redirectMarker": auth::REDIRECT_MARKER, + "serial": a.serial, + "clientId": a.client_id, + "verifier": a.verifier, + }), + Err(e) => error(e), + }, + "auth.register" => { + let code = match str_of(req, "code") { + "" => auth::code_from_url(str_of(req, "url")), + c => Some(c.to_string()), + }; + let Some(code) = code else { + return json!({ "error": "the sign-in page returned no code", "noCode": true }); + }; + let attempt = Attempt { + serial: str_of(req, "serial").to_string(), + client_id: str_of(req, "clientId").to_string(), + verifier: str_of(req, "verifier").to_string(), + }; + if attempt.serial.is_empty() || attempt.client_id.is_empty() || attempt.verifier.is_empty() { + return error("the sign-in attempt is incomplete"); + } + match auth::register(&code, &attempt) { + Ok(r) => r.to_json(), + Err(e) => error(e), + } + } + "auth.refresh" => match auth::refresh(str_of(req, "refreshToken")) { + Ok((access, expires_at)) => json!({ "access_token": access, "expires_at": expires_at }), + Err(e) => error(e), + }, + "auth.deregister" => match auth::deregister(token) { + Ok(()) => json!({}), + Err(e) => error(e), + }, + "library.entitlements" => match library::list(token, str_of(req, "deviceSerial")) { + Ok(all) => { + let total = all.len(); + let games = library::visible(all); + json!({ "total": total, "games": games.iter().map(library::Game::to_json).collect::<Vec<_>>() }) + } + Err(Failure::SignIn) => json!({ "error": "Amazon refused the session", "signIn": true }), + Err(Failure::Other(e)) => error(e), + }, + "download.lookup" => match distribution::game_download(token, str_of(req, "entitlementId")) { + Ok(d) => json!({ "downloadUrl": d.base_url, "versionId": d.version_id }), + Err(f) => error(f.message()), + }, + "download.size" => json!({ "bytes": install::size_of(token, str_of(req, "entitlementId")) }), + "launch.spec" => { + let dir = str_of(req, "gameDir"); + if dir.is_empty() { + return error("no install folder"); + } + let spec = launch::launch_spec(Path::new(dir), str_of(req, "title")); + json!({ "exe": spec.exe, "args": spec.args, "source": spec.source, "warning": spec.warning }) + } + "launch.env" => { + let env = launch::fuel_environment(str_of(req, "entitlementId"), str_of(req, "sku"), str_of(req, "displayName")); + json!({ "env": env.iter().map(|(k, v)| json!([k, v])).collect::<Vec<_>>() }) + } + _ => error(format!("unknown operation {op}")), + } +} + +pub fn fetch(op: &str, request: &str) -> Option<Vec<u8>> { + let req: Value = serde_json::from_str(request).ok()?; + match op { + "cdn.get" => { + let url = str_of(&req, "url"); + if url.is_empty() { + return None; + } + cdn::get(url, Some(str_of(&req, "accessToken"))).ok() + } + _ => None, + } +} + +pub fn inspect(bytes: &[u8], _request: &str) -> String { + match manifest::parse(bytes) { + Ok(m) => json!({ "totalBytes": m.total_size(), "files": m.files.len() }).to_string(), + Err(e) => error(e).to_string(), + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::amazon::codec::testing::frame; + use crate::amazon::manifest::testing::{message, Entry}; + + #[test] + fn local_operations() { + let v: Value = serde_json::from_str(&call("auth.start", "{}")).unwrap(); + assert!(v["startUrl"].as_str().unwrap().starts_with("https://www.amazon.com/ap/signin?")); + assert_eq!(v["redirectMarker"], "openid.oa2.authorization_code="); + assert!(v["userAgent"].as_str().unwrap().contains("Firefox")); + assert_eq!(v["serial"].as_str().unwrap().len(), 32); + let v: Value = serde_json::from_str(&call("auth.register", r#"{"url":"https://www.amazon.com/?a=1"}"#)).unwrap(); + assert_eq!(v["noCode"], true); + let v: Value = serde_json::from_str(&call("auth.register", r#"{"code":"c"}"#)).unwrap(); + assert!(v["error"].is_string() && v.get("noCode").is_none()); + let v: Value = serde_json::from_str(&call("launch.env", r#"{"entitlementId":"e","sku":"s","displayName":""}"#)).unwrap(); + assert_eq!(v["env"][2], json!(["AMAZON_GAMES_FUEL_ENTITLEMENT_ID", "e"])); + assert_eq!(v["env"][4][1], "Player"); + let v: Value = serde_json::from_str(&call("nope", "{}")).unwrap(); + assert!(v["error"].is_string()); + assert!(fetch("cdn.get", "{}").is_none()); + } + + #[test] + fn inspect_sizes() { + let msg = message(&[vec![ + Entry { path: "a", size: 10, algorithm: Some(0), digest: &[1; 32] }, + Entry { path: "b\\c", size: 5, algorithm: Some(0), digest: &[2; 32] }, + ]]); + let v: Value = serde_json::from_str(&inspect(&frame(&msg, b"", true), "{}")).unwrap(); + assert_eq!(v["totalBytes"], 15); + assert_eq!(v["files"], 2); + let v: Value = serde_json::from_str(&inspect(b"xx", "{}")).unwrap(); + assert!(v["error"].is_string()); + } +} diff --git a/app/src/main/rust/stores/src/epic.rs b/app/src/main/rust/stores/src/epic.rs deleted file mode 100644 index 258c273b96..0000000000 --- a/app/src/main/rust/stores/src/epic.rs +++ /dev/null @@ -1,46 +0,0 @@ -//! Epic Games Store download adapter for the shared fetch core (`crate::fetch_core`). -//! -//! Scope = the chunk-fetch inner loop of `EpicDownloadManager.java` (the fixed 8-thread pool that -//! fills `<installDir>/.chunks/<GUID>`), nothing more. The Java manager still parses the manifest -//! API JSON, downloads the manifest, selects files (install tags), runs the delta/verify pass, -//! assembles files from the chunk cache and does every post-install step. The adapter re-parses -//! the same manifest bytes, rebuilds the same chunk plan for the pending files Java hands it, -//! skips chunks already in the cache and writes verified chunks with the same `.part` + rename -//! protocol, so the on-disk state is identical whichever engine ran (see -//! Bannerlator's `docs/RUST_EPIC_PARITY.md` for the rule-by-rule table). -//! -//! Submodules: -//! - [`manifest`] — ChunksV4 binary manifest + legacy JSON manifest parsers (1:1 with the Java -//! `parseManifest` / `parseJsonManifest`). -//! - [`plan`] — install-tag selection, unique-chunk plan, chunk paths / CDN URLs. -//! - [`chunk`] — chunk header parse, zlib inflate, SHA-1 verify, cache write. -//! - [`driver`] — plan → `FetchItem`s → `fetch_core::run_fetch` with the chunk-cache sink. -//! - [`assemble`] — the files from the cache, one sequential write each, SHA-1 checked as they -//! are written; with a scratch cache (one the caller placed apart from the install) each chunk -//! is deleted as soon as the last file that uses it is done. -//! - [`jni`] — `Java_com_droiddeck_launcher_stores_epic_EpicNative_native*` exports. -//! -//! The selective-install-tag, delta/resume and chunk verification rules mirrored here were ported -//! into the Java manager from GameNative (`service/epic/EpicDownloadManager.kt`, -//! `manifest/ManifestUtils.kt`), itself derived from Legendary; both are GPL-3.0 and this crate -//! carries the same licence (see `Cargo.toml`). - -pub mod assemble; -pub mod chunk; -pub mod driver; -pub mod jni; -pub mod manifest; -pub mod plan; - -/// User-Agent the Java manager sends on every chunk request (`EpicDownloadManager.UA`). -pub const USER_AGENT: &str = - "UELauncher/11.0.1-14907503+++Portal+Release-Live Windows/10.0.19041.1.256.64bit"; - -/// Name of the chunk cache directory under the install dir (`new File(installDir, ".chunks")`). -pub const CHUNK_CACHE_DIR: &str = ".chunks"; - -/// Fixed pool width of the Java chunk downloader (`Executors.newFixedThreadPool(8)`). -pub const JAVA_POOL_THREADS: usize = 8; - -/// logcat tag for every engine line (the Kotlin manager mirrors it into its own debug log). -pub const LOG_TAG: &str = "EpicNative"; diff --git a/app/src/main/rust/stores/src/epic/account.rs b/app/src/main/rust/stores/src/epic/account.rs new file mode 100644 index 0000000000..81fe89d812 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/account.rs @@ -0,0 +1,167 @@ +use serde_json::{json, Value}; + +use super::net::{self, Body, Request}; + +pub const CLIENT_ID: &str = "34a02cf8f4414e29b15921876da36f9a"; +pub const CLIENT_SECRET: &str = "daafbccc737745039dffe53d94fc76cf"; +const ACCOUNT_HOST: &str = "https://account-public-service-prod03.ol.epicgames.com"; + +pub const REDIRECT_PREFIX: &str = "https://www.epicgames.com/id/api/redirect"; + +pub const WEBVIEW_USER_AGENT: &str = + "UELauncher/11.0.1-14907503+++Portal+Release-Live Windows/10.0.19041.1.256.64bit"; + +const DEFAULT_EXPIRES_IN: i64 = 7200; + +pub fn start_url() -> String { + let redirect = format!("{REDIRECT_PREFIX}?clientId={CLIENT_ID}&responseType=code"); + format!("https://www.epicgames.com/id/login?redirectUrl={}", net::percent_encode(&redirect)) +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Tokens { + pub access_token: String, + pub refresh_token: Option<String>, + pub account_id: Option<String>, + pub display_name: Option<String>, + pub expires_at_ms: i64, +} + +impl Tokens { + pub fn to_json(&self) -> Value { + let mut out = json!({ "access_token": self.access_token, "expires_at": self.expires_at_ms }); + if let Some(v) = &self.refresh_token { + out["refresh_token"] = json!(v); + } + if let Some(v) = &self.account_id { + out["account_id"] = json!(v); + } + if let Some(v) = &self.display_name { + out["display_name"] = json!(v); + } + out + } +} + +fn non_empty(v: &Value, key: &str) -> Option<String> { + Some(net::str_of(v, key).to_string()).filter(|s| !s.is_empty()) +} + +pub fn parse_token_reply(body: &Value, now_ms: i64) -> Option<Tokens> { + let access_token = non_empty(body, "access_token")?; + let from_date = body + .get("expires_at") + .and_then(|v| v.as_str()) + .and_then(super::timefmt::utc_prefix_seconds) + .map(|s| s * 1000); + let expires_at_ms = from_date.unwrap_or_else(|| { + let secs = body.get("expires_in").and_then(|v| v.as_i64()).unwrap_or(DEFAULT_EXPIRES_IN); + now_ms + secs * 1000 + }); + Some(Tokens { + access_token, + refresh_token: non_empty(body, "refresh_token"), + account_id: non_empty(body, "account_id"), + display_name: non_empty(body, "displayName"), + expires_at_ms, + }) +} + +fn now_ms() -> i64 { + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map(|d| d.as_millis() as i64) + .unwrap_or(0) +} + +fn token_request(grant: &[(&str, &str)]) -> Result<Tokens, String> { + let url = format!("{ACCOUNT_HOST}/account/api/oauth/token"); + let mut form: Vec<(String, String)> = grant.iter().map(|(k, v)| (k.to_string(), v.to_string())).collect(); + form.push(("token_type".into(), "eg1".into())); + let reply = net::send(Request::post(&url, Body::Form(form)).basic(CLIENT_ID, CLIENT_SECRET))?; + if !reply.ok() { + return Err(format!("token request answered HTTP {}", reply.status)); + } + let body = reply.json().ok_or("token answer is not JSON")?; + parse_token_reply(&body, now_ms()).ok_or_else(|| "token answer has no access token".into()) +} + +pub fn sign_in_with_code(code: &str) -> Result<Tokens, String> { + token_request(&[("grant_type", "authorization_code"), ("code", code)]) +} + +pub fn refresh(refresh_token: &str) -> Result<Tokens, String> { + token_request(&[("grant_type", "refresh_token"), ("refresh_token", refresh_token)]) +} + +pub fn exchange_code(access_token: &str) -> Result<String, String> { + let url = format!("{ACCOUNT_HOST}/account/api/oauth/exchange"); + let reply = net::send(Request::get(&url).bearer(access_token))?; + if !reply.ok() { + return Err(format!("exchange answered HTTP {}", reply.status)); + } + let body = reply.json().ok_or("exchange answer is not JSON")?; + non_empty(&body, "code").ok_or_else(|| "exchange answer has no code".into()) +} + +pub fn code_from_page_text(raw: &str) -> Option<String> { + let mut text = raw.trim(); + if text.len() >= 2 && text.starts_with('"') && text.ends_with('"') { + text = &text[1..text.len() - 1]; + } + let text = text.replace("\\n", "").replace("\\r", "").replace("\\\"", "\""); + let key = "\"authorizationCode\""; + let mut from = 0; + while let Some(at) = text[from..].find(key) { + let rest = text[from + at + key.len()..].trim_start(); + from += at + key.len(); + let Some(rest) = rest.strip_prefix(':') else { continue }; + let Some(rest) = rest.trim_start().strip_prefix('"') else { continue }; + let Some(end) = rest.find('"') else { continue }; + let value = &rest[..end]; + if !value.is_empty() { + return Some(value.to_string()); + } + } + None +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn start_url_wraps_the_redirect() { + assert_eq!( + start_url(), + "https://www.epicgames.com/id/login?redirectUrl=https%3A%2F%2Fwww.epicgames.com%2Fid%2Fapi%2Fredirect%3FclientId%3D34a02cf8f4414e29b15921876da36f9a%26responseType%3Dcode" + ); + } + + #[test] + fn code_from_the_redirect_page() { + let page = r#""{\"warning\":\"x\",\"redirectUrl\":\"https://localhost/launcher/authorized?code=abc\",\"authorizationCode\":\"0123abcd\",\"exchangeCode\":null,\"sid\":null}\n""#; + assert_eq!(code_from_page_text(page).as_deref(), Some("0123abcd")); + assert_eq!(code_from_page_text(r#"{"authorizationCode": "zz"}"#).as_deref(), Some("zz")); + assert_eq!(code_from_page_text(r#"{"authorizationCode":null}"#), None); + assert_eq!(code_from_page_text(r#"{"authorizationCode":""}"#), None); + assert_eq!(code_from_page_text("<html>sign in</html>"), None); + } + + #[test] + fn token_answers() { + let t = parse_token_reply( + &json!({"access_token":"A","refresh_token":"R","account_id":"acc","displayName":"Me","expires_at":"2026-10-13T12:34:56.789Z","expires_in":7200}), + 0, + ) + .unwrap(); + assert_eq!(t.expires_at_ms, 1_791_894_896_000); + assert_eq!(t.display_name.as_deref(), Some("Me")); + let fallback = parse_token_reply(&json!({"access_token":"A","expires_in":60}), 1000).unwrap(); + assert_eq!(fallback.expires_at_ms, 61_000); + assert_eq!(fallback.refresh_token, None); + let default = parse_token_reply(&json!({"access_token":"A","expires_at":"soon"}), 0).unwrap(); + assert_eq!(default.expires_at_ms, 7_200_000); + assert!(parse_token_reply(&json!({"refresh_token":"R"}), 0).is_none()); + } +} diff --git a/app/src/main/rust/stores/src/epic/achievements.rs b/app/src/main/rust/stores/src/epic/achievements.rs new file mode 100644 index 0000000000..e934a0a5a4 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/achievements.rs @@ -0,0 +1,127 @@ +use std::collections::HashMap; + +use serde_json::{json, Value}; + +use super::net::{self, Body, Request}; + +const GRAPHQL_URL: &str = "https://launcher.store.epicgames.com/graphql"; + +const DEFINITIONS_QUERY: &str = "query Achievement($sandboxId: String!, $locale: String!) { \ +Achievement { productAchievementsRecordBySandbox(sandboxId: $sandboxId, locale: $locale) { \ +achievements { achievement { name hidden unlockedDisplayName lockedDisplayName \ +unlockedDescription lockedDescription unlockedIconLink lockedIconLink XP } } } } }"; + +const PROGRESS_QUERY: &str = "query PlayerAchievement($epicAccountId: String!, $sandboxId: String!) { \ +PlayerAchievement { playerAchievementGameRecordsBySandbox(epicAccountId: $epicAccountId, sandboxId: $sandboxId) { \ +records { playerAchievements { playerAchievement { achievementName unlocked unlockDate XP } } } } } }"; + +fn ask(access_token: &str, query: &str, variables: Value) -> Option<Value> { + let body = json!({ "query": query, "variables": variables }).to_string(); + let reply = net::send(Request::post(GRAPHQL_URL, Body::Json(body)) + .agent(net::EPIC_LAUNCHER_USER_AGENT) + .bearer(access_token)).ok()?; + if !reply.ok() { + return None; + } + reply.json() +} + +pub fn unlocks_of(answer: &Value) -> HashMap<String, i64> { + let mut out = HashMap::new(); + let records = answer + .pointer("/data/PlayerAchievement/playerAchievementGameRecordsBySandbox/records") + .and_then(|r| r.as_array()); + for record in records.into_iter().flatten() { + let list = record.get("playerAchievements").and_then(|p| p.as_array()); + for entry in list.into_iter().flatten() { + let Some(a) = entry.get("playerAchievement") else { continue }; + if a.get("unlocked").and_then(|u| u.as_bool()) != Some(true) { + continue; + } + let name = net::str_of(a, "achievementName"); + if !name.is_empty() { + let at = super::timefmt::iso_seconds(net::str_of(a, "unlockDate")).unwrap_or(0); + out.insert(name.to_string(), at); + } + } + } + out +} + +pub fn merge(definitions: &Value, unlocks: &HashMap<String, i64>) -> Vec<Value> { + let list = definitions + .pointer("/data/Achievement/productAchievementsRecordBySandbox/achievements") + .and_then(|a| a.as_array()); + let mut out = Vec::new(); + for entry in list.into_iter().flatten() { + let Some(a) = entry.get("achievement") else { continue }; + let id = net::str_of(a, "name"); + if id.is_empty() { + continue; + } + let unlocked_at = unlocks.get(id).copied(); + let unlocked = unlocked_at.is_some(); + let pick = |when_unlocked: &str, when_locked: &str| { + let first = net::str_of(a, if unlocked { when_unlocked } else { when_locked }); + if !first.is_empty() { first.to_string() } else { net::str_of(a, when_unlocked).to_string() } + }; + let name = Some(pick("unlockedDisplayName", "lockedDisplayName")).filter(|n| !n.is_empty()).unwrap_or_else(|| id.to_string()); + out.push(json!({ + "id": id, + "name": name, + "description": pick("unlockedDescription", "lockedDescription"), + "hidden": a.get("hidden").and_then(|h| h.as_bool()).unwrap_or(false), + "unlocked": unlocked, + "unlockedAt": unlocked_at.unwrap_or(0), + "icon": net::str_of(a, "unlockedIconLink"), + "iconLocked": net::str_of(a, "lockedIconLink"), + })); + } + out +} + +pub fn fetch(access_token: &str, namespace: &str, account_id: &str, locale: &str) -> Option<Vec<Value>> { + let definitions = ask(access_token, DEFINITIONS_QUERY, json!({ "sandboxId": namespace, "locale": locale }))?; + let unlocks = if account_id.is_empty() { + HashMap::new() + } else { + let progress = ask( + access_token, + PROGRESS_QUERY, + json!({ "epicAccountId": account_id, "sandboxId": namespace }), + )?; + unlocks_of(&progress) + }; + Some(merge(&definitions, &unlocks)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn definitions_and_unlocks_merge() { + let defs = json!({"data": {"Achievement": {"productAchievementsRecordBySandbox": {"achievements": [ + {"achievement": {"name": "a1", "hidden": false, "unlockedDisplayName": "Won", "lockedDisplayName": "???", + "unlockedDescription": "You won", "lockedDescription": "", "unlockedIconLink": "u", "lockedIconLink": "l"}}, + {"achievement": {"name": "a2", "hidden": true, "unlockedDisplayName": "Secret", "lockedDisplayName": "", + "unlockedDescription": "", "lockedDescription": "", "unlockedIconLink": "", "lockedIconLink": ""}}, + {"achievement": {"name": ""}} + ]}}}}); + let progress = json!({"data": {"PlayerAchievement": {"playerAchievementGameRecordsBySandbox": {"records": [ + {"playerAchievements": [ + {"playerAchievement": {"achievementName": "a1", "unlocked": true, "unlockDate": "2024-05-01T12:00:00.000+0200"}}, + {"playerAchievement": {"achievementName": "a2", "unlocked": false, "unlockDate": ""}} + ]} + ]}}}}); + let list = merge(&defs, &unlocks_of(&progress)); + assert_eq!(list.len(), 2); + assert_eq!(list[0]["unlocked"], true); + assert_eq!(list[0]["name"], "Won"); + assert_eq!(list[0]["unlockedAt"], 1_714_557_600); + assert_eq!(list[1]["unlocked"], false); + assert_eq!(list[1]["name"], "Secret"); + assert_eq!(list[1]["hidden"], true); + assert!(merge(&json!({"data": null}), &HashMap::new()).is_empty()); + } +} diff --git a/app/src/main/rust/stores/src/epic/assemble.rs b/app/src/main/rust/stores/src/epic/assemble.rs deleted file mode 100644 index 580cb8c241..0000000000 --- a/app/src/main/rust/stores/src/epic/assemble.rs +++ /dev/null @@ -1,525 +0,0 @@ -//! Files from the chunk cache: the last stage of an Epic install, as a native run. -//! -//! The Kotlin manager's own loop does this too (`EpicDownloadManager.install`, after the chunk -//! fetch): for every pending file, open it, and for every part read the cached chunk and write -//! `chunk[offset..offset+size]`. This module does the same thing, in the same order, with the -//! same wording on a missing chunk, plus what the Kotlin loop cannot do without re-reading the -//! finished file from a slow card: -//! -//! - the file's SHA-1 is computed from the bytes as they are written (no extra I/O) and compared -//! with the manifest's, when the manifest has one; a mismatch deletes the file and fails the -//! run, so a bad assembly can never pass the next delta pass by size alone; -//! - with a scratch cache — one the caller placed apart from the install directory — every chunk -//! is reference-counted across the pending files and deleted the moment the last file that -//! needs it is written and verified, so the cache never holds more than what is still owed. -//! -//! The cache directory itself goes at the end of a successful run, scratch or not, which is what -//! the Kotlin loop does with `<installDir>/.chunks`. Cancellation and failure leave the cache -//! exactly as it stands, so the next run's delta pass skips the finished files and the fetch -//! skips the chunks still cached — on either engine. -//! -//! Why the cache may live elsewhere at all: an install to an SD card wrote every byte twice to -//! the card (chunk cache, then assembled file). With the cache on internal storage the card sees -//! each byte once, and the fetchers stop waiting on the card's write speed. - -use std::collections::HashMap; -use std::fs::{self, File}; -use std::io::{BufWriter, Write}; -use std::path::{Path, PathBuf}; -use std::sync::atomic::{AtomicBool, Ordering}; - -use sha1::{Digest, Sha1}; - -use super::manifest::{parse_manifest, FileInfo, Manifest}; -use super::plan::resolve_cache_dir; - -/// Everything the JNI layer hands over for one assembly run. -pub struct AssembleRequest { - pub manifest_bytes: Vec<u8>, - pub install_dir: String, - /// `""` = `<installDir>/.chunks` (no scratch semantics); anything else = scratch cache. - pub chunk_cache_dir: String, - /// Indices into `manifest.files` of the files to assemble, in order. - pub file_indices: Vec<usize>, -} - -/// Terminal result of an assembly run. -#[derive(Clone, Debug, Default)] -pub struct AssembleOutcome { - pub success: bool, - pub cancelled: bool, - pub error: String, - /// Bytes written into assembled files this run. - pub bytes_written: u64, - pub files_done: u64, - pub files_total: u64, - pub bytes_total: u64, - /// Chunk files deleted early because no remaining file needed them (scratch cache only). - pub chunks_removed: u64, -} - -/// The parsed plan: manifest, the files to write, and how many of them still need each chunk. -/// Built up front so a bad index fails before anything is written. -#[derive(Debug)] -pub struct AssemblePlan { - pub manifest: Manifest, - pub install_dir: PathBuf, - pub cache_dir: PathBuf, - pub scratch_cache: bool, - pub files: Vec<usize>, - pub bytes_total: u64, - /// GUID → number of files in `files` whose parts reference it (a file counts once per GUID, - /// however many of its parts use the chunk). - pub refs: HashMap<String, u32>, -} - -/// Parse + plan. `Err` = nothing was written. -pub fn build_assemble_plan(req: &AssembleRequest) -> Result<AssemblePlan, String> { - if req.install_dir.is_empty() { - return Err("assemble: empty install dir".to_string()); - } - let manifest = parse_manifest(&req.manifest_bytes).map_err(|e| format!("assemble: {e}"))?; - for &i in &req.file_indices { - if i >= manifest.files.len() { - return Err(format!( - "assemble: file index {i} out of range ({} files)", - manifest.files.len() - )); - } - } - let refs = chunk_refs(&manifest, &req.file_indices); - let bytes_total = req - .file_indices - .iter() - .map(|&i| manifest.files[i].file_size()) - .sum(); - Ok(AssemblePlan { - install_dir: PathBuf::from(&req.install_dir), - cache_dir: resolve_cache_dir(&req.install_dir, &req.chunk_cache_dir), - scratch_cache: !req.chunk_cache_dir.is_empty(), - files: req.file_indices.clone(), - bytes_total, - refs, - manifest, - }) -} - -/// How many of `file_indices` reference each chunk GUID. -pub fn chunk_refs(m: &Manifest, file_indices: &[usize]) -> HashMap<String, u32> { - let mut refs: HashMap<String, u32> = HashMap::new(); - for &fi in file_indices { - let Some(f) = m.files.get(fi) else { - continue; - }; - for g in distinct_guids(f) { - *refs.entry(g).or_insert(0) += 1; - } - } - refs -} - -/// The GUIDs a file's parts reference, each once, in first-seen order. -fn distinct_guids(f: &FileInfo) -> Vec<String> { - let mut out: Vec<String> = Vec::with_capacity(f.parts.len()); - for p in &f.parts { - let g = p.guid_str(); - if !out.contains(&g) { - out.push(g); - } - } - out -} - -/// The manifest's relative path with Windows separators normalised, as the Kotlin loop does -/// (`filename.replace("\\", "/")`). -pub fn relative_path(f: &FileInfo) -> String { - f.filename.replace('\\', "/") -} - -/// A manifest SHA-1 that is all zero means "none" (the Kotlin delta pass treats it the same way). -fn expected_sha1(f: &FileInfo) -> Option<&[u8; 20]> { - f.sha1.as_ref().filter(|h| h.iter().any(|&b| b != 0)) -} - -/// Chunk bytes, read whole, with the last chunk kept: consecutive parts of one file usually come -/// from the same chunk, and a file's parts are the only place a chunk is read. -struct ChunkReader { - cache_dir: PathBuf, - last: Option<(String, Vec<u8>)>, -} - -impl ChunkReader { - fn read(&mut self, guid: &str, rel_path: &str) -> Result<&[u8], String> { - if self.last.as_ref().map(|(g, _)| g.as_str()) != Some(guid) { - let path = self.cache_dir.join(guid); - if !path.exists() { - return Err(format!("Missing chunk {guid} for {rel_path}")); - } - let data = fs::read(&path).map_err(|e| format!("read chunk {guid}: {e}"))?; - self.last = Some((guid.to_string(), data)); - } - Ok(self.last.as_ref().map(|(_, d)| d.as_slice()).unwrap_or(&[])) - } - - /// Drop the kept copy of a chunk that is about to be deleted. - fn forget(&mut self, guid: &str) { - if self.last.as_ref().map(|(g, _)| g.as_str()) == Some(guid) { - self.last = None; - } - } -} - -/// Write one file from the cache. Returns the bytes written. The output is removed on any error, -/// so a file only ever exists complete (and, when the manifest hashes it, verified) or not at all. -fn write_file(reader: &mut ChunkReader, f: &FileInfo, out_path: &Path) -> Result<u64, String> { - let rel_path = relative_path(f); - if let Some(parent) = out_path.parent() { - fs::create_dir_all(parent).map_err(|e| format!("mkdirs {}: {e}", parent.display()))?; - } - let result = (|| { - let file = File::create(out_path).map_err(|e| format!("create {rel_path}: {e}"))?; - let mut out = BufWriter::with_capacity(1024 * 1024, file); - let mut sha = expected_sha1(f).map(|_| Sha1::new()); - let mut written: u64 = 0; - for part in &f.parts { - let guid = part.guid_str(); - let data = reader.read(&guid, &rel_path)?; - let start = usize::try_from(part.offset).map_err(|_| { - format!("Chunk {guid} part offset {} invalid for {rel_path}", part.offset) - })?; - let len = part.size as u32 as usize; - let end = start - .checked_add(len) - .filter(|&e| e <= data.len()) - .ok_or_else(|| { - format!( - "Chunk {guid} too short for {rel_path}: need {start}+{len}, have {}", - data.len() - ) - })?; - let slice = &data[start..end]; - out.write_all(slice).map_err(|e| format!("write {rel_path}: {e}"))?; - if let Some(sha) = sha.as_mut() { - sha.update(slice); - } - written += len as u64; - } - out.flush().map_err(|e| format!("flush {rel_path}: {e}"))?; - drop(out); - if let (Some(expected), Some(sha)) = (expected_sha1(f), sha) { - if sha.finalize().as_slice() != &expected[..] { - return Err(format!("SHA-1 mismatch for {rel_path}")); - } - } - Ok(written) - })(); - if result.is_err() { - let _ = fs::remove_file(out_path); - } - result -} - -/// Run the plan. `progress(bytes_done, bytes_total, files_done, files_total)` fires after every -/// file; `log` receives the start line, failures and the terminal summary. -pub fn run_assemble( - plan: &AssemblePlan, - cancel: &AtomicBool, - progress: &(dyn Fn(u64, u64, u64, u64) + Sync), - log: &(dyn Fn(&str) + Sync), -) -> AssembleOutcome { - let files_total = plan.files.len() as u64; - let mut outcome = AssembleOutcome { - files_total, - bytes_total: plan.bytes_total, - ..AssembleOutcome::default() - }; - log(&format!( - "assemble cache_dir={} scratch={} {} files={files_total} bytes={} chunks_referenced={}", - plan.cache_dir.display(), - plan.scratch_cache, - crate::priority::log_field(), - plan.bytes_total, - plan.refs.len() - )); - - let mut refs = plan.refs.clone(); - let mut reader = ChunkReader { - cache_dir: plan.cache_dir.clone(), - last: None, - }; - for &fi in &plan.files { - if cancel.load(Ordering::Relaxed) { - outcome.cancelled = true; - outcome.error = "cancelled".to_string(); - log(&format!( - "cancelled during assembly ({}/{files_total} files)", - outcome.files_done - )); - return outcome; - } - let f = &plan.manifest.files[fi]; - let out_path = plan.install_dir.join(relative_path(f)); - match write_file(&mut reader, f, &out_path) { - Ok(written) => outcome.bytes_written += written, - Err(err) => { - outcome.error = err; - log(&format!( - "FAIL {} ({}/{files_total} files ok)", - outcome.error, outcome.files_done - )); - return outcome; - } - } - // Scratch cache: this file was the last user of a chunk → the chunk goes now, not at the - // end, so the cache holds only what is still owed to files not yet written. Released - // before the progress event, so "file done" also means "its chunks are freed". - if plan.scratch_cache { - for guid in distinct_guids(f) { - let Some(count) = refs.get_mut(&guid) else { - continue; - }; - *count = count.saturating_sub(1); - if *count == 0 { - reader.forget(&guid); - if fs::remove_file(plan.cache_dir.join(&guid)).is_ok() { - outcome.chunks_removed += 1; - } - } - } - } - outcome.files_done += 1; - progress( - outcome.bytes_written, - plan.bytes_total, - outcome.files_done, - files_total, - ); - } - - outcome.success = true; - // Done with the cache: remove it whole (a scratch cache is already down to the chunks no - // pending file referenced; the default one is what the Kotlin loop deleted at this point). - match fs::remove_dir_all(&plan.cache_dir) { - Ok(()) => log(&format!("cache removed {}", plan.cache_dir.display())), - Err(e) => log(&format!( - "cache not removed {}: {e}", - plan.cache_dir.display() - )), - } - log(&format!( - "assembled files={} bytes={} chunks_removed_early={}", - outcome.files_done, outcome.bytes_written, outcome.chunks_removed - )); - outcome -} - -#[cfg(test)] -mod tests { - use super::super::chunk::test_support::temp_dir; - use super::super::manifest::test_support::*; - use super::*; - use std::sync::Mutex; - - const A: [u32; 4] = [1, 2, 3, 4]; - const B: [u32; 4] = [5, 6, 7, 8]; - - fn chunk_a() -> Vec<u8> { - (0..300u32).map(|i| (i % 251) as u8).collect() - } - - fn chunk_b() -> Vec<u8> { - (0..100u32).map(|i| (200 - i) as u8).collect() - } - - fn sha(bytes: &[u8]) -> [u8; 20] { - let mut out = [0u8; 20]; - out.copy_from_slice(&Sha1::digest(bytes)); - out - } - - /// file 0 = A[0..100] ++ B[10..60]; file 1 = A[100..300]. A is shared, B is file 0's alone. - fn expected_files() -> (Vec<u8>, Vec<u8>) { - let (a, b) = (chunk_a(), chunk_b()); - let mut f0 = a[0..100].to_vec(); - f0.extend_from_slice(&b[10..60]); - (f0, a[100..300].to_vec()) - } - - fn manifest_bytes(file0_sha: [u8; 20]) -> Vec<u8> { - let (_, f1) = expected_files(); - let chunks = vec![ - TestChunk { guid: A, hash: 1, sha1: [0x11; 20], group: 1, window: 300, file_size: 300 }, - TestChunk { guid: B, hash: 2, sha1: [0x22; 20], group: 2, window: 100, file_size: 100 }, - ]; - let files = vec![ - TestFile { - name: "Game\\Binaries\\Game.exe".to_string(), - sha1: file0_sha, - tags: vec![], - parts: vec![(A, 0, 100), (B, 10, 50)], - }, - TestFile { - name: "Game/Content/data.pak".to_string(), - sha1: sha(&f1), - tags: vec![], - parts: vec![(A, 100, 200)], - }, - ]; - build_manifest(&chunks, &files, 21, false) - } - - fn guid(g: [u32; 4]) -> String { - super::super::manifest::guid_to_string(&g) - } - - fn fill_cache(cache: &Path) { - fs::create_dir_all(cache).unwrap(); - fs::write(cache.join(guid(A)), chunk_a()).unwrap(); - fs::write(cache.join(guid(B)), chunk_b()).unwrap(); - } - - fn request(install: &Path, cache: &str) -> AssembleRequest { - let (f0, _) = expected_files(); - AssembleRequest { - manifest_bytes: manifest_bytes(sha(&f0)), - install_dir: install.to_str().unwrap().to_string(), - chunk_cache_dir: cache.to_string(), - file_indices: vec![0, 1], - } - } - - fn run(plan: &AssemblePlan, cancel: bool) -> (AssembleOutcome, Vec<(u64, u64, u64, u64)>) { - let calls = Mutex::new(Vec::new()); - let progress = |b: u64, bt: u64, f: u64, ft: u64| calls.lock().unwrap().push((b, bt, f, ft)); - let log = |_: &str| {}; - let out = run_assemble(plan, &AtomicBool::new(cancel), &progress, &log); - (out, calls.into_inner().unwrap()) - } - - #[test] - fn default_cache_assembles_like_the_kotlin_loop_and_removes_the_cache_at_the_end() { - let dir = temp_dir("asm-default"); - let install = dir.join("install"); - let cache = install.join(".chunks"); - fill_cache(&cache); - let plan = build_assemble_plan(&request(&install, "")).unwrap(); - assert!(!plan.scratch_cache); - assert_eq!(plan.refs[&guid(A)], 2); - assert_eq!(plan.refs[&guid(B)], 1); - let (out, calls) = run(&plan, false); - assert!(out.success, "{}", out.error); - let (f0, f1) = expected_files(); - assert_eq!(fs::read(install.join("Game/Binaries/Game.exe")).unwrap(), f0); - assert_eq!(fs::read(install.join("Game/Content/data.pak")).unwrap(), f1); - assert_eq!(out.bytes_written, 350); - assert_eq!(calls, vec![(150, 350, 1, 2), (350, 350, 2, 2)]); - assert_eq!(out.chunks_removed, 0, "no early deletion without a scratch cache"); - assert!(!cache.exists(), "the cache goes at the end, as the Kotlin loop's deleteDir"); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn scratch_cache_frees_each_chunk_when_its_last_file_is_done() { - let dir = temp_dir("asm-scratch"); - let install = dir.join("install"); - let cache = dir.join("cache"); - fill_cache(&cache); - let plan = build_assemble_plan(&request(&install, cache.to_str().unwrap())).unwrap(); - assert!(plan.scratch_cache); - // After file 0: B (only file 0 used it) must be gone, A (file 1 still needs it) must stay. - let seen = Mutex::new(Vec::new()); - let progress = |_: u64, _: u64, files_done: u64, _: u64| { - if files_done == 1 { - seen.lock().unwrap().push((cache.join(guid(A)).exists(), cache.join(guid(B)).exists())); - } - }; - let log = |_: &str| {}; - let out = run_assemble(&plan, &AtomicBool::new(false), &progress, &log); - assert!(out.success, "{}", out.error); - assert_eq!(*seen.lock().unwrap(), vec![(true, false)]); - assert_eq!(out.chunks_removed, 2); - assert!(!cache.exists()); - let (f0, f1) = expected_files(); - assert_eq!(fs::read(install.join("Game/Binaries/Game.exe")).unwrap(), f0); - assert_eq!(fs::read(install.join("Game/Content/data.pak")).unwrap(), f1); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn a_missing_chunk_fails_with_the_kotlin_wording_and_leaves_the_cache() { - let dir = temp_dir("asm-missing"); - let install = dir.join("install"); - let cache = dir.join("cache"); - fill_cache(&cache); - fs::remove_file(cache.join(guid(B))).unwrap(); - let plan = build_assemble_plan(&request(&install, cache.to_str().unwrap())).unwrap(); - let (out, calls) = run(&plan, false); - assert!(!out.success && !out.cancelled); - assert_eq!(out.error, format!("Missing chunk {} for Game/Binaries/Game.exe", guid(B))); - assert!(calls.is_empty()); - assert!(!install.join("Game/Binaries/Game.exe").exists(), "no partial file survives"); - assert!(cache.join(guid(A)).exists(), "failure leaves the cache for the next run"); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn a_sha1_mismatch_deletes_the_file_and_fails() { - let dir = temp_dir("asm-sha"); - let install = dir.join("install"); - let cache = dir.join("cache"); - fill_cache(&cache); - let mut req = request(&install, cache.to_str().unwrap()); - req.manifest_bytes = manifest_bytes([0x99; 20]); - let plan = build_assemble_plan(&req).unwrap(); - let (out, _) = run(&plan, false); - assert!(!out.success); - assert_eq!(out.error, "SHA-1 mismatch for Game/Binaries/Game.exe"); - assert!(!install.join("Game/Binaries/Game.exe").exists()); - assert!(cache.join(guid(B)).exists(), "nothing was freed for a file that failed"); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn an_all_zero_manifest_hash_means_no_check() { - let dir = temp_dir("asm-nohash"); - let install = dir.join("install"); - let cache = install.join(".chunks"); - fill_cache(&cache); - let mut req = request(&install, ""); - req.manifest_bytes = manifest_bytes([0u8; 20]); - let plan = build_assemble_plan(&req).unwrap(); - let (out, _) = run(&plan, false); - assert!(out.success, "{}", out.error); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn cancel_before_the_first_file_writes_nothing_and_keeps_the_cache() { - let dir = temp_dir("asm-cancel"); - let install = dir.join("install"); - let cache = dir.join("cache"); - fill_cache(&cache); - let plan = build_assemble_plan(&request(&install, cache.to_str().unwrap())).unwrap(); - let (out, calls) = run(&plan, true); - assert!(out.cancelled && !out.success); - assert!(calls.is_empty()); - assert!(cache.join(guid(A)).exists() && cache.join(guid(B)).exists()); - assert!(!install.join("Game").exists()); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn bad_inputs_fail_before_anything_is_written() { - let dir = temp_dir("asm-inputs"); - let mut req = request(&dir, ""); - req.file_indices = vec![0, 2]; - assert!(build_assemble_plan(&req).unwrap_err().contains("out of range")); - req.file_indices = vec![0]; - req.install_dir.clear(); - assert!(build_assemble_plan(&req).unwrap_err().contains("empty install dir")); - req.install_dir = dir.to_str().unwrap().to_string(); - req.manifest_bytes = vec![1, 2, 3]; - assert!(build_assemble_plan(&req).is_err()); - let _ = fs::remove_dir_all(&dir); - } -} diff --git a/app/src/main/rust/stores/src/epic/build_info.rs b/app/src/main/rust/stores/src/epic/build_info.rs new file mode 100644 index 0000000000..b70ccc9a74 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/build_info.rs @@ -0,0 +1,210 @@ +use std::time::Duration; + +use serde_json::{json, Value}; + +use super::net::{self, Request}; + +const LAUNCHER_HOST: &str = "https://launcher-public-service-prod06.ol.epicgames.com"; +const EXCLUDED_CDN: &str = "cloudflare.epicgamescdn.com"; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Cdn { + pub base: String, + pub dir: String, + pub auth: String, +} + +impl Cdn { + pub fn prefix(&self) -> String { + format!("{}{}", self.base, self.dir) + } +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct BuildInfo { + pub cdns: Vec<Cdn>, + pub manifest_file: String, + pub build_version: String, + pub deployment_id: String, +} + +impl BuildInfo { + pub fn to_json(&self) -> Value { + json!({ + "v": 1, + "manifest": self.manifest_file, + "buildVersion": self.build_version, + "deploymentId": self.deployment_id, + "cdns": cdns_to_json(&self.cdns), + }) + } + + pub fn from_json(v: &Value) -> Option<BuildInfo> { + Some(BuildInfo { + cdns: cdns_from_json(v.get("cdns")?), + manifest_file: net::str_of(v, "manifest").to_string(), + build_version: net::str_of(v, "buildVersion").to_string(), + deployment_id: net::str_of(v, "deploymentId").to_string(), + }) + } +} + +pub fn cdns_to_json(cdns: &[Cdn]) -> Value { + Value::Array(cdns.iter().map(|c| json!({"base": c.base, "dir": c.dir, "auth": c.auth})).collect()) +} + +pub fn cdns_from_json(v: &Value) -> Vec<Cdn> { + v.as_array() + .map(|a| { + a.iter() + .map(|c| Cdn { + base: net::str_of(c, "base").to_string(), + dir: net::str_of(c, "dir").to_string(), + auth: net::str_of(c, "auth").to_string(), + }) + .filter(|c| !c.base.is_empty()) + .collect() + }) + .unwrap_or_default() +} + +pub fn cdn_of(entry: &Value) -> Option<Cdn> { + let uri = net::str_of(entry, "uri"); + let at = uri.find("/Builds")?; + let base = &uri[..at]; + if !base.starts_with("http") || base.contains(EXCLUDED_CDN) { + return None; + } + let path = &uri[at..]; + let path = path.split('?').next().unwrap_or(path); + let dir = &path[..path.rfind('/').unwrap_or(path.len())]; + let params: Vec<String> = entry + .get("queryParams") + .and_then(|q| q.as_array()) + .map(|a| { + a.iter() + .map(|p| format!("{}={}", net::str_of(p, "name"), net::str_of(p, "value"))) + .collect() + }) + .unwrap_or_default(); + let auth = if params.is_empty() { String::new() } else { format!("?{}", params.join("&")) }; + Some(Cdn { base: base.to_string(), dir: dir.to_string(), auth }) +} + +pub fn parse_answer(answer: &Value) -> Option<BuildInfo> { + let element = answer.get("elements")?.as_array()?.first()?; + let manifests = element.get("manifests").and_then(|m| m.as_array()); + let cdns: Vec<Cdn> = manifests.map(|m| m.iter().filter_map(cdn_of).collect()).unwrap_or_default(); + let manifest_file = manifests + .and_then(|m| m.first()) + .map(|m| net::str_of(m, "uri")) + .map(|u| u.split('?').next().unwrap_or(u)) + .map(|u| u.rsplit('/').next().unwrap_or("").to_string()) + .unwrap_or_default(); + let build_version = Some(net::str_of(element, "buildVersion")) + .filter(|s| !s.is_empty()) + .unwrap_or_else(|| net::str_of(element, "versionId")) + .to_string(); + let deployment_id = element + .get("sidecar") + .and_then(|s| s.get("config")) + .and_then(|c| c.as_str()) + .and_then(|c| serde_json::from_str::<Value>(c).ok()) + .map(|c| net::str_of(&c, "deploymentId").to_string()) + .unwrap_or_default(); + Some(BuildInfo { cdns, manifest_file, build_version, deployment_id }) +} + +pub fn fetch(access_token: &str, namespace: &str, catalog_item_id: &str, app_name: &str) -> Option<BuildInfo> { + let url = format!( + "{LAUNCHER_HOST}/launcher/api/public/assets/v2/platform/Windows/namespace/{}/catalogItem/{}/app/{}/label/Live", + net::percent_encode(namespace), + net::percent_encode(catalog_item_id), + net::percent_encode(app_name) + ); + let reply = net::send(Request::get(&url).bearer(access_token)).ok()?; + if !reply.ok() { + return None; + } + parse_answer(&reply.json()?) +} + +pub fn chunk_prefixes(cdns: &[Cdn]) -> Vec<String> { + let mut out: Vec<String> = Vec::new(); + for c in cdns { + let p = c.prefix().replace("\\/", "/").replace('\\', ""); + let p = p.trim_end_matches('/').to_string(); + if !p.is_empty() && !out.contains(&p) { + out.push(p); + } + } + out +} + +pub fn download_manifest(info: &BuildInfo, cdns: &[Cdn], log: &dyn Fn(&str)) -> Option<Vec<u8>> { + if info.manifest_file.is_empty() { + return None; + } + for cdn in cdns { + let url = format!("{}{}/{}{}", cdn.base, cdn.dir, info.manifest_file, cdn.auth); + match net::send(Request::get(&url).read_timeout(Duration::from_secs(120))) { + Ok(reply) if reply.status == 200 && reply.body.len() > 4 => return Some(reply.body), + Ok(reply) => log(&format!("manifest from {}: HTTP {}", cdn.base, reply.status)), + Err(e) => log(&format!("manifest from {}: {e}", cdn.base)), + } + } + None +} + +#[cfg(test)] +mod tests { + use super::*; + + fn answer() -> Value { + json!({"elements": [{ + "appName": "Fig", "buildVersion": "1.0.5", + "manifests": [ + {"uri": "https://download.epicgames.com/Builds/Org/o-x/abc/default/HASH.manifest?ignored=1", + "queryParams": [{"name": "f_token", "value": "tok=="}, {"name": "x", "value": "1"}]}, + {"uri": "https://cloudflare.epicgamescdn.com/Builds/Org/o-x/abc/default/HASH.manifest"}, + {"uri": "https://fastly-download.epicgames.com/Builds/Org/o-x/abc/default/HASH.manifest"}, + {"uri": "no-builds-here"} + ], + "sidecar": {"config": "{\"deploymentId\":\"dep42\"}"} + }]}) + } + + #[test] + fn cdn_list_and_manifest_name() { + let info = parse_answer(&answer()).unwrap(); + assert_eq!(info.manifest_file, "HASH.manifest"); + assert_eq!(info.build_version, "1.0.5"); + assert_eq!(info.deployment_id, "dep42"); + assert_eq!(info.cdns.len(), 2); + assert_eq!(info.cdns[0].base, "https://download.epicgames.com"); + assert_eq!(info.cdns[0].dir, "/Builds/Org/o-x/abc/default"); + assert_eq!(info.cdns[0].auth, "?f_token=tok==&x=1"); + assert_eq!(info.cdns[1].auth, ""); + let back = BuildInfo::from_json(&info.to_json()).unwrap(); + assert_eq!(back, info); + } + + #[test] + fn missing_elements_is_no_answer() { + assert!(parse_answer(&json!({"elements": []})).is_none()); + assert!(parse_answer(&json!({})).is_none()); + let v = parse_answer(&json!({"elements": [{"versionId": "v9"}]})).unwrap(); + assert_eq!(v.build_version, "v9"); + assert!(v.cdns.is_empty()); + } + + #[test] + fn chunk_prefixes_are_normalised() { + let cdns = vec![ + Cdn { base: "https://a.example".into(), dir: "\\/Builds\\/x/".into(), auth: String::new() }, + Cdn { base: "https://a.example".into(), dir: "/Builds/x".into(), auth: "?s=1".into() }, + Cdn { base: "https://b.example".into(), dir: "/Builds/x".into(), auth: String::new() }, + ]; + assert_eq!(chunk_prefixes(&cdns), vec!["https://a.example/Builds/x", "https://b.example/Builds/x"]); + } +} diff --git a/app/src/main/rust/stores/src/epic/catalog.rs b/app/src/main/rust/stores/src/epic/catalog.rs new file mode 100644 index 0000000000..4589ce276b --- /dev/null +++ b/app/src/main/rust/stores/src/epic/catalog.rs @@ -0,0 +1,128 @@ +use serde_json::{json, Value}; + +use super::net::{self, Request}; + +const CATALOG_HOST: &str = "https://catalog-public-service-prod06.ol.epicgames.com"; + +fn items_url(namespace: &str, item_id: &str, with_relations: bool) -> String { + let mut url = format!( + "{CATALOG_HOST}/catalog/api/shared/namespace/{}/bulk/items?id={}", + net::percent_encode(namespace), + net::percent_encode(item_id) + ); + if with_relations { + url.push_str("&includeDLCDetails=true&includeMainGameDetails=true"); + } + url.push_str("&country=US"); + url +} + +pub fn pick_entry<'v>(answer: &'v Value, item_id: &str) -> Option<&'v Value> { + let map = answer.as_object()?; + map.get(item_id).or_else(|| map.values().next()) +} + +fn fetch(access_token: &str, namespace: &str, item_id: &str, relations: bool) -> Result<Option<Value>, ()> { + let url = items_url(namespace, item_id, relations); + let reply = net::send(Request::get(&url).bearer(access_token)).map_err(|_| ())?; + if !reply.ok() { + return Err(()); + } + let answer = reply.json().ok_or(())?; + Ok(pick_entry(&answer, item_id).cloned()) +} + +fn image(entry: &Value, types: &[&str]) -> String { + let Some(list) = entry.get("keyImages").and_then(|v| v.as_array()) else { + return String::new(); + }; + list.iter() + .find(|img| types.contains(&net::str_of(img, "type")) && !net::str_of(img, "url").is_empty()) + .map(|img| net::str_of(img, "url").to_string()) + .unwrap_or_default() +} + +fn attribute_of(entry: &Value, name: &str) -> Option<String> { + entry + .get("customAttributes") + .and_then(|a| a.get(name)) + .and_then(|a| a.get("value")) + .and_then(|v| v.as_str()) + .map(str::to_string) +} + +pub fn details_of(entry: &Value) -> Value { + let publisher = attribute_of(entry, "publisherName") + .map(|p| p.trim().to_string()) + .filter(|p| !p.is_empty()) + .unwrap_or_else(|| { + entry.get("seller").map(|s| net::str_of(s, "name").trim().to_string()).unwrap_or_default() + }); + let release = Some(net::str_of(entry, "viewableDate")) + .filter(|s| !s.is_empty()) + .unwrap_or_else(|| net::str_of(entry, "effectiveDate")); + let offline = attribute_of(entry, "CanRunOffline").map(|v| !v.eq_ignore_ascii_case("false")).unwrap_or(true); + let main_game = entry.get("mainGameItem"); + json!({ + "title": net::str_of(entry, "title"), + "developer": net::str_of(entry, "developer"), + "description": net::str_of(entry, "description"), + "publisher": publisher, + "releaseDate": release, + "tall": image(entry, &["DieselGameBoxTall"]), + "wide": image(entry, &["DieselGameBox", "Thumbnail"]), + "canRunOffline": offline, + "dlc": main_game.is_some_and(|m| !m.is_null()), + "mainGameId": main_game.map(|m| net::str_of(m, "id")).unwrap_or(""), + }) +} + +pub fn details(access_token: &str, namespace: &str, item_id: &str) -> Option<Value> { + fetch(access_token, namespace, item_id, true).ok().flatten().map(|e| details_of(&e)) +} + +pub fn attribute(access_token: &str, namespace: &str, item_id: &str, name: &str) -> Option<String> { + match fetch(access_token, namespace, item_id, false) { + Err(()) => None, + Ok(None) => Some(String::new()), + Ok(Some(entry)) => Some(attribute_of(&entry, name).unwrap_or_default()), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn details_from_an_entry() { + let answer = json!({ + "other": {"title": "Wrong"}, + "cat1": { + "title": "Game", "developer": "Dev", "description": "Text", + "keyImages": [ + {"type": "Thumbnail", "url": "thumb"}, + {"type": "DieselGameBox", "url": ""}, + {"type": "DieselGameBoxTall", "url": "tall"} + ], + "customAttributes": {"CanRunOffline": {"value": "FALSE"}, "publisherName": {"value": " Pub "}}, + "seller": {"name": "Seller"}, + "effectiveDate": "2020-01-01T00:00:00.000Z" + } + }); + let d = details_of(pick_entry(&answer, "cat1").unwrap()); + assert_eq!(d["title"], "Game"); + assert_eq!(d["tall"], "tall"); + assert_eq!(d["wide"], "thumb"); + assert_eq!(d["publisher"], "Pub"); + assert_eq!(d["canRunOffline"], false); + assert_eq!(d["releaseDate"], "2020-01-01T00:00:00.000Z"); + assert_eq!(d["dlc"], false); + let dlc = details_of(&json!({"mainGameItem": {"id": "base"}, "seller": {"name": "S"}, "viewableDate": "v"})); + assert_eq!(dlc["dlc"], true); + assert_eq!(dlc["mainGameId"], "base"); + assert_eq!(dlc["publisher"], "S"); + assert_eq!(dlc["releaseDate"], "v"); + assert_eq!(dlc["canRunOffline"], true); + assert_eq!(pick_entry(&json!({"x": {"title": "Only"}}), "y").unwrap()["title"], "Only"); + } +} diff --git a/app/src/main/rust/stores/src/epic/chunk.rs b/app/src/main/rust/stores/src/epic/chunk.rs index 22ebb864db..ea09ccd60b 100644 --- a/app/src/main/rust/stores/src/epic/chunk.rs +++ b/app/src/main/rust/stores/src/epic/chunk.rs @@ -1,375 +1,156 @@ -//! One chunk: header parse → (zlib inflate | copy) → SHA-1 → `.part` → rename into the cache. -//! -//! Port of `EpicDownloadManager.downloadChunkStreaming` minus the HTTP part (the fetch core -//! hands us the whole response body). Java's protocol, kept exactly: -//! - 41-byte header: magic(4) headerVersion(4) headerSize(4) compressedSize(4) GUID(16) hash(8) -//! storedAs(1); payload starts at `max(headerSize, 41)` (Java never seeks back); -//! - payload = the next `compressedSize` bytes, or whatever the body still has (a short body -//! is NOT an error — the SHA-1 check decides); -//! - `storedAs & 1` → zlib; corrupt zlib = failure; a stream that ends early = partial output; -//! - the decompressed bytes go to `<final>.part`; the SHA-1 (when the manifest has one) must -//! match or the `.part` is deleted; then an atomic rename publishes `<final>`. -//! A cache file therefore exists under its final name ONLY if it fully downloaded and verified, -//! on either engine. - -use std::fs::{self, File}; -use std::io::{self, BufWriter, Write}; -use std::path::{Path, PathBuf}; - +use flate2::{Decompress, FlushDecompress, Status}; use sha1::{Digest, Sha1}; -/// Chunk file magic (`0xB1FE3AA2`). +use super::manifest::ChunkInfo; + pub const CHUNK_MAGIC: u32 = 0xB1FE_3AA2; +const MIN_HEADER: usize = 41; -/// Bytes Java reads before looking at the header (`byte[] hdrBuf = new byte[41]`). -pub const CHUNK_HEADER_PREFIX: usize = 41; - -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub struct ChunkHeader { - pub header_version: i32, - pub header_size: i32, - pub compressed_size: i32, - pub stored_as: u8, +fn le_u32(b: &[u8], at: usize) -> u32 { + u32::from_le_bytes([b[at], b[at + 1], b[at + 2], b[at + 3]]) } -impl ChunkHeader { - pub fn is_compressed(&self) -> bool { - (self.stored_as & 1) != 0 +pub fn decode(body: &[u8], info: &ChunkInfo) -> Result<Vec<u8>, String> { + if body.len() < MIN_HEADER { + return Err(format!("chunk body of {} bytes", body.len())); } - - /// Where the payload begins in the body (`if (headerSize > 41) skipFully(headerSize - 41)`). - pub fn payload_start(&self) -> usize { - if self.header_size > CHUNK_HEADER_PREFIX as i32 { - self.header_size as usize - } else { - CHUNK_HEADER_PREFIX - } + if le_u32(body, 0) != CHUNK_MAGIC { + return Err("not a chunk file".into()); } -} - -/// `readFully(hdrBuf)` + header decode. `Err` = the Java `continue`/exception paths -/// (short stream, bad magic). -pub fn parse_chunk_header(body: &[u8]) -> Result<ChunkHeader, String> { - if body.len() < CHUNK_HEADER_PREFIX { - return Err(format!( - "Stream ended after {}/{} bytes", - body.len(), - CHUNK_HEADER_PREFIX - )); + let header = (le_u32(body, 8) as i32).max(MIN_HEADER as i32) as usize; + let stored = (le_u32(body, 12) as i32).max(0) as usize; + let flags = body[40]; + if header > body.len() { + return Err("chunk header runs past the body".into()); } - let le = |o: usize| i32::from_le_bytes([body[o], body[o + 1], body[o + 2], body[o + 3]]); - let magic = le(0) as u32; - if magic != CHUNK_MAGIC { - return Err(format!("Bad chunk magic (streaming): 0x{magic:x}")); - } - Ok(ChunkHeader { - header_version: le(4), - header_size: le(8), - compressed_size: le(12), - stored_as: body[40], - }) -} - -/// The payload slice Java's read loop would consume: `compressedSize` bytes after the header, -/// truncated to what the body holds (`if (n <= 0) break;`). `Err` when the header skip runs -/// past the body (`skipFully` throws). -pub fn chunk_payload<'a>(body: &'a [u8], hdr: &ChunkHeader) -> Result<&'a [u8], String> { - let start = hdr.payload_start(); - if start > body.len() { - return Err("Stream ended during skip".to_string()); - } - let want = if hdr.compressed_size <= 0 { - 0 + let limit = info.window as usize; + let data = if flags & 1 != 0 { + let end = header.saturating_add(stored).min(body.len()); + inflate(&body[header..end], limit)? } else { - hdr.compressed_size as usize + let end = header + .checked_add(stored) + .filter(|&e| e <= body.len()) + .ok_or("stored chunk payload is short")?; + body[header..end].to_vec() }; - let avail = body.len() - start; - let take = want.min(avail); - Ok(&body[start..start + take]) -} - -/// `Writer` that mirrors `fos.write(...)` + `sha.update(...)` on every block. -struct HashingWriter<W: Write> { - inner: W, - sha: Option<Sha1>, - written: u64, -} - -impl<W: Write> Write for HashingWriter<W> { - fn write(&mut self, buf: &[u8]) -> io::Result<usize> { - let n = self.inner.write(buf)?; - if let Some(sha) = self.sha.as_mut() { - sha.update(&buf[..n]); - } - self.written += n as u64; - Ok(n) + if data.len() > limit { + return Err(format!("chunk decodes to {} bytes, more than {limit}", data.len())); } - - fn flush(&mut self) -> io::Result<()> { - self.inner.flush() + if info.window_exact && data.len() != limit { + return Err(format!("chunk decodes to {} bytes, manifest says {limit}", data.len())); } -} - -/// `new File(outFile.getPath() + ".part")`. -pub fn part_path(final_path: &Path) -> PathBuf { - let mut s = final_path.as_os_str().to_os_string(); - s.push(".part"); - PathBuf::from(s) -} - -/// Process one downloaded body into `final_path`. Returns the number of DECOMPRESSED bytes -/// written. `Err(reason)` = Java's "try the next CDN" outcome; the `.part` never survives an -/// error and `final_path` is only ever created by the rename after verification. -pub fn write_verified_chunk( - body: &[u8], - expected_sha1: Option<&[u8; 20]>, - final_path: &Path, -) -> Result<u64, String> { - let tmp = part_path(final_path); - // `tmp.delete()` — clear any stale partial from a prior interrupted attempt. - let _ = fs::remove_file(&tmp); - - let result = write_part(body, expected_sha1, &tmp, final_path); - if result.is_err() { - let _ = fs::remove_file(&tmp); - } - result -} - -fn write_part( - body: &[u8], - expected_sha1: Option<&[u8; 20]>, - tmp: &Path, - final_path: &Path, -) -> Result<u64, String> { - let hdr = parse_chunk_header(body)?; - let payload = chunk_payload(body, &hdr)?; - - let file = File::create(tmp).map_err(|e| format!("open {}: {e}", tmp.display()))?; - let mut out = HashingWriter { - inner: BufWriter::with_capacity(128 * 1024, file), - sha: expected_sha1.map(|_| Sha1::new()), - written: 0, - }; - - if hdr.is_compressed() { - // Java: inflate until the stream finishes or the input runs out; a corrupt stream throws - // (DataFormatException) → this CDN attempt fails. flate2 behaves the same way: EOF on a - // truncated stream is a clean end (partial output), corruption is an error. - let mut dec = flate2::read::ZlibDecoder::new(payload); - io::copy(&mut dec, &mut out).map_err(|e| format!("inflate: {e}"))?; - } else { - out.write_all(payload).map_err(|e| format!("write: {e}"))?; - } - out.flush().map_err(|e| format!("flush: {e}"))?; - let written = out.written; - let digest = out.sha.take().map(|s| s.finalize()); - drop(out); // close the file before the rename - - if let (Some(expected), Some(actual)) = (expected_sha1, digest) { - if actual.as_slice() != &expected[..] { - return Err("Chunk SHA-1 mismatch (streaming)".to_string()); + if let Some(expected) = info.sha1 { + let got: [u8; 20] = Sha1::digest(&data).into(); + if got != expected { + return Err("chunk SHA-1 mismatch".into()); } } + Ok(data) +} - // Verified → publish atomically (same directory → same filesystem). - fs::rename(tmp, final_path).map_err(|e| format!("Chunk rename failed: {e}"))?; - Ok(written) +fn inflate(input: &[u8], limit: usize) -> Result<Vec<u8>, String> { + let mut z = Decompress::new(true); + let mut out = Vec::with_capacity(limit + 1); + loop { + let (in_before, out_before) = (z.total_in(), out.len()); + let consumed = in_before as usize; + let status = z + .decompress_vec(&input[consumed..], &mut out, FlushDecompress::Finish) + .map_err(|e| format!("chunk does not inflate: {e}"))?; + if status == Status::StreamEnd { + return Ok(out); + } + if out.len() > limit { + return Err(format!("chunk inflates past {limit} bytes")); + } + if out.len() == out.capacity() { + out.reserve(64 * 1024); + continue; + } + if z.total_in() == in_before && out.len() == out_before { + return Err("chunk zlib stream is truncated".into()); + } + } } #[cfg(test)] -pub(crate) mod test_support { - use super::*; +pub mod testing { + use super::CHUNK_MAGIC; + use std::io::Write; - /// Build a chunk body the way the CDN serves it. - pub fn build_chunk_body( - decompressed: &[u8], - compress: bool, - extra_header: usize, - declared_compressed_size: Option<i32>, - ) -> Vec<u8> { + pub fn encode(data: &[u8], compress: bool) -> Vec<u8> { let payload = if compress { - let mut enc = - flate2::write::ZlibEncoder::new(Vec::new(), flate2::Compression::default()); - enc.write_all(decompressed).unwrap(); + let mut enc = flate2::write::ZlibEncoder::new(Vec::new(), flate2::Compression::fast()); + enc.write_all(data).unwrap(); enc.finish().unwrap() } else { - decompressed.to_vec() + data.to_vec() }; - let header_size = (CHUNK_HEADER_PREFIX + extra_header) as i32; let mut out = Vec::new(); out.extend_from_slice(&CHUNK_MAGIC.to_le_bytes()); - out.extend_from_slice(&3i32.to_le_bytes()); // headerVersion - out.extend_from_slice(&header_size.to_le_bytes()); - out.extend_from_slice( - &declared_compressed_size - .unwrap_or(payload.len() as i32) - .to_le_bytes(), - ); - out.extend_from_slice(&[0xAB; 16]); // GUID (unused by the reader) - out.extend_from_slice(&[0xCD; 8]); // hash (unused by the reader) + out.extend_from_slice(&3i32.to_le_bytes()); + out.extend_from_slice(&66i32.to_le_bytes()); + out.extend_from_slice(&(payload.len() as i32).to_le_bytes()); + out.extend_from_slice(&[0u8; 16]); + out.extend_from_slice(&0u64.to_le_bytes()); out.push(if compress { 1 } else { 0 }); - out.extend(std::iter::repeat(0x5A).take(extra_header)); - assert_eq!(out.len(), header_size as usize); + out.extend_from_slice(&[0u8; 25]); out.extend_from_slice(&payload); out } - - pub fn sha1_of(data: &[u8]) -> [u8; 20] { - let mut h = Sha1::new(); - h.update(data); - let d = h.finalize(); - let mut out = [0u8; 20]; - out.copy_from_slice(&d); - out - } - - pub fn temp_dir(tag: &str) -> PathBuf { - let nanos = std::time::SystemTime::now() - .duration_since(std::time::UNIX_EPOCH) - .map(|d| d.as_nanos()) - .unwrap_or(0); - let dir = std::env::temp_dir().join(format!( - "epic-{tag}-{}-{nanos}", - std::process::id() - )); - fs::create_dir_all(&dir).unwrap(); - dir - } } #[cfg(test)] mod tests { - use super::test_support::*; + use super::testing::encode; use super::*; + use crate::epic::manifest::testing::chunk; - fn sample_data() -> Vec<u8> { - (0..200_000u32).map(|i| (i % 251) as u8).collect() - } - - #[test] - fn header_parse_matches_java_fields() { - let body = build_chunk_body(b"hello", true, 5, None); - let h = parse_chunk_header(&body).unwrap(); - assert_eq!(h.header_version, 3); - assert_eq!(h.header_size, 46); - assert!(h.is_compressed()); - assert_eq!(h.payload_start(), 46); - let short = ChunkHeader { - header_version: 0, - header_size: 20, - compressed_size: 1, - stored_as: 0, - }; - assert_eq!(short.payload_start(), 41, "headerSize < 41 → payload still starts at 41"); - } - - #[test] - fn short_or_wrong_magic_bodies_are_rejected() { - assert!(parse_chunk_header(&[0u8; 40]).is_err()); - let mut body = build_chunk_body(b"x", false, 0, None); - body[0] ^= 0xFF; - assert!(parse_chunk_header(&body).unwrap_err().contains("Bad chunk magic")); - } - - #[test] - fn payload_is_truncated_to_the_body_not_an_error() { - let body = build_chunk_body(b"abcdef", false, 0, Some(100)); - let h = parse_chunk_header(&body).unwrap(); - assert_eq!(chunk_payload(&body, &h).unwrap(), b"abcdef"); - let neg = build_chunk_body(b"abcdef", false, 0, Some(-1)); - let h = parse_chunk_header(&neg).unwrap(); - assert_eq!(chunk_payload(&neg, &h).unwrap(), b""); - // headerSize past the body → skipFully throws. - let mut far = build_chunk_body(b"abcdef", false, 0, None); - far[8..12].copy_from_slice(&5000i32.to_le_bytes()); - let h = parse_chunk_header(&far).unwrap(); - assert!(chunk_payload(&far, &h).is_err()); - } - - #[test] - fn compressed_chunk_is_inflated_verified_and_renamed() { - let dir = temp_dir("ok"); - let data = sample_data(); - let body = build_chunk_body(&data, true, 3, None); - let final_path = dir.join("00000001000000020000000300000004"); - let n = write_verified_chunk(&body, Some(&sha1_of(&data)), &final_path).unwrap(); - assert_eq!(n, data.len() as u64); - assert_eq!(fs::read(&final_path).unwrap(), data); - assert!(!part_path(&final_path).exists(), ".part renamed away"); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn stored_chunk_is_copied_as_is() { - let dir = temp_dir("stored"); - let data = b"stored-as-is payload".to_vec(); - let body = build_chunk_body(&data, false, 0, None); - let final_path = dir.join("chunk"); - let n = write_verified_chunk(&body, Some(&sha1_of(&data)), &final_path).unwrap(); - assert_eq!(n, data.len() as u64); - assert_eq!(fs::read(&final_path).unwrap(), data); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn sha1_mismatch_leaves_nothing_behind() { - let dir = temp_dir("sha"); - let data = sample_data(); - let body = build_chunk_body(&data, true, 0, None); - let final_path = dir.join("chunk"); - let err = write_verified_chunk(&body, Some(&[0x42; 20]), &final_path).unwrap_err(); - assert!(err.contains("SHA-1 mismatch"), "{err}"); - assert!(!final_path.exists()); - assert!(!part_path(&final_path).exists()); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn unverifiable_chunk_is_accepted_without_a_hash() { - let dir = temp_dir("nosha"); - let data = sample_data(); - let body = build_chunk_body(&data, true, 0, None); - let final_path = dir.join("chunk"); - assert_eq!( - write_verified_chunk(&body, None, &final_path).unwrap(), - data.len() as u64 - ); - assert_eq!(fs::read(&final_path).unwrap(), data); - let _ = fs::remove_dir_all(&dir); - } - - #[test] - fn corrupt_zlib_fails_and_truncated_zlib_fails_the_hash() { - let dir = temp_dir("zlib"); - let data = sample_data(); - let mut body = build_chunk_body(&data, true, 0, None); - let final_path = dir.join("chunk"); - // Truncate the body: inflate ends early → partial output → SHA-1 mismatch. - let cut = body.len() - 1000; - let err = write_verified_chunk(&body[..cut], Some(&sha1_of(&data)), &final_path).unwrap_err(); - assert!(err.contains("SHA-1 mismatch") || err.contains("inflate"), "{err}"); - assert!(!final_path.exists()); - // Corrupt the deflate stream itself. - for b in body.iter_mut().skip(60).take(64) { - *b ^= 0x55; + fn info_for(data: &[u8], with_hash: bool) -> ChunkInfo { + let mut info = chunk(1, data.len() as u32); + if with_hash { + info.sha1 = Some(Sha1::digest(data).into()); } - let err = write_verified_chunk(&body, Some(&sha1_of(&data)), &final_path).unwrap_err(); - assert!(err.contains("SHA-1 mismatch") || err.contains("inflate"), "{err}"); - assert!(!final_path.exists()); - assert!(!part_path(&final_path).exists()); - let _ = fs::remove_dir_all(&dir); + info } #[test] - fn stale_part_file_is_cleared_before_the_attempt() { - let dir = temp_dir("stale"); - let final_path = dir.join("chunk"); - fs::write(part_path(&final_path), b"stale").unwrap(); - let body = [0u8; 10]; // too short → header failure - assert!(write_verified_chunk(&body, None, &final_path).is_err()); - assert!(!part_path(&final_path).exists()); - assert!(!final_path.exists()); - let _ = fs::remove_dir_all(&dir); + fn compressed_and_stored_chunks_decode() { + let data: Vec<u8> = (0..5000u32).map(|i| (i % 251) as u8).collect(); + for compress in [true, false] { + assert_eq!(decode(&encode(&data, compress), &info_for(&data, true)).unwrap(), data); + } + } + + #[test] + fn bad_downloads_are_refused() { + let data = vec![7u8; 4096]; + let info = info_for(&data, true); + let good = encode(&data, true); + assert!(decode(&good[..good.len() - 3], &info).is_err()); + let mut wrong_magic = good.clone(); + wrong_magic[0] ^= 1; + assert!(decode(&wrong_magic, &info).is_err()); + let mut other = info.clone(); + other.sha1 = Some([9; 20]); + assert!(decode(&good, &other).is_err()); + let mut longer = info.clone(); + longer.window = 4097; + assert!(decode(&good, &longer).is_err()); + let stored = encode(&data, false); + assert!(decode(&stored[..stored.len() - 1], &info).is_err()); + assert!(decode(&good[..40], &info).is_err()); + } + + #[test] + fn an_inexact_window_is_an_upper_bound() { + let data = vec![1u8; 100]; + let mut info = info_for(&data, false); + info.window = 1024; + info.window_exact = false; + assert_eq!(decode(&encode(&data, true), &info).unwrap().len(), 100); + info.window = 50; + assert!(decode(&encode(&data, true), &info).is_err()); } } diff --git a/app/src/main/rust/stores/src/epic/driver.rs b/app/src/main/rust/stores/src/epic/driver.rs deleted file mode 100644 index 1c39f5ac6e..0000000000 --- a/app/src/main/rust/stores/src/epic/driver.rs +++ /dev/null @@ -1,480 +0,0 @@ -//! Plan → `FetchItem`s → `crate::fetch_core::run_fetch` with a sink that fills the chunk cache. -//! -//! This is the replacement for the body of the Java pool block in `EpicDownloadManager.install` -//! ("Download unique chunks — 8 parallel threads"). Inputs are exactly what that block sees: -//! the parsed manifest (re-parsed here from the same bytes), the pending file set (indices Java -//! computed after its delta/verify pass), the CDN prefixes (`baseUrl + cloudDir`, cloudflare -//! already skipped) and the chunk cache dir. Output = `<cache>/<GUID>` for every needed chunk, -//! where `<cache>` is `<installDir>/.chunks` unless the caller named another directory; the -//! files are assembled from it afterwards (by the Kotlin manager, or by [`super::assemble`]). - -use std::path::PathBuf; -use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; -use std::sync::Mutex; -use std::time::{Duration, Instant}; - -use crate::fetch_core::{run_fetch, FetchItem, FetchOptions, FetchSink, SinkError}; - -use super::manifest::{parse_manifest, Manifest}; -use super::plan::{ - cached_chunk_path, chunk_url, distinct_prefixes, per_host_cap, resolve_cache_dir, - total_credit_bytes, unique_chunks_for_files, -}; - -/// Java `conn.setReadTimeout(60000)` — the longer of the two Java timeouts (connect was 30 s). -pub const REQUEST_TIMEOUT: Duration = Duration::from_secs(60); - -/// Everything the JNI layer hands over for one run. -pub struct EpicRequest { - pub manifest_bytes: Vec<u8>, - pub install_dir: String, - /// Chunk cache directory; `""` = `<installDir>/.chunks`. See [`resolve_cache_dir`]. - pub chunk_cache_dir: String, - /// `cdn.baseUrl + cdn.cloudDir` per manifest-API CDN entry, in Java's order. - pub cdn_prefixes: Vec<String>, - /// Indices into `manifest.files` of Java's `pendingFiles` (post delta/verify), in order. - pub pending_file_indices: Vec<usize>, - /// Java's `neededChunks.size()` / `totalBytes` for the plan cross-check (`None` = skip). - pub expected_chunks: Option<u64>, - pub expected_bytes: Option<u64>, - pub ca_bundle_path: String, - /// Window ceiling: the Steam speed tier's network window (Fast = 32) since improvements - /// round 1; the Java fallback pool keeps its fixed 8 (`super::JAVA_POOL_THREADS`). - pub max_workers: usize, - pub process_workers: usize, - pub label: String, -} - -/// The chunk plan for one run. -#[derive(Debug)] -pub struct EpicPlan { - pub manifest: Manifest, - pub cache_dir: PathBuf, - /// The cache is a directory the caller named, apart from the install: scratch space that - /// the assembler empties as it goes and removes when it is done. - pub scratch_cache: bool, - /// Chunk indices (into `manifest.unique_chunks`) in Java's submission order. - pub needed: Vec<usize>, - /// `Σ max(fileSize, 1)` over `needed`. - pub total_bytes: u64, - /// Distinct CDN prefixes = fetch-core host keys. - pub hosts: Vec<String>, -} - -/// Terminal result of a run, in the shape Java's pool block needs to reproduce its own exit -/// paths (`CANCELLED during chunk download (n/total chunks)`, `N chunks failed`, `chunksOK=`). -#[derive(Clone, Debug, Default)] -pub struct EpicOutcome { - pub success: bool, - pub cancelled: bool, - pub error: String, - /// Credited (manifest `max(fileSize,1)`) bytes: skipped-cached + fetched. - pub bytes_credited: u64, - /// Chunks accounted for (skipped-cached + fetched), Java's `completedCount`. - pub chunks_done: u64, - pub chunks_total: u64, - pub bytes_total: u64, - /// Decompressed bytes actually written to the cache this run. - pub decompressed_written: u64, -} - -/// Parse + plan (no I/O beyond reading the cache dir). `Err` = "engine could not start"; Java -/// then runs its own pool, since nothing has been fetched yet. -pub fn build_plan(req: &EpicRequest) -> Result<EpicPlan, String> { - let manifest = parse_manifest(&req.manifest_bytes).map_err(|e| format!("plan: {e}"))?; - for &i in &req.pending_file_indices { - if i >= manifest.files.len() { - return Err(format!( - "plan: pending file index {i} out of range ({} files)", - manifest.files.len() - )); - } - } - let needed = unique_chunks_for_files(&manifest, &req.pending_file_indices); - let total_bytes = total_credit_bytes(&manifest, &needed); - if let Some(expected) = req.expected_chunks { - if expected != needed.len() as u64 { - return Err(format!( - "plan: chunk count mismatch java={expected} rust={}", - needed.len() - )); - } - } - if let Some(expected) = req.expected_bytes { - if expected != total_bytes { - return Err(format!( - "plan: byte total mismatch java={expected} rust={total_bytes}" - )); - } - } - let hosts = distinct_prefixes(&req.cdn_prefixes); - if hosts.is_empty() { - return Err("plan: no CDN prefixes".to_string()); - } - let cache_dir = resolve_cache_dir(&req.install_dir, &req.chunk_cache_dir); - std::fs::create_dir_all(&cache_dir) - .map_err(|e| format!("plan: mkdirs {}: {e}", cache_dir.display()))?; - Ok(EpicPlan { - manifest, - cache_dir, - scratch_cache: !req.chunk_cache_dir.is_empty(), - needed, - total_bytes, - hosts, - }) -} - -/// Sink: one downloaded body → verified cache file. `id` indexes `fetch_chunks`. -struct ChunkCacheSink<'a> { - plan: &'a EpicPlan, - /// Chunk indices (into `manifest.unique_chunks`) of the items actually being fetched. - fetch_chunks: &'a [usize], - decompressed: AtomicU64, -} - -impl<'a> FetchSink for ChunkCacheSink<'a> { - fn process(&self, item: &FetchItem, body: Vec<u8>) -> Result<u64, SinkError> { - let Some(&ci) = self.fetch_chunks.get(item.id as usize) else { - return Err(SinkError::Fatal(format!("item id {} out of range", item.id))); - }; - let chunk = &self.plan.manifest.unique_chunks[ci]; - let final_path = cached_chunk_path(&self.plan.cache_dir, chunk); - match super::chunk::write_verified_chunk(&body, chunk.verifiable_sha1(), &final_path) { - Ok(written) => { - self.decompressed.fetch_add(written, Ordering::Relaxed); - Ok(chunk.credit_bytes()) - } - // Every per-attempt failure in Java is "try the next CDN"; the core's Retry rotates - // hosts and backs off the same way (bounded at its attempt cap). - Err(reason) => Err(SinkError::Retry(format!("{} {reason}", chunk.guid_str()))), - } - } -} - -/// Rolling speed sampler for the end-of-run summary: samples at ≥500 ms like the Java pool's -/// `lastSpeedMs` logic, keeps the peak. -struct SpeedMeter { - start: Instant, - last_at: Instant, - last_bytes: u64, - peak_bps: f64, -} - -impl SpeedMeter { - fn new() -> Self { - let now = Instant::now(); - Self { - start: now, - last_at: now, - last_bytes: 0, - peak_bps: 0.0, - } - } - - fn sample(&mut self, bytes_now: u64) { - let now = Instant::now(); - let dt = now.duration_since(self.last_at); - if dt >= Duration::from_millis(500) { - let delta = bytes_now.saturating_sub(self.last_bytes) as f64; - let bps = delta / dt.as_secs_f64(); - if bps > self.peak_bps { - self.peak_bps = bps; - } - self.last_at = now; - self.last_bytes = bytes_now; - } - } - - fn summary(&self, bytes: u64, decompressed: u64, skipped: u64) -> String { - let secs = self.start.elapsed().as_secs_f64().max(0.001); - let avg_bps = bytes as f64 / secs; - format!( - "summary bytes={bytes} decompressed={decompressed} skipped_chunks={skipped} elapsed={secs:.1}s avg_mbps={:.2} peak_mbps={:.2} avg_MBps={:.2}", - avg_bps * 8.0 / 1_000_000.0, - self.peak_bps * 8.0 / 1_000_000.0, - avg_bps / (1024.0 * 1024.0) - ) - } -} - -/// Run the plan. `progress(bytes_done, chunks_done)` fires once per accounted chunk (cached-skip -/// or fetched), exactly the cadence of the Java pool's per-task `progress(...)` call. `log` -/// receives engine lines (`fetch-window`, `summary`, failures). -pub fn run_plan( - plan: &EpicPlan, - req: &EpicRequest, - cancel: &AtomicBool, - progress: &(dyn Fn(u64, u64) + Sync), - log: &(dyn Fn(&str) + Sync), -) -> EpicOutcome { - let chunks_total = plan.needed.len() as u64; - let mut outcome = EpicOutcome { - chunks_total, - bytes_total: plan.total_bytes, - ..EpicOutcome::default() - }; - let host_cap = per_host_cap(req.max_workers, plan.hosts.len()); - log(&format!( - "plan chunk_dir={} cache_dir={} scratch={} {} files_pending={} chunks={} bytes={} hosts={} workers={} per_host_cap={host_cap} process_workers={}", - plan.manifest.chunk_dir, - plan.cache_dir.display(), - plan.scratch_cache, - crate::priority::log_field(), - req.pending_file_indices.len(), - chunks_total, - plan.total_bytes, - plan.hosts.len(), - req.max_workers, - req.process_workers - )); - - // Java: each pool task first checks the cancel flag, then `cachedFile.exists()` → credit - // without fetching. Account for the cached chunks up front (same credit, same callback). - let mut fetch_chunks: Vec<usize> = Vec::with_capacity(plan.needed.len()); - let mut pre_bytes: u64 = 0; - let mut pre_chunks: u64 = 0; - for &ci in &plan.needed { - if cancel.load(Ordering::Relaxed) { - outcome.cancelled = true; - outcome.error = "cancelled".to_string(); - outcome.bytes_credited = pre_bytes; - outcome.chunks_done = pre_chunks; - log(&format!( - "cancelled before fetch ({pre_chunks}/{chunks_total} chunks)" - )); - return outcome; - } - let chunk = &plan.manifest.unique_chunks[ci]; - if cached_chunk_path(&plan.cache_dir, chunk).exists() { - pre_bytes += chunk.credit_bytes(); - pre_chunks += 1; - progress(pre_bytes, pre_chunks); - } else { - fetch_chunks.push(ci); - } - } - for (i, h) in plan.hosts.iter().enumerate() { - log(&format!("host[{i}]={h}")); - } - log(&format!( - "skip cached={pre_chunks} bytes={pre_bytes} to_fetch={}", - fetch_chunks.len() - )); - - if fetch_chunks.is_empty() { - outcome.success = true; - outcome.bytes_credited = pre_bytes; - outcome.chunks_done = pre_chunks; - log("summary bytes=0 decompressed=0 elapsed=0.0s avg_mbps=0.00 peak_mbps=0.00 (nothing to fetch)"); - return outcome; - } - - let items: Vec<FetchItem> = fetch_chunks - .iter() - .enumerate() - .map(|(id, &ci)| { - let chunk = &plan.manifest.unique_chunks[ci]; - FetchItem { - id: id as u64, - urls: plan - .hosts - .iter() - .map(|h| chunk_url(h, &plan.manifest.chunk_dir, chunk)) - .collect(), - reserve: if chunk.file_size > 0 { - chunk.file_size as u64 - } else { - 0 - }, - range: None, - } - }) - .collect(); - - let opts = FetchOptions { - max_workers: req.max_workers.max(1), - // Improvements round 1: the tier ceiling split across the distinct CDNs (floor 6), so - // the whole window is reachable on 1 host or on all 3. - per_host_cap: host_cap, - timeout: REQUEST_TIMEOUT, - headers: vec![("User-Agent".to_string(), super::USER_AGENT.to_string())], - ca_bundle_path: req.ca_bundle_path.clone(), - process_workers: req.process_workers.max(1), - label: req.label.clone(), - // Whole-body mode (Epic chunks are ≤ ~1 MiB compressed; the core's byte budget scales - // with the window); `stream` and any future field keep the core's defaults. - ..FetchOptions::default() - }; - - let sink = ChunkCacheSink { - plan, - fetch_chunks: &fetch_chunks, - decompressed: AtomicU64::new(0), - }; - - let meter = Mutex::new(SpeedMeter::new()); - let progress_adapter = |bytes: u64, items_ok: u64| { - if let Ok(mut m) = meter.lock() { - m.sample(bytes); - } - progress(pre_bytes + bytes, pre_chunks + items_ok); - }; - - let fetched = run_fetch( - items, - &plan.hosts, - &opts, - &sink, - cancel, - &progress_adapter, - log, - ); - - let decompressed = sink.decompressed.load(Ordering::Relaxed); - outcome.bytes_credited = pre_bytes + fetched.bytes_credited; - outcome.chunks_done = pre_chunks + fetched.items_ok; - outcome.decompressed_written = decompressed; - if let Ok(m) = meter.lock() { - log(&m.summary(fetched.bytes_credited, decompressed, pre_chunks)); - } - - if fetched.cancelled { - outcome.cancelled = true; - outcome.error = "cancelled".to_string(); - log(&format!( - "cancelled during chunk download ({}/{chunks_total} chunks)", - outcome.chunks_done - )); - return outcome; - } - if let Some(err) = fetched.error { - outcome.error = err; - log(&format!( - "FAIL {} ({}/{chunks_total} chunks ok)", - outcome.error, outcome.chunks_done - )); - return outcome; - } - if fetched.items_ok != fetch_chunks.len() as u64 { - outcome.error = format!( - "fetch ended with {}/{} chunks", - fetched.items_ok, - fetch_chunks.len() - ); - log(&format!("FAIL {}", outcome.error)); - return outcome; - } - outcome.success = true; - log(&format!("chunksOK={}", outcome.chunks_done)); - outcome -} - -#[cfg(test)] -mod tests { - use super::super::manifest::test_support::*; - use super::*; - - fn request(dir: &str, pending: Vec<usize>) -> EpicRequest { - EpicRequest { - manifest_bytes: build_manifest(&sample_chunks(), &sample_files(), 21, true), - install_dir: dir.to_string(), - chunk_cache_dir: String::new(), - cdn_prefixes: vec![ - "https://fastly-download.epicgames.com/Builds/o/x/default".to_string(), - "https://download.epicgames.com/Builds/o/x/default".to_string(), - "https://fastly-download.epicgames.com/Builds/o/x/default".to_string(), - ], - pending_file_indices: pending, - expected_chunks: None, - expected_bytes: None, - ca_bundle_path: String::new(), - max_workers: super::super::JAVA_POOL_THREADS, - process_workers: 2, - label: "epic test".to_string(), - } - } - - #[test] - fn plan_matches_java_for_the_pending_set() { - let dir = super::super::chunk::test_support::temp_dir("plan"); - let req = request(dir.to_str().unwrap(), vec![0, 1]); - let plan = build_plan(&req).unwrap(); - assert_eq!(plan.needed, vec![0, 1]); - assert_eq!(plan.total_bytes, 700_000 + 1); - assert_eq!(plan.hosts.len(), 2, "duplicate CDN prefix collapsed"); - assert!(plan.cache_dir.ends_with(".chunks")); - assert!(plan.cache_dir.is_dir()); - assert!(!plan.scratch_cache); - let _ = std::fs::remove_dir_all(&dir); - } - - #[test] - fn a_named_cache_dir_is_created_and_marked_scratch() { - let dir = super::super::chunk::test_support::temp_dir("scratch"); - let cache = dir.join("cache").join("Game"); - let mut req = request(dir.join("install").to_str().unwrap(), vec![0, 1]); - req.chunk_cache_dir = cache.to_str().unwrap().to_string(); - let plan = build_plan(&req).unwrap(); - assert_eq!(plan.cache_dir, cache); - assert!(plan.cache_dir.is_dir()); - assert!(plan.scratch_cache); - let _ = std::fs::remove_dir_all(&dir); - } - - #[test] - fn plan_cross_check_rejects_mismatches() { - let dir = super::super::chunk::test_support::temp_dir("xcheck"); - let mut req = request(dir.to_str().unwrap(), vec![0, 1]); - req.expected_chunks = Some(3); - assert!(build_plan(&req).unwrap_err().contains("chunk count mismatch")); - req.expected_chunks = Some(2); - req.expected_bytes = Some(5); - assert!(build_plan(&req).unwrap_err().contains("byte total mismatch")); - req.expected_bytes = Some(700_001); - assert!(build_plan(&req).is_ok()); - req.pending_file_indices = vec![7]; - assert!(build_plan(&req).unwrap_err().contains("out of range")); - req.pending_file_indices = vec![0]; - req.cdn_prefixes.clear(); - assert!(build_plan(&req).unwrap_err().contains("no CDN")); - let _ = std::fs::remove_dir_all(&dir); - } - - #[test] - fn fully_cached_plan_completes_without_fetching() { - let dir = super::super::chunk::test_support::temp_dir("cached"); - let req = request(dir.to_str().unwrap(), vec![0]); - let plan = build_plan(&req).unwrap(); - for &ci in &plan.needed { - std::fs::write( - cached_chunk_path(&plan.cache_dir, &plan.manifest.unique_chunks[ci]), - b"cached", - ) - .unwrap(); - } - let cancel = AtomicBool::new(false); - let calls = Mutex::new(Vec::new()); - let progress = |b: u64, c: u64| calls.lock().unwrap().push((b, c)); - let log = |_: &str| {}; - let out = run_plan(&plan, &req, &cancel, &progress, &log); - assert!(out.success); - assert_eq!(out.chunks_done, 2); - assert_eq!(out.bytes_credited, 700_001); - assert_eq!(*calls.lock().unwrap(), vec![(700_000, 1), (700_001, 2)]); - let _ = std::fs::remove_dir_all(&dir); - } - - #[test] - fn cancel_before_fetch_reports_cancelled() { - let dir = super::super::chunk::test_support::temp_dir("cancel"); - let req = request(dir.to_str().unwrap(), vec![0]); - let plan = build_plan(&req).unwrap(); - let cancel = AtomicBool::new(true); - let progress = |_: u64, _: u64| {}; - let log = |_: &str| {}; - let out = run_plan(&plan, &req, &cancel, &progress, &log); - assert!(out.cancelled); - assert!(!out.success); - let _ = std::fs::remove_dir_all(&dir); - } -} diff --git a/app/src/main/rust/stores/src/epic/ffi.rs b/app/src/main/rust/stores/src/epic/ffi.rs new file mode 100644 index 0000000000..31dc463e10 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/ffi.rs @@ -0,0 +1,305 @@ +use std::panic::{catch_unwind, AssertUnwindSafe}; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Arc; + +use jni::objects::{GlobalRef, JByteArray, JClass, JObject, JString, JValue}; +use jni::sys::{jbyteArray, jlong, jstring, JNI_FALSE, JNI_TRUE}; +use jni::{JNIEnv, JavaVM}; + +use super::install::{self, Events, Stop}; +use super::{net, service}; + +pub const LOG_TAG: &str = "EpicNative"; + +#[cfg(target_os = "android")] +#[link(name = "log")] +unsafe extern "C" { + fn __android_log_write(prio: i32, tag: *const i8, text: *const i8) -> i32; +} + +pub fn android_log(message: &str) { + #[cfg(target_os = "android")] + { + use std::ffi::CString; + let (Ok(tag), Ok(text)) = (CString::new(LOG_TAG), CString::new(message.replace('\0', " "))) else { + return; + }; + unsafe { + let _ = __android_log_write(4, tag.as_ptr().cast(), text.as_ptr().cast()); + } + } + #[cfg(not(target_os = "android"))] + { + let _ = message; + } +} + +fn read_string(env: &mut JNIEnv, value: &JString) -> String { + if value.is_null() { + return String::new(); + } + env.get_string(value) + .map(|s| s.to_string_lossy().into_owned()) + .unwrap_or_default() +} + +fn new_string(env: &mut JNIEnv, text: &str) -> jstring { + env.new_string(text).map(|s| s.into_raw()).unwrap_or(std::ptr::null_mut()) +} + +fn guarded<T>(fallback: T, f: impl FnOnce() -> T) -> T { + catch_unwind(AssertUnwindSafe(f)).unwrap_or_else(|_| { + android_log("a native Epic call panicked"); + fallback + }) +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeConfigure( + mut env: JNIEnv, + _class: JClass, + app_version: JString, +) { + let version = read_string(&mut env, &app_version); + net::set_app_version(&version); +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeCall( + mut env: JNIEnv, + _class: JClass, + op: JString, + request: JString, +) -> jstring { + let op = read_string(&mut env, &op); + let request = read_string(&mut env, &request); + let answer = guarded(None, || Some(service::call(&op, &request))); + match answer { + Some(text) => new_string(&mut env, &text), + None => std::ptr::null_mut(), + } +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeFetch( + mut env: JNIEnv, + _class: JClass, + op: JString, + request: JString, +) -> jbyteArray { + let op = read_string(&mut env, &op); + let request = read_string(&mut env, &request); + match guarded(None, || service::fetch(&op, &request)) { + Some(bytes) => env + .byte_array_from_slice(&bytes) + .map(|a| a.into_raw()) + .unwrap_or(std::ptr::null_mut()), + None => std::ptr::null_mut(), + } +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeSend( + mut env: JNIEnv, + _class: JClass, + op: JString, + request: JString, + body: JByteArray, +) -> jstring { + let op = read_string(&mut env, &op); + let request = read_string(&mut env, &request); + let bytes = if body.is_null() { Vec::new() } else { env.convert_byte_array(&body).unwrap_or_default() }; + let answer = guarded(None, || Some(service::send(&op, &request, bytes))); + match answer { + Some(text) => new_string(&mut env, &text), + None => std::ptr::null_mut(), + } +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeInspect( + mut env: JNIEnv, + _class: JClass, + manifest: JByteArray, + request: JString, +) -> jstring { + let request = read_string(&mut env, &request); + let bytes = if manifest.is_null() { Vec::new() } else { env.convert_byte_array(&manifest).unwrap_or_default() }; + let answer = guarded(None, || Some(service::inspect(&bytes, &request))); + match answer { + Some(text) => new_string(&mut env, &text), + None => std::ptr::null_mut(), + } +} + +struct Listener { + vm: JavaVM, + target: GlobalRef, +} + +impl Listener { + fn with_env<R>(&self, fallback: R, f: impl FnOnce(&mut JNIEnv) -> R) -> R { + let Ok(mut env) = self.vm.attach_current_thread_as_daemon() else { + return fallback; + }; + let out = f(&mut env); + if env.exception_check().unwrap_or(false) { + let _ = env.exception_clear(); + } + out + } + + fn call_text(&self, method: &str, text: &str) { + self.with_env((), |env| { + let Ok(s) = env.new_string(text) else { return }; + let s = JObject::from(s); + let _ = env.call_method(self.target.as_obj(), method, "(Ljava/lang/String;)V", &[JValue::Object(&s)]); + let _ = env.delete_local_ref(s); + }); + } + + fn call_counts(&self, method: &str, a: u64, b: u64, c: u32, d: u32) { + self.with_env((), |env| { + let _ = env.call_method( + self.target.as_obj(), + method, + "(JJII)V", + &[ + JValue::Long(a.min(i64::MAX as u64) as i64), + JValue::Long(b.min(i64::MAX as u64) as i64), + JValue::Int(c.min(i32::MAX as u32) as i32), + JValue::Int(d.min(i32::MAX as u32) as i32), + ], + ); + }); + } + + fn complete(&self, success: bool, cancelled: bool, error: &str, result: &str) { + self.with_env((), |env| { + let (Ok(e), Ok(r)) = (env.new_string(error), env.new_string(result)) else { return }; + let (e, r) = (JObject::from(e), JObject::from(r)); + let _ = env.call_method( + self.target.as_obj(), + "onComplete", + "(ZZLjava/lang/String;Ljava/lang/String;)V", + &[ + JValue::Bool(if success { JNI_TRUE } else { JNI_FALSE }), + JValue::Bool(if cancelled { JNI_TRUE } else { JNI_FALSE }), + JValue::Object(&e), + JValue::Object(&r), + ], + ); + let _ = env.delete_local_ref(e); + let _ = env.delete_local_ref(r); + }); + } +} + +impl Events for Listener { + fn log(&self, line: &str) { + android_log(line); + self.call_text("onLog", line); + } + + fn status(&self, text: &str) { + self.call_text("onStatus", text); + } + + fn checking(&self, done_bytes: u64, total_bytes: u64, files: u32, files_total: u32) { + self.call_counts("onCheck", done_bytes, total_bytes, files, files_total); + } + + fn sizes(&self, pending_bytes: u64, disk_bytes: u64) { + self.with_env((), |env| { + let _ = env.call_method( + self.target.as_obj(), + "onSizes", + "(JJ)V", + &[JValue::Long(pending_bytes as i64), JValue::Long(disk_bytes as i64)], + ); + }); + } + + fn progress(&self, written: u64, total: u64, files: u32, files_total: u32) { + self.call_counts("onProgress", written, total, files, files_total); + } + + fn installing(&self, done: u64, total: u64, files: u32, files_total: u32) { + self.call_counts("onInstall", done, total, files, files_total); + } + + fn before_replace(&self) -> bool { + self.with_env(false, |env| { + match env.call_method(self.target.as_obj(), "beforeReplace", "()Z", &[]) { + Ok(v) => v.z().unwrap_or(false), + Err(_) => false, + } + }) + } +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeInstall( + mut env: JNIEnv, + _class: JClass, + request: JString, + listener: JObject, +) -> jlong { + if listener.is_null() { + return 0; + } + let Ok(vm) = env.get_java_vm() else { return 0 }; + let Ok(target) = env.new_global_ref(&listener) else { return 0 }; + let listener = Listener { vm, target }; + let text = read_string(&mut env, &request); + let parsed = serde_json::from_str::<serde_json::Value>(&text) + .map_err(|_| "The install request could not be read".to_string()) + .and_then(|v| install::Request::from_json(&v)); + let request = match parsed { + Ok(r) => r, + Err(e) => { + listener.complete(false, false, &e, ""); + return 0; + } + }; + let cancel = Arc::new(AtomicBool::new(false)); + let worker_cancel = Arc::clone(&cancel); + let spawned = std::thread::Builder::new().name("epic-install".into()).spawn(move || { + crate::priority::background(); + let result = catch_unwind(AssertUnwindSafe(|| install::run(&request, &worker_cancel, &listener))) + .unwrap_or_else(|_| Err(Stop::Failed("Native Epic install failed: internal error".into()))); + match result { + Ok(done) => listener.complete(true, false, "", &done.to_json().to_string()), + Err(Stop::Cancelled) => listener.complete(false, true, "cancelled", ""), + Err(Stop::Failed(e)) => listener.complete(false, false, &e, ""), + } + }); + if spawned.is_err() { + return 0; + } + Box::into_raw(Box::new(cancel)) as jlong +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeCancel( + _env: JNIEnv, + _class: JClass, + handle: jlong, +) { + let ptr = handle as *const Arc<AtomicBool>; + if let Some(cancel) = unsafe { ptr.as_ref() } { + cancel.store(true, Ordering::SeqCst); + } +} + +#[no_mangle] +pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeRelease( + _env: JNIEnv, + _class: JClass, + handle: jlong, +) { + let ptr = handle as *mut Arc<AtomicBool>; + if !ptr.is_null() { + drop(unsafe { Box::from_raw(ptr) }); + } +} diff --git a/app/src/main/rust/stores/src/epic/install/cache.rs b/app/src/main/rust/stores/src/epic/install/cache.rs new file mode 100644 index 0000000000..bcd8c7cccd --- /dev/null +++ b/app/src/main/rust/stores/src/epic/install/cache.rs @@ -0,0 +1,162 @@ +use std::collections::HashMap; +use std::fs; +use std::io::{Read, Write}; +use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicBool, Ordering}; + +use sha1::{Digest, Sha1}; + +use crate::epic::manifest::{guid_from_hex, guid_text, ChunkInfo}; + +pub fn entry_name(chunk: &ChunkInfo, copy: u32) -> String { + if copy == 0 { + guid_text(&chunk.guid) + } else { + format!("{}.{copy}", guid_text(&chunk.guid)) + } +} + +pub fn store(dir: &Path, name: &str, data: &[u8]) -> Result<PathBuf, String> { + fs::create_dir_all(dir).map_err(|e| format!("chunk cache: {e}"))?; + let path = dir.join(name); + let part = dir.join(format!("{name}.part")); + let result = (|| -> std::io::Result<()> { + let mut f = fs::File::create(&part)?; + f.write_all(data)?; + f.flush()?; + fs::rename(&part, &path) + })(); + if let Err(e) = result { + let _ = fs::remove_file(&part); + return Err(format!("chunk cache write: {e}")); + } + Ok(path) +} + +pub fn remove_partials(dir: &Path) { + if let Ok(entries) = fs::read_dir(dir) { + for e in entries.flatten() { + if e.file_name().to_string_lossy().ends_with(".part") { + let _ = fs::remove_file(e.path()); + } + } + } +} + +fn remove_entry(path: &Path, meta: &fs::Metadata) { + if meta.is_dir() && !meta.file_type().is_symlink() { + let _ = fs::remove_dir_all(path); + } else { + let _ = fs::remove_file(path); + } +} + +fn sha1_of_file(path: &Path, cancel: &AtomicBool) -> Option<[u8; 20]> { + let mut f = fs::File::open(path).ok()?; + let mut h = Sha1::new(); + let mut buf = vec![0u8; 256 * 1024]; + loop { + if cancel.load(Ordering::Relaxed) { + return None; + } + let n = f.read(&mut buf).ok()?; + if n == 0 { + break; + } + h.update(&buf[..n]); + } + Some(h.finalize().into()) +} + +pub fn prepare( + dir: &Path, + chunks: &[ChunkInfo], + needed: &HashMap<u32, u32>, + budget: u64, + cancel: &AtomicBool, +) -> Vec<u32> { + let Ok(entries) = fs::read_dir(dir) else { + return Vec::new(); + }; + let by_name: HashMap<String, u32> = needed + .keys() + .map(|&c| (guid_text(&chunks[c as usize].guid), c)) + .collect(); + let mut candidates: Vec<(u32, u32, PathBuf)> = Vec::new(); + for entry in entries.flatten() { + let path = entry.path(); + let Ok(meta) = fs::symlink_metadata(&path) else { continue }; + let name = entry.file_name().to_string_lossy().into_owned(); + let chunk = by_name.get(&name).copied().filter(|_| name.len() == 32 && guid_from_hex(&name).is_some()); + let usable = meta.is_file() && !meta.file_type().is_symlink(); + match chunk { + Some(c) if usable => { + let info = &chunks[c as usize]; + let len_ok = if info.window_exact { + meta.len() == info.window as u64 + } else { + meta.len() > 0 && meta.len() <= info.window as u64 + }; + if len_ok { + candidates.push((needed[&c], c, path)); + } else { + remove_entry(&path, &meta); + } + } + _ => remove_entry(&path, &meta), + } + } + candidates.sort_unstable_by_key(|(first, _, _)| *first); + let mut kept = Vec::new(); + let mut used = 0u64; + for (_, c, path) in candidates { + let info = &chunks[c as usize]; + let size = fs::metadata(&path).map(|m| m.len()).unwrap_or(u64::MAX); + let fits = used.saturating_add(size) <= budget; + let hash_ok = fits + && match info.sha1 { + Some(expected) => sha1_of_file(&path, cancel) == Some(expected), + None => true, + }; + if hash_ok { + used += size; + kept.push(c); + } else { + let _ = fs::remove_file(&path); + } + } + kept +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::epic::manifest::testing::chunk; + + #[test] + fn keeps_only_valid_needed_entries_within_budget() { + let dir = std::env::temp_dir().join(format!("dd-epic-cache-{}", std::process::id())); + let _ = fs::remove_dir_all(&dir); + fs::create_dir_all(dir.join("subdir")).unwrap(); + let mut chunks = vec![chunk(1, 4), chunk(2, 4), chunk(3, 4), chunk(4, 4)]; + chunks[1].sha1 = Some(Sha1::digest(b"good").into()); + chunks[2].sha1 = Some(Sha1::digest(b"good").into()); + store(&dir, &entry_name(&chunks[0], 0), b"aaaa").unwrap(); + store(&dir, &entry_name(&chunks[1], 0), b"good").unwrap(); + store(&dir, &entry_name(&chunks[2], 0), b"bad!").unwrap(); + store(&dir, &entry_name(&chunks[3], 0), b"dddd").unwrap(); + store(&dir, &entry_name(&chunks[0], 2), b"aaaa").unwrap(); + fs::write(dir.join("junk.part"), b"x").unwrap(); + fs::write(dir.join(entry_name(&chunk(9, 4), 0)), b"zzzz").unwrap(); + let needed: HashMap<u32, u32> = [(0, 5), (1, 1), (2, 2), (3, 9)].into_iter().collect(); + let cancel = AtomicBool::new(false); + let kept = prepare(&dir, &chunks, &needed, 8, &cancel); + assert_eq!(kept, vec![1, 0]); + let mut left: Vec<String> = fs::read_dir(&dir).unwrap().flatten().map(|e| e.file_name().to_string_lossy().into_owned()).collect(); + left.sort(); + let mut want = vec![guid_text(&chunks[0].guid), guid_text(&chunks[1].guid)]; + want.sort(); + assert_eq!(left, want); + let _ = fs::remove_dir_all(&dir); + } +} diff --git a/app/src/main/rust/stores/src/epic/install/delta.rs b/app/src/main/rust/stores/src/epic/install/delta.rs new file mode 100644 index 0000000000..d860e72fcf --- /dev/null +++ b/app/src/main/rust/stores/src/epic/install/delta.rs @@ -0,0 +1,72 @@ +use std::fs; +use std::io::Read; +use std::path::Path; +use std::sync::atomic::{AtomicBool, Ordering}; + +use sha1::{Digest, Sha1}; + +use crate::epic::manifest::Sha1 as Hash; + +pub enum Check { + UpToDate, + Pending { old_size: u64 }, + Cancelled, +} + +fn hash_file(path: &Path, cancel: &AtomicBool) -> Option<Option<Hash>> { + let Ok(mut f) = fs::File::open(path) else { return Some(None) }; + let mut h = Sha1::new(); + let mut buf = vec![0u8; 1024 * 1024]; + loop { + if cancel.load(Ordering::Relaxed) { + return None; + } + match f.read(&mut buf) { + Ok(0) => break, + Ok(n) => h.update(&buf[..n]), + Err(_) => return Some(None), + } + } + Some(Some(h.finalize().into())) +} + +pub fn check(dest: &Path, size: u64, sha1: Option<Hash>, cancel: &AtomicBool) -> Check { + let old_size = match fs::metadata(dest) { + Ok(m) if m.is_file() => m.len(), + _ => return Check::Pending { old_size: 0 }, + }; + let Some(expected) = sha1 else { + return Check::Pending { old_size }; + }; + if old_size != size { + return Check::Pending { old_size }; + } + match hash_file(dest, cancel) { + None => Check::Cancelled, + Some(Some(got)) if got == expected => Check::UpToDate, + Some(_) => Check::Pending { old_size }, + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn up_to_date_needs_size_and_hash() { + let dir = std::env::temp_dir().join(format!("dd-epic-delta-{}", std::process::id())); + fs::create_dir_all(&dir).unwrap(); + let f = dir.join("a.bin"); + fs::write(&f, b"hello").unwrap(); + let good: Hash = Sha1::digest(b"hello").into(); + let cancel = AtomicBool::new(false); + assert!(matches!(check(&f, 5, Some(good), &cancel), Check::UpToDate)); + assert!(matches!(check(&f, 5, None, &cancel), Check::Pending { old_size: 5 })); + assert!(matches!(check(&f, 6, Some(good), &cancel), Check::Pending { old_size: 5 })); + assert!(matches!(check(&f, 5, Some([0; 20]), &cancel), Check::Pending { .. })); + assert!(matches!(check(&dir.join("missing"), 5, Some(good), &cancel), Check::Pending { old_size: 0 })); + cancel.store(true, Ordering::Relaxed); + assert!(matches!(check(&f, 5, Some(good), &cancel), Check::Cancelled)); + let _ = fs::remove_dir_all(&dir); + } +} diff --git a/app/src/main/rust/stores/src/epic/install/mod.rs b/app/src/main/rust/stores/src/epic/install/mod.rs new file mode 100644 index 0000000000..426e3bdcf9 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/install/mod.rs @@ -0,0 +1,321 @@ +pub mod cache; +pub mod delta; +pub mod schedule; +pub mod space; +pub mod staging; +pub mod writer; + +use std::collections::HashMap; +use std::fs; +use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicBool, Ordering}; + +use serde_json::{json, Value}; + +use super::build_info::{self, BuildInfo}; +use super::locale; +use super::manifest::{self, Manifest}; +use super::net; +use schedule::{PlanFile, PlanPart}; + +pub const BESIDE_CACHE_DIR: &str = ".chunks"; +const CHECK_PROGRESS_EVERY: usize = 16; + +pub trait Events: Sync { + fn log(&self, line: &str); + fn status(&self, text: &str); + fn checking(&self, done_bytes: u64, total_bytes: u64, files: u32, files_total: u32); + fn sizes(&self, pending_bytes: u64, disk_bytes: u64); + fn progress(&self, written: u64, total: u64, files: u32, files_total: u32); + fn installing(&self, done: u64, total: u64, files: u32, files_total: u32); + fn before_replace(&self) -> bool; +} + +#[derive(Debug, PartialEq, Eq)] +pub enum Stop { + Cancelled, + Failed(String), +} + +pub struct Request { + pub info: BuildInfo, + pub game_dir: PathBuf, + pub scratch_dir: Option<PathBuf>, + pub storage_label: String, + pub tags: Vec<String>, + pub max_workers: usize, + pub process_workers: usize, + pub ca_bundle: String, +} + +impl Request { + pub fn from_json(v: &Value) -> Result<Request, String> { + let info = v.get("info").and_then(BuildInfo::from_json).ok_or("The manifest could not be fetched")?; + let game_dir = net::str_of(v, "gameDir"); + if game_dir.is_empty() || !game_dir.starts_with('/') { + return Err("No install folder was given".into()); + } + let scratch = net::str_of(v, "scratchDir"); + let tags = v + .get("tags") + .and_then(|t| t.as_array()) + .map(|a| a.iter().filter_map(|t| t.as_str()).map(str::to_string).collect()) + .unwrap_or_default(); + Ok(Request { + info, + game_dir: PathBuf::from(game_dir), + scratch_dir: (!scratch.is_empty()).then(|| PathBuf::from(scratch)), + storage_label: Some(net::str_of(v, "storageLabel")).filter(|s| !s.is_empty()).unwrap_or("storage").to_string(), + tags, + max_workers: v.get("maxWorkers").and_then(|n| n.as_u64()).unwrap_or(32) as usize, + process_workers: v.get("processWorkers").and_then(|n| n.as_u64()).unwrap_or(2) as usize, + ca_bundle: net::str_of(v, "caBundle").to_string(), + }) + } +} + +#[derive(Debug, Default)] +pub struct Finished { + pub build_version: String, + pub launch_exe: String, + pub prereq_name: String, + pub prereq_path: String, + pub prereq_read: bool, + pub deployment_id: String, + pub disk_bytes: u64, + pub bytes_written: u64, + pub files_written: usize, +} + +impl Finished { + pub fn to_json(&self) -> Value { + json!({ + "buildVersion": self.build_version, + "launchExe": self.launch_exe, + "prereqName": self.prereq_name, + "prereqPath": self.prereq_path, + "prereqRead": self.prereq_read, + "deploymentId": self.deployment_id, + "diskBytes": self.disk_bytes, + "bytesWritten": self.bytes_written, + "filesWritten": self.files_written, + }) + } +} + +pub fn safe_relative(path: &str) -> bool { + !path.is_empty() + && !path.starts_with('/') + && path.split('/').all(|seg| !seg.is_empty() && seg != "." && seg != "..") +} + +fn dir_has_entries(dir: &Path) -> bool { + fs::read_dir(dir).map(|mut e| e.next().is_some()).unwrap_or(false) +} + +fn remove_tree(dir: &Path) { + if fs::symlink_metadata(dir).map(|m| m.file_type().is_symlink()).unwrap_or(false) { + let _ = fs::remove_file(dir); + } else { + let _ = fs::remove_dir_all(dir); + } +} + +fn cancelled(cancel: &AtomicBool) -> Result<(), Stop> { + if cancel.load(Ordering::SeqCst) { + Err(Stop::Cancelled) + } else { + Ok(()) + } +} + +pub fn fetch_manifest(info: &BuildInfo, log: &dyn Fn(&str)) -> Result<Manifest, String> { + if info.cdns.is_empty() { + return Err("No CDN in the manifest answer".into()); + } + let bytes = build_info::download_manifest(info, &info.cdns, log).ok_or("The manifest could not be downloaded")?; + manifest::parse(&bytes).map_err(|e| { + log(&format!("manifest parse: {e}")); + "The manifest could not be parsed".to_string() + }) +} + +pub fn run(req: &Request, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finished, Stop> { + let failed = |m: String| Stop::Failed(m); + ev.status("Downloading the manifest…"); + let log = |line: &str| ev.log(line); + let manifest = fetch_manifest(&req.info, &log).map_err(failed)?; + cancelled(cancel)?; + ev.status("Reading the manifest…"); + + let selected = locale::select(&manifest.files, Some(&req.tags)); + for &i in &selected { + let path = &manifest.files[i].path; + if !safe_relative(path) { + return Err(failed(format!("The manifest has an unsafe path: {path}"))); + } + if staging::conflicts(path) { + return Err(failed("The manifest conflicts with the staging folder".into())); + } + } + let disk_bytes: u64 = selected.iter().map(|&i| manifest.files[i].size).sum(); + ev.log(&format!( + "manifest build={} version={} chunk_dir={} files={} selected={} tags={} disk_bytes={disk_bytes}", + manifest.build_version, + manifest.version, + manifest.chunk_folder(), + manifest.files.len(), + selected.len(), + req.tags.join("|"), + )); + + let stage_dir = staging::recover(&req.game_dir).map_err(failed)?; + cancelled(cancel)?; + + ev.status("Checking files…"); + let total_selected = selected.len() as u32; + let mut pending: Vec<(usize, u64)> = Vec::new(); + let mut checked_bytes = 0u64; + for (n, &i) in selected.iter().enumerate() { + let f = &manifest.files[i]; + match delta::check(&req.game_dir.join(&f.path), f.size, f.sha1, cancel) { + delta::Check::Cancelled => return Err(Stop::Cancelled), + delta::Check::UpToDate => {} + delta::Check::Pending { old_size } => pending.push((i, old_size)), + } + checked_bytes += f.size; + if (n + 1) % CHECK_PROGRESS_EVERY == 0 || n + 1 == selected.len() { + ev.checking(checked_bytes, disk_bytes, (n + 1) as u32, total_selected); + } + cancelled(cancel)?; + } + let pending_bytes: u64 = pending.iter().map(|&(i, _)| manifest.files[i].size).sum(); + ev.sizes(pending_bytes, disk_bytes); + + let mut finished = Finished { + build_version: manifest.build_version.clone(), + launch_exe: manifest.launch_exe.clone(), + prereq_name: manifest.prereq_name.clone(), + prereq_path: manifest.prereq_path.clone(), + prereq_read: manifest.prereq_read, + deployment_id: req.info.deployment_id.clone(), + disk_bytes, + ..Default::default() + }; + let beside = req.game_dir.join(BESIDE_CACHE_DIR); + let clean_caches = || { + remove_tree(&beside); + if let Some(s) = &req.scratch_dir { + remove_tree(s); + } + staging::remove_if_idle(&stage_dir); + }; + if pending.is_empty() { + ev.log("every selected file is already up to date"); + clean_caches(); + ev.installing(disk_bytes, disk_bytes, total_selected, total_selected); + return Ok(finished); + } + + let mut plan_files = Vec::with_capacity(pending.len()); + let mut engine_files = Vec::with_capacity(pending.len()); + for &(i, old_size) in &pending { + let f = &manifest.files[i]; + let mut parts = Vec::with_capacity(f.parts.len()); + let mut offset = 0u64; + for part in &f.parts { + let Some(&c) = manifest.chunk_index.get(&part.guid) else { + return Err(failed(format!("The manifest is missing chunk data for {}", f.path))); + }; + let info = &manifest.chunks[c]; + if info.window_exact && part.offset as u64 + part.size as u64 > info.window as u64 { + return Err(failed(format!("A chunk is too short for {}", f.path))); + } + parts.push(PlanPart { chunk: c as u32, chunk_offset: part.offset, size: part.size, file_offset: offset }); + offset += part.size as u64; + } + plan_files.push(PlanFile { size: f.size, parts: parts.clone() }); + engine_files.push(writer::EngineFile { + path: f.path.clone(), + dest: req.game_dir.join(&f.path), + size: f.size, + sha1: f.sha1, + replacing: old_size > 0, + parts, + }); + } + + let scratch = req + .scratch_dir + .clone() + .filter(|_| !dir_has_entries(&beside)) + .filter(|s| !space::same_volume(s, &req.game_dir)); + let sizes: Vec<space::PendingSize> = pending + .iter() + .map(|&(i, old)| space::PendingSize { new_size: manifest.files[i].size, old_size: old }) + .collect(); + let free_game = space::free_bytes(&req.game_dir); + let scratch_space = scratch.as_ref().map(|s| space::Scratch { free: space::free_bytes(s) }); + let plan = space::plan(&sizes, free_game, scratch_space, &req.storage_label).map_err(failed)?; + let cache_dir = match (&scratch, plan.cache_on_scratch) { + (Some(s), true) => s.clone(), + _ => beside.clone(), + }; + cancelled(cancel)?; + + let mut first_use: HashMap<u32, u32> = HashMap::new(); + let mut position = 0u32; + for f in &plan_files { + for p in &f.parts { + first_use.entry(p.chunk).or_insert(position); + position += 1; + } + } + let reused = cache::prepare(&cache_dir, &manifest.chunks, &first_use, plan.cache_budget, cancel); + cancelled(cancel)?; + let windows: Vec<u32> = manifest.chunks.iter().map(|c| c.window).collect(); + let schedule = schedule::build(&plan_files, &windows, plan.cache_budget, &reused); + + let prefixes = build_info::chunk_prefixes(&req.info.cdns); + if prefixes.is_empty() { + return Err(failed("No CDN in the manifest answer".into())); + } + ev.log(&format!( + "plan mode={} pending_files={} pending_bytes={pending_bytes} fetches={} reused={} cache={} \ +cache_budget_mib={} overlap_mib={} free_game={free_game} workers={} process_workers={}{}", + if plan.narrow { "narrow" } else { "adaptive" }, + pending.len(), + schedule.fetch.len(), + reused.len(), + if plan.cache_on_scratch { "scratch" } else { "beside-game" }, + plan.cache_budget / space::MIB, + plan.overlap.map(|o| (o / space::MIB).to_string()).unwrap_or_else(|| "unlimited".into()), + req.max_workers, + req.process_workers, + if plan.cache_moved_beside_game { " note=internal-storage-full" } else { "" }, + )); + + let input = writer::EngineInput { + manifest: &manifest, + files: engine_files, + schedule, + stage_dir: stage_dir.clone(), + cache_dir, + prefixes, + overlap: plan.overlap, + narrow: plan.narrow, + max_workers: req.max_workers, + process_workers: req.process_workers, + ca_bundle: req.ca_bundle.clone(), + user_agent: net::user_agent(), + }; + let stats = writer::run(&input, cancel, ev)?; + finished.bytes_written = stats.bytes_written; + finished.files_written = stats.files_written; + clean_caches(); + ev.installing(disk_bytes, disk_bytes, total_selected, total_selected); + Ok(finished) +} + +#[cfg(test)] +mod tests; diff --git a/app/src/main/rust/stores/src/epic/install/schedule.rs b/app/src/main/rust/stores/src/epic/install/schedule.rs new file mode 100644 index 0000000000..005a31dbd6 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/install/schedule.rs @@ -0,0 +1,237 @@ +use std::collections::{BTreeSet, HashMap}; + +pub const NONE: u32 = u32::MAX; + +#[derive(Clone, Debug)] +pub struct PlanPart { + pub chunk: u32, + pub chunk_offset: u32, + pub size: u32, + pub file_offset: u64, +} + +#[derive(Clone, Debug)] +pub struct PlanFile { + pub size: u64, + pub parts: Vec<PlanPart>, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Producer { + pub chunk: u32, + pub anchor: u32, + pub preloaded: bool, + pub copy: u32, + pub uses: Vec<u32>, +} + +#[derive(Debug)] +pub struct Schedule { + pub file_start: Vec<u32>, + pub use_file: Vec<u32>, + pub use_producer: Vec<u32>, + pub producers: Vec<Producer>, + pub fetch: Vec<u32>, + pub peak_cache: u64, + pub refetches: u32, +} + +impl Schedule { + pub fn uses_of_file(&self, file: usize) -> std::ops::Range<usize> { + self.file_start[file] as usize..self.file_start[file + 1] as usize + } +} + +pub fn build(files: &[PlanFile], windows: &[u32], budget: u64, cached: &[u32]) -> Schedule { + let mut file_start = Vec::with_capacity(files.len() + 1); + let mut use_chunk = Vec::new(); + let mut use_file = Vec::new(); + for (f, file) in files.iter().enumerate() { + file_start.push(use_chunk.len() as u32); + for part in &file.parts { + use_chunk.push(part.chunk); + use_file.push(f as u32); + } + } + file_start.push(use_chunk.len() as u32); + let total = use_chunk.len(); + + let mut next_use = vec![NONE; total]; + let mut first_use: HashMap<u32, u32> = HashMap::new(); + { + let mut seen: HashMap<u32, u32> = HashMap::new(); + for u in (0..total).rev() { + let c = use_chunk[u]; + if let Some(&n) = seen.get(&c) { + next_use[u] = n; + } + seen.insert(c, u as u32); + } + for (c, u) in seen { + first_use.insert(c, u); + } + } + + let window = |c: u32| windows.get(c as usize).copied().unwrap_or(0) as u64; + let mut producers: Vec<Producer> = Vec::new(); + let mut fetch = Vec::new(); + let mut use_producer = vec![NONE; total]; + let mut active: HashMap<u32, u32> = HashMap::new(); + let mut copies: HashMap<u32, u32> = HashMap::new(); + let mut resident: HashMap<u32, u32> = HashMap::new(); + let mut by_next: BTreeSet<(u32, u32)> = BTreeSet::new(); + let mut occupancy = 0u64; + let mut peak = 0u64; + + let mut preload: Vec<(u32, u32)> = cached + .iter() + .filter_map(|&c| first_use.get(&c).map(|&u| (u, c))) + .collect(); + preload.sort_unstable(); + preload.dedup_by_key(|(_, c)| *c); + for (u, c) in preload { + if occupancy + window(c) > budget { + continue; + } + occupancy += window(c); + let id = producers.len() as u32; + producers.push(Producer { chunk: c, anchor: NONE, preloaded: true, copy: 0, uses: Vec::new() }); + copies.insert(c, 1); + active.insert(c, id); + resident.insert(c, u); + by_next.insert((u, c)); + } + peak = peak.max(occupancy); + + for u in 0..total { + let (c, f) = (use_chunk[u], use_file[u]); + let valid = active + .get(&c) + .copied() + .filter(|&p| producers[p as usize].anchor == f || resident.contains_key(&c)); + let p = match valid { + Some(p) => p, + None => { + let id = producers.len() as u32; + let copy = copies.entry(c).or_insert(0); + producers.push(Producer { chunk: c, anchor: f, preloaded: false, copy: *copy, uses: Vec::new() }); + *copy += 1; + fetch.push(id); + active.insert(c, id); + id + } + }; + producers[p as usize].uses.push(u as u32); + use_producer[u] = p; + + let next = next_use[u]; + if next == NONE { + if let Some(pos) = resident.remove(&c) { + by_next.remove(&(pos, c)); + occupancy -= window(c); + } + active.remove(&c); + continue; + } + if let Some(pos) = resident.get_mut(&c) { + by_next.remove(&(*pos, c)); + *pos = next; + by_next.insert((next, c)); + continue; + } + if use_file[next as usize] == f { + continue; + } + loop { + if occupancy + window(c) <= budget { + occupancy += window(c); + resident.insert(c, next); + by_next.insert((next, c)); + peak = peak.max(occupancy); + break; + } + match by_next.iter().next_back().copied() { + Some((far, victim)) if far > next => { + by_next.remove(&(far, victim)); + resident.remove(&victim); + occupancy -= window(victim); + } + _ => break, + } + } + } + + let refetches = producers.iter().filter(|p| !p.preloaded && p.copy > 0).count() as u32; + Schedule { file_start, use_file, use_producer, producers, fetch, peak_cache: peak, refetches } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn file(chunks: &[u32]) -> PlanFile { + let mut off = 0; + PlanFile { + size: chunks.len() as u64 * 10, + parts: chunks + .iter() + .map(|&c| { + let p = PlanPart { chunk: c, chunk_offset: 0, size: 10, file_offset: off }; + off += 10; + p + }) + .collect(), + } + } + + #[test] + fn single_use_chunks_are_fetched_once_and_never_cached() { + let s = build(&[file(&[0, 1]), file(&[2])], &[10, 10, 10], 1000, &[]); + assert_eq!(s.fetch.len(), 3); + assert_eq!(s.peak_cache, 0); + assert_eq!(s.refetches, 0); + assert_eq!(s.uses_of_file(1), 2..3); + } + + #[test] + fn repeats_inside_one_file_need_no_cache() { + let s = build(&[file(&[0, 0, 0])], &[10], 0, &[]); + assert_eq!(s.fetch.len(), 1); + assert_eq!(s.producers[0].uses, vec![0, 1, 2]); + } + + #[test] + fn a_chunk_shared_across_files_is_kept_within_budget() { + let s = build(&[file(&[0, 1]), file(&[0])], &[10, 10], 10, &[]); + assert_eq!(s.fetch.len(), 2); + assert_eq!(s.peak_cache, 10); + assert_eq!(s.use_producer[2], s.use_producer[0]); + } + + #[test] + fn without_budget_a_later_file_refetches() { + let s = build(&[file(&[0, 1]), file(&[0])], &[10, 10], 0, &[]); + assert_eq!(s.fetch.len(), 3); + assert_eq!(s.refetches, 1); + assert_eq!(s.producers[2].copy, 1); + assert_eq!(s.producers[2].anchor, 1); + } + + #[test] + fn eviction_drops_the_chunk_needed_furthest_away() { + let files = [file(&[0, 1]), file(&[1]), file(&[1]), file(&[0])]; + let s = build(&files, &[10, 10], 10, &[]); + let fetched: Vec<u32> = s.fetch.iter().map(|&p| s.producers[p as usize].chunk).collect(); + assert_eq!(fetched, vec![0, 1, 0]); + assert_eq!(s.peak_cache, 10); + } + + #[test] + fn cached_chunks_are_reused_soonest_first() { + let s = build(&[file(&[0]), file(&[1]), file(&[2])], &[10, 10, 10], 20, &[2, 0, 1, 7]); + assert!(s.fetch.is_empty() || s.fetch.iter().all(|&p| s.producers[p as usize].chunk == 2)); + let preloaded: Vec<u32> = s.producers.iter().filter(|p| p.preloaded).map(|p| p.chunk).collect(); + assert_eq!(preloaded, vec![0, 1]); + assert_eq!(s.fetch.len(), 1); + } +} diff --git a/app/src/main/rust/stores/src/epic/install/space.rs b/app/src/main/rust/stores/src/epic/install/space.rs new file mode 100644 index 0000000000..2302f35513 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/install/space.rs @@ -0,0 +1,266 @@ +use std::path::Path; + +pub const MIB: u64 = 1024 * 1024; +pub const TRANSIENT: u64 = 64 * MIB; +pub const CACHE_CAP: u64 = 1024 * MIB; +pub const CACHE_WHEN_UNKNOWN: u64 = 256 * MIB; +pub const MIN_USEFUL_SCRATCH: u64 = 64 * MIB; + +pub fn free_bytes(path: &Path) -> i64 { + let mut probe = Some(path); + while let Some(p) = probe { + if p.exists() { + return statvfs_available(p); + } + probe = p.parent(); + } + -1 +} + +#[cfg(unix)] +fn statvfs_available(path: &Path) -> i64 { + use std::os::unix::ffi::OsStrExt; + let Ok(c) = std::ffi::CString::new(path.as_os_str().as_bytes()) else { + return -1; + }; + let mut st: libc::statvfs = unsafe { std::mem::zeroed() }; + if unsafe { libc::statvfs(c.as_ptr(), &mut st) } != 0 { + return -1; + } + (st.f_bavail as u64).saturating_mul(st.f_frsize as u64).min(i64::MAX as u64) as i64 +} + +#[cfg(not(unix))] +fn statvfs_available(_path: &Path) -> i64 { + -1 +} + +pub fn same_volume(a: &Path, b: &Path) -> bool { + #[cfg(unix)] + { + use std::os::unix::fs::MetadataExt; + let dev = |p: &Path| { + let mut probe = Some(p); + while let Some(q) = probe { + if let Ok(m) = std::fs::metadata(q) { + return Some(m.dev()); + } + probe = q.parent(); + } + None + }; + matches!((dev(a), dev(b)), (Some(x), Some(y)) if x == y) + } + #[cfg(not(unix))] + { + let _ = (a, b); + false + } +} + +pub fn human(bytes: u64) -> String { + const GIB: f64 = 1024.0 * 1024.0 * 1024.0; + let b = bytes as f64; + if b >= GIB { + format!("{:.1} GB", b / GIB) + } else if b >= MIB as f64 { + format!("{:.1} MB", b / MIB as f64) + } else if b >= 1024.0 { + format!("{:.0} KB", b / 1024.0) + } else { + format!("{bytes} B") + } +} + +#[derive(Clone, Copy, Debug)] +pub struct PendingSize { + pub new_size: u64, + pub old_size: u64, +} + +#[derive(Clone, Copy, Debug)] +pub struct Scratch { + pub free: i64, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct SpacePlan { + pub cache_on_scratch: bool, + pub cache_budget: u64, + pub overlap: Option<u64>, + pub narrow: bool, + pub cache_moved_beside_game: bool, + pub game_need: u64, + pub net_peak: u64, +} + +fn fits(need: u64, free: i64) -> bool { + free < 0 || need <= free as u64 +} + +fn half_of_rest(free: i64, other: u64) -> u64 { + if free < 0 { + return CACHE_WHEN_UNKNOWN; + } + ((free as u64).saturating_sub(other).saturating_sub(TRANSIENT) / 2).min(CACHE_CAP) +} + +pub fn net_peak(pending: &[PendingSize]) -> u64 { + let mut running: i128 = 0; + let mut peak: i128 = 0; + for p in pending { + peak = peak.max(running + p.new_size as i128); + running += p.new_size as i128 - p.old_size as i128; + } + peak.max(0) as u64 +} + +pub fn plan(pending: &[PendingSize], free_game: i64, scratch: Option<Scratch>, label: &str) -> Result<SpacePlan, String> { + let peak = net_peak(pending); + let largest_replaced = pending.iter().filter(|p| p.old_size > 0).map(|p| p.new_size).max(); + + let mut cache_on_scratch = false; + let mut moved = false; + let mut budget = 0; + if let Some(s) = scratch { + let b = half_of_rest(s.free, 0); + if s.free < 0 || b >= MIN_USEFUL_SCRATCH { + cache_on_scratch = true; + budget = b; + } else { + moved = true; + } + } + if !cache_on_scratch { + budget = half_of_rest(free_game, peak); + } + let cache_on_game = if cache_on_scratch { 0 } else { budget + TRANSIENT }; + let overlap = largest_replaced.map(|largest| { + if free_game < 0 { + largest + } else { + largest.max((free_game as u64).saturating_sub(peak).saturating_sub(cache_on_game)) + } + }); + let game_need = peak + overlap.unwrap_or(0) + cache_on_game; + + if let Some(s) = scratch.filter(|_| cache_on_scratch) { + let need = budget + TRANSIENT; + if !fits(need, s.free) { + return Err(format!( + "Not enough internal space for the download cache: it needs {}, {} is free", + human(need), + human(s.free.max(0) as u64) + )); + } + } + if fits(game_need, free_game) { + return Ok(SpacePlan { + cache_on_scratch, + cache_budget: budget, + overlap, + narrow: false, + cache_moved_beside_game: moved, + game_need, + net_peak: peak, + }); + } + if fits(peak, free_game) { + return Ok(SpacePlan { + cache_on_scratch: false, + cache_budget: 0, + overlap: Some(0), + narrow: true, + cache_moved_beside_game: moved, + game_need: peak, + net_peak: peak, + }); + } + let free = free_game.max(0) as u64; + let mut message = format!( + "Not enough space on {label} for this install: it needs {}, {} is free ({} short)", + human(peak), + human(free), + human(peak.saturating_sub(free)) + ); + if moved { + message.push_str(". The download cache had to move beside the game because internal storage is full"); + } + Err(message) +} + +#[cfg(test)] +mod tests { + use super::*; + + const GB: u64 = 1024 * MIB; + + fn fresh(sizes: &[u64]) -> Vec<PendingSize> { + sizes.iter().map(|&s| PendingSize { new_size: s, old_size: 0 }).collect() + } + + #[test] + fn net_peak_credits_old_copies_at_their_swap() { + assert_eq!(net_peak(&fresh(&[10, 20])), 30); + let update = vec![ + PendingSize { new_size: 100, old_size: 90 }, + PendingSize { new_size: 50, old_size: 60 }, + ]; + assert_eq!(net_peak(&update), 100); + assert_eq!(net_peak(&[PendingSize { new_size: 5, old_size: 500 }]), 5); + assert_eq!(net_peak(&[]), 0); + } + + #[test] + fn a_fresh_install_has_no_overlap_limit() { + let p = plan(&fresh(&[2 * GB]), (10 * GB) as i64, None, "Internal").unwrap(); + assert_eq!(p.overlap, None); + assert!(!p.narrow && !p.cache_on_scratch); + assert_eq!(p.cache_budget, CACHE_CAP); + } + + #[test] + fn unknown_free_space_is_never_no_space() { + let p = plan(&fresh(&[50 * GB]), -1, Some(Scratch { free: -1 }), "Card").unwrap(); + assert!(p.cache_on_scratch); + assert_eq!(p.cache_budget, CACHE_WHEN_UNKNOWN); + let update = vec![PendingSize { new_size: GB, old_size: GB }]; + assert_eq!(plan(&update, -1, None, "Card").unwrap().overlap, Some(GB)); + } + + #[test] + fn scratch_too_small_moves_the_cache_beside_the_game() { + let p = plan(&fresh(&[GB]), (20 * GB) as i64, Some(Scratch { free: (100 * MIB) as i64 }), "Card").unwrap(); + assert!(!p.cache_on_scratch && p.cache_moved_beside_game); + } + + #[test] + fn tight_space_falls_back_to_one_file_at_a_time() { + let pending = fresh(&[GB, GB]); + let free = (2 * GB + 10 * MIB) as i64; + let p = plan(&pending, free, None, "Internal").unwrap(); + assert!(p.narrow); + assert_eq!(p.cache_budget, 0); + assert_eq!(p.game_need, 2 * GB); + } + + #[test] + fn not_fitting_names_the_storage_and_shortfall() { + let err = plan(&fresh(&[3 * GB]), GB as i64, None, "SD card").unwrap_err(); + assert!(err.contains("SD card"), "{err}"); + assert!(err.contains("2.0 GB short"), "{err}"); + assert!(plan(&fresh(&[1]), 0, None, "x").is_err()); + assert!(plan(&fresh(&[0]), 0, None, "x").is_ok()); + } + + #[test] + fn updates_get_an_overlap_budget_of_at_least_the_largest_replaced_file() { + let update = vec![ + PendingSize { new_size: GB, old_size: GB }, + PendingSize { new_size: 2 * GB, old_size: 2 * GB }, + ]; + let p = plan(&update, (40 * GB) as i64, None, "Internal").unwrap(); + assert!(p.overlap.unwrap() >= 2 * GB); + assert!(!p.narrow); + } +} diff --git a/app/src/main/rust/stores/src/epic/install/staging.rs b/app/src/main/rust/stores/src/epic/install/staging.rs new file mode 100644 index 0000000000..31b0b4ab61 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/install/staging.rs @@ -0,0 +1,174 @@ +use std::fs; +use std::io::Write; +use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicU64, Ordering}; + +pub const DIR_NAME: &str = ".droiddeck-epic-staging"; +pub const OWNER_FILE: &str = "owner"; +pub const OWNER_MARKER: &[u8] = b"DroidDeck Epic staging v1\n"; +const SUFFIX: &str = ".stage"; + +static SEQUENCE: AtomicU64 = AtomicU64::new(0); + +pub fn conflicts(manifest_path: &str) -> bool { + let first = manifest_path.trim_start_matches('/').split('/').next().unwrap_or(""); + first.eq_ignore_ascii_case(DIR_NAME) +} + +pub fn unique_name() -> String { + let nanos = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map(|d| d.subsec_nanos()) + .unwrap_or(0); + format!( + "epic-{}-{}-{nanos}{SUFFIX}", + std::process::id(), + SEQUENCE.fetch_add(1, Ordering::Relaxed) + ) +} + +fn write_marker(path: &Path) -> Result<(), String> { + let mut f = fs::File::create(path).map_err(|e| format!("staging marker: {e}"))?; + f.write_all(OWNER_MARKER).map_err(|e| format!("staging marker: {e}"))?; + f.sync_all().map_err(|e| format!("staging marker: {e}"))?; + Ok(()) +} + +pub fn recover(game_dir: &Path) -> Result<PathBuf, String> { + fs::create_dir_all(game_dir).map_err(|e| format!("game folder: {e}"))?; + let game = fs::canonicalize(game_dir).map_err(|e| format!("game folder: {e}"))?; + let expected = game.join(DIR_NAME); + let dir = game_dir.join(DIR_NAME); + let refuse = |why: &str| Err(format!("The staging folder {DIR_NAME} is not usable ({why}); nothing was changed")); + + match fs::symlink_metadata(&dir) { + Err(e) if e.kind() == std::io::ErrorKind::NotFound => { + fs::create_dir(&dir).map_err(|e| format!("staging folder: {e}"))?; + write_marker(&expected.join(OWNER_FILE))?; + return Ok(expected); + } + Err(e) => return Err(format!("staging folder: {e}")), + Ok(meta) => { + if meta.file_type().is_symlink() || !meta.is_dir() { + return refuse("not a plain directory"); + } + } + } + let canonical = fs::canonicalize(&dir).map_err(|e| format!("staging folder: {e}"))?; + if canonical != expected { + return refuse("it resolves elsewhere"); + } + + let mut stale = Vec::new(); + let mut owner_ok = false; + let mut others = 0usize; + let entries = fs::read_dir(&canonical).map_err(|e| format!("staging folder: {e}"))?; + for entry in entries { + let entry = entry.map_err(|e| format!("staging folder: {e}"))?; + let name = entry.file_name().to_string_lossy().into_owned(); + let path = canonical.join(&name); + let meta = fs::symlink_metadata(&path).map_err(|e| format!("staging folder: {e}"))?; + if meta.file_type().is_symlink() || !meta.is_file() { + return refuse("it holds something that is not a plain file"); + } + if fs::canonicalize(&path).ok().as_deref().and_then(Path::parent) != Some(canonical.as_path()) { + return refuse("an entry resolves elsewhere"); + } + if name == OWNER_FILE { + match fs::read(&path) { + Ok(content) if content == OWNER_MARKER => owner_ok = true, + _ => return refuse("its owner marker is not ours"), + } + } else if name.ends_with(SUFFIX) { + stale.push(path); + others += 1; + } else { + return refuse("it holds an unexpected file"); + } + } + if !owner_ok { + if others == 0 { + write_marker(&canonical.join(OWNER_FILE))?; + return Ok(canonical); + } + return refuse("its owner marker is missing"); + } + for path in stale { + fs::remove_file(&path).map_err(|e| format!("removing an old stage file: {e}"))?; + } + Ok(canonical) +} + +pub fn remove_if_idle(dir: &Path) { + let Ok(entries) = fs::read_dir(dir) else { return }; + let names: Vec<String> = entries.flatten().map(|e| e.file_name().to_string_lossy().into_owned()).collect(); + if names.iter().all(|n| n == OWNER_FILE) { + let marker = dir.join(OWNER_FILE); + if names.is_empty() || fs::read(&marker).map(|c| c == OWNER_MARKER).unwrap_or(false) { + let _ = fs::remove_file(&marker); + let _ = fs::remove_dir(dir); + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn temp(name: &str) -> PathBuf { + let dir = std::env::temp_dir().join(format!("dd-epic-staging-{name}-{}", std::process::id())); + let _ = fs::remove_dir_all(&dir); + fs::create_dir_all(&dir).unwrap(); + dir + } + + #[test] + fn creates_validates_and_cleans() { + let game = temp("ok"); + let dir = recover(&game).unwrap(); + assert_eq!(fs::read(dir.join(OWNER_FILE)).unwrap(), OWNER_MARKER); + fs::write(dir.join("file-1.stage"), b"x").unwrap(); + fs::write(dir.join("stream-1-2-3.stage"), b"y").unwrap(); + fs::write(game.join("keep.stage"), b"z").unwrap(); + recover(&game).unwrap(); + assert_eq!(fs::read_dir(&dir).unwrap().count(), 1); + assert!(game.join("keep.stage").exists()); + remove_if_idle(&dir); + assert!(!dir.exists()); + let _ = fs::remove_dir_all(&game); + } + + #[test] + fn foreign_contents_are_left_alone() { + let game = temp("foreign"); + let dir = game.join(DIR_NAME); + fs::create_dir_all(&dir).unwrap(); + fs::write(dir.join(OWNER_FILE), b"someone else\n").unwrap(); + fs::write(dir.join("a.stage"), b"x").unwrap(); + assert!(recover(&game).is_err()); + assert!(dir.join("a.stage").exists()); + fs::write(dir.join(OWNER_FILE), OWNER_MARKER).unwrap(); + fs::write(dir.join("notes.txt"), b"x").unwrap(); + assert!(recover(&game).is_err()); + assert!(dir.join("a.stage").exists()); + let _ = fs::remove_dir_all(&game); + } + + #[test] + fn a_file_in_place_of_the_folder_is_refused() { + let game = temp("file"); + fs::write(game.join(DIR_NAME), b"x").unwrap(); + assert!(recover(&game).is_err()); + let _ = fs::remove_dir_all(&game); + } + + #[test] + fn manifest_conflicts_and_names() { + assert!(conflicts(".droiddeck-epic-staging/x")); + assert!(conflicts(".DroidDeck-Epic-Staging")); + assert!(!conflicts("Game/.droiddeck-epic-staging")); + let (a, b) = (unique_name(), unique_name()); + assert_ne!(a, b); + assert!(a.ends_with(".stage")); + } +} diff --git a/app/src/main/rust/stores/src/epic/install/tests.rs b/app/src/main/rust/stores/src/epic/install/tests.rs new file mode 100644 index 0000000000..2a75fb8a66 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/install/tests.rs @@ -0,0 +1,270 @@ +use std::collections::HashMap; +use std::io::{BufRead, BufReader, Write}; +use std::net::{TcpListener, TcpStream}; +use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; +use std::sync::{Arc, Mutex}; + +use sha1::{Digest, Sha1}; + +use super::*; +use crate::epic::build_info::Cdn; +use crate::epic::chunk::testing::encode; +use crate::epic::manifest::testing::{build, chunk, TestFile, TestManifest}; +use crate::epic::manifest::{guid_text, PartRef}; + +fn serve(files: HashMap<String, Vec<u8>>, hits: Arc<AtomicUsize>) -> String { + let listener = TcpListener::bind("127.0.0.1:0").unwrap(); + let addr = listener.local_addr().unwrap(); + let files = Arc::new(files); + std::thread::spawn(move || { + for stream in listener.incoming() { + let Ok(stream) = stream else { continue }; + let files = Arc::clone(&files); + let hits = Arc::clone(&hits); + std::thread::spawn(move || answer(stream, &files, &hits)); + } + }); + format!("http://{addr}") +} + +fn answer(mut stream: TcpStream, files: &HashMap<String, Vec<u8>>, hits: &AtomicUsize) { + let mut reader = BufReader::new(stream.try_clone().unwrap()); + let mut first = String::new(); + if reader.read_line(&mut first).is_err() { + return; + } + loop { + let mut line = String::new(); + match reader.read_line(&mut line) { + Ok(0) | Err(_) => break, + Ok(_) if line == "\r\n" => break, + Ok(_) => {} + } + } + let path = first.split_whitespace().nth(1).unwrap_or("/").split('?').next().unwrap_or("/").to_string(); + hits.fetch_add(1, Ordering::Relaxed); + let (status, body) = match files.get(&path) { + Some(b) => ("200 OK", b.clone()), + None => ("404 Not Found", Vec::new()), + }; + let head = format!("HTTP/1.1 {status}\r\nContent-Length: {}\r\nConnection: close\r\n\r\n", body.len()); + let _ = stream.write_all(head.as_bytes()); + let _ = stream.write_all(&body); + let _ = stream.flush(); +} + +#[derive(Default)] +struct Recorder { + logs: Mutex<Vec<String>>, + replaced: AtomicUsize, + refuse: bool, + last_progress: Mutex<(u64, u64)>, + sizes: Mutex<(u64, u64)>, +} + +impl Events for Recorder { + fn log(&self, line: &str) { + self.logs.lock().unwrap().push(line.to_string()); + } + fn status(&self, _text: &str) {} + fn checking(&self, _d: u64, _t: u64, _f: u32, _ft: u32) {} + fn sizes(&self, pending: u64, disk: u64) { + *self.sizes.lock().unwrap() = (pending, disk); + } + fn progress(&self, written: u64, total: u64, _f: u32, _ft: u32) { + let mut p = self.last_progress.lock().unwrap(); + if written >= p.0 { + *p = (written, total); + } + } + fn installing(&self, _d: u64, _t: u64, _f: u32, _ft: u32) {} + fn before_replace(&self) -> bool { + self.replaced.fetch_add(1, Ordering::SeqCst); + !self.refuse + } +} + +struct Fixture { + base: String, + hits: Arc<AtomicUsize>, + expected: Vec<(String, Vec<u8>)>, +} + +fn pattern(seed: u8, len: usize) -> Vec<u8> { + (0..len).map(|i| seed.wrapping_mul(31).wrapping_add((i * 7 % 251) as u8)).collect() +} + +fn fixture() -> Fixture { + let mut c1 = chunk(1, 4096); + let mut c2 = chunk(2, 2048); + let mut c3 = chunk(3, 1000); + let d1 = pattern(1, 4096); + let d2 = pattern(2, 2048); + let d3 = pattern(3, 1000); + c1.sha1 = Some(Sha1::digest(&d1).into()); + c2.sha1 = Some(Sha1::digest(&d2).into()); + c3.sha1 = Some(Sha1::digest(&d3).into()); + + let a: Vec<u8> = [&d1[..3000], &d2[100..1100]].concat(); + let c: Vec<u8> = [&d1[3000..], &d3[..]].concat(); + let d: Vec<u8> = d2[..100].to_vec(); + let sha = |b: &[u8]| -> [u8; 20] { Sha1::digest(b).into() }; + let files = vec![ + TestFile { + path: "a.bin".into(), + sha1: sha(&a), + tags: vec![], + parts: vec![ + PartRef { guid: c1.guid, offset: 0, size: 3000 }, + PartRef { guid: c2.guid, offset: 100, size: 1000 }, + ], + }, + TestFile { + path: "b\\c.bin".into(), + sha1: sha(&c), + tags: vec!["English".into()], + parts: vec![ + PartRef { guid: c1.guid, offset: 3000, size: 1096 }, + PartRef { guid: c3.guid, offset: 0, size: 1000 }, + ], + }, + TestFile { + path: "d.bin".into(), + sha1: sha(&d), + tags: vec![], + parts: vec![PartRef { guid: c2.guid, offset: 0, size: 100 }], + }, + TestFile { path: "e.txt".into(), sha1: [0; 20], tags: vec![], parts: vec![] }, + TestFile { + path: "fr.txt".into(), + sha1: [0; 20], + tags: vec!["French".into()], + parts: vec![PartRef { guid: c3.guid, offset: 0, size: 10 }], + }, + ]; + let m = TestManifest { + version: 21, + build: "9.9".into(), + exe: "a.bin".into(), + prereq: Some(("Redist".into(), "redist\\setup.exe".into())), + chunks: vec![c1.clone(), c2.clone(), c3.clone()], + files, + compress: true, + meta_tail: vec![], + }; + let manifest_bytes = build(&m); + let parsed = crate::epic::manifest::parse(&manifest_bytes).unwrap(); + let mut served = HashMap::new(); + served.insert("/Builds/x/test.manifest".to_string(), manifest_bytes); + for (info, data) in [(&c1, &d1), (&c2, &d2), (&c3, &d3)] { + served.insert(format!("/Builds/x/{}", parsed.chunk_path(info)), encode(data, true)); + } + let hits = Arc::new(AtomicUsize::new(0)); + let base = serve(served, Arc::clone(&hits)); + Fixture { + base, + hits, + expected: vec![ + ("a.bin".into(), a), + ("b/c.bin".into(), c), + ("d.bin".into(), d), + ("e.txt".into(), Vec::new()), + ], + } +} + +fn request(fx: &Fixture, game: &Path) -> Request { + Request { + info: BuildInfo { + cdns: vec![Cdn { base: fx.base.clone(), dir: "/Builds/x".into(), auth: String::new() }], + manifest_file: "test.manifest".into(), + build_version: "9.9".into(), + deployment_id: "dep".into(), + }, + game_dir: game.to_path_buf(), + scratch_dir: None, + storage_label: "Test storage".into(), + tags: vec!["English".into(), "en-US".into(), "en".into()], + max_workers: 4, + process_workers: 2, + ca_bundle: String::new(), + } +} + +fn temp_game(name: &str) -> PathBuf { + let dir = std::env::temp_dir().join(format!("dd-epic-install-{name}-{}", std::process::id())); + let _ = fs::remove_dir_all(&dir); + dir +} + +#[test] +fn fresh_install_then_rerun_then_repair() { + let fx = fixture(); + let game = temp_game("e2e"); + let cancel = AtomicBool::new(false); + + let events = Recorder::default(); + let done = run(&request(&fx, &game), &cancel, &events).unwrap(); + for (path, bytes) in &fx.expected { + assert_eq!(&fs::read(game.join(path)).unwrap(), bytes, "{path}"); + } + assert!(!game.join("fr.txt").exists()); + assert_eq!(done.build_version, "9.9"); + assert_eq!(done.launch_exe, "a.bin"); + assert_eq!(done.prereq_path, "redist/setup.exe"); + assert!(done.prereq_read); + assert_eq!(done.deployment_id, "dep"); + assert_eq!(done.disk_bytes, 4000 + 2096 + 100); + assert_eq!(events.replaced.load(Ordering::SeqCst), 1); + assert_eq!(*events.last_progress.lock().unwrap(), (6196, 6196)); + assert!(!game.join(BESIDE_CACHE_DIR).exists()); + assert!(!game.join(staging::DIR_NAME).exists()); + + let hits_before = fx.hits.load(Ordering::Relaxed); + let again = Recorder::default(); + run(&request(&fx, &game), &cancel, &again).unwrap(); + assert_eq!(fx.hits.load(Ordering::Relaxed) - hits_before, 1, "only the manifest is fetched"); + assert_eq!(again.sizes.lock().unwrap().0, 0); + assert_eq!(again.replaced.load(Ordering::SeqCst), 1); + + fs::write(game.join("b/c.bin"), b"damaged").unwrap(); + let repair = Recorder::default(); + run(&request(&fx, &game), &cancel, &repair).unwrap(); + assert_eq!(fs::read(game.join("b/c.bin")).unwrap(), fx.expected[1].1); + assert_eq!(repair.sizes.lock().unwrap().0, 2096 + 0, "the damaged file and the hashless empty file"); + let _ = fs::remove_dir_all(&game); +} + +#[test] +fn a_refused_update_switch_replaces_nothing() { + let fx = fixture(); + let game = temp_game("refuse"); + fs::create_dir_all(&game).unwrap(); + fs::write(game.join("a.bin"), b"old contents").unwrap(); + let cancel = AtomicBool::new(false); + let events = Recorder { refuse: true, ..Default::default() }; + let err = run(&request(&fx, &game), &cancel, &events).unwrap_err(); + assert!(matches!(err, Stop::Failed(_)), "{err:?}"); + assert_eq!(fs::read(game.join("a.bin")).unwrap(), b"old contents"); + let stage = game.join(staging::DIR_NAME); + let leftovers = fs::read_dir(&stage).map(|e| e.flatten().filter(|e| e.file_name() != "owner").count()).unwrap_or(0); + assert_eq!(leftovers, 0); + let _ = fs::remove_dir_all(&game); +} + +#[test] +fn a_cancelled_run_reports_cancel() { + let fx = fixture(); + let game = temp_game("cancel"); + let cancel = AtomicBool::new(true); + let events = Recorder::default(); + assert_eq!(run(&request(&fx, &game), &cancel, &events).unwrap_err(), Stop::Cancelled); + let _ = fs::remove_dir_all(&game); +} + +#[test] +fn guid_names_are_cache_names() { + let c = chunk(5, 10); + assert_eq!(cache::entry_name(&c, 0), guid_text(&c.guid)); + assert_eq!(cache::entry_name(&c, 2), format!("{}.2", guid_text(&c.guid))); +} diff --git a/app/src/main/rust/stores/src/epic/install/writer.rs b/app/src/main/rust/stores/src/epic/install/writer.rs new file mode 100644 index 0000000000..3a7e93a0e1 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/install/writer.rs @@ -0,0 +1,593 @@ +use std::fs::{self, File, OpenOptions}; +use std::os::unix::fs::FileExt; +use std::path::PathBuf; +use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering}; +use std::sync::{Arc, Condvar, Mutex}; +use std::time::{Duration, Instant}; + +use sha1::{Digest, Sha1}; + +use super::cache; +use super::schedule::{PlanPart, Schedule, NONE}; +use super::{staging, Events, Stop}; +use crate::epic::chunk; +use crate::epic::manifest::{Manifest, Sha1 as Hash}; +use crate::fetch_core::{run_fetch_gated, FetchItem, FetchOptions, FetchSink, SinkError}; + +const ADMIT_AHEAD: usize = 48; +const PROGRESS_EVERY_MS: u64 = 50; +const STUCK_AFTER: Duration = Duration::from_secs(10); + +pub struct EngineFile { + pub path: String, + pub dest: PathBuf, + pub size: u64, + pub sha1: Option<Hash>, + pub replacing: bool, + pub parts: Vec<PlanPart>, +} + +pub struct EngineInput<'a> { + pub manifest: &'a Manifest, + pub files: Vec<EngineFile>, + pub schedule: Schedule, + pub stage_dir: PathBuf, + pub cache_dir: PathBuf, + pub prefixes: Vec<String>, + pub overlap: Option<u64>, + pub narrow: bool, + pub max_workers: usize, + pub process_workers: usize, + pub ca_bundle: String, + pub user_agent: String, +} + +#[derive(Debug, Default)] +pub struct Stats { + pub bytes_written: u64, + pub files_written: usize, +} + +struct Slot { + file: Option<Arc<File>>, + stage: Option<PathBuf>, + written: Vec<bool>, + next_hash: usize, + hasher: Option<Sha1>, + left: usize, + done: bool, +} + +struct Coord { + next_file: usize, + open: usize, + open_replacing: u64, + processed: Vec<bool>, + remaining: Vec<u32>, + cached: Vec<bool>, + served: Vec<bool>, + fetch_done: bool, +} + +struct Engine<'a> { + input: &'a EngineInput<'a>, + slots: Vec<Mutex<Slot>>, + coord: Mutex<Coord>, + wake: Condvar, + admitted: AtomicUsize, + hint: AtomicUsize, + stop: &'a AtomicBool, + failure: Mutex<Option<String>>, + written: AtomicU64, + files_done: AtomicUsize, + last_emit: AtomicU64, + started: Instant, + replace_ok: Mutex<Option<bool>>, + events: &'a dyn Events, + total_bytes: u64, +} + +enum Source<'d> { + Memory(&'d [u8]), + Cache(PathBuf), +} + +impl<'a> Engine<'a> { + fn fail(&self, message: String) -> String { + let mut slot = self.failure.lock().expect("failure lock"); + if slot.is_none() { + *slot = Some(message.clone()); + } + drop(slot); + self.stop.store(true, Ordering::SeqCst); + self.wake.notify_all(); + message + } + + fn cache_path(&self, producer: usize) -> PathBuf { + let p = &self.input.schedule.producers[producer]; + let info = &self.input.manifest.chunks[p.chunk as usize]; + self.input.cache_dir.join(cache::entry_name(info, p.copy)) + } + + fn emit(&self, force: bool) { + let now = self.started.elapsed().as_millis() as u64; + let last = self.last_emit.load(Ordering::Relaxed); + if !force && now < last + PROGRESS_EVERY_MS { + return; + } + if self.last_emit.compare_exchange(last, now, Ordering::Relaxed, Ordering::Relaxed).is_err() && !force { + return; + } + self.events.progress( + self.written.load(Ordering::Relaxed), + self.total_bytes, + self.files_done.load(Ordering::Relaxed) as u32, + self.input.files.len() as u32, + ); + } + + fn admissible(&self, c: &Coord, f: usize) -> bool { + let file = &self.input.files[f]; + if self.input.narrow { + return c.open == 0; + } + if !file.replacing { + return true; + } + match self.input.overlap { + None => true, + Some(budget) => c.open_replacing == 0 || c.open_replacing + file.size <= budget, + } + } + + fn admit_target(&self, fetch_done: bool) -> usize { + let fetch = &self.input.schedule.fetch; + if fetch_done || fetch.is_empty() { + return self.input.files.len(); + } + let at = (self.hint.load(Ordering::Relaxed) + ADMIT_AHEAD).min(fetch.len() - 1); + self.input.schedule.producers[fetch[at] as usize].anchor as usize + 1 + } + + fn write_use(&self, u: usize, source: &Source<'_>) -> Result<(), String> { + let schedule = &self.input.schedule; + let f = schedule.use_file[u] as usize; + let j = u - schedule.file_start[f] as usize; + let file = &self.input.files[f]; + let part = &file.parts[j]; + let loaded; + let data: &[u8] = match source { + Source::Memory(d) => d, + Source::Cache(path) => { + loaded = fs::read(path).map_err(|e| format!("chunk cache read for {}: {e}", file.path))?; + &loaded + } + }; + let start = part.chunk_offset as usize; + let end = start + part.size as usize; + if end > data.len() { + return Err(format!("A chunk is too short for {}", file.path)); + } + let piece = &data[start..end]; + let handle = self.slots[f].lock().expect("slot lock").file.clone(); + let Some(handle) = handle else { + return Err(format!("internal: {} is not open", file.path)); + }; + handle + .write_all_at(piece, part.file_offset) + .map_err(|e| format!("Could not assemble or atomically replace {}: {e}", file.path))?; + self.written.fetch_add(piece.len() as u64, Ordering::Relaxed); + + let complete = { + let mut slot = self.slots[f].lock().expect("slot lock"); + slot.written[j] = true; + if slot.hasher.is_some() { + while slot.next_hash < file.parts.len() && slot.written[slot.next_hash] { + let k = slot.next_hash; + if k == j { + slot.hasher.as_mut().expect("hasher").update(piece); + } else { + let other = &file.parts[k]; + let mut buf = vec![0u8; other.size as usize]; + handle + .read_exact_at(&mut buf, other.file_offset) + .map_err(|e| format!("Could not read back {}: {e}", file.path))?; + slot.hasher.as_mut().expect("hasher").update(&buf); + } + slot.next_hash += 1; + } + } + slot.left -= 1; + slot.left == 0 + }; + + let p = schedule.use_producer[u] as usize; + let drop_cache = { + let mut c = self.coord.lock().expect("coord lock"); + c.remaining[p] -= 1; + c.remaining[p] == 0 && c.cached[p] + }; + if drop_cache { + let _ = fs::remove_file(self.cache_path(p)); + } + if complete { + self.finish_file(f)?; + } + self.emit(false); + Ok(()) + } + + fn finish_file(&self, f: usize) -> Result<(), String> { + let file = &self.input.files[f]; + let (handle, stage, hash) = { + let mut slot = self.slots[f].lock().expect("slot lock"); + slot.done = true; + (slot.file.take(), slot.stage.clone(), slot.hasher.take().map(|h| -> Hash { h.finalize().into() })) + }; + let stage = stage.ok_or_else(|| format!("internal: {} has no stage file", file.path))?; + let result = (|| -> Result<(), String> { + let handle = handle.ok_or_else(|| format!("internal: {} is not open", file.path))?; + handle + .sync_all() + .map_err(|e| format!("Could not assemble or atomically replace {}: {e}", file.path))?; + let len = handle.metadata().map(|m| m.len()).unwrap_or(u64::MAX); + drop(handle); + if len != file.size { + return Err(format!("Size mismatch for {}", file.path)); + } + if let (Some(expected), Some(got)) = (file.sha1, hash) { + if expected != got { + return Err(format!("SHA-1 mismatch for {}", file.path)); + } + } + if self.stop.load(Ordering::SeqCst) { + return Err(String::new()); + } + { + let mut ok = self.replace_ok.lock().expect("replace lock"); + if ok.is_none() { + *ok = Some(self.events.before_replace()); + } + if *ok != Some(true) { + return Err("The install record could not be switched to updating; nothing was replaced".into()); + } + } + if let Some(parent) = file.dest.parent() { + fs::create_dir_all(parent) + .map_err(|e| format!("Could not assemble or atomically replace {}: {e}", file.path))?; + } + fs::rename(&stage, &file.dest) + .map_err(|e| format!("Could not assemble or atomically replace {}: {e}", file.path)) + })(); + if let Err(e) = result { + let _ = fs::remove_file(&stage); + return Err(e); + } + { + let mut c = self.coord.lock().expect("coord lock"); + c.open -= 1; + if file.replacing { + c.open_replacing = c.open_replacing.saturating_sub(file.size); + } + } + self.files_done.fetch_add(1, Ordering::Relaxed); + self.wake.notify_all(); + self.emit(true); + Ok(()) + } + + fn open_stage(&self, f: usize) -> Result<(), String> { + let path = self.input.stage_dir.join(staging::unique_name()); + let handle = OpenOptions::new() + .read(true) + .write(true) + .create_new(true) + .open(&path) + .map_err(|e| format!("Could not stage {}: {e}", self.input.files[f].path))?; + let mut slot = self.slots[f].lock().expect("slot lock"); + slot.file = Some(Arc::new(handle)); + slot.stage = Some(path); + Ok(()) + } + + fn admit_loop(&self) { + let n = self.input.files.len(); + let mut last_change = Instant::now(); + let mut last_seen = (usize::MAX, usize::MAX); + loop { + if self.stop.load(Ordering::SeqCst) { + return; + } + let done = self.files_done.load(Ordering::Relaxed); + if done == n { + return; + } + let candidate = { + let c = self.coord.lock().expect("coord lock"); + let target = self.admit_target(c.fetch_done); + if c.next_file < target.min(n) && self.admissible(&c, c.next_file) { + Some(c.next_file) + } else { + if c.fetch_done && c.next_file == n { + let seen = (done, self.written.load(Ordering::Relaxed) as usize); + if seen != last_seen { + last_seen = seen; + last_change = Instant::now(); + } else if last_change.elapsed() > STUCK_AFTER { + drop(c); + self.fail("internal: some files never completed".into()); + return; + } + } + let _ = self.wake.wait_timeout(c, Duration::from_millis(20)).expect("coord lock"); + None + } + }; + let Some(f) = candidate else { continue }; + if let Err(e) = self.admit(f) { + self.fail(e); + return; + } + } + } + + fn admit(&self, f: usize) -> Result<(), String> { + self.open_stage(f)?; + let schedule = &self.input.schedule; + let file = &self.input.files[f]; + let claims: Vec<usize> = { + let mut c = self.coord.lock().expect("coord lock"); + c.next_file += 1; + c.open += 1; + if file.replacing { + c.open_replacing += file.size; + } + let mut out = Vec::new(); + for u in schedule.uses_of_file(f) { + let p = schedule.use_producer[u] as usize; + if c.processed[p] && !c.served[u] { + c.served[u] = true; + out.push(u); + } + } + out + }; + self.admitted.store(f + 1, Ordering::SeqCst); + for u in claims { + let p = schedule.use_producer[u] as usize; + self.write_use(u, &Source::Cache(self.cache_path(p)))?; + } + if file.parts.is_empty() { + self.finish_file(f)?; + } + Ok(()) + } + + fn deliver(&self, fetch_index: usize, body: Vec<u8>) -> Result<u64, SinkError> { + if self.stop.load(Ordering::SeqCst) { + return Ok(0); + } + let schedule = &self.input.schedule; + let p = schedule.fetch[fetch_index] as usize; + let producer = &schedule.producers[p]; + let info = &self.input.manifest.chunks[producer.chunk as usize]; + let data = chunk::decode(&body, info).map_err(SinkError::Retry)?; + drop(body); + let needs_cache = { + let c = self.coord.lock().expect("coord lock"); + producer.uses.iter().any(|&u| schedule.use_file[u as usize] as usize >= c.next_file) + }; + if needs_cache { + cache::store(&self.input.cache_dir, &cache::entry_name(info, producer.copy), &data) + .map_err(|e| SinkError::Fatal(self.fail(e)))?; + } + let claims: Vec<usize> = { + let mut c = self.coord.lock().expect("coord lock"); + c.processed[p] = true; + c.cached[p] = needs_cache; + let mut out = Vec::new(); + for &u in &producer.uses { + let u = u as usize; + if (schedule.use_file[u] as usize) < c.next_file && !c.served[u] { + c.served[u] = true; + out.push(u); + } + } + out + }; + for u in claims { + self.write_use(u, &Source::Memory(&data)).map_err(|e| SinkError::Fatal(self.fail(e)))?; + } + Ok(0) + } +} + +struct Sink<'e, 'a>(&'e Engine<'a>); + +impl FetchSink for Sink<'_, '_> { + fn process(&self, item: &FetchItem, body: Vec<u8>) -> Result<u64, SinkError> { + self.0.deliver(item.id as usize, body) + } +} + +pub fn run(input: &EngineInput<'_>, stop: &AtomicBool, events: &dyn Events) -> Result<Stats, Stop> { + let schedule = &input.schedule; + let total_uses = schedule.use_file.len(); + let mut remaining = vec![0u32; schedule.producers.len()]; + for &p in &schedule.use_producer { + if p != NONE { + remaining[p as usize] += 1; + } + } + let mut processed = vec![false; schedule.producers.len()]; + let mut cached = vec![false; schedule.producers.len()]; + for (i, p) in schedule.producers.iter().enumerate() { + if p.preloaded { + processed[i] = true; + cached[i] = true; + } + } + let engine = Engine { + input, + slots: input + .files + .iter() + .map(|f| { + Mutex::new(Slot { + file: None, + stage: None, + written: vec![false; f.parts.len()], + next_hash: 0, + hasher: f.sha1.map(|_| Sha1::new()), + left: f.parts.len(), + done: false, + }) + }) + .collect(), + coord: Mutex::new(Coord { + next_file: 0, + open: 0, + open_replacing: 0, + processed, + remaining: remaining.clone(), + cached, + served: vec![false; total_uses], + fetch_done: false, + }), + wake: Condvar::new(), + admitted: AtomicUsize::new(0), + hint: AtomicUsize::new(0), + stop, + failure: Mutex::new(None), + written: AtomicU64::new(0), + files_done: AtomicUsize::new(0), + last_emit: AtomicU64::new(0), + started: Instant::now(), + replace_ok: Mutex::new(None), + events, + total_bytes: input.files.iter().map(|f| f.size).sum(), + }; + for (i, p) in schedule.producers.iter().enumerate() { + if p.preloaded && remaining[i] == 0 { + let _ = fs::remove_file(engine.cache_path(i)); + } + } + + let hosts: Vec<String> = input.prefixes.iter().map(|p| crate::epic::net::origin(p)).collect(); + let items: Vec<FetchItem> = schedule + .fetch + .iter() + .enumerate() + .map(|(i, &p)| { + let info = &input.manifest.chunks[schedule.producers[p as usize].chunk as usize]; + let path = input.manifest.chunk_path(info); + FetchItem { + id: i as u64, + urls: input.prefixes.iter().map(|prefix| format!("{prefix}/{path}")).collect(), + reserve: info.cdn_size, + range: None, + } + }) + .collect(); + let distinct = crate::fetch_core::distinct_host_count(&hosts); + let workers = input.max_workers.clamp(1, 128); + let options = FetchOptions { + max_workers: workers, + per_host_cap: 6usize.max(workers.div_ceil(distinct.max(1))), + timeout: Duration::from_secs(60), + headers: vec![("User-Agent".to_string(), input.user_agent.clone())], + ca_bundle_path: input.ca_bundle.clone(), + process_workers: input.process_workers.max(1), + label: "epic".to_string(), + stream: false, + }; + + events.progress(0, engine.total_bytes, 0, input.files.len() as u32); + let log = |line: &str| events.log(line); + let gate = |i: usize| -> bool { + engine.hint.fetch_max(i, Ordering::Relaxed); + let p = schedule.fetch[i] as usize; + let ready = (schedule.producers[p].anchor as usize) < engine.admitted.load(Ordering::SeqCst); + if !ready { + engine.wake.notify_all(); + } + ready + }; + let outcome = std::thread::scope(|scope| { + let admitter = std::thread::Builder::new() + .name("epic-admit".into()) + .spawn_scoped(scope, || { + crate::priority::background(); + engine.admit_loop(); + }); + if let Err(e) = admitter { + engine.fail(format!("could not start the install thread: {e}")); + return None; + } + let outcome = if items.is_empty() { + None + } else { + Some(run_fetch_gated(items, &hosts, &options, &Sink(&engine), stop, &|_: u64, _: u64| {}, &log, &gate)) + }; + { + let mut c = engine.coord.lock().expect("coord lock"); + c.fetch_done = true; + } + if outcome.as_ref().is_some_and(|o| !o.ok()) { + stop.store(true, Ordering::SeqCst); + } + engine.wake.notify_all(); + outcome + }); + + let failure = engine.failure.lock().expect("failure lock").take().filter(|m| !m.is_empty()); + let fetch_error = outcome.as_ref().and_then(|o| o.error.clone()); + let complete = failure.is_none() && engine.files_done.load(Ordering::Relaxed) == input.files.len(); + + if !complete { + for slot in &engine.slots { + let mut s = slot.lock().expect("slot lock"); + if !s.done { + s.file.take(); + if let Some(stage) = s.stage.take() { + let _ = fs::remove_file(stage); + } + } + } + cache::remove_partials(&input.cache_dir); + } + + let elapsed = engine.started.elapsed().as_secs_f64().max(0.001); + let written = engine.written.load(Ordering::Relaxed); + events.log(&format!( + "summary mode={} files={}/{} bytes_written={written} elapsed_s={elapsed:.1} avg_mbps={:.1} \ +fetches={} refetches={} peak_cache_mib={} hosts={}", + if input.narrow { "narrow" } else { "adaptive" }, + engine.files_done.load(Ordering::Relaxed), + input.files.len(), + written as f64 / 1_048_576.0 / elapsed, + schedule.fetch.len(), + schedule.refetches, + schedule.peak_cache / 1_048_576, + hosts.join(","), + )); + + if let Some(message) = failure { + return Err(Stop::Failed(message)); + } + if complete { + return Ok(Stats { bytes_written: written, files_written: input.files.len() }); + } + if let Some(message) = fetch_error { + return Err(Stop::Failed(format!("Download failed: {}", tidy_fetch_error(&message)))); + } + if stop.load(Ordering::SeqCst) { + return Err(Stop::Cancelled); + } + Err(Stop::Failed("The download ended before every file was written".into())) +} + +fn tidy_fetch_error(message: &str) -> String { + message.strip_prefix("epic: ").unwrap_or(message).to_string() +} diff --git a/app/src/main/rust/stores/src/epic/jni.rs b/app/src/main/rust/stores/src/epic/jni.rs deleted file mode 100644 index 937d6e42ae..0000000000 --- a/app/src/main/rust/stores/src/epic/jni.rs +++ /dev/null @@ -1,487 +0,0 @@ -//! JNI exports for `com.droiddeck.launcher.stores.epic.EpicNative`. -//! -//! ```text -//! nativeStart(manifest: byte[], installDir: String, chunkCacheDir: String, cdnPrefixes: String[], -//! pendingFileIdx: int[], expectedChunks: int, expectedBytes: long, -//! caBundlePath: String, maxWorkers: int, processWorkers: int, -//! listener: EpicNative.Listener) -> long handle (0 = not started) -//! nativeAssemble(manifest: byte[], installDir: String, chunkCacheDir: String, fileIdx: int[], -//! listener: EpicNative.Listener) -> long handle (0 = not started) -//! nativeCancel(handle) — flips the run's AtomicBool; fetch or assembly stops promptly -//! nativeRelease(handle) — frees the handle (after onComplete) -//! ``` -//! `chunkCacheDir` = "" keeps the cache at `<installDir>/.chunks`; any other directory is a -//! scratch cache (see `assemble.rs`). Listener (all methods run on native threads): -//! `onPlan(int chunksTotal, long bytesTotal, String chunkDir)` once before any fetch, -//! `onProgress(long bytesDone, long bytesTotal, int done, int total)` per chunk fetched (or, in -//! an assembly run, per file written), `onLog(String line)`, -//! `onComplete(boolean success, String error, long bytes)`. -//! -//! Planning (manifest parse + cross-check) runs synchronously on the calling thread so a plan -//! failure returns 0 BEFORE any fetch and Java can fall back to its own pool; the fetch runs on -//! a new thread. JavaVM attach / GlobalRef handling is the same shape as the GOG facade. - -use std::sync::atomic::{AtomicBool, Ordering}; -use std::sync::Arc; -use std::thread; - -use jni::objects::{GlobalRef, JByteArray, JClass, JIntArray, JObject, JObjectArray, JString, JValue}; -use jni::sys::{jint, jlong, JNI_FALSE, JNI_TRUE}; -use jni::{JNIEnv, JavaVM}; - -use super::assemble::{build_assemble_plan, run_assemble, AssembleRequest}; -use super::driver::{build_plan, run_plan, EpicRequest}; - -#[cfg(target_os = "android")] -#[link(name = "log")] -unsafe extern "C" { - fn __android_log_write(prio: i32, tag: *const i8, text: *const i8) -> i32; -} - -fn android_log(message: &str) { - #[cfg(target_os = "android")] - { - use std::ffi::CString; - let Ok(tag) = CString::new(super::LOG_TAG) else { - return; - }; - let sanitized = message.replace('\0', " "); - let Ok(text) = CString::new(sanitized) else { - return; - }; - unsafe { - let _ = __android_log_write(4, tag.as_ptr().cast(), text.as_ptr().cast()); - } - } - #[cfg(not(target_os = "android"))] - { - let _ = message; - } -} - -/// Per-run native state behind the `jlong` handle — the same type for a fetch run and an -/// assembly run, so one `nativeCancel` / `nativeRelease` pair serves both. -pub struct EpicDownloadHandle { - cancel: Arc<AtomicBool>, -} - -fn clear_pending_exception(env: &mut JNIEnv) { - if env.exception_check().unwrap_or(false) { - let _ = env.exception_clear(); - } -} - -fn jstring_to_string(env: &mut JNIEnv, value: &JString) -> Option<String> { - env.get_string(value) - .ok() - .map(|s| s.to_string_lossy().into_owned()) -} - -fn string_array_to_vec(env: &mut JNIEnv, array: &JObjectArray) -> Vec<String> { - let len = env.get_array_length(array).unwrap_or(0); - let mut out = Vec::with_capacity(len.max(0) as usize); - let mut i = 0; - while i < len { - match env.get_object_array_element(array, i) { - Ok(obj) => { - if obj.is_null() { - out.push(String::new()); - } else { - let js = JString::from(obj); - out.push(jstring_to_string(env, &js).unwrap_or_default()); - } - } - Err(_) => { - clear_pending_exception(env); - out.push(String::new()); - } - } - i += 1; - } - out -} - -fn int_array_to_vec(env: &JNIEnv, array: &JIntArray) -> Vec<i32> { - let len = env.get_array_length(array).unwrap_or(0); - if len <= 0 { - return Vec::new(); - } - let mut values = vec![0i32; len as usize]; - if env.get_int_array_region(array, 0, &mut values).is_err() { - return Vec::new(); - } - values -} - -fn call_on_log(env: &mut JNIEnv, listener: &JObject, line: &str) { - if listener.is_null() { - return; - } - let Ok(s) = env.new_string(line) else { - clear_pending_exception(env); - return; - }; - let obj = JObject::from(s); - let _ = env.call_method( - listener, - "onLog", - "(Ljava/lang/String;)V", - &[JValue::Object(&obj)], - ); - clear_pending_exception(env); -} - -fn call_on_plan(env: &mut JNIEnv, listener: &JObject, chunks_total: u64, bytes_total: u64, chunk_dir: &str) { - if listener.is_null() { - return; - } - let Ok(s) = env.new_string(chunk_dir) else { - clear_pending_exception(env); - return; - }; - let obj = JObject::from(s); - let _ = env.call_method( - listener, - "onPlan", - "(IJLjava/lang/String;)V", - &[ - JValue::Int(chunks_total.min(i32::MAX as u64) as jint), - JValue::Long(bytes_total as jlong), - JValue::Object(&obj), - ], - ); - clear_pending_exception(env); -} - -fn call_on_progress( - env: &mut JNIEnv, - listener: &JObject, - bytes_done: u64, - bytes_total: u64, - chunks_done: u64, - chunks_total: u64, -) { - if listener.is_null() { - return; - } - let _ = env.call_method( - listener, - "onProgress", - "(JJII)V", - &[ - JValue::Long(bytes_done as jlong), - JValue::Long(bytes_total as jlong), - JValue::Int(chunks_done.min(i32::MAX as u64) as jint), - JValue::Int(chunks_total.min(i32::MAX as u64) as jint), - ], - ); - clear_pending_exception(env); -} - -fn call_on_complete(env: &mut JNIEnv, listener: &JObject, success: bool, error: &str, bytes: u64) { - if listener.is_null() { - return; - } - let Ok(s) = env.new_string(error) else { - clear_pending_exception(env); - return; - }; - let obj = JObject::from(s); - let _ = env.call_method( - listener, - "onComplete", - "(ZLjava/lang/String;J)V", - &[ - JValue::Bool(if success { JNI_TRUE } else { JNI_FALSE }), - JValue::Object(&obj), - JValue::Long(bytes as jlong), - ], - ); - clear_pending_exception(env); -} - -/// Log to logcat AND to the listener (the Kotlin manager mirrors it into its own debug log). -fn log_both(env: &mut JNIEnv, listener: &JObject, line: &str) { - android_log(line); - call_on_log(env, listener, line); -} - -#[no_mangle] -pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeStart( - mut env: JNIEnv, - _class: JClass, - manifest: JByteArray, - install_dir: JString, - chunk_cache_dir: JString, - cdn_prefixes: JObjectArray, - pending_file_idx: JIntArray, - expected_chunks: jint, - expected_bytes: jlong, - ca_bundle_path: JString, - max_workers: jint, - process_workers: jint, - listener: JObject, -) -> jlong { - if listener.is_null() { - android_log("nativeStart: null listener"); - return 0; - } - let Ok(manifest_bytes) = env.convert_byte_array(manifest) else { - clear_pending_exception(&mut env); - call_on_complete(&mut env, &listener, false, "manifest bytes unreadable", 0); - return 0; - }; - let install_dir = jstring_to_string(&mut env, &install_dir).unwrap_or_default(); - let chunk_cache_dir = jstring_to_string(&mut env, &chunk_cache_dir).unwrap_or_default(); - let cdn_prefixes = string_array_to_vec(&mut env, &cdn_prefixes); - let pending_file_indices: Vec<usize> = int_array_to_vec(&env, &pending_file_idx) - .into_iter() - .map(|i| i.max(0) as usize) - .collect(); - let ca_bundle_path = jstring_to_string(&mut env, &ca_bundle_path).unwrap_or_default(); - let max_workers = max_workers.max(1) as usize; - let process_workers = process_workers.max(1) as usize; - let label = { - let base = std::path::Path::new(&install_dir) - .file_name() - .map(|s| s.to_string_lossy().into_owned()) - .unwrap_or_default(); - format!("epic app={base}") - }; - - let host_count = super::plan::distinct_prefixes(&cdn_prefixes).len(); - let host_cap = super::plan::per_host_cap(max_workers, host_count); - log_both( - &mut env, - &listener, - &format!( - "engine=rust label=\"{label}\" install_dir={install_dir} cache_dir={} cdns={} hosts={host_count} pending_files={} workers={max_workers} per_host_cap={host_cap} process_workers={process_workers} manifest_bytes={}", - if chunk_cache_dir.is_empty() { "<installDir>/.chunks" } else { chunk_cache_dir.as_str() }, - cdn_prefixes.len(), - pending_file_indices.len(), - manifest_bytes.len() - ), - ); - - let req = EpicRequest { - manifest_bytes, - install_dir, - chunk_cache_dir, - cdn_prefixes, - pending_file_indices, - expected_chunks: if expected_chunks >= 0 { - Some(expected_chunks as u64) - } else { - None - }, - expected_bytes: if expected_bytes >= 0 { - Some(expected_bytes as u64) - } else { - None - }, - ca_bundle_path, - max_workers, - process_workers, - label, - }; - - let plan = match build_plan(&req) { - Ok(plan) => plan, - Err(err) => { - log_both(&mut env, &listener, &format!("not started: {err}")); - call_on_complete(&mut env, &listener, false, &err, 0); - return 0; - } - }; - call_on_plan( - &mut env, - &listener, - plan.needed.len() as u64, - plan.total_bytes, - &plan.manifest.chunk_dir, - ); - - let Ok(vm) = env.get_java_vm() else { - clear_pending_exception(&mut env); - call_on_complete(&mut env, &listener, false, "JavaVM unavailable", 0); - return 0; - }; - let Ok(listener) = env.new_global_ref(&listener) else { - clear_pending_exception(&mut env); - call_on_complete(&mut env, &listener, false, "listener ref failed", 0); - return 0; - }; - - let cancel = Arc::new(AtomicBool::new(false)); - let thread_cancel = Arc::clone(&cancel); - let handle = Box::new(EpicDownloadHandle { cancel }); - - thread::spawn(move || { - crate::priority::background(); - run_on_thread(vm, listener, plan, req, thread_cancel); - }); - - Box::into_raw(handle) as jlong -} - -fn run_on_thread( - vm: JavaVM, - listener: GlobalRef, - plan: super::driver::EpicPlan, - req: EpicRequest, - cancel: Arc<AtomicBool>, -) { - let bytes_total = plan.total_bytes; - let chunks_total = plan.needed.len() as u64; - - // Progress fires from the core's process-pool threads; attach each as a daemon like the - // Steam engine's `dispatch_download_progress` does. - let progress = |bytes_done: u64, chunks_done: u64| { - let Ok(mut env) = vm.attach_current_thread_as_daemon() else { - return; - }; - call_on_progress( - &mut env, - listener.as_obj(), - bytes_done, - bytes_total, - chunks_done, - chunks_total, - ); - }; - let log = |line: &str| { - android_log(line); - let Ok(mut env) = vm.attach_current_thread_as_daemon() else { - return; - }; - call_on_log(&mut env, listener.as_obj(), line); - }; - - let outcome = run_plan(&plan, &req, cancel.as_ref(), &progress, &log); - - let Ok(mut env) = vm.attach_current_thread_as_daemon() else { - return; - }; - call_on_complete( - &mut env, - listener.as_obj(), - outcome.success, - &outcome.error, - outcome.bytes_credited, - ); -} - -/// `EpicNative.nativeAssemble(manifest, installDir, chunkCacheDir, fileIdx, listener)`: write -/// the files `fileIdx` names from the chunk cache (see `assemble.rs`). Parse + plan run on the -/// calling thread, so bad inputs return 0 (after `onComplete(false, reason, 0)`) before anything -/// is written; the assembly runs on a new thread and reports per file through `onProgress(bytes, -/// bytesTotal, filesDone, filesTotal)`, then `onComplete(success, error, bytesWritten)`. -#[no_mangle] -pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeAssemble( - mut env: JNIEnv, - _class: JClass, - manifest: JByteArray, - install_dir: JString, - chunk_cache_dir: JString, - file_idx: JIntArray, - listener: JObject, -) -> jlong { - if listener.is_null() { - android_log("nativeAssemble: null listener"); - return 0; - } - let Ok(manifest_bytes) = env.convert_byte_array(manifest) else { - clear_pending_exception(&mut env); - call_on_complete(&mut env, &listener, false, "manifest bytes unreadable", 0); - return 0; - }; - let req = AssembleRequest { - manifest_bytes, - install_dir: jstring_to_string(&mut env, &install_dir).unwrap_or_default(), - chunk_cache_dir: jstring_to_string(&mut env, &chunk_cache_dir).unwrap_or_default(), - file_indices: int_array_to_vec(&env, &file_idx) - .into_iter() - .map(|i| i.max(0) as usize) - .collect(), - }; - let plan = match build_assemble_plan(&req) { - Ok(plan) => plan, - Err(err) => { - log_both(&mut env, &listener, &format!("not started: {err}")); - call_on_complete(&mut env, &listener, false, &err, 0); - return 0; - } - }; - let Ok(vm) = env.get_java_vm() else { - clear_pending_exception(&mut env); - call_on_complete(&mut env, &listener, false, "JavaVM unavailable", 0); - return 0; - }; - let Ok(listener) = env.new_global_ref(&listener) else { - clear_pending_exception(&mut env); - call_on_complete(&mut env, &listener, false, "listener ref failed", 0); - return 0; - }; - - let cancel = Arc::new(AtomicBool::new(false)); - let thread_cancel = Arc::clone(&cancel); - let handle = Box::new(EpicDownloadHandle { cancel }); - - thread::spawn(move || { - crate::priority::background(); - let progress = |bytes_done: u64, bytes_total: u64, files_done: u64, files_total: u64| { - let Ok(mut env) = vm.attach_current_thread_as_daemon() else { - return; - }; - call_on_progress(&mut env, listener.as_obj(), bytes_done, bytes_total, files_done, files_total); - }; - let log = |line: &str| { - android_log(line); - let Ok(mut env) = vm.attach_current_thread_as_daemon() else { - return; - }; - call_on_log(&mut env, listener.as_obj(), line); - }; - let outcome = run_assemble(&plan, thread_cancel.as_ref(), &progress, &log); - let Ok(mut env) = vm.attach_current_thread_as_daemon() else { - return; - }; - call_on_complete( - &mut env, - listener.as_obj(), - outcome.success, - &outcome.error, - outcome.bytes_written, - ); - }); - - Box::into_raw(handle) as jlong -} - -#[no_mangle] -pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeCancel( - _env: JNIEnv, - _class: JClass, - handle: jlong, -) { - if handle == 0 { - return; - } - let handle = unsafe { &*(handle as *const EpicDownloadHandle) }; - handle.cancel.store(true, Ordering::Relaxed); - android_log("cancel requested"); -} - -#[no_mangle] -pub extern "system" fn Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeRelease( - _env: JNIEnv, - _class: JClass, - handle: jlong, -) { - if handle == 0 { - return; - } - // The worker thread owns its own Arc clone of the cancel flag and its own GlobalRef, so - // freeing the handle is safe even if a (cancelled) run is still winding down. - drop(unsafe { Box::from_raw(handle as *mut EpicDownloadHandle) }); -} diff --git a/app/src/main/rust/stores/src/epic/launch.rs b/app/src/main/rust/stores/src/epic/launch.rs new file mode 100644 index 0000000000..481e9b8255 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/launch.rs @@ -0,0 +1,77 @@ +#[derive(Clone, Debug, Default)] +pub struct LaunchData { + pub display_name: String, + pub account_id: String, + pub namespace: String, + pub locale: String, + pub app_name: String, + pub deployment_id: String, + pub additional: String, +} + +fn clean(value: &str) -> String { + value.chars().filter(|c| !matches!(c, '\r' | '\n' | '\0')).collect() +} + +pub fn arguments(d: &LaunchData) -> Vec<String> { + let name = clean(&d.display_name).replace('"', ""); + let name = if name.trim().is_empty() { "EpicUser".to_string() } else { name }; + let account = Some(clean(&d.account_id)).filter(|a| !a.is_empty()).unwrap_or_else(|| "0".into()); + let locale = Some(clean(&d.locale)).filter(|l| !l.is_empty()).unwrap_or_else(|| "en".into()); + let mut args = vec![ + "-EpicPortal".to_string(), + format!("-epicusername=\"{name}\""), + format!("-epicuserid={account}"), + format!("-epicsandboxid={}", clean(&d.namespace)), + format!("-epiclocale={locale}"), + format!("-epicapp={}", clean(&d.app_name)), + "-epicenv=Prod".to_string(), + ]; + let deployment = clean(&d.deployment_id); + if !deployment.is_empty() { + args.push(format!("-epicdeploymentid={deployment}")); + } + let extra: String = d.additional.chars().filter(|&c| c >= ' ' && c != '\u{7f}').collect(); + let extra = extra.trim(); + if !extra.is_empty() { + args.push(extra.to_string()); + } + args +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn arguments_in_order() { + let args = arguments(&LaunchData { + display_name: "Some \"One\"\r\n".into(), + account_id: "acc".into(), + namespace: "ns".into(), + locale: "fr".into(), + app_name: "Fig".into(), + deployment_id: "dep".into(), + additional: " -nosplash\t-dx12 ".into(), + }); + assert_eq!( + args, + vec![ + "-EpicPortal", + "-epicusername=\"Some One\"", + "-epicuserid=acc", + "-epicsandboxid=ns", + "-epiclocale=fr", + "-epicapp=Fig", + "-epicenv=Prod", + "-epicdeploymentid=dep", + "-nosplash-dx12", + ] + ); + let bare = arguments(&LaunchData { namespace: "ns".into(), app_name: "A".into(), ..Default::default() }); + assert_eq!(bare[1], "-epicusername=\"EpicUser\""); + assert_eq!(bare[2], "-epicuserid=0"); + assert_eq!(bare[4], "-epiclocale=en"); + assert_eq!(bare.len(), 7); + } +} diff --git a/app/src/main/rust/stores/src/epic/library.rs b/app/src/main/rust/stores/src/epic/library.rs new file mode 100644 index 0000000000..80f06e3a4b --- /dev/null +++ b/app/src/main/rust/stores/src/epic/library.rs @@ -0,0 +1,116 @@ +use serde_json::Value; + +use super::net::{self, Request}; + +const ITEMS_URL: &str = + "https://library-service.live.use1a.on.epicgames.com/library/api/public/items?includeMetadata=true"; +const MAX_PAGES: usize = 2000; +const MARKETPLACE_NAMESPACES: &[&str] = &["ue", "89efe5924d3d467c839449ab6ab52e7f"]; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Owned { + pub app_name: String, + pub namespace: String, + pub catalog_item_id: String, +} + +#[derive(Debug, PartialEq, Eq)] +pub enum ListError { + SignIn, + Failed(String), +} + +pub fn keep_record(record: &Value) -> Option<Owned> { + let app_name = net::str_of(record, "appName"); + let namespace = net::str_of(record, "namespace"); + if app_name.is_empty() || app_name == "1" || MARKETPLACE_NAMESPACES.contains(&namespace) { + return None; + } + if net::str_of(record, "sandboxType").eq_ignore_ascii_case("PRIVATE") { + return None; + } + if let Some(platforms) = record.get("platform").and_then(|p| p.as_array()) { + let names: Vec<&str> = platforms.iter().filter_map(|p| p.as_str()).collect(); + if !names.is_empty() && !names.iter().any(|p| *p == "Windows" || *p == "Win32") { + return None; + } + } + Some(Owned { + app_name: app_name.to_string(), + namespace: namespace.to_string(), + catalog_item_id: net::str_of(record, "catalogItemId").to_string(), + }) +} + +pub fn read_page(body: &Value, cursor: Option<&str>) -> (Vec<Owned>, Option<String>) { + let records = body + .get("records") + .and_then(|r| r.as_array()) + .map(|a| a.iter().filter_map(keep_record).collect()) + .unwrap_or_default(); + let next = body + .get("responseMetadata") + .map(|m| net::str_of(m, "nextCursor")) + .filter(|c| !c.is_empty() && Some(*c) != cursor) + .map(str::to_string); + (records, next) +} + +pub fn list_owned(access_token: &str) -> Result<Vec<Owned>, ListError> { + let mut out = Vec::new(); + let mut cursor: Option<String> = None; + for _ in 0..MAX_PAGES { + let url = match &cursor { + Some(c) => format!("{ITEMS_URL}&cursor={}", net::percent_encode(c)), + None => ITEMS_URL.to_string(), + }; + let reply = net::send(Request::get(&url).bearer(access_token)).map_err(ListError::Failed)?; + if reply.status == 401 { + return Err(ListError::SignIn); + } + if !reply.ok() { + return Err(ListError::Failed(format!("Epic library answered HTTP {}", reply.status))); + } + let body = reply + .json() + .ok_or_else(|| ListError::Failed("Epic library answer could not be read".into()))?; + let (records, next) = read_page(&body, cursor.as_deref()); + out.extend(records); + match next { + Some(n) => cursor = Some(n), + None => return Ok(out), + } + } + Err(ListError::Failed("Epic library has too many pages".into())) +} + +#[cfg(test)] +mod tests { + use super::*; + use serde_json::json; + + #[test] + fn record_filtering() { + let ok = json!({"appName":"Fig","namespace":"ns","catalogItemId":"cat","sandboxType":"PUBLIC","platform":["Windows","Mac"]}); + assert_eq!(keep_record(&ok).unwrap().catalog_item_id, "cat"); + assert!(keep_record(&json!({"appName":"Fig","namespace":"ns","platform":[]})).is_some()); + assert!(keep_record(&json!({"appName":"Fig","namespace":"ns","platform":["Win32"]})).is_some()); + assert!(keep_record(&json!({"appName":"Fig","namespace":"ns","platform":["Mac"]})).is_none()); + assert!(keep_record(&json!({"appName":"Fig","namespace":"ns","sandboxType":"PRIVATE"})).is_none()); + assert!(keep_record(&json!({"appName":"1","namespace":"ns"})).is_none()); + assert!(keep_record(&json!({"appName":"","namespace":"ns"})).is_none()); + assert!(keep_record(&json!({"appName":"Asset","namespace":"ue"})).is_none()); + assert!(keep_record(&json!({"appName":"Asset","namespace":"89efe5924d3d467c839449ab6ab52e7f"})).is_none()); + } + + #[test] + fn page_cursor_rules() { + let page = json!({"records":[{"appName":"A","namespace":"n"}],"responseMetadata":{"nextCursor":"c2"}}); + let (records, next) = read_page(&page, Some("c1")); + assert_eq!(records.len(), 1); + assert_eq!(next.as_deref(), Some("c2")); + assert_eq!(read_page(&page, Some("c2")).1, None); + assert_eq!(read_page(&json!({"records":[]}), None).1, None); + assert_eq!(read_page(&json!({"responseMetadata":{"nextCursor":""}}), None).1, None); + } +} diff --git a/app/src/main/rust/stores/src/epic/locale.rs b/app/src/main/rust/stores/src/epic/locale.rs new file mode 100644 index 0000000000..4da00e17bc --- /dev/null +++ b/app/src/main/rust/stores/src/epic/locale.rs @@ -0,0 +1,165 @@ +use super::manifest::FileEntry; + +const LANGUAGE_TAGS: &[(&str, &[&str])] = &[ + ("ar", &["Arabic", "ar"]), + ("bg", &["Bulgarian", "bg-BG", "bg"]), + ("zh-Hans", &["Chinese", "ChineseSimplified", "zh-Hans", "zh_Hans", "zh"]), + ("zh-Hant", &["ChineseTraditional", "zh-Hant", "zh_Hant"]), + ("cs", &["Czech", "cs-CZ", "cs"]), + ("da", &["Danish", "da-DK", "da"]), + ("nl", &["Dutch", "nl-NL", "nl"]), + ("en", &["English", "en-US", "en"]), + ("fi", &["Finnish", "fi-FI", "fi"]), + ("fr", &["French", "fr-FR", "fr"]), + ("de", &["German", "de-DE", "de"]), + ("el", &["Greek", "el-GR", "el"]), + ("hu", &["Hungarian", "hu-HU", "hu"]), + ("it", &["Italian", "it-IT", "it"]), + ("ja", &["Japanese", "ja-JP", "ja"]), + ("ko", &["Korean", "ko-KR", "ko"]), + ("no", &["Norwegian", "nb-NO", "no"]), + ("pl", &["Polish", "pl-PL", "pl"]), + ("pt", &["Portuguese", "pt-PT", "pt"]), + ("pt-BR", &["PortugueseBrazilian", "Brazilian", "pt-BR", "br"]), + ("ro", &["Romanian", "ro-RO", "ro"]), + ("ru", &["Russian", "ru-RU", "ru"]), + ("es", &["Spanish", "es-ES", "es"]), + ("es-419", &["SpanishLatinAmerica", "Latam", "es-MX", "es_mx"]), + ("sv", &["Swedish", "sv-SE", "sv"]), + ("th", &["Thai", "th-TH", "th"]), + ("tr", &["Turkish", "tr-TR", "tr"]), + ("uk", &["Ukrainian", "uk-UA", "uk"]), + ("vi", &["Vietnamese", "vi-VN", "vi"]), +]; + +pub fn language_key(language: &str, region: &str) -> &'static str { + let lang = language.trim().to_ascii_lowercase(); + let region = region.trim().to_ascii_uppercase(); + match lang.as_str() { + "zh" => { + if matches!(region.as_str(), "TW" | "HK" | "MO") { + "zh-Hant" + } else { + "zh-Hans" + } + } + "pt" => { + if region == "BR" { + "pt-BR" + } else { + "pt" + } + } + "es" => { + if region.is_empty() || region == "ES" { + "es" + } else { + "es-419" + } + } + "nb" | "nn" => "no", + other => LANGUAGE_TAGS + .iter() + .map(|(k, _)| *k) + .find(|k| *k == other) + .unwrap_or("en"), + } +} + +pub fn tags_for_key(key: &str) -> Vec<String> { + LANGUAGE_TAGS + .iter() + .find(|(k, _)| *k == key) + .or_else(|| LANGUAGE_TAGS.iter().find(|(k, _)| *k == "en")) + .map(|(_, tags)| tags.iter().map(|t| t.to_string()).collect()) + .unwrap_or_default() +} + +pub fn launch_locale(key: &str) -> String { + let head = key.split('-').next().unwrap_or("").trim(); + if head.is_empty() { + "en".to_string() + } else { + head.to_string() + } +} + +pub fn select(files: &[FileEntry], selected: Option<&[String]>) -> Vec<usize> { + let all = || (0..files.len()).collect::<Vec<_>>(); + let required = || { + let untagged: Vec<usize> = (0..files.len()).filter(|&i| files[i].tags.is_empty()).collect(); + if untagged.is_empty() { + all() + } else { + untagged + } + }; + let Some(selected) = selected else { + return all(); + }; + if selected.is_empty() { + return required(); + } + let picked: Vec<usize> = (0..files.len()) + .filter(|&i| files[i].tags.is_empty() || files[i].tags.iter().any(|t| selected.contains(t))) + .collect(); + if picked.is_empty() { + required() + } else { + picked + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn file(path: &str, tags: &[&str]) -> FileEntry { + FileEntry { + path: path.into(), + sha1: None, + tags: tags.iter().map(|t| t.to_string()).collect(), + parts: vec![], + size: 1, + } + } + + #[test] + fn locale_keys() { + assert_eq!(language_key("zh", "TW"), "zh-Hant"); + assert_eq!(language_key("zh", "HK"), "zh-Hant"); + assert_eq!(language_key("zh", "CN"), "zh-Hans"); + assert_eq!(language_key("pt", "BR"), "pt-BR"); + assert_eq!(language_key("pt", "PT"), "pt"); + assert_eq!(language_key("es", ""), "es"); + assert_eq!(language_key("es", "ES"), "es"); + assert_eq!(language_key("es", "MX"), "es-419"); + assert_eq!(language_key("nb", "NO"), "no"); + assert_eq!(language_key("nn", ""), "no"); + assert_eq!(language_key("de", "AT"), "de"); + assert_eq!(language_key("xx", "YY"), "en"); + assert_eq!(launch_locale("zh-Hant"), "zh"); + assert_eq!(launch_locale("es-419"), "es"); + assert_eq!(launch_locale("fr"), "fr"); + assert_eq!(tags_for_key("pt-BR"), vec!["PortugueseBrazilian", "Brazilian", "pt-BR", "br"]); + assert_eq!(tags_for_key("nope"), vec!["English", "en-US", "en"]); + } + + #[test] + fn selection_rules() { + let files = vec![ + file("base", &[]), + file("fr", &["French", "fr"]), + file("de", &["German"]), + file("opt", &["HighResTextures"]), + ]; + let fr = tags_for_key("fr"); + assert_eq!(select(&files, Some(&fr)), vec![0, 1]); + assert_eq!(select(&files, None), vec![0, 1, 2, 3]); + assert_eq!(select(&files, Some(&[])), vec![0]); + assert_eq!(select(&files, Some(&["french".to_string()])), vec![0]); + let tagged_only = vec![file("a", &["X"]), file("b", &["Y"])]; + assert_eq!(select(&tagged_only, Some(&["Z".to_string()])), vec![0, 1]); + assert_eq!(select(&tagged_only, Some(&["Y".to_string()])), vec![1]); + } +} diff --git a/app/src/main/rust/stores/src/epic/manifest.rs b/app/src/main/rust/stores/src/epic/manifest.rs index 579a56c320..2690e0f19d 100644 --- a/app/src/main/rust/stores/src/epic/manifest.rs +++ b/app/src/main/rust/stores/src/epic/manifest.rs @@ -1,195 +1,142 @@ -//! Epic build manifest parsers — a 1:1 port of `EpicDownloadManager.parseManifest` (binary, -//! magic `0x44BEC00C`) and `parseJsonManifest` (legacy JSON manifests). -//! -//! Every quirk of the Java reader is kept on purpose (the Java manager stays the reference and -//! the two engines must derive the same plan from the same bytes): section skips by declared -//! size, `readFString` UTF-16LE/ASCII decoding, duplicate-GUID handling (last value, first -//! position), the JSON `Long.parseLong(.., 16)` / `parseInt` fallbacks, and "any exception → -//! parse failed". - use std::collections::HashMap; use std::io::Read; -/// Binary manifest magic (`EpicDownloadManager.parseManifest`). -pub const MANIFEST_MAGIC: u32 = 0x44BE_C00C; +pub const BINARY_MAGIC: u32 = 0x44BE_C00C; +pub const DEFAULT_WINDOW: u32 = 1024 * 1024; +const MIN_HEADER: usize = 41; +const MAX_BODY: usize = 1 << 30; -/// One entry of the ChunkDataList section (`EpicDownloadManager.ChunkInfo`). -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct ChunkInfo { - /// Four uint32 in binary read order. - pub guid: [u32; 4], - /// uint64 "hash" that forms the first half of the chunk file name. - pub hash: u64, - /// SHA-1 of the DECOMPRESSED chunk; `None` for JSON manifests (Java: `sha1 == null`). - pub sha1: Option<[u8; 20]>, - /// Subfolder number (DECIMAL `%02d`). `i32` so the JSON parser's `Integer.parseInt` range is - /// representable exactly (binary manifests always yield 0..=255). - pub group_num: i32, - /// Uncompressed size (0 for JSON manifests). - pub window_size: i32, - /// Compressed (wire) size. Signed like the Java `long`; JSON manifests may yield anything. - pub file_size: i64, -} +pub type Guid = [u32; 4]; +pub type Sha1 = [u8; 20]; -impl ChunkInfo { - /// `String.format("%08X%08X%08X%08X", guid[0..4])`. - pub fn guid_str(&self) -> String { - guid_to_string(&self.guid) - } - - /// `ChunkInfo.getPath`: `"<chunkDir>/<%02d groupNum>/<%016X hash>_<GUID>.chunk"`. - pub fn path(&self, chunk_dir: &str) -> String { - format!( - "{}/{:02}/{:016X}_{}.chunk", - chunk_dir, - self.group_num, - self.hash, - self.guid_str() - ) - } - - /// Java `chunk.sha1 != null && length == 20 && !allZero` — the condition under which the - /// streaming downloader verifies the decompressed chunk. - pub fn verifiable_sha1(&self) -> Option<&[u8; 20]> { - match &self.sha1 { - Some(h) if h.iter().any(|b| *b != 0) => Some(h), - _ => None, - } - } - - /// `Math.max(chunk.fileSize, 1)` — the byte credit the Java pool uses for totals/progress. - pub fn credit_bytes(&self) -> u64 { - if self.file_size < 1 { - 1 - } else { - self.file_size as u64 - } - } -} - -/// One file part referencing a chunk (`EpicDownloadManager.ChunkPart`). -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct ChunkPart { - pub guid: [u32; 4], - /// Offset into the DECOMPRESSED chunk (Java `int`). - pub offset: i32, - /// Part length (Java `int`; summed as `size & 0xFFFFFFFFL`). - pub size: i32, -} - -impl ChunkPart { - pub fn guid_str(&self) -> String { - guid_to_string(&self.guid) - } -} - -/// One entry of the FileManifestList section (`EpicDownloadManager.FileInfo`). -#[derive(Clone, Debug, Default, PartialEq, Eq)] -pub struct FileInfo { - pub filename: String, - pub parts: Vec<ChunkPart>, - /// Install-tag names; empty = required/base file. - pub install_tags: Vec<String>, - /// Full-file SHA-1; `None` for JSON manifests. - pub sha1: Option<[u8; 20]>, -} - -impl FileInfo { - /// `FileInfo.fileSize()` = Σ `(part.size & 0xFFFFFFFFL)`. - pub fn file_size(&self) -> u64 { - self.parts.iter().map(|p| p.size as u32 as u64).sum() - } -} - -/// Parsed manifest (`EpicDownloadManager.EpicManifest.ParsedManifest`, minus the CDN list which -/// the Java side still owns). -#[derive(Clone, Debug, Default, PartialEq, Eq)] -pub struct Manifest { - pub chunk_dir: String, - pub unique_chunks: Vec<ChunkInfo>, - pub files: Vec<FileInfo>, -} - -impl Manifest { - /// `byGuid` map as `uniqueChunksForFiles` builds it: `LinkedHashMap.put` per chunk, so a - /// duplicate GUID resolves to the LAST `ChunkInfo`. - pub fn chunk_index_by_guid(&self) -> HashMap<String, usize> { - let mut map = HashMap::with_capacity(self.unique_chunks.len()); - for (i, c) in self.unique_chunks.iter().enumerate() { - map.insert(c.guid_str(), i); - } - map - } -} - -pub fn guid_to_string(guid: &[u32; 4]) -> String { +pub fn guid_text(guid: &Guid) -> String { format!("{:08X}{:08X}{:08X}{:08X}", guid[0], guid[1], guid[2], guid[3]) } -/// `chunkDir` from the binary header version (`parseManifest`). -pub fn chunk_dir_for_binary_version(version: i32) -> &'static str { - if version >= 15 { - "ChunksV4" - } else if version >= 6 { - "ChunksV3" - } else if version >= 3 { - "ChunksV2" - } else { - "Chunks" +pub fn guid_from_hex(text: &str) -> Option<Guid> { + let head = text.get(..32)?; + if !head.bytes().all(|b| b.is_ascii_hexdigit()) { + return None; + } + let mut out = [0u32; 4]; + for (i, slot) in out.iter_mut().enumerate() { + *slot = u32::from_str_radix(&head[i * 8..i * 8 + 8], 16).ok()?; + } + Some(out) +} + +pub fn sha1_hex(hash: &Sha1) -> String { + hash.iter().map(|b| format!("{b:02x}")).collect() +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct ChunkInfo { + pub guid: Guid, + pub rolling_hash: u64, + pub sha1: Option<Sha1>, + pub group: u64, + pub window: u32, + pub window_exact: bool, + pub cdn_size: u64, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct PartRef { + pub guid: Guid, + pub offset: u32, + pub size: u32, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FileEntry { + pub path: String, + pub sha1: Option<Sha1>, + pub tags: Vec<String>, + pub parts: Vec<PartRef>, + pub size: u64, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Variant { + Binary, + Json, +} + +#[derive(Clone, Debug)] +pub struct Manifest { + pub variant: Variant, + pub version: i64, + pub build_version: String, + pub launch_exe: String, + pub prereq_name: String, + pub prereq_path: String, + pub prereq_read: bool, + pub chunks: Vec<ChunkInfo>, + pub chunk_index: HashMap<Guid, usize>, + pub files: Vec<FileEntry>, +} + +impl Manifest { + pub fn chunk(&self, guid: &Guid) -> Option<&ChunkInfo> { + self.chunk_index.get(guid).map(|&i| &self.chunks[i]) + } + + pub fn chunk_folder(&self) -> &'static str { + chunk_folder(self.variant, self.version) + } + + pub fn chunk_path(&self, chunk: &ChunkInfo) -> String { + format!( + "{}/{:02}/{:016X}_{}.chunk", + self.chunk_folder(), + chunk.group, + chunk.rolling_hash, + guid_text(&chunk.guid) + ) } } -/// `chunkDir` from `ManifestFileVersion` (`parseJsonManifest`; note the different `< 3` default). -pub fn chunk_dir_for_json_version(version: i32) -> &'static str { - if version >= 15 { - "ChunksV4" - } else if version >= 6 { - "ChunksV3" - } else if version >= 3 { - "ChunksV2" - } else { - "ChunksV4" +pub fn chunk_folder(variant: Variant, version: i64) -> &'static str { + match version { + v if v >= 15 => "ChunksV4", + v if v >= 6 => "ChunksV3", + v if v >= 3 => "ChunksV2", + _ => match variant { + Variant::Binary => "Chunks", + Variant::Json => "ChunksV4", + }, } } -// ── little-endian cursor with ByteBuffer-like failure semantics ───────────────────────────── +pub fn parse(bytes: &[u8]) -> Result<Manifest, String> { + if bytes.len() < 4 { + return Err("manifest too short".into()); + } + if u32::from_le_bytes([bytes[0], bytes[1], bytes[2], bytes[3]]) == BINARY_MAGIC { + parse_binary(bytes) + } else { + parse_json(bytes) + } +} -/// Mirrors the `ByteBuffer` calls the Java parser makes: every under-run or out-of-range -/// `position()` is an exception there, which the Java code turns into "parse failed" (null). -struct Cursor<'a> { +fn normalise_path(raw: &str) -> String { + raw.replace('\\', "/") +} + +struct Reader<'a> { buf: &'a [u8], pos: usize, } -impl<'a> Cursor<'a> { +impl<'a> Reader<'a> { fn new(buf: &'a [u8]) -> Self { - Self { buf, pos: 0 } - } - - fn position(&self) -> usize { - self.pos - } - - /// `ByteBuffer.position(p)` — `p` must be within `0..=limit`. - fn set_position(&mut self, p: i64) -> Result<(), String> { - if p < 0 || p as u64 > self.buf.len() as u64 { - return Err(format!("position {p} out of range (limit {})", self.buf.len())); - } - self.pos = p as usize; - Ok(()) + Reader { buf, pos: 0 } } fn take(&mut self, n: usize) -> Result<&'a [u8], String> { - let end = self - .pos - .checked_add(n) - .ok_or_else(|| "buffer overflow".to_string())?; + let end = self.pos.checked_add(n).ok_or("length overflow")?; if end > self.buf.len() { - return Err(format!( - "buffer underflow: need {n} at {} (limit {})", - self.pos, - self.buf.len() - )); + return Err(format!("read past the end at {} (+{n})", self.pos)); } let out = &self.buf[self.pos..end]; self.pos = end; @@ -200,788 +147,749 @@ impl<'a> Cursor<'a> { Ok(self.take(1)?[0]) } - fn i32(&mut self) -> Result<i32, String> { + fn u32(&mut self) -> Result<u32, String> { let b = self.take(4)?; - Ok(i32::from_le_bytes([b[0], b[1], b[2], b[3]])) + Ok(u32::from_le_bytes([b[0], b[1], b[2], b[3]])) } - fn u32(&mut self) -> Result<u32, String> { - Ok(self.i32()? as u32) + fn i32(&mut self) -> Result<i32, String> { + Ok(self.u32()? as i32) } fn u64(&mut self) -> Result<u64, String> { let b = self.take(8)?; - Ok(u64::from_le_bytes([ - b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], - ])) + let mut a = [0u8; 8]; + a.copy_from_slice(b); + Ok(u64::from_le_bytes(a)) } - fn sha1(&mut self) -> Result<[u8; 20], String> { - let b = self.take(20)?; + fn i64(&mut self) -> Result<i64, String> { + Ok(self.u64()? as i64) + } + + fn guid(&mut self) -> Result<Guid, String> { + Ok([self.u32()?, self.u32()?, self.u32()?, self.u32()?]) + } + + fn sha1(&mut self) -> Result<Sha1, String> { let mut out = [0u8; 20]; - out.copy_from_slice(b); + out.copy_from_slice(self.take(20)?); Ok(out) } - /// `ByteBuffer.position(position + n)` with the same range check. - fn skip(&mut self, n: i64) -> Result<(), String> { - let target = self.pos as i64 + n; - self.set_position(target) + fn count(&mut self, min_item_bytes: usize) -> Result<usize, String> { + let n = self.i32()?; + if n < 0 { + return Err(format!("negative count {n}")); + } + let n = n as usize; + let left = self.buf.len() - self.pos; + if n.saturating_mul(min_item_bytes.max(1)) > left { + return Err(format!("count {n} does not fit the section")); + } + Ok(n) } - fn remaining(&self) -> &'a [u8] { - &self.buf[self.pos..] - } - - /// `EpicDownloadManager.readFString`: int32 length; `0` → ""; negative → `(-len)-1` UTF-16LE - /// code units + 2-byte terminator; positive → `len-1` US-ASCII bytes + 1-byte terminator. fn fstring(&mut self) -> Result<String, String> { - let length = self.i32()?; - if length == 0 { + let len = self.i32()? as i64; + if len == 0 { return Ok(String::new()); } - if length < 0 { - // Java: `int chars = (-length) - 1;` — `-Integer.MIN_VALUE` wraps to itself, then -1 - // gives Integer.MAX_VALUE; `new byte[chars * 2]` overflows negative → exception. - let chars = length.wrapping_neg().wrapping_sub(1); - let byte_len = chars.checked_mul(2).ok_or("fstring length overflow")?; - if byte_len < 0 { - return Err("negative fstring length".to_string()); - } - let bytes = self.take(byte_len as usize)?; - self.take(2)?; // null terminator - let units: Vec<u16> = bytes - .chunks_exact(2) - .map(|p| u16::from_le_bytes([p[0], p[1]])) - .collect(); - Ok(String::from_utf16_lossy(&units)) - } else { - let bytes = self.take((length - 1) as usize)?; - self.take(1)?; // null terminator - // `new String(bytes, US_ASCII)`: every byte > 0x7F decodes to U+FFFD. - Ok(bytes + if len > 0 { + let raw = self.take(len as usize)?; + let text = &raw[..raw.len() - 1]; + Ok(text .iter() .map(|&b| if b < 0x80 { b as char } else { '\u{FFFD}' }) .collect()) + } else { + let units = (-len) as usize; + let raw = self.take(units.checked_mul(2).ok_or("length overflow")?)?; + let mut code_units: Vec<u16> = raw + .chunks_exact(2) + .map(|p| u16::from_le_bytes([p[0], p[1]])) + .collect(); + code_units.pop(); + Ok(String::from_utf16_lossy(&code_units)) } } } -// ── binary manifest ────────────────────────────────────────────────────────────────────── - -/// `EpicDownloadManager.parseManifest(bytes)`: binary when the magic matches, otherwise the JSON -/// parser. `Err` wherever Java returns `null`. -pub fn parse_manifest(bytes: &[u8]) -> Result<Manifest, String> { - let mut cur = Cursor::new(bytes); - let magic = cur.u32()?; - if magic != MANIFEST_MAGIC { - return parse_json_manifest(bytes); +fn section<'a>(body: &'a [u8], start: usize) -> Result<(&'a [u8], usize), String> { + let mut r = Reader::new(&body[start.min(body.len())..]); + let size = r.i32()?; + if size < 4 { + return Err(format!("section at {start} has size {size}")); } - parse_binary_after_magic(&mut cur) + let end = start + .checked_add(size as usize) + .filter(|&e| e <= body.len()) + .ok_or_else(|| format!("section at {start} runs past the body"))?; + Ok((&body[start + 4..end], end)) } -fn parse_binary_after_magic(cur: &mut Cursor<'_>) -> Result<Manifest, String> { - let header_size = cur.i32()?; - let size_uncompressed = cur.i32()?; - let _size_compressed = cur.i32()?; - cur.skip(20)?; // SHA-1 of the body, not checked by the Java parser - let stored_as = cur.u8()?; - let version = cur.i32()?; - let chunk_dir = chunk_dir_for_binary_version(version); - - cur.set_position(header_size as i64)?; - let body_slice = cur.remaining(); - +fn parse_binary(bytes: &[u8]) -> Result<Manifest, String> { + if bytes.len() < MIN_HEADER { + return Err("binary manifest header too short".into()); + } + let mut h = Reader::new(bytes); + h.u32()?; + let header_size = h.i32()?; + let raw_size = h.i32()?; + let _stored_size = h.i32()?; + let _body_sha1 = h.sha1()?; + let flags = h.u8()?; + let version = h.i32()? as i64; + if header_size < MIN_HEADER as i32 || header_size as usize > bytes.len() { + return Err(format!("bad header size {header_size}")); + } + if raw_size < 0 || raw_size as usize > MAX_BODY { + return Err(format!("bad body size {raw_size}")); + } + if flags & 2 != 0 { + return Err("encrypted manifests are not supported".into()); + } + let stored = &bytes[header_size as usize..]; let inflated; - let body: &[u8] = if (stored_as & 1) != 0 { - if size_uncompressed < 0 { - return Err("negative sizeUncompressed".to_string()); - } - // Java: `inflater.inflate(new byte[sizeUncompressed])` — a single call that fills at most - // `sizeUncompressed` bytes; anything else (short, corrupt) is a size mismatch → null. - let mut out = Vec::with_capacity(size_uncompressed as usize); - let mut dec = flate2::read::ZlibDecoder::new(body_slice).take(size_uncompressed as u64); - dec.read_to_end(&mut out) - .map_err(|e| format!("manifest inflate failed: {e}"))?; - if out.len() != size_uncompressed as usize { - return Err(format!( - "decomp size mismatch: expected {size_uncompressed} got {}", - out.len() - )); + let body: &[u8] = if flags & 1 != 0 { + let want = raw_size as usize; + let mut out = Vec::with_capacity(want); + flate2::read::ZlibDecoder::new(stored) + .take(want as u64 + 1) + .read_to_end(&mut out) + .map_err(|e| format!("manifest body does not inflate: {e}"))?; + if out.len() != want { + return Err(format!("manifest body inflated to {} bytes, header says {want}", out.len())); } inflated = out; &inflated } else { - body_slice + stored }; - let mut b = Cursor::new(body); - - // ManifestMeta: skipped by its declared size (the size field counts itself). - let meta_size = b.i32()?; - let meta_end = b.position() as i64 - 4 + meta_size as i64; - b.set_position(meta_end)?; - - // ChunkDataList - let cdl_start = b.position(); - let cdl_size = b.i32()?; - let _cdl_version = b.u8()?; - let chunk_count = b.i32()?; - if chunk_count < 0 { - return Err("negative chunkCount".to_string()); // `new ArrayList<>(negative)` throws - } - let chunk_count = chunk_count as usize; - let mut chunks: Vec<ChunkInfo> = (0..chunk_count) - .map(|_| ChunkInfo { - guid: [0; 4], - hash: 0, - sha1: None, - group_num: 0, - window_size: 0, - file_size: 0, - }) - .collect(); - for c in chunks.iter_mut() { - c.guid = [b.u32()?, b.u32()?, b.u32()?, b.u32()?]; - } - for c in chunks.iter_mut() { - c.hash = b.u64()?; - } - for c in chunks.iter_mut() { - c.sha1 = Some(b.sha1()?); - } - for c in chunks.iter_mut() { - c.group_num = b.u8()? as i32; - } - for c in chunks.iter_mut() { - c.window_size = b.i32()?; - } - for c in chunks.iter_mut() { - c.file_size = b.u64()? as i64; - } - b.set_position(cdl_start as i64 + cdl_size as i64)?; - - // FileManifestList - let fml_start = b.position(); - let fml_size = b.i32()?; - let _fml_version = b.u8()?; - let file_count = b.i32()?; - if file_count < 0 { - return Err("negative fileCount".to_string()); - } - let file_count = file_count as usize; - let mut files: Vec<FileInfo> = (0..file_count).map(|_| FileInfo::default()).collect(); - for f in files.iter_mut() { - f.filename = b.fstring()?; - } - for _ in 0..file_count { - b.fstring()?; // symlink targets - } - for f in files.iter_mut() { - f.sha1 = Some(b.sha1()?); - } - b.skip(file_count as i64)?; // per-file flags byte - for f in files.iter_mut() { - let tag_count = b.i32()?; - let mut j = 0; - while j < tag_count { - let tag = b.fstring()?; - if !tag.is_empty() { - f.install_tags.push(tag); - } - j += 1; - } - } - for f in files.iter_mut() { - let part_count = b.i32()?; - let mut j = 0; - while j < part_count { - let part_start = b.position(); - let part_struct_size = b.i32()?; - let guid = [b.u32()?, b.u32()?, b.u32()?, b.u32()?]; - let offset = b.i32()?; - let size = b.i32()?; - f.parts.push(ChunkPart { guid, offset, size }); - b.set_position(part_start as i64 + part_struct_size as i64)?; - j += 1; - } - } - b.set_position(fml_start as i64 + fml_size as i64)?; + let (meta, after_meta) = section(body, 0)?; + let meta = read_meta(meta); + let (chunk_list, after_chunks) = section(body, after_meta)?; + let (chunks, chunk_index) = read_chunk_list(chunk_list)?; + let (file_list, _after_files) = section(body, after_chunks)?; + let files = read_file_list(file_list)?; Ok(Manifest { - chunk_dir: chunk_dir.to_string(), - unique_chunks: dedup_last_wins_first_position(chunks), + variant: Variant::Binary, + version, + build_version: meta.build_version, + launch_exe: meta.launch_exe, + prereq_name: meta.prereq_name, + prereq_path: meta.prereq_path, + prereq_read: meta.complete, + chunks, + chunk_index, files, }) } -/// `LinkedHashMap<String, ChunkInfo>` keyed by GUID string: a repeated key keeps its FIRST -/// position but takes the LAST value. -fn dedup_last_wins_first_position(chunks: Vec<ChunkInfo>) -> Vec<ChunkInfo> { - let mut order: Vec<ChunkInfo> = Vec::with_capacity(chunks.len()); - let mut index: HashMap<String, usize> = HashMap::with_capacity(chunks.len()); - for c in chunks { - let key = c.guid_str(); - match index.get(&key).copied() { - Some(i) => order[i] = c, +#[derive(Default)] +struct Meta { + build_version: String, + launch_exe: String, + prereq_name: String, + prereq_path: String, + complete: bool, +} + +fn read_meta(data: &[u8]) -> Meta { + let mut meta = Meta::default(); + let mut r = Reader::new(data); + let _ = (|| -> Result<(), String> { + r.u8()?; + r.u32()?; + r.u8()?; + r.u32()?; + r.fstring()?; + meta.build_version = r.fstring()?; + meta.launch_exe = normalise_path(&r.fstring()?); + r.fstring()?; + let ids = r.count(4)?; + for _ in 0..ids { + r.fstring()?; + } + meta.prereq_name = r.fstring()?; + meta.prereq_path = normalise_path(&r.fstring()?); + r.fstring()?; + meta.complete = true; + Ok(()) + })(); + meta +} + +fn read_chunk_list(data: &[u8]) -> Result<(Vec<ChunkInfo>, HashMap<Guid, usize>), String> { + let mut r = Reader::new(data); + r.u8()?; + let count = r.count(16 + 8 + 20 + 1 + 4 + 8)?; + let mut guids = Vec::with_capacity(count); + for _ in 0..count { + guids.push(r.guid()?); + } + let mut rolling = Vec::with_capacity(count); + for _ in 0..count { + rolling.push(r.u64()?); + } + let mut hashes = Vec::with_capacity(count); + for _ in 0..count { + hashes.push(r.sha1()?); + } + let mut groups = Vec::with_capacity(count); + for _ in 0..count { + groups.push(r.u8()?); + } + let mut windows = Vec::with_capacity(count); + for _ in 0..count { + windows.push(r.i32()?); + } + let mut sizes = Vec::with_capacity(count); + for _ in 0..count { + sizes.push(r.i64()?); + } + let mut chunks: Vec<ChunkInfo> = Vec::with_capacity(count); + let mut index: HashMap<Guid, usize> = HashMap::with_capacity(count); + for i in 0..count { + let window = windows[i]; + let info = ChunkInfo { + guid: guids[i], + rolling_hash: rolling[i], + sha1: Some(hashes[i]).filter(|h| h.iter().any(|&b| b != 0)), + group: groups[i] as u64, + window: if window > 0 { window as u32 } else { DEFAULT_WINDOW }, + window_exact: window > 0, + cdn_size: sizes[i].max(0) as u64, + }; + match index.get(&info.guid) { + Some(&at) => chunks[at] = info, None => { - index.insert(key, order.len()); - order.push(c); + index.insert(info.guid, chunks.len()); + chunks.push(info); } } } - order + Ok((chunks, index)) } -// ── JSON manifest (older games) ────────────────────────────────────────────────────────── - -/// `org.json` value → string coercion as `optString` / `getString` do on Android (numbers and -/// booleans print as-is, JSON null prints "null", containers print their JSON). -fn json_to_string(v: &serde_json::Value) -> String { - match v { - serde_json::Value::String(s) => s.clone(), - serde_json::Value::Null => "null".to_string(), - other => other.to_string(), +fn read_file_list(data: &[u8]) -> Result<Vec<FileEntry>, String> { + let mut r = Reader::new(data); + r.u8()?; + let count = r.count(4 + 4 + 20 + 1 + 4 + 4)?; + let mut names = Vec::with_capacity(count); + for _ in 0..count { + names.push(normalise_path(&r.fstring()?)); } -} - -/// `obj.optString(key, fallback)`. -fn opt_string(obj: &serde_json::Map<String, serde_json::Value>, key: &str, fallback: &str) -> String { - match obj.get(key) { - Some(v) => json_to_string(v), - None => fallback.to_string(), + for _ in 0..count { + r.fstring()?; } -} - -/// `(int) Long.parseLong(hex8, 16)` — the Java GUID quarter parse; invalid hex throws out of the -/// whole parse. -fn parse_guid_quarter(s: &str) -> Result<u32, String> { - let v = i64::from_str_radix(s, 16).map_err(|e| format!("bad guid hex '{s}': {e}"))?; - Ok(v as i32 as u32) -} - -fn parse_guid_from_hex(s: &str) -> Result<[u32; 4], String> { - // Java substrings by UTF-16 unit and `parseLong` throws on anything non-hex; a non-ASCII - // prefix can never parse, so refuse it before slicing (keeps the slice on char boundaries). - if s.len() < 32 || !s.as_bytes()[..32].is_ascii() { - return Err(format!("bad guid hex '{s}'")); + let mut hashes = Vec::with_capacity(count); + for _ in 0..count { + hashes.push(r.sha1()?); } - Ok([ - parse_guid_quarter(&s[0..8])?, - parse_guid_quarter(&s[8..16])?, - parse_guid_quarter(&s[16..24])?, - parse_guid_quarter(&s[24..32])?, - ]) + for _ in 0..count { + r.u8()?; + } + let mut tags = Vec::with_capacity(count); + for _ in 0..count { + let n = r.count(4)?; + let mut list = Vec::with_capacity(n); + for _ in 0..n { + let tag = r.fstring()?; + if !tag.is_empty() { + list.push(tag); + } + } + tags.push(list); + } + let mut files = Vec::with_capacity(count); + for (i, (path, tag_list)) in names.into_iter().zip(tags).enumerate() { + let n = r.count(28)?; + let mut parts = Vec::with_capacity(n); + let mut size = 0u64; + for _ in 0..n { + let start = r.pos; + let record = r.i32()?; + if record < 28 { + return Err(format!("chunk part record of {record} bytes")); + } + let guid = r.guid()?; + let offset = r.u32()?; + let len = r.u32()?; + let end = start + record as usize; + if end > data.len() { + return Err("chunk part record runs past the section".into()); + } + r.pos = end; + size += len as u64; + parts.push(PartRef { guid, offset, size: len }); + } + files.push(FileEntry { + path, + sha1: Some(hashes[i]).filter(|h| h.iter().any(|&b| b != 0)), + tags: tag_list, + parts, + size, + }); + } + Ok(files) } -/// `EpicDownloadManager.parseJsonManifest`. -pub fn parse_json_manifest(bytes: &[u8]) -> Result<Manifest, String> { - let text = String::from_utf8_lossy(bytes); - let root: serde_json::Value = - serde_json::from_str(&text).map_err(|e| format!("JSON manifest: {e}"))?; - let root = root - .as_object() - .ok_or_else(|| "JSON manifest: root is not an object".to_string())?; +pub fn blob(text: &str) -> Option<u64> { + if !text.bytes().all(|b| b.is_ascii_digit()) { + return None; + } + let mut value = 0u64; + for (i, group) in text.as_bytes().chunks(3).take(8).enumerate() { + let n: u64 = std::str::from_utf8(group).ok()?.parse().ok()?; + value = value.wrapping_add(n.wrapping_shl(8 * i as u32)); + } + Some(value) +} - let manifest_version: i32 = opt_string(root, "ManifestFileVersion", "0") - .parse::<i32>() - .unwrap_or(0); - let chunk_dir = chunk_dir_for_json_version(manifest_version); +fn blob_of(value: Option<&serde_json::Value>) -> Option<u64> { + value.and_then(|v| v.as_str()).and_then(blob) +} - let chunk_hash_list = root +fn guid_map(obj: Option<&serde_json::Value>) -> HashMap<Guid, u64> { + let mut out = HashMap::new(); + if let Some(map) = obj.and_then(|v| v.as_object()) { + for (k, v) in map { + if let Some(g) = guid_from_hex(k) { + out.insert(g, v.as_str().and_then(blob).unwrap_or(0)); + } + } + } + out +} + +fn parse_json(bytes: &[u8]) -> Result<Manifest, String> { + let doc: serde_json::Value = + serde_json::from_slice(bytes).map_err(|e| format!("manifest is neither binary nor JSON: {e}"))?; + let str_field = |k: &str| doc.get(k).and_then(|v| v.as_str()).unwrap_or("").to_string(); + let version = blob_of(doc.get("ManifestFileVersion")).unwrap_or(0) as i64; + let launch = doc + .get("LaunchExeString") + .and_then(|v| v.as_str()) + .or_else(|| doc.get("LaunchExe").and_then(|v| v.as_str())) + .unwrap_or(""); + + let hashes = doc .get("ChunkHashList") .and_then(|v| v.as_object()) - .ok_or_else(|| "JSON manifest: no ChunkHashList".to_string())?; - let data_group_list = root.get("DataGroupList").and_then(|v| v.as_object()); - let chunk_filesize_list = root.get("ChunkFilesizeList").and_then(|v| v.as_object()); - - // `LinkedHashMap<String, ChunkInfo>` keyed by the RAW key string (not the normalized GUID). - let mut chunk_order: Vec<ChunkInfo> = Vec::new(); - let mut chunk_index: HashMap<String, usize> = HashMap::new(); - for (guid_hex, hash_value) in chunk_hash_list.iter() { - if guid_hex.len() < 32 || !guid_hex.is_char_boundary(32) { + .ok_or("JSON manifest has no ChunkHashList")?; + let groups = guid_map(doc.get("DataGroupList")); + let sizes = guid_map(doc.get("ChunkFilesizeList")); + let mut chunks = Vec::with_capacity(hashes.len()); + let mut chunk_index = HashMap::with_capacity(hashes.len()); + for (key, value) in hashes { + if key.len() < 32 { continue; } - let hash_hex = json_to_string(hash_value); - let guid = parse_guid_from_hex(guid_hex)?; - let hash = if hash_hex.len() >= 16 && hash_hex.is_char_boundary(16) { - u64::from_str_radix(&hash_hex[0..16], 16).unwrap_or(0) - } else { - 0 - }; - let group_num = match data_group_list { - Some(dgl) => opt_string(dgl, guid_hex, "0").parse::<i32>().unwrap_or(0), - None => 0, - }; - let file_size = match chunk_filesize_list { - Some(cfl) => i64::from_str_radix(&opt_string(cfl, guid_hex, "0"), 16).unwrap_or(0), - None => 0, - }; - let c = ChunkInfo { + let guid = guid_from_hex(key).ok_or_else(|| format!("chunk key {key} is not hex"))?; + let info = ChunkInfo { guid, - hash, + rolling_hash: value.as_str().and_then(blob).unwrap_or(0), sha1: None, - group_num, - window_size: 0, - file_size, + group: groups.get(&guid).copied().unwrap_or(0), + window: DEFAULT_WINDOW, + window_exact: false, + cdn_size: sizes.get(&guid).copied().unwrap_or(0), }; - match chunk_index.get(guid_hex).copied() { - Some(i) => chunk_order[i] = c, + match chunk_index.get(&guid) { + Some(&at) => chunks[at] = info, None => { - chunk_index.insert(guid_hex.clone(), chunk_order.len()); - chunk_order.push(c); + chunk_index.insert(guid, chunks.len()); + chunks.push(info); } } } - let file_list = root + let list = doc .get("FileManifestList") .and_then(|v| v.as_array()) - .ok_or_else(|| "JSON manifest: no FileManifestList".to_string())?; - - let mut files = Vec::with_capacity(file_list.len()); - for entry in file_list { - let file_obj = entry - .as_object() - .ok_or_else(|| "JSON manifest: FileManifestList entry is not an object".to_string())?; - let mut fi = FileInfo { - filename: opt_string(file_obj, "Filename", ""), - ..FileInfo::default() - }; - if let Some(tags) = file_obj.get("InstallTags").and_then(|v| v.as_array()) { - for t in tags { - let tag = json_to_string(t); - if !tag.is_empty() { - fi.install_tags.push(tag); - } + .ok_or("JSON manifest has no FileManifestList")?; + let mut files = Vec::with_capacity(list.len()); + for entry in list { + let path = normalise_path(entry.get("Filename").and_then(|v| v.as_str()).unwrap_or("")); + let tags = entry + .get("InstallTags") + .and_then(|v| v.as_array()) + .map(|a| { + a.iter() + .filter_map(|t| t.as_str()) + .filter(|t| !t.is_empty()) + .map(str::to_string) + .collect() + }) + .unwrap_or_default(); + let mut parts = Vec::new(); + let mut size = 0u64; + if let Some(list) = entry.get("FileChunkParts").and_then(|v| v.as_array()) { + for part in list { + let guid = part + .get("Guid") + .and_then(|v| v.as_str()) + .and_then(guid_from_hex) + .unwrap_or([0; 4]); + let offset = blob_of(part.get("Offset")).unwrap_or(0) as u32; + let len = blob_of(part.get("Size")).unwrap_or(0) as u32; + size += len as u64; + parts.push(PartRef { guid, offset, size: len }); } } - if let Some(parts) = file_obj.get("FileChunkParts").and_then(|v| v.as_array()) { - for p in parts { - let part_obj = p.as_object().ok_or_else(|| { - "JSON manifest: FileChunkParts entry is not an object".to_string() - })?; - let mut part = ChunkPart { - guid: [0; 4], - offset: 0, - size: 0, - }; - let part_guid = opt_string(part_obj, "Guid", ""); - if part_guid.len() >= 32 && part_guid.is_char_boundary(32) { - part.guid = parse_guid_from_hex(&part_guid)?; - } - part.offset = opt_string(part_obj, "Offset", "0").parse::<i32>().unwrap_or(0); - part.size = opt_string(part_obj, "Size", "0").parse::<i32>().unwrap_or(0); - fi.parts.push(part); - } - } - files.push(fi); + files.push(FileEntry { path, sha1: None, tags, parts, size }); } Ok(Manifest { - chunk_dir: chunk_dir.to_string(), - unique_chunks: chunk_order, + variant: Variant::Json, + version, + build_version: str_field("BuildVersionString"), + launch_exe: normalise_path(launch), + prereq_name: str_field("PrereqName"), + prereq_path: normalise_path(&str_field("PrereqPath")), + prereq_read: true, + chunks, + chunk_index, files, }) } -// ── tests ──────────────────────────────────────────────────────────────────────────────── - #[cfg(test)] -pub(crate) mod test_support { - //! Synthetic binary-manifest builder used by this module's tests and by `plan`/`driver` - //! tests. Emits exactly the layout `parseManifest` walks (meta / CDL / FML with sizes). - +pub mod testing { use super::*; use std::io::Write; - pub struct TestChunk { - pub guid: [u32; 4], - pub hash: u64, - pub sha1: [u8; 20], - pub group: u8, - pub window: i32, - pub file_size: u64, + pub fn fstring(out: &mut Vec<u8>, s: &str) { + if s.is_empty() { + out.extend_from_slice(&0i32.to_le_bytes()); + } else if s.is_ascii() { + out.extend_from_slice(&((s.len() + 1) as i32).to_le_bytes()); + out.extend_from_slice(s.as_bytes()); + out.push(0); + } else { + let units: Vec<u16> = s.encode_utf16().collect(); + out.extend_from_slice(&(-((units.len() + 1) as i32)).to_le_bytes()); + for u in units { + out.extend_from_slice(&u.to_le_bytes()); + } + out.extend_from_slice(&[0, 0]); + } + } + + fn with_size(mut payload: Vec<u8>) -> Vec<u8> { + let mut out = ((payload.len() + 4) as i32).to_le_bytes().to_vec(); + out.append(&mut payload); + out } pub struct TestFile { - pub name: String, - pub sha1: [u8; 20], + pub path: String, + pub sha1: Sha1, pub tags: Vec<String>, - /// (guid, offset, size) - pub parts: Vec<([u32; 4], i32, i32)>, + pub parts: Vec<PartRef>, } - pub fn fstring_ascii(s: &str) -> Vec<u8> { - let mut v = Vec::new(); - if s.is_empty() { - v.extend_from_slice(&0i32.to_le_bytes()); - return v; + pub struct TestManifest { + pub version: i32, + pub build: String, + pub exe: String, + pub prereq: Option<(String, String)>, + pub chunks: Vec<ChunkInfo>, + pub files: Vec<TestFile>, + pub compress: bool, + pub meta_tail: Vec<u8>, + } + + pub fn build(m: &TestManifest) -> Vec<u8> { + let mut meta = vec![0u8]; + meta.extend_from_slice(&18u32.to_le_bytes()); + meta.push(1); + meta.extend_from_slice(&0u32.to_le_bytes()); + fstring(&mut meta, "App"); + fstring(&mut meta, &m.build); + fstring(&mut meta, &m.exe); + fstring(&mut meta, ""); + if let Some((name, path)) = &m.prereq { + meta.extend_from_slice(&1i32.to_le_bytes()); + fstring(&mut meta, "prereq-id"); + fstring(&mut meta, name); + fstring(&mut meta, path); + fstring(&mut meta, "/quiet"); } - v.extend_from_slice(&((s.len() as i32) + 1).to_le_bytes()); - v.extend_from_slice(s.as_bytes()); - v.push(0); - v - } + meta.extend_from_slice(&m.meta_tail); - pub fn fstring_utf16(s: &str) -> Vec<u8> { - let units: Vec<u16> = s.encode_utf16().collect(); - let mut v = Vec::new(); - v.extend_from_slice(&(-((units.len() as i32) + 1)).to_le_bytes()); - for u in units { - v.extend_from_slice(&u.to_le_bytes()); - } - v.extend_from_slice(&[0, 0]); - v - } - - /// Body (meta + CDL + FML) without the outer header. - pub fn build_body(chunks: &[TestChunk], files: &[TestFile], meta_padding: usize) -> Vec<u8> { - let mut body = Vec::new(); - // ManifestMeta: size field counts itself. - let meta_size = 4 + meta_padding; - body.extend_from_slice(&(meta_size as i32).to_le_bytes()); - body.extend(std::iter::repeat(0xEEu8).take(meta_padding)); - - // ChunkDataList - let mut cdl = Vec::new(); - cdl.push(0u8); // version - cdl.extend_from_slice(&(chunks.len() as i32).to_le_bytes()); - for c in chunks { - for g in c.guid { - cdl.extend_from_slice(&g.to_le_bytes()); + let mut cl = vec![2u8]; + cl.extend_from_slice(&(m.chunks.len() as i32).to_le_bytes()); + for c in &m.chunks { + for v in c.guid { + cl.extend_from_slice(&v.to_le_bytes()); } } - for c in chunks { - cdl.extend_from_slice(&c.hash.to_le_bytes()); + for c in &m.chunks { + cl.extend_from_slice(&c.rolling_hash.to_le_bytes()); } - for c in chunks { - cdl.extend_from_slice(&c.sha1); + for c in &m.chunks { + cl.extend_from_slice(&c.sha1.unwrap_or([0; 20])); } - for c in chunks { - cdl.push(c.group); + for c in &m.chunks { + cl.push(c.group as u8); } - for c in chunks { - cdl.extend_from_slice(&c.window.to_le_bytes()); + for c in &m.chunks { + cl.extend_from_slice(&(c.window as i32).to_le_bytes()); } - for c in chunks { - cdl.extend_from_slice(&c.file_size.to_le_bytes()); + for c in &m.chunks { + cl.extend_from_slice(&(c.cdn_size as i64).to_le_bytes()); } - // Trailing padding the parser must skip via cdlSize. - cdl.extend_from_slice(&[0xAA, 0xBB, 0xCC]); - body.extend_from_slice(&((cdl.len() + 4) as i32).to_le_bytes()); - body.extend_from_slice(&cdl); + cl.extend_from_slice(&[9, 9, 9]); - // FileManifestList - let mut fml = Vec::new(); - fml.push(0u8); // version - fml.extend_from_slice(&(files.len() as i32).to_le_bytes()); - for f in files { - if f.name.is_ascii() { - fml.extend_from_slice(&fstring_ascii(&f.name)); - } else { - fml.extend_from_slice(&fstring_utf16(&f.name)); - } + let mut fl = vec![0u8]; + fl.extend_from_slice(&(m.files.len() as i32).to_le_bytes()); + for f in &m.files { + fstring(&mut fl, &f.path); } - for _ in files { - fml.extend_from_slice(&fstring_ascii("")); // symlink target + for _ in &m.files { + fstring(&mut fl, ""); } - for f in files { - fml.extend_from_slice(&f.sha1); + for f in &m.files { + fl.extend_from_slice(&f.sha1); } - for _ in files { - fml.push(0); // flags + for _ in &m.files { + fl.push(0); } - for f in files { - fml.extend_from_slice(&(f.tags.len() as i32).to_le_bytes()); + for f in &m.files { + fl.extend_from_slice(&(f.tags.len() as i32).to_le_bytes()); for t in &f.tags { - fml.extend_from_slice(&fstring_ascii(t)); + fstring(&mut fl, t); } } - for f in files { - fml.extend_from_slice(&(f.parts.len() as i32).to_le_bytes()); - for (guid, offset, size) in &f.parts { - // struct size 4 + 16 + 4 + 4 = 28, plus 2 bytes of padding the parser skips. - fml.extend_from_slice(&30i32.to_le_bytes()); - for g in guid { - fml.extend_from_slice(&g.to_le_bytes()); + for f in &m.files { + fl.extend_from_slice(&(f.parts.len() as i32).to_le_bytes()); + for p in &f.parts { + fl.extend_from_slice(&32i32.to_le_bytes()); + for v in p.guid { + fl.extend_from_slice(&v.to_le_bytes()); } - fml.extend_from_slice(&offset.to_le_bytes()); - fml.extend_from_slice(&size.to_le_bytes()); - fml.extend_from_slice(&[0x11, 0x22]); + fl.extend_from_slice(&p.offset.to_le_bytes()); + fl.extend_from_slice(&p.size.to_le_bytes()); + fl.extend_from_slice(&[0, 0, 0, 0]); } } - body.extend_from_slice(&((fml.len() + 4) as i32).to_le_bytes()); - body.extend_from_slice(&fml); - body - } - /// Full manifest bytes: header + (optionally zlib-compressed) body. - pub fn build_manifest( - chunks: &[TestChunk], - files: &[TestFile], - version: i32, - compress: bool, - ) -> Vec<u8> { - let body = build_body(chunks, files, 7); - let payload = if compress { - let mut enc = - flate2::write::ZlibEncoder::new(Vec::new(), flate2::Compression::default()); + let mut body = with_size(meta); + body.extend(with_size(cl)); + body.extend(with_size(fl)); + body.extend(with_size(vec![0, 0, 0, 0, 0])); + + let stored = if m.compress { + let mut enc = flate2::write::ZlibEncoder::new(Vec::new(), flate2::Compression::default()); enc.write_all(&body).unwrap(); enc.finish().unwrap() } else { body.clone() }; - let header_size: i32 = 41 + 3; // 3 bytes of extra header the parser must jump over + let header_size = 45i32; let mut out = Vec::new(); - out.extend_from_slice(&MANIFEST_MAGIC.to_le_bytes()); + out.extend_from_slice(&BINARY_MAGIC.to_le_bytes()); out.extend_from_slice(&header_size.to_le_bytes()); out.extend_from_slice(&(body.len() as i32).to_le_bytes()); - out.extend_from_slice(&(payload.len() as i32).to_le_bytes()); + out.extend_from_slice(&(stored.len() as i32).to_le_bytes()); out.extend_from_slice(&[0u8; 20]); - out.push(if compress { 1 } else { 0 }); - out.extend_from_slice(&version.to_le_bytes()); - out.extend_from_slice(&[0xF0, 0xF1, 0xF2]); - assert_eq!(out.len(), header_size as usize); - out.extend_from_slice(&payload); + out.push(if m.compress { 1 } else { 0 }); + out.extend_from_slice(&m.version.to_le_bytes()); + out.extend_from_slice(&[7, 7, 7, 7]); + out.extend_from_slice(&stored); out } - pub fn sample_chunks() -> Vec<TestChunk> { - vec![ - TestChunk { - guid: [0x0000_0001, 0x0000_0002, 0x0000_0003, 0x0000_0004], - hash: 0x0123_4567_89AB_CDEF, - sha1: [0x11; 20], - group: 5, - window: 1_048_576, - file_size: 700_000, - }, - TestChunk { - guid: [0xDEAD_BEEF, 0xFFFF_FFFF, 0x0000_0000, 0x8000_0000], - hash: 0xFFFF_FFFF_FFFF_FFFE, - sha1: [0x22; 20], - group: 123, - window: 4096, - file_size: 0, - }, - TestChunk { - guid: [0x0000_00AA, 0x0000_00BB, 0x0000_00CC, 0x0000_00DD], - hash: 0x10, - sha1: [0u8; 20], - group: 0, - window: 10, - file_size: 9, - }, - ] - } - - pub fn sample_files() -> Vec<TestFile> { - let c = sample_chunks(); - vec![ - TestFile { - name: "Game/Binaries/Win64/Game.exe".to_string(), - sha1: [0x51; 20], - tags: vec![], - parts: vec![(c[0].guid, 0, 1_048_576), (c[1].guid, 100, 4000)], - }, - TestFile { - name: "Game\\Content\\Localization\\de.pak".to_string(), - sha1: [0x52; 20], - tags: vec!["German".to_string(), "de-DE".to_string()], - parts: vec![(c[1].guid, 0, 4096)], - }, - TestFile { - name: "Game/Content/Ünïcode.pak".to_string(), - sha1: [0x53; 20], - tags: vec!["French".to_string()], - parts: vec![(c[2].guid, 0, 10), (c[0].guid, 5, 7)], - }, - ] + pub fn chunk(n: u32, window: u32) -> ChunkInfo { + ChunkInfo { + guid: [n, n + 1, 0, 0x8000_0000], + rolling_hash: 0x0123_4567_89AB_CDEF ^ n as u64, + sha1: None, + group: (n % 100) as u64, + window, + window_exact: true, + cdn_size: 1000, + } } } #[cfg(test)] mod tests { - use super::test_support::*; + use super::testing::*; use super::*; - #[test] - fn binary_manifest_round_trips_uncompressed() { - let bytes = build_manifest(&sample_chunks(), &sample_files(), 21, false); - let m = parse_manifest(&bytes).expect("parse"); - assert_eq!(m.chunk_dir, "ChunksV4"); - assert_eq!(m.unique_chunks.len(), 3); - assert_eq!(m.files.len(), 3); - - let c0 = &m.unique_chunks[0]; - assert_eq!(c0.guid_str(), "00000001000000020000000300000004"); - assert_eq!(c0.hash, 0x0123_4567_89AB_CDEF); - assert_eq!(c0.sha1, Some([0x11; 20])); - assert_eq!(c0.group_num, 5); - assert_eq!(c0.window_size, 1_048_576); - assert_eq!(c0.file_size, 700_000); - assert_eq!( - c0.path("ChunksV4"), - "ChunksV4/05/0123456789ABCDEF_00000001000000020000000300000004.chunk" - ); - - let c1 = &m.unique_chunks[1]; - assert_eq!(c1.guid_str(), "DEADBEEFFFFFFFFF0000000080000000"); - assert_eq!( - c1.path("ChunksV4"), - "ChunksV4/123/FFFFFFFFFFFFFFFE_DEADBEEFFFFFFFFF0000000080000000.chunk" - ); - assert_eq!(c1.credit_bytes(), 1, "Math.max(fileSize, 1)"); - assert!(c1.verifiable_sha1().is_some()); - assert!(m.unique_chunks[2].verifiable_sha1().is_none(), "all-zero SHA-1 → unverifiable"); - - let f0 = &m.files[0]; - assert_eq!(f0.filename, "Game/Binaries/Win64/Game.exe"); - assert!(f0.install_tags.is_empty()); - assert_eq!(f0.sha1, Some([0x51; 20])); - assert_eq!(f0.parts.len(), 2); - assert_eq!(f0.parts[1].offset, 100); - assert_eq!(f0.parts[1].size, 4000); - assert_eq!(f0.file_size(), 1_048_576 + 4000); - - let f1 = &m.files[1]; - assert_eq!(f1.filename, "Game\\Content\\Localization\\de.pak"); - assert_eq!(f1.install_tags, vec!["German".to_string(), "de-DE".to_string()]); - - let f2 = &m.files[2]; - assert_eq!(f2.filename, "Game/Content/Ünïcode.pak", "UTF-16LE fstring"); - assert_eq!(f2.parts[1].guid_str(), c0.guid_str()); - } - - #[test] - fn binary_manifest_round_trips_compressed() { - let bytes = build_manifest(&sample_chunks(), &sample_files(), 17, true); - let m = parse_manifest(&bytes).expect("parse"); - assert_eq!(m.unique_chunks.len(), 3); - assert_eq!(m.files.len(), 3); - assert_eq!(m.files[2].filename, "Game/Content/Ünïcode.pak"); - } - - #[test] - fn chunk_dir_follows_version_thresholds() { - for (v, dir) in [(2, "Chunks"), (3, "ChunksV2"), (6, "ChunksV3"), (15, "ChunksV4")] { - let bytes = build_manifest(&sample_chunks(), &sample_files(), v, false); - assert_eq!(parse_manifest(&bytes).unwrap().chunk_dir, dir, "version {v}"); + fn sample(compress: bool, prereq: bool) -> TestManifest { + let c1 = chunk(1, 16); + let c2 = chunk(2, 8); + TestManifest { + version: 21, + build: "1.2.3-CL-99".into(), + exe: "Binaries\\Win64\\Game.exe".into(), + prereq: prereq.then(|| ("UE4 Prerequisites (x64)".into(), "Engine\\Extras\\UE4PrereqSetup_x64.exe".into())), + chunks: vec![c1.clone(), c2.clone()], + files: vec![ + TestFile { + path: "Game\\Content\\a.pak".into(), + sha1: [1; 20], + tags: vec![], + parts: vec![ + PartRef { guid: c1.guid, offset: 0, size: 10 }, + PartRef { guid: c2.guid, offset: 2, size: 6 }, + ], + }, + TestFile { + path: "Lang/日本語.txt".into(), + sha1: [0; 20], + tags: vec!["Japanese".into(), "".into()], + parts: vec![PartRef { guid: c1.guid, offset: 10, size: 6 }], + }, + TestFile { path: "empty.txt".into(), sha1: [0; 20], tags: vec![], parts: vec![] }, + ], + compress, + meta_tail: vec![1, 2, 3], } - assert_eq!(chunk_dir_for_json_version(1), "ChunksV4"); - assert_eq!(chunk_dir_for_json_version(4), "ChunksV2"); } #[test] - fn duplicate_guid_keeps_first_position_last_value() { - let mut chunks = sample_chunks(); - let dup = TestChunk { - guid: chunks[0].guid, - hash: 0x99, - sha1: [0x77; 20], - group: 9, - window: 1, - file_size: 1, - }; - chunks.push(dup); - let bytes = build_manifest(&chunks, &sample_files(), 21, false); - let m = parse_manifest(&bytes).unwrap(); - assert_eq!(m.unique_chunks.len(), 3); - assert_eq!(m.unique_chunks[0].hash, 0x99); - assert_eq!(m.unique_chunks[0].group_num, 9); + fn binary_manifest_round_trip_compressed_and_stored() { + for compress in [true, false] { + let m = parse(&build(&sample(compress, true))).unwrap(); + assert_eq!(m.variant, Variant::Binary); + assert_eq!(m.version, 21); + assert_eq!(m.chunk_folder(), "ChunksV4"); + assert_eq!(m.build_version, "1.2.3-CL-99"); + assert_eq!(m.launch_exe, "Binaries/Win64/Game.exe"); + assert_eq!(m.prereq_name, "UE4 Prerequisites (x64)"); + assert_eq!(m.prereq_path, "Engine/Extras/UE4PrereqSetup_x64.exe"); + assert!(m.prereq_read); + assert_eq!(m.chunks.len(), 2); + assert_eq!(m.files.len(), 3); + let a = &m.files[0]; + assert_eq!(a.path, "Game/Content/a.pak"); + assert_eq!(a.size, 16); + assert_eq!(a.sha1, Some([1; 20])); + assert_eq!(a.parts[1].offset, 2); + assert_eq!(m.files[1].path, "Lang/日本語.txt"); + assert_eq!(m.files[1].tags, vec!["Japanese".to_string()]); + assert_eq!(m.files[1].sha1, None); + assert_eq!(m.files[2].size, 0); + } } #[test] - fn truncated_manifest_is_a_parse_failure() { - let bytes = build_manifest(&sample_chunks(), &sample_files(), 21, false); - assert!(parse_manifest(&bytes[..bytes.len() - 40]).is_err()); - assert!(parse_manifest(&bytes[..20]).is_err()); + fn a_short_meta_section_keeps_the_prereq_flag_unset() { + let mut s = sample(true, false); + s.meta_tail.clear(); + let m = parse(&build(&s)).unwrap(); + assert!(!m.prereq_read); + assert_eq!(m.build_version, "1.2.3-CL-99"); + assert_eq!(m.files.len(), 3); } #[test] - fn bad_uncompressed_size_is_a_parse_failure() { - let good = build_manifest(&sample_chunks(), &sample_files(), 21, true); - let real = i32::from_le_bytes([good[8], good[9], good[10], good[11]]); - // Claim MORE than the body inflates to: Java's single `inflate()` returns fewer bytes - // than `sizeUncompressed` → "Decomp size mismatch" → null. - let mut bigger = good.clone(); - bigger[8..12].copy_from_slice(&(real + 1).to_le_bytes()); - assert!(parse_manifest(&bigger).is_err()); - // Claim LESS: Java fills exactly `sizeUncompressed` bytes (silently truncating), then the - // FileManifestList end position lands past the limit → exception → null. - let mut smaller = good; - smaller[8..12].copy_from_slice(&(real - 1).to_le_bytes()); - assert!(parse_manifest(&smaller).is_err()); + fn duplicate_chunks_keep_first_position_and_last_values() { + let mut s = sample(false, true); + let mut again = s.chunks[0].clone(); + again.rolling_hash = 42; + s.chunks.push(again); + let m = parse(&build(&s)).unwrap(); + assert_eq!(m.chunks.len(), 2); + assert_eq!(m.chunks[0].rolling_hash, 42); } #[test] - fn fstring_decoding_matches_java() { - let mut v = fstring_ascii("abc"); - v.extend_from_slice(&fstring_utf16("dé")); - v.extend_from_slice(&fstring_ascii("")); - v.extend_from_slice(&[4, 0, 0, 0, b'a', 0xFF, b'b', 0]); // non-ASCII byte → U+FFFD - let mut c = Cursor::new(&v); - assert_eq!(c.fstring().unwrap(), "abc"); - assert_eq!(c.fstring().unwrap(), "dé"); - assert_eq!(c.fstring().unwrap(), ""); - assert_eq!(c.fstring().unwrap(), "a\u{FFFD}b"); - } - - #[test] - fn json_manifest_parses_like_java() { - let json = r#"{ - "ManifestFileVersion": "013", - "ChunkHashList": { - "0000000100000002000000030000000ff": "0123456789ABCDEF00", - "short": "00", - "DEADBEEFFFFFFFFF0000000080000000": "zz" - }, - "DataGroupList": { "0000000100000002000000030000000ff": "7", "DEADBEEFFFFFFFFF0000000080000000": "x" }, - "ChunkFilesizeList": { "0000000100000002000000030000000ff": "FF" }, - "FileManifestList": [ - { "Filename": "a.bin", "InstallTags": ["German", ""], - "FileChunkParts": [ { "Guid": "0000000100000002000000030000000ff", "Offset": "12", "Size": "34" }, - { "Guid": "tooshort", "Offset": "x", "Size": "-5" } ] }, - { "Filename": "b.bin" } - ] - }"#; - let m = parse_manifest(json.as_bytes()).expect("json parse"); - assert_eq!(m.chunk_dir, "ChunksV3"); - assert_eq!(m.unique_chunks.len(), 2, "keys shorter than 32 chars are skipped"); - let c0 = &m.unique_chunks[0]; - assert_eq!(c0.guid, [1, 2, 3, 0x0000_000F]); - assert_eq!(c0.hash, 0x0123_4567_89AB_CDEF); - assert_eq!(c0.group_num, 7); - assert_eq!(c0.file_size, 0xFF); - assert_eq!(c0.window_size, 0); - assert!(c0.sha1.is_none()); - let c1 = &m.unique_chunks[1]; - assert_eq!(c1.hash, 0, "unparseable hash → 0"); - assert_eq!(c1.group_num, 0, "unparseable group → 0"); - assert_eq!(c1.file_size, 0, "missing size → 0"); - - assert_eq!(m.files.len(), 2); - assert_eq!(m.files[0].install_tags, vec!["German".to_string()]); - assert_eq!(m.files[0].parts.len(), 2); - assert_eq!(m.files[0].parts[0].offset, 12); - assert_eq!(m.files[0].parts[0].size, 34); - assert_eq!(m.files[0].parts[1].guid, [0; 4]); - assert_eq!(m.files[0].parts[1].offset, 0); - assert_eq!(m.files[0].parts[1].size, -5); - assert!(m.files[0].sha1.is_none()); - assert!(m.files[1].parts.is_empty()); - } - - #[test] - fn json_manifest_failures_match_java_nulls() { - assert!(parse_manifest(br#"{"FileManifestList": []}"#).is_err(), "no ChunkHashList"); - assert!(parse_manifest(br#"{"ChunkHashList": {}}"#).is_err(), "no FileManifestList"); - assert!( - parse_manifest(br#"{"ChunkHashList": {"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz": "0"}, "FileManifestList": []}"#) - .is_err(), - "invalid GUID hex throws out of the parse" + fn chunk_paths_and_guid_text() { + let m = parse(&build(&sample(false, true))).unwrap(); + let c = &m.chunks[0]; + assert_eq!(guid_text(&[0xDEADBEEF, 0xFFFFFFFF, 0, 0x80000000]), "DEADBEEFFFFFFFFF0000000080000000"); + assert_eq!( + m.chunk_path(c), + format!("ChunksV4/01/{:016X}_00000001000000020000000080000000.chunk", c.rolling_hash) ); - assert!(parse_manifest(b"not json at all").is_err()); + } + + #[test] + fn truncated_or_inconsistent_bodies_are_rejected() { + let good = build(&sample(true, true)); + assert!(parse(&good[..good.len() - 10]).is_err()); + let mut lying = good.clone(); + lying[8..12].copy_from_slice(&5i32.to_le_bytes()); + assert!(parse(&lying).is_err()); + assert!(parse(&[0x0C, 0xC0]).is_err()); + } + + #[test] + fn chunk_folder_per_version_and_variant() { + assert_eq!(chunk_folder(Variant::Binary, 15), "ChunksV4"); + assert_eq!(chunk_folder(Variant::Binary, 14), "ChunksV3"); + assert_eq!(chunk_folder(Variant::Binary, 6), "ChunksV3"); + assert_eq!(chunk_folder(Variant::Binary, 5), "ChunksV2"); + assert_eq!(chunk_folder(Variant::Binary, 3), "ChunksV2"); + assert_eq!(chunk_folder(Variant::Binary, 2), "Chunks"); + assert_eq!(chunk_folder(Variant::Json, 2), "ChunksV4"); + assert_eq!(chunk_folder(Variant::Json, 0), "ChunksV4"); + } + + #[test] + fn blob_numbers() { + assert_eq!(blob("001000000000"), Some(1)); + assert_eq!(blob("000001000000"), Some(256)); + assert_eq!(blob("001002003004005006007008"), Some(0x0807060504030201)); + assert_eq!(blob("255255255255255255255255"), Some(u64::MAX)); + assert_eq!(blob("7"), Some(7)); + assert_eq!(blob(""), Some(0)); + assert_eq!(blob("000000016000"), Some(1_048_576)); + assert_eq!(blob("12a"), None); + } + + #[test] + fn json_manifest() { + let doc = r#"{ + "ManifestFileVersion": "013000000000", + "LaunchExeString": "Bin\\Game.exe", + "BuildVersionString": "++Game+Release-1.0", + "PrereqName": "Redist", "PrereqPath": "Redist\\setup.exe", + "ChunkHashList": { + "0000000A00000000000000000000000F": "001000000000", + "short": "001", + "0000000b00000000000000000000000f": "002000000000" + }, + "DataGroupList": { "0000000A00000000000000000000000F": "005" }, + "ChunkFilesizeList": { "0000000B00000000000000000000000F": "000001000000" }, + "FileManifestList": [ + { "Filename": "Bin\\Game.exe", "InstallTags": ["", "fr"], + "FileChunkParts": [ + { "Guid": "0000000A00000000000000000000000F", "Offset": "000000000000", "Size": "016000000000" }, + { "Guid": "0000000B00000000000000000000000F", "Offset": "004", "Size": "002" } ] } + ] + }"#; + let m = parse(doc.as_bytes()).unwrap(); + assert_eq!(m.variant, Variant::Json); + assert_eq!(m.version, 13); + assert_eq!(m.chunk_folder(), "ChunksV3"); + assert_eq!(m.launch_exe, "Bin/Game.exe"); + assert!(m.prereq_read); + assert_eq!(m.prereq_path, "Redist/setup.exe"); + assert_eq!(m.chunks.len(), 2); + assert_eq!(m.chunks[0].group, 5); + assert_eq!(m.chunks[1].cdn_size, 256); + assert_eq!(m.chunks[1].rolling_hash, 2); + assert!(!m.chunks[0].window_exact); + let f = &m.files[0]; + assert_eq!(f.path, "Bin/Game.exe"); + assert_eq!(f.tags, vec!["fr".to_string()]); + assert_eq!(f.size, 18); + assert!(m.chunk(&f.parts[1].guid).is_some()); + } + + #[test] + fn json_manifest_with_a_bad_chunk_key_is_rejected() { + let doc = r#"{"ChunkHashList": {"ZZZZZZZZ000000000000000000000000": "001"}, "FileManifestList": []}"#; + assert!(parse(doc.as_bytes()).is_err()); + assert!(parse(br#"{"FileManifestList": []}"#).is_err()); } } diff --git a/app/src/main/rust/stores/src/epic/mod.rs b/app/src/main/rust/stores/src/epic/mod.rs new file mode 100644 index 0000000000..932df65cd0 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/mod.rs @@ -0,0 +1,16 @@ +pub mod account; +pub mod achievements; +pub mod build_info; +pub mod catalog; +pub mod chunk; +pub mod ffi; +pub mod install; +pub mod launch; +pub mod library; +pub mod locale; +pub mod manifest; +pub mod net; +pub mod savesync; +pub mod service; +pub mod shop; +pub mod timefmt; diff --git a/app/src/main/rust/stores/src/epic/net.rs b/app/src/main/rust/stores/src/epic/net.rs new file mode 100644 index 0000000000..7421815a52 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/net.rs @@ -0,0 +1,279 @@ +use std::sync::OnceLock; +use std::time::Duration; + +pub const USER_AGENT_PRODUCT: &str = "DroidDeck"; + +static APP_VERSION: OnceLock<String> = OnceLock::new(); + +pub fn set_app_version(version: &str) { + let clean: String = version.trim().chars().filter(|c| !c.is_control()).collect(); + if !clean.is_empty() { + let _ = APP_VERSION.set(clean); + } +} + +pub fn user_agent() -> String { + let version = APP_VERSION + .get() + .map(String::as_str) + .unwrap_or(crate::stores_jni::VERSION); + format!("{USER_AGENT_PRODUCT}/{version}") +} + +pub const EPIC_LAUNCHER_USER_AGENT: &str = + "EpicGamesLauncher/15.17.1-22692490+++Portal+Release-Live Windows/10.0.19041.1.256.64bit"; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Method { + Get, + Post, + Put, +} + +pub enum Body { + Empty, + Form(Vec<(String, String)>), + Json(String), + Bytes(Vec<u8>), +} + +pub struct Request<'a> { + pub method: Method, + pub url: &'a str, + pub bearer: Option<&'a str>, + pub basic: Option<(&'a str, &'a str)>, + pub body: Body, + pub read_timeout: Duration, + pub agent: Option<&'static str>, +} + +impl<'a> Request<'a> { + pub fn get(url: &'a str) -> Self { + Request { + method: Method::Get, + url, + bearer: None, + basic: None, + body: Body::Empty, + read_timeout: Duration::from_secs(30), + agent: None, + } + } + + pub fn post(url: &'a str, body: Body) -> Self { + Request { + method: Method::Post, + body, + ..Request::get(url) + } + } + + pub fn put(url: &'a str, body: Body) -> Self { + Request { + method: Method::Put, + body, + ..Request::get(url) + } + } + + pub fn agent(mut self, agent: &'static str) -> Self { + self.agent = Some(agent); + self + } + + pub fn bearer(mut self, token: &'a str) -> Self { + self.bearer = Some(token); + self + } + + pub fn basic(mut self, user: &'a str, password: &'a str) -> Self { + self.basic = Some((user, password)); + self + } + + pub fn read_timeout(mut self, timeout: Duration) -> Self { + self.read_timeout = timeout; + self + } +} + +pub struct Reply { + pub status: u16, + pub body: Vec<u8>, +} + +impl Reply { + pub fn ok(&self) -> bool { + (200..300).contains(&self.status) + } + + pub fn text(&self) -> String { + String::from_utf8_lossy(&self.body).into_owned() + } + + pub fn json(&self) -> Option<serde_json::Value> { + if self.body.iter().all(|b| b.is_ascii_whitespace()) { + return Some(serde_json::Value::Object(Default::default())); + } + serde_json::from_slice(&self.body).ok() + } +} + +const CONNECT_TIMEOUT: Duration = Duration::from_secs(30); +const WHOLE_REQUEST_CAP: Duration = Duration::from_secs(600); + +pub fn send(request: Request<'_>) -> Result<Reply, String> { + let runtime = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .map_err(|e| format!("runtime: {e}"))?; + runtime.block_on(send_async(request)) +} + +async fn send_async(request: Request<'_>) -> Result<Reply, String> { + use reqwest::header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE}; + let client = reqwest::Client::builder() + .user_agent(request.agent.map(str::to_string).unwrap_or_else(user_agent)) + .connect_timeout(CONNECT_TIMEOUT) + .read_timeout(request.read_timeout) + .timeout(WHOLE_REQUEST_CAP) + .build() + .map_err(|e| format!("http client: {}", e.without_url()))?; + let mut builder = match request.method { + Method::Get => client.get(request.url), + Method::Post => client.post(request.url), + Method::Put => client.put(request.url), + }; + if let Some(token) = request.bearer { + builder = builder.header(AUTHORIZATION, format!("Bearer {token}")); + } + if let Some((user, password)) = request.basic { + let pair = format!("{user}:{password}"); + builder = builder.header(AUTHORIZATION, format!("Basic {}", base64(pair.as_bytes()))); + } + builder = match request.body { + Body::Empty => builder, + Body::Form(pairs) => builder + .header(CONTENT_TYPE, "application/x-www-form-urlencoded") + .header(ACCEPT, "application/json") + .body(form_encode(&pairs)), + Body::Json(text) => builder + .header(CONTENT_TYPE, "application/json") + .header(ACCEPT, "application/json") + .body(text), + Body::Bytes(bytes) => builder + .header(CONTENT_TYPE, "application/octet-stream") + .body(bytes), + }; + let response = builder.send().await.map_err(describe)?; + let status = response.status().as_u16(); + let body = response.bytes().await.map_err(describe)?.to_vec(); + Ok(Reply { status, body }) +} + +fn describe(err: reqwest::Error) -> String { + let kind = if err.is_timeout() { + "timed out" + } else if err.is_connect() { + "could not connect" + } else if err.is_body() || err.is_decode() { + "body could not be read" + } else { + "request failed" + }; + format!("{kind}: {}", err.without_url()) +} + +pub fn percent_encode(text: &str) -> String { + let mut out = String::with_capacity(text.len()); + for b in text.bytes() { + if b.is_ascii_alphanumeric() || matches!(b, b'-' | b'_' | b'.' | b'~') { + out.push(b as char); + } else { + out.push('%'); + out.push(HEX_UPPER[(b >> 4) as usize] as char); + out.push(HEX_UPPER[(b & 15) as usize] as char); + } + } + out +} + +const HEX_UPPER: &[u8; 16] = b"0123456789ABCDEF"; + +pub fn form_encode(pairs: &[(String, String)]) -> String { + pairs + .iter() + .map(|(k, v)| format!("{}={}", percent_encode(k), percent_encode(v))) + .collect::<Vec<_>>() + .join("&") +} + +pub fn base64(data: &[u8]) -> String { + const TABLE: &[u8; 64] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + let mut out = String::with_capacity(data.len().div_ceil(3) * 4); + for group in data.chunks(3) { + let b0 = group[0] as u32; + let b1 = group.get(1).copied().unwrap_or(0) as u32; + let b2 = group.get(2).copied().unwrap_or(0) as u32; + let n = (b0 << 16) | (b1 << 8) | b2; + out.push(TABLE[(n >> 18) as usize & 63] as char); + out.push(TABLE[(n >> 12) as usize & 63] as char); + out.push(if group.len() > 1 { TABLE[(n >> 6) as usize & 63] as char } else { '=' }); + out.push(if group.len() > 2 { TABLE[n as usize & 63] as char } else { '=' }); + } + out +} + +pub fn origin(url: &str) -> String { + let after_scheme = url.find("://").map(|i| i + 3).unwrap_or(0); + let end = url[after_scheme..] + .find(['/', '?', '#']) + .map(|i| after_scheme + i) + .unwrap_or(url.len()); + url[..end].to_string() +} + +pub fn str_of<'v>(value: &'v serde_json::Value, key: &str) -> &'v str { + value.get(key).and_then(|v| v.as_str()).unwrap_or("") +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn percent_encoding_keeps_only_unreserved() { + assert_eq!(percent_encode("abc-_.~XYZ09"), "abc-_.~XYZ09"); + assert_eq!(percent_encode("a b+c/d=e&f"), "a%20b%2Bc%2Fd%3De%26f"); + assert_eq!(percent_encode("é"), "%C3%A9"); + } + + #[test] + fn form_values_are_encoded() { + let body = form_encode(&[ + ("grant_type".into(), "refresh_token".into()), + ("refresh_token".into(), "a+b/c=".into()), + ]); + assert_eq!(body, "grant_type=refresh_token&refresh_token=a%2Bb%2Fc%3D"); + } + + #[test] + fn base64_matches_rfc4648_vectors() { + assert_eq!(base64(b""), ""); + assert_eq!(base64(b"f"), "Zg=="); + assert_eq!(base64(b"fo"), "Zm8="); + assert_eq!(base64(b"foo"), "Zm9v"); + assert_eq!(base64(b"foobar"), "Zm9vYmFy"); + } + + #[test] + fn origin_is_scheme_and_host() { + assert_eq!(origin("https://cdn.example.com/Builds/x?y=1"), "https://cdn.example.com"); + assert_eq!(origin("https://cdn.example.com"), "https://cdn.example.com"); + } + + #[test] + fn user_agent_names_droiddeck() { + assert!(user_agent().starts_with("DroidDeck/")); + } +} diff --git a/app/src/main/rust/stores/src/epic/plan.rs b/app/src/main/rust/stores/src/epic/plan.rs deleted file mode 100644 index 3dc2eeeb85..0000000000 --- a/app/src/main/rust/stores/src/epic/plan.rs +++ /dev/null @@ -1,289 +0,0 @@ -//! Chunk plan — the part of `EpicDownloadManager.install` between "manifest parsed" and "submit -//! to the pool", ported 1:1: install-tag file selection (`resolveInstallFiles` / -//! `getRequiredInstallFiles`), the unique-chunk list for a file set (`uniqueChunksForFiles`), -//! the byte total (`Σ max(fileSize, 1)`), chunk cache paths and CDN URLs. -//! -//! At runtime the Java manager passes the INDICES of its `pendingFiles` (post delta/verify), so -//! the file selection functions here are exercised by the unit tests (and available to a future -//! caller) while the driver only runs `unique_chunks_for_files` on Java's pending set — the same -//! function Java runs, on the same manifest, in the same order. - -use std::collections::{HashMap, HashSet}; -use std::path::{Path, PathBuf}; - -use super::manifest::{ChunkInfo, Manifest}; - -/// `getRequiredInstallFiles`: files with no install tags; if NONE carries a tag, every file. -pub fn required_install_files(m: &Manifest) -> Vec<usize> { - let required: Vec<usize> = m - .files - .iter() - .enumerate() - .filter(|(_, f)| f.install_tags.is_empty()) - .map(|(i, _)| i) - .collect(); - if required.is_empty() { - (0..m.files.len()).collect() - } else { - required - } -} - -/// `resolveInstallFiles(manifest, selectedTags)`: -/// - `None` → every file (legacy / DLC / overlay path); -/// - `Some([])` → required(base) files only; -/// - otherwise → base files + any file carrying at least one selected tag, falling back to -/// required-only when nothing matched. -pub fn resolve_install_files(m: &Manifest, selected_tags: Option<&[String]>) -> Vec<usize> { - let Some(tags) = selected_tags else { - return (0..m.files.len()).collect(); - }; - if tags.is_empty() { - return required_install_files(m); - } - let want: HashSet<&str> = tags.iter().map(String::as_str).collect(); - let mut out = Vec::new(); - for (i, f) in m.files.iter().enumerate() { - if f.install_tags.is_empty() { - out.push(i); - continue; - } - if f.install_tags.iter().any(|t| want.contains(t.as_str())) { - out.push(i); - } - } - if out.is_empty() { - required_install_files(m) - } else { - out - } -} - -/// `uniqueChunksForFiles(manifest, files)`: chunk indices (into `unique_chunks`) in first-seen -/// order over `files[*].parts`, each GUID once, GUIDs absent from the chunk list dropped. -pub fn unique_chunks_for_files(m: &Manifest, file_indices: &[usize]) -> Vec<usize> { - let by_guid: HashMap<String, usize> = m.chunk_index_by_guid(); - let mut seen: HashSet<String> = HashSet::new(); - let mut chunks = Vec::new(); - for &fi in file_indices { - let Some(f) = m.files.get(fi) else { - continue; - }; - for p in &f.parts { - let g = p.guid_str(); - if seen.insert(g.clone()) { - if let Some(&ci) = by_guid.get(&g) { - chunks.push(ci); - } - } - } - } - chunks -} - -/// `totalBytes += Math.max(chunk.fileSize, 1)` over the needed chunks. -pub fn total_credit_bytes(m: &Manifest, chunk_indices: &[usize]) -> u64 { - chunk_indices - .iter() - .filter_map(|&i| m.unique_chunks.get(i)) - .map(ChunkInfo::credit_bytes) - .sum() -} - -/// `<installDir>/.chunks`. -pub fn chunk_cache_dir(install_dir: &str) -> PathBuf { - Path::new(install_dir).join(super::CHUNK_CACHE_DIR) -} - -/// Where this run's chunks go: `cache_dir` when the caller named one, else the default -/// `<installDir>/.chunks`. A separate directory exists so the cache can sit on internal storage -/// while the game installs to an SD card: a chunk is written once into the cache and once into -/// the assembled file, and with both on a 26 MB/s card the second write starved the fetchers. -pub fn resolve_cache_dir(install_dir: &str, cache_dir: &str) -> PathBuf { - if cache_dir.is_empty() { - chunk_cache_dir(install_dir) - } else { - PathBuf::from(cache_dir) - } -} - -/// Final cache file for a chunk: `new File(chunkCacheDir, chunk.guidStr())`. -pub fn cached_chunk_path(cache_dir: &Path, chunk: &ChunkInfo) -> PathBuf { - cache_dir.join(chunk.guid_str()) -} - -/// The Java pool's skip rule: a chunk whose cache file EXISTS (any size) is not fetched. -pub fn is_chunk_cached(cache_dir: &Path, chunk: &ChunkInfo) -> bool { - cached_chunk_path(cache_dir, chunk).exists() -} - -/// One CDN entry as the Java manager passes it: `cdn.baseUrl + cdn.cloudDir` (auth params are -/// never used on chunk URLs). Chunk URL = `prefix + "/" + chunk.getPath(chunkDir)`. -pub fn chunk_url(cdn_prefix: &str, chunk_dir: &str, chunk: &ChunkInfo) -> String { - format!("{}/{}", cdn_prefix, chunk.path(chunk_dir)) -} - -/// Undo the JSON string escaping the Java CDN scanner passes through. `EpicApiClient` re-serializes -/// the manifest API response with Android's `org.json`, which escapes every `/` as `\/`, and -/// `parseCdnUrls` takes the raw substrings — so a base URL arrives as `https:\/\/host\` and a cloud -/// dir as `/Builds\/Org\/…\/default\`. Java's `HttpURLConnection` (OkHttp) treats `\` as `/` and -/// only ever reached the first CDN, so it never noticed; reqwest's URL parser does the same -/// mapping, which leaves empty `//` path segments that Fastly/Akamai tolerate but CloudFront -/// rejects outright (immediate 4xx). Produce the URL Java intended: `\/` → `/`, any other `\` -/// dropped, and no trailing slash (the chunk path is joined with one). -pub fn normalize_prefix(raw: &str) -> String { - let unescaped = raw.replace("\\/", "/").replace('\\', ""); - unescaped.trim_end_matches('/').to_string() -} - -/// Distinct CDN prefixes in first-seen order, normalized (the fetch core wants one host key per -/// distinct endpoint; Java would simply try an identical URL twice, which changes nothing). -pub fn distinct_prefixes(cdn_prefixes: &[String]) -> Vec<String> { - let mut seen = HashSet::new(); - let mut out = Vec::new(); - for p in cdn_prefixes { - let n = normalize_prefix(p); - if n.is_empty() { - continue; - } - if seen.insert(n.clone()) { - out.push(n); - } - } - out -} - -/// Improvements round 1: split the window across the distinct CDNs so the whole ceiling is -/// reachable whatever the host count — `max(6, ceil(max_workers / hosts))` (3 Epic CDNs at a -/// ceiling of 32 → 11 each; a single host gets all 32). -pub fn per_host_cap(max_workers: usize, host_count: usize) -> usize { - let hosts = host_count.max(1); - let workers = max_workers.max(1); - let split = (workers + hosts - 1) / hosts; - split.max(6) -} - -#[cfg(test)] -mod tests { - use super::super::manifest::test_support::*; - use super::super::manifest::parse_manifest; - use super::*; - - fn manifest() -> Manifest { - parse_manifest(&build_manifest(&sample_chunks(), &sample_files(), 21, false)).unwrap() - } - - #[test] - fn install_tag_rules_match_java() { - let m = manifest(); - // null → all - assert_eq!(resolve_install_files(&m, None), vec![0, 1, 2]); - // empty → required only (file 0 has no tags) - assert_eq!(resolve_install_files(&m, Some(&[])), vec![0]); - // German → base + the German file - let de = vec!["German".to_string(), "de-DE".to_string()]; - assert_eq!(resolve_install_files(&m, Some(&de)), vec![0, 1]); - // unknown tag → nothing extra matched, but base files matched, so base only - let xx = vec!["Klingon".to_string()]; - assert_eq!(resolve_install_files(&m, Some(&xx)), vec![0]); - } - - #[test] - fn manifest_without_tags_treats_every_file_as_required() { - let mut files = sample_files(); - for f in files.iter_mut() { - f.tags.clear(); - } - let m = parse_manifest(&build_manifest(&sample_chunks(), &files, 21, false)).unwrap(); - assert_eq!(required_install_files(&m), vec![0, 1, 2]); - assert_eq!(resolve_install_files(&m, Some(&[])), vec![0, 1, 2]); - } - - #[test] - fn manifest_where_every_file_is_tagged_falls_back_to_all() { - let mut files = sample_files(); - files[0].tags = vec!["English".to_string()]; - let m = parse_manifest(&build_manifest(&sample_chunks(), &files, 21, false)).unwrap(); - // No untagged file, unknown tag selected → matched nothing → required → (none) → all. - let xx = vec!["Klingon".to_string()]; - assert_eq!(resolve_install_files(&m, Some(&xx)), vec![0, 1, 2]); - } - - #[test] - fn unique_chunks_follow_first_seen_part_order() { - let m = manifest(); - // file 2 first: chunk c[2] then c[0]; then file 0: c[0] (dup), c[1]. - assert_eq!(unique_chunks_for_files(&m, &[2, 0]), vec![2, 0, 1]); - assert_eq!(unique_chunks_for_files(&m, &[1]), vec![1]); - assert!(unique_chunks_for_files(&m, &[]).is_empty()); - assert!(unique_chunks_for_files(&m, &[99]).is_empty(), "out-of-range index ignored"); - // total = 700000 + max(0,1) + 9 - assert_eq!(total_credit_bytes(&m, &[0, 1, 2]), 700_000 + 1 + 9); - } - - #[test] - fn parts_referencing_unknown_guids_are_dropped() { - let mut files = sample_files(); - files[0] - .parts - .push(([0x1234, 0x5678, 0x9ABC, 0xDEF0], 0, 1)); - let m = parse_manifest(&build_manifest(&sample_chunks(), &files, 21, false)).unwrap(); - assert_eq!(unique_chunks_for_files(&m, &[0]), vec![0, 1]); - } - - #[test] - fn urls_and_cache_paths_match_java() { - let m = manifest(); - let c = &m.unique_chunks[0]; - assert_eq!( - chunk_url("https://fastly-download.epicgames.com/Builds/Org/o-x/y/default", "ChunksV4", c), - "https://fastly-download.epicgames.com/Builds/Org/o-x/y/default/ChunksV4/05/0123456789ABCDEF_00000001000000020000000300000004.chunk" - ); - let cache = chunk_cache_dir("/data/x/imagefs/epic_games/Game"); - assert_eq!(cache, PathBuf::from("/data/x/imagefs/epic_games/Game/.chunks")); - assert_eq!(resolve_cache_dir("/data/x/imagefs/epic_games/Game", ""), cache); - assert_eq!( - resolve_cache_dir("/sdcard/Games/Game", "/data/x/cache/epic/Game"), - PathBuf::from("/data/x/cache/epic/Game") - ); - assert_eq!( - cached_chunk_path(&cache, c), - PathBuf::from("/data/x/imagefs/epic_games/Game/.chunks/00000001000000020000000300000004") - ); - let prefixes = vec!["a".to_string(), "b".to_string(), "a".to_string()]; - assert_eq!(distinct_prefixes(&prefixes), vec!["a".to_string(), "b".to_string()]); - } - - #[test] - fn prefixes_are_unescaped_from_the_java_json_scan() { - // Exactly what Bannerlator's Epic debug log shows its Java manager extracting for a real title. - let raw = "https:\\/\\/egdownload.fastly-edge.com\\/Builds\\/Org\\/o-83e8\\/04b7\\/default\\"; - assert_eq!( - normalize_prefix(raw), - "https://egdownload.fastly-edge.com/Builds/Org/o-83e8/04b7/default" - ); - // Already-clean input is untouched (minus a trailing slash). - assert_eq!( - normalize_prefix("https://download.epicgames.com/Builds/x/default/"), - "https://download.epicgames.com/Builds/x/default" - ); - let m = manifest(); - let c = &m.unique_chunks[0]; - assert_eq!( - chunk_url(&normalize_prefix(raw), "ChunksV4", c), - "https://egdownload.fastly-edge.com/Builds/Org/o-83e8/04b7/default/ChunksV4/05/0123456789ABCDEF_00000001000000020000000300000004.chunk" - ); - let two = vec![raw.to_string(), "https://egdownload.fastly-edge.com/Builds/Org/o-83e8/04b7/default".to_string(), String::new()]; - assert_eq!(distinct_prefixes(&two).len(), 1, "escaped and clean forms collapse; empty dropped"); - } - - #[test] - fn per_host_cap_splits_the_window_with_a_floor_of_six() { - assert_eq!(per_host_cap(32, 3), 11); - assert_eq!(per_host_cap(32, 1), 32); - assert_eq!(per_host_cap(32, 2), 16); - assert_eq!(per_host_cap(8, 3), 6, "floor"); - assert_eq!(per_host_cap(8, 1), 8); - assert_eq!(per_host_cap(0, 0), 6, "degenerate inputs"); - } -} diff --git a/app/src/main/rust/stores/src/epic/savesync.rs b/app/src/main/rust/stores/src/epic/savesync.rs new file mode 100644 index 0000000000..ac78dbb4dc --- /dev/null +++ b/app/src/main/rust/stores/src/epic/savesync.rs @@ -0,0 +1,119 @@ +use std::time::Duration; + +use serde_json::{json, Value}; + +use super::net::{self, Body, Request}; + +const STORAGE_HOST: &str = "https://datastorage-public-service-liveegs.live.use1a.on.epicgames.com"; + +fn base(account_id: &str, app_name: &str) -> String { + format!( + "{STORAGE_HOST}/api/v1/access/egstore/savesync/{}/{}/", + net::percent_encode(account_id), + net::percent_encode(app_name) + ) +} + +pub fn name_of(key: &str, app_name: &str) -> String { + let marker = format!("/{app_name}/"); + if let Some(at) = key.find(&marker) { + return key[at + marker.len()..].to_string(); + } + let lead = format!("{app_name}/"); + key.strip_prefix(&lead).unwrap_or(key).to_string() +} + +pub fn read_listing(answer: &Value, app_name: &str) -> Vec<Value> { + let Some(files) = answer.get("files").and_then(|f| f.as_object()) else { + return Vec::new(); + }; + files + .iter() + .map(|(key, f)| { + let modified = super::timefmt::iso_seconds(net::str_of(f, "lastModified")) + .map(|s| s * 1000) + .unwrap_or(-1); + json!({ + "name": name_of(key, app_name), + "modified": modified, + "hash": net::str_of(f, "hash"), + "readLink": net::str_of(f, "readLink"), + }) + }) + .filter(|f| !net::str_of(f, "name").is_empty()) + .collect() +} + +pub fn list(access_token: &str, account_id: &str, app_name: &str) -> Result<Vec<Value>, String> { + let url = base(account_id, app_name); + let reply = net::send(Request::get(&url).bearer(access_token))?; + if reply.status == 404 { + return Ok(Vec::new()); + } + if !reply.ok() { + return Err(format!("Epic cloud list HTTP {}", reply.status)); + } + let answer = reply.json().ok_or("Epic cloud list could not be read")?; + Ok(read_listing(&answer, app_name)) +} + +pub fn write_links(access_token: &str, account_id: &str, app_name: &str, names: &[String]) -> Result<Value, String> { + let url = base(account_id, app_name); + let body = json!({ "files": names }).to_string(); + let reply = net::send(Request::post(&url, Body::Json(body)).bearer(access_token))?; + if !reply.ok() { + return Err(format!("Epic cloud upload request HTTP {}", reply.status)); + } + let answer = reply.json().ok_or("Epic cloud upload answer could not be read")?; + let mut links = serde_json::Map::new(); + if let Some(files) = answer.get("files").and_then(|f| f.as_object()) { + for (key, f) in files { + let link = net::str_of(f, "writeLink"); + if !link.is_empty() { + links.insert(name_of(key, app_name), json!(link)); + } + } + } + Ok(Value::Object(links)) +} + +pub fn read(link: &str) -> Result<Vec<u8>, String> { + let reply = net::send(Request::get(link).read_timeout(Duration::from_secs(30)))?; + if !reply.ok() { + return Err(format!("Epic cloud download HTTP {}", reply.status)); + } + Ok(reply.body) +} + +pub fn write(link: &str, data: Vec<u8>) -> Result<(), String> { + let reply = net::send(Request::put(link, Body::Bytes(data)))?; + if !reply.ok() { + return Err(format!("Epic cloud upload HTTP {}", reply.status)); + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn names_from_keys() { + assert_eq!(name_of("acc/Fig/Saves/slot1.sav", "Fig"), "Saves/slot1.sav"); + assert_eq!(name_of("Fig/slot1.sav", "Fig"), "slot1.sav"); + assert_eq!(name_of("slot1.sav", "Fig"), "slot1.sav"); + } + + #[test] + fn listing() { + let answer = json!({"files": { + "acc/Fig/a.sav": {"lastModified": "2024-05-01T10:00:00.000Z", "hash": "abc", "readLink": "https://r/a"}, + "acc/Fig/": {"lastModified": "", "hash": "", "readLink": ""} + }}); + let files = read_listing(&answer, "Fig"); + assert_eq!(files.len(), 1); + assert_eq!(files[0]["name"], "a.sav"); + assert_eq!(files[0]["modified"], 1_714_557_600_000i64); + assert!(read_listing(&json!({}), "Fig").is_empty()); + } +} diff --git a/app/src/main/rust/stores/src/epic/service.rs b/app/src/main/rust/stores/src/epic/service.rs new file mode 100644 index 0000000000..67c1995bdf --- /dev/null +++ b/app/src/main/rust/stores/src/epic/service.rs @@ -0,0 +1,216 @@ +use serde_json::{json, Value}; + +use super::build_info::{self, BuildInfo}; +use super::net::str_of; +use super::{account, achievements, catalog, install, launch, library, locale, manifest, savesync, shop}; + +fn error(message: impl Into<String>) -> Value { + json!({ "error": message.into() }) +} + +fn info_of(req: &Value) -> Option<BuildInfo> { + req.get("info").and_then(BuildInfo::from_json) +} + +pub fn call(op: &str, request: &str) -> String { + let req: Value = serde_json::from_str(request).unwrap_or(Value::Null); + dispatch(op, &req).to_string() +} + +fn dispatch(op: &str, req: &Value) -> Value { + let token = str_of(req, "accessToken"); + match op { + "auth.config" => json!({ + "startUrl": account::start_url(), + "redirectPrefix": account::REDIRECT_PREFIX, + "webViewUserAgent": account::WEBVIEW_USER_AGENT, + }), + "auth.codeFromPage" => match account::code_from_page_text(str_of(req, "text")) { + Some(code) => json!({ "code": code }), + None => json!({}), + }, + "auth.signIn" => match account::sign_in_with_code(str_of(req, "code")) { + Ok(t) => t.to_json(), + Err(e) => error(e), + }, + "auth.refresh" => match account::refresh(str_of(req, "refreshToken")) { + Ok(t) => t.to_json(), + Err(e) => error(e), + }, + "auth.exchange" => match account::exchange_code(token) { + Ok(code) => json!({ "code": code }), + Err(e) => error(e), + }, + "library.owned" => match library::list_owned(token) { + Ok(list) => json!({ "records": list.iter().map(|o| json!({ + "appName": o.app_name, "namespace": o.namespace, "catalogItemId": o.catalog_item_id, + })).collect::<Vec<_>>() }), + Err(library::ListError::SignIn) => json!({ "error": "sign-in refused", "signIn": true }), + Err(library::ListError::Failed(e)) => error(e), + }, + "catalog.details" => match catalog::details(token, str_of(req, "namespace"), str_of(req, "catalogItemId")) { + Some(d) => json!({ "details": d }), + None => error("no catalog answer"), + }, + "catalog.attribute" => match catalog::attribute( + token, + str_of(req, "namespace"), + str_of(req, "catalogItemId"), + str_of(req, "name"), + ) { + Some(v) => json!({ "value": v }), + None => json!({ "unknown": true }), + }, + "build.info" => match build_info::fetch( + token, + str_of(req, "namespace"), + str_of(req, "catalogItemId"), + str_of(req, "appName"), + ) { + Some(info) => json!({ "info": info.to_json() }), + None => error("The manifest could not be fetched"), + }, + "build.cdns" => json!({ "cdns": info_of(req).map(|i| build_info::cdns_to_json(&i.cdns)).unwrap_or(json!([])) }), + "build.prereq" => match info_of(req).map(|i| install::fetch_manifest(&i, &|_: &str| {})) { + Some(Ok(m)) => json!({ "name": m.prereq_name, "path": m.prereq_path, "read": m.prereq_read }), + Some(Err(e)) => error(e), + None => error("no build information"), + }, + "shop.shelves" => shop::shelves(str_of(req, "country")), + "achievements" => match achievements::fetch( + token, + str_of(req, "namespace"), + str_of(req, "accountId"), + str_of(req, "locale"), + ) { + Some(list) => json!({ "list": list }), + None => error("unreachable"), + }, + "cloud.list" => match savesync::list(token, str_of(req, "accountId"), str_of(req, "appName")) { + Ok(files) => json!({ "files": files }), + Err(e) => error(e), + }, + "cloud.writeLinks" => { + let names: Vec<String> = req + .get("names") + .and_then(|n| n.as_array()) + .map(|a| a.iter().filter_map(|n| n.as_str()).map(str::to_string).collect()) + .unwrap_or_default(); + match savesync::write_links(token, str_of(req, "accountId"), str_of(req, "appName"), &names) { + Ok(links) => json!({ "links": links }), + Err(e) => error(e), + } + } + "launch.args" => { + let data = launch::LaunchData { + display_name: str_of(req, "displayName").into(), + account_id: str_of(req, "accountId").into(), + namespace: str_of(req, "namespace").into(), + locale: str_of(req, "locale").into(), + app_name: str_of(req, "appName").into(), + deployment_id: str_of(req, "deploymentId").into(), + additional: str_of(req, "additional").into(), + }; + json!({ "args": launch::arguments(&data) }) + } + "locale" => { + let key = locale::language_key(str_of(req, "language"), str_of(req, "region")); + json!({ "key": key, "tags": locale::tags_for_key(key), "launchLocale": locale::launch_locale(key) }) + } + _ => error(format!("unknown operation {op}")), + } +} + +pub fn fetch(op: &str, request: &str) -> Option<Vec<u8>> { + let req: Value = serde_json::from_str(request).ok()?; + match op { + "manifest.download" => { + let info = info_of(&req)?; + let cdns = req.get("cdns").map(build_info::cdns_from_json).unwrap_or_else(|| info.cdns.clone()); + build_info::download_manifest(&info, &cdns, &|_: &str| {}) + } + "cloud.read" => savesync::read(str_of(&req, "url")).ok(), + _ => None, + } +} + +pub fn send(op: &str, request: &str, body: Vec<u8>) -> String { + let req: Value = serde_json::from_str(request).unwrap_or(Value::Null); + let out = match op { + "cloud.write" => match savesync::write(str_of(&req, "url"), body) { + Ok(()) => json!({ "ok": true }), + Err(e) => error(e), + }, + _ => error(format!("unknown operation {op}")), + }; + out.to_string() +} + +pub fn inspect(bytes: &[u8], request: &str) -> String { + let req: Value = serde_json::from_str(request).unwrap_or(Value::Null); + let m = match manifest::parse(bytes) { + Ok(m) => m, + Err(e) => return error(e).to_string(), + }; + let out = match str_of(&req, "op") { + "select" => { + let tags: Option<Vec<String>> = req + .get("tags") + .and_then(|t| t.as_array()) + .map(|a| a.iter().filter_map(|t| t.as_str()).map(str::to_string).collect()); + json!({ "indices": locale::select(&m.files, tags.as_deref()) }) + } + _ => json!({ + "buildVersion": m.build_version, + "launchExe": m.launch_exe, + "prereqName": m.prereq_name, + "prereqPath": m.prereq_path, + "prereqRead": m.prereq_read, + "files": m.files.iter().map(|f| json!({ "path": f.path, "size": f.size, "tags": f.tags })).collect::<Vec<_>>(), + }), + }; + out.to_string() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn local_operations() { + let v: Value = serde_json::from_str(&call("locale", r#"{"language":"pt","region":"BR"}"#)).unwrap(); + assert_eq!(v["key"], "pt-BR"); + assert_eq!(v["launchLocale"], "pt"); + let v: Value = serde_json::from_str(&call("auth.codeFromPage", r#"{"text":"{\"authorizationCode\":\"c1\"}"}"#)).unwrap(); + assert_eq!(v["code"], "c1"); + let v: Value = serde_json::from_str(&call("nope", "{}")).unwrap(); + assert!(v["error"].is_string()); + let v: Value = serde_json::from_str(&call("launch.args", r#"{"namespace":"ns","appName":"A"}"#)).unwrap(); + assert_eq!(v["args"][0], "-EpicPortal"); + } + + #[test] + fn inspect_lists_and_selects() { + use crate::epic::manifest::testing::*; + let m = TestManifest { + version: 21, + build: "b".into(), + exe: "x.exe".into(), + prereq: None, + chunks: vec![], + files: vec![ + TestFile { path: "x.exe".into(), sha1: [0; 20], tags: vec![], parts: vec![] }, + TestFile { path: "de.pak".into(), sha1: [0; 20], tags: vec!["German".into()], parts: vec![] }, + ], + compress: false, + meta_tail: vec![], + }; + let bytes = build(&m); + let v: Value = serde_json::from_str(&inspect(&bytes, "{}")).unwrap(); + assert_eq!(v["files"].as_array().unwrap().len(), 2); + let v: Value = serde_json::from_str(&inspect(&bytes, r#"{"op":"select","tags":["English"]}"#)).unwrap(); + assert_eq!(v["indices"], json!([0])); + let v: Value = serde_json::from_str(&inspect(b"nonsense", "{}")).unwrap(); + assert!(v["error"].is_string()); + } +} diff --git a/app/src/main/rust/stores/src/epic/shop.rs b/app/src/main/rust/stores/src/epic/shop.rs new file mode 100644 index 0000000000..fcaadb4d0d --- /dev/null +++ b/app/src/main/rust/stores/src/epic/shop.rs @@ -0,0 +1,354 @@ +use std::collections::HashSet; +use std::time::Duration; + +use serde_json::{json, Value}; + +use super::net::{self, Body, Request}; + +const GRAPHQL_URL: &str = "https://store.epicgames.com/graphql"; +const PROMOTIONS_URL: &str = "https://store-site-backend-static-ipv4.ak.epicgames.com/freeGamesPromotions"; +const SHELF_COUNT: u32 = 24; + +#[derive(Clone, Copy)] +pub enum Shelf { + New, + Deals, + Free, + Trending, +} + +fn country_code(raw: &str) -> String { + let c = raw.trim().to_ascii_uppercase(); + if c.len() == 2 && c.bytes().all(|b| b.is_ascii_uppercase()) { + c + } else { + "US".to_string() + } +} + +fn now_stamp() -> String { + let secs = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map(|d| d.as_secs() as i64) + .unwrap_or(0); + let days = secs.div_euclid(86_400); + let rem = secs.rem_euclid(86_400); + let (y, m, d) = civil_from_days(days); + format!("{y:04}-{m:02}-{d:02}T{:02}:{:02}:{:02}.000Z", rem / 3600, rem % 3600 / 60, rem % 60) +} + +fn civil_from_days(z: i64) -> (i64, i64, i64) { + let z = z + 719_468; + let era = if z >= 0 { z } else { z - 146_096 } / 146_097; + let doe = z - era * 146_097; + let yoe = (doe - doe / 1460 + doe / 36_524 - doe / 146_096) / 365; + let doy = doe - (365 * yoe + yoe / 4 - yoe / 100); + let mp = (5 * doy + 2) / 153; + let d = doy - (153 * mp + 2) / 5 + 1; + let m = if mp < 10 { mp + 3 } else { mp - 9 }; + (yoe + era * 400 + if m <= 2 { 1 } else { 0 }, m, d) +} + +pub fn shelf_query(shelf: Shelf, country: &str, now: &str) -> String { + let (sort_by, sort_dir, extra) = match shelf { + Shelf::New => ("releaseDate", "DESC", format!("releaseDate: \"[,{now}]\"")), + Shelf::Deals => ("currentPrice", "ASC", "onSale: true".to_string()), + Shelf::Free => ("relevancy", "DESC", "freeGame: true".to_string()), + Shelf::Trending => ("relevancy", "DESC", format!("releaseDate: \"[,{now}]\"")), + }; + format!( + "query {{ Catalog {{ searchStore(category: \"games/edition/base\", count: {SHELF_COUNT}, \ +country: \"{country}\", locale: \"en-US\", sortBy: \"{sort_by}\", sortDir: \"{sort_dir}\", \ +allowCountries: \"{country}\", {extra}) {{ elements {{ title id namespace description effectiveDate \ +releaseDate offerType productSlug urlSlug items {{ id namespace }} keyImages {{ type url }} \ +seller {{ name }} tags {{ name }} customAttributes {{ key value }} \ +catalogNs {{ mappings(pageType: \"productHome\") {{ pageSlug pageType }} }} \ +price(country: \"{country}\") {{ totalPrice {{ discountPrice originalPrice discount currencyCode \ +fmtPrice(locale: \"en-US\") {{ originalPrice discountPrice }} }} }} }} paging {{ total }} }} }} }}" + ) +} + +fn elements(answer: &Value) -> Vec<Value> { + answer + .pointer("/data/Catalog/searchStore/elements") + .and_then(|e| e.as_array()) + .cloned() + .unwrap_or_default() +} + +fn key_image(el: &Value, order: &[&[&str]]) -> String { + let list = el.get("keyImages").and_then(|v| v.as_array()).cloned().unwrap_or_default(); + for group in order { + if let Some(img) = list + .iter() + .find(|i| group.contains(&net::str_of(i, "type")) && !net::str_of(i, "url").is_empty()) + { + return net::str_of(img, "url").to_string(); + } + } + String::new() +} + +fn custom_attribute(el: &Value, key: &str) -> String { + el.get("customAttributes") + .and_then(|a| a.as_array()) + .and_then(|a| a.iter().find(|kv| net::str_of(kv, "key") == key)) + .map(|kv| net::str_of(kv, "value").trim().to_string()) + .unwrap_or_default() +} + +fn store_slug(el: &Value) -> String { + let mapped = el + .pointer("/catalogNs/mappings") + .and_then(|m| m.as_array()) + .and_then(|m| m.iter().find(|x| net::str_of(x, "pageType") == "productHome")) + .map(|x| net::str_of(x, "pageSlug").to_string()) + .filter(|s| !s.is_empty()); + mapped + .or_else(|| { + let s = net::str_of(el, "productSlug"); + Some(s.trim_end_matches("/home").to_string()).filter(|s| !s.is_empty() && s != "null") + }) + .unwrap_or_default() +} + +pub fn item_of(el: &Value) -> Option<Value> { + let id = net::str_of(el, "id"); + let title = net::str_of(el, "title"); + if id.is_empty() || title.is_empty() { + return None; + } + let total = el.pointer("/price/totalPrice"); + let orig = total.and_then(|t| t.get("originalPrice")).and_then(|v| v.as_i64()); + let disc = total.and_then(|t| t.get("discountPrice")).and_then(|v| v.as_i64()); + let fmt = |k: &str| { + total + .and_then(|t| t.get("fmtPrice")) + .map(|f| net::str_of(f, k).trim().to_string()) + .unwrap_or_default() + }; + let has_price = orig.is_some() && disc.is_some(); + let free = disc == Some(0); + let discount = match (orig, disc) { + (Some(o), Some(d)) if o > 0 && d < o => ((o - d) * 100 / o) as i32, + _ => 0, + }; + let shown = if free { + "Free".to_string() + } else { + let d = fmt("discountPrice"); + if !d.is_empty() && d != "0" { + d + } else { + fmt("originalPrice") + } + }; + let names: Vec<String> = el + .get("tags") + .and_then(|t| t.as_array()) + .map(|a| a.iter().map(|t| net::str_of(t, "name").to_string()).filter(|n| !n.is_empty()).collect()) + .unwrap_or_default(); + let tag_line = names.iter().filter(|n| *n != "Windows").take(3).cloned().collect::<Vec<_>>().join(", "); + let items: Vec<String> = el + .get("items") + .and_then(|i| i.as_array()) + .map(|a| a.iter().map(|i| net::str_of(i, "id").to_string()).filter(|s| !s.is_empty()).collect()) + .unwrap_or_default(); + let slug = store_slug(el); + let url = if slug.is_empty() { + format!("https://store.epicgames.com/en-US/browse?q={}", net::percent_encode(title)) + } else { + format!("https://store.epicgames.com/en-US/p/{slug}") + }; + let publisher = Some(custom_attribute(el, "publisherName")) + .filter(|p| !p.is_empty()) + .unwrap_or_else(|| el.get("seller").map(|s| net::str_of(s, "name").to_string()).unwrap_or_default()); + let release = Some(net::str_of(el, "releaseDate")) + .filter(|s| !s.is_empty()) + .unwrap_or_else(|| net::str_of(el, "effectiveDate")); + let mut extra = json!({ "namespace": net::str_of(el, "namespace") }); + if !items.is_empty() { + extra["items"] = json!(items.join(",")); + } + if !slug.is_empty() { + extra["slug"] = json!(slug); + } + Some(json!({ + "id": id, + "title": title, + "image": key_image(el, &[&["DieselGameBox"], &["OfferImageWide", "DieselStoreFrontWide"], &["Thumbnail"]]), + "tall": key_image(el, &[&["DieselGameBoxTall"], &["OfferImageTall", "DieselStoreFrontTall"], &["Thumbnail"]]), + "tags": tag_line, + "free": free, + "hasPrice": has_price, + "final": shown, + "orig": if discount > 0 { fmt("originalPrice") } else { String::new() }, + "disc": discount, + "url": url, + "dev": custom_attribute(el, "developerName"), + "pub": publisher, + "rel": release, + "desc": net::str_of(el, "description"), + "extra": extra, + "allTags": names, + })) +} + +pub fn free_now(el: &Value) -> Option<Value> { + let offer = el.pointer("/promotions/promotionalOffers/0/promotionalOffers/0")?; + let pct = offer.pointer("/discountSetting/discountPercentage")?.as_f64()?; + if pct != 0.0 { + return None; + } + let mut item = item_of(el)?; + let until: String = net::str_of(offer, "endDate").chars().take(10).collect(); + item["free"] = json!(true); + item["disc"] = json!(100); + item["final"] = json!("Free"); + if !until.is_empty() { + item["tags"] = json!(format!("Free until {until}")); + } + Some(item) +} + +fn post_query(query: String) -> Vec<Value> { + let body = json!({ "query": query, "variables": {} }).to_string(); + match net::send(Request::post(GRAPHQL_URL, Body::Json(body)).read_timeout(Duration::from_secs(25))) { + Ok(reply) if reply.ok() => reply.json().map(|a| elements(&a)).unwrap_or_default(), + _ => Vec::new(), + } +} + +fn promotions(country: &str) -> Vec<Value> { + let url = format!("{PROMOTIONS_URL}?locale=en-US&country={country}&allowCountries={country}"); + match net::send(Request::get(&url).read_timeout(Duration::from_secs(25))) { + Ok(reply) if reply.ok() => reply.json().map(|a| elements(&a)).unwrap_or_default(), + _ => Vec::new(), + } +} + +fn unique(items: impl IntoIterator<Item = Value>) -> Vec<Value> { + let mut seen = HashSet::new(); + items.into_iter().filter(|i| seen.insert(net::str_of(i, "id").to_string())).collect() +} + +const MATURE_TAGS: [&str; 8] = ["mature", "nsfw", "adult", "adult only", "adults only", "nudity", "sexual content", "sexual-content"]; + +fn mature_tags(item: &Value) -> bool { + item["allTags"].as_array().is_some_and(|tags| { + tags.iter().filter_map(|t| t.as_str()).any(|t| MATURE_TAGS.contains(&t.trim().to_lowercase().as_str())) + }) +} + +pub fn wall_art(promotion_list: &[Value]) -> Vec<String> { + let mut seen = HashSet::new(); + promotion_list + .iter() + .filter_map(item_of) + .filter(|i| !mature_tags(i)) + .map(|i| { + let tall = net::str_of(&i, "tall"); + if tall.is_empty() { net::str_of(&i, "image").to_string() } else { tall.to_string() } + }) + .filter(|u| !u.is_empty() && seen.insert(u.clone())) + .collect() +} + +pub fn shelves(country: &str) -> Value { + let country = country_code(country); + let now = now_stamp(); + let shelf = |s: Shelf| -> Vec<Value> { + post_query(shelf_query(s, &country, &now)).iter().filter_map(item_of).collect() + }; + let new = unique(shelf(Shelf::New)); + let deals = unique(shelf(Shelf::Deals).into_iter().filter(|i| i["disc"].as_i64().unwrap_or(0) > 0)); + let promotion_list = promotions(&country); + let art = wall_art(&promotion_list); + let promos: Vec<Value> = promotion_list.iter().filter_map(free_now).collect(); + let free = unique(promos.into_iter().chain(shelf(Shelf::Free))); + let trending = unique(shelf(Shelf::Trending)); + json!({ "new": new, "deals": deals, "free": free, "trending": trending, "art": art }) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn element() -> Value { + json!({ + "id": "offer1", "title": "Fig & Co", "namespace": "ns", + "description": "<p>Hi</p>", "releaseDate": "2024-01-02T00:00:00.000Z", + "productSlug": "fig/home", "items": [{"id": "cat1"}, {"id": "cat2"}], + "keyImages": [{"type": "Thumbnail", "url": "t"}, {"type": "OfferImageWide", "url": "w"}, {"type": "DieselStoreFrontTall", "url": "tl"}], + "seller": {"name": "Seller"}, + "tags": [{"name": "Windows"}, {"name": "Action"}, {"name": "RPG"}, {"name": "Indie"}, {"name": "Mature"}], + "customAttributes": [{"key": "developerName", "value": "Dev"}], + "catalogNs": {"mappings": []}, + "price": {"totalPrice": {"originalPrice": 2000, "discountPrice": 1499, + "fmtPrice": {"originalPrice": "$20.00", "discountPrice": "$14.99"}}} + }) + } + + #[test] + fn shelf_item_fields() { + let i = item_of(&element()).unwrap(); + assert_eq!(i["image"], "w"); + assert_eq!(i["tall"], "tl"); + assert_eq!(i["tags"], "Action, RPG, Indie"); + assert_eq!(i["disc"], 25); + assert_eq!(i["final"], "$14.99"); + assert_eq!(i["orig"], "$20.00"); + assert_eq!(i["free"], false); + assert_eq!(i["hasPrice"], true); + assert_eq!(i["url"], "https://store.epicgames.com/en-US/p/fig"); + assert_eq!(i["pub"], "Seller"); + assert_eq!(i["dev"], "Dev"); + assert_eq!(i["extra"]["items"], "cat1,cat2"); + assert_eq!(i["allTags"].as_array().unwrap().len(), 5); + assert!(item_of(&json!({"id": "x"})).is_none()); + } + + #[test] + fn slugs_free_and_promotions() { + let mut el = element(); + el["catalogNs"] = json!({"mappings": [{"pageType": "productHome", "pageSlug": "fig-game"}]}); + el["price"] = json!({"totalPrice": {"originalPrice": 999, "discountPrice": 0, "fmtPrice": {"originalPrice": "$9.99", "discountPrice": "0"}}}); + let i = item_of(&el).unwrap(); + assert_eq!(i["url"], "https://store.epicgames.com/en-US/p/fig-game"); + assert_eq!(i["free"], true); + assert_eq!(i["final"], "Free"); + el["productSlug"] = json!("null"); + el["catalogNs"] = json!({}); + assert_eq!(item_of(&el).unwrap()["url"], "https://store.epicgames.com/en-US/browse?q=Fig%20%26%20Co"); + el["promotions"] = json!({"promotionalOffers": [{"promotionalOffers": [{"endDate": "2026-10-20T15:00:00.000Z", "discountSetting": {"discountPercentage": 0}}]}]}); + let p = free_now(&el).unwrap(); + assert_eq!(p["tags"], "Free until 2026-10-20"); + assert_eq!(p["disc"], 100); + el["promotions"]["promotionalOffers"][0]["promotionalOffers"][0]["discountSetting"]["discountPercentage"] = json!(50); + assert!(free_now(&el).is_none()); + } + + #[test] + fn wall_art_takes_every_promotion_once_and_skips_mature() { + let mut clean = element(); + clean["tags"] = json!([{"name": "Action"}]); + let mut wide_only = clean.clone(); + wide_only["id"] = json!("offer2"); + wide_only["keyImages"] = json!([{"type": "OfferImageWide", "url": "w2"}]); + let mut mature = element(); + mature["id"] = json!("offer3"); + mature["keyImages"] = json!([{"type": "DieselStoreFrontTall", "url": "m"}]); + assert_eq!(wall_art(&[clean.clone(), clean, wide_only, mature]), vec!["tl", "w2"]); + } + + #[test] + fn query_and_dates() { + assert_eq!(country_code("de"), "DE"); + assert_eq!(country_code("419"), "US"); + assert_eq!(civil_from_days(0), (1970, 1, 1)); + assert_eq!(civil_from_days(19_723), (2024, 1, 1)); + let q = shelf_query(Shelf::Deals, "DE", "x"); + assert!(q.contains("onSale: true") && q.contains("sortBy: \"currentPrice\"") && q.contains("country: \"DE\"")); + assert!(shelf_query(Shelf::New, "US", "2026-01-01T00:00:00.000Z").contains("releaseDate: \"[,2026-01-01T00:00:00.000Z]\"")); + } +} diff --git a/app/src/main/rust/stores/src/epic/timefmt.rs b/app/src/main/rust/stores/src/epic/timefmt.rs new file mode 100644 index 0000000000..119106a4c8 --- /dev/null +++ b/app/src/main/rust/stores/src/epic/timefmt.rs @@ -0,0 +1,85 @@ +fn days_from_civil(year: i64, month: i64, day: i64) -> i64 { + let y = if month <= 2 { year - 1 } else { year }; + let era = if y >= 0 { y } else { y - 399 } / 400; + let yoe = y - era * 400; + let mp = (month + 9) % 12; + let doy = (153 * mp + 2) / 5 + day - 1; + let doe = yoe * 365 + yoe / 4 - yoe / 100 + doy; + era * 146_097 + doe - 719_468 +} + +fn digits(s: &str, from: usize, len: usize) -> Option<i64> { + let part = s.get(from..from + len)?; + if !part.bytes().all(|b| b.is_ascii_digit()) { + return None; + } + part.parse().ok() +} + +pub fn utc_prefix_seconds(text: &str) -> Option<i64> { + let s = text.trim(); + let bytes = s.as_bytes(); + if bytes.len() < 19 || bytes[4] != b'-' || bytes[7] != b'-' || bytes[13] != b':' || bytes[16] != b':' { + return None; + } + if bytes[10] != b'T' && bytes[10] != b't' && bytes[10] != b' ' { + return None; + } + let (y, mo, d) = (digits(s, 0, 4)?, digits(s, 5, 2)?, digits(s, 8, 2)?); + let (h, mi, se) = (digits(s, 11, 2)?, digits(s, 14, 2)?, digits(s, 17, 2)?); + if !(1..=12).contains(&mo) || !(1..=31).contains(&d) || h > 23 || mi > 59 || se > 60 { + return None; + } + Some(days_from_civil(y, mo, d) * 86_400 + h * 3600 + mi * 60 + se) +} + +pub fn iso_seconds(text: &str) -> Option<i64> { + let s = text.trim(); + let base = utc_prefix_seconds(s)?; + let mut rest = &s[19..]; + if let Some(stripped) = rest.strip_prefix('.') { + let n = stripped.bytes().take_while(|b| b.is_ascii_digit()).count(); + rest = &stripped[n..]; + } + if rest.is_empty() || rest.eq_ignore_ascii_case("z") { + return Some(base); + } + let sign = match rest.as_bytes()[0] { + b'+' => 1, + b'-' => -1, + _ => return None, + }; + let offset: String = rest[1..].chars().filter(|c| *c != ':').collect(); + if !offset.bytes().all(|b| b.is_ascii_digit()) { + return None; + } + let (hh, mm) = match offset.len() { + 2 => (offset.parse::<i64>().ok()?, 0), + 4 => (offset[..2].parse::<i64>().ok()?, offset[2..].parse::<i64>().ok()?), + _ => return None, + }; + Some(base - sign * (hh * 3600 + mm * 60)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn epoch_and_known_dates() { + assert_eq!(utc_prefix_seconds("1970-01-01T00:00:00"), Some(0)); + assert_eq!(utc_prefix_seconds("2000-03-01T00:00:00.000Z"), Some(951_868_800)); + assert_eq!(utc_prefix_seconds("2026-10-13T12:34:56.789Z"), Some(1_791_894_896)); + assert_eq!(utc_prefix_seconds("not a date"), None); + } + + #[test] + fn offsets_in_every_spelling() { + let z = iso_seconds("2024-05-01T10:00:00Z").unwrap(); + assert_eq!(iso_seconds("2024-05-01T12:00:00+02:00"), Some(z)); + assert_eq!(iso_seconds("2024-05-01T12:00:00+0200"), Some(z)); + assert_eq!(iso_seconds("2024-05-01T08:00:00.123-02:00"), Some(z)); + assert_eq!(iso_seconds("2024-05-01T10:00:00"), Some(z)); + assert_eq!(iso_seconds("2024-05-01T10:00:00 garbage"), None); + } +} diff --git a/app/src/main/rust/stores/src/fetch_core.rs b/app/src/main/rust/stores/src/fetch_core.rs index e700ee3a2e..e0c10112ca 100644 --- a/app/src/main/rust/stores/src/fetch_core.rs +++ b/app/src/main/rust/stores/src/fetch_core.rs @@ -1,29 +1,3 @@ -//! Shared adaptive HTTP fetch core for the store download engines (Epic / GOG / Amazon). -//! -//! This is the generic half of the fetch layer Bannerlator's Steam depot writer grew: an -//! adaptive in-flight window (slow-start → hold at plateau → shrink on REAL errors only), a -//! speed-ranked per-host-capped scheduler, an in-flight RAW byte budget sized from the window -//! ceiling, per-item retry with exponential back-off + host rotation, one current-thread tokio -//! runtime driving every request through a [`FuturesUnordered`], and an mpsc hand-off to a sync -//! process pool that calls the adapter's [`FetchSink::process`] (inflate + hash + write). -//! -//! The tunables come from [`crate::fetch_tuning`], copied number for number from Bannerlator's -//! depot writer, so a `fetch-window` line from either app reads against the same tuning notes. -//! -//! What the core does NOT know: manifests, resume/skip rules, output layout, hashing. The adapter -//! builds the item list (already excluding present+verified items, exactly as its Java manager -//! does), maps host index → URL, and does everything with the body inside its sink. -//! -//! Log grammar (all lines go through the `log` callback; `label` is adapter-chosen, e.g. -//! `epic app=Fortnite`): -//! - `fetch-start label=… items=… bytes_reserved=… hosts=… ceiling=… budget=…MiB tier_max=… per_host_cap=… distinct_hosts=… window=… mode=body|stream` -//! - `fetch-window label=… window=N (min=… max=…) in_flight=… last=…MB/s ewma=…MB/s best=…MB/s reason=… cooldown=…ms err_rate=…% phase=… rtt=…ms budget_stalls=… host_stalls=…` -//! (same fields as the Steam engine's `fetch-window depot=…` line, so the two are A/B-comparable) -//! - `throughput label=… overall=…MB/s total=…MB elapsed=…s used=x/y servers: [host …MB/s …MB] …` every 5 s -//! - `fetch-end label=… items_ok=… bytes=… credited=… elapsed_ms=… avg_mbps=… peak_mbps=… result=ok|cancelled|error [error=…]` -//! -//! `MB/s` here means MiB/s (1024²), matching the Steam engine's lines. - use crate::fetch_tuning::{ budget_admits, connect_timeout, inflight_budget_bytes, retry_backoff_millis, AsyncFetchError, FetchFailKind, BOOTSTRAP_WINDOW, MAX_CHUNK_ATTEMPTS, NOMINAL_CHUNK_RESERVE_BYTES, @@ -46,95 +20,39 @@ use std::thread; use std::time::{Duration, Instant}; use tokio::sync::{Notify, Semaphore}; -/// Maximum attempts per item (fetch failures AND `SinkError::Retry` both count). Same as Steam. pub const MAX_ITEM_ATTEMPTS: u32 = MAX_CHUNK_ATTEMPTS; -/// How often the throughput reporter samples (and logs) — the samples feed `peak_mbps`. pub const THROUGHPUT_SAMPLE_INTERVAL_MS: u64 = 5_000; -/// Upper bound on how long the driver sits in one `await` before re-checking cancel/error/feedback. const DRIVER_POLL_MS: u64 = 250; -// ── Delay awareness (bufferbloat) ── -// On a 5G hotspot the window kept growing (31 → 84) while the per-request delay went from 3 s to -// 11 s and throughput stayed at 10-20 MB/s: every extra request only queued behind the others in -// the link's buffer. The signal used here is time-to-first-byte (request sent → response headers), -// which on a link with a deep buffer grows with the queue, while on a fast link it stays at a few -// round trips however wide the window gets. The baseline is the lowest per-probe mean seen. - -/// A probe needs at least this many TTFB samples before its mean is trusted. pub const LATENCY_MIN_SAMPLES: u32 = 3; -/// Mean TTFB at or above `baseline ×` this counts as queueing delay… pub const LATENCY_HOLD_FACTOR: f64 = 2.5; -/// …and only when it is also this far above the baseline in absolute terms: a fast link whose -/// TTFB goes from 20 ms to 60 ms (new connections' TLS handshakes) is not bufferbloat. pub const LATENCY_MIN_EXCESS_MS: f64 = 250.0; -/// Throughput above `best × (1 + this)` is a gain that justifies the extra delay: hold, but never -/// shrink, while it lasts. pub const LATENCY_GAIN_EPS: f64 = 0.25; -/// Gentle proportional shrink while the delay keeps rising (gentler than the error shrink). pub const LATENCY_SHRINK_FACTOR: f64 = 0.85; -// ── Stalled hosts ── -// A CDN host can stop delivering while its connections stay open: on the device the Fastly host -// froze at 49 MB for the rest of the run while the other host carried everything, and its requests -// sat until their idle timeout. A host whose in-flight requests receive no byte for this long, -// while another host is receiving, has its requests cancelled and re-queued and is put to rest. - -/// No byte from any of a host's in-flight requests for this long (while another host delivers). pub const HOST_STALL_MS: u64 = if cfg!(test) { 1_500 } else { 10_000 }; -/// First rest for a stalled host; doubles per further stall of the same host, reset on success. pub const HOST_STALL_COOLDOWN_MS: u64 = 30_000; pub const HOST_STALL_COOLDOWN_MAX_MS: u64 = 300_000; -/// How often the driver looks for stalled hosts. const STALL_CHECK_MS: u64 = 250; -/// Stream mode: the longest a request may sit with no byte arriving before it is failed (the -/// store's own timeout when it is shorter). A dead connection on a single-host run, where the -/// stall detector has no healthy host to compare with, never holds an item longer than this. pub const STREAM_IDLE_CAP: Duration = Duration::from_secs(30); -// ───────────────────────────────────────────────────────────────────────────────────────────── -// Public contract -// ───────────────────────────────────────────────────────────────────────────────────────────── - -/// One unit of work: a body to fetch from one of the hosts and hand to the sink. #[derive(Clone, Debug)] pub struct FetchItem { - /// Adapter-defined (index into the adapter's own table). Only echoed in errors / logs. pub id: u64, - /// `len == hosts.len()` → `urls[host_idx]`; `len == 1` → the same URL on every host. Any other - /// non-zero length falls back to `urls.get(host_idx)` then `urls[0]`. Empty = fatal. pub urls: Vec<String>, - /// Expected RAW (wire) bytes, for the in-flight byte budget; `0` → nominal 1 MiB. Ignored in - /// stream mode (streams are budgeted piece by piece as they arrive). pub reserve: u64, - /// Inclusive HTTP `Range` (`bytes=a-b`); `None` = whole body. pub range: Option<(u64, u64)>, } #[derive(Clone, Debug)] pub struct FetchOptions { - /// Window ceiling (tier); the core clamps it to `hosts × per_host_cap` and the hard cap. pub max_workers: usize, - /// Max concurrent requests per distinct host (6 unless the store needs otherwise). Honoured - /// as given: 1 host × `per_host_cap` 8 = a ceiling of 8. pub per_host_cap: usize, - /// Whole-body mode: the deadline for the entire request (connect + headers + body). Stream - /// mode: the deadline for the response headers, then an IDLE deadline per received piece. pub timeout: Duration, - /// Sent on EVERY request (applied on the request builder, so they override the client-level - /// defaults — e.g. a store's own `User-Agent`, or `Authorization: Bearer …`). Validated once - /// when the client is built. pub headers: Vec<(String, String)>, - /// PEM bundle path; `""` = the platform roots reqwest/rustls ships with. pub ca_bundle_path: String, - /// Sync process-pool threads (inflate + hash + write). pub process_workers: usize, - /// Log prefix, e.g. `"epic app=Fortnite"`. pub label: String, - /// `false` (default): each item's whole body is buffered and handed to - /// [`FetchSink::process`]. `true`: the body is streamed — pieces go to - /// [`FetchSink::on_chunk`] in order as they arrive, then [`FetchSink::on_finish`]; for - /// multi-GB files (Amazon) that keeps memory at "pieces not yet written", not whole files. - /// Applies to every item of the run. pub stream: bool, } @@ -153,36 +71,20 @@ impl Default for FetchOptions { } } -/// What the sink says about a body it was handed. #[derive(Clone, Debug)] pub enum SinkError { - /// Counts as a failed attempt for that item: host cooled + demoted, back-off, re-dispatch on a - /// different host, up to [`MAX_ITEM_ATTEMPTS`]. In stream mode the whole item is re-streamed - /// (`on_chunk` sees `offset == 0` again). Retry(String), - /// Abort the whole run; this becomes the run's first error. Fatal(String), } -/// Runs on a process-pool thread. Whole-body mode uses [`FetchSink::process`]; stream mode uses -/// [`FetchSink::on_chunk`] + [`FetchSink::on_finish`] (default impls refuse, so a whole-body sink -/// is unaffected by the stream option existing). pub trait FetchSink: Send + Sync { - /// Whole-body mode: the raw wire body. Do inflate + hash verify + write here. Returns the - /// number of bytes to credit to progress (adapter's choice, e.g. decompressed bytes). fn process(&self, item: &FetchItem, body: Vec<u8>) -> Result<u64, SinkError>; - /// Stream mode: one piece of the body, delivered in order (`offset` = bytes of this attempt - /// delivered before this piece). `offset == 0` marks the (re)start of an attempt — truncate any - /// partial output from a previous attempt. Each processed piece credits `data.len()` bytes. fn on_chunk(&self, item: &FetchItem, offset: u64, data: &[u8]) -> Result<(), SinkError> { let _ = (item, offset, data); Err(SinkError::Fatal("streaming not supported by this sink".to_string())) } - /// Stream mode: the body ended after `total_len` bytes. Finalize (rename `.tmp`, verify the - /// hash, …). Returns EXTRA bytes to credit (pieces were already credited as they were - /// written; return 0 for none). fn on_finish(&self, item: &FetchItem, total_len: u64) -> Result<u64, SinkError> { let _ = (item, total_len); Err(SinkError::Fatal("streaming not supported by this sink".to_string())) @@ -191,15 +93,9 @@ pub trait FetchSink: Send + Sync { #[derive(Clone, Debug, Default, PartialEq, Eq)] pub struct FetchOutcome { - /// Sum of what the sink returned for every successfully processed item (stream mode: every - /// piece written + every `on_finish` extra; pieces of an attempt that later failed stay - /// counted). pub bytes_credited: u64, - /// First error (fetch after max attempts, sink `Fatal`, client build failure). pub error: Option<String>, - /// `cancel` was observed set. pub cancelled: bool, - /// Items the sink accepted. pub items_ok: u64, } @@ -209,10 +105,6 @@ impl FetchOutcome { } } -/// Blocking: spawns its own current-thread tokio runtime + process pool and returns when every -/// item is processed, `cancel` is set, or the first fatal error is recorded. `progress` fires from -/// a process-pool thread after each successful `process` / each written piece + `on_finish` (the -/// caller throttles). pub fn run_fetch( items: Vec<FetchItem>, hosts: &[String], @@ -221,6 +113,20 @@ pub fn run_fetch( cancel: &AtomicBool, progress: &(dyn Fn(u64, u64) + Sync), log: &(dyn Fn(&str) + Sync), +) -> FetchOutcome { + run_fetch_gated(items, hosts, opts, sink, cancel, progress, log, &|_: usize| true) +} + +#[allow(clippy::too_many_arguments)] +pub fn run_fetch_gated( + items: Vec<FetchItem>, + hosts: &[String], + opts: &FetchOptions, + sink: &dyn FetchSink, + cancel: &AtomicBool, + progress: &(dyn Fn(u64, u64) + Sync), + log: &(dyn Fn(&str) + Sync), + gate: &(dyn Fn(usize) -> bool + Sync), ) -> FetchOutcome { let started = Instant::now(); let label = opts.label.as_str(); @@ -254,8 +160,6 @@ mode={}", let error_slot: Mutex<Option<String>> = Mutex::new(None); let reporter_done = AtomicBool::new(false); let meter = BandwidthMeter::new(&hosts); - // Stream mode: per-item "attempt N was rejected by the sink mid-stream" flags, so the driver's - // in-flight stream stops reading instead of feeding pieces nobody wants. let abandon: Vec<AtomicU32> = if stream { items.iter().map(|_| AtomicU32::new(NO_ATTEMPT)).collect() } else { @@ -268,11 +172,6 @@ mode={}", let abandon = &abandon; thread::scope(|scope| { - // Async(fetch) → sync(process): tokio unbounded mpsc drained with `blocking_recv`. Memory is - // bounded by the RAW byte budget enforced at DISPATCH (whole-body) / per piece (stream), not - // by channel capacity. Whole-body mode: ONE channel shared by every worker (any worker takes - // the next body). Stream mode: one channel PER worker and an item's pieces always go to the - // same worker (`idx % workers`), so pieces are written in order. let channel_count = if stream { proc_count } else { 1 }; let mut txs: Vec<tokio::sync::mpsc::UnboundedSender<ProcessMsg>> = Vec::with_capacity(channel_count); @@ -283,7 +182,6 @@ mode={}", txs.push(tx); rxs.push(Arc::new(Mutex::new(rx))); } - // Sync(process) → async(driver): sink verdicts, polled non-blocking by the driver. let (fb_tx, fb_rx) = std_mpsc::channel::<Feedback>(); let bytes_credited = &bytes_credited; let items_ok = &items_ok; @@ -291,8 +189,6 @@ mode={}", let error_slot = &error_slot; let reporter_done = &reporter_done; - // Periodic throughput reporter — atomics only, never on the fetch hot path. Its samples are - // also the `peak_mbps` source. let reporter = scope.spawn(move || { crate::priority::background(); loop { @@ -312,15 +208,12 @@ mode={}", } }); - // ── Process pool ── let mut proc_handles = Vec::with_capacity(proc_count); for worker in 0..proc_count { let rx = Arc::clone(&rxs[if stream { worker } else { 0 }]); let fb = fb_tx.clone(); proc_handles.push(scope.spawn(move || { crate::priority::background(); - // Stream mode: (item → attempt, message) whose pieces the sink rejected; the rest - // of that attempt's pieces are dropped and its Finish becomes a Retry verdict. let mut poisoned: HashMap<usize, (u32, String)> = HashMap::new(); loop { if cancel.load(Ordering::Relaxed) { @@ -344,8 +237,6 @@ mode={}", body, } => { let raw_len = body.len() as u64; - // A body that was already queued when cancel / the first error landed - // must not be written any more. if cancel.load(Ordering::Relaxed) || error_slot.lock().expect("err slot poisoned").is_some() { @@ -354,7 +245,6 @@ mode={}", } let item = &items[idx]; let res = sink.process(item, body); - // Free the budget on PROCESS-COMPLETE (actual raw bytes). in_flight.fetch_sub(raw_len, Ordering::Relaxed); let verdict = match res { Ok(credited) => { @@ -390,7 +280,7 @@ mode={}", let len = data.len() as u64; in_flight.fetch_sub(len, Ordering::Relaxed); if poisoned.get(&idx).is_some_and(|(a, _)| *a == attempts) { - continue; // rest of a rejected attempt + continue; } if cancel.load(Ordering::Relaxed) || error_slot.lock().expect("err slot poisoned").is_some() @@ -471,11 +361,6 @@ mode={}", } drop(fb_tx); - // ── Async fetch driver on one current-thread runtime. `txs` are moved in and dropped when - // the driver returns, which closes the channels so the pool's `blocking_recv` yields - // `None`. ── - // The runtime drives on this (already lowered) thread; `on_thread_start` covers the - // blocking pool it starts for DNS lookups. match tokio::runtime::Builder::new_current_thread() .enable_all() .on_thread_start(crate::priority::background) @@ -484,6 +369,7 @@ mode={}", Ok(rt) => { rt.block_on(run_driver(DriverCtx { items: items.as_slice(), + gate, hosts: hosts.as_slice(), opts, label, @@ -515,7 +401,6 @@ mode={}", let _ = reporter.join(); }); - // Final partial-interval sample so a short run still has a peak. meter.sample(); let elapsed = started.elapsed(); let elapsed_secs = elapsed.as_secs_f64().max(0.001); @@ -552,11 +437,6 @@ avg_mbps={avg_mbps:.2} peak_mbps={peak_mbps:.2} result={result}", outcome } -// ───────────────────────────────────────────────────────────────────────────────────────────── -// Pure helpers (unit-tested) -// ───────────────────────────────────────────────────────────────────────────────────────────── - -/// Bytes reserved against the in-flight budget at DISPATCH (nominal when the adapter has none). pub fn reserve_bytes(item: &FetchItem) -> u64 { if item.reserve == 0 { NOMINAL_CHUNK_RESERVE_BYTES @@ -565,8 +445,6 @@ pub fn reserve_bytes(item: &FetchItem) -> u64 { } } -/// Window bounds: `max` = tier ceiling clamped to distinct-hosts × per-host-cap and the hard cap; -/// `min` = the floor; `bootstrap` = the start. Same arithmetic as the Steam depot writer. pub fn window_bounds( max_workers: usize, distinct_hosts: usize, @@ -579,7 +457,6 @@ pub fn window_bounds( (bootstrap, min, max) } -/// Distinct host count (string equality) — the multiplier for the window's host ceiling. pub fn distinct_host_count(hosts: &[String]) -> usize { let mut keys: Vec<&str> = Vec::new(); for h in hosts { @@ -590,8 +467,6 @@ pub fn distinct_host_count(hosts: &[String]) -> usize { keys.len().max(1) } -/// The URL to use for `item` on host `host_idx` (see [`FetchItem::urls`]). `None` when the item -/// carries no URL at all. pub fn url_for_host(item: &FetchItem, host_idx: usize) -> Option<&str> { if item.urls.is_empty() { return None; @@ -607,7 +482,6 @@ pub fn url_for_host(item: &FetchItem, host_idx: usize) -> Option<&str> { ) } -/// Byte count an inclusive range must deliver; `None` for an inverted range. pub fn range_len(range: (u64, u64)) -> Option<u64> { let (a, b) = range; if b < a { @@ -617,8 +491,6 @@ pub fn range_len(range: (u64, u64)) -> Option<u64> { } } -/// Validates a received body's length: for a range request it must be exactly `b-a+1`; otherwise -/// it must match `Content-Length` when the server sent one (as the Steam client does). pub fn validate_body_len( body_len: u64, content_length: Option<u64>, @@ -653,13 +525,10 @@ pub fn validate_body_len( Ok(()) } -/// Whether an HTTP status is acceptable for this request shape (200 always; 206 only when a range -/// was asked for). pub fn status_accepted(status: u16, ranged: bool) -> bool { status == 200 || (ranged && status == 206) } -/// Classifies a rejected HTTP status the same way the Steam async client does. pub fn classify_status(status: u16) -> FetchFailKind { if status == 429 { FetchFailKind::RateLimited @@ -670,10 +539,6 @@ pub fn classify_status(status: u16) -> FetchFailKind { } } -/// The HTTP status carried by a `send_checked` rejection message, if that is what the error was. -/// A 4xx other than 429 is a CLIENT rejection (bad/expired signed URL, wrong host for this path, -/// 404): it says nothing about congestion, so the driver demotes the host but does not shrink the -/// shared window for it — one CDN that refuses a path must not throttle the healthy ones. pub fn rejected_status(message: &str) -> Option<u16> { let rest = message.strip_prefix("unexpected HTTP status (")?; let digits = rest.strip_suffix(')')?; @@ -684,8 +549,6 @@ pub fn is_client_rejection(message: &str) -> bool { matches!(rejected_status(message), Some(s) if (400..500).contains(&s) && s != 429) } -/// How many individual fetch failures a run logs verbatim before going quiet (the window and -/// throughput lines keep reporting the aggregate). pub const FETCH_ERROR_LOG_LIMIT: u32 = 12; fn record_first_error(slot: &Mutex<Option<String>>, err: String) { @@ -695,11 +558,6 @@ fn record_first_error(slot: &Mutex<Option<String>>, err: String) { } } -// ───────────────────────────────────────────────────────────────────────────────────────────── -// HTTP client (one pooled reqwest client + per-request headers + optional Range + streaming) -// ───────────────────────────────────────────────────────────────────────────────────────────── - -/// The pooled client plus the pre-validated per-request headers. struct Http { client: reqwest::Client, headers: Vec<(reqwest::header::HeaderName, reqwest::header::HeaderValue)>, @@ -732,8 +590,6 @@ fn build_http(opts: &FetchOptions, pool_max_idle_per_host: usize) -> Result<Http } impl Http { - /// `GET url` with the run's headers (set per request, so they override the client defaults — - /// a store's own `User-Agent` wins over the Steam one) and the optional `Range`. fn request(&self, url: &str, range: Option<(u64, u64)>) -> reqwest::RequestBuilder { let mut request = self.client.get(url); for (name, value) in &self.headers { @@ -756,7 +612,6 @@ fn classify_reqwest_error(err: &reqwest::Error) -> FetchFailKind { } } -/// Sends the request and checks the status; shared by both modes. async fn send_checked( http: &Http, url: &str, @@ -786,9 +641,6 @@ async fn send_checked( Ok(response) } -/// Whole-body mode: one attempt for one item (the driver owns retry/rotation). `timeout` bounds the -/// whole request (headers + body). The body is read piece by piece so `host_rx` sees every byte as -/// it arrives (the stall detector's signal); `ttfb` is set when the response headers arrive. async fn fetch_once( http: &Http, url: &str, @@ -835,10 +687,6 @@ async fn fetch_once( } } -/// Stream mode: one attempt for one item. Pieces are pushed to the item's pool worker as they -/// arrive (each one added to the in-flight budget until the pool consumes it); the future waits -/// while the budget is full, and stops early on cancel or when the sink rejected this attempt. -/// Returns the total body length after the last piece was queued. #[allow(clippy::too_many_arguments)] async fn fetch_stream( http: &Http, @@ -871,7 +719,6 @@ async fn fetch_stream( let content_length = response.content_length(); let mut offset = 0u64; loop { - // Budget gate: don't read ahead of the pool by more than the budget. while in_flight.load(Ordering::Relaxed) >= budget { if cancel.load(Ordering::Relaxed) { return Err(AsyncFetchError { @@ -931,29 +778,21 @@ async fn fetch_stream( Ok(offset) } -// ───────────────────────────────────────────────────────────────────────────────────────────── -// Driver plumbing -// ───────────────────────────────────────────────────────────────────────────────────────────── - -/// `abandon` sentinel: no attempt of this item has been rejected by the sink. const NO_ATTEMPT: u32 = u32::MAX; enum ProcessMsg { - /// Whole-body mode: the complete raw body. Body { idx: usize, attempts: u32, server_idx: usize, body: Vec<u8>, }, - /// Stream mode: one in-order piece of attempt `attempts` of item `idx`. Piece { idx: usize, attempts: u32, offset: u64, data: Vec<u8>, }, - /// Stream mode: the body ended; the pool finalizes and reports a verdict. Finish { idx: usize, attempts: u32, @@ -975,7 +814,6 @@ struct Feedback { verdict: SinkVerdict, } -/// An item awaiting (re)dispatch: `attempts` already spent; not eligible before `not_before`. #[derive(Clone, Copy, Debug)] struct PendingItem { idx: usize, @@ -988,24 +826,21 @@ enum Fetched { Streamed(u64), } -/// The result the driver awaits for each dispatched fetch. struct FetchDone { idx: usize, attempts: u32, reserve: u64, server_idx: usize, elapsed: Duration, - /// Request sent → response headers, when the headers arrived. ttfb: Option<Duration>, - /// Key in the driver's registry of running requests. req_id: u64, - /// The request was cancelled because its host stalled (not a failure of the item). stalled: bool, res: Result<Fetched, AsyncFetchError>, } struct DriverCtx<'a> { items: &'a [FetchItem], + gate: &'a (dyn Fn(usize) -> bool + Sync), hosts: &'a [String], opts: &'a FetchOptions, label: &'a str, @@ -1027,6 +862,7 @@ struct DriverCtx<'a> { async fn run_driver(ctx: DriverCtx<'_>) { let DriverCtx { items, + gate, hosts, opts, label, @@ -1061,11 +897,7 @@ async fn run_driver(ctx: DriverCtx<'_>) { let mut retry: VecDeque<PendingItem> = VecDeque::new(); let mut next_item = 0usize; let mut errors_logged: u32 = 0; - // Bodies / finishes handed to the pool whose verdict has not come back yet. let mut outstanding = 0usize; - // Stall detection: bytes received per server (bumped by the request futures as pieces - // arrive), when that count last moved, since when the server has had requests to answer, - // how many requests it is running, and each running request's abort switch. let host_rx: Vec<AtomicU64> = hosts.iter().map(|_| AtomicU64::new(0)).collect(); let mut last_rx: Vec<u64> = vec![0; hosts.len()]; let mut last_rx_at: Vec<Option<Instant>> = vec![None; hosts.len()]; @@ -1075,7 +907,6 @@ async fn run_driver(ctx: DriverCtx<'_>) { let mut aborts: HashMap<u64, (usize, Arc<Notify>)> = HashMap::new(); let mut next_req_id: u64 = 0; let mut last_stall_check = Instant::now(); - // Declared AFTER `txs`/`http` so it is dropped BEFORE them (its futures borrow both). let mut inflight: FuturesUnordered<_> = FuturesUnordered::new(); 'outer: loop { @@ -1085,8 +916,6 @@ async fn run_driver(ctx: DriverCtx<'_>) { break; } - // ── Sink verdicts: Retry = counts as a failed attempt (cool + demote host, back-off, - // rotate); Fatal was already recorded in the error slot by the pool. ── while let Ok(fb) = fb_rx.try_recv() { outstanding = outstanding.saturating_sub(1); match fb.verdict { @@ -1123,7 +952,6 @@ async fn run_driver(ctx: DriverCtx<'_>) { log(&window.summary_line(label, inflight.len(), probe_now)); } - // ── Stalled hosts: requests that receive nothing while another host delivers. ── if probe_now.duration_since(last_stall_check) >= Duration::from_millis(STALL_CHECK_MS) { last_stall_check = probe_now; for s in 0..hosts.len() { @@ -1163,12 +991,10 @@ async fn run_driver(ctx: DriverCtx<'_>) { hosts[s], probe_now.duration_since(silent_since).as_millis() )); - // Do not fire again for the same silence while the cancelled requests wind down. watch_from[s] = probe_now; } } - // ── Dispatch up to the current window ── while inflight.len() < window.current { if cancel.load(Ordering::Relaxed) || error_slot.lock().expect("err slot poisoned").is_some() @@ -1177,31 +1003,26 @@ async fn run_driver(ctx: DriverCtx<'_>) { } let now = Instant::now(); - // A due retry first, else the next fresh item. let use_retry = retry.front().is_some_and(|p| p.not_before <= now); let (idx, attempts) = if use_retry { let p = *retry.front().expect("retry nonempty"); (p.idx, p.attempts) - } else if next_item < items.len() { + } else if next_item < items.len() && gate(next_item) { (next_item, 0u32) } else { - break; // nothing dispatchable now (retry not due, or all dispatched) + break; }; let item = &items[idx]; - // Byte-budget gate (hard memory bound): reserve at DISPATCH. Always admits when nothing - // is in flight, so an item bigger than the whole budget can't deadlock. Streams reserve - // nothing here — their pieces are budgeted as they arrive. let reserve = if stream { 0 } else { reserve_bytes(item) }; if !budget_admits(in_flight.load(Ordering::Relaxed), reserve, budget) { window.note_budget_stall(); - break; // wait for a completion to free budget + break; } - // Speed-ranked, per-host-capped host pick. let Some(server_idx) = sched.pick(now) else { window.note_host_stall(); - break; // every host at cap or cooling → wait for a completion + break; }; let permit = match sched.host_sem(server_idx).clone().try_acquire_owned() { Ok(permit) => permit, @@ -1218,7 +1039,6 @@ async fn run_driver(ctx: DriverCtx<'_>) { let url = url.to_string(); let range = item.range; - // Commit: pop the work item, reserve budget, launch the fetch future. if use_retry { retry.pop_front(); } else { @@ -1231,7 +1051,6 @@ async fn run_driver(ctx: DriverCtx<'_>) { let rx_counter = &host_rx[server_idx]; let started = Instant::now(); if running[server_idx] == 0 { - // The host had nothing to answer until now: its silence is measured from here. watch_from[server_idx] = started; } running[server_idx] += 1; @@ -1268,7 +1087,6 @@ async fn run_driver(ctx: DriverCtx<'_>) { .map(Fetched::Body) } }; - // The stall detector's switch: dropping the fetch future closes its connection. match select(pin!(fetch), pin!(abort.notified())).await { Either::Left((res, _)) => (res, false), Either::Right(((), _)) => ( @@ -1280,7 +1098,7 @@ async fn run_driver(ctx: DriverCtx<'_>) { ), } }; - drop(permit); // RAII per-host permit release (also on future drop / cancel-abort) + drop(permit); FetchDone { idx, attempts: attempts + 1, @@ -1295,17 +1113,14 @@ async fn run_driver(ctx: DriverCtx<'_>) { }); } - // ── Nothing in flight? finished, or waiting on retry-not-due / host cooldown / the pool. ── if inflight.is_empty() { if next_item >= items.len() && retry.is_empty() && outstanding == 0 { - break; // every item fetched and processed + break; } tokio::time::sleep(Duration::from_millis(5)).await; continue; } - // ── Await one completion (drives ALL in-flight requests cooperatively), bounded so - // cancel / a pool Fatal / a Retry verdict are noticed promptly even mid-fetch. ── let done = match tokio::time::timeout(Duration::from_millis(DRIVER_POLL_MS), inflight.next()) .await { @@ -1317,9 +1132,6 @@ async fn run_driver(ctx: DriverCtx<'_>) { aborts.remove(&done.req_id); running[done.server_idx] = running[done.server_idx].saturating_sub(1); if done.stalled { - // Not the item's fault: straight back into the queue for a healthy host, no window - // or host penalty beyond the rest the detector already gave the host. It still counts - // as an attempt, which keeps each stream attempt's pieces distinguishable. in_flight.fetch_sub(done.reserve, Ordering::Relaxed); retry.push_front(PendingItem { idx: done.idx, @@ -1340,8 +1152,6 @@ async fn run_driver(ctx: DriverCtx<'_>) { meter.record(done.server_idx, raw_len); sched.on_success(done.server_idx, raw_len, done.elapsed); window.record_ok(done.elapsed.as_secs_f64() * 1000.0); - // Reconcile the dispatch reservation to the actual raw size; the pool subtracts the - // actual size on process-complete, netting this item's budget to zero. if raw_len >= done.reserve { in_flight.fetch_add(raw_len - done.reserve, Ordering::Relaxed); } else { @@ -1357,7 +1167,7 @@ async fn run_driver(ctx: DriverCtx<'_>) { }) .is_err() { - break; // process side gone + break; } } Ok(Fetched::Streamed(total_len)) => { @@ -1374,7 +1184,7 @@ async fn run_driver(ctx: DriverCtx<'_>) { }) .is_err() { - break; // process side gone + break; } } Err(err) => { @@ -1423,14 +1233,10 @@ window_shrink={} msg={}", } } - // Dropping `inflight` aborts any still-running requests (the cancel / error / final-failure - // teardown path); dropping the senders then closes the channels so the pool drains and exits. drop(inflight); drop(txs); } -/// Since when a server has been silent: its last byte, or when it was last given work to do if -/// that came later. fn silent_since(last_rx_at: Option<Instant>, watch_from: Instant) -> Instant { match last_rx_at { Some(at) if at > watch_from => at, @@ -1438,16 +1244,11 @@ fn silent_since(last_rx_at: Option<Instant>, watch_from: Instant) -> Instant { } } -// ───────────────────────────────────────────────────────────────────────────────────────────── -// Bandwidth meter (per-host bytes + 5-s samples for peak) -// ───────────────────────────────────────────────────────────────────────────────────────────── - pub struct BandwidthMeter { start: Instant, total_bytes: AtomicU64, per_server_bytes: Vec<AtomicU64>, hosts: Vec<String>, - /// (bytes, instant) at the last sample; peak = max sample rate in bytes/s. last_sample: Mutex<(u64, Instant)>, peak_bps: Mutex<f64>, } @@ -1478,8 +1279,6 @@ impl BandwidthMeter { self.total_bytes.load(Ordering::Relaxed) } - /// Take a throughput sample since the previous one (≥ 1 s apart to be counted) and fold it - /// into the peak. pub fn sample(&self) { let now = Instant::now(); let total = self.total_bytes(); @@ -1530,10 +1329,6 @@ impl BandwidthMeter { } } -// ───────────────────────────────────────────────────────────────────────────────────────────── -// Scheduler + adaptive window — a copy of the Steam depot writer's (keyed on host strings). -// ───────────────────────────────────────────────────────────────────────────────────────────── - #[derive(Clone, Debug, Default)] struct ServerHealth { ewma_bps: f64, @@ -1542,10 +1337,6 @@ struct ServerHealth { cooldown_until: Option<Instant>, } -/// Speed-ranked, per-host-capped host picker. Cold hosts are probed first, then selection is -/// epsilon-greedy over the measured EWMA so a demoted-but-recovered host returns. Per-host caps key -/// on the host STRING (one `tokio::sync::Semaphore` each) so two entries that share a host still -/// share one cap. struct FetchScheduler { health: Vec<ServerHealth>, server_host: Vec<usize>, @@ -1635,8 +1426,6 @@ impl FetchScheduler { h.cooldown_until = None; } - /// A stalled host: out of the rotation for `rest`, and its speed estimate cut so it comes - /// back behind the hosts that kept delivering. fn rest(&mut self, server_idx: usize, now: Instant, rest: Duration) { let h = &mut self.health[server_idx]; h.cooldown_until = Some(now + rest); @@ -1710,8 +1499,6 @@ impl WindowReason { } } -/// Adaptive in-flight window: slow-start doubles every healthy probe until the first real back-off, -/// then grows additively; holds on plateau; shrinks proportionally only on real errors. #[derive(Clone, Debug)] struct AdaptiveWindow { current: usize, @@ -1733,14 +1520,10 @@ struct AdaptiveWindow { last_budget_stalls: u32, last_host_stalls: u32, latency_ewma_ms: f64, - /// TTFB samples of the current probe interval. ttfb_sum_ms: f64, ttfb_samples: u32, - /// Lowest per-probe mean TTFB seen this run (0 = none yet): the no-queue baseline. ttfb_base_ms: f64, - /// Mean TTFB of the last probe that had enough samples. ttfb_last_ms: f64, - /// Consecutive probes with queueing delay. latency_streak: u32, stalled_hosts: u32, cooldown_until: Option<Instant>, @@ -1803,7 +1586,6 @@ impl AdaptiveWindow { self.stalled_hosts = self.stalled_hosts.saturating_add(1); } - /// The latency brake's shrink: proportional and gentle, never below the floor, at least −1. fn shrink_latency(&mut self, now: Instant) { let scaled = (self.current as f64 * LATENCY_SHRINK_FACTOR).floor() as usize; self.current = scaled.min(self.current.saturating_sub(1)).max(self.min); @@ -1884,7 +1666,6 @@ impl AdaptiveWindow { let before = self.current; let cooling = self.cooldown_until.is_some_and(|t| now < t); - // Queueing delay: this probe's mean TTFB against the run's baseline. let probe_ttfb = (self.ttfb_samples >= LATENCY_MIN_SAMPLES) .then(|| self.ttfb_sum_ms / self.ttfb_samples as f64); let mut queueing = false; @@ -1909,9 +1690,6 @@ impl AdaptiveWindow { } else if cooling { self.last_reason = WindowReason::HoldCooldown; } else if queueing { - // More requests only made each one wait longer. Hold while a real gain still comes - // with the delay; once the delay keeps rising without one, give some of the window - // back, gently, and let the cooldown show whether that helped. let gain = self.bps_ewma > self.best_bps * (1.0 + LATENCY_GAIN_EPS); if gain { self.best_bps = self.bps_ewma; @@ -2012,10 +1790,6 @@ stalled_hosts={}", } } -// ───────────────────────────────────────────────────────────────────────────────────────────── -// Tests -// ───────────────────────────────────────────────────────────────────────────────────────────── - #[cfg(test)] mod tests { #[test] @@ -2154,8 +1928,6 @@ mod tests { const MIB: u64 = 1024 * 1024; - /// Drive the window through probes 2.1 s apart, each with `samples` TTFB values and the - /// bytes that arrived in it; returns (reason, window) after every probe. fn run_probes(w: &mut AdaptiveWindow, t0: Instant, probes: &[(f64, u64)]) -> Vec<(WindowReason, usize)> { let mut total = 0u64; let mut out = Vec::new(); @@ -2174,7 +1946,6 @@ mod tests { fn rising_delay_without_more_throughput_holds_then_shrinks_gently() { let t0 = Instant::now(); let mut w = AdaptiveWindow::new(8, 2, 256, t0); - // Flat ~15 MB/s while the time to first byte climbs from 0.4 s to 12 s (the 5G log). let flat = 32 * MIB; let probes: Vec<(f64, u64)> = [400.0, 400.0, 450.0, 900.0, 1500.0, 2500.0, 4000.0, 6000.0, 9000.0, 12000.0] .iter() @@ -2186,7 +1957,6 @@ mod tests { assert!(first_hold < first_shrink, "{seen:?}"); let before = seen[first_shrink - 1].1; assert_eq!(seen[first_shrink].1, (before as f64 * LATENCY_SHRINK_FACTOR).floor() as usize, "{seen:?}"); - // From the first sign of queueing on, the window never grows again. for pair in seen[first_hold..].windows(2) { assert!(pair[1].1 <= pair[0].1, "grew under queueing delay: {seen:?}"); } @@ -2199,7 +1969,6 @@ mod tests { fn a_fast_link_keeps_growing_while_its_delay_stays_low() { let t0 = Instant::now(); let mut w = AdaptiveWindow::new(8, 2, 256, t0); - // Throughput doubles with the window; TTFB wobbles between 25 and 70 ms (new connections). let probes: Vec<(f64, u64)> = (0..6) .map(|k| ([25.0, 70.0, 40.0, 60.0, 30.0, 65.0][k], (8 * MIB) << k)) .collect(); @@ -2211,8 +1980,6 @@ mod tests { assert!(w.current >= 128, "{seen:?}"); } - /// Two-behaviour stub for the stall test: `freeze` answers the headers and 100 bytes, then - /// never sends another byte; otherwise every path gets 10 000 bytes in ten paced slices. fn start_paced_stub(freeze: bool) -> String { let listener = TcpListener::bind("127.0.0.1:0").expect("bind"); let port = listener.local_addr().expect("addr").port(); @@ -2296,12 +2063,10 @@ mod tests { .unwrap_or_else(|| panic!("no host-stall line: {lines:?}")); assert!(stall.contains(&format!(" host={frozen} ")), "{stall}"); assert!(!stall.contains(" requeued=0 "), "{stall}"); - // Well inside the 10 s request timeout that would otherwise have freed the items. assert!(elapsed < Duration::from_secs(8), "took {elapsed:?}: {lines:?}"); assert!(!lines.iter().any(|l| l.contains(&format!("host={healthy}")) && l.starts_with("host-stall"))); } - // ── Minimal HTTP/1.1 stub: one thread per connection, `Connection: close`, Range-aware. ── struct Stub { base: String, hits: Arc<Mutex<HashMap<String, usize>>>, @@ -2444,11 +2209,9 @@ mod tests { } } - /// Stream-mode sink: appends pieces per item (offset 0 restarts), finalizes by length check. struct StreamSink { got: Mutex<HashMap<u64, Vec<u8>>>, finished: Mutex<HashMap<u64, u64>>, - /// Reject the first piece of this item once (exercises the mid-stream Retry path). retry_once_id: Option<u64>, retried: AtomicUsize, } @@ -2509,7 +2272,7 @@ mod tests { let mut options = opts("stream app=stub"); options.stream = true; options.per_host_cap = 8; - options.headers.push(("User-Agent".to_string(), "nile/0.1 Amazon".to_string())); + options.headers.push(("User-Agent".to_string(), "DroidDeck/test".to_string())); let cancel = AtomicBool::new(false); let lines: Mutex<Vec<String>> = Mutex::new(Vec::new()); let outcome = run_fetch( @@ -2531,11 +2294,9 @@ mod tests { assert_eq!(got[&3], vec![9u8; 20_000]); assert_eq!(got[&4].len(), 1000); assert_eq!(got[&4][0], 100u8); - assert_eq!(got[&5], b"nile/0.1 Amazon".to_vec()); + assert_eq!(got[&5], b"DroidDeck/test".to_vec()); let finished = sink.finished.lock().unwrap(); assert_eq!(finished.len(), 5); - // Pieces credited as written + 7 extra per on_finish; the rejected attempt of /big - // contributed nothing (its first piece was refused before any write). let written: u64 = got.values().map(|b| b.len() as u64).sum(); assert_eq!(outcome.bytes_credited, written + 5 * 7); let hits = stub.hits.lock().unwrap(); @@ -2575,7 +2336,6 @@ mod tests { &sink, &cancel, &|bytes: u64, ok: u64| { - // Pool threads race on the callback order; keep the high-water mark. let mut cur = last_progress.lock().unwrap(); if bytes >= cur.0 { *cur = (bytes, ok); @@ -2595,7 +2355,6 @@ mod tests { let expected_credit: u64 = got.values().map(|b| b.len() as u64 * 2).sum(); assert_eq!(outcome.bytes_credited, expected_credit); assert_eq!(*last_progress.lock().unwrap(), (expected_credit, 4)); - // /c was served 503 once, then 200; /a was re-fetched once after the sink's Retry. let hits = stub.hits.lock().unwrap(); assert_eq!(hits["/c"], 2); assert_eq!(hits["/a"], 2); diff --git a/app/src/main/rust/stores/src/fetch_tuning.rs b/app/src/main/rust/stores/src/fetch_tuning.rs index abbe2d4925..4f1f7074f9 100644 --- a/app/src/main/rust/stores/src/fetch_tuning.rs +++ b/app/src/main/rust/stores/src/fetch_tuning.rs @@ -1,32 +1,12 @@ -//! The numbers and the two small types [`fetch_core`](crate::fetch_core) shares with the Steam -//! depot writer it was carved out of. -//! -//! In Bannerlator these live in `depot_writer.rs` and `cdn_client.rs`, next to the Steam CM and -//! depot code, so that the Steam engine and the store engines run on ONE set of tunables and their -//! `fetch-window` log lines stay A/B-comparable. DroidDeck ships no Steam depot engine (the Steam -//! client runs natively in the Linux runtime), so only this slice came across: the values are -//! copied verbatim and keep their names, which is what lets a GOG/Epic/Amazon log from either app -//! be read against the same tuning notes. -//! -//! The important behaviours are structural (slow-start ramp -> hold at plateau -> back off on REAL -//! errors, per-host cap, hard byte budget), not the exact numbers. The r3/r4 notes below record -//! why each number is what it is, because every one of them was arrived at by a device run that -//! went wrong the other way. use std::time::Duration; -/// Default `User-Agent` of the pooled client. Every store engine overrides it per request with -/// the agent its own launcher sends (`FetchOptions::headers`), so this value is only what a -/// request without an explicit header would carry. pub const USER_AGENT: &str = "Valve/Steam HTTP Client 1.0"; -/// TCP connect deadline for every request the pooled client makes. pub fn connect_timeout() -> Duration { Duration::from_secs(15) } -/// Classified fetch failure so the fetch driver can back off proportionally (429/5xx/timeout/reset -/// shrink the window + cool the host harder than a one-off protocol error). #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum FetchFailKind { Timeout, @@ -42,53 +22,17 @@ pub struct AsyncFetchError { pub kind: FetchFailKind, } -/// Attempts per item before the run gives up on it (fetch failures and sink retries both count). pub const MAX_CHUNK_ATTEMPTS: u32 = 5; -/// Floor for the in-flight byte budget — the pre-r4 fixed value, so no run ever gets *less* -/// buffered memory than it had before the budget started scaling. See [`inflight_budget_bytes`]. pub const FETCH_INFLIGHT_BUDGET_FLOOR_BYTES: u64 = 24 * 1024 * 1024; -/// Hard ceiling for the in-flight byte budget. This is THE OOM guard: whatever the tier, the host -/// count or the chunk size, the RAW bytes in memory for one run can never exceed this. 96 MiB = 4× -/// the old fixed budget and still a small fraction of the heap an Android game installer runs in, -/// and it is only ever reached by a fast-tier run whose CDN pool is large enough to support a 64+ -/// window. Raising this is the one change in the fetch layer that can reintroduce OOM, so it stays -/// fixed and small. pub const FETCH_INFLIGHT_BUDGET_HARD_CAP_BYTES: u64 = 96 * 1024 * 1024; -/// Assumed RAW (on-the-wire, still-compressed) size of one chunk when sizing the budget. Store -/// chunks are ~1 MiB; this is the same nominal [`NOMINAL_CHUNK_RESERVE_BYTES`] uses at dispatch. pub const TYPICAL_CHUNK_BYTES: u64 = NOMINAL_CHUNK_RESERVE_BYTES; -/// Headroom the budget carries over "one chunk per window slot" (3/2 = 1.5×), as a rational so the -/// arithmetic stays integer. The window is a count of concurrent *requests*; a slot's bytes are held -/// from DISPATCH until its WRITE completes, so at any instant some slots hold a fetched-but-not-yet- -/// written chunk while others hold a reservation for a fetch still on the wire. 1.5× covers that -/// overlap (and the occasional above-nominal chunk) without doubling the memory bound. pub const BUDGET_HEADROOM_NUM: u64 = 3; pub const BUDGET_HEADROOM_DEN: u64 = 2; -/// Byte budget for the *compressed* bytes buffered in the fetch→process channel, scaled to the -/// window ceiling this run can actually reach. -/// -/// The decouple channel is bounded by BYTES, not chunk count: a count cap makes in-flight memory -/// swing wildly with chunk size (a 4-chunk cap is ~4 MB for 1 MB chunks but ~120 MB for 30 MB -/// chunks). Budgeting bytes keeps the heap bounded regardless of game size while giving the fetch -/// pool bandwidth-delay-product headroom so the socket stays busy while process workers -/// decompress+write. -/// -/// r4: a device run proved a fixed 24 MiB budget becomes the binding constraint the moment the -/// adaptive window works — on a 1 Gbps line the window grew to 42 but the budget admitted only ~24 -/// chunks, so `in_flight` stalled at 23–28 with `budget_stalls` in the hundreds and -/// `host_stalls=0`. A budget that refuses slots the window has already decided are safe is not a -/// memory guard, it is a throttle. So the budget scales WITH the effective ceiling (tier ∧ -/// hosts×per-host-cap ∧ hard cap) and is clamped between the old fixed value and a hard cap. Low -/// tiers are unaffected; a fast link gets a budget that stops binding before the window does. -/// -/// Budget only the RAW bytes actually queued (reserved at DISPATCH, released on WRITE-COMPLETE); the -/// decoded expansion is transient inside a process worker and never accumulates. See -/// [`budget_admits`] for the single-chunk deadlock guard. pub fn inflight_budget_bytes(effective_ceiling: usize) -> u64 { (effective_ceiling as u64) .saturating_mul(TYPICAL_CHUNK_BYTES) @@ -100,71 +44,30 @@ pub fn inflight_budget_bytes(effective_ceiling: usize) -> u64 { ) } -// ─── Adaptive-window tuning ──────────────────────────────────────────────────────────────────── -// r3 retune: the first device run pinned the window at the floor on a 1 Gbps link. The controller -// shrank on throughput dips and latency jitter (normal CDN noise) as well as on errors, shrank a flat -// −6 on every single error, and only grew when throughput rose >10% in a 700 ms sample. The shrinks -// dominated, so the window ratcheted to the floor and stayed there. r3 makes growth eager and makes -// ERRORS the only shrink signal. -/// Max concurrent requests to any single CDN host. CDNs throttle/reset per host, so a big window -/// is reached by spreading across MORE hosts, never by piling onto one. pub const PER_HOST_CAP: usize = 6; -/// Initial in-flight window. Slow-start doubles from here, so this only sets how fast the first -/// couple of probes get useful — the ceiling still comes from the tier × hosts clamp. pub const BOOTSTRAP_WINDOW: usize = 8; -/// Hard safety ceiling on the window regardless of tier (also clamped to distinct-hosts × per-host). pub const WINDOW_HARD_CAP: usize = 256; -/// The window never shrinks below this (keeps a little pipelining even on a rough link). pub const WINDOW_MIN_FLOOR: usize = 2; -/// Additive growth step once slow-start has ended (after the first real back-off). pub const WINDOW_STEP_UP: usize = 4; -/// Slow-start multiplier: until the first back-off the window DOUBLES each healthy probe, so a fast -/// link reaches a useful window in seconds instead of never. pub const WINDOW_SLOW_START_FACTOR: usize = 2; -/// Proportional shrink on a real error signal (never a flat step: a flat −6 slammed a small window -/// straight to the floor). Always at least −1 while above the floor. pub const WINDOW_SHRINK_FACTOR: f64 = 0.75; -/// How often the adaptive window re-evaluates. Long enough that one jittery sample cannot drive a -/// decision; decisions use the EWMA, not the raw sample. pub const WINDOW_PROBE_INTERVAL_MS: u64 = 2_000; -/// After a back-off, hold the window (no growth) for this long — hysteresis against oscillation. pub const WINDOW_COOLDOWN_MS: u64 = 3_000; -/// EWMA smoothing for the measured throughput samples (higher = more responsive). pub const WINDOW_BPS_EWMA_ALPHA: f64 = 0.4; -/// Throughput above `best × (1 + this)` counts as a genuine improvement (keeps slow-start climbing). pub const WINDOW_IMPROVE_EPS: f64 = 0.05; -/// Throughput below `best × (1 − this)` counts as falling — growth STOPS (hold). It never shrinks: -/// only real errors shrink. pub const WINDOW_DECLINE_EPS: f64 = 0.15; -/// Error-rate thresholds over one probe window: above HIGH shrinks; growth needs at/below LOW -/// (in between = hold). pub const WINDOW_ERR_RATE_HIGH: f64 = 0.10; pub const WINDOW_ERR_RATE_LOW: f64 = 0.05; -/// Errors inside ONE probe interval that trigger an immediate (don't-wait-for-the-probe) shrink. A -/// single stray timeout no longer moves the window; a burst does. A 429 always shrinks immediately. pub const WINDOW_ERR_BURST_IMMEDIATE: u32 = 3; -/// Consecutive non-improving probes still allowed to grow before declaring a plateau — throughput -/// lags a window change by a probe or two, so one flat sample must not stop the ramp. pub const WINDOW_PLATEAU_PATIENCE: u32 = 2; -/// Once plateaued, re-arm the ramp this long later (doubling, capped) to re-probe for headroom if the -/// link improved. Bounded re-probing, not a creep: a weak link answers with errors and shrinks back. pub const WINDOW_PLATEAU_REARM_MS: u64 = 30_000; pub const WINDOW_PLATEAU_REARM_MAX_MS: u64 = 300_000; -/// Even when the window does not change, emit one `fetch-window` line every N probes so a stuck -/// window explains itself in the log (`reason=` says why it is not moving). pub const WINDOW_LOG_EVERY_PROBES: u32 = 5; -/// Every Nth exploit dispatch is instead an exploration pick (epsilon-greedy ≈ 1/N) so a -/// demoted-but-recovered host is retried rather than starved forever. pub const SERVER_EXPLORE_EVERY: u64 = 8; -/// Reservation for an item whose compressed size the manifest didn't carry (keeps the byte budget -/// honest at dispatch time). pub const NOMINAL_CHUNK_RESERVE_BYTES: u64 = 1024 * 1024; -/// Extra host cooldown floor when a host answers 429 (rate-limited) — back off harder than a -/// one-off timeout. pub const RATE_LIMIT_COOLDOWN_MS: u64 = 5_000; -/// Exponential back-off between attempts of one item: 0, 300, 600, 1200, 2400 ms … capped at 4 s. pub fn retry_backoff_millis(attempt: u32) -> u64 { if attempt == 0 { return 0; @@ -172,9 +75,6 @@ pub fn retry_backoff_millis(attempt: u32) -> u64 { (300u64 << (attempt - 1)).min(4000) } -/// Byte-budget admission test for the fetch→process channel. Always admits when nothing is in -/// flight (`in_flight == 0`) so a single item LARGER than the whole budget can never deadlock — it -/// simply waits until the channel drains, then goes through alone. #[inline] pub fn budget_admits(in_flight: u64, raw_len: u64, budget: u64) -> bool { in_flight == 0 || in_flight.saturating_add(raw_len) <= budget diff --git a/app/src/main/rust/stores/src/gog.rs b/app/src/main/rust/stores/src/gog.rs index 465d7346fa..3aed660743 100644 --- a/app/src/main/rust/stores/src/gog.rs +++ b/app/src/main/rust/stores/src/gog.rs @@ -1,21 +1,3 @@ -//! GOG gen2 chunk download engine — the Rust replacement for the byte-fetching inner loop of -//! `GogDownloadManager.java` (`assembleDepotFile` / `fetchChunkVerified` driven from the -//! per-file thread pool). Everything around that loop — token/builds/manifest head, base-product -//! + language depot selection, secure-link resolution, disk guard, `_gog_manifest.json` marker, -//! prefs, exe resolution, DLC markers, redist orchestration — stays in Java and is untouched. -//! -//! Parity contract: Bannerlator's `docs/RUST_GOG_PARITY.md`. The adapter is fed the SAME inflated depot-manifest -//! JSON strings Java already parsed, the SAME resolved CDN base (secure link) and the SAME -//! install dir, and produces the SAME on-disk layout (`<file>.bhtmp` staging, atomic rename, -//! size+MD5-verified finals) so a download can be resumed by either engine. -//! -//! Layout: -//! - [`plan`] — depot-manifest JSON → file/chunk plan (mirrors `parseDepotManifest`), CDN path -//! and chunk-URL builders, largest-first ordering. -//! - [`engine`] — resume/skip pass (mirrors `fileVerified`), `FetchItem` list, the `FetchSink` -//! (compressed size/MD5 → inflate → decompressed size/MD5 → positioned write → -//! whole-file size/MD5 → rename), summary logging. -//! - [`jni`] — `GogNative` JNI exports (`nativeStart` / `nativeCancel` / `nativeRelease`). pub mod engine; pub mod jni; @@ -25,7 +7,6 @@ use std::fs::File; use std::io::Read; use std::path::Path; -/// Lowercase hex of `bytes` (matches `GogDownloadManager.toHex`). pub fn to_hex(bytes: &[u8]) -> String { const DIGITS: &[u8; 16] = b"0123456789abcdef"; let mut out = String::with_capacity(bytes.len() * 2); @@ -36,15 +17,12 @@ pub fn to_hex(bytes: &[u8]) -> String { out } -/// Lowercase hex MD5 of an in-memory buffer (`GogDownloadManager.md5Hex`). pub fn md5_hex(data: &[u8]) -> String { let mut hasher = crate::md5_small::Md5::new(); hasher.update(data); to_hex(&hasher.finalize()) } -/// Streaming lowercase hex MD5 of a file, never buffering the whole file -/// (`GogDownloadManager.md5HexFile`). `None` when the file cannot be read. pub fn md5_hex_file(path: &Path) -> Option<String> { let mut file = File::open(path).ok()?; let mut hasher = crate::md5_small::Md5::new(); @@ -59,11 +37,6 @@ pub fn md5_hex_file(path: &Path) -> Option<String> { Some(to_hex(&hasher.finalize())) } -/// zlib-inflate a chunk body (`GogDownloadManager.inflateZlib`): `None` when the body is not a -/// zlib stream (first byte != 0x78) or fails to inflate — the caller then treats the body as a -/// stored (non-compressed) chunk, exactly like Java's `if (inflated == null) inflated = raw`. -/// A truncated stream yields the partial output (Java's loop breaks on `n == 0` the same way); -/// the decompressed-size check that follows rejects it. pub fn inflate_zlib(data: &[u8]) -> Option<Vec<u8>> { if data.len() < 2 || data[0] != 0x78 { return None; @@ -96,16 +69,12 @@ mod tests { let compressed = enc.finish().unwrap(); assert_eq!(compressed[0], 0x78); assert_eq!(inflate_zlib(&compressed).unwrap(), payload); - // Not zlib → None (stored chunk path). assert!(inflate_zlib(b"\x1f\x8bnot zlib").is_none()); assert!(inflate_zlib(b"\x78").is_none()); - // Truncated zlib → partial output, like Java's `while (!inf.finished()) { if (n == 0) break; }` - // loop; the decompressed-size check downstream rejects it either way. let mut truncated = compressed.clone(); let mid = truncated.len() / 2; truncated.truncate(mid); assert!(inflate_zlib(&truncated).map(|out| out != payload).unwrap_or(true)); - // Corrupt zlib body → None (Java: DataFormatException → null → raw fallback). let mut corrupt = compressed.clone(); for b in corrupt.iter_mut().skip(2) { *b = !*b; diff --git a/app/src/main/rust/stores/src/gog/engine.rs b/app/src/main/rust/stores/src/gog/engine.rs index 0233110c34..9f2f59428e 100644 --- a/app/src/main/rust/stores/src/gog/engine.rs +++ b/app/src/main/rust/stores/src/gog/engine.rs @@ -1,17 +1,3 @@ -//! The GOG gen2 fetch loop on top of the shared fetch core. One call = one Java pool run -//! (`runGen2` base loop, `doInstallDlc` loop, or one `assembleDependencyInstaller`). -//! -//! What this mirrors, and where (see Bannerlator's `docs/RUST_GOG_PARITY.md`): -//! - resume/skip: [`file_verified`] = `GogDownloadManager.fileVerified` (exists, non-empty, size -//! when known, MD5 when known) — a verified file is reported as "Verified…" progress with NO -//! bytes credited, exactly like the Java task; -//! - per chunk: compressed size → compressed MD5 → inflate (stored fallback) → decompressed size → -//! decompressed MD5 (`fetchChunkVerified`); a mismatch is a retryable failure (Java: hard fail -//! ≤3 with backoff; the core: ≤5 attempts with backoff); -//! - per file: write into `<file>.bhtmp` (positioned, so chunks may land out of order), then -//! whole-file size + MD5, delete any existing final, rename (`assembleDepotFile`); -//! - failure of any file aborts the run (`anyFailed`), cancel aborts the run; in both cases every -//! unfinished `.bhtmp` is deleted (Java deletes its tmp on the failing/cancelled thread). use std::collections::HashSet; use std::fs::{self, File, OpenOptions}; @@ -30,35 +16,25 @@ use super::plan::{ }; use super::{inflate_zlib, md5_hex, md5_hex_file}; -/// Per-request timeout on chunk fetches (Java: `TIMEOUT = 30_000` connect + read). pub const CHUNK_TIMEOUT: Duration = Duration::from_secs(30); -/// Java sends this on every content-system / CDN request (`fetchBytesEx`). pub const USER_AGENT: &str = "GOG Galaxy"; -/// Java staging suffix (`assembleDepotFile`). pub const TMP_SUFFIX: &str = ".bhtmp"; -/// Floor for the per-host cap (the core's default); a single-host store gets the whole ceiling. pub const PER_HOST_CAP_FLOOR: usize = 6; -/// `max(6, ceil(max_workers / distinct_hosts))` — one CDN host gets the whole ceiling, several -/// share it. pub fn per_host_cap_for(max_workers: usize, distinct_hosts: usize) -> usize { let hosts = distinct_hosts.max(1); let workers = max_workers.max(1); PER_HOST_CAP_FLOOR.max(workers.div_ceil(hosts)) } -/// Which Java loop this run replaces. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] pub enum PlanKind { - /// gen2: depot manifests → chunks → `assembleDepotFile` (base install, DLC, dependencies). #[default] Gen2Chunks, - /// gen1: build manifest → per-file HTTP Range GET streamed to disk (`runGen1`). Gen1Ranges, } impl PlanKind { - /// JNI mapping (`GogNative.KIND_*`): 0 = gen2 chunks, 1 = gen1 ranges, anything else → gen2. pub fn from_i32(v: i32) -> Self { if v == 1 { PlanKind::Gen1Ranges @@ -68,39 +44,21 @@ impl PlanKind { } } -/// Inputs — exactly what the Java manager has in hand after manifest + secure-link resolution. #[derive(Clone, Debug, Default)] pub struct GogRequest { pub kind: PlanKind, - /// gen2: inflated depot-manifest JSON strings, in the order Java fetched them (already filtered - /// by base-product / DLC-product and language in Java). gen1: the inflated build manifest. pub depot_manifests: Vec<String>, - /// gen2: the resolved CDN bases from the secure-link answer (every `urls[]` entry, query - /// strings kept, in the order GOG lists them), or the one unauthenticated dependency store - /// base. Several bases on distinct hosts let the fetch core spread the window across CDNs - /// with its per-host cap; a base on a host already listed is dropped (the first one wins). - /// gen1: unused (file URLs live in the manifest). pub cdn_bases: Vec<String>, pub install_dir: String, - /// Files already completed by an earlier run of this same download (secure-link refresh - /// re-run): counted as done WITHOUT re-hashing and WITHOUT a progress event. pub skip_paths: Vec<String>, pub ca_bundle_path: String, - /// Java pool size: `resolveDownloadThreads` (base), 8 (DLC), 1 (dependency). pub max_workers: usize, - /// Inflate/hash/write threads; Java did that on the same pool threads, so pass the same count. pub process_workers: usize, - /// Base install: largest-first (LPT) ordering; DLC / dependency: manifest order. pub sort_largest_first: bool, - /// Log prefix, e.g. `gog base=1207658930`. pub label: String, } -/// Callbacks out of the engine (JNI listener or a test recorder). Must be callable from the -/// process-pool threads. pub trait GogEvents: Sync { - /// One file reached its final state. `verified` = resume-skip (no bytes credited); otherwise a - /// freshly assembled + verified file (`file_bytes` credited). `files_done` counts both. #[allow(clippy::too_many_arguments)] fn on_file_done( &self, @@ -113,9 +71,6 @@ pub trait GogEvents: Sync { bytes_total: u64, ); fn on_log(&self, line: &str); - /// Periodic byte progress while files are in flight (~4/s, only when the value moved): - /// assembled bytes plus the bytes of files not yet finished. Same `bytes_total` as - /// `on_file_done`. Default: ignored (test recorders). fn on_bytes(&self, _bytes_done: u64, _bytes_total: u64) {} } @@ -123,20 +78,14 @@ pub trait GogEvents: Sync { pub struct GogRunResult { pub success: bool, pub cancelled: bool, - /// The run died on an HTTP code Java treats as an expired secure link (401/403/404/500) — - /// the Java caller refreshes the link (cap 5) and re-runs with `skip_paths` filled in. pub link_expiry: bool, pub error: String, - /// Decompressed bytes of files assembled by THIS run (Java `totalBytes`). pub bytes_written: u64, - /// Files done = verified-skipped + assembled (Java `doneCount`), excluding `skip_paths`. pub files_done: u32, pub files_verified: u32, pub files_total: u32, } -/// `GogDownloadManager.fileVerified`: true only if the file exists, is non-empty, matches the -/// expected size when known and the expected MD5 when known. pub fn file_verified(path: &Path, expected_size: u64, expected_md5: &str) -> bool { let Ok(meta) = fs::metadata(path) else { return false; @@ -156,8 +105,6 @@ pub fn file_verified(path: &Path, expected_size: u64, expected_md5: &str) -> boo true } -/// Finds an HTTP status in a fetch-core error string (`non-200 HTTP status (403)`, `status 403`, -/// `HTTP 403`, `http=403`, `code=403`). The link-expiry set is Java's `fetchChunkVerified` list. pub fn http_status_in(message: &str) -> Option<u16> { let lower = message.to_ascii_lowercase(); for marker in ["status (", "status ", "http ", "http=", "code=", "code "] { @@ -178,7 +125,6 @@ pub fn http_status_in(message: &str) -> Option<u16> { None } -/// Java: `code == 401 || code == 403 || code == 404 || code == 500` → refresh the secure link. pub fn is_link_expiry_status(code: u16) -> bool { matches!(code, 401 | 403 | 404 | 500) } @@ -186,8 +132,6 @@ pub fn is_link_expiry_status(code: u16) -> bool { struct FileState { handle: Option<Arc<File>>, chunks_done: usize, - /// Decompressed bytes of this file's finished chunks, credited to the sink's `partial` - /// counter until the file itself is finalized and moves into `bytes_done`. partial: u64, finalized: bool, failed: bool, @@ -240,11 +184,6 @@ impl SpeedSampler { } } -/// Positioned writer for ONE chunk's decompressed byte range inside the file's `.bhtmp`: hashes -/// everything it is given (the decompressed MD5) and counts it, but only writes bytes inside the -/// chunk's expected range when the size is known — an inflate overshoot then fails the size -/// check instead of clobbering the neighbouring chunk. An I/O error is remembered so the sink can -/// tell "disk failed" (fatal) from "stream failed" (retry). struct RangeWriter { file: Arc<File>, base: u64, @@ -294,13 +233,10 @@ enum ChunkMode { Stored(RangeWriter), } -/// Per-item streaming state for one attempt (reset whenever a piece arrives at `offset == 0`). struct ChunkStream { comp_md5: crate::md5_small::Md5, comp_len: u64, - /// Decided on the first non-empty piece (`0x78` → zlib, else stored — Java's `inflateZlib`). mode: Option<ChunkMode>, - /// The writer until the mode is decided (an empty body never decides). writer: Option<RangeWriter>, } @@ -315,17 +251,10 @@ impl ChunkStream { } } -/// The `FetchSink`. Stream mode (what `run_gen2` uses): pieces of a chunk are inflated as they -/// arrive straight into the chunk's byte range of the file, the compressed MD5 and the -/// decompressed size/MD5 accumulate on the fly, and `on_finish` runs the checks in Java's order -/// (compressed size → compressed MD5 → inflate → size → MD5). Body mode (`process`) is the same -/// pipeline on a whole buffer and stays available for tests / a body-mode fallback. struct GogSink<'a> { files: &'a [PlannedFile], - /// item id → (file index, chunk index) table: Vec<(usize, usize)>, states: Vec<Mutex<FileState>>, - /// item id → in-flight stream attempt (stream mode only) streams: Vec<Mutex<Option<ChunkStream>>>, files_total: u32, bytes_total: u64, @@ -333,8 +262,6 @@ struct GogSink<'a> { bytes_done: &'a AtomicU64, events: &'a dyn GogEvents, speed: Mutex<SpeedSampler>, - /// Bytes of files still in flight (finished chunks; for gen1, the current attempt's pieces). - /// `bytes_done + partial` is what the byte ticker reports between file completions. partial: AtomicU64, } @@ -343,8 +270,6 @@ impl<'a> GogSink<'a> { self.events.on_log(line); } - /// `assembleDepotFile` head: `parent.mkdirs(); tmpFile.delete(); new FileOutputStream(tmp)` — - /// once per file, on its first chunk. Returns a shared handle for positioned writes. fn file_handle(&self, file_idx: usize) -> Result<Arc<File>, SinkError> { let file = &self.files[file_idx]; let mut st = self @@ -385,9 +310,6 @@ impl<'a> GogSink<'a> { } } - /// One verified chunk landed: count it; on the file's last chunk run the whole-file verify + - /// rename and fire the per-file progress event (Java: doneCount++, totalBytes += df.totalSize, - /// "Downloading: <name> <speed>"). fn chunk_done(&self, file_idx: usize, chunk_bytes: u64) -> Result<(), SinkError> { let file = &self.files[file_idx]; let mut st = self @@ -431,7 +353,6 @@ impl<'a> GogSink<'a> { Ok(()) } - /// `assembleDepotFile` tail: whole-file size + MD5 on the tmp, delete existing final, rename. fn finalize_file(&self, file_idx: usize, st: &mut FileState) -> Result<(), String> { let file = &self.files[file_idx]; if let Some(handle) = st.handle.take() { @@ -469,7 +390,6 @@ impl<'a> GogSink<'a> { Ok(()) } - /// Delete every unfinished `.bhtmp` (Java: `tmpFile.delete()` on the failing/cancelled task). fn cleanup_partials(&self) { for st in &self.states { let Ok(mut st) = st.lock() else { @@ -496,8 +416,6 @@ impl<'a> GogSink<'a> { } impl<'a> FetchSink for GogSink<'a> { - /// Body mode: `fetchChunkVerified` on a whole buffer, then a positioned write of the inflated - /// bytes (used by tests and available as a non-stream fallback). fn process(&self, item: &FetchItem, body: Vec<u8>) -> Result<u64, SinkError> { let Some(&(file_idx, chunk_idx)) = self.table.get(item.id as usize) else { return Err(SinkError::Fatal(format!("unknown item id {}", item.id))); @@ -508,7 +426,6 @@ impl<'a> FetchSink for GogSink<'a> { speed.record(body.len() as u64); } - // fetchChunkVerified, in order: compressed size → compressed MD5 → inflate → size → MD5. if chunk.compressed_size > 0 && body.len() as u64 != chunk.compressed_size { let msg = format!( "chunk compressed-size mismatch chunk={} exp={} got={}", @@ -528,7 +445,7 @@ impl<'a> FetchSink for GogSink<'a> { } let inflated = match inflate_zlib(&body) { Some(out) => out, - None => body, // stored (non-zlib) chunk + None => body, }; if chunk.size > 0 && inflated.len() as u64 != chunk.size { let msg = format!( @@ -563,8 +480,6 @@ impl<'a> FetchSink for GogSink<'a> { Ok(credited) } - /// Stream mode: hash the compressed piece, inflate it straight into the chunk's byte range - /// (or pass it through for a stored chunk), hashing + counting the decompressed output. fn on_chunk(&self, item: &FetchItem, offset: u64, data: &[u8]) -> Result<(), SinkError> { let id = item.id as usize; let Some(&(file_idx, chunk_idx)) = self.table.get(id) else { @@ -581,7 +496,6 @@ impl<'a> FetchSink for GogSink<'a> { .and_then(|m| m.lock().ok()) .ok_or_else(|| SinkError::Fatal("chunk stream poisoned".to_string()))?; if offset == 0 || slot.is_none() { - // (Re)start of an attempt: fresh hashers + inflater; positioned writes re-cover the range. let handle = self.file_handle(file_idx)?; *slot = Some(ChunkStream::new(handle, chunk.offset, chunk.size)); } @@ -601,7 +515,7 @@ impl<'a> FetchSink for GogSink<'a> { stream.mode = Some(if data[0] == 0x78 { ChunkMode::Zlib(flate2::write::ZlibDecoder::new(writer)) } else { - ChunkMode::Stored(writer) // stored (non-zlib) chunk — Java's `inflated = raw` + ChunkMode::Stored(writer) }); } let result = match stream.mode.as_mut() { @@ -616,7 +530,6 @@ impl<'a> FetchSink for GogSink<'a> { match result { Ok(()) => Ok(()), Err((_, Some(io))) => { - // Disk, not stream: Java's `fos.write` exception → file fails → run aborts. if let Some(mut st) = self.states.get(file_idx).and_then(|m| m.lock().ok()) { st.failed = true; let _ = st.handle.take(); @@ -627,7 +540,6 @@ impl<'a> FetchSink for GogSink<'a> { Err(SinkError::Fatal(msg)) } Err((err, None)) => { - // Corrupt zlib body. Java: inflate → null → raw → decompressed-size mismatch → retry. let msg = format!("chunk inflate failed chunk={} err={err}", chunk.hash); self.log(&msg); *slot = None; @@ -636,7 +548,6 @@ impl<'a> FetchSink for GogSink<'a> { } } - /// Stream mode: the body ended — run Java's checks in order and count the chunk. fn on_finish(&self, item: &FetchItem, _total_len: u64) -> Result<u64, SinkError> { let id = item.id as usize; let Some(&(file_idx, chunk_idx)) = self.table.get(id) else { @@ -652,7 +563,6 @@ impl<'a> FetchSink for GogSink<'a> { .take(); let stream = match taken { Some(s) => s, - // Empty body with no pieces: same checks on zero bytes. None => ChunkStream::new(self.file_handle(file_idx)?, chunk.offset, chunk.size), }; @@ -717,11 +627,8 @@ impl<'a> FetchSink for GogSink<'a> { } } -/// How often the byte ticker reports while files are in flight. pub const BYTE_TICK: Duration = Duration::from_millis(250); -/// The CDN bases to fetch from: empty entries dropped, then one per distinct host (`host_key`), -/// the first base seen for a host kept, order preserved. pub fn distinct_bases(bases: &[String]) -> Vec<String> { let mut seen: HashSet<String> = HashSet::new(); bases @@ -732,10 +639,6 @@ pub fn distinct_bases(bases: &[String]) -> Vec<String> { .collect() } -/// Runs `fetch` with a reporter thread beside it that calls `on_bytes(bytes_done + partial, -/// bytes_total)` every [`BYTE_TICK`] when the value moved. `on_file_done` only fires when a whole -/// file is finished, so a game made of a few large files gave the UI a progress bar that sat -/// still and then jumped; this fills the gaps. One last report is made when `fetch` returns. fn with_byte_ticker<T>( events: &dyn GogEvents, bytes_done: &AtomicU64, @@ -765,9 +668,6 @@ fn with_byte_ticker<T>( }) } -/// Runs one download loop. Blocking; returns when every pending file is finalized, on the first -/// fatal file failure, or on cancel. Safe to call again with `skip_paths` extended by the files -/// this run reported done (that is how the Java side re-runs after a secure-link refresh). pub fn run(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> GogRunResult { match req.kind { PlanKind::Gen2Chunks => run_gen2(req, cancel, events), @@ -808,8 +708,6 @@ fn run_gen2(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> Go let files_verified = AtomicU32::new(0); if files.is_empty() { - // Java: the caller already returned "no depot files collected" before the loop; reaching - // here means the two parsers disagree — surface it loudly rather than pretend success. return GogRunResult { success: false, error: "no files in plan (manifest parse mismatch)".to_string(), @@ -818,8 +716,6 @@ fn run_gen2(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> Go }; } - // Resume / repair pass — Java does this per task on the pool threads; here it runs up front - // on `process_workers` threads so the fetch item list can exclude verified files. let pending: Vec<AtomicBool> = files.iter().map(|_| AtomicBool::new(false)).collect(); let next = AtomicUsize::new(0); let verify_threads = process_workers.min(files.len().max(1)); @@ -870,7 +766,6 @@ fn run_gen2(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> Go }; } - // Fetch items: one per chunk of every pending file, in plan order (chunks in manifest order). let mut table: Vec<(usize, usize)> = Vec::new(); let mut items: Vec<FetchItem> = Vec::new(); let mut states: Vec<Mutex<FileState>> = Vec::new(); @@ -884,7 +779,6 @@ fn run_gen2(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> Go handle: None, chunks_done: 0, partial: 0, - // Files not pending (verified or skip-listed) are already final for this run. finalized: !is_pending, failed: false, tmp_path, @@ -899,7 +793,6 @@ fn run_gen2(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> Go let path = build_cdn_path(&chunk.hash); items.push(FetchItem { id: table.len() as u64, - // One URL per host, in `hosts` order: the core picks `urls[host_idx]`. urls: bases.iter().map(|b| build_chunk_url(b, &path)).collect(), reserve: chunk.compressed_size, range: None, @@ -943,15 +836,12 @@ fn run_gen2(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> Go }; let opts = FetchOptions { max_workers, - // The ceiling split across the distinct CDN hosts (floor 6); one host gets all of it. per_host_cap, timeout: CHUNK_TIMEOUT, headers: vec![("User-Agent".to_string(), USER_AGENT.to_string())], ca_bundle_path: req.ca_bundle_path.clone(), process_workers, label: req.label.clone(), - // Stream mode: pieces inflate straight to disk; no whole-body byte budget (the 24 MiB - // body budget + largest-first big chunks left 1-3 requests in flight at window 16). stream: true, }; let log = |line: &str| events.on_log(line); @@ -1010,23 +900,14 @@ fn run_gen2(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> Go } } -// ───────────────────────────────────────────────────────────────────────────────────────────── -// gen1: per-file HTTP Range GET streamed to disk (`runGen1` / `downloadRange`) -// ───────────────────────────────────────────────────────────────────────────────────────────── struct Gen1State { handle: Option<File>, - /// Bytes this file's current attempt has written (credited to the sink's `partial`); a new - /// attempt starts over, so a retry never counts its bytes twice. attempt_bytes: u64, out_path: PathBuf, finalized: bool, } -/// Stream-mode sink for gen1. Java's `downloadRange`: `outFile.delete()` before EVERY attempt, -/// `new FileOutputStream(out)`, copy the Range body, no size/hash check; success → `doneG1++`, -/// `totalBytesG1 += size`, `"Downloading: <name> <speed>"`. Pieces arrive in order with their -/// offset; `offset == 0` marks the (re)start of an attempt, exactly where Java deletes the file. struct Gen1Sink<'a> { files: &'a [Gen1File], states: Vec<Mutex<Gen1State>>, @@ -1036,8 +917,6 @@ struct Gen1Sink<'a> { bytes_done: &'a AtomicU64, events: &'a dyn GogEvents, speed: Mutex<SpeedSampler>, - /// Bytes of files still in flight (finished chunks; for gen1, the current attempt's pieces). - /// `bytes_done + partial` is what the byte ticker reports between file completions. partial: AtomicU64, } @@ -1061,7 +940,6 @@ impl<'a> FetchSink for Gen1Sink<'a> { .lock() .map_err(|_| SinkError::Fatal("gen1 state poisoned".to_string()))?; if offset == 0 { - // New attempt: Java `outFile.delete()` + `new FileOutputStream(out)`. self.partial .fetch_sub(std::mem::take(&mut st.attempt_bytes), Ordering::Relaxed); st.handle = None; @@ -1109,7 +987,7 @@ impl<'a> FetchSink for Gen1Sink<'a> { let mut st = state .lock() .map_err(|_| SinkError::Fatal("gen1 state poisoned".to_string()))?; - st.handle = None; // close + st.handle = None; st.finalized = true; let attempt = std::mem::take(&mut st.attempt_bytes); self.bytes_done.fetch_add(file.size, Ordering::Relaxed); @@ -1130,10 +1008,6 @@ impl<'a> FetchSink for Gen1Sink<'a> { } } -/// gen1 loop. Resume = `exists && length == size` ("Resuming…", no bytes). Items = one Range GET -/// per pending file; retries/back-off by the core (Java: 3 attempts, 1 s / 2 s). Failed or -/// cancelled attempts leave whatever was written, like Java (a wrong-size partial fails the -/// size-match resume and is re-pulled next time; a base-install cancel deletes the whole dir). fn run_gen1(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> GogRunResult { let mut files: Vec<Gen1File> = Vec::new(); for manifest in &req.depot_manifests { @@ -1298,7 +1172,7 @@ fn run_gen1(req: &GogRequest, cancel: &AtomicBool, events: &dyn GogEvents) -> Go GogRunResult { success, cancelled, - link_expiry: false, // gen1 has no secure-link refresh in Java + link_expiry: false, error: if cancelled && error.is_empty() { "cancelled".to_string() } else { error }, bytes_written: bytes_done.load(Ordering::Relaxed), files_done: files_done.load(Ordering::Relaxed), @@ -1412,8 +1286,6 @@ mod tests { assert!(peak >= 8.0, "2 MB across at most two buckets → ≥8 Mbps peak, got {peak}"); } - /// Whole-file finalize through the sink with a synthetic body (no network): verifies the - /// chunk → positioned write → whole-file MD5 → rename path and the progress event shape. #[test] fn sink_assembles_verifies_and_renames() { use flate2::write::ZlibEncoder; @@ -1468,10 +1340,8 @@ mod tests { }; let item = |id: u64| FetchItem { id, urls: vec!["x".into()], reserve: 0, range: None }; - // Second chunk first: positioned write must still produce the right bytes. assert_eq!(sink.process(&item(1), cb.clone()).unwrap(), part_b.len() as u64); assert!(tmp_path.exists() && !out_path.exists(), "still staging after 1 of 2 chunks"); - // A corrupt body is a retryable failure, not fatal. match sink.process(&item(0), b"\x78garbage".to_vec()) { Err(SinkError::Retry(msg)) => assert!(msg.contains("mismatch"), "{msg}"), Err(SinkError::Fatal(msg)) => panic!("expected Retry, got Fatal({msg})"), @@ -1580,16 +1450,14 @@ mod tests { assert_eq!(per_host_cap_for(0, 0), 6); } - /// Stream mode: zlib chunk split into pieces (with a poisoned first attempt restarting at - /// offset 0), a stored chunk, corrupt data → Retry, then the whole-file finalize. #[test] fn stream_sink_inflates_pieces_verifies_and_finalizes() { use flate2::write::ZlibEncoder; use flate2::Compression; let dir = temp_dir("stream"); - let part_a = b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".repeat(50); // 2000 bytes, compresses well - let part_b = b"\x01\x02stored bytes".to_vec(); // first byte != 0x78 → stored + let part_a = b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".repeat(50); + let part_b = b"\x01\x02stored bytes".to_vec(); let whole = [part_a.clone(), part_b.clone()].concat(); let mut enc = ZlibEncoder::new(Vec::new(), Compression::default()); enc.write_all(&part_a).unwrap(); @@ -1632,7 +1500,6 @@ mod tests { }; let item = |id: u64| FetchItem { id, urls: vec!["x".into()], reserve: 0, range: None }; - // Attempt 1 of the zlib chunk: corrupt tail → Retry from on_chunk. let mut corrupt = ca.clone(); for b in corrupt.iter_mut().skip(2) { *b = !*b; @@ -1642,7 +1509,6 @@ mod tests { Err(SinkError::Retry(m)) => assert!(m.contains("inflate failed"), "{m}"), Err(SinkError::Fatal(m)) => panic!("expected Retry, got Fatal({m})"), Ok(()) => { - // Some corruptions only surface at finish: that must also be a Retry. match sink.on_finish(&item(0), corrupt.len() as u64) { Err(SinkError::Retry(_)) => {} other => panic!("expected Retry at finish, got {}", match other { @@ -1653,7 +1519,6 @@ mod tests { } } } - // Attempt 2: restart at offset 0 in three pieces. let cut1 = ca.len() / 3; let cut2 = 2 * ca.len() / 3; sink.on_chunk(&item(0), 0, &ca[..cut1]).unwrap(); @@ -1661,7 +1526,6 @@ mod tests { sink.on_chunk(&item(0), cut2 as u64, &ca[cut2..]).unwrap(); assert_eq!(sink.on_finish(&item(0), ca.len() as u64).unwrap(), 0); assert!(tmp_path.exists() && !out_path.exists()); - // Stored chunk, one piece; wrong length first (→ Retry), then the real one. sink.on_chunk(&item(1), 0, &part_b[..3]).unwrap(); match sink.on_finish(&item(1), 3) { Err(SinkError::Retry(m)) => assert!(m.contains("compressed-size mismatch"), "{m}"), @@ -1705,7 +1569,6 @@ mod tests { partial: AtomicU64::new(0), }; let item = FetchItem { id: 0, urls: vec!["x".into()], reserve: 8, range: Some((100, 107)) }; - // Attempt 1 writes a partial, attempt 2 restarts from offset 0 and truncates it. sink.on_chunk(&item, 0, b"ZZZZZZZZZZZZ").unwrap(); sink.on_chunk(&item, 0, b"abcd").unwrap(); sink.on_chunk(&item, 4, b"efgh").unwrap(); @@ -1737,11 +1600,7 @@ mod tests { ..Default::default() }; let rec = Recorder { events: StdMutex::new(Vec::new()) }; - // Cancel before the fetch so no network is touched: the resume pass still runs. let cancel = AtomicBool::new(false); - // Use a pre-set cancel via a second request: run the resume pass, then expect the fetch - // to be attempted for short.bin only. We can't reach the network here, so assert on the - // plan log line instead of the outcome. cancel.store(true, Ordering::Relaxed); let res = run(&req, &cancel, &rec); assert!(res.cancelled, "{res:?}"); diff --git a/app/src/main/rust/stores/src/gog/jni.rs b/app/src/main/rust/stores/src/gog/jni.rs index eee602a6b6..9fa1fbf01d 100644 --- a/app/src/main/rust/stores/src/gog/jni.rs +++ b/app/src/main/rust/stores/src/gog/jni.rs @@ -1,15 +1,3 @@ -//! JNI facade for the GOG Rust download engine — the native half of -//! `com.droiddeck.launcher.stores.gog.GogNative` (Kotlin). Symbol names are bound to that -//! package/class; the `@JvmStatic external` declarations there are the other side of this file. -//! -//! Shape mirrors the Steam download JNI (`jni.rs` `nativeDownloadApp`): `nativeStart` validates -//! its inputs, takes a `GlobalRef` on the listener, spawns the worker thread and returns a handle -//! immediately; callbacks are delivered from the worker / process-pool threads through a -//! `JavaVM` attach; `nativeCancel` flips an `AtomicBool`; `nativeRelease` drops the Java side's -//! reference to the handle (the worker keeps its own until it exits). -//! -//! Log tag `GogNative`: every engine log line goes to logcat here AND to the listener's `onLog` -//! (which the Kotlin manager folds into its own debug log). use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -29,7 +17,6 @@ unsafe extern "C" { fn __android_log_write(prio: i32, tag: *const i8, text: *const i8) -> i32; } -/// `android.util.Log.i(LOG_TAG, message)`; a no-op on non-Android hosts (cargo test). pub fn android_log(message: &str) { #[cfg(target_os = "android")] { @@ -51,8 +38,6 @@ pub fn android_log(message: &str) { } } -/// One in-flight run. The Java side owns a `Box<Arc<..>>` (the `jlong`); the worker thread owns a -/// second `Arc` so `nativeRelease` is safe at any time after `nativeStart` returned. pub struct GogRunHandle { pub cancel: AtomicBool, } @@ -137,8 +122,6 @@ impl GogEvents for JniEvents { } fn on_bytes(&self, bytes_done: u64, bytes_total: u64) { - // A listener without `onBytes` (an app built against the older contract) makes this a - // NoSuchMethodError, which clear_exception drops: the run is unaffected. self.with_env(|env| { let _ = env.call_method( self.listener.as_obj(), @@ -209,7 +192,6 @@ unsafe fn handle_ref(handle: jlong) -> Option<&'static Arc<GogRunHandle>> { } } -/// Symbol-binding probe (see `GogNative.isAvailable`). Returns 1. #[no_mangle] pub extern "system" fn Java_com_droiddeck_launcher_stores_gog_GogNative_nativeProbe( _env: JNIEnv, @@ -218,9 +200,6 @@ pub extern "system" fn Java_com_droiddeck_launcher_stores_gog_GogNative_nativePr 1 } -/// Starts one download loop on a worker thread and returns a handle (0 = could not start; the -/// listener then receives NO callbacks). Inputs are exactly what `GogDownloadManager` holds after -/// manifest + secure-link resolution — see `GogRequest`. #[no_mangle] #[allow(clippy::too_many_arguments)] pub extern "system" fn Java_com_droiddeck_launcher_stores_gog_GogNative_nativeStart( @@ -290,8 +269,6 @@ pub extern "system" fn Java_com_droiddeck_launcher_stores_gog_GogNative_nativeSt Box::into_raw(Box::new(handle)) as jlong } -/// Requests cancellation; the run stops at its next scheduling point and `onComplete` fires with -/// `cancelled = true`. Idempotent. #[no_mangle] pub extern "system" fn Java_com_droiddeck_launcher_stores_gog_GogNative_nativeCancel( _env: JNIEnv, @@ -303,8 +280,6 @@ pub extern "system" fn Java_com_droiddeck_launcher_stores_gog_GogNative_nativeCa } } -/// Drops the Java side's reference. Call once, after `onComplete` (or after cancelling — the worker -/// keeps the run alive until it exits either way). #[no_mangle] pub extern "system" fn Java_com_droiddeck_launcher_stores_gog_GogNative_nativeRelease( _env: JNIEnv, diff --git a/app/src/main/rust/stores/src/gog/plan.rs b/app/src/main/rust/stores/src/gog/plan.rs index 830106dc12..50f8338141 100644 --- a/app/src/main/rust/stores/src/gog/plan.rs +++ b/app/src/main/rust/stores/src/gog/plan.rs @@ -1,50 +1,24 @@ -//! Depot-manifest JSON → download plan. Mirrors `GogDownloadManager.parseDepotManifest` rule for -//! rule (see Bannerlator's `docs/RUST_GOG_PARITY.md` §3): -//! - root `depot.items[]`; `path` with `\` → `/` and one leading `/` stripped; -//! - a file is kept only when `path` is non-empty AND `chunks[]` is non-empty; -//! - per chunk: CDN hash = `compressedMd5` when non-empty, else `md5`; a chunk with neither is -//! dropped; `compressedSize` / `size` default 0; -//! - file `md5` kept when non-empty; `total_size` = Σ chunk `size` (decompressed); -//! - a file whose chunks all dropped is not added. -//! `org.json` coercion (`optString` turns numbers/bools into their text, `optLong` parses numeric -//! strings) is reproduced by [`opt_string`] / [`opt_u64`]. -//! -//! Additionally each chunk carries `offset` = prefix-sum of the preceding chunks' decompressed -//! sizes — Java appends sequentially so it never needs one; the Rust sink writes chunks at that -//! offset as they arrive so the final bytes are identical. use serde_json::Value; #[derive(Clone, Debug, PartialEq, Eq)] pub struct ChunkRef { - /// CDN-path hash (`compressedMd5` preferred, else `md5`). pub hash: String, - /// Verify compressed bytes before inflate (may be empty). pub compressed_md5: String, - /// Verify decompressed bytes after inflate (may be empty). pub md5: String, - /// Expected compressed size, 0 if absent. pub compressed_size: u64, - /// Expected decompressed size, 0 if absent. pub size: u64, - /// Decompressed offset inside the file (prefix-sum of preceding `size`s). pub offset: u64, } #[derive(Clone, Debug, PartialEq, Eq)] pub struct PlannedFile { - /// Install-dir-relative path, forward slashes, no leading slash. pub relative_path: String, - /// Whole-file MD5 from the manifest ("" when absent). pub md5: String, - /// Σ chunk decompressed sizes (0 if unknown). pub total_size: u64, pub chunks: Vec<ChunkRef>, } -/// `JSONObject.optString(key, "")` semantics: strings as-is, numbers/bools rendered, null/absent -/// → "". (`org.json` renders `JSONObject.NULL` as "null"; GOG manifests never carry JSON nulls in -/// these fields, and treating one as absent is the only safe reading.) pub fn opt_string(obj: &Value, key: &str) -> String { match obj.get(key) { Some(Value::String(s)) => s.clone(), @@ -54,8 +28,6 @@ pub fn opt_string(obj: &Value, key: &str) -> String { } } -/// `JSONObject.optLong(key, 0)` semantics for a size field (numbers, or numeric strings; a -/// negative/float value that Java would truncate is clamped to 0 — sizes are never negative). pub fn opt_u64(obj: &Value, key: &str) -> u64 { match obj.get(key) { Some(Value::Number(n)) => n @@ -68,8 +40,6 @@ pub fn opt_u64(obj: &Value, key: &str) -> u64 { } } -/// Parses one inflated gen2 depot manifest and appends its files to `out` -/// (`GogDownloadManager.parseDepotManifest`). Malformed JSON adds nothing, like Java's catch-all. pub fn parse_depot_manifest(json: &str, out: &mut Vec<PlannedFile>) { let Ok(root) = serde_json::from_str::<Value>(json) else { return; @@ -137,20 +107,14 @@ pub fn parse_depot_manifest(json: &str, out: &mut Vec<PlannedFile>) { } } -/// One gen1 file: a byte range of a (pre-signed) depot blob (`GogDownloadManager.Gen1File`). #[derive(Clone, Debug, PartialEq, Eq)] pub struct Gen1File { - /// Install-dir-relative path, used verbatim (Java's gen1 path does not normalise slashes). pub path: String, pub url: String, pub offset: u64, pub size: u64, } -/// Parses a gen1 build manifest (`runGen1`): every `depot[]` entry that is not `support: true`, -/// its `files[]` → (`path`, `url`, `offset` default 0, `size` default 0); an entry with -/// `size == 0` is dropped (Java's `path == null || url == null` checks never fire — `optString` -/// returns "" — so `size == 0` is the only effective filter, mirrored here). pub fn parse_gen1_manifest(json: &str, out: &mut Vec<Gen1File>) { let Ok(root) = serde_json::from_str::<Value>(json) else { return; @@ -184,10 +148,6 @@ pub fn parse_gen1_manifest(json: &str, out: &mut Vec<Gen1File>) { } } -/// Parses every manifest in order (the order Java fetched the depots) and optionally applies the -/// base-install largest-first (LPT) ordering — a STABLE sort by descending `total_size`, exactly -/// `Collections.sort(files, (a, b) -> Long.compare(b.totalSize, a.totalSize))`. The DLC and -/// dependency paths in Java do not sort, so they pass `sort_largest_first = false`. pub fn build_plan(manifests: &[String], sort_largest_first: bool) -> Vec<PlannedFile> { let mut files = Vec::new(); for manifest in manifests { @@ -199,8 +159,6 @@ pub fn build_plan(manifests: &[String], sort_largest_first: bool) -> Vec<Planned files } -/// `GogDownloadManager.buildCdnPath`: `"ab/cd/abcdef..."`. A hash shorter than 4 chars would -/// throw in Java (and fail that file); here it is returned unchanged and fails at fetch time. pub fn build_cdn_path(hash: &str) -> String { if !hash.is_char_boundary(2) || !hash.is_char_boundary(4) || hash.len() < 4 { return hash.to_string(); @@ -208,8 +166,6 @@ pub fn build_cdn_path(hash: &str) -> String { format!("{}/{}/{}", &hash[0..2], &hash[2..4], hash) } -/// `GogDownloadManager.buildChunkUrl`: appends the chunk path BEFORE any query string so the -/// secure-link token survives. pub fn build_chunk_url(base: &str, chunk_path: &str) -> String { match base.find('?') { Some(q) => format!("{}/{}{}", &base[..q], chunk_path, &base[q..]), @@ -217,8 +173,6 @@ pub fn build_chunk_url(base: &str, chunk_path: &str) -> String { } } -/// Per-host key for the fetch core's host semaphores: `scheme://host[:port]` of `url` (lowercased -/// host). Java has one resolved CDN base per run, so the host list has exactly one entry. pub fn host_key(url: &str) -> String { let (scheme, rest) = match url.find("://") { Some(i) => (&url[..i], &url[i + 3..]), diff --git a/app/src/main/rust/stores/src/lib.rs b/app/src/main/rust/stores/src/lib.rs index 963826c40e..87d278ab06 100644 --- a/app/src/main/rust/stores/src/lib.rs +++ b/app/src/main/rust/stores/src/lib.rs @@ -1,21 +1,4 @@ -//! DroidDeck's native store download engines (`libdroiddeckstores.so`). -//! -//! The GOG, Epic Games Store and Amazon Games download loops, ported from Bannerlator's -//! `bl-steam-client` crate (GPL-3.0-or-later, itself derived from WinNative's `wn-steam-client`). -//! Only the store engines and the fetch core they run on came across: DroidDeck's Steam client is -//! the real one, running in the Linux runtime, so none of the Steam CM / depot code is here. -//! -//! Each store module owns its manifest → plan → `FetchItem` mapping, its `FetchSink` (inflate + -//! hash + write in the exact output layout of the Kotlin manager that drives it) and its JNI facade. -//! The JNI contract — classes, method names, signatures, threading — is written down in `JNI.md` -//! next to `Cargo.toml`; the Kotlin side mirrors it exactly. -//! -//! What a run looks like: Kotlin hands over a manifest it already parsed (or, for Amazon, the -//! plan it built from one), the resolved CDN base(s) and the install directory, calls `nativeStart` -//! and gets a handle back at once. Everything after that happens on native threads: the fetch core -//! keeps an adaptive window of HTTP requests in flight on one tokio runtime, hands bodies to a sync -//! process pool that inflates, hashes and writes them, and reports progress through the listener -//! object Kotlin passed in. `nativeCancel` flips a flag; `onComplete` fires exactly once. +//! Ported from Bannerlator's bl-steam-client crate (GPL-3.0-or-later), itself derived from WinNative's wn-steam-client. #![allow(clippy::missing_safety_doc, clippy::result_large_err)] diff --git a/app/src/main/rust/stores/src/md5_small.rs b/app/src/main/rust/stores/src/md5_small.rs index 8abd58bcc4..943785b3f5 100644 --- a/app/src/main/rust/stores/src/md5_small.rs +++ b/app/src/main/rust/stores/src/md5_small.rs @@ -1,17 +1,10 @@ -//! Minimal MD5 (RFC 1321) for the store download engines (GOG chunk / file verification). -//! -//! In-crate on purpose: the crate is built `--locked` in CI with no way to add a dependency from -//! this environment, and the algorithm is 100 lines. Not for anything security-sensitive — it only -//! mirrors the checksum the Java managers already compare against. -/// One-shot digest. pub fn md5(data: &[u8]) -> [u8; 16] { let mut h = Md5::new(); h.update(data); h.finalize() } -/// Lower-case hex of a 16-byte digest. pub fn md5_hex(digest: &[u8; 16]) -> String { const HEX: &[u8; 16] = b"0123456789abcdef"; let mut out = String::with_capacity(32); @@ -22,7 +15,6 @@ pub fn md5_hex(digest: &[u8; 16]) -> String { out } -/// Streaming MD5: `update` any number of times, then `finalize`. #[derive(Clone, Debug)] pub struct Md5 { state: [u32; 4], @@ -93,7 +85,6 @@ impl Md5 { let bit_len = self.total_len.wrapping_mul(8); let mut pad = [0u8; 72]; pad[0] = 0x80; - // Pad to 56 mod 64, then append the 64-bit little-endian bit length. let pad_len = if self.buffer_len < 56 { 56 - self.buffer_len } else { @@ -189,7 +180,6 @@ mod tests { #[test] fn padding_edge_lengths() { - // 55 / 56 / 64 bytes exercise the "pad fits in one block" vs "needs a second block" paths. assert_eq!(hex(&[b'a'; 55]), "ef1772b6dff9a122358552954ad0df65"); assert_eq!(hex(&[b'a'; 56]), "3b0c8ac703f828b04c6c197006d17218"); assert_eq!(hex(&[b'a'; 64]), "014842d480b571495a4a0363793f7367"); diff --git a/app/src/main/rust/stores/src/priority.rs b/app/src/main/rust/stores/src/priority.rs index 916008face..7ea7bb2ea6 100644 --- a/app/src/main/rust/stores/src/priority.rs +++ b/app/src/main/rust/stores/src/priority.rs @@ -1,22 +1,5 @@ -//! Background priority for every thread the store engines create. -//! -//! A download keeps several threads busy at once (the run's worker, the tokio runtime and its -//! blocking pool for DNS, the inflate/hash/write pool, the throughput reporter, GOG's verify pass, -//! the Epic assembler). At the default nice 0 they compete as equals with the app's UI and input -//! threads, and on the device the menus' animations and controller navigation slowed visibly for -//! as long as a store download ran. At nice +10 the scheduler hands them only what the UI leaves, -//! which for a download bound by network and storage costs next to nothing. -//! -//! Linux applies `setpriority(PRIO_PROCESS, tid, …)` to the one thread `tid`, not the process, and -//! a new thread inherits its creator's nice value; every thread is still lowered explicitly at its -//! start so the guarantee does not depend on who spawned it. Only threads this library creates are -//! touched: the JNI calling thread belongs to the app and keeps its priority. - -/// The nice value store-engine threads run at. pub const BACKGROUND_NICE: i32 = 10; -/// Lower the calling thread to [`BACKGROUND_NICE`]. Best effort: a refusal leaves the thread at -/// its current priority and the download runs as before. pub fn background() { #[cfg(any(target_os = "android", target_os = "linux"))] unsafe { @@ -25,7 +8,6 @@ pub fn background() { } } -/// The calling thread's nice value as a log field, e.g. `priority=nice10`. pub fn log_field() -> String { #[cfg(any(target_os = "android", target_os = "linux"))] { diff --git a/app/src/main/rust/stores/src/stores_jni.rs b/app/src/main/rust/stores/src/stores_jni.rs index e69b7f5bd5..ea86fad3f7 100644 --- a/app/src/main/rust/stores/src/stores_jni.rs +++ b/app/src/main/rust/stores/src/stores_jni.rs @@ -1,19 +1,10 @@ -//! The one export that is not a store engine: `com.droiddeck.launcher.stores.StoresNative`. -//! -//! `nativeVersion()` exists so the app can prove, at Setup time, that `libdroiddeckstores.so` -//! loaded and its JNI exports bind — before a user is mid-download and an -//! `UnsatisfiedLinkError` would surface as a failed install. It returns the crate version from -//! `Cargo.toml`, which the app can show next to the other component versions. use jni::objects::JClass; use jni::sys::jstring; use jni::JNIEnv; -/// The crate version, as `Cargo.toml` declares it. pub const VERSION: &str = env!("CARGO_PKG_VERSION"); -/// `StoresNative.nativeVersion(): String` — the crate version (`"0.1.0"`). A null return means the -/// JVM could not allocate the string, which the caller treats like a failed load. #[no_mangle] pub extern "system" fn Java_com_droiddeck_launcher_stores_StoresNative_nativeVersion( env: JNIEnv, diff --git a/app/src/test/cpp/viture_display_modes_test.cpp b/app/src/test/cpp/viture_display_modes_test.cpp new file mode 100644 index 0000000000..ea6ea54629 --- /dev/null +++ b/app/src/test/cpp/viture_display_modes_test.cpp @@ -0,0 +1,21 @@ +// Compile with the installed SDK's headers to verify the two mode vocabularies. +#include "viture_protocol_public.h" +#include "../../main/cpp/viture/display_modes.h" +using namespace droiddeck::viture; + +#define CHECK_MODE(standard, native) \ + static_assert(to_native_mode(standard) == native); \ + static_assert(from_native_mode(native) == standard) +CHECK_MODE(VITURE_DISPLAY_MODE_1920_1080_60HZ, VITURE_NATIVE_DISPLAY_MODE_1920_1080_60HZ); +CHECK_MODE(VITURE_DISPLAY_MODE_1920_1080_90HZ, VITURE_NATIVE_DISPLAY_MODE_1920_1080_90HZ); +CHECK_MODE(VITURE_DISPLAY_MODE_1920_1080_120HZ, VITURE_NATIVE_DISPLAY_MODE_1920_1080_120HZ); +CHECK_MODE(VITURE_DISPLAY_MODE_3840_1080_60HZ, VITURE_NATIVE_DISPLAY_MODE_3D_SBS_3840_1080_60HZ); +CHECK_MODE(VITURE_DISPLAY_MODE_3840_1080_90HZ, VITURE_NATIVE_DISPLAY_MODE_3D_SBS_3840_1080_90HZ); +CHECK_MODE(VITURE_DISPLAY_MODE_1920_1200_60HZ, VITURE_NATIVE_DISPLAY_MODE_1920_1200_60HZ); +CHECK_MODE(VITURE_DISPLAY_MODE_1920_1200_90HZ, VITURE_NATIVE_DISPLAY_MODE_1920_1200_90HZ); +CHECK_MODE(VITURE_DISPLAY_MODE_1920_1200_120HZ, VITURE_NATIVE_DISPLAY_MODE_1920_1200_120HZ); +CHECK_MODE(VITURE_DISPLAY_MODE_3840_1200_60HZ, VITURE_NATIVE_DISPLAY_MODE_3D_SBS_3840_1200_60HZ); +CHECK_MODE(VITURE_DISPLAY_MODE_3840_1200_90HZ, VITURE_NATIVE_DISPLAY_MODE_3D_SBS_3840_1200_90HZ); +static_assert(from_native_mode(VITURE_NATIVE_DISPLAY_MODE_ULTRAWIDE_3840_1080_60HZ) < 0); +static_assert(from_native_mode(VITURE_NATIVE_DISPLAY_MODE_ULTRAWIDE_3840_1200_90HZ) < 0); +static_assert(to_native_mode(0) < 0); diff --git a/app/src/test/java/com/droiddeck/launcher/DriverMenusAutoTest.kt b/app/src/test/java/com/droiddeck/launcher/DriverMenusAutoTest.kt new file mode 100644 index 0000000000..afcb0d4b5d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/DriverMenusAutoTest.kt @@ -0,0 +1,56 @@ +package com.droiddeck.launcher + +import android.app.Activity +import android.content.Context +import android.os.Handler +import android.os.Looper +import com.droiddeck.launcher.session.QuestExperimental +import com.droiddeck.launcher.session.SessionPrefs +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import org.robolectric.shadows.ShadowBuild + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class DriverMenusAutoTest { + @Before fun reset() { + RuntimeEnvironment.getApplication().getSharedPreferences("session", Context.MODE_PRIVATE) + .edit().clear().commit() + ShadowBuild.setModel("Quest 3") + ShadowBuild.setDevice("eureka") + } + + @Test fun selectingAutoUsesTheQuestPairWithoutStartingADownload() { + val activity = Robolectric.buildActivity(Activity::class.java).setup().get() + SessionPrefs.setGpuDriverMode(activity, SessionPrefs.GPU_DRIVERS_MANUAL) + SessionPrefs.setAndroidDriver(activity, "chosen-display") + SessionPrefs.setLinuxDriver(activity, "chosen-linux") + val menus = DriverMenus(activity, Handler(Looper.getMainLooper())) + menus.setMode(true) + assertEquals(QuestExperimental.DRIVER, SessionPrefs.androidDriver(activity)) + assertEquals("", SessionPrefs.linuxDriver(activity)) + assertEquals(activity.getString(R.string.drivers_using_quest), menus.autoStatus) + assertFalse(menus.releaseChecking) + assertNull(menus.pairBusy) + menus.ensureAuto(force = true) + assertFalse(menus.releaseChecking) + } + + @Test fun openingManualDriverSettingsRetainsTheSelectedPair() { + val activity = Robolectric.buildActivity(Activity::class.java).setup().get() + SessionPrefs.setGpuDriverMode(activity, SessionPrefs.GPU_DRIVERS_MANUAL) + SessionPrefs.setAndroidDriver(activity, "chosen-display") + SessionPrefs.setLinuxDriver(activity, "chosen-linux") + DriverMenus(activity, Handler(Looper.getMainLooper())).ensureAuto(force = true) + assertEquals("chosen-display", SessionPrefs.androidDriver(activity)) + assertEquals("chosen-linux", SessionPrefs.linuxDriver(activity)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/agent/AgentGuestSelectionTest.kt b/app/src/test/java/com/droiddeck/launcher/agent/AgentGuestSelectionTest.kt new file mode 100644 index 0000000000..7b5ee94809 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/agent/AgentGuestSelectionTest.kt @@ -0,0 +1,88 @@ +package com.droiddeck.launcher.agent + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test + +class AgentGuestSelectionTest { + private val installedAppIds = setOf(646570L, 3180310L) + + @Test fun focusedInstalledGameIsSelected() { + assertEquals(3180310L, AgentGuest.focusedInstalledSteamAppId(3180310L, installedAppIds)) + } + + @Test fun focusedInstalledGameIsActive() { + assertEquals( + 3180310L, + AgentGuest.activeInstalledSteamAppId(3180310L, listOf(769L, 3180310L), installedAppIds), + ) + } + + @Test fun selectedSteamGameWinsOverStaleActiveSteamGame() { + assertEquals( + 646570L, + AgentGuest.preferredInstalledSteamAppId(646570L, 3180310L, installedAppIds), + ) + } + + @Test fun validGamescopeGameFallsBackWhenSteamSelectionFails() { + assertEquals( + 3180310L, + AgentGuest.selectedOrActiveInstalledSteamAppId( + Result.failure(IllegalStateException("agent unavailable")), + 3180310L, + installedAppIds, + ), + ) + } + + @Test fun absentSelectionAndActiveGameRemainAValidNoSelection() { + assertNull(AgentGuest.selectedOrActiveInstalledSteamAppId(Result.success(null), null, installedAppIds)) + } + + @Test(expected = IllegalStateException::class) + fun selectionFailureWithoutGamescopeFallbackRemainsAnError() { + AgentGuest.selectedOrActiveInstalledSteamAppId( + Result.failure(IllegalStateException("agent unavailable")), + null, + installedAppIds, + ) + } + + @Test fun soleFocusableInstalledGameRemainsActiveUnderSteamOverlay() { + assertEquals( + 3180310L, + AgentGuest.activeInstalledSteamAppId(769L, listOf(3180310L), installedAppIds), + ) + } + + @Test fun ambiguousFocusableGamesAreIgnored() { + assertNull( + AgentGuest.activeInstalledSteamAppId(769L, listOf(646570L, 3180310L), installedAppIds), + ) + } + + @Test fun soleBaselayerGameResolvesAmbiguousSteamOverlayFocus() { + assertEquals( + 646570L, + AgentGuest.activeInstalledSteamAppId( + focusedAppId = 769L, + focusableAppIds = listOf(646570L, 3180310L), + installedAppIds = installedAppIds, + baselayerAppIds = listOf(769L, 646570L), + ), + ) + } + + @Test fun steamClientFocusIsIgnored() { + assertNull(AgentGuest.focusedInstalledSteamAppId(769L, installedAppIds)) + } + + @Test fun unknownGameFocusIsIgnored() { + assertNull(AgentGuest.focusedInstalledSteamAppId(42L, installedAppIds)) + } + + @Test fun missingFocusSnapshotIsIgnored() { + assertNull(AgentGuest.focusedInstalledSteamAppId(null, installedAppIds)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/agent/AgentSecurityTest.kt b/app/src/test/java/com/droiddeck/launcher/agent/AgentSecurityTest.kt index 499645c3e8..df4bb15fc9 100644 --- a/app/src/test/java/com/droiddeck/launcher/agent/AgentSecurityTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/agent/AgentSecurityTest.kt @@ -7,6 +7,7 @@ import android.util.Base64 import androidx.compose.ui.semantics.SemanticsConfiguration import androidx.compose.ui.semantics.SemanticsProperties import androidx.compose.ui.text.AnnotatedString +import com.droiddeck.launcher.R import com.droiddeck.launcher.runtime.LinuxRuntime import org.json.JSONObject import org.junit.Assert.* @@ -68,6 +69,13 @@ class AgentSecurityTest { assertFalse(AgentAccess.commandsAllowed(context)) } + @Test fun theRefusalNamesTheSetupTabThatHoldsTheToggle() { + val refusal = refused("AGENT_COMMANDS_DISABLED") { AgentAccess.requireCommands(context) } + val tab = context.getString(R.string.setup_tab_diagnostics) + val toggle = context.getString(R.string.setup_agent_commands) + assertTrue(refusal.message, refusal.message!!.contains("Setup > $tab > $toggle")) + } + @Test fun runCannotBypassTheToggle() { refused("AGENT_COMMANDS_DISABLED") { AgentAccess.requireStart(context, JSONObject().put("mode", "run")) } AgentAccess.requireStart(context, JSONObject().put("mode", "steam")) diff --git a/app/src/test/java/com/droiddeck/launcher/core/AppLanguageTest.kt b/app/src/test/java/com/droiddeck/launcher/core/AppLanguageTest.kt new file mode 100644 index 0000000000..552e571fb0 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/core/AppLanguageTest.kt @@ -0,0 +1,57 @@ +package com.droiddeck.launcher.core + +import java.io.File +import java.util.Locale +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test + +class AppLanguageTest { + private fun tag(languageTag: String) = AppLanguage.supportedTag(Locale.forLanguageTag(languageTag)) + + private val folders = mapOf( + "id" to "in", "ms" to "ms", "cs" to "cs", "da" to "da", "de" to "de", "es" to "es", + "es-419" to "b+es+419", "fr" to "fr", "it" to "it", "hu" to "hu", "nl" to "nl", "nb" to "nb", + "pl" to "pl", "pt-BR" to "pt", "pt-PT" to "pt-rPT", "ro" to "ro", "fi" to "fi", "sv" to "sv", + "vi" to "vi", "tr" to "tr", "el" to "el", "bg" to "bg", "ru" to "ru", "uk" to "uk", "ar" to "ar", + "hi" to "hi", "th" to "th", "ja" to "ja", "ko" to "ko", "zh-CN" to "zh-rCN", "zh-TW" to "zh-rTW", + "zh-HK" to "zh-rHK", + ) + + @Test fun everyLanguageReadsAsItself() { + AppLanguage.supported.forEach { assertEquals(it, tag(it)) } + } + + @Test fun everyLanguageHasItsOwnName() { + val names = AppLanguage.supported.map(AppLanguage::nativeName) + assertEquals(names.size, names.toSet().size) + AppLanguage.supported.forEach { assertTrue(it, AppLanguage.nativeName(it) != it) } + } + + @Test fun systemLocalesFindTheirLanguage() { + assertEquals("es-419", tag("es-MX")) + assertEquals("es-419", tag("es-US")) + assertEquals("es", tag("es-ES")) + assertEquals("pt-BR", tag("pt-BR")) + assertEquals("pt-BR", tag("pt")) + assertEquals("pt-PT", tag("pt-PT")) + assertEquals("pt-PT", tag("pt-AO")) + assertEquals("id", tag("in-ID")) + assertEquals("id", tag("id-ID")) + assertEquals("de", tag("de-AT")) + assertEquals("ar", tag("ar-EG")) + assertEquals("zh-HK", tag("zh-MO")) + assertNull(tag("sw-KE")) + assertNull(tag("nn-NO")) + } + + @Test fun everyLanguageShipsStringsAndIsOfferedToAndroid() { + assertEquals(AppLanguage.supported.toSet() - "en", folders.keys) + val res = File("src/main/res") + folders.values.forEach { assertTrue(it, File(res, "values-$it/strings.xml").isFile) } + val config = File(res, "xml/locales_config.xml").readText() + val offered = Regex("""android:name="([^"]+)"""").findAll(config).map { it.groupValues[1] }.toList() + assertEquals(AppLanguage.supported, offered) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/core/CpuAllocationDefaultsTest.kt b/app/src/test/java/com/droiddeck/launcher/core/CpuAllocationDefaultsTest.kt new file mode 100644 index 0000000000..ba6e31a10f --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/core/CpuAllocationDefaultsTest.kt @@ -0,0 +1,42 @@ +package com.droiddeck.launcher.core + +import org.junit.Assert.* +import org.junit.Test + +class CpuAllocationDefaultsTest { + private val thor = (0..7).associateWith { when (it) { in 0..2 -> 2.016; in 3..6 -> 2.8032; else -> 3.1872 } } + + @Test fun gen2UsesTheFourMiddleCoresAndOnePrime() { + for (model in listOf("SM8550", "QCS8550", "sm8550-ac")) { + assertEquals(CpuAllocationDefaults.Allocation("7", "3,4,5,6"), CpuAllocationDefaults.forDevice(model, "", thor)) + } + assertEquals(CpuAllocationDefaults.Allocation("7", "3,4,5,6"), CpuAllocationDefaults.forDevice("", "kalama", thor)) + } + + @Test fun coreNumbersAndClockVariantsAreDetectedInsteadOfHardcoded() { + val reordered = mapOf(0 to 3.36, 1 to 2.0, 2 to 2.0, 3 to 2.0, 4 to 2.8, 5 to 2.8, 6 to 2.8, 7 to 2.8) + assertEquals(CpuAllocationDefaults.Allocation("0", "4,5,6,7"), CpuAllocationDefaults.forDevice("SM8550-AC", "kalama", reordered)) + } + + @Test fun anotherOrUnknownChipDoesNotAcquireThisDefault() { + assertNull(CpuAllocationDefaults.forDevice("SM8650", "pineapple", thor)) + assertNull(CpuAllocationDefaults.forDevice("SM8650", "kalama", thor)) + assertNull(CpuAllocationDefaults.forDevice("", "", thor)) + } + + @Test fun missingOrUnexpectedTopologyKeepsTheSchedulerDefault() { + assertNull(CpuAllocationDefaults.forDevice("SM8550", "kalama", thor - 7)) + assertNull(CpuAllocationDefaults.forDevice("SM8550", "kalama", thor + (7 to null))) + assertNull(CpuAllocationDefaults.forDevice("SM8550", "kalama", thor + (7 to 0.0))) + assertNull(CpuAllocationDefaults.forDevice("SM8550", "kalama", thor + (7 to Double.NaN))) + assertNull(CpuAllocationDefaults.forDevice("SM8550", "kalama", (0..7).associateWith { 2.8 })) + } + + @Test fun allCoreGamesUndoTheClientsInheritedRestriction() { + val all = CpuCores.listOrAll("") + assertEquals(all, CpuCores.gameLaunchList("", clientPinned = true)) + assertEquals(all, CpuCores.gameLaunchList(all, clientPinned = true)) + assertEquals("", CpuCores.gameLaunchList("", clientPinned = false)) + assertEquals("0", CpuCores.gameLaunchList("0", clientPinned = true)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/core/DeviceReportExitTest.kt b/app/src/test/java/com/droiddeck/launcher/core/DeviceReportExitTest.kt new file mode 100644 index 0000000000..733b1e4d7a --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/core/DeviceReportExitTest.kt @@ -0,0 +1,28 @@ +package com.droiddeck.launcher.core + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue +import org.junit.Test + +class DeviceReportExitTest { + @Test fun knownReasonCodesHaveTheirPlatformNames() { + assertEquals("EXIT_SELF", DeviceReport.exitReasonName(1)) + assertEquals("LOW_MEMORY", DeviceReport.exitReasonName(3)) + assertEquals("CRASH_NATIVE", DeviceReport.exitReasonName(5)) + assertEquals("EXCESSIVE_RESOURCE_USAGE", DeviceReport.exitReasonName(9)) + assertEquals("FREEZER", DeviceReport.exitReasonName(14)) + } + + @Test fun anUnknownCodeStillShowsItsNumber() { + assertEquals("REASON_99", DeviceReport.exitReasonName(99)) + assertEquals("REASON_-1", DeviceReport.exitReasonName(-1)) + } + + @Test fun aSummaryNamesTheProcessReasonAndStatus() { + val line = DeviceReport.exitSummary("com.droiddeck.launcher", 3, 0, " low mem & is ok ") + assertTrue(line, line.startsWith("com.droiddeck.launcher LOW_MEMORY status=0")) + assertTrue(line, line.endsWith("low mem & is ok")) + assertEquals("? UNKNOWN status=0", DeviceReport.exitSummary(null, 0, 0, null)) + assertEquals("p SIGNALED status=9", DeviceReport.exitSummary("p", 2, 9, " ")) + } +} \ No newline at end of file diff --git a/app/src/test/java/com/droiddeck/launcher/core/DeviceReportPerfTest.kt b/app/src/test/java/com/droiddeck/launcher/core/DeviceReportPerfTest.kt new file mode 100644 index 0000000000..b9efc42143 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/core/DeviceReportPerfTest.kt @@ -0,0 +1,28 @@ +package com.droiddeck.launcher.core + +import org.junit.Assert.assertEquals +import org.junit.Test + +class DeviceReportPerfTest { + @Test fun thermalStatusesHaveTheirPlatformNames() { + assertEquals("NONE", DeviceReport.thermalStatusName(0)) + assertEquals("MODERATE", DeviceReport.thermalStatusName(2)) + assertEquals("CRITICAL", DeviceReport.thermalStatusName(4)) + assertEquals("SHUTDOWN", DeviceReport.thermalStatusName(6)) + assertEquals("STATUS_9", DeviceReport.thermalStatusName(9)) + } + + @Test fun gameModesHaveTheirPlatformNames() { + assertEquals("UNSUPPORTED", DeviceReport.gameModeName(0)) + assertEquals("STANDARD", DeviceReport.gameModeName(1)) + assertEquals("PERFORMANCE", DeviceReport.gameModeName(2)) + assertEquals("BATTERY", DeviceReport.gameModeName(3)) + assertEquals("MODE_7", DeviceReport.gameModeName(7)) + } + + @Test fun refreshModesAreRoundedDeduplicatedAndListedFastestFirst() { + assertEquals("120 Hz, 60 Hz", DeviceReport.refreshModesSummary(listOf(60.0f, 120.00001f, 60.00001f))) + assertEquals("60 Hz", DeviceReport.refreshModesSummary(listOf(59.94f))) + assertEquals("", DeviceReport.refreshModesSummary(emptyList())) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/core/DownloaderResumeTest.kt b/app/src/test/java/com/droiddeck/launcher/core/DownloaderResumeTest.kt new file mode 100644 index 0000000000..a3faef0701 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/core/DownloaderResumeTest.kt @@ -0,0 +1,170 @@ +package com.droiddeck.launcher.core + +import java.io.File +import java.net.ServerSocket +import java.net.Socket +import java.nio.file.Files +import java.security.MessageDigest +import java.util.concurrent.CopyOnWriteArrayList +import org.junit.After +import org.junit.Assert.assertArrayEquals +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test + +/** + * A download that was cut off keeps its bytes, and a second call with `resume` asks for the rest + * with a Range header instead of starting again. The server is a plain socket so the first answer + * can promise the whole file and then hang up halfway. + */ +class DownloaderResumeTest { + private val data = ByteArray(300_000) { (it % 251).toByte() } + private val cutAt = 100_000 + private val requests = CopyOnWriteArrayList<String?>() + private lateinit var server: ServerSocket + private lateinit var dir: File + private lateinit var thread: Thread + @Volatile private var misbehave = false + @Volatile private var etag: String? = "\"v1\"" + @Volatile private var corrupt = false + + @Before fun setUp() { + dir = Files.createTempDirectory("downloader-resume").toFile() + server = ServerSocket(0) + thread = Thread { + try { + while (!server.isClosed) { + val socket = server.accept() + // the client may hang up on a body it refuses; that must not stop the server + runCatching { handle(socket) } + } + } catch (_: Exception) { + // closed by tearDown + } + }.apply { isDaemon = true; start() } + } + + @After fun tearDown() { + server.close() + dir.deleteRecursively() + } + + private fun handle(socket: Socket) = socket.use { + val input = it.getInputStream().bufferedReader(Charsets.ISO_8859_1) + val path = input.readLine() ?: return@use + var range: String? = null + while (true) { + val line = input.readLine() ?: break + if (line.isEmpty()) break + if (line.startsWith("Range:", ignoreCase = true)) range = line.substringAfter(':').trim() + } + requests.add(range) + val out = it.getOutputStream() + val validator = etag?.let { tag -> "ETag: $tag\r\n" } ?: "" + val content = if (corrupt && "/corrupt" in path) ByteArray(data.size) else data + val from = range?.removePrefix("bytes=")?.substringBefore('-')?.toIntOrNull() + if (misbehave) { + // answers a Range request with a 206 that starts at 0, and serves plain requests whole + val start = if (from == null) "200 OK" else "206 Partial Content" + val extra = if (from == null) "" else "Content-Range: bytes 0-${data.size - 1}/${data.size}\r\n" + out.write("HTTP/1.1 $start\r\n${extra}${validator}Content-Length: ${data.size}\r\nConnection: close\r\n\r\n".toByteArray()) + out.write(content) + out.flush() + } else if (from == null) { + out.write("HTTP/1.1 200 OK\r\n${validator}Content-Length: ${data.size}\r\nConnection: close\r\n\r\n".toByteArray()) + out.write(content, 0, cutAt) + out.flush() + // hang up with most of the promised body still unsent + } else { + val rest = data.size - from + out.write(("HTTP/1.1 206 Partial Content\r\nContent-Range: bytes $from-${data.size - 1}/${data.size}\r\n" + + "${validator}Content-Length: $rest\r\nConnection: close\r\n\r\n").toByteArray()) + out.write(content, from, rest) + out.flush() + } + } + + @Test fun cutOffDownloadResumesFromWhatWasKept() { + val url = "http://127.0.0.1:${server.localPort}/runtime.tar.zst" + val target = File(dir, "runtime.tar.zst") + + assertFalse("the cut-off transfer must not report success", Downloader.downloadFile(url, target, true, null)) + val kept = target.length() + assertTrue("the partial bytes stay on disk (kept=$kept)", kept in 1 until data.size) + + assertTrue(Downloader.downloadFile(url, target, true, null)) + assertEquals(data.size.toLong(), target.length()) + assertArrayEquals(data, target.readBytes()) + assertEquals(listOf<String?>(null, "bytes=$kept-"), requests.toList()) + } + + @Test fun answerFromTheWrongOffsetIsNotAppended() { + val url = "http://127.0.0.1:${server.localPort}/runtime.tar.zst" + val target = File(dir, "runtime.tar.zst") + + assertFalse(Downloader.downloadFile(url, target, true, null)) + val kept = target.length() + assertTrue(kept in 1 until data.size) + + misbehave = true + assertTrue(Downloader.downloadFile(url, target, true, null)) + assertEquals(data.size.toLong(), target.length()) + assertArrayEquals("the file must not be the kept bytes plus a misplaced body", data, target.readBytes()) + assertEquals(listOf<String?>(null, "bytes=$kept-", null), requests.toList()) + } + + @Test fun legacyPartialWithoutValidatorRestartsAtZero() { + val url = "http://127.0.0.1:${server.localPort}/runtime.tar.zst" + val target = File(dir, "runtime.tar.zst") + target.writeBytes(ByteArray(cutAt) { 9 }) + misbehave = true + assertTrue(Downloader.downloadFile(url, target, true, null)) + assertArrayEquals(data, target.readBytes()) + assertEquals(listOf<String?>(null), requests.toList()) + } + + @Test fun missingStrongETagPreventsUnsafeResume() { + val url = "http://127.0.0.1:${server.localPort}/runtime.tar.zst" + val target = File(dir, "runtime.tar.zst") + etag = null + assertFalse(Downloader.downloadFile(url, target, true, null)) + misbehave = true + assertTrue(Downloader.downloadFile(url, target, true, null)) + assertArrayEquals(data, target.readBytes()) + assertEquals(listOf<String?>(null, null), requests.toList()) + } + + @Test fun switchingCandidateDoesNotAppendToDifferentSource() { + val first = "http://127.0.0.1:${server.localPort}/first" + val second = "http://127.0.0.1:${server.localPort}/second" + val target = File(dir, "runtime.tar.zst") + val sha256 = MessageDigest.getInstance("SHA-256").digest(data).joinToString("") { "%02x".format(it.toInt() and 0xff) } + assertFalse(Downloader.downloadFile(first, target, true, sha256, null)) + misbehave = true + assertTrue(Downloader.downloadFile(second, target, true, sha256, null)) + assertArrayEquals(data, target.readBytes()) + assertEquals(listOf<String?>(null, null), requests.toList()) + } + + @Test fun corruptCandidateFallsBackAfterChecksumMismatch() { + val first = "http://127.0.0.1:${server.localPort}/corrupt" + val second = "http://127.0.0.1:${server.localPort}/clean" + val target = File(dir, "runtime.tar.zst") + val sha256 = MessageDigest.getInstance("SHA-256").digest(data).joinToString("") { "%02x".format(it.toInt() and 0xff) } + misbehave = true + corrupt = true + assertTrue(Downloader.downloadCandidates(first, listOf(first, second), target, true, sha256, null)) + assertArrayEquals(data, target.readBytes()) + assertEquals(listOf<String?>(null, null), requests.toList()) + } + + @Test fun executableMetadataIsAlwaysDirect() { + val url = "https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases" + assertEquals(listOf(url), DownloadSource.candidates(url)) + val catalog = "https://raw.githubusercontent.com/Droid-Deck/DroidDeck-CI/main/catalog.json" + assertEquals(listOf(catalog), DownloadSource.candidates(catalog)) + } + +} diff --git a/app/src/test/java/com/droiddeck/launcher/core/GameEnvironmentTest.kt b/app/src/test/java/com/droiddeck/launcher/core/GameEnvironmentTest.kt index 82d5f3f64d..4fe40920d1 100644 --- a/app/src/test/java/com/droiddeck/launcher/core/GameEnvironmentTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/core/GameEnvironmentTest.kt @@ -102,4 +102,46 @@ class GameEnvironmentTest { assertTrue(GameEnvironment.validScope("4294967295")) for (scope in listOf("0", "-1", "01", "+1", "4294967296", "../42")) assertFalse(GameEnvironment.validScope(scope)) } + + @Test fun gameFexPresetOverridesGeneralAndCanInheritAgain() { + val performance = GameEnvironment.withGameFexPreset(GameEnvironment.Config(), "42", "PERFORMANCE") + assertEquals("PERFORMANCE", GameEnvironment.gameFexPreset(performance, "42")) + assertEquals("0", GameEnvironment.effective(performance, "STABILITY", "42")["FEX_TSOENABLED"]) + assertEquals("1", GameEnvironment.effective(performance, "STABILITY", "43")["FEX_TSOENABLED"]) + + val inherited = GameEnvironment.withGameFexPreset(performance, "42", null) + assertNull(GameEnvironment.gameFexPreset(inherited, "42")) + assertFalse(inherited.games.containsKey("42")) + } + + @Test fun gameFexPresetPreservesOtherOverridesAndRecognizesCustomValues() { + val original = GameEnvironment.Config(games = mapOf("42" to mapOf("CUSTOM" to "value", "FEX_MULTIBLOCK" to "7"))) + assertEquals(GameEnvironment.CUSTOM_FEX_PRESET, GameEnvironment.gameFexPreset(original, "42")) + + val compatibility = GameEnvironment.withGameFexPreset(original, "42", "COMPATIBILITY") + assertEquals("value", compatibility.games.getValue("42")["CUSTOM"]) + assertEquals("COMPATIBILITY", GameEnvironment.gameFexPreset(compatibility, "42")) + } + + @Test fun gameSyncChoiceMatchesTheAppWideChoiceAndCanInheritAgain() { + val base = GameEnvironment.Config(games = mapOf("42" to mapOf("FEX_TSOENABLED" to "1", "PROTON_NO_ESYNC" to "1"))) + assertEquals(GameEnvironment.CUSTOM_SYNC, GameEnvironment.gameSync(base, "42")) + assertNull(GameEnvironment.gameSync(base, "43")) + for (backend in GameEnvironment.syncBackends) { + val chosen = GameEnvironment.withGameSync(base, "42", backend) + assertEquals(backend, GameEnvironment.gameSync(chosen, "42")) + assertEquals("1", chosen.games["42"]!!["FEX_TSOENABLED"]) + } + val ntsync = GameEnvironment.withGameSync(base, "42", "ntsync").games["42"]!! + assertEquals(listOf("1", "0", "1"), listOf(ntsync["BL_SYNC"], ntsync["BL_FSYNC_FIRST"], ntsync["BL_SYNC_FALLBACK"])) + assertFalse(ntsync.containsKey("PROTON_NO_ESYNC")) + val fsync = GameEnvironment.withGameSync(base, "42", "fsync").games["42"]!! + assertEquals(listOf("0", "1", "1", "1"), listOf(fsync["BL_SYNC"], fsync["BL_FSYNC_FIRST"], fsync["BL_SYNC_FALLBACK"], fsync["PROTON_NO_ESYNC"])) + val wineserver = GameEnvironment.withGameSync(base, "42", "wineserver").games["42"]!! + assertEquals(listOf("0", "0", "0"), listOf(wineserver["BL_SYNC"], wineserver["BL_FSYNC_FIRST"], wineserver["BL_SYNC_FALLBACK"])) + val inherited = GameEnvironment.withGameSync(base, "42", null) + assertNull(GameEnvironment.gameSync(inherited, "42")) + assertEquals(mapOf("FEX_TSOENABLED" to "1"), inherited.games["42"]) + assertTrue(GameEnvironment.withGameSync(GameEnvironment.Config(), "42", null).games.isEmpty()) + } } diff --git a/app/src/test/java/com/droiddeck/launcher/core/LogRedactorTest.kt b/app/src/test/java/com/droiddeck/launcher/core/LogRedactorTest.kt index b1c97962d8..ddeb3ac1fa 100644 --- a/app/src/test/java/com/droiddeck/launcher/core/LogRedactorTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/core/LogRedactorTest.kt @@ -88,7 +88,6 @@ class LogRedactorTest { } } - // The Steam UI's own login line (webhelper_js.txt), as the privacy scan found it. @Test fun loginStateLineLosesAnEmailAccount() { val line = "[2026-10-07 21:14:03] SteamUI: INFO: Login: OnLoginStateChange someone.masked@example.com 2 1 0 0" val out = LogRedactor.redact(line) @@ -148,4 +147,23 @@ class LogRedactorTest { val once = LogRedactor.redactForShare("resolver: 192.168.0.1") assertEquals(once, LogRedactor.redactForShare(once)) } + + @Test fun learnedAccountsComeFromBothClients() { + val root = java.nio.file.Files.createTempDirectory("redactor").toFile() + try { + val arm = java.io.File(root, "root/.local/share/Steam/config/loginusers.vdf") + arm.parentFile.mkdirs() + arm.writeText("\"users\" { \"7656\" { \"AccountName\" \"armplayer\" \"PersonaName\" \"Arm Persona\" } }") + LogRedactor.learnFromRuntime(root) + assertEquals("hi <redacted:account> and <redacted:account>", LogRedactor.redact("hi armplayer and Arm Persona")) + val x64 = java.io.File(root, "root/.droiddeck-x64/.local/share/Steam/config/loginusers.vdf") + x64.parentFile.mkdirs() + x64.writeText("\"users\" { \"7656\" { \"AccountName\" \"x64player\" } }") + LogRedactor.learnFromRuntime(root) + assertEquals("<redacted:account> <redacted:account>", LogRedactor.redact("armplayer x64player")) + } finally { + LogRedactor.learnAccounts() + root.deleteRecursively() + } + } } diff --git a/app/src/test/java/com/droiddeck/launcher/core/PhantomProcessLimitTest.kt b/app/src/test/java/com/droiddeck/launcher/core/PhantomProcessLimitTest.kt index e930f85e51..e1f0b1af3f 100644 --- a/app/src/test/java/com/droiddeck/launcher/core/PhantomProcessLimitTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/core/PhantomProcessLimitTest.kt @@ -35,11 +35,17 @@ class PhantomProcessLimitTest { listOf( "device_config set_sync_disabled_for_tests persistent", "device_config put activity_manager max_phantom_processes 2147483647", + "settings put global settings_enable_monitor_phantom_procs false", ), PhantomProcessLimit.shellCommands(enabled = false, sdk = 31), ) assertTrue(PhantomProcessLimit.verified("2147483647\n", enabled = false, sdk = 31)) assertFalse(PhantomProcessLimit.verified("null", enabled = false, sdk = 31)) + assertEquals(PhantomProcessStatus.DISABLED, PhantomProcessLimit.android12Status(true, null, null)) + assertEquals(PhantomProcessStatus.DISABLED, PhantomProcessLimit.android12Status(false, "false", null)) + assertEquals(PhantomProcessStatus.DISABLED, PhantomProcessLimit.android12Status(false, null, "0")) + assertEquals(PhantomProcessStatus.UNREADABLE, PhantomProcessLimit.android12Status(false, null, null)) + assertEquals(PhantomProcessStatus.UNREADABLE, PhantomProcessLimit.android12Status(false, "true", null)) } @Test diff --git a/app/src/test/java/com/droiddeck/launcher/core/SecretScrubTest.kt b/app/src/test/java/com/droiddeck/launcher/core/SecretScrubTest.kt index 86ff6ece8f..61133f8a46 100644 --- a/app/src/test/java/com/droiddeck/launcher/core/SecretScrubTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/core/SecretScrubTest.kt @@ -13,7 +13,6 @@ class SecretScrubTest { "0024:warn:seh:dispatch_exception code=c0000005 flags=0 addr=0000000140012345", "0030:trace:seh:handle_syscall_fault code=80000003 flags=0", "exception code=0xC0000005 at 0x140012345", - // An exception code stays one even on a line that also carries OAuth keys. "client_id=abc code=c0000005", )) assertEquals(line, share(line)) } diff --git a/app/src/test/java/com/droiddeck/launcher/core/ZramSupportTest.kt b/app/src/test/java/com/droiddeck/launcher/core/ZramSupportTest.kt new file mode 100644 index 0000000000..056e3a0553 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/core/ZramSupportTest.kt @@ -0,0 +1,37 @@ +package com.droiddeck.launcher.core + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test + +class ZramSupportTest { + @Test + fun kernelVersionsFromAndroidReleases() { + assertTrue(ZramSupport.kernelAtLeast("6.12.38-android16-5-g665eafb62659-ab14778838-4k", 5, 4)) + assertTrue(ZramSupport.kernelAtLeast("5.4.0", 5, 4)) + assertFalse(ZramSupport.kernelAtLeast("4.19.157-perf+", 5, 4)) + assertFalse(ZramSupport.kernelAtLeast("", 5, 4)) + } + + @Test + fun underTwelveGbFromAdvertisedOrTotalMemory() { + val gb = 1_000_000_000L + val gib = 1L shl 30 + assertTrue(ZramSupport.belowTwelveGb(8 * gb, 0)) + assertTrue(ZramSupport.belowTwelveGb(8 * gib, 0)) + assertFalse(ZramSupport.belowTwelveGb(12 * gb, 0)) + assertFalse(ZramSupport.belowTwelveGb(12 * gib, 0)) + assertTrue(ZramSupport.belowTwelveGb(0, 7_400_000L * 1024)) + assertTrue(ZramSupport.belowTwelveGb(0, 9_300_000L * 1024)) + assertFalse(ZramSupport.belowTwelveGb(0, 11_100_000L * 1024)) + assertFalse(ZramSupport.belowTwelveGb(0, 15_600_380L * 1024)) + } + + @Test + fun swapTotalComesFromMeminfo() { + assertEquals(12582908L, ZramSupport.swapTotalKb(listOf("MemTotal: 15600380 kB", "SwapTotal: 12582908 kB"))) + assertEquals(0L, ZramSupport.swapTotalKb(listOf("SwapTotal: 0 kB"))) + assertEquals(0L, ZramSupport.swapTotalKb(emptyList())) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/AddedExesTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/AddedExesTest.kt index 528e97d42f..2d0a29de40 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/AddedExesTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/AddedExesTest.kt @@ -13,7 +13,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config -/** The Games tab's +: one picked .exe becomes a game, once, wherever the session can see it. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class AddedExesTest { @@ -54,7 +53,6 @@ class AddedExesTest { assertEquals(Library.ADDED, game.source) assertTrue(File(app.filesDir, "session/added-games.json").readText().contains("Celeste.exe")) - // The same exe again: the game it already is, no second entry. val again = AddedGames.addExe(app, pick) assertTrue(again is AddedGames.AddResult.Existing) assertEquals(game.appId, (again as AddedGames.AddResult.Existing).game.appId) @@ -83,7 +81,6 @@ class AddedExesTest { val result = AddedGames.addExe(app, deep) assertTrue(result is AddedGames.AddResult.Switched) assertEquals(deep.path, AddedGames.scan(app).single().exe.path) - // The Games folder's game is an entry of its own (GamesFolderMigration); no second one. assertEquals(listOf(File(games, "Example").path), AddedExes.list(app).map { it.folder }) } diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGameArtLookupTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGameArtLookupTest.kt index 1c2978602b..1f1e30c816 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGameArtLookupTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGameArtLookupTest.kt @@ -20,7 +20,6 @@ import java.io.File import java.security.SecureRandom import javax.crypto.spec.SecretKeySpec -/** Where an added game's art comes from: its own Steam appid, a matching name, SteamGridDB's key. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class AddedGameArtLookupTest { @@ -39,7 +38,6 @@ class AddedGameArtLookupTest { val match = SteamMatch.resolve(app, dir.path, exe, "Palworld") { fail("searched"); null } assertEquals(1623730, match.appId) assertEquals(SteamMatch.Certainty.FILES, match.certainty) - // The same record for everyone who asks. assertEquals(1623730, SteamMatch.get(app, dir.path)!!.appId) } @@ -68,7 +66,6 @@ class AddedGameArtLookupTest { } @Test fun aStoreResultIsTakenOnlyWhenItsNameMatches() { - // The first result is no longer taken for being first. assertNull(AddedGameArt.pickStoreResult("My Obscure Game", listOf("10" to "Totally Different", "11" to "Another One"))) assertEquals("20", AddedGameArt.pickStoreResult("Hades", listOf("19" to "Hades II Soundtrack Bundle Extra", "20" to "Hades"))) assertEquals("30", AddedGameArt.pickStoreResult("Skyrim Special Edition Complete Edition", listOf("1" to "Unrelated", "30" to "Skyrim Special Edition"))) @@ -95,7 +92,6 @@ class AddedGameArtLookupTest { assertEquals("build", SteamGridDb.pick("", "build")) assertEquals("build", SteamGridDb.pick(" ", "build")) assertEquals("", SteamGridDb.pick("", "")) - // This test build carries no key. assertEquals("", SteamGridDb.builtInKey()) assertEquals("", SteamGridDb.key(app)) } @@ -112,4 +108,66 @@ class AddedGameArtLookupTest { assertFalse(file.exists()) assertEquals("", SteamGridDb.key(app)) } + + @Test fun aFailedLookupIsNotRememberedAsNoMatch() { + val marker = File(tmp.newFolder(), "sgdb-id") + try { + AddedGameArt.remembered(marker) { throw SteamGridDb.Failed(SteamGridDb.Status.BAD_KEY) } + fail("the failure was swallowed") + } catch (e: SteamGridDb.Failed) { + assertEquals(SteamGridDb.Status.BAD_KEY, e.status) + } + assertFalse(marker.exists()) + } + + @Test fun aMissIsKeptUntilTheKeyChangesOrTheUserAsksAgain() { + val marker = File(tmp.newFolder(), "sgdb-id") + var asked = 0 + assertNull(AddedGameArt.remembered(marker) { asked++; null }) + assertEquals("none", marker.readText()) + assertNull(AddedGameArt.remembered(marker) { asked++; "9" }) + assertEquals(1, asked) + assertEquals("9", AddedGameArt.remembered(marker, notBefore = System.currentTimeMillis() + 1000) { asked++; "9" }) + assertEquals(2, asked) + assertEquals("9", AddedGameArt.remembered(marker) { fail("asked again"); null }) + + val old = File(marker.parentFile, "old-id").apply { writeText("none") } + assertEquals("5", AddedGameArt.remembered(old, retryMiss = true) { "5" }) + assertEquals("5", old.readText()) + } + + @Test fun savingAKeyMarksWhenItChanged() { + SteamGridDb.keys = CredentialCipher.KeyProvider { SecretKeySpec(ByteArray(32).also { SecureRandom().nextBytes(it) }, "AES") } + assertEquals(0L, SteamGridDb.keyChangedAt(app)) + SteamGridDb.setUserKey(app, "abcdef0123456789") + assertTrue(SteamGridDb.keyChangedAt(app) > 0L) + } + + @Test fun aBadResponseSaysWhatWentWrong() { + assertEquals(SteamGridDb.Status.BAD_KEY, SteamGridDb.failure(401)) + assertEquals(SteamGridDb.Status.BAD_KEY, SteamGridDb.failure(403)) + assertEquals(SteamGridDb.Status.LIMIT, SteamGridDb.failure(429)) + assertEquals(SteamGridDb.Status.SERVER, SteamGridDb.failure(503)) + assertNull(SteamGridDb.failure(404)) + assertNull(SteamGridDb.failure(200)) + } + + @Test fun searchResultsKeepOnlyGamesWithAnIdAndAName() { + val data = JSONArray() + .put(JSONObject().put("id", 7).put("name", "DONTFORGET").put("verified", true)) + .put(JSONObject().put("id", 0).put("name", "No id")) + .put(JSONObject().put("id", 8).put("name", "")) + .put("junk") + val games = SteamGridDb.games(data) + assertEquals(1, games.size) + assertEquals(7, games[0].id) + assertEquals("DONTFORGET", games[0].name) + assertTrue(games[0].verified) + } + + @Test fun eachSlotAsksItsOwnEndpoint() { + assertEquals("heroes/game/5?nsfw=false&humor=false", SteamGridDb.path(5, AddedGameArt.Slot.BACKGROUND)) + assertEquals("grids/game/5?dimensions=600x900&nsfw=false&humor=false", SteamGridDb.path(5, AddedGameArt.Slot.COVER)) + assertEquals("grids/game/5?dimensions=460x215,920x430&nsfw=false&humor=false", SteamGridDb.path(5, AddedGameArt.Slot.WIDE)) + } } diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGameEditsTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGameEditsTest.kt index f83a082d19..3697ef9a78 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGameEditsTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGameEditsTest.kt @@ -18,7 +18,6 @@ import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config import java.io.File -/** "Add all games in this folder", the editor's writes to the shortcut listing, art choices. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class AddedGameEditsTest { @@ -52,14 +51,11 @@ class AddedGameEditsTest { val alpha = result.added.first { it.name == "Alpha" } assertEquals("Alpha.exe", alpha.exe.name) assertFalse(alpha.exeUncertain) - // Two lookalikes: the best guess, marked. assertTrue(result.added.first { it.name == "Beta" }.exeUncertain) - // Entries, not a Games folder. assertEquals(emptyList<String>(), SessionPrefs.addedGamesDirs(app)) assertEquals(3, AddedExes.list(app).size) assertTrue(listing().map { it.getString("name") }.containsAll(listOf("Alpha", "Beta", "Celeste"))) - // Again: nothing new, all three there already. val again = AddedGames.addFolder(app, dir) assertEquals(emptyList<String>(), again.added.map { it.name }) assertEquals(3, again.already) @@ -84,7 +80,6 @@ class AddedGameEditsTest { assertEquals(game.appId, entry.getLong("appid")) assertEquals(game.appId, AddedGameEdits.game(app, folder)!!.appId) - // Back to automatic. AddedGameEdits.setName(app, folder, "") assertTrue(AddedGameEdits.setStartIn(app, folder, "")) val auto = listing().single() @@ -109,8 +104,6 @@ class AddedGameEditsTest { assertEquals("/g/Game/data", SessionPrefs.addedGameStartIn(app, folder.path)) assertEquals("-safe", SessionPrefs.addedGameLaunch(app, folder.path)) - // The user renames it in the app before Steam's shortcut is written again: the same Steam - // value is not taken a second time. SessionPrefs.setAddedGameName(app, folder.path, "Mine") AddedGames.adoptSteamEdits(app, folder, record) assertEquals("Mine", SessionPrefs.addedGameName(app, folder.path)) diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesCandidatesTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesCandidatesTest.kt index 6771a4a18b..f2881c712f 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesCandidatesTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesCandidatesTest.kt @@ -13,7 +13,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config -/** The .exe picker below a game folder (five levels, past installer folders, ranked) and the names it finds. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class AddedGamesCandidatesTest { @@ -65,7 +64,6 @@ class AddedGamesCandidatesTest { val game = tmp.newFolder("Huge") for (i in 0 until GameExePicker.WALK_BUDGET + 50) File(game, "data/d%04d".format(i)).mkdirs() exe(game, "zzz/Late.exe") - // data/ alone fills the budget before zzz/ is listed. assertEquals(emptyList<String>(), names(game)) val small = tmp.newFolder("Small") exe(small, "x/y/Found.exe") @@ -136,7 +134,6 @@ class AddedGamesCandidatesTest { game.setLastModified(game.lastModified() + 10_000) val after = AddedGames.scan(app).single() assertEquals("The Witcher 3 - Wild Hunt", after.name) - // Already added under the folder name: the shortcut keeps its id. assertEquals(before.appId, after.appId) } diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesRemoveTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesRemoveTest.kt index e98d080315..00da0980e4 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesRemoveTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesRemoveTest.kt @@ -12,7 +12,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config -/** Removing an added game stops listing it and keeps it off after a rescan, until it is added again; nothing on disk goes. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class AddedGamesRemoveTest { @@ -47,7 +46,6 @@ class AddedGamesRemoveTest { SessionPrefs.setAddedGameRemoved(app, File(games, "Beta").path, true) assertEquals(listOf("Alpha", "Gamma"), AddedGames.scan(app).map { it.name }) - // A rescan does not bring it back. assertEquals(listOf("Alpha", "Gamma"), AddedGames.scan(app).map { it.name }) SessionPrefs.setAddedGameRemoved(app, File(games, "Beta").path, false) @@ -66,7 +64,6 @@ class AddedGamesRemoveTest { assertTrue(!listing.contains("\"Beta\"")) assertTrue(File(beta, "Beta.exe").isFile) - // Added again with the +: it comes back. assertTrue(AddedGames.addExe(app, File(beta, "Beta.exe")) is AddedGames.AddResult.Switched) assertEquals(emptyList<String>(), SessionPrefs.removedAddedGames(app)) assertTrue(File(app.filesDir, "session/added-games.json").readText().contains("\"Beta\"")) diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesScanTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesScanTest.kt index 37a4ae776a..26ebf6700f 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesScanTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesScanTest.kt @@ -28,6 +28,30 @@ class AddedGamesScanTest { assertEquals(listOf("Example"), AddedGames.scan(app).map { it.name }) } + private fun cardWithX8664Library(): File { + val card = tmp.newFolder("Card") + File(card, "Example").mkdirs() + File(card, "Example/Example.exe").writeText("game") + File(card, "x86-64/steamapps/common/FlatOut").mkdirs() + File(card, "x86-64/steamapps/common/FlatOut/FlatOut.exe").writeText("steam game") + return card + } + + @Test fun theX8664ClientsCardLibraryIsNotAGame() { + val card = cardWithX8664Library() + SessionPrefs.setGameStorage(app, card.path, "Card") + assertEquals(listOf("Example"), AddedGames.scan(app).map { it.name }) + assertTrue(AddedGames.isSteamLibraryFolder("x86-64")) + assertFalse(AddedGames.isSteamLibraryFolder("x86-64 games")) + } + + @Test fun anOldGamesFolderHoldingTheX8664LibraryDoesNotMigrateItAsAGame() { + val card = cardWithX8664Library() + SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "") + SessionPrefs.setAddedGamesDirs(app, listOf(card.path)) + assertEquals(listOf("Example"), AddedGames.scan(app).map { it.name }) + } + @Test fun aStorePackageLaunchesTheExecutableItDeclares() { val game = tmp.newFolder("Minecraft Dungeons") File(game, "Dungeons.exe").writeText("unreal bootstrap") diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesStoreScanTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesStoreScanTest.kt index 6284086c7e..410d298acd 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesStoreScanTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesStoreScanTest.kt @@ -13,7 +13,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config -/** A store install is one more folder the scan finds, named and aimed by its sidecar. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class AddedGamesStoreScanTest { @@ -38,7 +37,6 @@ class AddedGamesStoreScanTest { assertEquals("HOMM3.exe", game.exe.name) assertEquals(Store.GOG.id, game.source) assertEquals("1207658924", game.storeId) - // Inside the runtime's tree the folder needs no bind: its guest path is its path from the tree's root. assertEquals("/root/Games/Stores/GOG/Heroes of Might and Magic 3 Complete/HOMM3.exe", game.guestExe) assertEquals("/root/Games/Stores/GOG/Heroes of Might and Magic 3 Complete", game.guestDir) } @@ -51,6 +49,23 @@ class AddedGamesStoreScanTest { assertEquals(Store.EPIC.id, game.source) } + @Test fun anEpicGameAlwaysUsesItsLauncherWrapperEvenAfterAnExeIsPicked() { + val folder = install(Store.EPIC, "picked", "Picked Epic", "Binaries/Game.exe", launcher = true) + AddedExes.put(app, AddedExes.Entry(folder.path, File(folder, "Binaries/Game.exe").path, picked = true)) + val game = AddedGames.scan(app).single { it.folder.absolutePath == folder.absolutePath } + assertEquals("Binaries/Game.exe", game.exe.relativeTo(folder).path) + assertTrue(game.guestExe.endsWith("/" + StoreLaunch.LAUNCHER)) + } + + @Test fun aDifferentPickedExeOnAnEpicGameIsRunDirectly() { + val folder = install(Store.EPIC, "other", "Other Epic", "Binaries/Game.exe", launcher = true) + val tool = File(folder, "Tools/Editor.exe").apply { parentFile!!.mkdirs(); writeText("tool") } + AddedExes.put(app, AddedExes.Entry(folder.path, tool.path, picked = true)) + val game = AddedGames.scan(app).single { it.folder.absolutePath == folder.absolutePath } + assertEquals("Tools/Editor.exe", game.exe.relativeTo(folder).path) + assertTrue(game.guestExe.endsWith("/Tools/Editor.exe")) + } + @Test fun anOlderSidecarsSteamSwitchIsIgnoredEveryInstallIsListed() { val folder = install(Store.AMAZON, "amzn1.adg.product.x", "Yakuza 0", "Yakuza0.exe") val file = StoreGameSidecar.file(folder) @@ -64,5 +79,6 @@ class AddedGamesStoreScanTest { val listing = AddedGames.writeListing(app, games).readText() assertTrue(listing.contains("\"name\":\"Celeste\"")) assertTrue(listing.contains(StoreLaunch.LAUNCHER)) + assertTrue(listing.contains("\"store\":\"${Store.EPIC.id}\"")) } } diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesTest.kt index 244f66373f..b42748f182 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/AddedGamesTest.kt @@ -19,7 +19,6 @@ class AddedGamesTest { "\"AppState\"\n{\n\t\"appid\"\t\t\"17410\"\n\t\"installdir\"\t\t\"Mirrors Edge\"\n}\n", ) assertEquals(setOf("monster_hunter_stories_3_twisted_reflection", "mirrors edge"), AddedGames.steamInstallDirs(common)) - // Loose game folders at the library root are never Steam's. assertEquals(emptySet<String>(), AddedGames.steamInstallDirs(library)) } } diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/DependencyDetectorTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/DependencyDetectorTest.kt new file mode 100644 index 0000000000..b3d6acd582 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/frontend/DependencyDetectorTest.kt @@ -0,0 +1,18 @@ +package com.droiddeck.launcher.frontend + +import java.io.File +import org.junit.Assert.assertEquals +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder + +class DependencyDetectorTest { + @get:Rule val tmp = TemporaryFolder() + + @Test fun foldersAboveTheGameDoNotChangeWhatIsFound() { + val folder = File(tmp.newFolder("Games 2005", "agility"), "Game") + File(folder, "_CommonRedist/vcredist/2013").mkdirs() + File(folder, "_CommonRedist/vcredist/2013/vcredist_x64.exe").writeText("x") + assertEquals(listOf("vcredist2013"), DependencyDetector.detect(folder).map { it.componentName }) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/GameFileSyncTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/GameFileSyncTest.kt index 09245502af..a4e3b00283 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/GameFileSyncTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/GameFileSyncTest.kt @@ -30,7 +30,6 @@ class GameFileSyncTest { assertEquals("8400", File(folder, "Geometry Wars.steam").readText()) assertEquals(folder.path, GameFileSync.folder(context)) assertEquals(1, folder.listFiles()!!.count { it.extension == GameFiles.EXTENSION }) - // An unavailable source must leave the existing export intact. val unavailable = File(steamapps.parentFile, "steamapps-unavailable") assertTrue(steamapps.renameTo(unavailable)) assertThrows(IllegalStateException::class.java) { GameFileSync.syncConfigured(context) } @@ -38,11 +37,9 @@ class GameFileSyncTest { assertTrue(unavailable.renameTo(steamapps)) GameFileSync.syncConfigured(context) assertTrue(File(folder, "Geometry Wars.steam").exists()) - // A genuine uninstall removes the owned export at the next tick. assertTrue(manifest.delete()) GameFileSync.syncConfigured(context) assertEquals(0, folder.listFiles()!!.count { it.extension == GameFiles.EXTENSION }) - // Disabled sync does not write files for new installs. GameFileSync.disable(context) manifest.writeText("\"name\" \"Geometry Wars\"\n\"StateFlags\" \"4\"") GameFileSync.syncConfigured(context) diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/GameFilesTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/GameFilesTest.kt index 8bf61b338d..d37689e295 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/GameFilesTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/GameFilesTest.kt @@ -38,7 +38,6 @@ class GameFilesTest { val provider = LaunchFileProvider(file) provider.attachInfo(context, android.content.pm.ProviderInfo().apply { authority = "frontend" }) ShadowContentResolver.registerProviderInternal("frontend", provider) - // Providers often give opaque document IDs with no filename extension. val uri = Uri.parse("content://frontend/document/opaque%3A42") assertEquals("18446744073709551615", GameFiles.readIntent(context, Intent(Intent.ACTION_VIEW, uri))) } diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/GameIdentifierTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/GameIdentifierTest.kt index 9f6a6820bd..f7ddc02125 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/GameIdentifierTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/GameIdentifierTest.kt @@ -9,18 +9,13 @@ import org.junit.Test import org.junit.rules.TemporaryFolder import java.io.File -/** - * Signal-chain coverage for [GameIdentifier]. Pure JVM: builds - * fake game layouts in a temp dir and asserts the right appId/name/source/confidence come back. - * The PE version-resource path is exercised on-device (real .exe), not here. - */ class GameIdentifierTest { @get:Rule val tmp = TemporaryFolder() private fun exeIn(dir: File, name: String = "game.exe"): File = - File(dir, name).apply { parentFile?.mkdirs(); writeBytes(byteArrayOf(0x4D, 0x5A)) } // "MZ" — not a real PE + File(dir, name).apply { parentFile?.mkdirs(); writeBytes(byteArrayOf(0x4D, 0x5A)) } @Test fun steamAppIdTxt_besideExe_givesHighConfidenceAppId() { @@ -51,7 +46,6 @@ class GameIdentifierTest { @Test fun steamManifestAcf_matchedByInstalldir_givesAppIdAndName() { - // steamapps/common/Palworld/Pal/Binaries/Win64/Palworld-Win64-Shipping.exe val steamapps = tmp.newFolder("steamapps") File(steamapps, "appmanifest_1623730.acf").writeText( """ @@ -63,7 +57,6 @@ class GameIdentifierTest { } """.trimIndent() ) - // a decoy manifest that must NOT win File(steamapps, "appmanifest_570.acf").writeText( """"AppState" { "appid" "570" "name" "Dota 2" "installdir" "dota 2 beta" }""" ) @@ -81,9 +74,6 @@ class GameIdentifierTest { """{"gameId":"1207658691","name":"The Witcher 3: Wild Hunt","version":1}""" ) val id = GameIdentifier.identify(exeIn(dir)) - // normalizeName() deliberately converts ":" to " - " (a colon is illegal in a Windows - // filename), so the identified name never carries one. The test asserted the raw GOG - // string and had never passed. assertEquals("The Witcher 3 - Wild Hunt", id.name) assertEquals("1207658691", id.gogId) assertNull(id.appId) @@ -103,7 +93,6 @@ class GameIdentifierTest { @Test fun noMarkers_fallsBackToCleanedFolderName_forEngineBinary() { - // UE shipping binary → the folder name is the real title, exe basename is noise. val dir = tmp.newFolder("Hades") val id = GameIdentifier.identify(exeIn(dir, "Hades-Win64-Shipping.exe")) assertEquals("Hades", id.name) @@ -115,18 +104,16 @@ class GameIdentifierTest { fun fallbackName_stripsRepackTagsAndVersionTokens() { val dir = tmp.newFolder("Stardew Valley [FitGirl Repack] v1.5.4") val id = GameIdentifier.identify(exeIn(dir, "Stardew.exe")) - assertEquals("Stardew", id.name) // exe basename wins (not an engine binary); folder tags irrelevant here - // and a repack-style exe basename is cleaned too: + assertEquals("Stardew", id.name) val id2 = GameIdentifier.identify(exeIn(tmp.newFolder("g2"), "Game.CODEX.exe")) assertEquals(GameIdentifier.Source.FILENAME, id2.source) } @Test fun fltIni_gameSettingsAppId_isParsed() { - // Real God of War (FLT release) layout: flt.ini holds the appid under [GameSettings]. val dir = tmp.newFolder("GodOfWar") File(dir, "flt.ini").writeText("[GameSettings]\nAppId=1593500\nUserName=X\nBuildId=7969425\n") - File(dir, "settings.ini").writeText("[Settings]\nVideoDevice=Wrapper\nMonitor=0\n") // no AppId -> ignored + File(dir, "settings.ini").writeText("[Settings]\nVideoDevice=Wrapper\nMonitor=0\n") val id = GameIdentifier.identify(exeIn(dir, "GoW.exe")) assertEquals(1593500, id.appId) assertEquals(GameIdentifier.Confidence.HIGH, id.confidence) @@ -141,12 +128,10 @@ class GameIdentifierTest { @Test fun bestName_prefersFileDescriptionWhenProductNameIsAbbreviation() { - // God of War ships ProductName "GoW" but FileDescription "God of War". assertEquals( "God of War", PeVersionInfo.bestName(mapOf("ProductName" to "GoW", "FileDescription" to "God of War")), ) - // Normal case: ProductName is the full title -> keep it. assertEquals( "Cyberpunk 2077", PeVersionInfo.bestName(mapOf("ProductName" to "Cyberpunk 2077", "FileDescription" to "Cyberpunk 2077")), @@ -156,18 +141,15 @@ class GameIdentifierTest { @Test fun name_isNormalizedToBeFilesystemSafeAndTidy() { - // Colon → " - " (would otherwise be sanitized to '_' by the shortcut writer). val d1 = tmp.newFolder("ds") File(d1, "goggame-1.info").writeText("""{"name":"Dark Souls: Remastered"}""") assertEquals("Dark Souls - Remastered", GameIdentifier.identify(exeIn(d1)).name) - // Trademark marks (symbol and text forms) stripped. val d2 = tmp.newFolder("gow2") File(d2, "goggame-2.info").writeText("""{"name":"God of War™"}""") assertEquals("God of War", GameIdentifier.identify(exeIn(d2)).name) val d3 = tmp.newFolder("ds3") File(d3, "goggame-3.info").writeText("""{"name":"DARK SOULS(TM): REMASTERED"}""") assertEquals("DARK SOULS - REMASTERED", GameIdentifier.identify(exeIn(d3)).name) - // Trailing PE descriptors dropped (DiRT 3's FileDescription is "DiRT 3 Executable"). val d4 = tmp.newFolder("dirt") File(d4, "goggame-4.info").writeText("""{"name":"DiRT 3 Executable"}""") assertEquals("DiRT 3", GameIdentifier.identify(exeIn(d4)).name) @@ -175,8 +157,6 @@ class GameIdentifierTest { @Test fun launcherExe_prefersFolderName_overLauncher() { - // GTA V Enhanced: user picks the Rockstar launcher PlayGTAV.exe (no Steam id, PE = junk on - // a real exe). Fallback must use the folder title, not "PlayGTAV". val dir = tmp.newFolder("Grand Theft Auto V Enhanced") val id = GameIdentifier.identify(exeIn(dir, "PlayGTAV.exe")) assertEquals("Grand Theft Auto V Enhanced", id.name) @@ -187,12 +167,11 @@ class GameIdentifierTest { fun launcherExe_withSeparator_prefersFolder_andStripsSiteTag() { val dir = tmp.newFolder("Grand-Theft-Auto-IV-AnkerGames") val id = GameIdentifier.identify(exeIn(dir, "Play - GTA IV.exe")) - assertEquals("Grand Theft Auto IV", id.name) // "AnkerGames" site tag stripped + assertEquals("Grand Theft Auto IV", id.name) } @Test fun nonLauncherExe_startingWithPlay_keepsItsOwnName() { - // "PlayerUnknown" must NOT be treated as a launcher (would wrongly use the folder name). val dir = tmp.newFolder("SomeInstallFolder") val id = GameIdentifier.identify(exeIn(dir, "PlayerUnknown.exe")) assertEquals("PlayerUnknown", id.name) @@ -211,8 +190,7 @@ class GameIdentifierTest { @Test fun emptyWhenNothingIdentifiable() { val dir = tmp.newFolder("x") - val id = GameIdentifier.identify(exeIn(dir, "Game.exe")) // engine-ish base → folder "x" - // "x" is a valid (if useless) fallback name; the point is it must not crash and appId is null. + val id = GameIdentifier.identify(exeIn(dir, "Game.exe")) assertNull(id.appId) assertTrue(id.confidence == GameIdentifier.Confidence.LOW) } diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/GameShortcutsIconTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/GameShortcutsIconTest.kt new file mode 100644 index 0000000000..7f7f2b2b5d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/frontend/GameShortcutsIconTest.kt @@ -0,0 +1,66 @@ +package com.droiddeck.launcher.frontend + +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.Paint +import java.io.File +import java.nio.file.Files +import org.junit.Assert.assertEquals +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import org.robolectric.annotation.GraphicsMode + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33], manifest = Config.NONE) +@GraphicsMode(GraphicsMode.Mode.NATIVE) +class GameShortcutsIconTest { + private lateinit var dir: File + + @Before fun setUp() { + dir = Files.createTempDirectory("shortcut-icons").toFile() + } + + @Test fun aSmallSteamIconGivesWayToTheMiddleOfTheCoverArt() { + val icon = image("icon.png", 32, 32, Color.GREEN) + val cover = image("cover.png", 300, 450, Color.BLUE, band = 75, bandColor = Color.RED) + val bitmap = GameShortcuts.iconBitmap(game(icon = icon, art = cover))!! + assertEquals(300, bitmap.width) + assertEquals(300, bitmap.height) + assertEquals(Color.BLUE, bitmap.getPixel(0, 0)) + assertEquals(Color.BLUE, bitmap.getPixel(299, 299)) + } + + @Test fun anIconLargeEnoughForTheHomeScreenIsKept() { + val icon = image("icon.png", 256, 256, Color.GREEN) + val cover = image("cover.png", 300, 450, Color.BLUE) + val bitmap = GameShortcuts.iconBitmap(game(icon = icon, art = cover))!! + assertEquals(256, bitmap.width) + assertEquals(Color.GREEN, bitmap.getPixel(128, 128)) + } + + @Test fun theSmallIconIsStillUsedWhenThereIsNoArt() { + val icon = image("icon.png", 32, 32, Color.GREEN) + val bitmap = GameShortcuts.iconBitmap(game(icon = icon, art = null))!! + assertEquals(32, bitmap.width) + assertEquals(Color.GREEN, bitmap.getPixel(16, 16)) + } + + private fun game(icon: File?, art: File?) = + Library.SteamGame(appId = 17480, name = "Game", art = art, library = "test", icon = icon) + + private fun image(name: String, width: Int, height: Int, color: Int, band: Int = 0, bandColor: Int = color): File { + val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) + val canvas = Canvas(bitmap) + canvas.drawColor(color) + if (band > 0) { + val paint = Paint().apply { this.color = bandColor } + canvas.drawRect(0f, 0f, width.toFloat(), band.toFloat(), paint) + canvas.drawRect(0f, (height - band).toFloat(), width.toFloat(), height.toFloat(), paint) + } + return File(dir, name).also { file -> file.outputStream().use { bitmap.compress(Bitmap.CompressFormat.PNG, 100, it) } } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/GamesFolderMigrationTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/GamesFolderMigrationTest.kt index 1d81b1af42..eb101d293c 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/GamesFolderMigrationTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/GamesFolderMigrationTest.kt @@ -16,7 +16,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config -/** Games folders from earlier builds become entries, every game keeping what it had. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class GamesFolderMigrationTest { @@ -40,7 +39,6 @@ class GamesFolderMigrationTest { StoreGameSidecar.file(store).writeText("""{"store":"gog","id":"1","title":"Store Game","exe":"Store.exe"}""") File(pc, "Notes").mkdirs() SessionPrefs.setAddedGamesDirs(app, listOf(pc.path)) - // What earlier scans had kept, by folder. SessionPrefs.setAddedGameExe(app, beta.path, pick.path) SessionPrefs.addedGameAppId(app, alpha.path, 0x8123_4567L) SessionPrefs.addedGameAppId(app, beta.path, 0x8765_4321L) @@ -63,11 +61,9 @@ class GamesFolderMigrationTest { assertEquals(0x8765_4321L, games.getValue(beta.path).appId) assertEquals("Alpha GOTY", games.getValue(alpha.path).name) assertEquals(pick.path, games.getValue(beta.path).exe.path) - // The same path inside the session as before: the shortcut keeps its target. assertEquals(AddedGames.GUEST_DIR + "/PC/Alpha/Alpha.exe", games.getValue(alpha.path).guestExe) assertEquals(AddedGames.GUEST_DIR + "/PC/Beta/bin/Beta64.exe", games.getValue(beta.path).guestExe) assertTrue(SessionPrefs.removedAddedGames(app).contains(gone.path)) - // Not a library any more. assertTrue(GameStorage.gamesFolderLibraries(app).isEmpty()) } diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/LibraryArchTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/LibraryArchTest.kt new file mode 100644 index 0000000000..d3a230a813 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/frontend/LibraryArchTest.kt @@ -0,0 +1,25 @@ +package com.droiddeck.launcher.frontend + +import com.droiddeck.launcher.session.SessionPrefs +import java.io.File +import org.junit.Assert.assertEquals +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class LibraryArchTest { + private val app get() = RuntimeEnvironment.getApplication() + + @Test fun aScanReadsTheClientItWasGivenNotTheSelectedOne() { + SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "") + SessionPrefs.setSteamClientArch(app, "arm64") + val apps = File(SessionPrefs.steamRoot(app, "x86_64"), "steamapps").apply { mkdirs() } + File(apps, "appmanifest_440.acf").writeText("\"AppState\"\n{\n\t\"appid\"\t\t\"440\"\n\t\"name\"\t\t\"Team Fortress 2\"\n\t\"StateFlags\"\t\t\"4\"\n}\n") + assertEquals(listOf("Team Fortress 2"), Library.launchableGames(app, added = emptyList(), arch = "x86_64").map { it.name }) + assertEquals(emptyList<String>(), Library.launchableGames(app, added = emptyList(), arch = "arm64").map { it.name }) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/LibraryCacheClientTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/LibraryCacheClientTest.kt new file mode 100644 index 0000000000..40570d9e46 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/frontend/LibraryCacheClientTest.kt @@ -0,0 +1,39 @@ +package com.droiddeck.launcher.frontend + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class LibraryCacheClientTest { + private val app get() = RuntimeEnvironment.getApplication() + private val games = listOf(Library.SteamGame(440, "Team Fortress 2", null, "Steam library")) + + @Test fun aCacheFromBeforeTheClientWasRecordedIsArm64s() { + java.io.File(app.filesDir, "library-cache.json").writeText("""[{"appId":440,"name":"Team Fortress 2","library":"Steam library","gameId":440}]""") + val (games, x64) = LibraryCache.snapshot(app) + assertEquals(listOf("Team Fortress 2"), games.map { it.name }) + assertFalse(x64) + } + + @Test fun theListAndItsClientAreOneFile() { + LibraryCache.save(app, games, x64 = true) + assertEquals(listOf("library-cache.json"), app.filesDir.list().orEmpty().filter { it.startsWith("library-cache") }) + assertEquals(listOf("Team Fortress 2") to true, LibraryCache.snapshot(app).let { (g, x) -> g.map { it.name } to x }) + } + + @Test fun theListsClientIsKeptUntilAListForAnotherIsSaved() { + LibraryCache.save(app, games, x64 = true) + assertTrue(LibraryCache.listedX64(app)) + LibraryCache.save(app, emptyList()) + assertTrue(LibraryCache.listedX64(app)) + LibraryCache.save(app, games, x64 = false) + assertFalse(LibraryCache.listedX64(app)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/LibraryFromSteamClientTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/LibraryFromSteamClientTest.kt new file mode 100644 index 0000000000..dacd004f01 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/frontend/LibraryFromSteamClientTest.kt @@ -0,0 +1,15 @@ +package com.droiddeck.launcher.frontend + +import org.junit.Assert.assertEquals +import org.junit.Test + +class LibraryFromSteamClientTest { + @Test fun onlyTheClientsOwnInstallsAreDroppedOnASwitch() { + val games = listOf( + Library.SteamGame(440, "Team Fortress 2", null, "Steam library"), + Library.SteamGame(1, "God of War", null, Library.ADDED, gameId = 9_000_000_001L), + Library.SteamGame(2, "Store game", null, "Games", gameId = 9_000_000_002L, source = "gog"), + ) + assertEquals(listOf("God of War", "Store game"), games.filterNot(Library::fromSteamClient).map { it.name }) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/LogoPositionTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/LogoPositionTest.kt new file mode 100644 index 0000000000..2fecb6503a --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/frontend/LogoPositionTest.kt @@ -0,0 +1,51 @@ +package com.droiddeck.launcher.frontend + +import org.json.JSONObject +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class LogoPositionTest { + @Test fun steamsOwnJsonIsReadAndWrittenBack() { + val steam = """{"nVersion":1,"logoPosition":{"pinnedPosition":"BottomLeft","nWidthPct":50,"nHeightPct":50}}""" + assertEquals(LogoPosition.DEFAULT, LogoPosition.parse(steam)) + assertEquals(LogoPosition.DEFAULT, LogoPosition.parse(LogoPosition.toJson(LogoPosition.DEFAULT).toString())) + } + + @Test fun everyPinKeepsItsSteamName() { + for (pin in LogoPosition.Pin.values()) { + val json = LogoPosition.toJson(LogoPosition.sized(pin, 40)) + assertEquals(pin.steam, json.getJSONObject("logoPosition").getString("pinnedPosition")) + assertEquals(pin, LogoPosition.parse(json)?.pin) + } + assertEquals(setOf("BottomLeft", "UpperLeft", "CenterCenter", "UpperCenter", "BottomCenter"), LogoPosition.Pin.values().map { it.steam }.toSet()) + } + + @Test fun sizesAreKeptInsideTheRange() { + assertEquals(LogoPosition.MAX_PCT, LogoPosition.sized(LogoPosition.Pin.CENTER, 400).widthPct) + assertEquals(LogoPosition.MIN_PCT, LogoPosition.sized(LogoPosition.Pin.CENTER, 0).heightPct) + val wild = """{"logoPosition":{"pinnedPosition":"CenterCenter","nWidthPct":900,"nHeightPct":-4}}""" + assertEquals(LogoPosition.Value(LogoPosition.Pin.CENTER, LogoPosition.MAX_PCT, LogoPosition.MIN_PCT), LogoPosition.parse(wild)) + } + + @Test fun somethingThatIsNotAPositionIsNotOne() { + assertNull(LogoPosition.parse("not json")) + assertNull(LogoPosition.parse("{}")) + assertNull(LogoPosition.parse("""{"logoPosition":{"pinnedPosition":"Nowhere","nWidthPct":5,"nHeightPct":5}}""")) + assertNull(LogoPosition.parse("""{"logoPosition":{"pinnedPosition":"CenterCenter"}}""")) + } + + @Test fun clearingKeepsForeignKeysAndEmptiesAJsonThatHeldNothingElse() { + val mixed = LogoPosition.toJson(LogoPosition.DEFAULT, JSONObject().put("other", 1)) + val kept = LogoPosition.without(mixed) + assertNotNull(kept) + assertEquals(1, kept!!.getInt("other")) + assertNull(LogoPosition.without(LogoPosition.toJson(LogoPosition.DEFAULT))) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/SteamGameArtTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/SteamGameArtTest.kt new file mode 100644 index 0000000000..63c403dd4f --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/frontend/SteamGameArtTest.kt @@ -0,0 +1,65 @@ +package com.droiddeck.launcher.frontend + +import com.droiddeck.launcher.session.SessionPrefs +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class SteamGameArtTest { + private val app get() = RuntimeEnvironment.getApplication() + @get:Rule val tmp = TemporaryFolder() + + @Before fun noGamesFolders() { + AddedGamesPublisher.now = true + SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "") + SessionPrefs.setAddedGamesDirs(app, emptyList()) + } + + private fun game(art: File? = null) = Library.SteamGame(620, "Portal 2", art, "Steam library") + + private fun image(name: String) = File(tmp.root, name).apply { writeBytes(ByteArray(8)) } + + @Test fun aChosenImageReplacesTheCoverAndResetBringsBackSteams() { + val stock = image("stock.jpg") + val picked = image("mine.png") + val option = AddedGameArt.Option(AddedGameArt.FILE, picked.path, picked.path) + assertTrue(SteamGameArt.choose(app, game(stock), AddedGameArt.Slot.COVER, option)) + + val shown = SteamGameArt.withOverrides(app, game(stock)) + assertTrue(shown.art!!.name.matches(Regex("chosen-p-\\d+\\.png"))) + val states = SteamGameArt.describe(app, game(stock)) + assertTrue(states.first { it.slot == AddedGameArt.Slot.COVER }.chosen) + assertFalse(states.first { it.slot == AddedGameArt.Slot.BACKGROUND }.chosen) + assertEquals(picked.path, SteamGameArt.chosenSource(app, 620, AddedGameArt.Slot.COVER).second) + + SteamGameArt.reset(app, game(stock), AddedGameArt.Slot.COVER) + assertEquals(stock, SteamGameArt.withOverrides(app, game(stock)).art) + assertNull(SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)) + assertEquals("", SteamGameArt.chosenSource(app, 620, AddedGameArt.Slot.COVER).first) + } + + @Test fun aGameWithoutChoicesIsLeftAsItIs() { + val g = game(image("stock.jpg")) + assertTrue(SteamGameArt.withOverrides(app, g) === g) + } + + @Test fun aChoiceForOneGameDoesNotTouchAnother() { + val picked = image("mine.png") + SteamGameArt.choose(app, game(), AddedGameArt.Slot.BACKGROUND, AddedGameArt.Option(AddedGameArt.FILE, picked.path, picked.path)) + val other = Library.SteamGame(730, "Counter-Strike 2", null, "Steam library") + assertTrue(SteamGameArt.withOverrides(app, other) === other) + assertTrue(SteamGameArt.withOverrides(app, game()).hero!!.name.startsWith("chosen-hero")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/SteamGridTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/SteamGridTest.kt new file mode 100644 index 0000000000..cc243e7438 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/frontend/SteamGridTest.kt @@ -0,0 +1,241 @@ +package com.droiddeck.launcher.frontend + +import com.droiddeck.launcher.runtime.LinuxRuntime +import com.droiddeck.launcher.session.SessionPrefs +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class SteamGridTest { + private val app get() = RuntimeEnvironment.getApplication() + @get:Rule val tmp = TemporaryFolder() + private lateinit var grid: File + + @Before fun account() { + AddedGamesPublisher.now = true + SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "") + SessionPrefs.setAddedGamesDirs(app, emptyList()) + grid = File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config/grid") + } + + private fun game() = Library.SteamGame(620, "Portal 2", null, "Steam library") + private fun target() = SteamGrid.target(game(), app) + private fun image(name: String, size: Int) = File(tmp.root, name).apply { writeBytes(ByteArray(size) { 1 }) } + + @Test fun aChoiceIsPlacedInTheGridFolderWhileSteamIsClosed() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val picked = image("mine.png", 12) + SteamGameArt.choose(app, game(), AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, picked.path, picked.path)) + assertEquals(12L, File(grid, "620p.png").length()) + + SteamGameArt.reset(app, game(), AddedGameArt.Slot.COVER) + assertFalse(File(grid, "620p.png").exists()) + } + + @Test fun aWideCoverGoesToTheUnsuffixedGridFileAndComesBackFromSteam() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val picked = image("wide.png", 14) + assertTrue(SteamGameArt.choose(app, game(), AddedGameArt.Slot.WIDE, AddedGameArt.Option(AddedGameArt.FILE, picked.path, picked.path))) + assertEquals(14L, File(grid, "620.png").length()) + assertFalse(File(grid, "620p.png").exists()) + assertTrue(SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.WIDE)!!.name.matches(Regex("chosen-header-\\d+\\.png"))) + assertNull(SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)) + + File(grid, "620.png").delete() + assertTrue(SteamGrid.sync(app, listOf(target()))) + assertNull(SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.WIDE)) + } + + private val corner = LogoPosition.Value(LogoPosition.Pin.UPPER_CENTER, 35, 35) + + @Test fun aLogoPositionIsWrittenToSteamsJsonKeepingWhatElseIsInIt() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + grid.mkdirs() + File(grid, "620.json").writeText("""{"nVersion":1,"other":"kept"}""") + assertTrue(SteamGameArt.setPosition(app, game(), corner)) + val written = org.json.JSONObject(File(grid, "620.json").readText()) + assertEquals("kept", written.getString("other")) + assertEquals(corner, LogoPosition.parse(written)) + assertEquals(corner, SteamGameArt.position(app, game())) + + assertTrue(SteamGameArt.setPosition(app, game(), null)) + val left = org.json.JSONObject(File(grid, "620.json").readText()) + assertFalse(left.has("logoPosition")) + assertEquals("kept", left.getString("other")) + assertNull(SteamGameArt.position(app, game())) + } + + @Test fun aLogoPositionAloneLeavesNoFileBehindWhenCleared() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + assertTrue(SteamGameArt.setPosition(app, game(), corner)) + assertEquals(corner, LogoPosition.parse(File(grid, "620.json").readText())) + assertTrue(SteamGameArt.setPosition(app, game(), null)) + assertFalse(File(grid, "620.json").exists()) + } + + @Test fun aLogoPositionSetInSteamIsTakenOverAndRemovingItDropsIt() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + grid.mkdirs() + val theirs = File(grid, "620.json").apply { writeText(LogoPosition.toJson(corner).toString()) } + SteamGrid.sync(app, listOf(target())) + assertEquals(corner, SteamGameArt.position(app, game())) + + theirs.writeText(LogoPosition.toJson(LogoPosition.Value(LogoPosition.Pin.CENTER, 80, 80)).toString()) + theirs.setLastModified(theirs.lastModified() + 5000) + SteamGrid.sync(app, listOf(target())) + assertEquals(LogoPosition.Pin.CENTER, SteamGameArt.position(app, game())?.pin) + + theirs.delete() + SteamGrid.sync(app, listOf(target())) + assertNull(SteamGameArt.position(app, game())) + } + + @Test fun aLogoPositionChosenHereIsNotTakenBackAsASteamChange() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + assertTrue(SteamGameArt.setPosition(app, game(), corner)) + SteamGrid.sync(app, listOf(target())) + assertEquals(corner, SteamGameArt.position(app, game())) + assertEquals(corner, LogoPosition.parse(File(grid, "620.json").readText())) + } + + @Test fun aLogoPositionWithoutSteamAccountIsStillKeptHere() { + assertTrue(SteamGameArt.setPosition(app, game(), corner)) + assertEquals(corner, SteamGameArt.position(app, game())) + } + + @Test fun artSetInSteamIsTakenOverAndRemovingItInSteamDropsIt() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + grid.mkdirs() + val theirs = File(grid, "620_hero.jpg").apply { writeBytes(ByteArray(20) { 2 }) } + assertTrue(SteamGrid.sync(app, listOf(target()))) + assertEquals(20L, SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.BACKGROUND)?.length()) + assertEquals(AddedGameArt.STEAM, SteamGameArt.chosenSource(app, 620, AddedGameArt.Slot.BACKGROUND).first) + assertFalse(SteamGrid.sync(app, listOf(target()))) + + theirs.delete() + assertTrue(SteamGrid.sync(app, listOf(target()))) + assertNull(SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.BACKGROUND)) + } + + @Test fun theOtherClientsEmptyGridGetsTheChoiceInsteadOfDroppingIt() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val picked = image("mine.png", 12) + SteamGameArt.choose(app, game(), AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, picked.path, picked.path)) + assertFalse(SteamGrid.sync(app, listOf(target()))) + + val x64 = File(SessionPrefs.steamRoot(app, "x86_64"), "userdata/123/config").apply { mkdirs() } + SessionPrefs.setSteamClientArch(app, "x86_64") + assertFalse(SteamGrid.sync(app, listOf(target()))) + assertEquals(12L, SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)?.length()) + assertEquals(12L, File(x64, "grid/620p.png").length()) + + SessionPrefs.setSteamClientArch(app, "arm64") + assertFalse(SteamGrid.sync(app, listOf(target()))) + assertEquals(12L, File(grid, "620p.png").length()) + } + + @Test fun aChoiceMadeHereIsNotTakenBackAsASteamChange() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val picked = image("mine.png", 12) + SteamGameArt.choose(app, game(), AddedGameArt.Slot.LOGO, AddedGameArt.Option(AddedGameArt.FILE, picked.path, picked.path)) + File(grid, "620_logo.png").writeBytes(picked.readBytes()) + assertFalse(SteamGrid.sync(app, listOf(target()))) + assertEquals(AddedGameArt.FILE, SteamGameArt.chosenSource(app, 620, AddedGameArt.Slot.LOGO).first) + } + + @Test fun artDroidDeckPlacedItselfIsNotTakenAsAChoice() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + grid.mkdirs() + File(grid, "620p.png").writeBytes(ByteArray(7)) + File(grid, ".droiddeck-art.json").writeText("""{"620p.png": 7}""") + assertFalse(SteamGrid.sync(app, listOf(target()))) + assertNull(SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)) + } + + @Test fun withoutASteamAccountNothingHappens() { + assertFalse(SteamGrid.sync(app, listOf(target()))) + } + + @Test fun aSteamImageAlreadyThereIsKeptOverAnOlderChoiceOnTheFirstLook() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val old = image("old.png", 5) + val dir = SteamGameArt.dir(app, 620) + assertTrue(AddedGameArt.store(dir, AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, old.path, old.path))) + grid.mkdirs() + File(grid, "620p.png").writeBytes(ByteArray(30) { 3 }) + assertTrue(SteamGrid.sync(app, listOf(target()))) + assertEquals(30L, SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)?.length()) + assertEquals(30L, File(grid, "620p.png").length()) + } + + @Test fun aChoiceSurvivesWhenOnlyDroidDecksOwnWriterFileIsInTheFolder() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val picked = image("mine.png", 12) + SteamGameArt.choose(app, game(), AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, picked.path, picked.path)) + File(grid, "620p.png").writeBytes(ByteArray(12) { 9 }) + File(grid, ".droiddeck-art.json").writeText("""{"620p.png": 12}""") + assertFalse(SteamGrid.sync(app, listOf(target()))) + assertEquals(12L, SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)?.length()) + } + + @Test fun anImageSteamCannotReadIsNotWrittenAndTheCurrentOneStays() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val png = image("mine.png", 12) + SteamGameArt.choose(app, game(), AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, png.path, png.path)) + val ico = image("mine.ico", 6) + SteamGrid.write(app, target(), AddedGameArt.Slot.COVER, ico) + assertEquals(12L, File(grid, "620p.png").length()) + assertFalse(File(grid, "620p.ico").exists()) + } + + @Test fun aChoiceSteamCannotReadIsRefusedAndNotKept() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val ico = image("mine.ico", 6) + assertFalse(SteamGameArt.choose(app, game(), AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, ico.path, ico.path))) + assertNull(SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)) + } + + @Test fun aStaleFileLeftByAnEarlierFailedWriteIsReplacedByTheLocalChoice() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val picked = image("mine.png", 12) + SteamGameArt.choose(app, game(), AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, picked.path, picked.path)) + SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)!!.writeBytes(ByteArray(15) { 4 }) + assertFalse(SteamGrid.sync(app, listOf(target()))) + assertEquals(15L, File(grid, "620p.png").length()) + } + + @Test fun aRefusedReplacementLeavesTheLastGoodChoiceInPlace() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val png = image("mine.png", 12) + assertTrue(SteamGameArt.choose(app, game(), AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, png.path, png.path))) + val kept = SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER) + val ico = image("mine.ico", 6) + assertFalse(SteamGameArt.choose(app, game(), AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, ico.path, ico.path))) + assertEquals(kept, SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)) + assertEquals(12L, File(grid, "620p.png").length()) + } + + @Test fun choicesMadeInTheSameMillisecondGetDifferentNamesAndTheLastOneWins() { + File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs() + val dir = SteamGameArt.dir(app, 620) + val names = (1..5).map { n -> + val image = image("pick$n.png", n) + AddedGameArt.storeNew(dir, AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, image.path, image.path))!!.name + } + assertEquals(5, names.toSet().size) + assertEquals(names.sorted(), names) + assertEquals(5L, AddedGameArt.chosen(dir, AddedGameArt.Slot.COVER)?.length()) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/SteamPicsTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/SteamPicsTest.kt index 60c6b96c59..aa05b1b7aa 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/SteamPicsTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/SteamPicsTest.kt @@ -17,13 +17,11 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config -/** Steam's app info asked anonymously: the answer read, batched, kept, and asked only when needed. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class SteamPicsTest { private val app get() = RuntimeEnvironment.getApplication() - /** Dragon's Dogma 2's app info as Steam's anonymous PICS answer carried it (recorded 2026-10-10). */ private val recorded: String get() = javaClass.classLoader!!.getResource("steam-pics/app_2054970.vdf")!!.readText() @After fun tearDown() { SteamAppInfo.pics = { SteamPics.lookup(it) } } @@ -32,7 +30,6 @@ class SteamPicsTest { val info = SteamPics.infoFromKeyValues(recorded)!! assertEquals("Dragon's Dogma 2", info.name) assertEquals(listOf("228988"), info.sharedDepots) - // VC++ 2019 for the Windows components. assertEquals(listOf("vcredist2019_dll" to "VC++ 2019"), WinCompSources.steamDepots(info.sharedDepots)) } @@ -66,11 +63,9 @@ class SteamPicsTest { val calls = ArrayList<List<Int>>() SteamAppInfo.pics = { ids -> calls.add(ids); mapOf(2054970 to SteamPics.infoFromKeyValues(recorded), 7 to null) } assertTrue(SteamAppInfo.lookup(app, listOf(2054970, 7))) - // One connection for both. assertEquals(listOf(listOf(2054970, 7)), calls) assertEquals(listOf("228988"), SteamAppInfo.info(app, 2054970)!!.sharedDepots) assertNull(SteamAppInfo.info(app, 7)) - // Kept: nothing asked again (the miss waits a week). assertFalse(SteamAppInfo.lookup(app, listOf(2054970, 7))) assertEquals(1, calls.size) assertEquals("hit", SteamAppInfo.state(app, 2054970)) @@ -78,7 +73,6 @@ class SteamPicsTest { } @Test fun noNetworkWhenTheClientsCacheHasTheApp() { - // An appinfo.vdf with the app in it (built as in WinCompSourcesTest). val file = SteamAppInfo.appinfoFile(app) WinCompSourcesTest.writeAppinfo(file, 1145360) SteamAppInfo.pics = { fail("asked Steam"); null } diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/StoreGameArtTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/StoreGameArtTest.kt new file mode 100644 index 0000000000..a0e84775d8 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/frontend/StoreGameArtTest.kt @@ -0,0 +1,56 @@ +package com.droiddeck.launcher.frontend + +import com.droiddeck.launcher.session.SessionPrefs +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreGameSidecar +import com.droiddeck.launcher.stores.StoreInstallRoot +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class StoreGameArtTest { + private val app get() = RuntimeEnvironment.getApplication() + @get:Rule val tmp = TemporaryFolder() + + @Before fun setUp() { + AddedGamesPublisher.now = true + SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "") + } + + private fun install(store: Store, id: String, title: String): File { + val folder = File(StoreInstallRoot.storeDir(StoreInstallRoot.installRoot(app), store), StoreInstallRoot.folderName(title, id)) + File(folder, "Game.exe").apply { parentFile!!.mkdirs(); writeText("game") } + StoreGameSidecar(store, id, title, "Game.exe").write(folder) + return folder + } + + @Test fun anArtChoiceOnAStoreGameIsKeptShownAndResetsWithoutTouchingItsTitle() { + for ((store, id, title) in listOf(Triple(Store.GOG, "1207658924", "Heroes III"), Triple(Store.EPIC, "abc", "Celeste"), Triple(Store.AMAZON, "amzn1.x", "Yakuza 0"))) { + val folder = install(store, id, title) + val image = File(tmp.root, "$id.png").apply { writeBytes(ByteArray(9) { 1 }) } + val option = AddedGameArt.Option(AddedGameArt.FILE, image.path, image.path) + + assertTrue(AddedGameEdits.setArt(app, folder.path, AddedGameArt.Slot.COVER, option)) + val game = AddedGames.single(app, folder.path)!! + assertEquals(title, game.name) + assertEquals(store.id, game.source) + val shown = Library.addedGame(app, game) + assertEquals(AddedGameArt.chosen(AddedGameArt.cacheDir(app, game), AddedGameArt.Slot.COVER), shown.art) + assertEquals(9L, shown.art?.length()) + + AddedGameEdits.resetArt(app, folder.path, AddedGameArt.Slot.COVER) + assertNull(AddedGameArt.chosen(AddedGameArt.cacheDir(app, game), AddedGameArt.Slot.COVER)) + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/frontend/WinCompSourcesTest.kt b/app/src/test/java/com/droiddeck/launcher/frontend/WinCompSourcesTest.kt index 476428a907..78ac654454 100644 --- a/app/src/test/java/com/droiddeck/launcher/frontend/WinCompSourcesTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/frontend/WinCompSourcesTest.kt @@ -20,7 +20,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config -/** Each source's list of Windows components, how it maps to the catalog, and what turns on by itself. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class WinCompSourcesTest { @@ -35,7 +34,6 @@ class WinCompSourcesTest { private fun auto(findings: List<WinCompSources.Finding>) = findings.filter { it.auto }.map { it.component to it.origin } - // ---- mapping tables ---- @Test fun gogDependencyIdsMapToComponents() { assertEquals(listOf("vcredist2015"), WinCompSources.gog("MSVC2017_x64")) @@ -62,7 +60,6 @@ class WinCompSourcesTest { assertEquals(listOf("vcredist2015_dll" to "VC++ 2015", "d3dx9" to "DirectX (June 2010)"), WinCompSources.steamDepots(listOf("228986", "228990", "999"))) } - // ---- per source ---- @Test fun steamTakesItsSharedDepotsAndTurnsThemOn() { val steamapps = tmp.newFolder("steamapps") @@ -80,7 +77,6 @@ class WinCompSourcesTest { sidecar(folder, Store.GOG, mapOf(WinCompSources.GOG_DEPENDENCIES to "MSVC2017_x64,DirectX,ISI")) val findings = WinCompSources.forGame(app, game(folder, "gog")) assertEquals(listOf("vcredist2015" to WinCompSources.Origin.GOG, "d3dx9" to WinCompSources.Origin.GOG), auto(findings)) - // ISI is none of ours: a suggestion under its own name. assertEquals(listOf("ISI"), findings.filter { it.component == null }.map { it.original }) } @@ -105,12 +101,10 @@ class WinCompSourcesTest { assertEquals(listOf("Activate.exe"), findings.filter { it.component == null }.map { it.original }) } - // ---- Custom: certainty decides ---- private fun appinfo(file: File, appId: Int) = writeAppinfo(file, appId) companion object { - /** A version 29 appinfo.vdf with one app, whose depots point at two Steamworks Shared ones. */ fun writeAppinfo(file: File, appId: Int) { val strings = listOf("appinfo", "common", "name", "depots", "228986", "depotfromapp", "228990", "1001", "maxsize") fun key(s: String) = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(strings.indexOf(s)).array() @@ -173,7 +167,6 @@ class WinCompSourcesTest { assertEquals(listOf("vcredist2013" to WinCompSources.Origin.FOLDER), findings.map { it.component to it.origin }) } - // ---- what turns on, and the user's switches ---- private fun ready(name: String) = WinComponents.Component(name, "", "", "ready", emptyList(), listOf(WinComponents.Step("override_dll", JSONObject().put("dll", "x").put("type", "native")))) @@ -187,7 +180,6 @@ class WinCompSourcesTest { WinCompSources.Finding("d3dx9", "d3dx9_43.dll", WinCompSources.Origin.FOLDER, false), ) val picks = AutoComponents.autoPicks(findings, catalog) - // The detector's name installs as its DLL twin; physx cannot install; the folder scan only recommends. assertEquals(listOf("vcredist2015_dll"), picks.keys.toList()) assertEquals("GOG", picks.getValue("vcredist2015_dll").kind) } @@ -199,11 +191,9 @@ class WinCompSourcesTest { WinComponents.setUser(app, key, "d3dx9", false) WinComponents.setUser(app, key, "oalinst_dll", true) assertEquals(listOf("xact", "oalinst_dll"), WinComponents.picks(app, key)) - // A new automatic list keeps the user's switches. WinComponents.setAuto(app, key, mapOf("d3dx9" to WinComponents.AutoReason("GOG", listOf("DirectX")))) assertEquals(listOf("oalinst_dll"), WinComponents.picks(app, key)) assertEquals(mapOf("d3dx9" to false, "oalinst_dll" to true), WinComponents.selection(app, key).user) - // What the launch reads stays version 1 with the effective list. val text = File(app.filesDir, "wincomponents.json").readText() assertEquals(1, JSONObject(text).getInt("version")) assertEquals("oalinst_dll", JSONObject(text).getJSONObject("games").getJSONArray(key).getString(0)) @@ -219,10 +209,8 @@ class WinCompSourcesTest { val folder = tmp.newFolder("Shared") val exe = File(folder, "Shared.exe").apply { writeText("x") } val art = AddedGames.Game(folder, "Shared", exe, "/g/Shared.exe", "/g", 0x81234567L, 0L, emptyList()) - // The art fetch finds it by name ... val match = AddedGameArt.steamMatch(app, art) { 4242 } assertEquals(4242, match.appId) - // ... and the components read the same record. assertEquals(4242, SteamMatch.get(app, folder.path)!!.appId) assertEquals(SteamMatch.Certainty.NAME, SteamMatch.get(app, folder.path)!!.certainty) assertFalse(WinCompSources.forGame(app, game(folder, Library.ADDED)).any { it.auto }) @@ -268,7 +256,6 @@ class WinCompSourcesTest { @Test fun aSteamListedComponentNotYetDownloadedTurnsOnWhenItLands() = withFakeWorker { installedNow.add("d3dx9") val game = payback() - // The user had switched one off: it is never downloaded for an automatic pick. WinComponents.setUser(app, "1262580", "vcredist2019_dll", false) AutoComponents.queueGame(app, game, asked = true) assertEquals(listOf("vcredist2013_dll"), downloaded) @@ -276,7 +263,6 @@ class WinCompSourcesTest { assertEquals(setOf("d3dx9", "vcredist2013_dll", "vcredist2019_dll"), sel.auto.keys) assertEquals(setOf("d3dx9", "vcredist2013_dll"), WinComponents.picks(app, "1262580").toSet()) assertEquals("STEAM", sel.auto.getValue("vcredist2013_dll").kind) - // The list is kept for the page. assertEquals(3, AutoComponents.cachedFindings(app, "1262580")!!.count { it.auto }) } @@ -297,7 +283,6 @@ class WinCompSourcesTest { AutoComponents.unfavourable = { true } AutoComponents.queueGame(app, game, asked = false) assertTrue(downloaded.isEmpty()) - // The user opens the page: asked for, it goes. AutoComponents.queueGame(app, game, asked = true) assertEquals(3, downloaded.size) } @@ -311,7 +296,6 @@ class WinCompSourcesTest { assertEquals(listOf("g:1262580"), AutoComponents.queued()) session = false AutoComponents.drain(app) - // Each component once, though two games could want it. assertEquals(downloaded.distinct(), downloaded) } @@ -319,7 +303,6 @@ class WinCompSourcesTest { val game = payback() AutoComponents.online = { false } AutoComponents.queueGame(app, game, asked = true) - // The list is worked out offline; the downloads wait. assertTrue(downloaded.isEmpty()) assertTrue(AutoComponents.queued().all { it.startsWith("c:") }) AutoComponents.online = { true } @@ -327,7 +310,6 @@ class WinCompSourcesTest { assertEquals(3, downloaded.size) } - // ---- older store installs: the list read once from the store ---- @Test fun anOlderGogInstallGetsItsListFromTheStoreOnce() { val folder = tmp.newFolder("DOOM I Enhanced") @@ -338,7 +320,6 @@ class WinCompSourcesTest { try { assertTrue(StoreListBackfill.fill(app, folder)) assertEquals("MSVC2019_x64,DirectX", StoreGameSidecar.read(folder)!!.extra[WinCompSources.GOG_DEPENDENCIES]) - // Kept like a fresh install: not fetched again. assertFalse(StoreListBackfill.fill(app, folder)) assertEquals(1, fetches) assertEquals(listOf("vcredist2019" to WinCompSources.Origin.GOG, "d3dx9" to WinCompSources.Origin.GOG), auto(WinCompSources.forGame(app, game(folder, "gog")))) @@ -377,7 +358,6 @@ class WinCompSourcesTest { AutoComponents.online = { true } assertFalse(StoreListBackfill.fill(app, folder)) assertFalse(StoreListBackfill.fill(app, folder)) - // Signed out or the store refused: once, then a week's rest; the sidecar is untouched. assertEquals(1, fetches) assertTrue(StoreListBackfill.needs(StoreGameSidecar.read(folder)!!)) } finally { @@ -386,16 +366,13 @@ class WinCompSourcesTest { } } - // ---- apps the client never saw ---- @Test fun anAppTheClientLearnsLaterIsReadOnceItsCacheIsWritten() { val file = SteamAppInfo.appinfoFile(app) appinfo(file, 1) file.setLastModified(1_000_000_000_000L) assertEquals(null, SteamAppInfo.info(app, 1145360)) - // Unchanged file: the miss stands (no re-read). assertEquals(null, SteamAppInfo.info(app, 1145360)) - // The client wrote its cache with the app in it: read at once, not a week later. appinfo(file, 1145360) file.setLastModified(1_000_000_100_000L) assertEquals(listOf("228986", "228990"), SteamAppInfo.info(app, 1145360)!!.sharedDepots) @@ -418,7 +395,6 @@ class WinCompSourcesTest { assertTrue(StoreListBackfill.needs(StoreGameSidecar.read(older)!!)) } - // ---- a game installed during the session ---- private fun manifest(dir: File, appId: Int, state: Int, time: Long) = File(dir, "appmanifest_$appId.acf").apply { @@ -431,7 +407,6 @@ class WinCompSourcesTest { manifest(steamapps, 12900, 1026, 1_000_000L) manifest(steamapps, 570, 4, 1_000_000L) val watch = SessionInstalls.Watch { listOf(steamapps) } - // What was there when the session started is not new. assertTrue(watch.poll().isEmpty()) assertTrue(watch.poll().isEmpty()) manifest(steamapps, 12900, 4, 2_000_000L) @@ -448,14 +423,12 @@ class WinCompSourcesTest { gameUp = true AutoComponents.queueInSession(app, installed) assertTrue(downloaded.isEmpty()) - // Other work stays paused in the session. val other = game(tmp.newFolder("Other"), Library.ADDED) AutoComponents.queueGame(app, other, asked = false) gameUp = false AutoComponents.drain(app) assertEquals(3, downloaded.size) assertEquals(setOf("d3dx9", "vcredist2013_dll", "vcredist2019_dll"), WinComponents.picks(app, "1262580").toSet()) - // Nothing left pending for the launch to wait on; the other game still waits for the session's end. assertEquals(0, AutoComponents.Pending.read(app).length()) assertEquals(listOf("g:${AutoComponents.appKey(other)}"), AutoComponents.queued()) session = false diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/CalibrationDistanceCheckTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/CalibrationDistanceCheckTest.kt new file mode 100644 index 0000000000..e28b5b7d77 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/CalibrationDistanceCheckTest.kt @@ -0,0 +1,66 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test +import java.util.Locale +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import com.droiddeck.launcher.R + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28]) +class CalibrationDistanceCheckTest { + private val context get() = RuntimeEnvironment.getApplication() + private fun board(z: Float)=List(24) { i -> SpatialVector((i%4-1.5f)*.03f,(i/4-2.5f)*.03f,z) } + + @Test + @Config(qualifiers = "fr") + fun rejectedCaptureExplainsTheProblemInTheSelectedLanguage() { + val result = CalibrationDistanceCheck.evaluate(context, .3048f, 3, null) + assertFalse(result.accepted) + assertEquals(context.getString(R.string.spatial_distance_corners, 3), result.message) + assertFalse(result.message.contains("checkerboard corners detected")) + assertTrue(result.message.contains("3 / 24")) + } + + @Test fun missingAndPartialBoardsExplainVisibilityRatherThanDistance() { + for (count in listOf(0,12,23)) { + val result=CalibrationDistanceCheck.evaluate(context,.508f,count,null) + assertFalse(result.accepted) + assertTrue(result.message.contains("$count / 24")) + } + } + @Test fun fullBoardWithRejectedStereoGeometryCannotPass() { + assertFalse(CalibrationDistanceCheck.evaluate(context,.508f,24,null).accepted) + assertFalse(CalibrationDistanceCheck.evaluate(context,.508f,24,board(.508f).dropLast(1)).accepted) + assertFalse(CalibrationDistanceCheck.evaluate(context,.508f,24,board(.508f).toMutableList().also { + it[0]=SpatialVector(z=Float.NaN) + }).accepted) + } + @Test fun preservesFiveCentimeterToleranceAndReportsBothUnits() { + val locale=Locale.getDefault() + try { + Locale.setDefault(Locale.US) + assertTrue(CalibrationDistanceCheck.evaluate(context,.508f,24,board(.508f)).accepted) + assertTrue(CalibrationDistanceCheck.evaluate(context,.3048f,24,board(.3048f)).accepted) + assertFalse(CalibrationDistanceCheck.evaluate(context,.508f,24,board(.3048f)).accepted) + assertTrue(CalibrationDistanceCheck.evaluate(context,.508f,24,board(.557f)).accepted) + val result=CalibrationDistanceCheck.evaluate(context,.508f,24,board(.60f)) + assertFalse(result.accepted) + assertTrue(result.message.contains("60.0 cm (23.62 in)")) + assertTrue(result.message.contains("50.8 cm (20.00 in)")) + } finally { Locale.setDefault(locale) } + } + @Test fun checksCameraToCenterDistanceRatherThanOnlyForwardDepth() { + val points=board(.4f).map { it+SpatialVector(x=.3f) } + assertTrue(CalibrationDistanceCheck.evaluate(context,.5f,24,points).accepted) + assertFalse(CalibrationDistanceCheck.evaluate(context,.4f,24,points).accepted) + } + @Test fun rejectsInvalidRequestedDistances() { + for(distance in listOf(0f,Float.NaN,Float.POSITIVE_INFINITY)) { + assertThrows(IllegalArgumentException::class.java) { CalibrationDistanceCheck.evaluate(context,distance,24,board(.5f)) } + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/CalibrationObservationDataTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/CalibrationObservationDataTest.kt new file mode 100644 index 0000000000..4452f91cf3 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/CalibrationObservationDataTest.kt @@ -0,0 +1,47 @@ +package com.droiddeck.launcher.glasses + +import org.json.JSONArray +import org.json.JSONObject +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk=[28],manifest=Config.NONE) +class CalibrationObservationDataTest { + private fun view(count: Int=24) = JSONObject().put("objects",JSONArray((0 until count).map { + JSONArray(listOf((it%4+1)*0.03,(it/4+1)*0.03,0.0)) + })).put("left",JSONArray((0 until count).map { JSONArray(listOf(100.0+it,200.0)) })) + .put("right",JSONArray((0 until count).map { JSONArray(listOf(80.0+it,200.0)) })) + .put("head",JSONArray(listOf(0.1,0.2,0.3,1.0,0.0,0.0,0.0))) + + @Test fun preservesPartialBoardCorrespondencesAndHeadPose() { + for(count in listOf(12,20,24)) { + val restored=CalibrationObservationData.parse(JSONObject(view(count).toString())) + assertEquals(count,restored.objects.size) + assertEquals(20.0,restored.left.last()[0]-restored.right.last()[0],0.0) + assertEquals(SpatialVector(.1f,.2f,.3f),restored.head.position) + assertEquals(SpatialRotation(),restored.head.rotation) + } + } + @Test fun rejectsTruncatedOrMismatchedCorrespondences() { + assertThrows(IllegalArgumentException::class.java) { CalibrationObservationData.parse(view(11)) } + assertThrows(IllegalArgumentException::class.java) { CalibrationObservationData.parse(view(25)) } + assertThrows(IllegalArgumentException::class.java) { + CalibrationObservationData.parse(view().put("right",view(20).getJSONArray("right"))) + } + assertThrows(IllegalArgumentException::class.java) { + CalibrationObservationData.parse(view().also { it.getJSONArray("left").put(0,JSONArray(listOf(1.0))) }) + } + } + @Test fun rejectsInvalidHeadRotationAndFloatOverflow() { + assertThrows(IllegalStateException::class.java) { + CalibrationObservationData.parse(view().put("head",JSONArray(listOf(0,0,0,0,0,0,0)))) + } + assertThrows(IllegalStateException::class.java) { + CalibrationObservationData.parse(view().put("head",JSONArray(listOf(1e100,0,0,1,0,0,0)))) + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/Glasses3dRoutingTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/Glasses3dRoutingTest.kt new file mode 100644 index 0000000000..d40441552d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/Glasses3dRoutingTest.kt @@ -0,0 +1,450 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import android.os.Handler +import android.os.Looper +import kotlinx.coroutines.flow.MutableStateFlow +import org.junit.Assert.* +import org.junit.After +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +@LooperMode(LooperMode.Mode.PAUSED) +class Glasses3dRoutingTest { + private val handler = Handler(Looper.getMainLooper()) + private val commands = mutableListOf<Pair<Int, Boolean>>() + private val hardwareMessages = mutableListOf<Int>() + private lateinit var stateBefore: GlassesState + private lateinit var settingsBefore: GlassesSettings + private val supportedModels: List<GlassesModel> = + listOf("One", "Lite", "Pro", "Pro 2", "Luma", "Luma Pro", "Luma Cyber", "Luma Ultra", "Beast") + .map { VitureProtocol.sdkModel(it)!! } + listOf( + RayNeoModel.model(0x1bbb, 0xaf50, "RayNeo Air 4 Pro")!!, + RayNeoModel.model(0x3941, 0xaf50, "RayNeo GT")!!, + RayNeoModel.model(0x3941, 0xaf50, "RayNeo GT MAX")!!, + XrealModel, + ) + private fun field(name: String) = Glasses::class.java.getDeclaredField(name).apply { isAccessible = true } + + @Before fun prepare() { + stateBefore = Glasses.state.value + settingsBefore = Glasses.settings.value + val context = RuntimeEnvironment.getApplication() + context.getSharedPreferences("glasses", Context.MODE_PRIVATE).edit().clear().commit() + field("app").set(null, context) + field("handler").set(null, handler) + field("model").set(null, VitureProtocol.model(0x1019, null)) + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = GlassesState(connected = true, controllable = true, + displayId = 2, width = 1920, height = 1080) + @Suppress("UNCHECKED_CAST") + val settings = field("_settings").get(null) as MutableStateFlow<GlassesSettings> + settings.value = GlassesSettings(gameOnGlasses = false) + field("link").set(null, object : GlassesLink { + override val hasImu = false + override fun send(msgId: Int, payload: ByteArray): Boolean { + hardwareMessages += msgId + if (msgId == VitureProtocol.MSG_DISPLAY) + commands += (payload[0].toInt() and 255) to Glasses.settings.value.gameOnGlasses + return true + } + override fun close() {} + }) + } + + @After fun cleanUp() { + handler.removeCallbacksAndMessages(null) + field("link").set(null, null) + (field("modeState").get(null) as GlassesModeState).apply { manual(); sent(false, 0) } + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = stateBefore + @Suppress("UNCHECKED_CAST") + val settings = field("_settings").get(null) as MutableStateFlow<GlassesSettings> + settings.value = settingsBefore + } + + @Test fun lumaJoyConsDefaultOffPersistAndExcludeBareHands() { + assertFalse(GlassesSettings().joyConTracking) + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = state.value.copy(supportsSpatial = true) + @Suppress("UNCHECKED_CAST") + val settings = field("_settings").get(null) as MutableStateFlow<GlassesSettings> + Glasses.setJoyConTracking(true) + shadowOf(Looper.getMainLooper()).idle() + assertFalse(Glasses.settings.value.joyConTracking) + settings.value = settings.value.copy(positionalTracking = true, handControllers = true) + Glasses.setJoyConTracking(true) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.settings.value.joyConTracking) + assertFalse(Glasses.settings.value.handControllers) + val prefs = RuntimeEnvironment.getApplication().getSharedPreferences("glasses", Context.MODE_PRIVATE) + assertTrue(prefs.getBoolean("joyConTracking", false)) + val loaded = Glasses::class.java.getDeclaredMethod("load").apply { isAccessible = true }.invoke(Glasses) as GlassesSettings + assertTrue(loaded.joyConTracking) + Glasses.setHandControllers(true) + shadowOf(Looper.getMainLooper()).idle() + assertFalse(Glasses.settings.value.joyConTracking) + assertTrue(Glasses.settings.value.handControllers) + SpatialTracking.setControllers(false, false) + } + + @Test fun otherGlassesRejectSpatialEnableAndRestartWithoutClosingTheirLink() { + val before = Glasses.settings.value + val link = field("link").get(null) + Glasses.setPositionalTracking(true) + Glasses.restartSpatialTracking() + shadowOf(Looper.getMainLooper()).idle() + assertEquals(before, Glasses.settings.value) + assertSame(link, field("link").get(null)) + assertTrue(hardwareMessages.isEmpty()) + } + + @Test fun manual3dSelectsAndSavesGlassesOutputBeforeSwitchingTheDisplay() { + Glasses.set3d(true) + shadowOf(Looper.getMainLooper()).idle() + + assertEquals(listOf(0x32 to true), commands) + assertTrue(Glasses.settings.value.gameOnGlasses) + val prefs = RuntimeEnvironment.getApplication().getSharedPreferences("glasses", Context.MODE_PRIVATE) + assertTrue(prefs.getBoolean("gameOnGlasses", false)) + } + + @Test fun nativeThirtyHzIsSavedWithoutSendingAFabricatedHardwareMode() { + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + Glasses.setGameOnGlasses(true) + shadowOf(Looper.getMainLooper()).idle() + state.value = state.value.copy(supports30Hz = true) + + Glasses.setRefreshHz(30) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(30, Glasses.settings.value.refreshHz) + assertTrue(hardwareMessages.isEmpty()) + + state.value = state.value.copy(sbs = true, width = 3840) + Glasses.setSbsHz(30) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(30, Glasses.settings.value.sbsHz) + assertTrue(hardwareMessages.isEmpty()) + val saved = Glasses::class.java.getDeclaredMethod("load").apply { isAccessible = true } + .invoke(Glasses) as GlassesSettings + assertEquals(30, saved.refreshHz) + assertEquals(30, saved.sbsHz) + } + + @Test fun unsupportedThirtyHzRequestsLeavePreferencesAndHardwareUnchanged() { + val before = Glasses.settings.value + Glasses.setRefreshHz(30) + Glasses.setSbsHz(30) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(before, Glasses.settings.value) + assertTrue(hardwareMessages.isEmpty()) + } + + @Test fun automaticSteamVr3dAlsoSelectsGlassesOutput() { + Glasses.set3dForVr(true) + shadowOf(Looper.getMainLooper()).idle() + + assertEquals(listOf(0x32 to true), commands) + assertTrue(Glasses.settings.value.gameOnGlasses) + } + + @Test fun returningTo2dKeepsTheGameOnGlasses() { + Glasses.set3d(true) + shadowOf(Looper.getMainLooper()).idle() + Glasses.set3d(false) + shadowOf(Looper.getMainLooper()).idle() + + assertEquals(listOf(0x32 to true, 0x34 to true), commands) + assertTrue(Glasses.settings.value.gameOnGlasses) + } + + @Test fun turningOff3dDoesNotEnableGlassesOutput() { + Glasses.set3d(false) + shadowOf(Looper.getMainLooper()).idle() + + assertEquals(listOf(0x34 to false), commands) + assertFalse(Glasses.settings.value.gameOnGlasses) + } + + @Test fun turningOffGlassesOutputRestores2dOnEverySupportedModel() { + for (model in supportedModels) { + selectModel(model) + Glasses.set3dof(true) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.settings.value.screen3dof) + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = state.value.copy(sbs = true, width = 3840) + commands.clear() + + Glasses.setGameOnGlasses(false) + shadowOf(Looper.getMainLooper()).idle() + + assertEquals(listOf(model.mode(120, false) to true), commands) + assertFalse(Glasses.settings.value.gameOnGlasses) + assertFalse(Glasses.settings.value.screen3dof) + assertEquals(GlassesSettings.PICTURE_AUTO, Glasses.settings.value.picture3d) + val prefs = RuntimeEnvironment.getApplication().getSharedPreferences("glasses", Context.MODE_PRIVATE) + assertFalse(prefs.getBoolean("gameOnGlasses", true)) + } + } + + @Test fun turningOffGlassesOutputCancelsAnUnconfirmedStereoSwitch() { + Glasses.set3d(true) + shadowOf(Looper.getMainLooper()).idle() + assertFalse(Glasses.state.value.sbs) + assertTrue(Glasses.state.value.switching3d) + + Glasses.setGameOnGlasses(false) + shadowOf(Looper.getMainLooper()).idle() + + assertEquals(listOf(0x32 to true, 0x34 to true), commands) + assertFalse(Glasses.state.value.switching3d) + assertFalse(Glasses.settings.value.gameOnGlasses) + } + + @Test fun turningOffGlassesOutputTakesOwnershipFromAutomaticVr() { + Glasses.set3dForVr(true) + shadowOf(Looper.getMainLooper()).idle() + Glasses.setGameOnGlasses(false) + shadowOf(Looper.getMainLooper()).idle() + Glasses.set3dForVr(false) + shadowOf(Looper.getMainLooper()).idle() + + assertEquals(listOf(0x32 to true, 0x34 to true), commands) + assertFalse(Glasses.state.value.switching3d) + assertFalse(Glasses.settings.value.gameOnGlasses) + } + + @Test fun togglingGlassesOutputIn2dDoesNotSendDisplayCommands() { + Glasses.setGameOnGlasses(true) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.settings.value.gameOnGlasses) + Glasses.setGameOnGlasses(false) + shadowOf(Looper.getMainLooper()).idle() + + assertFalse(Glasses.settings.value.gameOnGlasses) + assertTrue(hardwareMessages.isEmpty()) + } + + @Test fun turningOffGlassesOutputDisablesVirtualScreenAndSavesTheChoice() { + selectModel(supportedModels.first()) + Glasses.set3dof(true) + shadowOf(Looper.getMainLooper()).idle() + Glasses.setGameOnGlasses(true) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.settings.value.screen3dof) + + Glasses.setGameOnGlasses(false) + shadowOf(Looper.getMainLooper()).idle() + + assertFalse(Glasses.settings.value.screen3dof) + assertEquals(GlassesSettings.PICTURE_AUTO, Glasses.settings.value.picture3d) + val saved = Glasses::class.java.getDeclaredMethod("load").apply { isAccessible = true } + .invoke(Glasses) as GlassesSettings + assertFalse(saved.gameOnGlasses) + assertFalse(saved.screen3dof) + assertEquals(GlassesSettings.PICTURE_AUTO, saved.picture3d) + + Glasses.setGameOnGlasses(true) + shadowOf(Looper.getMainLooper()).idle() + assertFalse(Glasses.settings.value.screen3dof) + assertTrue(hardwareMessages.isEmpty()) + } + + @Test fun turningOffGlassesOutputDisablesVirtualScreenWithoutDeviceControl() { + selectModel(supportedModels.first()) + Glasses.set3dof(true) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.settings.value.screen3dof) + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = state.value.copy(connected = false, supportsScreen3dof = false) + + Glasses.setGameOnGlasses(false) + shadowOf(Looper.getMainLooper()).idle() + + assertFalse(Glasses.settings.value.gameOnGlasses) + assertFalse(Glasses.settings.value.screen3dof) + assertEquals(GlassesSettings.PICTURE_AUTO, Glasses.settings.value.picture3d) + assertTrue(hardwareMessages.isEmpty()) + } + + @Test fun enabling3dofRoutesFlatContentWithoutSendingAStereoCommandAndSurvivesReload() { + for (model in supportedModels) { + selectModel(model) + Glasses.set3dof(true) + shadowOf(Looper.getMainLooper()).idle() + + assertTrue(hardwareMessages.isEmpty()) + assertFalse(Glasses.state.value.sbs) + assertFalse(Glasses.state.value.switching3d) + assertTrue(Glasses.settings.value.screen3dof) + assertTrue(Glasses.settings.value.gameOnGlasses) + val saved = Glasses::class.java.getDeclaredMethod("load").apply { isAccessible = true } + .invoke(Glasses) as GlassesSettings + assertTrue(saved.screen3dof) + assertTrue(saved.gameOnGlasses) + } + } + + @Test fun stereoAnd3dofCanBeToggledIndependentlyOnEverySupportedModel() { + for (model in supportedModels) { + selectModel(model) + Glasses.set3dof(true) + Glasses.set3d(true) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.settings.value.screen3dof) + + Glasses.set3d(false) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.settings.value.screen3dof) + assertEquals(listOf(model.mode(60, true) to true, model.mode(120, false) to true), commands) + + commands.clear() + hardwareMessages.clear() + Glasses.set3dof(false) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(hardwareMessages.isEmpty()) + assertFalse(Glasses.settings.value.screen3dof) + assertEquals(GlassesSettings.PICTURE_AUTO, Glasses.settings.value.picture3d) + assertTrue(Glasses.settings.value.gameOnGlasses) + } + } + + @Test fun enabling3dofWithoutHeadTrackingSupportLeavesSettingsUnchanged() { + val before = Glasses.settings.value + Glasses.set3dof(true) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(before, Glasses.settings.value) + assertTrue(hardwareMessages.isEmpty()) + } + + @Test fun resolutionsPersistIndependentlyAndOnlyTheActiveProfileChangesHardware() { + selectModel(VitureProtocol.sdkModel("Luma Ultra")!!) + Glasses.setResolution(GlassesDisplayProfile.THREE_D, "1920x1080") + Glasses.setResolution(GlassesDisplayProfile.VR, "1920x1200") + shadowOf(Looper.getMainLooper()).idle() + assertTrue(hardwareMessages.isEmpty()) + + Glasses.setResolution(GlassesDisplayProfile.TWO_D, "1920x1080") + shadowOf(Looper.getMainLooper()).idle() + assertEquals(listOf(0x34 to false), commands) + assertEquals(120, Glasses.settings.value.refreshHz) + assertEquals(60, Glasses.settings.value.sbsHz) + val saved = Glasses::class.java.getDeclaredMethod("load").apply { isAccessible = true } + .invoke(Glasses) as GlassesSettings + assertEquals("1920x1080", saved.resolution2d) + assertEquals("1920x1080", saved.resolution3d) + assertEquals("1920x1200", saved.resolutionVr) + assertEquals(listOf(VitureProtocol.MSG_DISPLAY), hardwareMessages) + } + + @Test fun vrResolutionIsAppliedAndTheOrdinaryResolutionIsRestoredAfterStopping() { + selectModel(VitureProtocol.sdkModel("Luma Ultra")!!) + Glasses.setResolution(GlassesDisplayProfile.TWO_D, "1920x1080") + Glasses.setResolution(GlassesDisplayProfile.VR, "1920x1200") + shadowOf(Looper.getMainLooper()).idle() + commands.clear() + Glasses.setVrActive(true) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.state.value.vrActive) + assertEquals(listOf(0x44 to false), commands) + Glasses.setVrActive(false) + shadowOf(Looper.getMainLooper()).idle() + assertFalse(Glasses.state.value.vrActive) + assertEquals(listOf(0x44 to false, 0x34 to false), commands) + } + + @Test fun vrResolutionUsesStereoCommandsAndRestoresThePreVrLayoutOnce() { + selectModel(VitureProtocol.sdkModel("Luma Ultra")!!) + Glasses.setGameOnGlasses(true) + Glasses.setAuto3d(true) + Glasses.setResolution(GlassesDisplayProfile.VR, "1920x1080") + shadowOf(Looper.getMainLooper()).idle() + Glasses.setVrActive(true) + Glasses.set3dForVr(true) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(listOf(0x32 to true), commands) + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = state.value.copy(sbs = true, width = 3840, switching3d = false) + (field("modeState").get(null) as GlassesModeState).observe(true, 0) + + Glasses.setSbsHz(90) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(0x35 to true, commands.last()) + Glasses.setVrActive(false) + Glasses.set3dForVr(false) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(listOf(0x32 to true, 0x35 to true, 0x44 to true), commands) + } + + @Test fun invalidResolutionCannotChangePreferencesOrSendDeviceCommands() { + selectModel(VitureProtocol.sdkModel("Pro")!!) + val before = Glasses.settings.value + for (value in listOf("1920x1200", "3840x1080", "-1x1080", "unknown")) + Glasses.setResolution(GlassesDisplayProfile.TWO_D, value) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(before, Glasses.settings.value) + assertTrue(hardwareMessages.isEmpty()) + } + + @Test fun startingVrDuringAStereoSwitchDoesNotSendAFlatMode() { + selectModel(VitureProtocol.sdkModel("Luma Ultra")!!) + Glasses.setResolution(GlassesDisplayProfile.VR, "1920x1080") + Glasses.set3d(true) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.state.value.switching3d) + Glasses.setVrActive(true) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(listOf(0x42 to true, 0x32 to true), commands) + } + + @Test fun reconnectRestoresASavedResolutionEvenWhenRefreshAlreadyMatches() { + selectModel(VitureProtocol.sdkModel("Luma Ultra")!!) + Glasses.setResolution(GlassesDisplayProfile.TWO_D, "1920x1080") + shadowOf(Looper.getMainLooper()).idle() + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = state.value.copy(width = 1920, height = 1200, hz = 120f) + field("glassesMode").setInt(null, 0) + field("autoModeSent").setBoolean(null, false) + field("lastModeSentAt").setLong(null, -10_000L) + commands.clear() + Glasses::class.java.getDeclaredMethod("applyMode", Boolean::class.javaPrimitiveType) + .apply { isAccessible = true }.invoke(Glasses, false) + assertEquals(listOf(0x34 to false), commands) + } + + @Test fun defaultVrProfileDoesNotSendExtraDisplayCommands() { + selectModel(VitureProtocol.sdkModel("Luma Ultra")!!) + Glasses.setVrActive(true) + Glasses.setVrActive(false) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(hardwareMessages.isEmpty()) + } + + private fun selectModel(model: GlassesModel) { + field("model").set(null, model) + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = state.value.copy(model = model.name, supportsScreen3dof = true, resolutions = model.resolutions) + @Suppress("UNCHECKED_CAST") + val settings = field("_settings").get(null) as MutableStateFlow<GlassesSettings> + settings.value = GlassesSettings(gameOnGlasses = false, headTracking = false) + assertFalse(settings.value.screen3dof) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesCallbacksTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesCallbacksTest.kt new file mode 100644 index 0000000000..47f6b7a7cc --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesCallbacksTest.kt @@ -0,0 +1,235 @@ +package com.droiddeck.launcher.glasses + +import android.os.Handler +import android.os.Looper +import kotlinx.coroutines.flow.MutableStateFlow +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesCallbacksTest { + private fun field(name: String) = Glasses::class.java.getDeclaredField(name).apply { isAccessible = true } + private fun generation(value: Long) = field("linkGeneration").setLong(null, value) + private fun listener(generation: Long): VitureLink.Listener = + Glasses::class.java.getDeclaredMethod("linkListener", Long::class.javaPrimitiveType).apply { isAccessible = true } + .invoke(Glasses, generation) as VitureLink.Listener + + @Before fun prepare() { + field("handler").set(null, Handler(Looper.getMainLooper())) + generation(1) + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = GlassesState(connected = true, brightness = 2, displayId = 2, width = 640, height = 480, noSignal = true) + field("imuPackets").setLong(null, 0) + field("probe").set(null, null) + } + + private fun brightness(value: Int) = VitureProtocol.Frame( + VitureProtocol.MAGIC_REPORT, VitureProtocol.EVENT_BRIGHTNESS, byteArrayOf(value.toByte()), true, + ) + + @Test fun statusIncludesCalibrationAndTransportChecksumDiagnostics() { + val previousLink = field("link").get(null) + @Suppress("UNCHECKED_CAST") + val calibration = field("_calibration").get(null) as MutableStateFlow<GlassesCalibrationState> + val previousCalibration = calibration.value + try { + field("link").set(null, object : GlassesLink { + override val hasImu = true + override val badFrames = 7L + override fun send(msgId: Int, payload: ByteArray) = false + override fun close() {} + }) + calibration.value = GlassesCalibrationState(supported = true, saved = true, + phase = CalibrationPhase.SAVED, progress = 100) + val status = Glasses.status() + assertEquals(7L, status.getLong("badFrames")) + val reportedCalibration = status.getJSONObject("calibration") + assertTrue(reportedCalibration.getBoolean("supported")) + assertTrue(reportedCalibration.getBoolean("saved")) + assertEquals("SAVED", reportedCalibration.getString("phase")) + assertEquals(100, reportedCalibration.getInt("progress")) + field("link").set(null, null) + assertEquals(0L, Glasses.status().getLong("badFrames")) + } finally { + field("link").set(null, previousLink) + calibration.value = previousCalibration + } + } + + @Test fun queuedDisconnectCannotCloseAReplacementLink() { + val old = listener(1) + old.onLost() + old.onLost() + generation(2) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.state.value.connected) + } + + @Test fun queuedReportCannotOverwriteReplacementState() { + listener(1).onFrame(brightness(7)) + generation(2) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(2, Glasses.state.value.brightness) + listener(2).onFrame(brightness(4)) + listener(1).onFrame(brightness(8)) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(4, Glasses.state.value.brightness) + } + + @Test fun oldImuPacketsCannotReachTheNewProbe() { + var samples = 0 + val probe: (ByteArray?, FloatArray?) -> Unit = { _, _ -> samples++ } + field("probe").set(null, probe) + generation(2) + listener(1).onImu(ByteArray(12), 0) + assertEquals(0, samples) + assertEquals(0L, field("imuPackets").getLong(null)) + listener(2).onImu(ByteArray(12), 0) + assertEquals(1, samples) + assertEquals(1L, field("imuPackets").getLong(null)) + } + + @Test fun rayNeoPoseUsesTheExistingSinkAndRejectsAnOldConnection() { + fun rayneo(gen: Long) = Glasses::class.java.getDeclaredMethod("rayNeoListener", Long::class.javaPrimitiveType) + .apply { isAccessible = true }.invoke(Glasses, gen) as RayNeoLink.Listener + var delivered: FloatArray? = null + var timestamp = 0L + val sink = Glasses.PoseSink { x, y, z, w, time -> + delivered = floatArrayOf(x, y, z, w) + timestamp = time + } + field("sink").set(null, sink) + try { + val q = floatArrayOf(0f, 0f, 0.6f, 0.8f) + rayneo(0).onPose(ByteArray(64), q, 99) + assertEquals(null, delivered) + rayneo(1).onPose(ByteArray(64), q, 123) + org.junit.Assert.assertArrayEquals(q, delivered, 0f) + assertEquals(123L, timestamp) + assertEquals(1L, field("imuPackets").getLong(null)) + rayneo(0).onLost() + generation(2) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.state.value.connected) + } finally { + field("sink").set(null, null) + } + } + + @Test fun deviceModeReportsCannotConfirmThePhysicalStereoSignal() { + listener(1).onFrame(VitureProtocol.Frame( + VitureProtocol.MAGIC_REPORT, VitureProtocol.EVENT_DISPLAY, byteArrayOf(0x32), true, + )) + listener(1).onFrame(VitureProtocol.Frame( + VitureProtocol.MAGIC_REPORT, VitureProtocol.MSG_GET_DISPLAY, byteArrayOf(0, 0x32), true, + )) + shadowOf(Looper.getMainLooper()).idle() + assertFalse(Glasses.state.value.sbs) + assertTrue(Glasses.state.value.noSignal) + assertEquals(640, Glasses.state.value.width) + } + + @Test fun xrealCallbacksUseSharedPoseAndIgnoreDetachedDeviceValues() { + fun xreal(gen: Long) = Glasses::class.java.getDeclaredMethod("xrealListener", Long::class.javaPrimitiveType) + .apply { isAccessible = true }.invoke(Glasses, gen) as XrealLink.Listener + var delivered: FloatArray? = null + field("sink").set(null, Glasses.PoseSink { x, y, z, w, _ -> delivered = floatArrayOf(x, y, z, w) }) + try { + val q = floatArrayOf(0f, 0f, 0.6f, 0.8f) + xreal(0).onPose(ByteArray(128), q, 1) + assertEquals(null, delivered) + xreal(1).onPose(ByteArray(128), q, 2) + org.junit.Assert.assertArrayEquals(q, delivered, 0f) + xreal(1).onValue(VitureProtocol.MSG_BRIGHTNESS, 8) + xreal(1).onUnavailable(true) + generation(2) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(2, Glasses.state.value.brightness) + assertTrue(Glasses.state.value.connected) + } finally { field("sink").set(null, null) } + } + + @Test fun cancelledCalibrationCallbacksCannotResurrectOrOverwriteTheProfile() { + val rayneo = Glasses::class.java.getDeclaredMethod("rayNeoListener", Long::class.javaPrimitiveType) + .apply { isAccessible = true }.invoke(Glasses, 1L) as RayNeoLink.Listener + @Suppress("UNCHECKED_CAST") + val calibration = field("_calibration").get(null) as MutableStateFlow<GlassesCalibrationState> + calibration.value = GlassesCalibrationState(supported = true, saved = true, phase = CalibrationPhase.SETTLING) + field("calibrationRevision").setLong(null, 1) + rayneo.onCalibrationSaved(1, RayNeoCalibration(Vec3(0f, 0f, 0f), Quaternion.IDENTITY)) + rayneo.onCalibration(1, CalibrationPhase.SAVED, 100) + field("calibrationRevision").setLong(null, 2) + calibration.value = calibration.value.copy(phase = CalibrationPhase.IDLE) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(CalibrationPhase.IDLE, calibration.value.phase) + assertTrue(calibration.value.saved) + } + + @Test fun disconnectedRayNeoBoardCannotChangeTheCurrentCalibrationKey() { + val rayneo = Glasses::class.java.getDeclaredMethod("rayNeoListener", Long::class.javaPrimitiveType) + .apply { isAccessible = true }.invoke(Glasses, 1L) as RayNeoLink.Listener + val previous = field("calibrationKey").get(null) + try { + field("calibrationKey").set(null, "current-profile") + rayneo.onDeviceInfo(0x40, true) + generation(2) + shadowOf(Looper.getMainLooper()).idle() + assertEquals("current-profile", field("calibrationKey").get(null)) + } finally { field("calibrationKey").set(null, previous) } + } + + @Test fun sdkCallbacksCannotCrossConnectionGenerationsOrFakeStereoConfirmation() { + fun sdk(gen: Long) = Glasses::class.java.getDeclaredMethod("sdkListener", Long::class.javaPrimitiveType) + .apply { isAccessible = true }.invoke(Glasses, gen) as VitureSdkLink.Listener + var samples = 0 + val probe: (ByteArray?, FloatArray?) -> Unit = { raw, pose -> + assertEquals(null, raw) + assertEquals(4, pose!!.size) + samples++ + } + field("probe").set(null, probe) + try { + sdk(0).onPose(floatArrayOf(0f, 0f, 0f, 1f), 100) + sdk(1).onPose(floatArrayOf(0f, 0f, 0f, 1f), 101) + assertEquals(1, samples) + sdk(0).onValue(VitureProtocol.MSG_GET_BRIGHTNESS, 8) + sdk(1).onValue(VitureProtocol.MSG_GET_DISPLAY, 0x42) + sdk(0).onLost() + shadowOf(Looper.getMainLooper()).idle() + assertEquals(2, Glasses.state.value.brightness) + assertFalse(Glasses.state.value.sbs) + assertTrue(Glasses.state.value.connected) + } finally { field("probe").set(null, null) } + } + + @Test fun rejectedTrackingStartDoesNotAdvertiseTracking() { + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = state.value.copy(tracking = false) + val rejected = object : GlassesLink { + override val hasImu = true + override fun send(msgId: Int, payload: ByteArray) = false + override fun close() {} + } + field("link").set(null, rejected) + field("sink").set(null, Glasses.PoseSink { _, _, _, _, _ -> }) + try { + Glasses::class.java.getDeclaredMethod("updateImu").apply { isAccessible = true }.invoke(Glasses) + assertFalse(Glasses.state.value.tracking) + } finally { + field("link").set(null, null) + field("sink").set(null, null) + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesDisplayModesTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesDisplayModesTest.kt new file mode 100644 index 0000000000..a79b6ac3b3 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesDisplayModesTest.kt @@ -0,0 +1,62 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class GlassesDisplayModesTest { + private val fullHd = GlassesResolution(1920, 1080) + private val tall = GlassesResolution(1920, 1200) + private val ultra = VitureProtocol.sdkModel("Luma Ultra")!! + private val state = GlassesState(resolutions = ultra.resolutions) + + @Test fun separateProfilesRetainTheirOwnResolutions() { + val settings = GlassesSettings(resolution2d = fullHd.key, resolution3d = tall.key, resolutionVr = fullHd.key) + assertEquals(fullHd, GlassesDisplayModes.selected(settings, state)) + assertEquals(tall, GlassesDisplayModes.selected(settings, state.copy(sbs = true))) + for (stereo in listOf(false, true)) + assertEquals(fullHd, GlassesDisplayModes.selected(settings, state.copy(sbs = stereo, vrActive = true))) + } + + @Test fun automaticVrInheritsTheActiveLayoutAndDefaultsKeepNativeBehavior() { + val settings = GlassesSettings(resolution2d = fullHd.key, resolution3d = tall.key) + assertEquals(fullHd, GlassesDisplayModes.selected(settings, state.copy(vrActive = true))) + assertEquals(tall, GlassesDisplayModes.selected(settings, state.copy(sbs = true, vrActive = true))) + assertNull(GlassesDisplayModes.selected(GlassesSettings(), state)) + assertNull(GlassesDisplayModes.selected(GlassesSettings(), state.copy(sbs = true, vrActive = true))) + } + + @Test fun anotherHeadsetDoesNotReceiveAnUnsupportedSavedResolution() { + val settings = GlassesSettings(resolution2d = tall.key, resolutionVr = tall.key) + assertNull(GlassesDisplayModes.selected(settings, state.copy(resolutions = listOf(fullHd)))) + assertNull(GlassesDisplayModes.selected(settings, state.copy(resolutions = emptyList(), vrActive = true))) + assertEquals(tall, GlassesDisplayModes.selected(settings, state)) + } + + @Test fun ultraResolutionsMapToVendorCommandsAtEverySupportedRefresh() { + for ((hz, code) in listOf(60 to 0x31, 90 to 0x33, 120 to 0x34)) { + assertEquals(code, ultra.mode(hz, false, fullHd)) + assertEquals(code + 0x10, ultra.mode(hz, false, tall)) + } + for ((hz, code) in listOf(60 to 0x32, 90 to 0x35)) { + assertEquals(code, ultra.mode(hz, true, fullHd)) + assertEquals(code + 0x10, ultra.mode(hz, true, tall)) + } + assertEquals(0x41, ultra.mode(30, false, tall)) + assertEquals(0x42, ultra.mode(30, true, tall)) + } + + @Test fun olderModelsKeepTheirNativeResolutionAndStereoRateLimits() { + for (name in listOf("One", "Pro", "Pro 2")) { + val model = VitureProtocol.sdkModel(name)!! + assertEquals(listOf(fullHd), model.resolutions) + assertEquals(0x34, model.mode(120, false, tall)) + assertEquals(0x32, model.mode(90, true, tall)) + } + for (name in listOf("Luma", "Luma Pro", "Luma Ultra", "Beast")) { + val model = VitureProtocol.sdkModel(name)!! + assertEquals(listOf(fullHd, tall), model.resolutions) + assertEquals(0x44, model.mode(120, false)) + assertEquals(if (model.sbs90) 0x45 else 0x42, model.mode(90, true)) + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesDisplayTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesDisplayTest.kt new file mode 100644 index 0000000000..923f988487 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesDisplayTest.kt @@ -0,0 +1,137 @@ +package com.droiddeck.launcher.glasses + +import android.hardware.display.DeviceProductInfo +import android.hardware.display.DisplayManager +import android.view.Display +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.Implementation +import org.robolectric.annotation.Implements +import org.robolectric.annotation.LooperMode +import org.robolectric.shadow.api.Shadow +import org.robolectric.shadows.ShadowDisplay +import org.robolectric.shadows.ShadowDisplayManager +import org.robolectric.util.ReflectionHelpers + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [31, 34], manifest = Config.NONE, shadows = [GlassesDisplayTest.ProductMetadataDisplay::class]) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesDisplayTest { + @Test fun connectedGlassesUseTheOnlyExternalPanelWhenProductMetadataIsMissing() { + val panel = display("External Display") + assertNull(panel.deviceProductInfo) + + assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(panel), usbPresent = true)?.displayId) + } + + @Test fun missingProductMetadataDoesNotIdentifyGlassesWithoutUsb() { + val panel = display("External Display") + + assertNull(Glasses.selectGlassesDisplay(listOf(panel), usbPresent = false)) + } + + @Test fun connectedGlassesDoNotChooseBetweenMultipleUnidentifiedPanels() { + val first = display("External Display 1") + val second = display("External Display 2") + + assertNull(Glasses.selectGlassesDisplay(listOf(first, second), usbPresent = true)) + } + + @Test fun primaryAndNonPresentationDisplaysCannotBecomeTheGlassesOutput() { + val primary = displayManager().getDisplay(Display.DEFAULT_DISPLAY) + shadowOf(primary).setName("RayNeo Air 4 Pro") + shadowOf(primary).setFlags(Display.FLAG_PRESENTATION) + val nonPresentation = display("RayNeo Air 4 Pro", flags = 0) + + assertNull(Glasses.selectGlassesDisplay(listOf(primary, nonPresentation), usbPresent = true)) + } + + @Test fun rayNeoDisplayNameIsRecognizedEvenWhenProductMetadataHasAGenericName() { + val panel = display("RayNeo Air 4 Pro", productName = "External Monitor") + + assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(panel), usbPresent = false)?.displayId) + } + + @Test fun rayNeoProductMetadataIsRecognizedWhenAndroidUsesAGenericDisplayName() { + val panel = display("External Display", productName = "RayNeo Air 3") + + assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(panel), usbPresent = false)?.displayId) + } + + @Test fun anUnrelatedNamedMonitorIsNotClaimedByConnectedGlasses() { + val monitor = display("External Display", productName = "TCL TV") + + assertNull(Glasses.selectGlassesDisplay(listOf(monitor), usbPresent = true)) + } + + @Test fun namedRayNeoDisplayWorksWithoutUsbControlPermission() { + val panel = display("RayNeo GT") + + assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(panel), usbPresent = false)?.displayId) + } + + @Test fun blankProductNameRetainsTheSinglePanelUsbFallback() { + val panel = display("External Display", productName = " ") + + assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(panel), usbPresent = true)?.displayId) + } + + @Test fun brandedGlassesWinOverAnUnidentifiedSecondDisplay() { + val monitor = display("External Display") + val glasses = display("RayNeo Air 2s") + + assertEquals(glasses.displayId, Glasses.selectGlassesDisplay(listOf(monitor, glasses), usbPresent = true)?.displayId) + } + + @Test fun gtMaxSmartGlassesEdidUsesTheSameOutputSelectionAsViture() { + val panel = display("SmartGlasses", productName = "SmartGlasses", productId = "980") + assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(panel), usbPresent = true)?.displayId) + // The display remains usable while USB control reconnects during a mode switch. + assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(panel), usbPresent = false)?.displayId) + } + + @Test fun gtMaxMetadataIsRecognizedBehindGenericAndroidNameAndOtherPanels() { + val monitor = display("External Display", productName = "TCL TV") + val panel = display("External Display", productName = "SmartGlasses", productId = "980") + assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(monitor, panel), usbPresent = true)?.displayId) + } + + @Test fun genericSmartGlassesNameDoesNotClaimUnverifiedProducts() { + val unknown = display("SmartGlasses", productName = "SmartGlasses") + assertNull(Glasses.selectGlassesDisplay(listOf(unknown), usbPresent = true)) + assertFalse(RayNeoModel.isDisplayProduct("SmartGlasses", "OTHER", "980")) + assertFalse(RayNeoModel.isDisplayProduct("TCL TV", "TCL", "980")) + } + + private fun displayManager(): DisplayManager = + RuntimeEnvironment.getApplication().getSystemService(DisplayManager::class.java) + + private fun display(name: String, productName: String? = null, flags: Int = Display.FLAG_PRESENTATION, + productId: String = "test-panel"): Display { + val external = ReflectionHelpers.getStaticField<Int>(Display::class.java, "TYPE_EXTERNAL") + val id = ShadowDisplayManager.addDisplay("w1920dp-h1080dp", external) + return displayManager().getDisplay(id).also { panel -> + shadowOf(panel).setName(name) + shadowOf(panel).setFlags(flags) + Shadow.extract<ProductMetadataDisplay>(panel).productMetadata = productName?.let { + DeviceProductInfo(it, "TCL", productId, 2024, DeviceProductInfo.CONNECTION_TO_SINK_DIRECT) + } + } + } + + // Robolectric exposes display names and flags, but has no product-metadata setter. + @Implements(Display::class) + class ProductMetadataDisplay : ShadowDisplay() { + var productMetadata: DeviceProductInfo? = null + + @Implementation(minSdk = 31) + protected fun getDeviceProductInfo(): DeviceProductInfo? = productMetadata + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesFovTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesFovTest.kt new file mode 100644 index 0000000000..6880a41edf --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesFovTest.kt @@ -0,0 +1,15 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class GlassesFovTest { + @Test fun native1sAspectUsesThePerEyeResolution() { + val native = GlassesState(width = 1920, height = 1200, diagonalFovDeg = 52f) + val stereo = native.copy(width = 3840, sbs = true) + val widescreen = native.copy(height = 1080) + assertEquals(native.verticalFovDeg, stereo.verticalFovDeg, 0.001f) + assertTrue(native.verticalFovDeg > widescreen.verticalFovDeg) + assertEquals(widescreen.verticalFovDeg, native.copy(width = 0, height = 0).verticalFovDeg, 0.001f) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuCaptureTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuCaptureTest.kt new file mode 100644 index 0000000000..e2a5f683d7 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuCaptureTest.kt @@ -0,0 +1,149 @@ +package com.droiddeck.launcher.glasses + +import android.app.Activity +import android.app.Application +import android.app.Dialog +import android.app.Presentation +import android.graphics.SurfaceTexture +import android.hardware.display.DisplayManager +import android.view.Choreographer +import android.view.Surface +import android.view.View +import android.view.WindowManager +import android.widget.FrameLayout +import org.junit.After +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.android.controller.ActivityController +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import org.robolectric.shadows.ShadowDisplayManager + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [29], manifest = Config.NONE, application = Application::class) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesMenuCaptureTest { + private lateinit var controller: ActivityController<Activity> + private lateinit var activity: Activity + private val dialogs = mutableListOf<Dialog>() + + @Before fun setUp() { + controller = Robolectric.buildActivity(Activity::class.java).setup().visible() + activity = controller.get() + activity.window.decorView.layout(0, 0, 1920, 1080) + } + + @After fun tearDown() { + dialogs.forEach { it.dismiss() } + controller.pause().stop().destroy() + } + + @Test fun onlyTheActivityAndItsOwnDialogAreIncludedOnce() { + val own = dialog(activity) + val otherController = Robolectric.buildActivity(Activity::class.java).setup().visible() + val other = otherController.get() + val otherDialog = dialog(other) + try { + val decor = activity.window.decorView + val roots = GlassesMenuCapture.captureRoots(activity, + listOf(other.window.decorView, own, otherDialog, decor, own)) + assertEquals(listOf(decor, own), roots) + } finally { + dialogs.removeAll { if (it.ownerActivity === other) { it.dismiss(); true } else false } + otherController.pause().stop().destroy() + } + } + + @Test fun secureActivityProducesNoRootsAndSecureDialogsAreExcluded() { + val secure = dialog(activity) + val params = secure.layoutParams as WindowManager.LayoutParams + params.flags = params.flags or WindowManager.LayoutParams.FLAG_SECURE + assertEquals(listOf(activity.window.decorView), GlassesMenuCapture.captureRoots(activity, listOf(secure))) + + activity.window.addFlags(WindowManager.LayoutParams.FLAG_SECURE) + assertTrue(GlassesMenuCapture.captureRoots(activity, listOf(secure)).isEmpty()) + activity.window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE) + assertEquals(listOf(activity.window.decorView), GlassesMenuCapture.captureRoots(activity, listOf(secure))) + } + + @Test fun systemWindowsAndPresentationsOnOtherDisplaysAreExcluded() { + val own = dialog(activity) + (own.layoutParams as WindowManager.LayoutParams).type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY + val displayId = ShadowDisplayManager.addDisplay("w1920dp-h1080dp") + val display = activity.getSystemService(DisplayManager::class.java).getDisplay(displayId) + val presentation = Presentation(activity, display).apply { + setContentView(FrameLayout(context)) + show() + }.also(dialogs::add) + try { + assertEquals(listOf(activity.window.decorView), GlassesMenuCapture.captureRoots(activity, + listOf(own, presentation.window!!.decorView))) + } finally { + presentation.dismiss() + dialogs.remove(presentation) + ShadowDisplayManager.removeDisplay(displayId) + } + } + + @Test + @Config(sdk = [26]) + fun olderAndroidCapturesOnlyTheActivityDecor() { + val own = dialog(activity) + assertEquals(listOf(activity.window.decorView), GlassesMenuCapture.captureRoots(activity, listOf(own))) + } + + @Test fun captureSizesPreserveOrientationAndNeverUpscale() { + assertEquals(1920 to 1080, GlassesMenuCapture.captureSize(3840, 2160)) + assertEquals(1080 to 1920, GlassesMenuCapture.captureSize(2160, 3840)) + assertEquals(1200 to 1800, GlassesMenuCapture.captureSize(1200, 1800)) + val fold = GlassesMenuCapture.captureSize(2152, 1812)!! + assertEquals(1920, fold.first) + assertEquals(2152.0 / 1812.0, fold.first.toDouble() / fold.second, 0.001) + assertNull(GlassesMenuCapture.captureSize(0, 1000)) + assertNull(GlassesMenuCapture.captureSize(1000, -1)) + } + + @Test fun repeatedSurfaceFailureStopsOnceAndDoesNotRetryAfterStop() { + var sizes = 0 + var failures = 0 + val capture = GlassesMenuCapture(activity, { _, _ -> sizes++ }, { failures++ }) + val input = SurfaceTexture(0) + val target = Surface(input) + target.release() + try { + capture.attach(input, target) + capture.start() + for (time in listOf(1L, 33_333_335L, 66_666_669L, 100_000_003L)) { + Choreographer.getInstance().removeFrameCallback(capture) + capture.doFrame(time) + } + assertEquals(1, failures) + assertEquals(0, sizes) + assertFalse(pending(capture)) + } finally { + capture.stop() + input.release() + } + } + + @Test fun stoppingRejectsAnAlreadyDispatchedFrameWithoutRescheduling() { + val capture = GlassesMenuCapture(activity, { _, _ -> fail("Stopped capture changed its size") }) + capture.start() + capture.stop() + capture.doFrame(1L) + assertFalse(pending(capture)) + } + + private fun dialog(owner: Activity): View = Dialog(owner).apply { + setOwnerActivity(owner) + setContentView(FrameLayout(context)) + show() + }.also(dialogs::add).window!!.decorView + + private fun pending(capture: GlassesMenuCapture): Boolean = + GlassesMenuCapture::class.java.getDeclaredField("framePending").apply { isAccessible = true }.getBoolean(capture) +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuControllerTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuControllerTest.kt new file mode 100644 index 0000000000..3c539f0ef0 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuControllerTest.kt @@ -0,0 +1,340 @@ +package com.droiddeck.launcher.glasses + +import android.app.Activity +import android.app.Application +import android.hardware.display.DisplayManager +import android.view.Display +import android.view.WindowManager +import com.droiddeck.launcher.QuestXrActivity +import com.droiddeck.launcher.SessionActivity +import org.junit.After +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.android.controller.ActivityController +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import org.robolectric.shadows.ShadowDisplayManager + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], application = Application::class, manifest = Config.NONE) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesMenuControllerTest { + private lateinit var owner: Activity + private lateinit var ownerLifecycle: ActivityController<Activity> + private lateinit var external: Display + private lateinit var menus: GlassesMenuController + private val displays = mutableListOf<Int>() + private val outputs = mutableListOf<FakeOutput>() + private val subscriptions = mutableListOf<Boolean>() + private val scheduled = ArrayDeque<() -> Unit>() + private var target: Display? = null + private var creationError: RuntimeException? = null + private var onCreateOutput: (FakeOutput) -> Unit = {} + private val saved = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, + headTracking = true, screenWidthDm = 35, screenDistanceDm = 45) + private lateinit var glasses: GlassesState + + @Before fun setUp() { + ownerLifecycle = Robolectric.buildActivity(Activity::class.java).setup() + owner = ownerLifecycle.get() + external = addDisplay() + target = external + glasses = GlassesState(present = true, connected = true, controllable = true, + supportsScreen3dof = true, displayId = external.displayId, width = 1920, height = 1080) + menus = GlassesMenuController(GlassesMenuPose(spatialEnabled = { false }), + display = { target }, observe = { subscriptions += it }, + create = { activity, display, failure -> + creationError?.let { throw it } + FakeOutput(activity, display, failure).also { + outputs += it + onCreateOutput(it) + } + }, schedule = { scheduled.addLast(it) }) + menus.update(glasses, saved) + } + + @After fun tearDown() { + menus.pause(owner) + ownerLifecycle.pause().stop().destroy() + displays.forEach(ShadowDisplayManager::removeDisplay) + } + + @Test fun menusStartOnlyForSupportedControlledExternalOutputWithTrackingSelected() { + val invalid = listOf( + glasses.copy(connected = false) to saved, + glasses.copy(controllable = false) to saved, + glasses.copy(supportsScreen3dof = false) to saved, + glasses.copy(noSignal = true) to saved, + glasses.copy(displayId = Display.INVALID_DISPLAY) to saved, + glasses to saved.copy(gameOnGlasses = false), + glasses to saved.copy(headTracking = false), + glasses to saved.copy(picture3d = GlassesSettings.PICTURE_AUTO), + ) + for ((state, preferences) in invalid) { + menus.update(state, preferences) + menus.resume(owner) + assertTrue(outputs.isEmpty()) + assertTrue(subscriptions.isEmpty()) + } + menus.update(glasses, saved) + assertEquals(1, outputs.size) + assertEquals(listOf(true), subscriptions) + assertEquals(1, outputs.single().shows) + assertEquals(saved, outputs.single().settings) + } + + @Test fun absentDisplayAndThePhoneDisplayNeverCreateAnOutput() { + target = null + menus.resume(owner) + target = owner.windowManager.defaultDisplay + menus.update(glasses, saved) + assertTrue(outputs.isEmpty()) + assertTrue(subscriptions.isEmpty()) + target = external + menus.update(glasses, saved) + assertEquals(1, outputs.size) + } + + @Test fun sessionContentIsExcludedUntilItsMenuIsVisibleAndStalePauseCannotCloseNewOwner() { + menus.resume(owner) + val first = outputs.single() + val session = Robolectric.buildActivity(SessionActivity::class.java).get() + menus.resume(session) + assertEquals(1, first.closes) + assertEquals(1, outputs.size) + + menus.setSessionMenuVisible(session, true) + val overlay = outputs.last() + assertSame(session, overlay.owner) + assertEquals(2, outputs.size) + menus.setSessionMenuVisible(session, false) + assertEquals(1, overlay.closes) + + menus.resume(owner) + val latest = outputs.last() + menus.pause(session) + menus.setSessionMenuVisible(session, true) + assertEquals(0, latest.closes) + assertEquals(3, outputs.size) + } + + @Test fun pauseReleasesSubscriptionAndLateFailureCannotCloseAReplacement() { + menus.resume(owner) + val old = outputs.single() + menus.pause(owner) + menus.pause(owner) + assertEquals(1, old.closes) + assertEquals(listOf(true, false), subscriptions) + + menus.resume(owner) + val current = outputs.last() + old.fail(IllegalStateException("late GL callback")) + assertEquals(0, current.closes) + assertEquals(2, outputs.size) + menus.pause(owner) + assertEquals(1, current.closes) + assertFalse(subscriptions.last()) + } + + @Test fun destroyedActivityCannotRecreateItsOutputAfterCleanup() { + val lifecycle = Robolectric.buildActivity(Activity::class.java).setup() + val destroyed = lifecycle.get() + menus.resume(destroyed) + val output = outputs.single() + lifecycle.pause().stop().destroy() + menus.pause(destroyed) + menus.resume(destroyed) + assertEquals(1, output.closes) + assertEquals(1, outputs.size) + assertFalse(subscriptions.last()) + menus.pause(destroyed) + } + + @Test fun secureFinishingAndImmersiveQuestActivitiesCannotBeCaptured() { + owner.window.addFlags(WindowManager.LayoutParams.FLAG_SECURE) + menus.resume(owner) + assertTrue(outputs.isEmpty()) + owner.window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE) + val quest = Robolectric.buildActivity(QuestXrActivity::class.java).get() + menus.resume(quest) + assertTrue(outputs.isEmpty()) + owner.finish() + menus.resume(owner) + assertTrue(outputs.isEmpty()) + } + + @Test fun settingsReconfigureTheSameOutputAndDisablingTrackingClosesIt() { + menus.resume(owner) + val output = outputs.single() + val changed = saved.copy(screenWidthDm = 50, screenDistanceDm = 60, positionalTracking = true) + menus.update(glasses.copy(sbs = true), changed) + assertEquals(1, outputs.size) + assertEquals(2, output.configurations) + assertEquals(changed, output.settings) + assertTrue(output.state!!.sbs) + assertEquals(listOf(true), subscriptions) + + menus.update(glasses, changed.copy(headTracking = false)) + assertEquals(1, output.closes) + assertFalse(subscriptions.last()) + menus.update(glasses, changed) + assertEquals(2, outputs.size) + assertTrue(subscriptions.last()) + } + + @Test fun displayRemovalAndReplacementCloseOldOutputAndRebindOnlyTheCurrentDisplay() { + menus.resume(owner) + val old = outputs.single() + target = null + menus.update(glasses.copy(displayId = Display.INVALID_DISPLAY), saved) + assertEquals(1, old.closes) + assertFalse(subscriptions.last()) + + target = addDisplay() + menus.update(glasses.copy(displayId = target!!.displayId), saved) + assertEquals(2, outputs.size) + assertSame(target, outputs.last().display) + old.fail(IllegalStateException("removed display")) + assertEquals(0, outputs.last().closes) + } + + @Test fun creationFailureIsLatchedUntilPreferencesChangeWithoutSubscribing() { + creationError = IllegalStateException("no EGL display") + menus.resume(owner) + assertTrue(outputs.isEmpty()) + assertTrue(subscriptions.isEmpty()) + creationError = null + menus.update(glasses, saved) + assertTrue(outputs.isEmpty()) + menus.update(glasses, saved.copy(screenWidthDm = 40)) + assertEquals(1, outputs.size) + assertTrue(subscriptions.last()) + } + + @Test fun configureAndShowExceptionsReleaseOutputAndDoNotEscapeUpdates() { + onCreateOutput = { it.showError = IllegalStateException("window removed") } + menus.resume(owner) + assertEquals(1, outputs.single().closes) + assertEquals(listOf(true, false), subscriptions) + + onCreateOutput = {} + menus.update(glasses, saved.copy(screenWidthDm = 40)) + val next = outputs.last() + next.onConfigure = { throw IllegalStateException("surface lost") } + menus.update(glasses, saved) + assertEquals(1, next.closes) + assertFalse(subscriptions.last()) + menus.update(glasses, saved) + assertEquals(2, outputs.size) + } + + @Test fun synchronousFactoryOrConfigureFailureCannotShowOrSubscribeAClosedOutput() { + onCreateOutput = { it.fail(IllegalStateException("creation callback")) } + menus.resume(owner) + assertEquals(0, outputs.single().shows) + assertEquals(1, outputs.single().closes) + assertFalse(subscriptions.contains(true)) + + onCreateOutput = { output -> output.onConfigure = { output.fail(IllegalStateException("configure callback")) } } + menus.update(glasses, saved.copy(screenWidthDm = 40)) + assertEquals(2, outputs.size) + assertEquals(0, outputs.last().shows) + assertEquals(1, outputs.last().closes) + assertFalse(subscriptions.contains(true)) + } + + @Test fun closeFailureStillReleasesObserverAndDoesNotBlockTheNextResume() { + menus.resume(owner) + outputs.single().closeError = IllegalStateException("already destroyed surface") + menus.pause(owner) + assertFalse(subscriptions.last()) + menus.resume(owner) + assertEquals(2, outputs.size) + assertEquals(1, outputs.last().shows) + } + + @Test fun unexpectedDismissalGetsOneScheduledRetryAndStopsAfterASecondFailure() { + menus.resume(owner) + val old = outputs.single() + old.fail(GlassesMenuDisplayStopped()) + assertEquals(1, old.closes) + assertFalse(subscriptions.last()) + assertEquals(1, scheduled.size) + assertEquals(1, outputs.size) + + scheduled.removeFirst().invoke() + assertEquals(2, outputs.size) + assertTrue(subscriptions.last()) + outputs.last().fail(GlassesMenuDisplayStopped()) + assertTrue(scheduled.isEmpty()) + assertFalse(subscriptions.last()) + menus.update(glasses, saved) + assertEquals(2, outputs.size) + + menus.update(glasses, saved.copy(screenWidthDm = 40)) + assertEquals(3, outputs.size) + outputs.last().fail(GlassesMenuDisplayStopped()) + assertEquals(1, scheduled.size) + } + + @Test fun scheduledDismissalRecoveryCannotReopenAfterPauseOrReplaceANewerOutput() { + menus.resume(owner) + outputs.single().fail(GlassesMenuDisplayStopped()) + menus.pause(owner) + scheduled.removeFirst().invoke() + assertEquals(1, outputs.size) + assertFalse(subscriptions.last()) + + menus.resume(owner) + outputs.last().fail(GlassesMenuDisplayStopped()) + menus.pause(owner) + menus.resume(owner) + val replacement = outputs.last() + scheduled.removeFirst().invoke() + assertEquals(3, outputs.size) + assertEquals(0, replacement.closes) + assertTrue(subscriptions.last()) + } + + @Test fun displayResizeAllowsRetryAfterARealRendererFailureWithoutRetryingEveryStateUpdate() { + menus.resume(owner) + outputs.single().fail(IllegalStateException("old surface size")) + assertTrue(scheduled.isEmpty()) + menus.update(glasses.copy(tracking = true), saved) + assertEquals(1, outputs.size) + menus.update(glasses.copy(width = 3840, sbs = true), saved) + assertEquals(2, outputs.size) + assertEquals(3840, outputs.last().state!!.width) + assertTrue(subscriptions.last()) + } + + private fun addDisplay(): Display { + val id = ShadowDisplayManager.addDisplay("w1920dp-h1080dp") + displays += id + return RuntimeEnvironment.getApplication().getSystemService(DisplayManager::class.java).getDisplay(id) + } + + private class FakeOutput(val owner: Activity, val display: Display, val fail: (Throwable) -> Unit) : GlassesMenuController.Output { + var configurations = 0 + var shows = 0 + var closes = 0 + var state: GlassesState? = null + var settings: GlassesSettings? = null + var onConfigure: () -> Unit = {} + var showError: RuntimeException? = null + var closeError: RuntimeException? = null + override fun configure(state: GlassesState, settings: GlassesSettings) { + configurations++ + this.state = state + this.settings = settings + onConfigure() + } + override fun show() { shows++; showError?.let { throw it } } + override fun close() { closes++; closeError?.let { throw it } } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuPoseTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuPoseTest.kt new file mode 100644 index 0000000000..9314160aa9 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuPoseTest.kt @@ -0,0 +1,142 @@ +package com.droiddeck.launcher.glasses + +import com.droiddeck.launcher.gpu.HeadPose +import org.junit.Assert.assertArrayEquals +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test + +class GlassesMenuPoseTest { + private val time = 1_000_000_000L + + @Test fun firstFreshGlassesPoseCentersTheScreenInAllThreeAxes() { + val pose = GlassesMenuPose(spatialEnabled = { false }) + pose.onPose(0.2f, -0.3f, 0.1f, 0.9f, time) + + val frame = pose.snapshot(time) + + assertTrue(frame.valid) + assertArrayEquals(HeadPose.IDENTITY, frame.rotation, 1e-5f) + assertArrayEquals(FloatArray(3), frame.position, 0f) + } + + @Test fun pageConfigurationPreservesTheThreeDofAnchorUntilExplicitRecenter() { + val pose = GlassesMenuPose(spatialEnabled = { false }) + pose.onPose(0f, 0f, 0f, 1f, time) + pose.snapshot(time) + pose.onPose(0f, 0f, 0.1f, 0.995f, time+1) + val moved = pose.snapshot(time+1) + + pose.configure(GlassesSettings(screenWidthDm = 40)) + assertArrayEquals(moved.rotation, pose.snapshot(time+2).rotation, 0f) + assertTrue(moved.rotation.zip(HeadPose.IDENTITY.toList()).any { (a, b) -> kotlin.math.abs(a-b) > 0.1f }) + + pose.recenter() + assertArrayEquals(HeadPose.IDENTITY, pose.snapshot(time+3).rotation, 1e-5f) + } + + @Test fun invalidOldAndFutureSamplesCannotReplaceTheLastSafeView() { + val pose = GlassesMenuPose(spatialEnabled = { false }) + pose.onPose(0f, 0f, 0f, 1f, time) + pose.snapshot(time) + pose.onPose(0f, 0.1f, 0f, 0.995f, time+1) + val valid = pose.snapshot(time+1) + pose.onPose(Float.NaN, 0f, 0f, 1f, time+2) + pose.onPose(0f, 0f, 0f, 0f, time+3) + pose.onPose(0.1f, 0f, 0f, 0.995f, time) + + val stale = pose.snapshot(time+GlassesMenuPose.MAX_AGE_NS+2) + assertFalse(stale.valid) + assertArrayEquals(valid.rotation, stale.rotation, 0f) + pose.onPose(0.1f, 0f, 0f, 0.995f, time+1_000_000_000L) + val future = pose.snapshot(time+20) + assertFalse(future.valid) + assertArrayEquals(valid.rotation, future.rotation, 0f) + } + + @Test fun detachResetDiscardsOldOriginAndHeldPose() { + val pose = GlassesMenuPose(spatialEnabled = { false }) + pose.onPose(0f, 0f, 0f, 1f, time) + pose.snapshot(time) + pose.onPose(0f, 0.2f, 0f, 0.98f, time+1) + pose.snapshot(time+1) + + pose.reset() + assertFalse(pose.snapshot(time+2).valid) + assertArrayEquals(HeadPose.IDENTITY, pose.snapshot(time+2).rotation, 0f) + pose.onPose(0.2f, 0f, 0f, 0.98f, time+3) + assertArrayEquals(HeadPose.IDENTITY, pose.snapshot(time+3).rotation, 1e-5f) + } + + @Test fun spatialScreenPoseKeepsMetresAndHoldsDuringTrackingLoss() { + var current: SpatialPose? = SpatialPose(SpatialVector(0.2f, -0.1f, 0.3f), SpatialRotation(y = 0.1f, w = 0.995f)) + var recenters = 0 + val pose = GlassesMenuPose({ true }, { current }, { recenters++ }) + pose.configure(GlassesSettings(positionalTracking = true)) + val valid = pose.snapshot(time) + + assertTrue(valid.spatial) + assertTrue(valid.valid) + assertArrayEquals(floatArrayOf(0.2f, -0.1f, 0.3f), valid.position, 0f) + current = null + val lost = pose.snapshot(time+1) + assertFalse(lost.valid) + assertArrayEquals(valid.position, lost.position, 0f) + assertArrayEquals(valid.rotation, lost.rotation, 0f) + pose.recenter() + assertEquals(1, recenters) + } + + @Test fun disabledTrackingReturnsAnUntranslatedCenteredView() { + val pose = GlassesMenuPose({ true }, { SpatialPose(SpatialVector(x = 0.2f)) }, {}) + pose.configure(GlassesSettings(positionalTracking = true)) + pose.snapshot(time) + + pose.configure(GlassesSettings(headTracking = false, positionalTracking = true)) + + val frame = pose.snapshot(time+1) + assertFalse(frame.valid) + assertArrayEquals(HeadPose.IDENTITY, frame.rotation, 0f) + assertArrayEquals(FloatArray(3), frame.position, 0f) + } + + @Test fun menuRecenterChangesTheScreenOriginWithoutMovingTheVrFloorOrigin() { + val session = SpatialSession() + session.reset(1, 1.6f) + session.accept(SpatialSample(SpatialPose(SpatialVector(1f, 2f, 3f)), time, 1, true)) + session.accept(SpatialSample(SpatialPose(SpatialVector(1.2f, 2.1f, 3f)), time+1, 1, true)) + val pose = GlassesMenuPose({ true }, { now -> session.view(true).takeIf { session.valid(now) } }, + { session.recenter(true, time+1) }) + pose.configure(GlassesSettings(positionalTracking = true)) + val vrBefore = session.view(false)!! + assertArrayEquals(floatArrayOf(0.2f, 0.1f, 0f), pose.snapshot(time+1).position, 1e-5f) + + pose.recenter() + + assertArrayEquals(FloatArray(3), pose.snapshot(time+1).position, 1e-5f) + assertEquals(vrBefore, session.view(false)) + } + + @Test fun malformedSpatialPoseCannotReplaceTheHeldView() { + var current = SpatialPose(SpatialVector(x = 0.1f)) + val pose = GlassesMenuPose({ true }, { current }, {}) + pose.configure(GlassesSettings(positionalTracking = true)) + val valid = pose.snapshot(time) + + current = SpatialPose(SpatialVector(x = Float.NaN)) + assertFalse(pose.snapshot(time+1).valid) + assertArrayEquals(valid.position, pose.snapshot(time+1).position, 0f) + current = SpatialPose(rotation = SpatialRotation(w = 0f)) + assertFalse(pose.snapshot(time+2).valid) + assertArrayEquals(valid.rotation, pose.snapshot(time+2).rotation, 0f) + } + + @Test fun snapshotsDoNotExposeTheHeldArraysForMutation() { + val pose = GlassesMenuPose(spatialEnabled = { false }) + pose.onPose(0f, 0f, 0f, 1f, time) + pose.snapshot(time).rotation.fill(Float.NaN) + + assertArrayEquals(HeadPose.IDENTITY, pose.snapshot(time+GlassesMenuPose.MAX_AGE_NS+1).rotation, 1e-5f) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuProjectionTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuProjectionTest.kt new file mode 100644 index 0000000000..d1cd22769a --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMenuProjectionTest.kt @@ -0,0 +1,82 @@ +package com.droiddeck.launcher.glasses + +import com.droiddeck.launcher.gpu.HeadPose +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Test + +class GlassesMenuProjectionTest { + private fun frame(rotation: FloatArray = HeadPose.IDENTITY, position: FloatArray = FloatArray(3)) = + GlassesMenuPose.Frame(rotation, position, true, false) + + private fun hit(pose: GlassesMenuPose.Frame = frame(), x: Float = 0f, y: Float = 0f, eye: Float = 0f, + aspect: Float = 2f) = GlassesMenuProjection.intersect(pose, x, y, eye, 1f, 3f, aspect) + + @Test fun centeredForwardRaySamplesTheTextureCenter() { + assertEquals(GlassesMenuProjection.Uv(0.5f, 0.5f), hit()) + } + + @Test fun screenTopAndRightRaysUseTopLeftTextureCoordinates() { + val topRight = hit(x = 1f/3f, y = -1f/6f)!! + assertEquals(1f, topRight.x, 1e-5f) + assertEquals(0f, topRight.y, 1e-5f) + } + + @Test fun eyeOriginsShiftByPhysicalIpdWhileMonoUsesTheCenter() { + val left = hit(eye = -GlassesMenuSurface.IPD_METERS/2)!! + val right = hit(eye = GlassesMenuSurface.IPD_METERS/2)!! + assertEquals(0.484f, left.x, 1e-5f) + assertEquals(0.516f, right.x, 1e-5f) + assertEquals(0.5f, hit()!!.x, 0f) + } + + @Test fun translatedHeadUsesMetresInTheAnchoredScreenFrame() { + val translated = hit(frame(position = floatArrayOf(0.2f, 0.1f, 0f)))!! + assertEquals(0.6f, translated.x, 1e-5f) + assertEquals(0.4f, translated.y, 1e-5f) + } + + @Test fun rowMajorPositiveYawTurnsTheForwardRayTowardNegativeX() { + val angle = Math.toRadians(10.0) + val rotation = SpatialRotation(y = kotlin.math.sin(angle/2).toFloat(), w = kotlin.math.cos(angle/2).toFloat()).matrix() + assertEquals(0.5f - 1.5f*kotlin.math.tan(angle).toFloat(), hit(frame(rotation))!!.x, 1e-5f) + } + + @Test fun aRayBehindTheHeadOrOutsideThePlaneHasNoUiHit() { + assertNull(hit(frame(rotation = SpatialRotation(y = 1f, w = 0f).matrix()))) + assertNull(hit(x = 1f)) + assertNull(hit(frame(position = floatArrayOf(0f, 0f, -4f)))) + } + + @Test fun sourceAspectChangesThePlaneHeightWithoutStretchingItsWidth() { + assertNotNull(hit(y = 0.2f, aspect = 1f)) + assertNull(hit(y = 0.2f, aspect = 2f)) + } + + @Test fun nonFiniteInputsCannotCreateTextureCoordinates() { + assertNull(hit(x = Float.NaN)) + assertNull(hit(frame(position = floatArrayOf(Float.POSITIVE_INFINITY, 0f, 0f)))) + } +} + +private object GlassesMenuProjection { + data class Uv(val x: Float, val y: Float) + + // Row-major head-to-anchor rotation; +Y is up, -Z is forward, output UV starts at the top left. + fun intersect(frame: GlassesMenuPose.Frame, rayX: Float, rayY: Float, eye: Float, + halfWidth: Float, distance: Float, aspect: Float): Uv? { + if (frame.rotation.size != 9 || frame.position.size != 3 || frame.rotation.any { !it.isFinite() } || + frame.position.any { !it.isFinite() } || listOf(rayX, rayY, eye, halfWidth, distance, aspect).any { !it.isFinite() } || + halfWidth <= 0f || distance <= 0f || aspect <= 0f) return null + val r = frame.rotation + val d = FloatArray(3) { row -> r[row*3]*rayX - r[row*3+1]*rayY - r[row*3+2] } + val o = FloatArray(3) { row -> frame.position[row] + r[row*3]*eye } + if (d[2] >= -0.0001f) return null + val t = (-distance-o[2]) / d[2] + if (t <= 0f) return null + val u = (o[0]+d[0]*t) / halfWidth * 0.5f + 0.5f + val v = -(o[1]+d[1]*t) * aspect / halfWidth * 0.5f + 0.5f + return Uv(u, v).takeIf { u in 0f..1f && v in 0f..1f } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMirrorPacingTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMirrorPacingTest.kt new file mode 100644 index 0000000000..359fcfe30c --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesMirrorPacingTest.kt @@ -0,0 +1,87 @@ +package com.droiddeck.launcher.glasses + +import android.hardware.display.DisplayManager +import android.view.Display +import androidx.compose.runtime.MutableState +import com.droiddeck.launcher.SessionActivity +import com.droiddeck.launcher.session.SessionState +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import org.robolectric.annotation.Implementation +import org.robolectric.annotation.Implements +import org.robolectric.annotation.LooperMode +import org.robolectric.shadow.api.Shadow +import org.robolectric.shadows.ShadowDisplay +import org.robolectric.shadows.ShadowDisplayManager +import org.robolectric.util.ReflectionHelpers + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [31, 34], manifest = Config.NONE, shadows = [GlassesMirrorPacingTest.ModeDisplay::class]) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesMirrorPacingTest { + private lateinit var activity: SessionActivity + private val connected = GlassesState(present = true, displayId = 2, width = 1920, height = 1080) + private val settings = GlassesSettings(gameOnGlasses = false, refreshHz = 60) + + @Before fun setup() { + activity = Robolectric.buildActivity(SessionActivity::class.java).get() + val display = activity.getSystemService(DisplayManager::class.java).getDisplay(Display.DEFAULT_DISPLAY) + ReflectionHelpers.setField(activity, "mBase", activity.baseContext.createDisplayContext(display)) + val panel = Shadow.extract<ModeDisplay>(activity.display) + panel.supported = arrayOf(mode(1, 60f), mode(2, 90f), mode(3, 120f)) + panel.current = panel.supported.last() + SessionState.fpsLimit = 0 + } + + @After fun cleanup() { SessionState.fpsLimit = 0 } + + @Test fun connectingChangingRateAndDisconnectingUpdatePhonePacingWithoutSavingPreferences() { + apply(connected, settings) + expect(1, 60f, 60) + apply(connected, settings.copy(refreshHz = 90)) + expect(2, 90f, 90) + apply(GlassesState(), settings) + expect(3, 120f, 0) + assertEquals(0, SessionState.fpsLimit) + } + + @Test fun lowerSavedLimitSurvivesMirroringAndStalePhoneRefreshReports() { + SessionState.fpsLimit = 30 + apply(connected, settings) + expect(1, 60f, 30) + apply(connected.copy(hz = 120f), settings) + expect(1, 60f, 30) + apply(GlassesState(), settings) + expect(3, 120f, 30) + assertEquals(30, SessionState.fpsLimit) + } + + private fun apply(state: GlassesState, config: GlassesSettings) { + ReflectionHelpers.getField<MutableState<GlassesState>>(activity, "glasses\$delegate").value = state + ReflectionHelpers.getField<MutableState<GlassesSettings>>(activity, "glassesSettings\$delegate").value = config + ReflectionHelpers.callInstanceMethod<Void>(activity, "applyOutputPacing") + } + + private fun expect(mode: Int, hz: Float, fps: Int) { + assertEquals(mode, activity.window.attributes.preferredDisplayModeId) + assertEquals(hz, ReflectionHelpers.callInstanceMethod<Float>(activity, "refreshHz"), 0.01f) + assertEquals(fps, ReflectionHelpers.callInstanceMethod<Int>(activity, "outputFpsLimit").toInt()) + } + + private fun mode(id: Int, hz: Float): Display.Mode = ShadowDisplayManager.ModeBuilder.modeBuilder(id) + .setWidth(1080).setHeight(2520).setRefreshRate(hz).build() + + @Implements(Display::class) + class ModeDisplay : ShadowDisplay() { + lateinit var current: Display.Mode + var supported = emptyArray<Display.Mode>() + @Implementation protected fun getMode(): Display.Mode = current + @Implementation protected fun getSupportedModes(): Array<Display.Mode> = supported + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesModeStateTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesModeStateTest.kt new file mode 100644 index 0000000000..0ed5629837 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesModeStateTest.kt @@ -0,0 +1,162 @@ +package com.droiddeck.launcher.glasses + +import com.droiddeck.launcher.glasses.GlassesModeState.Confirmation +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test + +class GlassesModeStateTest { + private val device = GlassesModeState.Device(0x101d, "pro") + private val state = GlassesModeState(20_000).apply { updateDevice(device, 0) } + + @Test fun transientFallbackDoesNotRejectAWorkingStereoTransition() { + state.sent(true, 100) + assertEquals(Confirmation.WAITING, state.observe(false, 2_000)) + assertEquals(Confirmation.WAITING, state.observe(false, 19_000)) + assertFalse(state.restorePending) + assertEquals(Confirmation.CONFIRMED, state.observe(true, 19_500)) + assertFalse(state.pendingStereo) + assertEquals(Confirmation.NONE, state.observe(false, 20_100)) + } + + @Test fun missingSignalAtDeadlineRequestsOneFallback() { + state.sent(true, 100) + assertEquals(Confirmation.WAITING, state.observe(false, 20_099)) + assertEquals(Confirmation.FAILED, state.observe(false, 20_100)) + assertTrue(state.restorePending) + assertEquals(Confirmation.NONE, state.observe(false, 40_000)) + state.sent(false, 40_001) + assertFalse(state.restorePending) + assertFalse(state.stopVr()) + } + + @Test fun stoppingVrBeforeStereoAppearsStillRestores2d() { + state.sent(true, 100) + state.startVr() + assertTrue(state.stopVr()) + assertTrue(state.restorePending) + state.sent(false, 200) + assertFalse(state.pendingStereo) + assertFalse(state.restorePending) + assertFalse(state.stopVr()) + assertEquals(Confirmation.NONE, state.observe(true, 400)) + } + + @Test fun failedRevertRemainsPendingUntilAWriteSucceeds() { + state.sent(true, 100) + state.startVr() + state.observe(true, 200) + state.stopVr() + state.cancelPending() + assertTrue(state.restorePending) + assertTrue(state.stopVr()) + state.sent(false, 300) + assertFalse(state.restorePending) + } + + @Test fun manualModeTakesOwnershipFromVr() { + state.sent(true, 100) + state.startVr() + state.manual() + state.sent(true, 200) + assertFalse(state.stopVr()) + assertFalse(state.restorePending) + assertEquals(Confirmation.CONFIRMED, state.observe(true, 300)) + } + + @Test fun manualRetryGetsItsOwnConfirmationWindow() { + state.sent(true, 100) + assertEquals(Confirmation.FAILED, state.observe(false, 20_100)) + state.sent(false, 20_101) + state.manual() + state.sent(true, 30_000) + assertEquals(Confirmation.WAITING, state.observe(false, 49_999)) + assertEquals(Confirmation.CONFIRMED, state.observe(true, 50_000)) + assertFalse(state.restorePending) + } + + @Test fun cancelledOrDisconnectedRequestCannotFailLater() { + state.sent(true, 100) + state.cancelPending() + assertFalse(state.pendingStereo) + assertEquals(Confirmation.NONE, state.observe(false, 20_100)) + assertFalse(state.restorePending) + } + + @Test fun manual2dCancelsThePendingStereoDeadline() { + state.sent(true, 100) + state.manual() + state.sent(false, 200) + assertFalse(state.pendingStereo) + assertEquals(Confirmation.NONE, state.observe(false, 20_100)) + } + + @Test fun modeReenumerationPreservesDeadlineAndVrOwnership() { + state.sent(true, 100) + state.startVr() + assertFalse(state.updateDevice(null, 1_000)) + assertEquals(Confirmation.WAITING, state.observe(false, 1_000)) + assertFalse(state.updateDevice(device, 2_000)) + assertEquals(20_100L, state.nextCheckAt) + assertEquals(Confirmation.CONFIRMED, state.observe(true, 3_000)) + assertTrue(state.stopVr()) + } + + @Test fun absentAtDeadlineCancelsWithoutFailureOrLateRestore() { + state.sent(true, 100) + state.startVr() + state.updateDevice(null, 1_000) + state.stopVr() + assertEquals(Confirmation.NONE, state.observe(false, 20_100)) + assertFalse(state.restorePending) + assertNull(state.nextCheckAt) + assertFalse(state.updateDevice(device, 40_000)) + assertFalse(state.stopVr()) + } + + @Test fun differentModelOrKnownSerialCannotInheritARequest() { + listOf(GlassesModeState.Device(0x1131, "pro"), device.copy(serial = "other")).forEach { other -> + state.updateDevice(device, 0) + state.sent(true, 100) + state.startVr() + state.updateDevice(null, 1_000) + assertTrue(state.updateDevice(other, 2_000)) + assertFalse(state.pendingStereo) + assertFalse(state.stopVr()) + } + } + + @Test fun permissionPendingReconnectKeepsTheKnownIdentity() { + state.sent(true, 100) + state.startVr() + state.updateDevice(null, 1_000) + assertFalse(state.updateDevice(device.copy(serial = null), 2_000)) + assertTrue(state.pendingStereo) + assertTrue(state.updateDevice(device.copy(serial = "other"), 3_000)) + assertFalse(state.pendingStereo) + assertFalse(state.stopVr()) + } + + @Test fun sameDeviceReconnectDoesNotResetFailureStatus() { + state.sent(true, 100) + assertEquals(Confirmation.FAILED, state.observe(false, 20_100)) + state.sent(false, 20_101) + assertFalse(state.updateDevice(null, 21_000)) + assertFalse(state.updateDevice(device, 22_000)) + } + + @Test fun confirmedVrCannotRestoreAfterAProlongedUnplug() { + state.sent(true, 100) + state.startVr() + state.observe(true, 200) + state.updateDevice(null, 1_000) + assertTrue(state.stopVr()) + assertEquals(21_000L, state.nextCheckAt) + state.updateDevice(device, 22_000) + assertFalse(state.restorePending) + assertFalse(state.stopVr()) + assertNull(state.nextCheckAt) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesOutputHandoffTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesOutputHandoffTest.kt new file mode 100644 index 0000000000..e1258f4893 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesOutputHandoffTest.kt @@ -0,0 +1,99 @@ +package com.droiddeck.launcher.glasses + +import android.hardware.display.DisplayManager +import android.view.Display +import android.view.SurfaceHolder +import android.view.SurfaceView +import android.view.View +import androidx.compose.runtime.MutableState +import com.droiddeck.launcher.SessionActivity +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import org.robolectric.shadows.ShadowDisplayManager +import org.robolectric.util.ReflectionHelpers +import org.robolectric.util.ReflectionHelpers.ClassParameter.from + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [31, 34], manifest = Config.NONE) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesOutputHandoffTest { + private lateinit var activity: SessionActivity + private lateinit var phone: SurfaceView + private lateinit var screen: GlassesScreen + + @Before fun setup() { + // Exercise the output lifecycle without starting the native Linux runtime. + activity = Robolectric.buildActivity(SessionActivity::class.java).get() + phone = SurfaceView(activity) + ReflectionHelpers.setField(activity, "surfaceView", phone) + ReflectionHelpers.setField(activity, "ended", true) + val app = RuntimeEnvironment.getApplication() + val id = ShadowDisplayManager.addDisplay("w1920dp-h1080dp") + val display = app.getSystemService(DisplayManager::class.java).getDisplay(id) + shadowOf(display).setFlags(Display.FLAG_PRESENTATION) + screen = GlassesScreen(activity, display, 60, activity) + ReflectionHelpers.setField(activity, "glassesScreen", screen) + } + + @Test fun selectingGlassesDoesNotHidePhoneOrClaimOutputBeforeAttachment() { + assertFalse(active()) + assertEquals(View.VISIBLE, phone.visibility) + attach(phone.holder) // A late phone callback must not complete the handoff. + assertFalse(active()) + assertEquals(View.VISIBLE, phone.visibility) + } + + @Test fun attachingGlassesRemovesPhoneSurfaceButPreservesItsInputLayout() { + phone.layout(0, 0, 1200, 800) + attach(screen.holder) + + assertTrue(active()) + assertEquals(View.INVISIBLE, phone.visibility) + assertEquals(1200, phone.width) + assertEquals(800, phone.height) + } + + @Test fun latePhoneDestructionDoesNotResetTheGlassesOutput() { + attach(screen.holder) + ReflectionHelpers.setField(activity, "surfaceW", 3840) + ReflectionHelpers.setField(activity, "surfaceH", 1080) + + activity.surfaceDestroyed(phone.holder) + + assertTrue(active()) + assertEquals(3840, ReflectionHelpers.getField<Int>(activity, "surfaceW")) + assertEquals(1080, ReflectionHelpers.getField<Int>(activity, "surfaceH")) + } + + @Test fun disconnectRestoresPhoneAndRejectsLateGlassesAttachment() { + attach(screen.holder) + ReflectionHelpers.callInstanceMethod<Void>(activity, "restorePhoneOutput", from(GlassesScreen::class.java, screen)) + + assertFalse(active()) + assertEquals(View.VISIBLE, phone.visibility) + attach(screen.holder) + assertFalse(active()) + assertEquals(View.VISIBLE, phone.visibility) + } + + @Test fun losingGlassesSurfaceClearsThePlayingHint() { + attach(screen.holder) + activity.surfaceDestroyed(screen.holder) + assertFalse(active()) + } + + private fun attach(holder: SurfaceHolder) { + ReflectionHelpers.callInstanceMethod<Void>(activity, "onOutputAttached", from(SurfaceHolder::class.java, holder)) + } + + private fun active(): Boolean = + ReflectionHelpers.getField<MutableState<Boolean>>(activity, "glassesOutputActive\$delegate").value +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesRenderingTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesRenderingTest.kt new file mode 100644 index 0000000000..401d247013 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesRenderingTest.kt @@ -0,0 +1,233 @@ +package com.droiddeck.launcher.glasses + +import com.droiddeck.launcher.gpu.Cardboard +import org.junit.Assert.* +import org.junit.Test + +class GlassesRenderingTest { + private val ultra = GlassesState( + model = "VITURE Luma Ultra", connected = true, controllable = true, + displayId = 2, width = 1920, height = 1200, + ) + private val base = Cardboard(ipdMm = 67) + + @Test fun thirtyHzRequiresANativeModeAndDedicatedGlassesOutput() { + val settings = GlassesSettings(refreshHz = 30, sbsHz = 30) + for (stereo in listOf(false, true)) for (sbs90 in listOf(false, true)) { + val state = ultra.copy(sbs = stereo, sbs90 = sbs90, supports30Hz = true) + assertTrue(GlassesRendering.refreshRates(settings, state).contains(30)) + assertEquals(30, GlassesRendering.outputHz(settings, state)) + assertEquals(60, GlassesRendering.mirrorRefreshLimit(settings, state.copy(hz = 60f), false)) + assertEquals(30, GlassesRendering.mirrorRefreshLimit(settings, state.copy(hz = 29.97f), false)) + for (unavailable in listOf(state.copy(supports30Hz = false), state.copy(noSignal = true), state.copy(displayId = -1))) { + assertFalse(GlassesRendering.refreshRates(settings, unavailable).contains(30)) + assertEquals(60, GlassesRendering.outputHz(settings, unavailable)) + } + val mirrored = settings.copy(gameOnGlasses = false) + assertFalse(GlassesRendering.refreshRates(mirrored, state).contains(30)) + assertEquals(60, GlassesRendering.outputHz(mirrored, state)) + assertEquals(60, GlassesRendering.mirrorRefreshLimit(mirrored, state, false)) + } + } + + @Test fun mirroredRefreshUsesTheSelectedGlassesRateEvenBeforeTheDisplaySwitches() { + val settings = GlassesSettings(gameOnGlasses = false, refreshHz = 60) + assertEquals(60, GlassesRendering.mirrorRefreshLimit(settings, ultra.copy(hz = 120f), false)) + assertEquals(90, GlassesRendering.mirrorRefreshLimit(settings.copy(refreshHz = 90), ultra, false)) + assertEquals(60, GlassesRendering.mirrorRefreshLimit(settings, ultra.copy(connected = false), false)) + } + + @Test fun mirroredStereoUsesTheStereoRefreshAndItsHardwareLimit() { + val settings = GlassesSettings(refreshHz = 120, sbsHz = 90) + assertEquals(60, GlassesRendering.mirrorRefreshLimit(settings, ultra.copy(sbs = true), false)) + assertEquals(90, GlassesRendering.mirrorRefreshLimit(settings, ultra.copy(sbs = true, sbs90 = true), false)) + } + + @Test fun disconnectOrDedicatedOutputRemovesTheMirrorCap() { + val settings = GlassesSettings(refreshHz = 60) + assertEquals(0, GlassesRendering.mirrorRefreshLimit(settings, GlassesState(), false)) + assertEquals(0, GlassesRendering.mirrorRefreshLimit(settings, ultra.copy(noSignal = true), false)) + assertEquals(0, GlassesRendering.mirrorRefreshLimit(settings, ultra, true)) + } + + @Test fun mirrorCapPreservesLowerLimitsAndRestoresTheRequestedLimitAfterDisconnect() { + for (requested in listOf(0, 30, 60, 90, 120)) { + assertEquals(if (requested == 30) 30 else 60, GlassesRendering.fpsLimit(requested, 60)) + assertEquals(requested, GlassesRendering.fpsLimit(requested, 0)) + } + } + + private fun render(settings: GlassesSettings, state: GlassesState = ultra, steamVr: Boolean = false) = + GlassesRendering.cardboard(base, settings, state, outputActive = true, steamVrRunning = steamVr) + + @Test fun steamVrDefaultsToOneTrackedEyeWithoutRequestingStereo() { + val settings = GlassesSettings() + assertFalse(settings.auto3d) + val projection = render(settings, steamVr = true) + assertTrue(projection.enabled) + assertTrue(projection.mono) + assertTrue(projection.headTracking) + assertEquals(Cardboard.SOURCE_SBS, projection.source) + } + + @Test fun automatic2dIsFlatSoVirtualScreenSettingsDoNotApply() { + val settings = GlassesSettings(screenWidthDm = 40, screenDistanceDm = 80) + assertEquals(GlassesRendering.Picture.FLAT, GlassesRendering.picture(settings, false, false)) + assertEquals(Cardboard.OFF, render(settings)) + assertEquals(Cardboard.OFF, render(settings.copy(screenWidthDm = 10, screenDistanceDm = 10))) + } + + @Test fun selectingVirtualScreenMakesSizeDistanceAndTrackingReachTheRendererIn2d() { + val settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, + screenWidthDm = 40, screenDistanceDm = 80) + val projection = render(settings) + assertTrue(projection.enabled) + assertTrue(projection.mono) + assertTrue(projection.headTracking) + assertEquals(Cardboard.SOURCE_SCREEN, projection.source) + assertEquals(40, projection.screenWidthDm) + assertEquals(80, projection.screenDistanceDm) + assertEquals(67, projection.ipdMm) + val changed = render(settings.copy(screenWidthDm = 15, screenDistanceDm = 20, headTracking = false)) + assertEquals(15, changed.screenWidthDm) + assertEquals(20, changed.screenDistanceDm) + assertFalse(changed.headTracking) + } + + @Test fun automaticSbsDuplicatesTheWholeFrameWithoutEnablingHeadTracking() { + val settings = GlassesSettings() + val stereo = ultra.copy(sbs = true, width = 3840) + assertEquals(GlassesRendering.Picture.DUPLICATED, GlassesRendering.picture(settings, true, false)) + assertEquals(Cardboard.SOURCE_FLAT, render(settings, stereo).source) + assertFalse(render(settings, stereo).headTracking) + assertFalse(render(settings, stereo).mono) + assertEquals(GlassesRendering.Picture.STEREO, GlassesRendering.picture(settings, true, true)) + assertEquals(Cardboard.SOURCE_SBS, render(settings, stereo, steamVr = true).source) + assertTrue(render(settings, stereo, steamVr = true).headTracking) + } + + @Test fun flatSbsDoesNotDependOnTheTrackingPreferenceOrUsbControl() { + for (tracking in listOf(false, true)) for (connected in listOf(false, true)) { + for (height in listOf(1080, 1200)) { + val state = ultra.copy(sbs = true, width = 3840, height = height, connected = connected) + val settings = GlassesSettings(headTracking = tracking) + val flat = render(settings, state) + assertTrue(flat.enabled) + assertFalse(flat.mono) + assertFalse(flat.headTracking) + assertEquals(Cardboard.SOURCE_FLAT, flat.source) + assertEquals(Cardboard.SOURCE_SBS, render(settings.copy(picture3d = GlassesSettings.PICTURE_SBS), state).source) + } + } + } + + @Test fun virtualScreenTracksFlatContentIndependentlyOfTheHardwareSbsMode() { + val settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN) + assertTrue(settings.screen3dof) + assertFalse(settings.copy(headTracking = false).screen3dof) + for (height in listOf(1080, 1200)) { + for (sbs in listOf(false, true)) { + val projection = render(settings, ultra.copy(width = if (sbs) 3840 else 1920, height = height, sbs = sbs)) + assertTrue(projection.enabled) + assertTrue(projection.headTracking) + assertEquals(Cardboard.SOURCE_SCREEN, projection.source) + assertEquals(!sbs, projection.mono) + } + } + } + + @Test fun explicitPictureChoiceOverridesAutomaticResolutionOutsideSteamVr() { + val virtual = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN) + val direct = GlassesSettings(picture3d = GlassesSettings.PICTURE_SBS) + for (stereo in listOf(false, true)) { + assertEquals(GlassesRendering.Picture.VIRTUAL_SCREEN, GlassesRendering.picture(virtual, stereo, false)) + assertEquals(GlassesRendering.Picture.STEREO, GlassesRendering.picture(direct, stereo, false)) + } + } + + @Test fun steamVrSplitsTheEyePairRegardlessOfTheSavedFlatGamePicture() { + for (picture in listOf(GlassesSettings.PICTURE_AUTO, GlassesSettings.PICTURE_SCREEN, GlassesSettings.PICTURE_SBS)) { + val settings = GlassesSettings(picture3d = picture, auto3d = true) + for (stereo in listOf(false, true)) for (outputActive in listOf(false, true)) { + val state = ultra.copy(sbs = stereo, width = if (stereo) 3840 else 1920) + val projection = GlassesRendering.cardboard(base, settings, state, outputActive, true) + assertEquals(GlassesRendering.Picture.STEREO, GlassesRendering.picture(settings, stereo, true)) + assertEquals(Cardboard.SOURCE_SBS, projection.source) + assertEquals(!stereo, projection.mono) + assertTrue(projection.enabled) + assertTrue(projection.headTracking) + } + } + } + + @Test fun stoppingSteamVrRestoresTheSavedVirtualScreen() { + val settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, auto3d = true, + screenWidthDm = 18, screenDistanceDm = 30) + val before = render(settings) + assertEquals(Cardboard.SOURCE_SCREEN, before.source) + assertEquals(Cardboard.SOURCE_SBS, render(settings, steamVr = true).source) + assertEquals(before, render(settings)) + assertEquals(GlassesSettings.PICTURE_SCREEN, settings.picture3d) + } + + @Test fun mirrorModeKeepsThePhoneProjectionInsteadOfApplyingDormantGlassesSettings() { + val phone = base.copy(enabled = true, screenWidthDm = 60, screenDistanceDm = 20) + val settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, + gameOnGlasses = false, screenWidthDm = 10, screenDistanceDm = 50) + assertSame(phone, GlassesRendering.cardboard(phone, settings, ultra, false, false)) + } + + @Test fun steamVrOnPhoneKeepsHeadsetActiveWithoutEnablingTheSavedCardboardSetting() { + val settings = GlassesSettings(gameOnGlasses = false, headTracking = false, + picture3d = GlassesSettings.PICTURE_SCREEN) + for (state in listOf(ultra.copy(displayId = -1), GlassesState())) { + val preview = GlassesRendering.cardboard(base, settings, state, false, true) + assertTrue(preview.enabled) // Published as headset proximity, preventing standby. + assertTrue(preview.mono) + assertEquals(Cardboard.SOURCE_SBS, preview.source) + assertEquals(Cardboard.Viewer.NONE.id, preview.viewer) + assertTrue(preview.headTracking) // Phone preference, not dormant glasses settings. + assertFalse(base.enabled) + assertSame(base, GlassesRendering.cardboard(base, settings, state, false, false)) + } + val noTracking = base.copy(headTracking = false) + assertFalse(GlassesRendering.cardboard(noTracking, settings, GlassesState(), false, true).headTracking) + } + + @Test fun steamVrKeepsAnEnabledPhoneViewerAndSwitchesBackToGlassesRenderingOnHandoff() { + val phone = base.copy(enabled = true, source = Cardboard.SOURCE_SBS) + val settings = GlassesSettings() + assertSame(phone, GlassesRendering.cardboard(phone, settings, GlassesState(), false, true)) + val glasses = GlassesRendering.cardboard(base, settings, ultra.copy(sbs = true), true, true) + assertTrue(glasses.enabled) + assertFalse(glasses.mono) + assertEquals(Cardboard.Viewer.VITURE.id, glasses.viewer) + assertEquals(Cardboard.SOURCE_SBS, glasses.source) + } + + @Test fun steamVrMirroringKeepsTheSameGlassesPictureAndSensorSource() { + for (stereo in listOf(false, true)) { + val state = ultra.copy(sbs = stereo) + for (picture in listOf(GlassesSettings.PICTURE_AUTO, GlassesSettings.PICTURE_SCREEN, GlassesSettings.PICTURE_SBS)) { + val settings = GlassesSettings(picture3d = picture) + val dedicated = GlassesRendering.cardboard(base, settings, state, true, true) + val mirrored = GlassesRendering.cardboard(base, settings.copy(gameOnGlasses = false), state, false, true) + assertEquals(dedicated, mirrored) + assertTrue(mirrored.enabled) + assertTrue(mirrored.headTracking) + assertTrue(GlassesRendering.usesGlasses(state, false, true)) + } + } + assertFalse(GlassesRendering.usesGlasses(ultra, false, false)) + assertFalse(GlassesRendering.usesGlasses(GlassesState(), false, true)) + assertTrue(GlassesRendering.usesGlasses(ultra, true, false)) + } + + @Test fun missingUsbControlOnlyDisablesTrackingNotScreenSize() { + val settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, screenWidthDm = 35) + val projection = render(settings, ultra.copy(connected = false)) + assertTrue(projection.enabled) + assertFalse(projection.headTracking) + assertEquals(35, projection.screenWidthDm) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesScreenTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesScreenTest.kt new file mode 100644 index 0000000000..6d1ecb1c2e --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesScreenTest.kt @@ -0,0 +1,146 @@ +package com.droiddeck.launcher.glasses + +import android.hardware.display.DisplayManager +import android.view.Display +import android.view.SurfaceHolder +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.Implementation +import org.robolectric.annotation.Implements +import org.robolectric.annotation.LooperMode +import org.robolectric.shadow.api.Shadow +import org.robolectric.shadows.ShadowDisplay +import org.robolectric.shadows.ShadowDisplayManager + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [31, 34], manifest = Config.NONE, shadows = [GlassesScreenTest.ModeDisplay::class]) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesScreenTest { + @Test fun recoveryCoversTheExistingRenderSurfaceWithoutReplacingIt() { + val flat=mode(1,1920,1200,60f) + val (screen,_)=screen(flat,arrayOf(flat),60) + val holder=screen.holder + val root=screen.surfaceView.parent as android.view.ViewGroup + assertTrue(root.indexOfChild(screen.trackingRecovery)>root.indexOfChild(screen.surfaceView)) + screen.trackingRecovery.update(TrackingRecovery.LOST,false) + assertEquals(android.view.View.VISIBLE,screen.trackingRecovery.visibility) + screen.trackingRecovery.update(null,false) + assertEquals(android.view.View.GONE,screen.trackingRecovery.visibility) + assertTrue(holder===screen.holder) + } + + @Test fun nativeThirtyHzMustMatchBothDimensionsOfTheCurrentEyeLayout() { + val flat60 = mode(1, 1920, 1200, 60f) + val flat30 = mode(2, 1920, 1200, 29.97f) + val stereo60 = mode(3, 3840, 1200, 60f) + val stereo30 = mode(4, 3840, 1200, 30f) + val short30 = mode(5, 3840, 1080, 30f) + val (screen, panel) = screen(flat60, arrayOf(flat60, flat30, stereo60, short30), 30) + assertTrue(Glasses.supports30Hz(screen.display)) + assertEquals(flat30.modeId, screen.window!!.attributes.preferredDisplayModeId) + + panel.current = stereo60 + screen.prefer(30) + assertFalse(Glasses.supports30Hz(screen.display)) + assertEquals(stereo60.modeId, screen.window!!.attributes.preferredDisplayModeId) + + panel.supported += stereo30 + screen.prefer(30) + assertTrue(Glasses.supports30Hz(screen.display)) + assertEquals(stereo30.modeId, screen.window!!.attributes.preferredDisplayModeId) + } + + @Test fun switchingBetween2dAndStereoRefreshesTheModePreferenceEvenAtTheSameHz() { + val flat = mode(1, 1920, 1200, 60f) + val stereo = mode(2, 3840, 1200, 60f) + val (screen, panel) = screen(flat, arrayOf(flat, stereo), 60) + assertEquals(flat.modeId, screen.window!!.attributes.preferredDisplayModeId) + + panel.current = stereo + screen.prefer(60) + assertEquals(stereo.modeId, screen.window!!.attributes.preferredDisplayModeId) + + panel.current = flat + screen.prefer(60) + assertEquals(flat.modeId, screen.window!!.attributes.preferredDisplayModeId) + } + + @Test fun refreshPreferenceKeepsBothDimensionsOfTheActiveStereoMode() { + val stereo1080 = mode(1, 3840, 1080, 90f) + val stereo1200 = mode(2, 3840, 1200, 60f) + val (screen, _) = screen(stereo1200, arrayOf(stereo1080, stereo1200), 90) + + assertEquals(stereo1200.modeId, screen.window!!.attributes.preferredDisplayModeId) + } + + @Test fun refreshChangesStillChooseTheNearestRateAtTheCurrentResolution() { + val stereo60 = mode(1, 3840, 1200, 60f) + val stereo90 = mode(2, 3840, 1200, 90f) + val flat120 = mode(3, 1920, 1200, 120f) + val (screen, _) = screen(stereo60, arrayOf(stereo60, stereo90, flat120), 60) + + screen.prefer(120) + assertEquals(stereo90.modeId, screen.window!!.attributes.preferredDisplayModeId) + } + + @Test fun explicitResolutionChangesBothDimensionsWithoutSwitchingEyeLayout() { + val flat1080 = mode(1, 1920, 1080, 90f) + val flat1200 = mode(2, 1920, 1200, 90f) + val stereo1080 = mode(3, 3840, 1080, 90f) + val stereo1200 = mode(4, 3840, 1200, 90f) + val (screen, panel) = screen(flat1200, arrayOf(flat1080, flat1200, stereo1080, stereo1200), 90) + screen.prefer(90, GlassesResolution(1920, 1080)) + assertEquals(flat1080.modeId, screen.window!!.attributes.preferredDisplayModeId) + panel.current = stereo1200 + screen.prefer(90, GlassesResolution(1920, 1080)) + assertEquals(stereo1080.modeId, screen.window!!.attributes.preferredDisplayModeId) + screen.prefer(90, GlassesResolution(1920, 1200)) + assertEquals(stereo1200.modeId, screen.window!!.attributes.preferredDisplayModeId) + } + + @Test fun unavailableResolutionKeepsTheCurrentModeUntilHardwareConfirmsTheChange() { + val stereo60 = mode(1, 3840, 1200, 60f) + val stereo90 = mode(2, 3840, 1200, 90f) + val flat1080 = mode(3, 1920, 1080, 90f) + val (screen, _) = screen(stereo60, arrayOf(stereo60, stereo90, flat1080), 60) + screen.prefer(90, GlassesResolution(1920, 1080)) + assertEquals(stereo90.modeId, screen.window!!.attributes.preferredDisplayModeId) + } + + private fun mode(id: Int, width: Int, height: Int, hz: Float): Display.Mode = + ShadowDisplayManager.ModeBuilder.modeBuilder(id) + .setWidth(width).setHeight(height).setRefreshRate(hz).build() + + private fun screen(current: Display.Mode, modes: Array<Display.Mode>, hz: Int): Pair<GlassesScreen, ModeDisplay> { + val context = RuntimeEnvironment.getApplication() + val id = ShadowDisplayManager.addDisplay("w1920dp-h1200dp") + val display = context.getSystemService(DisplayManager::class.java).getDisplay(id) + shadowOf(display).setFlags(Display.FLAG_PRESENTATION) + val panel = Shadow.extract<ModeDisplay>(display).apply { + this.current = current + supported = modes + } + val callback = object : SurfaceHolder.Callback { + override fun surfaceCreated(holder: SurfaceHolder) = Unit + override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) = Unit + override fun surfaceDestroyed(holder: SurfaceHolder) = Unit + } + return GlassesScreen(context, display, hz, callback).apply { create() } to panel + } + + @Implements(Display::class) + class ModeDisplay : ShadowDisplay() { + lateinit var current: Display.Mode + var supported = emptyArray<Display.Mode>() + + @Implementation protected fun getMode(): Display.Mode = current + @Implementation protected fun getSupportedModes(): Array<Display.Mode> = supported + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesSessionModesTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesSessionModesTest.kt new file mode 100644 index 0000000000..efea733362 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesSessionModesTest.kt @@ -0,0 +1,152 @@ +package com.droiddeck.launcher.glasses + +import android.app.Application +import android.content.Intent +import android.hardware.display.DisplayManager +import android.view.Display +import androidx.compose.runtime.MutableState +import com.droiddeck.launcher.SessionActivity +import com.droiddeck.launcher.gpu.Cardboard +import com.droiddeck.launcher.gpu.SteamVr +import com.droiddeck.launcher.runtime.FlatpakManager +import com.droiddeck.launcher.session.LoadingState +import com.droiddeck.launcher.session.SessionService +import com.droiddeck.launcher.session.SessionState +import org.junit.After +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import org.robolectric.shadows.ShadowDisplayManager +import org.robolectric.util.ReflectionHelpers +import org.robolectric.util.ReflectionHelpers.ClassParameter + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], application = Application::class, manifest = Config.NONE) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesSessionModesTest { + private data class Launch(val name: String, val mode: String, val program: String? = null, val args: Array<String>? = null) + private val launches = listOf( + Launch("Steam and store games", SessionService.MODE_STEAM), + Launch("Desktop", SessionService.MODE_DESKTOP), + Launch("Standalone", SessionService.MODE_RUN, "/usr/bin/example-game"), + Launch("Emulator", SessionService.MODE_RUN, "/usr/bin/retroarch", arrayOf("/games/example.rom")), + Launch("Flatpak", SessionService.MODE_RUN, FlatpakManager.LAUNCHER, arrayOf("org.example.Game")), + ) + private lateinit var display: Display + private lateinit var restore: () -> Unit + private val saved = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, + headTracking = true, screenWidthDm = 35, screenDistanceDm = 45) + private val phone = Cardboard(enabled = true, source = Cardboard.SOURCE_SCREEN, ipdMm = 67, + screenWidthDm = 20, screenDistanceDm = 30, headTracking = false) + + @Before fun setUp() { + val running = SessionState.running + val steamVr = SessionState.steamVr + val mode = SessionState.mode + val fields = listOf("context", "publisherAttached").associateWith { + SpatialTracking::class.java.getDeclaredField(it).apply { isAccessible = true } + } + val values = fields.mapValues { it.value.get(null) } + fields.getValue("context").set(null, null) + fields.getValue("publisherAttached").set(null, false) + restore = { + fields.forEach { (name, field) -> field.set(null, values[name]) } + SessionState.running = running + SessionState.steamVr = steamVr + SessionState.mode = mode + } + val id = ShadowDisplayManager.addDisplay("w1920dp-h1080dp") + display = RuntimeEnvironment.getApplication().getSystemService(DisplayManager::class.java).getDisplay(id) + SessionState.running = true + SessionState.steamVr = false + } + + @After fun tearDown() { + SpatialTracking.useLegacyTracking() + SpatialTracking.disconnect() + ShadowDisplayManager.removeDisplay(display.displayId) + restore() + } + + @Test fun flatScreenSizeDistanceAndTrackingReachEveryGuestSessionWithoutSteamVr() { + for (launch in launches) for (spatial in listOf(false, true)) { + val activity = activity(launch, saved.copy(positionalTracking = spatial), output = true) + SpatialTracking.connect(0, 101, null, spatial, 1.6f, false) + val projection = projection(activity) + + assertTrue(launch.name, projection.enabled) + assertTrue(launch.name, projection.headTracking) + assertTrue(launch.name, projection.mono) + assertEquals(launch.name, Cardboard.SOURCE_SCREEN, projection.source) + assertEquals(launch.name, Cardboard.Viewer.VITURE.id, projection.viewer) + assertEquals(launch.name, 35, projection.screenWidthDm) + assertEquals(launch.name, 45, projection.screenDistanceDm) + assertEquals(launch.name, phone.ipdMm, projection.ipdMm) + assertEquals(launch.name, if (spatial) TrackingRecovery.LOST else null, recovery(activity)) + } + } + + @Test fun positionalRecoverySurvivesUsbLossInEveryGuestSessionAndHonorsTrackingOff() { + for (launch in launches) { + val activity = activity(launch, saved.copy(positionalTracking = true), output = true) + SpatialTracking.connect(0, 102, null, true, 1.6f, false) + assertEquals(launch.name, TrackingRecovery.LOST, recovery(activity)) + + SpatialTracking.disconnect() + state(activity, "glasses", glasses().copy(connected = false, supportsSpatial = false)) + assertEquals(launch.name, TrackingRecovery.DISCONNECTED, recovery(activity)) + + state(activity, "glassesSettings", saved.copy(positionalTracking = true, headTracking = false)) + assertFalse(launch.name, projection(activity).headTracking) + assertNull(launch.name, recovery(activity)) + } + } + + @Test fun savedGlassesTrackingDoesNotChangePhoneRenderingOrRecoveryInAnySessionMode() { + for (launch in launches) { + val activity = activity(launch, saved.copy(positionalTracking = true), output = false) + SpatialTracking.connect(0, 103, null, true, 1.6f, false) + + assertSame(launch.name, phone, projection(activity)) + assertNull(launch.name, recovery(activity)) + } + } + + private fun activity(launch: Launch, settings: GlassesSettings, output: Boolean): SessionActivity { + val intent = Intent(RuntimeEnvironment.getApplication(), SessionActivity::class.java) + .putExtra(SessionService.EXTRA_MODE, launch.mode) + .putExtra(SessionService.EXTRA_PROGRAM, launch.program) + .putExtra(SessionService.EXTRA_PROGRAM_ARGS, launch.args) + SessionState.mode = launch.mode + return Robolectric.buildActivity(SessionActivity::class.java, intent).get().also { + ReflectionHelpers.setField(it, "loading", LoadingState(it).apply { visible = false }) + ReflectionHelpers.setField(it, "started", true) + if (output) ReflectionHelpers.setField(it, "glassesScreen", GlassesScreen(it, display, 60, it)) + state(it, "glassesOutputActive", output) + state(it, "glasses", glasses()) + state(it, "glassesSettings", settings) + state(it, "steamVrStatus", SteamVr.Status.READY) + } + } + + private fun glasses() = GlassesState(present = true, connected = true, controllable = true, + supportsSpatial = true, supportsScreen3dof = true, displayId = display.displayId, width = 1920, height = 1080) + + private fun projection(activity: SessionActivity): Cardboard = ReflectionHelpers.callInstanceMethod( + activity, "effectiveCardboard", ClassParameter.from(Cardboard::class.java, phone)) + + private fun recovery(activity: SessionActivity): TrackingRecovery? { + ReflectionHelpers.callInstanceMethod<Void>(activity, "updateTrackingRecovery") + return ReflectionHelpers.getField<MutableState<TrackingRecovery?>>(activity, "trackingRecovery\$delegate").value + } + + private fun <T> state(activity: SessionActivity, name: String, value: T) { + ReflectionHelpers.getField<MutableState<T>>(activity, name + "\$delegate").value = value + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesSpatialAvailabilityTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesSpatialAvailabilityTest.kt new file mode 100644 index 0000000000..58efe3aa0a --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesSpatialAvailabilityTest.kt @@ -0,0 +1,33 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class GlassesSpatialAvailabilityTest { + private val ultra = GlassesState(connected = true, controllable = true, supportsSpatial = true) + private val selected = GlassesSettings(positionalTracking = true, handControllers = true) + + @Test fun sdkConfirmedConnectedUltraOwnsSpatialControllerInput() { + assertTrue(ultra.spatialConnected) + assertTrue(ultra.usesSpatialControllers(selected)) + assertTrue(ultra.usesSpatialControllers(selected.copy(handControllers = false, joyConTracking = true))) + assertFalse(ultra.usesSpatialControllers(selected.copy(positionalTracking = false))) + assertFalse(ultra.usesSpatialControllers(selected.copy(handControllers = false))) + } + + @Test fun savedUltraPreferencesDoNotSelectSpatialInputForOtherGlasses() { + for (name in listOf("VITURE Luma Ultra", "VITURE Luma Pro", "VITURE Pro", "XREAL", "RayNeo")) { + val other = ultra.copy(model = name, supportsSpatial = false) + assertFalse(name, other.spatialConnected) + assertFalse(name, other.usesSpatialControllers(selected)) + assertFalse(name, other.usesSpatialControllers(selected.copy(handControllers = false, joyConTracking = true))) + } + } + + @Test fun disconnectedOrUncontrollableUltraCannotClaimSpatialInput() { + for (state in listOf(ultra.copy(connected = false), ultra.copy(controllable = false), GlassesState())) { + assertFalse(state.spatialConnected) + assertFalse(state.usesSpatialControllers(selected)) + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesSteamVrTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesSteamVrTest.kt new file mode 100644 index 0000000000..02ab5aca8d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesSteamVrTest.kt @@ -0,0 +1,269 @@ +package com.droiddeck.launcher.glasses + +import android.app.Application +import android.content.Context +import android.os.Handler +import android.os.Looper +import android.os.SystemClock +import com.droiddeck.launcher.SessionActivity +import com.droiddeck.launcher.gpu.SteamVr +import com.droiddeck.launcher.session.LoadingState +import com.droiddeck.launcher.session.SessionService +import com.droiddeck.launcher.session.SessionState +import kotlinx.coroutines.flow.MutableStateFlow +import org.junit.Assert.* +import org.junit.After +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import java.util.concurrent.CountDownLatch +import java.util.concurrent.ThreadPoolExecutor +import java.util.concurrent.TimeUnit +import java.time.Duration + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], application = Application::class) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesSteamVrTest { + private val commands = mutableListOf<Int>() + private val handler = Handler(Looper.getMainLooper()) + private lateinit var restore: () -> Unit + private fun field(name: String) = Glasses::class.java.getDeclaredField(name).apply { isAccessible = true } + private val spatialGate get() = field("steamVrSpatialGate").get(null) as SteamVrSpatialGate + + @Before fun prepare() { + spatialGate.cancel() + val fields = listOf("handler", "app", "model").associateWith { field(it).get(null) } + @Suppress("UNCHECKED_CAST") + val flows = listOf("_state", "_settings").map { field(it).get(null) as MutableStateFlow<Any> } + val values = flows.map { it.value } + val mode = SessionState.mode + restore = { + fields.forEach { (name, value) -> field(name).set(null, value) } + flows.zip(values).forEach { (flow, value) -> flow.value = value } + SessionState.mode = mode + } + field("handler").set(null, handler) + field("app").set(null, RuntimeEnvironment.getApplication()) + field("model").set(null, VitureProtocol.model(0x1019, null)) + field("link").set(null, object : GlassesLink { + override val hasImu = false + override fun send(msgId: Int, payload: ByteArray): Boolean { + if (msgId == VitureProtocol.MSG_DISPLAY) commands.add(payload[0].toInt() and 255) + return true + } + override fun close() {} + }) + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = GlassesState(present = true, connected = true, controllable = true, + displayId = 2, width = 1920, height = 1080) + } + + @After fun cleanUp() { + handler.removeCallbacksAndMessages(null) + spatialGate.cancel() + field("link").set(null, null) + (field("modeState").get(null) as GlassesModeState).apply { manual(); sent(false, 0) } + SessionState.steamVr = false + restore() + } + + @Test fun defaultLaunchAndRunningStatusKeepTheDisplayIn2d() = withLaunch(auto3d = false) { activity -> + status(activity, SteamVr.Status.READY) + status(activity, SteamVr.Status.RUNNING) + status(activity, SteamVr.Status.READY) + assertEquals(emptyList<Int>(), commands) + assertFalse(Glasses.state.value.switching3d) + } + + @Test fun optedInLaunchWaitsForRunningAndRestoresOnlyAfterStopping() = withLaunch(auto3d = true) { activity -> + status(activity, SteamVr.Status.READY) + status(activity, SteamVr.Status.READY) + assertEquals("Startup must not change the display mode", emptyList<Int>(), commands) + status(activity, SteamVr.Status.RUNNING) + status(activity, SteamVr.Status.RUNNING) + assertEquals(listOf(0x32), commands) + assertTrue(Glasses.state.value.switching3d) + status(activity, SteamVr.Status.UNAVAILABLE) + assertEquals("A failed status poll is not a stop", listOf(0x32), commands) + status(activity, SteamVr.Status.READY) + assertEquals(listOf(0x32, 0x34), commands) + assertFalse(Glasses.state.value.switching3d) + } + + @Test fun ignoredManualSwitchKeepsThePending2dRestore() { + val mode = field("modeState").get(null) as GlassesModeState + mode.startVr() + mode.stopVr() + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = state.value.copy(width = 640, height = 480, noSignal = true) + Glasses.set3d(true) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(emptyList<Int>(), commands) + assertTrue(mode.restorePending) + state.value = state.value.copy(width = 1920, height = 1080, noSignal = false) + Glasses.set3d(false) + shadowOf(Looper.getMainLooper()).idle() + assertEquals(listOf(0x34), commands) + assertFalse(mode.restorePending) + } + + @Test fun absentPreferenceDefaultsTo2dAndAnExplicitOptInSurvivesReload() { + val prefs = RuntimeEnvironment.getApplication().getSharedPreferences("glasses", Context.MODE_PRIVATE) + prefs.edit().clear().commit() + fun load() = Glasses::class.java.getDeclaredMethod("load").apply { isAccessible = true } + .invoke(Glasses) as GlassesSettings + assertFalse(load().auto3d) + prefs.edit().putBoolean("auto3d", true).commit() + assertTrue(load().auto3d) + prefs.edit().putBoolean("auto3d", false).commit() + assertFalse(load().auto3d) + } + + @Test fun manualStartOnDisplayOnlyGlassesRequestsPollingWithoutDuplicatingLaunch() { + @Suppress("UNCHECKED_CAST") + val state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = GlassesState(present = true, displayId = 2, width = 1920, height = 1080) + withLaunch(auto3d = false) { activity -> + SessionState.steamVr = false + fun action(name: String) = SessionActivity::class.java.getDeclaredMethod("steamVrAction", String::class.java) + .apply { isAccessible = true }.invoke(activity, name) + action("start") + assertTrue("A manual start must keep status polling alive", SessionState.steamVr) + shadowOf(Looper.getMainLooper()).idle() + val worker = SessionActivity::class.java.getDeclaredField("steamVrWorker") + .apply { isAccessible = true }.get(null) as ThreadPoolExecutor + assertEquals(1, worker.queue.size) + status(activity, SteamVr.Status.READY) + assertEquals("Polling must not launch a duplicate instance", 1, worker.queue.size) + status(activity, SteamVr.Status.RUNNING) + status(activity, SteamVr.Status.UNAVAILABLE) + assertTrue(SessionState.steamVr) + action("stop") + assertFalse(SessionState.steamVr) + } + } + + @Test fun preparationCallbackRunsAfterSuspensionAndCancelWorksBeforeRunning() { + @Suppress("UNCHECKED_CAST") + val settings = field("_settings").get(null) as MutableStateFlow<GlassesSettings> + settings.value = GlassesSettings(positionalTracking = true, handControllers = true) + val saved = settings.value + var prepared = 0 + repeat(2) { + Glasses.prepareSteamVrStart { + assertFalse(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + prepared++ + } + } + shadowOf(Looper.getMainLooper()).idle() + assertEquals(2, prepared) + Glasses.setVrActive(false) + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(3)) + assertFalse(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + Glasses.cancelSteamVrStart() + shadowOf(Looper.getMainLooper()).idle() + assertTrue(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + assertEquals(saved, settings.value) + } + + @Test fun rapidRestartDoesNotLaunchTheCancelledPreparedRequest() = withLaunch(auto3d = false) { activity -> + SessionState.steamVr = false + val action = SessionActivity::class.java.getDeclaredMethod("steamVrAction", String::class.java) + .apply { isAccessible = true } + action.invoke(activity, "start") + action.invoke(activity, "stop") + action.invoke(activity, "start") + shadowOf(Looper.getMainLooper()).idle() + val worker = SessionActivity::class.java.getDeclaredField("steamVrWorker") + .apply { isAccessible = true }.get(null) as ThreadPoolExecutor + assertTrue(SessionState.steamVr) + assertEquals("Only stop and the latest start should reach the worker", 2, worker.queue.size) + } + + @Test fun duplicateRunningKeepsDeadlineAndStoppingCancelsThePendingResume() { + Glasses.prepareSteamVrStart() + Glasses.setVrActive(true) + shadowOf(Looper.getMainLooper()).idle() + val deadline = spatialGate.deadline!! + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofMillis(1_999)) + var prepared = false + Glasses.prepareSteamVrStart { prepared = true } + Glasses.setVrActive(true) + shadowOf(Looper.getMainLooper()).idle() + assertTrue(prepared) + assertEquals(deadline, spatialGate.deadline) + assertFalse(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofMillis(1)) + assertTrue(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + Glasses.setVrActive(false) + Glasses.prepareSteamVrStart() + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(3)) + assertFalse(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + assertNull(spatialGate.deadline) + } + + @Test fun restartWhileDisplayStillReportsRunningGetsANewTrackingDeadline() { + Glasses.setVrActive(true) + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(3)) + assertTrue(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + Glasses.cancelSteamVrStart() + Glasses.prepareSteamVrStart() + shadowOf(Looper.getMainLooper()).idle() + assertTrue(Glasses.state.value.vrActive) + assertFalse(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + Glasses.setVrActive(true) + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofMillis(1_999)) + assertFalse(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofMillis(1)) + assertTrue(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + } + + @Test fun endedSessionIgnoresLateRunningStatus() = withLaunch(auto3d = true) { activity -> + SessionActivity::class.java.getDeclaredField("ended").apply { isAccessible = true }.set(activity, true) + status(activity, SteamVr.Status.RUNNING) + assertFalse(Glasses.state.value.vrActive) + assertNull(spatialGate.deadline) + assertTrue(spatialGate.spatialEnabled(true, SystemClock.uptimeMillis())) + assertTrue(commands.isEmpty()) + } + + private fun status(activity: SessionActivity, status: SteamVr.Status) { + SessionActivity::class.java.getDeclaredMethod("onSteamVrStatus", SteamVr.Status::class.java) + .apply { isAccessible = true }.invoke(activity, status) + shadowOf(Looper.getMainLooper()).idle() + } + + private fun withLaunch(auto3d: Boolean, check: (SessionActivity) -> Unit) { + @Suppress("UNCHECKED_CAST") + val settings = field("_settings").get(null) as MutableStateFlow<GlassesSettings> + settings.value = GlassesSettings(auto3d = auto3d) + val activity = Robolectric.buildActivity(SessionActivity::class.java).get() + SessionActivity::class.java.getDeclaredField("loading").apply { isAccessible = true } + .set(activity, LoadingState(activity).apply { visible = false }) + SessionState.steamVr = true + SessionState.mode = SessionService.MODE_STEAM + // Hold the external worker so status transitions can be exercised + // without launching a Linux runtime from the host test process. + val worker = SessionActivity::class.java.getDeclaredField("steamVrWorker") + .apply { isAccessible = true }.get(null) as ThreadPoolExecutor + val blocked = CountDownLatch(1) + val release = CountDownLatch(1) + worker.execute { blocked.countDown(); release.await(30, TimeUnit.SECONDS) } + try { + assertTrue(blocked.await(5, TimeUnit.SECONDS)) + check(activity) + } finally { + worker.queue.clear() + release.countDown() + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesTrackingRoutingTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesTrackingRoutingTest.kt new file mode 100644 index 0000000000..3409d6f83d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesTrackingRoutingTest.kt @@ -0,0 +1,192 @@ +package com.droiddeck.launcher.glasses + +import android.app.Application +import android.os.HandlerThread +import android.view.Display +import androidx.compose.runtime.MutableState +import com.droiddeck.launcher.SessionActivity +import com.droiddeck.launcher.gpu.Cardboard +import com.droiddeck.launcher.gpu.SteamVr +import com.droiddeck.launcher.input.ControllerPrefs +import com.droiddeck.launcher.input.JoyConVr +import com.droiddeck.launcher.session.LoadingState +import com.droiddeck.launcher.session.SessionState +import java.io.File +import java.nio.ByteBuffer +import java.nio.ByteOrder +import org.junit.After +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import org.robolectric.util.ReflectionHelpers + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], application = Application::class, manifest = Config.NONE) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesTrackingRoutingTest { + private lateinit var activity: SessionActivity + private lateinit var restore: () -> Unit + private val ultra = GlassesState(present = true, connected = true, controllable = true, + supportsSpatial = true, displayId = Display.DEFAULT_DISPLAY + 1, width = 1920, height = 1080) + private val saved = GlassesSettings(positionalTracking = true, handControllers = true) + + @Before fun setUp() { + val running = SessionState.running + val steamVr = SessionState.steamVr + val fields = listOf("context", "publisherAttached").associateWith { + SpatialTracking::class.java.getDeclaredField(it).apply { isAccessible = true } + } + val values = fields.mapValues { it.value.get(null) } + fields.getValue("context").set(null, null) + fields.getValue("publisherAttached").set(null, false) + restore = { + fields.forEach { (name, field) -> field.set(null, values[name]) } + SessionState.running = running + SessionState.steamVr = steamVr + } + activity = Robolectric.buildActivity(SessionActivity::class.java).get() + ReflectionHelpers.setField(activity, "loading", LoadingState(activity).apply { visible = false }) + ReflectionHelpers.setField(activity, "started", true) + ReflectionHelpers.setField(activity, "activeCardboard", Cardboard.OFF) + state("glasses", ultra) + state("glassesSettings", saved) + state("steamVrStatus", SteamVr.Status.RUNNING) + SessionState.running = true + SessionState.steamVr = true + SpatialTracking.setOutputUsesGlasses(true) + SpatialTracking.connect(0, 81, null, true, 1.6f, true) + } + + @After fun tearDown() { + SpatialTracking.useLegacyTracking() + SpatialTracking.disconnect() + SpatialTracking.setOutputUsesGlasses(true) + restore() + } + + @Test fun usbLossKeepsSpatialOwnershipAndShowsRecoveryOnTheGlassesDisplay() { + SpatialTracking.disconnect() + state("glasses", ultra.copy(connected = false, supportsSpatial = false)) + updateRouting() + + assertEquals(3, modes()) + assertTrue(SpatialTracking.selected) + assertEquals(TrackingRecovery.DISCONNECTED, recovery()) + } + + @Test fun phoneHandoffClearsPublishedModesWithoutErasingTheGlassesSelection() { + for (joyCons in listOf(false, true)) { + val selected = saved.copy(handControllers = !joyCons, joyConTracking = joyCons) + state("glassesSettings", selected) + SpatialTracking.connect(0, if (joyCons) 83 else 82, null, true, 1.6f, !joyCons, joyCons) + SpatialTracking.disconnect() + state("glasses", GlassesState()) + updateRouting() + + assertEquals(0, modes()) + assertTrue(SpatialTracking.selected) + assertEquals(selected, stateValue<GlassesSettings>("glassesSettings")) + assertNull(recovery()) + SpatialTracking.setControllers(!joyCons, joyCons) + assertEquals("Later controller updates must not reclaim the phone output", 0, modes()) + + SpatialTracking.connect(0, if (joyCons) 85 else 84, null, true, 1.6f, !joyCons, joyCons) + assertEquals("Reconnecting waits for the output handoff", 0, modes()) + state("glasses", ultra) + updateRouting() + assertEquals(if (joyCons) 5 else 3, modes()) + } + } + + @Test fun endingTheSessionReleasesSpatialInputEvenWhileTheGlassesRemainConnected() { + ReflectionHelpers.setField(activity, "ended", true) + updateRouting() + + assertEquals(0, modes()) + assertTrue(SpatialTracking.selected) + assertEquals(saved, stateValue<GlassesSettings>("glassesSettings")) + assertNull(recovery()) + } + + @Test @Config(sdk = [31]) fun displayLossReleasesSpatialControllerOverridesWhileUsbRemainsConnected() { + val previousJoyConVr = ControllerPrefs.joyConVr(activity) + ControllerPrefs.setJoyConVr(activity, false) + val joyCon = JoyConVr(activity, File(activity.cacheDir, "routing-joycons")) { _, _ -> } + ReflectionHelpers.setField(activity, "joyConVr", joyCon) + val worker = ReflectionHelpers.getField<HandlerThread>(joyCon, "thread") + fun updateInputs(): Boolean { + ReflectionHelpers.callInstanceMethod<Void>(activity, "updateJoyConTracking") + shadowOf(worker.looper).idle() + return ReflectionHelpers.getField(joyCon, "wanted") + } + try { + for (joyCons in listOf(false, true)) { + val selected = saved.copy(handControllers = !joyCons, joyConTracking = joyCons) + state("glassesSettings", selected) + for (displayLost in listOf(ultra.copy(noSignal = true), ultra.copy(displayId = Display.INVALID_DISPLAY))) { + state("glasses", ultra) + assertTrue(ReflectionHelpers.callInstanceMethod(activity, "usesSpatialControllers")) + assertEquals(joyCons, updateInputs()) + + state("glasses", displayLost) + updateRouting() + assertTrue(displayLost.spatialConnected) + assertEquals(0, modes()) + assertFalse("The phone camera must not be suppressed by a missing display", + ReflectionHelpers.callInstanceMethod(activity, "usesSpatialControllers")) + assertFalse("Saved glasses Joy-Cons must not override the phone preference", updateInputs()) + assertEquals(selected, stateValue<GlassesSettings>("glassesSettings")) + ControllerPrefs.setJoyConVr(activity, true) + assertTrue("The phone Joy-Con preference must still apply", updateInputs()) + ControllerPrefs.setJoyConVr(activity, false) + + state("glasses", ultra) + updateRouting() + assertTrue(ReflectionHelpers.callInstanceMethod(activity, "usesSpatialControllers")) + assertEquals(joyCons, updateInputs()) + } + } + } finally { + ReflectionHelpers.setField(activity, "joyConVr", null) + joyCon.close() + ControllerPrefs.setJoyConVr(activity, previousJoyConVr) + } + } + + @Test fun anotherGlassesModelDoesNotActivateSavedUltraTracking() { + SpatialTracking.disconnect() + SpatialTracking.useLegacyTracking() + state("glasses", ultra.copy(model = "XREAL", supportsSpatial = false)) + updateRouting() + + assertEquals(0, modes()) + assertFalse(SpatialTracking.selected) + assertEquals(saved, stateValue<GlassesSettings>("glassesSettings")) + assertNull(recovery()) + } + + private fun updateRouting() { + ReflectionHelpers.callInstanceMethod<Void>(activity, "updateHeadTracker") + ReflectionHelpers.callInstanceMethod<Void>(activity, "updateTrackingRecovery") + } + + private fun modes(): Int { + val field = SpatialTracking::class.java.getDeclaredField("buffer").apply { isAccessible = true } + return (field.get(null) as ByteBuffer).duplicate().order(ByteOrder.LITTLE_ENDIAN).getInt(32) + } + + private fun recovery(): TrackingRecovery? = stateValue("trackingRecovery") + + private fun <T> state(name: String, value: T) { + ReflectionHelpers.getField<MutableState<T>>(activity, name + "\$delegate").value = value + } + + private fun <T> stateValue(name: String): T = + ReflectionHelpers.getField<MutableState<T>>(activity, name + "\$delegate").value +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/GlassesUsbTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesUsbTest.kt new file mode 100644 index 0000000000..d4ee21f796 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/GlassesUsbTest.kt @@ -0,0 +1,236 @@ +package com.droiddeck.launcher.glasses + +import android.app.PendingIntent +import android.content.Context +import android.hardware.display.DisplayManager +import android.hardware.usb.UsbDevice +import android.hardware.usb.UsbManager +import android.os.Handler +import android.os.Looper +import android.os.SystemClock +import android.view.Display +import kotlinx.coroutines.flow.MutableStateFlow +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.Implementation +import org.robolectric.annotation.Implements +import org.robolectric.annotation.LooperMode +import org.robolectric.shadow.api.Shadow +import org.robolectric.shadows.ShadowDisplayManager +import org.robolectric.shadows.ShadowSystemClock +import org.robolectric.shadows.ShadowUsbManager +import org.robolectric.util.ReflectionHelpers +import org.robolectric.util.ReflectionHelpers.ClassParameter.from +import java.time.Duration + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE, shadows = [GlassesUsbTest.RecordingUsbManager::class]) +@LooperMode(LooperMode.Mode.PAUSED) +class GlassesUsbTest { + private lateinit var manager: RecordingUsbManager + private lateinit var state: MutableStateFlow<GlassesState> + private fun field(name: String) = Glasses::class.java.getDeclaredField(name).apply { isAccessible = true } + + @Before fun prepare() { + val context = RuntimeEnvironment.getApplication() + val usb = context.getSystemService(Context.USB_SERVICE) as UsbManager + manager = Shadow.extract(usb) + field("app").set(null, context) + field("usb").set(null, usb) + field("displays").set(null, context.getSystemService(Context.DISPLAY_SERVICE)) + field("handler").set(null, Handler(Looper.getMainLooper())) + field("asked").setBoolean(null, false) + @Suppress("UNCHECKED_CAST") + state = field("_state").get(null) as MutableStateFlow<GlassesState> + state.value = GlassesState() + } + + @Test fun controllableGlassesTakePriorityOverDockAndUnsupportedGlasses() { + val dock = device(0x3011) + val beast = device(0x1201) + val pro = device(0x101d) + manager.devices.putAll(listOf(dock, beast, pro).associateBy { it.deviceName }) + refresh() + assertEquals(listOf(pro), manager.requests) + assertTrue(state.value.controllable) + assertEquals(Glasses.Permission.ASKING, state.value.permission) + } + + @Test fun unsupportedDevicesNeverRequestOrAdvertiseUsbPermission() { + for (pid in listOf(0x3011, 0xffff, 0x1201)) { + val device = device(pid) + manager.devices.clear() + manager.devices[device.deviceName] = device + state.value = GlassesState() + refresh(ask = true) + assertTrue(manager.requests.isEmpty()) + assertEquals(Glasses.Permission.NONE, state.value.permission) + manager.granted.add(device.deviceName) + state.value = GlassesState(permission = Glasses.Permission.ASKING) + refresh(ask = true) + assertTrue(manager.requests.isEmpty()) + assertEquals(Glasses.Permission.NONE, state.value.permission) + assertEquals(pid == 0x1201, state.value.present) + assertFalse(state.value.controllable) + assertFalse(state.value.connected) + } + } + + @Test fun dockPresenceStillIdentifiesAnUnnamedPresentationDisplay() { + val hdmi = ReflectionHelpers.getStaticField<Int>(Display::class.java, "TYPE_HDMI") + val displayId = ShadowDisplayManager.addDisplay("w1920dp-h1080dp", hdmi) + val displays = RuntimeEnvironment.getApplication().getSystemService(DisplayManager::class.java) + val display = displays.getDisplay(displayId) + shadowOf(display).setFlags(Display.FLAG_PRESENTATION) + assertEquals(displayId, displays.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION).single().displayId) + assertFalse(display.name.contains("VITURE", ignoreCase = true)) + val dock = device(0x3011) + manager.devices[dock.deviceName] = dock + refresh() + assertEquals(displayId, state.value.displayId) + assertTrue(manager.requests.isEmpty()) + assertEquals(Glasses.Permission.NONE, state.value.permission) + } + + @Test fun noSignalStereoFailureIsRememberedPerModel() { + val prefs = RuntimeEnvironment.getApplication().getSharedPreferences("glasses", Context.MODE_PRIVATE) + prefs.edit().clear().commit() + val hdmi = ReflectionHelpers.getStaticField<Int>(Display::class.java, "TYPE_HDMI") + val displayId = ShadowDisplayManager.addDisplay("w640dp-h480dp", hdmi) + val displays = RuntimeEnvironment.getApplication().getSystemService(DisplayManager::class.java) + shadowOf(displays.getDisplay(displayId)).setFlags(Display.FLAG_PRESENTATION) + val pro = device(0x1019) + manager.devices[pro.deviceName] = pro + refresh() + assertTrue(state.value.noSignal) + (field("modeState").get(null) as GlassesModeState).sent(true, SystemClock.uptimeMillis()) + ShadowSystemClock.advanceBy(Duration.ofSeconds(21)) + refresh() + assertEquals(GlassesState.SBS_FAILS, state.value.sbsSupport) + assertEquals(setOf("1019"), prefs.getStringSet("sbsFailed", null)) + ShadowDisplayManager.removeDisplay(displayId) + + val xr = device(0x101d) + manager.devices.clear() + manager.devices[xr.deviceName] = xr + refresh() + assertEquals(GlassesState.SBS_UNKNOWN, state.value.sbsSupport) + manager.devices.clear() + manager.devices[pro.deviceName] = pro + refresh() + assertEquals(GlassesState.SBS_FAILS, state.value.sbsSupport) + assertFalse(state.value.can3d) + } + + @Test fun rayNeoRequestsPermissionWithoutClaimingUnrelatedTclDevices() { + val air = device(0xaf50, 0x1bbb, "RayNeo Air 4 Pro") + manager.devices[air.deviceName] = air + refresh(ask = true) + assertEquals("RayNeo Air 4 Pro", state.value.model) + assertTrue(state.value.controllable) + assertFalse(state.value.hardwareControls) + assertEquals(listOf(air), manager.requests) + + manager.devices.clear() + manager.devices["phone"] = device(0x1234, 0x1bbb, "TCL Phone") + manager.requests.clear() + refresh(ask = true) + assertFalse(state.value.present) + assertTrue(manager.requests.isEmpty()) + } + + @Test fun alternateBridgeRequiresRayNeoModelIdentity() { + val gt = device(0x1234, 0x22d9, "RayNeo GT") + manager.devices[gt.deviceName] = gt + refresh(ask = true) + assertEquals("RayNeo GT", state.value.model) + assertEquals(listOf(gt), manager.requests) + } + + @Test fun gtVendorRequestsPermissionAndRetainsMaxProductName() { + val gt = device(0xaf50, 0x3941, "RayNeo GT MAX") + manager.devices[gt.deviceName] = gt + refresh(ask = true) + assertEquals("RayNeo GT MAX", state.value.model) + assertTrue(state.value.controllable) + assertFalse(state.value.hardwareControls) + assertEquals(listOf(gt), manager.requests) + } + + @Test fun screen3dofAvailabilityFollowsTheTrackingTransportAcrossBrands() { + val devices = listOf(device(0x1011), device(0x1019), device(0x1131), + device(0xaf50, 0x1bbb, "RayNeo Air 4 Pro"), + device(0xaf50, 0x3941, "RayNeo GT MAX"), + device(0x043e, 0x3318, "XREAL 1S")) + try { + for (device in devices) for (imu in listOf(false, true)) { + manager.devices.clear() + manager.devices[device.deviceName] = device + manager.granted.add(device.deviceName) + field("linkDevice").set(null, device) + field("link").set(null, object : GlassesLink { + override val hasImu = imu + override fun send(msgId: Int, payload: ByteArray) = true + override fun close() {} + }) + refresh() + assertTrue(state.value.canControl) + assertEquals(imu, state.value.supportsScreen3dof) + } + manager.devices.clear() + refresh() + assertFalse(state.value.supportsScreen3dof) + } finally { + field("link").set(null, null) + field("linkDevice").set(null, null) + (field("handler").get(null) as Handler).removeCallbacksAndMessages(null) + } + } + + private fun refresh(ask: Boolean = false) { + Glasses::class.java.getDeclaredMethod("refresh", Boolean::class.javaPrimitiveType) + .apply { isAccessible = true }.invoke(Glasses, ask) + } + + @Test fun xreal1SUsesExactIdentityAndExcludesAirOneProAndRecoveryProducts() { + assertEquals(XrealModel, Glasses.deviceModel(device(0x043e, 0x3318, "XREAL 1S"))) + assertTrue(Glasses.isGlassesDisplayName("XREAL 1S")) + for (pid in listOf(0x043d, 0x0435, 0x0436, 0x0424, 0xffff)) { + assertEquals(null, Glasses.deviceModel(device(pid, 0x3318, "XREAL 1S"))) + } + assertEquals(null, Glasses.deviceModel(device(0x043e, 0x1234, "XREAL 1S"))) + } + + private fun device(pid: Int, vid: Int = VitureProtocol.VENDOR_ID, name: String = "VITURE device"): UsbDevice = ReflectionHelpers.callConstructor( + UsbDevice::class.java, + from(String::class.java, "/dev/bus/usb/$pid"), + from(Int::class.javaPrimitiveType, vid), + from(Int::class.javaPrimitiveType, pid), + from(Int::class.javaPrimitiveType, 0), + from(Int::class.javaPrimitiveType, 0), + from(Int::class.javaPrimitiveType, 0), + from(String::class.java, "VITURE"), + from(String::class.java, name), + from(String::class.java, "1.0"), + from(String::class.java, "test-$pid"), + ) + + @Implements(UsbManager::class) + class RecordingUsbManager : ShadowUsbManager() { + val devices = linkedMapOf<String, UsbDevice>() + val granted = mutableSetOf<String>() + val requests = mutableListOf<UsbDevice>() + + @Implementation override fun getDeviceList(): HashMap<String, UsbDevice> = LinkedHashMap(devices) + @Implementation override fun hasPermission(device: UsbDevice): Boolean = device.deviceName in granted + @Implementation fun requestPermission(device: UsbDevice, intent: PendingIntent) { requests += device } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/HandGesturesTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/HandGesturesTest.kt new file mode 100644 index 0000000000..310b2d82e3 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/HandGesturesTest.kt @@ -0,0 +1,192 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class HandGesturesTest { + private fun openHand(): MutableList<SpatialVector> { + val p=MutableList(21) { SpatialVector(z=.5f) } + p[0]=SpatialVector(0f,0f,.5f) + p[4]=SpatialVector(.07f,-.05f,.5f) + for((base,x) in listOf(5 to .035f,9 to .01f,13 to -.015f,17 to -.04f)) { + for(j in 0..3)p[base+j]=SpatialVector(x,-.06f-.025f*j,.5f) + } + return p + } + @Test fun triangulatedMetersAreTransformedIntoTheHeadWorldFrame() { + val h=HandGestures(rightHand=false).estimate(openHand(),SpatialPose(SpatialVector(1f,2f,3f)),1_000_000_000)!! + assertEquals(3.5f,h.pose.position.z,.0001f) + assertTrue(h.pose.rotation.normalized()!=null);assertFalse(h.grip);assertEquals(0f,h.trigger,.0001f) + } + @Test fun mirroredHandsUseTheSamePalmNormalAndFingerDirection() { + val left=openHand().apply { this[9]=SpatialVector(0f,-.06f,.5f) } + val right=left.map { SpatialVector(-it.x,it.y,it.z) } + val world=SpatialPose(SpatialVector(1f,2f,3f),SpatialRotation(.2f,-.3f,.1f,.9f).normalized()!!) + for(turn in listOf(SpatialRotation(),SpatialRotation(y=1f,w=0f), + SpatialRotation(.3f,.1f,-.2f,.9f).normalized()!!)) { + val hands=listOf(left,right).mapIndexed { side,points -> + HandGestures(rightHand=side==1).estimate(points.map(turn::apply),world,1_000_000_000)!! + } + for(hand in hands) { + val rotation=hand.pose.rotation + assertVector(world.rotation.apply(turn.apply(SpatialVector(z=-1f))),rotation.apply(SpatialVector(y=1f))) + assertVector(world.rotation.apply(turn.apply(SpatialVector(y=-1f))),rotation.apply(SpatialVector(z=-1f))) + val x=rotation.apply(SpatialVector(x=1f));val y=rotation.apply(SpatialVector(y=1f)) + assertVector(rotation.apply(SpatialVector(z=1f)),x.cross(y)) + } + } + } + @Test fun rightHandOrientationDoesNotChangePinchOrGrip() { + val points=openHand() + points[4]=points[8] + for((tip,base) in listOf(12 to 9,16 to 13,20 to 17)) points[tip]=points[base] + val left=HandGestures(rightHand=false).estimate(points,SpatialPose(),1_000_000_000)!! + val right=HandGestures(rightHand=true).estimate(points.map { SpatialVector(-it.x,it.y,it.z) },SpatialPose(),1_000_000_000)!! + assertEquals(left.flags(),right.flags());assertEquals(1f,right.trigger,0f);assertTrue(right.grip) + assertEquals(left.timeNs,right.timeNs) + assertVector(SpatialVector(-left.pose.position.x,left.pose.position.y,left.pose.position.z),right.pose.position) + } + private fun assertVector(expected: SpatialVector,actual: SpatialVector) { + assertEquals(expected.x,actual.x,.0001f);assertEquals(expected.y,actual.y,.0001f);assertEquals(expected.z,actual.z,.0001f) + } + @Test fun pinchAndFingerClosureProduceTriggerAndGrip() { + val detector=HandGestures(rightHand=false);val p=openHand() + detector.estimate(p,SpatialPose(),1_000_000_000) + p[4]=p[8] + for((tip,base) in listOf(12 to 9,16 to 13,20 to 17)) p[tip]=p[base] + val pressed=detector.estimate(p,SpatialPose(),1_040_000_000)!! + assertEquals(1f,pressed.trigger,.0001f);assertTrue(pressed.grip) + val released=detector.estimate(openHand(),SpatialPose(),1_080_000_000)!! + assertEquals(0f,released.trigger,.0001f);assertFalse(released.grip) + } + @Test fun invalidGeometryAndImplausibleTemporalJumpAreRejected() { + val detector=HandGestures(rightHand=false) + assertNull(detector.estimate(emptyList(),SpatialPose(),1)) + assertEquals(HandObservationOutcome.LANDMARK_COUNT_INVALID,detector.lastOutcome) + assertNull(detector.estimate(List(21) { SpatialVector() },SpatialPose(),1)) + assertEquals(HandObservationOutcome.PALM_WIDTH_INVALID,detector.lastOutcome) + detector.estimate(openHand(),SpatialPose(),1_000_000_000) + assertNull(detector.estimate(openHand(),SpatialPose(SpatialVector(2f,0f,0f)),1_040_000_000)) + assertEquals(HandObservationOutcome.PALM_MOTION_REJECTED,detector.lastOutcome) + detector.reset() + assertNotNull(detector.estimate(openHand(),SpatialPose(SpatialVector(2f,0f,0f)),1_080_000_000)) + assertEquals(HandObservationOutcome.ACCEPTED,detector.lastOutcome) + } + @Test fun anUnreliableUnusedJointDoesNotHideThePalmOrDisableGestures() { + val points=openHand().map { it as SpatialVector? }.toMutableList() + points[6]=null + val hand=HandGestures(rightHand=false).estimate(points,SpatialPose(),1_000_000_000)!! + assertTrue(hand.valid);assertTrue(hand.triggerValid);assertTrue(hand.gripValid) + assertEquals(7,hand.flags()) + } + @Test fun repeatedMotionRejectionsPreserveTheLastPoseAndGripHysteresis() { + val detector=HandGestures(false) + val closed=openHand().apply { + for((tip,base) in listOf(12 to 9,16 to 13,20 to 17)) this[tip]=this[base] + } + assertTrue(detector.estimate(closed,SpatialPose(),1_000_000_000)!!.grip) + for(time in listOf(1_040_000_000L,1_080_000_000L,1_120_000_000L)) { + assertNull(detector.estimate(openHand(),SpatialPose(SpatialVector(2f,0f,0f)),time)) + assertEquals(HandObservationOutcome.PALM_MOTION_REJECTED,detector.lastOutcome) + detector.resetAfterRejection(detector.lastOutcome) + } + val partlyClosed=openHand().apply { this[12]=this[9];this[16]=this[13] } + val recovered=detector.estimate(partlyClosed,SpatialPose(),1_160_000_000)!! + assertTrue(recovered.grip) + assertEquals(1_160_000_000L,recovered.timeNs) + } + @Test fun motionRejectionDoesNotPreventReacquisitionAfterTheMotionWindow() { + val detector=HandGestures(false) + detector.estimate(openHand(),SpatialPose(),1_000_000_000) + val moved=SpatialPose(SpatialVector(2f,0f,0f)) + for(time in listOf(1_040_000_000L,1_160_000_000L)) { + assertNull(detector.estimate(openHand(),moved,time)) + detector.resetAfterRejection(detector.lastOutcome) + } + val reacquired=detector.estimate(openHand(),moved,1_200_000_000)!! + assertEquals(HandObservationOutcome.ACCEPTED,detector.lastOutcome) + assertEquals(1_200_000_000L,reacquired.timeNs) + } + @Test fun actualDetectionLossClearsMotionHistoryAndGripEvenAfterAMotionRejection() { + val detector=HandGestures(false) + val closed=openHand().apply { + for((tip,base) in listOf(12 to 9,16 to 13,20 to 17)) this[tip]=this[base] + } + assertTrue(detector.estimate(closed,SpatialPose(),1_000_000_000)!!.grip) + val moved=SpatialPose(SpatialVector(2f,0f,0f)) + assertNull(detector.estimate(closed,moved,1_040_000_000)) + detector.resetAfterRejection(detector.lastOutcome) + detector.resetAfterRejection(HandObservationOutcome.NO_MATCHING_DETECTION) + val partlyClosed=openHand().apply { this[12]=this[9];this[16]=this[13] } + val reacquired=detector.estimate(partlyClosed,moved,1_080_000_000)!! + assertFalse(reacquired.grip) + } + @Test fun occludedPinchKeepsThePalmAndIndependentGrip() { + val detector=HandGestures(rightHand=false) + val points=openHand().map { it as SpatialVector? }.toMutableList() + points[4]=points[8] + for((tip,base) in listOf(12 to 9,16 to 13,20 to 17)) points[tip]=points[base] + assertEquals(1f,detector.estimate(points,SpatialPose(),1_000_000_000)!!.trigger,0f) + points[4]=null + val hand=detector.estimate(points,SpatialPose(),1_080_000_000)!! + assertTrue(hand.valid);assertFalse(hand.triggerValid);assertEquals(0f,hand.trigger,0f) + assertTrue(hand.gripValid);assertTrue(hand.grip);assertEquals(5,hand.flags()) + } + @Test fun occludedGripKeepsThePalmAndIndependentPinch() { + val points=openHand().map { it as SpatialVector? }.toMutableList() + points[4]=points[8];points[16]=SpatialVector(Float.NaN,0f,.5f) + val hand=HandGestures(rightHand=false).estimate(points,SpatialPose(),1_000_000_000)!! + assertTrue(hand.valid);assertTrue(hand.triggerValid);assertEquals(1f,hand.trigger,0f) + assertFalse(hand.gripValid);assertFalse(hand.grip);assertEquals(3,hand.flags()) + } + @Test fun missingPalmStillRejectsTheController() { + for(index in listOf(0,5,9,13,17)) { + val points=openHand().map { it as SpatialVector? }.toMutableList();points[index]=null + val detector=HandGestures(rightHand=false) + assertNull(detector.estimate(points,SpatialPose(),1_000_000_000)) + assertEquals(HandObservationOutcome.PALM_LANDMARK_MISSING,detector.lastOutcome) + assertNotNull(detector.estimate(openHand(),SpatialPose(),1_040_000_000)) + assertEquals(HandObservationOutcome.ACCEPTED,detector.lastOutcome) + } + assertEquals(0,SpatialHand(triggerValid=true,gripValid=true).flags()) + } + @Test fun degeneratePalmAxesAreDistinguishedFromMissingStereoLandmarks() { + val detector=HandGestures(rightHand=false) + for(middle in listOf(SpatialVector(0f,0f,.5f),SpatialVector(.04f,0f,.5f))) { + val points=openHand().apply { this[9]=middle } + assertNull(detector.estimate(points,SpatialPose(),1_000_000_000)) + assertEquals(HandObservationOutcome.PALM_BASIS_INVALID,detector.lastOutcome) + } + assertNotNull(detector.estimate(openHand(),SpatialPose(),1_040_000_000)) + assertEquals(HandObservationOutcome.ACCEPTED,detector.lastOutcome) + } + @Test fun agreeingImageCurlsAndPinchSurviveMissingTriangulatedFingertips() { + val image=openHand().apply { + this[4]=this[8] + for((tip,base) in listOf(12 to 9,16 to 13,20 to 17)) this[tip]=this[base] + }.map { SpatialVector(320f+it.x*1000f,240f+it.y*1000f) } + val points=openHand().map { it as SpatialVector? }.toMutableList() + for(index in listOf(4,8,12,16,20)) points[index]=null + val hand=HandGestures(false).estimate(points,SpatialPose(),1_000_000_000,image,image)!! + assertTrue(hand.valid);assertTrue(hand.gripValid);assertTrue(hand.grip) + assertTrue(hand.triggerValid);assertEquals(1f,hand.trigger,0f) + assertVector(HandGestures(false).estimate(openHand(),SpatialPose(),1_000_000_000)!!.pose.position,hand.pose.position) + } + @Test fun imageDisagreementInvalidatesGestureInsteadOfFallingBackToPressedDepth() { + val closed=openHand().apply { + this[4]=this[8] + for((tip,base) in listOf(12 to 9,16 to 13,20 to 17)) this[tip]=this[base] + } + fun image(points: List<SpatialVector>)=points.map { SpatialVector(it.x*1000f,it.y*1000f) } + val detector=HandGestures(false) + assertTrue(detector.estimate(closed,SpatialPose(),1_000_000_000,image(closed),image(closed))!!.grip) + val conflict=detector.estimate(closed,SpatialPose(),1_080_000_000,image(closed),image(openHand()))!! + assertTrue(conflict.valid);assertFalse(conflict.triggerValid);assertFalse(conflict.gripValid) + assertFalse(conflict.grip);assertEquals(0f,conflict.trigger,0f) + val missingView=detector.estimate(closed,SpatialPose(),1_120_000_000,image(closed),null)!! + assertTrue(missingView.valid);assertFalse(missingView.triggerValid);assertFalse(missingView.gripValid) + val released=detector.estimate(closed,SpatialPose(),1_160_000_000,image(openHand()),image(openHand()))!! + assertTrue(released.triggerValid);assertTrue(released.gripValid) + assertFalse(released.grip);assertEquals(0f,released.trigger,0f) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/HandImageBufferTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/HandImageBufferTest.kt new file mode 100644 index 0000000000..2dc41cf1e7 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/HandImageBufferTest.kt @@ -0,0 +1,90 @@ +package com.droiddeck.launcher.glasses + +import android.graphics.Bitmap +import android.graphics.Color +import com.google.mediapipe.framework.image.ByteBufferExtractor +import com.google.mediapipe.framework.image.MPImage +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk=[28],manifest=Config.NONE) +class HandImageBufferTest { + private fun bitmap(vararg values: Int) = Bitmap.createBitmap(values.size, 1, Bitmap.Config.ARGB_8888).apply { + setPixels(values.map { Color.rgb(it, it, it) }.toIntArray(), 0, values.size, 0, 0, values.size, 1) + } + + private fun values(buffer: HandImageBuffer, bitmap: Bitmap): List<Int> = values(buffer.image(bitmap)) + + private fun values(image: MPImage): List<Int> = image.use { + assertEquals(MPImage.IMAGE_FORMAT_RGB, image.containedImageProperties.single().imageFormat) + val pixels = ByteBufferExtractor.extract(image) + assertTrue(pixels.isDirect) + assertEquals(image.width * image.height * 3, pixels.remaining()) + List(image.width * image.height) { + val red = pixels.get().toInt() and 255 + assertEquals(red, pixels.get().toInt() and 255) + assertEquals(red, pixels.get().toInt() and 255) + red + } + } + + @Test fun liveDefaultUsesFullModelAndPreservesCameraPixelCoordinatesAndExposure() { + assertEquals(HandModel.FULL, HandModel.DEFAULT) + val input = byteArrayOf(32, 64, 96, 128.toByte(), 160.toByte(), 192.toByte()) + val original = input.copyOf() + val image = HandImageBuffer().image(input, 3, 2) + assertEquals(3, image.width); assertEquals(2, image.height) + assertEquals(listOf(32, 64, 96, 128, 160, 192), values(image)) + assertArrayEquals(original, input) + } + + @Test fun directCameraAndRawBitmapInputsMatchAcrossEveryGrayValueAndFrameSize() { + val buffer = HandImageBuffer() + for ((width, height) in listOf(16 to 16, 3 to 2, 2 to 3, 1 to 1)) { + val input = ByteArray(width * height) { ((it * 73 + 32) and 255).toByte() } + val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888).apply { + setPixels(input.map { (it.toInt() and 255).let { value -> Color.rgb(value, value, value) } }.toIntArray(), + 0, width, 0, 0, width, height) + } + try { + val expected = input.map { it.toInt() and 255 } + assertEquals(expected, values(buffer.image(input, width, height))) + assertEquals(expected, values(buffer.image(bitmap))) + } finally { bitmap.recycle() } + } + } + + @Test(expected = IllegalArgumentException::class) + fun cameraDimensionsMustMatchTheGrayscaleFrame() { + HandImageBuffer().image(ByteArray(5), 3, 2) + } + + @Test fun resizedAndSuccessiveFramesDoNotRetainOldPixelsOrExposure() { + val buffer = HandImageBuffer() + for (input in listOf(intArrayOf(32, 96, 160), intArrayOf(64, 128, 192), intArrayOf(0, 255))) { + val bitmap = bitmap(*input) + try { + assertEquals(input.toList(), values(buffer, bitmap)) + } finally { bitmap.recycle() } + } + } + + @Test fun closingInferenceImagesDoesNotRecycleReusableCameraBitmap() { + val bitmap=Bitmap.createBitmap(2,2,Bitmap.Config.ARGB_8888) + val buffer=HandImageBuffer() + repeat(3) { frame -> + bitmap.eraseColor(if(frame%2==0) Color.WHITE else Color.BLACK) + buffer.image(bitmap).use { image -> + assertEquals(2,image.width);assertEquals(2,image.height) + val pixels=ByteBufferExtractor.extract(image) + assertEquals(if(frame%2==0) 255 else 0,pixels.get(0).toInt() and 255) + } + assertFalse(bitmap.isRecycled) + } + bitmap.recycle() + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/HandInferenceScheduleTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/HandInferenceScheduleTest.kt new file mode 100644 index 0000000000..18006947fb --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/HandInferenceScheduleTest.kt @@ -0,0 +1,128 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class HandInferenceScheduleTest { + private fun frame(schedule: HandInferenceSchedule, time: Long, left: List<Int> = listOf(0), + right: List<Int> = left, rawLeft: Int = left.size, rawRight: Int = right.size): Int { + val maximum = schedule.select(time) + schedule.observe(time, left, right, rawLeft, rawRight) + return maximum + } + + private fun stable(schedule: HandInferenceSchedule, side: Int = 0) { + for (time in listOf(0L, 80L, 160L)) assertEquals(2, frame(schedule, time, listOf(side))) + } + + @Test fun requiresThreeStereoConsistentFramesBeforeSingleHandTracking() { + val schedule = HandInferenceSchedule() + stable(schedule) + assertEquals(1, frame(schedule, 240)) + assertEquals(1, frame(schedule, 320)) + assertEquals(2, frame(schedule, 400)) + assertEquals(1, frame(schedule, 480)) + } + + @Test fun discoversSecondHandAtBothCameraInputCadences() { + for (cadence in listOf(40L, 80L)) { + val schedule = HandInferenceSchedule() + val searches = ArrayList<Long>() + for (time in 0L..1200L step cadence) { + if (frame(schedule, time) == 2) searches.add(time) + } + assertTrue(searches.size >= 5) + assertTrue(searches.zipWithNext().all { (first, second) -> second - first <= 240 }) + } + } + + @Test fun delayedFrameStillSearchesAtFirstFrameAfterDiscoveryDeadline() { + val schedule = HandInferenceSchedule() + stable(schedule) + assertEquals(1, frame(schedule, 240)) + assertEquals(1, frame(schedule, 399)) + assertEquals(2, frame(schedule, 479)) + assertEquals(1, frame(schedule, 559)) + } + + @Test fun secondHandDiscoveredBySearchKeepsBothHandDetectorsSelected() { + val schedule = HandInferenceSchedule() + stable(schedule) + assertEquals(1, frame(schedule, 240)) + assertEquals(2, frame(schedule, 400, listOf(0, 1))) + for (time in listOf(480L, 560L, 640L)) assertEquals(2, frame(schedule, time, listOf(1, 0))) + for (time in listOf(720L, 800L, 880L)) assertEquals(2, frame(schedule, time)) + assertEquals(1, frame(schedule, 960)) + } + + @Test fun anyCameraLossImmediatelyReturnsToFullSearch() { + for ((left, right) in listOf(emptyList<Int>() to listOf(0), listOf(0) to emptyList())) { + val schedule = HandInferenceSchedule() + stable(schedule) + assertEquals(1, frame(schedule, 240, left, right)) + assertEquals(2, frame(schedule, 320)) + } + } + + @Test fun ambiguousOrFilteredDetectionsNeverMaintainSingleHandMode() { + val invalid = listOf( + listOf(0) to listOf(1), + listOf(0, 0) to listOf(0), + listOf(0) to listOf(0, 0), + listOf(-1) to listOf(-1), + listOf(2) to listOf(2) + ) + for ((left, right) in invalid) { + val schedule = HandInferenceSchedule() + stable(schedule) + frame(schedule, 240, left, right) + assertEquals(2, frame(schedule, 320)) + } + for ((rawLeft, rawRight) in listOf(2 to 1, 1 to 2, 0 to 1, -1 to 1)) { + val schedule = HandInferenceSchedule() + stable(schedule) + frame(schedule, 240, rawLeft = rawLeft, rawRight = rawRight) + assertEquals(2, frame(schedule, 320)) + } + } + + @Test fun changingSidesRequiresFreshFullSearchStability() { + val schedule = HandInferenceSchedule() + stable(schedule) + assertEquals(1, frame(schedule, 240, listOf(1))) + for (time in listOf(320L, 400L, 480L)) assertEquals(2, frame(schedule, time, listOf(1))) + assertEquals(1, frame(schedule, 560, listOf(1))) + } + + @Test fun inconsistentInitialSidesCannotAccumulateStability() { + val schedule = HandInferenceSchedule() + for (index in 0..8) assertEquals(2, frame(schedule, index * 80L, listOf(index % 2))) + } + + @Test fun resetDropsSessionState() { + val schedule = HandInferenceSchedule() + stable(schedule) + frame(schedule, 240) + schedule.reset() + stable(schedule, 1) + assertEquals(1, frame(schedule, 240, listOf(1))) + } + + @Test fun longGapAndNonmonotonicTimeRequireFreshStability() { + for (time in listOf(160L, 120L, 561L, -1L)) { + val schedule = HandInferenceSchedule() + stable(schedule) + assertEquals(2, frame(schedule, time)) + assertEquals(2, frame(schedule, maxOf(0, time) + 80)) + } + } + + @Test fun unobservedInferenceAndMismatchedObservationResetSchedule() { + val schedule = HandInferenceSchedule() + stable(schedule) + assertEquals(1, schedule.select(240)) + assertEquals(2, frame(schedule, 320)) + schedule.observe(240, listOf(0), listOf(0)) + assertEquals(2, frame(schedule, 400)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/HandObservationTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/HandObservationTest.kt new file mode 100644 index 0000000000..68c09e4b9c --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/HandObservationTest.kt @@ -0,0 +1,65 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class HandObservationTest { + private val time=1_000_000_000L + private fun session()=SpatialSession().apply { + reset(7,1.6f) + accept(SpatialSample(SpatialPose(),time,7,true)) + } + private fun advance(session: SpatialSession, ms: Long, valid: Boolean=true, x: Float=.1f) { + session.accept(SpatialSample(SpatialPose(SpatialVector(x=x)),time+ms*1_000_000,7,valid)) + } + + @Test fun lateCameraConfirmationUsesTheCapturePoseInsteadOfTheLatestPose() { + val session=session() + val observation=HandObservation(time,7,session.trackingFrameGeneration) + assertNull(observation.headPose(session,false,time)) + advance(session,150) + assertEquals(SpatialPose(),observation.headPose(session,true,time+150_000_000)) + assertEquals(time,observation.timeNs) + } + + @Test fun missingConfirmationOrExpiredObservationCannotPublish() { + val session=session() + val observation=HandObservation(time,7,session.trackingFrameGeneration) + advance(session,180) + assertNull(observation.headPose(session,false,time+180_000_000)) + assertNotNull(observation.headPose(session,true,time+200_000_000)) + assertNull(observation.headPose(session,true,time+200_000_001)) + assertNull(observation.headPose(session,true,time-1)) + } + + @Test fun longerHandWindowDoesNotExtendHeadFreshness() { + val session=session() + val observation=HandObservation(time,7,session.trackingFrameGeneration) + assertNotNull(observation.headPose(session,true,time+100_000_000)) + assertNull(observation.headPose(session,true,time+100_000_001)) + advance(session,150) + assertNotNull(observation.headPose(session,true,time+150_000_000)) + } + + @Test fun trackingLossAndRecoveredDiscontinuityInvalidateInFlightInference() { + val session=session() + val observation=HandObservation(time,7,session.trackingFrameGeneration) + advance(session,20,valid=false) + assertNull(observation.headPose(session,true,time+20_000_000)) + advance(session,30,x=5f) + assertNull(observation.headPose(session,true,time+30_000_000)) + session.setFloor(1.6f,time+30_000_000) + assertTrue(session.valid(time+30_000_000)) + assertNull(observation.headPose(session,true,time+30_000_000)) + } + + @Test fun reconnectAndMissingHistoryCannotBorrowAnotherPose() { + val session=session() + val observation=HandObservation(time,7,session.trackingFrameGeneration) + advance(session,40) + assertNull(observation.copy(timeNs=time+20_000_000).headPose(session,true,time+40_000_000)) + session.reset(8,1.6f) + session.accept(SpatialSample(SpatialPose(),time+50_000_000,8,true)) + assertNull(observation.headPose(session,true,time+50_000_000)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/HandProcessingRateTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/HandProcessingRateTest.kt new file mode 100644 index 0000000000..2cba38ff3d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/HandProcessingRateTest.kt @@ -0,0 +1,119 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class HandProcessingRateTest { + private fun sample(rate: HandProcessingRate, processingMs: Long = 35, ageMs: Long = 65, + healthy: Boolean = true): Int = + rate.observe(processingMs * 1_000_000, ageMs * 1_000_000, healthy) + + private fun fastest(rate: HandProcessingRate) { + repeat(16) { sample(rate) } + assertEquals(800, rate.permille) + } + + @Test fun beginsConservativelyAndRequiresEightHealthySamplesPerIncrease() { + val rate = HandProcessingRate() + assertEquals(500, rate.permille) + repeat(7) { assertEquals(500, sample(rate)) } + assertEquals(600, sample(rate)) + repeat(7) { assertEquals(600, sample(rate)) } + assertEquals(800, sample(rate)) + repeat(20) { assertEquals(800, sample(rate)) } + } + + @Test fun onlySelectsFifteenHzWhenTwentyHzHasInsufficientHeadroom() { + val rate = HandProcessingRate() + repeat(8) { sample(rate, 50, 80) } + assertEquals(600, rate.permille) + repeat(30) { assertEquals(600, sample(rate, 50, 80)) } + } + + @Test fun slowProcessingStaysAtTwelvePointFiveHz() { + val rate = HandProcessingRate() + repeat(30) { assertEquals(500, sample(rate, 60, 100)) } + } + + @Test fun sustainedProcessingPastTheCurrentPeriodReducesRate() { + val rate = HandProcessingRate() + fastest(rate) + repeat(2) { assertEquals(800, sample(rate, 70)) } + assertEquals(600, sample(rate, 70)) + repeat(7) { assertEquals(600, sample(rate, 70)) } + assertEquals(500, sample(rate, 70)) + repeat(7) { assertEquals(500, sample(rate)) } + } + + @Test fun largeProcessingSpikeSkipsDirectlyToConservativeRate() { + val rate = HandProcessingRate() + fastest(rate) + assertEquals(500, sample(rate, 80, 100)) + } + + @Test fun ageLimitReducesRateWithoutWaitingForProcessingAverage() { + val rate = HandProcessingRate() + fastest(rate) + assertEquals(500, sample(rate, ageMs = 140)) + repeat(7) { assertEquals(500, sample(rate)) } + assertEquals(600, sample(rate)) + } + + @Test fun agingFramesCannotRaiseTheRate() { + val rate = HandProcessingRate() + repeat(30) { assertEquals(500, sample(rate, ageMs = 111)) } + repeat(8) { sample(rate, ageMs = 100) } + assertEquals(600, rate.permille) + repeat(30) { assertEquals(600, sample(rate, ageMs = 91)) } + } + + @Test fun marginalHeadroomInterruptsConsecutiveUpshiftSamples() { + val rate = HandProcessingRate() + repeat(7) { sample(rate, 55) } + assertEquals(500, sample(rate, 60)) + repeat(7) { assertEquals(500, sample(rate)) } + assertEquals(600, sample(rate)) + } + + @Test fun recoveryMustAlsoBringAverageProcessingBelowUpshiftThreshold() { + val rate = HandProcessingRate() + sample(rate, 100) + repeat(8) { assertEquals(500, sample(rate)) } + repeat(8) { sample(rate) } + assertEquals(600, rate.permille) + } + + @Test fun trackingLossAndInvalidTimingResetTheRateAndHistory() { + for (invalid in listOf(Triple(35_000_000L, 65_000_000L, false), + Triple(0L, 65_000_000L, true), Triple(-1L, 65_000_000L, true), + Triple(35_000_000L, -1L, true))) { + val rate = HandProcessingRate() + fastest(rate) + assertEquals(500, rate.observe(invalid.first, invalid.second, invalid.third)) + repeat(7) { assertEquals(500, sample(rate)) } + assertEquals(600, sample(rate)) + } + } + + @Test fun lifecycleResetDropsOldHeadroom() { + val rate = HandProcessingRate() + fastest(rate) + assertEquals(500, rate.reset()) + repeat(7) { assertEquals(500, sample(rate)) } + assertEquals(600, sample(rate)) + } + + @Test fun periodicDiscoverySearchesPermitFifteenHzButNotTwentyHz() { + val rate = HandProcessingRate() + repeat(8) { sample(rate, if (it % 3 == 2) 74 else 36, 90) } + assertEquals(600, rate.permille) + for (frame in 8 until 90) { + assertEquals(600, sample(rate, if (frame % 3 == 2) 74 else 36, 90)) + } + } + + @Test fun continuouslySlowDiscoveryCannotRaiseRate() { + val rate = HandProcessingRate() + repeat(30) { assertEquals(500, sample(rate, 70, 100)) } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/HandTrackingMetricsTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/HandTrackingMetricsTest.kt new file mode 100644 index 0000000000..2311d0c470 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/HandTrackingMetricsTest.kt @@ -0,0 +1,119 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class HandTrackingMetricsTest { + private val missing = HandObservationDiagnostic(HandObservationOutcome.NO_MATCHING_DETECTION) + private fun accepted(trigger: Float = 0f, grip: Boolean = false) = HandObservationDiagnostic( + HandObservationOutcome.ACCEPTED, listOf(0,5,9,13,17), trigger, true, grip, true) + + @Test fun cameraSequencesCountOnceAndSkippedPairsAreNotInvented() { + val metrics = HandTrackingMetrics() + metrics.observe(0, true, accepted(), accepted()) + metrics.observe(10, true, accepted(), missing) + metrics.observe(10, true, missing, accepted()) + metrics.observe(9, true, missing, accepted()) + metrics.observe(15, true, accepted(), missing) + val result = metrics.snapshot() + assertEquals(2L, result.processedPairs) + assertEquals(2L, result.inferencePairs) + assertEquals(2L, result.left.accepted) + assertEquals(0L, result.right.accepted) + assertEquals(2L, result.right.observations) + assertEquals(0L, result.left.trackingLosses) + } + + @Test fun setupAndUnavailableFramesRemainDistinctFromInference() { + val metrics = HandTrackingMetrics() + val setup = HandObservationDiagnostic(HandObservationOutcome.CALIBRATION_REQUIRED) + val unavailable = HandObservationDiagnostic(HandObservationOutcome.INFERENCE_UNAVAILABLE) + metrics.observe(1, false, setup, setup) + metrics.observe(2, false, unavailable, unavailable) + metrics.observe(3, true, accepted(), missing) + val result = metrics.snapshot() + assertEquals(3L, result.processedPairs) + assertEquals(1L, result.inferencePairs) + assertEquals(3L, result.left.observations) + assertEquals(1L, result.left.accepted) + assertEquals(1L, result.left.outcomes[HandObservationOutcome.CALIBRATION_REQUIRED]) + assertEquals(1L, result.left.outcomes[HandObservationOutcome.INFERENCE_UNAVAILABLE]) + assertEquals(3L, result.right.maximumConsecutiveRejected) + } + + @Test fun countsGestureLossesIndependentlyFromPalmLossAndOtherHand() { + val metrics = HandTrackingMetrics() + metrics.observe(1, true, accepted(), accepted()) + metrics.observe(2, true, accepted().copy(triggerGeometryValid = false), accepted()) + metrics.observe(3, true, accepted().copy(gripGeometryValid = false), accepted()) + metrics.observe(4, true, missing, accepted()) + metrics.observe(5, true, missing, accepted()) + val result = metrics.snapshot() + assertEquals(3L, result.left.accepted) + assertEquals(1L, result.left.trackingLosses) + assertEquals(2L, result.left.triggerLosses) + assertEquals(1L, result.left.gripLosses) + assertEquals(2L, result.left.maximumConsecutiveRejected) + assertEquals(0L, result.right.trackingLosses) + assertEquals(0L, result.right.triggerLosses) + assertEquals(0L, result.right.gripLosses) + } + + @Test fun rejectedObservationRetainsRawEstimatesButCannotCountUsableInputs() { + val metrics = HandTrackingMetrics() + val stale = accepted(1f, true).copy(outcome = HandObservationOutcome.STALE_OBSERVATION) + assertEquals(1f, stale.triggerEstimate, 0f) + assertTrue(stale.gripEstimate) + assertTrue(stale.triggerGeometryValid) + assertFalse(stale.accepted) + assertFalse(stale.triggerValid) + assertFalse(stale.gripValid) + metrics.observe(1, true, stale, stale) + val side = metrics.snapshot().left + assertEquals(0L, side.accepted) + assertEquals(0L, side.triggerValid) + assertEquals(0L, side.gripValid) + assertEquals(0L, side.triggerAboveClickThreshold) + assertEquals(0L, side.gripPressed) + } + + @Test fun thresholdCountsDescribeValidEstimatesWithoutClaimingDriverPresses() { + val metrics = HandTrackingMetrics() + for ((index, trigger) in listOf(0f, .25f, .65f, 1f).withIndex()) + metrics.observe(index + 1L, true, accepted(trigger, index == 3), missing) + metrics.observe(5, true, accepted(1f, true).copy(triggerGeometryValid = false, gripGeometryValid = false), missing) + val side = metrics.snapshot().left + assertEquals(5L, side.accepted) + assertEquals(4L, side.triggerValid) + assertEquals(4L, side.gripValid) + assertEquals(1L, side.triggerAboveClickThreshold) + assertEquals(1L, side.triggerReleased) + assertEquals(1L, side.gripPressed) + } + + @Test fun snapshotsRetainTheirCountsWhenLaterFramesArrive() { + val metrics = HandTrackingMetrics() + metrics.observe(1, true, accepted(), missing) + val first = metrics.snapshot() + metrics.observe(2, true, missing, accepted()) + assertEquals(1L, first.processedPairs) + assertEquals(mapOf(HandObservationOutcome.ACCEPTED to 1L), first.left.outcomes) + assertEquals(0L, first.left.trackingLosses) + assertEquals(2L, metrics.snapshot().processedPairs) + assertEquals(1L, metrics.snapshot().left.trackingLosses) + } + + @Test fun aNewTrackingConnectionStartsCountsAndSequenceFromZero() { + val old = HandTrackingMetrics() + old.observe(500, true, accepted(), missing) + old.observe(501, true, missing, missing) + val current = HandTrackingMetrics() + assertEquals(0L, current.snapshot().processedPairs) + current.observe(1, true, accepted(), accepted()) + val result = current.snapshot() + assertEquals(1L, result.processedPairs) + assertEquals(1L, result.left.accepted) + assertEquals(0L, result.left.trackingLosses) + assertEquals(0L, result.right.maximumConsecutiveRejected) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/JoyConFlowGateTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/JoyConFlowGateTest.kt new file mode 100644 index 0000000000..d096fd8c8f --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/JoyConFlowGateTest.kt @@ -0,0 +1,23 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class JoyConFlowGateTest { + @Test fun missingDetectionsCannotExtendTheSeedLifetime() { + val seed = 1_000_000_000L + assertTrue(JoyConFlowGate.fresh(seed, seed + 640_000_000, seed + 720_000_000)) + assertFalse(JoyConFlowGate.fresh(seed, seed + 720_000_000, seed + 800_000_000)) + assertFalse(JoyConFlowGate.fresh(seed, seed, seed + 200_000_001)) + assertFalse(JoyConFlowGate.fresh(seed, seed, seed)) + } + + @Test fun featureMustBeVisibleAndReturnToItsOriginalLocation() { + assertTrue(JoyConFlowGate.point(110.0,105.0,100.5,100.5,100.0,100.0,5f,true,true,640,480)) + assertFalse(JoyConFlowGate.point(110.0,105.0,103.0,100.0,100.0,100.0,5f,true,true,640,480)) + assertFalse(JoyConFlowGate.point(110.0,105.0,100.0,100.0,100.0,100.0,30f,true,true,640,480)) + assertFalse(JoyConFlowGate.point(110.0,105.0,100.0,100.0,100.0,100.0,5f,false,true,640,480)) + assertFalse(JoyConFlowGate.point(Double.NaN,105.0,100.0,100.0,100.0,100.0,5f,true,true,640,480)) + assertFalse(JoyConFlowGate.point(640.0,105.0,100.0,100.0,100.0,100.0,5f,true,true,640,480)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/JoyConWristPositionTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/JoyConWristPositionTest.kt new file mode 100644 index 0000000000..69d6e068fa --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/JoyConWristPositionTest.kt @@ -0,0 +1,69 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class JoyConWristPositionTest { + private fun points(depth: Float = .4f): MutableList<SpatialVector?> = MutableList<SpatialVector?>(21) { null }.apply { + this[0] = SpatialVector(0f, 0f, depth) + this[5] = SpatialVector(.035f, -.06f, depth) + this[9] = SpatialVector(0f, -.065f, depth) + this[13] = SpatialVector(-.02f, -.06f, depth) + this[17] = SpatialVector(-.045f, -.05f, depth) + } + + @Test fun grippingControllerNeedsOnlyTheWristAndNeverGeneratesFingerGestures() { + val estimator = JoyConWristPosition() + val full = estimator.estimate(points(), SpatialPose(), 1_000_000_000)!! + val occluded = MutableList<SpatialVector?>(21) { null }.apply { this[0] = points()[0] } + val grip = estimator.estimate(occluded, SpatialPose(), 1_080_000_000)!! + assertEquals(occluded[0], grip.pose.position) + assertEquals(full.pose.position, grip.pose.position) + assertTrue(grip.valid) + assertFalse(grip.triggerValid) + assertFalse(grip.gripValid) + assertNull(HandGestures(false).estimate(occluded, SpatialPose(), 1_080_000_000)) + } + + @Test fun erroneousKnucklesCannotMoveOrRejectTheWrist() { + val malformed = points().apply { + this[5] = SpatialVector(Float.NaN, 0f, .4f) + this[9] = SpatialVector(4f, 5f, 6f) + this[13] = this[0] + this[17] = null + } + val grip = JoyConWristPosition().estimate(malformed, SpatialPose(), 1)!! + assertEquals(malformed[0], grip.pose.position) + } + + @Test fun measuredExtensionMovesTheWorldPositionByTheSameDistance() { + val estimator = JoyConWristPosition() + val world = SpatialPose(SpatialVector(1f, 2f, 3f), SpatialRotation(y = 1f, w = 0f)) + val near = estimator.estimate(points(.3f).take(1), world, 1_000_000_000)!! + val far = estimator.estimate(points(.7f).take(1), world, 1_300_000_000)!! + assertEquals(SpatialVector(1f, 2f, 2.7f), near.pose.position) + assertEquals(-.4f, far.pose.position.z - near.pose.position.z, .0001f) + assertEquals(near.pose.position.x, far.pose.position.x, .0001f) + assertEquals(1_300_000_000, far.timeNs) + } + + @Test fun missingOrNonfiniteWristIsRejectedEvenWithVisibleKnuckles() { + for (wrist in listOf(null, SpatialVector(Float.NaN, 0f, .4f), SpatialVector(0f, 0f, Float.POSITIVE_INFINITY))) { + val estimator = JoyConWristPosition() + assertNull(estimator.estimate(points().apply { this[0] = wrist }, SpatialPose(), 1)) + assertEquals(HandObservationOutcome.WRIST_LANDMARK_MISSING, estimator.lastOutcome) + } + assertNull(JoyConWristPosition().estimate(emptyList(), SpatialPose(), 1)) + } + + @Test fun implausibleJumpsAndRepeatedFramesStayRejectedWithoutPoisoningTheLastPosition() { + val estimator = JoyConWristPosition() + assertNotNull(estimator.estimate(points(), SpatialPose(), 1_000_000_000)) + assertNull(estimator.estimate(points(1.2f), SpatialPose(), 1_080_000_000)) + assertEquals(HandObservationOutcome.WRIST_MOTION_REJECTED, estimator.lastOutcome) + assertNull(estimator.estimate(points(), SpatialPose(), 1_000_000_000)) + assertNotNull(estimator.estimate(points(.45f).take(1), SpatialPose(), 1_090_000_000)) + estimator.reset() + assertNotNull(estimator.estimate(points(1.2f).take(1), SpatialPose(), 1_100_000_000)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/LumaRgbDiagnosticTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/LumaRgbDiagnosticTest.kt new file mode 100644 index 0000000000..91174de496 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/LumaRgbDiagnosticTest.kt @@ -0,0 +1,73 @@ +package com.droiddeck.launcher.glasses + +import android.app.Application +import android.os.SystemClock +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.json.JSONObject +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(application = Application::class) +class LumaRgbDiagnosticTest { + private val context get() = RuntimeEnvironment.getApplication() + private val statusFile get() = File(context.filesDir, "spatial/rgb-diagnostic.json") + + @Before fun reset() { statusFile.delete(); statusFile.parentFile?.mkdirs() } + + @Test fun aDeadWorkerOrPreviousBootCannotLeaveCapturePermanentlyBusy() { + for (started in listOf(SystemClock.elapsedRealtime() - 16_000, SystemClock.elapsedRealtime() + 5_000)) { + statusFile.writeText("""{"state":"capturing","startedMs":$started}""") + assertEquals("failed", LumaRgbDiagnostic.status(context).getString("state")) + } + } + + @Test fun onlyPendingCapturesExpire() { + statusFile.writeText("""{"state":"completed","path":"saved-capture"}""") + assertEquals("completed", LumaRgbDiagnostic.status(context).getString("state")) + statusFile.writeText("""{"state":"capturing","startedMs":${SystemClock.elapsedRealtime()}}""") + assertEquals("capturing", LumaRgbDiagnostic.status(context).getString("state")) + } + + @Test fun longerReliabilityCaptureRemainsBusyUntilItsBoundedDeadline() { + val started = SystemClock.elapsedRealtime() - 20_000 + statusFile.writeText("""{"state":"capturing","startedMs":$started,"timeoutMs":45000}""") + assertEquals("capturing", LumaRgbDiagnostic.status(context).getString("state")) + statusFile.writeText("""{"state":"capturing","startedMs":${started-30_000},"timeoutMs":999999}""") + assertEquals("failed", LumaRgbDiagnostic.status(context).getString("state")) + } + + @Test fun terminalResultWaitsForWorkerExitBeforeAnotherRequest() { + for (result in listOf("completed","failed")) { + val record=JSONObject().put("state",result).put("workerPid",123).put("startedMs",1000) + val finishing=LumaRgbDiagnostic.resolveStatus(JSONObject(record.toString()),2000,true) + assertEquals("capturing",finishing.getString("state")) + assertEquals("finishing",finishing.getString("phase")) + assertEquals(result,finishing.getString("resultState")) + assertTrue(finishing.getBoolean("busy")) + val exited=LumaRgbDiagnostic.resolveStatus(record,2000,false) + assertEquals(result,exited.getString("state")) + assertFalse(exited.getBoolean("busy")) + } + } + + @Test fun deadWorkerFailsImmediatelyAndExpiredWorkerRemainsBusyOnlyUntilExit() { + val record=JSONObject().put("state","capturing").put("workerPid",123).put("startedMs",1000) + val dead=LumaRgbDiagnostic.resolveStatus(JSONObject(record.toString()),2000,false) + assertEquals("failed",dead.getString("state")) + assertFalse(dead.getBoolean("busy")) + val expired=LumaRgbDiagnostic.resolveStatus(JSONObject(record.toString()),17000,true) + assertEquals("failed",expired.getString("state")) + assertTrue(expired.getBoolean("busy")) + val exited=LumaRgbDiagnostic.resolveStatus(record,17000,false) + assertEquals("failed",exited.getString("state")) + assertFalse(exited.getBoolean("busy")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoCalibrationTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoCalibrationTest.kt new file mode 100644 index 0000000000..996b8fa8c2 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoCalibrationTest.kt @@ -0,0 +1,137 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class RayNeoCalibrationTest { + private val axes = RayNeoSensorAxes(0f, false) + private fun sample(a: FloatArray = floatArrayOf(0f, -9.81f, 0f), g: FloatArray = floatArrayOf(0.5f, -0.3f, 0.2f)) = + RayNeoSensorSample(a, g, 0f, FloatArray(3), 0f, 0f, 0) + + private fun finish(c: RayNeoCalibrationCollector, start: Long = 0, sample: RayNeoSensorSample = sample()): RayNeoCalibration? { + var result: RayNeoCalibration? = null + for (ms in start..(start + 8100) step 10) c.update(sample, ms)?.let { result = it } + return result + } + + @Test fun upsideDownStillPoseMeasuresBiasAfterSettlingAndFiveSeconds() { + val c = RayNeoCalibrationCollector(axes, 0) + for (ms in 0L..7990 step 10) assertNull(c.update(sample(), ms)) + val result = c.update(sample(), 8000)!! + assertEquals(CalibrationPhase.SAVED, c.phase) + assertEquals(100, c.progress) + assertEquals(Vec3(0.5f, -0.3f, 0.2f), result.gyroBiasDps) + assertEquals(Quaternion.IDENTITY, result.level) + } + + @Test fun uprightOrSidewaysCannotSave() { + for (a in listOf(floatArrayOf(0f, 9.81f, 0f), floatArrayOf(9.81f, 0f, 0f))) { + val c = RayNeoCalibrationCollector(axes, 0) + assertNull(finish(c, sample = sample(a))) + assertEquals(CalibrationPhase.TURN_OVER, c.phase) + } + } + + @Test fun movementRestartsTheWindowAndAllowsRecovery() { + val c = RayNeoCalibrationCollector(axes, 0) + for (ms in 0L..6000 step 10) c.update(sample(), ms) + c.update(sample(g = floatArrayOf(20f, 0f, 0f)), 6010) + assertEquals(CalibrationPhase.MOVING, c.phase) + assertEquals(0, c.progress) + assertNotNull(finish(c, 6020)) + } + + @Test fun VibrationIsRejectedEvenBelowTheInstantSpeedLimit() { + val c = RayNeoCalibrationCollector(axes, 0) + var result: RayNeoCalibration? = null + for (ms in 0L..12000 step 10) { + val gyro = if (ms % 20 == 0L) 4f else -4f + c.update(sample(g = floatArrayOf(gyro, 0f, 0f)), ms)?.let { result = it } + } + assertNull(result) + } + + @Test fun missingSamplesCannotCompleteAStationaryWindow() { + val c = RayNeoCalibrationCollector(axes, 0) + for (ms in 0L..6000 step 10) c.update(sample(), ms) + assertNull(c.update(sample(), 9000)) + assertEquals(CalibrationPhase.MOVING, c.phase) + assertNull(c.update(sample(), 30_000)) + assertEquals(CalibrationPhase.FAILED, c.phase) + } + + @Test fun nonFiniteOrInvalidGravityCannotSave() { + for (a in listOf(floatArrayOf(Float.NaN, -9.81f, 0f), FloatArray(3), floatArrayOf(0f, -20f, 0f))) { + assertNull(finish(RayNeoCalibrationCollector(axes, 0), sample = sample(a))) + } + } + + @Test fun levelCorrectionAlignsBothInvertedAndUprightGravity() { + val c = RayNeoCalibrationCollector(axes, 0) + val result = finish(c, sample = sample(floatArrayOf(0.85f, -9.735f, 0.85f)))!! + val up = result.level.rotate(Vec3(-0.85f, 9.735f, -0.85f).normalized()) + assertEquals(0f, up.x, 0.001f); assertEquals(1f, up.y, 0.001f); assertEquals(0f, up.z, 0.001f) + val filter = RayNeoOrientationFilter(0f, calibration = result) + var q = FloatArray(4) + repeat(1000) { q = filter.update(sample(floatArrayOf(-0.85f, 9.735f, -0.85f)).copy(deviceTick100us = it * 100L)) } + assertArrayEquals(floatArrayOf(1f, 0f, 0f, 0f), q, 0.001f) + } + + @Test fun profilePersistenceIsIsolatedByVendorProductAndSerialAndCanReset() { + val prefs = RuntimeEnvironment.getApplication().getSharedPreferences("cal-test", Context.MODE_PRIVATE) + val store = RayNeoCalibrationStore(prefs) + val value = RayNeoCalibration(Vec3(0.1f, 0.2f, 0.3f), Quaternion.IDENTITY) + val key = store.key(0x3941, 0xaf50, "first") + store.save(key, value) + assertEquals(value, store.load(key)) + for (other in listOf(store.key(0x3941, 0xaf50, "second"), store.key(0x1bbb, 0xaf50, "first"), store.key(0x3941, 1, "first"))) { + assertNull(store.load(other)) + } + store.save(key, null) + assertNull(store.load(key)) + } + + @Test fun corruptOrExcessiveProfilesFallBackToDefaults() { + assertNull(RayNeoCalibration.decode("bad")) + assertNull(RayNeoCalibration.decode("{\"version\":2}")) + assertNull(RayNeoCalibration.decode(RayNeoCalibration(Vec3(10f, 0f, 0f), Quaternion.IDENTITY).encode())) + assertNull(RayNeoCalibration.decode(RayNeoCalibration(Vec3(0f, 0f, 0f), Quaternion(0f, 1f, 0f, 0f)).encode())) + } + + @Test fun recordedNonMaxRestingPoseCalibratesWithItsOwnProfile() { + val profile = RayNeoSensorProfile.forDevice(true, 0x40) + val collector = RayNeoCalibrationCollector(RayNeoSensorAxes(profile.rotationXDeg, profile.gtMaxAxes), 0) + val reading = sample(floatArrayOf(0.02f, -8.819f, -4.106f), floatArrayOf(-0.1f, 0.35f, -0.038f)) + val saved = finish(collector, sample = reading)!! + assertEquals(CalibrationPhase.SAVED, collector.phase) + assertEquals(-0.1f, saved.gyroBiasDps.x, 0.0001f) + val upright = RayNeoOrientationFilter(profile.rotationXDeg, profile.gtMaxAxes, saved) + .update(sample(floatArrayOf(-0.02f, 8.819f, 4.106f), reading.gyroDps)) + assertArrayEquals(floatArrayOf(1f, 0f, 0f, 0f), upright, 0.001f) + // This was the reported failure: the same physical pose cannot calibrate + // through the Max's permutation and 35-degree mounting correction. + assertNull(finish(RayNeoCalibrationCollector(RayNeoSensorAxes(35f, true), 0), sample = reading)) + } + + @Test fun nonMaxProfileCannotOverwriteLegacyMaxCalibrationWithTheSameUsbIdentity() { + val prefs = RuntimeEnvironment.getApplication().getSharedPreferences("cal-profile-test", Context.MODE_PRIVATE) + val store = RayNeoCalibrationStore(prefs) + val base = store.key(0x3941, 0xaf50, "00000001") + val standard = RayNeoCalibrationStore.profileKey(base, true, 0x40) + val legacy = RayNeoCalibration(Vec3(1f, 0f, 0f), Quaternion.IDENTITY) + val current = RayNeoCalibration(Vec3(0f, 1f, 0f), Quaternion.IDENTITY) + store.save(base, legacy); store.save(standard, current) + assertEquals(legacy, store.load(base)) + assertEquals(current, store.load(standard)) + assertEquals(base, RayNeoCalibrationStore.profileKey(base, false, 0x40)) + assertEquals(base, RayNeoCalibrationStore.profileKey(base, true, 0x7f)) + assertEquals(base, RayNeoCalibrationStore.profileKey(base, true, 0x41)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoEndpointsTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoEndpointsTest.kt new file mode 100644 index 0000000000..933df6220c --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoEndpointsTest.kt @@ -0,0 +1,62 @@ +package com.droiddeck.launcher.glasses + +import android.hardware.usb.UsbDevice +import android.hardware.usb.UsbEndpoint +import android.hardware.usb.UsbInterface +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import org.robolectric.shadow.api.Shadow +import org.robolectric.util.ReflectionHelpers +import org.robolectric.util.ReflectionHelpers.ClassParameter.from + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class RayNeoEndpointsTest { + @Test fun gtPrefersInterfaceNumberFiveOverEarlierPairs() { + val other = iface(1) + val control = iface(5) + val selected = RayNeoProtocol.selectEndpoints(device(0x3941, other, control))!! + assertSame(control, selected.usbInterface) + assertEquals(0x81, selected.inEndpoint.address) + assertEquals(0x01, selected.outEndpoint.address) + } + + @Test fun gtAcceptsUniqueRenumberedPairAndIgnoresSmallButtonReports() { + val control = iface(0) + assertSame(control, RayNeoProtocol.selectEndpoints( + device(0x3941, iface(5, packetSize = 8), control))?.usbInterface) + } + + @Test fun gtDoesNotGuessBetweenAmbiguousPairsOrUseInputOnlyInterface() { + assertNull(RayNeoProtocol.selectEndpoints(device(0x3941, iface(0), iface(1)))) + assertNull(RayNeoProtocol.selectEndpoints(device(0x3941, iface(5, output = false)))) + assertNull(RayNeoProtocol.selectEndpoints(device(0x3941, iface(5, packetSize = 8)))) + } + + @Test fun airRetainsItsExistingFirstInterruptPairSelection() { + val first = iface(1) + assertSame(first, RayNeoProtocol.selectEndpoints(device(0x1bbb, first, iface(5)))?.usbInterface) + } + + private fun device(vid: Int, vararg interfaces: UsbInterface): UsbDevice = + Shadow.newInstanceOf(UsbDevice::class.java).also { + ReflectionHelpers.setField(it, "mVendorId", vid) + ReflectionHelpers.setField(it, "mProductId", 0xaf50) + ReflectionHelpers.setField(it, "mInterfaces", interfaces) + } + + private fun iface(id: Int, packetSize: Int = 64, output: Boolean = true): UsbInterface = + Shadow.newInstanceOf(UsbInterface::class.java).also { + ReflectionHelpers.setField(it, "mId", id) + val endpoints = if (output) arrayOf(endpoint(0x81, packetSize), endpoint(1, packetSize)) + else arrayOf(endpoint(0x81, packetSize)) + ReflectionHelpers.setField(it, "mEndpoints", endpoints) + } + + private fun endpoint(address: Int, size: Int) = ReflectionHelpers.callConstructor(UsbEndpoint::class.java, + from(Int::class.javaPrimitiveType, address), from(Int::class.javaPrimitiveType, 3), + from(Int::class.javaPrimitiveType, size), from(Int::class.javaPrimitiveType, 1)) +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoLinkTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoLinkTest.kt new file mode 100644 index 0000000000..832d220c7b --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoLinkTest.kt @@ -0,0 +1,150 @@ +package com.droiddeck.launcher.glasses + +import android.hardware.usb.UsbDeviceConnection +import android.hardware.usb.UsbEndpoint +import android.hardware.usb.UsbInterface +import java.nio.ByteBuffer +import java.nio.ByteOrder +import java.time.Duration +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import org.robolectric.annotation.Implementation +import org.robolectric.annotation.Implements +import org.robolectric.annotation.LooperMode +import org.robolectric.shadow.api.Shadow +import org.robolectric.shadows.ShadowSystemClock +import org.robolectric.util.ReflectionHelpers +import org.robolectric.util.ReflectionHelpers.ClassParameter.from + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE, shadows = [RayNeoLinkTest.Connection::class]) +@LooperMode(LooperMode.Mode.PAUSED) +class RayNeoLinkTest { + @Test fun handshakeWarmupPoseAndShutdownUseOnlyRayNeoWireCommands() = exerciseLink(false) + + @Test fun gtControlTrafficDoesNotBreakHandshakeOrTracking() = exerciseLink(true) + @Test fun nonMaxBoardSelectsItsProfileBeforeTrackingStarts() = exerciseLink(true, true) + + private fun exerciseLink(gtTraffic: Boolean, nonMax: Boolean = false) { + fun endpoint(address: Int) = ReflectionHelpers.callConstructor(UsbEndpoint::class.java, + from(Int::class.javaPrimitiveType, address), from(Int::class.javaPrimitiveType, 3), + from(Int::class.javaPrimitiveType, 64), from(Int::class.javaPrimitiveType, 1)) + val iface = Shadow.newInstanceOf(UsbInterface::class.java) + val conn = Shadow.newInstanceOf(UsbDeviceConnection::class.java) + val io = Shadow.extract<Connection>(conn) + io.gtTraffic = gtTraffic + io.boardId = if (nonMax) 0x40 else if (gtTraffic) 0x41 else 0 + lateinit var link: RayNeoLink + var ready = false + var pose: FloatArray? = null + var lost = false + var loadedBoard = -1 + var reportedBoard = -1 + val listener = object : RayNeoLink.Listener { + override fun onDeviceInfo(boardId: Int, calibrationSaved: Boolean) { + reportedBoard = boardId + assertFalse(calibrationSaved) + } + override fun onReady() { + assertEquals(io.boardId, loadedBoard) + assertEquals(io.boardId, reportedBoard) + ready = true + if (gtTraffic) { + assertTrue(link.send(VitureProtocol.MSG_DISPLAY, byteArrayOf(6))) + assertTrue(link.send(VitureProtocol.MSG_DISPLAY, byteArrayOf(7))) + } + } + override fun onPose(raw: ByteArray, xyzw: FloatArray, timeNs: Long) { + pose = xyzw + link.close() + } + override fun onLost() { lost = true } + } + val ctor = RayNeoLink::class.java.declaredConstructors.first { it.parameterCount == 5 }.apply { isAccessible = true } + val loadCalibration: (Int) -> RayNeoCalibration? = { board -> loadedBoard = board; null } + link = ctor.newInstance(conn, RayNeoEndpointSelection(iface, endpoint(0x81), endpoint(0x01)), listener, gtTraffic, loadCalibration) as RayNeoLink + ReflectionHelpers.setField(link, "worker", Thread.currentThread()) + assertFalse(link.send(VitureProtocol.MSG_BRIGHTNESS, byteArrayOf(8))) + assertFalse(link.send(VitureProtocol.MSG_FILM, byteArrayOf(1))) + assertFalse(link.send(VitureProtocol.MSG_IMU_RATE, byteArrayOf(3))) + assertTrue(io.commands.isEmpty()) + assertTrue(link.send(VitureProtocol.MSG_IMU, byteArrayOf(1))) + RayNeoLink::class.java.getDeclaredMethod("run").apply { isAccessible = true }.invoke(link) + assertTrue(ready) + assertFalse(lost) + assertEquals(if (gtTraffic) listOf(0, 6, 7, 1, 2) else listOf(0, 1, 2), io.commands) + assertTrue(io.samples >= 200) + assertTrue(io.closed) + assertTrue(io.released) + assertNotNull(pose) + assertEquals(0f, pose!![0], 1e-5f) + assertEquals(0f, pose!![1], 1e-5f) + assertTrue(pose!![2] > 0) + } + + @Implements(UsbDeviceConnection::class) + class Connection { + val commands = mutableListOf<Int>() + private val responses = ArrayDeque<ByteArray>() + var samples = 0 + var closed = false + var released = false + var gtTraffic = false + var boardId = 0 + private var streaming = false + + @Implementation fun bulkTransfer(ep: UsbEndpoint, bytes: ByteArray, count: Int, timeout: Int): Int { + if (ep.direction == 0) { + check(bytes[0] == 0x66.toByte() && count == 64) + val cmd = bytes[1].toInt() and 0xff + commands += cmd + if (gtTraffic && cmd in listOf(0, 1)) { + // Notifications and unrelated ACKs can precede the requested response. + for (other in listOf(0x08, 6, 7, 0x50)) { + responses += ByteArray(64).apply { + this[0] = 0x99.toByte(); this[1] = 0xc8.toByte(); this[2] = 64 + this[8] = other.toByte() + } + } + } + responses += ByteArray(64).apply { + this[0] = 0x99.toByte(); this[1] = 0xc8.toByte(); this[2] = 64 + this[8] = cmd.toByte() + if (cmd == 0) this[21] = boardId.toByte() + } + if (cmd == 1) streaming = true + if (cmd == 2) streaming = false + return count + } + ShadowSystemClock.advanceBy(Duration.ofMillis(10)) + val packet = if (responses.isNotEmpty()) responses.removeFirst() else { + check(streaming) + check(++samples < 500) { "Warmup never delivered a pose" } + ByteBuffer.allocate(64).order(ByteOrder.LITTLE_ENDIAN).apply { + put(0, 0x99.toByte()); put(1, 0x65); put(2, 64) + if (gtTraffic && boardId == 0x40) { + val s = kotlin.math.sin(Math.toRadians(25.0)).toFloat() + val c = kotlin.math.cos(Math.toRadians(25.0)).toFloat() + putFloat(8, 9.81f * c); putFloat(12, 9.81f * s) + putFloat(20, 90f * c); putFloat(24, 90f * s) + } else if (gtTraffic) { + val s = kotlin.math.sin(Math.toRadians(35.0)).toFloat() + val c = kotlin.math.cos(Math.toRadians(35.0)).toFloat() + putFloat(4, 9.81f * s); putFloat(12, 9.81f * c) + putFloat(16, 90f * s); putFloat(24, 90f * c) + } else { + putFloat(8, 9.81f); putFloat(20, 90f) + } + putInt(40, samples * 100) + }.array() + } + packet.copyInto(bytes) + return packet.size + } + @Implementation fun releaseInterface(iface: UsbInterface): Boolean { released = true; return true } + @Implementation fun close() { closed = true } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoOrientationFilterTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoOrientationFilterTest.kt new file mode 100644 index 0000000000..c05b7eb192 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoOrientationFilterTest.kt @@ -0,0 +1,115 @@ +package com.droiddeck.launcher.glasses + +import com.droiddeck.launcher.gpu.HeadPose +import kotlin.math.cos +import kotlin.math.sin +import org.junit.Assert.* +import org.junit.Test + +class RayNeoOrientationFilterTest { + private fun sample(tick: Long, accel: FloatArray, gyro: FloatArray = FloatArray(3)) = + RayNeoSensorSample(accel, gyro, 0f, FloatArray(3), 0f, 0f, tick) + + private fun screen(q: FloatArray): FloatArray { + val p = RayNeoOrientationFilter.glassesPose(q) + return HeadPose.fromGlasses(p[0], p[1], p[2], p[3]) + } + + @Test fun gravityCorrectionSettlesTowardTiltInsteadOfAwayFromIt() { + val filter = RayNeoOrientationFilter(0f) + filter.update(sample(0, floatArrayOf(0f, 9.81f, 0f))) + val angle = Math.toRadians(20.0) + val accel = floatArrayOf(0f, 9.81f * cos(angle).toFloat(), -9.81f * sin(angle).toFloat()) + var q = FloatArray(4) + repeat(1000) { q = filter.update(sample((it + 1) * 100L, accel)) } + assertArrayEquals(floatArrayOf(cos(angle / 2).toFloat(), sin(angle / 2).toFloat(), 0f, 0f), q, 0.002f) + } + + @Test fun initialGravityDoesNotRotateAfterTheFirstRecenter() { + val filter = RayNeoOrientationFilter(0f) + val accel = floatArrayOf(4.905f, 8.4957f, 0f) + val first = filter.update(sample(0, accel)) + var last = first + repeat(1000) { last = filter.update(sample((it + 1) * 100L, accel)) } + assertArrayEquals(first, last, 0.0001f) + assertEquals(sin(Math.toRadians(15.0)).toFloat(), first[3], 0.001f) + } + + @Test fun recordedGtLevelGravityStartsWithAnUprightHorizon() { + val q = RayNeoOrientationFilter(0f, gt = true) + .update(sample(0, floatArrayOf(5.697f, 0.001f, 7.947f))) + val m = screen(q) + val relative = HeadPose.relative(HeadPose.recenter(m), m) + assertArrayEquals(HeadPose.IDENTITY, relative, 0.02f) + } + + @Test fun gtLeftTurnLooksLeftWithoutPitchOrRoll() = checkGtMotion(0) + @Test fun gtLookingUpLooksUpWithoutYawOrRoll() = checkGtMotion(1) + @Test fun gtRollTiltsTheHorizonWithoutTurningTheView() = checkGtMotion(2) + + @Test fun nonMaxMountingKeepsYawAndPitchSeparateThroughTheSharedPosePath() { + val profile = RayNeoSensorProfile.forDevice(true, 0x40) + assertFalse(profile.gtMaxAxes) + val mount = Math.toRadians(25.0) + val s = sin(mount).toFloat(); val c = cos(mount).toFloat() + for (pitch in listOf(false, true)) { + val filter = RayNeoOrientationFilter(profile.rotationXDeg, profile.gtMaxAxes) + val level = floatArrayOf(0f, 9.81f * c, 9.81f * s) + val ref = HeadPose.recenter(screen(filter.update(sample(0, level)))) + var q = FloatArray(4) + repeat(100) { i -> + val angle = Math.toRadians((i + 1) * 0.3) + val accel = if (pitch) floatArrayOf(0f, 9.81f * cos(mount - angle).toFloat(), 9.81f * sin(mount - angle).toFloat()) else level + val gyro = if (pitch) floatArrayOf(30f, 0f, 0f) else floatArrayOf(0f, 30f * c, 30f * s) + q = filter.update(sample((i + 1) * 100L, accel, gyro)) + } + val forward = HeadPose.apply(HeadPose.relative(ref, screen(q)), floatArrayOf(0f, 0f, -1f)) + assertArrayEquals(if (pitch) floatArrayOf(0f, 0.5f, -0.8660254f) else floatArrayOf(-0.5f, 0f, -0.8660254f), forward, 0.01f) + } + assertTrue(RayNeoSensorProfile.forDevice(true, 0x7f).gtMaxAxes) + assertTrue(RayNeoSensorProfile.forDevice(true, 0x41).gtMaxAxes) + assertEquals(-20f, RayNeoSensorProfile.forDevice(false, 0x3a).rotationXDeg, 0f) + } + + private fun checkGtMotion(axis: Int) { + val mount = Math.toRadians(35.0) + val s = sin(mount).toFloat(); val c = cos(mount).toFloat() + val filter = RayNeoOrientationFilter(0f, gt = true) + val level = floatArrayOf(9.81f * s, 0f, 9.81f * c) + val first = screen(filter.update(sample(0, level))) + val ref = HeadPose.recenter(first) + var q = FloatArray(4) + // Physical 30-degree turn over one second, through the complete shared + // VITURE conversion and recenter pipeline. GT signs match device captures. + repeat(100) { i -> + val a = Math.toRadians((i + 1) * 0.3) + val accel = when (axis) { + 1 -> floatArrayOf(9.81f * sin(mount + a).toFloat(), 0f, 9.81f * cos(mount + a).toFloat()) + 2 -> floatArrayOf(9.81f * s * cos(a).toFloat(), -9.81f * sin(a).toFloat(), 9.81f * c * cos(a).toFloat()) + else -> level + } + val gyro = when (axis) { + 0 -> floatArrayOf(30f * s, 0f, 30f * c) + 1 -> floatArrayOf(0f, -30f, 0f) + else -> floatArrayOf(-30f * c, 0f, 30f * s) + } + q = filter.update(sample((i + 1) * 100L, accel, gyro)) + } + val view = HeadPose.relative(ref, screen(q)) + val forward = HeadPose.apply(view, floatArrayOf(0f, 0f, -1f)) + val up = HeadPose.apply(view, floatArrayOf(0f, 1f, 0f)) + val c30 = cos(Math.toRadians(30.0)).toFloat() + val expectedForward = when (axis) { + 0 -> floatArrayOf(-0.5f, 0f, -c30) + 1 -> floatArrayOf(0f, 0.5f, -c30) + else -> floatArrayOf(0f, 0f, -1f) + } + val expectedUp = when (axis) { + 0 -> floatArrayOf(0f, 1f, 0f) + 1 -> floatArrayOf(0f, c30, 0.5f) + else -> floatArrayOf(-0.5f, c30, 0f) + } + assertArrayEquals(expectedForward, forward, 0.01f) + assertArrayEquals(expectedUp, up, 0.01f) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoProtocolTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoProtocolTest.kt new file mode 100644 index 0000000000..0cf6663086 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/RayNeoProtocolTest.kt @@ -0,0 +1,122 @@ +package com.droiddeck.launcher.glasses + +import java.nio.ByteBuffer +import java.nio.ByteOrder +import org.junit.Assert.* +import org.junit.Test +import kotlin.math.sqrt + +class RayNeoProtocolTest { + private fun sensor(tick: Long = 1234L): ByteArray = ByteBuffer.allocate(64).order(ByteOrder.LITTLE_ENDIAN).apply { + put(0, 0x99.toByte()); put(1, 0x65); put(2, 64) + putFloat(4, 1f); putFloat(8, 9.81f); putFloat(12, -2f) + putFloat(16, 30f); putFloat(20, -60f); putFloat(24, 90f) + putFloat(28, 25f); putFloat(32, 2f); putFloat(36, 3f) + putInt(40, tick.toInt()); putFloat(44, 1f); putFloat(48, 42f); putFloat(52, 4f) + }.array() + + @Test fun decodesScaffoldLayoutAndUnsignedTick() { + val p = RayNeoProtocol.classifyPacket(sensor(0xfffffff0L)) as RayNeoPacket.Sensor + assertArrayEquals(floatArrayOf(1f, 9.81f, -2f), p.sample.accelMps2, 0f) + assertArrayEquals(floatArrayOf(30f, -60f, 90f), p.sample.gyroDps, 0f) + assertArrayEquals(floatArrayOf(2f, 3f, 4f), p.sample.magnet, 0f) + assertEquals(0xfffffff0L, p.sample.deviceTick100us) + assertEquals(25f, p.sample.temperatureC, 0f) + assertEquals(42f, p.sample.light, 0f) + } + + @Test fun rejectsTruncationBadHeaderAndNonfiniteMotion() { + assertSame(RayNeoPacket.Unknown, RayNeoProtocol.classifyPacket(sensor().copyOf(40))) + assertSame(RayNeoPacket.Unknown, RayNeoProtocol.classifyPacket(sensor().apply { this[0] = 0 })) + assertSame(RayNeoPacket.Unknown, RayNeoProtocol.classifyPacket(sensor().apply { this[2] = 56 })) + val nan = sensor().apply { ByteBuffer.wrap(this).order(ByteOrder.LITTLE_ENDIAN).putFloat(16, Float.NaN) } + assertSame(RayNeoPacket.Unknown, RayNeoProtocol.classifyPacket(nan)) + } + + @Test fun assemblesFragmentedAndCoalescedFramesAfterNoise() { + val a = RayNeoPacketAssembler() + val packet = sensor() + val bytes = byteArrayOf(1, 2, 0x99.toByte(), 0, 0) + packet + packet + a.append(bytes.copyOf(20), 20) + assertNull(a.nextPacket()) + val rest = bytes.copyOfRange(20, bytes.size) + a.append(rest, rest.size) + assertArrayEquals(packet, a.nextPacket()) + assertArrayEquals(packet, a.nextPacket()) + assertNull(a.nextPacket()) + } + + @Test fun commandAndDeviceInfoMatchScaffold() { + assertArrayEquals(byteArrayOf(0x66, 1, 0) + ByteArray(61), RayNeoProtocol.buildCommandPacket(1, 0, 64)) + val info = ByteArray(64).apply { + this[0] = 0x99.toByte(); this[1] = 0xc8.toByte(); this[2] = 64 + this[8] = 0; this[21] = 0x3a; this[43] = 1 + } + assertEquals(RayNeoDeviceInfo(0x3a, true), RayNeoProtocol.parseDeviceInfo(info)) + assertNull(RayNeoProtocol.parseDeviceInfo(info.copyOf(21))) + info[8] = 1 + assertNull(RayNeoProtocol.parseDeviceInfo(info)) + } + + @Test fun discoveryDoesNotClaimEveryTclOrBridgeDevice() { + assertNotNull(RayNeoModel.model(0x1bbb, 0xaf50, null)) + for (name in listOf("RayNeo Air 2", "RayNeo Air 2s", "RayNeo Air 3", "RayNeo Air 4 Pro", "RayNeo GT")) { + assertEquals(name, RayNeoModel.model(0x22d9, 1, name)?.name) + assertTrue(Glasses.isGlassesDisplayName(name)) + } + assertNull(RayNeoModel.model(0x1bbb, 1, "TCL Phone")) + assertNull(RayNeoModel.model(0x22d9, 1, "USB bridge")) + assertNull(RayNeoModel.model(0x1234, 0xaf50, "RayNeo Air 3")) + assertFalse(Glasses.isGlassesDisplayName("TCL TV")) + assertTrue(Glasses.isGlassesDisplayName("VITURE Pro")) + } + + @Test fun gtIdentityWorksWithoutProductNameAndPreservesMaxName() { + assertEquals("RayNeo GT series", RayNeoModel.model(0x3941, 0xaf50, null)?.name) + assertEquals("RayNeo GT series", RayNeoModel.model(0x3941, 0xaf50, "USB device")?.name) + for (name in listOf("RayNeo GT", "RayNeo GT MAX")) { + val model = RayNeoModel.model(0x3941, 0xaf50, name)!! + assertEquals(name, model.name) + assertEquals(6, model.mode(60, true)) + assertEquals(7, model.mode(120, false)) + assertTrue(Glasses.isGlassesDisplayName(name)) + } + assertNull(RayNeoModel.model(0x3941, 0x1234, "RayNeo GT")) + assertNull(RayNeoModel.model(0x1234, 0xaf50, "RayNeo GT MAX")) + } + + @Test fun gtNotificationsAndControlAcksAreNotDeviceInfo() { + for (cmd in listOf(0x08, 6, 7, 0x50)) { + val raw = ByteArray(64).apply { + this[0] = 0x99.toByte(); this[1] = 0xc8.toByte(); this[2] = 64 + this[8] = cmd.toByte() + } + assertEquals(cmd, (RayNeoProtocol.classifyPacket(raw) as RayNeoPacket.Response).cmd) + assertNull(RayNeoProtocol.parseDeviceInfo(raw)) + } + } + + private fun sample(tick: Long, yawDps: Float = 0f) = RayNeoSensorSample( + floatArrayOf(0f, 9.81f, 0f), floatArrayOf(0f, yawDps, 0f), 0f, + FloatArray(3), 0f, 0f, tick, + ) + + @Test fun stationaryPoseIsFiniteAndYawUsesVitureUpAxis() { + val stationary = RayNeoOrientationFilter(0f) + repeat(100) { assertArrayEquals(floatArrayOf(1f, 0f, 0f, 0f), stationary.update(sample(it * 100L)), 1e-6f) } + val filter = RayNeoOrientationFilter(0f) + var q = FloatArray(4) + repeat(100) { q = filter.update(sample(it * 100L, 90f)) } + assertEquals(1f, sqrt(q.sumOf { (it * it).toDouble() }).toFloat(), 1e-5f) + val pose = RayNeoOrientationFilter.glassesPose(q) + assertEquals(0f, pose[0], 1e-5f); assertEquals(0f, pose[1], 1e-5f) + assertEquals(sqrt(0.5f), pose[2], 0.01f); assertEquals(sqrt(0.5f), pose[3], 0.01f) + } + + @Test fun tickWrapDoesNotIntroduceOrientationJump() { + val filter = RayNeoOrientationFilter(0f) + filter.update(sample(0xfffffff0L, 90f)) + val q = filter.update(sample(84, 90f)) // 100 ticks = 10ms across uint32 rollover. + assertEquals(kotlin.math.sin(Math.PI * 0.005).toFloat(), q[2], 1e-4f) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/SpatialControllerModeTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/SpatialControllerModeTest.kt new file mode 100644 index 0000000000..ec647f69c6 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/SpatialControllerModeTest.kt @@ -0,0 +1,77 @@ +package com.droiddeck.launcher.glasses + +import java.nio.ByteBuffer +import java.nio.ByteOrder +import org.junit.After +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class SpatialControllerModeTest { + private fun snapshot(): ByteBuffer = (SpatialTracking::class.java.getDeclaredField("buffer") + .apply { isAccessible = true }.get(null) as ByteBuffer).duplicate().order(ByteOrder.LITTLE_ENDIAN) + + @After fun cleanUp() { + SpatialTracking.setSteadyHandAim(false) + SpatialTracking.setControllers(false, false) + SpatialTracking.disconnect() + } + + @Test fun joyConModeStartsStereoWithoutSelectingGestureControllersAndPersistsAcrossLoss() { + SpatialTracking.connect(0, 1, null, true, 1.6f, false, true) + assertTrue(SpatialTracking.handsEnabled) + assertEquals(4, snapshot().getInt(4)) + assertEquals(5, snapshot().getInt(32)) + SpatialTracking.disconnect() + assertFalse(SpatialTracking.handsEnabled) + assertEquals(5, snapshot().getInt(32)) + assertEquals(0, snapshot().getInt(76)) + SpatialTracking.setControllers(false, false) + assertEquals(1, snapshot().getInt(32)) + } + + @Test fun steadyAimIsOptInAndOnlyAppliesToBareHands() { + assertFalse(GlassesSettings().steadyHandAim) + SpatialTracking.connect(0, 4, null, true, 1.6f, true) + assertEquals(3, snapshot().getInt(32)) + SpatialTracking.setSteadyHandAim(true) + assertEquals(11, snapshot().getInt(32)) + SpatialTracking.setControllers(false, true) + assertEquals(5, snapshot().getInt(32)) + SpatialTracking.setControllers(true, false) + assertEquals(11, snapshot().getInt(32)) + SpatialTracking.setSteadyHandAim(false) + assertEquals(3, snapshot().getInt(32)) + SpatialTracking.connect(0, 5, null, true, 1.6f, true, steadyAim = true) + assertEquals(11, snapshot().getInt(32)) + SpatialTracking.useLegacyTracking() + assertEquals(0, snapshot().getInt(32)) + } + + @Test fun openingOtherGlassesClearsTheRetainedUltraMode() { + SpatialTracking.connect(0, 3, null, true, 1.6f, false, true) + SpatialTracking.disconnect() + assertEquals(5, snapshot().getInt(32)) + SpatialTracking.useLegacyTracking() + assertEquals(0, snapshot().getInt(32)) + assertFalse(SpatialTracking.enabled) + assertFalse(SpatialTracking.handsEnabled) + } + + @Test fun switchingControllerModesClearsOldStereoObservations() { + SpatialTracking.connect(0, 2, null, true, 1.6f, true) + assertEquals(3, snapshot().getInt(32)) + SpatialTracking.setControllers(false, true) + assertTrue(SpatialTracking.handsEnabled) + assertEquals(5, snapshot().getInt(32)) + SpatialTracking.setControllers(true, false) + assertEquals(3, snapshot().getInt(32)) + SpatialTracking.setControllers(false, false) + assertFalse(SpatialTracking.handsEnabled) + assertEquals(1, snapshot().getInt(32)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/SpatialMeasurementsTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/SpatialMeasurementsTest.kt new file mode 100644 index 0000000000..23098d180b --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/SpatialMeasurementsTest.kt @@ -0,0 +1,25 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test +import java.util.Locale + +class SpatialMeasurementsTest { + @Test fun validationKeepsExactImperialAndMetricMeasurements() { + assertEquals(0.3048f, CalibrationDistance.INCHES_12.meters, 0.000001f) + assertEquals(0.3f, CalibrationDistance.CENTIMETERS_30.meters, 0.000001f) + assertEquals(0.508f, CalibrationDistance.INCHES_20.meters, 0.000001f) + assertEquals(0.5f, CalibrationDistance.CENTIMETERS_50.meters, 0.000001f) + } + + @Test fun heightCarriesRoundedInchesIntoFeetAndAlwaysShowsBothUnits() { + val previous = Locale.getDefault() + try { + Locale.setDefault(Locale.US) + assertEquals("160 cm (5 ft 3.0 in)", SpatialMeasurements.height(160)) + assertEquals("183 cm (6 ft 0.0 in)", SpatialMeasurements.height(183)) + assertEquals("1.0 m (3.3 ft)", SpatialMeasurements.distance(1f)) + assertEquals("50.8 cm (20.00 in)", SpatialMeasurements.validation(0.508f)) + } finally { Locale.setDefault(previous) } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/SpatialPoseTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/SpatialPoseTest.kt new file mode 100644 index 0000000000..202de78ed9 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/SpatialPoseTest.kt @@ -0,0 +1,310 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test +import kotlin.math.sqrt + +class SpatialPoseTest { + private val t=1_000_000_000L + private fun sample(x: Float=0f,y: Float=0f,z: Float=0f,time: Long=t,generation: Long=7,valid: Boolean=true, + rotation: SpatialRotation=SpatialRotation())=SpatialSample(SpatialPose(SpatialVector(x,y,z),rotation),time,generation,valid) + private fun session()=SpatialSession().apply { reset(7,1.6f);accept(sample()) } + private fun near(expected: Float,actual: Float)=assertEquals(expected,actual,0.0001f) + + @Test fun sdkPoseKeepsMetersAndCanonicalAxes() { + val p=SpatialPose.fromSdk(floatArrayOf(1f,2f,-3f,1.1f,0f,0f,0f))!! + assertEquals(SpatialVector(1f,2f,-3f),p.position);near(1f,p.rotation.w) + assertNull(SpatialPose.fromSdk(floatArrayOf(0f,0f,0f,0f,0f,0f,0f))) + assertNull(SpatialPose.fromSdk(floatArrayOf(Float.NaN,0f,0f,1f,0f,0f,0f))) + } + @Test fun quaternionRotationAndInverseAgree() { + val q=SpatialRotation(y=sqrt(0.5f),w=sqrt(0.5f)) + val p=SpatialPose(SpatialVector(1f,2f,3f),q) + val front=q.apply(SpatialVector(z=-1f));near(-1f,front.x);near(0f,front.z) + val inverse=p.inverse()*p;near(0f,inverse.position.length());near(1f,inverse.rotation.w) + } + @Test fun floorSurvivesCrouchedRecenter() { + val s=session();s.accept(sample(x=.2f,y=-.3f,time=t+10));s.recenter(false,t+10) + near(1.3f,s.view(false)!!.position.y);near(0f,s.view(false)!!.position.x) + s.accept(sample(x=.2f,time=t+20));near(1.6f,s.view(false)!!.position.y) + } + @Test fun screenAndVrOriginsStayIndependent() { + val s=session();s.accept(sample(x=.2f,time=t+10));s.recenter(true,t+10) + near(0f,s.view(true)!!.position.x);near(.2f,s.view(false)!!.position.x) + s.accept(sample(x=.3f,time=t+20));s.recenter(false,t+20) + near(.1f,s.view(true)!!.position.x);near(0f,s.view(false)!!.position.x) + } + @Test fun screenRecenterPreservesRecliningRotation() { + val s=SpatialSession();s.reset(7,1.6f) + val tilt=SpatialRotation(x=sqrt(.5f),w=sqrt(.5f)) + s.accept(sample(rotation=tilt));near(1f,s.view(true)!!.rotation.w) + near(tilt.x,s.view(false)!!.rotation.x) + } + @Test fun staleHeadFreezesViewAndRejectsOldConnection() { + val s=session();s.accept(sample(x=.1f,time=t+10));val last=s.view(false) + assertFalse(s.accept(sample(x=99f,time=t+20,generation=6))) + s.accept(sample(time=t+20,valid=false));assertEquals(last,s.view(false));assertFalse(s.valid(t+21)) + s.accept(sample(x=.1f,time=t+30));assertFalse(s.valid(t+100_000_031)) + assertFalse(s.accept(sample(x=Float.NaN,time=t+40)));assertEquals(last,s.view(false)) + } + @Test fun discontinuityRequiresExplicitRecovery() { + val s=session();assertFalse(s.accept(sample(x=5f,time=t+10))) + assertTrue(s.needsRecenter);assertFalse(s.valid(t+10));near(0f,s.view(false)!!.position.x) + s.recenter(false,t+10);assertTrue(s.recenterPending);assertFalse(s.valid(t+10)) + for (i in 1..6) s.accept(sample(x=5f,time=t+i*50_000_000L)) + assertTrue(s.valid(t+300_000_000));near(0f,s.view(false)!!.position.x) + s.reset(8,1.6f,true);s.accept(sample(generation=8,time=t+400_000_000));assertFalse(s.valid(t+400_000_000)) + s.recenter(false,t+400_000_000) + for (i in 1..6) s.accept(sample(generation=8,time=t+400_000_000+i*50_000_000L)) + assertTrue(s.valid(t+700_000_000)) + } + @Test fun recenterDuringLostTrackingWaitsForSteadySamplesInsteadOfDroppingTheRequest() { + val s=session();s.accept(sample(time=t+10,valid=false));val frozen=s.view(false) + s.recenter(false,t+20);assertTrue(s.recenterPending) + s.accept(sample(x=.2f,time=t+50_000_000)) + assertFalse(s.valid(t+50_000_000));assertEquals(frozen,s.view(false)) + for(i in 2..6) s.accept(sample(x=.2f,time=t+i*50_000_000L)) + assertFalse(s.recenterPending);assertTrue(s.valid(t+300_000_000));near(0f,s.view(false)!!.position.x) + near(1.6f,s.view(false)!!.position.y) + } + @Test fun staleRecenterWaitsAndRepeatedTapsDoNotRestartTheWait() { + val s=session();s.recenter(true,t+200_000_000);assertTrue(s.recenterPending) + s.accept(sample(x=.2f,time=t+250_000_000)) + s.recenter(true,t+250_000_000) + for(i in 1..5) s.accept(sample(x=.2f,time=t+250_000_000+i*50_000_000L)) + assertFalse(s.recenterPending);near(0f,s.view(true)!!.position.x) + near(.2f,s.view(false)!!.position.x) + } + @Test fun unstableOrInterruptedRecoveryCannotAcceptANewOrigin() { + val s=session();s.accept(sample(x=5f,time=t+10));s.recenter(false,t+10) + for(i in 1..8) s.accept(sample(x=5f+(i%2)*.1f,time=t+i*50_000_000L)) + assertTrue(s.recenterPending);assertTrue(s.needsRecenter) + s.accept(sample(x=5f,time=t+450_000_000)) + s.accept(sample(x=5f,time=t+500_000_000,valid=false)) + s.accept(sample(x=5f,time=t+550_000_000)) + assertTrue(s.recenterPending) + for(i in 1..5) s.accept(sample(x=5f,time=t+550_000_000+i*50_000_000L)) + assertFalse(s.recenterPending);assertTrue(s.valid(t+800_000_000)) + } + @Test fun disconnectCancelsQueuedRecenterAndOldSamplesCannotCompleteIt() { + val s=session();s.recenter(false,t+200_000_000);assertTrue(s.recenterPending) + s.reset(8,1.6f,true);assertFalse(s.recenterPending) + for(i in 1..10) s.accept(sample(time=t+i*50_000_000L)) + assertTrue(s.needsRecenter);assertNull(s.latest()) + s.accept(sample(generation=8,time=t+600_000_000));assertFalse(s.valid(t+600_000_000)) + } + @Test fun recoverableQuaternionScaleDoesNotCreateFalseDiscontinuities() { + val s=session() + for(i in 1..4) assertTrue(s.accept(sample(time=t+i,rotation=SpatialRotation(w=.8f)))) + assertFalse(s.needsRecenter);near(1f,s.latest()!!.pose.rotation.w) + } + @Test fun calibrationFrameChangesOnlyWhenTheTrackingFrameChanges() { + val s=session();val frame=s.trackingFrameGeneration + s.recenter(false,t);assertEquals(frame,s.trackingFrameGeneration) + s.accept(sample(x=5f,time=t+10));assertEquals(frame+1,s.trackingFrameGeneration) + s.accept(sample(x=5f,time=t+20));assertEquals(frame+1,s.trackingFrameGeneration) + s.reset(8,1.6f,true);assertEquals(frame+2,s.trackingFrameGeneration) + } + @Test fun captureRemainsValidWhenHeadPollingAdvancesDuringBoardDetection() { + val s=session();val frame=s.trackingFrameGeneration + val detectionStarted=t+1_000_000L + s.accept(sample(x=.01f,time=t+20_000_000L)) + assertFalse(s.valid(detectionStarted)) + assertTrue(s.isCurrentTrackingFrame(7,frame) { t+25_000_000L }) + } + @Test fun captureCompletionStillRejectsStaleChangedAndDisconnectedTracking() { + val s=session();val frame=s.trackingFrameGeneration + assertFalse(s.isCurrentTrackingFrame(7,frame) { t+100_000_001L }) + s.accept(sample(x=5f,time=t+10));assertFalse(s.isCurrentTrackingFrame(7,frame) { t+20 }) + s.recenter(false,t+20) + for(i in 1..6) s.accept(sample(x=5f,time=t+i*50_000_000L)) + assertTrue(s.valid(t+300_000_000L)) + assertFalse(s.isCurrentTrackingFrame(7,frame) { t+300_000_000L }) + s.reset(8,1.6f);s.accept(sample(generation=8,time=t+400_000_000L)) + assertFalse(s.isCurrentTrackingFrame(7,frame) { t+400_000_000L }) + } + @Test fun newerHeadDoesNotRefreshOlderHand() { + val s=session();s.setHands(7,SpatialHand(SpatialPose(),t,true,1f,true),SpatialHand()) + s.accept(sample(time=t+80_000_000)) + s.accept(sample(time=t+150_000_000));assertTrue(s.hand(0,t+200_000_000).valid) + assertEquals(t,s.hand(0,t+200_000_000).timeNs) + assertFalse(s.hand(0,t+200_000_001).valid) + s.recenter(false,t+200_000_001);assertFalse(s.hand(0,t+200_000_001).valid) + s.reset(8,1.6f);s.setHands(7,SpatialHand(timeNs=t,valid=true),SpatialHand());assertFalse(s.hand(0,t).valid) + } + private fun heldHand(time: Long = t) = SpatialHand(timeNs=time,valid=true,trigger=1f,grip=true) + private fun epochs(session: SpatialSession) = List(4) { (session.inputEpochs() ushr (it*8)) and 0xff } + @Test fun overwrittenHandLossRemainsVisibleAfterHeldGestureReturns() { + val s=session();s.setHands(7,heldHand(),heldHand()) + s.setHands(7,SpatialHand(),heldHand(t+10)) + s.setHands(7,heldHand(t+20),heldHand(t+20)) + assertEquals(listOf(1,1,0,0),epochs(s)) + assertTrue(s.hand(0,t+20).valid);assertTrue(s.hand(0,t+20).grip) + assertEquals(listOf(1,1,0,0),epochs(s)) + } + @Test fun triggerAndGripLossEpochsAreIndependentForBothHands() { + val s=session();s.setHands(7,heldHand(),heldHand()) + s.setHands(7,heldHand(t+10).copy(triggerValid=false),heldHand(t+10)) + assertEquals(listOf(1,0,0,0),epochs(s)) + assertTrue(s.hand(0,t+10).gripValid) + s.setHands(7,heldHand(t+20).copy(gripValid=false),heldHand(t+20).copy(triggerValid=false)) + assertEquals(listOf(1,1,1,0),epochs(s)) + s.setHands(7,heldHand(t+30).copy(gripValid=false),heldHand(t+30).copy(triggerValid=false)) + assertEquals(listOf(1,1,1,0),epochs(s)) + assertFalse(s.hand(0,t+30).gripValid);assertTrue(s.hand(0,t+30).triggerValid) + } + @Test fun overwrittenHeadLossDoesNotLoseTheInputReset() { + val s=session();s.setHands(7,heldHand(),heldHand()) + s.accept(sample(time=t+10,valid=false)) + s.accept(sample(time=t+20)) + s.setHands(7,heldHand(t+20),heldHand(t+20)) + assertEquals(listOf(1,1,1,1),epochs(s)) + assertTrue(s.hand(0,t+20).triggerValid) + } + @Test fun headGapClearsCachedHandsEvenWithoutAnInvalidSnapshot() { + val s=session();s.setHands(7,heldHand(),heldHand()) + s.accept(sample(time=t+100_000_001)) + assertFalse(s.hand(0,t+100_000_001).valid) + assertEquals(listOf(1,1,1,1),epochs(s)) + s.setHands(7,heldHand(t+110_000_000),heldHand(t+110_000_000)) + assertTrue(s.hand(0,t+110_000_000).valid) + assertEquals(listOf(1,1,1,1),epochs(s)) + } + @Test fun latePreLossCaptureCannotRearmAnInputAfterHeadRecovery() { + val s=session();s.setHands(7,heldHand(),heldHand()) + s.accept(sample(time=t+20,valid=false));s.accept(sample(time=t+30)) + val released=heldHand(t+10).copy(trigger=0f,grip=false) + s.setHands(7,released,released) + val late=s.hand(0,t+30) + assertTrue(late.valid);assertFalse(late.triggerValid);assertFalse(late.gripValid) + assertEquals(listOf(1,1,1,1),epochs(s)) + s.setHands(7,released.copy(timeNs=t+40),released.copy(timeNs=t+40)) + assertTrue(s.hand(0,t+40).triggerValid);assertTrue(s.hand(0,t+40).gripValid) + assertEquals(listOf(1,1,1,1),epochs(s)) + } + @Test fun freshReplacementAfterLongHandGapStillAdvancesResetEpoch() { + val s=session();s.setHands(7,heldHand(),heldHand()) + for(i in 1..5) s.accept(sample(time=t+i*50_000_000)) + s.setHands(7,heldHand(t+250_000_000),heldHand(t+250_000_000)) + assertTrue(s.hand(0,t+250_000_000).valid) + assertEquals(listOf(1,1,1,1),epochs(s)) + } + @Test fun handExpiryAndRepeatedInvalidPollsOnlyIncrementOnce() { + val s=session();s.setHands(7,heldHand(),SpatialHand()) + for(i in 1..4) s.accept(sample(time=t+i*50_000_000)) + assertTrue(s.hand(0,t+200_000_000).valid) + repeat(4) { assertFalse(s.hand(0,t+200_000_001+it).valid) } + assertEquals(listOf(1,1,0,0),epochs(s)) + s.setHands(7,heldHand(t+210_000_000),SpatialHand()) + assertTrue(s.hand(0,t+210_000_000).valid) + assertEquals(listOf(1,1,0,0),epochs(s)) + } + @Test fun headExpiryThenDelayedHeadSampleDoesNotDoubleCountLoss() { + val s=session();s.setHands(7,heldHand(),heldHand()) + for(i in 0..1) assertFalse(s.hand(i,t+100_000_001).valid) + assertEquals(listOf(1,1,1,1),epochs(s)) + s.accept(sample(time=t+150_000_000)) + s.setHands(7,heldHand(t+160_000_000),heldHand(t+160_000_000)) + assertEquals(listOf(1,1,1,1),epochs(s)) + } + @Test fun disabledHandsReleaseOnceAndWrongGenerationDoesNotAffectCurrentHands() { + val s=session();s.setHands(7,heldHand(),heldHand()) + s.setHands(6,SpatialHand(),SpatialHand()) + assertTrue(s.hand(0,t).valid);assertEquals(listOf(0,0,0,0),epochs(s)) + repeat(3) { s.setHands(7,SpatialHand(),SpatialHand()) } + assertEquals(listOf(1,1,1,1),epochs(s)) + s.reset(8,1.6f) + assertEquals(0,s.inputEpochs()) + } + @Test fun invalidTriggerValueOnlyInvalidatesItsOwnGestureEpoch() { + val s=session();s.setHands(7,heldHand(),heldHand()) + s.setHands(7,heldHand(t+10).copy(trigger=Float.NaN),heldHand(t+10)) + assertEquals(listOf(1,0,0,0),epochs(s)) + assertFalse(s.hand(0,t+10).triggerValid);assertTrue(s.hand(0,t+10).gripValid) + } + @Test fun eachPackedEpochWrapsWithinItsOwnByte() { + val s=session() + repeat(255) { + s.setHands(7,heldHand(t+it*2),heldHand(t+it*2)) + s.setHands(7,SpatialHand(),SpatialHand()) + } + assertEquals(listOf(255,255,255,255),epochs(s));assertEquals(-1,s.inputEpochs()) + s.setHands(7,heldHand(t+512),heldHand(t+512));s.setHands(7,SpatialHand(),SpatialHand()) + assertEquals(0,s.inputEpochs()) + } + @Test fun historyNeverCrossesReconnectOrLargeTimeGap() { + val s=session();assertNotNull(s.poseAt(t+4_000_000,7));assertNull(s.poseAt(t+20_000_000,7)) + s.reset(8,1.6f);assertNull(s.poseAt(t,7)) + } + @Test fun cameraClockWarmsUpAndRejectsResetAndJitter() { + val clock=CameraClock();val offset=10_000_000_000L + for(i in 1..15) assertNull(clock.map(i*40_000_000L,offset+i*40_000_000L)) + assertEquals(offset+640_000_000L,clock.map(640_000_000L,offset+640_000_000L)) + assertNull(clock.map(1,offset+1)) + val bad=CameraClock() + for(i in 1..30) assertNull(bad.map(i*40_000_000L,offset+i*40_000_000L+(i%2)*30_000_000L)) + } + @Test fun halfRateCameraClockRetainsSourceTimeThroughSkippedPairs() { + val clock=CameraClock();val offset=10_000_000_000L + for(i in 1..15) assertNull(clock.map(i*80_000_000L,offset+i*80_000_000L)) + assertEquals(offset+1_280_000_000L,clock.map(1_280_000_000L,offset+1_280_000_000L)) + assertEquals(offset+1_440_000_000L,clock.map(1_440_000_000L,offset+1_440_000_000L)) + assertNull(clock.map(1,offset+1)) + } + @Test fun cameraClockKeepsAlignedMappingAfterLongSkippedGaps() { + val offset=10_000_000_000L + for(gap in listOf(240_000_000L,1_000_000_000L)) { + val clock=CameraClock() + for(i in 1..16) clock.map(i*80_000_000L,offset+i*80_000_000L) + val source=1_280_000_000L+gap + assertEquals(offset+source,clock.map(source,offset+source)) + assertEquals(offset+source+80_000_000L,clock.map(source+80_000_000L,offset+source+80_000_000L)) + } + } + @Test fun cameraClockRewarmsAfterSourceOrReceiptStopsOrReverses() { + val offset=10_000_000_000L;val end=1_280_000_000L + val resets=listOf(1L to offset+end+80_000_000L, + end to offset+end+80_000_000L, + end+80_000_000L to 1L, + end+80_000_000L to offset+end) + for((source,receipt) in resets) { + val clock=CameraClock() + for(i in 1..16) clock.map(i*80_000_000L,offset+i*80_000_000L) + for(i in 0..14) assertNull(clock.map(source+i*80_000_000L,receipt+i*80_000_000L)) + assertEquals(receipt+1_200_000_000L,clock.map(source+1_200_000_000L,receipt+1_200_000_000L)) + } + } + @Test fun cameraClockRewarmsAfterOffsetJumpAcrossSkippedFrames() { + val offset=10_000_000_000L + for(gap in listOf(240_000_000L,1_000_000_000L)) for(jump in listOf(-20_000_001L,20_000_001L)) { + val clock=CameraClock() + for(i in 1..16) clock.map(i*80_000_000L,offset+i*80_000_000L) + val source=1_280_000_000L+gap;val receipt=source+offset+jump + for(i in 0..14) assertNull(clock.map(source+i*80_000_000L,receipt+i*80_000_000L)) + assertEquals(receipt+1_200_000_000L,clock.map(source+1_200_000_000L,receipt+1_200_000_000L)) + } + } + @Test fun cameraClockRetainsMappingWithBoundedJitterAcrossSkippedFrames() { + val clock=CameraClock();val offset=10_000_000_000L + for(i in 1..16) clock.map(i*80_000_000L,offset+i*80_000_000L+(i%2)*20_000_000L) + assertEquals(offset+1_520_000_000L,clock.map(1_520_000_000L,offset+1_540_000_000L)) + assertEquals(offset+2_520_000_000L,clock.map(2_520_000_000L,offset+2_520_000_000L)) + assertNull(clock.map(2_760_000_000L,offset+2_780_000_001L)) + } + @Test fun cameraClockRetainsMappingThroughIsolatedShortGapReceiptJitter() { + val clock=CameraClock();val offset=10_000_000_000L + for(i in 1..16) clock.map(i*80_000_000L,offset+i*80_000_000L) + assertEquals(offset+1_360_000_000L,clock.map(1_360_000_000L,offset+1_390_000_000L)) + assertEquals(offset+1_440_000_000L,clock.map(1_440_000_000L,offset+1_440_000_000L)) + } + @Test fun cameraClockInvalidTimestampRequiresFreshWarmup() { + val offset=10_000_000_000L + for((source,receipt) in listOf(0L to offset,-1L to offset,1L to 0L,1L to -1L)) { + val clock=CameraClock() + for(i in 1..16) clock.map(i*80_000_000L,offset+i*80_000_000L) + assertNull(clock.map(source,receipt)) + for(i in 17..31) assertNull(clock.map(i*80_000_000L,offset+i*80_000_000L)) + assertEquals(offset+2_560_000_000L,clock.map(2_560_000_000L,offset+2_560_000_000L)) + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/SteamVrSpatialGateTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/SteamVrSpatialGateTest.kt new file mode 100644 index 0000000000..e626912f87 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/SteamVrSpatialGateTest.kt @@ -0,0 +1,68 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class SteamVrSpatialGateTest { + @Test fun launchWaitsForRunningThenTheEntireSettleInterval() { + val gate = SteamVrSpatialGate() + assertTrue(gate.spatialEnabled(true, 0)) + gate.prepare() + assertFalse(gate.spatialEnabled(true, 60_000)) + gate.setRunning(false, 60_000) + assertFalse(gate.spatialEnabled(true, 60_000)) + gate.setRunning(true, 60_000) + assertFalse(gate.spatialEnabled(true, 61_999)) + assertTrue(gate.spatialEnabled(true, 62_000)) + assertFalse(gate.spatialEnabled(false, 62_000)) + } + + @Test fun repeatedRunningAndActivityPreparationDoNotMoveTheDeadline() { + val gate = SteamVrSpatialGate() + gate.prepare() + gate.setRunning(true, 100) + gate.prepare() + gate.setRunning(true, 1_900) + assertEquals(2_100L, gate.deadline) + assertTrue(gate.spatialEnabled(true, 2_100)) + gate.prepare() + gate.setRunning(true, 10_000) + assertTrue(gate.spatialEnabled(true, 10_000)) + } + + @Test fun explicitCancelRestoresSavedTrackingBeforeRunningAndDuringSettling() { + val gate = SteamVrSpatialGate() + gate.prepare() + gate.cancel() + assertTrue(gate.spatialEnabled(true, 100)) + assertFalse(gate.spatialEnabled(false, 100)) + gate.prepare() + gate.setRunning(true, 200) + gate.cancel() + assertNull(gate.deadline) + assertTrue(gate.spatialEnabled(true, 201)) + assertFalse(gate.spatialEnabled(false, 10_000)) + } + + @Test fun stopAndNewLaunchCannotReuseAnEarlierDeadline() { + val gate = SteamVrSpatialGate() + gate.prepare() + gate.setRunning(true, 100) + gate.setRunning(false, 200) + assertTrue(gate.spatialEnabled(true, 200)) + gate.prepare() + assertFalse(gate.spatialEnabled(true, 2_100)) + gate.setRunning(false, 2_100) + assertFalse(gate.spatialEnabled(true, 2_100)) + gate.setRunning(true, 3_000) + assertFalse(gate.spatialEnabled(true, 4_999)) + assertTrue(gate.spatialEnabled(true, 5_000)) + } + + @Test fun discoveringAnAlreadyRunningSessionStillAllowsSettling() { + val gate = SteamVrSpatialGate() + gate.setRunning(true, 100) + assertFalse(gate.spatialEnabled(true, 2_099)) + assertTrue(gate.spatialEnabled(true, 2_100)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/StereoCalibrationProfileTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/StereoCalibrationProfileTest.kt new file mode 100644 index 0000000000..e61fde8258 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/StereoCalibrationProfileTest.kt @@ -0,0 +1,89 @@ +package com.droiddeck.launcher.glasses + +import org.json.JSONObject +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28]) +class StereoCalibrationProfileTest { + private fun base() = RuntimeEnvironment.getApplication().assets.open(StereoCalibrationProfile.BASE_ASSET) + .bufferedReader().use { it.readText() } + private fun device(verified: Boolean = true) = JSONObject(base()).put("identity", "my-glasses") + .put("verified", verified).toString() + private fun select(saved: String? = null, identity: String? = "my-glasses", width: Int = 640, height: Int = 480) = + StereoCalibrationProfile.select(saved, ::base, identity, width, height) + + @Test fun newGlassesUseSharedGeometryWithoutClaimingIndividualValidation() { + val profile = select()!! + assertEquals("my-glasses", profile.identity) + assertTrue(profile.bundledBase) + assertFalse(profile.verified) + assertEquals(1.1209395390660726, profile.error, 0.0) + assertEquals(226.0499636040297, profile.matrices[0].values[0], 0.0) + assertEquals(-0.05607918f, profile.cameraToHead.position.x, 0f) + } + + @Test fun unknownSerialCanUseTheModelBase() { + val profile = select(identity = null)!! + assertEquals(StereoCalibrationProfile.BASE_IDENTITY, profile.identity) + assertTrue(profile.bundledBase) + assertFalse(profile.verified) + } + + @Test fun savedDeviceProfileWinsWithoutReadingTheAsset() { + val profile = StereoCalibrationProfile.select(device(), { error("Base must not be read") }, "my-glasses", 640, 480)!! + assertFalse(profile.bundledBase) + assertTrue(profile.verified) + } + + @Test fun unfinishedPersonalCalibrationStillRequiresDistanceValidation() { + val profile = select(device(verified = false))!! + assertFalse(profile.bundledBase) + assertFalse(profile.verified) + } + + @Test fun foreignOrCorruptDeviceProfileFallsBackToBase() { + assertTrue(select(JSONObject(device()).put("identity", "other-glasses").toString())!!.bundledBase) + assertTrue(select("not json")!!.bundledBase) + } + + @Test fun otherCameraGeometryDoesNotUseTheBase() { + assertNull(select(width = 1280, height = 960)) + assertNull(select(width = 480, height = 640)) + } + + @Test fun baseRequiresTheCorrectModelAndCameraPair() { + for ((key, value) in listOf("deviceModel" to "VITURE Luma Pro", "cameraPair" to "left1-right1", "identity" to "device-serial")) { + val text = JSONObject(base()).put(key, value).toString() + assertNull(StereoCalibrationProfile.select(null, { text }, "my-glasses", 640, 480)) + } + } + + @Test fun badLensDimensionsAndInvalidFitsAreRejectedBeforeNativeAllocation() { + for (name in listOf("k1", "d1", "k2", "d2", "r", "t")) { + val data = JSONObject(base()) + data.getJSONObject(name).put("rows", 2) + assertNull(StereoCalibrationProfile.parse(data.toString(), StereoCalibrationProfile.BASE_IDENTITY, 640, 480, true)) + } + for (error in listOf(-1.0, 2.01)) { + val data = JSONObject(base()).put("error", error) + assertNull(StereoCalibrationProfile.parse(data.toString(), StereoCalibrationProfile.BASE_IDENTITY, 640, 480, true)) + } + } + + @Test fun missingAssetAndNoDeviceProfileRequiresCalibration() { + assertNull(StereoCalibrationProfile.select(null, { null }, "my-glasses", 640, 480)) + } + + @Test fun shippedBaseContainsNoSourceSerialOrFalseValidationClaim() { + val data = JSONObject(base()) + assertEquals(StereoCalibrationProfile.BASE_IDENTITY, data.getString("identity")) + assertFalse(data.getBoolean("verified")) + assertTrue(data.getJSONObject("sourceValidation").getBoolean("sourceDeviceVerified")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/StereoFingerGesturesTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/StereoFingerGesturesTest.kt new file mode 100644 index 0000000000..3d33e40eab --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/StereoFingerGesturesTest.kt @@ -0,0 +1,87 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test +import kotlin.math.cos +import kotlin.math.sin + +class StereoFingerGesturesTest { + private fun open(): MutableList<SpatialVector> { + val p=MutableList(21) { SpatialVector(320f,240f) } + p[4]=SpatialVector(390f,190f) + for((base,x) in listOf(5 to 355f,9 to 330f,13 to 305f,17 to 280f)) { + for(j in 0..3) p[base+j]=SpatialVector(x,180f-25f*j) + } + return p + } + private fun curl(p: MutableList<SpatialVector>,reach: Float=1f) = p.apply { + for(base in listOf(9,13,17)) this[base+3]=this[0]+(this[base]-this[0])*reach + } + private fun transform(p: List<SpatialVector>,angle: Float,scale: Float,mirror: Boolean) = p.map { + val x=(if(mirror) -it.x else it.x)*scale + val y=it.y*scale + SpatialVector(x*cos(angle)-y*sin(angle)+700f,x*sin(angle)+y*cos(angle)-80f) + } + @Test fun openingAndClosingAreIndependentOfImageScaleRotationAndHandedness() { + for(mirror in listOf(false,true)) for(angle in listOf(0f,.7f,2.8f)) { + val closed=curl(open()).apply { this[4]=this[8] } + val result=StereoFingerGestures.estimate(transform(closed,angle,1.5f,mirror), + transform(closed,angle+.12f,.7f,mirror),false) + assertTrue(result.gripValid);assertTrue(result.grip) + assertTrue(result.triggerValid);assertEquals(1f,result.trigger,0f) + val released=StereoFingerGestures.estimate(transform(open(),angle,1.5f,mirror), + transform(open(),angle+.12f,.7f,mirror),true) + assertTrue(released.gripValid);assertFalse(released.grip) + assertTrue(released.triggerValid);assertEquals(0f,released.trigger,0f) + } + } + @Test fun curlThresholdsProvideObservedHysteresisAndRelease() { + val partial=curl(open(),1.4f) + val idle=StereoFingerGestures.estimate(partial,partial,false) + val held=StereoFingerGestures.estimate(partial,partial,true) + assertTrue(idle.gripValid);assertFalse(idle.grip) + assertTrue(held.gripValid);assertTrue(held.grip) + val opening=curl(open(),1.6f) + assertFalse(StereoFingerGestures.estimate(opening,opening,true).grip) + val two=curl(open()).apply { for(i in 17..20) this[i]=open()[i] } + assertFalse(StereoFingerGestures.estimate(two,two,false).grip) + assertTrue(StereoFingerGestures.estimate(two,two,true).grip) + } + @Test fun shortStraightProjectedFingersDoNotCountAsCurled() { + val straight=open().apply { + for(base in listOf(9,13,17)) for(j in 1..3) this[base+j]=this[base]+SpatialVector(y=-4.5f*j) + } + val result=StereoFingerGestures.estimate(straight,straight,false) + assertTrue(result.gripValid);assertFalse(result.grip) + } + @Test fun pinchRequiresBothEyesAndUsesTheirMoreOpenEstimate() { + fun pinch(ratio: Float)=open().apply { this[4]=this[8]+SpatialVector(x=75f*ratio) } + val result=StereoFingerGestures.estimate(pinch(.25f),pinch(.30f),false) + assertTrue(result.triggerValid);assertEquals((.55f-.30f)/.35f,result.trigger,.0001f) + val conflict=StereoFingerGestures.estimate(pinch(.25f),pinch(.50f),false) + assertFalse(conflict.triggerValid);assertEquals(0f,conflict.trigger,0f) + assertTrue(conflict.gripValid);assertFalse(conflict.grip) + } + @Test fun conflictingCurlDoesNotReportAnObservedRelease() { + val result=StereoFingerGestures.estimate(curl(open()),open(),true) + assertFalse(result.gripValid);assertFalse(result.grip) + assertTrue(result.triggerValid) + } + @Test fun invalidJointsOnlyInvalidateTheirOwnGesture() { + val badPinch=open().apply { this[4]=SpatialVector(Float.NaN,190f) } + val pinch=StereoFingerGestures.estimate(badPinch,open(),false) + assertFalse(pinch.triggerValid);assertTrue(pinch.gripValid) + val badGrip=open().apply { this[15]=SpatialVector(300f,Float.POSITIVE_INFINITY) } + val grip=StereoFingerGestures.estimate(open(),badGrip,true) + assertTrue(grip.triggerValid);assertFalse(grip.gripValid);assertFalse(grip.grip) + } + @Test fun missingViewsAndDegeneratePalmsCannotArmInputs() { + val flat=open().apply { for(i in listOf(0,5,9,13,17)) this[i]=SpatialVector(i.toFloat(),0f) } + val collapsed=open().apply { this[17]=this[5] } + for(invalid in listOf(null,emptyList(),flat,collapsed)) { + val result=StereoFingerGestures.estimate(open(),invalid,true) + assertFalse(result.triggerValid);assertFalse(result.gripValid) + assertEquals(0f,result.trigger,0f);assertFalse(result.grip) + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/StereoInferenceRunnerTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/StereoInferenceRunnerTest.kt new file mode 100644 index 0000000000..c100c548b1 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/StereoInferenceRunnerTest.kt @@ -0,0 +1,72 @@ +package com.droiddeck.launcher.glasses + +import java.util.concurrent.CountDownLatch +import java.util.concurrent.Executors +import java.util.concurrent.TimeUnit +import org.junit.Assert.* +import org.junit.Test + +class StereoInferenceRunnerTest { + @Test fun camerasRunConcurrentlyAndRightDetectorKeepsItsOwnerThread() { + StereoInferenceRunner().use { runner -> + val owner=runner.onRight { Thread.currentThread() } + val rightStarted=CountDownLatch(1) + val leftStarted=CountDownLatch(1) + val pair=runner.pair({ + leftStarted.countDown() + assertTrue(rightStarted.await(2,TimeUnit.SECONDS)) + 1 + }, { + rightStarted.countDown() + assertTrue(leftStarted.await(2,TimeUnit.SECONDS)) + assertSame(owner,Thread.currentThread()) + 2 + }) + assertEquals(1 to 2,pair) + assertSame(owner,runner.onRight { Thread.currentThread() }) + } + } + + @Test fun leftFailureDoesNotReleasePixelsWhileRightStillUsesThem() { + StereoInferenceRunner().use { runner -> + val finished=CountDownLatch(1) + val failure=IllegalStateException("left") + try { + runner.pair({ throw failure }, { Thread.sleep(25);finished.countDown();1 }) + fail("Expected inference failure") + } catch(e: IllegalStateException) { assertSame(failure,e) } + assertEquals(0L,finished.count) + } + } + + @Test fun rightFailureReachesOwnerAndWorkerCanStillCloseDetector() { + StereoInferenceRunner().use { runner -> + val failure=IllegalStateException("right") + try { + runner.pair({ 1 }, { throw failure }) + fail("Expected inference failure") + } catch(e: IllegalStateException) { assertSame(failure,e) } + assertTrue(runner.onRight { true }) + } + } + + @Test fun shutdownInterruptionWaitsForInferenceBeforeReturningBuffers() { + StereoInferenceRunner().use { runner -> + val owner=Executors.newSingleThreadExecutor() + val running=CountDownLatch(1);val release=CountDownLatch(1) + try { + val result=owner.submit<Boolean> { + Thread.currentThread().interrupt() + assertEquals(1 to 2,runner.pair({ 1 }, { + running.countDown();check(release.await(2,TimeUnit.SECONDS));2 + })) + Thread.interrupted() + } + assertTrue(running.await(2,TimeUnit.SECONDS)) + assertFalse(result.isDone) + release.countDown() + assertTrue(result.get(2,TimeUnit.SECONDS)) + } finally { release.countDown();owner.shutdownNow() } + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/StereoPointValidationTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/StereoPointValidationTest.kt new file mode 100644 index 0000000000..0cb263b5ed --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/StereoPointValidationTest.kt @@ -0,0 +1,30 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class StereoPointValidationTest { + private val p1=doubleArrayOf(400.0,0.0,320.0,0.0, 0.0,400.0,240.0,0.0, 0.0,0.0,1.0,0.0) + private val p2=p1.copyOf().apply { this[3]=-24.0 } + private val point=doubleArrayOf(0.0,0.0,.5,1.0) + private val left=doubleArrayOf(320.0,240.0) + private val right=doubleArrayOf(272.0,240.0) + @Test fun metricDepthAndReprojectionThresholdAreUnchanged() { + val result=StereoPointValidation.reconstruct(point,left,right,p1,p2)!! + assertEquals(.5f,result.z,0f) + assertNotNull(StereoPointValidation.reconstruct(point,left,doubleArrayOf(275.0,240.0),p1,p2)) + assertNull(StereoPointValidation.reconstruct(point,left,doubleArrayOf(275.01,240.0),p1,p2)) + } + @Test fun aRejectedLandmarkDoesNotRemoveItsValidNeighbors() { + val observations=listOf(left,doubleArrayOf(Double.NaN,240.0),left) + val points=observations.map { StereoPointValidation.reconstruct(point,it,right,p1,p2) } + assertNotNull(points[0]);assertNull(points[1]);assertNotNull(points[2]) + } + @Test fun invalidDepthAndProjectionNeverProduceValidPoints() { + for(z in listOf(-.5,.149,1.501,Double.NaN,Double.POSITIVE_INFINITY)) + assertNull(StereoPointValidation.reconstruct(doubleArrayOf(0.0,0.0,z,1.0),left,right,p1,p2)) + assertNull(StereoPointValidation.reconstruct(point.copyOf().apply { this[3]=0.0 },left,right,p1,p2)) + assertNull(StereoPointValidation.reconstruct(point,left,right,p1,p2.copyOf().apply { this[10]=-1.0 })) + assertNull(StereoPointValidation.reconstruct(point,left,right,p1,p2.copyOf().apply { this[0]=Double.NaN })) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/TrackingRecoveryTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/TrackingRecoveryTest.kt new file mode 100644 index 0000000000..178438fac6 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/TrackingRecoveryTest.kt @@ -0,0 +1,46 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test + +class TrackingRecoveryTest { + @Test fun periodicStatusRefreshDetectsExpiryWithoutAnotherPoseCallback() { + val time=1_000_000_000L + val session=SpatialTracking.session + try { + session.reset(91,1.6f) + session.accept(SpatialSample(SpatialPose(),time,91,true)) + SpatialTracking.refreshStatus(time) + assertTrue(SpatialTracking.status.value.headFresh) + assertNull(TrackingRecovery.forSession(true,true,SpatialTracking.status.value)) + SpatialTracking.refreshStatus(time+100_000_001) + assertFalse(SpatialTracking.status.value.headFresh) + assertEquals(TrackingRecovery.LOST,TrackingRecovery.forSession(true,true,SpatialTracking.status.value)) + session.accept(SpatialSample(SpatialPose(),time+110_000_000,91,true)) + SpatialTracking.refreshStatus(time+110_000_000) + assertNull(TrackingRecovery.forSession(true,true,SpatialTracking.status.value)) + } finally { + session.reset(92,1.6f) + SpatialTracking.refreshStatus(time+200_000_000) + } + } + + @Test fun healthyAndNonSpatialSessionsNeverShowRecovery() { + assertNull(TrackingRecovery.forSession(true,true,SpatialTrackingStatus(trackingValid=true,headFresh=true))) + assertNull(TrackingRecovery.forSession(false,false,SpatialTrackingStatus())) + assertEquals(TrackingRecovery.DISCONNECTED,TrackingRecovery.forSession(true,false,SpatialTrackingStatus(trackingValid=true))) + } + + @Test fun pendingRecenterStillRequiresLookingAroundUntilHeadTrackingReturns() { + val pending=SpatialTrackingStatus(recenterPending=true,needsRecenter=true) + assertEquals(TrackingRecovery.LOST,TrackingRecovery.forSession(true,true,pending)) + assertEquals(TrackingRecovery.STABILIZING,TrackingRecovery.forSession(true,true,pending.copy(headFresh=true))) + assertNull(TrackingRecovery.forSession(true,true,pending.copy(headFresh=true,trackingValid=true,recenterPending=false,needsRecenter=false))) + } + + @Test fun newTrackingFrameExplainsTheRequiredRecenter() { + val changed=SpatialTrackingStatus(needsRecenter=true,headFresh=true) + assertEquals(TrackingRecovery.RECENTER,TrackingRecovery.forSession(true,true,changed)) + assertEquals(TrackingRecovery.LOST,TrackingRecovery.forSession(true,true,changed.copy(headFresh=false))) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/UvcStreamHealthTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/UvcStreamHealthTest.kt new file mode 100644 index 0000000000..9dbade47d2 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/UvcStreamHealthTest.kt @@ -0,0 +1,49 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test + +class UvcStreamHealthTest { + private fun sample(frames: Long = 901, lastMs: Long = 30990, endMs: Long = 31000, + maximumGapMs: Long = 34) = LongArray(14).apply { + this[6]=lastMs*1_000_000 + this[7]=1_000_000_000 + this[8]=maximumGapMs*1_000_000 + this[9]=frames + this[12]=endMs*1_000_000 + this[13]=(endMs-lastMs)*1_000_000 + } + + @Test fun sustainedStreamMeasuresEntireWindow() { + val health=UvcStreamHealth.assess(sample(),30,30000) + assertTrue(health.healthy) + assertEquals(30000.0,health.observationMs,0.001) + assertEquals(30.0,health.observedFps,0.001) + } + + @Test fun earlyFramesCannotHideLongFinalStall() { + val health=UvcStreamHealth.assess(sample(frames=31,lastMs=2000),30,30000) + assertFalse(health.healthy) + assertEquals(1.0,health.observedFps,0.001) + assertEquals(29000.0,health.maximumGapMs,0.001) + assertFalse(UvcStreamHealth.assess(sample(frames=1,lastMs=1000),30,30000).healthy) + } + + @Test fun frameRateCannotHideInterFrameOrFinalGaps() { + assertFalse(UvcStreamHealth.assess(sample(maximumGapMs=500),30,30000).healthy) + assertFalse(UvcStreamHealth.assess(sample(lastMs=30500),30,30000).healthy) + } + + @Test fun shortObservationAndLowFrameRateAreUnhealthy() { + assertFalse(UvcStreamHealth.assess(sample(frames=31,lastMs=1990,endMs=2000),30,30000).healthy) + assertFalse(UvcStreamHealth.assess(sample(frames=601),30,30000).healthy) + assertFalse(UvcStreamHealth.assess(sample().apply { this[4]=-1 },30,30000).healthy) + } + + @Test fun lowFrameRateAllowsThreeFramePeriods() { + assertTrue(UvcStreamHealth.assess(sample(frames=151,lastMs=30600,maximumGapMs=400),5,30000).healthy) + assertFalse(UvcStreamHealth.assess(sample(frames=151,lastMs=30300,maximumGapMs=700),5,30000).healthy) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/VitureLinkTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/VitureLinkTest.kt new file mode 100644 index 0000000000..18a374052f --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/VitureLinkTest.kt @@ -0,0 +1,192 @@ +package com.droiddeck.launcher.glasses + +import android.content.Context +import android.hardware.usb.UsbConfiguration +import android.hardware.usb.UsbConstants +import android.hardware.usb.UsbDevice +import android.hardware.usb.UsbDeviceConnection +import android.hardware.usb.UsbEndpoint +import android.hardware.usb.UsbInterface +import android.hardware.usb.UsbManager +import android.os.Parcelable +import android.util.Log +import org.junit.After +import org.junit.Assert.assertArrayEquals +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Assert.fail +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import org.robolectric.annotation.Implementation +import org.robolectric.annotation.Implements +import org.robolectric.shadow.api.Shadow +import org.robolectric.shadows.ShadowLog +import org.robolectric.util.ReflectionHelpers +import org.robolectric.util.ReflectionHelpers.ClassParameter.from +import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.LinkedBlockingQueue +import java.util.concurrent.TimeUnit + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE, shadows = [VitureLinkTest.QueuedConnection::class]) +class VitureLinkTest { + private val frames = LinkedBlockingQueue<VitureProtocol.Frame>() + private val imu = LinkedBlockingQueue<ByteArray>() + private var link: VitureLink? = null + + private val listener = object : VitureLink.Listener { + override fun onFrame(frame: VitureProtocol.Frame) { frames += frame } + override fun onImu(payload: ByteArray, timeNs: Long) { imu += payload } + override fun onLost() {} + } + + @Before fun prepare() { + incoming.clear() + ShadowLog.clear() + } + + @After fun close() { link?.close() } + + @Test fun framesWithABadChecksumAreDroppedAndCounted() { + val usb = RuntimeEnvironment.getApplication().getSystemService(Context.USB_SERVICE) as UsbManager + val l = VitureLink.open(usb, glasses(), listener) + assertNotNull(l) + link = l + val report = packet(VitureProtocol.MAGIC_REPORT, VitureProtocol.EVENT_BRIGHTNESS, byteArrayOf(6)) + val pose = ByteArray(36) { it.toByte() } + val imuPacket = packet(VitureProtocol.MAGIC_IMU, 0, pose) + feed(MCU_IN, corrupt(report), report) + feed(IMU_IN, corrupt(imuPacket), imuPacket) + + val frame = frames.poll(2, TimeUnit.SECONDS) + assertNotNull(frame) + assertEquals(VitureProtocol.EVENT_BRIGHTNESS, frame!!.msgId) + assertArrayEquals(byteArrayOf(6), frame.payload) + assertArrayEquals(pose, imu.poll(2, TimeUnit.SECONDS)) + assertNull(frames.poll(200, TimeUnit.MILLISECONDS)) + assertNull(imu.poll(0, TimeUnit.MILLISECONDS)) + val transport: GlassesLink = l!! + assertEquals(2L, transport.badFrames) + assertEquals(1, ShadowLog.getLogsForTag("VitureLink").count { it.type == Log.WARN }) + } + + @Test fun bothReadersDiscardCorruptReportsAndAcceptTheNextValidPacket() { + for (imuEndpoint in listOf(false, true)) { + checkPackets(VitureProtocol.MAGIC_REPORT, imuEndpoint, expectImu = false) + } + } + + @Test fun imuReaderDiscardsCorruptPoseAndAcceptsTheNextValidPacket() { + checkPackets(VitureProtocol.MAGIC_IMU, imuEndpoint = true, expectImu = true) + } + + private fun checkPackets(magic: Int, imuEndpoint: Boolean, expectImu: Boolean) { + val frames = mutableListOf<VitureProtocol.Frame>() + val poses = mutableListOf<ByteArray>() + val listener = object : VitureLink.Listener { + override fun onFrame(frame: VitureProtocol.Frame) { frames += frame } + override fun onImu(payload: ByteArray, timeNs: Long) { poses += payload } + override fun onLost() { fail("A corrupt packet must not disconnect the link") } + } + val ctor = VitureLink::class.java.getDeclaredConstructor(UsbDeviceConnection::class.java, + UsbInterface::class.java, UsbEndpoint::class.java, UsbEndpoint::class.java, + UsbInterface::class.java, UsbEndpoint::class.java, VitureLink.Listener::class.java) + .apply { isAccessible = true } + val link = ctor.newInstance(Shadow.newInstanceOf(UsbDeviceConnection::class.java), + Shadow.newInstanceOf(UsbInterface::class.java), Shadow.newInstanceOf(UsbEndpoint::class.java), + null, null, null, listener) + val receive = VitureLink::class.java.getDeclaredMethod("onPacket", ByteArray::class.java, + Int::class.javaPrimitiveType, Boolean::class.javaPrimitiveType).apply { isAccessible = true } + val payload = byteArrayOf(0, 0x32) + val valid = VitureProtocol.packet(VitureProtocol.MSG_DISPLAY, payload).also { it[1] = magic.toByte() } + val corrupt = valid.copyOf().also { it[18] = 1 } + assertFalse(VitureProtocol.parse(corrupt, corrupt.size)!!.crcOk) + receive.invoke(link, corrupt, corrupt.size, imuEndpoint) + assertTrue(frames.isEmpty()) + assertTrue(poses.isEmpty()) + receive.invoke(link, valid, valid.size, imuEndpoint) + assertEquals(if (expectImu) 0 else 1, frames.size) + assertEquals(if (expectImu) 1 else 0, poses.size) + assertArrayEquals(payload, if (expectImu) poses.single() else frames.single().payload) + } + + private fun packet(magic: Int, msgId: Int, payload: ByteArray) = + VitureProtocol.packet(msgId, payload).also { it[1] = magic.toByte() } + + private fun corrupt(packet: ByteArray) = packet.copyOf().also { it[18] = (it[18].toInt() xor 0x01).toByte() } + + private fun feed(address: Int, vararg packets: ByteArray) { + val queue = incoming.getOrPut(address) { LinkedBlockingQueue() } + packets.forEach(queue::put) + } + + private fun glasses(): UsbDevice { + fun endpoint(address: Int): UsbEndpoint = ReflectionHelpers.callConstructor( + UsbEndpoint::class.java, + from(Int::class.javaPrimitiveType, address), + from(Int::class.javaPrimitiveType, UsbConstants.USB_ENDPOINT_XFER_INT), + from(Int::class.javaPrimitiveType, VitureProtocol.PACKET_SIZE), + from(Int::class.javaPrimitiveType, 1), + ) + fun hid(id: Int, vararg endpoints: UsbEndpoint): UsbInterface = ReflectionHelpers.callConstructor( + UsbInterface::class.java, + from(Int::class.javaPrimitiveType, id), + from(Int::class.javaPrimitiveType, 0), + from(String::class.java, "hid$id"), + from(Int::class.javaPrimitiveType, UsbConstants.USB_CLASS_HID), + from(Int::class.javaPrimitiveType, 0), + from(Int::class.javaPrimitiveType, 0), + ).also { hidden(it, "setEndpoints", *endpoints) } + val config: UsbConfiguration = ReflectionHelpers.callConstructor( + UsbConfiguration::class.java, + from(Int::class.javaPrimitiveType, 1), + from(String::class.java, "default"), + from(Int::class.javaPrimitiveType, 0), + from(Int::class.javaPrimitiveType, 250), + ) + hidden(config, "setInterfaces", hid(0, endpoint(IMU_IN)), hid(1, endpoint(MCU_IN), endpoint(MCU_OUT))) + return ReflectionHelpers.callConstructor( + UsbDevice::class.java, + from(String::class.java, "/dev/bus/usb/001/002"), + from(Int::class.javaPrimitiveType, VitureProtocol.VENDOR_ID), + from(Int::class.javaPrimitiveType, 0x101d), + from(Int::class.javaPrimitiveType, 0), + from(Int::class.javaPrimitiveType, 0), + from(Int::class.javaPrimitiveType, 0), + from(String::class.java, "VITURE"), + from(String::class.java, "VITURE Pro XR"), + from(String::class.java, "1.0"), + from(String::class.java, "test"), + ).also { hidden(it, "setConfigurations", config) } + } + + private fun hidden(target: Any, method: String, vararg items: Parcelable) { + ReflectionHelpers.callInstanceMethod<Unit>(target, method, from(Array<Parcelable>::class.java, arrayOf(*items))) + } + + @Implements(UsbDeviceConnection::class) + class QueuedConnection { + @Implementation fun claimInterface(intf: UsbInterface, force: Boolean) = true + @Implementation fun releaseInterface(intf: UsbInterface) = true + @Implementation fun bulkTransfer(endpoint: UsbEndpoint, buffer: ByteArray, length: Int, timeout: Int): Int { + if (endpoint.direction == UsbConstants.USB_DIR_OUT) return length + val packet = incoming[endpoint.address]?.poll(timeout.toLong(), TimeUnit.MILLISECONDS) ?: return 0 + packet.copyInto(buffer, endIndex = minOf(packet.size, length)) + return minOf(packet.size, length) + } + } + + companion object { + private const val IMU_IN = 0x81 + private const val MCU_IN = 0x82 + private const val MCU_OUT = 0x02 + private val incoming = ConcurrentHashMap<Int, LinkedBlockingQueue<ByteArray>>() + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/VitureProtocolTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/VitureProtocolTest.kt new file mode 100644 index 0000000000..565e8b6145 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/VitureProtocolTest.kt @@ -0,0 +1,142 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.assertArrayEquals +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test +import java.nio.ByteBuffer +import kotlin.math.cos +import kotlin.math.sin + +class VitureProtocolTest { + private fun u8(b: Byte) = b.toInt() and 0xFF + private fun u16(b: ByteArray, at: Int) = u8(b[at]) or (u8(b[at + 1]) shl 8) + + @Test fun crcIsXmodem() { + val check = "123456789".toByteArray() + assertEquals(0x31C3, VitureProtocol.crc16(check, 0, check.size)) + } + + @Test fun packetLayout() { + val p = VitureProtocol.packet(VitureProtocol.MSG_BRIGHTNESS, byteArrayOf(5, 0)) + assertEquals(VitureProtocol.PACKET_SIZE, p.size) + assertEquals(0xFF, u8(p[0])) + assertEquals(VitureProtocol.MAGIC_COMMAND, u8(p[1])) + assertEquals(2 + 0x0C, u16(p, 4)) + assertEquals(VitureProtocol.MSG_BRIGHTNESS, u16(p, 14)) + assertEquals(5, u8(p[18])) + assertEquals(VitureProtocol.crc16(p, 4, u16(p, 4) + 2), u16(p, 2)) + for (i in 6 until 14) assertEquals(0, u8(p[i])) + } + + @Test fun parseRoundTripsAndChecksCrc() { + val p = VitureProtocol.packet(VitureProtocol.MSG_DISPLAY, byteArrayOf(0x34)) + val f = VitureProtocol.parse(p, p.size) + assertNotNull(f) + assertEquals(VitureProtocol.MAGIC_COMMAND, f!!.magic) + assertEquals(VitureProtocol.MSG_DISPLAY, f.msgId) + assertArrayEquals(byteArrayOf(0x34), f.payload) + assertTrue(f.crcOk) + p[18] = 0x31 + val badCrc = VitureProtocol.parse(p, p.size)!! + assertFalse(badCrc.crcOk) + assertArrayEquals(byteArrayOf(0x31), badCrc.payload) + } + + @Test fun parseAcceptsPaddingOutsideDeclaredFrame() { + val payload = byteArrayOf(0, 0x32) + val p = VitureProtocol.packet(VitureProtocol.MSG_DISPLAY, payload) + val end = 18 + payload.size + p.fill(0x5A, end) + for (size in listOf(end, p.size)) { + val frame = VitureProtocol.parse(p, size)!! + assertArrayEquals(payload, frame.payload) + assertTrue(frame.crcOk) + } + } + + @Test fun parseRejectsTruncatedDeclaredFrame() { + val p = VitureProtocol.packet(VitureProtocol.MSG_DISPLAY, byteArrayOf(0, 0x32)) + val received = 19 + assertNull(VitureProtocol.parse(p, received)) + assertNull(VitureProtocol.parse(p.copyOf(received), received)) + p[4] = 0xFF.toByte() + p[5] = 0xFF.toByte() + assertNull(VitureProtocol.parse(p, p.size)) + } + + @Test fun parseRejectsInvalidReceiveSize() { + val p = VitureProtocol.packet(VitureProtocol.MSG_DISPLAY, byteArrayOf(0, 0x32)) + assertNull(VitureProtocol.parse(p, p.size + 1)) + assertNull(VitureProtocol.parse(p, 17)) + assertNull(VitureProtocol.parse(ByteArray(0), 18)) + assertNull(VitureProtocol.parse(ByteArray(0), 0)) + assertNull(VitureProtocol.parse(p, -1)) + } + + @Test fun parseReadsRepliesAndRejectsJunk() { + val reply = VitureProtocol.packet(VitureProtocol.MSG_GET_VOLUME, byteArrayOf(0, 5)) + reply[1] = VitureProtocol.MAGIC_REPORT.toByte() + val f = VitureProtocol.parse(reply, reply.size)!! + assertEquals(VitureProtocol.MAGIC_REPORT, f.magic) + assertArrayEquals(byteArrayOf(0, 5), f.payload) + assertNull(VitureProtocol.parse(ByteArray(64), 64)) + assertNull(VitureProtocol.parse(reply, 8)) + val wrongMagic = reply.copyOf().also { it[1] = 0x10 } + assertNull(VitureProtocol.parse(wrongMagic, wrongMagic.size)) + } + + @Test fun modelsAndModes() { + val pro = VitureProtocol.model(0x101d, "VITURE Pro XR Glasses")!! + assertEquals("VITURE Pro XR", pro.name) + assertEquals(VitureProtocol.Family.PRO, pro.family) + assertTrue(pro.controllable) + assertFalse(pro.sbs90) + assertEquals(0x34, pro.mode(120, false)) + assertEquals(0x33, pro.mode(90, false)) + assertEquals(0x31, pro.mode(60, false)) + assertEquals(0x32, pro.mode(90, true)) + assertEquals(0x32, pro.mode(60, true)) + + val luma = VitureProtocol.model(0x1131, null)!! + assertEquals("VITURE Luma", luma.name) + assertFalse(luma.sbs90) + assertEquals(0x44, luma.mode(120, false)) + assertEquals(0x42, luma.mode(90, true)) + assertEquals(0x42, luma.mode(60, true)) + + val ultra = VitureProtocol.model(0x1101, null)!! + assertTrue(ultra.sbs90) + assertEquals(0x45, ultra.mode(90, true)) + assertEquals(0x42, ultra.mode(60, true)) + + assertTrue(VitureProtocol.model(0x1201, null)!!.controllable) + assertTrue(VitureProtocol.model(0x1201, null)!!.needsSdk) + assertNull(VitureProtocol.model(0x9999, "VITURE")) + assertEquals("VITURE One", VitureProtocol.model(0x1011, "Something else")!!.name) + } + + @Test fun imuPrefersTheQuaternion() { + val half = Math.toRadians(30.0) / 2 + val payload = ByteBuffer.allocate(40) + .putFloat(1f).putFloat(2f).putFloat(3f) + .putFloat(0f).putFloat(0f) + .putFloat(cos(half).toFloat()).putFloat(0f).putFloat(0f).putFloat(sin(half).toFloat()) + .array() + val q = VitureProtocol.imuQuaternion(payload)!! + assertArrayEquals(floatArrayOf(0f, 0f, sin(half).toFloat(), cos(half).toFloat()), q, 1e-5f) + } + + @Test fun imuFallsBackToEuler() { + val payload = ByteBuffer.allocate(12).putFloat(0f).putFloat(0f).putFloat(30f).array() + val q = VitureProtocol.imuQuaternion(payload)!! + val half = Math.toRadians(30.0) / 2 + assertArrayEquals(floatArrayOf(0f, 0f, sin(half).toFloat(), cos(half).toFloat()), q, 1e-5f) + assertNull(VitureProtocol.imuQuaternion(ByteArray(8))) + val nan = ByteBuffer.allocate(12).putFloat(Float.NaN).putFloat(0f).putFloat(0f).array() + assertNull(VitureProtocol.imuQuaternion(nan)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/VitureSdkTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/VitureSdkTest.kt new file mode 100644 index 0000000000..0bc140777e --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/VitureSdkTest.kt @@ -0,0 +1,105 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test +import kotlin.math.sqrt +import com.droiddeck.launcher.gpu.HeadPose + +class VitureSdkTest { + @Test fun spatialIdentityUsesTheFullSdkDigestAndRejectsMissingValues() { + assertNull(VitureSpatialIdentity.fromSerialHash(null)) + assertNull(VitureSpatialIdentity.fromSerialHash(ByteArray(32))) + assertNull(VitureSpatialIdentity.fromSerialHash(ByteArray(31) { 1 })) + val digest=ByteArray(32) { it.toByte() } + val id=VitureSpatialIdentity.fromSerialHash(digest) + assertEquals("viture:sn-sha256:000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",id) + assertEquals(id,VitureSpatialIdentity.fromSerialHash(digest.copyOf())) + assertNotEquals(id,VitureSpatialIdentity.fromSerialHash(digest.copyOf().also { it[31]=0xff.toByte() })) + } + @Test fun pro2UsesItsOwnSdkTransportAndDisplayLimits() { + val m = VitureProtocol.sdkModel("Pro 2")!! + assertTrue(m.needsSdk) + assertEquals(VitureProtocol.Family.PRO2, m.family) + assertEquals(0x34, m.mode(120, false)) + assertEquals(0x32, m.mode(90, true)) + assertFalse(m.sbs90) + assertFalse(m.hasSunblock) + assertEquals(8, m.volumeMax) + assertEquals(50f, m.diagonalFovDeg, 0f) + } + + @Test fun ultraUsesSdkWith1200pAnd90HzStereo() { + val m = VitureProtocol.sdkModel("Luma Ultra")!! + assertTrue(m.needsSdk) + assertEquals(0x44, m.mode(120, false)) + assertEquals(0x42, m.mode(60, true)) + assertEquals(0x45, m.mode(90, true)) + assertTrue(m.hasSunblock) + } + + @Test fun gen2DoesNotImplyBeastCapabilities() { + val beast = VitureProtocol.sdkModel("Beast")!! + assertTrue(beast.needsSdk) + assertEquals(15, beast.volumeMax) + assertTrue(beast.hasSunblock) + assertFalse(VitureProtocol.sdkModel("Pro")!!.needsSdk) + assertNull(VitureProtocol.sdkModel("Unknown")) + assertNull(VitureProtocol.sdkModel("Mobile Dock")) + } + + @Test fun otherGen2DevicesPreserveSdkNwuAxesAndChangeComponentOrder() { + val a = sqrt(0.5f) + assertArrayEquals(floatArrayOf(0f, 0f, a, a), + VitureSdkPose.toGlasses(floatArrayOf(a, 0f, 0f, a), false), 0.00001f) + } + + @Test fun pro2AndCarinaSelectOpenGlButOtherGen2ModelsKeepTheirExistingBasis() { + assertTrue(VitureSdkPose.usesOpenGlAxes(false, VitureProtocol.Family.PRO2)) + assertTrue(VitureSdkPose.usesOpenGlAxes(true, VitureProtocol.Family.ULTRA)) + assertFalse(VitureSdkPose.usesOpenGlAxes(false, VitureProtocol.Family.BEAST)) + assertFalse(VitureSdkPose.usesOpenGlAxes(false, VitureProtocol.Family.PRO)) + assertFalse(VitureSdkPose.usesOpenGlAxes(false, null)) + } + + @Test fun pro2YawPitchAndRollReachTheCorrectRendererAxes() { + val openGl = VitureSdkPose.usesOpenGlAxes(false, VitureProtocol.sdkModel("Pro 2")!!.family) + fun screen(wxyz: FloatArray): FloatArray { + val q = VitureSdkPose.toGlasses(wxyz, openGl)!! + return HeadPose.fromGlasses(q[0], q[1], q[2], q[3]) + } + val ref = HeadPose.recenter(screen(floatArrayOf(1f, 0f, 0f, 0f))) + val s = kotlin.math.sin(Math.PI / 12).toFloat() + val c = kotlin.math.cos(Math.PI / 12).toFloat() + for ((axis, expected) in listOf( + 2 to floatArrayOf(-0.5f, 0f, -0.8660254f), // Observed left turn: positive Y. + 1 to floatArrayOf(0f, 0.5f, -0.8660254f), // Observed upward look: positive X. + 3 to floatArrayOf(-0.5f, 0.8660254f, 0f), + )) { + val q = floatArrayOf(c, 0f, 0f, 0f).apply { this[axis] = s } + val view = HeadPose.relative(ref, screen(q)) + val direction = if (axis == 3) floatArrayOf(0f, 1f, 0f) else floatArrayOf(0f, 0f, -1f) + assertArrayEquals(expected, HeadPose.apply(view, direction), 0.001f) + } + } + + @Test fun ultraOpenGlAxesMatchExistingGlassesHeadTracker() { + val a = sqrt(0.5f) + // OpenGL Y yaw maps to NWU Z; OpenGL X pitch maps to negative NWU Y. + assertArrayEquals(floatArrayOf(0f, 0f, a, a), + VitureSdkPose.toGlasses(floatArrayOf(a, 0f, a, 0f), true), 0.00001f) + assertArrayEquals(floatArrayOf(0f, -a, 0f, a), + VitureSdkPose.toGlasses(floatArrayOf(a, a, 0f, 0f), true), 0.00001f) + assertArrayEquals(floatArrayOf(-a, 0f, 0f, a), + VitureSdkPose.toGlasses(floatArrayOf(a, 0f, 0f, a), true), 0.00001f) + } + + @Test fun invalidOrUninitializedSdkPosesNeverReachTheRenderer() { + for (q in listOf(FloatArray(4), floatArrayOf(Float.NaN, 0f, 0f, 0f), + floatArrayOf(Float.POSITIVE_INFINITY, 0f, 0f, 0f), floatArrayOf(3f, 0f, 0f, 0f), FloatArray(7))) { + assertNull(VitureSdkPose.toGlasses(q, false)) + assertNull(VitureSdkPose.toGlasses(q, true)) + } + assertArrayEquals(floatArrayOf(0f, 0f, 0f, 1f), + VitureSdkPose.toGlasses(floatArrayOf(1.1f, 0f, 0f, 0f), true), 0.00001f) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/XrealLinkTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/XrealLinkTest.kt new file mode 100644 index 0000000000..9273dfb4b9 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/XrealLinkTest.kt @@ -0,0 +1,149 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import java.io.ByteArrayOutputStream +import java.io.InputStream +import java.io.OutputStream +import java.nio.ByteBuffer +import java.util.concurrent.CountDownLatch +import java.util.concurrent.LinkedBlockingQueue +import java.util.concurrent.TimeUnit +import java.util.concurrent.atomic.AtomicBoolean + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class XrealLinkTest { + private class Input : InputStream() { + private val bytes = LinkedBlockingQueue<Int>() + @Volatile private var closed = false + fun add(value: ByteArray) { value.forEach { bytes.add(it.toInt() and 255) } } + override fun read(): Int = if (closed && bytes.isEmpty()) -1 else bytes.take() + override fun read(b: ByteArray, off: Int, len: Int): Int { + if (len == 0) return 0 + val first = read() + if (first < 0) return -1 + b[off] = first.toByte() + var count = 1 + while (count < len) { + val value = bytes.poll() ?: break + if (value < 0) break + b[off + count++] = value.toByte() + } + return count + } + override fun close() { closed = true; bytes.clear(); bytes.offer(-1) } + } + + private class Channels : XrealChannels { + override val controlInput = Input() + override val reports = Input() + val wrote = LinkedBlockingQueue<Int>() + val closed = CountDownLatch(1) + @Volatile var acknowledge = true + override val controlOutput = object : OutputStream() { + private val buffer = ByteArrayOutputStream() + override fun write(b: Int) { buffer.write(b) } + override fun flush() { + val data = buffer.toByteArray(); buffer.reset() + val request = XrealProtocol.read(data.inputStream()) + val id = ByteBuffer.wrap(request.body).int and Int.MAX_VALUE + wrote.offer(request.command) + if (acknowledge) controlInput.add(XrealProtocolTest.response(request.command, id, + if (request.command == XrealProtocol.GET_DISPLAY) byteArrayOf(0x22, 2, 0x10, 2) else byteArrayOf(0x22, 0))) + } + } + override fun close() { controlInput.close(); reports.close(); closed.countDown() } + } + + private class Listener : XrealLink.Listener { + val ready = CountDownLatch(1) + val poses = LinkedBlockingQueue<FloatArray>() + val values = LinkedBlockingQueue<Pair<Int, Int>>() + val errors = LinkedBlockingQueue<Boolean>() + override fun onReady() { ready.countDown() } + override fun onValue(message: Int, value: Int) { values.offer(message to value) } + override fun onPose(raw: ByteArray, pose: FloatArray, timeNs: Long) { poses.offer(pose) } + override fun onUnavailable(networkMissing: Boolean) { errors.offer(networkMissing) } + } + + @Test fun trackingUsesSharedPoseAndCommandsAreAcknowledgedBeforePublishing() { + val channels = Channels() + val listener = Listener() + val connector = object : XrealConnector { + override fun connect() = channels + override fun close() = channels.close() + } + val link = XrealLink(connector, listener) + try { + assertTrue(listener.ready.await(2, TimeUnit.SECONDS)) + assertEquals(VitureProtocol.MSG_GET_DISPLAY to 2, listener.values.poll(2, TimeUnit.SECONDS)) + assertTrue(link.send(VitureProtocol.MSG_IMU, byteArrayOf(1))) + channels.reports.add(XrealProtocolTest.frame(XrealProtocol.REPORT, XrealProtocolTest.sensor())) + assertNotNull(listener.poses.poll(2, TimeUnit.SECONDS)) + assertFalse(link.send(VitureProtocol.MSG_VOLUME, byteArrayOf(5))) + assertFalse(link.send(VitureProtocol.MSG_DISPLAY, byteArrayOf(0x32))) + assertTrue(link.send(VitureProtocol.MSG_BRIGHTNESS, byteArrayOf(6))) + assertEquals(VitureProtocol.MSG_BRIGHTNESS to 6, listener.values.poll(2, TimeUnit.SECONDS)) + } finally { link.close() } + assertFalse(link.ready) + assertTrue(channels.closed.await(1, TimeUnit.SECONDS)) + assertFalse(link.send(VitureProtocol.MSG_IMU, byteArrayOf(1))) + } + + @Test fun failedControlReadDisconnectsWithoutPublishingRequestedBrightness() { + val channels = Channels() + val listener = Listener() + val link = XrealLink(object : XrealConnector { + override fun connect() = channels + override fun close() = channels.close() + }, listener) + try { + assertTrue(listener.ready.await(2, TimeUnit.SECONDS)) + listener.values.clear() + channels.acknowledge = false + assertTrue(link.send(VitureProtocol.MSG_BRIGHTNESS, byteArrayOf(8))) + channels.controlInput.close() + assertEquals(false, listener.errors.poll(2, TimeUnit.SECONDS)) + assertFalse(link.ready) + assertNull(listener.values.poll()) + } finally { link.close() } + } + + @Test fun missingNetworkIsReportedAndCloseCancelsRetry() { + val listener = Listener() + val closed = AtomicBoolean() + val link = XrealLink(object : XrealConnector { + override fun connect(): XrealChannels = throw XrealNetworkMissing() + override fun close() { closed.set(true) } + }, listener) + try { + assertEquals(true, listener.errors.poll(2, TimeUnit.SECONDS)) + assertFalse(link.ready) + } finally { link.close() } + assertTrue(closed.get()) + } + + @Test fun closeDuringConnectCannotPublishReadyOrLeakSockets() { + val entered = CountDownLatch(1) + val release = CountDownLatch(1) + val channels = Channels() + val listener = Listener() + val link = XrealLink(object : XrealConnector { + override fun connect(): XrealChannels { + entered.countDown() + release.await() + return channels + } + override fun close() { release.countDown(); channels.close() } + }, listener) + assertTrue(entered.await(2, TimeUnit.SECONDS)) + link.close() + assertTrue(channels.closed.await(1, TimeUnit.SECONDS)) + assertFalse(listener.ready.await(100, TimeUnit.MILLISECONDS)) + assertTrue(listener.values.isEmpty()) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/XrealNetworkTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/XrealNetworkTest.kt new file mode 100644 index 0000000000..348ba36d3e --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/XrealNetworkTest.kt @@ -0,0 +1,37 @@ +package com.droiddeck.launcher.glasses + +import android.net.IpPrefix +import android.net.LinkProperties +import android.net.RouteInfo +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import org.robolectric.util.ReflectionHelpers +import org.robolectric.util.ReflectionHelpers.ClassParameter.from +import java.net.InetAddress + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class XrealNetworkTest { + private val target = InetAddress.getByName(XrealProtocol.HOST) + private fun properties(address: String, prefix: Int, gateway: String? = null) = LinkProperties().apply { + interfaceName = "eth0" + val route = ReflectionHelpers.callConstructor<RouteInfo>(RouteInfo::class.java, + from(IpPrefix::class.java, IpPrefix(InetAddress.getByName(address), prefix)), + from(InetAddress::class.java, InetAddress.getByName(gateway ?: "0.0.0.0")), + from(String::class.java, "eth0")) + addRoute(route) + } + @Test fun onlyAnOnLinkGlassesRouteQualifies() { + val direct = properties("169.254.2.0", 24) + val default = properties("0.0.0.0", 0) + val gateway = properties("169.254.2.0", 24, "192.168.1.1") + val unrelated = properties("192.168.1.0", 24) + assertTrue(AndroidXrealConnector.hasDirectRoute(direct, target)) + assertFalse(AndroidXrealConnector.hasDirectRoute(default, target)) + assertFalse(AndroidXrealConnector.hasDirectRoute(gateway, target)) + assertFalse(AndroidXrealConnector.hasDirectRoute(unrelated, target)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/XrealOrientationFilterTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/XrealOrientationFilterTest.kt new file mode 100644 index 0000000000..578d334a63 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/XrealOrientationFilterTest.kt @@ -0,0 +1,72 @@ +package com.droiddeck.launcher.glasses + +import com.droiddeck.launcher.gpu.HeadPose +import org.junit.Assert.* +import org.junit.Test +import kotlin.math.cos +import kotlin.math.sin + +class XrealOrientationFilterTest { + private fun sample(time: Long, gyro: Vec3 = Vec3(0f, 0f, 0f), accel: Vec3 = Vec3(0f, -9.81f, 0f)) = + XrealProtocol.Sample(time, gyro, accel) + private fun matrix(q: FloatArray) = HeadPose.fromGlasses(q[0], q[1], q[2], q[3]) + + @Test fun firstPoseAlignsGravityAndDuplicateOrReversedTimeIsDiscarded() { + val filter = XrealOrientationFilter() + val tilted = Vec3(4.905f, -8.4957f, 0f) + val first = filter.update(sample(1000000, accel = tilted))!! + assertNull(filter.update(sample(1000000))) + assertNull(filter.update(sample(999999))) + assertArrayEquals(first, filter.update(sample(2000000, accel = tilted)), 0.0001f) + } + + @Test fun reconnectGapDoesNotIntegrateSecondsOfGyro() { + val filter = XrealOrientationFilter() + val first = filter.update(sample(1000000))!! + assertArrayEquals(first, filter.update(sample(5000000000, Vec3(2f, 2f, 2f))), 0.0001f) + } + + @Test fun invalidStartupGravityWaitsForAStationarySample() { + val filter = XrealOrientationFilter() + assertNull(filter.update(sample(1000000, accel = Vec3(0f, 0f, 0f)))) + assertNotNull(filter.update(sample(2000000))) + } + + @Test fun observedNegativeYawTurnsLeftThirtyDegreesAtOneKhzThroughSharedPosePath() { + val filter = XrealOrientationFilter() + val first = matrix(filter.update(sample(1000000))!!) + var last = FloatArray(4) + repeat(1000) { last = filter.update(sample((it + 2) * 1000000L, Vec3(0f, -(Math.PI / 6).toFloat(), 0f)))!! } + val view = HeadPose.relative(HeadPose.recenter(first), matrix(last)) + assertArrayEquals(floatArrayOf(-0.5f, 0f, -0.8660254f), HeadPose.apply(view, floatArrayOf(0f, 0f, -1f)), 0.001f) + } + + @Test fun observedPositivePitchAndRollLookUpAndTiltRightWithoutCrossingAxes() { + for (roll in listOf(false, true)) { + val filter = XrealOrientationFilter() + val first = matrix(filter.update(sample(1000000))!!) + var last = FloatArray(4) + repeat(1000) { + val angle = (it + 1) * Math.PI / 6000 + val accel = if (roll) Vec3(-9.81f * sin(angle).toFloat(), -9.81f * cos(angle).toFloat(), 0f) + else Vec3(0f, -9.81f * cos(angle).toFloat(), 9.81f * sin(angle).toFloat()) + val rate = (Math.PI / 6).toFloat() + last = filter.update(sample((it + 2) * 1000000L, + if (roll) Vec3(0f, 0f, rate) else Vec3(rate, 0f, 0f), accel))!! + } + val view = HeadPose.relative(HeadPose.recenter(first), matrix(last)) + val actual = HeadPose.apply(view, if (roll) floatArrayOf(0f, 1f, 0f) else floatArrayOf(0f, 0f, -1f)) + assertArrayEquals(if (roll) floatArrayOf(0.5f, 0.8660254f, 0f) else floatArrayOf(0f, 0.5f, -0.8660254f), actual, 0.002f) + } + } + + @Test fun capturedNeutralGravityStartsUprightBeforeRecenter() { + val pose = XrealOrientationFilter().update(sample(1000000, + accel = Vec3(-0.0909f, -9.6529f, -1.0731f)))!! + // An upright start must not contain the previous approximately 180-degree + // pitch correction. Check before recenter can hide a mounting error. + assertTrue(kotlin.math.abs(pose[3]) > 0.99f) + val screen = matrix(pose) + assertTrue(screen[7] > 0.99f) // Screen up points toward shared world +Z. + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/glasses/XrealProtocolTest.kt b/app/src/test/java/com/droiddeck/launcher/glasses/XrealProtocolTest.kt new file mode 100644 index 0000000000..0deee75dd4 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/glasses/XrealProtocolTest.kt @@ -0,0 +1,127 @@ +package com.droiddeck.launcher.glasses + +import org.junit.Assert.* +import org.junit.Test +import java.io.ByteArrayInputStream +import java.io.ByteArrayOutputStream +import java.io.IOException +import java.io.InputStream +import java.nio.ByteBuffer +import java.nio.ByteOrder + +class XrealProtocolTest { + @Test fun fragmentedAndCoalescedFramesRetainBoundariesAndDeviceUnits() { + val bytes = frame(XrealProtocol.REPORT, sensor()) + frame(0x272e, byteArrayOf(1, 2)) + val input = object : ByteArrayInputStream(bytes) { + override fun read(b: ByteArray, off: Int, len: Int) = super.read(b, off, minOf(3, len)) + } + val sample = XrealProtocol.sample(XrealProtocol.read(input))!! + assertEquals(123456789L, sample.timeNs) + assertEquals(0.5f, sample.gyro.y, 0f) + assertEquals(9.81f, sample.accel.y, 0f) + assertArrayEquals(byteArrayOf(1, 2), XrealProtocol.read(input).body) + } + + @Test fun invalidLengthsAndTruncationFailWithoutUnboundedAllocation() { + for (size in listOf(-1, Int.MAX_VALUE, XrealProtocol.MAX_BODY + 1)) { + val bytes = ByteBuffer.allocate(6).putShort(0x2836).putInt(size).array() + assertThrows(IOException::class.java) { XrealProtocol.read(bytes.inputStream()) } + } + assertThrows(IOException::class.java) { XrealProtocol.read(byteArrayOf(0x28).inputStream()) } + assertThrows(IOException::class.java) { XrealProtocol.read(frame(0x2836, sensor()).dropLast(1).toByteArray().inputStream()) } + } + + @Test fun onlyCompleteFiniteImuReportsAreAccepted() { + assertNull(XrealProtocol.sample(XrealProtocol.Frame(0x2836, ByteArray(84)))) + assertNull(XrealProtocol.sample(XrealProtocol.Frame(0x272e, sensor()))) + for ((offset, value) in listOf(24 to 4, 28 to Float.NaN.toRawBits(), 40 to Float.POSITIVE_INFINITY.toRawBits())) { + val bytes = sensor() + ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN).putInt(offset, value) + assertNull(XrealProtocol.sample(XrealProtocol.Frame(0x2836, bytes))) + } + } + + @Test fun commandAndTransactionMustBothMatchBeforeParsingAcknowledgement() { + val body = ByteBuffer.allocate(6).putInt(7).put(byteArrayOf(0x22, 0)).array() + val reply = XrealProtocol.Frame(0x271c, body) + assertNull(XrealProtocol.response(reply, 0x271c, 8)) + assertNull(XrealProtocol.response(reply, 0x275f, 7)) + assertTrue(XrealProtocol.acknowledged(XrealProtocol.response(reply, 0x271c, 7)!!)) + assertFalse(XrealProtocol.acknowledged(byteArrayOf(0x22, 1, 0))) + assertEquals(5, XrealProtocol.numeric(byteArrayOf(0x22, 2, 0x10, 5))) + assertNull(XrealProtocol.numeric(byteArrayOf(0x22, 2, 8, 5))) + } + + @Test fun getAndSetCommandsUseBigEndianHeaderAndProtobufBody() { + assertArrayEquals(byteArrayOf(0x27, 0x5e, 0, 0, 0, 6, 0x80.toByte(), 0, 0, 1, 0x18, 0), + XrealProtocol.request(XrealProtocol.GET_DISPLAY, 1)) + assertArrayEquals(byteArrayOf(0x27, 0x1c, 0, 0, 0, 8, 0x80.toByte(), 0, 0, 2, 0x1a, 2, 8, 9), + XrealProtocol.request(XrealProtocol.SET_BRIGHTNESS, 2, 9)) + } + + @Test fun controlIgnoresUnsolicitedAndStaleRepliesAndRejectsFailure() { + val output = ByteArrayOutputStream() + val replies = frame(0x272e, ByteArray(8)) + response(0x275e, 99, byteArrayOf(0x22, 2, 0x10, 4)) + + response(0x275e, 1, byteArrayOf(0x22, 2, 0x10, 2)) + response(0x271c, 2, byteArrayOf(0x22, 1, 1)) + val control = XrealControl(channels(replies.inputStream(), output)) + assertEquals(2, control.display()) + assertThrows(IOException::class.java) { control.set(0x271c, 5) } + assertEquals(26, output.size()) + } + + @Test fun unrelatedResponsesCannotKeepControlWaitingForever() { + val replies = ByteArrayOutputStream().apply { repeat(32) { write(frame(0x272e, ByteArray(8))) } } + val control = XrealControl(channels(replies.toByteArray().inputStream(), ByteArrayOutputStream())) + assertThrows(IOException::class.java) { control.display() } + } + + @Test fun captured1sNativeDisplayResponsePreserves1200LineMode() { + val reply = byteArrayOf(0x22, 2, 0x10, 0x1d) + val control = XrealControl(channels(response(0x275e, 1, reply).inputStream(), ByteArrayOutputStream())) + assertEquals(29, control.display()) + assertEquals(29, XrealModel.mode(60, false)) + } + + @Test fun stereoWaitsForEdidChangeWithoutSendingASecondModeCommandWhileBusy() { + val output = ByteArrayOutputStream() + val replies = response(0x2822, 1, byteArrayOf(0x22, 0)) + + response(0x275e, 2, byteArrayOf(0x22, 2, 0x10, 29)) + + response(0x275e, 3, byteArrayOf(0x22, 0)) + + response(0x275e, 4, byteArrayOf(0x22, 2, 0x10, 5)) + assertEquals(5, XrealControl(channels(replies.inputStream(), output), 0).changeDisplay(5)) + val requests = output.toByteArray().inputStream() + assertEquals(0x2822, XrealProtocol.read(requests).command) + repeat(3) { assertEquals(0x275e, XrealProtocol.read(requests).command) } + assertEquals(0, requests.available()) + // Actual 1S busy response remains an error, never a successful ack. + assertFalse(XrealProtocol.acknowledged(byteArrayOf(0x22, 3, 8, 0x89.toByte(), 0x27))) + } + + @Test fun stereoCanReturnToNative1200LinesAndAnUnfinishedTransitionIsBounded() { + val replies = response(0x2822, 1, byteArrayOf(0x22, 0)) + + response(0x275e, 2, byteArrayOf(0x22, 0)) + + response(0x275e, 3, byteArrayOf(0x22, 2, 0x10, 29)) + assertEquals(29, XrealControl(channels(replies.inputStream(), ByteArrayOutputStream()), 0).changeDisplay(29)) + val stalled = ByteArrayOutputStream().apply { + write(response(0x2822, 1, byteArrayOf(0x22, 0))) + repeat(40) { write(response(0x275e, it + 2, byteArrayOf(0x22, 0))) } + } + val control = XrealControl(channels(stalled.toByteArray().inputStream(), ByteArrayOutputStream()), 0) + assertThrows(IOException::class.java) { control.changeDisplay(5) } + } + + companion object { + fun sensor(time: Long = 123456789L): ByteArray = ByteBuffer.allocate(128).order(ByteOrder.LITTLE_ENDIAN) + .putLong(8, time).putInt(24, 11).putFloat(32, 0.5f).putFloat(44, 9.81f).array() + fun frame(command: Int, body: ByteArray): ByteArray = ByteBuffer.allocate(6 + body.size) + .putShort(command.toShort()).putInt(body.size).put(body).array() + fun response(command: Int, transaction: Int, body: ByteArray) = frame(command, + ByteBuffer.allocate(4 + body.size).putInt(transaction).put(body).array()) + internal fun channels(input: InputStream, output: ByteArrayOutputStream) = object : XrealChannels { + override val controlInput = input + override val controlOutput = output + override val reports = ByteArrayInputStream(ByteArray(0)) + override fun close() = Unit + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/AutoDriverTrialTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/AutoDriverTrialTest.kt new file mode 100644 index 0000000000..d38d96b3f9 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/AutoDriverTrialTest.kt @@ -0,0 +1,65 @@ +package com.droiddeck.launcher.gpu + +import android.content.Context +import com.droiddeck.launcher.session.SessionPrefs +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class AutoDriverTrialTest { + private val context: Context get() = RuntimeEnvironment.getApplication() + + @Before fun reset() { + context.getSharedPreferences("session", Context.MODE_PRIVATE).edit().clear().commit() + context.getSharedPreferences("gpu_auto_trial", Context.MODE_PRIVATE).edit().clear().commit() + SessionPrefs.setAndroidDriver(context, "new-display") + SessionPrefs.setLinuxDriver(context, "new-linux") + SessionPrefs.setGpuAutoInstalled(context, setOf("old-display", "old-linux", "new-display", "new-linux")) + AutoDriverTrial.begin(context, "banner@r5", "Banners r5", "new-display", "new-linux", "old-display", "old-linux") + } + + @Test fun aReadySessionKeepsTheNewDriversAndDropsTheOldOnes() { + AutoDriverTrial.sessionStarting(context, "new-display", "new-linux") + AutoDriverTrial.sessionReady() + assertNull(AutoDriverTrial.current(context)) + assertEquals(setOf("new-display", "new-linux"), SessionPrefs.gpuAutoInstalled(context)) + assertEquals("new-linux", SessionPrefs.linuxDriver(context)) + } + + @Test fun startsThatNeverGetReadyRollBackAndMarkTheReleaseBad() { + AutoDriverTrial.sessionStarting(context, "new-display", "new-linux") + assertNull(AutoDriverTrial.rollbackDue(context)) + AutoDriverTrial.sessionStarting(context, "new-display", "new-linux") + val trial = AutoDriverTrial.rollbackDue(context)!! + AutoDriverTrial.rollBack(context, trial) + assertEquals("old-display", SessionPrefs.androidDriver(context)) + assertEquals("old-linux", SessionPrefs.linuxDriver(context)) + assertEquals(setOf("old-display", "old-linux"), SessionPrefs.gpuAutoInstalled(context)) + assertTrue("banner@r5" in AutoDriverTrial.bad(context)) + assertNull(AutoDriverTrial.current(context)) + } + + @Test fun rollingBackKeepsADriverTheUserSelectedSince() { + SessionPrefs.setGpuAutoInstalled(context, setOf("old-display", "old-linux", "new-display", "new-linux", "chosen-linux")) + SessionPrefs.setLinuxDriver(context, "chosen-linux") + AutoDriverTrial.rollBack(context, AutoDriverTrial.current(context)!!) + assertEquals("chosen-linux", SessionPrefs.linuxDriver(context)) + assertTrue("chosen-linux" in SessionPrefs.gpuAutoInstalled(context)) + } + + @Test fun sessionsOnOtherDriversDoNotCountTowardsTheTrial() { + AutoDriverTrial.sessionStarting(context, "old-display", "new-linux") + AutoDriverTrial.sessionStarting(context, "old-display", "new-linux") + AutoDriverTrial.sessionReady() + assertNull(AutoDriverTrial.rollbackDue(context)) + assertEquals("banner@r5", AutoDriverTrial.current(context)?.release) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/AutoPicksTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/AutoPicksTest.kt new file mode 100644 index 0000000000..83f32a36eb --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/AutoPicksTest.kt @@ -0,0 +1,67 @@ +package com.droiddeck.launcher.gpu + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class AutoPicksTest { + private fun gpu(model: Int) = GpuInfo("Adreno $model", model, GpuInfo.familyOf(true, model), "", false) + + private fun bundle(tag: String) = TurnipReleases.Asset("DroidDeck", tag, "$tag.zip", "https://example/$tag", 6_000_000, + false, "Android + Linux", "0".repeat(64), DriverPairs.ddTurnip(tag), bundle = true) + + private fun half(name: String, tag: String, linux: Boolean, pair: String) = + TurnipReleases.Asset("src", tag, name, "https://example/$name", 3_000_000, linux, "label", "0".repeat(64), pair) + + private val pairs = DriverPairs.from(TurnipReleases.Check( + listOf( + bundle("DD-Turnip-v0.3.0"), + half("Turnip-r6.zip", "r6", false, DriverPairs.BANNER), + half("Turnip-r6-Linux.zip", "r6", true, DriverPairs.BANNER), + ), + emptyList(), emptyList(), 0L, + )) + + private val manifest = """ + {"schemaVersion": 1, "rules": [ + {"families": ["A7XX"], "models": [740], "blobMin": 700, "prefer": ["banner"]}, + {"families": ["A7XX", "A6XX"], "prefer": ["dd-turnip", "banner"]}, + {"families": ["A9XX"], "prefer": ["banner"]} + ]} + """.trimIndent() + + @Test fun theManifestOrdersPreferencesAndTheNewestDdTurnipResolves() { + val rules = AutoPicks.parse(manifest)!! + assertEquals(2, rules.size) + assertEquals(DriverPairs.ddTurnip("DD-Turnip-v0.3.0"), DriverPairs.recommendedKey(gpu(650), pairs, rules)) + } + + @Test fun aReleaseMarkedBadFallsThroughToTheNextPreference() { + val rules = AutoPicks.parse(manifest)!! + val dd = pairs.first { it.key.startsWith(DriverPairs.DD_TURNIP) } + assertEquals(DriverPairs.BANNER, DriverPairs.recommendedKey(gpu(650), pairs, rules, bad = setOf(AutoDriverTrial.release(dd)))) + } + + @Test fun systemDriverRulesOnlyMatchAKnownBlob() { + val rules = AutoPicks.parse(manifest)!! + assertEquals(DriverPairs.BANNER, DriverPairs.recommendedKey(gpu(740), pairs, rules, blob = 744)) + assertEquals(DriverPairs.ddTurnip("DD-Turnip-v0.3.0"), DriverPairs.recommendedKey(gpu(740), pairs, rules, blob = 676)) + assertEquals(DriverPairs.ddTurnip("DD-Turnip-v0.3.0"), DriverPairs.recommendedKey(gpu(740), pairs, rules, blob = null)) + assertEquals(744, AutoPicks.blobVersion("512.744.0")) + } + + @Test fun aGpuTheManifestDoesNotCoverUsesTheBuiltInTable() { + assertEquals(DriverPairs.WN_BALANCED, DriverPairs.recommendedKey(gpu(830), pairs, AutoPicks.parse(manifest)!!)) + } + + @Test fun anotherSchemaOrNoUsableRulesIsIgnored() { + assertNull(AutoPicks.parse("""{"schemaVersion": 2, "rules": [{"families": ["A7XX"], "prefer": ["banner"]}]}""")) + assertNull(AutoPicks.parse("""{"schemaVersion": 1, "rules": [{"families": ["A9XX"], "prefer": ["banner"]}]}""")) + assertNull(AutoPicks.parse("not json")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/CardboardTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/CardboardTest.kt new file mode 100644 index 0000000000..27ea94c926 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/CardboardTest.kt @@ -0,0 +1,203 @@ +package com.droiddeck.launcher.gpu + +import org.json.JSONObject +import org.junit.Assert.assertArrayEquals +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import kotlin.math.PI +import kotlin.math.cos +import kotlin.math.sin +import kotlin.math.sqrt + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class CardboardTest { + private val eps = 1e-4f + + private fun assertVec(expected: FloatArray, actual: FloatArray) = assertArrayEquals(expected, actual, eps) + + private fun quat(ax: Float, ay: Float, az: Float, deg: Double): FloatArray { + val h = deg * PI / 360.0 + val s = sin(h).toFloat() + return floatArrayOf(ax * s, ay * s, az * s, cos(h).toFloat()) + } + + private fun matrix(q: FloatArray) = HeadPose.fromQuaternion(q[0], q[1], q[2], q[3]) + + @Test fun settingsRoundTripAndClamp() { + val c = Cardboard(enabled = true, source = Cardboard.SOURCE_SBS, viewer = "none", ipdMm = 70, + screenWidthDm = 55, screenDistanceDm = 25, headTracking = false) + assertEquals(c, Cardboard.decode(c.encode())) + val flat = c.copy(source = Cardboard.SOURCE_FLAT) + assertEquals(flat, Cardboard.decode(flat.encode())) + val wild = Cardboard.decode(JSONObject().put("ipdMm", 500).put("screenWidthDm", -3).put("viewer", "nope").put("source", 7)) + assertEquals(80, wild.ipdMm) + assertEquals(5, wild.screenWidthDm) + assertEquals(Cardboard.Viewer.CARDBOARD_V2.id, wild.viewer) + assertEquals(Cardboard.SOURCE_SCREEN, wild.source) + assertEquals(Cardboard.OFF, Cardboard.decode(JSONObject())) + } + + @Test fun lensInsetLinesTheEyesUpWithTheLenses() { + assertEquals(0f, Cardboard.lensInset(128f, 64f), eps) + assertEquals(5.5f / 75f, Cardboard.lensInset(150f, 64f), eps) + assertEquals(true, Cardboard.lensInset(110f, 64f) < 0f) + assertEquals(0f, Cardboard.lensInset(0f, 64f), eps) + assertEquals(0f, Cardboard.lensInset(150f, 0f), eps) + } + + @Test fun steamVrStatusFollowsTheAgentAnswer() { + fun answer(vararg pairs: Pair<String, Boolean>) = JSONObject().apply { pairs.forEach { put(it.first, it.second) } } + assertEquals(SteamVr.Status.UNAVAILABLE, SteamVr.parse(answer("ok" to false, "installed" to true, "driver" to true))) + assertEquals(SteamVr.Status.UNAVAILABLE, SteamVr.parse(answer("ok" to true, "installed" to true, "driver" to false))) + assertEquals(SteamVr.Status.NOT_INSTALLED, SteamVr.parse(answer("ok" to true, "driver" to true))) + assertEquals(SteamVr.Status.INSTALLING, SteamVr.parse(answer("ok" to true, "installing" to true))) + assertEquals(SteamVr.Status.READY, SteamVr.parse(answer("ok" to true, "installed" to true, "driver" to true))) + assertEquals(SteamVr.Status.RUNNING, + SteamVr.parse(answer("ok" to true, "installed" to true, "driver" to true, "running" to true))) + assertEquals(SteamVr.Status.UNAVAILABLE, + SteamVr.parse(answer("ok" to true, "installed" to true, "driver" to true).put("exitCode", 1))) + } + + @Test fun steamVrActionsSucceedOnlyWhenTheHelperDid() { + fun answer(ok: Boolean, exitCode: Int? = null, started: Boolean? = null) = JSONObject().apply { + put("ok", ok) + exitCode?.let { put("exitCode", it) } + started?.let { put("started", it) } + } + assertTrue(SteamVr.succeeded("start", answer(true, exitCode = 0))) + assertTrue(SteamVr.succeeded("stop", answer(true, exitCode = 0))) + assertFalse(SteamVr.succeeded("start", answer(true, exitCode = 1))) + assertFalse(SteamVr.succeeded("stop", answer(true, exitCode = 2))) + assertFalse(SteamVr.succeeded("start", answer(true))) + assertFalse(SteamVr.succeeded("start", answer(false, exitCode = 0))) + assertTrue(SteamVr.succeeded("install", answer(true, started = true))) + assertFalse(SteamVr.succeeded("install", answer(true))) + assertFalse(SteamVr.succeeded("install", answer(false, started = true))) + } + + @Test fun quaternionMatchesKnownRotations() { + val m = matrix(quat(0f, 0f, 1f, 90.0)) + assertVec(floatArrayOf(0f, 1f, 0f), HeadPose.apply(m, floatArrayOf(1f, 0f, 0f))) + val q = HeadPose.quaternionFromRotationVector(floatArrayOf(0f, 0f, sin(PI / 4).toFloat())) + assertEquals(cos(PI / 4).toFloat(), q[3], eps) + } + + @Test fun recenterMakesTheCurrentViewStraightAhead() { + for (heading in listOf(0.0, 37.0, 140.0, -100.0)) { + val upright = floatArrayOf(1f, 0f, 0f, 0f, 0f, -1f, 0f, 1f, 0f) + val yaw = matrix(quat(0f, 0f, 1f, heading)) + val screenToWorld = HeadPose.multiply(yaw, upright) + assertVec(HeadPose.IDENTITY, HeadPose.relative(HeadPose.recenter(screenToWorld), screenToWorld)) + } + } + + @Test fun recenterKeepsPitchButDropsHeading() { + val upright = floatArrayOf(1f, 0f, 0f, 0f, 0f, -1f, 0f, 1f, 0f) + val pitched = HeadPose.multiply(upright, matrix(quat(1f, 0f, 0f, -30.0))) + val turned = HeadPose.multiply(matrix(quat(0f, 0f, 1f, 50.0)), pitched) + val pose = HeadPose.relative(HeadPose.recenter(turned), turned) + val forward = HeadPose.apply(pose, floatArrayOf(0f, 0f, -1f)) + assertEquals(0f, forward[0], eps) + assertEquals(-sin(PI / 6).toFloat(), forward[1], eps) + assertEquals(-cos(PI / 6).toFloat(), forward[2], eps) + } + + @Test fun virtualScreenRecenterUsesTheCurrentHeightAndDirection() { + for (pitch in listOf(-30.0, -10.0, 15.0, 35.0)) { + val yaw = matrix(quat(0f, 0f, 1f, 50.0)) + val tilt = HeadPose.multiply(matrix(quat(1f, 0f, 0f, pitch)), matrix(quat(0f, 0f, 1f, 12.0))) + val screen = HeadPose.multiply(HeadPose.multiply(yaw, HeadPose.fromGlasses(0f, 0f, 0f, 1f)), tilt) + val ref = HeadPose.recenter(screen, centerView = true) + assertVec(HeadPose.IDENTITY, HeadPose.relative(ref, screen)) + val lookUp = matrix(quat(1f, 0f, 0f, 20.0)) + assertVec(lookUp, HeadPose.relative(ref, HeadPose.multiply(screen, lookUp))) + } + } + + @Test fun turningTheHeadTurnsTheView() { + val upright = floatArrayOf(1f, 0f, 0f, 0f, 0f, -1f, 0f, 1f, 0f) + val ref = HeadPose.recenter(upright) + val turned = HeadPose.multiply(matrix(quat(0f, 0f, 1f, 90.0)), upright) + val forward = HeadPose.apply(HeadPose.relative(ref, turned), floatArrayOf(0f, 0f, -1f)) + assertVec(floatArrayOf(-1f, 0f, 0f), forward) + } + + @Test fun heldFlatTheViewStartsStraightAhead() { + for (m in listOf(HeadPose.IDENTITY, HeadPose.multiply(matrix(quat(0f, 0f, 1f, 30.0)), matrix(quat(1f, 0f, 0f, 20.0))))) { + assertVec(HeadPose.IDENTITY, HeadPose.relative(HeadPose.recenter(m), m)) + } + } + + @Test fun heldFlatTurningAtTheHipsPans() { + val flat = HeadPose.IDENTITY + val ref = HeadPose.recenter(flat) + val turned = HeadPose.multiply(matrix(quat(0f, 0f, 1f, 40.0)), flat) + val pose = HeadPose.relative(ref, turned) + val forward = HeadPose.apply(pose, floatArrayOf(0f, 0f, -1f)) + val up = HeadPose.apply(pose, floatArrayOf(0f, 1f, 0f)) + assertVec(floatArrayOf(-sin(PI * 40 / 180).toFloat(), 0f, -cos(PI * 40 / 180).toFloat()), forward) + assertVec(floatArrayOf(0f, 1f, 0f), up) + val tipped = HeadPose.multiply(flat, matrix(quat(1f, 0f, 0f, -20.0))) + val down = HeadPose.apply(HeadPose.relative(ref, tipped), floatArrayOf(0f, 0f, -1f)) + assertEquals(-sin(PI / 9).toFloat(), down[1], eps) + } + + @Test fun fieldOfViewComesFromThePanelSeenThroughTheLens() { + val v2 = Cardboard.Viewer.CARDBOARD_V2 + assertEquals(87.07f, Cardboard.fovDeg(v2, 74.7f), 0.05f) + assertEquals(v2.fallbackFovDeg, Cardboard.fovDeg(v2, 0f), eps) + assertEquals(Cardboard.Viewer.NONE.fallbackFovDeg, Cardboard.fovDeg(Cardboard.Viewer.NONE, 74.7f), eps) + } + + @Test fun displayRotationRemapsTheScreenAxes() { + val r = matrix(quat(0.3f, -0.5f, 0.2f, 70.0).let { q -> + val n = sqrt(q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]); floatArrayOf(q[0] / n, q[1] / n, q[2] / n, q[3] / n) + }) + assertVec(r, HeadPose.toScreen(r, 0)) + val s90 = HeadPose.toScreen(r, 1) + assertVec(HeadPose.apply(r, floatArrayOf(0f, -1f, 0f)), HeadPose.apply(s90, floatArrayOf(1f, 0f, 0f))) + assertVec(HeadPose.apply(r, floatArrayOf(1f, 0f, 0f)), HeadPose.apply(s90, floatArrayOf(0f, 1f, 0f))) + val s270 = HeadPose.toScreen(r, 3) + assertVec(HeadPose.apply(r, floatArrayOf(0f, 1f, 0f)), HeadPose.apply(s270, floatArrayOf(1f, 0f, 0f))) + assertVec(r, HeadPose.toScreen(HeadPose.toScreen(HeadPose.toScreen(HeadPose.toScreen(r, 1), 1), 1), 1)) + } + + @Test fun glassesLevelAndAheadIsStraightAhead() { + val s2w = HeadPose.fromGlasses(0f, 0f, 0f, 1f) + assertVec(floatArrayOf(1f, 0f, 0f), HeadPose.apply(s2w, floatArrayOf(0f, 0f, -1f))) + assertVec(floatArrayOf(0f, 0f, 1f), HeadPose.apply(s2w, floatArrayOf(0f, 1f, 0f))) + assertVec(HeadPose.IDENTITY, HeadPose.relative(HeadPose.recenter(s2w), s2w)) + } + + @Test fun glassesTurnedLeftLookLeft() { + val ref = HeadPose.recenter(HeadPose.fromGlasses(0f, 0f, 0f, 1f)) + val q = quat(0f, 0f, 1f, 30.0) + val view = HeadPose.relative(ref, HeadPose.fromGlasses(q[0], q[1], q[2], q[3])) + val s = sin(PI / 6).toFloat(); val c = cos(PI / 6).toFloat() + assertVec(floatArrayOf(-s, 0f, -c), HeadPose.apply(view, floatArrayOf(0f, 0f, -1f))) + assertVec(floatArrayOf(0f, 1f, 0f), HeadPose.apply(view, floatArrayOf(0f, 1f, 0f))) + } + + @Test fun glassesRecenterKeepsTheHorizon() { + val q = quat(0f, 0f, 1f, 75.0) + val ref = HeadPose.recenter(HeadPose.fromGlasses(q[0], q[1], q[2], q[3])) + assertVec(HeadPose.IDENTITY, HeadPose.relative(ref, HeadPose.fromGlasses(q[0], q[1], q[2], q[3]))) + val tilt = quat(0f, 1f, 0f, 20.0) + val both = HeadPose.multiply(HeadPose.fromQuaternion(q[0], q[1], q[2], q[3]), HeadPose.fromQuaternion(tilt[0], tilt[1], tilt[2], tilt[3])) + val view = HeadPose.multiply(HeadPose.transpose(ref.basis), HeadPose.multiply(both, floatArrayOf(0f, 0f, -1f, -1f, 0f, 0f, 0f, 1f, 0f))) + val ahead = HeadPose.apply(view, floatArrayOf(0f, 0f, -1f)) + assertEquals(0f, ahead[0], eps) + assertEquals(-sin(PI / 9).toFloat(), ahead[1], eps) + } + + @Test fun monoIsNotPartOfTheSavedSettings() { + val c = Cardboard(enabled = true, mono = true) + assertEquals(false, Cardboard.decode(c.encode()).mono) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/DriverBundleTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/DriverBundleTest.kt index 434e87d097..6082d3ddf6 100644 --- a/app/src/test/java/com/droiddeck/launcher/gpu/DriverBundleTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/gpu/DriverBundleTest.kt @@ -34,7 +34,6 @@ class DriverBundleTest { SessionPrefs.setLinuxDriver(context, "") } - /** Enough of an AArch64 ELF for the importers: the header they read, then the libc they look for. */ private fun library(libc: String) = ByteArray(64).also { byteArrayOf(0x7f, 'E'.code.toByte(), 'L'.code.toByte(), 'F'.code.toByte(), 2, 1).copyInto(it) it[18] = 0xB7.toByte() diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/DriverPairsTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/DriverPairsTest.kt index b5d632fdc4..ba2a53f4ed 100644 --- a/app/src/test/java/com/droiddeck/launcher/gpu/DriverPairsTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/gpu/DriverPairsTest.kt @@ -60,7 +60,6 @@ class DriverPairsTest { listOf( asset("Turnip-r4.zip", "r4", false, DriverPairs.BANNER), asset("Turnip-r4-Linux.zip", "r4", true, DriverPairs.BANNER), - // The A8xx set's newest display build is r4, but its Linux half is only in r3. asset("Turnip-r4-A8xx.zip", "r4", false, DriverPairs.BANNER_A8XX), asset("Turnip-r3-A8xx-Linux.zip", "r3", true, DriverPairs.BANNER_A8XX), asset("WN-Turnip-1.19-b_Axxx.zip", "v1.19", false, DriverPairs.WN_BALANCED), diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/GpuDetectionTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/GpuDetectionTest.kt new file mode 100644 index 0000000000..6d64307e3f --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/GpuDetectionTest.kt @@ -0,0 +1,80 @@ +package com.droiddeck.launcher.gpu + +import com.droiddeck.launcher.gpu.GpuInfo.Family +import com.droiddeck.launcher.gpu.GpuInfo.Support +import org.junit.Assert.assertEquals +import org.junit.Test + +class GpuDetectionTest { + private fun info(adreno: Boolean, model: Int) = + GpuInfo(name = "x", model = model, family = GpuInfo.familyOf(adreno, model), soc = "", oneUi8Gen2 = false) + + @Test fun modelIsTheFirstThreeDigitsOfWhateverTheKernelOrVulkanReports() { + assertEquals(650, GpuInfo.threeDigits("Adreno650")) + assertEquals(830, GpuInfo.threeDigits("Adreno (TM) 830")) + assertEquals(740, GpuInfo.threeDigits("Adreno740v2")) + assertEquals(618, GpuInfo.threeDigits(" adreno 618 ")) + assertEquals(750, GpuInfo.threeDigits("Adreno (TM) 750 (Qualcomm)")) + assertEquals(0, GpuInfo.threeDigits("")) + assertEquals(0, GpuInfo.threeDigits(" ")) + assertEquals(0, GpuInfo.threeDigits("Adreno")) + assertEquals(0, GpuInfo.threeDigits("Adreno 65")) + } + + @Test fun nonAdrenoRenderersAreNeverAdrenoWhateverNumberTheyCarry() { + // Xclipse (Exynos), Mali and Immortalis names; familyOf ignores the number off Adreno. + assertEquals(Family.NOT_ADRENO, GpuInfo.familyOf(false, 0)) + assertEquals(Family.NOT_ADRENO, GpuInfo.familyOf(false, GpuInfo.threeDigits("Samsung Xclipse 920"))) + assertEquals(Family.NOT_ADRENO, GpuInfo.familyOf(false, GpuInfo.threeDigits("Xclipse 940"))) + assertEquals(Family.NOT_ADRENO, GpuInfo.familyOf(false, GpuInfo.threeDigits("Mali-G720-Immortalis MC12"))) + assertEquals(Family.NOT_ADRENO, GpuInfo.familyOf(false, GpuInfo.threeDigits("Mali-G715"))) + assertEquals(Family.NOT_ADRENO, GpuInfo.familyOf(false, 830)) + } + + @Test fun familyBoundaries() { + assertEquals(Family.ADRENO_UNKNOWN, GpuInfo.familyOf(true, 0)) + assertEquals(Family.ADRENO_UNKNOWN, GpuInfo.familyOf(true, 540)) + assertEquals(Family.ADRENO_UNKNOWN, GpuInfo.familyOf(true, 599)) + for (m in listOf(600, 618, 619, 640, 650, 660, 690)) assertEquals("$m", Family.A6XX, GpuInfo.familyOf(true, m)) + for (m in listOf(710, 720, 722)) assertEquals("$m", Family.A7XX_LOW, GpuInfo.familyOf(true, m)) + for (m in listOf(700, 702, 725, 730, 740, 750, 780)) assertEquals("$m", Family.A7XX, GpuInfo.familyOf(true, m)) + for (m in listOf(800, 825, 829, 830, 840, 999)) assertEquals("$m", Family.A8XX, GpuInfo.familyOf(true, m)) + } + + @Test fun supportTiers() { + assertEquals(Support.TESTED, info(true, 650).support) + assertEquals(Support.UNTESTED, info(true, 640).support) + assertEquals(Support.UNTESTED, info(true, 618).support) + assertEquals(Support.UNTESTED, info(true, 660).support) + assertEquals(Support.UNTESTED, info(true, 720).support) + assertEquals(Support.UNTESTED, info(true, 722).support) + assertEquals(Support.UNTESTED, info(true, 0).support) + assertEquals(Support.TESTED, info(true, 725).support) + assertEquals(Support.TESTED, info(true, 740).support) + assertEquals(Support.TESTED, info(true, 750).support) + assertEquals(Support.TESTED, info(true, 830).support) + assertEquals(Support.UNSUPPORTED, info(false, 0).support) + assertEquals(Support.UNSUPPORTED, info(false, 830).support) + } + + @Test fun userFacingTextPerTier() { + assertEquals("Supported", info(true, 830).supportText) + assertEquals("Experimental: its drivers are test builds", info(true, 720).supportText) + assertEquals("Outside tested hardware (Adreno 650, 725 and newer): it may not run", info(true, 618).supportText) + assertEquals("Not supported: DroidDeck needs an Adreno (Snapdragon) GPU", info(false, 0).supportText) + assertEquals("Not an Adreno GPU", Family.NOT_ADRENO.label) + assertEquals("Adreno 8xx", Family.A8XX.label) + } + + @Test fun platformCodeNamesIncludingCaseAndUnknowns() { + assertEquals(640, GpuInfo.platformModel("msmnile")) + assertEquals(650, GpuInfo.platformModel("kona")) + assertEquals(660, GpuInfo.platformModel("LAHAINA")) + assertEquals(730, GpuInfo.platformModel("taro")) + assertEquals(730, GpuInfo.platformModel("cape")) + assertEquals(830, GpuInfo.platformModel("Sun")) + assertEquals(0, GpuInfo.platformModel("")) + assertEquals(0, GpuInfo.platformModel("exynos2400")) + assertEquals(0, GpuInfo.platformModel(" kona ")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/GpuModelFallbackTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/GpuModelFallbackTest.kt index 10a0fd971d..0ce3bdc6cd 100644 --- a/app/src/test/java/com/droiddeck/launcher/gpu/GpuModelFallbackTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/gpu/GpuModelFallbackTest.kt @@ -5,7 +5,6 @@ import org.junit.Test class GpuModelFallbackTest { @Test fun aPlatformCodeNameGivesItsAdreno() { - // AYANEO's Pocket FIT: KGSL says "Adreno33v2", the platform says pineapple. assertEquals(750, GpuInfo.platformModel("pineapple")) assertEquals(740, GpuInfo.platformModel("KALAMA")) assertEquals(830, GpuInfo.platformModel("sun")) diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/SocNamesTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/SocNamesTest.kt index d90e261d05..8919b79a7c 100644 --- a/app/src/test/java/com/droiddeck/launcher/gpu/SocNamesTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/gpu/SocNamesTest.kt @@ -8,7 +8,6 @@ class SocNamesTest { private fun props(vararg pairs: Pair<String, String>): (String) -> String = { pairs.toMap()[it].orEmpty() } @Test fun theModelIsFoundWhereVendorsPutIt() { - // AYANEO Pocket FIT: ro.soc.model blank, the vendor property set, ro.fota.platform a branch name. assertEquals("SG8350P", SocNames.model(props("ro.vendor.qti.soc_model" to "SG8350P", "ro.fota.platform" to "MSM_13.0"))) assertEquals("QCS8550", SocNames.model(props("ro.soc.model" to "QCS8550", "ro.vendor.qti.soc_model" to "other"))) assertEquals("", SocNames.model(props("ro.fota.platform" to "MSM_13.0"))) diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrDeviceLossLogTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrDeviceLossLogTest.kt new file mode 100644 index 0000000000..e54564dbab --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrDeviceLossLogTest.kt @@ -0,0 +1,72 @@ +package com.droiddeck.launcher.gpu + +import org.junit.Assert.* +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import java.io.File + +class SteamVrDeviceLossLogTest { + @get:Rule val temp = TemporaryFolder() + + @Test fun oldErrorsAreIgnoredButFreshSplitLinesAreDetected() { + val file = temp.newFile().apply { writeText("old vkerror=-4\n") } + val log = SteamVrDeviceLossLog(file) + assertFalse(log.poll()) + file.appendText("WaitForAcquire timed out\nFailed GetDeltas(Compositor): vkerror=") + assertFalse(log.poll()) + file.appendText("-4\n") + assertTrue(log.poll()) + assertTrue(log.poll()) // Keep pending until the activity is foreground. + } + + @Test fun onlyExplicitDeviceLossTriggersRecovery() { + assertTrue(SteamVrDeviceLossLog.isDeviceLoss("Failed GetDeltas: vkerror=-4\n")) + assertTrue(SteamVrDeviceLossLog.isDeviceLoss("Submit returned VK_ERROR_DEVICE_LOST\n")) + for (text in listOf("vkerror=-40", "vkerror=-1", "headset taken off", "WaitForAcquire timed out", + "Unexpected failure when checking for timeline signal", "Failed to submit to queue")) { + assertFalse(text, SteamVrDeviceLossLog.isDeviceLoss(text)) + } + } + + @Test fun handlesMissingLogCreationAndTruncation() { + val file = File(temp.root, "vrcompositor.txt") + val log = SteamVrDeviceLossLog(file) + assertFalse(log.poll()) + file.writeText("healthy line\n".repeat(100)) + assertFalse(log.poll()) + file.writeText("vkerror=-4\n") + assertTrue(log.poll()) + } + + @Test fun detectsReplacementEvenWhenNewFileIsLargerThanTheOldOffset() { + val file = temp.newFile().apply { writeText("old\n".repeat(50)) } + val log = SteamVrDeviceLossLog(file) + assertTrue(file.renameTo(File(temp.root, "previous.txt"))) + file.writeText("VK_ERROR_DEVICE_LOST\n" + "new\n".repeat(100)) + assertTrue(log.poll()) + } + + @Test fun scansBoundedTailOfRapidlyGrowingFaultLogs() { + val file = temp.newFile() + val log = SteamVrDeviceLossLog(file) + file.writeText("ordinary line\n".repeat(100_000) + "vkerror=-4\n") + assertTrue(log.poll()) + } + + @Test fun catchesTruncateAndRegrowBetweenPollsWithoutAnInodeChange() { + val file = temp.newFile().apply { writeText("previous run\n".repeat(100)) } + val log = SteamVrDeviceLossLog(file) + file.writeText("new run vkerror=-4\n" + "new output\n".repeat(200)) + assertTrue(log.poll()) + } + + @Test fun cooldownSurvivesRepeatedFailuresAndClockRollback() { + val now = 1_000_000L + assertTrue(SteamVrRecoveryPolicy.canRestartAutomatically(0, now)) + assertFalse(SteamVrRecoveryPolicy.canRestartAutomatically(now, now)) + assertFalse(SteamVrRecoveryPolicy.canRestartAutomatically(now, now - 1)) + assertFalse(SteamVrRecoveryPolicy.canRestartAutomatically(now, now + 599_999)) + assertTrue(SteamVrRecoveryPolicy.canRestartAutomatically(now, now + 600_000)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrLaunchTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrLaunchTest.kt new file mode 100644 index 0000000000..b097ba263f --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrLaunchTest.kt @@ -0,0 +1,50 @@ +package com.droiddeck.launcher.gpu + +import org.junit.Assert.* +import org.junit.Test + +class SteamVrLaunchTest { + @Test fun manualRequestKeepsPollingWithoutGlassesControlOrCardboard() { + for (status in listOf(null, SteamVr.Status.READY, SteamVr.Status.UNAVAILABLE, SteamVr.Status.RUNNING)) { + assertTrue(SteamVr.shouldPoll(status, false, false, false, true)) + } + } + + @Test fun observedActivityIsPolledUntilItStopsEvenWithoutARequest() { + assertTrue(SteamVr.shouldPoll(SteamVr.Status.RUNNING, false, false, false, false)) + assertTrue(SteamVr.shouldPoll(SteamVr.Status.INSTALLING, false, false, false, false)) + assertFalse(SteamVr.shouldPoll(SteamVr.Status.READY, false, false, false, false)) + assertFalse(SteamVr.shouldPoll(null, false, false, false, false)) + } + + @Test fun explicitPlayRequestStartsWhenRuntimeIsReadyWithoutWaitingForGlassesControlOrOutput() { + assertEquals("start", action(SteamVr.Status.READY)) + } + + @Test fun pendingRequestWaitsForGuestAndLoadingThenStarts() { + assertNull(action(SteamVr.Status.UNAVAILABLE)) + assertNull(action(SteamVr.Status.READY, loading = true)) + assertEquals("start", action(SteamVr.Status.READY)) + } + + @Test fun missingRuntimeIsInstalledOnceAndThenStarted() { + assertEquals("install", action(SteamVr.Status.NOT_INSTALLED)) + assertNull(action(SteamVr.Status.NOT_INSTALLED, installTried = true)) + assertNull(action(SteamVr.Status.INSTALLING, installTried = true)) + assertEquals("start", action(SteamVr.Status.READY, installTried = true)) + } + + @Test fun runningRuntimeOrAttemptedStartDoesNotLaunchAnotherInstance() { + assertNull(action(SteamVr.Status.RUNNING)) + assertNull(action(SteamVr.Status.READY, startTried = true)) + } + + @Test fun ordinarySessionsAndCancelledRequestsDoNotAutostart() { + assertNull(SteamVr.autoAction(SteamVr.Status.READY, false, false, true, false, false)) + assertNull(SteamVr.autoAction(SteamVr.Status.READY, true, false, false, false, false)) + } + + private fun action(status: SteamVr.Status, loading: Boolean = false, + startTried: Boolean = false, installTried: Boolean = false) = + SteamVr.autoAction(status, true, loading, true, startTried, installTried) +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrRecoverySettingsTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrRecoverySettingsTest.kt new file mode 100644 index 0000000000..1f14a9ef79 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrRecoverySettingsTest.kt @@ -0,0 +1,52 @@ +package com.droiddeck.launcher.gpu + +import org.json.JSONObject +import org.junit.Assert.* +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class SteamVrRecoverySettingsTest { + @get:Rule val temp = TemporaryFolder() + + @Test fun recoveryUnblocksOnlyOurHeadsetAndKeepsUserSettings() { + val file = temp.newFile().apply { writeText("""{ + "driver_droiddeck":{"blocked_by_safe_mode":true,"other":42}, + "driver_other":{"blocked_by_safe_mode":true}, + "steamvr":{"enableSafeMode":true,"environmentMode":0}, + "GpuSpeed":{"gpuSpeed0":450} + }""") } + assertTrue(SteamVrRecoverySettings.unblockHeadset(file)) + val after = JSONObject(file.readText()) + assertFalse(after.getJSONObject("driver_droiddeck").getBoolean("blocked_by_safe_mode")) + assertEquals(42, after.getJSONObject("driver_droiddeck").getInt("other")) + assertTrue(after.getJSONObject("driver_other").getBoolean("blocked_by_safe_mode")) + assertTrue(after.getJSONObject("steamvr").getBoolean("enableSafeMode")) + assertEquals(0, after.getJSONObject("steamvr").getInt("environmentMode")) + assertEquals(450, after.getJSONObject("GpuSpeed").getInt("gpuSpeed0")) + val unchanged = file.readText() + assertFalse(SteamVrRecoverySettings.unblockHeadset(file)) + assertEquals(unchanged, file.readText()) + } + + @Test fun missingOrUnblockedConfigIsNotRewritten() { + assertFalse(SteamVrRecoverySettings.unblockHeadset(File(temp.root, "missing"))) + for (text in listOf("{}", "{\"driver_droiddeck\":{\"blocked_by_safe_mode\":false}}")) { + val file = temp.newFile().apply { writeText(text) } + assertFalse(SteamVrRecoverySettings.unblockHeadset(file)) + assertEquals(text, file.readText()) + } + } + + @Test fun malformedConfigIsPreservedAndRecoveryFailsInsteadOfReplacingIt() { + val file = temp.newFile().apply { writeText("broken JSON") } + assertTrue(runCatching { SteamVrRecoverySettings.unblockHeadset(file) }.isFailure) + assertEquals("broken JSON", file.readText()) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrRecoveryTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrRecoveryTest.kt new file mode 100644 index 0000000000..8407df8f86 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrRecoveryTest.kt @@ -0,0 +1,84 @@ +package com.droiddeck.launcher.gpu + +import android.app.Activity +import android.content.Context +import android.os.Looper +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import org.robolectric.shadows.ShadowAlertDialog +import java.time.Duration + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +@LooperMode(LooperMode.Mode.PAUSED) +class SteamVrRecoveryTest { + private lateinit var activity: Activity + + @Before fun setup() { + activity = Robolectric.buildActivity(Activity::class.java).setup().get() + activity.getSharedPreferences(SteamVrRecovery.PREFS, Context.MODE_PRIVATE).edit().clear().commit() + } + + @Test fun countdownLaunchesPrivateRestartActivityAndPersistsLoopGuard() { + val recovery = SteamVrRecovery(activity) { true } + recovery.detected() + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(7)) + assertNull(shadowOf(activity).nextStartedActivity) + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(1)) + assertEquals(SteamVrRestartActivity::class.java.name, shadowOf(activity).nextStartedActivity.component?.className) + assertTrue(activity.getSharedPreferences(SteamVrRecovery.PREFS, Context.MODE_PRIVATE) + .getLong(SteamVrRecovery.LAST_ATTEMPT, 0) > 0) + recovery.close() + } + + @Test fun cancellationPreventsRestartAndRepeatedPrompts() { + val recovery = SteamVrRecovery(activity) { true } + recovery.detected() + ShadowAlertDialog.getLatestAlertDialog().getButton(android.app.AlertDialog.BUTTON_NEGATIVE).performClick() + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(20)) + recovery.detected() + assertNull(shadowOf(activity).nextStartedActivity) + assertFalse(ShadowAlertDialog.getLatestAlertDialog().isShowing) + } + + @Test fun recentRecoveryDoesNotAutomaticallyRestartAgain() { + activity.getSharedPreferences(SteamVrRecovery.PREFS, Context.MODE_PRIVATE).edit() + .putLong(SteamVrRecovery.LAST_ATTEMPT, System.currentTimeMillis()).commit() + val recovery = SteamVrRecovery(activity) { true } + recovery.detected() + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(20)) + assertNull(shadowOf(activity).nextStartedActivity) + assertTrue(ShadowAlertDialog.getLatestAlertDialog().isShowing) + val outside = android.view.MotionEvent.obtain(0, 0, android.view.MotionEvent.ACTION_OUTSIDE, -10f, -10f, 0) + try { + assertFalse(ShadowAlertDialog.getLatestAlertDialog().onTouchEvent(outside)) + assertTrue(ShadowAlertDialog.getLatestAlertDialog().isShowing) + } finally { outside.recycle() } + recovery.close() + } + + @Test fun backgroundingCancelsTheCountdownUntilTheSessionReturns() { + var foreground = true + val recovery = SteamVrRecovery(activity) { foreground } + recovery.detected() + foreground = false + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(20)) + assertNull(shadowOf(activity).nextStartedActivity) + assertFalse(ShadowAlertDialog.getLatestAlertDialog().isShowing) + recovery.detected() + assertFalse(ShadowAlertDialog.getLatestAlertDialog().isShowing) + foreground = true + recovery.detected() + assertTrue(ShadowAlertDialog.getLatestAlertDialog().isShowing) + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(8)) + assertEquals(SteamVrRestartActivity::class.java.name, shadowOf(activity).nextStartedActivity.component?.className) + recovery.close() + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrShutdownTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrShutdownTest.kt new file mode 100644 index 0000000000..2e4f58c294 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/SteamVrShutdownTest.kt @@ -0,0 +1,55 @@ +package com.droiddeck.launcher.gpu + +import com.droiddeck.launcher.gpu.SteamVrRecoveryPolicy.Shutdown +import org.json.JSONObject +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class SteamVrShutdownTest { + private var clock = 0L + + private fun session(phase: String, logs: Boolean = true, collected: Boolean = false) = + JSONObject().put("phase", phase).put("artifactsAvailable", logs).put("artifactsComplete", collected) + + private fun await(state: (Long) -> JSONObject?) = + SteamVrRecoveryPolicy.awaitShutdown({ state(clock) }, { clock }, { clock += it }) + + @Test fun waitsForTheLogsOnceTheSessionHasStopped() { + val result = await { t -> + when { + t < 4_000 -> session("STOPPING") + t < 24_000 -> session("IDLE") + else -> session("IDLE", collected = true) + } + } + assertEquals(Shutdown.COMPLETE, result) + assertEquals(24_000L, clock) + } + + @Test fun aStuckTeardownGivesUpAfterTheStopDeadline() { + assertEquals(Shutdown.STUCK, await { session("STOPPING") }) + assertEquals(SteamVrRecoveryPolicy.STOP_MS, clock) + } + + @Test fun slowLogCollectionIsBounded() { + assertEquals(Shutdown.LOGS_PENDING, await { if (it < 2_000) null else session("FAILED") }) + assertEquals(2_000L + SteamVrRecoveryPolicy.LOGS_MS, clock) + } + + @Test fun aSessionWithoutLogsNeedsNoWait() { + assertEquals(Shutdown.COMPLETE, await { session("IDLE", logs = false) }) + assertEquals(0L, clock) + } + + @Test fun unreadableStateIsRetriedUntilTheDeadline() { + var reads = 0 + assertEquals(Shutdown.STUCK, await { reads++; null }) + assertTrue(reads > 1) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/TpUbwcHintTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/TpUbwcHintTest.kt new file mode 100644 index 0000000000..ab037e1525 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/TpUbwcHintTest.kt @@ -0,0 +1,25 @@ +package com.droiddeck.launcher.gpu + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test + +class TpUbwcHintTest { + @Test fun a740OnABlobV6xxTurnsTheHintOff() { + assertEquals("enable_tp_ubwc_flag_hint=0", TpUbwcHint.features(740, "512.676.53")) + } + + @Test fun a740OnANewerBlobTurnsTheHintOn() { + assertEquals("enable_tp_ubwc_flag_hint=1", TpUbwcHint.features(740, "512.762.10")) + } + + @Test fun otherGpusKeepTheirDriverDefault() { + assertNull(TpUbwcHint.features(750, "512.762.10")) + assertNull(TpUbwcHint.features(830, "512.676.53")) + } + + @Test fun anUnreadableSystemDriverKeepsTheDriverDefault() { + assertNull(TpUbwcHint.features(740, null)) + assertNull(TpUbwcHint.features(740, "garbage")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/gpu/TurnipDriverAutoTest.kt b/app/src/test/java/com/droiddeck/launcher/gpu/TurnipDriverAutoTest.kt new file mode 100644 index 0000000000..b15e19630c --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/gpu/TurnipDriverAutoTest.kt @@ -0,0 +1,33 @@ +package com.droiddeck.launcher.gpu + +import com.droiddeck.launcher.session.QuestExperimental +import org.junit.Assert.assertEquals +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import org.robolectric.shadows.ShadowBuild + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class TurnipDriverAutoTest { + @Before fun reset() { + ShadowBuild.setModel("Phone") + ShadowBuild.setDevice("phone") + } + + @Test fun questModelsUseTheirPatchedDriverAsTheFallback() { + val driver = TurnipDriver(RuntimeEnvironment.getApplication()) + for (model in listOf("Quest 3", "Quest 3S", "Quest 2")) { + ShadowBuild.setModel(model) + assertEquals(if (model == "Quest 2") QuestExperimental.DRIVER_A6XX else QuestExperimental.DRIVER, + driver.autoId()) + } + } + + @Test fun otherDevicesRetainTheGenericFallback() { + assertEquals("turnip25.1.0", TurnipDriver(RuntimeEnvironment.getApplication()).autoId()) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/handtracking/BodyPoseTest.kt b/app/src/test/java/com/droiddeck/launcher/handtracking/BodyPoseTest.kt new file mode 100644 index 0000000000..154f5dde41 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/handtracking/BodyPoseTest.kt @@ -0,0 +1,165 @@ +package com.droiddeck.launcher.handtracking + +import com.droiddeck.launcher.glasses.Vec3 +import kotlin.math.PI +import kotlin.math.abs +import kotlin.math.cos +import kotlin.math.sin +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test + +class BodyPoseTest { + private val k = Intrinsics(800f, 800f, 480f, 360f, 960, 720) + private val body = mapOf( + BodyPose.NOSE to Vec3(0f, 0.62f, 0.10f), + BodyPose.LEFT_EYE to Vec3(0.035f, 0.66f, 0.08f), BodyPose.RIGHT_EYE to Vec3(-0.035f, 0.66f, 0.08f), + BodyPose.LEFT_EAR to Vec3(0.075f, 0.64f, 0f), BodyPose.RIGHT_EAR to Vec3(-0.075f, 0.64f, 0f), + BodyPose.LEFT_SHOULDER to Vec3(0.19f, 0.48f, 0f), BodyPose.RIGHT_SHOULDER to Vec3(-0.19f, 0.48f, 0f), + BodyPose.LEFT_ELBOW to Vec3(0.3f, 0.3f, 0.1f), BodyPose.RIGHT_ELBOW to Vec3(-0.28f, 0.25f, 0.05f), + BodyPose.LEFT_WRIST to Vec3(0.35f, 0.45f, 0.35f), BodyPose.RIGHT_WRIST to Vec3(-0.25f, 0.6f, 0.3f), + BodyPose.LEFT_PINKY to Vec3(0.37f, 0.47f, 0.42f), BodyPose.RIGHT_PINKY to Vec3(-0.27f, 0.63f, 0.37f), + BodyPose.LEFT_INDEX to Vec3(0.34f, 0.5f, 0.43f), BodyPose.RIGHT_INDEX to Vec3(-0.24f, 0.66f, 0.37f), + BodyPose.LEFT_HIP to Vec3(0.1f, 0f, 0f), BodyPose.RIGHT_HIP to Vec3(-0.1f, 0f, 0f), + ) + private val hips = Vec3(0.1f, -0.3f, -2.2f) + + @Test fun handsComeOutRelativeToTheEyesInALevelFrame() { + val frame = solve(turn = 0.0, pitch = 0.0)!! + assertTrue(frame.seen) + assertEquals(2.2f, frame.distance, 1e-3f) + for (side in 0..1) assertClose(expectedHand(side, 0.0), frame.hands[side]!!) + assertEquals(PI, abs(frame.faceYaw!!.toDouble()), 1e-4) + } + + @Test fun aCameraPointingDownStillGivesLevelHands() { + for (pitch in listOf(-0.25, 0.1, 0.15)) { + val frame = solve(turn = 0.0, pitch = pitch)!! + for (side in 0..1) assertClose(expectedHand(side, 0.0), frame.hands[side]!!) + } + } + + @Test fun aTurnedPersonGivesTheirFaceHeading() { + for (turn in listOf(-0.6, 0.4)) { + val frame = solve(turn = turn, pitch = 0.1)!! + assertEquals(wrap(PI + turn), wrap(frame.faceYaw!!.toDouble()), 1e-3) + for (side in 0..1) assertClose(expectedHand(side, turn), frame.hands[side]!!) + } + } + + @Test fun shoulderSpanIsAShareOfTheImageWidth() { + val frame = solve(turn = 0.0, pitch = 0.0)!! + assertEquals(800f * 0.38f / 2.2f / 960f, frame.shoulderSpan, 1e-3f) + } + + @Test fun anUnseenWristLeavesThatHandOut() { + val frame = solve(turn = 0.0, pitch = 0.0, hidden = setOf(BodyPose.RIGHT_WRIST))!! + assertNotNull(frame.hands[0]) + assertNull(frame.hands[1]) + } + + @Test fun tooLittleOfThePersonOrAnUnlevelableCameraGivesNothing() { + assertNull(solve(turn = 0.0, pitch = 0.0, hidden = body.keys - setOf(BodyPose.NOSE, BodyPose.LEFT_EYE, BodyPose.RIGHT_EYE))) + assertNull(solve(turn = 0.0, pitch = PI / 2)) + } + + @Test fun aHandModelFixIsPlacedByTheHandsOwnSize() { + val palmAt = Vec3(0.15f, 0.1f, 0.6f) + val shape = List(BodyPose.HAND_POINTS) { i -> WorldPoint(((i * 37) % 11 - 5) * 0.01f, ((i * 53) % 13 - 6) * 0.01f, ((i * 29) % 7 - 3) * 0.01f) } + val points = FloatArray(BodyPose.HAND_POINTS * 2) { j -> + val w = shape[j / 2] + val x = palmAt.x + w.x + val y = palmAt.y + w.y + val z = palmAt.z + w.z + if (j % 2 == 0) k.fx * x / z + k.cx else k.fy * y / z + k.cy + } + val fix = BodyPose.handFix(points, shape, k)!! + val palm = intArrayOf(0, 5, 9, 13, 17) + val expectedPalm = Vec3(palmAt.x + palm.map { shape[it].x }.average().toFloat(), palmAt.y + palm.map { shape[it].y }.average().toFloat(), + palmAt.z + palm.map { shape[it].z }.average().toFloat()) + assertClose(expectedPalm, fix.palm) + val frame = solve(turn = 0.0, pitch = 0.0, fixes = arrayOf(fix, null))!! + val eyes = toCamera(hips + (body[BodyPose.LEFT_EYE]!! + body[BodyPose.RIGHT_EYE]!!) * 0.5f) + val d = fix.palm - eyes + assertClose(Vec3(d.x, -d.y, -d.z), frame.hands[0]!!) + assertNull("no fix and no held depth leaves the hand out", frame.hands[1]) + assertTrue(!frame.estimated[0]) + val joints = frame.joints[0]!! + val mean = Vec3(palm.map { shape[it].x }.average().toFloat(), palm.map { shape[it].y }.average().toFloat(), + palm.map { shape[it].z }.average().toFloat()) + for (i in 0 until BodyPose.HAND_POINTS) { + assertClose(Vec3(shape[i].x - mean.x, -(shape[i].y - mean.y), -(shape[i].z - mean.z)), + Vec3(joints[i * 3], joints[i * 3 + 1], joints[i * 3 + 2])) + } + assertNull(frame.joints[1]) + } + + @Test fun aHandTheModelMissedKeepsItsLastDepth() { + val frame = solve(turn = 0.0, pitch = 0.0, fixes = arrayOfNulls(2), held = floatArrayOf(Float.NaN, 1.8f))!! + assertNull(frame.hands[0]) + assertTrue(frame.estimated[1]) + assertNull("a guessed hand has no finger joints", frame.joints[1]) + val eyes = toCamera(hips + (body[BodyPose.LEFT_EYE]!! + body[BodyPose.RIGHT_EYE]!!) * 0.5f) + assertEquals(-(1.8f - eyes.z), frame.hands[1]!!.z, 1e-3f) + } + + @Test fun jointsNearTheEdgeOfThePictureShowAsLittleRoom() { + val frame = solve(turn = 0.0, pitch = 0.0)!! + assertTrue(frame.edgeRoom > 0.05f && frame.edgeRoom < 0.5f) + val near = solve(turn = 0.0, pitch = 0.0, shift = 0.75f)!! + assertTrue("${near.edgeRoom}", near.edgeRoom < frame.edgeRoom) + } + + private fun solve(turn: Double, pitch: Double, hidden: Set<Int> = emptySet(), fixes: Array<HandFix?>? = null, + held: FloatArray? = null, shift: Float = 0f): BodyFrame? { + val image = ArrayList<Landmark>() + val world = ArrayList<WorldPoint>() + for (i in 0 until 33) { + val rel = body[i]?.let { rotateY(it, turn) } + if (rel == null) { + image += Landmark(0.5f, 0.5f, 0f) + world += WorldPoint(0f, 0f, 0f) + continue + } + val camera = tilt(toCamera(hips + rel), pitch) + image += Landmark((k.fx * (camera.x + shift) / camera.z + k.cx) / k.width, (k.fy * camera.y / camera.z + k.cy) / k.height, + if (i in hidden) 0.1f else 0.95f) + val w = tilt(toCamera(rel), pitch) + world += WorldPoint(w.x, w.y, w.z) + } + val up = tilt(toCamera(Vec3(0f, 1f, 0f)), pitch) + return BodyPose.solve(image, world, k, CameraLevel(up), fixes, held) + } + + private fun expectedHand(side: Int, turn: Double): Vec3 { + val (wrist, pinky, index) = if (side == 0) Triple(BodyPose.LEFT_WRIST, BodyPose.LEFT_PINKY, BodyPose.LEFT_INDEX) + else Triple(BodyPose.RIGHT_WRIST, BodyPose.RIGHT_PINKY, BodyPose.RIGHT_INDEX) + val grip = (rotateY(body[wrist]!!, turn) + rotateY(body[pinky]!!, turn) + rotateY(body[index]!!, turn)) * (1f / 3f) + val head = (rotateY(body[BodyPose.LEFT_EYE]!!, turn) + rotateY(body[BodyPose.RIGHT_EYE]!!, turn)) * 0.5f + return grip - head + } + + private fun toCamera(v: Vec3) = Vec3(v.x, -v.y, -v.z) + + private fun tilt(v: Vec3, pitch: Double): Vec3 { + val c = cos(pitch).toFloat() + val s = sin(pitch).toFloat() + return Vec3(v.x, v.y * c - v.z * s, v.y * s + v.z * c) + } + + private fun rotateY(v: Vec3, angle: Double): Vec3 { + val c = cos(angle).toFloat() + val s = sin(angle).toFloat() + return Vec3(c * v.x + s * v.z, v.y, -s * v.x + c * v.z) + } + + private fun wrap(a: Double): Double = Math.IEEEremainder(a, 2 * PI) + + private fun assertClose(want: Vec3, got: Vec3) { + assertEquals("x", want.x, got.x, 2e-4f) + assertEquals("y", want.y, got.y, 2e-4f) + assertEquals("z", want.z, got.z, 2e-4f) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/handtracking/HandCameraShmTest.kt b/app/src/test/java/com/droiddeck/launcher/handtracking/HandCameraShmTest.kt new file mode 100644 index 0000000000..fd7fcfa981 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/handtracking/HandCameraShmTest.kt @@ -0,0 +1,92 @@ +package com.droiddeck.launcher.handtracking + +import com.droiddeck.launcher.glasses.Vec3 +import java.io.File +import java.nio.ByteBuffer +import java.nio.ByteOrder +import java.nio.file.Files +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull +import org.junit.Before +import org.junit.Test + +class HandCameraShmTest { + private lateinit var dir: File + private lateinit var file: File + private var fences = 0 + + @Before fun setUp() { + dir = Files.createTempDirectory("handcam-shm").toFile() + file = File(dir, "run/${HandCameraShm.FILE}") + } + + @After fun tearDown() { dir.deleteRecursively() } + + @Test fun anOpenedFileCarriesTheHeaderAndNothingSeen() { + assertNotNull(HandCameraShm.open(file) { fences++ }) + val bytes = read() + assertEquals(HandCameraShm.SIZE, bytes.capacity()) + assertEquals(568, HandCameraShm.SIZE) + assertEquals(0x4D434844, bytes.getInt(0)) + assertEquals(2, bytes.getInt(4)) + assertEquals(2, bytes.getInt(8)) + for (at in 12 until HandCameraShm.SIZE step 4) assertEquals("byte $at", 0, bytes.getInt(at)) + assertEquals(2, fences) + } + + @Test fun aFrameLandsWhereTheDriverReadsIt() { + val shm = HandCameraShm.open(file) { fences++ }!! + shm.write(123_456_789_012L, BodyFrame(arrayOf(Vec3(0.2f, -0.45f, -0.3f), null), 2.5f, 1.8f, 0.2f, true)) + val bytes = read() + assertEquals(4, bytes.getInt(8)) + assertEquals(3, bytes.getInt(12)) + assertEquals(123_456_789_012L, bytes.getLong(16)) + assertEquals(1, bytes.getInt(24)) + assertEquals(2.5f, bytes.getFloat(28), 0f) + assertEquals(1, bytes.getInt(32)) + assertEquals(0.2f, bytes.getFloat(36), 0f) + assertEquals(-0.45f, bytes.getFloat(40), 0f) + assertEquals(-0.3f, bytes.getFloat(44), 0f) + assertEquals(0f, bytes.getFloat(48), 0f) + assertEquals(0, bytes.getInt(300)) + assertEquals(0f, bytes.getFloat(304), 0f) + } + + @Test fun fingerJointsAndTheBareHandsFlagLandWhereTheDriverReadsThem() { + val shm = HandCameraShm.open(file) { fences++ }!! + val joints = FloatArray(BodyPose.HAND_POINTS * 3) { it * 0.001f - 0.03f } + shm.write(7L, BodyFrame(arrayOf(null, Vec3(0.1f, -0.4f, -0.35f)), 0f, 2f, 0.2f, true, joints = arrayOf(null, joints)), bareHands = true) + val bytes = read() + assertEquals(1 or 2 or 4, bytes.getInt(12)) + assertEquals(0, bytes.getInt(32)) + assertEquals(1 or 4, bytes.getInt(300)) + assertEquals(0.1f, bytes.getFloat(304), 0f) + for (i in joints.indices) assertEquals("joint float $i", joints[i], bytes.getFloat(316 + i * 4), 0f) + assertEquals(HandCameraShm.SIZE, 316 + joints.size * 4) + } + + @Test fun aFrameWithoutAPersonOnlySaysTheCameraRuns() { + val shm = HandCameraShm.open(file) { fences++ }!! + shm.write(5L, BodyFrame(arrayOf(Vec3(1f, 1f, 1f), Vec3(1f, 1f, 1f)), null, 2f, 0.2f, true)) + shm.write(6L, null) + val bytes = read() + assertEquals(1, bytes.getInt(12)) + assertEquals(6L, bytes.getLong(16)) + assertEquals(2, bytes.getInt(24)) + assertEquals(0, bytes.getInt(32)) + assertEquals(0, bytes.getInt(300)) + } + + @Test fun closingClearsTheFrame() { + val shm = HandCameraShm.open(file) { fences++ }!! + shm.write(5L, BodyFrame(arrayOf(Vec3(1f, 1f, 1f), null), 0f, 2f, 0.2f, true)) + shm.close() + val bytes = read() + assertEquals(0x4D434844, bytes.getInt(0)) + assertEquals(0, bytes.getInt(8) and 1) + for (at in 12 until HandCameraShm.SIZE step 4) assertEquals("byte $at", 0, bytes.getInt(at)) + } + + private fun read(): ByteBuffer = ByteBuffer.wrap(file.readBytes()).order(ByteOrder.LITTLE_ENDIAN) +} diff --git a/app/src/test/java/com/droiddeck/launcher/handtracking/HandTrackingTest.kt b/app/src/test/java/com/droiddeck/launcher/handtracking/HandTrackingTest.kt new file mode 100644 index 0000000000..3456857d7a --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/handtracking/HandTrackingTest.kt @@ -0,0 +1,57 @@ +package com.droiddeck.launcher.handtracking + +import android.Manifest +import android.app.Application +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33], application = Application::class) +class HandTrackingTest { + private val both = HandTracking.Settings(sides = setOf(TrackingCameras.REAR, TrackingCameras.FRONT)) + + @Test fun theQuestionComesOnceWhenAHeadsetConnects() { + assertTrue(HandTracking.shouldAsk(both, headset = true)) + assertFalse(HandTracking.shouldAsk(both, headset = false)) + assertFalse(HandTracking.shouldAsk(both.copy(asked = true), headset = true)) + assertFalse(HandTracking.shouldAsk(HandTracking.Settings(), headset = true)) + } + + @Test fun answersAreRemembered() { + val context = RuntimeEnvironment.getApplication() + HandTracking.allow(context, TrackingCameras.FRONT) + var s = HandTracking.load(context) + assertTrue(s.asked) + assertTrue(s.enabled) + assertEquals(TrackingCameras.FRONT, s.side) + assertFalse(s.permitted) + HandTracking.allow(context, null) + assertEquals(TrackingCameras.FRONT, HandTracking.load(context).side) + HandTracking.decline(context) + s = HandTracking.load(context) + assertTrue(s.asked) + assertFalse(s.enabled) + HandTracking.setEnabled(context, true) + HandTracking.setSide(context, TrackingCameras.REAR) + s = HandTracking.load(context) + assertTrue(s.enabled) + assertEquals(TrackingCameras.REAR, s.side) + } + + @Test fun trackingNeedsThePermissionAndACamera() { + val context = RuntimeEnvironment.getApplication() + assertFalse(both.copy(enabled = true).ready) + assertTrue(both.copy(enabled = true, permitted = true).ready) + assertFalse(HandTracking.Settings(enabled = true, permitted = true).ready) + shadowOf(context).grantPermissions(Manifest.permission.CAMERA) + HandTracking.refreshPermission(context) + assertTrue(HandTracking.settings.value.permitted) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/handtracking/PlacementAdviceTest.kt b/app/src/test/java/com/droiddeck/launcher/handtracking/PlacementAdviceTest.kt new file mode 100644 index 0000000000..ad31149efa --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/handtracking/PlacementAdviceTest.kt @@ -0,0 +1,31 @@ +package com.droiddeck.launcher.handtracking + +import com.droiddeck.launcher.glasses.Vec3 +import org.junit.Assert.assertEquals +import org.junit.Test + +class PlacementAdviceTest { + private val hand = Vec3(0.2f, -0.4f, -0.3f) + private fun body(span: Float = 0.2f, left: Vec3? = hand, right: Vec3? = hand, seen: Boolean = true, room: Float = 0.2f) = + BodyFrame(arrayOf(left, right), 3f, 2f, span, seen, edgeRoom = room) + + @Test fun aFlatOrTiltedDeviceIsFixedFirst() { + assertEquals(Advice.STAND_UP, PlacementAdvice.of(Placement.FACE_UP, body())) + assertEquals(Advice.STAND_UP, PlacementAdvice.of(Placement.FACE_DOWN, body())) + assertEquals(Advice.UPRIGHT, PlacementAdvice.of(Placement.POINTS_UP, null)) + assertEquals(Advice.UPRIGHT, PlacementAdvice.of(Placement.POINTS_DOWN, body())) + } + + @Test fun thenThePersonDistanceAndHands() { + assertEquals(Advice.NOT_SEEN, PlacementAdvice.of(Placement.STANDING, null)) + assertEquals(Advice.NOT_SEEN, PlacementAdvice.of(Placement.STANDING, body(seen = false))) + assertEquals(Advice.MOVE_BACK, PlacementAdvice.of(Placement.STANDING, body(span = 0.5f))) + assertEquals("a person 0.65 m from a wide camera is too close", Advice.MOVE_BACK, PlacementAdvice.of(Placement.STANDING, body(span = 0.3f))) + assertEquals("hands at the edge of the picture", Advice.MOVE_BACK, PlacementAdvice.of(Placement.STANDING, body(room = 0.02f))) + assertEquals(Advice.MOVE_CLOSER, PlacementAdvice.of(Placement.STANDING, body(span = 0.05f))) + assertEquals(Advice.MOVE_CLOSER, PlacementAdvice.of(Placement.STANDING, body(span = 0.1f))) + assertEquals(Advice.SHOW_HANDS, PlacementAdvice.of(Placement.STANDING, body(right = null))) + assertEquals(Advice.GOOD, PlacementAdvice.of(Placement.STANDING, body())) + assertEquals(Advice.GOOD, PlacementAdvice.of(Placement.UNKNOWN, body())) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/handtracking/TrackingCamerasTest.kt b/app/src/test/java/com/droiddeck/launcher/handtracking/TrackingCamerasTest.kt new file mode 100644 index 0000000000..b3a6ba54df --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/handtracking/TrackingCamerasTest.kt @@ -0,0 +1,92 @@ +package com.droiddeck.launcher.handtracking + +import com.droiddeck.launcher.glasses.Vec3 +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertSame +import org.junit.Test + +class TrackingCamerasTest { + private val wide = TrackingCamera("0", front = false, orientation = 90, focalPixels = 3000f, activeWidth = 4000, activeHeight = 3000, minZoom = 1f, realtime = true) + private val ultra = TrackingCamera("2", front = false, orientation = 90, focalPixels = 1000f, activeWidth = 4000, activeHeight = 3000, minZoom = 1f, realtime = true) + private val selfie = TrackingCamera("1", front = true, orientation = 270, focalPixels = 2000f, activeWidth = 4000, activeHeight = 3000, minZoom = 1f, realtime = true) + + @Test fun theBackCameraIsPreferredAndTheWidestBackLensWins() { + assertSame(ultra, TrackingCameras.pick(listOf(selfie, wide, ultra), null)) + assertSame(ultra, TrackingCameras.pick(listOf(selfie, wide, ultra), TrackingCameras.REAR)) + assertSame(selfie, TrackingCameras.pick(listOf(selfie, wide, ultra), TrackingCameras.FRONT)) + } + + @Test fun aMissingSideFallsBackToWhatTheDeviceHas() { + assertSame(wide, TrackingCameras.pick(listOf(wide), TrackingCameras.FRONT)) + assertSame(selfie, TrackingCameras.pick(listOf(selfie), null)) + assertNull(TrackingCameras.pick(emptyList(), null)) + assertEquals(setOf(TrackingCameras.REAR), TrackingCameras.sides(listOf(wide, ultra))) + assertEquals(setOf(TrackingCameras.FRONT, TrackingCameras.REAR), TrackingCameras.sides(listOf(selfie, wide))) + } + + @Test fun theCameraIsHeldAtItsFastestSteadyFrameRate() { + val front = listOf(10 to 10, 15 to 15, 10 to 24, 24 to 24, 10 to 30, 30 to 30) + assertEquals(30 to 30, TrackingCameras.steadyFps(front)) + assertEquals(24 to 24, TrackingCameras.steadyFps(listOf(15 to 15, 10 to 30, 24 to 24, 60 to 60))) + assertEquals(15 to 30, TrackingCameras.steadyFps(listOf(7 to 30, 15 to 30))) + assertNull(TrackingCameras.steadyFps(emptyList())) + } + + @Test fun zoomingOutOnlyHappensWhenTheLensAllowsIt() { + assertEquals(1f, wide.zoom(), 0f) + val logical = TrackingCamera("0", false, 90, 3000f, 4000, 3000, minZoom = 0.6f, realtime = true) + assertEquals(0.6f, logical.zoom(), 1e-6f) + val roomy = TrackingCamera("0", false, 90, 3000f, 4000, 3000, minZoom = 0.3f, realtime = true) + assertEquals((Math.tan(Math.toRadians(logical.fovDegrees / 2.0)) / Math.tan(Math.toRadians(50.0))).toFloat(), roomy.zoom(), 1e-5f) + assertEquals(100f, Math.toDegrees(2 * Math.atan(Math.tan(Math.toRadians(roomy.fovDegrees / 2.0)) / roomy.zoom())).toFloat(), 1e-3f) + } + + @Test fun intrinsicsFollowTheBufferZoomAndTurns() { + val k = wide.intrinsics(960, 720, 1f, 0) + assertEquals(720f, k.fx, 1e-3f) + assertEquals(480f, k.cx, 0f) + assertEquals(360f, k.cy, 0f) + val turned = wide.intrinsics(960, 720, 1f, 1) + assertEquals(720, turned.width) + assertEquals(960, turned.height) + assertEquals(360f, turned.cx, 0f) + assertEquals(360f, wide.intrinsics(960, 720, 0.5f, 0).fx, 1e-3f) + } + + @Test fun framesAreTurnedUprightFromGravity() { + val portrait = Vec3(0f, 9.8f, 0f) + assertEquals(1, CameraGeometry.uprightTurns(false, 90, portrait)) + assertEquals(3, CameraGeometry.uprightTurns(true, 270, portrait)) + assertEquals(0, CameraGeometry.uprightTurns(false, 0, portrait)) + val landscape = Vec3(9.8f, 0f, 0f) + assertEquals(0, CameraGeometry.uprightTurns(false, 90, landscape)) + assertEquals(0, CameraGeometry.uprightTurns(true, 270, landscape)) + assertEquals(2, CameraGeometry.uprightTurns(false, 90, Vec3(-9.8f, 0f, 0f))) + for ((front, orientation) in listOf(false to 90, true to 270, false to 270, true to 90)) { + for (up in listOf(portrait, landscape, Vec3(0f, -9.8f, 0f), Vec3(-9.8f, 0f, 0f))) { + val turns = CameraGeometry.uprightTurns(front, orientation, up) + val seen = CameraGeometry.upInCamera(front, orientation, turns, up) + assertEquals("front=$front $orientation° up=$up", -1f, seen.y, 1e-5f) + } + } + } + + @Test fun theCameraLooksOutOfItsOwnSide() { + val back = CameraGeometry.upInCamera(false, 90, 1, Vec3(0f, 0f, -9.8f)) + assertEquals(1f, back.z, 1e-5f) + val front = CameraGeometry.upInCamera(true, 270, 3, Vec3(0f, 0f, 9.8f)) + assertEquals(1f, front.z, 1e-5f) + } + + @Test fun placementTellsFlatFromStandingAndTilted() { + assertEquals(Placement.FACE_UP, CameraGeometry.placement(false, Vec3(0f, 0.5f, 9.7f))) + assertEquals(Placement.FACE_DOWN, CameraGeometry.placement(true, Vec3(0f, 0.5f, -9.7f))) + assertEquals(Placement.STANDING, CameraGeometry.placement(false, Vec3(0f, 9.8f, 0f))) + assertEquals(Placement.STANDING, CameraGeometry.placement(true, Vec3(9.2f, 0f, 3f))) + val leanBack = Vec3(0f, Math.cos(Math.toRadians(60.0)).toFloat(), -Math.sin(Math.toRadians(60.0)).toFloat()) + assertEquals(Placement.POINTS_UP, CameraGeometry.placement(false, leanBack)) + assertEquals(Placement.POINTS_DOWN, CameraGeometry.placement(true, leanBack)) + assertEquals(Placement.UNKNOWN, CameraGeometry.placement(false, Vec3(0f, 0f, 0f))) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/FakeInputRingPathTest.kt b/app/src/test/java/com/droiddeck/launcher/input/FakeInputRingPathTest.kt index d1d2b8d490..e0199e6cad 100644 --- a/app/src/test/java/com/droiddeck/launcher/input/FakeInputRingPathTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/input/FakeInputRingPathTest.kt @@ -7,12 +7,6 @@ import org.junit.Assert.* import org.junit.Before import org.junit.Test -/** - * The ring paths handed to the guest (FAKE_EVDEV_MEMFD_PATHS) must keep the spelling the session - * tree is bound under. On ColorOS 16 /data/user/0 resolves to /data/data, the guest only has the - * first bound, and a canonical export left every pad dead (#166). A symlinked directory stands in - * for that here. - */ class FakeInputRingPathTest { private lateinit var base: File private lateinit var real: File @@ -37,7 +31,6 @@ class FakeInputRingPathTest { @Test fun theExportKeepsTheBoundSpellingThroughALinkedDataDirectory() { val fakeInputDir = File(link, "files/session/dev/input").apply { mkdirs() } val ring = FakeInputRingPaths.ringFile(fakeInputDir, 0)!!.apply { parentFile!!.mkdirs(); writeText("") } - // The link really does resolve elsewhere, as /data/user/0 does on the affected devices. assertTrue(ring.canonicalPath.startsWith(real.canonicalPath + "/")) val exported = FakeInputRingPaths.exportPath(ring) assertEquals(File(link, "files/session/dev/fakeinput-rings/ring0").path, exported) diff --git a/app/src/test/java/com/droiddeck/launcher/input/JoyConMotionTest.kt b/app/src/test/java/com/droiddeck/launcher/input/JoyConMotionTest.kt new file mode 100644 index 0000000000..1ba5c23b03 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/JoyConMotionTest.kt @@ -0,0 +1,153 @@ +package com.droiddeck.launcher.input + +import com.droiddeck.launcher.glasses.Quaternion +import com.droiddeck.launcher.glasses.Vec3 +import kotlin.math.PI +import kotlin.math.roundToInt +import org.junit.Assert.* +import org.junit.Test + +class JoyConMotionTest { + private val bias = Vec3(0.3f, -0.25f, 0.2f) + + @Test fun restingInSeveralPositionsLearnsTheAccelerometerOffset() { + val calibration = JoyConAccelCalibration() + assertFalse(calibration.ready) + var learned = false + for (up in directions) repeat(200) { learned = calibration.addResting(up * G + bias) || learned } + assertTrue(learned) + assertTrue(calibration.ready) + assertVec(bias, calibration.bias, 0.01f) + assertEquals(1f, calibration.scale, 1e-3f) + assertVec(Vec3(0f, G, 0f), calibration.correct(Vec3(0f, G, 0f) + bias), 0.01f) + } + + @Test fun restingInOnePositionTeachesNothing() { + val calibration = JoyConAccelCalibration() + repeat(2000) { assertFalse(calibration.addResting(Vec3(0f, G, 0f) + bias)) } + assertFalse(calibration.ready) + assertVec(Vec3(1f, 2f, 3f), calibration.correct(Vec3(1f, 2f, 3f))) + } + + @Test fun aSavedOffsetComesBackAndAnImplausibleOneIsIgnored() { + val first = JoyConAccelCalibration() + for (up in directions) repeat(200) { first.addResting(up * G + bias) } + val restored = JoyConAccelCalibration().apply { restore(first.saved()) } + assertTrue(restored.ready) + assertVec(first.bias, restored.bias, 0f) + assertEquals(first.scale, restored.scale, 0f) + for (bad in listOf(floatArrayOf(3f, 0f, 0f, 1f), floatArrayOf(0f, 0f, 0f, 1.5f), floatArrayOf(Float.NaN, 0f, 0f, 1f), floatArrayOf(0f, 0f, 1f))) { + val c = JoyConAccelCalibration().apply { restore(bad) } + assertFalse(bad.contentToString(), c.ready) + assertNull(c.saved()) + } + } + + @Test fun aLiftIsMeasuredAndTheHandStopsWhenItDoes() { + val motion = JoyConMotion() + still(motion, 1f) + val lift = 0.25f + val seconds = 0.5f + val steps = (seconds / DT).roundToInt() + for (i in 1..steps) { + val s = (i - 0.5f) / steps + val a = lift / (seconds * seconds) * (60 * s - 180 * s * s + 120 * s * s * s) + motion.update(Quaternion.IDENTITY, Vec3(0f, G + a, 0f), Vec3(0f, 0f, 0f), true, DT) + } + assertEquals(lift, motion.displacement.y, 0.01f) + assertTrue("moving up at ${motion.velocity}", motion.velocity.length() < 0.05f) + still(motion, 2f) + assertEquals(lift, motion.displacement.y, 0.015f) + assertEquals(0f, motion.velocity.length(), 1e-3f) + assertEquals(0f, motion.displacement.x, 1e-3f) + assertEquals(0f, motion.displacement.z, 1e-3f) + } + + @Test fun theInertialVelocityKeepsAccelerationThatStillnessWouldDrop() { + val motion = JoyConMotion() + still(motion, 1f) + repeat((2f / DT).roundToInt()) { motion.update(Quaternion.IDENTITY, Vec3(0f, G + 0.05f, 0f), Vec3(0f, 0f, 0f), true, DT) } + assertEquals(0f, motion.velocity.y, 1e-3f) + assertEquals(0.1f, motion.inertial.y, 0.005f) + val before = motion.inertial.y + val seconds = 0.25f + repeat((seconds / DT).roundToInt()) { motion.update(Quaternion.IDENTITY, Vec3(2f, G, 0f), Vec3(0f, 0f, 0f), true, DT) } + assertEquals(2f * seconds, motion.inertial.x, 0.01f) + assertEquals(before, motion.inertial.y, 0.005f) + } + + @Test fun aSidewaysPushIsMeasuredInTheWorldFrame() { + val motion = JoyConMotion() + val turned = Quaternion.fromAxisAngle(Vec3(0f, 0f, 1f), (PI / 2).toFloat()) + val down = turned.conjugate().rotate(Vec3(0f, G, 0f)) + repeat((1f / DT).toInt()) { motion.update(turned, down, Vec3(0f, 0f, 0f), true, DT) } + val steps = (0.4f / DT).roundToInt() + for (i in 1..steps) { + val s = (i - 0.5f) / steps + val a = 0.3f / (0.4f * 0.4f) * (60 * s - 180 * s * s + 120 * s * s * s) + motion.update(turned, down + turned.conjugate().rotate(Vec3(a, 0f, 0f)), Vec3(0f, 0f, 0f), true, DT) + } + assertEquals(0.3f, motion.displacement.x, 0.015f) + assertEquals(0f, motion.displacement.y, 0.01f) + } + + @Test fun turningInPlaceDoesNotMoveTheHand() { + val motion = JoyConMotion() + still(motion, 1f) + val rate = 2f + var q = Quaternion.IDENTITY + repeat((1f / DT).toInt()) { + q = q.integrateBodyRate(Vec3(0f, 0f, rate), DT).normalized() + motion.update(q, q.conjugate().rotate(Vec3(0f, G, 0f)), Vec3(0f, 0f, rate), true, DT) + } + repeat((1f / DT).toInt()) { motion.update(q, q.conjugate().rotate(Vec3(0f, G, 0f)), Vec3(0f, 0f, 0f), true, DT) } + assertEquals(0f, motion.displacement.length(), 0.005f) + } + + @Test fun anUncalibratedJoyConAtRestDoesNotDrift() { + val motion = JoyConMotion() + val filter = JoyConOrientation() + val tilted = Vec3(0.3f, G + 0.35f, -0.2f) + repeat((30f / DT).toInt()) { + filter.update(tilted, Vec3(0f, 0f, 0f), DT) + if (filter.ready) motion.update(filter.rotation, tilted, filter.rate, false, DT) + } + assertTrue("drifted ${motion.displacement}", motion.displacement.length() < 0.05f) + assertEquals(0f, motion.velocity.length(), 1e-3f) + } + + @Test fun longHandlingWithATiltErrorCannotRunAway() { + val motion = JoyConMotion() + still(motion, 1f) + val leaking = Vec3(0.5f, G, 0f) + repeat((10f / DT).toInt()) { motion.update(Quaternion.IDENTITY, leaking, Vec3(0f, 0f, 1f), true, DT) } + assertTrue("velocity ${motion.velocity}", motion.velocity.length() < 0.15f) + assertTrue("moved ${motion.displacement}", motion.displacement.length() < 1.5f) + } + + @Test fun onlyAStillJoyConCountsAsResting() { + val motion = JoyConMotion() + still(motion, 0.2f) + assertFalse(motion.resting) + still(motion, 0.2f) + assertTrue(motion.resting) + motion.update(Quaternion.IDENTITY, Vec3(0f, G, 0f), Vec3(0.3f, 0f, 0f), true, DT) + assertFalse(motion.resting) + } + + private fun still(motion: JoyConMotion, seconds: Float) { + repeat((seconds / DT).toInt()) { motion.update(Quaternion.IDENTITY, Vec3(0f, G, 0f), Vec3(0f, 0f, 0f), true, DT) } + } + + private fun assertVec(want: Vec3, got: Vec3, tolerance: Float = 1e-4f) { + assertEquals("x of $got", want.x, got.x, tolerance) + assertEquals("y of $got", want.y, got.y, tolerance) + assertEquals("z of $got", want.z, got.z, tolerance) + } + + private companion object { + const val G = 9.80665f + const val DT = 0.005f + val directions = listOf(Vec3(0f, 1f, 0f), Vec3(0f, -1f, 0f), Vec3(1f, 0f, 0f), Vec3(-1f, 0f, 0f), Vec3(0f, 0f, 1f), Vec3(0f, 0f, -1f)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/JoyConOrientationTest.kt b/app/src/test/java/com/droiddeck/launcher/input/JoyConOrientationTest.kt new file mode 100644 index 0000000000..5500316484 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/JoyConOrientationTest.kt @@ -0,0 +1,117 @@ +package com.droiddeck.launcher.input + +import com.droiddeck.launcher.glasses.Vec3 +import kotlin.math.atan2 +import kotlin.math.cos +import kotlin.math.sin +import org.junit.Assert.* +import org.junit.Test + +class JoyConOrientationTest { + private val faceUp = floatArrayOf(0f, 0f, G) + private val still = floatArrayOf(0f, 0f, 0f) + + @Test fun aJoyConLyingFaceUpPointsStraightAhead() { + val filter = JoyConOrientation() + filter.update(faceUp, still, 0f) + assertTrue(filter.ready) + assertVec(Vec3(0f, 0f, -1f), forward(filter)) + assertVec(Vec3(0f, 1f, 0f), filter.rotation.rotate(Vec3(0f, 1f, 0f))) + } + + @Test fun standingOnItsBaseAimsUp() { + val filter = JoyConOrientation() + filter.update(floatArrayOf(G, 0f, 0f), still, 0f) + assertVec(Vec3(0f, 1f, 0f), forward(filter)) + } + + @Test fun nothingIsReportedUntilGravityIsPlausible() { + val filter = JoyConOrientation() + filter.update(floatArrayOf(0f, 0f, 3f), still, 0f) + assertFalse(filter.ready) + filter.update(floatArrayOf(0f, 0f, 30f), still, 0f) + assertFalse(filter.ready) + filter.update(faceUp, still, 0f) + assertTrue(filter.ready) + } + + @Test fun turningAboutTheFaceTurnsTheAimLeft() { + val filter = JoyConOrientation() + filter.update(faceUp, still, 0f) + repeat(100) { filter.update(faceUp, floatArrayOf(0f, 0f, 1f), 0.01f) } + assertVec(Vec3(-sin(1f), 0f, -cos(1f)), forward(filter), 2e-3f) + assertVec(Vec3(0f, 1f, 0f), filter.rate) + } + + @Test fun gravityPullsATiltedEstimateBackLevel() { + val filter = JoyConOrientation() + filter.update(faceUp, still, 0f) + repeat(50) { filter.update(faceUp, floatArrayOf(1f, 0f, 0f), 0.01f) } + assertTrue(filter.rotation.rotate(Vec3(0f, 1f, 0f)).y < 0.97f) + repeat(600) { filter.update(faceUp, still, 0.01f) } + assertEquals(1f, filter.rotation.rotate(Vec3(0f, 1f, 0f)).y, 1e-3f) + } + + @Test fun aSteadyGyroOffsetIsLearnedWhileTheJoyConRests() { + val filter = JoyConOrientation() + filter.update(faceUp, still, 0f) + val drifting = floatArrayOf(0f, 0f, 0.02f) + repeat(1000) { filter.update(faceUp, drifting, 0.01f) } + assertEquals(0f, filter.rate.length(), 1e-3f) + val heading = heading(filter) + repeat(1000) { filter.update(faceUp, drifting, 0.01f) } + assertEquals(heading, heading(filter), 2e-3f) + } + + @Test fun movingTheJoyConDoesNotTeachTheBias() { + val filter = JoyConOrientation() + filter.update(faceUp, still, 0f) + repeat(300) { filter.update(faceUp, floatArrayOf(0f, 0f, 0.5f), 0.01f) } + assertEquals(0.5f, filter.rate.length(), 1e-4f) + } + + @Test fun reportsArriveNewestFirstAndTheRepeatedSampleIsDropped() { + val reports = JoyConReports() + fun sample(n: Int) = floatArrayOf(n.toFloat(), 0f, G) to floatArrayOf(n * 0.1f, 0f, 0f) + fun send(at: Long, vararg newestFirst: Int): List<JoyConReports.Sample> { + for (n in newestFirst) sample(n).let { reports.add(it.first, it.second, at) } + return reports.flush() + } + assertEquals(listOf(1f, 2f, 3f), send(1_000_000_000L, 3, 2, 1).map { it.accel[0] }) + val second = send(1_010_000_000L, 5, 4, 3) + assertEquals(listOf(4f, 5f), second.map { it.accel[0] }) + assertEquals("the report interval is shared by its new samples", 0.005f, second[0].dt, 1e-6f) + assertEquals(listOf(6f, 7f, 8f), send(1_025_000_000L, 8, 7, 6).map { it.accel[0] }) + val still = send(1_035_000_000L, 8, 8, 8) + assertEquals("a still report still moves time on", 1, still.size) + assertEquals(0.01f, still[0].dt, 1e-6f) + assertEquals("a long gap is capped", 0.05f, send(2_000_000_000L, 11, 10, 9)[0].dt, 1e-6f) + } + + @Test fun reportsInOldestFirstOrderAreRecognised() { + val reports = JoyConReports() + var at = 1_000_000_000L + var next = 1 + val seen = ArrayList<Float>() + repeat(12) { + val samples = listOf(next - 1, next, next + 1).filter { it > 0 } + for (n in samples) reports.add(floatArrayOf(n.toFloat(), 0f, G), floatArrayOf(0f, 0f, 0f), at) + seen += reports.flush().map { it.accel[0] } + next += 2 + at += 10_000_000L + } + assertEquals((10..24).map { it.toFloat() }, seen.takeLast(15)) + } + + private fun forward(filter: JoyConOrientation) = filter.rotation.rotate(Vec3(0f, 0f, -1f)) + + private fun heading(filter: JoyConOrientation): Float = forward(filter).let { atan2(-it.x, -it.z) } + + private fun assertVec(want: Vec3, got: Vec3, tolerance: Float = 1e-4f) { + assertEquals("x of $got", want.x, got.x, tolerance) + assertEquals("y of $got", want.y, got.y, tolerance) + assertEquals("z of $got", want.z, got.z, tolerance) + } + + private companion object { const val G = 9.80665f } +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/JoyConPadTest.kt b/app/src/test/java/com/droiddeck/launcher/input/JoyConPadTest.kt new file mode 100644 index 0000000000..43f0a8d82a --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/JoyConPadTest.kt @@ -0,0 +1,213 @@ +package com.droiddeck.launcher.input + +import android.hardware.input.InputManager +import android.view.InputDevice +import android.view.KeyCharacterMap +import android.view.KeyEvent +import android.view.MotionEvent +import java.io.File +import java.nio.file.Files +import org.junit.After +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.Implementation +import org.robolectric.annotation.Implements +import org.robolectric.shadows.InputDeviceBuilder + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [34], manifest = Config.NONE, instrumentedPackages = ["com.droiddeck.launcher.input.FakeInputWriter"], + shadows = [PadBridgeRoutingTest.RegisteredKeyEvent::class, PadBridgeRoutingTest.RegisteredMotionEvent::class, + JoyConPadTest.RecordingWriter::class]) +class JoyConPadTest { + private lateinit var dir: File + private lateinit var bridge: PadBridge + private lateinit var left: InputDevice + private lateinit var right: InputDevice + + @Before fun setUp() { + RecordingWriter.pads.clear() + RecordingWriter.grips = 0 + dir = Files.createTempDirectory("joycon-pad").toFile() + bridge = PadBridge(dir) + left = joyCon(LEFT_PRODUCT, MotionEvent.AXIS_X, MotionEvent.AXIS_Y) + right = joyCon(RIGHT_PRODUCT, MotionEvent.AXIS_RX, MotionEvent.AXIS_RY) + } + + @After fun tearDown() { + bridge.stop() + dir.deleteRecursively() + } + + @Test fun twoJoyConsBecomeOnePlayerWithBothSticks() { + pair() + assertEquals(left.id, PadBridge.joyConForSlot(0, JoyCon.LEFT)) + assertEquals(right.id, PadBridge.joyConForSlot(0, JoyCon.RIGHT)) + assertTrue(press(left, KeyEvent.KEYCODE_UNKNOWN, 0x220)) + assertTrue(press(right, KeyEvent.KEYCODE_BUTTON_X, BTN_NORTH)) + assertTrue(pad(0).up) + assertTrue(pad(0).isDown(PadState.Y)) + assertTrue(bridge.onMotionEvent(motion(left, MotionEvent.AXIS_X to 0.75f, MotionEvent.AXIS_Y to -0.5f))) + assertTrue(bridge.onMotionEvent(motion(right, MotionEvent.AXIS_RX to -0.6f, MotionEvent.AXIS_X to 0f))) + assertEquals(0.75f, pad(0).leftX) + assertEquals(-0.5f, pad(0).leftY) + assertEquals(-0.6f, pad(0).rightX) + assertNull("a second player appeared", RecordingWriter.pads[1]) + assertEquals(PadBridge.NO_CONTROLLER, PadBridge.joyConForSlot(1, JoyCon.LEFT)) + } + + @Test fun railButtonsAreShouldersOnlyForALoneJoyCon() { + assertTrue(press(left, KeyEvent.KEYCODE_BUTTON_R1, BTN_TR)) + assertTrue(pad(0).isDown(PadState.RB)) + tap(right, KeyEvent.KEYCODE_BUTTON_A, BTN_SOUTH) + assertFalse("a rail button held while pairing stayed down", pad(0).isDown(PadState.RB)) + assertTrue(bridge.onKeyEvent(JoyCon.normalize(key(left, KeyEvent.KEYCODE_BUTTON_R1, BTN_TR, KeyEvent.ACTION_UP)))) + assertTrue(press(right, KeyEvent.KEYCODE_BUTTON_R1, BTN_TR)) + assertTrue(press(left, KeyEvent.KEYCODE_BUTTON_R1, BTN_TR)) + assertTrue(bridge.onKeyEvent(JoyCon.normalize(key(left, KeyEvent.KEYCODE_BUTTON_R1, BTN_TR, KeyEvent.ACTION_UP)))) + assertTrue("the left rail released the right shoulder", pad(0).isDown(PadState.RB)) + assertTrue(press(right, KeyEvent.KEYCODE_BUTTON_L1, BTN_TL)) + assertFalse(pad(0).isDown(PadState.LB)) + } + + @Test fun captureOnTheFirstPlayerIsTheLeftGripUntilPairingReleasesIt() { + assertTrue(press(left, KeyEvent.KEYCODE_BUTTON_Z, BTN_Z)) + assertEquals(DeckControls.L4, RecordingWriter.grips and DeckControls.L4) + tap(right, KeyEvent.KEYCODE_BUTTON_A, BTN_SOUTH) + assertEquals(0, RecordingWriter.grips) + } + + @Test fun whenOneJoyConLeavesTheOtherKeepsThePlayer() { + pair() + assertTrue(press(right, KeyEvent.KEYCODE_BUTTON_A, BTN_SOUTH)) + bridge.onDeviceRemoved(left.id) + assertEquals(PadBridge.NO_CONTROLLER, PadBridge.joyConForSlot(0, JoyCon.LEFT)) + assertEquals(PadBridge.NO_CONTROLLER, PadBridge.joyConForSlot(0, JoyCon.RIGHT)) + assertFalse("a held button survived the split", pad(0).isDown(PadState.A)) + assertEquals(right.id, PadBridge.controllerForSlot(0)) + tap(right, KeyEvent.KEYCODE_BUTTON_A, BTN_SOUTH) + assertNull(RecordingWriter.pads[1]) + val another = joyCon(LEFT_PRODUCT, MotionEvent.AXIS_X, MotionEvent.AXIS_Y) + tap(another, KeyEvent.KEYCODE_UNKNOWN, 0x221) + assertEquals(another.id, PadBridge.joyConForSlot(0, JoyCon.LEFT)) + assertEquals(right.id, PadBridge.joyConForSlot(0, JoyCon.RIGHT)) + bridge.onDeviceRemoved(right.id) + assertEquals(another.id, PadBridge.controllerForSlot(0)) + tap(another, KeyEvent.KEYCODE_UNKNOWN, 0x221) + assertNull(RecordingWriter.pads[1]) + } + + @Test fun aSecondPlayerCanBeAJoyConPair() { + val xbox = InputDeviceBuilder.newBuilder().setId(90).setName("pad").setDescriptor("pad-90").setExternal(true) + .setVendorId(0x045e).setProductId(0x0b13).setSources(InputDevice.SOURCE_GAMEPAD or InputDevice.SOURCE_JOYSTICK) + .setKeyboardType(InputDevice.KEYBOARD_TYPE_NON_ALPHABETIC) + .setKeyCharacterMap(KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD)).build() + register(xbox) + tap(xbox, KeyEvent.KEYCODE_BUTTON_A, 0x130) + pair() + assertEquals(left.id, PadBridge.joyConForSlot(1, JoyCon.LEFT)) + assertEquals(right.id, PadBridge.joyConForSlot(1, JoyCon.RIGHT)) + assertEquals(PadBridge.NO_CONTROLLER, PadBridge.joyConForSlot(0, JoyCon.LEFT)) + assertTrue(press(right, KeyEvent.KEYCODE_BUTTON_B, 0x131)) + assertTrue(pad(1).isDown(PadState.B)) + assertNull(RecordingWriter.pads[2]) + } + + @Test fun joyConsHeldForVrAreLeftAlone() { + bridge.setExcluded { it == left.id } + assertFalse(bridge.onKeyEvent(key(left, KeyEvent.KEYCODE_BUTTON_L1, BTN_TL))) + assertFalse(bridge.onMotionEvent(motion(left, MotionEvent.AXIS_X to 1f))) + bridge.syncConnectedControllers() + assertEquals(PadBridge.NO_CONTROLLER, PadBridge.joyConForSlot(0, JoyCon.LEFT)) + tap(right, KeyEvent.KEYCODE_BUTTON_A, BTN_SOUTH) + assertEquals(right.id, PadBridge.controllerForSlot(0)) + assertEquals(PadBridge.NO_CONTROLLER, PadBridge.joyConForSlot(0, JoyCon.RIGHT)) + bridge.setExcluded { false } + bridge.syncConnectedControllers() + assertEquals(left.id, PadBridge.joyConForSlot(0, JoyCon.LEFT)) + assertEquals(right.id, PadBridge.joyConForSlot(0, JoyCon.RIGHT)) + } + + private fun pair() { + tap(left, KeyEvent.KEYCODE_BUTTON_L1, BTN_TL) + tap(right, KeyEvent.KEYCODE_BUTTON_R1, BTN_TR) + } + + private fun pad(slot: Int): PadState = RecordingWriter.pads[slot] ?: PadState() + + private fun press(device: InputDevice, code: Int, scanCode: Int): Boolean = + bridge.onKeyEvent(JoyCon.normalize(key(device, code, scanCode))) + + private fun tap(device: InputDevice, code: Int, scanCode: Int) { + assertTrue(press(device, code, scanCode)) + assertTrue(bridge.onKeyEvent(JoyCon.normalize(key(device, code, scanCode, KeyEvent.ACTION_UP)))) + } + + private fun key(device: InputDevice, code: Int, scanCode: Int, action: Int = KeyEvent.ACTION_DOWN): KeyEvent { + val event = KeyEvent(0L, 0L, action, code, 0, 0, device.id, scanCode, 0, InputDevice.SOURCE_GAMEPAD) + assertSame(device, event.device) + return event + } + + private fun motion(device: InputDevice, vararg values: Pair<Int, Float>): MotionEvent { + val coords = MotionEvent.PointerCoords().apply { for ((axis, value) in values) setAxisValue(axis, value) } + return MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_MOVE, 1, arrayOf(MotionEvent.PointerProperties().apply { id = 0 }), + arrayOf(coords), 0, 0, 1f, 1f, device.id, 0, InputDevice.SOURCE_JOYSTICK, 0) + } + + private var nextId = 60 + + private fun joyCon(product: Int, vararg axes: Int): InputDevice { + val id = nextId++ + val builder = InputDeviceBuilder.newBuilder().setId(id).setName("Joy-Con $id").setDescriptor("joycon-$id") + .setExternal(true).setVendorId(NINTENDO).setProductId(product) + .setSources(InputDevice.SOURCE_GAMEPAD or InputDevice.SOURCE_JOYSTICK or InputDevice.SOURCE_KEYBOARD) + .setKeyboardType(InputDevice.KEYBOARD_TYPE_NON_ALPHABETIC) + .setKeyCharacterMap(KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD)) + for (axis in axes) builder.addMotionRange(axis, InputDevice.SOURCE_JOYSTICK, -1f, 1f, 0f, 0f, 0f) + return builder.build().also(::register) + } + + private fun register(device: InputDevice) { + val manager = RuntimeEnvironment.getApplication().getSystemService(InputManager::class.java) + shadowOf(manager).addInputDevice(device) + assertSame(device, InputDevice.getDevice(device.id)) + } + + private companion object { + const val NINTENDO = 0x057e + const val LEFT_PRODUCT = 0x2006 + const val RIGHT_PRODUCT = 0x2007 + const val BTN_SOUTH = 0x130 + const val BTN_NORTH = 0x133 + const val BTN_Z = 0x135 + const val BTN_TL = 0x136 + const val BTN_TR = 0x137 + } + + @Implements(FakeInputWriter::class) + class RecordingWriter { + private var slot = 0 + + @Implementation fun __constructor__(fakeInputPath: String, slot: Int) { this.slot = slot } + @Implementation fun open(): Boolean = true + @Implementation fun close() = Unit + @Implementation fun destroy() = Unit + @Implementation fun writePad(state: PadState) { pads[slot] = PadState().apply { copyFrom(state) } } + + companion object { + val pads = HashMap<Int, PadState>() + var grips = 0 + + @JvmStatic @Implementation fun __staticInitializer__() = Unit + + @JvmStatic @Implementation + fun writeDeckControls(slot: Int, controls: Int, pads: ShortArray, pressure: ShortArray) { grips = controls } + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/JoyConShmTest.kt b/app/src/test/java/com/droiddeck/launcher/input/JoyConShmTest.kt new file mode 100644 index 0000000000..f5c4b2377a --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/JoyConShmTest.kt @@ -0,0 +1,97 @@ +package com.droiddeck.launcher.input + +import com.droiddeck.launcher.glasses.Quaternion +import com.droiddeck.launcher.glasses.Vec3 +import java.io.File +import java.nio.ByteBuffer +import java.nio.ByteOrder +import java.nio.file.Files +import org.junit.After +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test + +class JoyConShmTest { + private lateinit var dir: File + private lateinit var file: File + private var fences = 0 + + @Before fun setUp() { + dir = Files.createTempDirectory("joycon-shm").toFile() + file = File(dir, "run/${JoyConShm.FILE}") + } + + @After fun tearDown() { dir.deleteRecursively() } + + @Test fun anOpenedFileCarriesTheHeaderAndNoHands() { + assertNotNull(JoyConShm.open(file) { fences++ }) + val bytes = read() + assertEquals(JoyConShm.SIZE, bytes.capacity()) + assertEquals(0x4E434A44, bytes.getInt(0)) + assertEquals(3, bytes.getInt(4)) + assertEquals(2, bytes.getInt(8)) + for (at in 16 until JoyConShm.SIZE step 4) assertEquals("byte $at", 0, bytes.getInt(at)) + assertEquals(2, fences) + } + + @Test fun aHandLandsWhereTheDriverReadsIt() { + val shm = JoyConShm.open(file) { fences++ }!! + shm.write(JoyCon.RIGHT, JoyConShm.Hand(connected = true, charging = true, + buttons = JoyCon.VR_TRIGGER or JoyCon.VR_A, rotation = Quaternion(0.5f, -0.5f, 0.25f, 0.75f), + rate = Vec3(1f, -2f, 3f), displacement = Vec3(0.1f, 0.2f, -0.3f), velocity = Vec3(-1.5f, 0.5f, 2f), inertial = Vec3(4f, -5f, 6f), stickX = 0.25f, stickY = -0.5f, battery = 0.75f, recenter = 3, timeNs = 1_234_567_890_123L)) + val bytes = read() + assertEquals(4, bytes.getInt(8)) + val at = 16 + 104 + assertEquals(3, bytes.getInt(at)) + assertEquals(JoyCon.VR_TRIGGER or JoyCon.VR_A, bytes.getInt(at + 4)) + assertArrayEquals(floatArrayOf(0.5f, -0.5f, 0.25f, 0.75f, 1f, -2f, 3f, 0.25f, -0.5f, 0.75f), + FloatArray(10) { bytes.getFloat(at + 8 + it * 4) }, 0f) + assertEquals(3, bytes.getInt(at + 48)) + assertEquals(1_234_567_890_123L, bytes.getLong(at + 56)) + assertArrayEquals(floatArrayOf(0.1f, 0.2f, -0.3f, -1.5f, 0.5f, 2f, 4f, -5f, 6f), FloatArray(9) { bytes.getFloat(at + 64 + it * 4) }, 0f) + assertEquals(224, JoyConShm.SIZE) + assertEquals("the left hand was touched", 0, bytes.getInt(16)) + assertEquals(4, fences) + } + + @Test fun closingDisconnectsBothHands() { + val shm = JoyConShm.open(file) {}!! + shm.write(JoyCon.LEFT, JoyConShm.Hand(connected = true)) + shm.write(JoyCon.RIGHT, JoyConShm.Hand(connected = true)) + shm.close() + val bytes = read() + assertEquals(0, bytes.getInt(16)) + assertEquals(0, bytes.getInt(16 + 104)) + assertEquals(0, bytes.getInt(8) and 1) + } + + @Test fun reopeningKeepsTheSequenceMovingForward() { + val first = JoyConShm.open(file) {}!! + first.write(JoyCon.LEFT, JoyConShm.Hand(connected = true)) + assertEquals(4, read().getInt(8)) + first.close() + val previous = read().getInt(8) + assertNotNull(JoyConShm.open(file) {}) + assertTrue(read().getInt(8) > previous) + java.io.RandomAccessFile(file, "rw").use { it.seek(8); it.write(byteArrayOf(7, 0, 0, 0)) } + JoyConShm.open(file) {}!! + val after = read().getInt(8) + assertEquals(0, after and 1) + assertTrue("$after after a torn write", after > 7) + } + + @Test fun anEmptyFileStartsANewSequence() { + file.parentFile!!.mkdirs() + file.outputStream().use { } + assertEquals(0L, file.length()) + assertNotNull(JoyConShm.open(file) {}) + assertEquals(2, read().getInt(8)) + } + + @Test fun anUnwritableLocationIsReportedAsMissing() { + val blocker = File(dir, "blocker").apply { writeText("") } + assertNull(JoyConShm.open(File(blocker, JoyConShm.FILE)) {}) + } + + private fun read(): ByteBuffer = ByteBuffer.wrap(file.readBytes()).order(ByteOrder.LITTLE_ENDIAN) +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/JoyConTest.kt b/app/src/test/java/com/droiddeck/launcher/input/JoyConTest.kt new file mode 100644 index 0000000000..a47d1c0c75 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/JoyConTest.kt @@ -0,0 +1,147 @@ +package com.droiddeck.launcher.input + +import android.hardware.input.InputManager +import android.view.InputDevice +import android.view.KeyCharacterMap +import android.view.KeyEvent +import android.view.MotionEvent +import org.junit.After +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.shadows.InputDeviceBuilder + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [34], manifest = Config.NONE, shadows = [PadBridgeRoutingTest.RegisteredKeyEvent::class]) +class JoyConTest { + @After fun clearVrHands() { JoyCon.clearVrDevices(this) } + + @Test fun onlyNintendoJoyConsHaveASide() { + assertEquals(JoyCon.LEFT, JoyCon.side(device(LEFT_PRODUCT))) + assertEquals(JoyCon.RIGHT, JoyCon.side(device(RIGHT_PRODUCT))) + assertEquals(-1, JoyCon.side(device(PRO_CONTROLLER))) + assertEquals(-1, JoyCon.side(device(LEFT_PRODUCT, vendor = 0x045e))) + assertEquals(-1, JoyCon.side(null)) + } + + @Test fun theRightJoyConFaceButtonsKeepTheirPositions() { + val right = device(RIGHT_PRODUCT) + assertEquals(KeyEvent.KEYCODE_BUTTON_Y, JoyCon.normalize(key(right, KeyEvent.KEYCODE_BUTTON_X, BTN_NORTH)).keyCode) + assertEquals(KeyEvent.KEYCODE_BUTTON_X, JoyCon.normalize(key(right, KeyEvent.KEYCODE_BUTTON_Y, BTN_WEST)).keyCode) + val south = key(right, KeyEvent.KEYCODE_BUTTON_A, BTN_SOUTH) + assertSame(south, JoyCon.normalize(south)) + val remapped = JoyCon.normalize(key(right, KeyEvent.KEYCODE_BUTTON_X, BTN_NORTH, KeyEvent.ACTION_UP)) + assertEquals(KeyEvent.ACTION_UP, remapped.action) + assertEquals(right.id, remapped.deviceId) + assertEquals(BTN_NORTH, remapped.scanCode) + assertEquals(InputDevice.SOURCE_GAMEPAD, remapped.source) + } + + @Test fun theLeftJoyConArrowsBecomeADpad() { + val left = device(LEFT_PRODUCT) + val arrows = mapOf(0x220 to KeyEvent.KEYCODE_DPAD_UP, 0x221 to KeyEvent.KEYCODE_DPAD_DOWN, + 0x222 to KeyEvent.KEYCODE_DPAD_LEFT, 0x223 to KeyEvent.KEYCODE_DPAD_RIGHT) + for ((scanCode, code) in arrows) { + assertEquals(code, JoyCon.normalize(key(left, KeyEvent.KEYCODE_UNKNOWN, scanCode)).keyCode) + } + } + + @Test fun railButtonsAndOtherPadsPassThroughUntouched() { + val left = device(LEFT_PRODUCT) + val right = device(RIGHT_PRODUCT) + for (event in listOf(key(left, KeyEvent.KEYCODE_BUTTON_R1, BTN_TR), key(left, KeyEvent.KEYCODE_BUTTON_R2, BTN_TR2), + key(right, KeyEvent.KEYCODE_BUTTON_L1, BTN_TL), key(right, KeyEvent.KEYCODE_BUTTON_L2, BTN_TL2), + key(device(PRO_CONTROLLER), KeyEvent.KEYCODE_BUTTON_X, BTN_NORTH))) { + assertSame(event, JoyCon.normalize(event)) + } + assertTrue(JoyCon.isRail(JoyCon.LEFT, BTN_TR)) + assertTrue(JoyCon.isRail(JoyCon.RIGHT, BTN_TL2)) + assertFalse(JoyCon.isRail(JoyCon.LEFT, BTN_TL)) + assertFalse(JoyCon.isRail(JoyCon.RIGHT, BTN_TR)) + assertFalse(JoyCon.isRail(-1, BTN_TR)) + } + + @Test fun eachJoyConReadsItsOwnStick() { + val left = device(LEFT_PRODUCT) + val right = device(RIGHT_PRODUCT, axes = intArrayOf(MotionEvent.AXIS_RX, MotionEvent.AXIS_RY)) + val oldRight = device(RIGHT_PRODUCT, axes = intArrayOf(MotionEvent.AXIS_Z, MotionEvent.AXIS_RZ)) + val source = InputDevice.SOURCE_JOYSTICK + assertArrayEquals(intArrayOf(MotionEvent.AXIS_X, MotionEvent.AXIS_Y), JoyCon.stickAxes(JoyCon.LEFT, left, source)) + assertArrayEquals(intArrayOf(MotionEvent.AXIS_RX, MotionEvent.AXIS_RY), JoyCon.stickAxes(JoyCon.RIGHT, right, source)) + assertArrayEquals(intArrayOf(MotionEvent.AXIS_Z, MotionEvent.AXIS_RZ), JoyCon.stickAxes(JoyCon.RIGHT, oldRight, source)) + } + + @Test fun vrButtonsFollowTheIndexLayoutOnEitherHand() { + val left = mapOf(BTN_TL2 to JoyCon.VR_TRIGGER, BTN_TL to JoyCon.VR_GRIP, BTN_TR to JoyCon.VR_GRIP, + BTN_TR2 to JoyCon.VR_GRIP, 0x221 to JoyCon.VR_A, 0x223 to JoyCon.VR_A, 0x220 to JoyCon.VR_B, + 0x222 to JoyCon.VR_B, BTN_SELECT to JoyCon.VR_B, BTN_THUMBL to JoyCon.VR_STICK, BTN_Z to JoyCon.VR_SYSTEM) + val right = mapOf(BTN_TR2 to JoyCon.VR_TRIGGER, BTN_TR to JoyCon.VR_GRIP, BTN_TL to JoyCon.VR_GRIP, + BTN_TL2 to JoyCon.VR_GRIP, BTN_SOUTH to JoyCon.VR_A, BTN_EAST to JoyCon.VR_A, BTN_NORTH to JoyCon.VR_B, + BTN_WEST to JoyCon.VR_B, BTN_START to JoyCon.VR_B, BTN_THUMBR to JoyCon.VR_STICK, BTN_MODE to JoyCon.VR_SYSTEM) + for ((scanCode, bit) in left) assertEquals("left 0x${scanCode.toString(16)}", bit, JoyCon.vrButton(JoyCon.LEFT, scanCode)) + for ((scanCode, bit) in right) assertEquals("right 0x${scanCode.toString(16)}", bit, JoyCon.vrButton(JoyCon.RIGHT, scanCode)) + assertEquals(0, JoyCon.vrButton(JoyCon.LEFT, BTN_SOUTH)) + assertEquals(0, JoyCon.vrButton(JoyCon.RIGHT, 0x220)) + assertEquals(0, JoyCon.vrButton(-1, BTN_TR2)) + } + + @Test fun vrRumbleSlotsNameTheHandsOfTheCurrentOwnerOnly() { + for (slot in listOf(0, 1, PadBridge.SLOTS, JoyCon.VR_RUMBLE_SLOT + 2)) assertNull(JoyCon.vrRumbleDevice(slot)) + assertEquals(PadBridge.NO_CONTROLLER, JoyCon.vrRumbleDevice(JoyCon.VR_RUMBLE_SLOT)) + JoyCon.setVrDevices(this, intArrayOf(31, 32)) + assertEquals(31, JoyCon.vrRumbleDevice(JoyCon.VR_RUMBLE_SLOT + JoyCon.LEFT)) + assertEquals(32, JoyCon.vrRumbleDevice(JoyCon.VR_RUMBLE_SLOT + JoyCon.RIGHT)) + JoyCon.clearVrDevices(Any()) + assertEquals(31, JoyCon.vrRumbleDevice(JoyCon.VR_RUMBLE_SLOT)) + JoyCon.clearVrDevices(this) + assertEquals(PadBridge.NO_CONTROLLER, JoyCon.vrRumbleDevice(JoyCon.VR_RUMBLE_SLOT)) + assertEquals(PadBridge.NO_CONTROLLER, JoyCon.vrRumbleDevice(JoyCon.VR_RUMBLE_SLOT + 1)) + } + + private var nextId = 40 + + private fun device(product: Int, vendor: Int = NINTENDO, axes: IntArray = intArrayOf(MotionEvent.AXIS_X, MotionEvent.AXIS_Y)): InputDevice { + val id = nextId++ + val builder = InputDeviceBuilder.newBuilder().setId(id).setName("Joy-Con fixture $id").setDescriptor("joycon-$id") + .setExternal(true).setVendorId(vendor).setProductId(product) + .setSources(InputDevice.SOURCE_GAMEPAD or InputDevice.SOURCE_JOYSTICK or InputDevice.SOURCE_KEYBOARD) + .setKeyboardType(InputDevice.KEYBOARD_TYPE_NON_ALPHABETIC) + .setKeyCharacterMap(KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD)) + for (axis in axes) builder.addMotionRange(axis, InputDevice.SOURCE_JOYSTICK, -1f, 1f, 0f, 0f, 0f) + val device = builder.build() + val manager = RuntimeEnvironment.getApplication().getSystemService(InputManager::class.java) + shadowOf(manager).addInputDevice(device) + return device + } + + private fun key(device: InputDevice, code: Int, scanCode: Int, action: Int = KeyEvent.ACTION_DOWN): KeyEvent { + val event = KeyEvent(0L, 0L, action, code, 0, 0, device.id, scanCode, 0, InputDevice.SOURCE_GAMEPAD) + assertSame(device, event.device) + return event + } + + private companion object { + const val NINTENDO = 0x057e + const val LEFT_PRODUCT = 0x2006 + const val RIGHT_PRODUCT = 0x2007 + const val PRO_CONTROLLER = 0x2009 + const val BTN_SOUTH = 0x130 + const val BTN_EAST = 0x131 + const val BTN_NORTH = 0x133 + const val BTN_WEST = 0x134 + const val BTN_Z = 0x135 + const val BTN_TL = 0x136 + const val BTN_TR = 0x137 + const val BTN_TL2 = 0x138 + const val BTN_TR2 = 0x139 + const val BTN_SELECT = 0x13a + const val BTN_START = 0x13b + const val BTN_MODE = 0x13c + const val BTN_THUMBL = 0x13d + const val BTN_THUMBR = 0x13e + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/KeyboardHostTest.kt b/app/src/test/java/com/droiddeck/launcher/input/KeyboardHostTest.kt new file mode 100644 index 0000000000..eff9197525 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/KeyboardHostTest.kt @@ -0,0 +1,55 @@ +package com.droiddeck.launcher.input + +import android.app.Activity +import android.content.Context +import android.os.Looper +import android.view.inputmethod.InputMethodManager +import android.widget.FrameLayout +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(manifest = Config.NONE) +class KeyboardHostTest { + private lateinit var imm: InputMethodManager + private lateinit var host: KeyboardHost + + @Before fun setUp() { + val activity = Robolectric.buildActivity(Activity::class.java).setup().get() + imm = activity.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager + host = KeyboardHost(activity) + activity.setContentView(FrameLayout(activity).apply { addView(host) }) + idle() + } + + @Config(sdk = [33]) + @Test fun toggleShowsAKeyboardTheSystemDismissed() { + host.show() + idle() + imm.hideSoftInputFromWindow(host.windowToken, 0) + idle() + host.toggle() + idle() + assertTrue(shadowOf(imm).isSoftInputVisible) + assertTrue(host.shown) + } + + @Config(sdk = [28]) + @Test fun toggleHidesAKeyboardThatIsShowing() { + host.show() + idle() + host.toggle() + idle() + assertFalse(shadowOf(imm).isSoftInputVisible) + assertFalse(host.shown) + } + + private fun idle() = shadowOf(Looper.getMainLooper()).idle() +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/PadBridgeRoutingTest.kt b/app/src/test/java/com/droiddeck/launcher/input/PadBridgeRoutingTest.kt index f3f0e64b07..8ff62e170e 100644 --- a/app/src/test/java/com/droiddeck/launcher/input/PadBridgeRoutingTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/input/PadBridgeRoutingTest.kt @@ -148,8 +148,6 @@ class PadBridgeRoutingTest { private companion object { const val COMPOSITE = 0x1002313 } - // Robolectric's default InputEvent shadow has its own nullable device field. Use Android's - // original lookup so key and motion events resolve the registered device by id. @Implements(KeyEvent::class) class RegisteredKeyEvent : ShadowKeyEvent() { @RealObject private lateinit var event: KeyEvent diff --git a/app/src/test/java/com/droiddeck/launcher/input/PadMouseTest.kt b/app/src/test/java/com/droiddeck/launcher/input/PadMouseTest.kt new file mode 100644 index 0000000000..82364a0f82 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/PadMouseTest.kt @@ -0,0 +1,226 @@ +package com.droiddeck.launcher.input + +import android.view.KeyEvent +import android.view.MotionEvent +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class PadMouseTest { + private val events = mutableListOf<String>() + private var scrolledX = 0f + private var scrolledY = 0f + private var now = 1000L + private lateinit var pad: PadMouse + + private val listener = object : PadMouse.Listener { + override fun active() = true + override fun onScrollStart() { events += "scroll start" } + override fun onScroll(dx: Float, dy: Float) { + scrolledX += dx + scrolledY += dy + } + override fun onKey(evdev: Int, pressed: Boolean) { events += "key $evdev ${if (pressed) "down" else "up"}" } + override fun onKeyboard() { events += "keyboard" } + override fun onNavigate() {} + override fun scrollSpeed() = 2000f + } + + @Before fun setUp() { + pad = PadMouse(listener) { now } + } + + @Test fun aOpensTheSelection() { + key(KeyEvent.KEYCODE_BUTTON_A, true) + key(KeyEvent.KEYCODE_BUTTON_A, false) + key(KeyEvent.KEYCODE_DPAD_DOWN, true) + key(KeyEvent.KEYCODE_DPAD_DOWN, false) + key(KeyEvent.KEYCODE_BUTTON_A, true) + key(KeyEvent.KEYCODE_BUTTON_A, false) + assertEquals(listOf("key 28 down", "key 28 up", "key 108 down", "key 108 up", "key 28 down", "key 28 up"), events) + } + + @Test fun rightStickScrollsByHowFarItIsPushedThenSettlesTheSelection() { + motion(rightY = 0.5f) + pad.step(0.1f) + assertEquals(33.9f, scrolledY, 0.1f) + motion(rightY = 1f, rightX = -1f) + pad.step(0.1f) + assertEquals(175.3f, scrolledY, 0.1f) + assertEquals(-141.4f, scrolledX, 0.1f) + motion() + pad.step(0.1f) + pad.step(0.1f) + assertEquals(listOf("scroll start", "key 183 down", "key 183 up"), events) + } + + @Test fun eachControllerKeepsItsOwnSticksAndButtons() { + motion(rightY = 1f, device = 1) + motion(device = 2) + pad.step(0.1f) + assertEquals(200f, scrolledY, 0.01f) + key(KeyEvent.KEYCODE_BUTTON_A, true, device = 1) + key(KeyEvent.KEYCODE_BUTTON_A, true, device = 2) + key(KeyEvent.KEYCODE_BUTTON_A, false, device = 2) + assertEquals(listOf("scroll start", "key 28 down"), events) + key(KeyEvent.KEYCODE_BUTTON_A, false, device = 1) + assertEquals(listOf("scroll start", "key 28 down", "key 28 up"), events) + } + + @Test fun resetLetsGoOfAHeldModifierAndTheNextPressWorks() { + key(KeyEvent.KEYCODE_BUTTON_L1, true) + pad.reset() + key(KeyEvent.KEYCODE_BUTTON_L1, false) + key(KeyEvent.KEYCODE_BUTTON_Y, true) + pad.reset() + key(KeyEvent.KEYCODE_BUTTON_Y, true) + assertEquals(listOf("key 29 down", "key 104 down", "key 104 up", "key 29 up", "keyboard", "keyboard"), events) + } + + @Test fun leftStickMovesFromHalfway() { + motion(leftX = 0.45f) + pad.step(0.016f) + motion(leftX = 0.55f) + pad.step(0.016f) + assertEquals(listOf("key 106 down", "key 106 up"), events) + } + + @Test fun otherButtons() { + for (code in listOf(KeyEvent.KEYCODE_BUTTON_X, KeyEvent.KEYCODE_BUTTON_B, KeyEvent.KEYCODE_BUTTON_START, + KeyEvent.KEYCODE_BUTTON_L1, KeyEvent.KEYCODE_BUTTON_R1)) { + key(code, true) + key(code, false) + } + assertEquals(listOf("key 127 down", "key 127 up", "key 1 down", "key 158 down", "key 158 up", "key 1 up", "key 28 down", "key 28 up", + "key 29 down", "key 104 down", "key 104 up", "key 29 up", "key 29 down", "key 109 down", "key 109 up", "key 29 up"), events) + } + + @Test fun yOpensTheKeyboardOnce() { + key(KeyEvent.KEYCODE_BUTTON_Y, true) + pad.onKey(KeyEvent(0, 0, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BUTTON_Y, 1)) + key(KeyEvent.KEYCODE_BUTTON_Y, false) + assertEquals(listOf("keyboard"), events) + } + + @Test fun guideAndSelectStayWithTheGamepad() { + assertFalse(pad.onKey(KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BUTTON_MODE))) + assertFalse(pad.onKey(KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BUTTON_SELECT))) + assertTrue(pad.onKey(KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BUTTON_R2))) + assertEquals(emptyList<String>(), events) + } + + @Test fun dpadKeysAndHatShareOnePress() { + key(KeyEvent.KEYCODE_DPAD_RIGHT, true) + motion(hatX = 1f) + key(KeyEvent.KEYCODE_DPAD_RIGHT, false) + motion() + motion(hatY = -1f) + motion() + assertEquals(listOf("key 106 down", "key 106 up", "key 103 down", "key 103 up"), events) + } + + @Test fun heldDpadRepeatsAtTheMenuPace() { + key(KeyEvent.KEYCODE_DPAD_RIGHT, true) + pad.step(0.016f) + now += 299 + pad.step(0.016f) + now += 1 + pad.step(0.016f) + now += 120 + pad.step(0.016f) + key(KeyEvent.KEYCODE_DPAD_RIGHT, false) + pad.step(0.016f) + now += 1000 + pad.step(0.016f) + assertEquals(List(3) { listOf("key 106 down", "key 106 up") }.flatten(), events) + } + + @Test fun leftStickStepsThroughItemsAndRepeats() { + motion(leftY = 1f) + pad.step(0.016f) + pad.step(0.016f) + now += 400 + pad.step(0.016f) + now += 100 + pad.step(0.016f) + now += 50 + pad.step(0.016f) + motion() + pad.step(0.016f) + motion(leftX = -0.3f) + pad.step(0.016f) + assertEquals(listOf("key 108 down", "key 108 up", "key 108 down", "key 108 up", "key 108 down", "key 108 up"), events) + } + + @Test fun touchPadDrivesTheSameMapping() { + val state = PadState() + state.press(PadState.A, true) + pad.onTouchPad(state) + state.press(PadState.A, false) + state.down = true + pad.onTouchPad(state) + state.down = false + state.rightTrigger = 1f + pad.onTouchPad(state) + pad.step(0.1f) + assertEquals(listOf("key 28 down", "key 28 up", "key 108 down", "key 108 up", "scroll start"), events) + assertEquals(200f, scrolledY, 0.01f) + } + + @Test fun resetReleasesEverythingHeld() { + key(KeyEvent.KEYCODE_BUTTON_X, true) + key(KeyEvent.KEYCODE_DPAD_DOWN, true) + pad.reset() + key(KeyEvent.KEYCODE_DPAD_DOWN, false) + assertEquals(listOf("key 127 down", "key 108 down", "key 108 up", "key 127 up"), events) + } + + @Test fun stickCurveIsGentleNearTheMiddle() { + val (half, _) = PadMouse.curve(0.575f, 0f) + assertEquals(0.25f, half, 0.01f) + assertEquals(0f to 0f, PadMouse.curve(0.1f, 0.1f)) + } + + @Test fun triggersScroll() { + motion(rightTrigger = 1f) + pad.step(0.1f) + assertEquals(200f, scrolledY, 0.01f) + motion(leftTrigger = 1f) + pad.step(0.1f) + assertEquals(0f, scrolledY, 0.01f) + motion() + pad.step(0.1f) + assertEquals(listOf("scroll start", "key 183 down", "key 183 up"), events) + } + + private fun key(code: Int, down: Boolean, device: Int = 0) { + val action = if (down) KeyEvent.ACTION_DOWN else KeyEvent.ACTION_UP + assertTrue(pad.onKey(KeyEvent(0, 0, action, code, 0, 0, device, 0))) + } + + private fun motion(leftX: Float = 0f, leftY: Float = 0f, rightX: Float = 0f, rightY: Float = 0f, hatX: Float = 0f, hatY: Float = 0f, + leftTrigger: Float = 0f, rightTrigger: Float = 0f, device: Int = 0) { + val properties = arrayOf(MotionEvent.PointerProperties().apply { id = 0; toolType = MotionEvent.TOOL_TYPE_UNKNOWN }) + val coords = arrayOf(MotionEvent.PointerCoords().apply { + setAxisValue(MotionEvent.AXIS_X, leftX) + setAxisValue(MotionEvent.AXIS_Y, leftY) + setAxisValue(MotionEvent.AXIS_Z, rightX) + setAxisValue(MotionEvent.AXIS_RZ, rightY) + setAxisValue(MotionEvent.AXIS_HAT_X, hatX) + setAxisValue(MotionEvent.AXIS_HAT_Y, hatY) + setAxisValue(MotionEvent.AXIS_LTRIGGER, leftTrigger) + setAxisValue(MotionEvent.AXIS_RTRIGGER, rightTrigger) + }) + val event = MotionEvent.obtain(0, 0, MotionEvent.ACTION_MOVE, 1, properties, coords, 0, 0, 1f, 1f, device, 0, + android.view.InputDevice.SOURCE_JOYSTICK, 0) + pad.onMotion(event) + event.recycle() + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/ScrollTouchGesturesTest.kt b/app/src/test/java/com/droiddeck/launcher/input/ScrollTouchGesturesTest.kt new file mode 100644 index 0000000000..60436eaabd --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/ScrollTouchGesturesTest.kt @@ -0,0 +1,190 @@ +package com.droiddeck.launcher.input + +import android.os.Looper +import android.view.MotionEvent +import java.time.Duration +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class ScrollTouchGesturesTest { + private val events = mutableListOf<String>() + private var scrolledX = 0f + private var scrolledY = 0f + private lateinit var gestures: ScrollTouchGestures + private var time = 1000L + private var downTime = 0L + + private val listener = object : ScrollTouchGestures.Listener { + override fun onMove(x: Float, y: Float) { events += "move ${x.toInt()},${y.toInt()}" } + override fun onButton(button: Int, pressed: Boolean) { + val name = if (button == PointerGestures.BTN_RIGHT) "right" else "left" + events += "$name ${if (pressed) "down" else "up"}" + } + override fun onScroll(dx: Float, dy: Float) { + scrolledX += dx + scrolledY += dy + } + override fun onLongPress() { events += "long press" } + } + + @Before fun setUp() { + gestures = ScrollTouchGestures(SLOP, MIN_FLING, listener) + } + + @Test fun tapClicksWhereTheFingerIs() { + touch(MotionEvent.ACTION_DOWN, 400f, 300f) + advance(80) + touch(MotionEvent.ACTION_UP, 400f, 300f) + advance(100) + assertEquals(listOf("move 400,300", "left down", "left up"), events) + } + + @Test fun draggingScrollsWithTheFingerAndNeverClicks() { + touch(MotionEvent.ACTION_DOWN, 400f, 800f) + advance(200) + touch(MotionEvent.ACTION_MOVE, 403f, 600f) + advance(200) + touch(MotionEvent.ACTION_MOVE, 405f, 300f) + advance(200) + touch(MotionEvent.ACTION_UP, 405f, 300f) + advance(100) + assertEquals(500f, scrolledY, 0.01f) + assertEquals(0f, scrolledX, 0.01f) + assertEquals(listOf("move 400,800"), events) + } + + @Test fun sidewaysDragScrollsSideways() { + touch(MotionEvent.ACTION_DOWN, 900f, 400f) + advance(200) + touch(MotionEvent.ACTION_MOVE, 600f, 410f) + advance(200) + touch(MotionEvent.ACTION_UP, 600f, 410f) + assertEquals(300f, scrolledX, 0.01f) + assertEquals(0f, scrolledY, 0.01f) + } + + @Test fun quickSwipeKeepsScrollingAfterLiftingAndATapStopsIt() { + touch(MotionEvent.ACTION_DOWN, 400f, 900f) + advance(16) + touch(MotionEvent.ACTION_MOVE, 400f, 800f) + advance(16) + touch(MotionEvent.ACTION_MOVE, 400f, 700f) + advance(16) + touch(MotionEvent.ACTION_UP, 400f, 600f) + val lifted = scrolledY + repeat(3) { shadowOf(Looper.getMainLooper()).runOneTask() } + assertTrue(scrolledY > lifted) + touch(MotionEvent.ACTION_DOWN, 400f, 300f) + val stopped = scrolledY + advance(80) + touch(MotionEvent.ACTION_UP, 400f, 300f) + advance(500) + assertEquals(stopped, scrolledY, 0.01f) + assertFalse(events.contains("left down")) + } + + @Test fun longPressRightClicks() { + touch(MotionEvent.ACTION_DOWN, 400f, 300f) + advance(600) + touch(MotionEvent.ACTION_UP, 402f, 301f) + advance(100) + assertEquals(listOf("move 400,300", "long press", "right down", "right up"), events) + } + + @Test fun longPressThenMoveDragsWithTheLeftButton() { + touch(MotionEvent.ACTION_DOWN, 400f, 300f) + advance(600) + touch(MotionEvent.ACTION_MOVE, 500f, 300f) + advance(50) + touch(MotionEvent.ACTION_UP, 500f, 300f) + assertEquals(listOf("move 400,300", "long press", "left down", "move 500,300", "left up"), events) + assertEquals(0f, scrolledY, 0.01f) + } + + @Test fun cancelReleasesAHeldDrag() { + touch(MotionEvent.ACTION_DOWN, 400f, 300f) + advance(600) + touch(MotionEvent.ACTION_MOVE, 500f, 300f) + gestures.cancel() + assertEquals("left up", events.last()) + events.clear() + touch(MotionEvent.ACTION_UP, 500f, 300f) + advance(100) + assertEquals(emptyList<String>(), events) + } + + @Test fun aLiftAfterACancelDoesNotClick() { + touch(MotionEvent.ACTION_DOWN, 400f, 300f) + advance(50) + gestures.cancel() + touch(MotionEvent.ACTION_UP, 400f, 300f) + advance(100) + assertEquals(listOf("move 400,300"), events) + } + + @Test fun aSecondFingerDoesNotJumpTheScroll() { + touch(MotionEvent.ACTION_DOWN, 400f, 900f) + advance(100) + touch(MotionEvent.ACTION_MOVE, 400f, 700f) + advance(100) + pointers(MotionEvent.ACTION_POINTER_DOWN, 1, 0 to (400f to 700f), 1 to (900f to 200f)) + advance(100) + pointers(MotionEvent.ACTION_POINTER_UP, 0, 0 to (400f to 700f), 1 to (900f to 200f)) + advance(100) + pointers(MotionEvent.ACTION_UP, 0, 1 to (900f to 150f)) + advance(500) + assertEquals(200f, scrolledY, 0.01f) + assertFalse(events.contains("left down")) + } + + @Test fun wheelUnitsLandOnWholePixelsOfWebKitsLineStep() { + for (view in listOf(720, 1280)) { + val step = kotlin.math.floor(Math.pow(view.toDouble(), 2.0 / 3.0)).toFloat() + for (pixels in -300..300) { + val scrolled = ScrollTouchGestures.wheelUnits(pixels, view) / 120f * step + assertEquals(pixels, scrolled.toInt()) + } + } + assertEquals(0, ScrollTouchGestures.wheelUnits(0, 720)) + assertEquals(2, ScrollTouchGestures.wheelUnits(1, 720)) + assertEquals(-2, ScrollTouchGestures.wheelUnits(-1, 720)) + } + + private fun advance(ms: Long) { + time += ms + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofMillis(ms)) + } + + private fun touch(action: Int, x: Float, y: Float) { + if (action == MotionEvent.ACTION_DOWN) downTime = time + val event = MotionEvent.obtain(downTime, time, action, x, y, 0) + gestures.onTouch(event) + event.recycle() + } + + private fun pointers(action: Int, index: Int, vararg at: Pair<Int, Pair<Float, Float>>) { + val properties = at.map { (id, _) -> + MotionEvent.PointerProperties().apply { this.id = id; toolType = MotionEvent.TOOL_TYPE_FINGER } + }.toTypedArray() + val coords = at.map { (_, xy) -> + MotionEvent.PointerCoords().apply { x = xy.first; y = xy.second; pressure = 1f; size = 1f } + }.toTypedArray() + val event = MotionEvent.obtain(downTime, time, action or (index shl MotionEvent.ACTION_POINTER_INDEX_SHIFT), at.size, properties, coords, 0, 0, 1f, 1f, 0, 0, 0, 0) + gestures.onTouch(event) + event.recycle() + } + + private companion object { + const val SLOP = 8f + const val MIN_FLING = 50f + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/SteamTouchConfigFilesTest.kt b/app/src/test/java/com/droiddeck/launcher/input/SteamTouchConfigFilesTest.kt new file mode 100644 index 0000000000..eb48d09642 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/SteamTouchConfigFilesTest.kt @@ -0,0 +1,60 @@ +package com.droiddeck.launcher.input + +import com.droiddeck.launcher.runtime.LinuxRuntime +import java.io.File +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class SteamTouchConfigFilesTest { + private val context = RuntimeEnvironment.getApplication() + private val steam = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam") + private val dir = File(steam, "steamapps/common/Steam Controller Configs/123/config").apply { mkdirs() } + + @After fun tearDown() { steam.deleteRecursively() } + + private fun touch(title: String) = "\"controller_mappings\"\n{\n\t\"title\"\t\t\"$title\"\n\t\"controller_type\"\t\t\"controller_mobile_touch\"\n}\n" + + private fun configset(name: String, vararg entries: Pair<String, String>) = File(dir, name).writeText( + "\"controller_config\"\n{\n" + entries.joinToString("") { (app, line) -> "\t\"$app\"\n\t{\n\t\t$line\n\t}\n" } + "}\n", + ) + + private fun autosave(app: Int, title: String) = File(dir, "$app/controller_mobile_touch.vdf").apply { parentFile!!.mkdirs(); writeText(touch(title)) } + + private fun workshop(id: String, title: String) = + File(steam, "steamapps/workshop/content/241100/$id/123_legacy.bin").apply { parentFile!!.mkdirs(); writeText(touch(title)) } + + @Test fun theDevicesWorkshopPickWinsOverAnOlderAutosave() { + autosave(204360, "old autosave") + val picked = workshop("1764689049", "official") + configset("configset_controller_mobile_touch.vdf", "204360" to "\"autosave\"\t\t\"1\"") + configset("configset_MT-DROIDDECK0001.vdf", "204360" to "\"workshop\"\t\t\"1764689049\"") + assertEquals(picked, SteamTouchConfig.load(context, 204360).file) + } + + @Test fun aWorkshopPickInTheTypeConfigsetIsRead() { + val picked = workshop("42", "community") + configset("configset_controller_mobile_touch.vdf", "413150" to "\"workshop\"\t\t\"42\"") + assertEquals(picked, SteamTouchConfig.load(context, 413150).file) + } + + @Test fun savingAnEditDropsTheDevicePickSoTheEditLoads() { + workshop("1764689049", "official") + configset("configset_MT-DROIDDECK0001.vdf", "204360" to "\"workshop\"\t\t\"1764689049\"", "8400" to "\"workshop\"\t\t\"7\"") + val config = SteamTouchConfig.load(context, 204360) + val saved = SteamTouchConfig.saveLayouts(context, 204360, config, mapOf(1 to emptyList())) + assertEquals(File(dir, "204360/controller_mobile_touch.vdf"), saved) + val device = File(dir, "configset_MT-DROIDDECK0001.vdf").readText() + assertFalse(device.contains("\"204360\"")) + assertTrue(device.contains("\"8400\"")) + assertEquals(saved, SteamTouchConfig.load(context, 204360).file) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/SteamTouchConfigTest.kt b/app/src/test/java/com/droiddeck/launcher/input/SteamTouchConfigTest.kt index 51c6742cdf..8addf24e0a 100644 --- a/app/src/test/java/com/droiddeck/launcher/input/SteamTouchConfigTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/input/SteamTouchConfigTest.kt @@ -6,7 +6,6 @@ import org.junit.Assert.assertTrue import org.junit.Test class SteamTouchConfigTest { - // A layout DroidDeck saved for Geometry Wars on the Thor, as Steam keeps it. private val saved = "0aec0310012218080010011d0000703d255555d53d2d0000803f350000803f2218080110011d6666fe3e255555d53d2d0000803f350000803f2218080210011dba490c3e255c8f423f2d0000803f350000803f2218080410011d9a99593f255c8f423f2d0000803f350000803f2218080510011d8fc2353f25ae47613f2d0000803f350000803f2218080610011d2b87163e25d7a3f03e2d0000803f350000803f2218080710011dba49003f25f958053f2d293ab23f35293ab23f2218080810011d9a99683f25d227dd3e2d0000803f350000803f2218080910011d9a99483f25d227dd3e2d0000803f350000803f2218080a10011d9a99583f254444a43e2d0000803f350000803f2218080b10011d6666ce3e255555d53d2d0000803f350000803f2218080c10011d3333173f255555d53d2d0000803f350000803f2218080d10011d0ad7233e2585eb513e2d0000803f350000803f2218080e10011d3d0a573f2585eb513e2d0000803f350000803f2218080f10011d8fc2753d2585eb513e2d0000803f350000803f2218081010011dd7a3703f2585eb513e2d0000803f350000803f2218081c10011d0000713f255555d53d2d0000803f350000803f2218080310001de17a943e25ae47613f2d0000803f350000803f2a140d0000803f150000803f1d0000803f25cdcccc3e1002" @Test diff --git a/app/src/test/java/com/droiddeck/launcher/input/ThreeFingerTapTest.kt b/app/src/test/java/com/droiddeck/launcher/input/ThreeFingerTapTest.kt new file mode 100644 index 0000000000..5738f72bb1 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/ThreeFingerTapTest.kt @@ -0,0 +1,96 @@ +package com.droiddeck.launcher.input + +import android.view.MotionEvent +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class ThreeFingerTapTest { + private val tap = ThreeFingerTap(8f) + private var time = 1000L + private var downTime = 0L + private val a = 1 to (400f to 300f) + private val b = 2 to (500f to 300f) + private val c = 3 to (600f to 300f) + + @Test fun quickThreeFingerTapFires() { + assertEquals(listOf(false, false, false, false, false, true), threeFingerTap()) + } + + @Test fun activeOnceTheThirdFingerLandsUntilTheLastLifts() { + touch(MotionEvent.ACTION_DOWN, 0, a) + touch(MotionEvent.ACTION_POINTER_DOWN, 1, a, b) + assertFalse(tap.active) + touch(MotionEvent.ACTION_POINTER_DOWN, 2, a, b, c) + assertTrue(tap.active) + touch(MotionEvent.ACTION_POINTER_UP, 2, a, b, c) + touch(MotionEvent.ACTION_POINTER_UP, 1, a, b) + assertTrue(tap.active) + touch(MotionEvent.ACTION_UP, 0, a) + assertFalse(tap.active) + } + + @Test fun twoFingerTapDoesNotFire() { + touch(MotionEvent.ACTION_DOWN, 0, a) + touch(MotionEvent.ACTION_POINTER_DOWN, 1, a, b) + touch(MotionEvent.ACTION_POINTER_UP, 1, a, b) + assertFalse(touch(MotionEvent.ACTION_UP, 0, a)) + } + + @Test fun heldTooLongDoesNotFire() { + assertFalse(threeFingerTap(hold = 600).last()) + } + + @Test fun swipeDoesNotFire() { + touch(MotionEvent.ACTION_DOWN, 0, a) + touch(MotionEvent.ACTION_POINTER_DOWN, 1, a, b) + touch(MotionEvent.ACTION_POINTER_DOWN, 2, a, b, c) + touch(MotionEvent.ACTION_MOVE, 0, a, b, 3 to (600f to 400f)) + touch(MotionEvent.ACTION_POINTER_UP, 2, a, b, c) + touch(MotionEvent.ACTION_POINTER_UP, 1, a, b) + assertFalse(touch(MotionEvent.ACTION_UP, 0, a)) + } + + @Test fun fingersLandingFarApartDoNotFire() { + touch(MotionEvent.ACTION_DOWN, 0, a) + time += 500 + touch(MotionEvent.ACTION_POINTER_DOWN, 1, a, b) + touch(MotionEvent.ACTION_POINTER_DOWN, 2, a, b, c) + touch(MotionEvent.ACTION_POINTER_UP, 2, a, b, c) + touch(MotionEvent.ACTION_POINTER_UP, 1, a, b) + assertFalse(touch(MotionEvent.ACTION_UP, 0, a)) + } + + private fun threeFingerTap(hold: Long = 100): List<Boolean> { + val out = mutableListOf<Boolean>() + out += touch(MotionEvent.ACTION_DOWN, 0, a) + time += 20 + out += touch(MotionEvent.ACTION_POINTER_DOWN, 1, a, b) + time += 20 + out += touch(MotionEvent.ACTION_POINTER_DOWN, 2, a, b, c) + time += hold + out += touch(MotionEvent.ACTION_POINTER_UP, 2, a, b, c) + out += touch(MotionEvent.ACTION_POINTER_UP, 1, a, b) + out += touch(MotionEvent.ACTION_UP, 0, a) + return out + } + + private fun touch(action: Int, index: Int, vararg pointers: Pair<Int, Pair<Float, Float>>): Boolean { + if (action == MotionEvent.ACTION_DOWN) downTime = time + val properties = pointers.map { (id, _) -> + MotionEvent.PointerProperties().apply { this.id = id; toolType = MotionEvent.TOOL_TYPE_FINGER } + }.toTypedArray() + val coords = pointers.map { (_, at) -> + MotionEvent.PointerCoords().apply { x = at.first; y = at.second; pressure = 1f; size = 1f } + }.toTypedArray() + val masked = action or (index shl MotionEvent.ACTION_POINTER_INDEX_SHIFT) + val event = MotionEvent.obtain(downTime, time, masked, pointers.size, properties, coords, 0, 0, 1f, 1f, 0, 0, 0, 0) + return tap.onTouch(event).also { event.recycle() } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/input/TouchpadGesturesTest.kt b/app/src/test/java/com/droiddeck/launcher/input/TouchpadGesturesTest.kt new file mode 100644 index 0000000000..ddbf4d7f92 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/input/TouchpadGesturesTest.kt @@ -0,0 +1,140 @@ +package com.droiddeck.launcher.input + +import android.graphics.RectF +import android.os.Looper +import android.view.MotionEvent +import java.time.Duration +import org.junit.Assert.assertEquals +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class TouchpadGesturesTest { + private val events = mutableListOf<String>() + private lateinit var touchpad: TouchpadGestures + private var time = 1000L + private var downTime = 0L + + private val listener = object : PointerGestures.Listener { + override fun onMove(x: Float, y: Float) { events += "move" } + override fun onButton(button: Int, pressed: Boolean, x: Float, y: Float) { + val name = if (button == PointerGestures.BTN_RIGHT) "right" else "left" + events += "$name ${if (pressed) "down" else "up"}" + } + override fun onWheel(steps: Int) { events += "wheel $steps" } + override fun onLongPress() { events += "long press" } + } + + @Before fun setUp() { + touchpad = TouchpadGestures(SLOP, listener) + touchpad.bounds = RectF(0f, 0f, 1920f, 1080f) + touchpad.place(960f, 540f) + } + + @Test fun tapHoldsTheLeftButtonBeforeReleasingIt() { + tap() + assertEquals(listOf("left down"), events) + advance(40) + assertEquals(listOf("left down"), events) + advance(100) + assertEquals(listOf("left down", "left up"), events) + } + + @Test fun twoFingerTapHoldsTheRightButtonBeforeReleasingIt() { + touch(MotionEvent.ACTION_DOWN, 0, 1 to (400f to 300f)) + advance(10) + touch(MotionEvent.ACTION_POINTER_DOWN, 1, 1 to (400f to 300f), 2 to (600f to 310f)) + advance(60) + touch(MotionEvent.ACTION_POINTER_UP, 1, 1 to (400f to 300f), 2 to (600f to 310f)) + advance(10) + touch(MotionEvent.ACTION_UP, 0, 1 to (400f to 300f)) + assertEquals(listOf("right down"), events) + advance(30) + assertEquals(listOf("right down"), events) + advance(100) + assertEquals(listOf("right down", "right up"), events) + } + + @Test fun slowTwoFingerTapHoldsTheRightButtonBeforeReleasingIt() { + touch(MotionEvent.ACTION_DOWN, 0, 1 to (400f to 300f)) + advance(10) + touch(MotionEvent.ACTION_POINTER_DOWN, 1, 1 to (400f to 300f), 2 to (600f to 310f)) + advance(350) + touch(MotionEvent.ACTION_POINTER_UP, 1, 1 to (400f to 300f), 2 to (600f to 310f)) + advance(10) + touch(MotionEvent.ACTION_UP, 0, 1 to (400f to 300f)) + assertEquals(listOf("right down"), events) + advance(40) + assertEquals(listOf("right down"), events) + advance(100) + assertEquals(listOf("right down", "right up"), events) + } + + @Test fun secondTapPressesOnlyAfterTheFirstClickIsReleased() { + tap() + advance(20) + touch(MotionEvent.ACTION_DOWN, 0, 1 to (400f to 300f)) + assertEquals(listOf("left down", "left up", "left down"), events) + advance(80) + touch(MotionEvent.ACTION_UP, 0, 1 to (400f to 300f)) + advance(200) + assertEquals(listOf("left down", "left up", "left down", "left up"), events) + } + + @Test fun secondFingerTappingAgainReleasesTheFirstRightClickFirst() { + touch(MotionEvent.ACTION_DOWN, 0, 1 to (400f to 300f)) + advance(10) + touch(MotionEvent.ACTION_POINTER_DOWN, 1, 1 to (400f to 300f), 2 to (600f to 310f)) + advance(60) + touch(MotionEvent.ACTION_POINTER_UP, 1, 1 to (400f to 300f), 2 to (600f to 310f)) + advance(10) + touch(MotionEvent.ACTION_POINTER_DOWN, 1, 1 to (400f to 300f), 2 to (600f to 310f)) + advance(20) + touch(MotionEvent.ACTION_POINTER_UP, 1, 1 to (400f to 300f), 2 to (600f to 310f)) + assertEquals(listOf("right down", "right up", "right down"), events) + advance(200) + assertEquals(listOf("right down", "right up", "right down", "right up"), events) + } + + @Test fun cancelReleasesAClickThatIsStillHeld() { + tap() + touchpad.cancel() + assertEquals(listOf("left down", "left up"), events) + advance(200) + assertEquals(listOf("left down", "left up"), events) + } + + private fun tap() { + touch(MotionEvent.ACTION_DOWN, 0, 1 to (400f to 300f)) + advance(80) + touch(MotionEvent.ACTION_UP, 0, 1 to (400f to 300f)) + } + + private fun advance(ms: Long) { + time += ms + shadowOf(Looper.getMainLooper()).idleFor(Duration.ofMillis(ms)) + } + + private fun touch(action: Int, index: Int, vararg pointers: Pair<Int, Pair<Float, Float>>) { + if (action == MotionEvent.ACTION_DOWN) downTime = time + val properties = pointers.map { (id, _) -> + MotionEvent.PointerProperties().apply { this.id = id; toolType = MotionEvent.TOOL_TYPE_FINGER } + }.toTypedArray() + val coords = pointers.map { (_, at) -> + MotionEvent.PointerCoords().apply { x = at.first; y = at.second; pressure = 1f; size = 1f } + }.toTypedArray() + val masked = action or (index shl MotionEvent.ACTION_POINTER_INDEX_SHIFT) + val event = MotionEvent.obtain(downTime, time, masked, pointers.size, properties, coords, 0, 0, 1f, 1f, 0, 0, 0, 0) + touchpad.onTouch(event) + event.recycle() + } + + private companion object { + const val SLOP = 8f + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/runtime/AppImageManagerTest.kt b/app/src/test/java/com/droiddeck/launcher/runtime/AppImageManagerTest.kt index 5f753715f8..ab620b3856 100644 --- a/app/src/test/java/com/droiddeck/launcher/runtime/AppImageManagerTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/runtime/AppImageManagerTest.kt @@ -16,7 +16,6 @@ class AppImageManagerTest { @Before fun setUp() { dir = Files.createTempDirectory("appimage").toFile() } @After fun tearDown() { dir.deleteRecursively() } - /** An ELF header with the AppImage magic at byte 8 and [machine] at byte 18. */ private fun image(machine: Int, type: Int = 2, magic: Boolean = true): File { val b = ByteArray(64) b[0] = 0x7f; b[1] = 'E'.code.toByte(); b[2] = 'L'.code.toByte(); b[3] = 'F'.code.toByte() diff --git a/app/src/test/java/com/droiddeck/launcher/runtime/BwrapSpawnerTest.kt b/app/src/test/java/com/droiddeck/launcher/runtime/BwrapSpawnerTest.kt index e1e9fd9e97..e1e6827ab1 100644 --- a/app/src/test/java/com/droiddeck/launcher/runtime/BwrapSpawnerTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/runtime/BwrapSpawnerTest.kt @@ -68,7 +68,6 @@ class BwrapSpawnerTest { } } -/** The sandbox a Flatpak request describes, built on disk under a temporary directory. */ @RunWith(RobolectricTestRunner::class) class BwrapSpawnerPlanTest { private lateinit var dir: File @@ -76,7 +75,6 @@ class BwrapSpawnerPlanTest { @Before fun setUp() { dir = Files.createTempDirectory("bwrap-plan").toFile() - // Flatpak names the runtime by its path inside the rootfs. runtime = File(LinuxRuntime.rootDir(RuntimeEnvironment.getApplication()), "runtime-files") File(runtime, "lib").mkdirs() } @@ -107,18 +105,14 @@ class BwrapSpawnerPlanTest { op("t" to "bind", "src" to "/nonexistent-${System.nanoTime()}", "dest" to "/run/x", "try" to true), ), dir) - // The runtime is bound at /usr, not written into. assertTrue(plan.binds.any { it.guest == "/usr" && File(it.host).canonicalPath == runtime.canonicalPath }) assertFalse(File(runtime, "lib/GL").exists()) - // The tmpfs under /usr is a directory of ours, and the link Flatpak makes inside it lands there. val gl = plan.binds.single { it.guest == "/usr/lib/GL" } assertTrue(gl.host.startsWith(dir.path)) assertEquals("default/lib/libEGL.so", Files.readSymbolicLink(File(gl.host, "libEGL.so").toPath()).toString()) - // Top-level links, directories and files are made in the sandbox root itself. assertEquals("usr/lib", Files.readSymbolicLink(File(plan.root, "lib").toPath()).toString()) assertTrue(File(plan.root, "tmp").isDirectory) assertEquals("[Application]\nname=org.example.Game\n", File(plan.root, ".flatpak-info").readText()) - // A --bind-try whose source is missing is left out. assertFalse(plan.binds.any { it.guest == "/run/x" }) assertEquals(listOf("/app/bin/game"), plan.argv) assertEquals("/app", plan.cwd) diff --git a/app/src/test/java/com/droiddeck/launcher/runtime/DeckyPluginInstallTest.kt b/app/src/test/java/com/droiddeck/launcher/runtime/DeckyPluginInstallTest.kt index 5edb3451d5..080828ba9c 100644 --- a/app/src/test/java/com/droiddeck/launcher/runtime/DeckyPluginInstallTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/runtime/DeckyPluginInstallTest.kt @@ -69,7 +69,6 @@ class DeckyPluginInstallTest { val plugins = temporary.newFolder() val old = plugin(plugins, "Unifideck", "Unifideck") File(old, "old-version").writeText("keep") - // An empty staged directory makes the plugin activation fail after backing up the old one. val staged = plugin(temporary.newFolder(), "Unifideck", "Unifideck") staged.deleteRecursively() val settings = File(temporary.newFolder(), "loader.json").apply { writeText("{}") } diff --git a/app/src/test/java/com/droiddeck/launcher/runtime/LinuxRuntimeArchiveNameTest.kt b/app/src/test/java/com/droiddeck/launcher/runtime/LinuxRuntimeArchiveNameTest.kt new file mode 100644 index 0000000000..9d6ad49b0a --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/runtime/LinuxRuntimeArchiveNameTest.kt @@ -0,0 +1,36 @@ +package com.droiddeck.launcher.runtime + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotEquals +import org.junit.Assert.assertTrue +import org.junit.Test + +class LinuxRuntimeArchiveNameTest { + private fun release(version: String, sha: String) = + LinuxRuntimeInstaller.Release(version, "https://example.invalid/runtime.tar.zst", sha, 1L) + + @Test fun sameReleaseKeepsTheSameName() { + val a = LinuxRuntimeInstaller.archiveName(release("r9", "ab".repeat(32))) + val b = LinuxRuntimeInstaller.archiveName(release("r9", "ab".repeat(32))) + assertEquals(a, b) + } + + @Test fun anotherVersionOrChecksumGetsAnotherName() { + val base = LinuxRuntimeInstaller.archiveName(release("r9", "ab".repeat(32))) + assertNotEquals(base, LinuxRuntimeInstaller.archiveName(release("r10", "ab".repeat(32)))) + assertNotEquals(base, LinuxRuntimeInstaller.archiveName(release("r9", "cd".repeat(32)))) + } + + @Test fun nameIsASafeFileNameThatTheCleanupRecognises() { + val name = LinuxRuntimeInstaller.archiveName(release("r9/../x y", "AB/CD ".repeat(10))) + assertFalse(name.contains('/')) + assertFalse(name.contains(' ')) + assertTrue(name.startsWith("linuxfs")) + assertTrue(name.endsWith(".tar.zst")) + } + + @Test fun shortOrEmptyChecksumStillMakesAName() { + assertEquals("linuxfs-r9-.tar.zst", LinuxRuntimeInstaller.archiveName(release("r9", ""))) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/runtime/LinuxRuntimeLiveFilesTest.kt b/app/src/test/java/com/droiddeck/launcher/runtime/LinuxRuntimeLiveFilesTest.kt new file mode 100644 index 0000000000..baa6011f6d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/runtime/LinuxRuntimeLiveFilesTest.kt @@ -0,0 +1,130 @@ +package com.droiddeck.launcher.runtime + +import android.content.ContextWrapper +import com.droiddeck.launcher.session.SessionPhase +import com.droiddeck.launcher.session.SessionState +import java.io.File +import java.nio.file.Files +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment + +@RunWith(RobolectricTestRunner::class) +class LinuxRuntimeLiveFilesTest { + private val root = Files.createTempDirectory("guest-live-files").toFile() + private val context = object : ContextWrapper(RuntimeEnvironment.getApplication()) { + override fun getFilesDir() = File(root, "files").apply { mkdirs() } + override fun getCacheDir() = File(root, "cache").apply { mkdirs() } + override fun getNoBackupFilesDir() = File(root, "no_backup").apply { mkdirs() } + } + + @Before fun setUp() { + SessionState.running = false + SessionState.phase = SessionPhase.IDLE + } + + @After fun tearDown() { + Thread.interrupted() + SessionState.running = false + SessionState.phase = SessionPhase.IDLE + root.deleteRecursively() + } + + @Test fun cacheEvictionPreservesGuestSharedMemoryAndRuntimeBindings() { + val binds = LinuxRuntime.binds(context, null, null, null, null) + val shm = File(binds.single { it.endsWith(":/dev/shm") }.removeSuffix(":/dev/shm")) + val live = LinuxRuntime.liveDir(context) + val files = listOf(File(shm, "steamvr-ipc"), File(LinuxRuntime.prootTempDir(context), "loader"), + File(live, "drm/device"), File(live, "bwrap/1/state")) + files.forEach { it.parentFile!!.mkdirs(); it.writeText("active") } + val disposable = File(context.cacheDir, "download").apply { writeText("cached") } + + context.cacheDir.deleteRecursively() + + assertFalse(disposable.exists()) + files.forEach { assertEquals("active", it.readText()) } + assertTrue(live.path in binds) + assertEquals(binds, LinuxRuntime.binds(context, null, null, null, null)) + assertTrue(live.toPath().startsWith(context.noBackupFilesDir.toPath())) + } + + @Test fun successfulRemovalClearsGuestScratchAndPreservesOtherNoBackupData() { + val runtime = runtime() + val scratch = scratch() + val unrelated = File(context.noBackupFilesDir, "calibration.json").apply { writeText("preserved") } + + assertTrue(LinuxRuntimeInstaller.beginUninstall(context, runtime)!!.run(null)) + + assertFalse(runtime.exists()) + assertFalse(scratch.exists()) + assertFalse(File(context.noBackupFilesDir, "guest-runtime").exists()) + assertEquals("preserved", unrelated.readText()) + } + + @Test fun failedRuntimeRemovalPreservesGuestScratch() { + val runtime = runtime() + val scratch = scratch() + val cannotMove = object : File(runtime.path) { + override fun renameTo(dest: File) = false + } + + assertFalse(LinuxRuntimeInstaller.beginUninstall(context, cannotMove)!!.run(null)) + + assertTrue(runtime.exists()) + assertEquals("active", scratch.readText()) + } + + @Test fun interruptedRemovalPreservesGuestScratch() { + val runtime = runtime() + val scratch = scratch() + val removal = LinuxRuntimeInstaller.beginUninstall(context, runtime)!! + + Thread.currentThread().interrupt() + try { + assertFalse(removal.run(null)) + } finally { + Thread.interrupted() + } + + assertTrue(runtime.exists()) + assertEquals("active", scratch.readText()) + } + + @Test fun aSessionStartingBeforeTheWorkerRunsPreservesRuntimeAndScratch() { + val runtime = runtime() + val scratch = scratch() + val removal = LinuxRuntimeInstaller.beginUninstall(context, runtime)!! + SessionState.phase = SessionPhase.STARTING_COMPOSITOR + + assertFalse(removal.run(null)) + + assertTrue(runtime.exists()) + assertEquals("active", scratch.readText()) + } + + @Test fun aSessionActiveBeforeScratchCleanupPreservesScratch() { + val runtime = runtime() + val scratch = scratch() + val removal = LinuxRuntimeInstaller.beginUninstall(context, runtime)!! + + assertFalse(removal.run { _, _ -> SessionState.running = true }) + + assertEquals("active", scratch.readText()) + } + + private fun runtime() = LinuxRuntime.rootDir(context).apply { + mkdirs() + File(this, "runtime-file").writeText("installed") + } + + private fun scratch() = File(LinuxRuntime.liveDir(context), "shm/steamvr-ipc").apply { + parentFile!!.mkdirs() + writeText("active") + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/runtime/ProotFastPathTest.kt b/app/src/test/java/com/droiddeck/launcher/runtime/ProotFastPathTest.kt index ce129f7c0c..5d4eb1d8ee 100644 --- a/app/src/test/java/com/droiddeck/launcher/runtime/ProotFastPathTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/runtime/ProotFastPathTest.kt @@ -9,7 +9,6 @@ class ProotFastPathTest { private val root = File("/data/data/com.droiddeck.launcher/files/linuxfs") @Test fun aSessionsUsualBindsGetAKey() { - // 87 on a device with two Games folders: past the old limit of 64, which dropped them. val binds = (1..87).map { "/host/$it:/guest/$it" } assertNotNull(ProotFastPath.key(root, binds)) } diff --git a/app/src/test/java/com/droiddeck/launcher/runtime/RuntimeRemovalTest.kt b/app/src/test/java/com/droiddeck/launcher/runtime/RuntimeRemovalTest.kt index 178e34d29d..318e6b9804 100644 --- a/app/src/test/java/com/droiddeck/launcher/runtime/RuntimeRemovalTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/runtime/RuntimeRemovalTest.kt @@ -107,7 +107,6 @@ class RuntimeRemovalTest { follower.join(5000) assertEquals(true, result.get()) assertEquals(true, followerResult.get()) - // The last stage is "Linux runtime removed", the only one reported at 100. assertEquals(100, percents.last()) assertFalse(root.exists()) assertFalse(File(dir, "linuxfs.removing").exists()) @@ -131,7 +130,6 @@ class RuntimeRemovalTest { val root = runtime() try { val removal = LinuxRuntimeInstaller.beginUninstall(null, root)!! - // The first stage names the removal, the second counts its first entry. var stages = 0 assertFalse(removal.run { _, _ -> if (++stages == 2) @@ -170,12 +168,10 @@ class RuntimeRemovalTest { assertNull(LinuxRuntimeInstaller.removalError()) assertFalse(root.exists()) assertFalse(File(dir, "linuxfs.removing").exists()) - // Only the undeletable entry and its parents remain, out of the way. val trash = File(dir, LinuxRuntimeInstaller.TRASH) assertEquals(listOf(".steampath"), trash.walk().filter { it.isFile }.map { it.name }.toList()) assertEquals(setOf(LinuxRuntimeInstaller.TRASH), dir.list()!!.toSet()) - // Once it can be deleted, the next removal clears the trash too. RuntimeFileTree.refuseForTest = null assertTrue(LinuxRuntimeInstaller.beginUninstall(null, root)!!.run(null)) assertFalse(trash.exists()) diff --git a/app/src/test/java/com/droiddeck/launcher/runtime/RuntimeRemovalUiTest.kt b/app/src/test/java/com/droiddeck/launcher/runtime/RuntimeRemovalUiTest.kt index 7485495609..8f690302d5 100644 --- a/app/src/test/java/com/droiddeck/launcher/runtime/RuntimeRemovalUiTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/runtime/RuntimeRemovalUiTest.kt @@ -35,7 +35,6 @@ class RuntimeRemovalUiTest { try { val activity = Robolectric.buildActivity(SessionActivity::class.java).create() assertTrue(activity.get().isFinishing) - // Even lifecycle callbacks delivered after finish must not touch uninitialised UI. activity.start().resume().pause().stop().destroy() assertFalse(SessionState.running) assertEquals(SessionPhase.IDLE, SessionState.phase) diff --git a/app/src/test/java/com/droiddeck/launcher/session/AddedGameMoveTest.kt b/app/src/test/java/com/droiddeck/launcher/session/AddedGameMoveTest.kt new file mode 100644 index 0000000000..c549adf595 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/AddedGameMoveTest.kt @@ -0,0 +1,69 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import org.junit.Assert.assertEquals +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class AddedGameMoveTest { + private val app get() = RuntimeEnvironment.getApplication() + private val prefs get() = app.getSharedPreferences("session", Context.MODE_PRIVATE) + private val from = "/data/root/Games/Stores/Epic/Fig" + private val to = "/storage/emulated/0/Games/Games/Epic/Fig" + + @Test + fun settingsOfTheOldFolderMoveToTheNewOne() { + val all = mapOf( + "addedAppId:$from" to 3703311242L, + "addedExe:$from" to "$from/Fig.exe", + "addedExeSeen:$from" to 2, + "addedArt:hero:$from" to "https://cdn/hero.png", + "addedAdopted:exe:$from" to from, + "addedAppId:$from-2" to 5L, + "addedName:/other" to "Other", + "theme" to "graphite", + ) + assertEquals( + mapOf( + "addedAppId:$from" to ("addedAppId:$to" to 3703311242L), + "addedExe:$from" to ("addedExe:$to" to "$to/Fig.exe"), + "addedExeSeen:$from" to ("addedExeSeen:$to" to 2), + "addedArt:hero:$from" to ("addedArt:hero:$to" to "https://cdn/hero.png"), + "addedAdopted:exe:$from" to ("addedAdopted:exe:$to" to to), + ), + SessionPrefs.movedAddedGame(all, from, to), + ) + } + + @Test + fun nothingMovesWithoutSettings() { + assertEquals(emptyMap<String, Pair<String, Any?>>(), SessionPrefs.movedAddedGame(mapOf("theme" to "x"), from, to)) + } + + @Test + fun aMovedStoreGameKeepsItsAppIdAndRemoval() { + SessionPrefs.followStoreGame(app, "epic:fig", from) { true } + assertEquals(3703311242L, SessionPrefs.addedGameAppId(app, from, 3703311242L)) + SessionPrefs.setAddedGameExe(app, from, "$from/Fig.exe") + SessionPrefs.setAddedGameRemoved(app, from, true) + SessionPrefs.followStoreGame(app, "epic:fig", to) { true } + assertEquals(3703311242L, SessionPrefs.addedGameAppId(app, to, 1L)) + assertEquals("$to/Fig.exe", SessionPrefs.addedGameExe(app, to)) + assertEquals(listOf(to), SessionPrefs.removedAddedGames(app)) + assertEquals(false, prefs.contains("addedAppId:$from")) + } + + @Test + fun aCopyThatIsStillThereKeepsItsOwnSettings() { + SessionPrefs.followStoreGame(app, "epic:fig", from) { false } + SessionPrefs.addedGameAppId(app, from, 7L) + SessionPrefs.followStoreGame(app, "epic:fig", to) { false } + assertEquals(9L, SessionPrefs.addedGameAppId(app, to, 9L)) + assertEquals(7L, SessionPrefs.addedGameAppId(app, from, 1L)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/BatteryComponentTest.kt b/app/src/test/java/com/droiddeck/launcher/session/BatteryComponentTest.kt index fd820e22b5..0c94f8225c 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/BatteryComponentTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/BatteryComponentTest.kt @@ -41,6 +41,14 @@ class BatteryComponentTest { assertTelemetry(supplies, vpower) } + @Test fun vendorsReportingMilliampsGetTheSameEstimatesAsMicroamps() { + val supplies = tmp.newFolder("power_supply") + val vpower = tmp.newFolder("vpower") + start(supplies, vpower, -2_000L) + assertTelemetry(supplies, vpower) + assertEquals("-2000000", File(supplies, "BAT1/current_now").readText().trim()) + } + private fun start(supplies: File, vpower: File, currentUa: Long) { val context = RuntimeEnvironment.getApplication() context.sendStickyBroadcast(Intent(Intent.ACTION_BATTERY_CHANGED).apply { @@ -61,7 +69,6 @@ class BatteryComponentTest { val discovered = supplies.listFiles()!!.filter { it.name.contains("BAT") } assertEquals(listOf("BAT1"), discovered.map { it.name }) fun read(name: String) = File(discovered.single(), name).readText().trim().toLong() - // One 4 Ah battery at 4 V drawing 2 A: 8 W and two hours, regardless of vendor current sign. assertEquals(8_000_000L, read("power_now")) assertEquals(16_000_000L, read("energy_now")) assertEquals(7200L, read("time_to_empty_now")) diff --git a/app/src/test/java/com/droiddeck/launcher/session/BootMovieTest.kt b/app/src/test/java/com/droiddeck/launcher/session/BootMovieTest.kt new file mode 100644 index 0000000000..5518870e30 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/BootMovieTest.kt @@ -0,0 +1,99 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class BootMovieTest { + private val app get() = RuntimeEnvironment.getApplication() + private val custom get() = File(app.filesDir, "boot-movie/custom.webm") + + @Before fun clear() { + app.getSharedPreferences("session", Context.MODE_PRIVATE).edit().clear().commit() + File(app.filesDir, "boot-movie").deleteRecursively() + } + + @Test fun defaultsToThe30FpsMovieWithSound() { + assertEquals(BootMovie.DROIDDECK_30, BootMovie.choice(app)) + assertTrue(SessionPrefs.bootMovieSound(app)) + assertNull(BootMovie.customName(app)) + } + + @Test fun customFallsBackWhenItsFileIsMissing() { + SessionPrefs.setBootMovie(app, BootMovie.CUSTOM) + assertEquals(BootMovie.DROIDDECK_30, BootMovie.choice(app)) + + custom.parentFile!!.mkdirs() + custom.writeText("movie") + SessionPrefs.setBootMovieCustomName(app, "intro.webm") + assertEquals(BootMovie.CUSTOM, BootMovie.choice(app)) + assertEquals("intro.webm", BootMovie.customName(app)) + } + + @Test fun unknownChoiceFallsBack() { + SessionPrefs.setBootMovie(app, "dd120") + assertEquals(BootMovie.DROIDDECK_30, BootMovie.choice(app)) + SessionPrefs.setBootMovie(app, BootMovie.DROIDDECK_60) + assertEquals(BootMovie.DROIDDECK_60, BootMovie.choice(app)) + } + + @Test fun removingTheCustomMovieReturnsToTheDefault() { + custom.parentFile!!.mkdirs() + custom.writeText("movie") + File(custom.parentFile, "custom-muted.webm").writeText("muted") + SessionPrefs.setBootMovieCustomName(app, "intro.webm") + SessionPrefs.setBootMovie(app, BootMovie.CUSTOM) + + BootMovie.removeCustom(app) + + assertFalse(custom.exists()) + assertFalse(File(custom.parentFile, "custom-muted.webm").exists()) + assertNull(BootMovie.customName(app)) + assertEquals(BootMovie.DROIDDECK_30, SessionPrefs.bootMovie(app)) + } + + @Test fun unreadableImportsAreRefused() { + val junk = File(app.cacheDir, "junk.webm") + junk.writeBytes(ByteArray(1024)) + assertEquals(BootMovie.Import.Unsupported(null), BootMovie.import(app, junk)) + assertFalse(custom.exists()) + } + + @Test fun convertedMoviesFitA720pBoxAndKeepTheirShape() { + fun size(w: Int, h: Int, r: Int) = BootMovieTranscoder.layout(w, h, r).let { it.width to it.height } + assertEquals(1280 to 720, size(3840, 2160, 0)) + assertEquals(640 to 480, size(640, 480, 180)) + assertEquals(960 to 720, size(1440, 1080, 0)) + } + + @Test fun portraitMoviesArePillarboxedInto16x9() { + for (layout in listOf(BootMovieTranscoder.layout(1920, 1080, 90), BootMovieTranscoder.layout(1080, 1920, 0))) { + assertEquals(1280, layout.width) + assertEquals(720, layout.height) + assertEquals(404 to 720, layout.contentWidth to layout.contentHeight) + assertEquals(438, layout.x) + } + } + + @Test fun audioIsResampledTo48kHz() { + val stereo = ShortArray(44_100 * 2) { if (it % 2 == 0) 1000 else -1000 } + val out = BootMovieTranscoder.resample(stereo, 2, 44_100) + assertEquals(48_000 * 2, out.size) + assertTrue(out.withIndex().all { (i, v) -> v == (if (i % 2 == 0) 1000 else -1000).toShort() }) + assertSame(stereo, BootMovieTranscoder.resample(stereo, 2, 48_000)) + } + + @Test fun resetCoversTheChoiceButNotTheImportedName() { + assertTrue(SettingsReset.isSessionSetting("bootMovie")) + assertTrue(SettingsReset.isSessionSetting("bootMovieSound")) + assertFalse(SettingsReset.isSessionSetting("bootMovieCustomName")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/ComponentsProcessTest.kt b/app/src/test/java/com/droiddeck/launcher/session/ComponentsProcessTest.kt new file mode 100644 index 0000000000..f1a37e5f92 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/ComponentsProcessTest.kt @@ -0,0 +1,39 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test + +class ComponentsProcessTest { + private val guestPath = "/root/.local/share/Steam/steamapps/common/Proton" + private val hostPath = "/data/user/0/com.droiddeck.launcher/files/root/root/.local/share/Steam/steamapps/common/Proton" + + @Test + fun `running game is recognized through guest path`() { + val command = "python3 $guestPath/proton waitforexitandrun game.exe" + + assertTrue(ComponentsManager.processUsesProton(listOf(guestPath, hostPath), command, gameOnly = true)) + } + + @Test + fun `running game is recognized through Android host path`() { + val command = "python3 $hostPath/proton waitforexitandrun game.exe" + + assertTrue(ComponentsManager.processUsesProton(listOf(guestPath, hostPath), command, gameOnly = true)) + } + + @Test + fun `Steam startup Proton process is not reported as a running game`() { + val command = "python3 $hostPath/proton run wineboot.exe" + + assertFalse(ComponentsManager.processUsesProton(listOf(guestPath, hostPath), command, gameOnly = true)) + assertTrue(ComponentsManager.processUsesProton(listOf(guestPath, hostPath), command, gameOnly = false)) + } + + @Test + fun `unrelated Proton process is ignored`() { + val command = "python3 /other/Proton/proton waitforexitandrun game.exe" + + assertFalse(ComponentsManager.processUsesProton(listOf(guestPath, hostPath), command, gameOnly = true)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/CoreAllocationPrefsTest.kt b/app/src/test/java/com/droiddeck/launcher/session/CoreAllocationPrefsTest.kt new file mode 100644 index 0000000000..8a25bf4e72 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/CoreAllocationPrefsTest.kt @@ -0,0 +1,49 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import com.droiddeck.launcher.core.CpuAllocationDefaults +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class CoreAllocationPrefsTest { + private val app get() = RuntimeEnvironment.getApplication() + private val defaults = CpuAllocationDefaults.Allocation("7", "3,4,5,6") + private val saved get() = app.getSharedPreferences("session", Context.MODE_PRIVATE) + + @Before fun clear() { saved.edit().clear().commit() } + + @Test fun absentPreferencesUseTheDeviceDefaultWithoutWritingIt() { + assertEquals(SessionPrefs.CoreAllocation(true, "7", "3,4,5,6"), SessionPrefs.coreAllocation(app, defaults)) + assertTrue(saved.all.isEmpty()) + assertEquals(SessionPrefs.CoreAllocation(false, "", ""), SessionPrefs.coreAllocation(app, null)) + } + + @Test fun explicitDisableAndAllCoreChoicesSurviveAnUpdate() { + saved.edit().putBoolean("clientCpusOverride", false).putString("clientCpus", "").putString("gameCpus", "").commit() + assertEquals(SessionPrefs.CoreAllocation(false, "", ""), SessionPrefs.coreAllocation(app, defaults)) + } + + @Test fun existingCustomMasksArePreserved() { + saved.edit().putBoolean("clientCpusOverride", true).putString("clientCpus", "0,1").putString("gameCpus", "2,7").commit() + assertEquals(SessionPrefs.CoreAllocation(true, "0,1", "2,7"), SessionPrefs.coreAllocation(app, defaults)) + } + + @Test fun anOldClientMaskIsNotEnabledWithoutAnOverrideChoice() { + saved.edit().putString("clientCpus", "0,1").commit() + assertEquals(SessionPrefs.CoreAllocation(false, "0,1", "3,4,5,6"), SessionPrefs.coreAllocation(app, defaults)) + } + + @Test fun changingOneChoiceDoesNotReplaceTheOtherDefaults() { + SessionPrefs.setGameCpus(app, "0,1,2,3,4,5,6,7") + assertEquals(SessionPrefs.CoreAllocation(true, "7", "0,1,2,3,4,5,6,7"), SessionPrefs.coreAllocation(app, defaults)) + SessionPrefs.setClientCpusOverride(app, false) + assertEquals(SessionPrefs.CoreAllocation(false, "7", "0,1,2,3,4,5,6,7"), SessionPrefs.coreAllocation(app, defaults)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/FexCatalogTest.kt b/app/src/test/java/com/droiddeck/launcher/session/FexCatalogTest.kt new file mode 100644 index 0000000000..3f4fa2f75d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/FexCatalogTest.kt @@ -0,0 +1,46 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class FexCatalogTest { + private val sha = "0fc1ca2ba13817ad70d1ea157119a75c9c02446b57d166e6d676cce0807c19c4" + private val url = "https://github.com/Droid-Deck/DroidDeck-Components/releases/download/fex-2610-r5/fex.tzst" + + private fun json(release: String = "fex-2610-r5", url: String = this.url, sha256: String = sha) = + """{"schemaVersion": 1, "category": "fex", "release": "$release", "url": "$url", "sha256": "$sha256", "size": 4083539}""" + + @Test fun readsTheBuildComponentsNames() { + assertEquals(FexCatalog.Build("fex-2610-r5", url, sha), FexCatalog.parse(json())) + } + + @Test fun readsTheSingleReleaseByItsVersion() { + val single = "https://github.com/Droid-Deck/DroidDeck-Components/releases/download/fex/fex.tzst" + assertEquals(FexCatalog.Build("fex-2610-r6", single, sha), FexCatalog.parse(json(release = "fex", url = single).replace("}", ", \"version\": \"2610-r6\"}"))) + assertNull(FexCatalog.parse(json(release = "fex", url = single).replace("}", ", \"version\": \"latest\"}"))) + assertNull(FexCatalog.parse(json(release = "fex", url = single))) + } + + @Test fun refusesAnArchiveOutsideItsOwnRelease() { + assertNull(FexCatalog.parse(json(url = "https://example.com/fex.tzst"))) + assertNull(FexCatalog.parse(json(url = url.replace("fex-2610-r5/", "fex-2610-r4/")))) + assertNull(FexCatalog.parse(json(release = "latest", url = url.replace("fex-2610-r5", "latest")))) + } + + @Test fun refusesAMissingOrMalformedDigest() { + assertNull(FexCatalog.parse(json(sha256 = "abc"))) + assertNull(FexCatalog.parse("""{"release": "fex-2610-r5", "url": "$url"}""")) + assertNull(FexCatalog.parse("not json")) + } + + @Test fun theSessionGetsTheBuildAndEverySource() { + val env = FexCatalog.environment(FexCatalog.Build("fex-2610-r5", url, sha), listOf(url, "https://ghfast.top/$url")) + assertEquals(listOf("BL_FEX_TAG=fex-2610-r5", "BL_FEX_SHA256=$sha", "BL_FEX_URLS=$url https://ghfast.top/$url"), env) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/ForcedPackageTest.kt b/app/src/test/java/com/droiddeck/launcher/session/ForcedPackageTest.kt index 1ce0fc1446..3f5e6e8e41 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/ForcedPackageTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/ForcedPackageTest.kt @@ -2,7 +2,10 @@ package com.droiddeck.launcher.session import android.content.Context import com.droiddeck.launcher.gpu.GpuInfo +import com.droiddeck.launcher.core.Hashes import com.droiddeck.launcher.runtime.LinuxRuntime +import com.github.luben.zstd.ZstdOutputStream +import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream import org.json.JSONArray import org.json.JSONObject import org.junit.Assert.* @@ -89,6 +92,283 @@ class ForcedPackageTest { assertNull(install(gpu(650, GpuInfo.Family.A6XX))) } + @Test fun gameComponentProfilesReadOnlyKnownComponents() { + val state = File(context.filesDir, "components/state.json") + state.parentFile!!.mkdirs() + state.writeText(JSONObject() + .put("active", JSONObject()) + .put("queued", JSONObject()) + .put("profiles", JSONObject().put("42", JSONObject() + .put("fex", "fex.wcp") + .put("dxvk", "dxvk.wcp") + .put("unknown", "ignored.wcp"))) + .toString()) + + assertEquals(mapOf("fex" to "fex.wcp", "dxvk" to "dxvk.wcp"), ComponentsManager.gameComponents(context, "42")) + assertTrue(ComponentsManager.gameComponents(context, "43").isEmpty()) + } + + @Test fun removingLastGameOverrideKeepsBundledComponentRestoreRow() { + val protonName = "proton-exp" + proton(protonName) + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + + ComponentsManager.clearGameComponents(context, "42") + + assertFalse(ComponentsManager.gameComponents(context, "42").containsKey("dxvk")) + assertDefaultDxvkRestoreRow(protonName) + } + + @Test fun usingDefaultForLastGameOverrideKeepsBundledComponentRestoreRow() { + val protonName = "proton-exp" + proton(protonName) + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + + ComponentsManager.setGameComponent(context, "42", "dxvk", null) + + assertFalse(ComponentsManager.gameComponents(context, "42").containsKey("dxvk")) + assertDefaultDxvkRestoreRow(protonName) + } + + @Test fun aNewProtonIsCapturedWhenTheLastOverrideIsReset() { + proton("existing") + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + ComponentsManager.snapshotAll(context) + proton("new-proton") + + ComponentsManager.clearGameComponents(context, "42") + + assertDefaultDxvkRestoreRow("existing") + assertDefaultDxvkRestoreRow("new-proton") + } + + @Test fun anUpdatedBuildIsCapturedEvenAfterTheLastProfileWasRemoved() { + proton("proton-exp") + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + ComponentsManager.clearGameComponents(context, "42") + proton("proton-exp", "experimental-12") + + ComponentsManager.setGameComponent(context, "43", "dxvk", null) + + assertDefaultDxvkRestoreRow("proton-exp", "experimental-12") + assertTrue(original("proton-exp", "experimental-11").isFile) + assertTrue(original("proton-exp", "experimental-12").isFile) + } + + @Test fun aKnownEmptyComponentHasAnExplicitOriginalBundle() { + proton("proton-exp", dxvk = false) + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + + ComponentsManager.clearGameComponents(context, "42") + + assertTrue(original("proton-exp").isFile) + val rows = launchState().readLines().map { it.split('\t') } + assertEquals(14, rows.size) + assertTrue(rows.all { it[3] == "dxvk" && it[5] == "-" && it[6] == "-" }) + } + + @Test fun missingOriginalsCannotBeRecapturedFromPreviouslyProfiledFiles() { + proton("proton-exp") + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + val saved = File(context.filesDir, "components/state.json").readText() + val prior = "42\tproton-exp\texperimental-11\tdxvk\tfiles/lib/wine/dxvk/aarch64-windows/d3d11.dll\t-\t-\n" + launchState().apply { parentFile!!.mkdirs(); writeText(prior) } + + assertThrows(IllegalStateException::class.java) { + ComponentsManager.setGameComponent(context, "42", "dxvk", null) + } + + assertEquals(saved, File(context.filesDir, "components/state.json").readText()) + assertEquals(prior, launchState().readText()) + assertFalse(original("proton-exp").isFile) + } + + @Test fun aBrokenOriginalDoesNotPublishDeletionRowsOrRemoveThePreviousStore() { + proton("proton-exp") + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + val state = File(context.filesDir, "components/state.json") + val saved = state.readText() + val prior = "*\tother\tbuild\tdxvk\tfiles/old.dll\told-hash\t/old.dll\n" + launchState().apply { parentFile!!.mkdirs(); writeText(prior) } + val oldSource = File(launchState().parentFile, "store/old/files/old.dll") + oldSource.apply { parentFile!!.mkdirs(); writeText("old component") } + original("proton-exp").apply { parentFile!!.mkdirs(); writeText("not a bundle") } + + assertThrows(java.io.IOException::class.java) { + ComponentsManager.clearGameComponents(context, "42") + } + + assertEquals(saved, state.readText()) + assertEquals(prior, launchState().readText()) + assertEquals("old component", oldSource.readText()) + } + + @Test fun anArchiveWithoutAProfileIsNotAKnownEmptyOriginal() { + proton("proton-exp") + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + val bundle = original("proton-exp") + bundle.parentFile!!.mkdirs() + TarArchiveOutputStream(ZstdOutputStream(bundle.outputStream())).use { } + + assertThrows(IllegalArgumentException::class.java) { + ComponentsManager.clearGameComponents(context, "42") + } + + assertFalse(launchState().exists()) + assertEquals("custom-dxvk.wcp", ComponentsManager.gameComponents(context, "42")["dxvk"]) + } + + @Test fun aFailedStateCommitIsRecoveredBeforeSelectionsCanBeRead() { + proton("proton-exp") + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + val state = File(context.filesDir, "components/state.json") + val saved = state.readText() + val blocked = File(context.filesDir, "components/state.json.tmp") + blocked.mkdir() + val blocker = File(blocked, "blocker").apply { writeText("keep directory nonempty") } + val oldSource = File(launchState().parentFile, "store/old/files/old.dll").apply { + parentFile!!.mkdirs() + writeText("old component") + } + + assertThrows(java.io.IOException::class.java) { + ComponentsManager.clearGameComponents(context, "42") + } + + assertEquals(saved, state.readText()) + assertTrue(pendingState().isFile) + assertTrue(launchState().isFile) + assertEquals(Hashes.sha256(launchState()), JSONObject(pendingState().readText()).getString("launchSha256")) + assertEquals("old component", oldSource.readText()) + assertThrows(java.io.IOException::class.java) { + ComponentsManager.gameComponents(context, "42") + } + assertTrue(pendingState().isFile) + + assertTrue(blocker.delete()) + assertTrue(blocked.delete()) + assertTrue(ComponentsManager.gameComponents(context, "42").isEmpty()) + assertFalse(pendingState().exists()) + assertDefaultDxvkRestoreRow("proton-exp") + assertTrue(ComponentsManager.gameComponents(context, "42").isEmpty()) + ComponentsManager.snapshotAll(context) + assertFalse(oldSource.exists()) + assertDefaultDxvkRestoreRow("proton-exp") + } + + @Test fun aFailedLaunchPublicationRetainsTheOldSelectionsAndStore() { + proton("proton-exp") + writeGameProfile("42", "dxvk", "custom-dxvk.wcp") + val state = File(context.filesDir, "components/state.json") + val saved = state.readText() + launchState().mkdirs() + val blocker = File(launchState(), "blocker").apply { writeText("block rename") } + val oldSource = File(launchState().parentFile, "store/old/files/old.dll").apply { + parentFile!!.mkdirs() + writeText("old component") + } + + assertThrows(IllegalStateException::class.java) { + ComponentsManager.clearGameComponents(context, "42") + } + + assertEquals(saved, state.readText()) + assertTrue(pendingState().isFile) + assertEquals("custom-dxvk.wcp", ComponentsManager.gameComponents(context, "42")["dxvk"]) + assertFalse(pendingState().exists()) + assertEquals("old component", oldSource.readText()) + assertTrue(blocker.delete()) + assertTrue(launchState().delete()) + + ComponentsManager.clearGameComponents(context, "42") + + assertTrue(ComponentsManager.gameComponents(context, "42").isEmpty()) + assertFalse(oldSource.exists()) + assertDefaultDxvkRestoreRow("proton-exp") + } + + @Test fun interruptionBeforePublicationDiscardsOnlyThePendingSelections() { + writeGameProfile("42", "dxvk", "old-dxvk.wcp") + val state = File(context.filesDir, "components/state.json") + val saved = state.readText() + val next = JSONObject(saved).apply { + getJSONObject("profiles").getJSONObject("42").put("dxvk", "new-dxvk.wcp") + } + val staged = File(launchState().parentFile, "desired.tsv.tmp").apply { + parentFile!!.mkdirs() + writeText("new launch table") + } + launchState().writeText("old launch table") + writePendingState(next, staged) + + assertEquals("old-dxvk.wcp", ComponentsManager.gameComponents(context, "42")["dxvk"]) + assertEquals(saved, state.readText()) + assertEquals("old launch table", launchState().readText()) + assertFalse(pendingState().exists()) + assertFalse(staged.exists()) + } + + @Test fun identicalLaunchTablesDoNotCommitUnpublishedSettings() { + writeGameProfile("42", "dxvk", "old-dxvk.wcp") + val state = File(context.filesDir, "components/state.json") + val saved = state.readText() + val next = JSONObject(saved).put("queued", JSONObject().put("proton-exp", JSONObject())) + val staged = File(launchState().parentFile, "desired.tsv.tmp").apply { + parentFile!!.mkdirs() + writeText("unchanged launch table") + } + launchState().writeText(staged.readText()) + writePendingState(next, staged) + + assertEquals("old-dxvk.wcp", ComponentsManager.gameComponents(context, "42")["dxvk"]) + assertEquals(saved, state.readText()) + assertFalse(pendingState().exists()) + assertFalse(staged.exists()) + } + + @Test fun interruptionAfterPublicationRecoversAllSelectionsAndIsIdempotent() { + writeGameProfile("42", "dxvk", "old-dxvk.wcp") + val next = JSONObject() + .put("active", JSONObject().put("proton-exp", JSONObject().put("dxvk", JSONObject().put("file", dxvk2)))) + .put("queued", JSONObject().put("proton-exp", JSONObject().put("fex", JSONObject().put("file", "fex.wcp")))) + .put("profiles", JSONObject() + .put("42", JSONObject().put("dxvk", "new-dxvk.wcp")) + .put("43", JSONObject().put("fex", "fex.wcp"))) + .put("profiledComponents", JSONArray(listOf("dxvk", "fex"))) + launchState().apply { parentFile!!.mkdirs(); writeText("published launch table") } + writePendingState(next, launchState()) + + assertEquals("new-dxvk.wcp", ComponentsManager.gameComponents(context, "42")["dxvk"]) + assertEquals("fex.wcp", ComponentsManager.gameComponents(context, "43")["fex"]) + assertEquals(next.toString(2), File(context.filesDir, "components/state.json").readText()) + assertFalse(pendingState().exists()) + assertEquals("published launch table", launchState().readText()) + assertEquals("new-dxvk.wcp", ComponentsManager.gameComponents(context, "42")["dxvk"]) + } + + @Test fun aPendingTransactionAfterTheStateCommitCanBeRecoveredAgain() { + writeGameProfile("42", "dxvk", "new-dxvk.wcp") + val state = File(context.filesDir, "components/state.json") + val next = JSONObject(state.readText()) + launchState().apply { parentFile!!.mkdirs(); writeText("published launch table") } + writePendingState(next, launchState()) + + assertEquals("new-dxvk.wcp", ComponentsManager.gameComponents(context, "42")["dxvk"]) + assertEquals(next.toString(2), state.readText()) + assertFalse(pendingState().exists()) + } + + @Test fun anUnreadableRecoveryRecordDoesNotSilentlyReturnStaleSelections() { + writeGameProfile("42", "dxvk", "old-dxvk.wcp") + pendingState().writeText("incomplete recovery record") + + assertThrows(org.json.JSONException::class.java) { + ComponentsManager.gameComponents(context, "42") + } + + assertTrue(pendingState().isFile) + } + @Test fun theSamePackageOnThisProtonBuildIsNotFetchedAgain() { proton("proton-exp") writeState("proton-exp", dxvk2, "experimental-11") @@ -204,11 +484,57 @@ class ForcedPackageTest { private fun refuseApply(protonId: String, file: String): String = error("apply $protonId $file") - private fun proton(name: String, version: String = "experimental-11") { + private fun writeGameProfile(scope: String, comp: String, file: String) { + val state = File(context.filesDir, "components/state.json") + state.parentFile!!.mkdirs() + state.writeText( + JSONObject() + .put("active", JSONObject()) + .put("queued", JSONObject()) + .put("profiles", JSONObject().put(scope, JSONObject().put(comp, file))) + .toString(), + ) + } + + private fun launchState() = File(LinuxRuntime.rootDir(context), "root/.local/share/droiddeck-components/desired.tsv") + + private fun pendingState() = File(context.filesDir, "components/state.pending.json") + + private fun writePendingState(state: JSONObject, launch: File) { + pendingState().writeText(JSONObject() + .put("state", state) + .put("launchSha256", Hashes.sha256(launch)) + .toString()) + } + + private fun original(protonName: String, version: String = "experimental-11") = + File(context.filesDir, "components/originals/$protonName/$version/dxvk.wcp") + + private fun assertDefaultDxvkRestoreRow(protonName: String, version: String = "experimental-11") { + val row = launchState().readLines().map { it.split('\t') }.single { + it.size == 7 && it[0] == "*" && it[1] == protonName && it[2] == version && + it[3] == "dxvk" && it[4].endsWith("/aarch64-windows/d3d11.dll") + } + assertNotEquals("-", row[6]) + val source = File(LinuxRuntime.rootDir(context), row[6].removePrefix("/")) + assertEquals("bundled DXVK $version", source.readText()) + assertEquals(Hashes.sha256(source), row[5]) + assertTrue(original(protonName, version).isFile) + val state = JSONObject(File(context.filesDir, "components/state.json").readText()) + assertEquals(listOf("dxvk"), state.getJSONArray("profiledComponents").let { values -> + (0 until values.length()).map(values::getString) + }) + } + + private fun proton(name: String, version: String = "experimental-11", dxvk: Boolean = true) { val dir = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/steamapps/common/$name") File(dir, "files/lib/wine").mkdirs() File(dir, "proton").writeText("#!/bin/sh\n") File(dir, "version").writeText("1 $version\n") + if (dxvk) File(dir, "files/lib/wine/dxvk/aarch64-windows/d3d11.dll").apply { + parentFile!!.mkdirs() + writeText("bundled DXVK $version") + } } private fun writeState(protonId: String, file: String, protonVersion: String) { diff --git a/app/src/test/java/com/droiddeck/launcher/session/GameEnvironmentStoreTest.kt b/app/src/test/java/com/droiddeck/launcher/session/GameEnvironmentStoreTest.kt index 07cbc6efe9..6645c6ee17 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/GameEnvironmentStoreTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/GameEnvironmentStoreTest.kt @@ -60,7 +60,6 @@ class GameEnvironmentStoreTest { "d3d9.samplerAnisotropy = 16; d3d11.samplerAnisotropy = 16; d3d9.samplerLodBias = -0.58; d3d11.samplerLodBias = -0.58", json.getString(GameEnvironmentStore.DXVK_CONFIG), ) - // The user's own entry is untouched; the launcher appends the options at launch. assertEquals("dxvk.tearFree = True", json.getJSONObject("shared").getString("DXVK_CONFIG")) assertEquals(GameEnvironment.Config(shared = mapOf("DXVK_CONFIG" to "dxvk.tearFree = True")), GameEnvironmentStore.read(context)) SessionPrefs.setTextureAnisotropy(context, 0) @@ -69,6 +68,91 @@ class GameEnvironmentStoreTest { SessionState.upscaleRatio = 0f } + @Test fun changingGameFexPresetPreservesDefaultAndOtherGameSettings() { + SessionPrefs.setFexPreset(context, "PERFORMANCE_TSO") + val original = GameEnvironment.withGameFexPreset( + GameEnvironment.Config( + shared = mapOf("PROTON_LOG" to "1"), + games = mapOf("42" to mapOf("DXVK_HUD" to "fps")), + ), + "43", + "COMPATIBILITY", + ) + GameEnvironmentStore.save(context, original) + + GameEnvironmentStore.setGameFexPreset(context, "42", "STABILITY") + + val saved = GameEnvironmentStore.read(context) + assertEquals("STABILITY", GameEnvironment.gameFexPreset(saved, "42")) + assertEquals("fps", saved.entries("42")["DXVK_HUD"]) + assertEquals(original.shared, saved.shared) + assertEquals(original.entries("43"), saved.entries("43")) + assertEquals("PERFORMANCE_TSO", SessionPrefs.fexPreset(context)) + val published = GameEnvironmentStore.decode(JSONObject(guest.readText())) + assertEquals(saved.games, published.games) + assertEquals("0", published.shared["FEX_HALFBARRIERTSOENABLED"]) + assertEquals("1", published.entries("42")["FEX_HALFBARRIERTSOENABLED"]) + } + + @Test fun gameFexDefaultsAndInheritanceRemainDistinct() { + SessionPrefs.setFexPreset(context, "EXTREME") + val original = GameEnvironment.Config( + games = mapOf("42" to mapOf("DXVK_HUD" to "fps")), + ) + GameEnvironmentStore.save(context, original) + + GameEnvironmentStore.setGameFexPreset(context, "42", "") + + val explicitDefaults = GameEnvironmentStore.read(context) + assertEquals("", GameEnvironment.gameFexPreset(explicitDefaults, "42")) + val published = GameEnvironmentStore.decode(JSONObject(guest.readText())) + assertTrue(published.entries("42").containsKey("FEX_SMCCHECKS")) + assertNull(published.entries("42")["FEX_SMCCHECKS"]) + + GameEnvironmentStore.setGameFexPreset(context, "42", null) + + assertEquals(original, GameEnvironmentStore.read(context)) + val inherited = GameEnvironmentStore.decode(JSONObject(guest.readText())) + assertFalse(inherited.entries("42").containsKey("FEX_SMCCHECKS")) + assertEquals("none", inherited.shared["FEX_SMCCHECKS"]) + assertEquals("EXTREME", SessionPrefs.fexPreset(context)) + } + + @Test fun invalidGamePresetEditsCannotChangeSavedOrPublishedSettings() { + val original = GameEnvironment.Config(shared = mapOf("PROTON_LOG" to "1")) + GameEnvironmentStore.save(context, original) + val published = guest.readText() + + assertThrows(IllegalArgumentException::class.java) { + GameEnvironmentStore.setGameFexPreset(context, "", "STABILITY") + } + assertThrows(IllegalArgumentException::class.java) { + GameEnvironmentStore.setGameFexPreset(context, "42", GameEnvironment.CUSTOM_FEX_PRESET) + } + + assertEquals(original, GameEnvironmentStore.read(context)) + assertEquals(published, guest.readText()) + } + + @Test fun targetedFexUpdateDoesNotRestoreEnvironmentClearedByACompletedReset() { + val original = GameEnvironment.withGameFexPreset( + GameEnvironment.Config(games = mapOf("42" to mapOf("DXVK_HUD" to "fps"))), + "42", + "COMPATIBILITY", + ) + GameEnvironmentStore.save(context, original) + val staleEditorSnapshot = GameEnvironmentStore.read(context) + val resetEnvironment = staleEditorSnapshot.withEntries("42", emptyMap()) + GameEnvironmentStore.save(context, resetEnvironment) + + GameEnvironmentStore.setGameFexPreset(context, "43", "PERFORMANCE_TSO") + + val saved = GameEnvironmentStore.read(context) + assertTrue(saved.entries("42").isEmpty()) + assertEquals("PERFORMANCE_TSO", GameEnvironment.gameFexPreset(saved, "43")) + assertFalse(saved.games.containsKey("42")) + } + @Test fun unchosenFexPresetPublishesPerformanceTso() { GameEnvironmentStore.save(context, GameEnvironment.Config()) val shared = JSONObject(guest.readText()).getJSONObject("shared") diff --git a/app/src/test/java/com/droiddeck/launcher/session/GameProfileFollowStateTest.kt b/app/src/test/java/com/droiddeck/launcher/session/GameProfileFollowStateTest.kt new file mode 100644 index 0000000000..c24379faea --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/GameProfileFollowStateTest.kt @@ -0,0 +1,17 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test + +class GameProfileFollowStateTest { + @Test fun reopeningGamesPageResumesFollowingSteamAfterManualInspection() { + val state = GameProfileFollowState() + + state.selectManually() + assertFalse(state.followsSteam) + + state.resumeFollowingSteam() + assertTrue(state.followsSteam) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/GameProfileInventoryCacheTest.kt b/app/src/test/java/com/droiddeck/launcher/session/GameProfileInventoryCacheTest.kt new file mode 100644 index 0000000000..914a7e094d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/GameProfileInventoryCacheTest.kt @@ -0,0 +1,103 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertThrows +import org.junit.Assert.assertTrue +import org.junit.Test +import java.util.concurrent.CountDownLatch +import java.util.concurrent.Executors +import java.util.concurrent.TimeUnit + +class GameProfileInventoryCacheTest { + @Test + fun loadsOnlyOncePerRevision() { + val cache = GameProfileInventoryCache<String>() + var loads = 0 + + assertEquals(listOf("one"), cache.get(0) { loads++; listOf("one") }) + assertEquals(listOf("one"), cache.get(0) { loads++; listOf("two") }) + assertEquals(1, loads) + + assertEquals(listOf("two"), cache.get(1) { loads++; listOf("two") }) + assertEquals(2, loads) + } + + @Test + fun failedLoadIsRetriedInsteadOfCached() { + val cache = GameProfileInventoryCache<String>() + var loads = 0 + + assertThrows(IllegalStateException::class.java) { + cache.get(0) { loads++; error("inventory unavailable") } + } + + assertEquals(listOf("recovered"), cache.get(0) { loads++; listOf("recovered") }) + assertEquals(2, loads) + } + + @Test + fun failedNewRevisionDoesNotReuseThePreviousInventory() { + val cache = GameProfileInventoryCache<String>() + assertEquals(listOf("old"), cache.get(0) { listOf("old") }) + + assertThrows(IllegalStateException::class.java) { + cache.get(1) { error("inventory unavailable") } + } + + assertEquals(listOf("new"), cache.get(1) { listOf("new") }) + assertEquals(listOf("new"), cache.get(1) { error("should use cached inventory") }) + } + + @Test + fun emptyInventoryIsCachedUntilTheRevisionChanges() { + val cache = GameProfileInventoryCache<String>() + + assertEquals(emptyList<String>(), cache.get(0) { emptyList() }) + assertEquals(emptyList<String>(), cache.get(0) { error("should use cached inventory") }) + assertEquals(listOf("installed"), cache.get(1) { listOf("installed") }) + } + + @Test(timeout = 10_000) + fun reopeningDuringAScanQueuesFreshInventoryWithoutWaitingAndRejectsOldResults() { + data class Refresh(val appId: Long, val inventoryRevision: Long) + + val cache = GameProfileInventoryCache<String>() + val coordinator = LatestRequestCoordinator<Refresh>() + val scanStarted = CountDownLatch(1) + val finishScan = CountDownLatch(1) + val worker = Executors.newSingleThreadExecutor() + try { + assertTrue(coordinator.submit(Refresh(42, 0))) + val first = coordinator.takeLatest()!! + val oldInventory = worker.submit<List<String>> { + cache.get(first.value.inventoryRevision) { + scanStarted.countDown() + check(finishScan.await(5, TimeUnit.SECONDS)) + listOf("old") + } + } + assertTrue(scanStarted.await(5, TimeUnit.SECONDS)) + + assertFalse(coordinator.submit(Refresh(42, 1))) + assertFalse(oldInventory.isDone) + assertFalse(coordinator.isLatest(first)) + + finishScan.countDown() + assertEquals(listOf("old"), oldInventory.get(5, TimeUnit.SECONDS)) + assertFalse(coordinator.isLatest(first)) + val reopened = coordinator.takeLatest()!! + val newInventory = worker.submit<List<String>> { + cache.get(reopened.value.inventoryRevision) { listOf("new") } + } + assertEquals(listOf("new"), newInventory.get(5, TimeUnit.SECONDS)) + assertTrue(coordinator.isLatest(reopened)) + assertNull(coordinator.takeLatest()) + } finally { + finishScan.countDown() + worker.shutdownNow() + assertTrue(worker.awaitTermination(5, TimeUnit.SECONDS)) + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/GameProfileManagerTest.kt b/app/src/test/java/com/droiddeck/launcher/session/GameProfileManagerTest.kt new file mode 100644 index 0000000000..77b2895c30 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/GameProfileManagerTest.kt @@ -0,0 +1,103 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import com.droiddeck.launcher.core.GameEnvironment +import com.droiddeck.launcher.runtime.LinuxRuntime +import org.json.JSONObject +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertThrows +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class GameProfileManagerTest { + private lateinit var context: Context + + @Before + fun setUp() { + context = RuntimeEnvironment.getApplication() + context.getSharedPreferences("session", Context.MODE_PRIVATE).edit().clear().commit() + File(context.filesDir, "game-environment.json").delete() + File(context.filesDir, "wincomponents.json").delete() + File(context.filesDir, "components").deleteRecursively() + File(LinuxRuntime.rootDir(context), "root/.local/share/droiddeck-compat").deleteRecursively() + } + + @Test + fun resetClearsOnlyTheSelectedGameProfile() { + val game = "42" + val other = "43" + GameEnvironmentStore.save( + context, + GameEnvironment.Config( + games = mapOf( + game to mapOf("DXVK_HUD" to "fps"), + other to mapOf("DXVK_HUD" to "compiler"), + ), + ), + ) + ProtonDefault.requestGame(context, game, proton("game")) + ProtonDefault.requestGame(context, other, proton("other")) + seedComponentProfiles(game, other) + SessionPrefs.setGameTextureAnisotropy(context, game, 4) + SessionPrefs.setGameTextureAnisotropy(context, other, 8) + WinComponents.setPicks(context, game, listOf("vcrun2022")) + WinComponents.setPicks(context, other, listOf("dotnet48")) + + GameProfileManager.reset(context, game) + + val environment = GameEnvironmentStore.read(context) + assertFalse(environment.games.containsKey(game)) + assertEquals("compiler", environment.entries(other)["DXVK_HUD"]) + assertNull(ProtonDefault.gameChoice(context, game)) + assertEquals("other", ProtonDefault.gameChoice(context, other)?.dir) + assertEquals(emptyMap<String, String>(), ComponentsManager.gameComponents(context, game)) + assertEquals("other.wcp", ComponentsManager.gameComponents(context, other)["dxvk"]) + assertEquals(SessionPrefs.GameTextureFiltering(), SessionPrefs.gameTextureFiltering(context, game)) + assertEquals(8, SessionPrefs.gameTextureFiltering(context, other).anisotropy) + assertEquals(emptyList<String>(), WinComponents.picks(context, game)) + assertEquals(listOf("dotnet48"), WinComponents.picks(context, other)) + } + + @Test + fun resetRejectsEmptyScopeWithoutChangingSharedSettings() { + GameEnvironmentStore.save( + context, + GameEnvironment.Config(shared = mapOf("DXVK_HUD" to "fps")), + ) + + assertThrows(IllegalArgumentException::class.java) { + GameProfileManager.reset(context, "") + } + assertEquals("fps", GameEnvironmentStore.read(context).shared["DXVK_HUD"]) + } + + private fun proton(name: String) = ComponentsManager.Proton( + id = name, + name = name, + dir = File(context.filesDir, name), + guestPath = "/proton/$name", + version = "1", + valve = false, + ) + + private fun seedComponentProfiles(game: String, other: String) { + val components = File(context.filesDir, "components").apply { mkdirs() } + File(components, "state.json").writeText( + JSONObject().put( + "profiles", + JSONObject() + .put(game, JSONObject().put("dxvk", "game.wcp")) + .put(other, JSONObject().put("dxvk", "other.wcp")), + ).toString(), + ) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/GameProfileRefreshStateTest.kt b/app/src/test/java/com/droiddeck/launcher/session/GameProfileRefreshStateTest.kt new file mode 100644 index 0000000000..49d073e8a8 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/GameProfileRefreshStateTest.kt @@ -0,0 +1,48 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test + +class GameProfileRefreshStateTest { + @Test + fun firstFailureKeepsInitialStateWithoutCachedData() { + val state = GameProfileRefreshState<String>().failed() + + assertTrue(state.failed) + assertFalse(state.loaded) + assertNull(state.data) + } + + @Test + fun failureAfterSuccessPreservesCachedData() { + val state = GameProfileRefreshState<String>().succeeded("cached profiles").failed() + + assertTrue(state.failed) + assertTrue(state.loaded) + assertEquals("cached profiles", state.data) + } + + @Test + fun successAfterFailureReplacesCachedDataAndClearsWarning() { + val state = GameProfileRefreshState<String>() + .succeeded("old profiles") + .failed() + .succeeded("new profiles") + + assertFalse(state.failed) + assertTrue(state.loaded) + assertEquals("new profiles", state.data) + } + + @Test + fun retryingClearsWarningWithoutDiscardingCachedData() { + val state = GameProfileRefreshState<String>().succeeded("cached profiles").failed().retrying() + + assertFalse(state.failed) + assertTrue(state.loaded) + assertEquals("cached profiles", state.data) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/GameThreadHintsTest.kt b/app/src/test/java/com/droiddeck/launcher/session/GameThreadHintsTest.kt new file mode 100644 index 0000000000..16f5d7d2cd --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/GameThreadHintsTest.kt @@ -0,0 +1,35 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test + +class GameThreadHintsTest { + @Test fun `a thread joins above 60 percent and leaves under 15`() { + assertEquals(emptySet<Int>(), GameThreadHints.pick(emptySet(), mapOf(1 to 0.55))) + assertEquals(setOf(1), GameThreadHints.pick(emptySet(), mapOf(1 to 0.68))) + // Faster where it was moved, or capped by the display, it stays boosted at 25%... + assertEquals(setOf(1), GameThreadHints.pick(setOf(1), mapOf(1 to 0.25))) + // ...and is let go once it idles. + assertEquals(emptySet<Int>(), GameThreadHints.pick(setOf(1), mapOf(1 to 0.1))) + } + + @Test fun `at most two threads, the boosted ones kept before busier newcomers`() { + val busy = mapOf(1 to 0.2, 2 to 0.9, 3 to 0.8, 4 to 0.7, 5 to 0.95) + assertEquals(setOf(1, 5), GameThreadHints.pick(setOf(1), busy)) + } + + @Test fun `a thread gone from proc is dropped`() { + assertEquals(setOf(2), GameThreadHints.pick(setOf(1, 2), mapOf(2 to 0.7))) + } + + @Test fun `a game at the panel's rate or a fraction of it holds pace`() { + assertTrue(GameThreadHints.holdsPace(119.0, 120.0)) + assertTrue(GameThreadHints.holdsPace(60.5, 120.0)) + assertTrue(GameThreadHints.holdsPace(30.0, 120.0)) + assertFalse(GameThreadHints.holdsPace(92.0, 120.0)) // falling behind: boost + assertFalse(GameThreadHints.holdsPace(105.0, 120.0)) + assertFalse(GameThreadHints.holdsPace(3.0, 120.0)) // headless or loading: boost + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/LatestRequestCoordinatorTest.kt b/app/src/test/java/com/droiddeck/launcher/session/LatestRequestCoordinatorTest.kt new file mode 100644 index 0000000000..12e7397b8e --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/LatestRequestCoordinatorTest.kt @@ -0,0 +1,68 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test + +class LatestRequestCoordinatorTest { + @Test fun coalescesPendingRequestsToTheLatestValue() { + val coordinator = LatestRequestCoordinator<String>() + + assertTrue(coordinator.submit("first")) + val first = coordinator.takeLatest()!! + assertFalse(coordinator.submit("second")) + assertFalse(coordinator.submit("third")) + + assertFalse(coordinator.isLatest(first)) + val latest = coordinator.takeLatest()!! + assertEquals("third", latest.value) + assertTrue(coordinator.isLatest(latest)) + assertNull(coordinator.takeLatest()) + } + + @Test fun requestAfterWorkerBecomesIdleStartsAnotherWorker() { + val coordinator = LatestRequestCoordinator<String>() + + assertTrue(coordinator.submit("first")) + coordinator.takeLatest() + assertNull(coordinator.takeLatest()) + + assertTrue(coordinator.submit("second")) + assertEquals("second", coordinator.takeLatest()!!.value) + } + + @Test fun newerRequestInvalidatesCompletedResultBeforeItIsApplied() { + val coordinator = LatestRequestCoordinator<String>() + + assertTrue(coordinator.submit("first")) + val completed = coordinator.takeLatest()!! + assertFalse(coordinator.submit("second")) + + assertFalse(coordinator.isLatest(completed)) + assertEquals("second", coordinator.takeLatest()!!.value) + } + + @Test fun profileSwitchInvalidatesAnOlderFailedRefresh() { + val coordinator = LatestRequestCoordinator<Long?>() + + assertTrue(coordinator.submit(42L)) + val failedRefresh = coordinator.takeLatest()!! + assertFalse(coordinator.submit(43L)) + + assertFalse(coordinator.isLatest(failedRefresh)) + assertEquals(43L, coordinator.takeLatest()!!.value) + } + + @Test fun repeatedPollDoesNotInvalidateEquivalentInFlightResult() { + val coordinator = LatestRequestCoordinator<String>() + + assertTrue(coordinator.submit("same")) + val inFlight = coordinator.takeLatest()!! + assertFalse(coordinator.submit("same")) + + assertTrue(coordinator.isLatest(inFlight)) + assertEquals("same", coordinator.takeLatest()!!.value) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/NoSteamLaunchTest.kt b/app/src/test/java/com/droiddeck/launcher/session/NoSteamLaunchTest.kt new file mode 100644 index 0000000000..84c995ee23 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/NoSteamLaunchTest.kt @@ -0,0 +1,95 @@ +package com.droiddeck.launcher.session + +import com.droiddeck.launcher.core.GameEnvironment +import com.droiddeck.launcher.frontend.AddedGames +import com.droiddeck.launcher.frontend.Library +import com.droiddeck.launcher.stores.epic.EpicClient +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import java.io.File + +@RunWith(RobolectricTestRunner::class) +class NoSteamLaunchTest { + private val context get() = RuntimeEnvironment.getApplication() + + @After fun clean() { + File(context.filesDir, "game-environment.json").delete() + NoSteamLaunch.names.clear() + } + + private val steamGame = Library.SteamGame(413150, "Stardew Valley", null, "internal") + private val shortcut = Library.SteamGame((2733369024L).toInt(), "Hogwarts Legacy", null, Library.ADDED, source = "epic") + private val launcher = Library.SteamGame(EpicClient.LAUNCHER_APP_ID, Library.EPIC_LAUNCHER_NAME, null, Library.EPIC_LAUNCHER, source = "epic") + + @Test fun eachKindOfGameKeepsTheSettingUnderItsOwnId() { + assertEquals("413150", NoSteamLaunch.scope(steamGame)) + assertEquals("2733369024", NoSteamLaunch.scope(shortcut)) + assertEquals(EpicClient.shortcutAppId.toString(), NoSteamLaunch.scope(launcher)) + assertNull(NoSteamLaunch.scope(Library.SteamGame(0, "nothing", null, "internal"))) + } + + @Test fun theSettingIsRememberedPerGame() { + assertFalse(NoSteamLaunch.enabled(context, shortcut)) + GameEnvironmentStore.setGameNoSteam(context, "2733369024", true) + assertTrue(NoSteamLaunch.enabled(context, shortcut)) + assertTrue(NoSteamLaunch.enabled(context, 2733369024L)) + assertFalse(NoSteamLaunch.enabled(context, steamGame)) + assertFalse(NoSteamLaunch.enabled(context, launcher)) + GameEnvironmentStore.setGameNoSteam(context, EpicClient.shortcutAppId.toString(), true) + assertTrue(NoSteamLaunch.enabled(context, launcher)) + GameEnvironmentStore.setGameNoSteam(context, "2733369024", false) + assertFalse(NoSteamLaunch.enabled(context, shortcut)) + assertTrue(GameEnvironment.gameNoSteam(GameEnvironmentStore.read(context), EpicClient.shortcutAppId.toString())) + } + + @Test fun eachGameStartsInItsOwnProtonOrTheLauncherWithoutSteam() { + val game = AddedGames.Game( + File("/x/Hogwarts Legacy"), "Hogwarts Legacy", File("/x/Hogwarts Legacy/.droiddeck-launch.bat"), + "/mnt/droiddeck-sd/Games/Epic/Hogwarts Legacy/.droiddeck-launch.bat", "/mnt/droiddeck-sd/Games/Epic/Hogwarts Legacy", + 2733369024L, 0L, emptyList(), source = "epic", launchOptions = "-windowed", + ) + val added = NoSteamLaunch.command(shortcut, game)!! + assertEquals(NoSteamLaunch.PROTON_RUN, added.program) + assertEquals( + listOf("--app", "2733369024", "--dir", game.guestDir, "--options", "-windowed", "--", game.guestExe), + added.args, + ) + assertNull(NoSteamLaunch.command(shortcut, null)) + val steam = NoSteamLaunch.command(steamGame, null)!! + assertEquals(listOf("--app", "413150"), steam.args) + val epic = NoSteamLaunch.command(launcher, null)!! + assertEquals(NoSteamLaunch.EPIC to listOf("run"), epic.program to epic.args) + } + + @Test fun anAddedGameOwnedOnSteamUsesItsSteamIdForSettingsAndLaunch() { + val routed = AddedGames.Game( + File("/x/Stardew Valley"), "Stardew Valley", File("/x/Stardew Valley/Stardew Valley.exe"), + "/mnt/droiddeck-sd/Games/Stardew Valley/Stardew Valley.exe", "/mnt/droiddeck-sd/Games/Stardew Valley", + 2733369024L, 413150L, emptyList(), steamAppId = 413150, + ) + assertEquals(413150L, NoSteamLaunch.settingsId(routed)) + val entry = Library.SteamGame(413150, "Stardew Valley", null, Library.ADDED) + assertEquals(NoSteamLaunch.settingsId(routed).toString(), NoSteamLaunch.scope(entry)) + val command = NoSteamLaunch.command(entry, routed)!! + assertEquals(NoSteamLaunch.PROTON_RUN to listOf("--app", "413150"), command.program to command.args) + val plain = AddedGames.Game(File("/x/a"), "a", File("/x/a/a.exe"), "/g/a.exe", "/g", 2733369024L, 0L, emptyList()) + assertEquals(2733369024L, NoSteamLaunch.settingsId(plain)) + } + + @Test fun theRunningSessionIsNamedAfterItsGame() { + val command = NoSteamLaunch.command(steamGame, null)!! + assertNull(NoSteamLaunch.nameFor(command.program, command.args)) + NoSteamLaunch.remember(command) + assertEquals("Stardew Valley", NoSteamLaunch.nameFor(command.program, command.args)) + assertEquals(Library.EPIC_LAUNCHER_NAME, NoSteamLaunch.nameFor(NoSteamLaunch.EPIC, listOf("run"))) + assertNull(NoSteamLaunch.nameFor("/usr/bin/retroarch", emptyList())) + assertNull(NoSteamLaunch.nameFor(NoSteamLaunch.PROTON_RUN, listOf("/x/a.exe"))) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/PerfModeTest.kt b/app/src/test/java/com/droiddeck/launcher/session/PerfModeTest.kt new file mode 100644 index 0000000000..d4afbbfdd6 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/PerfModeTest.kt @@ -0,0 +1,37 @@ +package com.droiddeck.launcher.session + +import android.view.Display +import org.junit.Assert.assertEquals +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import org.robolectric.shadows.ShadowDisplayManager + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [31, 34], manifest = Config.NONE) +class PerfModeTest { + private fun mode(id: Int, hz: Float, width: Int = 1080): Display.Mode = + ShadowDisplayManager.ModeBuilder.modeBuilder(id) + .setWidth(width).setHeight(2520).setRefreshRate(hz).build() + + @Test fun sixtyHzMirrorChoosesSixtyEvenThoughOneTwentyHasMatchingCadence() { + val low = mode(1, 60f) + val high = mode(2, 120f) + assertEquals(low, PerfMode.selectMode(arrayOf(low, high), high, 60, 60f)) + assertEquals(high, PerfMode.selectMode(arrayOf(low, high), low, 0, Float.POSITIVE_INFINITY)) + } + + @Test fun aLowerGameLimitDoesNotOverrideTheGlassesRefreshCeiling() { + val modes = arrayOf(mode(1, 60f), mode(2, 90f), mode(3, 120f)) + assertEquals(modes[0], PerfMode.selectMode(modes, modes[2], 30, 60f)) + assertEquals(modes[1], PerfMode.selectMode(modes, modes[2], 45, 90f)) + } + + @Test fun selectionPreservesResolutionAndUsesTheLowestModeIfTheCapIsUnsupported() { + val low = mode(1, 90f) + val high = mode(2, 120f) + val otherResolution = mode(3, 60f, 720) + assertEquals(low, PerfMode.selectMode(arrayOf(low, high, otherResolution), high, 60, 60f)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/ProtonDefaultTest.kt b/app/src/test/java/com/droiddeck/launcher/session/ProtonDefaultTest.kt index ce830cca8e..fcf85ddb99 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/ProtonDefaultTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/ProtonDefaultTest.kt @@ -1,5 +1,6 @@ package com.droiddeck.launcher.session +import com.droiddeck.launcher.runtime.LinuxRuntime import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Assert.assertNull @@ -7,6 +8,7 @@ import org.junit.Assert.assertTrue import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment import java.io.File @RunWith(RobolectricTestRunner::class) @@ -59,4 +61,46 @@ class ProtonDefaultTest { assertNull(ProtonDefault.chosen(ProtonDefault.parseState("{"), ProtonDefault.parseRequest("[]"))) assertNull(ProtonDefault.parseRequest("""{"seq": 0, "dir": "x"}""")) } + + @Test + fun perGameChoicesPreserveCustomizeAndInheritSemantics() { + val games = ProtonDefault.parseGames( + """{"version":1,"games":{"42":{"valve":false,"dir":"GE-Proton11-7"},"43":null,"0":null,"bad":{},"44":{"valve":"false","dir":"GE-Proton9-1"}}}""", + ) + assertEquals(ProtonDefault.GameChoice(false, "GE-Proton11-7"), games["42"]) + assertTrue(games.containsKey("43")) + assertNull(games["43"]) + assertFalse(games.containsKey("0")) + assertFalse(games.containsKey("bad")) + assertFalse(games.containsKey("44")) + assertTrue(ProtonDefault.parseGames("""{"version":2,"games":{"42":null}}""").isEmpty()) + } + + @Test + fun perGameRequestsPersistCustomizeThenInherit() { + val context = RuntimeEnvironment.getApplication() + val file = File(LinuxRuntime.rootDir(context), "root/.local/share/droiddeck-compat/games.json") + file.parentFile?.deleteRecursively() + val selected = proton("GE-Proton11-7", false) + + ProtonDefault.requestGame(context, "42", selected) + assertEquals(ProtonDefault.GameChoice(false, "GE-Proton11-7"), ProtonDefault.parseGames(file.readText())["42"]) + + ProtonDefault.requestGame(context, "42", null) + val inherited = ProtonDefault.parseGames(file.readText()) + assertTrue(inherited.containsKey("42")) + assertNull(inherited["42"]) + } + + @Test + fun missingPerGameProtonIdentityRemainsStoredButUnresolved() { + val context = RuntimeEnvironment.getApplication() + val file = File(LinuxRuntime.rootDir(context), "root/.local/share/droiddeck-compat/games.json") + file.parentFile?.deleteRecursively() + ProtonDefault.requestGame(context, "42", proton("GE-Proton9-1", false)) + + assertEquals(ProtonDefault.GameChoice(false, "GE-Proton9-1"), ProtonDefault.gameChoice(context, "42")) + assertNull(ProtonDefault.gameSelectedId(context, "42", listOf(proton("GE-Proton11-7", false)))) + assertEquals(ProtonDefault.GameChoice(false, "GE-Proton9-1"), ProtonDefault.parseGames(file.readText())["42"]) + } } diff --git a/app/src/test/java/com/droiddeck/launcher/session/ProtonExtrasTest.kt b/app/src/test/java/com/droiddeck/launcher/session/ProtonExtrasTest.kt new file mode 100644 index 0000000000..0e0f16cf20 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/ProtonExtrasTest.kt @@ -0,0 +1,174 @@ +package com.droiddeck.launcher.session + +import com.droiddeck.launcher.runtime.LinuxRuntime +import org.json.JSONArray +import org.json.JSONObject +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class ProtonExtrasTest { + @get:Rule val temp = TemporaryFolder() + + private fun tool(id: String) = ProtonExtras.tools.single { it.id == id } + + private fun asset(name: String, digest: String? = null) = JSONObject() + .put("name", name) + .put("browser_download_url", "https://github.com/o/r/releases/download/t/$name") + .put("size", 625_775_670L) + .apply { if (digest != null) put("digest", digest) } + + private fun release(tag: String, vararg assets: JSONObject, prerelease: Boolean = false, draft: Boolean = false) = JSONObject() + .put("tag_name", tag).put("prerelease", prerelease).put("draft", draft) + .put("assets", JSONArray().apply { assets.forEach { put(it) } }) + + private fun droiddeckRelease(ver: String, prerelease: Boolean = false) = release( + "DroidDeck-Proton-$ver", + asset("DroidDeck-Proton-$ver-aarch64.build-info.json"), + asset("DroidDeck-Proton-$ver-aarch64.sha512sum"), + asset("DroidDeck-Proton-$ver-aarch64.tar.gz"), + prerelease = prerelease, + ) + + private fun installTool(parent: File, name: String) = File(parent, name).apply { + mkdirs() + File(this, "toolmanifest.vdf").writeText("\"manifest\" { \"commandline\" \"/proton %verb%\" }") + } + + @Test + fun theThreeSourcesInOrder() { + assertEquals(listOf("ge", "cachyos", "droiddeck"), ProtonExtras.tools.map { it.id }) + val droiddeck = tool("droiddeck") + assertEquals("DroidDeck-Proton", droiddeck.name) + assertEquals("DroidDeck-Proton", droiddeck.prefix) + assertEquals("Droid-Deck/DroidDeck-Proton", droiddeck.repo) + assertTrue(droiddeck.assetPattern.containsMatchIn("DroidDeck-Proton-11-7.5-aarch64.tar.gz")) + assertTrue(droiddeck.assetPattern.containsMatchIn("DroidDeck-Proton-11-8-aarch64.tar.xz")) + assertFalse(droiddeck.assetPattern.containsMatchIn("DroidDeck-Proton-11-7.5-aarch64.sha512sum")) + assertFalse(droiddeck.assetPattern.containsMatchIn("DroidDeck-Proton-11-7.5-aarch64.build-info.json")) + assertFalse(tool("cachyos").assetPattern.containsMatchIn("proton-cachyos-11.0-20261005-slr-x86_64.tar.xz")) + } + + @Test + fun theTarballAndItsSha512FileArePicked() { + val picked = ProtonExtras.pickAsset(tool("droiddeck"), JSONArray().put(droiddeckRelease("11-7.5")))!! + assertEquals("DroidDeck-Proton-11-7.5", picked.tag) + assertEquals("DroidDeck-Proton-11-7.5-aarch64.tar.gz", picked.name) + assertEquals("https://github.com/o/r/releases/download/t/DroidDeck-Proton-11-7.5-aarch64.sha512sum", picked.sha512) + assertEquals(625_775_670L, picked.size) + assertNull(picked.sha256) + } + + @Test + fun githubsDigestIsKeptBesideTheSha512File() { + val sum = "ab".repeat(32) + val release = release("GE-Proton11-7", asset("GE-Proton11-7-x86_64.tar.gz"), asset("GE-Proton11-7-aarch64.sha512sum"), + asset("GE-Proton11-7-aarch64.tar.gz", "sha256:$sum")) + val picked = ProtonExtras.pickAsset(tool("ge"), JSONArray().put(release))!! + assertEquals("GE-Proton11-7-aarch64.tar.gz", picked.name) + assertEquals(sum, picked.sha256) + assertTrue(picked.sha512!!.endsWith("GE-Proton11-7-aarch64.sha512sum")) + } + + @Test + fun prereleasesDraftsAndReleasesWithoutAnArm64BuildAreSkipped() { + val releases = JSONArray() + .put(droiddeckRelease("11-8", prerelease = true)) + .put(release("DroidDeck-Proton-11-7.9", asset("DroidDeck-Proton-11-7.9-aarch64.tar.gz"), draft = true)) + .put(release("DroidDeck-Proton-11-7.8", asset("DroidDeck-Proton-11-7.8-x86_64.tar.gz"))) + .put(droiddeckRelease("11-7.5")) + assertEquals("DroidDeck-Proton-11-7.5", ProtonExtras.pickAsset(tool("droiddeck"), releases)?.tag) + assertNull(ProtonExtras.pickAsset(tool("droiddeck"), JSONArray().put(droiddeckRelease("11-8", prerelease = true)))) + } + + @Test + fun versionsCompareByTheirNumbers() { + val sorted = listOf("GE-Proton11-10", "GE-Proton10-25", "GE-Proton11-9", "GE-Proton11-1") + .sortedWith { a, b -> ProtonExtras.compareVersions(a, b) } + assertEquals(listOf("GE-Proton10-25", "GE-Proton11-1", "GE-Proton11-9", "GE-Proton11-10"), sorted) + assertTrue(ProtonExtras.compareVersions("DroidDeck-Proton 11-7.5", "DroidDeck-Proton 11-7.10") < 0) + assertTrue(ProtonExtras.compareVersions("DroidDeck-Proton 11-7.10", "DroidDeck-Proton 11-8") < 0) + assertTrue(ProtonExtras.compareVersions("DroidDeck-Proton 11-7", "DroidDeck-Proton 11-7.1") < 0) + assertTrue(ProtonExtras.compareVersions("cachyos-11.0-20260703-slr", "cachyos-11.0-20261005-slr") < 0) + assertTrue(ProtonExtras.compareVersions("cachyos-10.0-sunset-slr", "cachyos-11.0-20260601-slr") < 0) + assertEquals(listOf(11L, 7L), ProtonExtras.versionKey("GE-Proton11-7-aarch64")) + assertEquals(listOf(11L, 0L, 20261005L), ProtonExtras.versionKey("proton-cachyos-11.0-20261005-slr-arm64")) + assertEquals(listOf(11L, 7L, 5L), ProtonExtras.versionKey("DroidDeck-Proton 11-7.5")) + assertEquals(ProtonExtras.versionKey("DroidDeck-Proton-11-7.5"), ProtonExtras.versionKey("DroidDeck-Proton 11-7.5")) + } + + @Test + fun installedBuildsAreFoundByPrefixNewestLast() { + val tools = temp.newFolder("compatibilitytools.d") + for (name in listOf("GE-Proton11-10", "GE-Proton11-9", "DroidDeck-Proton 11-7.10", "DroidDeck-Proton 11-7.5", + "droiddeck-proton-arm64", "droiddeck-proton-11-arm64", "proton-cachyos-11.0-20261005-slr-arm64")) installTool(tools, name) + File(tools, "DroidDeck-Proton 11-6").mkdirs() + assertEquals(listOf("GE-Proton11-9", "GE-Proton11-10"), ProtonExtras.installedIn(tools, tool("ge"))) + assertEquals(listOf("DroidDeck-Proton 11-7.5", "DroidDeck-Proton 11-7.10"), ProtonExtras.installedIn(tools, tool("droiddeck"))) + assertEquals(listOf("proton-cachyos-11.0-20261005-slr-arm64"), ProtonExtras.installedIn(tools, tool("cachyos"))) + assertEquals(emptyList<String>(), ProtonExtras.installedIn(File(tools, "missing"), tool("ge"))) + } + + @Test + fun anUpdateIsANewerReleaseThanTheNewestInstalledBuild() { + assertEquals("DroidDeck-Proton-11-7.6", ProtonExtras.updateFor(listOf("DroidDeck-Proton 11-7.5"), "DroidDeck-Proton-11-7.6")) + assertEquals("DroidDeck-Proton-11-7.10", ProtonExtras.updateFor(listOf("DroidDeck-Proton-11-7.9"), "DroidDeck-Proton-11-7.10")) + assertNull(ProtonExtras.updateFor(listOf("DroidDeck-Proton 11-7.5"), "DroidDeck-Proton-11-7.5")) + assertNull(ProtonExtras.updateFor(listOf("DroidDeck-Proton 11-7.5", "DroidDeck-Proton-11-7.6"), "DroidDeck-Proton-11-7.6")) + assertNull(ProtonExtras.updateFor(listOf("GE-Proton11-10"), "GE-Proton11-9")) + assertNull(ProtonExtras.updateFor(listOf("GE-Proton11-7-aarch64"), "GE-Proton11-7")) + assertEquals("GE-Proton11-10", ProtonExtras.updateFor(listOf("GE-Proton11-7-aarch64", "GE-Proton11-9"), "GE-Proton11-10")) + assertEquals("cachyos-11.0-20261101-slr", ProtonExtras.updateFor(listOf("proton-cachyos-11.0-20261005-slr-arm64"), "cachyos-11.0-20261101-slr")) + assertNull(ProtonExtras.updateFor(listOf("proton-cachyos-11.0-20261005-slr-arm64"), "cachyos-10.0-sunset-slr")) + assertNull(ProtonExtras.updateFor(emptyList(), "GE-Proton11-10")) + assertNull(ProtonExtras.updateFor(listOf("GE-Proton11-7"), null)) + } + + @Test + fun aRecentCheckIsReusedAndComparedWithTheInstalledBuild() { + val context = RuntimeEnvironment.getApplication() + val tools = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/compatibilitytools.d") + installTool(tools, "DroidDeck-Proton 11-7.5") + installTool(tools, "GE-Proton11-7") + val now = 1_800_000_000_000L + val latest = JSONObject() + .put("ge", JSONObject().put("tag", "GE-Proton11-7").put("at", now - 60_000)) + .put("cachyos", JSONObject().put("tag", "cachyos-11.0-20261005-slr").put("at", now - 60_000)) + .put("droiddeck", JSONObject().put("tag", "DroidDeck-Proton-11-7.6").put("at", now - ProtonExtras.CHECK_EVERY_MS + 60_000)) + File(context.filesDir, "proton-latest.json").writeText(latest.toString()) + assertFalse(ProtonExtras.checkLatest(context, now = now)) + assertEquals("DroidDeck-Proton-11-7.6", ProtonExtras.update(context, tool("droiddeck"))) + assertNull(ProtonExtras.update(context, tool("ge"))) + assertNull(ProtonExtras.update(context, tool("cachyos"))) + assertEquals(listOf("DroidDeck-Proton 11-7.5"), ProtonExtras.installedTags(context, tool("droiddeck"))) + File(context.filesDir, "proton-extras.json").writeText(JSONObject().put("DroidDeck-Proton 11-7.5", "DroidDeck-Proton-11-7.6").toString()) + assertEquals(listOf("DroidDeck-Proton-11-7.6"), ProtonExtras.installedTags(context, tool("droiddeck"))) + assertNull(ProtonExtras.update(context, tool("droiddeck"))) + } + + @Test + fun removingDeletesOneBuildOrEveryOlderOne() { + val context = RuntimeEnvironment.getApplication() + val tools = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/compatibilitytools.d") + for (name in listOf("DroidDeck-Proton 11-7.5", "DroidDeck-Proton 11-7.6", "DroidDeck-Proton 11-7.10", "GE-Proton11-7")) installTool(tools, name) + ProtonExtras.remove(context, tool("droiddeck"), "DroidDeck-Proton 11-7.6") + assertEquals(listOf("DroidDeck-Proton 11-7.5", "DroidDeck-Proton 11-7.10"), ProtonExtras.installedAll(context, tool("droiddeck"))) + ProtonExtras.remove(context, tool("droiddeck"), "GE-Proton11-7") + assertTrue(File(tools, "GE-Proton11-7").isDirectory) + assertEquals(listOf("DroidDeck-Proton 11-7.5", "DroidDeck-Proton 11-7.10"), ProtonExtras.installedAll(context, tool("droiddeck"))) + ProtonExtras.removeOlder(context, tool("droiddeck")) + assertEquals(listOf("DroidDeck-Proton 11-7.10"), ProtonExtras.installedAll(context, tool("droiddeck"))) + assertEquals("DroidDeck-Proton 11-7.10", ProtonExtras.installed(context, tool("droiddeck"))) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/QuestExperimentalTest.kt b/app/src/test/java/com/droiddeck/launcher/session/QuestExperimentalTest.kt new file mode 100644 index 0000000000..8c0f6896a6 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/QuestExperimentalTest.kt @@ -0,0 +1,119 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import android.content.ContextWrapper +import com.droiddeck.launcher.runtime.BwrapSpawner +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import org.robolectric.shadows.ShadowBuild + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class QuestExperimentalTest { + private val context: Context get() = RuntimeEnvironment.getApplication() + + @Before fun reset() { + context.getSharedPreferences("session", Context.MODE_PRIVATE).edit().clear().commit() + ShadowBuild.setModel("Phone") + ShadowBuild.setDevice("phone") + } + + @Test fun otherDevicesKeepTheirSettings() { + for (model in listOf("Phone", "Quest", "Quest Pro")) { + ShadowBuild.setModel(model) + QuestExperimental.initialize(context) + assertEquals(SessionPrefs.GPU_DRIVERS_AUTO, SessionPrefs.gpuDriverMode(context)) + assertEquals("", SessionPrefs.androidDriver(context)) + assertFalse(SessionPrefs.hdr(context, "steam")) + } + assertFalse(QuestExperimental.supported("Phone", "hollywood", "Other")) + } + + @Test fun quest2SelectsA6xxInsteadOfQuest3DriverAndPreservesLaterChoices() { + ShadowBuild.setModel("Quest 2") + context.getSharedPreferences("session", Context.MODE_PRIVATE).edit() + .putBoolean("questDefaultsV1", true).commit() + QuestExperimental.initialize(context) + assertEquals(SessionPrefs.GPU_DRIVERS_MANUAL, SessionPrefs.gpuDriverMode(context)) + assertEquals(QuestExperimental.DRIVER_A6XX, SessionPrefs.androidDriver(context)) + assertEquals("", SessionPrefs.linuxDriver(context)) + assertTrue(SessionPrefs.hdr(context, "steam")) + assertTrue(QuestExperimental.supported("unknown", "hollywood", "Oculus")) + assertTrue(QuestExperimental.supported("unknown", "hollywood", "Meta")) + assertFalse(QuestExperimental.quest2("Quest 3", "eureka", "Meta")) + SessionPrefs.setAndroidDriver(context, "chosen-a6xx-driver") + QuestExperimental.initialize(context) + assertEquals("chosen-a6xx-driver", SessionPrefs.androidDriver(context)) + } + + @Test fun questDefaultsSelectBothCompatibilityPathsAndAreAppliedOnlyOnce() { + ShadowBuild.setModel("Quest 3") + val standard = object : ContextWrapper(context) { + override fun getPackageName() = "com.droiddeck.launcher" + } + QuestExperimental.initialize(standard) + assertEquals(SessionPrefs.GPU_DRIVERS_MANUAL, SessionPrefs.gpuDriverMode(context)) + assertEquals(QuestExperimental.DRIVER, SessionPrefs.androidDriver(context)) + assertEquals("", SessionPrefs.linuxDriver(context)) + assertTrue(SessionPrefs.hdr(context, "steam")) + assertTrue(context.filesDir.resolve("quest-startup.txt").readText().contains("model=Quest 3")) + SessionPrefs.setAndroidDriver(context, "chosen-driver") + SessionPrefs.setHdr(context, "steam", false) + QuestExperimental.initialize(context) + assertEquals("chosen-driver", SessionPrefs.androidDriver(context)) + assertFalse(SessionPrefs.hdr(context, "steam")) + } + + @Test fun quest3sIsRecognizedByModelOrDevice() { + assertTrue(QuestExperimental.supported("Quest 3S", "unknown", "Oculus")) + assertTrue(QuestExperimental.supported("unknown", "panther", "Oculus")) + assertTrue(QuestExperimental.supported("unknown", "eureka", "Meta")) + assertFalse(QuestExperimental.supported("Pixel 7", "panther", "Google")) + } + + @Test fun autoUsesTheQuestPairWithoutChangingOtherSettings() { + for (model in listOf("Quest 3", "Quest 3S", "Quest 2")) { + ShadowBuild.setModel(model) + SessionPrefs.setGpuDriverMode(context, SessionPrefs.GPU_DRIVERS_AUTO) + SessionPrefs.setAndroidDriver(context, "downloaded-display") + SessionPrefs.setLinuxDriver(context, "downloaded-linux") + SessionPrefs.setHdr(context, "steam", false) + assertTrue(QuestExperimental.applyAutoDrivers(context)) + assertEquals(if (model == "Quest 2") QuestExperimental.DRIVER_A6XX else QuestExperimental.DRIVER, + SessionPrefs.androidDriver(context)) + assertEquals("", SessionPrefs.linuxDriver(context)) + assertEquals(SessionPrefs.GPU_DRIVERS_AUTO, SessionPrefs.gpuDriverMode(context)) + assertFalse(SessionPrefs.hdr(context, "steam")) + } + } + + @Test fun autoLeavesManualQuestChoicesAndOtherDevicesAlone() { + for ((model, mode) in listOf("Quest 3" to SessionPrefs.GPU_DRIVERS_MANUAL, + "Phone" to SessionPrefs.GPU_DRIVERS_AUTO)) { + ShadowBuild.setModel(model) + SessionPrefs.setGpuDriverMode(context, mode) + SessionPrefs.setAndroidDriver(context, "chosen-display") + SessionPrefs.setLinuxDriver(context, "chosen-linux") + assertFalse(QuestExperimental.applyAutoDrivers(context)) + assertEquals("chosen-display", SessionPrefs.androidDriver(context)) + assertEquals("chosen-linux", SessionPrefs.linuxDriver(context)) + } + } + + @Test fun installedPackagesUseSeparateSandboxSockets() { + val packages = listOf("com.droiddeck.launcher", "com.tencent.ig", + "com.antutu.benchmark.full", "com.ludashi.benchmark") + val sockets = packages.map { name -> + val variant = object : ContextWrapper(context) { + override fun getPackageName() = name + } + BwrapSpawner.socket(variant).also { assertEquals("$name.bwrap", it) } + } + assertEquals(packages.size, sockets.toSet().size) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/RumbleComponentTest.kt b/app/src/test/java/com/droiddeck/launcher/session/RumbleComponentTest.kt index 55bb4f0d19..8c5361aec1 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/RumbleComponentTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/RumbleComponentTest.kt @@ -8,6 +8,7 @@ import android.os.Looper import android.os.Vibrator import android.os.VibratorManager import com.droiddeck.launcher.input.ControllerPrefs +import com.droiddeck.launcher.input.JoyCon import com.droiddeck.launcher.input.PadBridge import java.io.IOException import org.junit.After @@ -35,7 +36,7 @@ class RumbleComponentTest { vibrator = if (Build.VERSION.SDK_INT >= 31) context.getSystemService(VibratorManager::class.java).defaultVibrator else context.getSystemService(Vibrator::class.java) shadowOf(vibrator).setHasVibrator(true) - rumble = RumbleComponent().also { it.attach(context); it.start() } + rumble = RumbleComponent().also { it.motorLooper = Looper.getMainLooper(); it.attach(context); it.start() } } @After fun stopListener() { rumble.stop() } @@ -78,24 +79,73 @@ class RumbleComponentTest { assertFalse("the phone buzzed as well", shadowOf(vibrator).isVibrating) } - @Test fun repeatedAndRapidEffectsDoNotRestartTheMotors() { + @Test fun repeatedAndRapidEffectsDoNotRestartTheMotorsButTheLatestStillLands() { val pad = FakeMotors() rumble.controllerMotors = { pad } activeController(PAD_ID) repeat(5) { effect(strong = 40000, weak = 1000) } effect(strong = 20000, weak = 1000) + effect(strong = 30000, weak = 1000) assertEquals("a stream of packets restarted the motor each time", 1, pad.played.size) - shadowOf(Looper.getMainLooper()).idleFor(java.time.Duration.ofMillis(RumbleComponent.MIN_GAP_MS)) - effect(strong = 40000, weak = 1000) - assertEquals("the same strength, still playing, was started again", 1, pad.played.size) - effect(strong = 20000, weak = 1000) - assertEquals(Triple(20000, 1000, 5000L), pad.played.last()) + idle(RumbleComponent.MIN_GAP_MS) + assertEquals("the last change inside the gap was lost", + listOf(Triple(40000, 1000, 5000L), Triple(30000, 1000, 5000L)), pad.played) + effect(strong = 30000, weak = 1000) + assertEquals("the same strength, still playing, was started again", 2, pad.played.size) effect(strong = 0, weak = 0) assertFalse(pad.vibrating) effect(strong = 20000, weak = 1000) assertTrue("an effect right after a stop was dropped", pad.vibrating) } + @Test fun aHeldEffectKeepsTheMotorsRunningUntilTheGameStopsIt() { + val pad = FakeMotors() + rumble.controllerMotors = { pad } + activeController(PAD_ID) + effect(strong = 40000, weak = 20000, ms = RumbleComponent.HOLD_MS) + assertEquals(listOf(Triple(40000, 20000, RumbleComponent.HOLD_EFFECT_MS)), pad.played) + idle(RumbleComponent.KEEPALIVE_MS * 4 + 100) + assertEquals("the held effect was not re-armed before it ran out", 5, pad.played.size) + effect(strong = 40000, weak = 20000, ms = RumbleComponent.HOLD_MS) + assertEquals("a repeat of the held strength restarted the motors", 5, pad.played.size) + effect(strong = 0, weak = 0) + assertFalse(pad.vibrating) + idle(RumbleComponent.KEEPALIVE_MS * 4 + 100) + assertEquals("the keepalive restarted the motors after a stop", 5, pad.played.size) + assertFalse(pad.vibrating) + } + + @Test fun aHeldEffectFollowsTheGamesNewStrength() { + val pad = FakeMotors() + rumble.controllerMotors = { pad } + activeController(PAD_ID) + effect(strong = 40000, weak = 0, ms = RumbleComponent.HOLD_MS) + effect(strong = 10000, weak = 0, ms = RumbleComponent.HOLD_MS) + idle(RumbleComponent.KEEPALIVE_MS * 2) + assertTrue(pad.played.drop(1).isNotEmpty()) + assertTrue("the keepalive replayed an old strength", pad.played.drop(1).all { it.first == 10000 }) + } + + @Test fun aTimedEffectIsNotRearmed() { + val pad = FakeMotors() + rumble.controllerMotors = { pad } + activeController(PAD_ID) + effect(strong = 40000, weak = 0, ms = 300) + idle(RumbleComponent.KEEPALIVE_MS * 3) + assertEquals(listOf(Triple(40000, 0, 300L)), pad.played) + } + + @Test fun disablingStopsTheKeepalive() { + val pad = FakeMotors() + rumble.controllerMotors = { pad } + activeController(PAD_ID) + effect(ms = RumbleComponent.HOLD_MS) + ControllerPrefs.setRumble(context, false) + idle(RumbleComponent.KEEPALIVE_MS * 3) + assertEquals(1, pad.played.size) + assertFalse(pad.vibrating) + } + @Test fun aControllerWithoutMotorsFallsBackToThePhone() { rumble.controllerMotors = { null } activeController(PAD_ID) @@ -153,8 +203,53 @@ class RumbleComponentTest { assertFalse(shadowOf(vibrator).isVibrating) } + @Test fun eachVrHandRumblesItsOwnJoyConAndNeverThePhone() { + val left = FakeMotors() + val right = FakeMotors() + rumble.controllerMotors = { id -> if (id == PAD_ID) left else if (id == SECOND_PAD_ID) right else null } + JoyCon.setVrDevices(this, intArrayOf(PAD_ID, SECOND_PAD_ID)) + effect(strong = 30000, weak = 30000, slot = JoyCon.VR_RUMBLE_SLOT + JoyCon.LEFT) + effect(strong = 20000, weak = 20000, slot = JoyCon.VR_RUMBLE_SLOT + JoyCon.RIGHT) + assertEquals(listOf(Triple(30000, 30000, 5000L)), left.played) + assertEquals(listOf(Triple(20000, 20000, 5000L)), right.played) + JoyCon.clearVrDevices(this) + effect(strong = 10000, weak = 10000, slot = JoyCon.VR_RUMBLE_SLOT + JoyCon.LEFT) + assertFalse("the hand kept rumbling after SteamVR let it go", left.vibrating) + assertFalse(shadowOf(vibrator).isVibrating) + } + + @Test fun aJoyConPairSplitsTheMotorsLikeOneController() { + val left = FakeMotors() + val right = FakeMotors() + rumble.controllerMotors = { id -> if (id == PAD_ID) left else if (id == SECOND_PAD_ID) right else null } + activeController(SECOND_PAD_ID) + joyCons(0, PAD_ID, SECOND_PAD_ID) + effect(strong = 40000, weak = 1000) + assertEquals(listOf(Triple(40000, 0, 5000L)), left.played) + assertEquals(listOf(Triple(0, 1000, 5000L)), right.played) + shadowOf(Looper.getMainLooper()).idleFor(java.time.Duration.ofMillis(RumbleComponent.MIN_GAP_MS)) + effect(strong = 20000, weak = 0) + assertTrue(left.vibrating) + assertFalse(right.vibrating) + joyCons(0, PadBridge.NO_CONTROLLER, PadBridge.NO_CONTROLLER) + effect(strong = 10000, weak = 10000) + assertEquals("a lone Joy-Con missed the effect", Triple(10000, 10000, 5000L), right.played.last()) + assertFalse("the departed Joy-Con kept rumbling", left.vibrating) + assertFalse(shadowOf(vibrator).isVibrating) + } + @After fun clearActiveController() { - for (slot in 0 until PadBridge.SLOTS) activeController(PadBridge.NO_CONTROLLER, slot) + for (slot in 0 until PadBridge.SLOTS) { + activeController(PadBridge.NO_CONTROLLER, slot) + joyCons(slot, PadBridge.NO_CONTROLLER, PadBridge.NO_CONTROLLER) + } + JoyCon.clearVrDevices(this) + } + + private fun joyCons(slot: Int, left: Int, right: Int) { + val pairs = PadBridge::class.java.getDeclaredField("slotJoyCons").apply { isAccessible = true }.get(null) + (pairs as java.util.concurrent.atomic.AtomicIntegerArray).set(slot * 2 + JoyCon.LEFT, left) + pairs.set(slot * 2 + JoyCon.RIGHT, right) } private fun activeController(id: Int, slot: Int = 0) { @@ -163,13 +258,14 @@ class RumbleComponentTest { (slots as java.util.concurrent.atomic.AtomicIntegerArray).set(slot, id) } - private fun effect(strong: Int = 65535, weak: Int = 65535, slot: Int = 0) { - // Inject a decoded force-feedback packet; transport is outside these tests. + private fun effect(strong: Int = 65535, weak: Int = 65535, slot: Int = 0, ms: Int = 5000) { val int = Int::class.javaPrimitiveType RumbleComponent::class.java.getDeclaredMethod("buzz", int, int, int, int) - .apply { isAccessible = true }.invoke(rumble, strong, weak, 5000, slot) + .apply { isAccessible = true }.invoke(rumble, strong, weak, ms, slot) } + private fun idle(ms: Long) = shadowOf(Looper.getMainLooper()).idleFor(java.time.Duration.ofMillis(ms)) + private class FakeMotors : RumbleComponent.Motors { override val name = "fake pad" val played = mutableListOf<Triple<Int, Int, Long>>() diff --git a/app/src/test/java/com/droiddeck/launcher/session/SecondaryLibraryTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SecondaryLibraryTest.kt index 131ad64e53..a58e075380 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/SecondaryLibraryTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/SecondaryLibraryTest.kt @@ -10,6 +10,47 @@ import org.junit.rules.TemporaryFolder class SecondaryLibraryTest { @get:Rule val tmp = TemporaryFolder() + @Test fun directContentKeepsTheConfiguredLibrarysPrivateDirectories() { + val files = tmp.newFolder("files") + val library = tmp.newFolder("shared") + val content = tmp.newFolder("direct") + val private = SecondaryLibrary.privateRoot(files, library) + val binds = SecondaryLibrary.binds(files, library, listOf("/mnt/droiddeck-sd"), content) + assertEquals("${content.path}:/mnt/droiddeck-sd", binds.first()) + assertTrue(binds.contains("$private/steamapps/compatdata:/mnt/droiddeck-sd/steamapps/compatdata")) + assertFalse(SecondaryLibrary.privateRoot(files, content).exists()) + } + + @Test fun aWritableAliasIsSelectedAndItsProbeIsRemoved() { + val library = tmp.newFolder("shared") + val candidate = File(tmp.root, "direct") + Files.createSymbolicLink(candidate.toPath(), library.toPath()) + assertEquals(candidate, SecondaryLibrary.verifiedAlias(library, candidate)) + assertTrue(library.listFiles()!!.isEmpty()) + } + + @Test fun aDeniedAliasFallsBackBeforeCreatingAProbe() { + val library = tmp.newFolder("shared") + val candidate = tmp.newFolder("denied") + assertEquals(library, SecondaryLibrary.verifiedAlias(library, candidate) { false }) + assertTrue(candidate.listFiles()!!.isEmpty()) + assertTrue(library.listFiles()!!.isEmpty()) + } + + @Test fun anUnrelatedOrMissingDirectoryCannotReplaceTheLibrary() { + val library = tmp.newFolder("shared") + val candidate = tmp.newFolder("other") + assertEquals(library, SecondaryLibrary.verifiedAlias(library, candidate)) + assertTrue(candidate.listFiles()!!.isEmpty()) + assertTrue(library.listFiles()!!.isEmpty()) + assertEquals(library, SecondaryLibrary.verifiedAlias(library, File(tmp.root, "missing"))) + } + + @Test fun aNonStorageLibraryKeepsItsConfiguredPath() { + val library = tmp.newFolder("games") + assertSame(library, SecondaryLibrary.contentPath(library)) + } + @Test fun gamesStaySharedButPrefixesAndNativeDownloadsArePrivate() { val files = tmp.newFolder("files") val library = tmp.newFolder("card") diff --git a/app/src/test/java/com/droiddeck/launcher/session/SelectedGameProfileTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SelectedGameProfileTest.kt new file mode 100644 index 0000000000..7955fde23b --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/SelectedGameProfileTest.kt @@ -0,0 +1,141 @@ +package com.droiddeck.launcher.session + +import com.droiddeck.launcher.core.GameEnvironment +import com.droiddeck.launcher.frontend.Library +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test +import java.io.File + +class SelectedGameProfileTest { + private val proton = ComponentsManager.Proton("p1", "Proton 10", File("p1"), "/p1", "10", true) + private val snapshot = ComponentsManager.Snapshot( + protons = listOf( + ComponentsManager.ProtonView( + proton = proton, + components = mapOf( + "fex" to component("FEX General"), + "dxvk" to component("DXVK General"), + "vkd3d" to component("VKD3D General"), + ), + originals = emptyList(), + inUseByGame = false, + ), + ), + packages = listOf(ComponentsManager.Package("dxvk.wcp", "dxvk", "DXVK Game", "", 1)), + ) + private val game = Library.SteamGame(3180310, "Billies Wheelie", null, "internal") + + @Test fun inheritedValuesUseGeneralProfile() { + val profile = resolve() + + assertEquals("Billies Wheelie", profile!!.name) + assertEquals("PERFORMANCE_TSO", profile.fexPreset.value) + assertTrue(profile.fexPreset.inherited) + assertEquals("Proton 10", profile.proton.value) + assertTrue(profile.proton.inherited) + assertEquals("p1", profile.protonId) + assertEquals("DXVK General", profile.components.getValue("dxvk").value) + assertTrue(profile.components.getValue("dxvk").inherited) + assertEquals(emptyMap<String, String>(), profile.componentFiles) + assertEquals(0, profile.environmentOverrides) + assertEquals(emptyList<String>(), profile.windowsComponentNames) + assertFalse(profile.hasOverrides) + } + + @Test fun explicitValuesOverrideGeneralProfile() { + val preset = GameEnvironment.withGameFexPreset(GameEnvironment.Config(), game.profileKey, "STABILITY") + val environment = preset.withEntries(game.profileKey, preset.entries(game.profileKey) + ("PROTON_LOG" to "1")) + val profile = resolve( + environment = environment, + gameChoice = ProtonDefault.GameChoice(true, "p1"), + gameComponents = mapOf("dxvk" to "dxvk.wcp"), + ) + + assertEquals("STABILITY", profile!!.fexPreset.value) + assertFalse(profile.fexPreset.inherited) + assertFalse(profile.proton.inherited) + assertEquals("DXVK Game", profile.components.getValue("dxvk").value) + assertFalse(profile.components.getValue("dxvk").inherited) + assertEquals("dxvk.wcp", profile.componentFiles.getValue("dxvk")) + assertEquals(1, profile.environmentOverrides) + assertTrue(profile.hasOverrides) + } + + @Test fun windowsComponentsMakeProfileCustom() { + val profile = resolve(gameWindowsComponents = listOf("oalinst_dll", "vcredist2010_dll")) + + assertEquals(listOf("OpenAL", "Visual C++ 2010"), profile!!.windowsComponentNames) + assertTrue(profile.hasOverrides) + } + + @Test fun startWithoutSteamIsListedByNameAndMakesProfileCustom() { + val environment = GameEnvironment.withGameNoSteam(GameEnvironment.Config(), game.profileKey, true) + val profile = resolve(environment = environment) + + assertTrue(profile!!.startWithoutSteam) + assertEquals(0, profile.environmentOverrides) + assertTrue(profile.hasOverrides) + + val off = GameEnvironment.withGameNoSteam(environment, game.profileKey, false) + assertFalse(resolve(environment = off)!!.startWithoutSteam) + assertEquals(emptyMap<String, Map<String, String?>>(), off.games) + } + + @Test fun unknownSelectedAppIsIgnored() { + assertNull(resolve(selectedAppId = 42)) + } + + @Test fun switchingProfilesResolvesEachGamesFexPresetWithoutChangingSettings() { + val other = Library.SteamGame(42, "Other game", null, "internal") + val games = listOf(game, other) + val environment = GameEnvironment.withGameFexPreset( + GameEnvironment.Config(), game.profileKey, "STABILITY", + ) + + assertEquals(ProfileValue("STABILITY", false), + resolve(games = games, environment = environment)!!.fexPreset) + assertEquals(ProfileValue("PERFORMANCE_TSO", true), + resolve(selectedAppId = 42, games = games, environment = environment)!!.fexPreset) + assertEquals(ProfileValue("STABILITY", false), + resolve(games = games, environment = environment)!!.fexPreset) + assertNull(GameEnvironment.gameFexPreset(environment, other.profileKey)) + } + + @Test fun customAndExplicitDefaultFexPresetsAreNotShownAsInherited() { + val custom = GameEnvironment.Config( + games = mapOf(game.profileKey to mapOf("FEX_TSOENABLED" to "0")), + ) + assertEquals(ProfileValue(GameEnvironment.CUSTOM_FEX_PRESET, false), + resolve(environment = custom)!!.fexPreset) + val defaults = GameEnvironment.withGameFexPreset(custom, game.profileKey, "") + assertEquals(ProfileValue("", false), resolve(environment = defaults)!!.fexPreset) + val inherited = GameEnvironment.withGameFexPreset(defaults, game.profileKey, null) + assertEquals(ProfileValue("PERFORMANCE_TSO", true), resolve(environment = inherited)!!.fexPreset) + } + + private fun resolve( + selectedAppId: Long = 3180310, + games: List<Library.SteamGame> = listOf(game), + environment: GameEnvironment.Config = GameEnvironment.Config(), + gameChoice: ProtonDefault.GameChoice? = null, + gameComponents: Map<String, String> = emptyMap(), + gameWindowsComponents: List<String> = emptyList(), + ) = SelectedGameProfile.resolve( + selectedAppId = selectedAppId, + games = games, + generalFexPreset = "PERFORMANCE_TSO", + environment = environment, + snapshot = snapshot, + generalProtonId = "p1", + gameProtonChoice = gameChoice, + gameProtonId = "p1", + gameComponents = gameComponents, + gameWindowsComponents = gameWindowsComponents, + ) + + private fun component(label: String) = + ComponentsManager.Component(label, "", "Changed outside Components", label, null, null) +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/SessionAchievementGameTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SessionAchievementGameTest.kt new file mode 100644 index 0000000000..79156cbe98 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/SessionAchievementGameTest.kt @@ -0,0 +1,29 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test + +class SessionAchievementGameTest { + private val installed = setOf(10L, 20L) + + @Test fun exitingGameCannotRemainSelectedWithoutItsWindow() { + assertNull(SessionAchievementGame.activeAppId(10, listOf(769), installed)) + } + + @Test fun steamOverlayKeepsTheRunningGameSelected() { + assertEquals(10L, SessionAchievementGame.activeAppId(769, listOf(769, 10), installed)) + } + + @Test fun anotherForegroundAppCannotBorrowABackgroundGamesAchievements() { + assertNull(SessionAchievementGame.activeAppId(30, listOf(30, 10), installed)) + } + + @Test fun ambiguousBackgroundGamesDoNotPickAnArbitraryGame() { + assertNull(SessionAchievementGame.activeAppId(769, listOf(769, 10, 20), installed)) + } + + @Test fun theForegroundGameWinsWhenSeveralGamesAreRunning() { + assertEquals(20L, SessionAchievementGame.activeAppId(20, listOf(769, 10, 20), installed)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/SessionClientRecordTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SessionClientRecordTest.kt new file mode 100644 index 0000000000..60c37d0c2c --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/SessionClientRecordTest.kt @@ -0,0 +1,20 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder + +class SessionClientRecordTest { + @get:Rule val tmp = TemporaryFolder() + + @Test fun aSessionFolderKeepsTheClientItRan() { + val dir = tmp.newFolder("2026-10-18-01-steam") + assertNull(SessionArtifacts.recordedClient(dir)) + SessionArtifacts.recordClient(dir, "x86_64") + assertEquals("x86_64", SessionArtifacts.recordedClient(dir)) + java.io.File(dir, "steam-client.txt").writeText("something else\n") + assertNull(SessionArtifacts.recordedClient(dir)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/SessionDisplayTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SessionDisplayTest.kt index 1c26f78148..a68458125e 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/SessionDisplayTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/SessionDisplayTest.kt @@ -12,16 +12,12 @@ class SessionDisplayTest { } @Test fun heightPresetsKeepThePanelShapeWithASixteenByNineFloor() { - // 20:9 phone: edge to edge, no bars for the client's interface. assertEquals(1600 to 720, SessionDisplay.resolveChoice(2400 to 1080, SessionDisplay.DEFAULT_RESOLUTION)) assertEquals(1608 to 720, SessionDisplay.resolveChoice(2412 to 1080, "720p")) - // 1440p phone: bounded by the preset height, not the panel. assertEquals(1560 to 720, SessionDisplay.resolveChoice(3120 to 1440, "720p")) assertEquals(2340 to 1080, SessionDisplay.resolveChoice(3120 to 1440, "1080p")) - // Foldable inner panel and 4:3 handhelds: never narrower than 16:9. assertEquals(1280 to 720, SessionDisplay.resolveChoice(2208 to 1840, "720p")) assertEquals(1280 to 720, SessionDisplay.resolveChoice(1440 to 1080, "720p")) - // Never taller than the panel. assertEquals(1280 to 720, SessionDisplay.resolveChoice(1280 to 720, "1080p")) } @@ -39,10 +35,8 @@ class SessionDisplayTest { } @Test fun unfoldedControlsKeepTheGameSixteenByNineAcrossTheWidth() { - // Fold inner screen held as a tablet, and upright: 16:9 either way, the controls the rest. assertEquals(1376, SessionDisplay.unfoldedGameHeight(2448, 1848)) assertEquals(1038, SessionDisplay.unfoldedGameHeight(1848, 2448)) - // A window near 16:9 itself still leaves the controls a fifth of it. assertEquals(864, SessionDisplay.unfoldedGameHeight(1920, 1080)) } diff --git a/app/src/test/java/com/droiddeck/launcher/session/SessionLogShareTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SessionLogShareTest.kt index 1d58f179fa..b91e5bcf67 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/SessionLogShareTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/SessionLogShareTest.kt @@ -27,7 +27,6 @@ class SessionLogShareTest { z.entries().toList().associate { it.name.substringAfter('/') to z.getInputStream(it).bufferedReader().readText() } } - /** A record as the session's ending writes it, listing [files] as they stand now. */ private fun record(folder: File, vararg files: String, rules: Int = LogRedactor.RULES_VERSION) { File(folder, SessionArtifacts.SCRUBBED_TREE_MARKER).writeText( "rules $rules\n" + files.joinToString("") { val f = File(folder, it); "${f.length()}\t${f.lastModified()}\t$it\n" }) @@ -35,8 +34,6 @@ class SessionLogShareTest { @Test fun aRecordedUnchangedFileIsScrubbedAgainOnTheWayIntoTheZip() { val folder = tmp.newFolder("2026-10-06-01-steam") - // A file the ending recorded as scrubbed still gets the share's final pass: the record - // may predate a rule, and a zip is the one way a log leaves the device. File(folder, "session.log").writeText("$secret\n") record(folder, "session.log") assertFalse(zip(folder).getValue("session.log").contains(leaked)) @@ -50,7 +47,6 @@ class SessionLogShareTest { File(folder, "steam/deep/nested.txt").writeText("$secret\n") File(folder, ".hidden.txt").writeText("$secret\n") record(folder, "app.log", "session.log") - // Appended to after the ending (the app's log capture), and touched with an older time. File(folder, "app.log").appendText("$secret\n") File(folder, "session.log").apply { writeText("$secret\n".padEnd(3, ' ')); setLastModified(1_000L) } File(folder, "events.jsonl").writeText("$secret\n") @@ -109,7 +105,7 @@ class SessionLogShareTest { @Test fun aFileThatCouldNotBeScrubbedLeavesTheFolderUnrecorded() { val folder = tmp.newFolder("2026-10-06-06-steam") File(folder, "session.log").writeText("$secret\n") - // A folder the scrubbed copy cannot be written into: the scrub fails, the original stays. + org.junit.Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows")) folder.setWritable(false) try { SessionArtifacts.scrubAndMark(folder) diff --git a/app/src/test/java/com/droiddeck/launcher/session/SessionLogShareZipTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SessionLogShareZipTest.kt index 81f230d662..95893adde6 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/SessionLogShareZipTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/SessionLogShareZipTest.kt @@ -2,6 +2,9 @@ package com.droiddeck.launcher.session import com.droiddeck.launcher.runtime.LinuxRuntime import java.io.File +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale import java.util.zip.ZipFile import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse @@ -12,7 +15,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config -/** A shared zip is scrubbed on the way in, whatever the files on disk still hold. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class SessionLogShareZipTest { @@ -21,7 +23,6 @@ class SessionLogShareZipTest { @Test fun everyTextFileInTheZipIsScrubbedAndTheStoresAndToolsLogsComeAlong() { val logs = LinuxRuntime.logDir(app) val session = File(logs, "2026-10-08-01-steam").apply { mkdirs() } - // Written raw, as a file from before a rule existed would be. File(session, "session.log").writeText( "fetch https://gog-cdn-fastly.gog.com/token=nva=1791500000~dirs=/x~token=0a1b2c3d4e5f/content-system/v2/store/1/ab/cd/f\n" + "fetch https://epicgames-download1.akamaized.net/Builds/Org/a/ChunksV4/12/ABCD.chunk?__token__=exp=1~hmac=deadbeefcafe\n" + @@ -29,18 +30,19 @@ class SessionLogShareZipTest { "Authorization: Bearer abc.def.ghi\n" + "kept: EResult 5, app 1086940, steamapps/common/Game\n" ) - File(logs, "stores").apply { mkdirs() }.resolve("stores-2026-10-08.log").writeText("epic: f_token=zzzzzzzz12 window 32\n") + // StoreLogFiles.prune, started by App.onCreate, deletes a stores log named for a day over a week old. + val storesLog = "stores-" + SimpleDateFormat("yyyy-MM-dd", Locale.US).format(Date()) + ".log" + File(logs, "stores").apply { mkdirs() }.resolve(storesLog).writeText("epic: f_token=zzzzzzzz12 window 32\n") File(logs, SessionPaths.TOOLS_DIR).apply { mkdirs() }.resolve("flatpak-install.log").writeText("== install\nCookie: steamLoginSecure=76561198000000000%7C%7Ceyabc\n") val zip = SessionLogShare.zipFolder(app, session)!! assertTrue(zip.path.startsWith(File(app.cacheDir, "share").path)) val text = ZipFile(zip).use { z -> z.entries().toList().associate { e -> e.name to z.getInputStream(e).bufferedReader().readText() } } - assertTrue(text.keys.containsAll(listOf("2026-10-08-01-steam/session.log", "stores/stores-2026-10-08.log", "tools/flatpak-install.log"))) + assertTrue(text.keys.containsAll(listOf("2026-10-08-01-steam/session.log", "stores/$storesLog", "tools/flatpak-install.log"))) val all = text.values.joinToString("\n") for (secret in listOf("0a1b2c3d4e5f", "deadbeefcafe", "abcdef123456", "someone@example.com", "AUTHCODE123", "abc.def.ghi", "zzzzzzzz12", "eyabc")) { assertFalse("$secret survived", all.contains(secret)) } - // What makes a log worth reading stays. assertTrue(all.contains("kept: EResult 5, app 1086940, steamapps/common/Game")) assertTrue(all.contains("https://gog-cdn-fastly.gog.com/")) @@ -53,9 +55,6 @@ class SessionLogShareZipTest { assertEquals(line, com.droiddeck.launcher.core.LogRedactor.redactForShare(line)) } - // Folders an earlier build scrubbed and marked under older rules, their copied Steam UI log - // still naming the account: one app start (the move out of Download/, then the pass over - // older folders) leaves every one scrubbed on disk under the current rules. private fun olderFolder(parent: File, name: String, marker: String = ".scrubbed-2"): File { val dir = File(parent, name).apply { mkdirs() } File(dir, marker).writeText("scrubbed earlier\n") @@ -91,12 +90,10 @@ class SessionLogShareZipTest { val legacy = LinuxRuntime.legacyLogDir().apply { mkdirs() } val names = (1..9).map { "2026-10-0${it}-01-steam" } names.forEachIndexed { i, name -> - // Old markers of every kind an earlier build left, one even claiming the current rules. olderFolder(legacy, name, marker = listOf(".scrubbed-2", ".scrubbed-1", ".scrubbed-r${com.droiddeck.launcher.core.LogRedactor.RULES_VERSION}")[i % 3]) } File(legacy, "Saves").apply { mkdirs() }.resolve("keep.txt").writeText("save\n") - // What MainActivity runs at start. LogMigration.run(app) SessionArtifacts.scrubOlder(app) diff --git a/app/src/test/java/com/droiddeck/launcher/session/SessionVisibilityTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SessionVisibilityTest.kt new file mode 100644 index 0000000000..b35ea287e3 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/SessionVisibilityTest.kt @@ -0,0 +1,28 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test + +class SessionVisibilityTest { + @Test fun xrVisibilitySurvivesPanelHandoffAndPanelScreenState() { + for (panelVisible in listOf(false, true)) { + for (screenOn in listOf(false, true)) { + assertTrue(sessionHasVisibleSurface(panelVisible, screenOn, true)) + } + } + } + + @Test fun normalPanelStillRequiresAnInteractiveScreen() { + assertTrue(sessionHasVisibleSurface(true, true, false)) + assertFalse(sessionHasVisibleSurface(false, true, false)) + assertFalse(sessionHasVisibleSurface(true, false, false)) + assertFalse(sessionHasVisibleSurface(false, false, false)) + } + + @Test fun losingXrVisibilityReturnsToNormalSuspendRules() { + assertTrue(sessionHasVisibleSurface(false, false, true)) + assertFalse(sessionHasVisibleSurface(false, false, false)) + assertTrue(sessionHasVisibleSurface(true, true, false)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/SettingsResetTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SettingsResetTest.kt new file mode 100644 index 0000000000..e636bee703 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/SettingsResetTest.kt @@ -0,0 +1,96 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import com.droiddeck.launcher.core.AppUiPrefs +import com.droiddeck.launcher.gpu.FrameGen +import com.droiddeck.launcher.input.ControllerPrefs +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class SettingsResetTest { + private val app get() = RuntimeEnvironment.getApplication() + private fun prefs(name: String) = app.getSharedPreferences(name, Context.MODE_PRIVATE) + private val session get() = prefs("session") + + @Before fun clear() { + listOf("session", "controller", "app-ui", "frame_gen", "steam_touch", "agent").forEach { + prefs(it).edit().clear().commit() + } + } + + @Test fun settingsGoBackToTheirDefaults() { + SessionPrefs.setTheme(app, "ocean") + SessionPrefs.setNoXalia(app, false) + SessionPrefs.setFpsLimit(app, SessionService.MODE_STEAM, 30) + SessionPrefs.setHdr(app, SessionService.MODE_DESKTOP, true) + SessionPrefs.setResolutionChoice(app, SessionService.MODE_STEAM, "1280x800") + SessionPrefs.setGuestHostname(app, "MyDeck") + ControllerPrefs.setOpacity(app, 40) + AppUiPrefs.setScale(app, 150) + FrameGen.set(app, FrameGen.Mode(FrameGen.ENGINE_WINFG, 3)) + prefs("steam_touch").edit().putBoolean("gyro", false).commit() + + assertTrue(SettingsReset.resetAll(app, gameProfiles = false)) + + assertEquals("graphite", SessionPrefs.theme(app)) + assertTrue(SessionPrefs.noXalia(app)) + assertEquals(0, SessionPrefs.fpsLimit(app, SessionService.MODE_STEAM)) + assertFalse(SessionPrefs.hdr(app, SessionService.MODE_DESKTOP)) + assertFalse(SessionPrefs.resolutionChosen(app, SessionService.MODE_STEAM)) + assertEquals(SessionPrefs.DEFAULT_GUEST_HOSTNAME, SessionPrefs.guestHostname(app)) + assertEquals(100, ControllerPrefs.read(app).opacity) + assertEquals(AppUiPrefs.DEFAULT_SCALE, AppUiPrefs.scale(app)) + assertEquals(FrameGen.Mode.OFF.engine, FrameGen.engine(app)) + assertFalse(prefs("steam_touch").contains("gyro")) + } + + @Test fun libraryAndRecordsAreKept() { + val folder = "/storage/emulated/0/Games/Foo" + SessionPrefs.setAddedGameName(app, folder, "Foo") + SessionPrefs.setAddedGameExe(app, folder, "$folder/foo.exe") + SessionPrefs.addedGameAppId(app, folder, 1234L) + SessionPrefs.setAddedGameRemoved(app, "/storage/emulated/0/Games/Bar", true) + SessionPrefs.setGamesFoldersMigrated(app) + SessionPrefs.setGpuAutoInstalled(app, setOf("turnip-a")) + SessionPrefs.setRomsDir(app, "/storage/emulated/0/ROMs") + SessionPrefs.setGameStorage(app, "/storage/ABCD-1234", "SD Card") + SessionPrefs.setMicAsked(app) + prefs("steam_touch").edit().putString("copiedLayout", "a:1,2").commit() + + SettingsReset.resetAll(app, gameProfiles = false) + + assertEquals("Foo", SessionPrefs.addedGameName(app, folder)) + assertEquals("$folder/foo.exe", SessionPrefs.addedGameExe(app, folder)) + assertEquals(1234L, SessionPrefs.addedGameStoredAppId(app, folder)) + assertEquals(listOf("/storage/emulated/0/Games/Bar"), SessionPrefs.removedAddedGames(app)) + assertTrue(SessionPrefs.gamesFoldersMigrated(app)) + assertEquals(setOf("turnip-a"), SessionPrefs.gpuAutoInstalled(app)) + assertEquals("/storage/emulated/0/ROMs", SessionPrefs.romsDir(app)) + assertEquals("/storage/ABCD-1234", SessionPrefs.gameStorage(app)) + assertTrue(SessionPrefs.micAsked(app)) + assertEquals("a:1,2", prefs("steam_touch").getString("copiedLayout", null)) + } + + @Test fun gameTextureFilteringIsKeptUnlessGameProfilesAreReset() { + session.edit().putString("gameTextureFiltering", """{"440":{"anisotropy":16}}""").commit() + SettingsReset.resetAll(app, gameProfiles = false) + assertEquals(16, SessionPrefs.gameTextureFiltering(app, "440").anisotropy) + + SettingsReset.resetAll(app, gameProfiles = true) + assertTrue(SessionPrefs.gameTextureFiltering(app).isEmpty()) + } + + @Test fun perModeKeysAreSettings() { + listOf("resolutionCap.steam", "displayResolution.desktop", "customRes.steam", "hdr.steam", "fpsLimit.desktop", "suspendPolicy.steam") + .forEach { assertTrue(it, SettingsReset.isSessionSetting(it)) } + listOf("addedName:/x", "addedAppId:/x", "gpuAutoInstalled", "romsDir", "gameStorage", "micAsked", "gameTextureFiltering") + .forEach { assertFalse(it, SettingsReset.isSessionSetting(it)) } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/SteamDownloadMonitorTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SteamDownloadMonitorTest.kt index 7ac818cfba..2e450bf3fa 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/SteamDownloadMonitorTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/SteamDownloadMonitorTest.kt @@ -24,6 +24,21 @@ class SteamDownloadMonitorTest { } } + @Test fun followsTheX8664ClientsOwnLibrary() { + val root = Files.createTempDirectory("droiddeck-steam-download-").toFile() + try { + val steam = File(root, "root/.droiddeck-x64/.local/share/Steam") + val manifest = manifest(steam, "49520", downloaded = 10, total = 100, flags = 6) + val monitor = SteamDownloadMonitor() + + assertFalse(monitor.poll(root, now = 1_000L)) + manifest.writeText(appManifest(downloaded = 20, total = 100, flags = 6)) + assertTrue(monitor.poll(root, now = 3_000L)) + } finally { + root.deleteRecursively() + } + } + @Test fun findsDownloadsInAdditionalSteamLibraries() { val root = Files.createTempDirectory("droiddeck-steam-download-").toFile() try { @@ -67,6 +82,51 @@ class SteamDownloadMonitorTest { } } + @Test fun theOtherClientsLogIsReadFromItsStart() { + val root = Files.createTempDirectory("droiddeck-steam-download-").toFile() + try { + File(root, "root/.local/share/Steam/logs/content_log.txt").apply { + check(parentFile?.mkdirs() != false) + writeText("[2026-10-06 14:00:00] Client version: 1\n" + "[2026-10-06 14:00:01] nothing to download\n".repeat(20)) + setLastModified(10_000L) + } + val monitor = SteamDownloadMonitor() + assertFalse(monitor.poll(root, now = 1_000L)) + + File(root, "root/.droiddeck-x64/.local/share/Steam/logs/content_log.txt").apply { + check(parentFile?.mkdirs() != false) + writeText("[2026-10-06 14:44:17] AppID 44 App update changed : Running Update,Downloading,Staging,\n" + + "[2026-10-06 14:44:18] Current download rate: 0.000 Mbps\n".repeat(30)) + setLastModified(20_000L) + } + assertTrue(monitor.poll(root, now = 2_000L)) + } finally { + root.deleteRecursively() + } + } + + @Test fun theRunningClientsLogIsFollowedWhenTheOtherOneIsNewer() { + val root = Files.createTempDirectory("droiddeck-steam-download-").toFile() + try { + File(root, "root/.local/share/Steam/logs/content_log.txt").apply { + check(parentFile?.mkdirs() != false) + writeText("[2026-10-06 14:44:17] AppID 44 App update changed : Running Update,Downloading,Staging,\n") + setLastModified(10_000L) + } + File(root, "root/.droiddeck-x64/.local/share/Steam/logs/content_log.txt").apply { + check(parentFile?.mkdirs() != false) + writeText("[2026-10-06 14:00:00] Client version: 1\n") + setLastModified(20_000L) + } + val monitor = SteamDownloadMonitor() + assertTrue(monitor.poll(root, now = 1_000L, client = "arm64")) + assertTrue(monitor.poll(root, now = 2_000L, client = "arm64")) + assertFalse(SteamDownloadMonitor().poll(root, now = 1_000L, client = "x86_64")) + } finally { + root.deleteRecursively() + } + } + @Test fun receivedTrafficBridgesSteamRateLines() { val root = Files.createTempDirectory("droiddeck-steam-download-").toFile() try { @@ -79,13 +139,11 @@ class SteamDownloadMonitorTest { var now = 1_000L assertTrue(monitor.poll(root, now, received)) - // Five minutes of a download Steam no longer logs, at 4 MB/s. while (now < 300_000L) { now += 2_000L received += 8_000_000L assertTrue(monitor.poll(root, now, received)) } - // Traffic stops: the session may suspend once the grace runs out. assertTrue(monitor.poll(root, now + 90_000L, received)) assertFalse(monitor.poll(root, now + 92_001L, received)) diff --git a/app/src/test/java/com/droiddeck/launcher/session/SteamLanguageTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SteamLanguageTest.kt index 4e4e304477..0c2a990d8f 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/SteamLanguageTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/SteamLanguageTest.kt @@ -18,6 +18,18 @@ class SteamLanguageTest { assertEquals("tchinese", steam("zh-HK")) } + @Test fun everyAppLanguageButHindiHasSteamsOwn() { + com.droiddeck.launcher.core.AppLanguage.supported.forEach { + val steam = steam(it) + assertTrue("$it -> $steam", (steam == "english") == (it == "en" || it == "hi")) + } + assertEquals("brazilian", steam("pt-BR")) + assertEquals("portuguese", steam("pt-PT")) + assertEquals("latam", steam("es-419")) + assertEquals("indonesian", steam("id")) + assertEquals("malay", steam("ms")) + } + @Test fun chineseFollowsTheScriptBeforeTheRegion() { assertEquals("tchinese", steam("zh-Hant-CN")) assertEquals("schinese", steam("zh-Hans-HK")) @@ -30,7 +42,6 @@ class SteamLanguageTest { assertEquals("latam", steam("es-MX")) assertEquals("latam", steam("es-419")) assertEquals("spanish", steam("es-ES")) - // The app's Spanish has no region; the system's says where the player is. assertEquals("latam", steam("es", region = "AR")) assertEquals("spanish", steam("es", region = "ES")) } diff --git a/app/src/test/java/com/droiddeck/launcher/session/SteamRepairTest.kt b/app/src/test/java/com/droiddeck/launcher/session/SteamRepairTest.kt new file mode 100644 index 0000000000..edffce8fab --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/SteamRepairTest.kt @@ -0,0 +1,43 @@ +package com.droiddeck.launcher.session + +import com.droiddeck.launcher.runtime.LinuxRuntime +import java.io.File +import org.junit.After +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class SteamRepairTest { + private val app get() = RuntimeEnvironment.getApplication() + + @Before @After fun idle() { + SessionState.running = false + SessionState.steamClientArch = null + } + + private fun marker(home: String) = File(LinuxRuntime.rootDir(app), "root/$home/package/droiddeck-unconfirmed").apply { + parentFile?.mkdirs() + writeText("tracked\nstart\nstart\n") + } + + @Test fun aShownClientClearsOnlyItsOwnUnconfirmedStarts() { + val arm = marker(".local/share/Steam") + val x64 = marker(".droiddeck-x64/.local/share/Steam") + SteamRepair.clientShown(app) + assertFalse(arm.exists()) + assertTrue(x64.exists()) + + marker(".local/share/Steam") + SessionPrefs.setSteamClientArch(app, "x86_64") + SteamRepair.clientShown(app) + assertTrue(arm.exists()) + assertFalse(x64.exists()) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/TextureFilteringPrefsTest.kt b/app/src/test/java/com/droiddeck/launcher/session/TextureFilteringPrefsTest.kt new file mode 100644 index 0000000000..c59cd52fd0 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/TextureFilteringPrefsTest.kt @@ -0,0 +1,72 @@ +package com.droiddeck.launcher.session + +import android.content.Context +import com.droiddeck.launcher.core.TextureFiltering +import com.droiddeck.launcher.runtime.LinuxRuntime +import org.json.JSONObject +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], manifest = Config.NONE) +class TextureFilteringPrefsTest { + private lateinit var context: Context + + @Before fun setUp() { + context = RuntimeEnvironment.getApplication() + context.getSharedPreferences("session", Context.MODE_PRIVATE).edit().clear().commit() + File(context.filesDir, "game-environment.json").delete() + File(LinuxRuntime.rootDir(context), "root/.config/droiddeck/game-environment.json").delete() + } + + @Test fun gameChoicesRemainSeparateFromDefaultAndCanInheritAgain() { + SessionPrefs.setTextureAnisotropy(context, 16) + SessionPrefs.setTextureLodBias(context, TextureFiltering.LOD_BIAS_AUTO) + SessionPrefs.setGameTextureAnisotropy(context, "42", 4) + SessionPrefs.setGameTextureLodBias(context, "42", "-0.5") + + assertEquals(16, SessionPrefs.textureAnisotropy(context)) + assertEquals(TextureFiltering.LOD_BIAS_AUTO, SessionPrefs.textureLodBias(context)) + assertEquals(SessionPrefs.GameTextureFiltering(4, "-0.5"), SessionPrefs.gameTextureFiltering(context, "42")) + assertEquals(SessionPrefs.GameTextureFiltering(), SessionPrefs.gameTextureFiltering(context, "43")) + + SessionPrefs.setGameTextureAnisotropy(context, "42", null) + SessionPrefs.setGameTextureLodBias(context, "42", null) + + assertEquals(SessionPrefs.GameTextureFiltering(), SessionPrefs.gameTextureFiltering(context, "42")) + assertFalse(SessionPrefs.gameTextureFiltering(context).containsKey("42")) + } + + @Test fun publishedDxvkOptionsUseGameOverridesWithoutChangingDefault() { + SessionPrefs.setTextureAnisotropy(context, 16) + SessionPrefs.setGameTextureAnisotropy(context, "42", 0) + SessionPrefs.setGameTextureLodBias(context, "42", TextureFiltering.LOD_BIAS_OFF) + + val published = JSONObject( + File(LinuxRuntime.rootDir(context), "root/.config/droiddeck/game-environment.json").readText(), + ) + assertTrue(published.getString(GameEnvironmentStore.DXVK_CONFIG).contains("samplerAnisotropy = 16")) + assertEquals("", published.getJSONObject(GameEnvironmentStore.DXVK_CONFIG_GAMES).getString("42")) + assertNull(SessionPrefs.gameTextureFiltering(context, "43").anisotropy) + } + + @Test fun clearingGameChoicesPreservesOtherProfiles() { + SessionPrefs.setGameTextureAnisotropy(context, "42", 4) + SessionPrefs.setGameTextureLodBias(context, "42", "-0.5") + SessionPrefs.setGameTextureAnisotropy(context, "43", 8) + + SessionPrefs.clearGameTextureFiltering(context, "42") + + assertEquals(SessionPrefs.GameTextureFiltering(), SessionPrefs.gameTextureFiltering(context, "42")) + assertEquals(8, SessionPrefs.gameTextureFiltering(context, "43").anisotropy) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/VacDiagnosticsTest.kt b/app/src/test/java/com/droiddeck/launcher/session/VacDiagnosticsTest.kt new file mode 100644 index 0000000000..614a7dbaed --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/session/VacDiagnosticsTest.kt @@ -0,0 +1,57 @@ +package com.droiddeck.launcher.session + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test + +class VacDiagnosticsTest { + @Test fun tailReadsOnlyWhatThisSessionAppended() { + val log = java.io.File.createTempFile("console", ".log") + try { + log.writeText("You are in insecure mode.\nConnected to 1.2.3.4\n") + val armed = log.length() + log.appendText("Connecting to 5.6.7.8\n") + assertEquals(listOf("Connecting to 5.6.7.8", ""), VacDiagnostics.tail(log, armed)) + } finally { + log.delete() + } + } + + @Test fun theSameGameInTwoLibrariesGetsTwoConsoleNames() { + val a = java.io.File("/lib1/steamapps/common/Team Fortress 2/tf/console.log") + val b = java.io.File("/lib2/steamapps/common/Team Fortress 2/tf/console.log") + val c = java.io.File("/lib1/steamapps/common/Half-Life 2/hl2/console.log") + val names = VacDiagnostics.consoleNames(listOf(a, b, c)) + assertEquals("Team Fortress 2-tf", names[0]) + assertTrue(names[1].startsWith("Team Fortress 2-tf-") && names[1] != names[0]) + assertEquals("Half-Life 2-hl2", names[2]) + assertEquals(names, VacDiagnostics.consoleNames(listOf(a, b, c))) + } + + @Test fun tailReadsAllOfAReplacedFile() { + val log = java.io.File.createTempFile("console", ".log") + try { + log.writeText("new\n") + assertEquals(listOf("new", ""), VacDiagnostics.tail(log, 1000L)) + } finally { + log.delete() + } + } + + @Test fun onlyConsoleLogsThisSessionWroteAreReported() { + val log = java.io.File.createTempFile("console", ".log") + try { + log.writeText("Connected to 1.2.3.4\n") + val since = log.lastModified() - 5_000 + val armed = mapOf(log.canonicalPath to log.length()) + assertFalse(VacDiagnostics.writtenThisSession(log, since, armed)) + log.appendText("Connecting to 5.6.7.8\n") + assertTrue(VacDiagnostics.writtenThisSession(log, since, armed)) + assertTrue(VacDiagnostics.writtenThisSession(log, since, emptyMap())) + assertFalse(VacDiagnostics.writtenThisSession(log, log.lastModified() + 1_000, emptyMap())) + } finally { + log.delete() + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/session/WinComponentsSupportTest.kt b/app/src/test/java/com/droiddeck/launcher/session/WinComponentsSupportTest.kt index 31dad07df0..656c56c9ac 100644 --- a/app/src/test/java/com/droiddeck/launcher/session/WinComponentsSupportTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/session/WinComponentsSupportTest.kt @@ -23,7 +23,6 @@ class WinComponentsSupportTest { @Test fun windowsInstallerPackagesInstallHere() { assertEquals(Support.READY, support(component("xna40", step("install_msi", "url" to "$base/xna40.msi")))) - // The catalog names some .msi packages install_exe. assertEquals(Support.READY, support(component("XLiveRedist", step("install_exe", "url" to "$base/XLiveRedist.msi", "file_name" to "XLiveRedist1.2.0238.msi")))) assertEquals(Support.READY, support(component("msxml3", step("delete_dlls", "dest" to "win32"), @@ -33,12 +32,10 @@ class WinComponentsSupportTest { } @Test fun installerWrappersInstallHere() { - // A WiX bundle, a self-extracting cabinet or 7-Zip archive: the packages inside are laid out. assertEquals(Support.READY, support(component("vcredist2022", step("install_exe", "url" to "$base/vcredist2022__VC_redist.x86.exe", "file_name" to "VC_redist.x86.exe"), step("install_exe", "url" to "$base/vcredist2022__VC_redist.x64.exe", "file_name" to "VC_redist.x64.exe"), step("override_dll", "dll" to "vcruntime140", "type" to "native,builtin")))) - // .NET Framework: "uninstall Wine Mono", the Windows version, the installer, a registry key. assertEquals(Support.READY, support(component("dotnet40", step("uninstall", "file_name" to "Wine Mono"), step("set_windows", "version" to "win7"), step("install_exe", "url" to "https://download.microsoft.com/x/dotNetFx40_Full_x86_x64.exe", "file_name" to "dotNetFx40_Full_x86_x64.exe"), @@ -48,7 +45,6 @@ class WinComponentsSupportTest { } @Test fun nestedCatalogKeysAreRead() { - // A few .NET entries keep url and file_name under "environment". val nested = WinComponents.Step("install_exe", JSONObject().put("environment", JSONObject() .put("WINEDLLOVERRIDES", "fusion=b").put("file_name", "ndp48-x86-x64-allos-enu.exe") .put("url", "https://download.visualstudio.microsoft.com/x/ndp48-x86-x64-allos-enu.exe"))) @@ -67,14 +63,11 @@ class WinComponentsSupportTest { @Test fun recordedInstallersInstallHere() { val snapshot = "https://github.com/Droid-Deck/DroidDeck-Components/releases/download/component-snapshots-v1/K-Lite.snapshot.json" - // A setup program with a recording of its result installs from the recording. val klite = WinComponents.Component("K-Lite", "", "", "ready", emptyList(), listOf(step("install_exe", "url" to "$base/K-Lite.exe", "file_name" to "K-Lite_1960.exe")), snapshot) assertEquals(Support.READY, WinComponents.support(klite, mapOf(klite.name to klite))) - // Only a recording on the release counts. val elsewhere = WinComponents.Component("K-Lite", "", "", "ready", emptyList(), klite.steps, "http://example.com/K-Lite.snapshot.json") assertEquals(Support.NEEDS_INSTALLER, WinComponents.support(elsewhere, mapOf(elsewhere.name to elsewhere))) - // Its prerequisites still have to be installable. val sp1 = WinComponents.Component("dotnet20sp1", "", "", "ready", listOf("dotnet20"), emptyList(), snapshot.replace("K-Lite", "dotnet20sp1")) val base20 = WinComponents.Component("dotnet20", "", "", "ready", emptyList(), listOf(step("install_exe", "url" to "$base/dotnet20__dotnetfx.exe", "file_name" to "dotnetfx.exe"))) @@ -82,7 +75,6 @@ class WinComponentsSupportTest { } @Test fun setupProgramsStillWait() { - // NSIS / InnoSetup installers hold no package to lay out. assertEquals(Support.NEEDS_INSTALLER, support(component("K-Lite", step("install_exe", "url" to "$base/K-Lite.exe", "file_name" to "K-Lite_1960.exe")))) assertEquals(Support.NEEDS_INSTALLER, support(component("plain", step("install_msi", "url" to "http://example.com/a.msi")))) diff --git a/app/src/test/java/com/droiddeck/launcher/storage/SteamStorageTest.kt b/app/src/test/java/com/droiddeck/launcher/storage/SteamStorageTest.kt new file mode 100644 index 0000000000..794e01d44d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/storage/SteamStorageTest.kt @@ -0,0 +1,169 @@ +package com.droiddeck.launcher.storage + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import java.io.File + +class SteamStorageTest { + @get:Rule val tmp = TemporaryFolder() + + private fun manifest(id: Int, dir: String, flags: Int = 4) = SteamStorage.parseManifest( + File("appmanifest_$id.acf"), + """ + "AppState" + { + "appid" "$id" + "name" "App $id" + "StateFlags" "$flags" + "installdir" "$dir" + "LastPlayed" "1792072812" + } + """.trimIndent(), + )!! + + @Test fun readsManifestFields() { + val m = manifest(1794680, "Vampire Survivors") + assertEquals(1794680, m.appId) + assertEquals("Vampire Survivors", m.installDir) + assertTrue(m.installed) + assertEquals(1792072812L, m.lastPlayed) + assertFalse(manifest(1, "x", flags = 1026).installed) + } + + @Test fun rejectsInstallDirsThatEscapeCommon() { + assertNull(manifest(5, "../steamapps").installDir) + assertNull(manifest(5, "a/b").installDir) + } + + @Test fun classifiesTools() { + assertEquals(SteamStorage.Kind.OLD_RUNTIME, SteamStorage.kind(manifest(1070560, "SteamLinuxRuntime"))) + assertEquals(SteamStorage.Kind.OLD_RUNTIME, SteamStorage.kind(manifest(1391110, "SteamLinuxRuntime_soldier"))) + assertEquals(SteamStorage.Kind.REQUIRED, SteamStorage.kind(manifest(1628350, "SteamLinuxRuntime_sniper"))) + assertEquals(SteamStorage.Kind.REQUIRED, SteamStorage.kind(manifest(4185400, "SteamLinuxRuntime_4-arm64"))) + assertEquals(SteamStorage.Kind.ARM_PROTON, SteamStorage.kind(manifest(4427310, "Proton Experimental (ARM64)"))) + assertEquals(SteamStorage.Kind.ARM_PROTON, SteamStorage.kind(manifest(4628740, "Proton 11.0 (ARM64)"))) + assertEquals(SteamStorage.Kind.X86_PROTON, SteamStorage.kind(manifest(1493710, "Proton - Experimental"))) + assertEquals(SteamStorage.Kind.X86_PROTON, SteamStorage.kind(manifest(2805730, "Proton 9.0"))) + assertEquals(SteamStorage.Kind.REQUIRED, SteamStorage.kind(manifest(228980, "Steamworks Shared"))) + assertTrue(SteamStorage.isTool(manifest(2805730, "Proton 9.0"))) + assertFalse(SteamStorage.isTool(manifest(204360, "CastleCrashers"))) + } + + @Test fun readsOnlyTheCompatToolMappingBlock() { + val vdf = """ + "InstallConfigStore" + { + "Software" + { + "Valve" + { + "Steam" + { + "CompatToolMapping" + { + "0" + { + "name" "droiddeck-proton-arm64" + "config" "" + } + "207140" + { + "name" "droiddeck-proton-11-arm64" + } + } + "Other" + { + "999" + { + "name" "not-a-mapping" + } + } + } + } + } + } + """.trimIndent() + assertEquals(mapOf("0" to "droiddeck-proton-arm64", "207140" to "droiddeck-proton-11-arm64"), SteamStorage.compatMappings(vdf)) + assertEquals(emptyMap<String, String>(), SteamStorage.compatMappings("\"x\" {}")) + } + + @Test fun readsCustomToolName() { + val vdf = "\"compatibilitytools\"\n{\n \"compat_tools\"\n {\n \"GE-Proton11-9-aarch64\"\n {\n \"install_path\" \".\"\n }\n }\n}" + assertEquals("GE-Proton11-9-aarch64", SteamStorage.compatToolName(vdf)) + } + + @Test fun countsToolUseInBothClients() { + assertEquals("GE-Proton11-9-a64", SteamStorage.x64ToolName("GE-Proton11-9-aarch64")) + assertEquals("droiddeck-proton-a64", SteamStorage.x64ToolName("droiddeck-proton-arm64")) + assertEquals("GE-Proton10-1", SteamStorage.x64ToolName("GE-Proton10-1")) + val arm = SteamStorage.ToolUse(mapOf("0" to "droiddeck-proton-arm64", "10" to "GE-Proton11-9-aarch64", "20" to "GE-Proton11-9-aarch64"), setOf("10")) + val x64 = SteamStorage.ToolUse( + mapOf("0" to "GE-Proton11-9-a64", "30" to "GE-Proton11-9-a64", "40" to "droiddeck-direct", "50" to "GE-Proton11-9-aarch64"), + setOf("30", "40", "50"), x64 = true, + ) + assertEquals(1, arm.games("GE-Proton11-9-aarch64")) + assertEquals(1, x64.games("GE-Proton11-9-aarch64")) + assertFalse(arm.isDefault("GE-Proton11-9-aarch64")) + assertTrue(x64.isDefault("GE-Proton11-9-aarch64")) + assertTrue(arm.isDefault("droiddeck-proton-arm64")) + assertFalse(x64.isDefault("droiddeck-proton-arm64")) + } + + @Test fun listingCountsPendingDownloadsAndUnreadableManifests() { + val library = tmp.newFolder("lib") + val apps = File(library, "steamapps").apply { mkdirs() } + File(apps, "appmanifest_10.acf").writeText("\"appid\" \"10\"\n\"StateFlags\" \"4\"") + File(apps, "appmanifest_379720.acf.1131809557.tmp").writeText("") + File(apps, "downloading/3061810").mkdirs() + File(apps, "appmanifest_20.acf").mkdirs() + val listing = SteamStorage.manifests(library)!! + assertTrue(listing.complete) + assertEquals(setOf(10, 379720, 3061810), listing.ids) + val named = File(apps, "appmanifest_30.acf").apply { writeText("x"); setReadable(false) } + val unnamed = File(apps, "appmanifest_.acf").apply { writeText("x"); setReadable(false) } + if (!named.canRead() && !unnamed.canRead()) { + val after = SteamStorage.manifests(library)!! + assertTrue(30 in after.ids) + assertFalse(after.complete) + } + assertNull(SteamStorage.manifests(File(library, "missing"))) + } + + @Test fun anEmptyX64FolderIsNoClient() { + val root = tmp.newFolder("x64") + File(root, ".cef-enable-remote-debugging").createNewFile() + assertFalse(SteamStorage.x64ClientPresent(root)) + assertFalse(SteamStorage.x64ClientPresent(File(root, "missing"))) + File(root, "package").mkdirs() + File(root, "package/droiddeck-installed").writeText("1\n") + assertTrue(SteamStorage.x64ClientPresent(root)) + val bare = tmp.newFolder("x64-steamapps") + File(bare, "steamapps").mkdirs() + assertTrue(SteamStorage.x64ClientPresent(bare)) + } + + @Test fun leftoverIdsSkipTheSharedPrefixAndShortcuts() { + assertNull(SteamStorage.leftoverId("0")) + assertNull(SteamStorage.leftoverId("3207321049")) + assertNull(SteamStorage.leftoverId("-1768546955")) + assertNull(SteamStorage.leftoverId("pfx")) + assertEquals(452280, SteamStorage.leftoverId("452280")) + } + + @Test fun stubPrefixes() { + val stub = tmp.newFolder("compatdata", "10") + assertTrue(SteamStorage.isStubPrefix(stub)) + File(stub, "pfx/drive_c/users/steamuser/AppData/LocalLow/Studio/Game").mkdirs() + File(stub, "pfx/drive_c/users/steamuser/AppData/LocalLow/Studio/Game/steam_autocloud.vdf").writeText("x") + assertTrue(SteamStorage.isStubPrefix(stub)) + val used = tmp.newFolder("compatdata", "20") + File(used, "pfx/drive_c/users/steamuser/Saved Games").mkdirs() + File(used, "pfx/drive_c/users/steamuser/Saved Games/slot1.sav").writeText("x") + assertFalse(SteamStorage.isStubPrefix(used)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/storage/StorageScanTest.kt b/app/src/test/java/com/droiddeck/launcher/storage/StorageScanTest.kt new file mode 100644 index 0000000000..6425820af0 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/storage/StorageScanTest.kt @@ -0,0 +1,31 @@ +package com.droiddeck.launcher.storage + +import com.droiddeck.launcher.session.SessionPrefs +import java.io.File +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class StorageScanTest { + private val app get() = RuntimeEnvironment.getApplication() + + @Test fun eachClientsLeftoversAreCheckedAgainstItsOwnGames() { + SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "") + val arm = SessionPrefs.steamRoot(app, "arm64") + val x64 = SessionPrefs.steamRoot(app, "x86_64") + File(arm, "steamapps/compatdata/10").mkdirs() + File(arm, "steamapps/appmanifest_10.acf").writeText("\"appid\" \"10\"\n\"StateFlags\" \"4\"\n\"installdir\" \"Example\"\n") + val removed = File(x64, "steamapps/compatdata/10").apply { mkdirs() } + File(removed, "user.reg").writeText("x") + + val report = StorageScan.scan(app) + assertTrue(report.leftoversChecked) + assertEquals(listOf(removed.path), report.leftovers.map { it.prefix?.path }) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/store/FlathubApiTest.kt b/app/src/test/java/com/droiddeck/launcher/store/FlathubApiTest.kt index df2b3acacb..2682c19fcd 100644 --- a/app/src/test/java/com/droiddeck/launcher/store/FlathubApiTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/store/FlathubApiTest.kt @@ -12,7 +12,6 @@ class FlathubApiTest { } @Test fun refsReadAsWords() { - // The words come from string resources; stand in for them with their English. val english = mapOf( R.string.flatpakmgr_ref_runtime_branch to "%1\$s runtime %2\$s", R.string.flatpakmgr_ref_graphics_drivers to "graphics drivers", diff --git a/app/src/test/java/com/droiddeck/launcher/stores/AchievementNotificationsTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/AchievementNotificationsTest.kt new file mode 100644 index 0000000000..3efda39d07 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/AchievementNotificationsTest.kt @@ -0,0 +1,55 @@ +package com.droiddeck.launcher.stores + +import android.os.Looper +import org.json.JSONObject +import org.junit.Assert.* +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class AchievementNotificationsTest { + private val unlock = AchievementNotifications.Unlock("123", "first", "First Steps", "", null, "Hollow Valley") + private fun drain() = shadowOf(Looper.getMainLooper()).idle() + + @Before fun reset() { AchievementNotifications.begin("test"); drain() } + + @Test fun duplicatesAndOldSessionEventsDoNotQueue() { + AchievementNotifications.unlock("old", unlock) + AchievementNotifications.unlock("test", unlock) + AchievementNotifications.unlock("test", unlock.copy(name = "Repeated")) + drain() + assertEquals(listOf(unlock), AchievementNotifications.pending) + } + + @Test fun oldTeardownAndDismissCannotRemoveReplacementUnlock() { + AchievementNotifications.unlock("test", unlock); drain() + AchievementNotifications.begin("replacement") + val replacement = unlock.copy(id = "second") + AchievementNotifications.unlock("replacement", replacement) + AchievementNotifications.end("test"); drain() + AchievementNotifications.dismiss(unlock) + assertEquals(listOf(replacement), AchievementNotifications.pending) + AchievementNotifications.end("replacement"); drain() + assertTrue(AchievementNotifications.pending.isEmpty()) + } + + @Test fun burstIsBoundedAndKeepsOrder() { + repeat(30) { AchievementNotifications.unlock("test", unlock.copy(id = "$it")) }; drain() + assertEquals((0..15).map { "$it" }, AchievementNotifications.pending.map { it.id }) + AchievementNotifications.dismiss(AchievementNotifications.pending.first()) + assertEquals("1", AchievementNotifications.pending.first().id) + } + + @Test fun malformedEventsAndNonHttpsIconsAreRejected() { + assertNull(AchievementNotifications.parse(JSONObject().put("client_id", "123"), "")) + val event = JSONObject().put("client_id", "123").put("id", "first").put("name", "First Steps").put("icon", "file:///private/icon") + assertNull(AchievementNotifications.parse(event, "Game")!!.icon) + event.put("client_id", "null") + assertNull(AchievementNotifications.parse(event, "Game")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/CloudPlanTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/CloudPlanTest.kt index 854c04a9c6..5338fd3438 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/CloudPlanTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/CloudPlanTest.kt @@ -10,7 +10,6 @@ import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config -/** The rules that keep a cloud sync from replacing real saves. (Robolectric for org.json.) */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class CloudPlanTest { @@ -42,20 +41,16 @@ class CloudPlanTest { @Test fun theSideThatChangedWins() { val base = mapOf("s" to Entry("a", "a", 1000)) - // Only local changed: up sends it, down leaves it. assertEquals(listOf("s"), CloudPlan.up(mapOf("s" to Local("b")), mapOf("s" to Remote("a", 1000)), base).transfer) assertTrue(CloudPlan.down(mapOf("s" to Local("b")), mapOf("s" to Remote("a", 1000)), base).transfer.isEmpty()) - // Only the cloud changed: down takes it, up leaves it. assertEquals(listOf("s"), CloudPlan.down(mapOf("s" to Local("a")), mapOf("s" to Remote("c", 9000)), base).transfer) assertTrue(CloudPlan.up(mapOf("s" to Local("a")), mapOf("s" to Remote("c", 9000)), base).transfer.isEmpty()) - // The same bytes on both sides: nothing moves. assertEquals(listOf("s"), CloudPlan.up(mapOf("s" to Local("c")), mapOf("s" to Remote("c", 9000)), base).same) } @Test fun timesAloneDecideWhenTheServiceGivesNoHash() { val base = mapOf("s" to Entry("a", null, 1000)) assertEquals(listOf("s"), CloudPlan.down(mapOf("s" to Local("a")), mapOf("s" to Remote(null, 60_000)), base).transfer) - // Within two seconds of the baseline: the same cloud copy. assertTrue(CloudPlan.down(mapOf("s" to Local("a")), mapOf("s" to Remote(null, 2500)), base).transfer.isEmpty()) } diff --git a/app/src/test/java/com/droiddeck/launcher/stores/CloudRecoveryThreadTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/CloudRecoveryThreadTest.kt new file mode 100644 index 0000000000..63beea565b --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/CloudRecoveryThreadTest.kt @@ -0,0 +1,40 @@ +package com.droiddeck.launcher.stores + +import android.content.Context +import android.content.ContextWrapper +import android.content.SharedPreferences +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33], manifest = Config.NONE) +class CloudRecoveryThreadTest { + private val uncaught = mutableListOf<Throwable>() + private var previous: Thread.UncaughtExceptionHandler? = null + + @Before fun setUp() { + previous = Thread.getDefaultUncaughtExceptionHandler() + Thread.setDefaultUncaughtExceptionHandler { _, error -> synchronized(uncaught) { uncaught += error } } + } + + @After fun tearDown() { + Thread.setDefaultUncaughtExceptionHandler(previous) + } + + @Test fun aFailingRecoveryUploadDoesNotReachTheCrashHandler() { + val context = object : ContextWrapper(RuntimeEnvironment.getApplication()) { + override fun getApplicationContext(): Context = this + override fun getSharedPreferences(name: String, mode: Int): SharedPreferences = + if (name == "stores.cloud") throw IllegalStateException("preferences are gone") else super.getSharedPreferences(name, mode) + } + StoresState.init(context) + Thread.getAllStackTraces().keys.filter { it.name == "cloud-recovery" }.forEach { it.join(5000) } + assertEquals(emptyList<Throwable>(), synchronized(uncaught) { uncaught.toList() }) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/CloudSavePathsTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/CloudSavePathsTest.kt index 5258c19ad5..a88c8b9548 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/CloudSavePathsTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/CloudSavePathsTest.kt @@ -6,7 +6,6 @@ import org.junit.Assert.assertEquals import org.junit.Assert.assertNull import org.junit.Test -/** A store's save-location template, made concrete inside the game's prefix (Bannerlator's cases). */ class CloudSavePathsTest { private val root = Files.createTempDirectory("cloud").toFile() private val prefix = File(root, "compatdata/3785150007/pfx").apply { mkdirs() } @@ -45,7 +44,6 @@ class CloudSavePathsTest { CloudSavePaths.epic("{UserSavedGames}/Studio/{EpicId}/{AppName}", prefix, install, "acc", "app")!!.path) assertEquals(File(profile, "Documents/G").path, CloudSavePaths.epic("{UserDir}/G", prefix, install, "acc", "app")!!.path) assertNull(CloudSavePaths.epic("{Nope}/G", prefix, install, "acc", "app")) - // Epic's folder names are matched by letters and digits alone when that names exactly one. File(profile, "AppData/Local/My-Game").mkdirs() assertEquals(File(profile, "AppData/Local/My-Game").path, CloudSavePaths.epic("{AppData}/MyGame", prefix, install, "acc", "app")!!.path) } diff --git a/app/src/test/java/com/droiddeck/launcher/stores/CloudSavesTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/CloudSavesTest.kt index a85ee7c183..023013ed52 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/CloudSavesTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/CloudSavesTest.kt @@ -10,7 +10,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config -/** A sync against a cloud held in memory: the baseline gate, conflicts, backups and the no-prefix deferral. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class CloudSavesTest { @@ -59,7 +58,6 @@ class CloudSavesTest { assertEquals(1, up.conflicts) assertEquals("cloud v2", String(cloud.files.getValue("slot0.sav").first)) assertEquals(listOf("slot0.sav"), CloudSaves.conflicts(app, Store.GOG, game)) - // Keep local resolves it. CloudSaves.upWith(app, Store.GOG, game, dir, cloud, force = true) assertEquals("local v2", String(cloud.files.getValue("slot0.sav").first)) assertTrue(CloudSaves.conflicts(app, Store.GOG, game).isEmpty()) @@ -70,17 +68,14 @@ class CloudSavesTest { val folder = File(StoreInstallRoot.storeDir(StoreInstallRoot.internalRoot(app), Store.GOG), "ELDERBORN-mark").apply { mkdirs() } File(folder, "ELDERBORN.exe").writeText("MZ") StoreGameSidecar(Store.GOG, gameId, "ELDERBORN", "ELDERBORN.exe").write(folder) - // A save location the store gave, but no prefix yet: the upload cannot run, the mark stays. com.droiddeck.launcher.stores.gog.GogPrefs.get(app).edit().putString("cloud_template_$gameId", "<?SAVED_GAMES?>/ELDERBORN").apply() CloudSaves.markDirty(app, Store.GOG, gameId) assertTrue(CloudSaves.dirty(app).contains(Store.GOG to gameId)) val first = CloudSaves.uploadDirty(app, Store.GOG, gameId, "session-end")!! assertEquals("no-prefix", first.reason) assertTrue(CloudSaves.dirty(app).contains(Store.GOG to gameId)) - // Recovery waits while a session runs. CloudSaves.uploadAllDirty(app, "recovery", running = true) assertTrue(CloudSaves.dirty(app).contains(Store.GOG to gameId)) - // The store has no cloud saves for it: a final skip, the mark goes; a second trigger finds nothing. com.droiddeck.launcher.stores.gog.GogPrefs.get(app).edit().putString("cloud_template_$gameId", "").apply() assertEquals("no-cloud-saves", CloudSaves.uploadDirty(app, Store.GOG, gameId, "exit")!!.reason) assertTrue(CloudSaves.dirty(app).none { it.second == gameId }) diff --git a/app/src/test/java/com/droiddeck/launcher/stores/GameFactsTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/GameFactsTest.kt new file mode 100644 index 0000000000..c8834783bd --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/GameFactsTest.kt @@ -0,0 +1,70 @@ +package com.droiddeck.launcher.stores + +import java.util.Locale +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Before +import org.junit.Test + +class GameFactsTest { + private val saved = Locale.getDefault() + + @Before fun english() = Locale.setDefault(Locale.US) + @After fun restore() = Locale.setDefault(saved) + + @Test fun theSameNameMatchesWhateverItsMarksAndPunctuation() { + assertEquals(3, TitleMatch.score("The Witcher 3: Wild Hunt", "The Witcher 3: Wild Hunt")) + assertEquals(3, TitleMatch.score("DOOM Eternal™", "DOOM Eternal")) + assertEquals(3, TitleMatch.score("Ori & the Will of the Wisps", "Ori and the Will of the Wisps")) + } + + @Test fun anEditionIsTheSameGame() { + assertEquals(2, TitleMatch.score("The Witcher 3: Wild Hunt - Complete Edition", "The Witcher 3: Wild Hunt")) + assertEquals(2, TitleMatch.score("Control", "Control Ultimate Edition")) + assertEquals(2, TitleMatch.score("Fallout: New Vegas - Ultimate Edition", "Fallout: New Vegas")) + } + + @Test fun aSubtitleOnEitherSideStillMatchesButLessWell() { + assertEquals(1, TitleMatch.score("The Witcher 3: Wild Hunt", "The Witcher 3: Wild Hunt — Remastered")) + assertEquals(1, TitleMatch.score("Alan Wake Remastered (2021)", "Alan Wake Remastered")) + } + + @Test fun aSequelOrASiblingIsNotTheSameGame() { + assertEquals(0, TitleMatch.score("Hades", "Hades II")) + assertEquals(0, TitleMatch.score("Batman: Arkham City", "Batman: Arkham Knight")) + assertEquals(0, TitleMatch.score("Portal", "Portal 2")) + assertEquals(0, TitleMatch.score("", "Portal")) + } + + @Test fun thePickPrefersTheClosestNameThenTheSitesOwnOrder() { + val results = listOf("Hades II", "The Witcher 3: Wild Hunt — Songs of the Past", "Hades", "Hades") + assertEquals(2, TitleMatch.pick("Hades", results.withIndex().toList()) { listOf(it.value) }?.index) + assertNull(TitleMatch.pick("Hades", listOf("Hades II", "Hadesville")) { listOf(it) }) + assertEquals("x", TitleMatch.pick("The Witcher III: Wild Hunt", listOf("x" to "The Witcher 3: Wild Hunt, The Witcher III: Wild Hunt")) { it.second.split(',') }?.first) + } + + @Test fun theSearchTermDropsMarksAndTheEdition() { + assertEquals("The Witcher 3 Wild Hunt", TitleMatch.searchTerm("The Witcher® 3: Wild Hunt - Game of the Year Edition")) + assertEquals("Disco Elysium The Final Cut", TitleMatch.searchTerm("Disco Elysium - The Final Cut")) + assertEquals("Marvel's Spider-Man Remastered", TitleMatch.searchTerm("Marvel's Spider-Man Remastered")) + assertEquals("Deluxe Ski Jump", TitleMatch.searchTerm("Deluxe Ski Jump")) + } + + @Test fun eachStoresDateReadsTheSameAndAPlaceholderIsDropped() { + assertEquals("May 19, 2015", GameFacts.releaseLabel("2015-05-19T00:00:00+02:00")) + assertEquals("May 19, 2015", GameFacts.releaseLabel("2015.05.19")) + assertEquals("Dec 19, 2022", GameFacts.releaseLabel("2022-12-19T16:00:00.000Z")) + assertNull(GameFacts.releaseLabel("2099-01-01T00:00:00.000Z")) + assertNull(GameFacts.releaseLabel("null")) + assertNull(GameFacts.releaseLabel("")) + } + + @Test fun hoursRoundToTheNearestHalf() { + assertEquals("51½", GameFacts.hours(186_070)) + assertEquals("52", GameFacts.hours(52 * 3600 + 500)) + assertEquals("51½", GameFacts.hours(51 * 3600 + 1900)) + assertEquals("1", GameFacts.hours(3600)) + assertNull(GameFacts.hours(2_400)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/GogCometGenerationTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/GogCometGenerationTest.kt new file mode 100644 index 0000000000..0590ec1584 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/GogCometGenerationTest.kt @@ -0,0 +1,34 @@ +package com.droiddeck.launcher.stores + +import com.droiddeck.launcher.session.SessionState +import com.droiddeck.launcher.stores.gog.GogComet +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class GogCometGenerationTest { + @After fun reset() { + GogComet.end(SessionState.sessionId) + SessionState.running = false + SessionState.sessionId = null + } + + @Test fun anOldTeardownCannotDisableTheReplacementSession() { + SessionState.running = true + SessionState.sessionId = "old" + GogComet.begin() + SessionState.sessionId = "replacement" + GogComet.begin() + GogComet.end("old") + val app = RuntimeEnvironment.getApplication() + assertEquals("no-game", GogComet.prepare(app, "missing").getString("reason")) + GogComet.end("replacement") + assertEquals("no-session", GogComet.prepare(app, "missing").getString("reason")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/InstalledCardsTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/InstalledCardsTest.kt index 090280f772..da3b873e1b 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/InstalledCardsTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/InstalledCardsTest.kt @@ -4,18 +4,15 @@ import java.io.File import org.junit.Assert.assertEquals import org.junit.Test -/** The Installed tab draws what its count counts: the installs on disk. */ class InstalledCardsTest { private fun install(store: Store, id: String, title: String) = InstalledStoreGame(StoreGameSidecar(store, id, title, "game.exe", cover = "https://img/$id.jpg"), File("/x/$id")) @Test fun everyInstallIsACardWhetherOrNotTheLibraryHasLoaded() { val installed = listOf(install(Store.GOG, "1", "DOOM + DOOM II"), install(Store.GOG, "2", "DOOM I Enhanced"), install(Store.EPIC, "e", "DOOMBLADE")) - // Library not loaded: cards from the sidecars. val bare = installedCards(Store.GOG, installed, emptyList()) assertEquals(listOf("DOOM + DOOM II", "DOOM I Enhanced"), bare.map { it.title }) assertEquals("https://img/1.jpg", bare.first().tallImageUrl) - // Loaded: the library item wins, by id, or by title when the ids differ. val library = listOf( CatalogItem(Store.GOG, "1", "DOOM + DOOM II", imageUrl = "wide1", owned = true), CatalogItem(Store.GOG, "999", "DOOM I Enhanced", imageUrl = "wide2", owned = true), diff --git a/app/src/test/java/com/droiddeck/launcher/stores/MatureContentTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/MatureContentTest.kt index 2380b692e7..ec6b2062bd 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/MatureContentTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/MatureContentTest.kt @@ -9,7 +9,6 @@ import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config -/** Mature means what the store's own ratings or tags say; a title without them stays visible. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class MatureContentTest { @@ -20,7 +19,6 @@ class MatureContentTest { assertTrue(GogStoreCatalog.isMature(gog("""{"name":"gogRating","ageRating":"18"}""", ""))) assertTrue(GogStoreCatalog.isMature(gog("""{"name":"pegiRating","ageRating":"12"}""", """{"name":"NSFW","slug":"nsfw"}"""))) assertFalse(GogStoreCatalog.isMature(gog("""{"name":"esrbRating","ageRating":"13"},{"name":"uskRating","ageRating":"16"}""", """{"name":"Puzzle","slug":"puzzle"}"""))) - // No rating data at all: visible. assertFalse(GogStoreCatalog.isMature(JSONObject("""{"id":"2","title":"U"}"""))) } diff --git a/app/src/test/java/com/droiddeck/launcher/stores/SortCatalogItemsTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/SortCatalogItemsTest.kt new file mode 100644 index 0000000000..d0e7ef94f6 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/SortCatalogItemsTest.kt @@ -0,0 +1,67 @@ +package com.droiddeck.launcher.stores + +import org.junit.Assert.assertEquals +import org.junit.Test + +class SortCatalogItemsTest { + private fun item(id: String, title: String, size: Long = 0, releaseDate: String = "") = + CatalogItem(Store.GOG, id, title, imageUrl = null, sizeBytes = size, releaseDate = releaseDate, owned = true) + + @Test fun titleOrderIsCaseInsensitiveAndDescendingIsItsMirror() { + val items = listOf(item("1", "Zelda"), item("2", "alpha"), item("3", "Beta")) + assertEquals(listOf("alpha", "Beta", "Zelda"), sortCatalogItems(items, "titleAsc").map { it.title }) + assertEquals(listOf("Zelda", "Beta", "alpha"), sortCatalogItems(items, "titleDesc").map { it.title }) + } + + @Test fun playedAndInstalledComeFirstWithTitlesBreakingTies() { + val items = listOf(item("1", "Zelda"), item("2", "alpha"), item("3", "Beta")) + val played = mapOf("gog:3" to 900L, "gog:1" to 900L) + assertEquals(listOf("Beta", "Zelda", "alpha"), sortCatalogItems(items, "lastPlayed", lastPlayed = { played[it.key] ?: 0L }).map { it.title }) + val installed = mapOf("gog:2" to 500L) + assertEquals(listOf("alpha", "Beta", "Zelda"), sortCatalogItems(items, "recentlyInstalled", installedAt = { installed[it.key] ?: 0L }).map { it.title }) + } + + @Test fun sizeAscendingPutsUnknownSizesLast() { + val items = listOf(item("1", "Zelda"), item("2", "alpha", size = 500), item("3", "Beta", size = 900)) + assertEquals(listOf("alpha", "Beta", "Zelda"), sortCatalogItems(items, "sizeAsc").map { it.title }) + assertEquals(listOf("Beta", "alpha", "Zelda"), sortCatalogItems(items, "sizeDesc").map { it.title }) + } + + @Test fun releaseDatesSortNewestFirstAndUnparsableOnesLast() { + val items = listOf(item("1", "Zelda", releaseDate = "1986-02-21"), item("2", "alpha", releaseDate = "2023-05-12"), item("3", "Beta", releaseDate = "TBA")) + assertEquals(listOf("alpha", "Zelda", "Beta"), sortCatalogItems(items, "releaseDateDesc").map { it.title }) + } + + @Test fun unknownSortKeepsTheCatalogsOwnOrder() { + val items = listOf(item("1", "Zelda"), item("2", "alpha")) + assertEquals(listOf("Zelda", "alpha"), sortCatalogItems(items, "whatever").map { it.title }) + } + + @Test fun pendingSizeSortRetainsThePreviousSortOrder() { + val items = listOf(item("1", "Zelda"), item("2", "alpha"), item("3", "Beta")) + val previousOrders = listOf( + sortCatalogItems(items, "titleDesc"), + sortCatalogItems(items, "lastPlayed", lastPlayed = { if (it.id == "3") 900L else 0L }), + ) + previousOrders.forEach { previous -> + assertEquals(previous, retainCatalogOrder(items, previous)) + } + } + + @Test fun retainedOrderUsesCurrentItemMetadata() { + val old = listOf(item("1", "Zelda"), item("2", "alpha")) + val current = listOf(old[0].copy(sizeBytes = 500), old[1].copy(title = "Alpha updated")) + assertEquals(listOf(current[1], current[0]), retainCatalogOrder(current, old.reversed())) + } + + @Test fun changedMembershipFallsBackToCurrentCandidates() { + val previous = listOf(item("1", "Zelda"), item("2", "alpha")) + val added = previous + item("3", "Beta") + val removed = previous.take(1) + val replaced = listOf(previous[0], item("3", "Beta")) + listOf(added, removed, replaced, emptyList()).forEach { current -> + assertEquals(current, retainCatalogOrder(current, previous)) + } + assertEquals(previous, retainCatalogOrder(previous, emptyList())) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/StoreAccountsCipherTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/StoreAccountsCipherTest.kt index b4346c7ca5..aed81f1556 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/StoreAccountsCipherTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/StoreAccountsCipherTest.kt @@ -17,7 +17,6 @@ import java.security.SecureRandom import javax.crypto.SecretKey import javax.crypto.spec.SecretKeySpec -/** The stores' sign-in files sealed at rest; a plain key stands in for the AndroidKeyStore. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class StoreAccountsCipherTest { @@ -44,7 +43,6 @@ class StoreAccountsCipherTest { assertEquals("AES/GCM", envelope.getString("alg")) assertFalse(envelope.toString().contains("secret")) assertEquals(creds.toString(), CredentialCipher.open(envelope, fake)) - // A fresh IV every time. assertFalse(envelope.getString("iv") == CredentialCipher.seal(creds.toString(), fake).getString("iv")) } @@ -87,7 +85,6 @@ class StoreAccountsCipherTest { @Test fun aFileSealedUnderALostKeyReadsAsSignedOutAndIsDeleted() { StoreAccounts.write(app, Store.AMAZON, creds) - // Data cleared, or a backup restored on another device: the Keystore key is a new one. val other = newKey() StoreAccounts.keys = CredentialCipher.KeyProvider { other } assertNull(StoreAccounts.read(app, Store.AMAZON)) @@ -108,7 +105,6 @@ class StoreAccountsCipherTest { assertEquals(creds.toString(), StoreAccounts.read(app, Store.EPIC).toString()) assertTrue(StoreAccounts.keystoreFailed) - // The next start, on a Keystore that works. StoreAccounts.keys = fake StoreAccounts.keystoreFailed = false StoreAccounts.encryptAll(app) @@ -123,7 +119,6 @@ class StoreAccountsCipherTest { assertNull(StoreAccounts.read(app, Store.GOG)) } - /** A Keystore whose key is there but which fails to hand it over [failures] times first. */ private class Flaky(private val key: SecretKey, var failures: Int, private val error: () -> Exception) : CredentialCipher.KeyProvider { override fun key(): SecretKey = key override fun existing(): SecretKey { if (failures > 0) { failures--; throw error() }; return key } @@ -142,10 +137,8 @@ class StoreAccountsCipherTest { assertNull(StoreAccounts.read(app, Store.EPIC)) assertTrue(StoreAccounts.isUnavailable(Store.EPIC)) assertEquals(sealed, file(Store.EPIC).readText()) - // Still signed in for the page: no sign-in card, and an action says why it failed. assertEquals("Epic sign-in could not be read: try again.", StoresState.notSignedInLine(Store.EPIC)) - // The next access, once the Keystore answers. assertEquals(creds.toString(), StoreAccounts.read(app, Store.EPIC).toString()) assertFalse(StoreAccounts.isUnavailable(Store.EPIC)) assertEquals("Someone", StoreAccounts.signedInAs(app, Store.EPIC)) diff --git a/app/src/test/java/com/droiddeck/launcher/stores/StoreCacheTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/StoreCacheTest.kt index a8e4dd20b4..c01e4202f6 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/StoreCacheTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/StoreCacheTest.kt @@ -11,7 +11,6 @@ import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config -/** Sizes kept per version, and a refresh that touches only the cards that changed. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class StoreCacheTest { @@ -20,7 +19,6 @@ class StoreCacheTest { @Test fun aSizeIsKeptForItsVersionAndAskedAgainForANewOne() { val cache = SizeCache.forStore(dir, Store.EPIC) cache.put("Metalstorm", "1.0.3", 4_400_000_000L) - // Read back from disk by a new instance, as the next app start does. val again = SizeCache.forStore(dir, Store.EPIC) assertEquals(4_400_000_000L, again.get("Metalstorm", "1.0.3")) assertNull(again.get("Metalstorm", "1.0.4")) @@ -36,14 +34,11 @@ class StoreCacheTest { val a = CatalogItem(Store.GOG, "1", "A", imageUrl = "x", owned = true) val b = CatalogItem(Store.GOG, "2", "B", imageUrl = "y", owned = true) val old = listOf(a, b) - // Nothing changed: the very list shown stays. assertSame(old, mergeItems(old, listOf(a.copy(), b.copy()))) - // One card changed: the other is the same object, the changed one is new. val merged = mergeItems(old, listOf(a.copy(), b.copy(title = "B2"))) assertSame(a, merged[0]) assertNotSame(b, merged[1]) assertEquals("B2", merged[1].title) - // A first load is the new list as it is. val fresh = listOf(a) assertSame(fresh, mergeItems(null, fresh)) } diff --git a/app/src/test/java/com/droiddeck/launcher/stores/StoreGameSidecarTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/StoreGameSidecarTest.kt index 1171bce1a7..213cbf9a14 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/StoreGameSidecarTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/StoreGameSidecarTest.kt @@ -9,7 +9,6 @@ import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config -/** Under Robolectric for a real org.json; the plain unit-test android.jar stubs it out. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class StoreGameSidecarTest { @@ -37,11 +36,9 @@ class StoreGameSidecarTest { @Test fun defaultsWhenFieldsAreAbsent() { val back = StoreGameSidecar.parse("""{"store":"gog","id":"1","title":"T","exe":"bin\\game.exe","addToSteam":false}""")!! - // An older sidecar's Steam switch is read past, not acted on. assertEquals("bin/game.exe", back.exe) assertNull(back.launcher) assertTrue(back.args.isEmpty()) - // No state field = an earlier build's finished install. assertTrue(back.isInstalled) } @@ -53,9 +50,7 @@ class StoreGameSidecarTest { val back = StoreGameSidecar.parse(set.toJson().toString())!! assertEquals(EpicOptions(eos = true, offline = true), back.epic) assertFalse(back.epic.wantsCode) - // A sidecar from before the choices existed reads as the defaults. assertEquals(EpicOptions(), StoreGameSidecar.parse("""{"store":"epic","id":"m","title":"M","exe":"M.exe"}""")!!.epic) - // An earlier build's overlay field is read past. assertEquals(EpicOptions(), StoreGameSidecar.parse("""{"store":"epic","id":"m","title":"M","exe":"M.exe","epic":{"v":2,"eos":true,"offline":false,"overlay":true}}""")!!.epic) } @@ -64,22 +59,29 @@ class StoreGameSidecarTest { StoreGameSidecar(Store.EPIC, "m", "Metalstorm", "Metalstorm.exe", launcher = ".droiddeck-launch.bat").write(folder) val written = StoreGameSidecar.updateEpic(folder) { it.copy(offline = true) }!! assertTrue(written.epic.offline) - // What the Steam-launch helper reads: the file itself. val onDisk = org.json.JSONObject(java.io.File(folder, StoreGameSidecar.FILE_NAME).readText()) assertTrue(onDisk.getJSONObject("epic").getBoolean("offline")) assertTrue(onDisk.getJSONObject("epic").getBoolean("eos")) assertFalse(onDisk.getJSONObject("epic").has("overlay")) - // Everything else in it stays. assertEquals(".droiddeck-launch.bat", StoreGameSidecar.read(folder)!!.launcher) assertEquals(null, StoreGameSidecar.updateEpic(java.io.File(folder, "missing")) { it }) } + @Test fun gogAchievementsAreIndependentOfCloudAndSurviveEdits() { + val folder = java.io.File(org.robolectric.RuntimeEnvironment.getApplication().filesDir, "gog-achievements").apply { mkdirs() } + StoreGameSidecar(Store.GOG, "1", "Game", "game.exe", cloud = false).write(folder) + assertTrue(StoreGameSidecar.read(folder)!!.achievements) + StoreGameSidecar.updateAchievements(folder, false) + StoreGameSidecar.updateCloud(folder, true) + assertFalse(StoreGameSidecar.read(folder)!!.achievements) + assertTrue(StoreGameSidecar.read(folder)!!.cloud) + } + @Test fun anInstallUnderWayHasNoExeYetAndIsNotInstalled() { val started = StoreGameSidecar(Store.EPIC, "Metalstorm", "Metalstorm", exe = "", state = StoreGameSidecar.STATE_INSTALLING) val back = StoreGameSidecar.parse(started.toJson().toString())!! assertFalse(back.isInstalled) assertEquals("", back.exe) - // A finished one must still name its exe. assertNull(StoreGameSidecar.parse("""{"store":"gog","id":"1","title":"T","exe":""}""")) assertTrue(StoreGameSidecar.parse(back.copy(exe = "Metalstorm.exe", state = StoreGameSidecar.STATE_INSTALLED).toJson().toString())!!.isInstalled) } @@ -88,7 +90,6 @@ class StoreGameSidecarTest { assertNull(StoreGameSidecar.parse("not json")) assertNull(StoreGameSidecar.parse("""{"store":"steam","id":"1","title":"T","exe":"a.exe"}""")) assertNull(StoreGameSidecar.parse("""{"store":"gog","id":"","title":"T","exe":"a.exe"}""")) - // An exe outside the folder is not trusted: a sidecar must not point the shortcut anywhere. assertNull(StoreGameSidecar.parse("""{"store":"gog","id":"1","title":"T","exe":"../other/a.exe"}""")) assertNull(StoreGameSidecar.parse("""{"store":"gog","id":"1","title":"T","exe":"/abs/a.exe"}""")) assertNull(StoreGameSidecar.parse("""{"store":"gog","id":"1","title":"T","exe":"C:\\a.exe"}""")) @@ -106,21 +107,40 @@ class StoreGameSidecarTest { assertTrue(text.contains("cd /d \"%~dp0Binaries\\Win64\"\r\n")) assertTrue(text.contains("set \"FOO=bar\"\r\n")) assertTrue(text.contains("\r\n\"%~dp0Binaries\\Win64\\Celeste.exe\" -EpicPortal -epicusername=\"Some One\"\r\n")) - // Epic reads the one-shot exchange code the app leaves beside the launcher, then deletes it. assertTrue(text.contains("set /p DD_X=<\"%~dp0.droiddeck-epic-code\"")) - // The code goes on the command line only: the variable is cleared on the very line that - // starts the game (cmd has already expanded it there), so the game inherits none of it. assertTrue(text.contains("set \"DD_X=\" & \"%~dp0Binaries\\Win64\\Celeste.exe\" -EpicPortal -epicusername=\"Some One\" -AUTH_LOGIN=unused -AUTH_PASSWORD=%DD_X% -AUTH_TYPE=exchangecode\r\n")) assertFalse(text.contains("AUTH=")) assertFalse(text.contains("DD_AUTH")) } + @Test fun epicLauncherPrefersTheClientsArguments() { + val text = StoreLaunch.launcherText(sample.copy(exe = "Binaries/Win64/Celeste.exe")) + val lines = text.split("\r\n") + val jump = lines.indexOf("if exist \"%~dp0.droiddeck-epic-args\" goto client") + assertTrue(jump in 0 until lines.indexOf("set \"DD_X=\"")) + val client = lines.indexOf(":client") + assertTrue(client > lines.indexOfFirst { it.contains("-AUTH_TYPE=exchangecode") }) + assertEquals("goto :eof", lines[client - 1]) + assertEquals( + listOf( + "set \"DD_A=\"", + "set /p DD_A=<\"%~dp0.droiddeck-epic-args\"", + "del \"%~dp0.droiddeck-epic-args\"", + "if exist \"%~dp0.droiddeck-epic-code\" del \"%~dp0.droiddeck-epic-code\"", + "set \"DD_A=\" & \"%~dp0Binaries\\Win64\\Celeste.exe\" %DD_A%", + ), + lines.subList(client + 1, client + 6), + ) + assertTrue(text.endsWith("%DD_A%\r\n")) + } + @Test fun gogLauncherHasNoEpicBlockAndIsOnlyWrittenWhenNeeded() { val plain = StoreGameSidecar(Store.GOG, "1", "T", "game.exe") val text = StoreLaunch.launcherText(plain.copy(args = listOf("-windowed"))) assertFalse(text.contains("exchangecode")) assertTrue(text.contains("\"%~dp0game.exe\" -windowed\r\n")) assertFalse(text.contains("DD_X")) + assertFalse(text.contains("droiddeck-epic-args")) assertEquals("\"two words\"", StoreLaunch.quoteArg("two words")) assertEquals("-x=\"a b\"", StoreLaunch.quoteArg("-x=\"a b\"")) } diff --git a/app/src/test/java/com/droiddeck/launcher/stores/StoreInstallRootTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/StoreInstallRootTest.kt index 3856ed562d..c40ef5b201 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/StoreInstallRootTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/StoreInstallRootTest.kt @@ -11,8 +11,8 @@ import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment import org.robolectric.annotation.Config +import org.robolectric.shadows.ShadowStatFs -/** Where a store game goes: internal storage unless the user picks a card, and back to its own folder on a rerun. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class StoreInstallRootTest { @@ -22,11 +22,22 @@ class StoreInstallRootTest { val card = File(app.filesDir, "fake-card/steam").apply { mkdirs() } SessionPrefs.setGameStorage(app, card.path, "Card") assertEquals(File(LinuxRuntime.rootDir(app), "root/Games/Stores").absolutePath, StoreInstallRoot.installRoot(app).absolutePath) - // The library's Games folder is still scanned, for installs an earlier build put there. assertTrue(StoreInstallRoot.roots(app).any { it.absolutePath == File(card, "Games").absolutePath }) assertFalse(StoreInstallRoot.targets(app).first().removable) } + @Test fun theSteamLibraryFolderIsOfferedAsAnInstallTarget() { + val library = File(app.filesDir, "Documents/Games").apply { mkdirs() } + SessionPrefs.setGameStorage(app, library.path, "Games") + val targets = StoreInstallRoot.targets(app) + assertEquals(2, targets.size) + assertEquals(File(library, "Games").absolutePath, targets.last().root.absolutePath) + assertTrue(targets.last().folder) + assertTrue(targets.last().label.startsWith("Games")) + SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "") + assertEquals(1, StoreInstallRoot.targets(app).size) + } + @Test fun anExistingInstallWinsOverAFreshFolderUnderTheChosenRoot() { SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "") val existing = File(StoreInstallRoot.storeDir(StoreInstallRoot.internalRoot(app), Store.GOG), "Old Name").apply { mkdirs() } @@ -44,9 +55,7 @@ class StoreInstallRootTest { File(half, "Metalstorm.exe").writeText("MZ") assertFalse(StoreInstallRoot.isFinished(half)) assertTrue(StoreInstallRoot.unfinished(app).any { it.store == Store.EPIC && it.id == null && it.folder.absolutePath == half.absolutePath }) - // Install again, even with another root picked: the same folder, no duplicate. assertEquals(half.absolutePath, StoreInstallRoot.folderFor(app, Store.EPIC, "abc", "Metalstorm", File(app.filesDir, "card/Games")).absolutePath) - // Begun and finished: the folder becomes a game. StoreInstalls.begin(half, Store.EPIC, "abc", "Metalstorm", null, null) assertTrue(StoreInstallRoot.unfinished(app).any { it.id == "abc" }) StoreGameSidecar(Store.EPIC, "abc", "Metalstorm", "Metalstorm.exe").write(half) @@ -59,4 +68,87 @@ class StoreInstallRootTest { assertTrue(dir.absolutePath.startsWith(app.cacheDir.absolutePath)) assertEquals("a_b_c", dir.name) } + + @Test fun estimatedBytesNeededUsesKnownInstallSizeForAllStores() { + val item = CatalogItem(Store.EPIC, "game1", "Game 1", imageUrl = null, owned = true, sizeBytes = 10_000_000L) + assertEquals(10_000_000L, StoreInstallRoot.estimatedBytesNeeded(item)) + + val gogItem = CatalogItem(Store.GOG, "game2", "Game 2", imageUrl = null, owned = true, sizeBytes = 10_000_000L) + assertEquals(10_000_000L, StoreInstallRoot.estimatedBytesNeeded(gogItem)) + } + + @Test fun checkStorageReportsEnoughWhenSpaceIsUnknownOrAvailable() { + val zeroItem = CatalogItem(Store.EPIC, "game1", "Game 1", imageUrl = null, owned = true, sizeBytes = 0L) + val check = StoreInstallRoot.checkStorage(app, zeroItem, StoreInstallRoot.internalRoot(app)) + assertTrue(check.enough) + } + + @Test fun availableBytesUsesNearestExistingAncestorWithoutCreatingDirectories() { + val existing = File(app.filesDir, "storage-probe").apply { mkdirs() } + val missing = File(existing, "not-created/another-level/game") + ShadowStatFs.registerStats(existing.path, 1024, 100, 100) + + assertTrue(StoreInstallRoot.availableBytes(missing) > 0L) + assertFalse(File(existing, "not-created").exists()) + } + + @Test fun epicDefersFullSizeChecksToItsManifestDeltaForResume() { + val item = CatalogItem(Store.EPIC, "large", "Large", imageUrl = null, owned = true, sizeBytes = Long.MAX_VALUE) + val check = StoreInstallRoot.checkStorage(app, item, StoreInstallRoot.internalRoot(app)) + assertTrue(check.enough) + assertEquals(Long.MAX_VALUE, check.requiredBytes) + } + + @Test fun gogAndAmazonResumeChecksUseTheExistingVolumeAndDeferRemainingWork() { + val card = File(app.filesDir, "resume-card").apply { mkdirs() } + SessionPrefs.setGameStorage(app, card.path, "Card") + for (store in listOf(Store.GOG, Store.AMAZON)) { + val item = CatalogItem(store, "resume-${store.id}", "Partial ${store.id}", imageUrl = null, sizeBytes = Long.MAX_VALUE) + val folder = File(StoreInstallRoot.storeDir(File(card, "Games"), store), StoreInstallRoot.folderName(item.title, item.id)).apply { mkdirs() } + StoreInstalls.begin(folder, store, item.id, item.title, null, null) + val check = StoreInstallRoot.checkStorage(app, item, StoreInstallRoot.internalRoot(app)) + assertTrue(check.enough) + assertEquals(StoreInstallRoot.availableBytes(folder), check.availableBytes) + assertEquals(folder, StoreInstallRoot.folderFor(app, store, item.id, item.title)) + } + } + + @Test fun freshGogAndAmazonStillRejectInsufficientCatalogSpace() { + StoreInstallRoot.internalRoot(app).mkdirs() + ShadowStatFs.registerStats(StoreInstallRoot.internalRoot(app).path, 1024, 100, 100) + for (store in listOf(Store.GOG, Store.AMAZON)) { + val item = CatalogItem(store, "too-large-${store.id}", "Too large ${store.id}", imageUrl = null, sizeBytes = Long.MAX_VALUE) + assertFalse(StoreInstallRoot.checkStorage(app, item, StoreInstallRoot.internalRoot(app)).enough) + } + } + + @Test fun measuredZeroRejectsFreshGogAndAmazonRatherThanBeingUnknown() { + val root = File(app.filesDir, "zero-space").apply { mkdirs() } + ShadowStatFs.registerStats(root.path, 1024, 0, 0) + val missing = File(root, "not-created/game") + assertEquals(0L, StoreInstallRoot.availableBytes(missing)) + assertFalse(File(root, "not-created").exists()) + for (store in listOf(Store.GOG, Store.AMAZON)) { + val item = CatalogItem(store, "zero-${store.id}", "Zero ${store.id}", imageUrl = null, sizeBytes = 1L) + val check = StoreInstallRoot.checkStorage(app, item, missing) + assertFalse(check.enough) + assertEquals(0L, check.availableBytes) + } + } + + @Test fun failedProbesAreUnknownAndDoNotCreateOrWriteToTargets() { + val root = File(app.filesDir, "read-only-probe").apply { mkdirs() } + val missing = File(root, "not-created/game") + val fail: (File) -> Long = { throw java.io.IOException("unavailable") } + assertEquals(-1L, StoreInstallRoot.probeAvailableBytes(missing, fail, fail)) + assertEquals(-1L, StoreInstallRoot.probeAvailableBytes(missing, fail, { 0L })) + assertEquals(42L, StoreInstallRoot.probeAvailableBytes(missing, fail, { 42L })) + assertEquals(0L, StoreInstallRoot.probeAvailableBytes(missing, { 0L }, fail)) + assertFalse(File(root, "not-created").exists()) + assertTrue(root.listFiles().orEmpty().isEmpty()) + assertFalse(StoreInstallRoot.insufficientSpace(1L, -1L)) + assertTrue(StoreInstallRoot.insufficientSpace(1L, 0L)) + assertFalse(StoreInstallRoot.insufficientSpace(1L, 1L)) + assertFalse(StoreInstallRoot.insufficientSpace(0L, 0L)) + } } diff --git a/app/src/test/java/com/droiddeck/launcher/stores/StoreLogTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/StoreLogTest.kt index 0b72b771bc..4295cc5577 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/StoreLogTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/StoreLogTest.kt @@ -4,7 +4,6 @@ import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Test -/** Store lines reach the Downloads log and logcat; nothing in them may carry a token. */ class StoreLogTest { @Test fun gogSecureLinkKeepsOnlyTheHost() { val line = "gog: window 32 in_flight 3 https://gog-cdn-fastly.gog.com/token=nva=1791500000~dirs=/content-system/v2/store/1207658924~token=0a1b2c3d4e5f/content-system/v2/store/1207658924/ab/cd/abcdef 12.1 MB/s" @@ -24,7 +23,6 @@ class StoreLogTest { assertEquals("refresh access_token=… refresh_token: '…' code=… hdnts=… __token__=…", out) assertEquals("Authorization: …", StoreLog.redactLine("Authorization: Bearer eyJhbGciOi")) assertEquals("""{"access_token":"…","expires_in":7200}""", StoreLog.redactLine("""{"access_token":"eyJ.abc","expires_in":7200}""")) - // Ordinary numbers stay: "HTTP code 403" has no separator to read as a secret. assertEquals("HTTP code 403 from https://api.gog.com/products/…", StoreLog.redactLine("HTTP code 403 from https://user:pw@api.gog.com/products/1?expand=x")) } } diff --git a/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadEntryTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadEntryTest.kt index 23c6b93db4..46b38647c9 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadEntryTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadEntryTest.kt @@ -6,23 +6,19 @@ import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Test -/** The Downloads row reads the active stage's own progress, and which stages are behind it. */ class DownloadEntryTest { private val base = DownloadEntry(Store.EPIC, "doomblade", "DOOMBLADE", state = DownloadState.RUNNING) @Test fun downloadRunsOnBytesAndInstallOnItsOwnCount() { val dl = base.copy(stage = DownloadStage.DOWNLOAD, bytesDone = 50, bytesTotal = 200) assertEquals(0.25f, dl.stageFraction, 0.001f) - // Past Download the bytes no longer drive the bar; the stage's own count does. val inst = dl.copy(stage = DownloadStage.INSTALL, stageDone = 30, stageTotal = 40, stageItems = 3, stageItemsTotal = 4) assertEquals(0.75f, inst.stageFraction, 0.001f) assertEquals(75, inst.percent) - // Nothing counted yet: unknown, not empty and not full. assertEquals(-1f, base.copy(stage = DownloadStage.INSTALL).stageFraction, 0f) } @Test fun passedStagesComeFromTheBitsNotTheOrder() { - // Epic checks files before it fetches: Verify is behind Download there. val e = base.copy(stage = DownloadStage.DOWNLOAD, stagesPassed = (1 shl DownloadStage.MANIFEST.ordinal) or (1 shl DownloadStage.VERIFY.ordinal)) assertTrue(e.passed(DownloadStage.VERIFY)) assertFalse(e.passed(DownloadStage.INSTALL)) diff --git a/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadNotificationTextTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadNotificationTextTest.kt index 8bd9870ad4..aca4c436d2 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadNotificationTextTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadNotificationTextTest.kt @@ -4,7 +4,6 @@ import com.droiddeck.launcher.stores.Store import org.junit.Assert.assertEquals import org.junit.Test -/** The notification's line: what the Downloads row says, on one line. */ class DownloadNotificationTextTest { private val base = DownloadEntry(Store.EPIC, "m", "Metalstorm", state = DownloadState.RUNNING) diff --git a/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadQueueRetryTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadQueueRetryTest.kt new file mode 100644 index 0000000000..879e8de91d --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/download/DownloadQueueRetryTest.kt @@ -0,0 +1,140 @@ +package com.droiddeck.launcher.stores.download + +import android.content.Context +import com.droiddeck.launcher.session.SessionPrefs +import com.droiddeck.launcher.stores.* +import java.io.File +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import java.util.concurrent.atomic.AtomicInteger +import org.junit.After +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.json.JSONArray +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import org.robolectric.shadows.ShadowStatFs + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class DownloadQueueRetryTest { + private val app get() = RuntimeEnvironment.getApplication() + + @After fun cleanRows() { DownloadQueue.dismissFinished(); StoreSizes.known.clear() } + + private fun awaitFailure(key: String, error: String) { + val until = System.nanoTime() + TimeUnit.SECONDS.toNanos(5) + while (System.nanoTime() < until) { + val entry = DownloadQueue.entry(key) + if (entry?.state == DownloadState.FAILED && entry.error == error) return + Thread.sleep(10) + } + fail("Expected failed real job: ${DownloadQueue.entry(key)}") + } + + @Test fun storageRetryRechecksThenRunsTheRealBackendAndNormalRetryStillWorks() { + StoreInstallRoot.internalRoot(app).mkdirs() + ShadowStatFs.registerStats(StoreInstallRoot.internalRoot(app).path, 1024, 100, 100) + val item = CatalogItem(Store.GOG, "preflight-retry", "Preflight retry", imageUrl = null, sizeBytes = Long.MAX_VALUE) + val runs = AtomicInteger() + var lastTarget: File? = null + val previous = StoresState.backend(Store.GOG) + val backend = object : StoreBackend { + override val store = Store.GOG + override fun signIn(context: Context) {} + override fun signOut(context: Context) {} + override fun syncLibrary(context: Context, force: Boolean) {} + override fun loadShelves(context: Context, force: Boolean) {} + override fun uninstall(context: Context, game: InstalledStoreGame) {} + override fun install(context: Context, item: CatalogItem, root: File) { + lastTarget = root + DownloadQueue.enqueue(context, DownloadEntry(item.store, item.id, item.title)) { + object : DownloadQueue.DownloadJob { + override fun run(handle: DownloadQueue.JobHandle): String? { + throw IllegalStateException("backend-${runs.incrementAndGet()}") + } + override fun cancel(deleteFiles: Boolean) {} + } + } + } + } + StoresState.register(backend) + try { + StoresState.install(app, item) + assertEquals(DownloadState.FAILED, DownloadQueue.entry(item.key)?.state) + DownloadQueue.retry(app, item.key) + assertEquals(DownloadState.FAILED, DownloadQueue.entry(item.key)?.state) + assertEquals(0, runs.get()) + StoreSizes.known[item.key] = 1 + DownloadQueue.retry(app, item.key) + awaitFailure(item.key, "backend-1") + DownloadQueue.retry(app, item.key) + awaitFailure(item.key, "backend-2") + DownloadQueue.clear(app, item.key) + assertNull(DownloadQueue.entry(item.key)) + + // A card resume (including the restored paused path) must retain its real target. + val card = File(app.filesDir, "retry-card").apply { mkdirs() } + SessionPrefs.setGameStorage(app, card.path, "Card") + val target = File(card, "Games") + val folder = File(StoreInstallRoot.storeDir(target, item.store), StoreInstallRoot.folderName(item.title, item.id)).apply { mkdirs() } + StoreInstalls.begin(folder, item.store, item.id, item.title, null, null) + StoreSizes.known[item.key] = Long.MAX_VALUE + StoresState.unfinished = StoreInstallRoot.unfinished(app) + DownloadQueue.holdPaused(item.key) + StoresState.requestInstall(app, item) + assertEquals(target, lastTarget) + assertEquals(DownloadState.PAUSED, DownloadQueue.entry(item.key)?.state) + assertEquals(2, runs.get()) + val saved = File(app.filesDir, "store-queue.json") + val until = System.nanoTime() + TimeUnit.SECONDS.toNanos(5) + var correctSavedRoot = false + while (!correctSavedRoot && System.nanoTime() < until) { + correctSavedRoot = runCatching { + val rows = JSONArray(saved.readText()) + (0 until rows.length()).any { i -> + val row = rows.getJSONObject(i) + row.getJSONObject("item").getString("id") == item.id && + row.getString("root") == target.absolutePath && row.getBoolean("paused") + } + }.getOrDefault(false) + if (!correctSavedRoot) Thread.sleep(10) + } + assertTrue("Paused saved queue must remember the existing card root", correctSavedRoot) + DownloadQueue.clear(app, item.key) + } finally { + if (previous != null) StoresState.register(previous) + SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "") + StoresState.unfinished = emptyList() + } + } + + @Test fun preflightClearRemovesTheRowWithoutRunningItsRetry() { + val entry = DownloadEntry(Store.AMAZON, "clear-preflight", "Clear") + DownloadQueue.recordFailed(app, entry, "storage") { fail("Clear must not retry") } + DownloadQueue.clear(app, entry.key) + assertNull(DownloadQueue.entry(entry.key)) + } + + @Test fun heldPausedBackendRestoresAndResumesWithoutAPlaceholder() { + val entry = DownloadEntry(Store.GOG, "restored-paused", "Paused") + val ran = CountDownLatch(1) + DownloadQueue.holdPaused(entry.key) + DownloadQueue.enqueue(app, entry) { + object : DownloadQueue.DownloadJob { + override fun run(handle: DownloadQueue.JobHandle): String? { + ran.countDown() + throw IllegalStateException("restored") + } + override fun cancel(deleteFiles: Boolean) {} + } + } + assertEquals(DownloadState.PAUSED, DownloadQueue.entry(entry.key)?.state) + assertEquals(1L, ran.count) + DownloadQueue.resume(app, entry.key) + assertTrue(ran.await(5, TimeUnit.SECONDS)) + awaitFailure(entry.key, "restored") + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicClientTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicClientTest.kt new file mode 100644 index 0000000000..720e122c19 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicClientTest.kt @@ -0,0 +1,448 @@ +package com.droiddeck.launcher.stores.epic + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Rule +import org.junit.Test +import org.junit.rules.TemporaryFolder +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import java.io.File +import java.security.MessageDigest + +@RunWith(RobolectricTestRunner::class) +class EpicClientTest { + @get:Rule val tmp = TemporaryFolder() + + private fun game(appId: Int, source: String) = + com.droiddeck.launcher.frontend.Library.SteamGame(appId, "g$appId", null, "internal", source = source) + + @Test fun theLauncherSitsRightAboveTheFirstEpicGame() { + val launcher = game(EpicClient.LAUNCHER_APP_ID, "epic") + val games = listOf(game(1, "steam"), game(2, "epic"), game(3, "steam"), game(4, "epic")) + assertEquals(listOf(1, 0, 2, 3, 4), EpicClient.withLauncher(games, launcher).map { it.appId }) + assertEquals(listOf(1, 3, 0), EpicClient.withLauncher(listOf(games[0], games[2]), launcher).map { it.appId }) + assertEquals(listOf(1, 2), EpicClient.withLauncher(games.take(2), null).map { it.appId }) + } + + private fun added(name: String, source: String, storeId: String?) = + com.droiddeck.launcher.frontend.AddedGames.Game(File(tmp.root, name), name, File(tmp.root, "$name/$name.exe"), + "/root/Games/$name/$name.exe", "/root/Games/$name", 3_000_000_000L, 0L, emptyList(), source = source, storeId = storeId) + + private fun inSteamSession(block: (android.app.Application) -> Unit) { + val app = org.robolectric.RuntimeEnvironment.getApplication() + val state = com.droiddeck.launcher.session.SessionState + state.running = true + state.stopRequested = false + val mode = state.mode + state.mode = com.droiddeck.launcher.session.SessionService.MODE_STEAM + try { + block(app) + } finally { + state.running = false + state.mode = mode + } + } + + @Test fun aGameFromTheLauncherIsFoundAsItsSteamShortcut() { + val shortcut = added("Fig", "epic", "Fig") + val games = listOf(added("Gog", "gog", "Fig"), added("Plain", "added", null), shortcut) + assertEquals(shortcut, EpicClient.steamShortcut(games, "Fig")) + assertNull(EpicClient.steamShortcut(games, "Other")) + } + + @Test fun onlyARunningSteamSessionTakesGamesFromTheLauncher() { + val app = org.robolectric.RuntimeEnvironment.getApplication() + assertEquals("no-steam", EpicClient.playInSteam(app, "Fig").getString("reason")) + assertEquals("no-steam", EpicClient.runSteamGame(app, "1091500").getString("reason")) + val state = com.droiddeck.launcher.session.SessionState + val mode = state.mode + state.running = true + state.mode = com.droiddeck.launcher.session.SessionService.MODE_RUN + try { + assertEquals("no-steam", EpicClient.runSteamGame(app, "1091500").getString("reason")) + } finally { + state.running = false + state.mode = mode + } + inSteamSession { + com.droiddeck.launcher.session.SessionState.stopRequested = true + try { + assertEquals("no-steam", EpicClient.runSteamGame(it, "1091500").getString("reason")) + } finally { + com.droiddeck.launcher.session.SessionState.stopRequested = false + } + } + } + + @Test fun aSteamGameTheLauncherListsIsStartedInTheRunningClient() = inSteamSession { app -> + assertEquals("bad-id", EpicClient.runSteamGame(app, "0").getString("reason")) + assertTrue(EpicClient.runSteamGame(app, "1091500").getBoolean("ok")) + val started = org.robolectric.Shadows.shadowOf(app).nextStartedService + assertEquals(com.droiddeck.launcher.session.SessionService.ACTION_LAUNCH_GAME, started.action) + assertEquals("1091500", started.getStringExtra(com.droiddeck.launcher.session.SessionService.EXTRA_GAME_ID)) + } + + @Test fun anEpicGameWithoutAShortcutIsNotHandedToSteam() = inSteamSession { app -> + assertEquals("not-registered", EpicClient.playInSteam(app, "Missing").getString("reason")) + } + + @Test fun theLauncherShortcutHasTheIdSteamGivesIt() { + val crc = java.util.zip.CRC32().apply { update("\"/usr/local/bin/droiddeck-epic-steam\"Epic Games Launcher".toByteArray()) }.value + assertEquals(crc or 0x80000000L, EpicClient.shortcutAppId) + assertTrue(EpicClient.shortcutAppId in 0x80000000L..0xFFFFFFFFL) + assertEquals("12918456320", EpicClient.gameId(3L)) + assertEquals(java.lang.Long.toUnsignedString((EpicClient.shortcutAppId shl 32) or 0x02000000L), EpicClient.gameId(EpicClient.shortcutAppId)) + assertTrue(EpicClient.gameId(EpicClient.shortcutAppId).toBigInteger() > Long.MAX_VALUE.toBigInteger()) + } + + @Test fun theSteamListingCarriesTheLauncherOnlyOnceInstalled() { + val app = org.robolectric.RuntimeEnvironment.getApplication() + assertNull(EpicClient.steamListing(app)) + val listing = com.droiddeck.launcher.frontend.AddedGames.writeListing(app, emptyList(), + listOf(org.json.JSONObject().put("name", "A").put("native", true), org.json.JSONObject().put("name", "B"))) + val parsed = org.json.JSONArray(listing.readText()) + assertEquals(2, parsed.length()) + assertTrue(parsed.getJSONObject(0).getBoolean("native")) + assertEquals("B", parsed.getJSONObject(1).getString("name")) + assertEquals(0, org.json.JSONArray(com.droiddeck.launcher.frontend.AddedGames.writeListing(app, emptyList()).readText()).length()) + } + + @Test fun thePadDrivesTheLauncherOnlyWhileSteamShowsIt() = inSteamSession { app -> + val root = com.droiddeck.launcher.runtime.LinuxRuntime.sessionRoot(app).apply { mkdirs() } + val open = File(root, EpicClient.OPEN) + val focused = File(root, EpicClient.FOCUSED_APP) + try { + assertFalse(EpicClient.launcherRunning(app)) + assertFalse(EpicClient.launcherFocused(app)) + open.writeText("1\n") + assertTrue(EpicClient.launcherRunning(app)) + focused.writeText("769\n") + assertFalse(EpicClient.launcherFocused(app)) + focused.writeText("${EpicClient.shortcutAppId}\n") + assertTrue(EpicClient.launcherFocused(app)) + open.writeText("3000000001\n") + assertFalse(EpicClient.launcherFocused(app)) + focused.writeText("3000000001\n") + assertTrue(EpicClient.launcherFocused(app)) + com.droiddeck.launcher.session.SessionState.mode = com.droiddeck.launcher.session.SessionService.MODE_RUN + assertFalse(EpicClient.launcherFocused(app)) + assertFalse(EpicClient.launcherRunning(app)) + } finally { + open.delete() + focused.delete() + } + } + + @Test fun theLauncherEntryNeedsAnInstalledLauncherAndUsesItsIcon() { + val app = org.robolectric.RuntimeEnvironment.getApplication() + assertNull(EpicClient.launcherEntry(app, "Epic Games Launcher", EpicClient.Status(installed = false, version = "1.0"))) + val icon = File(EpicClient.stateDir(app), "app/1.0/epic-games-launcher.png").apply { parentFile!!.mkdirs(); writeBytes(byteArrayOf(1)) } + val entry = EpicClient.launcherEntry(app, "Epic Games Launcher", EpicClient.Status(installed = true, version = "1.0"))!! + assertEquals(com.droiddeck.launcher.frontend.Library.EPIC_LAUNCHER, entry.library) + assertEquals("epic", entry.source) + assertEquals(icon, entry.art) + assertNull(EpicClient.launcherEntry(app, "x", EpicClient.Status(installed = true, version = "2.0"))!!.art) + } + + @Test fun onlyAnInstalledLauncherIsUpdatedAutomatically() { + assertFalse(EpicClient.updateWanted(EpicClient.Status(installed = false), "1.0")) + assertFalse(EpicClient.updateWanted(EpicClient.Status(installed = false, version = "0.9"), "1.0")) + assertTrue(EpicClient.updateWanted(EpicClient.Status(installed = true, version = "0.9"), "1.0")) + assertFalse(EpicClient.updateWanted(EpicClient.Status(installed = true, version = "1.0"), "1.0")) + assertFalse(EpicClient.updateWanted(EpicClient.Status(installed = true, version = "0.9"), null)) + } + + @Test fun anAutomaticSignInSkipsTheAccountPicker() { + val url = "https://www.epicgames.com/id/authorize?client_id=c85f&prompt=select_account&redirect_uri=http%3A%2F%2F127.0.0.1%3A4%2Fa" + assertEquals("https://www.epicgames.com/id/authorize?client_id=c85f&redirect_uri=http%3A%2F%2F127.0.0.1%3A4%2Fa", EpicClient.withoutAccountPrompt(url)) + assertEquals("https://www.epicgames.com/id/authorize", EpicClient.withoutAccountPrompt("https://www.epicgames.com/id/authorize?prompt=select_account")) + val other = "https://www.epicgames.com/id/authorize?prompt=login&x=prompt%3Dselect_account" + assertEquals(other, EpicClient.withoutAccountPrompt(other)) + assertEquals("https://www.epicgames.com/id/authorize", EpicClient.withoutAccountPrompt("https://www.epicgames.com/id/authorize")) + } + + @Test fun noDroidDeckAccountMeansNoHandOff() { + assertFalse(EpicClient.canHandOff(org.robolectric.RuntimeEnvironment.getApplication())) + } + + @Test fun signingOutDropsTheLaunchersSignInAndTellsARunningLauncher() { + val app = org.robolectric.RuntimeEnvironment.getApplication() + val auth = File(EpicClient.dataDir(app), "auth/auth.json").apply { parentFile?.mkdirs() } + val marker = File(EpicClient.stateDir(app), "signed-out") + val auto = File(EpicClient.stateDir(app), "auto-sign-in").apply { parentFile?.mkdirs(); writeText("1\n") } + try { + auth.writeText("""{"prod":{"refresh_token":"t"}}""") + assertTrue(EpicClient.signOut(app)) + assertFalse(auth.exists()) + assertFalse(auto.exists()) + assertTrue(marker.isFile) + marker.delete() + auth.writeText("""{"prod":{"refresh_token":""}}""") + assertFalse(EpicClient.signOut(app)) + assertFalse(auth.exists()) + assertFalse(marker.exists()) + assertFalse(EpicClient.signOut(app)) + } finally { + auth.delete(); marker.delete(); auto.delete() + } + } + + @Test fun uninstallingRemovesTheProgramButKeepsGamesRecordsAndSignIn() { + val app = org.robolectric.RuntimeEnvironment.getApplication() + val state = EpicClient.stateDir(app) + val runtime = File(state, "runtime/4.0").apply { mkdirs() } + File(runtime, "files").mkdirs() + val loop = File(runtime, "files/usr") + java.nio.file.Files.createSymbolicLink(loop.toPath(), java.nio.file.Paths.get(".")) + val outside = File(app.filesDir, "outside-keep").apply { mkdirs() } + java.nio.file.Files.createSymbolicLink(File(runtime, "files/elsewhere").toPath(), outside.toPath()) + File(outside, "keep.txt").writeText("x") + File(state, "app/0.97.0").mkdirs() + File(state, "app/0.97.0/AppRun").writeText("x") + File(state, "current.json").writeText("""{"app":"0.97.0","runtime":"4.0"}""") + val imports = File(state, "client-imports.json").apply { writeText("{}") } + val auth = File(EpicClient.dataDir(app), "auth/auth.json").apply { parentFile?.mkdirs(); writeText("{}") } + val records = File(EpicClient.dataDir(app), "installations.jsonl").apply { writeText("{}\n") } + try { + assertTrue(EpicClient.uninstall(app)) + assertFalse(File(state, "app").exists()) + assertFalse(File(state, "runtime").exists()) + assertFalse(File(state, "current.json").exists()) + assertTrue(imports.isFile) + assertTrue(auth.isFile) + assertTrue(records.isFile) + assertTrue(File(outside, "keep.txt").isFile) + } finally { + imports.delete(); auth.delete(); records.delete(); outside.deleteRecursively() + } + } + + @Test fun theWebSignInIsExpiredForEveryCookieOnBothPathsAndTheDomain() { + assertEquals(emptyList<String>(), EpicClient.expiredCookies(null)) + assertEquals(emptyList<String>(), EpicClient.expiredCookies(" ; ")) + val lines = EpicClient.expiredCookies("EPIC_SSO=abc; EPIC_SSO_RM=1; EPIC_SSO=again;__Host-x=y") + assertEquals(12, lines.size) + assertTrue(lines.contains("EPIC_SSO=; Max-Age=0; Path=/; Secure")) + assertTrue(lines.contains("EPIC_SSO_RM=; Max-Age=0; Path=/id; Secure; Domain=.epicgames.com")) + assertTrue(lines.contains("__Host-x=; Max-Age=0; Path=/; Secure")) + assertTrue(lines.none { "abc" in it }) + val www = EpicClient.expiredCookies("__cf_bm=1", "www.epicgames.com") + assertEquals(6, www.size) + assertTrue(www.contains("__cf_bm=; Max-Age=0; Path=/; Secure; Domain=www.epicgames.com")) + assertEquals(4, EpicClient.expiredCookies("a=1", "example.com").size) + } + + @Test fun launcherVersionComesFromTheRedirect() { + val location = "https://content-download-egs.distro.on.epicgames.com/Builds/EGLv2/0.95.2%2Bgfa9ad49/Linux/EpicGamesLauncher-x86_64.AppImage?launcherfilename=EpicGamesLauncher-x86_64.AppImage" + assertEquals("0.95.2+gfa9ad49", EpicClientSources.launcherVersion(location)) + assertNull(EpicClientSources.launcherVersion("http://content-download-egs.distro.on.epicgames.com/Builds/EGLv2/1.0/Linux/a")) + assertNull(EpicClientSources.launcherVersion("https://example.com/Builds/EGLv2/..%2F..%2Fetc/Linux/a")) + assertNull(EpicClientSources.launcherVersion("https://example.com/other/path")) + } + + @Test fun runtimeChecksumIsReadFromTheSumsFile() { + val sums = """ + 0f3e16b00ed7256db38733d50995b82484ef730167cbf5693e19634dcb04f39a *com.valvesoftware.SteamRuntime.Platform-amd64,i386-steamrt4-runtime-debug.tar.gz + A0F3E16B00ED7256DB38733D50995B82484EF730167CBF5693E19634DCB04F39 *com.valvesoftware.SteamRuntime.Platform-amd64,i386-steamrt4-runtime.tar.gz + """.trimIndent() + assertEquals("a0f3e16b00ed7256db38733d50995b82484ef730167cbf5693e19634dcb04f39", EpicClientSources.sha256For(sums, EpicClientSources.RUNTIME_FILE)) + assertNull(EpicClientSources.sha256For(sums, "missing.tar.gz")) + } + + private fun md5(bytes: ByteArray) = MessageDigest.getInstance("MD5").digest(bytes) + private fun hex(bytes: ByteArray) = bytes.joinToString("") { "%02x".format(it) } + + @Test fun multipartEtagIsChecked() { + val part = 8 shl 20 + val data = ByteArray(part * 2 + 123) { (it * 31).toByte() } + val file = File(tmp.root, "image").apply { writeBytes(data) } + val digest = hex(md5(md5(data.copyOfRange(0, part)) + md5(data.copyOfRange(part, 2 * part)) + md5(data.copyOfRange(2 * part, data.size)))) + assertEquals(true, EpicClientSources.etagMatches(file, "\"$digest-3\"")) + assertEquals(false, EpicClientSources.etagMatches(file, "\"${"0".repeat(32)}-3\"")) + assertNull(EpicClientSources.etagMatches(file, "\"$digest-99\"")) + assertNull(EpicClientSources.etagMatches(file, "W/\"$digest-3\"")) + assertEquals(true, EpicClientSources.etagMatches(file, hex(md5(data)))) + } + + @Test fun appImageMagicIsRequired() { + val good = File(tmp.root, "a").apply { writeBytes(byteArrayOf(0x7f, 'E'.code.toByte(), 'L'.code.toByte(), 'F'.code.toByte(), 2, 1, 1, 0, 'A'.code.toByte(), 'I'.code.toByte(), 2, 0)) } + val bad = File(tmp.root, "b").apply { writeBytes(ByteArray(16)) } + assertTrue(EpicClientSources.isAppImage(good)) + assertFalse(EpicClientSources.isAppImage(bad)) + } + + @Test fun signInUrlsMustRedirectToLoopback() { + val good = "https://www.epicgames.com/id/authorize?client_id=c85f4c6238b04d3399bc0080e83b83fd&response_type=code&redirect_uri=http%3A%2F%2F127.0.0.1%3A41234%2Flauncher%2Fauthorized&state=x" + assertEquals("http://127.0.0.1:41234/launcher/authorized", EpicClient.redirectOf(good)) + assertNull(EpicClient.redirectOf(good.replace("www.epicgames.com", "evil.example"))) + assertNull(EpicClient.redirectOf(good.replace("https://", "http://"))) + assertNull(EpicClient.redirectOf(good.replace("127.0.0.1%3A41234", "example.com%3A80"))) + assertNull(EpicClient.redirectOf(good.replace("%3A41234", ""))) + assertFalse(EpicClient.loopback("http://user@127.0.0.1:1/x")) + assertTrue(EpicClient.loopback("http://localhost:5/launcher/authorized?code=1")) + } + + @Test fun itemsDescribeTheInstallForTheLauncher() { + val install = EpicClientLibrary.Install( + "Fig", "ns1", "item1", "Fig Game", "1.0.5", "Binaries/Win64/Fig.exe", "/root/Games/Stores/Epic/Fig Game", + File(tmp.root, "Fig Game"), "dep1", 1234L, + ) + val item = EpicClientLibrary.item(install, listOf("en"), ownership = true) + val guid = EpicClientLibrary.guid("Fig") + assertEquals(32, guid.length) + assertEquals(guid, EpicClientLibrary.guid("Fig")) + assertTrue(guid.all { it in "0123456789ABCDEF" }) + assertEquals(guid, item.getString("InstallationGuid")) + assertEquals("/root/Games/Stores/Epic/Fig Game", item.getString("InstallLocation")) + assertEquals("/root/Games/Stores/Epic/Fig Game/.egstore", item.getString("ManifestLocation")) + assertEquals("Binaries/Win64/Fig.exe", item.getString("LaunchExecutable")) + assertEquals("Fig", item.getString("AppName")) + assertEquals("Fig", item.getString("MainGameAppName")) + assertEquals("ns1", item.getString("CatalogNamespace")) + assertEquals("item1", item.getString("CatalogItemId")) + assertEquals("1.0.5", item.getString("AppVersionString")) + assertEquals("true", item.getString("OwnershipToken")) + assertEquals("dep1", item.getString("SidecarDeploymentId")) + assertEquals("Fig Game", item.getString("MandatoryAppFolderName")) + assertFalse(item.getBoolean("bIsIncompleteInstall")) + val list = EpicClientLibrary.aggregateFromManifests(File(tmp.root, "none"), listOf(install)).getJSONArray("InstallationList") + assertEquals(1, list.length()) + assertEquals("Fig", list.getJSONObject(0).getString("ArtifactId")) + assertEquals("ns1", list.getJSONObject(0).getString("NamespaceId")) + assertEquals("item1", list.getJSONObject(0).getString("ItemId")) + } + + @Test fun clientManifestsRemainInTheAggregateAndSupplyDroidDeckShortcuts() { + val manifests = File(tmp.root, "Manifests").apply { mkdirs() } + File(manifests, "client.item").writeText( + """{"AppName":"ClientGame","CatalogNamespace":"ns2","CatalogItemId":"item2","InstallLocation":"/root/Games/ClientGame","LaunchExecutable":"Binaries/ClientGame.exe","AppVersionString":"2.0","DisplayName":"Client Game","bIsIncompleteInstall":false}""", + ) + File(manifests, "partial.item").writeText( + """{"AppName":"Partial","CatalogNamespace":"ns","CatalogItemId":"partial","InstallLocation":"/root/partial","bIsIncompleteInstall":true}""", + ) + val managed = EpicClientLibrary.Install( + "RustGame", "ns1", "item1", "Rust Game", "1.0", "Game.exe", "/root/Games/RustGame", File(tmp.root, "RustGame"), "dep", 10, + ) + val old = org.json.JSONObject().put("InstallationList", org.json.JSONArray().put( + org.json.JSONObject().put("AppName", "InstallingGame").put("ArtifactId", "InstallingGame").put("InstallLocation", "/root/Games/InstallingGame"), + )) + val list = EpicClientLibrary.aggregateFromManifests(manifests, listOf(managed), old).getJSONArray("InstallationList") + assertEquals(3, list.length()) + val names = (0 until list.length()).map { list.getJSONObject(it).getString("AppName") } + assertTrue("ClientGame" in names) + assertTrue("RustGame" in names) + assertTrue("InstallingGame" in names) + assertEquals("Binaries/ClientGame.exe", EpicClientLibrary.executableRelative("/root/Games/ClientGame", "Binaries/ClientGame.exe")) + assertNull(EpicClientLibrary.executableRelative("/root/Games/ClientGame", "../outside.exe")) + assertNull(EpicClientLibrary.executableRelative("/root/Games/ClientGame", "C:/outside.exe")) + } + + @Test fun gamesInstalledByTheClientBecomeEpicLibraryShortcuts() { + val context = org.robolectric.RuntimeEnvironment.getApplication() + val game = File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), "root/Games/ClientGame") + File(game, "Binaries").mkdirs() + File(game, "Binaries/ClientGame.exe").writeBytes(byteArrayOf(1)) + val manifests = EpicClientLibrary.manifestsDir(context).apply { mkdirs() } + File(manifests, "client.item").writeText( + """{"AppName":"ClientGame","CatalogNamespace":"ns2","CatalogItemId":"item2","InstallLocation":"/root/Games/ClientGame","LaunchExecutable":"Binaries/ClientGame.exe","AppVersionString":"2.0","DisplayName":"Client Game","bIsIncompleteInstall":false}""", + ) + + assertTrue(EpicClientLibrary.importClientGames(context)) + val sidecar = com.droiddeck.launcher.stores.StoreGameSidecar.read(game)!! + assertEquals(com.droiddeck.launcher.stores.Store.EPIC, sidecar.store) + assertEquals("ClientGame", sidecar.id) + assertEquals("Binaries/ClientGame.exe", sidecar.exe) + assertEquals("true", sidecar.extra["clientManaged"]) + assertTrue(File(game, sidecar.launcher!!).isFile) + assertEquals(File(game, "Binaries/ClientGame.exe").path, + com.droiddeck.launcher.frontend.AddedExes.list(context).first { it.folder == game.path }.exe) + } + + @Test fun gamesTheLauncherInstallsItselfAreImportedFromItsInstallationList() { + val context = org.robolectric.RuntimeEnvironment.getApplication() + val game = File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), "root/Games/Stores/Epic/Luftrausers51924") + File(game, "bin").mkdirs() + File(game, "bin/Luftrausers.exe").writeBytes(byteArrayOf(1)) + val list = EpicClientLibrary.installationsFile(context).apply { parentFile!!.mkdirs() } + list.writeText(listOf( + """{"version":1,"entries":2}""", + """{"installationId":"F00B","complete":false,"dir":"/root/Games/Stores/Epic/Luftrausers51924","platform":"Windows","namespace":"ns","itemId":"it","artifactId":"luft","launchExecutable":"bin/Luftrausers.exe"}""", + """{"installationId":"F00B","complete":true,"dir":"/root/Games/Stores/Epic/Luftrausers51924","platform":"Windows","namespace":"ns","itemId":"it","artifactId":"luft","version":"1.0","sidecar":{"deploymentId":"dep"},"launchExecutable":"bin/Luftrausers.exe"}""", + ).joinToString("\n")) + + assertTrue(EpicClientLibrary.importClientGames(context)) + val sidecar = com.droiddeck.launcher.stores.StoreGameSidecar.read(game)!! + assertEquals(listOf("luft", "Luftrausers51924", "bin/Luftrausers.exe", "1.0", "dep", "true"), + listOf(sidecar.id, sidecar.title, sidecar.exe, sidecar.installVersion, sidecar.extra["deploymentId"], sidecar.extra["clientManaged"])) + assertTrue(com.droiddeck.launcher.frontend.AddedGames.scan(context).any { it.folder.path == game.path && it.source == "epic" }) + assertFalse(EpicClientLibrary.importClientGames(context)) + + list.appendText("\n" + """{"installationId":"F00B","deleted":true}""") + assertTrue(EpicClientLibrary.importClientGames(context)) + assertNull(com.droiddeck.launcher.stores.StoreGameSidecar.read(game)) + assertTrue(com.droiddeck.launcher.frontend.AddedExes.list(context).none { it.folder == game.path }) + } + + @Test fun anUnfinishedOrLinuxInstallIsNotImported() { + val (records, readable) = EpicClientLibrary.clientInstallations(tmp.newFile().apply { + writeText("""{"installationId":"a","complete":true,"platform":"Linux","artifactId":"x","dir":"/root/Games/X"}""" + "\nnot json\n") + }) + assertFalse(readable) + assertTrue(EpicClientLibrary.manifestOf(records.single(), null).getBoolean("bIsIncompleteInstall")) + assertEquals("X", EpicClientLibrary.manifestOf(records.single(), " ").getString("DisplayName")) + assertEquals(emptyList<org.json.JSONObject>() to true, EpicClientLibrary.clientInstallations(File(tmp.root, "missing"))) + } + + @Test fun theLauncherWaitsForTheFexToolSteamInstalls() { + val context = org.robolectric.RuntimeEnvironment.getApplication() + com.droiddeck.launcher.session.SessionPrefs.setGameStorage(context, com.droiddeck.launcher.session.SessionPrefs.GAME_STORAGE_OFF, "") + val steamapps = File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), "root/.local/share/Steam/steamapps").apply { mkdirs() } + assertFalse(EpicClient.fexReady(context)) + EpicClient.requestFex(context) + assertTrue(File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), "root/.config/droiddeck/fex-wanted").isFile) + File(steamapps, "appmanifest_3127680.acf").writeText("\"AppState\"\n{\n\t\"appid\"\t\t\"3127680\"\n\t\"installdir\"\t\t\"FEX-Emu\"\n}\n") + assertFalse(EpicClient.fexReady(context)) + File(steamapps, "common/FEX-Emu/usr/bin").mkdirs() + assertFalse(EpicClient.fexReady(context)) + File(steamapps, "common/FEX-Emu/usr/bin/FEXInterpreter").writeText("") + assertTrue(EpicClient.fexReady(context)) + } + + @Test fun fexOnASecondLibraryIsFoundInItsPrivateToolCopy() { + val context = org.robolectric.RuntimeEnvironment.getApplication() + val library = File(context.cacheDir, "card-library").apply { mkdirs() } + com.droiddeck.launcher.session.SessionPrefs.setGameStorage(context, library.path, "SD Card") + try { + val steamapps = File(library, "steamapps").apply { mkdirs() } + File(steamapps, "appmanifest_3127680.acf").writeText("\"AppState\"\n{\n\t\"appid\"\t\t\"3127680\"\n\t\"installdir\"\t\t\"FEX-Emu\"\n}\n") + File(steamapps, "common/FEX-Emu").mkdirs() + assertFalse(EpicClient.fexReady(context)) + val private = com.droiddeck.launcher.session.SecondaryLibrary.privateRoot(context.filesDir, library) + File(private, "steamapps/common/FEX-Emu/usr/bin").mkdirs() + File(private, "steamapps/common/FEX-Emu/usr/bin/FEX").writeText("") + assertTrue(EpicClient.fexReady(context)) + } finally { + com.droiddeck.launcher.session.SessionPrefs.setGameStorage(context, com.droiddeck.launcher.session.SessionPrefs.GAME_STORAGE_OFF, "") + library.deleteRecursively() + } + } + + @Test fun theLauncherInstallsWhereDroidDeckInstallsEpicGames() { + val context = org.robolectric.RuntimeEnvironment.getApplication() + val settings = File(EpicClient.dataDir(context), "settings/app-settings.json").apply { parentFile!!.mkdirs() } + settings.writeText("""{"defaultInstallDir":"/root/Games","verboseLogs":false}""") + assertEquals("/root/Games/Stores/Epic", EpicClient.prepareInstallDir(context)) + val written = org.json.JSONObject(settings.readText()) + assertEquals("/root/Games/Stores/Epic", written.getString("defaultInstallDir")) + assertFalse(written.getBoolean("verboseLogs")) + assertTrue(File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), "root/Games/Stores/Epic").isDirectory) + settings.writeText("""{"defaultInstallDir":"/root/MyGames"}""") + assertEquals("/root/MyGames", EpicClient.prepareInstallDir(context)) + assertEquals("/root/MyGames", org.json.JSONObject(settings.readText()).getString("defaultInstallDir")) + settings.writeText("""{"defaultInstallDir":"/mnt/droiddeck-sd/Stores/Epic"}""") + assertEquals("/root/Games/Stores/Epic", EpicClient.prepareInstallDir(context)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicCredentialStoreTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicCredentialStoreTest.kt new file mode 100644 index 0000000000..d80b476a01 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicCredentialStoreTest.kt @@ -0,0 +1,86 @@ +package com.droiddeck.launcher.stores.epic + +import com.droiddeck.launcher.stores.CredentialCipher +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreAccounts +import org.json.JSONObject +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import java.security.SecureRandom +import javax.crypto.spec.SecretKeySpec + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class EpicCredentialStoreTest { + private val app get() = RuntimeEnvironment.getApplication() + private val key = SecretKeySpec(ByteArray(32).also { SecureRandom().nextBytes(it) }, "AES") + + @Before fun setUp() { StoreAccounts.keys = CredentialCipher.KeyProvider { key }; StoreAccounts.keystoreFailed = false } + @After fun tearDown() { + StoreAccounts.clear(app, Store.EPIC) + StoreAccounts.keys = CredentialCipher.Keystore; StoreAccounts.keystoreFailed = false + } + + private val existing = JSONObject().put("access_token", "AT").put("refresh_token", "RT").put("account_id", "acc") + .put("display_name", "Someone").put("expires_at", System.currentTimeMillis() + 3_600_000L) + + @Test fun anExistingSignInIsRead() { + StoreAccounts.write(app, Store.EPIC, existing) + val c = EpicCredentialStore.load(app)!! + assertEquals("AT", c.accessToken) + assertEquals("RT", c.refreshToken) + assertEquals("acc", c.accountId) + assertEquals("Someone", c.displayName) + assertTrue(EpicCredentialStore.isLoggedIn(app)) + assertFalse(EpicCredentialStore.expired(app)) + assertEquals("AT", EpicCredentialStore.getValidAccessToken(app)) + assertEquals("Someone", StoreAccounts.signedInAs(app, Store.EPIC)) + } + + @Test fun aRefreshAnswerKeepsWhatItOmits() { + StoreAccounts.write(app, Store.EPIC, existing) + EpicCredentialStore.save(app, EpicCredentialStore.TokenResult("AT2", null, null, null, 5L)) + val c = EpicCredentialStore.load(app)!! + assertEquals("AT2", c.accessToken) + assertEquals("RT", c.refreshToken) + assertEquals("acc", c.accountId) + assertEquals("Someone", c.displayName) + assertTrue(EpicCredentialStore.expired(app)) + val stored = StoreAccounts.read(app, Store.EPIC)!! + for (k in listOf("access_token", "refresh_token", "account_id", "display_name", "expires_at")) assertTrue(k, stored.has(k)) + } + + @Test fun aNewSignInReplacesTheOldAccount() { + StoreAccounts.write(app, Store.EPIC, existing) + EpicCredentialStore.save(app, EpicCredentialStore.TokenResult("NEW", null, "acc2", "Other", 9L), merge = false) + val c = EpicCredentialStore.load(app)!! + assertNull(c.refreshToken) + assertEquals("acc2", c.accountId) + assertFalse(StoreAccounts.read(app, Store.EPIC)!!.has("refresh_token")) + } + + @Test fun signedOutAndUnusableAnswers() { + assertNull(EpicCredentialStore.load(app)) + assertNull(EpicCredentialStore.getValidAccessToken(app)) + assertFalse(EpicCredentialStore.expired(app)) + assertNull(EpicCredentialStore.TokenResult.from(JSONObject().put("error", "x"))) + assertNull(EpicCredentialStore.TokenResult.from(JSONObject().put("refresh_token", "x"))) + StoreAccounts.write(app, Store.EPIC, JSONObject().put("access_token", "").put("account_id", "a")) + assertNull(EpicCredentialStore.load(app)) + } + + @Test fun anExpiringTokenWithoutRefreshTokenIsReturnedAsIs() { + StoreAccounts.write(app, Store.EPIC, JSONObject().put("access_token", "OLD").put("expires_at", 1L)) + assertEquals("OLD", EpicCredentialStore.getValidAccessToken(app)) + assertTrue(EpicCredentialStore.expired(app)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicLibraryTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicLibraryTest.kt new file mode 100644 index 0000000000..4eb819043a --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicLibraryTest.kt @@ -0,0 +1,95 @@ +package com.droiddeck.launcher.stores.epic + +import com.droiddeck.launcher.stores.Store +import org.json.JSONArray +import org.json.JSONObject +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class EpicLibraryTest { + private val app get() = RuntimeEnvironment.getApplication() + + @After fun tearDown() { EpicPrefs.get(app).edit().clear().commit() } + + @Test fun cacheRoundTripsInTheStoredShape() { + val game = EpicGame("Fig", "ns", "cat", "Fig Game", artCover = "tall", artSquare = "wide", developer = "Dev", + description = "Text", installSize = 42L, canRunOffline = false, releaseDate = "2024-01-01", publisher = "Pub") + val text = EpicLibrary.toCacheJson(listOf(game)) + val o = JSONArray(text).getJSONObject(0) + for (key in listOf("appName", "namespace", "catalogItemId", "title", "artCover", "artSquare", "developer", + "description", "version", "installSize", "canRunOffline", "releaseDate", "publisher")) assertTrue(key, o.has(key)) + assertEquals(listOf(game), EpicLibrary.fromCacheJson(text)) + } + + @Test fun readingSkipsDedupsSortsAndCapsSizes() { + val text = JSONArray() + .put(JSONObject().put("appName", "b").put("title", "beta").put("installSize", (1L shl 41))) + .put(JSONObject().put("title", "no app name")) + .put(JSONObject().put("appName", "a").put("title", "Alpha")) + .put(JSONObject().put("appName", "b").put("title", "beta again")) + .toString() + val games = EpicLibrary.fromCacheJson(text) + assertEquals(listOf("a", "b"), games.map { it.appName }) + assertEquals(0L, games[1].installSize) + assertTrue(games[0].canRunOffline) + assertTrue(EpicLibrary.fromCacheJson("not json").isEmpty()) + } + + @Test fun catalogItemMapping() { + EpicPrefs.get(app).edit().putLong("size_Fig", 1234L).putString("release_Old", "2001").commit() + val item = EpicLibrary.toCatalogItem(app, EpicGame("Fig", "ns", "cat", "Fig & Co", artCover = "tall", description = "<p>Hi</p>", installSize = 9L)) + assertEquals(Store.EPIC, item.store) + assertEquals("Fig", item.id) + assertEquals("tall", item.imageUrl) + assertEquals("tall", item.tallImageUrl) + assertEquals(1234L, item.sizeBytes) + assertEquals("Hi", item.description) + assertTrue(item.owned) + assertEquals("https://store.epicgames.com/en-US/browse?q=Fig+%26+Co", item.storeUrl) + assertEquals(mapOf("namespace" to "ns", "catalogItemId" to "cat", "version" to ""), item.extra) + val old = EpicLibrary.toCatalogItem(app, EpicGame("Old", "ns", "c", "Old", artSquare = "wide", installSize = 9L)) + assertEquals("2001", old.releaseDate) + assertEquals(9L, old.sizeBytes) + assertEquals("wide", old.tallImageUrl) + } + + @Test fun dlcAreHiddenUnlessEverythingIsDlc() { + val base = EpicGame("base", "ns", "c1", "Base") + val dlc = EpicGame("dlc", "ns", "c2", "Add-on", isDlc = true) + assertEquals(listOf("base"), EpicLibrary.visible(listOf(dlc, base)).map { it.appName }) + assertEquals(listOf("dlc"), EpicLibrary.visible(listOf(dlc)).map { it.appName }) + } + + @Test fun syncedGamesKeepCachedValuesWhenDetailsAreMissing() { + val record = JSONObject().put("appName", "Fig").put("namespace", "ns").put("catalogItemId", "cat") + val before = EpicGame("Fig", "ns", "cat", "Cached Title", artCover = "c", version = "v1", installSize = 7L) + val kept = EpicLibrary.gameFrom(record, null, before) + assertEquals("Cached Title", kept.title) + assertEquals("v1", kept.version) + assertEquals(7L, kept.installSize) + val fresh = EpicLibrary.gameFrom(record, JSONObject().put("title", "New").put("dlc", true).put("canRunOffline", false), before) + assertEquals("New", fresh.title) + assertTrue(fresh.isDlc) + assertFalse(fresh.canRunOffline) + assertEquals("Fig", EpicLibrary.gameFrom(record, null, null).title) + } + + @Test fun signOutForgetsOnlyTheLibrary() { + EpicPrefs.get(app).edit().putString(EpicLibrary.KEY_CACHE, "[]").putLong(EpicLibrary.KEY_SYNCED_AT, 1L) + .putString("cloud_template_Fig", "{AppData}/x").commit() + EpicBackend.signOut(app) + val prefs = EpicPrefs.get(app) + assertFalse(prefs.contains(EpicLibrary.KEY_CACHE)) + assertFalse(prefs.contains(EpicLibrary.KEY_SYNCED_AT)) + assertTrue(prefs.contains("cloud_template_Fig")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicSaveTemplateTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicSaveTemplateTest.kt new file mode 100644 index 0000000000..5ecc030d91 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicSaveTemplateTest.kt @@ -0,0 +1,30 @@ +package com.droiddeck.launcher.stores.epic + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test + +class EpicSaveTemplateTest { + @Test fun rootsAreCaseInsensitive() { + val p = EpicSaveTemplate.parse("{appdata}\\Game\\Saved", "acc", "app")!! + assertEquals(EpicSaveTemplate.Root.LOCAL_APPDATA, p.root) + assertEquals("/Game/Saved", p.rest) + assertEquals(EpicSaveTemplate.Root.LOCAL_APPDATA, EpicSaveTemplate.parse("{LocalAppData}/x", "a", "b")!!.root) + assertEquals(EpicSaveTemplate.Root.ROAMING_APPDATA, EpicSaveTemplate.parse("{RoamingAppData}/x", "a", "b")!!.root) + assertEquals(EpicSaveTemplate.Root.DOCUMENTS, EpicSaveTemplate.parse("{UserDir}/x", "a", "b")!!.root) + assertEquals(EpicSaveTemplate.Root.SAVED_GAMES, EpicSaveTemplate.parse("{UserSavedGames}/x", "a", "b")!!.root) + assertEquals(EpicSaveTemplate.Root.USER_PROFILE, EpicSaveTemplate.parse("{UserProfile}/x", "a", "b")!!.root) + assertEquals(EpicSaveTemplate.Root.INSTALL_DIR, EpicSaveTemplate.parse("{InstallDir}/x", "a", "b")!!.root) + } + + @Test fun placeholdersAreFilledLiterally() { + val p = EpicSaveTemplate.parse("{UserSavedGames}/S/{epicid}/{APPNAME}/x", "a\$1", "B")!! + assertEquals("/S/a\$1/B/x", p.rest) + } + + @Test fun unknownOrMissingRootIsNull() { + assertNull(EpicSaveTemplate.parse("{Nope}/x", "a", "b")) + assertNull(EpicSaveTemplate.parse("Saves/x", "a", "b")) + assertNull(EpicSaveTemplate.parse("", "a", "b")) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicShelvesTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicShelvesTest.kt new file mode 100644 index 0000000000..3dddd02b58 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/epic/EpicShelvesTest.kt @@ -0,0 +1,58 @@ +package com.droiddeck.launcher.stores.epic + +import com.droiddeck.launcher.stores.CatalogItem +import com.droiddeck.launcher.stores.Store +import com.droiddeck.launcher.stores.StoreShelves +import org.json.JSONArray +import org.json.JSONObject +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class EpicShelvesTest { + private fun item(id: String, items: String, mature: Boolean? = null, tags: List<String> = emptyList()) = JSONObject() + .put("id", id).put("title", "T$id").put("image", "w").put("tall", "t").put("tags", "Action").put("free", false) + .put("hasPrice", true).put("final", "$5").put("orig", "$10").put("disc", 50).put("url", "u").put("dev", "D") + .put("pub", "P").put("rel", "2024").put("desc", "<b>x</b>") + .put("extra", JSONObject().put("namespace", "ns").put("items", items)) + .apply { if (mature != null) put("mature", mature) else put("allTags", JSONArray(tags)) } + + @Test fun nativeAnswerAndPersistedCopyReadTheSame() { + val answer = JSONObject().put("new", JSONArray().put(item("o1", "c1", tags = listOf("Mature")))) + .put("deals", JSONArray()).put("free", JSONArray()).put("trending", JSONArray().put(item("o2", "c2"))) + val shelves = EpicShelves.fromJson(answer.toString())!! + assertEquals(1, shelves.whatsNew.size) + assertTrue(shelves.whatsNew[0].mature) + assertEquals("x", shelves.whatsNew[0].description) + assertEquals(50, shelves.whatsNew[0].discountPercent) + val again = EpicShelves.fromJson(EpicShelves.toJson(shelves))!! + assertEquals(shelves.whatsNew, again.whatsNew) + assertEquals(shelves.trending, again.trending) + } + + @Test fun allEmptyIsAbsent() { + val empty = JSONObject().put("new", JSONArray()).put("deals", JSONArray()).put("free", JSONArray()).put("trending", JSONArray()) + assertNull(EpicShelves.fromJson(empty.toString())) + assertNull(EpicShelves.fromJson(null)) + } + + @Test fun ownedShelfEntriesBecomeTheLibraryItem() { + val shelf = EpicShelves.fromJson(JSONObject().put("free", JSONArray().put(item("offer", "x,c2", mature = false))).toString())!! + val owned = CatalogItem(Store.EPIC, "FigApp", "Fig", imageUrl = null, owned = true, developer = "", + publisher = "Lib Pub", extra = mapOf("namespace" to "ns", "catalogItemId" to "c2")) + val marked = EpicShelves.markOwned(shelf, listOf(owned)) + val entry = marked.free.single() + assertEquals("FigApp", entry.id) + assertTrue(entry.owned) + assertEquals("w", entry.imageUrl) + assertEquals("D", entry.developer) + assertEquals("Lib Pub", entry.publisher) + assertEquals(StoreShelves().isEmpty, EpicShelves.markOwned(StoreShelves(), listOf(owned)).isEmpty) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/stores/gog/GogCdnTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/gog/GogCdnTest.kt index 22b418da68..324338e17e 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/gog/GogCdnTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/gog/GogCdnTest.kt @@ -6,7 +6,6 @@ import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config -/** Every CDN GOG's secure link offers is used, not only the first. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class GogCdnTest { diff --git a/app/src/test/java/com/droiddeck/launcher/stores/gog/GogResumeSpaceTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/gog/GogResumeSpaceTest.kt new file mode 100644 index 0000000000..4934b58980 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/stores/gog/GogResumeSpaceTest.kt @@ -0,0 +1,43 @@ +package com.droiddeck.launcher.stores.gog + +import java.io.File +import java.security.MessageDigest +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import org.robolectric.shadows.ShadowStatFs +import com.droiddeck.launcher.stores.StoreInstallRoot + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33]) +class GogResumeSpaceTest { + @Test fun remainingWorkRejectsMeasuredZeroButNotUnknownSpace() { + val root = File(RuntimeEnvironment.getApplication().filesDir, "gog-zero").apply { mkdirs() } + ShadowStatFs.registerStats(root.path, 1024, 0, 0) + val files = listOf(GogDownloadManager.DepotFile("missing").apply { totalSize = 4 }) + val needed = GogDownloadManager.remainingInstallBytes(files, root) + assertEquals(4L, needed) + assertTrue(StoreInstallRoot.insufficientSpace(needed, StoreInstallRoot.availableBytes(root))) + assertFalse(StoreInstallRoot.insufficientSpace(needed, StoreInstallRoot.SPACE_UNKNOWN)) + } + + @Test fun remainingSpaceExcludesVerifiedFilesButIncludesCorruptAndPartialFiles() { + val root = File(RuntimeEnvironment.getApplication().filesDir, "gog-resume").apply { mkdirs() } + val data = byteArrayOf(1, 2, 3, 4) + val hash = MessageDigest.getInstance("MD5").digest(data).joinToString("") { "%02x".format(it) } + val files = listOf("good", "corrupt", "partial", "missing").map { + GogDownloadManager.DepotFile(it).apply { totalSize = 4; md5 = hash } + } + File(root, "good").writeBytes(data) + File(root, "corrupt").writeBytes(ByteArray(4)) + File(root, "partial").writeBytes(byteArrayOf(1)) + assertEquals(12L, GogDownloadManager.remainingInstallBytes(files, root)) + for (file in files) File(root, file.relativePath).writeBytes(data) + assertEquals(0L, GogDownloadManager.remainingInstallBytes(files, root)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/ComponentDownloadsDrawerTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/ComponentDownloadsDrawerTest.kt new file mode 100644 index 0000000000..8da1e7fa3b --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/ComponentDownloadsDrawerTest.kt @@ -0,0 +1,84 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.test.assertIsNotEnabled +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.performClick +import com.droiddeck.launcher.R +import com.droiddeck.launcher.session.ComponentsManager +import org.junit.Assert.assertEquals +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28]) +class ComponentDownloadsDrawerTest { + @get:Rule val compose = createRobolectricComposeRule() + + private val dxvk = item("dxvk-2.4.1-linux.wcp", "dxvk") + private val stored = item("dxvk-2.3-linux.wcp", "dxvk") + private val inFlight = item("dxvk-2.7.1-linux.wcp", "dxvk") + private val fex = item("fex-2609-linux.wcp", "fex") + + @Test fun choosingDxvkDownloadsTheCatalogItemAndPreventsStoredOrInFlightDownloads() { + val requested = mutableListOf<ComponentsManager.CatalogItem>() + show(downloads = mapOf(inFlight.file to 45), onDownload = requested::add) + compose.onNodeWithTag("cmp-download-dxvk").performClick() + compose.onNodeWithText(stored.file.removeSuffix(".wcp")).assertIsNotEnabled() + compose.onNodeWithText(inFlight.file.removeSuffix(".wcp")).assertIsNotEnabled() + compose.onNodeWithText(fex.file.removeSuffix(".wcp")).assertDoesNotExist() + compose.onNodeWithText(dxvk.file.removeSuffix(".wcp")).performClick() + assertEquals(listOf(dxvk), requested) + compose.onNodeWithText(dxvk.file.removeSuffix(".wcp")).assertDoesNotExist() + compose.onNodeWithText("45%").assertExists() + } + + @Test fun emptyCatalogOffersRefreshAndDisablesVersionChoicesWhileChecking() { + var refreshes = 0 + show(catalog = emptyList(), checking = false, onRefresh = { refreshes++ }) + compose.onNodeWithTag("cmp-download-refresh").performClick() + assertEquals(1, refreshes) + compose.onNodeWithTag("cmp-download-dxvk").assertIsNotEnabled() + compose.onNodeWithText(RuntimeEnvironment.getApplication().getString(R.string.comp_refresh_to_list)).assertExists() + } + + @Test fun catalogRefreshCannotBeStartedTwiceWhileChecking() { + show(checking = true) + compose.onNodeWithTag("cmp-download-refresh").assertIsNotEnabled() + } + + private fun show( + catalog: List<ComponentsManager.CatalogItem> = listOf(dxvk, stored, inFlight, fex), + downloads: Map<String, Int> = emptyMap(), + checking: Boolean = false, + onRefresh: () -> Unit = {}, + onDownload: (ComponentsManager.CatalogItem) -> Unit = {}, + ) { + compose.setContent { + DroidDeckTheme { + Column(Modifier.verticalScroll(rememberScrollState())) { + ComponentDownloadsDrawerGroup( + host = rememberMenuHost(), catalog = catalog, catalogAt = 0, + checking = checking, + packages = listOf(ComponentsManager.Package(stored.file, "dxvk", "2.3", "", 100)), + downloads = downloads, onRefresh = onRefresh, onDownload = onDownload, + track = { Modifier.testTag(it) }, + ) + } + } + } + } + + private fun item(file: String, comp: String) = ComponentsManager.CatalogItem( + file, comp, "Nightlies", "https://github.com/example/$file", 100, "sha256:test", + ) +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/ComponentsPageProfileTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/ComponentsPageProfileTest.kt new file mode 100644 index 0000000000..e01d884da5 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/ComponentsPageProfileTest.kt @@ -0,0 +1,59 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.performClick +import com.droiddeck.launcher.R +import com.droiddeck.launcher.frontend.Library +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28]) +class ComponentsPageProfileTest { + @get:Rule val compose = createRobolectricComposeRule() + + @Test fun gameProfilesCoexistWithTheDefaultComponentStack() { + val context = RuntimeEnvironment.getApplication() + compose.setContent { + DroidDeckTheme { + ComponentsPage( + snapshot = null, + catalog = emptyList(), + catalogAt = 0, + protonId = null, + comp = PROTON_TAB, + checking = false, + busy = null, + downloads = emptyMap(), + onProton = {}, + onComp = {}, + onSwap = {}, + onRestore = {}, + onCancelQueued = {}, + onDeletePackage = {}, + onDeleteOriginal = {}, + onDownload = {}, + onRefresh = {}, + onImport = {}, + onBack = {}, + games = listOf(Library.SteamGame(42, "Game A", null, "internal")), + requestInitialFocus = false, + ) + } + } + val stackHeading = context.getString(R.string.comp_this_proton).uppercase() + compose.onNodeWithText(stackHeading).assertExists() + compose.onNodeWithText(context.getString(R.string.comp_scope_general)).performClick() + compose.onNodeWithText("Game A").performClick() + compose.onNodeWithText(context.getString(R.string.comp_game_hint)).assertExists() + compose.onNodeWithText(stackHeading).assertDoesNotExist() + + compose.onNodeWithText("Game A").performClick() + compose.onNodeWithText(context.getString(R.string.comp_scope_general)).performClick() + compose.onNodeWithText(stackHeading).assertExists() + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/FexVersionTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/FexVersionTest.kt new file mode 100644 index 0000000000..3d4600f8c1 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/FexVersionTest.kt @@ -0,0 +1,27 @@ +package com.droiddeck.launcher.ui + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test + +class FexVersionTest { + @Test fun readsTheTagTheLauncherPins() { + assertEquals("2610 r3", fexVersionOf("#!/bin/bash\nset -eu\nFEX_TAG=fex-2610-r3\nFEX_SHA256=abc\n")) + } + + @Test fun nothingWithoutAPinnedTag() { + assertNull(fexVersionOf("FEX_TAG=\$1\n")) + assertNull(fexVersionOf("# FEX_TAG=fex-2610-r3\n")) + } + + @Test fun readsAnInstalledOrCatalogTag() { + assertEquals("2610 r5", fexVersionOfTag("fex-2610-r5\n")) + assertNull(fexVersionOfTag("latest")) + } + + @Test fun theShippedLauncherHasOne() { + val script = java.io.File("../tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-x64").takeIf { it.isFile } + ?: java.io.File("tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-x64") + assertEquals(true, fexVersionOf(script.readText()) != null) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/FlathubFocusTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/FlathubFocusTest.kt new file mode 100644 index 0000000000..a268c46a80 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/FlathubFocusTest.kt @@ -0,0 +1,104 @@ +package com.droiddeck.launcher.ui + +import android.view.View +import android.view.ViewGroup +import android.widget.EditText +import androidx.compose.runtime.SideEffect +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalView +import androidx.compose.ui.semantics.SemanticsActions +import androidx.compose.ui.test.onNodeWithContentDescription +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.hasText +import androidx.compose.ui.test.hasClickAction +import androidx.compose.ui.test.assertIsNotFocused +import androidx.compose.ui.test.performClick +import androidx.compose.ui.test.performSemanticsAction +import com.droiddeck.launcher.R +import com.droiddeck.launcher.store.FlathubApi +import com.droiddeck.launcher.store.StoreState +import org.junit.After +import org.junit.Assert.assertFalse +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], qualifiers = "w960dp-h540dp-land", application = android.app.Application::class) +class FlathubFocusTest { + @get:Rule val compose = createRobolectricComposeRule() + + @After fun clearStore() { + StoreState.sections.clear() + StoreState.details.clear() + StoreState.openRequest = null + } + + @Test fun openingAnAppReleasesTheCoveredNativeSearchField() { + val id = "io.github.test.Datcord" + StoreState.sections["popular"] = listOf( + FlathubApi.AppSummary(id, "Datcord", "Discord client", "", null, false, 0), + ) + StoreState.details[id] = FlathubApi.AppDetails( + id, "Datcord", "Discord client", "", null, "", null, null, null, + emptyList(), emptyList(), null, 0, 0, listOf("aarch64"), + ) + lateinit var root: View + val focus = FrontFocus() + compose.setContent { + DroidDeckTheme { + val view = LocalView.current + SideEffect { root = view.rootView } + CompositionLocalProvider(LocalFrontFocus provides focus) { + FocusGlideHost { + Storefront(FrontEndState( + installed = "r9", ready = true, available = null, busy = false, stage = "", percent = -1, + desktopInstalled = true, offlineAccount = null, offline = false, frameGenLabel = "", + romsDir = null, logsEnabled = false, steamGames = emptyList(), emulators = emptyList(), running = null, + ), FrontEndActions( + onPlay = {}, onPlayDesktopUi = {}, onSteamGame = {}, onDesktop = {}, onEmulator = {}, + onRom = {}, onResume = {}, onSteamSettings = {}, onDesktopSettings = {}, + onInstallPackage = {}, onRemovePackage = {}, onRuntime = {}, onFrameGenPick = {}, + onImportLossless = {}, onProtons = {}, onComponents = {}, onPerformance = {}, + onRoms = {}, onFiles = {}, onLogs = {}, onOffline = {}, + onWirelessAdbPair = { _, _, _, _ -> }, onWirelessAdbApply = { _, _, _, _ -> }, + onSetPhantomProcessLimit = { _, _ -> }, + )) + } + } + } + } + val context = RuntimeEnvironment.getApplication() + compose.onNodeWithContentDescription(context.getString(R.string.stores_search_open)).performClick() + compose.waitForIdle() + val field = editText(root)!! + compose.runOnIdle { + field.setText(" ") + field.requestFocus() + assertTrue(field.isFocused) + } + compose.waitForIdle() + compose.onNodeWithText("Datcord").performSemanticsAction(SemanticsActions.OnClick) { it() } + compose.onNodeWithText(context.getString(R.string.store_install)).assertExists() + compose.runOnIdle { + assertFalse("Covered search field must release focus", field.isFocused) + assertEquals(" ", field.text.toString()) + focus.items.getValue("tile:store:$id").requestFocus() + } + compose.onNode(hasText("Datcord") and hasClickAction()).assertIsNotFocused() + } + + private fun editText(view: View): EditText? { + if (view is EditText) return view + if (view is ViewGroup) for (i in 0 until view.childCount) { + editText(view.getChildAt(i))?.let { return it } + } + return null + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/GameEnvironmentEditorTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/GameEnvironmentEditorTest.kt new file mode 100644 index 0000000000..14bd5afaf9 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/GameEnvironmentEditorTest.kt @@ -0,0 +1,63 @@ +package com.droiddeck.launcher.ui + +import android.content.Context +import androidx.compose.runtime.mutableStateOf +import androidx.compose.ui.test.hasText +import androidx.compose.ui.test.onAllNodesWithText +import androidx.compose.ui.test.onLast +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.performClick +import androidx.compose.ui.test.performScrollTo +import com.droiddeck.launcher.R +import com.droiddeck.launcher.core.GameEnvironment +import com.droiddeck.launcher.session.GameEnvironmentStore +import org.junit.Assert.assertEquals +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28]) +class GameEnvironmentEditorTest { + @get:Rule val compose = createRobolectricComposeRule() + + @Test fun backgroundSelectionCannotRetargetAnOpenVariableEdit() { + val context: Context = RuntimeEnvironment.getApplication() + val variable = "MESA_SHADER_CACHE_MAX_SIZE" + GameEnvironmentStore.save(context, GameEnvironment.Config(games = mapOf( + "42" to mapOf(variable to "512M"), + "43" to mapOf(variable to "2G"), + ))) + val selectedScope = mutableStateOf("42") + compose.setContent { + DroidDeckTheme { GameEnvironmentRow(initialScope = selectedScope.value) } + } + compose.onNodeWithText(context.getString(R.string.game_env_edit)).performClick() + compose.waitUntil(5_000) { + compose.onAllNodes(hasText("512M")).fetchSemanticsNodes().isNotEmpty() + } + compose.onNodeWithText("512M").performScrollTo().performClick() + compose.onNodeWithText(context.getString(R.string.game_env_change)).performClick() + compose.onAllNodesWithText("512M").onLast().performClick() + compose.onNodeWithText("4G").performClick() + + compose.runOnIdle { selectedScope.value = "43" } + compose.onNodeWithText(context.getString(R.string.game_env_save)).performClick() + compose.waitUntil(5_000) { + GameEnvironmentStore.read(context).entries("42")[variable] == "4G" + } + assertEquals("2G", GameEnvironmentStore.read(context).entries("43")[variable]) + compose.onNodeWithText("4G").assertExists() + + compose.onNodeWithText(context.getString(R.string.game_env_done)).performScrollTo().performClick() + compose.waitForIdle() + compose.onNodeWithText(context.getString(R.string.game_env_edit)).performClick() + compose.waitUntil(5_000) { + compose.onAllNodes(hasText("2G")).fetchSemanticsNodes().isNotEmpty() + } + compose.onNodeWithText("2G").assertExists() + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/GamepadGeometryTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/GamepadGeometryTest.kt index 77a8d5b8e1..e60f12f444 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/GamepadGeometryTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/GamepadGeometryTest.kt @@ -8,7 +8,6 @@ import org.junit.Assert.assertTrue import org.junit.Test class GamepadGeometryTest { - /** A foldable's unfolded panel (px) and density, as the gamepad gets it under a 16:9 game. */ private data class Panel(val name: String, val width: Int, val height: Int, val density: Float) { val controlsHeight get() = height - SessionDisplay.unfoldedGameHeight(width, height) } @@ -68,7 +67,6 @@ class GamepadGeometryTest { val right = b.getValue(Slot.RIGHT_MAIN) assertEquals(panel.name, left.cy, right.cy, 0.5f) assertEquals(panel.name, left.cx, panel.width - right.cx, 0.5f) - // In the bottom half of their side, nearer the corner than the second controls. assertTrue(panel.name, left.cx < b.getValue(Slot.LEFT_SECOND).cx) assertTrue(panel.name, left.cy > panel.controlsHeight / 2f) } @@ -77,8 +75,6 @@ class GamepadGeometryTest { @Test fun middleButtonsKeepTheDeckOrder() { for (panel in panels) { val b = boxes(panel) - // View before Menu and Steam before QAM: left of it in a row or two by two, above it - // in a single column. fun before(a: Slot, c: Slot) = b.getValue(a).let { x -> b.getValue(c).let { y -> x.cx < y.cx - 0.5f || (kotlin.math.abs(x.cx - y.cx) <= 0.5f && x.cy < y.cy) } } assertTrue(panel.name, before(Slot.VIEW, Slot.MENU)) diff --git a/app/src/test/java/com/droiddeck/launcher/ui/GamesClientTagTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/GamesClientTagTest.kt new file mode 100644 index 0000000000..9f89330c19 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/GamesClientTagTest.kt @@ -0,0 +1,70 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.ui.Modifier +import androidx.compose.ui.test.assertCountEquals +import androidx.compose.ui.test.onAllNodesWithTag +import com.droiddeck.launcher.frontend.Library +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [34], qualifiers = "w1200dp-h752dp-land", application = android.app.Application::class) +class GamesClientTagTest { + @get:Rule val compose = createRobolectricComposeRule() + + private val two = listOf( + Library.SteamGame(440, "Team Fortress 2", null, "Steam library"), + Library.SteamGame(70, "Half-Life", null, "Steam library"), + ) + + @Test fun theArm64ClientsListHasNoTag() { + show(two, x64 = false) + compose.onAllNodesWithTag("games-client-x64").assertCountEquals(0) + } + + @Test fun theX8664ClientsListIsTagged() { + show(two, x64 = true) + compose.onAllNodesWithTag("games-client-x64").assertCountEquals(1) + } + + @Test fun anEmptyX8664LibraryIsTaggedToo() { + show(emptyList(), x64 = true) + compose.onAllNodesWithTag("games-client-x64").assertCountEquals(1) + } + + @Test fun aNarrowPaneStillShowsTheTag() { + show(two, x64 = true, narrow = true) + compose.onAllNodesWithTag("games-client-x64").assertCountEquals(1) + } + + private fun show(games: List<Library.SteamGame>, x64: Boolean, narrow: Boolean = false) { + compose.mainClock.autoAdvance = false + compose.setContent { + DroidDeckTheme { + CompositionLocalProvider(LocalFrontFocus provides FrontFocus(), LocalNarrowPane provides narrow) { + FocusGlideHost { + GamesPage(FrontEndState( + installed = "r9", ready = true, available = null, busy = false, stage = "", percent = -1, + desktopInstalled = true, offlineAccount = null, offline = false, frameGenLabel = "", + romsDir = null, logsEnabled = false, steamGames = games, steamGamesX64 = x64, emulators = emptyList(), running = null, + ), FrontEndActions( + onPlay = {}, onPlaySteamVr = {}, onPlayDesktopUi = {}, onSteamGame = {}, onDesktop = {}, onEmulator = {}, + onRom = {}, onResume = {}, onSteamSettings = {}, onDesktopSettings = {}, + onInstallPackage = {}, onRemovePackage = {}, onRuntime = {}, onFrameGenPick = {}, + onImportLossless = {}, onProtons = {}, onComponents = {}, onPerformance = {}, + onRoms = {}, onFiles = {}, onLogs = {}, onOffline = {}, + onWirelessAdbPair = { _, _, _, _ -> }, onWirelessAdbApply = { _, _, _, _ -> }, + onSetPhantomProcessLimit = { _, _ -> }, + ), selected = "app:440", onSelect = {}, modifier = Modifier.fillMaxSize()) + } + } + } + } + compose.mainClock.advanceTimeBy(2_000) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/GlassesCalibrationControlsTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/GlassesCalibrationControlsTest.kt new file mode 100644 index 0000000000..67dba50622 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/GlassesCalibrationControlsTest.kt @@ -0,0 +1,65 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.runtime.mutableStateOf +import androidx.compose.foundation.layout.Column +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.performClick +import com.droiddeck.launcher.R +import com.droiddeck.launcher.glasses.CalibrationPhase +import com.droiddeck.launcher.glasses.GlassesCalibrationState +import org.junit.Assert.* +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28]) +class GlassesCalibrationControlsTest { + @get:Rule val compose = createRobolectricComposeRule() + private fun text(id: Int) = RuntimeEnvironment.getApplication().getString(id) + + @Test fun startRequiresInstructionsAndDoneRecentersAfterSuccessfulCapture() { + val state = mutableStateOf(GlassesCalibrationState(supported = true)) + var starts = 0; var cancels = 0; var recentered = 0 + compose.setContent { + Column { + GlassesCalibrationControls(state.value, + onStart = { starts++; state.value = state.value.copy(phase = CalibrationPhase.SETTLING) }, + onCancel = { cancels++ }, onReset = {}, onDone = { recentered++ }) + } + } + compose.onNodeWithText(text(R.string.glasses_calibration_open)).performClick() + compose.onNodeWithText(text(R.string.glasses_calibration_instructions)).assertExists() + assertEquals(0, starts) + compose.onNodeWithText(text(R.string.glasses_calibration_start)).performClick() + assertEquals(1, starts) + compose.onNodeWithText(text(R.string.glasses_calibration_settling)).assertExists() + compose.onNodeWithText(text(R.string.glasses_calibration_start)).assertDoesNotExist() + compose.runOnIdle { state.value = state.value.copy(saved = true, phase = CalibrationPhase.SAVED, progress = 100) } + compose.onNodeWithText(text(R.string.glasses_calibration_complete)).assertExists() + compose.onNodeWithText(text(R.string.glasses_calibration_done)).performClick() + assertEquals(1, recentered) + } + + @Test fun cancelAndResetDoNotSilentlyStartOrOverwriteCalibration() { + var starts = 0; var cancels = 0; var resets = 0 + compose.setContent { + Column { + GlassesCalibrationControls(GlassesCalibrationState(supported = true, saved = true), + onStart = { starts++ }, onCancel = { cancels++ }, onReset = { resets++ }, onDone = {}) + } + } + compose.onNodeWithText(text(R.string.glasses_calibration_open)).performClick() + compose.onNodeWithText(text(R.string.common_cancel)).performClick() + assertEquals(0, starts) + assertTrue(cancels > 0) + compose.onNodeWithText(text(R.string.glasses_calibration_reset_button)).performClick() + compose.onNodeWithText(text(R.string.glasses_calibration_reset_hint)).assertExists() + assertEquals(0, resets) + compose.onNodeWithText(text(R.string.common_cancel)).performClick() + assertEquals(0, resets) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/GlassesMenuNavigationTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/GlassesMenuNavigationTest.kt new file mode 100644 index 0000000000..7ef5078e05 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/GlassesMenuNavigationTest.kt @@ -0,0 +1,171 @@ +package com.droiddeck.launcher.ui + +import android.view.Display +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.* +import androidx.compose.ui.Modifier +import androidx.compose.ui.focus.FocusRequester +import androidx.compose.ui.focus.focusRequester +import androidx.compose.ui.input.InputMode +import androidx.compose.ui.input.InputModeManager +import androidx.compose.ui.platform.LocalInputModeManager +import androidx.compose.ui.input.key.Key +import androidx.compose.ui.platform.LocalView +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.test.* +import androidx.compose.ui.unit.dp +import com.droiddeck.launcher.glasses.GlassesResolution +import com.droiddeck.launcher.glasses.GlassesSettings +import com.droiddeck.launcher.glasses.GlassesState +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config +import org.robolectric.annotation.GraphicsMode +import java.io.File + +@OptIn(ExperimentalTestApi::class, androidx.compose.ui.ExperimentalComposeUiApi::class) +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], qualifiers = "w360dp-h800dp") +@GraphicsMode(GraphicsMode.Mode.NATIVE) +class GlassesMenuNavigationTest { + @get:Rule val compose = createRobolectricComposeRule() + private lateinit var view: android.view.View + private lateinit var inputMode: InputModeManager + private val firstTab = FocusRequester() + private val glasses = GlassesState(present = true, connected = true, controllable = true, + displayId = Display.DEFAULT_DISPLAY + 1, model = "VITURE Luma Ultra", width = 1920, height = 1200, + hz = 60f, sbs90 = true, supportsSpatial = true, supportsScreen3dof = true, brightness = 4, volume = 3, + resolutions = listOf(GlassesResolution(1920, 1080), GlassesResolution(1920, 1200))) + + @Test fun narrowMenuSeparatesDisplayVrTrackingAndDevice() { + show(inSession = false) + compose.onNodeWithTag("setting-glasses-resolution-two_d").assertExists() + compose.onNodeWithTag("setting-glasses-resolution-three_d").assertExists() + savePreview("display") + compose.onNodeWithTag("glasses-distance").performScrollTo() + savePreview("virtual-screen") + compose.onNodeWithTag("glasses-tab-vr").assertIsDisplayed().performClick() + compose.onNodeWithTag("setting-glasses-resolution-vr").assertIsDisplayed() + compose.onNodeWithTag("setting-glasses-resolution-two_d").assertDoesNotExist() + compose.onNodeWithTag("glasses-vr-fov").assertExists() + savePreview("vr") + compose.onNodeWithTag("glasses-tab-tracking").performClick() + compose.onNodeWithText("LUMA ULTRA CAMERAS — EXPERIMENTAL").assertExists() + compose.onNodeWithTag("setting-glasses-position").assertExists() + savePreview("tracking") + compose.onNodeWithTag("setting-glasses-hands").performScrollTo().assertIsDisplayed() + compose.onNodeWithTag("setting-glasses-joycons").assertExists() + savePreview("hands") + compose.onNodeWithTag("glasses-tab-hardware").assertIsDisplayed().performClick() + compose.onNodeWithTag("glasses-brightness").assertIsDisplayed() + compose.onNodeWithTag("glasses-volume").assertIsDisplayed() + compose.onNodeWithTag("setting-glasses-sunblock").assertIsDisplayed() + compose.onNodeWithTag("setting-glasses-position").assertDoesNotExist() + savePreview("device") + } + + @Test fun controllerCanReachVrTabAndItsLaunchAction() { + var launches = 0 + show(inSession = true, launch = { launches++ }) + compose.runOnIdle { inputMode.requestInputMode(InputMode.Keyboard); firstTab.requestFocus() } + compose.onNodeWithTag("glasses-tab-display").assertIsFocused().performKeyInput { + pressKey(Key.DirectionRight) + pressKey(Key.Enter) + } + compose.onNodeWithTag("glasses-tab-vr").assertIsSelected() + compose.onNodeWithTag("glasses-tab-vr").performKeyInput { pressKey(Key.DirectionDown) } + compose.onNodeWithText("Start SteamVR").assertIsFocused().performKeyInput { pressKey(Key.Enter) } + assertEquals(1, launches) + savePreview("session-vr") + } + + @Test fun unavailableHardwareDoesNotLeaveEmptyTabs() { + var tabs = emptyList<Pair<String, String>>() + compose.setContent { DroidDeckTheme { tabs = glassesTabs(glasses.copy(connected = false)) } } + compose.runOnIdle { assertEquals(listOf("display", "vr"), tabs.map { it.first }) } + } + + @Test fun threeDofRecenterComesFirstOnEveryTab() { + assertRecenterComesFirst(GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN), false) + } + + @Test fun sixDofRecenterComesFirstOnEveryTab() { + assertRecenterComesFirst(GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, positionalTracking = true), false) + } + + @Test fun vrRecenterComesFirstOnEveryTab() { + assertRecenterComesFirst(GlassesSettings(), true) + } + + private fun assertRecenterComesFirst(settings: GlassesSettings, vr: Boolean) { + var recenters = 0 + show(inSession = true, settings = settings, steamVrRunning = vr, recenter = { recenters++ }) + val firstControls = listOf( + GlassesTab.DISPLAY to "setting-glasses-game", + GlassesTab.VR to "setting-glasses-auto3d", + GlassesTab.TRACKING to "setting-glasses-tracking", + GlassesTab.HARDWARE to "glasses-brightness", + ) + for ((tab, control) in firstControls) { + compose.onNodeWithTag("glasses-tab-$tab").performClick() + val button = compose.onNodeWithText("Recenter").assertIsDisplayed() + assertTrue("Recenter must precede $control", button.fetchSemanticsNode().boundsInRoot.bottom <= + compose.onNodeWithTag(control).fetchSemanticsNode().boundsInRoot.top) + button.performClick() + } + assertEquals(4, recenters) + savePreview(if (vr) "recenter-vr" else if (settings.positionalTracking) "recenter-6dof" else "recenter-3dof") + } + + private fun show(inSession: Boolean, launch: () -> Unit = {}, + settings: GlassesSettings = GlassesSettings(positionalTracking = true), + steamVrRunning: Boolean = false, recenter: (() -> Unit)? = null) { + compose.setContent { + DroidDeckTheme { + view = LocalView.current + inputMode = LocalInputModeManager.current + var selected by remember { mutableStateOf(GlassesTab.DISPLAY) } + val host = rememberMenuHost() + Column(Modifier.fillMaxSize().background(MaterialTheme.colorScheme.background).padding(16.dp)) { + SegmentedTabs(glassesTabs(glasses), selected, Modifier.fillMaxWidth(), tabModifier = { key -> + Modifier.testTag("glasses-tab-$key").then(if (key == GlassesTab.DISPLAY) + Modifier.focusRequester(firstTab) else Modifier) + }) { selected = it; host.open = null } + key(selected) { + Column(Modifier.weight(1f).verticalScroll(rememberScrollState())) { + CompositionLocalProvider(LocalChipMinWidth provides 120.dp) { + GlassesGroups(host, glasses, settings, onRecenter = recenter, steamVrRunning = steamVrRunning, + track = { if (it in listOf("glasses-width", "glasses-distance", "glasses-vr-fov", + "glasses-brightness", "glasses-volume")) Modifier.testTag(it) else Modifier }, inSession = inSession, tab = selected, + steamVr = { if (inSession) ActionRow("SteamVR", null, "Start SteamVR", launch) }) + } + } + } + } + } + } + } + + private fun savePreview(name: String) { + val file = File("build/reports/glasses-menus/$name.png") + file.parentFile?.mkdirs() + compose.runOnIdle { + val root = view.rootView + val bitmap = android.graphics.Bitmap.createBitmap(root.width, root.height, android.graphics.Bitmap.Config.ARGB_8888) + root.draw(android.graphics.Canvas(bitmap)) + file.outputStream().use { bitmap.compress(android.graphics.Bitmap.CompressFormat.PNG, 100, it) } + bitmap.recycle() + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/GlassesPanelTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/GlassesPanelTest.kt new file mode 100644 index 0000000000..701d9d1635 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/GlassesPanelTest.kt @@ -0,0 +1,432 @@ +package com.droiddeck.launcher.ui + +import android.view.Display +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.semantics.SemanticsProperties +import androidx.compose.ui.test.SemanticsMatcher +import androidx.compose.ui.test.assert +import androidx.compose.ui.test.assertIsEnabled +import androidx.compose.ui.test.assertIsNotEnabled +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.performClick +import androidx.compose.ui.test.performScrollTo +import com.droiddeck.launcher.R +import com.droiddeck.launcher.glasses.GlassesSettings +import com.droiddeck.launcher.glasses.GlassesState +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28]) +class GlassesPanelTest { + @get:Rule val compose = createRobolectricComposeRule() + + @Test fun flatResolutionMenuShowsPerEyeResolutionsBesideRefresh() { + show() + compose.onNodeWithTag("setting-glasses-hz").assertExists() + compose.onNodeWithTag("setting-glasses-resolution-two_d").performScrollTo().performClick() + compose.onNodeWithText("1920 × 1080").assertExists() + compose.onNodeWithText("1920 × 1200").assertExists() + } + + @Test fun stereoResolutionHasItsOwnPreference() { + show(stereo = true) + compose.onNodeWithTag("setting-glasses-resolution-three_d").assertExists() + compose.onNodeWithTag("setting-glasses-resolution-two_d").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-3d-hz").assertExists() + } + + @Test fun vrResolutionDoesNotEditTheOrdinaryStereoPreference() { + show(stereo = true, steamVrRunning = true, tab = GlassesTab.VR) + compose.onNodeWithTag("setting-glasses-resolution-vr").performScrollTo().performClick() + compose.onNodeWithText("1920 × 1080").assertExists() + compose.onNodeWithTag("setting-glasses-resolution-three_d").assertDoesNotExist() + } + + @Test fun homeDisplayCanConfigureBothOrdinaryResolutionProfiles() { + show(inSession = false) + for (profile in listOf("two_d", "three_d")) + compose.onNodeWithTag("setting-glasses-resolution-$profile").assertExists() + } + + @Test fun nativeThirtyHzAppearsInTheFlatRefreshMenu() { + show(supports30Hz = true) + compose.onNodeWithTag("setting-glasses-hz").performScrollTo().performClick() + compose.onNodeWithText("30 Hz").assertExists() + } + + @Test fun nativeThirtyHzAppearsInStereoEvenWithoutNinetyHzSupport() { + show(stereo = true, supports30Hz = true, sbs90 = false) + compose.onNodeWithTag("setting-glasses-3d-hz").performScrollTo().performClick() + compose.onNodeWithText("30 Hz").assertExists() + compose.onNodeWithText("90 Hz").assertDoesNotExist() + } + + @Test fun unsupportedThirtyHzIsAbsentFromTheRefreshMenu() { + show() + compose.onNodeWithTag("setting-glasses-hz").performScrollTo().performClick() + compose.onNodeWithText("30 Hz").assertDoesNotExist() + } + + @Test fun mirroredNativeThirtyHzExplainsTheDedicatedOutputRequirement() { + show(settings = GlassesSettings(gameOnGlasses = false), supports30Hz = true) + compose.onNodeWithText(text(R.string.glasses_refresh_30_hint)).assertExists() + compose.onNodeWithTag("setting-glasses-hz").performScrollTo().performClick() + compose.onNodeWithText("30 Hz").assertDoesNotExist() + } + + @Test fun automaticFlatGameOffersVirtualScreenInsteadOfIneffectiveSliders() { + show() + compose.onNodeWithTag("glasses-width").assertDoesNotExist() + compose.onNodeWithTag("glasses-distance").assertDoesNotExist() + compose.onNodeWithTag("glasses-vr-fov").assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_screen_use)).assertExists() + compose.onNodeWithText(text(R.string.glasses_screen_flat_hint)).assertExists() + compose.onNodeWithTag("setting-glasses-hz").assertExists() + compose.onNodeWithTag("setting-glasses-3d-hz").assertDoesNotExist() + } + + @Test fun virtualScreenEnablesDimensionsInTwoDimensionalOutput() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN)) + compose.onNodeWithTag("glasses-width").assertIsEnabled() + compose.onNodeWithTag("glasses-distance").assertIsEnabled() + compose.onNodeWithTag("glasses-vr-fov").assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_screen_flat_hint)).assertDoesNotExist() + } + + @Test fun automaticSteamVrShowsFieldOfViewAndStereoRefresh() { + show(stereo = true, steamVrRunning = true, tab = GlassesTab.VR) + compose.onNodeWithTag("glasses-width").assertDoesNotExist() + compose.onNodeWithTag("glasses-distance").assertDoesNotExist() + compose.onNodeWithTag("glasses-vr-fov").assertIsEnabled() + compose.onNodeWithTag("setting-glasses-hz").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-3d-hz").assertExists() + compose.onNodeWithTag("setting-glasses-auto3d").assertExists() + } + + @Test fun mirroredSteamVrIn2dKeepsFieldOfViewAndRecenter() { + show(steamVrRunning = true, outputActive = false, tab = null) + assertMirroredVrControls() + } + + @Test fun mirroredSteamVrIn3dKeepsFieldOfViewAndRecenter() { + show(stereo = true, steamVrRunning = true, outputActive = false, tab = null) + assertMirroredVrControls() + } + + @Test fun mirroredSteamVrUsesStereoControlsWithASavedVirtualScreen() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN), + steamVrRunning = true, outputActive = false, tab = null) + compose.onNodeWithTag("glasses-width").assertDoesNotExist() + compose.onNodeWithTag("glasses-distance").assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_screen_direct_hint)).assertExists() + assertMirroredVrControls() + } + + @Test fun automatic3dForVrUsesStereoControlsWithASavedVirtualScreen() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, auto3d = true), + stereo = true, steamVrRunning = true, tab = null) + compose.onNodeWithTag("glasses-width").assertDoesNotExist() + compose.onNodeWithTag("glasses-distance").assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_screen_direct_hint)).assertExists() + assertMirroredVrControls() + } + + private fun assertMirroredVrControls() { + compose.onNodeWithTag("glasses-vr-fov").assertIsEnabled() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertExists() + compose.onNodeWithText(text(R.string.glasses_screen_no_output)).assertDoesNotExist() + } + + @Test fun automaticStereoOutputDoesNotEnable3dofOrVirtualScreenDimensions() { + show(stereo = true) + compose.onNodeWithTag("setting-glasses-3dof").assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_off))) + compose.onNodeWithTag("glasses-width").assertDoesNotExist() + compose.onNodeWithTag("glasses-distance").assertDoesNotExist() + compose.onNodeWithTag("glasses-vr-fov").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-hz").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-3d-hz").assertExists() + compose.onNodeWithText(text(R.string.glasses_screen_flat_hint)).assertExists() + compose.onNodeWithText(text(R.string.glasses_screen_sbs_hint)).assertDoesNotExist() + } + + @Test fun automaticFlatSbsKeepsTrackingInactive() { + show(stereo = true, tab = GlassesTab.TRACKING) + compose.onNodeWithText(text(R.string.glasses_tracking_flat_hint)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertDoesNotExist() + } + + @Test fun flatGame3dofToggleIsIndependentOfSbsAndShowsScreenControls() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN)) + compose.onNodeWithTag("setting-glasses-3dof").assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_on))) + compose.onNodeWithTag("setting-glasses-3d").assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_off))) + compose.onNodeWithTag("glasses-width").assertIsEnabled() + compose.onNodeWithTag("glasses-distance").assertIsEnabled() + } + + @Test fun separate3dofToggleIsHiddenWithoutHeadTrackingSupport() { + show(supportsScreen3dof = false) + compose.onNodeWithTag("setting-glasses-3dof").assertDoesNotExist() + } + + @Test fun virtualScreenRecenterExplainsHowToSetTheHeight() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN), tab = GlassesTab.TRACKING) + compose.onNodeWithText(text(R.string.glasses_recenter_screen_hint)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertExists() + } + + @Test fun gameWithoutGlassesOutputExplainsWhyGeometryIsUnavailable() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN), outputActive = false) + compose.onNodeWithTag("glasses-width").assertDoesNotExist() + compose.onNodeWithTag("glasses-distance").assertDoesNotExist() + compose.onNodeWithTag("glasses-vr-fov").assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_screen_no_output)).assertExists() + } + + @Test fun homeCanConfigureTheNextSessionWithAnExplanation() { + show(inSession = false, outputActive = false) + compose.onNodeWithTag("glasses-width").assertIsEnabled() + compose.onNodeWithTag("glasses-distance").assertIsEnabled() + compose.onNodeWithTag("glasses-vr-fov").assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_screen_app_wide)).assertExists() + } + + @Test fun flatTrackingExplainsTheModeAndHidesInactiveRecenter() { + show(tab = GlassesTab.TRACKING) + compose.onNodeWithText(text(R.string.glasses_tracking_flat_hint)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertDoesNotExist() + } + + @Test fun virtualScreenGeometryRemainsAvailableWhenUsbControlDisconnects() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN), controlAvailable = false) + compose.onNodeWithTag("setting-glasses-picture").assertIsEnabled() + compose.onNodeWithTag("glasses-width").assertIsEnabled() + compose.onNodeWithTag("glasses-distance").assertIsEnabled() + compose.onNodeWithTag("setting-glasses-hz").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-3d").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-3dof").assertDoesNotExist() + } + + @Test fun runningSteamVrFieldOfViewRemainsAvailableWhenUsbControlDisconnects() { + show(stereo = true, steamVrRunning = true, controlAvailable = false, tab = GlassesTab.VR) + compose.onNodeWithTag("glasses-vr-fov").assertIsEnabled() + compose.onNodeWithTag("setting-glasses-picture").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-3d-hz").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-3d").assertDoesNotExist() + } + + @Test fun sideBySideGameWithoutSteamVrDoesNotOfferIneffectiveFieldOfView() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SBS), stereo = true) + compose.onNodeWithTag("glasses-width").assertDoesNotExist() + compose.onNodeWithTag("glasses-distance").assertDoesNotExist() + compose.onNodeWithTag("glasses-vr-fov").assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_screen_sbs_hint)).assertExists() + compose.onNodeWithText(text(R.string.glasses_screen_direct_hint)).assertDoesNotExist() + } + + @Test fun sideBySideTrackingWithoutSteamVrExplainsTheScopeAndHidesRecenter() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SBS), stereo = true, + tab = GlassesTab.TRACKING) + compose.onNodeWithText(text(R.string.glasses_tracking_sbs_hint)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertDoesNotExist() + } + + @Test fun homeVrCanConfigureResolutionAndFieldOfViewBeforeLaunching() { + show(inSession = false, tab = GlassesTab.VR) + compose.onNodeWithTag("setting-glasses-resolution-vr").assertExists() + compose.onNodeWithTag("glasses-vr-fov").assertIsEnabled() + compose.onNodeWithTag("setting-glasses-auto3d").assertExists() + compose.onNodeWithTag("setting-glasses-picture").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-resolution-two_d").assertDoesNotExist() + } + + @Test fun displayKeepsVrAndHardwareControlsInTheirOwnTabs() { + show(inSession = false) + compose.onNodeWithTag("setting-glasses-auto3d").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-resolution-vr").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-sunblock").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-tracking").assertDoesNotExist() + } + + @Test fun recenterIsHiddenWhenHeadTrackingIsOff() { + show(settings = GlassesSettings(headTracking = false, picture3d = GlassesSettings.PICTURE_SCREEN)) + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertDoesNotExist() + } + + @Test fun trackedMenusCanRecenterWithoutStartingASession() { + var recenters = 0 + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN), inSession = false, + onRecenter = { recenters++ }) + + compose.onNodeWithText(text(R.string.glasses_recenter_screen_hint)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).performClick() + org.junit.Assert.assertEquals(1, recenters) + } + + @Test fun positionalMenusUseTheSameRecenterAction() { + var recenters = 0 + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, positionalTracking = true), + supportsSpatial = true, inSession = false, onRecenter = { recenters++ }) + + compose.onNodeWithText(text(R.string.glasses_recenter_screen_hint)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).performClick() + org.junit.Assert.assertEquals(1, recenters) + } + + @Test fun menusWithoutDedicatedGlassesOutputDoNotOfferRecenter() { + show(settings = GlassesSettings(picture3d = GlassesSettings.PICTURE_SCREEN, gameOnGlasses = false), + inSession = false) + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertDoesNotExist() + } + + @Test fun spatialSteamVrIncludesHeadTrackingAndRestoresTheSavedVirtualScreenSwitch() { + val vrRunning = androidx.compose.runtime.mutableStateOf(true) + val saved = GlassesSettings(headTracking = false, positionalTracking = true, + picture3d = GlassesSettings.PICTURE_SCREEN) + show(settings = saved, supportsSpatial = true, tab = GlassesTab.TRACKING, observedSteamVr = vrRunning) + + compose.onNodeWithTag("setting-glasses-tracking").assertIsNotEnabled().assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_on))) + compose.onNodeWithText(text(R.string.glasses_head_tracking_spatial_vr_hint)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertDoesNotExist() + + compose.runOnIdle { vrRunning.value = false } + + compose.onNodeWithTag("setting-glasses-tracking").assertIsEnabled().assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_off))) + compose.onNodeWithText(text(R.string.glasses_head_tracking_spatial_hint)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertDoesNotExist() + } + + @Test fun rotationOnlySteamVrKeepsTheHeadTrackingSwitchOptional() { + show(settings = GlassesSettings(headTracking = false), supportsSpatial = true, + steamVrRunning = true, tab = GlassesTab.TRACKING) + + compose.onNodeWithTag("setting-glasses-tracking").assertIsEnabled().assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_off))) + compose.onNodeWithText(text(R.string.glasses_head_tracking_hint)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertDoesNotExist() + } + + @Test fun spatialPreferencesDoNotClaimHeadTrackingForPhoneOutput() { + val noDisplay = androidx.compose.runtime.mutableStateOf(GlassesState(present = true, + connected = true, controllable = true, supportsSpatial = true)) + show(settings = GlassesSettings(headTracking = false, positionalTracking = true), + steamVrRunning = true, outputActive = false, tab = GlassesTab.TRACKING, observedState = noDisplay) + + compose.onNodeWithTag("setting-glasses-tracking").assertIsEnabled().assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_off))) + compose.onNodeWithText(text(R.string.glasses_screen_no_output)).assertExists() + compose.onNodeWithText(text(R.string.cardboard_recenter_button)).assertDoesNotExist() + } + + @Test fun experimentalJoyConsAreOffAndRequirePositionalTracking() { + show(supportsSpatial = true, tab = GlassesTab.TRACKING) + compose.onNodeWithText(text(R.string.glasses_experimental).uppercase()).assertExists() + compose.onNodeWithTag("setting-glasses-joycons").assertIsNotEnabled().assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_off))) + } + + @Test fun experimentalGroupFollowsOrdinaryTrackingAndEnablesJoyCons() { + show(supportsSpatial = true, settings = GlassesSettings(positionalTracking = true), tab = GlassesTab.TRACKING) + compose.onNodeWithTag("setting-glasses-joycons").performScrollTo().assertIsEnabled() + val ordinary = compose.onNodeWithTag("setting-glasses-tracking").fetchSemanticsNode().positionInRoot.y + val experimental = compose.onNodeWithText(text(R.string.glasses_experimental).uppercase()).fetchSemanticsNode().positionInRoot.y + org.junit.Assert.assertTrue(experimental > ordinary) + compose.onNodeWithTag("setting-glasses-hands").assertExists() + compose.onNodeWithTag("setting-glasses-steady-hand-aim").assertDoesNotExist() + } + + @Test fun steadyHandAimIsOptionalAndOffByDefault() { + show(supportsSpatial = true, settings = GlassesSettings(positionalTracking = true, handControllers = true), + tab = GlassesTab.TRACKING) + compose.onNodeWithTag("setting-glasses-steady-hand-aim").performScrollTo().assertIsEnabled().assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_off))) + compose.onNodeWithText(text(R.string.glasses_steady_hand_aim_hint)).assertExists() + } + + @Test fun savedSteadyHandAimIsHiddenInJoyConMode() { + show(supportsSpatial = true, settings = GlassesSettings(positionalTracking = true, joyConTracking = true, steadyHandAim = true), + tab = GlassesTab.TRACKING) + compose.onNodeWithTag("setting-glasses-steady-hand-aim").assertDoesNotExist() + } + + @Test fun ultraControlsDisappearOnDisconnectAndForOtherGlassesWithSavedPreferences() { + val state = androidx.compose.runtime.mutableStateOf(GlassesState(present = true, connected = true, + controllable = true, supportsSpatial = true, model = "VITURE Luma Ultra")) + show(settings = GlassesSettings(positionalTracking = true, handControllers = true, joyConTracking = true), + tab = GlassesTab.TRACKING, observedState = state) + compose.onNodeWithTag("setting-glasses-position").assertExists() + compose.onNodeWithTag("setting-glasses-hands").assertExists() + compose.onNodeWithTag("setting-glasses-joycons").assertExists() + val otherStates = listOf(state.value.copy(connected = false)) + + listOf("VITURE Luma Ultra", "VITURE Luma Pro", "VITURE Pro", "XREAL", "RayNeo").map { + state.value.copy(model = it, supportsSpatial = false) + } + for (other in otherStates) { + compose.runOnIdle { state.value = other } + compose.onNodeWithTag("setting-glasses-position").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-hands").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-steady-hand-aim").assertDoesNotExist() + compose.onNodeWithTag("setting-glasses-joycons").assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_spatial_setup)).assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_eye_height)).assertDoesNotExist() + compose.onNodeWithText(text(R.string.glasses_floor)).assertDoesNotExist() + } + compose.runOnIdle { state.value = state.value.copy(supportsSpatial = true) } + compose.onNodeWithTag("setting-glasses-position").assertExists() + } + + private fun show( + settings: GlassesSettings = GlassesSettings(), + stereo: Boolean = false, + steamVrRunning: Boolean = false, + inSession: Boolean = true, + outputActive: Boolean = inSession, + controlAvailable: Boolean = true, + supportsScreen3dof: Boolean = true, + supportsSpatial: Boolean = false, + supports30Hz: Boolean = false, + sbs90: Boolean = true, + tab: String? = GlassesTab.DISPLAY, + observedState: androidx.compose.runtime.State<GlassesState>? = null, + observedSteamVr: androidx.compose.runtime.State<Boolean>? = null, + onRecenter: (() -> Unit)? = {}, + ) { + val state = GlassesState(present = true, connected = controlAvailable, controllable = true, + displayId = Display.DEFAULT_DISPLAY + 1, width = if (stereo) 3840 else 1920, height = 1200, + model = "VITURE Luma Ultra", sbs = stereo, sbs90 = sbs90, supportsScreen3dof = supportsScreen3dof, + supports30Hz = supports30Hz, supportsSpatial = supportsSpatial, resolutions = listOf( + com.droiddeck.launcher.glasses.GlassesResolution(1920, 1080), + com.droiddeck.launcher.glasses.GlassesResolution(1920, 1200))) + compose.setContent { + DroidDeckTheme { + Column(Modifier.verticalScroll(rememberScrollState())) { + GlassesGroups(rememberMenuHost(), observedState?.value ?: state, settings, + track = { key -> + when (key) { + "glasses-width", "glasses-distance", "glasses-vr-fov" -> Modifier.testTag(key) + else -> Modifier + } + }, onRecenter = onRecenter, + inSession = inSession, outputActive = outputActive, + steamVrRunning = observedSteamVr?.value ?: steamVrRunning, tab = tab) + } + } + } + } + + private fun text(id: Int) = RuntimeEnvironment.getApplication().getString(id) +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/GlobalGlassesSettingsTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/GlobalGlassesSettingsTest.kt new file mode 100644 index 0000000000..b64986a1e4 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/GlobalGlassesSettingsTest.kt @@ -0,0 +1,160 @@ +package com.droiddeck.launcher.ui + +import android.app.Application +import android.content.Context +import android.os.Handler +import android.os.Looper +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.ui.semantics.SemanticsProperties +import androidx.compose.ui.test.SemanticsMatcher +import androidx.compose.ui.test.assert +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.performClick +import androidx.compose.ui.test.performScrollTo +import com.droiddeck.launcher.R +import com.droiddeck.launcher.glasses.Glasses +import com.droiddeck.launcher.glasses.GlassesSettings +import com.droiddeck.launcher.glasses.GlassesState +import kotlinx.coroutines.flow.MutableStateFlow +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], qualifiers = "w1200dp-h752dp-land", application = Application::class) +@LooperMode(LooperMode.Mode.PAUSED) +class GlobalGlassesSettingsTest { + @get:Rule val compose = createRobolectricComposeRule() + private val handler = Handler(Looper.getMainLooper()) + private val connected = GlassesState(present = true, connected = true, controllable = true, + displayId = 2, width = 1920, height = 1080, model = "VITURE Luma Ultra", + supportsScreen3dof = true, supportsSpatial = true) + private lateinit var stateBefore: GlassesState + private lateinit var settingsBefore: GlassesSettings + private var appBefore: Any? = null + private var handlerBefore: Any? = null + + @Before fun prepare() { + stateBefore = Glasses.state.value + settingsBefore = Glasses.settings.value + appBefore = field("app").get(null) + handlerBefore = field("handler").get(null) + val app = RuntimeEnvironment.getApplication() + app.getSharedPreferences("glasses", Context.MODE_PRIVATE).edit().clear().commit() + field("app").set(null, app) + field("handler").set(null, handler) + state().value = GlassesState() + settings().value = GlassesSettings() + } + + @After fun restore() { + handler.removeCallbacksAndMessages(null) + state().value = stateBefore + settings().value = settingsBefore + field("app").set(null, appBefore) + field("handler").set(null, handlerBefore) + } + + @Test fun globalSetupOffersGlassesWithoutSteamOrAnInstalledRuntime() { + show() + openGlasses() + + compose.onNodeWithText(text(R.string.setup_glasses_scope)).assertExists() + compose.onNodeWithText(text(R.string.setup_glasses_connect)).assertExists() + compose.onNodeWithTag("setting-glasses-game").assertDoesNotExist() + compose.onNodeWithTag("play-steamvr").assertDoesNotExist() + + compose.onNodeWithText(text(R.string.setup_tab_diagnostics)).performClick() + compose.onNodeWithTag("setting-logs").assertExists() + openGlasses() + compose.onNodeWithText(text(R.string.setup_glasses_connect)).assertExists() + } + + @Test fun hotplugKeepsTheGlobalPageAndSharedTrackingPreferences() { + val saved = GlassesSettings(positionalTracking = true, handControllers = true) + settings().value = saved + show() + openGlasses() + + compose.runOnIdle { state().value = connected } + compose.onNodeWithTag("setting-glasses-3dof").assertExists() + compose.onNodeWithTag("setup-glasses-tab-tracking").performScrollTo().performClick() + compose.onNodeWithTag("setting-glasses-position").assertExists() + + compose.runOnIdle { state().value = GlassesState() } + compose.onNodeWithText(text(R.string.setup_glasses_connect)).assertExists() + compose.onNodeWithTag("setting-glasses-position").assertDoesNotExist() + assertEquals(saved, Glasses.settings.value) + + compose.runOnIdle { state().value = connected } + compose.onNodeWithTag("setting-glasses-position").assertExists() + compose.onNodeWithTag("setting-glasses-hands").assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_on))) + assertEquals(saved, Glasses.settings.value) + } + + @Test fun globalScreenTrackingUsesTheExistingSavedSettings() { + state().value = connected + settings().value = GlassesSettings(gameOnGlasses = false, headTracking = false) + show() + openGlasses() + compose.onNodeWithTag("setting-glasses-3dof").performScrollTo().performClick() + shadowOf(Looper.getMainLooper()).idle() + + assertTrue(Glasses.settings.value.screen3dof) + val prefs = RuntimeEnvironment.getApplication().getSharedPreferences("glasses", Context.MODE_PRIVATE) + assertTrue(prefs.getBoolean("gameOnGlasses", false)) + assertTrue(prefs.getBoolean("headTracking", false)) + assertEquals(GlassesSettings.PICTURE_SCREEN, prefs.getInt("picture3d", -1)) + + compose.onNodeWithText(text(R.string.setup_tab_launcher)).performClick() + openGlasses() + compose.onNodeWithTag("setting-glasses-3dof").assert( + SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_on))) + } + + private fun openGlasses() { + compose.onNodeWithText(text(R.string.setup_tab_glasses)).performClick() + } + + private fun show() { + compose.setContent { + DroidDeckTheme { + CompositionLocalProvider(LocalFrontFocus provides FrontFocus(), LocalNarrowPane provides false) { + FocusGlideHost { + SetupPanel(FrontEndState( + installed = null, ready = false, available = null, busy = false, stage = "", percent = -1, + desktopInstalled = false, offlineAccount = null, offline = false, frameGenLabel = "", + romsDir = null, logsEnabled = false, steamGames = emptyList(), emulators = emptyList(), running = null, + ), FrontEndActions( + onPlay = {}, onPlayDesktopUi = {}, onSteamGame = {}, onDesktop = {}, onEmulator = {}, + onRom = {}, onResume = {}, onSteamSettings = {}, onDesktopSettings = {}, + onInstallPackage = {}, onRemovePackage = {}, onRuntime = {}, onFrameGenPick = {}, + onImportLossless = {}, onProtons = {}, onComponents = {}, onPerformance = {}, + onRoms = {}, onFiles = {}, onLogs = {}, onOffline = {}, + onWirelessAdbPair = { _, _, _, _ -> }, onWirelessAdbApply = { _, _, _, _ -> }, + onSetPhantomProcessLimit = { _, _ -> }, + ), onOpenDeveloperOptions = {}, onRequestWirelessAdb = {}) + } + } + } + } + } + + private fun text(id: Int) = RuntimeEnvironment.getApplication().getString(id) + private fun field(name: String) = Glasses::class.java.getDeclaredField(name).apply { isAccessible = true } + @Suppress("UNCHECKED_CAST") + private fun state() = field("_state").get(null) as MutableStateFlow<GlassesState> + @Suppress("UNCHECKED_CAST") + private fun settings() = field("_settings").get(null) as MutableStateFlow<GlassesSettings> +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/HandCameraPromptTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/HandCameraPromptTest.kt new file mode 100644 index 0000000000..38f2585305 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/HandCameraPromptTest.kt @@ -0,0 +1,59 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.ui.test.assertCountEquals +import androidx.compose.ui.test.onAllNodesWithTag +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.performClick +import com.droiddeck.launcher.handtracking.TrackingCameras +import org.junit.Assert.assertEquals +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [33], qualifiers = "w960dp-h540dp-land", application = android.app.Application::class) +class HandCameraPromptTest { + @get:Rule val compose = createRobolectricComposeRule() + + @Test fun bothCamerasOfferAChoiceWithTheBackOnePicked() { + var allowed: String? = "unset" + compose.setContent { + DroidDeckTheme { HandCameraPrompt(setOf(TrackingCameras.REAR, TrackingCameras.FRONT), onAllow = { allowed = it }, onNotNow = {}) } + } + compose.onNodeWithTag("hand-camera-rear").assertExists() + compose.onNodeWithTag("hand-camera-allow").performClick() + assertEquals(TrackingCameras.REAR, allowed) + } + + @Test fun theFrontCameraCanBeChosen() { + var allowed: String? = "unset" + compose.setContent { + DroidDeckTheme { HandCameraPrompt(setOf(TrackingCameras.REAR, TrackingCameras.FRONT), onAllow = { allowed = it }, onNotNow = {}) } + } + compose.onNodeWithTag("hand-camera-front").performClick() + compose.onNodeWithTag("hand-camera-allow").performClick() + assertEquals(TrackingCameras.FRONT, allowed) + } + + @Test fun aSingleCameraIsUsedWithoutAsking() { + var allowed: String? = "unset" + compose.setContent { + DroidDeckTheme { HandCameraPrompt(setOf(TrackingCameras.REAR), onAllow = { allowed = it }, onNotNow = {}) } + } + compose.onAllNodesWithTag("hand-camera-rear").assertCountEquals(0) + compose.onAllNodesWithTag("hand-camera-front").assertCountEquals(0) + compose.onNodeWithTag("hand-camera-allow").performClick() + assertEquals(null, allowed) + } + + @Test fun notNowDeclines() { + var declined = false + compose.setContent { + DroidDeckTheme { HandCameraPrompt(setOf(TrackingCameras.FRONT), onAllow = {}, onNotNow = { declined = true }) } + } + compose.onNodeWithTag("hand-camera-not-now").performClick() + assertEquals(true, declined) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/LayerStepTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/LayerStepTest.kt index a8581d8932..38fa146e20 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/LayerStepTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/LayerStepTest.kt @@ -4,8 +4,8 @@ import org.junit.Assert.assertEquals import org.junit.Test class LayerStepTest { - @Test fun theStackRunsFromTheProtonDownToTheGpuDrivers() { - assertEquals(listOf(PROTON_TAB, "dxvk", "vkd3d", "fex", GPU_TAB), LAYERS) + @Test fun theStackRunsFromTheGpuDriversDownThroughTheProton() { + assertEquals(listOf(GPU_TAB, PROTON_TAB, "dxvk", "vkd3d", "fex"), LAYERS) } @Test fun rbStepsDownAndWraps() { @@ -19,6 +19,6 @@ class LayerStepTest { } @Test fun anUnknownLayerStartsFromTheTop() { - assertEquals("dxvk", layerStep("tab-from-an-older-build", 1)) + assertEquals(PROTON_TAB, layerStep("tab-from-an-older-build", 1)) } } diff --git a/app/src/test/java/com/droiddeck/launcher/ui/LiftSheetTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/LiftSheetTest.kt index c5b8003b9c..2412300279 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/LiftSheetTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/LiftSheetTest.kt @@ -4,13 +4,12 @@ import org.junit.Assert.assertEquals import org.junit.Test class LiftSheetTest { - @Test fun theSheetTopIs82dpDownA360dpPane() { - assertEquals(82f, sheetTop(360f, 56f, 16f, 3f), 0.01f) - assertEquals(164f, sheetTop(720f, 56f, 16f, 3f), 0.01f) + @Test fun theSheetTopIs60dpDownA360dpPane() { + assertEquals(60f, sheetTop(360f, 56f, 16f, 3f), 0.01f) + assertEquals(120f, sheetTop(720f, 56f, 16f, 3f), 0.01f) } @Test fun theButtonKeeps16dpAboveIt() { - // A short pane: the edge comes down so the button riding it still clears the top by 16. val top = sheetTop(150f, 56f, 16f, 3f) assertEquals(41f, top, 0.01f) assertEquals(16f, top + 3f - 56f / 2f, 0.01f) diff --git a/app/src/test/java/com/droiddeck/launcher/ui/MotionTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/MotionTest.kt index b16d89efd0..669410a9c9 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/MotionTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/MotionTest.kt @@ -31,7 +31,6 @@ class MotionTest { Motion.refresh(context) assertEquals(0f, Motion.scale, 0f) assertEquals(0, Motion.ms(300)) - // The app's toggle never writes Android's preference. assertEquals(1.5f, Settings.Global.getFloat(context.contentResolver, Settings.Global.ANIMATOR_DURATION_SCALE), 0f) SessionPrefs.setAnimationsEnabled(context, true) Motion.refresh(context) diff --git a/app/src/test/java/com/droiddeck/launcher/ui/PageExitTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/PageExitTest.kt index b54248f400..ad1541685b 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/PageExitTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/PageExitTest.kt @@ -13,7 +13,6 @@ class PageExitTest { } @Test fun anotherPageSinks() { - // The GPU drivers row in Steam's settings opens Components over the same rail item. assertEquals(PageExit.Sink, pageExit("steam", "components", PageLeave.Ordinary)) } diff --git a/app/src/test/java/com/droiddeck/launcher/ui/PickListingTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/PickListingTest.kt index af7b6f50d4..9ed572671c 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/PickListingTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/PickListingTest.kt @@ -12,7 +12,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config import java.io.File -/** What the in-app picker lists in a folder: every folder A-Z, then only the files asked for. */ @RunWith(RobolectricTestRunner::class) @Config(sdk = [33]) class PickListingTest { diff --git a/app/src/test/java/com/droiddeck/launcher/ui/PresetScaleTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/PresetScaleTest.kt new file mode 100644 index 0000000000..2449182914 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/PresetScaleTest.kt @@ -0,0 +1,77 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.size +import androidx.compose.runtime.SideEffect +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.snapshots.Snapshot +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.performClick +import androidx.compose.ui.unit.dp +import org.junit.Assert.assertEquals +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], application = android.app.Application::class) +class PresetScaleTest { + @get:Rule val compose = createRobolectricComposeRule() + + @Test fun presetPopupAndPageKeepTheScaleChosenInSetup() { + val scale = mutableIntStateOf(100) + val preset = mutableStateOf("PERFORMANCE") + val open = mutableStateOf(false) + compose.setContent { + DroidDeckTheme(appScale = scale.intValue) { + Box(Modifier.size(100.dp).testTag("page-size")) + FexPresetChip(preset.value, false, open.value, true, + onToggle = { open.value = true }, onDismiss = { open.value = false }, + onPick = { preset.value = it!! }) + } + } + val originalWidth = compose.onNodeWithTag("page-size").fetchSemanticsNode().boundsInRoot.width + compose.runOnIdle { + scale.intValue = 75 + Snapshot.sendApplyNotifications() + } + compose.onNodeWithText("Performance").performClick() + compose.onNodeWithText("Intermediate").performClick() + compose.waitForIdle() + assertEquals(originalWidth * 0.75f, + compose.onNodeWithTag("page-size").fetchSemanticsNode().boundsInRoot.width, 1f) + compose.runOnIdle { + open.value = true + Snapshot.sendApplyNotifications() + } + compose.onNodeWithText("Compatibility").performClick() + compose.waitForIdle() + assertEquals(originalWidth * 0.75f, + compose.onNodeWithTag("page-size").fetchSemanticsNode().boundsInRoot.width, 1f) + } + + @Test fun menuUsesItsAnchorsDensity() { + var pageDensity = 0f + var menuDensity = 0f + compose.setContent { + DroidDeckTheme(appScale = 75) { + val density = LocalDensity.current.density + SideEffect { pageDensity = density } + AnchoredMenu(true, onDismiss = {}) { + val popupDensity = LocalDensity.current.density + SideEffect { menuDensity = popupDensity } + MenuItem("Preset", false) {} + } + } + } + compose.waitForIdle() + assertEquals(pageDensity, menuDensity, 0f) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/RobolectricComposeRule.kt b/app/src/test/java/com/droiddeck/launcher/ui/RobolectricComposeRule.kt new file mode 100644 index 0000000000..b21ffa60dc --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/RobolectricComposeRule.kt @@ -0,0 +1,16 @@ +package com.droiddeck.launcher.ui + +import android.content.ComponentName +import androidx.activity.ComponentActivity +import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.runtime.snapshots.Snapshot +import org.robolectric.RuntimeEnvironment +import org.robolectric.Shadows.shadowOf + +fun createRobolectricComposeRule() = createComposeRule().also { + val context = RuntimeEnvironment.getApplication() + shadowOf(context.packageManager).addActivityIfNotPresent( + ComponentName(context, ComponentActivity::class.java), + ) + Snapshot.sendApplyNotifications() +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/SecondScreenActivityTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/SecondScreenActivityTest.kt new file mode 100644 index 0000000000..040ed3ff3e --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/SecondScreenActivityTest.kt @@ -0,0 +1,61 @@ +package com.droiddeck.launcher.ui + +import android.app.Application +import android.content.Intent +import android.hardware.display.DisplayManager +import android.view.Display +import com.droiddeck.launcher.SessionActivity +import com.droiddeck.launcher.session.SessionService +import com.droiddeck.launcher.session.SessionState +import org.junit.After +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.Robolectric +import org.robolectric.RobolectricTestRunner +import org.robolectric.Shadows.shadowOf +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode + +@RunWith(RobolectricTestRunner::class) +@Config(application = Application::class, manifest = Config.NONE, sdk = [28, 33]) +@LooperMode(LooperMode.Mode.PAUSED) +class SecondScreenActivityTest { + @Before fun setUp() { + SessionState.running = true + SessionState.stopRequested = false + } + + @After fun tearDown() { + SessionState.running = false + SessionState.stopRequested = false + } + + @Test fun removingControlsTaskDoesNotStopTheRunningSession() { + val service = Robolectric.buildService(SessionService::class.java).get() + service.onTaskRemoved(Intent(service, SecondScreenActivity::class.java)) + assertTrue(SessionState.running) + assertFalse(SessionState.stopRequested) + } + + @Test fun activityRestoredWithoutItsSessionOwnerFinishes() { + val activity = Robolectric.buildActivity(SecondScreenActivity::class.java).create().get() + assertTrue(activity.isFinishing) + assertTrue(SessionState.running) + } + + @Test fun closingBeforeTheSecondaryActivityStartsRejectsTheLateLaunch() { + val session = Robolectric.buildActivity(SessionActivity::class.java).get() + val display = session.getSystemService(DisplayManager::class.java).getDisplay(Display.DEFAULT_DISPLAY) + val controls = SecondScreenWindow(session, display, { _, _, _, _ -> }, { _, _ -> }, {}, {}, {}, {}) + controls.show() + val intent = shadowOf(session).nextStartedActivity + controls.closeControls() + val activity = Robolectric.buildActivity(SecondScreenActivity::class.java, intent).create().get() + assertTrue(activity.isFinishing) + assertFalse(controls.isShowing) + assertTrue(SessionState.running) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/SessionDrawerPageTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/SessionDrawerPageTest.kt index 6c844ead17..c1d5ad10dd 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/SessionDrawerPageTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/SessionDrawerPageTest.kt @@ -20,7 +20,8 @@ class SessionDrawerPageTest { assertEquals(sessionDrawerPages(false), connected.filter { it != SessionDrawerPage.SECOND_SCREEN }) for (pages in listOf(connected, sessionDrawerPages(false))) { assertEquals(SessionDrawerPage.EFFECTS, pages.step(SessionDrawerPage.DISPLAY, 1)) - assertEquals(SessionDrawerPage.GAMES, pages.step(SessionDrawerPage.EFFECTS, 1)) + assertEquals(SessionDrawerPage.VR, pages.step(SessionDrawerPage.EFFECTS, 1)) + assertEquals(SessionDrawerPage.GAMES, pages.step(SessionDrawerPage.VR, 1)) assertEquals(SessionDrawerPage.SESSION, pages.step(SessionDrawerPage.GAMES, 1)) } } diff --git a/app/src/test/java/com/droiddeck/launcher/ui/SpatialSetupTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/SpatialSetupTest.kt new file mode 100644 index 0000000000..be609f39e7 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/SpatialSetupTest.kt @@ -0,0 +1,273 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.ui.test.* +import androidx.compose.ui.platform.LocalView +import androidx.compose.runtime.mutableStateOf +import com.droiddeck.launcher.glasses.SpatialCalibrationProgress +import com.droiddeck.launcher.glasses.SpatialTrackingStatus +import com.droiddeck.launcher.glasses.CalibrationDistance +import com.droiddeck.launcher.glasses.CalibrationDistanceCheck +import com.droiddeck.launcher.R +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import org.robolectric.annotation.GraphicsMode +import java.io.File + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28], qualifiers = "w411dp-h891dp") +@GraphicsMode(GraphicsMode.Mode.NATIVE) +class SpatialSetupTest { + @get:Rule val compose = createRobolectricComposeRule() + private lateinit var view: android.view.View + + @Test + @Config(qualifiers = "fr-w411dp-h891dp") + fun frenchCalibrationControlsKeepTheSelectedDistanceAndActions() { + val context = RuntimeEnvironment.getApplication() + var selected = 0f + compose.setContent { + DroidDeckTheme { + view = LocalView.current + SpatialSetupScreen(SpatialTrackingStatus(trackingValid = true, synchronized = true), + SpatialCalibrationProgress(views = 24, fitted = true), null, "", + SpatialSetupActions(validate = { selected = it })) + } + } + compose.onNodeWithText("Configuration spatiale").assertIsDisplayed() + compose.onNodeWithText("Spatial setup").assertDoesNotExist() + compose.onNodeWithText(context.getString(R.string.spatial_validate)).performScrollTo().performClick() + assertEquals(.3048f, selected, .000001f) + savePreview("calibration-fr") + } + + @Test + @Config(qualifiers = "ar-w411dp-h891dp") + fun arabicCalibrationDiagnosticsUseTranslatedLabelsAndFormatNumbers() { + val context = RuntimeEnvironment.getApplication() + compose.setContent { + DroidDeckTheme { + view = LocalView.current + SpatialSetupScreen(SpatialTrackingStatus(cameraHz = 25f, cameraCopyPermille = 500, frames = 12), + SpatialCalibrationProgress(), null, "", SpatialSetupActions()) + } + } + compose.onNodeWithText(context.getString(R.string.spatial_title)).assertIsDisplayed() + compose.onNodeWithText("Spatial setup").assertDoesNotExist() + compose.onNodeWithTag("setting-spatial-diagnostics").performScrollTo().performClick() + compose.onNodeWithText(context.getString(R.string.spatial_input_values, 12.5f, 50f)).performScrollTo().assertIsDisplayed() + compose.onNodeWithText("Show diagnostics").assertDoesNotExist() + savePreview("calibration-ar") + } + + @Test fun directLaunchWithoutConnectedUltraClosesBeforeShowingCalibration() { + val field = com.droiddeck.launcher.glasses.Glasses::class.java.getDeclaredField("_state") + .apply { isAccessible = true } + @Suppress("UNCHECKED_CAST") + val state = field.get(null) as kotlinx.coroutines.flow.MutableStateFlow<com.droiddeck.launcher.glasses.GlassesState> + val previous = state.value + try { + for (candidate in listOf(previous.copy(connected = false, supportsSpatial = true), + previous.copy(connected = true, controllable = true, supportsSpatial = false))) { + state.value = candidate + val activity = org.robolectric.Robolectric.buildActivity(SpatialTrackingActivity::class.java).create() + assertTrue(activity.get().isFinishing) + activity.destroy() + } + } finally { state.value = previous } + } + + @Test fun sharedCalibrationIsUsableWithoutClaimingPerDeviceVerification() { + compose.setContent { + DroidDeckTheme { + SpatialSetupScreen(SpatialTrackingStatus(calibration = true, + calibrationSource = "luma-ultra-base", calibrationVerified = false), + SpatialCalibrationProgress(fitted = true), null, "", SpatialSetupActions()) + } + } + compose.onNodeWithText("Shared Luma Ultra calibration").performScrollTo().assertIsDisplayed() + compose.onNodeWithText("Measured calibration verified").assertDoesNotExist() + compose.onNodeWithText("Validation required").assertDoesNotExist() + compose.onNodeWithText("Hand tracking — Experimental").assertExists() + } + + @Test fun pendingRecenterExplainsTheWaitAndBlocksCaptures() { + compose.setContent { + DroidDeckTheme(Themes.ELECTRIC) { + view = LocalView.current + SpatialSetupScreen(SpatialTrackingStatus(message = "Hold still while tracking stabilizes", recenterPending = true), + SpatialCalibrationProgress(collecting = true), null, "", SpatialSetupActions()) + } + } + compose.onNodeWithText("Hold still while tracking stabilizes").assertExists() + compose.onNodeWithText("Waiting for tracking…").assertIsNotEnabled() + savePreview("tracking-recovery") + compose.onNodeWithText("Capture board view").performScrollTo().assertIsNotEnabled() + } + + @Test fun completedFitValidatesTheSelectedImperialOrMetricDistance() { + var distance = 0f + compose.setContent { + DroidDeckTheme { + view = LocalView.current + SpatialSetupScreen(SpatialTrackingStatus(trackingValid = true, synchronized = true), + SpatialCalibrationProgress(collecting = true, views = 24, fitted = true), null, "Ready to validate", + SpatialSetupActions(validate = { distance = it })) + } + } + compose.onNodeWithText("Validate distance").performScrollTo().performClick() + assertEquals(0.3048f, distance, 0.000001f) + savePreview("distance-check") + for (choice in CalibrationDistance.entries.drop(1)) { + compose.onNodeWithTag("setting-calibration-distance").performScrollTo().performClick() + compose.onNodeWithText(RuntimeEnvironment.getApplication().getString(choice.labelRes)).performClick() + compose.onNodeWithText("Validate distance").performScrollTo().performClick() + assertEquals(choice.meters, distance, 0.000001f) + } + } + + @Test fun captureRejectionAppearsBesideTheCounter() { + val reason = "Capture rejected: 4 / 12 required corners visible in both cameras." + compose.setContent { + DroidDeckTheme { + SpatialSetupScreen(SpatialTrackingStatus(trackingValid = true, synchronized = true), + SpatialCalibrationProgress(collecting = true, views = 2, captureMessage = reason), null, "", + SpatialSetupActions()) + } + } + compose.onNodeWithText("Capture board view").performScrollTo().assertIsEnabled() + compose.onNodeWithText("2 / 24 views captured").assertIsDisplayed() + compose.onNodeWithText(reason).assertIsDisplayed() + } + + @Test fun pendingCaptureCannotQueueAnotherPress() { + compose.setContent { + DroidDeckTheme { + SpatialSetupScreen(SpatialTrackingStatus(trackingValid = true, synchronized = true), + SpatialCalibrationProgress(collecting = true, capturing = true), null, "", SpatialSetupActions()) + } + } + compose.onNodeWithText("Capturing…").performScrollTo().assertIsNotEnabled() + } + + @Test fun distanceResultAppearsBesideValidationButton() { + val reason=CalibrationDistanceCheck.evaluate(RuntimeEnvironment.getApplication(),.3048f,3,null).message + compose.setContent { + DroidDeckTheme { + view=LocalView.current + SpatialSetupScreen(SpatialTrackingStatus(trackingValid=true,synchronized=true), + SpatialCalibrationProgress(views=25,fitted=true,validationMessage=reason),null, + "Fit 1.12 px. Measure the distance, then validate.",SpatialSetupActions()) + } + } + compose.onNodeWithText("Validate distance").performScrollTo().assertIsEnabled() + compose.onNodeWithText(reason).assertIsDisplayed() + savePreview("distance-result") + } + + @Test fun pendingDistanceCheckShowsFeedbackAndPreventsDuplicateRequests() { + val message="Checking the next camera image. Keep the full board visible and hold still." + compose.setContent { + DroidDeckTheme { + SpatialSetupScreen(SpatialTrackingStatus(trackingValid=true,synchronized=true), + SpatialCalibrationProgress(views=25,fitted=true,validating=true,validationMessage=message),null, + "Fit complete",SpatialSetupActions()) + } + } + compose.onNodeWithText("Checking distance…").performScrollTo().assertIsNotEnabled() + compose.onNodeWithText(message).assertIsDisplayed() + } + + @Test fun restoredCapturesCanBeRecalculatedWithoutMixingNewTrackingFrames() { + var solves=0 + compose.setContent { + DroidDeckTheme { + SpatialSetupScreen(SpatialTrackingStatus(trackingValid = true, synchronized = true), + SpatialCalibrationProgress(views = 35, captureMessage = "35 saved views restored."), null, + "Head-to-camera alignment varies by 25 cm (9.84 in).", + SpatialSetupActions(solve = { solves++ })) + } + } + compose.onNodeWithText("Capture board view").performScrollTo().assertIsNotEnabled() + compose.onNodeWithText("35 saved views restored.").assertIsDisplayed() + compose.onNodeWithText("Calculate calibration").performScrollTo().assertIsEnabled().performClick() + assertEquals(1,solves) + } + + @Test + @Config(qualifiers = "w840dp-h360dp-land") + fun landscapeSetupLeavesMostOfTheHeightForScrolling() { + compose.setContent { + DroidDeckTheme { + view = LocalView.current + SpatialSetupScreen(SpatialTrackingStatus(trackingValid = true, synchronized = true), + SpatialCalibrationProgress(views = 35), null, "Ready to calculate", SpatialSetupActions()) + } + } + compose.waitForIdle() + val page=compose.onNodeWithTag("spatial-setup-page").fetchSemanticsNode().boundsInRoot + val viewport=compose.onNode(hasScrollAction()).fetchSemanticsNode().boundsInRoot + assertTrue("Calibration controls need at least 75% of the page height", viewport.height >= page.height*.75f) + savePreview("landscape-compact") + } + + @Test fun diagnosticsSeparateCameraRateFromDeliberatelySkippedFrames() { + compose.setContent { + DroidDeckTheme { + SpatialSetupScreen(SpatialTrackingStatus(cameraHz = 25f, cameraFrameDivisor = 2, cameraCopyPermille = 500, + frames = 12, dropped = 3, rateLimitedFrames = 15), + SpatialCalibrationProgress(), null, "", SpatialSetupActions()) + } + } + compose.onNodeWithTag("setting-spatial-diagnostics").performScrollTo().performClick() + compose.onNodeWithText("Input limit 12.5 Hz • 50% of camera frames. Head tracking stays at full rate.").assertExists() + compose.onNodeWithText("12 processed • 3 dropped • 15 skipped by input limit").assertExists() + compose.onNodeWithText("25.0 Hz", substring = true).assertExists() + } + + @Test fun diagnosticsShowTheAdaptiveFractionInsteadOfTheLegacyDivisor() { + compose.setContent { + DroidDeckTheme { + SpatialSetupScreen(SpatialTrackingStatus(cameraHz = 25f, cameraFrameDivisor = 1, cameraCopyPermille = 600), + SpatialCalibrationProgress(), null, "", SpatialSetupActions()) + } + } + compose.onNodeWithTag("setting-spatial-diagnostics").performScrollTo().performClick() + compose.onNodeWithText("Input limit 15.0 Hz • 60% of camera frames. Head tracking stays at full rate.").assertExists() + } + + @Test fun manualRateControlBecomesAvailableAfterAutomaticRateIsDisabled() { + val automatic=mutableStateOf(true) + val halfRate=mutableStateOf(true) + compose.setContent { + DroidDeckTheme { + SpatialSetupScreen(SpatialTrackingStatus(), SpatialCalibrationProgress(), null, "", + SpatialSetupActions(adaptive = { automatic.value=it }, halfRate = { halfRate.value=it }), + halfRate = halfRate.value, adaptive = automatic.value) + } + } + compose.onNodeWithTag("setting-spatial-diagnostics").performScrollTo().performClick() + compose.onNodeWithTag("setting-spatial-half-rate").assertDoesNotExist() + compose.onNodeWithTag("setting-spatial-adaptive-rate").performScrollTo().performClick() + compose.onNodeWithTag("setting-spatial-half-rate").performScrollTo().performClick() + assertEquals(false,automatic.value) + assertEquals(false,halfRate.value) + } + + private fun savePreview(name: String) { + val file = File("build/reports/spatial-setup/$name.png") + file.parentFile?.mkdirs() + compose.runOnIdle { + val root = view.rootView + val bitmap = android.graphics.Bitmap.createBitmap(root.width, root.height, android.graphics.Bitmap.Config.ARGB_8888) + root.draw(android.graphics.Canvas(bitmap)) + file.outputStream().use { bitmap.compress(android.graphics.Bitmap.CompressFormat.PNG, 100, it) } + bitmap.recycle() + } + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/SteamHomeHeadsetTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/SteamHomeHeadsetTest.kt new file mode 100644 index 0000000000..14aed407ea --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/SteamHomeHeadsetTest.kt @@ -0,0 +1,113 @@ +package com.droiddeck.launcher.ui + +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.ui.Modifier +import androidx.compose.ui.test.assertCountEquals +import androidx.compose.ui.test.assertIsEnabled +import androidx.compose.ui.test.assertIsNotEnabled +import androidx.compose.ui.test.onAllNodesWithTag +import androidx.compose.ui.test.onAllNodesWithText +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.performClick +import com.droiddeck.launcher.glasses.Glasses +import com.droiddeck.launcher.glasses.GlassesState +import kotlinx.coroutines.flow.MutableStateFlow +import org.junit.After +import org.junit.Assert.assertEquals +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [34], qualifiers = "w1200dp-h752dp-land", application = android.app.Application::class) +class SteamHomeHeadsetTest { + @get:Rule val compose = createRobolectricComposeRule() + private var vrStarts = 0 + private val connected = GlassesState(present = true, model = "VITURE Pro XR", controllable = true, connected = true, + displayId = 2, width = 1920, height = 1080, hz = 60f) + + @After fun unplug() { headset(GlassesState()) } + + @Test fun nothingShowsUntilAHeadsetIsConnected() { + show() + for (state in listOf(GlassesState(), GlassesState(present = true, displayId = 2, width = 1920, height = 1080), + connected.copy(connected = false, permission = Glasses.Permission.ASKING))) { + headset(state) + settle() + compose.onAllNodesWithTag("play-steamvr").assertCountEquals(0) + compose.onAllNodesWithTag("drop-open").assertCountEquals(0) + } + compose.onAllNodesWithTag("glasses-open").assertCountEquals(0) + } + + @Test fun aConnectedHeadsetGetsPlaySteamVrWithItsSettingsBadge() { + headset(connected) + show() + compose.onAllNodesWithTag("glasses-open").assertCountEquals(0) + compose.onNodeWithTag("play-steamvr").assertIsEnabled().performClick() + assertEquals(1, vrStarts) + compose.onAllNodesWithText("VITURE PRO XR").assertCountEquals(0) + compose.onNodeWithTag("drop-open").performClick() + settle() + compose.onNodeWithTag("drop-close").assertExists() + compose.onAllNodesWithText("VITURE PRO XR").assertCountEquals(1) + compose.onNodeWithTag("drop-close").performClick() + settle() + compose.onAllNodesWithTag("drop-close").assertCountEquals(0) + } + + @Test fun unpluggingClosesTheSheetAndHidesTheButton() { + headset(connected) + show() + compose.onNodeWithTag("drop-open").performClick() + settle() + headset(GlassesState()) + settle() + compose.onAllNodesWithTag("drop-close").assertCountEquals(0) + compose.onAllNodesWithTag("play-steamvr").assertCountEquals(0) + } + + @Test fun aMomentWithoutAPictureOnlyPausesPlaySteamVr() { + headset(connected.copy(displayId = android.view.Display.INVALID_DISPLAY)) + show() + compose.onNodeWithTag("play-steamvr").assertIsNotEnabled() + compose.onNodeWithTag("drop-open").assertExists() + } + + private fun headset(state: GlassesState) { + val field = Glasses::class.java.getDeclaredField("_state").apply { isAccessible = true } + @Suppress("UNCHECKED_CAST") + (field.get(Glasses) as MutableStateFlow<GlassesState>).value = state + } + + private fun settle() = compose.mainClock.advanceTimeBy(2_000) + + private fun show() { + compose.mainClock.autoAdvance = false + compose.setContent { + DroidDeckTheme { + CompositionLocalProvider(LocalFrontFocus provides FrontFocus()) { + FocusGlideHost { + SteamHome(FrontEndState( + installed = "r9", ready = true, available = null, busy = false, stage = "", percent = -1, + desktopInstalled = true, offlineAccount = null, offline = false, frameGenLabel = "", + romsDir = null, logsEnabled = false, steamGames = emptyList(), emulators = emptyList(), running = null, + ), FrontEndActions( + onPlay = {}, onPlaySteamVr = { vrStarts++ }, onPlayDesktopUi = {}, onSteamGame = {}, onDesktop = {}, onEmulator = {}, + onRom = {}, onResume = {}, onSteamSettings = {}, onDesktopSettings = {}, + onInstallPackage = {}, onRemovePackage = {}, onRuntime = {}, onFrameGenPick = {}, + onImportLossless = {}, onProtons = {}, onComponents = {}, onPerformance = {}, + onRoms = {}, onFiles = {}, onLogs = {}, onOffline = {}, + onWirelessAdbPair = { _, _, _, _ -> }, onWirelessAdbApply = { _, _, _, _ -> }, + onSetPhantomProcessLimit = { _, _ -> }, + ), Modifier.fillMaxSize()) + } + } + } + } + settle() + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/StepOutTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/StepOutTest.kt index dccb220cdb..482e584f39 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/StepOutTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/StepOutTest.kt @@ -2,6 +2,7 @@ package com.droiddeck.launcher.ui import androidx.compose.ui.geometry.Rect import androidx.compose.ui.graphics.Path +import androidx.compose.ui.graphics.PathMeasure import org.junit.Assert.assertEquals import org.junit.Assert.assertNotNull import org.junit.Assert.assertNull @@ -9,6 +10,7 @@ import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config +import org.robolectric.annotation.GraphicsMode @RunWith(RobolectricTestRunner::class) @Config(sdk = [28], manifest = Config.NONE) @@ -44,6 +46,15 @@ class StepOutTest { assertEquals(pill.bottom, b.bottom, 0.5f) } + @GraphicsMode(GraphicsMode.Mode.NATIVE) + @Test fun aNearlyClosedOutlineDoesNotDoubleBackPastThePillCorner() { + val path = Path() + stepPath(path, pill, left = pill.left - 1f, bottom = pill.bottom + 2f, pullTop = pill.bottom + 6f, box = 16f, fillet = 10f, pillCorner = 12f) + val length = PathMeasure().apply { setPath(path, false) }.length + val arcs = (Math.PI / 2).toFloat() * (12f + 16f + 15f + 0.5f + 12f) + assertEquals(175f + arcs, length, 2f) + } + @Test fun aCardMarkIsTakenOnceAndOnlyForItsGame() { StoresMotion.markCard(CardMark("gog:1", pill, 10f, null)) assertNull(StoresMotion.takeCard("gog:2")) diff --git a/app/src/test/java/com/droiddeck/launcher/ui/StoreGridNavigationTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/StoreGridNavigationTest.kt new file mode 100644 index 0000000000..4f0b9d4217 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/StoreGridNavigationTest.kt @@ -0,0 +1,29 @@ +package com.droiddeck.launcher.ui + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test + +class StoreGridNavigationTest { + @Test fun downAndUpPreserveEveryColumnAcrossSeveralRows() { + for (columns in 1..6) for (index in 0 until columns * 3) { + val down = storeGridNeighbor(index, columns * 4, columns, 1)!! + assertEquals(index % columns, down % columns) + assertEquals(index, storeGridNeighbor(down, columns * 4, columns, -1)) + } + } + + @Test fun incompleteLastRowDoesNotWrapBackToTheLeft() { + assertEquals(8, storeGridNeighbor(4, 10, 4, 1)) + assertEquals(9, storeGridNeighbor(5, 10, 4, 1)) + assertNull(storeGridNeighbor(6, 10, 4, 1)) + assertNull(storeGridNeighbor(7, 10, 4, 1)) + assertNull(storeGridNeighbor(9, 10, 4, 1)) + } + + @Test fun firstRowCanLeaveUpwardsAndChangedColumnCountsAreUsed() { + assertNull(storeGridNeighbor(2, 10, 4, -1)) + assertEquals(5, storeGridNeighbor(2, 10, 3, 1)) + assertEquals(6, storeGridNeighbor(2, 10, 4, 1)) + } +} diff --git a/app/src/test/java/com/droiddeck/launcher/ui/StoreTabsTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/StoreTabsTest.kt index b8af293269..2be67a4b67 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/StoreTabsTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/StoreTabsTest.kt @@ -4,13 +4,11 @@ import com.droiddeck.launcher.stores.Store import org.junit.Assert.assertEquals import org.junit.Test -/** A store's modes are Store, Library and Installed; Amazon has no catalog of its own, so no Store. */ class StoreTabsTest { @Test fun storeLibraryInstalledAmazonWithoutStore() { assertEquals(listOf("store", "library", "installed"), tabsFor(Store.GOG)) assertEquals(listOf("library", "installed"), tabsFor(Store.AMAZON)) assertEquals("library", tabFor(Store.AMAZON, "store")) - // An old saved All tab opens Library; Installed is a mode again. assertEquals("library", tabFor(Store.GOG, "all")) assertEquals("installed", tabFor(Store.EPIC, "installed")) assertEquals("store", tabFor(Store.GOG, "store")) diff --git a/app/src/test/java/com/droiddeck/launcher/ui/TrackingRecoveryViewTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/TrackingRecoveryViewTest.kt new file mode 100644 index 0000000000..3275e622f2 --- /dev/null +++ b/app/src/test/java/com/droiddeck/launcher/ui/TrackingRecoveryViewTest.kt @@ -0,0 +1,118 @@ +package com.droiddeck.launcher.ui + +import android.graphics.Bitmap +import android.graphics.Canvas +import android.view.View +import androidx.compose.ui.graphics.toArgb +import com.droiddeck.launcher.glasses.TrackingRecovery +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.RuntimeEnvironment +import org.robolectric.annotation.Config +import org.robolectric.annotation.GraphicsMode +import java.io.File +import kotlin.math.abs + +@RunWith(RobolectricTestRunner::class) +@Config(sdk=[34]) +@GraphicsMode(GraphicsMode.Mode.NATIVE) +class TrackingRecoveryViewTest { + private fun view()=TrackingRecoveryView(RuntimeEnvironment.getApplication()) + private fun render(view: View, width: Int=1920, height: Int=1200): Bitmap { + view.measure(View.MeasureSpec.makeMeasureSpec(width,View.MeasureSpec.EXACTLY),View.MeasureSpec.makeMeasureSpec(height,View.MeasureSpec.EXACTLY)) + view.layout(0,0,width,height) + return Bitmap.createBitmap(width,height,Bitmap.Config.ARGB_8888).also { view.draw(Canvas(it)) } + } + private fun save(bitmap: Bitmap, name: String) { + val file=File("build/reports/tracking-recovery/$name.png");file.parentFile!!.mkdirs() + file.outputStream().use { bitmap.compress(Bitmap.CompressFormat.PNG,100,it) } + } + + @Test fun recoveredTrackingRemovesTheScreenAndItsTouchTarget() { + val view=view() + assertEquals(View.GONE,view.visibility) + view.update(TrackingRecovery.LOST,false) + assertEquals(View.VISIBLE,view.visibility) + assertTrue(view.contentDescription.contains("Look around slowly")) + assertTrue(view.isClickable) + view.update(null,false) + assertEquals(View.GONE,view.visibility) + assertNull(view.contentDescription) + } + + @Test fun everyRecoveryStateHasItsOwnActionAndFitsThePhone() { + val view=view() + for((state,instruction) in listOf(TrackingRecovery.LOST to "Look around slowly",TrackingRecovery.RECENTER to "tap Recenter", + TrackingRecovery.STABILIZING to "Keep the glasses steady",TrackingRecovery.DISCONNECTED to "USB-access prompt")) { + view.update(state,false,Themes.byId(Themes.ELECTRIC)) + assertTrue(view.contentDescription.contains(instruction)) + render(view,1080,600).also { save(it,"phone-${state.name.lowercase()}");it.recycle() } + } + } + + @Test fun stereoDuplicatesTheWholeMessageForEachEyeAndMatchesMono() { + val view=view();view.update(TrackingRecovery.LOST,false) + val mono=render(view) + try { + view.update(TrackingRecovery.LOST,true) + val stereo=render(view,3840,1200) + try { + save(mono,"glasses-mono");save(stereo,"glasses-stereo") + val expected=IntArray(mono.width) + val eye=IntArray(mono.width) + val pixels=mono.width*mono.height + for(x in listOf(0,mono.width)) { + var changed=0 + var difference=0L + for(y in 0 until mono.height) { + mono.getPixels(expected,0,mono.width,0,y,mono.width,1) + stereo.getPixels(eye,0,mono.width,x,y,mono.width,1) + for(i in eye.indices) { + val actual=eye[i] + val reference=expected[i] + if(actual!=reference) changed++ + difference+=abs((actual and 255)-(reference and 255)) + difference+=abs(((actual ushr 8) and 255)-((reference ushr 8) and 255)) + difference+=abs(((actual ushr 16) and 255)-((reference ushr 16) and 255)) + } + } + // Native text rasterization can round a translated glyph edge differently. + assertTrue("Eye at x=$x changed $changed pixels",changed<pixels/1000) + assertTrue("Eye at x=$x has different content",difference.toDouble()/(pixels*3)<0.1) + } + } finally { + stereo.recycle() + } + } finally { + mono.recycle() + } + } + + @Test fun activePaletteChangesTheBackgroundAndMessageColors() { + val view=view() + for(theme in listOf(Themes.GRAPHITE,Themes.ELECTRIC,Themes.PAPER)) { + val palette=Themes.byId(theme) + view.update(TrackingRecovery.LOST,false,palette) + val bitmap=render(view) + try { + assertEquals(palette.background.toArgb(),bitmap.getPixel(0,0)) + val row=IntArray(bitmap.width) + val textColor=palette.onBackground.toArgb() + var foundTextColor=false + for(y in 0 until bitmap.height) { + bitmap.getPixels(row,0,bitmap.width,0,y,bitmap.width,1) + if(row.any { it==textColor }) { + foundTextColor=true + break + } + } + assertTrue("Missing message color for theme $theme",foundTextColor) + save(bitmap,"theme-$theme") + } finally { + bitmap.recycle() + } + } + } +} diff --git a/artwork/boot-animation-source/README.md b/artwork/boot-animation-source/README.md index 4caa7aa726..8204910362 100644 --- a/artwork/boot-animation-source/README.md +++ b/artwork/boot-animation-source/README.md @@ -1,21 +1,29 @@ # DroidDeck boot animation -This source accompanies the single Steam startup movie bundled by the app: -`app/src/main/assets/steam-startup/droiddeck-startup.webm` (1280×720 at 30 fps, pitch black background, VP8 video -with Opus audio). `droiddeck-boot.html` is the editable animation; the scripts and WAV below -render the animation at the bundled playback profile. No alternate MP4 or WebM exports are kept in the repository. +This source accompanies the Steam startup movies bundled by the app: +`app/src/main/assets/steam-startup/droiddeck-startup.webm` (1280×720 at 30 fps) and +`droiddeck-startup-60.webm` (1280×720 at 60 fps), both with a pitch black background, VP8 video +and Opus audio. `droiddeck-boot.html` is the editable animation; the scripts and WAV below +render the animation at the bundled playback profiles. No alternate MP4 exports are kept in the repository. -From the repository root, render the movie with: +From the repository root, render the movies with: python3 artwork/boot-animation-source/render.py 1280 720 30 app/src/main/assets/steam-startup/droiddeck-startup.webm dark + python3 artwork/boot-animation-source/render.py 1280 720 60 app/src/main/assets/steam-startup/droiddeck-startup-60.webm dark -The bundled profile reduces decoded pixels per second by 78% compared with 1080p/60. -VP8 also lowers software decode cost while Steam is starting. Keep the bundled movie at -720p/30; higher-resolution exports are intended for sharing. +The 30 fps profile reduces decoded pixels per second by 78% compared with 1080p/60, and VP8 +lowers software decode cost while Steam is starting, so 30 fps stays the default. Keep the bundled +movies at 720p; higher-resolution exports are intended for sharing. -The app stages that file into Steam's `config/uioverrides/movies` folder before each session. If -Steam still has its built-in startup movie selected, DroidDeck sets this movie as the device's -startup default before Steam starts. A custom startup movie the user selected later is preserved. +Steam settings > Boot movie picks which movie DroidDeck stages into Steam's +`config/uioverrides/movies` folder before each session: DroidDeck at 30 or 60 fps, or a movie the +user imported. A WebM, MKV or MP4 of up to 50 MB with VP8 or VP9 video (or a WebM with AV1) is used +as is, remuxed to WebM if needed. Anything else Android can decode, up to 60 seconds, is converted on +the device to 720p VP8 with Opus audio, capped at 60 fps; portrait clips are pillarboxed into 16:9 +because Steam fills the screen with the movie. Turning Sound off strips the audio track on the device. +If Steam still has its built-in startup movie selected, DroidDeck sets the staged movie as the +device's startup default before Steam starts. A startup movie the user selected later in Steam is +preserved. To regenerate the soundtrack, run these commands from this directory: diff --git a/artwork/boot-animation-source/droiddeck-boot.html b/artwork/boot-animation-source/droiddeck-boot.html index 353ebc0a93..55c1d95825 100644 --- a/artwork/boot-animation-source/droiddeck-boot.html +++ b/artwork/boot-animation-source/droiddeck-boot.html @@ -151,13 +151,6 @@ body.render main{display:none} </main> <script> -/* ===================================================================== - DroidDeck boot animation engine - Every frame is a pure function of time t, so the live preview and the - offline video render draw exactly the same thing. - Units: logo units from droiddeck-mark.svg. World origin = frame centre, - y points down. The frame is always 690 units tall. - ===================================================================== */ const DD = (() => { 'use strict'; const deg = Math.PI / 180; @@ -167,7 +160,6 @@ const DD = (() => { const eInQ = t => { t = clamp(t); return t * t; }; const eOutC = t => { t = clamp(t); return 1 - Math.pow(1 - t, 3); }; - // ---- 2D affine helpers. m = [a,b,c,d,e,f] (canvas setTransform order) const mul = (m, n) => [ m[0]*n[0] + m[2]*n[1], m[1]*n[0] + m[3]*n[1], m[0]*n[2] + m[2]*n[3], m[1]*n[2] + m[3]*n[3], @@ -179,20 +171,18 @@ const DD = (() => { const ap = (m, p) => ({ x: m[0]*p.x + m[2]*p.y + m[4], y: m[1]*p.x + m[3]*p.y + m[5] }); const rv = (a, x, y) => { const c = Math.cos(a), s = Math.sin(a); return { x: c*x - s*y, y: s*x + c*y }; }; - // ---- Geometry straight from the SVG const G = { L: -31.98, B: 223.72, slotL: 56.055, slotR: 71.885, cy: 111.86, dcx: 63.97, dR: 111.86, hcx: 63.98, hR: 71.81, ocx: 63.98, oR: 55.98 }; const ORB = '#1A9FFF'; const THEMES = { light: { ink: '#1b1b1b', bg: ['#EDF3F8', '#DCE6EE', '#B6C7D6'], shadow: '22,40,58', shadowK: 1, ringA: 1, ringGlow: 0, glow: 0, noise: 3 }, - // Keep the shipped Steam render black between and around the animated pieces. dark: { ink: '#FFFFFF', bg: ['#000000', '#000000', '#000000'], shadow: '0,0,0', shadowK: 2.3, ringA: 1.5, ringGlow: 14, glow: .34, noise: 0 }, }; let TH = THEMES.light, THN = 'light'; const setTheme = n => { THN = THEMES[n] ? n : 'light'; TH = THEMES[THN]; }; const ORB_C = { x: G.ocx, y: G.cy }; - function archPath() { // left piece: the "bridge" + function archPath() { const p = new Path2D(); const dx = G.slotL - G.hcx, hy = Math.sqrt(G.hR*G.hR - dx*dx); p.moveTo(G.L, 0); p.lineTo(G.slotL, 0); p.lineTo(G.slotL, G.cy - hy); @@ -200,7 +190,7 @@ const DD = (() => { p.lineTo(G.slotL, G.B); p.lineTo(G.L, G.B); p.closePath(); return p; } - function domePath() { // right piece: the curve of the D + function domePath() { const dxo = G.slotR - G.dcx, hyo = Math.sqrt(G.dR*G.dR - dxo*dxo); const dxi = G.slotR - G.hcx, hyi = Math.sqrt(G.hR*G.hR - dxi*dxi); const p = new Path2D(); @@ -215,7 +205,6 @@ const DD = (() => { const PATH = { arch: archPath(), dome: domePath(), orb: orbPath() }; - // centroids (numerical, symmetric in y) function centroid(path, x0, x1) { const c = document.createElement('canvas').getContext('2d'); let n = 0, sx = 0; @@ -225,23 +214,21 @@ const DD = (() => { } const CEN = { arch: centroid(PATH.arch, G.L, G.slotL), dome: centroid(PATH.dome, G.slotR, 176) }; - // anchors: the point of each piece that touches whatever it stands on const ANC = { arch: { x: G.slotL, y: G.cy }, ball: { x: G.ocx, y: G.cy + G.oR }, dome: { x: G.hcx + G.hR, y: G.cy } }; - const HA = G.slotL - G.L; // arch height when standing (88.035) - const WA = G.cy; // arch half width (111.86) - const FOOT_HALF = (G.cy - (G.cy - Math.sqrt(G.hR*G.hR - (G.slotL-G.hcx)**2))) ; // unused helper - const FEET = [{ x: G.slotL, y: 20.24 }, { x: G.slotL, y: G.B - 20.24 }]; // foot centres (piece coords) + const HA = G.slotL - G.L; + const WA = G.cy; + const FOOT_HALF = (G.cy - (G.cy - Math.sqrt(G.hR*G.hR - (G.slotL-G.hcx)**2))) ; + const FEET = [{ x: G.slotL, y: 20.24 }, { x: G.slotL, y: G.B - 20.24 }]; - // ---- Scene constants - const VIEW_H = 690; // world units visible vertically + const VIEW_H = 690; const FLOOR = 150; const GRAV = 6500; const DUR = 6.30; - const T_L = 4.00; // lift-off + const T_L = 4.00; + + + - // ------------------------------------------------------------------ - // Drops: exact ballistic bounces (height above whatever you land on) - // ------------------------------------------------------------------ function drop(o) { const g = GRAV, segs = [], impacts = []; let t = o.t0, v = o.v0; @@ -267,10 +254,6 @@ const DD = (() => { const ballDrop = drop({ t0: 0.50, h0: 440, v0: 250, e: 0.45, minV: 170 }); const domeDrop = drop({ t0: 1.15, h0: 330, v0: 250, e: 0.24, minV: 250 }); - // ------------------------------------------------------------------ - // The balancing act: one master sway curve, everything else follows it - // through springs so the parts lag, overshoot and settle on their own. - // ------------------------------------------------------------------ const SWAY = [[1.60, 0], [1.90, .42], [2.24, -.70], [2.62, .95], [2.82, 1.10], [3.08, -.44], [3.30, .16], [3.50, 0]]; function sway(t) { @@ -281,11 +264,9 @@ const DD = (() => { } return 0; } - // legs hop sideways to get back under the bowl on the big wobble const HOP = { t: 2.70, d: .19, dx: 26, h: 16 }; const hopX = t => HOP.dx*eio((t - HOP.t)/HOP.d); const hopH = t => (t > HOP.t && t < HOP.t + HOP.d) ? HOP.h*Math.sin(Math.PI*(t - HOP.t)/HOP.d) : 0; - // crouch before the jump (added straight onto squash) function crouch(t, amt, a, b, hold) { if (t < a || t >= T_L) return 0; if (t < b) return amt * eio((t - a)/(b - a)); @@ -297,12 +278,12 @@ const DD = (() => { const crouchD = t => crouch(t, .09, 3.64, 3.88, 3.91); const PHI_FALL = 5*deg, PSI_FALL = -6*deg, U0 = 12; - const ROLL = G.oR/G.dR; // bowl radius is 2x the ball: it turns 1.5x as it rolls + const ROLL = G.oR/G.dR; const DT = 1/1200, N = Math.ceil((DUR + .2)/DT); const SIG = { phi: new Float32Array(N), u: new Float32Array(N), psi: new Float32Array(N), qA: new Float32Array(N), qB: new Float32Array(N), qD: new Float32Array(N) }; - function peakFactor(w, z) { // peak of a unit-velocity kick + function peakFactor(w, z) { const wd = w*Math.sqrt(1 - z*z), ts = Math.atan(wd/(z*w))/wd; return Math.exp(-z*w*ts)*Math.sin(wd*ts)/wd; } @@ -333,7 +314,6 @@ const DD = (() => { if (k.k === 'phi') phiV += k.dv; else q[k.k][1] += k.dv; } const s = sway(t); - // arch rocking on its feet if (t < archDrop.land) { phi = PHI_FALL; phiV = 0; phiA = 0; } else { const w = 20, z = .38, tgt = 5.6*deg*sway(t - .10); @@ -342,13 +322,10 @@ const DD = (() => { if (sg !== lastSign && crossings < 2 && t < 1.0) { q.A[1] += kick('A', .035); crossings++; } lastSign = sg; } - // ball rolling along the arch top if (t < ballDrop.rest) { u = U0; uV = 0; } else { const w = 13, z = .5, tgt = 24*sway(t - .12); const a = -w*w*(u - tgt) - 2*z*w*uV; uV += a*DT; u += uV*DT; } - // dome: floppy hat with inertia (it lags the body) if (t < domeDrop.land) { psi = PSI_FALL; psiV = 0; } else { const w = 13, z = .22, tgt = 11*deg*s; const a = -w*w*(psi - tgt) - 2*z*w*psiV - .6*phiA; psiV += a*DT; psi += psiV*DT; } - // squash springs; falling pieces stretch along their velocity const tgA = archDrop.air(t) ? -Math.min(.12, Math.abs(archDrop.v(t))*4.6e-5) : 0; const tgB = ballDrop.air(t) ? -Math.min(.14, Math.abs(ballDrop.v(t))*6.5e-5) : 0; const tgD = domeDrop.air(t) ? -Math.min(.10, Math.abs(domeDrop.v(t))*4.0e-5) : 0; @@ -365,16 +342,13 @@ const DD = (() => { return a[i] + (a[i+1] - a[i])*f; }; - // ------------------------------------------------------------------ - // Standing pose: a kinematic chain floor → arch → ball → dome - // ------------------------------------------------------------------ function standPose(t) { const hA = archDrop.h(t) + hopH(t), hx = hopX(t), phi = sig('phi', t), u = sig('u', t), psi = sig('psi', t); const qA = sig('qA', t) + crouchA(t), qB = sig('qB', t) + crouchB(t), qD = sig('qD', t) + crouchD(t); const hB = ballDrop.h(t), hD = domeDrop.h(t); const sxA = 1 + .55*qA, syA = 1 - qA; - const side = phi >= 0 ? 1 : -1; // rock on the outer corner of one foot + const side = phi >= 0 ? 1 : -1; const piv = { x: hx + side*WA*sxA, y: FLOOR - hA }; const off = rv(phi, -side*WA*sxA, 0); const A = { x: piv.x + off.x, y: piv.y + off.y }; @@ -386,7 +360,6 @@ const DD = (() => { const mB = chain(T(cB.x, cB.y), R(phi), S(sxB, syB), T(-ANC.ball.x, -ANC.ball.y)); const bc = rv(phi, 0, -G.oR*syB), O = { x: cB.x + bc.x, y: cB.y + bc.y }; - // bowl: outer curve resting on the ball, rolling without slipping const ang = phi + psi, dd = rv(ang, 0, -G.oR*syB); const cD = { x: O.x + dd.x, y: O.y + dd.y - hD }; const sxD = 1 + .6*qD, syD = 1 - qD; @@ -394,9 +367,6 @@ const DD = (() => { return { arch: mA, ball: mB, dome: mD, O, hA }; } - // ------------------------------------------------------------------ - // Flight: lift-off, unfold around the orb, magnetic clack, hover settle - // ------------------------------------------------------------------ const FL = { TR: .34, APEX: -108, TC: .44, X: 48, ROT: .40 }; const H0 = (() => { const p = standPose(T_L), O = p.O, h = { O }; @@ -420,7 +390,7 @@ const DD = (() => { let Ox = H0.O.x*(1 - eio(tau/.4)); if (done) { Ox = 0; Oy = 0; } const O = { x: Ox, y: Oy }; - const st = -Math.sin(Math.PI*clamp(tau/.30))*.085; // stretch on the way up + const st = -Math.sin(Math.PI*clamp(tau/.30))*.085; const gs = sC > 0 && !done ? 1 + .05*Math.exp(-6*sC)*Math.sin(20*sC) : 1; const G_ = chain(T(O.x, O.y), S(gs, gs), T(-O.x, -O.y)); @@ -429,7 +399,7 @@ const DD = (() => { const a = h.a0 + (h.aF - h.a0)*eio(tau/FL.ROT); let r = h.rF + (h.r0 - h.rF)*(1 - smooth(0, .30, tau)); r += FL.X*smooth(0, .22, tau)*(1 - eInQ((tau - .30)/(FL.TC - .30))); - if (sC > 0 && !done) r += 3.6*Math.exp(-14*sC)*Math.abs(Math.sin(38*sC)); // hard stop, tiny rebound + if (sC > 0 && !done) r += 3.6*Math.exp(-14*sC)*Math.abs(Math.sin(38*sC)); let th = h.th0 + (0 - h.th0)*eio((tau - .02)/FL.ROT); if (done) { r = h.rF; th = 0; } const q = st*kq, c = CEN[k]; @@ -444,7 +414,6 @@ const DD = (() => { function pose(t) { t = clamp(t, 0, DUR); const p = t < T_L ? standPose(t) : flightPose(t); - // contact shadows const fade = t < T_L ? 1 : 1 - smooth(0, .2, t - T_L); const sh = []; if (fade > 0) { @@ -457,16 +426,12 @@ const DD = (() => { sh.unshift({ x: cx, rx: 150 + lowest*.35, ry: 15 + lowest*.03, a: .17*Math.exp(-lowest/210)*fade }); } p.shadows = sh; - // shock ring when the pieces lock const sC = t - (T_L + FL.TC); p.sC = sC; p.ring = sC > 0 && sC < .8 ? { O: p.O, r: 118 + 210*eOutC(sC/.8), a: .34*(1 - sC/.8)**2, w: 4*(1 - .7*sC/.8) } : null; return p; } - // ------------------------------------------------------------------ - // Drawing - // ------------------------------------------------------------------ function makeBG(W, H, noise) { const c = document.createElement('canvas'); c.width = W; c.height = H; const g = c.getContext('2d'); @@ -474,7 +439,7 @@ const DD = (() => { const gr = g.createRadialGradient(cx, cy, 0, cx, cy, R); gr.addColorStop(0, TH.bg[0]); gr.addColorStop(.42, TH.bg[1]); gr.addColorStop(1, TH.bg[2]); g.fillStyle = gr; g.fillRect(0, 0, W, H); - if (noise) { // static dither: kills banding in the video + if (noise) { const id = g.getImageData(0, 0, W, H), d = id.data; let s = 1337; for (let i = 0; i < d.length; i += 4) { s = (s*1664525 + 1013904223) >>> 0; const n = ((s >>> 24)/255 - .5)*noise; @@ -505,7 +470,7 @@ const DD = (() => { ctx.beginPath(); ctx.arc(p.ring.O.x, p.ring.O.y, p.ring.r, 0, Math.PI*2); ctx.stroke(); ctx.shadowBlur = 0; ctx.shadowColor = 'transparent'; } - if (TH.glow && p.sC > 0 && p.sC < 1.4) { // dark only: the orb flashes on at lock, light leaks through the halo gap + if (TH.glow && p.sC > 0 && p.sC < 1.4) { const ga = TH.glow*Math.min(1, p.sC/.03)*Math.exp(-p.sC/.32)*(1 - smooth(1.0, 1.4, p.sC)); ctx.setTransform(...base); const g = ctx.createRadialGradient(p.O.x, p.O.y, G.oR*.9, p.O.x, p.O.y, G.oR*2.6); @@ -520,7 +485,6 @@ const DD = (() => { ctx.setTransform(1, 0, 0, 1, 0, 0); } - // how far (px) things move during an exposure: drives motion-blur sample count const PROBE = { arch: [{x:G.L,y:0},{x:G.L,y:G.B},{x:G.slotL,y:0},{x:G.slotL,y:G.B}], dome: [{x:G.slotR,y:0},{x:G.slotR,y:G.B},{x:176,y:G.cy}], ball: [{x:G.ocx-G.oR,y:G.cy},{x:G.ocx+G.oR,y:G.cy},{x:G.ocx,y:G.cy-G.oR},{x:G.ocx,y:G.cy+G.oR}] }; @@ -533,7 +497,6 @@ const DD = (() => { return m*px; } - // Offline render with real motion blur (180° shutter, adaptive samples) let RC = null; function renderFrame(i, fps = 60, shutter = .5) { const cv = document.getElementById('cv'), W = cv.width, H = cv.height; @@ -564,9 +527,6 @@ const DD = (() => { frameCount: fps => Math.round(DUR*fps) + 1, CEN, H0 }; })(); -/* ===================================================================== - Preview player (or bare canvas when ?render=1) - ===================================================================== */ (() => { const qs = new URLSearchParams(location.search); const cv = document.getElementById('cv'); @@ -586,11 +546,10 @@ const DD = (() => { const sndBtn = document.getElementById('snd'), sndMark = document.getElementById('sndMark'), hint = document.getElementById('hint'); let W = 0, H = 0, bg = null, t = reduce ? DD.DUR : 0, playing = !reduce, speed = 1, last = 0, raf = 0; - // Soundtrack through Web Audio. When it's playing, the audio clock drives the picture. const Sound = (() => { let ctx = null, buf = null, src = null, on = false, pending = null, t0 = 0, c0 = 0, rate = 1; const bytes = () => { const b = atob(DD_SOUND), u = new Uint8Array(b.length); for (let i = 0; i < b.length; i++) u[i] = b.charCodeAt(i); return u.buffer; }; - async function ensure() { // call from a tap: browsers only allow sound after one + async function ensure() { if (!ctx) { const AC = window.AudioContext || window.webkitAudioContext; if (!AC) return false; ctx = new AC(); } if (ctx.state !== 'running') { try { await ctx.resume(); } catch (e) {} } if (!buf) { pending = pending || new Promise((ok, no) => ctx.decodeAudioData(bytes(), ok, no)); @@ -607,7 +566,6 @@ const DD = (() => { return { ensure, start, stop, clock, get on() { return on; }, set on(v) { on = v; if (!v) stop(); } }; })(); - // version: remembered per viewer, otherwise follows the system theme let ver = null; try { ver = localStorage.getItem('dd-version'); } catch (e) {} if (ver !== 'light' && ver !== 'dark') ver = matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; function setVersion(v) { @@ -662,7 +620,7 @@ const DD = (() => { if (Sound.on) { Sound.on = false; ui(); return; } Sound.on = true; ui(); if (!(await Sound.ensure())) { Sound.on = false; ui(); return; } - t = 0; play(); // replay from the top so it's heard in sync + t = 0; play(); }; playBtn.onclick = () => playing ? pause() : play(); cv.onclick = () => playing ? pause() : play(); @@ -693,8 +651,8 @@ const DD = (() => { if (playing) play(); })(); </script> -<script id="dd-sound">/* soundtrack: MP3, base64. Rebuild with embed_sound.py */ -const DD_SOUND = /*SOUND*/"SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//uUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAEJAAGPAAADBggLDhATFhgaHR8iJScqLS8yNDY5Oz5BQ0ZJS01QUlVYWl1gYmVnaWxucXR2eXx+gIOFiIuNkJOVmJqcn6Gkp6msr7Gztri7vsDDxsjLzc/S1Nfa3N/i5Obp6+7x8/b5+/4AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAXgAAAAAAABjwC+eaeUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uUZAAP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAETEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWu1SCQSiMSBsJhIEglv5aaJeRvmMLGAx41a1odhWJUK7SbMt+F3DJARa8xHUNPMPZF7ncrmCygIIQAMGCxgOZgWgKDgbqSgGCCmBhJpgcke/AzWKwUMgGPTCBo3RAbG1oHzjLwMriEDHQgACCgKCoCQNACD/wxgBgMAgDAML7gY6FgFBIBhIUg4CAYYH4ChD/AwQAgwoKURccYe6BgYGh84bA//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEFwYWXfygTiRMGhosMBCgxBYc0PKQMXD/plwuMThoyBfKRiRExMSZOf/l83dNN2qSYsF5aLo//+pqmfQ6RsDFTnVvZ6yUWiUWCQSBwNBIJNDlpprZQCY28bHHv1syR43YqA47FzM8hpwyiUZpML1CLzCjQ+xQSVmBygEJfgwZMCDMDQBbcDhiqAwYYQMOPEDpkb4GPQmCwwAw+NwMqw4DPUVA5YOeBmcTgZEFAGEAECIbANBUDCoD+KUC0cLnxH4GHAoCQOAwEEQ7AGBhCBIN/gYMAwW8CdDVMcYb6BgoIhlsL2A3eBEBfygThsRQqGiwtCEFw1cLlDDkDE6/5uXC4xOFxkEzJZqiiYnP/UxfN3TTdqkmLBPLRdH//1NUz6HSNkTJIzOcTQAAAAACUADchlzEz4U/4OTYNYzTJgb47Osu5N5uM3TGAgacwSADhMPqBizAjgM4wqQHkMBK//uURP+AAAAAaQUAAAgAAA0goAABHI1nLbn6gBuVrea3P1ADAzzATQCAHAC4OAJkSDAIQE4SANQSQeXMKBqUnZCc7AhYSlcHxMzkAVBJAjM+zxWaWln4rYQaiqtqxU0aagv9p6/N1n8bW5S2Ydq09vn5fnW/DPtWHYzagGrzuX/+/1///dVcq1bLn1P///X//6/+/8ajQGAx5llvRhISrDRZT19f+z//r//9QAEAAAAoixpdnoGUIUyb7YZJpNjqmMsaMbEZGhh1gUGAqAUYzoL5gDAJmXKAqYAYRCOMNKKKwGA4Ae1yNTIKGnWNwNbncjOFM69wgAzAtxHceYUmC3KSRVfrU1bljHOxM75OORl/9/8P73Lss6QSIioUqtFzBERWpm+obAro3V5d63DNjWEtyTMaUct5JABmWrRWJ0187ydA6haHbdy4pnviSKYQ2VpGJogXRhqgbIYOKB1GAoBEpgqgFMYB8AUGAuAFhgIABcYBcANGAQAEQkA2mACg//uUZMiABeM9RSZ/AACNxHiWz2AAFgCZCD38gAHTkuMLvPAAAQidDBQJWAoF8J4JAhQUeRCDAYEX2JV1frGcNh7T3tp+4ZZ36t+9G5DnIJnOkitHCoxA9JKL0m1hhrtW9r9dywtKDQFNFiQ8eCJLF3iIcpSEEWFHy5lk6mBlhcBoZSGkFWWxsJJOKL/Lie35kQuCmEmGQZRQM5qCDuGHuDUYRYQBgCAdGEACcYD4JAjAtMAEBswDQBS6sArzZml6jkXAhx5EBJCDlmKkZyoMFlEWNA4VmidtfD9/XWq/ebfG9Pk4qmFZ1ikKfWtb375zl7OKnlEu3bp//7rm1Y9uv/utAEKjHbnT40oemoNQXEwjk0EtQw4sJlM+6A5zCJgFIxEgAuPnzDax05MFMuIChlKw4FEiDhcwiElcGEDRUAkFDBgIwsPS2ZsnO7qAclAVMEIXciLfPeRF1xqcaag3GxGGWJGjgInkxYePDVSjHlhodc4sehhzlpruuz9Ptpfr//uUZD8M1PJgwxP7OfBlhMiReyZMDkR7EBX3gAE+EKPOuvABNXp9GmnnWdFu251as81V2qq3W+qrdDlzGnfPbslHaUoCAxYrIzP5P9MzwK04DxGTFQDRMPoWQxZxLDBfCbKAkjCuAQONYqFoJHnVjTeFARGIj4RLJcggQGhjgKfSAmgbZfdMmuv1GOzU2QWxSt/g6Dsx4aEgCNnPu/tn9T87G4KWo0///6DJMoD42ZeYYMsiF2DYNxO0yBYfWMNvFIzBmQN0wE8FXFgfYwJ8AbMBzAHBICKMAVABB4ASLPiQASjShgCzAKR6Q4AfgGojhjAE4uzUJKcyeJqxODJ4uYcS9davWes2Jt3s1637zAw1T2rdd+xvfT///9QjUN9LVOrd1MbTdNxESJpoMnhFCgyGIgGhwNGAgBu4im4Mojk20WsVS6NWAjTdUh0qLSHp8/XcJwxWtNbeW/vekuc/P9Jfr5x87g71vBH3igAFsWuagAAAADPi1s8x9oYOMcYN//uUZAoAA0Qcx8594ABDYpq/zDwAy1xzFj33gAFLD2MLvPAAwjMKAmowFUlEMoeFwTAYwK8wAYAhMJ6A7gMAxGCwAKyeYCAFk6GXlqVYGIiaAXgUTwnoPiOdRPwQRijeBrlwQ9GuKxWbNdTbg7tTD7WcyWrWA/fhUAARKHd4h3eIj/gAAAAAAALim21fdOmflFrPq652SgZ7TYTI31cDQVpYQE8egxyDQz3ai3xE6dR9buqb3i2kO1lo74RwGFfjjRpPDlCZVCAoGipg8xioAiSYbUFfGB5gRBgGIDUNAPo8ABGARADIYAFoKsKXvZTWWBGSjENUqQQgOIv6ScFUe5M2xsi6+vjNv/vO953jdr4vHEYqiy68mQAMGQyQ1DVRjJCBoMF8MkwJAAjHDBoCgSxhtgPGAqCUxQwDAA2aMIrv9C1DUJAhhNidnO1kWj1IXy6uevELlrCxTWNXz/JnWcf/FNzSVkxJHJoJFWMc3H8TYokfoz7sFwNHKJ2zBhQS//uUZAsNkwQbxRP7WXBHo0kKd2wWCyB9EjX3gAFTD6JKvPAAIxGIG3NU2jW342ISAggXTIARyn25QK/RoaWtyBJO0hTZebdIactxYkBEKjV0LOnfM+yXtNLtrHmwZAIwRH//ev0f/9vT/o6rdv6gAIAG0YAANDuCOM4nNrgdM7lSO0YTYkcw45K0RC1mg0GSEhuxnxVKSw4NmTAJWFjswrWt/p8tUY1decs+x3v7ADALgsk2HPWYxJNLZMLHjdDGVhX4zts2aMTaFsDCiwbswMkDrMCbBMwoAslQBLKAJMqgA7rN2bs1BA19gihrLxVlaRwsaNSqsJwnDPTCxB1Pq3zvf9NfdN4t853W3+Y6NQMGkyKYZuEGZjdg4GGyzuYAgm5jLAdGD2BiYcAGw4A0BgODAHAGTHZu7cpdlMVkEsqpNIXAXMhJ/TLs60NLkayXe6zuH8Rd/5vu0Hf1SkkN5e+KxNkAAAAIJEggxR1R9NCYCDjW+igoyW4DmNvVNajD//uUZA4AAwsURiZ/AABQoojozrwADJhRFLn3gAEgC+f3NPACrREcwSkCGMAPABzCHAOARACBgaQDgFAA+DFZ4w0h6lmGkAyKPxMHHe2HU6mdrmZ0w6CVwt5P3s5/nbw0HUjcGdilan79YAB0vrNAAB7pUR92rRz/XJpcDx79bZ1MVBjcN5EFxgCCgOJIGgaDgWXG19SQUAtpLD0seAjCuFjjltL42EKHEbb9D1Vq2HmqxFKYcOFoocfpAAoAAANV+R+TR1RYczCJpyMtrD7DT+aBUxcwYyAQTMYACAIGFTg8o8A2GBOgMwOAD3Cfp/GctXYEIGLmL5fD/Ow7iqPIiTCUpQHICv3SFbXcxzwE2uLvbWOrR///7Kf8vsiv3aQAi7bbdrbLKAAAAAAADd1AFQMvFAgE3HA0JVAWxZIjhFfSRVy8ieLIoekQpQyiVFykLopiVhgzoeTp2no8/3Pfd//nXi4oLE0JAAMZEB5TNHDmQ2HsmEMbQLrzD5QaIwGs//uUZAyN0vYcRBd94ABPAwii7zwASpxhEE/phUFEDiHF7aC4J3MEoAvTBAgF0wE8B8DgJwwAEAgAQB8Xqr00voU0AOgp65iD1qZCk+5IQ5K+WRmj7xavzfP/peud63NjwA64+5//6///oLgADEVEtMvUdY0nhxTBGI6MLUOkwcRUDCfBuMG0CoSCSMAcAIMAJUiuiX4v68svJGIAfRMVSXg4Vy3uTeyrt7Zs3jGtfH+6bhafw0uOHjykMGrQ7DLUb3QxHIYGMpHNpjAbALwwkcAhOXePPRMkWN0HboPGnRqxN3loRBzVlLpNxIEMGQdJAtbPDeBb/baLLuWpPxawfKngmTd9f////////99bDJUKdMku78ygiETFyINMMcDQynA/zOAw80lHhMWHgMbA4ZVxEJe8iwagjgr0jczDclhTXn+hyklILQA0juJ7S74ta/h1nMHtv///+r0I97dKKUlTDnC1A0XEFFNM8BoTFYDSM5FCTQFeNIBEFVJnZjoC//uUZBCAgq8VRJP8SOBSwohge48WCXhDJ69lgqE9DiKZ7aRwGDAGW0mJ2HaR737XU772MCUNhxQTIBUdYK01lMV0n4UDQLtwszpz5T0fmr/R/1Nb6P7v99ZhwMRG0Yz2a/IgpitrAGrjyeTrZnMgmyRQYgFYNHLgFATBzsRyFvciGC8Hwu2sZJ+ptYui2JnOQ8VBW8t9+V14vA4oo5WcPWJ+Mt9Hd/o/v7prQAAQ3IHdpG5RQdYw7rIzCSFXMVM7p9z8JICUimtpJhePe9i50lMnzaY/PL061OaXaIUvAMpANQMmTYcIO/b91+n6V9v9H1xf8Vv/qSg6pZMXMXg0fIzjHRDmMZBCMDNZ+poa2gmcgQGO06E10HWnchhyY9DbLKslXOBcjGE4rFzgmO3tMyz1/nr5u/+ePH1+yzs93+z+jvYj/699MYtENjepjRk27UGvMcmSmQH0zSYSOTl8y8cjD5MVAVUKC2t3YYdGIMQmlD2vuOytoDk1oW88SjXw//uUZByNws0RQwP8yJBLopiCe4wWCkhFDC/zQkE5CaIJ7jBYd9UF0iZljFKLFg6ZkB66k2atP+tfpt/r5LZ9lfa26K9RISqYUAE5j3v+GtcEQYYqtBqhBnJp4NAAIQ4YPEai71gwWNtrQkXDUFz5MaKi9TqBHC2+stldznXWmrp/3bO65/7/kU79/2f+l//6yGHvhSBmnHbAZEKQFGAaIShzOWGbiiZTdRnI+mGhAbKCkRhgqa2U4wiYWw7rOH7ljvMttXJVIqr7v/SVK5UffOCKhYodK/i/6n93f/2/+6z3/vWVVjBxPBMpu9E0TBlTFzRFM0HY6ApRIVmFwK47hFvYqgsstpMEszPRWIpdiaWsZGnpWLLQWWufHkVNeJV2t71/6FUVbv9t9f+rd2bX66k9AAMYpME9D8nD+aEqMsma8xSALgYBaA3hgk5niBkASa77Oddo4AmYJAxqwMwabQZ9jcX/JVsmg442DZhaxav///////awBgwqrmqxgea4//uUZCeN8ikUxRPaSTBKwohxe4wWCJRDEE/tIsESCGHB7TBYoTJljGMHb1ke9VRlMPGTQMVAY+yxkf0mFxsKwBwAw+8fTVBFSRGuOy0cpqLJy9JgeD5ITX0bMUTU//d/7P//b9BSGEmFjpkHte2ZHoKnmDvGHAUqTS7oy4jMCKCIeRuLYCQcSxLxOqA4mtZxVASNwWeTSe8oHEATwdIiayz///////f//oMM8Qs0SL2DXHFSMvEIU+gEe2GRTlaIxxkDIQEDjwj9roPDsdxhHYKTiiutXL8lbaDSm3sj1NW5Pup/7/X6vuZ0//7/6aAMGtGpzSEGOU1ZkNZMOzLwTnJBMBpg2Zc6Qs1JkxI0wwhl7l0+NR/n+erOYrvTTxeavdqWb17C8O7HMQu32e5ADD+BrNc3bA0yBsjNOIvPOGj8Ik3IkGi0v+gYLGawpRhXoaGNZmWjpMPRMNi7Rzj5HzEeqhG2j0b/93+zc7q/6v+z/14MIpFrDIDLewzLsZOM//uUZEkNwgARQ4v80IBEojhxe2wWCKRDDi/xgsETCCIJ7ZhYgYJyjtMSBKtM8mYABMFFoIAKQjNQZXw4WD2cF/bvL1xysY7bKnTbWw9s2nP9v0erV/+7////V6hRWExAheTYDhZNdgLUyuRQDCAcNrhwtQ+KgAQA7kLswuD1CEzxIwLJRjMXOgoZeQVoK7xf0/yX/3WR2+/Sp61f/u6v/oUoVAMKKFxjUMXVY0+oOMMlzJyzBigEoOA+jhPjBnzLLjDGkV3UUuAigBRIqVciQGUSBZORtcVfa2Fwqgm92judHO1tJfzlv/3fr//9/rGAADCWBYMkzIczCRmzIiEdEUM2c4zKsHCB0KoA3z2jkZqmyUbiY0wdnmedLIHQQ0bgY2cIf9v/p///RUyzGFrA0plRsA+ZaAIfmKbDWhj1KYRRGUF5MHxhrAkAr+Et2lxGU8SbduXrOjCARIGjjhTpvsp9a9P/Ff9sV/bV3/9X/SQxXTqjZEaeNuEOAxdxujeC//uUZG+M0mwQQ5P6SSA7IiiCe0kWCLg/Ek/tIsDwCGHF7SRYjeaxKWZIIm4YIOg85KHONTQnRWfIfAS1sDckCUG+g6Zo//3f//////lf/Wp/zBqQcIzt5zFM+PDtTGFxKs8IUCKjHszcDjNnTHjRIJIg2mlkiRiwMvgii7FBm7s2xzw5a2pmRoPW3/+n9Ov7fouV6PVm8AMFo2ow+epjHoGcMDwnM1EVMolhEAkxwTAIKEVYpnU4F8DIW860qQROb00w3rHMHoV4t2f9v/zPp9Pd/3fSu4WvMJ9DgDJOFkQyX0LyMW8B1jvVwxgzNDHDHgFV76v00kNMIDAvIjFDNyMILsWbF/f/s/7Prs7f1fFH//Qmf1b1EMOIpg1+UHzd6B9MF0rQ2iKNMjQFAiUQCARXKok+h5WYlZXEKjdjolmzy0kKDH+pDzptn/VytH/9/+7o/i/RoVhj39kAAK3HFGmzAkAIoxyFKWMgyCVjE5wdswLYAwaCauGspkEBAMvf//uUZJgI0jINxAv6MLA+ohhxe2kWCEg/Fs/sYsEPCGGF7aRYx++7sphEOClHJG3zBSec38d9ej1qT/Tv//03/7HIs0ABWBVTAfDFMkzKE2zhTV/hMGicMyYcETEgpSrmVyU7eTkx8DVyKTyENBk5OTeEmrLk32bW9ftx37GfZ1e+9Wz/Of6NQZhaYwl4UxMupZezNFA2cxUIH2PMZTHxIzgjMpDBIJegvS41ybKqRgWr0gsBJjy39nX7/+n5J398c977Pr/d14CrRUylUkQMT0XM21gqDZ7AkMbIgo0Ks1XYv8PHRZeXnhh24TY7KYWrSExNG91YNCgavczR9aKejPaKv1+ni+n76///+n2KACs0qmAril5lZ0K2ZfaIWmMPg0Bkc+CGQxdPMaIASIl2wcAMPCo1ybvLLoxGHKkPieWen3ADT6dhayGlrRYzVar5W//76Pv99CNVaEGDiAKYvH6hovBRqG6ZhIPhoELZg4DAqBqgSRIDjA/7WWA5yDJR//uUZMCIgiURRlP4MSBDwgiGe4YICIw9Es/sYsEGiCHJ7RhgVfeJiCRoAAsSapm79Vtz/6no0GBsh2fs/2Vfu+zahIzDYw/A0Zh+0NRpEPjKXg688+0DahRM9jAzEEzBoLYGj0tUTRkRoTSCoK9dKlIMCWPUJT5EO2IRTXsmjZ/nrdCdaqHti1nlrdUfdehjRn7ulx/YAJhvEznAylAcgQFxgmi0Gnigc9OJioOKqCADKmiMVZciAlAkEpjAsgeLQiAIS6tUhp4+qjTvcqHC7DTz+hDJdP1pqZHTElsMrYx41jdzF0NakmxetCteYjAch2I0GHosNB2HqjLvQ9AwYAF2AIICczEYu6a50ZAYHP1qBtGzioWbaLdVysmhcFAsZvtL0O7nNgUUoHmd8WLVvnEOWmlqA9pHn17bvU1XTZt0X2P6VGDQBg5hfqTyenSqYqquY2FiZ8jsYHB+YBAWpqqswVm6CieHMaciODpUehyUlCAERadv0g+vmEKU/6ar//uUZOcIwlsOxDP7MLBFIchhe6kGCmw7DC/xIsFfiKEF7hhY0uux5GhVTBgslPsTSvRb3NST/0btaDDoDRNc97M2ShSTG2ENOgTTrxs1RiACmRYZsqCY4jGJCYcdmCASibQnEuQU3qm60GYt8wQJysWjQSxwLpaUPzV9YnXIl7FYo1jcDr9L+zBGIwOQsKLb/X/yMgv//tGRWP+dkw9RCDlKm9OlEPMxWhzjO6LPkBNSowsCAUD0tUeG5HvzqpOHUYsSFj5b3122SHHCqjhgw1cKhilioRk3XlwkAUmVFbQM5xxrioGtQNL3meaFB8JUmDjzzT9cVGOdUhbWuvQ81QApLJbbbI0gYrEsZ/VWZDH0Y2DUY7iyZ7K4awKSaHqecI3MbE0sbfNkbPHSahvkZSFWZTBsRMxfhLowUwECiY4gHNkZ0CSa/HCsaaYiALqN9ZDUn0w1mNXMXBMVgAqnEMd7ZttmsgByxt03UApGDEha8NROpU2WgQipoBkjCLJD//uUZPcO8rcNwgP6SSBQgghAf6YIDGRrHi9tg9mMiGCB7iRYgCKJCF+UJSKpdIHCgIoACg0AkDGR09Fzs0YMwFnjrtqzl6n/kGU9DMNRGZ1Wu0UKfl9oJicCSKMyq7rtmlmpuUS+ipquF6/qrWu4LIqv///kyIksVAFlgAldNttgAAAwIERkRmynComJPAgDY+UPX/qQAEhwAekhD9GZ7RyOG+KgApJKyukAMowBOcEcPVUxA1WmRhPHXjLmJIrmAsHmgAImCIOGNY5mJwSDoCGFwGsnTvjFdtL8dACiAuKwALDAJgEURA/1fHzhmbX9c4jYbdO4z/e3uWaTP1vWMyRYti7gnQE///oIKxp20HTFEYwJhkhbGngaZrA5ggEIDQUBFqF7FutDgmer6gKEYHgMOKtTJ0EACow9an11MMXLyzTa2iYwxLxfOLzYoTFmKcQ2LltVM+WF/DEtAxcyg4XUMZ5B3DIWy1UxfgCWMDnAGZwwIcDEAQFYYHsAxmAF//uUZO4AFro5zeu7yzYpIgodaSYZzLB7M5XXgDjOh6TCuJABgAgVqew+x0BBkTmEWieqJbwYgDs1cJwBYKBXdf2+3jnzSS7+RB4nskVNbfWecie7R0lNS2rFH3tXkCUl27bvTWE3aGmCwKAEIhx7mOsS5Ao1zADAHV7HKsHtuTC4/PbUMaF7nOEX//mv/+8AJYAAgxqnUTE3SAMmVuoyFT4zOxAxM6oi0yshSjA5AnMHcIswvwZjJpBTMAQIcwJQEFXmBcAY4I0D66jwjxhGZEQzKNzCUKwK3BEJayYZAR3o219vnkT1jrJZTcvS+W36+VLK7eWcqj1XtTuOs8Ma2HPsYX8q5Fm59KW6r9NK2fJ/y2h136tX0gBIGRWq+RheKdYcRVfuGG7wOhzGt9YaHkS1mUijaRiPoMeYSYIsGB7BBxngxCmYOMBWGBAgFioDAcQDUwAgAAMAzALjAAwEtBMBGikg0RDPGbiGFIlvqImAQg/4RAHQpqMYp5lrrrP+//uUZM8ABWgkw4Z/IACI5Iilz2AAFsyVDjn8gAIGDiKjPYAAxeWz7hPvNSKmfJ+sO5xKWXbdim1Ws51It23S47uVL26qgswWNSr3AQCLEmWOlyocPOJbGJWZCIscba4dSSfMuIJhEJJTpeKjDv////9KQAAEIBQAJDdUFNMgJQo2zzVjL8P0BMTZkWIymTmRMYEQJBiVBAmFMBOY1wW5iVAoDQJqw5goADN+SgSoNEwi1awxrUXEMagtUCRGgt8qhFFvOxPWuUsTcN9qOjlz2X8L/YKllnfaWjxpXCAiIAkI1kksQt/obuup7eO1Xf1XXs/RrQU21YzC+P7NZPds8Ce5zWMNJM94V07ThyDEwBHMJgUIyiwjgACqYVAVLIhEAi/aqi+oYjByvPxzFg9mB2JixAVu0luKtM1f1bTlrX613Y87+6dq7QcYeEEdv/9/s+5pNBDWv//6QAAVSQnLQAAYbXnZfBkHeb6NmkS50x8WmCwSDmJBt3muvI0x570n//uUZEYMEyofxx95gABEgxlt7ZgBDkRrDg/7QsEMjuRZ3Yi7qEzgM9RIwFLIH7Sb7UpbGYfkcktHnKsNCEDBHExIwr4MwMemDTTSFCTsylceHMdbC4w78aTD2H4MMlQA0SRAjALBEMdsSowOAJjqvzRCQMRQ7M4UCS1MADBRijC4RtwxoqxdCXyq0NuDK6Whpaem+htTOqHkcoo1Tfj+FOaMjSCyQxE8nVqTX2/////9P+zeAgWjCJFzPmcjP7kDE8dgAOhz0LYXGwCqBNGOg5MFudF4FhcLiMdjEpj0btxupqNVv6MnsHUtTI4zdd1q4QiGPyT//TBOFBwxx3wwN7H/DjL4DEAxkMF1OVhF1DFsQHUwXIgwMLXBcgIBnmBFA+pgR4EuFHBzBo0YMIDAAFGVWIHMkBywylwONq/AoVDuoyLAkRkVJ6VzsYqk7w2JVm0bSZZ20q+cdhOFoUU/kmGzLSKXNxAQjiYRUmYhO0B2DIta5i67ry8WSU1PcWeh//uUZESP1IshQgP6StBjQziBe0lKD0SBCg/0x8EVC6MF7aCziniqZRLpGkDAOYK5w5natimdm9eYvQzJgZGQGkufKYUgDhhZlMGRqG8BgTDosAFGMERCgFpD5QBLvZylElakWhIZy5Cd8aTmfQQXcxFIu2uw9NOjlPjfc0PjSI00BUq2f0f0f7v/3p+Kf09pghCJMaf2SyGUhdCJiLRZ2YLEXTmV2G7hhZgHqYIuPHHyiRGQB/GUK+GVo3FY4GHgTlp0n2WtEZqWUYGIQDLxLcAQCrAMhLcpytJdGal1PUqhmkimjJFyBDSMYjOd/bZjumApIyHmquJbFbn6tzH6/p6fx3c9vvbf1bzGI4GWYGiQJmuEymO2BUYBIVpnTgnG/iZkHAZCNBBYoAgBRCae2kP247aj0xOypkznoFz2EQw1x7lWWtJPZAyIIq3eC6QpzB1BLIwvWd7OOSWWDMSSEoxKALyNZMH7TDMANgwh8LmMWWADzAaATw1vcD4DPvmg//uUZBiIk7kYQwv6MlBFovkad0knTMhfG1X0gAD2jCRquoAEFn33ZVDSwDNV8xyAUU1LWcQHASVimYoQcMGBR5AwNVpCyEqTEix0qYBy0wksnTf2LbZvdV3xGt6lntyQwEN+5+1/mn9I5YAFopOIAAGJ5pGbTdG5fMGJgKA1EzF5BiAQYKw0Qw48y4xdKVbJn8LLiiKBUQsE2jUmCdMzsYw/Y/vJf0x9AhfqnefrTqCABbTjbMDRBMDIuB+U0lUq8MVYBWjBYA4Axh0LxMGHBCzBAwREwYIACMAzAFTAcwCECgA4YARwE6deYfhAfLEgoSKgqyTGW03XD3Jr5qlWhmiJXnKzwb1q/0Xbe+6U/6naP/U5H+okC5AYih+ZgwYZd6GLP6KhuEYaCggAwVmCQYBAZKKqqT00/F/C+JAluhovRJK3Rt1FSShsK3qWo8yo5FrBEgKMgEARKEDAbCPkzRgUoMrbmkzDvSAYzRgbrNBHFiTE+QsswWAB+MMwCwjA//uUZBYAA64YRbZ94ABNIqm/zbwADdhrFrn3gAEDiOh3NPACMwMUxFAIMMD7AdjAKgAliRMAZO6YA+ADNoYiEC7GSZyAFKM98T0vaMQMGt8brZ/PnNc4v5loC5ifIUN+33WN6Cn9ci1+aV9rNSQAAAHeHiIiYaOMAAAAAAADK+U78fOEaDu30zP2NJMDFg9dhfZL0WYk1iZEqGAgdcwUMds/WUghMSxBpMrhMiTloW4nj7blilLVksYZ0gQEAAAGPxibhnPJIuaAEarGbVinhlbMiYYXWVDGCRhipgbgBEYSGD7GAggTJgDIBYYCWBWGAkAALjKTcUoAF5YLST8nx+F8Vp7qrZoIOhKSKdQLZgRJo0bHmxn51j7hBO613//////3//+d7v//WAGjLbprrQLAAAAAAAAZSQSrDD+iayZNGcxGYoCz0OmMOL7wlKGkL0w8vSH3zOBIhAZOoz9mUk+iMtjbGwMO+HKqYgwUUG7NBvYvTYYSHc01YVFMJmFO//uUZAqMEz4Uw4994AA74umK7hgBy2xREDX2AADzCuOmumAFDFqhw8wfQCzMAwDVTBcAE8wDYBgMBWAEBoBTMAtAD0s0JEurWTmFOWRcbFuN+xXrK09ccUrNeaNWaoOi8Ug4PU4dJLTX3N/6LF+3/q+27/4W1awAbvcjAAAC4xMrCA1vgyqMTFglMXDotEnOUAKKsYSBU1jOst/JRLBwIRSscyzju3glAOPtVaWsOpOd39wMYZ8FyGYdI8JlcUFqZl6UOmK9grZlyIDUYJ+ANmBMBKpgDwBOYCAABoFGAMACxgEQAAlE79NdzNR1EVcEJIJ1VIqJRk07SaxX/oxE469iPs3/X/T/8l/+n//pAAEJ8DRw2DFP4j5TQDeMczCYcDiwyzAAIB4GUJacpggEaV6Bz6U9nuNiCsE5ZqQSkSWp3eypITy/RkfKOgAIDIoKlA03sUaMq1UXjAtjAw09ySqM0eEdDCiQNkwB4DjMHVB+jBLwFgw64KRMCGAIUynF//uUZBqAA80axA594ABL4jjVzyQACpQ7Ft3mAAD7i2RruoAFd+BC3rjHMSNEIGMXQsCGOAk5O4rOUrnD14V97riuv/bHxeYGB4rNsRGXCy5Jx5FyOhHdt3D5h72FKpJvoG+tzE/s//9IAlwAABm5rVGLQOUZOyJRnHEUmX+CmaqwpJhcAxFAHxguhMmBIACYpYM4QBBGtJ00rM6cUAIDZIDuggIquMCQ3vcEQzu////////+kBi3F8YvbCxxA/VHPzwKbICzpmCA6mskIeYLAJJgzA0mF6BgYGwCJgPAJFyhIA5l03FO1VoWmRMjLNL+WZLwmI1Tcy4ee2vZ7v/3f8Xbf9f6eilPxgAF1O0AAAGEQbGJskmF/gmGhAmJxmmtIyGFoAAUIDAcBmApquq5MFRqm/iwHoTixgteo6+6Ypy6J0LQywiL/WQAAwjgD6MoXVGza/kU8xc8DNMGaCfjEmQ1szJkNDMj6T4MXQE1mFCZgIW6UvDrP4qJpACRIGEJ//uUZBwNkncUxBP7STBD4liBe0kmClQ9DA/7ggDai6Nl3BidGmTEv8arZNMTWFA07Rt/////7P///9dAGBmNcAmJTOGiGMwkQwwjiSTQmJaNpFNiyFnauguJVoTpVfHoYktHgiRkQgcPFDzeytaTUQVbcBV2f///9/f/////oMCJB1zLUm7k03uhQMFfFGjGROhN/U6w562TPS2OKgsGnUyUFhCGQ4OShWiX2d0L6Q+z9zcez0By6bpxUKiUFjA86526X7+n//+n7/69n07PH7WJJ2BjCUhnN8R/CtRsMI5guSRqAiJ+Ia0FiCAxBM1t04VDPzQQOFhexWdz2SOc63q/rXVlzCZnJQEDDSw8gzOhEsNbBgGzKIhEcwZ8H7MZcC3Dah4zSMPRLAIImOnymRAADwK8i0IxBlNMiOLGVqWRR/2WoVvviqETDXLmm3f/6f/b/9vs/1f/6+ABwSpk9jbGyBGqZAIIYWDUM78M885ACFT4JzCERg2XrQnPtgjm//uUZDwM0pAVw5P7STA7QeiBe0wmCixJEk/tJMDqh+IF7SSdzUh86Pq0wTLL8+sEQYCQEcM7Nnn7KmVUwJADsMWtVWDU4h+YyUcFeMHYBqDEKAik+QwNzKDHS4woYMJHQ4AMJBGaWJVSbKGAykZKXkPLL8mBOKwuET7hf32qxhCju+7v/0f/9ux3QwwfhszCnZ1M2aPQxGQKjBkF5MLYfI8VcCijTPx4qZIUAQaCj5O5HZKGxxwgFZLeNOgyMB1dwpNoXvyqJAADBzhIUymM1vMk1Y7jIfANEwUsDyMW5B7z9S0zDEOlOzDwkZCFH1pq0RW3WmIRQpqRtlNE7ZfzzzezQghgtb2Ut2f7f02mP9X1//pAAiZuAAAAxBIM2geM/NjMz4EIxCKj2BbQoBIEQ+eMuquQBnAub3JiFk83J8zjy8NlNW/MlPW9qghuaeQoFDmHJKB5hzK+mYOmCgGAugpJhP4PQeMeYbAElkYDMhFMUmamy8/RgQYXpI9y+pZM//uUZF0AkmoUQ5P7STA3ovjad4YXScg/FM/oxMDJBqKZ7ZhlWEYFIXktm706k+Y30f729qUlj7Xd/9P/9VCAMCsAUwxEtDMqNnMS8PcybOP32TIwYtEGCA8UFrkLI828sEZytBQOKB+WxmaShK1oVSyMFPAfTLpjaAyNpqsMRvDNzBSAh8xqAHsP2CTc1AykuBxIYcUl6goAW5QT1OYswCN11t1kl2sOSipJtGgglhPc1GmtM7Vu7ea/szx82xzOV+gan3LAGQAkFIZSqCRiEOrGCQJADAbzGFCIOk8ZoNIZFkDOsFgKFWFxzjzgZkSTQDJiTCXxfvq098wtKrJgXoWcYQSrFH13H8aVxgxhyjuGM0R6OMDESw4EjkBRDME+43aw7/7yw7Q9zqAALyAAj0yaD79ifWn9/+b+j/7sm7XT//vgSBgaBEmP6rSY1bSpiOB1mg55jVsYIEhcYCIFPkBAEMugtaZA35brLSMSw0QAX/MEOs1fSjCbAgAz1Env//uUZIgIkqoOwwv7STA1gdiVeyYnSRA3Es/7QEDQhuJZ7ZhhNqQlVzE1R8cwSIGEMffApTrzIx2ZQ6BgQYWUlgHFAOll4CzfQSSYYUamTBAKmz54qPcU+7b1c2Y2kNCshtTn2pVkna+lAvqyObSt25jfSBFgDAaAMMUJCM86LY2lLAx2BE3yB8MIBBGJCA4DBFnNLceWG4scGU4MSwpg/jnak8A2C13NUYHsEemAXImZjDSTgYayJHGBJA/4VCCDGYwwsZEbeBQxJJesCVJztYSSUSSaUQIFHvE0UGWV+wj0buv1/939v0el/9HdcYJIsRj6K6GqGzUYuQOps+EbD8rkMVjy4K3QUCOo1iD+h/qI4EBQJQYEzx7HhaPATET2v////t////+uQAwqUG+M2+DlTdnzUMyZoXTMGxA2jGFgWM3vjOtPNFNNJNlqScTr39c8DMK0mnBRqNf5n79exBn7+uhfu/31fq7Ebv7e1e//Z0jQQMwkhgQiSGMShIYl//uUZLIIsrUOQoP7MTAyQdiVe6ILSRg5FS/oxMDsh6IB7YxiTQYsIiBTKfnIwsJzACPByHi6ulyhVHcNv4hHHCQkLXCCtztvs2/7f//732en//7QAA7pG5G0QAWeKkANMJsxGBAIFk90H2Js7ZYjQtM0K82a81606sE1ZNBECQJgwKV9M7DuUsbl9WG4vADOJBK3bh+cwsTbK1Ttu6ADEfNnb7CxyaTe6+zCxyd9YcHnX/Dgw5e/PSJYzoYyHnwH/+fAGEoD2ZSqVJtFJkA5Ns0g+T4lGMmDEAmkOi4hBphQHp1ORPcmVHPEIFYRRQPqmXrQjevqt///dZ/Gf////9dlAAc2sttsiQCKBlxxDqUFC5gxw1sRcM0C4ywkOLO5MXEMRsVAMdI01jTeLWssQlP1Kpt/YdeJQF8mBFvm7oOsRdVpTXZa+rWWuxBOZK4HwHNntDonbVay7VlIIz0ZJj4yVZCTaXOnoTFS17LpytgXa7Xvlk96gKjS/Nl/9dBy//uUZNmAQlQWQwv5MTA8AViWe4kWDcyfP65pifj/B2HF7gxgbNhed/nBQEAkAAwZwnTGcSxNMMrAx1ggjKpwPnGc0YMkiTMoGRXSugiHaJYcD4lq7kgRElW9vL7xV7HEC4fD7si2kdAUMBHDwDBqVAUwrljnMF0CTDBpQdgzeUElMHXAMDA3hfc6wvTNadO0WExEEwcMjLoEFgGzVGVR1XzDUEiM6esoQgZURi6rpPjnnsuAqMNTtOW4xMxC0hW6j+73f/1///t/6rY3LQHgMAoL6tFpwF+8MXQut6AN4xQvSRE1ItnRzC81jRmsCCTtQPCfaJ6nTMk3Sh0KoyOlkDv0TjOC7sI4p0szHZXVMPx5IyjBODHWK1MX8GcIAjMFMYAwagcAwJgwEQGmXQMy5WJYGUuW6AyMFHatYlQpWS2FPiLq3g2hubTqNi9oMynxIHiFNX3ed6qO/96VP0aWRmjTenmBsXrFEAAApqNuNAAACEhi7wZZAIAiUlMrJAwg//uUZO0AlCMvUutZYn48IciWe4wYDHBpEk/xJwC+i6f1l5jmRwQrYq9TrNBg+JS9r7TyWjTIiurPEh6hw0Ew1HzGjrpl12766KmOCM9q3fMgH5ENVeTTTZB2XU6qAubM2cPITiVEpAxbALgMHNEKTOmwjkwbsRgMURE5TDiguMwGMAaFgAMwEkBVBQBGYCUAQmAigBYGWIKHA44C4MCVA+URiDgCZibQueFqDhiRC0jJFQsi2FEgY5xsTguYqLaREuqNkD5knWYOo+i6CKloJqXRroIIJMmksxTXTR0mQT16nSpUmToLTd1a216LLVSpKp1rM1tEzlgjCTIQLBkMEywhtEZECCgSef//7v/+xhrzpimqE0CZbxfZpcBiGha5eYaDyBicg3FYk5mfiSmCABcYfgR5g2AxGBkAgPAPGCWA+KgMEwDoAAZNAvQA8FELYeBWHhUhosRPwqCmKZDILnBet7BMwk5ZaatGxT4hTAYLtOh2OIhppdgjYEImUKFT//uUZPEAA3caRJV54ABDgwmdrbABl9kbCBn5gAJCDaGDPPAACHTChZA1rqCQwgXWdrcm1GWAdKC60XOxwhVGVJ//6X0ZAAMDDBozGVR8Yz7pcVMbzDpTAzg54xwkYHMFUApzBEAVAwwEFEMDQA9TATgLIwB8AmMA/ADlSiQAE366l+k4HKLGqqp1b6hepyMyPbPabp9z1kn1nVK+3k5swz/////////QAAA043JAAAE/TIazgDjChAqiMwPL4qCoxQ7lep2vVYjbwEEwlNjWNtNHVMDZuv9bospaLxnmFggLJg4gruYrec4mVXMjhgyoiUYBCGTmRdh5xnWMph1KBvaARg0OohK0umhq3BWNThtllRJsjPrdLGY4QQIhA2zqe2z9q5vI7Z7f9z///Xu//jb/uZ/9KRBxAwdB01QMI5bgwx0AYxbJY5bIkx0BMKSB+GBgSm45MEPK/b0O3TPHNTS4RqVchzTf73bedgdx6xVp5WgqIAwO8MFMekQgzaB0//uUZJ4Mkx8aRJd94AA3Avm97RgBiuRdEk/0xYD3i6Od3ZisQ8xngKNMETDlTKDA8YwQAB5MAwDQDo0gwwHNWjgiDDEBN9CUonDL0ZJmxVAoGRGTjTIjDQMpqbW37jeI5HhWzp2f/6/9Vn//q///6QAOuvwAFXCC4MM4QUElUzMnWAgow4g55yYZnom5bEorHXhi0xbjNSmnMVuiBtGdZcJh8LyleSWRAgOJtNMwOR9DIKj+OECbUyiQrTDGH0M8Yp8yQmDKOmN4FgECIBIMcAQsAkwmTw8zl0XtkdKHEjgdwJ7qXc2zGiBJ4PCjffdb/TrT/3fdkv/s+r9ZYGIRRgaRjpC2DMEIDGgazdQIAkYCbi0YyMCEuJxz4w40RmwIcCQhhN4SIORL81VCvRJVJAADBBA6Ax69M2MF+h8DCYwbIwMMGMMm/BXzQENTCVtDnATQQLxZowCBduoCA5Dm1hLJrqYMWh11BlcgIFw0RjhmLWdyuq2gUeetc1GJn/tl//uUZLQIksAWQ4v7ScA4AulpbyMtinRbGU9wRUDKCCNJ3QylvR+c06//Z20AAAAxqKAAABGgQdU8+XTQwJAJGNMJVdgAoeQKBEobBQKVYTIh0lAGrGr1LyV1g4HkYoIgjQTFFIDBFglwxlNFFMlTclzHfgfEwSkH5MEyExjB8lTDUJTmgGjAUbigWAUCYCAhfqCFdDDlgW1jsPEl0YXZBWkaSOW5WV8puhJh9m5SbdIx+dYxGv+rsxlE4QR2+r/T6b/vwuMaQTmkb48lioYaSBqkck0AVwuSUUrJWmQNAsDsN3D6QGLMExJRA5kZekJAkZfASWkFJRVTALQBsxn5RvNQqA0zLcwUYwlYA2MgaCpRbCDHUzzn4EzBolDAEPiqBANAZHWwrl0Wf217smEqa6JRYygVBFRXN/9UmSzbOMvShhWdWr3o72LJoz1l23GP6qqX/StS1tcCsSPlGChlckkgBACcYRixQ4/kYYQFxgrhFmViGQYYdmPQJ2B+FwAK//uUZNaMkssWw5P9SVA14gkNcyklC9hXDk/1JUDSC2VlvAzmEoQChQAaewWHm1p2fM0mAsilpV6tTmOYMN1hoNm7v1//9X///////262YRqBkGU1IThrpLuwZKEBjG6NkHXs5mXYWGNDmmzAigICgMLIKEEiAJkM5GYgu1NZiUGGFIwRwDlyY3cenv+Y0ukbdL31Iy9FC0XovpawT2OOVf6nV0SqnI5e+6QU1ayVgpUhTAGAADcY1Ynxl7rKgYugy2qzuTyGiyZAQJikHLeMHApHRWxMFpdG5cWrSZ7SoQCDiIpAxcLzclkMZu3////7//+3/0IwVUMYMZzcRDBvMpEwrcNDMEdBHjI1wYg0HBwwo1k1+HcFAkIRMMBQXVkQCggBFxp5MtUggnbUSoNEqYeAMSHk2U/imeWScSBJUmbQJH2qYHOEmDlULtNqi1J68NhdRwy9CZposmxgvGtYAb1HArOwkKiLNsf0tWAADAADtMQlO01ojkzIDBtOwyD0//uUZPMM01gWQxP9SVBHoiiBe2YqDJhZDC/1I4ENCyIJ7gxwMszgUIHcy8ULLmLnpMYL3YVHocnYFhdaWEosmxMzEv9KqaOZjhBD/////////pf/3fGIoQuaianp6qVBGbyBSb0qJ86SGWBWYhdYBDIkHjCAPRCTphFwWYAtG8zWvu7T6VGpAoGlLBQgNUv3fpuumX6d3tS5bLSxn/6e0WeO/d9PAoISY4A5pnUwZGJoIMYPoRRkBgLGOicy53xgoMyikc1AGvOKVBgyEjZA5bYrzWhSzaXFrwABOL///6f////+qkZGBbcxy59BOHPUKjJqBgowfUBTMVACvTEwTTGiAzVUDwAFpjYCAjA8dANezHAFJFpTFZRWHZ8yydNjlfIuZ2Z7ctAkWwtPODodBBAVaYTpfnkuDLORaczwDJuYsmR3K5ipYjDryzFKSQgQYkcgks2wCCxtBogDB7DUMT5QI1WZczJUFZMhsE7yijBBFMHDYHSpHIHBcMAqTKFC//uUZPOI07YVQYP9SVBCwtiCe2McCkRDFs9xIwD/iKIF7KSYesIfWHnShp9xiBjFccdsKIr5oXIvY06RtN5Hb/os/d7N1d6O/20U//91ffGDihCRkwAu0YBzG4mBFDBJjO/x8inJgyFhhcKpoeBYWC0wzCZsjVKRXK5Yuz1+mGQMNuKtEc5RwnFxIlRdotDC3xyYuhDmOJSJ1q76zazCZX9rZcwKnmIKKASJhDYkUt2+5tiBTMbIYMQFxk8moBnMBlXhOGEkDKZaAPxSGmLmgkPCwCFwNsDqLOjncH1gWh1FNq+dTtuYt4/fKU/1VN2J/2+n2fTVz27/sv/9dQEMCKCRjEcWnQzyaG0MdFFZDh2dOZ9QqBcxufANowQBTDQpFACkxIGVuUyeHRwJBRs5MVKRcpNQ1Ppf3drC5uv7cc1Gx/X2Gsdo/QRRY8XtV7px42nSuZWZMEYDExMzhzLJaQGh3DFpKM6VEoGgiBw8Z0IS7ioIk5saVNODKjo5aUfd//uUZPuMw6oWwYv9YTBQIjhhe4McDOg7Ci/0w4EbCyHF7ZigTTvpEBSWIMijvOe1f2a6mY/m9lPRZz1znPjXJBfU/UuxdAqyyYcwThwToxnufCGb7x1phwggmXsBGVmAJUPqhYiOmBISzlPWdBMU2iH1ZTrO1QDBIFFDohPklqTuOs2MFnOAGtZYQNPRXB8znTSu8XSg4bqaGFQvrUlE4zuh2iFJykgDBrB2MhJOEzRZlx4okwaQGjHJCUOWcMXAMQaQzLTpPwWp5wRPBAXDiYOvdf+3GYSe9i4fBhDBtmrVF60I96u2n+X0acZ2/3K/ivU+pKowWYIPMFxgxzX4IgEyccPqNwI2MdoHNGNjUag2U6DDQx0bKAUMB0gn8cOGnjmIXL87uf1d7yuEwVQoWDJIEu0mbaKixBicWCugw1tyLeNU4Wj7lmpwrYMZeWPDnNmh9Ax4uo/QxAzRiQYCBpJlCo6Gl3WHqHfG1okmvG54lUYS5gjBKJihImEwTNX///uUZO+MwrQQQov8MNBOoiiCe4kYDAQ5DE9pJME3h2GF7TCYzys2KWao3pYGQIXhISDDYHmWdF57Rx+23Szyv772/f/dq6a9bndZgiYAgZOkGAGWDwsRgggN2ZYi6cFicdleYj0cMWYc6NEFD16MHnM8IxTQ/n9YkGSbgeAxo2q13as1qemSbgYzoT+jTVp71PEdOj1KWqR5yLz/WupiqsqQg7GI6h4Z6KVRjqBIGNqh9lqYCWKHCMVULGi9U5CDYU5g0hQqbef1HfbB9o/kbB9Lmyenn9cts9zl2htWrR3bNq+r3M0vfXVRCwwicQqMP8Y1DUn2IsyEAJkPloYw6mjavjGPiOUj6FyiFrIHedWQRaF2qeVflrHdM00KzRuePPpVgGi5QgJC7ka7pyJp0uMGKeNcg88IrQTHMaaHMFH6ChFFbmsjL2qASZHzYEGBoBaZBqgJnzTmmH2JeVWUeBD4WQK8TMBTGxNUfOGYZr353UttEAZAcCBQ8KbScakn//uUZPOPQ0kPQYP92IBIgViGd3kQCoAvCg/3QgEtCCHJ7aRYOTfbmro3mj9LmBJVKOxCU7aEUp/Up6DalmPr202AUgBhfALmkGVYd6yB5n+jxmGUBSYRwDh3Fp22QfQP0YO7FNk4MOtGTRghIYORhS7SLUMYax9dDK2yOC5zJ2uQGNEJo8fMIEakZMtMnzZhuAtDoJiF6hVg4W1NMmpQWdfprYbAKZqqHAkTDMLzMchGQwuwmDJITG3DAAQCOLKvIFQbOHjsYiyOi4LvLwukyB9FiUdZYxz0mfqqRm57cnqt+1ErjNtNyUjsa/bu6/T3KgAFbbbbbY2gYsnG9Qppv8YIkG3TAZqkTWHQpkxl+mSwCaZl5EhkADgmR2B0ZuCfxm3B+mOKF0YjQaZjojxhB4ph1gbGGEB+NCnGC0BoVgOGACAwCPTTeHTiJcBmhOwHhN8IHSjwazw5cWQFjwwBVdA43ADjXNqIyHDHXACANLEQCc6Yim6dC1F/tRac01zo//uUZPkMgxsNwgv80IBQAVhRe5gQDFxjFk9pJcEviCJl7Rhgchl1l1KRVqX5A92guzEcbKypdK6lcus6sKi0ZlVDKI3GJfRTs9S0FDc3l/bFvC3zLG1ax1nh3nec1vv71vWq9QMPfUWv/1AAra7bbUAACaL+Ez75RCQz0gAI6JJxrGcWTJjUSAiyl0y0u+VjF/NqERYcaKa60qRcPpaUx3fcfcbeLBPEgkGZwngiDtq7AANId5h7dYYl6cIyaOq10QW2PK4MGNMQRCUymgFjHjE9BwtRiODWHDAoGYewMRiqEYyAJr0j58sWJg4RgXDUwNFU1IFMFAICQAdYoAVwYS06PyaV0Ft/ZuzdsU7+yKvIJRF4pRzPLQQZFQEVEYJbHVNSW/8qSAAMctskAPwIACZYlDKwMjNY2mepQW4DuN1Yu0uG1ApGYLiW//QPdlFlXw/d3OcHgAMV2TUyNF1jSKQiMYMP02V51jCJBbMGQG4ChPmZIL6b/wZBnWWRh4EZ//uUZPWBFq1Azut+ydZGYyotZ0xVzrhpS+17prC5CGm0/DDfkObB+qeJjaFBg4C7ODBVOjCwES6ZcILgICgJlV2GmvUmNCAaxo+5n7lnNIVRZCDbzJDv1WAAAAuRy6AABCeNNFET4N5jZnyrMq06SN+TNV5naZlAK9AlYzVCe5974/xPD9EOJhA1CfiMFWGI4qaZv5XBkpoeGIsHMcNzNJiVAXGBGAeYIYSRigLuGlAF+ZZBRi4UGCXuY+rBg0Plv3ZMZigMMyEDdWtJR82maGqByOM+U/fsilSaGlzkntK6rRpv/2gqAmC6brJaTMTM0toI0xZhlggrGRdKmXq/oYdebVBwmRaKEeGhth1n5leSiTBKTwu59Q8DAAMIuC5zHvR/8w8YtTMA9AgzR3xoAwaUBvMAIAKzAFQL4wNkuOMMoBkTOsbgUEphAGZ4sopmIEgQNQsBBgcQYkJQQFjREEaY1NZpXkvU8eKBGdbs237M+JqDTdf1SnLAAEMNuSTQ//uUZMONEv0YxxPdMlA0IvpNYeYdi0RlIG9wyQjIi+gplI2OAAFScCqAsvOpZRCVzFhq6o8vahTVxbRyY+uqkkZ6m4c37CDjPv6MQo4m1AzKmxzBGHAEZhi7o5uYjUX0GGSgIJt6gfMYSIAeGJyGGYYQuxlH6EGmSOiRBLGCwAuYK4RxoIjhgoGYxQmJQox23ASgQgZiQWOBIkKxiNy6xqVyePyuxTWu2t52tYzeMqiWdKK3jG45n6P7wAA2bmhhkGcPZGc+BlQicklxj4FoIEGBifiy1QANPTvAw+h5yqUkB6irN5CFy3LIbbCTDkv8t/3MqDmBQ84e5SGOA3gGARFjAID4gwSwvmM2/C7DFBgoA3es6nMH5BGDAQgH0wFwBmMO5FWAUmRGaQZmMoRGIKgmeF8GQQYmFQKFszF4FTIIEREABZZlSPsAUTMq1yUNIDF/V163+/WyH1rdHaDligLA6esNdp0DokzLCf4tv+3TZv9fTr3qUpLInvrAACZN//uUZOGNEwYYRhP9MlI1wuo9YMKDjNhhEi/7ZMESC+Vpvhh05AAAQk816ETALzJRQa/6JjMBBQNMoETDes8QHctJIWAAdOFYUp59QEKM4Zu+Bo99cH3GOWzf3r55NY5LlT5fyrrW2YP2WFGApEZBkWBiKYaWG9mqFJXRhGAJKYDGAHmBMA95hOI9CY4KB6GbAtmKYnGPQaHxDxmRAHAobwECRhgWgEBtrrX15l691AR1fyYtQKt/4u7putdts885w052f+j////+sAIElyy2gsoCQ4sUXmYuo50oZeqUaImEqRZgk7xj4nQq2Vwoa9rA5K2FCjdumk+cu0U0VytdqV2qMKTEWDFPhtUxCI8YMCkFRDIYWucwT8EIMAIGcwsQdzGakfMAIbIICdMDoC0wZQVDQfDrMIsBkaBDNgA1FCAcENAaMYWFQgGlkGPlR26rxPZKrVq//aL+fN1InfmcL1Tfu0e6v97lCn//////3+kwFgZTKQYlNwSngw4TKj5F//uUZO6OE+oYxBP9YlBGYtlKc2YrTFxjEg/1iQDgDCg1p5kn9NMmUO4wUgFjAqCPMRSY0zWwtDDIRKwaYEeRv3DmCxawswEAjE5GAwrKwOvNIRj0PXD6BcVS+MSRfpm/9T81KfOOBkybR///1/0///osYMSIkmOFDapkEI9yYOcFymPNqShgCIG+YBCBPGAugRZgoIvmYjYBHG8BGMlAwbRTBX2CpVLrJymDYmCj0EAZIhDFEiE1gPGK73SqelmGb/aeysDLq28QGDqj8Yl39JDEjM3NkqOM31TnTHeGtNij1Aw4AFTAKBMMCgGUxwGITAuCaMDlswWJTE5xOJqwxiOxYMBwhKwQYzAinn4nm/oerGAV4CET8/bd7u16UeS3R//////pBSoTBxx6UxUQUOMSqGKzBMQj4y7BPTMF6AgiYA2MA/AyzCBAy8SJ/DDAGiYIzCQPzjgbxIjQgAWHGBAkhwNPAgo0tZuEyKh8c7gtDbUvz+Mz45hNg31f/T/+//uURO0N03AYw4P+2TBdQviAe4xIC9xhEi/xiQFXjGJF7hkg392r///0AAAnJsAAAZh5y9GXRZGB4WHeRjiwINda8YoBKZSBWPBSsClKYaBeiM/7/pqtcmn9Fl/oX8o8vEM8JQ/azaYcStUvEdVu8IAweQn/MU7NYDA+Ug4wnsGvNslYsjCgwVkwMoBCEgdYwfIVOMYcB7THUOjE4NTAMrDkc7TB0EAgMWZGFAxGGIIBAFqAJpLhyoQSDEoIFE3Q2lWqzzVSQIFn0/U2ff9/+1/9P//+f7PSBSkAMCxlMCTvMvxOBQeH9pKmEIDBxCY+HGFGR4wWXMT4CwecSbJxyukIQYKwZH81C67TZlxaavdbXdRcHDRLW1RVoAwaQSzMhnH1zCUzzExJoBKODuRBTCmgKowNcBVMBaA0DA8CWAwGwFnNsnYwaBzIKFNz2hDRb4MCRhkgBAWL+FrraEfL4CnCvPlzm4173wqrVmzAkPFv/sQ29rH/9f/+2z/6gBJw//uUZNsMkwEVxRP9QkBFoyk6Z6YPTQRnDi/1KQEFC+Rp3aylAAACEJccCnMAwXcGgamiIRoYNQBtcAgIAQo1MGR4HiwdAATIkSNAl2oipguOWy4DFXVZTYNvlk79SiRSi7ZjCGAHwxPkzTMn8BDjGHwdI42sWCMMtARjAxAC0KAYBgWpHUYsqBchiCMTBIx0hj7BZJBUCQIouYnKoQWi6Sk+qmq4EhDEwHRNG8v1fUi5ACDkUrdGdnN+yz/v0f//9X73gW5UDFwmjDdDjDhdDCcTD5PATE0BhIBRGABh01RQF4GOV2CijUtIg2cwNJX+oqZMR6eJeRQ2c+w6E7UlclRAx9qqLmaTAHhIIwXAO4Mg3IvDDeAac1zobMMImAczAoQA4wHwBIMGbCkjELQHo4gZMHNwtBHavokVJGtzBwDIoMeCZU47kWHY2trX/zN3OYNKhZ9RGmRPL7PV//Z/+j9T+2ugAARjYAAADBVMjIsqDMsiTFwZzsT/DAoIwqBg//uUZOENkxoXw4v8SkBAotkHe4MrTChZDi/xCQEFDKQp3JkdUAYxBXYSdcaCAAKpoclICjcMONB6uJXEkD40D/xtqm7vsXWSahiSaspWGBsjlxhHJkQAT38wbMM+N3BSvzC+wLgwJoAiMAuApTBTxQ0xYUA8M9BMyOMDGp/Ortox6GzCQEZgYKFQ0H0R1LGcM1o86CF6kk244vjrKERd5EVJ/Z5QfR+qrZ3drvYzov6/215pcDA+IAMNcj0ykCuzDbC4MouZEwVgSjAkBTAgBDNFWgkzkvy5QIAYykGmGnphwwQDRfMMMxbixe3iwvu4dByPSnYggg+QIu/lAAALtYRMXaY+uezWESMMT8gs59rJDDABjAIHGAwgmK/PmoI4AYMUE4ECsMNSHVfMQGQORLd2o+z95br1b/0klqfUepAASDIHc17/6o1CaF0Uav9XXu+///6mgAAwUROjGcFjMQM0IwKAmTJjgEMHUJMhAQXIYPZDJjSgeByonyFQM/MY//uUZOuMkv4YxRP7MkBEIwj6d0ZHTNxXDi/xCQEfi+JJ7oyxBIM6i0DCQ4eE3nfpfLbft5KQfOrhVUsGyhQx7goLSlSYCeAWGFMEvJjoIdMYTQIvGPvqlZgBYHkQAKZeMwGIXvMEiAiBs4YMCYSIArAGer3Z+ISIYKZLIm5rWz9BZuiVi7coQIBIusAU8xf02dHo6jvUm+5Gz92NZ3O/r1BmAwnQOzHWHIMmsrkwwAyjZ2hHMEgHowKwHzBABBMI020wlwNjVAxZuZJSey8IjK2EGzI0U+3/gdw62Oic6cRQFUvLbf97PkrNJXf/96oAbULSYLSCnmLvBSpgtZfiYH+KWmPEsBxgdYLGYAgBKGAfgSpgYgmyYdAAgBh0giCB440ThpHp4wQEs8kctUNahzgOhk4n2z7JX8cuGCIOs01/X36fvciRWjt87dG6XWp17WM2X2MTNgAASsAABY3zAZwDmAFTNsiTfbWyMGcAcxGCIwdEMy8lkzaFwBA6heIR//uUZPAIkswRRsue6BhHgtiie2NJS/RZEs/oaQE2DCJZ7RkgCMjA9Wop9lxgECqLLxvwtFWDv1Mvx1Y3c1Mat+UrMqrS00YI5GZjGTvGZ5TEYeaABnrCWOYKoB5GNYdmAggGgBen0gvmHYECAAzBEDTKAbnSXc5QyBi7o9KYdW5Yys2z4GAJ4qbaLhI6wkhn/usVeoftmcchpX62u2bHJ69iaEQA+gwKBjzAfGPMLUtAwpAZjoSPrBw+JjsRjoKNxJ46wNQgriILmBQwPYNSpnLT00kkX+f2nZrrwTeQUIFIsrE4cFgG4s9VaVMCMDwzFKw5IxasRBMIuEjTe4VQwwocD1MDKAZjARQDAwYAVKMQUAvTeU4ywNRkOumVnNcVwYSIsifZ5IKhnDIUO3ACX4ZmedN4Ofc1E6ogpUG5QqE2tPNW6Klmh+cqm2XLxiGVUaqVWP0/a5stJwAYC45Zh1GQmLaiiYFAIx6ogtCRURhQAYoEAN0Qx2A4z0iMcAAY//uUZPaMsz8WRDP7MkBJAiipd90RTEw3Ek9/ogEKi2JB7gy1gmvTha+WxIKCC144/jhPyHo4UAIZZTYdU33/0atf/6u3///6P+MMF0EMzEP0ZszFg8xMHxDgjtgjuMIIaDEBCBMGIRgwUZwDB9GtNtSjOikhPj22IibkBreqACwhOtwVkc/uNLP37lSrvdZ6klBKLlj7Ul3KDRDQLlrskrs4udbl0KNWMPWvcuWT2Mi4tqZtLu8qly0eMALUzBjDpH2NIqc6vD/CYeUODswsCgxXiQ2JGNKwrA4wGEIy2DEICBnkSLnsTlkPzbn/r8v7vVgPtY5RZtCb2B6j+hVADASga0xEQVtMaBRADCkwHQ6BkXFMQFAiDDCBrMAYOoxr2kjTlCPMaFQHPMeRsmYNC3ZAoMSIQqagOsARgRQPDougLKDYUe4rite3xSpG00OdQf7WdEUWpfq97/sTVtdV9MoAAYRGIay00bVvcZEHMckLWpg/gMGDQRhAaGVIwHFo//uUZPmM04cXwxP7GkBMYXhxe7siDeRFCA/7ZEEPiCIFz3RAYJjuYYBiIZZiOkEzauKAmrRC5BjLt7/ndbrVA+ccJ27pn9P///0AEYdaHRlyduHkHmKbPxUZ0fCj8YgYB3mCmgOBgXwDIYRCA7mMHgSRvhpiRgMOm9liAM5DbGARKhcp8OflZygsbZhtsKCcDqQLn9JyittAHmbacW9LO1jlTDss+9d2bU9qVy2TsRckdSZWAwsLY3pVM2g00xPUM2iIejB8BtMOhgxAGTE/PPmmB8oGBIRMinYFAt4YUg6zSS4U87/Ms/3/26VOXOBFd2z/T/3/+v/3//tVCgw7DVjXliCPjpGM2IymjcOWaswnMEcMDMAYwgCjMDdF3zDcQOo4RHATMYwig8OQ9LdKlApQhHJKKJdri4osGwrYtRKbHob1D0kXte7S73KGX6A7VXK//pa9CUiE1/6VxaUAAMPEKMfZPNOKSMUWCMmWXEwUwiAAAiYBYCpgglCmEyDE//uUZO8M0xELwov+0RBGQgiCd90QDRw1CC9/QoEgCCIJ33BAXJDGxghYmlHiKKz5DIJYtFRTeWtZayz+eCzDrKrK3ev//pMCIAVTCyTVsw69AyMQQDOTTEIiwwRIHNMEkHIhC9MFh90wkAkjMCUEiQUPTgA4aGHcXiYCEpBM8dOCJZr6t7eGOWrQVWxhBQum96xVjllmn7Upsm2tHvozD4sOTNvFRzmxhTF4rdQnRlrBWHgFSj7zDN6jYAzj6cJTMBoTT3weBAPY4BUicYMBXZh6AGAYkyQASjCK09GXuCWigp1YTXr3v/PfN9ytjDyWpX7cRR3/92n8x/V9qP1/b/YxSnvMLcH00Zn/TZRwBMJAoYweZfvEYJwYIjKDBLM2PROnAyLUFv2WCwKu9P8EAHubKMoclvSgEA7rlxARTVMPQxjXf0a78gmzFu0Xfob/RUjXl/aIlaK2AAAxDPIxsno2KmswLMY3KIRTCYA0MJgUcCBkBvjaFGg+om9Qs63f//uUZPAM0woMQovf2KBFQfiCd9oUDgBDCA/7ZEEviGGB32hQchw072o9lfL6g4scHS5kuoHL//t////0f//0xcQQgIOMWGOdDIbibQwysTpNfLlYDB/wdUwtA3jB7D9MboGo1VAOTXQoyQtMbHDpXFnSdKA8CAiSNPKbMP0eMRYDMNUbmdhJrvXfnUuXLCtKd3W/jvX7SR7W5R7mtc+35d4m/Bax+f/jaX7ilFm7vYW/hykzHVWafvkgDAUkwvxi/HLGGqFWdWLnBiIgamKAUYDABliBC5hD3SgGtNHoJfOmAGoZiF2hpAo465jig5V3eIln7v9z/Zf///+n7zvrAABbv77GAXTGJT2MpFEgw+hdjy8qxMT4GQ/YwcoZY9B0QlioEUFTvEIcduHadLaNZ17lGgds0OclzSb2Sly99jqP+m+u+f0faO2r9Nn/79PAGE5CmOlIm2MGmigfHU4cGYegFxi8EhgMMS1A0oGUqk/UqTEAHepocCFqkoozhHoR//uUZOyM0qwMQ4vf6IBDwXiCd9wQDxwzBi/7ZEkXheHF7mCIYsSitbrp1zf/s////u6f+/9v+wTJVMYZg0ZoJx7mtxnWYNZHpurpqEYYuBOmFsBgYJIFhgeKtGBKEOEA5EwBA4AETDQKqPfDLAlRyuvSy4Im4nDzja0JF/tWmU+7r+VvVV/F9a83H+7eVdb3Z/V8PjgH0bGuf3nOffdRr/5q01slPZYk5Q7A9gL+giBPWZz+vk988OYMQswuQBAhUC4IYj5GXjL2viyAMU3tprZCAwrCtSWVkTptnq16L/Uz1ej/7v1//9X9z//MAuCMTDZjAUxF4wcMMjBjDn5A0Ew8QB+MDxAPTAkAIwwUsTuMN9AXTFSAsqOHR1rmmg7jwDoTIp6mCJmlsWIoWKIyIRVbrfrKZt1eq7u5lN1kPffIzZ2q3s7TOXtIh9DSuxO5HM7UVHdWRO12q6LMiotc0zK0+UaRUEDx6sVJAsMSssNh+8M+jzPMpiwxGATzPQYD//uUZO6Ign8LxcvZ4QBEYXiBd9wQDqAvDM9/wgj7BeJVv2xAGBkNwH+44GF/BCHiok/MASkkB4zFqeJSN62Cc5KyVD6vV6dvTZkuv//V0U4p/6U5MPUUY1Uo3D2JIkNJwbw5X043MLzAuDAsgD0EgHBgi4IYYgWAMGoUmHAA1mfXgpmxKAyAStWG+z8mKhgRAFjQWMiEc0VWI6DGMjrQsJbVjEM2mXFRomhZ76iVFLJ1z1qWSUBXNveaXkQisqaYaeLvMi1MuwACgZ2lQYWUyYUoMb47fJhYglGHCJKDGYmIfRKEsOcsDBq4ItMM5ytWs777naWUJXX7P///+///3U3UzArImM4HFI4msAzMvPbN68XojCfgXcyjJYxCCczx3k8LIwwwAdxgwGTOIDVCWhvImg8jfyuUXvx7+9dq1BS8sAhOxRdIAMrNLSRvePvWpR5MVULsCupWfWn1ThVOkqRkd5wato0hPSgDUrSfYq4AIMJKSSNopIumK2pzBkYq//uUZPiM0/pZwgv7KjBEgXhgd9sQDnwvCC9/QoDoBeIF32xAumyVsGBwEoclUyGSHOluxWCXWtz2F+qDbZlTWDSCVCqE9Of76fX/Yj/Ur/7Lupsr1vQYpwl5rYq9m/pvUYfqLBqDrnqYQ+DYGA2AQ5gGoBoYCWKmmBOgWRrhqY+CAQgOBQ10M5iTAm2j3ZReEI8VhRQaLgwBAyXeD4aFgKKcYaKMMhMw1+9sV0AAypww02nOJQhCC7NaK7FJRJrpoZcEFk1FZFL2AJRDM4kHOS3WMmGMME6dEwEAZgaE40YKmKJiXquqEOKmeN6WSj7+6LcQp4nCgdc1cU6uv/uV//o/9v+hFGFjA1CRMozAc4n3CzIcMnMRUa8jAtgUEkAgjAAQGEwJwQtMI0AaB0K3IQlTvuFA+YKowrK1cFgieoEFQmGkQabLHzzpd97g2ggRSITR1Axr+owgNj6KkTMlgQgXMxk+eZWhkfPNNlS4q8sxh1tq0AMAxsMhIQMc6xMB//uUZO2MA3gQQgvf6IBA4TkNb7oRDnQvCC9/YoDxBiHF33BA2bNYGTgwiwaTCAUAoRC0bAzUQBsoZEYBAcKjdI8VitYzDUjZziz/b/10/6v/1df/9nySAGGuK8bBiaBo7RMmLOXkaFtCjmDmAsRgJoD2CQAIwSAJdCCC0wcAGg8iAQmwij/PoqpFr1ucteGQeDQ1ATApmetKIOumX9o69L5hKBOanKZYkNnd6nMewyQFSLo0kJK59uiBXUhp14u1UGxyiiUgEADRhVi7GN0OIYGIhhvSNSmE4CEYGBpyGQPY2Gq6oHoEIFyzjMAVkHvqqyp6/4rjQw13u////q///9X6PQpAjAWwXAwQU26MJVOaDBdwW02SNi8MLHBMzIgeDFMOzSa8DygYTFcCgwLQCGxhWKKYzizSx2bzvA48irPqtLnZ8E9LB50tWGm3ZM4ivYLOe4+y62ucYzMmYycYVFLqSyAiNWadYqjHpDZ9l9MAAASzGGAzSsiDAwsTqPT4//uUZOuM03oLQpPf0KA+YWhxd9wQDcQxBi9/YoD6i6IJ7ZSgMN8CkywGAxOaFFDY6TBbqLrZPepsZVnrLl/1MTOCLMzX1//+uv/d1f9f9H41qzBkCpNOMu0wELxzNoDFN9iRVTC+ANwwMUA/MBOAWjAXhNwwOgCjNK0ABUu2eFMjW1CNoeyClDjECBySUHzqxAcUPIse9kaZaMS0lDyihpZpRUu06RfPGBVd9bR6I+TlWqIkGMVSEn34EusENsVYE3KEIJmcTvmDU+gYoDsiEZFh5R5iMMChHzEgeWSdGhBxY5NTKNSa9zd9gZ9E1Kf///1U6d//6+3/91UhzA1gmswK05HMokAaDFPwoQ5nEe0AQ3eYiABpgrgTGCCssZL4LoYAWzBJcwoAHEmKSy7jqy7gCNseUq2OnV7XgyjTdUvBC7NW/87dwy/7x+/utPu51GTnkdKHyafxXIwv9zTjeLZtK2wSBevgcf/qfFPDv8kAG6mqAoLM0UAK6wzSUDcX//uUZOwM818Vwgv9EVA84Yhxd9sQDjApCC9/QoDfheHB32xAJ1MJsAoHEKVxDLBDu/VPBCUu7v2QqeYtsu0YlAQfc5rer1U6f9P/vo/vY5qOv/9dFXRmGGBWaiwKRz20PGeUVmcEQR9GGNAQ4Q6ZkEDhofOB7SG5gUAi8ywDgqHbkVaRRqvuzje/zRnAuVTV5hnN95K5ezt33L9Cy2tO58n/ff75+g3/L5fV9G99g21FdhjuYqtu+LJqm3O6nl35X5AfJ+6mlpAOY7kRsFAmikaa9CIBg+ANhhZACZdsNxopenkDpHnaLnjCwtWgc3RmGvd6KLuv0r7P5D/xXX/3/+4AAAvq/swDwtDCZSeMTFlEwORoD6Vk1MV0GQxsC1LzNr7PQiQyBVNk5TvAcvDla3kTruaQiNAaA0IbKRkBqffFrqSAomITyxdcVYHxG2kWDOM3s2/TH1IRULPsStlNLAGEAsmcafnCDWmZKHGv2/qYN4KBhga6RiM2Bw4ta7S4//uUZPCMw6kXQYv+EVJBASimc9sQDfQxCC9/ogjxBGKJz2hATDgLGjsRuyQFEJUt5+5AtuSv///1Zv/T///2/9/SYGIAMmJlgnhlcRTEYbOKhm00PEBhIwLaYCmBDGAJASZgYYuCYQiBoGaD4FAgQDnJFSfLTrDP5PKtNZa5nCM59iQkJX8nv3//uVwh7OzelkLTxtTmZXmK+PuayAw36mH1b9K+Z10lPqNxuf7WkhtESlnZedH/NVRL7r2CgNMSINMqbKMMk/MjqdAdBpC4sQh474mKhy7ZCVQAwIFilavEKK9kB1HjC0tAlvfr/mPVRbpt3f//R9+5PdT9SklBoFmYRIK6mQMiVRhpApcZUK6qmALgtxgAQEKQABZgCQsSYMkBFG2HhDIwBwGTXEjVyYn7F1RKKbSQ8iPRCucj6Z5yKRU/55G8JyNKf3+flSCWptfD9flyrdR17QOc11D9qsBCotd0K3J/9LSLv/IZ5P/x+7oW2UFECjwzoWjnt9Mu//uUZO2I0vMKRMvcyRA+gThxd9sQD0irBA/saMkBBWGB32xAMwyxGXTA2A6AoCrgklSZEe2D26EwVJ+fBVdBYoyY0mp69Gn/3f1/+zo/t0fo/+tUjMqiPNToww4qTMGVEeTIgWXIwS0FpMOiWMQR3M4L5PFAuFgfQGFvzIEGGT4X5J9v9Y1OEZsx3HXnnHpnjhxc1cLki4uLoZn2NF4kONduYLu7TIsNnHXkutirMFR60HU0NMIDAFagZJhhm4Heg0avgJtguOGEaCKZwcCi5orYTsfOMQSnpLbHKe0J6ECj3VRjTVX7blM6vt7TCHf2f61f//nvk8vVAAAKBDATAG8waURoMUsLijA9RDo1XRmJMHYBYDHEeTBIQDO5UD34azMliqBCwU9BxtYXYlNN3us7nHPaiW52Zp0AnnI07CcPqMs3f/s+0KU3f2at37O7OGGe5mSqVL8L7q/+mP6WN0b+t6Nv3/M09f+P59CABUGmMzIaH6xoZdHFUoyYYADw//uUZO+Ow7oswYv6GjI6wTiSc9sQDLAzCE5/oED+hOHFz2hAChgQAIlwa5Z5BbVAgrS75ESdw2lwudEhpaF/6v///37v70/2W/+796QDWaVRwAHMCpCRzFSQqUwXAITNYhOwjB1wJ0x6DABDsZJb4bHDCYagEGAiFQMMJgpgqvTTNGFkO0pSeRWlzvL0iGx2DSbC8PpOxZ4lQQYLhlBMMELFGYHd2i0INUbfrNOPv3GJmXYQDNh5IdtW2RNMgKIWG5heXivpMUj04TR9gcL+PGCBMAQAcctvRQ0X7pv7KOAFaEwQGqMidwobV7+j/s/3d33L9O3///S66hVjhgKwmqY3YUNmCcgWRyXRb6YbgASGGyBSYMgThgxryGMGFmZWWGCBIcBEZkRBTyz0timdJQhUGPmIFSfDCv0PzjUTbU8uK109DryDN676N/zzv99tJt8h9BqPu4/AylrDGXKzUkJb2wX+22/DTcv02sw1ungBUYmTGia8jBg8cnJ4QUHD//uUZPGIw58MQcP90RI74Shxc9oQDfRnCy/0ZQD3hOIJz2xAMkyMBgQCyAKR25Sluaq1n9x696kMBgTPhiNgO1P/b+v/////u2EkYBcAumCAA5xhDJsQYO6EEHJOi3Zh0oEMYYwHpgVg8GG6hgZy4FZf1CcMAKmCgB0oLW2zCezoQ40t1zK/SKZtxUralDUiyB96vG8j2fz9mWtIXgz8jf0VSO7/9mdMyv7Avk7Q9rfUlhvtq75eln3B/X02X17P0GPp8c08y9PDuMAMYK44D0rzCTAmMoBC4IE3BtvLZPGUabPfrdMTWbUaQGBVr3lmIR//f3f9Kvd//u/7P/qVMnT8NTLyMeHJHzD2Ayk4JRDcMMoAyzNsQDHwGDTUuz+sOhoUVLxAChiMGa4ZPi4T34ZZXpLaUTlbWR+YfhmdF9mnqYHd9HsGth23//5XJa6rVY1w+S/t9mv9NtvfrLVVv6ephHP7gZxX/ezp3Jum+2SASGEaH0YaBDYWElNtRzgw//uUZPCM86ILQQP+2RI2YShxc9sQD1j3BC/4ZUjnhOHBz2hAeAUzHjkhTMlw3NLZ2VIVz47tHPGQtzFTaLdOS7Jyz/9//+z6KO13+tUZVMgBc6DZjGGgpEwqMJUND3QHzBYwL4xkDkoC8xxv82xGYwsBUBAczkeLN18KWDQqMUIhq2RpI4fmGOTW91raEvNJWVZgCHb1LU1wTPODLFxVtUclSiQCFrVlE2WPIWOGrMnJRyb2ghuquwQCmUspzG4ZPNGNuhuYCIEiMsGDP4s86silMe7apGxyqKU3dud/q/cj0dnsPdSvd9X9/T31qhABdmA/hYZi4J48YVUJTmlTR7BgpQPCYCeBYCAC5MA+HOTBFgNo2iEs8FlZwMSKLlRmCd3Luc9rB+KGBAQrT+k4Lq/KYRsGYD1oHP6cih27jAjY5/lmzhg++l+VDvWiHStuWZLmTIWaQUU6eef/yMxHRWv54/iB8+Kcla4RR80io8nAQQBjOTdPEg0zdIzIZgoM//uUZO6MA4MLwQO/6BI44Xhge0MmDPwlCk5/oEDkA+LZv2RIAsFMKCAhCQpNgIkhucia9e/9TYMkUVJRQlTL1Mp6Uabf7KNn3N6N35j30IGavbUERgGoAQYKwE2mH5mBZg0gcsYe04gmAhAsRgDYC+FwDswNQQ9MMSAPCIqTCwAQO0rX5L7NUSSA2ZXiwjjf3/iXPNvKPyZf59tpodQ/OJ6T7E/+HUJqU0petPvnmUuXOe/PxAu0+Yr84QuoxurDqL77m/9M3xmjWu3LLKruMDGYz5IzAKOM8BOcwSAHi47yCCCTVJZL+PeSEV73Um3CZb+lNVr3dFm1W3tUj9sn7Hf/9f32dFUhjAHAB4wHEJaMZ2EyDC6wxUzyla6MFpBBzHwbDFccTQoLTzwBxYYhIEQcARjSAaZ0Zo6gxWiGLsL6+Un51zG9uLQYU07guj6UlXudT2mT2tX53/u38Py+6bCPSoenO7T+6I39Oee6zV/+iLBR3c3/a78ehIBKExum//uUZPcKxBFMwAP6GkI/AThhc9sQDwETBK/oaIjsA6JJz2hIDLHkMon821U7jChAhASgDAxI4RnHXlldrkBjARuoJtmdyAfCYx9f//7f+vVV//aFUVYGQAEwG0DWMRVEtDCIgg40Uw4JMHAAjjGkNzB4DDGibjbQYTA8EkTUywYDkjZwqpjDsm7jSpv4bN0YMqX3Z3fIfvGYHv3n6a3e31CvKPaR35Na8s32Vfy0/e5DIPz6tP/fE7vy/3/U3/vPfEExATTasfNHCY30C0TCuAKDnZEAHKAKktKjscZLlMFySB0wBZskNMuvMt0t/+ir//Sz2f//QhUAAAmRBULAEBgFYVaYMgRamCjgzJrqJQgYS2A5mQQPBwvGEH3CEWwwShoAVpGJwHvwBggNhijzQEdZyeHKyTL2O8S6ecI/Oz2nCK9n3+WTnIf60uEUyn0ued+5eUzzyzyWbF6E3/nWyfpnnkQyoLUXdNp79MRZPnIACAEw+jTpzLNViA5CwtQ4//uUZOqI054awYv9GUI0YOhxc9oQjag/Cs/0pMjbg+HFz2hAXoeSR4KEUYiO/c51KO048oOIa4f0VjyofaBfZ7s/Zb66uc2vU36lf//jdv0lUARMEGBKjFHihAwPcBCOPOBpzDTAD4wNcArMB+AaDA/xLwwwMB/LBYtSDRx7TqfUtypccrf0eWJlIUR22bEdOwnLsIiOHT7FKf6dThcOxVf8k8j8fzWZkVOzB78DLMLN+4coOEKrafo1/LviDueMWqv2fRjoF3mulGUQFAzDA5Na54yoYTc0NKMJABcOXI0GJrB3OapY+7HO/d4VYi0G6UPOFCoehwn7en7/9ZKnQe/uq//b7fm/QkBMAPABDAVAgwxgkDaMGCBzDZpSjEwgsCAMdgtMAw0M20EO9QQNgks8KImDU8NTCSfnhv633VrAM4wdDFq3gRyBQZjQM14qlsVTGrCji21rgC8g9FbDYw2FFOirOlhhpYz2GClw6XQSDBEJHnpqqXG7RjSgIWF4//uUZPIIw7xTwkv9GTI84Phhc9sQDyy/Ag/oaQj7hOHJz2hA/V00xDBRFF0k6iITj16IW9OJT3M2CNZtb811+zoX/9qNP+z6r/p6evpBKrUwKIwxsZZjUGBmB2JCcLDQxhQAomLhgkAme/57oojjD0YFh2Q5ctDmhCIEoS0X62vbdiRdRRuLJPKDbxtr2NdEGpbVzi7tCTzHmgw1iakIHYpWilD2JOvBcBAK65QWAguyPIwMfNNhqeMCAHVWgEENgpVlF+p652xTFM6Grrb069lemq/R2/1/5FzOp7P6v9MwIwEPMCpAWzDjjnIwh0XsNbphqzCTQeowHICpMAfAJDAbRvEwNsDSNmLzKwYwIGODMWz3qJsPQ0EgS9J5AoSoQJEg54ykvABgVePXaFBdB5UVQZm5kP2ghUNFrmCnI1BoJECxHCRJZRmT5oWFT3MjhoPS65s4MqHqJKwQGyKyxkrFihm1S6fNYAEnoYlVUDiCBY05yjWscMkPgwAm9TAG//uUZOmIA2ANQYv9yRA0QPiiY6wGC2glFY17YGDdg6NlrshMBAFQC0jAaECnMx2D6Vaz1vJDTLCaCCAXNqYJ68f0++j4xstTR6HqFpFTLU+h0rS535n/W3aQ5kcdG0qOYreItmEFBqphdSpAYCwCBkg2GBoomP3Nm8goJlsoHQHMGwgidz71j7NzO0BhjnJOW9f1ZHT335W08I/3a269WvubyzfJuOt/3rx1YIpq+un8sTQdWM7W15dqcG4NiqLL7bJ5fc1PymHGKYS1phdzmeyz4YLIH5gBhdcwGsM4Q/SV2gWcPu2HRtEgODsMttQ/r1L/o56MLP936N+ijTQvt///aigAsMBBBCDGehhUwhUOSM18Z+zBYAR4wrFkDAEaCQefAAKYAgAkWnQPHasyX5XP5b5P6xurGT6/WViuu9LUyMj0MHn/gpU+kUPf6eh0gTQ6RIxFaUVvi+5X/E5KJ9HdHS/U2koX++0X2ayjTwOktGZ9YcjJLdDaxCEKOhhA//uUZP4M5H9UP4P7GiJFQOhhZ54ADawvBi5/oEjwhKGBz2hAcR6AmWNUpKUwagJgMTWIDDo+BlErmIDYhynnGlbbhhcgjb3/f/svs5nX/+pP/1VmAJADZgLIOIYPOTFGA9hH5p7KZYYQqBumOgkGJIMmeU1HWAmnyAGKgUw4aWJRG1hfxqV+wRzK49wxAthoSB4a/Ka0UM14Oz1z+uD2Wktn1CfCmTf153kns9nYNtfKWfafHmd2PTUw/djb+D/f73bx7dhpAVfYLJh4akBDs1mypjBpAFDlFJmJYPqwuxXga+5iUoZHLC0ChObW4YB7fu2WWei3+j7//nv7/9tdMZjgxVbTD1SBswnAFINigNVTCVgJgwJ8AvMBCAQDAOhBQwOYCLN+ACAorny01e9bu5fj+Fy2lpajucUs9aK9eD/VCdMRnXXP28Vf/LfqPce3+2hMo7bmJO905rxv/5F7vC0lhPsNO3yDbWXHSTN7nl0wCqxgcAGfp6YSBZtfBaiw//uUZOyPw8E7wIP9GWI0QOhxb9oQDjQvBA/3JEjmg+IJv2RAiJQnT4LGRCS+0pyeRhZY2qWk3tDwzybNCfcyjT6O7/X/6LtfT/1BaGUTANgCEwGsCzMU6A9DCtQCc1zcRaAQhONJCYWgsYQ8Qa1h2UAcvRooQTj2386EiYikIfKkLs/COOI62qo1I3aR8zPP2xfBi96eZ0Y4+Tqx8BkZykR/vsujHE+tlncyOlnxPncs/JsV8zIvtpzRTW33qnf9+g+mJdXAABPdTCEFsMGUG43PydTChASCEqVwzuGqd2thH9fqvzWf3vdQTucapordYlWz9/2d9Or8d+3t+n5C1f0KFgIMwOQE4MYnJJDDOATM4QwlyMMeAhSZvzIALjSOsj58ITBIAlgyEGDAsN6YLAASwCBOCLKr7W0Hp1T+diMmww2dX6528d9BWW/NVPQ1Puj06b86Wfab5xPOsU6IpYzGZNqan0BMnnSLmRFn7hDT0OA39tvUaugOqe6ArSAA//uUZO6I04kMQQOfyDI2QOhxc9oQD21/Bs/0ZQjuhiGBj2gIA1S3KqYwohONQTPlM+In4w+AdCptQagp/cxznk3XLipcRY5Yu7vd17/7rbUlGDn+j8Z+z/7fVAqgDxgDYCuYEePVmBHgyRplJiqYOiBJGKgTlADGUK6nH4hGEAGlpkGTD8DH/lG487ni0qj6p/s62PKlU2MhkRz0OzKxr7EejE5NXsrWZUe7obuiPvRfZvTsbtV3bTe3SuRmtu793cpAmG2SN5IWFkAeQRHB5Hqa3ZGgurGYH4FgABd4wdQ/ppsPUsCcy5chJ7qUshxwBBqzdt/0f/0e6n/9/7/t43+2ACX4kBOLaM5JEAxDR+zwU4QMQAJcwHwMAABqYJZYJhxgnGcCqZOU7gm1prNt7gogqSFpdKJUQKWl7Gn4xhtAsqyWRqDgo0VDMeFxcZeWCSSyLAXePNvXFjQWALlGVxbetrporMhBdjqgAACGWZJoAi4wHJgshzEER4HAI0nl//uUZO0Og+NaQAP9GTI4QOipb7gSDe1lBi/0RQDfBKGFv2RAGx2amFV5qZTe94wYabxrVhch+l7B/q3T9VXf/fVHt2Wfi7N937NghALzAcgHgxpUPSMJWEGDI/WkMwCkE+MAEAawuAOmAYCgZgywDkdg400ADApm/nbEF8yzwnKn92rkI86gOwVBBEkqGV9CieRHkq7ZcHZXf2hzZINY2szDK37fC26abg6+Znw5SkzMVeonIX5GaWv2GTQnPNaf6qPLGfQ+Rzw7pBywrLBZKVm08ZlkAY6CKJgMAQIJ4cJJo8ckF/kKrQEWaL1PGukSA+eV7E/0botv/Vbrue2hq9K3//zX2TBpGMCzUwowdPMEBDOTG6U/IwOcERMLhsMLxdMso/OdgaFgjTMTrARPNXvdsTvcvs4ZNkv/VQGIhs5Zehy7ayq0+WM/irTwKnqYa1faNT+Dr73J35NKv54s3fP/Lzpdpf5+1+i8vt03Xn8w93Pnh0kFR9BNJbT3fsjD//uUZO0Ig0QJQiteyDA8IOiJc9oQEAl/AA/kaQjsA6IJv2hA0FQcAmOAER9iL2M5YSKue50VkopWmhrX+n9HT/b+3/2e7VR6vvsrVQGTAUA9MA8NgyIF9jB9JiPRr18xHAxjA/A9AACxhDBtGQ4BuY4i2V8ngVJr+E0RiYcLL0ZaSFlu/plnXkOZoTytabZXMi9pxdJT41T872/kdkTJXnCiUS8N7lzLIjhdUEcOmT0ck+qcJ+b3yB7Xz7glgI6bj34LeDD4MKDhfA0pWNR4wcwaACAxNTQQMBqsSu3IzpwRUhFppwueIizXDI7QRDitO1mjX///9//Tu9P01J1KMANAEjAMgE0xIUKLMDUBxTT5zRgwZUB7McAqAwxGPmYGswrgYWhYCRCAxgwEMETda+KI3HBSlZTWdf9yKkNbnyS3U4/w/zmEk1lWmq8fZkw/+8/RBznb/viWaXadT6v0SyS8n+bZ//DmSfHpd8/MbnUIA3QAg8wzQTD4fNm8YgME//uUZOsMw2YMQQOf6BI0QOiBb7kQDwVTBk9kaIjtA+HFv2RAXGjirgZiEisLsW3vBlUWeE8w1YHDygaUKvqp//9213t0/2jde+v3K/9H2lQFwAgwBEBPMTED+waBCGywD1JEJomEeAqYIQLBgioGGIGDuYCIChZ1HIaC2XFO24iCVnhO1Y3Bfb5NxGS6eea516XbULc9mTvvy1CJ0K8KnGyI8janTKL3KO1P5rvE7sjXnzMyMprqnctS42SZzSZdpkaNicBad70/GWmemFEE0IwLTZKFaCBASI0lYFbwYriVVQA53vHoYMcARyhy2DbBoS7Kn+/1b/obs/9dNKX+zaUSdo/xJm4xYpMNyjCMRYgwLUEINYrDqTCbwCoxkBUwLDoyBnI4jA1YVfRAAphADD+5fjz8e3sNCNy3t9NGCJSR3p79bqgDhlDHyPufrJM4Bsy61unfkxb5qvzCu46srR93mt85hcLJ+e9/uZfN9t+WEa6AgEXf3VKU3DktCowO//uUZO6J04sWwQP9GUI6gOhhc9oQD01vAq/4ZQj2BeGF7RSQz2bBQpI4uEKoK345cs1ud1gila6bGXUUp/bf9vz7Pb/Ff/RT+q4ITAMwEwwDgDjMGLGXTBSAik1nAu6MIoAMzIEGjEQCDNEizq0IBYKW3EQAGFwNt5anKAPGCCZzLIhV3po28TjeyGZ3g7TdZBB5nZz0e+hUN8UMJ6CUhm1B+qpecJe/QlhLTj1Al19PtE4tsFjbY7hTfAOncLBDDeUoACEosqtxUATKqkwh1PFNKMKATQefkKij43OZSOq12lm8Ex5axb9kLv8d93++zdMGbPr09dX7nHf2JjAPAEMwHMBaMP0D5DBxwrQ0SlCVMDDAtjGoQQMExjvjJtuNRhcCoCA5posWcDgChtyFC0Nt8s96yFKezFz+gttHOEU8rfcwfAhi14XMa2Mk6vjP9WMtoEETm9wO4/oY9OO08mpT/8hzvGLxa9ax4oj+zKPCokAiGJdYyysMZrDH5TbM//uUZOqKA2EMQQN/6BIy4Oi5a7gQDyh1Aq/0ZQjmA6IZvuRIAMCxBC9QhphyZ1Z6lmCYGNDnOWSIii7u7urYto9lrZrztGmv5ZuiWYlTDlKv2f0If1X6YFGZMQcYWZaI6BiTDvmzZnwYBgZJgKgbDgFoAKFMFYDpALARUOZNP7Wxr8/er8ot77TyogHVNmDSR5Uc02hpza8CnWgKtazptZVAy1zC7z78cbMhClVjSQZAGTHJ5+ouBFHTu8QGdAwFNnNwRSmJym4YAIFoiAJ7iCuGEJXYyipgvc90gkVujsymv0eu72kdGp9/t3bL+L//6LOlltdAQYAKArmEfDmJgS4XsYdEshmBNgpRguJ4JBEyg005gCxElFssoYkAuySfsUqMgU00IMxhTTpmsZrLSmbf0kmz+YwYs1Uzg5lH7PomVdcxDzvLoTKbEXiD+sUZM5wklMylyTOrG7e917+xHmeTrYVU/Onvr3U8oE+jUwJSVQY1w1AkMZqiKpgUAMFx//uUZO+Iw6skwIP9GTJA4Ohhb9oSDIAvCK17AMDmg6GFv2hA3UAWbgxUXC+gO+1bLz6L3vdSkqt4WStp6+ptX1IS7/p376E1v1fee/6kovs5CBDAKAJMEEJQyDFJjE3H3Oq34gwXwgTFIOjDMNzLIEzjAARoMkgUxgEO7bY5TFqqIZ0WUqU8/rt1pW5e5lPfvS/Cpl96rdlamR/L9Lf6pkZe6fGNipEWTK2WYWh59fBd+A//+fP/UP7vAtcWSM/TNpNbnRUSYxmeRk5JoJlyGCmACHAKbloCuqR2K9BKOFWKwWJKNvA6gg8UCUtRkFd9r7v9iV/+3/b6f3WKBFZRICYwTAIzNzF5McwZY/nsVTHCAoMVQhMFgKMYIyNghTMDwMUBT3GAUl6nGg8Eplxq59T2OPzK3kbq/KnPEkVCG+bwszPytenk6G7Tj2HkXFXhZuSzEidsj/maQPCI1YjcijuDB9Phw51LecM34TNYVyhudYPDGCdLCKEPDgcw+U0Q//uUZPOMw8xiwAP9GUA/AXhhb9QSDj0HBC90ZQjgA6HFr2RAo0FhaQgLRC9tByYSRlV3UhYq11aEtWYskEsOa+v+z/9aP/v9f/+tBQUAKGAjgTphoAiCYOqCZmp1kZRhUIDWY0AkGCkYQcECRPCA6QNXkYiAO/FfU2Kqo2bGWx8akiVGxYvrV0JZTciNL3pwjOMp1oo2sqv5xLnySH1unf/5NzlJCLzjmXrLf5KxQ5Wn25QzSJmTauVHSG14TtmTJCMWj0IRvWif2jOBgBbHlYZkwxlALnEEjr28Pt/aogipa8kwUIkAuE4qyY0/7/rpZ//c9Cfo/7P8XgAQlelAEywACcYD5fRg3ABHZ0CeYfQFwGNZhQFGO7UbhCasjosyBwfnhJqW+PlLnFEU9EIOGFOJfBhnvAL0aJ6F5ZHSPppkxVYelfdsln1CqMx5cMiGqfTLgIE/6teSwhf6kZzpHzwNqHueYPrEWwyFuy/1KwBVSVT/JeHaYa0Z20pQOEFS//uUZPAMA9NewRPdGTIwYOiCa9kSDzV/Ai/0ZQjVg+KZnuRAT2CORFO4TPSSCPecU80KxdfZ36Pt/5RN/2dHXt29/eiv7gCpEkrpAAC0yJzEzA4DkP2dkEwxwMDJgLAoIM6pA92BAUBVhkPQCDqEQ4QoCrTaGlgmu35zPIq8onuxd0zekiMR1Ye8d9dqxGVPedh5GRH5yXMihkR8TRGB+4k/OpkOexehzet6l3Ur3PqF3l3/Nv98OD3QIVIzNDqlxnKJkYR0jIJhOBCxYaamRBUE1IYyi1+aDQoKNHUbGf7/9Eo5306s181or//V/0UbhCAHGAPgKJhsALKYF6ELmghGgxgjQHaYmhsYPAiZJwmbjiEBglYk8gsPrUb9mtnhS50VzIL9OJoxLumvlUN5wxEOmTLayBKLN85BoZtauRkuP7m2wXaPL4F7+REZ0SCAX6UbwZnCivKEWZq9KAEmE5CeqamHUZvwV2UHFx4pnneSMADaWpbSjZgswWnmwVVG//uUZPEAg6g9Q0vcGTozALimZ7gQDn15Bs9wZMDTA6JlrphQCwDsiiIrcaVj+VPVFeskxrQsgihqW9vsqfSLZW0ds+v9uSpJez79P3fSwZgEAVjgTRjOoOGBsSAcmu6ZidhoGAMBqy4wISxTBFBEPARYSwh9TLiJzzxLUuTBel7wM3RRb4TVz7mvaWlree6lZXbMjz3Q5yEd1r+pxD6VLN0bPkhwlOdZuw8sz+ka07zjFea25GVxItIWXp5tgagtp3WMm1YTo0THcDAznQsBiy4gOh/AA61Ems4lZRGbGaTxG4WnvR7/9X2UKrR5b1f0+rWqARSuuu7MAEBAwBATzDDJjMEQVEw+oljBGBDBAqAIhMRWM1sEG5vowswSBKdurkEsyaTnO8Pmcmh7BnhMXxbMyXanv9Lx6/Mq2mtQtfuRS/EQjhG0F6nJB+oakWfllT9EvHtspl/89C7Dm+ZOvCWUz8FHoUBAALQNNJIWbRWZeWbD0gYPgOWoS/EVx6FP//uUZPaMhBdSwIv9GWI4AOiWa7gSDn17BC9gaEjBg+HFrqRQh85Xe7Sja8Z3kH9P9Pv693/yv/q0flK7Lu2tyzBQHTDsXDx5mDO+RDha+jMSgHYwCQK0vjCIElByDqYzO3sKAfHsn8MN/dyo8unqxscVKskiETA8MKCPpzbFW0jeXEZ/ttDpcY3MyNXPwbHdzbkqmaiPPHS8nTzXJ4v6W3tEYsipwkpyIY6FWMIqxDUrL8XhGRGkdBPCAWAENXBJVBgDPGLKR5RXph0CCKbkJyj+bmdyv4q5BFFYzLNIYFa1HsJTCv3d+cqbou/H26EIr7BbwC+lFX1V795zAGAWMgcpIwThPzqnoeMVkH8xIHgUKzNlAOtB0OESXKVRgEEv9WnWVpuX6PxZEaF5rL7pEK83p/yama9O60vkbLM7kJuFaiJ6+tHRvPnFLjRXmzRQkxFaSdKs5Dd3WPVYyyMcXDn2Pu77cZEWbiUps7oqfPWWGBQro0N+FrEWZ/DOe7Yl//uUZPSAA5teQ0vcGTA0YOiZa7gSD6GDAi74Y8jyg+HVvuBIOpQ9ooPEIuRFd23+3+ux7I72dtH9eb+vorALBgDgGGAgDqYGiI5hVBdH30/uYngQRgpgLmA0BIYCRNxg6AkmcymLlnsT3jCq2qiIZ7FFYzmzFXX7C39DpfGJbSb2Z/l34suCRyvFwZXnEVUizhOewMk1PnpCuRQzzRATyxrlEfhklMU5Un3WHqzcd0U2pm5JoGOvrq4xgJU3U7jNkJpMAvhwTJQOwQl+Z7DVLlIPNGygmRvC7hohABxA0kOI7G62v77epP6n0f+ub/2+rb+OtHoAIMgoYPA+YjjUcycYbEg4aSGGSCwScHAcJgDYA0YA6FcGCQgE6bLTHpDAGiBXw92igvVSfMvISzwiWqgOGOb5HmIMyQYnc7x26blaVy5SLk0yzXJHQ7I9jHsbrDqHSdS8ypoZpJxnNv7xEJZSGIp1bZVZPhlTD9Q3VbJXF6AQCJqqmhlRYwNgAlDo//uUZPGJw2YvQYvcGTIzwPiCa7gSD4l3BQ9gaEjrg+GFr2RAU1wgWlYXeJZItiy62XbU73jEOK2q0v1N9GgLZjQWv7f7vR/+r7uoSFFMBcAQeCIMqMMQxbgwz9aScMV4G0MWRioEGd5MC6OpZAadwhBtwTpoW7LIZ18i3b/hF45zNZmhg7a6TY4xH/zSTIIlOn6nstc9tP2fQi3y/PdP4qa/+cmrEX6kWYuj/FdCoG9XHkcJjgK9hlpRRsgAX/a0kaaXCZp+dcPoBhlWtAqGRWCcTo6gylzn08fdKzlV6F2e+iz7ae/v+dZ/oZq6rO/7UR4AZMA5ATzCNBIcwUEGSNEBLMTCDwJYyAJS3xoeun+x0YaA6AZHUxyBofll25+q+p/DOR87vykrffI8z3aZIXxCRY0IiFMjrzPKS1H6pWMQ6ZXqMW2lkNYT5ytShoeRMrc7IxIczjqynXM4DNQwGygNKw02JCgr6OfVEBC901P64w26ZeR1/vlrnJphkZEa//uUZPOIA+xaQLO/GMI0QKipa7gQDiUzBE9wZMjUA6IVrphQW2sbFVXSneRCb5Rj9n+3V9akfd1JXtqd/W6zYBf63P6AtzC4KhiCJuDI/Z4OctGJ4DKYQhYYBBmYi2uZuigAghUGSpMLgEZqKARbeDDBnYwBLSNqrn0ttLSg2Jp7kdofOIUM3I7G8zTfQsdCnrvJDlMiddjvlFUluS3KGjGvSN+Ldi2NVUkNvs7b7nBvlp7sWuUlMeDz8yJQQUkjT5Gz4GAtmTWGA0D19NlJa2dVeaqtVe9zJ08Lio0YlSK+vZ9TUturf/0MVijUJUwfQli0fTT/1fIqVOYFACZllk2mH4SIaj/65g6BIGBQWg0DzCK9zPgOgcDKkkJgWBWMU+F3erO6K5auquQnhq0yyzhkjkxkhJahsVVieZYMj8oIVPB6lf0cToZZNQkwxqe6E0tJLKagn+MR41BNwzyfzSfYzSIZELIkhPD9xdIiiLejmgXtJLKDcMgWdMEYDXTX//uUZPWLA9ZPwAP8GWI0wOimZ5gSDwl3AK90ZNjug6HJruRITAwGFM5YQZkRlFf5IjS1rY6JGsMmRqrw4JGC93UoUQoj+b/75FVn2/qqR7271/QtVWPlUAgwEQRTIGHLMNcck0T8CjDJCvMGDQwiMTMlFO7AJEt7GnhxGg8qS04Jhk0zMoZtvqv/OPS+E5Ull0/qEsKSqMmYQvKuZnsELvMFh6ixncUTLkYJhqTVlq0Kv/+umExHFK8kySUi5GO0i45fSuSh8IxKbYPMAgQKyLLZeY8OjX1OFYsMDwBQUXegJJggH5aHc5aK4ucgMVbQOQPT0ra3/3EPR+3fsb0dWiHLf+/zNQoA+BApjDhQ6MK4hI7ztszDEDUMhjUwIBjOTUPvDEwCAl8sxMRAaiHwxax0RLE4IkyvLdr9TsN7akQ4pFZt10SUxRRH2dRZd/ndQtBmv64PdCEHESnOn5tahdfS3pkMmuZUoRdZbMzBmhSEz1aUJFmhgmpQ/TwkANUs//uUZPGMA+RdQAPdGWA7oOhhb7kSDtlvBC9wZMjmA+IlnphQzbgQ7SjUUOWFVFg8XvDiSg8BIZUE9N7fuowumL9zTE/V7/875zbmP+n+R28+2/alzwuAMFgVzFbKfLAip4HvkGFqByZABxQKjH3oNjCkODyvU9jAgHmHBZm9HP0irFMs0LGJjhvZAzFfFmy7ISJqpWkvxJtb5N70i5u/ELhtnxQUOd+vyqRdBrI8+FemZxZmtpWP6+fGzmjJf2h7PZ9DKZDVDtzjAzMYwMzPXy4IiPVY+YpMs2j52fqjHuqMNx73gCjNXadW+aX939CPRv69n8Xv0u/2qgAQipqqtrXMXwAkwHQMjpeL5MPQAMIKZgoIGD8sZfD5cJYV+isJycmoR5TblS4JzXUnX2hQ+x5tdTyZc5Lirn6+sz+Q0b57n5mjo5Ekh0eZkefvqbRT+MbmRFxJ545zr2Z1FYjZCSMaUG61DONtHw9hPMAtLIMd0MQNPwjOJiNSyaYKhYNA//uUZOsMg7ZcwAPcGTIzAgiWZ6IUDlV7BC9wZMDLA6HFruRAHNYqAJr49qrZBle9obDi0que1rqR33f/94C//bqWn93/ci7UIBgBAA2FQHgwgUOkMBtA7DTzw3Ewj0A4MUgPMBQuMdYeN6QHWFZkQACYKAk+uH75lzss/dUlMMbgkHlNTUvGS1E4zC0IyNjM1Ncp1BVOQ6lAE3VCqUw5McZNadCtsavhqRqZJh+z4RXN1zNYCTw9rQiUKKJvMIzHvTDZyZCpkJJj5zx3Y0SEZpjkpxWIfcxaAhiQpa0IZFfaXLCWpFzAqeijAZbXqvQlGvk+LWlmttiZMWlWzd71OivfmdzJKY+Rp91Z1i9LqjARAYMBoFEwNysTDuE/PXpyoxOAIzIYEBw8M6ls8eCB4AyNeBhAByb+YZ/+E7r9EsM+kXSpVCYyLnYp+RrDzsMy3uGXKnq+wv1kbIrn+fnCnd5ezyfLm6nULWlUL/vlO67SkRUyMv/kR6V7mmfO8MOO//uUZPEAw5BWQkvcGTI34hhha6IWELGA/i/0ZYkDg6FFruBANIiQAjXPsn6aRySxzhKQjAoCV3RVG8iBqfQeq51qWY0aPRYSUxCvzHzn9RVOrY3fdX9Ox9//7t7BhFEzJPejDyCyMMEVI5AY1zCFBSMCQBNJIwMRnTDVAqAwCqYU6PAfz6WPkCPh3Y9vkMvZDdbJRXCNOuRF+mOjHNqN+0yyt19zPy27grGMr33ufOParHPZ3bDw9LTbpemXJsvyZdh7lbeZvebFgtwvSjmynk7KTxJcEdAz3oswFAxnskGQfTOGpSY8OvRtGDuWpQPXuytGv2odGfR/fzH9fs6qv6OjXQAgAYSGqJh7hzGBsPSbOGnRgsBVmAKBsOgYmAAUaYMgHhd14kpQoAdDokxUS4bU+IjGMyqE2KiKhGPbdXV2MkpNs4dM1RTnHqRioc77EYhcUC1xVhNtO8jR1jh8dp7yATqjaV0BtXeciQIefcmwuAfnuaNHkDdanAKADhKq//uUZOaMg55gwIPcGWI1wOh1a6YUDkF3BEx4YUjQg+HVrphQmzbmE0mbunFgDVVGligZoGV8IZ6o9D+ciMhdImljb9tFdky11X0tumE/RyimITpdtl6dqNbdr3wKb21F5SQBQwdAYTBWHsMmDWkwEgngKJU9zKXtO0ApqLQ1hAEQYEHw/mFDRKC+7/T3xTNYh67FCSzCf0SURFTpeQKT4c28/eO2pjldTI0PrRCU9XqepqVyYvKZ7GVL03C58vk3YnCXM0OOzKDU6dKKGSsHhbdWXGFgclgUDky7zCwAljw4KbK6WL+ovpZWdY75WbHjY59sM9HqnrFu2Zfdsd01PTfci0p1fdd0U+x5LtVBoQgHmC+AWYJY2pxF4XGGeEOYsFxhsQkUEA9hGg8s1UwKI8KvX/w53c5zCAwdtr7WMcueReEnU6VeseM3g+8SFVI9S473PhJQRaPtced+5A6G9PSHHpPnFc7ltfKm8XPpmHJKvzJck0MkI2SEX9ORx6vA//uUZOyLs74vwCseKFJAoghVa6cWDjFlAA9wZMjuiCFB3AiYGlwglrvEtQzLM8zj4xLAdKxl5dwoDEHHHCXTZTdGao+MK32EmLxzI+tvLOf6a0S/p0RV9mLue+Z5tPnit3VEcx7kBf9UhgYA1mCUHccwjtphyAjGJwaAAIYsqBtoTltnBeNF6fI4ZLBPYnwGpfJyZOUM81KsxdfNGLmTc5MvB9v9a0jPyPNMj9oXfIz0fIpn59O39iPLq0jz+v/b6J5XWVOEL270cG9DnlNV1MlzemiKcAh5giYKFxM91CQGkDQGVAVsz0Ud33V7czDDzDEGVIrUt9qU1b71/37f+j6u7/o96gACkqaqmWpnGC2HbnnEabkYXICIkB4XSBArwNAPTOhM0LAK0ipWTYX+bW1SJbCII+4xam8HjmbsmuZ1sdZpFKq5wG0NmP5+Zw1YguRak7n54xLiNif0JF2Q+HpJeqhFnl0MxN1t1Qub7F6Z0w9Jo2W6H/2KveZlYC6P//uUZOeM06ZewAPcGWI/wghRa6UUDU1ZBC9wZMjWCiGFnpRQsRREhaRZeYkDBk4uQwPevIKpENb7IipKXOchttW9bbPH8km9H7bl67Kq7idLv1E++wW2BCyqqlvgMA6YMoHZhVAYnoUAkEEchyLMOBIyPpDh4ZW06K8gMI4tz9/bvdnv1AejEM5lNnhM7C4pL5kiOLa0oKXa6k1c8M4WB1SZWnldzPtGprrUDR41IoDfpqosnbkIhBF+0J0co5ECQTOv6liA31FydCeItJQWDfanZTxxKWl0gFKDEhO6FaMMABV9CBGCREC8Vw3OlyOfz8GWtWwGyT2RTqFvi3n7vs81F3rX6Y8wJzL9KbvYRIL6VQCBKKiRIKBjRD82mWOT89swyQJgEB6gKMDkEAHEBJ0u0z0v9XmhGwX7ZmqFPdP0+FkppnMzlyqyZgmmiZRYnXPI1KUvLzfp01pOdvIz5q+8IqxXbeqT5n/0vVAQUboGoeRUq5yEWDF0sAJAAgBR//uUZOsIg5haQkteGMI6IXhQZ6UUD7FrAy9wZYj1CCGVnoxQmAjHDC/RyLAZhWADOYk25MD1LaYMZ6K2P2Ld2bV0fY36tqv716kfp+MevRm0ysL3/T0+1IWlkUuUWhMCEIwwVBBTiCbiML4EUw2CAUCTHsVNwhQvy/UJIiDAt/HLHmHzn6M4isuZp9CVMOMPSMjDgjWeepgzMw7VSQ6f5RqUorDUjuWDw0g0Iy8vQX602NYZqcL/Mo7SOwIqSSLaUvoh+lSJ9UrseZRCOnsYMy8RoRoCgxFasqekuaVBObaySKL7TJCNZy0F9Fupu3UZureRT1+23/dRoZW2XSf/7P/kHf/SAQJJlFaS9QFGACDiYCYhRpfulmCiCEYICaxwTbTBoWL8tOhgt/0MJD2WCfZfZC8nI4ZLBUkKKn91BTkIi0uTYbP982M17u5J68B54I0xJsKyOk8JTpzpkedTMjylh0yRfe1+pluOZDWErvS1OkWJTvwTjxHlbgAAQLHD//uUZOUIg1ZKwbN+GMA2wXhlZ6UWD5GBBS9wZYjDiCJxzAiILPhAgQ+GBkTggAHxqEoNxgS5QLvsrd/b9AVbrMV76/p/q/dr/b10aNNFSE0XpfPbVgEFwACQBcwSAWjARGlMR62owGQgRALACKTHXZOAB5pcML7MFgKXp2wIGA6kDd93TDEhFEJiMilFJjRZrIZVTZLU3M/JkaSiqdaAlNwimXBZi4uIJmLvxCYpdCIhTnM469azquqxHi0a0aC1PjCySEcLM7k6B3t4OxKkgsAFqajoYMVMzmv8MEgNrD7gU0FkTaWq3XLyFabr7Kb996j/TQt/m//6lM9CUO5CypnYh1KaAANAVIZWSMAGGBWAIYGAkRo6QkmDMCwYDBtIY4QoeFXalc6TCCiu7z1hYznv+HK+/766KZo8pKDpw+7EayP96rAzmXhACXEBAbqzHHMuzSDn625oZXmWeud2oJlU9tqal+VgdEj0juELNtmmbgiUVpA5q7sH4gEITOdE//uUZOuAo7FewcvcGTI1woh4Z6IUD3ltAC9wZMjPg6HhnkhIGJgYHPUNmDgBKXw4w0jDczuV/cNiNmLLJZCUqAL9uMxtBJfdhVn1oe9u5yBZNVR/FGzOro5YwmqzHZshAAaIFwCzAGA3MFcQs4ZX3jCzBTMSBIBB8ydADhAPFgkv1W4LgGmEzixZWOqjbSLCqRUClNusfB+mgpKwuxwUgwJ6pT+MNPPDUAO3mS4/bny4Bzju6HiFvQE+y4RrZ6j/EmIC8dr07kvnEemle1cC3mEEtgYzePLzv1UhIW1IPOA6QOaVzRMntSVTOf32S9ru2iK2atCkK0dEUSubkJRvaP6+b2a1Maj+h/RV7N50VAQAQYKgQhyJJXmGAA4YlAJgQEAy4GNBChKazFw4FUdn8cu4cov85TPZqsm7kRAiJFpqXMtp5sTYHo6PTNZZkmbtXVoU9ilrnlS7m5laqGRX05YZHqX6Nz3ZfKsdfQmLypseZlAiFPoMjipwhHe1UufI//uUZOuIg69VwUvcGWJAIPhVZ7gSDiyRAk9wZMjnBiFFjsxI2mH4nkQYkQ4q1uoShFBtNVQO57Oiv16F326Eet/ZtT4ZZWWz22wxWK2Vi9vn6WPmKEogHqd29VztoxDUOEjBSgHlZ8wknDRUQ8ECYA4BhgOkMGHKAyuJ+HxDAQKL+OQIT0gbOIM9aIUs0RoyV0ev0jgfKIU4Il6PZizhEJpMJSna8QUL6ii2X2Urax8JVQjGMl9KePm0ilGz2bMtTVsgm9ByG/kdjHTnEI1JVlCA1FnBjliMigtLRilQCg49L8WEJtZcSgYnmtA/VNm6dB23vMMsQ0H3b36BRdvV6B3RV036v9j9r/fsbV6KoooBAAF4jAgEwU3NuhzqQMuMPQBUaBaMBAAAwSwug4jNtKFqiT9bndoBm9QuUyQjIiq/wn43WPO3bpZ1jSm6dTbvC31szpSa3JyVflDwA8Yb8T8OP7/6YOe/iTiG1e7SWfrHP/uLJLSk3PREwAAgQCNR//uUZOiMg5NWQQvcGWI84phQY6cWDxGC/g34YwjiimHZjohQEvIFgnOGmGCApadJlhitKYN2vQVvfaP/nFXa+yj3z1/qqv10ym/HNf6/2293f9VnsWADKSzVKoCW6AQEhgbhJGwKgCYO4DQGEWVGPuJ0YEXxa83EMLpelyc6PorG2/O97S9j30Qivg9KaF5kJapm5KeZHqa6rYjHqcpP0NbiI7usC4tjh4L0dMLoiR5pTsHc59sT3z4X1ytZM5h1tW3iRIRGjMBMqEYsOa60tk7M0MgFEpGpGdKbp69R1prdOPPH0ftvf0/KpV3L6Uf/3Ee/RQPWwCPZrqPrEmSqqoSgYAKYE4DxgZB8msE10YLQIZhEMAwHmD6OZTCydMPNJBwYh0UurwOz50mIKX7mEJ0NxkzwamzqZmelR1cgxFTeQ2lwZoHhfKZkWUIJ+h6FrWhzyTV7SLKOHPG8yp74JXQj7Z5MFOUmd9yhktIGDQWqTRVGGq9rcFNAAACMJqq6//uUZOYAg1I2wKt+GMI3IqhodwUiDbDVCS9sZMjkiCHZwwkIrR2XkFzFEwWSvNYJN9m2RpqQt/JRXt2N/r77DHO/9wn8UQny/sS+xSu71gABAwAMAIVBxiQ8mDcoZpdepgOg/BQBtL8wFCATCoAgEgAWLLkCgAd6/qvvLHsgwxwAZTUnLQWeCJHCAKPvVNj/D4QLi3dVNxxLJ10IgZjMTCmelnTNCpEVHjuHcebZ2IcSTKMRk8FlGzBtKcmdJCZwaezIcL4RF2u2jIdbxl5O+zn0BEMKq1ZIoaMCg19u0Ejt0hI1bg5yg3V9TdU1/xriRRiIt7nbdn2fT+Ae3xapCPo1K/+c1QAQDGU/dXRJsZACxgCPJq32xgOC4MAFuzGURuJI71tKK/NaeJ57Ss+7nbdDjrsqIryavV0ux5DuiPY1T27y9zaL6Kkq1u8tyUdkonclUdTorjmnIFe8JMASjSySmj21lcWhoAAkRCQTCnR0BvTtd0DAu4j/q2lAEHZR//uUZPAAg+tdQTPcGTIxgLisY48QEGlw/w54Y8jPCiHlzBSIHZk29dW/gxhHbQ/u+AOi1b7037P/7fXqpu3+tiYAACMC8EkwihRDk2qPMNYEwxaDyyhlhaHZhGWadFsYCDl7dAzSFASdIKlvNZP5rJLt0X0Zu4ZrutGNTZ81++p63yTkbQPa9tffWbmVrzORmEtyr01zfV/hea8dBLu2KNb9p+9fYu5T6Kc6dPffeNPznGCZj/WRLvaaLLK6OvT6e5mxiKoXMoQIwivZxY4AQfSgYsLG3liiiTIZUC9LbdOo0BV/aXq07yHSMOjX7Vf8khPi7O3a67N3IrRov6VqAAKFACQZankGAUjQU5sypADQm5MWIDjAvo2YFWdFYkkTomOm+KvQhE8K10y8c9mrlDn2f/wQZkv9Jnid3M93/TT1JxDWpCOAhYTpSuOcpplVt+7rNYWXlO6bWcnw3OU78aGXPzGXc6Zm2zuS2RJWlANHepRDwxrgg8YB5fr8mPfM//uUZOsAgxRHQ+O6ETAzAoh5Y4IUEPWG/A9wxMjdCCHljghQbQ761oMxdd+Gah5yza1K1PuYqh1aJycSwT9swtFVvCtKmVV2RJpX+9aAkIkUW1MBECgwVAxTduNNMLQBsMA6BQBhgTiJGASAC1p/XaJgDrUtaGba3+nNphQzP3Tbyvv5mExHu50TXhbG/MM7maFTM0tO5kTJa7nws7iEddlIn45ZHubGHyiIe5Qpe+mfXhmZ+5dKXO+e9ITDnErJ45HJq9hyj2prq0UvwAtObDAiAL3TiTzzmxHd+K219dDOnaUb7t138bZ15O5/u+nrVPN/43uHVQAAi992WVEAUweo8RIUwpApMV4gCEBMH0VtVZzEjLV1b2eGDeABc2ZckBahR46nvYwkLIGsOzTIpuRE0BWlXSy0MoVlt+5DnPbYSvVacGhAdWAIQKKsrSx5O8hHhtmoA4BQDUMMlJTtqZfztrPgrnq1DEdaLxHorlZNjv8nb6p3ysV+k/l7MW7V//uUZO6IA1tZQUvbGTI/IghAdSJCDwVdAK8YbYjCBiKY/ghQdn/SUgIe6mApQ/2fFOua17rj+M9td3+teFuos+zny/vrLGyhpuqZBVF84eUgwIA1kUAiE43IFSB3SRkaCtRa0mujIivalmGqshHOTUMK2gVt0DnRgq5iH3JWxgoKHWH0JRLmYUUu88adFxZwkvLTSmtW2w8vUrZIAQ2Cfire+jpt4hYdtgGL4l89EFzVTbpMK6ZbCQqFz4sVS2n6XY/NF6T5H0pmZPhZkZSefMuskhvIdJ2x8prOUsz/o/gzmIy7GISs0YAvmRgCslwp1Vy89rH2tpUBjzqGFglADgYbQTRHJguAxwWam0LgMj314+bU/TX7wque01BDZxxfxaZdEdj5+cPcvnf/OWU9TL3LOw+IKPPoO/V47+LZLXmO3rqfi2YhDlehI/xH4gCASUwUvsYDY0pmERgA8coCsMWJRW1VdjZ8tN9Yyl9FFOeVFMJPz1RTThrDjoRB3Pwg//uURPKIAosPwsNdEMBZAqhJcwImSmxlCK7gpEF6IiBBxY0xO/3fPVl3IpQNdw7hLjl6LtkAmHT8t5etUTdjENv7ajTLn3Ux9PhpO5MIC+ASHYE0JD15rxVBTQWosG0RT3U2BKKi0SqOnmpeIgF3FTK/tE9DZxc6S3cqfpbf2/efN9DoGPYKnzZjwx7d/po/2nRKkpVrvz4afqZt+4XGaPHhq1KrYhxAJsxJUGdyiVlUVp8FoAPTah3pkUmTWIiqhcVWcJnyLoLrBxrLUoMWKsFRaVbNtM7DDNR5dtrc8tfQ8aQAqXzyUkCB8UF0qgKf/VlTUBGCDTfXU2lNOKB0iGBXiRHZnZIYljOuGUIMRcMagQsoTbEVRMvJJdbZPKNci7ucQqx5MzYWNS3KO8yIlJsqXJTlJqXMuqfrJenI9dsvdU+ZfnLqqKPXpXUX5P3cXQCkwOOh2YiH7ZokFysPGPvOLgs484/LKetM8xo6mw69hm1HyKGewfMp+QCZkhEd//uUZPIIgq8lwakcGDJZwpgld0MmSrhDAgfxAokvCmGk/hRQ4ucK7ak7xZHs9VkI1iZrFzRUwqGSmvTznDKUyTrQFEgaRpWrS4UBqaoVqZXIs+SmlKCaBBoghrrSAIjdpDqMWETOJjyFS9snXSlWmyuWauxT4srPDq0+P2pQK4V1p2+lrE0WWudSu5ruoULLQRT6PBWZG07aNKwKFywt0UIzpUF5UBEdYlnmdulAZOVG6+6zMjlFl1x/4u2aby+F9unaFKsyf+mfB5oP4atnbHvP6mEfvtN+76vnpafGF+4liLMm/xqnoB0CiIcGRu2gkgOYRee/G1VdrboVfniP1AZaI7a6qGm9jaWIqG7sRZiyllKq9F93lKtn2VvmRfTk3MebTPzyt9FNGLYjBMhnzZjNSP+Ue60y9MmO+fDJJa5mGb1gkqXM42VfUAACTNVT+m4jgCNRR1JCN1BFgbSBLAvwGXNspEfcfhP0pPJSLTuyUuf1c+N6p8PPNKfdkth6//uURPcAgwhaQauFGnJl6OgAcMNoRvgXFSDuIGFTiWDVtIkJeefvgsuVqp8lJTLZk+nt+ly9PxMgpbywSDwrXXUZJLnBQuw/mE6lbBASETe9oDAe/EvTsc97aBmpr5pMwmcu3FnMCIkhGVF9oI0O9hTmsHxLiidrZ3G37vCJ5T/+5SmbXSj3vXRsT2v+jXd9taNl3WM1Go7+sr7Lk/AysfRGohJ9p0PAaFTutYDgu6kaJCoX5EzrIpUid1VaZwuA2mpT0FyGK/BCDueffkm5zbu1OANj69Lr0pbyOpfwR9PX7rJ0dLbif/lXfyuclsP3x7DJia6q9rk9dIfPYjUBBCdsN8j4c4gY8FHnkDclvmOUCceO2nBFe2aYLOu6JSFC/mtfr7ZZX9s7Xfy+5qa5/XaBrlmlp8hVCi/VeZcIrSNSZjTCmV5t0kMqrsGyofffkXJ9/dDt7p7Cf+84AAQgDanUTwAAD5TdFhQzdyAr4NJ1t5QnEtD5pnENnpcP1mO///uUZPsPgyVXwAOIG3JbCUhZcwMiCxxlAg4saQlrjOCVxI0JWM5kr4972/+9d88cm/kTkJhbek3rHJH9jW9f+9TMtY/zmMbT3ObGRp9eQz+Lut+euSuZ/AAIUD3C4FUCPnaEWpD2u1dWob8FoTW179suQKHgvbBy4doqzkg2cpuz5rsnkU6kPrmVl6fOlyHpI18/45aavhJqa0jOv3OtNnbu5S4yRBAOhWN4XUMbF8tYB7JpAMZ5cCER+EaFAqc2mCpCN1LrUD5vczsGpPnzP4+ZTLjaTmZia5Q8sfDbaaZv/y1//EWv1v/FIr0dmfvTTM/XqwTbbw5+fDS2V5FdO+dQdyT789bzuszqtUq7gsEn7DIsAxalY21JVYCvu6owtd0uqjkVlOSFPKeKRAzbwqmcSUm07g8s1X6hGrwlqGOf/XBZShXjP15i2phF+WpKvl2CsX9kQ77Ys6r47l7Rf+5Dynf0EkWaqyss6R5OSEBEmRWRVJEoSdBXYr4duc6+//uUZO8Aou1CQKuIGmJYopgocyMmS3E5BwDsYMlakGCVzAyZzH6GR/f9UKi3NOBP/s2V7Ccc5L+/kvP/MTo94n7elVmz2M9TTve936SFYj/ux9E50xgkGmspf9E3WWSOhj+m1dHLQOjeqI1wuj5Poj6WUOE/DsMecV0gst1FBBX2JX90Bb9yd59pvr+4Y6KorXgzebL1Cv0vhTHUKXeqi/v3937mq0L133SAAEgslmmS1EYMOerlCqW05IE5UUzAWjFaSDUnXUvIMJMoNzE7m1hR3lBilqii0yRcOzkzB0esKLD7MtXGAKEZdbRU6yaRYx0Rgg0Walp24jWgWte5K3jqADAAg9YsITbNbJ2bmMFwecQ7lo30dUyec/Sw3+ghQgLJKISLlI2KtUQ8isdpaeFX3SfQyLMefJtCjZ8jOMEUi94EPLFTAaIHxiEIjA6yVTKShAJTh0uT1gqPiIDowPqhndcM7MVNnXLJLK6kozLLmpYI9drIo75i7soxEhwi//uUZOiLAs8twINlGnJSwPhWcwMiSdgnBK0wRElcj+Dhwo0oIdCOxD5UDyXk+Oc1XQZ+Hl9Jf7f7bNbtNZ892qPfbztzpkPODqvafzeIBBgVn8GtqKG5rEK/s/izWDZ1zIJvke6Dbuiq8BxzsQMZwGMVeFlxO8znzXIm9snMmM4lTt4adItLPuRnoTyDOxxZHu7Q4hF5kLvMrvDJi7dnlzpWH/Ac6nwJhE0/kppmSLnFA8ZHlqVEToFVEmUQRATvRzgjSM+4kzIr28RiOn3I983bbP3tPcyLHE3X/O7w+chwGSm8EKDmt5z/fa1WOMsI7SC7zPRRToig+i6rtL/zchgGlTVLTF7CnaCmmcCgNPpKcJ0wpojYR71FkkF8i0BkmeZGFuXCeL4M3YqRKrKiucctPrn1NEosiEL5RXOpmdy/BisHtL1QoDmGIiW3Zywu857AxsERzJ53TffU7NKMz37VAZj+q8CioKabfK7llskBKW/v4rikTbhxMJAjI27F//uUZO0A8m4YwcMhGlBZ48gQcWNMS+VhBsyUacloGOBBwo0hG/mB/ODQ3qj7ui3W6XIVbXsVGYrnTQt9mWW/KpmTqjvL5WQlX63e7oO8DNW1pgkOFKllrQzLIBRx+8H2hwDxXyv8UdkzwMEFFhGq4CvfHFiUdcdoepw5dV+/c+vNuWF2c4RWTk3YvnZmZ8558Onvn588QtYvx3at8OXoMMoJsq8hr4Fzr+wOvRO0E/3d2s6R9kBB5V2LAD9xgZBFX5cuRf6dmKYvt+AxTSuWUO8axQlnOqW6XzZkUlSvVHdCOejp9Jxzu1zP4H/VuSc/o3X+Rqt5aCCT4UpY3b33blnYHW5jvYwI3PJVAACBEOdfF9j3i3zO4Khy5karptmoISWZ3gck9Ft4apyncsKxEMyXFb/nJInrSeWd7w5XZK/OHRVvLVUeRN9X/295Dxl+jfEj5NLC/q5oUlBPyXMyU/oD12/tdr52qQq+c7LlxLK3UPMuA4cyajzptQKR1O6y//uUZOqAgtgrQANxGdJUybg1bCJuCujxBq0gaYlgmOBBsZWpnblH+mtsufyYCgkY83lH25KI4MxI/1/f/qecSznO+IV/ZB59ZP3Y5+ru/fMfJrL3+5JL7fcZQo6eJdDtb2ytWoNDhWc+cKA64hsDG7TvocPSr/cqs2sgSfjpgV50E3mCHi1caU4mt6i79gesUFL0G87QiV8AW3xEp+/d/v7EXEOg2dPGy6bh9QBAtWarJQX2lADJ7KS7HmsHKlLoc7vOqkVes0KW8WliLc64xtXdWkZbtq60f2Kh1yC117J0d0eLFjFR/Kf6JPtxRrJjjOAOoi46zFqm/S9v5hbd+UcA1QQABu5KlZDdxZq7psqtHeBFbhZtLC2tv3QgjpvSJxJ3cfbTtpmin7Tp2KcL+/mbwypZL3f9W8LSNCK3Moae450zdjP51dSs1MEiuvnQlaO3o5tynGtze/k6uY53mdmwqAEKPeUNSKVHfn6op2+nbPDGGA8+lpWycRnon3jW//uUZOiIgq8awUNLGTJTQ4g1bGVMSoB/Ag0UaUlYnCBRs5UJl9SFYLzBHxL/c5IWrVKGXN1eHbeO5lmbNCUxvEGdKJnySwtjRvIvcHbDjKmS/djmb7bX/IzCv5htK819lP03ZMyATW6FsYUqles4YajZBd7pZlH7MkoWOW5Z47WilZAnZ2xnJDZQ6GkPffQ8dWma7Kbw4TOiIug69AnFjqEyQRaZ4xZqFDqg2UMAJCp8odsQAQAGC2kdTuUnFe0U9OXNkocLuRkGtfGd/TK7p2yWKqzlsksaSV5mQFEOdlY6UemkVkJFa38iul8l4DWAAAW8pYnYaiu0ynqDg5aslDoSNxvKfQfE0cg3UbD68rk9e7D7vKdQ1E80vN2OnktMdzQp9vveySq3P+/YQdkv7f3Xlv3uMLiLnI2M3SmZOKK36wmGimlqM9Rp+5F0zG5iRJaN1iDmxmxpE854XrLnMNQU9WBEH8IuYehugiJVCDJaF0lWC+vRHRUz84Z+hxxl//uUZOyDAv1cQCtIGnJeiogoD2MGSdh1BKyUSYDqg6EUPTAIU26WftW9UW50pfQavbc5Fqmp/Js+531XR2Wou5DPotq3Mz7NrZljv5ffTWPd3wAFSQm7yPyynae7Aax/w03c4p517FwlDPf3cAQiJm+iQgWUmuxKZDTX0SlZkyuJVvus8E57mUUuAkIWsdHJOGDWIzyEjtllt/Q/mkN5iuGy2tBqYs9bA6e9Puf3RnEFzQ8JTkQMShB8zIjUS/tIJEr1jKuGMWAEEUiKzO5AZj6U5FC2NithqdXosO/T1P7P8d51ORUrob09fHmdESIaVsM4RvLIu7VAEU1lZbeMlpB+mEX9Ps1KiYDu+ES2oPb6Il0JCtekyBp2scHBCTgKQvUYlM4Z03ZiuF3N4tUigyCxfvRvwJpxTCmyMgjSaFXVWfE5bueJfQjhoFimClzY94UuGbQilCNu6E/hAy643BJBHzQAmsq1Ld5uMHBjIHYQlqyV9vkv3Ps7baRjyJHE//uUZPaPA9liPqtJMnBRCPgQbWUmTQmK/g0ga8jBg6HkHJQIXE6j6ppMXaa1rAbA4lIdNLPgU+KBaOecXkp1aaupZ9BKG61UCjbq3oAihAABjnSPscsa+e/X230ZLgllZVSgcPzpAjqoNTJpEji8tG8FFB061yNva5ZzoTwVMqFCPvU4UOk2ZmIm2syIiGuRob7tPBO0p/ARoaFd8zUEsKPmgIa1lNGhPnYPR1AFeFm9Mk+24AABnnhFjw0Gz2OwTB3FK91NzUL8SkJhqf1nm3XXhiLkIRwcy3I8JmUlZ9GTsjkyJq9Ka1uZ2qaW7Hz2dmfdkl1ih7Tva8q/asbQfSUgPP+Be3V4xxh0yucpminlFLbVDXtq9DFg6AjTDs7JDSQZWMzyCjlIDZtk5Sk1NChRI1ydFLJC52mdm9q6P1R1dRTkcMjIohEpy3hO+pnuZPbtrzu4/CM6YgdtXDUX9x+lGNy8v5nltABNG0szOyZdA0AkqpMxaVTZ9aPPtR+H//uUZPIAA11dwUsoGmJGoqhpZOMoDMFdAK0kaQlcoyBVpAk5opEcpKq5dUjbL6vWg6yyCj90jKrgMkS4KZUQuOkQ48gtbmZJa1Dn3EjyxSIYUQuhoccpK0Qx57O+s9kNwUAcfatc1bmNQ2vxMmYqQiOG6CPBn+yk7C9scTIT5wkS1yPpm0PCA7S1FF87w8AcUutY6sLNZKjdP4OBLJTa3f2ljqsfv5qEDCL749bllh3Iak2CAAP1ecI44R5smDh74kZZqGZ4HSbONLxuHj3whnpR7Q5fqP8QjqqWS5uxHGKmTeDyz3JY680yIvy9VyxIpy3XLS0DnB0+GhacMkHIotBU5In4BaAE0JeiBICANfjWbGakUusohOzjw9Di96Ce9bZxmZkfDaso0gBcG6PRsK65uU4Y//ilyt4Idr9CnKG5WpPlYDn3OfAv9lvfU/KYftr46xaUVtjMxBZLBIs3EAgEQGudxpgWqRZQkMeHFfKuYK+SKR40ji1WxC2Wm/6h//uUZOgOAudOQAMvGTJHh1hpUCKeC9kNACygaYlenSBVpIywabBA/SgtgTWIIbLLAtyhWI1FQnTIxSiKj0vWuMFSTrEBNMuMvGgvYfMFzrEUtKhr2oABgAAVb5ViA4e5cAcfEF2tL1NiVmYytg1afwb4gJoXUINq/An+O+z+/kK2Sot93ZfqXVu+/WnXydQqlKl5JQI8Xeoayfg+wYvCm9n3zOTbX0PAGWV5VAI/SQW9gxNsqDHQpAlDmJbAo2mgtNtZLvRJHZMy6dGbcvKwpT/5veCu1XrfFiLIkhp8iJQ0QvL2AAzJzKWiZyFta9te4RLWlR++JHxd4Vas/SArBaq1ypTHOEj5nEoexyglq3zvjl2RvvpErNvMi88QhfzppGtAiVl5ubgqqOXSFKwTyqQUMK2I14yCEvSpQuAzU0NVWQ2hqeRlmeYJXMPx0FrdIVBX61mEsL8F9NO2d6/JT/c+8cqA87jE5o0jlzbwaRNOJCLxmrSTSOTN2B39sHb3//uUROiAQqckwTMHElJRA/g2YMMiCkx/BSwgRYlkEyAFhJiYmzy81ygvN5rVrsxfvdYrfNFvL6sP+7SvfBUtXT7fH53vLLHr6MrRVyzT7AsRbt3e7JX7o+L57vDVWutWz+v9cK1pmIBzSiIzf0oB79xRHtlSXdQEK8+lCMLL6XKJNnHCIJCgyDAqEZFx5N4FQPSl4HadalbI6crIoZ0UM0eS7UAFPH9p6sAEIFRWtFSUPzLwqrmA8kaYqTcpUoDqt0O42hIe2SNc5LHMUKOUfFTabo2lFjHl0KWiwv9SNkPxdttTfKUC1kw1CmGLCJEAbB1Sn6JKZV9G8PUXJmXJBTSVWzcqiSziWvMsSutkiRyu5JI0iAQCixKe1ORRw6YzNV2/+7MFXYMK+KFEwGiobEoK6eCx6DRUGisse4NeOeJQ0rgriKd8GagHxykUQEEbDuIjTmDoJfezFtddueWRNOQEgyN2EysqwQSoe62LK114zdOjh9cTw4pcLWg2Gfuf//uURO2OAxk8PwMJG2JbZEgBYYYmSLhdACgkRcEHDOFkF5QIRXtOrm4JkZesTn/WaZW5gToUtZgbfBq2Ri9mgKkDBSIN/d0g+tyW8rr+KBCQMCgwkCAxAOQQ2Wf9pNONKLMPMPLZyiyjzD6qqoldNNMr//+VVVVU0000A1VQZTTb///////ppppqqqqr/////////+000VVVVU0000VKOkBOgc8T7WkcDXDCjGt70ZDMGc916p6yfbFYdohnHWlQqUEtSz2UlLMjoEaap2P2ZEhZhJOaPt6qekjWraK/6q28duKb9LHCoiv39YspT+18qvcZDm8fk+j92s9/PxoAISlJ3Z6lIaPDhk1bLRk2PmG2J5rnmzCOF1GWZubkotDg4PmG81l4wwsQdPZ0+7////s7toUww44zs7OMOOIBzSNYITRl0yYNaDLAoQCABJTTkqVCcs+nOB41tFBetKN23ExxgVAT1irrbEveP2rEFRAXTrUhSPWBkNe7onxYLoXa//uURPiM4u4vPAHmHFBhZifxYSguSghIfEMYwAl8nB9BJiD5hahi9Q1sy5w+LFUOIkscGA+Qc6DiKQuD548XZO3KI1Ggt1jggxiAtILg84I8FrJlIpmFpEOekhwRDfcptzAgtO0HP0zh+iJuf8CJXcRQ/Cf//qSRJdG0jeknST5yZwPn/83tf8f4DxHSzv+cz+vwdx3dAQiAALPqvb9eAYrwr6Vd7wSFd2QJ6iBtC2Nc5Elpu4WqCSJ9TWlRLwLKcZcia+jNREMm03KRmaO7W9aCwe79q2PHkMlQWlLIiI5lkSHfjR1blM45lHcVZW1Nm5bDaKWTqeCBUK/wVpQAJPcXEeYBMxuRizWCuSdX2TZlygprNQ/s9J56f/kPlsj9fVlSa81x1VOnm6E+jFDyLFOUqCTxsIi5QFD5S/bTUyiJdXBkwo1jBXQIfWu+eaul5DpGe7mZ7JFRqZOimOe+UCUEfaBAAA11SBhUSoSEKtXiopM2qhNhQFF0oVRBSYK4//uURO8IAlc7rbDJE2BEAphdNGU0DKi48geYcUmbrV/k8w2hFDQp/wsnxSQ38RWR3gvwsm3fwK+/hRwLl8LFgKNOFBQTC64K4+K7/6C//xXf/+FcChvnDcn82A6vW4AX234c/toLCLenJkGo2N+wPHfKa8WMjqYYm/G31iBb3HTaRHVzcnQcoD3+YcZMjo04/r/QmQ62J8TbzfMhypw8TP3/sdz5RMnv33bm7NMU/oFYQVgoIGCBhAYOBQQMEDCAwcUEDBAwgOxZZUtlllQODBBQwMEDCBwcUMDBAwgexWoIGEeyywGED2KwMEDCF6StNN+VVX/6af/lVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRAAALR6cKwIZO6L1jMNPL5p7pmVcFaa8UGLl50b//uURO+EQzRcv7HmG2JTIXe2DSIaSpSY/CC9AUkollAIMY0xP2qg737anoanYe9+J277bOUwmveR/usyQzbnvecO2XXOpCBEVSQp2sRsS4MzHLGK4ydegk77QqtyapK5QZDzl7Knv1a0aJp26+aXyMa8aikf4EslONh/TB0pAYb0y/k1iueqTqBoNcx1qlXS66hB0P+rUnEDCNVZiDM6ZHJfKM3IUm7vLEq0573E8Y10lsXkILeD91zTVQYHUmxW1aOF0lVKKKSfMNfGcYma6ZUYnhWypD24LRz4o9VMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQAgAAAVr2VinDlX+ZQXl958WlXfQqauhkcuHYqbBV8oUX+sjM9jx+GWr9bTxK6Q0vqWcGl3//uURLyG8ptHv7GnG3IAAA0gAAABED1+9swwzQgAADSAAAAEJGMXjF2QzDFFORihopIwY3tJTzNnOB/FfkN7As8Ei2x4W1o5aQPlTQsh/RpfhxA3NDiYN3a4UJ0bkhCIklJNw9Lx4KljdyVPMbHgusatH3BKOBBONm5oj1n052Iv8w/9TWgh6WwheKM6tvccylH19oPQVhKNqU3Rwx9M5ekOQujnngWz4Xs5tvCD6iaeybYAfz7K2tRbd1obtmmXzIDHZsfPg3ezmYXOn1CRDDZHTuAyLw6QzO0ltDBMQU1FMy4xMDCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqgCBAQIKoVVzAG+7bW0KCfIVnGBi5JN1xWRhjoRQx8SJKNQy71TO5FaQ4xvNXMOoaykcr//uURMiA83BWPssJG3IAAA0gAAABD/2A/Uikz8AAADSAAAAEm/19vshU3jZ5euKPyvrMohdTUwxiIDZ82Op5z4F3IzPMsG9WVbPWVO55wDzyfxeapGdyjCPQdTw0vgFOvW9MqlUoia0nxw4hD2W2ioE4wXKnjUswvKC0uWnJmMa6gMMCjfPI6ikNCnyTi0QUQLJXkvzAsJsaW2USnQXwsrZ5hibYlSUkrR+YdZ16duHW2vukW2LxGTY0jSBNCjkrgvUb12NnDeReLR/OeTkjTFsbG3KNSWhXnSr7JVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uURMeA8upVQeFlGvoAAA0gAAABEcWK8Cww0oAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUAAHNCQsXMCYhYJiyMlFR1hJ0SIomNBi0EjbInWidaJIpZEqwWB0kBSLvCpJ6iQUArAESCQFIjCYSApEFiJ2kX/27AERCQFIjUiwFFaWmmPTH+siEg9CoZGIVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uURH6P8swUuJDJMFAAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUBgABAAAgD/RrBgAIZtqjFHDUPGX+HAAieJjXwIkY+4K2f6a7XDEYgaYwQYCO04Gih8Bg0X+8BofgZ5LYGHwp+BigGAYxCYAgs/8DGgODJgMDAQMKAYTB/934GDQKJOBkUYgKBoAIOAFA///E3BdQDY+NNQbeNb//xSgGAgEFjg54XABqwZAQQ///yISsISDIBYYI0IOLgIp////mg4CmbmxFG//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpBQAACAAADSCgAAEYoE4cJxv//////////zchhEKBQEBAEBAIAwCAQAAADuTUvIyMVeJMvgCcTO2Rcs0IQNTMY7AEjQZATkxT4VnMA4BGjAowDIwU0IfAoCGYJsAnBcDHAoAkGACSctUDG6pAz8oAQAcDCAXKZFQAQMBhIKgZdCQBwVLIfCWncAoqgYeIQGOxsKoXCPkyUsEBJAxWKgMDAkAYjgHDsZEqybIDSSWoCAWAeFgMKAQDFYQABBYyxoOUM8PROmKlVYesQ8fA3BlBlC8XS6yJDkV2+IzHcJ5DpHLhAUSitjI6a6/65ElEaXhyScWi5itS1//5mianzJZ48bHUk0P+j//6SR3/MAzACUVDVmy48xkA0G/1TiwAUZd0LKGG4g1v+CgBBd5gA4DMYEcAmZJmgGmSKAsKOm6gMYAwDFITACAftCxcDCYRAOB/38pAYPAoi4nQPj//DLYyYW8EXIoQP////uUZP+ABaSBQKZ+oAAAAA0gwAAAHamBG7n6gAJ7QFzDP1AAFzjjHWLjK5IkX//9QWjiCY4yCEAHALj///yfUbEAIgUBlBwDvM////8nyfTppoETKBEBZY55P///////////kENFAADUtMBbmYyZ2NzfgEWPjBHIzhh4jNLKGML0UgxEQtTCPBFBgMxg0AKAgA4rASZc4rX12QUrwEg5VIjIjE7f3PbczDmY2YYNBazfiwAjoYFIGOPjfnLf77hvlyGHTUxAQeDBoFGiOZhhQBkAs+5T5zlvn8/9///+8rztupE4vADiXZdOZ7//7////3+Z6sbugRrPTShtibbg84mTmTASnzZl827JNssrBACAEo4cPS4dBnkaXCIZDVEaRAMZik0YSAmYtBqYSgyFwCYKzJFZtWsNfcpqL+NdW02Y49A30dEuC94kB95VRSOQWs+8z1lq1rD6WNvA6ltpDqSs2A+swyJA+CCnKZt7VdiNzNKLj7i+rGo/aPe1VKIx//uUZI0MRUAyRp97YAByY1i37uAAFHjbHG9g9QF8k+NB7CE5gAIAEpmfwSG2ZaWYj49J1Px/mH0JycnAHJjVEyiwlhgbA1mEcB6IwO1kAYChrLT1p3nkeZsJdRFYwPgmQEE2PAWmAaB0YcYbRQCYhku9ci9TGMQQMAwe83zJIE3TescUPFLpvpOzylJqyiTVGUIDmnQzXltN3f//6/69t9IBe+HIej0HMLiTiALGxBP///uhpYHA2ETX/rUlLM+mzi2lVrbHGwsVVBDGzCCMO4KgxkCxTCaAUMewKQxBgVTBRAUJAHwSBeX0RmXO90qijyQI1iKPCh8A6A5DJFDDWxXDuYVIU/Dpu0zRhj1vcziA5FFKe3HACrhMUe////104yi93FFPRVUAAG0gJpuMAGGxCbME4CcZs5AGDCecVUZuHnKqZkRbg2dwc8aX5nPhoCYTCxIaDE8pfc381IuZurzmn+YWXpMJRjSCUxkQQoMdGDDx066oMvHTIAEvM0Ol//uUZCwIBPA6UOuZ2SxQpRpdYexPjgUlVayabpjuGiu085o/tzWesabWest95nreufnhKYMZcKAZgwcZqUiwOv1vjAhUxsqMYCUECBzgz348///f/////+//91aCRKYoAWVQtrLMEAbFMgAAXECkq4gAOWbIxAIMgKGiP8rA/9OShZKpKTpNEOMTe/JX5k1r+A5F1H8odsrAGrZGavmm/M98ss2ifpubb+mdrAZgcce4rCCTm3bf/wawy4ioxHcKBGuZWRKUfI5CiKsA0MYPQMXWmk6xEQZhgOETBd1a5AycZPHHenZSw6wCrh6TUgHaME7VFxDWZl8YQoMky4ymT2/SS6y6z//pl8csUGLeQAnC4QMQnBv4NgsPXHPJ83TSf/////WmXEHfAAwAALY22KHAApkai1lmQbGuN5f8gBbCSJKG3+bEeIooSvozmg9Zrhh2/+MiWTM6pb////6nrjPZ4DAaY9UAABOtolpmMFRUuVKSNhuAP9ToOElvplDh//uUZAyIA51MVmshVww9ZnstPMpnzbUNX0xB9bD0ISspACfOJE6hwgaZSpZKmBEB0NCGGojKpfLZ6ap7NNdwp6XX93S/j+5Sodn/5bxZgHRMpjNWdrVcL+NUhhEaYTuL9f5zw8ASHxxxpCFyFELR3/oe5qWdf//1NKkpucPhsAAG3XE5YIAOyQIsOBpytoJJSMvJrJhAHNo+eWc1vXOe8w/mhKPe9RIAiGJrGurOymOqaf///iGOepo9GQ2aigWBA03QaVBUbswo1hdIFjAw0mC+9pTRrzD9YtfXpbzlFmfr26tjWCkKJ5ulZBC7fMklLNyGEEW+oc0Mtg3oAeDkkuVE6CBggh///+3/8CC0EHDuAECGpeJDhLYcBLQM6FIyPQEwf///7TmscAAKSJQAgBFxWg+hNTYPqIzB8RQi4uc7MmM1GBupdeozTdborR70//zI/Uxmb2+tP/8rUB0E2s2vhG0KItoEgOGpOAw87MdVjvi0xcNOlQjBycJfzF28//uUZAyMg3FBUhtmbLQ85Do6ZYJmDmT1Om7tScD1GimllKmee1DMBiHnTNVFkL4zdKABUMuppIv6e0SBDW8VhyLKsjZ7bFCZ7zzSTKdEQo2pekYhJSik/+iy1stFkWRRpa0TaldFqnpe1fWYmv6iSNvwVBp///rdyQAAGlECZgDCbDyoWD1FjG2SQ4ke5CQPDEwtdy1mydu5LRu8eixqmOd3FeopruJe62N8N4J/0Dfr/8n/kesAAXwAAF0YWm8ZnnObUqIZLG2cPFQYLISbmj4YSkEaVASeaQlYcYMPnRNg0fumtAKuCD7UmrMPLtM3btBrvONFYGij9xSnmqGUyqMxait0lOYaahpzOPRx7gDSOvuGR7f/W9a7qyzR8zsxxATmL0/8hJfIgsAXQOAkehARTtVAUxDCLNIA0mkrpbHVnbj1dfKQ6nUXvZiy1b/yjftVf80Au7mTfNt/uj9DXa3JW/qfw3UAp2wAwZ+Mxih8oPI7zR4g6SXClmd6xGB///uUZAyMk1UzUJtvHGRBpnqnYKtvjjDNNG7pTUDykSrlhB3uRrxGakUq5JBIyAzL5PvYAwWLA0In1OThjjKxSun8jg/tEhz3gazjV8ViTbxnea13+J0zVvjWpZS6LF8Ztf/Ne6UnhPCeGlcLVyJww3RXkA1qcAIJOWMCmpVjK4biNAKqZQMlaGunWbNOGUYaxDv/7OzvPV40VXuUqYFH/RRDgnSll1cSp0+nV9f/FZjU3W1Rqf/lwAJuwDBtCAqcphe7RvzfxpcGR8iPJizDZo6vhh3YxiSGJmqbAKG0BA0aOgQRDMuFBGZjeRBWwv8mALLJ5rcWUWkUw0x3KeVxKSWdQ5SZ162uKK10SoqEi0EstflB6FcOH1a3ezJu7a6SQrZJhCDwW/++6775HFU4W2BXpAFTxUHKH25HFjvxLYpVEapsLMj1nnsQlPB4+DN9FZKn9G5T+UCA4+zYs00EEjmzLImAygAAA1G3G3GBDxgjoVXmgnmTKgE8SORUcSDi//uURA0Igskz1GtMPLxZpFn3c2geikiLT00lcHlWEOhZzJkmYOICvIigAhDxepSuC/1WaKPFNnI4qr4hIVWSapftAs1ms1B1AerO2FQcY6CKe79BUAGLa////nC5u6C5/871gMBKdgACAWZOXZmeCmpJGcjLmnWhBemQswW7hNKMST8hEDmhED9Pu3cvIRBFqEvBO5wWE4OmDjELLJdjDMhxvbPcz6IP7gm+q9iQCCccNxMsHjpsLyKxIdxQe2m5WAEtw4wDEBndBnhAapEDcABmSixoRGqJ4C7ryVfT0XLUnSICnKvWM00XkUxgJEdlwyojoP5+Xz58hNzkDs/7icASszUr6OWGxb/fiA/7JiCpyBCBTHQaMjEoy28jPREOFC8wEdTAgsLSAaVFjaBBgQ3I2cROaSOXLMQ9DzZ/uCiTB0o5IlSIU1p00lzdd5/KS/NHHfP++oBXyp2bQ2gu6dEP+jlaABliAMEcP0whC9jJDIcMW5VE3xEc7Xf8wrqc//uUZA2Mg3Yiy5vdYPBAxfqaYYdNjjC/LG9wqYD9kimdga4e4ADwz+sk2VGAydSUHFKYOgEblgEAgMAwAonGAYlBgdLHayqIaBpxU3jIIBWOgdOkwlFeTZYuuvjb/XG2py2TkV+85itMznuLmeN48ceWvWoQM/+gAAGik3WAGitlKhVgVBRKjGU+EjE8Q/pCSN+peN2vUljVvLsq7eGtv4qahplsq+2eWRWG7/oBIxdv3W31Xd5R+XAAeYAMCIScxWQKjISRZMJpe4wyBsjR3G4MEUrkzDhFzF0PnMD4Kw6sojBYEBCPNtQIyQBUuWcmKTWGCZQR01cpwrNeddqr3qaa4EhdCs+j8RSBhYQCY5mIFB9zq5zB/YJiv5zh8y12u7qImqy95cQdkBlJSAANhWUFpF9i2wCCqqTsIcRVVl2YdSL9sxOex1EoQ1x1OsFle1bTOzh50X2Yy6oWj/2bA4dY1JwRBQIejZUAIKTiAAUETG08ziANR5zIn82QyMIQ//uURAsNwrkv0Tt4QjxUBPoHc2geyeSTRE3lCLlkkSaN3iB4ToBsxRBDGQ/ueVLQ/Hc67fFEuZX0ho4tR0ieIIqycaPHsRF2PBwXearcNrTQJp/yxUApEyqzfCcz7NHv/cQLH80AQhOYAAGBUwumzRSsM+wkwq1P6UDFlU1ovM+rQFSBBU3peQzYNHhCitsRkEM2p2BbFWxNvC5rqt3ER/Ba3HGUVWNEGOL+hAA462v668e6ZxOxwKyF7cgQdm8kZxHAaS0GuFoKBTvDEOLQ6FNY2ZZUTxpRTs8kYBEWQ5xyiwNpgo6VVoXZuVrKFThm6Dg+VSkWvjQgHJVWGdC8WhyYnQ0mQ2/nQjL6AAMDZj8WZv6QRtFKhpX1HSJyYsMpxBkmaiuLkExwI2kmAQQajBKLK/IUMgCA36lkkemKUkgzYjEY1RgsyHMBM02rZYu9cQDNhwknr+DgAaDqbQ6p7fKKBKlgAFRYDEgZqXJynEmyhmbXDpVIR1wqkPwDtTS8//uURA8N0rojTxuaQdZfBDlje4Y8CjyLPG4ZMVlJESXJ3aUgtCoEzSJJuALQXDKcxWrCpfSyTB1xMQcSotZpZpQ9UaaNHNPx9Nl3/7kAuEA1AsqixG1mv/bukf/vAAHQAASDMYKRJxiSHbmXifeY5gvZonhHmDaDKZDQlpjz1HhCaZFaA8IDAZfMItIRgVbVHCgwBMdkDlCwLqwRMN5G72ki9Ah6KJnIo1uQ9N817QzWB1///kTQK1upH1qBTg4LDE6sMQTw51ZjfIjMrlYURBywamG10IwSIia3UvoY6D6fUkiCh7Fr8XPsinYqPCTtObprPG5RdwvGnnhnqQQPG/7ywRK3vVInIlKaSf/5BeYECMZqvUbReEdQYgcoiWYiukYBAIbWEqY2ygYJiaWHUBAJiQUfUQkw0q5HRMtr8Ny+CVYoJfERnVJPRLHBqNYxCMfkf/932qeqKR03//+XUfUEgAMBgJgxQT2zMVUDNvNjE2KgeDamCtMMwzg0VgxT//uUZA+Mkz8jSZPcWmY6RDq9YSY5jQiLJm9taYDHkOt09hz+HtQEMsUF80BsA5xmGx0flU5pEHBYBKBFU2mEAEuiFKUlYQTlYTB0NTMspnKiUutxW9atHGboNyJSLJcmgr2o93/qSBovX8bPLgAAFRxzWUACgehUqgbYh4yfytLLAONWDbDNgqmSjqB7eRKSVNPZKkH8/PlkiWctpZb+AZv//LJN//UAREAAYCYBJihJgmfYa+bwSXBrVgRmTWXWAD4jLqBcMg0QYzQQET99UxMwMnnzPegHP4VAiUHGkwHCqqpEAsILwrVUOS+bm16non2h6GZ21fNl6JPLd9psc9sFXGw0pv/DxiZ7xdpr/WXJLLrhuFOIIOUdBAFhiqueHVQt5gWGT5766/QO49ilrYXTTZf5UurI6oxlSL/VAWO6VQREAABoD8xeCIDKLUWNZMhU8Chw+fOoxhrAzkIg0PhE2VB4zECAxPAUwwA40wG8DBAydJEqCEsOgCZm1hQe//uUZB8Nkv4iSxvdYPo4pEp6YYg5ivCJNE7oyXjcjafdpI2UBHGBUECyToSkvUn0LHLvat8/Xf+s/0d7cdLqZNbWmU32yAACpuSAACXsJC7yy4JICmkDpWDjwtVXJ5pXEI/WnRYocsTasWOYkZLTCVFyMlpad7hORb/9oBelAtmBIEGBrpGd9fn2w3GncemsxnGDzAGLowGGrZmCoVHZHGLBCpA+7tmkmgQeBiwZprXoZc69TxiLz9i+QPgsy3pMimivN6W/Yc9HywXjfNs0cEAIgDWbghckqiYUCi2g1h42gE8YEK3CKeypqYOBSOnUAXAQlhc+9zQ69w6I6AYh0uh7DUjRBRHPxEl0Ai8AAEilGAAAoHTKIbOBJA/GFAb5HLF4WxjmxAwChDoAxAxTyWWBQpfs5LyQJaZXljiJMFwinLUOa1HK6XXi1x/yIs6sI8Jv0YCRrCrawEDeAACAJmEdg9AHpRoZyhxro3mEMRjowYVKh0oWRc9LcxEMeMQB//uURDmJkmIiz1ObQOxK5Gnmc2kniJyHQ05pIzEgESelzSyvgAKp8kLrMLyYhesXKE6r2l9y9bq9y9ZH08pmF/J3K1HumxzEAMnLCoBxRDmeTAc6JZztpwyoByAf0YxKRgACOdaTExiEoEYMCVKLRjJqQy9dWwhG32xdZkqdLZfgLKTqED2Kl6StGymQJJrxEAQY3TW8sPCH8ZXZvcSmLlGzJGWVk+EAhIGewa6qep3EeKNSCqfMmZBkdMzYc07OUc1U1pftW6n2KEebSOOvj2UChYTyAADAWgAMC8C4xJAnzFnS7NPktI6VfQ2bSYwvTg5VD4zERw1wBEwDKlBkQhIY6iu6SsEACMFi86T4GDdcanE3Zze63MrbxPp19MzrnUc27pbQaf5LepTJn6AC49lbuNEAAF9OS2gACAW2LIEVkS2ZsaK23tPThQvBI45gm8NpWyluYrrnn2pC6zS7gVVXUVKuh/rChZlBITxgIhHGAOucaBi7huYMomuobOad//uUZFWJEvUjS8vdYO42xFqNYGWFi8yJJu9tCUjhESj1l5T2gWRgtCNAKE4xEDpDEABjMCuAEZGLmp9NsCi8wYALmKTKCJt5fFXOjEMRCDJXT04uLnnH3buXMy483/8Q+4gHLSI+WAdZQQnXrAAACdjjctszNkYHumQYThOMU1JJHpxzkOFLNh+G8E+0xiUk+M43IixPvKqqmudR93zP639/2C1pAAACbid1AAEFGIghEpHCyQO5gYFsZGr8YMhoHLdwidSwo4OlqT7EGgN46sUpboDB4dO7fPia6aI/PIAkVS1lgUdOzE5qoJVmOJTI9/rAAAFtt11AAEwYkYa1wcfcdlYOmXwFkYwqTPa3exIgk7GmSssWY4khiK/4jHS6ctfdevhZG/Kz4nFItJIJlBoyblwyo7EItZvNHVM6U1HLrsLoJkiiahAnIKEzIVFh3NBoiPKety5lcid14WkhEG7cOq2gUZMqzRFpP3TSI55xchBQlVTc7rA0jyrNPrFU//uURG2Jkmoh0mtmTL5LpEpdaYeVyQyJTa3pI3kgESh1zLCntfBknyZ3A3JJbGYmB1OZGg5oJ3j1QA0aLRg8cL0E8asFdoxe/TWYy0Yn3qDWhzDA0tUrYY2ucjtGmFC7d6IyZd2rmpv2eZNZma5iaz3alQAAbbtoAAkRhQSYC5Gr1RoqKQAwzOJ1iMkmia/AnWbX0OAcSpNNErKyJVq0NCqZCYWZk1OMJaKSYUslmlWRg11pxhLY5cVHgoVGSogAAQ7LLdQAA+Jhw2YVIGn1BsZ2YgOIeiQ2XnIi5ndJNoDp+E0rMhmIA7GYQxJjo/OpParnoSzhryYZHMUHyfK7WqHLBwGora8uC891gucwfDQxmXI17UM2Y083NnjdQnAMTNwjcwq8SIxmNBLXLWhw8hSKLPkfkum6uo70ljEuBSlJGwlLXMxstuM7y15T4u2Zr/KysTEhuMIQ8MrH6OkypNsunPycw/IjzCBdNDjEw3FzMoAMRBtW4KAEzEDPuzrW//uURIaJEl4h0tN5ST5MZDpNbYh5iUxtNG7ww8klkSYJ3hh23moZBRplG96lGnxKbVWZT5Yq4p25hWbyUP/nY8baFgFeAACABDJE5DcYzzSvWCDAmgSeAZGZzDJgFymSgQasQk4kEIjV3I+sSIA3JaU2F9H/jkflFPnhXsBgYPVVVVWWW8aicqqlpS6a2HJAAAAAHDDlGYMqYskxJUFDru7PYsswygzM4vANZMnAgAh5mo6EgoNy+TcaJnr8wFG5BPzVCIAobiRS5YEFQHrKRcpXhIaBS4CkQU4CAzMW1PMIX+MOtTM610MrQ8KqXspCo5g5BDG7StYUNJqoJqsXZK0hhrTharTHpsopWNy9u/rRPiUh4YWRiekaLo6qYPxfqb8wSDcyBTEycpAxbq8QJ8aAkQYW2hguKQ4l4Dgqx15xJ2U2gmYoJqIxIDOSIkjX+jRytflHlH+jTjdfc2L1oLqlf/9tBhrPsboG3gAAwGwPTFCNLM29E8yVmujKoNrM//uURJ6N0lUPzRu8yKJKo7lze4MfCRBPNG7liNklEWaJ3ZivmIKwxl0TXAmBKIOUCcw4diIAGCAGZMAxhgFIJUmkJiE1CpAxY8ojbKG7xqXV6yludmtK83LaQMg/syQ8sgFsanFP5ZmQACrnLqAAM26CQQqwSYRHKpVuKaGkJpBxqBYV6IlneAItAivnph2EPkBhC6whQnnFHEqYQUxp0nwPLcAm4VA8MQotYykAXTNtabM40uAwyhIzBGF7MTwFQCjJGFcCqdtKJVAUOMcvNAOUVDg4wAQTFAFHtZy/HjgJyILnbdIo6B2RK6ZpmHBE6UyNXwroXIgMCJu988AAW1bmtCsoL8FMm9KVRUWRMMoQFuNgePBIMy0Mh8PU9ztn/yoNTKqD/H+eWi/l8IML1GWzWpB6T3T9kgfAAwEgcjELRAMc1Xg0inGjSmFBMm0AkwJRcTHyCIMEEgAwXQEzfMhkmNEj3mDHCIsYcGWTQzDgafSYCkHraXEngkcxLHAw//uUZLkNEtYaSxvcMXI6xEp6YeM5y0iJLG9oaUjsEKlphhjnwQS6O+hU99Nz0cJXNhFfvic/ugAAlKcgAAuCokCxwQ8N6AnVFExti1DSwlmqvyWSjUTsSt5xcGrtfzOISI4fmZ04m5kkRQ5p06LiIPowzwALpg4ACGRaf6YpkEJsdw9myuP2YPY2hgfCzmV0GQYL45RjGgVHd2GoJGqLn+yCAMYMQgeQGwEAFghMYEhC7JU8anbxvxINDwcHJrXqZM96bFa/b5n2GYrL7sVrpu28YyDoGHIXGrez0fJV4nUEwplIeC4tUwKFKhyhL+xg3ccRDr08mDubIIEAnkSJ9QhmTl28y9UBgAMCyBQTCYDC0yJQkgM3sQjj0ub8N6AS8wfhLTYyEoMJEFMDPXn8UZpp+ZmnHZSJqacZ2nGHqAoqDJSYWCkQmWWAoMOhBVBCwAKKNbhbrOtFtSGDoFg+Rz9erS2b1inu3RepYXNvpPr1gAjOU5AABBQICG9gGysA//uUZNGNktAiSpPaGlY8hCoaayMdy1h3Jm9oyUDfkOlphgzvFwEcn7FyiJT4LVMwR/KpELg3FC4pV00TUFAw1UMzRmVRxxUZil28zmIELLenama01pLX9cPrEYbITxr7M8Hv/HEfmezp0sxHmeiYKYK4rxsQAxAxBEyZwgDMNaMHDQxiLD3YINHjwxWSAaJASHCTgXcexAPxnMndNNbZm1pkzbOU4T7Q9J79uejUSlVq1ay33WtZdyw/nN301H8AAJtJyPQQigZtNjTNFHM0KHABGEWjKEjpU8HhaLwi4ZHyo6NT05Lpiqjs0199dFAQaH+TMzMzQS0YWbMGhIVNg0WcLQdAAwE0GYMGbMTDFNkB80hYoQMVMLIjFxwWQwFMLiMV6AsTA6BTswKYD6GLs0s7NikzorI0UiMrHjBikwQzARGYYEiw6WaAQE3EvazVsDBYFjTtS6OxmpGgk4BHmo5RK0qecZrOqyCPOjeoE7wAAWRAxfN1Tg2NLDdruNcF//uUZOqNE1EYRpP+2KBE5En6aeY7zKh3Gi9zCJkOEefppg1vcwkmgjunB4CYOzVTUEC5S6UlWFgl63tmnetwzZBARbSqUNgJlUoezaltqxqJVOjJQY7+uGg8YNoDqmNvhOJmrCFga+ePimHAHZZizQZgYL4IBGKCApJgzwlSYZgBNGgKsZpIxgUdHYGeIyAAi2YuDIyAQUJDCYCBALQcLpFuWGJ1NFe93aQNFTAqKmBKWeyo1eIpvjWxqs8aNx+389rq3pEYpxqdhZiecEdXOfYqcseOxg0azlqIwCdZTlMol9oZzE0QYeROTIvjbLaiyiVzWyyzk5q5qgmVHF4UQk35JpuVGAwBhDzFKmBN3lKU/0DyDdBfyMgQWEwekRDLCEbMP4BkycgQTtW0x8zMHNDkVUUHhGIggIjxVAS8CC6aica3WbOq70qu3C0FqHBJE4uLx82vTtf1WDHe5tsqDAAGAMAv5ggRuWZieD3GoJAsxigpioYqYH5mUFHG9yZm//uUZOyNk1ceRpP7MmJGw6ljcwM6TXyHGE/xKUEBDmcpp5lPlhGnqQfmMoMkIPmDYqGwY0mC4EIAy/CcSQSIqVzTWXMpeIDxgo25pWpsNtsvjKMrpDNi8RcWg/QOGCmDUZwAfhmCOFn8eHCctipZkjhcmCmjYYoAjZg9FDGNUBufzseEAYZCOqjRBCoDQeCxhYBNNlTHWDs4gsNBEwmiQrRmwjnWN2GLkSOogxN99BIYICB5GN9CPZh8SpSbByHiGXKFwplEoQKYKmG4GDuAspgXQiEYZgBUmQPg8dGBz5jv8mmkOn9DKtKl60IJRKeR3woVMm0F/0/yYXUT3J1U7/yKl3+dyugHAAMAbBHjACS3gwVszyNDGDiTMMQlIwgcFuMApE6jBSQMswGUPAMBBAaT6RgBLZao4AvM4BGjoZgoDHgtylcSFd8QfSGYH+N1hjsrG4RaadBnwPDbSAAYCeC0GCwIZRh8yrIaXgOEmbUi6RhbojYYAqFUGAOASJgN//uUROuN0s8bxwvbMlZZAviyf6ksSmBRHE9pKQlgjuJJ/aUgYo8IgJ00qFDDYBMNBw8QbzDwAQBxlVF7ohBztvfMWRaR6yGH00/5eFZ766mwm5HqCwwHwCQDCt8wqcxNNP9IbDP4gyQBE8BgEYv4YeyBmmClh9BhRoDyet5hIEIRQ6cZBRwvBd4IKRIETVdx813vDL3ilk/G6RA4Iupw+PSvRY1PLf1z9zlLtxGhhgPwHsZDuNhGX0nspsRp68a2MLBmcrAaZgogh8YPiBLmDnjNBh5YFyaKPZEjzCqMPgvMwmEFqwe3inojGn3hGMSFID0UDMy6feyONH5j2uPy5G+fX/zf+hvv1+vfWhoAAwOAHHMH9N/zK6hCs0iAvPM4FHGTBUwc0wBUT2MVjAGzY02DykBjJsnjEcEBAHJgKPRdlMphwUA5dLTn6aE39WAQNFXURVLaJfdDVuN0HhRYDP2I0ygABgswUGYkKoimkcIKJpryLmabSAyGJqis5UDk//uUROqN0qUXxpP7GlBUYviif4ZICzh5Fk/syUF3i6HF/hkgDCxQBIweUHWARFUaueGRjhjcOeT/DgKm5EywBVpdWrNBs7jWKyDBJAQ/GilT8xW/Sxv//XQQwTkC3MjIFUzQSVOY2bVYQP9b6w1GQNDGTV6OUcIYyGUiTOnBOMJgnEBCHBg4f8FzqZzaAkmVfKp552hQVBUSlUVh2K0szM8ws5d7W0YA9oTBU/Z0aeGByg4pkiBMSZxO9GGsfr0hprxNsZZ+GSGQSVkZzoexkOotmhODQYRQhJWC6DghTIOAXKwSkImosqYvMYvhT457KylVCKnTg+eEY+K6n9/9fX///76//6P1fpoIBUMJZEXDHCmv40ZWFZOLyjozRT2Tkx4IXCBoZQZV6C6GCykk5gmYI4a6dxn0aGIDcdpa4QQqGKgkIjQClOdl5sNNOqmKo/J15A3r6aXuefBjFtTqf8n7ONX1puyWr/9yfu/SsAAGBkAAYx5OhsrAAmysgOaP//uUROgN0rcXxZP9QdBSQoiCf2VICrxTEC/7YtFqCqHF/wywCXZnAjXmFmI4aloCRn9STRplzgAhohKzCFYSN5dHXGXFuqMnsqnfMpJ/jb7tDkpeZZ2rb0sQYQYCfGZKosBvnBrwcM7LeGNuNeRkvArCYKABpGWRgoRgqQ/6Yi0BsGgsvmGQZGE5Bmk6HGFoHrQaWIAbV5uklNNZ0gtlFRmZYKpiIuRVZ5YbIJqT/1a9/v+63/Yz/7vdsBSkbQMCg9MaVtNn+kPQbMPQWeNrz4MOyDOkwyApMDVTQ7VPMsNgLXtL7Ky0RmRkIx7l3xliKKwl+WPfN1tJ/QACBvVQjB2FVMhWZ81tVljsM8zNfyNUxwQiTChILNLcKwyWSE4UAcIQhJh7QEeMnafGGgi1+jvOQ2cYvaj8HR5nNuSFIBaTFneg0/v839S/93T/Yr/zH6dkTGDVBupjdqkGZb+0NGnLPqphRicaZdyGFmDqgrZijYJEYNkGimKIADZj8GQF//uUZOkMkx8aw5P8MkBGwviSe2k4DERrDi/0aQD9CKO13STdAUwQCk4GDQOEFPJ1CACgRWw6QMS3Pu5Wd+e9bxUetJCT1vR9f+2xpdZjos/69u//Shft7CQAAwQsBxMeAOXTE91qczwd7uNH1NYDEnQcQwIcWbMfjBTjY7Yj4YgTV0lQUnpgeGxkGPIOBpWVnQoCzfuBFA2BsUCQ6J1UdKdfcg4NB8JOYbYvZ/9P///////+gSqrIYHKBJmL9HZ5kPK7KY2msVGSylqhiPodwZEt6eWkwarUUeEDCcuPmUBZAsGqz4OGmkx5lTzUX15ZYxJ1ViVfS9FxZOz16+v+7f/u21//VWAMEPB9DGKlaQxkBZUMkwkyzYZCmMxyYIeMDGBs2nRRDEmZCMSAM05xHyaWCofNKmBXajqD6UTNnxcda7L4/EHggSF09FSXDB4DiYYCAEBAfCVc/9lf//7n81T3/rWBUDAuwWgxehA6MqMQYjBt2hk/ssDTpkGqMP4t//uURPEIgs8UxsvdYbhgIohgf6lEC5BLEE/1JwFEhmJZ/uyIczEwfDEaU+MUQJMx8QwwsGCxGcdPAkX2rO+VADKLve0QIAiYchOH6RRj0VdP+rTtu19H/XsHZ7///sGAgBvjGRTuoybcHQMGqhJDWVQcYwDkKVMBeHazDTQKIwD4VAMJpAZzu/4nVAEXjdqTEKz3fJA91mzs3ctrbd3jgOnkFidG9uO4M3pmxc5mE74wE8IwMWbTsjOZzswyEZ4+NSdKfDBoxZkEGJmSWBuYGi/Bk2g8mfzETLgweMTsBOQhaHKUtWOVMbl2z/aZwwsKBtYRW08zyGjDA30Udl9X6LN+mz91+76FK4wwqoNFM4PeETbvK/s0E/o/OW+KJjNDQbgyMa5TBkAjMY9Qw3JwRTgXXNxCMLpIzHLxUEIjBcGAwMF4ULUmVNWiunqGJRdnaWlxqcr5BM+AiKOxFlwuilX6BVH7QFu/OJXQ/FP6EtcZ6GvEoAAARkbiAAAAAZmG//uUROsNwuwQQ4v+4RBXAXiCf9wUCghrEE/saUFtBuHF/3CISxmnGfGXnZmvlSG3QvmEDTmIwKAg0iKMDcagZ2Y4lUBQLKCyRTUJRPP0xUTOmq1mJ4aXCKE19fR/7CssSmA5Bcpi2CU+YQEzVGVYRMhprJwiYSMI1GBaDNZhYABqaN2uf0k8ZTIoYiAEYHBmZ6iwgPC4BMSZkkUx+OrVhmGn2EcJQ+OVd9ENVih7h16XSSev3t/e3b/2NX1d7un//02AK/bQGBIDGNA1G0YlmJEcBVXTJUUQCa4QhA4tpQW0r2MlDJyNZYyqfpWSyl2oaC4KhLSV0tizJmK1PTcWJ2m9yjAMFtB2jGFigozcUpJMjHYuThO0uNEQUkwXkmzRYB7MF89ExFQXjK5s1gIAwWcsCDQ4Bg4LALipGq2J9Mpg5nUGxWGqSexw7zLtmqimlRf6UoTFvf8rIgIYOqDtGRBE9xqy4zyZNKxMnudjwcVxkphKFUmPkGqYZ6WpjNhE//uUZOkIk1MSQoP+4RBFYfj9dyw1TJRREs/1B0EACuT13CTsGEO5kwQOFZ9TADjlY0pRfk8tuX4zepiQkWECqiqBIzhyzp/8K//R/2f1zf/6DAJgbwxE03WMz4GLTL5lowxQdDzKFFpMGY6M1UAhTAmPNMXAEw7TSMiGREYGJpIYEEwkGBKZyApO1VRY7JGpNq70Mymgu3Ltyvhbt3rWITTRVEHJY1V77KBZTAIQpQxBtI4M9wRaTN9FaI5D8WzczMtMGcisyqAwzALTxMaYHY2piBwyOnBn0eNBkDQywlzL8tlUpuZ2AeDbdx4UEhsNqJVbd1ftutvbR2foNS1jHf9tX+hcWRUwUoHXMbHIkTDaEdw0o9crN83ig0FxcjCULDNq4A0wmCbTLqA0PZfjOAgQEJzpw+oOFzBAILg4oCoCkfU8k+FjsofGGoGkFPcxt0lPWtXrdIHC2P7BW2s1UmC7A1JjmIjKZBUsIGiYoZpg0RbwYo6GUGFrmnXgCGLV//uUROyPwq0SxQv+2KZUoZiCf9sUCvBRFA/7Ypl2hqIJ/2xQYgtjDSRwWHR0DPjIBYDfy66EtpK8xdrWb5g+0I0svHV2+j8hTzva3rcidrTqTvf3POaXp7PKgwYESDFmH7I/Zk8KQGa0ophHoRl6aSA0RgxBkm3cBAYQwxhlcAhnXJAVLTCQM4w8YaYiFjgMBggGACsJcdhSSCmcPNYhl+JLJ7FS7bqcqXqe5Y3nhyp+/1zP7Eh6P+MAYCqEOmHCLwJodaq2bVwnIGQfIQpk1wUUZ1KyfwEUZVM4fVDWYbBU3UwCCszQH4t68zkKLCyawgHWEXrrQPh6BQKOeHzgeW/1ey32f/q/b92z9rfyKg4AAwLcCcMW4GljGEhHo1ek+dPjt/gwch1TDQHYNbIDowYjVDFIBjMK8RpNwKRHRuNJGOeusgGL5riiSCi6GJsrzl0NwupRaqVa9/D6fPWsOX7Hg+Y4yhl+hgAAwNsC8MdiDADKQh4c2PE6PO/vTQxV//uUROqNwrMURIP+2KJYwaiSf7siC9BtEk/7YolXB6HF/pigERTDYDeM0gHwwjEQjHkB1OTngUemFnBwDqvBgbdKd3rOUUlcvlHO26k5T5cz1ypsLAugHyBb/3f+3+swHEFEMD3MRDGHyig0ZAmIO8oXkx2QaTB3JSNAwEIwKSqjCzBJGZpkzK3wlUUGi2YXBoc38bVfi6IMe+H7strSyKWN5XBEofWPSABkxDvH1jIYGKEDGBlKghks6/sbFEV7H3U/OboINRimiQGbwHgYMKVBiWhNoBwSA2CgChYd4mAvZi47KRXIMGBWAeRAwgJOTtqMRbYmjKODx86OPHzdM//9P7P9v//21RAMFAAXTIbxmUyWhYRN0TLjTTaRzkwnEIwMDuFFDFSgEoxpxA7JEAwYWgxvBwwgc6i5SYcfLNkoNrEWd5TZFJOpp0DOs3rmQ5Sbm5unz1fv9oAHMUKefSpWWGAADA4AJQx+ME3MLKXlTWwRqs0J0ChMB2DojLpx//uUROaP0soXxRP+yLJSwmiCf9sUCfxFGA/7QollCeIJ/yRoDqgsDHHRh9lyQlgMGxggGpjQNSc7J19xFtJ2qEw2AcByM0y8fJyNduXbe3NTBpJAPPjft/////////9I0GBhBC5gA54qZC4VlGp6CMxmjRIAYhEBLmAiCQwsK8GAtgTJhIoBIbLAmmgYWADIjWGA4CCoAKhCs7/sWS6R+UydKpFXub6BgKEghHzM7VEvQYNsVSmLnFUph/EHmRH1qeODRR/cAgnmwjobEwpZhNDtGL8BsYLoNJkrgaGFciTYgLHogxxm+oaHxcJh0Tk7cWT5s223cWWTZtsDiXYfL0/6utck/V///u/6P9QtqpAQVGZE8FummZlrxro4xgZpaXdmHxhL5gKokoYKAA3mGPHm846GUAlAIyn6MtQBVrLvF7l3RKDn5kSul3QEkTDiQNCZYsifs56tVSafOcaSIp3cr/9rqL13dn6/d/6P9gAA1X4AAXBhhBeEPNPNp80Z//uUROmNws4URAv90ZJY4oiCf6kqCvBjFE/saUFXCeKJ7SUQUTPgwCygVXOQmogAvnpNHRzJ6MipILMaSe0R2CQUSVN2iHeK/Wku3eKW/h1mygyrCYMiHmGGNL4BiRDaacCEewmRRJYBi/IMsYg7BRjDiSmFAtGYhgWwHhxbWMQRzUmoIETAQZvxEFsSdtUq1Vhl1QC7MVkri1H+yuym9Ws45U2eN7G0EhEJTjBQu5O7r+x1n4yftqX20//5On9PQcBgeADmMCQoaLSqRq/CnGfWkoYxwmpgXFJGKCBeYBoCkAumKF7MDBCWaKmja0R8hDJkARoBWVEJkiNIY+tk/JWQZ0s3KhkAAwTQCnMaXFKjKaj3I1f0viNfzS8yUBojBIQEMzcLswrCbzHaAsN0owdVCAKM8Ix4IR+VVbxXLMnXYi8UDuLAUjf6Ozkuq8rb5ZhalBEQaNN//YIAwb4BXMldL2DT5Fgo2v9E0MIZQqTGqAyA08rg3LOU0k9U7cGQ//uUZOeMkxEZRRP9SdA/AzlJceY7zdBbEE/7ZEESieKJ7STZ15dAUUYoPHeJo0QM2pXkazGItEZZLpTYl1a3La1+ludskjwSW/QM1q/X3SP//9n/1/v/ewwHgHvMG9RfzKQyIE2FZAdPDHQwyOhyyFAo0wQ5SIX0yfgHz94ha8j0G47rbNNUqZ0yluTYXofeGIfhyQSednqWmxrC4ZhI0GwWE3////////7BSFUwKoIrMNpRzzNKwZI1lhDnMZPObDD1g30w0ow4TOUzsDc70Bs2E4X+YmJHUlbLpDfaNTXbmdi3eBkFhYWCwGJiZqrk/fVd/2avH/4orqV27fqu/qogDA2QEEx3AkpMUaNXzZH1PQ0doo5MMBA7zA+wzAxi0DDMWMGN+CNMFUvGgrCoLmBwhPGH4III1jsRBLHAunxoTzuBajcXwBsHBZNweFnM/X//2//////6vW4Bgc4FCY9YdPmJcL6pqxKpUZkcZbmPIgi5pfER2eX5kJvhzIS5//uUROsNwqQSxRP+2KJZIkhxf7siClxHEi/7QoFYBmIJ/uyImf4JCgVaYHUymMW6eeQeCz7RVgo4yxW8fYvPWW/d//c5dXd/6v/0BIgpgcYPQYgYnrGMEqmBqvC5iagWIFGFRg/xgzicG0WB+YPJ/Rgqg+misBhouoeovDzlzEFw1IKe3GOTdaxlYzpwQJmQyOcOadk0JqYv/c7//T6v9qO6rf6nu9IacbjQJKMCQmMtLOAPfHIGVnIaDGF45EoQPXYXkkQ2xXycBVPF9Af7k3PcjeysKCpWAlfvV//Vt2Jtq3/6P1+uMBCEZDP7XHg0RWB/OEd56js3AmY0CoGvMCcRk8FwIjKDhuNXUQs0FhUDFgYSioaikGDheXTA6VLUaOeq0VzOv2z+deqDUxE6wmamwsxW8a1ahcaooKNLDDzxqyWlyGvS6mOYZrOl00PvTZadYKiszRSpHva8KgBa8wTAUzGxPfNfhQs32VQDUyUaMusHgwew+wM38ZWepSa///uURO2MgssRRAv9YaRMwThxf7oiC3g/EE/7RED/hOW13cCWuPDEPTECG/eQPHXc1GTbh81OLft7PT/f//f2f0M/o8Ytd2r0GHFCfZmz8emcrgsJmmibKpyApqSY2qJ+mCch+dBYehlEj7GwuBQdOUphQcGCzWZnWhgUAs+g1ECE37IBFqTZWHBz1hpKGGU6xorJa3jX8JMcVZPqqcid7Wsjr0LFE8gUWtiMzMKUF6S7XdD6AMAi1NhObMwGWg3WGiTMjeLMhwcgQkjmceCEZuuCkJ5F4cARUNAPj2fJZZQg8HFLKJZtrdHqr+SvFv/9H/3/91UwUcQJM5McxzZy7DQz0fkuN1qW5jJVQrgygWeTgXG0MoNds03QhDRa3BTMEiCc+D48FVJPkjc34dSocs2KHXGwCaEggKizSdQbVCMgsVUxhsWY/S5WRsc/eueJ9gbHN1au7Cnu6l+gqVVMXSENkosNFNesz/VrjEdW8Mh4RkwBh+zIxAYfofJPEcXE//uUZPqPg68QQYP+6RBHQbiFe0g0DWwrCA/7hEEChOHF32gQViCO6a9nJNl/YKgMCSZNnV/o2/7v/7vTd9X/+4w4UUyM5odRDa56rkz0TmJNRpenzHaBWwwZH+zZ7GmMQGHUw4w4Dq1bMpBQwsODa6JDgNnZSPh4AAsPJVE542BJDVP0NuodR2oCPCSYtiqzew0y4USnrpbAdVjC4Ef8XXl2lT8i0wIgSjFhQuFsJDMudpNBhT0yZwrzFGwTZ0RASiMYBNxPIoKaYgCObhu3aooqatOgA6Nvle5rf02/9XR/s/17Mv8YMHmEGjPSZ5Q6jZUCMtp/ZjHPJZwyVoZPMHCI8zE0wUgwaQhJMTEBGjv9Y+Y2MxVTw6gtmzCA0bWrZ4u57ORps7or7PNbROc2j/3vXWSqtd1fuuDefVqrACiakBe9LqX2TalHlpUQ4rZ0mWvIEVCrKABEiqph0NZsjAZlJuDGWHAoa+Z4xjoiiGAKXiYPYLANgIbgmIUUHIAz//uUZPOP0zYJwgP+4RBAgSiSd9kEDJQnCA/7hEEIBOIF7uiA1cHNSVyrH3Ck2BAat/0JTX/T21/3/0bC3+a/+j3mGdCmZn97jWZ4XDSGUX+iZoq0QOZVSDXmNLReYaRDxkSHVmy0CmZQp5rgWv6JsUaIDrw4oY9tzP+55XDxQwhCVBx1DQbedLkh6Zhz1DFhxzgITfUV5Y8AiI26mc1lwXSpN7jbkcyt49jTcdEzxCMZQOSA98oCDQDTBuJ7MQ1HkxXkTT5BWTZYNDApbzGwGh1Q0sYmTNgJCOw4FKYpi7S7z1LLe77Wfd/M/1bGf47Z/qZ9FTBOQ2sy5a0rMuh1KzaSOzA3yNvIMdrE2jAWlJNKAVIyhFQDWICtIeYbWD4FLhotYiEBKAu0k838pw5fyyzx1nhSicsk+kXHFRQ2L3LqUhzk9d1ZZrSZxjjCFsFlDFpGsFE3/XXSpfWprnLHzHIqKrGmAYEgYbdTsaGi4hlbzIHACGQYPov5gnFsmQsB//uUZPqPg4AuwYP7EjBGYSiGd9oEDjg1Bg/7hEEBA+Nl7uBMkCARtwBotQ9QQlio5+b12CK/XB2Jh1VN3AfFf+hCv+v+3t/RT//9f6zB6QhAzqBgIMrChTDhPcZE4qBK/MxCCbjFEeHNnAT4xeHoDGIDtPTNTsBMxMRPJbiIDVDC3ThrvbOVNdw1ZIhoRuCbDSFl23Quvuc22sWRbUhbyrVUfaVYduzxg539bk3dYsccMaXL3vQK8MDUIIwF1XDWHSMMUqXM3RjNjLLA+MFcmky8gOgvLKK4KlAqLAA9FnLtiNCoZQ7UKHcMFwCXc1Ejf260aEf19l3/9PZ//q/U/owJ0KAMQZTqDLWQhI1ZRvANXBBSjA6QikwKAOHDC5kwu7Q2pCkyGLQIHFWMDHA5lDUUfYSGCoOMzmrVDU1olDmniP2eQ6vr7+1Nav+yuL79jNlmj/qMErDPDCf2u40sVB6NqEazjWkyjYwlUShMA4lkzJgMQIpYZGYMpm0IEOJh//uUZPQP04MPwYP+4RBEYUhxd9oEDUw5CA/7ZEEfCGHF7QzYIOeQPEwrR4wDO6LFlx7n1rq1fT2t7GWlhN2/de99+24U9Vb0IVWjcOq7UdxUd1VcYcQX5qWtonP1X6fIPwJ4GKDAJBsGpyfkAqYXoACsCN/aCDKHIAj36q5Tk70BgmIwQaLBuQe/Zt9Ngr/4v7/1f/qZuX+77vkyGDZARplp5OKaVlAFm15siJrcwIgZAWC8GfsDn6gkmZtSB+bm9nGcFjioE512TNBBAaDBG9IzDNil2WsHSOtNqaLrZhT9b6vSyiT02KNfUxpj391o9CU1mZVjBchHkwzJy7Mcgfojf6npQ1/9EVMJqEbDBKAV0xzYCJNB7JPwSADnVBwvGBwLmWYfF+4xXVmHbNRfx33l2afIMOPFmgih5MKw43QbC8XSojUhnpQ9B+8lc00fph2kaU2CuKref3vfcRUpYuPkGmFEyiIj6whNZsUs1HmdDC3SnMY0MUwCQdDK0AJA//uURO6I4rITQ4v9GbBXgUhQf9siCVgpFs93REFbhKFF/uiIxpGiCoFT3B6GXZ/JDXeaHhGAXtlWOYmvubYP7f/Q30/7P/Z//1hAgBiAoYsahARFHX9q7J2/cnWbNM9sGX0CYZggweUZT0DzmCRj/JhNIJAZL3Ri8EBQTnBjADgqrE7q6xmouw5c+vzyhe7VIPYGtUI6msiLfd+yLG/Z1MnpEE0LHzP3/NHaGvtr/+p/tM3tuu/23zc9uyv/3+I5m/VP/IwYBgHhVGA2mMaTzYpuDv/mauugZLIdxggxB5oFpjyMENBjMALBbIDBwV1t5U1+6IAJbR1n54BJHtaFG9m7s/+5Hq/V//sV4cwPMSSMLfh8DWqFV85p5QsMl/X/THNwyMwGUgDcUFlMB5k0yYgpDCoc1EJKpcYU5tyh+wone/6wxyHCoeS6OcsVM4yjiiVGLLE9Ck2Go/M2o1MDhIDsXxCjfNOdD7nP22RcmcZuUwBioIpwvABlHSeG1Q5c//uUZPSMw3oQwxP9MbBDYSiSc9kED3BFBk/xaIkUhOHF7uyAa3yt5l2BwGCkQsZVgD5gsy7QCRGmbkg4dPYdgsQvov+pbIms/2r+l////+n/9bLmFRBBJnQYtsZmtMaHXamG5jp6+EY2aGiGC0rwa0QcphpHcmiEBwYWmw05wYCTaoeIg3Ak+7kJAg+dbShJcEB5dKmAZKJ3YKIxZw1blpFLnKnxqa6Y0XVuPC60BmiZixlW1bjTGvSopeBjAsZbagQA4mCuxGamropu1tim/6kYYYA1ZilihxoLoM+A6MYDQRVo2RQWgX+SmywxpV1uFlbl//3fS38X1/nbI7+r7P/tAC/5gPAZCYEC/NmefuW50iQYIZ94oImQsBKRgMwrQBhtEyodA+oIE7c1AVmYADnFHDe2sGjU7wq+YeyKoeecftFULxpBBdOsheNfQFkYodGj7A7j5vUqxFkw65acY6QxrEyz9zI0AAAm5aYIAPMSYXMy2iFTSaLoNQAGkxqw//uUZOiM0zULQov+2RA8gShxd9oEDdAnCi/7hEEFhOGF7uiAHzGvgNVBsCkH/gu41uCEe5Zv5jGjZXStkrVdb3fV9e3+9X/u/Rb+//rIAwXcCVM6wKYTQDg2M9cso2NvZU9jAJRVsxYIDDEIA5MNpo4yvAszHHQO/zETw2SDQEPjHH7hVhBeHSbDwswQn7Do4wcQTfLKrEhZasSXF2OuxdY3pUiOUbQZJPYTike56PaTZ5B7gWA2LUMAYDoJxh/KqGcLD4b0ZSpuXmQmCSLAYIV8Y7heYt4fENqjcymoKaiv7mrVC3Et8tFnikZM/p/3/+7p/W7/0/9mjoUwqUT8MfMtejaRawg+pBXdOPwLfTIlwCgysYajIlEsMQuAAyVxIzm50NCiseDQeLiYHMVg9O2UUowamXYYFIuhFojsESDBIQ6jzmirz55z9IvPrc5rCiGGHLrRIFmCoaHoz1VLDTq2tc18x0MSogDAEjDemSjGrlHOdwJg26lOjN6DRMA4//uUZO0Igy4Jwyv92YBBgTipe5ggDWwpCC/7ZEEHhOHF7uSAx4xxwSwrnTKJxYdGhkIaNB7jE7fH0tGqIZWwIBl0/66O+qyO9Tf//+7ZTi2ujZ/qhkwZIJwM83NODL6KQE7VtpCOCXHTTCCxEww9GxjU5CIMNdOw0VwFTP0RNLhIw8OTQRqDAS/1WKvbaSeePDTVBq5KZF0K3HTrFPGLG0IPWC6GPCeKOQhw/Yt3MAdi1WRcsssonFb1NGmHgNErRacQPMIIMExy07Tc0MiOp8bY0iV3zIJEzMEaeOpw1FM4tYMtpHpzckEc5v47Y5cjT2Mlxlz/N/v9PW7o/+Z9zhPT/Vt/xdWTjCbxQEwslxPOUIaLjlcpls1jAaeMUoCwTDPh1YxisBLMIFBxQETBGAogPxgHYBAYAGAFGBCAOKjrjQhRIYMiI8wuE0B9wdXIyMmhqVHXFVn16cXoUsoedSZF5WTuoStAcc+UwNCTbKnvCjgHFFsRXzSmAHglDH0L//uUZPCM82wKQYP+4RBHgUhhd9oEDfgpCC/7hEEKBSGB7uiA/Neteo42jhzEbVAMZsgwxGCNDKnBJMFUE0wKAHTAPAQQ2X2BgGr9jsoEubKRy920YA60++vWn+j+v/+yv//0J7EaDTZq/Q+vtQRNozN/DIc2WoyjLe/NluPZTJQQ1EweEFgMTaG0zAoQOcxUsnLMISADTAfQCAeACwcD2v8YGmAqyMJoDLIYCnluuMmMgfDiQ6A5UccEBQ0HGhMQMPnSIiUwPrVxQUHODJ8G1pUQXFhND1gpcsGkVMnzYTEbTdYjLONiYaGf/+oZ//wk4AGAwrEHsMXpNszFTUY8zyMsMMZUNwTGlQ/sxasKyFAJQw24DqMAAAwzBLwoEaBMDARgAyVGAFgDrxGANgCj5BaQJ0FiSUzH0GvcU9vVNMMfUcxNTF/cVv1L08f1DP3xB33ccL1P+rRe1/PV6yl9Cj7aaxPETxpd1H1Xcdddy1XVXVPWN3uCjwEEXHTMHgZf//uUZOqAA5QJwg18IABIwUhxrwgAEUgvChn1gAJLKeEHPoAA//oFVTAGwkMz8hwYMLljwTc5LBszXpiUMb1D4DCwwZ4x9EB1MFxFoTCXgJsHA9oWAIzANgEkwCwCUAwA8iM7KsoWJpxW7iEZyrRBfTTppPzDTS79GhW7Q+lVd8Ct9DGLaxz2dnqJlIlbHKdj0iDCbKANppkg1lD5zWDXMMQwPswKAdTL5AUMF8LIwQgNyID2aVWSnl+OMrFOgXjvrVYzr7fZZ////2fo/7um7qAAlVc0YfwShs55FGY7IlBnbqvoYY4ZrmGqA3xjAaJ/OIZktJZuADxhORalBbAxCBGBLfKWycfh69PIZxnZ6Wepyp/H/VX2bE3+xCv997LPQgwIEMz1rszdRNDQxSmNMQr0xpQOzBhDNMjUA4zeDVBM3NLGHyIqD8M5kYn7JTHKGMwWgL5Me/XyzOhR8c1TiXPM4JT8DDkg2EwHikTYHC5MQ4BEzgANTak0SZDFwg5U//uUZKwI00IMQgd9IABAQUhw7wgACgQnFY9/oEC7BKJF32QUdGgqBZ5ugDisUxR3e2iXGuvU2+pd/apP6bWURs50V8dK9mZ1C3SplRxaiAC4HZiVJFmT0+iaqjZ5uOiEGIOJkYDuOdLg8Y1AJhzZKRYQuUMEby+pZ307U+iYIder9v/8z/////Vs6TA7QnsyzR6HMr0gSTS8cZg2d5MlMezBRzGvUzNmMD0wok1DMsDdPVEzigUw8tEDUiPAkndKRHRMKhcJB5ItQQVcydUhZ4AalUbdlZeT7Bb0s3/LqvSyZTzWe2hDU/3RjDB0HDZrnDB2huNW1143LhdBJcEwAiLzIBAuNGcp6A0Yto3ItjLP+PG1M31QlHyliv+O/q+zr/6f2/0/s6YAABl6qkwNcEkMWMNfDFI0rgwuBaJM4BEcDBpQgogvk4nDAwzuAw5Fs2lMaipeHMEv5X1H8kptP1+hCBzHXM0f+62zq+tf/pTVp/oXwBg2OhlH1xn5mxml//uUZMYM0tIJQwv+2RA8wUhxe7ogC+wnCA/7ZED1hKHF32QQM1uazpVJhvh1mAGQ2Yh4DQBpkRozDEoWOeTE+OD5hjKlLmETWy//6v9n/////+sQq6u4wHkJEMShPjjIKTCMxpplENBmBQjFkgJsk2s0rEQy5rY3HDky9YnEAkMccuzaK34ZvVbHubpeWlw/mh6lJpYKa9kvFAohaS83N36I3XQpBAzWysc48jXvdQ6cSAzcaTTZg0BZoCsp4xNZx79hzpOBo6ExgaoYJAYq0p8FgooFkrOJ3Buv3Il21izXa/9mrd+/S++P/+j0f+z7kdMCDFoyEM0B1YfOyCO3zWy9s84b081MpVI5TE5Sb0wEsE4MH9BLDE2wDwLA0JgEYDCYCKAomAggRhgDgAMgMjrVBKbgCrJZpIIDBAHK2MIQ2E0GTtZLsky9y0XEI9bElDQHuStR9wY6Ghs6s4JmTFD5oaKXIQMYkLta0Pl0ABoSZh2INmRbBAZpjWJkJtMm//uUZNoIgl8JxUv90RA7IPiBd9oEC9QnEy/3REEBBKMp3IjQCSCuYY5WpiVBYGDkAeYHgEBgPALjwGhaQIANpafVgZaWHV10gH+rfs1f/3aev//3dns//QaSEGvmxvs6hkDLpoZh4DkGH3pO5+th2YYkIIvmFIgYJgfZAiYG+AyGCxAgJgJoKYYEYAsqOGBXgBjfGBlACTvkaoy8bj2rCc61DiQoMBXBK96sm0wtbr0nmi3FLGvehr7HMqElTFtUdMlyLEJuS/E74gUCMu9Fb//9Jf//pMEUBXzIiydIxs1JHMiSJUzGQEeUzCYvCMUOBCTAigOcxKcL/MDIAXjCVQ8IwBECuCADNoiAZvAgAFX+dQXHgy7vHyOJRjKs3hrp6R+rnml+9Rw3WG5aIeepe6tJ5ZKTmFIFY3rqJbu7iK441VGSahO+Y675euutBnY3eXX2TiKqVNmUkcTAgRJtAIkLg4wuf//yh///iJUy/CHgORsfqza91WMxyU+ANMIk//uUZPUAA9wKwY19IABG4ThxrwgAD6wvDBn2AAJaKmDDPoAAlT7LVtkxsIQHMDmBrTIpRgsw4AGOMPRBfDCigFIwGsBvT6MAkAalymAdAOokABhtUGBTIB0XDCy4bBEXMknABUAxw9QViRo5CQqBrbCbUn0PQKuQtxNZYFHhas6HySWZODblHgyfYIzQ44kPyp02otSYf//pE3//JAACAAAGM2FGdKURZlVDyHtCiYZgHXB6Y0lmvkCsYAoi5luh6mE0GsY3JdQ0OejpDhgSgCtdMCwBBXYboR4Y6riWs5rjm5Whk3cI7T3EVP3Uz1PXLRDLKLD3pS/cXMwjTTL1jJj55jmXa7425Sfa2nu7uI+blop4S+iFD7RIyLxMKE0gu0UhZhL//nj3/+gBj+YBECSGC1KmRt+AvgaqE+8GMfsuhiIYZYYTWEPmKKAWZg7QliYRMA6GBbAHRgJQAuYA4AfmAigIyIy6pt0RAOhqHsUbF++pbHq9YcWKGPRWtKTt//uUZLeABF8MwoZ9AACPSYhFzyAADHQnDD3xAADUBOJXvBAEplbCWxHT75fUzsPdWvdTqAgABgdhkGQOAkYaaFBndLMGieYAYxosRhpgVmOMAUYIwA5gfgLGAcAgX5Y6HAIxmz2uvuWtACABhDgTiZhSSrmOqrUBuDLrWZfIqpmMkgfpg4k/m0sGsYqQ8ok6icrpGRCN0PUEYJfqGJacKrIyvfY8lUbHIb1afT2i1rOLWWNIIb6em5q9qpLatzaq1bd5fACQD8wKkhTE/dNMwVqE1viHzJIBAMOhNBZyCmg2kafTawUNBwMWMX03KImRv7ltVcxgBgLqYOciLmDDpIZouRpEZTySAGEZgrgCEg9qAQy4ZA2WCEAMQQlQxv270prQVfxnU6dPXt06/oXOavcrX7ftWj/9en/kHliAUDnahsZdSEhmPMXGueDEYOIeZhwThy4A6oAcKwcADN3bX1R9+gbVX+y3u////+n///v1/+kwU0AOMwEHsDGdGIA5//uUZIuI0tQJwqv+2RAuQPiBe7kgCWApFM/3BEDZBKIFz3QIetR7NlMNGzIKAX4w9h+jZgAkMPZRIw6geTNcyBQLLrmcRoTAeET0B027UYwOCrvfRRNaO3fYmS+9VZZ2l/T3nfXv+7VV7ofNpN8AYGINBhGIaGjKbMZ1Ky5qjEmGN6AoYWpMccAWKvwxcF5gsDigsB083bm1zj1LQ9tvv1f/1//+7SDEAmCqhhRgsi/kaE+RFG+nF/RqkYmsYKSFxmCAYMaLwP5gFHgGNOCCas6AkaV57gEJt8ek4OaW2U0aGsnDecZ++s45VzH7v27+z6qq/19td70IMRC4/GZjOCeTNYBYY08UfTCqEEMgcY/8JTBRdAwIAIBIhG1wunTfyhQssk5cKwiuE//+jqUweYBsM0hBMzW7nd05+8sHNpmH0DGXQEYwoUxDSUD7MKcnQzcQFDQOgDWYgGDDU1nU3yUS3RimfivaE38ijdUtmUtvf++rUfsO1I+lDaxncux1//uUZLSM0rUKQoP+4RA4wPiBe7ogCkAlDk/7REDUhKHFz3AIe/j4uSAAGCIEqYXZxZmMLvGxSgyZfCQRjkBOmOvEcuF5lXgtQGTEU0fXdehpX00Pc44n//////////1CijJgwQcOYUesCmQvLfxt3wbMaJSY5mC+BhBk92xxQRZlm75ziJBmXoLXGCCnjKL3qYwY90UdXelbll7Fsdpu3baW2IbjPwjNqaz8J1WuUBSyd4YGMxf51u0iCmMgYgM2KRoTfcPwMNlQMxgwuTDeSjKILWah+omONV6HiYRnyYUWZrcd+aEjxA3/07//3f+Q/s//9v61MCcC0DNzEJM5d1StOUxNaDWAmNgynoCOMMCHFjA2wzMwfsVxMIDATTAPABwwEkAmC4BeYD4ANIWMAaZbEzAYOj7BhSKj1BCViiHMXS4ercuccNdWRUhj8VDLyy2n6n8LtV6vkxikrWsag9mVVIaowrBRjEsR2M35x85jUYTNbXMMMsgAxFC3DDVC//uUZNcM8q0KQoP+2RA3wPiCe5kgCzQlDk/3REDyBKHB7uSCpMD0DwwNADxgAESBHXWWvxw5WHj7/anTq3Uao2jRRr/7+/t/T/+5Pp+7WYEvAPnCsIt5gV9s+dsAlXG2jcdBqUNOKYVqLhmIAA/BlMAiYYjkBFmO4C3piwgH+YCWBCqLmA1ARQYAFmAWAS6OBZQM0DGzXKU0YfR9rXqdxvibh1X1VbLY61dsK1T+O5bbpiqmbuT0TEPpszw+Irmf6n/4a72c8xue25m99XTvuJfK3Vbt0y1e99S96LlAyVWGIeSLCIFAVOf/6B3//NGFohQBjxA4CYyYUBGTKEghhw6XgaRcLymJwgRZgJIIYYT4F+GBUgTJhyQQ6YBOA0mACgDjgmAdADLLzARQAB3SVqsYVRFrospK8fNK8UvxmPea7zG//szf3itaJf5mYX5ldmS7ZrJ7GM+I26uzS3z3u67NW5Xd5106l8jt35bfa3XjctrztrN57aqvle/ncspn//uUZPMAA3YKQgV9IABF4UhgrwwAFAFPBhn1gAKBLaDDPmAAyLZQwQhMDhL//gZn/+kmATU1VGIKaAb98UhsdfKH8PEAYAk/hoqncGTyZ8ZDYUJhODOmNUCKYPAUZgFAOokgIIZg0/GZ0ami8Y1Yxi0ex/7fTze9vT6f9TGye3d//+8wMwuDIbI/ND9CE1ER0TOzHSML4NkwFRkDGlAjMBcGIOAXHANSgAZnSanN8qjHP////+3///////ZQYI0GEmLCudZljbfKcRgzRmeJJXZjswR8YBp3hqBgQGDANEZkgOJ27QZ+AAc9TJM38mqW+jQpFXt4u11MsYgsu5euz+16V6TNVXYY+n2Ldd6Nmn0dqeCEKzR6tzM+J1NVYhM1UAgTGhAHMrxoF/cIFQsZ2XItUDO7+tTH51iTPiq//////Rp+1dVmZmMBTA/TF6ij0x4AGTNM5RUjMAyNAkCHTE5xD4cGjDCkjP4RzDUkYGBJDtt/KuVu+5Pc2ldz6fTs//uUZKaI0oAJxTd4QAA54TiA7wgACqQpCg/7REDMhKIF33AIGf2WWU9vdZdo1CX/Xb9q/RqMCcDYxUkBDNdcuNjc9Q13SgTAZEOApEBqJGRekVsZqprOSgOkeuVuo7Nv3///Wn+r3f/////330GD/hehkPDY4aeO21G4sQB5rbg5qYoaAoGOuGUa6IgRhgpUGL2FeZghAIDVeGjyWcItthpK0P3qJHHop7qUWx7dG/Tnr+/oTT1f/fiiWeqv2MVQgwNIA0nuYxd22TagTjNOo7gyVggQaA+JKLmBus6MQFbhXHgFvuNc87Z7SSWf3dVf+9S9VX/9VKowMARQM6ha7DKUq7U3snKKOMTHlTCJRFAwJQIHMkrBSjA/RM4xGsApNd1UxcHDBg3M7GpeL7VZBFdYvVjMPDM+kWN55VMdDg5rJ+NppW1b6RsUaRXTLtHi0WUlhA0ppAOIaBTrjTyzVT87BtOskpjWzKWSwuABBNdV0YsHZvfdnoyyH++cG7s5//uUZMsM0loJxJP9wSA4YThwe7ogCkgnCg/7ZEDdBKHF32gQmZYygUhwVYxUnJjAKqvx3llz0lqXqO0eLso/2PTXZ/6mdttH/e+p32/9axGFyCHJlk7KybdciYGaIUzJsqxogZBkCcmD0bGbNIdBhqiVmdSCsehLmCCAWFDYjttIPljdlGAu24GkKFBDAjGBdACGMSmhilyxwSKRJyx+6nbKXV2B2t5Uv14j0WcXILRQ9dSblugYCIMpisG1mmOlga+y75heJRGM2E4ZTwp/8PBeEFum82VhRFC6j/lRzyQVTVrMkk7Hrveru9UZ6LrP93/r/t//9NUBzBFQoUybxYFNiTPFDE/ZuY0Vc+DMQ1CTzC/P9NIcJAwdT+TH/ByMnKwE8DQGDxtEukuyqTjh6mS18XS3Qm5mrYmpUxeMtlW1No9PMXOxRKhXh9pwU73rLZ40ZZEZxh02YrkgbhTAYwsF5p4uaGTotOZAwbRgAESmOSBgFqg2UWbGtJSNCTm///uUZPINg6MYQQP8GjA+oPi5c7kEDLwlCC/7ZEEJBKHF7mSAuAftASVOcu//fTR0b5pbtK1bop2UXp//9l/o5L2sD/5hGYbkZNslJGKeuyphp0/CZHslMGJ8gthh7pEmaKBWYMyVZhzA8HCXY9EAwfMYQHRjUzAYYiQeHwKVWXG46HD4xzWknz25q3vTHqaeQMFlJsJERa3UK3mz08YhClBly3kd5JcetCiYxoeGdTDAoA4MU1Nw00GWDLoe/NF9QwxEBBTCqSzQ8IgBoL0mKZkzhiSessx7dypYo65t4FKjxcolg77WC8z0Iqrqp/9S7aa7NPXad/1qMEwTYJaMlzdgDUmIB4wGCyAMT4W3TF8gzQw5F/TITAHMSY/UzGAXBySNeAjBA44AzVgl9JEZ3fPzqbARGLTCGR7oLhEnmKCOZUNbTUHhiN7qybmuY6lm5K25kVR4QQenaUKKEpkg8tPT9AAAAAsUbbbTBgFmU6Am55bGSvUHSC5maYGmF4WY//uUZPII0wcJwov+2RBFIShgd9kEDaQlCq/7ZEElBOGF7uiAIBQhsLHHDIs22+44lSpngeHTLe+/i6//1L/b3bCOn/+v2dH6TCCgvkzJtZDM7/JEzJxcHc0F9fyMQYD9zDkZbMSYIExcAGDQaA5MxwQGcmTih0paXqa7LmkWMv/PC9mNIrAlU4JniZDa5yFCFzCzHyaTihCefGGDp2/GFC5Mkw80UMYVspJPaxc6YICh3FjyWuCtz9SAOvurwsBCYHhSpi2HymCEiCerjQY4kEYAJWZBAUQgK6oFow0rLLyzj7btE61J/WM9KNrrt9/q//+zv9qXf/qx9NVpqqMAGB9TEVFN0yDBKlMr2bDjOBCncxA0CnMo+dOWAFMYKQNmBbMenAFAg0HKhNQ2b8eoxaUS9K3m3SJwHz5JCKbHNpbPgdZhxEyk8fXaNDITtebkBlyHCxQSwZkVnUuE9mbFjgukXkVIfYt54mA+Mc4jowC4CjBtg8NpIWoHKamGUBm5//uUZPGMg1EMwgv+2RBBIPjNd5ggDig1Bg/7ZEECg+Ll7uBIwOBWkJ2NrYodbEpre780URcTYMWsXs6GvPKOfc3u6Lau3kOr/+07f6vb7FWtCmqu/MC1AgDFhB/YxT0+cMr3QuTLNw4IwX0GeMNovOJgiMC5AMLQ5CVg7lgAHpdS7lN5NncfWZd3Yld7iX3Xm5Ydck3t8XV697pN95QaOpQvkrNrmKel6DUMCsIAKn/GguZuCG9zUdKDMNsNUwMVM4AAIYFEIAI1oHqvmTCoyIfJkrWd+kuxXX7f+3X6v319t37P0f6FAAAJqerMDlCiDCMUV4yb0uPNK4TkjO2gU4xTQCJMHnnA+EGSs0GzYVnEnBikLhjcj36s9lNhz1k9ikRl4Ui5qXaARjwxO3tLlGHhxlzDLXUzb67WNsqcpdg98a90ZbO7x5BndPHRWVUOBdMZcOU0gjaTEuWcPTtqNhw0CpZk34gSGGGDGEmCxFdlvL7oy6YPWeY7Vb2ZVq0t//uUZPCIw2wJw5P92RBEgShge7kgCwAnFS/3JED2A+HF7uCIalNv9/67vs9HuYJ9V3WS7jDkApk0dk3ZOdASfzuaZr83U0vvMYPD7TBrAmcyBAB4MFlBVjEbwHA5PcMwBjCTU0FoYXBGa+AEXmpcQeEpAy6nK3ihuSCer3ayzbf5nIZirnFft2zP2/X0/4hr/5647Zst8av2e9wc7+d5WKv7XzKq7W8ndbB0gTFVTRgNA6iIskw41BjJ7RvNUfHM3i2MKAxBXEABsa4Asld/GC2uuuc0eq27DjvY/md6UqQlte5936Ni//T1blY127aYAE0tVGBRBmphXi0CZOOuXG17KBx8DXWGg6JsYYoBBqQAxGHOVCZBYHQ/lAzMoEC81bsDTkav6w3ks5yTHTblnSPpf8rX1aM77pxwB+dE0z1v1OjWz3tHaguK3Tv7wBjlra2Nwe5lv+Ihi138l+nTTretsxlE44QSc04WRzV6YgMYVZQxrhAzA4DcMo4B8yyI//uUZPqIgywJxEv90RBDgSiCe7oSDuxDBA/saIkShCJl7uRIjAJ6MTa8NB5F+phpsRrS7S6ur1s29Wi5nd/2D031fFvu/7f6RgMJnB8jNAgJw1U14lOBbUETL3U+0xBYMcMNAi42AgRjA3TLMDEJoK/wc3GEBxq5mza1YgO2EnMh1rHgJpTHlQEagoLBRBoqRKlmkxdZKM4+lrlPzGxbhdJliugVUjsvFEwum+hjBNehQ9h4M1TMVAPjAFMSMzoBg0Nz4ToK/TTUSxCbxsEAII0KxBDYqObgDObooMCiUOf35X72eXT4q3/01//9n/mr/fQqMC3EBjCB4po1qQ4qOQ6OQjBcmB4xcoPVMEuEnjFrgG0wRYSNMLQAkDq8xrMYUmd2ImvMTMAhSG4hY+57fKbEIsbGOaVRJNQ5CjKn7wRIrEc2UM2rQ+FWn2NMnSiVFUJi4bwFcis6LKHHAWj05Bwog0TwuQBiQGnpeEZELLBshKaGpuZsYm4bQE2h8wIi//uUZPYIg5QKQzP+0KJBwShgd9oEDXAnCC/7ZED5g+JZ7uRIIxCwLEgWNB91EKb2saGu5qWXP4ulgVb/3f/MK+z1xvbWhNzf/T1L/3iEYPwCTmamjoRjjLIAcvmKamZlKpJjIYLqYEuJ+ERIYanNOT6IYQIAY0gKrCPJwsyLzkcClnMgaVK3MGbctV6uuP0bMf7Xz/j2p71C+t/7uu058v6l/e+UXfM+fbtBlwtL0A5ite0nS9O6ae70rK0fT260ZbjjaJLFAOYbzJg/TZwCvJwMVYKXgEUAKrSqBJZJaMehhA9wq6vZqTRzCbOWW5a7j3jFf7P9G9n6Lv//PVUwRQNVMLjiWTFLJL857QanNR/REjEmwswwAlljKOBDMVwyQzDAYz1Qk0kLFCAy1NUGdmJPVfGjmhseWc06IBhNBZU4P6LBrjR2Glw6mEy5xLVOe+cLAFAttbvXFzCGsgYkhi8IMa6m+JndKjIBKpkklBszwQs3+ro+ojo/tCwxBJkw//uUZPSMg5USQYP6QiBDAShhc9wCDmBJBi/0Zsj4A6O1zuwMAWQwmBGGxdwtMmFE4Cs4JiulDizWakFkHq6Bf07EV//f+v/8jYn20fzYBFTrJgSYGiY5oKdmHhHUhsG5A4Z2YPAmJdAXhiVnQBCcxmt4xyEM5CCetu55mPnO369oN3EFmWUqAYOunGrTs/S+oM5EPii1HdW6USzC3TKNPopNOvCWKOzLZGhD09SQCOm2jBsNDJKYDtGEDy1OTwZUAM9RiWSGSwWFelBkcSY9E0Gi9J832twsQfZQtdX6ew59dXRhL/Z791id/9vrMJ7EejHCInY3AUuyO2mUzTd/xpAwVcP/MEdkwywQyzA/UoMmEGs8lCHqICgJzwYTANrbdaLP7w4uvbQLk/i3D3K+aipWb/vdfteO6/moPt//+XDNdou5ptNG//V914bd40Ha/6sYe5oR8ml/PV4/fPtstjAw6Oq5gymFxzU4B+PndNMhi6BDCGkYIlQRUrCgExoE//uUZO8Ig18JwYP+2RA/wSiWdwI0C/wnDy/3JED+BCKl3mCAoEXve193Vy73MVz6pgs1n28UtR0f/pO/2/3pN/9kcgXzBMAagyrcrINMKYVTfMUlw1VYbEMU7AMTDlQ4M28NcwpR2CJXY0atFocUCgKau5/0lnCsM44w/BFa4v6vESPj+dfqLwk/uLedZHy/+Z05XiAbtCB/Ju3eIHP1JlHc93ccre8f88i22//zm9XM8prWtoAYJQQ5iNmPmaUt8bUYhhlcIdGNEEyYOvB8ENhS8jMEHI0VE1ht63je60SrVL5I6MGCmX3f3I30/ov/b/d9f6G/9CoAJKKqYOIGpmKWpn5lNipUatckqmeJlu5gkAXYYmS8fqiWZauOcXh0ZggcEYYAGdUpAco3BQfWUUHFtLIOPYFTVxfUgiTJVGEoVLXKY9MYTYL4aa6JHc5qF5XQAKUSL3LcWkx1RaiXs2gCKVpjC4JN/b8zRw+zR4E9MT6vMvxJMKSgFqHaeJBD//uUZPeMw44LQQP+2RJAgThxc90ADjQpCC/7ZEkJBSGF7mSAEmLZtQJqjqqN8beZrbSxvq3UOR+wj+OSvsT+r7vo0N7kbruuowQ0BzMauKcTO2x5EzSFA4MfKKNDDygX8wdY48pHsxbmUyhCoLEmDgCVRMLgIZLKr1OK3+r6vxBBY0BNawKGo42KMeLvQBBqSVb3BiksXENJgVccEzjqXq7hz4bQqlhN7SjHorWRoEyNAUaggDAhBoMN4qAybEZzXfKKOL+4NSSAMGxwFwTJdAi0C801Iy+fUHRiUB4daiMqAECiqP091Tada9/+593ur9RQZQS/b/9ReiWJYxxi8jPCxANwI1s7Vu+zLHq5M8UokxbQPzM/AtMDsbcMDlDAcAEAOicFgB2Xxfsyhc8vvf5koQWlqHMdqSXfNNILPPr04vpdajtTf0Gbza7v11He4U7Xx1YEGE+CNhjZB6MZH0bimVdJ75kKpeWYyKHBmEFgIZhQ4EaYBOFjkwLIYBgA//uUZPIMg0UJQrP90RBBYOiWc90ADbhPDk/0RQEXA+GF7uRIQFryUAKMAGAJ0w3HuUoaD6jS7VSKWEa6WC2PaswLjjVKkInnona0A2KvnVDReVFkEvQlTkI7E/vIlWKtrFzaI4sA/xtyyNMuPaTWbykkyvFJ4OUigYDJYRHwwwQBIMisEwTEhAcExncTlMPoBYjAAgE4MABzASAD1AIYF2AIQ6OCaGpQaEslkw8aWcXNzCkC0tebnkG7x+hNybjZrki8wVhSnolR1labUD1tQq4Yzdr5IOHXUkUujOKztT7lbgqtpsw6ghRug0refPr6RieNj7jY1Vo3RM7rNTyS6CDXnz72oQgf01dKHH1GKIaq0MRRRPsk130aqxaF0k7/////////9SDv/////////9SgAogAIpQoiaYa+XHbxr2xnzge2aviHymIZwWBxKS/4Y4uASGHNABxiUwP+YgYBPmDkBc5h3wBUYCyAgKxmBRAGKChWBNwMeeNmoIaaOMO//uURPEAAtcVw5V4QABo4ShBr4gAGgYE/hn1gALqL6AbPmAAOKwmtZ5K6yBjY52p0W7a9li0d+xXciaX4vmMcmSdJxUlHBCBAkayrC81zrskoVwst+gWQQfG0+AJA2G5gWdqyZrSpkrZoLohhzsac6TAkk1wnpkJVqdJtL3Z0vqBl761yyz9pY3//iE9//qElTItWak+9BgpMw2TADStCXI1jVQLNPvUUTB/hl4wqwAEMRmCbDCQATUxqEQaMIyA3jAmgDCKGA4gJ7MDACwGZdKhgHOPuo9HO4i53qIlHjYqIFkIpS2NFWVEIRWD4xZ4wc7kOdZhcimQ5bnJQUUWGXE3UxXY9CI5DiTi58iGMeQgiyJOqFc9iVKWejkjCkGucxXYgqdyWV2OawoxHe6ujIpF/////QQd//lRKaG0l51oAwGCansaYo0JiMJcGXWcWY1RCxg+gBmZ8J2YGYM5legekgQAOAJgYu1DjD70DNAdpq5QPXV1FCFVziFhrNmE//uUZHeABVVwQQZ8oACHqygwzwwADgApCl3xgAEEhGILuhAA0+VzB+ovIpBmWEMbDQvSOe9Feu5HEi/mlT4pwjBiJ7J+RnKnNselNJM2NxXxf5FLGpQ2N/4DNgwYPEwFR//x7//8usVVlMGCD2TGqjr8yGQFTMmxW7DM0SewwlsBXMCFCBzDBQPggCUjA4gHshAOTAWABUuoYAcALu6/tjIU4dM1h6hRsDBafecfM7Awavic2sMSOxQfLN203uBxxEVlGMJIAQteF1ElFZB2cvqbERwVysWZVIDAcDDLRtDfvpjf3iDudQTBwZgsdZmeIQkJ6C7oiwCsRi3a2RFDqiWmJRA+2tm6v1+LL7r/+jFF3ImWX////WptTBuQf4yMBKMNLPWpjHmoBM01AYlMRZAYjBQxB8wj0EkMmesNHyHMUB3MQgLL9ExpItQLIoJQPKAThAqkX6Qo82NogbH1aeXCY3Lkf7feGfOpy/lSI/2uZn6+TeTfMydvNvlpG7V8//uUZDOMg/dcQQv9GbJIYPhle7kSELUnAA/0Z0jyA6KlvvAAr6ZLmeh3zVUY/89c71bMQl0rhLawqDskAHiDAJBUMIMlwxD0XzK2TFPDo0NZBLMAlFMawGJM3+BCJQRRsUshRp4s+VxKI5Ao5Q89d7PsrTWX49WpVHpO/1L66v3qb39KTAhw8QyCliyMOod5zHOpq42JUSJME1DDjAdhU8wTUEiMqcIG3CMCyQAxgAAGTD4NnRmpudotWJ+tc4Al0iIq8q01JARhmhohn5itaRxS2emeS7i3pbdJUBZ/tPIzNDzhmTX64iniV+9OXZjrmVwmxkrg0tcshZBfD5fsGvB0EXL4udKM3TAe1VTZhwec/TnARqGsdTHEa+ZpFo4sQUEBQFqQUUU9aoXLiqyWmpGK3yTbvUyn9Po1d3/q+d1f9CEdNCEVACABg/wSqZFOYAmnMFuxmaLeeaFQP6GKBAepmd6JnwThiGY5xuIhgkQIcNhYAIw2B9mlHqCqYzML//uUZByIw70ZwSv9GUI6gOiCd5sQDslhBi/0RQkBBKGJvuAQwTnOg6cvhXOA485CGEqI8Pzqkbq//WsxpNn103+8l1e8jy8V27nu/0QC+GP+bHd33tTx9Dne+RRCd/ZlfvzhKsoVApMYG5N54ANGMxMmeo1eOgrsm6ACNpEGt3VDuBnC10W6aEE7NF6NPfrvr9WrfiDlKfq/dr/+pkymAfg95iaSB6ZtqR/GZoLSxlSZIiYRSCemHd5nDQiGBstmlIfGKAxEQUsuFiLl9Bh0VdAylYjugsHYZ9XRr3Td09yKkzIxEXd2Z22t3cjsf0Z3Vn/NlO/nIjR2Yuh3d5Xk+sy012d/Wr1I7oV2GaQodoZzzp9CQABj5UfMpGXPrmFHuGglGmdgmGBB0gpwAYomiDFLd42mHcKzzNjVXpOBJq2QnKo21019v9f+nq20e3sT3bfsSmWMEPBYjFfBYAwxM7lMp9RcTEgiQgwsECkME3nOPApMVorMXA0IhDGgtQ4g//uUZBYMw08Swgv9GUA5oOhxd5gSDmBVBC/0ZMkJBCFBvuAQwDn9mt0NpLKU+dI+qKBF5gTE4mYYp2qlS6s8lN59BtbIu0gdTaxguTcsRkbXHnn3libqnSJ8vaXm1I3sqinIhQDDE2ADY6YDSPGzw/aMjFcwshSbYAzTNEATHZVKRGI2VvToltVdikI/1eltVX/6aPR3+lW3196UAMAmBjDDqUagyBhC+M0UStDCLC90w1IGSMdH3PJBFMpnlNegYMSA2UtRMMMgJbwWJBjMSrY8IQRgj/PyQWTMkO4G3OsbMRLds++eu/Z94D7+R7//ll5D5J7W5zZZd9431T7Vs96df9vrJ/+jp/cBano+tCSd2bm55qG83OHOi8mZYFmBIykU2kPESwQB2et9froa8aOeu+YDOxnVZvYEv6Urfezeru03EpLt56GGVr/bie+7uidMIYIEz/zRzOBGtOSmes0YW0jD0EpMYBxOBhHMZAiHolO/RC1UwZfIrOrmzJWZ//uUZBeMwtIJwovdyRA0IOhxd5gSC4ApCC90ZMCyA6HFrvAAKrofPvgmxNSqjU1vs581qc5jgKOeKNyRS4YOlWPUfSyg1XZsZzPeRY5x6rBAoB5A2ZpZN5rTL5/EoGQyIAgKLaFRRC4Qk7ZhwDzkZrErjSv7af9Xp9X//0/7O/+6tqmgIYGgjZikW3mvJOydekJBtbKpmO2B2YhgYceBqYNKAZgBGgEUbZGSgJLyjMLYMEwifS+hqzHsb5cCISSsexts+tDWKRRwMK3LUIY4CvcIidjnPU5+1taEuRJUPUwCpz/DDDGSjTh9j4g2AVlAgkCLKo2nFFJHUlIN3oCDuyoUahLt3v3f/v/2UQAzPVRMTj/UIMilXw16yuTOxFcMI0Hwwo8AeKDbZNMLjDzyxCFzCm2aaFHVZJLRer1JT1r0sVWgnXPU6NheijN2JtXprV7f2XpAAACqjjaIIKqwgajdUU1+LP6rMCBJBw1JFpsLl9fNq0K3CPQ1NrNGv6+j//uUZDoIgkoHRLOe2BAygPjtb0sTCwAhCA9zBEDGA6GBzTCI/v/3ej//06zB/EuBsSBrHq+nb4WIbPgNJk3AmisAO1BkyLADToFLvq/Y0ETnqqxV7LgiXa8/tCiHRi3pVtbc+ZZWtaK7D6kdoik7VsIvc5lrbQhQqRFXSiULdVjErQ+1HA0GNDyk3OsS43tFDPYCEO4DzRwG3gvGdViR9LP/t+m44i1fQn//b/pySbf1+ohZ+xUCDIQET2s5DeGMROl0Ks1JRkzD1C5MTR42YFzF4cNZgAEBQaBzMy71UBhh4SMpME6C8NaGXLixuKOc6q8rrE78W3v7UGbaC232abr6G2SLjkX3fJ8ADAmYDZ5h/JHV0+YziZjYPClgSgtxU80hzlBOMtYvigcqh9w1Kv9urb6v/f//6PvWQBggB1mAMyCY8bHhweDBnzVpGmotGFqADRiGFJVg4+kryYT8kyZD+6YPOeJSLzYiF5jTnmNA8OyyEUR3XOYei19Gur0T//uUZGUM0p0Hwgu+4BAxQPhxc0YkCpQlCC93AoDPA+GBrhggCndwHSkl3k+Rd7HvYw/StCo73s3DUTyRoMsw4yEIyQ0MZbAuFqcKofhB5czH/3/mXzj3OkP3+r0U+309C9nt/0+pWpUAABmlmkxGBjnEnNx7DPM1qN77cy0KiU1JNjpdV0xVq8sd+tM9uTSsJLKizKbOvd93Tkv9EUF8w+XfpZt0RRZP/6SAHQAFlsCrQddF501uAnMKqQsVidI1QpesgCdIPYGS1qy8fJCpsiyh2v071/9P/0+//9KP9/vbcwDFQKccbfIgfoU+IZWMeBRAEoPT5gr4lQTicaXsuzCDhhtoeMNHLLCWePD2mQFRbYvYt+vS/bo/M/Yy5xtOUnswxNuv2aXuqK6pi01GXXQRhg79uMdEBk2KFYczOtLXdBubvtJJZym566mfS2x/93R7pH8Z+hj/v9Xf/1IABR++utSBp1sGibUfbwBpJ8g4rgm4jOS9HpRSf6MbZLSV//uUZIwI0g4HRMud4AA2gOhhc28SCTAfDC7vRADPg6GFzbxIODGTNBsWcHK1OSKdLrxju2pDdaAMbI3dHd0+ds9nLzz9LqOBgEGtZiV+dGKHJF48skrRXKSjcUxhkeswkUagZb7+91H5D1a/J/f+77P/fo8rstp3AQYHB+Yg3ia4cSezYSe9wxnchDsgH9gQ0ErrOoeyf8GDoOAUKBYqHWNE6TIOZJAo9RpJkeeoVUy1K0nlLKkMtyaBY43SZTaLgAXWRd9gk8pi76HN9S2JeExCk2DY9isF1lKyURH5GLwPB2ypmMeyxNGhXXT67P/Z7+//+/0b+ulHVckwFBM1OfEyMpo/b7g5eXUzgAEKnwLLhluCBUlAYzPONaGQWhoDkKskMREy1crSM5C9joxSc9FMlqyjOc0jJXdz+uRTBJbRc5nmfL8PXczvmZnqcJMGxasRltIRnWrEp8hT9OP4xkvmoBp9GuxtpQkv7tAxMc9oc9cfRA8UuYiiEbw+lLbx//uUZL8IwiYHRUuZYRAxYMhxbywgCrQdCC7zQgC1AuHFrCSARCLlzd239juliXd6f/Io2dWn7PX3tpq9CuMMGRAMZLKO7zcPSuPONzEMHQjIAMMiwAMARUGgfZrBT+sVlAwE9q9xFRmXoRFOTYWKG/1yVwyUaG5mqK46XXOmSKbamTnFzgcH5Ez2m89dEiTJu0Gbsg9cmO0qCIWLzsdbCPJqYIg5NIZyDJMzNqFKx6doyEaP7WmRkzAkGxAw6A1XM80c6a0eK41ML1ybS2AQ0EiAInnhFjKZ0MJfm0LRQLHNKilzx2bKPSNPoCTHmUmCO+6wjtstZvXIbG2K83UhdSAJGsYMcguJ2n9G9BAUGZH4fqROKz3hisnoagmomLcZzn2iBMkNEjqpBbEp1PjMXa8izrHpKlM0R6ll0bbKK5E+kY5SKQ5F0PVzYpZ+UbWwpoRvEQ7QTFk1P8jK8NmfNUThQHR8HTgdxqMAhkRnMQ0OGsC1kfZSiVVvB4PEjY88//uUZPCPw3lVwIO7GTIwILhxaykSD5WI/g6YbQkSA6EBrKxIgLWBTStLExV3ek+G3htzWs778oLrFP32121dG7aLa35NowVbYh6rkorCMrKgwFCqyZk2GlVpvyQgXKkEqiv4BgSIJB9QsRn1Vxkz240LMjL8kOLC5EpKZctJW39655chnkXJTbdTlJqfKcmEbM8jNU9pprpmslP03OK5eeicntgsabX1unCUvSZbntXS5ocM9VBhZEQw+RAqDrMiyg8Co5w9cOPCSkkWFUswMgJxZKhQohVljrENzaXyLSqDwqLiB2NfcslRlbmOAipx73GhemPFiyUUWqkRlLukbdwHIfse5yvloOhFJ2EKspvv7dKz+IBjMR+YLrtxKWI3ZUj/3TWWuofqrvtmsjLMrqbjvUZDrArov/so8lVvTOr6N4478eHTOwXisAHKrCtoNEXGdYFBkIONQOFqbHMbVKtg/mF4FHc3XL32r0RdC6ViBh/1Njpq2bUm/74w3X9N//uUZO4I81hZwAOZGTI+QKhAY1gADE1NBs3gYokgg2DBhgyAd7qcX3Alf+Fa8zD+ecU4FTc4NcF+9qX/Mippe9YC+f+lAAatfRaIRNOh1UEFgqXEpgyXRrXWjJc7AZLrPXZMY66pUqtVSAjVSUqpBhXrszUTD/qs1X/bX1h0mP2bUul9I/qxVjdJm/gYVRJFON6qf69WeXVIMKKHSjbEzWH/8Y1LNhWIqUEEQWBoAo6tqqTPSZxMDBSawCb2ZtYBUBbVSh1WagJawCL9Yx+ucY71Ywo1EjCrp1q+CuIoi/iIqd/U8NfbJEZUt/1hpUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZPIMYpcZwZMvGKJWY+gBYMMsTIFs8kwwZckRFB5UkY0yVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"/*END*/; +<script id="dd-sound"> +const DD_SOUND = "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//uUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAEJAAGPAAADBggLDhATFhgaHR8iJScqLS8yNDY5Oz5BQ0ZJS01QUlVYWl1gYmVnaWxucXR2eXx+gIOFiIuNkJOVmJqcn6Gkp6msr7Gztri7vsDDxsjLzc/S1Nfa3N/i5Obp6+7x8/b5+/4AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAXgAAAAAAABjwC+eaeUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uUZAAP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAETEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWu1SCQSiMSBsJhIEglv5aaJeRvmMLGAx41a1odhWJUK7SbMt+F3DJARa8xHUNPMPZF7ncrmCygIIQAMGCxgOZgWgKDgbqSgGCCmBhJpgcke/AzWKwUMgGPTCBo3RAbG1oHzjLwMriEDHQgACCgKCoCQNACD/wxgBgMAgDAML7gY6FgFBIBhIUg4CAYYH4ChD/AwQAgwoKURccYe6BgYGh84bA//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEFwYWXfygTiRMGhosMBCgxBYc0PKQMXD/plwuMThoyBfKRiRExMSZOf/l83dNN2qSYsF5aLo//+pqmfQ6RsDFTnVvZ6yUWiUWCQSBwNBIJNDlpprZQCY28bHHv1syR43YqA47FzM8hpwyiUZpML1CLzCjQ+xQSVmBygEJfgwZMCDMDQBbcDhiqAwYYQMOPEDpkb4GPQmCwwAw+NwMqw4DPUVA5YOeBmcTgZEFAGEAECIbANBUDCoD+KUC0cLnxH4GHAoCQOAwEEQ7AGBhCBIN/gYMAwW8CdDVMcYb6BgoIhlsL2A3eBEBfygThsRQqGiwtCEFw1cLlDDkDE6/5uXC4xOFxkEzJZqiiYnP/UxfN3TTdqkmLBPLRdH//1NUz6HSNkTJIzOcTQAAAAACUADchlzEz4U/4OTYNYzTJgb47Osu5N5uM3TGAgacwSADhMPqBizAjgM4wqQHkMBK//uURP+AAAAAaQUAAAgAAA0goAABHI1nLbn6gBuVrea3P1ADAzzATQCAHAC4OAJkSDAIQE4SANQSQeXMKBqUnZCc7AhYSlcHxMzkAVBJAjM+zxWaWln4rYQaiqtqxU0aagv9p6/N1n8bW5S2Ydq09vn5fnW/DPtWHYzagGrzuX/+/1///dVcq1bLn1P///X//6/+/8ajQGAx5llvRhISrDRZT19f+z//r//9QAEAAAAoixpdnoGUIUyb7YZJpNjqmMsaMbEZGhh1gUGAqAUYzoL5gDAJmXKAqYAYRCOMNKKKwGA4Ae1yNTIKGnWNwNbncjOFM69wgAzAtxHceYUmC3KSRVfrU1bljHOxM75OORl/9/8P73Lss6QSIioUqtFzBERWpm+obAro3V5d63DNjWEtyTMaUct5JABmWrRWJ0187ydA6haHbdy4pnviSKYQ2VpGJogXRhqgbIYOKB1GAoBEpgqgFMYB8AUGAuAFhgIABcYBcANGAQAEQkA2mACg//uUZMiABeM9RSZ/AACNxHiWz2AAFgCZCD38gAHTkuMLvPAAAQidDBQJWAoF8J4JAhQUeRCDAYEX2JV1frGcNh7T3tp+4ZZ36t+9G5DnIJnOkitHCoxA9JKL0m1hhrtW9r9dywtKDQFNFiQ8eCJLF3iIcpSEEWFHy5lk6mBlhcBoZSGkFWWxsJJOKL/Lie35kQuCmEmGQZRQM5qCDuGHuDUYRYQBgCAdGEACcYD4JAjAtMAEBswDQBS6sArzZml6jkXAhx5EBJCDlmKkZyoMFlEWNA4VmidtfD9/XWq/ebfG9Pk4qmFZ1ikKfWtb375zl7OKnlEu3bp//7rm1Y9uv/utAEKjHbnT40oemoNQXEwjk0EtQw4sJlM+6A5zCJgFIxEgAuPnzDax05MFMuIChlKw4FEiDhcwiElcGEDRUAkFDBgIwsPS2ZsnO7qAclAVMEIXciLfPeRF1xqcaag3GxGGWJGjgInkxYePDVSjHlhodc4sehhzlpruuz9Ptpfr//uUZD8M1PJgwxP7OfBlhMiReyZMDkR7EBX3gAE+EKPOuvABNXp9GmnnWdFu251as81V2qq3W+qrdDlzGnfPbslHaUoCAxYrIzP5P9MzwK04DxGTFQDRMPoWQxZxLDBfCbKAkjCuAQONYqFoJHnVjTeFARGIj4RLJcggQGhjgKfSAmgbZfdMmuv1GOzU2QWxSt/g6Dsx4aEgCNnPu/tn9T87G4KWo0///6DJMoD42ZeYYMsiF2DYNxO0yBYfWMNvFIzBmQN0wE8FXFgfYwJ8AbMBzAHBICKMAVABB4ASLPiQASjShgCzAKR6Q4AfgGojhjAE4uzUJKcyeJqxODJ4uYcS9davWes2Jt3s1637zAw1T2rdd+xvfT///9QjUN9LVOrd1MbTdNxESJpoMnhFCgyGIgGhwNGAgBu4im4Mojk20WsVS6NWAjTdUh0qLSHp8/XcJwxWtNbeW/vekuc/P9Jfr5x87g71vBH3igAFsWuagAAAADPi1s8x9oYOMcYN//uUZAoAA0Qcx8594ABDYpq/zDwAy1xzFj33gAFLD2MLvPAAwjMKAmowFUlEMoeFwTAYwK8wAYAhMJ6A7gMAxGCwAKyeYCAFk6GXlqVYGIiaAXgUTwnoPiOdRPwQRijeBrlwQ9GuKxWbNdTbg7tTD7WcyWrWA/fhUAARKHd4h3eIj/gAAAAAAALim21fdOmflFrPq652SgZ7TYTI31cDQVpYQE8egxyDQz3ai3xE6dR9buqb3i2kO1lo74RwGFfjjRpPDlCZVCAoGipg8xioAiSYbUFfGB5gRBgGIDUNAPo8ABGARADIYAFoKsKXvZTWWBGSjENUqQQgOIv6ScFUe5M2xsi6+vjNv/vO953jdr4vHEYqiy68mQAMGQyQ1DVRjJCBoMF8MkwJAAjHDBoCgSxhtgPGAqCUxQwDAA2aMIrv9C1DUJAhhNidnO1kWj1IXy6uevELlrCxTWNXz/JnWcf/FNzSVkxJHJoJFWMc3H8TYokfoz7sFwNHKJ2zBhQS//uUZAsNkwQbxRP7WXBHo0kKd2wWCyB9EjX3gAFTD6JKvPAAIxGIG3NU2jW342ISAggXTIARyn25QK/RoaWtyBJO0hTZebdIactxYkBEKjV0LOnfM+yXtNLtrHmwZAIwRH//ev0f/9vT/o6rdv6gAIAG0YAANDuCOM4nNrgdM7lSO0YTYkcw45K0RC1mg0GSEhuxnxVKSw4NmTAJWFjswrWt/p8tUY1decs+x3v7ADALgsk2HPWYxJNLZMLHjdDGVhX4zts2aMTaFsDCiwbswMkDrMCbBMwoAslQBLKAJMqgA7rN2bs1BA19gihrLxVlaRwsaNSqsJwnDPTCxB1Pq3zvf9NfdN4t853W3+Y6NQMGkyKYZuEGZjdg4GGyzuYAgm5jLAdGD2BiYcAGw4A0BgODAHAGTHZu7cpdlMVkEsqpNIXAXMhJ/TLs60NLkayXe6zuH8Rd/5vu0Hf1SkkN5e+KxNkAAAAIJEggxR1R9NCYCDjW+igoyW4DmNvVNajD//uUZA4AAwsURiZ/AABQoojozrwADJhRFLn3gAEgC+f3NPACrREcwSkCGMAPABzCHAOARACBgaQDgFAA+DFZ4w0h6lmGkAyKPxMHHe2HU6mdrmZ0w6CVwt5P3s5/nbw0HUjcGdilan79YAB0vrNAAB7pUR92rRz/XJpcDx79bZ1MVBjcN5EFxgCCgOJIGgaDgWXG19SQUAtpLD0seAjCuFjjltL42EKHEbb9D1Vq2HmqxFKYcOFoocfpAAoAAANV+R+TR1RYczCJpyMtrD7DT+aBUxcwYyAQTMYACAIGFTg8o8A2GBOgMwOAD3Cfp/GctXYEIGLmL5fD/Ow7iqPIiTCUpQHICv3SFbXcxzwE2uLvbWOrR///7Kf8vsiv3aQAi7bbdrbLKAAAAAAADd1AFQMvFAgE3HA0JVAWxZIjhFfSRVy8ieLIoekQpQyiVFykLopiVhgzoeTp2no8/3Pfd//nXi4oLE0JAAMZEB5TNHDmQ2HsmEMbQLrzD5QaIwGs//uUZAyN0vYcRBd94ABPAwii7zwASpxhEE/phUFEDiHF7aC4J3MEoAvTBAgF0wE8B8DgJwwAEAgAQB8Xqr00voU0AOgp65iD1qZCk+5IQ5K+WRmj7xavzfP/peud63NjwA64+5//6///oLgADEVEtMvUdY0nhxTBGI6MLUOkwcRUDCfBuMG0CoSCSMAcAIMAJUiuiX4v68svJGIAfRMVSXg4Vy3uTeyrt7Zs3jGtfH+6bhafw0uOHjykMGrQ7DLUb3QxHIYGMpHNpjAbALwwkcAhOXePPRMkWN0HboPGnRqxN3loRBzVlLpNxIEMGQdJAtbPDeBb/baLLuWpPxawfKngmTd9f////////99bDJUKdMku78ygiETFyINMMcDQynA/zOAw80lHhMWHgMbA4ZVxEJe8iwagjgr0jczDclhTXn+hyklILQA0juJ7S74ta/h1nMHtv///+r0I97dKKUlTDnC1A0XEFFNM8BoTFYDSM5FCTQFeNIBEFVJnZjoC//uUZBCAgq8VRJP8SOBSwohge48WCXhDJ69lgqE9DiKZ7aRwGDAGW0mJ2HaR737XU772MCUNhxQTIBUdYK01lMV0n4UDQLtwszpz5T0fmr/R/1Nb6P7v99ZhwMRG0Yz2a/IgpitrAGrjyeTrZnMgmyRQYgFYNHLgFATBzsRyFvciGC8Hwu2sZJ+ptYui2JnOQ8VBW8t9+V14vA4oo5WcPWJ+Mt9Hd/o/v7prQAAQ3IHdpG5RQdYw7rIzCSFXMVM7p9z8JICUimtpJhePe9i50lMnzaY/PL061OaXaIUvAMpANQMmTYcIO/b91+n6V9v9H1xf8Vv/qSg6pZMXMXg0fIzjHRDmMZBCMDNZ+poa2gmcgQGO06E10HWnchhyY9DbLKslXOBcjGE4rFzgmO3tMyz1/nr5u/+ePH1+yzs93+z+jvYj/699MYtENjepjRk27UGvMcmSmQH0zSYSOTl8y8cjD5MVAVUKC2t3YYdGIMQmlD2vuOytoDk1oW88SjXw//uUZByNws0RQwP8yJBLopiCe4wWCkhFDC/zQkE5CaIJ7jBYd9UF0iZljFKLFg6ZkB66k2atP+tfpt/r5LZ9lfa26K9RISqYUAE5j3v+GtcEQYYqtBqhBnJp4NAAIQ4YPEai71gwWNtrQkXDUFz5MaKi9TqBHC2+stldznXWmrp/3bO65/7/kU79/2f+l//6yGHvhSBmnHbAZEKQFGAaIShzOWGbiiZTdRnI+mGhAbKCkRhgqa2U4wiYWw7rOH7ljvMttXJVIqr7v/SVK5UffOCKhYodK/i/6n93f/2/+6z3/vWVVjBxPBMpu9E0TBlTFzRFM0HY6ApRIVmFwK47hFvYqgsstpMEszPRWIpdiaWsZGnpWLLQWWufHkVNeJV2t71/6FUVbv9t9f+rd2bX66k9AAMYpME9D8nD+aEqMsma8xSALgYBaA3hgk5niBkASa77Oddo4AmYJAxqwMwabQZ9jcX/JVsmg442DZhaxav///////awBgwqrmqxgea4//uUZCeN8ikUxRPaSTBKwohxe4wWCJRDEE/tIsESCGHB7TBYoTJljGMHb1ke9VRlMPGTQMVAY+yxkf0mFxsKwBwAw+8fTVBFSRGuOy0cpqLJy9JgeD5ITX0bMUTU//d/7P//b9BSGEmFjpkHte2ZHoKnmDvGHAUqTS7oy4jMCKCIeRuLYCQcSxLxOqA4mtZxVASNwWeTSe8oHEATwdIiayz///////f//oMM8Qs0SL2DXHFSMvEIU+gEe2GRTlaIxxkDIQEDjwj9roPDsdxhHYKTiiutXL8lbaDSm3sj1NW5Pup/7/X6vuZ0//7/6aAMGtGpzSEGOU1ZkNZMOzLwTnJBMBpg2Zc6Qs1JkxI0wwhl7l0+NR/n+erOYrvTTxeavdqWb17C8O7HMQu32e5ADD+BrNc3bA0yBsjNOIvPOGj8Ik3IkGi0v+gYLGawpRhXoaGNZmWjpMPRMNi7Rzj5HzEeqhG2j0b/93+zc7q/6v+z/14MIpFrDIDLewzLsZOM//uUZEkNwgARQ4v80IBEojhxe2wWCKRDDi/xgsETCCIJ7ZhYgYJyjtMSBKtM8mYABMFFoIAKQjNQZXw4WD2cF/bvL1xysY7bKnTbWw9s2nP9v0erV/+7////V6hRWExAheTYDhZNdgLUyuRQDCAcNrhwtQ+KgAQA7kLswuD1CEzxIwLJRjMXOgoZeQVoK7xf0/yX/3WR2+/Sp61f/u6v/oUoVAMKKFxjUMXVY0+oOMMlzJyzBigEoOA+jhPjBnzLLjDGkV3UUuAigBRIqVciQGUSBZORtcVfa2Fwqgm92judHO1tJfzlv/3fr//9/rGAADCWBYMkzIczCRmzIiEdEUM2c4zKsHCB0KoA3z2jkZqmyUbiY0wdnmedLIHQQ0bgY2cIf9v/p///RUyzGFrA0plRsA+ZaAIfmKbDWhj1KYRRGUF5MHxhrAkAr+Et2lxGU8SbduXrOjCARIGjjhTpvsp9a9P/Ff9sV/bV3/9X/SQxXTqjZEaeNuEOAxdxujeC//uUZG+M0mwQQ5P6SSA7IiiCe0kWCLg/Ek/tIsDwCGHF7SRYjeaxKWZIIm4YIOg85KHONTQnRWfIfAS1sDckCUG+g6Zo//3f//////lf/Wp/zBqQcIzt5zFM+PDtTGFxKs8IUCKjHszcDjNnTHjRIJIg2mlkiRiwMvgii7FBm7s2xzw5a2pmRoPW3/+n9Ov7fouV6PVm8AMFo2ow+epjHoGcMDwnM1EVMolhEAkxwTAIKEVYpnU4F8DIW860qQROb00w3rHMHoV4t2f9v/zPp9Pd/3fSu4WvMJ9DgDJOFkQyX0LyMW8B1jvVwxgzNDHDHgFV76v00kNMIDAvIjFDNyMILsWbF/f/s/7Prs7f1fFH//Qmf1b1EMOIpg1+UHzd6B9MF0rQ2iKNMjQFAiUQCARXKok+h5WYlZXEKjdjolmzy0kKDH+pDzptn/VytH/9/+7o/i/RoVhj39kAAK3HFGmzAkAIoxyFKWMgyCVjE5wdswLYAwaCauGspkEBAMvf//uUZJgI0jINxAv6MLA+ohhxe2kWCEg/Fs/sYsEPCGGF7aRYx++7sphEOClHJG3zBSec38d9ej1qT/Tv//03/7HIs0ABWBVTAfDFMkzKE2zhTV/hMGicMyYcETEgpSrmVyU7eTkx8DVyKTyENBk5OTeEmrLk32bW9ftx37GfZ1e+9Wz/Of6NQZhaYwl4UxMupZezNFA2cxUIH2PMZTHxIzgjMpDBIJegvS41ybKqRgWr0gsBJjy39nX7/+n5J398c977Pr/d14CrRUylUkQMT0XM21gqDZ7AkMbIgo0Ks1XYv8PHRZeXnhh24TY7KYWrSExNG91YNCgavczR9aKejPaKv1+ni+n76///+n2KACs0qmAril5lZ0K2ZfaIWmMPg0Bkc+CGQxdPMaIASIl2wcAMPCo1ybvLLoxGHKkPieWen3ADT6dhayGlrRYzVar5W//76Pv99CNVaEGDiAKYvH6hovBRqG6ZhIPhoELZg4DAqBqgSRIDjA/7WWA5yDJR//uUZMCIgiURRlP4MSBDwgiGe4YICIw9Es/sYsEGiCHJ7RhgVfeJiCRoAAsSapm79Vtz/6no0GBsh2fs/2Vfu+zahIzDYw/A0Zh+0NRpEPjKXg688+0DahRM9jAzEEzBoLYGj0tUTRkRoTSCoK9dKlIMCWPUJT5EO2IRTXsmjZ/nrdCdaqHti1nlrdUfdehjRn7ulx/YAJhvEznAylAcgQFxgmi0Gnigc9OJioOKqCADKmiMVZciAlAkEpjAsgeLQiAIS6tUhp4+qjTvcqHC7DTz+hDJdP1pqZHTElsMrYx41jdzF0NakmxetCteYjAch2I0GHosNB2HqjLvQ9AwYAF2AIICczEYu6a50ZAYHP1qBtGzioWbaLdVysmhcFAsZvtL0O7nNgUUoHmd8WLVvnEOWmlqA9pHn17bvU1XTZt0X2P6VGDQBg5hfqTyenSqYqquY2FiZ8jsYHB+YBAWpqqswVm6CieHMaciODpUehyUlCAERadv0g+vmEKU/6ar//uUZOcIwlsOxDP7MLBFIchhe6kGCmw7DC/xIsFfiKEF7hhY0uux5GhVTBgslPsTSvRb3NST/0btaDDoDRNc97M2ShSTG2ENOgTTrxs1RiACmRYZsqCY4jGJCYcdmCASibQnEuQU3qm60GYt8wQJysWjQSxwLpaUPzV9YnXIl7FYo1jcDr9L+zBGIwOQsKLb/X/yMgv//tGRWP+dkw9RCDlKm9OlEPMxWhzjO6LPkBNSowsCAUD0tUeG5HvzqpOHUYsSFj5b3122SHHCqjhgw1cKhilioRk3XlwkAUmVFbQM5xxrioGtQNL3meaFB8JUmDjzzT9cVGOdUhbWuvQ81QApLJbbbI0gYrEsZ/VWZDH0Y2DUY7iyZ7K4awKSaHqecI3MbE0sbfNkbPHSahvkZSFWZTBsRMxfhLowUwECiY4gHNkZ0CSa/HCsaaYiALqN9ZDUn0w1mNXMXBMVgAqnEMd7ZttmsgByxt03UApGDEha8NROpU2WgQipoBkjCLJD//uUZPcO8rcNwgP6SSBQgghAf6YIDGRrHi9tg9mMiGCB7iRYgCKJCF+UJSKpdIHCgIoACg0AkDGR09Fzs0YMwFnjrtqzl6n/kGU9DMNRGZ1Wu0UKfl9oJicCSKMyq7rtmlmpuUS+ipquF6/qrWu4LIqv///kyIksVAFlgAldNttgAAAwIERkRmynComJPAgDY+UPX/qQAEhwAekhD9GZ7RyOG+KgApJKyukAMowBOcEcPVUxA1WmRhPHXjLmJIrmAsHmgAImCIOGNY5mJwSDoCGFwGsnTvjFdtL8dACiAuKwALDAJgEURA/1fHzhmbX9c4jYbdO4z/e3uWaTP1vWMyRYti7gnQE///oIKxp20HTFEYwJhkhbGngaZrA5ggEIDQUBFqF7FutDgmer6gKEYHgMOKtTJ0EACow9an11MMXLyzTa2iYwxLxfOLzYoTFmKcQ2LltVM+WF/DEtAxcyg4XUMZ5B3DIWy1UxfgCWMDnAGZwwIcDEAQFYYHsAxmAF//uUZO4AFro5zeu7yzYpIgodaSYZzLB7M5XXgDjOh6TCuJABgAgVqew+x0BBkTmEWieqJbwYgDs1cJwBYKBXdf2+3jnzSS7+RB4nskVNbfWecie7R0lNS2rFH3tXkCUl27bvTWE3aGmCwKAEIhx7mOsS5Ao1zADAHV7HKsHtuTC4/PbUMaF7nOEX//mv/+8AJYAAgxqnUTE3SAMmVuoyFT4zOxAxM6oi0yshSjA5AnMHcIswvwZjJpBTMAQIcwJQEFXmBcAY4I0D66jwjxhGZEQzKNzCUKwK3BEJayYZAR3o219vnkT1jrJZTcvS+W36+VLK7eWcqj1XtTuOs8Ma2HPsYX8q5Fm59KW6r9NK2fJ/y2h136tX0gBIGRWq+RheKdYcRVfuGG7wOhzGt9YaHkS1mUijaRiPoMeYSYIsGB7BBxngxCmYOMBWGBAgFioDAcQDUwAgAAMAzALjAAwEtBMBGikg0RDPGbiGFIlvqImAQg/4RAHQpqMYp5lrrrP+//uUZM8ABWgkw4Z/IACI5Iilz2AAFsyVDjn8gAIGDiKjPYAAxeWz7hPvNSKmfJ+sO5xKWXbdim1Ws51It23S47uVL26qgswWNSr3AQCLEmWOlyocPOJbGJWZCIscba4dSSfMuIJhEJJTpeKjDv////9KQAAEIBQAJDdUFNMgJQo2zzVjL8P0BMTZkWIymTmRMYEQJBiVBAmFMBOY1wW5iVAoDQJqw5goADN+SgSoNEwi1awxrUXEMagtUCRGgt8qhFFvOxPWuUsTcN9qOjlz2X8L/YKllnfaWjxpXCAiIAkI1kksQt/obuup7eO1Xf1XXs/RrQU21YzC+P7NZPds8Ce5zWMNJM94V07ThyDEwBHMJgUIyiwjgACqYVAVLIhEAi/aqi+oYjByvPxzFg9mB2JixAVu0luKtM1f1bTlrX613Y87+6dq7QcYeEEdv/9/s+5pNBDWv//6QAAVSQnLQAAYbXnZfBkHeb6NmkS50x8WmCwSDmJBt3muvI0x570n//uUZEYMEyofxx95gABEgxlt7ZgBDkRrDg/7QsEMjuRZ3Yi7qEzgM9RIwFLIH7Sb7UpbGYfkcktHnKsNCEDBHExIwr4MwMemDTTSFCTsylceHMdbC4w78aTD2H4MMlQA0SRAjALBEMdsSowOAJjqvzRCQMRQ7M4UCS1MADBRijC4RtwxoqxdCXyq0NuDK6Whpaem+htTOqHkcoo1Tfj+FOaMjSCyQxE8nVqTX2/////9P+zeAgWjCJFzPmcjP7kDE8dgAOhz0LYXGwCqBNGOg5MFudF4FhcLiMdjEpj0btxupqNVv6MnsHUtTI4zdd1q4QiGPyT//TBOFBwxx3wwN7H/DjL4DEAxkMF1OVhF1DFsQHUwXIgwMLXBcgIBnmBFA+pgR4EuFHBzBo0YMIDAAFGVWIHMkBywylwONq/AoVDuoyLAkRkVJ6VzsYqk7w2JVm0bSZZ20q+cdhOFoUU/kmGzLSKXNxAQjiYRUmYhO0B2DIta5i67ry8WSU1PcWeh//uUZESP1IshQgP6StBjQziBe0lKD0SBCg/0x8EVC6MF7aCziniqZRLpGkDAOYK5w5natimdm9eYvQzJgZGQGkufKYUgDhhZlMGRqG8BgTDosAFGMERCgFpD5QBLvZylElakWhIZy5Cd8aTmfQQXcxFIu2uw9NOjlPjfc0PjSI00BUq2f0f0f7v/3p+Kf09pghCJMaf2SyGUhdCJiLRZ2YLEXTmV2G7hhZgHqYIuPHHyiRGQB/GUK+GVo3FY4GHgTlp0n2WtEZqWUYGIQDLxLcAQCrAMhLcpytJdGal1PUqhmkimjJFyBDSMYjOd/bZjumApIyHmquJbFbn6tzH6/p6fx3c9vvbf1bzGI4GWYGiQJmuEymO2BUYBIVpnTgnG/iZkHAZCNBBYoAgBRCae2kP247aj0xOypkznoFz2EQw1x7lWWtJPZAyIIq3eC6QpzB1BLIwvWd7OOSWWDMSSEoxKALyNZMH7TDMANgwh8LmMWWADzAaATw1vcD4DPvmg//uUZBiIk7kYQwv6MlBFovkad0knTMhfG1X0gAD2jCRquoAEFn33ZVDSwDNV8xyAUU1LWcQHASVimYoQcMGBR5AwNVpCyEqTEix0qYBy0wksnTf2LbZvdV3xGt6lntyQwEN+5+1/mn9I5YAFopOIAAGJ5pGbTdG5fMGJgKA1EzF5BiAQYKw0Qw48y4xdKVbJn8LLiiKBUQsE2jUmCdMzsYw/Y/vJf0x9AhfqnefrTqCABbTjbMDRBMDIuB+U0lUq8MVYBWjBYA4Axh0LxMGHBCzBAwREwYIACMAzAFTAcwCECgA4YARwE6deYfhAfLEgoSKgqyTGW03XD3Jr5qlWhmiJXnKzwb1q/0Xbe+6U/6naP/U5H+okC5AYih+ZgwYZd6GLP6KhuEYaCggAwVmCQYBAZKKqqT00/F/C+JAluhovRJK3Rt1FSShsK3qWo8yo5FrBEgKMgEARKEDAbCPkzRgUoMrbmkzDvSAYzRgbrNBHFiTE+QsswWAB+MMwCwjA//uUZBYAA64YRbZ94ABNIqm/zbwADdhrFrn3gAEDiOh3NPACMwMUxFAIMMD7AdjAKgAliRMAZO6YA+ADNoYiEC7GSZyAFKM98T0vaMQMGt8brZ/PnNc4v5loC5ifIUN+33WN6Cn9ci1+aV9rNSQAAAHeHiIiYaOMAAAAAAADK+U78fOEaDu30zP2NJMDFg9dhfZL0WYk1iZEqGAgdcwUMds/WUghMSxBpMrhMiTloW4nj7blilLVksYZ0gQEAAAGPxibhnPJIuaAEarGbVinhlbMiYYXWVDGCRhipgbgBEYSGD7GAggTJgDIBYYCWBWGAkAALjKTcUoAF5YLST8nx+F8Vp7qrZoIOhKSKdQLZgRJo0bHmxn51j7hBO613//////3//+d7v//WAGjLbprrQLAAAAAAAAZSQSrDD+iayZNGcxGYoCz0OmMOL7wlKGkL0w8vSH3zOBIhAZOoz9mUk+iMtjbGwMO+HKqYgwUUG7NBvYvTYYSHc01YVFMJmFO//uUZAqMEz4Uw4994AA74umK7hgBy2xREDX2AADzCuOmumAFDFqhw8wfQCzMAwDVTBcAE8wDYBgMBWAEBoBTMAtAD0s0JEurWTmFOWRcbFuN+xXrK09ccUrNeaNWaoOi8Ug4PU4dJLTX3N/6LF+3/q+27/4W1awAbvcjAAAC4xMrCA1vgyqMTFglMXDotEnOUAKKsYSBU1jOst/JRLBwIRSscyzju3glAOPtVaWsOpOd39wMYZ8FyGYdI8JlcUFqZl6UOmK9grZlyIDUYJ+ANmBMBKpgDwBOYCAABoFGAMACxgEQAAlE79NdzNR1EVcEJIJ1VIqJRk07SaxX/oxE469iPs3/X/T/8l/+n//pAAEJ8DRw2DFP4j5TQDeMczCYcDiwyzAAIB4GUJacpggEaV6Bz6U9nuNiCsE5ZqQSkSWp3eypITy/RkfKOgAIDIoKlA03sUaMq1UXjAtjAw09ySqM0eEdDCiQNkwB4DjMHVB+jBLwFgw64KRMCGAIUynF//uUZBqAA80axA594ABL4jjVzyQACpQ7Ft3mAAD7i2RruoAFd+BC3rjHMSNEIGMXQsCGOAk5O4rOUrnD14V97riuv/bHxeYGB4rNsRGXCy5Jx5FyOhHdt3D5h72FKpJvoG+tzE/s//9IAlwAABm5rVGLQOUZOyJRnHEUmX+CmaqwpJhcAxFAHxguhMmBIACYpYM4QBBGtJ00rM6cUAIDZIDuggIquMCQ3vcEQzu////////+kBi3F8YvbCxxA/VHPzwKbICzpmCA6mskIeYLAJJgzA0mF6BgYGwCJgPAJFyhIA5l03FO1VoWmRMjLNL+WZLwmI1Tcy4ee2vZ7v/3f8Xbf9f6eilPxgAF1O0AAAGEQbGJskmF/gmGhAmJxmmtIyGFoAAUIDAcBmApquq5MFRqm/iwHoTixgteo6+6Ypy6J0LQywiL/WQAAwjgD6MoXVGza/kU8xc8DNMGaCfjEmQ1szJkNDMj6T4MXQE1mFCZgIW6UvDrP4qJpACRIGEJ//uUZBwNkncUxBP7STBD4liBe0kmClQ9DA/7ggDai6Nl3BidGmTEv8arZNMTWFA07Rt/////7P///9dAGBmNcAmJTOGiGMwkQwwjiSTQmJaNpFNiyFnauguJVoTpVfHoYktHgiRkQgcPFDzeytaTUQVbcBV2f///9/f/////oMCJB1zLUm7k03uhQMFfFGjGROhN/U6w562TPS2OKgsGnUyUFhCGQ4OShWiX2d0L6Q+z9zcez0By6bpxUKiUFjA86526X7+n//+n7/69n07PH7WJJ2BjCUhnN8R/CtRsMI5guSRqAiJ+Ia0FiCAxBM1t04VDPzQQOFhexWdz2SOc63q/rXVlzCZnJQEDDSw8gzOhEsNbBgGzKIhEcwZ8H7MZcC3Dah4zSMPRLAIImOnymRAADwK8i0IxBlNMiOLGVqWRR/2WoVvviqETDXLmm3f/6f/b/9vs/1f/6+ABwSpk9jbGyBGqZAIIYWDUM78M885ACFT4JzCERg2XrQnPtgjm//uUZDwM0pAVw5P7STA7QeiBe0wmCixJEk/tJMDqh+IF7SSdzUh86Pq0wTLL8+sEQYCQEcM7Nnn7KmVUwJADsMWtVWDU4h+YyUcFeMHYBqDEKAik+QwNzKDHS4woYMJHQ4AMJBGaWJVSbKGAykZKXkPLL8mBOKwuET7hf32qxhCju+7v/0f/9ux3QwwfhszCnZ1M2aPQxGQKjBkF5MLYfI8VcCijTPx4qZIUAQaCj5O5HZKGxxwgFZLeNOgyMB1dwpNoXvyqJAADBzhIUymM1vMk1Y7jIfANEwUsDyMW5B7z9S0zDEOlOzDwkZCFH1pq0RW3WmIRQpqRtlNE7ZfzzzezQghgtb2Ut2f7f02mP9X1//pAAiZuAAAAxBIM2geM/NjMz4EIxCKj2BbQoBIEQ+eMuquQBnAub3JiFk83J8zjy8NlNW/MlPW9qghuaeQoFDmHJKB5hzK+mYOmCgGAugpJhP4PQeMeYbAElkYDMhFMUmamy8/RgQYXpI9y+pZM//uUZF0AkmoUQ5P7STA3ovjad4YXScg/FM/oxMDJBqKZ7ZhlWEYFIXktm706k+Y30f729qUlj7Xd/9P/9VCAMCsAUwxEtDMqNnMS8PcybOP32TIwYtEGCA8UFrkLI828sEZytBQOKB+WxmaShK1oVSyMFPAfTLpjaAyNpqsMRvDNzBSAh8xqAHsP2CTc1AykuBxIYcUl6goAW5QT1OYswCN11t1kl2sOSipJtGgglhPc1GmtM7Vu7ea/szx82xzOV+gan3LAGQAkFIZSqCRiEOrGCQJADAbzGFCIOk8ZoNIZFkDOsFgKFWFxzjzgZkSTQDJiTCXxfvq098wtKrJgXoWcYQSrFH13H8aVxgxhyjuGM0R6OMDESw4EjkBRDME+43aw7/7yw7Q9zqAALyAAj0yaD79ifWn9/+b+j/7sm7XT//vgSBgaBEmP6rSY1bSpiOB1mg55jVsYIEhcYCIFPkBAEMugtaZA35brLSMSw0QAX/MEOs1fSjCbAgAz1Env//uUZIgIkqoOwwv7STA1gdiVeyYnSRA3Es/7QEDQhuJZ7ZhhNqQlVzE1R8cwSIGEMffApTrzIx2ZQ6BgQYWUlgHFAOll4CzfQSSYYUamTBAKmz54qPcU+7b1c2Y2kNCshtTn2pVkna+lAvqyObSt25jfSBFgDAaAMMUJCM86LY2lLAx2BE3yB8MIBBGJCA4DBFnNLceWG4scGU4MSwpg/jnak8A2C13NUYHsEemAXImZjDSTgYayJHGBJA/4VCCDGYwwsZEbeBQxJJesCVJztYSSUSSaUQIFHvE0UGWV+wj0buv1/939v0el/9HdcYJIsRj6K6GqGzUYuQOps+EbD8rkMVjy4K3QUCOo1iD+h/qI4EBQJQYEzx7HhaPATET2v////t////+uQAwqUG+M2+DlTdnzUMyZoXTMGxA2jGFgWM3vjOtPNFNNJNlqScTr39c8DMK0mnBRqNf5n79exBn7+uhfu/31fq7Ebv7e1e//Z0jQQMwkhgQiSGMShIYl//uUZLIIsrUOQoP7MTAyQdiVe6ILSRg5FS/oxMDsh6IB7YxiTQYsIiBTKfnIwsJzACPByHi6ulyhVHcNv4hHHCQkLXCCtztvs2/7f//732en//7QAA7pG5G0QAWeKkANMJsxGBAIFk90H2Js7ZYjQtM0K82a81606sE1ZNBECQJgwKV9M7DuUsbl9WG4vADOJBK3bh+cwsTbK1Ttu6ADEfNnb7CxyaTe6+zCxyd9YcHnX/Dgw5e/PSJYzoYyHnwH/+fAGEoD2ZSqVJtFJkA5Ns0g+T4lGMmDEAmkOi4hBphQHp1ORPcmVHPEIFYRRQPqmXrQjevqt///dZ/Gf////9dlAAc2sttsiQCKBlxxDqUFC5gxw1sRcM0C4ywkOLO5MXEMRsVAMdI01jTeLWssQlP1Kpt/YdeJQF8mBFvm7oOsRdVpTXZa+rWWuxBOZK4HwHNntDonbVay7VlIIz0ZJj4yVZCTaXOnoTFS17LpytgXa7Xvlk96gKjS/Nl/9dBy//uUZNmAQlQWQwv5MTA8AViWe4kWDcyfP65pifj/B2HF7gxgbNhed/nBQEAkAAwZwnTGcSxNMMrAx1ggjKpwPnGc0YMkiTMoGRXSugiHaJYcD4lq7kgRElW9vL7xV7HEC4fD7si2kdAUMBHDwDBqVAUwrljnMF0CTDBpQdgzeUElMHXAMDA3hfc6wvTNadO0WExEEwcMjLoEFgGzVGVR1XzDUEiM6esoQgZURi6rpPjnnsuAqMNTtOW4xMxC0hW6j+73f/1///t/6rY3LQHgMAoL6tFpwF+8MXQut6AN4xQvSRE1ItnRzC81jRmsCCTtQPCfaJ6nTMk3Sh0KoyOlkDv0TjOC7sI4p0szHZXVMPx5IyjBODHWK1MX8GcIAjMFMYAwagcAwJgwEQGmXQMy5WJYGUuW6AyMFHatYlQpWS2FPiLq3g2hubTqNi9oMynxIHiFNX3ed6qO/96VP0aWRmjTenmBsXrFEAAApqNuNAAACEhi7wZZAIAiUlMrJAwg//uUZO0AlCMvUutZYn48IciWe4wYDHBpEk/xJwC+i6f1l5jmRwQrYq9TrNBg+JS9r7TyWjTIiurPEh6hw0Ew1HzGjrpl12766KmOCM9q3fMgH5ENVeTTTZB2XU6qAubM2cPITiVEpAxbALgMHNEKTOmwjkwbsRgMURE5TDiguMwGMAaFgAMwEkBVBQBGYCUAQmAigBYGWIKHA44C4MCVA+URiDgCZibQueFqDhiRC0jJFQsi2FEgY5xsTguYqLaREuqNkD5knWYOo+i6CKloJqXRroIIJMmksxTXTR0mQT16nSpUmToLTd1a216LLVSpKp1rM1tEzlgjCTIQLBkMEywhtEZECCgSef//7v/+xhrzpimqE0CZbxfZpcBiGha5eYaDyBicg3FYk5mfiSmCABcYfgR5g2AxGBkAgPAPGCWA+KgMEwDoAAZNAvQA8FELYeBWHhUhosRPwqCmKZDILnBet7BMwk5ZaatGxT4hTAYLtOh2OIhppdgjYEImUKFT//uUZPEAA3caRJV54ABDgwmdrbABl9kbCBn5gAJCDaGDPPAACHTChZA1rqCQwgXWdrcm1GWAdKC60XOxwhVGVJ//6X0ZAAMDDBozGVR8Yz7pcVMbzDpTAzg54xwkYHMFUApzBEAVAwwEFEMDQA9TATgLIwB8AmMA/ADlSiQAE366l+k4HKLGqqp1b6hepyMyPbPabp9z1kn1nVK+3k5swz/////////QAAA043JAAAE/TIazgDjChAqiMwPL4qCoxQ7lep2vVYjbwEEwlNjWNtNHVMDZuv9bospaLxnmFggLJg4gruYrec4mVXMjhgyoiUYBCGTmRdh5xnWMph1KBvaARg0OohK0umhq3BWNThtllRJsjPrdLGY4QQIhA2zqe2z9q5vI7Z7f9z///Xu//jb/uZ/9KRBxAwdB01QMI5bgwx0AYxbJY5bIkx0BMKSB+GBgSm45MEPK/b0O3TPHNTS4RqVchzTf73bedgdx6xVp5WgqIAwO8MFMekQgzaB0//uUZJ4Mkx8aRJd94AA3Avm97RgBiuRdEk/0xYD3i6Od3ZisQ8xngKNMETDlTKDA8YwQAB5MAwDQDo0gwwHNWjgiDDEBN9CUonDL0ZJmxVAoGRGTjTIjDQMpqbW37jeI5HhWzp2f/6/9Vn//q///6QAOuvwAFXCC4MM4QUElUzMnWAgow4g55yYZnom5bEorHXhi0xbjNSmnMVuiBtGdZcJh8LyleSWRAgOJtNMwOR9DIKj+OECbUyiQrTDGH0M8Yp8yQmDKOmN4FgECIBIMcAQsAkwmTw8zl0XtkdKHEjgdwJ7qXc2zGiBJ4PCjffdb/TrT/3fdkv/s+r9ZYGIRRgaRjpC2DMEIDGgazdQIAkYCbi0YyMCEuJxz4w40RmwIcCQhhN4SIORL81VCvRJVJAADBBA6Ax69M2MF+h8DCYwbIwMMGMMm/BXzQENTCVtDnATQQLxZowCBduoCA5Dm1hLJrqYMWh11BlcgIFw0RjhmLWdyuq2gUeetc1GJn/tl//uUZLQIksAWQ4v7ScA4AulpbyMtinRbGU9wRUDKCCNJ3QylvR+c06//Z20AAAAxqKAAABGgQdU8+XTQwJAJGNMJVdgAoeQKBEobBQKVYTIh0lAGrGr1LyV1g4HkYoIgjQTFFIDBFglwxlNFFMlTclzHfgfEwSkH5MEyExjB8lTDUJTmgGjAUbigWAUCYCAhfqCFdDDlgW1jsPEl0YXZBWkaSOW5WV8puhJh9m5SbdIx+dYxGv+rsxlE4QR2+r/T6b/vwuMaQTmkb48lioYaSBqkck0AVwuSUUrJWmQNAsDsN3D6QGLMExJRA5kZekJAkZfASWkFJRVTALQBsxn5RvNQqA0zLcwUYwlYA2MgaCpRbCDHUzzn4EzBolDAEPiqBANAZHWwrl0Wf217smEqa6JRYygVBFRXN/9UmSzbOMvShhWdWr3o72LJoz1l23GP6qqX/StS1tcCsSPlGChlckkgBACcYRixQ4/kYYQFxgrhFmViGQYYdmPQJ2B+FwAK//uUZNaMkssWw5P9SVA14gkNcyklC9hXDk/1JUDSC2VlvAzmEoQChQAaewWHm1p2fM0mAsilpV6tTmOYMN1hoNm7v1//9X///////262YRqBkGU1IThrpLuwZKEBjG6NkHXs5mXYWGNDmmzAigICgMLIKEEiAJkM5GYgu1NZiUGGFIwRwDlyY3cenv+Y0ukbdL31Iy9FC0XovpawT2OOVf6nV0SqnI5e+6QU1ayVgpUhTAGAADcY1Ynxl7rKgYugy2qzuTyGiyZAQJikHLeMHApHRWxMFpdG5cWrSZ7SoQCDiIpAxcLzclkMZu3////7//+3/0IwVUMYMZzcRDBvMpEwrcNDMEdBHjI1wYg0HBwwo1k1+HcFAkIRMMBQXVkQCggBFxp5MtUggnbUSoNEqYeAMSHk2U/imeWScSBJUmbQJH2qYHOEmDlULtNqi1J68NhdRwy9CZposmxgvGtYAb1HArOwkKiLNsf0tWAADAADtMQlO01ojkzIDBtOwyD0//uUZPMM01gWQxP9SVBHoiiBe2YqDJhZDC/1I4ENCyIJ7gxwMszgUIHcy8ULLmLnpMYL3YVHocnYFhdaWEosmxMzEv9KqaOZjhBD/////////pf/3fGIoQuaianp6qVBGbyBSb0qJ86SGWBWYhdYBDIkHjCAPRCTphFwWYAtG8zWvu7T6VGpAoGlLBQgNUv3fpuumX6d3tS5bLSxn/6e0WeO/d9PAoISY4A5pnUwZGJoIMYPoRRkBgLGOicy53xgoMyikc1AGvOKVBgyEjZA5bYrzWhSzaXFrwABOL///6f////+qkZGBbcxy59BOHPUKjJqBgowfUBTMVACvTEwTTGiAzVUDwAFpjYCAjA8dANezHAFJFpTFZRWHZ8yydNjlfIuZ2Z7ctAkWwtPODodBBAVaYTpfnkuDLORaczwDJuYsmR3K5ipYjDryzFKSQgQYkcgks2wCCxtBogDB7DUMT5QI1WZczJUFZMhsE7yijBBFMHDYHSpHIHBcMAqTKFC//uUZPOI07YVQYP9SVBCwtiCe2McCkRDFs9xIwD/iKIF7KSYesIfWHnShp9xiBjFccdsKIr5oXIvY06RtN5Hb/os/d7N1d6O/20U//91ffGDihCRkwAu0YBzG4mBFDBJjO/x8inJgyFhhcKpoeBYWC0wzCZsjVKRXK5Yuz1+mGQMNuKtEc5RwnFxIlRdotDC3xyYuhDmOJSJ1q76zazCZX9rZcwKnmIKKASJhDYkUt2+5tiBTMbIYMQFxk8moBnMBlXhOGEkDKZaAPxSGmLmgkPCwCFwNsDqLOjncH1gWh1FNq+dTtuYt4/fKU/1VN2J/2+n2fTVz27/sv/9dQEMCKCRjEcWnQzyaG0MdFFZDh2dOZ9QqBcxufANowQBTDQpFACkxIGVuUyeHRwJBRs5MVKRcpNQ1Ppf3drC5uv7cc1Gx/X2Gsdo/QRRY8XtV7px42nSuZWZMEYDExMzhzLJaQGh3DFpKM6VEoGgiBw8Z0IS7ioIk5saVNODKjo5aUfd//uUZPuMw6oWwYv9YTBQIjhhe4McDOg7Ci/0w4EbCyHF7ZigTTvpEBSWIMijvOe1f2a6mY/m9lPRZz1znPjXJBfU/UuxdAqyyYcwThwToxnufCGb7x1phwggmXsBGVmAJUPqhYiOmBISzlPWdBMU2iH1ZTrO1QDBIFFDohPklqTuOs2MFnOAGtZYQNPRXB8znTSu8XSg4bqaGFQvrUlE4zuh2iFJykgDBrB2MhJOEzRZlx4okwaQGjHJCUOWcMXAMQaQzLTpPwWp5wRPBAXDiYOvdf+3GYSe9i4fBhDBtmrVF60I96u2n+X0acZ2/3K/ivU+pKowWYIPMFxgxzX4IgEyccPqNwI2MdoHNGNjUag2U6DDQx0bKAUMB0gn8cOGnjmIXL87uf1d7yuEwVQoWDJIEu0mbaKixBicWCugw1tyLeNU4Wj7lmpwrYMZeWPDnNmh9Ax4uo/QxAzRiQYCBpJlCo6Gl3WHqHfG1okmvG54lUYS5gjBKJihImEwTNX///uUZO+MwrQQQov8MNBOoiiCe4kYDAQ5DE9pJME3h2GF7TCYzys2KWao3pYGQIXhISDDYHmWdF57Rx+23Szyv772/f/dq6a9bndZgiYAgZOkGAGWDwsRgggN2ZYi6cFicdleYj0cMWYc6NEFD16MHnM8IxTQ/n9YkGSbgeAxo2q13as1qemSbgYzoT+jTVp71PEdOj1KWqR5yLz/WupiqsqQg7GI6h4Z6KVRjqBIGNqh9lqYCWKHCMVULGi9U5CDYU5g0hQqbef1HfbB9o/kbB9Lmyenn9cts9zl2htWrR3bNq+r3M0vfXVRCwwicQqMP8Y1DUn2IsyEAJkPloYw6mjavjGPiOUj6FyiFrIHedWQRaF2qeVflrHdM00KzRuePPpVgGi5QgJC7ka7pyJp0uMGKeNcg88IrQTHMaaHMFH6ChFFbmsjL2qASZHzYEGBoBaZBqgJnzTmmH2JeVWUeBD4WQK8TMBTGxNUfOGYZr353UttEAZAcCBQ8KbScakn//uUZPOPQ0kPQYP92IBIgViGd3kQCoAvCg/3QgEtCCHJ7aRYOTfbmro3mj9LmBJVKOxCU7aEUp/Up6DalmPr202AUgBhfALmkGVYd6yB5n+jxmGUBSYRwDh3Fp22QfQP0YO7FNk4MOtGTRghIYORhS7SLUMYax9dDK2yOC5zJ2uQGNEJo8fMIEakZMtMnzZhuAtDoJiF6hVg4W1NMmpQWdfprYbAKZqqHAkTDMLzMchGQwuwmDJITG3DAAQCOLKvIFQbOHjsYiyOi4LvLwukyB9FiUdZYxz0mfqqRm57cnqt+1ErjNtNyUjsa/bu6/T3KgAFbbbbbY2gYsnG9Qppv8YIkG3TAZqkTWHQpkxl+mSwCaZl5EhkADgmR2B0ZuCfxm3B+mOKF0YjQaZjojxhB4ph1gbGGEB+NCnGC0BoVgOGACAwCPTTeHTiJcBmhOwHhN8IHSjwazw5cWQFjwwBVdA43ADjXNqIyHDHXACANLEQCc6Yim6dC1F/tRac01zo//uUZPkMgxsNwgv80IBQAVhRe5gQDFxjFk9pJcEviCJl7Rhgchl1l1KRVqX5A92guzEcbKypdK6lcus6sKi0ZlVDKI3GJfRTs9S0FDc3l/bFvC3zLG1ax1nh3nec1vv71vWq9QMPfUWv/1AAra7bbUAACaL+Ez75RCQz0gAI6JJxrGcWTJjUSAiyl0y0u+VjF/NqERYcaKa60qRcPpaUx3fcfcbeLBPEgkGZwngiDtq7AANId5h7dYYl6cIyaOq10QW2PK4MGNMQRCUymgFjHjE9BwtRiODWHDAoGYewMRiqEYyAJr0j58sWJg4RgXDUwNFU1IFMFAICQAdYoAVwYS06PyaV0Ft/ZuzdsU7+yKvIJRF4pRzPLQQZFQEVEYJbHVNSW/8qSAAMctskAPwIACZYlDKwMjNY2mepQW4DuN1Yu0uG1ApGYLiW//QPdlFlXw/d3OcHgAMV2TUyNF1jSKQiMYMP02V51jCJBbMGQG4ChPmZIL6b/wZBnWWRh4EZ//uUZPWBFq1Azut+ydZGYyotZ0xVzrhpS+17prC5CGm0/DDfkObB+qeJjaFBg4C7ODBVOjCwES6ZcILgICgJlV2GmvUmNCAaxo+5n7lnNIVRZCDbzJDv1WAAAAuRy6AABCeNNFET4N5jZnyrMq06SN+TNV5naZlAK9AlYzVCe5974/xPD9EOJhA1CfiMFWGI4qaZv5XBkpoeGIsHMcNzNJiVAXGBGAeYIYSRigLuGlAF+ZZBRi4UGCXuY+rBg0Plv3ZMZigMMyEDdWtJR82maGqByOM+U/fsilSaGlzkntK6rRpv/2gqAmC6brJaTMTM0toI0xZhlggrGRdKmXq/oYdebVBwmRaKEeGhth1n5leSiTBKTwu59Q8DAAMIuC5zHvR/8w8YtTMA9AgzR3xoAwaUBvMAIAKzAFQL4wNkuOMMoBkTOsbgUEphAGZ4sopmIEgQNQsBBgcQYkJQQFjREEaY1NZpXkvU8eKBGdbs237M+JqDTdf1SnLAAEMNuSTQ//uUZMONEv0YxxPdMlA0IvpNYeYdi0RlIG9wyQjIi+gplI2OAAFScCqAsvOpZRCVzFhq6o8vahTVxbRyY+uqkkZ6m4c37CDjPv6MQo4m1AzKmxzBGHAEZhi7o5uYjUX0GGSgIJt6gfMYSIAeGJyGGYYQuxlH6EGmSOiRBLGCwAuYK4RxoIjhgoGYxQmJQox23ASgQgZiQWOBIkKxiNy6xqVyePyuxTWu2t52tYzeMqiWdKK3jG45n6P7wAA2bmhhkGcPZGc+BlQicklxj4FoIEGBifiy1QANPTvAw+h5yqUkB6irN5CFy3LIbbCTDkv8t/3MqDmBQ84e5SGOA3gGARFjAID4gwSwvmM2/C7DFBgoA3es6nMH5BGDAQgH0wFwBmMO5FWAUmRGaQZmMoRGIKgmeF8GQQYmFQKFszF4FTIIEREABZZlSPsAUTMq1yUNIDF/V163+/WyH1rdHaDligLA6esNdp0DokzLCf4tv+3TZv9fTr3qUpLInvrAACZN//uUZOGNEwYYRhP9MlI1wuo9YMKDjNhhEi/7ZMESC+Vpvhh05AAAQk816ETALzJRQa/6JjMBBQNMoETDes8QHctJIWAAdOFYUp59QEKM4Zu+Bo99cH3GOWzf3r55NY5LlT5fyrrW2YP2WFGApEZBkWBiKYaWG9mqFJXRhGAJKYDGAHmBMA95hOI9CY4KB6GbAtmKYnGPQaHxDxmRAHAobwECRhgWgEBtrrX15l691AR1fyYtQKt/4u7putdts885w052f+j////+sAIElyy2gsoCQ4sUXmYuo50oZeqUaImEqRZgk7xj4nQq2Vwoa9rA5K2FCjdumk+cu0U0VytdqV2qMKTEWDFPhtUxCI8YMCkFRDIYWucwT8EIMAIGcwsQdzGakfMAIbIICdMDoC0wZQVDQfDrMIsBkaBDNgA1FCAcENAaMYWFQgGlkGPlR26rxPZKrVq//aL+fN1InfmcL1Tfu0e6v97lCn//////3+kwFgZTKQYlNwSngw4TKj5F//uUZO6OE+oYxBP9YlBGYtlKc2YrTFxjEg/1iQDgDCg1p5kn9NMmUO4wUgFjAqCPMRSY0zWwtDDIRKwaYEeRv3DmCxawswEAjE5GAwrKwOvNIRj0PXD6BcVS+MSRfpm/9T81KfOOBkybR///1/0///osYMSIkmOFDapkEI9yYOcFymPNqShgCIG+YBCBPGAugRZgoIvmYjYBHG8BGMlAwbRTBX2CpVLrJymDYmCj0EAZIhDFEiE1gPGK73SqelmGb/aeysDLq28QGDqj8Yl39JDEjM3NkqOM31TnTHeGtNij1Aw4AFTAKBMMCgGUxwGITAuCaMDlswWJTE5xOJqwxiOxYMBwhKwQYzAinn4nm/oerGAV4CET8/bd7u16UeS3R//////pBSoTBxx6UxUQUOMSqGKzBMQj4y7BPTMF6AgiYA2MA/AyzCBAy8SJ/DDAGiYIzCQPzjgbxIjQgAWHGBAkhwNPAgo0tZuEyKh8c7gtDbUvz+Mz45hNg31f/T/+//uURO0N03AYw4P+2TBdQviAe4xIC9xhEi/xiQFXjGJF7hkg392r///0AAAnJsAAAZh5y9GXRZGB4WHeRjiwINda8YoBKZSBWPBSsClKYaBeiM/7/pqtcmn9Fl/oX8o8vEM8JQ/azaYcStUvEdVu8IAweQn/MU7NYDA+Ug4wnsGvNslYsjCgwVkwMoBCEgdYwfIVOMYcB7THUOjE4NTAMrDkc7TB0EAgMWZGFAxGGIIBAFqAJpLhyoQSDEoIFE3Q2lWqzzVSQIFn0/U2ff9/+1/9P//+f7PSBSkAMCxlMCTvMvxOBQeH9pKmEIDBxCY+HGFGR4wWXMT4CwecSbJxyukIQYKwZH81C67TZlxaavdbXdRcHDRLW1RVoAwaQSzMhnH1zCUzzExJoBKODuRBTCmgKowNcBVMBaA0DA8CWAwGwFnNsnYwaBzIKFNz2hDRb4MCRhkgBAWL+FrraEfL4CnCvPlzm4173wqrVmzAkPFv/sQ29rH/9f/+2z/6gBJw//uUZNsMkwEVxRP9QkBFoyk6Z6YPTQRnDi/1KQEFC+Rp3aylAAACEJccCnMAwXcGgamiIRoYNQBtcAgIAQo1MGR4HiwdAATIkSNAl2oipguOWy4DFXVZTYNvlk79SiRSi7ZjCGAHwxPkzTMn8BDjGHwdI42sWCMMtARjAxAC0KAYBgWpHUYsqBchiCMTBIx0hj7BZJBUCQIouYnKoQWi6Sk+qmq4EhDEwHRNG8v1fUi5ACDkUrdGdnN+yz/v0f//9X73gW5UDFwmjDdDjDhdDCcTD5PATE0BhIBRGABh01RQF4GOV2CijUtIg2cwNJX+oqZMR6eJeRQ2c+w6E7UlclRAx9qqLmaTAHhIIwXAO4Mg3IvDDeAac1zobMMImAczAoQA4wHwBIMGbCkjELQHo4gZMHNwtBHavokVJGtzBwDIoMeCZU47kWHY2trX/zN3OYNKhZ9RGmRPL7PV//Z/+j9T+2ugAARjYAAADBVMjIsqDMsiTFwZzsT/DAoIwqBg//uUZOENkxoXw4v8SkBAotkHe4MrTChZDi/xCQEFDKQp3JkdUAYxBXYSdcaCAAKpoclICjcMONB6uJXEkD40D/xtqm7vsXWSahiSaspWGBsjlxhHJkQAT38wbMM+N3BSvzC+wLgwJoAiMAuApTBTxQ0xYUA8M9BMyOMDGp/Ortox6GzCQEZgYKFQ0H0R1LGcM1o86CF6kk244vjrKERd5EVJ/Z5QfR+qrZ3drvYzov6/215pcDA+IAMNcj0ykCuzDbC4MouZEwVgSjAkBTAgBDNFWgkzkvy5QIAYykGmGnphwwQDRfMMMxbixe3iwvu4dByPSnYggg+QIu/lAAALtYRMXaY+uezWESMMT8gs59rJDDABjAIHGAwgmK/PmoI4AYMUE4ECsMNSHVfMQGQORLd2o+z95br1b/0klqfUepAASDIHc17/6o1CaF0Uav9XXu+///6mgAAwUROjGcFjMQM0IwKAmTJjgEMHUJMhAQXIYPZDJjSgeByonyFQM/MY//uUZOuMkv4YxRP7MkBEIwj6d0ZHTNxXDi/xCQEfi+JJ7oyxBIM6i0DCQ4eE3nfpfLbft5KQfOrhVUsGyhQx7goLSlSYCeAWGFMEvJjoIdMYTQIvGPvqlZgBYHkQAKZeMwGIXvMEiAiBs4YMCYSIArAGer3Z+ISIYKZLIm5rWz9BZuiVi7coQIBIusAU8xf02dHo6jvUm+5Gz92NZ3O/r1BmAwnQOzHWHIMmsrkwwAyjZ2hHMEgHowKwHzBABBMI020wlwNjVAxZuZJSey8IjK2EGzI0U+3/gdw62Oic6cRQFUvLbf97PkrNJXf/96oAbULSYLSCnmLvBSpgtZfiYH+KWmPEsBxgdYLGYAgBKGAfgSpgYgmyYdAAgBh0giCB440ThpHp4wQEs8kctUNahzgOhk4n2z7JX8cuGCIOs01/X36fvciRWjt87dG6XWp17WM2X2MTNgAASsAABY3zAZwDmAFTNsiTfbWyMGcAcxGCIwdEMy8lkzaFwBA6heIR//uUZPAIkswRRsue6BhHgtiie2NJS/RZEs/oaQE2DCJZ7RkgCMjA9Wop9lxgECqLLxvwtFWDv1Mvx1Y3c1Mat+UrMqrS00YI5GZjGTvGZ5TEYeaABnrCWOYKoB5GNYdmAggGgBen0gvmHYECAAzBEDTKAbnSXc5QyBi7o9KYdW5Yys2z4GAJ4qbaLhI6wkhn/usVeoftmcchpX62u2bHJ69iaEQA+gwKBjzAfGPMLUtAwpAZjoSPrBw+JjsRjoKNxJ46wNQgriILmBQwPYNSpnLT00kkX+f2nZrrwTeQUIFIsrE4cFgG4s9VaVMCMDwzFKw5IxasRBMIuEjTe4VQwwocD1MDKAZjARQDAwYAVKMQUAvTeU4ywNRkOumVnNcVwYSIsifZ5IKhnDIUO3ACX4ZmedN4Ofc1E6ogpUG5QqE2tPNW6Klmh+cqm2XLxiGVUaqVWP0/a5stJwAYC45Zh1GQmLaiiYFAIx6ogtCRURhQAYoEAN0Qx2A4z0iMcAAY//uUZPaMsz8WRDP7MkBJAiipd90RTEw3Ek9/ogEKi2JB7gy1gmvTha+WxIKCC144/jhPyHo4UAIZZTYdU33/0atf/6u3///6P+MMF0EMzEP0ZszFg8xMHxDgjtgjuMIIaDEBCBMGIRgwUZwDB9GtNtSjOikhPj22IibkBreqACwhOtwVkc/uNLP37lSrvdZ6klBKLlj7Ul3KDRDQLlrskrs4udbl0KNWMPWvcuWT2Mi4tqZtLu8qly0eMALUzBjDpH2NIqc6vD/CYeUODswsCgxXiQ2JGNKwrA4wGEIy2DEICBnkSLnsTlkPzbn/r8v7vVgPtY5RZtCb2B6j+hVADASga0xEQVtMaBRADCkwHQ6BkXFMQFAiDDCBrMAYOoxr2kjTlCPMaFQHPMeRsmYNC3ZAoMSIQqagOsARgRQPDougLKDYUe4rite3xSpG00OdQf7WdEUWpfq97/sTVtdV9MoAAYRGIay00bVvcZEHMckLWpg/gMGDQRhAaGVIwHFo//uUZPmM04cXwxP7GkBMYXhxe7siDeRFCA/7ZEEPiCIFz3RAYJjuYYBiIZZiOkEzauKAmrRC5BjLt7/ndbrVA+ccJ27pn9P///0AEYdaHRlyduHkHmKbPxUZ0fCj8YgYB3mCmgOBgXwDIYRCA7mMHgSRvhpiRgMOm9liAM5DbGARKhcp8OflZygsbZhtsKCcDqQLn9JyittAHmbacW9LO1jlTDss+9d2bU9qVy2TsRckdSZWAwsLY3pVM2g00xPUM2iIejB8BtMOhgxAGTE/PPmmB8oGBIRMinYFAt4YUg6zSS4U87/Ms/3/26VOXOBFd2z/T/3/+v/3//tVCgw7DVjXliCPjpGM2IymjcOWaswnMEcMDMAYwgCjMDdF3zDcQOo4RHATMYwig8OQ9LdKlApQhHJKKJdri4osGwrYtRKbHob1D0kXte7S73KGX6A7VXK//pa9CUiE1/6VxaUAAMPEKMfZPNOKSMUWCMmWXEwUwiAAAiYBYCpgglCmEyDE//uUZO8M0xELwov+0RBGQgiCd90QDRw1CC9/QoEgCCIJ33BAXJDGxghYmlHiKKz5DIJYtFRTeWtZayz+eCzDrKrK3ev//pMCIAVTCyTVsw69AyMQQDOTTEIiwwRIHNMEkHIhC9MFh90wkAkjMCUEiQUPTgA4aGHcXiYCEpBM8dOCJZr6t7eGOWrQVWxhBQum96xVjllmn7Upsm2tHvozD4sOTNvFRzmxhTF4rdQnRlrBWHgFSj7zDN6jYAzj6cJTMBoTT3weBAPY4BUicYMBXZh6AGAYkyQASjCK09GXuCWigp1YTXr3v/PfN9ytjDyWpX7cRR3/92n8x/V9qP1/b/YxSnvMLcH00Zn/TZRwBMJAoYweZfvEYJwYIjKDBLM2PROnAyLUFv2WCwKu9P8EAHubKMoclvSgEA7rlxARTVMPQxjXf0a78gmzFu0Xfob/RUjXl/aIlaK2AAAxDPIxsno2KmswLMY3KIRTCYA0MJgUcCBkBvjaFGg+om9Qs63f//uUZPAM0woMQovf2KBFQfiCd9oUDgBDCA/7ZEEviGGB32hQchw072o9lfL6g4scHS5kuoHL//t////0f//0xcQQgIOMWGOdDIbibQwysTpNfLlYDB/wdUwtA3jB7D9MboGo1VAOTXQoyQtMbHDpXFnSdKA8CAiSNPKbMP0eMRYDMNUbmdhJrvXfnUuXLCtKd3W/jvX7SR7W5R7mtc+35d4m/Bax+f/jaX7ilFm7vYW/hykzHVWafvkgDAUkwvxi/HLGGqFWdWLnBiIgamKAUYDABliBC5hD3SgGtNHoJfOmAGoZiF2hpAo465jig5V3eIln7v9z/Zf///+n7zvrAABbv77GAXTGJT2MpFEgw+hdjy8qxMT4GQ/YwcoZY9B0QlioEUFTvEIcduHadLaNZ17lGgds0OclzSb2Sly99jqP+m+u+f0faO2r9Nn/79PAGE5CmOlIm2MGmigfHU4cGYegFxi8EhgMMS1A0oGUqk/UqTEAHepocCFqkoozhHoR//uUZOyM0qwMQ4vf6IBDwXiCd9wQDxwzBi/7ZEkXheHF7mCIYsSitbrp1zf/s////u6f+/9v+wTJVMYZg0ZoJx7mtxnWYNZHpurpqEYYuBOmFsBgYJIFhgeKtGBKEOEA5EwBA4AETDQKqPfDLAlRyuvSy4Im4nDzja0JF/tWmU+7r+VvVV/F9a83H+7eVdb3Z/V8PjgH0bGuf3nOffdRr/5q01slPZYk5Q7A9gL+giBPWZz+vk988OYMQswuQBAhUC4IYj5GXjL2viyAMU3tprZCAwrCtSWVkTptnq16L/Uz1ej/7v1//9X9z//MAuCMTDZjAUxF4wcMMjBjDn5A0Ew8QB+MDxAPTAkAIwwUsTuMN9AXTFSAsqOHR1rmmg7jwDoTIp6mCJmlsWIoWKIyIRVbrfrKZt1eq7u5lN1kPffIzZ2q3s7TOXtIh9DSuxO5HM7UVHdWRO12q6LMiotc0zK0+UaRUEDx6sVJAsMSssNh+8M+jzPMpiwxGATzPQYD//uUZO6Ign8LxcvZ4QBEYXiBd9wQDqAvDM9/wgj7BeJVv2xAGBkNwH+44GF/BCHiok/MASkkB4zFqeJSN62Cc5KyVD6vV6dvTZkuv//V0U4p/6U5MPUUY1Uo3D2JIkNJwbw5X043MLzAuDAsgD0EgHBgi4IYYgWAMGoUmHAA1mfXgpmxKAyAStWG+z8mKhgRAFjQWMiEc0VWI6DGMjrQsJbVjEM2mXFRomhZ76iVFLJ1z1qWSUBXNveaXkQisqaYaeLvMi1MuwACgZ2lQYWUyYUoMb47fJhYglGHCJKDGYmIfRKEsOcsDBq4ItMM5ytWs777naWUJXX7P///+///3U3UzArImM4HFI4msAzMvPbN68XojCfgXcyjJYxCCczx3k8LIwwwAdxgwGTOIDVCWhvImg8jfyuUXvx7+9dq1BS8sAhOxRdIAMrNLSRvePvWpR5MVULsCupWfWn1ThVOkqRkd5wato0hPSgDUrSfYq4AIMJKSSNopIumK2pzBkYq//uUZPiM0/pZwgv7KjBEgXhgd9sQDnwvCC9/QoDoBeIF32xAumyVsGBwEoclUyGSHOluxWCXWtz2F+qDbZlTWDSCVCqE9Of76fX/Yj/Ur/7Lupsr1vQYpwl5rYq9m/pvUYfqLBqDrnqYQ+DYGA2AQ5gGoBoYCWKmmBOgWRrhqY+CAQgOBQ10M5iTAm2j3ZReEI8VhRQaLgwBAyXeD4aFgKKcYaKMMhMw1+9sV0AAypww02nOJQhCC7NaK7FJRJrpoZcEFk1FZFL2AJRDM4kHOS3WMmGMME6dEwEAZgaE40YKmKJiXquqEOKmeN6WSj7+6LcQp4nCgdc1cU6uv/uV//o/9v+hFGFjA1CRMozAc4n3CzIcMnMRUa8jAtgUEkAgjAAQGEwJwQtMI0AaB0K3IQlTvuFA+YKowrK1cFgieoEFQmGkQabLHzzpd97g2ggRSITR1Axr+owgNj6KkTMlgQgXMxk+eZWhkfPNNlS4q8sxh1tq0AMAxsMhIQMc6xMB//uUZO2MA3gQQgvf6IBA4TkNb7oRDnQvCC9/YoDxBiHF33BA2bNYGTgwiwaTCAUAoRC0bAzUQBsoZEYBAcKjdI8VitYzDUjZziz/b/10/6v/1df/9nySAGGuK8bBiaBo7RMmLOXkaFtCjmDmAsRgJoD2CQAIwSAJdCCC0wcAGg8iAQmwij/PoqpFr1ucteGQeDQ1ATApmetKIOumX9o69L5hKBOanKZYkNnd6nMewyQFSLo0kJK59uiBXUhp14u1UGxyiiUgEADRhVi7GN0OIYGIhhvSNSmE4CEYGBpyGQPY2Gq6oHoEIFyzjMAVkHvqqyp6/4rjQw13u////q///9X6PQpAjAWwXAwQU26MJVOaDBdwW02SNi8MLHBMzIgeDFMOzSa8DygYTFcCgwLQCGxhWKKYzizSx2bzvA48irPqtLnZ8E9LB50tWGm3ZM4ivYLOe4+y62ucYzMmYycYVFLqSyAiNWadYqjHpDZ9l9MAAASzGGAzSsiDAwsTqPT4//uUZOuM03oLQpPf0KA+YWhxd9wQDcQxBi9/YoD6i6IJ7ZSgMN8CkywGAxOaFFDY6TBbqLrZPepsZVnrLl/1MTOCLMzX1//+uv/d1f9f9H41qzBkCpNOMu0wELxzNoDFN9iRVTC+ANwwMUA/MBOAWjAXhNwwOgCjNK0ABUu2eFMjW1CNoeyClDjECBySUHzqxAcUPIse9kaZaMS0lDyihpZpRUu06RfPGBVd9bR6I+TlWqIkGMVSEn34EusENsVYE3KEIJmcTvmDU+gYoDsiEZFh5R5iMMChHzEgeWSdGhBxY5NTKNSa9zd9gZ9E1Kf///1U6d//6+3/91UhzA1gmswK05HMokAaDFPwoQ5nEe0AQ3eYiABpgrgTGCCssZL4LoYAWzBJcwoAHEmKSy7jqy7gCNseUq2OnV7XgyjTdUvBC7NW/87dwy/7x+/utPu51GTnkdKHyafxXIwv9zTjeLZtK2wSBevgcf/qfFPDv8kAG6mqAoLM0UAK6wzSUDcX//uUZOwM818Vwgv9EVA84Yhxd9sQDjApCC9/QoDfheHB32xAJ1MJsAoHEKVxDLBDu/VPBCUu7v2QqeYtsu0YlAQfc5rer1U6f9P/vo/vY5qOv/9dFXRmGGBWaiwKRz20PGeUVmcEQR9GGNAQ4Q6ZkEDhofOB7SG5gUAi8ywDgqHbkVaRRqvuzje/zRnAuVTV5hnN95K5ezt33L9Cy2tO58n/ff75+g3/L5fV9G99g21FdhjuYqtu+LJqm3O6nl35X5AfJ+6mlpAOY7kRsFAmikaa9CIBg+ANhhZACZdsNxopenkDpHnaLnjCwtWgc3RmGvd6KLuv0r7P5D/xXX/3/+4AAAvq/swDwtDCZSeMTFlEwORoD6Vk1MV0GQxsC1LzNr7PQiQyBVNk5TvAcvDla3kTruaQiNAaA0IbKRkBqffFrqSAomITyxdcVYHxG2kWDOM3s2/TH1IRULPsStlNLAGEAsmcafnCDWmZKHGv2/qYN4KBhga6RiM2Bw4ta7S4//uUZPCMw6kXQYv+EVJBASimc9sQDfQxCC9/ogjxBGKJz2hATDgLGjsRuyQFEJUt5+5AtuSv///1Zv/T///2/9/SYGIAMmJlgnhlcRTEYbOKhm00PEBhIwLaYCmBDGAJASZgYYuCYQiBoGaD4FAgQDnJFSfLTrDP5PKtNZa5nCM59iQkJX8nv3//uVwh7OzelkLTxtTmZXmK+PuayAw36mH1b9K+Z10lPqNxuf7WkhtESlnZedH/NVRL7r2CgNMSINMqbKMMk/MjqdAdBpC4sQh474mKhy7ZCVQAwIFilavEKK9kB1HjC0tAlvfr/mPVRbpt3f//R9+5PdT9SklBoFmYRIK6mQMiVRhpApcZUK6qmALgtxgAQEKQABZgCQsSYMkBFG2HhDIwBwGTXEjVyYn7F1RKKbSQ8iPRCucj6Z5yKRU/55G8JyNKf3+flSCWptfD9flyrdR17QOc11D9qsBCotd0K3J/9LSLv/IZ5P/x+7oW2UFECjwzoWjnt9Mu//uUZO2I0vMKRMvcyRA+gThxd9sQD0irBA/saMkBBWGB32xAMwyxGXTA2A6AoCrgklSZEe2D26EwVJ+fBVdBYoyY0mp69Gn/3f1/+zo/t0fo/+tUjMqiPNToww4qTMGVEeTIgWXIwS0FpMOiWMQR3M4L5PFAuFgfQGFvzIEGGT4X5J9v9Y1OEZsx3HXnnHpnjhxc1cLki4uLoZn2NF4kONduYLu7TIsNnHXkutirMFR60HU0NMIDAFagZJhhm4Heg0avgJtguOGEaCKZwcCi5orYTsfOMQSnpLbHKe0J6ECj3VRjTVX7blM6vt7TCHf2f61f//nvk8vVAAAKBDATAG8waURoMUsLijA9RDo1XRmJMHYBYDHEeTBIQDO5UD34azMliqBCwU9BxtYXYlNN3us7nHPaiW52Zp0AnnI07CcPqMs3f/s+0KU3f2at37O7OGGe5mSqVL8L7q/+mP6WN0b+t6Nv3/M09f+P59CABUGmMzIaH6xoZdHFUoyYYADw//uUZO+Ow7oswYv6GjI6wTiSc9sQDLAzCE5/oED+hOHFz2hAChgQAIlwa5Z5BbVAgrS75ESdw2lwudEhpaF/6v///37v70/2W/+796QDWaVRwAHMCpCRzFSQqUwXAITNYhOwjB1wJ0x6DABDsZJb4bHDCYagEGAiFQMMJgpgqvTTNGFkO0pSeRWlzvL0iGx2DSbC8PpOxZ4lQQYLhlBMMELFGYHd2i0INUbfrNOPv3GJmXYQDNh5IdtW2RNMgKIWG5heXivpMUj04TR9gcL+PGCBMAQAcctvRQ0X7pv7KOAFaEwQGqMidwobV7+j/s/3d33L9O3///S66hVjhgKwmqY3YUNmCcgWRyXRb6YbgASGGyBSYMgThgxryGMGFmZWWGCBIcBEZkRBTyz0timdJQhUGPmIFSfDCv0PzjUTbU8uK109DryDN676N/zzv99tJt8h9BqPu4/AylrDGXKzUkJb2wX+22/DTcv02sw1ungBUYmTGia8jBg8cnJ4QUHD//uUZPGIw58MQcP90RI74Shxc9oQDfRnCy/0ZQD3hOIJz2xAMkyMBgQCyAKR25Sluaq1n9x696kMBgTPhiNgO1P/b+v/////u2EkYBcAumCAA5xhDJsQYO6EEHJOi3Zh0oEMYYwHpgVg8GG6hgZy4FZf1CcMAKmCgB0oLW2zCezoQ40t1zK/SKZtxUralDUiyB96vG8j2fz9mWtIXgz8jf0VSO7/9mdMyv7Avk7Q9rfUlhvtq75eln3B/X02X17P0GPp8c08y9PDuMAMYK44D0rzCTAmMoBC4IE3BtvLZPGUabPfrdMTWbUaQGBVr3lmIR//f3f9Kvd//u/7P/qVMnT8NTLyMeHJHzD2Ayk4JRDcMMoAyzNsQDHwGDTUuz+sOhoUVLxAChiMGa4ZPi4T34ZZXpLaUTlbWR+YfhmdF9mnqYHd9HsGth23//5XJa6rVY1w+S/t9mv9NtvfrLVVv6ephHP7gZxX/ezp3Jum+2SASGEaH0YaBDYWElNtRzgw//uUZPCM86ILQQP+2RI2YShxc9sQD1j3BC/4ZUjnhOHBz2hAeAUzHjkhTMlw3NLZ2VIVz47tHPGQtzFTaLdOS7Jyz/9//+z6KO13+tUZVMgBc6DZjGGgpEwqMJUND3QHzBYwL4xkDkoC8xxv82xGYwsBUBAczkeLN18KWDQqMUIhq2RpI4fmGOTW91raEvNJWVZgCHb1LU1wTPODLFxVtUclSiQCFrVlE2WPIWOGrMnJRyb2ghuquwQCmUspzG4ZPNGNuhuYCIEiMsGDP4s86silMe7apGxyqKU3dud/q/cj0dnsPdSvd9X9/T31qhABdmA/hYZi4J48YVUJTmlTR7BgpQPCYCeBYCAC5MA+HOTBFgNo2iEs8FlZwMSKLlRmCd3Luc9rB+KGBAQrT+k4Lq/KYRsGYD1oHP6cih27jAjY5/lmzhg++l+VDvWiHStuWZLmTIWaQUU6eef/yMxHRWv54/iB8+Kcla4RR80io8nAQQBjOTdPEg0zdIzIZgoM//uUZO6MA4MLwQO/6BI44Xhge0MmDPwlCk5/oEDkA+LZv2RIAsFMKCAhCQpNgIkhucia9e/9TYMkUVJRQlTL1Mp6Uabf7KNn3N6N35j30IGavbUERgGoAQYKwE2mH5mBZg0gcsYe04gmAhAsRgDYC+FwDswNQQ9MMSAPCIqTCwAQO0rX5L7NUSSA2ZXiwjjf3/iXPNvKPyZf59tpodQ/OJ6T7E/+HUJqU0petPvnmUuXOe/PxAu0+Yr84QuoxurDqL77m/9M3xmjWu3LLKruMDGYz5IzAKOM8BOcwSAHi47yCCCTVJZL+PeSEV73Um3CZb+lNVr3dFm1W3tUj9sn7Hf/9f32dFUhjAHAB4wHEJaMZ2EyDC6wxUzyla6MFpBBzHwbDFccTQoLTzwBxYYhIEQcARjSAaZ0Zo6gxWiGLsL6+Un51zG9uLQYU07guj6UlXudT2mT2tX53/u38Py+6bCPSoenO7T+6I39Oee6zV/+iLBR3c3/a78ehIBKExum//uUZPcKxBFMwAP6GkI/AThhc9sQDwETBK/oaIjsA6JJz2hIDLHkMon821U7jChAhASgDAxI4RnHXlldrkBjARuoJtmdyAfCYx9f//7f+vVV//aFUVYGQAEwG0DWMRVEtDCIgg40Uw4JMHAAjjGkNzB4DDGibjbQYTA8EkTUywYDkjZwqpjDsm7jSpv4bN0YMqX3Z3fIfvGYHv3n6a3e31CvKPaR35Na8s32Vfy0/e5DIPz6tP/fE7vy/3/U3/vPfEExATTasfNHCY30C0TCuAKDnZEAHKAKktKjscZLlMFySB0wBZskNMuvMt0t/+ir//Sz2f//QhUAAAmRBULAEBgFYVaYMgRamCjgzJrqJQgYS2A5mQQPBwvGEH3CEWwwShoAVpGJwHvwBggNhijzQEdZyeHKyTL2O8S6ecI/Oz2nCK9n3+WTnIf60uEUyn0ued+5eUzzyzyWbF6E3/nWyfpnnkQyoLUXdNp79MRZPnIACAEw+jTpzLNViA5CwtQ4//uUZOqI054awYv9GUI0YOhxc9oQjag/Cs/0pMjbg+HFz2hAXoeSR4KEUYiO/c51KO048oOIa4f0VjyofaBfZ7s/Zb66uc2vU36lf//jdv0lUARMEGBKjFHihAwPcBCOPOBpzDTAD4wNcArMB+AaDA/xLwwwMB/LBYtSDRx7TqfUtypccrf0eWJlIUR22bEdOwnLsIiOHT7FKf6dThcOxVf8k8j8fzWZkVOzB78DLMLN+4coOEKrafo1/LviDueMWqv2fRjoF3mulGUQFAzDA5Na54yoYTc0NKMJABcOXI0GJrB3OapY+7HO/d4VYi0G6UPOFCoehwn7en7/9ZKnQe/uq//b7fm/QkBMAPABDAVAgwxgkDaMGCBzDZpSjEwgsCAMdgtMAw0M20EO9QQNgks8KImDU8NTCSfnhv633VrAM4wdDFq3gRyBQZjQM14qlsVTGrCji21rgC8g9FbDYw2FFOirOlhhpYz2GClw6XQSDBEJHnpqqXG7RjSgIWF4//uUZPIIw7xTwkv9GTI84Phhc9sQDyy/Ag/oaQj7hOHJz2hA/V00xDBRFF0k6iITj16IW9OJT3M2CNZtb811+zoX/9qNP+z6r/p6evpBKrUwKIwxsZZjUGBmB2JCcLDQxhQAomLhgkAme/57oojjD0YFh2Q5ctDmhCIEoS0X62vbdiRdRRuLJPKDbxtr2NdEGpbVzi7tCTzHmgw1iakIHYpWilD2JOvBcBAK65QWAguyPIwMfNNhqeMCAHVWgEENgpVlF+p652xTFM6Grrb069lemq/R2/1/5FzOp7P6v9MwIwEPMCpAWzDjjnIwh0XsNbphqzCTQeowHICpMAfAJDAbRvEwNsDSNmLzKwYwIGODMWz3qJsPQ0EgS9J5AoSoQJEg54ykvABgVePXaFBdB5UVQZm5kP2ghUNFrmCnI1BoJECxHCRJZRmT5oWFT3MjhoPS65s4MqHqJKwQGyKyxkrFihm1S6fNYAEnoYlVUDiCBY05yjWscMkPgwAm9TAG//uUZOmIA2ANQYv9yRA0QPiiY6wGC2glFY17YGDdg6NlrshMBAFQC0jAaECnMx2D6Vaz1vJDTLCaCCAXNqYJ68f0++j4xstTR6HqFpFTLU+h0rS535n/W3aQ5kcdG0qOYreItmEFBqphdSpAYCwCBkg2GBoomP3Nm8goJlsoHQHMGwgidz71j7NzO0BhjnJOW9f1ZHT335W08I/3a269WvubyzfJuOt/3rx1YIpq+un8sTQdWM7W15dqcG4NiqLL7bJ5fc1PymHGKYS1phdzmeyz4YLIH5gBhdcwGsM4Q/SV2gWcPu2HRtEgODsMttQ/r1L/o56MLP936N+ijTQvt///aigAsMBBBCDGehhUwhUOSM18Z+zBYAR4wrFkDAEaCQefAAKYAgAkWnQPHasyX5XP5b5P6xurGT6/WViuu9LUyMj0MHn/gpU+kUPf6eh0gTQ6RIxFaUVvi+5X/E5KJ9HdHS/U2koX++0X2ayjTwOktGZ9YcjJLdDaxCEKOhhA//uUZP4M5H9UP4P7GiJFQOhhZ54ADawvBi5/oEjwhKGBz2hAcR6AmWNUpKUwagJgMTWIDDo+BlErmIDYhynnGlbbhhcgjb3/f/svs5nX/+pP/1VmAJADZgLIOIYPOTFGA9hH5p7KZYYQqBumOgkGJIMmeU1HWAmnyAGKgUw4aWJRG1hfxqV+wRzK49wxAthoSB4a/Ka0UM14Oz1z+uD2Wktn1CfCmTf153kns9nYNtfKWfafHmd2PTUw/djb+D/f73bx7dhpAVfYLJh4akBDs1mypjBpAFDlFJmJYPqwuxXga+5iUoZHLC0ChObW4YB7fu2WWei3+j7//nv7/9tdMZjgxVbTD1SBswnAFINigNVTCVgJgwJ8AvMBCAQDAOhBQwOYCLN+ACAorny01e9bu5fj+Fy2lpajucUs9aK9eD/VCdMRnXXP28Vf/LfqPce3+2hMo7bmJO905rxv/5F7vC0lhPsNO3yDbWXHSTN7nl0wCqxgcAGfp6YSBZtfBaiw//uUZOyPw8E7wIP9GWI0QOhxb9oQDjQvBA/3JEjmg+IJv2RAiJQnT4LGRCS+0pyeRhZY2qWk3tDwzybNCfcyjT6O7/X/6LtfT/1BaGUTANgCEwGsCzMU6A9DCtQCc1zcRaAQhONJCYWgsYQ8Qa1h2UAcvRooQTj2386EiYikIfKkLs/COOI62qo1I3aR8zPP2xfBi96eZ0Y4+Tqx8BkZykR/vsujHE+tlncyOlnxPncs/JsV8zIvtpzRTW33qnf9+g+mJdXAABPdTCEFsMGUG43PydTChASCEqVwzuGqd2thH9fqvzWf3vdQTucapordYlWz9/2d9Or8d+3t+n5C1f0KFgIMwOQE4MYnJJDDOATM4QwlyMMeAhSZvzIALjSOsj58ITBIAlgyEGDAsN6YLAASwCBOCLKr7W0Hp1T+diMmww2dX6528d9BWW/NVPQ1Puj06b86Wfab5xPOsU6IpYzGZNqan0BMnnSLmRFn7hDT0OA39tvUaugOqe6ArSAA//uUZO6I04kMQQOfyDI2QOhxc9oQD21/Bs/0ZQjuhiGBj2gIA1S3KqYwohONQTPlM+In4w+AdCptQagp/cxznk3XLipcRY5Yu7vd17/7rbUlGDn+j8Z+z/7fVAqgDxgDYCuYEePVmBHgyRplJiqYOiBJGKgTlADGUK6nH4hGEAGlpkGTD8DH/lG487ni0qj6p/s62PKlU2MhkRz0OzKxr7EejE5NXsrWZUe7obuiPvRfZvTsbtV3bTe3SuRmtu793cpAmG2SN5IWFkAeQRHB5Hqa3ZGgurGYH4FgABd4wdQ/ppsPUsCcy5chJ7qUshxwBBqzdt/0f/0e6n/9/7/t43+2ACX4kBOLaM5JEAxDR+zwU4QMQAJcwHwMAABqYJZYJhxgnGcCqZOU7gm1prNt7gogqSFpdKJUQKWl7Gn4xhtAsqyWRqDgo0VDMeFxcZeWCSSyLAXePNvXFjQWALlGVxbetrporMhBdjqgAACGWZJoAi4wHJgshzEER4HAI0nl//uUZO0Og+NaQAP9GTI4QOipb7gSDe1lBi/0RQDfBKGFv2RAGx2amFV5qZTe94wYabxrVhch+l7B/q3T9VXf/fVHt2Wfi7N937NghALzAcgHgxpUPSMJWEGDI/WkMwCkE+MAEAawuAOmAYCgZgywDkdg400ADApm/nbEF8yzwnKn92rkI86gOwVBBEkqGV9CieRHkq7ZcHZXf2hzZINY2szDK37fC26abg6+Znw5SkzMVeonIX5GaWv2GTQnPNaf6qPLGfQ+Rzw7pBywrLBZKVm08ZlkAY6CKJgMAQIJ4cJJo8ckF/kKrQEWaL1PGukSA+eV7E/0botv/Vbrue2hq9K3//zX2TBpGMCzUwowdPMEBDOTG6U/IwOcERMLhsMLxdMso/OdgaFgjTMTrARPNXvdsTvcvs4ZNkv/VQGIhs5Zehy7ayq0+WM/irTwKnqYa1faNT+Dr73J35NKv54s3fP/Lzpdpf5+1+i8vt03Xn8w93Pnh0kFR9BNJbT3fsjD//uUZO0Ig0QJQiteyDA8IOiJc9oQEAl/AA/kaQjsA6IJv2hA0FQcAmOAER9iL2M5YSKue50VkopWmhrX+n9HT/b+3/2e7VR6vvsrVQGTAUA9MA8NgyIF9jB9JiPRr18xHAxjA/A9AACxhDBtGQ4BuY4i2V8ngVJr+E0RiYcLL0ZaSFlu/plnXkOZoTytabZXMi9pxdJT41T872/kdkTJXnCiUS8N7lzLIjhdUEcOmT0ck+qcJ+b3yB7Xz7glgI6bj34LeDD4MKDhfA0pWNR4wcwaACAxNTQQMBqsSu3IzpwRUhFppwueIizXDI7QRDitO1mjX///9//Tu9P01J1KMANAEjAMgE0xIUKLMDUBxTT5zRgwZUB7McAqAwxGPmYGswrgYWhYCRCAxgwEMETda+KI3HBSlZTWdf9yKkNbnyS3U4/w/zmEk1lWmq8fZkw/+8/RBznb/viWaXadT6v0SyS8n+bZ//DmSfHpd8/MbnUIA3QAg8wzQTD4fNm8YgME//uUZOsMw2YMQQOf6BI0QOiBb7kQDwVTBk9kaIjtA+HFv2RAXGjirgZiEisLsW3vBlUWeE8w1YHDygaUKvqp//9213t0/2jde+v3K/9H2lQFwAgwBEBPMTED+waBCGywD1JEJomEeAqYIQLBgioGGIGDuYCIChZ1HIaC2XFO24iCVnhO1Y3Bfb5NxGS6eea516XbULc9mTvvy1CJ0K8KnGyI8janTKL3KO1P5rvE7sjXnzMyMprqnctS42SZzSZdpkaNicBad70/GWmemFEE0IwLTZKFaCBASI0lYFbwYriVVQA53vHoYMcARyhy2DbBoS7Kn+/1b/obs/9dNKX+zaUSdo/xJm4xYpMNyjCMRYgwLUEINYrDqTCbwCoxkBUwLDoyBnI4jA1YVfRAAphADD+5fjz8e3sNCNy3t9NGCJSR3p79bqgDhlDHyPufrJM4Bsy61unfkxb5qvzCu46srR93mt85hcLJ+e9/uZfN9t+WEa6AgEXf3VKU3DktCowO//uUZO6J04sWwQP9GUI6gOhhc9oQD01vAq/4ZQj2BeGF7RSQz2bBQpI4uEKoK345cs1ud1gila6bGXUUp/bf9vz7Pb/Ff/RT+q4ITAMwEwwDgDjMGLGXTBSAik1nAu6MIoAMzIEGjEQCDNEizq0IBYKW3EQAGFwNt5anKAPGCCZzLIhV3po28TjeyGZ3g7TdZBB5nZz0e+hUN8UMJ6CUhm1B+qpecJe/QlhLTj1Al19PtE4tsFjbY7hTfAOncLBDDeUoACEosqtxUATKqkwh1PFNKMKATQefkKij43OZSOq12lm8Ex5axb9kLv8d93++zdMGbPr09dX7nHf2JjAPAEMwHMBaMP0D5DBxwrQ0SlCVMDDAtjGoQQMExjvjJtuNRhcCoCA5posWcDgChtyFC0Nt8s96yFKezFz+gttHOEU8rfcwfAhi14XMa2Mk6vjP9WMtoEETm9wO4/oY9OO08mpT/8hzvGLxa9ax4oj+zKPCokAiGJdYyysMZrDH5TbM//uUZOqKA2EMQQN/6BIy4Oi5a7gQDyh1Aq/0ZQjmA6IZvuRIAMCxBC9QhphyZ1Z6lmCYGNDnOWSIii7u7urYto9lrZrztGmv5ZuiWYlTDlKv2f0If1X6YFGZMQcYWZaI6BiTDvmzZnwYBgZJgKgbDgFoAKFMFYDpALARUOZNP7Wxr8/er8ot77TyogHVNmDSR5Uc02hpza8CnWgKtazptZVAy1zC7z78cbMhClVjSQZAGTHJ5+ouBFHTu8QGdAwFNnNwRSmJym4YAIFoiAJ7iCuGEJXYyipgvc90gkVujsymv0eu72kdGp9/t3bL+L//6LOlltdAQYAKArmEfDmJgS4XsYdEshmBNgpRguJ4JBEyg005gCxElFssoYkAuySfsUqMgU00IMxhTTpmsZrLSmbf0kmz+YwYs1Uzg5lH7PomVdcxDzvLoTKbEXiD+sUZM5wklMylyTOrG7e917+xHmeTrYVU/Onvr3U8oE+jUwJSVQY1w1AkMZqiKpgUAMFx//uUZO+Iw6skwIP9GTJA4Ohhb9oSDIAvCK17AMDmg6GFv2hA3UAWbgxUXC+gO+1bLz6L3vdSkqt4WStp6+ptX1IS7/p376E1v1fee/6kovs5CBDAKAJMEEJQyDFJjE3H3Oq34gwXwgTFIOjDMNzLIEzjAARoMkgUxgEO7bY5TFqqIZ0WUqU8/rt1pW5e5lPfvS/Cpl96rdlamR/L9Lf6pkZe6fGNipEWTK2WYWh59fBd+A//+fP/UP7vAtcWSM/TNpNbnRUSYxmeRk5JoJlyGCmACHAKbloCuqR2K9BKOFWKwWJKNvA6gg8UCUtRkFd9r7v9iV/+3/b6f3WKBFZRICYwTAIzNzF5McwZY/nsVTHCAoMVQhMFgKMYIyNghTMDwMUBT3GAUl6nGg8Eplxq59T2OPzK3kbq/KnPEkVCG+bwszPytenk6G7Tj2HkXFXhZuSzEidsj/maQPCI1YjcijuDB9Phw51LecM34TNYVyhudYPDGCdLCKEPDgcw+U0Q//uUZPOMw8xiwAP9GUA/AXhhb9QSDj0HBC90ZQjgA6HFr2RAo0FhaQgLRC9tByYSRlV3UhYq11aEtWYskEsOa+v+z/9aP/v9f/+tBQUAKGAjgTphoAiCYOqCZmp1kZRhUIDWY0AkGCkYQcECRPCA6QNXkYiAO/FfU2Kqo2bGWx8akiVGxYvrV0JZTciNL3pwjOMp1oo2sqv5xLnySH1unf/5NzlJCLzjmXrLf5KxQ5Wn25QzSJmTauVHSG14TtmTJCMWj0IRvWif2jOBgBbHlYZkwxlALnEEjr28Pt/aogipa8kwUIkAuE4qyY0/7/rpZ//c9Cfo/7P8XgAQlelAEywACcYD5fRg3ABHZ0CeYfQFwGNZhQFGO7UbhCasjosyBwfnhJqW+PlLnFEU9EIOGFOJfBhnvAL0aJ6F5ZHSPppkxVYelfdsln1CqMx5cMiGqfTLgIE/6teSwhf6kZzpHzwNqHueYPrEWwyFuy/1KwBVSVT/JeHaYa0Z20pQOEFS//uUZPAMA9NewRPdGTIwYOiCa9kSDzV/Ai/0ZQjVg+KZnuRAT2CORFO4TPSSCPecU80KxdfZ36Pt/5RN/2dHXt29/eiv7gCpEkrpAAC0yJzEzA4DkP2dkEwxwMDJgLAoIM6pA92BAUBVhkPQCDqEQ4QoCrTaGlgmu35zPIq8onuxd0zekiMR1Ye8d9dqxGVPedh5GRH5yXMihkR8TRGB+4k/OpkOexehzet6l3Ur3PqF3l3/Nv98OD3QIVIzNDqlxnKJkYR0jIJhOBCxYaamRBUE1IYyi1+aDQoKNHUbGf7/9Eo5306s181or//V/0UbhCAHGAPgKJhsALKYF6ELmghGgxgjQHaYmhsYPAiZJwmbjiEBglYk8gsPrUb9mtnhS50VzIL9OJoxLumvlUN5wxEOmTLayBKLN85BoZtauRkuP7m2wXaPL4F7+REZ0SCAX6UbwZnCivKEWZq9KAEmE5CeqamHUZvwV2UHFx4pnneSMADaWpbSjZgswWnmwVVG//uUZPEAg6g9Q0vcGTozALimZ7gQDn15Bs9wZMDTA6JlrphQCwDsiiIrcaVj+VPVFeskxrQsgihqW9vsqfSLZW0ds+v9uSpJez79P3fSwZgEAVjgTRjOoOGBsSAcmu6ZidhoGAMBqy4wISxTBFBEPARYSwh9TLiJzzxLUuTBel7wM3RRb4TVz7mvaWlree6lZXbMjz3Q5yEd1r+pxD6VLN0bPkhwlOdZuw8sz+ka07zjFea25GVxItIWXp5tgagtp3WMm1YTo0THcDAznQsBiy4gOh/AA61Ems4lZRGbGaTxG4WnvR7/9X2UKrR5b1f0+rWqARSuuu7MAEBAwBATzDDJjMEQVEw+oljBGBDBAqAIhMRWM1sEG5vowswSBKdurkEsyaTnO8Pmcmh7BnhMXxbMyXanv9Lx6/Mq2mtQtfuRS/EQjhG0F6nJB+oakWfllT9EvHtspl/89C7Dm+ZOvCWUz8FHoUBAALQNNJIWbRWZeWbD0gYPgOWoS/EVx6FP//uUZPaMhBdSwIv9GWI4AOiWa7gSDn17BC9gaEjBg+HFrqRQh85Xe7Sja8Z3kH9P9Pv693/yv/q0flK7Lu2tyzBQHTDsXDx5mDO+RDha+jMSgHYwCQK0vjCIElByDqYzO3sKAfHsn8MN/dyo8unqxscVKskiETA8MKCPpzbFW0jeXEZ/ttDpcY3MyNXPwbHdzbkqmaiPPHS8nTzXJ4v6W3tEYsipwkpyIY6FWMIqxDUrL8XhGRGkdBPCAWAENXBJVBgDPGLKR5RXph0CCKbkJyj+bmdyv4q5BFFYzLNIYFa1HsJTCv3d+cqbou/H26EIr7BbwC+lFX1V795zAGAWMgcpIwThPzqnoeMVkH8xIHgUKzNlAOtB0OESXKVRgEEv9WnWVpuX6PxZEaF5rL7pEK83p/yama9O60vkbLM7kJuFaiJ6+tHRvPnFLjRXmzRQkxFaSdKs5Dd3WPVYyyMcXDn2Pu77cZEWbiUps7oqfPWWGBQro0N+FrEWZ/DOe7Yl//uUZPSAA5teQ0vcGTA0YOiZa7gSD6GDAi74Y8jyg+HVvuBIOpQ9ooPEIuRFd23+3+ux7I72dtH9eb+vorALBgDgGGAgDqYGiI5hVBdH30/uYngQRgpgLmA0BIYCRNxg6AkmcymLlnsT3jCq2qiIZ7FFYzmzFXX7C39DpfGJbSb2Z/l34suCRyvFwZXnEVUizhOewMk1PnpCuRQzzRATyxrlEfhklMU5Un3WHqzcd0U2pm5JoGOvrq4xgJU3U7jNkJpMAvhwTJQOwQl+Z7DVLlIPNGygmRvC7hohABxA0kOI7G62v77epP6n0f+ub/2+rb+OtHoAIMgoYPA+YjjUcycYbEg4aSGGSCwScHAcJgDYA0YA6FcGCQgE6bLTHpDAGiBXw92igvVSfMvISzwiWqgOGOb5HmIMyQYnc7x26blaVy5SLk0yzXJHQ7I9jHsbrDqHSdS8ypoZpJxnNv7xEJZSGIp1bZVZPhlTD9Q3VbJXF6AQCJqqmhlRYwNgAlDo//uUZPGJw2YvQYvcGTIzwPiCa7gSD4l3BQ9gaEjrg+GFr2RAU1wgWlYXeJZItiy62XbU73jEOK2q0v1N9GgLZjQWv7f7vR/+r7uoSFFMBcAQeCIMqMMQxbgwz9aScMV4G0MWRioEGd5MC6OpZAadwhBtwTpoW7LIZ18i3b/hF45zNZmhg7a6TY4xH/zSTIIlOn6nstc9tP2fQi3y/PdP4qa/+cmrEX6kWYuj/FdCoG9XHkcJjgK9hlpRRsgAX/a0kaaXCZp+dcPoBhlWtAqGRWCcTo6gylzn08fdKzlV6F2e+iz7ae/v+dZ/oZq6rO/7UR4AZMA5ATzCNBIcwUEGSNEBLMTCDwJYyAJS3xoeun+x0YaA6AZHUxyBofll25+q+p/DOR87vykrffI8z3aZIXxCRY0IiFMjrzPKS1H6pWMQ6ZXqMW2lkNYT5ytShoeRMrc7IxIczjqynXM4DNQwGygNKw02JCgr6OfVEBC901P64w26ZeR1/vlrnJphkZEa//uUZPOIA+xaQLO/GMI0QKipa7gQDiUzBE9wZMjUA6IVrphQW2sbFVXSneRCb5Rj9n+3V9akfd1JXtqd/W6zYBf63P6AtzC4KhiCJuDI/Z4OctGJ4DKYQhYYBBmYi2uZuigAghUGSpMLgEZqKARbeDDBnYwBLSNqrn0ttLSg2Jp7kdofOIUM3I7G8zTfQsdCnrvJDlMiddjvlFUluS3KGjGvSN+Ldi2NVUkNvs7b7nBvlp7sWuUlMeDz8yJQQUkjT5Gz4GAtmTWGA0D19NlJa2dVeaqtVe9zJ08Lio0YlSK+vZ9TUturf/0MVijUJUwfQli0fTT/1fIqVOYFACZllk2mH4SIaj/65g6BIGBQWg0DzCK9zPgOgcDKkkJgWBWMU+F3erO6K5auquQnhq0yyzhkjkxkhJahsVVieZYMj8oIVPB6lf0cToZZNQkwxqe6E0tJLKagn+MR41BNwzyfzSfYzSIZELIkhPD9xdIiiLejmgXtJLKDcMgWdMEYDXTX//uUZPWLA9ZPwAP8GWI0wOimZ5gSDwl3AK90ZNjug6HJruRITAwGFM5YQZkRlFf5IjS1rY6JGsMmRqrw4JGC93UoUQoj+b/75FVn2/qqR7271/QtVWPlUAgwEQRTIGHLMNcck0T8CjDJCvMGDQwiMTMlFO7AJEt7GnhxGg8qS04Jhk0zMoZtvqv/OPS+E5Ull0/qEsKSqMmYQvKuZnsELvMFh6ixncUTLkYJhqTVlq0Kv/+umExHFK8kySUi5GO0i45fSuSh8IxKbYPMAgQKyLLZeY8OjX1OFYsMDwBQUXegJJggH5aHc5aK4ucgMVbQOQPT0ra3/3EPR+3fsb0dWiHLf+/zNQoA+BApjDhQ6MK4hI7ztszDEDUMhjUwIBjOTUPvDEwCAl8sxMRAaiHwxax0RLE4IkyvLdr9TsN7akQ4pFZt10SUxRRH2dRZd/ndQtBmv64PdCEHESnOn5tahdfS3pkMmuZUoRdZbMzBmhSEz1aUJFmhgmpQ/TwkANUs//uUZPGMA+RdQAPdGWA7oOhhb7kSDtlvBC9wZMjmA+IlnphQzbgQ7SjUUOWFVFg8XvDiSg8BIZUE9N7fuowumL9zTE/V7/875zbmP+n+R28+2/alzwuAMFgVzFbKfLAip4HvkGFqByZABxQKjH3oNjCkODyvU9jAgHmHBZm9HP0irFMs0LGJjhvZAzFfFmy7ISJqpWkvxJtb5N70i5u/ELhtnxQUOd+vyqRdBrI8+FemZxZmtpWP6+fGzmjJf2h7PZ9DKZDVDtzjAzMYwMzPXy4IiPVY+YpMs2j52fqjHuqMNx73gCjNXadW+aX939CPRv69n8Xv0u/2qgAQipqqtrXMXwAkwHQMjpeL5MPQAMIKZgoIGD8sZfD5cJYV+isJycmoR5TblS4JzXUnX2hQ+x5tdTyZc5Lirn6+sz+Q0b57n5mjo5Ekh0eZkefvqbRT+MbmRFxJ545zr2Z1FYjZCSMaUG61DONtHw9hPMAtLIMd0MQNPwjOJiNSyaYKhYNA//uUZOsMg7ZcwAPcGTIzAgiWZ6IUDlV7BC9wZMDLA6HFruRAHNYqAJr49qrZBle9obDi0que1rqR33f/94C//bqWn93/ci7UIBgBAA2FQHgwgUOkMBtA7DTzw3Ewj0A4MUgPMBQuMdYeN6QHWFZkQACYKAk+uH75lzss/dUlMMbgkHlNTUvGS1E4zC0IyNjM1Ncp1BVOQ6lAE3VCqUw5McZNadCtsavhqRqZJh+z4RXN1zNYCTw9rQiUKKJvMIzHvTDZyZCpkJJj5zx3Y0SEZpjkpxWIfcxaAhiQpa0IZFfaXLCWpFzAqeijAZbXqvQlGvk+LWlmttiZMWlWzd71OivfmdzJKY+Rp91Z1i9LqjARAYMBoFEwNysTDuE/PXpyoxOAIzIYEBw8M6ls8eCB4AyNeBhAByb+YZ/+E7r9EsM+kXSpVCYyLnYp+RrDzsMy3uGXKnq+wv1kbIrn+fnCnd5ezyfLm6nULWlUL/vlO67SkRUyMv/kR6V7mmfO8MOO//uUZPEAw5BWQkvcGTI34hhha6IWELGA/i/0ZYkDg6FFruBANIiQAjXPsn6aRySxzhKQjAoCV3RVG8iBqfQeq51qWY0aPRYSUxCvzHzn9RVOrY3fdX9Ox9//7t7BhFEzJPejDyCyMMEVI5AY1zCFBSMCQBNJIwMRnTDVAqAwCqYU6PAfz6WPkCPh3Y9vkMvZDdbJRXCNOuRF+mOjHNqN+0yyt19zPy27grGMr33ufOParHPZ3bDw9LTbpemXJsvyZdh7lbeZvebFgtwvSjmynk7KTxJcEdAz3oswFAxnskGQfTOGpSY8OvRtGDuWpQPXuytGv2odGfR/fzH9fs6qv6OjXQAgAYSGqJh7hzGBsPSbOGnRgsBVmAKBsOgYmAAUaYMgHhd14kpQoAdDokxUS4bU+IjGMyqE2KiKhGPbdXV2MkpNs4dM1RTnHqRioc77EYhcUC1xVhNtO8jR1jh8dp7yATqjaV0BtXeciQIefcmwuAfnuaNHkDdanAKADhKq//uUZOaMg55gwIPcGWI1wOh1a6YUDkF3BEx4YUjQg+HVrphQmzbmE0mbunFgDVVGligZoGV8IZ6o9D+ciMhdImljb9tFdky11X0tumE/RyimITpdtl6dqNbdr3wKb21F5SQBQwdAYTBWHsMmDWkwEgngKJU9zKXtO0ApqLQ1hAEQYEHw/mFDRKC+7/T3xTNYh67FCSzCf0SURFTpeQKT4c28/eO2pjldTI0PrRCU9XqepqVyYvKZ7GVL03C58vk3YnCXM0OOzKDU6dKKGSsHhbdWXGFgclgUDky7zCwAljw4KbK6WL+ovpZWdY75WbHjY59sM9HqnrFu2Zfdsd01PTfci0p1fdd0U+x5LtVBoQgHmC+AWYJY2pxF4XGGeEOYsFxhsQkUEA9hGg8s1UwKI8KvX/w53c5zCAwdtr7WMcueReEnU6VeseM3g+8SFVI9S473PhJQRaPtced+5A6G9PSHHpPnFc7ltfKm8XPpmHJKvzJck0MkI2SEX9ORx6vA//uUZOyLs74vwCseKFJAoghVa6cWDjFlAA9wZMjuiCFB3AiYGlwglrvEtQzLM8zj4xLAdKxl5dwoDEHHHCXTZTdGao+MK32EmLxzI+tvLOf6a0S/p0RV9mLue+Z5tPnit3VEcx7kBf9UhgYA1mCUHccwjtphyAjGJwaAAIYsqBtoTltnBeNF6fI4ZLBPYnwGpfJyZOUM81KsxdfNGLmTc5MvB9v9a0jPyPNMj9oXfIz0fIpn59O39iPLq0jz+v/b6J5XWVOEL270cG9DnlNV1MlzemiKcAh5giYKFxM91CQGkDQGVAVsz0Ud33V7czDDzDEGVIrUt9qU1b71/37f+j6u7/o96gACkqaqmWpnGC2HbnnEabkYXICIkB4XSBArwNAPTOhM0LAK0ipWTYX+bW1SJbCII+4xam8HjmbsmuZ1sdZpFKq5wG0NmP5+Zw1YguRak7n54xLiNif0JF2Q+HpJeqhFnl0MxN1t1Qub7F6Z0w9Jo2W6H/2KveZlYC6P//uUZOeM06ZewAPcGWI/wghRa6UUDU1ZBC9wZMjWCiGFnpRQsRREhaRZeYkDBk4uQwPevIKpENb7IipKXOchttW9bbPH8km9H7bl67Kq7idLv1E++wW2BCyqqlvgMA6YMoHZhVAYnoUAkEEchyLMOBIyPpDh4ZW06K8gMI4tz9/bvdnv1AejEM5lNnhM7C4pL5kiOLa0oKXa6k1c8M4WB1SZWnldzPtGprrUDR41IoDfpqosnbkIhBF+0J0co5ECQTOv6liA31FydCeItJQWDfanZTxxKWl0gFKDEhO6FaMMABV9CBGCREC8Vw3OlyOfz8GWtWwGyT2RTqFvi3n7vs81F3rX6Y8wJzL9KbvYRIL6VQCBKKiRIKBjRD82mWOT89swyQJgEB6gKMDkEAHEBJ0u0z0v9XmhGwX7ZmqFPdP0+FkppnMzlyqyZgmmiZRYnXPI1KUvLzfp01pOdvIz5q+8IqxXbeqT5n/0vVAQUboGoeRUq5yEWDF0sAJAAgBR//uUZOsIg5haQkteGMI6IXhQZ6UUD7FrAy9wZYj1CCGVnoxQmAjHDC/RyLAZhWADOYk25MD1LaYMZ6K2P2Ld2bV0fY36tqv716kfp+MevRm0ysL3/T0+1IWlkUuUWhMCEIwwVBBTiCbiML4EUw2CAUCTHsVNwhQvy/UJIiDAt/HLHmHzn6M4isuZp9CVMOMPSMjDgjWeepgzMw7VSQ6f5RqUorDUjuWDw0g0Iy8vQX602NYZqcL/Mo7SOwIqSSLaUvoh+lSJ9UrseZRCOnsYMy8RoRoCgxFasqekuaVBObaySKL7TJCNZy0F9Fupu3UZureRT1+23/dRoZW2XSf/7P/kHf/SAQJJlFaS9QFGACDiYCYhRpfulmCiCEYICaxwTbTBoWL8tOhgt/0MJD2WCfZfZC8nI4ZLBUkKKn91BTkIi0uTYbP982M17u5J68B54I0xJsKyOk8JTpzpkedTMjylh0yRfe1+pluOZDWErvS1OkWJTvwTjxHlbgAAQLHD//uUZOUIg1ZKwbN+GMA2wXhlZ6UWD5GBBS9wZYjDiCJxzAiILPhAgQ+GBkTggAHxqEoNxgS5QLvsrd/b9AVbrMV76/p/q/dr/b10aNNFSE0XpfPbVgEFwACQBcwSAWjARGlMR62owGQgRALACKTHXZOAB5pcML7MFgKXp2wIGA6kDd93TDEhFEJiMilFJjRZrIZVTZLU3M/JkaSiqdaAlNwimXBZi4uIJmLvxCYpdCIhTnM469azquqxHi0a0aC1PjCySEcLM7k6B3t4OxKkgsAFqajoYMVMzmv8MEgNrD7gU0FkTaWq3XLyFabr7Kb996j/TQt/m//6lM9CUO5CypnYh1KaAANAVIZWSMAGGBWAIYGAkRo6QkmDMCwYDBtIY4QoeFXalc6TCCiu7z1hYznv+HK+/766KZo8pKDpw+7EayP96rAzmXhACXEBAbqzHHMuzSDn625oZXmWeud2oJlU9tqal+VgdEj0juELNtmmbgiUVpA5q7sH4gEITOdE//uUZOuAo7FewcvcGTI1woh4Z6IUD3ltAC9wZMjPg6HhnkhIGJgYHPUNmDgBKXw4w0jDczuV/cNiNmLLJZCUqAL9uMxtBJfdhVn1oe9u5yBZNVR/FGzOro5YwmqzHZshAAaIFwCzAGA3MFcQs4ZX3jCzBTMSBIBB8ydADhAPFgkv1W4LgGmEzixZWOqjbSLCqRUClNusfB+mgpKwuxwUgwJ6pT+MNPPDUAO3mS4/bny4Bzju6HiFvQE+y4RrZ6j/EmIC8dr07kvnEemle1cC3mEEtgYzePLzv1UhIW1IPOA6QOaVzRMntSVTOf32S9ru2iK2atCkK0dEUSubkJRvaP6+b2a1Maj+h/RV7N50VAQAQYKgQhyJJXmGAA4YlAJgQEAy4GNBChKazFw4FUdn8cu4cov85TPZqsm7kRAiJFpqXMtp5sTYHo6PTNZZkmbtXVoU9ilrnlS7m5laqGRX05YZHqX6Nz3ZfKsdfQmLypseZlAiFPoMjipwhHe1UufI//uUZOuIg69VwUvcGWJAIPhVZ7gSDiyRAk9wZMjnBiFFjsxI2mH4nkQYkQ4q1uoShFBtNVQO57Oiv16F326Eet/ZtT4ZZWWz22wxWK2Vi9vn6WPmKEogHqd29VztoxDUOEjBSgHlZ8wknDRUQ8ECYA4BhgOkMGHKAyuJ+HxDAQKL+OQIT0gbOIM9aIUs0RoyV0ev0jgfKIU4Il6PZizhEJpMJSna8QUL6ii2X2Urax8JVQjGMl9KePm0ilGz2bMtTVsgm9ByG/kdjHTnEI1JVlCA1FnBjliMigtLRilQCg49L8WEJtZcSgYnmtA/VNm6dB23vMMsQ0H3b36BRdvV6B3RV036v9j9r/fsbV6KoooBAAF4jAgEwU3NuhzqQMuMPQBUaBaMBAAAwSwug4jNtKFqiT9bndoBm9QuUyQjIiq/wn43WPO3bpZ1jSm6dTbvC31szpSa3JyVflDwA8Yb8T8OP7/6YOe/iTiG1e7SWfrHP/uLJLSk3PREwAAgQCNR//uUZOiMg5NWQQvcGWI84phQY6cWDxGC/g34YwjiimHZjohQEvIFgnOGmGCApadJlhitKYN2vQVvfaP/nFXa+yj3z1/qqv10ym/HNf6/2293f9VnsWADKSzVKoCW6AQEhgbhJGwKgCYO4DQGEWVGPuJ0YEXxa83EMLpelyc6PorG2/O97S9j30Qivg9KaF5kJapm5KeZHqa6rYjHqcpP0NbiI7usC4tjh4L0dMLoiR5pTsHc59sT3z4X1ytZM5h1tW3iRIRGjMBMqEYsOa60tk7M0MgFEpGpGdKbp69R1prdOPPH0ftvf0/KpV3L6Uf/3Ee/RQPWwCPZrqPrEmSqqoSgYAKYE4DxgZB8msE10YLQIZhEMAwHmD6OZTCydMPNJBwYh0UurwOz50mIKX7mEJ0NxkzwamzqZmelR1cgxFTeQ2lwZoHhfKZkWUIJ+h6FrWhzyTV7SLKOHPG8yp74JXQj7Z5MFOUmd9yhktIGDQWqTRVGGq9rcFNAAACMJqq6//uUZOYAg1I2wKt+GMI3IqhodwUiDbDVCS9sZMjkiCHZwwkIrR2XkFzFEwWSvNYJN9m2RpqQt/JRXt2N/r77DHO/9wn8UQny/sS+xSu71gABAwAMAIVBxiQ8mDcoZpdepgOg/BQBtL8wFCATCoAgEgAWLLkCgAd6/qvvLHsgwxwAZTUnLQWeCJHCAKPvVNj/D4QLi3dVNxxLJ10IgZjMTCmelnTNCpEVHjuHcebZ2IcSTKMRk8FlGzBtKcmdJCZwaezIcL4RF2u2jIdbxl5O+zn0BEMKq1ZIoaMCg19u0Ejt0hI1bg5yg3V9TdU1/xriRRiIt7nbdn2fT+Ae3xapCPo1K/+c1QAQDGU/dXRJsZACxgCPJq32xgOC4MAFuzGURuJI71tKK/NaeJ57Ss+7nbdDjrsqIryavV0ux5DuiPY1T27y9zaL6Kkq1u8tyUdkonclUdTorjmnIFe8JMASjSySmj21lcWhoAAkRCQTCnR0BvTtd0DAu4j/q2lAEHZR//uUZPAAg+tdQTPcGTIxgLisY48QEGlw/w54Y8jPCiHlzBSIHZk29dW/gxhHbQ/u+AOi1b7037P/7fXqpu3+tiYAACMC8EkwihRDk2qPMNYEwxaDyyhlhaHZhGWadFsYCDl7dAzSFASdIKlvNZP5rJLt0X0Zu4ZrutGNTZ81++p63yTkbQPa9tffWbmVrzORmEtyr01zfV/hea8dBLu2KNb9p+9fYu5T6Kc6dPffeNPznGCZj/WRLvaaLLK6OvT6e5mxiKoXMoQIwivZxY4AQfSgYsLG3liiiTIZUC9LbdOo0BV/aXq07yHSMOjX7Vf8khPi7O3a67N3IrRov6VqAAKFACQZankGAUjQU5sypADQm5MWIDjAvo2YFWdFYkkTomOm+KvQhE8K10y8c9mrlDn2f/wQZkv9Jnid3M93/TT1JxDWpCOAhYTpSuOcpplVt+7rNYWXlO6bWcnw3OU78aGXPzGXc6Zm2zuS2RJWlANHepRDwxrgg8YB5fr8mPfM//uUZOsAgxRHQ+O6ETAzAoh5Y4IUEPWG/A9wxMjdCCHljghQbQ761oMxdd+Gah5yza1K1PuYqh1aJycSwT9swtFVvCtKmVV2RJpX+9aAkIkUW1MBECgwVAxTduNNMLQBsMA6BQBhgTiJGASAC1p/XaJgDrUtaGba3+nNphQzP3Tbyvv5mExHu50TXhbG/MM7maFTM0tO5kTJa7nws7iEddlIn45ZHubGHyiIe5Qpe+mfXhmZ+5dKXO+e9ITDnErJ45HJq9hyj2prq0UvwAtObDAiAL3TiTzzmxHd+K219dDOnaUb7t138bZ15O5/u+nrVPN/43uHVQAAi992WVEAUweo8RIUwpApMV4gCEBMH0VtVZzEjLV1b2eGDeABc2ZckBahR46nvYwkLIGsOzTIpuRE0BWlXSy0MoVlt+5DnPbYSvVacGhAdWAIQKKsrSx5O8hHhtmoA4BQDUMMlJTtqZfztrPgrnq1DEdaLxHorlZNjv8nb6p3ysV+k/l7MW7V//uUZO6IA1tZQUvbGTI/IghAdSJCDwVdAK8YbYjCBiKY/ghQdn/SUgIe6mApQ/2fFOua17rj+M9td3+teFuos+zny/vrLGyhpuqZBVF84eUgwIA1kUAiE43IFSB3SRkaCtRa0mujIivalmGqshHOTUMK2gVt0DnRgq5iH3JWxgoKHWH0JRLmYUUu88adFxZwkvLTSmtW2w8vUrZIAQ2Cfire+jpt4hYdtgGL4l89EFzVTbpMK6ZbCQqFz4sVS2n6XY/NF6T5H0pmZPhZkZSefMuskhvIdJ2x8prOUsz/o/gzmIy7GISs0YAvmRgCslwp1Vy89rH2tpUBjzqGFglADgYbQTRHJguAxwWam0LgMj314+bU/TX7wque01BDZxxfxaZdEdj5+cPcvnf/OWU9TL3LOw+IKPPoO/V47+LZLXmO3rqfi2YhDlehI/xH4gCASUwUvsYDY0pmERgA8coCsMWJRW1VdjZ8tN9Yyl9FFOeVFMJPz1RTThrDjoRB3Pwg//uURPKIAosPwsNdEMBZAqhJcwImSmxlCK7gpEF6IiBBxY0xO/3fPVl3IpQNdw7hLjl6LtkAmHT8t5etUTdjENv7ajTLn3Ux9PhpO5MIC+ASHYE0JD15rxVBTQWosG0RT3U2BKKi0SqOnmpeIgF3FTK/tE9DZxc6S3cqfpbf2/efN9DoGPYKnzZjwx7d/po/2nRKkpVrvz4afqZt+4XGaPHhq1KrYhxAJsxJUGdyiVlUVp8FoAPTah3pkUmTWIiqhcVWcJnyLoLrBxrLUoMWKsFRaVbNtM7DDNR5dtrc8tfQ8aQAqXzyUkCB8UF0qgKf/VlTUBGCDTfXU2lNOKB0iGBXiRHZnZIYljOuGUIMRcMagQsoTbEVRMvJJdbZPKNci7ucQqx5MzYWNS3KO8yIlJsqXJTlJqXMuqfrJenI9dsvdU+ZfnLqqKPXpXUX5P3cXQCkwOOh2YiH7ZokFysPGPvOLgs484/LKetM8xo6mw69hm1HyKGewfMp+QCZkhEd//uUZPIIgq8lwakcGDJZwpgld0MmSrhDAgfxAokvCmGk/hRQ4ucK7ak7xZHs9VkI1iZrFzRUwqGSmvTznDKUyTrQFEgaRpWrS4UBqaoVqZXIs+SmlKCaBBoghrrSAIjdpDqMWETOJjyFS9snXSlWmyuWauxT4srPDq0+P2pQK4V1p2+lrE0WWudSu5ruoULLQRT6PBWZG07aNKwKFywt0UIzpUF5UBEdYlnmdulAZOVG6+6zMjlFl1x/4u2aby+F9unaFKsyf+mfB5oP4atnbHvP6mEfvtN+76vnpafGF+4liLMm/xqnoB0CiIcGRu2gkgOYRee/G1VdrboVfniP1AZaI7a6qGm9jaWIqG7sRZiyllKq9F93lKtn2VvmRfTk3MebTPzyt9FNGLYjBMhnzZjNSP+Ue60y9MmO+fDJJa5mGb1gkqXM42VfUAACTNVT+m4jgCNRR1JCN1BFgbSBLAvwGXNspEfcfhP0pPJSLTuyUuf1c+N6p8PPNKfdkth6//uURPcAgwhaQauFGnJl6OgAcMNoRvgXFSDuIGFTiWDVtIkJeefvgsuVqp8lJTLZk+nt+ly9PxMgpbywSDwrXXUZJLnBQuw/mE6lbBASETe9oDAe/EvTsc97aBmpr5pMwmcu3FnMCIkhGVF9oI0O9hTmsHxLiidrZ3G37vCJ5T/+5SmbXSj3vXRsT2v+jXd9taNl3WM1Go7+sr7Lk/AysfRGohJ9p0PAaFTutYDgu6kaJCoX5EzrIpUid1VaZwuA2mpT0FyGK/BCDueffkm5zbu1OANj69Lr0pbyOpfwR9PX7rJ0dLbif/lXfyuclsP3x7DJia6q9rk9dIfPYjUBBCdsN8j4c4gY8FHnkDclvmOUCceO2nBFe2aYLOu6JSFC/mtfr7ZZX9s7Xfy+5qa5/XaBrlmlp8hVCi/VeZcIrSNSZjTCmV5t0kMqrsGyofffkXJ9/dDt7p7Cf+84AAQgDanUTwAAD5TdFhQzdyAr4NJ1t5QnEtD5pnENnpcP1mO///uUZPsPgyVXwAOIG3JbCUhZcwMiCxxlAg4saQlrjOCVxI0JWM5kr4972/+9d88cm/kTkJhbek3rHJH9jW9f+9TMtY/zmMbT3ObGRp9eQz+Lut+euSuZ/AAIUD3C4FUCPnaEWpD2u1dWob8FoTW179suQKHgvbBy4doqzkg2cpuz5rsnkU6kPrmVl6fOlyHpI18/45aavhJqa0jOv3OtNnbu5S4yRBAOhWN4XUMbF8tYB7JpAMZ5cCER+EaFAqc2mCpCN1LrUD5vczsGpPnzP4+ZTLjaTmZia5Q8sfDbaaZv/y1//EWv1v/FIr0dmfvTTM/XqwTbbw5+fDS2V5FdO+dQdyT789bzuszqtUq7gsEn7DIsAxalY21JVYCvu6owtd0uqjkVlOSFPKeKRAzbwqmcSUm07g8s1X6hGrwlqGOf/XBZShXjP15i2phF+WpKvl2CsX9kQ77Ys6r47l7Rf+5Dynf0EkWaqyss6R5OSEBEmRWRVJEoSdBXYr4duc6+//uUZO8Aou1CQKuIGmJYopgocyMmS3E5BwDsYMlakGCVzAyZzH6GR/f9UKi3NOBP/s2V7Ccc5L+/kvP/MTo94n7elVmz2M9TTve936SFYj/ux9E50xgkGmspf9E3WWSOhj+m1dHLQOjeqI1wuj5Poj6WUOE/DsMecV0gst1FBBX2JX90Bb9yd59pvr+4Y6KorXgzebL1Cv0vhTHUKXeqi/v3937mq0L133SAAEgslmmS1EYMOerlCqW05IE5UUzAWjFaSDUnXUvIMJMoNzE7m1hR3lBilqii0yRcOzkzB0esKLD7MtXGAKEZdbRU6yaRYx0Rgg0Walp24jWgWte5K3jqADAAg9YsITbNbJ2bmMFwecQ7lo30dUyec/Sw3+ghQgLJKISLlI2KtUQ8isdpaeFX3SfQyLMefJtCjZ8jOMEUi94EPLFTAaIHxiEIjA6yVTKShAJTh0uT1gqPiIDowPqhndcM7MVNnXLJLK6kozLLmpYI9drIo75i7soxEhwi//uUZOiLAs8twINlGnJSwPhWcwMiSdgnBK0wRElcj+Dhwo0oIdCOxD5UDyXk+Oc1XQZ+Hl9Jf7f7bNbtNZ892qPfbztzpkPODqvafzeIBBgVn8GtqKG5rEK/s/izWDZ1zIJvke6Dbuiq8BxzsQMZwGMVeFlxO8znzXIm9snMmM4lTt4adItLPuRnoTyDOxxZHu7Q4hF5kLvMrvDJi7dnlzpWH/Ac6nwJhE0/kppmSLnFA8ZHlqVEToFVEmUQRATvRzgjSM+4kzIr28RiOn3I983bbP3tPcyLHE3X/O7w+chwGSm8EKDmt5z/fa1WOMsI7SC7zPRRToig+i6rtL/zchgGlTVLTF7CnaCmmcCgNPpKcJ0wpojYR71FkkF8i0BkmeZGFuXCeL4M3YqRKrKiucctPrn1NEosiEL5RXOpmdy/BisHtL1QoDmGIiW3Zywu857AxsERzJ53TffU7NKMz37VAZj+q8CioKabfK7llskBKW/v4rikTbhxMJAjI27F//uUZO0A8m4YwcMhGlBZ48gQcWNMS+VhBsyUacloGOBBwo0hG/mB/ODQ3qj7ui3W6XIVbXsVGYrnTQt9mWW/KpmTqjvL5WQlX63e7oO8DNW1pgkOFKllrQzLIBRx+8H2hwDxXyv8UdkzwMEFFhGq4CvfHFiUdcdoepw5dV+/c+vNuWF2c4RWTk3YvnZmZ8558Onvn588QtYvx3at8OXoMMoJsq8hr4Fzr+wOvRO0E/3d2s6R9kBB5V2LAD9xgZBFX5cuRf6dmKYvt+AxTSuWUO8axQlnOqW6XzZkUlSvVHdCOejp9Jxzu1zP4H/VuSc/o3X+Rqt5aCCT4UpY3b33blnYHW5jvYwI3PJVAACBEOdfF9j3i3zO4Khy5karptmoISWZ3gck9Ft4apyncsKxEMyXFb/nJInrSeWd7w5XZK/OHRVvLVUeRN9X/295Dxl+jfEj5NLC/q5oUlBPyXMyU/oD12/tdr52qQq+c7LlxLK3UPMuA4cyajzptQKR1O6y//uUZOqAgtgrQANxGdJUybg1bCJuCujxBq0gaYlgmOBBsZWpnblH+mtsufyYCgkY83lH25KI4MxI/1/f/qecSznO+IV/ZB59ZP3Y5+ru/fMfJrL3+5JL7fcZQo6eJdDtb2ytWoNDhWc+cKA64hsDG7TvocPSr/cqs2sgSfjpgV50E3mCHi1caU4mt6i79gesUFL0G87QiV8AW3xEp+/d/v7EXEOg2dPGy6bh9QBAtWarJQX2lADJ7KS7HmsHKlLoc7vOqkVes0KW8WliLc64xtXdWkZbtq60f2Kh1yC117J0d0eLFjFR/Kf6JPtxRrJjjOAOoi46zFqm/S9v5hbd+UcA1QQABu5KlZDdxZq7psqtHeBFbhZtLC2tv3QgjpvSJxJ3cfbTtpmin7Tp2KcL+/mbwypZL3f9W8LSNCK3Moae450zdjP51dSs1MEiuvnQlaO3o5tynGtze/k6uY53mdmwqAEKPeUNSKVHfn6op2+nbPDGGA8+lpWycRnon3jW//uUZOiIgq8awUNLGTJTQ4g1bGVMSoB/Ag0UaUlYnCBRs5UJl9SFYLzBHxL/c5IWrVKGXN1eHbeO5lmbNCUxvEGdKJnySwtjRvIvcHbDjKmS/djmb7bX/IzCv5htK819lP03ZMyATW6FsYUqles4YajZBd7pZlH7MkoWOW5Z47WilZAnZ2xnJDZQ6GkPffQ8dWma7Kbw4TOiIug69AnFjqEyQRaZ4xZqFDqg2UMAJCp8odsQAQAGC2kdTuUnFe0U9OXNkocLuRkGtfGd/TK7p2yWKqzlsksaSV5mQFEOdlY6UemkVkJFa38iul8l4DWAAAW8pYnYaiu0ynqDg5aslDoSNxvKfQfE0cg3UbD68rk9e7D7vKdQ1E80vN2OnktMdzQp9vveySq3P+/YQdkv7f3Xlv3uMLiLnI2M3SmZOKK36wmGimlqM9Rp+5F0zG5iRJaN1iDmxmxpE854XrLnMNQU9WBEH8IuYehugiJVCDJaF0lWC+vRHRUz84Z+hxxl//uUZOyDAv1cQCtIGnJeiogoD2MGSdh1BKyUSYDqg6EUPTAIU26WftW9UW50pfQavbc5Fqmp/Js+531XR2Wou5DPotq3Mz7NrZljv5ffTWPd3wAFSQm7yPyynae7Aax/w03c4p517FwlDPf3cAQiJm+iQgWUmuxKZDTX0SlZkyuJVvus8E57mUUuAkIWsdHJOGDWIzyEjtllt/Q/mkN5iuGy2tBqYs9bA6e9Puf3RnEFzQ8JTkQMShB8zIjUS/tIJEr1jKuGMWAEEUiKzO5AZj6U5FC2NithqdXosO/T1P7P8d51ORUrob09fHmdESIaVsM4RvLIu7VAEU1lZbeMlpB+mEX9Ps1KiYDu+ES2oPb6Il0JCtekyBp2scHBCTgKQvUYlM4Z03ZiuF3N4tUigyCxfvRvwJpxTCmyMgjSaFXVWfE5bueJfQjhoFimClzY94UuGbQilCNu6E/hAy643BJBHzQAmsq1Ld5uMHBjIHYQlqyV9vkv3Ps7baRjyJHE//uUZPaPA9liPqtJMnBRCPgQbWUmTQmK/g0ga8jBg6HkHJQIXE6j6ppMXaa1rAbA4lIdNLPgU+KBaOecXkp1aaupZ9BKG61UCjbq3oAihAABjnSPscsa+e/X230ZLgllZVSgcPzpAjqoNTJpEji8tG8FFB061yNva5ZzoTwVMqFCPvU4UOk2ZmIm2syIiGuRob7tPBO0p/ARoaFd8zUEsKPmgIa1lNGhPnYPR1AFeFm9Mk+24AABnnhFjw0Gz2OwTB3FK91NzUL8SkJhqf1nm3XXhiLkIRwcy3I8JmUlZ9GTsjkyJq9Ka1uZ2qaW7Hz2dmfdkl1ih7Tva8q/asbQfSUgPP+Be3V4xxh0yucpminlFLbVDXtq9DFg6AjTDs7JDSQZWMzyCjlIDZtk5Sk1NChRI1ydFLJC52mdm9q6P1R1dRTkcMjIohEpy3hO+pnuZPbtrzu4/CM6YgdtXDUX9x+lGNy8v5nltABNG0szOyZdA0AkqpMxaVTZ9aPPtR+H//uUZPIAA11dwUsoGmJGoqhpZOMoDMFdAK0kaQlcoyBVpAk5opEcpKq5dUjbL6vWg6yyCj90jKrgMkS4KZUQuOkQ48gtbmZJa1Dn3EjyxSIYUQuhoccpK0Qx57O+s9kNwUAcfatc1bmNQ2vxMmYqQiOG6CPBn+yk7C9scTIT5wkS1yPpm0PCA7S1FF87w8AcUutY6sLNZKjdP4OBLJTa3f2ljqsfv5qEDCL749bllh3Iak2CAAP1ecI44R5smDh74kZZqGZ4HSbONLxuHj3whnpR7Q5fqP8QjqqWS5uxHGKmTeDyz3JY680yIvy9VyxIpy3XLS0DnB0+GhacMkHIotBU5In4BaAE0JeiBICANfjWbGakUusohOzjw9Di96Ce9bZxmZkfDaso0gBcG6PRsK65uU4Y//ilyt4Idr9CnKG5WpPlYDn3OfAv9lvfU/KYftr46xaUVtjMxBZLBIs3EAgEQGudxpgWqRZQkMeHFfKuYK+SKR40ji1WxC2Wm/6h//uUZOgOAudOQAMvGTJHh1hpUCKeC9kNACygaYlenSBVpIywabBA/SgtgTWIIbLLAtyhWI1FQnTIxSiKj0vWuMFSTrEBNMuMvGgvYfMFzrEUtKhr2oABgAAVb5ViA4e5cAcfEF2tL1NiVmYytg1afwb4gJoXUINq/An+O+z+/kK2Sot93ZfqXVu+/WnXydQqlKl5JQI8Xeoayfg+wYvCm9n3zOTbX0PAGWV5VAI/SQW9gxNsqDHQpAlDmJbAo2mgtNtZLvRJHZMy6dGbcvKwpT/5veCu1XrfFiLIkhp8iJQ0QvL2AAzJzKWiZyFta9te4RLWlR++JHxd4Vas/SArBaq1ypTHOEj5nEoexyglq3zvjl2RvvpErNvMi88QhfzppGtAiVl5ubgqqOXSFKwTyqQUMK2I14yCEvSpQuAzU0NVWQ2hqeRlmeYJXMPx0FrdIVBX61mEsL8F9NO2d6/JT/c+8cqA87jE5o0jlzbwaRNOJCLxmrSTSOTN2B39sHb3//uUROiAQqckwTMHElJRA/g2YMMiCkx/BSwgRYlkEyAFhJiYmzy81ygvN5rVrsxfvdYrfNFvL6sP+7SvfBUtXT7fH53vLLHr6MrRVyzT7AsRbt3e7JX7o+L57vDVWutWz+v9cK1pmIBzSiIzf0oB79xRHtlSXdQEK8+lCMLL6XKJNnHCIJCgyDAqEZFx5N4FQPSl4HadalbI6crIoZ0UM0eS7UAFPH9p6sAEIFRWtFSUPzLwqrmA8kaYqTcpUoDqt0O42hIe2SNc5LHMUKOUfFTabo2lFjHl0KWiwv9SNkPxdttTfKUC1kw1CmGLCJEAbB1Sn6JKZV9G8PUXJmXJBTSVWzcqiSziWvMsSutkiRyu5JI0iAQCixKe1ORRw6YzNV2/+7MFXYMK+KFEwGiobEoK6eCx6DRUGisse4NeOeJQ0rgriKd8GagHxykUQEEbDuIjTmDoJfezFtddueWRNOQEgyN2EysqwQSoe62LK114zdOjh9cTw4pcLWg2Gfuf//uURO2OAxk8PwMJG2JbZEgBYYYmSLhdACgkRcEHDOFkF5QIRXtOrm4JkZesTn/WaZW5gToUtZgbfBq2Ri9mgKkDBSIN/d0g+tyW8rr+KBCQMCgwkCAxAOQQ2Wf9pNONKLMPMPLZyiyjzD6qqoldNNMr//+VVVVU0000A1VQZTTb///////ppppqqqqr/////////+000VVVVU0000VKOkBOgc8T7WkcDXDCjGt70ZDMGc916p6yfbFYdohnHWlQqUEtSz2UlLMjoEaap2P2ZEhZhJOaPt6qekjWraK/6q28duKb9LHCoiv39YspT+18qvcZDm8fk+j92s9/PxoAISlJ3Z6lIaPDhk1bLRk2PmG2J5rnmzCOF1GWZubkotDg4PmG81l4wwsQdPZ0+7////s7toUww44zs7OMOOIBzSNYITRl0yYNaDLAoQCABJTTkqVCcs+nOB41tFBetKN23ExxgVAT1irrbEveP2rEFRAXTrUhSPWBkNe7onxYLoXa//uURPiM4u4vPAHmHFBhZifxYSguSghIfEMYwAl8nB9BJiD5hahi9Q1sy5w+LFUOIkscGA+Qc6DiKQuD548XZO3KI1Ggt1jggxiAtILg84I8FrJlIpmFpEOekhwRDfcptzAgtO0HP0zh+iJuf8CJXcRQ/Cf//qSRJdG0jeknST5yZwPn/83tf8f4DxHSzv+cz+vwdx3dAQiAALPqvb9eAYrwr6Vd7wSFd2QJ6iBtC2Nc5Elpu4WqCSJ9TWlRLwLKcZcia+jNREMm03KRmaO7W9aCwe79q2PHkMlQWlLIiI5lkSHfjR1blM45lHcVZW1Nm5bDaKWTqeCBUK/wVpQAJPcXEeYBMxuRizWCuSdX2TZlygprNQ/s9J56f/kPlsj9fVlSa81x1VOnm6E+jFDyLFOUqCTxsIi5QFD5S/bTUyiJdXBkwo1jBXQIfWu+eaul5DpGe7mZ7JFRqZOimOe+UCUEfaBAAA11SBhUSoSEKtXiopM2qhNhQFF0oVRBSYK4//uURO8IAlc7rbDJE2BEAphdNGU0DKi48geYcUmbrV/k8w2hFDQp/wsnxSQ38RWR3gvwsm3fwK+/hRwLl8LFgKNOFBQTC64K4+K7/6C//xXf/+FcChvnDcn82A6vW4AX234c/toLCLenJkGo2N+wPHfKa8WMjqYYm/G31iBb3HTaRHVzcnQcoD3+YcZMjo04/r/QmQ62J8TbzfMhypw8TP3/sdz5RMnv33bm7NMU/oFYQVgoIGCBhAYOBQQMEDCAwcUEDBAwgOxZZUtlllQODBBQwMEDCBwcUMDBAwgexWoIGEeyywGED2KwMEDCF6StNN+VVX/6af/lVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRAAALR6cKwIZO6L1jMNPL5p7pmVcFaa8UGLl50b//uURO+EQzRcv7HmG2JTIXe2DSIaSpSY/CC9AUkollAIMY0xP2qg737anoanYe9+J277bOUwmveR/usyQzbnvecO2XXOpCBEVSQp2sRsS4MzHLGK4ydegk77QqtyapK5QZDzl7Knv1a0aJp26+aXyMa8aikf4EslONh/TB0pAYb0y/k1iueqTqBoNcx1qlXS66hB0P+rUnEDCNVZiDM6ZHJfKM3IUm7vLEq0573E8Y10lsXkILeD91zTVQYHUmxW1aOF0lVKKKSfMNfGcYma6ZUYnhWypD24LRz4o9VMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQAgAAAVr2VinDlX+ZQXl958WlXfQqauhkcuHYqbBV8oUX+sjM9jx+GWr9bTxK6Q0vqWcGl3//uURLyG8ptHv7GnG3IAAA0gAAABED1+9swwzQgAADSAAAAEJGMXjF2QzDFFORihopIwY3tJTzNnOB/FfkN7As8Ei2x4W1o5aQPlTQsh/RpfhxA3NDiYN3a4UJ0bkhCIklJNw9Lx4KljdyVPMbHgusatH3BKOBBONm5oj1n052Iv8w/9TWgh6WwheKM6tvccylH19oPQVhKNqU3Rwx9M5ekOQujnngWz4Xs5tvCD6iaeybYAfz7K2tRbd1obtmmXzIDHZsfPg3ezmYXOn1CRDDZHTuAyLw6QzO0ltDBMQU1FMy4xMDCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqgCBAQIKoVVzAG+7bW0KCfIVnGBi5JN1xWRhjoRQx8SJKNQy71TO5FaQ4xvNXMOoaykcr//uURMiA83BWPssJG3IAAA0gAAABD/2A/Uikz8AAADSAAAAEm/19vshU3jZ5euKPyvrMohdTUwxiIDZ82Op5z4F3IzPMsG9WVbPWVO55wDzyfxeapGdyjCPQdTw0vgFOvW9MqlUoia0nxw4hD2W2ioE4wXKnjUswvKC0uWnJmMa6gMMCjfPI6ikNCnyTi0QUQLJXkvzAsJsaW2USnQXwsrZ5hibYlSUkrR+YdZ16duHW2vukW2LxGTY0jSBNCjkrgvUb12NnDeReLR/OeTkjTFsbG3KNSWhXnSr7JVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uURMeA8upVQeFlGvoAAA0gAAABEcWK8Cww0oAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUAAHNCQsXMCYhYJiyMlFR1hJ0SIomNBi0EjbInWidaJIpZEqwWB0kBSLvCpJ6iQUArAESCQFIjCYSApEFiJ2kX/27AERCQFIjUiwFFaWmmPTH+siEg9CoZGIVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uURH6P8swUuJDJMFAAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUBgABAAAgD/RrBgAIZtqjFHDUPGX+HAAieJjXwIkY+4K2f6a7XDEYgaYwQYCO04Gih8Bg0X+8BofgZ5LYGHwp+BigGAYxCYAgs/8DGgODJgMDAQMKAYTB/934GDQKJOBkUYgKBoAIOAFA///E3BdQDY+NNQbeNb//xSgGAgEFjg54XABqwZAQQ///yISsISDIBYYI0IOLgIp////mg4CmbmxFG//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpBQAACAAADSCgAAEYoE4cJxv//////////zchhEKBQEBAEBAIAwCAQAAADuTUvIyMVeJMvgCcTO2Rcs0IQNTMY7AEjQZATkxT4VnMA4BGjAowDIwU0IfAoCGYJsAnBcDHAoAkGACSctUDG6pAz8oAQAcDCAXKZFQAQMBhIKgZdCQBwVLIfCWncAoqgYeIQGOxsKoXCPkyUsEBJAxWKgMDAkAYjgHDsZEqybIDSSWoCAWAeFgMKAQDFYQABBYyxoOUM8PROmKlVYesQ8fA3BlBlC8XS6yJDkV2+IzHcJ5DpHLhAUSitjI6a6/65ElEaXhyScWi5itS1//5mianzJZ48bHUk0P+j//6SR3/MAzACUVDVmy48xkA0G/1TiwAUZd0LKGG4g1v+CgBBd5gA4DMYEcAmZJmgGmSKAsKOm6gMYAwDFITACAftCxcDCYRAOB/38pAYPAoi4nQPj//DLYyYW8EXIoQP////uUZP+ABaSBQKZ+oAAAAA0gwAAAHamBG7n6gAJ7QFzDP1AAFzjjHWLjK5IkX//9QWjiCY4yCEAHALj///yfUbEAIgUBlBwDvM////8nyfTppoETKBEBZY55P///////////kENFAADUtMBbmYyZ2NzfgEWPjBHIzhh4jNLKGML0UgxEQtTCPBFBgMxg0AKAgA4rASZc4rX12QUrwEg5VIjIjE7f3PbczDmY2YYNBazfiwAjoYFIGOPjfnLf77hvlyGHTUxAQeDBoFGiOZhhQBkAs+5T5zlvn8/9///+8rztupE4vADiXZdOZ7//7////3+Z6sbugRrPTShtibbg84mTmTASnzZl827JNssrBACAEo4cPS4dBnkaXCIZDVEaRAMZik0YSAmYtBqYSgyFwCYKzJFZtWsNfcpqL+NdW02Y49A30dEuC94kB95VRSOQWs+8z1lq1rD6WNvA6ltpDqSs2A+swyJA+CCnKZt7VdiNzNKLj7i+rGo/aPe1VKIx//uUZI0MRUAyRp97YAByY1i37uAAFHjbHG9g9QF8k+NB7CE5gAIAEpmfwSG2ZaWYj49J1Px/mH0JycnAHJjVEyiwlhgbA1mEcB6IwO1kAYChrLT1p3nkeZsJdRFYwPgmQEE2PAWmAaB0YcYbRQCYhku9ci9TGMQQMAwe83zJIE3TescUPFLpvpOzylJqyiTVGUIDmnQzXltN3f//6/69t9IBe+HIej0HMLiTiALGxBP///uhpYHA2ETX/rUlLM+mzi2lVrbHGwsVVBDGzCCMO4KgxkCxTCaAUMewKQxBgVTBRAUJAHwSBeX0RmXO90qijyQI1iKPCh8A6A5DJFDDWxXDuYVIU/Dpu0zRhj1vcziA5FFKe3HACrhMUe////104yi93FFPRVUAAG0gJpuMAGGxCbME4CcZs5AGDCecVUZuHnKqZkRbg2dwc8aX5nPhoCYTCxIaDE8pfc381IuZurzmn+YWXpMJRjSCUxkQQoMdGDDx066oMvHTIAEvM0Ol//uUZCwIBPA6UOuZ2SxQpRpdYexPjgUlVayabpjuGiu085o/tzWesabWest95nreufnhKYMZcKAZgwcZqUiwOv1vjAhUxsqMYCUECBzgz348///f/////+//91aCRKYoAWVQtrLMEAbFMgAAXECkq4gAOWbIxAIMgKGiP8rA/9OShZKpKTpNEOMTe/JX5k1r+A5F1H8odsrAGrZGavmm/M98ss2ifpubb+mdrAZgcce4rCCTm3bf/wawy4ioxHcKBGuZWRKUfI5CiKsA0MYPQMXWmk6xEQZhgOETBd1a5AycZPHHenZSw6wCrh6TUgHaME7VFxDWZl8YQoMky4ymT2/SS6y6z//pl8csUGLeQAnC4QMQnBv4NgsPXHPJ83TSf/////WmXEHfAAwAALY22KHAApkai1lmQbGuN5f8gBbCSJKG3+bEeIooSvozmg9Zrhh2/+MiWTM6pb////6nrjPZ4DAaY9UAABOtolpmMFRUuVKSNhuAP9ToOElvplDh//uUZAyIA51MVmshVww9ZnstPMpnzbUNX0xB9bD0ISspACfOJE6hwgaZSpZKmBEB0NCGGojKpfLZ6ap7NNdwp6XX93S/j+5Sodn/5bxZgHRMpjNWdrVcL+NUhhEaYTuL9f5zw8ASHxxxpCFyFELR3/oe5qWdf//1NKkpucPhsAAG3XE5YIAOyQIsOBpytoJJSMvJrJhAHNo+eWc1vXOe8w/mhKPe9RIAiGJrGurOymOqaf///iGOepo9GQ2aigWBA03QaVBUbswo1hdIFjAw0mC+9pTRrzD9YtfXpbzlFmfr26tjWCkKJ5ulZBC7fMklLNyGEEW+oc0Mtg3oAeDkkuVE6CBggh///+3/8CC0EHDuAECGpeJDhLYcBLQM6FIyPQEwf///7TmscAAKSJQAgBFxWg+hNTYPqIzB8RQi4uc7MmM1GBupdeozTdborR70//zI/Uxmb2+tP/8rUB0E2s2vhG0KItoEgOGpOAw87MdVjvi0xcNOlQjBycJfzF28//uUZAyMg3FBUhtmbLQ85Do6ZYJmDmT1Om7tScD1GimllKmee1DMBiHnTNVFkL4zdKABUMuppIv6e0SBDW8VhyLKsjZ7bFCZ7zzSTKdEQo2pekYhJSik/+iy1stFkWRRpa0TaldFqnpe1fWYmv6iSNvwVBp///rdyQAAGlECZgDCbDyoWD1FjG2SQ4ke5CQPDEwtdy1mydu5LRu8eixqmOd3FeopruJe62N8N4J/0Dfr/8n/kesAAXwAAF0YWm8ZnnObUqIZLG2cPFQYLISbmj4YSkEaVASeaQlYcYMPnRNg0fumtAKuCD7UmrMPLtM3btBrvONFYGij9xSnmqGUyqMxait0lOYaahpzOPRx7gDSOvuGR7f/W9a7qyzR8zsxxATmL0/8hJfIgsAXQOAkehARTtVAUxDCLNIA0mkrpbHVnbj1dfKQ6nUXvZiy1b/yjftVf80Au7mTfNt/uj9DXa3JW/qfw3UAp2wAwZ+Mxih8oPI7zR4g6SXClmd6xGB///uUZAyMk1UzUJtvHGRBpnqnYKtvjjDNNG7pTUDykSrlhB3uRrxGakUq5JBIyAzL5PvYAwWLA0In1OThjjKxSun8jg/tEhz3gazjV8ViTbxnea13+J0zVvjWpZS6LF8Ztf/Ne6UnhPCeGlcLVyJww3RXkA1qcAIJOWMCmpVjK4biNAKqZQMlaGunWbNOGUYaxDv/7OzvPV40VXuUqYFH/RRDgnSll1cSp0+nV9f/FZjU3W1Rqf/lwAJuwDBtCAqcphe7RvzfxpcGR8iPJizDZo6vhh3YxiSGJmqbAKG0BA0aOgQRDMuFBGZjeRBWwv8mALLJ5rcWUWkUw0x3KeVxKSWdQ5SZ162uKK10SoqEi0EstflB6FcOH1a3ezJu7a6SQrZJhCDwW/++6775HFU4W2BXpAFTxUHKH25HFjvxLYpVEapsLMj1nnsQlPB4+DN9FZKn9G5T+UCA4+zYs00EEjmzLImAygAAA1G3G3GBDxgjoVXmgnmTKgE8SORUcSDi//uURA0Igskz1GtMPLxZpFn3c2geikiLT00lcHlWEOhZzJkmYOICvIigAhDxepSuC/1WaKPFNnI4qr4hIVWSapftAs1ms1B1AerO2FQcY6CKe79BUAGLa////nC5u6C5/871gMBKdgACAWZOXZmeCmpJGcjLmnWhBemQswW7hNKMST8hEDmhED9Pu3cvIRBFqEvBO5wWE4OmDjELLJdjDMhxvbPcz6IP7gm+q9iQCCccNxMsHjpsLyKxIdxQe2m5WAEtw4wDEBndBnhAapEDcABmSixoRGqJ4C7ryVfT0XLUnSICnKvWM00XkUxgJEdlwyojoP5+Xz58hNzkDs/7icASszUr6OWGxb/fiA/7JiCpyBCBTHQaMjEoy28jPREOFC8wEdTAgsLSAaVFjaBBgQ3I2cROaSOXLMQ9DzZ/uCiTB0o5IlSIU1p00lzdd5/KS/NHHfP++oBXyp2bQ2gu6dEP+jlaABliAMEcP0whC9jJDIcMW5VE3xEc7Xf8wrqc//uUZA2Mg3Yiy5vdYPBAxfqaYYdNjjC/LG9wqYD9kimdga4e4ADwz+sk2VGAydSUHFKYOgEblgEAgMAwAonGAYlBgdLHayqIaBpxU3jIIBWOgdOkwlFeTZYuuvjb/XG2py2TkV+85itMznuLmeN48ceWvWoQM/+gAAGik3WAGitlKhVgVBRKjGU+EjE8Q/pCSN+peN2vUljVvLsq7eGtv4qahplsq+2eWRWG7/oBIxdv3W31Xd5R+XAAeYAMCIScxWQKjISRZMJpe4wyBsjR3G4MEUrkzDhFzF0PnMD4Kw6sojBYEBCPNtQIyQBUuWcmKTWGCZQR01cpwrNeddqr3qaa4EhdCs+j8RSBhYQCY5mIFB9zq5zB/YJiv5zh8y12u7qImqy95cQdkBlJSAANhWUFpF9i2wCCqqTsIcRVVl2YdSL9sxOex1EoQ1x1OsFle1bTOzh50X2Yy6oWj/2bA4dY1JwRBQIejZUAIKTiAAUETG08ziANR5zIn82QyMIQ//uURAsNwrkv0Tt4QjxUBPoHc2geyeSTRE3lCLlkkSaN3iB4ToBsxRBDGQ/ueVLQ/Hc67fFEuZX0ho4tR0ieIIqycaPHsRF2PBwXearcNrTQJp/yxUApEyqzfCcz7NHv/cQLH80AQhOYAAGBUwumzRSsM+wkwq1P6UDFlU1ovM+rQFSBBU3peQzYNHhCitsRkEM2p2BbFWxNvC5rqt3ER/Ba3HGUVWNEGOL+hAA462v668e6ZxOxwKyF7cgQdm8kZxHAaS0GuFoKBTvDEOLQ6FNY2ZZUTxpRTs8kYBEWQ5xyiwNpgo6VVoXZuVrKFThm6Dg+VSkWvjQgHJVWGdC8WhyYnQ0mQ2/nQjL6AAMDZj8WZv6QRtFKhpX1HSJyYsMpxBkmaiuLkExwI2kmAQQajBKLK/IUMgCA36lkkemKUkgzYjEY1RgsyHMBM02rZYu9cQDNhwknr+DgAaDqbQ6p7fKKBKlgAFRYDEgZqXJynEmyhmbXDpVIR1wqkPwDtTS8//uURA8N0rojTxuaQdZfBDlje4Y8CjyLPG4ZMVlJESXJ3aUgtCoEzSJJuALQXDKcxWrCpfSyTB1xMQcSotZpZpQ9UaaNHNPx9Nl3/7kAuEA1AsqixG1mv/bukf/vAAHQAASDMYKRJxiSHbmXifeY5gvZonhHmDaDKZDQlpjz1HhCaZFaA8IDAZfMItIRgVbVHCgwBMdkDlCwLqwRMN5G72ki9Ah6KJnIo1uQ9N817QzWB1///kTQK1upH1qBTg4LDE6sMQTw51ZjfIjMrlYURBywamG10IwSIia3UvoY6D6fUkiCh7Fr8XPsinYqPCTtObprPG5RdwvGnnhnqQQPG/7ywRK3vVInIlKaSf/5BeYECMZqvUbReEdQYgcoiWYiukYBAIbWEqY2ygYJiaWHUBAJiQUfUQkw0q5HRMtr8Ny+CVYoJfERnVJPRLHBqNYxCMfkf/932qeqKR03//+XUfUEgAMBgJgxQT2zMVUDNvNjE2KgeDamCtMMwzg0VgxT//uUZA+Mkz8jSZPcWmY6RDq9YSY5jQiLJm9taYDHkOt09hz+HtQEMsUF80BsA5xmGx0flU5pEHBYBKBFU2mEAEuiFKUlYQTlYTB0NTMspnKiUutxW9atHGboNyJSLJcmgr2o93/qSBovX8bPLgAAFRxzWUACgehUqgbYh4yfytLLAONWDbDNgqmSjqB7eRKSVNPZKkH8/PlkiWctpZb+AZv//LJN//UAREAAYCYBJihJgmfYa+bwSXBrVgRmTWXWAD4jLqBcMg0QYzQQET99UxMwMnnzPegHP4VAiUHGkwHCqqpEAsILwrVUOS+bm16non2h6GZ21fNl6JPLd9psc9sFXGw0pv/DxiZ7xdpr/WXJLLrhuFOIIOUdBAFhiqueHVQt5gWGT5766/QO49ilrYXTTZf5UurI6oxlSL/VAWO6VQREAABoD8xeCIDKLUWNZMhU8Chw+fOoxhrAzkIg0PhE2VB4zECAxPAUwwA40wG8DBAydJEqCEsOgCZm1hQe//uUZB8Nkv4iSxvdYPo4pEp6YYg5ivCJNE7oyXjcjafdpI2UBHGBUECyToSkvUn0LHLvat8/Xf+s/0d7cdLqZNbWmU32yAACpuSAACXsJC7yy4JICmkDpWDjwtVXJ5pXEI/WnRYocsTasWOYkZLTCVFyMlpad7hORb/9oBelAtmBIEGBrpGd9fn2w3GncemsxnGDzAGLowGGrZmCoVHZHGLBCpA+7tmkmgQeBiwZprXoZc69TxiLz9i+QPgsy3pMimivN6W/Yc9HywXjfNs0cEAIgDWbghckqiYUCi2g1h42gE8YEK3CKeypqYOBSOnUAXAQlhc+9zQ69w6I6AYh0uh7DUjRBRHPxEl0Ai8AAEilGAAAoHTKIbOBJA/GFAb5HLF4WxjmxAwChDoAxAxTyWWBQpfs5LyQJaZXljiJMFwinLUOa1HK6XXi1x/yIs6sI8Jv0YCRrCrawEDeAACAJmEdg9AHpRoZyhxro3mEMRjowYVKh0oWRc9LcxEMeMQB//uURDmJkmIiz1ObQOxK5Gnmc2kniJyHQ05pIzEgESelzSyvgAKp8kLrMLyYhesXKE6r2l9y9bq9y9ZH08pmF/J3K1HumxzEAMnLCoBxRDmeTAc6JZztpwyoByAf0YxKRgACOdaTExiEoEYMCVKLRjJqQy9dWwhG32xdZkqdLZfgLKTqED2Kl6StGymQJJrxEAQY3TW8sPCH8ZXZvcSmLlGzJGWVk+EAhIGewa6qep3EeKNSCqfMmZBkdMzYc07OUc1U1pftW6n2KEebSOOvj2UChYTyAADAWgAMC8C4xJAnzFnS7NPktI6VfQ2bSYwvTg5VD4zERw1wBEwDKlBkQhIY6iu6SsEACMFi86T4GDdcanE3Zze63MrbxPp19MzrnUc27pbQaf5LepTJn6AC49lbuNEAAF9OS2gACAW2LIEVkS2ZsaK23tPThQvBI45gm8NpWyluYrrnn2pC6zS7gVVXUVKuh/rChZlBITxgIhHGAOucaBi7huYMomuobOad//uUZFWJEvUjS8vdYO42xFqNYGWFi8yJJu9tCUjhESj1l5T2gWRgtCNAKE4xEDpDEABjMCuAEZGLmp9NsCi8wYALmKTKCJt5fFXOjEMRCDJXT04uLnnH3buXMy483/8Q+4gHLSI+WAdZQQnXrAAACdjjctszNkYHumQYThOMU1JJHpxzkOFLNh+G8E+0xiUk+M43IixPvKqqmudR93zP639/2C1pAAACbid1AAEFGIghEpHCyQO5gYFsZGr8YMhoHLdwidSwo4OlqT7EGgN46sUpboDB4dO7fPia6aI/PIAkVS1lgUdOzE5qoJVmOJTI9/rAAAFtt11AAEwYkYa1wcfcdlYOmXwFkYwqTPa3exIgk7GmSssWY4khiK/4jHS6ctfdevhZG/Kz4nFItJIJlBoyblwyo7EItZvNHVM6U1HLrsLoJkiiahAnIKEzIVFh3NBoiPKety5lcid14WkhEG7cOq2gUZMqzRFpP3TSI55xchBQlVTc7rA0jyrNPrFU//uURG2Jkmoh0mtmTL5LpEpdaYeVyQyJTa3pI3kgESh1zLCntfBknyZ3A3JJbGYmB1OZGg5oJ3j1QA0aLRg8cL0E8asFdoxe/TWYy0Yn3qDWhzDA0tUrYY2ucjtGmFC7d6IyZd2rmpv2eZNZma5iaz3alQAAbbtoAAkRhQSYC5Gr1RoqKQAwzOJ1iMkmia/AnWbX0OAcSpNNErKyJVq0NCqZCYWZk1OMJaKSYUslmlWRg11pxhLY5cVHgoVGSogAAQ7LLdQAA+Jhw2YVIGn1BsZ2YgOIeiQ2XnIi5ndJNoDp+E0rMhmIA7GYQxJjo/OpParnoSzhryYZHMUHyfK7WqHLBwGora8uC891gucwfDQxmXI17UM2Y083NnjdQnAMTNwjcwq8SIxmNBLXLWhw8hSKLPkfkum6uo70ljEuBSlJGwlLXMxstuM7y15T4u2Zr/KysTEhuMIQ8MrH6OkypNsunPycw/IjzCBdNDjEw3FzMoAMRBtW4KAEzEDPuzrW//uURIaJEl4h0tN5ST5MZDpNbYh5iUxtNG7ww8klkSYJ3hh23moZBRplG96lGnxKbVWZT5Yq4p25hWbyUP/nY8baFgFeAACABDJE5DcYzzSvWCDAmgSeAZGZzDJgFymSgQasQk4kEIjV3I+sSIA3JaU2F9H/jkflFPnhXsBgYPVVVVWWW8aicqqlpS6a2HJAAAAAHDDlGYMqYskxJUFDru7PYsswygzM4vANZMnAgAh5mo6EgoNy+TcaJnr8wFG5BPzVCIAobiRS5YEFQHrKRcpXhIaBS4CkQU4CAzMW1PMIX+MOtTM610MrQ8KqXspCo5g5BDG7StYUNJqoJqsXZK0hhrTharTHpsopWNy9u/rRPiUh4YWRiekaLo6qYPxfqb8wSDcyBTEycpAxbq8QJ8aAkQYW2hguKQ4l4Dgqx15xJ2U2gmYoJqIxIDOSIkjX+jRytflHlH+jTjdfc2L1oLqlf/9tBhrPsboG3gAAwGwPTFCNLM29E8yVmujKoNrM//uURJ6N0lUPzRu8yKJKo7lze4MfCRBPNG7liNklEWaJ3ZivmIKwxl0TXAmBKIOUCcw4diIAGCAGZMAxhgFIJUmkJiE1CpAxY8ojbKG7xqXV6yludmtK83LaQMg/syQ8sgFsanFP5ZmQACrnLqAAM26CQQqwSYRHKpVuKaGkJpBxqBYV6IlneAItAivnph2EPkBhC6whQnnFHEqYQUxp0nwPLcAm4VA8MQotYykAXTNtabM40uAwyhIzBGF7MTwFQCjJGFcCqdtKJVAUOMcvNAOUVDg4wAQTFAFHtZy/HjgJyILnbdIo6B2RK6ZpmHBE6UyNXwroXIgMCJu988AAW1bmtCsoL8FMm9KVRUWRMMoQFuNgePBIMy0Mh8PU9ztn/yoNTKqD/H+eWi/l8IML1GWzWpB6T3T9kgfAAwEgcjELRAMc1Xg0inGjSmFBMm0AkwJRcTHyCIMEEgAwXQEzfMhkmNEj3mDHCIsYcGWTQzDgafSYCkHraXEngkcxLHAw//uUZLkNEtYaSxvcMXI6xEp6YeM5y0iJLG9oaUjsEKlphhjnwQS6O+hU99Nz0cJXNhFfvic/ugAAlKcgAAuCokCxwQ8N6AnVFExti1DSwlmqvyWSjUTsSt5xcGrtfzOISI4fmZ04m5kkRQ5p06LiIPowzwALpg4ACGRaf6YpkEJsdw9myuP2YPY2hgfCzmV0GQYL45RjGgVHd2GoJGqLn+yCAMYMQgeQGwEAFghMYEhC7JU8anbxvxINDwcHJrXqZM96bFa/b5n2GYrL7sVrpu28YyDoGHIXGrez0fJV4nUEwplIeC4tUwKFKhyhL+xg3ccRDr08mDubIIEAnkSJ9QhmTl28y9UBgAMCyBQTCYDC0yJQkgM3sQjj0ub8N6AS8wfhLTYyEoMJEFMDPXn8UZpp+ZmnHZSJqacZ2nGHqAoqDJSYWCkQmWWAoMOhBVBCwAKKNbhbrOtFtSGDoFg+Rz9erS2b1inu3RepYXNvpPr1gAjOU5AABBQICG9gGysA//uUZNGNktAiSpPaGlY8hCoaayMdy1h3Jm9oyUDfkOlphgzvFwEcn7FyiJT4LVMwR/KpELg3FC4pV00TUFAw1UMzRmVRxxUZil28zmIELLenama01pLX9cPrEYbITxr7M8Hv/HEfmezp0sxHmeiYKYK4rxsQAxAxBEyZwgDMNaMHDQxiLD3YINHjwxWSAaJASHCTgXcexAPxnMndNNbZm1pkzbOU4T7Q9J79uejUSlVq1ay33WtZdyw/nN301H8AAJtJyPQQigZtNjTNFHM0KHABGEWjKEjpU8HhaLwi4ZHyo6NT05Lpiqjs0199dFAQaH+TMzMzQS0YWbMGhIVNg0WcLQdAAwE0GYMGbMTDFNkB80hYoQMVMLIjFxwWQwFMLiMV6AsTA6BTswKYD6GLs0s7NikzorI0UiMrHjBikwQzARGYYEiw6WaAQE3EvazVsDBYFjTtS6OxmpGgk4BHmo5RK0qecZrOqyCPOjeoE7wAAWRAxfN1Tg2NLDdruNcF//uUZOqNE1EYRpP+2KBE5En6aeY7zKh3Gi9zCJkOEefppg1vcwkmgjunB4CYOzVTUEC5S6UlWFgl63tmnetwzZBARbSqUNgJlUoezaltqxqJVOjJQY7+uGg8YNoDqmNvhOJmrCFga+ePimHAHZZizQZgYL4IBGKCApJgzwlSYZgBNGgKsZpIxgUdHYGeIyAAi2YuDIyAQUJDCYCBALQcLpFuWGJ1NFe93aQNFTAqKmBKWeyo1eIpvjWxqs8aNx+389rq3pEYpxqdhZiecEdXOfYqcseOxg0azlqIwCdZTlMol9oZzE0QYeROTIvjbLaiyiVzWyyzk5q5qgmVHF4UQk35JpuVGAwBhDzFKmBN3lKU/0DyDdBfyMgQWEwekRDLCEbMP4BkycgQTtW0x8zMHNDkVUUHhGIggIjxVAS8CC6aica3WbOq70qu3C0FqHBJE4uLx82vTtf1WDHe5tsqDAAGAMAv5ggRuWZieD3GoJAsxigpioYqYH5mUFHG9yZm//uUZOyNk1ceRpP7MmJGw6ljcwM6TXyHGE/xKUEBDmcpp5lPlhGnqQfmMoMkIPmDYqGwY0mC4EIAy/CcSQSIqVzTWXMpeIDxgo25pWpsNtsvjKMrpDNi8RcWg/QOGCmDUZwAfhmCOFn8eHCctipZkjhcmCmjYYoAjZg9FDGNUBufzseEAYZCOqjRBCoDQeCxhYBNNlTHWDs4gsNBEwmiQrRmwjnWN2GLkSOogxN99BIYICB5GN9CPZh8SpSbByHiGXKFwplEoQKYKmG4GDuAspgXQiEYZgBUmQPg8dGBz5jv8mmkOn9DKtKl60IJRKeR3woVMm0F/0/yYXUT3J1U7/yKl3+dyugHAAMAbBHjACS3gwVszyNDGDiTMMQlIwgcFuMApE6jBSQMswGUPAMBBAaT6RgBLZao4AvM4BGjoZgoDHgtylcSFd8QfSGYH+N1hjsrG4RaadBnwPDbSAAYCeC0GCwIZRh8yrIaXgOEmbUi6RhbojYYAqFUGAOASJgN//uUROuN0s8bxwvbMlZZAviyf6ksSmBRHE9pKQlgjuJJ/aUgYo8IgJ00qFDDYBMNBw8QbzDwAQBxlVF7ohBztvfMWRaR6yGH00/5eFZ766mwm5HqCwwHwCQDCt8wqcxNNP9IbDP4gyQBE8BgEYv4YeyBmmClh9BhRoDyet5hIEIRQ6cZBRwvBd4IKRIETVdx813vDL3ilk/G6RA4Iupw+PSvRY1PLf1z9zlLtxGhhgPwHsZDuNhGX0nspsRp68a2MLBmcrAaZgogh8YPiBLmDnjNBh5YFyaKPZEjzCqMPgvMwmEFqwe3inojGn3hGMSFID0UDMy6feyONH5j2uPy5G+fX/zf+hvv1+vfWhoAAwOAHHMH9N/zK6hCs0iAvPM4FHGTBUwc0wBUT2MVjAGzY02DykBjJsnjEcEBAHJgKPRdlMphwUA5dLTn6aE39WAQNFXURVLaJfdDVuN0HhRYDP2I0ygABgswUGYkKoimkcIKJpryLmabSAyGJqis5UDk//uUROqN0qUXxpP7GlBUYviif4ZICzh5Fk/syUF3i6HF/hkgDCxQBIweUHWARFUaueGRjhjcOeT/DgKm5EywBVpdWrNBs7jWKyDBJAQ/GilT8xW/Sxv//XQQwTkC3MjIFUzQSVOY2bVYQP9b6w1GQNDGTV6OUcIYyGUiTOnBOMJgnEBCHBg4f8FzqZzaAkmVfKp552hQVBUSlUVh2K0szM8ws5d7W0YA9oTBU/Z0aeGByg4pkiBMSZxO9GGsfr0hprxNsZZ+GSGQSVkZzoexkOotmhODQYRQhJWC6DghTIOAXKwSkImosqYvMYvhT457KylVCKnTg+eEY+K6n9/9fX///76//6P1fpoIBUMJZEXDHCmv40ZWFZOLyjozRT2Tkx4IXCBoZQZV6C6GCykk5gmYI4a6dxn0aGIDcdpa4QQqGKgkIjQClOdl5sNNOqmKo/J15A3r6aXuefBjFtTqf8n7ONX1puyWr/9yfu/SsAAGBkAAYx5OhsrAAmysgOaP//uUROgN0rcXxZP9QdBSQoiCf2VICrxTEC/7YtFqCqHF/wywCXZnAjXmFmI4aloCRn9STRplzgAhohKzCFYSN5dHXGXFuqMnsqnfMpJ/jb7tDkpeZZ2rb0sQYQYCfGZKosBvnBrwcM7LeGNuNeRkvArCYKABpGWRgoRgqQ/6Yi0BsGgsvmGQZGE5Bmk6HGFoHrQaWIAbV5uklNNZ0gtlFRmZYKpiIuRVZ5YbIJqT/1a9/v+63/Yz/7vdsBSkbQMCg9MaVtNn+kPQbMPQWeNrz4MOyDOkwyApMDVTQ7VPMsNgLXtL7Ky0RmRkIx7l3xliKKwl+WPfN1tJ/QACBvVQjB2FVMhWZ81tVljsM8zNfyNUxwQiTChILNLcKwyWSE4UAcIQhJh7QEeMnafGGgi1+jvOQ2cYvaj8HR5nNuSFIBaTFneg0/v839S/93T/Yr/zH6dkTGDVBupjdqkGZb+0NGnLPqphRicaZdyGFmDqgrZijYJEYNkGimKIADZj8GQF//uUZOkMkx8aw5P8MkBGwviSe2k4DERrDi/0aQD9CKO13STdAUwQCk4GDQOEFPJ1CACgRWw6QMS3Pu5Wd+e9bxUetJCT1vR9f+2xpdZjos/69u//Shft7CQAAwQsBxMeAOXTE91qczwd7uNH1NYDEnQcQwIcWbMfjBTjY7Yj4YgTV0lQUnpgeGxkGPIOBpWVnQoCzfuBFA2BsUCQ6J1UdKdfcg4NB8JOYbYvZ/9P///////+gSqrIYHKBJmL9HZ5kPK7KY2msVGSylqhiPodwZEt6eWkwarUUeEDCcuPmUBZAsGqz4OGmkx5lTzUX15ZYxJ1ViVfS9FxZOz16+v+7f/u21//VWAMEPB9DGKlaQxkBZUMkwkyzYZCmMxyYIeMDGBs2nRRDEmZCMSAM05xHyaWCofNKmBXajqD6UTNnxcda7L4/EHggSF09FSXDB4DiYYCAEBAfCVc/9lf//7n81T3/rWBUDAuwWgxehA6MqMQYjBt2hk/ssDTpkGqMP4t//uURPEIgs8UxsvdYbhgIohgf6lEC5BLEE/1JwFEhmJZ/uyIczEwfDEaU+MUQJMx8QwwsGCxGcdPAkX2rO+VADKLve0QIAiYchOH6RRj0VdP+rTtu19H/XsHZ7///sGAgBvjGRTuoybcHQMGqhJDWVQcYwDkKVMBeHazDTQKIwD4VAMJpAZzu/4nVAEXjdqTEKz3fJA91mzs3ctrbd3jgOnkFidG9uO4M3pmxc5mE74wE8IwMWbTsjOZzswyEZ4+NSdKfDBoxZkEGJmSWBuYGi/Bk2g8mfzETLgweMTsBOQhaHKUtWOVMbl2z/aZwwsKBtYRW08zyGjDA30Udl9X6LN+mz91+76FK4wwqoNFM4PeETbvK/s0E/o/OW+KJjNDQbgyMa5TBkAjMY9Qw3JwRTgXXNxCMLpIzHLxUEIjBcGAwMF4ULUmVNWiunqGJRdnaWlxqcr5BM+AiKOxFlwuilX6BVH7QFu/OJXQ/FP6EtcZ6GvEoAAARkbiAAAAAZmG//uUROsNwuwQQ4v+4RBXAXiCf9wUCghrEE/saUFtBuHF/3CISxmnGfGXnZmvlSG3QvmEDTmIwKAg0iKMDcagZ2Y4lUBQLKCyRTUJRPP0xUTOmq1mJ4aXCKE19fR/7CssSmA5Bcpi2CU+YQEzVGVYRMhprJwiYSMI1GBaDNZhYABqaN2uf0k8ZTIoYiAEYHBmZ6iwgPC4BMSZkkUx+OrVhmGn2EcJQ+OVd9ENVih7h16XSSev3t/e3b/2NX1d7un//02AK/bQGBIDGNA1G0YlmJEcBVXTJUUQCa4QhA4tpQW0r2MlDJyNZYyqfpWSyl2oaC4KhLSV0tizJmK1PTcWJ2m9yjAMFtB2jGFigozcUpJMjHYuThO0uNEQUkwXkmzRYB7MF89ExFQXjK5s1gIAwWcsCDQ4Bg4LALipGq2J9Mpg5nUGxWGqSexw7zLtmqimlRf6UoTFvf8rIgIYOqDtGRBE9xqy4zyZNKxMnudjwcVxkphKFUmPkGqYZ6WpjNhE//uUZOkIk1MSQoP+4RBFYfj9dyw1TJRREs/1B0EACuT13CTsGEO5kwQOFZ9TADjlY0pRfk8tuX4zepiQkWECqiqBIzhyzp/8K//R/2f1zf/6DAJgbwxE03WMz4GLTL5lowxQdDzKFFpMGY6M1UAhTAmPNMXAEw7TSMiGREYGJpIYEEwkGBKZyApO1VRY7JGpNq70Mymgu3Ltyvhbt3rWITTRVEHJY1V77KBZTAIQpQxBtI4M9wRaTN9FaI5D8WzczMtMGcisyqAwzALTxMaYHY2piBwyOnBn0eNBkDQywlzL8tlUpuZ2AeDbdx4UEhsNqJVbd1ftutvbR2foNS1jHf9tX+hcWRUwUoHXMbHIkTDaEdw0o9crN83ig0FxcjCULDNq4A0wmCbTLqA0PZfjOAgQEJzpw+oOFzBAILg4oCoCkfU8k+FjsofGGoGkFPcxt0lPWtXrdIHC2P7BW2s1UmC7A1JjmIjKZBUsIGiYoZpg0RbwYo6GUGFrmnXgCGLV//uUROyPwq0SxQv+2KZUoZiCf9sUCvBRFA/7Ypl2hqIJ/2xQYgtjDSRwWHR0DPjIBYDfy66EtpK8xdrWb5g+0I0svHV2+j8hTzva3rcidrTqTvf3POaXp7PKgwYESDFmH7I/Zk8KQGa0ophHoRl6aSA0RgxBkm3cBAYQwxhlcAhnXJAVLTCQM4w8YaYiFjgMBggGACsJcdhSSCmcPNYhl+JLJ7FS7bqcqXqe5Y3nhyp+/1zP7Eh6P+MAYCqEOmHCLwJodaq2bVwnIGQfIQpk1wUUZ1KyfwEUZVM4fVDWYbBU3UwCCszQH4t68zkKLCyawgHWEXrrQPh6BQKOeHzgeW/1ey32f/q/b92z9rfyKg4AAwLcCcMW4GljGEhHo1ek+dPjt/gwch1TDQHYNbIDowYjVDFIBjMK8RpNwKRHRuNJGOeusgGL5riiSCi6GJsrzl0NwupRaqVa9/D6fPWsOX7Hg+Y4yhl+hgAAwNsC8MdiDADKQh4c2PE6PO/vTQxV//uUROqNwrMURIP+2KJYwaiSf7siC9BtEk/7YolXB6HF/pigERTDYDeM0gHwwjEQjHkB1OTngUemFnBwDqvBgbdKd3rOUUlcvlHO26k5T5cz1ypsLAugHyBb/3f+3+swHEFEMD3MRDGHyig0ZAmIO8oXkx2QaTB3JSNAwEIwKSqjCzBJGZpkzK3wlUUGi2YXBoc38bVfi6IMe+H7strSyKWN5XBEofWPSABkxDvH1jIYGKEDGBlKghks6/sbFEV7H3U/OboINRimiQGbwHgYMKVBiWhNoBwSA2CgChYd4mAvZi47KRXIMGBWAeRAwgJOTtqMRbYmjKODx86OPHzdM//9P7P9v//21RAMFAAXTIbxmUyWhYRN0TLjTTaRzkwnEIwMDuFFDFSgEoxpxA7JEAwYWgxvBwwgc6i5SYcfLNkoNrEWd5TZFJOpp0DOs3rmQ5Sbm5unz1fv9oAHMUKefSpWWGAADA4AJQx+ME3MLKXlTWwRqs0J0ChMB2DojLpx//uUROaP0soXxRP+yLJSwmiCf9sUCfxFGA/7QollCeIJ/yRoDqgsDHHRh9lyQlgMGxggGpjQNSc7J19xFtJ2qEw2AcByM0y8fJyNduXbe3NTBpJAPPjft/////////9I0GBhBC5gA54qZC4VlGp6CMxmjRIAYhEBLmAiCQwsK8GAtgTJhIoBIbLAmmgYWADIjWGA4CCoAKhCs7/sWS6R+UydKpFXub6BgKEghHzM7VEvQYNsVSmLnFUph/EHmRH1qeODRR/cAgnmwjobEwpZhNDtGL8BsYLoNJkrgaGFciTYgLHogxxm+oaHxcJh0Tk7cWT5s223cWWTZtsDiXYfL0/6utck/V///u/6P9QtqpAQVGZE8FummZlrxro4xgZpaXdmHxhL5gKokoYKAA3mGPHm846GUAlAIyn6MtQBVrLvF7l3RKDn5kSul3QEkTDiQNCZYsifs56tVSafOcaSIp3cr/9rqL13dn6/d/6P9gAA1X4AAXBhhBeEPNPNp80Z//uUROmNws4URAv90ZJY4oiCf6kqCvBjFE/saUFXCeKJ7SUQUTPgwCygVXOQmogAvnpNHRzJ6MipILMaSe0R2CQUSVN2iHeK/Wku3eKW/h1mygyrCYMiHmGGNL4BiRDaacCEewmRRJYBi/IMsYg7BRjDiSmFAtGYhgWwHhxbWMQRzUmoIETAQZvxEFsSdtUq1Vhl1QC7MVkri1H+yuym9Ws45U2eN7G0EhEJTjBQu5O7r+x1n4yftqX20//5On9PQcBgeADmMCQoaLSqRq/CnGfWkoYxwmpgXFJGKCBeYBoCkAumKF7MDBCWaKmja0R8hDJkARoBWVEJkiNIY+tk/JWQZ0s3KhkAAwTQCnMaXFKjKaj3I1f0viNfzS8yUBojBIQEMzcLswrCbzHaAsN0owdVCAKM8Ix4IR+VVbxXLMnXYi8UDuLAUjf6Ozkuq8rb5ZhalBEQaNN//YIAwb4BXMldL2DT5Fgo2v9E0MIZQqTGqAyA08rg3LOU0k9U7cGQ//uUZOeMkxEZRRP9SdA/AzlJceY7zdBbEE/7ZEESieKJ7STZ15dAUUYoPHeJo0QM2pXkazGItEZZLpTYl1a3La1+ludskjwSW/QM1q/X3SP//9n/1/v/ewwHgHvMG9RfzKQyIE2FZAdPDHQwyOhyyFAo0wQ5SIX0yfgHz94ha8j0G47rbNNUqZ0yluTYXofeGIfhyQSednqWmxrC4ZhI0GwWE3////////7BSFUwKoIrMNpRzzNKwZI1lhDnMZPObDD1g30w0ow4TOUzsDc70Bs2E4X+YmJHUlbLpDfaNTXbmdi3eBkFhYWCwGJiZqrk/fVd/2avH/4orqV27fqu/qogDA2QEEx3AkpMUaNXzZH1PQ0doo5MMBA7zA+wzAxi0DDMWMGN+CNMFUvGgrCoLmBwhPGH4III1jsRBLHAunxoTzuBajcXwBsHBZNweFnM/X//2//////6vW4Bgc4FCY9YdPmJcL6pqxKpUZkcZbmPIgi5pfER2eX5kJvhzIS5//uUROsNwqQSxRP+2KJZIkhxf7siClxHEi/7QoFYBmIJ/uyImf4JCgVaYHUymMW6eeQeCz7RVgo4yxW8fYvPWW/d//c5dXd/6v/0BIgpgcYPQYgYnrGMEqmBqvC5iagWIFGFRg/xgzicG0WB+YPJ/Rgqg+misBhouoeovDzlzEFw1IKe3GOTdaxlYzpwQJmQyOcOadk0JqYv/c7//T6v9qO6rf6nu9IacbjQJKMCQmMtLOAPfHIGVnIaDGF45EoQPXYXkkQ2xXycBVPF9Af7k3PcjeysKCpWAlfvV//Vt2Jtq3/6P1+uMBCEZDP7XHg0RWB/OEd56js3AmY0CoGvMCcRk8FwIjKDhuNXUQs0FhUDFgYSioaikGDheXTA6VLUaOeq0VzOv2z+deqDUxE6wmamwsxW8a1ahcaooKNLDDzxqyWlyGvS6mOYZrOl00PvTZadYKiszRSpHva8KgBa8wTAUzGxPfNfhQs32VQDUyUaMusHgwew+wM38ZWepSa///uURO2MgssRRAv9YaRMwThxf7oiC3g/EE/7RED/hOW13cCWuPDEPTECG/eQPHXc1GTbh81OLft7PT/f//f2f0M/o8Ytd2r0GHFCfZmz8emcrgsJmmibKpyApqSY2qJ+mCch+dBYehlEj7GwuBQdOUphQcGCzWZnWhgUAs+g1ECE37IBFqTZWHBz1hpKGGU6xorJa3jX8JMcVZPqqcid7Wsjr0LFE8gUWtiMzMKUF6S7XdD6AMAi1NhObMwGWg3WGiTMjeLMhwcgQkjmceCEZuuCkJ5F4cARUNAPj2fJZZQg8HFLKJZtrdHqr+SvFv/9H/3/91UwUcQJM5McxzZy7DQz0fkuN1qW5jJVQrgygWeTgXG0MoNds03QhDRa3BTMEiCc+D48FVJPkjc34dSocs2KHXGwCaEggKizSdQbVCMgsVUxhsWY/S5WRsc/eueJ9gbHN1au7Cnu6l+gqVVMXSENkosNFNesz/VrjEdW8Mh4RkwBh+zIxAYfofJPEcXE//uUZPqPg68QQYP+6RBHQbiFe0g0DWwrCA/7hEEChOHF32gQViCO6a9nJNl/YKgMCSZNnV/o2/7v/7vTd9X/+4w4UUyM5odRDa56rkz0TmJNRpenzHaBWwwZH+zZ7GmMQGHUw4w4Dq1bMpBQwsODa6JDgNnZSPh4AAsPJVE542BJDVP0NuodR2oCPCSYtiqzew0y4USnrpbAdVjC4Ef8XXl2lT8i0wIgSjFhQuFsJDMudpNBhT0yZwrzFGwTZ0RASiMYBNxPIoKaYgCObhu3aooqatOgA6Nvle5rf02/9XR/s/17Mv8YMHmEGjPSZ5Q6jZUCMtp/ZjHPJZwyVoZPMHCI8zE0wUgwaQhJMTEBGjv9Y+Y2MxVTw6gtmzCA0bWrZ4u57ORps7or7PNbROc2j/3vXWSqtd1fuuDefVqrACiakBe9LqX2TalHlpUQ4rZ0mWvIEVCrKABEiqph0NZsjAZlJuDGWHAoa+Z4xjoiiGAKXiYPYLANgIbgmIUUHIAz//uUZPOP0zYJwgP+4RBAgSiSd9kEDJQnCA/7hEEIBOIF7uiA1cHNSVyrH3Ck2BAat/0JTX/T21/3/0bC3+a/+j3mGdCmZn97jWZ4XDSGUX+iZoq0QOZVSDXmNLReYaRDxkSHVmy0CmZQp5rgWv6JsUaIDrw4oY9tzP+55XDxQwhCVBx1DQbedLkh6Zhz1DFhxzgITfUV5Y8AiI26mc1lwXSpN7jbkcyt49jTcdEzxCMZQOSA98oCDQDTBuJ7MQ1HkxXkTT5BWTZYNDApbzGwGh1Q0sYmTNgJCOw4FKYpi7S7z1LLe77Wfd/M/1bGf47Z/qZ9FTBOQ2sy5a0rMuh1KzaSOzA3yNvIMdrE2jAWlJNKAVIyhFQDWICtIeYbWD4FLhotYiEBKAu0k838pw5fyyzx1nhSicsk+kXHFRQ2L3LqUhzk9d1ZZrSZxjjCFsFlDFpGsFE3/XXSpfWprnLHzHIqKrGmAYEgYbdTsaGi4hlbzIHACGQYPov5gnFsmQsB//uUZPqPg4AuwYP7EjBGYSiGd9oEDjg1Bg/7hEEBA+Nl7uBMkCARtwBotQ9QQlio5+b12CK/XB2Jh1VN3AfFf+hCv+v+3t/RT//9f6zB6QhAzqBgIMrChTDhPcZE4qBK/MxCCbjFEeHNnAT4xeHoDGIDtPTNTsBMxMRPJbiIDVDC3ThrvbOVNdw1ZIhoRuCbDSFl23Quvuc22sWRbUhbyrVUfaVYduzxg539bk3dYsccMaXL3vQK8MDUIIwF1XDWHSMMUqXM3RjNjLLA+MFcmky8gOgvLKK4KlAqLAA9FnLtiNCoZQ7UKHcMFwCXc1Ejf260aEf19l3/9PZ//q/U/owJ0KAMQZTqDLWQhI1ZRvANXBBSjA6QikwKAOHDC5kwu7Q2pCkyGLQIHFWMDHA5lDUUfYSGCoOMzmrVDU1olDmniP2eQ6vr7+1Nav+yuL79jNlmj/qMErDPDCf2u40sVB6NqEazjWkyjYwlUShMA4lkzJgMQIpYZGYMpm0IEOJh//uUZPQP04MPwYP+4RBEYUhxd9oEDUw5CA/7ZEEfCGHF7QzYIOeQPEwrR4wDO6LFlx7n1rq1fT2t7GWlhN2/de99+24U9Vb0IVWjcOq7UdxUd1VcYcQX5qWtonP1X6fIPwJ4GKDAJBsGpyfkAqYXoACsCN/aCDKHIAj36q5Tk70BgmIwQaLBuQe/Zt9Ngr/4v7/1f/qZuX+77vkyGDZARplp5OKaVlAFm15siJrcwIgZAWC8GfsDn6gkmZtSB+bm9nGcFjioE512TNBBAaDBG9IzDNil2WsHSOtNqaLrZhT9b6vSyiT02KNfUxpj391o9CU1mZVjBchHkwzJy7Mcgfojf6npQ1/9EVMJqEbDBKAV0xzYCJNB7JPwSADnVBwvGBwLmWYfF+4xXVmHbNRfx33l2afIMOPFmgih5MKw43QbC8XSojUhnpQ9B+8lc00fph2kaU2CuKref3vfcRUpYuPkGmFEyiIj6whNZsUs1HmdDC3SnMY0MUwCQdDK0AJA//uURO6I4rITQ4v9GbBXgUhQf9siCVgpFs93REFbhKFF/uiIxpGiCoFT3B6GXZ/JDXeaHhGAXtlWOYmvubYP7f/Q30/7P/Z//1hAgBiAoYsahARFHX9q7J2/cnWbNM9sGX0CYZggweUZT0DzmCRj/JhNIJAZL3Ri8EBQTnBjADgqrE7q6xmouw5c+vzyhe7VIPYGtUI6msiLfd+yLG/Z1MnpEE0LHzP3/NHaGvtr/+p/tM3tuu/23zc9uyv/3+I5m/VP/IwYBgHhVGA2mMaTzYpuDv/mauugZLIdxggxB5oFpjyMENBjMALBbIDBwV1t5U1+6IAJbR1n54BJHtaFG9m7s/+5Hq/V//sV4cwPMSSMLfh8DWqFV85p5QsMl/X/THNwyMwGUgDcUFlMB5k0yYgpDCoc1EJKpcYU5tyh+wone/6wxyHCoeS6OcsVM4yjiiVGLLE9Ck2Go/M2o1MDhIDsXxCjfNOdD7nP22RcmcZuUwBioIpwvABlHSeG1Q5c//uUZPSMw3oQwxP9MbBDYSiSc9kED3BFBk/xaIkUhOHF7uyAa3yt5l2BwGCkQsZVgD5gsy7QCRGmbkg4dPYdgsQvov+pbIms/2r+l////+n/9bLmFRBBJnQYtsZmtMaHXamG5jp6+EY2aGiGC0rwa0QcphpHcmiEBwYWmw05wYCTaoeIg3Ak+7kJAg+dbShJcEB5dKmAZKJ3YKIxZw1blpFLnKnxqa6Y0XVuPC60BmiZixlW1bjTGvSopeBjAsZbagQA4mCuxGamropu1tim/6kYYYA1ZilihxoLoM+A6MYDQRVo2RQWgX+SmywxpV1uFlbl//3fS38X1/nbI7+r7P/tAC/5gPAZCYEC/NmefuW50iQYIZ94oImQsBKRgMwrQBhtEyodA+oIE7c1AVmYADnFHDe2sGjU7wq+YeyKoeecftFULxpBBdOsheNfQFkYodGj7A7j5vUqxFkw65acY6QxrEyz9zI0AAAm5aYIAPMSYXMy2iFTSaLoNQAGkxqw//uUZOiM0zULQov+2RA8gShxd9oEDdAnCi/7hEEFhOGF7uiAHzGvgNVBsCkH/gu41uCEe5Zv5jGjZXStkrVdb3fV9e3+9X/u/Rb+//rIAwXcCVM6wKYTQDg2M9cso2NvZU9jAJRVsxYIDDEIA5MNpo4yvAszHHQO/zETw2SDQEPjHH7hVhBeHSbDwswQn7Do4wcQTfLKrEhZasSXF2OuxdY3pUiOUbQZJPYTike56PaTZ5B7gWA2LUMAYDoJxh/KqGcLD4b0ZSpuXmQmCSLAYIV8Y7heYt4fENqjcymoKaiv7mrVC3Et8tFnikZM/p/3/+7p/W7/0/9mjoUwqUT8MfMtejaRawg+pBXdOPwLfTIlwCgysYajIlEsMQuAAyVxIzm50NCiseDQeLiYHMVg9O2UUowamXYYFIuhFojsESDBIQ6jzmirz55z9IvPrc5rCiGGHLrRIFmCoaHoz1VLDTq2tc18x0MSogDAEjDemSjGrlHOdwJg26lOjN6DRMA4//uUZO0Igy4Jwyv92YBBgTipe5ggDWwpCC/7ZEEHhOHF7uSAx4xxwSwrnTKJxYdGhkIaNB7jE7fH0tGqIZWwIBl0/66O+qyO9Tf//+7ZTi2ujZ/qhkwZIJwM83NODL6KQE7VtpCOCXHTTCCxEww9GxjU5CIMNdOw0VwFTP0RNLhIw8OTQRqDAS/1WKvbaSeePDTVBq5KZF0K3HTrFPGLG0IPWC6GPCeKOQhw/Yt3MAdi1WRcsssonFb1NGmHgNErRacQPMIIMExy07Tc0MiOp8bY0iV3zIJEzMEaeOpw1FM4tYMtpHpzckEc5v47Y5cjT2Mlxlz/N/v9PW7o/+Z9zhPT/Vt/xdWTjCbxQEwslxPOUIaLjlcpls1jAaeMUoCwTDPh1YxisBLMIFBxQETBGAogPxgHYBAYAGAFGBCAOKjrjQhRIYMiI8wuE0B9wdXIyMmhqVHXFVn16cXoUsoedSZF5WTuoStAcc+UwNCTbKnvCjgHFFsRXzSmAHglDH0L//uUZPCM82wKQYP+4RBHgUhhd9oEDfgpCC/7hEEKBSGB7uiA/Neteo42jhzEbVAMZsgwxGCNDKnBJMFUE0wKAHTAPAQQ2X2BgGr9jsoEubKRy920YA60++vWn+j+v/+yv//0J7EaDTZq/Q+vtQRNozN/DIc2WoyjLe/NluPZTJQQ1EweEFgMTaG0zAoQOcxUsnLMISADTAfQCAeACwcD2v8YGmAqyMJoDLIYCnluuMmMgfDiQ6A5UccEBQ0HGhMQMPnSIiUwPrVxQUHODJ8G1pUQXFhND1gpcsGkVMnzYTEbTdYjLONiYaGf/+oZ//wk4AGAwrEHsMXpNszFTUY8zyMsMMZUNwTGlQ/sxasKyFAJQw24DqMAAAwzBLwoEaBMDARgAyVGAFgDrxGANgCj5BaQJ0FiSUzH0GvcU9vVNMMfUcxNTF/cVv1L08f1DP3xB33ccL1P+rRe1/PV6yl9Cj7aaxPETxpd1H1Xcdddy1XVXVPWN3uCjwEEXHTMHgZf//uUZOqAA5QJwg18IABIwUhxrwgAEUgvChn1gAJLKeEHPoAA//oFVTAGwkMz8hwYMLljwTc5LBszXpiUMb1D4DCwwZ4x9EB1MFxFoTCXgJsHA9oWAIzANgEkwCwCUAwA8iM7KsoWJpxW7iEZyrRBfTTppPzDTS79GhW7Q+lVd8Ct9DGLaxz2dnqJlIlbHKdj0iDCbKANppkg1lD5zWDXMMQwPswKAdTL5AUMF8LIwQgNyID2aVWSnl+OMrFOgXjvrVYzr7fZZ////2fo/7um7qAAlVc0YfwShs55FGY7IlBnbqvoYY4ZrmGqA3xjAaJ/OIZktJZuADxhORalBbAxCBGBLfKWycfh69PIZxnZ6Wepyp/H/VX2bE3+xCv997LPQgwIEMz1rszdRNDQxSmNMQr0xpQOzBhDNMjUA4zeDVBM3NLGHyIqD8M5kYn7JTHKGMwWgL5Me/XyzOhR8c1TiXPM4JT8DDkg2EwHikTYHC5MQ4BEzgANTak0SZDFwg5U//uUZKwI00IMQgd9IABAQUhw7wgACgQnFY9/oEC7BKJF32QUdGgqBZ5ugDisUxR3e2iXGuvU2+pd/apP6bWURs50V8dK9mZ1C3SplRxaiAC4HZiVJFmT0+iaqjZ5uOiEGIOJkYDuOdLg8Y1AJhzZKRYQuUMEby+pZ307U+iYIder9v/8z/////Vs6TA7QnsyzR6HMr0gSTS8cZg2d5MlMezBRzGvUzNmMD0wok1DMsDdPVEzigUw8tEDUiPAkndKRHRMKhcJB5ItQQVcydUhZ4AalUbdlZeT7Bb0s3/LqvSyZTzWe2hDU/3RjDB0HDZrnDB2huNW1143LhdBJcEwAiLzIBAuNGcp6A0Yto3ItjLP+PG1M31QlHyliv+O/q+zr/6f2/0/s6YAABl6qkwNcEkMWMNfDFI0rgwuBaJM4BEcDBpQgogvk4nDAwzuAw5Fs2lMaipeHMEv5X1H8kptP1+hCBzHXM0f+62zq+tf/pTVp/oXwBg2OhlH1xn5mxml//uUZMYM0tIJQwv+2RA8wUhxe7ogC+wnCA/7ZED1hKHF32QQM1uazpVJhvh1mAGQ2Yh4DQBpkRozDEoWOeTE+OD5hjKlLmETWy//6v9n/////+sQq6u4wHkJEMShPjjIKTCMxpplENBmBQjFkgJsk2s0rEQy5rY3HDky9YnEAkMccuzaK34ZvVbHubpeWlw/mh6lJpYKa9kvFAohaS83N36I3XQpBAzWysc48jXvdQ6cSAzcaTTZg0BZoCsp4xNZx79hzpOBo6ExgaoYJAYq0p8FgooFkrOJ3Buv3Il21izXa/9mrd+/S++P/+j0f+z7kdMCDFoyEM0B1YfOyCO3zWy9s84b081MpVI5TE5Sb0wEsE4MH9BLDE2wDwLA0JgEYDCYCKAomAggRhgDgAMgMjrVBKbgCrJZpIIDBAHK2MIQ2E0GTtZLsky9y0XEI9bElDQHuStR9wY6Ghs6s4JmTFD5oaKXIQMYkLta0Pl0ABoSZh2INmRbBAZpjWJkJtMm//uUZNoIgl8JxUv90RA7IPiBd9oEC9QnEy/3REEBBKMp3IjQCSCuYY5WpiVBYGDkAeYHgEBgPALjwGhaQIANpafVgZaWHV10gH+rfs1f/3aev//3dns//QaSEGvmxvs6hkDLpoZh4DkGH3pO5+th2YYkIIvmFIgYJgfZAiYG+AyGCxAgJgJoKYYEYAsqOGBXgBjfGBlACTvkaoy8bj2rCc61DiQoMBXBK96sm0wtbr0nmi3FLGvehr7HMqElTFtUdMlyLEJuS/E74gUCMu9Fb//9Jf//pMEUBXzIiydIxs1JHMiSJUzGQEeUzCYvCMUOBCTAigOcxKcL/MDIAXjCVQ8IwBECuCADNoiAZvAgAFX+dQXHgy7vHyOJRjKs3hrp6R+rnml+9Rw3WG5aIeepe6tJ5ZKTmFIFY3rqJbu7iK441VGSahO+Y675euutBnY3eXX2TiKqVNmUkcTAgRJtAIkLg4wuf//yh///iJUy/CHgORsfqza91WMxyU+ANMIk//uUZPUAA9wKwY19IABG4ThxrwgAD6wvDBn2AAJaKmDDPoAAlT7LVtkxsIQHMDmBrTIpRgsw4AGOMPRBfDCigFIwGsBvT6MAkAalymAdAOokABhtUGBTIB0XDCy4bBEXMknABUAxw9QViRo5CQqBrbCbUn0PQKuQtxNZYFHhas6HySWZODblHgyfYIzQ44kPyp02otSYf//pE3//JAACAAAGM2FGdKURZlVDyHtCiYZgHXB6Y0lmvkCsYAoi5luh6mE0GsY3JdQ0OejpDhgSgCtdMCwBBXYboR4Y6riWs5rjm5Whk3cI7T3EVP3Uz1PXLRDLKLD3pS/cXMwjTTL1jJj55jmXa7425Sfa2nu7uI+blop4S+iFD7RIyLxMKE0gu0UhZhL//nj3/+gBj+YBECSGC1KmRt+AvgaqE+8GMfsuhiIYZYYTWEPmKKAWZg7QliYRMA6GBbAHRgJQAuYA4AfmAigIyIy6pt0RAOhqHsUbF++pbHq9YcWKGPRWtKTt//uUZLeABF8MwoZ9AACPSYhFzyAADHQnDD3xAADUBOJXvBAEplbCWxHT75fUzsPdWvdTqAgABgdhkGQOAkYaaFBndLMGieYAYxosRhpgVmOMAUYIwA5gfgLGAcAgX5Y6HAIxmz2uvuWtACABhDgTiZhSSrmOqrUBuDLrWZfIqpmMkgfpg4k/m0sGsYqQ8ok6icrpGRCN0PUEYJfqGJacKrIyvfY8lUbHIb1afT2i1rOLWWNIIb6em5q9qpLatzaq1bd5fACQD8wKkhTE/dNMwVqE1viHzJIBAMOhNBZyCmg2kafTawUNBwMWMX03KImRv7ltVcxgBgLqYOciLmDDpIZouRpEZTySAGEZgrgCEg9qAQy4ZA2WCEAMQQlQxv270prQVfxnU6dPXt06/oXOavcrX7ftWj/9en/kHliAUDnahsZdSEhmPMXGueDEYOIeZhwThy4A6oAcKwcADN3bX1R9+gbVX+y3u////+n///v1/+kwU0AOMwEHsDGdGIA5//uUZIuI0tQJwqv+2RAuQPiBe7kgCWApFM/3BEDZBKIFz3QIetR7NlMNGzIKAX4w9h+jZgAkMPZRIw6geTNcyBQLLrmcRoTAeET0B027UYwOCrvfRRNaO3fYmS+9VZZ2l/T3nfXv+7VV7ofNpN8AYGINBhGIaGjKbMZ1Ky5qjEmGN6AoYWpMccAWKvwxcF5gsDigsB083bm1zj1LQ9tvv1f/1//+7SDEAmCqhhRgsi/kaE+RFG+nF/RqkYmsYKSFxmCAYMaLwP5gFHgGNOCCas6AkaV57gEJt8ek4OaW2U0aGsnDecZ++s45VzH7v27+z6qq/19td70IMRC4/GZjOCeTNYBYY08UfTCqEEMgcY/8JTBRdAwIAIBIhG1wunTfyhQssk5cKwiuE//+jqUweYBsM0hBMzW7nd05+8sHNpmH0DGXQEYwoUxDSUD7MKcnQzcQFDQOgDWYgGDDU1nU3yUS3RimfivaE38ijdUtmUtvf++rUfsO1I+lDaxncux1//uUZLSM0rUKQoP+4RA4wPiBe7ogCkAlDk/7REDUhKHFz3AIe/j4uSAAGCIEqYXZxZmMLvGxSgyZfCQRjkBOmOvEcuF5lXgtQGTEU0fXdehpX00Pc44n//////////1CijJgwQcOYUesCmQvLfxt3wbMaJSY5mC+BhBk92xxQRZlm75ziJBmXoLXGCCnjKL3qYwY90UdXelbll7Fsdpu3baW2IbjPwjNqaz8J1WuUBSyd4YGMxf51u0iCmMgYgM2KRoTfcPwMNlQMxgwuTDeSjKILWah+omONV6HiYRnyYUWZrcd+aEjxA3/07//3f+Q/s//9v61MCcC0DNzEJM5d1StOUxNaDWAmNgynoCOMMCHFjA2wzMwfsVxMIDATTAPABwwEkAmC4BeYD4ANIWMAaZbEzAYOj7BhSKj1BCViiHMXS4ercuccNdWRUhj8VDLyy2n6n8LtV6vkxikrWsag9mVVIaowrBRjEsR2M35x85jUYTNbXMMMsgAxFC3DDVC//uUZNcM8q0KQoP+2RA3wPiCe5kgCzQlDk/3REDyBKHB7uSCpMD0DwwNADxgAESBHXWWvxw5WHj7/anTq3Uao2jRRr/7+/t/T/+5Pp+7WYEvAPnCsIt5gV9s+dsAlXG2jcdBqUNOKYVqLhmIAA/BlMAiYYjkBFmO4C3piwgH+YCWBCqLmA1ARQYAFmAWAS6OBZQM0DGzXKU0YfR9rXqdxvibh1X1VbLY61dsK1T+O5bbpiqmbuT0TEPpszw+Irmf6n/4a72c8xue25m99XTvuJfK3Vbt0y1e99S96LlAyVWGIeSLCIFAVOf/6B3//NGFohQBjxA4CYyYUBGTKEghhw6XgaRcLymJwgRZgJIIYYT4F+GBUgTJhyQQ6YBOA0mACgDjgmAdADLLzARQAB3SVqsYVRFrospK8fNK8UvxmPea7zG//szf3itaJf5mYX5ldmS7ZrJ7GM+I26uzS3z3u67NW5Xd5106l8jt35bfa3XjctrztrN57aqvle/ncspn//uUZPMAA3YKQgV9IABF4UhgrwwAFAFPBhn1gAKBLaDDPmAAyLZQwQhMDhL//gZn/+kmATU1VGIKaAb98UhsdfKH8PEAYAk/hoqncGTyZ8ZDYUJhODOmNUCKYPAUZgFAOokgIIZg0/GZ0ami8Y1Yxi0ex/7fTze9vT6f9TGye3d//+8wMwuDIbI/ND9CE1ER0TOzHSML4NkwFRkDGlAjMBcGIOAXHANSgAZnSanN8qjHP////+3///////ZQYI0GEmLCudZljbfKcRgzRmeJJXZjswR8YBp3hqBgQGDANEZkgOJ27QZ+AAc9TJM38mqW+jQpFXt4u11MsYgsu5euz+16V6TNVXYY+n2Ldd6Nmn0dqeCEKzR6tzM+J1NVYhM1UAgTGhAHMrxoF/cIFQsZ2XItUDO7+tTH51iTPiq//////Rp+1dVmZmMBTA/TF6ij0x4AGTNM5RUjMAyNAkCHTE5xD4cGjDCkjP4RzDUkYGBJDtt/KuVu+5Pc2ldz6fTs//uUZKaI0oAJxTd4QAA54TiA7wgACqQpCg/7REDMhKIF33AIGf2WWU9vdZdo1CX/Xb9q/RqMCcDYxUkBDNdcuNjc9Q13SgTAZEOApEBqJGRekVsZqprOSgOkeuVuo7Nv3///Wn+r3f/////330GD/hehkPDY4aeO21G4sQB5rbg5qYoaAoGOuGUa6IgRhgpUGL2FeZghAIDVeGjyWcItthpK0P3qJHHop7qUWx7dG/Tnr+/oTT1f/fiiWeqv2MVQgwNIA0nuYxd22TagTjNOo7gyVggQaA+JKLmBus6MQFbhXHgFvuNc87Z7SSWf3dVf+9S9VX/9VKowMARQM6ha7DKUq7U3snKKOMTHlTCJRFAwJQIHMkrBSjA/RM4xGsApNd1UxcHDBg3M7GpeL7VZBFdYvVjMPDM+kWN55VMdDg5rJ+NppW1b6RsUaRXTLtHi0WUlhA0ppAOIaBTrjTyzVT87BtOskpjWzKWSwuABBNdV0YsHZvfdnoyyH++cG7s5//uUZMsM0loJxJP9wSA4YThwe7ogCkgnCg/7ZEDdBKHF32gQmZYygUhwVYxUnJjAKqvx3llz0lqXqO0eLso/2PTXZ/6mdttH/e+p32/9axGFyCHJlk7KybdciYGaIUzJsqxogZBkCcmD0bGbNIdBhqiVmdSCsehLmCCAWFDYjttIPljdlGAu24GkKFBDAjGBdACGMSmhilyxwSKRJyx+6nbKXV2B2t5Uv14j0WcXILRQ9dSblugYCIMpisG1mmOlga+y75heJRGM2E4ZTwp/8PBeEFum82VhRFC6j/lRzyQVTVrMkk7Hrveru9UZ6LrP93/r/t//9NUBzBFQoUybxYFNiTPFDE/ZuY0Vc+DMQ1CTzC/P9NIcJAwdT+TH/ByMnKwE8DQGDxtEukuyqTjh6mS18XS3Qm5mrYmpUxeMtlW1No9PMXOxRKhXh9pwU73rLZ40ZZEZxh02YrkgbhTAYwsF5p4uaGTotOZAwbRgAESmOSBgFqg2UWbGtJSNCTm///uUZPINg6MYQQP8GjA+oPi5c7kEDLwlCC/7ZEEJBKHF7mSAuAftASVOcu//fTR0b5pbtK1bop2UXp//9l/o5L2sD/5hGYbkZNslJGKeuyphp0/CZHslMGJ8gthh7pEmaKBWYMyVZhzA8HCXY9EAwfMYQHRjUzAYYiQeHwKVWXG46HD4xzWknz25q3vTHqaeQMFlJsJERa3UK3mz08YhClBly3kd5JcetCiYxoeGdTDAoA4MU1Nw00GWDLoe/NF9QwxEBBTCqSzQ8IgBoL0mKZkzhiSessx7dypYo65t4FKjxcolg77WC8z0Iqrqp/9S7aa7NPXad/1qMEwTYJaMlzdgDUmIB4wGCyAMT4W3TF8gzQw5F/TITAHMSY/UzGAXBySNeAjBA44AzVgl9JEZ3fPzqbARGLTCGR7oLhEnmKCOZUNbTUHhiN7qybmuY6lm5K25kVR4QQenaUKKEpkg8tPT9AAAAAsUbbbTBgFmU6Am55bGSvUHSC5maYGmF4WY//uUZPII0wcJwov+2RBFIShgd9kEDaQlCq/7ZEElBOGF7uiAIBQhsLHHDIs22+44lSpngeHTLe+/i6//1L/b3bCOn/+v2dH6TCCgvkzJtZDM7/JEzJxcHc0F9fyMQYD9zDkZbMSYIExcAGDQaA5MxwQGcmTih0paXqa7LmkWMv/PC9mNIrAlU4JniZDa5yFCFzCzHyaTihCefGGDp2/GFC5Mkw80UMYVspJPaxc6YICh3FjyWuCtz9SAOvurwsBCYHhSpi2HymCEiCerjQY4kEYAJWZBAUQgK6oFow0rLLyzj7btE61J/WM9KNrrt9/q//+zv9qXf/qx9NVpqqMAGB9TEVFN0yDBKlMr2bDjOBCncxA0CnMo+dOWAFMYKQNmBbMenAFAg0HKhNQ2b8eoxaUS9K3m3SJwHz5JCKbHNpbPgdZhxEyk8fXaNDITtebkBlyHCxQSwZkVnUuE9mbFjgukXkVIfYt54mA+Mc4jowC4CjBtg8NpIWoHKamGUBm5//uUZPGMg1EMwgv+2RBBIPjNd5ggDig1Bg/7ZEECg+Ll7uBIwOBWkJ2NrYodbEpre780URcTYMWsXs6GvPKOfc3u6Lau3kOr/+07f6vb7FWtCmqu/MC1AgDFhB/YxT0+cMr3QuTLNw4IwX0GeMNovOJgiMC5AMLQ5CVg7lgAHpdS7lN5NncfWZd3Yld7iX3Xm5Ydck3t8XV697pN95QaOpQvkrNrmKel6DUMCsIAKn/GguZuCG9zUdKDMNsNUwMVM4AAIYFEIAI1oHqvmTCoyIfJkrWd+kuxXX7f+3X6v319t37P0f6FAAAJqerMDlCiDCMUV4yb0uPNK4TkjO2gU4xTQCJMHnnA+EGSs0GzYVnEnBikLhjcj36s9lNhz1k9ikRl4Ui5qXaARjwxO3tLlGHhxlzDLXUzb67WNsqcpdg98a90ZbO7x5BndPHRWVUOBdMZcOU0gjaTEuWcPTtqNhw0CpZk34gSGGGDGEmCxFdlvL7oy6YPWeY7Vb2ZVq0t//uUZPCIw2wJw5P92RBEgShge7kgCwAnFS/3JED2A+HF7uCIalNv9/67vs9HuYJ9V3WS7jDkApk0dk3ZOdASfzuaZr83U0vvMYPD7TBrAmcyBAB4MFlBVjEbwHA5PcMwBjCTU0FoYXBGa+AEXmpcQeEpAy6nK3ihuSCer3ayzbf5nIZirnFft2zP2/X0/4hr/5647Zst8av2e9wc7+d5WKv7XzKq7W8ndbB0gTFVTRgNA6iIskw41BjJ7RvNUfHM3i2MKAxBXEABsa4Asld/GC2uuuc0eq27DjvY/md6UqQlte5936Ni//T1blY127aYAE0tVGBRBmphXi0CZOOuXG17KBx8DXWGg6JsYYoBBqQAxGHOVCZBYHQ/lAzMoEC81bsDTkav6w3ks5yTHTblnSPpf8rX1aM77pxwB+dE0z1v1OjWz3tHaguK3Tv7wBjlra2Nwe5lv+Ihi138l+nTTretsxlE44QSc04WRzV6YgMYVZQxrhAzA4DcMo4B8yyI//uUZPqIgywJxEv90RBDgSiCe7oSDuxDBA/saIkShCJl7uRIjAJ6MTa8NB5F+phpsRrS7S6ur1s29Wi5nd/2D031fFvu/7f6RgMJnB8jNAgJw1U14lOBbUETL3U+0xBYMcMNAi42AgRjA3TLMDEJoK/wc3GEBxq5mza1YgO2EnMh1rHgJpTHlQEagoLBRBoqRKlmkxdZKM4+lrlPzGxbhdJliugVUjsvFEwum+hjBNehQ9h4M1TMVAPjAFMSMzoBg0Nz4ToK/TTUSxCbxsEAII0KxBDYqObgDObooMCiUOf35X72eXT4q3/01//9n/mr/fQqMC3EBjCB4po1qQ4qOQ6OQjBcmB4xcoPVMEuEnjFrgG0wRYSNMLQAkDq8xrMYUmd2ImvMTMAhSG4hY+57fKbEIsbGOaVRJNQ5CjKn7wRIrEc2UM2rQ+FWn2NMnSiVFUJi4bwFcis6LKHHAWj05Bwog0TwuQBiQGnpeEZELLBshKaGpuZsYm4bQE2h8wIi//uUZPYIg5QKQzP+0KJBwShgd9oEDXAnCC/7ZED5g+JZ7uRIIxCwLEgWNB91EKb2saGu5qWXP4ulgVb/3f/MK+z1xvbWhNzf/T1L/3iEYPwCTmamjoRjjLIAcvmKamZlKpJjIYLqYEuJ+ERIYanNOT6IYQIAY0gKrCPJwsyLzkcClnMgaVK3MGbctV6uuP0bMf7Xz/j2p71C+t/7uu058v6l/e+UXfM+fbtBlwtL0A5ite0nS9O6ae70rK0fT260ZbjjaJLFAOYbzJg/TZwCvJwMVYKXgEUAKrSqBJZJaMehhA9wq6vZqTRzCbOWW5a7j3jFf7P9G9n6Lv//PVUwRQNVMLjiWTFLJL857QanNR/REjEmwswwAlljKOBDMVwyQzDAYz1Qk0kLFCAy1NUGdmJPVfGjmhseWc06IBhNBZU4P6LBrjR2Glw6mEy5xLVOe+cLAFAttbvXFzCGsgYkhi8IMa6m+JndKjIBKpkklBszwQs3+ro+ojo/tCwxBJkw//uUZPSMg5USQYP6QiBDAShhc9wCDmBJBi/0Zsj4A6O1zuwMAWQwmBGGxdwtMmFE4Cs4JiulDizWakFkHq6Bf07EV//f+v/8jYn20fzYBFTrJgSYGiY5oKdmHhHUhsG5A4Z2YPAmJdAXhiVnQBCcxmt4xyEM5CCetu55mPnO369oN3EFmWUqAYOunGrTs/S+oM5EPii1HdW6USzC3TKNPopNOvCWKOzLZGhD09SQCOm2jBsNDJKYDtGEDy1OTwZUAM9RiWSGSwWFelBkcSY9E0Gi9J832twsQfZQtdX6ew59dXRhL/Z791id/9vrMJ7EejHCInY3AUuyO2mUzTd/xpAwVcP/MEdkwywQyzA/UoMmEGs8lCHqICgJzwYTANrbdaLP7w4uvbQLk/i3D3K+aipWb/vdfteO6/moPt//+XDNdou5ptNG//V914bd40Ha/6sYe5oR8ml/PV4/fPtstjAw6Oq5gymFxzU4B+PndNMhi6BDCGkYIlQRUrCgExoE//uUZO8Ig18JwYP+2RA/wSiWdwI0C/wnDy/3JED+BCKl3mCAoEXve193Vy73MVz6pgs1n28UtR0f/pO/2/3pN/9kcgXzBMAagyrcrINMKYVTfMUlw1VYbEMU7AMTDlQ4M28NcwpR2CJXY0atFocUCgKau5/0lnCsM44w/BFa4v6vESPj+dfqLwk/uLedZHy/+Z05XiAbtCB/Ju3eIHP1JlHc93ccre8f88i22//zm9XM8prWtoAYJQQ5iNmPmaUt8bUYhhlcIdGNEEyYOvB8ENhS8jMEHI0VE1ht63je60SrVL5I6MGCmX3f3I30/ov/b/d9f6G/9CoAJKKqYOIGpmKWpn5lNipUatckqmeJlu5gkAXYYmS8fqiWZauOcXh0ZggcEYYAGdUpAco3BQfWUUHFtLIOPYFTVxfUgiTJVGEoVLXKY9MYTYL4aa6JHc5qF5XQAKUSL3LcWkx1RaiXs2gCKVpjC4JN/b8zRw+zR4E9MT6vMvxJMKSgFqHaeJBD//uUZPeMw44LQQP+2RJAgThxc90ADjQpCC/7ZEkJBSGF7mSAEmLZtQJqjqqN8beZrbSxvq3UOR+wj+OSvsT+r7vo0N7kbruuowQ0BzMauKcTO2x5EzSFA4MfKKNDDygX8wdY48pHsxbmUyhCoLEmDgCVRMLgIZLKr1OK3+r6vxBBY0BNawKGo42KMeLvQBBqSVb3BiksXENJgVccEzjqXq7hz4bQqlhN7SjHorWRoEyNAUaggDAhBoMN4qAybEZzXfKKOL+4NSSAMGxwFwTJdAi0C801Iy+fUHRiUB4daiMqAECiqP091Tada9/+593ur9RQZQS/b/9ReiWJYxxi8jPCxANwI1s7Vu+zLHq5M8UokxbQPzM/AtMDsbcMDlDAcAEAOicFgB2Xxfsyhc8vvf5koQWlqHMdqSXfNNILPPr04vpdajtTf0Gbza7v11He4U7Xx1YEGE+CNhjZB6MZH0bimVdJ75kKpeWYyKHBmEFgIZhQ4EaYBOFjkwLIYBgA//uUZPIMg0UJQrP90RBBYOiWc90ADbhPDk/0RQEXA+GF7uRIQFryUAKMAGAJ0w3HuUoaD6jS7VSKWEa6WC2PaswLjjVKkInnona0A2KvnVDReVFkEvQlTkI7E/vIlWKtrFzaI4sA/xtyyNMuPaTWbykkyvFJ4OUigYDJYRHwwwQBIMisEwTEhAcExncTlMPoBYjAAgE4MABzASAD1AIYF2AIQ6OCaGpQaEslkw8aWcXNzCkC0tebnkG7x+hNybjZrki8wVhSnolR1labUD1tQq4Yzdr5IOHXUkUujOKztT7lbgqtpsw6ghRug0refPr6RieNj7jY1Vo3RM7rNTyS6CDXnz72oQgf01dKHH1GKIaq0MRRRPsk130aqxaF0k7/////////9SDv/////////9SgAogAIpQoiaYa+XHbxr2xnzge2aviHymIZwWBxKS/4Y4uASGHNABxiUwP+YgYBPmDkBc5h3wBUYCyAgKxmBRAGKChWBNwMeeNmoIaaOMO//uURPEAAtcVw5V4QABo4ShBr4gAGgYE/hn1gALqL6AbPmAAOKwmtZ5K6yBjY52p0W7a9li0d+xXciaX4vmMcmSdJxUlHBCBAkayrC81zrskoVwst+gWQQfG0+AJA2G5gWdqyZrSpkrZoLohhzsac6TAkk1wnpkJVqdJtL3Z0vqBl761yyz9pY3//iE9//qElTItWak+9BgpMw2TADStCXI1jVQLNPvUUTB/hl4wqwAEMRmCbDCQATUxqEQaMIyA3jAmgDCKGA4gJ7MDACwGZdKhgHOPuo9HO4i53qIlHjYqIFkIpS2NFWVEIRWD4xZ4wc7kOdZhcimQ5bnJQUUWGXE3UxXY9CI5DiTi58iGMeQgiyJOqFc9iVKWejkjCkGucxXYgqdyWV2OawoxHe6ujIpF/////QQd//lRKaG0l51oAwGCansaYo0JiMJcGXWcWY1RCxg+gBmZ8J2YGYM5legekgQAOAJgYu1DjD70DNAdpq5QPXV1FCFVziFhrNmE//uUZHeABVVwQQZ8oACHqygwzwwADgApCl3xgAEEhGILuhAA0+VzB+ovIpBmWEMbDQvSOe9Feu5HEi/mlT4pwjBiJ7J+RnKnNselNJM2NxXxf5FLGpQ2N/4DNgwYPEwFR//x7//8usVVlMGCD2TGqjr8yGQFTMmxW7DM0SewwlsBXMCFCBzDBQPggCUjA4gHshAOTAWABUuoYAcALu6/tjIU4dM1h6hRsDBafecfM7Awavic2sMSOxQfLN203uBxxEVlGMJIAQteF1ElFZB2cvqbERwVysWZVIDAcDDLRtDfvpjf3iDudQTBwZgsdZmeIQkJ6C7oiwCsRi3a2RFDqiWmJRA+2tm6v1+LL7r/+jFF3ImWX////WptTBuQf4yMBKMNLPWpjHmoBM01AYlMRZAYjBQxB8wj0EkMmesNHyHMUB3MQgLL9ExpItQLIoJQPKAThAqkX6Qo82NogbH1aeXCY3Lkf7feGfOpy/lSI/2uZn6+TeTfMydvNvlpG7V8//uUZDOMg/dcQQv9GbJIYPhle7kSELUnAA/0Z0jyA6KlvvAAr6ZLmeh3zVUY/89c71bMQl0rhLawqDskAHiDAJBUMIMlwxD0XzK2TFPDo0NZBLMAlFMawGJM3+BCJQRRsUshRp4s+VxKI5Ao5Q89d7PsrTWX49WpVHpO/1L66v3qb39KTAhw8QyCliyMOod5zHOpq42JUSJME1DDjAdhU8wTUEiMqcIG3CMCyQAxgAAGTD4NnRmpudotWJ+tc4Al0iIq8q01JARhmhohn5itaRxS2emeS7i3pbdJUBZ/tPIzNDzhmTX64iniV+9OXZjrmVwmxkrg0tcshZBfD5fsGvB0EXL4udKM3TAe1VTZhwec/TnARqGsdTHEa+ZpFo4sQUEBQFqQUUU9aoXLiqyWmpGK3yTbvUyn9Po1d3/q+d1f9CEdNCEVACABg/wSqZFOYAmnMFuxmaLeeaFQP6GKBAepmd6JnwThiGY5xuIhgkQIcNhYAIw2B9mlHqCqYzML//uUZByIw70ZwSv9GUI6gOiCd5sQDslhBi/0RQkBBKGJvuAQwTnOg6cvhXOA485CGEqI8Pzqkbq//WsxpNn103+8l1e8jy8V27nu/0QC+GP+bHd33tTx9Dne+RRCd/ZlfvzhKsoVApMYG5N54ANGMxMmeo1eOgrsm6ACNpEGt3VDuBnC10W6aEE7NF6NPfrvr9WrfiDlKfq/dr/+pkymAfg95iaSB6ZtqR/GZoLSxlSZIiYRSCemHd5nDQiGBstmlIfGKAxEQUsuFiLl9Bh0VdAylYjugsHYZ9XRr3Td09yKkzIxEXd2Z22t3cjsf0Z3Vn/NlO/nIjR2Yuh3d5Xk+sy012d/Wr1I7oV2GaQodoZzzp9CQABj5UfMpGXPrmFHuGglGmdgmGBB0gpwAYomiDFLd42mHcKzzNjVXpOBJq2QnKo21019v9f+nq20e3sT3bfsSmWMEPBYjFfBYAwxM7lMp9RcTEgiQgwsECkME3nOPApMVorMXA0IhDGgtQ4g//uUZBYMw08Swgv9GUA5oOhxd5gSDmBVBC/0ZMkJBCFBvuAQwDn9mt0NpLKU+dI+qKBF5gTE4mYYp2qlS6s8lN59BtbIu0gdTaxguTcsRkbXHnn3libqnSJ8vaXm1I3sqinIhQDDE2ADY6YDSPGzw/aMjFcwshSbYAzTNEATHZVKRGI2VvToltVdikI/1eltVX/6aPR3+lW3196UAMAmBjDDqUagyBhC+M0UStDCLC90w1IGSMdH3PJBFMpnlNegYMSA2UtRMMMgJbwWJBjMSrY8IQRgj/PyQWTMkO4G3OsbMRLds++eu/Z94D7+R7//ll5D5J7W5zZZd9431T7Vs96df9vrJ/+jp/cBano+tCSd2bm55qG83OHOi8mZYFmBIykU2kPESwQB2et9froa8aOeu+YDOxnVZvYEv6Urfezeru03EpLt56GGVr/bie+7uidMIYIEz/zRzOBGtOSmes0YW0jD0EpMYBxOBhHMZAiHolO/RC1UwZfIrOrmzJWZ//uUZBeMwtIJwovdyRA0IOhxd5gSC4ApCC90ZMCyA6HFrvAAKrofPvgmxNSqjU1vs581qc5jgKOeKNyRS4YOlWPUfSyg1XZsZzPeRY5x6rBAoB5A2ZpZN5rTL5/EoGQyIAgKLaFRRC4Qk7ZhwDzkZrErjSv7af9Xp9X//0/7O/+6tqmgIYGgjZikW3mvJOydekJBtbKpmO2B2YhgYceBqYNKAZgBGgEUbZGSgJLyjMLYMEwifS+hqzHsb5cCISSsexts+tDWKRRwMK3LUIY4CvcIidjnPU5+1taEuRJUPUwCpz/DDDGSjTh9j4g2AVlAgkCLKo2nFFJHUlIN3oCDuyoUahLt3v3f/v/2UQAzPVRMTj/UIMilXw16yuTOxFcMI0Hwwo8AeKDbZNMLjDzyxCFzCm2aaFHVZJLRer1JT1r0sVWgnXPU6NheijN2JtXprV7f2XpAAACqjjaIIKqwgajdUU1+LP6rMCBJBw1JFpsLl9fNq0K3CPQ1NrNGv6+j//uUZDoIgkoHRLOe2BAygPjtb0sTCwAhCA9zBEDGA6GBzTCI/v/3ej//06zB/EuBsSBrHq+nb4WIbPgNJk3AmisAO1BkyLADToFLvq/Y0ETnqqxV7LgiXa8/tCiHRi3pVtbc+ZZWtaK7D6kdoik7VsIvc5lrbQhQqRFXSiULdVjErQ+1HA0GNDyk3OsS43tFDPYCEO4DzRwG3gvGdViR9LP/t+m44i1fQn//b/pySbf1+ohZ+xUCDIQET2s5DeGMROl0Ks1JRkzD1C5MTR42YFzF4cNZgAEBQaBzMy71UBhh4SMpME6C8NaGXLixuKOc6q8rrE78W3v7UGbaC232abr6G2SLjkX3fJ8ADAmYDZ5h/JHV0+YziZjYPClgSgtxU80hzlBOMtYvigcqh9w1Kv9urb6v/f//6PvWQBggB1mAMyCY8bHhweDBnzVpGmotGFqADRiGFJVg4+kryYT8kyZD+6YPOeJSLzYiF5jTnmNA8OyyEUR3XOYei19Gur0T//uUZGUM0p0Hwgu+4BAxQPhxc0YkCpQlCC93AoDPA+GBrhggCndwHSkl3k+Rd7HvYw/StCo73s3DUTyRoMsw4yEIyQ0MZbAuFqcKofhB5czH/3/mXzj3OkP3+r0U+309C9nt/0+pWpUAABmlmkxGBjnEnNx7DPM1qN77cy0KiU1JNjpdV0xVq8sd+tM9uTSsJLKizKbOvd93Tkv9EUF8w+XfpZt0RRZP/6SAHQAFlsCrQddF501uAnMKqQsVidI1QpesgCdIPYGS1qy8fJCpsiyh2v071/9P/0+//9KP9/vbcwDFQKccbfIgfoU+IZWMeBRAEoPT5gr4lQTicaXsuzCDhhtoeMNHLLCWePD2mQFRbYvYt+vS/bo/M/Yy5xtOUnswxNuv2aXuqK6pi01GXXQRhg79uMdEBk2KFYczOtLXdBubvtJJZym566mfS2x/93R7pH8Z+hj/v9Xf/1IABR++utSBp1sGibUfbwBpJ8g4rgm4jOS9HpRSf6MbZLSV//uUZIwI0g4HRMud4AA2gOhhc28SCTAfDC7vRADPg6GFzbxIODGTNBsWcHK1OSKdLrxju2pDdaAMbI3dHd0+ds9nLzz9LqOBgEGtZiV+dGKHJF48skrRXKSjcUxhkeswkUagZb7+91H5D1a/J/f+77P/fo8rstp3AQYHB+Yg3ia4cSezYSe9wxnchDsgH9gQ0ErrOoeyf8GDoOAUKBYqHWNE6TIOZJAo9RpJkeeoVUy1K0nlLKkMtyaBY43SZTaLgAXWRd9gk8pi76HN9S2JeExCk2DY9isF1lKyURH5GLwPB2ypmMeyxNGhXXT67P/Z7+//+/0b+ulHVckwFBM1OfEyMpo/b7g5eXUzgAEKnwLLhluCBUlAYzPONaGQWhoDkKskMREy1crSM5C9joxSc9FMlqyjOc0jJXdz+uRTBJbRc5nmfL8PXczvmZnqcJMGxasRltIRnWrEp8hT9OP4xkvmoBp9GuxtpQkv7tAxMc9oc9cfRA8UuYiiEbw+lLbx//uUZL8IwiYHRUuZYRAxYMhxbywgCrQdCC7zQgC1AuHFrCSARCLlzd239juliXd6f/Io2dWn7PX3tpq9CuMMGRAMZLKO7zcPSuPONzEMHQjIAMMiwAMARUGgfZrBT+sVlAwE9q9xFRmXoRFOTYWKG/1yVwyUaG5mqK46XXOmSKbamTnFzgcH5Ez2m89dEiTJu0Gbsg9cmO0qCIWLzsdbCPJqYIg5NIZyDJMzNqFKx6doyEaP7WmRkzAkGxAw6A1XM80c6a0eK41ML1ybS2AQ0EiAInnhFjKZ0MJfm0LRQLHNKilzx2bKPSNPoCTHmUmCO+6wjtstZvXIbG2K83UhdSAJGsYMcguJ2n9G9BAUGZH4fqROKz3hisnoagmomLcZzn2iBMkNEjqpBbEp1PjMXa8izrHpKlM0R6ll0bbKK5E+kY5SKQ5F0PVzYpZ+UbWwpoRvEQ7QTFk1P8jK8NmfNUThQHR8HTgdxqMAhkRnMQ0OGsC1kfZSiVVvB4PEjY88//uUZPCPw3lVwIO7GTIwILhxaykSD5WI/g6YbQkSA6EBrKxIgLWBTStLExV3ek+G3htzWs778oLrFP32121dG7aLa35NowVbYh6rkorCMrKgwFCqyZk2GlVpvyQgXKkEqiv4BgSIJB9QsRn1Vxkz240LMjL8kOLC5EpKZctJW39655chnkXJTbdTlJqfKcmEbM8jNU9pprpmslP03OK5eeicntgsabX1unCUvSZbntXS5ocM9VBhZEQw+RAqDrMiyg8Co5w9cOPCSkkWFUswMgJxZKhQohVljrENzaXyLSqDwqLiB2NfcslRlbmOAipx73GhemPFiyUUWqkRlLukbdwHIfse5yvloOhFJ2EKspvv7dKz+IBjMR+YLrtxKWI3ZUj/3TWWuofqrvtmsjLMrqbjvUZDrArov/so8lVvTOr6N4478eHTOwXisAHKrCtoNEXGdYFBkIONQOFqbHMbVKtg/mF4FHc3XL32r0RdC6ViBh/1Njpq2bUm/74w3X9N//uUZO4I81hZwAOZGTI+QKhAY1gADE1NBs3gYokgg2DBhgyAd7qcX3Alf+Fa8zD+ecU4FTc4NcF+9qX/Mippe9YC+f+lAAatfRaIRNOh1UEFgqXEpgyXRrXWjJc7AZLrPXZMY66pUqtVSAjVSUqpBhXrszUTD/qs1X/bX1h0mP2bUul9I/qxVjdJm/gYVRJFON6qf69WeXVIMKKHSjbEzWH/8Y1LNhWIqUEEQWBoAo6tqqTPSZxMDBSawCb2ZtYBUBbVSh1WagJawCL9Yx+ucY71Ywo1EjCrp1q+CuIoi/iIqd/U8NfbJEZUt/1hpUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZPIMYpcZwZMvGKJWY+gBYMMsTIFs8kwwZckRFB5UkY0yVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//uUZFGP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV" ; </script> </body> </html> diff --git a/artwork/boot-animation-source/render.py b/artwork/boot-animation-source/render.py index ee85ea06a5..66a32dbcd6 100644 --- a/artwork/boot-animation-source/render.py +++ b/artwork/boot-animation-source/render.py @@ -18,12 +18,12 @@ W = int(sys.argv[1]) if len(sys.argv) > 1 else 1280 H = int(sys.argv[2]) if len(sys.argv) > 2 else 720 FPS = int(sys.argv[3]) if len(sys.argv) > 3 else 30 OUT = sys.argv[4] if len(sys.argv) > 4 else f"droiddeck-boot-{W}x{H}.webm" -THEME = sys.argv[5] if len(sys.argv) > 5 else "light" # light | dark -ONLY = [int(x) for x in os.environ.get("FRAMES", "").split(",") if x] # debug: render some frames only +THEME = sys.argv[5] if len(sys.argv) > 5 else "light" +ONLY = [int(x) for x in os.environ.get("FRAMES", "").split(",") if x] html = Path(__file__).with_name("droiddeck-boot.html").resolve() tmp = Path(os.environ["FRAMEDIR"]) if os.environ.get("FRAMEDIR") else Path(tempfile.mkdtemp(prefix="ddframes_")) -tmp.mkdir(parents=True, exist_ok=True) # FRAMEDIR=... makes a long render resumable +tmp.mkdir(parents=True, exist_ok=True) t0 = time.time() with sync_playwright() as p: browser = p.chromium.launch() @@ -45,16 +45,16 @@ if ONLY: print("frames left in", tmp); sys.exit(0) COLOR = ["-colorspace", "bt709", "-color_primaries", "bt709", "-color_trc", "bt709", "-color_range", "tv"] -SOUND = Path(__file__).with_name("droiddeck-boot-sound.wav") # made by sound.py; muxed in if present +SOUND = Path(__file__).with_name("droiddeck-boot-sound.wav") cmd = ["ffmpeg", "-y", "-loglevel", "error", "-framerate", str(FPS), "-i", str(tmp / "f%05d.png")] if SOUND.exists(): cmd += ["-i", str(SOUND), "-map", "0:v", "-map", "1:a"] cmd += ["-c:a", "aac", "-b:a", "192k"] if OUT.lower().endswith(".mp4") else ["-c:a", "libopus", "-b:a", "160k"] cmd += ["-vf", "scale=out_color_matrix=bt709:out_range=tv:flags=accurate_rnd+full_chroma_int,format=yuv420p"] -if OUT.lower().endswith(".mp4"): # H.264 for sharing, previews and anything that won't play webm +if OUT.lower().endswith(".mp4"): cmd += ["-c:v", "libx264", "-preset", "slow", "-crf", "15", "-profile:v", "high", "-tune", "animation", "-g", str(FPS * 2), "-movflags", "+faststart"] -else: # VP8 keeps software decoding inexpensive during Steam startup +else: cmd += ["-c:v", "libvpx", "-b:v", "2M", "-crf", "10", "-deadline", "good", "-cpu-used", "2", "-g", str(FPS * 2)] cmd += COLOR + ([] if SOUND.exists() else ["-an"]) + [OUT] diff --git a/artwork/boot-animation-source/sound.py b/artwork/boot-animation-source/sound.py index f0f7eb1b83..6919dfbc9d 100644 --- a/artwork/boot-animation-source/sound.py +++ b/artwork/boot-animation-source/sound.py @@ -22,15 +22,13 @@ FPS = 60 ev = json.load(open(sys.argv[1] if len(sys.argv) > 1 else 'events.json')) OUT = sys.argv[2] if len(sys.argv) > 2 else 'droiddeck-boot-sound.wav' FRAMES = round(ev['DUR'] * FPS) + 1 -N = int(np.ceil(FRAMES / FPS * SR)) # exactly the video length +N = int(np.ceil(FRAMES / FPS * SR)) rng = np.random.default_rng(20260925) -# note frequencies def hz(n): return 440.0 * 2 ** ((n - 69) / 12) D2 = 440.0 * 2 ** ((38 - 69) / 12) D3, A3, D4, E4, Fs4, A4, B4, Cs5, D5, E5, Fs5, A5, D6 = [hz(n) for n in (50, 57, 62, 64, 66, 69, 71, 73, 74, 76, 78, 81, 86)] -# ------------------------------------------------------------------ building blocks def tt(dur): return np.arange(int(dur * SR)) / SR def edge(x, a_ms=1.0, r_ms=4.0): @@ -70,7 +68,6 @@ def put(t0, st, gain=1.0): if i >= N: return j = min(N, i + st.shape[1]); MIX[:, i:j] += gain * st[:, :j - i] -# ------------------------------------------------------------------ instruments def wood(amp, f0=520, size=1.0, thump=0.0, dur=.35): """Hard wood / toy-block clack. thump adds body for heavy landings.""" r = [1, 1.93, 2.81, 4.13, 5.62] @@ -142,24 +139,19 @@ def bell(f, amp, dur=1.6): y = np.sin(2 * np.pi * f * t + 1.1 * np.exp(-t / .3) * np.sin(2 * np.pi * 3.5 * f * t)) * np.exp(-t / .7) return edge(y * amp, a_ms=2, r_ms=40) -# ------------------------------------------------------------------ tracks from the engine tr = {k: np.array(v) for k, v in ev['tr'].items()} TT = tr['t']; dT = TT[1] - TT[0] def at(name, t): return np.interp(t, TT, tr[name]) def speed(xk, yk): return np.hypot(np.gradient(tr[xk], dT), np.gradient(tr[yk], dT)) -X2PAN = 1 / 330 # world units to stereo pan +X2PAN = 1 / 330 drops = ev['drops']; T_L = ev['T_L']; LOCK = ev['LOCK']; HOP = ev['HOP'] events_log = [] def log(t, what): events_log.append((round(t, 3), what)) -# ------------------------------------------------------------------ cue sheet -# Kept deliberately sparse: one sound per story beat, with silence between them. tsamp = np.arange(N) / SR -# 1. the stack: each piece lands on a muted note of the final chord (D, A, A-echo, F#); -# the lock then plays them all together ai = drops['archDrop']['impacts'] put(ai[0]['t'], pan(tock(D3, .40, decay=.5, sub=.8), .1)); log(ai[0]['t'], 'legs land: D') @@ -171,21 +163,18 @@ for k, imp in enumerate(bi[:2]): di = drops['domeDrop']['impacts'] put(di[0]['t'], pan(tock(Fs4, .28, decay=.45, sub=.45), -.05)); log(di[0]['t'], 'bowl lands: F#') -# 2-3. the balancing act and the jump play in silence: the stack and the lock carry it -# 4. lock: one snap, then a four-note chord that rings out put(LOCK, pan(tock(D3, .24, decay=.28, sub=.8), 0)); log(LOCK, 'lock: soft landing in the stack voice') for f, a, p, off in ((D3, .24, -.1, 0), (A3, .28, .2, .02), (D4, .30, -.2, .04), (Fs4, .26, .15, .06)): put(LOCK + .018 + off, pan(epiano(f, a, decay=1.3 if f < 300 else 1.1), p)) log(LOCK + .018, 'D chord') -# ------------------------------------------------------------------ room, master def room_ir(dur=1.1, rt60=.75): t = tt(dur); tau = rt60 / 6.9; irs = [] for ch in range(2): n = rng.standard_normal(len(t)) ir = lp(n, 7000) * np.exp(-t / (tau * .6)) * .5 + lp(n, 2200) * np.exp(-t / tau) - ir[:int(.011 * SR)] = 0 # pre-delay + ir[:int(.011 * SR)] = 0 for d_ms, g in ((13, .5), (19, .35), (27, .3), (38, .2)): ir[int((d_ms + ch * 1.3) * SR / 1000)] += g irs.append(ir / np.sqrt(np.sum(ir ** 2))) @@ -196,13 +185,12 @@ out = MIX + .14 * wet out = hp(out, 28) fade = np.ones(N); nf = int(.45 * SR); fade[-nf:] = np.cos(np.linspace(0, np.pi / 2, nf)) ** 2 out *= fade -# gentle peak control: soft-knee compress only the loudest transients, then normalise pk = np.max(np.abs(out)); x = out / pk knee = .5; ax = np.abs(x); over = ax > knee x[over] = np.sign(x[over]) * (knee + (1 - knee) * np.tanh((ax[over] - knee) / (1 - knee))) L0, L1 = int((LOCK + .06) * SR), int((LOCK + .76) * SR) body_rms = np.sqrt(np.mean(x[:, L0:L1].mean(0) ** 2)) -out = x * (10 ** (-14.9 / 20) / body_rms) # chord body held at the level the team liked (-14.9 dB RMS) +out = x * (10 ** (-14.9 / 20) / body_rms) assert np.max(np.abs(out)) < 10 ** (-1 / 20), 'would clip' import wave diff --git a/docs/agent-control.md b/docs/agent-control.md index 62ad534ada..3407d77bab 100644 --- a/docs/agent-control.md +++ b/docs/agent-control.md @@ -12,6 +12,8 @@ and reports every run. answers each command with JSON. It and the session-start Activity (`AgentStartActivity`) are in every build and require `android.permission.DUMP`, held by the ADB shell and privileged or explicitly granted callers. The provider checks the calling permission before decoding requests. + A build shipped under another package (`tools/release/variants.txt`) answers at + `content://<package>.agent`: set `DROIDDECK_PACKAGE` to that package for `droiddeckctl`. - **The guest agent** `droiddeck-agent` runs inside every session (started by `droiddeck-session`). It runs commands with the session's own environment, publishes gamescope's focus, and talks to the Steam client's DevTools, which only accepts guest processes. The app and @@ -23,15 +25,15 @@ and reports every run. ## Access Player controls and observations work over authorized ADB on any build: `state`, `start`, `stop`, -`resume`, `wait`, `launch`, `quit`, `focus`, `input`, `ui`, `logs`, `screenshot`, `record`, `displays`, -`wake`, and `access`. +`resume`, `wait`, `launch`, `quit`, `focus`, `input`, `ui`, `logs`, `screenshot`, `record`, `pacing`, +`displays`, `wake`, `glasses` (except `glasses raw`), and `access`. -**Setup > Session > Debugging tools** is off by default in every build, including debug builds. -It enables `run`, `guest`, `cdp`, all `env` operations, `override`, and `prefs`. The toggle switches -directly without a confirmation dialog. The bridge refuses to change it through `ui` or preference -writes. The existing preference key, `setting-agent-commands` test tag, JSON command names, and -`AGENT_COMMANDS_DISABLED` error code are unchanged. Refusals exit 7; `droiddeckctl access` reports -whether commands are enabled. +**Setup > Diagnostics > Debugging tools** is off by default in every build, including debug builds. +It enables `run`, `guest`, `cdp`, all `env` operations, `override`, `prefs`, and `glasses raw`. The +toggle switches directly without a confirmation dialog. The bridge refuses to change it through `ui` +or preference writes. The existing preference key, `setting-agent-commands` test tag, JSON command +names, and `AGENT_COMMANDS_DISABLED` error code are unchanged. Refusals exit 7; `droiddeckctl access` +reports whether commands are enabled. Disabling the toggle clears queued and persistent agent environment settings and installed binary overrides. Disabled settings cannot apply at the next session start. Already running commands and @@ -75,53 +77,87 @@ artifact or file error, 7 debugging tools disabled. ## Commands ```sh -tools/droiddeckctl state # schema 2, below -tools/droiddeckctl start steam --wait # --ui desktop, --url steam://..., --timeout -tools/droiddeckctl start steam --wait --reuse # keep a Steam session that is already up +tools/droiddeckctl state +tools/droiddeckctl start steam --wait +tools/droiddeckctl start steam --wait --reuse +tools/droiddeckctl start steam --steamvr --wait tools/droiddeckctl start desktop tools/droiddeckctl run /usr/bin/foo -- arg1 arg2 -tools/droiddeckctl wait ready|idle|failed # --timeout (default 90 s) +tools/droiddeckctl wait ready|idle|failed tools/droiddeckctl stop tools/droiddeckctl resume -tools/droiddeckctl launch 489830 --wait # Steam game by app id; --wait = until it has focus -tools/droiddeckctl wait focused 489830 # gamescope focuses it AND Steam lists it focusable -tools/droiddeckctl wait game # any app but the Steam client (769) has focus -tools/droiddeckctl quit 489830 # Steam's TerminateApp, then SIGTERM/SIGKILL -tools/droiddeckctl focus # focus properties and every Xwayland server's windows +tools/droiddeckctl launch 489830 --wait +tools/droiddeckctl wait focused 489830 +tools/droiddeckctl wait game +tools/droiddeckctl quit 489830 +tools/droiddeckctl focus -tools/droiddeckctl input key ENTER # names (ESC, F1, UP, A...) or evdev codes; --mod CTRL -tools/droiddeckctl input text 'hello world' # as US-layout keys; --commit for text-input -tools/droiddeckctl input tap 640 360 # session output pixels; --space fraction for 0..1 +tools/droiddeckctl input key ENTER +tools/droiddeckctl input text 'hello world' +tools/droiddeckctl input tap 640 360 tools/droiddeckctl input swipe 100 600 100 100 --duration 400 -tools/droiddeckctl input pad a # a b x y lb rb start select guide qam up down left right +tools/droiddeckctl input pad a tools/droiddeckctl input stick left 0 -1 --hold 500 tools/droiddeckctl input trigger right 1.0 -tools/droiddeckctl ui dump # tagged, labelled and clickable nodes; --all for every node -tools/droiddeckctl ui click rail-steam # by test tag -tools/droiddeckctl ui click --match "Play" # by text or description; --index for the nth match +tools/droiddeckctl ui dump +tools/droiddeckctl ui click rail-steam +tools/droiddeckctl ui click --match "Play" tools/droiddeckctl ui set-text some-field --text abc -tools/droiddeckctl guest -- xprop -root GAMESCOPE_FOCUSED_APP # --timeout --env K=V --cwd --stdin --check +tools/droiddeckctl guest -- xprop -root GAMESCOPE_FOCUSED_APP tools/droiddeckctl cdp targets -tools/droiddeckctl cdp eval 'SteamClient.Apps.GetMyRunningApps?.()' # --target, --no-await -tools/droiddeckctl env set DXVK_HUD=fps # next session only; --persistent until cleared +tools/droiddeckctl cdp eval 'SteamClient.Apps.GetMyRunningApps?.()' +tools/droiddeckctl env set DXVK_HUD=fps tools/droiddeckctl env list tools/droiddeckctl env clear [next|persistent|all] -tools/droiddeckctl override gamescope ./gamescope # first on the next session's PATH, removed after it +tools/droiddeckctl override gamescope ./gamescope tools/droiddeckctl prefs get session -tools/droiddeckctl prefs set session some_key true --type bool # returns the previous value +tools/droiddeckctl prefs set session some_key true --type bool tools/droiddeckctl logs latest ./session-artifacts tools/droiddeckctl screenshot ./screen.png --display 4 +tools/droiddeckctl xr-frame ./xr-capture tools/droiddeckctl record ./clip.mp4 --seconds 8 --display 0 -tools/droiddeckctl displays # logical ids, names, sizes, capture ids -tools/droiddeckctl wake # wake the screen, dismiss the keyguard +tools/droiddeckctl pacing --seconds 30 +tools/droiddeckctl displays +tools/droiddeckctl wake + +tools/droiddeckctl glasses status +tools/droiddeckctl glasses set refreshHz 120 +tools/droiddeckctl glasses set 3d on +tools/droiddeckctl glasses simulate --seconds 6 --yaw 15 +tools/droiddeckctl glasses stop-simulate +tools/droiddeckctl glasses mode 0x34 +tools/droiddeckctl glasses raw 0x0007 ``` +Glasses status reports `deviceMode` from the MCU separately from `sbs`, which +requires a physical stereo display mode. `switching3d` marks the bounded +confirmation window. A successful mode-command reply alone does not confirm 3D. +`badFrames` counts reports and IMU packets dropped for a bad checksum. + +`xr-frame` captures both app eye textures while SteamVR is open, saving `left.png`, +`right.png` and `capture.json` with the matching source frame, projection poses, +FOV and dimensions. It works over wired or wireless authorized ADB. +Newer builds also include `source.png`, the incoming stereo texture before the +Android eye draw, and sRGB attachment/write state in the metadata for color debugging. +Source PNGs use the incoming frame's color space and eye PNGs use sRGB. Transfers use Android's +gzip utility to avoid sending full uncompressed images over wireless ADB. +A unique request ID prevents stale images from passing as a fresh capture; no valid XR +layer produces an explicit error. Captures exclude Meta system overlays and +the headset compositor's final reprojection. GPU readback runs only on request +and can briefly affect frame timing. Remote files are overwritten each time. + A sleeping device suspends the session and hides the app's windows from `ui dump`; `wake` first. +`pacing` reads SurfaceFlinger's timestats for the game's layer (the session's SurfaceView when the +compositor has no layer of its own) and reports the frames that reached the panel, `fpsOnScreen`, +the present-to-present histogram and the share of intervals off the usual cadence. A game's own fps +counter counts frames handed over, not frames shown, so it can read 60 while one frame in four +stays on screen for two refreshes. + `input` needs a session that has drawn its first frame. Pad input goes through the session screen's virtual pad, the same one the on-screen controls drive, so games that ignore touch still respond. `launch`, `quit` and `cdp` need a Steam session; `focus` and `wait focused` need gamescope (every @@ -132,7 +168,7 @@ mode except the desktop). `state` returns `schema`, `build`, `appVersion`, `runtime {installed, version}`, `agent {guest, guestFocus, commands}` and `session`: -- `id`, `phase`, `running`, `mode`, `program`, `steamUi`, `steamUrl`, `suspended`, `pip`, +- `id`, `phase`, `running`, `mode`, `program`, `steamUi`, `steamUrl`, `steamVr`, `suspended`, `pip`, `firstFrame`, `output` [w, h], `refreshHz`, `lastTransitionAt`, `guestPid`, `installing` - `logDir`, `eventsFile`, `artifactsAvailable`, `artifactsComplete`, `failure {code, message, status}` - `focus`: gamescope's focus as the guest agent last published it, or null: @@ -149,6 +185,145 @@ there stays behind the client's loading screen however healthy its window looks server's windows with map state, override-redirect, app id, `WM_STATE`, pid, class, opacity and `_NET_WM_STATE`. +## Hand tracking diagnostics + +With debugging tools enabled, the glasses provider accepts `spatial-hand-options` with optional +boolean `lite`, `halfRate`, `parallel`, `adaptive`, and `scheduled` fields. These are temporary +tracking-session controls and do not change the CPU/GPU delegate. `parallel` selects concurrent +camera inference on CPU; GPU remains serial on its owning thread. `scheduled` enables persistent +one-hand and two-hand detector banks on CPU, using the one-hand bank after stable agreement +and periodically searching for another hand. GPU retains ordinary two-hand inference. +`adaptive` lets CPU input rise from 500 permille to 600 or 800 only after sustained processing +and observation-age headroom. Slow processing lowers the rate, and tracking loss resets it. +Explicit `halfRate` selects manual input and disables adaptation; if both fields are supplied, +`adaptive` is applied afterward. This allows restoring the manual preference and automatic mode +in one request. CPU, full model, parallel inference, scheduled discovery, and automatic input +starting at 500 permille are the defaults. + +`handModel`, `handCpuParallel`, `handAdaptiveInput`, and `handScheduledTracking` identify the live +selection. `handInputRatePermille` reports the current requested frame fraction, while +`cameraCopyPermille` records the fraction used for the latest reported camera processing sample. +At a 25 Hz source, 500/600/800 correspond to input limits of about 12.5/15/20 Hz, not completed +tracking throughput. Calibration and explicit capture use 1000. `cameraFrameDivisor` remains +2 for 500, 1 for 1000, and 0 for intermediate fractions; use `cameraCopyPermille` for rate calculations. +`cameraHz` still describes the source cameras; `rateLimitedFrames` counts deliberate skips and +`dropped` counts eligible pairs replaced while processing is busy. These controls do not change +the glasses' sensor rate or native head tracking. + +`spatial-hand-capture`, with debugging tools enabled, requests one local stereo pair in +`files/spatial/captures`. Use only for an explicitly requested diagnostic capture; it includes +the wearer's surroundings. It does not upload images. + +`spatial-rgb-capture` requests one local JPEG from the Luma Ultra's separate UVC RGB camera. +It requires Android camera permission, USB permission for that camera, and debugging tools. +If USB permission is requested, approve it and explicitly repeat the capture request; permission +approval alone does not save an image. Poll `spatial-rgb-status` for completion and the local +`files/spatial/rgb-captures` path. The isolated worker stops the stream after the requested +diagnostic window or a timeout, then exits. The default `transport: "sdk"` uses the vendor's +fixed 1920×1080/30-fps stream. With the optional UVC build present, `transport: "uvc"` selects +the independent eight-buffer transport; `width`, `height`, `fps`, and `durationMs` default to +640, 480, 30, and 5000. Duration is bounded to 1000–30000 ms and camera modes must be supported +by the device. This remains a manual debugging command, not a source of live controller positions. +Both paths save `usb.log` and `usb-descriptors.bin`, including when acquisition fails. +Direct UVC reports `snapshotAcquired` separately from `streamHealthy`. Health requires the +full requested observation window, at least 80% of requested FPS, and no frame gap exceeding +the larger of 250 ms or three frame periods. `observedFps`, `maxFrameGapMs`, and +`tailFrameAgeMs` include silence at the end of the window. Status remains busy with +`phase: "finishing"` until the capture worker exits, so a new request cannot race its teardown. +`receiptNs` is the host callback time, not camera exposure time; the SDK timestamp can be zero. +This diagnostic does not supply controller positions or replace the stereo tracking stream. + +`spatial-hand-benchmark` takes a numeric `capture` directory name from the app's existing +`files/spatial/captures` folder. It replays that saved stereo pair on CPU with full-model two-hand +inference, scheduled full, scheduled lite, then full-model two-hand inference again, all with +concurrent cameras. It clears live hand input during the comparison and never captures new images. +Poll `glasses.spatial.handBenchmark` for completion, timing, and geometric results. Every replay +row reports `parallel` and `scheduled`. `wristOnly` identifies the selected controller mode: bare-hand +replay estimates `hands`, while Joy-Con replay estimates `joyCons` from wrist 0. Both report +`wrists` after stereo geometry checks. Image preprocessing is raw grayscale replicated into RGB; +lens correction applies once to landmark coordinates before triangulation. `wrists` reports landmark 0 after the existing stereo depth +and reprojection checks, with the same unambiguous handedness pairing. Live Joy-Con tracking +also uses wrist 0 directly, with motion and freshness checks; its `positionEstimator` is +`joycon-wrist`. Samples identify the selected bank as `inferenceHandLimit` +(1 or 2). Timings exclude model construction. Saved-pair results are not live accuracy, +second-hand discovery delay, game performance, or motion-to-display latency measurements. + +The live baseline is Full palm + Full landmarks. `handImagePreprocessing` is `raw-grayscale-rgb`; +`handLensCorrection` reports `pinhole-points-only`, `fisheye-points-only`, or `none`. +`steadyHandAim` is true only when bare hands and the optional shoulder-based aim setting are active. + +`handTracking` includes `leftRawHands`/`rightRawHands` before handedness-confidence filtering, +`previousLeftRawHands`/`previousRightRawHands` from the previous inference on those detectors +(-1 after detector creation), and `leftInferenceMs`/`rightInferenceMs`. Existing +`leftCameraHands`/`rightCameraHands` count confident handedness results. Compare camera timing +against its previous raw count: the stock two-hand graph may repeat palm search when fewer +than two hand regions were tracked. `inferenceHandLimit` identifies the bank that produced these +counts; previous counts belong to that same persistent bank, not necessarily the preceding camera +frame. These counts approximate graph conditions; they do not directly expose internal graph +execution. Replay samples also include raw counts and camera timings. Accepted palms still +require stereo depth, while pinch and grip validity now use agreement between image-space +finger estimates from both cameras. Palm acceptance alone does not establish valid gesture input. + +`handTracking.experimental` is always true. `observationTimeNs` identifies the processed camera +observation; `observationAgeMs` is its age when diagnostics were published. Per-side `left` and +`right` records expose `outcome`, `reconstructedPalmLandmarks`, raw trigger/grip estimates, +geometry validity, and final input validity. `observations` contains connection-lifetime +`processedPairs`, `inferencePairs`, and independent left/right acceptance, rejection-cause, +tracking-loss, and gesture-loss counters. Each processed camera sequence is counted once; +repeated status polling does not inflate these counters. Setup/off/clock/head failures count +as processed pairs but not completed inference pairs. Skipped callbacks are not fabricated as +observations. Sample deltas over a controlled hand-visible interval and inspect rejection +causes before changing thresholds; these counters do not prove external latency or accuracy. + +`spatial.calibrationSource` is `device`, `luma-ultra-base`, or `none`. +`calibrationVerified` indicates an individual distance-validated profile; `calibrated` indicates +geometry is available for experimental tracking, including the bundled model base. A shared base +does not claim validation on every Luma Ultra. Matching local profiles take precedence. + +`glasses set joyConTracking true` enables experimental Luma stereo-assisted Joy-Cons after +positional tracking is enabled. It defaults off, excludes bare-hand controllers, and appears in +both saved settings and spatial diagnostics. Driver logs identify each hand's transition between +`stereo hand` and `6DoF arm estimate`; camera positions are hand proxies, while Joy-Con sensors and +buttons supply orientation and input. + +The shared-memory channel is protocol **4**, still 176 bytes. Snapshot flag bit 2 selects Luma +Joy-Con tracking; bit 1 selects bare-hand controllers. Its word at byte offset 36 is +`input_epochs`: four unsigned bytes in left-trigger, left-grip, right-trigger, right-grip order. +Each byte increments modulo 256 when that gesture becomes ineligible. Inspect these counters +when a loss may have happened between two reader samples: a later valid pose does not erase +the intervening loss. Versions 1 through 3 are rejected, so a decoder, app, and driver must agree +on version 4. Hand observation age remains limited to 200 ms, head age to 100 ms. For bare-hand +controllers, a gap beyond +200 ms from the driver's last accepted observation releases input state even when the next +read contains a fresh replacement. Duplicate observations cannot rearm an input; recovery +requires a newer valid released gesture before a subsequent press. + +Driver lines containing `left optical input` or `right optical input` report state changes, +changed connection/origin/loss counters, and changed input API errors, rather than every frame. +`pose` is the displayed pose's validity and can remain true during its short held-pose window; +`input` is the current observation's eligibility for input processing. Read `flags` for independent +gesture validity. `raw` contains trigger strength/grip state; `out` contains submitted trigger +strength/click/grip; `armed` and `epochs` are trigger/grip pairs. `error` is ordered **grip, trigger +click, trigger scalar**, using OpenVR's `EVRInputError` codes (0 means `VRInputError_None`). +The line also includes `ageMs`, `connection`, and `origin`. `controller inputs cleared: error=...` +records neutralization on mode changes, disconnect, or deactivation; a nonzero value is the last +failed component update in that clearing pass. + +The driver publishes these input updates before the controller pose, including invalid poses, +and clears components before deactivation. A zero API error establishes successful submission, +not delivery of a dashboard mouse-up event. The installed Vive compositor binding maps trigger +to dashboard `LeftClick` (0.65 activation, 0.60 release) and grip to `Back`. Its grab-handle +JavaScript attaches to the initiating hand on mouse-down and clears that attachment on mouse-up; +that component has no tracking-invalid cleanup. A stuck dashboard drag therefore needs the +driver submission and actual dashboard behavior checked separately. Do not synthesize a press +or a valid pose as a recovery shortcut. + +Controller display smoothing is independent of these gesture logs: there is no stationary +dead zone. Poses converge with one 15 ms correction and bounded receipt-relative translation +prediction (80 ms / 2 cm). A missed observation holds the last pose for up to 350 ms from capture; +input freshness remains limited to 200 ms, and a detected miss releases inputs immediately. +Neither stabilization nor prediction refreshes camera timestamps or creates gesture input. + ## Events Each session writes `events.jsonl` beside its other artifacts: the lifecycle (`session.created`, @@ -167,7 +342,7 @@ Automator show them: | `play-steam` | Play on the Steam and Games pages | | `setting-<key>` | every toggle and choice row, by its key (`setting-logs`, `setting-agent-commands`, ...) | | `tab-<n>` | a page's tab strip (Setup's Overview, Controller, Session, Launcher...), by position | -| `drawer-tab-controller`, `-second_screen`, `-display`, `-effects`, `-games`, `-session` | the session drawer's pages | +| `drawer-tab-controller`, `-second_screen`, `-display`, `-effects`, `-vr`, `-games`, `-session` | the session drawer's pages | | `drawer-stop`, `drawer-stop-confirm`, `drawer-stop-cancel` | stopping a session from the drawer | ## Scenarios diff --git a/docs/cardboard-vr.md b/docs/cardboard-vr.md new file mode 100644 index 0000000000..9f53acf980 --- /dev/null +++ b/docs/cardboard-vr.md @@ -0,0 +1,532 @@ +# Cardboard VR (experimental) + +Cardboard mode turns the session screen into a phone VR viewer (Google Cardboard and similar): the +panel is split into a left and a right eye, each drawn through a barrel distortion that the viewer's +lenses undo. Two sources can feed it: + +- **Virtual screen** (any game, Steam, the desktop): the session hangs as a flat screen in front of + you, with real stereo depth from the eye distance. With head tracking on, the phone's rotation + sensor keeps the screen fixed in the room while your head turns (3DoF). +- **Side-by-side 3D**: the frame already holds a left and a right image. This is what SteamVR draws + here (below), and what SBS 3D video or a stereo shader like SuperDepth3D produces. Only the lens is + added. + +The settings live in the session drawer, **Display > Cardboard VR**: mode, picture, viewer (lens +profile), eye distance, screen size and distance, head tracking and recenter, and SteamVR. Everything +applies live. `tools/droiddeckctl prefs set session cardboard '{"enabled":true,...}'` drives the same +settings (`gpu/Cardboard.kt` has the keys). + +## How the picture is made + +``` +game / Steam -> gamescope -> DroidDeck compositor -> effects -> frame generation + -> Cardboard pass (cardboard.frag) -> 1:1 blit -> panel +``` + +`app/src/main/cpp/waylandcomp/src/cardboard.c` is the last stage of the compositor pass. It forces the +copy path (no zero-copy layer: the pass draws the whole panel) and renders `cardboard.frag` into a +panel-sized target: + +- each output pixel picks its eye, finds its offset from that eye's lens centre in tangent space, and + applies the viewer's distortion polynomial `r(1 + k1 r² + k2 r⁴)` (sampling outwards draws the image + barrel-shaped; the lens pincushions it back), optionally per colour channel for chromatic + aberration; +- **virtual screen**: the ray from the eye (offset by half the IPD), rotated by the head pose, + meets a plane `screenDistance` away; outside it is a dark backdrop; +- **side-by-side**: the eye samples its own half of the frame over the same field of view. + +The lens centres sit inset towards the nose so they line up with the viewer's lenses on the panel +actually used (the panel's physical size from DisplayMetrics). The field of view is the panel's height +seen from the lens's focal distance (`Cardboard.fovDeg`). Viewer profiles are in `Cardboard.Viewer`. + +Head tracking (`gpu/HeadTracker.kt`) reads the game rotation vector (gyro and accelerometer, no compass) +on a thread of its own and hands a row-major head-to-world matrix straight to native code. Recenter +resets the heading only, so the horizon stays level. When the view is more than 60° from level (lying +back, or the device flat on a table) it takes the whole orientation as straight ahead. A new pose +redraws even a static scene (`vkp_cardboard_pose_changed` on the vsync tick). + +The pose is also published to the guest: a 128-byte seqlocked file, `headpose_shm.h`, at +`/run/droiddeck/droiddeck-headpose`. It carries the rotation, the IPD, and the frustum the side-by-side +pass expects of a source (`tan_half_fov`, `eye_aspect`, eye size), so a renderer in the guest can match +the lens exactly. + +## SteamVR + +Valve's ARM64 SteamVR, the build the Steam Frame runs, comes from Valve's public SteamOS package +server (`deckard-steamvr`, pinned by version and SHA-256 in `droiddeck-steamvr`; the same hash +[steam-frame-nixos](https://github.com/y0usaf/steam-frame-nixos) pins). `droiddeck-steamvr install` +unpacks it to `/opt/steamvr`. The drawer's **Install** button runs that (571 MB). **Start** then +switches the picture to side-by-side and runs SteamVR with three DroidDeck pieces (`tools/vr`): + +1. **`driver_droiddeck.so`**, an OpenVR driver with one HMD: + - pose: the shared head pose file (3DoF, standing height); + - projection: exactly the frustum the Cardboard pass samples, with identity distortion (the app does + the lens). A new frustum mid-run (the glasses' SteamVR field of view) goes out with + `SetDisplayProjectionRaw` and `VREvent_LensDistortionChanged`; + - a proximity sensor that reads "worn" while Cardboard mode is on. Without it SteamVR takes a still + headset (a phone on a table) for an unused one, enters standby after a few seconds, and the + compositor stops submitting frames; + - frames: `IVRDriverDirectModeComponent` with a free-running 60 Hz vsync announcer, as ALVR does on + Linux. SteamVR renders each eye into textures the driver allocates through its IPC resource + manager (dmabufs); + - `presenter.cpp` imports those eye textures into a Vulkan device of its own and blits them side + by side into a fullscreen window on DroidDeck's own compositor (`wayland-0`, the app_id + `droiddeck-cardboard-vr` keeps it above gamescope's window), sized to the Cardboard panel so + nothing scales it down. SteamVR hands the textures over with no fence the driver can wait on, so + the presenter gives the compositor's GPU work a few milliseconds first, as ALVR does. + `DROIDDECK_VR_PRESENT=x11` uses the older path instead: an X11 window on gamescope's Xwayland marked + `STEAM_OVERLAY` (the external overlay slot is mangoapp's), at the session's resolution; +2. **`VK_LAYER_DROIDDECK_vr`**, a Vulkan layer, enabled explicitly in SteamVR's processes and implicit + for the rest of the session (Steam's own web helper shares its in-VR overlay with SteamVR too, and + crashes without it until Steam quits). Implicitly it does nothing in an ordinary session: + - the display stand-in below happens only while SteamVR runs (`droiddeck-steamvr`'s `active` + marker, which a new session clears) or where the layer is enabled by name. Gamescope and games + asking for display extensions outside SteamVR get them untouched; + - the semaphore bridge runs in those same processes, and in Steam's web helper once SteamVR is + installed; + - with SteamVR not installed, every process gets the driver's functions unchanged. + + What it does in SteamVR's processes: + - `vrcompositor` always asks for `VK_KHR_display` and keeps a direct-mode window even with a + driver-direct HMD. Turnip on KGSL refuses to enumerate any GPU when `VK_KHR_display` is enabled + ("I can't KHR_display"). The layer takes the display extensions off the instance and stands in + for one display with one mode and one plane, whose surface is a headless one + (`VK_EXT_headless_surface`, sized from the mode because headless reports none). The vblank side + of `VK_EXT_display_control` is a 60 Hz clock; + - SteamVR shares a timeline semaphore with every shared image, exported as an opaque fd, which + Turnip/KGSL cannot export. The layer creates it unshared and hands out a memfd holding a 64-bit + counter instead. Every process with the semaphore keeps a real local one, and a poller thread + carries values both ways (reached locally: up into the counter; seen in the counter: signalled + locally from the host), so GPU waits work as written, a poll period late. An imported binary + semaphore cannot be bridged that way, and its import is refused. With the semaphores dropped + outright (the first version) the dashboard showed torn, half-drawn tiles; + - Turnip on KGSL does not defer a submit that waits on a timeline value nobody has signalled yet: + `vkQueueSubmit` blocks until it is. SteamVR's client waits on a compositor value that the + compositor signals only after the client has submitted and said so, which deadlocked every app + before its first frame (`helloxr`'s swapchain acquire, DXVK's submit thread in a Proton game). + A submit's wait on an imported shared value that is neither reached nor queued in that process + gets 3 ms for the other process to reach it, then is dropped. On a counter that has not moved for + 100 ms it is dropped at once: Angry Birds VR waits on two such values a frame, and the grace cost + its submit thread 6 ms a frame and held it at 60 fps. Keeping these waits stops a Proton game + before its first frame (Angry Birds VR stayed on SteamVR's loading card). While a Quest + session's frame socket (`/run/droiddeck/droiddeck-xr-frames`) exists, every wait is kept, as the + Quest path was built and tested with them; + - Steam's web helper has the semaphore bridge whenever SteamVR is installed: its GPU process + outlives SteamVR runs, and one started without the layer crashed when SteamVR showed Steam's + overlays, until Steam quit; + - `DROIDDECK_VR_CRASHTRACE=1` (or a `crashtrace` file beside the `active` marker, for processes like + Steam whose environment is not ours) prints a backtrace on a fatal signal. `vrcompositor`'s + launcher drops `LD_PRELOAD`, but the layer is loaded there. It only takes signals nobody handles + yet: Wine and FEX handle `SIGSEGV` as part of running a Proton game, and a replaced handler + crashed The Lab; + - a `semtrace` file beside the marker logs, every 2 s, each bridged semaphore's local and shared + value and the memfd inode that names it in every process, plus the first waits and signals + (values up to 3) submitted on them. +3. **`droiddeck-steamvr`**, the guest helper (`status | install | start | stop`), which the app drives + through the guest agent's fixed `vr` request (no agent commands needed). It also supplies an `xset` + stand-in, because the dashboard's web helper checks the X server with it. Before every start it + removes SteamVR's crash marker (`config/vrserver_crash_timestamp.txt`, written when vrserver + crashes) and clears `driver_droiddeck.blocked_by_safe_mode`: after a crash early in a run SteamVR + starts in safe mode and blocks every add-on driver, so a single crash left the glasses blank on + every later launch (`HmdNotFound`). The driver also stops its pose, vsync and presenter threads + if vrserver exits without deactivating it, since a running `std::thread` destroyed at exit aborts + the process. + +Imported eye textures carry the same format list SteamVR's mutable sRGB images do. With it Turnip keeps +UBWC compression on, and an import that disagreed read compressed data as garbage. + +Two more fixes outside `tools/vr` were needed for the dashboard (Steam's library, in VR): + +- **SysV semaphores** (`tools/linuxfs/preload/sysv.c`): the session emulates them, and `IPC_STAT` + reported `sem_otime` 0 forever. SteamVR's web helper does the usual race-free init (wait until + `sem_otime` is non-zero), so its zygotes slept in a `semctl`/`usleep` loop and the dashboard never + appeared. `semop` now stamps `sem_otime`, `SETVAL`/`SETALL`/`IPC_SET` stamp `sem_ctime`; + `test_sysv_preload.py` covers it. +- `vrwebhelper` gets the same tracer treatment as Steam's `steamwebhelper` (`tracer.c`). + +Verified on the AYN Thor (SD 8 Gen 2, Turnip): SteamVR 2.17.10 starts with the DroidDeck HMD active, +the compositor runs driver-direct at about 60 fps, the dashboard (Steam's library in VR, with the +controller's laser) shows cleanly in both eyes at the panel's resolution while Steam keeps running, and +a pose written to the shared file turns SteamVR's view. Started from the drawer button through the agent. +Once a headset (VITURE, RayNeo or XREAL glasses) is connected and under DroidDeck's control, the +Steam page shows **Play SteamVR** at the top left, with a **Settings** badge that drops that headset's +settings from the top; before that neither appears. Play SteamVR starts Steam and then SteamVR +(installing it first if needed) once the glasses show a picture, and SteamVR stops when the glasses +are unplugged. **Play Steam** never starts it: while SteamVR runs, Steam keeps its own window in front +of flat games. Through a VITURE Mobile Dock the glasses are only a display: the dock does not pass +their controls or head tracking to the phone, so the Steam page shows neither, and only the session +drawer's glasses page (output and **Game on glasses**) applies. + +SteamVR defaults to 2D output: a single eye fills the glasses while head tracking remains active. +Enable **3D (side-by-side)** manually or opt into **3D for VR games** in the glasses controls for stereo. Automatic +switching waits until SteamVR reports that it is running; starting or installing it does not change +the display mode. A saved **3D for VR games** preference is retained. + +While SteamVR runs, its side-by-side source takes priority over the glasses' saved picture mode, +including **3DoF virtual screen**. SteamVR already applies head tracking; projecting its combined +eye pair onto a virtual screen would show both images in each eye and apply head rotation again. +The glasses still supply poses to SteamVR. The saved picture mode resumes when SteamVR stops. + +With **Game on glasses** off, SteamVR keeps the glasses' picture settings and IMU while Android +mirrors the phone output to the glasses. Turning off the dedicated display must not turn off the +renderer/HMD proximity flag: SteamVR otherwise reports the headset as taken off and enters standby, +freezing the view on both displays. Without a glasses display or an enabled phone VR viewer, SteamVR +uses a single-eye phone preview with the phone's tracking preference. These effective rendering +settings last only while SteamVR runs; the saved Cardboard setting is unchanged. +Verified on the VITURE Pro 2 with Game on glasses off: live glasses IMU, roughly 60 fps beyond +the previous standby point, and user-confirmed updating images and correct head tracking on both +screens. The rendering regression tests cover mirrored/dedicated parity and phone fallback. + +A separate freeze occurred after swapping Pro 2 for GT Max and restarting SteamVR in the same +DroidDeck process (2026-10-14, session 52): GT Max board `0x41` kept streaming poses and the HMD +stayed active, but `vrcompositor` reported `vkerror=-4` (`VK_ERROR_DEVICE_LOST`) from 17:18:53. +Restarting the Steam session alone reproduced it (sessions 53/54). Restarting DroidDeck itself +cleared it; session 55 continued rendering with live GT Max tracking for over a minute without +new device-loss errors. This is a recovery workaround, not a confirmed permanent fix; retained +graphics state across restarts is a hypothesis. Frame counters alone do not prove recovery: +the presenter can keep presenting an old SteamVR image while the compositor reports device loss. + +### Joy-Con controllers + +**Glasses → Tracking → Experimental → Luma Joy-Con tracking** is off by default. Enable +positional tracking first, then this toggle. It uses the Luma Ultra primary stereo camera pair +to locate each hand holding a Joy-Con, with the existing calibrated, capture-time head transform. +Joy-Con IMU orientation, buttons, sticks, battery reporting and haptics remain in use. This mode +also enables Joy-Con takeover for SteamVR even if the ordinary controller preference is off. +Android 12+ and controller IMU support are still required. + +Stereo positions and the 6DoF head share the same recentered floor origin. If a hand is hidden, +invalid, or its observation is older than 200 ms, that side blends to the arm model anchored to +the current head position. Reacquisition also blends (180 ms time constant). No usable calibration +or visible palm means arm-model-only positioning. Loss of head tracking beyond 100 ms invalidates +the controllers and releases their inputs. Reconnects, origin changes and Joy-Con recentering discard +old positional corrections. Point the Joy-Cons forward when connecting or recentering; camera +positions do not correct IMU yaw drift. Position extrapolation is disabled in this mode. + +The camera observes the gripping **hand**, not the Joy-Con shell. Occluded palm landmarks, crossed +hands, and handedness ambiguity can reduce tracking availability. This is an experimental hand +position proxy with estimated fallback, not marker-based controller tracking. Controller grip offset, +aiming, motion latency, and sustained performance still need physical validation with held Joy-Cons. + +Luma Joy-Con tracking and stereo bare-hand controllers are mutually exclusive. Either selected +Luma controller mode pauses phone-camera inference. External VR controllers retain priority. +Disable both Luma controller toggles to return to the upstream Joy-Con/device-camera modes, +which retain their existing fixed head-position anchor. Positional tracking, stereo controllers, +and phone-camera controls are grouped at the bottom of the glasses settings under **Experimental**. + +Nintendo Joy-Cons paired over Bluetooth become SteamVR hands while SteamVR runs, and stay an ordinary +game pad otherwise. It needs Android 12 or later (motion sensors on an `InputDevice`) and a kernel whose +`hid-nintendo` driver reports the IMU (Android common kernel `android14-6.1` or newer; older 5.x GKI +builds expose the buttons only). A Joy-Con without motion sensors stays a game pad. +**Controller settings > Joy-Cons as VR controllers** (on by default) turns it off. + +`input/JoyConVr.kt` takes a Joy-Con once SteamVR reports that it is running. It reads the Joy-Con's +gyroscope and accelerometer on a thread of its own. A Mahony filter turns them into an orientation, +and the gyro bias is learned while the Joy-Con rests. Each IMU report carries three samples every +10 ms. On the tested kernel they arrive newest first and about four in ten reports repeat the +previous report's newest sample, while the kernel's timestamps run about twice as fast in an uneven +3.3/3.3/13.3 ms pattern. `JoyConReports` collects a report's samples, learns their order from the +repeats, drops the repeated one and times the rest from the report's arrival (report interval divided +by new samples). That cut the gyro's error from 13 to 48 degrees per movement to about 2 to 3. + +The accelerometer also measures movement. Linux removes the gyro's offset but not the +accelerometer's (one Joy-Con read 10.08 m/s² lying still, the other 9.51), so `JoyConAccelCalibration` +learns offset and scale by fitting a sphere to the readings of a Joy-Con resting in at least five +different positions; it happens on its own while you play and is saved per Joy-Con. `JoyConMotion` +takes gravity away in the world frame, integrates what is left into a velocity and a displacement, +sets the velocity to zero whenever the Joy-Con is still, and leaks it away quickly once a movement +lasts longer than a second, so the displacement holds for short lifts, pushes and punches and cannot +run away. It also keeps a second velocity that is never zeroed and only leaks over 30 s, the plain +integral of the acceleration, for camera tracking. The pose, displacement, both velocities, buttons, +stick and battery go to a 224-byte seqlocked file, `joycon_shm.h`, at +`/run/droiddeck/droiddeck-joycon`. The game pad no longer sees that Joy-Con; +it gets it back when SteamVR stops, the Joy-Con disconnects or the setting is turned off. + +The driver adds a left and a right Index controller (`knuckles`, Valve's Index input profile and +models) when the first Joy-Con appears. The pad hand on that side switches off. A Joy-Con cannot +measure where it is, only how it turns and how it speeds up. Without the camera, Google VR's arm model +places the hand from its orientation and the head, and the measured displacement moves the hand on +top of that before it settles back over 0.6 s (1.5 s while the trigger or grip is held, at most +35 cm away), so a quick lift or punch shows but a slow sideways drift does not. With camera hand +tracking (below) the camera places the hand instead. Its pointing direction is the Index controller's +aim pose. Its heading is matched to the head when it connects. Holding Home (right) or Capture +(left) for 0.8 s matches it again, with a short buzz; point the Joy-Con where you look first. A short +press is the system button. A hand that sends nothing for 500 ms disconnects. + +| Index | Left Joy-Con | Right Joy-Con | +|--------------|------------------|----------------| +| Trigger | ZL | ZR | +| Grip | L, SL, SR | R, SL, SR | +| A | down, right | A, B | +| B | up, left, minus | X, Y, plus | +| Thumbstick | stick, click | stick, click | +| System | Capture (press) | Home (press) | + +The fingers follow the buttons on a simulated hand: the index finger curls with the trigger, the +other three with the grip, the thumb when it is on the stick or a face button. SteamVR's haptic +events go to that hand's Joy-Con through `@droiddeck-rumble` (slots `0x100` and `0x101`) and respect +the rumble setting. + +Outside SteamVR two Joy-Cons are combined into one player: left stick, D-pad, L, ZL, minus and Capture +from the left one, the face buttons, right stick, R, ZR, plus and Home from the right. Face buttons +keep their positions (Nintendo X is the top button, Y on Xbox). SL and SR are shoulder buttons on a lone +Joy-Con and are ignored while two are combined. A combined pair splits rumble the way a pad does, +strong to the left and weak to the right. A lone Joy-Con plays the stronger of the two. + +#### Camera hand tracking + +The device's camera can watch the player so each Joy-Con hand sits where the real hand is, including +lifting, lowering, reaching and moving sideways. With no controller connected it tracks bare hands +instead (below). It needs Android 12 or later. The first time a headset connects, DroidDeck asks whether to use the camera. On a device +with cameras on both sides it offers the back one (usually sharper and wider) or the front one; with +cameras on one side only it uses those without asking. Android's camera permission is requested +right after. **Headset sheet > Head tracking > Hand tracking** turns it on or off, switches the +camera, asks for the permission again and opens the placement check. + +When camera tracking is on, **Play SteamVR** first shows the placement check: the live picture with +the detected body drawn on it, what to fix, and **Skip**. It reads the device's gravity sensor and +asks to stand a device up when it lies flat face up or face down, or to stand it more upright when +the camera points more than 45 degrees up or down. Then it asks to step into view, to step back or +come closer (the shoulders should take 12 to 26 percent of the picture's width, about 0.75 to 1.6 m +from a 90 degree camera), to step back when an elbow or wrist is near the edge of the picture, and +to hold both hands in view. Once +everything has been fine for 1.2 s SteamVR starts on its own. With the back camera the screen faces +away from the player, so the advice is also spoken aloud. + +`handtracking/HandCamera.kt` runs while SteamVR runs and either a Joy-Con is taken or no game +controller is connected at all. It picks the widest +camera on the chosen side (up to 100 degrees, zooming a logical camera out when it can), holds it at +its fastest fixed frame rate up to 30 per second so exposures stay short and moving hands do not +blur, takes 960x720 frames from CameraX, turns them upright by gravity, and runs MediaPipe's Pose +Landmarker (Lite) on the CPU in video mode, which follows the body from frame to frame and smooths it, +15 times a second (10 and then 6 when the device reports it is getting hot). The pose model's depth +cannot tell a hand at the chest from one reaching out (it read about 25 cm in front of the shoulders +for both), so each hand is measured on its own: `HandModel` runs MediaPipe's Hand Landmarker on a +square around the hand. To find a hand it looks for up to two hands in a square around the pose's +wrist and keeps the one whose wrist is nearest, taking turns between a square 4 shoulder widths across +centred on the wrist and one 2.5 shoulder widths across moved toward the fingers. The palm detector +misses many hands in a tight square: with the player about 0.65 m away the 2.5-wide square found 73 +percent of the hands in view (a 1.4-wide one 49, the whole picture 68), and with the player lying close +to the camera, where hands look large, the wide square found 77 percent of the hands the tracker had +seen and the two in turn 82 (the 2.5-wide one alone 54). After that it follows the hand in a square 2.8 +hands across, and finds it again in the same frame when it is lost. A hand whose wrist is nearer the other arm's wrist than its own is dropped. +The hand's 21 landmarks come in metres and in pixels, so a least-squares fit gives the hand's +distance from the size it appears (`BodyPose.handFix`); the middle of the palm is the point used. +The head is fitted the same way from the pose model's face landmarks. Each hand is given relative to +the eyes in a frame levelled by gravity, along with the face's heading from the nose and ears. When +the hand model misses a hand the pose still sees, the hand keeps its last distance for half a second +and is marked as estimated. The frame's exposure time, moved onto the monotonic clock, the hands, each hand-model hand's 21 +landmarks relative to the middle of its palm (in metres, in the same levelled frame), the face heading +and whether bare hands are wanted go to a 568-byte seqlocked file, `handcam_shm.h`, at +`/run/droiddeck/droiddeck-handcam`. +No picture is kept or sent. + +The driver turns the camera's frame to SteamVR's by comparing the face's heading with the headset's +heading at the same moment, averaged over about 3 s and restarted when they disagree for half a +second (after a recenter). Each hand then runs a Kalman filter (`HandKalman` in `hand_motion.h`) with +position and velocity on each axis. The Joy-Con's plain velocity integral moves it forward between +camera frames; its reports are timed 45 ms earlier than they arrive, which lines their movement up +with the camera's. The Joy-Con is trusted less while it moves hard, since a small misalignment then +turns into a large error. The filter's speed fades with a 0.3 s time constant (0.1 s once the camera +has not seen the hand for 0.2 s, since a small tilt error then pushes the hand steadily), and while the Joy-Con +has been still for 0.1 s (turning under 0.3 rad/s and accelerating under 0.6 m/s²) it is told the hand +is not moving, so a hand the camera loses settles where it was instead of sliding away, and a resting +hand does not shake (on a recording, 3.6 to 4.3 cm of shake fell to 1.0 to 1.5 cm). A camera sighting +is applied at the moment the picture was taken, 60 to 140 ms in the past, and the Joy-Con movement +since then is replayed on top, so the hand is where it is now, not where it was. A hand-model sighting +counts as about 3 cm of camera noise, an estimated one as 6 cm. +One sighting far from the filter (the model swapping left and right) is ignored unless three in a row +agree. When the camera has not seen a hand for 0.75 s, the arm model takes over from where the hand +was, and changes between the two blend over a quarter of a second. + +#### Bare hands + +With camera tracking on and no game controller or Joy-Con connected (checked again whenever an input +device comes or goes), the app sets a flag in the camera file and the driver gives SteamVR two hands +from the camera alone, the way a Quest's hand tracking does; the pad hands switch off. Each hand is +still an Index controller to SteamVR, so games' Index bindings and the dashboard work, but its render +model becomes a white glove with a light grey band at the wrist, like the plain hands a Quest draws +(`{droiddeck}droiddeck_hand_left` and `_right`, built at build time by `tools/vr/make_hand_models.cpp` +from the same skeleton). The glove is a smooth surface: tapered capsules along each finger bone, a +domed palm and the band are blended into one distance field and meshed with surface nets (a 2.6 mm +grid, up to about 10,000 vertices a part). SteamVR draws render models almost unlit, so the shading +is baked in: ambient occlusion sampled from the distance field, and a soft light on the back of the +hand, pick a column of a 64x64 texture whose rows run from the glove's white to the band's grey. It +has two parts with two shapes each: the palm with the middle, ring and little fingers (open, or +curled into a fist while `/input/grip/touch` is on, at half closed), and the thumb with the index +finger (open, or pinching while `/input/trigger/click` is on). The thumb part carries a copy of the +palm 0.3 mm inside the other part's, so the two blend without a seam. SteamVR only routes a part to +its input when the part also names a legacy button (`controller_button`, as the Index model's buttons +do; vrserver then logs `inputRouting=1` for it), and a hand whose laser points at the dashboard sends +its trigger to the dashboard, so that hand clicks without drawing the pinch. Its pointer and grip poses are the Index +controller's, so the laser leaves along the fingers. Games that draw hands from the +skeleton get the camera's finger curls. Joy-Cons connected later take over; their hands go back to the +Index model. + +| Gesture | SteamVR input | +| --- | --- | +| Thumb and index finger together | Trigger: it starts pulling 6 cm apart, clicks under 3.5 cm and lets go over 4.5 cm | +| Middle, ring and little fingers closed | Grip, clicking when fully closed | +| Thumb to middle finger | B | +| Thumb to ring finger | A | +| Right palm toward the face, then pinch | System (the SteamVR dashboard) | +| Left palm toward the face, then pinch | B (most games' menu) | + +A gesture has to hold for 50 ms to press and be gone for 100 ms to release, and a palm has to face the +headset for 0.3 s before its pinch becomes the menu. A and B only count with the hand open, take the +fingertips within 2.5 cm (released over 3.5 cm), and while the palm faces the headset the trigger stays +released. The distances were checked on 504 photos from the public HaGRID gesture set (50 each of +eleven gestures) through the same hand model: MediaPipe puts touching thumb and index tips a median +3.4 cm apart, so a 2.5 cm pinch caught only 27 percent of the "ok" signs; at 3.5 cm it catches 51 +percent while open hands, pointing, "stop", "four", "three" and thumbs-up misfire in 4 percent or +fewer. A fist pinches in a quarter of them, which games read as grabbing with the trigger held. The +grip read closed for 92 percent of fists and 96 percent of pointing hands and for none of the open +hands. + +`CameraHand` in `hand_pose.h` does the work. Each camera frame's landmarks are turned by the camera's +yaw. The finger curls come from each finger's joint angles, looked up in a table of the skeleton's own +angles. The skeleton's palm at those curls (wrist and four knuckles) is fitted to the camera's with +Horn's closed-form quaternion method, and the root is placed so the skeleton's palm lands on the palm +position. Only sightings with hand-model landmarks count; the pose-only estimates are left out. The +position goes through a 1€ filter (Casiez, Roussel and Vogel, 2012): a low-pass at 1 Hz while the +hand is still that opens up the further and faster the hand gets ahead of it. On a recording of bare hands it cut +the wobble of a still hand from the 9 to 11 mm the Joy-Con Kalman filter left to 2.5 to 3 mm, and the +largest jump between frames from 10 to 17 cm to about 1.3 cm. The turn goes through the same kind of +filter (1 Hz when still, 0.2 Hz more per radian per second), and the curls follow within 80 ms. A fit +more than 2 cm off is skipped, and a fit that turns the hand more than 45 degrees at once is held back +until the next one agrees within 25 degrees (the hand model now and then flips a hand around; the +largest turn between frames fell from 14 to 7.5 degrees). When the camera has not seen a hand's landmarks for half a second, +the hand reports itself out of range and lets go of every input; it reappears wherever it is seen +next. There is no stick or trackpad, so moving around needs a game's own hand tracking or pointing +to teleport. + +On MediaPipe's own example pictures (a raised index finger, a thumbs-up) the right-hand skeleton fits +the palm within 7 mm, the curls read as the pose looks, and the palm direction points at the camera +when the palm faces it. + +Depth from one camera is approximate: the model expects one person, up to about 4 m away, with the +head in view. + +Joy-Con orientation and buttons were tested on a REDMAGIC tablet, and the movement code was tuned on +recordings from its Joy-Cons. Camera tracking was recorded on the same tablet with the front camera: +the camera holding 30 frames per second and video mode took the hands' frame-to-frame jitter from +about 5 cm to 1 to 2 cm; the hand model and the filter were then tuned on that recording. For a +diagnosis, an empty file named `handcam-record` in the app's files folder makes the next sessions save +up to 6 minutes of small camera pictures with every landmark and timing to the app's cache +(`handcam-rec/`), and the driver writes its camera, Joy-Con and filter values to +`/run/droiddeck/droiddeck-handtrace.csv` while they run. `tools/vr/build.sh` runs `test_joycon` (arm +model, aim pose, hand skeleton, movement, the filter's latency, noise and outlier handling, yaw, +both file layouts, a lost hand settling, the palm fit, curls, gestures, bare camera hands, the turn +filter and the hand render model). `JoyConTest`, +`JoyConOrientationTest`, `JoyConMotionTest`, `JoyConShmTest`, `JoyConPadTest`, `RumbleComponentTest`, +`BodyPoseTest`, `TrackingCamerasTest`, `PlacementAdviceTest`, `HandCameraShmTest`, `HandTrackingTest` +and `HandCameraPromptTest` cover the app side. + +### Device-loss recovery + +During a SteamVR session, DroidDeck reads new `vrcompositor.txt` output every two seconds and detects +`VK_ERROR_DEVICE_LOST` or `vkerror=-4`. Existing errors at session start, ordinary acquire timeouts, +and unrelated failures do not trigger recovery. Reads are bounded to the newest 128 KiB and handle +log replacement, truncation, and partial lines. + +A detected fault shows an eight-second cancellable countdown while the session is foreground. +Touches outside the prompt do not dismiss it; the user can explicitly choose Keep open. +Recovery stops the guest, gives teardown and diagnostic collection up to 15 seconds, then uses a +private `:vr_recovery` activity to kill only DroidDeck's main process and reopen SteamVR. That process +does not initialize the glasses SDK or guest runtime. It recreates the native graphics context; an +Activity recreation or SteamVR-only restart does not. Running games close and unsaved progress cannot +be restored. A persisted ten-minute cooldown disables another automatic attempt, while still +offering a manual restart. Session events record detection and recovery requests. This mitigates +the freeze; it does not fix the underlying Vulkan device loss. + +Validated on the phone with a clearly marked `SIMULATED_RECOVERY_TEST: VK_ERROR_DEVICE_LOST` +log entry in session 58. Detection and the eight-second countdown led to a new main-process PID +and session 59 automatically reached READY and requested SteamVR. The +cooldown timestamp survived the process restart. This was a recovery-flow test, not a new GPU +failure. Subsequent user feedback and `vrserver.txt` showed that SteamVR had blocked `driver_droiddeck` +after a previous crash: the server ran, but reported `HmdNotFound` and never produced VR output. +Recovery now clears only `driver_droiddeck.blocked_by_safe_mode`, atomically after stopping the old +process and before launching the new session. It preserves global safe-mode preferences and other +drivers' blocks. A running server or resumed sensor stream alone is not proof of successful recovery. +The follow-up marked test in session 63 exercised the manual retry during the cooldown. Recovery +logged the driver unblock, restarted into session 64, and SteamVR recognized the DroidDeck HMD. +Fresh compositor output and a 3840x1080 `DroidDeck Cardboard VR` presenter appeared, with subsequent +display intervals at 56–59 fps. The user confirmed the GT Max VR view and tracking work after this +recovery. The 19 SteamVR unit tests and APK runtime-input verification passed. +The glasses/SteamVR suite includes stale/rotated/split log handling, countdown, +cancellation, foreground-only behavior, and cooldown checks. + +Stereo also requires a physical side-by-side display mode. On the tested Astra 2 +firmware the Pro XR command succeeds but DisplayPort falls back to 640×480; +direct-connection stereo remains unresolved. DroidDeck remembers such a fallback for that glasses +model and stops asking for 3D on its own; **Retry** in the glasses settings tries again. See the +[Astra/VITURE investigation](development/astra-viture-stereo.md) for measured +results, app recovery behavior, and the unverified powered-adapter design. + +### Not done yet + +- **Controllers**: the driver adds two Vive-profile hands driven by the session's game pad. It reads + the absolute-state snapshot the app already publishes in fake input ring 0 + (`FAKE_EVDEV_MEMFD_PATHS`), so the app needs no new plumbing. They rest low in front of each side and + point where the head looks. Each stick moves its hand sideways (40 cm), up (50 cm) and down (30 cm) + and turns it as if from an elbow 45 cm behind, so pointers and aim follow it too; the hand eases + back when the stick is let go. The d-pad's up and down move both hands in and out; while a hand's + trigger or grip is held they move only that hand (a slingshot or bow pulled back), and it eases back + on release. Clicking the left stick hands the sticks to the game as trackpads (walking, turning, + teleport) and back. Mapping, right hand: A/R3 = trackpad click, RT = trigger, RB = grip, Start = menu, guide = + system. Left hand: X, LT, LB, Select. Both hands activate in SteamVR and their laser shows on the + dashboard; guide, Start and A presses show up in the ring the driver reads. They are drawn as Index + controllers and switch off while another driver's controller is connected. A Joy-Con hand replaces + the pad hand on its side, and bare camera hands replace both while no controller is connected + (above). +- **Layers**: only the first layer of each frame is drawn. SteamVR's compositor composites the + dashboard into it, so this has not mattered yet. +- **Timing**: no reprojection. The presenter blits the frame submitted last once `vrcompositor`'s GPU + work for it is done: the layer fences that process's submits and counts issued and finished ones in + `present-sync` beside the `active` marker, and the presenter sleeps on the count (a futex). Without + the file it falls back to a guard delay after the frame arrived (`DROIDDECK_VR_PRESENT_GUARD_MS`, + 4 ms). It hands its own picture to Wayland only once its blit is done, because KGSL does not order + the DroidDeck compositor's copy after it. The chain is SteamVR → presenter → DroidDeck compositor → + lens pass. +- **Cross-process GPU sync** is a poll away from exact (see the semaphore note above); binary + semaphores are not bridged. +- **Apps and games**: Windows VR games run through Proton ARM64 (FEX for the x86-64 game, DXVK, and + Proton's `vrclient_x64` bridging to SteamVR's ARM64 `vrclient.so`). Tested on the Thor: + - **Thumper** (356400, its own D3D11 engine), started with its VR launch option: menus and levels + at 60 Hz, about 7 ms CPU and 13 ms GPU a frame, 23 dropped frames in 6485; + - **The Thrill of the Fight** (494150, Unity): loads into its gym, 60 Hz with 6.5 ms CPU and 8.5 ms + GPU a frame; + - **The Lab** (6.6 GB) loads, but Android's low-memory killer took the whole app while it did, next + to Steam and SteamVR. Two VR games at once do the same, so quit one (`droiddeckctl quit <appid>`) + before starting the next; + - **SUPERHOT VR** stops at its EULA, which SteamVR's dashboard shows in VR; + - **SteamVR Home** is not in the ARM64 package. Steam's own Windows SteamVR (250820) has it + (`tools/steamvr_environments`, `steamtours.exe`), and it starts under Proton, but Proton's + `vrclient_x64` implements only `IVROverlayView_003` and Home asks for `_002`, so it stops at + "SteamVR initialization failed!"; + - SteamVR's ARM64 OpenXR sample, `helloxr -g Vulkan2`, reaches a focused session and submits frames + (it was stuck before the first one until the wait fix above), but its picture shows up as torn + tiles: next to chase. `hellovr_sdl` (OpenGL) needs GLEW, which the runtime lacks. + + SteamVR opens its game menu over a newly started game; `vrcmd --hidedashboard` (in + `/opt/steamvr/bin/linuxarm64`) closes it. +- **Quest 3**: unrelated to this; on the Quest DroidDeck stays a 2D panel (`docs/quest.md`). + +## Building and testing + +- `tools/vr/build.sh [OUT]` builds the driver and the layer in the local cross image, or + `--native OUT` with aarch64 compilers on PATH (CI). `tools/build_local.sh` and CI put them in the + APK under `assets/linuxfs/usr/local/lib/droiddeck-vr`; `SessionFiles` stages them, and + `droiddeck-steamvr`, into the rootfs. +- Shader: `cardboard_frag.h` is generated from `cardboard.frag` + (`glslangValidator -V --vn cardboard_frag_code -o cardboard_frag.h cardboard.frag`). + `tools/tests/test_cardboard.py` checks it is current, and checks the push-constant packing on the + host. +- `CardboardTest` covers the settings, lens inset and field of view, the head-pose maths (quaternions, + display-rotation remaps, recentring) and the SteamVR status. `test_droiddeck_agent.py` covers the + `vr` request. +- Logs: the compositor's `[cardboard]` lines; SteamVR's in `~/.local/share/Steam/logs` + (`vrserver.txt`, `vrcompositor.txt`) and `/run/droiddeck/droiddeck-steamvr/vrstartup.log`. The + driver's lines start with `droiddeck:`. + +Lessons from bringing this up on the Thor, and how to debug a live session: `docs/development/cardboard-vr-learnings.md`. diff --git a/docs/development/added-games.md b/docs/development/added-games.md index 7b3c404f40..9e1566dd43 100644 --- a/docs/development/added-games.md +++ b/docs/development/added-games.md @@ -47,7 +47,7 @@ shortcut appid is stored per folder at the first scan and never changes after. The ✎ on a Custom game's page (`AddedGameEditor`) mirrors Steam's Properties for a non-Steam game: Name, Target (ranked exes, "?", Other exe… opening the picker in the -game's folder), Start in (automatic = the exe's folder), Launch options, Artwork (Cover, +game's folder), Start in (automatic = the exe's folder), Launch options, Artwork (Cover, Wide cover, Background, Logo, Icon, each with its thumbnail and source), and Remove (two presses; the files stay; adding it again brings it back). `AddedGameEdits` writes each change through the same shortcut: the listing (`name`, `exe`, `dir`, `launch`, `art`, the stored `appid`) @@ -66,10 +66,47 @@ value holds on both sides. Automatic: the game folder's own images, then Steam (the appid the files name, else a store search whose result has the same name), then SteamGridDB, then the exe's icon. The art chooser (an Artwork row) shows the game folder's images, Steam's official piece and -SteamGridDB's best few (fetched when it opens); a tap applies one, "Pick image…" takes a -file through the same picker (png, jpg, jpeg, webp, ico), "Reset to automatic" drops the -choice. A choice is a copy in `files/added-art/<appid>/chosen-<slot>.<ext>`, its source in -the preferences. +SteamGridDB's best few (fetched when it opens); a tap applies one, "Search SteamGridDB…" +opens a search (it starts with the game's name and opens the match at once when one is +exact; it lists every image SteamGridDB returns for the slot, up to four pages of 50), "Pick image…" takes a file through the same +picker (png, jpg, jpeg, webp, ico), "Reset to automatic" drops the choice. A choice is a +copy in `files/added-art/<appid>/chosen-<slot>.<ext>`, its source in the preferences. + +SteamGridDB failures are told apart (`SteamGridDb.Status`: no key, key refused, rate limit, +offline, server, no match for the game) and shown under the SteamGridDB images instead of +leaving the row out. The SteamGridDB game id is remembered per game in +`added-art/<appid>/sgdb-id`; "none" (SteamGridDB has no such game) is kept for a week, but +a failed request is never written as "none", a "none" older than the saved key is asked +again, and the chooser always asks again when the user opens it. A background pass stops +asking SteamGridDB after its first failure. + +Steam games (installed through Steam, not Custom) get the same ✎ on their page: an Artwork-only +editor (`SteamGameArtEditor`) with the same rows and the same chooser (Steam's official piece, +SteamGridDB's best few, "Search SteamGridDB…", "Pick image…", "Reset to automatic"), shared +through `ArtTarget`. A choice is a copy in `files/steam-art/<appid>/chosen-<slot>.<ext>` +(`SteamGameArt`); `Library.steamGames` shows it in place of the librarycache image, and with a +client running the Cover / Wide cover / Background / Logo is also set in Steam +(`SetCustomArtworkForApp` / `ClearCustomArtworkForApp`). Icon is launcher-only. + +`SteamGrid` keeps both sides in step through the client's grid folder +(`userdata/<account>/config/grid`, `<appid>p`, `<appid>` for the wide cover, `_hero`, `_logo`), for Steam and Custom games alike. +A choice is written there at once, so it reaches Steam while the client is closed. Every library +scan (`Library.launchableGames`) compares the folder with what was last written or read +(`grid-<slot>` in the game's art folder): a file Steam changed becomes the choice (source Steam), +a file removed in Steam drops it, and files the shortcuts writer placed itself +(`.droiddeck-art.json`) are not mistaken for choices. A chosen image is stored as +`chosen-<slot>-<time>.<ext>`, so a new choice has a new path and shows at once. Installed GOG, Epic and Amazon games get the same rows through `StoreGameArtEditor`. + +"Adjust logo" (last row of every art editor, `LogoPositionDialog`) shows the game's Background with +its Logo on top and lets the logo be pinned to one of Steam's five places (top left / top center / +center / bottom left / bottom center) and resized (10-100 %). The value is Steam's own +`{"nVersion":1,"logoPosition":{"pinnedPosition","nWidthPct","nHeightPct"}}` (`LogoPosition`). It is +kept in the game's art folder (`logo-position`), written to `<appid>.json` in the grid folder (other +keys in that file are kept; clearing the position removes the file only when nothing else is in it), +and, with the client running, set through `SetCustomLogoPositionForApp` / +`ClearCustomLogoPositionForApp`. `SteamGrid.sync` takes over a position changed or removed in Steam +the same way it does for images (`grid-json` holds the last seen signature). Reset removes the +custom position so Steam's default comes back. Setup › Launcher › Games holds the Artwork switch (automatic fetching) and the SteamGridDB API key: the user's own, sealed with `CredentialCipher`, wins over the build's @@ -80,5 +117,5 @@ skipped. `AddedExesTest`, `AddedGameEditsTest` (bulk add and skip, edits to the listing on a stable appid, Steam-side read-back, art choice and reset), `AddedGamesCandidatesTest`, -`AddedGameArtLookupTest` (key precedence), `GameIdentifierTest`, `PickListingTest`, and +`AddedGameArtLookupTest` (key precedence), `SteamGameArtTest` (Steam game art choice and reset), `SteamGridTest` (grid folder both ways), `GameIdentifierTest`, `PickListingTest`, and `tools/tests/test_steam_shortcuts.py` for the writer. diff --git a/docs/development/amazon-cleanroom.md b/docs/development/amazon-cleanroom.md new file mode 100644 index 0000000000..e907db5526 --- /dev/null +++ b/docs/development/amazon-cleanroom.md @@ -0,0 +1,175 @@ +# Amazon Games module: clean-room rewrite + +The Amazon Games integration (the Rust `amazon` module in `libdroiddeckstores.so` and the Kotlin +package `com.droiddeck.launcher.stores.amazon`) was rewritten so that it carries no code from the +earlier implementation. This page records how that was done and every judgement call the new code +makes. + +## Process + +1. **Spec, written separately.** A functional specification (six documents: summary and unknowns, + service protocol, manifest format, install behaviour, on-disk compatibility, and the app-facing + interface) was written from the old code by a separate pass. It describes behaviour and data + formats only, not code structure. +2. **Implementation from the spec only.** The implementer worked from those documents and from + code that is not Amazon-specific: + - read: the spec; the crate's `Cargo.toml`, `Cargo.lock`, `lib.rs`, `stores_jni.rs`, + `priority.rs`, `fetch_tuning.rs` and the shared `fetch_core.rs`; the clean-room Epic module + (Rust and Kotlin) as the structural template; `JNI.md`; the shared Kotlin store code (account + store, install records, download queue, login activity, catalog and state); the signatures and + call sites of `StoreSizes`' Amazon branch (to keep them compiling); build files and CI; + - not read: anything under `stores/amazon/` (Kotlin, Java, tests) or `src/amazon*` (Rust) of the + old tree, other branches or checkouts, or any Amazon client source. The old files were deleted + with `git rm` without being opened. +3. **Fresh code.** Every file has its own structure, names and comments, with a plain description + and `SPDX-License-Identifier: GPL-3.0-or-later` (the crate's licence). Where the spec left a fact + open, the choice was made from general knowledge of Amazon's public services or from + unauthenticated probes of the live endpoints (below), and is listed here. + +## Layout + +Rust, `app/src/main/rust/stores/src/amazon/`: + +| File | Role | +|---|---| +| `net.rs` | blocking HTTP (reqwest + rustls), the three User-Agent identities, hex / percent / base64url helpers, URL scrubbing for logs | +| `auth.rs` | per-attempt device serial, client id, PKCE verifier and challenge; sign-in URL; code from the return URL; registration, refresh, deregistration | +| `distribution.rs` | the distribution service call shape (`X-Amz-Target`, `x-amzn-token`, `Content-Encoding: amz-1.0`), refusal detection, the download lookup | +| `library.rs` | entitlement pages, field fallbacks, de-duplication, add-on filter, sort | +| `cdn.rs` | path insertion before the signed query, file URLs, the manifest GET | +| `codec.rs` | manifest framing (big-endian header length) and xz / LZMA-alone decompression (`lzma-rs`) | +| `proto.rs` | a strict protobuf wire reader (and test writers) | +| `manifest.rs` | packages → files, path normalisation and safety, duplicate handling | +| `install/` | `mod.rs` (the run), `check.rs` (completeness, stray `.tmp`, free space), `writer.rs` (streamed download, SHA-256, atomic placement), `tests.rs` (loopback end-to-end) | +| `launch.rs` | `fuel.json`, exe scoring, the FuelPump environment | +| `service.rs`, `ffi.rs` | named operations and the JNI boundary | + +Kotlin, `app/src/main/java/com/droiddeck/launcher/stores/amazon/`: `AmazonBackend` (the +`StoreBackend`, installs the login flow), `AmazonLogin` (the WebView flow), `AmazonCredentialStore` +(the account through `StoreAccounts`, single-flight refresh), `AmazonPrefs`, `AmazonLibrary` (sync, +cache, posters, publishing), `AmazonInstaller` (the queue job), `AmazonNative` (JNI), and two thin +wrappers kept for `StoreSizes`: `AmazonApiClient` (`getGameDownload`, `getBytes`, `appendPath`) and +`AmazonManifest` (`parse(bytes).totalInstallSize`). + +The JNI surface (`nativeConfigure`, `nativeCall`, `nativeFetch`, `nativeInspect`, `nativeInstall`, +`nativeCancel`, `nativeRelease`) is documented in `app/src/main/rust/stores/JNI.md`. The old +`nativeStart` symbol is gone. The Java xz library stays in `app/build.gradle`: commons-compress +needs it for the `.tar.xz` Windows components, so only Amazon stopped using it. + +## Compatibility kept exactly + +- Credentials (`stores/amazon/credentials.json` through `StoreAccounts`): the same keys + (`access_token`, `refresh_token`, `device_serial`, `client_id`, `expires_at`, `display_name`). A + refresh merges `access_token`, `device_serial`, `client_id`, `expires_at` into the stored record + and keeps every other key; a new sign-in writes the whole record. Registration and refresh keep + the launcher's device constants, so existing refresh tokens keep working. +- Preferences `stores.amazon`: `library_cache` (same element keys), `library_synced_at`, + `vcover_<id>`, `size_<id>`, `version_<id>`; sign-out removes only the first two. +- Install folders, the sidecar keys (`extra.entitlementId`, `extra.sku`, no `cloud` key), the + launcher name `.droiddeck-launch.bat`, the `.tmp` naming and the two marker files. +- The catalog item's `extra` (`entitlementId`, `sku`, `version` = `""`) so the shared size cache and + the saved queue keep working. + +## User-Agents and what the probes showed + +Unauthenticated probes of the live services (2026-10-14): + +- **Distribution service** (`gaming.amazon.com`): `GetEntitlements`, `GetGameDownload` and + `GetLiveVersionIds` answered identically for `AGSLauncher/1.0.0`, `DroidDeck/…`, a curl UA, with + and without the `UserAgent` header. A bad token gives HTTP 401 `<NotAuthorizedException/>`; no + token gives HTTP 400 with `com.amazon.coral.service#NotAuthorizedException`. The probes cannot + show whether the UA matters for an authorised call, so the launcher's `User-Agent` and + `UserAgent` values are kept (Amazon's own client identifiers, one constant each in `net.rs`). +- **Identity API** (`api.amazon.com`): register, token and deregister gave the same validation + errors whatever the UA (Firefox, `DroidDeck/…`, none). The desktop Firefox string is kept for + these calls, the same as the WebView: it is a generic browser label, not a client name, and + existing refresh tokens are known to work with it. +- **Sign-in page** (`www.amazon.com/ap/signin`): every UA got Amazon's bot check from the probe + host, so nothing could be learned; the WebView keeps the desktop Firefox string (a sign-in page + that misbehaves would lock every user out). +- **CDN**: no URL is reachable without a token. Manifest and file requests now send + `DroidDeck/<versionName>`, the only third-party label the old integration sent; this needs the + device test below. + +Refusal detection follows the probes: 401, 403, and 400 whose body names `NotAuthorizedException` +mean "sign in again". + +## Judgement calls + +Recommended fixes from the spec, adopted: + +1. **Complete = size and SHA-256.** One test for the space check and the download plan; a + same-size corrupt file is repaired. Files without a SHA-256 (another algorithm) are judged by + size. No cross-run "verified" cache: every present file is hashed on each run. +2. **A failed library page fails the sync** and keeps the old cache; a refused token is reported + with the shared "session expired: sign in again" line, also when a cache is shown. +3. **Single-flight refresh** (`AmazonCredentialStore`); a forced refresh after a failed library call + skips the refresh when another caller already replaced the token. +4. **Mark updating** (`beforeReplace` → `StoreInstalls.markUpdating`) once, before the first file + is put in place (new or replacing; the shared step only acts on an installed record). +5. **Manifest path safety**: absolute paths, any `:` (drive letters and stream names; Windows file + names cannot contain it), NUL, `.` / `..` and empty segments, and DroidDeck's own root files + (`.droiddeck-store.json` and its `.tmp`, `.droiddeck-launch.bat`, the two markers, compared + ignoring case) fail the install naming the path. A manifest that lists both `X` and `X.tmp` is + refused (the second would collide with the first's temporary file). The protobuf reader rejects + truncation, over-long varints, groups and unknown wire types, field number 0, wrong wire types + on the fields used, and a non-empty file without a hash or a SHA-256 that is not 32 bytes. +6. **Exe scoring on relative paths.** The Unreal-folder rule is tested against `"/" + relative + path` so a top-level `Binaries/Win64/…` still matches. The "first five letters" rule compares the + title with the file name **without** `.exe` (the extension's letters would otherwise count). An + empty title never matches the "path contains the title" rule. Ties: larger file, then the earlier + path. Only regular files are candidates; symlinks are not followed; depth is capped at 16. +7. **CDN User-Agent** is `DroidDeck/<versionName>` (see above). +8. **Empty files** whose hash is absent or the SHA-256 of empty input are created locally; stray + `.tmp` siblings of manifest files are removed at run start (other `.tmp` files are untouched). +9. **Markers** `.amazon_download_in_progress` / `.amazon_download_complete` are still written. +10. **Duplicate paths**: the later entry wins with a log warning; files sharing one hash are fetched + once per path (no copy optimisation). + +Other choices: + +- **Install size** is the sum over distinct paths (equal to the spec's "duplicates included" sum + for every manifest without duplicate paths, which none have been seen to have); it is the + progress total, the disk size and `size_<id>`. +- **Free space** is measured in Rust (`statvfs` on the folder or its nearest existing parent), + which is what the shared probe measures; unknown never blocks, a measured zero does. +- **Pre-download check** is reported in the queue's Manifest stage ("Checking files…" with byte + progress), like GOG and Epic: the Downloads UI orders stages Manifest → Download → Verify → + Install, so a Verify stage before Download would read backwards. +- **Concurrency**: one streamed GET per file through the shared fetch core in stream mode (the + speed tier's window clamped to 1–128, per-host cap `max(6, ceil(window / hosts))`, 120 s to the + response headers, the core's 30 s idle cap on the body, its five attempts with back-off and its + stall and 429 handling). A piece at offset 0 restarts the file (a retry); an out-of-order piece, + a body longer than the manifest size, a short body or a hash mismatch deletes the `.tmp` and is + retried; a write error, a refused `beforeReplace` or a failed rename fails the run. +- **Decompression** uses the `lzma-rs` crate (pure Rust; xz with any check type and LZMA-alone), + with a 256 MiB cap on the decompressed manifest. +- **Live version lookup** (`GetLiveVersionIds`) is not implemented; nothing used it. +- **DLC filter**: add-ons are hidden only when they also name a parent product (as the spec's sync + contract says), unless that would hide everything; the Rust call returns the filtered, sorted list + plus the unfiltered count. +- **Sign-in code**: the authorization code is read from the return URL's query (`%XX` decoded, `+` + kept literally; codes are URL-safe). The WebView flow passes the URL to Rust and never logs it. +- **Randomness** for the serial and verifier comes from `/dev/urandom`. +- **`fuel.json`** is found by exact name, else a case-insensitive match at the folder root; a UTF-8 + BOM is accepted. `Main.Command` is accepted after stripping leading `/` and `./`, and must be a + safe relative path naming a regular file. +- **Logs**: the Rust side strips the query string and fragment of every URL in a line before it + reaches `onLog`; the shared redaction runs after that as before. +- **No engine, no store**: without the native library, sign-in, sync and install report + "Amazon Games: the store engine is not available"; there is no Java fallback. + +## What needs device testing + +- An existing signed-in user stays signed in after the update: the library shows from cache at once, + and a forced sync refreshes the token with the stored refresh token and lists the games. +- A fresh sign-in through the WebView (registration, display name), and sign-out (deregistration + fired, library cache cleared). +- A library with many pages; add-ons hidden; posters. +- Install, pause, resume, cancel (folder removed); repair of an installed game (nothing downloaded + when intact; a corrupted file fetched again; "Resume install" offered when a repair is + interrupted); an SD-card install; out-of-space refusal. +- Every endpoint with the chosen User-Agents, the CDN with `DroidDeck/…` in particular. +- Launch of an existing install through its existing Steam shortcut (same shortcut, same prefix) + and of a fresh install (exe choice, `fuel.json` arguments, the five FuelPump variables in + `.droiddeck-launch.bat`); uninstall. diff --git a/docs/development/astra-viture-stereo.md b/docs/development/astra-viture-stereo.md new file mode 100644 index 0000000000..b1debfa0f3 --- /dev/null +++ b/docs/development/astra-viture-stereo.md @@ -0,0 +1,130 @@ +# Astra 2 and VITURE stereo + +## Tested connection + +2026-10-14: REDMAGIC Astra 2, model `NP06J`, Android 16, +`RedMagicOS11.5.16_NP06J_GB`, Snapdragon `SM8850P`; VITURE Pro XR +(`35ca:101d`), firmware `07.0.03.013_20250422`. The tablet reports a locked +bootloader and green verified boot. Tests used the ordinary ADB shell, without root. + +2D negotiates **1920×1080 at 120 Hz**. The glasses accept stereo command +`0x0008 [32]` with reply `00 32`, but Android then exposes **only 640×480 at +60 Hz**. An accepted USB command is not proof of a working stereo signal. +In this state the glasses reject a 2D command (`01 31` or `01 34`) and their +mode query returns `01 00`. A physical cable reconnect restored 1920×1080/120 +with this update; Android then requested USB permission again and control resumed. + +On the fresh attempt, `0x030D [03]` arrived 3.1 seconds after the accepted stereo +command. The vendor SDK maps that report to 2D/120 (`0x34`); the subsequent mode +query was rejected. The report does not encode a fallback reason or establish a +fixed timeout. The earlier command acknowledgement cannot prove stereo retention. + +## What was checked + +| Route | Result on this firmware | +| --- | --- | +| Pro full SBS command `0x32` | Accepted by MCU; physical output falls to 640×480 | +| Android preferred mode 3840×1080/60 | Preference saved; physical supported modes remain 640×480 only; preference cleared after test | +| USB source/host → source/device | Request issued; actual port stayed source/host | +| USB data disable/enable | Data status changed and was restored; physical display remained 640×480 | +| `IUsbManager.resetUsbPort` through ADB | HAL callback reported success (`0`); physical display mode did not change | +| External-display power off/reset | Did not recover the signal; glasses still rejected 2D | +| Physical cable reconnect | Restored 1920×1080/120 and USB controls after the permission prompt | +| OEM mirror/3D controls, source review | Change virtual-display routing, not physical stereo timings | +| OEM resolution selection, source review | Chooses cached resolution candidates and prefers stale 16:9 mode | +| Pro startup mode / half SBS, SDK review | No supported Pro startup-mode setting or half-SBS input | + +Public driver decompilations from the related REDMAGIC 11 Pro (`NX809J`, SM8850) +[retain an active mode override](https://github.com/Coding-BR/android_kernel_nubia_sm8850_qwjujube/blob/efee6f411184886b0fbdaf63fc9db36b3ed96036/decompiled/msm_drm/dp_display_get_modes.c#L37-L44) +across a glasses hotplug. Their [USB-PD disconnect path](https://github.com/Coding-BR/android_kernel_nubia_sm8850_qwjujube/blob/efee6f411184886b0fbdaf63fc9db36b3ed96036/decompiled/msm_drm/dp_display_usbpd_disconnect_cb.c#L127-L147) +clears that override; their simulated hotplug path does not. This is consistent +with the Astra's measured behavior, but does not prove its exact kernel +implementation. That driver also [validates saved user modes against EDID](https://github.com/Coding-BR/android_kernel_nubia_sm8850_qwjujube/blob/efee6f411184886b0fbdaf63fc9db36b3ed96036/decompiled/msm_drm/nubia_edid_modes.c#L226-L250), +so active overrides and saved preferences must not be treated as the same +mechanism. The independent [MagicDesk investigation](https://github.com/mekhontsev/magicdesk/blob/main/docs/xr-resolution-fix.md) +documents a related failure on its separately identified REDMAGIC firmware. + +The [VITURE SDK matrix](https://www.viture.com/en-SG/developer/glasses-sdk/glasses) +specifies full SBS at 3840×1080/60 for Pro. Persistent startup mode is restricted +to Luma/Luma Pro. Among the Luma families supported here, 90 Hz stereo is an +Ultra capability. The connected Pro firmware matches both the N6PL entry in the +[public updater catalog](https://static.viture.com/dfu-util/js/vers.js) and the newest +N6P entry in the [public release-note service](https://cloud.viture.dev/api/v1/system/releasenote) +checked on 2026-10-14. This does not rule out unpublished, device-specific updates. + +## Powered dock results + +A VITURE Pro Mobile Dock (`35ca:3011`) was connected between the Astra and Pro XR. +Its official read-only P9 version query returned `2.01.03.0.03` with a valid +checksum. The Astra negotiated 1920×1080/120, but enumerated only the dock's +USB interfaces, not the glasses' `35ca:101d` control/IMU interfaces. A one-second +DroidDeck IMU sample returned zero packets. + +DroidDeck treats the glasses as a display behind the dock: no USB permission +prompt, video at 1080p/120 on the glasses, no Play SteamVR, refresh, 3D or tracking +settings. The dock alone, without glasses, does not count as glasses. + +VITURE's updater calls this dock P9 (app `35ca:3011`, bootloader `35ca:3010`). Its +HID messages cover dock versions, battery, inputs and LEDs; none sets a display +mode or forwards glasses commands or IMU data. `2.01.03.0.03` is public release +`1.03.0.03_20250709`; the latest, `1.03.0.06_20260409`, adds Beast support and +updater fixes only. The updater also reads a Lontium LT8668 in the dock, a +DisplayPort receiver with its own EDID handling, so the tablet most likely sees the +dock as its DisplayPort sink rather than the glasses. + +[VITURE's Pro Dock specifications](https://www.viture.com/product/viture-pro-mobile-dock) +confirm 3840×1080/60 video support and exclude phone features requiring +communication with the glasses. The vendor SDK also treats the dock as a separate +accessory, not an IMU device. This dock may test the video path, but it does not +provide DroidDeck's current head-tracking path. Stereo negotiation and mode +retention during an upstream-only reconnect still require a physical test. + +## No-root hardware design to test + +A powered pass-through connection may let the tablet see the stereo EDID on a +fresh USB-PD connection while the glasses retain their stereo mode: + +1. Power the adapter and glasses independently of the tablet connection. +2. Enable stereo on the glasses. +3. Disconnect only the tablet's upstream USB-C connection promptly after the + stereo acknowledgement, keeping the glasses powered. Compare with a delayed + disconnect to test whether the observed mode report affects retention. +4. Reconnect the tablet and check its physical supported modes before starting a game. + +This requires an adapter that preserves glasses power and mode during the +upstream disconnect, passes 3840×1080/60 video, and forwards USB HID for controls +and head tracking. [VITURE's Adapter Ultra documentation](https://www.viture.com/academy/adapters/usb-c-xr-charging-adapter-ultra) +explicitly excludes wired glasses data on Android, so it does not satisfy +DroidDeck's current USB control/tracking path. Its power and video specifications +also do not promise mode retention across upstream disconnect. This design +remains **unverified**, not a purchasing recommendation. First verifying stereo +retention through the adapter on a compatible host would provide a useful control. +An intermediary presenting the stereo EDID before first host +connection is another possible design; it must pass the actual stereo timing +and preserve HID access, not merely advertise a wider desktop. + +VITURE advertises full Android functionality for its separate +[USB-C to Glasses and Charging Adapter](https://www.viture.com/en-MY/product/usb-c-to-glasses-and-charging-adapter). +That makes it a candidate for the USB-data experiment, not a confirmed fix. +First check USB enumeration, brightness controls and live IMU data through the +adapter; then test power/mode retention and the stereo timing. + +Success requires Android to expose and select 3840×1080/60, different left/right +eye images to reach the lenses, live head tracking, and repeatable return to 2D. +A wide screenshot or `wm size` override alone does not meet those conditions. + +## App safeguards + +DroidDeck waits up to 20 seconds for physical stereo confirmation. When the +attempt ends at a low-resolution fallback, DroidDeck remembers it for that glasses +model on this device, so Play SteamVR stops requesting 3D after a restart; **Retry** in the +glasses settings clears it. A display that stays missing, such as an unanswered +cast prompt, fails only that attempt. Automatic retries do not loop. +USB mode reports are tracked separately from the physical display. When a session +enabled 3D, stopping it requests a return to 2D, including during negotiation; +this firmware can still require a cable reconnect. Output timing follows +the active glasses display rather than the tablet's requested refresh rate. + +Keep hardware experiments separate from game loads. End the session, force-stop +DroidDeck, and reopen its home screen after each game test. Read current HAL +temperatures rather than cached thermal-service samples. diff --git a/docs/development/cardboard-vr-learnings.md b/docs/development/cardboard-vr-learnings.md new file mode 100644 index 0000000000..202f57d404 --- /dev/null +++ b/docs/development/cardboard-vr-learnings.md @@ -0,0 +1,200 @@ +# Cardboard VR and SteamVR on Turnip: what we learned + +Written 2026-10-13, after the first stretch of Cardboard mode work on the AYN Thor (Snapdragon 8 Gen 2, +Adreno 740, Turnip on KGSL). `docs/cardboard-vr.md` describes how the feature works. This page records +what it took to get there: the traps, why each fix looks the way it does, how to debug a live session, +and what is still open. Read it before the next round of VR work. + +## Where it stands + +| What | Result | +| --- | --- | +| Cardboard mode (lens pass, 3DoF head tracking, recentre) | Works on any picture; picture follows SteamVR on and off | +| SteamVR 2.17.10 ARM64 (the Steam Frame's `deckard-steamvr`) | Starts from the drawer; driver-direct at 60 Hz, dashboard and Steam library in VR | +| Thumper (356400, D3D11, VR launch option) | Menus and levels at 60 Hz, 7 ms CPU / 13 ms GPU, 23 of 6485 frames dropped | +| The Thrill of the Fight (494150, Unity) | Gym loads, 60 Hz, 6.5 ms CPU / 8.5 ms GPU | +| The Lab (450390) | Loads, then Android's low-memory killer takes the whole app | +| SUPERHOT VR (617830) | Reaches its EULA in the dashboard (not accepted in testing) | +| SteamVR Home | Blocked: Proton's `vrclient_x64` lacks `IVROverlayView_002` | +| `helloxr -g Vulkan2` (OpenXR) | Session focused and submitting, picture shows as torn tiles | + +Screenshots from the Thor: [Thumper gameplay](evidence/cardboard-thumper-vr-gameplay-2026-10-13.png), +[Thumper title](evidence/cardboard-thumper-vr-cardboard-2026-10-13.png), +[The Thrill of the Fight](evidence/cardboard-thrill-of-the-fight-cardboard-2026-10-13.png), +[the SteamVR dashboard with a game's EULA](evidence/cardboard-steamvr-dashboard-2026-10-13.png). + +Games run as x86-64 Windows builds through Proton ARM64 (FEX, DXVK). Proton's `vrclient_x64` forwards +OpenVR to SteamVR's ARM64 `vrclient.so`, so no x86 SteamVR is involved. + +## Turnip on KGSL: the four things SteamVR trips over + +1. **`VK_KHR_display` makes the GPU disappear.** Turnip on KGSL enumerates no physical device when an + instance enables it ("I can't KHR_display"). `vrcompositor` always asks for it. The layer takes the + display extensions off the instance and fakes one display, mode and plane backed by a headless + surface. Headless surfaces report a `UINT32_MAX` extent, so the swapchain is sized from the mode. +2. **No exportable semaphores.** SteamVR shares a timeline semaphore with every shared image as an + opaque fd, and Turnip/KGSL cannot export one. The layer creates the semaphore unshared and hands out + a memfd (`droiddeck-shared-sem`) holding a 64-bit counter. A poller thread in each process carries + values both ways every 300 µs. Dropping the semaphores outright, the first attempt, gave torn + dashboard tiles. +3. **Wait-before-signal blocks the submitting thread.** Turnip does not defer a submit that waits on + a timeline value nobody has signalled yet; `vkQueueSubmit` sleeps until it is. SteamVR's client + waits on a compositor value that the compositor signals only after the client has submitted and + said so, so every client deadlocked before its first frame: + - `helloxr` blocked in a wait-idle in `vrclient.so`; + - DXVK's `dxvk-queue` thread blocked in Proton games. + + The layer now gives a submit's wait on an imported shared value 3 ms, then drops it, at once when + the shared counter has not moved for 100 ms. It is kept when the value is already reached, when + this process has queued the signal itself, or while a Quest session's frame socket exists (checked + at most once a second). Three details mattered: + - the waits are judged before the submit's own signals count, because an acquire waits on one + value and signals the next on the same semaphore; + - SteamVR's client interop device is Vulkan 1.0, so only the `KHR` entry points resolve there; + - a Proton game waits on two values a frame that are never signalled (5,500 dropped, none reached + within 200 ms afterwards). With the grace on each, Angry Birds VR's submit thread lost 6 ms a + frame and the game ran at 60 fps; without it, 120. +4. **UBWC layouts must agree.** An imported image has to be created with the same + `VkImageFormatListCreateInfo` (sRGB + UNORM) as its creator, or Turnip lays out the compression + differently and the reader sees garbage. The presenter's eye-texture import does this. + +## Other traps, in the order they cost time + +- **A still headset goes to standby.** A phone on a table looks unworn, SteamVR enters standby after + about 15 s, and the compositor stops submitting. The driver's proximity sensor reads "worn" while + Cardboard is on. +- **Emulated SysV semaphores never set `sem_otime`.** SteamVR's web helper waits for it to become + non-zero before using a semaphore set, so the dashboard never appeared. `sysv.c` now stamps + `sem_otime` and `sem_ctime`. +- **Steam's web helper needs the layer too.** It shares Steam's in-VR overlays with SteamVR and crashed + without the layer; after a few crashes Steam quits. Its GPU process outlives SteamVR runs, so + `steamwebhelper` gets the semaphore bridge whenever SteamVR is installed, not only while SteamVR's + `active` marker exists. It never gets the display stand-in. +- **Keep the layer out of ordinary sessions.** As an implicit layer it loads everywhere. Display + extensions are only taken off while SteamVR runs, a new session clears a leftover `active` marker, + and without SteamVR installed every process gets the driver's functions unchanged. Review feedback + on the first version pointed out that gamescope asking for a display extension would have been + rewritten in an ordinary session. +- **The `active` marker race.** Clearing a stale marker whenever `vrserver` is not running also + cleared it during startup, before `vrserver` appeared, because the app polls status every 3 s. Steam + quit as a result. Only a marker older than 2 minutes is cleared now. +- **Signal handlers in Proton games.** The layer's crash tracer replaced the `SIGSEGV` handler that FEX + and Wine rely on, and The Lab crashed in FEX's JIT. It now installs only where nothing handles the + signal. +- **mangoapp owns gamescope's single external overlay slot**, so an X11 presenter has to use + `STEAM_OVERLAY`. The default presenter is now a Wayland window on DroidDeck's own compositor, kept + on top by app id. +- **Memory.** Steam, SteamVR and one VR game fit in the Thor's 12 GB. A large game such as The Lab, or + two games at once, push the device into critical pressure, and the low-memory killer takes + DroidDeck itself (`ended-without-teardown.txt` in the session logs, `lowmemorykiller` in logcat). +- **Adreno 840 forced sysmem.** On the Fold with VITURE Luma Ultra, launching SteamVR from the library + inherited `TU_DEBUG=sysmem` and produced `vkerror=-4`, triggering recovery. Adding `noubwc` still + failed; replacing the flags with `noubwc` or an empty value worked. The shared launch helper removes + only `sysmem` on `Adreno840*`, leaving other flags, the parent Steam session and other GPUs unchanged. + The user confirmed improved landing-area brightness and colors with this configuration and asked + to preserve them. +- **Adreno 840 with DD-Turnip v0.2.0.** SteamVR reproduced `vkerror=-4` with `sysmem` removed, + including on the previous app build and with the presenter disabled. After a phone reboot, + the unchanged `fcf8c588` baseline rendered for 109 seconds without observed device loss. + `TU_DEBUG=flushall` initially appeared promising: a global run rendered for over a minute, + and a SteamVR-only run rendered for about 32 seconds before background suspension. The + packaged SteamVR-only change then reproduced device loss with `flushall` confirmed in + `vrcompositor`, so the automatic flag was removed. These bounded runs do not establish the + underlying cause or a reliable workaround. +- **Live files are not cache.** Android's `installd` evicted `cache/shm/u10528-*` while SteamVR was + running, followed by Chromium shared-memory failures and lost IPC. Shared memory, emulated device + files, sandbox trees and PRoot temporary files now use `no_backup/guest-runtime`, retaining their + existing cleanup lifetimes. Session state must survive cache eviction. +- **One host signal owner.** The submit-wait path must not mirror a shared timeline value itself: + the poller can signal it between the submit thread's counter read and signal, producing an invalid + duplicate signal. The poller now owns mirroring; a forced-interleaving test covers this race. +- **Lost hand tracking is not a disconnect.** Publishing a disconnected pose and then a connected, + untracked pose on every optical update floods SteamVR with device-change notifications. With + uncalibrated hands this grew its web buffer to about 34 MB and triggered the Web thread watchdog. + Release inputs and publish only the connected, untracked pose; reserve disconnection for an + actual controller removal. The controller regression exercises repeated loss and reacquisition. +- **Failed realtime scheduling can still install a CPU limit.** On the Fold, SteamVR's SDL RTKit + fallback set `RLIMIT_RTTIME` to 100/200 ms despite realtime priority being refused. The render + thread later received kernel `SIGXCPU` during `IOCTL_KGSL_GPU_COMMAND`, with policy `SCHED_OTHER` + and the soft limit advanced to 1100 ms, confirming the realtime watchdog fired. The VR scheduling + preload rejects lowering this limit only in `vrcompositor` when `RLIMIT_RTPRIO` is zero and + `CAP_SYS_NICE` is absent. It preserves inherited limits, other processes and other resources; + it does not intercept signals. SDL's scheduling hint cannot cover SteamVR's direct + `SDL_LinuxSetThreadPriorityAndPolicy` call. A native preload regression covers rejection and + forwarding. The exact Android kernel boost/accounting path was not established. +- **Frames shown out of order.** Video from the glasses jumped back a few frames in bursts while the + head turned. Two causes, each found by stamping a frame counter into the presenter's output: + - the presenter copied SteamVR's eye texture a fixed 4 ms after `Present`, with no fence. Under + GPU load `vrcompositor` had not drawn it yet, so the copy got that texture's previous frame. The + layer now fences `vrcompositor`'s submits and the presenter waits for the frame's count; + - DroidDeck's compositor copies a Wayland client's dma-buf without waiting for its implicit fence, + and KGSL does not order the copy after the client's GPU work. The presenter's blit sat behind the + game's frame, so the compositor showed the swapchain image's older picture. The presenter now + waits for its blit before it presents. +- **Flat games under SteamVR.** With SteamVR running, Steam lists a flat game after its own window in + gamescope's base layer, so Big Picture keeps the focus and the game never shows, theatre setting or + not. SteamVR is therefore started only by Play SteamVR, never with the glasses alone. +- **A new projection needs an event.** `SetDisplayProjectionRaw` changed what `vrserver` reports, but + `vrcompositor` kept the frustum it started with, so the glasses' field of view did nothing until + SteamVR restarted. The driver now follows it with `VREvent_LensDistortionChanged`. +- **Head-tracking axes.** With the display at `ROTATION_90`, screen x is minus device y and screen y is + device x. Getting this wrong made a turn at the hips tilt the view. Recentring now keeps the world + vertical and resets the heading only. + +## Library launch validation (2026-10-15) + +Two hands-off launches through the Steam library's Launch button completed 308 seconds and +188 seconds, with an intentional stop between runs. Each retained its compositor process and +session, sustained 60 fps, showed dashboard/world transitions, and kept USB control and valid +6DoF head tracking. Neither run reported device loss, a watchdog abort, recovery, or a session +restart. Hand controllers remained enabled but uncalibrated. Brightness stayed at 8; no shader +color changes or temporary graphics overrides were used. + +These timed runs used APK SHA-256 +`4ce7a623ceb6b1a100c0ed1184530ece2ea8e13a1cb9ee6c0ab24666a8249004`. A newer calibration/recenter +APK was subsequently installed and verified; see `luma-spatial-evidence.md`. The timed results +do not establish sustained gameplay or calibrated-hand acceptance for that newer build. + +## Debugging a live session + +- **Logs:** `~/.local/share/Steam/logs/{vrserver,vrcompositor,xrclient_*}.txt` and + `/run/droiddeck/droiddeck-steamvr/vrstartup.log`. Lines from the driver start with `droiddeck:`, + lines from the layer with `[droiddeck-vr-layer]`. A game's layer messages land in the session log. +- **Markers beside `active`** in `/run/droiddeck/droiddeck-steamvr/`: + - `crashtrace` prints backtraces on fatal signals; + - `semtrace` logs each bridged semaphore's local and shared value every 2 s, named by the memfd + inode so the same semaphore can be matched across processes, plus the first waits, signals and + shared image create infos. + + Both are read when a process starts. +- **Frame stats:** in `/opt/steamvr/bin/linuxarm64`, `LD_LIBRARY_PATH=. ./vrcmd --stats` reports + submits, drops and app CPU/GPU times. `./vrcmd --hidedashboard` closes the menu SteamVR opens over a + new game. +- **Where a process is stuck:** a stack scan of `/proc/<tid>/mem` from the saved stack pointer (a small + Python helper) gives module+offset frames. That is how the wait-idle in `vrclient.so` and the + blocked `dxvk-queue` thread were found. +- **VR launch options:** `SteamClient.Apps.GetLaunchOptionsForApp(id)` lists them, and + `SteamClient.Apps.RunGame("<id>", "", <index>, 100)` starts one, through `droiddeckctl cdp eval`. +- **Quitting:** `droiddeckctl quit <appid>`. Without the id the game keeps running. +- **Pitfalls when testing:** + - never `pkill -f` or `pgrep -f` a pattern inside a guest command, because it matches the + command's own shell; use `pgrep -x`; + - replace a loaded `.so` by copying to a temporary name and `mv`, never `cp` over it; + - a session start restages the driver and layer from the APK assets, so a hand-copied build is + lost on the next start. + +## Open items + +- **`helloxr` picture.** Both sides create the swapchain images with identical parameters, so this is + not the UBWC import issue. Reading an image mid-render (the dropped wait) or binning tiles is the + next suspicion. +- **SteamVR Home** needs `IVROverlayView_002` in Proton's `vrclient`, or an ARM64 build of Home. +- **The Lab and other large games** need memory headroom. Candidates: stop Steam's own web helpers + while a VR game runs, or lower SteamVR's footprint. +- **Wait drops are a heuristic.** A 3 ms grace keeps the common case in sync, and an idle counter + skips it. A submit thread in the layer, deferring submits until their waits are reachable, would be + exact. +- **Layers:** only the first layer of each frame is presented. No reprojection. +- **Controllers** are a gaze pointer driven by the pad. Pad presses did not close the SteamVR menu in + testing. Untested: whether that came from gamescope focus being on Steam, or from the system button + mapping. diff --git a/docs/development/comet-integration-plan.md b/docs/development/comet-integration-plan.md new file mode 100644 index 0000000000..2a90559f26 --- /dev/null +++ b/docs/development/comet-integration-plan.md @@ -0,0 +1,159 @@ +# Comet integration research and implementation plan + +Researched 2026-10-12 against DroidDeck `10ef8c4bd62b21872fc13382a808cb0f2f117b26` (0.4.0). +The research below informed the implementation on `feat/gog-comet-achievements`, rebased onto refreshed main `a2a9586b`. Controlled SDK unlock/upload has now been verified on Thor; wider gameplay coverage remains an acceptance test for users. + +## Implementation and testing status + +Implemented an opt-in GOG companion built from pinned Comet v0.3.2, credential transfer through stdin, one owned daemon per session/account, private persistent databases, per-game settings, and first-launch Galaxy service provisioning using the selected Proton. Local unlocks, pending uploads and successful uploads produce sanitized session events. The game settings card shows pending/uploaded/unavailable status for the companion in the current session; it is not a per-game achievement history. Local unlocks now show an animated DroidDeck notification with the achievement icon, name and game title. The achievement reader comes from main; upload acknowledgements refresh its progress. No Galaxy overlay is installed. The session-menu reader is available only for a live supported GOG/Epic game window with a nonempty achievement list, including while Steam's overlay is open; GOG browsing does not require Comet syncing to be enabled. Epic syncing remains a separate investigation. + +Comet's patch also uses an unconditional periodic sync tick during SDK traffic, preserves retries after failed achievement POSTs, and limits SDK clients to enabled installed GOG games. Credential errors and raw upstream protocol output are not forwarded to Android/session logs. + +Validation on AYN Thor (`192.168.0.8:38029`, Linux runtime r9): + +- ARM64 companion runs and receives credentials through proot stdin; owned readiness occurs in under a second. +- A fresh disposable prefix installs the x64 dummy service through ARM64 Proton/FEX before its first launch. +- ELDERBORN (GOG product `1732383191`) launches through the normal managed Steam shortcut. Its Galaxy SDK authentication and 27 achievement definitions can be read through Comet, and independently from GOG's gameplay API. +- Normal session stop removes the owned companion and preserves its database. +- Release APK builds; 694 JVM tests pass and all 20 store-launch tests pass. +- Linux Docker suite: 548 tests, 518 pass, 29 skipped, one failure in the unchanged x86 SIGILL fault-report test (Docker reports `si_code 01`, assertion expects `02`). This is an environment-dependent mismatch, not a green full-suite result. + +The reader updated from 0/27 to 1/27 and back after upload/reset without reopening. A temporary protocol probe unlocked locked ELDERBORN achievements after twenty seconds, repeated the SDK request, confirmed the new unlock independently through the GOG gameplay API, and cleared each tested achievement afterward. The notification appeared once over the focused game and dismissed after five seconds. A temporary per-app HTTPS rejection confirmed a local popup, pending upload, and successful retry after the rule was removed; the account records and network rule were restored. Account changes with pending data, first-ever offline launches, 32-bit titles, and wider game/Proton compatibility still need user testing. A current Steam live-shortcut API mismatch required restarting Steam after installing the test game; the normal startup shortcut worked. That existing issue is outside this change. + +## User test guide + +1. Sign into GOG and enable **GOG achievements** in Stores settings. It is off by default. Keep the game's own achievement switch enabled in its launch settings; cloud saves may be on or off. +2. Start a supported GOG game using a DroidDeck managed compatibility tool. Obtain a genuinely unearned achievement through normal gameplay. +3. Check the game's GOG profile independently. Allow at least ten seconds online and a normal game exit. A local unlock should show a five-second notification over the game. The popup confirms the local unlock; check the GOG profile or the uploaded event for server delivery. +4. Include the game/product ID, device, Proton choice, whether the prefix was new, and online/offline sequence with the session report. The `gog.achievements` events distinguish `unlocked-locally`, `pending-upload` and `uploaded`; `uploaded` is emitted only after a successful GOG POST. Do not include credentials. +5. If the game has trouble with the companion, disable its achievement switch and relaunch. Changes to these switches apply on the next game launch. + +## Recommendation and scope + +Integrate Comet as a native ARM64 Linux companion for **GOG Galaxy achievements** inside DroidDeck's existing Linux/Proton session. Start with an opt-in GOG setting and a per-game disable switch. Cover launches from Games, Stores, Android shortcuts, Steam's own Play button, and KDE when those paths use DroidDeck's managed compatibility tool. + +Comet handles the Galaxy SDK requests made by a game and uploads achievements to that game's GOG account. It does not transfer achievements between storefronts, add achievements to games without Galaxy SDK support, or implement Epic achievement sync. [Comet README](https://github.com/imLinguin/comet/blob/19b32597019ea1e64f1916010441960bcaac6e49/README.md) + +Treat the screenshot as two workstreams: + +| Request | Approach | Initial deliverable | +| --- | --- | --- | +| GOG achievements | Comet + existing GOG sign-in + Proton prefix setup | An unlock reaches the correct GOG profile from a real DroidDeck launch | +| Epic achievements | Validate the game's EOS authentication, deployment, consent and achievement calls | Evidence of an EOS unlock and the corresponding Epic profile update; fixes only where a failure is demonstrated | + +Epic Games Store achievements are linked to EOS achievements in a game-specific deployment. A generic launcher service cannot create that integration for a title. DroidDeck already supplies EOS identity/deployment arguments and a fresh exchange code. [Epic achievement setup](https://dev.epicgames.com/docs/epic-games-store/services/epic-achievements/achievements-setup), [Epic authentication guide](https://dev.epicgames.com/docs/epic-online-services/accounts-and-social/eos-epic-account-services/auth-interface/auth-guide/auth-intro) + +## What was verified + +- Local `main` fast-forwarded from `b6c1d3c0` to `10ef8c4b` and matched refreshed `origin/main`. +- Removed seven clean, remotely backed checkouts with non-force `git worktree remove`; pruned nine registrations pointing to missing directories. Kept dirty worktrees, open-PR work, credentials, captures, and uncertain checkouts. Remote branches and PRs were not changed. +- Inspected Comet release `v0.3.2` (`3d7488ee72f83b7e8462a70fd4c4638d6da71360`) and upstream main (`19b32597019ea1e64f1916010441960bcaac6e49`). Main has substantial unreleased changes, including progress-stat workarounds. Use a pinned release as the initial baseline; evaluate later changes individually. +- Downloaded `comet-aarch64-unknown-linux-gnu` and `dummy-service.zip` from v0.3.2. ELF inspection confirmed AArch64, interpreter `/lib/ld-linux-aarch64.so.1`, dependencies on `libgcc_s`, `libm`, `libc` and the loader, and required GLIBC symbols through 2.34. Binary size is 11,365,728 bytes, before APK compression. +- The current Linux runtime catalog is `linuxfs-r9`, described as Arch Linux ARM aarch64. This is separate from the Debian image used for x86 preload builds. Actual loader/library compatibility must still be checked in the installed runtime. +- Inspected Heroic main `db5272043e74336b72bc60caad14ca74701082d8`: its GOG launcher spawns Comet with `--from-heroic --username ... --quit`, then terminates it after the game. That establishes a reference integration, but its process and credential handling should not be copied wholesale. + +Downloaded artifact hashes, useful for reproducing this inspection: + +```text +comet-aarch64-unknown-linux-gnu +c8cd850a03ba66c10bf620eee2735946ddf0b5969cd38cae02c6bede6d15c5b8 +dummy-service.zip +7fc5facd1fce4d516cd3ce527e7e4dbe0bfd17649cea805e8ea7c37d4ba58d9a +``` + +These are locally measured hashes, not independently signed upstream attestations. A patched build will have different hashes. + +## Existing DroidDeck integration points + +| Source | Existing behavior | Proposed change | +| --- | --- | --- | +| `stores/gog/GogAuth.kt`, `stores/LoginFlows.kt` | Saves access token, optional refresh token/user ID, username; refreshes expired access tokens | Add a validated Comet credential snapshot, recover missing identity where possible, serialize refresh and sign-out | +| `stores/StoreAccounts.kt`, `stores/CredentialCipher.kt` | Keeps store credentials encrypted with Android Keystore | Keep these as the durable credential authority; do not export a persistent Heroic auth file | +| `stores/StoreLaunchRequests.kt` | App-side request handler under the session's `stores/req` and `stores/resp` | Handle GOG companion preparation; ordinary replies contain status, not tokens | +| `tools/linuxfs/overlay/usr/local/bin/droiddeck-store-launch` | Finds sidecars beside a launcher or ancestor of a direct `.exe`; runs before managed Proton launches | Detect GOG settings, request companion readiness and arrange prefix setup, independently of cloud saves | +| `tools/linuxfs/overlay/usr/local/bin/steam-compatibility` | Generates compatibility wrappers; waits for Proton and calls `--exited` when cloud saves are enabled | Generalize post-game handling so achievements still get lifecycle handling with cloud saves disabled | +| `session/SessionService.kt`, `session/SessionFiles.kt` | Stages session helpers, starts request observation and tears down the guest | Own the companion's session identity and cleanup; request graceful shutdown before guest teardown | +| `stores/StoreGameSidecar.kt`, `stores/gog/GogPrefs.kt` | Persist game and store settings | Add backward-compatible GOG achievement settings; keep game tokens out of sidecars | +| `app/build.gradle`, `tools/build_local.sh`, `.github/workflows/build.yml`, `tools/release/runtime_inputs.py` | Prepare, cache and attest runtime assets | Include pinned Comet binary, service tools, licenses and build inputs in both local and CI APK paths | + +Paths above are under `app/src/main/java/com/droiddeck/launcher/` unless fully qualified. + +`ComponentsManager.kt` manages FEX/DXVK/VKD3D packages. Comet should initially be an internal runtime asset rather than an additional graphics-component type. + +## Proposed architecture + +### 1. Package a pinned companion + +Build from Comet v0.3.2 with a small, reviewable patch set and its protocol submodule pinned. Put the executable and dummy-service tools under a dedicated guest directory such as `/usr/local/lib/droiddeck-comet/`. Ship the Apache-2.0 license and attribution. Add a `tools/comet/` build recipe and source/patch/hash metadata using the existing prepared-runtime conventions. + +Keep the current upstream ARM64 asset as the initial compatibility probe. The production build needs the credential and logging changes below. Ensure the Rust/toolchain baseline supports the pinned release and that CI cache keys and runtime attestation include the new inputs. Exercise cached and uncached builds, plus runtime installation into an existing app installation. + +### 2. Hand off credentials without putting them in command lines + +Comet's real CLI uses `--access-token`, `--refresh-token`, `--user-id`, and `--username`; the README contains outdated spellings. These flags put tokens in process arguments. `--from-heroic` reads a plaintext Heroic auth file, and its Linux parser uses `XDG_CONFIG_PATH`, not the usual `XDG_CONFIG_HOME`. Neither is the preferred production handoff. [CLI source](https://github.com/imLinguin/comet/blob/3d7488ee72f83b7e8462a70fd4c4638d6da71360/src/main.rs), [Heroic import source](https://github.com/imLinguin/comet/blob/3d7488ee72f83b7e8462a70fd4c4638d6da71360/src/import_parsers/heroic.rs) + +Add a small Comet credential-input option that accepts JSON over stdin or an inherited file descriptor. The Android-owned supervisor launches Comet through the existing proot command builder, writes one validated snapshot into its stdin, closes it, and tracks the process. Prove this pipe survives the proot setup before committing to the plumbing; if it does not, use a short-lived private mode-600 file with immediate unlink and startup cleanup. + +The snapshot needs a usable access token, refresh token, numeric GOG user ID and username. Existing logins may lack refresh token or user ID: current `saveLogin` accepts both as optional and only saves the username from its user-data lookup. Recover identity through GOG's authenticated user endpoint where possible. If no refresh token exists, show a specific GOG re-sign-in requirement and let the game launch without achievement support. + +Comet exchanges the Galaxy refresh token for each game's SDK client credentials; the game's SDK handshake supplies its client ID/secret. Do not confuse the store product ID with the SDK client ID, and do not require those per-game secrets in a store sidecar. Explicit offline preloading is a separate case and can wait. + +Patch or sanitize Comet's HTTP error logging as well: token requests encode credentials in URLs, and raw `reqwest` errors can include those URLs. Filter before stderr reaches session logs, crash reports, or exported artifacts. Passing secrets through stdin alone is insufficient. [Token exchange source](https://github.com/imLinguin/comet/blob/3d7488ee72f83b7e8462a70fd4c4638d6da71360/src/api/gog/users.rs) + +### 3. One owned daemon for the session/account + +Comet binds `127.0.0.1:9977`. Proot does not provide a private network namespace. Use a serialized ensure-running operation for one owned daemon per active session/account, shared by GOG games in that session. Verify process identity, session generation and GOG account before reuse; an occupied port is not proof that our daemon is ready. If another service owns the port, report unavailable and continue launching the game. + +Prefer session ownership over `--quit`: upstream's idle quit requires a client to have connected, so games without Galaxy can leave it running indefinitely. Explicit lifecycle ownership also avoids stopping it while another GOG client is active. Readiness should come from the owned process's listening event plus liveness, with a bounded wait; a probe connection has side effects on Comet's client/idle accounting. + +Give Comet a persistent, private data location outside the session request tree and game directory through process-local XDG settings. Upstream stores gameplay databases by `<SDK client ID>/<user ID>/gameplay.db`. Preserve these databases across session resets and APK updates. Stop the old daemon on sign-out/account change, retain pending data under the old account, and never upload it using the replacement account. Provide explicit data deletion separately from sign-out. + +### 4. Provision the game's actual Wine prefix on its first launch + +Some Galaxy SDK versions need the Windows `GalaxyCommunication` service even though Comet itself runs on Linux. The release ZIP contains `GalaxyCommunication.exe`, `install-dummy-service.bat`, and `update-permissions.exe`; packaging only the standalone service executable misses part of upstream's setup. [Dummy-service instructions](https://github.com/imLinguin/comet/blob/3d7488ee72f83b7e8462a70fd4c4638d6da71360/dummy-service/README.md) + +Use the title's selected Proton build and `STEAM_COMPAT_DATA_PATH`, not a global prefix. After Proton has created/updated that prefix, copy the tools into the prefix and idempotently register the service with `sc`, including the upstream permission adjustment where necessary. Preserve an existing genuine Galaxy installation or service. Record completion only after service verification, with a versioned marker so tool updates can be applied safely. + +This is an explicit first-launch problem: the existing `droiddeck-store-launch` runs before Proton creates a new prefix, and several existing registry helpers defer until a later launch. Add a guarded bootstrap/prelaunch stage using the selected Proton, prevent recursive store preparation, wait for its wineserver as needed, then register the service before starting the game. Do not accept "works on the second launch" as completion. + +Test PE x64 service tools through DroidDeck's ARM64 Proton/FEX path and at least one 32-bit Galaxy game. Architecture fit of the Linux daemon does not prove the Windows helpers work. + +### 5. Keep sync and teardown honest + +Upstream persists changed achievements in SQLite, has a sync branch after ten seconds without another selected event, and performs a final sync when a client handler ends. This is not an unconditional ten-second timer or a guarantee of server delivery. Failed achievement PUTs retain database `changed` markers, but the examined sync routine clears its in-memory update flag after processing even when an individual upload fails. Require a targeted retry test and a narrow fix if it confirms that no retry occurs while the client remains connected. [Handler source](https://github.com/imLinguin/comet/blob/3d7488ee72f83b7e8462a70fd4c4638d6da71360/src/api/handlers.rs) + +Allow disconnect/final sync before daemon shutdown, then use SIGINT (upstream explicitly handles Ctrl-C) with a bounded grace period. Add shutdown handling before `SessionService` tears down proot; adding it only to `finishSessionStop` is too late. Forced termination must leave durable pending data for the next valid game connection. Avoid promising a headless "sync everything" action: upstream's pending data is game-scoped and its CLI does not expose that operation. + +Offline support depends on prior metadata/cache availability. First-ever offline starts are not guaranteed. Test cached offline unlocks, reconnection in the same launch, next online launch, forced stop, and app updates. Preserve both local dirty unlocks and unlocks made on another machine during reconciliation. [Offline issue](https://github.com/imLinguin/comet/issues/16) + +### 6. Keep the first UI small + +Add an opt-in **GOG achievements** setting and a per-game override. Keep this independent of the cloud-save toggle. Show actionable states such as sign-in needed, service unavailable, and connection established; distinguish local unlocks from uploads actually accepted by GOG. Include redacted diagnostics in the existing session report. + +Defer a unified achievement browser, Android unlock toasts, GOG overlay downloads/injection, leaderboards UI, multiplayer and playtime claims. Upstream can implement more than achievements, but those features require their own validation. Comet itself downloads Galaxy peer redists in the background, so measure that network/cache behavior before deciding whether to defer or package it. + +Keep a per-game escape hatch: upstream has reports of incompatible games and crashes when Comet is enabled, including [Rise of the Tomb Raider](https://github.com/imLinguin/comet/issues/80) and [unhandled message type 43](https://github.com/imLinguin/comet/issues/90). These are reports, not reproduced DroidDeck failures. + +## Implementation order and acceptance gates + +1. **Compatibility spike:** run the pinned ARM64 daemon's `--help` in the installed Thor runtime; prove localhost connectivity from Wine, proot stdin handoff and first-prefix dummy-service setup. Use a known Galaxy-achievement game owned by the test account. Do not change graphics or download behavior to mask a Comet failure. +2. **Build and credential foundation:** add reproducible assets, license notices, stdin/FD input, credential validation, refresh serialization and log redaction. Verify cached and uncached APK asset preparation. +3. **Launch and lifecycle integration:** add the serialized session supervisor, GOG prepare operation, first-launch prefix provisioning, persistent databases, sign-out handling and shutdown before guest teardown. Verify cloud-off still retains achievement lifecycle handling. +4. **Settings and targeted coverage:** add opt-in and per-game override, useful status, request timeout/error cases, process reuse/conflict cases, database preservation, and fake-secret leak checks. Extend `tools/tests/test_store_launch.py`, `test_store_shortcuts.py`, `test_game_environment.py`, `test_runtime_inputs.py` and relevant JVM tests rather than duplicating unrelated suites. +5. **Device acceptance:** verify an actual unlock appears on the correct GOG profile, then launch the same game twice and another game in a different prefix. Cover Steam Play, app launch, KDE, internal/SD installs, service-required and service-free titles, cloud-off, offline/reconnect, transient upload failure, suspend/resume, normal exit, drawer Stop, force stop, account change and app update. Record exact APK/runtime/Proton versions. + +For the initial spike, use an upstream-listed service-free title such as Hollow Knight and a service-required title such as Cuphead, subject to ownership and the current installed build. The [compatibility table](https://github.com/imLinguin/comet/blob/19b32597019ea1e64f1916010441960bcaac6e49/docs/wiki/Game-Compatibility.md) is a starting point, not a DroidDeck compatibility guarantee. + +A first GOG PR should include the complete minimal path through packaging, authentication, first launch, sync and teardown. Split Epic into a separate investigation/PR so a GOG success is not presented as fulfilling the Epic half of the request. + +## Epic investigation + +Choose a game with published Epic Games Store achievements and an easy unearned achievement. Establish current behavior before adding code: verify the exchange code, expected production sandbox/deployment, browser consent completion and successful EOS Auth/Connect identity. Observe the game's EOS achievement callback and verify the Epic profile independently. + +Current `droiddeck-store-launch` deliberately removes an old `HKCU\Software\Epic Games\EOS\OverlayPath` because that overlay setup caused a launch exit. Do not blindly restore it or globally replace game EOS DLLs. Determine whether the selected title needs additional EOS redistributable/overlay support, and reproduce any missing authentication or unlock behavior before patching. Sync, profile visibility and notification overlays are separate acceptance criteria. + +## Remaining uncertainties + +The original research was static. The implementation validation and remaining device acceptance tests are recorded above; controlled GOG SDK unlock/upload and failed-upload retry are verified; Epic EOS behavior remains unverified. Forced Android process teardown, account replacement with pending data, and wider real-game coverage remain acceptance tests. + +Additional source: [Heroic GOG launch integration](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/db5272043e74336b72bc60caad14ca74701082d8/src/backend/storeManagers/gog/games.ts), [Comet v0.3.2 release](https://github.com/imLinguin/comet/releases/tag/v0.3.2). diff --git a/docs/development/discord-build-channels.md b/docs/development/discord-build-channels.md new file mode 100644 index 0000000000..3b2cedcc26 --- /dev/null +++ b/docs/development/discord-build-channels.md @@ -0,0 +1,29 @@ +# Discord build channels + +Use the same names as the app's Updates page: + +| App | Discord | Builds | Existing webhook secret | +| --- | --- | --- | --- | +| Preview | [#preview-builds](https://discord.com/channels/1552707793247539220/1554202932965015583) | Signed builds of `main`, including merged fixes | `DISCORD_BUILDS_WEBHOOK` | +| Test builds | [#test-builds](https://discord.com/channels/1552707793247539220/1557605185365217340) | Signed builds of individual open pull requests | `DISCORD_PR_BUILDS_WEBHOOK` | + +Stable contains tested releases published from version tags. Preview contains the newest +merged fixes before Stable; Test builds let users try an unmerged fix by its PR number. + +## Renaming safely + +Rename the existing Discord channels in place. Keep their IDs, permissions, and webhooks. +The webhook URLs used by `build.yml`, `pr-release-publish.yml`, and `pr-release-cleanup.yml` +route by ID, so changing a channel's name or topic needs no secret rotation or routing change. +Keep the existing GitHub secret names even though they use the old channel terminology. + +PR publication saves `webhook_id` and `message_id` in the signed build report comment. +Republishing edits that message; closing or merging the PR retires it. Neither operation +looks up a Discord channel by name. Keep the existing webhook so those saved references +continue to work. Recreating a channel or webhook is a different operation and needs a +separate migration. + +For future renames, check the channel and webhook IDs before and after, verify that the +existing webhook token can still read an earlier build message, and inspect the next +publish/update/retirement runs. Separately hosted bots may have their own configuration; +this repository only controls the GitHub Actions build announcements. diff --git a/docs/development/epic-cleanroom.md b/docs/development/epic-cleanroom.md new file mode 100644 index 0000000000..e121d4caf6 --- /dev/null +++ b/docs/development/epic-cleanroom.md @@ -0,0 +1,144 @@ +# Epic Games Store module: clean-room rewrite + +The Epic integration (the Rust `epic` module in `libdroiddeckstores.so` and the Kotlin package +`com.droiddeck.launcher.stores.epic`) was rewritten so that it carries no code from the earlier +implementation, whose Rust module stated derivation from third-party Epic clients. This page +records how that was done and every judgement call the new code makes. + +## Process + +1. **Spec, written separately.** A functional specification (six documents: summary and unknowns, + service protocol, manifest and chunk formats, install behaviour, on-disk compatibility, and the + app-facing interface) was written from the old code by a separate pass. It describes behaviour + and data formats only, not code structure. +2. **Implementation from the spec only.** The implementer worked from those documents and from + code that is not Epic-specific: + - read: the spec; the crate's `Cargo.toml`, `lib.rs`, `stores_jni.rs`, `priority.rs`, + `fetch_tuning.rs`, the shared `fetch_core.rs` and the GOG module (for crate, threading and JNI + conventions); `JNI.md`; the Kotlin code outside `stores/epic/` that calls Epic (to keep its API); + build files and CI; + - not read: anything under `stores/epic/` (Kotlin, Java, tests) or `src/epic*` (Rust) of the old + tree, the body of the old `EpicCloud` class and of `CloudSavePaths.epic`, other branches or + checkouts, or any Epic client source. The old files were deleted with `git rm` without being + opened. (A search over shared files incidentally printed two lines of the old `EpicCloud`, its + base URL and User-Agent constant; both values are in the spec and only the URL is used.) +3. **Fresh code.** Every file of the new module has its own structure, names and comments, with a + plain description and `SPDX-License-Identifier: GPL-3.0-or-later` (the crate's licence). Where + the spec left a fact open, the choice was made from general knowledge of Epic's public services + and is listed below. + +## Layout + +| Rust (`app/src/main/rust/stores/src/epic/`) | | +|---|---| +| `net.rs` | blocking HTTP helper, the one User-Agent, percent/base64 encoders | +| `account.rs` | sign-in with an authorization code, refresh, exchange codes, redirect-page parsing | +| `library.rs`, `catalog.rs` | owned items (all pages), catalog details and attributes | +| `build_info.rs` | live build lookup, CDN list, manifest download | +| `manifest.rs`, `chunk.rs` | binary and JSON manifests, chunk files | +| `locale.rs` | device language → install tags, tag selection | +| `install/` | the install engine: `staging`, `delta`, `space`, `cache`, `schedule`, `writer`, `mod` (orchestration), end-to-end `tests` against a loopback server | +| `shop.rs`, `achievements.rs`, `savesync.rs`, `launch.rs`, `timefmt.rs` | shelves, achievements, cloud saves, launch arguments, ISO dates | +| `service.rs`, `ffi.rs` | the JSON operations and the JNI entry points | + +| Kotlin (`stores/epic/`) | | +|---|---| +| `EpicBackend` | `StoreBackend` + `EpicLaunchSupport`; installs the login flow | +| `EpicLogin` | the `StoreLoginActivity.Flow` | +| `EpicCredentialStore`, `EpicPrefs` | account (shared Keystore store), `stores.epic` prefs | +| `EpicLibrary`, `EpicShelves` | library sync and cache, shop shelves | +| `EpicInstaller` | the download-queue job | +| `EpicApiClient`, `EpicDownloadManager`, `EpicInstallTags`, `EpicAchievements` | API kept for callers outside the package | +| `EpicSaveSync`, `EpicSaveTemplate` | cloud-save transfers for `EpicCloud`, template parsing for `CloudSavePaths.epic` | +| `EpicNative` | JNI wrapper (see `rust/stores/JNI.md`) | + +## Judgement calls + +Numbers in brackets refer to the spec's list of unknowns. + +**Fixed where clearly correct** + +1. OAuth form values (authorization code, refresh token) are percent-encoded [9]. +2. A library page that fails ends the sync with an error and keeps the cached library instead of + caching a partial one; an HTTP 401 is reported as "session expired: sign in again" rather than + an empty library [7]. + +**Chosen where the spec left it open** + +3. **User-Agent** [1]: every HTTP request (account, library, catalog, build info, CDNs, store + GraphQL, promotions, cloud saves) sends `DroidDeck/<versionName>`, defined once in + `epic/net.rs` (`USER_AGENT_PRODUCT`); changing that constant is the one place to adjust. + Achievements are the exception: Epic's achievements service rejects other agents, so + `epic/achievements.rs` sends Epic's launcher agent (`net.rs::EPIC_LAUNCHER_USER_AGENT`). The sign-in **WebView** keeps the launcher-style UA it used + before, because a sign-in page that rejects the UA would lock every user out; that string lives + in `epic/account.rs` (`WEBVIEW_USER_AGENT`). +4. **Shared fetch core** [14]: chunk downloads reuse the crate's store-agnostic `fetch_core` (also + used by GOG and Amazon; it came from Bannerlator's own crate and, unlike the old Epic module, + states no derivation from an Epic client). It already provides the adaptive window, CDN + rotation, retries with back-off, 429 and stall cooldowns the spec asks for. If its lineage is + ever in doubt, it is the one shared dependency to replace. +5. **Out-of-package Epic code** [14]: `EpicCloud` and `CloudSavePaths.epic` were rewritten to call + the new module. `StoreLaunch`'s exchange-code handling, `EpicOptions`, `WinCompSources.epic` and + `SessionPrefs.storesEpicMode` are shared code and were left as they are. +6. **Save-path template** parsing is Kotlin (`EpicSaveTemplate`), not Rust: the prefix walk it feeds + is shared Kotlin code and its existing unit test runs on the JVM without the native library. The + Epic walk matches folder names case- and punctuation-insensitively (`MyGame` finds `My-Game`), as + that test expects. +7. **One engine** [12, 13]: the hidden `storesEpicMode` switch is not read and there is no Java + fallback; without the native library the Epic store reports itself unavailable. When the full + space plan does not fit, the engine runs in a narrow mode (one file staged at a time, no chunk + cache), which needs only the net peak of the pending files. +8. **Schedule and cache**: the cache budget is enforced by the plan (eviction of the chunk needed + furthest in the future). At run time files are admitted up to 48 downloads ahead of the + furthest dispatched one, so the cache can briefly hold a few entries more than the plan's peak. + A chunk is first written into every admitted file that uses it; it touches the cache only when a + not-yet-admitted file still needs it. +9. **Space probing** uses `statvfs` (available blocks × fragment size, the same figure as Android's + `StatFs.getAvailableBytes`) from Rust; a failed probe is "unknown". A scratch directory on the same + filesystem as the game is treated as "beside the game". +10. **File hashing** is done in file order while parts land; parts that arrive early are read back + from the stage file. Files without a manifest hash are not hashed. +11. **Staging folder recovery**: an *empty* staging folder without its marker (a run stopped between + creating the folder and writing the marker) is adopted and the marker written; any other missing + or foreign marker fails the run without deleting. +12. **Unsafe manifest paths** (absolute, `..`, empty segments) fail the install. +13. **Encrypted manifests** (stored-as bit 1) are refused with an explicit message. +14. **Meta section prerequisite ids** are all read (no cap at 64), so the following fields stay aligned. +15. **Store GraphQL shelves** are requested with their arguments written into the query text + (country reduced to two letters first) instead of typed GraphQL variables, so the query does not + depend on the server's variable type names. +16. **Achievements**: when an account id is stored and the player-progress query gets no answer, the + result is "unreachable" rather than a list with everything locked. +17. **Token refresh** is single-flight (one refresh at a time; a waiting caller re-reads the stored + account first), so a rotated refresh token is never spent twice. A fresh sign-in replaces the + stored account instead of merging with it. +18. **Download progress** reported to the queue never moves backwards, although samples come from + several native threads. +19. **Network window** is the speed tier's value clamped to 1–128; the per-host cap is + `max(6, ceil(window / hosts))`. + +**Kept at parity (known weak spots)** + +- Chunk requests do not carry the CDN's signing query; only the manifest request does; the + `cloudflare.epicgamescdn.com` CDN stays excluded [2]. +- The manifest file name comes from the first manifest location and is requested from every CDN [3]. +- The manifest header SHA-1 and the chunk header GUID/hash are not checked (chunk size and chunk + SHA-1 are) [4]. +- Per-file flags, symlink targets and custom fields are ignored [5]; JSON manifests carry no hashes + as read, so their files are rewritten on every run [6]. +- The refresh token's own expiry is not tracked; a failed refresh still returns the stored token [8]. +- The cloud `hash` is compared as if it were an MD5 [10]. +- `AdditionalCommandLine` is one argument, frozen at install [11]. +- Shop search, an unused "wants an exchange code" helper and per-game uninstall work are not + ported; DLC stay hidden and are never installed separately; optional (non-language) install tags + are never selected; resume restarts a partially written file from zero [15–18]. +- Library details are fetched one game at a time, as before. + +## What needs device testing + +- Sign-in through the WebView, and that an **existing** saved account (sealed `credentials.json`) + stays signed in after the update. +- Every endpoint with the DroidDeck User-Agent: library, catalog, build info, CDN downloads, store + GraphQL and promotions, cloud saves (achievements use the launcher agent, see above). +- Library sync and shelves; install, pause/resume, cancel, update and repair; a card install with + the internal scratch cache; launch with an exchange code; cloud-save up/down. diff --git a/docs/development/evidence/cardboard-steamvr-dashboard-2026-10-13.png b/docs/development/evidence/cardboard-steamvr-dashboard-2026-10-13.png new file mode 100644 index 0000000000..b50ead73dd Binary files /dev/null and b/docs/development/evidence/cardboard-steamvr-dashboard-2026-10-13.png differ diff --git a/docs/development/evidence/cardboard-thrill-of-the-fight-cardboard-2026-10-13.png b/docs/development/evidence/cardboard-thrill-of-the-fight-cardboard-2026-10-13.png new file mode 100644 index 0000000000..8b04fdc9c5 Binary files /dev/null and b/docs/development/evidence/cardboard-thrill-of-the-fight-cardboard-2026-10-13.png differ diff --git a/docs/development/evidence/cardboard-thumper-vr-cardboard-2026-10-13.png b/docs/development/evidence/cardboard-thumper-vr-cardboard-2026-10-13.png new file mode 100644 index 0000000000..ef463ba6e0 Binary files /dev/null and b/docs/development/evidence/cardboard-thumper-vr-cardboard-2026-10-13.png differ diff --git a/docs/development/evidence/cardboard-thumper-vr-gameplay-2026-10-13.png b/docs/development/evidence/cardboard-thumper-vr-gameplay-2026-10-13.png new file mode 100644 index 0000000000..0f7678b60b Binary files /dev/null and b/docs/development/evidence/cardboard-thumper-vr-gameplay-2026-10-13.png differ diff --git a/docs/development/game-environment.md b/docs/development/game-environment.md index 223915adc1..2bbf28c786 100644 --- a/docs/development/game-environment.md +++ b/docs/development/game-environment.md @@ -3,16 +3,52 @@ Open **Games → Game environment**, directly below **FEX preset**, in Steam settings or the in-session drawer. Choose all Proton games, an installed game, or enter a Steam app ID. For a non-Steam shortcut, use its numeric `compatdata` directory ID (unsigned 32-bit). +The drawer opens the editor on its selected game profile. That editing scope stays +fixed if Steam's selected game changes in the background; use the editor's own +profile picker to switch deliberately. Changes apply on the next game launch, including when Steam is already running. A running game must be restarted. Native Linux games and Steam itself are outside this editor's scope. +The Components page also has a **Configuration** dropdown. **Default profile** owns the +default Proton and FEX preset. An installed game can inherit those defaults or +choose its own Proton and FEX preset. Proton choices are applied through Steam's +per-app compatibility mapping, including while Steam is running when its live +compatibility helper is attached. A newly installed Proton that the running +client has not discovered yet applies when Steam next starts. + +Each game can also override the stored FEX, DXVK and VKD3D-Proton package used +by its selected Proton. The launch wrapper applies that game’s component files +immediately before Proton starts, removes managed files that are absent from the +selection, and restores Default component choices for the next game. **Use +Default** removes the game override. Component packages must first be downloaded +or imported on the Default Components page. + +Before publishing game component choices, DroidDeck preserves each Proton build's +original components, including an explicitly empty bundle when a component is not +shipped. Those restore choices remain after the last override is cleared. A missing +or unreadable original is an error, not permission to delete the component's files. +If an original is missing after a build may already have used a game override, +DroidDeck refuses to capture those potentially modified files as originals. + +Component selections and the launch table are saved with a recovery record. +Publishing the launch table commits the selection: if the app stops before its +settings file is updated, the next component read recovers the matching settings. +An interruption before publication leaves the previous selections in place. +Unused staged packages are removed only after both files have been saved. + +**Reset game profile** removes all overrides owned by the selected game: Proton, +FEX preset, component packages, environment variables, texture filtering and +Windows components. The game then inherits the Default profile again. + The order is inherited process environment, selected FEX preset and built-in settings, shared edits, then game-specific edits. Editor entries therefore win over matching Steam launch-option variables. **Remove** explicitly unsets a -variable. **Restore inherited settings** removes the override. **Reset this -profile** clears only that profile's overrides. Values are literal strings, with -no shell expansion; quotes are only needed when the consuming program expects them. +variable. **Restore inherited settings** removes the override. The environment +editor's **Clear environment overrides** action clears only the selected +environment entries and is intentionally narrower than **Reset game profile**. +Values are literal strings, with no shell expansion; quotes are only needed when +the consuming program expects them. ## Defaults and available suggestions @@ -71,14 +107,18 @@ wrapper and adopted third-party Proton wrappers execute `droiddeck-game-env`, which reads that snapshot for each real game launch and uses `execvpe` to start Proton. Probe prefix `compatdata/0` and non-launch verbs are unchanged. Malformed configuration falls back to the inherited environment without evaluating its -contents. Signed non-Steam prefix IDs are normalized to unsigned IDs. +contents. Both component and environment selection normalize signed non-Steam +prefix IDs to unsigned IDs. -The published file also carries a `dxvkConfig` string the app's own file never -has: the session menu's texture filtering (Effects page; `core/TextureFiltering`) -as `d3d9/d3d11.samplerAnisotropy` and `samplerLodBias` options. The launcher -appends it to `DXVK_CONFIG` after the profiles, so a user's own `DXVK_CONFIG` -entry keeps its options. "Auto" texture sharpness is `-log2(panel / session)`, -derived when the session is sized, and applies from the next launch. +The published file also carries generated `dxvkConfig` and `dxvkConfigGames` +values the app's own file never has. The session menu's texture filtering +(`core/TextureFiltering`) becomes `d3d9/d3d11.samplerAnisotropy` and +`samplerLodBias` options. Default choices apply to games without overrides; each +game can save either choice independently or return it to **Use Default**. The +launcher appends the selected options to `DXVK_CONFIG` after the environment +profile, so a user's own `DXVK_CONFIG` entry keeps its options. "Auto" texture +sharpness is `-log2(panel / session)`, derived when the session is sized, and +applies from the next launch. Upstream references: [VKD3D capability parsing](https://github.com/HansKristian-Work/vkd3d-proton/blob/master/libs/vkd3d/device.c), [VKD3D options](https://github.com/HansKristian-Work/vkd3d-proton#environment-variables), diff --git a/docs/development/glasses-menu-tracking.md b/docs/development/glasses-menu-tracking.md new file mode 100644 index 0000000000..7acb86484c --- /dev/null +++ b/docs/development/glasses-menu-tracking.md @@ -0,0 +1,35 @@ +# Tracked DroidDeck menus + +When glasses output and the tracked virtual screen are enabled, DroidDeck mirrors its own foreground menus into a glasses `Presentation`. Phone controls remain on the phone. The menu renderer does not start the guest compositor, request MediaProjection, or capture another application's windows. + +`GlassesMenuCapture` draws the activity's visible view roots into a hardware Canvas at up to 30 fps. `GlassesMenuSurface` consumes that buffer as an external-OES texture and redraws the screen at the glasses refresh rate. The plane geometry follows the existing `cardboard.frag`: row-major head-to-anchor rotation, metres for translation, +Y up, -Z forward, and a top-left source image. Mono uses a central eye; SBS renders the full UI to both eyes with 64 mm eye separation. + +The pose adapter keeps its 3DoF reference across menu pages and uses the shared spatial **screen** origin for 6DoF. Menu recenter does not change the VR floor origin. Stale or invalid tracking holds the last safe view. Explicitly changing between 3DoF and 6DoF can reanchor the screen because those modes have separate origins; recenter restores the chosen mode's view. + +On Android 29 and later, capture includes visible app dialog/popup roots exposed by `WindowInspector`. Android 26–28 captures the activity decor only, so separate dialog and popup windows are not mirrored. System keyboards, system permission prompts, other apps, and separately composited `SurfaceView` content are outside this capture path. Secure windows are excluded. Phone interaction remains available for these cases. + +## Shader regression check + +The opt-in Python check compiles the actual embedded GLES shaders, imports an asymmetric texture through EGLImage/external-OES, renders it, and checks readback pixels. It covers image orientation, both SBS eyes, translation, yaw, and views behind the screen. It does not require Python packages beyond the standard library and is not part of default pytest discovery. + +On Debian/Ubuntu with Python 3: + +```sh +sudo apt-get install libegl1 libegl-mesa0 libgles2 libgl1-mesa-dri +python3 tools/check_glasses_menu_shader.py +``` + +Run from any working directory by specifying the script's path. `--output-dir PATH` overrides the default `build/glasses-menu-shader`. The check defaults to headless Mesa software rendering and GLES 2.0. It writes `menu-shader-validation.json` with the shader hashes, GL version, and pixel comparisons, plus `menu-shader-mono.png` and `.ppm`. + +The test supplies the Android consumer's vertical-flip texture transform. It verifies the real shader under that transform; it does not replace checking Android's actual Canvas → SurfaceTexture producer/consumer integration or display orientation on the phone. + +## Phone and glasses smoke test + +1. Connect supported glasses, open DroidDeck's setup page, and enable glasses output and the tracked virtual screen. Confirm the phone remains touchable and text in the glasses is upright with the same left/right ordering. +2. Switch among Steam and non-Steam launcher pages without launching a game. Scroll, open menus and app dialogs, and change a setting from the phone. Check that the glasses follow the current page and retain the screen's head-tracked anchor. +3. In 3DoF, turn and tilt the glasses, then use Recenter. Test mono and SBS. Each SBS eye must contain the full UI with matching vertical alignment. +4. Enable 6DoF on supported hardware and complete its setup. Translate left/right, up/down, and toward/away from the plane. Recenter the menu and verify that VR floor height has not changed. Briefly obscure tracking; the held menu must remain finite and stable until tracking recovers. +5. Launch a game, open and close the session menu, then return to the launcher. Confirm clean ownership handoff between the game output and menu presentation and that phone-only operation still works. +6. Background/foreground DroidDeck, rotate the phone, change the glasses display mode, and unplug/replug the glasses. Check for stale frames, black output that persists after reopening, crashes, or a reused orientation from the previous device connection. + +For evidence, `tools/droiddeckctl displays` lists logical display IDs and `tools/droiddeckctl screenshot ./glasses.png --display <id>` captures the selected output. Inspect `GlassesMenu` log messages for capture or renderer failures. A display screenshot verifies image content; head movement and stereo comfort still require the physical glasses. diff --git a/docs/development/hand-hybrid-benchmark-2026-10-17.md b/docs/development/hand-hybrid-benchmark-2026-10-17.md new file mode 100644 index 0000000000..6b2594dd21 --- /dev/null +++ b/docs/development/hand-hybrid-benchmark-2026-10-17.md @@ -0,0 +1,110 @@ +# Hybrid hand inference benchmark + +Measured on the connected Samsung SM-F976U on 2026-10-17. This sparse-correspondence +prototype did not improve useful hand throughput. It was slower than scheduled stereo +on the central open-hand capture and accepted palms only on its dual-detector recovery +frames. The earlier estimated 20–60% throughput improvement is not supported by this test. + +Turning image lens correction off did not improve accepted-palm counts. The saved +calibration uses the **pinhole** distortion model, not OpenCV's fisheye model. The benchmark did not change its diagnostic build's live algorithm or input-rate policy, +and restored the prior settings after each sweep. That build ended with Lite selected. +The shipping baseline was subsequently set to Full with raw grayscale-to-RGB input. +The failed hybrid prototype and its runners have been removed; these results are historical. + +## Central open-hand result + +The table pools the initial and final central-scene runs in the lens on/off sweep. +Each stereo entry combines the baselines before and after the hybrids. Times include +per-frame image preparation, inference, matching when applicable, reconstruction, and +palm/gesture estimation. Acceptance means at least one geometrically accepted palm in +a repeated saved image, not live detection accuracy. This scene contains two open hands; +Full consistently recovered only one. + +| Full-model path | Image lens correction | Median / p95 processing | Frames with a palm | Sparse frames with a palm | +|---|---|---:|---:|---:| +| Scheduled stereo | On | 30.15 / 61.60 ms | 160 / 160 | — | +| Left-led hybrid | On | 62.59 / 84.06 ms | 48 / 80 | 0 / 32 | +| Right-led hybrid | On | 40.58 / 80.21 ms | 48 / 80 | 0 / 32 | +| Scheduled stereo | Off | 30.51 / 61.18 ms | 160 / 160 | — | +| Left-led hybrid | Off | 62.57 / 79.82 ms | 48 / 80 | 0 / 32 | +| Right-led hybrid | Off | 61.75 / 83.05 ms | 48 / 80 | 0 / 32 | + +All successful hybrid frames came from ordinary stereo inference. Correspondence failed +to reconstruct the five required palm anchors; the original palm gates were retained. +The first corrected-image trial measured about 19–21 ms for rectification and matching +alone. Repeated failures also prevented the hybrid from sustaining the cheaper one-hand +tracker schedule. The live input limit should not be raised on the strength of this candidate. + +Lite accepted no palms with either lens setting or either architecture on the lens-sweep +captures. The peripheral open hand and representative controller grip also yielded no +accepted palms. The no-hand control remained negative. The earlier corrected-image sweep +covered all nine saved pairs, including six controller grips, with no extra palms recovered +by the hybrid. These are a small set of static scenes, not independent accuracy trials. + +## What was measured + +`HybridHandBenchmark` was reachable only through the saved-capture diagnostic. Both models +use CPU VIDEO inference, the existing 0.6 thresholds, and the existing one-/two-hand +schedule. Stereo uses concurrent camera inference. The hybrid runs one detector, rectifies +both images, and searches for each landmark along its epipolar line using 11 × 11 normalized +correlation patches. It requires correlation at least 0.80, a 0.04 uniqueness margin outside +three pixels, patch standard deviation at least four, and forward/backward agreement within +1.5 pixels. Search depth spans 0.15–1.5 m. Existing triangulation and palm/gesture checks +remain in force. This is one concrete hybrid candidate, not a test of every stereo matcher. + +Both detectors run every fifth frame and on the frame after failed sparse palm estimation. +The hybrid's recovery costs and failures are included in the results. Each configuration +has a separate cold frame, five warmups, and forty measured frames. Synthetic VIDEO +timestamps advance by 50 ms, but processing runs unpaced; the experiment did not measure +a live 20 Hz stream. Initialization, file decoding, camera transfer, head synchronization, +pose publication, and rendering are excluded. Replayed poses are never published. + +Contrast normalization and grayscale-to-RGB conversion stay enabled in both lens cases. +With input lens correction off, detection runs on raw images; landmarks are still corrected +using calibration for triangulation. The hybrid always uses corrected, rectified images +for correspondence and transforms matched points back to the detector's image coordinates. +This comparison does not disable the geometric calibration required for metric depth. + +The lens sweep tested the central scene, peripheral scene, no-hand control, one grip scene, +and then the central scene again. Full and Lite each ran stereo-before, left-led hybrid, +right-led hybrid, and stereo-after for both lens settings: 3,200 measured replays. The +separate initial corrected-image corpus sweep also recorded 3,200 replays across nine +unique pairs, repeating the central scene last. Repetition is for timing, not extra accuracy +samples. SteamVR was idle and live tracking was temporarily disabled during these runs. + +## Validation and limits + +The Android build and 33 focused JVM tests passed. On the phone, the matcher passed fifty +synthetic correspondences in both directions and rejected textureless synthetic images +before each capture benchmark. These checks establish basic coordinate/search behavior; +they do not establish matching accuracy on real hands. + +Android thermal status was 0–1 during the corrected-image sweep and 1 during the lens +sweep. Timings varied substantially within the fixed configuration order, so the on/off +timing difference cannot be attributed solely to lens correction. Full stereo medians in +the first lens-sweep central trial ranged from 16.7 to 30.8 ms; the final trial was slower +with correction enabled. Baselines bracket the hybrid cases, but the run is not randomized +or temperature-controlled. + +The initial corpus's final Full/stereo-before trial included a 2,611.74 ms inference stall. +It remains in the raw samples and means; p95 alone hides that isolated stall. Geometric +acceptance does not apply live capture-age gates, so that observation would be stale in +live tracking. The later central lens-sweep samples had no processing times above 200 ms. +No moving-hand, pinch/release, sustained SteamVR throughput, external latency, or independent +position-accuracy pass is claimed. The present matcher needs better correspondence and +lower cost before a live increased-input-rate trial is justified. + +## Reproduction and evidence + +The temporary runner and matcher are no longer shipped. Local evidence from those runs: + +- Final lens comparison and raw samples: `build/hand-hybrid/lens/` and its `summary.json`. +- Initial full corpus: `build/hand-hybrid/corpus/` and its `summary.json`. +- First prototype trial: `build/hand-hybrid/first/`. +- Build and focused tests: `build/hand-hybrid-validation.log`. +- Lens comparison build: `build/hand-hybrid-lens-build.log`. +- Installed lens-benchmark APK SHA-256: `d976329b96e6aaceec62ef38085e203942cf763c51102adfeb50c4e5614891f1`. +- Calibration SHA-256: `3983438843877a321d3098f73496dfd9256f0088f095aa8d591602cf0b2cb213`. + +Each result also includes both capture-image hashes and the model hashes. Build-directory +evidence is local and may not be present in a fresh checkout. diff --git a/docs/development/hand-model-comparison-2026-10-16.md b/docs/development/hand-model-comparison-2026-10-16.md new file mode 100644 index 0000000000..c4d60311e2 --- /dev/null +++ b/docs/development/hand-model-comparison-2026-10-16.md @@ -0,0 +1,113 @@ +# Full versus Lite hand models and image preprocessing + +The saved-image comparison favors the Full palm detector and Full landmark model. +Neither contrast normalization nor lens correction improved usable bare-hand detections +on the two available bare-hand scenes. This is a small static corpus, not a live tracking pass. + +## Method + +The same saved 640 × 480 grayscale stereo pairs were evaluated with eight configurations: +Full or Lite palm/landmark bundles, each with raw input, calibrated lens correction, +1st/99th-percentile contrast normalization, or both corrections. Grayscale-to-RGB replication +and MediaPipe's model-required tensor scaling were enabled in every configuration. + +The main comparison ran on the Samsung SM-F976U using the app's Android MediaPipe Tasks +1.0.0 and OpenCV 4.13.0. Each configuration created fresh CPU VIDEO detectors, with two +hands per camera, parallel camera inference, and all detection/presence/tracking thresholds +at 0.6. Adaptive input and scheduled one-hand inference were excluded. Each pair received +one cold inference, four warmups, and twelve measured repetitions at synthetic 80 ms +timestamp intervals. Bare-hand mode was verified; wrist-only mode was false. + +This was an offline replay with the game idle and tracking cameras disconnected. It loaded +the phone's saved verified calibration and never initialized cameras or published replay +poses. Raw-image landmarks were undistorted during triangulation; corrected-image landmarks +were triangulated without applying distortion correction again. Both paths retained the +existing handedness, depth, reprojection, palm geometry, and motion checks. + +The corpus contains two bare-hand scenes, one no-hand control, and six controller-grip +scenes. The central bare-hand scene was also repeated at the end of the phone run. Replaying +one pair twelve times does not create twelve independent accuracy samples. Desktop IMAGE +and VIDEO tests using MediaPipe 0.10.21/OpenCV 4.11.0 provide a separate cross-check. + +## Bare-hand result + +For capture `64390821246320`, two open hands are visible in both cameras: + +| Image preprocessing | Full: usable stereo palms per replay | Lite: usable stereo palms per replay | +|---|---:|---:| +| Raw | 1 of 2 | 0 of 2 | +| Lens correction only | 1 of 2 | 0 of 2 | +| Contrast normalization only | 1 of 2 | 0 of 2 | +| Lens correction + contrast normalization | 1 of 2 | 0 of 2 | + +The cold frame and all twelve measured frames agreed. Full found one hand in each eye; +Lite found no hands with raw, lens-only, or contrast-only input. With both corrections, +Lite found one hand in the left camera and none in the right, so it could not reconstruct +a stereo position. + +Capture `72745789186883` contains one open hand, peripheral in the left image. Every +configuration missed it in both cameras throughout cold and measured replay. The desktop +IMAGE and VIDEO tests agreed with these bare-hand outcomes. The no-hand control +`59405518228482` returned zero hands across all configurations. + +The final repeat of the central scene reproduced the same cold and measured counts in +every configuration. All six controller-grip pairs (`110854218431877`, `110858058677761`, +`110862058272915`, `110935538464606`, `110939418512521`, `110943418461791`) produced +zero accepted stereo palms and zero accepted wrists in all measured phone replays. Some +Full configurations produced individual camera detections, but these did not become valid +stereo positions. Grip scenes are reported separately from the bare-hand comparison. + +## Phone timing + +These are median milliseconds for a parallel stereo pair on the central scene. They include +RGB preparation, inference, and result extraction, but exclude decoding, precomputed lens +correction, model initialization, and stereo reconstruction. They are not end-to-end latency. + +| Model | Preprocessing | First run | Final repeat | +|---|---|---:|---:| +| Full | Raw | 46.10 | 82.98 | +| Full | Lens only | 75.17 | 84.46 | +| Full | Contrast only | 85.64 | 82.99 | +| Full | Lens + contrast | 84.10 | 80.49 | +| Lite | Raw | 43.07 | 40.06 | +| Lite | Lens only | 37.29 | 39.70 | +| Lite | Contrast only | 38.73 | 42.54 | +| Lite | Lens + contrast | 78.78 | 75.34 | + +Android reported thermal status 2 throughout the saved-pair runs. Configuration order was +fixed, and inference work differs when a hand is found. Full/raw's first-versus-last variation +also prevents attributing the timing differences to preprocessing alone. Lite's lower timings +mostly accompany zero returned hands; its two-camera usable-hand result remains zero. + +## What normalization changes + +The saved calibration uses pinhole radial distortion coefficients (`fisheye: false`). The +comparison tests that calibrated lens correction, rather than forcing a fisheye model onto +the coefficients. Keeping the original camera matrix and output dimensions narrows the +field of view: the left output samples approximately raw x=96–544 and y=56–437, and the +right approximately x=93–547 and y=57–440. Some peripheral fingers near raw x=600 disappear +from the corrected left image. This is a concrete limitation of the current mapping, although +the raw version also failed to detect that hand; the crop alone does not explain all failures. + +Model tensor normalization was already provided by MediaPipe. The additional normalization +tested here changes image contrast. Replicating grayscale into RGB satisfies the input channel +contract but cannot recover missing color information. + +## Recommendation and limits + +Use Full with raw grayscale replicated into RGB as the next live baseline, retaining MediaPipe's +tensor scaling and calibrated point correction for stereo geometry. Full has the stronger +detection result here; extra contrast/lens preprocessing has no demonstrated acceptance gain +on these scenes. Broader motion testing is still needed before calling any configuration best +overall. Full itself still misses one of two central hands and the peripheral hand. + +The comparison used a temporary diagnostic build with opt-in preprocessing and offline replay. +That comparison code has been removed after selecting the Full/raw baseline; the live path +keeps grayscale-to-RGB conversion and calibrated point correction. Build, twenty focused JVM +tests, packaged runtime verification, and the installed Android replay were checked for the experiment. + +Local evidence is under `build/hand-comparison/`: `phone/` contains full per-frame results, +thermal snapshots and before/after status; `phone-summary.json` contains compact counts; +`desktop/` and `desktop-video/` contain the independent comparisons. The scripts are +`compare.py`, `compare_video.py`, `run_phone.py`, and `report_phone.py` in that directory. +`input-manifest.json` records all capture, calibration, and model hashes plus runtime versions. diff --git a/docs/development/luma-hand-tracking-investigation.md b/docs/development/luma-hand-tracking-investigation.md new file mode 100644 index 0000000000..6fa8b32ae8 --- /dev/null +++ b/docs/development/luma-hand-tracking-investigation.md @@ -0,0 +1,466 @@ +# Luma Ultra hand tracking investigation + +Date: 2026-10-17. Status: **experimental; gameplay usability has not passed**. + +## Current Full/raw baseline and hand rendering + +The stereo pipeline defaults to Full palm detection plus Full hand landmarks following the +[saved-image comparison](hand-model-comparison-2026-10-16.md). The optional Lite bundle contains +Lite palm and Lite landmarks; earlier historical timings describe a different Full-palm/Lite-landmark +bundle. `tools/build_hand_lite.py` pins both official Lite source models, +checks their input/output tensor contracts, and copies Tasks metadata from the Full bundle. +Both the outer task ZIP and the embedded label ZIPs have deterministic timestamps. + +Live inference consumes original grayscale camera bytes, replicated into reusable RGB buffers. +It skips full-frame lens remapping, contrast normalization, and the grayscale-to-RGBA-to-Bitmap +round trip. Preview bitmaps are created only at preview cadence; grayscale Mats are populated +only for calibration, validation, explicit capture, preview, or Joy-Con optical flow. + +Detection, preview overlays, and Joy-Con flow share raw image coordinates. Calibration corrects +the sparse landmark coordinates once before triangulation. The saved `fisheye` flag selects +fisheye or pinhole correction; the bundled Luma profile uses pinhole coefficients. Calibration +fitting, validation, and diagnostic captures retain their original raw images. The unsuccessful hybrid matcher and preprocessing-comparison code were removed +after baseline selection. The existing saved-pair diagnostic uses the same raw RGB +preprocessing and point correction as live tracking. + +Each grayscale byte is copied into R, G, and B without changing exposure or image coordinates. +[MediaPipe Tasks](https://ai.google.dev/edge/mediapipe/solutions/vision/hand_landmarker/android) +then performs model-specific tensor normalization from metadata; the app does not divide these +image bytes by 255 a second time. + +Joy-Con mode retains only landmark 0 (the wrist), triangulates and follows that position, and +does not estimate palm orientation, pinch, or grip. Replay follows the selected controller mode. +The landmark network still predicts all 21 landmarks internally. Physical Joy-Con +buttons and IMU orientation remain the controller input sources. + +The user reported that the hand smoothing and dead zones made tracking feel worse. The +common bare-hand `OpticalPose` path therefore removes the 3 mm position and 1-degree rotation +anchors and restores the earlier fixed 15 ms rendering interpolation, replacing the added +adaptive smoothing. Small accepted movements can change the rendered pose immediately. +Position prediction still requires consecutive velocities to agree in direction, preventing +alternating measurement noise from being extrapolated. The normal mode keeps measured palm +orientation; only the opt-in steady-aim setting uses `ShoulderAim`. Joy-Con filtering, gesture +release, observation freshness, and calibration gates are unchanged. + +SteamVR startup defers Luma Ultra 6DoF until two seconds after the first confirmed RUNNING +status. The launch gate applies before SDK initialization, with display controls available +through a nonspatial connection during the wait. Repeated RUNNING polls do not extend the +deadline. Stop, failed launch, and session cleanup cancel the pending start; reopening always +uses the current device and saved tracking settings. This changes startup sequencing, not the +tracking preference or hand-model configuration. +Automatic restoration on the same device, including a cancelled launch or early stop, +requests the existing stable-pose recenter. Status polls from superseded requests or ended +sessions cannot restart the pending tracking transition. + +Bare-hand controller rendering holds the last accepted pose for up to 350 ms from its original +capture timestamp, extending the previous 200 ms visual limit. Missing, invalid, or stale +observations freeze the rendered pose and stop prediction; repeated packets cannot extend the +hold. New observations still require the existing 200 ms freshness check, and trigger/grip +release immediately when their observations become invalid or stale. Head loss, origin or +connection changes, and controller-mode changes clear the visual cache. This bridges short +hand-detection gaps without adding a delay to fresh frames; it does not improve detection or +preserve a gesture through tracking loss. Both Full and Lite predict the 21 landmarks used by +the grab estimator; wrist-only Joy-Con mode uses physical buttons instead. + +Before this rollback, synthetic 12.5 Hz alternating-noise replay reduced position RMS from 4.354 to 1.772 mm and +rotation RMS from 1.722° to 1.398°. At 25 Hz, the respective changes were 1.242 to 0.988 mm +and 1.058° to 0.800°. The tradeoff in the 12.5 Hz slow-motion case was slightly more lag: +maximum position error changed from 0.423 to 0.593 mm and angular error from 0.489° to +0.632°. These results describe the reverted adaptive filter, not the current behavior or +measured live tracking improvements; the user's subsequent experience favored removing it. +The 80 focused JVM tests and native spatial, controller, adaptive-filter, and Joy-Con tests +passed. Build and installation evidence is recorded under `build/hand-baseline/`. + +The visual-hold follow-up passed the full native suite, including capture-age boundaries, +frozen rendering, stale-packet rejection, immediate gesture release, fresh reacquisition, and +cache invalidation. Only the VR driver changed among the 150 staged runtime outputs. +Build and installation evidence is recorded under `build/hand-visibility/`. + +The subsequent dead-zone/adaptive-filter rollback passed the full native suite. Regression +tests exercise 0.2 mm translation and 0.05-degree rotation immediately after settling, sustained +small motion, reversal, and the retained visibility/input protections. Synthetic 95% step +response was 44 ms after receipt at both 12.5 and 25 Hz observation rates. This measures the +render filter, not end-to-end camera latency. Only the VR driver changed among the 150 runtime +outputs; rollback evidence is recorded under `build/hand-filter-revert/`. + +The reviewed startup-delay follow-up passed 129 focused JVM tests, and an isolated snapshot +containing only the startup changes passed its 128 focused tests. Earlier phone logs recorded the spatial SDK +open attempt 3.348 seconds after confirmed SteamVR RUNNING: the two-second delay plus SDK +connection teardown. The resumed session reported valid 6DoF with no pending or required +recenter. The native driver and hand configuration were unchanged. Evidence is recorded under +`build/luma-vr-start-delay/`. The review fixes were rebuilt and installed, but the phone +reported no glasses connected during the follow-up, so hardware cancellation recovery +was not rechecked. + +The installed APK SHA-256 is `fac0973a21e41db842d88617bb11f16672987bd0b955736ad510abceca46b00f`. +Earlier connected-phone diagnostics confirmed `FULL`, `raw-grayscale-rgb`, +`pinhole-points-only`, concurrent CPU inference, scheduled discovery, adaptive input, +and `steadyHandAim=false`. Camera/head processing was active with the verified device +calibration. The launch check reached READY and staged VR driver SHA-256 +`e79525c144e934761f08cdc1d3170d058df89bf55c8458ddc955b58c90c9b128`, matching the rebuilt +payload. This verifies deployment and live processing, not moving-hand accuracy or comfort. + +The optional Lite bundle can be rebuilt with `mediapipe==0.10.21` using: + +```sh +python tools/build_hand_lite.py --palm palm_detection_lite.tflite --lite hand_landmark_lite.tflite +``` + +Source URLs and hashes are in `app/src/main/assets/models/hand_landmarker_lite.provenance.json`. +These changes still need live moving-hand, closed-fist, gesture-continuity, and latency validation. +Earlier Lite/normalized-input validation passed 52 focused JVM tests, and bundle rebuild and label-archive reproducibility +checks passed. Desktop MediaPipe 0.10.21 inference succeeded on color hand fixtures. All six +saved left-camera grayscale grip images still returned zero detections after correction and +contrast normalization at the existing 0.6 confidence thresholds. This is not a tracking-accuracy +pass. Synthetic projection/undistortion/triangulation checks stayed below 0.12 mm reconstruction +error for the bundled pinhole profile and near numerical precision for a synthetic fisheye profile. +Local reports for that implementation check are in `build/hand-lite-models/`; Android hardware +inference was not run at that stage. + +The subsequent [Full/Lite preprocessing comparison](hand-model-comparison-2026-10-16.md) +ran all eight model/preprocessing combinations on the phone using nine saved stereo pairs. +Full recovered one of two central open hands; Lite recovered no usable stereo hand. Neither +model found the peripheral hand, and contrast/lens correction added no accepted bare hands. +Full with raw grayscale-to-RGB input and calibrated point correction is now the live baseline; +the earlier comparison diagnostic itself did not change the defaults. + +There is room to improve the current implementation, but the available evidence does not support calling another smoothing adjustment a gameplay fix. The strongest current blockers are rejected palm reconstruction, interrupted gesture continuity, and processing latency under SteamVR load. The next useful milestone is a repeatable open → pinch → release interaction with a stable aiming pose, followed by sustained in-game testing. + +## What the existing evidence establishes + +The latest recorded post-installation interaction is `build/spatial-live-hands-sticky-grab-updated.json`, summarized by `build/sticky-grab-updated.log`. It belongs to Android process 17867 and SteamVR session `2026-10-16-60-steam`, using the stability candidate before the fork migration. It is historical evidence, not a measurement of the changes made during this investigation. + +| Finding | Evidence | Interpretation and limits | +|---|---|---| +| Head tracking remained available while hands failed | All 2,823 coherent channel samples had fresh head tracking; right hand was fresh in 1,446 samples (51.2%) | The observed interruption is in the hand path. This is sampled channel availability, not accepted-camera-observation rate; the user's exact hand visibility was not recorded. | +| Palm acceptance is a major failure point | Five of eight status snapshots reported matched/reconstructed hands but zero accepted palms | Detection alone is insufficient. The old message grouped missing palm anchors, implausible width, degenerate orientation, and temporal outliers together. It does not identify which gate caused each rejection. | +| Gesture continuity can prevent clicks entirely | The right-hand trace contained valid open and pressed pinch values, separated by loss transitions | Requiring a fresh observed release after loss is correct, but unreliable tracking can prevent a usable press sequence. See the replay below. | +| Processing already consumes most of the latency target | Eight reported processing times ranged from 63.3 to 114.0 ms; observation ages from 63.6 to 155.7 ms | These are internal status samples, not physical-motion-to-display latency. Some exceed the complete external p95 target of 100 ms before rendering is counted. | +| The run was thermally constrained | Android thermal status was 4; HAL skin temperature increased from 53.9 to 54.9 °C | This run cannot establish cold performance or isolate thermal throttling from game workload. | +| Latest stability changes did not establish usable interaction | The user reported similar stationary jitter and inability to start a dashboard drag | The previous candidate's automated tests and successful installation did not establish a hardware interaction pass. | + +The trace used CPU, full model, concurrent stereo inference, automatic input rate, and scheduled tracking. All eight diagnostic snapshots selected the two-hand search bank and a 500-permille camera copy rate. Approximately 25 Hz camera delivery therefore supplied at most about 12.5 eligible stereo pairs per second before processing and rejection. The left-hand channel had only 14 fresh samples; this was not a controlled two-hand visibility test, so that number is not left-hand detection accuracy. + +### Why a detected pinch may produce no click + +The right-hand transition list spans 15.885 seconds and contains 142 rows. Applying the current trigger rules from `tools/vr/src/spatial_tracking.h` to those sampled rows gives: + +| Trace quantity | Count | +|---|---:| +| Fresh, valid new observations below the 0.25 release threshold | 31 | +| Fresh, valid new observations above the 0.65 press threshold | 12 | +| Changes in the right trigger's loss-counter byte | 16 | +| Valid-palm transition rows with invalid pinch geometry | 58 | +| Above-threshold observations while the replayed trigger remained armed | 0 | + +Replay starts disarmed because the first sampled hand is invalid. It compares the low byte of the right hand's `epochs`, releases on invalid/stale hand or pinch data, ignores duplicate observations for arming, checks the 200 ms gap against the previous accepted hand timestamp, and arms only on a fresh valid trigger value below 0.25. A valid palm with invalid pinch still advances the hand observation timestamp, as in the driver. + +This is an inference from a sampled shared-memory trace. Sampling may omit intermediate observations, and this replay does not record what SteamVR or its dashboard consumed. It nevertheless gives a concrete explanation consistent with the reported inability to start a drag: the recognizer produces high pinch values, but continuity is lost before those values can form an armed press. Removing the release requirement would reintroduce presses on reacquisition and would not repair the observation stream. + +## Prioritized work + +1. **Measure each rejection before changing acceptance.** Count processed observations, valid palm/gesture observations, and rejection reasons separately for each hand. Distinguish no matching pair, missing triangulated palm anchors, palm width, degenerate orientation, implausible motion, synchronization, and age. Keep cumulative counters separate from sparse UI snapshots. These counters need no camera image recording. A broad reduction in stereo-quality thresholds could trade disappearing hands for incorrect depth and jumps. + +2. **Establish one reliable interaction sequence.** With a single visible hand at 30, 50, then 80 cm, repeat open → pinch → hold → release while collecting the observation counters and existing driver input-transition logs. Repeat for the other hand, then with both visible. Record whether failure happens before palm acceptance, at pinch validation, at arming, at OpenVR publication, or inside the dashboard. The dashboard uses trigger for click/drag; the installed Vive binding maps grip to Back. Keep the other fingers open during the pinch test so the two actions remain distinguishable. + +3. **Reduce measured processing cost and discovery spikes.** Run temperature-matched comparisons of full/scheduled CPU, lite/scheduled CPU, and input-rate settings, retaining the same game scene and deliberate motions. Measure completed-observation rate and accepted-observation rate, not camera rate or repeated channel reads. Existing saved-open-palm benchmarks show potential: under SteamVR, scheduled full inference had median/p95 46.92/94.71 ms versus full-search 91.48/99.26 ms; scheduled lite gave 40.26/86.77 ms. Those static-image results cannot establish moving-hand, pinch, or crossed-hand accuracy. The full model should remain the baseline until those comparisons pass. GPU requires a separate stability check because earlier evidence records graphics recovery/device-loss concerns. + +4. **Tune pose and aiming with motion evidence.** Record stationary raw and rendered pose distributions and a repeatable slow aiming path. At the time of this trace, driver stabilization held position within 3 mm and orientation within 1 degree around a stationary anchor, applied a 15 ms rendering correction, and bounded prediction to 2 cm/80 ms. The anchors have since been removed at the user's request. Increasing smoothing without measuring raw noise and lag risks making aiming less responsive. Test motion-aware filtering or a more stable aim direction only against the same recorded motions and external latency measurement. Aiming direction and a game controller's grip pose may need separate treatment. + +5. **Validate game compatibility after continuity.** Optical controllers currently expose Vive-compatible trigger/grip/trackpad inputs, with gamepad sticks and buttons supplying locomotion and menus; there is no skeletal hand output. `CardboardController::UpdateOptical` initializes `DriverPose_t` to zero and populates position and rotation, leaving linear and angular velocity zero. This is a source-confirmed omission to investigate for throwing and other velocity-dependent games, not an established cause of the dashboard problem. A velocity implementation needs capture-time derivatives, outlier/loss resets, a defined pose timestamp, and a game-level test before enabling it. + +Startup should be measured separately from steady state. Earlier logs contained shader-pipeline creation well after the dashboard appeared, while both hand detectors were already initialized. Correlate observation latency and CPU/GPU workload through launch and the following two minutes; model warmup alone does not explain the reported minute-long startup delay. + +The exported calibration also helps explain why a 3 mm stationary hold may have little visible effect. Its focal lengths are approximately 226–241 pixels and its stereo baseline is approximately 14 cm. The ideal rectified-stereo approximation `depth change ≈ depth² / (focal length × baseline) × disparity change` gives roughly 8 mm per disparity pixel at 50 cm and 20 mm at 80 cm. These are sensitivity estimates, not measured hand errors; the actual cameras have lens distortion and relative rotation. Independent landmark jitter can therefore exceed the driver's hold radius. If the new counters confirm palm reconstruction dominates, a robust fit across the available palm landmarks and temporal stereo correspondence are stronger candidates than simply enlarging that hold radius. Such a fit still needs explicit outlier rejection, side identity, capture-time freshness, and measured motion/gesture tests. + +## Vendor runtime options + +The public [VITURE Glasses C SDK documentation](https://www.viture.com/developer/glasses-sdk/glasses) describes USB management, head tracking, display control, and camera streaming, including Android support. It does not document a phone hand-tracking runtime that can replace this application's MediaPipe reconstruction directly. That is a statement about the published API reviewed on this date, not proof that VITURE has no private or forthcoming implementation. + +The [VITURE Unity SDK documentation](https://www.viture.com/developer/unity-sdk/unity) does describe hand tracking, responsive/stable filter modes, and arm/wrist contributions to aiming. Its stated hardware requirement and deployment instructions target the Pro Neckband. Those controls provide useful design references, but the documentation does not establish that their runtime can be redistributed inside this phone app. Confirm phone runtime availability, platform support, and licensing with VITURE before planning that replacement. + +## Calibration and completion criteria + +The phone's current calibration can be shipped as the Luma Ultra starting profile. That reduces setup friction; it does not fix inference cost, hand occlusion, gesture continuity, or jitter by itself. Preserve each device's own calibration as the higher-priority choice, restrict the base profile to its matching model and camera geometry, and identify it as a shared starting calibration. A calibration validated on the source glasses has not been independently measured on every Luma Ultra unit. + +Retain the existing acceptance gates in `luma-spatial-tracking.md`: at least 95% accepted slow unobstructed hand observations at 30–80 cm, no more than 5 cm position error and 2 cm stationary jitter, external p95 latency below 100 ms, reliable release and reacquisition, and no more than 10% regression in p95 game frame time over a 20-minute run. Dashboard selection and Angry Birds VR aim/grip/pull/release still require deliberate physical validation. Keep the feature visibly experimental until these tests pass. + +Supporting records: `luma-spatial-evidence.md`, `build/spatial-live-hands-sticky-grab-updated.json`, `build/hand-reliability-benchmark-smoothness-steamvr.json`, and `build/hand-startup-review.json`. The build-directory records are local historical artifacts and may not accompany a fresh checkout. + +## Joy-Con grip and arm extension investigation (2026-10-16) + +The target is a closed fist holding a controller, with the wrist and forearm visible from the +wearer's viewpoint. Open-palm performance is not sufficient evidence for this use case. In a +requested 16-second extension exercise, 5 of 80 sampled left positions and 1 of 80 right positions +were valid while head tracking stayed valid. These are channel availability samples, not 80 +independent detector results. The earlier driver also restarted its transition to the arm model +on each invalid hand frame, preventing intermittent camera positions from converging. + +The initial grip estimator required the wrist, middle base knuckle, and one supporting base +knuckle, rather than all five palm landmarks and a hand-derived orientation. The later +wrist-only update below removes the remaining knuckle dependency. It never generates hand +gestures; Joy-Con IMU and buttons remain authoritative. Stereo optical flow can carry the +identified wrist through brief model misses, with forward/backward consistency, photometric, +stereo reprojection and motion checks. Tracks expire 750 ms after the last detector seed; frame +gaps over 200 ms discard them. The driver retains a camera observation only until 200 ms after +its original capture time. Neither mechanism turns stale coordinates into fresh measurements. + +### Model assessment + +- **MediaPipe Full (historical baseline):** an existing Android pipeline with separate palm + detection and landmark regression. Curling fingers does not intrinsically exclude a hand, + but occlusion and the egocentric view must be tested with actual grips. Its published + monocular world landmarks are not used as metric camera distance; calibrated stereo supplies + distance. [Official task documentation](https://developers.google.com/edge/mediapipe/solutions/vision/hand_landmarker). +- **Earlier bundled Lite:** that bundle changed the landmark regressor while retaining the Full + palm detector (see `tools/build_hand_lite.py`). It can reduce processing cost, but cannot be + assumed to fix the initial fist-detection problem. Earlier saved open-palm replay under + SteamVR measured scheduled Full median/p95 46.92/94.71 ms and Lite 40.26/86.77 ms. Those figures + do not establish closed-fist accuracy. +- **RTMDet-nano hand detector plus RTMPose-m Hand5:** a concrete alternative detector and + landmark pipeline worth evaluating against grip frames. The official demo uses separate + hand boxes and landmarks. It is not a replacement `.task` asset: Android inference, + preprocessing, handedness/identity association, and device timings need integration and + verification. No claim of superior Joy-Con performance is established yet. + [Official hand demo](https://github.com/open-mmlab/mmpose/blob/main/demo/docs/en/2d_hand_demo.md). +- **HaMeR:** useful as an offline reference for occluded and egocentric hands, with published + evaluation procedures. Its reference implementation uses PyTorch, ViTPose, and MANO assets; + it is not an established real-time Android replacement for this app. Do not substitute its + inferred mesh depth for measured stereo depth. + [Official implementation](https://github.com/geopavlakos/hamer). +- **Whole-body arm pose:** not the first candidate for cameras on the wearer's glasses, + where the wearer's shoulders and torso are commonly outside view. An egocentric fist/wrist + detector or forearm segmentation model is the more directly matched development target. + This is an engineering assessment, not a measured comparison of those models on this device. + +The third camera is a separately exposed UVC pass-through camera, not an unused member of the +stereo callback. It may provide better RGB recognition, but requires its own capture/decode and +camera-to-head calibration. It does not independently provide metric depth. The preferred use +would be recognition or association assistance while stereo supplies distance; size-based +monocular distance would need separate calibration and uncertainty handling. +[VITURE SDK camera support](https://www.viture.com/developer/glasses-sdk/glasses). + +Saved-grip replay reports `joyCons` acceptance separately from bare-hand `hands`, for both Full +and Lite. Repeating one image measures model/geometry behavior on that image, not motion +continuity. Live tests must still check reach response, left/right identity, reacquisition, +camera loss, and head motion before considering the experiment reliable. + +### Closed-fist model comparison + +Three requested grip pairs were saved locally as captures `110935538464606`, `110939418512521`, +and `110943418461791`. In on-phone saved-frame replay of the middle and last pair, Full detected +one hand in the left image and none in the right image in all 20 measured repetitions per +configuration; Lite detected none in either image. Neither produced a valid grip position. +On the middle pair, scheduled Full median/p95 was 56.05/62.96 ms and Lite 46.00/47.99 ms. On +the last pair, it was 21.17/23.33 ms and 18.08/20.06 ms respectively. Timing differences between +frames are not accuracy improvements. Repeated static frames are not independent observations. + +An isolated Windows evaluator tested the official RTMDet-nano hand / RTMPose-m Hand5 ONNX +exports using `rtmlib` 0.0.16 and ONNX Runtime 1.31.0. Across the six raw images, hand-box counts +were 0, 0, 1, 0, 2, 1. Lens-corrected images gave 0, 1, 1, 0, 2, 1. Neither variant found both +hands in both cameras for any pair. These are box counts, not validated stereo positions or +ground-truth accuracy. Desktop timings cannot predict Android cost. Model downloads and hashes +are in `build/joycon-alternative-models/provenance.json`; results and overlays are local. + +MediaPipe desktop preprocessing comparisons used the same Full model asset with Python Tasks +1.1.1, versus Android Tasks 1.0.0. Overlapping 400-pixel crops recovered some missing detections; +lens correction and lower thresholds also changed detections and sometimes handedness. Only +isolated stereo matches passed the existing geometry checks. This does not justify enabling +either preprocessing change in the live pipeline yet, or replacing Full with Lite/RTMPose. + +The post-install shared-memory sample arrays in `build/joycon-reach-after.json` and +`build/joycon-reach-grip.json` are not valid live-pose measurements: the SteamVR session had +not restarted, so its pose publisher was inactive. Their before/after provider diagnostics and +requested image captures remain useful. During the actual closed-fist interval, all 253 +processed pairs reported invalid head tracking, so no live reach claim can be made. The local +measurement script now requires a running session, valid head tracking, and advancing head +timestamps to reject this situation. The image comparisons above do not depend on a live head +pose. A new live test is still required after head tracking and the session recover. + +### Third-camera grip comparison + +The separately exposed RGB camera delivered 1920 by 1080 JPEGs after Android Camera and USB +permissions were granted. SDK 2.4.0 crashed in `xr_camera_provider_start` when reopening the +provider in the main app process. RGB diagnostics now run in a dedicated process that skips +normal app initialization. Four initial successful captures preserved the main app PID. +Subsequent one-shot attempts intermittently returned zero callbacks despite a successful SDK +start. Keeping a stream open between requests did not resolve this: four successive startup +attempts returned zero callbacks. USB reconnection and a separate attempt with positional +tracking temporarily disabled also returned no frames. The user's decision was to stop the RGB +route and compare the models on stereo. The persistent-stream and RGB/stereo calibration-buffer +prototypes were removed; the isolated one-shot command remains for manual diagnostics only. + +Three requested normal-grip RGB captures (`112581486574499`, `112588468819444`, and +`112595950634337`) were evaluated with the same local model assets and thresholds: + +| Pipeline, full image | First | Second | Third | +|---|---:|---:|---:| +| MediaPipe Full | 0 hands | 0 hands | 2 hands | +| MediaPipe Lite | 0 hands | 0 hands | 1 hand | +| RTMDet-nano + RTMPose-m Hand5 | 2 hands | 2 hands | 2 hands | + +Overlapping square crops recovered one grip in the first image with Full and Lite; neither +recovered a hand in the second. The no-hands control image produced zero detections for all +three pipelines. Visual inspection of the alternative model's overlays found plausible wrist +locations on these grips, including the closer, partly cropped second view. Three selected +images are not an accuracy dataset or evidence of continuous tracking, identity preservation, +or measured reach. RGB results and overlays are in `build/joycon-rgb-evaluation`. + +The unchanged official ONNX models were also replayed on the Fold7 using Android ONNX Runtime +1.31.0 and OpenCV 4.13.0 preprocessing. Four warm-ups and ten timed iterations per image gave +two-thread median times of 119.90, 119.88, and 129.24 ms; the largest sample was 151.04 ms. +Four threads gave medians of 120.45, 120.79, and 121.05 ms. Timings include preprocessing, +detection, and two hand landmark passes, but exclude JPEG decoding, camera acquisition, +stereo depth, head fusion, rendering, and concurrent SteamVR load. Thus they already exceed +the 100 ms end-to-end target. The app's OpenCV DNN importer alone rejected the detector's TopK +operator; these measurements used a separate native benchmark, not a new production model +dependency. [ONNX Runtime mobile support](https://onnxruntime.ai/docs/get-started/with-mobile.html). + +The RGB SDK timestamps were zero on this device. Diagnostics record host callback receipt +separately. A temporary prototype successfully collected one nearby stereo pair with surrounding +frames, but the subsequent board attempt received no RGB frame. No RGB calibration was fitted. +Existing stereo calibration does not supply RGB lens parameters or the RGB-to-stereo transform. +RGB has never been used to publish controller positions in this experiment. + +### Stereo-only follow-up and wrist landmark 0 + +The alternative RTMDet/RTMPose pipeline was replayed on the Fold7 against the same three raw +stereo grip pairs, without RGB. With live Joy-Con inference temporarily paused, counts were +0/0, 1/0, and 2/1 hands in the left/right images. Per-image medians were 45.63/45.42, +129.35/45.03, and 199.50/123.13 ms. These are sequential single-image benchmark measurements, +not concurrent stereo latency or end-to-end tracking. Both candidate pairings in the last +capture failed the current geometry gates. The plausible wrist pair projected with 4.17 px +and 3.27 px error, exceeding the 3 px limit; the other pairing reconstructed behind the camera. +Neither a valid grip nor a valid isolated wrist was established. The log and geometry report +are `build/joycon-stereo-phone-ort-controlled.log` and +`build/joycon-stereo-phone-ort-geometry.json`. + +“Full” in this project is the full MediaPipe Hands landmark model, not a full-body model. +At the time of the model comparison, the live Joy-Con estimator used the midpoint of wrist 0 +and middle-finger base 9, validated with an additional base knuckle. The saved-pair diagnostic +added `wrists`, testing landmark 0 without those palm anatomy requirements. This cannot +recover a wrist when the upstream hand detector misses the grip in either camera. + +The existing desktop Full outputs at the production 0.6 thresholds, using raw uncropped +images, gave confident left/right counts of 0/0, 1/0, and 0/0. Thus none offered a wrist +pair even before palm geometry checks. Desktop Tasks 1.1.1 static-image evaluation differs +from Android Tasks 1.0.0 VIDEO replay and must not be presented as an Android measurement. +The local report is `build/joycon-mediapipe-wrist-evaluation.json`. The updated Android +wrist-only diagnostic was built and installed, but its replay is pending the glasses USB +approval after installation. The last phone settings check showed positional tracking on, +Joy-Con tracking off, and hand controllers off; there was no active stereo engine. + +Keep MediaPipe Full as the live baseline. The alternative's better RGB detections did not +transfer to dependable stereo grip positions on these captures. No new physical arm-extension +validation has been completed. + +### Live wrist-only Joy-Con position + +Following the user's correction, Joy-Con mode triangulates only landmark 0 and publishes its +position transformed through the camera-to-head and captured head poses. Knuckle availability, +palm proportions, and the wrist/knuckle midpoint no longer affect Joy-Con acceptance or position. +The estimator is `JoyConWristPosition`, and diagnostics report `joycon-wrist` with wrist-specific +missing-landmark and motion outcomes. Bare-hand gesture tracking still uses its palm geometry. + +Optical flow now seeds only the wrist and accepts a single tracked point per camera; the +previous three-point minimum is removed. Forward/backward and photometric checks, stereo +depth and reprojection limits, motion rejection, head synchronization, freshness, and track +expiry remain in place. Controller rotation and buttons still come from the Joy-Con, and +the driver still falls back to the arm model when fresh camera positions are unavailable. +This removes the unnecessary knuckle dependency, but does not bypass MediaPipe's hand +detector or establish continuous wrist visibility in the saved grip images. + +### RGB transport retry: hidden USB submission failure + +After the wrist-only test did not meet the user's needs, the RGB investigation resumed. +Capture `116048611549114` added stderr collection with `LIBUSB_DEBUG=4`, separate from the +vendor log hook. The SDK returned start status 0 and streaming status 1, but libusb reported +`submit_iso_transfer: submiturb failed, errno=12` (`ENOMEM`) and subsequent isochronous packet +errors. No RGB callbacks arrived. GET_INTERFACE showed alternate setting 5; the negotiated +UVC payload was 2400 bytes per microframe. This establishes USB allocation/submission failure, +not its exact resource limit: Android denied reading the USB memory-limit sysfs attribute. + +Binary inspection also traced the earlier native crash to `libusb_cancel_transfer(NULL)` +while cleaning up a failed start. Reopening alone was therefore too specific an explanation. +The embedded SDK's roughly 100-transfer queue is a plausible source of pressure. Its public +API cannot change the queue or the fixed 1080p30 mode. + +An optional independent diagnostic transport now uses libusb 1.0.30 and libuvc 0.0.8 with eight +queued transfers. The pinned libuvc source was patched to preserve submission errors and safely +drain partial queues instead of reporting success. A hardware-free executable passed 60 starts +on the phone covering failure before any submission, failure after three submissions, and all +eight submitted. This validates failure cleanup, not camera capture. The reproducible recipe, +source hashes, and licenses are documented in `docs/third-party/uvc/README.md`. + +Raw USB descriptors advertise MJPEG 640×480, 1280×720, and 1920×1080 among other sizes, with +30/25/20/15/10/5 fps intervals. The direct path can compare these modes while head/stereo tracking +continues. It saves a local JPEG plus transfer diagnostics and stream statistics; it is not yet +connected to controller tracking. RGB lens/extrinsic calibration and measured reach remain +separate unfinished requirements. + +### Direct UVC follow-up after the firmware update + +The glasses now report firmware `12.0.02.002_20260901`, previously +`12.0.01.100_20260326`. Direct UVC acquired short bursts, but no sustained stream: +capture `140416689286120` delivered 22 callbacks over 708 ms, followed by 4.3 seconds +without another callback. The main app stayed alive. These are transport observations, +not arm-extension measurements. + +The rejection logs exposed a separate parsing bug: valid JPEG end markers were followed +by one to seven zero bytes, with buffers aligned to eight bytes. The diagnostic now trims +up to seven trailing zeros before checking the end marker and saves the trimmed payload. +A native test on the phone covers padding, truncation, garbage, null input, and size bounds. +This fixes rejection of padded frames; it cannot recover missing USB callbacks. JPEG +boundary validation also does not establish successful decoding. + +A 32-transfer queue with eight packets per transfer was compared with the original +eight transfers of 32 packets. Both fault-injection builds passed 60 simulated starts. +The smaller transfers started 1080p30 without the earlier submission error, but received +zero frames (`140593211685272`). At 640p the smaller transfers still stalled after seven +callbacks (`140493747047289`). Neither configuration established reliable acquisition. + +Explicit USB device resets returned success but produced no frames at 640×480/30 or +320×240/5. GET_INTERFACE retained the selected alternate setting. Android's external +camera provider reported zero devices. A physical reconnect with positional tracking +disabled before attachment also yielded zero callbacks (`141363168667894`): capture +waited five seconds for the first frame and never entered its requested ten-second +observation window. The original positional and Joy-Con settings were restored afterward; +bare-hand controllers remained off. This failure occurs without the stereo/VIO stream. + +Capture evidence is under `build/joycon-rgb-captures/<id>`, including `usb.log`, +`frame.json`, descriptors, and per-worker `libuvc-logcat.txt`. Teardown cancellation +messages are not evidence that transfers were cancelled during acquisition. RGB remains +diagnostic-only, with no RGB depth calibration or controller-position publication. + +Detailed USB logging in capture `141627121555242` recorded 224 successful isochronous +transfer completions over approximately 223 ms, each totaling 96 bytes, followed by no +successful completions until capture teardown. These small transfers did not produce a +decoded image or frame callback. A follow-up (`141844371790836`) read the UVC streaming +error code before and after the stall: both returned code 0. Android denied reading the +USB power-management sysfs attributes, so autosuspend was not verified as a cause. + +The user confirmed a direct VITURE cable connection. With the same glasses and cable +connected to Windows, FFmpeg/DirectShow decoded 300 frames in each of three ten-second +runs: 640×480/30, 1920×1080/30, then 640×480/30 after reopening. Outputs used passthrough +frame timing and frame hashes, with no frame-rate duplication or saved video. All exited +successfully without timeout. Evidence is in `build/joycon-rgb-windows`, produced by +`build/test-luma-rgb-windows.py`, which selects only USB VID:PID `0c45:636b`. This supports +investigating the Android host/USB path further; it does not prove the camera will be +reliable on every host or establish the exact Android fault. + +A controlled APK replacement of only `libusb.so` with official libusb 1.0.27 also +returned zero callbacks (`142296418051861`). Its source archive SHA-256 is +`ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575`; provenance and the +one-entry APK comparison are under `build/rgb-libusb-1.0.27`. The production dependency +pin remains 1.0.30. An isolated YUYV 320×240/5 diagnostic negotiated format 2 but likewise +received zero raw frame callbacks (`142407601079475`), so JPEG validation was not its +failure point. Neither comparison changed the production camera format. + +Finally, 64 queued transfers of 32 packets increased the high-speed queue coverage from +approximately 32 ms to 256 ms. Its fault-injection executable passed all 60 starts. +Capture `142557405834522` recovered 18 valid JPEGs over 577 ms, then stalled for the +remaining 9.42 seconds of its ten-second observation. All 18 passed the padding fix; +the saved final JPEG also decoded at 640×480 in OpenCV. This is not sustained tracking +and neither alternate queue was adopted. Temporary USB reset, queue configuration, and +verbose logging experiments were removed. The retained UVC recipe uses eight transfers +of at most 32 packets, and retains the JPEG-padding fix. diff --git a/docs/development/luma-spatial-evidence.md b/docs/development/luma-spatial-evidence.md new file mode 100644 index 0000000000..210b25e3d3 --- /dev/null +++ b/docs/development/luma-spatial-evidence.md @@ -0,0 +1,445 @@ +# Luma Ultra implementation evidence + +Date: 2026-10-15. Status: experimental prototype, combined release gate not passed. Native 6DoF and synchronized stereo camera delivery were observed on hardware. Camera calibration and optical-hand acceptance were deferred at the user's request. + +## Device and build + +| Item | Observed value | +|---|---| +| Android host | Samsung Galaxy Z Fold7, SM-F976U | +| Android version | 17 | +| Glasses | SDK-confirmed VITURE Luma Ultra / Carina | +| Glasses firmware | `12.0.01.100_20260326` | +| Vendor SDK | External Android C SDK 2.4.0 | +| Test application | `com.droiddeck.launcher.xr`, debug experimental build | +| Camera pair | Primary left0/right0, both 640 by 480 | +| Hand runtime | MediaPipe Tasks Vision 1.0.0; OpenCV 4.13.0; pinned model SHA-256 in the model provenance asset | +| CPU or GPU inference benchmark | Not run; no accepted calibration | + +Existing picture, refresh-rate, and graphics work was preserved. The test temporarily enabled positional tracking and in-memory camera diagnostics. Diagnostics were stopped and the positional preference restored to its previous off setting afterward. Hand controllers were never enabled. No camera image recordings were saved. Subsequent builds are local artifacts; the phone was left available for a separate active SteamVR test. + +## Hardware observations + +Initial VIO output was unstable. After the user wore/moved the glasses and the software origin was recentered, valid 6DoF output was observed. Changing position values confirms positional data is available, but does not establish correct physical axes or 1:1 scale without a measured reference. + +Camera frames initially arrived before their matching VIO callback. A bounded wait of up to 35 ms in the latest-frame reader allowed matching timestamps without building a queue. The public callback's undocumented pose basis is not used; capture transforms come from canonical OpenGL pose history. + +A subsequent diagnostic interval produced these results: + +| Measurement | Result and scope | +|---|---| +| Sampled head validity | 30 of 30 status snapshots valid | +| Sampled camera/head synchronization | 30 of 30 status snapshots synchronized | +| Processed stereo pairs | Counter increased by 1,048 | +| Dropped stereo pairs | Counter increased by 9 | +| Median reported camera rate | 24.998 Hz | +| Median estimated frame age | 24.73 ms | +| Observed estimated frame-age range | 21.44–45.96 ms across the 30 snapshots | +| Median diagnostic processing time | 1.62 ms; no hand inference or calibrated undistortion | +| Host receipt age of latest head poll | 0.09–4.40 ms across sampled snapshots; not sensor latency | + +These are sparse status samples in an uncontrolled workload, not a frame-by-frame latency benchmark. Receipt-based source-clock mapping does not measure absolute camera exposure delay. None of these values establishes physical-motion-to-visible-controller latency, hand availability, or game-frame-time performance. + +Local raw metadata is in `build/spatial-hardware-observations.json`. The earlier startup/recenter observations are in `build/spatial-after-movement.json`, `build/spatial-recenter-state.json`, and `build/spatial-sync-state.json`. Those files contain pose/status metadata, not images. + +## Automated and build validation + +- SDK-enabled and explicitly SDK-free debug APK builds pass with runtime freshness checks enabled. +- All 305 affected Kotlin glasses, head-pose, Cardboard, and glasses UI tests pass with zero failures or skips. New cases exercise canonical coordinates, normalization, floor anchoring, crouched recenter, independent origins, stale/discontinuous samples, generation rejection, pose history, camera-clock warmup/reset, gesture geometry, and inference-buffer ownership. +- ARM64 VR driver and presentation-layer builds pass. Native tests cover ABI offsets and size, empty/truncated/version-mismatched or incoherent reads, independent hand timestamps, finite poses, stale tracking, trigger hysteresis, lost-input release and released-gesture rearming. Existing fence, timeline, and render-target tests also pass. +- Native Cardboard parameter tests cover all three translation values, zero-translation equivalence, and unchanged SBS/flat parameters. The GLSL compiles; the committed SPIR-V matches regenerated glslang output, and push constants remain within the guaranteed range. +- VR build manifests include the new shared header. Packaged runtime and APK payload checks reject mismatched source/output checksums. Both external vendor files and transient dependency-inspection files remain outside tracked source. +- Packaging regressions pass: 8 Windows VR build tests, 13 Windows preparation tests, and 11 runtime-input tests. Runtime-input tests ran in the Linux container because the Windows host has no standalone zstd executable. + +Build logs are `build/spatial-sdkfree.log`, `build/spatial-final-build.log`, `build/spatial-vr-build.log`, `build/spatial-shader.log`, and `build/spatial-runtime-evidence.json`. Test reports are under `app/build/reports/tests/testDebugUnitTest`. + +The preserved SDK-enabled snapshot is `build/DroidDeck-luma-spatial-experimental.apk`; the SDK-free counterpart is `build/DroidDeck-spatial-sdkfree.apk`. SHA-256 hashes and final payload checks are recorded in `build/spatial-final-validation.json`. The final local snapshot includes additional buffer-ownership and conservative tracking-loss fixes after the hardware smoke test. It was not installed over the phone being used for the separate SteamVR tests. Integrate these sources into that chat's next build before later calibration; do not replace its newer runtime-storage fixes with this older snapshot. + +A subsequent report from the parallel SteamVR test identified Android eviction of the live `cache/viture` directory. The SDK working-directory source was changed to `noBackupFilesDir/viture` afterward. The preserved APK snapshot and the hardware observations above predate this storage change. No additional phone restart or installation was performed here; the next shared-workspace build should include it. + +## Calibration usability follow-up (2026-10-15) + +The calibration screen now uses DroidDeck's saved palette, app scale, settings groups, and buttons, with separate tracking, capture, validation, and diagnostic sections. Eye height, virtual-screen dimensions, board instructions, and validation messages include imperial measurements. The distance check accepts either 20 inches (0.508 m) or 50 cm (0.5 m), using the selected value in reconstruction validation. + +Recenter requests made while the newest pose is stale or invalid were previously ignored. Requests now remain pending and are acknowledged immediately in the UI; recovery waits for 250 ms of fresh, steady tracking. Normal recentering preserves floor height, new connections cancel old requests, and captures cannot mix different VIO coordinate frames. Looking straight upward also retains a stable heading instead of deriving yaw from an almost-zero forward projection. Camera diagnostics resume when the provider restarts while setup remains open. + +Validation: 247 glasses and calibration/settings UI tests pass with zero failures or skips. The SDK-enabled debug APK builds, runtime input verification passes, and native Robolectric renders of the recovery and distance screens were visually checked. The APK's DEX files were checked for the new measurement controls. Logs are in `build/spatial-setup-build.log`; previews are in `app/build/reports/spatial-setup/`. The phone was not reinstalled or reconfigured during the other chat's SteamVR stability run. The user's reported repeated-recenter behavior still needs confirmation on the glasses after installing this build. + +After those stability tests finished, the combined calibration/recenter APK was installed at 17:09 MDT on October 15. Its SHA-256 is `80bf99374a31676b675856c782298aecc1e1c649ad2fc5c1ce3b18b981979e3e`; hashing the installed `base.apk` confirmed an exact match. The app cold launch and agent status checks passed. The helper, VR driver, and scheduling preload match the preceding freeze-tested build. This install confirms delivery of the latest calibration changes, not hardware acceptance of recentering or calibrated hands. + +## Capture counter fix (2026-10-15) + +Board detection checked head freshness against the worker's start time. A newer head poll arriving during detection made that timestamp precede the latest pose and rejected an otherwise valid capture. Completion now checks freshness under the session lock using the current monotonic time, while still rejecting stale poses, changed connections, changed tracking frames, and pending recentering. The same timing check was corrected around hand inference. Capture progress now exposes pending work and shows success or the rejection reason beside the counter, including the number of common board corners when detection fails. + +Validation: 24 targeted spatial and setup UI tests pass with no failures or skips, including the head-poll/detection timing regression and stale/disconnected-frame rejection. The SDK-enabled APK builds with runtime freshness verification. Build log: `build/spatial-capture-fix.log`. APK: `build/DroidDeck-spatial-capture-fix.apk`, SHA-256 `bf362bb606a3ec72665102b66e4a122c8fad9f5f7333f5a9a3ea3fef9a3bc9d5`. The installed Fold7 `base.apk` hash matches. + +With USB permission granted, valid native tracking, and synchronized stereo images at approximately 25 Hz, a live Capture board view action advanced the counter from 0 to 1 of 24 and reported success. The accepted view remains in the open calibration session. Status-only evidence is in `build/spatial-capture-fix-device.json`; no diagnostic camera recording was saved. This confirms capture acceptance and counter progression, not a completed calibration or optical-hand acceptance. + +## Calculation failure and compact setup follow-up (2026-10-15) + +The user reported calculation failure after at least 24 accepted captures; inspection found 35 observations still in memory. Logcat identified an OpenCV fisheye stereo fitting exception when successive views contained different corner counts (12–24 in this set). [OpenCV 4.13's implementation](https://github.com/opencv/opencv/blob/4.13.0/modules/calib3d/src/fisheye.cpp#L819) allocates its stereo residual blocks using the first view's count. The revised path fits fisheye intrinsics, undistorts every observed point, and fits stereo geometry with fixed intrinsics and zero residual distortion using the variable-count pinhole stereo solver. It retains every correspondence and still measures held-out error with the original lens model. Model failures are logged individually and the page shows the actionable reason instead of a generic failure. + +All 35 observations were exported from the debug app as board landmarks and head poses before installation, backed up in app-private storage, and restored on the same connected glasses. No diagnostic camera recording was taken. Accepted captures now save this metadata automatically; automatic recovery requires a matching serial and geometry, and recovered batches cannot accept new-frame observations. This device did not expose a serial, so recovery here was explicit through the debug interface. The session-labelled backup is not automatically trusted on later unidentified connections. + +The fixed fitter ran on the Fold7 with the restored set. Fisheye stereo fitting now completes, but both models fail stationary-board alignment: the best result varies by 25.5 cm (10.04 inches), above the unchanged 5 cm gate. The user confirmed the board was fixed. Offline replay showed a marked coordinate shift between the early and later observations; an exploratory fit of the first 13 observations agreed within 7.4 mm, while the full set did not. This suggests VIO frame motion/drift during collection; it does not establish its exact cause or validate a calibration from a selected subset. No profile was approved, and hand-controller acceptance remains blocked on a stable capture set plus measured-distance validation. + +The calibration page now has a single Back/title row and no fixed subtitle or eyebrow. A landscape regression check requires at least 75% of page height for scrolling, and both its rendered preview and the installed Fold7 layout were inspected. Guidance explicitly asks for gentle turns and tilts with a pause before each capture. The final SDK-enabled APK and 29 targeted tests pass, including saved-point parsing, stale-frame behavior, restored-batch UI, and landscape viewport coverage. Runtime freshness verification passes. Installed APK SHA-256: `1ca44c6b2b480b197ec0069db026b765d7927c30b7cea7b80cb67d50d626d38a` (verified against `base.apk`). Artifact: `build/DroidDeck-calibration-calculation-fix.apk`. Evidence: `build/spatial-calculation-fix.log`, `build/calibration-observations-backup.json`, `build/calibration-alignment.log`, `build/calibration-calculation-device.json`, and `build/calibration-layout-after.png`. + +## Distance-validation feedback follow-up (2026-10-15) + +A new 25-view capture set produced a fitted pinhole calibration with 1.12094 px held-out reprojection error and passed the existing alignment checks. The user then reported that Validate distance appeared to do nothing. Live status showed that it had run and failed, but the message was attached to Calculate camera alignment, above the visible distance controls. + +Validation now has independent pending/result state beside its own button. It reports partial-board corner counts, stereo-depth rejection, or measured versus selected distance in both units. It disables duplicate presses while pending and times out when no fresh camera image arrives. The complete-board requirement and 5 cm distance tolerance are unchanged. Processing errors are reported without stopping the camera worker. + +The 25 original observations and fitted geometry were backed up, then explicitly restored onto the same connected glasses after installation, retaining `verified=false`. The device still provides no serial; no cross-device or automatic unidentified-profile reuse was introduced. A live validation attempt on the updated app reported 3 of 24 common corners rather than silently failing. Physical-distance validation remains pending; the existing fit and captures remain available in the open setup session. + +Validation: 36 targeted tests pass, including visible validation feedback, pending-button state, complete-board/depth rejection, dual-unit output, camera-to-center distance, and unchanged tolerance. The SDK-enabled APK builds with runtime freshness verification. The result layout was rendered and visually inspected. APK: `build/DroidDeck-calibration-distance-fix.apk`; SHA-256 `1f0b288fdcb76231ecc9f5178f6621799b01f0eb83b574c79394fa1a04bb5f47`. Logs and metadata: `build/spatial-distance-fix.log`, `build/spatial-distance-apk.log`, `build/calibration-distance-fit.json`, `build/calibration-distance-captures.json`, and `build/calibration-distance-after.json`. + +## Near-distance detection fix (2026-10-15) + +The live stereo preview showed the complete printed board at the user's reported 20-inch position, but the pattern occupied only about 70 pixels across in the original 640 by 480 images. One explicitly requested diagnostic pair was saved. OpenCV 4.13 detected 16 left-camera checkerboard corners in the raw image and none after image undistortion; the right image detected 3 raw and 1 corrected. Neither version supplied a complete common board. This identified both limited marker resolution and additional loss from resampling, rather than paper edges being out of view. + +Distance validation now detects the original image pair and undistorts the detected coordinates before stereo reconstruction. Pinhole inversion uses an explicit convergence criterion. The UI defaults to 12 inches (0.3048 m), also offers 30 cm, and retains the 20-inch and 50-cm choices. Feedback distinguishes detected checkerboard corners from paper edges. The 24-common-corner, stereo reprojection/depth, and 5-cm physical-distance gates remain unchanged. + +Validation: all 36 targeted spatial/calibration/UI tests pass. Synthetic forward-projection and reconstruction checks exercise pinhole and fisheye point correction at 0.3048, 0.508, and 0.8 m; these verify geometry calculations, not hardware accuracy. The SDK-enabled build and runtime freshness checks pass, and the rendered result layout was inspected. APK: `build/DroidDeck-calibration-near-distance.apk`, SHA-256 `cd7e144e4fabb2e94872e4a762f1a641a61773902fa8fe40ec2c8c05d778f81d`; the installed Fold7 APK matches. Build log: `build/spatial-near-distance.log`. Synthetic results: `build/spatial-raw-landmark-geometry.json`. + +The same connected glasses' 25 accepted views and 1.12094-px fitted alignment were restored after installation without marking them verified. A subsequent user-triggered distance check reported **12.01 inches measured against 12.00 inches selected**, passing the unchanged validation gates and marking the calibration verified for this connection. Status evidence is in `build/calibration-near-distance-after.json`. Native head tracking and stereo synchronization remained valid at approximately 25 Hz. No optical hands were valid in that status sample; hand accuracy, externally measured latency, and game performance remain untested. Device identity is still unavailable, so automatic reuse across unidentified reconnects remains disabled. + +## Calibration persistence and hand-controller investigation (2026-10-15) + +After launching SteamVR, the app reported `calibrated=false`, zero restored views, and no optical observations despite valid native head tracking. Android USB did not expose a serial number, so the earlier calibration had stayed in memory. SDK 2.4.0's documented `xr_device_provider_get_sn_hash` returns a stable 32-byte board-serial digest. The adapter now reads it under the SDK ownership lock, rejects missing/zero digests, and uses it to key fitted profiles and captures. A nonblank Android USB serial remains a fallback. An unavailable identity still does not permit automatic cross-connection reuse. + +The existing 25 views and fitted geometry were explicitly imported onto the same physical glasses under the SDK identity with distance validation still required. The user repeated the check: **12.13 inches measured against 12.00 selected**. The app saved `verified=true`, and subsequent app installations/restarts automatically recovered the verified calibration and all 25 views without debugger restoration. This resolves the lost-calibration blocker; it does not establish reliable optical controllers. + +Hand diagnostics now distinguish missing calibration, synchronization/freshness failure, per-camera detections, ambiguous matching, rejected stereo geometry, and accepted hands. They retain the last completed result while inference runs, and expose preprocessing/inference timing. Observations over 100 ms old are cleared before publication; the driver and session freshness checks remain in place. CPU stereo inference runs concurrently with separate image buffers and waits for both tasks before frame reuse, including after one task fails. GPU inference remains on its owning thread. Calibrated undistortion maps are cached; comparisons against the original image-undistortion operations were pixel-identical for both cameras and both lens-model paths. + +SDK 2.4.0 documents the tracking cameras at 25 Hz and provides no stereo frame-rate setter. Faster application polling cannot raise that rate. The source-rate calculation now accounts for skipped frame sequence numbers; its earlier readout fell toward inference throughput when frames were dropped. + +Short live samples on the Fold7 do **not** pass the combined hand gate. In the final 12-sample CPU/SteamVR check, samples with detected hands took 87–137 ms to process, and no fresh hand was observed by the status reader. In the comparable GPU sample, hand-containing observations took 59–81 ms to process, with one accepted reconstruction but no fresh hand caught by the status reader. Earlier setup-only GPU samples did briefly report a fresh left hand. Stereo-depth rejection and observations exceeding 100 ms remain frequent. These are sparse internal timing samples with uncontrolled pose/thermal conditions, not externally measured latency, hand-validity percentages, or a controlled game-performance comparison. The user reported no visible controllers in SteamVR. An earlier 8-second guest-channel check found the 176-byte channel active with both feature flags set and all sampled heads fresh, but no fresh optical hands; both virtual controller devices were activated in the SteamVR log. + +One hand-landmark pair was inspected from the running reconstruction method without saving camera images. All 21 points triangulated within the broad depth range, but nine failed the unchanged 3-pixel reprojection gate. The wrist's error was 12.80 px; several fingers were approximately 3–4.3 px. Reconstructed palm width was 6.15 cm and depths were 28–41 cm. This is a correspondence/reconstruction failure, not a missing shared-memory channel. The single sample does not isolate calibration residuals from per-view landmark error, and no quality thresholds were relaxed. Data: `build/hand-stereo-point-diagnostics.json` and `build/hand-stereo-geometry-report.json`. Debugger pauses used for this inspection are excluded from performance evidence. The temporary GPU benchmark was ended with CPU mode restored; neither delegate has passed the combined gates. + +Validation: 51 targeted tests pass, including device-identity binding, concurrent stereo work, frame ownership after detector failure, calibration, gestures, and setup UI. SDK-enabled and SDK-free Android builds pass runtime freshness checks. Installed candidate: `build/DroidDeck-parallel-hands.apk`, SHA-256 `5e8ffa6a89a91e3b1b22fe289c126dca96a77dfb7645da551e8e97e13673c761`. Evidence: `build/spatial-parallel-hands.log`, `build/spatial-parallel-sdkfree.log`, `build/spatial-cached-undistortion.json`, `build/spatial-parallel-cpu-steamvr.json`, `build/spatial-cached-gpu-steamvr.json`, and `build/spatial-steamvr-hands-channel.json`. Calibration backup: `build/calibration-verified-profile.json` and `build/calibration-verified-captures.json`. The combined feature remains an experimental prototype. + +## Hand-mode color regression and CPU rollback (2026-10-15) + +The parallel CPU trial was removed after failing to improve live hand results. The serial worker retains cached lens maps, device-bound calibration persistence, and detailed rejection diagnostics. All 49 remaining targeted tests pass; the SDK-enabled APK builds with runtime freshness checks. Installed candidate: `build/DroidDeck-serial-hands.apk`, SHA-256 `bcefc87dabfde3d29f2018c2b39368d4e68cb015dd390385e3c80c74d86531c6`. Build log: `build/spatial-serial-rollback.log`. + +The user reported choppy head turns with hands and positional tracking disabled, then requested that this investigation be deferred because the phone was charging. A thermal snapshot reported status 4 and a skin sensor reading of 49.4 degrees C. The rendering log recorded approximately 55.5–60 fps at a selected 60 Hz. The retained 1.22-second prefix of a truncated head-channel diagnostic showed pose changes roughly every 3.2–6.6 ms, with no sampled gap above 7.5 ms. This small sample is not a controlled performance acceptance result. Evidence: `build/tracking-regression-sample.json`, `build/tracking-regression-analysis.json`, and `build/tracking-regression-wayland.log`. + +The HDR-like darkening is reproduced in screenshots of the glasses output, with brightness 6, Sunblock off, and valid head tracking unchanged. Camera inference enabled independently of optical-controller mode leaves normal colors. Enabling optical-controller mode with inference paused darkens midtones and shadows. A further test switching only `SpatialTracking.setHands`, bypassing the settings/menu/display-refresh path, also reproduces it. The temporary debugger overrides were removed after each comparison. This isolates the trigger to the SteamVR optical/untracked-controller path; it does not yet identify the faulty color-conversion operation. HDR output is disabled in the session. Evidence: `build/hand-color-comparison.json`, `build/hand-color-isolation.json`, `build/hand-color-mode-isolation.json`, and their `build/hand-color-*.png` screenshots. The calibration and 100-ms observation expiry remain unchanged. + +The serial candidate also passes the SDK-free build (`build/spatial-serial-sdkfree.log`). Temporary `TU_DEBUG=noubwc` did not remove the darkening, although the user changed display modes between that pair's screenshots. A subsequent `TU_DEBUG=gmem` comparison was interrupted by graphics recovery and is inconclusive. Neither diagnostic setting was retained: the following session's actual `vrserver` and `vrcompositor` environments both report an empty `TU_DEBUG`, and pending, active, and persistent agent overrides are empty (`build/hand-color-current-flags.json`). No gamma compensation or hand-validity workaround was added. + +The user's observation that SBS felt smoother coincided with 2D running at 60 Hz and SBS at 90 Hz. A later 120-Hz 2D request still reported a 60-Hz physical mode; its failure cause remains undetermined. The next 90-Hz 2D selection succeeded: Android reports 1920 by 1200 at 90 Hz, and the SDK reports mode `0x43`. The app therefore has no fixed 60-Hz limit for 2D. 2D and SBS retain separate refresh preferences; actual display mode must be checked independently of the requested value. Evidence: `build/hand-color-display-modes.txt` and `build/refresh-mode-final.json`. This confirms the active refresh mode, not sustained 90-fps game rendering or a thermal/performance acceptance result. + +## Color fix, original-image detection, and late synchronization (2026-10-16) + +The HDR-like color change is fixed and confirmed by the user in the glasses. `NewSharedVulkanImage` requested compute access for compositor eye textures even though DroidDeck only needs rendering and sampling. SteamVR replaced the requested `R8G8B8A8_SRGB` format (43) with `R8G8B8A8_UNORM` (37). The untracked-controller compositor path then produced dark linear midtones, while its multisampled controller path encoded colors differently. Removing compute access preserves format 43 in both paths. Temporary Vulkan tracing established the before/after formats and was removed from the delivered build; the presenter retains its existing byte-preserving UNORM import. No gamma compensation was introduced. Evidence: `build/color-format-fixed-trace.json`, `build/color-format-fixed-states.json`, and the corresponding on/off output images. The user reported that colors now stay the same when toggling Hand controllers. + +One explicitly authorized stereo image pair showed upright camera images and two visible open palms. Replaying it with the exact Android CPU detector found one left hand in each camera. All 21 landmarks passed the unchanged 3-pixel reprojection gate (maximum 2.227 px), with reconstructed palm width 7.31 cm and depth approximately 32–39 cm. The right hand was not detected consistently; lower confidence thresholds and exploratory crops did not establish an improvement and were not adopted. Hand detection now consumes the original grayscale images converted to RGBA and corrects landmark coordinates before triangulation, avoiding full-image resampling. This verifies one reconstructable sample, not sustained detection accuracy or two-hand operation. Evidence: `build/android-hand-pair-replay.json`, `build/android-hand-pair-geometry.json`, and `build/hand-pair-replay.json`. + +Previously, camera acquisition waited up to 35 ms for a matching VIO callback before starting hand inference. Inference now starts with the newest pair and checks the exact source timestamp again after detection, allowing VIO processing to overlap detection. Publication still requires a matching callback within 5 ms, a nearby canonical head-history sample, unchanged connection and tracking frame, healthy current head tracking, and an observation no more than 100 ms old. The callback's undocumented pose basis remains unused. Calibration and preview-only acquisition retain their bounded wait. Four additional regression tests cover late confirmation with the original capture pose, missing confirmation, expiry, tracking loss/discontinuity, reconnects, and unavailable history. + +Validation: 53 targeted Android tests pass with no failures or skips; SDK-enabled and SDK-free Android builds and runtime freshness checks pass. The ARM64 VR build passes its native layout, freshness, optical input recovery, render-target, synchronization, and scheduling checks. Temporary color tracing is absent from the final driver source and packaged runtime. Installed SDK-enabled artifact: `build/DroidDeck-spatial-color-sync.apk`, SHA-256 `885fb14b5a30ac65a255a6b0dd519d9f73b72489c08a8b74e1756673b86812ea`. Logs: `build/color-fix-final-native.log`, `build/color-fix-final-stage.log`, `build/spatial-late-sync-build.log`, `build/spatial-late-sync-sdkfree.log`, and `build/spatial-color-sync-install.json`. + +During the subsequent grey-screen report, the compositor continued presenting approximately 60 frames per second, but the SDK returned unstable head status 1 and the shared head pose was invalid. USB timeout messages also appeared; their causal relationship to tracking loss is not established. The clean app/provider restart preserved all 25 calibration views and the verified profile. After tracking recovery and software recentering, the user confirmed both “6DoF active” and the visible SteamVR dashboard. Positional tracking was briefly disabled for diagnosis and restored. No synthetic valid pose or silent fallback was added. Evidence: `build/grey-launch-guest.json`, `build/grey-launch-app.log`, and `build/spatial-color-sync-recovered.json`. + +The next 16-second left-palm test sampled the guest spatial channel 2,900 times: every head was fresh, but no optical controller pose was fresh. Six status samples showed one matched hand in both cameras and successful stereo reconstruction; inference took 139.7–174.3 ms and total processing 144.1–181.8 ms. Those observations correctly expired before publication. The other three status samples were waiting for synchronization. The app restarted between preparation of a temporary GPU benchmark and this measurement, so the active delegate was not verified in the new process and this is not a controlled GPU comparison. A later thermal snapshot reported status 4 and skin readings up to 51.0 degrees C; its contribution to the measured slowdown is unquantified. Evidence: `build/spatial-live-hands-left.json`, `build/spatial-live-hands-left.log`, and `build/spatial-hand-thermal.txt`. The glasses subsequently disconnected, preventing another live comparison. The next measurement needs a stable process/connection, explicit delegate verification, and controlled thermal conditions. Hand controls remain an experimental prototype and have not passed the combined release gate. + +## Tracking-loss recovery screen (2026-10-16) + +Active positional SteamVR and virtual-screen sessions now show a DroidDeck-themed recovery screen over the rendered output when head tracking becomes invalid. Separate states explain how to recover tracking, reconnect USB, recenter a changed origin, or hold still while recentering settles. The screen is rendered independently of the head pose, supports mono and SBS output, and closes automatically after valid tracking returns. The phone retains access to Recenter and glasses setup. No tracking validity, input-expiry, calibration, or driver behavior was relaxed. + +Validation: 65 targeted Android tests pass without failures or skips, including callback-free stale-pose detection, recovery states, presentation surface preservation, mono/SBS rendering, and theme colors. Robolectric native-rendered previews were visually inspected at 1080 by 600 and 3840 by 1200; this is automated rendering evidence, not a physical glasses acceptance check. SDK-enabled and SDK-free Android builds and packaged-runtime freshness checks pass. Logs and previews: `build/tracking-recovery-build.log`, `build/tracking-recovery-sdkfree.log`, and `app/build/reports/tracking-recovery/`. + +Installed SDK-enabled artifact: `build/DroidDeck-tracking-recovery.apk`, SHA-256 `2170c2e513d45af048b9aba01b76a694d333ba9848a91021a47d413fca3d282d`. Installation preserved app data and was performed with the session idle; SteamVR was not started. The installed APK hash matches the archived artifact (`build/tracking-recovery-install.json`). A live tracking-loss/recovery check through the glasses remains pending. + +## Cooled-phone retest and visible left controller (2026-10-16) + +The Fold7 initially reported thermal status 1, approximately 40.3 degrees C skin temperature, healthy USB access, and the saved 25-view calibration. Head tracking recovered to valid status 0. CPU inference was verified through the live setup control in process 17409, session 12. By the 16-second left-palm measurement, thermal status had returned to 4. All nine diagnostic samples detected and reconstructed a matching hand in both cameras, but inference took 124.4–173.3 ms. The guest channel had 3,038 fresh head reads and zero fresh hand reads. This does not establish an unthrottled CPU baseline. Evidence: `build/cooled-cpu-verified-ui.json`, `build/spatial-live-hands-cooled-cpu.json`. + +Enabling GPU inference while that SteamVR session was running initialized both GPU graphs, including OpenCL loading, at 01:10:24–01:10:27 device-local time. The compositor first reported `vkerror=-4` at 01:10:29.516; automatic graphics recovery then killed and restarted the app. Process 27927, session 13, was back on CPU. The subsequently captured file named `build/spatial-live-hands-cooled-gpu.json` therefore contains CPU observations after recovery and must not be counted as a GPU comparison. Process IDs, session IDs, the setup control returning to Off, and Android exit records establish that reset. The timing associates GPU initialization with the device-loss event but does not establish its underlying driver cause. Evidence: `build/cooled-before-restart-logcat.txt`, `build/cooled-session12-vrcompositor.txt`, `build/cooled-session12-events.jsonl`, `build/cooled-exit-info.txt`, `build/cooled-gpu-after-ui.json`. + +With SteamVR stopped, GPU inference was enabled and verified in process 27927. Twelve diagnostic samples then measured 10.3–14.1 ms inference and 12.0–19.7 ms total observation age, with healthy head tracking. These samples were not a prescribed palm-hold accuracy test; most saw a hand in only one camera and none produced accepted geometry. Evidence: `build/cooled-idle-gpu-verified-ui.json`, `build/cooled-idle-gpu-sample.json`. + +Launching SteamVR after GPU initialization preserved process 27927 for session 14. During a fresh 16-second left-palm hold, the guest channel received 67 distinct valid left-hand observations. The left hand was fresh in 315 of 2,864 coherent channel reads (11.0%); all heads were fresh. This percentage measures sampled channel availability, not the acceptance target's percentage of camera observations. The user confirmed a controller appeared or flickered. Eight diagnostic samples all reconstructed the left hand, but inference varied from 41.8–101.6 ms and observation age from 72.5–131.9 ms. Thermal status remained 4, with reported skin temperature increasing from 49.1 to 51.3 degrees C. The session also logged another Vulkan device-loss event, so initializing GPU inference before SteamVR did not resolve stability. Evidence: `build/spatial-live-hands-prewarmed-gpu.json`, `build/cooled-prewarmed-start.json`, `build/cooled-session14-events.jsonl`. + +This confirms a visible optical left-controller path, with no relaxed timestamp or geometry checks. Both-hand reliability, gesture operation, measured end-to-end latency, and sustained performance remain unvalidated. No camera images were saved during these tests, and calibration was not changed. The run was stopped after the repeated graphics fault. After confirming the session was idle and its artifacts complete, DroidDeck was closed to stop background inference and clear the temporary GPU benchmark; saved settings and calibration were retained. The next work must address GPU/SteamVR coexistence and inference latency under sustained thermal load; another calibration is not indicated by these successful left-hand reconstructions. + +## Requested 200 ms experimental hand cutoff (2026-10-16) + +The user requested accepting hand observations up to 200 ms old to reduce disappearing controllers while inference is slow. The cutoff now applies consistently to inference admission/completion, capture-pose lookup, Android publication, and SteamVR optical pose/input freshness. Observation timestamps are unchanged. Head freshness remains 100 ms, and detected loss, changed tracking frames, reconnects, and recentering still invalidate hands immediately. Missing observations can now retain trigger/grip until the 200 ms expiry; reacquisition still requires an observed release. This intentionally changes the earlier 100 ms hand-expiry requirement, without claiming lower processing latency or resolving the Vulkan faults. The diagnostics field `handMaxAgeMs` reports the active limit. + +Validation: 73 targeted Android tests pass, including a 150 ms inference result using its original capture pose, the inclusive 200 ms boundary, rejection immediately after that boundary, unchanged 100 ms head expiry, and independent hand timestamps. Native tests pass the same hand/head boundaries, pose validity, stale-input release, and reacquisition behavior. The ARM64 driver was rebuilt, staged, and verified against source/output checksums; SDK-enabled and SDK-free Android builds pass. Logs: `build/hand-200ms-native.log`, `build/hand-200ms-stage.log`, `build/hand-200ms-build.log`, `build/hand-200ms-sdkfree.log`. + +Installed SDK-enabled artifact: `build/DroidDeck-hand-200ms.apk`, SHA-256 `dac9296cbc964fca87b65b7e1e8b87276deaaeb5d90ca731d47eae673e22c64d`. Its packaged driver matches the rebuilt ARM64 binary, SHA-256 `bf24667f9f288cd07efe6e100c3b237b1e68b734100ae99cf93974538ce3bc6a`. The installed APK hash and live `handMaxAgeMs: 200` were verified. Calibration and saved settings were preserved. SteamVR was not launched, and the app was closed after verification to stop background inference (`build/hand-200ms-install.json`). Live controller availability, gesture delay, and release behavior with the new cutoff remain unmeasured. + +## GPU default requested by the user (2026-10-16) + +The user explicitly requested GPU inference as the default. Every new stereo hand engine now selects GPU, including after app restart, USB reconnect, and provider restart. The setup control is renamed **GPU hand inference** and explains that disabling it selects CPU until the next tracking restart. Diagnostics distinguish `handGpuEnabled` (selection) from `handInferenceBackend` (GPU/CPU only after both detectors initialize, otherwise `not initialized`). This replaces the earlier CPU-default policy; it does not resolve the measured Vulkan failures or constitute performance acceptance. The 200 ms hand cutoff and gesture mappings are unchanged. + +Validation: 73 targeted Android tests pass, including pinch/grip mapping, expiry, tracking recovery, and setup UI. SDK-enabled and SDK-free builds and runtime freshness checks pass. The packaged driver still matches the previously tested 200 ms ARM64 binary. The active SteamVR test was stopped cleanly before installation. GPU selection and the verified calibration were confirmed in two distinct app processes, 22127 and 23157, separated by a full app restart. Head tracking was valid, but hand diagnostics reported waiting for camera/head synchronization and the detectors reported `not initialized`; these checks verify default selection and profile persistence, not a new live GPU inference or gameplay result. SteamVR was not relaunched. + +Installed SDK-enabled artifact: `build/DroidDeck-hand-gpu-default.apk`, SHA-256 `a32feb647b0ca9fb6f62bd31158450b58e5671de7c1b0324f6b0b56bd4c92a47`. The installed APK hash matches. Evidence: `build/hand-gpu-default-build.log`, `build/hand-gpu-default-sdkfree.log`, `build/hand-gpu-default-install.json`. Click instructions are documented: present an open hand, aim the virtual controller, pinch thumb and index finger to press, and separate them to release. Curling the middle, ring, and little fingers supplies grip; tracking loss requires another observed open/released gesture before input can resume. + +## CPU default restored and model optimization investigated (2026-10-16) + +After further SteamVR restarts, the user requested reverting to CPU. New engines, the no-engine diagnostics fallback, and the setup UI now default to CPU again. The optional GPU toggle explains the observed restart risk and resets on tracking restart. Calibration, the color fix, and the requested 200 ms hand cutoff are retained. GPU device loss has not been fixed or ruled out under other configurations. + +Validation: 73 targeted Android tests pass with no failures, errors, or skips. SDK-enabled and SDK-free builds pass; the SDK-free APK excludes the optional VITURE bridge. The SDK-enabled APK's packaged ARM64 driver matches the previously tested 200 ms binary. CPU selection (`handGpuEnabled: false`) and the verified 25-view calibration were confirmed in two distinct processes, 3540 and 3717, across a full app restart. Head tracking was lost and hand detectors were `not initialized` during these checks, so this verifies the restored default and preserved calibration, not new live CPU performance or SteamVR stability. + +Installed artifact: `build/DroidDeck-hand-cpu-restore.apk`, SHA-256 `5ae8f702fdce16501a69731fd5b0e718198e267276e918322b15228ae3b95282`. The installed APK hash matches. Driver SHA-256 remains `bf24667f9f288cd07efe6e100c3b237b1e68b734100ae99cf93974538ce3bc6a`. Evidence: `build/hand-cpu-restore-build.log`, `build/hand-cpu-restore-sdkfree.log`, and `build/hand-cpu-restore-install.json`. SteamVR was not launched for this verification. + +The shipped bundle already uses float16 weights. This does not establish float16 CPU arithmetic or a speed advantage: Google's [float16 documentation](https://developers.google.com/edge/litert/conversion/tensorflow/quantization/post_training_float16_quant) describes CPU weight expansion to float32. [INT8 quantization](https://developers.google.com/edge/litert/quantization/model_optimization) is a possible separate experiment, subject to runtime/operator compatibility and stereo accuracy validation; no INT8 conversion or speed claim has been made. + +An offline feasibility experiment compared Google's [legacy lite palm and hand landmark models](https://github.com/google-ai-edge/mediapipe/blob/master/docs/solutions/models.md) against the installed full bundle using the previously authorized stereo image pair. No new images were captured. The lite models initially failed the Tasks loader because normalization metadata was absent. For this local experiment, input/output tensor names, shapes, and types were checked against the full models before copying their metadata and associated files. The 0–1 input normalization agrees with Google's [hand landmark graph](https://github.com/google-ai-edge/mediapipe/blob/master/mediapipe/modules/hand_landmark/hand_landmark_cpu.pbtxt) and [palm graph](https://github.com/google-ai-edge/mediapipe/blob/master/mediapipe/modules/palm_detection/palm_detection_cpu.pbtxt). Experimental bundles remain under `build/hand-lite-research/`; the app still ships the original checksum-pinned full bundle. + +Windows CPU replay used MediaPipe 0.10.21, two sequential VIDEO instances, two-hand capacity, unchanged 0.6 confidence thresholds, 10 warmup pairs and 30 timed repetitions of one static pair. Times cover stereo inference only, excluding camera acquisition, preprocessing, geometry, rendering, and Android/game contention. + +| Models | Median stereo inference | p95 stereo inference | Static-pair geometry | +|---|---:|---:|---| +| Full baseline, before alternatives | 84.54 ms | 97.28 ms | Left hand passes in 30/30 repetitions | +| Lite palm + full landmarks | 37.11 ms | 43.94 ms | No hands detected; unusable for this sample | +| Full palm + lite landmarks | 62.48 ms | 73.18 ms | Left hand passes in 30/30 repetitions | +| Both lite | 36.75 ms | 43.69 ms | No hands detected; unusable for this sample | +| Full baseline, after alternatives | 87.99 ms | 100.15 ms | Left hand passes in 30/30 repetitions | + +Full palm plus lite landmarks is approximately 26–29% faster by median in this limited desktop replay. Its first-frame maximum reprojection error is 1.83 px versus 2.23 px for full; this single-pose result is not an accuracy comparison across real interactions. Repeated images do not validate motion, tracking availability, both hands, reacquisition, or thermal performance. Android Tasks 1.0.0 compatibility and temperature-matched Fold7/SteamVR measurements are still required before adopting it. The apparent speed of the lite-palm variants is not useful evidence of faster working tracking because they performed no landmark inference on a detected hand. + +Research artifacts: `build/compare-hand-lite.py`, `build/hand-lite-research/results.json`, `build/hand-lite-research/without-metadata.json`, and `build/hand-lite-research-metadata.log`. Original downloaded SHA-256 values: palm lite `e9a4aaddf90dda56a87235303cf00e4c2d3fb28725f68fd88772997dac905c18`; landmarks lite `d7fde8ac11f8ce03f8663775bfc323f4fc9f2a38062b4f4efa142874ef5b2a48`. + +Another candidate is reducing repeated palm searches without losing second-hand acquisition. The [upstream HandLandmarker graph](https://github.com/google-ai-edge/mediapipe/blob/master/mediapipe/tasks/cc/vision/hand_landmarker/hand_landmarker_graph.cc) runs detection whenever tracked hands are fewer than the configured maximum, including one visible hand with a two-hand limit. This is a profiling lead, not a measured attribution in the packaged Android runtime. Simply setting the limit to one would remove the required two-hand behavior; implementing a controlled search cadence would require a different graph or pipeline. The existing bounded latest-frame queue and VIDEO tracking already avoid unbounded backlog and unconditional IMAGE-mode detection. + +## Brief visual hold and remaining detection gaps (2026-10-16) + +After the user reported recovery following cooling, a 16-second CPU sample kept the same Android process (10308) and SteamVR session (`2026-10-16-29-steam`). Head tracking was fresh in 2,851 of 2,857 channel samples (99.8%), but the left hand was fresh in only 22 samples (0.77%), representing six distinct poses. Those poses first reached the monitor 162.2–198.3 ms after observation. Right-hand output was absent during the requested left-hand-only test. Diagnostic snapshots alternated between camera/head synchronization waits and no detected hands; measured inference in the snapshots that ran detection ranged from 76.1 to 136.8 ms. This is not a controlled cool-device benchmark: at the end Android reported thermal status 4 and the current HAL SKIN sensor read 51.5 C. Evidence: `build/spatial-live-hands-cooled-flicker.json` and `build/cooled-flicker-measure.log`. + +The driver previously invalidated its rendered controller immediately whenever an inference result contained no hand, even if the previous observation was still younger than the requested 200 ms cutoff. It now caches only the most recent accepted optical transform for visual continuity through those short gaps. Expiry remains measured from the original camera observation; a missed result never extends it. Optical input processing remains separate and releases trigger/grip immediately on a miss. Reacquisition still requires a released gesture. Head loss, connection/origin changes, disconnect, and switching back to gamepad-positioned controllers clear the cache. Missing optical tracking no longer suppresses independently available gamepad menu and locomotion inputs. This is a partial flicker mitigation, not a remedy for the longer detection gaps or old poses measured above. + +Native regressions pass for immediate gesture release during a held visual pose, its unchanged timestamp and inclusive 200 ms boundary, rejection after expiry, rearming, head loss/recovery, origin/connection changes, disconnect, mode changes, malformed/future/out-of-order samples, and gamepad availability during optical loss. The other native rendering, fence, and scheduling regressions pass. SDK-enabled and SDK-free Android packaging and runtime source/output freshness checks pass. Android application source was unchanged in this step; the existing 73 passing Android test results were checked during installation rather than rerun. Evidence: `build/hand-visual-hold-native.log`, `build/hand-visual-hold-stage.log`, `build/hand-visual-hold-build.log`, and `build/hand-visual-hold-sdkfree.log`. + +Installed artifact: `build/DroidDeck-hand-visual-hold.apk`, SHA-256 `977b993433803f3d8abbd639ca636b874367467866b58f7af75a07a46b20daa2`. Its packaged ARM64 driver matches the tested build, SHA-256 `2d7ff8647f210248f6ea4b68e9b05e21ed7ebcc74da601da0f1d854067b7ab82`. Installation occurred with the session idle and preserved the calibration/profile files. CPU selection and the 200 ms setting were confirmed across two app processes. The glasses were disconnected during these checks, so calibration was not loaded and detectors were not initialized; this does not establish a live improvement. SteamVR was not relaunched. Evidence: `build/hand-visual-hold-install.json` and `build/hand-visual-hold-live.json`. + +The user explicitly authorized one new diagnostic stereo pair and separately authorized copying that pair and timing metadata to the local workspace. Both 640 by 480 images visibly contain the palm, near the outer edge of the left image. The saved pair was not synchronized to a head pose. Desktop MediaPipe 0.10.21 replay of the current full model failed to detect either hand at palm-detection thresholds 0.6, 0.5, 0.4, and 0.3, with landmark-presence confidence held at 0.6. Undistorting the images before detection did not recover this sample. Lowering both confidence thresholds to 0.3 also failed. A fixed right-side image tile detected a left hand in only one camera, insufficient for stereo reconstruction. The earlier authorized pair still detected the left hand in both cameras and passed the unchanged stereo geometry gate in the same replay. These static diagnostic experiments do not justify changing thresholds, shipping a fixed crop, or claiming general detection improvement. No inference model, thresholds, or stereo quality gates were changed. Local artifacts: `build/flicker-pair-replay.json`, `build/flicker-pair-scale.json`, and their scripts/logs. + +The earlier CPU crash investigation also observed Vulkan device loss with hand inference disabled. A temporary `TU_DEBUG=noubwc` session reproduced it and was stopped; the flag was not persisted and no production graphics change was made. Cooling may have contributed to the user's reported recovery, but neither overheating nor inference delegate choice is established as the sole crash cause. + +## Half-rate stereo input requested by the user (2026-10-16) + +The supplied SDK 2.4.0 Carina header documents 25 Hz camera/pose callbacks and exposes automatic/manual exposure controls, but no tracking-camera frame-rate setter. DroidDeck now selects every other callback for its own stereo pixel copies while hand controllers are enabled, yielding approximately 12.5 pairs per second with the observed 25 Hz input. The gate executes before native buffer resize/copy. Skipped pairs do not reach JNI transfer, grayscale/RGBA conversion, or hand inference. Vendor camera acquisition/VIO, pose callbacks, and the existing head polling interval are unchanged. This is software input decimation, not a firmware camera-rate change. + +Calibration collection, distance validation, explicit diagnostic capture, and preview-only use bypass the half-rate gate. The first frame after a gate-mode change or camera-source reset is accepted. The latest eligible pending pair still replaces older eligible pending work. Camera-source/receipt timestamps and the existing 200 ms hand expiry are unchanged. JNI metadata carries the incoming frame index associated with the copied pair and the cumulative intentional skip count, so diagnostics continue to report the true incoming camera rate. `cameraFrameDivisor: 2` identifies hand input at half rate, and `rateLimitedFrames` is separate from processing-related `dropped` frames. The setup UI explains both rates and counters. + +The native regression passed 250 source callbacks producing 125 copied pairs, full-rate setup, repeated configuration, source reset, invalid timestamps, and reconnect reset. All 75 targeted Android tests passed, including half-rate camera-clock mapping and UI separation of incoming rate versus intentionally skipped frames. All 13 runtime-preparation tests passed, including classifying the new native helper as locally compiled while rejecting unrelated donor-native reuse. SDK-enabled and SDK-free builds and runtime freshness checks passed. Tests: `tools/tests/test_stereo_frame_gate.cpp`; logs: `build/hand-half-rate-build.log`, `build/hand-half-rate-sdkfree.log`, `build/hand-half-rate-runtime-tests.log`. + +Installed SDK-enabled artifact: `build/DroidDeck-hand-half-rate.apk`, SHA-256 `c02d56e40802de5c5e9d9750234b24a85462652f472729fbc9696935654f95fb`. The installed hash was verified. The SteamVR driver is unchanged from the tested visual-hold build (`2d7ff8647f210248f6ea4b68e9b05e21ed7ebcc74da601da0f1d854067b7ab82`); the Android SDK bridge and app were rebuilt. Installation preserved app data and occurred with SteamVR stopped. CPU selection and the 200 ms expiry were confirmed across two processes. The glasses were disconnected, so the live half-rate cadence, inference cost, thermal benefit, and controller availability have not been measured. Evidence: `build/hand-half-rate-install.json`. + +At 12.5 Hz, eligible pairs are approximately 80 ms apart. The earlier CPU inference snapshots already took 76–137 ms, so reducing input is not expected to halve total CPU load. It may save image-copy/preprocessing work and reduce inference load when the worker is fast enough, while also increasing frame waiting time and potentially reducing chances to recover a missed detection. It does not guarantee a successful observation or a visible response within 100 ms. A controlled comparison at matching temperatures is required before claiming smoother controllers or less overheating. + +## SteamVR shared-eye image import correction (2026-10-16) + +After the half-rate installation, sessions 31 and 32 hit `VK_ERROR_DEVICE_LOST` approximately 11.7 and 10.8 seconds after READY. DroidDeck's Android process and native 6DoF remained alive; CPU inference, a camera divisor of 2, approximately 25 Hz incoming cameras, and intentionally skipped frames were confirmed. This establishes live operation of the input limiter, but no thermal/performance benefit. The Android crash buffer contained an older VITURE abort in another process, not a new app crash. Evidence: `build/half-rate-crash-state.json`, `build/half-rate-crash-glasses.json`, and `build/half-rate-crash-guest.json`. + +A temporary `DROIDDECK_VR_IMPORT_FORMAT_LIST=0` test ran 49 seconds without device loss with hands disabled. A second test with CPU hands was stopped after the user reported a grey, degraded image. The override is rejected and was not persisted. Restoring the normal import path reproduced device loss in session 35. Neither a successful launch nor removal of image-format metadata is an acceptable fix. + +The normal-path Vulkan trace identifies an external-memory image-description mismatch: SteamVR exports each 1728 by 1080 eye image as format 43 (sRGB), flags `0x8`, usage `0x97`, with view formats 43/37, whereas the presenter imported it as format 37 (UNORM), flags `0x8`, usage `0x85`. Dedicated OPAQUE_FD imports require matching image descriptions. The presenter now retains the exported format, rendering/transfer usage, and view-format list. Presentation selects the corresponding sRGB or UNORM surface format, so an sRGB blit both decodes and re-encodes instead of darkening the display. It rejects incompatible surface encodings rather than silently selecting one, and checks imported-memory binding failures. The existing SteamVR compute-access color fix remains intact. Trace: `build/crash-import-trace/guest.json`. Requirement: [Vulkan dedicated allocation, VUID 01878](https://docs.vulkan.org/refpages/latest/refpages/source/VkMemoryDedicatedAllocateInfo.html). + +The ARM64 build and native regressions pass, including a new regression against the captured SteamVR image description and display-format selection/rejection cases. SDK-enabled and SDK-free APK builds and runtime freshness checks pass. The prior 75 Android tests remain applicable; Android source was unchanged for this graphics correction. Installed SDK-enabled artifact: `build/DroidDeck-shared-eye-format.apk`, SHA-256 `c573169cd46b20b70d704cd92f9f07550d5aa128d0c4300c1c52e635f04958fb`; driver SHA-256 `51dbd719e56c43df6c37edef2d7f426e91183b2b8489285349df19c322090f3b`. Installation preserved the verified calibration, CPU inference, and 200 ms cutoff across two app processes. Logs: `build/shared-eye-format-{native,stage,build,sdkfree,install}.log` and `build/shared-eye-format-install.json`. + +Two subsequent sessions completed 121.9 and 122.7 seconds after READY without a new device-loss event. All sampled head poses were valid, CPU inference stayed active, frame processing advanced, and Android PID 659 remained unchanged. Session 36 initially allocated 1080 by 1080 eyes; its trace confirms identical exported/imported format 43, usage `0x97`, and formats 43/37. Session 37 ran without tracing and allocated the original 1728 by 1080 eyes, removing the lower-resolution confound. Both used a 3840 by 1200 sRGB presentation surface (format 50) and showed approximately 600 frames per ten-second interval after startup. The cumulative compositor log contains older device-loss messages; filtering to the new sessions found no fresh device-loss error. Occasional `WaitForAcquire` warnings remain. Android thermal status reached 4, with current HAL skin temperatures 46.7 and 48.4 degrees Celsius after the respective runs; these are not controlled thermal comparisons. + +These are startup stability checks, not a twenty-minute gameplay/performance pass or proof of every crash's cause. Both test sessions were stopped; all temporary environment overrides and the trace marker were cleared, with calibration and CPU hand settings verified afterward. Evidence: `build/shared-eye-format-live/`, `build/shared-eye-format-relaunch/`, `build/shared-eye-log-audit.json`, and `build/shared-eye-final.json`. + +The user subsequently confirmed normal colors but reported another crash as soon as a hand appeared. Session 38 logged fresh Vulkan device loss at 08:44:25 UTC, about 42 seconds after READY, with a burst of geometry pipeline creation immediately beforehand. Recovery stopped the session, and Android later recorded SIGKILL for the app process; the initial failure was in SteamVR's compositor. The color correction is accepted, but the crash is not fixed. In session 39, the dashboard remained alive with valid head tracking and no detected optical hands, then failed less than four seconds after switching to the existing gamepad controller poses at 20.47 seconds. That reproduces the controller-visibility trigger independently of reconstructed hand coordinates. Evidence: `build/hand-visible-crash/`, `build/hand-visible-exits.txt`, and `build/controller-visibility/`. The preceding two-minute tests did not validate this transition. + +## Visible-controller crash and compositor completion guard (2026-10-16) + +An opt-in diagnostic waited for the compositor's graphics queue after each submission. Session 40 repeated the same optical-to-gamepad-controller transition at 18.01 seconds and stayed alive through 80.94 seconds, with approximately 600 presented frames per ten-second interval. Session 39 without the diagnostic failed less than four seconds after this transition. This supports a GPU synchronization problem in the visible-controller rendering path; it does not establish a specific bad hand sample or thermal cause. An [upstream SteamVR report](https://github.com/ValveSoftware/SteamVR-for-Linux/issues/952) describes premature command-buffer/descriptor-pool reuse, but equivalence to this device's failure is not directly proven. Diagnostic evidence: `build/controller-submit-idle/` and `build/submit-idle-install.json`. + +The shipped experimental guard applies only inside `vrcompositor`. Each `vkQueueSubmit` or `vkQueueSubmit2` waits for its actual completion fence before returning. If SteamVR supplied its own fence, that fence remains attached to the original submission and a following empty submission signals DroidDeck's separate fence. Waiting is bounded to one second; timeout fails the submission path instead of reporting success. The tracker keeps the fence reserved during this wait, preventing the completion worker from resetting/reusing it; a timed-out but submitted fence stays pending until completion or device failure. Other processes retain asynchronous submission. This is a conservative workaround that reduces CPU/GPU overlap, so gameplay frame-time and long-duration acceptance remain required. The temporary `DROIDDECK_VR_SUBMIT_IDLE` probe was removed. + +Native regressions cover both submission APIs, caller-owned fences, submission/marker failures, successful completion, device loss, timeout retention, tracker allocation failure, and bypass outside the compositor. Existing native rendering, spatial, optical-controller, synchronization, and scheduling checks also pass. SDK-enabled and SDK-free builds and runtime freshness checks pass; the prior 75 Android tests apply because Android source was unchanged. Installed APK: `build/DroidDeck-compositor-fence.apk`, SHA-256 `27d44a138d1f6bf6a0698abcd0a48107d31815c8e57a9f7ca07113fabb213195`. Installation preserved the verified calibration, CPU inference, 200 ms hand expiry, and half-rate camera input. Evidence: `build/compositor-fence-{native,stage,build,sdkfree,install}.log` and `build/compositor-fence-install.json`. + +Session 42 repeated the controller-visibility regression on the installed bounded-fence build. Head tracking remained valid; switching to the existing gamepad controller poses at 17.55 seconds did not cause device loss through the final sample at 58.92 seconds. The presenter reported 593–601 frames per ten-second interval, with no late frames in those counters. Optical hands were absent before the switch, so this passes the reproduced synthetic-controller visibility trigger but does not yet validate an actual optical hand appearing. The successful session was left open with CPU optical tracking restored for that check. Evidence: `build/controller-fence-guard/` and `build/controller-fence-guard.log`. + +The built, packaged, and installed Vulkan layers all have SHA-256 `b94d5598131883586fa1d428178f5048669edc40529f3900ec1d0955a5378f89`; no pending or persistent diagnostic environment override remained. The live audit was repeated after the session ended and still confirmed the installed layer, saved calibration, CPU selection, and enabled hand-controller setting. Evidence: `build/compositor-fence-live-audit.json`. + +## Optical appearance confirmed; flicker and pinch remain unresolved (2026-10-16) + +The user confirmed that optical controllers appeared without freezing, but continued to flicker and could not click. This is a successful user-observed optical appearance on the compositor-fence build, not a sustained tracking or interaction pass. The color correction remains accepted. + +A subsequent 16-second CPU baseline in session 43 sampled 2,846 coherent channel snapshots, all with fresh head tracking and none with a valid hand. The requested deliberate open/pinch/release sequence had not yet been confirmed, so absence of hands in this baseline cannot establish detector failure on a visible palm. Diagnostic samples measured 111.7–154.1 ms stereo inference; three observations exceeded the unchanged 200 ms cutoff, with completion ages 204.9–221.5 ms. Android stayed in process 32010 and the same READY SteamVR session. Thermal status was 4, with current HAL skin temperature 51.8 C at the end; this is not a controlled cool-device performance comparison. Evidence: `build/spatial-live-hands-pinch-baseline.json` and `build/pinch-baseline.log`. + +The driver emits `/input/trigger/value` and `/input/trigger/click` from optical pinch. Any invalid/stale hand or head sample releases inputs and disarms gestures until an observed open/released hand, while the visual pose may remain only until its original observation reaches 200 ms. Repeated observation loss can therefore interrupt clicking as well as controller visibility. No deliberate pinch was measured in the new baseline, so this is an explanation of the implemented behavior, not proof of the user's missing-click cause. The next measurement records hand timestamps, validity transitions, trigger strengths, grip, and connection/origin changes without camera images (`build/measure-pinch.py`). No inference thresholds, model, expiry, delegate default, or graphics behavior were changed in this follow-up. + +## Palm continuity and independent gestures implemented (2026-10-16) + +Hand reconstruction now validates each triangulated landmark independently under the unchanged depth and 3-pixel reprojection limits. A controller requires wrist and four palm knuckles; pinch and grip each have separate required fingertips and validity. A rejected finger no longer removes an otherwise accepted palm. Board calibration and distance checks still reject a set containing any invalid point. Protocol version 2 retains the 176-byte layout and carries explicit per-gesture validity bits; old protocol versions are rejected. The native driver releases only the uncertain gesture and requires its observed release before rearming. Unknown finger data cannot arm a click. + +The driver smooths palm translation and rotation with a 15 ms time constant. Three consecutive observations with consistent velocity can enable at most 30 ms / 2 cm of translation prediction. Prediction stops on missing/invalid observations and origin/connection/head changes; the original 200 ms observation expiry is unchanged. Pose filtering never generates or holds gesture input. Native regressions cover independent gesture loss/rearming, old-version rejection, quaternion sign equivalence, prediction bounds, loss holds, expiry, and origin resets. Android regressions cover rejected fingertip versus rejected palm behavior, independent pinch/grip validity, and unchanged metric/reprojection checks. + +Both full and full-palm/lite-landmark models are packaged and SHA-256 pinned. The lighter bundle is reproducible with `tools/build_hand_lite.py` from the documented original models and MediaPipe 0.10.21 metadata tooling. Diagnostics offer temporary model and half/full-input controls; CPU, full model, and half-rate input remain defaults pending a live comparison. An opt-in debug command benchmarks existing saved stereo pairs on CPU without capturing images or publishing replayed hand poses. It clears live hands during replay, closes both temporary detectors, and resumes the selected live model afterward. + +All 259 selected Android tests pass with no failures/errors/skips, including the glasses package and spatial-setup UI. The ARM64 native tests, SDK-enabled and SDK-free Android builds, and runtime freshness checks pass. Installed APK: `build/DroidDeck-hand-reliability.apk`, SHA-256 `38b9b67171b37b0bf80b540da165894ff4cbb24b609ae62edd829ecf618d01e3`. Driver SHA-256: `56b3a3eeaa96160e5cbf740f35b701f935b610417dbbba0aa2965ec109d5418a`. The graphics synchronization layer remains `b94d5598131883586fa1d428178f5048669edc40529f3900ec1d0955a5378f89`. Installation preserved the verified calibration and CPU selection across processes 2843 and 3996. The built, packaged, and deployed driver/layer match; the Android publisher produces a version-2, 176-byte spatial file. Evidence: `build/hand-reliability-{tests,native,stage,build,sdkfree,install,audit}.log` and corresponding install/audit JSON. + +The Fold7 successfully loaded both model bundles using Android Tasks 1.0.0 on CPU. Saved-pair replay ran full/lite/full, each with four warmup and twenty measured pairs, outside SteamVR in the same process. Times below cover stereo inference, excluding model construction, camera acquisition, geometry, publication, and display latency. + +| Saved pair / model | Median inference | p95 inference | Valid palms | +|---|---:|---:|---:| +| Previously detectable pair / full before | 104.95 ms | 107.95 ms | 20/20 | +| Previously detectable pair / lite landmarks | 90.03 ms | 95.54 ms | 20/20 | +| Previously detectable pair / full after | 103.89 ms | 106.20 ms | 20/20 | +| Harder pair / full before | 60.77 ms | 63.88 ms | 0/20 | +| Harder pair / lite landmarks | 62.64 ms | 66.53 ms | 0/20 | +| Harder pair / full after | 62.48 ms | 65.74 ms | 0/20 | + +The lite candidate is approximately 13–14% faster on the detectable static pair. Both models recognize a released pinch/grip and retain their validity on all twenty repetitions; their first measured palm positions differ by about 1.9 mm. This is agreement between models on one static observation, not ground-truth accuracy or stationary-jitter validation. Neither detects the harder saved pair, so reducing landmark cost does not solve missed palm detection. Thermal status ended at 2, with current HAL skin temperature 41.4 C. Evidence: `build/hand-reliability-benchmark-idle.json` and `.log`. + +SteamVR attempts 44 and 45 were suspended by Android with the screen off/lock screen showing before their first displayed frame. Wake/dismiss requests did not dismiss the lock screen. A user unlock is required for the graphics-workload model comparison and a fresh optical open/pinch/release check; neither is counted as a pass. The full model remains the default until that comparison can be completed. The changes are installed as an experimental candidate; reduced live flicker and successful dashboard clicking have not yet been established. + +## Concurrent CPU inference and controller cadence (2026-10-16) + +Left and right CPU inference now run concurrently with separate image buffers and a stable owner for the right detector. Both calls finish before either frame buffer can be reused or either detector closed, including failure and interruption paths. GPU inference remains sequential and opt-in. Controller presentation now approaches the filtered pose on each driver update with a 15 ms time constant, rather than moving only when a new inference result arrives. Missing observations stop prediction and hold the last displayed transform only until its original 200 ms expiry. Gesture validity, input release, head freshness, and connection/origin resets are unchanged. + +All 263 selected Android tests pass without failures, errors, or skips, including four concurrent-worker lifecycle tests. Native spatial regressions cover intermediate render updates, normalized rotations, loss holds, and unchanged expiry. The ARM64 build, SDK-enabled and SDK-free APK builds, and packaged-runtime freshness checks pass. Installed APK: `build/DroidDeck-hand-cadence.apk`, SHA-256 `7df588f0eacdbf4f5ddaae91c511e415b01fe39f37100c012e8f8da3fced52e0`. Driver SHA-256: `195261f27043b260052873a3b083c436457763caa5ebb7bcd1f52708e426bf11`. The graphics layer remains `b94d5598131883586fa1d428178f5048669edc40529f3900ec1d0955a5378f89`. Built, packaged, and deployed binaries match; the spatial channel remains version 2, 176 bytes. Installation preserved CPU selection and verified calibration across processes 13863 and 14542. Evidence: `build/hand-cadence-{native,stage,build,sdkfree,install,audit}.log` and corresponding install/audit JSON. + +A saved-pair comparison ran under SteamVR in one Android process/session using the previously authorized pair `64390821246320`. Each configuration had four warmup and twenty measured pairs. Times cover stereo inference, not acquisition, reconstruction, publication, or display latency. + +| CPU configuration, in test order | Median inference | p95 inference | Valid left palms | +|---|---:|---:|---:| +| Full, sequential before | 202.74 ms | 286.60 ms | 20/20 | +| Full, concurrent | 133.19 ms | 162.33 ms | 20/20 | +| Lite landmarks, concurrent | 104.18 ms | 165.52 ms | 20/20 | +| Full, sequential after | 176.31 ms | 208.47 ms | 20/20 | + +Concurrent full inference had a 24–34% lower median than the surrounding sequential runs. Its first palm position matched the full sequential result exactly; the lite result differed by about 1.9 mm. All repetitions retained released pinch/grip validity. These are repeated static-pair results, not physical accuracy, dynamic coverage, or clicking acceptance. Android thermal status was 4 throughout, with current HAL skin temperature increasing from 48.8 to 50.6 C. The ordered test was not temperature controlled. The lite model's lower median did not improve its p95 over concurrent full inference; the full model remains the default. Evidence: `build/hand-reliability-benchmark-steamvr-parallel.json` and `build/hand-cadence-benchmark.log`. + +For the live tests, the user confirmed an open left palm approximately 12–18 inches away, moving slowly side to side. Each sample lasted 16 seconds. All coherent head samples were fresh. The sequential baseline used session 50; both concurrent-input samples used process 14542 and session 51 without a restart. + +| Live configuration | Coherent reads | Reads with fresh left hand | Distinct left observations | Left arrival age, median / p95 | Sampled inference median | +|---|---:|---:|---:|---:|---:| +| Previous sequential CPU, 12.5 Hz input | 2,959 | 29.47% | 113 | 160.16 / 196.23 ms | 117.03 ms | +| Concurrent CPU, 12.5 Hz input | 2,941 | 91.77% | 186 | 74.94 / 84.81 ms | 66.06 ms | +| Concurrent CPU, 25 Hz input | 2,932 | 64.36% | 152 | 91.93 / 109.69 ms | 62.55 ms | + +The freshness percentages measure sampled shared-channel availability; they are not the acceptance target's percentage of valid camera observations and cannot pass or fail that 95% gate. Arrival age measures the original observation's age when first seen by the channel monitor, not externally measured physical-motion-to-visible-controller latency. Natural hand motion, detected hand count, and temperature were not held constant. Both cameras often reported two hands during the requested left-palm test, so right-channel availability is not evidence of verified right-hand identity or aiming. Thermal status was 4, with HAL skin temperatures of 47.5–47.7 C for the baseline, 50.5 C for limited input, and 50.7–50.8 C for full input. These short, ordered samples support further testing of the candidate, not a causal attribution of the entire improvement or a general conclusion that full-rate input is worse. Full-rate input did not improve observed availability in this comparison; the original 12.5 Hz input cap was restored. The SDK cameras continue at approximately 25 Hz. + +The user reported improved but still choppy motion, a reversed right-controller pointing direction while the left behaved as expected, and less flicker with both hands detected than with one. Right-hand orientation correction and investigation of the one-hand/two-hand difference are in progress; neither is validated by this candidate's measurements. No new camera images were saved. Session 51 later suspended and exited with status 0; a subsequent audit found session 52 READY, CPU/full/concurrent inference, the 12.5 Hz cap, verified calibration, and no temporary graphics overrides. Evidence: `build/spatial-live-hands-choppy-baseline-confirmed.json`, `build/spatial-live-hands-cadence-{half,full}.json`, `build/hand-input-comparison.json`, `build/hand-cadence-summary.json`, and `build/hand-cadence-audit.json`. + +## Right-hand orientation and camera-clock continuity (2026-10-16) + +The user's report of a reversed right controller exposed a handedness-independent palm basis. The right hand now reverses its lateral axis before constructing the rotation, giving mirrored palms the same normal convention while preserving the existing left mapping and wrist-to-finger direction. Both live reconstruction and saved-pair replay pass an explicit hand side. Tests cover mirrored palms, 180-degree and arbitrary rotations, camera-to-world transforms, and unchanged gesture values and timestamps. These tests verify the mathematical correction; the user subsequently confirmed that the right-controller orientation is correct on the installed build. Measured aiming accuracy across poses remains pending. + +The one-hand/two-hand flicker difference has a plausible processing explanation: the [upstream MediaPipe video graph](https://github.com/google-ai-edge/mediapipe/blob/master/mediapipe/tasks/cc/vision/hand_landmarker/hand_landmarker_graph.cc#L259) repeats palm detection until the previous tracked hand count reaches the configured maximum. DroidDeck requests two hands. Per-camera inference durations and current/previous raw hand counts are now reported separately from confidence-filtered counts so this hypothesis can be measured. No hand-count restriction, confidence reduction, or synthetic second hand was introduced. + +A separate clock defect reset camera synchronization whenever the worker skipped more than 200 ms of source frames, even when host and source clocks advanced consistently. A processing stall could therefore add another 16 observations of warmup (roughly 1.3 seconds at 12.5 Hz). The mapping now survives an aligned long gap; offset discrepancies above 20 ms, invalid timestamps, or nonmonotonic source/receipt times still require warmup. Existing short-gap rolling-minimum/p90 jitter handling is retained. Six regressions cover 240 ms and one-second gaps, resets, offset changes in both directions, jitter boundaries, and recovery. Hand observation expiry remains 200 ms and head expiry remains 100 ms. + +All 271 selected Android tests pass without failures, errors, or skips. SDK-enabled and SDK-free builds and packaged-runtime freshness checks pass. Native code is unchanged from the tested cadence build. Installed APK: `build/DroidDeck-hand-continuity.apk`, SHA-256 `46b99d939e5c7063840ae669128b40ba60a794e62a30c1a14f38da27362d2855`; driver remains `195261f27043b260052873a3b083c436457763caa5ebb7bcd1f52708e426bf11` and the graphics layer remains `b94d5598131883586fa1d428178f5048669edc40529f3900ec1d0955a5378f89`. The installed APK hash matches, and processes 29580 and 30045 both initialized CPU inference and loaded the verified calibration. CPU/full/concurrent inference and the 12.5 Hz input cap remain selected. No new images were captured. Evidence: `build/hand-continuity-{build,sdkfree,stop,install}.log` and `build/hand-continuity-install.json`. Subsequent live results follow; sustained smoothness acceptance remains pending. + +SteamVR reopened as session 54 and reached READY with valid head tracking. A live audit verified the built, packaged, and deployed driver/layer hashes, the version-2 spatial channel, saved calibration, CPU/full/concurrent inference, the 12.5 Hz cap, and the new per-camera diagnostic fields. This is an installation/startup check, not the pending deliberate one-hand/two-hand comparison or a visual orientation pass. Evidence: `build/hand-continuity-launch.log`, `build/hand-continuity-audit.log`, and `build/hand-continuity-audit.json`. + +## Live hand-count comparison and remaining startup delay (2026-10-16) + +The subsequent 44-second live comparison retained Android process 30045 and SteamVR session `2026-10-16-54-steam`. All 8,146 coherent head reads were fresh; the left hand was fresh in 97.30% of channel reads. The right hand was introduced after the left, and both cameras reported two hands from approximately 13 seconds. Consequently, the nominal first-20-second/remaining-test stages are not clean one-hand/two-hand windows. The whole-run right-hand availability of 71.00% includes the period when it was absent and must not be interpreted as right-hand detection accuracy. + +Per-camera timings were grouped by each detector's previous raw hand count, which is the count relevant to the upstream video graph's palm-search decision. The smaller count group contained eight diagnostic snapshots per camera, and the two-hand group contained nineteen. + +| Camera | Previous raw hands | Diagnostic samples | Median inference | p95 inference | +|---|---:|---:|---:|---:| +| Left camera | 1 | 8 | 73.36 ms | 80.27 ms | +| Left camera | 2 | 19 | 55.96 ms | 69.10 ms | +| Right camera | 1 | 8 | 71.94 ms | 87.04 ms | +| Right camera | 2 | 19 | 53.15 ms | 65.69 ms | + +The observed per-camera medians were approximately 17–19 ms lower with two previously tracked hands. This is consistent with the extra palm-search work described above, but the ordered, natural-motion test does not isolate that work from pose, visibility, or workload changes. Thermal status remained 4, with HAL skin temperature 50.7 C at both endpoints. These internal inference timings do not measure physical-motion-to-visible-controller latency. The 97.30% sampled left-channel availability is also distinct from the required 95% valid camera-observation rate; neither acceptance gate is established by this run. No new camera images were saved. Evidence: `build/hand-count-live.json`, `build/hand-count-live.log`, and `build/hand-count-summary.json`. + +The user confirmed the right-controller orientation correction and described single-hand tracking as smoother and more reliable, but said it takes a while after SteamVR starts to become smooth. Startup choppiness remains unresolved. This measurement did not isolate startup behavior, and it does not establish a warmup, thermal, synchronization, or graphics cause for that remaining delay. Longer controlled runs, an observation-based coverage measure, external latency measurement, and deliberate optical interaction checks are still required. + +The user clarified that startup choppiness lasts about a minute or longer after the dashboard appears. Both CPU detectors, camera synchronization, and verified calibration were already active in process 30045 before SteamVR launched, so initial model loading alone does not explain the delay. Session-54 compositor logs, aligned to their Denver timestamps, record 138 shader-pipeline creations during seconds 20–69 after the launch request and another 12 during seconds 120–129. This identifies ongoing graphics initialization as a plausible source of CPU contention, not a measured causal explanation of all startup stutter. The current session remained READY; its later presenter counters were about 600 frames per ten seconds. No matched `vkerror`, device-loss, fatal, or segmentation messages appeared in the filtered session window, although a `WaitForAcquire` timeout remains. No startup scheduling, cache, graphics, or loading-screen changes were made. A correlated startup trace of hand latency and CPU/GPU workload is still needed. Evidence: `build/hand-startup-review.json` and `build/hand-continuity-install.json`. + +## Gesture, single-hand scheduling, and motion update (2026-10-16) + +The next candidate keeps CPU/full-model/concurrent stereo inference. Calibrated stereo palm reconstruction is unchanged; pinch and finger closure now use agreement between each camera's image landmarks. Invalid or conflicting finger geometry clears the affected gesture, and the driver still requires an observed release before rearming it. This avoids making a valid palm depend on successful triangulation of every fingertip, without claiming that a lost finger is released. + +CPU inference now retains separate one-hand and two-hand video trackers for each camera. Three consistent stereo observations enable the one-hand path; a two-hand search is due after 240 ms, and loss or ambiguous handedness returns to search. The selected bank's raw counts and hand limit are reported. Both per-camera tasks finish before images or detectors are reused or destroyed. GPU remains optional and serial. The adaptive copy gate starts at 500 permille of source callbacks (12.5 Hz with 25 Hz cameras), with 600/800 permille available only after eight consecutive healthy samples meet processing and age thresholds. Slow discovery samples can prevent an upshift; the presence of this controller is not evidence of achieving 15 or 20 Hz. Camera capture and vendor head tracking retain their normal rate. + +The driver removes the additional observation-level low-pass and retains one 15 ms rendering correction. Stable translation advances from the time a result reaches the driver, bounded by 80 ms and 2 cm, instead of exhausting prediction during inference. Capture timestamps still control velocity and expiry. Explicit loss freezes the displayed pose, immediately releases invalid inputs, and preserves the 200 ms hand expiry and 100 ms head expiry. This is bounded motion estimation, not additional measured hand observations. + +Validation: all 306 selected Android tracking/UI tests pass, with no failures, errors, or skips. The ARM64 VR build and native regressions pass, including delayed/jittered observations at 4 ms driver ticks, stops, reversals, outliers, quaternion normalization, exact loss freeze, expiry, and origin/connection changes. Fractional camera-gate regressions pass with strict compiler warnings. SDK-enabled and SDK-free Android builds, 13 runtime-preparation tests, and runtime checksums pass. The loading/first-frame flow and graphics color path were not changed in this update. + +Installed on the existing Fold7 as `build/DroidDeck-hand-smoothness.apk`, final SHA-256 `9508370c42870e60a0070abf61d99792df581436f802049b068b96eba95fa027`; driver SHA-256 `52a96238afedf68c38866588db8225d2bd82450ed13635a5673ca7f9e0c6835b`. Android requested USB access after the first candidate installation; the user accepted it. Final verification matched the installed APK hash and confirmed CPU selection, automatic rate selection, scheduled single-hand tracking, and the existing verified calibration in two separate app processes (6139 and 6989). CPU inference initialized in 6139; process 6989 was initially waiting for valid head tracking, so its configured CPU delegate was not yet initialized. The saved 25-view calibration and distance check were retained. Evidence: `build/hand-smoothness-{native,stage,final-build,sdkfree,runtime-tests,install}.log` and `build/hand-smoothness-install.json`. Deliberate moving-hand, grab/release, external latency, and sustained game-performance checks remain required. + +Saved-pair replay of the previously authorized capture `64390821246320` compared parallel full-model search, scheduled full-model tracking, scheduled lite-model tracking, then a repeated full-model search baseline. Each row measured 20 frames after four warmup frames. The scheduled rows used the one-hand path for 13 of those frames. All rows retained a valid left palm and valid released pinch/grip in all 20 measured frames; the source image is a stationary open palm, so this does not validate moving hands or pressing gestures. + +| Workload | Full search median / p95 | Scheduled full median / p95 | Repeated full search median / p95 | +|---|---:|---:|---:| +| App idle | 70.93 / 76.19 ms | 36.74 / 74.04 ms | 71.28 / 75.77 ms | +| SteamVR | 91.48 / 99.26 ms | 46.92 / 94.71 ms | 86.39 / 100.62 ms | + +Scheduled lite-model medians/p95 were 25.41/67.04 ms idle and 40.26/86.77 ms under SteamVR. The full model remains selected because a repeated static image cannot establish the lighter model's live tracking or gesture accuracy. The SteamVR comparison retained process 333 and session `2026-10-16-57-steam`; thermal status was 4 and HAL skin temperature rose from 49.5 to 51.0 C. These short ordered runs show lower typical inference cost on this saved pair, while discovery-frame tail latency remains. They do not establish external motion-to-controller latency, sustained game frame time, or reduced thermal throttling. No new camera images were captured. Evidence: `build/hand-reliability-benchmark-smoothness-{idle,steamvr}.json`. + +The final adaptive policy uses average processing cost for normal budget changes so occasional discovery frames do not veto otherwise sustained headroom. Any single processing cost at least 80 ms, observation age at least 140 ms, or invalid tracking falls back to 12.5 Hz. Regression tests verify that a repeating 36/36/74 ms pattern can select 15 Hz but not 20 Hz, while continuous 70 ms work stays at 12.5 Hz. This change does not assert that the observed SteamVR workload qualifies for a higher rate. + +Final deployment audit: SteamVR session `2026-10-16-58-steam` reached READY with a first frame and valid head tracking. Built, packaged, and deployed driver hashes match; the unchanged graphics-layer hash is `b94d5598131883586fa1d428178f5048669edc40529f3900ec1d0955a5378f89`. The version-2 spatial channel and verified calibration were present, with no temporary environment overrides. CPU/full/concurrent inference, scheduled discovery, and adaptive input were active. The audit snapshot showed one accepted palm with valid pinch/grip geometry, the one-hand inference bank, 47.10 ms stereo inference, approximately 25 Hz source cameras, and a 500-permille input limit. A single snapshot does not demonstrate reliable movement or actual pinch/grip presses. Evidence: `build/hand-smoothness-{launch,audit}.log` and `build/hand-smoothness-audit.json`. + +## Stationary jitter and persistent input release (2026-10-16) + +The user reported stationary controller bounce and a dashboard drag that remained attached after a controller flickered and the hand returned open. The original 16-second reproduction recorded 2,905 coherent channel reads with fresh head tracking throughout. The right hand was fresh in 812 reads; 64 distinct poses were recorded. Right-hand transitions included five samples above the trigger-click threshold, 63 valid released-grip observations, and no pressed grip. Both hands were invalid at the end of the sample. This does not by itself locate the missing dashboard release: the original driver lacked per-input publication diagnostics. Evidence: `build/spatial-live-hands-sticky-grab-baseline.json`. + +Inspection of the installed Vive compositor binding showed that dashboard left-click/drag uses the trigger, with grip mapped to Back. The installed dashboard `GrabHandle` attaches the panel to the initiating hand and clears that attachment on a window mouse-up event; it has no tracking-loss cleanup in that component. A missing mouse-up is consistent with the report, but the exposed code does not prove that native laser-mouse processing discards releases when a pose becomes invalid. Resource evidence: `resources/config/vrcompositor_bindings_vive_controller.json`, SHA-256 `16f19a170608c9b3450e7fc980644220a5bd3a34e1bb88050e65f51c7600a2d1`, and `resources/webinterface/dashboard/chunk~8012d0c89.js`, SHA-256 `8a529bd96141480a18efa44b912a81a1e27ac1bf8bae6b2ab8945ebaf6da2e73`. No SteamVR resource was modified. + +The driver now stabilizes translation and rotation independently against fixed stationary anchors, holding within 3 mm and 1 degree. Breakaway uses the existing 15 ms rendering correction; it does not subtract a dead-zone distance from every observation. Returning to a hold requires 240 ms inside tighter 1.5 mm / 0.5-degree bounds and a check against sustained directional drift. Position prediction stops while anchored. Native tests cover still jitter, quaternion sign flips, accumulated slow translation/rotation, fast breakaway, settling, and the existing delayed-motion and loss behavior. These thresholds are candidates; stationary jitter and fine aiming still need hardware confirmation. + +A confirmed latest-snapshot race could hide a transient invalid hand/head observation from the driver. Protocol version 3 retains the 176-byte layout and uses the offset-36 word for four independent 8-bit loss counters: left trigger/grip, then right trigger/grip. Loss remains visible in subsequent snapshots even if the invalid snapshot was overwritten. Head gaps clear cached hands, captures preceding head loss cannot rearm inputs, and expiry/invalid-gesture transitions update only the affected counters. The driver clears matching input state on counter changes, rejects old or duplicate observations for rearming, and detects observation gaps beyond 200 ms. It publishes released trigger scalar/click and grip before pose loss, clears inputs before deactivation, and logs state/error transitions for hardware verification. No synthetic presses or fresh poses were introduced. Versions 1 and 2 are rejected, so the Android and driver binaries must be updated together. + +All 317 selected Android tests and the native regressions pass. New tests deliberately skip invalid snapshots, preserve independent trigger/grip state, reject stale release observations, verify publication ordering, and retry rejected OpenVR component writes. SDK-enabled and SDK-free Android builds and runtime checksum verification pass. Installed APK: `build/DroidDeck-hand-stability.apk`, SHA-256 `0e3f4a140e36eb48e91f5937748b0e10afe3491a0236484b21e9a3faa3ca6766`; driver SHA-256 `cca5723189a77cde606d11afd55d80567e7f72398e3f50e706bee164cb91eb5f`. Calibration survived two app processes (17259 and 17867); CPU initialized in the latter. SteamVR session `2026-10-16-60-steam` reached READY with a first frame. Evidence: `build/hand-stability-{native,stage,build,sdkfree,install,launch,audit}.log` and `build/hand-stability-{install,audit}.json`. End-to-end dashboard release and visible stationary improvement remain pending the deliberate post-installation check. + +## Outstanding acceptance + +### Investigation and shared base calibration (2026-10-16) + +The phone's current verified 640×480 pinhole profile was exported directly over authorized ADB. Its 1.1209395390660726-px fit, lens coefficients, stereo transform, and camera-to-head transform are now bundled unchanged as `app/src/main/assets/calibration/luma-ultra-640x480.json`, with the source device identifier removed. Asset SHA-256: `d160f0c81d0328255f9afa69bc61505e5aa2988a9bb7a9faaeb611598eee7faa`. A matching personal profile takes precedence; new or unidentified Luma Ultras use this base for experimental tracking. Shared geometry is not falsely marked validated on other devices. UI and diagnostic status identify the shared base separately from individually verified profiles. + +Hand tracking now displays **Experimental** throughout the relevant controls and setup status. Per-observation diagnostics distinguish detection/association failures, missing palm landmarks, palm width/basis/motion rejection, stale data, and tracking loss. Connection-lifetime counters retain independent palm, trigger, and grip acceptance/loss evidence without counting repeated status polls. Tracking and input thresholds are unchanged. The historical trace analysis and prioritized improvement experiments are recorded in `luma-hand-tracking-investigation.md`; no new moving-hand or game-usability pass is claimed. + +All 388 focused glasses and setup/UI tests pass, including the new calibration selection and diagnostic-counter regressions. Exact geometry comparison against the phone export passes. The SDK-enabled APK builds with runtime freshness verification enabled. After the concurrent upstream Joy-Con merge, the already rebuilt VR outputs were validated against current source/header/configuration hashes and restaged with the updated helper scripts; unrelated prepared binaries retained their hashes. All 150 packaged runtime outputs match the resulting manifest. The packaged base calibration matches its source exactly, and the APK includes the new diagnostics. Artifact: `build/DroidDeckXR-luma-experimental.apk`, SHA-256 `11235040ad8c34abfd23482beb552fb09db4d9429703fbc8d7c5090b98da940e`. Runtime provenance is in `build/luma-hand-runtime-restage-20261016/provenance.json`. This change has not been installed on the phone. Logs: `build/luma-investigation-tests.log`, `build/luma-investigation-build.log`; metadata: `build/luma-investigation-validation.json`. The source phone profile backup stays in ignored `build/luma-ultra-phone-calibration-20261016.json`. + +| Gate | Current evidence or blocker | +|---|---| +| Measured head axes and meter scale | Pending measured translation, leaning and crouching | +| Floor and separate origins on hardware | Automated math passes; physical crouched recenter and picture switching remain pending | +| Screen anchoring and plane crossing | Shader and parameter tests pass; visual movement and plane-crossing checks remain pending | +| Camera image orientation | Upright 640 by 480 images and visible palms verified in one authorized diagnostic pair | +| Calibration quality | 25-view set passes fit/alignment checks with 1.12094 px held-out reprojection error. Repeated distance check passed: 12.13 inches measured against 12.00 selected; SDK-identified verified profile survives app restarts | +| Hand pose and aiming | User confirms corrected right-controller orientation and smoother, more reliable single-hand tracking. Latest 44-second comparison had 97.30% sampled left-channel availability; startup choppiness, measured aiming accuracy, and sustained continuity remain pending | +| At least 95% valid hands at 30–80 cm | Camera-observation acceptance rate not measured; sampled channel availability above is a different metric | +| At most 5 cm hand error and 2 cm jitter | Not measured | +| External p95 controller latency below 100 ms | Not measured | +| Hardware input release and reacquisition | State-machine tests pass; user-requested 200 ms hand expiry / 500 ms reacquisition not measured physically | +| Twenty-minute game performance | No controlled baseline or CPU/GPU comparison | +| Dashboard and Angry Birds VR interactions | Not validated with optical controllers | +| Occlusion, crossed hands, lighting and thermal load | Pending | +| Physical USB reconnect during inference | Generation/lifecycle guards implemented; no calibrated-inference unplug test | + +The user confirmed corrected colors, optical controllers appearing without a freeze, corrected right-controller orientation, and smoother, more reliable single-hand tracking. The latest timing comparison is consistent with additional palm-search work when only one hand is tracked. Startup choppiness remains unresolved, with no established cause. A confirmed open/pinch/release sequence is still needed to distinguish missing/expired observations from gesture recognition or input-path failures. Full palm detection with the lite landmark model remains an experiment; the current full model stays selected. Controlled temperature-matched SteamVR measurements, right-hand correspondence across poses, and measured aiming validation remain necessary. The compositor guard passed the reproduced gamepad-controller visibility trigger; long-duration and GPU-inference stability remain unvalidated. Delegate and process identity must be checked across each measurement because graphics recovery recreates the hand engine; it now selects CPU by default and discards any temporary GPU override. The saved calibration no longer needs repeating after an identified-device reconnect. The combined feature must remain experimental until hand tracking and the remaining acceptance measurements pass. Native 6DoF availability alone is insufficient for release. + +## Fork migration and latest feedback (2026-10-16) + +The post-installation check did not establish a fix: the user could not start the dashboard drag and reported stationary controller jitter about the same. Dashboard interaction, release after tracking loss, and visible stationary stability remain unresolved. + +At the user's request, the 63 uncommitted XR files were moved from `C:/Users/conno/Desktop/DroidDeck` to `C:/Users/conno/Desktop/DroidDeckXR` on branch `feat/3dfixes-6dof`. A three-way merge preserved the fork's resolution and menu changes; 13 non-overlapping fork files remained unchanged. Original files and patches from both checkouts are preserved in `build/xr-migration-20261016`. The source checkout is clean after hash-verified removal of the migrated edits. + +The merged fork passes 373 selected Android tests and 13 packaging tests, plus SDK-enabled and SDK-free builds. The existing tested ARM64 VR outputs were reused after validating their source, SDK-header, configuration and binary checksums; they were not rebuilt during migration. All 133 prepared runtime outputs match the SDK-enabled APK. The new APK is `build/DroidDeckXR-migrated-sdk.apk`; it has not been installed. See `build/xr-migration-verification.json` for hashes and the retained historical runtime-provenance boundary. Subsequent work belongs in DroidDeckXR. + +## Connected-device isolation review (2026-10-16) + +Reviewed the outstanding DroidDeckXR changes together, including optical and Joy-Con tracking, calibration, display-mode routing, recovery overlays, graphics fixes, RGB diagnostics, and build/runtime provenance. Ultra controls now require a controllable, connected device whose Carina capability was confirmed by the VITURE SDK. Model names and saved Ultra preferences alone do not enable them. The experimental position/hand/Joy-Con controls, floor/eye-height setup, 6DoF label, calibration activity, recovery overlay, and RGB diagnostic entry follow this capability. Calibration closes when the connection disappears, and launching it directly without an Ultra is rejected. + +Saved Ultra controller preferences no longer suppress the phone-camera permission or controller path for other glasses. Routing is refreshed on device changes as well as setting changes. Opening a non-Carina link clears the retained spatial-channel mode; temporary Ultra tracking loss still invalidates poses without silently switching to fixed-height legacy tracking. Tests cover disconnect, reconnect, unconfirmed model names, non-Ultra VITURE, XREAL and RayNeo states, rejected mode changes, and the native-channel flags. + +The optional UVC directory now accepts an explicitly empty Gradle override, requires its license files before packaging, and is included in the local native-source preparation audit. All 456 selected Android tests pass with no failures, errors or skips. An earlier Compose calibration timeout passed in isolation and in the final complete selection without changing the test or product behavior. The ARM64 VR rebuild and native regressions pass. Linux packaging/helper tooling reports 47 passing tests; two shader compilation tests were skipped because glslangValidator is unavailable (this change set does not modify shader source or its generated header). + +Both the SDK/UVC-enabled and SDK/UVC-free Android builds pass, and all 150 prepared runtime outputs match each APK. Package inspection confirms the enabled build includes the optional libraries and UVC notices, while the disabled build contains none of those optional libraries. Artifacts: `build/DroidDeckXR-ultra-reviewed.apk` (SHA-256 `a01706d56b876c2fec7b9386d33e9dc66854ead66b48a1392c492bde7c3591d3`) and `build/DroidDeckXR-ultra-reviewed-sdkfree.apk` (`6ce45e225a37c74355eb7d65e76b2ac63be7064ec24cbe389e006452e0e27390`). Results and logs are retained under `build/ultra-review-*`, including `build/ultra-review-verification.json`. + +This review did not install a new package or repeat hardware acceptance. The existing dashboard interaction and stationary jitter reports remain unresolved; the combined tracking feature remains experimental. diff --git a/docs/development/luma-spatial-tracking.md b/docs/development/luma-spatial-tracking.md new file mode 100644 index 0000000000..26ecaf00fc --- /dev/null +++ b/docs/development/luma-spatial-tracking.md @@ -0,0 +1,96 @@ +# Luma Ultra spatial tracking + +For supported glasses across brands, feature levels, and app-wide setup, see the +[smart-glasses support matrix](../smart-glasses-support.md). + +This is an experimental implementation of native Luma Ultra head tracking, positional virtual screens, and optical SteamVR controllers. Positional tracking, bare-hand controllers, and Luma Joy-Con tracking all default to off and are grouped under Experimental. Combined release acceptance remains pending until the calibration, accuracy, latency, gameplay, and sustained performance targets below have been measured on hardware. + +## Build and setup + +Luma Ultra now includes a shared starting calibration exported from the user's verified Fold7 profile on 2026-10-16. The bundled `calibration/luma-ultra-640x480.json` contains the original lens, stereo, and camera-to-head geometry without the source glasses' serial identifier. It applies only to the SDK-confirmed Luma Ultra primary `left0/right0` pair at 640 by 480. Matching saved device calibration takes precedence, including an unfinished personal fit that still requires distance validation. Missing, corrupt, or foreign profiles fall back to the model base; unknown serials can also use the base. + +The base enables experimental hand tracking without requiring every user to repeat board collection. It is not marked individually verified on other units. Tracking and setup show **Shared Luma Ultra calibration** while it is in use; diagnostics distinguish `calibrationSource` (`luma-ultra-base`, `device`, or `none`) from `calibrationVerified`. The existing `calibrated` availability field is true for either the base or a verified personal profile. The following board steps are optional refinement for a new device using the base; a newly calculated personal profile still needs the unchanged distance check before use. A successful distance check saves the profile for the connected identified glasses. Source validation does not establish manufacturing consistency or aiming accuracy across other units. + +Use the existing optional `droiddeck.vitureSdk` local property with the external VITURE Android SDK 2.4.0. No vendor headers or libraries are checked into the repository. `-PvitureSdkDir=` explicitly builds without the SDK. The ordinary runtime freshness checks remain enabled. Rebuild the ARM64 VR components with `tools/vr/build_windows.py`; its manifest includes `spatialpose_shm.h`. + +The hand pipeline pins MediaPipe Tasks Vision 1.0.0, OpenCV 4.13.0, and the model and SHA-256 recorded in `app/src/main/assets/models/hand_landmarker.provenance.json`. Both Gradle and the inference worker verify the model checksum. CPU inference, the full model, concurrent camera inference, scheduled hand discovery, and automatic input-rate adjustment are the defaults, including after app restarts, reconnects, and provider restarts. **Show diagnostics → GPU hand inference** temporarily enables GPU until the next tracking restart; GPU remains experimental because SteamVR restarts and Vulkan device loss were observed during testing. Diagnostics report the selection as `handGpuEnabled` and the initialized detectors as `handInferenceBackend`; `not initialized` means detector startup has not completed. Sustained performance acceptance remains unresolved. + +Hand input starts by copying 500 permille of stereo callbacks, approximately 12.5 pairs per second at the SDK's documented 25 Hz camera rate. On CPU, automatic adjustment can raise this to 600 or 800 permille (about 15 or 20 Hz) only after eight consecutive valid observations have sufficient processing and freshness headroom. Promotion requires average processing at most 55 ms and observation age at most 110 ms for 15 Hz, then at most 40 ms and 90 ms for 20 Hz. A moving average allows occasional scheduled discovery frames while preserving a sustained processing budget. An average above the selected period reduces the rate; any single processing cost of 80 ms or observation age of 140 ms immediately returns it to 500 permille. Tracking failure and detector resets also return it to 500. This policy requests more input only when processing can accommodate it; it does not guarantee that many completed or valid hand updates. + +Skipping happens before copying camera pixels into DroidDeck, so skipped pairs also avoid JNI transfer, preprocessing, and inference. The SDK exposes no tracking-camera rate setter: sensor capture, vendor VIO, pose callbacks, and head polling retain their normal rates. Calibration collection, distance checks, explicit diagnostic capture, and preview-only operation use full-rate input. Diagnostics keep incoming `cameraHz` distinct from `cameraCopyPermille`, `rateLimitedFrames` (intentional skips), and `dropped` (eligible pairs replaced while the worker is busy). The compatibility field `cameraFrameDivisor` is 2 at 500 permille, 1 at 1000, and 0 for intermediate fractions. The bounded latest-pair queue and original capture timestamps remain intact. **Automatic hand input rate** can be disabled to expose the manual half/full-rate switch; both choices reset with tracking. GPU uses that manual preference and does not adapt. Thermal, latency, and gameplay benefits require hardware comparison. + +1. Connect a Luma Ultra and grant its existing USB permission. Spatial controls appear only after the SDK identifies the device as Carina. +2. Enable **Positional tracking — experimental**. This restarts the provider in 6DoF mode. Switching picture modes does not restart it. +3. Enter the current seated or standing eye height (shown in centimeters and feet/inches) and choose **Set floor from current height**. Normal VR recentering then preserves that floor, including while crouched. After reconnecting or explicitly restarting tracking, accept the new origin through setup/recenter. A recenter request during lost/stale tracking or recovery remains pending until 250 ms of fresh, steady poses arrive; repeated taps are unnecessary. The pending request is canceled on disconnect. +4. Open **Stereo camera setup and diagnostics → Open setup**. The page uses the selected DroidDeck theme and app scale, with a single compact Back/title row so the controls have room to scroll in landscape. Check head tracking and camera synchronization first; capture controls become available when both are ready. Expand **Show diagnostics** for frame rate, frame age, dropped frames, processing time, and recovery tools. +5. Print the 5 by 7 ChArUco board at actual size. Measure a square: it must be 30 mm (approximately 1.181 inches). Keep the board stationary and capture at least 24 sharp views by moving and rotating the glasses, covering the image center and edges. Include both yaw and pitch, roll, and varied distances. If the underlying tracking frame changes, start a new capture set; software recentering in an unchanged frame preserves the set. +6. Calculate calibration. Accepted captures confirm board detection, not alignment quality. The fitter compares pinhole and fisheye models on held-out views. It rejects poor stereo reprojection, an implausible baseline, insufficient rotational diversity, and inconsistent stationary-board alignment. Turning and tilting the glasses is required; pause before each capture. If the board stayed fixed but alignment varies beyond 5 cm (about 2 inches), the head-tracking frame may have shifted during collection. Wait for steady tracking and start a new set; do not remove the quality gate to accept the old one. +7. Start with **12 in (30.48 cm)** or **30 cm (11.81 in)** under **Measured distance**; **20 in** and **50 cm** remain available. The closer settings make the small printed markers easier to resolve in the 640 by 480 tracking cameras. Show the complete board with its center exactly the selected distance from the left camera, then choose **Validate distance**. You can hold or support the glasses without wearing them. Progress and the result appear beside this button. The count refers to detected checkerboard intersections, not the paper's edges; a fully visible but small or blurred board can still have too few detections. Validation detects corners in the original images, then corrects those coordinates for lens distortion before triangulating, avoiding marker blur from resampling the images. Rejected stereo geometry reports that depth could not be measured; a valid reconstruction shows measured and selected distances in both units. Each imperial or metric choice uses its exact distance. The complete 24-corner board and physical-distance check within 5 cm (about 2 inches) are still required before a newly fitted personal profile becomes usable. Profiles are keyed to the SDK board-serial SHA-256 identifier (falling back to a nonblank Android USB serial), dimensions, and format version. Verified profiles reload automatically after an app restart or reconnect to the same identified glasses. If neither identifier is available, profiles remain connection-local. +8. Enable **Hand controllers — experimental**. Present an open hand first so inputs can arm. Aim the virtual controller at the target, pinch thumb and index finger together to press the trigger/click, then separate them to release. Moving the SteamVR dashboard by its handle uses this same pinch-and-release action. Keep the other fingers open when only clicking; curling the middle, ring, and little fingers activates the separate grip input, which the installed Vive dashboard binding maps to Back. Games can use grip for holding objects. After tracking loss, open the hand again before another press. Gamepad sticks supply locomotion and turning; buttons retain the Vive-compatible mapping. External VR controllers retain precedence. + +The diagnostic capture button saves one stereo pair and metadata to the app-private `files/spatial/captures` directory. Merely opening diagnostics does not save images. Calibration profiles stay in `files/spatial`. A brief missed hand detection holds the last observed controller transform only until its original observation reaches 350 ms old. Input freshness remains limited to 200 ms. Pinch and grip release immediately on a detected miss and require an observed release before rearming. The hold does not extrapolate motion, refresh timestamps, or substitute a gamepad pose. Head tracking loss, origin/connection changes, disconnects, and controller-mode changes clear it. Gamepad menus and locomotion remain available during optical hand loss. Switch hand controllers off explicitly to return to gamepad-positioned controllers. + +Accepted board landmarks and their capture-time head poses are saved separately in app-private `files/spatial/*-captures.json`, without camera images. A matching SDK or USB device identity and image geometry allow automatic recovery for recalculation. Restored observations cannot be appended to a new tracking frame; start a new set to capture again. Devices without either stable identifier keep a session-labelled diagnostic backup and require explicit developer recovery onto the same physical device. They do not automatically reuse another connection's unidentified capture set or personal calibration; they can still use the bundled model base. + +The vendor SDK working directory is `noBackupFilesDir/viture`. Android can evict `cacheDir` during a live session, so active tracking files must not depend on that location. The SDK initializes its own files in the new directory on the next provider start; existing printed-board calibration profiles remain in `files/spatial`. + +## Coordinates and lifecycle + +`SpatialPose` uses meters and right/up/back OpenGL coordinates. Quaternions are normalized xyzw internally; SDK arrays are position followed by wxyz. Legacy orientation conversion and the 128-byte head-pose channel remain intact. The session coordinator survives `HeadTracker` recreation and owns separate full-pose screen and yaw/floor VR origins. The camera worker uses a generation guard, a bounded latest-frame queue, and no SDK lifecycle operations in callbacks. + +Head polling is approximately every 4 ms with prediction disabled; this is not a claim of a 250 Hz sensor. Camera-rate callbacks provide a liveness check. Stale or unstable poses retain the last rendered transform and produce an invalid SteamVR pose. While a positional session is active, DroidDeck covers the resulting grey view with a themed recovery screen on the phone and glasses, including one readable copy per eye in SBS. It distinguishes tracking loss, USB disconnection, required recentering, and stabilization after recentering. Tracking-loss instructions ask the user to look around slowly in a well-lit room with visible detail, keep the cameras clear, and open the setup diagnostics to restart tracking if recovery stalls. Phone controls remain accessible, and the screen closes automatically when tracking is valid. Freshness is checked even if pose callbacks stop. Repeated USB timeouts require connection recovery rather than a synthetic valid pose. Large pose discontinuities latch a setup requirement. Provider shutdown invalidates queued work before closing the vendor provider and Java USB connection. + +The 176-byte `droiddeck-spatialpose` snapshot uses protocol version 4 and sequence-counter publication. The driver validates file length, version, finite normalized poses, and monotonic age. Head and both hands use one snapshot and one VR origin. Hand pose flags independently identify valid palm tracking (bit 0), pinch (bit 1), and grip (bit 2); head flags use only bit 0. The formerly reserved 32-bit word at byte offset 36 is now `input_epochs`, containing independent 8-bit loss counters for left trigger, left grip, right trigger, and right grip, from least to most significant byte. The layout size and pose offsets are unchanged, but versions 1 through 3 are rejected; app and driver must be rebuilt together. + +Snapshot flags select positional tracking (bit 0), bare-hand controllers (bit 1), or Luma Joy-Con +controllers (bit 2). The latter two selections are mutually exclusive; either enables stereo inference. +The Joy-Con mode consumes only wrist landmark 0 and the original capture timestamp; rotation and inputs +come from the paired Joy-Con. `luma_joycon.h` selects fresh stereo positions or a 6DoF-head-anchored arm +model independently per hand, rejects observations over 1.5 m from the head, and blends source switches +with a 180 ms time constant. It never integrates accelerometer position or uses the phone-camera +correction in this mode. Stale head poses invalidate output and release inputs. Selected mode flags +survive disconnect so a lost Luma cannot silently switch to a fixed-origin controller. Origin/connection +changes reset both positional blending and controller yaw alignment. This is hand-assisted tracking, +not a detector for the controller shell; see [Joy-Con setup and limits](../cardboard-vr.md#joy-con-controllers). + +Each counter advances when its gesture becomes ineligible, including invalid finger data, hand/head loss, and observation expiry. It survives later valid snapshots, allowing the driver to notice a short loss even if it never read the intervening invalid snapshot. Counters wrap independently within their bytes. Connection/origin changes reset driver input state, and a gap beyond 200 ms from its last accepted observation also releases inputs. Every hand retains its original camera observation timestamp: experimental hand poses and inputs expire after 200 ms, while head poses expire after 100 ms. A changed loss counter disarms only its affected gesture. Duplicate or older observations cannot rearm an input or replay a press; a new, valid released observation is required after loss before another press. Missing finger data never counts as a release gesture. Head updates cannot extend a hand observation's lifetime. Diagnostics expose the hand limit as `handMaxAgeMs`. + +The driver submits trigger scalar, trigger click, and grip updates before submitting the controller pose, including when the pose is becoming invalid. Disconnect and deactivation also clear inputs first. Changes in input state, loss counters, or API error codes produce concise driver log records with raw gestures, output values, armed state, pose/input validity, observation age, connection, and origin. Successful input API calls confirm submission to SteamVR; they do not prove that the dashboard received its mouse-up event. The installed dashboard grab handler retains a hand attachment until mouse-up and has no tracking-loss cleanup in that JavaScript component. Recovery of the reported stuck dashboard drag therefore still requires hardware validation; the implementation does not manufacture another press or a valid pose to force release. + +Controller display smoothing has no stationary anchors or dead zones. Small intentional motion remains visible; smoothing and prediction do not change the measured pose used for gesture validation. + +The displayed controller converges toward each measured palm pose on every driver update with one 15 ms correction time constant and normalized, hemisphere-corrected quaternions. There is no additional per-observation smoothing stage. After three consecutive observations with consistent motion, translation advances from the result's receipt time for at most 80 ms and 2 cm; capture timestamps still determine velocity and freshness. Receipt-relative prediction can continue between delayed inference results instead of consuming its entire horizon before a result arrives. Prediction is disabled above 1.5 m/s or 6 m/s², on a missed/invalid observation, head loss, or changed origin/connection. A missed observation freezes the last displayed transform through duplicate old samples until a newer observation arrives or the original 350 ms visual-hold expiry is reached. Fast motion reaches the 2 cm bound sooner, and correction adds a small settling delay. Stabilization and prediction do not alter gesture values or observation timestamps and cannot replace measured latency validation. + +The screen shader puts translation in `extra.yzw`, rotates the eye offset, and rejects intersections behind the eye. SBS and flat branches ignore translation. The push-constant allocation stays unchanged. A screen reference can include pitch and roll, preserving placement while reclining. + +## Stereo reconstruction and limitations + +Skipped camera pairs do not require clock warmup again when the source/host offset remains consistent. A source gap above 200 ms checks that offset against the existing 20 ms bound instead of unconditionally resetting synchronization. Nonmonotonic or invalid timestamps and inconsistent long gaps require 16 fresh observations; normal short-gap jitter retains the existing rolling-minimum and p90 policy. This preserves synchronization through a processing stall without publishing expired hand observations. + +Palm orientation uses an explicit hand side. The lateral axis reverses for the right hand so mirrored palms have the same normal and finger-direction convention; the existing left-hand mapping is retained. This corrects the mathematical right-hand inversion, while physical controller aiming still needs confirmation. + +The stock two-hand video graph can repeat whole-image palm detection when fewer than two hands were tracked previously. With both hands tracked it can skip that search; see the [MediaPipe graph](https://github.com/google-ai-edge/mediapipe/blob/master/mediapipe/tasks/cc/vision/hand_landmarker/hand_landmarker_graph.cc#L259). CPU scheduling maintains two persistent detector banks, each containing one detector per camera: one bank permits one hand, and the other permits two. After three observations agree on exactly one confident hand in both cameras, the one-hand bank handles intervening frames, and a two-hand search becomes due after 240 ms of camera time, running on the next processed frame. Both hands, a miss, handedness disagreement, nonmonotonic time, or a gap above 400 ms return selection to the two-hand bank. Second-hand discovery therefore remains enabled but can wait for the next scheduled search and processing. Banks retain their video tracking state between selections; they are not rebuilt per frame. GPU retains the ordinary two-hand bank. Diagnostics expose the active bank as `inferenceHandLimit`, alongside raw and filtered hand counts and per-camera timing. These choices reduce unnecessary searches by design; their benefit and extra model-memory cost require device measurement. + +The primary `left0/right0` images are copied only for diagnostics, calibration, or enabled hands. At most one pair is pending while the worker processes another. Automatic exposure is retained because the cameras also serve native VIO. SDK 2.4.0 documents the tracking-camera rate as 25 Hz and provides no stereo frame-rate setter. Polling more frequently does not create additional camera frames. The camera-rate readout accounts for skipped source-frame sequence numbers instead of treating processed-pair throughput as sensor rate. The selected video-mode Hand Landmarker pair receives matching timestamps. CPU inference runs the cameras concurrently with separate image buffers; each bank's right detector is created, used, and closed on one dedicated worker. Both calls must finish before pixels or detectors can be reused, including after failure or shutdown interruption. GPU inference remains serial on its owning thread. The pipeline detects landmarks in the original grayscale images replicated into RGB channels, without image normalization or fisheye remapping, corrects landmark coordinates for stereo reconstruction, matches unambiguous same-handed candidates, rejects excessive reprojection or implausible depth, and derives the palm pose from triangulated landmarks. Gesture recognition uses agreement between the two image-space finger estimates. MediaPipe world landmarks are not treated as headset-relative positions. + +The public header does not document the coordinate basis of the camera-rate pose callback. Its pose values are therefore not used as canonical head transforms. A bounded history of polled OpenGL poses supplies the capture-time transform. Source-to-host clock offsets must first stabilize over at least 16 observations; callback timestamp agreement and a nearby canonical head sample are required. Hand inference starts without waiting for the matching VIO callback, then checks for that exact camera timestamp before reconstruction can publish a valid pose. Missing confirmation, changed connections/tracking frames, invalid head tracking, and hand observations older than 200 ms still discard the result. Calibration and preview-only acquisition retain their bounded pose wait. Receipt-based offset estimation cannot establish absolute camera latency. External motion-to-visible-controller measurement is still required. Increasing expiry can reduce disappearing controllers at the cost of displaying older poses; it does not resolve GPU device loss or establish the latency/performance gates. + +Stereo validation retains the original 3-pixel reprojection, positive-depth, and 15–150 cm depth checks per landmark. Bare-hand controller position and orientation require a valid triangulated wrist and all four palm knuckles (0, 5, 9, 13, 17). Joy-Con mode reconstructs wrist landmark 0 only and takes orientation and inputs from the paired controller. Live pinch and grip no longer require trustworthy fingertip depth: each image estimates palm-normalized pinch and middle/ring/little finger curl, then both views must agree. Grip combines fingertip reach and finger-chain bending, with separate press/release thresholds and three curled fingers to press versus two to retain a press. Invalid, degenerate, or conflicting image evidence releases only its affected gesture and requires an observed release before rearming. A valid 3D palm is never sufficient by itself to invent a grab or click. Calibration and distance validation still require every board point to pass. Conservative stereo association rejects ambiguous hands rather than inventing depth. Crossed hands, edge-on palms, and occlusion may reduce availability. The 2D gesture consensus and aiming still require physical testing through grabs, pulls, and releases; they do not establish an accuracy or latency pass. No skeleton output, desktop gestures, fast-action guarantee, or hands-only locomotion is provided. + +Diagnostics include automatic or manual half/full input rates and a Lite-model comparison. Choices reset with the tracking session; the default is full-model parallel CPU with scheduled discovery and an adaptive rate starting at 500 permille. The Lite bundle uses Google's Lite palm detector and Lite landmark model with matching Tasks metadata. Both bundles are checksum-pinned in Gradle and at runtime; `tools/build_hand_lite.py` reproduces the candidate from pinned inputs. Saved-pair CPU replay compares full-model two-hand inference, scheduled full, scheduled lite, then full-model two-hand inference again, all with concurrent cameras. Rows identify `parallel` and `scheduled`; samples identify `inferenceHandLimit`. Its timings exclude model construction and cannot establish live detection coverage, external latency, second-hand discovery delay, or game performance. + +## Combined release gates + +| Area | Required evidence | +|---|---| +| Translation | Measured right/up/back movement and approximately 1:1 meter scale; lean and crouch; no double application | +| Origins | Crouched recenter preserves floor; picture switching preserves independent screen and VR references | +| Screens | Anchoring while moving sideways, toward and away; stable output after crossing the screen plane | +| Hands | At least 95% valid slow unobstructed observations at 30–80 cm; position error at most 5 cm; stationary jitter at most 2 cm | +| Latency | External physical-motion-to-visible-controller p95 below 100 ms | +| Recovery | Immediate release on detected loss; observation expiry extended to 200 ms by user request; clear-hand reacquisition within 500 ms | +| Performance | At most 10% regression in p95 game frame time over 20 minutes, with baseline frame rate maintained | +| Gameplay | Dashboard selection and Angry Birds VR aim, grip, pull, release | +| Robustness | Crossed hands, partial occlusion, head motion, lighting, USB reconnect, thermal load | + +Record results in `luma-spatial-evidence.md`. A build or head-tracking pass alone does not satisfy this combined gate. diff --git a/docs/development/proot-performance.md b/docs/development/proot-performance.md index 3679f43ea3..217650b53f 100644 --- a/docs/development/proot-performance.md +++ b/docs/development/proot-performance.md @@ -187,7 +187,7 @@ Checked against bionic `android16-release`: |---|---|---| | `rseq`, `set_robust_list` | **blocked** | glibc, at the start of every thread, while all signals are blocked | | `faccessat2` | **blocked** | glibc's `faccessat()`, which tries it on **every** call before falling back, so 2 round trips (`access()` calls the plain `faccessat` syscall directly) | -| `fchmodat2`, `openat2` | **blocked** | newer glibc, Flatpak/libglnx, FEX's rootfs lookups (`libblsession.so` turns `openat2` into `openat`) | +| `fchmodat2`, `openat2` | **blocked** | newer glibc, Flatpak/libglnx, FEX's rootfs lookups (`libblsession.so` turns `openat2` into `openat`, resolving `RESOLVE_IN_ROOT` paths component by component inside the root) | | `setuid`, `setgid` and the rest of the family | **blocked** | Xwayland (hence `-i`) | | `futex_waitv`, `io_uring_*`, `landlock_*` | **blocked** | Proton's fsync (droiddeck-fsync answers `futex_waitv` in `libblsession.so`), some engines | | `clone3` | blocked before Android 15 | glibc `pthread_create` | diff --git a/docs/development/rayneo-xr.md b/docs/development/rayneo-xr.md new file mode 100644 index 0000000000..0de7f77196 --- /dev/null +++ b/docs/development/rayneo-xr.md @@ -0,0 +1,184 @@ +# RayNeo Air / GT XR integration + +Built on the current `feat/viture-xr` PR #732 at bdf876d47cc9bb6fa810d014370da5bbb3c28039. +The supplied historical hashes a127e66, 7f9dd75, e8e3e6b and f0b3297 were not +resolvable in the fetched branch; no native projection or synchronization files are changed. + +## Discovery and transport + +`Glasses.kt` owns USB permission, attachment/detachment and presentation-display +selection. There is no manifest USB VID filter: discovery uses `UsbManager.deviceList`. +VITURE discovery is retained. `RayNeoModel` accepts the scaffold's confirmed +`1bbb:af50` and verncat's confirmed GT identity `3941:af50`; other products under `1bbb` or bridge vendor `22d9` must identify +as RayNeo/TCL Air or GT in their USB product name. This covers named Air 2, 2s, +3, 4 Pro and GT devices without claiming arbitrary TCL phones or bridge chips. +Additional unnamed VID/PID pairs require captures before being allowlisted. +Other products under `3941` are rejected. Without a meaningful USB product name, +`3941:af50` is labeled "RayNeo GT series"; a supplied GT MAX name is preserved. +GT Max was observed on the Samsung SM-F976U with this USB identity on 2026-10-14; +USB permission and the command handshake succeeded. +EDID/product display names containing RayNeo, Ray Neo, or TCL Air/GT use the existing +external-screen path. Android's supported modes, not a synthetic refresh value, +determine whether 120 Hz can be selected. Stereo modes may have a lower maximum rate. +GT Max's observed display identity is `SmartGlasses`, EDID manufacturer `TCL`, +product `980` (1920x1080, 60/120 Hz in 2D). This exact metadata combination is +recognized even though neither display name contains RayNeo. Other generic +SmartGlasses/TCL products are not accepted by this rule. + +Game output uses the same `GlassesScreen` presentation as VITURE, with the phone +retaining the session controls; no screen-capture permission is needed. Discovery +checks both Android's display name and its product name. On Android 12 and newer, +a missing product-info object is treated like an unnamed panel: a recognized +glasses USB device can identify a single presentation display. Unrelated named +monitors and multiple unnamed displays are not automatically selected by that +fallback. `Game on glasses` remains enabled by default. +The presentation holder is selected before `show()`, and the phone SurfaceView +is hidden only after the compositor attaches to the glasses holder. Late phone +surface callbacks cannot reset the external output. + +`RayNeoLink` claims a paired IN/OUT interface and translates the controller's +internal commands to RayNeo packets. For `3941:af50`, selection prefers interface +number 5 (not array index 5), as tested in verncat's GT contribution. Only endpoints +that can carry 64-byte packets qualify. Firmware with a different interface number +can use a unique qualifying IN/OUT pair; ambiguous alternatives are rejected. +It requests device info (0x66/0), enables IMU +(0x66/1) and waits for acknowledgments, warms up for two seconds, and stops IMU +(0x66/2) when no pose consumer remains or the link closes. SBS uses commands 6/7. +Unsupported VITURE brightness, volume and electrochromic commands are never sent; +the VITURE hardware-control UI is hidden for RayNeo. +GT spatial-button notification 0x08 and volume/display ACKs remain non-device-info +responses and cannot satisfy unrelated startup commands. The spatial button is +left to the glasses' firmware; no undocumented spatial-mode command is sent. + +The parser/filter are adapted from the user's scaffold at +581dbf712ed601ece4cf5e4a7c1f52e780299c88. Sensor packets are framed with 0x99/0x65, +with little-endian acceleration at byte 4, gyro (degrees/sec) at 16 and a uint32 +100us device tick at 40. Fragmented and coalesced reports are assembled before decoding. +Board 0x3a (Air 4 Pro) receives the scaffold's -20-degree X IMU mounting correction. +GT Max (`3941:af50`, board `0x41`) uses the mapping measured on 2026-10-14: +gyro and acceleration `(-y, z, -x)`, then +35 degrees around X. +At the user's level pose the raw acceleration was approximately +`(5.70, 0.00, 7.95)` m/s². A directed left-turn-and-hold capture produced positive +X/Z gyro (e.g. `(20.5, 2.0, 28.2)` deg/s), and upward looks produced negative Y +gyro. The 35-degree mounting estimate comes from that level capture, +not manufacturer calibration; frame fit and other GT variants remain unverified. +Gravity initializes orientation before the first published pose. Subsequent +body-to-world fusion uses `measuredUp × predictedUp`, correcting tilt toward gravity +instead of amplifying the error. These fusion corrections also apply to Air; +the GT Max sensor remapping does not apply to Air or VITURE. + +The non-Max GT shares USB `3941:af50` but reports board `0x40`, confirmed by +switching between both physical pairs on the same phone. Its sensor axes use +the ordinary XYZ basis with a measured -25-degree X mounting correction, rather +than the Max permutation. Its confirmed upside-down resting acceleration was +approximately `(0.020, -8.819, -4.106)` m/s²; the worn level capture was near +`(0.09, 9.26, 3.11)`. Left turns produced positive Y/Z gyro. The mounting estimate +uses the resting surface; per-device calibration refines its tilt and gyro bias. +Both the pose filter and calibration collector select the same board profile. +Non-Max calibration keys have a `:gt-standard-v1` suffix so they cannot replace +existing Max profiles when USB identity fields coincide. Calibration loading +waits for the device-info response; detached-device callbacks cannot change the +replacement device's calibration key. Existing Max keys remain compatible. +After installing this correction, the non-Max completed the upside-down +calibration on the phone with `saved=true`, phase `SAVED`, progress 100. +All 186 glasses/shared-pose/SteamVR-launch/UI regression checks passed and the +installed APK's packaged runtime inputs verified. After calibration and the +recenter check, the wearer confirmed on 2026-10-14 that the non-Max GT view +looks and feels good. + +## Existing pose and SteamVR pipeline + +The scaffold fuses gyro/accel into wxyz. The Android adapter converts its Y-up +coordinate basis and component order into VITURE's Z-up xyzw convention before +calling the same `Glasses.PoseSink` used by VITURE. `HeadTracker` and `HeadPose` +retain their existing recenter/seated-reference behavior. The path continues through +`WaylandCompositor.nativeSetCardboardPose`, the compositor's `headpose_shm.h` +shared-memory record and `tools/vr/src/driver_droiddeck.cpp`'s pose-file reader. +The OpenVR projection, presenter, Vulkan wait logic and vblank counters are untouched. +An explicit Play SteamVR request polls the guest runtime independently of display +attachment and USB-control readiness. Both RayNeo and VITURE call the same +`droiddeck-steamvr start` helper. Stopping cancels the pending launch request; +automatic hardware 3D switching still respects the shared Auto 3D setting. + +## Optional stationary calibration + +Glasses → Tracking → Tracking calibration guides the user to rest the connected +RayNeo upside down on a level surface. It allows three seconds to settle, then +requires five continuous seconds of stationary samples (at least 200 reports). +Invalid gravity, the wrong orientation, motion/variance, or gaps longer than 250 ms +restart the window. A 30-second deadline fails without replacing a saved profile; +USB stream loss also terminates the operation. Cancellation and link replacement +invalidate queued callbacks by operation revision and connection generation. + +The profile contains a raw gyro bias and a small mounting tilt correction, applied +to both sensor vectors before fusion. It does not estimate heading, full accelerometer +scale/bias, or translation. Profiles persist by vendor/product/serial; when a serial +is unavailable the product and model name share a fallback profile. Reset deletes +only the current profile and restores the model mapping. VITURE's fused SDK poses +do not expose the raw inputs this measurement needs, so this control is RayNeo-only. + +While measuring, live pose publication pauses. On completion the user wears the +glasses, looks ahead and taps Done to recenter the active session. Dismissing the +dialog or leaving the tracking panel cancels an in-progress measurement. Agent +diagnostics expose the calibration state through `glasses`; operations are +`calibrate`, `cancel-calibration`, and `reset-calibration`. +The calibration build passed 157 targeted sensor, lifecycle, pose, launch and +Compose UI tests. Installing this feature and validating a real upside-down capture +on the phone remain pending a debugging connection. + +## Regression and hardware validation + +### SteamVR library launch routing (2026-10-14) + +DroidDeck's SteamVR library entry (appid 250820), including its game shortcut, +now sets the same `EXTRA_STEAMVR` request as Play SteamVR instead of sending a +normal Steam game URL. Existing sessions resume with that request as well. +Other games retain their normal launch path and arguments. + +Inside Steam's library, the existing SharedJSContext bridge wraps +`SteamClient.Apps.RunGame` for exactly 250820 and dispatches it to +`droiddeck-steamvr launch`. This calls the same install/start helper used by the +button, including OpenVR registration, the ARM64 runtime and Vulkan layer setup. +It does not change Steam's saved launch options. The library bridge is installed +for both desktop and Big Picture. It relies on the live Steam UI API and needs +verification against the actual phone's Steam version after installation. + +The helper serializes installation/startup and avoids restarting an active +DroidDeck SteamVR session. Library launch diagnostics are in +`${XDG_RUNTIME_DIR:-/tmp}/droiddeck-steamvr/library-launch.log`; normal runtime +logs remain in `vrstartup.log` and Steam's logs directory. It does not intercept +arbitrary external `steam://` URLs or change VR game launch arguments. + +Only VR-only games (`vr_only`) wait for SteamVR and start it. Games where VR is +optional, such as No Man's Sky, launch normally unless SteamVR is already +running; before this they started (and if needed downloaded) SteamVR on every +Play, so they opened in VR without the user asking for it. + +Validation: seven bridge/dispatch tests passed under Node/Python, five Android +SteamVR launch tests passed, shell syntax passed and the debug APK built with +runtime input verification. The broader Linux compatibility suite cannot run +unmodified on Windows because it requires `fcntl`; no Linux runtime was available +for the helper's lock/process integration tests. Installation and live library +Play verification are pending while the phone charges. + +Run `./gradlew -PskipRust=true :app:testDebugUnitTest --tests 'com.droiddeck.launcher.glasses.*'`. +Protocol tests cover malformed/fragmented packets, unsigned timestamps, model gating, +quaternion normalization, yaw basis and tick rollover. USB integration tests cover +permissions, GT interface preference/fallback, interleaved GT notifications and +ACKs during startup, 2D/3D writes, and stale pose callbacks. Hardware validation is still required per model: +USB enumeration, acknowledgment/stream startup, axes and recenter, hot unplug/replug, +SBS negotiation, Android's actual 120Hz mode, and SteamVR pose/frame pacing. +GT Max was verified on SM-F976U with USB `3941:af50` and the TCL/980 display: +the compositor attached to its separate 1920x1080 display, the Play SteamVR +request started native `vrserver`/`vrcompositor` through the shared helper, and +the presenter logged roughly 60 frames/s while the IMU packet count increased. +The test retained the user's disabled Auto 3D setting. After installing the corrected +GT sensor mapping, the user confirmed an upright starting view and correct movement +in all directions. SteamVR and the glasses IMU remained running. Stereo negotiation, +long-term drift, and alternate bridge firmware variants still need their own +hardware validation. The targeted glasses, Cardboard pose, and SteamVR launch +suite passed 134 tests after the tracking correction. Tracking regression coverage +checks initial gravity alignment, tilt convergence, the recorded GT Max level pose, +and yaw/pitch/roll through the shared VITURE basis conversion and recenter path. + +Attribution and the scaffold's Apache-2.0 license are in `docs/third-party/rayneo/`. diff --git a/docs/development/steam-display-scaling.md b/docs/development/steam-display-scaling.md index 299f4b188b..9551de73a1 100644 --- a/docs/development/steam-display-scaling.md +++ b/docs/development/steam-display-scaling.md @@ -228,3 +228,11 @@ flag for an experiment. Device check (Thor): Alan Wake's American Nightmare with its 1280x720 Game Resolution runs on `:1` at 1280x720 with no `--force-windows-fullscreen` in the session, 2 frame-size changes, no crash in logcat. The Games tab and the drawer render without the switch. + +## Steam picture position + +The launcher's Execute Steam settings, under Display, offer Picture position: Top, Bottom, Center (default). The selection applies to the entire Steam session, including menus and games, and is loaded again on resume. No focus-based switching or in-game toggle is used. PiP and VR retain their own presentation. + +Positioning keeps the selected resolution, fit scale, aspect ratio and full surface intact. It distributes outer letterboxing above or below the picture; it does not crop game-authored black bars inside the surface. A surface that already fills the panel has no vertical space to move. Use a 16:9 resolution for fixed-16:9 games when a separate controls area is desired. + +The compositor publishes actual bounds for touch mapping and ignores touches starting outside the picture. The mapping harness covers top, bottom and center across tall, 16:9 and wide surfaces, including inverse input mapping and legacy half-screen mode compatibility. diff --git a/docs/development/stores.md b/docs/development/stores.md index 4ce7d1aab3..4fb78f4da0 100644 --- a/docs/development/stores.md +++ b/docs/development/stores.md @@ -24,26 +24,112 @@ scanned (`StoreInstallRoot.roots`): internal, every card, and the Steam library' installs an earlier build put there. `<Store>` is `GOG`, `Epic` or `Amazon`; `<title>` is the title with unsafe characters dropped, at most 60 characters (`StoreInstallRoot.folderName`), chosen once; a rerun (repair, update) lands on the folder whose sidecar carries the game's id, wherever it is. -An Epic install on a card keeps its in-flight chunks in `cacheDir/stores/epic/<id>/`: the -`chunkCacheDir` of both native calls (`EpicNative.run` fetches into it, `EpicNative.assemble` -writes the files from it and drops each chunk after its last use, then the folder), and of the -manager's own loops when the engine is not there; `""` keeps the cache beside the game, as an -internal install has it. The scratch folder is removed on cancel-with-delete and on uninstall. -The cache holds whole ~1 MiB chunk windows, shared with files this device does not install, so it -is often larger than the game (Metalstorm: 9.1 GB of chunks for 4.4 GB of files); the free-space -check, made after the delta pass, counts the missing chunks and the missing files on their own -volumes. A successful run removes the cache. +An Epic install on a card keeps its in-flight chunks in `cacheDir/stores/epic/<id>/`; +`""` keeps the cache beside the game, as an internal install has it. The scratch folder is +removed on cancel-with-delete and on uninstall. + +Preflight resolves an existing game's folder before selecting its target root, so a resume or +repair on a card checks and remembers that volume rather than internal storage. Fresh GOG and +Amazon installs can reject insufficient catalog-size space immediately; existing installs defer +to manifest checks of the files still needing work (GOG MD5, Amazon SHA-256 where supplied). +Free-space display probes the nearest existing ancestor without creating the target folder; if +the probe cannot determine space, it reports **Free space unknown** rather than blocking an install. +`StoreInstallRoot` uses `-1` for unknown and preserves a measured `StatFs` zero as **0 B free**. +Fresh GOG/Amazon preflight and the backends' own space checks (GOG in Kotlin, Epic and Amazon in +the Rust engine) reject known zero when bytes remain. The read-only probe walks existing ancestors without creating directories; a failed +`StatFs` probe can use a positive `File.usableSpace` fallback, but that API's ambiguous zero is +unknown, not a measurement of a full disk. +Preflight failures remain failed Downloads rows with Clear and Retry. Retry reruns preflight +outside the worker lifecycle and then enqueues the real backend; it never occupies a queue slot +with a placeholder job. Failures are kept in the Downloads UI, notification and logs rather than +duplicated as transient failure toasts. Active queue persistence and ordinary backend pause/retry +are unchanged. + +Epic installs run in the Rust `epic` module of `libdroiddeckstores.so` (`epic/install/`), driven by +`EpicInstaller` through `EpicNative.install`. There is one engine; the old hidden `storesEpicMode` +switch is no longer read. Without the native library the Epic store cannot install (the facade +reports "the store engine is not available"). The design, and how it was written from a +functional spec only, is in [epic-cleanroom.md](epic-cleanroom.md). + +A run, in order: CDN list from the build information (`EpicApiClient.getManifestApiJson`) → +manifest from the first CDN that serves it → parse (binary or JSON) → files selected by the device +language's install tags (`EpicInstallTags`) → staging recovery → the delta pass (a selected file is +up to date when it has the manifest size and SHA-1; a file without a manifest hash is always +rewritten) → space plan → chunk cache preparation → fetch schedule → download and write → the +installed record (`StoreInstalls.complete`). Resume, update and repair are the same rerun. + +- **Schedule** (`epic/install/schedule.rs`). The pending files' parts form one timeline. A chunk is + downloaded at its first use and feeds every later use in the same file directly. If it is used + again in a later file it is kept, decompressed and verified, in the chunk cache, which has a byte + budget; when keeping a chunk would exceed it, the cached chunk needed furthest in the future is + dropped and downloaded again when needed. Chunks a previous run left in the cache are reused, + soonest-needed first, as far as the budget allows. +- **Writing** (`epic/install/writer.rs`). Files are admitted strictly in order, a little ahead of + the download, and a download is dispatched only once the file of its first use is admitted, so + the number of half-written files stays small. Each admitted file is written into a unique + `epic-<pid>-<seq>-<nanos>.stage` file in `<game>/.droiddeck-epic-staging/`; the file SHA-1 is + computed in file order as parts land. A complete file is synced, size- and hash-checked, and + renamed over its destination. Right before the first rename of the run `StoreInstalls.markUpdating` + switches an installed record to `updating`; a refusal fails the run with nothing replaced. +- **Fetching** uses the shared `fetch_core` (adaptive window, CDN rotation, retries with back-off, + stall and 429 cooldowns) with the speed tier's window and decode workers. Every chunk is checked + (header, zlib stream end, exact size, SHA-1) before any byte reaches a file or the cache. +- **Space** (`epic/install/space.rs`). Free space is probed per volume (`statvfs`; unknown is never + "no space"). The plan: net peak of the pending files in order (each old copy credited at its own + swap), a cache budget of half the remaining space (at most 1 GiB, 256 MiB when unknown, 0 is + allowed), an overlap budget that limits how many bytes of files replacing existing data are + staged at once on an update (at least the largest replaced file), and a 64 MiB transient + allowance. A card install keeps its cache in `cacheDir/stores/epic/<id>/` when internal storage + can hold a useful cache and the game has no non-empty `.chunks` yet; otherwise the cache is + `<game>/.chunks`. When the full plan does not fit, the run falls back to one file at a time with + no cache (needs only the net peak); when even that does not fit the install is refused before any + chunk request, naming the storage, the need, the free space and the shortfall. +- **Progress**: the bar counts pending-file bytes written (not compressed chunk bytes), at most every + 50 ms plus once per finished file. The run logs `epic: plan …` and `epic: summary mode=adaptive|narrow + files=… bytes_written=… avg_mbps=… fetches=… refetches=… peak_cache_mib=… hosts=…`. +- **Cancel / pause / failure**: the cancel flag is forwarded within 250 ms; the run stops its + requests, joins its threads, removes every unfinished stage file and `.part` cache entry, and only + then returns. Swapped files stay; unswapped destinations keep their old content; the chunk cache + stays for the next run. Success removes the cache and the staging folder (when only its marker is + left). + +The staging folder is recognised by its `owner` marker (`DroidDeck Epic staging v1` + LF). Before +the delta pass the run checks that the folder is a real directory at the expected canonical path, +that the marker matches and that every other entry is a plain `.stage` file directly inside it; only +then are those orphans deleted. Anything unexpected fails the run without deleting. A manifest path +naming the staging folder, an absolute path or a `..` segment is refused. `.stage` / `.part` files +elsewhere in the game folder are never touched. + +Amazon installs run in the Rust `amazon` module (`amazon/install/`), driven by `AmazonInstaller` +through `AmazonNative.install`; sign-in, the library sync and the size lookup call the same module +through `AmazonNative.call`. The design, and how it was written from a functional spec only, is in +[amazon-cleanroom.md](amazon-cleanroom.md). + +An Amazon run, in order: download lookup for the entitlement (`GetGameDownload`: a CDN base URL with +a signed query, and the version id) → `manifest.proto` from that base (a 4-byte big-endian header +length, an opaque header, then an xz or LZMA-alone compressed protobuf) → parse (every file of every +package; paths refused when absolute, with a drive letter, `..`, empty segments, or naming +DroidDeck's own root files) → leftover `<file>.tmp` siblings removed → the check of files on disk (a +file is complete when it has the manifest size and SHA-256; the same test drives the space check and +the download plan) → space check (`Not enough free space: need …, only … free`; unknown free space +never blocks) → empty files created locally → every other pending file fetched from +`files/<sha256 hex>` under the base, one streamed GET each through the shared fetch core (the speed +tier's window; at least half the CPU cores verifying and writing), hashed as it arrives, written to +`<file>.tmp` and renamed over the destination after the size and hash checks → the installed record. +Before the first file is put in place the record is switched to `updating`, so an interrupted repair +is offered as "Resume install". There is no partial-file resume: a file is complete or fetched again +from its first byte. Files the manifest does not list are left alone. ## The sidecar ```json { "version": 1, - "store": "epic", // gog | epic | amazon - "id": "Samorost3", // the store's own id: GOG product id, Epic app name, Amazon product id + "store": "epic", + "id": "Samorost3", "title": "Samorost 3", - "exe": "Samorost3.exe", // relative to the folder, forward slashes; what the icon is read from - "launcher": ".droiddeck-launch.bat",// optional; what the shortcut runs instead of exe + "exe": "Samorost3.exe", + "launcher": ".droiddeck-launch.bat", "args": ["-EpicPortal", "-epicusername=\"Name\"", "..."], "env": {"FUEL_DIR": "C:\\ProgramData\\Amazon Games Services\\Legacy"}, "installVersion": "1.4.0", @@ -59,7 +145,18 @@ store root whose sidecar says `installing`, or that has no sidecar at all, is an install: `AddedGames.scan` leaves it out (it is neither a game nor a Custom folder), and the Stores card and page offer **Resume install**, which reuses that folder - and an Epic `.chunks` beside it - instead of starting a fresh one (`StoreInstallRoot.existingFolder`). A finished install being -repaired keeps its finished sidecar. The launcher and the finished sidecar are written before the +repaired keeps its finished sidecar until Epic reaches the first verified file swap. Immediately +before that swap Epic atomically changes the record to `"state": "updating"`, preserves launch +choices and identifiers, and clears `installVersion`. Network/hash failures or cancellation before +that point leave the old installed record and files intact. A later failure can leave a mixture of +verified new files and untouched old files: replacement is atomic **per file**, not a transactional +whole-game update or rollback. The updating folder is excluded from installed scans and offered +for resume. Cancellation with deletion clears caches but retains that folder and its verified +swaps; retry preserves the updating record's metadata. If marking or swapping fails, no destructive +fallback is attempted (the conservative updating state can remain even when a swap fails). +Completion writes the installed record with the new version only after all selected files succeed. +An already registered live Steam shortcut is not revoked at each file swap; do not launch an +in-progress update. The launcher and the finished sidecar are written before the art and the Steam registration; a failure writing them fails the download with its message. `StoreGameSidecar.parse` refuses anything whose `exe` or `launcher` would point outside the folder. @@ -106,6 +203,15 @@ An Epic game's launch choices are the Epic card in the Games tab's launch settin read the same thing - and "Resolve Epic sign-in", which opens Epic's account page behind its sign-in in Android's browser. +An Amazon game's exe and arguments come from its `fuel.json` (`Main.Command`, used when it names +an existing file; `Main.Args`, used even when it does not), else from a score over every `.exe` +below the folder (Unreal shipping binaries and `Binaries/Win64` first, crash handlers, setups, +launchers and tiny stubs last; the rules see paths relative to the install folder), else the shared +picker. Its launcher sets five FuelPump variables frozen at install time: `FUEL_DIR`, +`AMAZON_GAMES_SDK_PATH`, `AMAZON_GAMES_FUEL_ENTITLEMENT_ID`, `AMAZON_GAMES_FUEL_PRODUCT_SKU` and +`AMAZON_GAMES_FUEL_DISPLAY_NAME` (the account name, `Player` without one). No Amazon Games SDK files +are deployed into the prefix and `fuel.json` `PostInstall` steps are not run. + A game's web links reach Android: `droiddeck-store-launch` sets the prefix's `HKCU\Software\Wine\WineBrowser` `Browsers` to `/usr/local/bin/droiddeck-open-url`, which is also `xdg-open` first on the game's PATH, and hands http(s) addresses to the app, which opens them in @@ -146,7 +252,9 @@ the prefix's user folder appears, within a minute. Every path logs has no cloud saves. - **The services:** GOG `cloudstorage.gog.com/v1/<user>/<client>` with a token issued to the game's own client (the client secret is kept at install; the Galaxy token is the fallback); Epic's - savesync data storage with signed read and write links. + savesync data storage with signed read and write links (`EpicCloud` → `EpicSaveSync` → the Rust + `epic/savesync.rs`; the template's root token and `{EpicId}` / `{AppName}` are read by + `EpicSaveTemplate`). - **Which launches:** `droiddeck-store-launch` recognises a store game by the launcher .bat Steam runs or, for a game without one (most GOG games), by its exe - the folders above it are searched for the sidecar. @@ -172,7 +280,9 @@ keeps the files; every store's install skips complete, verified files on the rer rerun. Cancel deletes the folder. `StoreDownloadService` holds a foreground notification while anything runs. The native engine (`libdroiddeckstores.so`, `StoresNative`, `GogNative`, `EpicNative`, `AmazonNative`; contract in `app/src/main/rust/stores/JNI.md`) is loaded on first use; without it -each manager runs its Java fetch loop. +the GOG manager runs its Java fetch loop, and the Epic and Amazon stores (all of whose service calls +and installs run in the Rust `epic` and `amazon` modules) are unavailable: sign-in, sync and install +report "the store engine is not available". ## Settings diff --git a/docs/development/viture-sdk.md b/docs/development/viture-sdk.md new file mode 100644 index 0000000000..38aa17de63 --- /dev/null +++ b/docs/development/viture-sdk.md @@ -0,0 +1,140 @@ +# VITURE Android SDK integration + +For the cross-brand feature matrix and user setup, see [smart-glasses support](../smart-glasses-support.md). + +The optional adapter is built against the user-supplied VITURE XR Glasses SDK +2.4.0. Set `droiddeck.vitureSdk=C:/path/to/VITURE_XR_Glasses_SDK_for_Android` +in the ignored `local.properties`, or pass `-PvitureSdkDir=/path/to/sdk`. +The directory must contain `include/` and `android/arm64-v8a/`. + +Gradle compiles `droiddeck_viture`, packages `libglasses`, `libcarina_vio`, and +`libcloud_protocol`, and includes the SDK's LICENSE and NOTICE under +`assets/licenses/viture`. Vendor headers and binaries stay outside the repository. +A build without the optional SDK still supports the existing legacy VITURE and +RayNeo transports, but does not advertise control for SDK-dependent glasses. + +## Supported app functions + +| Device | Transport and tracking | App controls | +| --- | --- | --- | +| Pro 2 XR | SDK Gen2 pose callbacks, observed OpenGL axes converted to NWU; negotiated pose frequency | 1080p 2D through 120 Hz, SBS 60 Hz, brightness 0–8, volume 0–8 | +| Luma Ultra | SDK Carina USB transport; OpenGL poses converted to NWU | 1200p 2D through 120 Hz, SBS 60/90 Hz, brightness, volume, binary dimming | +| Beast | SDK Gen2; native/bypass display commands selected by capability and current mode | 1200p output, SBS, brightness, volume 0–15, dimming toggle | + +Pro 2 identification uses the SDK's PID validation and market name, not a guessed +USB ID. Pro 2 has no electrochromic film control. Its display profile uses the +[official 50° FOV and 1080p/SBS limits](https://www.viture.com/academy/product/viture-pro-2-xr-glasses). +Device firmware can reject individual modes; Android's physical display size +must confirm SBS before the app considers the switch successful. + +All three feed the existing `Glasses.PoseSink`, head recentering, compositor and +SteamVR pipeline. Ultra selects 3DoF or the opt-in positional 6DoF mode before SDK +initialization. Its positional poses and stereo cameras feed the +[Luma spatial pipeline](luma-spatial-tracking.md); camera passthrough is not implemented. +The SDK's optional statistics reporter is not enabled. + +The SDK owns USB interface selection and I/O. `UsbDeviceConnection` remains open +until stop/shutdown/destroy finish. A generation token rejects callbacks from an +old connection. Device brightness, volume and dimming events update the app. +Beast native and standard display codes have separate meanings; they are mapped +explicitly. Host tracking suspends native DOF to prevent applying rotation twice +and restores the previous native DOF on stop. Older firmware rejecting a bypass +mode can fall back to the native table, with rollback on failure. + +`Game on glasses` uses Android's existing Presentation output. USB control alone +does not create a video display: the phone, cable and adapter must expose a usable +external display. Enabling 3D also enables and saves `Game on glasses` before +requesting the stereo mode, so the picture uses the glasses' presentation instead +of the mirrored phone output. Returning to 2D keeps the game on the glasses. +Discovery checks both display name and product metadata, with +a single unnamed-display fallback when recognized glasses USB is present. + +Screen width and distance apply to **Virtual screen** rendering. In **Automatic**, +ordinary 2D games stay flat. On an SBS display, the complete flat frame is fitted +into each eye without cropping or head tracking. A running SteamVR session uses +the direct stereo view. Games or videos that already contain separate eye images +use the explicit **Side-by-side game** picture setting. Switching SBS on does not +activate a virtual screen or head tracking for ordinary games. +The direct view uses SteamVR field of view instead of virtual-screen dimensions +while SteamVR is running. A plain side-by-side game fills each eye and does not +use the SteamVR field-of-view or recenter controls. + +All supported glasses with an available head-tracking connection have a separate +**3DoF virtual screen** toggle, including VITURE, RayNeo and XREAL 1S. Availability +comes from the connected transport's IMU capability rather than a model whitelist. +The app renders this screen without enabling a built-in 3DoF mode or changing +brightness. Enabling it selects Virtual screen, head tracking and Game on glasses, +and saves those preferences without changing the glasses' 2D/SBS mode. It works +with flat games in either display mode. Disabling it returns the picture to Automatic; switching +SBS on or off preserves the 3DoF selection. Virtual screens center on the current +viewing direction when tracking starts or the user recenters, including the +up/down angle. Direct SteamVR views retain their gravity-aligned recentering. + +The settings UI, menu presentation, and session renderer share this mode selection +through `GlassesRendering`. Setup → Smart glasses configures DroidDeck menus, +non-Steam launchers, desktop sessions, and games. Tracked menus use the app's own +glasses presentation while phone controls remain available; see +[tracked menus](glasses-menu-tracking.md). Regular refresh rate applies to 2D +output; SBS uses the model's separate 3D refresh rate. +Both the home menu and session drawer use **Display**, **VR**, **Tracking**, and +**Device** tabs. Display groups connection and output controls, 2D/3D resolution +and active refresh rate, then picture and virtual-screen geometry. VR contains +SteamVR controls, automatic 3D, VR resolution, and field of view. Tracking groups +head orientation, position and floor, and hands with camera setup. Device contains +brightness, volume, and sunblock. Unsupported hardware tabs are hidden. Recenter +is the first action on every session tab while head tracking is enabled for a +3DoF/6DoF virtual screen or SteamVR. + +Display saves **2D resolution** and **3D resolution**; VR saves **VR resolution**. Values are per eye: 1920 x 1080 or, on tall VITURE +models, 1920 x 1200. Automatic keeps the existing model default; VR defaults to +following the active 2D/3D preference. Home settings expose all three profiles, +while a running session shows the active profile next to its refresh control. +Switching resolution retains the refresh preference and does not change brightness, +color processing, or the session's game-rendering resolution. Android selects an +advertised mode with matching dimensions and the closest available refresh rate, +without crossing the 2D/SBS layout. VITURE's USB command selects the matching +resolution family first. A saved resolution unsupported by another attached model +falls back to its automatic behavior. Resolution controls wait for a pending SBS +transition to finish before accepting another change. + +Both lists offer 30 Hz only when Android advertises a matching native display mode at the current +resolution and **Game on glasses** is enabled. Android's presentation selects that mode without a +vendor command. A saved 30 Hz choice falls back to 60 Hz if the display or eye layout lacks it; +mirrored output never substitutes a 30 fps rendering limit. +Software picture controls remain available while a display is connected even if +USB control is lost; hardware controls and head tracking still require USB. +Presentation refresh preferences are revalidated on display changes even when +the requested Hz is unchanged, and keep both dimensions of the active mode. + +## Validation + +Run `:app:externalNativeBuildDebug` and +`:app:testDebugUnitTest --tests 'com.droiddeck.launcher.glasses.*'` with the SDK +configured. Compile `app/src/test/cpp/viture_display_modes_test.cpp` with the NDK +C++17 compiler and the SDK include directory to check native/standard mappings +against the vendor constants. The Kotlin tests cover model capabilities, axis +conversion, invalid poses, rejected tracking starts and stale callbacks. + +Physical acceptance checks remain: connect each model, grant USB permission, +verify the Play SteamVR control, verify game output moves to the glasses, +test head rotation/recenter and SBS, then unplug/reconnect. Building and unit +testing do not establish hardware compatibility for every firmware revision. + +### Pro 2 pose-axis correction, 2026-10-14 + +The connected Pro 2 delivered approximately 200 normalized poses/sec. The wearer +reported yaw moving the view vertically, pitch rolling it, and roll turning it +horizontally. Directed captures showed a left turn primarily increasing quaternion +Y (approximately 0.004 to 0.253), while repeated upward looks varied quaternion X +(approximately -0.187 to +0.082) with Y/Z remaining near zero. This is the OpenGL +right/up/back basis, despite the SDK 2.4.0 generic Gen2 callback documentation +describing NWU. + +The adapter therefore selects the existing OpenGL-to-shared-glasses conversion +for the SDK-identified Pro 2 family as well as Carina. Other Gen2 models retain +their previous mapping. Tests exercise model selection and yaw/pitch/roll through +the complete shared `HeadPose` conversion and recenter path. This fixes a model +coordinate mismatch; it does not claim to run a vendor sensor-calibration command +or save a RayNeo-style calibration for VITURE. All 188 glasses/shared-pose/ +SteamVR-launch/UI regression checks passed, packaged runtime inputs verified, +and the corrected build was installed on the phone. Visual verification is pending. diff --git a/docs/development/x86-64-steam-client.md b/docs/development/x86-64-steam-client.md new file mode 100644 index 0000000000..25e25a700c --- /dev/null +++ b/docs/development/x86-64-steam-client.md @@ -0,0 +1,451 @@ +# x86-64 Steam client + +Valve's x86-64 Linux Steam client, run unchanged under FEX beside the default arm64 client. It is +opt-in: Steam settings, **Steam client: x86-64** (`steamClientArch`, passed to the +session as `BL_STEAM_CLIENT_ARCH=x86_64`, applies from the next session), or the desktop menu entry +**Steam x86-64 (FEX, experimental)**. The Games tab lists the active client's games and tags its +header "x86-64" while that client's list is shown. This page records why each workaround exists and what was seen +on devices. The timeline is in `docs/progress-log.md`. + +**Why.** The arm64 Linux client never runs VAC: Left 4 Dead 2 and Team Fortress 2 are refused by +VAC-secured servers ("Connection Blocked ... VAC secured server") and no client log mentions VAC. VAC +modules are x86 code. Under FEX the x86-64 client has a module it can run, as SteamLite does in Wine. + +**Layout.** Everything lives in its own home, `$X64_HOME` (`BL_X64_HOME`, default `~/.droiddeck-x64`): +its own `~/.steam` links, config, libraries, x86 rootfs and log (`steam-x64.log`). Shared with the arm64 +client: the sign-in, and its `config/uioverrides` (Steam's startup movie overrides), which the x86 client +links. One client runs at a time, since both use the same account; the standalone launcher shuts the +arm64 client down first. + +| Command | Does | +| --- | --- | +| `droiddeck-steam-x64 [steam:// URL or client arguments]` | standalone run (the desktop menu entry) | +| `droiddeck-steam-x64 --prepare` | install and set up, then exit | +| `droiddeck-steam-x64 --exec ARGS...` | run the client binary in its environment (how the session starts it) | +| `droiddeck-steam-x64 --sync-login` | copy the newer sign-in to the other client | +| `droiddeck-steam-x64 --map-direct [--live]` | map Linux titles to DroidDeck direct | +| `droiddeck-steam-x64 --default-tool` | print the default ARM64 Proton wrapper's tool name | +| `droiddeck-steam-x64 --gpu` / `--webhelper-gpu` | exit status: client / x86 web helper on the GPU | + +## Client install and update + +- The first run downloads FEX (release `FEX_TAG` in Droid-Deck/DroidDeck-Components, sha256-pinned), FEX's Ubuntu 24.04 x86 + rootfs (about 525 MB, 1.5 GB unpacked, sha256-pinned; the same repository's copy of FEX-Emu's 2026-08-11 image) and the client (about 600 MB) from Valve's CDN, + part by part with sha256 checks. A part-done rootfs download resumes; a finished one answers 416, + which is not a failure. `unsquashfs -no-xattrs -ignore-errors`: ownership and xattrs mean nothing in + the guest, and device nodes cannot be made and are not needed (FEX passes `/dev` through). +- Channel `steamdeck_publicbeta`, the `-clientbeta` the session starts it with. `package/beta` must + match `-clientbeta` before every start, or the client loops on rc 42 (its restart request, which the + standalone launcher honours up to five times, as `steam.sh` does). +- Before each start `x64_sync_client` brings the client to Valve's current build, downloading only the + changed parts (9 of 28 on a device). If that fails, the client updates itself. +- `.steam-enable-steamrt64-client` in the client folder opts into the SteamRT3 build + (`steamrt64/steam`). Without it the client re-executes itself in the scout environment through + `steam.sh`, whose start-up checks need what proot cannot give; the session stalled before the + interface. The client is started directly, as the session starts `steamrtarm64/steam`: + `STEAM_RUNTIME=1`, its own `steamrt64` libraries first, and the `~/.steam` links `steam.sh` makes. +- **User namespaces.** Unlike the arm64 client, this one carries pressure-vessel and refuses to start + ("Steam now requires user namespaces") when `steam-runtime-check-requirements`' bwrap probe cannot + create a user namespace, which no Android app can. `STEAM_RUNTIME_STEAMRT` points at + `steamrt-shim`: Valve's runtime linked file by file with only the probe replaced (`exit 0`). proot + is the container, as for the arm64 client. +- **Re-exec after an update.** The client re-executes itself inside the SteamRT container through + `pressure-vessel-wrap` (bwrap). `STEAM_STEAMRT_RECURSION_GUARD=1` says it is already inside one; the + FEX rootfs with the client's `steamrt64` libraries is that container. +- **Starting games.** Believing itself inside the container, the client starts games and system + commands "alongside Steam" through `steam-runtime-launch-client`. Valve's asks a launcher service on + the session bus (there is none: the game ended at once), and with none on `PATH` the launch fails + (No such file). The shim's version applies `--directory`, `--env` and `--unset-env` and runs the + command. +- **Libraries.** The rootfs lacks what the SteamRT container gives the client (GTK 2 for + `steamui.so`, ...). Valve's steamrt3c platform libraries are linked into `steamrt-libs`; they ship + without soname links (pressure-vessel makes those when it builds the container), so the rootfs's + `ldconfig` adds them there. `LD_LIBRARY_PATH` beats the system folders whatever its order, so only + libraries the rootfs lacks are kept: the platform's older glibc must not shadow the rootfs's. +- **System V IPC.** Android kernels have none, and the client's tier0 gave up on start ("Function not + implemented" from `semget`; traced with a `-DDEBUG_STRACE` FEX). The session shim (`preload/*.c`) is + also built for x86-64 and i386 and preloaded through the rootfs's own `/etc/ld.so.preload`, one copy + per architecture under the multiarch folder named through glibc's `$LIB`. Without a list in the + rootfs, FEX falls through to the guest's, which names the session's arm64 preloads. +- **Tracer.** proot is a tracer, so tier0 believes a debugger is attached and breaks into it with int3 + on the first failed assertion: the web helper died of SIGTRAP a second after every start. + `preload/tracer.c` exempts web helpers on purpose (Chromium traps on a status fd that is not + procfs); with `BL_WEBHELPER_HIDE_TRACER=1` only opens called from `libtier0_s.so` get the copy + without the tracer. +- **FEXServer owns the rootfs.** A FEX process takes its rootfs from FEXServer, and a server started + earlier without `FEX_ROOTFS` (any FEX run in the guest) serves none: every x86 library lookup fell + through to the arm64 guest. It is stopped while no x86 client runs. +- **`/dev/dri`.** x86 programs enumerated `/dev/dri`, found the session's KGSL node and spun on it (x86 + Turnip "failed to query kernel driver version", KMS dumb-buffer ioctls in a loop); the web helper + never got a browser up. FEX looks in the rootfs first, so an empty `rootfs/dev/dri` hides the node. +- **Scout runtime.** Valve ships it as `ubuntu12_32/steam-runtime.tar.xz` and `steam.sh` unpacks it. + Since `steam.sh` is not used, `--prepare` unpacks it when its checksum changes. +- **Repair.** Repair Steam (`BL_X64_REPAIR=1`), or two starts in a row that never showed the client + (`package/droiddeck-unconfirmed`; the app clears the count once the client is on screen), removes + the install stamp so the client is reinstalled. Counts from before this was tracked are dropped + rather than taken as failed starts. `droiddeck-steam-install` removes the repair request when it is + done, so the session reads it first and both clients are repaired. +- **Stale state.** A killed client leaves `.crash`, which opens the update UI on its spinner, and + `htmlcache/Singleton*` locks, which can leave the UI blank. Both are removed while no client runs. +- **Network.** The client's connection header and Settings > Internet come from NetworkManager on the + system bus; without it the client shows no connection while downloads run. The standalone launcher + starts the session's system bus configuration and the `droiddeck-netmanager` stand-in when no + system bus is up (a desktop has none). +- **FEX settings.** The app's PERFORMANCE_TSO preset (`core/FexPreset.kt`, WinNative's default). FEX's + own defaults keep half-barrier TSO and full-precision x87, which cost every x86 program time. Values + already in the environment win. +- **Fast path.** libblfastpath, preloaded into every guest process and so into FEX, broke FEX's 32-bit + mode (SIGILL at start). It stands down when FEX is about to run a 32-bit program; 64-bit programs + keep it. `BL_X64_FP_OFF=1` turns it off for everything. +- **Diagnostics.** `BL_FEX` runs another FEX build (a `DEBUG_STRACE` one, say). `BL_FEXSERVER_LOG` + starts a FEXServer in the foreground logging there; every FEX process that logs to "server" + (`FEX_OUTPUTLOG` or an AppConfig) then has its lines tagged with its pid (file logs overwrite each + other). + +## Web helper on the GPU, QAM/WSI and flicker + +The client's web helper draws its whole UI. There are two: + +- **The arm64 client's helper** (`droiddeck-x64-arm-webhelper`), used when both clients are the same + Steam build (unless `BL_X64_X86_WEBHELPER=1`). FEX hands the arm64 program to the CPU, so it runs + natively with the session's preloads (KGSL poll fix, fast path) and the arm64 session's GPU + settings. It talks to the client over IPC, and a helper of another build never comes up: the client + restarted it every 10 s (device: 1790721607 against 1790904859). The session therefore updates the + arm64 client's parts on the same channel first (`droiddeck-steam-install --sync + steamdeck_publicbeta`). With this helper the client itself gets the GPU: it shows every Big Picture + frame the helper draws, and in software (llvmpipe under FEX) that held the UI at about 20 fps + (`BL_X64_CLIENT_SOFTWARE=1` keeps it in software). Device: 144 fps menus. +- **The client's own x86 helper on the GPU** (`droiddeck-x64-webhelper`), otherwise: ANGLE's GL + backend through FEX's GL thunk to zink and Turnip. On ANGLE's Vulkan backend the x86 compositor + thread was the bottleneck (16 fps against 60). Never `--in-process-gpu`, the preload's default: a + GPU crash there took the whole helper down (102 restarts). `BL_X64_CEF_GPU=0` keeps it in software. + +The session shim (`preload/net.c`) turns `steamrt64/steamwebhelper.sh`'s exec of `./steamwebhelper` +into `BL_X64_ARM_WEBHELPER`. Nothing in the client's folder is edited: the client checksums its files +as it starts and reinstalled itself over an edited launcher (2-3 minutes) on every start. + +Quick Access Menu and flicker, x86 helper: + +- Steam's compositor in the helper draws each browser window (main UI, QAM) from that window's X + pixmap. gamescope's WSI layer took the helper's zink swapchains and sent the frames to gamescope + instead: the QAM opened blank until a d-pad press and the screen behind it went black. The helper + runs with `DISABLE_GAMESCOPE_WSI=1`; games keep the layer. Not FEX: a texture-from-pixmap test + behaved the same under FEX and natively. +- gamescope sets `vk_xwayland_wait_ready=false` for its children because its layer does the waiting. + Without the layer, unfinished frames reached the compositor as black flashes (3 in 10 QAM opens, + screen-recorded and counted frame by frame). The helper sets `vk_xwayland_wait_ready=true`. +- zink's kopper swapchain still flashed on about 1 in 20 opens with the wait. With + `LIBGL_KOPPER_DISABLE=true` none did in 60 opens, at 60 fps instead of about 140 (Xwayland's + per-window timing for child windows). No flashes was chosen over frame rate. + +Software path (no host thunks, or `BL_X64_SOFTWARE=1`): x86 Mesa has no driver for this GPU, so +llvmpipe for GL (the client's own window needs GLX) and the rootfs's own Vulkan ICDs (lavapipe). GLX +first failed because the desktop exports zink over the arm64 Turnip ICD; those variables are cleared. +`LIBGL_DRI3_DISABLE=1`: over DRI3 the X server hands out the GPU node and Mesa's software path then +tries KMS dumb buffers on it in a loop. + +Decky's loader talks to the client's CEF debugging port. Its marker +(`.cef-enable-remote-debugging`) is kept in both clients' roots, because the session reads it from the +client it runs. The app creates it in the x86-64 root only once that client is installed: the folder +alone would then read as an installed client. + +## FEX build and patches + +- `tools/fex/build-in-arch.sh` runs in an Arch Linux ARM container (`menci/archlinuxarm:base-devel`) + on an arm64 runner: Arch Linux ARM has no FEX package and FEX publishes no Linux binaries. It packs + FEX and the runtime's own `unsquashfs` as `fex.tzst` (`usr/local/...`), with `fex-needed.txt` (every + needed soname must resolve in a stock guest) and `fex-files.txt`. `TUNE_CPU=none`: the default + (native) would tune for the runner's Neoverse cores, not the device. +- **Host thunks** (`FEX_THUNKS=1`): an x86 program's libvulkan, libGL, libX11, ... calls go to the + runtime's arm64 libraries (Turnip, Mesa). The host half needs the graphics development packages. The + guest half is cross-compiled with clang against an x86 sysroot of Arch x86_64 and multilib i686 + packages, unpacked by pacman into their own root and never run (no scriptlets, no signature checks). + FEX's x86 toolchain files assume an x86 build machine, so on arm64 the sysroot also supplies headers, + C runtime objects and libgcc. +- **Stack protector.** Arch's clang builds the guest thunks with stack protection. The canary load in + `CallHostFunction`'s prologue (`mov %fs:0x28, %r11`) overwrote r11, which carries the host function's + address, and FEX called the canary. 9 of 521 Vulkan and 66 of 736 GL host calls (those with 7 or + more arguments) were affected, `vkCmdBindDescriptorSets` from TF2's DXVK among them; 32-bit games pass + the host address in mm0. The toolchain files add `-fno-stack-protector` (`fex-2610-r2`). +- **`vkGetDeviceProcAddr`.** FEX-2609's guest version passed a lookup of `vkGetDeviceProcAddr` itself + to the host and handed back the raw host function, so every pointer fetched through it was unlinked. + TF2's native DXVK (2.3) makes that lookup. FEX-2610 answers self-lookups in the guest (FEX-Emu/FEX + 3397eb9b). +- Patches in `tools/fex/patches`: + - `0001-openat2-enosys-fallback`: our proot answers `openat2` with ENOSYS (`tools/proot/PATCHES.md`, + 0008). FEX opened every rootfs path with `openat2(RESOLVE_IN_ROOT)` and fell through to the arm64 + guest on anything but EXDEV; x86 bash could not find libtinfo. Since r4 the fallback resolves the + path inside the rootfs itself (absolute symlinks restart at the rootfs, as `RESOLVE_IN_ROOT` does); + before, they resolved against the arm64 guest. `libblsession.so` (`preload/robust.c`) answers + `openat2` first in practice and does the same walk for `RESOLVE_IN_ROOT` callers, so Valve's FEX-Emu + on the arm64 client gets it too. Each path component is then its own system call. + - `0002-thunkgen-newer-clang`: the container's newer clang has no `FileManager::clearStatCache()`, + which the thunk generator called after each run. + - `0003-allocator32-map32bit-exhaustion`: Counter-Strike 2 reserves the low 2 GB with `MAP_32BIT` + in shrinking sizes. FEX's `MemAllocator32Bit` met EEXIST, stepped down one page per retry and + restarted from the top forever (found with `perf_event_open` IP sampling, since proot holds + ptrace). Such a range is now skipped whole and a second exhausted scan returns `-ENOMEM`, as the + kernel does (`fex-2610-r3`). +- **Building and publishing.** Droid-Deck/DroidDeck-Components' `build-fex.yml` builds `tools/fex` from + this repository at a chosen ref (default `main`) with host thunks, in the same Arch Linux ARM container + with a read-only token, then a separate job replaces `fex.tzst` on Components' single `fex` release, + checks the digest GitHub stored, and records the build's version, sha256 and size in its `fex.json` + (in that order: a device that reads the old `fex.json` meanwhile gets a mismatching archive and keeps + its FEX). This repository's `build-fex.yml` only builds `tools/fex` when it changes (and on dispatch, + for diagnostic builds such as `-DDEBUG_STRACE`); nothing is published from it. +- Releases so far: `fex-2609-r2` (no thunks), `fex-2609-r3` (thunks), `fex-2610-r1`, `fex-2610-r2`, + `fex-2610-r3`, `fex-2610-r4` (in-root resolution when openat2 is missing, exact MAP_32BIT + marking), `fex-2610-r5` (current: bundles libxxhash, which the Linux runtime does not ship; the + build fails when a program in the package needs a library that is neither bundled nor listed in + `tools/fex/runtime-libs.txt`). They were built and published in The412Banner/DroidDeck; up to r3 their tags point at that + repository's `main`, from r4 at the commit each was built from. Later builds are versions on the single + `fex` release; `fex-2610-r5` stays published as the build `droiddeck-steam-x64` pins. +- **Where the app gets it.** The app downloads FEX from Droid-Deck/DroidDeck-Components, where nothing is + uploaded by hand. The app follows its `fex.json`: while the x86-64 client is selected it reads it from + Components' `main` (directly, at most every ten minutes) and keeps the last copy, and a session passes + that build to `droiddeck-steam-x64` (`BL_FEX_TAG`, `BL_FEX_SHA256`, `BL_FEX_URLS` with the download + source's mirrors). The script installs a build only after its archive matches the sha256 and every + program in it loads (`ld-linux --list`); the files it replaces are kept aside until the installed copy + loads too and put back otherwise, and the tag is written last. Otherwise it keeps the installed one while that still loads, + then falls back to `FEX_TAG`/`FEX_SHA256` built in, which stay the first-start default when no copy + of `fex.json` has been read. Publishing a FEX build therefore takes a Components run only; a + replaced archive cannot be pointed back to, so undoing a build means building an earlier ref. The rootfs is + FEX-Emu's own image, unmodified: `fex-rootfs.json` there names its rootfs.fex-emu.gg link, sha256 and + size, and `mirror-upstream.yml` fetches it into the catalog's release only when both match. A newer + image is a new catalog release; `ROOTFS_URL` and `ROOTFS_SHA256` then move to it, and a device that + already unpacked one keeps it. + +- **What a session log shows.** `FEX ready (<tag>, <source>)` names the build and where it came from + (`catalog`, `built-in`, or `kept` when a newer one did not install, with the reason a line above); + `x86-64 rootfs:` names the image; `x86-64 client:` the client's ubuntu12 and steamrt64 builds at start + (it may update itself after). The rootfs download reports every tenth of its size as a step. When the + web helper's GPU process keeps exiting until Chromium gives up on the GPU (the menus then never appear), + one line says so with the exit codes, followed by x86 `glxinfo -B` and `vulkaninfo --summary` through + FEX's thunks. + +## DroidDeck direct for Linux games and runtimes + +- Steam runs native Linux games in the Steam Linux Runtime container (pressure-vessel), which needs + bwrap and user namespaces. **DroidDeck direct** (`compatibilitytools.d/droiddeck-direct`, linux to + linux) runs them under FEX with no container. Scout titles run through Valve's scout library runtime + (`ubuntu12_32/steam-runtime/run.sh`). Titles Valve gives a newer runtime (sniper, soldier; listed in + `direct-sniper`) are built for newer libraries than scout's and run on the rootfs (Ubuntu 24.04) as + it is. +- **Mapping** (`x64_map_direct`): every game the client's appinfo cache shows with a Linux build (type + game, oslist with linux; runtime from `config/app_mappings`: SteamLinuxRuntime_sniper or _soldier, + none means scout), installed or not, so Steam downloads the Linux depots. A title on a tool chosen in + Properties keeps it, except `BL_X64_DIRECT_APPS` (Left 4 Dead 2, 550, by default), which is always + taken back. `direct-auto.json` lists what was mapped. One pass over the mapping: a 2000-title fixture + went from 16.5 s to 0.2 s with the same output. +- A game whose Windows build is installed (it ran on a Proton before) stays a Windows game on the + default Proton. Steam does not swap an installed build when the tool changes: DroidDeck direct was + handed `Launcher.exe` and the game ended at once (Borderlands 2), and getting the Linux build back + means downloading the game again. +- The client rewrites `config.vdf` from memory as it exits, so the mapping is written only while no + x86 client runs: by `--prepare`, and by the session after each exit, when the appinfo cache also + knows titles bought during the run. `--live` (the session's pass while the client runs) writes + nothing; installed Linux titles it would map go to the session's pending list. +- A new user's client has no `config.vdf` before its first start, so Steam Play's default and the + Linux titles would wait a session. `--prepare` writes the `CompatToolMapping` block alone, which the + client keeps. +- **Sniper check.** `tf.sh` reads `VERSION_CODENAME` from `/etc/os-release` and stops unless it is + `sniper`. For `direct-sniper` titles the run script runs such a script through `bash -c` with that + line replaced by `VERSION_CODENAME=sniper`. +- **HarfBuzz.** The rootfs's HarfBuzz needs a newer FreeType than a game may bring. Counter-Strike 2 + ships an older `libfreetype.so.6` and no HarfBuzz: its menu text library failed to load, the game + flagged its files corrupt (a verify each start) and waited behind an error box that could not open. + Newer-runtime titles get Valve's runtime HarfBuzz (2.7) preloaded from `sniper-compat`, as they would + in its container. +- **GPU.** Games get FEX's host thunks and the session's GPU settings (Turnip, Zink), saved by the + launcher as `game-gpu.env` and rewritten whenever it runs; `game-gpu.local` is the user's, never + rewritten, and is read after it. `BL_X64_GAME_SOFTWARE=1` keeps a game in software, with + `mesa_glthread=false` (GL threading is no help with software GL under FEX). +- Source games (`hl2.sh`, `hl2_linux`, `srcds`) get `-condebug` for the VAC diagnostics. +- **Controllers.** `libfakeinput` is built for x86-64 and preloaded in the rootfs; Big Picture works + with it. The 32-bit copy crashed Left 4 Dead 2: its fake devices reach the game's own SDL2 through + udev with a missing attribute and SDL `strdup()`s the NULL (fault backtrace: strlen in libc <- `__strdup` + <- libSDL2 <- `udev_device_get_sysattr_value`). 32-bit programs get only the session shim. The + preload line names the x86_64 copy by full path, since with `$LIB` FEX falls through to the + session's own `/usr/local/lib/i386-linux-gnu` copy. +- Device: TF2 main menu at 358 fps on the GPU and about 84 fps in a match; Half-Life (32-bit) at + 101 fps; Left 4 Dead 2 at 51 fps (about 11 in software). +- The arm64 client's route to x86 Linux titles, `droiddeck-fex`, is not wrapped for this client. Its + wrapper ran when the client probed its tools after logon; the arm64 client took that for an x86 + program wanting FEX and installed Valve's FEX. +- `droiddeck-fex` itself (arm64 client): Valve's FEX-Emu keeps its server socket in + `$STEAM_COMPAT_DATA_PATH/fex-emu/Server` whatever `FEX_APP_DATA_LOCATION` or `FEX_SERVERSOCKETPATH` + say. Under the app's data folder that path passed the 108 bytes a socket path may have (Half-Life: + 136), FEXServer never listened and the game ended at once. FEX's data folder in the runtime directory + is short enough; the one under HOME is not, so `/tmp/fex` stands in for it. + +## Libraries, SD card and sharing between clients + +- **Separate libraries.** With folders shared, each client could update, verify or switch the + other's games. A title with a Linux build runs as that in the x86 client and as the Windows build in + the arm64 one, so opening it in the other client switched the files and the first client downloaded + its version again (Left 4 Dead 2, 8.6 GB). Hard links do not help: switching platform makes Steam + download depot 551 anyway. A game wanted in both clients is installed in both. Folders an earlier + version shared are taken out of the x86 client's lists (written only while no x86 client runs); the + games stay in the arm64 library. +- **SD card.** The x86 client's card library is a folder inside the arm64 one (`/mnt/droiddeck-sd/x86-64`, + `GameStorage.X64_CARD_DIR`, passed as `BL_X64_STEAM_LIBRARIES`), so the install dialog offers Internal + Storage and SD card. compatdata, shadercache and runtime tools stay private, as in the arm64 card + library. FEX runs x86 programs from the noexec exFAT card. The folder appears with the client's first + session on the card and its `steamapps` with the first library write. Desktop sessions prepare it as + well: desktop mode offers the x86 client whichever is selected, and `droiddeck-steam-x64` drops + library folders it is not given. The arm64 card library may hold the arm64 copy of the same title, + so the session's installed check looks only in the x86 card folder. +- **Card downloads.** `storage.c` (no zero-filled reservation where `fallocate` is refused) and + `dircache.c` recognised only `steamrtarm64/steam`, and the x86 client wrote each download in full as + zeros first (Audiosurf: 415 MB written, 0 downloaded). After the fix: FlatOut, 1.19 GB, to the card + in 51 s. +- **Sign-in.** Before either client starts, the newer sign-in (`config/loginusers.vdf`, the login token + in `local.vdf`, `AutoLoginUser` and `RememberPassword` in `registry.vdf`) is copied to the other, so + signing in or switching accounts in one counts for both. Steam renews its token every few days and + refuses an old copy (a 3-day-old one asked for the password), so the newest is copied at every start, + never while either client runs, since each rewrites these files. A client that refused its token + rewrites `local.vdf` with an empty `ConnectCache`: newest, but copied over the other it would sign + that one out too (seen after the x86 client's "Invalid Password"), so it is never the source. The copy keeps + the time stamp, so both match until one client signs in again. The rest of `registry.vdf` + (language, skin) stays each client's. +- **App side.** The library, art picker, grid sync and boot movie follow the running client, else the + selected one; a changed client applies from the next session. Offline Mode is written to both + clients' `loginusers.vdf`; until the x86 client's first start its sign-in is the arm64 one. The log + redactor learns account names from both clients. The startup movie is staged into the x86 client's + config only once its first start has created it; `--prepare` links the arm64 `config/uioverrides` + and copies the `StartupMovie` choice. +- **Storage page.** It lists both clients' games, the x86 ones labelled; a game can be installed in + both and an id left over in several libraries. `steam://uninstall` reaches only the session's client, + so the other client's copy is uninstalled after switching clients. Tools in the x86 client's + libraries are shown as required (it runs its Linux games with Valve's runtimes). Proton tool files + live only in the arm64 root; the x86 client has wrappers. An x86 client without `config.vdf` has + never mapped a game. + +## Proton for Windows titles in the x86 client + +- Windows games run on the arm64 client's Protons; x86 Proton would need pressure-vessel. For each + arm64 client tool (droiddeck-proton-arm64, DroidDeck-Proton, GE-Proton, CachyOS) `--prepare` makes a + wrapper in the x86 client's `compatibilitytools.d` with the same folder and display name: Components + swaps and per-title mappings are keyed by them. In the tool name `arm64` and `aarch64` become `a64`, + because the x86 client ignores a tool named for arm64 ("for a different target platform linux + arm64"). The session runs `--prepare` again after it installs a new Proton. +- The wrapper is an x86 script under FEX. It starts `droiddeck-x64-arm-proton` through an arm64 binary + (a copy of `/usr/bin/env`), which FEX hands straight to the CPU, so Wine and the game run as from the + arm64 client: same Proton, launcher, Components swaps, per-game environment and Steam client library + (`~/.steam/sdk64`). +- `droiddeck-x64-arm-proton` drops FEX's settings and the x86 library paths and preloads, then restores + the arm64 session's environment that `droiddeck-steam-x64` saved before it built the x86 one + (`arm-session.env`: HOME, PATH, GPU, audio, input, fast path). Steam's per-game variables are not in + it. It keeps the game display Steam chose: the saved `DISPLAY=:0` hid the game window and made + DiRT Showdown exit after about 7 s. Proton takes its Steam client parts from the client's install + folder, and the x86 client's are x86, so `STEAM_COMPAT_CLIENT_INSTALL_PATH` points at the arm64 root + and `BL_X64_STEAM_ROOT` keeps the x86 one for install-script lookups. +- **Game overlay.** The x86 client preloads its own x86 overlay; the arm64 one takes its place. The + overlay marks the game's windows with the Steam app ID, and without it gamescope never shows them + (FlatOut ran and played sound behind Steam's launch screen, "steam app id: 0"). The agent also tags + untagged `steam_app_<id>` windows with `STEAM_GAME` on the game display when the x86 client runs + (DiRT 3, an added game, then reached its title screen at 144 fps). +- The x86 client's tools are not adopted as arm64 Protons: `adopt_extras` on its + `compatibilitytools.d` rewrote DroidDeck direct as a Windows tool, and Steam installed Half-Life's + Windows files. The arm64 Proton is adopted on demand at an x86 launch. +- **Default.** The newest DroidDeck-Proton, then the newest GE-Proton (aarch64), else + `droiddeck-proton-a64`. FlatOut from the card ran on DroidDeck-Proton 11-9.1 and exited on + GE-Proton11-7 (no log). With droiddeck-proton-arm64 (Proton Experimental) Xwayland never got its + window buffers back and FlatOut took the device's RAM with it (10.5 GB of dma-buf in 35 s); + GE-Proton, same game and client, stayed flat. The session asks for GE-Proton when none is installed. + `default-tool` records the default the script set; when it changes, the titles still on the old one + move along (device: 113 titles off GE-Proton11-7). A default or title the user set to another tool + keeps it. Before `default-tool` existed, the default the script set was an `-a64` wrapper at + priority 75. +- `steam-compatibility --x64` repoints entries the client aimed at a Proton it cannot start (Valve's + `proton_*` names, and `droiddeck-proton-arm64` left by an arm64 compat pass) to the default wrapper. + Tools in its own `compatibilitytools.d` are kept: the wrappers include `proton-cachyos-*-a64`, which + starts with "proton" like Valve's. +- **Added games** are written by the client the session runs and pointed at its default wrapper. The + shortcuts pass keeps the x86 client's own default and state (`droiddeck-compat` beside its Steam + folder), because the arm64 client's `state.json` lists which of that client's titles follow its + default. +- **Install scripts.** A game's own installers without a `HasRunKey` (Borderlands 2: VC++ 2005, 2008 + and 2010, DirectX, .NET 4.0) are marked under `Software\Valve\Steam\Apps\<appid>` (and the + Wow6432Node view), so Steam skips them; this applies to both clients. Windows components install into + the x86 client's prefix (DiRT Showdown and DiRT 3 needed OpenAL). + +## VAC findings + +- x86-64 client with Linux builds: secure. Left 4 Dead 2 joined a live Quick Match game, the server + type that refuses the arm64 client; on the GPU an online server answered the A2S info query as + "Valve Left4Dead 2 US East Server", VAC=1. TF2 Casual matchmaking put it on a VAC-secured Valve + server. Half-Life's native build joined a VAC-secured server. +- x86-64 client with a Windows build (TF2 on DroidDeck-Proton): insecure. Proton reaches Steam through + the arm64 client's `steamclient.so`. +- arm64 client: Left 4 Dead 2 was blocked on both Protons; Half-Life (Windows build) joined a vac=1 + GoldSrc server. Why the arm64 client fails is not established; it has no VAC module of its own to run. +- Headless VAC testing is not possible: current Steam starts the saved login from its UI. +- **VAC diagnostics** (Setup page). A Source game decides secure or insecure once, as it starts, and + says so only in its own console ("You are in insecure mode. You must restart before you can connect + to secure servers."). That console reaches a file only with `-condebug`: `<game>/<mod>/console.log`, + or `<game>/game/<mod>/console.log` for Source 2. At session start the app writes + `~/.droiddeck-vac-diagnostics` (start time, client, each console.log's length, since `-condebug` + appends). The launch wrapper (`bl_vacdiag`) then adds `-condebug` to Source titles (found by + `gameinfo.txt` or `gameinfo.gi`), flags `-insecure` in launch options and notes each launch. At the + end the session copies what each console.log gained into `vac/`, scrubbed, and writes `vac.txt`: the + game's secure/insecure lines, VAC lines in the client's logs, and which client files are present. A + stopped session keeps its own copy of the marker and launch list; a new session waits for earlier + collections, because it replaces the marker and Steam's logs. +- "Connecting to" is only an attempt. L4D2 logs it, retries, and then refuses a VAC server with a + dialog ("Connection Blocked: Please remove plug-ins before attempting to connect to a VAC secured + server") that never reaches the console. Only "Connected to" means the game got in. +- SteamLite's "INSECURE - VAC may kick" warning was our own parser reading the wrong log while the + client was secure all along. `vac.txt` therefore quotes the lines it found and says "inconclusive" + when the game never reached a server. + +## Session integration, restarts and mapping + +- With `BL_STEAM_CLIENT_ARCH=x86_64`, `droiddeck-session` updates the arm64 client's parts + (`droiddeck-steam-install`, then `--sync steamdeck_publicbeta`), runs `droiddeck-steam-x64 --prepare` + and starts the client with `droiddeck-steam-x64 --exec`. Steps only for the arm64 client (library + registration, the ARM64 Proton fetch, the live compat helper) are skipped; added games, + `steam-compatibility --x64`, UI scale and redistributables run for the x86 client. +- **Deck mode.** With `-steamos3` the client's SteamOS audio manager passed libpulse the NULL + operation of a failed request, and libpulse aborted the client right after start ("Assertion 'o' + failed at ../src/pulse/operation.c:136 pa_operation_get_state()", the runtime's PulseAudio 13). + `preload/pulseguard.c` (x86 builds only; the arm64 client does not hit it) answers a missing operation + as cancelled and ignores its unref and cancel. The session passes `-steamdeck -steamos3` unless + `BL_X64_DECK=0`. Switch to Desktop is expected to need no change (an x86 shell under FEX runs + `steamos-session-select`); the full switch has not been tested on a device. +- **Process names.** Under FEX a process's argv[0] is FEX and the program is its first argument. The + session's game detection, CPU pinning and the zRAM watcher read that argument. Steam pins itself and + its web helper to a few cores, so the session's CPU set is applied again every 5 s. +- **Live mapping and restarts.** While the client runs, the session's background loop runs + `steam-compatibility --x64 --live` and `droiddeck-steam-x64 --map-direct --live`, every 15 s and + only in the session's first hour (720 beats of 5 s). A title installed after that is mapped when the + client exits and takes effect from the next session. Steam reads a + mapping changed while it runs only at its next start, so changed titles go to `.bl-compat-pending`. + Once they have installed (`StateFlags` 4 in the client's root or its card folder) and no game runs, + the client is restarted once per title, at most 3 times a session. +- **After exit.** Added games, `steam-compatibility --x64` and `--map-direct` run again: the client + wrote its mapping from memory as it exited, over what the live passes set. +- The Lossless Scaling ownership probe and the Steam import watcher reach the x86 client through the + arm64 client's `steamclient.so` (`BL_STEAMCLIENT`); the watcher restarts the client with + `droiddeck-steam-x64 --exec -shutdown`. +- Steam logs and the Steam language come from the x86 client's home. On the desktop, `steam` and + `steamdeck-steam` start the selected client, and the desktop game entries list its libraries. +- The standalone launcher (desktop menu) shuts the arm64 client down first, starts the system bus and + the NetworkManager stand-in when missing, clears stale locks, pins CPUs and restarts the client on + rc 42. + +## Known limits + +- Experimental and opt-in; one client runs at a time. +- Windows titles in the x86 client are not VAC-secure: Proton reaches Steam through the arm64 + `steamclient.so`. +- 32-bit games get no controller reader (the i386 `libfakeinput` is left out). +- 32-bit Linux titles through the arm64 client's `droiddeck-fex` still fail (not pursued). +- The x86 web helper's menus run at 60 fps without kopper. +- Counter-Strike 2 reaches its menu (and loaded Dust II at 78 fps), then Android's `lmkd` kills + DroidDeck. The game's GPU memory is pinned: KGSL `page_alloc` followed Shmem through the load, to + about 3.2 GB at the kill, with Unevictable just above it. This device's `lmkd` runs in minfree mode, + which does not count swap, while MemAvailable counted that memory as available. Paging the game out + with a root tool (`process_madvise(MADV_PAGEOUT)`) let it draw its menu, but `lmkd` still killed the + session. Not solved. +- Sharing libraries between the clients is parked. diff --git a/docs/development/xreal-investigation.md b/docs/development/xreal-investigation.md new file mode 100644 index 0000000000..bcad031461 --- /dev/null +++ b/docs/development/xreal-investigation.md @@ -0,0 +1,242 @@ +# XREAL 1S / One Pro feasibility — 2026-10-14 + +The user owns XREAL 1S and also wants One Pro support. Supporting these in DroidDeck +is feasible based on existing open drivers, but the supplied Monado Air driver is +not their transport. The initial investigation below preceded implementation. +An experimental native 1S driver is now enabled; see the hardware validation +section at the end for what has actually been verified. + +## Supplied Monado source + +Inspected `C:/Users/conno/Downloads/monado-main/monado-main/src/xrt/drivers/xreal_air/` +and `src/xrt/targets/common/target_builder_xreal_air.c`. + +| Model | USB vendor:product | Sensor/control interface | Sensor report | +| --- | --- | --- | --- | +| Air | 3318:0424 | 3 / 4 | 64 bytes | +| Air 2 | 3318:0428 | 3 / 4 | 64 bytes | +| Air 2 Pro | 3318:0432 | 3 / 4 | 64 bytes | +| Air 2 Ultra | 3318:0426 | 2 / 0 | 512 bytes | + +This driver implements HID IMU input, segmented factory-calibration JSON reads, +gravity/gyro fusion, brightness 0–7 and 2D/3D mode commands. It does not register +1S or One Pro. Copying those Air HID commands to the new products is unjustified. +Its source carries Tobias Frisch's BSL-1.0 notice. + +## Applicable One-family references + +* [XRLinuxDriver](https://github.com/wheaney/XRLinuxDriver), inspected commit + `36e2139dd482f5984112d0c3ebafcc07a78f99c0`. `src/devices/xreal.c` lists vendor + `3318`, One Pro products `0435/0436`, and 1S products `043d/043e`. These use the + non-HID transport. Its README explicitly lists both models and requires current + firmware with glasses stabilization/anchor disabled when using external tracking. +* [xrealOneDeviceKit](https://github.com/wheaney/xrealOneDeviceKit), inspected commit + `f5833f611265f418b1ea549da20dc4764d86a4ec`. Its IMU adapter consumes the One TCP + driver, interprets gyro as radians/sec and acceleration as m/s², then feeds fusion. + Its factory-calibration JSON hook returns unsupported. The maintained Linux + integration disables its SBS-control capability when no MCU connection is open; + a static model table alone is not proof of working display switching. +* [xreal_one_driver](https://github.com/rohitsangwan01/xreal_one_driver), MIT, + inspected commit `3e912315ec16e94e9a47688770d649cfef293624`. Opens TCP + `169.254.2.1:52998` with a two-second timeout, assembles 84-byte IMU records, + reads a timestamp at byte 14, gyro floats at 34 and acceleration floats at 46. + This is a transport/parser reference, not a drop-in Android glasses controller. + +The source check confirms a practical path for both requested models. It does not +establish that this Samsung phone exposes the glasses' USB Ethernet interface to +ordinary Android apps, or establish the physical tracking axes on this hardware. + +## DroidDeck integration path + +1. Attach the 1S and inspect its USB descriptors, presentation display identity, + Ethernet network/link properties and whether the IMU endpoint is reachable. + Obtain the same evidence for One Pro before claiming hardware validation. +2. Add exact model discovery and external-display selection. Preserve each panel's + Android-advertised dimensions and modes; do not assume the Air's resolution. +3. Implement a bounded One-family stream parser and cancellable socket transport. + On Android, bind the socket to the relevant Ethernet `Network` when available, + leaving Steam's Internet route alone. If Android does not expose that link, + a USB network transport is additional work; no root requirement is assumed. +4. Establish gyro units, timestamp deltas and axis mapping using stationary, + directed yaw, pitch and roll captures. Route the validated fused pose through + the same glasses/HeadTracker/SteamVR pipeline as VITURE and RayNeo. Avoid layering + DroidDeck tracking on top of the glasses' own anchor/stabilization. +5. Gate brightness and automatic stereo switching separately on a verified control + protocol. IMU streaming alone does not justify showing those controls as working. +6. Test malformed/fragmented/coalesced records, missing network, timeout/reconnect, + USB detach, screen handoff, SteamVR launch and each physical movement direction. + +At this initial investigation stage, no external SDK was installed, firmware was +modified, or XREAL commands were sent. + +## Further source investigation while the phone charges + +Inspected [xr-tools](https://github.com/0xcaff/xr-tools), commit +`65c11105434a998f09ac4a5f8e4de8736bb4d36c`, particularly +`packages/xreal_one_driver/src/proto/net/`, `src/proto/usb/mod.rs`, and the IMU +example. This describes considerably more of the One protocol than the simple +TCP IMU reader above: + +* Reports use TCP `169.254.2.1:52998`; controls use `169.254.2.1:52999`. + Both have a two-byte message identifier followed by a four-byte **big-endian** + body length. Control messages additionally contain a big-endian transaction ID + and protobuf payload. A port must bound lengths, use unique transaction IDs, + enforce deadlines, and close both sockets on detach. +* Sensor messages `28 36` have a **128-byte body**, hence 134 bytes including the + header. The older reader's 84-byte extraction is not the complete frame format. + Body offsets: device ID 0, device timestamp 8, report type 24, gyro 28, + acceleration 40, magnetometer 52, temperature 64 and IMU ID 68. Numeric sensor + fields are little-endian; timestamp is documented as nanoseconds, gyro rad/s, + acceleration m/s². Type 11 is IMU; type 4 is magnetometer. Do not interpret every + report as gyro data or use arrival time as the device's integration interval. +* Control `27 1f` reads factory JSON: IMU bias, temperature-dependent gyro bias, + and display-to-IMU transforms. Its example subtracts the factory biases, fuses + gyro/acceleration and applies the display rotation. This is preferable to + guessing a fixed mounting angle, but the example's frame convention still + needs conversion and directed-motion verification in DroidDeck. +* `27 1c` sets brightness 0–9; `27 27` sets dimming; `28 22` selects regular/SBS + input; `27 5e/5f` reads/sets display configuration; `28 a6/a7` reads/sets EIS. + Documented display configurations are 1920×1080 at 60/90/120 Hz and 3840×1080 + at 60 Hz. These are evidence for One/One Pro, not confirmed 1S modes. Preserve + the Android-advertised modes and verify controls separately on 1S firmware. +* `28 29` is labelled buttons-enabled/buttons-disabled scene mode. Do not assume + that command disables stabilization; the separate EIS control exists. +* This project's USB detection labels `3318:0436` One Pro and `3318:0438` One as + normal devices, and `0435/0437` as **recovery** devices. XRLinuxDriver accepting + both IDs does not justify opening recovery products as ordinary glasses or + sending firmware commands. xr-tools does not register 1S; its applicability + there is a protocol-family inference, not hardware validation. + +No license file or Cargo license declaration was found in this inspected xr-tools +revision. No implementation was copied into DroidDeck. Use protocol observations +for an independently written adapter, or resolve source licensing before a port. +The MIT TCP driver and GPL XRLinuxDriver remain explicitly licensed references. + +Also inspected XRLinuxDriver commit +[`05d0cfb`](https://github.com/wheaney/XRLinuxDriver/commit/05d0cfb86abaacbf073e1a285ad4eabf681ccb05). +It moves per-device pitch adjustment into the core pose path, after coordinate +conversion; it does not add an Android transport or new One control protocol. +Its pitch constants should not replace the GT mapping already verified by the user. + +Next hardware check remains read-only: enumerate the 1S USB interfaces, display +and Ethernet link; attempt bounded reads from both TCP services, save the factory +configuration, then capture stationary/yaw/pitch/roll data. No XREAL support is +advertised in this build. Android Ethernet availability and 1S control compatibility +are still unverified. + +## Official XREAL documentation and SDK inspection + +Checked the user's [official documentation](https://docs.xreal.com/) on +2026-10-14. This establishes an additional integration candidate alongside the +direct TCP driver; it does not make that candidate a drop-in Android controller. + +* The [device page](https://docs.xreal.com/XREALDevices/XREAL%20Glasses) explicitly + includes One, One Pro and 1S in the X1-based One family with rotational tracking. +* [SDK 3.1.0 release notes](https://docs.xreal.com/Release%20Note/XREAL%20SDK%203.1.0) + add positional tracking for the One series with XREAL Eye and updated firmware. + Beam Pro and Samsung S25 are its listed tested hosts. This does not establish + 6DoF on a camera-less 1S or validation on the user's SM-F976U. +* [ControlGlasses](https://docs.xreal.com/Tools/ControlGlasses) is a required server + for official SDK apps on compatible Android phones. It supplies device services, + 3D switching and dynamically loaded algorithm libraries. Beam Pro uses MyGlasses + instead. An SDK integration would have a companion-app/version dependency. +* The [quickstart](https://docs.xreal.com/Getting%20Started%20with%20XREAL%20SDK) + describes Unity XR Plugin integration, ARM64 and OpenGL ES3. The + [dual-display guide](https://docs.xreal.com/Tools/Dual%20Screen%20Display) + confirms separate phone/glasses views and continued glasses output while the + phone runs another app. This demonstrates the desired behavior in the SDK; + it does not itself supply a native Kotlin implementation. +* The [compatibility page](https://docs.xreal.com/XREALDevices/Compatibility) + currently flags unresolved Android 16 compatibility. The + [FAQ](https://docs.xreal.com/Frequently%20Asked%20Questions) also says DeX can + interfere with SDK display operation, and Android 16 USB permission may require + camera permission first when the device exposes an enabled UVC interface. Apply + that permission requirement only when relevant; ordinary tracking must not + start camera capture or enable UVC automatically. + +Downloaded, but did not install or bundle, the official release archive linked +from the 3.1.0 release notes: +`https://public-resource.xreal.com/download/XREALSDK_Release_3.1.0.20251125/com.xreal.xr.tar.gz`. +SHA-256: `fd7d0fce103712e7acc85bfcbb8b127007e1d84f64596efb6c11580bea058d90`. +Size: 248,169,074 bytes. + +Package inspection found Android AARs including `nr_api` and `nr_loader`, ARM64 +`libXREALXRPlugin.so` / `libXREALNativeSessionManager.so`, and Java +`com.xreal.sdk.display.GlassesDisplay` plus display/surface listeners. The C# layer +calls native exports for tracking type, resolution, refresh rate, component poses +and session lifecycle; the loader also integrates Unity subsystems. Presence of +these libraries does not establish a supported standalone JNI API or permission +to redistribute a stripped subset. No C headers were present in the archive file +listing inspected. No SDK source or binaries were added to the app. + +Decision: retain both candidates. Before choosing the official native-library +route, establish non-Unity initialization, head-pose access, ControlGlasses +compatibility, display-surface ownership and distribution terms. Before choosing +direct TCP, establish the Android network link and 1S protocol behavior. Compare +both against DroidDeck's existing compositor instead of replacing its rendering +architecture merely to fit the SDK's Unity sample. + +## Native 1S implementation and hardware validation + +The pre-implementation checkpoint is `4b045519`. The new driver uses independently +written Kotlin TCP framing, control transactions, sensor parsing and gyro/gravity +fusion. It does not bundle XREAL SDK binaries or copy the unlicensed xr-tools +source. Protocol observations came from the references above and +[xr-tools](https://github.com/0xcaff/xr-tools), inspected commit +`65c11105434a998f09ac4a5f8e4de8736bb4d36c`. + +Verified on the connected SM-F976U (Android reports release 17): + +* Normal 1S USB identity is `3318:043e`, product name `XREAL 1S`. Only that exact + product enables this driver; Air, One Pro and alternate/recovery IDs are excluded. +* Android exposes NCM/ECM Ethernet networks at `169.254.2.10/24` and + `169.254.1.10/24`. Individual sockets bound to the first network reach the + glasses at `169.254.2.1`, control port 52999 and report port 52998. The process + default network remains unchanged, preserving Steam's Internet connectivity. +* Requests require the high bit of the transaction ID; responses clear that bit. + Replies must match both command and transaction before values are published. +* GET_DISPLAY returned payload `22 02 10 1d`: mode **29**, with Android reporting + **1920 x 1200 at 60 Hz**. This differs from the older One's mode 2 (1080 lines). + The 1S default 60 Hz mapping preserves mode 29. +* A two-second capture delivered **2,000 valid IMU poses (1,000 Hz)**. Reports + use the 128-byte body, type 11, little-endian device nanoseconds and float + radians/sec / m/s² format. The framing handles partial and coalesced TCP reads. + +The driver plugs into the shared glasses display and head-pose paths, including +SteamVR. The FOV calculation now uses the actual per-eye aspect ratio, including +the 1S's 16:10 display. Controls use acknowledged commands, bounded queues and +timeouts; connection failures clear tracking state and retry. Volume is hidden +because no volume protocol has been established. Missing Ethernet is reported +without requesting HID permission or claiming USB interfaces from Android. + +Directed wearer captures on the same device established the 1S sensor basis: +level acceleration is approximately `(0, -9.65, -1.07)` m/s²; turning left gives +negative gyro Y; looking up gives positive gyro X; tilting toward the right +shoulder gives positive gyro Z with negative acceleration X. Both vectors are +mapped as `(x, -y, -z)` into the shared right/up/back basis before initial gravity +alignment and fusion. No RayNeo GT mounting angle is reused. Regression tests +exercise those measured signs through `HeadPose`, check an upright first pose +before recenter, and preserve the device's radians/sec and nanosecond units. + +Stereo switching was verified at 3840 x 1080 / 60 Hz, returning to native +1920 x 1200. On 1S, SET_INPUT performs the EDID switch itself; immediately sending +SET_DISPLAY returns busy status 5001 (`22 03 08 89 27`). The driver now polls +GET_DISPLAY across the temporary empty reply (`22 00`) and only sends a second +mode command if the settled mode differs. Hardware retesting kept the connection +and sensor stream running through the switch. The busy status is never accepted +as a successful acknowledgement. + +After installing the corrected build on 2026-10-14, the wearer confirmed that +the view and motion feel good in response to the upright-view, yaw, pitch and +head-tilt check. The SteamVR-requested session was running with a rendered first +frame, stereo output and active tracking. All 181 glasses, shared-pose, SteamVR +launch and glasses-UI regression checks passed; packaged runtime inputs verified. + +The wearer also confirmed on 2026-10-14 that XREAL 1S brightness control works. +Higher refresh rates were not tested. + +Still experimental: dimmer, 90/120 Hz compatibility modes and +extended gameplay stability need hardware validation. One successful view/motion +check does not establish long-session stability. Users must select Follow mode and disable the glasses' own +stabilization. Factory calibration and XREAL Eye/6DoF are not implemented. +One Pro is not enabled or claimed as tested. diff --git a/docs/discord-ui-session-reports.md b/docs/discord-ui-session-reports.md new file mode 100644 index 0000000000..d4f5c40a21 --- /dev/null +++ b/docs/discord-ui-session-reports.md @@ -0,0 +1,53 @@ +# Discord UI and session reports, 2026-10-11 + +Sources: [bug thread](https://discord.com/channels/1552707793247539220/1558928314956120174), [general](https://discord.com/channels/1552707793247539220/1552707794430459916), and [development](https://discord.com/channels/1552707793247539220/1552751182165049435). Reviewed the post-overhaul discussion on October 11, including screenshot-only messages and linked reports. + +Branch: `fix/discord-ui-session-reports`, based on `origin/main` at `0cafa83e`. +Device: AYN Thor, selected by the full advertised ADB serial. + +## Changes + +| Report | Change | +| --- | --- | +| Settings needs an X and a larger handle | Add a 44dp close target in the sheet's controller focus group; enlarge the visible handle to 32dp and its label to 14sp. | +| Settings has too little height | Raise the sheet from 82/360 to 60/360 of the pane while preserving clearance above the primary action. | +| Reopening during the closing animation breaks settings | Cancel the outstanding drag settlement when a new gesture or open/close transition takes ownership. | +| Store navigation returns to the left column | Route Up/Down by the actual adaptive column count and focus the corresponding card after lazy composition. Incomplete final rows do not wrap. Prefetched offscreen cards are scrolled into view before focus moves. | +| A selection stays as a dot | Unpinch an interrupted long chip jump during the next adjacent move. Cancel an obsolete focus-ring flight and its fill animation on focus loss. | +| Performance opens with focus on Steam | Wait for Back to attach and take focus after the outgoing page leaves. | +| Desktop settings navigation jumps | Do not apply the main page's Down-to-first-app shortcut to settings-sheet buttons. | +| Display-driver navigation loses focus | Wait for the chooser to disappear before focusing the selected driver; initialize controller focus when switching back from touch. | +| Stores can no longer be hidden | Restore a persisted Stores switch under Setup > Launcher; keep it enabled by default. | +| Stores engine is clipped in the settings panel | Bound popup height to the available screen space, expose that limit to its scrollable body, and allow tall popup content to scroll. | +| Wine Sync renders vertically | Stack its label above the full-width sync choices. | +| Profile picker leaves too little room for Proton lists | Replace the large profile group with a compact 44dp picker row. | +| Theme accent is inconsistent | Paper's signal color now follows its white primary color rather than retaining blue. Store brand colors and controller-button tint remain separate settings. | + +| Phone sign-in buttons clipped ([development report](https://discord.com/channels/1552707793247539220/1552751182165049435/1558947589997469820)) | Size the sign-in card to the pane and its content instead of enforcing a 320dp minimum. Decorative layers follow the measured card. | +| Force SSBS hard to find behind empty scrolling ([general report](https://discord.com/channels/1552707793247539220/1552707794430459916/1558976573758251029)) | Place shared Proton options before installed/downloadable lists; start each component layer's detail at the top when switching layers. | + +## Validation + +The release APK was prepared with `tools/build_local.sh`, built with `assembleRelease`, signed with the normal release lineage, and installed with `adb install -r` over Thor's existing app. + +16 focused unit tests passed: LiftSheetTest, StoreGridNavigationTest, GlideShapeTest, StoreTabsTest, AppScaleTest, and the Compose ComponentsPageProfileTest. The first unrestricted unit-test run ended because the Gradle test executor exited with code 2 without an individual test failure report; it is not counted as a passing full suite. + +Thor checks include the close control, eight close/reopen swipe cycles, 21 rapid long/adjacent Setup tab switches, hiding and restoring Stores, Paper theme colors, controller entry into Performance (Back focused, then Down to the first setting), driver chooser handoff and Up/Down scrolling, and Desktop Files navigation (Open > Choose > Uninstall > Choose > Open). The new close control is reachable and operable with a controller. The newer Stores engine clipping, compact profile picker, and horizontal Wine Sync label were also checked on Thor. The original Graphite theme and existing session preferences were restored after checks. + +Device screenshots and UI dumps are saved locally under `captures/discord-reports/` (ignored build evidence). The final signed APK is `app/build/outputs/apk/release/app-release-signed.apk`. + +The first pass saw no populated authenticated store grid. During the follow-up, Epic and Amazon loaded their retained accounts and libraries (402 and 150 titles). On Epic, six controller Down moves and six Up moves stayed in the third column, including transitions to offscreen rows, and returned to the original card. This caught and fixed the case where a prefetched offscreen card accepted focus without scrolling. The completed trace is `captures/discord-reports/epic-grid-navigation.json`. + +Follow-up validation used both Thor's normal display and a temporary 2400x1080 / 540dpi phone-like layout. GOG's sign-in card and button were fully visible without scrolling. Epic and Amazon remained signed in, so their library layouts were inspected rather than signing the accounts out. Proton options appeared before the catalogs, Force SSBS was reachable by scrolling, and changing layers reset the detail scroll. The physical size/density were restored (1080x1920 / 369dpi). The final build and four focused tests passed; the final signed APK hash is `7dca710d081042ec68aeaf6e8b68371d5fdfa73eca5860ba4ca5f0134c21b9fc`. Wireless ADB file-sync stalled, so the APK was transferred over a temporary direct LAN socket, hash-verified on Thor, and installed with `pm install -r`. The transfer listener closed after delivery. + +## Runtime reports still unresolved + +**Second Steam launch fails or has sound with a black picture.** The two submitted log bundles reach a first frame and Steam focus, then record a guest exit with status 0. Their crash buffers contain no Android crash. Two consecutive launches of Thor's existing main build reached READY and displayed Steam correctly, using the same retained compositor and app process. Two consecutive Steam launches of the new branch also reached READY with visible Steam UI, and its desktop launch reached READY and stopped cleanly. These observations do not establish the cause of the reporters' failures, and no speculative compositor or Steam-startup change was made. + +**Persona 3 Reload drops from 60 to 35 FPS and crashes.** The linked compatibility thread identifies an Odin 3 Max and a UE4 GameThread timeout waiting 120 seconds for RenderThread. Earlier working settings were Performance + TSO and VKD3D shader/feature levels 6_6 / 12_1. The new report has no session log, before/after build identifiers, or controlled comparison. Persona 3 Reload was not found in the inspected Thor library locations. Neither an Odin reproduction nor a Persona performance improvement is claimed. The RDR2 launcher governor matches Rockstar helper executable paths and is not a blanket game-core restriction. + +## Related follow-ups outside launcher design + +General's fullscreen desktop-app report matches the existing runtime contract: the software desktop hands Steam to a Steam session and wraps games/emulators in gamescope for GPU access. `droiddeck-desktop-gpu` preserves a “Run in a desktop window” action. Changing that GPU/window architecture is separate runtime work; no claim of fixing it here. + +Development's request to update driver and Proton defaults without visiting Components is also runtime policy. Driver Auto already calls `ensureAuto` during activity startup. This branch does not replace manual driver selections or install/switch Proton builds as part of a layout fix. diff --git a/docs/fsr-steam-black-screen.md b/docs/fsr-steam-black-screen.md new file mode 100644 index 0000000000..a6e4f41073 --- /dev/null +++ b/docs/fsr-steam-black-screen.md @@ -0,0 +1,26 @@ +# Steam black screen with FSR 1 + +Branch `fix/fsr-steam-black-screen` starts at `origin/main` `e4c375ad` after PR #596 merged. + +## Diagnosis + +On AYN Thor (Adreno 740, WN-Turnip-1.19-p_Axxx), Steam reached READY and retained focus while the entire screen was black with FSR 1 at 720p / 85% sharpness. Switching the same running session to Linear immediately restored the picture. Production SGSR also went black. At native 1080p, FSR stayed selected but its upscale pass was unnecessary and Steam remained visible. + +A temporary SGSR shader drew a constant red strip beside a normal texture sample. The strip and sampled picture were corrupted in a tiled pattern. Allowing unrestricted mutable formats on the post-processing targets made both render correctly. Restoring the original shaders then restored the first production FSR launch. A second launch exposed a separate source-view lifetime bug: the scene owner destroyed its image while the effect chain retained a view and descriptor; a recycled image handle at the same dimensions could hit that stale cache. + +## Change + +Create the effect chain's intermediate images with `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT`, without a restricted view-format list. Turnip consequently avoids UBWC compression on these render-then-sample/blit targets. The input scene and guest images retain their existing allocation policy. Release the cached source view and descriptor before an SDR, HDR or frame-generation scene image is destroyed. This makes recycled Vulkan handles create fresh sampling resources. Scaling remains enabled and the FSR EASU/RCAS shaders and sharpness settings are unchanged. + +Driver behavior is documented in Mesa's [image allocation implementation](https://chromium.googlesource.com/external/gitlab.freedesktop.org/mesa/mesa/+/3fcec4762f3fec551c00da52f349c83443152159/src/freedreno/vulkan/tu_image.cc), including the mutable-format check and `format_list_ubwc_possible`. + +## Validation + +- Four native cache regressions passed: recycled handles, unrelated/null images, repeated invalidation, and dimension changes. The fixture executes the actual cache implementation with Vulkan lifetime callbacks. +- Release build and 14 focused Android tests passed: SessionScalingPrefsTest and SessionDisplayTest. +- A separate Vulkan/MoltenVK smoke test ran the actual effect chain: a 16x16 source scaled by FSR to 32x32 retained RGBA 64/128/191/255. +- Signed APK installed over Thor's existing app, with its device-side transfer hash verified. +- Production FSR at 720p / 85% rendered visible Steam, including two consecutive stop/start cycles with the app/compositor retained (sessions 42 and 43). Live SGSR, Linear and return-to-FSR switching also rendered correctly. +- Session preferences match the pre-test snapshot; FSR 1 / 85%, 720p and the existing driver selections are retained. + +Local screenshots, state snapshots and renderer logs are under `captures/fsr-black-screen/` (ignored). Temporary probe shaders are excluded from the final source change. The signed APK hash is `2b8b7ea18c49bf53f1f3cb00eea8f73d122258a900c18ffe660c85c5654bedae`. The old cache behavior fails the recycled-handle regression; the corrected implementation passes all four cases. diff --git a/docs/progress-log.md b/docs/progress-log.md index 32642465c2..81ec5bc3a3 100644 --- a/docs/progress-log.md +++ b/docs/progress-log.md @@ -7,6 +7,357 @@ the timeline, then lessons and backlog. Companion to the README (what the app *d --- +## 2026-10-16/17 - `feat/x86-64-steam-client`: web helper on the GPU, org main, review rounds + +- **x86-64 web helper on the GPU** (`f603a085`): the client's own steamwebhelper runs ANGLE's GL backend + through FEX's GL thunk to zink/Turnip (ANGLE-Vulkan was CPU-bound at 16 fps). No arm64 helper needed. +- **Quick Access Menu** (`26d80895`): the QAM opened blank until a d-pad press and the screen behind it went + black. Steam's compositor draws each browser window from its X pixmap; gamescope's WSI layer took the + helper's zink swapchains, so the pixmaps never got frames. The helper now runs with + `DISABLE_GAMESCOPE_WSI=1` (games keep the layer). Not FEX: a texture-from-pixmap test behaved the same + under FEX and native, so no fex-2610-r4. +- **Black flashes** (`1b52df77`): gamescope sets `vk_xwayland_wait_ready=false` for its children; without + its layer, unfinished frames reached the compositor (3 flashes in 10 QAM opens, screen-recorded and + counted frame by frame). The helper waits for frames and presents without kopper: 0 flashes in 60 opens. + The x86-64 menus run at 60 fps on that path (Xwayland's per-window timing for child windows); the user + chose no flashes over ~140 fps. +- **Org main**: rebased twice (522e755b, then e95a4226), linear, each final tree checked equal to a plain + merge. Main's art picker, grid sync and boot movie follow the selected client (`32bbf79a`). +- **CodeRabbit** on personal PRs #68 and #69 (full review of 76 files on #69). Fixed: one Steam channel for + the x86-64 client; VAC report reads only console logs this session wrote, and a stopped session keeps its + own marker; segvlog reads stack words without faulting and opens files with raw syscalls; the x86-64 + shortcuts pass no longer writes the arm64 client's compat `state.json`; DroidDeck direct mapping in one + pass (2000-title fixture: same output, 16.5 s -> 0.2 s); session stop/start handoff under one lock; + desktop sessions prepare the x86-64 card library; Decky's x86-64 marker only for an installed client; + library follows the running client; download monitor restarts on the other client's log; compat + restart reads the x86-64 card folder; CPU pinning sees FEX processes; build-fex has a read-only build + job, a separate publish job, never republishes a tag, requires thunks and tags the built commit + (`8e2751f9`..`f9de849c`). Skipped with evidence: IPC home for the probes (device: ownership probe + succeeds in x86-64 sessions); shortened `STEAM_COMPAT_DATA_PATH` (read before the override). +- **Device** (5004cf4e): TF2, Half-Life, Borderlands 2 and DiRT Showdown launch and play on the x86-64 + client; the arm64 client starts. BL2/Half-Life "downloads" were Steam shader pre-caching (6.1 GB Deck + `steam_pipeline_cache.foz` for BL2), not game updates. Half-Life is the Windows build in the arm64 client + and the Linux build in the x86-64 one, in separate folders. +- **Org readiness** (2026-10-17): org main's rules are a PR with the `Build APK` check (ruleset "Protect main") + and `AGENTS.md`'s one line on comments. Comments added by the branch went from about 440 lines to under + 100, each a non-obvious external constraint; the device history and reasons moved to + `docs/development/x86-64-steam-client.md` (code unchanged, checked by stripping comments from both sides). + The Steam client setting now says the library is the client's own and the sign-in is shared. Rebased + onto 83eda433 (VITURE XR); squashed as personal PR #70, `feat:` title. FEX tags r1-r3 point at personal + main, not their build commits; build-fex now tags the built commit and needs thunks to publish. +- **PR #70 review**: added Linux-only titles in the x86-64 client went to `droiddeck-fex`, a tool that + client lacks (now DroidDeck direct, and `droiddeck-fex` is retaken); pulseguard finds a libpulse loaded + RTLD_LOCAL (Wine's winepulse.so); segvlog passes faults on to the program's own handlers after logging; + Lossless's DLL search includes the x86-64 card folder; the log scrubber keeps account names when a + `loginusers.vdf` cannot be read; build-diag runs with a read-only token. +- **Org main 97f976ef** (Epic Games Launcher for Linux, #928): rebased onto it. Its new session code + launched, restarted and recovered games through `steamrtarm64/steam`, and its added-game shortcut check + read the arm64 client's Steam folder; both now use the session's client. Added games marked native are + not given a Proton by either client's shortcuts pass. +- **FEX hosted by the org**: `fex-2610-r3` is mirrored into Droid-Deck/DroidDeck-Components by its + `mirror-release.yml`, checked against a new `fex.json` catalog there (Components PR #2), and + `droiddeck-steam-x64` downloads it from there instead of The412Banner/DroidDeck. +- **FEX fex-2610-r4** (PR #71 review): without openat2 (proot) FEX opened rootfs paths with absolute + symlinks resolved against the arm64 guest, and `libblsession.so` converted every openat2 the same way + before FEX saw ENOSYS. `preload/robust.c` now resolves `RESOLVE_IN_ROOT` paths component by component + inside the root (59 cases; 100,000-path differential fuzz; new `test_openat2_preload.py`), and patch + 0001 does the same in FEX. Patch 0003 marks only the host mappings that overlap a failed MAP_32BIT + range (the low-2 GB case: about a million mmap tries before, one now). Built with thunks, tagged at the + built commit, mirrored into DroidDeck-Components (PR #3). The Steam client setting names the FEX build. + The bring-up crash logger (`tools/diag`) left the branch. Device: FEX r4 downloaded on first start, + client UI in 23 s (19-33 s before), TF2 played. The first session on the new build drew no SVG fills + in Steam's UI (icons blank, outlines and text fine); a restart drew them, cause not found. +- **Added games**: the scan treated every folder of the card library as a game folder except + `steamapps`, so the x86-64 client's `x86-64/` library showed up as a custom game named "x86-64" + with the exe of a Steam title installed there (FlatOut). `AddedGames.isSteamLibraryFolder` skips it + like `steamapps` in the scan, the exe-to-folder lookup and the folder list (`AddedGamesScanTest`). +- Rebased onto org main 45513c90; squashed again for a full automated review (personal PR #72, + replacing #71). +- **PR #72 review**: grid art, the content-log monitor, the repair marker, storage leftovers and the + VAC diagnostics files are kept per client (the x86-64 client's first art sync was deleting chosen + art as "removed in Steam"); the old games-folder migration skips the x86-64 library too. +- **Which client**: the Games header shows a plain "x86-64" chip while the x86-64 client's list is + shown (on its own line in a narrow pane); nothing changes for arm64. The setting reads "Applies next + session. FEX 2610 r4" with the choices ARM64 and x86-64 (`GamesClientTagTest`). +- **Stale list**: every refresh drops the Steam-client games when they belong to another client than + the active one (a setting change, the end of a session, a resume), keeping added and store games; + the cached list records its client in the same file (`library-cache.json`, saved under one lock). The next review of PR #72 had no + findings. Device: the header chip and the removed "x86-64" entry seen on 04568806. +- **x86-64 rootfs in DroidDeck-Components**: FEX-Emu's Ubuntu 24.04 image (2026-08-11, 525,615,104 + bytes, unmodified) is now fetched from Droid-Deck/DroidDeck-Components release + `fex-rootfs-ubuntu-24.04-2026-08-11` instead of rootfs.fex-emu.gg. Components PR #4 added + `fex-rootfs.json` and `mirror-upstream.yml` (fetches a catalog's upstream link, refuses it unless + sha256 and size match, checks the digest GitHub stored); its run 39084452789 brought the file in. + The sha256 the app pins is unchanged, so an unpacked rootfs is kept. +- **One cache file**: the review of that change found the list and its client marker written as two + files, so concurrent saves could pair one client's list with the other's marker. `library-cache.json` + is now one object (`client`, `games`) written by one rename under a lock; a bare list from earlier + builds reads as arm64's. Device (73e2a80b): the first start after install read the old list, + rescanned and wrote `{"client":"x86_64","games":[...]}` with the same 23 games. +- A scan reads the client it tagged the cache with (`Library.launchableGames(arch = ...)`), so a switch + during a scan cannot pair one client's games with the other's tag; a failed rename drops the cache + instead of leaving the previous list behind (`LibraryArchTest`). +- The next review of PR #72 (a2552c58) had no findings; every review thread is resolved. Device: 43f9a8a8 + installed. +- Device checks on 43f9a8a8: the setting reads "Applies next session. FEX 2610 r4" with the choices + ARM64 and x86-64; picking ARM64 drops the chip and the Games tab showed the arm64 list on first + look, and back on x86-64 the chip and the x86-64 list return (the cache records each client). Two + custom games' chosen background art is kept, with the same file in both clients' grid folders. + Team Fortress 2 launched from the Games tab with the x86-64 client selected: the session started + the client, handed it app 440 and the Linux build (`tf_linux64` under FEX) took focus about 60 s + after the tap. +- **Translations**: the branch's 11 strings (the Steam client setting and its values, VAC diagnostics, + the x86-64 loading title and the Storage labels) are in all 31 other locales, after + `stores_registering` as in the English file, reusing each locale's wording for "Steam client", + "Session logs" and "Uninstall" and its formal or informal address. Every file parses, every + translation keeps its English placeholders, and no locale has a key the English file lacks. +- The translations went to PR #72 (a43217c4) for review; org main is still 45513c90, so the branch + needs no rebase before the org PR. Device: 9afb9bd5 installed. +- **Org PR**: the draft #152 from 2026-10-02 (same branch name, 12 commits, conflicting with main) is + refreshed as one commit on org main 45513c90 and marked ready, once the review of the translations + is clean. Its old head is kept at `refs/backup/20261018/x86-64-steam-client-afa479ee`. +- Korean: the review of the translations found `을(를)` left in the two uninstall strings; both client + names end in a vowel when read, so they take `를`. The next review was clean. +- **Submitted**: #152 is one commit (a53fd117) on org main 45513c90, ready for review; Build APK passed. + Its `kwin` job (Build desktop package, KDE Plasma) failed for an unrelated reason: `build-kwin.sh` + requires Arch Linux ARM's `kwin-6.7.5`, which `extra` replaced with 6.8.0 on 2026-10-15; the job ran + only because refreshing the branch from its 2026-10-14 head spanned main's own `tools/desktop-kde` + changes. This branch changes nothing there. +- **Org review** (CodeRabbit on #152, 7 points): the library cache is saved only by the newest scan; a + session records the client it ran (`steam-client.txt`) so an abandoned session's Steam logs come + from that client; two console logs with the same game and mod get distinct names in the VAC report; + CPU pinning also unwraps `FEXInterpreter`; the VAC hint names the game in pl, ru, uk, cs and bg. + Pinning `actions/download-artifact` to a SHA was left out: no workflow here pins one. Follow-up + commit eb8634ea. +- Merged as ae94d9db. +- **FEX r5** (report: a Galaxy S25 without the KDE desktop): the x86-64 client exited 127 at its first + FEX call, `error while loading shared libraries: libxxhash.so.0`. FEX, FEXServer, FEXRootFSFetcher + and FEXOfflineCompiler link libxxhash; linuxfs-r9 does not ship it, and the test device had it only + from the KDE desktop package. r5 bundles it in `usr/local/lib` with RUNPATH `$ORIGIN/../lib` on + those programs (the runtime has no ld.so.cache), and `build-in-arch.sh` now fails when a program + needs a library that is neither bundled nor listed in `tools/fex/runtime-libs.txt` (the r9 libraries + FEX uses). With the device's libxxhash hidden, r4 failed with the reported error and r5 loaded. + Mirrored in DroidDeck-Components (#5); the app moves to fex-2610-r5 and an installed r4 is replaced + at the next x86-64 start. +- Merged as 7d21ba22. +- **FEX from the catalog**: FEX builds may need to follow user reports faster than app builds, so the + app now reads Components' `fex.json` (directly, kept between starts) and passes it to the session; a + build is installed only once its sha256 matches and its programs load, the installed one stays while it + loads, and the build pinned in the script remains the first-start default. **Session logs** for the + x86-64 client now name the FEX build and its source, the rootfs and the client's builds, report the + rootfs download in tenths instead of a progress bar (one report's log ended in hundreds of bar lines), + and, when the web helper's GPU process keeps exiting (a report from an Adreno 840: the menus never + appeared), say so in one line with x86 `glxinfo`/`vulkaninfo` through FEX. Settings shows the FEX + build installed. FEX is now built and published by DroidDeck-Components' `build-fex.yml` from this + repository's `tools/fex`, replacing the archive on its single `fex` release and recording the version + in `fex.json`; this repository's `build-fex.yml` only checks the build. Tests: `test_fex_select.py`, + `FexCatalogTest`. + Components' first build there published `2610-r6` (run 39104443888). Device (Pocket FIT, r4 + installed): the app read `fex.json`, and the next x86-64 start logged `downloading FEX (fex-2610-r6)` + then `FEX ready (fex-2610-r6, catalog)` a second later, with the rootfs and client lines; the client + came up on it. +- Review of #1053: an install keeps the files it replaces aside until the installed copy loads and puts + them back otherwise (a failed copy could leave a partly replaced FEX marked as the new one; + `test_fex_install.py`), and the catalog is read on its own thread, not before the library scan, and + not in Offline Mode. + +## 2026-10-15 - `feat/x86-64-steam-client`: SD card library, ARM parity, org main, Counter-Strike 2 + +- **SD card library** (`3fc74f3e`): the x86-64 client had internal storage as its only library, so Steam's + install dialog never offered a place. It now has `x86-64/` inside the card library + (`/mnt/droiddeck-sd/x86-64`; compatdata, shadercache and runtime tools private like the arm64 card + library). Before building, FEX was shown to run x86 programs from the noexec exFAT card. Device: the + dialog offers Internal Storage and SD card. +- **Card downloads** (`f77113fb`): `storage.c` (no zero-filled reservation where `fallocate` is refused) + and `dircache.c` recognised only `steamrtarm64/steam`; the x86-64 client wrote each download in full as + zeros first (Audiosurf: 415 MB written, 0 downloaded). Device: FlatOut, 1.19 GB, to the card in 51 s. +- **zRAM** (`877c27eb`): the watcher read argv[0], which under FEX is FEX; it now reads FEX's first argument. +- **ARM parity** (`b0923f05`): touch layouts read the active client's files; Offline Mode is written to + both clients' `loginusers.vdf`; the Lossless Scaling ownership check runs for x86-64; Repair Steam repairs + the x86-64 client too (and two unshown starts do, like arm64; the app clears its start count). Device: no + repair on the stale 31-start count, count cleared once the client was on screen. Switch to Desktop needs + no change (Deck mode: an x86 shell under FEX runs `steamos-session-select`). +- **DroidDeck-Proton default** (`2bd752aa`): newest DroidDeck-Proton before GE-Proton; `default-tool` + records the default this script set, and on a change the titles still on it move along (device: 113 off + GE-Proton11-7). A default the user chose is kept. FlatOut from the card: in game on DroidDeck-Proton + 11-9.1, exits on GE-Proton11-7 (no log). +- **Org main** merged (`714198bf`, 36 commits; strings and `steam_started` conflicts kept both sides). + A stale line from the 10-07 sync ran the live compat helper in the foreground on the arm64 restart path: + black screen after a Steam import restart (`02e7c503` matches main again). +- **VAC findings:** x86-64 client + Linux builds secure (TF2, HL, L4D2). x86-64 client + Windows build + (TF2 on DroidDeck-Proton) insecure: Proton reaches Steam through the arm64 client's `steamclient.so`. + arm64 client + L4D2 blocked on both Protons; arm64 + Half-Life (Windows) joined a vac=1 GoldSrc server. + Why the arm64 client fails is not established. Sharing libraries between the clients stays parked. +- **arm64 `droiddeck-fex`** (`a53b49ef`): Valve's FEX-Emu keeps its server socket in + `$STEAM_COMPAT_DATA_PATH/fex-emu/Server` whatever `FEX_APP_DATA_LOCATION`/`FEX_SERVERSOCKETPATH` say; + under the app's folder that path passed 108 bytes (Half-Life: 136) and FEXServer never listened. A short + path is used now. 32-bit Linux titles through it still fail (not pursued). +- **Counter-Strike 2** (Linux, newer runtime) hung at 100% of one core before loading its engine. With + ptrace taken by proot, `perf_event_open` IP sampling put the loop in FEX's `MemAllocator32Bit`: CS2 + reserves the low 2 GB with `MAP_32BIT` in shrinking sizes, FEX met `EEXIST`, stepped down one page per + retry and restarted from the top for ever. **`fex-2610-r3`** (patch `0003`, `b0d316dc`): such a range is + skipped whole and a second exhausted scan returns `-ENOMEM`, as the kernel does. Next, its menu text + library failed: CS2 ships an older `libfreetype.so.6` but no HarfBuzz, and the rootfs's needs a newer + FreeType; the game flagged its files corrupt (a verify each start) and waited behind an error box that + could not open. DroidDeck direct now preloads Valve's runtime HarfBuzz (2.7) for newer-runtime titles + (`c9eb7d30`). Device with both done by hand: engine and modules loaded (5 GB) with no error, then Android + killed DroidDeck for memory while it was in the background. Not yet seen at the menu. +- **CS2 on the r3 APK** (`c9eb7d30`, no launch options): no hang, the menu text library loads, the game + client and modules load and the window resizes. Every run then ended in Android's low-memory killer: + CS2 goes from 3.5 to 5.3 GB in about 15 s and `lmkd` killed DroidDeck (adj 200, in the background + while the device was in Termux) with zRAM on and still filling (1.5 to 3.2 GB of 6 GB). This device's + `lmkd` runs in minfree mode (`persist.device_config.lmkd_native.use_minfree_levels=true`; background + apps go below about 120 MB free), which does not count swap. Proposed, not applied: switch it to the + PSI mode (`use_minfree_levels=false`, `lmkd.reinit=1`; reverted with `true`). CS2 has not been seen + at its menu yet. +- **CS2 reached its menu (14:47, DroidDeck in the foreground):** still loading, 11 fps, 11.6 GiB used. + Five seconds later `lmkd` killed nearly every app, then DroidDeck itself at adj 0 (foreground), while + swap was about 22 of 23 GB free (zRAM 6 GB with 0.9 GB used, `/data/swapfile` 16 GB almost unused). + Steam and CS2 died with the app; neither crashed on its own. +- **Root test without changing Android (lmkd left as is):** DroidDeck's zRAM watcher only pages out + `steam` and `steamwebhelper`, never the game. A root tool (`/data/local/tmp/pageout cs2 3000 <log>`) + calls `process_madvise(MADV_PAGEOUT)` on CS2's private anonymous memory whenever MemAvailable drops + below 3 GB, so free RAM stays above the killer's levels. One call per mapping in 1 GB pieces: a single + call with many ranges is capped at about 2 GB in total, and FEX reserves huge ranges, so batched calls + silently skipped most of a FEX process. With that fixed, the x86 Steam client moved 223 of 256 MB to + swap. If CS2 survives to its menu, the app version is the zRAM watcher also paging out the running + game during its load (no root). +- **Page-out result (14:59):** the tool fired at 2.9 GB available and moved 4.8 GB of CS2 to swap + (resident 5.8 → 1.5 GB). CS2 drew its full menu (2–34 fps). 27 s later `lmkd` still killed down to + DroidDeck at adj 0. Its kill record: MemFree 111 MB, Cached 6.3 GB, but **Shmem 3.4 GB and + Unevictable 3.5 GB** (Mlocked only 120 MB), swap 17 GB free. In minfree mode the "file" figure is + Cached minus Shmem, Unevictable and SwapCached, so about 0, and it kills to the foreground. After the + session died Shmem fell to 0.3 GB, so the 3.4 GB of pinned shared memory belonged to the CS2 session. + MemAvailable counted it as available, which is why the tool saw 3.7 GB of headroom 2 s before the + kill. Page-out cannot move unevictable pages. +- **Next run (15:04):** a root logger (`/data/local/tmp/shmlog.sh` → `shm-cs2.log`, every 3 s) records + MemFree / Cached / Shmem / Unevictable / Mlocked / SwapFree and every process holding more than 50 MB + of shared (`RssShmem`) or locked (`VmLck`) memory, to find who pins the 3.4 GB (FEX, the X server, + Vulkan buffers, a ramfs). No SysV shared memory on the device. Then the trigger moves from + MemAvailable to MemFree plus droppable file pages. +- **Dust II (15:27):** CS2 loaded Dust II "Training Day" (bots) at 78 fps, then was killed at 15:28:05 the + same way. From 15:25:30 Shmem and Unevictable rose from 0.25 to 3.9 / 4.0 GB, yet the largest process + mapping shared memory (an `exe`) held only about 535 MB, so about 3.3 GB is not mapped by any process. +- **Open files ruled out (15:32-15:36):** a second logger (`fdlog.sh` → `fd-cs2.log`) listed every memfd, + ashmem, deleted or tmpfs file of 20 MB or more held by the app. Only 64 MB PulseAudio memfds showed up + while Shmem reached 2.7 GB. The run was killed at 15:36:28 (Shmem 3.4 GB, Unevictable 3.5 GB). +- **Lead: GPU memory.** `/sys/class/kgsl/kgsl/page_alloc_max` reads 6.07 GB (the peak since boot), and the + driver has `max_reclaim_limit` / `page_reclaim_per_call`, i.e. a KGSL build with process reclaim, where + GPU pages are shmem-backed and stay unevictable while the process is in the foreground. That fits + memory that no process maps, that has no file, and that is freed when the session dies. Not proven. +- **Low-settings test (15:42):** `cs2_video.txt` in the x86 userdata: `gpu_mem_level` 3 → 0, + `cpu_level` 3 → 0, resolution 1024x576 → 854x480 (everything else was already at its lowest; backup + `cs2_video.txt.before-low`). A third logger (`gpulog.sh` → `gpu-cs2.log`, every 3 s) records KGSL + `page_alloc`, MemFree, Shmem, Unevictable and each process with more than 200 MB of GPU memory. If + Shmem rises with `page_alloc`, the GPU memory is what is pinned. Background apps were force-stopped + and caches dropped first (about 11 GB free). +- **GPU memory confirmed (15:47):** with low settings CS2 reached its menu at 94 fps and was killed at + 15:47:59 the same way. KGSL `page_alloc` followed Shmem within 20-120 MB through the whole load + (0.23 GB at 15:44:50, 0.93 GB at 15:46:47, then +2.2 GB in 3 s, about 3.2 GB at the kill), and + Unevictable stayed about 100 MB above it. One process (`exe`, pid 23906) held nearly all of it. So the + pinned 3.4 GB is the game's GPU memory, and the low settings did not make it smaller. (The negative + values in that log were the device shell's 32-bit arithmetic; the logger now divides in awk.) +- **New page-out trigger (16:23):** the tool now acts on what lmkd's minfree mode looks at, MemFree plus + `Cached + Buffers - Shmem - Unevictable`, instead of MemAvailable (which counted the GPU memory as + free). Threshold 2500 MB, checked every 0.5 s, page-out at most once a second. The idea: push CS2's + swappable memory out early so the 3.2 GB of GPU memory fits beside it. The open-file logger was stopped. +- **Still to test:** CS2 without the kill; touch layouts, Offline Mode, Switch to Desktop, a Linux game from + the card. TF2 on the device is the Windows build after the VAC test. + +## 2026-10-14 (evening) - `feat/x86-64-steam-client`: Team Fortress 2 runs (sniper check, FEX thunks) + +- **Sniper check:** `tf.sh` reads `VERSION_CODENAME` from `/etc/os-release` and stops unless it is + `sniper`. DroidDeck direct cannot use Valve's sniper container (no user namespaces under Android), so + for titles in `direct-sniper` it runs such a script through `bash -c` with that line replaced by + `VERSION_CODENAME=sniper` (`92d65e3d`). Device: TF2 gets past the check and loads on the rootfs + libraries; sniper itself is not needed. +- **Then a crash at the first frames**, with both launch options (Vulkan and Legacy OpenGL). Strict FEX + memory ordering and turning off the Gamescope WSI layer changed nothing. With FEX thunks off (lavapipe, + software) TF2 reached its main menu and loaded a match at 17 fps, so the thunks were the cause; with + only the Vulkan thunk on it still crashed. +- **Cause (from a SIGSEGV report taken inside the game):** the main thread was executing Turnip's + `vk_common_CmdBindDescriptorSets` as x86 code, an address FEX never linked. FEX-2609's guest + `vkGetDeviceProcAddr` passes a lookup of `vkGetDeviceProcAddr` itself to the host and hands back the + raw host function; every pointer fetched through it is unlinked. TF2's native DXVK (2.3) makes that + lookup; the Windows games through Proton do not. FEX-2610 answers self-lookups in the guest + (FEX-Emu/FEX 3397eb9b). +- **FEX 2610** (`af49e545`): `tools/fex/build-in-arch.sh` builds FEX-2610 with the same openat2 patch and + host thunks as `fex-2609-r3`. The container's newer clang has no `FileManager::clearStatCache()`, + which the thunk generator called after each run; patch `0002` drops that call (`31d66e67`). Published + as `fex-2610-r1` on the personal repo. +- **2610 alone did not fix it.** An ARM-side signal hook in FEX (wrapping its `syscall(rt_sigaction)`) + logged no fault in Turnip, and the guest thunk's disassembly showed why: Arch's clang builds the x86 + guest thunks with stack protection, and the canary load in `CallHostFunction`'s prologue + (`mov %fs:0x28, %r11`) overwrote r11, which carries the host function's address, before the thunk + stored it. FEX called the canary. 9 of 521 Vulkan and 66 of 736 GL host calls (those with 7+ + arguments) were affected, `vkCmdBindDescriptorSets` among them. Windows games never reach these + thunks (they run on the arm64 Proton) and 32-bit games pass the host address in mm0. +- **`fex-2610-r2`** (`56e5a712`): the toolchain files add `-fno-stack-protector` for the guest thunks; + no guest thunk library has a canary load. The x86 client fetches it (`9cc0ebcb`). Device, stock + settings: TF2 main menu at 358 fps on the GPU, Casual matchmaking onto a VAC-secured Valve server, + in game at about 84 fps; Half-Life (32-bit, direct) runs on it. Windows games are not on this FEX: + in x86 client mode they still run on the arm64 Proton (Borderlands 2: GE-Proton11-7-aarch64), whose + own FEX translates the game. +- **Which FEX runs what in x86 client mode:** the client (`steamrt64/steam`) and every Linux game on + DroidDeck direct run on the runtime's FEX (`fex-2610-r2`); Windows games go to the arm64 Proton and + its own FEX. At each start every library game with a Linux build, installed or not, is mapped to + DroidDeck direct, so Steam downloads the Linux depots; Windows-only games stay on the default + Proton, and a game already installed as its Windows build stays there (Borderlands 2 here: + `Binaries/Win32`, depot 49521). A game new to the library mid-session is mapped at the next start. +- APK run 38670180921 (`9cc0ebcb`), signed and staged as `DroidDeck-x64-fex2610r2-9cc0ebcb.apk`. + +## 2026-10-14 - `feat/x86-64-steam-client`: brought up to main; added games run through the x86-64 client + +Work lives on The412Banner/DroidDeck only until it runs correctly; the org branch and draft PR #152 +stay as they were (`afa479ee`). + +- **Merged main (94 commits).** Main dropped the Steam channel and Deck-mode settings (#546): only the + client choice (`steamClientArch`), `activeSteamRoot` and VAC diagnostics remain. Main's web-helper + arguments (#566, `bl_webhelper_argv`) are composed with the x86 client's arm64 web-helper redirect in + `preload/net.c`. Main's single background loop (#575) now carries the x86 hooks: the client's own + compat pass (`--x64 --live`), `steamrt64` in the pinning and stale-tmp patterns, Lossless probe off for + x86, and the once-per-title restart after a new mapping. The text-strings merge had dropped three of + main's strings; main's files were taken and the six x86 strings added back. +- **Builds on the personal repo** need the pinned Debian image in a release of their own: + `ci-debian-bullseye-r1` was copied (same sha256) as a pre-release. The bullseye compilers come from + `deb.debian.org` first; `archive.debian.org` no longer serves `libmpfr6_4.1.0-3`. +- **Client update before start** (`x64_sync_client`): Valve serves one build to both clients; the x86 + client is brought to it (changed parts only, 9 of 28 on device) so it can use the arm64 web helper on + the GPU from the first frame (device: 144 fps menus). +- **Web helper loop:** with main's in-process GPU arguments the x86 web helper's GPU crash took the + whole helper down (102 restarts). The x86 helper now starts with stock arguments. +- **Loading screen:** "Starting Steam x86-64", and the x86 setup and update steps reach it. +- **Added games:** written first, then pointed at the x86 client's Proton (they were mapped to the + arm64 client's tool name, which this client ignores). Windows components install into the x86 + prefix (DiRT Showdown and DiRT 3 needed OpenAL). +- **Hidden game window, two causes.** The arm64 launcher loaded the saved arm session's `DISPLAY=:0` + over the game display Steam chose; it now keeps Steam's. And the game window had no `STEAM_GAME` + tag, so gamescope never listed it as focusable; the agent's focus watcher now tags untagged + `steam_app_<id>` windows on the game display when the x86 client runs. Device: DiRT 3 (added game) + at its title screen at 144 fps. +- **Parity with the arm64 client:** Steam UI scale and the Steam import watcher run for the x86 client + too (the import is untested). An SD-card library stays arm64-only: FEX cannot run Linux games from it. +- **Later the same day:** + - DiRT Showdown's ~7 s exit was the same `DISPLAY=:0` problem; it runs now. + - **Tools adopted as arm64 Protons:** main's `droiddeck-steam-shortcuts` calls `adopt_extras` on the + client's `compatibilitytools.d`; in the x86 client that rewrote DroidDeck direct as a Windows tool, + so Steam installed Half-Life's Windows files. The x86 client no longer adopts its tools, and its + preparation removes what an adoption left. The arm64 Proton is adopted on demand at an x86 launch. + - **Scout runtime:** shipped as `steam-runtime.tar.xz`; `steam.sh` unpacks it, and the x86 client + is started without it. Its preparation unpacks it now. Device: Half-Life's native Linux build at + 101 fps on the GPU under FEX (32-bit), and a VAC-secured multiplayer server. + - **Install scripts:** the evaluator script is looked up in the x86 client's folder. A game's own + installers without a `HasRunKey` (Borderlands 2: VC++ 2005/2008/2010, DirectX, .NET 4.0) are now + marked under `Software\Valve\Steam\Apps\<appid>` (and the Wow6432Node view); Steam skips them. + This applies to the arm64 client too. Device: Borderlands 2 started past its install script, and + on the build that marks them itself it went straight into the game. + - **Windows components** detection follows the chosen client (in-session install watch and + `appinfo.vdf`). +- **Next:** Counter-Strike: Source, the first game on the newer (sniper) runtime path, where DroidDeck + direct runs it on the rootfs instead of the scout runtime. +- **Open:** newer-runtime Linux games (sniper) untested; the arm64 client untested on this build; the + Steam import watcher untested; an SD-card library for the x86 client deferred. + ## 2026-10-10 - `feat/wincomp-auto-sources`: Windows components picked by the game's source - **Per source** (`WinCompSources`): Steam - Steamworks Shared depots from the appmanifest or the @@ -87,6 +438,104 @@ the timeline, then lessons and backlog. Companion to the README (what the app *d idempotent, store and steamapps skipped, libraries empty, same-name folders), `GameStorageTest` updated. Not yet on a device. +## 2026-10-02 - `feat/x86-64-steam-client`: Valve's x86-64 Linux client under FEX (experiment) + +Why: the arm64 Linux client never runs VAC. L4D2 (and TF2 in Bannerlator) are refused by VAC +servers ("Connection Blocked ... VAC secured server") and no client log mentions VAC; VAC modules +are x86 code. The question is whether Valve's x86-64 client under FEX gets a VAC module it can run. +Branched from `feat/vac-diagnostics`. Opt-in: `bannerlator-steam-x64` (desktop menu "Steam x86-64 +(FEX, experimental)") runs the client in its own home (`~/.droiddeck-x64`) with its own rootfs, +login and library. The arm64 client stays the default and is not touched. + +Device-proven on the FIT (Genshin repack): **the x86-64 client runs, self-updates, renders its full +UI (software GL), logs in, shows friends, and downloads games.** VAC itself is not tested yet. + +What it took, in order (each step was the next failure on device): +- **FEX for the guest** - `tools/fex/build-in-arch.sh` + `build-fex.yml` (FEX-2609, Arch Linux ARM + container, no thunks), released as `fex-2609-r2` (not Latest). Rootfs: FEX's Ubuntu 24.04 image. +- **openat2** - our proot answers it with ENOSYS; FEX opened every rootfs path with + `openat2(RESOLVE_IN_ROOT)`, fell through to the arm64 guest on anything but EXDEV, and x86 bash + could not find libtinfo. `tools/fex/patches/0001-openat2-enosys-fallback.patch`. +- **FEXServer owns the rootfs** - a server started before `FEX_ROOTFS` (any earlier FEX run) answers + every client with no rootfs. The launcher stops it first. +- **32-bit x86 died with SIGILL** - libblfastpath (the proot fast path, preloaded into every guest + process, FEX itself included) breaks FEX's 32-bit mode. `PROOT_FP_OFF=1` for FEX. +- **"Steam now requires user namespaces"** - steam-runtime-check-requirements' bwrap probe; the + arm64 client has no such probe. The SteamRT3 client (`steamrt64/steam`) is started directly, the + way the session starts `steamrtarm64/steam`, with `STEAM_RUNTIME_STEAMRT` pointing at Valve's + runtime linked file by file and only the probe replaced. +- **tier0 assertion "Function not implemented"** - semget: Android has no System V IPC. Traced with + a `-DDEBUG_STRACE` FEX (build-fex.yml `cxxflags` input, artifact only). The session shim + (`preload/*.c`) is now also built natively as `libblsession-x86_64.so`, staged, and preloaded + through the rootfs's own `/etc/ld.so.preload`. +- **re-exec into pressure-vessel after self-update** - `STEAM_STEAMRT_RECURSION_GUARD=1`. +- **libgtk-x11-2.0 missing / soname links / old glibc shadowing** - Valve's steamrt3c platform + libraries linked into `~/.droiddeck-x64/steamrt-libs`, soname links from the rootfs `ldconfig`, + and only libraries the rootfs lacks (LD_LIBRARY_PATH beats system folders whatever its order). +- **GLX failed** - the desktop exports zink over the arm64 Turnip ICD; cleared, llvmpipe used. +- **web helper died of SIGTRAP a second after start** - found with pid-tagged traces (FEX AppConfig + `OutputLog=server` + a foreground FEXServer, `BL_FEXSERVER_LOG`; file logs overwrite each other): + every web helper read `/proc/self/status` from libtier0_s.so, saw proot as a tracer, and tier0 broke + into the "debugger" with int3. `preload/tracer.c` exempts the web helper on purpose (Chromium traps + on a status fd that is not procfs); with `BL_WEBHELPER_HIDE_TRACER=1` only opens called from + libtier0_s.so get the copy. +- `SessionFiles` stages `bannerlator-steam-x64` and the x86-64 shim (they were missing from the list). + +Dead ends worth remembering: headless VAC testing is impossible (current Steam starts the saved +login from its UI); `-cef-*` switches are not forwarded to the x86 web helper; the KMS +`CREATE_DUMB` errors are a red herring (40 fast ENOTTY per process); not an address-space problem +(0 ENOMEM in 618k traced syscalls, although the device is 39-bit VA). + +Later the same day (device-proven unless noted): +- **Controllers**: libfakeinput is now also built for x86-64 and preloaded in the FEX rootfs; the + client registers the pad, and **Big Picture works with it** (Xbox prompts, D-pad moves focus). +- **Online**: the launcher starts the system bus and the NetworkManager stand-in like the session. +- From an audit of `bannerlator-session`: stale lock cleanup, branch sync before every start, core + re-pinning, path cache and `perms.c` for `steamrt64`, the app's FEX preset (PERFORMANCE_TSO). +- **Play button (built, not yet device-tested)**: Steam settings > Client > "Steam client: ARM64 / + x86-64 (FEX, experimental)" (`BL_STEAM_CLIENT_ARCH`). The session then starts the x86 client via + `bannerlator-steam-x64 --prepare/--exec` and gives it everything it gives the arm64 one; steps + only for the arm64 client (ARM64 Proton, mapping, seeding, Decky, steamclient.so probes) are + skipped. +- L4D2 hard-link reuse does not work: switching platform makes Steam redownload depot 551 anyway. + +Evening (device-proven unless noted): +- **Play button with the x86-64 client works** (Steam settings > Client > Steam client: x86-64). + Deck mode is skipped for it: with -steamos3 its SteamOS audio manager aborts on the runtime's + PulseAudio 13 (pa_operation_get_state assertion). +- **Left 4 Dead 2 runs in the x86-64 client and joined a live online game** (Quick Match, Swamp + Fever, other players, 138 ms) - the server type that refused the arm64 client with "Connection + Blocked ... VAC secured server". Not yet hard proof of VAC (no client log line; -condebug added + for the server's secure flag). Software rendering: ~11 fps. +- What the launch needed: "DroidDeck direct", a compatibility tool running native Linux games with + Valve's scout library runtime instead of the Steam Linux Runtime container; a stand-in + steam-runtime-launch-client (the client, believing itself inside the SteamRT container, starts + every game "alongside Steam" through it, and Valve's needs a launcher service on a session bus); + i386 builds of the session shim (the i386 controller reader crashes the game and is left out for + now). A steam:// URL written to the launch dir now reaches the running client. +- **FEX with host thunks** (fex-2609-r3): FEX's Vulkan/GL/EGL/DRM/Wayland/ALSA thunks, 64- and + 32-bit guests, guest halves cross-compiled against an Arch x86_64/multilib sysroot. The x86 client + uses them when installed (GPU mode, the arm64 client's ANGLE-on-Vulkan flags) - built, not yet + device-tested. +- The proot fast path now stands down in FEX only for 32-bit programs (it broke FEX's 32-bit mode). +- **On the GPU, VAC proven (19:40):** games get FEX's host thunks and the session's Turnip/Zink + settings (the client and its browser stay in software: with the thunks the browser's GPU process + dies and the client never opens a window). Left 4 Dead 2 in The Passing on an online server: + 51 fps (was ~11 in software). The server answered the A2S info query as "Valve Left4Dead 2 US + East Server", VAC=1 - an official VAC-secured server, which the arm64 client is refused. +- The crash that held this up was not the GPU: the 32-bit controller reader was still preloaded + (FEX falls through to the session's own i386 copy), and the game's SDL2 strdup()s a NULL udev + attribute of its fake devices. Found with a SIGSEGV logger (tools/diag/segvlog.c). +- The Linux FEX as a component file: /sdcard/Download/FEX-2609-r2-x86-64-guest.wcp (type + FEX-Guest); the Components section does not know that type yet. + +Open: +- VAC test: L4D2's native Linux build in the x86 client's own library (hard-linked from the arm64 + copy, same filesystem, so only the Linux depots download). Native Linux games start inside the + Steam Linux Runtime container (pressure-vessel) - expected to need the same treatment. +- No x86 GPU driver: games render with llvmpipe. Playable needs FEX host thunks. +- Windows games in the x86 client need x86 Proton = pressure-vessel. +- One client per account: integration would be a per-title hand-off, not side by side. ## 2026-10-09 - `feat/games-add-edit`: add games from the Games tab, edit them like Steam's Properties - **Steam ⚙ settings:** the Games section is gone (it was a feature, not a setting). Games diff --git a/docs/quest-presentation-test.md b/docs/quest-presentation-test.md new file mode 100644 index 0000000000..3338d96a11 --- /dev/null +++ b/docs/quest-presentation-test.md @@ -0,0 +1,126 @@ +# Quest presentation candidate Test 2 — 2026-10-13 + +Base: `main` at `a394dfd31b2102e20dd99c6f51b4873bbdedab05`. +Reference APK: `DroidDeck-PR669-A6xx-Test2(1).apk`, SHA-256 +`95ffb5ea6ae61d6a92c4ce9ad46f329d77a0f113ebbaabc6da30d6c8bd951154`. +Its embedded source revision is `d3f3439bbc45ca67de86d0093356a449c2c74600`. + +## Evidence and scope + +Reported symptoms: Desktop shows vertical corruption; Steam has green marks in +its black borders; starting Desktop first also corrupts subsequent Steam, and +closing Steam can expose corruption when returning to the menu. The supplied +modified PR669 APK reportedly avoids the transition problem. + +Source inspection confirms that the compositor outlives sessions. The old +Quest workaround enables only `hdr.steam`, and the initial HDR-gated layer +selection happens only at compositor startup. Whole desktops and black borders +can still use the Android Vulkan swapchain even when a fullscreen game uses a +SurfaceControl layer. This is consistent with the reported symptoms, but is not +an on-device reproduction or proof of the exact driver defect. + +The supplied APK has the same Steam-only preference initialization and the +same bundled Quest 3 Turnip binary as main (SHA-256 +`af0d6bb38756eace17b43311c5c61a7ef3dc6e83d5cb8a63577d6a1d10c0aed0`). +It additionally supports a Quest 2 driver. Therefore the APK comparison does +not establish a new Quest 3 driver regression. Device, installed driver, +persistent preferences and session logs still matter. + +## Test 1 startup regression and Test 2 correction + +The Test 1 user confirmed a Quest 3 and a black window after runtime setup. +The supplied state report identifies `0.4.0-questdisplay-test1`, runtime `r9` +installed, an active guest, `installing=null`, no recorded failure, and saved +session artifacts. The session was suspended at capture. Suspension alone does +not establish the cause of the original black window. The retained main log +starts after the test window was closed, so the startup diagnostics are absent. + +Source review found a Test 1 bug: `vkp_render` unconditionally signaled the first +frame after successfully showing the black backdrop, even with no client draws. +The Android listener then hid the loading UI and marked Steam's window as shown. +This also happened when the content-layer operation returned a successful no-op +(no visible geometry or no available pool slot). Consequently `firstFrame=true` +in Test 1 is not reliable evidence that Steam had displayed a frame. + +Test 2 removes the backdrop notification. The existing content-layer presenter +owns the notification after submitting client content. A host regression test +compiles the production `vkp_render` entrypoint with controlled layer outcomes; +it failed on Test 1's empty scene and passes with this change. It also covers +successful no-ops, content presentation, errors and the existing non-Quest, +frame-generation and Cardboard routes. All seven focused host tests pass. + +On 2026-10-13, the user tested Test 2 on Quest 3 and confirmed that it was +functioning as intended. This is a user-reported hardware result; a separate +pass/fail record for each checklist item below was not supplied. Broader headset, +game, colour and performance coverage remains outstanding. The user's separate +Quest 2 success report concerns the Adreno 6xx compatibility PR, not this build. + +## Candidate change + +- Recognize Quest 2/3/3S for presentation independently of HDR and session order. + This does not install an A6xx driver or expand main's Quest 2 driver support. +- Enable the layer protocol before the first client connects. +- Compose complete SDR scenes into the existing GPU-rendered gralloc layer, + including Desktop's multiple windows. Keep the existing path for a fullscreen + AHB that cannot be imported into the compositor. +- Present the black backdrop as an opaque SurfaceControl layer, initialized + once through a CPU-mapped 16-by-16 buffer. Game/desktop rendering stays on + the GPU. The backdrop does not use a Turnip Android swapchain. +- Use actual native-window dimensions for layer geometry without creating a + Vulkan swapchain solely for sizing. +- Retire the backdrop on detach/rebind and hide it before a real swapchain + frame. Reject a black buffer whose CPU lock/unlock failed. + +Other devices retain their normal presentation paths. Frame generation and +Cardboard still use the original swapchain path and are outside this test's +coverage; leave them off for the first test. HDR negotiation itself is unchanged. + +## Validation + +The full ARM64 native compositor, including the existing frame-generation +engines, is compiled from this checkout with Android NDK r27d, API 26 and 16 KB +ELF alignment. Host tests exercise the actual backdrop implementation with +mock Android APIs: initialized pixels and padded rows, immutable reuse, +resize, hide/show, retirement/recreation, absent windows, allocation/lock/ +unlock/transaction failure recovery, and the Quest device gate. These checks +cannot validate Horizon's compositor, colours, latency or graphics output. + +Run the focused host tests (LeakSanitizer may need `ASAN_OPTIONS=detect_leaks=0` +when the test runner itself operates under ptrace): + +```sh +python3 -m unittest tools.tests.test_quest_presentation tools.tests.test_quest_kgsl -v +``` + +The test APK uses the verified official CI APK for this exact base commit, +with only `lib/arm64-v8a/libdroiddeckwayland.so` rebuilt and replaced, an added +`assets/quest-presentation-test.json` provenance record, and a new APK signature. +DEX, other native libraries and runtime assets stay unchanged. The manifest is +repackaged with the repository's variant helper as `com.droiddeck.questdisplaytest` +so it can install beside the normal app and the supplied APK, whose signing key +is different. Provider authorities and the signature permission are renamed too. +It uses separate app data and needs its own initial setup. It is not a complete +Gradle rebuild. The displayed version is `0.4.0-questdisplay-test2`. It is signed +using the repository's public AOSP test key. The launcher label remains DroidDeck; +check the version in app info to distinguish the test installation. + +Test 2 retains Test 1's package, version code and signing certificate. Install it +over Test 1 without uninstalling or clearing data; its installed runtime and +session logs are retained. The original main application remains separate. + +## Headset test + +Fully close DroidDeck before starting. Keep the same driver and resolution +settings that produced the problem; turn off frame generation and Cardboard. + +1. Cold launch Desktop. Check the desktop, windows and black borders. +2. Switch Desktop to Steam without restarting the app. +3. Close Steam and return to the DroidDeck menu. +4. Fully close the app, then launch Steam first; inspect the top/bottom borders. +5. Switch to Desktop and repeat both transitions several times. +6. Resize the Quest panel and suspend/resume the app once. + +Record the headset model and whether each step is fixed. If it fails, export +that session's logs, including `wayland.log` and device information. Look for +`Quest presentation: display layers for Steam and desktop` to confirm this +renderer was loaded. Test 2's reported Quest 3 result is recorded above. diff --git a/docs/quest.md b/docs/quest.md new file mode 100644 index 0000000000..067b708921 --- /dev/null +++ b/docs/quest.md @@ -0,0 +1,210 @@ +# Experimental Quest 2/3/3S support + +Quest runs DroidDeck as a 2D panel, with an experimental immersive SteamVR path +in the standard app. Quest 2 has a separate experimental Adreno 6xx driver path. + +Quest 2 selects `turnip26.3.0-quest2`, a pinned Banners-Turnip A6xx/A7xx build +with the same GPUOBJ adapter. It does not select the Quest 3 A7xx binary. +The first Quest 2 launch applies manual driver selection and the SurfaceControl +workaround, even if `questDefaultsV1` exists from an earlier install. Later user +choices are retained. The separate `turnip26.3.0-a6xx` bundle provides a plain +Adreno 6xx offline fallback for other devices; their driver Auto behavior remains. +Neither family-wide hardware coverage nor Quest 2 operation has been verified. + +The A6xx input URL and SHA-256 are pinned in `tools/quest/build-driver.py`. +Both A6xx bundles are prepared by the existing local/CI wrapper build step and +covered by runtime-input attestation. Quest 3/3S retains its original driver. +Early installation and compositor breadcrumbs are written to `driver-setup.txt` +in private files and, when available, the app's external files directory. They +do not require a Steam session. The existing Quest Java crash file now also +applies to Quest 2; native crashes still require Android logcat. + +Install the standard DroidDeck APK on Quest 3/3S. Device detection on the +first launch selects manual drivers, the bundled +`turnip25.1.0-quest1` Android driver and the default Linux driver. It enables +`hdr.steam` to use the existing SurfaceControl presentation workaround from +[the Quest report](https://github.com/Droid-Deck/DroidDeck/issues/245). +Presentation also has a Quest-specific layer path for complete SDR scenes and +the black backdrop, independent of this HDR preference; see +[the presentation candidate and headset test](quest-presentation-test.md). +These defaults apply once; subsequent user changes are retained. Colour +accuracy and headset performance still need testing. + +Selecting driver Auto also uses the bundled Quest display driver and runtime +default, without downloading a generic Adreno driver pair. Manual selections +remain available and are not replaced on startup. Android's Auto-by-GPU fallback +uses the Quest bundle too; the external `Download/droiddeck-driver` override +still takes precedence. Fully close and restart DroidDeck after changing the +display driver, since the compositor loads it once per app process. + +Both the Android driver wrapper and the Linux session preload use +`tools/quest/kgsl_compat.c`. Successful legacy allocation/free calls are +unchanged. Only `EACCES`/`EPERM` failures retry through `GPUOBJ_ALLOC`, +`GPUOBJ_INFO` and `GPUOBJ_FREE`. The Android wrapper depends on the original +bundled Turnip binary. Unhandled controller ioctls forward to the next +preload hook rather than skipping it with a raw syscall. + +`tools/build_local.sh` and CI build the wrapper from source using the pinned +Android NDK; the normal preload builds include the shared Linux adapter. +Runtime input verification checks the resulting driver archive and invalidates +stale prepared assets after compatibility sources change. To rebuild only the +Android driver archive: + +```sh +python3 tools/quest/build-driver.py "$ANDROID_HOME/ndk/27.3.13750724" +``` + +Quest compatibility is included in the standard APK; no separate Quest +package is needed. Other devices retain their existing defaults. The remaining +performance-name APK variants continue to use separate app data and bwrap sockets. + +Quest 3 testers have successfully launched games. + +On a headset, check the Steam login panel, sign-in, game installation and +then an owned game's rendering/input. Capture the device/OS, session logs, +`files/quest-startup.txt` and any `files/quest-last-crash.txt` failure. +Host allocation and preload-chain tests do not establish headset operation. + +## Experimental immersive SteamVR + +In a running Steam session, open the session menu's SteamVR tab, install SteamVR +once, then choose Enter SteamVR. Cardboard has its own tab and can remain off. On supported Quest devices this opens the standard app's +OpenXR activity. The guest driver receives headset poses, Touch controller input +and display timing, and returns owned stereo images tagged with the latest eye poses. +SteamVR haptics return through the tracking bridge. No root or separate XR APK +is required. Other devices retain their existing SteamVR start behavior. + +The left Touch menu button is SteamVR's system button and toggles its dashboard. +The right Meta button remains reserved by the headset OS. + +The driver supplies SteamVR's version-5 chaperone configuration through +`Prop_DriverProvidedChaperoneJson_String`, following Valve's driver API. Standing +tracking keeps the OpenXR stage coordinates; seated tracking starts at the head's +position and yaw. No synthetic play area or collision walls are advertised. +Without a seated transform, SteamVR reported valid raw and standing poses but +invalid seated poses, causing Thumper to remain behind its tracking-loss fade. +On Quest, supplying both transforms made all three origins valid; seated height +started within a millimetre of zero while standing and raw height stayed unchanged. + +Quest uses SteamVR's normal Linux compositor through its display component. +The Vulkan layer captures only the HMD display swapchain, retains its present +waits, and chains a GPU copy before presentation. Three bounded capture buffers +allow rendering and transfer to overlap. Where native GLES supports +`GL_EXT_external_buffer` and texture views, Android allocates three +`AHardwareBuffer` BLOBs and passes their DMA-BUF allocations to Linux through +`SCM_RIGHTS`. Vulkan imports them as buffers and transfers foreign queue-family +ownership before and after copying the display image. A native compute shader +reads each shared buffer into a private RGBA8 texture; an sRGB texture view +preserves hardware transfer decoding. Native GPU completion precedes the +acknowledgement, so Linux cannot overwrite an active reader. This removes the CPU +pixel copy and upload, but still includes GPU copies and explicit completion waits. + +If capability negotiation or buffer import fails before frames are submitted, +the existing CPU transport remains available. It brackets the DMA-BUF read with +`DMA_BUF_IOCTL_SYNC`, copies to owned pixels, then acknowledges and uploads them. +Both channels authenticate the peer UID and bound buffer sizes. Missing +acknowledgements after submission quarantine the transfer and fail presentation +instead of falling back while a reader might still own a buffer. + +The helper temporarily enables SteamVR's Linux Vulkan asynchronous queue and disables motion +smoothing, backing up those preferences and restoring them on stop or the next start +after an interrupted session. It excludes the pinned Steam Frame package's optional CVP backend, +whose library constructor exits on Quest's unsupported SoC. The original library +is retained with a `.droiddeck-disabled` suffix. SteamVR binaries are not patched. +Cardboard retains its existing direct-mode path; `questframes` remains an explicit +diagnostic override for the earlier driver presenter. + +The panel compositor detaches before OpenXR starts displaying guest frames. +Session suspension accounts for the immersive activity while the panel is hidden. +Closing the immersive activity stops SteamVR. The panel remains available for +returning to the normal Steam session. +The immersive activity belongs to the Steam session that opened it. Ending that +session closes XR; a failed startup or stopped SteamVR also returns to the panel +with an error instead of leaving a black scene. Enter SteamVR can then start a +fresh connection. + +SteamVR scene-application and dashboard events also guide Gamescope's game focus. +While the dashboard is hidden, the guest agent resolves the live scene process's +Steam app ID and promotes its focusable window. Opening the dashboard or ending +the scene restores the previous order if no other client has replaced it. This +keeps keyboard/gamepad input with the VR scene without game-specific IDs. + +With Steam already running, `python3 tools/test_quest_xr.py --serial SERIAL` +launches the immersive activity and verifies advancing owned images, tracked +6DoF, focus and SteamVR status. Add `--require-controllers` while holding both +controllers. Results include telemetry and logcat in `build/questxr-validation`. +Host tests and APK installation alone do not establish headset operation. + +On Quest 3, a 45-second hardware run maintained focused tracked 6DoF, both +controllers active, and advancing stereo images. A headset tester confirmed +controller models and trigger animation. That run delivered about 8.5 new stereo +images per second despite a 90 Hz XR session. +That earlier measurement used the driver-direct presenter. With SteamVR's normal +compositor, a native Vulkan scene passed its first submission and continued +submitting stereo frames. Thumper and The Thrill of the Fight produced clean +immersive scenes. SUPERHOT's Windows OpenXR build initially showed shared-image +corruption: DXVK supplied a restricted mutable-image format list while SteamVR +created its corresponding opaque shared images without one. Turnip can select +different memory layouts for those descriptions. On the Quest bridge, the layer +normalizes the known opaque-FD stereo-array creation chains to SteamVR's unrestricted list, +without changing application-owned single-layer OpenVR images, DMA-BUF/modifier +images or other targets. A headset capture then +showed clean SUPERHOT scene geometry; interactive gameplay remains unverified. +A subsequent 60-second shared-buffer dashboard run delivered about +43 new stereo images per second. Reusing Android pixel buffers raised the next +60-second run to about 68 received and 65 uploaded images per second, with valid +focused tracking and no rejected frames. These dashboard results do not establish refresh-rate gameplay: game input, +sustained game performance, and exact association with SteamVR's final compositor +pose still require validation. + +The native GPU-buffer channel passed 256 full-size buffer reuse cycles, including +head/tail pixel checks and sRGB texture-view decoding. A subsequent SUPERHOT +scene run delivered about 43 new stereo images/s and 58 XR draws/s over one +minute, with focused tracking and no rejected frames. The earlier CPU-path +SUPERHOT run uploaded about 28 images/s; these are separate runs, not a controlled +benchmark. Capturing the source and eye images can delay frame consumption; +the GPU receiver acknowledges stale frames without reading them and keeps the +last private image until a fresh frame arrives. Missing completion still fails +closed. `frame_verify` explicitly selects the CPU path for byte comparison. + +The frame channel supports linear and sRGB RGBA8. SteamVR's final display image +uses sRGB display values; Android decodes those during texture sampling and writes +to an sRGB eye swapchain, encoding the display values once. A Quest color-chart +capture verified that 64, 128, 192 and 224 grey patches retain those values; +the previous sRGB source upload darkened them to approximately 13, 55, 134 and +190. The transport remains 8-bit SDR; this correction does not add HDR or higher +precision gradients. + +When available, `XR_EXT_performance_settings` requests sustained-high CPU and GPU +performance for the running OpenXR session. These are runtime-managed hints; +device power and thermal policies remain authoritative. Unsupported or rejected +requests do not prevent startup. This does not change render resolution. + +The manifest declares the supported Quest models using Meta's standard +`com.oculus.supportedDevices` metadata. Without it, Quest 3 used compatibility +mode and its refresh-rate API returned an empty capability list. With the +declaration, the test runtime reported 72/80/90/120 Hz; a fresh normal launch +used 72 Hz in both OpenXR telemetry and SteamVR's HMD property. DroidDeck leaves +the refresh choice to the runtime. No forced refresh override is included. + +The OpenVR driver maps OpenXR's asymmetric eye FOV to OpenVR's lower/upper Y +projection bounds. A live Quest 3 check confirmed that SteamVR and native +OpenXR now report the same vertical projection center; the previous mapping +mirrored that offset. This applies to every VR scene, without game-specific +rendering changes. + +### Experimental flat games in SteamVR + +Start SteamVR first, then add `droiddeck-steamvr-game %command%` to a flat +game's Steam launch options. Remove that prefix to restore normal panel launch. +This runs a nested, unmodified Gamescope OpenVR backend for that game. Gamescope +owns the GPU overlay, placement and input routing; no CPU screen capture or +PipeWire service is used. The existing DroidDeck Vulkan synchronization layer +remains enabled. On Quest, a connected XR receiver selects Gamescope's Vulkan +texture sharing instead of DMA-BUF modifiers. Explicit environment overrides +are preserved; other devices retain the upstream modifier default. + +An upstream GPU cube overlay has been observed on Quest 3. Flat-game stability, +controller interaction and performance still require hardware validation. This +uses Valve's public Gamescope backend; the exact Steam Frame OS launch setup +has not been verified. diff --git a/docs/releases/0.4.0.md b/docs/releases/0.4.0.md new file mode 100644 index 0000000000..62bfe892b3 --- /dev/null +++ b/docs/releases/0.4.0.md @@ -0,0 +1,123 @@ +# DroidDeck 0.4.0 + +<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> + +> **TL;DR for Mr. Sujano specifically** +> +> And speaking about the coolest thing since sliced bread, next up here we're talking about DroidDeck. +> +> For those who are unaware, DroidDeck brings the SteamOS experience to Android on your Snapdragon powered handheld, and DroidDeck just got a brand new update. Now, they just released version 0.4.0, and taking a look at this update, it seems to be a pretty big one. +> +> It says here they've added GOG, Epic Games and Amazon Games integration, with cloud saves for GOG and Epic. On top of that here, they've implemented a fully featured SteamOS-style KDE Plasma desktop with a working "Return to Gaming Mode." +> +> Steam's own Steam Link touch controller, with community layouts that back up to Steam Cloud. Support for connecting up to four controllers for local co-op. Native support for the new Steam Controller. And the built-in controls can now pretend to be a Steam Deck, Steam Controller, Xbox 360, DualShock 4 or DualSense. +> +> If you're on a foldable, Steam and your games now resize when you fold, unfold or rotate, and there's an optional touch gamepad below the game when it's unfolded. +> +> They've also got per-game compatibility profiles, automatic redistributable and Windows component installs, their own custom DroidDeck-Proton, and streamlined non-Steam game imports with automatic artwork. And on the performance side, PRoot is up to 57% faster in some workloads, with lower idle CPU usage, and even more. +> +> You let me know your thoughts. + +### Features + +- Replaced LXQt with **SteamOS-style KDE Plasma 6.7**, including the familiar desktop layout, Dolphin, Firefox, Konsole, the Steam desktop client and Return to Gaming Mode. (@xXJSONDeruloXx, [#473](https://github.com/Droid-Deck/DroidDeck/pull/473), [#610](https://github.com/Droid-Deck/DroidDeck/pull/610)) + + <img src="media/0.4.0/desktop-round-trip.gif" width="50%" alt="Switching from Steam to the KDE Plasma desktop, browsing the application launcher, then returning to Gaming Mode; loading shortened and boot animation removed"> +- Added **GOG, Epic Games and Amazon Games** integration with account sign-in, game libraries, downloads and launching through Steam. GOG and Epic games also support cloud saves. (@The412Banner, @xXJSONDeruloXx, @Gustash, @maxjivi05, [#476](https://github.com/Droid-Deck/DroidDeck/pull/476), [#500](https://github.com/Droid-Deck/DroidDeck/pull/500), [#578](https://github.com/Droid-Deck/DroidDeck/pull/578), [#400](https://github.com/Droid-Deck/DroidDeck/pull/400)) + + <img src="media/0.4.0/store-downloads.gif" width="50%" alt="Browsing the Epic Games library, installing 20 Minutes Till Dawn and viewing its download progress"> + <img src="media/0.4.0/gog-sign-in.jpg" width="50%" alt="GOG store tab with its Sign in button"> +- Added **Steam's native touch controller (beta)**, with per-game Steam Input layouts, community configurations, an on-screen layout editor and Steam Cloud syncing. (@xXJSONDeruloXx, [#431](https://github.com/Droid-Deck/DroidDeck/pull/431)) + + <img src="media/0.4.0/castle-crashers-touch.gif" width="50%" alt="Launching Castle Crashers with Steam touch controls that switch to its game-specific icons, then browsing and applying a community touch layout; loading and menus sped up"> + <img src="media/0.4.0/steam-touch-editor.jpg" width="50%" alt="Castle Crashers touch layout editor"> + + <details> + <summary>Steam Input layouts and touch settings</summary> + + <img src="media/0.4.0/steam-input-touch.jpg" width="50%" alt="Steam Input settings for the Remote Play Touch Controller"> + <img src="media/0.4.0/steam-input-cloud-layouts.jpg" width="50%" alt="The saved Castle Crashers touch layout in Steam Input"> + <img src="media/0.4.0/steam-input-community.jpg" width="50%" alt="Community touch-controller layouts for Castle Crashers"> + <img src="media/0.4.0/steam-touch-menu.jpg" width="50%" alt="Castle Crashers touch controller and mouse settings"> + + </details> +- Added **multi-controller support for up to 4 players**, allowing connected Android gamepads to work independently for local co-op and split-screen multiplayer through Steam Input. (@xXJSONDeruloXx, @maxjivi05, @Neolyum, [#431](https://github.com/Droid-Deck/DroidDeck/pull/431), [#614](https://github.com/Droid-Deck/DroidDeck/pull/614)) + + <img src="media/0.4.0/multi-controller.gif" width="50%" alt="Two Bluetooth controllers playing split-screen on the Thor, with both listed under connected devices on the bottom screen"> +- Added **Bluetooth LE Steam Controller (2025)** support, including trackpads, back grips and motion controls. (@SG3xHERO, [#404](https://github.com/Droid-Deck/DroidDeck/pull/404)) + + <img src="media/0.4.0/steam-controller-ble.jpg" width="35%" alt="A 2025 Steam Controller connected to the Thor over Bluetooth, with its Steam Input layout on the top screen"> +- The built-in controller can now emulate a **Steam Deck, Steam Controller, Xbox 360, DualShock 4 or DualSense**, with live switching from the session menu without restarting Steam. (@xXJSONDeruloXx, [#545](https://github.com/Droid-Deck/DroidDeck/pull/545), [#558](https://github.com/Droid-Deck/DroidDeck/pull/558), [#559](https://github.com/Droid-Deck/DroidDeck/pull/559)) + + <img src="media/0.4.0/controller-emulation.jpg" width="50%" alt="Choosing the emulated built-in controller during a Castle Crashers session: Steam Deck, Steam Controller, DualShock 4, DualSense or Xbox 360"> +- Added persistent **per-game compatibility profiles** for Proton, FEX, DXVK, VKD3D-Proton, Windows components, environment variables and texture filtering, with inheritance from your default settings. (@jmarti326, [#449](https://github.com/Droid-Deck/DroidDeck/pull/449)) + + <img src="media/0.4.0/game-profiles.jpg" width="50%" alt="Configure profile menu listing the default profile and per-game profiles"> +- Completely revamped **adding and managing non-Steam games**, with automatic game detection, artwork, bulk imports and editing directly from the Games tab. (@The412Banner, [#492](https://github.com/Droid-Deck/DroidDeck/pull/492)) + + <img src="media/0.4.0/add-game.jpg" width="50%" alt="The Games tab Add a game dialog, choosing internal storage or an SD card to scan"> +- Added **Follow screen** resolution for foldables, automatically resizing Steam and games when folding, unfolding or rotating the device. (@SG3xHERO, [#403](https://github.com/Droid-Deck/DroidDeck/pull/403)) + + <img src="media/0.4.0/follow-screen-landscape.jpg" width="35%" alt="Steam filling the inner screen of an unfolded foldable in landscape"> + <img src="media/0.4.0/follow-screen-portrait.jpg" width="20%" alt="Steam resized to the inner screen in portrait"> + <img src="media/0.4.0/follow-screen-cover.jpg" width="42%" alt="Steam resized to the folded cover screen"> +- Added an optional **touch gamepad below the game on unfolded foldables**, with Steam Deck-style controls, configurable sticks and trackpads. (@SG3xHERO, [#407](https://github.com/Droid-Deck/DroidDeck/pull/407)) + + <img src="media/0.4.0/foldable-gamepad.jpg" width="25%" alt="Steam on the top half of an unfolded foldable with the touch gamepad below it"> + <img src="media/0.4.0/foldable-trackpads.jpg" width="25%" alt="The foldable touch gamepad switched to its two-trackpad layout with back buttons"> + <img src="media/0.4.0/foldable-landscape.jpg" width="50%" alt="The foldable touch gamepad in landscape, laid out along the bottom edge under Steam"> +- Added **DroidDeck-Proton** as an installable Proton source alongside GE-Proton and CachyOS Proton, with update notifications for all three. (@The412Banner, [#588](https://github.com/Droid-Deck/DroidDeck/pull/588)) +- Added support for installing **Flatpak apps directly from .flatpak bundles**, including apps no longer available through Flathub. (@xXJSONDeruloXx, [#446](https://github.com/Droid-Deck/DroidDeck/pull/446)) +- Added a manual **landscape orientation** setting, including reverse landscape. (@Kobtul, [#441](https://github.com/Droid-Deck/DroidDeck/pull/441)) +- Added an optional controller setting to open the Steam menu with the physical **Select** button. (@0x1428571429, [#384](https://github.com/Droid-Deck/DroidDeck/pull/384)) + +### Improvements + +- Major **launcher UI redesign** across Steam settings, Components, Setup, Stores, Flathub and Desktop, with smoother transitions, animated navigation, redesigned settings panels and improved controller focus. (@xXJSONDeruloXx, [#482](https://github.com/Droid-Deck/DroidDeck/pull/482), [#548](https://github.com/Droid-Deck/DroidDeck/pull/548), [#605](https://github.com/Droid-Deck/DroidDeck/pull/605)) + + <img src="media/0.4.0/steam-settings.gif" width="50%" alt="Opening the slide-up Steam settings panel and switching to Display settings"> +- **Store downloads now survive app restarts**, preserving queued and paused downloads and allowing interrupted installs to resume from the Downloads page. (@xXJSONDeruloXx, [#608](https://github.com/Droid-Deck/DroidDeck/pull/608)) +- Store game removal now shows **confirmation and uninstall progress** before returning the game to its installable state. (@xXJSONDeruloXx, [#609](https://github.com/Droid-Deck/DroidDeck/pull/609)) +- Expanded **PRoot fast paths**, with performance improvements of up to 57% in measured workloads, alongside further reductions in filesystem and process overhead. (@maxjivi05, @xXJSONDeruloXx, [#466](https://github.com/Droid-Deck/DroidDeck/pull/466), [#494](https://github.com/Droid-Deck/DroidDeck/pull/494)) +- Significantly reduced launcher idle CPU usage, controller input overhead and session log processing time, with additional game startup and performance optimizations. (@maxjivi05, [#529](https://github.com/Droid-Deck/DroidDeck/pull/529)) +- **Windows components are now selected automatically** using each game's Steam, GOG, Epic or Amazon dependency information, while preserving manual overrides. (@The412Banner, [#554](https://github.com/Droid-Deck/DroidDeck/pull/554)) +- Expanded Windows component installation to support **VC++ redistributables, .NET Framework and more installer formats**, without needing to run the original Windows setup programs. (@The412Banner, [#480](https://github.com/Droid-Deck/DroidDeck/pull/480), [#495](https://github.com/Droid-Deck/DroidDeck/pull/495)) +- KDE Desktop can now launch **Windows executables, Linux programs, AppImages and scripts** directly from the file manager or terminal. (@maxjivi05, [#549](https://github.com/Droid-Deck/DroidDeck/pull/549)) +- Added safer **Desktop uninstall and legacy LXQt cleanup**, preserving user data while reclaiming storage from older desktop installations. (@xXJSONDeruloXx, [#493](https://github.com/Droid-Deck/DroidDeck/pull/493)) +- Improved **Proton and component management**, with newest versions shown first, update detection, clearer installed-version information and streamlined settings. (@The412Banner, @xXJSONDeruloXx, [#588](https://github.com/Droid-Deck/DroidDeck/pull/588), [#606](https://github.com/Droid-Deck/DroidDeck/pull/606)) +- Improved **DirectAudio compatibility**, including CachyOS Proton support and direct audio output from the Steam client. (@The412Banner, [#439](https://github.com/Droid-Deck/DroidDeck/pull/439)) +- Reduced unnecessary motion sensor polling, reading the device's gyro and accelerometer only when Steam requests them. (@muazkadan, [#534](https://github.com/Droid-Deck/DroidDeck/pull/534)) +- Added alignment guides and snapping when dragging buttons in the **on-screen controller editor**. (@willie-yao, [#490](https://github.com/Droid-Deck/DroidDeck/pull/490)) +- Improved security by **encrypting store credentials with Android Keystore** and keeping logs in private app storage until explicitly shared as a sanitized ZIP. (@The412Banner, [#484](https://github.com/Droid-Deck/DroidDeck/pull/484), [#486](https://github.com/Droid-Deck/DroidDeck/pull/486)) +- Steam now consistently uses **Steam Deck mode and the Steam Deck beta branch**, removing the legacy client and mode switches. (@xXJSONDeruloXx, [#546](https://github.com/Droid-Deck/DroidDeck/pull/546)) + +### Fixed + +- Fixed **Red Dead Redemption 2** failing to launch, and reduced resource usage from the Rockstar launcher while playing. (@maxjivi05, [#585](https://github.com/Droid-Deck/DroidDeck/pull/585)) +- Fixed Steam's screensaver appearing over running games after prolonged controller inactivity. (@maxjivi05, [#585](https://github.com/Droid-Deck/DroidDeck/pull/585)) +- Fixed **black Steam output with FSR 1** image scaling enabled. (@xXJSONDeruloXx, [#597](https://github.com/Droid-Deck/DroidDeck/pull/597)) +- Fixed **touch and mouse input landing away from the displayed position** when the session resolution and device screen have different aspect ratios. (@maxjivi05, [#389](https://github.com/Droid-Deck/DroidDeck/pull/389)) +- Fixed the **Odin 3 unexpectedly rebooting** when its Wi-Fi firmware enters low-latency mode. (@kmnkv1, [#512](https://github.com/Droid-Deck/DroidDeck/pull/512)) +- Fixed **Linux runtime removal getting stuck** on files that Android's SELinux policy would not allow the app to delete. (@xXJSONDeruloXx, [#463](https://github.com/Droid-Deck/DroidDeck/pull/463)) +- Fixed **Android 12 and older devices crashing during audio initialization**, and restored Firefox compatibility on affected Android 16 devices. (@kolmant, @The412Banner, [#531](https://github.com/Droid-Deck/DroidDeck/pull/531), [#460](https://github.com/Droid-Deck/DroidDeck/pull/460)) +- Fixed **Bluetooth keyboards with combined keyboard, mouse and controller interfaces** losing ordinary keyboard input. (@kaosjammo, [#435](https://github.com/Droid-Deck/DroidDeck/pull/435)) +- Fixed repeated force-feedback packets unnecessarily restarting the device vibrator. (@kmnkv1, [#514](https://github.com/Droid-Deck/DroidDeck/pull/514)) +- Fixed **CPU temperature showing 0°C** in the Steam performance overlay on affected devices. (@muazkadan, [#516](https://github.com/Droid-Deck/DroidDeck/pull/516)) +- Fixed older **NativeAOT games failing to start** because of an incompatible .NET garbage collector setting. (@Arthur031221, [#385](https://github.com/Droid-Deck/DroidDeck/pull/385)) +- Fixed fullscreen layout issues around display cutouts, clipped settings, and several controller navigation and focus problems. (@kaosjammo, @xXJSONDeruloXx, [#432](https://github.com/Droid-Deck/DroidDeck/pull/432), [#596](https://github.com/Droid-Deck/DroidDeck/pull/596), [#600](https://github.com/Droid-Deck/DroidDeck/pull/600)) +- Fixed the touchpad cursor remaining visible after switching from Touchpad to Direct touch mode. (@KingHacker9000, [#424](https://github.com/Droid-Deck/DroidDeck/pull/424)) + +### New contributors + +- @SG3xHERO made their first contribution in [#403](https://github.com/Droid-Deck/DroidDeck/pull/403). +- @Arthur031221 made their first contribution in [#385](https://github.com/Droid-Deck/DroidDeck/pull/385). +- @KingHacker9000 made their first contribution in [#424](https://github.com/Droid-Deck/DroidDeck/pull/424). +- @kaosjammo made their first contribution in [#432](https://github.com/Droid-Deck/DroidDeck/pull/432). +- @Kobtul made their first contribution in [#441](https://github.com/Droid-Deck/DroidDeck/pull/441). +- @willie-yao made their first contribution in [#490](https://github.com/Droid-Deck/DroidDeck/pull/490). +- @muazkadan made their first contribution in [#516](https://github.com/Droid-Deck/DroidDeck/pull/516). +- @kolmant made their first contribution in [#531](https://github.com/Droid-Deck/DroidDeck/pull/531). +- @Gustash made their first contribution in [#578](https://github.com/Droid-Deck/DroidDeck/pull/578). +- @Neolyum made their first contribution in [#614](https://github.com/Droid-Deck/DroidDeck/pull/614). + +[Full changelog](https://github.com/Droid-Deck/DroidDeck/compare/0.3.2...0.4.0) diff --git a/docs/releases/0.5.0.md b/docs/releases/0.5.0.md new file mode 100644 index 0000000000..096ffef3ba --- /dev/null +++ b/docs/releases/0.5.0.md @@ -0,0 +1,162 @@ +# DroidDeck 0.5.0 + +<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> + +### Features + +- Added **SteamVR on Meta Quest 3 and 3S** from the standard APK. Quest headsets are detected automatically and get their own driver defaults. Immersive SteamVR runs through a native OpenXR activity with headset tracking, Touch controllers and haptics, and SteamVR's dashboard and Steam library work in VR. (@xXJSONDeruloXx, @Jagger15, [#642](https://github.com/Droid-Deck/DroidDeck/pull/642), [#910](https://github.com/Droid-Deck/DroidDeck/pull/910), [#733](https://github.com/Droid-Deck/DroidDeck/pull/733), [#853](https://github.com/Droid-Deck/DroidDeck/pull/853), [#905](https://github.com/Droid-Deck/DroidDeck/pull/905)) + + <img src="media/0.5.0/quest-steamvr.gif" width="50%" alt="On a Quest 3: DroidDeck in passthrough, Steam Big Picture in the headset, the SteamVR dashboard with a Touch controller, then playing Thumper in VR"> + + <details> + <summary>Flat games on Quest with hand tracking</summary> + + <img src="media/0.5.0/quest-flat-hands.gif" width="50%" alt="Plants vs. Zombies on a DroidDeck panel in Quest passthrough, played with hand tracking"> + + </details> +- Added experimental **Meta Quest 2** support. (@Jagger15, [#676](https://github.com/Droid-Deck/DroidDeck/pull/676)) +- Added **XR glasses support for VITURE, RayNeo and XREAL**. Games play straight on the glasses at their own refresh rate while the phone becomes the controller, and the glasses' refresh rate, 3D mode, brightness, volume and sunblock can be changed from the app or the session menu. **Play SteamVR** appears beside Play Steam when supported glasses are connected, with head tracking from the glasses. Joy-Cons work as SteamVR hands, and the phone's camera can track bare hands with Quest-style pinch gestures. Supports VITURE Pro XR, RayNeo Air and GT glasses, and XREAL 1S (experimental). Glasses with head tracking can also show a **head-tracked virtual screen** everywhere in DroidDeck, in its menus, desktop sessions and games, without starting SteamVR, set up from the new **Setup → Smart glasses** page. (@maxjivi05, @informalTechCode, [#732](https://github.com/Droid-Deck/DroidDeck/pull/732), [#907](https://github.com/Droid-Deck/DroidDeck/pull/907), [#1035](https://github.com/Droid-Deck/DroidDeck/pull/1035)) + + <img src="media/0.5.0/play-steamvr-glasses.jpg" width="50%" alt="Play SteamVR beside Play Steam with VITURE Pro XR glasses connected"> + <img src="media/0.5.0/glasses-steamvr.gif" width="50%" alt="Angry Birds VR from Play SteamVR, rendered in stereo with head pose from the glasses and the slingshot pulled with the gamepad"> + + <details> + <summary>On the glasses, and gamepad hands in SteamVR</summary> + + <img src="media/0.5.0/glasses-2d.gif" width="50%" alt="Recorded from the glasses' own 1920×1080 display: Angry Birds VR with one eye's view, slingshot pulled with the gamepad"> + <img src="media/0.5.0/glasses-gamepad-hands.gif" width="50%" alt="Gamepad hands pointing at Angry Birds VR's level select"> + + </details> +- Added **Cardboard VR mode** with Valve's ARM64 SteamVR, splitting the screen into two lens-corrected eyes with head tracking. Windows VR games such as Thumper and The Thrill of the Fight run through Proton. SteamVR and Cardboard share one **VR** tab in the session menu. (@xXJSONDeruloXx, [#704](https://github.com/Droid-Deck/DroidDeck/pull/704), [#959](https://github.com/Droid-Deck/DroidDeck/pull/959)) + + <img src="media/0.5.0/cardboard-thumper.jpg" width="50%" alt="Thumper in Cardboard VR mode, split into two lens-corrected eyes"> + <img src="media/0.5.0/cardboard-thrill-of-the-fight.jpg" width="50%" alt="The Thrill of the Fight's weigh-in scene in Cardboard VR mode"> + <img src="media/0.5.0/vr-drawer-tab.jpg" width="50%" alt="The session menu's VR tab with SteamVR and Cardboard sections"> +- Added **Epic Games Launcher for Linux**, Epic's own client, running under FEX and signed in automatically with your linked Epic account. Every Epic game now starts through Steam and the launcher, so games get the same sign-in and online services as on a PC, along with Steam Input and the performance overlay. The launcher can be driven with a gamepad or touch. Games installed from inside the launcher appear in the Games tab automatically, and your Steam games can be started from the launcher's library. (@maxjivi05, [#928](https://github.com/Droid-Deck/DroidDeck/pull/928)) + + <img src="media/0.5.0/epic-launcher.gif" width="50%" alt="Opening the Epic Games Launcher from the Epic tab, already signed in, and browsing its library"> + <img src="media/0.5.0/epic-launcher-games-tab.jpg" width="50%" alt="The Epic Games Launcher in the Games tab next to Epic games, with Launch and Uninstall"> + + <details> + <summary>Gamepad navigation and launching through Steam</summary> + + <img src="media/0.5.0/epic-launcher-gamepad.gif" width="50%" alt="Moving the selection ring across the launcher's library with the D-pad"> + <img src="media/0.5.0/epic-launch-through-steam.gif" width="50%" alt="Launching Alone With You from the Games tab: Steam starts the launcher in the background, which hands the game back to Steam"> + <img src="media/0.5.0/epic-launcher-library.jpg" width="50%" alt="The Epic Games Launcher's library running on DroidDeck"> + + </details> +- Added an optional **x86-64 Steam client**: Valve's own Linux client, running under FEX beside the default ARM64 one. Choose it under **Steam client** in Steam settings; it applies at the next session. It has its own game library and shares your sign-in. Games with a Linux version, such as Team Fortress 2 and Half-Life, run their Linux builds on it, and Windows games use DroidDeck-Proton as before. New FEX builds reach it without an app update. (@The412Banner, [#152](https://github.com/Droid-Deck/DroidDeck/pull/152), [#1050](https://github.com/Droid-Deck/DroidDeck/pull/1050), [#1053](https://github.com/Droid-Deck/DroidDeck/pull/1053)) +- **Linux games run under FEX out of the box.** Proton Experimental ARM64, FEX and the Steam Linux Runtimes now download on the first Steam start instead of waiting as pending downloads. x86 Linux games start, keep running and take the controller under FEX, including Unity games, which used to crash or ignore the gamepad. Games that also have a Windows version stay on Proton by default, because the Windows build often runs better. To run a game's Linux build instead, choose **Linux x86 (FEX)** in its compatibility settings. (@maxjivi05, [#1045](https://github.com/Droid-Deck/DroidDeck/pull/1045)) +- Store game pages now show **HowLongToBeat times, Metacritic scores**, developer, publisher and release date for GOG and Epic games, along with an **achievements** card with filters for unlocked, locked and hidden achievements. (@phobos665, @xXJSONDeruloXx, [#641](https://github.com/Droid-Deck/DroidDeck/pull/641), [#712](https://github.com/Droid-Deck/DroidDeck/pull/712), [#775](https://github.com/Droid-Deck/DroidDeck/pull/775)) + + <img src="media/0.5.0/game-page-hltb-metacritic.jpg" width="50%" alt="Backpack Hero's Epic page with its Metacritic score of 76, HowLongToBeat times and achievements card"> +- Added opt-in **GOG achievements** syncing through Comet, with unlock notifications while you play. (@xXJSONDeruloXx, [#651](https://github.com/Droid-Deck/DroidDeck/pull/651)) +- Added **sorting and a list view** for the store Library and Installed tabs: sort by recently played, recently installed, title, size or release date, and switch between cards and a compact list. (@kingokksa, [#798](https://github.com/Droid-Deck/DroidDeck/pull/798)) + + <img src="media/0.5.0/sort-list-view.gif" width="50%" alt="Sorting the Epic library by size and by title, then switching from the card grid to the list view"> +- Added a **Storage** page to Setup that shows where DroidDeck's storage goes and frees what is safe to remove: unused Steam runtimes, leftovers from uninstalled games, old logs, shader caches, unused components and Flatpak runtimes. Starting Steam with less than 10 GB free offers to free up space. (@xXJSONDeruloXx, [#913](https://github.com/Droid-Deck/DroidDeck/pull/913)) + + <img src="media/0.5.0/storage-overview.jpg" width="50%" alt="Storage page overview with the internal storage bar and its categories"> + <img src="media/0.5.0/storage-cleanup.jpg" width="50%" alt="Storage Clean up checklist with sizes and the safe items selected"> +- Added **artwork changing for Steam games and GOG, Epic and Amazon games**, matching added games, with a SteamGridDB search in the art chooser. **Adjust logo** sets where a game's logo sits on its background and how big it is. Chosen art and logo positions are applied in Steam too. (@FX192, [#876](https://github.com/Droid-Deck/DroidDeck/pull/876), [#939](https://github.com/Droid-Deck/DroidDeck/pull/939), [#948](https://github.com/Droid-Deck/DroidDeck/pull/948), [#976](https://github.com/Droid-Deck/DroidDeck/pull/976), [#1004](https://github.com/Droid-Deck/DroidDeck/pull/1004)) + + <img src="media/0.5.0/steam-artwork.jpg" width="50%" alt="The Artwork editor for Moonlighter, a Steam game, with its cover, background, logo and icon"> +- Redesigned the **GPU drivers** page with three modes: **Auto**, **Matched pair**, or **Mix and match** display and runtime drivers. It also shows which drivers are in use now. Auto checks for new drivers when the app opens, and if a new pair never starts a session, it rolls back to the last pair that worked. (@xXJSONDeruloXx, [#858](https://github.com/Droid-Deck/DroidDeck/pull/858), [#972](https://github.com/Droid-Deck/DroidDeck/pull/972)) + + <img src="media/0.5.0/gpu-drivers.jpg" width="50%" alt="GPU drivers page with Auto, Matched pair and Mix and match, and the drivers in use"> +- Added **Boot movie** settings: the DroidDeck movie at 30 or 60 fps, with or without sound, or import your own video, which is converted on the device. (@xXJSONDeruloXx, [#969](https://github.com/Droid-Deck/DroidDeck/pull/969)) + + <img src="media/0.5.0/boot-movie.jpg" width="50%" alt="Boot movie settings in the Steam settings sheet: movie, sound and Import"> +- Added a per-game **Start without Steam** switch for games that close right away because of Proton's Steam setup. (@The412Banner, [#659](https://github.com/Droid-Deck/DroidDeck/pull/659)) +- Added **Low-latency controller** and **Low-latency touch** toggles to the session menu, which apply immediately while Steam is running. (@xXJSONDeruloXx, [#808](https://github.com/Droid-Deck/DroidDeck/pull/808)) + + <img src="media/0.5.0/low-latency.jpg" width="50%" alt="The session menu's Latency group with Low-latency controller and Low-latency touch"> +- A **three-finger tap** opens and closes Steam's on-screen keyboard in game. (@xXJSONDeruloXx, [#782](https://github.com/Droid-Deck/DroidDeck/pull/782)) +- Added **Picture position** (Top, Bottom or Center) for Steam sessions, so fixed-aspect games can sit away from on-screen controls on tall screens. (@asdf17128, [#871](https://github.com/Droid-Deck/DroidDeck/pull/871)) + + <img src="media/0.5.0/picture-position.jpg" width="50%" alt="Picture position in the Steam settings Display tab"> +- FEX, DXVK and VKD3D-Proton versions can be **downloaded from the session menu**. (@xXJSONDeruloXx, [#679](https://github.com/Droid-Deck/DroidDeck/pull/679)) +- Added opt-in **zRAM compression** for the Steam client while a game runs, freeing about 0.5–0.8 GB of memory in testing. (@maxjivi05, [#442](https://github.com/Droid-Deck/DroidDeck/pull/442)) +- Added **23 more languages**, for 32 in total besides English, selectable in the app or in Android's per-app language settings. Steam follows the chosen language. (@maxjivi05, [#669](https://github.com/Droid-Deck/DroidDeck/pull/669)) +- Downloads now **resume where they stopped** and fall back to mirrors, with a download source setting that picks the fastest source automatically. This helps especially in mainland China. (@kingokksa, [#623](https://github.com/Droid-Deck/DroidDeck/pull/623)) +- Added **Reset all settings** in Setup > Diagnostics. It keeps your games, sign-ins and downloads. (@0x1Nawaf, [#696](https://github.com/Droid-Deck/DroidDeck/pull/696)) +- Store installs can go to **internal storage, any SD card or your second library**. (@maxjivi05, [#928](https://github.com/Droid-Deck/DroidDeck/pull/928)) +- Controllers with two back paddles (such as the 8BitDo Mobile Controller) map them to the Deck's **L4 and R4**. (@Vynex, [#797](https://github.com/Droid-Deck/DroidDeck/pull/797)) +- The second screen's Deck controls now include the **Gamepad** tab. On foldables, the unfolded controls hide while a controller is connected. (@ovurrsl, @Gustash, [#895](https://github.com/Droid-Deck/DroidDeck/pull/895), [#829](https://github.com/Droid-Deck/DroidDeck/pull/829)) +- Added experimental **Android Auto** support. DroidDeck is only available while the car is parked, and needs Android Auto's developer mode with unknown sources enabled. (@zekena2, [#952](https://github.com/Droid-Deck/DroidDeck/pull/952)) + +### Improvements + +- **Rewrote the Epic and Amazon store modules**, with byte-exact download verification and proper controller focus on store game pages. Existing sign-ins and installs carry over. (@The412Banner, [#802](https://github.com/Droid-Deck/DroidDeck/pull/802), [#804](https://github.com/Droid-Deck/DroidDeck/pull/804)) +- **Epic installs need far less free space.** Files are assembled as they download instead of caching the whole game first, so a 71 GB game no longer needs about 142 GB free. Store installs also check for space first and recover better when they run short. (@jmarti326, [#710](https://github.com/Droid-Deck/DroidDeck/pull/710)) +- **Fewer background processes.** An idle Steam session went from about 41 processes to about 30, keeping it further under Android's child-process limit, and Steam's web helper uses about 250 MB less memory. (@xXJSONDeruloXx, [#566](https://github.com/Droid-Deck/DroidDeck/pull/566), [#575](https://github.com/Droid-Deck/DroidDeck/pull/575)) +- **Smoother frame pacing.** The session respects Android's peak refresh rate setting, frames are timed to the display's vsync, Steam's frame limiter paces each game by time, and frame generation follows the game's real frame rate. On a 60 Hz Thor, distinct frames on screen rose from about 49.5 to 59.4 a second. (@xXJSONDeruloXx, [#715](https://github.com/Droid-Deck/DroidDeck/pull/715), [#717](https://github.com/Droid-Deck/DroidDeck/pull/717), [#731](https://github.com/Droid-Deck/DroidDeck/pull/731), [#753](https://github.com/Droid-Deck/DroidDeck/pull/753), [#927](https://github.com/Droid-Deck/DroidDeck/pull/927)) +- The game's busiest threads are boosted onto the **prime cores on the Odin 3**, and Snapdragon 8 Gen 2 devices get default core assignments for games and Steam. (@kmnkv1, @xXJSONDeruloXx, [#682](https://github.com/Droid-Deck/DroidDeck/pull/682), [#654](https://github.com/Droid-Deck/DroidDeck/pull/654)) +- Games on **SD-card libraries launch faster**, about 46% faster in testing. (@xXJSONDeruloXx, [#757](https://github.com/Droid-Deck/DroidDeck/pull/757)) +- The Steam home wall now fills from **your own Steam library**, and the store sign-in screens show each store's featured art. (@xXJSONDeruloXx, [#835](https://github.com/Droid-Deck/DroidDeck/pull/835), [#878](https://github.com/Droid-Deck/DroidDeck/pull/878)) +- **Older and less common devices:** sessions start on kernels that drop fork events (such as the Xiaomi Pad 5), Flatpak installs work on older kernels, the Linux runtime installs on 16 KB page-size devices, and USB drives that only appear as raw storage can be granted All files access. (@xXPOLYGONXx, @xXJSONDeruloXx, @ovurrsl, @Imgau, [#457](https://github.com/Droid-Deck/DroidDeck/pull/457), [#752](https://github.com/Droid-Deck/DroidDeck/pull/752), [#900](https://github.com/Droid-Deck/DroidDeck/pull/900), [#760](https://github.com/Droid-Deck/DroidDeck/pull/760)) +- Controller-driven cursors now show in nested Wayland sessions. (@xXJSONDeruloXx, [#759](https://github.com/Droid-Deck/DroidDeck/pull/759)) +- An interrupted Linux runtime download resumes instead of starting again. (@ovurrsl, [#847](https://github.com/Droid-Deck/DroidDeck/pull/847)) +- Native Linux and FEX compatibility choices are kept instead of being reset to Proton. (@xXJSONDeruloXx, [#749](https://github.com/Droid-Deck/DroidDeck/pull/749)) +- DroidDeck-Proton releases now come from the [Droid-Deck/DroidDeck-Proton](https://github.com/Droid-Deck/DroidDeck-Proton) repo. (@The412Banner, [#875](https://github.com/Droid-Deck/DroidDeck/pull/875)) +- Folding or unfolding no longer restarts the front end, file manager or store sign-in. (@ovurrsl, [#832](https://github.com/Droid-Deck/DroidDeck/pull/832), [#886](https://github.com/Droid-Deck/DroidDeck/pull/886)) +- Session reports include the memory page size, why the app's last processes ended, the panel's refresh modes and the device's thermal state. Logs are synced to storage every 2 seconds, so a hard reset keeps them, and only the 3 newest session log folders are kept. (@ovurrsl, @kmnkv1, @xXJSONDeruloXx, [#897](https://github.com/Droid-Deck/DroidDeck/pull/897), [#513](https://github.com/Droid-Deck/DroidDeck/pull/513), [#852](https://github.com/Droid-Deck/DroidDeck/pull/852), [#990](https://github.com/Droid-Deck/DroidDeck/pull/990)) +- The store sign-in page can no longer read local files. (@ovurrsl, [#890](https://github.com/Droid-Deck/DroidDeck/pull/890)) +- Expanded and refreshed translations, including Chinese, Japanese, Turkish, German, French, Spanish, Italian, Portuguese, Russian, Korean and Hungarian. Every language now has every string, including the new Storage, GPU drivers and artwork pages, and Latin American Spanish is complete. (@Dantalian-dev, @ovurrsl, @kingokksa, [#539](https://github.com/Droid-Deck/DroidDeck/pull/539), [#826](https://github.com/Droid-Deck/DroidDeck/pull/826), [#849](https://github.com/Droid-Deck/DroidDeck/pull/849), [#850](https://github.com/Droid-Deck/DroidDeck/pull/850), [#884](https://github.com/Droid-Deck/DroidDeck/pull/884), [#1013](https://github.com/Droid-Deck/DroidDeck/pull/1013)) + +### Fixed + +- Fixed **Android UI flickering** during games on Adreno 740 devices such as the AYN Thor and Odin 2 Portal. (@xXJSONDeruloXx, [#963](https://github.com/Droid-Deck/DroidDeck/pull/963)) +- Fixed **game rumble stopping after one second** under Proton. (@TideGear, [#938](https://github.com/Droid-Deck/DroidDeck/pull/938)) +- Fixed **Shut Down and Restart** in Steam's power menu. Shut Down now ends the session, and Restart restarts the client. (@muazkadan, [#629](https://github.com/Droid-Deck/DroidDeck/pull/629)) +- Fixed the **Quick Access button** doing nothing when the pad is set to Xbox 360, DualShock 4 or DualSense. (@muazkadan, [#631](https://github.com/Droid-Deck/DroidDeck/pull/631)) +- Fixed **store games becoming Steam installs** when you also own them on Steam. (@xXJSONDeruloXx, [#816](https://github.com/Droid-Deck/DroidDeck/pull/816)) +- Fixed **added games sometimes never starting** on a cold launch with large Steam libraries. (@xXJSONDeruloXx, @ovurrsl, [#758](https://github.com/Droid-Deck/DroidDeck/pull/758), [#914](https://github.com/Droid-Deck/DroidDeck/pull/914), [#973](https://github.com/Droid-Deck/DroidDeck/pull/973)) +- Fixed games that never started after a long pause, and "Steam is paused" staying up after the first Resume tap. (@maxjivi05, [#928](https://github.com/Droid-Deck/DroidDeck/pull/928)) +- Fixed the session ending the third time Steam restarted, for example after changing language. (@KirkPatrickJunsay, [#754](https://github.com/Droid-Deck/DroidDeck/pull/754)) +- Fixed Steam touch controls ignoring the layout chosen in Steam, including community layouts. (@xXJSONDeruloXx, [#840](https://github.com/Droid-Deck/DroidDeck/pull/840)) +- Fixed **Batman: Arkham City** crashing at startup and getting stuck on "Running install script". (@TjebbeKerstens, [#792](https://github.com/Droid-Deck/DroidDeck/pull/792), [#793](https://github.com/Droid-Deck/DroidDeck/pull/793)) +- Fixed **.NET Desktop and .NET Core runtimes** failing to install from Windows components, which blocked MelonLoader mods and Baldur's Gate 3. (@The412Banner, [#740](https://github.com/Droid-Deck/DroidDeck/pull/740)) +- Fixed the microphone in DirectAudio games. (@xXJSONDeruloXx, [#747](https://github.com/Droid-Deck/DroidDeck/pull/747)) +- Fixed FEX games failing with "Couldn't connect to FEXServer socket". (@angelrenefm, [#841](https://github.com/Droid-Deck/DroidDeck/pull/841)) +- Fixed wired **PowerA and PDP** Xbox controllers' right stick and triggers. (@Raidennrl, [#692](https://github.com/Droid-Deck/DroidDeck/pull/692)) +- Fixed touchpad taps not registering in some games, and the touchpad not moving a game's own cursor when it locks the pointer. (@KirkPatrickJunsay, @Gustash, [#644](https://github.com/Droid-Deck/DroidDeck/pull/644), [#772](https://github.com/Droid-Deck/DroidDeck/pull/772)) +- Fixed native touch taps snapping the cursor to the top-left corner in some games. (@asdf17128, [#803](https://github.com/Droid-Deck/DroidDeck/pull/803)) +- Fixed the Android keyboard needing two taps to open after it was dismissed. (@KirkPatrickJunsay, [#665](https://github.com/Droid-Deck/DroidDeck/pull/665)) +- Fixed Shift staying held after typing capitals on a physical keyboard in the desktop. (@The412Banner, [#766](https://github.com/Droid-Deck/DroidDeck/pull/766)) +- Fixed an unfolded Follow screen session no longer turning to portrait. (@Gustash, [#626](https://github.com/Droid-Deck/DroidDeck/pull/626)) +- Fixed battery estimates showing thousands of hours on phones that report current in mA. (@muazkadan, [#820](https://github.com/Droid-Deck/DroidDeck/pull/820)) +- Fixed blurry home-screen shortcuts for Steam games. (@KirkPatrickJunsay, [#825](https://github.com/Droid-Deck/DroidDeck/pull/825)) +- Fixed SteamGridDB art staying "no match" after a failed lookup. (@FX192, [#876](https://github.com/Droid-Deck/DroidDeck/pull/876)) +- Fixed Steam crashes returning to the launcher silently. They now show DroidDeck's error screen, and Steam no longer crashes on Quest when a SteamVR runtime is installed. (@xXJSONDeruloXx, [#905](https://github.com/Droid-Deck/DroidDeck/pull/905)) +- Fixed the in-session achievements page staying on "Reading…". (@xXJSONDeruloXx, [#961](https://github.com/Droid-Deck/DroidDeck/pull/961)) +- Fixed crashes from failed store background jobs and cloud save recovery, and a memory error in the directory cache. (@KirkPatrickJunsay, @ovurrsl, @wallentx, [#846](https://github.com/Droid-Deck/DroidDeck/pull/846), [#898](https://github.com/Droid-Deck/DroidDeck/pull/898), [#685](https://github.com/Droid-Deck/DroidDeck/pull/685)) +- Fixed expired Epic and Amazon sign-ins failing with a generic error instead of asking you to sign in again. (@The412Banner, [#804](https://github.com/Droid-Deck/DroidDeck/pull/804)) +- Fixed the child-process limit check on Android 12, and its switch name now matches Android's wording. (@ovurrsl, [#955](https://github.com/Droid-Deck/DroidDeck/pull/955), [#848](https://github.com/Droid-Deck/DroidDeck/pull/848)) +- Fixed the launcher offering its own display as a second screen. (@ovurrsl, [#889](https://github.com/Droid-Deck/DroidDeck/pull/889)) +- Fixed Windows component detection being confused by folder names above the game folder. (@xXJSONDeruloXx, [#859](https://github.com/Droid-Deck/DroidDeck/pull/859)) +- Fixed FEX dropdown scaling and Flathub search focus. (@xXJSONDeruloXx, [#681](https://github.com/Droid-Deck/DroidDeck/pull/681)) + +### New contributors + +- @xXPOLYGONXx made their first contribution in [#457](https://github.com/Droid-Deck/DroidDeck/pull/457). +- @phobos665 made their first contribution in [#637](https://github.com/Droid-Deck/DroidDeck/pull/637). +- @Jagger15 made their first contribution in [#642](https://github.com/Droid-Deck/DroidDeck/pull/642). +- @KirkPatrickJunsay made their first contribution in [#644](https://github.com/Droid-Deck/DroidDeck/pull/644). +- @wallentx made their first contribution in [#685](https://github.com/Droid-Deck/DroidDeck/pull/685). +- @Raidennrl made their first contribution in [#692](https://github.com/Droid-Deck/DroidDeck/pull/692). +- @0x1Nawaf made their first contribution in [#696](https://github.com/Droid-Deck/DroidDeck/pull/696). +- @Producdevity made their first contribution in [#748](https://github.com/Droid-Deck/DroidDeck/pull/748). +- @Imgau made their first contribution in [#760](https://github.com/Droid-Deck/DroidDeck/pull/760). +- @TjebbeKerstens made their first contribution in [#792](https://github.com/Droid-Deck/DroidDeck/pull/792). +- @Vynex made their first contribution in [#797](https://github.com/Droid-Deck/DroidDeck/pull/797). +- @kingokksa made their first contribution in [#798](https://github.com/Droid-Deck/DroidDeck/pull/798). +- @asdf17128 made their first contribution in [#803](https://github.com/Droid-Deck/DroidDeck/pull/803). +- @ovurrsl made their first contribution in [#831](https://github.com/Droid-Deck/DroidDeck/pull/831). +- @FX192 made their first contribution in [#876](https://github.com/Droid-Deck/DroidDeck/pull/876). +- @angelrenefm made their first contribution in [#894](https://github.com/Droid-Deck/DroidDeck/pull/894). +- @informalTechCode made their first contribution in [#907](https://github.com/Droid-Deck/DroidDeck/pull/907). +- @TideGear made their first contribution in [#938](https://github.com/Droid-Deck/DroidDeck/pull/938). +- @zekena2 made their first contribution in [#952](https://github.com/Droid-Deck/DroidDeck/pull/952). + +[Full changelog](https://github.com/Droid-Deck/DroidDeck/compare/0.4.0...0.5.0) diff --git a/docs/releases/media/0.4.0/add-game.jpg b/docs/releases/media/0.4.0/add-game.jpg new file mode 100644 index 0000000000..f638964d59 Binary files /dev/null and b/docs/releases/media/0.4.0/add-game.jpg differ diff --git a/docs/releases/media/0.4.0/castle-crashers-touch.gif b/docs/releases/media/0.4.0/castle-crashers-touch.gif new file mode 100644 index 0000000000..5adead28de Binary files /dev/null and b/docs/releases/media/0.4.0/castle-crashers-touch.gif differ diff --git a/docs/releases/media/0.4.0/controller-emulation.jpg b/docs/releases/media/0.4.0/controller-emulation.jpg new file mode 100644 index 0000000000..c9cedee1da Binary files /dev/null and b/docs/releases/media/0.4.0/controller-emulation.jpg differ diff --git a/docs/releases/media/0.4.0/desktop-round-trip.gif b/docs/releases/media/0.4.0/desktop-round-trip.gif new file mode 100644 index 0000000000..04ce7814b3 Binary files /dev/null and b/docs/releases/media/0.4.0/desktop-round-trip.gif differ diff --git a/docs/releases/media/0.4.0/foldable-gamepad.jpg b/docs/releases/media/0.4.0/foldable-gamepad.jpg new file mode 100644 index 0000000000..c76ce0253f Binary files /dev/null and b/docs/releases/media/0.4.0/foldable-gamepad.jpg differ diff --git a/docs/releases/media/0.4.0/foldable-landscape.jpg b/docs/releases/media/0.4.0/foldable-landscape.jpg new file mode 100644 index 0000000000..9fc548c225 Binary files /dev/null and b/docs/releases/media/0.4.0/foldable-landscape.jpg differ diff --git a/docs/releases/media/0.4.0/foldable-trackpads.jpg b/docs/releases/media/0.4.0/foldable-trackpads.jpg new file mode 100644 index 0000000000..9bf3264cd0 Binary files /dev/null and b/docs/releases/media/0.4.0/foldable-trackpads.jpg differ diff --git a/docs/releases/media/0.4.0/follow-screen-cover.jpg b/docs/releases/media/0.4.0/follow-screen-cover.jpg new file mode 100644 index 0000000000..268b6c4e28 Binary files /dev/null and b/docs/releases/media/0.4.0/follow-screen-cover.jpg differ diff --git a/docs/releases/media/0.4.0/follow-screen-landscape.jpg b/docs/releases/media/0.4.0/follow-screen-landscape.jpg new file mode 100644 index 0000000000..c2eed9f7a8 Binary files /dev/null and b/docs/releases/media/0.4.0/follow-screen-landscape.jpg differ diff --git a/docs/releases/media/0.4.0/follow-screen-portrait.jpg b/docs/releases/media/0.4.0/follow-screen-portrait.jpg new file mode 100644 index 0000000000..370c3f89aa Binary files /dev/null and b/docs/releases/media/0.4.0/follow-screen-portrait.jpg differ diff --git a/docs/releases/media/0.4.0/game-profiles.jpg b/docs/releases/media/0.4.0/game-profiles.jpg new file mode 100644 index 0000000000..054b134983 Binary files /dev/null and b/docs/releases/media/0.4.0/game-profiles.jpg differ diff --git a/docs/releases/media/0.4.0/gog-sign-in.jpg b/docs/releases/media/0.4.0/gog-sign-in.jpg new file mode 100644 index 0000000000..0852ecea66 Binary files /dev/null and b/docs/releases/media/0.4.0/gog-sign-in.jpg differ diff --git a/docs/releases/media/0.4.0/multi-controller.gif b/docs/releases/media/0.4.0/multi-controller.gif new file mode 100644 index 0000000000..06a232d239 Binary files /dev/null and b/docs/releases/media/0.4.0/multi-controller.gif differ diff --git a/docs/releases/media/0.4.0/steam-controller-ble.jpg b/docs/releases/media/0.4.0/steam-controller-ble.jpg new file mode 100644 index 0000000000..8541aabe14 Binary files /dev/null and b/docs/releases/media/0.4.0/steam-controller-ble.jpg differ diff --git a/docs/releases/media/0.4.0/steam-input-cloud-layouts.jpg b/docs/releases/media/0.4.0/steam-input-cloud-layouts.jpg new file mode 100644 index 0000000000..f1200b6f88 Binary files /dev/null and b/docs/releases/media/0.4.0/steam-input-cloud-layouts.jpg differ diff --git a/docs/releases/media/0.4.0/steam-input-community.jpg b/docs/releases/media/0.4.0/steam-input-community.jpg new file mode 100644 index 0000000000..f0ca62c7e7 Binary files /dev/null and b/docs/releases/media/0.4.0/steam-input-community.jpg differ diff --git a/docs/releases/media/0.4.0/steam-input-touch.jpg b/docs/releases/media/0.4.0/steam-input-touch.jpg new file mode 100644 index 0000000000..7f23794fdc Binary files /dev/null and b/docs/releases/media/0.4.0/steam-input-touch.jpg differ diff --git a/docs/releases/media/0.4.0/steam-settings.gif b/docs/releases/media/0.4.0/steam-settings.gif new file mode 100644 index 0000000000..da362d21fa Binary files /dev/null and b/docs/releases/media/0.4.0/steam-settings.gif differ diff --git a/docs/releases/media/0.4.0/steam-touch-editor.jpg b/docs/releases/media/0.4.0/steam-touch-editor.jpg new file mode 100644 index 0000000000..435046c775 Binary files /dev/null and b/docs/releases/media/0.4.0/steam-touch-editor.jpg differ diff --git a/docs/releases/media/0.4.0/steam-touch-menu.jpg b/docs/releases/media/0.4.0/steam-touch-menu.jpg new file mode 100644 index 0000000000..b34406bb02 Binary files /dev/null and b/docs/releases/media/0.4.0/steam-touch-menu.jpg differ diff --git a/docs/releases/media/0.4.0/store-downloads.gif b/docs/releases/media/0.4.0/store-downloads.gif new file mode 100644 index 0000000000..08c9327661 Binary files /dev/null and b/docs/releases/media/0.4.0/store-downloads.gif differ diff --git a/docs/releases/media/0.5.0/boot-movie.jpg b/docs/releases/media/0.5.0/boot-movie.jpg new file mode 100644 index 0000000000..a54f2cffcf Binary files /dev/null and b/docs/releases/media/0.5.0/boot-movie.jpg differ diff --git a/docs/releases/media/0.5.0/cardboard-thrill-of-the-fight.jpg b/docs/releases/media/0.5.0/cardboard-thrill-of-the-fight.jpg new file mode 100644 index 0000000000..855492cde9 Binary files /dev/null and b/docs/releases/media/0.5.0/cardboard-thrill-of-the-fight.jpg differ diff --git a/docs/releases/media/0.5.0/cardboard-thumper.jpg b/docs/releases/media/0.5.0/cardboard-thumper.jpg new file mode 100644 index 0000000000..6743f4c0f2 Binary files /dev/null and b/docs/releases/media/0.5.0/cardboard-thumper.jpg differ diff --git a/docs/releases/media/0.5.0/epic-launch-through-steam.gif b/docs/releases/media/0.5.0/epic-launch-through-steam.gif new file mode 100644 index 0000000000..8d14404330 Binary files /dev/null and b/docs/releases/media/0.5.0/epic-launch-through-steam.gif differ diff --git a/docs/releases/media/0.5.0/epic-launcher-gamepad.gif b/docs/releases/media/0.5.0/epic-launcher-gamepad.gif new file mode 100644 index 0000000000..2cd399e312 Binary files /dev/null and b/docs/releases/media/0.5.0/epic-launcher-gamepad.gif differ diff --git a/docs/releases/media/0.5.0/epic-launcher-games-tab.jpg b/docs/releases/media/0.5.0/epic-launcher-games-tab.jpg new file mode 100644 index 0000000000..38cc032178 Binary files /dev/null and b/docs/releases/media/0.5.0/epic-launcher-games-tab.jpg differ diff --git a/docs/releases/media/0.5.0/epic-launcher-library.jpg b/docs/releases/media/0.5.0/epic-launcher-library.jpg new file mode 100644 index 0000000000..70ce1d5abb Binary files /dev/null and b/docs/releases/media/0.5.0/epic-launcher-library.jpg differ diff --git a/docs/releases/media/0.5.0/epic-launcher.gif b/docs/releases/media/0.5.0/epic-launcher.gif new file mode 100644 index 0000000000..32aebeb31f Binary files /dev/null and b/docs/releases/media/0.5.0/epic-launcher.gif differ diff --git a/docs/releases/media/0.5.0/game-page-hltb-metacritic.jpg b/docs/releases/media/0.5.0/game-page-hltb-metacritic.jpg new file mode 100644 index 0000000000..d6066abd0d Binary files /dev/null and b/docs/releases/media/0.5.0/game-page-hltb-metacritic.jpg differ diff --git a/docs/releases/media/0.5.0/glasses-2d.gif b/docs/releases/media/0.5.0/glasses-2d.gif new file mode 100644 index 0000000000..c9256cd48d Binary files /dev/null and b/docs/releases/media/0.5.0/glasses-2d.gif differ diff --git a/docs/releases/media/0.5.0/glasses-gamepad-hands.gif b/docs/releases/media/0.5.0/glasses-gamepad-hands.gif new file mode 100644 index 0000000000..a93b9bc718 Binary files /dev/null and b/docs/releases/media/0.5.0/glasses-gamepad-hands.gif differ diff --git a/docs/releases/media/0.5.0/glasses-steamvr.gif b/docs/releases/media/0.5.0/glasses-steamvr.gif new file mode 100644 index 0000000000..cafc002ade Binary files /dev/null and b/docs/releases/media/0.5.0/glasses-steamvr.gif differ diff --git a/docs/releases/media/0.5.0/gpu-drivers.jpg b/docs/releases/media/0.5.0/gpu-drivers.jpg new file mode 100644 index 0000000000..97383b13a6 Binary files /dev/null and b/docs/releases/media/0.5.0/gpu-drivers.jpg differ diff --git a/docs/releases/media/0.5.0/low-latency.jpg b/docs/releases/media/0.5.0/low-latency.jpg new file mode 100644 index 0000000000..53621fc054 Binary files /dev/null and b/docs/releases/media/0.5.0/low-latency.jpg differ diff --git a/docs/releases/media/0.5.0/picture-position.jpg b/docs/releases/media/0.5.0/picture-position.jpg new file mode 100644 index 0000000000..d13b133186 Binary files /dev/null and b/docs/releases/media/0.5.0/picture-position.jpg differ diff --git a/docs/releases/media/0.5.0/play-steamvr-glasses.jpg b/docs/releases/media/0.5.0/play-steamvr-glasses.jpg new file mode 100644 index 0000000000..2849e05041 Binary files /dev/null and b/docs/releases/media/0.5.0/play-steamvr-glasses.jpg differ diff --git a/docs/releases/media/0.5.0/quest-flat-hands.gif b/docs/releases/media/0.5.0/quest-flat-hands.gif new file mode 100644 index 0000000000..fb71d41753 Binary files /dev/null and b/docs/releases/media/0.5.0/quest-flat-hands.gif differ diff --git a/docs/releases/media/0.5.0/quest-steamvr.gif b/docs/releases/media/0.5.0/quest-steamvr.gif new file mode 100644 index 0000000000..1c5758b136 Binary files /dev/null and b/docs/releases/media/0.5.0/quest-steamvr.gif differ diff --git a/docs/releases/media/0.5.0/sort-list-view.gif b/docs/releases/media/0.5.0/sort-list-view.gif new file mode 100644 index 0000000000..a2c780ebb5 Binary files /dev/null and b/docs/releases/media/0.5.0/sort-list-view.gif differ diff --git a/docs/releases/media/0.5.0/steam-artwork.jpg b/docs/releases/media/0.5.0/steam-artwork.jpg new file mode 100644 index 0000000000..df8470dcc1 Binary files /dev/null and b/docs/releases/media/0.5.0/steam-artwork.jpg differ diff --git a/docs/releases/media/0.5.0/storage-cleanup.jpg b/docs/releases/media/0.5.0/storage-cleanup.jpg new file mode 100644 index 0000000000..f1b562251c Binary files /dev/null and b/docs/releases/media/0.5.0/storage-cleanup.jpg differ diff --git a/docs/releases/media/0.5.0/storage-overview.jpg b/docs/releases/media/0.5.0/storage-overview.jpg new file mode 100644 index 0000000000..2a8f362f1a Binary files /dev/null and b/docs/releases/media/0.5.0/storage-overview.jpg differ diff --git a/docs/releases/media/0.5.0/vr-drawer-tab.jpg b/docs/releases/media/0.5.0/vr-drawer-tab.jpg new file mode 100644 index 0000000000..8d6c78bbae Binary files /dev/null and b/docs/releases/media/0.5.0/vr-drawer-tab.jpg differ diff --git a/docs/smart-glasses-support.md b/docs/smart-glasses-support.md new file mode 100644 index 0000000000..dd70fbdaf3 --- /dev/null +++ b/docs/smart-glasses-support.md @@ -0,0 +1,81 @@ +# Smart-glasses support + +This describes the integrations implemented in DroidDeck as of 2026-10-17. A recognized product name alone does not establish that every firmware, phone, cable, or adapter supports every mode. Controls become available from the connected device's capabilities and the display modes Android actually exposes. + +**3DoF** tracks head rotation: turn, tilt, and roll around a virtual screen. **6DoF** also tracks head position, so leaning or moving changes the view. Both apply to DroidDeck menus, non-Steam launchers, desktop sessions, and games when the tracked virtual screen is enabled. Direct SteamVR rendering uses the corresponding headset pose instead of the virtual-screen layout. + +## Support levels + +- **Integrated:** a device transport and controls are implemented. Tracking requires a working connection and available orientation data. +- **SDK-dependent:** integrated support requires an APK built with the optional VITURE SDK. Recognizing the display does not mean that SDK is included. +- **Experimental:** implemented and opt-in, with the qualifications described below. This is not a general tracking-accuracy guarantee. +- **Display-only:** Android can provide a picture through a compatible display connection, but DroidDeck has no supported control/tracking connection for that device. + +## Device matrix + +| Brand / model family | Level and connection | App-wide 3DoF | App-wide 6DoF / SteamVR position | Luma stereo hand / Joy-Con position | +| --- | --- | --- | --- | --- | +| VITURE One / One Lite; Pro / Pro XR | Integrated legacy USB transport | Yes, when IMU connection is available | No | No | +| VITURE Luma / Luma Pro; Luma Cyber when identified by the SDK | Integrated Luma-family USB transport; Cyber identification uses the SDK market name | Yes, when IMU connection is available | No | No | +| VITURE Pro 2 / Pro 2 XR | SDK-dependent Gen2 transport and device identification | Yes | No | No | +| VITURE Beast | SDK-dependent Gen2 transport | Yes | No | No | +| **VITURE Luma Ultra** | SDK-dependent Carina transport | Yes | **Experimental, opt-in** | **Experimental, opt-in** | +| Recognized RayNeo / TCL Air-series devices | Integrated RayNeo USB transport | Yes, with orientation calibration controls | No | No | +| RayNeo GT-series devices matching the supported USB identity, including GT Max identification | Integrated GT USB/IMU path | Yes, with orientation calibration controls | No | No | +| **XREAL 1S** | **Experimental**; exact USB identity plus the device's USB-Ethernet control/IMU connection | Yes, when that connection is ready | No | No | +| Other XREAL models; unrecognized glasses; display adapters and docks | Display-only where Android exposes a usable display; automatic glasses routing also requires display recognition | No supported app tracking connection | No | No | + +RayNeo's Air-series recognition uses its known USB identity or a RayNeo/TCL Air name under the accepted vendor IDs; it is not a per-model certification list. The GT vendor path requires the specific supported product ID. XREAL support currently targets **1S only**: One, One Pro, Air-family devices, and recovery-mode products are not enabled by the 1S transport. VITURE Pro 2 is identified through SDK validation rather than a guessed product ID. A dock does not supply the connected glasses' sensors by itself. + +The final column refers specifically to Luma Ultra's stereo tracking cameras. DroidDeck's separate phone-camera and physical-controller features are independent of this matrix. + +## Display and device controls + +All display modes depend on the phone's video output, the cable/adapter, and Android's advertised modes. USB permission or a working sensor connection alone does not create a video display. + +| Integration | Display selection | Device controls exposed by DroidDeck | +| --- | --- | --- | +| VITURE One/Lite and Pro families | 1080p per eye; 2D and SBS | Brightness, volume, dimming toggle according to the family profile | +| VITURE Luma family | 1080p or 1200p per eye; 2D and SBS | Brightness, volume, dimming toggle | +| VITURE Luma Ultra | 1080p or 1200p per eye; 2D and SBS, including the family's 90 Hz SBS selection | Brightness, volume, dimming toggle | +| VITURE Beast | 1080p or 1200p per eye; SDK handles native/bypass display modes | Brightness, volume, dimming toggle | +| VITURE Pro 2 | 1080p per eye; 2D and SBS | Brightness and volume; no electrochromic-film control | +| RayNeo Air/GT | 2D/SBS switching; resolution and refresh follow available Android modes | Orientation calibration; no app brightness, volume, or dimming commands | +| XREAL 1S | Supported 1S display-mode commands, including native 1200p/60 Hz and SBS | Brightness and dimming toggle; no app volume command | + +DroidDeck saves separate **2D resolution**, **3D resolution**, and **VR resolution** preferences. Unsupported saved choices fall back to the connected model's automatic behavior. Native **30 Hz** is offered only when Android advertises a matching mode and glasses presentation output is enabled. Higher refresh selections are constrained by the active 2D/SBS layout and model; a firmware-rejected switch is not treated as successful until the physical display confirms it. + +In **Automatic** picture mode, ordinary flat content is duplicated in full into both eyes on an SBS display. **Virtual screen** adds a configurable screen plane and tracking. **Side-by-side game** is for content that already contains separate eye images. SteamVR uses its direct stereo view and field-of-view control. + +## Setup and app-wide behavior + +1. Connect the glasses through a compatible video/data connection. Accept USB access when requested. For XREAL 1S, Android must also expose the glasses' USB-Ethernet network; the app leaves Steam's Internet connection on its normal network. +2. Open **Setup → Smart glasses**. Enable glasses output and **3DoF virtual screen**. This selects the tracked screen and saves the setting without forcing SBS or changing brightness. +3. Adjust screen width and distance, then recenter while looking where the screen should sit. The same settings apply when navigating DroidDeck, opening a non-Steam launcher, or entering a game/desktop session. +4. On an SDK-enabled Luma Ultra, optionally enable positional tracking and set the floor from the current eye height. Use the tracking setup and recovery controls for calibration or recentering. SteamVR startup defers Luma positional initialization until two seconds after SteamVR reports running. + +The phone remains the touch/control surface. DroidDeck mirrors its own visible UI into a tracked glasses presentation; it does not capture Android's entire desktop or other apps. Android 29+ can include app dialogs/popups, while Android 26–28 captures the activity's decor only. System keyboards and permission prompts, secure windows, and separately composed `SurfaceView` content stay on their existing surfaces. Menu recentering does not change the VR floor origin. See [tracked-menu behavior](development/glasses-menu-tracking.md). + +## Luma Ultra tracking qualifications + +Positional tracking, bare-hand controllers, and camera-assisted Joy-Cons are separate options and default off. Bare hands and camera-assisted Joy-Cons are mutually exclusive. + +- **Head tracking:** the SDK supplies the positional pose. The app checks freshness and connection/origin generations and provides tracking-loss and recenter recovery. Screen and floor origins are separate. +- **Bare hands:** Full palm + Full landmarks is the default. Raw grayscale is replicated into RGB, MediaPipe applies model tensor normalization, and calibration corrects landmark coordinates before stereo triangulation. Full landmarks support palm orientation, pinch, and grab. The small saved-image comparison favored Full over Lite but does not establish universal hand-detection quality; see the [comparison results](development/hand-model-comparison-2026-10-16.md). +- **Controller visibility:** the last accepted visual pose can remain for up to 350 ms from capture time during a short detection gap. Invalid/stale gestures release independently. Normal hand mode has no stationary dead zone; shoulder-based **Steady hand aim** is a separate opt-in setting. +- **Joy-Cons:** camera position uses wrist landmark 0. Physical buttons and IMU orientation remain the input sources, with an arm estimate when a usable camera position is unavailable. Camera wrist position does not make a physical controller fully optically tracked in every pose. Screen and Joy-Con recenter actions are separate. +- **Calibration:** the included 640×480 Luma Ultra stereo profile is a model-specific starting point. A matching saved device profile takes precedence. The shared profile is labeled separately from an individually distance-verified calibration; optional board collection and distance validation refine a device profile. +- **RGB camera:** the third camera remains diagnostic-only. It is not used for controller depth, hand tracking, or camera passthrough. The failed hybrid stereo matcher and temporary USB transport experiments are not part of the live pipeline. + +## Build and troubleshooting references + +Luma Ultra, Beast, and Pro 2 control/tracking require the optional, externally supplied **VITURE Android SDK 2.4.0** in the APK build. Without it, DroidDeck retains its legacy VITURE and RayNeo transports and the separate XREAL integration; it cannot advertise SDK-dependent tracking. Vendor SDK headers and binaries are not stored in this repository. See [VITURE SDK setup](development/viture-sdk.md). + +If only a flat picture is available, check video output first, then the control connection. A disabled tracking toggle can mean missing SDK support, missing USB/network access, or a device without a supported IMU transport. SBS or a new resolution requires a confirmed physical display mode; selecting a preference cannot add a mode the phone/display does not expose. + +- [Luma spatial setup, calibration, and diagnostics](development/luma-spatial-tracking.md) +- [Tracked DroidDeck menu implementation](development/glasses-menu-tracking.md) +- [Agent diagnostics and capture commands](agent-control.md) +- [RayNeo attribution and protocol references](third-party/rayneo/README.md) + +The capability definitions are maintained in [VITURE models](../app/src/main/java/com/droiddeck/launcher/glasses/VitureProtocol.kt), [RayNeo models](../app/src/main/java/com/droiddeck/launcher/glasses/RayNeoModel.kt), [XREAL 1S](../app/src/main/java/com/droiddeck/launcher/glasses/XrealModel.kt), and [connection capability routing](../app/src/main/java/com/droiddeck/launcher/glasses/Glasses.kt). Update this matrix when those integrations change. diff --git a/docs/testing/steam-in-kde.md b/docs/testing/steam-in-kde.md new file mode 100644 index 0000000000..c199aca81e --- /dev/null +++ b/docs/testing/steam-in-kde.md @@ -0,0 +1,13 @@ +# Steam desktop client in KDE + +The [Discord report](https://discord.com/channels/1552707793247539220/1552707794430459916/1558974992753098874) describes Steam replacing KDE with a gamescope session. The launcher unconditionally wrote `steam-launch`, which tells the Android app to end KDE and start Steam under gamescope. Other desktop applications have a separate GPU wrapper; this change addresses Steam's desktop client. + +Desktop Steam now runs the existing session supervisor with `BL_INSIDE=1` on KDE's inherited Xwayland display and authentication. CEF uses software rendering because KDE's QPainter compositor accepts shared-memory buffers. Big Picture continues to request the explicit gaming session. A lock keeps repeated menu clicks from starting another supervisor while Steam is starting or updating; subsequent clicks wait for Steam's live IPC pipe and then forward the Steam URL to the existing client. This also prevents a second click during cold startup from launching a client without software CEF. KDE retains its own agent and clipboard helpers when Steam starts and exits. + +Validation on AYN Thor uses the full wireless ADB serial `adb-d234a848-fv2FDl (2)._adb-tls-connect._tcp`. Live script testing displayed the authenticated library, restored the main window from maximized to windowed, opened Settings as a separate window, and forwarded a second launch to Downloads. KDE's panel remained visible, no gamescope process started, and no session handoff file was written. Quitting Steam returned to the running Plasma desktop with its agent still available. An explicit Big Picture launch then switched to a Steam session and reached READY with Steam focused. + +Rapid repeated desktop-icon taps were also tested: one client started with software CEF and the library remained on KDE. + +Host regression tests cover desktop display preservation, game URLs, duplicate launches before and after IPC is ready, explicit Big Picture handoff, non-desktop callers, invalid targets, and software CEF limited to the KDE desktop client. Gameplay through Steam's library on KDE has not been validated; the desktop's existing GPU presentation limitations remain. + +The final release-signed APK was built with `tools/build_local.sh`, verified to contain the exact tested Steam scripts, and installed with `adb install -r`. APK SHA-256: `d104b1e6e20fb10e85fcdd95eaf2a8ca69061547164640b8590e41e4495663e4`. On that installation, two rapid desktop-icon taps started one software-rendered Steam client; the library displayed on KDE and restored to a desktop window. Final session: `2026-10-12-09-desktop`, READY, mode `lxqt`, with no gamescope process or handoff request. The Thor was left running this desktop Steam client. diff --git a/docs/third-party/handtracking/LICENSE_MEDIAPIPE b/docs/third-party/handtracking/LICENSE_MEDIAPIPE new file mode 100644 index 0000000000..0e03e3911e --- /dev/null +++ b/docs/third-party/handtracking/LICENSE_MEDIAPIPE @@ -0,0 +1,218 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +=========================================================================== +For files under tasks/cc/text/language_detector/custom_ops/utils/utf/ +=========================================================================== +/* + * The authors of this software are Rob Pike and Ken Thompson. + * Copyright (c) 2002 by Lucent Technologies. + * Permission to use, copy, modify, and distribute this software for any + * purpose without fee is hereby granted, provided that this entire notice + * is included in all copies of any software which is or includes a copy + * or modification of this software and in all copies of the supporting + * documentation for such software. + * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY + * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + */ diff --git a/docs/third-party/handtracking/LICENSE_SDPOLYGON b/docs/third-party/handtracking/LICENSE_SDPOLYGON new file mode 100644 index 0000000000..9f5ae67a22 --- /dev/null +++ b/docs/third-party/handtracking/LICENSE_SDPOLYGON @@ -0,0 +1,3 @@ +The MIT License +Copyright © 2019 Inigo Quilez +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docs/third-party/handtracking/README.md b/docs/third-party/handtracking/README.md new file mode 100644 index 0000000000..10107a197f --- /dev/null +++ b/docs/third-party/handtracking/README.md @@ -0,0 +1,111 @@ +# Camera hand tracking attribution + +## Included + +[MediaPipe](https://github.com/google-ai-edge/mediapipe) Tasks Vision 1.0.0 +(`com.google.mediapipe:tasks-vision`, shared with the Luma stereo tracking pipeline; +copyright Google LLC and the MediaPipe authors, Apache License 2.0, `LICENSE_MEDIAPIPE` here) finds +the player's body in each camera frame. It comes from Maven Central with its dependencies +(Guava, Flogger, protobuf-javalite and Google's `datatransport`), all Apache-2.0. + +`app/src/main/assets/handtracking/pose_landmarker_lite.task` is MediaPipe's Pose Landmarker (Lite) +model, BlazePose GHUM 3D, unchanged from +`https://storage.googleapis.com/mediapipe-models/pose_landmarker/pose_landmarker_lite/float16/1/pose_landmarker_lite.task` +(SHA-256 `59929e1d1ee95287735ddd833b19cf4ac46d29bc7afddbbf6753c459690d574a`). Its +[model card](https://storage.googleapis.com/mediapipe-assets/Model%20Card%20BlazePose%20GHUM%203D.pdf) +licenses it under the Apache License 2.0 and lists its limits: one person, up to about 4 metres +from the camera, the head in view, and depth that is approximate rather than metric. + +`app/src/main/assets/handtracking/hand_landmarker.task` is MediaPipe's Hand Landmarker (full) model +bundle, a palm detector and a hand landmark model, unchanged from +`https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task` +(SHA-256 `fbc2a30080c3c557093b5ddfc334698132eb341044ccee322ccf8bcf3607cde1`). Its +[model card](https://storage.googleapis.com/mediapipe-assets/Model%20Card%20Hand%20Tracking%20(Lite_Full)%20with%20Fairness%20Oct%202021.pdf) +licenses it under the Apache License 2.0; it gives 21 landmarks per hand in the picture and in metres, +based on the GHUM hand model, and is meant for prominently shown hands. + +The Luma stereo pipeline defaults to the Full bundle at +`app/src/main/assets/models/hand_landmarker.task`, with the same checksum as the Full bundle +above. The optional `app/src/main/assets/models/hand_landmarker_lite.task` is built from +the official `palm_detection_lite.tflite` and `hand_landmark_lite.tflite` assets at +`https://storage.googleapis.com/mediapipe-assets/`. It uses the matching tensor metadata and +associated labels from the Full task bundle. These models share the MediaPipe hand tracking +model card and Apache License 2.0. Source checksums and the generated bundle checksum are in +`app/src/main/assets/models/hand_landmarker_lite.provenance.json`; `tools/build_hand_lite.py` +reproduces the bundle with MediaPipe 0.10.21 metadata tooling. + +[CameraX](https://developer.android.com/jetpack/androidx/releases/camera) 1.4.2 +(`androidx.camera:camera-camera2`, `camera-lifecycle`; copyright The Android Open Source Project, +Apache License 2.0) delivers the frames. + +`tools/vr/src/hand_mesh.h` ports Inigo Quilez's signed distance to a polygon (`sdPolygon`, from +[2D distance functions](https://iquilezles.org/articles/distfunctions2d/) and his Shadertoy +"Polygon - exact", `wdBXRW`; copyright 2019 Inigo Quilez, MIT License, `LICENSE_SDPOLYGON` here) for +the glove's palm outline. + +MediaPipe's task runner reports usage statistics through Google's `datatransport` library. The app +manifest removes that library's `CctBackendFactory` entry, so those reports have nowhere to go and +are dropped on the device. Camera frames are never stored or sent anywhere. + +## References + +No code from these projects is included. They were read to design and check the camera tracking +and the Joy-Con movement that it corrects: + +- [JoyConVr](https://github.com/F8LEFT/JoyConVr) by F8LEFT and contributors (MIT), `android-camera` + at 76466c28829396651be3c68143f6297ed68923e4: an Android app that runs MediaPipe's pose landmarker + for Joy-Con VR hands, levels the camera with gravity and slows inference down as needed. +- Google's `GvrArmModel.cs` in the [Google VR SDK for Unity](https://github.com/googlevr/gvr-unity-sdk) + v1.30.0 (Apache-2.0): its optional accelerometer mode moves the elbow by a filtered, integrated + velocity and keeps the offset within a range, the idea behind the short Joy-Con movements here. +- MediaPipe's [pose landmarker guide](https://developers.google.com/edge/mediapipe/solutions/vision/pose_landmarker), + [hand landmarker guide](https://developers.google.com/edge/mediapipe/solutions/vision/hand_landmarker), + `pose_landmarker_graph.cc` and `pose_landmarks_detector_graph.cc` (Apache-2.0): image and world + landmarks, and the tracking and landmark smoothing that video mode applies to a single pose, which + the app uses. MediaPipe Holistic's idea of finding the hands from the pose's wrists informed the hand + crops. +- R. E. Kalman, "A New Approach to Linear Filtering and Prediction Problems", Journal of Basic + Engineering 82(1), 1960, and the usual treatment of late measurements by replaying the stored + inputs after them: the per-hand filter that joins Joy-Con movement and camera sightings. +- Android's [Camera2 reference](https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics) + (`SENSOR_ORIENTATION`, `LENS_FACING`, `LENS_INTRINSIC_CALIBRATION`, `CONTROL_ZOOM_RATIO_RANGE`, + `SENSOR_INFO_TIMESTAMP_SOURCE`): choosing the camera, its focal length and turning frames upright. +- [hid-nintendo](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-nintendo.c) + (GPL-2.0+): the Joy-Con IMU report, three samples every 10 ms, and its timestamps. +- E. Foxlin, "Pedestrian Tracking with Shoe-Mounted Inertial Sensors", IEEE Computer Graphics and + Applications 25(6), 2005: zero-velocity updates while the sensor is still. +- I. Frosio, F. Pedersini, N. A. Borghese, "Autocalibration of MEMS Accelerometers", IEEE + Transactions on Instrumentation and Measurement 58(6), 2009: learning an accelerometer's offset + and scale from resting positions. + +- [ALVR](https://github.com/alvr-org/ALVR) (MIT), `alvr/server_core/src/hand_gestures.rs` at + ebec107b7e5f81677fb9c631d239daf2110bf573: turning tracked hands into controller input (thumb pinches + to each finger, a pinch range from touching to pulling, grip from the other fingers, a held palm + for the menu). The distances, mapping and timing here are DroidDeck's own. +- Meta Quest's hand tracking: the palm-toward-the-face pinch that opens the system menu, and the + plain white hands it draws, which the gesture and the glove model follow. +- B. K. P. Horn, "Closed-form solution of absolute orientation using unit quaternions", Journal of + the Optical Society of America A 4(4), 1987: fitting the skeleton's palm to the camera's. +- G. Casiez, N. Roussel, D. Vogel, "1€ Filter: A Simple Speed-based Low-pass Filter for Noisy Input in + Interactive Systems", CHI 2012: the bare hands' position and turn filters. +- Valve's [OpenVR wiki](https://github.com/ValveSoftware/openvr/wiki) pages "Render Model Reference" + and "Driver Render Models": the render model JSON, its components, `component_path` and visibility. + The glove's tip, base, handgrip and grip poses are the numbers in SteamVR's Valve Index controller + model (`valve_controller_knu_1_0_left` and `_right`), so the pointer leaves the hand as it leaves an + Index controller, and its button parts showed which fields SteamVR needs to route a part to an input. +- S. F. F. Gibson, "Constrained Elastic Surface Nets", MICCAI 1998, and Mikola Lysenko's + [Smooth Voxel Terrain (Part 2)](https://0fps.net/2012/07/12/smooth-voxel-terrain-part-2/): meshing + the glove's distance field with surface nets. +- [HaGRID](https://github.com/hukenovs/hagrid) (A. Kapitanov et al., "HaGRID - HAnd Gesture Recognition + Image Dataset", WACV 2024; CC BY-SA 4.0), through the 384p sample + [cj-mills/hagrid-sample-30k-384p](https://huggingface.co/datasets/cj-mills/hagrid-sample-30k-384p): + 550 of its photos were used, on the development machine only, to check the pinch and grip distances. + No picture is included. +- Inigo Quilez's articles on [smooth minimum](https://iquilezles.org/articles/smin/) and + [3D distance functions](https://iquilezles.org/articles/distfunctions/) (the polynomial smooth + minimum and the ellipsoid bound) and his talk "Rendering Worlds with Two Triangles" (NVScene 2008; + ambient occlusion from a distance field): blending the glove's capsules, palm and wrist band, and + baking its shading. + +Nintendo Switch and Joy-Con are trademarks of Nintendo. This project is not affiliated with Nintendo, +Google, Meta or Valve. diff --git a/docs/third-party/joycon/LICENSE_GVR b/docs/third-party/joycon/LICENSE_GVR new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/docs/third-party/joycon/LICENSE_GVR @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/third-party/joycon/LICENSE_MONADO b/docs/third-party/joycon/LICENSE_MONADO new file mode 100644 index 0000000000..cff35365ae --- /dev/null +++ b/docs/third-party/joycon/LICENSE_MONADO @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, execute, +and transmit the Software, and to prepare derivative works of the Software, +and to permit third-parties to whom the Software is furnished to do so, all +subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, must +be included in all copies of the Software, in whole or in part, and all derivative +works of the Software, unless such copies or derivative works are solely in +the form of machine-executable object code generated by a source language +processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES +OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/docs/third-party/joycon/README.md b/docs/third-party/joycon/README.md new file mode 100644 index 0000000000..2e445ef67b --- /dev/null +++ b/docs/third-party/joycon/README.md @@ -0,0 +1,55 @@ +# Joy-Con VR controller attribution + +## Adapted code + +`tools/vr/src/arm_model.h` ports the arm model of Google's `GvrArmModel.cs` from the +[Google VR SDK for Unity](https://github.com/googlevr/gvr-unity-sdk) +(`Assets/GoogleVR/Scripts/Controller/ArmModel/GvrArmModel.cs` at +f999ed727a1d238c246ba4a504b77d55b59c9e9a; copyright 2016 Google Inc., Apache License 2.0, LICENSE_GVR +here). It is rewritten in C++ in OpenVR's coordinate frame. The rest positions, extension +angles, elbow bend, extension weight and the torso following the gaze are Google's. The neck +offset is left out, as `GvrArmModel` leaves it out by default. + +`tools/vr/src/hand_skeleton.h` adapts `hand_simulation.cpp` from Valve's OpenVR +`handskeletonsimulation` driver sample +([ValveSoftware/openvr](https://github.com/ValveSoftware/openvr), `samples/drivers/drivers/handskeletonsimulation` +at 0924064316de3effbcd1acf1e309182a2deb1c05; copyright Valve Corporation, BSD-3-Clause, +`tools/vr/src/OPENVR_LICENSE`). Valve's sample is inspired by Moshi Turner's hand simulation in +[Monado](https://gitlab.freedesktop.org/monado/monado) (`src/xrt/auxiliary/util/u_hand_simulation.c`). + +`tools/vr/src/index_pose.h` uses the Valve Index tip rotation and grip offset listed in Monado's +`src/xrt/auxiliary/vive/vive_poses.c` (at 8b259763fdd23c46592fd4cdd30b4eea997d4b70; copyright +Collabora, Ltd., author Daniel Willmott, Boost Software License 1.0, LICENSE_MONADO here). + +## References + +No code from these projects is included. They were read to learn how Joy-Cons, Android and +SteamVR behave, and to check this implementation: + +- [hid-nintendo](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-nintendo.c), the Linux + Joy-Con driver by Daniel J. Ogorchock and contributors (GPL-2.0+): button codes, stick axes, IMU + axes and units, and the rumble channels Android exposes. +- [Nintendo_Switch_Reverse_Engineering](https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering) + by dekuNukem: the Joy-Con's buttons, sensors and rumble. +- [SDL](https://github.com/libsdl-org/SDL) (zlib): how Switch controller sensors map to a game + controller's axes. +- [Android Open Source Project](https://github.com/aosp-mirror/platform_frameworks_base) (Apache-2.0): + `data/keyboards/Generic.kl`, which Android applies to Joy-Cons, and the `InputDevice` sensor and + vibrator APIs. +- [ALVR](https://github.com/alvr-org/ALVR) (MIT): presenting controllers to SteamVR as Index + controllers and handling their haptic events. +- [OpenComposite](https://gitlab.com/znixian/OpenOVR) (GPL-3.0): cross-check of the Index input + profile and skeleton. +- [PSMoveSteamVRBridge](https://github.com/HipsterSloth/PSMoveSteamVRBridge) (Apache-2.0): driving + SteamVR hands from orientation-only controllers. +- [JoyConVr](https://github.com/F8LEFT/JoyConVr) by F8LEFT (MIT): a Joy-Con button layout for SteamVR + and recentering by holding a button. +- [Daydream-Controller-SteamVR](https://github.com/krnelpan1c/Daydream-Controller-SteamVR) by + krnelpan1c: snapping a 3DoF controller's heading to the view by holding Home. +- [joyconvr](https://github.com/yoyobuae/joyconvr) by yoyobuae: Joy-Con sensor axes in SteamVR. +- [Moonlight for Android](https://github.com/moonlight-stream/moonlight-android) (GPL-3.0) and + [Dolphin](https://github.com/dolphin-emu/dolphin) (GPL-2.0+): reading a game controller's motion + sensors through Android's `InputDevice` API. + +Nintendo Switch and Joy-Con are trademarks of Nintendo. Valve Index and SteamVR are trademarks of +Valve Corporation. This project is not affiliated with either. diff --git a/docs/third-party/rayneo/LICENSE b/docs/third-party/rayneo/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/docs/third-party/rayneo/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/third-party/rayneo/LICENSE_VERNcat b/docs/third-party/rayneo/LICENSE_VERNcat new file mode 100644 index 0000000000..7d00e6f182 --- /dev/null +++ b/docs/third-party/rayneo/LICENSE_VERNcat @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 verncat + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/docs/third-party/rayneo/NOTICE_MONADO.md b/docs/third-party/rayneo/NOTICE_MONADO.md new file mode 100644 index 0000000000..fce40fcb94 --- /dev/null +++ b/docs/third-party/rayneo/NOTICE_MONADO.md @@ -0,0 +1,13 @@ +Monado Reference Attribution +============================ + +This project's RayNeo implementation was developed by referencing behavior and protocol details from the Monado project: + +- Project: https://gitlab.freedesktop.org/monado/monado +- Relevant area: src/xrt/drivers/rayneo/ + +Notes: + +- The app code in this repository was written for this project. +- Protocol understanding (packet IDs/layout, command flow, and initialization sequencing) was informed by the Monado RayNeo driver implementation. +- Monado is distributed under the Boost Software License 1.0 (BSL-1.0). See the upstream repository for full licensing and notices. diff --git a/docs/third-party/rayneo/README.md b/docs/third-party/rayneo/README.md new file mode 100644 index 0000000000..6762c50d1f --- /dev/null +++ b/docs/third-party/rayneo/README.md @@ -0,0 +1,21 @@ +# RayNeo protocol and orientation filter attribution + +RayNeoProtocol.kt and RayNeoOrientationFilter.kt are adapted from +https://github.com/informalTechCode/RayNeo-Air-Series-3DoF-Scaffold +at 581dbf712ed601ece4cf5e4a7c1f52e780299c88 (Apache License 2.0; LICENSE here). +The scaffold references Monado for protocol details; its notice is preserved here. + +DroidDeck adaptations add frame validation, unsigned device ticks, endpoint filtering, +and conversion into the existing VITURE pose coordinate convention. The transport, +USB discovery and DroidDeck integration are implemented for this project. + +GT USB identification and interface selection reference +https://github.com/verncat/RayNeo-Air-3S-Pro-OpenVR +at dfd2e8abab7052d88a1047266d89260347d0dd67, especially merged PR #3: +https://github.com/verncat/RayNeo-Air-3S-Pro-OpenVR/pull/3 +(MIT; copyright 2025 verncat; full notice in LICENSE_VERNcat). +That contribution reports GT hardware tests for 3941:af50 on interface 5, +IMU streaming, spatial-button notification 0x08, and display/volume ACK handling. +DroidDeck keeps its Android transport and existing command-specific ACK parser; +it prefers interface 5 for this identity and falls back only to a unique pair +of protocol-sized endpoints. GT Max is not separately verified by this source. diff --git a/docs/third-party/uvc/LICENSE_LIBUSB b/docs/third-party/uvc/LICENSE_LIBUSB new file mode 100644 index 0000000000..5ab7695ab8 --- /dev/null +++ b/docs/third-party/uvc/LICENSE_LIBUSB @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/docs/third-party/uvc/LICENSE_LIBUVC b/docs/third-party/uvc/LICENSE_LIBUVC new file mode 100644 index 0000000000..4acc5ddeaf --- /dev/null +++ b/docs/third-party/uvc/LICENSE_LIBUVC @@ -0,0 +1,31 @@ +Software License Agreement (BSD License) + +Copyright (C) 2010-2015 Ken Tossell +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the author nor other contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/docs/third-party/uvc/README.md b/docs/third-party/uvc/README.md new file mode 100644 index 0000000000..66838c7ed4 --- /dev/null +++ b/docs/third-party/uvc/README.md @@ -0,0 +1,71 @@ +# RGB USB camera transport + +The optional RGB diagnostic backend uses [libusb 1.0.30](https://github.com/libusb/libusb/releases/tag/v1.0.30) +(LGPL 2.1 or later) and [libuvc 0.0.8](https://github.com/libuvc/libuvc/releases/tag/v0.0.8) +(BSD 3-Clause). Full license texts are in `LICENSE_LIBUSB` and `LICENSE_LIBUVC` here. + +`tools/build_rgb_uvc.py` obtains the official sources with these SHA-256 pins: + +| Source | SHA-256 | +| --- | --- | +| [libusb-1.0.30.tar.bz2](https://github.com/libusb/libusb/releases/download/v1.0.30/libusb-1.0.30.tar.bz2) | `fea36f34f9156400209595e300840767ab1a385ede1dc7ee893015aea9c6dbaf` | +| [libuvc v0.0.8 ZIP](https://github.com/libuvc/libuvc/archive/refs/tags/v0.0.8.zip) | `67922938ad81eb82b8ce14576f15a68ac75e30af738728a1f3070b6bbc938bce` | + +## Build and replace + +Use Python 3.12 or newer, Android NDK 27.3.13750724, CMake 3.22.1, and Ninja. +From the repository root on Windows: + +```powershell +python tools/build_rgb_uvc.py --ndk "$env:LOCALAPPDATA/Android/Sdk/ndk/27.3.13750724" --cmake "$env:LOCALAPPDATA/Android/Sdk/cmake/3.22.1/bin/cmake.exe" +``` + +The default output is `build/rgb-uvc/dist`: `arm64-v8a/libusb.so`, `arm64-v8a/libuvc.a`, +public headers in `include`, and license texts in `licenses`. The script records archive, +patch, recipe, and binary hashes plus complete build commands in `provenance.json`. +Use `--cache` to reuse downloaded archives and `--output` for an independent build. +Each run refreshes the extracted vendor sources from the pinned archives before patching. + +Set `droiddeck.uvcDir=C:/path/to/build/rgb-uvc/dist` in the untracked `local.properties`, or +pass `-PuvcDir=C:/path/to/build/rgb-uvc/dist` to Gradle. The optional backend and shared libusb +are packaged through CMake; license texts are staged into APK assets under `licenses/uvc`. +Without this input, the RGB SDK diagnostic remains available and direct UVC reports unavailable. + +libusb is a separate shared library with SONAME `libusb.so`; the application must package +it beside its JNI backend and keep it dynamically linked. libuvc is static PIC with hidden +symbols. A backend links `libuvc.a`, `libusb.so`, and Android `log`, and includes `libusb.h` +before `libuvc/libuvc.h`. Both native components target ARM64/API 26; shared libraries use +16 KiB ELF LOAD alignment. No JPEG conversion dependency is included: camera payloads +remain MJPEG and are decoded by the caller. + +To rebuild libusb with modifications, run the script once, edit its extracted sources under +the output's `src/libusb-1.0.30`, then use the recorded CMake configure/build commands directly +without rerunning the Python extraction step. Package the resulting `libusb.so` in a rebuilt +APK. Keep the corresponding sources, recipe, patches, and LGPL text with release source +distribution; do not rely solely on the upstream download links. The generated manifest +describes the pinned build; regenerate hashes when distributing modified binaries. + +## Local changes and validation + +libuvc's queue uses eight transfer buffers instead of the upstream Linux default of 100. +The per-transfer limit remains 32 isochronous packets. The patch in +`tools/uvc/libuvc-submit-failure.patch` preserves a USB submission error instead of returning +success with an incomplete or empty queue. Unsubmitted transfers are removed under the +callback mutex. The normal stop path then holds that mutex while checking and cancelling +remaining transfers, waits for completion callbacks to clear them, and joins the frame +callback thread before returning. This prevents cancellation of already-cleared slots. + +`uvc_submit_failure_test` replaces submission, cancellation, alternate-setting, and companion +descriptor USB calls with in-process fakes. It runs 60 starts covering failure before any +transfer, failure after three queued transfers, and all eight submitted successfully. Each +case checks the return code, cancellation count, stopped state, and cleared transfer slots. +The Android executable needs `libusb.so` on its loader path; it does not access USB hardware. +Building it verifies linking but does not execute the runtime tests. A separate device run +is required to confirm them: + +```sh +LD_LIBRARY_PATH=. ./uvc_submit_failure_test +``` + +The executable built under `build/rgb-uvc-reprotest` passed all 60 cases on the Fold7 on +2026-10-16. That run used simulated USB calls and does not establish camera-stream reliability. diff --git a/gradle.properties b/gradle.properties index 68abc99e09..3289cc4c5d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,9 @@ org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8 -# Reuse task outputs, skip unchanged configuration, and run independent tasks in parallel. org.gradle.caching=true org.gradle.configuration-cache=true org.gradle.parallel=true android.useAndroidX=true android.nonTransitiveRClass=true -# The NDK the compositor is built with. CI passes the one the runner has installed -# (-PndkVersion=…); this is the fallback for a local build. ndkVersion=27.3.13750724 + +org.gradle.tooling.parallel=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5f07093805..b29e48e449 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,3 @@ -#Fri Jun 07 19:24:10 CST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/gradlew b/gradlew index 4f906e0c81..5292cabd82 100755 --- a/gradlew +++ b/gradlew @@ -16,16 +16,7 @@ # limitations under the License. # -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link PRG="$0" -# Need this for relative symlinks. while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` @@ -43,10 +34,8 @@ cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn () { @@ -60,7 +49,6 @@ die () { exit 1 } -# OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false @@ -83,10 +71,8 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar -# Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" @@ -105,7 +91,6 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi -# Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then @@ -121,19 +106,16 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then fi fi -# For Darwin, add options to specify how the application appears in the dock if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin or MSYS, switch paths to Windows format before running java if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` - # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do @@ -141,17 +123,15 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + CHECK2=`echo "$arg"|egrep -c "^-"` - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" @@ -172,14 +152,12 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then esac fi -# Escape application args save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } APP_ARGS=`save "$@"` -# Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index ac1b06f938..cb765c36ad 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -15,13 +15,7 @@ @rem @if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## -@rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 @@ -29,13 +23,10 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% -@rem Resolve any "." and ".." in APP_HOME to make it shorter. for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" -@rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe @@ -65,21 +56,16 @@ echo location of your Java installation. goto fail :execute -@rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar -@rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end -@rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 diff --git a/output/pdf/DroidDeck-Luma-Ultra-Calibration-Board.pdf b/output/pdf/DroidDeck-Luma-Ultra-Calibration-Board.pdf new file mode 100644 index 0000000000..c8d74025ad --- /dev/null +++ b/output/pdf/DroidDeck-Luma-Ultra-Calibration-Board.pdf @@ -0,0 +1,80 @@ +%PDF-1.3 +%“Œ‹ž ReportLab Generated PDF document (opensource) +1 0 obj +<< +/F1 2 0 R /F2 3 0 R +>> +endobj +2 0 obj +<< +/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font +>> +endobj +3 0 obj +<< +/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font +>> +endobj +4 0 obj +<< +/Contents 8 0 R /MediaBox [ 0 0 612 792 ] /Parent 7 0 R /Resources << +/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] +>> /Rotate 0 /Trans << + +>> + /Type /Page +>> +endobj +5 0 obj +<< +/PageMode /UseNone /Pages 7 0 R /Type /Catalog /ViewerPreferences 9 0 R +>> +endobj +6 0 obj +<< +/Author (DroidDeck) /CreationDate (D:20261015162101-06'00') /Creator (anonymous) /Keywords () /ModDate (D:20261015162101-06'00') /Producer (ReportLab PDF Library - \(opensource\)) + /Subject (unspecified) /Title (DroidDeck Luma Ultra - 30 mm ChArUco Calibration Board) /Trapped /False +>> +endobj +7 0 obj +<< +/Count 1 /Kids [ 4 0 R ] /Type /Pages +>> +endobj +8 0 obj +<< +/Filter [ /ASCII85Decode /FlateDecode ] /Length 2054 +>> +stream +Gasb]9lJfF&;KZQ'lthN"qAIg;?;)Wl3&N(!X64;H4/fACiA_6\lotG$ifu3[Gm:*BIX9!>LMQ"iFk2(.15#.:Q5<lpAjY?nE,?'+^oF$68K(?O77U>`^cc<3?%u*_Mj#;*ogN\=V>$rX24%TC!RN1p@/$+J(S%tGM>3(%3M59/UY,OqA-O,rU-t0LY^qJ#MAqXRobfU&4/06i2l"V).n:!:,^<Gk=6VDoXfkZg&_5.Ig9oMkO%cghSX@-?cV)PGAJr$48?$!IY<V`7.6ds\:P(sTnD;(O6oZ^Q9k9W"?J!Mcj46n#:Br/<nf>5"(/j[naEBamuHlGMSjn8>tZ'<pMGE3p#5cFf3^G.oq2)eiL0->b[JDZCCF=C)#dKB,uYTZ*##'[(Cg!W.+9kg4?g-0.II=9P-`/2jTCca7>bpB`["kMA""8^\TW%dadQ(#E2f$Sie+XXf5d@bghFX4@#]272:d`51-JTg#qn\s[#g4S;khWsD.GG3b%%P%HkD%ZdrNm$A4##B0QWXO3C31<Slj7B!i3.*Q2OQ^aknkU&fkYu>-UN$9?`k>Za-7"VVl5hUR45V(%3%o*I,K3$?(QG$%l37@9&*u9OcD.Z[Kf]f$%V*_0A1E>G83r6OH=\VZbVqBeJ_9G*[.2*>mt-[*Fr;?T4!bA&Jd+<55\:r73ZA<Oi`R@nr4G;Y4p/YL8//dWJbCA'*<$!bWQ'A'*:Nka=$F`C.\FSlH;teMq02p-e$66X-X`7OP->YLigjAnGbdL3^7?-G>q*'jj^.Pt'V743I\"gQ\apjXEo@PObr^2QI*p:314TUVb-W_@X@k`nG]SKtIa30'!A*&u*a"\63PL.3CDsV5$ZAm*SoP@&.38HUkUU..*E7NEa;0]/(F,:fpZa"0pZ^.2!5PNDE0MatJ:V2.=JJP0Y*m'hjU'OuMbCj&4S$'W5C%fQ-\K5SKH=[T$SGAk!YDS9W.gNCq+,Pg4?8lZ:QAU+!7)U0M6+$9C`*00GQ<s$k3<k-[$g]rY,-QWW.Tn5ISh?IgjZb8"f4#&E08WfjILAX/u->bst92"rQR/CjumR\4]pUVLG?V/%UJnr;6SBG^>E_QkIjRS'h>&lkGH'Ru,p(U9btaucI>.peUX=KXY]kl0YHN^](4qCC^9NmX>t4/Lq6%S+]Jp(V/@%ATH.VMGsePEnDC[DFsSXrh\""TaO%=N=<c,?AW+<#]tP1f0*KK.Be8bpnt[X&;eOQ'o(DFjXI1@aA!*M8me[<A^`jM5J-s)QfJF-31T8(fejt$Bn7<R5Qs-MW[#4AWE_KlBt%QM&#\GpK<k]1kJ/0,s=aOW)DItA$`-IZaRf04p`aB+Xh,ZOfu&J0A's6.WnaKUeWuC+H9Wg\iN;Y[pgr73uR<'RrVg"WYE]>WDIjCQc0I[a]>3p>82sq9#XOo<.3^X,mk/t9=_R3M\;=W:su8oi<_#Pk[L`$qOAFuEFr>3_[[tE$Z5]J-bTP3iZm4dWh-:\XOr7U["Yd5Ahp7kdXtbaEL3n]74jfFeTR7[ff,S66s.9=";*.Zifpj,'jC_k!1$C'F!\^2BoB6Q`\JpLXp\R$U&icC.!Pe4JASIs,'YV?m!Q[i:K99gqaS`d*m='i<YF&AdCl\]oLVhla`*:nb&]_Vbcnrf2!UW.(q9*P`[7]&fVDu=WN25E\1-uC[`lq&/iekm\]1?hk#fGK-+7P?AN#IKo!MF&N7b=Mrb;uNU>VR#C;R%X@N?[ZXC>hoYKiMdJ&5oMeYd>Kf\j]X"PDb9Fj);6d_1";aB9KFer-fSdQJ<&:gnZZa[X:u]c$]AV]c]1L^lM[n4(9/aQ[YTHeWE+hSQMOhRss?YJX02.?#;@HNrrnm4DQagAYhJ-Ga?TWQA4s1$Ncdqm&nf.tXDN]'^/bgCB7Q>rTRlI657'!F"]22`nDDe6f]>DERAJ%c_8%g]%X_:]9_?#.EpZnC2r9p-\8bQdRSR`[q9bD=I;a!^:eFd.Ql:n&E^/me/6@!tJ\T!]D%h4N$VnMlsZHZH$oDeY3!t-(!H\!?XEEB5Z\pJ$ZW)('~>endstream +endobj +9 0 obj +<< +/PrintScaling /None +>> +endobj +xref +0 10 +0000000000 65535 f +0000000061 00000 n +0000000102 00000 n +0000000209 00000 n +0000000321 00000 n +0000000514 00000 n +0000000607 00000 n +0000000914 00000 n +0000000973 00000 n +0000003118 00000 n +trailer +<< +/ID +[<b3e5604883ac3c51d3d14e28d5627213><b3e5604883ac3c51d3d14e28d5627213>] +% ReportLab generated PDF document -- digest (opensource) + +/Info 6 0 R +/Root 5 0 R +/Size 10 +>> +startxref +3159 +%%EOF diff --git a/tools/aaudio-sink/build.sh b/tools/aaudio-sink/build.sh index 0f0f3a87b1..eed2a2abc1 100755 --- a/tools/aaudio-sink/build.sh +++ b/tools/aaudio-sink/build.sh @@ -1,9 +1,4 @@ #!/usr/bin/env bash -# Compiles module-aaudio-sink.so against the upstream PulseAudio 13.0 headers and the daemon's own -# libraries the app ships (app/src/main/jniLibs/arm64-v8a), with the Android NDK. -# NDK=<ndk root> tools/aaudio-sink/build.sh <pulseaudio-13.0 source dir> <output dir> -# Produces module-aaudio-sink.so in the output dir (the fallback sink; the DirectAudio sinks come -# from the pinned DirectAudio release, see tools/directaudio/fetch.sh). set -euo pipefail PA_SRC=$1 OUTDIR=$2 @@ -40,14 +35,11 @@ sed -e 's/@PA_MAJOR@/13/g' -e 's/@PA_MINOR@/0/g' -e 's/@PA_API_VERSION@/12/g' -e cp "$HERE/config.h" "$HERE/ltdl.h" "$INC/" build_one() { local src=$1 OUT=$2 extra=$3 - # PulseAudio 13's own headers (pulsecore/atomic.h) predate clang's int-conversion error; that - # one is downgraded for them, the modules themselves compile clean. "$CC" -O2 -shared -fPIC -Wall -Wno-unused-parameter -Wno-error=int-conversion -Wno-visibility -DHAVE_CONFIG_H \ -I"$INC" -I"$PA_SRC/src" -I"$HERE" \ -o "$OUT" "$HERE/$src" \ -L"$LIBS" -l:libpulsecore-13.0.so -l:libpulsecommon-13.0.so -l:libpulse.so $extra "$TOOLCHAIN/llvm-strip" --strip-unneeded "$OUT" - # What the daemon looks for, and nothing linked that a device would not have. for sym in pa__init pa__done pa__get_author pa__get_description pa__get_usage pa__get_version pa__load_once; do "$TOOLCHAIN/llvm-nm" -D --defined-only "$OUT" | grep -q " $sym$" || { echo "ERROR: $OUT does not export $sym"; exit 1; } done diff --git a/tools/aaudio-sink/config.h b/tools/aaudio-sink/config.h index 4615ca53fc..0c7e1d0e44 100644 --- a/tools/aaudio-sink/config.h +++ b/tools/aaudio-sink/config.h @@ -1,6 +1,3 @@ -/* The handful of build-time facts PulseAudio 13's headers read, for compiling one module against - * the upstream source tree without running its configure. The daemon and libraries the app ships - * were built for the same target (Android arm64, bionic), so these match them. */ #ifndef DROIDDECK_PA_CONFIG_H #define DROIDDECK_PA_CONFIG_H #define PACKAGE "pulseaudio" diff --git a/tools/aaudio-sink/ltdl.h b/tools/aaudio-sink/ltdl.h index 84b3985c05..c183a46728 100644 --- a/tools/aaudio-sink/ltdl.h +++ b/tools/aaudio-sink/ltdl.h @@ -1,5 +1,3 @@ -/* pulsecore/module.h keeps a libltdl handle in pa_module; the module never touches it, so the - * handle type is all that is needed here. */ #ifndef DROIDDECK_LTDL_STUB_H #define DROIDDECK_LTDL_STUB_H typedef void *lt_dlhandle; diff --git a/tools/aaudio-sink/module-aaudio-sink.c b/tools/aaudio-sink/module-aaudio-sink.c index 3ad32896d7..619bd26733 100644 --- a/tools/aaudio-sink/module-aaudio-sink.c +++ b/tools/aaudio-sink/module-aaudio-sink.c @@ -1,15 +1,4 @@ /* - * module-aaudio-sink: a PulseAudio 13 sink on Android's AAudio, for the DroidDeck app. - * - * The daemon's IO thread pulls rendered audio from the sink one burst at a time and hands it to - * a blocking AAudio output stream; the stream's own buffer paces the thread, and the latency the - * sink reports comes from the stream's playback timestamp. With adaptive=1 the buffer grows by a - * burst after each underrun, up to a cap, so a device that cannot keep a small buffer fed settles - * on one it can. - * - * Module arguments keep the names the app has always passed (performance_mode, adaptive, volume, - * buffer_frames, max_buffer_frames) so the daemon's config line did not have to change. - * * SPDX-License-Identifier: LGPL-2.1-or-later */ #ifdef HAVE_CONFIG_H @@ -58,18 +47,11 @@ PA_MODULE_USAGE( "buffer_frames=<initial buffer size in frames, 0 = two bursts> " "max_buffer_frames=<largest the buffer may grow to, 0 = the stream's capacity>"); -/* The name the app's daemon config addresses (set-default-sink). */ #define DEFAULT_SINK_NAME "AAudioSink" -/* Underruns are polled every so many writes, not every write. */ #define XRUN_CHECK_EVERY 8 #define FALLBACK_BURST_FRAMES 192 -/* The buffer starts at whichever is larger: this many bursts, or this much time. The daemon runs - * under proot, where every system call is traced, and a buffer of two bursts (8 ms) left the - * client's menu sounds choppy on device; 30 ms is inaudible for a menu and games have their own - * path. adaptive=1 still grows it further after real underruns. */ #define MIN_BUFFER_BURSTS 2 #define MIN_BUFFER_USEC (30 * PA_USEC_PER_MSEC) -/* Android's own audio threads run at nice -16 (THREAD_PRIORITY_AUDIO); an app may ask for it. */ #define AUDIO_NICE (-16) #define STATS_EVERY_USEC (30 * PA_USEC_PER_SEC) @@ -109,7 +91,6 @@ struct userdata { int32_t max_buffer_frames; int32_t requested_buffer_frames; bool adaptive; - /* rate= was given: ask the device for exactly that instead of its own rate. */ bool rate_requested; int32_t xruns_seen; unsigned writes_since_xrun_check; @@ -127,8 +108,6 @@ static int32_t usec_to_frames(const struct userdata *u, pa_usec_t usec) { return (int32_t) ((uint64_t) usec * u->ss.rate / PA_USEC_PER_SEC); } -/* Each write hands the device half the buffer, whole bursts, at least one: fewer, larger - * trips through proot's tracing than a burst at a time, with half the buffer of slack left. */ static void set_chunk(struct userdata *u) { int32_t frames = u->buffer_frames / 2; frames -= frames % u->burst_frames; @@ -166,7 +145,6 @@ static void apply_buffer_size(struct userdata *u, int32_t frames) { set_chunk(u); } -/* Opens the stream for u->ss; on return u->ss holds what the device actually gave. */ static int open_stream(struct userdata *u) { AAudioStreamBuilder *builder = NULL; aaudio_result_t r; @@ -180,9 +158,6 @@ static int open_stream(struct userdata *u) { AAudioStreamBuilder_setSharingMode(builder, AAUDIO_SHARING_MODE_SHARED); AAudioStreamBuilder_setPerformanceMode(builder, u->performance_mode); AAudioStreamBuilder_setFormat(builder, u->ss.format == PA_SAMPLE_FLOAT32NE ? AAUDIO_FORMAT_PCM_FLOAT : AAUDIO_FORMAT_PCM_I16); - /* The device's own rate unless one was asked for: at any other rate Android falls back to a - * legacy stream with 20 ms bursts and room for three of them, and the daemon under proot - * cannot keep that fed. The sink takes whatever rate comes back; PulseAudio resamples clients. */ AAudioStreamBuilder_setSampleRate(builder, u->rate_requested ? (int32_t) u->ss.rate : AAUDIO_UNSPECIFIED); AAudioStreamBuilder_setChannelCount(builder, (int32_t) u->ss.channels); @@ -240,7 +215,6 @@ static void stop_stream(struct userdata *u) { u->started = false; } -/* How much audio the device still holds: frames written less frames it reports played. */ static pa_usec_t stream_latency(struct userdata *u) { int64_t position = 0, when_ns = 0; @@ -267,7 +241,6 @@ static void check_underruns(struct userdata *u) { u->writes_since_xrun_check = 0; xruns = AAudioStream_getXRunCount(u->stream); - /* A line every so often while underruns keep coming, so a session log shows the count. */ if (xruns != u->xruns_reported && pa_rtclock_now() - u->stats_at >= STATS_EVERY_USEC) { pa_log("aaudio-sink: %d underrun(s) so far, buffer %d frames", xruns, u->buffer_frames); u->xruns_reported = xruns; @@ -285,7 +258,6 @@ static void check_underruns(struct userdata *u) { pa_log("aaudio-sink: underrun %d: buffer now %d frames (%u ms)", xruns, u->buffer_frames, (unsigned) (frames_to_usec(u, u->buffer_frames) / PA_USEC_PER_MSEC)); } -/* One burst from the sink into the device. Returns <0 when the stream is gone for good. */ static int write_one_burst(struct userdata *u) { const void *data; aaudio_result_t written = 0; @@ -315,8 +287,6 @@ static int write_one_burst(struct userdata *u) { return 0; } - /* The device went away (headphones, a route change). Reopen once with the same settings; if - * the new stream differs in rate or format there is nothing sane to do but give up. */ pa_log("aaudio-sink: AAudioStream_write: %s; reopening the stream", AAudio_convertResultToText(written)); { pa_sample_spec before = u->ss; @@ -346,8 +316,6 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse return pa_sink_process_msg(o, code, data, offset, chunk); } -/* Runs in the IO thread: an opened sink means a running stream and a busy loop; a suspended - * one means a stopped stream and a thread asleep until a message arrives. */ static int sink_set_state_in_io_thread_cb(pa_sink *s, pa_sink_state_t new_state, pa_suspend_cause_t new_suspend_cause) { struct userdata *u = s->userdata; @@ -368,8 +336,6 @@ static void thread_func(void *userdata) { pa_log_debug("IO thread starting"); pa_thread_mq_install(&u->thread_mq); - /* Ahead of everything else in the app, as Android's own audio threads are; realtime on top - * of that where the kernel allows (it does not, for an app, but it costs nothing to ask). */ if (setpriority(PRIO_PROCESS, (id_t) syscall(SYS_gettid), AUDIO_NICE) < 0) pa_log_debug("aaudio-sink: could not raise the IO thread's priority (%s)", strerror(errno)); if (u->core->realtime_scheduling) @@ -379,7 +345,6 @@ static void thread_func(void *userdata) { int ret; if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && u->started) { - /* Nothing written can be taken back from the device, so a rewind is just acknowledged. */ if (u->sink->thread_info.rewind_requested) pa_sink_process_rewind(u->sink, 0); if (write_one_burst(u) < 0) @@ -426,7 +391,6 @@ int pa__init(pa_module *m) { pa_log("Invalid sample format specification or channel map"); goto fail; } - /* AAudio speaks 16-bit or float; anything else is rendered as 16-bit. */ if (ss.format != PA_SAMPLE_FLOAT32NE) ss.format = PA_SAMPLE_S16NE; diff --git a/tools/adb_device.py b/tools/adb_device.py index 5e29903996..e77705a745 100755 --- a/tools/adb_device.py +++ b/tools/adb_device.py @@ -29,9 +29,9 @@ def _device_list(adb: str) -> list[str]: raise DeviceResolutionError(result.stderr.strip() or "adb devices failed") devices = [] for line in result.stdout.splitlines()[1:]: - fields = line.split() - if len(fields) >= 2 and fields[1] == "device": - devices.append(fields[0]) + match = re.match(r"^(.+?)\s+device(?:\s+\S+:\S+)*\s*$", line) + if match: + devices.append(match.group(1)) return devices @@ -45,7 +45,6 @@ def _identity(adb: str, serial: str) -> str | None: def _rank(serial: str) -> tuple[int, str]: - # Prefer a stable mDNS transport over a network address with an ephemeral port. if "_adb-tls-connect._tcp" in serial: return (0, serial) if not re.search(r":\d+$", serial): diff --git a/tools/build_hand_lite.py b/tools/build_hand_lite.py new file mode 100644 index 0000000000..0b5c91b55c --- /dev/null +++ b/tools/build_hand_lite.py @@ -0,0 +1,69 @@ +"""Build the pinned lite-palm/lite-landmark MediaPipe bundle (mediapipe==0.10.21).""" +import argparse +import hashlib +import io +from pathlib import Path +import zipfile + +FULL_SHA = 'fbc2a30080c3c557093b5ddfc334698132eb341044ccee322ccf8bcf3607cde1' +LITE_SHA = 'd7fde8ac11f8ce03f8663775bfc323f4fc9f2a38062b4f4efa142874ef5b2a48' +PALM_SHA = 'e9a4aaddf90dda56a87235303cf00e4c2d3fb28725f68fd88772997dac905c18' + +def write_entry(archive, name, data): + entry = zipfile.ZipInfo(name, (1980, 1, 1, 0, 0, 0)) + entry.create_system = 3 + entry.external_attr = 0o100644 << 16 + archive.writestr(entry, data) + +def canonicalize_associated_files(data): + with zipfile.ZipFile(io.BytesIO(data)) as archive: + entries = archive.infolist() + if not entries: + return data + prefix = data[:min(entry.header_offset for entry in entries)] + files = {entry.filename: archive.read(entry) for entry in entries} + output = io.BytesIO(prefix) + with zipfile.ZipFile(output, 'a', compression=zipfile.ZIP_STORED) as archive: + for name in sorted(files): + write_entry(archive, name, files[name]) + return output.getvalue() + +def build(full, lite, palm, output): + import mediapipe + from mediapipe.tasks.python.metadata import metadata + from mediapipe.tasks.metadata import schema_py_generated as schema + if mediapipe.__version__ != '0.10.21': + raise ValueError('Use mediapipe==0.10.21 for reproducible metadata') + for path, expected in [(full, FULL_SHA), (lite, LITE_SHA), (palm, PALM_SHA)]: + if hashlib.sha256(path.read_bytes()).hexdigest() != expected: + raise ValueError(f'Model source checksum mismatch: {path}') + with zipfile.ZipFile(full) as task: + references = {name: task.read(name) for name in ['hand_detector.tflite', 'hand_landmarks_detector.tflite']} + def contract(data): + graph = schema.Model.GetRootAsModel(data, 0).Subgraphs(0) + return [[(graph.Tensors(int(i)).Name(), graph.Tensors(int(i)).ShapeAsNumpy().tolist(), graph.Tensors(int(i)).Type()) + for i in indices] for indices in (graph.InputsAsNumpy(), graph.OutputsAsNumpy())] + models = {} + for name, path in [('hand_detector.tflite', palm), ('hand_landmarks_detector.tflite', lite)]: + data = path.read_bytes() + reference = references[name] + if contract(data) != contract(reference): + raise ValueError(f'Lite tensor contract differs: {name}') + populator = metadata.MetadataPopulator.with_model_buffer(data) + populator.load_metadata_and_associated_files(reference) + populator.populate() + models[name] = canonicalize_associated_files(populator.get_model_buffer()) + output.parent.mkdir(parents=True, exist_ok=True) + with zipfile.ZipFile(output, 'w', compression=zipfile.ZIP_STORED) as task: + for name, data in models.items(): + write_entry(task, name, data) + print(hashlib.sha256(output.read_bytes()).hexdigest()) + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--full', type=Path, default=Path('app/src/main/assets/models/hand_landmarker.task')) + parser.add_argument('--lite', type=Path, required=True, help='Pinned hand_landmark_lite.tflite from storage.googleapis.com/mediapipe-assets/') + parser.add_argument('--palm', type=Path, required=True, help='Pinned palm_detection_lite.tflite from storage.googleapis.com/mediapipe-assets/') + parser.add_argument('--output', type=Path, default=Path('app/src/main/assets/models/hand_landmarker_lite.task')) + args = parser.parse_args() + build(args.full, args.lite, args.palm, args.output) diff --git a/tools/build_local.sh b/tools/build_local.sh index 836a2c52d7..c4c0e07dcf 100755 --- a/tools/build_local.sh +++ b/tools/build_local.sh @@ -47,7 +47,6 @@ fi ndk_version=${DROIDDECK_NDK_VERSION:-} if [[ -z "${ndk_version}" ]]; then - # Only complete NDKs: an interrupted sdkmanager install leaves a directory without source.properties. ndk_path=$(find "${sdk_dir}/ndk" -mindepth 2 -maxdepth 2 -name source.properties -print | xargs -n1 dirname | sort -V | tail -1) ndk_version=${ndk_path##*/} fi @@ -73,8 +72,33 @@ trap cleanup EXIT trap 'exit 130' INT trap 'exit 143' TERM -# A wedged daemon used to hang indefinitely and then trigger an unnecessary image rebuild. +cache_dir=${DROIDDECK_BUILD_CACHE:-"${HOME}/.cache/droiddeck-build"} +mkdir -p "${cache_dir}" +# Steps whose output depends only on tracked sources are kept per input hash in the +# shared cache, so a rerun or a fresh worktree copies them instead of rebuilding. +inputs_hash() { + (cd "${repo_root}" && { printf '%s\n' "$1"; shift; find "$@" -type f ! -name '*.pyc' | LC_ALL=C sort | xargs shasum -a 256; }) \ + | shasum -a 256 | cut -d' ' -f1 +} +restore_step() { + local stored="${cache_dir}/steps/$1/$2" + [[ -f "${stored}/.complete" ]] || return 1 + mkdir -p "$3" + (cd "${stored}" && tar -cf - --exclude .complete .) | tar -xf - -C "$3" || return 1 + echo "$1: inputs unchanged, reused ${stored}" +} +save_step() { + local stored="${cache_dir}/steps/$1/$2" part + mkdir -p "${cache_dir}/steps/$1" + part=$(mktemp -d "${stored}.part.XXXXXX") + (cd "$3" && tar -cf - .) | tar -xf - -C "${part}" + touch "${part}/.complete" + # Another checkout may have published the same key meanwhile; its copy is equivalent. + if [[ -e "${stored}" ]]; then rm -rf "${part}"; else mv "${part}" "${stored}" || rm -rf "${part}"; fi +} + python3 "${repo_root}/tools/docker_preflight.py" "${image_name}" +image_id=$(docker image inspect --format '{{.Id}}' "${image_name}") rm -rf -- "${linuxfs_dir}" mkdir -p "${linuxfs_dir}" @@ -84,6 +108,7 @@ docker run --rm --platform linux/amd64 \ set -euo pipefail d=app/src/main/assets/linuxfs mkdir -p "$d" + put() { mkdir -p "$(dirname "$2")" && cat "$1" > "$2"; } 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 @@ -104,30 +129,45 @@ docker run --rm --platform linux/amd64 \ 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" 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")" + put "$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/}" + [ -f "$f" ] && put "$f" "$d/${f#tools/linuxfs/overlay/}" done - 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 \ + put tools/linuxfs/desktop/droiddeck-desktop "$d/usr/local/bin/droiddeck-desktop" + put tools/linuxfs/desktop/droiddeck-gpu "$d/usr/local/bin/droiddeck-gpu" + put tools/linuxfs/desktop/droiddeck-desktop-gpu "$d/usr/local/bin/droiddeck-desktop-gpu" + put tools/linuxfs/desktop/kwin_wayland_wrapper "$d/usr/local/bin/kwin_wayland_wrapper" + put tools/linuxfs/desktop/firefox-droiddeck.js \ "$d/usr/lib/firefox/defaults/pref/droiddeck.js" READELF=aarch64-linux-gnu-readelf bash tools/linuxfs/check-preloads.sh "$d" ' -docker run --rm --platform linux/amd64 \ - -v "${repo_root}:/src" -w /src public.ecr.aws/docker/library/debian:bullseye bash -c ' - set -euo pipefail - printf "deb http://archive.debian.org/debian bullseye main\ndeb http://archive.debian.org/debian-security bullseye-security main\n" > /etc/apt/sources.list - 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 - tools/linuxfs/build-x86-preloads.sh app/src/main/assets/linuxfs - chown -R '"$(id -u):$(id -g)"' app/src/main/assets/linuxfs - ' +x86_key=$(inputs_hash bullseye tools/linuxfs/build-x86-preloads.sh tools/linuxfs/preload tools/linuxfs/fex \ + app/src/main/cpp/fakeinput_steam.cpp) +x86_stage="${staging_dir}/x86-preloads" +if restore_step x86-preloads "${x86_key}" "${linuxfs_dir}"; then :; else + docker run --rm --platform linux/amd64 \ + -v "${repo_root}:/src" -w /src public.ecr.aws/docker/library/debian:bullseye bash -c ' + set -euo pipefail + printf "deb http://archive.debian.org/debian bullseye main\ndeb http://archive.debian.org/debian-security bullseye-security main\n" > /etc/apt/sources.list + 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 + tools/linuxfs/build-x86-preloads.sh app/src/main/assets/linuxfs + chown -R '"$(id -u):$(id -g)"' app/src/main/assets/linuxfs + ' + mkdir -p "${x86_stage}" + cp -R "${linuxfs_dir}/x86_64" "${linuxfs_dir}/i386" "${x86_stage}/" + save_step x86-preloads "${x86_key}" "${x86_stage}" +fi + +vr_out="${linuxfs_dir}/usr/local/lib/droiddeck-vr" +vr_key=$(inputs_hash "${image_id} ${ndk_version} ${VK_INCLUDE:-}" tools/vr app/src/main/cpp/waylandcomp/generated/xdg-shell-protocol.c) +if ! restore_step vr "${vr_key}" "${vr_out}"; then + DROIDDECK_BUILD_IMAGE="${image_name}" "${repo_root}/tools/vr/build.sh" "${vr_out}" + save_step vr "${vr_key}" "${vr_out}" +fi github_repo=${DROIDDECK_GITHUB_REPOSITORY:-} if [[ -z "${github_repo}" ]]; then @@ -145,12 +185,6 @@ if [[ -z "${github_repo}" ]]; then github_repo=${github_repo%.git} fi -# Pinned downloads are kept between builds, named by their checksum, so a rebuild fetches nothing -# it already has. A cached file is checked again before use; a bad one is fetched anew. -cache_dir=${DROIDDECK_BUILD_CACHE:-"${HOME}/.cache/droiddeck-build"} -mkdir -p "${cache_dir}" -# cached <sha256> <name> <command...>: prints the cached path, running the command (which writes -# to "$out") only when the cache has no file with that checksum. cached() { local sha=$1 name=$2 out shift 2 @@ -177,8 +211,9 @@ fi . "${repo_root}/tools/linuxfs/uruntime.env" uruntime_binary=$(cached "${URUNTIME_SHA256}" "${URUNTIME_ASSET}" \ bash -c 'curl -fsSL --retry 3 -o "$out" "$0"' "https://github.com/VHSgunzo/uruntime/releases/download/${URUNTIME_VERSION}/${URUNTIME_ASSET}") -install -Dm644 "${uruntime_binary}" "${linuxfs_dir}/usr/local/lib/droiddeck/uruntime" -install -Dm644 "${repo_root}/tools/linuxfs/licenses/uruntime-LICENSE" "${linuxfs_dir}/usr/local/share/licenses/uruntime/LICENSE" +mkdir -p "${linuxfs_dir}/usr/local/lib/droiddeck" "${linuxfs_dir}/usr/local/share/licenses/uruntime" +install -m644 "${uruntime_binary}" "${linuxfs_dir}/usr/local/lib/droiddeck/uruntime" +install -m644 "${repo_root}/tools/linuxfs/licenses/uruntime-LICENSE" "${linuxfs_dir}/usr/local/share/licenses/uruntime/LICENSE" sync_assets="${repo_root}/app/src/main/assets/droiddeck-esync" if [[ -f "${repo_root}/tools/droiddeck-esync/release.env" ]]; then @@ -237,7 +272,6 @@ install -m644 "${mango_pkgs}/usr/bin/mangoapp" "${mango_dir}/mangoapp" for library in libfmt.so.10 libspdlog.so.1.13 libglfw.so.3 libtraceevent.so.1; do cp -L "${mango_pkgs}/usr/lib/${library}" "${mango_dir}/${library}" done -# Ours, not the package's: GPU memory without tracefs (tools/mangoapp/libtracefs-shim.c). docker run --rm --platform linux/amd64 --user "$(id -u):$(id -g)" -v "${repo_root}:/src" -w /src "${image_name}" \ aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -Wl,-soname,libtracefs.so.1 \ -o app/src/main/assets/linuxfs/usr/local/lib/mangoapp/libtracefs.so.1 tools/mangoapp/libtracefs-shim.c @@ -263,8 +297,6 @@ fi sink_output="${staging_dir}/sink-out" "${repo_root}/tools/directaudio/fetch.sh" "${repo_root}" "${sink_output}" "${repo_root}/tools/aaudio-sink/build.sh" "${pa_source}" "${sink_output}" -# proot is rebuilt only when its sources (source.env, the patches, the build script) changed since -# the libraries in jniLibs were built. proot_out="${repo_root}/app/src/main/jniLibs/arm64-v8a" proot_sources=$(cd "${repo_root}/tools/proot" && find . -type f ! -name '*.pyc' | LC_ALL=C sort | xargs shasum -a 256 | shasum -a 256 | cut -d' ' -f1) proot_inputs=$(printf '%s\n' "${proot_sources}" "${ndk_version}" | shasum -a 256 | cut -d' ' -f1) @@ -273,7 +305,12 @@ if [[ -f "${proot_out}/libproot.so" && -f "${proot_out}/libproot-loader.so" \ && (cd "${proot_out}" && shasum -a 256 -c .proot-outputs >/dev/null 2>&1); then echo "proot: sources unchanged, keeping ${proot_out}/libproot.so" else - "${repo_root}/tools/proot/build.sh" "${proot_out}" + proot_stage="${staging_dir}/proot" + if ! restore_step proot "${proot_inputs}" "${proot_stage}"; then + "${repo_root}/tools/proot/build.sh" "${proot_stage}" + save_step proot "${proot_inputs}" "${proot_stage}" + fi + install -m755 "${proot_stage}/libproot.so" "${proot_stage}/libproot-loader.so" "${proot_out}/" echo "${proot_inputs}" > "${proot_out}/.proot-inputs" (cd "${proot_out}" && shasum -a 256 libproot.so libproot-loader.so > .proot-outputs) fi @@ -294,10 +331,6 @@ tar -cf - -C "${bundle_dir}" . | zstd -19 -T0 -c > "${staging_dir}/pulseaudio.tz mkdir -p "${repo_root}/app/build/prepared-assets" mv "${staging_dir}/pulseaudio.tzst" "${repo_root}/app/build/prepared-assets/pulseaudio.tzst" -# The GOG / Epic / Amazon download engines are Rust (app/src/main/rust/stores); Gradle's -# buildRustStores task cross-compiles them with cargo-ndk, which needs the Android target and the -# cargo-ndk binary installed once. DROIDDECK_SKIP_RUST=1 builds an apk without the engines (the -# stores then report themselves unavailable) for a machine without a Rust toolchain. gradle_rust_arg="" if [[ "${DROIDDECK_SKIP_RUST:-0}" == 1 ]]; then gradle_rust_arg="-PskipRust=true" @@ -310,12 +343,20 @@ else fi done rustup target add --toolchain stable aarch64-linux-android + export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-${cache_dir}/stores-target}" if ! command -v cargo-ndk >/dev/null 2>&1; then cargo install cargo-ndk --locked fi fi cd "${repo_root}" +python3 tools/quest/build-driver.py "${NDK}" +comet_out="${linuxfs_dir}/usr/local/lib/droiddeck-comet" +comet_key=$(inputs_hash "${image_id}" tools/comet) +if ! restore_step comet "${comet_key}" "${comet_out}"; then + DROIDDECK_BUILD_IMAGE="${image_name}" bash tools/comet/build-local.sh + save_step comet "${comet_key}" "${comet_out}" +fi python3 tools/release/runtime_inputs.py record ./gradlew "${gradle_task}" --console=plain -PndkVersion="${ndk_version}" ${gradle_rust_arg} python3 tools/release/check_session_assets.py "app/build/outputs/apk/${build_variant}/app-${build_variant}.apk" @@ -376,10 +417,6 @@ grep -qi 'CN=Android, OU=Android, O=Android' <<<"${signature_output}" || { exit 1 } -# With DroidDeck's own key at hand, sign as CI's main builds are (tools/release/sign-apk.sh), so -# the apk installs over a release instead of being refused as a different signer. The key's -# location and password live in an untracked .signing.env (RELEASE_KEYSTORE, RELEASE_STORE_PASSWORD, -# RELEASE_KEY_ALIAS), looked for in this checkout and then in the main one, which worktrees share. signing_env=${DROIDDECK_SIGNING_ENV:-} if [[ -z "${signing_env}" ]]; then for candidate in "${repo_root}/.signing.env" \ @@ -391,7 +428,6 @@ if [[ -n "${signing_env}" ]]; then echo "Signing with DroidDeck's key (${signing_env})" ( set -a - # shellcheck disable=SC1090 cd "$(dirname "${signing_env}")" . "${signing_env}" set +a diff --git a/tools/build_rgb_uvc.py b/tools/build_rgb_uvc.py new file mode 100644 index 0000000000..634059804b --- /dev/null +++ b/tools/build_rgb_uvc.py @@ -0,0 +1,179 @@ +"""Build checksum-pinned Android RGB UVC libraries and their fault-injection test.""" +import argparse +import hashlib +import json +import os +from pathlib import Path +import shutil +import subprocess +import tarfile +import urllib.request +import zipfile + + +ROOT = Path(__file__).resolve().parents[1] +RECIPES = ROOT / 'tools/uvc' +PACKAGES = ( + {'name': 'libusb', 'version': '1.0.30', 'license': 'LGPL-2.1-or-later', + 'url': 'https://github.com/libusb/libusb/releases/download/v1.0.30/libusb-1.0.30.tar.bz2', + 'archive': 'libusb-1.0.30.tar.bz2', + 'sha256': 'fea36f34f9156400209595e300840767ab1a385ede1dc7ee893015aea9c6dbaf'}, + {'name': 'libuvc', 'version': '0.0.8', 'license': 'BSD-3-Clause', + 'url': 'https://github.com/libuvc/libuvc/archive/refs/tags/v0.0.8.zip', + 'archive': 'libuvc-0.0.8.zip', + 'sha256': '67922938ad81eb82b8ce14576f15a68ac75e30af738728a1f3070b6bbc938bce'}, +) + + +def sha256(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def download(package, cache): + archive = cache / package['archive'] + if not archive.exists(): + request = urllib.request.Request(package['url'], headers={'User-Agent': 'DroidDeckXR-UVC-Build'}) + with urllib.request.urlopen(request, timeout=60) as response: + payload = response.read() + if hashlib.sha256(payload).hexdigest() != package['sha256']: + raise ValueError(f"Downloaded checksum mismatch: {package['archive']}") + archive.write_bytes(payload) + if sha256(archive) != package['sha256']: + raise ValueError(f'Cached checksum mismatch: {archive}') + return archive + + +def extract(archive, destination): + if archive.suffix == '.zip': + with zipfile.ZipFile(archive) as bundle: + for item in bundle.infolist(): + (destination / item.filename).resolve().relative_to(destination.resolve()) + if (item.external_attr >> 16) & 0o170000 == 0o120000: + raise ValueError('Symlink in ZIP archive') + bundle.extractall(destination) + else: + with tarfile.open(archive) as bundle: + bundle.extractall(destination, filter='data') + + +def patch_source(source, patch): + old, new = [], [] + content = source.read_text(encoding='utf-8') + hunks = [] + for line in patch.read_text(encoding='utf-8').splitlines(keepends=True): + if line.startswith(('--- ', '+++ ')): + continue + if line.startswith('@@ '): + if old or new: + hunks.append((''.join(old), ''.join(new))) + old, new = [], [] + elif line.startswith(' '): + old.append(line[1:]) + new.append(line[1:]) + elif line.startswith('-'): + old.append(line[1:]) + elif line.startswith('+'): + new.append(line[1:]) + else: + raise ValueError(f'Unsupported patch line: {line!r}') + hunks.append((''.join(old), ''.join(new))) + for before, after in hunks: + if not before or content.count(before) != 1: + raise ValueError(f'Patch context mismatch: {source}') + content = content.replace(before, after, 1) + source.write_text(content, encoding='utf-8', newline='\n') + + +def run(command, log): + result = subprocess.run([str(part) for part in command], stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, text=True, encoding='utf-8') + log.write_text(result.stdout, encoding='utf-8') + print(result.stdout, end='') + result.check_returncode() + + +def build(args): + output, cache = args.output.resolve(), args.cache.resolve() + source, binary, dist = output / 'src', output / 'android-arm64', output / 'dist' + for folder in (output, cache, source): + folder.mkdir(parents=True, exist_ok=True) + for package in PACKAGES: + extract(download(package, cache), source) + patch = RECIPES / 'libuvc-submit-failure.patch' + stream = source / 'libuvc-0.0.8/src/stream.c' + patch_source(stream, patch) + + ndk, cmake = args.ndk.resolve(), args.cmake.resolve() + ninja = args.ninja.resolve() if args.ninja else cmake.parent / ('ninja.exe' if os.name == 'nt' else 'ninja') + configure = [cmake, '-S', RECIPES, '-B', binary, '-G', 'Ninja', + f'-DCMAKE_MAKE_PROGRAM={ninja.as_posix()}', + f'-DCMAKE_TOOLCHAIN_FILE={(ndk / "build/cmake/android.toolchain.cmake").as_posix()}', + f'-DRGB_UVC_SOURCE_ROOT={source.as_posix()}', '-DANDROID_ABI=arm64-v8a', + '-DANDROID_PLATFORM=android-26', '-DANDROID_STL=c++_static', + '-DCMAKE_BUILD_TYPE=RelWithDebInfo'] + compile_command = [cmake, '--build', binary, '--parallel', str(args.jobs)] + run(configure, output / 'configure.log') + run(compile_command, output / 'build.log') + + copies = { + binary / 'libusb.so': dist / 'arm64-v8a/libusb.so', + binary / 'libuvc.a': dist / 'arm64-v8a/libuvc.a', + binary / 'uvc_submit_failure_test': dist / 'arm64-v8a/uvc_submit_failure_test', + source / 'libusb-1.0.30/libusb/libusb.h': dist / 'include/libusb.h', + source / 'libuvc-0.0.8/include/libuvc/libuvc.h': dist / 'include/libuvc/libuvc.h', + binary / 'generated/libuvc/libuvc_config.h': dist / 'include/libuvc/libuvc_config.h', + source / 'libusb-1.0.30/COPYING': dist / 'licenses/libusb-COPYING', + source / 'libuvc-0.0.8/LICENSE.txt': dist / 'licenses/libuvc-LICENSE.txt', + } + for original, target in copies.items(): + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(original, target) + prebuilt = list((ndk / 'toolchains/llvm/prebuilt').iterdir()) + if len(prebuilt) != 1: + raise ValueError(f'Expected one NDK host toolchain: {prebuilt}') + readelf = prebuilt[0] / 'bin' / ('llvm-readelf.exe' if os.name == 'nt' else 'llvm-readelf') + reports = [] + for name in ('libusb.so', 'uvc_submit_failure_test'): + result = subprocess.check_output([str(readelf), '-h', '-l', '-d', str(binary / name)], + text=True, encoding='utf-8') + if 'AArch64' not in result or 'TEXTREL' in result: + raise ValueError(f'Unexpected ELF ABI or text relocations: {name}') + loads = [line for line in result.splitlines() if line.lstrip().startswith('LOAD')] + if not loads or any(not line.rstrip().endswith('0x4000') for line in loads): + raise ValueError(f'ELF must use 16 KiB LOAD alignment: {name}') + if name == 'uvc_submit_failure_test' and ('[libusb.so]' not in result or 'libglasses' in result): + raise ValueError('Fault test must depend on standalone libusb') + reports.append(result) + (output / 'elf-validation.txt').write_text('\n'.join(reports), encoding='utf-8') + manifest = { + 'packages': PACKAGES, + 'patch': {'path': str(patch.relative_to(ROOT)), 'sha256': sha256(patch), + 'sourceSha256': sha256(stream), + 'reason': 'Preserve USB submission errors; remove unsubmitted transfers under cb_mutex, then cancel/drain submitted transfers and join the callback thread.'}, + 'build': {'ndk': str(ndk), 'ndkSourceProperties': (ndk / 'source.properties').read_text(encoding='utf-8'), + 'configure': [str(part) for part in configure], 'compile': [str(part) for part in compile_command], + 'api': 26, 'abi': 'arm64-v8a', 'pic': True, 'queueBuffers': 8, + 'isoPacketsPerTransferMaximum': 32, 'jpegConversion': False, + 'libusbShared': True, 'libuvcStatic': True, + 'recipeHashes': {str(path.relative_to(ROOT)): sha256(path) for path in + (Path(__file__), RECIPES / 'CMakeLists.txt', RECIPES / 'submit_failure_test.cpp')}}, + 'validation': {'nativeBuild': 'passed', 'linkNoUndefined': 'passed', 'machine': 'AArch64', + 'loadAlignmentBytes': 16384, 'textRelocations': False, + 'deviceRuntimeTest': 'not run by build script'}, + 'artifacts': [{'path': str(path.relative_to(output)), 'sha256': sha256(path), 'size': path.stat().st_size} + for path in copies.values()], + } + (output / 'provenance.json').write_text(json.dumps(manifest, indent=2) + '\n', encoding='utf-8') + print(f'Libraries and headers: {dist}') + print(f'Provenance: {output / "provenance.json"}') + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--ndk', type=Path, required=True) + parser.add_argument('--cmake', type=Path, required=True) + parser.add_argument('--ninja', type=Path) + parser.add_argument('--output', type=Path, default=ROOT / 'build/rgb-uvc') + parser.add_argument('--cache', type=Path, default=ROOT / 'build/uvc-source-cache') + parser.add_argument('--jobs', type=int, default=4) + build(parser.parse_args()) diff --git a/tools/cardboard/test_cardboard_params.c b/tools/cardboard/test_cardboard_params.c new file mode 100644 index 0000000000..8b284cf6ac --- /dev/null +++ b/tools/cardboard/test_cardboard_params.c @@ -0,0 +1,114 @@ +#include "cardboard.h" +#include <math.h> +#include <stdio.h> +#include <string.h> + +static int failures; +#define CHECK(c) do { if (!(c)) { printf("FAIL %s:%d: %s\n", __FILE__, __LINE__, #c); failures++; } } while (0) +static int near(float a, float b) { return fabsf(a - b) < 1e-4f; } + +int main(void) { + struct cardboard_params p = {.enabled = 7, .source = 9, .ipd_m = 1.0f, .screen_dist_m = 0.0f, + .screen_width_m = 100.0f, .k1 = 5.0f, .k2 = -5.0f, .fov_deg = 500.0f, + .lens_inset = 1.0f, .chroma = -1.0f}; + cardboard_clamp(&p); + CHECK(p.enabled == 1); + CHECK(p.source == CARDBOARD_SOURCE_SCREEN); + CHECK(near(p.ipd_m, 0.1f)); + CHECK(near(p.screen_dist_m, 0.5f)); + CHECK(near(p.screen_width_m, 60.0f)); + CHECK(near(p.k1, 2.0f) && near(p.k2, -1.0f)); + CHECK(near(p.fov_deg, 140.0f)); + CHECK(near(p.lens_inset, 0.25f) && near(p.chroma, 0.0f)); + + struct cardboard_params q = {.enabled = 1, .source = CARDBOARD_SOURCE_SCREEN, .ipd_m = 0.064f, .screen_dist_m = 3.0f, + .screen_width_m = 4.0f, .k1 = 0.34f, .k2 = 0.55f, .fov_deg = 90.0f, + .lens_inset = 0.05f, .chroma = 0.006f}; + const float pose[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; + float pc[24]; + cardboard_push_constants(&q, pose, 1920, 1080, 2400, 1080, pc); + CHECK(near(pc[0], 1) && near(pc[1], 2) && near(pc[2], 3) && near(pc[3], 0.032f)); + CHECK(near(pc[4], 4) && near(pc[5], 5) && near(pc[6], 6) && near(pc[7], 3.0f)); + CHECK(near(pc[8], 7) && near(pc[9], 8) && near(pc[10], 9) && near(pc[11], 2.0f)); + CHECK(near(pc[12], 0.34f) && near(pc[13], 0.55f) && near(pc[14], 1.0f) && near(pc[15], 0.006f)); + CHECK(near(pc[16], 0.05f) && near(pc[17], 1920.0f / 1080.0f) && near(pc[18], 0.0f) && near(pc[19], 1200.0f / 1080.0f)); + + q.source = CARDBOARD_SOURCE_SBS; + cardboard_push_constants(&q, pose, 3840, 1080, 2400, 1080, pc); + CHECK(near(pc[17], 1920.0f / 1080.0f) && near(pc[18], 1.0f)); + q.mono = 1; + cardboard_push_constants(&q, pose, 3840, 1080, 1920, 1080, pc); + CHECK(near(pc[3], 0.0f) && near(pc[19], 1920.0f / 1080.0f) && near(pc[20], 1.0f)); + q.mono = 0; + cardboard_push_constants(&q, pose, 3840, 1080, 1920, 1080, pc); + CHECK(near(pc[3], 0.032f) && near(pc[19], 960.0f / 1080.0f) && near(pc[20], 0.0f)); + cardboard_push_constants(&q, pose, 0, 0, 0, 0, pc); + CHECK(isfinite(pc[17]) && isfinite(pc[19])); + + // Narrow optical profiles and the lower SteamVR slider values must reach + // the projection unchanged, rather than all becoming a 30-degree view. + const float glasses_fovs[] = {22.0f, 23.3f, 24.0f, 25.8f, 29.0f}; + for (unsigned i = 0; i < sizeof(glasses_fovs) / sizeof(glasses_fovs[0]); i++) { + q.fov_deg = glasses_fovs[i]; + cardboard_clamp(&q); + CHECK(near(q.fov_deg, glasses_fovs[i])); + cardboard_push_constants(&q, pose, 3840, 1080, 3840, 1080, pc); + CHECK(near(pc[14], tanf(glasses_fovs[i] * 0.5f * (float)M_PI / 180.0f))); + } + + const struct cardboard_params screen = { + .enabled = 1, .source = CARDBOARD_SOURCE_SCREEN, .ipd_m = 0.064f, + .screen_dist_m = 3.0f, .screen_width_m = 2.0f, .fov_deg = 25.8f, + }; + const int source_sizes[][2] = {{1280, 720}, {1600, 900}, {1920, 1080}}; + const int panel_heights[] = {1080, 1200}; + for (unsigned panel = 0; panel < sizeof(panel_heights) / sizeof(panel_heights[0]); panel++) { + float native[24]; + const int height = panel_heights[panel]; + cardboard_push_constants(&screen, pose, 1920, 1080, 3840, height, native); + for (unsigned size = 0; size < sizeof(source_sizes) / sizeof(source_sizes[0]); size++) { + cardboard_push_constants(&screen, pose, source_sizes[size][0], source_sizes[size][1], 3840, height, pc); + for (unsigned field = 0; field < 24; field++) CHECK(near(pc[field], native[field])); + CHECK(near(pc[17], 16.0f / 9.0f)); + CHECK(near(pc[18], CARDBOARD_SOURCE_SCREEN)); + CHECK(near(pc[19], 1920.0f / height)); + CHECK(near(pc[20], 0.0f)); + } + } + q.source = CARDBOARD_SOURCE_FLAT; + cardboard_clamp(&q); + CHECK(q.source == CARDBOARD_SOURCE_FLAT); + for (unsigned panel = 0; panel < sizeof(panel_heights) / sizeof(panel_heights[0]); panel++) { + for (unsigned size = 0; size < sizeof(source_sizes) / sizeof(source_sizes[0]); size++) { + cardboard_push_constants(&q, pose, source_sizes[size][0], source_sizes[size][1], 3840, panel_heights[panel], pc); + CHECK(near(pc[17], 16.0f / 9.0f)); + CHECK(near(pc[18], CARDBOARD_SOURCE_FLAT)); + CHECK(near(pc[19], 1920.0f / panel_heights[panel])); + CHECK(near(pc[20], 0.0f)); + } + } + q.fov_deg = 0.0f; + cardboard_clamp(&q); + CHECK(q.fov_deg > 0.0f && q.fov_deg < glasses_fovs[0]); + + const float translation[3] = {0.25f, -0.3f, 0.5f}; + q.source = CARDBOARD_SOURCE_SCREEN; + cardboard_push_constants(&q, pose, 1920, 1080, 3840, 1200, pc); + float original[24]; memcpy(original, pc, sizeof(pc)); + cardboard_push_translation(&q, translation, pc); + for (int i = 0; i < 21; ++i) CHECK(near(pc[i], original[i])); + for (int i = 0; i < 3; ++i) CHECK(near(pc[21+i], translation[i])); + q.source = CARDBOARD_SOURCE_SBS; + cardboard_push_translation(&q, translation, pc); + CHECK(near(pc[21], 0) && near(pc[22], 0) && near(pc[23], 0)); + q.source = CARDBOARD_SOURCE_FLAT; + cardboard_push_translation(&q, translation, pc); + CHECK(near(pc[21], 0) && near(pc[22], 0) && near(pc[23], 0)); + q.source = CARDBOARD_SOURCE_SCREEN; + const float zero[3] = {0}; + cardboard_push_translation(&q, zero, pc); + for (int i = 0; i < 24; ++i) CHECK(near(pc[i], original[i])); + if (failures) return 1; + printf("PASS: cardboard params\n"); + return 0; +} diff --git a/tools/check_glasses_menu_shader.py b/tools/check_glasses_menu_shader.py new file mode 100644 index 0000000000..1b775b3e33 --- /dev/null +++ b/tools/check_glasses_menu_shader.py @@ -0,0 +1,205 @@ +#!/usr/bin/env python3 +"""Compile and render the tracked-menu GLES shaders with headless Mesa (opt-in).""" + +import argparse +import ctypes as c +import hashlib +import json +import math +import os +import pathlib +import re +import struct +import zlib + + +def main(): + os.environ.setdefault('EGL_PLATFORM', 'surfaceless') + os.environ.setdefault('LIBGL_ALWAYS_SOFTWARE', '1') + os.environ.setdefault('MESA_GLES_VERSION_OVERRIDE', '2.0') + root = pathlib.Path(__file__).resolve().parents[1] + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output-dir', type=pathlib.Path, default=root / 'build/glasses-menu-shader') + args = parser.parse_args() + out = args.output_dir.resolve() + out.mkdir(parents=True, exist_ok=True) + source_path = root / 'app/src/main/java/com/droiddeck/launcher/glasses/GlassesMenuSurface.kt' + source = source_path.read_text() + shaders = {name: re.search(r'private const val '+name+r' = """(.*?)"""', source, re.S).group(1).encode() + for name in ('VERTEX', 'FRAGMENT')} + try: + egl = c.CDLL('libEGL.so.1') + gl = c.CDLL('libGLESv2.so.2') + except OSError as error: + raise SystemExit('This opt-in check needs Linux EGL/GLES and Mesa software rendering. ' + 'On Debian/Ubuntu install libegl1 libegl-mesa0 libgles2 libgl1-mesa-dri. ' + f'Library load failed: {error}') from error + + def bind(lib, name, result, *args): + fn = getattr(lib, name) + fn.restype, fn.argtypes = result, args + return fn + + P, I, U, F = c.c_void_p, c.c_int, c.c_uint, c.c_float + eglGetDisplay = bind(egl, 'eglGetDisplay', P, P) + eglInitialize = bind(egl, 'eglInitialize', U, P, c.POINTER(I), c.POINTER(I)) + eglChooseConfig = bind(egl, 'eglChooseConfig', U, P, c.POINTER(I), c.POINTER(P), I, c.POINTER(I)) + eglCreatePbufferSurface = bind(egl, 'eglCreatePbufferSurface', P, P, P, c.POINTER(I)) + eglCreateContext = bind(egl, 'eglCreateContext', P, P, P, P, c.POINTER(I)) + eglMakeCurrent = bind(egl, 'eglMakeCurrent', U, P, P, P, P) + eglQueryString = bind(egl, 'eglQueryString', c.c_char_p, P, I) + eglGetProcAddress = bind(egl, 'eglGetProcAddress', P, c.c_char_p) + display = eglGetDisplay(None) + major, minor = I(), I() + assert eglInitialize(display, c.byref(major), c.byref(minor)) + attrs = (I * 15)(0x3033, 1, 0x3040, 4, 0x3024, 8, 0x3023, 8, 0x3022, 8, 0x3021, 8, 0x3025, 0, 0x3038) + config, count = P(), I() + assert eglChooseConfig(display, attrs, c.byref(config), 1, c.byref(count)) and count.value + surface = eglCreatePbufferSurface(display, config, (I * 5)(0x3057, 512, 0x3056, 256, 0x3038)) + context = eglCreateContext(display, config, None, (I * 3)(0x3098, 2, 0x3038)) + assert surface and context and eglMakeCurrent(display, surface, surface, context) + getString = bind(gl, 'glGetString', c.c_char_p, U) + getError = bind(gl, 'glGetError', U) + metadata = {'source_sha256': hashlib.sha256(source.encode()).hexdigest(), + 'shader_sha256': {key: hashlib.sha256(value).hexdigest() for key, value in shaders.items()}, + 'egl': eglQueryString(display, 0x3054).decode(), + 'gles': getString(0x1F02).decode(), 'renderer': getString(0x1F01).decode(), + 'assumption': 'External texture contains top-row-first Canvas buffer pixels; consumer transform flips Y, as Android GLConsumer does. Device SurfaceTexture/Canvas integration still needs validation.'} + assert b'GL_OES_EGL_image_external' in getString(0x1F03) + createShader = bind(gl, 'glCreateShader', U, U) + shaderSource = bind(gl, 'glShaderSource', None, U, I, c.POINTER(c.c_char_p), c.POINTER(I)) + compileShader = bind(gl, 'glCompileShader', None, U) + getShaderiv = bind(gl, 'glGetShaderiv', None, U, U, c.POINTER(I)) + getShaderLog = bind(gl, 'glGetShaderInfoLog', None, U, I, c.POINTER(I), c.c_char_p) + compiled = [] + for name, kind in [('VERTEX', 0x8B31), ('FRAGMENT', 0x8B30)]: + shader = createShader(kind) + text = c.c_char_p(shaders[name]) + shaderSource(shader, 1, c.byref(text), None) + compileShader(shader) + status, log = I(), c.create_string_buffer(8192) + getShaderiv(shader, 0x8B81, c.byref(status)) + getShaderLog(shader, len(log), None, log) + assert status.value, name + ': ' + log.value.decode() + compiled.append(shader) + createProgram = bind(gl, 'glCreateProgram', U) + attachShader = bind(gl, 'glAttachShader', None, U, U) + linkProgram = bind(gl, 'glLinkProgram', None, U) + getProgramiv = bind(gl, 'glGetProgramiv', None, U, U, c.POINTER(I)) + getProgramLog = bind(gl, 'glGetProgramInfoLog', None, U, I, c.POINTER(I), c.c_char_p) + program = createProgram() + for shader in compiled: + attachShader(program, shader) + linkProgram(program) + status, log = I(), c.create_string_buffer(8192) + getProgramiv(program, 0x8B82, c.byref(status)) + getProgramLog(program, len(log), None, log) + assert status.value, log.value.decode() + useProgram = bind(gl, 'glUseProgram', None, U) + useProgram(program) + getUniform = bind(gl, 'glGetUniformLocation', I, U, c.c_char_p) + uniform1i = bind(gl, 'glUniform1i', None, I, I) + uniform3f = bind(gl, 'glUniform3f', None, I, F, F, F) + uniform4f = bind(gl, 'glUniform4f', None, I, F, F, F, F) + uniformMatrix4 = bind(gl, 'glUniformMatrix4fv', None, I, I, U, c.POINTER(F)) + loc = lambda name: getUniform(program, name.encode()) + uniform1i(loc('uTexture'), 0) + flip = (F * 16)(1,0,0,0, 0,-1,0,0, 0,0,1,0, 0,1,0,1) + uniformMatrix4(loc('uTextureMatrix'), 1, 0, flip) + + genTextures = bind(gl, 'glGenTextures', None, I, c.POINTER(U)) + bindTexture = bind(gl, 'glBindTexture', None, U, U) + texParameteri = bind(gl, 'glTexParameteri', None, U, U, I) + texImage2D = bind(gl, 'glTexImage2D', None, U, I, I, I, I, I, U, U, P) + names = (U * 2)() + genTextures(2, names) + bindTexture(0x0DE1, names[0]) + pixels = bytes(value for y in range(256) for x in range(256) for value in (x, y, 37, 255)) + pixel_data = (c.c_ubyte * len(pixels)).from_buffer_copy(pixels) + texImage2D(0x0DE1, 0, 0x1908, 256, 256, 0, 0x1908, 0x1401, pixel_data) + for param, value in [(0x2801,0x2601),(0x2800,0x2601),(0x2802,0x812F),(0x2803,0x812F)]: + texParameteri(0x0DE1, param, value) + createImage = c.CFUNCTYPE(P, P, P, U, P, c.POINTER(I))(eglGetProcAddress(b'eglCreateImageKHR')) + imageTarget = c.CFUNCTYPE(None, U, P)(eglGetProcAddress(b'glEGLImageTargetTexture2DOES')) + image = createImage(display, context, 0x30B1, P(names[0]), (I * 3)(0x30BC, 0, 0x3038)) + assert image + bindTexture(0x8D65, names[1]) + imageTarget(0x8D65, image) + for param, value in [(0x2801,0x2601),(0x2800,0x2601),(0x2802,0x812F),(0x2803,0x812F)]: + texParameteri(0x8D65, param, value) + assert getError() == 0 + getAttrib = bind(gl, 'glGetAttribLocation', I, U, c.c_char_p) + enableAttrib = bind(gl, 'glEnableVertexAttribArray', None, U) + attribPointer = bind(gl, 'glVertexAttribPointer', None, U, I, U, U, I, P) + vertices = (F * 8)(-1,-1, 1,-1, -1,1, 1,1) + position = getAttrib(program, b'aPosition') + enableAttrib(position) + attribPointer(position, 2, 0x1406, 0, 0, vertices) + viewport = bind(gl, 'glViewport', None, I, I, I, I) + draw = bind(gl, 'glDrawArrays', None, U, I, I) + read = bind(gl, 'glReadPixels', None, I, I, I, I, U, U, P) + finish = bind(gl, 'glFinish', None) + cases = [] + + def render(name, mono=True, position=(0,0,0), yaw=0, width=512, height=256, coords=((64,32),(448,32),(64,224),(448,224)), backdrop=False): + viewport(0, 0, width, height) + cs, sn = math.cos(yaw), math.sin(yaw) + for row, values in enumerate(((cs,0,sn),(0,1,0),(-sn,0,cs))): + uniform3f(loc('uRotation'+str(row)), *values) + uniform3f(loc('uHead'), *position) + uniform3f(loc('uScreen'), 1, 1, 2) + uniform4f(loc('uOptics'), .5, width/height/(1 if mono else 2), 0 if mono else .032, 1 if mono else 0) + draw(0x0005, 0, 4) + finish() + assert getError() == 0 + actual = (c.c_ubyte * (width*height*4))() + read(0,0,width,height,0x1908,0x1401,actual) + samples = [] + for x, y in coords: + # Readback is GL bottom-up; coordinates below are image top-left. + offset = ((height-1-y)*width+x)*4 + rgb = list(actual[offset:offset+3]) + eye = 0 if mono or x < width/2 else 1 + ux = (x+.5)/width if mono else (x+.5)/(width/2)-eye + vy = (y+.5)/height + rayx = (ux-.5)*(width/height/(1 if mono else 2)) + rayy = .5-vy + dx, dy, dz = cs*rayx-sn, rayy, -sn*rayx-cs + eo = 0 if mono else (-.032 if eye == 0 else .032) + ox, oy, oz = position[0]+cs*eo, position[1], position[2]-sn*eo + t = (-1-oz)/dz if dz else -1 + uv = ((ox+dx*t)*.5+.5, -(oy+dy*t)+.5) + valid = dz < -.0001 and t > 0 and all(0 <= v <= 1 for v in uv) and not backdrop + expected = [round(max(0,min(255,v*256-.5))) for v in uv]+[37] if valid else [4,4,5] + assert all(abs(a-b) <= 2 for a,b in zip(rgb,expected)), (name,x,y,rgb,expected,uv) + samples.append({'at':[x,y],'rgb':rgb,'expected':expected}) + cases.append({'name':name,'samples':samples}) + if name == 'mono_upright': + rows = bytearray() + for y in range(height-1,-1,-1): + for x in range(width): + start=(y*width+x)*4 + rows.extend(actual[start:start+3]) + (out/'menu-shader-mono.ppm').write_bytes(f'P6\n{width} {height}\n255\n'.encode()+rows) + def chunk(name, data): + return struct.pack('>I',len(data))+name+data+struct.pack('>I',zlib.crc32(name+data)&0xffffffff) + scanlines=b''.join(b'\x00'+rows[y*width*3:(y+1)*width*3] for y in range(height)) + (out/'menu-shader-mono.png').write_bytes(b'\x89PNG\r\n\x1a\n'+ + chunk(b'IHDR',struct.pack('>IIBBBBB',width,height,8,2,0,0,0))+ + chunk(b'IDAT',zlib.compress(scanlines))+chunk(b'IEND',b'')) + + render('mono_upright') + render('sbs_both_eyes', mono=False, width=512, height=128, + coords=((32,16),(224,16),(32,112),(224,112),(288,16),(480,16),(288,112),(480,112),(128,64),(384,64))) + render('six_dof_translation', position=(.2,.1,.1), coords=((256,128),(200,96),(300,160))) + render('row_major_yaw', yaw=math.radians(10), coords=((256,128),(200,96),(300,160))) + render('behind_plane', position=(0,0,-2), coords=((256,128),), backdrop=True) + render('back_facing', yaw=math.pi, coords=((256,128),), backdrop=True) + metadata['cases'] = cases + metadata['result'] = 'PASS' + (out/'menu-shader-validation.json').write_text(json.dumps(metadata, indent=2)+'\n') + print(json.dumps(metadata, indent=2), flush=True) + + +if __name__ == '__main__': + main() diff --git a/tools/comet/LICENSE b/tools/comet/LICENSE new file mode 100644 index 0000000000..57bc88a15a --- /dev/null +++ b/tools/comet/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/tools/comet/README.md b/tools/comet/README.md new file mode 100644 index 0000000000..0d633f8b8c --- /dev/null +++ b/tools/comet/README.md @@ -0,0 +1,24 @@ +# GOG Galaxy achievements + +Comet v0.3.2, pinned to `3d7488ee72f83b7e8462a70fd4c4638d6da71360`, and its +protocol submodule are built for glibc ARM64. Apache-2.0; upstream: +https://github.com/imLinguin/comet. + +Build with Rust 1.90, the `aarch64-unknown-linux-gnu` target and +`aarch64-linux-gnu-gcc`: `bash tools/comet/build.sh`. +The APK's runtime-input manifest records the prepared binary and Windows tools. + +The patch accepts credentials on stdin, announces readiness and accepted uploads +without secrets, emits named local unlocks for the session notification, uses a periodic sync tick even during SDK traffic, and retains the retry flag +when an achievement upload fails. +The Android supervisor discards other upstream output instead of exporting +HTTP errors or protocol payloads containing game credentials. + +The dummy service tools are the hash-checked upstream v0.3.2 release. They are +registered through the game's selected Proton in its own prefix. GOG overlays +are not installed. Pending databases survive session resets and sign-out. + +Local unlocks show a five-second DroidDeck notification without taking input focus. +The notification queue belongs to the session, ignores duplicate SDK unlocks, and clears +on account replacement or session stop. Upload acknowledgements refresh the achievement +reader without replaying notifications. diff --git a/tools/comet/build-local.sh b/tools/comet/build-local.sh new file mode 100644 index 0000000000..d809cae50a --- /dev/null +++ b/tools/comet/build-local.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +repo=$(cd "$(dirname "$0")/../.." && pwd) +image=${DROIDDECK_BUILD_IMAGE:-droiddeck-local-cross:24.04-v3} +docker run --rm --platform linux/amd64 -v "$repo:/src" \ + -v "${HOME}/.cache/droiddeck-comet-rust:/rust" -w /src \ + -e CARGO_HOME=/rust/cargo -e RUSTUP_HOME=/rust/rustup "$image" bash -lc ' + set -euo pipefail + trap "chown -R '"$(id -u):$(id -g)"' app/build/comet app/src/main/assets/linuxfs/usr/local/lib/droiddeck-comet /rust 2>/dev/null || true" EXIT + apt-get update -qq + apt-get install -y -qq curl git unzip ca-certificates pkg-config >/dev/null + export PATH=/rust/cargo/bin:$PATH + if ! command -v cargo >/dev/null; then + curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.90.0 + fi + export RUSTUP_TOOLCHAIN=1.90.0 + rustup target add aarch64-unknown-linux-gnu + bash tools/comet/build.sh + ' diff --git a/tools/comet/build.sh b/tools/comet/build.sh new file mode 100644 index 0000000000..b32fc75862 --- /dev/null +++ b/tools/comet/build.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -euo pipefail +repo=$(cd "$(dirname "$0")/../.." && pwd) +out=${1:-"$repo/app/src/main/assets/linuxfs/usr/local/lib/droiddeck-comet"} +cache=${COMET_BUILD_DIR:-"$repo/app/build/comet"} +commit=3d7488ee72f83b7e8462a70fd4c4638d6da71360 +mkdir -p "$cache" "$out" +if [ ! -d "$cache/source/.git" ]; then + git clone https://github.com/imLinguin/comet.git "$cache/source" +fi +git -C "$cache/source" reset --hard "$commit" +git -C "$cache/source" submodule update --init +git -C "$cache/source" apply "$repo/tools/comet/droiddeck.patch" +cd "$cache/source" +cargo build --locked --release --target aarch64-unknown-linux-gnu +install -m644 target/aarch64-unknown-linux-gnu/release/comet "$out/comet" +zip="$cache/dummy-service.zip" +if ! echo "7fc5facd1fce4d516cd3ce527e7e4dbe0bfd17649cea805e8ea7c37d4ba58d9a $zip" | sha256sum -c - >/dev/null 2>&1; then + curl -fsSL --retry 3 -o "$zip" https://github.com/imLinguin/comet/releases/download/v0.3.2/dummy-service.zip +fi +echo "7fc5facd1fce4d516cd3ce527e7e4dbe0bfd17649cea805e8ea7c37d4ba58d9a $zip" | sha256sum -c - +unzip -o "$zip" GalaxyCommunication.exe update-permissions.exe -d "$out" +install -m644 "$repo/tools/comet/LICENSE" "$out/LICENSE" +printf '%s\n' "$commit" > "$out/version" diff --git a/tools/comet/droiddeck.patch b/tools/comet/droiddeck.patch new file mode 100644 index 0000000000..6dbb60ae94 --- /dev/null +++ b/tools/comet/droiddeck.patch @@ -0,0 +1,174 @@ +diff --git a/src/api/gog/users.rs b/src/api/gog/users.rs +index 77d8ecf..6a6da12 100644 +--- a/src/api/gog/users.rs ++++ b/src/api/gog/users.rs +@@ -26,9 +26,9 @@ pub async fn get_token_for( + .get(url) + .timeout(time::Duration::from_secs(10)) + .send() +- .await?; ++ .await.map_err(reqwest::Error::without_url)?; + +- let result = result.error_for_status()?; +- let token: Token = result.json().await?; ++ let result = result.error_for_status().map_err(reqwest::Error::without_url)?; ++ let token: Token = result.json().await.map_err(reqwest::Error::without_url)?; + Ok(token) + } +diff --git a/src/api/handlers.rs b/src/api/handlers.rs +index 43a8180..fbbba1b 100644 +--- a/src/api/handlers.rs ++++ b/src/api/handlers.rs +@@ -59,6 +59,9 @@ pub async fn entry_point( + let mut topic_receiver_clone = topic_receiver.resubscribe(); + let mut overlay_event_receiver_clone = overlay_event_receiver.resubscribe(); + let main_socket = tokio::spawn(async move { ++ let mut sync_interval = time::interval(time::Duration::from_secs(10)); ++ sync_interval.set_missed_tick_behavior(time::MissedTickBehavior::Skip); ++ sync_interval.tick().await; + loop { + tokio::select! { + size_read = context_clone.socket_read_u16() => { +@@ -101,7 +104,7 @@ pub async fn entry_point( + } + } + +- _ = time::sleep(time::Duration::from_secs(10)) => { ++ _ = sync_interval.tick() => { + sync_routine(&context_clone, &reqwest_clone, user_clone.clone()).await + }, + +@@ -338,6 +341,7 @@ async fn sync_routine(context: &HandlerContext, reqwest_client: &Client, user_in + let Some(client_id) = &context.client_id().await else { + return; + }; ++ if !crate::client_allowed(client_id) { return; } + let Some(client_secret) = &context.client_secret().await else { + return; + }; +@@ -391,6 +395,8 @@ async fn sync_routine(context: &HandlerContext, reqwest_client: &Client, user_in + .expect("Failed to get database connection"); + let mut transaction = connection.begin().await.unwrap(); + ++ let mut pending = false; ++ let mut uploaded = 0; + for achievement in achievements { + debug!("Setting achievement {}", achievement.achievement_key()); + let result = gog::achievements::set_achievement( +@@ -409,11 +415,15 @@ async fn sync_routine(context: &HandlerContext, reqwest_client: &Client, user_in + .execute(&mut *transaction) + .await + .expect("Failed to update changed status"); ++ uploaded += 1; ++ } else { ++ pending = true; + } + } + transaction.commit().await.expect("Failed to save changes"); +- context.set_updated_achievements(false).await; +- info!("Uploaded achievements"); ++ context.set_updated_achievements(pending).await; ++ if uploaded > 0 { eprintln!("DROIDDECK_COMET_UPLOADED:{uploaded}"); } ++ if pending { eprintln!("DROIDDECK_COMET_PENDING"); } + } + Err(err) => error!("Failed to read local database {:?}", err), + } +diff --git a/src/api/handlers/communication_service.rs b/src/api/handlers/communication_service.rs +index c1bed3b..1dda644 100644 +--- a/src/api/handlers/communication_service.rs ++++ b/src/api/handlers/communication_service.rs +@@ -35,6 +35,9 @@ pub async fn entry_point( + debug!("Handling in communication service"); + let header = &payload.header; + ++ if let Some(client) = context.client_id().await { ++ if !crate::client_allowed(&client) { return Err(MessageHandlingError::unauthorized()); } ++ } + let message_type: i32 = header.type_().try_into().unwrap(); + + if message_type == MessageType::LIBRARY_INFO_REQUEST.value() { +@@ -132,6 +135,7 @@ async fn auth_info_request( + + let client_id = request_data.client_id(); + let client_secret = request_data.client_secret(); ++ if !crate::client_allowed(client_id) { return Err(MessageHandlingError::unauthorized()); } + let openid = request_data.openid(); + let pid = request_data.game_pid(); + +@@ -551,6 +555,14 @@ async fn unlock_user_achievement( + .await + .expect("Failed to write achievement to database"); + context.set_updated_achievements(true).await; ++ eprintln!("DROIDDECK_COMET_UNLOCKED:{}", serde_json::json!({ ++ "client_id": context.client_id().await, ++ "id": achievement.achievement_key(), ++ "name": achievement.name(), ++ "description": achievement.description(), ++ "icon": achievement.image_url_unlocked(), ++ "unlocked_at": timestamp, ++ })); + achievement.date_unlocked = timestamp_string; + let pid = context.get_pid().await; + let _ = context +diff --git a/src/lib.rs b/src/lib.rs +index 0c539f1..50fdd21 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -16,3 +16,10 @@ lazy_static! { + .and_then(|x| if !x.contains("-") { None } else { Some(x) }) + .unwrap_or_else(|| String::from("en-US")); + } ++ ++ ++pub fn client_allowed(client_id: &str) -> bool { ++ let Ok(path) = std::env::var("COMET_ALLOWED_CLIENTS") else { return true; }; ++ std::fs::read(path).ok().and_then(|data| serde_json::from_slice::<Vec<String>>(&data).ok()) ++ .is_some_and(|clients| clients.iter().any(|id| id == client_id)) ++} +diff --git a/src/main.rs b/src/main.rs +index 109098f..8301edb 100644 +--- a/src/main.rs ++++ b/src/main.rs +@@ -41,11 +41,13 @@ enum SubCommand { + struct Args { + #[arg(long, help = "Provide access token (for getting user data)")] + access_token: Option<String>, ++ #[arg(long, help = "Read credentials as JSON from stdin")] ++ credentials_stdin: bool, + #[arg(long, help = "Provide refresh token (for creating game sessions)")] + refresh_token: Option<String>, + #[arg(long, help = "Galaxy user id from /userData.json")] + user_id: Option<String>, +- #[arg(long, help = "User name")] ++ #[arg(long, help = "User name", default_value = "")] + username: String, + #[arg( + long = "from-heroic", +@@ -86,7 +88,18 @@ struct Args { + + #[tokio::main] + async fn main() { +- let args = Args::parse(); ++ let mut args = Args::parse(); ++ if args.credentials_stdin { ++ use std::io::Read; ++ let value: serde_json::Value = serde_json::from_reader(std::io::stdin().take(32768)) ++ .expect("Invalid credential input"); ++ let field = |key: &str| value.get(key).and_then(|v| v.as_str()) ++ .filter(|v| !v.is_empty()).expect("Missing credential field").to_owned(); ++ args.access_token = Some(field("access_token")); ++ args.refresh_token = Some(field("refresh_token")); ++ args.user_id = Some(field("user_id")); ++ args.username = field("username"); ++ } + #[cfg(debug_assertions)] + let log_level = "debug"; + #[cfg(not(debug_assertions))] +@@ -306,6 +319,7 @@ async fn main() { + }); + + info!("Listening on port 9977"); ++ eprintln!("DROIDDECK_COMET_READY:{}", std::process::id()); + let socket_shutdown = cloned_shutdown.clone(); + let cloned_user_info = user_info.clone(); + diff --git a/tools/desktop-kde/build-kwin.sh b/tools/desktop-kde/build-kwin.sh index f86f28e4ac..ae6ac49430 100644 --- a/tools/desktop-kde/build-kwin.sh +++ b/tools/desktop-kde/build-kwin.sh @@ -1,6 +1,4 @@ #!/bin/bash -# Build the pinned KWin executable with the nested-scale patch on native aarch64 Linux. -# Its dependencies come from signature-checked Arch Linux ARM packages in a disposable chroot. set -euo pipefail out=$(realpath -m "${1:?out dir}") here=$(cd "$(dirname "$0")" && pwd) @@ -20,7 +18,6 @@ for repo in core extra alarm; do done touch "$work/runtime.txt" python3 "$here/closure.py" "$work/db" "$work/runtime.txt" "$here/kwin-build-seeds.txt" > "$work/packages.txt" -# Refuse a repository whose KWin headers/libraries have moved beyond the pinned source. grep -Eq '^extra/kwin-6\.7\.5-[0-9]+-aarch64\.pkg\.tar\.' "$work/packages.txt" export work mirror builder here download() { @@ -56,8 +53,6 @@ sudo cp "$work/root/build/out/bin/kwin_wayland" "$out/kwin_wayland" sudo cp "$work/root/build/out/bin/libkwin.so.$version" "$out/libkwin.so.$version" sudo chown "$(id -u):$(id -g)" "$out/kwin_wayland" "$out/libkwin.so.$version" strip --strip-unneeded "$out/kwin_wayland" "$out/libkwin.so.$version" -# The backend lives in libkwin, not the small launcher. Catch accidentally shipping only the -# executable, which boots successfully but still loads the distribution's unpatched backend. grep -aq DROIDDECK_NESTED_SCALE "$out/libkwin.so.$version" { echo "KWin $version source sha256 $source_sha" diff --git a/tools/desktop-kde/build.sh b/tools/desktop-kde/build.sh index b64c004824..524a76f46e 100755 --- a/tools/desktop-kde/build.sh +++ b/tools/desktop-kde/build.sh @@ -1,24 +1,4 @@ #!/bin/bash -# Builds the KDE Plasma desktop package for the Linux runtime: the closure of seeds.txt over Arch -# Linux ARM's aarch64 repositories, minus what the runtime image already carries, plus overlay/, -# as a zstd tarball that extracts over the rootfs (DesktopCatalog's "tar" kind). -# -# tools/desktop-kde/build.sh <out dir> -# -# The runtime's own packages (runtime-packages.txt, "name version" from its pacman db) are not -# shipped again, except where something in the closure asks for a version of one the runtime does -# not have (a versioned dependency on it, or on a library it provides): then the repository's -# build comes along and replaces it. Nothing is deleted on extraction, so a library whose soname -# moved keeps its old file for what the runtime linked against it. -# -# Every package is fetched over HTTPS and must carry a valid signature by the Arch Linux ARM Build -# System key (archlinuxarm-builder.gpg; primary fingerprint pinned below, as archlinuxarm.org -# publishes it and archlinuxarm-keyring trusts it) and match the sha256 the repository database -# gives for it; anything else stops the build. The repository databases themselves are not signed -# by Arch Linux ARM, so they decide only which signed packages are taken. desktop-kde.packages.txt -# lists every package taken, with its sha256: what a release was built from. -# -# Needs curl, gpgv, tar, xz, zstd, python3. set -euo pipefail out=${1:?out dir} here=$(cd "$(dirname "$0")" && pwd) @@ -27,7 +7,6 @@ case $mirror in https://*) ;; *) echo "ALARM_MIRROR must be https" >&2; exit 1 ; builder=68B3537F39A313B3E574D06777193F152BDBE6A6 fetch() { curl -fsSL --proto '=https' --proto-redir '=https' --retry 6 --retry-delay 5 --retry-all-errors -o "$1" "$2"; } work=$(mktemp -d); mkdir -p "$out" "$work/db" "$work/root" -# PKG_CACHE keeps the downloaded packages between builds (a local rebuild after an overlay change). pkgs=${PKG_CACHE:-$work/pkgs}; mkdir -p "$pkgs" trap 'rm -rf "$work"' EXIT @@ -56,24 +35,19 @@ done < "$work/pkglist.txt" cp -a "$here/overlay/." "$work/root/" -# Same-version KWin, built by build-kwin.sh with the nested desktop scale patch. if [ -n "${KDE_KWIN_OVERRIDE:-}" ]; then install -m 755 "$KDE_KWIN_OVERRIDE/kwin_wayland" "$work/root/usr/bin/kwin_wayland" install -m 755 "$KDE_KWIN_OVERRIDE/libkwin.so.6.7.5" "$work/root/usr/lib/libkwin.so.6.7.5" fi -# Weight that no desktop on a phone reads. rm -rf "$work/root/usr/share/doc" "$work/root/usr/share/man" "$work/root/usr/share/info" \ "$work/root/usr/share/gtk-doc" "$work/root/usr/include" "$work/root/usr/lib/pkgconfig" \ "$work/root/usr/lib/cmake" "$work/root/usr/share/help" -# English only, on purpose: the desktop session runs in C.UTF-8 and nothing hands the app's language -# to KDE, so other translations would be weight no one sees. They come back with localizing the -# desktop itself (LANGUAGE from the app's language at session start). find "$work/root/usr/share/locale" -mindepth 1 -maxdepth 1 -type d ! -name 'en*' -exec rm -rf {} + 2>/dev/null || true find "$work/root/usr/lib" -name '*.a' -delete chmod -R u+rwX "$work/root" -sed 's#^[a-z]*/##' "$work/pkglist.txt" > "$out/desktop-kde.packages.txt" # "file sha256", each verified above +sed 's#^[a-z]*/##' "$work/pkglist.txt" > "$out/desktop-kde.packages.txt" tar -C "$work/root" --zstd -cf "$out/desktop-kde.tar.zst" . sha256sum "$out/desktop-kde.tar.zst" | awk '{print $1}' > "$out/desktop-kde.sha256" ls -l "$out/desktop-kde.tar.zst" diff --git a/tools/desktop-kde/closure.py b/tools/desktop-kde/closure.py index b0475cf6e6..f078a5068b 100755 --- a/tools/desktop-kde/closure.py +++ b/tools/desktop-kde/closure.py @@ -15,7 +15,6 @@ REPOS = ("core", "extra", "alarm") def vercmp_part(a, b): - # rpmvercmp, as pacman compares version strings. if a == b: return 0 sa = re.findall(r"\d+|[a-zA-Z]+", a) @@ -104,14 +103,11 @@ def main(): def resolve(dep): """The package to take for a dependency string, and whether the runtime's copy serves.""" name, op, want = parse_dep(dep) - # A runtime package that is the dependency or provides it, at a version that serves. if name in runtime and satisfies(runtime[name], op, want): return name, True candidates = providers.get(name, []) for real, _ in candidates: if real in runtime: - # A provided name (a soname, mostly): the runtime's build serves as long as it is - # the repository's own, or nothing asks for a particular version. if not op or runtime[real] == pkgs[real]["version"]: return real, True if satisfies_provider(real, name, op, want): diff --git a/tools/desktop-kde/kwin-build-seeds.txt b/tools/desktop-kde/kwin-build-seeds.txt index b544ad4b0f..c0cfe51be6 100644 --- a/tools/desktop-kde/kwin-build-seeds.txt +++ b/tools/desktop-kde/kwin-build-seeds.txt @@ -1,4 +1,3 @@ -# Native build tools and KWin's Arch makedepends; dependencies are resolved and signature-checked. kwin base-devel cmake diff --git a/tools/desktop-kde/lxqt-applications.txt b/tools/desktop-kde/lxqt-applications.txt index 8127155670..6351c77649 100644 --- a/tools/desktop-kde/lxqt-applications.txt +++ b/tools/desktop-kde/lxqt-applications.txt @@ -1,5 +1,3 @@ -# Application packages from steamdeck-desktop-r1's desktop.packages.txt. -# Keep dependencies and shared apps/icons (Firefox, mpv, Breeze, xdg-utils and portals). labwc lxqt-panel lxqt-config diff --git a/tools/desktop-kde/overlay/usr/share/icons/hicolor/scalable/actions/steamdeck-gaming-return.svg b/tools/desktop-kde/overlay/usr/share/icons/hicolor/scalable/actions/steamdeck-gaming-return.svg index 5cff1ce9d8..96d426607e 100644 --- a/tools/desktop-kde/overlay/usr/share/icons/hicolor/scalable/actions/steamdeck-gaming-return.svg +++ b/tools/desktop-kde/overlay/usr/share/icons/hicolor/scalable/actions/steamdeck-gaming-return.svg @@ -1,4 +1,3 @@ -<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg id="svg2" height="64" style="" viewBox="0 0 64 64" width="64" xmlns="http://www.w3.org/2000/svg" sodipodi:docname="deck_icon.svg" inkscape:version="1.2-dev (d2dd25d878, 2022-02-01, custom)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"> <path id="path42220" d="m 32 4 v 10 a 18 18 0 0 1 18 18 a 18 18 0 0 1 -18 18 v 10 a 28 28 0 0 0 28 -28 a 28 28 0 0 0 -28 -28 z" style="fill:#fff;fill-rule:evenodd"/> <circle id="path43518" cx="32" cy="32" r="14" style="fill:#1a9fff;fill-rule:evenodd"/> diff --git a/tools/desktop-kde/overlay/usr/share/icons/hicolor/scalable/places/distributor-logo-steamdeck.svg b/tools/desktop-kde/overlay/usr/share/icons/hicolor/scalable/places/distributor-logo-steamdeck.svg index 082485bf1a..b0ac005cbe 100644 --- a/tools/desktop-kde/overlay/usr/share/icons/hicolor/scalable/places/distributor-logo-steamdeck.svg +++ b/tools/desktop-kde/overlay/usr/share/icons/hicolor/scalable/places/distributor-logo-steamdeck.svg @@ -1,4 +1,3 @@ -<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg id="svg2" height="64" style="" viewBox="0 0 64 64" width="64" xmlns="http://www.w3.org/2000/svg" sodipodi:docname="start.svg" inkscape:version="1.2-dev (d2dd25d878, 2022-02-01, custom)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"> <style type="text/css" id="current-color-scheme"> .ColorScheme-Text { diff --git a/tools/desktop-kde/overlay/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/layouts/org.kde.plasma.desktop-layout.js b/tools/desktop-kde/overlay/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/layouts/org.kde.plasma.desktop-layout.js index 485bf74688..e27c370d3e 100644 --- a/tools/desktop-kde/overlay/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/layouts/org.kde.plasma.desktop-layout.js +++ b/tools/desktop-kde/overlay/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/layouts/org.kde.plasma.desktop-layout.js @@ -1,5 +1,3 @@ -// The first desktop: DroidDeck's wallpaper, and SteamOS's Plasma's default bottom panel with the Steam Deck -// launcher icon, Steam, the file manager, the browser and Konsole pinned to the task manager. var desktops = desktopsForActivity(currentActivity()); for (var i = 0; i < desktops.length; i++) { desktops[i].wallpaperPlugin = "org.kde.image"; @@ -36,7 +34,6 @@ if (trayId) { trayContainment.currentConfigGroup = ["General"]; trayContainment.writeConfig("scaleIconsToFit", true); } -// The runtime has no locale of its own (C.UTF-8), whose short date reads "9 10 2026". var clock = panel.addWidget("org.kde.plasma.digitalclock"); clock.currentConfigGroup = ["Appearance"]; clock.writeConfig("dateFormat", "isoDate"); diff --git a/tools/desktop-kde/overlay/usr/share/wallpapers/DroidDeck/contents/images/1920x1080.svg b/tools/desktop-kde/overlay/usr/share/wallpapers/DroidDeck/contents/images/1920x1080.svg index 4a3d4eecad..2293971231 100644 --- a/tools/desktop-kde/overlay/usr/share/wallpapers/DroidDeck/contents/images/1920x1080.svg +++ b/tools/desktop-kde/overlay/usr/share/wallpapers/DroidDeck/contents/images/1920x1080.svg @@ -1,5 +1,4 @@ <svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080" viewBox="0 0 1920 1080"> - <!-- DroidDeck's desktop wallpaper: the mark (artwork/droiddeck-mark.svg) on deep navy. --> <defs> <radialGradient id="bg" cx="960" cy="540" r="1150" gradientUnits="userSpaceOnUse"> <stop offset="0" stop-color="#14213a"/> diff --git a/tools/desktop-kde/patches/0001-respect-nested-desktop-scale.patch b/tools/desktop-kde/patches/0001-respect-nested-desktop-scale.patch index af8c1bcfb0..7c8767ff81 100644 --- a/tools/desktop-kde/patches/0001-respect-nested-desktop-scale.patch +++ b/tools/desktop-kde/patches/0001-respect-nested-desktop-scale.patch @@ -28,7 +28,7 @@ - // intentionally ignored, as it would get overwritten - // with the fractional scale protocol anyways - // next.scale = props->scale.value_or(m_state.scale); -+ // DroidDeck owns the outer window size; Display Settings owns the inner UI scale. ++ + if (qEnvironmentVariableIsSet("DROIDDECK_NESTED_SCALE")) { + next.scale = props->scale.value_or(m_state.scale); + next.scaleSetting = props->scaleSetting.value_or(m_state.scaleSetting); @@ -53,7 +53,7 @@ void init(const QSize &pixelSize, qreal scale, bool fullscreen); -+ // The outer window scale, independent of the desktop UI scale in DroidDeck. ++ + qreal presentationScale() const; bool isReady() const; KWayland::Client::Surface *surface() const; diff --git a/tools/desktop-kde/removal-manifests.py b/tools/desktop-kde/removal-manifests.py index 86ed74e69b..9c909dc84c 100644 --- a/tools/desktop-kde/removal-manifests.py +++ b/tools/desktop-kde/removal-manifests.py @@ -68,7 +68,6 @@ def main(): cache, out, legacy_cache = map(pathlib.Path, sys.argv[5:8]) here = pathlib.Path(__file__).resolve().parent seeds = {line.strip() for line in (here / 'seeds.txt').read_text().splitlines() if line.strip() and not line.startswith('#')} - SHARED_SEEDS - # Published source package hashes; the caller places this beside the verified cache. packages = dict(line.split() for line in (cache / 'desktop-kde.packages.txt').read_text().splitlines()) selected = set() found = set() @@ -86,8 +85,6 @@ def main(): selected.update(str(p.relative_to(here / 'overlay')) for p in (here / 'overlay').rglob('*') if p.is_file()) inventories = [inventory(p, pin[1]) for p, pin in zip(archives, PINS)] out.mkdir(parents=True, exist_ok=True) - # The old runtime's pacman database omits some gamescope dependencies (e.g. libseat). - # Own only the LXQt application packages, never their dependency closure. legacy_seeds = {line.strip() for line in (here / 'lxqt-applications.txt').read_text().splitlines() if line.strip() and not line.startswith('#')} legacy_selected = set() diff --git a/tools/desktop-kde/seeds.txt b/tools/desktop-kde/seeds.txt index 816285de56..ed61bd8eef 100644 --- a/tools/desktop-kde/seeds.txt +++ b/tools/desktop-kde/seeds.txt @@ -1,6 +1,3 @@ -# The desktop: KDE Plasma, as SteamOS's desktop mode has it - KWin nested as a client of the app's -# compositor, Plasma's shell on it, and the apps SteamOS puts on its desktop. One package name per -# line; build.sh takes the closure over Arch Linux ARM at build time, minus what the runtime has. kwin plasma-workspace plasma-desktop diff --git a/tools/directaudio/fetch.sh b/tools/directaudio/fetch.sh index f2f21c1964..af886304f4 100755 --- a/tools/directaudio/fetch.sh +++ b/tools/directaudio/fetch.sh @@ -1,21 +1,7 @@ #!/usr/bin/env bash -# Fetches the DirectAudio pieces DroidDeck ships from the pinned release in tools/directaudio/release.env -# and puts them where the build reads them. Four zips, checksummed: -# directaudio-linux-wine11.zip the game driver for Valve Proton 11 / Experimental / GE-Proton -# directaudio-linux-wine11-systhread.zip the game driver for Proton-CachyOS (system-thread mmdevapi) -# directaudio-linux-relay.zip the Android-side helper (speaker + microphone for games) -# directaudio-linux-sink.zip the PulseAudio sinks; the app ships module-directaudio-native-sink -# -# tools/directaudio/fetch.sh <repo root> <dir to receive the sink modules> -# -# Driver sets -> app/src/main/assets/directaudio/<set>/ (generated, ignored by git) -# Helper -> app/src/main/jniLibs/arm64-v8a/libdirectaudiorelay.so (generated, ignored by git) -# Sink -> <sink dir>/module-directaudio-native-sink.so for the audio bundle, next to the -# module-aaudio-sink.so tools/aaudio-sink builds (the fallback). set -euo pipefail repo_root=$1 sink_out=$2 -# shellcheck source=release.env . "${repo_root}/tools/directaudio/release.env" for v in DIRECTAUDIO_REPO DIRECTAUDIO_TAG DIRECTAUDIO_WINE11_SHA256 DIRECTAUDIO_SYSTHREAD_SHA256 DIRECTAUDIO_RELAY_SHA256 DIRECTAUDIO_SINK_SHA256; do [[ -n "${!v:-}" && "${!v}" != TBD ]] || { echo "tools/directaudio/release.env: ${v} is not set" >&2; exit 1; } @@ -23,11 +9,18 @@ done work=$(mktemp -d) trap 'rm -rf "${work}"' EXIT +cache=${DROIDDECK_BUILD_CACHE:-"${HOME}/.cache/droiddeck-build"} +mkdir -p "${cache}" fetch() { - local name=$1 sha=$2 - curl -fsSL --retry 3 -o "${work}/${name}" \ - "https://github.com/${DIRECTAUDIO_REPO}/releases/download/${DIRECTAUDIO_TAG}/${name}" - echo "${sha} ${work}/${name}" | sha256sum -c - >/dev/null || { echo "${name}: checksum mismatch" >&2; exit 1; } + local name=$1 sha=$2 kept="${cache}/$2-$1" part + if ! echo "${sha} ${kept}" | sha256sum -c - >/dev/null 2>&1; then + part=$(mktemp "${kept}.part.XXXXXX") + curl -fsSL --retry 3 -o "${part}" \ + "https://github.com/${DIRECTAUDIO_REPO}/releases/download/${DIRECTAUDIO_TAG}/${name}" + echo "${sha} ${part}" | sha256sum -c - >/dev/null || { echo "${name}: checksum mismatch" >&2; rm -f "${part}"; exit 1; } + mv "${part}" "${kept}" + fi + cp "${kept}" "${work}/${name}" } fetch directaudio-linux-wine11.zip "${DIRECTAUDIO_WINE11_SHA256}" fetch directaudio-linux-wine11-systhread.zip "${DIRECTAUDIO_SYSTHREAD_SHA256}" @@ -44,7 +37,6 @@ for set in linux-wine11 linux-wine11-systhread; do done rm -f "${assets}/${set}/README.md" done -# Each set says which interface it was built for; the name must not lie. grep -q '^abi wine11$' "${assets}/linux-wine11/version.txt" grep -q '^abi systhread$' "${assets}/linux-wine11-systhread/version.txt" diff --git a/tools/directaudio/release.env b/tools/directaudio/release.env index 1e30f83f1e..5e052f0bbb 100644 --- a/tools/directaudio/release.env +++ b/tools/directaudio/release.env @@ -1,6 +1,3 @@ -# The DirectAudio release this build ships, pinned: nothing compiled for audio lives in this repo. -# Source and release notes: https://github.com/The412Banner/directaudio -# Bump the tag and the four checksums together (sha256 of each zip, from the release's SHA256SUMS.txt). DIRECTAUDIO_REPO=The412Banner/directaudio DIRECTAUDIO_TAG=directaudio-linux-v1.1.0 DIRECTAUDIO_WINE11_SHA256=835e6cab072f5148893c43379e60506483aeb3f1444e777b430c295cbeb472c9 diff --git a/tools/droiddeck-scenario b/tools/droiddeck-scenario index 2a37eebfb6..b4590b02fe 100755 --- a/tools/droiddeck-scenario +++ b/tools/droiddeck-scenario @@ -155,7 +155,7 @@ class Runner: ): try: found[name] = action() - except Exception as exc: # evidence is best effort + except Exception as exc: found[name] = {"ok": False, "error": str(exc)} write_json(folder / "evidence.json", found) return {k: v.get("ok", True) if isinstance(v, dict) else True for k, v in found.items()} diff --git a/tools/droiddeckctl b/tools/droiddeckctl index db21fa31a5..9544e65c7d 100755 --- a/tools/droiddeckctl +++ b/tools/droiddeckctl @@ -5,21 +5,28 @@ from __future__ import annotations import argparse import base64 +import gzip import json import os import re import shutil import subprocess +import struct import sys +import tempfile import time +import uuid +import zlib from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent)) -from adb_device import DeviceResolutionError, resolve_serial # noqa: E402 +from adb_device import DeviceResolutionError, resolve_serial -AUTHORITY = "content://com.droiddeck.launcher.agent" -PACKAGE = "com.droiddeck.launcher" +# tools/release/variants.txt: the same app also ships as other packages (e.g. com.antutu.benchmark.full). +PACKAGE = os.environ.get("DROIDDECK_PACKAGE", "com.droiddeck.launcher") +AUTHORITY = f"content://{PACKAGE}.agent" +PACKAGE_NAME = re.compile(r"[A-Za-z][A-Za-z0-9_]*(\.[A-Za-z][A-Za-z0-9_]*)+") STEAM_CLIENT_APP = 769 REQUEST_CAP = 256 * 1024 @@ -117,7 +124,7 @@ def start_agent_activity(adb: str, serial: str, request: dict) -> None: "start", "-W", "-n", - f"{PACKAGE}/.agent.AgentStartActivity", + f"{PACKAGE}/com.droiddeck.launcher.agent.AgentStartActivity", "--es", "request", encoded, @@ -215,7 +222,6 @@ def add_serial(response: dict, serial: str) -> dict: return response -# --- displays ------------------------------------------------------------------------------------ def displays(adb: str, serial: str) -> list[dict]: """Logical displays with the SurfaceFlinger (physical) id screencap and screenrecord want.""" @@ -285,7 +291,85 @@ def record(adb: str, serial: str, path: str, seconds: float, display: int | None return {"ok": True, "command": "record", "path": str(destination), "seconds": seconds, "display": display} -# --- commands ------------------------------------------------------------------------------------ +def pacing_summary(text: str, package: str = PACKAGE) -> dict: + """What reached the panel, from a `dumpsys SurfaceFlinger --timestats -dump`. + + The game is on the compositor's own layer (droiddeck_wayland_game) when it has one, otherwise on + the session's SurfaceView. SurfaceFlinger keeps one record per layer AND refresh rate, so a panel + that switches between 60 and 120 Hz mid-capture splits the same layer into several records: they + are summed. A game's own fps counter does not show any of this - it counts frames handed over, not + frames shown, and 60 handed over can be 48 on screen with one in four held for two refreshes. + """ + records = {"game": [], "surface": []} + for part in re.split(r"^displayRefreshRate = ", text, flags=re.M)[1:]: + rate = re.match(r"(\d+)", part) + layer = re.search(r"^layerName = (.*)$", part, re.M) + frames = re.search(r"^totalFrames = (\d+)", part, re.M) + hist = re.search(r"^present2present histogram is as below:\n(.*)", part, re.M) + if not (rate and layer and frames and hist): + continue + name = layer.group(1) + kind = ("game" if "droiddeck_wayland_game" in name + else "surface" if f"SurfaceView[{package}/" in name else None) + if kind and int(frames.group(1)): + bins = {int(ms): int(n) for ms, n in re.findall(r"(\d+)ms=(\d+)", hist.group(1)) if int(n)} + records[kind].append((re.sub(r"#\d+$", "", name.strip()), int(frames.group(1)), bins, int(rate.group(1)))) + chosen = records["game"] or records["surface"] + histogram: dict[int, int] = {} + off = 0 + for _, _, bins, _ in chosen: + for ms, count in bins.items(): + histogram[ms] = histogram.get(ms, 0) + count + if bins: + # SurfaceFlinger bins by whole milliseconds, so one cadence spans two buckets (16.7 ms: 16 and 17). + mode = max(bins, key=bins.get) + off += sum(count for ms, count in bins.items() if abs(ms - mode) > 1) + intervals = sum(histogram.values()) + cadence = max(histogram, key=histogram.get) if histogram else None + return { + "layers": sorted({name for name, _, _, _ in chosen}), + "frames": sum(frames for _, frames, _, _ in chosen), + "refreshRates": sorted({rate for _, _, _, rate in chosen}), + "presentToPresentMs": {str(ms): histogram[ms] for ms in sorted(histogram)}, + "cadenceMs": cadence, + "offCadence": off, + "offCadencePercent": round(100.0 * off / intervals, 1) if intervals else None, + } + + +def pacing(adb: str, serial: str, seconds: float) -> dict: + """Frames on screen and their intervals over `seconds`, from SurfaceFlinger's timestats.""" + seconds = max(1.0, min(600.0, seconds)) + timestats = ("shell", "dumpsys", "SurfaceFlinger", "--timestats") + try: + enabled = run_adb(adb, serial, *timestats, "-clear", "-enable") + except ControlError as exc: + raise ControlError(str(exc), "PACING_FAILED") from exc + if enabled.returncode != 0: + raise ControlError("could not enable SurfaceFlinger timestats", "PACING_FAILED") + started = time.monotonic() + try: + time.sleep(seconds) + dump = run_adb(adb, serial, *timestats, "-dump", timeout=60) + except ControlError as exc: + raise ControlError(str(exc), "PACING_FAILED") from exc + finally: + elapsed = time.monotonic() - started + try: + disabled = run_adb(adb, serial, *timestats, "-disable").returncode == 0 + except ControlError: + disabled = False + if dump.returncode != 0: + raise ControlError(dump.stderr.decode(errors="replace").strip() or "timestats dump failed", "PACING_FAILED") + if not disabled: + raise ControlError("could not turn SurfaceFlinger timestats off", "PACING_FAILED") + summary = pacing_summary(dump.stdout.decode(errors="replace")) + if not summary["layers"] or not summary["frames"]: + raise ControlError("No DroidDeck layer drew during the capture: is a session on screen?", "NO_FRAMES") + summary["fpsOnScreen"] = round(summary["frames"] / elapsed, 1) + return {"ok": True, "command": "pacing", "seconds": round(elapsed, 1), **summary} + + def start_session(adb: str, serial: str, request: dict) -> dict: if request.get("mode") == "run": @@ -300,7 +384,7 @@ def start_session(adb: str, serial: str, request: dict) -> dict: def require_commands(adb: str, serial: str) -> dict: access = checked(provider_call(adb, serial, "access"), "ACCESS_FAILED") if access.get("commands") is not True: - raise ControlError("Debugging tools are off: turn on Setup > Session > Debugging tools on the device", + raise ControlError("Debugging tools are off: turn on Setup > Diagnostics > Debugging tools on the device", "AGENT_COMMANDS_DISABLED") return access @@ -325,8 +409,101 @@ def input_request(args: argparse.Namespace) -> dict: raise ControlError(f"Unknown input type {kind}", "INVALID_INPUT") +def xr_ppm_to_png(data: bytes, linear: bool = False) -> bytes: + header = re.match(rb"P6\n([0-9]+) ([0-9]+)\n255\n", data) + if not header: + raise ControlError("Invalid XR image header", "XR_CAPTURE_FAILED") + width, height = map(int, header.groups()) + pixels = data[header.end():] + if not (0 < width <= 16384 and 0 < height <= 16384) or len(pixels) != width * height * 3: + raise ControlError("Invalid XR image dimensions or incomplete pixels", "XR_CAPTURE_FAILED") + def chunk(kind: bytes, value: bytes) -> bytes: + return struct.pack('>I', len(value)) + kind + value + struct.pack('>I', zlib.crc32(kind + value)) + stride = width * 3 + rows = b''.join(b'\0' + pixels[start:start + stride] for start in range(0, len(pixels), stride)) + transfer = chunk(b'gAMA', struct.pack('>I', 100000)) if linear else chunk(b'sRGB', b'\0') + return (b'\x89PNG\r\n\x1a\n' + chunk(b'IHDR', struct.pack('>IIBBBBB', width, height, 8, 2, 0, 0, 0)) + transfer + + chunk(b'IDAT', zlib.compress(rows)) + chunk(b'IEND', b'')) + + +def xr_capture(adb: str, serial: str, destination: Path, timeout: float) -> dict: + if not 0 < timeout <= 120: + raise ControlError("XR capture timeout must be between 0 and 120 seconds", "INVALID_TIMEOUT") + remote = f'/sdcard/Android/data/{PACKAGE}/files/xr-capture' + token = uuid.uuid4().hex + with tempfile.TemporaryDirectory() as temporary: + request = Path(temporary) / 'request' + request.write_text(token, encoding='ascii') + pushed = run_adb(adb, serial, 'push', str(request), remote + '.request.tmp') + if pushed.returncode: + raise ControlError(pushed.stderr.decode(errors='replace'), 'XR_CAPTURE_FAILED') + moved = run_adb(adb, serial, 'shell', 'mv', remote + '.request.tmp', remote + '.request') + if moved.returncode: + raise ControlError(moved.stderr.decode(errors='replace'), 'XR_CAPTURE_FAILED') + deadline = time.monotonic() + timeout + metadata = None + while time.monotonic() < deadline: + remaining = deadline - time.monotonic() + if remaining <= 0: + break + try: + result = run_adb(adb, serial, 'shell', 'cat', remote + '.json', timeout=remaining) + except ControlError as error: + if not isinstance(error.__cause__, subprocess.TimeoutExpired): + raise + break + try: + answer = json.loads(result.stdout) + if answer.get('id') == token: + metadata = answer + break + except (ValueError, AttributeError): + pass + time.sleep(0.2) + if metadata is None: + try: + run_adb(adb, serial, 'shell', 'rm', '-f', remote + '.request', timeout=1) + except ControlError: + pass + raise ControlError('No fresh XR capture. Enter SteamVR using a build with XR capture support.', 'TIMEOUT') + if not metadata.get('ok'): + detail = 'No valid XR projection layer is being submitted' if not metadata.get('validLayer') else 'GPU readback or image write failed' + raise ControlError(detail, 'XR_CAPTURE_FAILED') + images = {} + for eye in (('left', 'right', 'source') if metadata.get('sourceImage') else ('left', 'right')): + pulled = run_adb(adb, serial, 'exec-out', 'gzip', '-c', remote + '-' + eye + '.ppm', timeout=120) + if pulled.returncode: + raise ControlError(pulled.stderr.decode(errors='replace'), 'XR_CAPTURE_FAILED') + try: + pixels = gzip.decompress(pulled.stdout) + except (OSError, EOFError, zlib.error) as error: + raise ControlError('Incomplete compressed XR image', 'XR_CAPTURE_FAILED') from error + images[eye] = xr_ppm_to_png(pixels, linear=eye == 'source' and metadata.get('sourceColorSpace') == 'linear') + # Detect overlapping captures before publishing images with another request's metadata. + check = run_adb(adb, serial, 'shell', 'cat', remote + '.json') + try: + unchanged = json.loads(check.stdout).get('id') == token + except (ValueError, AttributeError): + unchanged = False + if not unchanged: + raise ControlError('XR capture was replaced by another request; retry', 'XR_CAPTURE_FAILED') + try: + destination.mkdir(parents=True, exist_ok=True) + for eye, image in images.items(): + (destination / (eye + '.png')).write_bytes(image) + (destination / 'capture.json').write_text(json.dumps(metadata, indent=2), encoding='utf-8') + except OSError as error: + raise ControlError(str(error), 'FILE_IO') from error + return {'ok': True, 'command': 'xr-frame', 'deviceSerial': serial, 'capture': metadata, + 'left': str((destination / 'left.png').resolve()), 'right': str((destination / 'right.png').resolve()), + **({'source': str((destination / 'source.png').resolve())} if 'source' in images else {}), + 'scope': 'App eye textures before headset compositor reprojection; excludes Meta system overlays'} + + def execute(args: argparse.Namespace, adb: str, serial: str) -> dict: command = args.command + if command == 'xr-frame': + return xr_capture(adb, serial, Path(args.path), args.timeout) if command == "state": return add_serial(get_state(adb, serial), serial) @@ -340,9 +517,9 @@ def execute(args: argparse.Namespace, adb: str, serial: str) -> dict: if not args.url.startswith("steam://"): raise ControlError("Steam URL must start with steam://", "INVALID_STEAM_URL") request["steamUrl"] = args.url + if args.steamvr: + request["steamVr"] = True if args.reuse: - # A scenario's per-run "before": keep a session of this mode that is already up, so only - # a run after one that ended (a crash, the low-memory killer) starts a new one. current = get_state(adb, serial)["session"] wanted = {"steam": "steam", "desktop": "lxqt"}[args.mode] if current.get("running") and current.get("mode") == wanted and current.get("phase") not in {"STOPPING", "FAILED"}: @@ -485,6 +662,28 @@ def execute(args: argparse.Namespace, adb: str, serial: str) -> dict: if command == "access": return add_serial(checked(provider_call(adb, serial, "access"), "ACCESS_FAILED"), serial) + if command == "glasses": + request = {"op": args.glasses_op or "status"} + if args.glasses_op == "set": + request.update(key=args.key, value=args.value) + elif args.glasses_op == "simulate": + request["seconds"] = args.seconds + if args.yaw is not None: + request["yaw"] = args.yaw + if args.pitch is not None: + request["pitch"] = args.pitch + elif args.glasses_op == "mode": + request["mode"] = args.mode + elif args.glasses_op == "imu": + request["ms"] = args.ms + elif args.glasses_op == "spatial-diagnostics": + request["enabled"] = not args.off + elif args.glasses_op == "spatial-recenter": + request["screen"] = args.screen + elif args.glasses_op == "raw": + request.update(msgId=args.msg_id, payload=args.payload or "") + return add_serial(checked(provider_call(adb, serial, "glasses", request=request), "GLASSES_FAILED"), serial) + if command == "logs": state = get_state(adb, serial) session = state.get("session", {}) @@ -507,8 +706,10 @@ def execute(args: argparse.Namespace, adb: str, serial: str) -> dict: if command == "record": return add_serial(record(adb, serial, args.path, args.seconds, args.display), serial) + if command == "pacing": + return add_serial(pacing(adb, serial, args.seconds), serial) + if command == "wake": - # A sleeping device stops the session and hides the app's windows from ui dump. run_adb(adb, serial, "shell", "input", "keyevent", "KEYCODE_WAKEUP") run_adb(adb, serial, "shell", "wm", "dismiss-keyguard") power = run_adb(adb, serial, "shell", "dumpsys", "power").stdout.decode(errors="replace") @@ -533,6 +734,7 @@ def build_parser() -> argparse.ArgumentParser: start = commands.add_parser("start", help="start Steam or the desktop") start.add_argument("mode", choices=["steam", "desktop"]) start.add_argument("--ui", choices=["bigpicture", "desktop"], default="bigpicture") + start.add_argument("--steamvr", action="store_true", help="start SteamVR with the session (VITURE glasses)") start.add_argument("--url", help="steam:// URL to pass to the client") start.add_argument("--wait", action="store_true", help="wait for READY after starting") start.add_argument("--reuse", action="store_true", help="keep a running session of this mode instead of failing") @@ -549,7 +751,6 @@ def build_parser() -> argparse.ArgumentParser: stop = commands.add_parser("stop", help="stop the session and wait for IDLE") stop.add_argument("--timeout", type=float, default=90) - # Collecting the client's logs and redacting them took about two minutes after a Skyrim session. stop.add_argument("--artifact-timeout", type=float, default=300) commands.add_parser("resume", help="resume a suspended session") @@ -652,6 +853,33 @@ def build_parser() -> argparse.ArgumentParser: commands.add_parser("access", help="whether debugging tools are enabled on the device") + glasses = commands.add_parser("glasses", help="VITURE glasses: status, settings, head tracking test") + glasses_ops = glasses.add_subparsers(dest="glasses_op") + glasses_ops.add_parser("status") + glasses_ops.add_parser("allow", help="ask for USB control of the glasses again") + glasses_set = glasses_ops.add_parser("set", help="refreshHz, sbsHz, resolution2d, resolution3d, resolutionVr (auto or WIDTHxHEIGHT per eye), brightness, volume, sunblock, 3d, 3dof, gameOnGlasses, headTracking, auto3d, picture3d, screenWidthDm, screenDistanceDm, vrFovDeg") + glasses_set.add_argument("key") + glasses_set.add_argument("value") + glasses_sim = glasses_ops.add_parser("simulate", help="feed a moving head pose (yaw, pitch and roll sweeps), or hold one") + glasses_sim.add_argument("--seconds", type=int, default=20) + glasses_sim.add_argument("--yaw", type=float, help="hold this yaw (degrees, left positive) instead of sweeping") + glasses_sim.add_argument("--pitch", type=float, help="hold this pitch (degrees, down positive) instead of sweeping") + glasses_ops.add_parser("stop-simulate") + glasses_ops.add_parser("query", help="ask the glasses for their display mode, brightness, volume and IMU state") + spatial_diagnostics = glasses_ops.add_parser("spatial-diagnostics", help="start stereo diagnostics without saving images") + spatial_diagnostics.add_argument("--off", action="store_true") + spatial_recenter = glasses_ops.add_parser("spatial-recenter", help="recenter the current spatial origin") + spatial_recenter.add_argument("--screen", action="store_true") + glasses_ops.add_parser("spatial-floor", help="set floor using configured eye height") + glasses_ops.add_parser("spatial-restart", help="restart the provider for explicit tracking recovery") + glasses_mode = glasses_ops.add_parser("mode", help="send a display mode byte, e.g. 0x31 (1080p60), 0x34 (1080p120), 0x32 (3D)") + glasses_mode.add_argument("mode") + glasses_imu = glasses_ops.add_parser("imu", help="stream the glasses' IMU for a moment and show what it reports") + glasses_imu.add_argument("--ms", type=int, default=2000) + glasses_raw = glasses_ops.add_parser("raw", help="send one MCU command (debugging tools)") + glasses_raw.add_argument("msg_id", help="hex message id, e.g. 0x0007") + glasses_raw.add_argument("payload", nargs="?", help="hex bytes") + logs = commands.add_parser("logs", help="pull the latest session artifact directory") logs.add_argument("which", choices=["latest"]) logs.add_argument("destination", nargs="?") @@ -661,11 +889,18 @@ def build_parser() -> argparse.ArgumentParser: shot.add_argument("path") shot.add_argument("--display", type=int, help="logical display id (see displays); default the default display") + xr = commands.add_parser('xr-frame', help='capture both submitted XR eyes and pose metadata') + xr.add_argument('path', help='output directory for left.png, right.png and capture.json') + xr.add_argument('--timeout', type=float, default=15) + rec = commands.add_parser("record", help="record the screen to an mp4") rec.add_argument("path") rec.add_argument("--seconds", type=float, default=10) rec.add_argument("--display", type=int) + pace = commands.add_parser("pacing", help="frames that reached the screen and their intervals (SurfaceFlinger)") + pace.add_argument("--seconds", type=float, default=30) + commands.add_parser("displays", help="the device's displays and their capture ids") commands.add_parser("wake", help="wake the device and dismiss the keyguard") return parser @@ -675,10 +910,11 @@ EXIT_ADB = {"ADB_NOT_FOUND", "ADB_FAILED", "INVALID_PROVIDER_RESPONSE"} EXIT_SESSION = { "SESSION_ACTIVE", "NO_ACTIVE_SESSION", "SESSION_NOT_SUSPENDED", "SESSION_FAILED", "GUEST_EXIT", "GUEST_START_FAILED", "RUNTIME_INSTALL_FAILED", "DESKTOP_INSTALL_FAILED", "ACTIVITY_START_FAILED", - "NO_STEAM_SESSION", "SESSION_NOT_READY", "AGENT_UNAVAILABLE", "LAUNCH_REJECTED", "NO_PAD", + "NO_STEAM_SESSION", "SESSION_NOT_READY", "AGENT_UNAVAILABLE", "LAUNCH_REJECTED", "NO_PAD", "NO_FRAMES", } EXIT_TIMEOUT = {"TIMEOUT", "ARTIFACT_TIMEOUT"} -EXIT_FILE = {"NO_SESSION_LOGS", "LOG_PULL_FAILED", "SCREENSHOT_FAILED", "FILE_IO", "RECORD_FAILED", "PUSH_FAILED"} +EXIT_FILE = {"NO_SESSION_LOGS", "LOG_PULL_FAILED", "SCREENSHOT_FAILED", "FILE_IO", "RECORD_FAILED", "PUSH_FAILED", + "PACING_FAILED", "XR_CAPTURE_FAILED"} EXIT_DENIED = {"AGENT_COMMANDS_DISABLED", "PROTECTED_PREFS", "PROTECTED_CONTROL"} @@ -703,6 +939,8 @@ def main(argv: list[str] | None = None) -> int: args = build_parser().parse_args(argv) serial = None try: + if not PACKAGE_NAME.fullmatch(PACKAGE): # it reaches the device shell through `am start` and `content call` + raise ControlError(f"DROIDDECK_PACKAGE is not an Android package name: {PACKAGE!r}", "INVALID_REQUEST") adb = adb_path(args.adb) serial = resolve_serial(adb, args.serial, log=True) result = execute(args, adb, serial) @@ -711,7 +949,7 @@ def main(argv: list[str] | None = None) -> int: except (ControlError, DeviceResolutionError) as exc: error = {"code": getattr(exc, "code", "DEVICE_RESOLUTION_FAILED"), "message": str(exc)} code = exit_code(exc) - except Exception as exc: # the contract is JSON on stdout, even for a bug in this tool + except Exception as exc: error = {"code": "INTERNAL_ERROR", "message": f"{type(exc).__name__}: {exc}"} code = 2 response = {"ok": False, "error": error} diff --git a/tools/fex/build-in-arch.sh b/tools/fex/build-in-arch.sh new file mode 100755 index 0000000000..ce5f68ceb2 --- /dev/null +++ b/tools/fex/build-in-arch.sh @@ -0,0 +1,88 @@ +#!/usr/bin/bash +# Runs inside an Arch Linux ARM container (menci/archlinuxarm:base-devel) on an arm64 runner. Arch Linux ARM ships +# no FEX package and FEX publishes no Linux binaries. +set -euxo pipefail +VERSION=${FEX_VERSION:-FEX-2610} +WORK=/work +cd "$WORK" +grep -q '^DisableSandbox' /etc/pacman.conf || sed -i 's/^\[options\]/[options]\nDisableSandbox/' /etc/pacman.conf +{ for m in https://ca.us.mirror.archlinuxarm.org https://fl.us.mirror.archlinuxarm.org https://de3.mirror.archlinuxarm.org https://nl.mirror.archlinuxarm.org; do echo "Server = $m/\$arch/\$repo"; done; cat /etc/pacman.d/mirrorlist; } > /etc/pacman.d/mirrorlist.new +mv /etc/pacman.d/mirrorlist.new /etc/pacman.d/mirrorlist +pacman -Syu --noconfirm --needed git zstd binutils cmake ninja clang lld llvm python squashfs-tools file patchelf xxhash + +# The x86 sysroot is Arch x86_64 and multilib i686 packages unpacked by pacman, never run: no scriptlets or signature checks. +THUNKS=${FEX_THUNKS:-0} +X86ROOT=$WORK/x86root +if [ "$THUNKS" = 1 ]; then + pacman -S --noconfirm --needed pkgconf libx11 libxcb libxrandr libxrender libxext xorgproto \ + libglvnd mesa wayland libdrm alsa-lib libxshmfence vulkan-headers vulkan-icd-loader + rm -rf "$X86ROOT" && mkdir -p "$X86ROOT/var/lib/pacman" "$WORK/x86-cache" + cat > "$WORK/x86-pacman.conf" <<'CONF' +[options] +Architecture = x86_64 +SigLevel = Never +DisableSandbox +[core] +Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch +[extra] +Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch +[multilib] +Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch +CONF + pacman --config "$WORK/x86-pacman.conf" --root "$X86ROOT" --dbpath "$X86ROOT/var/lib/pacman" \ + --cachedir "$WORK/x86-cache" --noscriptlet --noconfirm --overwrite '*' -Sy \ + glibc linux-api-headers gcc gcc-libs libx11 libxcb xorgproto libxrandr libxrender libxext libxau \ + libxdmcp libglvnd mesa wayland libdrm alsa-lib libxshmfence \ + lib32-glibc lib32-gcc-libs lib32-libx11 lib32-libxcb lib32-libxrandr lib32-libxrender \ + lib32-libxext lib32-libglvnd lib32-mesa lib32-wayland lib32-libdrm lib32-alsa-lib lib32-libxshmfence + ls "$X86ROOT/usr/include" | head -5 +fi + +rm -rf fex-src out && git clone -q --depth 1 --branch "$VERSION" --recurse-submodules --shallow-submodules https://github.com/FEX-Emu/FEX.git fex-src +for p in tools/fex/patches/*.patch; do patch -d fex-src -p1 --no-backup-if-mismatch < "$p"; done +# FEX's x86 toolchain files assume an x86 build machine; here the guest thunks need the x86 sysroot too. +# Arch's clang adds stack protection; its canary load in a guest thunk's prologue clobbered r11 (the host function). +if [ "$THUNKS" = 1 ]; then + for t in fex-src/Data/CMake/toolchain_x86_64.cmake fex-src/Data/CMake/toolchain_x86_32.cmake; do + printf '\nif (X86_DEV_ROOTFS AND NOT X86_DEV_ROOTFS STREQUAL "/")\n set(CMAKE_SYSROOT "${X86_DEV_ROOTFS}")\nendif()\n' >> "$t" + printf '\nset(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-stack-protector")\nset(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-stack-protector")\n' >> "$t" + done +fi +# TUNE_CPU none: the default (native) would tune for the runner's Neoverse cores, not the device. +cmake -S fex-src -B fex-build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUSE_LINKER=lld \ + -DTUNE_CPU=none -DTUNE_ARCH=armv8-a \ + -DBUILD_TESTING=OFF -DBUILD_FEXCONFIG=OFF -DENABLE_ASSERTIONS=OFF \ + $( [ "$THUNKS" = 1 ] && echo "-DBUILD_THUNKS=ON -DX86_DEV_ROOTFS=$X86ROOT" || echo "-DBUILD_THUNKS=OFF" ) \ + -DENABLE_CCACHE=OFF -DENABLE_OFFLINE_TELEMETRY=OFF \ + ${FEX_EXTRA_CXXFLAGS:+-DCMAKE_CXX_FLAGS="$FEX_EXTRA_CXXFLAGS"} +ninja -C fex-build +DESTDIR="$WORK/out" ninja -C fex-build install +install -Dm755 /usr/bin/unsquashfs out/usr/local/bin/unsquashfs +# The Linux runtime has no xxhash and no ld.so.cache: the library goes beside libFEXCore and the programs +# that need it find it through RUNPATH. +install -Dm644 "$(readlink -f /usr/lib/libxxhash.so.0)" out/usr/local/lib/libxxhash.so.0 +bundled=$(cd out/usr/local/lib && ls -- *.so* | sort -u) +for f in out/usr/local/bin/*; do + [ -L "$f" ] && continue + file "$f" | grep -q ELF || continue + readelf -d "$f" | awk '/NEEDED/ { gsub(/[\[\]]/, "", $5); print $5 }' | grep -qxF "$bundled" \ + && patchelf --set-rpath '$ORIGIN/../lib' "$f" +done +# Every NEEDED soname must resolve in a stock guest: bundled here or provided by the runtime (runtime-libs.txt). +for f in out/usr/local/bin/* out/usr/local/lib/*.so* out/usr/local/lib/fex-emu/HostThunks*/*.so; do + [ -f "$f" ] && file "$f" | grep -q ELF || continue + readelf -d "$f" | awk '/NEEDED/ { gsub(/[\[\]]/, "", $5); print $5 }' +done | sort -u | tee fex-needed.txt +missing=$(printf '%s\n' "$bundled" | cat - tools/fex/runtime-libs.txt | sort -u | comm -23 fex-needed.txt -) +[ -z "$missing" ] || { echo "not in the Linux runtime or this package:" $missing >&2; exit 1; } +for f in out/usr/local/bin/*; do + [ -L "$f" ] || ! file "$f" | grep -q ELF && continue + if readelf -d "$f" | awk '/NEEDED/ { gsub(/[\[\]]/, "", $5); print $5 }' | grep -qxF "$bundled"; then + readelf -d "$f" | grep -q 'RUNPATH.*\$ORIGIN/\.\./lib' || { echo "$f needs a bundled library but has no RUNPATH" >&2; exit 1; } + fi +done +(cd out && find . -type f -o -type l | sort) | tee fex-files.txt +tar -C out -c . | zstd -19 -T0 -o fex.tzst +sha256sum fex.tzst | tee fex.tzst.sha256 diff --git a/tools/fex/patches/0001-openat2-enosys-fallback.patch b/tools/fex/patches/0001-openat2-enosys-fallback.patch new file mode 100644 index 0000000000..d7914133ed --- /dev/null +++ b/tools/fex/patches/0001-openat2-enosys-fallback.patch @@ -0,0 +1,203 @@ +diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/FileManagement.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/FileManagement.cpp +index 7172460..2c80dca 100644 +--- a/Source/Tools/LinuxEmulation/LinuxSyscalls/FileManagement.cpp ++++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/FileManagement.cpp +@@ -29,6 +29,7 @@ $end_info$ + #include <algorithm> + #include <errno.h> + #include <cstring> ++#include <linux/magic.h> + #include <linux/openat2.h> + #include <fcntl.h> + #include <filesystem> +@@ -632,6 +633,163 @@ static bool ShouldSkipOpenInEmu(int flags) { + return false; + } + ++static bool IsOnProcFS(int DirFD, const char* Pathname) { ++ int FD = ::openat(DirFD, Pathname, O_PATH | O_NOFOLLOW | O_CLOEXEC); ++ if (FD == -1) { ++ return false; ++ } ++ ++ struct statfs Buffer {}; ++ const bool Result = fstatfs(FD, &Buffer) == 0 && Buffer.f_type == PROC_SUPER_MAGIC; ++ close(FD); ++ return Result; ++} ++ ++// openat2() with RESOLVE_IN_ROOT, walked one component at a time: PRoot has no openat2 and fails it with ENOSYS. ++// DirFD is AT_FDCWD only for thunk overlays, which never resolve in the root. ++static int OpenatWithoutOpenat2(int DirFD, const char* Pathname, int Flags, uint32_t Mode) { ++ if (DirFD == AT_FDCWD) { ++ return ::syscall(SYSCALL_DEF(openat), DirFD, Pathname, Flags, Mode); ++ } ++ ++ // The kernel's MAXSYMLINKS. ++ constexpr uint32_t MaxSymlinks = 40; ++ uint32_t Symlinks {}; ++ std::optional<dev_t> RootDev {}; ++ ++ // O_NOFOLLOW and O_CREAT | O_EXCL leave a final symlink alone, unless a trailing slash follows it. ++ const bool NoFollow = (Flags & O_NOFOLLOW) || (Flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL); ++ ++ char Resolved[PATH_MAX]; ++ size_t ResolvedLen {}; ++ ++ std::array<char[PATH_MAX], 2> Pending; ++ uint32_t PendingIndex {}; ++ const char* Remaining = Pathname; ++ ++ for (;;) { ++ while (*Remaining == '/') { ++ ++Remaining; ++ } ++ ++ if (*Remaining == 0) { ++ break; ++ } ++ ++ const char* Component = Remaining; ++ const char* ComponentEnd = Component; ++ while (*ComponentEnd != 0 && *ComponentEnd != '/') { ++ ++ComponentEnd; ++ } ++ const size_t ComponentLen = ComponentEnd - Component; ++ ++ Remaining = ComponentEnd; ++ while (*Remaining == '/') { ++ ++Remaining; ++ } ++ const bool Last = *Remaining == 0; ++ const bool TrailingSlash = Last && Remaining != ComponentEnd; ++ ++ if (ComponentLen == 1 && Component[0] == '.') { ++ continue; ++ } ++ ++ if (ComponentLen == 2 && Component[0] == '.' && Component[1] == '.') { ++ while (ResolvedLen > 0 && Resolved[ResolvedLen - 1] != '/') { ++ --ResolvedLen; ++ } ++ if (ResolvedLen > 0) { ++ --ResolvedLen; ++ } ++ continue; ++ } ++ ++ const size_t Separator = ResolvedLen > 0 ? 1 : 0; ++ const size_t CandidateLen = ResolvedLen + Separator + ComponentLen; ++ if (CandidateLen + 1 >= PATH_MAX) { ++ errno = ENAMETOOLONG; ++ return -1; ++ } ++ if (Separator) { ++ Resolved[ResolvedLen] = '/'; ++ } ++ memcpy(&Resolved[ResolvedLen + Separator], Component, ComponentLen); ++ Resolved[CandidateLen] = 0; ++ ++ struct stat Buffer {}; ++ const bool Follow = !Last || TrailingSlash || !NoFollow; ++ const int StatResult = Follow ? fstatat(DirFD, Resolved, &Buffer, AT_SYMLINK_NOFOLLOW) : -1; ++ ++ if (StatResult == 0 && S_ISLNK(Buffer.st_mode)) { ++ if (++Symlinks > MaxSymlinks) { ++ errno = ELOOP; ++ return -1; ++ } ++ ++ if (!RootDev) { ++ struct stat Root {}; ++ if (fstat(DirFD, &Root) != 0) { ++ return -1; ++ } ++ RootDev = Root.st_dev; ++ } ++ ++ if (Buffer.st_dev != *RootDev && IsOnProcFS(DirFD, Resolved)) { ++ // Only procfs has magic links. RESOLVE_IN_ROOT fails them with EXDEV and the callers then open without it. ++ return ::syscall(SYSCALL_DEF(openat), DirFD, Pathname, Flags, Mode); ++ } ++ ++ char* Target = Pending[PendingIndex]; ++ const ssize_t TargetLen = readlinkat(DirFD, Resolved, Target, PATH_MAX); ++ if (TargetLen <= 0) { ++ if (TargetLen == 0) { ++ errno = ENOENT; ++ } ++ return -1; ++ } ++ ++ const size_t RestLen = strlen(ComponentEnd); ++ if (static_cast<size_t>(TargetLen) + RestLen >= PATH_MAX) { ++ errno = ENAMETOOLONG; ++ return -1; ++ } ++ memcpy(&Target[TargetLen], ComponentEnd, RestLen + 1); ++ ++ if (Target[0] == '/') { ++ ResolvedLen = 0; ++ } ++ Remaining = Target; ++ PendingIndex ^= 1; ++ continue; ++ } ++ ++ if (Last) { ++ // openat reports on the final component, which O_CREAT may create. ++ ResolvedLen = CandidateLen; ++ if (TrailingSlash) { ++ Resolved[ResolvedLen++] = '/'; ++ } ++ break; ++ } ++ ++ if (StatResult != 0) { ++ return -1; ++ } ++ ++ if (!S_ISDIR(Buffer.st_mode)) { ++ errno = ENOTDIR; ++ return -1; ++ } ++ ResolvedLen = CandidateLen; ++ } ++ ++ if (ResolvedLen == 0) { ++ Resolved[ResolvedLen++] = '.'; ++ } ++ Resolved[ResolvedLen] = 0; ++ return ::syscall(SYSCALL_DEF(openat), DirFD, Resolved, Flags, Mode); ++} ++ + bool FileManager::ReplaceEmuFd(int fd, int flags, uint32_t mode) { + char Tmp[PATH_MAX + 1]; + +@@ -678,6 +836,8 @@ uint64_t FileManager::Open(const char* pathname, int flags, uint32_t mode) { + // This means a magic symlink (/proc/foo) was involved. In this case we + // just punt and do the access without RESOLVE_IN_ROOT. + fd = ::syscall(SYSCALL_DEF(openat), Path.FD, Path.Path, flags, mode); ++ } else if (fd == -1 && errno == ENOSYS) { ++ fd = OpenatWithoutOpenat2(Path.FD, Path.Path, flags, mode); + } + } + +@@ -931,6 +1091,8 @@ uint64_t FileManager::Openat([[maybe_unused]] int dirfs, const char* pathname, i + // This means a magic symlink (/proc/foo) was involved. In this case we + // just punt and do the access without RESOLVE_IN_ROOT. + fd = ::syscall(SYSCALL_DEF(openat), Path.FD, Path.Path, flags, mode); ++ } else if (fd == -1 && errno == ENOSYS) { ++ fd = OpenatWithoutOpenat2(Path.FD, Path.Path, flags, mode); + } + } + +@@ -967,6 +1129,8 @@ uint64_t FileManager::Openat2(int dirfs, const char* pathname, FEX::HLE::open_ho + // This means a magic symlink (/proc/foo) was involved. In this case we + // just punt and do the access without RESOLVE_IN_ROOT. + fd = ::syscall(SYSCALL_DEF(openat2), Path.FD, Path.Path, how, usize); ++ } else if (fd == -1 && errno == ENOSYS && how->resolve == 0) { ++ fd = OpenatWithoutOpenat2(Path.FD, Path.Path, how->flags, how->mode); + } + } + diff --git a/tools/fex/patches/0002-thunkgen-newer-clang.patch b/tools/fex/patches/0002-thunkgen-newer-clang.patch new file mode 100644 index 0000000000..a6a87c27e7 --- /dev/null +++ b/tools/fex/patches/0002-thunkgen-newer-clang.patch @@ -0,0 +1,9 @@ +--- a/ThunkLibs/Generator/gen.cpp ++++ b/ThunkLibs/Generator/gen.cpp +@@ -840,6 +840,5 @@ + + const bool Success = Compiler.ExecuteAction(Action); + +- Files->clearStatCache(); + return Success; + } diff --git a/tools/fex/patches/0003-allocator32-map32bit-exhaustion.patch b/tools/fex/patches/0003-allocator32-map32bit-exhaustion.patch new file mode 100644 index 0000000000..923d68789b --- /dev/null +++ b/tools/fex/patches/0003-allocator32-map32bit-exhaustion.patch @@ -0,0 +1,103 @@ +diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/LinuxAllocator.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/LinuxAllocator.cpp +index 60b0ef1..4a94009 100644 +--- a/Source/Tools/LinuxEmulation/LinuxSyscalls/LinuxAllocator.cpp ++++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/LinuxAllocator.cpp +@@ -2,6 +2,7 @@ + #include "LinuxSyscalls/LinuxAllocator.h" + #include "LinuxSyscalls/Syscalls.h" + ++#include <FEXCore/Utils/Allocator.h> + #include <FEXCore/Utils/MathUtils.h> + #include <FEXCore/Utils/TypeDefines.h> + #include <FEXHeaderUtils/Syscalls.h> +@@ -9,6 +10,7 @@ + #include <FEXCore/fextl/memory.h> + + #include <bitset> ++#include <fcntl.h> + #include <linux/mman.h> + #include <unistd.h> + #include <sys/user.h> +@@ -82,6 +84,7 @@ private: + std::mutex AllocMutex {}; + uint64_t FindPageRange(uint64_t Start, size_t Pages) const; + uint64_t FindPageRange_TopDown(uint64_t Start, size_t Pages) const; ++ bool SetHostMappedPages(uint64_t PageAddr, size_t PagesLength); + using FindHandler = uint64_t (MemAllocator32Bit::*)(uint64_t Start, size_t Pages) const; + FindHandler FindPageRangePtr {}; + }; +@@ -132,6 +135,37 @@ uint64_t MemAllocator32Bit::FindPageRange_TopDown(uint64_t Start, size_t Pages) + return 0; + } + ++// Marks each run of host mappings that overlaps the range as used, in full. Returns false if none overlaps. ++bool MemAllocator32Bit::SetHostMappedPages(uint64_t PageAddr, size_t PagesLength) { ++ const int MapsFD = ::open("/proc/self/maps", O_RDONLY | O_CLOEXEC); ++ if (MapsFD == -1) { ++ return false; ++ } ++ ++ const auto Gaps = ++ FEXCore::Allocator::CollectMemoryGaps(BASE_KEY << FEXCore::Utils::FEX_PAGE_SHIFT, TOP_KEY << FEXCore::Utils::FEX_PAGE_SHIFT, MapsFD); ++ close(MapsFD); ++ ++ const uint64_t EndPage = PageAddr + PagesLength; ++ uint64_t MappedBegin = BASE_KEY; ++ bool Marked = false; ++ auto MarkIfOverlapping = [&](uint64_t MappedEnd) { ++ if (MappedBegin < MappedEnd && MappedBegin < EndPage && PageAddr < MappedEnd) { ++ SetUsedPages(MappedBegin, MappedEnd - MappedBegin); ++ Marked = true; ++ } ++ }; ++ ++ for (const auto& Gap : Gaps) { ++ const uintptr_t GapBegin = reinterpret_cast<uintptr_t>(Gap.Ptr); ++ MarkIfOverlapping(GapBegin >> FEXCore::Utils::FEX_PAGE_SHIFT); ++ MappedBegin = (GapBegin + Gap.Size) >> FEXCore::Utils::FEX_PAGE_SHIFT; ++ } ++ MarkIfOverlapping(TOP_KEY); ++ ++ return Marked; ++} ++ + void* MemAllocator32Bit::Mmap(void* addr, size_t length, int prot, int flags, int fd, off_t offset) { + std::scoped_lock<std::mutex> lk {AllocMutex}; + size_t PagesLength = FEXCore::AlignUp(length, FEXCore::Utils::FEX_PAGE_SIZE) >> FEXCore::Utils::FEX_PAGE_SHIFT; +@@ -175,11 +209,17 @@ void* MemAllocator32Bit::Mmap(void* addr, size_t length, int prot, int flags, in + + auto AllocateNoHint = [&]() -> void* { + bool Wrapped = false; ++ bool Restarted = false; + uint64_t BottomPage = Map32Bit && (LastScanLocation >= LastKeyLocation32Bit) ? LastKeyLocation32Bit : LastScanLocation; + restart: { + // Linear range scan + uint64_t LowerPage = (this->*FindPageRangePtr)(BottomPage, PagesLength); + if (LowerPage == 0) { ++ // A second scan from the start found nothing either: the range is full, as the kernel would say. ++ if (Restarted) { ++ return reinterpret_cast<void*>(-ENOMEM); ++ } ++ Restarted = true; + // Try again but this time from the start + BottomPage = Map32Bit ? LastKeyLocation32Bit : LastKeyLocation; + LowerPage = (this->*FindPageRangePtr)(BottomPage, PagesLength); +@@ -206,7 +246,17 @@ restart: { + return (void*)(uintptr_t)-errno; + } else { + // Try again +- if (SearchDown) { ++ if (Map32Bit) { ++ // MAP_32BIT from a 64-bit guest, whose other mappings bypass this allocator: once Counter-Strike 2 had reserved the ++ // low 2GB, stepping one page at a time scanned for ever. Record what the host holds there and rescan the range, or ++ // move past it if that mapping is gone. ++ const bool Marked = SetHostMappedPages(LowerPage, PagesLength); ++ if (SearchDown) { ++ BottomPage = Marked ? UpperPage - 1 : LowerPage - 1; ++ } else { ++ BottomPage = Marked ? LowerPage : UpperPage; ++ } ++ } else if (SearchDown) { + --BottomPage; + } else { + ++BottomPage; diff --git a/tools/fex/runtime-libs.txt b/tools/fex/runtime-libs.txt new file mode 100644 index 0000000000..3073af9bd4 --- /dev/null +++ b/tools/fex/runtime-libs.txt @@ -0,0 +1,12 @@ +ld-linux-aarch64.so.1 +libGLX.so.0 +libOpenGL.so.0 +libc.so.6 +libgcc_s.so.1 +liblz4.so.1 +liblzma.so.5 +liblzo2.so.2 +libm.so.6 +libstdc++.so.6 +libz.so.1 +libzstd.so.1 diff --git a/tools/gamescope/PATCHES.md b/tools/gamescope/PATCHES.md index acb3455152..15f0063580 100644 --- a/tools/gamescope/PATCHES.md +++ b/tools/gamescope/PATCHES.md @@ -19,6 +19,11 @@ library list, before anything is published. moves (it sat frozen). The X pointer is asked for only while a cursor image is drawn - every vblank while shown, every 50 ms while hidden for inactivity - since each ask is a blocking round trip to Xwayland on the paint thread; with no image, wlserver's position is used as upstream does. +- `0101-nested-wayland-cursor-routing.patch` - this app: `gamescope_cursor_composite=2` lets the + nested Wayland session paint its cursor in the output using the real X pointer position; client + cursor surfaces are cleared to prevent a duplicate at the host pointer, while Gamescope's original + default host-cursor fallback is preserved when its no-keyboard-focus policy selects it. Empty + client cursor images and Gamescope's hidden flag still suppress the painted cursor. - `0110-wayland-backend-touch.patch` - this app: the nested Wayland backend bound only the host's pointer and keyboard, so a finger on the phone's screen never reached Steam. It now binds `wl_touch` too and hands each finger to wlserver's touch path (`wlserver_touchdown` / `motion` / @@ -44,6 +49,13 @@ library list, before anything is published. read the window's attributes first, it kept the window as override-redirect and left it out of `GAMESCOPE_FOCUSABLE_WINDOWS`, so the client kept its loading screen over the running game (Skyrim SE, A Plague Tale: Innocence, on the games' own Xwayland). MapNotify now refreshes the flag. +- `0115-limiter-paces-per-window.patch` - this app: on a fixed-refresh output the frame limiter + (Steam's Frame Limit) let a capped window's frames out only on every Nth refresh of a global grid, + so a frame finished just after its slot waited a whole extra slot. At 30 on 60 Hz one picture was + held for three or four refreshes - "small stops and ladders" with frame generation - where a game's + own limiter slips such a frame by one refresh. The fixed-refresh branch now paces each window by + time, as the VRR branch already did: its next frame goes out on the first refresh a capped interval + after its last one, with half a refresh of tolerance so an on-time window keeps every Nth refresh. Sixteen more of Armada's patches are DRM/lease/HDR-on-KMS work for a native display, which this app's Wayland-hosted gamescope never reaches, or need a newer gamescope than the runtime has. diff --git a/tools/gamescope/build-in-arch.sh b/tools/gamescope/build-in-arch.sh index 2078592aa0..2853e593ab 100755 --- a/tools/gamescope/build-in-arch.sh +++ b/tools/gamescope/build-in-arch.sh @@ -1,26 +1,15 @@ #!/usr/bin/bash -# Runs INSIDE an Arch Linux ARM container (menci/archlinuxarm:base-devel) on an arm64 runner. -# Builds Arch's own gamescope package of the runtime's version with the patches in ./patches -# added, then keeps only the gamescope binary, checks its library needs against the runtime's -# list, and packs it as gamescope.tzst (usr/local/bin/gamescope) for the apk to stage. set -euxo pipefail VERSION=${GAMESCOPE_VERSION:-3.16.29} WORK=/work cd "$WORK" -# pacman's download sandbox (Landlock + the alpm user) cannot be set up inside the runner's -# container; the packages still come signed from Arch Linux ARM's mirrors. grep -q '^DisableSandbox' /etc/pacman.conf || sed -i 's/^\[options\]/[options]\nDisableSandbox/' /etc/pacman.conf -# The geo-redirecting mirror answered 500s and connection resets mid-transaction; name a few -# concrete mirrors ahead of it so pacman has somewhere to fall over to. { for m in https://ca.us.mirror.archlinuxarm.org https://fl.us.mirror.archlinuxarm.org https://de3.mirror.archlinuxarm.org https://nl.mirror.archlinuxarm.org; do echo "Server = $m/\$arch/\$repo"; done; cat /etc/pacman.d/mirrorlist; } > /etc/pacman.d/mirrorlist.new mv /etc/pacman.d/mirrorlist.new /etc/pacman.d/mirrorlist pacman -Syu --noconfirm --needed git sudo zstd binutils -# makepkg refuses root; a builder user with passwordless sudo installs the dependencies. id builder >/dev/null 2>&1 || useradd -m builder echo 'builder ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/builder rm -rf pkg && mkdir pkg && cp -r tools/gamescope/patches pkg/ && chown -R builder pkg -# Arch's packaging for exactly this version: the tag is <pkgver>-<pkgrel>; the first rel is tried -# first, later ones after it. sudo -u builder bash -c " set -euxo pipefail cd pkg @@ -31,13 +20,11 @@ test -f arch/PKGBUILD cd arch grep -q '^pkgver=${VERSION}$' PKGBUILD cp ../patches/*.patch . -# Add our patches to the source list and apply them after Arch's own prepare() steps. PATCHES=\$(ls *.patch | sort) { echo; echo 'source+=('; for p in \$PATCHES; do echo \" \$p\"; done; echo ')'; for p in \$PATCHES; do echo \"sha256sums+=('SKIP')\"; done; } >> PKGBUILD cat >> PKGBUILD <<'PREP' _droiddeck_prepare() { - # Arch's own prepare() leaves the shell inside the checkout; start from a known place. cd \"\$srcdir/gamescope\" for p in \$(ls \"\$srcdir\"/*.patch | sort); do echo \"applying \$(basename \"\$p\")\" @@ -51,7 +38,8 @@ else prepare() { _droiddeck_prepare; } fi PREP -makepkg -A -s --noconfirm --skipchecksums --skippgpcheck # -A: the PKGBUILD lists x86_64 only; Arch Linux ARM builds the same file +makepkg -A -s --noconfirm --skipchecksums --skippgpcheck +meson test -C src/build --no-rebuild --print-errorlogs cursor_routing ls -l *.pkg.tar.* " cd "$WORK" @@ -61,7 +49,6 @@ tar --use-compress-program=unzstd -xf "$PKG" -C out --strip-components=2 usr/bin mv out/gamescope out/usr/local/bin/gamescope chmod 755 out/usr/local/bin/gamescope strip --strip-unneeded out/usr/local/bin/gamescope || true -# Every NEEDED library must be one the runtime ships, or the binary would not load there. NEEDED=$(readelf -d out/usr/local/bin/gamescope | sed -n 's/.*NEEDED.*\[\(.*\)\]/\1/p') echo "NEEDED: $NEEDED" MISSING="" diff --git a/tools/gamescope/patches/0019-steamcompmgr-arm64-virtual-white.patch b/tools/gamescope/patches/0019-steamcompmgr-arm64-virtual-white.patch index 62914a426d..b98e4523d5 100644 --- a/tools/gamescope/patches/0019-steamcompmgr-arm64-virtual-white.patch +++ b/tools/gamescope/patches/0019-steamcompmgr-arm64-virtual-white.patch @@ -22,9 +22,9 @@ index e54194b..4131467 100644 g_ColorMgmt.pending.outputVirtualWhite.x = santitize_float( bit_cast<float>( user_vec[0] ) ); g_ColorMgmt.pending.outputVirtualWhite.y = santitize_float( bit_cast<float>( user_vec[1] ) ); +#if defined(__aarch64__) -+ // The ARM64 Steam client packs the pair as one 64-bit element, so only x arrives; -+ // Steam derives the pair from the CIE daylight locus, so y follows from x. -+ // Drop once the client sends both floats (y arrives non-zero). ++ ++ ++ + float x = g_ColorMgmt.pending.outputVirtualWhite.x; + if ( x >= 0.25f && x <= 0.55f && g_ColorMgmt.pending.outputVirtualWhite.y <= 0.01f ) + g_ColorMgmt.pending.outputVirtualWhite.y = -3.0f * x * x + 2.87f * x - 0.275f; diff --git a/tools/gamescope/patches/0020-color-p3-red-is-wide-gamut.patch b/tools/gamescope/patches/0020-color-p3-red-is-wide-gamut.patch index 047ea2d372..aa183697d7 100644 --- a/tools/gamescope/patches/0020-color-p3-red-is-wide-gamut.patch +++ b/tools/gamescope/patches/0020-color-p3-red-is-wide-gamut.patch @@ -18,7 +18,7 @@ index 64430a5..f4dcd98 100644 { - // Use red as a sentinal for a wide-gamut display - return ( nativeDisplayOutput.primaries.r.x > 0.650f && nativeDisplayOutput.primaries.r.y < 0.320f ); -+ // Use red as a sentinal for a wide-gamut display; DCI-P3 red sits exactly on the threshold ++ + return ( nativeDisplayOutput.primaries.r.x > 0.650f && nativeDisplayOutput.primaries.r.y <= 0.320f ); } diff --git a/tools/gamescope/patches/0100-realtime-queue-and-gamepad-cursor.patch b/tools/gamescope/patches/0100-realtime-queue-and-gamepad-cursor.patch index 0e390b0998..75a355d4e3 100644 --- a/tools/gamescope/patches/0100-realtime-queue-and-gamepad-cursor.patch +++ b/tools/gamescope/patches/0100-realtime-queue-and-gamepad-cursor.patch @@ -6,10 +6,10 @@ index 54e4efc..024af02 100644 } float queuePriorities = 1.0f; -+ // Without CAP_SYS_NICE gamescope never asks for realtime-priority queues. Under proot on -+ // Android there is no capability to have; the fallback below covers a driver that refuses. KGSL -+ // Turnip accepts but ignores it (one submit-queue priority, contexts created alike). Opt in with -+ // GAMESCOPE_FORCE_VULKAN_REALTIME=1. (Armada's --force-vulkan-realtime, as an environment switch.) ++ ++ ++ ++ + const char *pszForceRealtime = getenv( "GAMESCOPE_FORCE_VULKAN_REALTIME" ); + const bool useRealtimeVulkanQueue = gamescope::Process::HasCapSysNice() || ( pszForceRealtime && atoi( pszForceRealtime ) != 0 ); + if ( useRealtimeVulkanQueue && !gamescope::Process::HasCapSysNice() ) @@ -67,8 +67,8 @@ index 10990b8..08afbc4 100644 } - else + m_bConstrained = false; -+ // Nothing to draw (the gamepad UI, most games): the position only feeds focus and zoom, and -+ // wlserver's copy is what stock gamescope uses for those. No round trip to X. ++ ++ + if ( m_imageEmpty ) { - m_bConstrained = false; @@ -80,12 +80,12 @@ index 10990b8..08afbc4 100644 } wlserver_unlock(); + -+ // The gamepad-driven cursor is moved through XTest, which moves the X pointer and nothing -+ // else: wlserver's copy of the position never changes, so the sprite sat frozen while the -+ // pointer moved. Ask X where the pointer is. (Armada 0001, on 3.16.29.) That is a blocking -+ // round trip to Xwayland on the paint thread, which waits while Xwayland is busy drawing the -+ // client's interface: once per vblank only while the sprite is shown, and every 50 ms while -+ // it is hidden for inactivity - enough to bring it back within a few frames of a move. ++ ++ ++ ++ ++ ++ + if ( wlserver.bCursorHidden ) + { + const uint64_t now = get_time_in_nanos(); diff --git a/tools/gamescope/patches/0101-nested-wayland-cursor-routing.patch b/tools/gamescope/patches/0101-nested-wayland-cursor-routing.patch new file mode 100644 index 0000000000..f59201e672 --- /dev/null +++ b/tools/gamescope/patches/0101-nested-wayland-cursor-routing.patch @@ -0,0 +1,202 @@ +diff --git a/src/Backends/WaylandBackend.cpp b/src/Backends/WaylandBackend.cpp +index d74268b..f49ef59 100644 +--- a/src/Backends/WaylandBackend.cpp ++++ b/src/Backends/WaylandBackend.cpp +@@ -10,6 +10,7 @@ + #include "refresh_rate.h" + #include "waitable.h" + #include "Utils/TempFiles.h" ++#include "Utils/CursorRouting.h" + + #include <cstring> + #include <unordered_map> +@@ -114,6 +115,7 @@ static bool IsGamescopeToplevel( wl_surface *pSurface ) { + #define LIBDECOR_USERDATA_TO_THIS(type, name) []<typename... Args> ( Args... args ) { type *pThing = (type *)std::get<sizeof...(Args)-1>(std::forward_as_tuple(args...)); CallWithAllButLast([&]<typename... Args2>(Args2... args2){ pThing->name(std::forward<Args2>(args2)...); }, std::forward<Args>(args)...); } + + extern gamescope::ConVar<bool> cv_hdr_enabled; ++extern gamescope::ConVar<int> cv_cursor_composite; + + namespace gamescope + { +@@ -2462,11 +2464,16 @@ namespace gamescope + if ( !m_pPointer ) + return; + +- if ( cv_wayland_mouse_warp_without_keyboard_focus ) +- bUseHostCursor = m_bPointerLocked && !m_bKeyboardEntered && m_pDefaultCursorSurface; +- else +- bUseHostCursor = !m_bKeyboardEntered && m_pDefaultCursorSurface; +- ++ bUseHostCursor = CursorShouldUseHostFallback( ++ cv_wayland_mouse_warp_without_keyboard_focus.Get(), m_bPointerLocked, ++ m_bKeyboardEntered, m_pDefaultCursorSurface != nullptr ); ++ ++ if ( !CursorShouldBeForwardedToHost( cv_cursor_composite.Get(), bUseHostCursor ) ) ++ { ++ wl_pointer_set_cursor( m_pPointer, m_uPointerEnterSerial, nullptr, 0, 0 ); ++ return; ++ } ++ + if ( bUseHostCursor ) + { + wl_pointer_set_cursor( m_pPointer, m_uPointerEnterSerial, m_pDefaultCursorSurface, m_pDefaultCursorInfo->uXHotspot, m_pDefaultCursorInfo->uYHotspot ); +diff --git a/src/Utils/CursorRouting.h b/src/Utils/CursorRouting.h +new file mode 100644 +index 0000000..d7c21da +--- /dev/null ++++ b/src/Utils/CursorRouting.h +@@ -0,0 +1,36 @@ ++#pragma once ++ ++namespace gamescope ++{ ++ constexpr bool CursorShouldBeComposited( int cursorCompositeMode, bool forceRelativeMouse, ++ bool hasFocus, bool hasNestedHints, bool nestedPaintsCursor ) ++ { ++ if ( cursorCompositeMode == 2 ) ++ return true; ++ if ( cursorCompositeMode == 0 ) ++ return false; ++ if ( forceRelativeMouse ) ++ return true; ++ if ( !hasFocus ) ++ return false; ++ return !hasNestedHints || nestedPaintsCursor; ++ } ++ ++ constexpr bool CursorShouldUseHostFallback( bool warpWithoutKeyboardFocus, bool pointerLocked, ++ bool keyboardEntered, bool hasDefaultCursor ) ++ { ++ if ( warpWithoutKeyboardFocus ) ++ return pointerLocked && !keyboardEntered && hasDefaultCursor; ++ return !keyboardEntered && hasDefaultCursor; ++ } ++ ++ constexpr bool CursorShouldBeForwardedToHost( int cursorCompositeMode, bool useHostCursorFallback ) ++ { ++ return cursorCompositeMode != 2 || useHostCursorFallback; ++ } ++ ++ constexpr bool CursorImageShouldBePainted( bool imageEmpty, bool cursorHidden ) ++ { ++ return !imageEmpty && !cursorHidden; ++ } ++} +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index 18b799e..2e90466 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -99,6 +99,7 @@ + #include "BufferMemo.h" + #include "vrclient_detect.h" + #include "Utils/Process.h" ++#include "Utils/CursorRouting.h" + + #include "wlr_begin.hpp" + #include "wlr/types/wlr_pointer_constraints_v1.h" +@@ -2353,7 +2354,7 @@ void MouseCursor::GetDesiredSize( int& nWidth, int &nHeight ) + + void MouseCursor::paint(steamcompmgr_win_t *window, steamcompmgr_win_t *fit, struct FrameInfo_t *frameInfo) + { +- if ( m_imageEmpty || wlserver.bCursorHidden ) ++ if ( !gamescope::CursorImageShouldBePainted( m_imageEmpty, wlserver.bCursorHidden ) ) + return; + + int winX = x(); +@@ -3025,23 +3026,11 @@ static void paint_pipewire() + gamescope::ConVar<int> cv_cursor_composite{ "cursor_composite", 1, "0 = Never composite a cursor. 1 = Composite cursor when not nested. 2 = Always composite a cursor manually" }; + bool ShouldDrawCursor() + { +- if ( cv_cursor_composite == 2 ) +- return true; +- +- if ( cv_cursor_composite == 0 ) +- return false; +- +- if ( g_bForceRelativeMouse ) +- return true; +- + global_focus_t *pFocus = GetCurrentFocus(); +- if ( !pFocus ) +- return false; +- +- if ( !pFocus->GetNestedHints() ) +- return true; +- +- return pFocus->GetNestedHints()->ShouldPaintCursor(); ++ gamescope::INestedHints *pNestedHints = pFocus ? pFocus->GetNestedHints() : nullptr; ++ return gamescope::CursorShouldBeComposited( cv_cursor_composite.Get(), g_bForceRelativeMouse, ++ pFocus != nullptr, pNestedHints != nullptr, ++ pNestedHints && pNestedHints->ShouldPaintCursor() ); + } + + static void ForwardVROverlayTargets() +diff --git a/tests/meson.build b/tests/meson.build +index 9f73a33..1ccdf7d 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -8,7 +8,7 @@ endforeach + + gamescope_tests = executable( + 'gamescope_tests', +- unittest_src + ['test_convar.cpp', 'test_focus_placement.cpp', 'test_mangoapp_config.cpp', 'test_mangoapp_control.cpp', 'test_process.cpp', 'test_upscale.cpp', 'test_utils_parsers.cpp', 'test_utils_string.cpp', 'test_vrclient_detect.cpp'], ++ unittest_src + ['test_convar.cpp', 'test_cursor_routing.cpp', 'test_focus_placement.cpp', 'test_mangoapp_config.cpp', 'test_mangoapp_control.cpp', 'test_process.cpp', 'test_upscale.cpp', 'test_utils_parsers.cpp', 'test_utils_string.cpp', 'test_vrclient_detect.cpp'], + include_directories: [srcdir, sol2_include], + dependencies: [catch2_dep, luajit_dep, cap_dep, drm_dep, glm_dep, wlroots_dep], + cpp_args: gamescope_cpp_args, +@@ -17,6 +17,7 @@ gamescope_tests = executable( + reaper_test_helper = executable('reaper_test_helper', 'reaper_test_helper.cpp') + + test('convar', gamescope_tests, args: ['[convar]']) ++test('cursor_routing', gamescope_tests, args: ['[cursor_routing]']) + test('focus_placement', gamescope_tests, args: ['[focus_placement]']) + test('mangoapp_config', gamescope_tests, args: ['[mangoapp_config]']) + test('mangoapp_control', gamescope_tests, args: ['[mangoapp_control]']) +diff --git a/tests/test_cursor_routing.cpp b/tests/test_cursor_routing.cpp +new file mode 100644 +index 0000000..9c622db +--- /dev/null ++++ b/tests/test_cursor_routing.cpp +@@ -0,0 +1,42 @@ ++#include <catch2/catch_test_macros.hpp> ++ ++#include "Utils/CursorRouting.h" ++ ++using namespace gamescope; ++ ++TEST_CASE("nested cursor composition can be forced without changing the default", "[cursor_routing]") ++{ ++ REQUIRE_FALSE( CursorShouldBeComposited( 1, false, true, true, false ) ); ++ REQUIRE( CursorShouldBeComposited( 2, false, true, true, false ) ); ++ ++ REQUIRE( CursorShouldBeComposited( 1, true, true, true, false ) ); ++ REQUIRE( CursorShouldBeComposited( 1, false, true, false, false ) ); ++ REQUIRE_FALSE( CursorShouldBeComposited( 0, true, true, false, true ) ); ++ REQUIRE_FALSE( CursorShouldBeComposited( 1, false, false, false, false ) ); ++ REQUIRE( CursorShouldBeComposited( 2, false, false, true, false ) ); ++} ++ ++TEST_CASE("manual composition retains only the no-focus default cursor fallback", "[cursor_routing]") ++{ ++ REQUIRE_FALSE( CursorShouldBeForwardedToHost( 2, false ) ); ++ REQUIRE( CursorShouldBeForwardedToHost( 2, true ) ); ++ REQUIRE( CursorShouldBeForwardedToHost( 1, false ) ); ++ REQUIRE( CursorShouldBeForwardedToHost( 0, false ) ); ++} ++ ++TEST_CASE("host cursor fallback follows the keyboard-focus and lock defaults", "[cursor_routing]") ++{ ++ REQUIRE( CursorShouldUseHostFallback( true, true, false, true ) ); ++ REQUIRE_FALSE( CursorShouldUseHostFallback( true, false, false, true ) ); ++ REQUIRE_FALSE( CursorShouldUseHostFallback( true, true, true, true ) ); ++ REQUIRE_FALSE( CursorShouldUseHostFallback( true, true, false, false ) ); ++ REQUIRE( CursorShouldUseHostFallback( false, false, false, true ) ); ++ REQUIRE_FALSE( CursorShouldUseHostFallback( false, true, true, true ) ); ++} ++ ++TEST_CASE("an empty or hidden client cursor stays hidden when composition is forced", "[cursor_routing]") ++{ ++ REQUIRE_FALSE( CursorImageShouldBePainted( true, false ) ); ++ REQUIRE_FALSE( CursorImageShouldBePainted( false, true ) ); ++ REQUIRE( CursorImageShouldBePainted( false, false ) ); ++} diff --git a/tools/gamescope/patches/0110-wayland-backend-touch.patch b/tools/gamescope/patches/0110-wayland-backend-touch.patch index 5a270e7493..e85bf5d2a3 100644 --- a/tools/gamescope/patches/0110-wayland-backend-touch.patch +++ b/tools/gamescope/patches/0110-wayland-backend-touch.patch @@ -6,8 +6,8 @@ index d74268b..bf72267 100644 void Wayland_Keyboard_RepeatInfo( wl_keyboard *pKeyboard, int32_t nRate, int32_t nDelay ); static const wl_keyboard_listener s_KeyboardListener; -+ // Touch from the host compositor (DroidDeck): each finger goes to wlserver's touch path, -+ // the one a Steam Deck's touchscreen drives, instead of being dropped. ++ ++ + void Wayland_Touch_Down( wl_touch *pTouch, uint32_t uSerial, uint32_t uTime, wl_surface *pSurface, int32_t nId, wl_fixed_t fX, wl_fixed_t fY ); + void Wayland_Touch_Up( wl_touch *pTouch, uint32_t uSerial, uint32_t uTime, int32_t nId ); + void Wayland_Touch_Motion( wl_touch *pTouch, uint32_t uTime, int32_t nId, wl_fixed_t fX, wl_fixed_t fY ); @@ -58,7 +58,7 @@ index d74268b..bf72267 100644 + } + } + -+ // Touch ++ + + bool CWaylandInputThread::TouchToOutput( wl_surface *pSurface, wl_fixed_t fX, wl_fixed_t fY, double *pflX, double *pflY ) + { @@ -75,7 +75,7 @@ index d74268b..bf72267 100644 + *pflY = ( wl_fixed_to_double( fY ) * uScale / 120.0 + oState->nDestY ) / g_nOutputHeight; + return true; + } -+ // Touch ids are offset by one: the nested pointer already moves wlserver's touch 0. ++ + void CWaylandInputThread::Wayland_Touch_Down( wl_touch *pTouch, uint32_t uSerial, uint32_t uTime, wl_surface *pSurface, int32_t nId, wl_fixed_t fX, wl_fixed_t fY ) + { + double flX, flY; diff --git a/tools/gamescope/patches/0111-wayland-pointer-warps-in-passthrough.patch b/tools/gamescope/patches/0111-wayland-pointer-warps-in-passthrough.patch index 466d0a781f..c9027a309b 100644 --- a/tools/gamescope/patches/0111-wayland-pointer-warps-in-passthrough.patch +++ b/tools/gamescope/patches/0111-wayland-pointer-warps-in-passthrough.patch @@ -7,9 +7,9 @@ index bf72267..c400978 100644 wlserver_lock(); - wlserver_touchmotion( flX, flY, 0, ++m_uFakeTimestamp ); -+ // Always move the real pointer too: in Passthrough (what Steam's Big Picture asks for) a -+ // touch motion for an id that is not down moves nothing, so hover never reached the -+ // client and a click landed wherever the pointer had last been. ++ ++ ++ + wlserver_touchmotion( flX, flY, 0, ++m_uFakeTimestamp, true ); wlserver_unlock(); } diff --git a/tools/gamescope/patches/0112-restore-iconified-game-on-resume.patch b/tools/gamescope/patches/0112-restore-iconified-game-on-resume.patch index 2eee045e4e..9e24b7287c 100644 --- a/tools/gamescope/patches/0112-restore-iconified-game-on-resume.patch +++ b/tools/gamescope/patches/0112-restore-iconified-game-on-resume.patch @@ -28,11 +28,11 @@ index 08afbc4..372a82c 100644 if ( keyboardFocusWindow && ctx->currentKeyboardFocusWindow && find_win( ctx, ctx->currentKeyboardFocusWindow ) == keyboardFocusWin ) keyboardFocusWindow = ctx->currentKeyboardFocusWindow; -+ // An overlay that takes input (the Steam menu) moves input away without changing the focus window, and a -+ // fullscreen game iconifies itself when it loses input. The focus window never changed, so it is never taken -+ // out of iconic above, and wine will not activate a window it believes iconic: the game stays minimized -+ // (its 160x24 caption in the corner) after Resume. Put it back to NormalState before input returns to it, -+ // then hand focus over again so wine sees the restore first and the activation after it. ++ ++ ++ ++ ++ + if ( inputFocus == ctx->focus.focusWindow && ctx->focus.focusWindow->iconifyRequested ) + { + ctx->focus.focusWindow->iconifyRequested = false; @@ -59,8 +59,8 @@ index 08afbc4..372a82c 100644 } + if ( ev->atom == ctx->atoms.gamescopeRestoreFocusWindow ) + { -+ // Anything outside (the session's watcher) can ask for the same restore: NormalState on the focus -+ // window and focus handed to it again. Harmless on a window that is not iconic. ++ ++ + if ( ctx->focus.focusWindow && get_prop( ctx, ctx->root, ctx->atoms.gamescopeRestoreFocusWindow, 0 ) ) + { + xwm_log.infof( "restore requested for focus window 0x%lx", ctx->focus.focusWindow->xwayland().id ); @@ -89,7 +89,7 @@ index 66022d7..af93a23 100644 bool isFullscreen = false; bool isSysTrayIcon = false; -+ // The client asked to be iconified (WM_CHANGE_STATE) and has not been put back to NormalState since. ++ + bool iconifyRequested = false; bool sizeHintsSpecified = false; bool skipTaskbar = false; diff --git a/tools/gamescope/patches/0114-take-override-redirect-from-mapnotify.patch b/tools/gamescope/patches/0114-take-override-redirect-from-mapnotify.patch index f2ea4a16f8..492ec11162 100644 --- a/tools/gamescope/patches/0114-take-override-redirect-from-mapnotify.patch +++ b/tools/gamescope/patches/0114-take-override-redirect-from-mapnotify.patch @@ -26,7 +26,7 @@ index f00b62c..cb3b9c6 100644 if (w && w->xwayland().id == ev.xmap.window) + { -+ // Wine flips override-redirect while unmapped and the flip itself sends no event. ++ + w->xwayland().a.override_redirect = ev.xmap.override_redirect; map_win(ctx, ev.xmap.window, ev.xmap.serial); + } diff --git a/tools/gamescope/patches/0115-limiter-paces-per-window.patch b/tools/gamescope/patches/0115-limiter-paces-per-window.patch new file mode 100644 index 0000000000..7ead84e353 --- /dev/null +++ b/tools/gamescope/patches/0115-limiter-paces-per-window.patch @@ -0,0 +1,27 @@ +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index 5b0e300..b9b07ca 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -6875,10 +6875,19 @@ static bool steamcompmgr_should_vblank_window( bool bShouldLimitFPS, uint64_t vb + { + if ( g_nSteamCompMgrTargetFPS && bShouldLimitFPS && nRefreshHz > nTargetFPS ) + { +- int nVblankDivisor = nRefreshHz / nTargetFPS; ++ if ( w && now ) ++ { ++ uint64_t schedule = w->last_commit_first_latch_time + g_SteamCompMgrLimitedAppRefreshCycle; ++ if ( now + g_SteamCompMgrAppRefreshCycle / 2 < schedule ) ++ bSendCallback = false; ++ } ++ else ++ { ++ int nVblankDivisor = nRefreshHz / nTargetFPS; + +- if ( vblank_idx % nVblankDivisor != 0 ) +- bSendCallback = false; ++ if ( vblank_idx % nVblankDivisor != 0 ) ++ bSendCallback = false; ++ } + } + } + diff --git a/tools/gamescope/release.env b/tools/gamescope/release.env index 9f895d08d6..d5fd20c50b 100644 --- a/tools/gamescope/release.env +++ b/tools/gamescope/release.env @@ -1,3 +1,3 @@ GAMESCOPE_REPO=Droid-Deck/DroidDeck-Components -GAMESCOPE_TAG=gamescope-3.16.29-p9 -GAMESCOPE_SHA256=7123a37bdbcd0d76d4bd1d7490e5d2017221e036395fdd48c1e92458594ca769 +GAMESCOPE_TAG=gamescope-3.16.29-cursor-045e5a31-qa +GAMESCOPE_SHA256=76929e93804450e7352421b76a457c825a6251de8b704d942c363a211bd99424 diff --git a/tools/linuxfs/build-x86-preloads.sh b/tools/linuxfs/build-x86-preloads.sh index 58e0dcefea..61abcb3216 100755 --- a/tools/linuxfs/build-x86-preloads.sh +++ b/tools/linuxfs/build-x86-preloads.sh @@ -26,7 +26,7 @@ for arch in x86_64 i386; do fi done done -for target in x86_64/faultreport i386/faultreport x86_64/thunkaudit; do +for target in x86_64/faultreport i386/faultreport; do arch=${target%/*} name=${target#*/} case $arch in x86_64) bits=-m64 ;; @@ -41,13 +41,24 @@ for target in x86_64/faultreport i386/faultreport x86_64/thunkaudit; do exit 1 fi done +lib=$out/x86_64/libwebkitinput.so +gcc -m64 -shared -fPIC -O2 -Wall -Wextra -nostdlib -fno-stack-protector -fno-builtin -fvisibility=hidden \ + -o "$lib" tools/linuxfs/fex/webkitinput.c +strip --strip-unneeded "$lib" +if objdump -p "$lib" | grep -q NEEDED || [ "$(nm -D --undefined-only "$lib" | awk '{print $1 $2}' | LC_ALL=C sort | tr '\n' ' ')" != "wdlsym wg_object_get_data wg_object_set wg_object_set_data wg_type_check_instance_is_a wgtk_container_forall wgtk_container_get_type wgtk_key_snooper_install wgtk_widget_get_toplevel wwebkit_user_script_new wwebkit_user_script_unref wwebkit_web_view_get_type wwebkit_web_view_get_uri wwebkit_web_view_run_javascript " ]; then + echo "$lib must need nothing but weak GLib, GTK and WebKit calls" >&2 + exit 1 +fi stub=$(mktemp -d) gcc -m64 -shared -nostdlib -Wl,-soname,/usr/lib/x86_64-linux-gnu/libvulkan.so.1 -o "$stub/libvulkan.so.1" -x c /dev/null -gcc -m64 -shared -nostdlib -Wl,-z,nodelete -Wl,--no-as-needed \ - -o "$out/x86_64/libvulkan-thunk.so" -x c /dev/null -x none "$stub/libvulkan.so.1" +lib=$out/x86_64/libvulkan-thunk.so +gcc -m64 -shared -fPIC -O2 -Wall -Wextra -fvisibility=hidden -Wl,-soname,libvulkan.so.1 -Wl,-z,nodelete -Wl,--no-as-needed \ + -o "$lib" tools/linuxfs/fex/vulkanpin.c "$stub/libvulkan.so.1" -ldl rm -rf "$stub" -if ! objdump -p "$out/x86_64/libvulkan-thunk.so" | grep -q 'NEEDED *\/usr/lib/x86_64-linux-gnu/libvulkan\.so\.1$' \ - || ! objdump -p "$out/x86_64/libvulkan-thunk.so" | grep -q 'FLAGS_1 *0x0*8$'; then - echo "$out/x86_64/libvulkan-thunk.so must be nodelete and need only the Vulkan thunk" >&2 +strip --strip-unneeded "$lib" +newest=$(objdump -T "$lib" | grep -o 'GLIBC_2\.[0-9]*' | sort -u -t. -k2,2n | tail -1) +if ! objdump -p "$lib" | grep -q 'NEEDED *\/usr/lib/x86_64-linux-gnu/libvulkan\.so\.1$' \ + || ! objdump -p "$lib" | grep -q 'FLAGS_1 *0x0*8$' || [ "${newest#GLIBC_2.}" -gt 31 ]; then + echo "$lib must be nodelete, need the Vulkan thunk and run on glibc 2.31" >&2 exit 1 fi diff --git a/tools/linuxfs/check-preloads.sh b/tools/linuxfs/check-preloads.sh index 6e9e1dcff6..78021c4404 100644 --- a/tools/linuxfs/check-preloads.sh +++ b/tools/linuxfs/check-preloads.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# Shared native ABI checks for CI and local builds. set -euo pipefail D=${1:?asset directory} NEED=$("${READELF:-readelf}" -d "$D/libfakeinput.so" | sed -n 's/.*NEEDED.*\[\(.*\)\]/\1/p') @@ -13,9 +12,6 @@ FAKE=$(syms "$D/libfakeinput.so") for sym in open openat ioctl read close poll ppoll select stat fstat access scandir; do grep -qx "$sym" <<<"$FAKE" || { echo "::error::libfakeinput.so does not export $sym"; exit 1; } done -# The static C++ runtime stays private: every session process preloads this library, -# and an exported personality routine takes over other programs' unwinding (shadPS4 -# aborted in pthread_exit). if grep -qxE '__gxx_personality_v0|__cxa_throw|_Unwind_Resume' <<<"$FAKE"; then echo "::error::libfakeinput.so exports the C++ runtime"; exit 1 fi @@ -23,7 +19,6 @@ SESSION=$(syms "$D/libblsession.so") for sym in socket bind getsockname setsockopt statfs statvfs syscall shm_open shm_unlink mmap mmap64 munmap drmPrimeFDToHandle drmCloseBufferHandle; do grep -qx "$sym" <<<"$SESSION" || { echo "::error::libblsession.so does not export $sym"; exit 1; } done -# Zink's GEM_CLOSE is caught at ioctl(); an exported drmIoctl made NMS replay old frames. if grep -qx drmIoctl <<<"$SESSION"; then echo "::error::libblsession.so exports drmIoctl"; exit 1 fi diff --git a/tools/linuxfs/clipboard/clipboard.c b/tools/linuxfs/clipboard/clipboard.c index cd91d65d1c..61b89ca6e0 100644 --- a/tools/linuxfs/clipboard/clipboard.c +++ b/tools/linuxfs/clipboard/clipboard.c @@ -1,7 +1,3 @@ -/* Android text -> Gamescope's Xwayland selection. Gamescope's Wayland backend does not - * relay the outer compositor's clipboard. libX11 is loaded from the guest at runtime; - * the small stable Xlib ABI below keeps this helper independent of cross X11 headers. - * The private host file is atomically replaced, never put in session logs. */ #define _GNU_SOURCE #include <sys/inotify.h> #include <sys/stat.h> @@ -45,12 +41,9 @@ API(int, XConnectionNumber, (Display *)); API(int, XCloseDisplay, (Display *)); API(void *, XSetErrorHandler, (int (*)(Display *, void *))); -/* Stay below X11's normal maximum property request. Never paste a truncated command. */ #define MAX_TEXT (64 * 1024) static int ignore_x_error(Display *d, void *event) { (void)d; (void)event; return 0; } -/* The host renames complete files into place. The inode distinguishes copying the same - * text again after a guest program has taken ownership of the clipboard. */ static int refresh(Display *d, Window w, Atom clipboard, const char *path, char **text, size_t *len, ino_t *inode) { int fd = open(path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW); @@ -98,7 +91,7 @@ int main(int argc, char **argv) { LOAD(XSetErrorHandler); Display *d = XOpenDisplay(NULL); if (!d) { fprintf(stderr, "== clipboard: cannot open Xwayland\n"); return 1; } - XSetErrorHandler(ignore_x_error); /* A paste requester can close its window at any time. */ + XSetErrorHandler(ignore_x_error); Window w = XCreateSimpleWindow(d, XDefaultRootWindow(d), 0, 0, 1, 1, 0, 0, 0); Atom clipboard = XInternAtom(d, "CLIPBOARD", 0); Atom targets = XInternAtom(d, "TARGETS", 0), utf8 = XInternAtom(d, "UTF8_STRING", 0); @@ -117,7 +110,7 @@ int main(int argc, char **argv) { for (;;) { while (XPending(d)) { Event e; XNextEvent(d, &e); - if (e.type != 30) continue; /* SelectionRequest */ + if (e.type != 30) continue; SelectionRequest *r = &e.request; Atom property = r->property ? r->property : r->target; Event reply = {0}; @@ -126,14 +119,13 @@ int main(int argc, char **argv) { size_t ascii; for (ascii = 0; ascii < len && (unsigned char)text[ascii] < 128; ascii++) {} if (r->target == targets) { Atom supported[] = {targets, utf8, plain, text_atom, string}; - XChangeProperty(d, r->requestor, property, 4 /* XA_ATOM */, 32, 0, + XChangeProperty(d, r->requestor, property, 4 , 32, 0, (const unsigned char *)supported, ascii == len ? 5 : 4); reply.selection.property = property; } else if (r->target == utf8 || r->target == plain || r->target == text_atom) { XChangeProperty(d, r->requestor, property, utf8, 8, 0, (const unsigned char *)text, (int)len); reply.selection.property = property; } else if (r->target == string) { - /* STRING is Latin-1. Offer it only for ASCII rather than corrupt UTF-8. */ if (ascii == len) { XChangeProperty(d, r->requestor, property, string, 8, 0, (const unsigned char *)text, (int)len); reply.selection.property = property; diff --git a/tools/linuxfs/debian-image.env b/tools/linuxfs/debian-image.env index 5532bfe166..8d6902e382 100644 --- a/tools/linuxfs/debian-image.env +++ b/tools/linuxfs/debian-image.env @@ -1,8 +1,3 @@ -# The Debian 11 image the x86 preloads are compiled in (glibc 2.31, what Steam's Linux runtime -# has). Published once by .github/workflows/ci-debian-image.yml to a release on this repo; the -# build downloads it from there instead of pulling from a public registry mirror, whose -# anonymous rate limit the shared runners keep hitting. Debian 11 is frozen upstream, so a -# refresh is only ever a new -rN release with the three lines below updated. DEBIAN_IMAGE_TAG=ci-debian-bullseye-r1 DEBIAN_IMAGE_ASSET=debian-bullseye.tar.zst DEBIAN_IMAGE_SHA256=5ac13c6b0f2e3ab3e8acc8cadcd39ee453a51a72870645d592635e24bcb85459 diff --git a/tools/linuxfs/desktop/droiddeck-desktop b/tools/linuxfs/desktop/droiddeck-desktop index 4b3105bc16..5078fbd9b8 100644 --- a/tools/linuxfs/desktop/droiddeck-desktop +++ b/tools/linuxfs/desktop/droiddeck-desktop @@ -1,91 +1,48 @@ #!/bin/bash -# The desktop session: KDE Plasma, set up as SteamOS's desktop mode - KWin nested as a client of the -# app's compositor, Plasma's shell on it, and Xwayland for the X11 programs (the Steam client, most -# emulators). Run by droiddeck-session in place of gamescope for mode "lxqt" (the mode's name from -# the LXQt desktop this replaced; it is what the app and its preferences use). -# Staged by the app over the desktop package's copy on every launch, so a fix here reaches an -# installed desktop without re-downloading the package. set -u export XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE XDG_SESSION_DESKTOP=KDE DESKTOP_SESSION=plasma export KDE_FULL_SESSION=true KDE_SESSION_VERSION=6 KDE_APPLICATIONS_AS_SCOPE=0 -# Qt tries Wayland and falls back to X11 (Xwayland): an AppImage that bundles only Qt's xcb -# plugin - melonDS - exits at once on a plain "wayland" ("Could not find the Qt platform plugin"). export QT_QPA_PLATFORM="wayland;xcb" GDK_BACKEND=wayland,x11 SDL_VIDEODRIVER=wayland,x11 unset QT_QPA_PLATFORMTHEME -# KDE's programs log through Qt, which writes to the journal when stderr is not a terminal; there is -# no journal here, so their messages go to the desktop log with everything else. export QT_FORCE_STDERR_LOGGING=1 -# SteamOS's /etc/profile.d/kde.sh. export MOZ_ENABLE_WAYLAND=1 MOZ_USE_XINPUT2=1 -# Konsole's profile starts the login shell, which it finds here. export SHELL=/bin/bash -# Firefox's child processes sandbox themselves with seccomp and namespaces, neither of which -# behaves under proot: the content process ends up unable to read the font files its parent can, -# reports "no fonts" and dies - the tab crash, with the chrome around it still drawing text. -# The prefs for this are only advisory and a profile can override them; the environment is not. export MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_DISABLE_GMP_SANDBOX=1 MOZ_DISABLE_RDD_SANDBOX=1 export MOZ_DISABLE_SOCKET_PROCESS_SANDBOX=1 MOZ_DISABLE_UTILITY_SANDBOX=1 -# Firefox seals the size of the shared memory it hands a tab; on Android 16 (Galaxy S25/S26, -# RedMagic) adding the seal fails, Firefox only warns, and the tab refuses the unsealed memory -# ("Shared memory PlatformHandle is not safe to map") and dies on signal 11 - every page. Firefox's -# own switch skips the seals. (#280; the line went missing in the fontconfig move of #252.) export MOZ_SHM_NO_SEALS=1 -# KWin composites in software (QPainter): its GPU path allocates through gbm on a DRM render node, -# and the KGSL stand-in is not one. Its windows get shm buffers only, so GL programs on it draw with -# Mesa's software rasterizer, Plasma's own Qt Quick draws with Qt's software renderer (plasmashell -# crashes on llvmpipe here), and a Vulkan program cannot draw at all: games and emulators from the -# menu run through droiddeck-gpu (their own gamescope on the app's compositor), and Steam goes back -# to the app as a Steam session - SteamOS's "Return to Gaming Mode". The session's own GL choice -# (zink on Turnip, for the Steam client) is put back by droiddeck-gpu. export KWIN_COMPOSE=Q QT_QUICK_BACKEND=software LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe -# mpv refuses that software GL and then fails its X11 fallback (an assertion): allowed it, it plays. [ -e /etc/mpv/mpv.conf ] || { mkdir -p /etc/mpv && echo gpu-sw=yes >/etc/mpv/mpv.conf; } 2>/dev/null export DROIDDECK_NESTED_SCALE=1 export DROIDDECK_GLTHREAD=${mesa_glthread:-} unset MESA_LOADER_DRIVER_OVERRIDE LIBGL_KOPPER_DRI2 mesa_glthread -# The desktop's own log, beside the session's, so KWin and the programs on it can be read apart -# from the session that started them. The session log keeps the milestones either way. if [ -n "${BL_DEBUG_DIR:-}" ]; then mkdir -p "$BL_DEBUG_DIR" 2>/dev/null || true exec >>"$BL_DEBUG_DIR/desktop.log" 2>&1 echo "== droiddeck-desktop $(date -u '+%Y-%m-%d %H:%M:%S UTC') ${BL_WIDTH:-1280}x${BL_HEIGHT:-720}" fi -# The runtime directory outlives a session. KDE's daemons are single-instance programs that leave a -# lock and a socket there; finding last session's, they decide they are already running and exit -# without a word. Only the app's own compositor socket (wayland-0) is kept. find "$XDG_RUNTIME_DIR" -mindepth 1 -maxdepth 1 ! -name 'wayland-0*' ! -name 'keymap.xkb' -exec rm -rf {} + 2>/dev/null chmod 700 "$XDG_RUNTIME_DIR" 2>/dev/null -# KWin will not start Xwayland when its socket directory is not sticky, as a shared /tmp would be, -# and Plasma's session manager cannot listen at all without the ICE directory, which only root may -# create for it. mkdir -p /tmp/.X11-unix /tmp/.ICE-unix && chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix 2>/dev/null -# Fontconfig defaults and Android language fallbacks are set up by droiddeck-session before this -# script or any desktop program starts. -# The menu's "Steam" / "Steam Big Picture" entries and one entry per installed game: all of them -# hand off to the app (droiddeck-steam-launch), since the client cannot draw on this desktop. export BL_DESKTOP=1 ln -sf /usr/local/bin/droiddeck-steam-launch /usr/local/bin/steamdeck-steam 2>/dev/null ln -sf /usr/local/bin/droiddeck-steam-shim /usr/local/bin/steam 2>/dev/null python3 /usr/local/bin/droiddeck-desktop-games 2>&1 | sed 's/^/[games] /' -# Player 1 on the controller in every emulator that has no profile of its own yet - now, and again -# every half minute: an emulator started for the first time writes its own config, which is then -# given the controller for its next start without waiting for the next desktop. +cat > /usr/share/applications/droiddeck-steam-x64.desktop <<'ENTRY' +[Desktop Entry] +Type=Application +Name=Steam x86-64 (FEX, experimental) +Comment=Valve's x86-64 Linux client under FEX, in its own home with its own login +Exec=qterminal -e /usr/local/bin/droiddeck-steam-x64 +Icon=steam +Categories=System; +ENTRY python3 /usr/local/bin/droiddeck-pad-defaults 2>&1 | sed 's/^/[pads] /' ( while sleep 30; do python3 /usr/local/bin/droiddeck-pad-defaults 2>&1 | sed 's/^/[pads] /'; done ) & -# Games and emulators from the menu run through droiddeck-gpu; BL_DESKTOP_GPU=on/off overrides, -# and each entry keeps "Run in a desktop window" either way. python3 /usr/local/bin/droiddeck-desktop-gpu 2>&1 | sed 's/^/[gpu] /' -# The windowed action still opens melonDS at the size/placement the LXQt desktop used. /usr/local/bin/droiddeck-desktop-window-rules 2>&1 | sed 's/^/[rules] /' -# Windows programs, Linux programs, AppImages and scripts open with droiddeck-open (Steam's Proton, -# FEX for x86); an exec the kernel refuses is handed to it as well (libblsession's binfmt.c). An -# AppImage run directly cannot mount itself under proot, so it unpacks itself to run. python3 /usr/local/bin/droiddeck-open --install 2>&1 | sed 's/^/[open] /' export APPIMAGE_EXTRACT_AND_RUN=1 -# A click runs an executable script or program without KIO asking first; Dolphin's settings can still ask. [ -e /etc/xdg/kiorc ] || printf '[Executable scripts]\nbehaviourOnLaunch=execute\n' >/etc/xdg/kiorc 2>/dev/null -# SteamOS's desktop icons: Return to Gaming Mode and Steam, put there once - what the user moves -# or deletes stays that way. desktop_dir=$(xdg-user-dir DESKTOP 2>/dev/null); [ -n "$desktop_dir" ] && [ "$desktop_dir" != "$HOME" ] || desktop_dir=$HOME/Desktop if [ ! -e "$HOME/.config/droiddeck-desktop-icons" ]; then mkdir -p "$desktop_dir" "$HOME/.config" @@ -94,23 +51,16 @@ if [ ! -e "$HOME/.config/droiddeck-desktop-icons" ]; then chmod +x "$desktop_dir"/*.desktop 2>/dev/null touch "$HOME/.config/droiddeck-desktop-icons" fi -# A Return icon still there is kept current with the package's entry (what it runs has changed). [ -f "$desktop_dir/Return.desktop" ] && cp -f /usr/share/applications/droiddeck-return-gaming.desktop "$desktop_dir/Return.desktop" 2>/dev/null -# Plasma's caches of the menu, the icons and the MIME types, which a package install never ran. update-mime-database /usr/share/mime >/dev/null 2>&1 & [ -f /usr/share/icons/hicolor/icon-theme.cache ] || gtk-update-icon-cache -q -t /usr/share/icons/hicolor 2>/dev/null & [ -f /usr/share/glib-2.0/schemas/gschemas.compiled ] || glib-compile-schemas /usr/share/glib-2.0/schemas 2>/dev/null -# In debug runs Firefox (started from the panel or the menu, so it inherits this) writes its -# own network log: name lookups, connects, HTTP transactions, the link/offline decisions. if [ -f "$HOME/.droiddeck-desktop-debug" ]; then mkdir -p "$HOME/.cache/droiddeck" export MOZ_LOG="nsHttp:3,nsSocketTransport:3,nsHostResolver:4,NetworkLinkService:5,NetworkConnectivityService:5,nsIOService:5" export MOZ_LOG_FILE="$HOME/.cache/droiddeck/firefox-net.log" export QT_LOGGING_RULES="kwin_*.debug=true" fi -# Remote runs, for driving the desktop from a debugger: with ~/.droiddeck-remote-run present (only -# the app or root can create it), each script dropped into ~/.cache/droiddeck/run/ is run once, -# inside the session with its environment, its output tagged into the desktop log. if [ -f "$HOME/.droiddeck-remote-run" ]; then mkdir -p "$HOME/.cache/droiddeck/run" ( @@ -123,18 +73,10 @@ if [ -f "$HOME/.droiddeck-remote-run" ]; then done ) & fi -# Plasma as its own login starts it: startplasma-wayland sets up the session's environment and runs -# plasma_session, which starts KWin (through kwin_wayland_wrapper, ours first on PATH) as a client of -# the app's compositor with its own Xwayland, then Plasma's daemons, shell and autostart entries on -# it. The session bus is ours: Plasma, the file manager and the portal all expect one. echo "== droiddeck-desktop: Plasma on $WAYLAND_DISPLAY" dbus-run-session -- startplasma-wayland rc=$? echo "== droiddeck-desktop: Plasma ended ($rc)" -# Plasma logged out - Log Out, or Return to Gaming Mode, which logs out the same way, so open windows -# are asked to close (and to save) first. As on SteamOS, leaving the desktop goes to Gaming Mode: the -# app is asked for a Steam session, and it ends this one to start it. A desktop the app stops never -# gets here; a Plasma that failed does not count as a logout. if [ "$rc" -eq 0 ]; then /usr/local/bin/droiddeck-steam-launch bigpicture sleep 30 diff --git a/tools/linuxfs/desktop/droiddeck-desktop-gpu b/tools/linuxfs/desktop/droiddeck-desktop-gpu index af9e112092..b1cabbff0f 100644 --- a/tools/linuxfs/desktop/droiddeck-desktop-gpu +++ b/tools/linuxfs/desktop/droiddeck-desktop-gpu @@ -1,24 +1,13 @@ #!/usr/bin/python3 -# The desktop's games and emulators, started on the GPU. Every menu entry whose categories say -# Game or Emulator gets a copy of its own in ~/.local/share/applications (which wins over -# /usr/share/applications) whose Exec runs it through droiddeck-gpu: full screen on the app's -# compositor, where Vulkan and OpenGL work. The entry keeps the old way as a second action, "Run in -# a desktop window". Run at every desktop start; copies whose original is gone, or all of them when -# the switch is off, are removed. -# -# BL_DESKTOP_GPU=on (default: the desktop composites in software) | off import os import re HOME = os.environ.get("HOME", "/root") SYSTEM_DIR = "/usr/share/applications" -# The user's own AppImages (the front end's Add AppImage). LOCAL_DIR = "/usr/local/share/applications" -# Flathub's games, as Flatpak exports them; the copies here win over these as they do over the system's. FLATPAK_DIR = os.path.join(HOME, ".local/share/flatpak/exports/share/applications") USER_DIR = os.path.join(HOME, ".local/share/applications") MARK = "X-DroidDeck-GPU=1" -# The client and its games already hand themselves to the app (droiddeck-steam-launch). SKIP = re.compile(r"^(steam|droiddeck-game-|droiddeck-steam|steamdeck-)", re.I) @@ -76,7 +65,6 @@ def wrap(text): out_group.append("Actions=" + ("droiddeck-window;" + actions if actions else "droiddeck-window;")) out_group.append(MARK) window = ["", "[Desktop Action droiddeck-window]", "Name=Run in a desktop window", "Exec=" + exec_line] - # The entry's own actions (new window, a different mode...) run on the GPU as well. wrapped_rest = [] for l in rest: if l.startswith("Exec=") and not l[5:].startswith("droiddeck-gpu "): @@ -105,7 +93,6 @@ def main(): if not name.endswith(".desktop") or SKIP.match(name): continue target = os.path.join(USER_DIR, name) - # A copy the user made or edited themselves is theirs. if os.path.exists(target) and not ours(target): continue try: diff --git a/tools/linuxfs/desktop/droiddeck-gpu b/tools/linuxfs/desktop/droiddeck-gpu index e68f551782..40a346085b 100644 --- a/tools/linuxfs/desktop/droiddeck-gpu +++ b/tools/linuxfs/desktop/droiddeck-gpu @@ -1,10 +1,4 @@ #!/bin/bash -# Runs a program from the desktop on the GPU: in a gamescope of its own that draws straight into -# the app's compositor (wayland-0), not inside the desktop's KWin. KWin composites in software, and -# gives its windows no DMA-BUFs - a Vulkan program there fails at its swapchain -# (VK_ERROR_SURFACE_LOST, RPCS3's error). Here it gets the same path as a program started from the -# app's rail: full screen over the desktop until it exits, then the desktop is back. -# droiddeck-gpu <program> [args...] set -u [ $# -gt 0 ] || { echo "usage: droiddeck-gpu <program> [args...]" >&2; exit 64; } if [ -n "${BL_DEBUG_DIR:-}" ]; then @@ -20,16 +14,11 @@ elif [ "${BL_REFRESH:-0}" -gt 0 ]; then fi [ "${BL_HDR:-0}" = 1 ] && args+=(--hdr-enabled) echo "== droiddeck-gpu $(date -u +%H:%M:%S): $* (gamescope ${width}x${height} on wayland-0)" -# gamescope is a client of the app's compositor, beside the desktop's KWin; the program inside it reaches it -# through gamescope's own Xwayland, as in a Steam session. export WAYLAND_DISPLAY=wayland-0 export GDK_BACKEND=x11 QT_QPA_PLATFORM=xcb SDL_VIDEODRIVER=x11 -# GL on the GPU again (zink on Turnip, as the session sets it): the desktop itself draws GL in software. -# Qt Quick back on its GPU renderer and KWin's software compositing not passed on, too. unset LIBGL_ALWAYS_SOFTWARE QT_QUICK_BACKEND KWIN_COMPOSE export MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink LIBGL_KOPPER_DRI2=true [ -n "${DROIDDECK_GLTHREAD:-}" ] && export mesa_glthread=$DROIDDECK_GLTHREAD -# AppImages cannot mount under proot; the menu entries already say so, a hand-typed one may not. export APPIMAGE_EXTRACT_AND_RUN=1 gamescope "${args[@]}" -- /usr/local/bin/droiddeck-gpu-window "$@" rc=$? diff --git a/tools/linuxfs/desktop/firefox-droiddeck.js b/tools/linuxfs/desktop/firefox-droiddeck.js index ad6b1e40f2..053d7d03a3 100644 --- a/tools/linuxfs/desktop/firefox-droiddeck.js +++ b/tools/linuxfs/desktop/firefox-droiddeck.js @@ -1,17 +1,9 @@ -// Firefox defaults for the DroidDeck desktop, staged by the app into -// /usr/lib/firefox/defaults/pref/. A user's own prefs.js still wins. -// Firefox judges "online" by dumping the routing table over netlink, which Android denies to -// apps; seeing no default route it switches itself to Work Offline and every page fails while -// the network is fine. Let it just try. pref("network.manage-offline-status", false); pref("browser.offline", false); -// No user namespaces on Android kernels and a ptrace'd process tree: the process sandboxes -// have nothing to set up and only add failure modes. pref("security.sandbox.content.level", 0); pref("media.cubeb.sandbox", false); pref("security.sandbox.socket.process.level", 0); -// Handheld-sized chrome, and nothing phoning home on first run. pref("browser.shell.checkDefaultBrowser", false); pref("datareporting.policy.dataSubmissionEnabled", false); pref("browser.aboutwelcome.enabled", false); diff --git a/tools/linuxfs/desktop/kwin_wayland_wrapper b/tools/linuxfs/desktop/kwin_wayland_wrapper index 020c3d9c4d..a34e7455a0 100755 --- a/tools/linuxfs/desktop/kwin_wayland_wrapper +++ b/tools/linuxfs/desktop/kwin_wayland_wrapper @@ -1,10 +1,4 @@ #!/bin/bash -# KWin for the desktop. Plasma's session (plasma_session) starts KWin through kwin_wayland_wrapper as -# found on PATH; this one, first on it, has KWin draw into the app's compositor (wayland-0) and serve -# its own clients on wayland-1 - by default it takes wayland-0 and finds the app's lock on it - with -# its nested output at the app's surface size (left alone, a 1024x768 window the desktop is scaled -# from), and without the lock screen, which the app's own suspend stands in for. Anything else (a KWin -# started outside DroidDeck's desktop) gets the real wrapper as it is. if [ "${BL_DESKTOP:-}" = 1 ]; then set -- --wayland-display wayland-0 --socket wayland-1 --width "${BL_WIDTH:-1280}" --height "${BL_HEIGHT:-720}" --no-lockscreen "$@" fi diff --git a/tools/linuxfs/fex/thunkaudit.c b/tools/linuxfs/fex/thunkaudit.c deleted file mode 100644 index 413ac73ba2..0000000000 --- a/tools/linuxfs/fex/thunkaudit.c +++ /dev/null @@ -1,40 +0,0 @@ -#if !defined(__x86_64__) -#error thunkaudit is built for x86_64 guests only -#endif - -#define LA_SER_ORIG 0x01 - -static const char vulkan_thunk[] = "/usr/lib/x86_64-linux-gnu/libvulkan.so.1"; -static const char vulkan_pin[] = "/usr/lib/x86_64-linux-gnu/droiddeck/libvulkan-thunk.so"; - -static int same(const char *a, const char *b) -{ - while (*a && *a == *b) { - a++; - b++; - } - return *a == *b; -} - -static const char *base_name(const char *path) -{ - const char *name = path; - for (; *path; path++) - if (*path == '/') - name = path + 1; - return name; -} - -__attribute__((visibility("default"))) unsigned int la_version(unsigned int version) -{ - return version; -} - -__attribute__((visibility("default"))) char *la_objsearch(const char *name, unsigned long *cookie, unsigned int flag) -{ - const char *file = base_name(name); - (void)cookie; - if (flag == LA_SER_ORIG && !same(name, vulkan_thunk) && (same(file, "libvulkan.so.1") || same(file, "libvulkan.so"))) - return (char *)vulkan_pin; - return (char *)name; -} diff --git a/tools/linuxfs/fex/vulkanpin.c b/tools/linuxfs/fex/vulkanpin.c new file mode 100644 index 0000000000..45aeb9edb0 --- /dev/null +++ b/tools/linuxfs/fex/vulkanpin.c @@ -0,0 +1,88 @@ +#include <dlfcn.h> +#include <stddef.h> +#include <string.h> + +#ifndef VULKAN_THUNK +#define VULKAN_THUNK "/usr/lib/x86_64-linux-gnu/libvulkan.so.1" +#endif + +#define VK_INCOMPLETE 5 +#define VK_ERROR_INITIALIZATION_FAILED (-3) +#define EXTENSIONS 128 + +typedef int VkResult; +typedef void (*Function)(void); +typedef struct { + char extensionName[256]; + unsigned int specVersion; +} VkExtensionProperties; +typedef VkResult (*Enumerate)(const char *, unsigned int *, VkExtensionProperties *); +typedef Function (*ProcAddr)(void *, const char *); + +/* The driver cannot enumerate devices for an instance with VK_KHR_display, and gamescope's WSI layer aborts on that. */ +static const char *const hidden_extensions[] = { + "VK_KHR_display", + "VK_KHR_get_display_properties2", + "VK_EXT_direct_mode_display", + "VK_EXT_acquire_xlib_display", + "VK_EXT_acquire_drm_display", + "VK_EXT_display_surface_counter", +}; + +static void *thunk(const char *name) +{ + void *library = dlopen(VULKAN_THUNK, RTLD_NOW | RTLD_NOLOAD); + void *found = library ? dlsym(library, name) : NULL; + if (library) + dlclose(library); + return found; +} + +static int hidden(const char *name) +{ + for (size_t i = 0; i < sizeof(hidden_extensions) / sizeof(hidden_extensions[0]); i++) + if (!strcmp(name, hidden_extensions[i])) + return 1; + return 0; +} + +__attribute__((visibility("default"))) VkResult vkEnumerateInstanceExtensionProperties(const char *layer, unsigned int *count, + VkExtensionProperties *properties) +{ + static Enumerate real; + VkExtensionProperties all[EXTENSIONS]; + unsigned int total = EXTENSIONS, kept = 0, room = properties ? *count : 0; + VkResult result; + if (!real) + real = (Enumerate)thunk("vkEnumerateInstanceExtensionProperties"); + if (!real) + return VK_ERROR_INITIALIZATION_FAILED; + result = real(layer, &total, all); + if (result < 0) + return result; + for (unsigned int i = 0; i < total; i++) { + if (hidden(all[i].extensionName)) + continue; + if (properties && kept < room) + memcpy(&properties[kept], &all[i], sizeof(all[i])); + kept++; + } + if (!properties) { + *count = kept; + return result; + } + *count = kept < room ? kept : room; + return kept > room ? VK_INCOMPLETE : result; +} + +__attribute__((visibility("default"))) Function vkGetInstanceProcAddr(void *instance, const char *name) +{ + static ProcAddr real; + if (!strcmp(name, "vkGetInstanceProcAddr")) + return (Function)vkGetInstanceProcAddr; + if (!strcmp(name, "vkEnumerateInstanceExtensionProperties")) + return (Function)vkEnumerateInstanceExtensionProperties; + if (!real) + real = (ProcAddr)thunk("vkGetInstanceProcAddr"); + return real ? real(instance, name) : NULL; +} diff --git a/tools/linuxfs/fex/webkitinput.c b/tools/linuxfs/fex/webkitinput.c new file mode 100644 index 0000000000..fd39bd6ab7 --- /dev/null +++ b/tools/linuxfs/fex/webkitinput.c @@ -0,0 +1,198 @@ +#if !defined(__x86_64__) +#error webkitinput is built for x86_64 guests only +#endif + +typedef struct _WebKitSettings WebKitSettings; +typedef struct _WebKitUserContentManager WebKitUserContentManager; +typedef struct _WebKitUserScript WebKitUserScript; + +extern void g_object_set(void *object, const char *first_property, ...) __attribute__((weak)); +extern void *g_object_get_data(void *object, const char *key) __attribute__((weak)); +extern void g_object_set_data(void *object, const char *key, void *data) __attribute__((weak)); +extern void *dlsym(void *handle, const char *symbol) __attribute__((weak)); +extern unsigned gtk_key_snooper_install(int (*snooper)(void *, void *, void *), void *data) __attribute__((weak)); +extern void *gtk_widget_get_toplevel(void *widget) __attribute__((weak)); +extern void gtk_container_forall(void *container, void (*callback)(void *, void *), void *data) __attribute__((weak)); +extern unsigned long gtk_container_get_type(void) __attribute__((weak)); +extern unsigned long webkit_web_view_get_type(void) __attribute__((weak)); +extern int g_type_check_instance_is_a(void *instance, unsigned long type) __attribute__((weak)); +extern const char *webkit_web_view_get_uri(void *view) __attribute__((weak)); +extern void webkit_web_view_run_javascript(void *view, const char *script, void *cancellable, void *callback, + void *data) __attribute__((weak)); +extern WebKitUserScript *webkit_user_script_new(const char *source, int frames, int time, + const char *const *allow, const char *const *block) __attribute__((weak)); +extern void webkit_user_script_unref(WebKitUserScript *script) __attribute__((weak)); + +static const char NAV_SCRIPT[] = + "(()=>{let open=-1e9,arrowAt=-1e9,ringed=null,ringOutline='',ringOffset='',settleTimer=0,settling=false,redirecting=false;" + "const shown=()=>[...document.querySelectorAll('[role=dialog],[role=alertdialog],[aria-modal=true],[role=menu]')]" + ".some(e=>e.getClientRects().length);" + "const hidden=e=>{const r=e.getBoundingClientRect();if(!r.width||!r.height)return true;" + "for(let n=e;n&&n.nodeType===1;n=n.parentElement){const s=getComputedStyle(n);" + "if(s.visibility==='hidden'||+s.opacity<0.1)return true;}return false;};" + "const windowButton=e=>/^(Minimize|Maximize|Restore|Close) window$/.test(e.getAttribute('aria-label')||'');" + "const editing=e=>!!e&&e.nodeType===1&&(e.isContentEditable||" + "e.matches('input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]),textarea,select'));" + "const mainNav=()=>[...document.querySelectorAll('nav')].filter(n=>n.querySelectorAll('a[href]').length>1&&!hidden(n))" + ".sort((a,b)=>a.getBoundingClientRect().y-b.getBoundingClientRect().y)[0];" + "const first=nav=>{const below=nav?nav.getBoundingClientRect().bottom:0,all=[];" + "for(const e of document.querySelectorAll('a[href],button,input,[role=button],[tabindex]')){" + "if(e.tabIndex<0||(nav&&nav.contains(e)))continue;const r=e.getBoundingClientRect();" + "if(r.top<below||r.bottom>innerHeight||windowButton(e)||hidden(e))continue;all.push({e,r});}" + "const big=all.filter(c=>c.r.width*c.r.height>=12000),list=big.length?big:all;" + "const key=c=>Math.round(c.r.top/8)*1e5+c.r.left;" + "list.sort((a,b)=>key(a)-key(b));return list.length?list[0].e:null;};" + "const big=e=>{const r=e.getBoundingClientRect();return r.width*r.height>=12000;};" + "const toward=(from,key,nav,small)=>{const r=from.getBoundingClientRect(),cx=r.left+r.width/2,cy=r.top+r.height/2;let best=null,score=1e9;" + "for(const c of document.querySelectorAll('a[href],button,[role=button],[tabindex]')){if(c===from||c.tabIndex<0||(nav&&nav.contains(c))||from.contains(c)||c.contains(from))continue;" + "const q=c.getBoundingClientRect();if(!small&&q.width*q.height<12000)continue;const qx=q.left+q.width/2,qy=q.top+q.height/2;let along,across;" + "if(key==='ArrowDown'){along=q.top-r.bottom;across=qx-cx;}else if(key==='ArrowUp'){along=r.top-q.bottom;across=qx-cx;}" + "else if(key==='ArrowRight'){along=q.left-r.right;across=qy-cy;}else{along=r.left-q.right;across=qy-cy;}" + "if(along<-4)continue;const d=Math.max(along,0)+2*Math.abs(across);if(d<score&&!windowButton(c)&&!hidden(c)){score=d;best=c;}}return best;};" + "const settle=()=>{const a=document.activeElement;if(editing(a)||shown())return;const nav=mainNav(),list=[];" + "for(const c of document.querySelectorAll('a[href],button,[role=button],[tabindex]')){if(c.tabIndex<0||(nav&&nav.contains(c)))continue;" + "const r=c.getBoundingClientRect();if(r.width*r.height>=12000&&r.top>=0&&r.left>=0&&r.bottom<=innerHeight&&r.right<=innerWidth)list.push({c,r});}" + "const key=x=>Math.round(x.r.top/8)*1e5+x.r.left;list.sort((x,y)=>key(x)-key(y));" + "for(const {c,r} of list){const hit=document.elementFromPoint(r.left+r.width/2,r.top+8);" + "if(hit&&(hit===c||c.contains(hit))&&!hidden(c)){arrowAt=performance.now();c.focus({preventScroll:true});return;}}};" + "const arm=()=>{clearTimeout(settleTimer);settleTimer=setTimeout(()=>{settling=false;settle();},200);};" + "addEventListener('scroll',()=>{if(settling)arm();},true);" + "const unring=()=>{if(ringed){ringed.style.outline=ringOutline;ringed.style.outlineOffset=ringOffset;ringed=null;}};" + "addEventListener('keydown',e=>{const k=e.key||'';if(k.startsWith('Arrow')){arrowAt=e.timeStamp;const a=document.activeElement;" + "if(!editing(a)&&!shown()){const nav=mainNav();" + "if(!a||a===document.body||hidden(a)||(k==='ArrowDown'&&nav&&nav.contains(a))){const f=first(nav);" + "if(f){e.preventDefault();e.stopImmediatePropagation();f.focus();f.scrollIntoView({block:'nearest'});}}" + "else if(big(a)&&!e.ctrlKey&&!e.altKey){let t=toward(a,k,nav);" + "if(!t&&(k==='ArrowUp'||k==='ArrowDown'))t=toward(a,k,nav,true);" + "if(t){e.preventDefault();e.stopImmediatePropagation();t.focus({preventScroll:true});t.scrollIntoView({block:'nearest',inline:'nearest'});}}}}" + "if(k==='Escape')open=shown()?e.timeStamp:-1e9;" + "if(e.code==='F13'){e.preventDefault();e.stopImmediatePropagation();settling=true;arm();}},true);" + "addEventListener('keydown',e=>{if(e.key!=='BrowserBack')return;e.preventDefault();e.stopImmediatePropagation();" + "const a=document.activeElement;if(editing(a)){a.blur();return;}" + "if(e.timeStamp-open>500)history.back();},true);" + "window.droiddeckTab=step=>{" + "const nav=mainNav();if(!nav)return;" + "const tabs=[...nav.querySelectorAll('a[href]')].filter(a=>!hidden(a)),part=p=>p.split('/')[1]||'';" + "const at=tabs.findIndex(a=>part(new URL(a.href).pathname)===part(location.pathname));" + "const to=tabs[Math.min(tabs.length-1,Math.max(0,at+step))];" + "if(at>=0&&to!==tabs[at]){to.click();to.blur();}};" + "const redirect=n=>{redirecting=true;try{n.focus();}finally{redirecting=false;}};" + "addEventListener('focusout',unring,true);" + "addEventListener('focusin',e=>{const t=e.target;if(!(t instanceof Element)||e.timeStamp-arrowAt>1000)return;" + "const back=e.relatedTarget instanceof Element&&e.relatedTarget.focus?e.relatedTarget:null;" + "if(!redirecting&&windowButton(t)){if(back)redirect(back);return;}" + "if(!redirecting&&hidden(t)){let a=t.parentElement;" + "while(a&&!(a.matches('a[href],button,[role=button],[tabindex]')&&!hidden(a)))a=a.parentElement;" + "if(a)redirect(a);else if(back)redirect(back);return;}" + "unring();ringed=(t.matches('input,textarea')&&t.closest('label'))||t;" + "ringOutline=ringed.style.outline;ringOffset=ringed.style.outlineOffset;" + "ringed.style.outline='3px solid #fff';ringed.style.outlineOffset='2px';},true);})();"; + +typedef struct { + int type; + void *window; + signed char send_event; + unsigned time; + unsigned state; + unsigned keyval; +} KeyEvent; + +static void *launcher_view; + +static void find_launcher_view(void *widget, void *data) +{ + (void)data; + if (launcher_view) + return; + if (g_type_check_instance_is_a(widget, webkit_web_view_get_type())) { + const char *uri = webkit_web_view_get_uri(widget); + const char *prefix = "tauri:"; + while (uri && *prefix && *uri == *prefix) { + uri++; + prefix++; + } + if (uri && !*prefix) + launcher_view = widget; + } else if (g_type_check_instance_is_a(widget, gtk_container_get_type())) { + gtk_container_forall(widget, find_launcher_view, 0); + } +} + +static int switch_tab(void *grab, void *event_data, void *data) +{ + KeyEvent *event = event_data; + (void)data; + if (!grab || event->type != 8 || !(event->state & 4) || (event->keyval != 0xff55 && event->keyval != 0xff56)) + return 0; + launcher_view = 0; + find_launcher_view(gtk_widget_get_toplevel(grab), 0); + if (!launcher_view) + return 0; + webkit_web_view_run_javascript(launcher_view, event->keyval == 0xff56 ? "window.droiddeckTab&&droiddeckTab(1)" + : "window.droiddeckTab&&droiddeckTab(-1)", + 0, 0, 0); + return 1; +} + +static void watch_tab_keys(void) +{ + static int watching; + if (watching || !gtk_key_snooper_install || !gtk_widget_get_toplevel || !gtk_container_forall || + !gtk_container_get_type || !webkit_web_view_get_type || !g_type_check_instance_is_a || + !webkit_web_view_get_uri || !webkit_web_view_run_javascript) + return; + watching = 1; + gtk_key_snooper_install(switch_tab, 0); +} + +static void set(WebKitSettings *settings, const char *setter, const char *property, int value) +{ + static int setting; + if (setting) { + void (*next)(WebKitSettings *, int) = dlsym ? (void (*)(WebKitSettings *, int))dlsym((void *)-1l, setter) : 0; + if (next) + next(settings, value); + return; + } + if (!g_object_set) + return; + setting = 1; + g_object_set(settings, property, value, "enable-smooth-scrolling", 0, "enable-spatial-navigation", 1, (const char *)0); + setting = 0; +} + +#define SETTER(name, property) \ + __attribute__((visibility("default"))) void webkit_settings_set_##name(WebKitSettings *settings, int value) \ + { \ + set(settings, "webkit_settings_set_" #name, property, value); \ + } + +SETTER(enable_javascript, "enable-javascript") +SETTER(enable_developer_extras, "enable-developer-extras") +SETTER(enable_webgl, "enable-webgl") +SETTER(enable_webaudio, "enable-webaudio") +SETTER(enable_page_cache, "enable-page-cache") +SETTER(javascript_can_access_clipboard, "javascript-can-access-clipboard") +SETTER(javascript_can_open_windows_automatically, "javascript-can-open-windows-automatically") +SETTER(enable_back_forward_navigation_gestures, "enable-back-forward-navigation-gestures") + +__attribute__((visibility("default"))) void webkit_user_content_manager_add_script(WebKitUserContentManager *manager, + WebKitUserScript *script) +{ + static void (*next)(WebKitUserContentManager *, WebKitUserScript *); + if (!next && dlsym) + next = (void (*)(WebKitUserContentManager *, WebKitUserScript *))dlsym((void *)-1l, "webkit_user_content_manager_add_script"); + if (!next) + return; + watch_tab_keys(); + if (g_object_get_data && g_object_set_data && webkit_user_script_new && webkit_user_script_unref && + !g_object_get_data(manager, "droiddeck-nav")) { + g_object_set_data(manager, "droiddeck-nav", (void *)1); + WebKitUserScript *nav = webkit_user_script_new(NAV_SCRIPT, 1, 0, 0, 0); + if (nav) { + next(manager, nav); + webkit_user_script_unref(nav); + } + } + next(manager, script); +} diff --git a/tools/linuxfs/overlay/usr/bin/jupiter-biosupdate b/tools/linuxfs/overlay/usr/bin/jupiter-biosupdate index 7feebb74ab..039e4d0069 100755 --- a/tools/linuxfs/overlay/usr/bin/jupiter-biosupdate +++ b/tools/linuxfs/overlay/usr/bin/jupiter-biosupdate @@ -1,3 +1,2 @@ #!/bin/sh -# No Deck BIOS here. The client calls this in Deck mode; a clean exit is "nothing to do". exit 0 diff --git a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/jupiter-biosupdate b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/jupiter-biosupdate index 7feebb74ab..039e4d0069 100755 --- a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/jupiter-biosupdate +++ b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/jupiter-biosupdate @@ -1,3 +1,2 @@ #!/bin/sh -# No Deck BIOS here. The client calls this in Deck mode; a clean exit is "nothing to do". exit 0 diff --git a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/jupiter-dock-updater b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/jupiter-dock-updater index dadcac7146..4dfb4b862f 100755 --- a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/jupiter-dock-updater +++ b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/jupiter-dock-updater @@ -1,8 +1,4 @@ #!/bin/sh -# No Deck dock here. The client runs this with --check at start (systemdockmanager.txt) and reads -# the exit code: 0 with nothing printed is taken as "an update is available" and puts a Dock -# Firmware Update row with an Apply button in Settings > System. 7, SteamOS's "nothing to do", -# is read as up to date (state 2 in that log, against state 4 for exit 0; both seen on device). case "${1:-}" in --check) exit 7 ;; esac diff --git a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-priv-write b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-priv-write index c875c2474f..039e4d0069 100755 --- a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-priv-write +++ b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-priv-write @@ -1,6 +1,2 @@ #!/bin/sh -# steamos-priv-write <path> <value>: how the client in Deck mode sets brightness, TDP and fan -# controls through sysfs. None of those paths is writable from an app on Android, and the app -# already sets the panel's mode and the game-tier power policy from the Android side. Accept -# and do nothing, so the client never logs a failed helper. exit 0 diff --git a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-select-branch b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-select-branch index 6f0c9d8062..501e630b19 100755 --- a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-select-branch +++ b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-select-branch @@ -1,8 +1,4 @@ #!/bin/sh -# The SteamOS update-branch selector the client calls in Deck mode. The session forces the client -# branch on the command line and keeps package/beta in step with it, so a selection here would -# only start the restart loop the session script describes. List and report the stable branch; -# accept and ignore a choice. case "${1:-}" in -l) printf 'rel\n' ;; -c) printf 'rel\n' ;; diff --git a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-set-timezone b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-set-timezone index f60c992817..039e4d0069 100755 --- a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-set-timezone +++ b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-set-timezone @@ -1,3 +1,2 @@ #!/bin/sh -# The session carries the device's time zone in TZ already; the client's own setter is a no-op. exit 0 diff --git a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-update b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-update index fa99b087a1..bc2d00e8e5 100755 --- a/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-update +++ b/tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/steamos-update @@ -1,8 +1,4 @@ #!/bin/sh -# What the Steam client calls in Deck mode (from /usr/bin/steamos-polkit-helpers/, seen in its -# console log on device; a copy sits in /usr/bin as well) to look for a SteamOS update. There is no SteamOS -# here: the answer is "no update", which is exit 7 in SteamOS's convention, and the client moves -# on. --supports-duplicate-detection is a capability probe and answers yes. Staged from the apk. case "${1:-}" in --supports-duplicate-detection) exit 0 ;; esac diff --git a/tools/linuxfs/overlay/usr/bin/steamos-select-branch b/tools/linuxfs/overlay/usr/bin/steamos-select-branch index 6f0c9d8062..501e630b19 100755 --- a/tools/linuxfs/overlay/usr/bin/steamos-select-branch +++ b/tools/linuxfs/overlay/usr/bin/steamos-select-branch @@ -1,8 +1,4 @@ #!/bin/sh -# The SteamOS update-branch selector the client calls in Deck mode. The session forces the client -# branch on the command line and keeps package/beta in step with it, so a selection here would -# only start the restart loop the session script describes. List and report the stable branch; -# accept and ignore a choice. case "${1:-}" in -l) printf 'rel\n' ;; -c) printf 'rel\n' ;; diff --git a/tools/linuxfs/overlay/usr/bin/steamos-session-select b/tools/linuxfs/overlay/usr/bin/steamos-session-select index 871f67b489..eaac87341b 100644 --- a/tools/linuxfs/overlay/usr/bin/steamos-session-select +++ b/tools/linuxfs/overlay/usr/bin/steamos-session-select @@ -1,10 +1,4 @@ #!/bin/sh -# The SteamOS session switch. Big Picture's power menu runs it for "Switch to Desktop" (a Plasma -# session: "plasma", "plasma-wayland-persistent", ...) and waits for Game Mode to end; with nothing -# here it sat on "Switching to Desktop..." for ever. Here the desktop is DroidDeck's own: the app is -# asked for a desktop session with Steam's desktop client open in it (the request file -# droiddeck-steam-launch uses; the app ends this session and starts that one). Anything else - -# "gamescope", the session Game Mode already is - has nothing to do. echo "steamos-session-select: $*" >&2 case "${1:-}" in ""|gamescope) exit 0 ;; diff --git a/tools/linuxfs/overlay/usr/bin/steamos-update b/tools/linuxfs/overlay/usr/bin/steamos-update index f7536a443e..bc2d00e8e5 100755 --- a/tools/linuxfs/overlay/usr/bin/steamos-update +++ b/tools/linuxfs/overlay/usr/bin/steamos-update @@ -1,7 +1,4 @@ #!/bin/sh -# What the Steam client calls in Deck mode to look for a SteamOS update. There is no SteamOS -# here: the answer is "no update", which is exit 7 in SteamOS's convention, and the client moves -# on. --supports-duplicate-detection is a capability probe and answers yes. Staged from the apk. case "${1:-}" in --supports-duplicate-detection) exit 0 ;; esac diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-agent b/tools/linuxfs/overlay/usr/local/bin/droiddeck-agent index 0df6d53637..81d2ad5c04 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-agent +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-agent @@ -21,6 +21,7 @@ Requests: ping, exec, focus, cdp, quit. Each answer is {"ok": true, ...} or import base64 import json import math +import re import os import selectors import signal @@ -68,7 +69,6 @@ class AgentError(Exception): self.code = code -# --- X11: just enough of the protocol for root properties, the window tree and events --------- class X: """One connection to an Xwayland server. The rootfs has xprop but no python X library.""" @@ -178,6 +178,11 @@ class X: return list(struct.unpack("<%dI" % n, data)) return data + def cardinals(self, window, name, values): + self.s.sendall(struct.pack("<BBHIIIB3xI", 18, 0, 6 + len(values), window, + self.atom(name), self.atom("CARDINAL"), 32, len(values)) + + struct.pack("<%dI" % len(values), *values)) + def windows(x): """Top-level windows that are mapped or carry an app id: what gamescope picks focus from.""" @@ -250,6 +255,67 @@ def focus_snapshot(): return snap +STEAM_APP_CLASS = re.compile(r"steam_app_(\d+)$") + + +def tag_game_windows(snap): + if os.environ.get("BL_STEAM_CLIENT_ARCH") != "x86_64": + return False + tagged = False + for display, wins in snap.get("displays", {}).items(): + if display == os.environ.get("DISPLAY"): + continue + for win in wins: + match = STEAM_APP_CLASS.match(win.get("class") or "") + if not match or win.get("appId") or win.get("map") != "viewable" or win.get("overrideRedirect"): + continue + try: + done = subprocess.run(["xprop", "-display", display, "-id", str(win["window"]), "-f", "STEAM_GAME", "32c", + "-set", "STEAM_GAME", match.group(1)], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=5).returncode == 0 + except (OSError, subprocess.TimeoutExpired): + done = False + log("game window %s on %s tagged STEAM_GAME=%s: %s" % (win["window"], display, match.group(1), "ok" if done else "failed")) + tagged = tagged or done + return tagged + + +def vr_scene_app(path=Path('/run/droiddeck/droiddeck-steamvr/scene-focus.json'), proc=Path('/proc')): + """Only a live SteamVR scene with its dashboard hidden may claim game focus.""" + try: + state = json.loads(path.read_text()) + server, scene = int(state['serverPid']), int(state['scenePid']) + if server <= 0 or scene <= 0 or state['dashboard'] is not False: + return None + if (proc / str(server) / 'comm').read_text().strip() != 'vrserver': + return None + for entry in (proc / str(scene) / 'environ').read_bytes().split(b'\0'): + if entry.startswith(b'SteamAppId='): + app = int(entry.split(b'=', 1)[1]) + return app if 0 < app < 2**32 else None + except (OSError, ValueError, TypeError, KeyError): + pass + return None + + +class VrSceneFocus: + def __init__(self): + self.original = None + self.written = None + + def order(self, current, focusable, app): + if app is None or app not in focusable: + restore = self.original if self.written == current else None + self.original = self.written = None + return restore + if current and current[0] == app: + return None + if self.original is None: + self.original = list(current) + self.written = [app] + [item for item in current if item != app] + return self.written + + class FocusWatcher(threading.Thread): """Rewrites focus.json when gamescope's focus properties change, and every few seconds when the windows do (a window can change without any root property moving).""" @@ -260,19 +326,35 @@ class FocusWatcher(threading.Thread): self.changed = threading.Event() self.last = None self.seq = 0 + self.vr_focus = VrSceneFocus() def run(self): threading.Thread(target=self.listen, daemon=True, name="focus-events").start() + last_app, last_snapshot = None, 0 while True: - self.changed.wait(timeout=5) + notified = self.changed.wait(timeout=0.5) self.changed.clear() - time.sleep(0.2) # let a burst of property changes settle + app = vr_scene_app() + if not notified and app == last_app and time.monotonic() - last_snapshot < 5: + continue + last_app, last_snapshot = app, time.monotonic() + time.sleep(0.2) try: snap = focus_snapshot() + order = self.vr_focus.order(snap.get('baselayerAppIds', []), snap.get('focusableApps', []), app) + if order is not None: + x = X(os.environ['DISPLAY']) + try: + x.cardinals(x.root, 'GAMESCOPECTRL_BASELAYER_APPID', order) + finally: + x.close() except (OSError, AgentError) as e: log("focus snapshot failed: %s" % e) time.sleep(2) continue + if tag_game_windows(snap): + self.changed.set() + continue body = {k: v for k, v in snap.items() if k != "t"} if body == self.last: continue @@ -286,9 +368,7 @@ class FocusWatcher(threading.Thread): try: x = X(os.environ["DISPLAY"]) wanted = {x.atom(name) for name in FOCUS_PROPS} - x.select(x.root, 0x400000) # PropertyChangeMask - # Waits for events as long as there are none: the connect timeout left in place - # here dropped and remade the connection, and took a snapshot, every few seconds. + x.select(x.root, 0x400000) x.s.settimeout(None) self.changed.set() while True: @@ -300,7 +380,6 @@ class FocusWatcher(threading.Thread): time.sleep(2) -# --- Steam client DevTools (CDP) ----------------------------------------------------------------- class WebSocket: """A minimal RFC 6455 client: text frames out, text frames in. Enough for CDP.""" @@ -384,7 +463,7 @@ class WebSocket: op = b0 & 0x0F if op == 8: raise OSError("DevTools closed the WebSocket") - if op == 9: # ping + if op == 9: continue if op in (0, 1, 2): message += data @@ -453,7 +532,108 @@ def cdp_eval(agent_dir, expression, target=None, await_promise=True, timeout=15) ws.close() -# --- Game processes ------------------------------------------------------------------------------ +def steam_selection(agent_dir, timeout=5): + result = cdp_eval( + agent_dir, + """(() => { + let node = document.activeElement; + while (node) { + for (const name of ["data-id", "data-appid"]) { + const value = node.getAttribute?.(name); + if (/^[1-9][0-9]{0,9}$/.test(value || "")) { + const appId = Number(value); + if (Number.isSafeInteger(appId) && appId <= 4294967295) return value; + } + } + node = node.parentElement; + } + return null; + })()""", + target="Steam Big Picture Mode", + timeout=timeout, + ) + value = result.get("value") + if value is None: + return {"appId": None} + if not isinstance(value, str) or not value.isdigit() or not 0 < int(value) <= 4294967295: + raise AgentError("INVALID_SELECTION", "Steam returned an invalid selected app id") + return {"appId": int(value)} + + +def steam_shortcut_app_id(game_id): + """Return the 32-bit app id in Steam's shortcut CGameID form, or None for other ids. + + DroidDeck's shortcut IDs are `(appid << 32) | 0x02000000`. The URL still needs that full + CGameID for RunGame; the app-details API separately needs the unsigned 32-bit app id. + """ + if not isinstance(game_id, str) or not game_id.isascii() or not game_id.isdigit(): + return None + try: + game_id_value = int(game_id) + except ValueError: + return None + if str(game_id_value) != game_id or not 0 < game_id_value <= 0xFFFFFFFFFFFFFFFF: + return None + if game_id_value <= 0xFFFFFFFF or game_id_value & 0xFFFFFFFF != 0x02000000: + return None + app_id = game_id_value >> 32 + return app_id if 0 < app_id <= 0xFFFFFFFF else None + + +def wait_for_steam_shortcut_overview(agent_dir, game_id, timeout=45): + """Wait until Steam can map a shortcut CGameID to its 32-bit app overview.""" + app_id = steam_shortcut_app_id(game_id) + if app_id is None: + return {"supported": False, "ready": False} + + timeout = request_timeout({"timeout": timeout}, 45) + deadline = time.monotonic() + timeout + expression = """(() => { + const store = globalThis.appStore; + if (typeof store?.GetAppOverviewByGameID !== 'function') return null; + const overview = store.GetAppOverviewByGameID(%s); + return overview == null ? null : String(overview.appid); + })()""" % json.dumps(game_id) + while True: + remaining = deadline - time.monotonic() + if remaining <= 0: + break + try: + result = cdp_eval(agent_dir, expression, await_promise=False, + timeout=min(5, max(0.25, remaining))) + if result.get("value") == str(app_id): + return {"supported": True, "ready": True, "appId": app_id} + except AgentError as error: + if error.code not in ("NO_DEVTOOLS", "DEVTOOLS_UNREACHABLE", "NO_TARGET", "TIMEOUT"): + raise + time.sleep(min(0.25, max(0, deadline - time.monotonic()))) + raise AgentError("STEAM_OVERVIEW_TIMEOUT", "Steam did not load shortcut app overview %d" % app_id) + + +def steam_shortcut_state(agent_dir, game_id, timeout=6): + if steam_shortcut_app_id(game_id) is None: + return "not-shortcut" + timeout = request_timeout({"timeout": timeout}, 6) + deadline = time.monotonic() + timeout + expression = """(() => { + const store = globalThis.appStore; + if (typeof store?.GetAppOverviewByGameID !== 'function' || !store.m_bIsInitialized) return 'loading'; + if (store.GetAppOverviewByGameID(%s) != null) return 'ready'; + return store.allApps.some(app => app.app_type == 1073741824) ? 'missing' : 'loading'; + })()""" % json.dumps(game_id) + state = "loading" + while True: + try: + state = cdp_eval(agent_dir, expression, await_promise=False, + timeout=min(5, max(0.25, deadline - time.monotonic()))).get("value") or "loading" + except AgentError as error: + if error.code not in ("NO_DEVTOOLS", "DEVTOOLS_UNREACHABLE", "NO_TARGET", "TIMEOUT"): + raise + state = "loading" + if state == "ready" or time.monotonic() >= deadline: + return state + time.sleep(min(0.5, max(0, deadline - time.monotonic()))) + def game_pids(app_id): """Our processes started for this Steam app (Steam sets SteamAppId / SteamGameId in their @@ -510,7 +690,38 @@ def quit_game(agent_dir, app_id, timeout): return {"appId": int(app_id), "steps": steps, "remaining": game_pids(app_id)} -# --- Requests ------------------------------------------------------------------------------------ + +VR_HELPER = "/usr/local/bin/droiddeck-steamvr" +VR_ACTIONS = ("status", "install", "start", "stop") + + +def steamvr(req): + """Cardboard mode's SteamVR: a fixed helper with four actions, unlike exec (no command line from + the request). install downloads 571 MB, so it runs detached and status reports it.""" + action = req.get("action", "status") + if action not in VR_ACTIONS: + raise AgentError("INVALID_REQUEST", "vr action must be one of " + ", ".join(VR_ACTIONS)) + helper = os.environ.get("DROIDDECK_VR_HELPER", VR_HELPER) + if not os.path.isfile(helper): + raise AgentError("UNAVAILABLE", "this runtime has no " + helper) + if action == "install": + state = Path(os.environ.get("XDG_RUNTIME_DIR", "/tmp")) / "droiddeck-steamvr" + state.mkdir(parents=True, exist_ok=True) + with open(state / "install.log", "ab") as log_file: + subprocess.Popen(["sh", helper, "install"], stdin=subprocess.DEVNULL, stdout=log_file, + stderr=subprocess.STDOUT, start_new_session=True) + return {"action": action, "started": True} + done = subprocess.run(["sh", helper, action], stdin=subprocess.DEVNULL, capture_output=True, + timeout=request_timeout(req, 30)) + out = done.stdout.decode("utf-8", "replace").strip() + result = {"action": action, "exitCode": done.returncode, "output": out[-2000:]} + if action == "status": + for part in out.split(): + key, _, value = part.partition("=") + if key in ("installed", "running", "installing", "driver"): + result[key] = value == "1" + return result + def run_exec(req): argv = req.get("argv") @@ -624,8 +835,12 @@ def handle(agent_dir, req): raise AgentError("INVALID_REQUEST", "cdp eval needs an expression") return cdp_eval(agent_dir, expression, req.get("target"), bool(req.get("awaitPromise", True)), request_timeout(req, 15)) + if kind == "steam-selection": + return steam_selection(agent_dir, request_timeout(req, 5)) if kind == "quit": return quit_game(agent_dir, req.get("appId"), request_timeout(req, 15)) + if kind == "vr": + return steamvr(req) raise AgentError("UNKNOWN_REQUEST", "Unknown agent request '%s'" % kind) @@ -652,7 +867,7 @@ def answer(agent_dir, path): result = dict(handle(agent_dir, req), ok=True) except AgentError as e: result = {"ok": False, "error": {"code": e.code, "message": str(e)}} - except Exception as e: # an answer of some kind always goes back + except Exception as e: result = {"ok": False, "error": {"code": "AGENT_FAILED", "message": "%s: %s" % (type(e).__name__, e)}} write_json(agent_dir / "resp" / (rid + ".json"), result) @@ -682,6 +897,43 @@ def main(argv): if not base: print("BL_LAUNCH_DIR is not set", file=sys.stderr) return 2 + if argv and argv[0] == "--wait-steam-shortcut-overview": + if len(argv) not in (2, 3): + print("usage: droiddeck-agent --wait-steam-shortcut-overview <cgameid> [timeout-seconds]", file=sys.stderr) + return 2 + timeout = argv[2] if len(argv) == 3 else 45 + try: + prepared = wait_for_steam_shortcut_overview(Path(base) / "agent", argv[1], timeout) + except (AgentError, OSError, ValueError) as error: + print("droiddeck-agent: shortcut overview was not ready: %s" % error, file=sys.stderr) + return 1 + if not prepared["supported"]: + print("droiddeck-agent: id is not a DroidDeck shortcut CGameID") + return 3 + print("droiddeck-agent: Steam overview is ready for shortcut app %d" % prepared["appId"]) + return 0 + if argv and argv[0] == "--steam-asleep": + expression = """(() => { + const store = globalThis.SuspendResumeStore; + return store ? (store.m_bSuspending ? 'yes' : 'no') : 'unknown'; + })()""" + try: + state = cdp_eval(Path(base) / "agent", expression, await_promise=False, timeout=3).get("value") or "unknown" + except (AgentError, OSError, ValueError): + state = "unknown" + print(state) + return {"yes": 0, "no": 5}.get(state, 1) + if argv and argv[0] == "--steam-shortcut-state": + if len(argv) not in (2, 3): + print("usage: droiddeck-agent --steam-shortcut-state <cgameid> [timeout-seconds]", file=sys.stderr) + return 2 + try: + state = steam_shortcut_state(Path(base) / "agent", argv[1], argv[2] if len(argv) == 3 else 6) + except (AgentError, OSError, ValueError) as error: + print("droiddeck-agent: could not ask the client about the shortcut: %s" % error, file=sys.stderr) + return 1 + print(state) + return {"ready": 0, "missing": 4, "not-shortcut": 3}.get(state, 1) serve(Path(base) / "agent", focus="--no-focus" not in argv) return 0 diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-appimage-run b/tools/linuxfs/overlay/usr/local/bin/droiddeck-appimage-run index 847c272b6a..20e6bbba43 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-appimage-run +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-appimage-run @@ -1,33 +1,17 @@ #!/bin/bash -# An AppImage imported from the front end (AppImageManager), extracted once at import into -# /opt/appimages/user/<id>/app -# and started from there: proot has no FUSE to mount the image, and extracting it at every -# start (APPIMAGE_EXTRACT_AND_RUN) would cost the whole image in /tmp each time. -# droiddeck-appimage-run /opt/appimages/user/<id> [args...] set -u dir=${1:?usage: droiddeck-appimage-run <imported AppImage directory> [args...]} shift export APPDIR=$dir/app -# APPIMAGE is left unset on purpose: with it an app believes it runs from an image file and offers -# to add itself to the menu (DuckStation) or update the file in place - DroidDeck already does the -# one, and there is no image file for the other. unset APPIMAGE export ARGV0=$(cat "$dir/name" 2>/dev/null || basename "$dir") if [ ! -x "$APPDIR/AppRun" ]; then echo "droiddeck-appimage-run: $APPDIR/AppRun is missing; import the AppImage again" >&2 exit 127 fi -# Browsers sandbox their own children with namespaces and a setuid helper, neither of which proot -# can give them (the Flatpak sandboxes get the same; see BwrapSpawner): Firefox and its forks (Zen, -# LibreWolf) by these switches, Electron and Chromium builds by --no-sandbox. Chromium on Wayland -# also asks the render node for a DRM version KGSL cannot give, so with an X server up it stays on -# X11, which it picks from the session type. export MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_DISABLE_GMP_SANDBOX=1 MOZ_DISABLE_RDD_SANDBOX=1 export MOZ_DISABLE_SOCKET_PROCESS_SANDBOX=1 MOZ_DISABLE_UTILITY_SANDBOX=1 -# Android 16 refuses Firefox the size seal on a tab's shared memory; see droiddeck-desktop. export MOZ_SHM_NO_SEALS=1 -# sharun images start the app through their own ld.so, patched not to read /etc/ld.so.preload, and -# drop LD_PRELOAD unless allowed: without this the app never gets the session's pads. if [ -s /etc/ld.so.preload ]; then preload=$(tr -s '\n' ':' < /etc/ld.so.preload) export LD_PRELOAD="${preload%:}${LD_PRELOAD:+:$LD_PRELOAD}" SHARUN_ALLOW_LD_PRELOAD=1 @@ -74,8 +58,6 @@ fi echo "== appimage $ARGV0 ($APPDIR) ${flags[*]} FEX $fex Qt $qt${QT_QPA_PLATFORM:+ ($QT_QPA_PLATFORM)}" cd "$APPDIR" || exit 1 started=$(mktemp "${TMPDIR:-/tmp}/droiddeck-appimage.XXXXXX") -# Apps expect a session bus; Electron's main process traps (SIGTRAP) on an address it cannot -# parse. A run mode has none, so one is started for the app, as for Flatpak apps. case ${DBUS_SESSION_BUS_ADDRESS:-} in unix:*) "${run[@]}" "${flags[@]}" "$@" ;; *) unset DBUS_SESSION_BUS_ADDRESS @@ -100,10 +82,6 @@ if [ "$rc" -ne 0 ] && [ -n "$started" ]; then done fi rm -f "$started" -# The program a session was started for may hand over to another process and exit: Electron apps -# relaunch themselves (Obsidian on its first start), launchers fork their real program. The -# session ends with this script, and takes the rest with it - so it waits while anything running -# from the image is still up. image_running() { local p exe arg cwd for p in /proc/[0-9]*; do diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-bwrap b/tools/linuxfs/overlay/usr/local/bin/droiddeck-bwrap index 5a3a73951f..909056fcd5 100644 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-bwrap +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-bwrap @@ -1,17 +1,4 @@ #!/usr/bin/python3 -# bubblewrap for Flatpak (FLATPAK_BWRAP), in a runtime that cannot have it. -# -# bwrap builds each sandbox from mount namespaces, which Android gives no app. proot gives the same -# picture - Flatpak's runtime as /usr, the app as /app, host paths bound where Flatpak asks - but a -# proot nested inside the session's proot runs every system call through two tracers, some thirty -# times slower on a program's start. So a sandbox is described to the app instead, over a socket -# only this app's uid may use, and the app starts it as a proot of its own beside the session's -# (BwrapSpawner). This process stands in for the sandbox until it ends: its output, its pid for -# --info-fd, and its exit status come back here. -# -# Sandboxes that remap nothing - Flatpak's install triggers (`--ro-bind / /` and the directory they -# update) and the D-Bus proxy (every top-level directory bound onto itself) - need no proot at all -# and run here directly, with the file descriptors Flatpak handed them. import base64 import json import os @@ -20,10 +7,9 @@ import socket import struct import sys -SOCKET = "\0com.droiddeck.launcher.bwrap" +SOCKET = "\0" + os.environ.get("DROIDDECK_BWRAP_SOCKET", "com.droiddeck.launcher.bwrap") VERSION = "bubblewrap 0.11.0 (droiddeck)" -# Options and how many arguments each takes; bwrap(1). NO_ARG = { "--unshare-user", "--unshare-user-try", "--unshare-ipc", "--unshare-pid", "--unshare-net", "--unshare-uts", "--unshare-cgroup", "--unshare-cgroup-try", "--unshare-all", "--share-net", @@ -68,7 +54,6 @@ def expand(argv): a = argv[i] if a == "--args" and i + 1 < len(argv): data = read_fd(int(argv[i + 1])) - # Each argument ends in a NUL; an empty one (--setenv LD_LIBRARY_PATH "") is kept. parts = data.split(b"\0") if parts and parts[-1] == b"": parts.pop() @@ -155,7 +140,6 @@ def parse(argv): elif a == "--dev": s.ops.append({"t": "dev", "dest": args[0]}) elif a in ("--seccomp", "--add-seccomp-fd"): - # proot is the sandbox; there is no filter to install under it. os.close(int(args[0])) elif a == "--block-fd": read_fd(int(args[0])) @@ -165,8 +149,6 @@ def parse(argv): s.info_fds.append(int(args[0])) elif a == "--json-status-fd": s.json_fds.append(int(args[0])) - # Everything else - namespaces, capabilities, labels, locks, --remount-ro, --chmod - has - # nothing to act on under proot. if not s.command: sys.stderr.write("bwrap: No command specified\n") sys.exit(1) @@ -196,7 +178,6 @@ def remaps_nothing(s): if not os.path.islink(op["dest"]) or os.readlink(op["dest"]) != op["target"]: return False elif t == "file": - # The D-Bus proxy's /.flatpak-info names the app to the bus; nothing here reads it. if op["dest"] != "/.flatpak-info": return False elif t == "dir": @@ -258,7 +239,6 @@ def run_by_app(s): for op in s.ops: op = dict(op) if op["t"] == "bind": - # The app resolves no guest symlinks; hand it the path they lead to. op["src"] = real(op["src"]) if op["t"] == "file": op["data"] = base64.b64encode(op["data"]).decode() @@ -274,7 +254,6 @@ def run_by_app(s): sys.stderr.write("bwrap: DroidDeck is not answering (%s); open DroidDeck and try again\n" % e) sys.exit(1) send(sock, b"R", json.dumps(request).encode()) - # This process is the sandbox as far as Flatpak is concerned: ended, it takes the sandbox down. for sig in (signal.SIGTERM, signal.SIGINT, signal.SIGHUP): signal.signal(sig, lambda *_: os._exit(128 + 15)) status = 1 diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-bookmarks b/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-bookmarks index 865f7e3b68..28bdd8ac54 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-bookmarks +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-bookmarks @@ -29,7 +29,7 @@ def steam_libraries(home, data): try: selected = {Path(e["path"]): str(e["label"]) for e in json.loads(Path(listing).read_text())} except (OSError, ValueError, KeyError, TypeError): - pass # Fall back to the client's registered libraries if the app's list is unreadable. + pass vdf = steam / "steamapps/libraryfolders.vdf" if vdf.is_file(): parser = runpy.run_path(str(Path(__file__).with_name("droiddeck-steam-ui-scale"))) @@ -76,7 +76,6 @@ def update_places(path, libraries): else: if not libraries: return - # Leave KDE's file version unset so it still adds its normal Home/Downloads/etc. places. root = ET.Element("xbel", {"version": "1.0"}) before = ET.tostring(root) seen = set() @@ -112,7 +111,6 @@ def update_places(path, libraries): def bookmarks_file(home, config): - # libfm-qt reads GTK3 bookmarks first, falling back to the legacy file when empty. current = config / "gtk-3.0/bookmarks" legacy = home / ".gtk-bookmarks" if current.is_file() and current.read_text(errors="surrogateescape").strip(): @@ -153,7 +151,6 @@ def main(): home = Path.home() config = Path(os.environ.get("XDG_CONFIG_HOME") or home / ".config") label = os.environ.get("BL_LIBRARY_LABEL") - # An unbound mount-point directory may remain from a previous session. available = bool(label) and (LIBRARY / "steamapps").is_dir() update_bookmark(bookmarks_file(home, config), label if available else None) data = Path(os.environ.get("XDG_DATA_HOME") or home / ".local/share") diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-clipboard b/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-clipboard index 0de5aff202..ccb7768c62 100644 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-clipboard +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-clipboard @@ -1,9 +1,5 @@ #!/bin/bash -# Plasma starts this after its nested Xwayland display is available. The session launcher still -# sees the outer compositor before startplasma, so starting its X11 helper there cannot work. [ -n "${BL_ANDROID_CLIPBOARD:-}" ] && [ -n "${DISPLAY:-}" ] || exit 0 -# The native helper dies with its parent. Keep this shell until it exits: Plasma's autostart -# launcher may itself exit immediately after starting us. /usr/local/bin/droiddeck-clipboard "$BL_ANDROID_CLIPBOARD" & child=$! trap 'kill "$child" 2>/dev/null' EXIT diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-games b/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-games index 0773601f05..d86d10b6cc 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-games +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-games @@ -1,19 +1,13 @@ #!/usr/bin/python3 -# The client's installed games, on the desktop. The client writes a menu entry per game itself -# (`steam steam://rungameid/<id>`, with the game's icon), which the desktop's `steam` shim hands to -# the app - so an entry of ours exists only for a game the client wrote none for. Plus two links in -# the home folder to the game files. Run at every desktop start; stale entries go. -# -# droiddeck-desktop-games [steam root] import os import re import sys HOME = os.environ.get("HOME", "/root") -STEAM_ROOT = sys.argv[1] if len(sys.argv) > 1 else os.path.join(HOME, ".local/share/Steam") -LIBRARIES = ((STEAM_ROOT, "Steam Games"), ("/mnt/droiddeck-sd", "SD Games")) -# The client's own tools and runtimes live in steamapps beside the games; they are not titles. A -# depot with a toolmanifest.vdf is one too (a runtime or a Proton), listed here or not. +X64 = os.environ.get("BL_STEAM_CLIENT_ARCH") == "x86_64" +CLIENT_HOME = (os.environ.get("BL_X64_HOME") or os.path.join(HOME, ".droiddeck-x64")) if X64 else HOME +STEAM_ROOT = sys.argv[1] if len(sys.argv) > 1 else os.path.join(CLIENT_HOME, ".local/share/Steam") +LIBRARIES = ((STEAM_ROOT, "Steam Games"), ("/mnt/droiddeck-sd/x86-64" if X64 else "/mnt/droiddeck-sd", "SD Games")) NOT_GAMES = {228980, 1070560, 1391110, 1493710, 1628350, 3127680, 4183110, 4185400, 4427310, 4628740} APPS_DIR = os.path.join(HOME, ".local/share/applications") PREFIX = "droiddeck-game-" @@ -41,7 +35,6 @@ def games(library): continue name = NAME.search(text) state = STATE.search(text) - # StateFlags 4 = fully installed; anything else is downloading, updating or broken. if not name or not state or (int(state.group(1)) & 4) == 0: continue installdir = INSTALLDIR.search(text) diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-window-rules b/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-window-rules index df6527ecd9..aaf304a8d2 100644 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-window-rules +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-desktop-window-rules @@ -1,5 +1,4 @@ #!/bin/bash -# Port the old desktop's melonDS window rule once; later window rules belong to the user. set -euo pipefail config=${XDG_CONFIG_HOME:-$HOME/.config} marker=$config/droiddeck-window-rules-v1 diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-epic b/tools/linuxfs/overlay/usr/local/bin/droiddeck-epic new file mode 100644 index 0000000000..45181cc3bb --- /dev/null +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-epic @@ -0,0 +1,1851 @@ +#!/usr/bin/python3 +import contextlib +import collections +import fcntl +import filecmp +import http.client +import io +import json +import os +import re +import runpy +import select +import shutil +import signal +import socket +import subprocess +import sys +import tarfile +import threading +import time +import urllib.error +import urllib.parse +import urllib.request + +HOME = os.environ.get("HOME") or "/root" +SELF = os.path.abspath(__file__) +BIN_DIR = os.path.dirname(SELF) +STATE = os.path.join(HOME, ".local", "share", "droiddeck-epic") +CURRENT = os.path.join(STATE, "current.json") +APPS = os.path.join(STATE, "app") +RUNTIMES = os.path.join(STATE, "runtime") +LOGS = os.path.join(STATE, "logs") +SHIMS = os.path.join(STATE, "bin") +FEX_CONFIG = os.path.join(STATE, "fex") +FEX_CACHE = os.path.join(HOME, ".cache", "droiddeck-epic") +DATA = os.path.join(HOME, ".local", "share", "com.epicgames.eglv2") +SETTINGS = os.path.join(DATA, "settings", "app-settings.json") +API_FILE = os.path.join(DATA, "api.json") +INSTALLATIONS = os.path.join(DATA, "installations.jsonl") +STEAM_RUN = re.compile(r"^steam://(?:rungameid|run)/([1-9][0-9]{0,19})(?:[/?].*)?$") +V1_MANIFESTS = os.path.join(HOME, ".local", "share", "Epic", "EpicGamesLauncher", "Data", "Manifests") +AUTH_FILE = os.path.join(DATA, "auth", "auth.json") +AUTH_ENV = "prod" +AUTO_SIGN_IN = os.path.join(STATE, "auto-sign-in") +SIGNED_OUT = os.path.join(STATE, "signed-out") +WEB_COOKIES = os.path.join(DATA, "cookies") +A11Y_OFF = ("NO_AT_BRIDGE", "GTK_A11Y") +A11Y_WEB_ROOT = "/org/a11y/webkit/accessible" +A11Y_LIMIT = 4000 +A11Y_BUDGET = 3.0 +A11Y_ACCESSIBLE = "org.a11y.atspi.Accessible" +FIRST_RUN_LABEL = "Get started" +SIGN_IN_LABEL = "Sign in" +PROTON_ROOT = os.path.join(DATA, "compat", "runtime") +PROTON_PIN = "GE-Proton10-34" +PROTON_RUN = os.path.join(BIN_DIR, "droiddeck-proton-run") +LAUNCH_DIR_FILE = "/tmp/droiddeck-browser/launch-dir" +WEBKIT_INPUT = "libwebkitinput.so" +WEBKIT_INPUT_SOURCE = "/usr/local/lib/droiddeck-fex/x86_64/" + WEBKIT_INPUT +WEBKIT_INPUT_GUEST = "/usr/lib/x86_64-linux-gnu/droiddeck/" + WEBKIT_INPUT +PLAYING = "epic-playing" +OPEN = "epic-open" +STEAM_PRELOAD = "DROIDDECK_STEAM_PRELOAD" +STEAM_ANCESTORS = 32 +READY = ".droiddeck-ready" +SIDECAR = ".droiddeck-store.json" +LAUNCHER = ".droiddeck-launch.bat" +ARGS_FILE = ".droiddeck-epic-args" +HANDLED = "DROIDDECK_EPIC_HANDLED" +BROKER_ENV = "DROIDDECK_EPIC_BROKER" +APP_ID = "com.epicgames.eglv2" +DBUS_NAME = APP_ID + ".SingleInstance" +DBUS_PATH = "/" + APP_ID.replace(".", "/") + "/SingleInstance" +DBUS_METHOD = "org.SingleInstance.DBus.ExecuteCallback" +SKIPPED = ("lib/i386-linux-gnu", "lib32", "libx32", "i686-pc-linux-gnu", "share/doc", "include") +SETTINGS_SEED = { + "minimizeToTray": False, + "startOnBoot": False, + "cloudSavesEnabled": False, + "automaticDownloadsEnabled": False, + "autoLaunchOnDownloadComplete": False, + "showWhatsNewOnStartup": False, + "suppressNotificationsWhileGaming": True, + "verboseLogs": False, + "v1Migrated": True, +} +CLIENT_ENV = { + "EGL_DISABLE_TELEMETRY": "1", + "EGL_DISABLE_SENTRY": "1", + "EGL_DISABLE_SELF_UPDATE": "1", + "EGL_DISABLE_SOCIAL_PANEL": "1", + "EGL_PROTON_PIN": PROTON_PIN, + "WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS": "1", + "WEBKIT_DISABLE_COMPOSITING_MODE": "1", + "WEBKIT_DISABLE_DMABUF_RENDERER": "1", + "WEBKIT_SKIA_ENABLE_CPU_RENDERING": "1", + "NO_AT_BRIDGE": "1", + "GTK_A11Y": "none", + "LIBGL_ALWAYS_SOFTWARE": "1", + "JSC_useDFGJIT": "0", + "JSC_useFTLJIT": "0", +} +KEPT_ENV = ("HOME", "USER", "LOGNAME", "LANG", "LANGUAGE", "LC_ALL", "LC_MESSAGES", "TZ", "XDG_RUNTIME_DIR", "BL_LAUNCH_DIR") +LAUNCH_VERBS = ("waitforexitandrun", "run", "runinprefix") +EPIC_ARGS = ("-auth_", "-epic") +CMD_SPECIAL = "&|<>^" +WIDTH, HEIGHT = 1280, 720 +LAUNCH_TIMEOUT = 150.0 +HANDOFF_WAIT = 30.0 +STEAM_WAIT = 20.0 +STEAM_CLAIM_WAIT = 90.0 +CLAIM_PEEK = 0.5 +SIGN_IN_WAIT = 90.0 +REGISTER_WAIT = 30.0 +AUTO_SIGN_IN_FRESH = 120.0 +FIRST_RUN_PRESSES = 3 +BROKER_WAIT = 60.0 +HIDDEN_IDLE = 240.0 +EXIT_GRACE = 6.0 +SIGN_OUT_GRACE = 4.0 +STOP_WAIT = 8.0 +LOG_CAP = 8 << 20 +DISPLAY_PROBE = ("import os, sys, time\nparent = os.getppid()\n" + "with open(sys.argv[1] + '.tmp', 'w') as f:\n f.write(os.environ.get('DISPLAY', ''))\n" + "os.replace(sys.argv[1] + '.tmp', sys.argv[1])\n" + "while os.getppid() == parent:\n time.sleep(1)\n") +SHIM = "#!/bin/sh\nunset LD_PRELOAD LD_LIBRARY_PATH\nexec /usr/bin/python3 -I %s %s \"$@\"\n" + + +class Failure(Exception): + pass + + +def say(message): + print("droiddeck-epic: %s" % message, file=sys.stderr, flush=True) + + +def read_json(path, default=None): + try: + with open(path, encoding="utf-8") as f: + return json.load(f) + except (OSError, ValueError): + return default + + +def write_json(path, data): + os.makedirs(os.path.dirname(path), exist_ok=True) + tmp = "%s.%d.tmp" % (path, os.getpid()) + with open(tmp, "w", encoding="utf-8") as f: + json.dump(data, f, indent=2) + f.write("\n") + os.replace(tmp, path) + + +def install_preload(files): + target = os.path.join(files, "lib", "x86_64-linux-gnu", "droiddeck", WEBKIT_INPUT) + line = "" + if os.path.isfile(WEBKIT_INPUT_SOURCE): + if not (os.path.isfile(target) and filecmp.cmp(WEBKIT_INPUT_SOURCE, target, shallow=False)): + os.makedirs(os.path.dirname(target), exist_ok=True) + tmp = "%s.%d.tmp" % (target, os.getpid()) + shutil.copyfile(WEBKIT_INPUT_SOURCE, tmp) + os.chmod(tmp, 0o644) + os.replace(tmp, target) + line = WEBKIT_INPUT_GUEST + "\n" + else: + remove(target) + write_text(os.path.join(files, "etc", "ld.so.preload"), line) + + +def write_text(path, text, mode=0o644): + os.makedirs(os.path.dirname(path), exist_ok=True) + try: + with open(path, encoding="utf-8") as f: + if f.read() == text: + os.chmod(path, mode) + return False + except (OSError, UnicodeDecodeError): + pass + tmp = "%s.%d.tmp" % (path, os.getpid()) + with open(tmp, "w", encoding="utf-8") as f: + f.write(text) + os.chmod(tmp, mode) + os.replace(tmp, path) + return True + + +def remove(path): + if not os.path.lexists(path): + return + if os.path.isdir(path) and not os.path.islink(path): + shutil.rmtree(path, ignore_errors=True) + else: + os.unlink(path) + + +def version_name(value): + return re.sub(r"[^A-Za-z0-9._+-]", "_", value or "")[:80] + + +@contextlib.contextmanager +def locked(name, wait=True): + os.makedirs(STATE, exist_ok=True) + with open(os.path.join(STATE, name), "a") as handle: + fcntl.flock(handle, fcntl.LOCK_EX if wait else fcntl.LOCK_EX | fcntl.LOCK_NB) + try: + yield + finally: + fcntl.flock(handle, fcntl.LOCK_UN) + + +def run_dir(env=None): + env = os.environ if env is None else env + runtime = env.get("XDG_RUNTIME_DIR") + if runtime and os.path.isdir(runtime) and os.access(runtime, os.W_OK): + return os.path.join(runtime, "droiddeck-epic") + return os.path.join(STATE, "run") + + +def instance_file(): + return os.path.join(STATE, "instance.json") + + +def broker_path(): + return os.path.join(run_dir(), "broker.sock") + + +def safe_name(name): + parts = [part for part in name.replace("\\", "/").split("/") if part not in ("", ".")] + if not parts or ".." in parts: + return None + return "/".join(parts) + + +def skipped(relative): + return any(relative == s or relative.startswith(s + "/") for s in SKIPPED) + + +def rooted_link(files_root, link, target): + if not target.startswith("/"): + return target + relative = target.lstrip("/") + if relative == "usr" or relative.startswith("usr/"): + relative = relative[4:] + return os.path.relpath(os.path.join(files_root, relative), os.path.dirname(link)) + + +def inside(root, path): + real = os.path.realpath(path) + return real == root or real.startswith(root + os.sep) + + +def extract_runtime(tarball, dest): + staging = dest + ".staging" + remove(staging) + os.makedirs(staging) + root = os.path.realpath(staging) + files_root = os.path.join(staging, "files") + count = 0 + with tarfile.open(tarball, "r:*") as archive: + for member in archive: + name = safe_name(member.name) + if name is None: + continue + top, _, rest = name.partition("/") + if top not in ("files", "metadata"): + continue + if top == "files" and rest and skipped(rest): + continue + target = os.path.join(staging, name) + if not inside(root, os.path.dirname(target)): + continue + if member.isdir(): + os.makedirs(target, exist_ok=True) + continue + os.makedirs(os.path.dirname(target), exist_ok=True) + if not inside(root, os.path.dirname(target)): + continue + if member.issym(): + remove(target) + os.symlink(rooted_link(files_root, target, member.linkname) if top == "files" else member.linkname, target) + elif member.islnk(): + source = safe_name(member.linkname) + source = os.path.join(staging, source) if source else None + if source and os.path.isfile(source) and inside(root, source): + remove(target) + shutil.copy2(source, target) + elif member.isfile(): + remove(target) + with archive.extractfile(member) as src, open(target, "wb") as out: + shutil.copyfileobj(src, out, 1 << 20) + os.chmod(target, (member.mode & 0o777) | 0o600) + else: + continue + count += 1 + if not os.path.isfile(os.path.join(files_root, "lib", "x86_64-linux-gnu", "libc.so.6")) and \ + not os.path.islink(os.path.join(files_root, "lib", "x86_64-linux-gnu", "libc.so.6")): + remove(staging) + raise Failure("runtime-incomplete") + if not os.path.lexists(os.path.join(files_root, "usr")): + os.symlink(".", os.path.join(files_root, "usr")) + return staging, count + + +def ar_members(path): + with open(path, "rb") as f: + if f.read(8) != b"!<arch>\n": + raise Failure("gles-format") + while True: + header = f.read(60) + if len(header) < 60: + return + name = header[:16].decode("ascii", "replace").strip().rstrip("/") + size = int(header[48:58].decode("ascii").strip()) + data = f.read(size) + if size % 2: + f.read(1) + yield name, data + + +def install_gles(deb, files_root): + libdir = os.path.join(files_root, "lib", "x86_64-linux-gnu") + os.makedirs(libdir, exist_ok=True) + for name, data in ar_members(deb): + if not name.startswith("data.tar"): + continue + with tarfile.open(fileobj=io.BytesIO(data), mode="r:*") as archive: + for member in archive: + base = os.path.basename(member.name) + if not base.startswith("libGLESv2.so"): + continue + target = os.path.join(libdir, base) + remove(target) + if member.issym(): + os.symlink(os.path.basename(member.linkname), target) + elif member.isfile(): + with archive.extractfile(member) as src, open(target, "wb") as out: + shutil.copyfileobj(src, out) + os.chmod(target, 0o644) + if os.path.exists(os.path.join(libdir, "libGLESv2.so.2")): + return + raise Failure("gles-missing") + + +def extract_app(image, dest): + staging = dest + ".staging" + remove(staging) + os.makedirs(staging) + status = subprocess.call([os.path.join(BIN_DIR, "droiddeck-fex"), "extract", os.path.abspath(image)], + cwd=staging, stdout=subprocess.DEVNULL) + root = os.path.realpath(os.path.join(staging, "squashfs-root")) + if status != 0 or not app_complete(root): + remove(staging) + raise Failure("app-extract") + remove(dest) + os.rename(root, dest) + remove(staging) + + +def app_complete(root): + return os.path.isfile(os.path.join(root, "AppRun")) and os.path.isfile(os.path.join(root, "usr", "bin", "EpicGamesLauncher")) + + +def ready(path): + return os.path.isfile(os.path.join(path, READY)) + + +def mark_ready(path): + write_text(os.path.join(path, READY), "1\n") + + +def prune(parent, keep): + try: + names = os.listdir(parent) + except OSError: + return + for name in names: + if name != keep: + remove(os.path.join(parent, name)) + + +def install(options): + with locked("install.lock"): + current = read_json(CURRENT, {}) or {} + app = version_name(options.get("app-version") or current.get("app")) + runtime = version_name(options.get("runtime-version") or current.get("runtime")) + if not app or not runtime: + raise Failure("no-version") + app_dir = os.path.join(APPS, app) + runtime_dir = os.path.join(RUNTIMES, runtime) + if not ready(app_dir): + image = options.get("app") + if not image or not os.path.isfile(image): + raise Failure("no-app-image") + say("unpacking the Epic Games Launcher %s" % app) + extract_app(image, app_dir) + mark_ready(app_dir) + if not ready(runtime_dir): + tarball, deb = options.get("runtime"), options.get("gles") + if not tarball or not os.path.isfile(tarball) or not deb or not os.path.isfile(deb): + raise Failure("no-runtime-archive") + say("unpacking the x86 runtime %s" % runtime) + staging, count = extract_runtime(tarball, runtime_dir) + install_gles(deb, os.path.join(staging, "files")) + write_text(os.path.join(staging, "files", "etc", "ld.so.preload"), "") + remove(runtime_dir) + os.rename(staging, runtime_dir) + mark_ready(runtime_dir) + say("x86 runtime ready (%d entries)" % count) + with instance_guard() as free: + write_json(CURRENT, {"app": app, "runtime": runtime}) + if free: + prune(APPS, app) + prune(RUNTIMES, runtime) + report = status() + print(json.dumps(report)) + return 0 if report["installed"] else 1 + + +@contextlib.contextmanager +def instance_guard(): + os.makedirs(STATE, exist_ok=True) + with open(os.path.join(STATE, "instance.lock"), "a") as handle: + try: + fcntl.flock(handle, fcntl.LOCK_EX | fcntl.LOCK_NB) + except OSError: + yield False + return + try: + yield True + finally: + fcntl.flock(handle, fcntl.LOCK_UN) + + +def current_dirs(): + current = read_json(CURRENT, {}) or {} + app = version_name(current.get("app")) + runtime = version_name(current.get("runtime")) + app_dir = os.path.join(APPS, app) if app else None + runtime_dir = os.path.join(RUNTIMES, runtime) if runtime else None + if app_dir and ready(app_dir) and app_complete(app_dir) and runtime_dir and ready(runtime_dir): + return app_dir, os.path.join(runtime_dir, "files"), current + return None, None, current + + +def signed_in(): + auth = read_json(AUTH_FILE) + entry = auth.get(AUTH_ENV) if isinstance(auth, dict) else None + return isinstance(entry, dict) and isinstance(entry.get("refresh_token"), str) and bool(entry["refresh_token"]) + + +def forget_sign_in(): + if not os.path.exists(SIGNED_OUT): + return False + remove(AUTH_FILE) + remove(WEB_COOKIES) + remove(SIGNED_OUT) + say("DroidDeck's Epic store was signed out; the launcher starts signed out") + return True + + +def utc_now(): + return time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()) + + +def read_installations(): + header, entries = None, [] + try: + with open(INSTALLATIONS, encoding="utf-8") as f: + lines = [line for line in f.read().splitlines() if line.strip()] + except OSError: + return None, [] + for index, line in enumerate(lines): + try: + value = json.loads(line) + except ValueError: + continue + if not isinstance(value, dict): + continue + if index == 0 and "entries" in value and "installationId" not in value: + header = value + else: + entries.append(value) + return header, entries + + +def droiddeck_dir(path): + sidecar = read_json(os.path.join(path, SIDECAR)) if path else None + if not isinstance(sidecar, dict) or sidecar.get("store") != "epic": + return False + extra = sidecar.get("extra") + return not (isinstance(extra, dict) and extra.get("clientManaged") == "true") + + +def droiddeck_installs(): + found = [] + try: + names = sorted(os.listdir(V1_MANIFESTS)) + except OSError: + return found + for name in names: + if not name.endswith(".item"): + continue + item = read_json(os.path.join(V1_MANIFESTS, name)) + if not isinstance(item, dict) or item.get("bIsIncompleteInstall"): + continue + if not droiddeck_dir(item.get("InstallLocation")): + continue + if not all(item.get(key) for key in ("InstallationGuid", "CatalogNamespace", "CatalogItemId", "AppName")): + continue + found.append(item) + return found + + +def installation_record(item): + tags = [""] + [tag for tag in item.get("InstallTags") or [] if isinstance(tag, str) and tag] + sidecar = {"revision": int(item.get("SidecarConfigRevision") or 0)} + if item.get("SidecarDeploymentId"): + sidecar["deploymentId"] = item["SidecarDeploymentId"] + return { + "installationId": item["InstallationGuid"], + "complete": True, + "dir": item["InstallLocation"], + "platform": "Windows", + "namespace": item["CatalogNamespace"], + "itemId": item["CatalogItemId"], + "artifactId": item["AppName"], + "version": item.get("AppVersionString") or "", + "tags": tags, + "sidecar": sidecar, + "launchCommand": item.get("LaunchCommand") or "", + "launchExecutable": item.get("LaunchExecutable") or "", + "writtenAt": utc_now(), + } + + +def sync_installations(): + installs = droiddeck_installs() + header, entries = read_installations() + latest = {} + for entry in entries: + key = entry.get("installationId") or entry.get("artifactId") + if key: + latest[key] = entry + changed = 0 + moved = {} + for item in installs: + key = item["InstallationGuid"] if item["InstallationGuid"] in latest else \ + next((k for k, e in latest.items() if e.get("artifactId") == item["AppName"]), None) + if key is None: + record = installation_record(item) + entries.append(record) + latest[record["installationId"]] = record + changed += 1 + elif latest[key].get("dir") != item["InstallLocation"] and not os.path.lexists(latest[key].get("dir") or ""): + moved[key] = item["InstallLocation"] + for key, current in latest.items(): + fix = {} + if key in moved: + fix["dir"] = moved[key] + if current.get("platform") != "Windows" and droiddeck_dir(moved.get(key, current.get("dir"))): + fix["platform"] = "Windows" + if not fix: + continue + for entry in entries: + if (entry.get("installationId") or entry.get("artifactId")) == key: + entry.update(fix) + changed += 1 + if not changed: + return False + head = dict(header or {"version": 1}) + head["writtenAt"] = utc_now() + head["entries"] = len(entries) + tmp = "%s.%d.tmp" % (INSTALLATIONS, os.getpid()) + os.makedirs(DATA, exist_ok=True) + with open(tmp, "w", encoding="utf-8") as f: + for value in [head] + entries: + f.write(json.dumps(value, separators=(",", ":")) + "\n") + os.replace(tmp, INSTALLATIONS) + say("updated %d DroidDeck Epic installs in the launcher" % changed) + return True + + +def parent_pid(pid): + try: + with open("/proc/%d/stat" % pid, encoding="utf-8", errors="replace") as f: + return int(f.read().rsplit(")", 1)[1].split()[1]) + except (OSError, IndexError, ValueError): + return 0 + + +def steam_app_id(pid=None): + pid = os.getppid() if pid is None else pid + for _ in range(STEAM_ANCESTORS): + if pid <= 1: + break + try: + with open("/proc/%d/cmdline" % pid, "rb") as f: + args = f.read().split(b"\0") + except OSError: + break + if b"SteamLaunch" in args: + ids = [a[6:].decode("ascii", "replace") for a in args if a.startswith(b"AppId=")] + return ids[0] if ids and ids[0].isdigit() else "" + pid = parent_pid(pid) + return "" + + +@contextlib.contextmanager +def marked(name, value="1"): + folder = launch_dir() + path = os.path.join(folder, name) if folder else "" + if path: + write_text(path, value + "\n") + try: + yield + finally: + if path: + remove(path) + + +def playing(): + return marked(PLAYING) + + +def clear_playing(): + folder = launch_dir() + if folder: + remove(os.path.join(folder, PLAYING)) + + +def launch_dir(): + found = os.environ.get("BL_LAUNCH_DIR", "") + if not found: + try: + with open(LAUNCH_DIR_FILE, encoding="utf-8") as f: + found = f.read().strip() + except OSError: + found = "" + return found + + +_fex = None + + +def fex_module(): + global _fex + if _fex is None: + _fex = runpy.run_path(os.path.join(BIN_DIR, "droiddeck-fex")) + return _fex + + +def fex_tool(request=False): + try: + module = fex_module() + found = module["fex_install"]() + if found and found.get("server"): + return found + if request: + module["request_install"]() + except Exception as error: + say("FEX lookup failed (%s)" % error) + return None + + +def status(): + app_dir, files, current = current_dirs() + fex = fex_tool() + report = { + "app": current.get("app"), + "runtime": current.get("runtime"), + "installed": app_dir is not None, + "fex": bool(fex), + "signedIn": signed_in(), + } + return report + + +def seed_settings(): + current = read_json(SETTINGS) + settings = current if isinstance(current, dict) else {} + changed = False + for key, value in SETTINGS_SEED.items(): + if settings.get(key) != value: + settings[key] = value + changed = True + if changed: + write_json(SETTINGS, settings) + return changed + + +def install_shims(): + write_text(os.path.join(SHIMS, "xdg-open"), SHIM % (SELF, "xdg-open"), 0o755) + proton = SHIM % (SELF, "proton") + os.makedirs(PROTON_ROOT, exist_ok=True) + names = {PROTON_PIN} + try: + names |= {name for name in os.listdir(PROTON_ROOT) if name.startswith("GE-Proton") and not name.startswith(".")} + except OSError: + pass + for name in sorted(names): + folder = os.path.join(PROTON_ROOT, name) + entry = os.path.join(folder, "proton") + if os.path.isdir(entry) and not os.path.islink(entry): + shutil.rmtree(entry, ignore_errors=True) + write_text(entry, proton, 0o755) + write_text(os.path.join(folder, "version"), "%d %s\n" % (0, name)) + + +def fex_environment(fex, files, env): + fex_data = os.path.join(run_dir(env), "fex") + for directory in (FEX_CONFIG, fex_data, FEX_CACHE): + os.makedirs(directory, exist_ok=True) + write_text(os.path.join(FEX_CONFIG, "Config.json"), json.dumps({"Config": {"RootFS": files}}, indent=2) + "\n") + result = { + "FEX_APP_CONFIG_LOCATION": FEX_CONFIG + "/", + "FEX_APP_DATA_LOCATION": fex_data + "/", + "FEX_APP_CACHE_LOCATION": FEX_CACHE + "/", + "FEX_ROOTFS": files, + "FEX_SILENTLOG": "0", + "FEX_OUTPUTLOG": "", + } + if fex.get("portable"): + result["FEX_PORTABLE"] = "1" + return result + + +def client_environment(base, fex, files, display, bus, broker, a11y=None): + env = {name: base[name] for name in KEPT_ENV if base.get(name)} + env.setdefault("HOME", HOME) + env.setdefault("LANG", "C.UTF-8") + env["PATH"] = SHIMS + ":/usr/bin:/bin" + env["DISPLAY"] = display + env["DBUS_SESSION_BUS_ADDRESS"] = bus + env[BROKER_ENV] = broker + env.update(CLIENT_ENV) + if a11y: + for name in A11Y_OFF: + env.pop(name, None) + env["AT_SPI_BUS_ADDRESS"] = a11y + env.update(fex_environment(fex, files, base)) + return env + + +def windows_path(path): + return "Z:" + path.replace("/", "\\") + + +def native_path(path): + if len(path) >= 2 and path[1] == ":" and path[0].upper() == "Z": + return path[2:].replace("\\", "/") or "/" + return path.replace("\\", "/") + + +ARG_PATH = re.compile(r'^(-[^=\s]+=)"?(/[^"]*)"?$') + + +def path_like(path): + return os.path.exists(path) or os.path.isdir(os.path.dirname(path)) + + +def convert_arg(arg): + if arg.startswith("/") and path_like(arg): + return windows_path(arg) + match = ARG_PATH.match(arg) + if match and path_like(match.group(2)): + return '%s"%s"' % (match.group(1), windows_path(match.group(2))) + return arg + + +def epic_managed(arg): + low = arg.lower() + return low.startswith(EPIC_ARGS) + + +def merge_args(client, own): + merged = [convert_arg(arg) for arg in client if arg] + for arg in own or []: + if arg and not epic_managed(arg) and arg not in merged: + merged.append(arg) + return merged + + +def quote_arg(arg): + clean = "".join(ch for ch in arg if ch >= " " and ch != "\x7f") + if clean.count('"') % 2: + clean = clean.replace('"', "") + if (" " in clean or "\t" in clean) and '"' not in clean: + return '"%s"' % clean + return clean + + +def cmd_escape(line): + out, quoted = [], False + for ch in line: + if ch == '"': + quoted = not quoted + elif ch in CMD_SPECIAL and not quoted: + out.append("^") + out.append(ch) + return "".join(out) + + +def command_line(args): + return cmd_escape(" ".join(quote_arg(arg) for arg in args if arg)) + + +def find_store_game(path): + folder = os.path.dirname(os.path.abspath(path)) if not os.path.isdir(path) else os.path.abspath(path) + for _ in range(8): + sidecar = read_json(os.path.join(folder, SIDECAR)) + if isinstance(sidecar, dict) and sidecar.get("store") and sidecar.get("id"): + return folder, sidecar + parent = os.path.dirname(folder) + if parent == folder: + break + folder = parent + return None + + +def write_args(folder, sidecar, client_args): + line = command_line(merge_args(client_args, sidecar.get("args") if isinstance(sidecar.get("args"), list) else [])) + path = os.path.join(folder, ARGS_FILE) + tmp = "%s.%d.tmp" % (path, os.getpid()) + remove(tmp) + with open(os.open(tmp, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), "w", encoding="utf-8", newline="") as f: + f.write(line + "\r\n") + os.replace(tmp, path) + return line + + +def launcher_takes_args(folder): + try: + with open(os.path.join(folder, LAUNCHER), encoding="utf-8", errors="replace") as f: + return ARGS_FILE in f.read() + except OSError: + return False + + +def send(sock, message): + sock.sendall((json.dumps(message) + "\n").encode("utf-8")) + + +def receive(sock, timeout=None): + sock.settimeout(timeout) + data = b"" + while b"\n" not in data: + chunk = sock.recv(65536) + if not chunk: + raise ConnectionError("closed") + data += chunk + return json.loads(data.split(b"\n", 1)[0].decode("utf-8")) + + +def ask_broker(message, timeout=5.0, path=None): + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as sock: + sock.settimeout(timeout) + sock.connect(path or broker_path()) + send(sock, message) + return receive(sock, timeout) + + +def pid_alive(pid): + try: + os.kill(int(pid), 0) + return True + except (OSError, ValueError, TypeError): + return False + + +def live_instance(): + info = read_json(instance_file()) + if not isinstance(info, dict) or not pid_alive(info.get("pid")): + return None + try: + answer = ask_broker({"op": "status"}, timeout=3.0, path=info.get("broker")) + except (OSError, ValueError): + return None + return dict(info, **answer) if isinstance(answer, dict) else None + + +class Launch: + def __init__(self, request): + self.request = request + self.done = threading.Event() + self.code = 0 + self.claimed = False + + +class Broker: + def __init__(self, path, mode, session_env): + self.path = path + self.mode = mode + self.session_env = session_env + self.cond = threading.Condition() + self.launches = [] + self.running = [] + self.waiters = 0 + self.awaiting = collections.Counter() + self.game = None + self.owner = None + self.closing = False + self.exited_at = None + self.last_contact = time.monotonic() + remove(path) + os.makedirs(os.path.dirname(path), exist_ok=True) + self.server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + self.server.bind(path) + os.chmod(path, 0o600) + self.server.listen(16) + threading.Thread(target=self.accept, name="broker", daemon=True).start() + + def accept(self): + while True: + try: + conn, _ = self.server.accept() + except OSError: + return + threading.Thread(target=self.serve, args=(conn,), daemon=True).start() + + def serve(self, conn): + with conn: + try: + request = receive(conn, 30.0) + op = request.get("op") if isinstance(request, dict) else None + if op == "status": + send(conn, {"mode": self.mode, "pid": os.getpid(), "game": self.game is not None}) + elif op == "await": + self.wait_for_launch(conn, request) + elif op == "launch": + self.launched(conn, request) + elif op == "exited": + self.exited(int(request.get("code") or 0)) + send(conn, {"ok": True}) + elif op == "stop": + self.close() + send(conn, {"ok": True}) + else: + send(conn, {"ok": False, "reason": "unknown-op"}) + except (OSError, ValueError, TypeError) as error: + say("broker: %s" % type(error).__name__) + + def wait_for_launch(self, conn, request): + app = request.get("app") or "" + deadline = time.monotonic() + float(request.get("timeout") or LAUNCH_TIMEOUT) + with self.cond: + self.waiters += 1 + self.awaiting[app.lower()] += 1 + self.last_contact = time.monotonic() + try: + while True: + found = next((item for item in self.launches if not item.claimed and is_game(item.request, app)), None) + if found is not None: + found.claimed = True + self.launches.remove(found) + self.cond.notify_all() + self.game = found + self.owner = request.get("owner") + self.exited_at = None + break + left = deadline - time.monotonic() + if self.closing or left <= 0: + send(conn, {"ok": False, "reason": "closing" if self.closing else "timeout"}) + return + self.cond.wait(min(left, 1.0)) + finally: + self.waiters -= 1 + self.awaiting[app.lower()] -= 1 + if self.awaiting[app.lower()] <= 0: + del self.awaiting[app.lower()] + self.last_contact = time.monotonic() + try: + send(conn, {"ok": True, "exe": found.request.get("exe"), "args": found.request.get("args") or []}) + except OSError: + self.exited(1) + + def launched(self, conn, request): + exe = request.get("exe") or "" + say("the client starts %s (%d arguments)" % (os.path.basename(exe), len(request.get("args") or []))) + if not is_game(request): + send(conn, {"code": 0}) + return + item = Launch(request) + if self.mode == "visible" and not self.awaited(request): + with self.cond: + self.launches.append(item) + self.cond.notify_all() + if not play_in_steam(request): + with self.cond: + unclaimed = not item.claimed + if unclaimed and item in self.launches: + self.launches.remove(item) + if unclaimed: + with playing(): + code = run_game(request, self.session_env, self.running) + send(conn, {"code": code}) + return + send(conn, {"code": self.hand_over(item, STEAM_CLAIM_WAIT)}) + return + send(conn, {"code": self.hand_over(item, 20.0)}) + + def awaited(self, request): + with self.cond: + return any(is_game(request, app) for app in self.awaiting if app) + + def hand_over(self, item, wait): + deadline = time.monotonic() + wait + with self.cond: + if item not in self.launches and not item.claimed: + self.launches.append(item) + self.cond.notify_all() + while not item.claimed and not self.closing: + left = deadline - time.monotonic() + if left <= 0: + break + self.cond.wait(left) + if not item.claimed and item in self.launches: + self.launches.remove(item) + if not item.claimed: + return 0 + while not item.done.wait(1.0): + if self.closing: + break + return item.code + + def exited(self, code): + with self.cond: + game = self.game + if game is None: + return + game.code = code + game.done.set() + self.game = None + self.owner = None + self.exited_at = time.monotonic() + self.cond.notify_all() + + def close(self): + with self.cond: + self.closing = True + for item in self.launches: + item.done.set() + if self.game is not None: + self.game.done.set() + self.cond.notify_all() + + def shutdown(self): + self.close() + with contextlib.suppress(OSError): + self.server.close() + remove(self.path) + + +def is_game(request, app=None): + args = [str(arg).lower() for arg in request.get("args") or []] + if app: + return "-epicapp=" + app.lower() in args + return any(arg.startswith("-epicapp=") for arg in args) + + +def client_artifact(exe): + latest = {} + for entry in read_installations()[1]: + key = entry.get("installationId") or entry.get("artifactId") + if key: + latest[key] = entry + target = os.path.abspath(exe) + for entry in latest.values(): + folder = entry.get("dir") + if entry.get("deleted") or not isinstance(folder, str) or not folder: + continue + folder = os.path.abspath(folder) + if (target == folder or target.startswith(folder + os.sep)) and entry.get("artifactId"): + return str(entry["artifactId"]) + return None + + +def play_in_steam(request): + exe = native_path(request.get("exe") or "") + found = find_store_game(exe) + if found and found[1].get("store") == "epic" and found[1].get("id"): + game = str(found[1]["id"]) + elif not found: + game = client_artifact(exe) + if not game: + return False + else: + return False + reply = ask_app({"op": "epic-play-in-steam", "id": game}, STEAM_WAIT) + if not isinstance(reply, dict): + reply = {} + if reply.get("ok"): + say("handed %s to Steam" % game) + return True + say("Steam could not take %s (%s); running it here" % (game, reply.get("reason") or "no answer")) + return False + + +def run_game(request, session_env, running=None): + exe = native_path(request.get("exe") or "") + args = request.get("args") or [] + env = {k: v for k, v in session_env.items() if not k.startswith(("FEX_", "DROIDDECK_EPIC", "EGL_", "WEBKIT_"))} + preload = env.pop(STEAM_PRELOAD, "") + if preload: + env["LD_PRELOAD"] = preload + found = find_store_game(exe) + if found and found[1].get("store") == "epic" and launcher_takes_args(found[0]): + folder, sidecar = found + write_args(folder, sidecar, args) + env[HANDLED] = "1" + command = [PROTON_RUN, os.path.join(folder, LAUNCHER)] + else: + command = [PROTON_RUN, exe] + [convert_arg(arg) for arg in args] + say("running %s" % os.path.basename(command[1])) + try: + proc = subprocess.Popen(command, env=env, cwd=os.path.dirname(command[1]) or "/", start_new_session=True) + except OSError as error: + say("could not run the game (%s)" % error) + return 1 + if running is not None: + running.append(proc) + try: + return proc.wait() + finally: + if running is not None and proc in running: + running.remove(proc) + + +def wait_for(check, timeout, step=0.1): + deadline = time.monotonic() + timeout + while time.monotonic() < deadline: + if check(): + return True + time.sleep(step) + return check() + + +def capped_log(path): + os.makedirs(os.path.dirname(path), exist_ok=True) + handle = open(path, "wb") + read, write = os.pipe() + + def pump(): + written = 0 + with os.fdopen(read, "rb") as source: + while True: + chunk = source.read1(65536) if hasattr(source, "read1") else source.read(65536) + if not chunk: + break + if written < LOG_CAP: + handle.write(chunk[:LOG_CAP - written]) + handle.flush() + written += len(chunk) + handle.close() + + threading.Thread(target=pump, daemon=True).start() + return write + + +class Session: + def __init__(self, mode): + self.mode = mode + self.carried = False + self.a11y = None + self.press_at = 0.0 + self.first_run_presses = 0 + self.sign_in_pressed = False + self.was_signed_in = False + self.signed_out_at = None + self.procs = [] + self.client = None + self.command = None + self.env = None + self.broker = None + self.bus = None + self.rundir = run_dir() + + def spawn(self, command, env, log=None, group=False): + out = capped_log(log) if log else subprocess.DEVNULL + try: + proc = subprocess.Popen(command, env=env, stdin=subprocess.DEVNULL, stdout=out, stderr=out, + start_new_session=group, cwd="/") + finally: + if log: + os.close(out) + self.procs.append(proc) + return proc + + def start_bus(self, env, name="bus"): + path = os.path.join(self.rundir, name) + remove(path) + address = "unix:path=" + path + proc = self.spawn(["dbus-daemon", "--session", "--nofork", "--nopidfile", "--address=" + address], env) + if not wait_for(lambda: os.path.exists(path) or proc.poll() is not None, 10) or not os.path.exists(path): + raise Failure("no-session-bus") + return address + + def start_display(self, env, bus): + marker = os.path.join(self.rundir, "display") + remove(marker) + scope_env = dict(env, DBUS_SESSION_BUS_ADDRESS=bus) + for name in ("DISPLAY", "WAYLAND_DISPLAY", "GAMESCOPE_WAYLAND_DISPLAY"): + scope_env.pop(name, None) + size = ["-W", str(WIDTH), "-H", str(HEIGHT), "-w", str(WIDTH), "-h", str(HEIGHT)] + self.spawn(["gamescope", "--backend", "headless"] + size + ["--", sys.executable, "-I", "-c", DISPLAY_PROBE, marker], + scope_env, os.path.join(LOGS, "gamescope.log")) + display = {} + + def ready(): + try: + with open(marker, encoding="utf-8") as f: + display["name"] = f.read().strip() + except OSError: + return False + return bool(display["name"]) + + if not wait_for(ready, 30): + raise Failure("no-display") + return display["name"] + + def run(self): + app_dir, files, current = current_dirs() + if app_dir is None: + raise Failure("not-installed") + fex = fex_tool(request=True) + if fex is None: + raise Failure("no-fex") + os.makedirs(self.rundir, exist_ok=True) + os.makedirs(LOGS, exist_ok=True) + base = dict(os.environ) + base.setdefault("XDG_RUNTIME_DIR", self.rundir) + seed_settings() + install_shims() + install_preload(files) + clear_playing() + sync_installations() + forget_sign_in() + self.carried = carry_sign_in() + bus = self.start_bus(base) + self.bus = bus + if self.carried: + self.a11y = self.start_bus(base, "a11y") + if self.mode == "hidden": + display = self.start_display(base, bus) + else: + display = base.get("DISPLAY") or ":0" + path = broker_path() + self.broker = Broker(path, self.mode, base) + write_json(instance_file(), {"pid": os.getpid(), "mode": self.mode, "bus": bus, "broker": path}) + env = client_environment(base, fex, files, display, bus, path, self.a11y) + self.command = [fex["bin"], os.path.join(app_dir, "AppRun")] + self.env = env + say("starting the Epic Games Launcher %s (%s, display %s)" % (current.get("app"), self.mode, display)) + self.start_client() + return self.watch() + + def start_client(self): + self.client = self.spawn(self.command, self.env, os.path.join(LOGS, "client-%s.log" % self.mode), group=True) + + def restart_signed_out(self): + say("DroidDeck's Epic store was signed out; restarting the launcher signed out") + self.end_client() + forget_sign_in() + self.carried = False + self.was_signed_in = False + self.signed_out_at = None + self.start_client() + + def carry_on(self, now): + if signed_in(): + self.carried = False + self.was_signed_in = True + remove(AUTO_SIGN_IN) + say("the launcher is signed in") + return + if now < self.press_at or self.sign_in_pressed: + return + self.press_at = now + 2.0 + buttons = a11y_buttons(self.a11y) + if SIGN_IN_LABEL in buttons: + write_text(AUTO_SIGN_IN, "%d\n" % time.time()) + if a11y_press(self.a11y, buttons[SIGN_IN_LABEL]): + self.sign_in_pressed = True + say("asked the launcher to sign in") + elif FIRST_RUN_LABEL in buttons and self.first_run_presses < FIRST_RUN_PRESSES: + self.first_run_presses += 1 + if a11y_press(self.a11y, buttons[FIRST_RUN_LABEL]): + say("moved past the launcher's welcome screen") + + def follow_sign_out(self, now): + if signed_in(): + self.was_signed_in = True + self.signed_out_at = None + return + if not self.was_signed_in: + return + if self.signed_out_at is None: + self.signed_out_at = now + return + if now - self.signed_out_at < SIGN_OUT_GRACE: + return + self.was_signed_in = False + self.signed_out_at = None + channel = launch_dir() + if channel: + post(channel, {"op": "epic-signed-out"}) + say("the launcher was signed out; signing DroidDeck's Epic store out too") + + def watch(self): + started = time.monotonic() + broker = self.broker + while True: + if self.client.poll() is not None: + say("the Epic Games Launcher exited (%s)" % self.client.returncode) + return 0 if self.mode == "visible" else 1 + now = time.monotonic() + if broker.closing: + return 0 + if broker.game is None and os.path.exists(SIGNED_OUT): + if self.mode != "visible": + say("DroidDeck's Epic store was signed out; closing") + return 0 + self.restart_signed_out() + continue + if self.carried: + self.carry_on(now) + elif self.mode == "visible": + self.follow_sign_out(now) + owner = broker.owner + if broker.game is not None and owner and not pid_alive(owner): + say("the game's launcher process is gone") + broker.exited(0) + if self.mode == "hidden": + idle = broker.game is None and broker.waiters == 0 + if idle and broker.exited_at is not None: + if now - broker.exited_at >= EXIT_GRACE: + return 0 + elif idle and now - max(started, broker.last_contact) > HIDDEN_IDLE: + say("no launch was asked for; closing") + return 0 + elif idle and broker.last_contact > started and now - broker.last_contact > 5.0: + say("the launch was given up; closing") + return 0 + time.sleep(0.5) + + def end_client(self): + if self.client is None: + return + if self.client.poll() is None: + with contextlib.suppress(OSError): + os.killpg(self.client.pid, signal.SIGTERM) + try: + self.client.wait(STOP_WAIT) + except subprocess.TimeoutExpired: + with contextlib.suppress(OSError): + os.killpg(self.client.pid, signal.SIGKILL) + with contextlib.suppress(subprocess.TimeoutExpired): + self.client.wait(5) + with contextlib.suppress(OSError): + os.killpg(self.client.pid, signal.SIGKILL) + + def stop(self): + if self.broker is not None: + self.broker.shutdown() + for game in list(self.broker.running): + stop_group(game) + clear_playing() + info = read_json(instance_file()) + if isinstance(info, dict) and info.get("pid") == os.getpid(): + remove(instance_file()) + self.end_client() + forget_sign_in() + for proc in reversed(self.procs): + if proc is self.client or proc.poll() is not None: + continue + proc.terminate() + try: + proc.wait(3) + except subprocess.TimeoutExpired: + proc.kill() + with contextlib.suppress(subprocess.TimeoutExpired): + proc.wait(2) + + +def terminate(*_): + raise SystemExit(0) + + +def retire_hidden(): + info = read_json(instance_file()) + if not isinstance(info, dict) or info.get("mode") != "hidden" or not pid_alive(info.get("pid")): + return + say("closing the hidden launcher first") + with contextlib.suppress(OSError, ValueError): + ask_broker({"op": "stop"}, timeout=3.0, path=info.get("broker")) + wait_for(lambda: not pid_alive(info.get("pid")), STOP_WAIT + 10, 0.25) + + +def serve(mode): + if mode == "visible": + retire_hidden() + with instance_guard() as free: + if not free: + say("the Epic Games Launcher is already running") + return 3 + session = Session(mode) + signal.signal(signal.SIGTERM, terminate) + signal.signal(signal.SIGHUP, terminate) + try: + with marked(OPEN, steam_app_id() or "1") if mode == "visible" else contextlib.nullcontext(): + return session.run() + except (Failure, OSError) as failure: + say("could not start: %s" % failure) + return 2 + finally: + signal.signal(signal.SIGTERM, signal.SIG_IGN) + signal.signal(signal.SIGHUP, signal.SIG_IGN) + session.stop() + + +def api(): + info = read_json(API_FILE) + if not isinstance(info, dict) or not info.get("port") or not info.get("machineSecret"): + return None + return info + + +def api_get(info, path, timeout=5.0): + request = urllib.request.Request("http://127.0.0.1:%d%s" % (int(info["port"]), path), + headers={"x-epic-machine-secret": str(info["machineSecret"])}) + opener = urllib.request.build_opener(urllib.request.ProxyHandler({})) + with opener.open(request, timeout=timeout) as reply: + return json.loads(reply.read().decode("utf-8")) + + +def holds(value, wanted): + if isinstance(value, dict): + return any(holds(v, wanted) for v in value.values()) + if isinstance(value, list): + return any(holds(v, wanted) for v in value) + return isinstance(value, str) and value == wanted + + +def installed(info, app): + try: + listing = api_get(info, "/api/v1/installation/installations") + except (OSError, ValueError, urllib.error.URLError, http.client.HTTPException): + return None + return holds(listing.get("installations") if isinstance(listing, dict) else listing, app) + + +def deep_link(namespace, item, app): + target = ":".join((namespace, item, app)) + return "com.epicgames.launcher://apps/%s?action=launch&silent=true" % urllib.parse.quote(target, safe="") + + +def forward(bus, url): + command = ["dbus-send", "--session", "--print-reply", "--type=method_call", "--dest=" + DBUS_NAME, DBUS_PATH, + DBUS_METHOD, "array:string:EpicGamesLauncher,%s" % url, "string:/"] + env = dict(os.environ, DBUS_SESSION_BUS_ADDRESS=bus) + try: + return subprocess.call(command, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=15) == 0 + except (OSError, subprocess.SubprocessError): + return False + + +def parse_options(args, flags=()): + options, rest = {}, [] + while args: + arg = args.pop(0) + if arg.startswith("--") and arg[2:] in flags: + options[arg[2:]] = True + elif arg.startswith("--") and args: + options[arg[2:]] = args.pop(0) + else: + rest.append(arg) + return options, rest + + +def answer(ok, **fields): + print(json.dumps(dict(fields, ok=ok)), flush=True) + return 0 if ok else 1 + + +def launch(options): + app = options.get("app") or "" + namespace = options.get("namespace") or "" + item = options.get("item") or "" + folder = os.path.abspath(options.get("folder") or "") + try: + timeout = float(options.get("timeout") or LAUNCH_TIMEOUT) + except ValueError: + timeout = LAUNCH_TIMEOUT + if not 0 < timeout < float("inf"): + timeout = LAUNCH_TIMEOUT + deadline = time.monotonic() + timeout + if not (app and namespace and item and options.get("folder")): + return answer(False, reason="missing-game") + sidecar = read_json(os.path.join(folder, SIDECAR)) + if not isinstance(sidecar, dict) or sidecar.get("id") != app: + return answer(False, reason="no-sidecar") + if not launcher_takes_args(folder): + return answer(False, reason="old-launcher") + report = status() + if not report["installed"]: + return answer(False, reason="not-installed") + if not report["fex"]: + return answer(False, reason="no-fex") + if not report["signedIn"] and not handoff_ready(): + return answer(False, reason="signed-out") + remove(os.path.join(folder, ARGS_FILE)) + info = live_instance() + spawned = None + if info is None: + log = os.path.join(LOGS, "hidden.log") + os.makedirs(LOGS, exist_ok=True) + with contextlib.suppress(OSError): + os.replace(log, log + ".1") + with open(log, "wb") as out: + spawned = subprocess.Popen([sys.executable, SELF, "serve", "--mode", "hidden"], stdin=subprocess.DEVNULL, + stdout=out, stderr=out, start_new_session=True) + if not wait_for(lambda: live_instance() is not None or spawned.poll() is not None, BROKER_WAIT, 0.25) \ + or spawned.poll() is not None: + stop_spawned(spawned, read_json(instance_file())) + return answer(False, reason="client-start") + info = live_instance() + try: + reply = hand_off(info, spawned, app, namespace, item, options.get("owner"), deadline) + except (OSError, ValueError, subprocess.SubprocessError) as error: + reply = {"ok": False, "reason": "error-" + type(error).__name__} + if not reply.get("ok"): + stop_spawned(spawned, info) + return answer(False, reason=reply.get("reason") or "no-launch") + write_args(folder, sidecar, reply.get("args") or []) + say("the client handed over %s with %d arguments" % (os.path.basename(reply.get("exe") or ""), len(reply.get("args") or []))) + return answer(True) + + +def hand_off(info, spawned, app, namespace, item, owner, deadline): + def left(): + return max(0.0, deadline - time.monotonic()) + + def gone(): + return (spawned is not None and spawned.poll() is not None) or not pid_alive(info.get("pid")) + + if info is None: + return {"ok": False, "reason": "client-start"} + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as conn: + conn.connect(info["broker"]) + send(conn, {"op": "await", "app": app, "owner": owner, "timeout": max(1.0, left())}) + if info.get("mode") == "visible" and select.select([conn], [], [], CLAIM_PEEK)[0]: + try: + reply = receive(conn, max(1.0, left())) + except (OSError, ValueError): + return {"ok": False, "reason": "client-exited" if gone() else "timeout"} + if isinstance(reply, dict) and reply.get("ok"): + say("took the launch the client already started for %s" % app) + return reply if isinstance(reply, dict) else {"ok": False, "reason": "bad-reply"} + state = {} + + def ready(): + current = api() + if current is not None and installed(current, app) is not None: + state["api"] = current + return gone() or "api" in state + + if not wait_for(ready, left(), 1.0) or gone(): + return {"ok": False, "reason": "client-exited" if gone() else "client-not-ready"} + if not wait_for(lambda: gone() or installed(state["api"], app) is True, min(REGISTER_WAIT, left()), 1.0) or gone(): + return {"ok": False, "reason": "client-exited" if gone() else "not-registered"} + if not wait_for(lambda: gone() or signed_in(), min(SIGN_IN_WAIT, left()), 1.0) or gone(): + return {"ok": False, "reason": "client-exited" if gone() else "signed-out"} + url = deep_link(namespace, item, app) + if not wait_for(lambda: gone() or forward(info["bus"], url), min(20.0, left()), 1.0) or gone(): + return {"ok": False, "reason": "client-exited" if gone() else "deep-link"} + say("asked the client to launch %s" % app) + try: + reply = receive(conn, max(1.0, left())) + except (OSError, ValueError): + return {"ok": False, "reason": "client-exited" if gone() else "timeout"} + return reply if isinstance(reply, dict) else {"ok": False, "reason": "bad-reply"} + + +def stop_group(proc, wait=STOP_WAIT): + if proc.poll() is None: + with contextlib.suppress(OSError): + os.killpg(proc.pid, signal.SIGTERM) + try: + proc.wait(wait) + except subprocess.TimeoutExpired: + pass + with contextlib.suppress(OSError): + os.killpg(proc.pid, signal.SIGKILL) + with contextlib.suppress(subprocess.TimeoutExpired): + proc.wait(5) + + +def stop_spawned(proc, info=None): + if proc is None: + return + path = info.get("broker") if isinstance(info, dict) and info.get("pid") == proc.pid else None + asked = False + if path: + with contextlib.suppress(OSError, ValueError): + ask_broker({"op": "stop"}, timeout=3.0, path=path) + asked = True + try: + proc.wait(STOP_WAIT + 10 if asked else 0) + except subprocess.TimeoutExpired: + stop_group(proc) + + +def exited(options): + info = read_json(instance_file()) + if not isinstance(info, dict) or info.get("mode") not in ("hidden", "visible") or not pid_alive(info.get("pid")): + return 0 + with contextlib.suppress(OSError, ValueError): + ask_broker({"op": "exited", "code": int(options.get("code") or 0)}, timeout=3.0, path=info.get("broker")) + return 0 + + +def sign_in_url(url): + try: + parts = urllib.parse.urlsplit(url) + query = urllib.parse.parse_qs(parts.query) + redirect = urllib.parse.urlsplit((query.get("redirect_uri") or [""])[0]) + except ValueError: + return False + return parts.scheme == "https" and parts.hostname in ("www.epicgames.com", "epicgames.com") \ + and parts.path.startswith("/id/authorize") and redirect.scheme == "http" \ + and redirect.hostname in ("127.0.0.1", "localhost") and redirect.port is not None + + +def post(channel, request): + req = os.path.join(channel, "stores", "req") + os.makedirs(req, exist_ok=True) + rid = "epic-%d-%d" % (os.getpid(), time.time_ns()) + tmp = os.path.join(req, rid + ".json.tmp") + with open(tmp, "w", encoding="utf-8") as f: + json.dump(request, f) + os.rename(tmp, os.path.join(req, rid + ".json")) + return rid + + +def hand_over(op, url, launch_dir, auto=False): + request = {"op": op, "url": url} + if auto: + request["auto"] = True + post(launch_dir, request) + + +def ask_app(request, timeout): + channel = launch_dir() + if not channel: + return None + rid = post(channel, request) + reply = os.path.join(channel, "stores", "resp", rid + ".json") + value = {} + + def answered(): + found = read_json(reply) + if isinstance(found, dict): + value.update(found) + return True + return False + + if not wait_for(answered, timeout, 0.1): + remove(os.path.join(channel, "stores", "req", rid + ".json")) + return None + remove(reply) + return value + + +def handoff_ready(): + reply = ask_app({"op": "epic-client-handoff"}, HANDOFF_WAIT) + if isinstance(reply, dict) and reply.get("ok"): + return True + say("no DroidDeck Epic account to sign the launcher in with (%s)" % ((reply or {}).get("reason") or "no answer")) + return False + + +def carry_sign_in(): + remove(AUTO_SIGN_IN) + if signed_in() or not handoff_ready(): + return False + say("signing the launcher in with DroidDeck's Epic account") + return True + + +def a11y_connect(address): + try: + from gi.repository import Gio + flags = Gio.DBusConnectionFlags.AUTHENTICATION_CLIENT | Gio.DBusConnectionFlags.MESSAGE_BUS_CONNECTION + return Gio.DBusConnection.new_for_address_sync(address, flags, None, None) + except Exception: + return None + + +def a11y_call(conn, name, path, interface, method, args=None, reply=None): + from gi.repository import GLib + answer = conn.call_sync(name, path, interface, method, args, GLib.VariantType(reply) if reply else None, + 0, 2000, None) + return answer.unpack() + + +def a11y_buttons(address): + conn = a11y_connect(address) if address else None + if conn is None: + return {} + from gi.repository import GLib + found = {} + try: + names = a11y_call(conn, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", + "ListNames", None, "(as)")[0] + queue = collections.deque() + for name in names: + if not name.startswith(":"): + continue + try: + xml = a11y_call(conn, name, A11Y_WEB_ROOT, "org.freedesktop.DBus.Introspectable", "Introspect", None, "(s)")[0] + except Exception: + continue + queue.extend((name, A11Y_WEB_ROOT + "/" + node) for node in re.findall(r'<node name="([^"]+)"', xml)) + seen = set() + deadline = time.monotonic() + A11Y_BUDGET + while queue and len(seen) < A11Y_LIMIT and time.monotonic() < deadline: + node = queue.popleft() + if node in seen: + continue + seen.add(node) + try: + attrs = a11y_call(conn, node[0], node[1], A11Y_ACCESSIBLE, "GetAttributes", None, "(a{ss})")[0] + if attrs.get("tag") == "button": + label = a11y_call(conn, node[0], node[1], "org.freedesktop.DBus.Properties", "Get", + GLib.Variant("(ss)", (A11Y_ACCESSIBLE, "Name")), "(v)")[0] + if isinstance(label, str) and label.strip(): + found.setdefault(label.strip(), node) + continue + queue.extend(tuple(kid) for kid in + a11y_call(conn, node[0], node[1], A11Y_ACCESSIBLE, "GetChildren", None, "(a(so))")[0]) + except Exception: + continue + except Exception: + return found + finally: + conn.close_sync(None) + return found + + +def a11y_press(address, target): + conn = a11y_connect(address) + if conn is None: + return False + from gi.repository import GLib + try: + return bool(a11y_call(conn, target[0], target[1], "org.a11y.atspi.Action", "DoAction", + GLib.Variant("(i)", (0,)), "(b)")[0]) + except Exception: + return False + finally: + conn.close_sync(None) + + +def auto_sign_in(): + try: + return 0 <= time.time() - os.stat(AUTO_SIGN_IN).st_mtime < AUTO_SIGN_IN_FRESH + except OSError: + return False + + +def shim_open(argv): + url = argv[0] if argv else "" + channel = launch_dir() + steam = STEAM_RUN.match(url) + if steam and channel: + post(channel, {"op": "steam-run", "id": steam.group(1)}) + say("xdg-open: handed Steam game %s to the app" % steam.group(1)) + return 0 + if not url.startswith(("https://", "http://")) or not channel: + say("xdg-open: nothing to hand over") + return 1 + op = "epic-sign-in" if sign_in_url(url) else "open-url" + hand_over(op, url, channel, op == "epic-sign-in" and auto_sign_in()) + say("xdg-open: handed %s to the app" % op) + return 0 + + +def shim_proton(argv): + verb, rest = (argv[0], argv[1:]) if argv else ("", []) + if verb == "getcompatpath": + print(windows_path(rest[0]) if rest else "") + return 0 + if verb == "getnativepath": + print(native_path(rest[0]) if rest else "") + return 0 + if verb not in LAUNCH_VERBS: + return 0 + if not rest: + return 1 + request = {"op": "launch", "verb": verb, "exe": rest[0], "args": rest[1:], } + try: + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as sock: + sock.connect(os.environ.get(BROKER_ENV) or broker_path()) + send(sock, request) + reply = receive(sock, None) + except (OSError, ValueError) as error: + say("proton: no broker (%s)" % type(error).__name__) + return 1 + try: + return int(reply.get("code") or 0) if isinstance(reply, dict) else 1 + except (TypeError, ValueError): + return 1 + + +def main(argv): + if not argv: + say("usage: droiddeck-epic install|run|launch|exited|serve") + return 2 + action, args = argv[0], list(argv[1:]) + try: + if action == "proton": + return shim_proton(args) + if action == "xdg-open": + return shim_open(args) + if action == "install": + options, _ = parse_options(args) + try: + return install(options) + except (ValueError, tarfile.TarError, OSError) as error: + raise Failure("unpack-" + type(error).__name__) + if action == "run": + return serve("visible") + if action == "serve": + options, _ = parse_options(args) + return serve(options.get("mode") or "hidden") + if action == "launch": + options, _ = parse_options(args) + return launch(options) + if action == "exited": + options, _ = parse_options(args) + return exited(options) + except Failure as failure: + say("failed: %s" % failure) + print(json.dumps({"ok": False, "reason": str(failure)})) + return 1 + say("unknown action %s" % action) + return 2 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-epic-steam b/tools/linuxfs/overlay/usr/local/bin/droiddeck-epic-steam new file mode 100755 index 0000000000..7955b77418 --- /dev/null +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-epic-steam @@ -0,0 +1,4 @@ +#!/bin/sh +[ -n "${LD_PRELOAD:-}" ] && export DROIDDECK_STEAM_PRELOAD="$LD_PRELOAD" +unset LD_PRELOAD LD_LIBRARY_PATH +exec /usr/bin/python3 -I /usr/local/bin/droiddeck-epic run diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-esync b/tools/linuxfs/overlay/usr/local/bin/droiddeck-esync index 410a9c4421..d4cb5267ad 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-esync +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-esync @@ -1,7 +1,4 @@ #!/usr/bin/python3 -# droiddeck-esync: picks and stages the esync pack for each Proton build. -# Credit: esync and ntsync were designed by Elizabeth Figura for Wine and Proton, and fsync by Elizabeth Figura -# and Paul Gofman; droiddeck-esync, droiddeck-ntsync and droiddeck-fsync build on that work. import contextlib import fcntl import hashlib diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-fex b/tools/linuxfs/overlay/usr/local/bin/droiddeck-fex index 22519f09bf..0de377ef0f 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-fex +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-fex @@ -28,15 +28,25 @@ URUNTIME = "/usr/local/lib/droiddeck/uruntime" HOST_PRELOAD = "/etc/ld.so.preload" FEX_APPID = "3127680" SNIPER_APPID = "1628350" -INSTALL_DIRS = {FEX_APPID: "FEX-Emu", SNIPER_APPID: "SteamLinuxRuntime_sniper"} +SLR4_APPID = "4183110" +INSTALL_DIRS = {FEX_APPID: "FEX-Emu", SNIPER_APPID: "SteamLinuxRuntime_sniper", SLR4_APPID: "SteamLinuxRuntime_4"} MARKER = ".droiddeck-fex" LAYOUT = 1 +ROOTFS_LAYOUT = 1 +ARCH_DIRS = ("x86_64-linux-gnu", "i386-linux-gnu") +INTERPRETERS = ("ld-linux-x86-64.so.2", "ld-linux.so.2") +PROVIDED = frozenset(( + "ld-linux-x86-64.so.2", "ld-linux.so.2", "libc.so.6", "libm.so.6", "libmvec.so.1", "libpthread.so.0", "libdl.so.2", + "librt.so.1", "libutil.so.1", "libresolv.so.2", "libanl.so.1", "libBrokenLocale.so.1", "libnsl.so.1", + "libnss_compat.so.2", "libnss_dns.so.2", "libnss_files.so.2", "libnss_hesiod.so.2", "libthread_db.so.1", + "libmemusage.so", "libpcprofile.so", "libc_malloc_debug.so.0", "gconv", "libstdc++.so.6", "libgcc_s.so.1", +)) +GLIBC_BUILD = re.compile(r"^(?:ld|lib[A-Za-z_]+)-2\.[0-9]+\.so$|^libSegFault\.so$") GUEST_LIBDIRS = (("x86_64", "lib/x86_64-linux-gnu"), ("i386", "lib/i386-linux-gnu")) PRELOAD_NAMES = ("libblsession.so", "libfakeinput.so") FAULT_REPORT = "libfaultreport.so" -THUNK_AUDIT = "libthunkaudit.so" -THUNK_AUDIT_GUEST = "/usr/lib/x86_64-linux-gnu/droiddeck/" + THUNK_AUDIT VULKAN_PIN = "libvulkan-thunk.so" +VULKAN_PIN_DIR = "lib/x86_64-linux-gnu/droiddeck/vulkan" VULKAN_THUNK = "libvulkan-guest.so" RUNTIME_LIBRARIES = (("libc.so.6", b"GLIBC_"), ("libstdc++.so.6", b"GLIBCXX_")) VERSION_NAME = re.compile(rb"GLIBC(?:XX)?_[0-9][0-9.]*[0-9]") @@ -164,15 +174,15 @@ def platform_version(path): return tuple(int(part) for part in re.findall(r"\d+", os.path.basename(path))) -def runtime_platform(): - runtime = app_dir(SNIPER_APPID) +def runtime_platform(appid=SNIPER_APPID, prefix="sniper_platform_"): + runtime = app_dir(appid) if not runtime: return None try: entries = os.listdir(runtime) except OSError: return None - platforms = [os.path.join(runtime, entry) for entry in entries if entry.startswith("sniper_platform_")] + platforms = [os.path.join(runtime, entry) for entry in entries if entry.startswith(prefix)] platforms = [path for path in platforms if os.path.isdir(os.path.join(path, "files")) and os.path.isfile(os.path.join(path, "usr-mtree.txt.gz"))] return max(platforms, key=platform_version, default=None) @@ -234,6 +244,75 @@ def materialize(platform): return True +def graphics_platform(): + return runtime_platform(SLR4_APPID, "steamrt4_platform_") + + +def provides_newer(base, provider): + for name, prefix in RUNTIME_LIBRARIES: + ours = {v for v in version_names(os.path.join(base, "files/lib/x86_64-linux-gnu", name)) if v.startswith(prefix)} + theirs = {v for v in version_names(os.path.join(provider, "files/lib/x86_64-linux-gnu", name)) if v.startswith(prefix)} + if not ours or not theirs or not ours < theirs: + return False + return True + + +def mirror(source, provider, name, target): + if provider and name in PROVIDED and os.path.lexists(os.path.join(provider, name)): + os.symlink(os.path.realpath(os.path.join(provider, name)), os.path.join(target, name)) + return + path = os.path.join(source, name) + link = os.readlink(path) if os.path.islink(path) else None + if link and GLIBC_BUILD.match(os.path.basename(link)): + if name not in INTERPRETERS: + return + link = os.path.join(os.path.dirname(link), name) + if provider and GLIBC_BUILD.match(name): + return + if link and not link.startswith("/"): + os.symlink(link, os.path.join(target, name)) + else: + os.symlink(os.path.realpath(path), os.path.join(target, name)) + + +def build_rootfs(base, provider): + """The runtime with glibc and libstdc++ taken from a newer one, which FEX's GL and Vulkan thunks are built against.""" + base_files, provider_files = os.path.join(base, "files"), os.path.join(provider, "files") + rootfs = os.path.join(STATE, "rootfs") + stamp = "%d\n%s\n%s%s\n%s" % (ROOTFS_LAYOUT, os.path.realpath(base), read_text(os.path.join(base_files, MARKER)) or "", + os.path.realpath(provider), read_text(os.path.join(provider_files, MARKER)) or "") + if read_text(os.path.join(rootfs, MARKER)) == stamp: + return False + for entry in os.listdir(STATE): + if entry.startswith("rootfs."): + shutil.rmtree(os.path.join(STATE, entry), ignore_errors=True) + tmp = "%s.%d.tmp" % (rootfs, os.getpid()) + os.makedirs(tmp) + for entry in os.listdir(base_files): + if entry not in ("lib", "lib64", "usr", MARKER): + os.symlink(os.path.realpath(os.path.join(base_files, entry)), os.path.join(tmp, entry)) + os.symlink(".", os.path.join(tmp, "usr")) + for top in ("lib", "lib64"): + source = os.path.join(base_files, top) + os.makedirs(os.path.join(tmp, top)) + for entry in os.listdir(source) if os.path.isdir(source) else (): + path = os.path.join(source, entry) + if entry in ARCH_DIRS and os.path.isdir(path) and not os.path.islink(path): + provided = os.path.join(provider_files, top, entry) + os.makedirs(os.path.join(tmp, top, entry)) + for name in set(os.listdir(path)) | {name for name in PROVIDED if os.path.lexists(os.path.join(provided, name))}: + mirror(path, provided, name, os.path.join(tmp, top, entry)) + else: + mirror(source, None, entry, os.path.join(tmp, top)) + write_if_changed(os.path.join(tmp, MARKER), stamp) + old = "%s.%d.old" % (rootfs, os.getpid()) + if os.path.lexists(rootfs): + os.rename(rootfs, old) + os.rename(tmp, rootfs) + shutil.rmtree(old, ignore_errors=True) + return True + + def host_preloads(): listed = read_text(HOST_PRELOAD) or "" return [name for name in PRELOAD_NAMES if name in listed] @@ -247,14 +326,15 @@ def install_preloads(root): if os.path.isfile(source): copy_if_changed(source, os.path.join(root, libdir, "droiddeck", name)) shipped.setdefault(name, set()).add(arch) - for name in (THUNK_AUDIT, VULKAN_PIN): - source = os.path.join(PRELOADS, "x86_64", name) - if os.path.isfile(source): - copy_if_changed(source, os.path.join(root, "lib/x86_64-linux-gnu/droiddeck", name)) + pin = os.path.join(PRELOADS, "x86_64", VULKAN_PIN) + if os.path.isfile(pin): + copy_if_changed(pin, os.path.join(root, VULKAN_PIN_DIR, "libvulkan.so.1")) + alias = os.path.join(root, VULKAN_PIN_DIR, "libvulkan.so") + if not os.path.islink(alias) or os.readlink(alias) != "libvulkan.so.1": + if os.path.lexists(alias): + os.unlink(alias) + os.symlink("libvulkan.so.1", alias) wanted = [name for name in host_preloads() if name in shipped] - # The fault report is preloaded from the runtime's own list, which only x86 loaders read: through - # LD_PRELOAD it reached FEX's own loader too, and every FEX after it, which could not open it and - # said so at each start. Listed only with both builds, or i386 programs would say so instead. if len(shipped.get(FAULT_REPORT, ())) == len(GUEST_LIBDIRS): wanted.append(FAULT_REPORT) write_if_changed(os.path.join(root, "etc", "ld.so.preload"), "".join("/usr/$LIB/droiddeck/%s\n" % name for name in wanted)) @@ -273,14 +353,16 @@ def write_config(fex, root): def link_steam_sdk(): for sdk, candidates in (("sdk64", ("linux64", "ubuntu12_64")), ("sdk32", ("linux32", "ubuntu12_32"))): link = os.path.join(HOME, ".steam", sdk) - if os.path.lexists(link): - continue want = "x86_64" if sdk == "sdk64" else "i386" + if elf_arch(os.path.join(link, "steamclient.so")) == want: + continue for candidate in candidates: directory = os.path.join(STEAM_ROOT, candidate) if elf_arch(os.path.join(directory, "steamclient.so")) == want: os.makedirs(os.path.dirname(link), exist_ok=True) - os.symlink(directory, link) + tmp = "%s.%d.tmp" % (link, os.getpid()) + os.symlink(directory, tmp) + os.replace(tmp, link) break @@ -311,7 +393,7 @@ def request_install(): return [] -def describe(fex, platform): +def describe(fex, platform, graphics=None): return { "fex": fex["bin"] if fex else None, "server": fex["server"] if fex else None, @@ -320,6 +402,7 @@ def describe(fex, platform): "steamclient64": os.path.realpath(os.path.join(HOME, ".steam", "sdk64", "steamclient.so")) if elf_arch(os.path.join(HOME, ".steam", "sdk64", "steamclient.so")) == "x86_64" else None, "ready": bool(fex and fex["server"] and platform), + "graphics": graphics, } @@ -349,13 +432,27 @@ def prepare(): if materialize(platform): say("prepared %s as the x86 runtime" % os.path.basename(platform)) install_preloads(root) + provider = graphics_platform() + if provider and materialize(provider): + say("prepared %s for the x86 runtime's C and C++ libraries" % os.path.basename(provider)) + if not provider: + say("Steam Linux Runtime 4.0 (Steam app %s) is not installed yet; x86 games may not find their graphics drivers" + % SLR4_APPID) + elif not provides_newer(platform, provider): + say("%s has no newer C and C++ libraries than %s" % (os.path.basename(provider), os.path.basename(platform))) + provider = None + else: + if build_rootfs(platform, provider): + say("built the x86 runtime from %s with the C and C++ libraries of %s" + % (os.path.basename(platform), os.path.basename(provider))) + root = os.path.join(STATE, "rootfs") write_config(fex, root) fex["rootfs"] = root try: link_steam_sdk() except OSError: pass - status = describe(fex, platform) + status = describe(fex, platform, provider) write_if_changed(STATUS_FILE, json.dumps(status, indent=2) + "\n") with contextlib.suppress(OSError): os.unlink(WANTED) @@ -411,8 +508,6 @@ def split_paths(value): def data_dir(env): - # FEXServer's socket lives here. Under ~/.local its host path passes sun_path's 108 bytes, and - # proot then binds it to a temporary name only the server sees: no client ever reaches it. runtime = env.get("XDG_RUNTIME_DIR") if runtime and os.path.isdir(runtime) and os.access(runtime, os.W_OK): return os.path.join(runtime, "fex") @@ -427,8 +522,16 @@ def guest_environment(fex, env): result["FEX_APP_CONFIG_LOCATION"] = CONFIG_DIR + "/" result["FEX_APP_DATA_LOCATION"] = data + "/" result["FEX_APP_CACHE_LOCATION"] = CACHE_DIR + "/" + # Valve's FEX-Emu binds its server socket under $STEAM_COMPAT_DATA_PATH/fex-emu whatever FEX_APP_DATA_LOCATION or + # FEX_SERVERSOCKETPATH say, and sun_path is 108 bytes: compatdata under the app's data folder is too long. + if result.get("STEAM_COMPAT_DATA_PATH"): + short = data if data != DATA_DIR else "/tmp/fex" + os.makedirs(short, exist_ok=True) + result["STEAM_COMPAT_DATA_PATH"] = short result.setdefault("FEX_SILENTLOG", "0") result.setdefault("FEX_OUTPUTLOG", "stderr") + # Mono's incremental Boehm collector corrupts its heap under FEX, so Unity games crash at their first collections. + result.setdefault("GC_DISABLE_INCREMENTAL", "1") if fex["portable"]: result["FEX_PORTABLE"] = "1" else: @@ -444,7 +547,7 @@ def guest_environment(fex, env): result["FEX_THUNKCONFIG"] = os.path.join(CONFIG_DIR, "ThunksConfig.json") preload = [part for part in split_paths(result.get("LD_PRELOAD")) if os.path.exists(part) and not is_arm(part)] library_path = [part for part in (result.get("LD_LIBRARY_PATH") or "").split(":") - if part and "steamrtarm64" not in part and "aarch64" not in part] + if part and "arm64" not in part and "aarch64" not in part] for name, parts in (("LD_PRELOAD", preload), ("LD_LIBRARY_PATH", library_path)): if parts: result[name] = ":".join(parts) @@ -482,6 +585,7 @@ def vulkan_thunk_loads(fex, folder): needed = version_names(os.path.join(fex["guest_thunks"], VULKAN_THUNK)) if not needed: return False + needed |= version_names(os.path.join(PRELOADS, "x86_64", VULKAN_PIN)) found = bundled_libraries(folder) for name, prefix in RUNTIME_LIBRARIES: library = found.get(name) or os.path.join(fex["rootfs"], "lib/x86_64-linux-gnu", name) @@ -508,9 +612,10 @@ def launch(command, env, mode, decide=None): x86_64 = elf_arch(program) != "i386" thunks = "on" if "FEX_THUNKCONFIG" in guest else "off" folder = decide if decide and os.path.isdir(decide) else os.path.dirname(program) - if thunks == "on" and x86_64 and all(os.path.isfile(os.path.join(PRELOADS, "x86_64", name)) for name in (THUNK_AUDIT, VULKAN_PIN)) \ + if thunks == "on" and x86_64 and os.path.isfile(os.path.join(PRELOADS, "x86_64", VULKAN_PIN)) \ and vulkan_thunk_loads(fex, folder): - guest["LD_AUDIT"] = ":".join([THUNK_AUDIT_GUEST] + split_paths(guest.get("LD_AUDIT"))) + # Any LD_AUDIT module makes Mono's garbage collector crash under FEX, so the Vulkan thunk is pinned by search path. + guest["LD_LIBRARY_PATH"] = ":".join(["/usr/" + VULKAN_PIN_DIR] + split_paths(guest.get("LD_LIBRARY_PATH"))) thunks = "on, its own Vulkan loader too" say("running %s with %s (runtime %s, thunks %s)" % (program, fex["bin"], guest.get("FEX_ROOTFS", "none"), thunks)) return os.execve(fex["bin"], [fex["bin"], program] + command[1:], guest) @@ -562,19 +667,38 @@ def extracted(): def want_fex(): with locked(): - status = describe(fex_install(), runtime_platform()) + status = describe(fex_install(), runtime_platform(), graphics_platform()) if not status["ready"]: request_install() write_if_changed(STATUS_FILE, json.dumps(status, indent=2) + "\n") +XATTR_ONLY_NOISE = re.compile(r"^(proot (error|warning)|Failed to exec memfd|Further error messages of this type are suppressed)") + + +def only_xattrs_failed(errors): + seen = False + for line in errors.splitlines(): + if "write_xattr" in line: + seen = True + elif re.search(r"fail|could not|cannot|error", line, re.I) and not XATTR_ONLY_NOISE.match(line): + return False + return seen + + def extract(image): image = os.path.abspath(image) clear_extracted() x86 = elf_arch(image) in X86.values() if os.access(URUNTIME, os.X_OK): - status = subprocess.call([URUNTIME, "--appimage-extract"], stdout=subprocess.DEVNULL, - env=dict(os.environ, TARGET_APPIMAGE=image)) + run = subprocess.run([URUNTIME, "--appimage-extract"], stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, + env=dict(os.environ, TARGET_APPIMAGE=image)) + errors = run.stderr.decode("utf-8", "replace") + sys.stderr.write(errors) + status = run.returncode + if status == 2 and only_xattrs_failed(errors) and extracted() and os.path.lexists("squashfs-root/AppRun"): + say("uruntime could not keep the image's extended attributes; the files are unpacked") + status = 0 if status == 0 and extracted(): if x86: want_fex() @@ -591,7 +715,7 @@ def extract(image): unsquashfs = shutil.which("unsquashfs") if unsquashfs: clear_extracted() - status = subprocess.call([unsquashfs, "-q", "-n", "-o", str(appimage_offset(image)), "-d", "squashfs-root", image], + status = subprocess.call([unsquashfs, "-q", "-n", "-no-xattrs", "-o", str(appimage_offset(image)), "-d", "squashfs-root", image], stdout=subprocess.DEVNULL) if status == 0: if x86: @@ -659,7 +783,7 @@ def main(argv): return 0 if prepare() else 1 if action == "status": with locked(): - status = describe(fex_install(), runtime_platform()) + status = describe(fex_install(), runtime_platform(), graphics_platform()) write_if_changed(STATUS_FILE, json.dumps(status, indent=2) + "\n") print(json.dumps(status, indent=2)) return 0 if status["ready"] else 1 diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak b/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak index a8226b5130..d91cae6ad3 100644 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak @@ -1,27 +1,14 @@ #!/usr/bin/python3 -# The app's store talks to Flatpak through this: one JSON object per line on stdout, so progress -# reaches the front end as numbers rather than a terminal's redrawn bar. Per-user installation, -# Flathub as the remote, this device's architecture. -# -# droiddeck-flatpak install <app-id> the app and whatever runtimes it needs -# droiddeck-flatpak install-bundle <file> a .flatpak file, its runtimes from Flathub -# droiddeck-flatpak uninstall <app-id> the app, then runtimes nothing uses any more -# droiddeck-flatpak update [<app-id>] one app, or everything with an update -# droiddeck-flatpak updates what has one (a "updates" line) -# -# Lines: {"e":"op","i":1,"n":3,"kind":"install","ref":"..."} as each step starts, -# {"e":"progress","i":1,"n":3,"percent":45,"status":"..."} while it runs, -# {"e":"error","message":"..."} and {"e":"done"} at the end (with "id" for a bundle). Exit status 0 on success. import json import os import sys os.environ.setdefault("FLATPAK_BWRAP", "/usr/local/bin/droiddeck-bwrap") -import gi # noqa: E402 +import gi gi.require_version("Flatpak", "1.0") -from gi.repository import Flatpak, Gio, GLib # noqa: E402 +from gi.repository import Flatpak, Gio, GLib REMOTE = "flathub" @@ -82,12 +69,6 @@ def transaction(inst): progress.connect("changed", changed) def on_operation_error(tr, op, err, details): - # A runtime extension that fails to install (a missing translation, an unneeded GL - # driver) is not worth losing the app over; anything else ends the transaction. - # FLATPAK_TRANSACTION_ERROR_DETAILS_NON_FATAL is 1, but PyGObject does not always hand the - # flags over ("g_value_get_flags: assertion ... failed" and a 0). An extension installed - # alongside an app - its translations, debug data, a GL or codecs runtime - is what Flatpak - # marks non-fatal, as the flatpak CLI does: its failure costs that extension, not the app. try: non_fatal = bool(int(details) & 1) except (TypeError, ValueError): @@ -108,7 +89,6 @@ def transaction(inst): t.connect("ready", on_ready) t.connect("new-operation", on_new_operation) t.connect("operation-error", on_operation_error) - # A dependency found on more than one remote comes from the first (Flathub, the only one). t.connect("choose-remote-for-ref", lambda tr, ref, runtime_ref, remotes: 0) t.connect("end-of-lifed-with-rebase", lambda *a: False) t.connect("add-new-remote", lambda *a: False) @@ -135,7 +115,6 @@ def install(app_id): if app_ref(inst, app_id) is not None: emit(e="done", note="already installed") return 0 - # Flathub publishes apps on "stable"; libflatpak's default branch is "master". branch, last = None, None for candidate in ("stable", "master"): try: @@ -149,8 +128,6 @@ def install(app_id): t, state = transaction(inst) t.add_install(REMOTE, "app/%s/%s/%s" % (app_id, arch, branch), None) rc = run(t, state, report_done=False) - # A failure the transaction did not report (an error handler that raised, say) must not read - # as an install: the app is there, or it is not. if rc == 0 and app_ref(installation(), app_id) is None: emit(e="error", message="%s did not install; see flatpak-install.log" % app_id) return 1 @@ -192,7 +169,6 @@ def uninstall(app_id): t.add_uninstall(ref.format_ref()) rc = run(t, state) if rc == 0: - # Runtimes only this app used; Flatpak's own `uninstall --unused`. try: unused = inst.list_unused_refs(None, None) except GLib.Error: @@ -205,6 +181,27 @@ def uninstall(app_id): return rc +def prune(): + inst = installation() + try: + unused = inst.list_unused_refs(None, None) + except GLib.Error as err: + emit(e="error", message=err.message) + return 1 + if unused: + t, state = transaction(inst) + for r in unused: + t.add_uninstall(r.format_ref()) + if run(t, state, report_done=False): + return 1 + try: + inst.prune_local_repo(None) + except GLib.Error as err: + emit(e="warning", message=err.message) + emit(e="done", removed=len(unused)) + return 0 + + def updatable(inst): try: return inst.list_installed_refs_for_update(None) @@ -240,7 +237,7 @@ def updates(): def main(): if len(sys.argv) < 2: - sys.stderr.write(__doc__ or "usage: droiddeck-flatpak install|install-bundle|uninstall|update|updates [app-id|file]\n") + sys.stderr.write(__doc__ or "usage: droiddeck-flatpak install|install-bundle|uninstall|update|updates|prune [app-id|file]\n") return 2 cmd, args = sys.argv[1], sys.argv[2:] if cmd in ("install", "install-bundle", "update"): @@ -255,7 +252,9 @@ def main(): return update(args[0] if args else None) if cmd == "updates": return updates() - sys.stderr.write("usage: droiddeck-flatpak install|install-bundle|uninstall|update|updates [app-id|file]\n") + if cmd == "prune": + return prune() + sys.stderr.write("usage: droiddeck-flatpak install|install-bundle|uninstall|update|updates|prune [app-id|file]\n") return 2 diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak-run b/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak-run index 45a6e37eda..08e6e7a265 100644 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak-run +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak-run @@ -1,19 +1,10 @@ #!/bin/bash -# A Flatpak app from the front end, full screen under gamescope like an emulator: -# droiddeck-flatpak-run <app-id> [args...] set -u export FLATPAK_BWRAP=/usr/local/bin/droiddeck-bwrap case ":${XDG_DATA_DIRS:-}:" in *"/flatpak/exports/share:"*) ;; *) export XDG_DATA_DIRS=$HOME/.local/share/flatpak/exports/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share} ;; esac -# Under gamescope - a program's session (BL_INSIDE), or droiddeck-gpu from the desktop -# (GAMESCOPE_WAYLAND_DISPLAY) - windows have to reach gamescope's X server. Flatpak would hand an -# app wayland-0 (it finds it in the runtime directory even with WAYLAND_DISPLAY unset) and the -# window would open behind gamescope. gamescope's own Wayland socket is no way out: Chromium on -# Wayland asks the render node it names for its DRM version, which KGSL cannot answer, and exits. -# The session is X11 as far as an app can tell; Electron picks its platform from that. -# Its own flatpak options (--branch, --command, from a menu entry) come first, then the app id. socket=() if [ -n "${BL_INSIDE:-}" ] || [ -n "${GAMESCOPE_WAYLAND_DISPLAY:-}" ]; then unset WAYLAND_DISPLAY @@ -21,7 +12,6 @@ if [ -n "${BL_INSIDE:-}" ] || [ -n "${GAMESCOPE_WAYLAND_DISPLAY:-}" ]; then socket=(--nosocket=wayland --socket=x11) fi echo "== flatpak run ${socket[*]} $*" -# Apps expect a session bus (settings, portals, single-instance checks); a run mode has none. if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ] && command -v dbus-run-session >/dev/null 2>&1; then exec dbus-run-session -- flatpak run "${socket[@]}" "$@" fi diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak-setup b/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak-setup index 2d0b2e7905..24806fa2e8 100644 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak-setup +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-flatpak-setup @@ -1,26 +1,10 @@ #!/bin/bash -# Puts Flatpak into the runtime, with Flathub as a per-user remote. Run by the app under proot's -# fake root (pacman and pacman-key refuse any other uid), outside a session. -# -# The runtime's pacman database lists only the base image: the desktop and emulator packages were -# unpacked over it without registering. Asked for flatpak the usual way, pacman "reinstalls" about -# a hundred of those - Mesa among them, over the runtime's own Turnip build with its KGSL backend - -# and then runs every hook in the image, mkinitcpio included. So pacman only fetches and checks the -# few packages Flatpak needs on top of this image, verifying each against the Arch Linux ARM -# keyring, and they are unpacked here without hooks or scripts, like the desktop package itself. -# -# droiddeck-flatpak-setup install or repair; prints "== STEP ..." milestones set -u export LANG=C.UTF-8 step() { echo "== STEP $*"; } fail() { echo "== FAIL $*"; exit 1; } -# Flatpak, the libraries it and appstream add to this image, and the D-Bus proxy flatpak run puts -# between an app and the session bus. bubblewrap is not among them: Android gives an app no user -# namespaces, and droiddeck-bwrap stands in for it (FLATPAK_BWRAP). PACKAGES="flatpak ostree appstream libxmlb libmalcontent libfyaml accountsservice composefs xdg-dbus-proxy" -# Libraries Flatpak and the store's helper also need, which the Desktop package brings but a -# runtime without it may lack: each is fetched only when its file is not already there. while read -r pkg probe; do [ -n "$pkg" ] || continue compgen -G "$probe" >/dev/null || PACKAGES="$PACKAGES $pkg" @@ -41,10 +25,15 @@ WORK=/var/cache/droiddeck-flatpak CONF=$WORK/pacman.conf mkdir -p "$WORK/pkg" "$WORK/db" || fail "cannot create $WORK" -# The image's pacman.conf names a download user this rootfs does not have (only root exists) and a -# sandbox proot cannot set up. Its one mirror is plain HTTP; these serve the same repos over TLS. -{ for m in https://ca.us.mirror.archlinuxarm.org https://fl.us.mirror.archlinuxarm.org \ - https://de3.mirror.archlinuxarm.org https://nl.mirror.archlinuxarm.org; do +OVERSEAS="https://ca.us.mirror.archlinuxarm.org https://fl.us.mirror.archlinuxarm.org https://de3.mirror.archlinuxarm.org https://nl.mirror.archlinuxarm.org" +MAINLAND="" +for m in https://mirrors.tuna.tsinghua.edu.cn/archlinuxarm https://mirrors.ustc.edu.cn/archlinuxarm \ + https://mirrors.bfsu.edu.cn/archlinuxarm https://mirrors.sjtug.sjtu.edu.cn/archlinuxarm; do + if curl -fsS -r 0-0 --connect-timeout 4 --max-time 8 -o /dev/null "$m/aarch64/core/core.db" 2>/dev/null; then + MAINLAND="$MAINLAND $m" + fi +done +{ for m in $MAINLAND $OVERSEAS; do echo "Server = $m/\$arch/\$repo"; done grep '^Server' /etc/pacman.d/mirrorlist 2>/dev/null; } > "$WORK/mirrorlist" sed -e 's/^DownloadUser/#DownloadUser/' \ @@ -58,8 +47,6 @@ if [ ! -f /etc/pacman.d/gnupg/pubring.gpg ] && [ ! -f /etc/pacman.d/gnupg/pubrin pacman-key --populate archlinuxarm >/dev/null 2>&1 || fail "pacman-key --populate failed" fi -# A database of our own, so the image's stays exactly as it was built: -Sy on it would leave the -# rest of the image a partial upgrade behind the repos. step "Reading the package lists" pacman --config "$CONF" --dbpath "$WORK/db" --noconfirm -Sy >/dev/null 2>&1 \ || pacman --config "$CONF" --dbpath "$WORK/db" --noconfirm -Sy 2>&1 | tail -3 \ @@ -67,8 +54,6 @@ pacman --config "$CONF" --dbpath "$WORK/db" --noconfirm -Sy >/dev/null 2>&1 \ [ -f "$WORK/db/sync/extra.db" ] || fail "could not reach the Arch Linux ARM mirrors" step "Downloading Flatpak" -# -w only downloads; pacman still checks each package's signature against the keyring. -dd: the -# dependencies are already in the image (and checked below by what the binaries actually link). out=$(pacman --config "$CONF" --dbpath "$WORK/db" --cachedir "$WORK/pkg" --noconfirm -Sw -dd $PACKAGES 2>&1) rc=$? echo "$out" | grep -vE '^\s*$' | tail -4 @@ -84,10 +69,8 @@ for name in $PACKAGES; do echo "$name $ver" >> "$WORK/installed.new" done mv -f "$WORK/installed.new" "$WORK/installed" -# Only the newest file of each package is worth keeping for a repair. find "$WORK/pkg" -type f -mtime +1 -delete 2>/dev/null -# What the binaries link is the real dependency list: anything this image lacks shows here. missing=$(for f in /usr/bin/flatpak /usr/lib/libflatpak.so.0 /usr/lib/libostree-1.so.1 /usr/bin/xdg-dbus-proxy; do ldd "$f" 2>&1 | grep -E 'not found|version .* not found' done | sort -u) @@ -98,9 +81,6 @@ python3 -c 'import gi; gi.require_version("Flatpak", "1.0"); from gi.repository step "Adding Flathub" export FLATPAK_BWRAP=/usr/local/bin/droiddeck-bwrap -# Flathub's descriptor - its URL and the key its commits are signed with - is carried here rather -# than fetched: adding the remote then needs no network, and a descriptor that did not arrive -# whole cannot be what failed. Flathub's own copy: https://dl.flathub.org/repo/flathub.flatpakrepo cat > "$WORK/flathub.flatpakrepo" <<'REPO' [Flatpak Repo] Title=Flathub @@ -115,7 +95,6 @@ if ! flatpak remote-list --user --columns=name 2>/dev/null | grep -qx flathub; t out=$(flatpak remote-add --user --if-not-exists flathub "$WORK/flathub.flatpakrepo" 2>&1) rc=$? echo "$out" - # What Flatpak said goes up with the failure, so the app can show it rather than a guess. [ $rc -eq 0 ] || fail "could not add the Flathub remote: $(echo "$out" | grep -v '^[[:space:]]*$' | tail -1)" fi echo "== DONE $(flatpak --version)" diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-fonts b/tools/linuxfs/overlay/usr/local/bin/droiddeck-fonts index cddcc15bc8..030585f3dd 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-fonts +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-fonts @@ -1,24 +1,12 @@ #!/bin/bash -# DroidDeck's fontconfig setup for the Linux runtime. The rootfs ships DejaVu alone and no rules -# for a default family: applications then find fonts but no default, and Firefox logs "no fonts" -# and draws pages without text. DejaVu also has no CJK, Thai or Arabic glyphs, so those draw as -# tofu boxes. The app binds Android's fonts for the session, which adds language-specific fallbacks -# separately. This script links fontconfig's default rules and writes generic DejaVu aliases to an -# owned conf.d file. Fontconfig reads local.conf afterward, so user overrides keep precedence and -# are never replaced. -# The first argument is the root to set up, "/" in a session; the tests point it at a temp tree. set -u root=${1:-/} root=${root%/} -# "/" strips to empty above; put it back so the paths below read as absolute and the test for a -# real session ("/") still holds. [ -n "$root" ] || root=/ conf_dir=$root/etc/fonts defaults_dir=$root/usr/share/fontconfig/conf.default mkdir -p "$conf_dir/conf.d" 2>/dev/null -# The default rules (sans-serif -> DejaVu Sans and the rest) live as links in /etc/fonts/conf.d, -# and the rootfs has none. Linked by name, so a file we ship is never overwritten. if [ -d "$defaults_dir" ]; then for f in "$defaults_dir"/*.conf; do [ -e "$f" ] || continue diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-game-env b/tools/linuxfs/overlay/usr/local/bin/droiddeck-game-env index 792a7676aa..30c8a25552 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-game-env +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-game-env @@ -7,7 +7,7 @@ import subprocess import sys from pathlib import Path -SYNC_KEYS = ("BL_SYNC_FALLBACK", "BL_FSYNC_FIRST", "BL_SYNC_MIN_NOFILE", "PROTON_NO_ESYNC", "PROTON_NO_FSYNC", "PROTON_NO_NTSYNC", "WINEESYNC") +SYNC_KEYS = ("BL_SYNC", "BL_SYNC_FALLBACK", "BL_FSYNC_FIRST", "BL_SYNC_MIN_NOFILE", "PROTON_NO_ESYNC", "PROTON_NO_FSYNC", "PROTON_NO_NTSYNC", "WINEESYNC") SEED_REDISTS = "/usr/local/bin/droiddeck-seed-redists" PACK_KEYS = ("WINESERVER", "BL_SYNC_PACK", "WINEESYNC", "PROTON_NO_ESYNC", "PROTON_NO_FSYNC") @@ -25,8 +25,6 @@ def game_id(env): return str(number % 2**32) -# A .NET (CoreCLR) runtime under FEX crashes in the runtime itself unless memory ordering is fully -# emulated and multiblock is off: the Stability preset. DOTNET_FEX = { "FEX_TSOENABLED": "1", "FEX_VECTORTSOENABLED": "1", @@ -69,8 +67,6 @@ class Game: return any(a == name or a.startswith(name + "=") for a in self.args) -# Each fix looks at a Game and returns (environment, extra arguments, note) for the games it -# applies to, or None. Adding one is writing a function and decorating it. FIXES = [] @@ -91,21 +87,25 @@ def dotnet_memory_ordering(game): @fix def godot_vulkan(game): - # Godot 4 on Direct3D 12 through VKD3D-Proton fails to create its swap chain and runs behind a - # black window; its own Vulkan renderer draws. if is_godot(game) and not game.has_arg("--rendering-driver"): return {}, ["--rendering-driver", "vulkan"], "Godot: Vulkan renderer" @fix def godot_sentry(game): - # The Sentry GDExtension's native crash handler takes the .NET runtime down under FEX. Godot - # loads it on demand and carries on without it. sentry = sorted(n[:-4] for n in game.files if n.startswith("libsentry.windows.") and n.endswith(".dll")) if is_godot(game) and sentry: return {"WINEDLLOVERRIDES": ";".join(n + "=d" for n in sentry)}, [], "Godot: Sentry crash handler off" +@fix +def arkham_city_x87(game): + """Batman: Arkham City (BatmanAC.exe, also started through BmLauncher.exe beside it) leans on x87 + and stops with Unreal's "Fatal error!" right after start when FEX reduces its precision.""" + if "batmanac.exe" in game.files: + return {"FEX_X87REDUCEDPRECISION": "0"}, [], "Batman: Arkham City: FEX with full x87 precision" + + def skip_red_launcher(command): """Cyberpunk 2077's prelauncher opens REDlauncher, a Qt WebEngine window that hands over to the game half a minute later and then stays up beside it, well over a core busy for as long as the @@ -166,9 +166,10 @@ def apply_config(env, config, app_id, fixes=None): result[name] = value else: raise ValueError("invalid environment value") - # The app's texture filtering (Display page), as DXVK options appended after the profiles so - # a DXVK_CONFIG entry of the user's keeps its own. - dxvk = config.get("dxvkConfig") + game_dxvk = config.get("dxvkConfigGames", {}) + if not isinstance(game_dxvk, dict): + raise ValueError("invalid game dxvk configuration") + dxvk = game_dxvk.get(app_id, config.get("dxvkConfig")) if dxvk is not None: if not isinstance(dxvk, str) or "\0" in dxvk or len(dxvk) > 8192: raise ValueError("invalid dxvk configuration") @@ -260,7 +261,7 @@ def mark_install_scripts(command, env): ones stop with an error.""" if not any(arg.lower().replace("\\", "/").endswith("iscriptevaluator.exe") for arg in command): return - root = env.get("STEAM_COMPAT_CLIENT_INSTALL_PATH") or str(Path.home() / ".local/share/Steam") + root = env.get("BL_X64_STEAM_ROOT") or env.get("STEAM_COMPAT_CLIENT_INSTALL_PATH") or str(Path.home() / ".local/share/Steam") scripts = [str(Path(root) / arg.replace("\\", "/")) for arg in command if EVALUATOR_SCRIPT.search(arg)] scripts = [path for path in scripts if os.path.isfile(path)] if not scripts: @@ -277,6 +278,7 @@ def main(): if not command: return 2 env = os.environ.copy() + mic_enabled = env.get("BL_MIC_ENABLED") mark_install_scripts(command, env) app_id = game_id(env) if app_id: @@ -305,6 +307,8 @@ def main(): env = apply_config(env, {"version": 1}, app_id, fixes) except (OSError, ValueError, TypeError, AttributeError): print("droiddeck-game-env: invalid configuration; using inherited environment", file=sys.stderr) + if mic_enabled == "0": + env["BANNER_AUDIO_DIRECT_MIC"] = "0" env = force_ssbs(command, env) sync = load_sync() launch, launch_env = select_sync(command, env, sync) diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-gpu-window b/tools/linuxfs/overlay/usr/local/bin/droiddeck-gpu-window index 42a01f274f..f5cb4007cb 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-gpu-window +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-gpu-window @@ -8,8 +8,6 @@ import sys def advertise_compositing(): - # This is gamescope's private X server: it composites alpha buffers already, but GTK also - # requires the compositing-manager selection and frame-extents hint before enabling CSD. x = c.CDLL('libX11.so.6') display_type, window_type = c.c_void_p, c.c_ulong x.XOpenDisplay.argtypes = [c.c_char_p] @@ -41,7 +39,6 @@ def advertise_compositing(): x.XChangeProperty(display, root, atom('_NET_SUPPORTED'), atom('ATOM'), 32, 2, c.byref(extents), 1) x.XSync.argtypes = [display_type, c.c_int] x.XSync(display, False) - # Keep the selection's connection alive until the program exits. return x, display diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-launcher-cores b/tools/linuxfs/overlay/usr/local/bin/droiddeck-launcher-cores index dad3d1033c..3ea0c56811 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-launcher-cores +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-launcher-cores @@ -22,14 +22,10 @@ import sys import time from pathlib import Path -# Image paths (lower case, backslashes), matched at the end: the helpers held back, and the -# programs whose window having focus means the user is looking at the launcher. HELPERS = ("\\rockstar games\\social club\\socialclubhelper.exe",) FRONTS = HELPERS + ("\\rockstar games\\launcher\\launcher.exe",) NICE = 19 POLL = 2.0 -# How often a held launcher is looked over again: for a helper the unheld Launcher.exe started -# since, and for threads the program has moved back. RESCAN = 10.0 STEAM_CLIENT = 769 @@ -72,8 +68,6 @@ class Cores: try: os.sched_setaffinity(tid, cpus) except OSError: - # A mask outside the app's cpuset now (Android shrinks it in the background) is - # EINVAL; the session's own is always allowed. os.sched_setaffinity(tid, self.own()) os.setpriority(os.PRIO_PROCESS, tid, nice) @@ -83,7 +77,7 @@ class Holder: self.proc = proc self.cpufreq = cpufreq self.cores = cores or Cores() - self.held = {} # pid -> {tid: (cpus, nice) before the hold} + self.held = {} self.core = None def slow_core(self): @@ -117,10 +111,8 @@ class Holder: if now != hold: self.cores.set(tid, *hold) except OSError: - continue # the thread ended + continue if tid not in before: - # A thread that already has the hold inherited it from a held parent: it gets - # what its process had, or the helpers' first. before[tid] = now if now != hold else before.get(pid) or self.first() or now for pid in [pid for pid in self.held if not (self.proc / str(pid)).exists()]: del self.held[pid] @@ -191,8 +183,6 @@ class Governor: self.holder.release() self.report("released: the launcher has focus") return - # Nothing to look for until a game has had focus: launchers only run for one, and a launcher - # left running after its game stays held through the Steam client's own focus. if self.app in (None, 0, STEAM_CLIENT) and not self.holder.held: return now = self.clock() diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-login1 b/tools/linuxfs/overlay/usr/local/bin/droiddeck-login1 index ce74b0b50d..c3b884e414 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-login1 +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-login1 @@ -5,16 +5,20 @@ Android owns device power. Suspend here pauses the guest through SessionService; the app's Resume action thaws it and completes PrepareForSleep(false). Steam must see this service before startup or it can stay black after its idle timer. """ +import importlib.machinery +import importlib.util import os from pathlib import Path import re +import subprocess import sys +import threading import uuid import gi gi.require_version("Gio", "2.0") -from gi.repository import Gio, GLib # noqa: E402 +from gi.repository import Gio, GLib NAME = "org.freedesktop.login1" ROOT = "/org/freedesktop/login1" @@ -22,6 +26,8 @@ INTERFACE = NAME + ".Manager" UPOWER = "org.freedesktop.UPower" UPOWER_ROOT = "/org/freedesktop/UPower" NATIVE_PREPARE_MS = 1500 +AGENT = Path(__file__).resolve().with_name("droiddeck-agent") +ASLEEP_WAIT = 6 INTROSPECTION = """ <node> <interface name="org.freedesktop.login1.Manager"> @@ -56,8 +62,6 @@ class LoginManager: self.preparation = None info = Gio.DBusNodeInfo.new_for_xml(INTROSPECTION).interfaces[0] self.registration = bus.register_object(ROOT, info, self.method, self.property, None) - # Steam can issue its suspend command through the legacy UPower service even - # while listening to login1's sleep/resume notifications. Use one handshake. upower_info = Gio.DBusNodeInfo.new_for_xml(UPOWER_INTROSPECTION).interfaces[0] self.upower_registration = bus.register_object(UPOWER_ROOT, upower_info, self.method, None, None) self.monitor = Gio.File.new_for_path(str(self.directory)).monitor_directory(Gio.FileMonitorFlags.NONE, None) @@ -80,14 +84,13 @@ class LoginManager: if name == "CanSuspend": reply.return_value(GLib.Variant("(s)", ("yes",))) elif name in ("Suspend", "SuspendWithFlags"): + print("== login1: %s.%s asked by %s" % (interface.rsplit(".", 1)[-1], name, sender), flush=True) if self.pending: reply.return_dbus_error(NAME + ".OperationInProgress", "The session is already pausing") return self.pending = uuid.uuid4().hex self.notify(True) reply.return_value(None) - # Flush the signal and method reply without blocking this D-Bus callback. Once both are - # on the wire, publishing the request lets the host safely freeze this service. self.bus.flush(None, self.publish_after_flush, self.pending) def publish_after_flush(self, connection, result, token): @@ -122,7 +125,6 @@ class LoginManager: return if not re.fullmatch(r"[a-f0-9]{32}", token) or self.pending is not None: return - # Android may have returned before this helper read its request. if self.read_state() == token + ":awake": return self.pending = token @@ -138,8 +140,6 @@ class LoginManager: return self.check_state() if self.pending == token: - # Keep Steam runnable while it handles the system sleep notification. - # This is a bounded grace period, not a claim that every game has saved. self.preparation = GLib.timeout_add(NATIVE_PREPARE_MS, self.finish_preparation, token) def finish_preparation(self, token): @@ -154,7 +154,7 @@ class LoginManager: if file.get_basename() == self.wake.name or (other and other.get_basename() == self.wake.name): if self.wake.exists(): self.wake.unlink(missing_ok=True) - self.resume(force=True) + self.woken() if file.get_basename() == self.state.name or (other and other.get_basename() == self.state.name): self.check_state() @@ -171,17 +171,27 @@ class LoginManager: def check_ack(self): self.timeout = None if self.pending and self.read_state() != self.pending + ":paused": - # A missing host or a failed freeze must not strand Steam in black. self.request.unlink(missing_ok=True) self.native_ready.unlink(missing_ok=True) self.resume() return False + def woken(self): + if self.pending is not None: + self.resume(force=True) + return + threading.Thread(target=lambda: GLib.idle_add(self.replay_unless_awake, steam_asleep()), daemon=True).start() + + def replay_unless_awake(self, asleep): + if asleep is False and self.pending is None: + print("== login1: Steam is awake; no sleep/wake replay", flush=True) + return False + self.resume(force=True) + return False + def resume(self, force=False): if self.pending is None: if force: - # A missed suspend command leaves Steam without the first half of - # the handshake. Replay both notifications, without pausing again. self.notify(True) self.bus.flush(None, self.finish_recovery, None) return @@ -203,6 +213,24 @@ class LoginManager: self.notify(False) +def steam_asleep(): + try: + code = subprocess.run([str(AGENT), "--steam-asleep"], stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, timeout=ASLEEP_WAIT).returncode + except (OSError, subprocess.SubprocessError): + return None + return {0: True, 5: False}.get(code) + + +def load_netmanager(): + path = Path(__file__).resolve().with_name("droiddeck-netmanager") + loader = importlib.machinery.SourceFileLoader("droiddeck_netmanager", str(path)) + spec = importlib.util.spec_from_loader(loader.name, loader) + module = importlib.util.module_from_spec(spec) + loader.exec_module(module) + return module + + def main(): directory = os.environ.get("BL_LAUNCH_DIR") if not directory or not Path(directory).is_dir(): @@ -228,6 +256,8 @@ def main(): owners = [Gio.bus_own_name(Gio.BusType.SYSTEM, name, Gio.BusNameOwnerFlags.NONE, connected, acquired, lost) for name in (NAME, UPOWER)] + if "--with-netmanager" in sys.argv[1:]: + owners.append(load_netmanager().own(loop)) try: loop.run() finally: diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-msi-install b/tools/linuxfs/overlay/usr/local/bin/droiddeck-msi-install index bfa637a7fa..87e741c461 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-msi-install +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-msi-install @@ -43,7 +43,6 @@ CABEXTRACT = os.environ.get("DROIDDECK_CABEXTRACT", str(TOOLS / "cabextract")) SEVENZIP = os.environ.get("DROIDDECK_7Z", str(TOOLS / "7z")) MSI_MAGIC = b"\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" BURN_MAGIC = 0x00F14300 -# A bundle's manifest names ARM64 packages too; a game's prefix wants the x86 and x64 ones. SKIP_PLATFORMS = ("arm64", "arm") @@ -53,9 +52,6 @@ def tool_env(): env["LD_LIBRARY_PATH"] = ":".join(p for p in (str(TOOLS), env.get("LD_LIBRARY_PATH", "")) if p) return env -# The folders Windows Installer knows by name, as a 64-bit Windows 10 prefix lays them out (Proton's -# user is steamuser). None is a folder whose files a game never needs: installer temp files and -# shortcuts. SKIP = None KNOWN_FOLDERS = { "TARGETDIR": "C:\\", "ROOTDRIVE": "C:\\", "WindowsVolume": "C:\\", @@ -78,25 +74,17 @@ for _name in ("TempFolder", "DesktopFolder", "ProgramMenuFolder", "StartMenuFold "TemplateFolder", "MyPicturesFolder", "AdminToolsFolder"): KNOWN_FOLDERS[_name] = SKIP -# What Wine's msi reports on a 64-bit Windows 10 prefix, for the packages' conditions. SYSTEM_PROPERTIES = { "VersionNT": "603", "VersionNT64": "603", "WindowsBuild": "9600", "ServicePackLevel": "0", "Msix64": "6", "ALLUSERS": "1", "Privileged": "1", "AdminUser": "1", "MsiNTProductType": "1", "UILevel": "2", "INSTALLLEVEL": "1", "ProgramFilesFolder": None, "VersionMsi": "5.00", } -# Win64 component (msidbComponentAttributes64bit); file attributes. COMPONENT_64BIT = 0x100 FILE_NONCOMPRESSED = 0x2000 -# Custom action types that only set a property or a folder: done here, the rest are named in notes. SET_PROPERTY, SET_DIRECTORY, ERROR_ACTION = 51, 35, 19 -# Microsoft's "SFP CA" merge module (MDAC, MSXML): on Windows 2000 and later it parks system DLLs in a -# cache folder and its own code copies them into the system folder past Windows File Protection. -# Skipping the folder change puts them where that copy would. Its actions, and the side-by-side -# merge module's (done here from MsiAssembly), are then left out of the notes. SFP_CACHE_ACTION = "CDirSystemSFPCacheDir" HANDLED_ACTIONS = ("Wdsfpca_", "SxsInstallCA", "SxsUninstallCA") -# Tables whose work needs the package's own code or is not done here yet. UNSUPPORTED_TABLES = ("SelfReg", "Class", "ProgId", "TypeLib", "Extension", "Verb", "MIME", "AppId", "IniFile", "ServiceInstall", "MoveFile", "IsolatedComponent", "PublishComponent", "ODBCDriver", "ODBCDataSource") @@ -123,7 +111,6 @@ class Span: progress(text, self.lo + (self.hi - self.lo) * max(0.0, min(1.0, fraction))) -# ---------------------------------------------------------------- reading the package IDT_ESCAPES = str.maketrans({"\x19": "\n", "\x11": "\r", "\x15": "\t", "\x1b": ";"}) @@ -182,7 +169,6 @@ def to_int(value, default=0): return default -# ---------------------------------------------------------------- conditions TOKEN = re.compile(r'\s*(?:(?P<str>"[^"]*")|(?P<num>-?\d+)(?![\w.])|(?P<op>~?(?:<>|<=|>=|><|<<|>>|=|<|>))' r'|(?P<paren>[()])|(?P<word>[%$?&!]?[A-Za-z_][\w.]*))') @@ -330,7 +316,6 @@ class Conditions: return value not in ("", None) -# ---------------------------------------------------------------- the install def win_to_rel(path): """C:\\windows\\x\\ -> drive_c/windows/x; None for a path off drive C or a folder left out.""" @@ -375,7 +360,7 @@ class Installer: self.span = span or Span() self.notes = [] self.registry = [] - self.files = {} # File key -> rel path it was installed to + self.files = {} self.counts = {"files": 0, "assemblies": 0, "registry": 0} template = self.pkg.summary.get("template", "") self.platform = template.split(";")[0].strip().lower() @@ -385,7 +370,6 @@ class Installer: for name, path in KNOWN_FOLDERS.items(): self.props[name] = path if path is not None else "\0skip" for row in self.pkg.table("Property"): - # The package's own defaults, but never over the folders and the system it runs on. if row["Property"] not in self.props or row["Property"] in ("INSTALLLEVEL", "ALLUSERS", "UILevel"): self.props[row["Property"]] = row["Value"] self.props["ALLUSERS"] = "1" @@ -397,7 +381,6 @@ class Installer: self._resolving = set() self._set_by_action = set() - # -- states, folders, formatted text def feature_state(self, name): return 3 if name in self.included_features else -1 @@ -411,13 +394,11 @@ class Installer: return None value = self.props.get(key) row = self.directories.get(key) - # A folder Windows knows by name, one a custom action set, or a property naming a path. if key in KNOWN_FOLDERS or key in self._set_by_action or row is None: return None if value in (None, "", "\0skip") else win_to_rel(value) parent_key = row.get("Directory_Parent", "") default = long_name(row.get("DefaultDir", "").split(":")[0]) if not parent_key or parent_key == key: - # A root: TARGETDIR (SourceDir) is drive C. return "drive_c" self._resolving.add(key) try: @@ -466,7 +447,6 @@ class Installer: text = re.sub(r"\[([^\[\]]*)\]", one, text) return text - # -- what gets installed def run_set_actions(self): """The property/folder-setting custom actions, in sequence order; the rest go to the notes.""" @@ -581,8 +561,6 @@ class Installer: self.pkg.stream(cabinet[1:], cab) own = True else: - # An external cabinet: a file beside the package, as an installer wrapper lays it out - # (vc_red.cab beside vc_red.msi, netfx_Full.mzz beside netfx_Full_x64.msi). cab = sibling(Path(self.pkg.path), cabinet) if cab is None: self.notes.append("external cabinet %s is not part of the package; its files are missing" % cabinet) @@ -601,15 +579,17 @@ class Installer: def put(self, source, rel): target = self.out / rel + if target.exists() and Path(source).samefile(target): + return False target.parent.mkdir(parents=True, exist_ok=True) shutil.copyfile(source, target) + return True def install_files(self, unpacked): assemblies = self.assemblies() files = self.pkg.table("File") missing = 0 destinations = {} - # Where each file goes: its component's folder, or the assembly store for a global assembly. for row in files: comp = row["Component_"] if comp not in self.included_components: @@ -664,16 +644,12 @@ class Installer: folder = self.directory(row["DestFolder"]) if row.get("DestFolder") else self.files[row["File_"]].rsplit("/", 1)[0] name = long_name(row.get("DestName", "")) or self.files[row["File_"]].rsplit("/", 1)[1] source = self.out / self.files[row["File_"]] - if folder and source.is_file() and "/" not in name: - self.put(source, folder + "/" + name) + if folder and source.is_file() and "/" not in name and self.put(source, folder + "/" + name): self.counts["files"] += 1 if missing: self.notes.append("%d file(s) were not in the package's cabinets" % missing) def value(self, hive, key, name, kind, data, wow64): - # A 32-bit component writes through the 32-bit view, as Wine's msi does: HKLM\Software is - # Software\Wow6432Node, and the prefix's link keys there (Classes, TypeLib, Fonts...) lead - # to the keys both views share - droiddeck-wincomponents follows them when it writes. lower = key.lower() if hive == "HKLM" and wow64 and lower.startswith("software\\") and not lower.startswith("software\\wow6432node\\"): key = "Software\\Wow6432Node\\" + key[len("software\\"):] @@ -782,7 +758,6 @@ class Installer: self.check() if not self.counts["files"] and not self.registry: raise MsiError("the package installs nothing here") - # A component made of several packages (32- and 64-bit) gets them all in one registry.json. values = [] try: with open(self.out / "registry.json", encoding="utf-8") as source: @@ -796,7 +771,6 @@ class Installer: "counts": self.counts, "notes": self.notes} -# ---------------------------------------------------------------- installer wrappers def sibling(path, name): """A file next to [path] called [name], whatever its case; None when there is none.""" @@ -974,8 +948,6 @@ def install_wrapper(path, out): try: result = Installer(str(package), out, span=Span(lo, hi)).install() except MsiError as error: - # A package with nothing for this prefix (a patch for another Windows) is skipped, - # unless it is the only one; anything else is the whole installer's failure. if "installs nothing" in str(error) and len(packages) > 1: total["notes"].append("%s: %s" % (package.name, error)) continue diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-netmanager b/tools/linuxfs/overlay/usr/local/bin/droiddeck-netmanager index 7d468e5ff0..814b110c93 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-netmanager +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-netmanager @@ -1,8 +1,4 @@ #!/usr/bin/python3 -# Based on WinNative (maxjivi05, feature/wayland-gamescope e7a224ae), GPL-3.0. -# Steam speaks NetworkManager; Android owns the radios, routes and connection. Export the -# app's live snapshot through that API, including nearby Wi-Fi access points. Requests to -# scan are handed to Android; Android settings still handle joining networks. import ipaddress import json import re @@ -16,7 +12,7 @@ from xml.sax.saxutils import escape import gi gi.require_version("Gio", "2.0") -from gi.repository import Gio, GLib # noqa: E402 +from gi.repository import Gio, GLib NAME = "org.freedesktop.NetworkManager" ROOT = "/org/freedesktop/NetworkManager" @@ -60,7 +56,6 @@ def v(signature, value): def read_snapshot(): - # Atomic replacement by the app means we never see a partially written handover. try: state = json.loads(SNAPSHOT.read_text()) if not isinstance(state, dict) or not isinstance(state.get("connected"), bool): @@ -71,7 +66,6 @@ def read_snapshot(): def legacy_snapshot(): - # Older APKs do not publish transport metadata. Never guess Wi-Fi from an interface name. try: with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock: sock.connect(("192.0.2.1", 9)) @@ -101,10 +95,10 @@ def connection_name(state): def connectivity(state): if not state["connected"]: - return 1 # NONE + return 1 if state.get("validated"): - return 4 # FULL - return 2 if state.get("captivePortal") else 3 # PORTAL / LIMITED + return 4 + return 2 if state.get("captivePortal") else 3 def metered(state): @@ -155,7 +149,6 @@ def active_ap(state): def ap_security(capabilities): - # NetworkManager's cipher/key-management flags, from Android's beacon capabilities. wpa = rsn = 0 for group in re.findall(r"\[([^]]+)\]", capabilities.upper()): flags = 0 @@ -280,7 +273,6 @@ def objects(state): if present: found[path] = {NAME + f".IP{version}Config": ip_config(state, version)} if up and not wifi and state.get("wifiEnabled"): - # Android can keep its Wi-Fi radio available while cellular/VPN is the default route. wireless = objects(dict(state, connected=False, transport="none", interface=state.get("wifiInterface", "wlan0"), metered=None)) wifi_device = ROOT + "/Devices/Wifi" @@ -304,13 +296,11 @@ def settings(state): "ssid": v("ay", list((state.get("ssid") or "Wi-Fi").encode("utf-8"))), "mode": v("s", "infrastructure"), } elif state.get("transport") == "cellular": - result["gsm"] = {} # Android owns the SIM/APN; no credentials are exported. + result["gsm"] = {} return result def interface_info(interface, values): - # Register properties on the actual objects as well as returning ObjectManager snapshots. - # Steam/libnm also use Properties.Get/GetAll and introspect the wireless methods. props = "".join(f'<property name="{escape(key)}" type="{value.get_type_string()}" access="read"/>' for key, value in values.items()) node = Gio.DBusNodeInfo.new_for_xml(f'<node><interface name="{interface}">{METHODS.get(interface, "")}{props}</interface></node>') @@ -372,7 +362,7 @@ class NetworkManager: def check(self): state = read_snapshot() if state is None: - return True # A transient read failure must not replace a known link with Ethernet. + return True if state == self.state: return True before, after = self.objects, objects(state) @@ -418,8 +408,7 @@ class NetworkManager: self.bus.emit_signal(None, path, OBJECT_MANAGER, signal, body) -def main(): - loop = GLib.MainLoop() +def own(loop): state = {} def acquired(bus, name): @@ -429,7 +418,12 @@ def main(): print("== netmanager: the system bus is gone", file=sys.stderr) loop.quit() - Gio.bus_own_name(Gio.BusType.SYSTEM, NAME, Gio.BusNameOwnerFlags.NONE, acquired, None, lost) + return Gio.bus_own_name(Gio.BusType.SYSTEM, NAME, Gio.BusNameOwnerFlags.NONE, acquired, None, lost) + + +def main(): + loop = GLib.MainLoop() + own(loop) loop.run() diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-open b/tools/linuxfs/overlay/usr/local/bin/droiddeck-open index 3ceb080dff..0809a228f7 100644 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-open +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-open @@ -33,9 +33,7 @@ APPIMAGE_RUN = os.path.join(BIN, "droiddeck-appimage-run") SCRIPT_RUN = os.path.join(BIN, "droiddeck-script-run") STEAM_LAUNCH = os.path.join(BIN, "droiddeck-steam-launch") CACHE = os.path.join(HOME, ".cache", "droiddeck") -# Where the app adds each kind, and what an added one holds. IMPORTS = {"appimage": ("/opt/appimages/user", "app"), "folder": ("/opt/droiddeck-apps", "entry")} -# Android's own folders on shared storage: never copied in whole. SHARED_FOLDERS = ("alarms", "android", "audiobooks", "dcim", "documents", "download", "movies", "music", "notifications", "pictures", "podcasts", "recordings", "ringtones") SCAN_LIMIT = 4000 diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-open-url b/tools/linuxfs/overlay/usr/local/bin/droiddeck-open-url index 69d5c65aa5..8908335191 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-open-url +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-open-url @@ -36,7 +36,6 @@ def where(url): def main(argv): url = argv[0] if argv else "" - # The Steam client's own form (steam://openurl/<address>), in case a launcher passes it on. if url.startswith("steam://openurl/"): url = url[len("steam://openurl/"):] launch_dir = os.environ.get("BL_LAUNCH_DIR", "") diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-pad-defaults b/tools/linuxfs/overlay/usr/local/bin/droiddeck-pad-defaults index 4e15fae075..04966c4b2c 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-pad-defaults +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-pad-defaults @@ -1,9 +1,4 @@ #!/usr/bin/python3 -# Player 1 on the session's controller, for every emulator that would otherwise start on the -# keyboard. The session's pad is an Xbox 360 controller (libfakeinput's identity outside Steam) that -# SDL maps by itself; what an emulator lacks is a profile that points Player 1 at it. One is -# written only where the emulator has none yet - a profile the user made is never touched. -# Run at every desktop start and before every program from the rail. import os HOME = os.environ.get("HOME", "/root") @@ -21,10 +16,6 @@ def seed(path, text, what, done="Player 1 on the controller"): return True -# RPCS3: its global input configuration (rpcs3::utils::get_input_config_dir() + "Default.yml"). -# Without one it adds the keyboard pad handler (pad_config.cpp, cfg_input::load). SDL handler -# names from rpcs3/Input/sdl_pad_handler.cpp (button_list, init_config); the device is -# "<SDL gamepad name> <n>" (sdl_pad_handler::enumerate_devices). RPCS3_PLAYER1 = """Player 1 Input: Handler: SDL Device: Xbox 360 Controller 1 @@ -71,13 +62,8 @@ def rpcs3(): rpcs3_shader_mode() -# RPCS3's default shader mode (Async Recompiler with Shader Interpreter) builds 6650 interpreter -# pipelines at the start of every boot, minutes on an Adreno. The async recompiler compiles only -# what a game draws, in the background, once. A new install starts with it (a config.yml that -# holds only this is merged over RPCS3's defaults); an existing one still on the default is moved -# once, and a marker keeps any later choice the user makes in RPCS3's own settings. RPCS3_INTERPRETER = "Async Recompiler with Shader Interpreter" -RPCS3_RECOMPILER = "Async Recompiler (multi-threaded)" # the GUI says "Async Shader Recompiler"; this is the value (system_config_types.cpp) +RPCS3_RECOMPILER = "Async Recompiler (multi-threaded)" def rpcs3_shader_mode(): @@ -101,7 +87,6 @@ def rpcs3_shader_mode(): open(marker, "w").close() -# ---- ini helpers (DuckStation and PCSX2 share one ini dialect, keys may repeat) ------------- def ini_section(lines, name): """(start, end) line indices of [name]'s body, or None.""" @@ -132,7 +117,6 @@ def patch_ini_section(path, section, body, what, needle="SDL-", require=None, do return new = body.strip("\n").splitlines() if span: - # The controller type the emulator already wrote stays; only bindings are added. have = {l.split("=", 1)[0].strip() for l in lines[span[0]:span[1]] if "=" in l} new = [l for l in new if not (l.split("=", 1)[0].strip() == "Type" and "Type" in have)] end = span[1] @@ -147,8 +131,6 @@ def patch_ini_section(path, section, body, what, needle="SDL-", require=None, do print(f"droiddeck-pad-defaults: {what}: {done} ({path})") -# DuckStation: SDL-<n>/<name>, axes signed (src/util/sdl_input_source.cpp); Pad1 keys from -# src/core/analog_controller.cpp. Its defaults bind the keyboard only (settings.cpp). DUCKSTATION_PAD1 = """Type = AnalogController Up = SDL-0/DPadUp Down = SDL-0/DPadDown @@ -244,17 +226,12 @@ def bios_folder(base): d = os.path.join(base, "bios") if os.path.isdir(ROMS): try: - os.makedirs(d, exist_ok=True) # where the user is told to put their BIOS + os.makedirs(d, exist_ok=True) except OSError: pass return d -# DuckStation (PS1) - set up like ARMSX2: users bring their own BIOS and games, in the ROMs folder. -# Front-end runs use -batch -bigpicture -fullscreen, so the guide button is the pause menu -# (Hotkeys OpenPauseMenu, src/core/hotkeys.cpp), not the analog toggle. Keys from -# src/core/settings.cpp: [BIOS] SearchDirectory, [GPU] Renderer ("Vulkan"), [Main] -# SetupWizardIncomplete (src/duckstation-qt/qthost.cpp). DUCKSTATION_PAD1_GUIDE_FREE = "\n".join(l for l in DUCKSTATION_PAD1.splitlines() if not l.startswith("Analog ")) + "\n" @@ -266,8 +243,6 @@ def duckstation(): if not os.path.isfile(ini) and os.path.isfile(legacy): ini = legacy if not os.path.isfile(ini): - # A new player: everything DuckStation's first-time setup asks is answered here (it finds - # the BIOS in its folder by itself), so a game from the front end boots straight away. bios = bios_folder(ps1) seed(ini, "[Main]\nSetupWizardIncomplete = false\nInhibitScreensaver = false\n\n" f"[BIOS]\nSearchDirectory = {bios}\n\n" @@ -282,17 +257,12 @@ def duckstation(): done="the guide button opens the pause menu") patch_ini_section(ini, "GameList", f"RecursivePaths = {ps1}\n", "DuckStation", needle=ROMS, done="games listed from the ROMs folder") - # One set up by an earlier build still has its first-time setup pending, in the way of a game. if ini_get(ini, "Main", "SetupWizardIncomplete") == "true": ini_set(ini, "Main", "SetupWizardIncomplete", "false") print("droiddeck-pad-defaults: DuckStation: first-time setup already done here") - # Keeping the screen awake goes through org.freedesktop.ScreenSaver, which nothing in the session - # provides (Android decides when the screen sleeps): DuckStation only warns it failed, every game. if (ini_get(ini, "Main", "InhibitScreensaver") or "true") == "true": ini_set(ini, "Main", "InhibitScreensaver", "false") print("droiddeck-pad-defaults: DuckStation: no screensaver inhibit (no such service here)") - # Once, for a DuckStation set up before this: its own empty BIOS folder moves to the ROMs folder, - # and Automatic becomes Vulkan. A later choice in DuckStation's settings is kept. marker = os.path.join(os.path.dirname(ini), ".droiddeck-setup") if os.path.exists(marker): return @@ -307,8 +277,6 @@ def duckstation(): open(marker, "w").close() -# PCSX2: FaceSouth/... names (pcsx2/Input/SDLInputSource.cpp), keys from SIO/Pad/PadDualshock2.cpp. -# An ini without [UI] SettingsVersion is thrown away and rebuilt, so only a complete one is patched. PCSX2_PAD1 = """Type = DualShock2 Up = SDL-0/DPadUp Right = SDL-0/DPadRight @@ -346,8 +314,6 @@ def pcsx2(): -# Dolphin: SDL/<id>/<SDL gamepad name>; control names from InputCommon/.../SDL/SDLGamepad.h (Left Y+ -# is up). A section that exists is taken whole - keys it lacks are unbound - so both are complete. DOLPHIN_GC = """[GCPad1] Device = SDL/0/Xbox 360 Controller Buttons/A = `Button S` @@ -406,11 +372,6 @@ Nunchuk/Stick/Right = `Left X+` """ -# ARMSX2 - the PS2 emulator (PCSX2 with ARM64 recompilers; upstream PCSX2 interprets on ARM64). Its -# files are PCSX2's under $XDG_CONFIG_HOME/ARMSX2 (pcsx2/Pcsx2Config.cpp). The user supplies the BIOS -# and the games; they live in the ROMs folder (/root/ROMs). The guide button opens the pause menu -# (Hotkeys OpenPauseMenu) - the way out of a game started from the front end, which runs ARMSX2 -# without its window (-batch -bigpicture) - so it is not also the analog toggle here. ARMSX2_PAD1 = "\n".join(l for l in PCSX2_PAD1.splitlines() if not l.startswith("Analog ")) + "\n" ROMS = "/root/ROMs" @@ -432,7 +393,7 @@ def ps2_bios_folder(): d = os.path.join(base, "bios") if os.path.isdir(ROMS): try: - os.makedirs(d, exist_ok=True) # where the user is told to put their BIOS + os.makedirs(d, exist_ok=True) except OSError: pass return d @@ -443,8 +404,6 @@ def armsx2(): ini = os.path.join(root, "inis/PCSX2.ini") old = os.path.join(CONFIG, "PCSX2") if not os.path.isfile(ini) and os.path.isfile(os.path.join(old, "inis/PCSX2.ini")): - # Someone who played on PCSX2 here: the same settings, BIOS choice and memory cards (the - # saves), copied once. PCSX2's own folder is left as it was. import shutil for sub in ("inis", "memcards", "bios", "gamesettings", "cheats", "patches", "covers", "inputprofiles", "textures"): @@ -453,22 +412,16 @@ def armsx2(): shutil.copytree(src, os.path.join(root, sub), dirs_exist_ok=True) print(f"droiddeck-pad-defaults: ARMSX2: settings and memory cards copied from PCSX2 ({root})") elif not os.path.isfile(ini): - # A new player: everything ARMSX2's first-time setup asks is answered here - the BIOS - # folder in the ROMs folder, the ps2 folder as its game list, the controller on Player 1 - - # and the BIOS file itself is picked below once one is there. bios, games = ps2_bios_folder(), ps2_folder() seed(ini, "[UI]\nSettingsVersion = 1\nSetupWizardIncomplete = false\n\n" f"[Folders]\nBios = {bios}\n\n" f"[GameList]\nRecursivePaths = {games}\n\n" - # Vulkan outright rather than Auto's pick: the renderer every other path here uses. "[EmuCore/GS]\nRenderer = 14\n\n" "[Hotkeys]\nOpenPauseMenu = Keyboard/Escape\nOpenPauseMenu = SDL-0/Guide\n\n" "[Pad1]\n" + ARMSX2_PAD1, "ARMSX2", "first-time setup, BIOS from " + bios) armsx2_bios(ini) return patch_ini_section(ini, "Pad1", ARMSX2_PAD1, "ARMSX2", require="SettingsVersion") - # The guide button is the pause menu here; PCSX2's profile (ours, copied over) had it as the - # analog toggle as well. with open(ini, encoding="utf-8", errors="replace") as f: lines = f.read().splitlines() kept = [l for l in lines if l.replace(" ", "") != "Analog=SDL-0/Guide"] @@ -497,7 +450,6 @@ def armsx2_bios(ini): if current and os.path.isfile(os.path.join(folder, current)): return try: - # A PS2 BIOS dump is 4 MiB (a few are 8); the .nvm/.mec files beside it are not dumps. dumps = sorted(f for f in os.listdir(folder) if os.path.isfile(os.path.join(folder, f)) and 4 << 20 <= os.path.getsize(os.path.join(folder, f)) <= 8 << 20) except OSError: @@ -510,12 +462,6 @@ def armsx2_bios(ini): print(f"droiddeck-pad-defaults: ARMSX2: BIOS {pick}") -# Dolphin (PC) has no controller menu, so the guide button is its Toggle Fullscreen hotkey: out of full -# screen is Dolphin's own window with its Config / Graphics / Stop buttons. Hotkeys.ini is all-or- -# nothing - a file with one line drops every other default - so a new one carries Dolphin's defaults, -# generated from HotkeyManager.cpp's LoadDefaults (Linux branch, RetroAchievements on) plus the guide; -# an existing one only gets the guide added to its Toggle Fullscreen. The Wii remote's Home, which -# was on the guide button, is on the right shoulder button instead. DOLPHIN_GUIDE = "`SDL/0/Xbox 360 Controller:Guide`" DOLPHIN_HOTKEYS = """[Hotkeys] Device = XInput2/0/Virtual core pointer @@ -632,11 +578,6 @@ def dolphin(): ini_set(hotkeys, "Hotkeys", "General/Toggle Fullscreen", (current + " | " if current else "") + DOLPHIN_GUIDE) print("droiddeck-pad-defaults: Dolphin: the guide button shows Dolphin's window (Toggle Fullscreen)") - # Games from the ROMs folder's gamecube and wii folders, subfolders included; Vulkan; no - # NKit warning (it will not let a game start until a box is ticked - games run either way, - # the warning is about loading times, netplay and save states); no statistics question. - # Names from Dolphin's MainSettings.cpp / UISettings.cpp. Only what is not set yet is added, - # except the game folders, which are added to whatever the user has. ini = os.path.join(d, "Dolphin.ini") gc = system_folder(("gamecube", "gc", "ngc"), "gamecube") wii = system_folder(("wii",), "wii") @@ -655,9 +596,6 @@ def dolphin(): count = 0 paths = [ini_get(ini, "General", "ISOPath%d" % i) for i in range(count)] changed = [] - # The whole ROMs folder as a game folder (what Dolphin's "set a games directory" was pointed at - # before) would, searched with its subfolders, have Dolphin open every PS2 and PS3 image too; - # the system folders below cover it. if any((p or "").rstrip("/") == ROMS for p in paths): paths = [p for p in paths if p and p.rstrip("/") != ROMS] for i, p in enumerate(paths): @@ -680,7 +618,6 @@ def dolphin(): changed.append("subfolders") if changed: print("droiddeck-pad-defaults: Dolphin: games from " + ", ".join(changed)) - # Once, for a Dolphin set up before this: Vulkan unless it was chosen already, and the NKit box. marker = os.path.join(d, ".droiddeck-setup") if os.path.exists(marker): return @@ -694,10 +631,6 @@ def dolphin(): print("droiddeck-pad-defaults: Dolphin: Vulkan, no NKit warning") -# Cemu: an SDLController profile for the GamePad. The uuid is "<index>_<SDL GUID>" and SDL's GUID -# carries a CRC of the device name; this is the one SDL reports for the session's pad -# ("Xbox 360 Controller (0)", 045e:028e - read from RPCS3's SDL log on the device). Mapping ids -# from VPADController.h, values from Controller.h, Cemu's own SDL default layout plus Home. CEMU_MAP = [(1, 1), (2, 0), (3, 3), (4, 2), (5, 9), (6, 10), (7, 42), (8, 43), (9, 6), (10, 4), (11, 11), (12, 12), (13, 13), (14, 14), (15, 7), (16, 8), (17, 45), (18, 39), (19, 44), (20, 38), (21, 47), (22, 41), (23, 46), (24, 40), (27, 5)] @@ -717,11 +650,6 @@ CEMU_XML = """<?xml version="1.0" encoding="UTF-8"?> """ -# Cemu's settings, so its Getting Started dialog (shown while settings.xml is missing, and whose -# folder picker cannot reach ROMs) never blocks a launch: the Wii U games folder, Vulkan -# (Graphic api 1), and audio through Cubeb (the only backend on Linux; api 3) on the default -# device for both the TV and the GamePad speaker - some titles play everything through the -# GamePad - at full volume (Cemu's own default is 20 %). Keys from config/CemuConfig.cpp. CEMU_SETTINGS = """<?xml version="1.0" encoding="UTF-8"?> <content> <mlc_path></mlc_path> @@ -749,11 +677,6 @@ def cemu(): done=f"games in {games}, Vulkan, Cubeb audio on the default device") -# melonDS 1.x: raw SDL joystick indices. The session's pad has the kernel's Xbox 360 layout -# (buttons A B X Y LB RB Back Start Guide LS RS = 0..10, hat 0 for the d-pad); the d-pad values -# also take the left stick (EmuInstanceInput.cpp; encoding InputConfig/MapButton.h). The guide -# button toggles full screen (HK_FullscreenToggle), as it does in Dolphin: the front end starts -# melonDS full screen (-f), and leaving it shows the window's menus for settings. MELONDS_GUIDE = 8 MELONDS_JOY = f"""[Instance0.Joystick] A = 1 @@ -771,28 +694,15 @@ Right = 65794 HK_FullscreenToggle = {MELONDS_GUIDE} """ -# The screen a handheld's wide panel suits best: the top screen as big as the panel's height allows -# with the bottom screen alone beside it, centred (ScreenLayout.h: Horizontal = 2, EmphTop = 1; -# melonDS's Hybrid shows the big screen a second time, small, above the bottom one; nobody needs -# it twice). Sharp pixels: no filtering, and no integer steps that leave the panel half used. Keys as -# melonDS writes them (Window.cpp windowCfg). MELONDS_WINDOW = """[Instance0.Window0] ScreenLayout = 2 ScreenSizing = 1 IntegerScaling = false ScreenFilter = false """ -# melonDS's own defaults for those, which an existing install is moved off once. Hybrid (3) was -# this preset's first layout, and moves on too. MELONDS_WINDOW_DEFAULTS = {"ScreenLayout": ("0", "3"), "ScreenSizing": ("0",), "ScreenFilter": ("true",)} -# The window melonDS returns to when the guide button leaves full screen: 1x wide (the width of -# two DS screens side by side, Screen.cpp screenGetMinSize) and 16:9, so gamescope stretches it to -# fill the panel and the menu bar and cursor come out large enough to use. A bigger window keeps -# its menus at their real size, tiny on a handheld. Qt's saveGeometry() v3 blob: magic, version, -# frame and normal rects (x, y, right, bottom), screen, maximized, full screen, screen width, and -# the normal rect again (QWidget::restoreGeometry). def melonds_geometry(): import base64, struct w, h = 512, 288 @@ -845,11 +755,6 @@ def toml_str(path): return '"' + path.replace("\\", "\\\\").replace('"', '\\"') + '"' -# The user's own BIOS, firmware and DSi NAND, found in the ROMs folder's nds/bios (or firmware) -# folder by what each file is: the DS BIOSes by size and checksum (the GBA BIOS is also 16 KB), -# firmware and NAND by size, the DSi boot ROMs (both 64 KB) by the 7 or 9 in their names. A path -# is only filled where melonDS has none, and external files are only switched on when a whole set -# was found - without them melonDS runs DS games on its built-in free BIOS. DS_BIOS7_MD5 = "df692a80a5b1bc90728bc3dfc76cd948" DS_BIOS9_MD5 = "a392174eb3e572fed6447e956bde4b25" @@ -924,7 +829,6 @@ def melonds(): lines = text.splitlines() done = [] if not any(isinstance(v, int) and v != -1 and k != "HK_FullscreenToggle" for k, v in joy.items()): - # Replace melonDS's own all-unbound table with ours (a TOML table can be defined only once). out, skipping = [], False for line in lines: t = line.strip() @@ -937,8 +841,6 @@ def melonds(): elif joy.get("HK_FullscreenToggle", -1) == -1 and MELONDS_GUIDE not in joy.values(): toml_set(lines, "Instance0.Joystick", "HK_FullscreenToggle", str(MELONDS_GUIDE)) done.append("guide button toggles full screen") - # Once, for a melonDS set up before this: the big top screen, where it is still on its own - # defaults. The marker keeps whatever the user picks in melonDS's View menu afterwards. if not os.path.exists(marker): for l in MELONDS_WINDOW.splitlines()[1:]: k, v = (x.strip() for x in l.split("=", 1)) @@ -957,9 +859,6 @@ def melonds(): print(f"droiddeck-pad-defaults: melonDS: {'; '.join(done)} ({path})") -# PPSSPP (SDL): its pad defaults leave the shoulders, the right stick and the triggers unbound on -# SDL builds (SDLJoystick.cpp codes vs KeyMapDefaults.cpp); a [ControlMapping] that exists replaces -# every default, so this one is complete, keyboard included (device 1 keyboard, 10 pad). PPSSPP_CONTROLS = """[ControlMapping] Up = 1-19,10-19 Down = 1-20,10-20 @@ -989,8 +888,6 @@ def ppsspp(): seed(os.path.join(CONFIG, "ppsspp/PSP/SYSTEM/controls.ini"), PPSSPP_CONTROLS, "PPSSPP") -# RetroArch: the udev joypad driver finds nothing here (no udev database in the runtime); sdl2 -# does, and matches this profile by vendor/product (task_autodetect.c). RETROARCH_PROFILE = """input_driver = "sdl2" input_device = "Xbox 360 Controller" input_vendor_id = "1118" @@ -1044,11 +941,6 @@ def retroarch(): print(f"droiddeck-pad-defaults: RetroArch: joypad driver udev -> sdl2 ({cfg})") -# yuzu and its forks: Player 1 in [Controls] of <name>/qt-config.ini, which each writes at its first -# start with the keyboard bound. Bindings are input_common ParamPackages, laid out by position as the -# frontend's own auto-map does (sdl_driver.cpp GetDefaultButtonBinding); the guid is SDL's with the -# name CRC cleared (GetGUID). A key is only read while its \default is false. Done once per emulator, -# and only while Player 1 is still on the keyboard. SWITCH_PAD = "engine:sdl,port:0,guid:030000005e0400008e02000010010000," SWITCH_PLAYER1 = { "button_a": "button:1", "button_b": "button:0", "button_x": "button:3", "button_y": "button:2", diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-proton-extra b/tools/linuxfs/overlay/usr/local/bin/droiddeck-proton-extra index 415e49a180..241ac290d5 100644 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-proton-extra +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-proton-extra @@ -1,23 +1,4 @@ #!/usr/bin/python3 -# Installs a third-party Proton build into the client's compatibilitytools.d, so it appears in the -# Compatibility dropdown beside our own Proton ARM64 and can be picked per game. -# -# droiddeck-proton-extra <steam root> ge [--tag GE-Proton11-7] -# droiddeck-proton-extra <steam root> cachyos [--tag cachyos-11.0-20260703-slr] -# droiddeck-proton-extra <steam root> <url of an aarch64 tarball> -# droiddeck-proton-extra <steam root> /path/to/an/aarch64/tarball -# droiddeck-proton-extra <steam root> --list what is installed now -# -# Both projects publish native ARM64 builds - GloriousEggroll as "*-aarch64.tar.gz", CachyOS as -# "*-arm64.tar.xz" - and both are ordinary Proton trees: a python entry point beside a files/ -# directory holding Wine, DXVK and VKD3D. That is the same shape as the depot the Steam client -# downloads, so the runtime can run them the same way. -# -# What it cannot use is their toolmanifest. Like Valve's ARM64 depot they declare -# require_tool_appid, which makes Steam stack pressure-vessel underneath - and pressure-vessel -# needs unprivileged user namespaces, which an Android app does not get. Patching that out is -# steam-compatibility's job (adopt_extras); this script only puts the tree in place and then -# calls it, so an install is usable without restarting the client. import hashlib import json import os @@ -29,16 +10,12 @@ import urllib.error import urllib.request RELEASES = "https://api.github.com/repos/%s/releases" -# Each source: the GitHub repo, and how its ARM64 asset is named. Ordered newest-release-first by -# the API, so "latest usable" is the first release that actually carries an ARM64 asset - the -# projects do not build one for every tag. SOURCES = { "ge": ("GloriousEggroll/proton-ge-custom", re.compile(r"aarch64\.tar\.(gz|xz)$")), "cachyos": ("CachyOS/proton-cachyos", re.compile(r"arm64\.tar\.(gz|xz)$")), + "droiddeck": ("Droid-Deck/DroidDeck-Proton", re.compile(r"aarch64\.tar\.(gz|xz)$")), } USER_AGENT = "droiddeck-proton-extra" -# Room for the tarball and the tree it unpacks to. GE-Proton's aarch64 build is ~650 MB packed and -# unpacks to about three times that; refusing early beats a half-written tool directory. NEED_BYTES = 4 * 1024 * 1024 * 1024 @@ -54,10 +31,10 @@ def fetch_json(url): def pick_asset(source): - """(release tag, asset url, sha512 url or None) for the newest release with an ARM64 build.""" + """(release tag, asset url, sha512 url or None) for the newest full release with an ARM64 build.""" repo, pattern = SOURCES[source] for release in fetch_json(RELEASES % repo + "?per_page=15"): - if release.get("draft"): + if release.get("draft") or release.get("prerelease"): continue assets = {a["name"]: a["browser_download_url"] for a in release.get("assets", ())} for name in sorted(assets): @@ -119,8 +96,6 @@ def extract(tarball, into): rc = subprocess.call(["tar", "-xf", tarball, "-C", into]) if rc != 0: raise SystemExit("droiddeck-proton-extra: tar failed (%d)" % rc) - # A Proton tarball holds one top-level directory. Take whichever entry has the entry point so a - # stray ._ file or a nested layout does not decide it. entries = [e for e in sorted(os.listdir(into)) if not e.startswith(".")] for entry in entries: path = os.path.join(into, entry) @@ -144,7 +119,7 @@ def installed(tools): def main(): argv = sys.argv[1:] if not argv: - raise SystemExit(__doc__ or "usage: droiddeck-proton-extra <steam root> ge|cachyos|<url>") + raise SystemExit(__doc__ or "usage: droiddeck-proton-extra <steam root> ge|cachyos|droiddeck|<url>") steam_root = argv.pop(0) tools = os.path.join(steam_root, "compatibilitytools.d") os.makedirs(tools, exist_ok=True) @@ -160,9 +135,6 @@ def main(): argv.pop(0) tag = argv.pop(0) if argv else None - # A tarball already on the device is used as it is: a session that has to pull 650 MB down - # first shows nothing on screen for ten minutes, so the download can be done ahead of time and - # handed over by path. local = None if what in SOURCES: tag, url, sums = release_asset(what, tag) if tag else pick_asset(what) @@ -176,7 +148,7 @@ def main(): log("using %s" % what) else: raise SystemExit( - "droiddeck-proton-extra: expected ge, cachyos, a URL or a tarball path, got %r" % what) + "droiddeck-proton-extra: expected ge, cachyos, droiddeck, a URL or a tarball path, got %r" % what) free = shutil.disk_usage(tools).free if free < NEED_BYTES: @@ -198,8 +170,6 @@ def main(): tree = extract(tarball, unpacked) name = os.path.basename(tree) final = os.path.join(tools, name) - # Replaced rather than merged: a half-written tree from an interrupted run would otherwise - # leave stale files behind that Proton would load. if os.path.exists(final): shutil.rmtree(final, ignore_errors=True) os.rename(tree, final) @@ -209,8 +179,6 @@ def main(): shutil.rmtree(staging, ignore_errors=True) log("installed %s" % name) - # Patches out require_tool_appid and wraps the entry point, which is what makes it launchable - # here. Doing it now means the client picks the tool up on its next restart with no extra step. subprocess.call(["steam-compatibility", steam_root]) diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-proton-run b/tools/linuxfs/overlay/usr/local/bin/droiddeck-proton-run index 8ff6f14ee2..5d59829bf1 100644 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-proton-run +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-proton-run @@ -2,6 +2,7 @@ """Runs a Windows program with the Proton the Steam client has chosen for it. droiddeck-proton-run [--window] PROGRAM [ARGS...] + droiddeck-proton-run --app ID [--dir FOLDER] [--options TEXT] [PROGRAM [ARGS...]] The program belongs to an installed Steam game when it sits in one's folder, to a prefix when it sits in one's drive_c, or to a non-Steam shortcut that names it; any other program gets a prefix of @@ -10,11 +11,15 @@ config.vdf picks the tool, else the client's default for all other titles ("0"). started as the client starts it - its toolmanifest's command line, the waitforexitandrun verb and the STEAM_COMPAT_* environment - so its wrapper applies the game's settings, components and audio. --window keeps the program in the desktop's own window, drawn with WineD3D. +--app starts one game without the Steam client (its Start without Steam): a Steam game's default +Windows launch option from appinfo.vdf when no program is given, else the program in that +shortcut's own prefix, started in --dir with the shortcut's launch options (--options). """ import json import os import re import runpy +import shlex import struct import sys import zlib @@ -249,6 +254,81 @@ def locate(program, root): os.path.dirname(program), root, "own") +def split_words(text): + try: + return shlex.split(text or "") + except ValueError: + return (text or "").split() + + +def split_options(text): + """A shortcut's launch options: NAME=value words before %command% go to the environment, the words + after it - or all of them, without %command% - are the program's arguments.""" + words = split_words(text) + if "%command%" not in words: + return {}, words + at = words.index("%command%") + env = {} + for word in words[:at]: + name, equals, value = word.partition("=") + if equals and re.fullmatch(r"[A-Za-z_][A-Za-z0-9_]*", name): + env[name] = value + return env, words[at + 1:] + + +def find_file(base, relative): + """base/relative, matching each part without regard to case as Windows does.""" + path = base + for part in [p for p in relative.replace("\\", "/").split("/") if p and p != "."]: + exact = os.path.join(path, part) + if part == ".." or os.path.exists(exact): + path = exact + continue + try: + match = next((name for name in sorted(os.listdir(path)) if name.lower() == part.lower()), None) + except OSError: + return None + if match is None: + return None + path = os.path.join(path, match) + return os.path.normpath(path) + + +def steam_install(appid, root): + for library in libraries(root): + found = re.search(r'"installdir"\s+"([^"]+)"', + read_text(os.path.join(library, "steamapps", "appmanifest_%s.acf" % appid)) or "") + if found: + return library, os.path.join(library, "steamapps", "common", found.group(1)) + return None, None + + +def steam_launch(appid, root): + """(target, program, arguments) for a Steam game's default Windows launch option, or None.""" + library, install = steam_install(appid, root) + if not install or not os.path.isdir(install): + return None + entry = compat()["appinfo_entries"](os.path.join(root, "appcache", "appinfo.vdf")).get(str(appid), {}) + options = [option for option in entry.get("launch_options", ()) + if not option["betakey"] and (not option["oslist"] or "windows" in option["oslist"])] + options.sort(key=lambda option: (option["type"] not in ("", "default", "none"), + int(option["key"]) if option["key"].isdigit() else 0)) + for option in options: + program = find_file(install, option["executable"]) + if not program or not os.path.isfile(program): + continue + start = find_file(install, option["workingdir"]) if option["workingdir"] else None + target = Target(appid, os.path.join(library, "steamapps", "compatdata", str(appid)), install, library, "steam", + start if start and os.path.isdir(start) else os.path.dirname(program)) + return target, program, split_words(option["arguments"]) + return None + + +def shortcut_target(appid, program, start, root): + return Target(appid, os.path.join(root, "steamapps", "compatdata", str(appid)), os.path.dirname(program), root, + "shortcut", start if start and os.path.isdir(start) else None) + + def steam_launches(target, program, root): """Whether a launch option of the Steam game starts [program]: then Steam should start it.""" if target.kind != "steam": @@ -292,24 +372,52 @@ def arguments(program, args): def main(argv): window = False + app, start, options = None, None, "" while argv and argv[0].startswith("--"): option = argv.pop(0) if option == "--window": window = True + elif option in ("--app", "--dir", "--options") and argv: + value = argv.pop(0) + if option == "--app": + app = value + elif option == "--dir": + start = value + else: + options = value elif option == "--": break else: say("unknown option %s" % option) return 2 - if not argv: + if app is not None and not (app.isdigit() and 0 < int(app) < 2 ** 32): + say("%s is not an app id" % app) + return 2 + if not argv and app is None: say("usage: droiddeck-proton-run [--window] PROGRAM [ARGS...]") return 2 - program = os.path.abspath(argv[0]) - if not os.path.isfile(program): - say("%s does not exist" % program) - return 2 root = os.environ.get("STEAM_COMPAT_CLIENT_INSTALL_PATH") or STEAM_ROOT - target = locate(program, root) + extra, args = split_options(options) + if not argv: + if int(app) >= STEAM_APP_LIMIT: + say("shortcut %s needs its program" % app) + return 2 + found = steam_launch(app, root) + if found is None: + say("Steam game %s is not installed, or has no Windows launch option" % app) + return 2 + target, program, own = found + args = own + args + else: + program = os.path.abspath(argv[0]) + if not os.path.isfile(program): + say("%s does not exist" % program) + return 2 + args = args + argv[1:] + if app is not None and int(app) >= STEAM_APP_LIMIT: + target = shortcut_target(app, program, start, root) + else: + target = locate(program, root) available = tools(root) name, why = choose_tool(target.appid, mapping(root), available) if name is None: @@ -318,13 +426,15 @@ def main(argv): folder, command = available[name] os.makedirs(target.compatdata, exist_ok=True) env = environment(os.environ, target, folder, root, window) - say("%s with %s (%s), %s prefix %s" % (program, name, why, target.kind, target.compatdata)) + env.update(extra) + say("%s with %s (%s), %s prefix %s%s" % (program, name, why, target.kind, target.compatdata, + ", without the Steam client" if app is not None else "")) try: os.chdir(target.start) except OSError: os.chdir(os.path.dirname(program)) entry = os.path.join(folder, command) - os.execve(entry, [entry, VERB] + arguments(program, argv[1:]), env) + os.execve(entry, [entry, VERB] + arguments(program, args), env) if __name__ == "__main__": diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-script-run b/tools/linuxfs/overlay/usr/local/bin/droiddeck-script-run index c4dd30c575..55606d8c5a 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-script-run +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-script-run @@ -1,18 +1,14 @@ #!/bin/bash -# A script added on the Desktop page (UserApps), run from its own folder: -# droiddeck-script-run /opt/droiddeck-apps/<id> [args...] set -u dir=${1:?usage: droiddeck-script-run <added app directory> [args...]} shift entry=$(cat "$dir/entry" 2>/dev/null) || { echo "droiddeck-script-run: $dir has no entry" >&2; exit 127; } cd -P "$dir/files" 2>/dev/null || { echo "droiddeck-script-run: $dir/files is missing; add the script again" >&2; exit 127; } folder=$PWD -# Shared storage is noexec, so the script is handed to its interpreter rather than executed. first= IFS= read -r first < "$entry" first=${first%$'\r'} interp=(/bin/bash) -# A program as the entry (the desktop's copy of a game's folder) runs itself. case $first in '#!'*) read -r -a interp <<< "${first#'#!'}" ;; $'\x7f'ELF*) interp=() ;; esac fex=$(cat "$dir/fex" 2>/dev/null) case $fex in on|off) ;; *) fex=auto ;; esac @@ -31,7 +27,6 @@ case ${DBUS_SESSION_BUS_ADDRESS:-} in fi ;; esac rc=$? -# A launcher script often starts the game and returns; the session lasts while it runs. running() { local p exe arg cwd for p in /proc/[0-9]*; do diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-seed-redists b/tools/linuxfs/overlay/usr/local/bin/droiddeck-seed-redists index 053df0e935..a9eaea65c7 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-seed-redists +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-seed-redists @@ -1,43 +1,16 @@ #!/bin/bash -# Marks Steam's shared redistributables as already run in every Proton prefix, and in the -# template Proton makes new prefixes from. -# -# A game whose depot lists _CommonRedist makes the client run the real installer inside the -# prefix on first launch. Those are x86 bundles, so they run under FEX, and the 2019 one leaves -# a task behind every time: its main thread exits while a helper stays blocked reading a pipe it -# also holds the write end of, so the process never reaps and the client keeps waiting on it. -# -# The client skips a "Run Process" block whose HasRunKey is already set, which is the same escape -# WineUtils.seedVcRedistRegistryIfDllsPresent() takes for the app's own containers. The names and -# versions come out of the install scripts rather than a list kept here, because Valve revises -# them; a prefix already carrying the same set is left alone. -# -# Games also carry install scripts of their own (<game>/_CommonRedist/vcredist/2022/installscript.vdf -# and the like), often with another version in the value name; those are read too. And the VC++ -# 2015-2022 runtime is recorded as installed the way Microsoft's installers look for it: on ARM64 -# Proton the x64 bundle otherwise stops with "Microsoft Visual C++ 2015-2022 Redistributable (arm64) -# is required", while Proton's own msvcp140/vcruntime140 already serve the game. -# -# A Vulkan runtime installer is the one left to run. Proton has no stand-in for it: for a game whose -# Steam compat config says nativevulkanloader (Red Dead Redemption 2) it loads vulkan-1.dll native -# only, and Khronos' loader is in the prefix only once that installer has run - without it the game -# exits with STATUS_DLL_NOT_FOUND before it opens a window. The installer finishes in a second. set -u steam_root=${1:?steam root} LIBRARIES=${DROIDDECK_LIBRARIES-/mnt/droiddeck /mnt/droiddeck-sd} redist="$steam_root/steamapps/common/Steamworks Shared/_CommonRedist" -# Every process an install script would run, as the registry key and value the client writes once -# it has run it. Names sit one level inside "Run Process", the key they share a level further in. -# "read_scripts vulkan" lists only the Vulkan runtime installers, which the plain call leaves out. read_scripts() { xargs -0 -r awk -v want="${1:-redists}" ' - # A block whose HasRunKey is set is one process; its name is the key the block opened under, at - # whatever depth - an install script nests it under "Run Process", the client'"'"'s evaluator script - # for a game wraps the same blocks once more. - FNR == 1 { depth = 0; pending = "" } - /^[[:space:]]*\{/ { depth++; name[depth] = pending; key[depth] = ""; vulkan[depth] = 0; pending = ""; next } + FNR == 1 { depth = 0; pending = ""; appid = "" } + /^[[:space:]]*\{/ { depth++; name[depth] = pending; key[depth] = ""; vulkan[depth] = 0; proc[depth] = 0; pending = ""; next } /^[[:space:]]*\}/ { + if (depth > 0 && key[depth] == "" && proc[depth] && appid != "" && name[depth] != "" && vulkan[depth] == (want == "vulkan")) + printf "HKEY_LOCAL_MACHINE\\\\Software\\\\Valve\\\\Steam\\\\Apps\\\\%s\t%s\n", appid, name[depth] if (depth > 0 && key[depth] != "" && name[depth] != "" && vulkan[depth] == (want == "vulkan")) printf "%s\t%s\n", key[depth], name[depth] if (depth > 0) depth-- @@ -45,8 +18,10 @@ read_scripts() { xargs -0 -r awk -v want="${1:-redists}" ' } { n = split($0, part, "\"") + if (n >= 5 && tolower(part[2]) == "appid" && part[4] ~ /^[0-9]+$/) { appid = part[4]; next } if (n >= 5 && tolower(part[2]) == "hasrunkey") { key[depth] = part[4]; next } if (n >= 5 && tolower(part[2]) ~ /^process [0-9]+$/) { + proc[depth] = 1 program = tolower(part[4]) sub(/.*[\\\/]/, "", program) if (program ~ /vulkan/) vulkan[depth] = 1 @@ -56,8 +31,6 @@ read_scripts() { xargs -0 -r awk -v want="${1:-redists}" ' } '; } pairs=$(find "$redist" -name installscript.vdf -print0 2>/dev/null | sort -z | read_scripts) -# The client downloads the scripts with the first game that wants them, which is too late for that -# game; until then the set they held when this was written stands in. (WinNative's list.) [ -n "$pairs" ] || pairs=$(sed 's/^\([^ ]*\) /HKEY_LOCAL_MACHINE\\\\Software\\\\Valve\\\\Steam\\\\Apps\\\\CommonRedist\\\\\1\t/' <<'KNOWN' DirectX\\Jun2010 dxsetup .NET\\4.8 4.8 @@ -78,8 +51,6 @@ vcredist\\2022 x64 14.51.36247.0 KNOWN ) -# The games' own scripts. Finding them walks every game folder, so the list is kept until a game is -# installed, updated or removed (its appmanifest changes) - this runs every quarter minute. cache="$steam_root/.droiddeck-game-scripts" libraries="$steam_root" for library in $LIBRARIES; do libraries="$libraries @@ -96,21 +67,14 @@ if [ "$(head -n 1 "$cache" 2>/dev/null)" != "$sig" ]; then done <<<"$libraries" | sort -u } >"$cache.tmp" && mv -f "$cache.tmp" "$cache" fi -# DROIDDECK_SEED_SCRIPTS: more scripts, one path a line - droiddeck-game-env passes the client's -# evaluator script for the game about to run its installers, read before the client looks. game_scripts() { { tail -n +2 "$cache" 2>/dev/null; printf '%s\n' "${DROIDDECK_SEED_SCRIPTS:-}"; } | sed '/^$/d' | tr '\n' '\0'; } game_pairs=$(game_scripts | read_scripts) [ -n "$(printf '%s' "$game_pairs" | tr -d '[:space:]')" ] && pairs=$(printf '%s\n%s\n' "$pairs" "$game_pairs" | sort -u | sed '/^$/d') -# A Vulkan runtime installer marked as run by an earlier seeding still has its marker: those come out -# again below, so the client runs the installer on the game's next launch. declare -A vulkan=() while IFS= read -r line; do [[ $line == *$'\t'* ]] && vulkan[$line]=1 done < <(game_scripts | read_scripts vulkan) -# The VC++ 2015-2022 runtime as its installers check for it, for each architecture and both registry -# views. The version is the newest the scripts above know, so any 2015-2022 bundle finds itself -# already installed and exits without asking for anything. VCRT_MAJOR=14 VCRT_MINOR=51 VCRT_BUILD=36247 vcrt() { local view arch @@ -124,9 +88,6 @@ vcrt() { done } -# Each prefix's marker lists the names it was given, so it is handed only what it lacks. One stamp -# for the whole set flipped between the session's set and the evaluator's (which adds the game's -# own names) on every launch, and every prefix was appended to again, inside the launch. want=() declare -A wanted=() while IFS= read -r line; do @@ -142,9 +103,6 @@ block_for() { printf '%s\n' "$@" | awk -F'\t' -v now="$now" ' if (path == $1) next printf "\n[%s] %d\n\"%s\"=dword:00000001\n", path, now, $2 - # The client writes these from 32-bit steam.exe, so its own copy lands under Wow6432Node; - # both spellings are seeded because the reader picks by its own word size. - # Joined rather than sub()stituted: gawk and mawk read backslashes in a replacement differently. if (substr(path, 1, 10) != "Software\\\\") next printf "\n[%s] %d\n\"%s\"=dword:00000001\n", "Software\\\\Wow6432Node\\\\" substr(path, 11), now, $2 @@ -154,7 +112,6 @@ block_for() { printf '%s\n' "$@" | awk -F'\t' -v now="$now" ' for line; do [[ $line == vcrt$'\t'* ]] && vcrt "$now"; done } -# Takes the given markers out of a registry file again, in both views, keeping its date. unseed() { local reg=$1 out shift @@ -186,9 +143,51 @@ unseed() { return 1 } -# Proton builds a new prefix from its template, and the client runs the install scripts in that -# prefix moments later, so the template carries the markers too. Its date is kept: Proton reads a -# changed one as a new template and upgrades every prefix made from the old. +# The ledger lines whose values the registry still holds, in both views where we wrote both. A Proton +# update replaces its default_pfx system.reg but not our ledger beside it, and new prefixes copy both. +present() { awk -F'\t' ' + NR == FNR { + path = $1 + if (path != "vcrt") { + sub(/^HKEY_LOCAL_MACHINE\\\\/, "", path) + if (path == $1) + next + } + n++ + line[n] = $0 + need[n] = 0 + if (path == "vcrt") { + for (a = split("x86 x64 arm64", arch, " "); a > 0; a--) { + runtime = "microsoft\\\\visualstudio\\\\14.0\\\\vc\\\\runtimes\\\\" arch[a] + key[n, ++need[n]] = "[software\\\\" runtime "]" SUBSEP "installed" + key[n, ++need[n]] = "[software\\\\wow6432node\\\\" runtime "]" SUBSEP "installed" + } + } else { + both = substr(path, 1, 10) == "Software\\\\" + path = tolower(path) + key[n, ++need[n]] = "[" path "]" SUBSEP tolower($2) + if (both) + key[n, ++need[n]] = "[software\\\\wow6432node\\\\" substr(path, 11) "]" SUBSEP tolower($2) + } + for (j = 1; j <= need[n]; j++) wanted[key[n, j]] = 1 + next + } + /^\[/ { section = tolower(substr($0, 1, index($0, "]"))) } + /^"/ { + value = substr($0, 2) + value = tolower(substr(value, 1, index(value, "\"=") - 1)) + if ((section SUBSEP value) in wanted) + seen[section SUBSEP value] = 1 + } + END { + for (i = 1; i <= n; i++) { + ok = 1 + for (j = 1; j <= need[i]; j++) if (!(key[i, j] in seen)) ok = 0 + if (ok) print line[i] + } + } +' - "$1"; } + for reg in "$steam_root"/steamapps/common/Proton*/files/share/default_pfx*/system.reg \ /mnt/droiddeck-sd/steamapps/common/Proton*/files/share/default_pfx*/system.reg \ /root/Games/*/steamapps/common/Proton*/files/share/default_pfx*/system.reg \ @@ -216,6 +215,17 @@ for reg in "$steam_root"/steamapps/common/Proton*/files/share/default_pfx*/syste printf '%s\n' "${kept[@]}" >"$seeded" echo "== took Vulkan runtime markers out of $reg" fi + if [ ${#had[@]} -gt 0 ]; then + declare -A held=() + while IFS= read -r line; do [[ $line == *$'\t'* ]] && held[$line]=1; done < <(printf '%s\n' "${!had[@]}" | present "$reg") + if [ ${#held[@]} -lt ${#had[@]} ]; then + echo "== $((${#had[@]} - ${#held[@]})) recorded redist markers are gone from $reg" + had=() + for line in "${!held[@]}"; do had[$line]=1; done + printf '%s\n' "${!had[@]}" >"$seeded" + fi + unset held + fi missing=() for line in "${want[@]}"; do [ -n "${had[$line]:-}" ] || missing+=("$line"); done [ ${#missing[@]} -eq 0 ] && continue diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-session b/tools/linuxfs/overlay/usr/local/bin/droiddeck-session index bb977c73f2..762edf977e 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-session +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-session @@ -1,27 +1,14 @@ #!/bin/bash -# The Linux runtime's session. DroidDeck execs this under proot with the output size and mode; -# the first pass starts gamescope, which execs this script again inside it for the program: -# droiddeck-session desktop the file manager -# droiddeck-session run <path> a Linux program (AppImage, script or ELF) -# droiddeck-session steam [steam-url] the native Steam client -# droiddeck-session lxqt the KDE Plasma desktop (DroidDeck's desktop package) -# BL_WIDTH / BL_HEIGHT size the output, BL_FPS limits it, BL_LOG collects everything said here. set -u export HOME=${HOME:-/root} mode=${1:-desktop} shift || true -# One line per milestone, greppable as "== STEP", so a first run reads as a narrative rather than -# something to be reconstructed from Steam's own chatter. The app shows these while it waits. step() { echo "== STEP $(date -u +%H:%M:%S) $*"; } if [ -n "${BL_LOG:-}" ] && [ -z "${BL_INSIDE:-}" ]; then mkdir -p "$(dirname "$BL_LOG")" 2>/dev/null - # The client alone writes megabytes an hour; one earlier log is kept, not every session's. if [ "$(stat -c %s "$BL_LOG" 2>/dev/null || echo 0)" -gt 8388608 ]; then mv -f "$BL_LOG" "$BL_LOG.1" fi - # A guest looping on an error writes gigabytes in minutes (an Xwayland proot had lost track of - # managed 9 GB of one line in 19 min): the log keeps its first BL_LOG_CAP bytes and the rest is - # drained, not refused - a writer that filled it must not die of SIGPIPE. exec > >({ dd of="$BL_LOG" oflag=append conv=notrunc iflag=count_bytes count="${BL_LOG_CAP:-268435456}" bs=65536 status=none; cat >/dev/null; }) 2>&1 echo "== droiddeck-session $(date) mode=$mode $*" echo "== uid=$(id -u) size=${BL_WIDTH:-?}x${BL_HEIGHT:-?} fps=${BL_FPS:-0} icd=${VK_ICD_FILENAMES:-none}" @@ -29,11 +16,6 @@ if [ -n "${BL_LOG:-}" ] && [ -z "${BL_INSIDE:-}" ]; then echo "== rootfs: $(cat /.version 2>/dev/null || echo unversioned)" fi -# Every program loads the locale LANG names (C.UTF-8) before main(). glibc ships it as a directory, -# which it looks for once per category under two spellings before reading gconv's module lists: -# about 30 opens, each a stop in proot, for every process in the session, a script's dirname or cat -# included. An archive holding it (and gconv's cache) makes that one open. Built again when the -# glibc package changes, or when the archive does (locale-gen rewrites it). prepare_locale() { local dir=/usr/lib/locale stamp=/usr/lib/locale/.droiddeck-archive want have= pkg pkg=(/var/lib/pacman/local/glibc-[0-9]*) @@ -41,7 +23,6 @@ prepare_locale() { [ -f "$stamp" ] && read -r have < "$stamp" [ "$have" = "$want" ] && [ -f "$dir/locale-archive" ] && [ ! "$dir/locale-archive" -nt "$stamp" ] && return 0 [ -d "$dir/C.utf8" ] && command -v localedef >/dev/null 2>&1 || return 0 - # localedef names a new archive by hard link, which Android refuses; libblsession renames it. DROIDDECK_LINK_RENAME=1 localedef --add-to-archive --replace "$dir/C.utf8" >/dev/null 2>&1 || return 0 rm -f /usr/lib/gconv/gconv-modules.cache command -v iconvconfig >/dev/null 2>&1 && iconvconfig >/dev/null 2>&1 @@ -50,17 +31,11 @@ prepare_locale() { } [ -z "${BL_INSIDE:-}" ] && prepare_locale -# What earlier sessions left in /tmp. The guest's /tmp is a directory in the rootfs, never emptied -# by a boot, and Android ends sessions by killing them: each left its mangoapp config, the client's -# temporary directories and shared-memory sockets, Chromium's singleton directory (the web -# helper's, an Electron app's), a session bus socket per run and a run's start stamp - 1,400 -# entries on a device after a few weeks. Each kind is swept while nothing that could own one runs, -# with one find for the lot. clear_stale_tmp() { local running names=() n - running=$(pgrep -af 'steamwebhelper|steamrtarm64/steam|--type=|droiddeck-appimage-run|dbus-run-session|dbus-daemon.*--session|dbus-launch|kwin|plasmashell' 2>/dev/null) + running=$(pgrep -af 'steamwebhelper|steamrtarm64/steam|steamrt64/steam|--type=|droiddeck-appimage-run|dbus-run-session|dbus-daemon.*--session|dbus-launch|kwin|plasmashell' 2>/dev/null) case $running in - *steamwebhelper* | *steamrtarm64/steam*) ;; + *steamwebhelper* | *steamrtarm64/steam* | *steamrt64/steam*) ;; *) names+=(-o -name 'mangohud.????????' -o -name '.com.valvesoftware.Steam.??????' -o -name 'steam_chrome_shmem_uid*' -o \( -type d -empty -name 'steam??????' \)) ;; esac @@ -81,22 +56,34 @@ clear_stale_tmp() { } [ -z "${BL_INSIDE:-}" ] && clear_stale_tmp -# Until the runtime is stable, Steam's own logs are copied beside the session log at exit so a -# failed launch can be handed over as one folder. +steam_update_stuck() { + [ "$1" -lt 60 ] || steam_updates=0 + steam_updates=$((steam_updates + 1)) + [ "$steam_updates" -ge 3 ] +} + +run_gamescope() ( + local status_file child_status compositor_status + status_file=$(mktemp "${XDG_RUNTIME_DIR:-/tmp}/droiddeck-steam-exit.XXXXXX") || exit 73 + trap 'rm -f "$status_file"' EXIT + # Gamescope can return success when its primary child crashed. + BL_STEAM_EXIT_FILE="$status_file" gamescope "$@" + compositor_status=$? + if read -r child_status < "$status_file" && [[ $child_status =~ ^[0-9]{1,3}$ ]] \ + && [ "$child_status" -gt 0 ] && [ "$child_status" -le 255 ]; then + exit "$child_status" + fi + exit "$compositor_status" +) + collect_steam_logs() { [ -n "${BL_DEBUG_DIR:-}" ] || return 0 local steam_root=${XDG_DATA_HOME:-$HOME/.local/share}/Steam + [ "${steam_x64:-0}" = 1 ] && steam_root=${BL_X64_HOME:-$HOME/.droiddeck-x64}/.local/share/Steam mkdir -p "$BL_DEBUG_DIR/steam" 2>/dev/null || return 0 - # Into steam/ beside this session's own logs. The app scrubs these line by line after the - # session ends - they carry the account's session token and id - so nothing here is the last - # word on what the user ends up sharing; this is just the copy that survives the runtime. - # Up to 8 MB each, as the app's own copy takes them: the client's CEF and *.previous.txt logs - # reach 17 MB and say little about this session, and every share scrubs whatever is here. [ -d "$steam_root/logs" ] && find "$steam_root/logs" -maxdepth 1 -type f -size -8192k \ -exec cp {} "$BL_DEBUG_DIR/steam/" \; 2>/dev/null - [ -f "$HOME/.steam/steam/logs/steamwebhelper.log" ] && cp "$HOME/.steam/steam/logs/steamwebhelper.log" "$BL_DEBUG_DIR/steam/" 2>/dev/null - # NOT copied, ever: loginusers.vdf, config.vdf and the ssfn* files, which hold the credentials - # themselves rather than a mention of them. + [ "${steam_x64:-0}" = 0 ] && [ -f "$HOME/.steam/steam/logs/steamwebhelper.log" ] && cp "$HOME/.steam/steam/logs/steamwebhelper.log" "$BL_DEBUG_DIR/steam/" 2>/dev/null local sync_store=$HOME/.local/share/droiddeck-esync sync_file if [ -d "$sync_store" ] && mkdir -p "$BL_DEBUG_DIR/droiddeck-esync" 2>/dev/null; then for sync_file in launches.log tools.tsv wanted.tsv prefixes.json; do @@ -109,20 +96,9 @@ collect_steam_logs() { fi echo "== steam logs copied to $BL_DEBUG_DIR/steam" } -# A session that is killed never reaches the copy below, and those are the sessions worth reading. trap 'collect_steam_logs 2>/dev/null || true' TERM INT HUP -# The driver everything in this session draws with: gamescope's compositing, the client's UI -# (OpenGL through Zink), every game Proton launches, and in desktop mode every program on it. -# BL_VK_DRIVER names an imported driver's ICD manifest on the Android side, which is bound into the -# session at its own path; unset means the runtime keeps the Turnip it was built with. -# VK_DRIVER_FILES REPLACES the loader's search, so a manifest whose library is unreadable would -# leave the session with no Vulkan at all - check both before setting it, and say so in the log -# rather than fail silently half a minute later. if [ -n "${BL_VK_DRIVER:-}" ]; then bl_icd_lib=$(sed -n 's/.*"library_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$BL_VK_DRIVER" 2>/dev/null | head -1) - # JSON may escape the separator: org.json writes "\/data\/user\/0\/...". The Vulkan loader - # parses that correctly; this check has to as well, or an absolute path looks relative and gets - # glued onto the manifest's directory - which is exactly what happened the first time. bl_icd_lib=$(printf '%s' "$bl_icd_lib" | sed 's|\\/|/|g') case $bl_icd_lib in /*) ;; @@ -130,7 +106,6 @@ if [ -n "${BL_VK_DRIVER:-}" ]; then esac if [ -r "$BL_VK_DRIVER" ] && [ -n "$bl_icd_lib" ] && [ -r "$bl_icd_lib" ]; then export VK_DRIVER_FILES="$BL_VK_DRIVER" - # Loaders older than 1.3.207 only know the old name; both are harmless together. export VK_ICD_FILENAMES="$BL_VK_DRIVER" echo "== vulkan driver: imported $bl_icd_lib (via $BL_VK_DRIVER)" else @@ -138,20 +113,8 @@ if [ -n "${BL_VK_DRIVER:-}" ]; then fi unset bl_icd_lib fi -# The app's gamescope build (tools/gamescope) asks for realtime-priority Vulkan queues on this -# switch instead of on CAP_SYS_NICE, which proot never has; it falls back to normal priority -# where the driver refuses, and the runtime's own build ignores it. On KGSL Turnip (Mesa 26.2) it -# changes nothing yet: the driver reports one submit-queue priority and creates every KGSL context -# with the same flags, so no priority reaches the GPU. Kept for a driver that maps it, and off -# unless the app's Performance page turns it on (BL_GAMESCOPE_REALTIME=1). export GAMESCOPE_FORCE_VULKAN_REALTIME=${BL_GAMESCOPE_REALTIME:-0} -# A sleep that starts no process. Under proot every exec is a traced execve plus the loader's -# opens and maps, and the watchers below poll for the whole session: `sleep 1` in a loop was 60 -# execs a minute each. read -t on a pipe nothing ever writes to waits in bash itself. -# The agent bridge's guest side (docs/agent-control.md): runs what the app's agent provider asks -# for inside this session and publishes gamescope's focus. Its files live under the session root -# ($BL_LAUNCH_DIR/agent), which the app empties before each session. start_agent() { [ -n "${BL_LAUNCH_DIR:-}" ] && [ -x /usr/local/bin/droiddeck-agent ] || return 0 mkdir -p "$BL_LAUNCH_DIR/agent" @@ -165,18 +128,28 @@ export XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config} export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} mkdir -p "$XDG_DATA_HOME" "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" +rm -f "${XDG_RUNTIME_DIR:-/run/droiddeck}/droiddeck-steamvr/active" if [ "$mode" = lxqt ] || [ "$mode" = desktop ]; then /usr/local/bin/droiddeck-desktop-bookmarks || true fi -# Flatpak (the store's apps): its sandboxes through the app instead of bubblewrap, which needs the -# user namespaces Android keeps from apps, and its apps' menu entries and icons on the desktop. export FLATPAK_BWRAP=/usr/local/bin/droiddeck-bwrap export XDG_DATA_DIRS=$XDG_DATA_HOME/flatpak/exports/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share} -# The cores a program runs on outside Steam (the desktop and everything started from it, a -# program from the rail): the user's game cores when set (BL_GAME_CPUS), else every core but the -# slowest cluster - Android is free to park an emulator's threads on the little cores, and those -# are what compile shaders and recompile PPU/SPU code. BL_PIN_CORES=0 leaves the scheduler alone. +client_single_core_matches() { + local wanted=$1 task key cpus + shift + [[ $wanted =~ ^[0-9]+$ ]] || return 0 + for task in "$@"; do + [ -r "$task/status" ] || continue + while read -r key cpus; do + [ "$key" = Cpus_allowed_list: ] || continue + [ "$cpus" = "$wanted" ] || return 1 + break + done < "$task/status" 2>/dev/null + done + return 0 +} + program_cores() { [ "${BL_PIN_CORES:-1}" = 0 ] && return 0 command -v taskset >/dev/null 2>&1 || return 0 @@ -196,9 +169,7 @@ program_cores() { } if [ -z "${BL_INSIDE:-}" ]; then - # Install the shared default-family aliases before Steam, gamescope or the desktop queries fonts. /usr/local/bin/droiddeck-fonts 2>&1 | sed 's/^/[fonts] /' - # Android's directory binding and language-specific family matches handle CJK and Thai fonts. device_fonts=/usr/local/share/fonts/android if [ -d "$device_fonts" ] && [ -d /etc/fonts/conf.d ] && command -v fc-cache >/dev/null 2>&1; then fonts_rules=$( @@ -219,14 +190,10 @@ if [ -z "${BL_INSIDE:-}" ]; then echo "== fontconfig: indexed $(ls "$device_fonts" | wc -l) device fonts, zh falls back to $(fc-match -f '%{family[0]}' ':lang=zh-cn' 2>/dev/null)" fi fi - # The compositor may still be starting, and a socket left by an earlier session is not - # a compositor: probe until a connection succeeds. for _ in $(seq 1 100); do wayland-info >/dev/null 2>&1 && break sleep 0.1 done - # The desktop (DroidDeck's hosted package) is its own nested compositor, KWin, drawing straight - # into the app's: no gamescope in between. if [ "$mode" = lxqt ]; then step "starting the desktop" start_agent --no-focus @@ -234,9 +201,6 @@ if [ -z "${BL_INSIDE:-}" ]; then cores=$(program_cores) if [ -n "$cores" ]; then echo "== desktop cores: $cores (the desktop and every program started from it)" - # Pin this shell and let exec carry the mask. Android keeps the app on a smaller cpuset - # until its activity is on top (foreground 0-5, background fewer), and a mask with no core - # of that set is EINVAL: taskset -c then exits 1 and takes the whole session with it. taskset -cp "$cores" $$ >/dev/null 2>&1 || echo "== desktop cores: not allowed right now, every core" fi exec /usr/local/bin/droiddeck-desktop @@ -244,9 +208,6 @@ if [ -z "${BL_INSIDE:-}" ]; then width=${BL_WIDTH:-1280} height=${BL_HEIGHT:-720} nested=$width - # Follow screen (BL_FOLLOW_OUTPUT=1): the app resizes gamescope's output when a foldable opens or - # closes, and with Steam on its own Xwayland gamescope resizes Steam's X screen with it, as on a - # Steam Deck docking. A stretched 16:9 nested size would pin it, so the two are exclusive. if [ "${BL_FOLLOW_OUTPUT:-0}" = 1 ]; then echo "== gamescope: the output follows the screen (${width}x${height} to start)" elif [ "$mode" = steam ] && [ "${BL_GAMESCOPE_STRETCH_16X9:-0}" = 1 ]; then @@ -256,53 +217,26 @@ if [ -z "${BL_INSIDE:-}" ]; then echo "== gamescope: games at ${nested}x${height} stretched to the ${width}x${height} output" fi fi + if [ "$mode" = steam ]; then + export gamescope_cursor_composite=2 + fi args=(--backend wayland --expose-wayland -f -W "$width" -H "$height" -w "$nested" -h "$height") [ "$nested" != "$width" ] && args+=(-S stretch) && export BL_STRETCHED=1 - # -r is what gamescope advertises as the refresh rate, and what a game reads as the display's. - # Left unset it defaults to 60, so a 120 Hz panel offers only 60 Hz in game settings. The FPS - # limiter wins when it is on (it is a deliberate cap); otherwise use the panel's own rate. if [ "${BL_FPS:-0}" -gt 0 ]; then args+=(-r "$BL_FPS") elif [ "${BL_REFRESH:-0}" -gt 0 ]; then args+=(-r "$BL_REFRESH") fi - # Steam integration advertises a Deck session and makes the client select Big Picture even - # without -gamepadui. The desktop UI uses ordinary gamescope window management instead. [ "$mode" = steam ] && [ "${BL_STEAM_UI:-}" != desktop ] && args+=(-e) - # Two Xwayland servers, as SteamOS runs Steam: the client on the first, games on the second - # (STEAM_GAME_DISPLAY_0). The client then sizes the games' server to each game's Game Resolution - # (GAMESCOPE_XWAYLAND_MODE_CONTROL; native unless one is set), and gamescope scales it to the - # output. With one server the client and its games share the output's size, so a game's own Game - # Resolution never reaches its display (docs/development/steam-display-scaling.md). The client's - # overlay is also on another server than the game, so opening it no longer takes the game's X - # keyboard focus, which made games like FlatOut shrink their window. - # BL_XWAYLAND_COUNT=1 in Download/droiddeck-env goes back to one. if [ "$mode" = steam ] && [ "${BL_XWAYLAND_COUNT:-2}" -gt 1 ]; then args+=(--xwayland-count "${BL_XWAYLAND_COUNT:-2}") export STEAM_MULTIPLE_XWAYLANDS=1 fi - # Touch passes through to the client as touch until the client says otherwise, as SteamOS's - # gamescope-session starts it (TOUCH_MODE=4). The client sets the mode itself (STEAM_TOUCH_CLICK_MODE) - # only once it has a controller; until then gamescope's own default made a finger a left-click - # mouse, so the Steam interface took taps but would not scroll on a phone with no pad attached. [ "$mode" = steam ] && args+=(--default-touch-mode 4) - # No --force-windows-fullscreen: it was for games that shrink their window when the Steam menu - # opens over them (FlatOut), which no longer happens with the games on their own Xwayland server - # (above), and it made any game drawing at another size than its display fight it. An experiment - # can still pass it with BL_GAMESCOPE_ARGS. - # HDR10: the app opened its compositor's colour-management gate for this session (BL_HDR=1); - # gamescope then offers HDR to its clients through the same wp_color_manager_v1 it binds on ours. [ "${BL_HDR:-0}" = 1 ] && args+=(--hdr-enabled) - # Extra gamescope arguments for an experiment (--debug-focus, say), from Download/droiddeck-env. [ -n "${BL_GAMESCOPE_ARGS:-}" ] && read -r -a _bl_extra <<<"$BL_GAMESCOPE_ARGS" && args+=("${_bl_extra[@]}") - # The performance overlay (Quick Access Menu → Performance → Overlay Level) is drawn by - # mangoapp, which gamescope starts beside the client; the client sets the level by rewriting - # MANGOHUD_CONFIGFILE. The apk stages Valve's aarch64 build (tools/mangoapp) - without it the menu - # still offers the levels and nothing appears. Starts hidden until the client writes a level. - # BL_MANGOAPP=0 turns it off (one community build found Valve's mangoapp crashing on Turnip). if [ "$mode" = steam ] && [ "${BL_MANGOAPP:-1}" = 1 ] \ && [ "${BL_STEAM_UI:-}" != desktop ] && command -v mangoapp >/dev/null 2>&1; then - # One fixed file, rewritten each session: a mktemp name per session was never removed. MANGOHUD_CONFIGFILE=/tmp/droiddeck-mangohud.conf echo no_display > "$MANGOHUD_CONFIGFILE" export MANGOHUD_CONFIGFILE STEAM_USE_MANGOAPP=1 STEAM_MANGOAPP_PRESETS_SUPPORTED=1 STEAM_MANGOAPP_HORIZONTAL_SUPPORTED=1 @@ -310,13 +244,13 @@ if [ -z "${BL_INSIDE:-}" ]; then echo "== gamescope: mangoapp on ($(command -v mangoapp), config $MANGOHUD_CONFIGFILE)" fi export BL_INSIDE=1 + if [ "$mode" = steam ]; then + run_gamescope "${args[@]}" -- "$0" "$mode" "$@" + exit $? + fi exec gamescope "${args[@]}" -- "$0" "$mode" "$@" fi -# gamescope manages X windows: toolkits go through Xwayland, not gamescope's own Wayland socket. -# Root-window requests for the game (restore) go to every display gamescope gave us: -# the client's ($DISPLAY) and, with two servers, the games' (STEAM_GAME_DISPLAY_0); gamescope reads -# them per server. bl_displays() { printf '%s\n' "$DISPLAY" [ -n "${STEAM_GAME_DISPLAY_0:-}" ] && [ "$STEAM_GAME_DISPLAY_0" != "$DISPLAY" ] && printf '%s\n' "$STEAM_GAME_DISPLAY_0" @@ -330,10 +264,6 @@ bl_xprop_set_all() { [ "$ok" = 1 ] } export GDK_BACKEND=x11 QT_QPA_PLATFORM=xcb SDL_VIDEODRIVER=x11 -# gamescope's reaper waits for every process left under it before the compositor comes down. A -# process a game left behind - a Wine service blocked on a server that is already gone - is -# reparented there when the client exits, and the screen stays black on it for good. Nothing of -# the session outlives the program it was started for. reap_orphans() { local round p stat pid left for round in 1 2 3 4 5; do @@ -353,13 +283,11 @@ reap_orphans() { done } -# Gamescope's Wayland backend does not forward the outer clipboard into Xwayland. -# This helper owns only Android text selections and exits with this guest session. -if [ -n "${BL_ANDROID_CLIPBOARD:-}" ] && [ -x /usr/local/bin/droiddeck-clipboard ]; then +if [ "${BL_DESKTOP:-}" != 1 ] && [ -n "${BL_ANDROID_CLIPBOARD:-}" ] && [ -x /usr/local/bin/droiddeck-clipboard ]; then /usr/local/bin/droiddeck-clipboard "$BL_ANDROID_CLIPBOARD" & fi -start_agent +[ "${BL_DESKTOP:-}" = 1 ] || start_agent case $mode in desktop) @@ -373,8 +301,25 @@ case $mode in echo "== program cores: $cores" taskset -cp "$cores" $$ >/dev/null 2>&1 || true fi - # Player 1 on the controller in an emulator that has no profile of its own yet. python3 /usr/local/bin/droiddeck-pad-defaults 2>&1 || true + run_program() { + local rc=0 child sig forwarded=0 + { trap - INT QUIT; exec "$@"; } <&0 & + child=$! + for sig in TERM HUP INT; do + trap "kill -$sig $child 2>/dev/null; forwarded=1" "$sig" + done + while :; do + forwarded=0 + rc=0 + wait "$child" || rc=$? + [ "$forwarded" = 1 ] || break + done + if [ -n "${BL_LAUNCH_DIR:-}" ]; then + printf '%s\n' "$rc" > "$BL_LAUNCH_DIR/run-status.tmp" && mv -f "$BL_LAUNCH_DIR/run-status.tmp" "$BL_LAUNCH_DIR/run-status" + fi + exit "$rc" + } fex=() if [ -x /usr/local/bin/droiddeck-fex ]; then case $(od -An -tu2 -j18 -N2 "$target" 2>/dev/null | tr -d ' ') in @@ -385,41 +330,69 @@ case $mode in *.appimage) export APPIMAGE_EXTRACT_AND_RUN=1 chmod +x "$target" 2>/dev/null - exec "${fex[@]}" "$target" "$@" + run_program "${fex[@]}" "$target" "$@" ;; *.sh) if [ -x /usr/local/bin/droiddeck-fex ]; then - exec /usr/local/bin/droiddeck-fex run --for "$target" -- bash "$target" "$@" + run_program /usr/local/bin/droiddeck-fex run --for "$target" -- bash "$target" "$@" fi - exec bash "$target" "$@" + run_program bash "$target" "$@" ;; *) chmod +x "$target" 2>/dev/null - cd "$(dirname "$target")" && exec "${fex[@]}" "$target" "$@" + cd "$(dirname "$target")" && run_program "${fex[@]}" "$target" "$@" ;; esac ;; steam) - # A first run downloads the client (about 360 MB in 2026): minutes on a slow connection, with + steam_x64=0 + [ "${BL_STEAM_CLIENT_ARCH:-}" = x86_64 ] && steam_x64=1 + steam_cef_gpu=1 + if [ "$steam_x64" = 1 ]; then + step "checking the Steam client's arm64 parts (first run downloads them, ~1-2 min)" + # droiddeck-steam-install removes the repair request: read it first so Repair Steam covers both clients. + _bl_x64_repair=0 + [ -e "$HOME/.bl-steam-repair" ] && _bl_x64_repair=1 + droiddeck-steam-install || exit $? + droiddeck-steam-install --sync steamdeck_publicbeta || step "could not update the arm64 client's parts; the x86-64 client keeps its own web helper" + step "checking the x86-64 Steam client (FEX, experimental; the first run downloads ~2 GB)" + BL_X64_REPAIR=$_bl_x64_repair droiddeck-steam-x64 --prepare || exit $? + step "x86-64 Steam client ready" + steam_root=${BL_X64_HOME:-$HOME/.droiddeck-x64}/.local/share/Steam + steam_client=(droiddeck-steam-x64 --exec) + if [ "${BL_X64_X86_WEBHELPER:-0}" = 1 ] && + ! droiddeck-steam-x64 --webhelper-gpu; then + steam_cef_gpu=0 + fi + else + # A first run downloads the client (about 360 MB in 2026): minutes on a slow connection, with # the progress in megabytes on the loading screen. step "checking the Steam client (a first run downloads it)" - droiddeck-steam-install || exit $? - step "Steam client ready" - steam_root=$XDG_DATA_HOME/Steam - # Register the card library (bound at /mnt/droiddeck-sd) with the client - internal storage is - # its main library already - and the ARM64 Proton that lets it launch the Windows ones. - # A request left in ~/.bl-proton-extra installs a third-party Proton before the client starts, - # so it is in the Compatibility dropdown the first time the user looks. One per line, each the - # arguments to droiddeck-proton-extra: "ge", "cachyos", "ge --tag GE-Proton11-7", or a URL. - # Hundreds of megabytes each, so it is only ever done on request, and the line is dropped once - # it has succeeded - a failed download stays and is retried next session. + droiddeck-steam-install || exit $? + step "Steam client ready" + steam_root=$XDG_DATA_HOME/Steam + if [ -f "${BL_X64_HOME:-$HOME/.droiddeck-x64}/.local/share/Steam/local.vdf" ]; then + droiddeck-steam-x64 --sync-login || true + fi + steam_client=("$steam_root/steamrtarm64/steam") + fi + _bl_proton_root=$steam_root + if [ "$steam_x64" = 1 ]; then + _bl_proton_root=$XDG_DATA_HOME/Steam + if ! ls -d "$_bl_proton_root"/compatibilitytools.d/GE-Proton*-aarch64 >/dev/null 2>&1 && + ! grep -q '^ge' "$HOME/.bl-proton-extra" 2>/dev/null; then + echo ge >> "$HOME/.bl-proton-extra" + fi + fi if [ -s "$HOME/.bl-proton-extra" ]; then _bl_left=$HOME/.bl-proton-extra.left : > "$_bl_left" + _bl_got_proton=0 while read -r _bl_extra || [ -n "$_bl_extra" ]; do case ${_bl_extra# } in ""|"#"*) continue ;; esac step "installing Proton '$_bl_extra' (large download, several minutes)" - if droiddeck-proton-extra "$steam_root" $_bl_extra; then + if droiddeck-proton-extra "$_bl_proton_root" $_bl_extra; then + _bl_got_proton=1 step "installed Proton '$_bl_extra'" else step "Proton '$_bl_extra' failed; will retry next session" @@ -427,12 +400,10 @@ case $mode in fi done < "$HOME/.bl-proton-extra" mv -f "$_bl_left" "$HOME/.bl-proton-extra" + if [ "$steam_x64" = 1 ] && [ "$_bl_got_proton" = 1 ]; then + droiddeck-steam-x64 --prepare || true + fi fi - # steam:// URLs left in ~/.bl-steam-urls are handed to the client on its command line. The app - # writes one when the user asks for a Proton that is one of Valve's own depots rather than a - # tarball: those are not files anywhere, the client fetches them like any other app. One per - # line, and the file is cleared once they have been passed on - the client either acts on a URL - # or it does not, and repeating it every session would re-ask forever. if [ -s "$HOME/.bl-steam-urls" ]; then while read -r _bl_url || [ -n "$_bl_url" ]; do case ${_bl_url# } in steam://*) ;; *) continue ;; esac @@ -441,41 +412,68 @@ case $mode in done < "$HOME/.bl-steam-urls" rm -f "$HOME/.bl-steam-urls" fi - # Cores for the client itself. Steam pins its own interface renderer to a subset - on the - # device it took 5 of 8, leaving out both little cores and the fastest one - which is a - # reasonable thing to do while a game is running and the wrong thing when the client is all - # there is. BL_CLIENT_CPUS overrides it. Re-applied on a beat because steamwebhelper spawns - # children continuously and each one inherits Steam's choice, not ours. The beat reads /proc - # itself instead of running pgrep, and only runs taskset for a process that is new or has - # grown threads since it was last pinned: every fork is a round of traced syscalls, and a - # beat that forked a taskset per process every 5 s did that for an hour. taskset -a, because - # without it only a process's main thread moves and the renderer's workers stay where they were. if [ -n "${BL_CLIENT_CPUS:-}" ]; then step "client cores: $BL_CLIENT_CPUS" + fi + if [ "${BL_ZRAM:-0}" = 1 ]; then + printf 0 > /tmp/.bl-zram + step "zRAM compression: on" ( - declare -A _bl_pinned=() - for ((_i = 0; _i < 720; _i++)); do + bl_zram_scan() { + _bl_game=0 _bl_pids=() for _d in /proc/[0-9]*; do - IFS= read -r -d '' _c < "$_d/cmdline" 2>/dev/null || continue - case $_c in *steamwebhelper*|*steamrtarm64/steam|*gamescope*) ;; *) continue ;; esac - _t=("$_d"/task/*) - _p=${_d#/proc/} - [ "${_bl_pinned[$_p]:-}" = "${#_t[@]}" ] && continue - taskset -a -cp "$BL_CLIENT_CPUS" "$_p" >/dev/null 2>&1 || true - _bl_pinned[$_p]=${#_t[@]} + # Under FEX the program is FEX's first argument. + { IFS= read -r -d '' _c && case ${_c##*/} in FEX|FEXInterpreter) IFS= read -r -d '' _c ;; esac; } \ + 2>/dev/null < "$_d/cmdline" || continue + case ${_c##*/} in + reaper) _bl_game=1 ;; + steam|steamwebhelper) _bl_pids+=("${_d#/proc/}") ;; + esac done + } + bl_zram_usage() { + local _p _k _v _u _rss=0 _swap=0 + for _p in "${_bl_pids[@]}"; do + while read -r _k _v _u; do + case $_k in VmRSS:) _rss=$((_rss + _v)) ;; VmSwap:) _swap=$((_swap + _v)) ;; esac + done 2>/dev/null < "/proc/$_p/status" + done + echo "${#_bl_pids[@]} processes, resident $((_rss / 1024)) MB, in zram $((_swap / 1024)) MB" + } + bl_zram_send() { + step "zRAM: $2 ($(bl_zram_usage))" + printf '%s' "$1" > /tmp/.bl-zram + [ "${#_bl_pids[@]}" = 0 ] || kill -URG "${_bl_pids[@]}" 2>/dev/null + nap 5 + bl_zram_scan + step "zRAM: done ($(bl_zram_usage))" + } + _bl_since=-1 _bl_packed=-1 + while kill -0 $$ 2>/dev/null; do + bl_zram_scan + if [ "$_bl_game" = 1 ]; then + [ "$_bl_since" -ge 0 ] || _bl_since=$SECONDS + if [ $((SECONDS - _bl_since)) -ge 20 ] && [ "${#_bl_pids[@]}" -gt 0 ] && + { [ "$_bl_packed" -lt 0 ] || [ $((SECONDS - _bl_packed)) -ge 300 ]; }; then + bl_zram_send 1 "compressing the client" + _bl_packed=$SECONDS + fi + elif [ "$_bl_since" -ge 0 ]; then + [ "$_bl_packed" -lt 0 ] || bl_zram_send 0 "game closed, reading the client back" + _bl_since=-1 _bl_packed=-1 + fi nap 5 done ) & + else + rm -f /tmp/.bl-zram fi - # Rockstar's launcher keeps drawing its hidden web interface for as long as a game of theirs - # runs; droiddeck-launcher-cores holds it on one slow core while it is out of sight, from - # gamescope's focus as the agent publishes it. BL_LAUNCHER_CORES=0 leaves launchers alone. if [ "${BL_LAUNCHER_CORES:-1}" != 0 ] && [ -n "${BL_LAUNCH_DIR:-}" ] && [ -z "${BL_DESKTOP:-}" ] \ && [ "${BL_STEAM_UI:-}" != desktop ] && [ -x /usr/local/bin/droiddeck-launcher-cores ]; then /usr/local/bin/droiddeck-launcher-cores "$BL_LAUNCH_DIR/agent/focus.json" 2>&1 & fi + if [ "$steam_x64" = 0 ]; then step "registering the app's game library with Steam" droiddeck-steam-library "$steam_root" || true step "setting up the ARM64 Proton compatibility tool" @@ -483,53 +481,43 @@ case $mode in if [ -z "${BL_DESKTOP:-}" ] && [ "${BL_STEAM_UI:-}" != desktop ]; then droiddeck-steam-ui-scale "$steam_root" "${BL_WIDTH:-1280}" "${BL_HEIGHT:-720}" || true fi - # The user's own games, as non-Steam shortcuts under that tool; the list is written by the app - # each session (empty = the app's earlier entries are removed, the client's own are kept). if [ -n "${BL_ADDED_GAMES:-}" ]; then step "adding the app's own games to the client's library" droiddeck-steam-shortcuts "$steam_root" "$BL_ADDED_GAMES" || true fi - # Steam runs a game's shared redistributables inside its prefix on first launch; marking - # them as already run keeps those x86 installers from starting under emulation at all. droiddeck-seed-redists "$steam_root" || true - # The compatibility tool runs Valve's arm64 Proton, which the client fetches like any depot. - # Asked for on the command line the first time, so a Windows title has it before it is needed. - if [ ! -f "$steam_root/steamapps/appmanifest_4427310.acf" ]; then + else + _bl_x64_tool=$(droiddeck-steam-x64 --default-tool) + if [ -n "$_bl_x64_tool" ]; then + if [ -n "${BL_ADDED_GAMES:-}" ]; then + step "adding the app's own games to the x86-64 client's library" + BL_COMPAT_TOOL=$_bl_x64_tool droiddeck-steam-shortcuts "$steam_root" "$BL_ADDED_GAMES" || true + fi + step "pointing the x86-64 client's Windows titles at $_bl_x64_tool" + BL_COMPAT_TOOL=$_bl_x64_tool steam-compatibility "$steam_root" --x64 || true + fi + if [ -z "${BL_DESKTOP:-}" ] && [ "${BL_STEAM_UI:-}" != desktop ]; then + droiddeck-steam-ui-scale "$steam_root" "${BL_WIDTH:-1280}" "${BL_HEIGHT:-720}" || true + fi + droiddeck-seed-redists "$steam_root" || true + fi + if [ "$steam_x64" = 0 ] && [ ! -f "$steam_root/steamapps/appmanifest_4427310.acf" ]; then step "asking the client to fetch the ARM64 Proton" set -- "$@" steam://install/4427310 - # Ported from Bannerlator's session script (device-proven 2026-09-22). The client decides - # a title's compatibility tool when the title is installed and keeps that decision for the - # rest of its run, and the tool is set up before the client comes up. So once the depot has - # fully landed, restart the client once - its own -shutdown, then the loop below, which knows - # the marker - and every title installed from then on runs through the tool, with the - # refreshed tool list and defaults, and no second launch by the user. A first run only: with - # the depot present at session start nothing here is armed. ( _bl_acf="$steam_root/steamapps/appmanifest_4427310.acf" for _ in $(seq 1 360); do sleep 10 - # StateFlags 4 = fully installed; a moment more for the client to finish its bookkeeping. if grep -q '"StateFlags"[[:space:]]*"4"' "$_bl_acf" 2>/dev/null; then sleep 10 steam-compatibility "$steam_root" >/dev/null 2>&1 || true step "compatibility layer installed: restarting the Steam client once" : > "$HOME/.bl-restart-once" - "$steam_root/steamrtarm64/steam" -shutdown >/dev/null 2>&1 || true + "${steam_client[@]}" -shutdown >/dev/null 2>&1 || true exit 0 fi done ) & - # A client that starts signed out drops that request - on a fresh install nobody has signed - # in yet - so the install dialog only appeared after the user restarted the client by hand. - # With no remembered sign-in, ask again once the sign-in has happened: the client binary - # started a second time with a URL hands it to the running instance and exits. - # - # The request is also dropped while the client is still in its post-logon compat phase (it - # probes every registered tool then): with publicbeta 1790380355 that phase took 27 s and a - # request sent 15 s after sign-in vanished (2026-09-26, no dialog; 1790121765 was done in - # time). So wait for the client to say the phase is over ("Waiting for compat in post-logon - # took" in its console log; at most 90 s if it never does), then ask - and ask again, twice - # at most, if no install has started a minute later. if ! grep -q '"RememberPassword"[[:space:]]*"1"' "$steam_root/config/loginusers.vdf" 2>/dev/null; then ( _bl_acf="$steam_root/steamapps/appmanifest_4427310.acf" @@ -549,7 +537,7 @@ case $mode in sleep 10 [ -f "$_bl_acf" ] && exit 0 step "signed in: asking the client again for the ARM64 Proton (try $_bl_try of 3)" - "$steam_root/steamrtarm64/steam" steam://install/4427310 >/dev/null 2>&1 || true + "${steam_client[@]}" steam://install/4427310 >/dev/null 2>&1 || true sleep 50 done exit 0 @@ -558,164 +546,100 @@ case $mode in ) & fi fi - # The tool is registered before the client starts and finds the depot at launch time, so - # nothing here waits for a download. What can still change under a running client is which - # titles are installed: a title installed this session gets the client's own per-app Proton - # choice, which it cannot start. Refresh the per-app entries every so often; the registrar is - # idempotent, so a repeat costs nothing. - # The seeder has the same problem and a worse consequence. It marks the shared redistributables - # as already run in each prefix that exists, and a game's prefix is not created until the - # client launches it - so a title played for the first time this session was never covered, and - # its install scripts run for real. That is exactly the hang the seeder exists to prevent: Need - # for Speed Payback sat on "Running install script" with vcredist_x86.exe blocked in pipe_read, - # holding both ends of a pipe nobody would write to, while the client waited for it to exit. - # Seeding again on the same beat covers a prefix the moment it appears. - # The seeder runs on a shorter beat than the registrar because it is racing something. The - # client creates a prefix when it launches a title and runs that title's install scripts - # moments later, so the seeder has only that gap to mark the redistributables as already run. - # It stamps each prefix it has covered and skips it thereafter, so the extra passes cost - # almost nothing. - # With the 16:9 stretch on, the client's own scaler must not undo it: in Deck mode it sets - # GAMESCOPE_NEW_SCALING_SCALER to Auto (0), which fits the 16:9 picture with bars and outranks -S. - # Auto is put back to Stretch (4); a mode picked in the QAM (Integer, Fit, Fill) is kept. - [ -z "${BL_DESKTOP:-}" ] && [ "${BL_STRETCHED:-0}" = 1 ] && ( - while :; do - nap 1 - cur=$(xprop -root GAMESCOPE_NEW_SCALING_SCALER 2>/dev/null) || continue - case $cur in *" = "*) cur=${cur##* = } ;; *) cur=0 ;; esac - [ "$cur" = 0 ] || continue - xprop -root -f GAMESCOPE_NEW_SCALING_SCALER 32c -set GAMESCOPE_NEW_SCALING_SCALER 4 2>/dev/null \ - && echo "== stretch 16:9 to panel: the client's scaler was Auto, set to Stretch" - done - ) & - # Resume from the Steam menu. The menu is an overlay that takes input, and a fullscreen game that - # loses input minimizes itself; gamescope only takes a window out of that state when the focused - # window changes, which the menu never does, so the game stayed minimized after Resume (a black - # screen with its small caption in the top-left corner). gamescope-3.16.29-p4 restores it itself; - # this asks it again a moment after input comes back from the client (app 769) to anything else, - # which covers a game that minimizes late. Harmless when nothing is minimized. - # BL_RESTORE_ON_RESUME=0 turns it off. - [ -z "${BL_DESKTOP:-}" ] && [ "${BL_RESTORE_ON_RESUME:-1}" = 1 ] && ( - prev= - xprop -spy -root GAMESCOPE_FOCUSED_APP 2>/dev/null | while read -r line; do - app=${line##*= } - case $app in ''|*[!0-9]*) prev=; continue ;; esac - if [ "$prev" = 769 ] && [ "$app" != 769 ]; then - nap 1 - bl_xprop_set_all GAMESCOPE_RESTORE_FOCUS_WINDOW 1 \ - && echo "== resume: asked gamescope to restore the game window (app $app)" - fi - prev=$app - done - ) & - # Evidence for touch reports: the touch mode the client asks gamescope for (STEAM_TOUCH_CLICK_MODE, - # set once it has a controller, per focused app) and which app has focus, logged as they change. - # A finger that clicks but won't scroll, or touch that stops once a pad is used, shows here as - # the mode in force at that moment. 4 is touch passed through, 1 a left-click mouse. [ -z "${BL_DESKTOP:-}" ] && ( - # What follows "=" in an xprop line, or $2 for a property that is missing or has no value - # yet ("NAME(CARDINAL) =", which read leaves with nothing after the "="). - xprop_value() { - case $1 in *'not found'*|*=) echo "$2"; return ;; esac - local v=${1#*=} - v=${v# } - echo "${v:-$2}" + stretch=0 restore=0 + [ "${BL_STRETCHED:-0}" = 1 ] && stretch=1 + [ "${BL_RESTORE_ON_RESUME:-1}" = 1 ] && restore=1 + atoms=(STEAM_TOUCH_CLICK_MODE GAMESCOPE_FOCUSED_APP) + [ "$stretch" = 1 ] && atoms+=(GAMESCOPE_NEW_SCALING_SCALER) + prop_value() { + case $1 in *'not found'*|*=) pv=$2; return ;; esac + pv=${1#*=} + pv=${pv# } + pv=${pv:-$2} } - tmode= app= - xprop -spy -root STEAM_TOUCH_CLICK_MODE GAMESCOPE_FOCUSED_APP 2>/dev/null | while read -r line; do + tmode= app= prev= + while read -r line; do case $line in STEAM_TOUCH_CLICK_MODE*) - v=$(xprop_value "$line" unset) - [ "$v" = "$tmode" ] && continue - tmode=$v + prop_value "$line" unset + [ "$pv" = "$tmode" ] && continue + tmode=$pv echo "== touch mode: $tmode (focused app ${app:-?}) at $(date +%T)" ;; GAMESCOPE_FOCUSED_APP*) - v=$(xprop_value "$line" none) - [ "$v" = "$app" ] && continue - app=$v - echo "== focused app: $app (touch mode ${tmode:-unset}) at $(date +%T)" + prop_value "$line" none + if [ "$pv" != "$app" ]; then + app=$pv + echo "== focused app: $app (touch mode ${tmode:-unset}) at $(date +%T)" + if [ -n "${BL_LAUNCH_DIR:-}" ]; then + printf '%s\n' "$app" > "$BL_LAUNCH_DIR/steam-focused-app.tmp" && mv -f "$BL_LAUNCH_DIR/steam-focused-app.tmp" "$BL_LAUNCH_DIR/steam-focused-app" + fi + fi + [ "$restore" = 1 ] || continue + case $pv in ''|*[!0-9]*) prev=; continue ;; esac + if [ "$prev" = 769 ] && [ "$pv" != 769 ]; then + nap 1 + bl_xprop_set_all GAMESCOPE_RESTORE_FOCUS_WINDOW 1 \ + && echo "== resume: asked gamescope to restore the game window (app $pv)" + fi + prev=$pv + ;; + GAMESCOPE_NEW_SCALING_SCALER*) + prop_value "$line" 0 + [ "$pv" = 0 ] || continue + xprop -root -f GAMESCOPE_NEW_SCALING_SCALER 32c -set GAMESCOPE_NEW_SCALING_SCALER 4 2>/dev/null \ + && echo "== stretch 16:9 to panel: the client's scaler was Auto, set to Stretch" ;; esac - done + done < <(xprop -spy -root "${atoms[@]}" 2>/dev/null) ) & - # The library beat. Both helpers are whole programs under proot (the seeder some forty of them, - # the compat one a python start and a parse of the client's config), and nearly every beat has - # nothing new for them: a burst of thousands of proot stops every quarter minute, game loads - # included. Each runs only when what it reads has changed, which bash answers without starting - # anything ([ -nt ], globs), and every five minutes regardless. The seeder acts on a prefix (or - # Proton's template for them) it has not marked, and on new install scripts, which arrive with a - # manifest; the compat pass on a new manifest, depot or tool, or the client rewriting config.vdf. - ( - beat=0 - compat_stamp=$HOME/.bl-compat-beat - seed_stamp=$HOME/.bl-seed-beat - rm -f "$compat_stamp" "$seed_stamp" - changed_since() { - local d - for d in "${@:2}"; do - [ "$d" -nt "$1" ] && return 0 - done - return 1 + steam_hold_launch() { + local game=$1 shortcut= waited=0 status=0 + _bl_focused() { xprop -root GAMESCOPE_FOCUSED_APP 2>/dev/null | sed -n 's/.*= *//p'; } + _bl_hand_off() { + printf '%s\n' "$game" > "$BL_LAUNCH_DIR/steam-game.tmp" && mv -f "$BL_LAUNCH_DIR/steam-game.tmp" "$BL_LAUNCH_DIR/steam-game" } - compat_due() { - [ -e "$compat_stamp" ] && [ "$((beat % 60))" -ne 0 ] || return 0 - changed_since "$compat_stamp" "${libraries[@]}" "$steam_root/steamapps/common" "$steam_root/config" \ - "$steam_root/compatibilitytools.d" - } - seed_due() { - local reg - [ -e "$seed_stamp" ] && [ "$((beat % 60))" -ne 0 ] || return 0 - changed_since "$seed_stamp" "${libraries[@]}" && return 0 - for reg in "$steam_root"/steamapps/common/Proton*/files/share/default_pfx*/system.reg \ - /mnt/droiddeck-sd/steamapps/common/Proton*/files/share/default_pfx*/system.reg \ - /root/Games/*/steamapps/common/Proton*/files/share/default_pfx*/system.reg \ - "$steam_root"/compatibilitytools.d/*/files/share/default_pfx*/system.reg \ - "$steam_root"/steamapps/compatdata/*/pfx/system.reg \ - /mnt/droiddeck-sd/steamapps/compatdata/*/pfx/system.reg \ - /root/Games/*/steamapps/compatdata/*/pfx/system.reg; do - [ -f "$reg" ] && [ ! -f "${reg%/*}/.droiddeck-redists" ] && return 0 - done - return 1 - } - for ((_i = 0; _i < 720; _i++)); do - nap 5 - beat=$((beat + 1)) - [ "$((beat % 3))" -eq 0 ] || continue - libraries=("$steam_root/steamapps" /mnt/droiddeck/steamapps /mnt/droiddeck-sd/steamapps /root/Games/*/steamapps) - seed=; compat= - seed_due && seed=1 - compat_due && compat=1 - [ -n "$seed$compat" ] || continue - # Not beside a running game: the client rewrites its manifest at each launch, which made both - # due while it loaded. Its own launch seeds its prefix (droiddeck-game-env) regardless. - pgrep -x wineserver >/dev/null 2>&1 && continue - if [ -n "$seed" ]; then - : > "$seed_stamp" - droiddeck-seed-redists "$steam_root" >/dev/null 2>&1 || true - fi - if [ -n "$compat" ]; then - : > "$compat_stamp" - steam-compatibility "$steam_root" >/dev/null 2>&1 || true - fi + _bl_end=$((SECONDS + 120)) + until [ "$(_bl_focused)" = 769 ] || [ "$SECONDS" -ge "$_bl_end" ]; do + sleep 1 done - ) & - # A game the app asked to launch on a cold start is not put on the client's command line: the - # client takes it before its interface is up, its launch stops at "waiting for user response to - # ShowInterstitials" with nobody to answer, and the game page reads Launching for ever (device, - # 2026-10-09, and 2026-10-08 before it). It is handed over once the interface has focus - # (gamescope's focused app 769) and has had a moment, through the same steam-game request an - # in-session launch uses; after two minutes it goes anyway. + # Shortcut CGameIDs are 64-bit; Steam app ids fit in 32 bits and keep the old short delay. + [ "${#game}" -gt 10 ] && shortcut=1 + [ -n "$shortcut" ] || sleep 4 + echo "== steam: interface up; launching the requested game $game" + _bl_hand_off + [ -n "$shortcut" ] || return 0 + # Steam can drop a shortcut launch it gets before the shortcut's overview exists (large libraries). + # Hand it over again only if the game never took focus, so a launch that worked is not started twice. + while [ "$(_bl_focused)" = 769 ] && [ "$waited" -lt 20 ]; do + sleep 1 + waited=$((waited + 1)) + done + [ "$(_bl_focused)" = 769 ] || return 0 + echo "== steam: the game is not in front after about 20 s; waiting for the shortcut overview" + /usr/local/bin/droiddeck-agent --wait-steam-shortcut-overview "$game" 45 || status=$? + if [ "$status" -eq 3 ]; then + echo "== steam: not a shortcut CGameID; not launching again" + elif [ "$(_bl_focused)" = 769 ]; then + echo "== steam: launching the requested game again $game (overview status $status)" + _bl_hand_off + else + echo "== steam: the game took focus while waiting; not launching again" + fi + } if [ -n "${BL_LAUNCH_DIR:-}" ] && [ -z "${BL_DESKTOP:-}" ]; then _bl_held= + _bl_uninstall= _bl_rest=() for _bl_arg in "$@"; do case $_bl_arg in steam://rungameid/*) _bl_held=${_bl_arg#steam://rungameid/} ;; + steam://uninstall/*) _bl_uninstall=${_bl_arg#steam://uninstall/} ;; *) _bl_rest+=("$_bl_arg") ;; esac done - if [ -n "$_bl_held" ]; then + if [ -n "$_bl_uninstall" ]; then set -- "${_bl_rest[@]}" ( _bl_end=$((SECONDS + 120)) @@ -723,18 +647,17 @@ case $mode in sleep 1 done sleep 4 - echo "== steam: interface up; launching the requested game $_bl_held" - printf '%s\n' "$_bl_held" > "$BL_LAUNCH_DIR/steam-game.tmp" && mv -f "$BL_LAUNCH_DIR/steam-game.tmp" "$BL_LAUNCH_DIR/steam-game" + echo "== steam: interface up; asking to uninstall $_bl_uninstall" + printf '%s\n' "$_bl_uninstall" > "$BL_LAUNCH_DIR/steam-uninstall.tmp" && mv -f "$BL_LAUNCH_DIR/steam-uninstall.tmp" "$BL_LAUNCH_DIR/steam-uninstall" ) & fi + if [ -n "$_bl_held" ]; then + set -- "${_bl_rest[@]}" + steam_hold_launch "$_bl_held" & + fi fi - # Debug aid while the runtime is being brought up: an app id dropped in ~/.bl-autolaunch is - # handed to the client as a rungameid URL, so a launch can be reproduced without touching the - # screen. Removed once the runtime is stable. if [ -s "$HOME/.bl-autolaunch" ]; then _bl_app=$(cat "$HOME/.bl-autolaunch") - # A bare app id runs the game; a full steam:// URL is passed through, which is how a - # validate or an install is driven without touching the screen. case $_bl_app in steam://*) _bl_url=$_bl_app ;; *) _bl_url=steam://rungameid/$_bl_app ;; @@ -742,13 +665,6 @@ case $mode in echo "== autolaunch $_bl_url" set -- "$@" "$_bl_url" fi - # The client builds Settings > Internet and its connection indicator on NetworkManager, which - # it looks for on the SYSTEM bus as it starts. This runtime has neither, so the page failed - # ("StartScanningForNetworks is not a function") under a header that showed no connection even - # while downloads ran. A system bus and a stand-in that reports Android's connection - and - # refuses what it cannot do, since the app has no say over Wi-Fi - answer what the client asks. - # The bus config is written here rather than shipped, so a runtime installed earlier gets this - # from the app's copy of the session scripts without a re-host. (WinNative, maxjivi05, e7a224ae.) if command -v dbus-daemon >/dev/null 2>&1 && command -v droiddeck-netmanager >/dev/null 2>&1; then mkdir -p /run/dbus /usr/local/share/droiddeck cat > /usr/local/share/droiddeck/system-bus.conf <<'BUSCONF' @@ -774,14 +690,9 @@ BUSCONF sleep 0.1 done if [ -S /run/dbus/system_bus_socket ]; then - droiddeck-netmanager & - netmanager=$! echo "== network: system bus up, NetworkManager stand-in running" - # Steam blanks its main UI before calling login1.Suspend. Without the - # matching resume notification it stays black although the menus work. - # Own the name before Steam constructs its login1 proxy at startup. rm -f "$BL_LAUNCH_DIR/steam-sleep-ready" - droiddeck-login1 & + droiddeck-login1 --with-netmanager & login_manager=$! for ((_i = 0; _i < 50; _i++)); do [ -f "$BL_LAUNCH_DIR/steam-sleep-ready" ] && break @@ -802,12 +713,13 @@ BUSCONF exit 69 fi + # The UI bridge launches SteamVR, which needs the guest agent's library environment. + _bl_compat_env=(env -u LD_LIBRARY_PATH -u STEAM_RUNTIME) + [ "${LD_LIBRARY_PATH+x}" ] && _bl_compat_env+=("LD_LIBRARY_PATH=$LD_LIBRARY_PATH") + [ "${STEAM_RUNTIME+x}" ] && _bl_compat_env+=("STEAM_RUNTIME=$STEAM_RUNTIME") export STEAM_RUNTIME=1 export LD_LIBRARY_PATH=$steam_root/steamrtarm64:$steam_root/steamrtarm64/panorama${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export SDL_VIDEO_X11_DGAMOUSE=0 - # Decky is optional and session scoped: the app's marker opts in, and this supervisor is - # reaped with the client session. Native ARM64 runs directly. A legacy x86_64 asset is used - # only when its recorded architecture says so and droiddeck-fex has FEX and its runtime ready. decky_loader=$HOME/homebrew/services/PluginLoader if [ -f "$HOME/.droiddeck-decky-enabled" ] && [ -x "$decky_loader" ]; then decky_arch=$(cat "$HOME/homebrew/services/.droiddeck-decky-arch" 2>/dev/null || echo unknown) @@ -854,35 +766,27 @@ BUSCONF export BL_CDP_GUARD=$BL_CDP_PORT echo "== steam: devtools port $BL_CDP_PORT, guest processes only" fi - # The agent bridge drives the client through it (droiddeck-agent's cdp requests). [ -n "${BL_LAUNCH_DIR:-}" ] && mkdir -p "$BL_LAUNCH_DIR/agent" && echo "$BL_CDP_PORT" > "$BL_LAUNCH_DIR/agent/cdp-port" - droiddeck-steam-compat "$steam_root" 2>&1 & - # The client exits 42 when it has updated itself and wants a fresh start (steam.sh does this). - # BL_STEAM_UI=desktop = the client's desktop UI (a window, the library as a list), which the - # desktop's launchers ask for; gamescope shows one window at a time and the game takes over. + [ "$steam_x64" = 1 ] || "${_bl_compat_env[@]}" droiddeck-steam-compat "$steam_root" 2>&1 & _bl_ui=(-gamepadui) [ "${BL_STEAM_UI:-}" = desktop ] && _bl_ui=() - # Deck mode, always outside the desktop UI: -steamdeck is the flag that puts - # the Quick Access Menu and the Deck settings pages on screen; the QAM's performance overlay - # controls stay greyed out without -steamos3, as SteamOS and Armada launch it. -steamos3 makes - # the client manage itself as SteamOS does - it calls steamos-select-branch and writes - # steamdeck_stable to package/beta, and a branch on disk that loses to the -clientbeta below - # is an update that never installs: exit 42, a restart, for ever (Bannerlator 38996ea1). The - # loop below puts package/beta back before every start. The SteamOS helpers the client calls - # in this mode are staged as no-op stubs under /usr/bin. - if [ "${BL_STEAM_UI:-}" != desktop ]; then - _bl_ui+=(-steamdeck -steamos3) - # The QAM's Scaling Filter lists NVIDIA Image Scaling only when told gamescope has it (it does). - export STEAM_GAMESCOPE_NIS_SUPPORTED=1 - # And shows its Scaling Mode and Scaling Filter only when told gamescope takes them. - export STEAM_GAMESCOPE_FANCY_SCALING_SUPPORT=1 - echo "== steam: Deck mode on (-steamdeck -steamos3)" + _bl_cef=(-cef-force-gpu -cef-use-gl=angle -cef-use-angle=vulkan) + [ "${steam_cef_gpu:-1}" = 1 ] || _bl_cef=(-cef-disable-gpu) + if [ "${BL_DESKTOP:-}" = 1 ] && [ "${BL_STEAM_UI:-}" = desktop ]; then + _bl_cef=(-cef-disable-gpu) + _bl_ui=(-nobigpicture) fi - # What a killed session leaves behind. Android ends sessions without warning (backgrounding, the - # low-memory killer), and the client then finds .crash - opening its update UI on the spinner - - # and the web helper's Singleton* locks in htmlcache, owned by a process that is gone, which can - # leave the Gamepad UI blank. No client or helper is running at this point in a session. - if ! pgrep -f 'steamwebhelper|steamrtarm64/steam' >/dev/null 2>&1; then + if [ "${BL_STEAM_UI:-}" != desktop ]; then + if [ "$steam_x64" = 0 ] || [ "${BL_X64_DECK:-1}" != 0 ]; then + _bl_ui+=(-steamdeck -steamos3) + export STEAM_GAMESCOPE_NIS_SUPPORTED=1 + export STEAM_GAMESCOPE_FANCY_SCALING_SUPPORT=1 + echo "== steam: Deck mode on (-steamdeck -steamos3)" + fi + fi + export STEAMOS_STEAM_SHUTDOWN_SENTINEL="$HOME/.bl-steam-shutdown" + export STEAMOS_STEAM_REBOOT_SENTINEL="$HOME/.bl-steam-reboot" + if ! pgrep -f 'steamwebhelper|steamrtarm64/steam|steamrt64/steam' >/dev/null 2>&1; then _stale="" for _f in "$steam_root/.crash" "$steam_root/steam.pid" \ "$steam_root/config/htmlcache/SingletonLock" "$steam_root/config/htmlcache/SingletonCookie" \ @@ -892,55 +796,98 @@ BUSCONF [ -n "$_stale" ] && echo "== steam: cleared what an earlier session left:$_stale" unset _stale _f fi - # The Deck's beta branch, the one the first-run download takes: with -steamos3 on publicbeta - # the client settled on steamdeck_stable, an older client it then offered as a "Software - # Update" every session (2026-09-30); on steamdeck_publicbeta it finds no update. Whatever - # wrote package/beta, the branch on disk has to agree with the one forced here - a - # disagreement is the restart loop above, and it is silent apart from rc=42 in this log. A - # client installed from publicbeta by an older app moves over this way at its next start. - # Checked before every start, not once: the client rewrites package/beta during its own run, - # and a restart below (rc=42, or the one after the ARM64 Proton lands) would otherwise start it - # again on the branch it just wrote. steam_channel=steamdeck_publicbeta - # The app's language (Setup, or the system's): the client's interface takes -language over its - # registry, and the registry is rewritten before each start below for its update window. _bl_lang=() [ -n "${BL_STEAM_LANGUAGE:-}" ] && _bl_lang=(-language "$BL_STEAM_LANGUAGE") steam_beta=$steam_root/package/beta if [ -n "${BL_ADDED_GAMES:-}" ] && [ -f "$BL_ADDED_GAMES" ]; then - droiddeck-steam-games watch "$steam_root" "$BL_ADDED_GAMES" & + if [ "$steam_x64" = 0 ]; then + droiddeck-steam-games watch "$steam_root" "$BL_ADDED_GAMES" & + else + BL_STEAMCLIENT=$XDG_DATA_HOME/Steam/steamrtarm64/steamclient.so \ + BL_STEAM_SHUTDOWN="droiddeck-steam-x64 --exec -shutdown" \ + droiddeck-steam-games watch "$steam_root" "$BL_ADDED_GAMES" & + fi games_watcher=$! fi - # Lossless Scaling (Steam app 993090): whether this account owns it, asked of the signed-in - # client once a session until the answer is yes. From then on the app offers importing - # Lossless.dll and passes BL_LOSSLESS_OWNED=1, so the question is never asked again. - if [ "${BL_LOSSLESS_OWNED:-0}" != 1 ]; then - ( - owned=$HOME/.config/droiddeck/lossless-owned - for ((_i = 0; _i < 60; _i++)); do - nap 30 - [ -e "$owned" ] && exit 0 - # Loading steamclient.so under proot takes seconds of CPU: not while a game loads or runs. - pgrep -x wineserver >/dev/null 2>&1 && continue - answer=$(droiddeck-steam-games probe "$steam_root" 993090 2>/dev/null) || continue - case $answer in - *'"993090": true'*) mkdir -p "${owned%/*}" && : > "$owned" && echo "== Lossless Scaling: owned" ;; - *) echo "== Lossless Scaling: not owned by this account" ;; - esac - exit 0 - done - ) & - fi - echo "== steam args: ${_bl_ui[*]} ${_bl_cdp[*]} ${_bl_lang[*]} -clientbeta $steam_channel -no-cef-sandbox -cef-force-gpu -cef-ozone-platform=x11 -cef-use-gl=angle -cef-use-angle=vulkan $*" - # An update that cannot install asks for a restart (rc=42) every time; the count is capped so a - # session can never again loop in silence, which reads as a menu opening and closing by itself. + echo "== steam args: ${_bl_ui[*]} ${_bl_cdp[*]} ${_bl_lang[*]} -clientbeta $steam_channel -no-cef-sandbox -cef-ozone-platform=x11 ${_bl_cef[*]} $*$([ "$steam_x64" = 1 ] && echo ' (x86-64 client under FEX)')" steam_updates=0 - rm -f "$HOME/.bl-stop-requested" - # The client brings a game it launched to the front only while it counts someone as present, - # which it reads from gamescope's input counter. A game the app launches after a few minutes - # with no touch starts behind the library page and stays there until the next input (device, - # 2026-10-09). The game's window turning up behind the interface is counted as one input, as - # gamescope counts a key. + rm -f "$HOME/.bl-stop-requested" "$STEAMOS_STEAM_SHUTDOWN_SENTINEL" "$STEAMOS_STEAM_REBOOT_SENTINEL" + steam_other_game_running() { + local line value n open + open=$(cat "$BL_LAUNCH_DIR/epic-open" 2>/dev/null) + case $open in ?|*[!0-9]*) open=${BL_EPIC_APP_ID:-$open} ;; esac + line=$(xprop -root GAMESCOPE_FOCUSABLE_APPS 2>/dev/null) || return 1 + case $line in *=*) value=${line#*= } ;; *) return 1 ;; esac + for n in ${value//,/ }; do + [ "$n" = 769 ] || [ "$n" = "$open" ] || return 0 + done + return 1 + } + steam_restart_for() { + if [ "$(cat "$HOME/.bl-restarted-for" 2>/dev/null)" = "$1" ]; then + echo "== steam: $2, but Steam was already restarted for it; launching it anyway" + return 1 + fi + printf '%s\n' "$1" > "$HOME/.bl-restarted-for" + echo "== steam: $2; restarting Steam to launch it" + printf '%s\n' "$1" > "$HOME/.bl-restart-game" + "${steam_client[@]:-$steam_root/steamrtarm64/steam}" -shutdown >/dev/null 2>&1 + } + steam_launch_game() { + local state=0 tries + /usr/local/bin/droiddeck-agent --steam-shortcut-state "$1" 6 >/dev/null 2>&1 || state=$? + [ "$state" -eq 0 ] && rm -f "$HOME/.bl-restarted-for" + if [ "$state" -eq 4 ]; then + if steam_other_game_running; then + echo "== steam: the client lost shortcut $1, but a game is running; launching it anyway" + elif steam_restart_for "$1" "the client lost shortcut $1"; then + return + fi + fi + "${steam_client[@]:-$steam_root/steamrtarm64/steam}" "steam://rungameid/$1" >/dev/null 2>&1 + [ "$state" -eq 3 ] && return + for tries in 1 2 3 4 5 6 7 8; do + nap 1 + state=0 + /usr/local/bin/droiddeck-agent --steam-shortcut-state "$1" 1 >/dev/null 2>&1 || state=$? + [ "$state" -eq 4 ] || continue + if steam_other_game_running; then + echo "== steam: the client dropped shortcut $1 while launching it, but a game is running" + else + steam_restart_for "$1" "the client dropped shortcut $1 while launching it" + fi + return 0 + done + } + steam_check_exits() { + local ran n state lost= + ran=$(pgrep -a -f 'SteamLaunch AppId=[0-9]' 2>/dev/null | sed -n 's/.* SteamLaunch AppId=\([0-9]*\).*/\1/p') + if [ -n "$ran" ]; then + for n in $ran; do + [ "$n" -ge 2147483648 ] && _bl_ran[$n]=1 + done + _bl_exited= + return + fi + [ "${#_bl_ran[@]}" -gt 0 ] || return 0 + if [ -z "$_bl_exited" ]; then + _bl_exited=1 + return + fi + _bl_exited= + for n in "${!_bl_ran[@]}"; do + state=0 + /usr/local/bin/droiddeck-agent --steam-shortcut-state "$(printf '%u' $(((n << 32) | 0x02000000)))" 3 >/dev/null 2>&1 || state=$? + [ "$state" -eq 4 ] && lost="$lost $n" + done + _bl_ran=() + [ -n "$lost" ] || return 0 + pgrep -f 'SteamLaunch AppId=[0-9]' >/dev/null 2>&1 && return 0 + echo "== steam: the client dropped shortcut(s)$lost when they exited; restarting Steam so it lists them again" + : > "$HOME/.bl-restart-lost" + "${steam_client[@]:-$steam_root/steamrtarm64/steam}" -shutdown >/dev/null 2>&1 + } steam_bring_forward() { local end=$((SECONDS + 600)) behind=0 line name value focused other n while [ "$SECONDS" -lt "$end" ]; do @@ -964,17 +911,95 @@ BUSCONF return 0 done } + requests= if [ -n "${BL_LAUNCH_DIR:-}" ] && [ -d "$BL_LAUNCH_DIR" ]; then rm -f "$BL_LAUNCH_DIR/steam-stop" "$BL_LAUNCH_DIR/steam-game" "$BL_LAUNCH_DIR/steam-game.tmp" - ( - while :; do + requests=1 + fi + ( + tick=0 + beat=0 + library_job= + lossless_job= + lossless_left=0 + lossless_owned=$HOME/.config/droiddeck/lossless-owned + lossless_asked=$HOME/.bl-lossless-asked + rm -f "$lossless_asked" + [ "${BL_LOSSLESS_OWNED:-0}" != 1 ] && lossless_left=60 + declare -A _bl_pinned=() + declare -A _bl_ran=() + _bl_exited= + compat_stamp=$HOME/.bl-compat-beat + seed_stamp=$HOME/.bl-seed-beat + rm -f "$compat_stamp" "$seed_stamp" + changed_since() { + local d + for d in "${@:2}"; do + [ "$d" -nt "$1" ] && return 0 + done + return 1 + } + compat_due() { + [ -e "$compat_stamp" ] && [ "$((beat % 60))" -ne 0 ] || return 0 + changed_since "$compat_stamp" "${libraries[@]}" "$steam_root/steamapps/common" "$steam_root/config" \ + "$steam_root/compatibilitytools.d" + } + seed_due() { + local reg + [ -e "$seed_stamp" ] && [ "$((beat % 60))" -ne 0 ] || return 0 + changed_since "$seed_stamp" "${libraries[@]}" && return 0 + for reg in "$steam_root"/steamapps/common/Proton*/files/share/default_pfx*/system.reg \ + /mnt/droiddeck-sd/steamapps/common/Proton*/files/share/default_pfx*/system.reg \ + /root/Games/*/steamapps/common/Proton*/files/share/default_pfx*/system.reg \ + "$steam_root"/compatibilitytools.d/*/files/share/default_pfx*/system.reg \ + "$steam_root"/steamapps/compatdata/*/pfx/system.reg \ + /mnt/droiddeck-sd/steamapps/compatdata/*/pfx/system.reg \ + /root/Games/*/steamapps/compatdata/*/pfx/system.reg; do + [ -f "$reg" ] && [ ! -f "${reg%/*}/.droiddeck-redists" ] && return 0 + done + return 1 + } + compat_pending=$HOME/.bl-compat-pending + compat_restarted=$HOME/.bl-compat-restarted + rm -f "$compat_pending" + : > "$compat_restarted" + compat_restarts=0 + compat_settled() { + local app m flags r card=/mnt/droiddeck-sd + # The arm64 card library may hold that client's copy of the same title. + [ "$steam_x64" = 1 ] && card=/mnt/droiddeck-sd/x86-64 + while read -r app; do + [ -n "$app" ] || continue + m= + for r in "$steam_root" "$card"; do + [ -f "$r/steamapps/appmanifest_$app.acf" ] && { m=$r/steamapps/appmanifest_$app.acf; break; } + done + [ -n "$m" ] || return 1 + flags=$(sed -n 's/^[[:space:]]*"StateFlags"[[:space:]]*"\([0-9]*\)".*/\1/p' "$m" | head -n 1) + [ "$flags" = 4 ] || return 1 + done < "$compat_pending" + ! pgrep -f 'reaper SteamLaunch' >/dev/null 2>&1 + } + while :; do + if [ -n "$requests" ]; then if [ -e "$BL_LAUNCH_DIR/steam-stop" ]; then rm -f "$BL_LAUNCH_DIR/steam-stop" : > "$HOME/.bl-stop-requested" echo "== steam: the app asked for a clean exit" - "$steam_root/steamrtarm64/steam" -shutdown >/dev/null 2>&1 || true + "${steam_client[@]}" -shutdown >/dev/null 2>&1 || true exit 0 fi + if [ -f "$BL_LAUNCH_DIR/steam-uninstall" ]; then + uninstall_id=$(cat "$BL_LAUNCH_DIR/steam-uninstall" 2>/dev/null) + rm -f "$BL_LAUNCH_DIR/steam-uninstall" + case $uninstall_id in + ''|0*|*[!0-9]*|???????????*) echo "== steam: ignored invalid uninstall request" ;; + *) + echo "== steam: opening the uninstall dialog for $uninstall_id" + "${steam_client[@]}" "steam://uninstall/$uninstall_id" >/dev/null 2>&1 & + ;; + esac + fi if [ -f "$BL_LAUNCH_DIR/steam-game" ]; then game_id=$(cat "$BL_LAUNCH_DIR/steam-game" 2>/dev/null) rm -f "$BL_LAUNCH_DIR/steam-game" @@ -986,7 +1011,7 @@ BUSCONF [ "$game_id_length" -eq 20 ] && [[ "$game_id" < "18446744073709551616" ]]; }; then echo "== steam: launching requested game $game_id in the running client" - "$steam_root/steamrtarm64/steam" "steam://rungameid/$game_id" >/dev/null 2>&1 & + steam_launch_game "$game_id" & [ -n "${forward_pid:-}" ] && kill "$forward_pid" 2>/dev/null steam_bring_forward & forward_pid=$! @@ -996,13 +1021,86 @@ BUSCONF ;; esac fi - nap 0.5 - done - ) & - stop_watcher=$! - fi + fi + nap 0.5 + tick=$((tick + 1)) + [ "$((tick % 10))" -eq 0 ] || continue + beat=$((beat + 1)) + steam_check_exits + if [ "$beat" -le 720 ] && [ -n "${BL_CLIENT_CPUS:-}" ]; then + for _d in /proc/[0-9]*; do + { IFS= read -r -d '' _c && { IFS= read -r -d '' _c1 || _c1=; }; } < "$_d/cmdline" 2>/dev/null || continue + case $_c in FEX|*/FEX|FEXInterpreter|*/FEXInterpreter) _c=$_c1 ;; esac + case $_c in *steamwebhelper*|*steamrtarm64/steam|*steamrt64/steam|*gamescope*) ;; *) continue ;; esac + _t=("$_d"/task/*) + _p=${_d#/proc/} + [ "${_bl_pinned[$_p]:-}" = "${#_t[@]}" ] && client_single_core_matches "$BL_CLIENT_CPUS" "${_t[@]}" && continue + taskset -a -cp "$BL_CLIENT_CPUS" "$_p" >/dev/null 2>&1 || true + _bl_pinned[$_p]=${#_t[@]} + done + fi + if [ "$beat" -le 720 ] && [ "$((beat % 3))" -eq 0 ] && { [ -z "$library_job" ] || ! kill -0 "$library_job" 2>/dev/null; }; then + libraries=("$steam_root/steamapps" /mnt/droiddeck/steamapps /mnt/droiddeck-sd/steamapps /root/Games/*/steamapps) + seed=; compat= + seed_due && seed=1 + compat_due && compat=1 + if [ -n "$seed$compat" ] && ! pgrep -x wineserver >/dev/null 2>&1; then + [ -n "$seed" ] && : > "$seed_stamp" + [ -n "$compat" ] && : > "$compat_stamp" + ( + [ -z "$seed" ] || droiddeck-seed-redists "$steam_root" >/dev/null 2>&1 || true + if [ -n "$compat" ]; then + if [ "$steam_x64" = 1 ]; then + [ -z "${_bl_x64_tool:-}" ] || + BL_COMPAT_TOOL=$_bl_x64_tool steam-compatibility "$steam_root" --x64 --live >/dev/null 2>&1 || true + droiddeck-steam-x64 --map-direct --live >/dev/null 2>&1 || true + else + steam-compatibility "$steam_root" >/dev/null 2>&1 || true + fi + fi + ) & + library_job=$! + fi + fi + if [ "$((beat % 3))" -eq 0 ] && [ -s "$compat_pending" ] && [ "$compat_restarts" -lt 3 ] && compat_settled; then + _bl_new=$(sort -u "$compat_pending" | grep -vxF -f "$compat_restarted" || true) + rm -f "$compat_pending" + if [ -n "$_bl_new" ]; then + compat_restarts=$((compat_restarts + 1)) + printf '%s\n' $_bl_new >> "$compat_restarted" + if [ "$steam_x64" = 1 ]; then + step "newly installed title(s) $(echo $_bl_new) set to an ARM64 Proton (Windows builds) or DroidDeck direct (Linux builds): restarting the Steam client once so it takes effect" + else + step "newly installed title(s) $(echo $_bl_new) set to the ARM64 Proton: restarting the Steam client once so it takes effect" + fi + : > "$HOME/.bl-restart-once" + "${steam_client[@]}" -shutdown >/dev/null 2>&1 || true + fi + fi + if [ "$lossless_left" -gt 0 ] && [ "$((beat % 6))" -eq 0 ] && { [ -z "$lossless_job" ] || ! kill -0 "$lossless_job" 2>/dev/null; }; then + lossless_left=$((lossless_left - 1)) + if [ -e "$lossless_owned" ] || [ -e "$lossless_asked" ]; then + lossless_left=0 + elif ! pgrep -x wineserver >/dev/null 2>&1; then + ( + # The probe reaches the x86-64 client through the arm64 client's steamclient.so, as the import watcher does. + if [ "$steam_x64" = 1 ]; then export BL_STEAMCLIENT=$XDG_DATA_HOME/Steam/steamrtarm64/steamclient.so; fi + answer=$(droiddeck-steam-games probe "$steam_root" 993090 2>/dev/null) || exit 0 + case $answer in + *'"993090": true'*) mkdir -p "${lossless_owned%/*}" && : > "$lossless_owned" && echo "== Lossless Scaling: owned" ;; + *) echo "== Lossless Scaling: not owned by this account" ;; + esac + : > "$lossless_asked" + ) & + lossless_job=$! + fi + fi + done + ) & + stop_watcher=$! + rm -f "$HOME/.bl-restart-game" "$HOME/.bl-restarted-for" while :; do - rm -f "$HOME/.bl-restart-once" + rm -f "$HOME/.bl-restart-once" "$HOME/.bl-restart-lost" if [ -f "$steam_beta" ] && [ "$(cat "$steam_beta" 2>/dev/null)" != "$steam_channel" ]; then echo "== steam: client branch on disk was '$(cat "$steam_beta" 2>/dev/null)', set to '$steam_channel' to match -clientbeta" echo "$steam_channel" > "$steam_beta" @@ -1011,9 +1109,12 @@ BUSCONF echo start >> "$steam_root/package/droiddeck-unconfirmed" _bl_counted=1 fi - # Between starts only: the client holds registry.vdf in memory and writes it back on exit. if [ -n "${BL_STEAM_LANGUAGE:-}" ]; then - droiddeck-steam-language "$HOME" "$BL_STEAM_LANGUAGE" || true + if [ "$steam_x64" = 1 ]; then + droiddeck-steam-language "${BL_X64_HOME:-$HOME/.droiddeck-x64}" "$BL_STEAM_LANGUAGE" || true + else + droiddeck-steam-language "$HOME" "$BL_STEAM_LANGUAGE" || true + fi fi step "starting the Steam client${BL_STEAM_UI:+ ($BL_STEAM_UI UI)}" desktop_ui_pid= @@ -1021,40 +1122,78 @@ BUSCONF /usr/local/bin/droiddeck-steam-desktop-ui & desktop_ui_pid=$! fi - "$steam_root/steamrtarm64/steam" "${_bl_ui[@]}" "${_bl_cdp[@]}" "${_bl_lang[@]}" -clientbeta "$steam_channel" \ - -no-cef-sandbox -cef-force-gpu -cef-ozone-platform=x11 \ - -cef-use-gl=angle -cef-use-angle=vulkan "$@" + steam_started=$SECONDS + "${steam_client[@]}" "${_bl_ui[@]}" "${_bl_cdp[@]}" "${_bl_lang[@]}" -clientbeta "$steam_channel" \ + -no-cef-sandbox -cef-ozone-platform=x11 "${_bl_cef[@]}" "$@" rc=$? + steam_ran=$((SECONDS - steam_started)) if [ -n "$desktop_ui_pid" ]; then kill "$desktop_ui_pid" 2>/dev/null || true wait "$desktop_ui_pid" 2>/dev/null || true fi echo "== steam exited rc=$rc" - if [ -n "${BL_ADDED_GAMES:-}" ] && [ -f "$BL_ADDED_GAMES" ]; then - droiddeck-steam-shortcuts "$steam_root" "$BL_ADDED_GAMES" || true - fi collect_steam_logs if [ -f "$HOME/.config/droiddeck/fex-wanted" ] && [ -x /usr/local/bin/droiddeck-fex ]; then /usr/local/bin/droiddeck-fex status >/dev/null 2>&1 || true fi + if [ -n "${BL_ADDED_GAMES:-}" ] && [ -f "$BL_ADDED_GAMES" ]; then + if [ "$steam_x64" = 0 ]; then + droiddeck-steam-shortcuts "$steam_root" "$BL_ADDED_GAMES" || true + elif [ -n "${_bl_x64_tool:-}" ]; then + BL_COMPAT_TOOL=$_bl_x64_tool droiddeck-steam-shortcuts "$steam_root" "$BL_ADDED_GAMES" || true + fi + fi + # The x86-64 client rewrote config.vdf from memory on exit, over the live passes' mapping. + if [ "$steam_x64" = 1 ]; then + [ -z "${_bl_x64_tool:-}" ] || + BL_COMPAT_TOOL=$_bl_x64_tool steam-compatibility "$steam_root" --x64 >/dev/null 2>&1 || true + droiddeck-steam-x64 --map-direct || true + fi if [ -f "$HOME/.bl-stop-requested" ]; then rm -f "$HOME/.bl-stop-requested" "$HOME/.bl-restart-once" break fi - # The session asked for this exit (the ARM64 Proton landed): start again, without the URL - # arguments, which were acted on. Not counted against the update cap. + if [ -e "$STEAMOS_STEAM_SHUTDOWN_SENTINEL" ]; then + rm -f "$STEAMOS_STEAM_SHUTDOWN_SENTINEL" "$STEAMOS_STEAM_REBOOT_SENTINEL" + echo "== steam: Shut Down from the power menu; ending the session" + rc=0 + break + fi + if [ -e "$STEAMOS_STEAM_REBOOT_SENTINEL" ]; then + rm -f "$STEAMOS_STEAM_REBOOT_SENTINEL" + echo "== steam: Restart from the power menu; starting the client again" + set -- + continue + fi + if [ -s "$HOME/.bl-restart-game" ]; then + _bl_again=$(cat "$HOME/.bl-restart-game" 2>/dev/null) + rm -f "$HOME/.bl-restart-game" + case $_bl_again in + ''|0*|*[!0-9]*) ;; + *) + echo "== steam: starting the client again to launch $_bl_again" + set -- + steam_hold_launch "$_bl_again" & + continue + ;; + esac + fi + if [ -f "$HOME/.bl-restart-lost" ]; then + rm -f "$HOME/.bl-restart-lost" + echo "== steam: starting the client again so it lists every shortcut" + set -- + continue + fi if [ -f "$HOME/.bl-restart-once" ]; then echo "== steam: restarting once so the new compatibility layer is in the client's lists" set -- continue fi [ "$rc" -eq 42 ] || break - steam_updates=$((steam_updates + 1)) - if [ "$steam_updates" -ge 3 ]; then + if steam_update_stuck "$steam_ran"; then echo "== steam: asked to restart for an update $steam_updates times and it is not installing; the session stops here rather than loop" break fi - # The URL arguments were acted on the first time; a restart must not repeat them. set -- done if [ -n "${stop_watcher:-}" ]; then @@ -1066,10 +1205,6 @@ BUSCONF wait "$games_watcher" 2>/dev/null || true fi if [ -n "${BL_DESKTOP:-}" ]; then - # Started from the desktop (droiddeck-steam-launch): the desktop's own programs share this - # script's parent, so reap_orphans - right under gamescope, where everything is the client's - - # is not for here. The helpers this run started (the cores and redistributables beats, the - # system bus and the NetworkManager stand-in) go with the client instead. if [ -n "${decky_supervisor:-}" ]; then kill "$decky_supervisor" 2>/dev/null || true wait "$decky_supervisor" 2>/dev/null || true @@ -1088,6 +1223,9 @@ BUSCONF [ -n "$_bl_jobs" ] && kill $_bl_jobs 2>/dev/null reap_orphans fi + if [ -n "${BL_STEAM_EXIT_FILE:-}" ]; then + printf '%s\n' "$rc" > "$BL_STEAM_EXIT_FILE" + fi exit "$rc" ;; *) diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-compat b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-compat index 88f66e1eb0..c9c8cb1c2a 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-compat +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-compat @@ -126,10 +126,29 @@ INSTALL_JS = r""" return "installed"; })() """.replace("__BINDING__", BINDING) -# Big Picture's "Switch to Desktop" asks the client's SteamOS manager, which the client has only when it -# runs as SteamOS (-steamos3, Deck mode); otherwise the request fails and the screen stays on "Switching -# to Desktop..." for good. The request is caught on its way to the client and answered as SteamOS's -# own path does, with steamos-session-select. +TOOLS_JS = r""" +(() => { + if (window.__droiddeckTools) return "present"; + const installs = SteamClient.Installs, downloads = SteamClient.Downloads; + if (typeof installs?.OpenInstallWizard !== "function" || typeof installs?.RegisterForShowInstallWizard !== "function" || + typeof installs?.ContinueInstall !== "function" || typeof downloads?.QueueAppUpdate !== "function") + throw new Error("the client's install calls are not ready"); + const self = { asked: new Map() }; + installs.RegisterForShowInstallWizard((state) => { + const app = Number(state?.currentAppID); + if (state?.eInstallState === 7 && Date.now() - (self.asked.get(app) || 0) < 120000) { + self.asked.delete(app); + installs.ContinueInstall(); + } + }); + self.install = (app) => { self.asked.set(app, Date.now()); installs.OpenInstallWizard([app], "0"); return true; }; + self.update = (app) => { downloads.QueueAppUpdate(app, "0"); return true; }; + window.__droiddeckTools = self; + return "installed"; +})() +""" +TOOL_CHECK_SECONDS = 60 +TOOL_RETRY_SECONDS = 300 SWITCH_BINDING = "droiddeckSwitchToDesktop" SWITCH_JS = r""" (() => { @@ -157,6 +176,82 @@ SWITCH_JS = r""" })() """.replace("__BINDING__", SWITCH_BINDING) SESSION_SELECT = "/usr/bin/steamos-session-select" +VR_BINDING = "droiddeckLaunchSteamVr" +VR_HELPER = "/usr/local/bin/droiddeck-steamvr" +VR_JS = r""" +(() => { + if (window.__droiddeckSteamVr) return "present"; + const apps = SteamClient.Apps; + if (!apps || typeof apps.RunGame !== "function") throw new Error("Steam RunGame is not ready"); + const run = apps.RunGame; + const self = { running: false, pending: new Map(), lastError: null }; + const flush = () => { + if (!self.running) return; + const queued = Array.from(self.pending.values()); + self.pending.clear(); + for (const item of queued) { + clearTimeout(item.timer); + run.call(item.receiver, item.id, ...item.args); + } + }; + if (typeof SteamClient.OpenVR?.RegisterForVRModeChange === "function") { + self.subscription = SteamClient.OpenVR.RegisterForVRModeChange(running => { + self.running = !!running; + flush(); + }); + } + const wrapped = function (id, ...args) { + const gameid = String(id); + if (typeof window.__BINDING__ !== "function") return run.call(this, id, ...args); + if (gameid === "250820") { + window.__BINDING__(gameid); + return; + } + const overview = window.appStore?.GetAppOverviewByGameID?.(gameid); + const vr = overview?.vr_only === true; + if (vr && self.subscription && /^[1-9][0-9]{0,19}$/.test(gameid)) { + if (self.pending.has(gameid)) return; + self.lastError = null; + const item = { receiver: this, id, args, timer: null }; + item.timer = setTimeout(() => { + self.pending.delete(gameid); + self.lastError = "SteamVR did not become ready. Start SteamVR from DroidDeck and try the game again."; + console.error("DroidDeck: " + self.lastError); + }, 600000); + self.pending.set(gameid, item); + try { window.__BINDING__(gameid); } + catch (e) { clearTimeout(item.timer); self.pending.delete(gameid); throw e; } + flush(); + return; + } + return run.call(this, id, ...args); + }; + apps.RunGame = wrapped; + if (apps.RunGame !== wrapped) throw new Error("Steam RunGame could not be redirected"); + if (typeof SteamClient.OpenVR?.StartVR === "function") { + const start = SteamClient.OpenVR.StartVR; + SteamClient.OpenVR.StartVR = function (...args) { + if (typeof window.__BINDING__ === "function") return window.__BINDING__("250820"); + return start.apply(this, args); + }; + } + window.__droiddeckSteamVr = self; + return "installed"; +})() +""".replace("__BINDING__", VR_BINDING) + + +def launch_steamvr(): + """Keep downloads/startup off the Steam UI bridge's event loop.""" + say("SteamVR library launch: using the DroidDeck ARM64 helper") + state = os.path.join(os.environ.get("XDG_RUNTIME_DIR", "/tmp"), "droiddeck-steamvr") + try: + os.makedirs(state, exist_ok=True) + with open(os.path.join(state, "library-launch.log"), "a") as log: + return subprocess.Popen([VR_HELPER, "launch"], stdin=subprocess.DEVNULL, + stdout=log, stderr=subprocess.STDOUT, start_new_session=True) + except OSError as e: + say("SteamVR library launch failed: %s" % e) class Closed(Exception): @@ -325,6 +420,9 @@ class Page: raise RuntimeError((details.get("exception") or {}).get("description") or details.get("text") or "script failed") return result.get("result", {}).get("value") + def tools(self, call): + return self.evaluate("%s;\nwindow.__droiddeckTools.%s" % (TOOLS_JS, call)) + def compat(self, call): return self.evaluate("%s;\nwindow.__droiddeckCompat.%s" % (INSTALL_JS, call)) @@ -409,6 +507,9 @@ class Helper: self.known = set() self.installed = None self.fex_asked = set() + self.tools_asked = {} + self.tools_checked = None + self.vr_launch = None def attach(self): path = shared_context(self.port) @@ -419,6 +520,8 @@ class Helper: if page.evaluate("typeof SteamClient === 'object' && typeof SteamClient.WebUITransport === 'object'") is not True: raise LookupError("SteamClient is not ready") page.call("Runtime.addBinding", {"name": BINDING}) + page.call("Runtime.addBinding", {"name": VR_BINDING}) + page.evaluate(VR_JS) if not self.steamos: page.call("Runtime.addBinding", {"name": SWITCH_BINDING}) page.evaluate(SWITCH_JS) @@ -446,24 +549,77 @@ class Helper: installed = COMPAT["installed_apps"](self.steam_root) self.installed = installed picks = COMPAT["valve_picks"](self.steam_root) - apps = sorted(set(installed) | set(picks) | set(state.get("auto", {})), key=COMPAT["app_order"]) + prior_auto = state.get("auto", {}) + if not isinstance(prior_auto, dict): + prior_auto = {} + # "native" from earlier builds also lists dual-platform games nobody chose to run natively. + prior_native = state.get("native_choices", ()) + native_choices = set(prior_native if isinstance(prior_native, (list, tuple, set)) else ()) + apps = sorted(set(installed) | set(picks) | set(prior_auto) | native_choices, key=COMPAT["app_order"]) + overrides = COMPAT["requested_games"]( + COMPAT["game_requests"](), catalog, [t["name"] for t in live]) + apps = sorted(set(apps) | set(overrides), key=COMPAT["app_order"]) current = dict(page.compat("many(%s)" % json.dumps(apps)) or {}) current["0"] = top["selected"] - native = COMPAT["native_targets"](self.steam_root, installed) - changes, auto = COMPAT["plan_mapping"](current, installed, [t["name"] for t in live], default, COMPAT["followers"](state, current), native, picks) + native = COMPAT["native_targets"](self.steam_root, apps) + raw_mapping = COMPAT["read_config_mapping"]( + os.path.join(self.steam_root, "config", "config.vdf")) + if raw_mapping is None: + for app in native_choices: + current[app] = "" + for app in set(native) - native_choices: + if not current.get(app): + current.pop(app, None) + else: + for app in set(native) | native_choices: + if app in raw_mapping: + # The client shows an explicit native choice as the tool it inherits, and writes config.vdf late. + if raw_mapping[app] == "" or current.get(app) not in self.known: + current[app] = raw_mapping[app] + elif app in prior_auto or app in native_choices: + current[app] = "" + elif not current.get(app): + current.pop(app, None) + changes, auto = COMPAT["plan_mapping"]( + current, installed, [t["name"] for t in live], default, + COMPAT["followers"](state, current), native, picks, overrides, + prior_auto.keys(), native_choices) for app, tool in sorted(changes.items(), key=lambda item: COMPAT["app_order"](item[0])): - page.compat("set(%d, %s)" % (int(app), json.dumps(tool))) - say("%s -> %s" % ("default" if app == "0" else "app %s" % app, tool)) - state.update(auto=auto, tools=catalog, live=True) + page.compat("set(%d, %s)" % (int(app), json.dumps(tool if tool is not None else ""))) + say("%s -> %s" % ("default" if app == "0" else "app %s" % app, + tool if tool is not None else "Steam native default")) + state.update( + auto={app: tool for app, tool in auto.items() if tool is not COMPAT["NATIVE_CHOICE"]}, + native_choices=sorted(app for app, tool in auto.items() if tool is COMPAT["NATIVE_CHOICE"]), + tools=catalog, live=True) + state.pop("native", None) if waiting: state["pending"] = wanted say("%s is new to the running client; it applies when Steam next starts" % wanted) else: state.pop("pending", None) COMPAT["write_json"](state_file, state) - if native or os.path.exists(COMPAT["fex_wanted_marker"]()): - for app in COMPAT["request_fex"](self.steam_root, self.fex_asked): - say("asked the client to install %s for x86 Linux titles and programs" % app) + + def ensure_tools(self): + """Proton, FEX and the runtimes FEX needs are fetched as soon as the client is up, never left pending.""" + now = time.monotonic() + if self.tools_checked is not None and now - self.tools_checked < TOOL_CHECK_SECONDS: + return + self.tools_checked = now + if COMPAT["game_running"](): + return + for app, action in COMPAT["tool_downloads"](self.steam_root): + if now - self.tools_asked.get(app, -TOOL_RETRY_SECONDS) < TOOL_RETRY_SECONDS: + continue + self.tools_asked[app] = now + try: + self.page.tools("%s(%d)" % (action, int(app))) + say("asked the client to %s %s" % (action, app)) + except Exception as e: + say("the client could not %s %s (%s)" % (action, app, e)) + if action == "install": + for asked in COMPAT["request_fex"](self.steam_root, self.fex_asked): + say("asked the client to install %s through steam://install" % asked) def request_waiting(self): request = COMPAT["read_json"](COMPAT["state_path"]("request.json")) @@ -475,6 +631,14 @@ class Helper: events = self.page.drain() if any(called(e, SWITCH_BINDING) for e in events): switch_to_desktop() + vr_games = {e.get("params", {}).get("payload") for e in events if called(e, VR_BINDING) and + isinstance(e.get("params", {}).get("payload"), str)} + vr_games = {game for game in vr_games if isinstance(game, str) and game.isascii() and + game.isdecimal() and not game.startswith("0") and len(game) <= 20 and + int(game) <= 0xffffffffffffffff} + if vr_games and (self.vr_launch is None or self.vr_launch.poll() is not None): + say("preparing SteamVR for library app(s): " + ", ".join(sorted(vr_games))) + self.vr_launch = launch_steamvr() return events def serve(self, watcher): @@ -482,6 +646,7 @@ class Helper: f.write("%d\n" % os.getpid()) say("attached to the client on port %d" % self.port) self.reconcile() + self.ensure_tools() while True: sources = [self.page.ws] + ([watcher] if watcher.fileno() >= 0 else []) ready = [self.page.ws] if self.page.ws.pending() else select.select(sources, [], [], 30 if watcher.fileno() >= 0 else 2)[0] @@ -489,13 +654,14 @@ class Helper: if self.page.ws in ready: due = any(called(e, BINDING) for e in self.drain()) if (watcher in ready or watcher.fileno() < 0) and watcher.changed(): - due = self.installed != COMPAT["installed_apps"](self.steam_root) or self.request_waiting() + due = True if due: time.sleep(0.3) if watcher.fileno() >= 0 and select.select([watcher], [], [], 0)[0]: watcher.changed() self.drain() self.reconcile() + self.ensure_tools() def detach(): @@ -519,8 +685,8 @@ def main(): say("no devtools port for this session; the client's mapping is kept through config.vdf") return 0 os.makedirs(COMPAT["COMPAT_DIR"], exist_ok=True) - watcher = Watcher([COMPAT["state_path"]("request.json")] + [os.path.join(lib, "steamapps", "libraryfolders.vdf") for lib in (steam_root, COMPAT["LIBRARY"] + "-sd")]) - # The client has its own SteamOS manager when started as SteamOS (droiddeck-session's Deck mode). + watcher = Watcher([COMPAT["state_path"]("request.json"), COMPAT["state_path"]("games.json")] + + [os.path.join(lib, "steamapps", "libraryfolders.vdf") for lib in (steam_root, COMPAT["LIBRARY"] + "-sd")]) steamos = os.environ.get("BL_STEAMDECK") == "1" and os.environ.get("BL_STEAM_UI") != "desktop" helper = Helper(steam_root, port, steamos) failures = 0 diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-desktop-ui b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-desktop-ui index 6eda34131a..68b0a2a3ac 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-desktop-ui +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-desktop-ui @@ -16,7 +16,6 @@ def select_desktop(evaluate, timeout=90): if result.get('value') is True: return True except Exception: - # CEF and SharedJSContext are not ready during the client's initial startup/update. pass time.sleep(1) return False diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-games b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-games index 5fe62eb1e3..4bfbb87ede 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-games +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-games @@ -5,6 +5,7 @@ import json import os from pathlib import Path import re +import shlex import subprocess import sys import time @@ -62,6 +63,12 @@ def source_stamp(game): return None +def store_game(game): + """Games a store client installed belong to that store: the Steam copy of the same title is + another license with its own files, and an import would let Steam update over the store's.""" + return bool(game.get("store")) + + def manifest_ids(steamapps, name): matches = [] for manifest in Path(steamapps).glob("appmanifest_*.acf"): @@ -113,8 +120,7 @@ def method(obj, slot, result, *args): def probe(steam_root, ids): - # Slots belong to Valve's SteamClient020, SteamUser021 and STEAMAPPS_INTERFACE_VERSION008. - library = C.CDLL(str(Path(steam_root) / "steamrtarm64/steamclient.so")) + library = C.CDLL(os.environ.get("BL_STEAMCLIENT") or str(Path(steam_root) / "steamrtarm64/steamclient.so")) library.CreateInterface.argtypes = [C.c_char_p, C.c_void_p] library.CreateInterface.restype = C.c_void_p client = library.CreateInterface(b"SteamClient020", None) @@ -168,7 +174,8 @@ def request_restart(steam_root): """The client reads manifests and shortcuts only at start, so an import needs one restart; the session's loop runs the importer between the exit and the next start.""" Path(os.environ.get("HOME", "/root"), ".bl-restart-once").touch() - subprocess.run([str(Path(steam_root) / "steamrtarm64/steam"), "-shutdown"], + command = shlex.split(os.environ.get("BL_STEAM_SHUTDOWN", "")) or [str(Path(steam_root) / "steamrtarm64/steam"), "-shutdown"] + subprocess.run(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=30) @@ -179,18 +186,12 @@ def unimported(steam_root, snapshot, candidates): def watch(steam_root, listing): - games = read_json(listing, []) + games = [game for game in read_json(listing, []) if not store_game(game) and not game.get("native")] if os.environ.get("BL_STEAM_OFFLINE") == "1" or not games: return candidates, sources = {}, {} next_lookup = 0 last_status = None - # The probe is a fresh python that loads steamclient.so, seconds of CPU under proot. Ownership - # only moves with a purchase or a new match, so it runs when the matches or their sources - # change, after a failed probe, and otherwise every five minutes - not on every 30 s beat. - # A failed probe is retried on a doubling delay up to those five minutes rather than on every - # beat (a client that is not logged on fails it for as long as it stays that way), and none - # starts while a game is running: the answer can wait, the game's cores cannot. probed, next_probe, failures = None, 0, 0 pending, requested = [], [] while True: @@ -214,9 +215,10 @@ def watch(steam_root, listing): elif candidates and (key != probed or now >= next_probe): probed, next_probe = key, now + 300 try: + probe_env = dict(os.environ, HOME=os.environ["BL_STEAM_IPC_HOME"]) if os.environ.get("BL_STEAM_IPC_HOME") else None result = subprocess.run([sys.executable, __file__, "probe", steam_root, *map(str, sorted(set(candidates.values())))], - capture_output=True, text=True, timeout=15) + capture_output=True, text=True, timeout=15, env=probe_env) if result.returncode != 0: status = "ownership probe failed: " + (result.stderr.strip()[-300:] or str(result.returncode)) failures += 1 @@ -370,6 +372,22 @@ def seed_install(steam_root, game, appid): return True +def release(steam_root, game): + """Undoes an import made before store games were skipped. Only our symlink and manifest go; + the store's folder stays where it is.""" + steamapps = Path(steam_root) / "steamapps" + sources = {game.get("folder", ""), legacy_path(game.get("folder", ""))} + for target in sorted((steamapps / "common").glob("DroidDeck-*")): + appid = target.name.removeprefix("DroidDeck-") + if not (appid.isdigit() and target.is_symlink() and os.readlink(target) in sources): + continue + for manifest in (steamapps / f"appmanifest_{appid}.acf", steamapps / PARKED / f"appmanifest_{appid}.acf"): + if manifest.is_file() and ours(manifest, appid): + manifest.unlink() + target.unlink() + print(f"droiddeck-steam-games: {game.get('name', appid)} came from {game['store']}; it is a shortcut again, not Steam app {appid}") + + def route(steam_root, acct, games): snapshot = read_json(Path(acct) / "config" / STATE, {}) if not isinstance(snapshot, dict): @@ -386,6 +404,16 @@ def route(steam_root, acct, games): except OSError as error: print(f"droiddeck-steam-games: set-aside installs not restored ({error})") for game in games: + if store_game(game): + try: + release(steam_root, game) + except OSError as error: + print(f"droiddeck-steam-games: store import not undone ({error})") + shortcuts.append(game) + continue + if game.get("native"): + shortcuts.append(game) + continue folder = game.get("folder", "") appid = candidates.get(folder, candidates.get(legacy_path(folder))) stamp = source_stamp(game) diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-install b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-install index 85404bd620..503e6871ff 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-install +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-install @@ -1,10 +1,6 @@ #!/bin/bash -# Fetches the native arm64 Steam client from Valve's client-update CDN into ~/.local/share/Steam. -# The client is not redistributable, so the runtime ships this script instead of the client. set -eu -cdn=https://client-update.fastly.steamstatic.com -# The Deck's beta branch, which droiddeck-session forces on the command line too. A client already -# on disk from another branch is left for the client to move (droiddeck-session's package/beta). +cdn_list="https://client-update.steamstatic.com https://client-update.akamai.steamstatic.com https://client-update.fastly.steamstatic.com" steam_channel=steamdeck_publicbeta manifest=steam_client_${steam_channel}_linuxarm64 steam_root=${XDG_DATA_HOME:-$HOME/.local/share}/Steam @@ -45,7 +41,12 @@ if [ -n "$repair" ]; then [ "$(sha1sum "$part" | cut -d' ' -f1)" = "$sum" ] || rm -f "$part" done fi -[ -x "$steam_root/steamrtarm64/steam" ] && [ -f "$stamp" ] && exit 0 +sync= +if [ "${1:-}" = --sync ]; then + case "${2:-}" in publicbeta|steamdeck_publicbeta) sync=$2 ;; *) sync=$steam_channel ;; esac + manifest=steam_client_${sync}_linuxarm64 +fi +[ -z "$sync" ] && [ -x "$steam_root/steamrtarm64/steam" ] && [ -f "$stamp" ] && exit 0 work=$(mktemp -d) trap 'rm -rf "$work"' EXIT @@ -112,8 +113,28 @@ fetch() { done } -curl -fsSL "${limits[@]}" --retry 5 --retry-connrefused --retry-delay 5 "$cdn/$manifest" -o "$work/manifest" +cdn="" +for candidate in $cdn_list; do + if curl -fsSL --connect-timeout 10 --max-time 30 --retry 2 --retry-connrefused --retry-delay 3 \ + "$candidate/$manifest" -o "$work/manifest"; then + cdn=$candidate + break + fi +done +[ -n "$cdn" ] || { echo "droiddeck-steam-install: no Steam client CDN answered for $manifest" >&2; exit 1; } +cdn_order=("$cdn") +for candidate in $cdn_list; do + [ "$candidate" = "$cdn" ] || cdn_order+=("$candidate") +done version=$(awk -F'"' '$2 == "version" { print $4; exit }' "$work/manifest") +if [ -n "$sync" ]; then + installed=$(awk -F'"' '$2 == "version" { print $4; exit }' "$steam_root/package/$manifest.manifest" 2>/dev/null || true) + if [ -x "$steam_root/steamrtarm64/steam" ] && [ "$installed" = "$version" ]; then + chmod -R a+x "$steam_root/steamrtarm64" "$steam_root/linuxarm64" 2>/dev/null || true + exit 0 + fi + echo "== STEP $(date -u +%H:%M:%S) updating the arm64 Steam client to $version (was ${installed:-none}) for the x86-64 client" +fi # Every component block: its name, then the plain zip's file name, sha256 and size. awk -F'"' ' /^\t"/ && NF >= 3 && $4 == "" { block = $2 } @@ -143,7 +164,14 @@ while read -r block file sum size; do continue fi progress "$parts/$file" "$block" - fetch "$cdn/$file" "$parts/$file" "$size" "$sum" "$block" || exit 1 + fetched="" + for host in "${cdn_order[@]}"; do + if fetch "$host/$file" "$parts/$file" "$size" "$sum" "$block"; then + fetched=$host + break + fi + done + [ -n "$fetched" ] || { echo "droiddeck-steam-install: $file failed on every CDN" >&2; exit 1; } unzip -qo "$parts/$file" -d "$steam_root" : > "$parts/$file.unpacked" rm -f "$parts/$file" @@ -159,20 +187,20 @@ find "$steam_root" -depth -name '*\\*' | while read -r odd; do mv -f "$odd" "$fixed" fi done -echo "$steam_channel" > "$steam_root/package/beta" +chmod -R a+x "$steam_root/steamrtarm64" "$steam_root/linuxarm64" 2>/dev/null || true +if [ -n "$sync" ]; then + cp -f "$work/manifest" "$steam_root/package/$manifest.manifest" +else + echo "$steam_channel" > "$steam_root/package/beta" +fi ln -sfn "$steam_root/steamrtarm64" "$steam_root/steamrtarm32" chmod +x "$steam_root/steamrtarm64/steam" 2>/dev/null || true -# What Valve's steam.sh sets up before it runs the client (it has no arm64 branch itself). mkdir -p "$HOME/.steam" ln -sfn "$steam_root" "$HOME/.steam/root" ln -sfn "$steam_root" "$HOME/.steam/steam" ln -sfn "$steam_root/steamrtarm64" "$HOME/.steam/bin64" -ln -sfn "$steam_root/linuxarm64" "$HOME/.steam/sdk64" -# The arm64 client runs every game through $HOME/.steam/sdkarm64/steam-launch-wrapper. Valve's -# steam.sh has no arm64 branch to create it, and without it a launch dies in /bin/sh before Proton -# is ever invoked - "No such file or directory", no Proton log, and the only other clue is an -# unrelated-looking installscript assertion. Same target as sdk64; the client picks the name by -# architecture. +# sdk64 is where x86_64 Steamworks looks for steamclient.so; arm64 builds look in sdkarm64. +ln -sfn "$steam_root/linux64" "$HOME/.steam/sdk64" ln -sfn "$steam_root/linuxarm64" "$HOME/.steam/sdkarm64" ln -sfn "$steam_root/steamrtarm64" "$HOME/.steam/binarm64" ln -sfn "$steam_root/linux32" "$HOME/.steam/sdk32" diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-language b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-language index bde57b06f2..f892e8e22c 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-language +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-language @@ -122,7 +122,6 @@ def set_value(tokens, opening, key, value): def with_language(text, language): tokens = tokenize(text) if child(tokens, 0, len(tokens), "Registry") is None: - # Not a registry the client wrote (or none at all): start one it will read. tokens = [] for path in KEYS: set_value(tokens, ensure_block(tokens, path), "language", language) diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-launch b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-launch index a04d7980c0..ec5453f5ba 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-launch +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-launch @@ -1,13 +1,4 @@ #!/bin/bash -# Starts the Steam client from inside a session (the desktop's menu entries and the per-game -# launchers droiddeck-desktop-games writes): -# droiddeck-steam-launch desktop [appid|steam-url] Steam's desktop UI, optionally a game -# droiddeck-steam-launch bigpicture [appid|steam-url] Big Picture -# -# The desktop (KDE Plasma) composites in software and has no dma-buf, so the client's own Vulkan -# window - and any game it starts - would die at its first frame there. The request goes to the app -# instead, which ends the desktop and starts a Steam session under gamescope in its place, as -# SteamOS's desktop hands Steam back to Gaming Mode. set -u ui=${1:-desktop} target=${2:-} @@ -20,12 +11,38 @@ case $target in *) url=steam://rungameid/$target ;; esac -# Ask the app for a Steam session. +if [ "$ui" = desktop ] && [ "${BL_DESKTOP:-}" = 1 ]; then + if [ "${BL_STEAM_CLIENT_ARCH:-}" = x86_64 ]; then + client_home=${BL_X64_HOME:-${HOME:-/root}/.droiddeck-x64} + client=(/usr/local/bin/droiddeck-steam-x64 --exec) + else + steam_root=${XDG_DATA_HOME:-${HOME:-/root}/.local/share}/Steam + export LD_LIBRARY_PATH=$steam_root/steamrtarm64:$steam_root/steamrtarm64/panorama${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} + client_home=$HOME + client=("$steam_root/steamrtarm64/steam") + fi + mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/droiddeck" + exec 9>"${XDG_CACHE_HOME:-$HOME/.cache}/droiddeck/steam-desktop.lock" + if ! flock -n 9; then + for ((attempt = 0; attempt < 180; attempt++)); do + pid=$(cat "$client_home/.steam/steam.pid" 2>/dev/null || true) + if [ -p "$client_home/.steam/steam.pipe" ] && [[ "$pid" =~ ^[0-9]+$ ]] && kill -0 "$pid" 2>/dev/null; then + exec "${client[@]}" -nobigpicture -no-cef-sandbox \ + -cef-ozone-platform=x11 -cef-disable-gpu "${url:-steam://open/library}" + fi + sleep 0.5 + done + echo "droiddeck-steam-launch: the desktop client did not become ready" >&2 + exit 69 + fi + export BL_INSIDE=1 BL_STEAM_UI=desktop + exec /usr/local/bin/droiddeck-session steam "${url:-steam://open/library}" +fi + dir=${BL_LAUNCH_DIR:-} if [ -z "$dir" ] || [ ! -d "$dir" ]; then echo "droiddeck-steam-launch: not inside a DroidDeck session (BL_LAUNCH_DIR unset)" >&2 exit 69 fi -# Written whole, then renamed: the app reads it on close, never half-written. printf 'ui=%s\nurl=%s\n' "$ui" "$url" > "$dir/steam-launch.tmp" && mv -f "$dir/steam-launch.tmp" "$dir/steam-launch" echo "droiddeck-steam-launch: asked the app for Steam ($ui${url:+, $url})" diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-library b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-library index 0a961c87a3..171400b310 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-library +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-library @@ -1,23 +1,10 @@ #!/usr/bin/python3 -# Registers the card the app installs to (bound at /mnt/droiddeck-sd) as a library folder of the -# native Steam client, so they show as installed there instead of being downloaded a second time. -# -# droiddeck-steam-library <steam root> -# -# Ported from WinNative's gamescope runtime (GPL-3.0). import json import os import re import sys -# The client's own library is internal storage (its steamapps/common is bound to the app's root); -# the card is the one extra library folder. -# The app binds the storage the user chose (Steam cog -> Game storage) at this path and names it -# in BL_LIBRARY_LABEL; nothing bound = internal only, and the entry is removed so the client does -# not keep offering a place that is not there. LIBRARIES = (("/mnt/droiddeck-sd", os.environ.get("BL_LIBRARY_LABEL", "SD Card")),) -# The client calls its own library "Local Drive (/)", which says nothing about where that is. -# It is the phone's internal storage, so say so. MAIN_LABEL = "Internal Storage" @@ -153,10 +140,6 @@ def relabel(steam_root, target, label): with open(path, "w", encoding="utf-8") as f: f.write("\n".join(out)) print("droiddeck-steam-library: labelled %s %r" % (target, label)) - # A library also carries its own libraryfolder.vdf, and the client takes the label from there - # back into the list above - so editing the list alone is undone on the next start. The - # client's own library has no such file, which is why that one kept the new name and the card - # went back to the name it was first registered with. marker = os.path.join(target, "libraryfolder.vdf") if not os.path.isfile(marker): return diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-shim b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-shim index 03cc4c959c..3e319a460e 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-shim +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-shim @@ -1,9 +1,4 @@ #!/bin/bash -# `steam` on the desktop. The client writes a menu entry per installed game that runs -# `steam steam://rungameid/<id>`, and its own launchers say `steam`. On the desktop that goes -# through droiddeck-steam-launch - which runs the client on the desktop itself when it draws with -# the GPU, hands the URL to a client already running there, and asks the app for a Steam session -# on a software desktop. Anywhere else it is the client itself. set -u if [ "${BL_DESKTOP:-}" = 1 ]; then url= @@ -16,4 +11,5 @@ if [ "${BL_DESKTOP:-}" = 1 ]; then done exec /usr/local/bin/droiddeck-steam-launch "$ui" ${url:+"$url"} fi +[ "${BL_STEAM_CLIENT_ARCH:-}" = x86_64 ] && exec /usr/local/bin/droiddeck-steam-x64 --exec "$@" exec "${HOME:-/root}/.local/share/Steam/steamrtarm64/steam" "$@" diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-shortcuts b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-shortcuts index 3fa78c9008..3764e4a92c 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-shortcuts +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-shortcuts @@ -29,7 +29,6 @@ def account_dir(steam_root): pass userdata = os.path.join(steam_root, "userdata") if recent is not None: - # loginusers holds the 64-bit id; userdata folders use the 32-bit account id. acct = recent - 76561197960265728 return os.path.join(userdata, str(acct)) try: @@ -39,7 +38,6 @@ def account_dir(steam_root): return os.path.join(userdata, dirs[0]) if len(dirs) == 1 else None -# ---- binary VDF: 0x00 map, 0x01 string, 0x02 int32, 0x08 end ---- def parse(data): pos = [0] @@ -123,8 +121,6 @@ def shortcut(game, launch_options=None): RECORD = ".droiddeck-shortcuts.json" AWAY_LIMIT = 256 FIELDS = ("AppName", "Exe", "StartDir", "icon", "LaunchOptions") -# What the app may change after the shortcut exists. Each follows the app only while Steam still -# has what the app last asked for; a value the user set in Steam's Properties stays. FOLLOWED = ("StartDir", "LaunchOptions") @@ -164,9 +160,6 @@ def merge(fresh, current, state, seen): for field in ("AppName", "icon"): if current.get(field) == base.get(field): entry[field] = fresh[field] - # Start in and launch options the app sets: only once there is a record of what it asked for - # before (a first run keeps whatever the shortcut already had), and an older record that did - # not keep launch options means the app asked for none. if isinstance(state.get("app"), dict): for field in FOLLOWED: was = base.get(field, "" if field == "LaunchOptions" else current.get(field)) @@ -187,12 +180,14 @@ def merge(fresh, current, state, seen): def reconcile(existing, wanted, seen, record): games, away = record["games"], dict(record["away"]) kept, ours, placed = [], [], {} + claimed = {(unquoted(fresh["Exe"]), fresh["AppName"]) for fresh in wanted.values()} for value in existing.values(): if not isinstance(value, dict): continue tags = value.get("tags") if not isinstance(tags, dict) or TAG not in tags.values(): - kept.append(value) + if (unquoted(value.get("Exe")), value.get("AppName")) not in claimed: + kept.append(value) continue appid = value.get("appid") if not isinstance(appid, int) or appid in placed: @@ -240,8 +235,6 @@ def save_record(path, record): ART_MANIFEST = ".droiddeck-art.json" -# listing key -> the client's grid file suffix: <appid>p = portrait capsule, <appid> = header, -# <appid>_hero, <appid>_logo. ART_SLOTS = (("p", "p"), ("header", ""), ("hero", "_hero"), ("logo", "_logo")) @@ -273,7 +266,7 @@ def install_art(acct, games): dst = os.path.join(grid, name) size = os.path.getsize(src) if os.path.exists(dst) and name not in manifest: - continue # the user's own choice inside the client; never ours to touch + continue wanted[name] = size if os.path.exists(dst) and manifest.get(name) == size: continue @@ -344,19 +337,29 @@ def main(): save_record(record_path, record) print("droiddeck-steam-shortcuts: %d added game(s) written, %d of the client's own kept" % (len(ours), len(kept))) install_art(acct, [g for g in games if g.get("exe") and g.get("name")]) - # Each added game runs under the ARM64 Proton: the compat registrar's own mapping writer. try: - # No .py suffix on the registrar, so the loader has to be named. compat_path = "/usr/local/bin/steam-compatibility" spec = importlib.util.spec_from_file_location("compat", compat_path, loader=importlib.machinery.SourceFileLoader("compat", compat_path)) compat = importlib.util.module_from_spec(spec) spec.loader.exec_module(compat) cfg = os.path.join(steam_root, "config", "config.vdf") if os.path.isfile(cfg) and (ours or routes): - compat.register_default(cfg, apps=[str(int(g["appid"]) & 0xFFFFFFFF) for g in games if g.get("exe")] + [str(appid) for appid in set(routes.values())], - protect=compat.adopt_extras(os.path.join(steam_root, "compatibilitytools.d"))) - print("droiddeck-steam-shortcuts: mapped them to %s" % compat.TOOL) - except Exception as e: # noqa: BLE001 - the games still show; the client falls back to the default tool + tools = os.path.join(steam_root, "compatibilitytools.d") + x64_tool = os.environ.get("BL_COMPAT_TOOL") + own = {} + if x64_tool: + protect = {compat.first_key(os.path.join(tools, e, "compatibilitytool.vdf"), ["compatibilitytools", "compat_tools"]) or e: e + for e in (os.listdir(tools) if os.path.isdir(tools) else [])} + # Its own state: the arm64 client's state.json lists which of that client's titles follow its default. + own = {"default": x64_tool, + "directory": os.path.join(os.path.dirname(os.path.abspath(steam_root)), "droiddeck-compat"), + "linux_tool": "droiddeck-direct"} + else: + protect = compat.adopt_extras(tools) + used = compat.register_default(cfg, apps=[str(int(g["appid"]) & 0xFFFFFFFF) for g in games if g.get("exe") and not g.get("native")] + [str(appid) for appid in set(routes.values())], + protect=protect, **own) + print("droiddeck-steam-shortcuts: mapped them to %s" % used) + except Exception as e: print("droiddeck-steam-shortcuts: compat mapping skipped (%s)" % e) return 0 diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-ui-scale b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-ui-scale index b3e009e60e..4a59976842 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-ui-scale +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-ui-scale @@ -21,7 +21,6 @@ import tempfile DISPLAY = "External: gamescope|||Windowed" NATIVE_RESOLUTION = "EnableSteamNativeExternalResolution" -# screensaver_while_ingame: kept in config.vdf like the Gamescope settings, under this path. SCREENSAVER_IN_GAME = ("Customization", "Screensaver", "WhileInGame") TOKEN = re.compile(r'\s+|//[^\n]*|"(?:\\.|[^"\\])*"|[{}]') @@ -79,8 +78,6 @@ def parse(text): def initial_scale(width, height): - # The Thor setting chosen on device at 1280x720 was 140% of its automatic scale. - # Adjust with canvas area so choosing a different session resolution keeps the UI usable. if not 320 <= width <= 16384 or not 320 <= height <= 16384: raise ValueError("invalid session size") return 1.3281567096710205 * math.sqrt(width * height / (1280 * 720)) @@ -97,8 +94,6 @@ def seed_text(text, scale): if display is not None and not isinstance(display, Block): raise ValueError("invalid display settings") if display is not None: - # Current describes the active display and is written even with automatic scaling. - # Named display entries are the user's saved choices, including a return to Auto. if any(name.lower() != 'current' and isinstance(value, Block) and value.get('ScaleFactor') is not None for name, value in display.pairs): return text, False @@ -111,7 +106,6 @@ def seed_text(text, scale): else: entry = '"UI"\n{\n"display"\n{\n' + entry + '}\n}\n' at, indent = root.end, 1 - # Insert only the new block; leave every existing byte, comment and credential untouched. insertion = '\n' + '\n'.join('\t' * indent + line for line in entry.splitlines()) + '\n' return text[:at] + insertion + text[at:], True @@ -138,7 +132,6 @@ def seed_value(text, path, value): for level, section in reversed(list(enumerate(sections))): lines = [(level, f'"{section}"'), (level, '{')] + lines + [(level, '}')] insertion = ''.join('\t' * (depth + level) + line + '\n' for level, line in lines) - # Before the line the block closes on, when it has one of its own; else beside the brace. at = text.rfind('\n', 0, block.end) + 1 if text[at:block.end].strip(): at, insertion = block.end, '\n' + insertion diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-x64 b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-x64 new file mode 100755 index 0000000000..2c27c9db4d --- /dev/null +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-x64 @@ -0,0 +1,1080 @@ +#!/bin/bash +set -eu +FEX_TAG=fex-2610-r5 +FEX_SHA256=0fc1ca2ba13817ad70d1ea157119a75c9c02446b57d166e6d676cce0807c19c4 +FEX_URL=https://github.com/Droid-Deck/DroidDeck-Components/releases/download/$FEX_TAG/fex.tzst +ROOTFS_URL=https://github.com/Droid-Deck/DroidDeck-Components/releases/download/fex-rootfs-ubuntu-24.04-2026-08-11/Ubuntu_24_04.sqsh +ROOTFS_SHA256=2854b06d3ff1b8f6e526135bfb6dd5b7b30ab3ab73e79ae933a3d9fed959a178 +CDN=https://client-update.fastly.steamstatic.com +# Must match the -clientbeta droiddeck-session starts this client with (steam_channel). +X64_CHANNEL=steamdeck_publicbeta +MANIFEST=steam_client_${X64_CHANNEL}_ubuntu12 + +REAL_HOME=${HOME:-/root} +X64_HOME=${BL_X64_HOME:-$REAL_HOME/.droiddeck-x64} +ROOTFS=$X64_HOME/rootfs +STEAM_X64=$X64_HOME/.local/share/Steam +ARM_STEAM=${XDG_DATA_HOME:-$REAL_HOME/.local/share}/Steam +LOG=$X64_HOME/steam-x64.log +mkdir -p "$X64_HOME" +step() { echo "== STEP $(date -u +%H:%M:%S) $*" | tee -a "$LOG"; } + +x64_default_dir() { + local d + while IFS= read -r d; do + [ -f "$d/.droiddeck-arm64-proton" ] && { echo "$d"; return; } + done < <(ls -d "$STEAM_X64"/compatibilitytools.d/DroidDeck-Proton* 2>/dev/null | sort -V -r + ls -d "$STEAM_X64"/compatibilitytools.d/GE-Proton*-aarch64 2>/dev/null | sort -V -r) + echo "$STEAM_X64/compatibilitytools.d/droiddeck-proton-arm64" +} +x64_default_tool() { + sed -n 's/^[[:space:]]*"\([^"]*\)"[[:space:]]*$/\1/p' "$(x64_default_dir)/compatibilitytool.vdf" 2>/dev/null | + grep -v -x -e compatibilitytools -e compat_tools | head -n 1 +} + +x64_client_parts() { + awk -F'"' ' + /^\t"/ && NF >= 3 && $4 == "" { block = $2 } + $2 == "file" { file[block] = $4 } + $2 == "sha2" { sha[block] = $4 } + END { for (b in file) if (b ~ /_all$/ || b ~ /_ubuntu12$/) print b, file[b], sha[b] } + ' "$1" | sort +} + +x64_sync_client() { + local chan cur version work total i block file sum old + chan=$(cat "$STEAM_X64/package/beta" 2>/dev/null || echo "$X64_CHANNEL") + old=$STEAM_X64/package/steam_client_${chan}_ubuntu12.manifest + cur=$(awk -F'"' '$2 == "version" { print $4; exit }' "$old" 2>/dev/null || true) + work=$(mktemp -d) + if ! curl -fsSL "$CDN/steam_client_${chan}_ubuntu12" -o "$work/manifest"; then + rm -rf "$work"; return 0 + fi + version=$(awk -F'"' '$2 == "version" { print $4; exit }' "$work/manifest") + if [ -z "$version" ] || [ "$version" = "$cur" ]; then + rm -rf "$work"; return 0 + fi + x64_client_parts "$work/manifest" > "$work/parts" + if [ -f "$old" ]; then + x64_client_parts "$old" | awk '{ print $3 }' > "$work/have" + grep -vwF -f "$work/have" "$work/parts" > "$work/todo" || true + else + cp "$work/parts" "$work/todo" + fi + total=$(grep -c . "$work/todo" || true) + step "updating the x86-64 Steam client to $version (was ${cur:-none}, $total part(s))" + i=0 + while read -r block file sum; do + i=$((i + 1)) + step "downloading Steam: $block ($i/$total)" + if ! curl -fsSL "$CDN/$file" -o "$work/$file" || ! echo "$sum $work/$file" | sha256sum -c --quiet; then + step "could not update the x86-64 client; it updates itself" + rm -rf "$work"; return 0 + fi + unzip -qo "$work/$file" -d "$STEAM_X64" + rm -f "$work/$file" + done < "$work/todo" + cp -f "$work/manifest" "$old" + echo "$version" > "$STEAM_X64/package/droiddeck-installed" + chmod +x "$STEAM_X64/steam.sh" "$STEAM_X64/steamrt64/steam" "$STEAM_X64/ubuntu12_32/steam" 2>/dev/null || true + rm -rf "$work" +} + +# The client rewrites config.vdf from memory as it exits: the mapping is written only while no x86 client runs. +x64_map_direct() { + local mode=write + [ "${1:-}" = --live ] && mode=live + [ -f "$STEAM_X64/config/config.vdf" ] || return 0 + if [ "$mode" = write ] && pgrep -f 'steamrt64/steam( |$)' >/dev/null 2>&1; then return 0; fi + python3 - "$mode" "$STEAM_X64/config/config.vdf" "$STEAM_X64/appcache/appinfo.vdf" "$X64_HOME/direct-auto.json" \ + "$X64_HOME/direct-sniper" "$STEAM_X64/steamapps:/mnt/droiddeck-sd/x86-64/steamapps" "$(x64_default_tool)" \ + "$REAL_HOME/.bl-compat-pending" ${BL_X64_DIRECT_APPS:-550} \ + <<'PY' || { [ "$mode" = live ] || step "could not map titles to DroidDeck direct"; } +# Steam does not swap an installed build when the tool changes: a title installed for Windows stays on Proton. +import json, os, re, struct, sys +mode, path, appinfo, auto_file, sniper_file, steamapps, proton, pending = sys.argv[1:9] +extra = sys.argv[9:] +WINDOWS_DEPOTS = {} +KNOWN = set() + + +def read_kv(buf, pos, strings): + out = {} + while True: + t = buf[pos] + pos += 1 + if t == 0x08: + return out, pos + if strings is not None: + key = strings[struct.unpack_from("<I", buf, pos)[0]] + pos += 4 + else: + end = buf.index(b"\0", pos) + key = buf[pos:end].decode("utf-8", "replace") + pos = end + 1 + if t == 0x00: + out[key], pos = read_kv(buf, pos, strings) + elif t == 0x01: + end = buf.index(b"\0", pos) + out[key] = buf[pos:end].decode("utf-8", "replace") + pos = end + 1 + elif t in (0x02, 0x03, 0x04, 0x06): + pos += 4 + elif t in (0x07, 0x0A): + pos += 8 + else: + raise ValueError("type %#x" % t) + + +def linux_games(file): + """{appid: runtime} for the games with a Linux build in the client's appinfo cache.""" + try: + buf = open(file, "rb").read() + except OSError: + return {} + magic = struct.unpack_from("<I", buf, 0)[0] + strings, pos = None, 8 + if magic == 0x07564429: + table = struct.unpack_from("<q", buf, 8)[0] + count, p = struct.unpack_from("<I", buf, table)[0], table + 4 + strings = [] + for _ in range(count): + end = buf.index(b"\0", p) + strings.append(buf[p:end].decode("utf-8", "replace")) + p = end + 1 + pos = 16 + elif magic != 0x07564428: + return {} + games = {} + while True: + try: + appid, size = struct.unpack_from("<II", buf, pos) + except struct.error: + break + if appid == 0: + break + KNOWN.add(str(appid)) + try: + info = read_kv(buf, pos + 8 + 60, strings)[0].get("appinfo", {}) + except (ValueError, IndexError, struct.error): + info = {} + pos += 8 + size + common = info.get("common", {}) + if str(common.get("type", "")).lower() != "game" or "linux" not in str(common.get("oslist", "")): + continue + runtime = "scout" + for m in (info.get("config", {}).get("app_mappings") or {}).values(): + if isinstance(m, dict) and m.get("platform") == "linux": + tool = str(m.get("tool", "")).lower() + runtime = "sniper" if "sniper" in tool else "soldier" if "soldier" in tool else runtime + games[str(appid)] = runtime + WINDOWS_DEPOTS[str(appid)] = { + d for d, v in (info.get("depots") or {}).items() + if isinstance(v, dict) and "windows" in str((v.get("config") or {}).get("oslist", "")) + and "linux" not in str((v.get("config") or {}).get("oslist", "")) + } + return games + + +def manifest(app): + """The app's appmanifest text from the first of the client's libraries (internal storage, the + card) holding one, or None.""" + for library in steamapps.split(":"): + try: + return open(os.path.join(library, "appmanifest_%s.acf" % app), encoding="utf-8", errors="replace").read() + except OSError: + pass + return None + + +def installed_apps(): + found = set() + for library in steamapps.split(":"): + try: + found |= {m.group(1) for m in map(re.compile(r"appmanifest_(\d+)\.acf$").match, os.listdir(library)) if m} + except OSError: + pass + return found + + +def new_linux_build(app): + """For a title the appinfo cache does not know yet (bought while the client runs): installed as + itself, not as a Windows build through a compatibility tool, and not one of Valve's runtimes or + Protons, which the client installs as apps too.""" + text = manifest(app) or "" + if re.search(r'"platform_override_source"\s*"windows"', text, re.I): + return False + folder = re.search(r'"installdir"\s*"([^"]*)"', text) + return not re.match(r"steam ?linux ?runtime|proton|steamworks shared", folder.group(1) if folder else "", re.I) + + +def windows_installed(app): + """Whether the installed build of `app` is its Windows one (a Windows depot among those installed), + in any of the client's libraries (internal storage, the card).""" + text = manifest(app) + if text is None: + return False + found = block(text, "InstalledDepots") + if not found: + return False + installed = set(re.findall(r'"(\d+)"\s*\{', text[found[1]:found[2]])) + return bool(installed & WINDOWS_DEPOTS.get(app, set())) + + +def block(text, key): + """(start of the key, index after its opening brace, index of its closing brace) or None.""" + m = re.search(r'"%s"\s*\{' % re.escape(key), text) + if not m: + return None + depth, k = 1, m.end() + while depth: + c = text[k] + depth += c == "{" + depth -= c == "}" + k += 1 + return m.start(), m.end(), k - 1 + + +games = linux_games(appinfo) +for app in extra: + games.setdefault(app, "scout") +s = open(path, encoding="utf-8", errors="surrogateescape").read() +if not block(s, "CompatToolMapping"): + st = block(s, "Steam") + if not st: + sys.exit("no Steam section") + s = s[:st[1]] + '\n\t\t\t\t"CompatToolMapping"\n\t\t\t\t{\n\t\t\t\t}' + s[st[1]:] + + +def entries(inner): + """{app: its entry's span in `inner`, as block() gives it}, read once for the whole mapping.""" + spans, pos = {}, 0 + for m in re.finditer(r'"(\d+)"\s*\{', inner): + if m.start() < pos: + continue + depth, k = 1, m.end() + while depth and k < len(inner): + depth += {"{": 1, "}": -1}.get(inner[k], 0) + k += 1 + spans.setdefault(m.group(1), (m.start(), m.end(), k - 1)) + pos = k + return spans + + +def decide(app, inner, old): + """(the tool `app` goes to, or None when its entry stays; its entry's span `old` in `inner`; the + tool that entry names, None without one).""" + on_windows = windows_installed(app) + name = None + if old: + name = re.search(r'"name"\s*"([^"]*)"', inner[old[1]:old[2]]) + name = name.group(1) if name else "" + automatic = name in ("", "droiddeck-direct", "droiddeck-proton-arm64", "droiddeck-fex") or name.startswith("proton_") + if not automatic and app not in extra: + return None, old, name + if on_windows and (name == proton or not proton): + return None, old, name + elif on_windows and not proton: + return None, old, name + return (proton if on_windows else "droiddeck-direct"), old, name + + +if mode == "live": + _, open_, close = block(s, "CompatToolMapping") + inner = s[open_:close] + spans = entries(inner) + new = [] + for app in sorted(installed_apps(), key=int): + if app not in games and (app in KNOWN or not new_linux_build(app)): + continue + tool, _, name = decide(app, inner, spans.get(app)) + if tool == "droiddeck-direct" and name != tool: + new.append(app) + if new: + open(pending, "a").write("".join("%s\n" % a for a in new)) + print("droiddeck-steam-x64: installed while the client runs, for DroidDeck direct at its restart: %s" % " ".join(new)) + sys.exit(0) +_, open_, close = block(s, "CompatToolMapping") +inner = s[open_:close] +spans = entries(inner) +mapped, windows, added, dropped = [], [], [], [] +for app in sorted(games, key=int): + tool, old, _ = decide(app, inner, spans.get(app)) + if tool is None: + continue + if old: + dropped.append(old) + added.append('\n\t\t\t\t\t"%s"\n\t\t\t\t\t{\n\t\t\t\t\t\t"name"\t\t"%s"\n' + '\t\t\t\t\t\t"config"\t\t""\n\t\t\t\t\t\t"priority"\t\t"250"\n\t\t\t\t\t}' % (app, tool)) + (mapped if tool == "droiddeck-direct" else windows).append(app) +for old in sorted(dropped, reverse=True): + inner = inner[:old[0]] + inner[old[2] + 1:] +s = s[:open_] + "".join(reversed(added)) + inner + s[close:] +open(path, "w", encoding="utf-8", errors="surrogateescape").write(s) +json.dump(mapped, open(auto_file, "w")) +open(sniper_file, "w").write("".join("%s\n" % a for a in mapped if games[a] != "scout")) +print("droiddeck-steam-x64: %d Linux title(s) on DroidDeck direct (%d on the newer runtime)%s" + % (len(mapped), sum(games[a] != "scout" for a in mapped), + "; %d installed as Windows games kept on %s" % (len(windows), proton) if windows else "")) +PY +} + +# Whether every program in the FEX tree at $1 finds its libraries (r4 did not without libxxhash). +fex_loads() { + local b out + for b in FEX FEXServer unsquashfs; do + out=$(/usr/lib/ld-linux-aarch64.so.1 --list "$1/usr/local/bin/$b" 2>&1) && ! grep -q "not found" <<<"$out" && continue + echo "== FEX check: $b: $(grep -E "not found|error" <<<"$out" | tr -s '\t ' ' ' | tr '\n' ';')" >&2 + return 1 + done +} + +# Installs one FEX build only once its archive matches the sha256 and it loads. The files it replaces are kept +# until the installed copy loads too, and put back otherwise; the tag is written last. +fex_install() { + local tag=$1 sha=$2 urls=$3 dst=/ tmp u f + tmp=$(mktemp -d) + for u in $urls; do + curl -fsSL --retry 2 "$u" -o "$tmp/fex.tzst" && echo "$sha $tmp/fex.tzst" | sha256sum -c --quiet >/dev/null 2>&1 && break + rm -f "$tmp/fex.tzst" + done + if [ ! -s "$tmp/fex.tzst" ]; then + echo "== FEX $tag: no source gave the archive with sha256 ${sha:0:12}" >&2 + rm -rf "$tmp" + return 1 + fi + if ! { mkdir "$tmp/root" && zstd -dc "$tmp/fex.tzst" | tar -C "$tmp/root" -x && fex_loads "$tmp/root"; }; then + rm -rf "$tmp" + return 1 + fi + (cd "$tmp/root" && find . ! -type d) > "$tmp/files" + mkdir "$tmp/old" + while IFS= read -r f; do + f=${f#./} + if [ -e "$dst$f" ] || [ -L "$dst$f" ]; then + cp -a --parents "$dst$f" "$tmp/old" || { echo "== FEX $tag: could not keep $dst$f aside" >&2; rm -rf "$tmp"; return 1; } + fi + done < "$tmp/files" + if tar -C "$tmp/root" -c . | tar -C "$dst" -x && fex_loads "$dst" && + mkdir -p "${dst}usr/local/share/fex-emu" && echo "$tag" > "${dst}usr/local/share/fex-emu/.droiddeck-tag"; then + rm -rf "$tmp" + return 0 + fi + echo "== FEX $tag: the installed copy did not load or its tag was not written; putting the previous files back" >&2 + while IFS= read -r f; do + f=${f#./} + [ -e "$tmp/old/$dst$f" ] || [ -L "$tmp/old/$dst$f" ] || rm -f "$dst$f" + done < "$tmp/files" + tar -C "$tmp/old$dst" -c . | tar -C "$dst" -x || echo "== FEX $tag: could not put the previous files back" >&2 + rm -rf "$tmp" + return 1 +} + +# The build DroidDeck-Components' fex.json names (the app passes it as BL_FEX_*) comes first, then a working +# installed one, then FEX_TAG above. Sets FEX_NOW and FEX_FROM. +x64_fex() { + local have ok= + have=$(cat /usr/local/share/fex-emu/.droiddeck-tag 2>/dev/null || true) + [ -x /usr/local/bin/FEX ] && fex_loads / && ok=1 + if [ -n "${BL_FEX_TAG:-}" ]; then + if [ -n "$ok" ] && [ "$have" = "$BL_FEX_TAG" ]; then FEX_NOW=$have FEX_FROM=catalog; return 0; fi + step "downloading FEX ($BL_FEX_TAG)" + if fex_install "$BL_FEX_TAG" "${BL_FEX_SHA256:-}" "${BL_FEX_URLS:-}"; then FEX_NOW=$BL_FEX_TAG FEX_FROM=catalog; return 0; fi + if [ -n "$ok" ]; then FEX_NOW=$have FEX_FROM="kept; $BL_FEX_TAG did not install"; return 0; fi + fi + if [ -n "$ok" ] && [ "$have" = "$FEX_TAG" ]; then FEX_NOW=$have FEX_FROM=built-in; return 0; fi + step "downloading FEX ($FEX_TAG)" + if fex_install "$FEX_TAG" "$FEX_SHA256" "$FEX_URL"; then FEX_NOW=$FEX_TAG FEX_FROM=built-in; return 0; fi + if [ -n "$ok" ]; then FEX_NOW=$have FEX_FROM="kept; $FEX_TAG did not install"; return 0; fi + return 1 +} + +# A resumable download that reports every tenth of its size as a step. +x64_fetch() { + local url=$1 out=$2 label=$3 total pid rc=0 last=-1 pct + total=$(curl -fsSIL "$url" 2>/dev/null | tr -d '\r' | awk 'tolower($1) == "content-length:" { v = $2 } END { print v + 0 }') + curl -fL -sS -C - "$url" -o "$out" & + pid=$! + while kill -0 "$pid" 2>/dev/null; do + sleep 3 + [ "$total" -gt 0 ] || continue + pct=$(( $(stat -c %s "$out" 2>/dev/null || echo 0) * 10 / total * 10 )) + if [ "$pct" -gt "$last" ]; then last=$pct; step "$label ($pct%)"; fi + done + wait "$pid" || rc=$? + return "$rc" +} + +x64_prepare() { +x64_fex || { step "FEX could not be installed; see $LOG"; exit 1; } +step "FEX ready ($FEX_NOW, $FEX_FROM)" +# The client's opt-in to its SteamRT3 build; without it, it re-executes through steam.sh, whose checks fail under proot. +mkdir -p "$STEAM_X64" && : > "$STEAM_X64/.steam-enable-steamrt64-client" + +if [ ! -f "$ROOTFS/.droiddeck-complete" ]; then + # Resumes a part-done download; a finished one answers 416, which is not a failure here. + x64_fetch "$ROOTFS_URL" "$X64_HOME/rootfs.sqsh" "downloading FEX's Ubuntu 24.04 x86 rootfs" || { + rc=$? + [ "$rc" = 22 ] && [ -s "$X64_HOME/rootfs.sqsh" ] || { step "rootfs download failed (curl $rc)"; exit 1; } + } + if ! echo "$ROOTFS_SHA256 $X64_HOME/rootfs.sqsh" | sha256sum -c --quiet >/dev/null 2>&1; then + rm -f "$X64_HOME/rootfs.sqsh"; step "rootfs download did not match its checksum; try again"; exit 1 + fi + step "unpacking the rootfs" + rm -rf "$ROOTFS" + /usr/local/bin/unsquashfs -no-xattrs -no-progress -ignore-errors -d "$ROOTFS" "$X64_HOME/rootfs.sqsh" >>"$LOG" 2>&1 || true + [ -x "$ROOTFS/usr/bin/bash" ] || { step "rootfs unpack failed (no usr/bin/bash); see $LOG"; exit 1; } + rm -f "$X64_HOME/rootfs.sqsh" + touch "$ROOTFS/.droiddeck-complete" +fi +echo "== x86-64 rootfs: $(sed -n 's|.*/download/\([^/]*\)/.*|\1|p' <<<"$ROOTFS_URL") (sha256 ${ROOTFS_SHA256:0:12})" >&2 +# FEX falls back to the guest's own /etc/ld.so.preload (arm64 libraries) when the rootfs has none. The x86 +# session shim provides System V IPC, which Android kernels lack and the client's tier0 needs to start. +: > "$ROOTFS/etc/ld.so.preload" +for lib in libblsession libfakeinput; do + have=0 + # 32-bit libfakeinput crashes SDL2 games (a NULL udev attribute reaches strdup), so only the x86_64 copy + # is preloaded, by full path: with $LIB, FEX falls through to the session's own i386 copy. + arches="x86_64 i386"; [ "$lib" = libfakeinput ] && arches=x86_64 + rm -f "$ROOTFS/usr/local/lib/i386-linux-gnu/libfakeinput.so" + for arch in $arches; do + [ -f "/usr/local/lib/droiddeck-fex/$arch/$lib.so" ] || continue + mkdir -p "$ROOTFS/usr/local/lib/$arch-linux-gnu" + cp -f "/usr/local/lib/droiddeck-fex/$arch/$lib.so" "$ROOTFS/usr/local/lib/$arch-linux-gnu/$lib.so" + have=1 + done + if [ "$have" = 1 ] && [ "$lib" = libfakeinput ]; then + echo "/usr/local/lib/x86_64-linux-gnu/$lib.so" >> "$ROOTFS/etc/ld.so.preload" + elif [ "$have" = 1 ]; then echo "/usr/local/\$LIB/$lib.so" >> "$ROOTFS/etc/ld.so.preload" + else step "warning: no x86 build of $lib (/usr/local/lib/droiddeck-fex/x86_64/$lib.so)"; fi +done +rm -f "$ROOTFS/usr/local/lib/libblsession-x86_64.so" "$ROOTFS/usr/local/lib/libfakeinput-x86_64.so" +unconfirmed=$STEAM_X64/package/droiddeck-unconfirmed +if [ -d "${unconfirmed%/*}" ] && ! grep -qx tracked "$unconfirmed" 2>/dev/null; then echo tracked > "$unconfirmed"; fi +x64_repair= +if [ "${BL_X64_REPAIR:-0}" = 1 ]; then + x64_repair=requested +elif [ -f "$unconfirmed" ] && ! grep -qx repaired "$unconfirmed" && [ "$(grep -cx start "$unconfirmed")" -ge 2 ]; then + x64_repair="the client was started $(grep -cx start "$unconfirmed") times without showing anything" +fi +if [ -n "$x64_repair" ]; then + step "repairing the x86-64 Steam client ($x64_repair)" + rm -f "$STEAM_X64/package/droiddeck-installed" "$STEAM_X64/.crash" "$STEAM_X64/steam.pid" \ + "$STEAM_X64"/package/steam_client_*.installed +fi +if [ ! -x "$STEAM_X64/steamrt64/steam" ] || [ ! -f "$STEAM_X64/package/droiddeck-installed" ]; then + step "downloading the x86-64 Steam client ($MANIFEST)" + work=$(mktemp -d) + curl -fsSL "$CDN/$MANIFEST" -o "$work/manifest" + version=$(awk -F'"' '$2 == "version" { print $4; exit }' "$work/manifest") + awk -F'"' ' + /^\t"/ && NF >= 3 && $4 == "" { block = $2 } + $2 == "file" { file[block] = $4 } + $2 == "sha2" { sha[block] = $4 } + END { for (b in file) if (b ~ /_all$/ || b ~ /_ubuntu12$/) print b, file[b], sha[b] } + ' "$work/manifest" | sort > "$work/parts" + [ -s "$work/parts" ] || { step "no client components in $MANIFEST"; exit 1; } + mkdir -p "$STEAM_X64/package" + total=$(grep -c . "$work/parts") + i=0 + while read -r block file sum; do + i=$((i + 1)) + step "client: $block ($i/$total)" + curl -fsSL "$CDN/$file" -o "$work/$file" + echo "$sum $work/$file" | sha256sum -c --quiet + unzip -qo "$work/$file" -d "$STEAM_X64" + rm -f "$work/$file" + done < "$work/parts" + cp -f "$work/manifest" "$STEAM_X64/package/$MANIFEST.manifest" + rm -rf "$work" + echo "$X64_CHANNEL" > "$STEAM_X64/package/beta" + echo "$version" > "$STEAM_X64/package/droiddeck-installed" + chmod +x "$STEAM_X64/steam.sh" "$STEAM_X64/steamrt64/steam" "$STEAM_X64/ubuntu12_32/steam" 2>/dev/null || true +fi +[ -n "$x64_repair" ] && printf 'tracked\nrepaired\n' > "$unconfirmed" +x64_sync_client +scout=$STEAM_X64/ubuntu12_32 +if [ -f "$scout/steam-runtime.tar.xz" ] && + { [ ! -x "$scout/steam-runtime/run.sh" ] || + ! cmp -s "$scout/steam-runtime.tar.xz.checksum" "$scout/steam-runtime/checksum"; }; then + step "unpacking Valve's scout runtime for native Linux games" + rm -rf "$scout/steam-runtime.new" + mkdir -p "$scout/steam-runtime.new" + if tar -xJf "$scout/steam-runtime.tar.xz" -C "$scout/steam-runtime.new" && [ -x "$scout/steam-runtime.new/steam-runtime/run.sh" ]; then + rm -rf "$scout/steam-runtime" + mv "$scout/steam-runtime.new/steam-runtime" "$scout/steam-runtime" + cp -f "$scout/steam-runtime.tar.xz.checksum" "$scout/steam-runtime/checksum" 2>/dev/null || true + else + step "could not unpack the scout runtime; native Linux games will not start" + fi + rm -rf "$scout/steam-runtime.new" +fi +[ -L "$STEAM_X64/steamapps" ] && rm -f "$STEAM_X64/steamapps" +mkdir -p "$STEAM_X64/steamapps" +# FEX looks in the rootfs first: an empty dev/dri there hides the session's KGSL node, which x86 programs spin on. +mkdir -p "$ROOTFS/dev/dri" +mkdir -p "$X64_HOME/.steam" +ln -sfn "$STEAM_X64" "$X64_HOME/.steam/root" +ln -sfn "$STEAM_X64" "$X64_HOME/.steam/steam" +ln -sfn "$STEAM_X64/ubuntu12_32" "$X64_HOME/.steam/bin32" +ln -sfn "$STEAM_X64/ubuntu12_64" "$X64_HOME/.steam/bin64" +ln -sfn "$STEAM_X64/linux32" "$X64_HOME/.steam/sdk32" +ln -sfn "$STEAM_X64/linux64" "$X64_HOME/.steam/sdk64" +# The client's bwrap probe (steam-runtime-check-requirements) needs user namespaces, which no Android app has. +srt_real=$STEAM_X64/steamrt64/pv-runtime/steam-runtime-steamrt +srt_shim=$X64_HOME/steamrt-shim +if [ -d "$srt_real" ]; then + rm -rf "$srt_shim" + mkdir -p "$srt_shim/bin" + for e in "$srt_real"/* "$srt_real"/.[!.]*; do + [ -e "$e" ] || continue + [ "$(basename "$e")" = bin ] || ln -s "$e" "$srt_shim/$(basename "$e")" + done + for e in "$srt_real"/bin/*; do ln -s "$e" "$srt_shim/bin/$(basename "$e")"; done + rm -f "$srt_shim/bin/steam-runtime-check-requirements" + printf '#!/bin/sh +exit 0 +' > "$srt_shim/bin/steam-runtime-check-requirements" + chmod 755 "$srt_shim/bin/steam-runtime-check-requirements" + rm -f "$srt_shim/bin/steam-runtime-launch-client" + cat > "$srt_shim/bin/steam-runtime-launch-client" <<'LAUNCH' +#!/bin/sh +while [ $# -gt 0 ]; do + case $1 in + --) shift; break ;; + --directory=*) cd "${1#--directory=}" || exit 127 ;; + --env=*) export "${1#--env=}" ;; + --unset-env=*) unset "${1#--unset-env=}" ;; + esac + shift +done +[ $# -gt 0 ] || exit 0 +exec "$@" +LAUNCH + chmod 755 "$srt_shim/bin/steam-runtime-launch-client" +fi +# Valve's platform libraries ship without soname links (pressure-vessel makes them); ldconfig adds them here. +srt_libs=$X64_HOME/steamrt-libs +rm -rf "$srt_libs" +mkdir -p "$srt_libs" +for d in "$STEAM_X64"/steamrt64/pv-runtime/steam-runtime-steamrt/steamrt3c_platform_*/files/lib/x86_64-linux-gnu \ + "$STEAM_X64"/steamrt64/pv-runtime/steam-runtime-steamrt/steamrt3c_platform_*/files/usr/lib/x86_64-linux-gnu; do + [ -d "$d" ] || continue + for f in "$d"/*.so*; do [ -e "$srt_libs/$(basename "$f")" ] || ln -s "$f" "$srt_libs/"; done +done +FEX_ROOTFS=$ROOTFS /usr/local/bin/FEX "$ROOTFS/usr/sbin/ldconfig.real" -n "$srt_libs" >>"$LOG" 2>&1 || step "ldconfig on $srt_libs failed" +# The rootfs's HarfBuzz needs a newer FreeType than some games bundle (Counter-Strike 2): use Valve's runtime one. +sniper_compat=$X64_HOME/sniper-compat +rm -rf "$sniper_compat" +mkdir -p "$sniper_compat" +hb=$(ls "$srt_libs"/libharfbuzz.so.0.* 2>/dev/null | head -n 1) +if [ -n "$hb" ]; then ln -s "$hb" "$sniper_compat/libharfbuzz.so.0"; else step "warning: no HarfBuzz in Valve's runtime for the newer-runtime titles"; fi +# LD_LIBRARY_PATH beats the system folders whatever its order: Valve's older glibc must not shadow the rootfs's. +for f in "$srt_libs"/*; do + n=$(basename "$f") + if [ -e "$ROOTFS/usr/lib/x86_64-linux-gnu/$n" ] || [ -e "$ROOTFS/lib/x86_64-linux-gnu/$n" ]; then rm -f "$f"; fi +done + tool=$STEAM_X64/compatibilitytools.d/droiddeck-direct + mkdir -p "$tool" + rm -f "$tool/droiddeck-proton-wrap" "$tool/toolmanifest.vdf.droiddeck-orig" + cat > "$tool/compatibilitytool.vdf" <<'VDF' +"compatibilitytools" +{ + "compat_tools" + { + "droiddeck-direct" + { + "install_path" "." + "display_name" "DroidDeck direct (no container)" + "from_oslist" "linux" + "to_oslist" "linux" + } + } +} +VDF + cat > "$tool/toolmanifest.vdf" <<'VDF' +"manifest" +{ + "version" "2" + "commandline" "/run %verb%" +} +VDF + printf '%s\n' "$REAL_HOME/.droiddeck-vac-diagnostics" > "$tool/vac-marker" + cat > "$tool/run" <<'RUN' +#!/bin/sh +verb=$1; shift +rt=$HOME/.local/share/Steam/ubuntu12_32/steam-runtime.old +[ -x "$rt/run.sh" ] || rt=$HOME/.local/share/Steam/ubuntu12_32/steam-runtime +# -condebug only while VAC diagnostics are on (the marker is in the real home, not this client's). +marker=$(cat "${0%/*}/vac-marker" 2>/dev/null) +case "$*" in *hl2.sh*|*hl2_linux*|*srcds*) [ -n "$marker" ] && [ -f "$marker" ] && set -- "$@" -condebug ;; esac +# game-gpu.env is rewritten whenever the launcher runs; game-gpu.local is the user's and is read after it. +gpu=$HOME/game-gpu.env +if [ -f "$gpu" ] && [ "${BL_X64_GAME_SOFTWARE:-0}" != 1 ]; then + . "$gpu" + [ -f "$HOME/game-gpu.local" ] && . "$HOME/game-gpu.local" +else + export mesa_glthread=false +fi +case $verb in + run|waitforexitandrun) + # Titles Valve gives a newer runtime (sniper, soldier) need newer libraries than scout's: the rootfs's. + if grep -qx "${STEAM_COMPAT_APP_ID:-${SteamAppId:-none}}" "$HOME/direct-sniper" 2>/dev/null; then + [ -e "$HOME/sniper-compat/libharfbuzz.so.0" ] && + export LD_PRELOAD="$HOME/sniper-compat/libharfbuzz.so.0${LD_PRELOAD:+:$LD_PRELOAD}" + case $1 in + *.sh) + if grep -q '^[[:space:]]*\. /etc/os-release' "$1" 2>/dev/null; then + script=$1; shift + exec bash -c "$(sed 's|^\([[:space:]]*\)\. /etc/os-release|\1VERSION_CODENAME=sniper|' "$script")" "$script" "$@" + fi ;; + esac + exec "$@" + fi + exec "$rt/run.sh" "$@" ;; + *) exec "$@" ;; +esac +RUN + chmod 755 "$tool/run" + if [ ! -f "$STEAM_X64/config/config.vdf" ] && ! pgrep -f 'steamrt64/steam( |$)' >/dev/null 2>&1; then + mkdir -p "$STEAM_X64/config" + printf '"InstallConfigStore"\n{\n\t"Software"\n\t{\n\t\t"Valve"\n\t\t{\n\t\t\t"Steam"\n\t\t\t{\n\t\t\t\t"CompatToolMapping"\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n' \ + > "$STEAM_X64/config/config.vdf" + fi + x64_map_direct + # Each wrapper execs droiddeck-x64-arm-proton through an arm64 binary, which FEX hands straight to the CPU. + arm_tools=$ARM_STEAM/compatibilitytools.d + mkdir -p "$X64_HOME/arm64" + cp -f /usr/bin/env "$X64_HOME/arm64/env" + for w in "$STEAM_X64"/compatibilitytools.d/*/.droiddeck-arm64-proton; do + [ -e "$w" ] || continue + d=${w%/.droiddeck-arm64-proton} + [ -d "$arm_tools/${d##*/}" ] && [ "${d##*/}" != droiddeck-fex ] || rm -rf "$d" + done + for src in "$arm_tools"/*/; do + src=${src%/}; name=${src##*/} + [ -f "$src/compatibilitytool.vdf" ] && [ -f "$src/toolmanifest.vdf" ] || continue + # A droiddeck-fex wrapper made the arm64 client install Valve's FEX when this client probed its tools after logon. + case $name in droiddeck-direct|droiddeck-fex) continue ;; esac + dst=$STEAM_X64/compatibilitytools.d/$name + mkdir -p "$dst" + rm -f "$dst/droiddeck-proton-wrap" "$dst/toolmanifest.vdf.droiddeck-orig" + : > "$dst/.droiddeck-arm64-proton" + python3 - "$src/compatibilitytool.vdf" "$dst/compatibilitytool.vdf" <<'PY' || { rm -rf "$dst"; continue; } +import re, sys +s = open(sys.argv[1], encoding="utf-8", errors="replace").read() +m = re.search(r'"compat_tools"\s*\{\s*"([^"]+)"', s) +if not m: + sys.exit(1) +# The x86-64 client ignores a tool named arm64 or aarch64 ("for a different target platform linux arm64"). +key = re.sub(r"arm64|aarch64", "a64", m.group(1)) +d = re.search(r'"display_name"\s*"([^"]*)"', s) +name = d.group(1) if d else key +open(sys.argv[2], "w").write( + '"compatibilitytools"\n{\n "compat_tools"\n {\n "%s"\n {\n "install_path" "."\n' + ' "display_name" "%s"\n "from_oslist" "windows"\n "to_oslist" "linux"\n }\n }\n}\n' + % (key, name)) +PY + cat > "$dst/toolmanifest.vdf" <<'VDF' +"manifest" +{ + "version" "2" + "commandline" "/run %verb%" +} +VDF + printf '#!/bin/sh\n# The arm64 client'"'"'s %s, run natively (droiddeck-x64-arm-proton).\nexec "%s" /usr/local/bin/droiddeck-x64-arm-proton "%s" "$@"\n' \ + "$name" "$X64_HOME/arm64/env" "$name" > "$dst/run" + chmod 755 "$dst/run" + done + x64_sync_login + # Each client keeps its own libraries; written only while no x86 client runs, as it rewrites these on exit. + if ! pgrep -f 'steamrt64/steam( |$)' >/dev/null 2>&1; then + listing_ok=0 + if python3 - "$STEAM_X64" "${BL_X64_STEAM_LIBRARIES:-}" "$STEAM_X64/config/libraryfolders.vdf" "$STEAM_X64/steamapps/libraryfolders.vdf" <<'PY'; then +import json, os, re, sys +keep = {os.path.realpath(sys.argv[1])} +# Without the session's list nothing is known about the card: leave the folders as they are. +if not sys.argv[2]: + sys.exit(3) +try: + keep |= {os.path.realpath(str(e["path"])) for e in json.load(open(sys.argv[2], encoding="utf-8"))} +except (OSError, ValueError, KeyError, TypeError): + sys.exit(3) +for path in sys.argv[3:]: + if not os.path.isfile(path): + continue + s = open(path, encoding="utf-8", errors="surrogateescape").read() + out, removed, i = [], [], 0 + for m in re.finditer(r'^\t"(\d+)"\s*\n\t\{', s, re.M): + if m.start() < i: + continue + depth, k = 1, m.end() + while depth and k < len(s): + depth += s[k] == "{" + depth -= s[k] == "}" + k += 1 + block = s[m.start():k] + p = re.search(r'"path"\s*"([^"]*)"', block) + if p and os.path.realpath(p.group(1)) not in keep: + out.append(s[i:m.start()]) + i = k + (1 if s[k:k + 1] == "\n" else 0) + removed.append(p.group(1)) + if not removed: + continue + out.append(s[i:]) + open(path, "w", encoding="utf-8", errors="surrogateescape").write("".join(out)) + print("droiddeck-steam-x64: no longer shared with the arm64 client: %s" % ", ".join(removed)) +PY + listing_ok=1 + elif [ $? = 3 ]; then + step "no library list from the session: the x86-64 client's library folders are left as they are" + else + step "could not check the x86-64 client's library folders" + fi + if [ "$listing_ok" = 1 ]; then + BL_STEAM_LIBRARIES=$BL_X64_STEAM_LIBRARIES droiddeck-steam-library "$STEAM_X64" || + step "could not add the card to the x86-64 client's library folders" + fi + fi + # default-tool is the default this script set: titles still on it move along; a user's choice is kept. + default=$(x64_default_dir) + if [ -f "$default/compatibilitytool.vdf" ] && [ -f "$STEAM_X64/config/config.vdf" ] && + ! pgrep -f 'steamrt64/steam( |$)' >/dev/null 2>&1; then + python3 - "$STEAM_X64/config/config.vdf" "$default/compatibilitytool.vdf" "$X64_HOME/default-tool" <<'PY' || step "could not make ARM64 Proton the default" +import os, re, sys +path, vdf, record = sys.argv[1:4] +tool = re.search(r'"compat_tools"\s*\{\s*"([^"]+)"', open(vdf).read()).group(1) +s = open(path, encoding="utf-8", errors="surrogateescape").read() +m = re.search(r'"CompatToolMapping"\s*\{', s) +if not m: + sys.exit(0) +depth, k = 1, m.end() +while depth: + depth += s[k] == "{" + depth -= s[k] == "}" + k += 1 +block = s[m.end():k] +try: + previous = open(record).read().strip() or None +except OSError: + previous = None +z = re.search(r'^\s*"0"\s*\{([^{}]*)\}', block, re.M) +if z: + name = re.search(r'"name"\s*"([^"]*)"', z.group(1)) + name = name.group(1) if name else "" + set_here = re.search(r'"priority"\s*"75"', z.group(1)) is not None + if previous is None and set_here and name.endswith("-a64"): + previous = name + if "arm64" not in z.group(1) and name != previous: + sys.exit(0) + if name == tool and previous == tool: + sys.exit(0) + block = block[:z.start()] + block[z.end():] +moved = 0 +if previous and previous != tool: + block, moved = re.subn(r'("name"\s*")%s(")' % re.escape(previous), lambda x: x.group(1) + tool + x.group(2), block) +entry = ('\n\t\t\t\t\t"0"\n\t\t\t\t\t{\n\t\t\t\t\t\t"name"\t\t"%s"\n' % tool + + '\t\t\t\t\t\t"config"\t\t""\n\t\t\t\t\t\t"priority"\t\t"75"\n\t\t\t\t\t}') +s = s[:m.end()] + entry + block + s[k:] +open(path, "w", encoding="utf-8", errors="surrogateescape").write(s) +open(record, "w").write(tool + "\n") +if moved: + print("droiddeck-steam-x64: default %s -> %s, with the %d titles on it" % (previous, tool, moved)) +PY + fi + if [ -d "$ARM_STEAM/config/uioverrides" ] && [ ! -e "$STEAM_X64/config/uioverrides" ]; then + ln -s "$ARM_STEAM/config/uioverrides" "$STEAM_X64/config/uioverrides" + fi + if [ -f "$ARM_STEAM/.cef-enable-remote-debugging" ]; then + : > "$STEAM_X64/.cef-enable-remote-debugging" + else + rm -f "$STEAM_X64/.cef-enable-remote-debugging" + fi + if [ -f "$ARM_STEAM/config/config.vdf" ] && [ -f "$STEAM_X64/config/config.vdf" ] && + ! pgrep -f 'steamrt64/steam( |$)' >/dev/null 2>&1; then + python3 - "$ARM_STEAM/config/config.vdf" "$STEAM_X64/config/config.vdf" <<'PY' || step "could not copy the startup movie choice" +import re, sys +movie = re.search(r'\n([ \t]*)"StartupMovie"\s*\{[^{}]*\}', open(sys.argv[1], encoding="utf-8", errors="replace").read()) +if not movie: + sys.exit(0) +path = sys.argv[2] +s = open(path, encoding="utf-8", errors="surrogateescape").read() +old = re.search(r'\n[ \t]*"StartupMovie"\s*\{[^{}]*\}', s) +if old: + if old.group(0).split(None, 1)[1] == movie.group(0).split(None, 1)[1]: + sys.exit(0) + s = s[:old.start()] + s[old.end():] +steam = re.search(r'"Valve"\s*\{\s*"Steam"\s*\{', s) +if not steam: + sys.exit(0) +s = s[:steam.end()] + movie.group(0) + s[steam.end():] +open(path, "w", encoding="utf-8", errors="surrogateescape").write(s) +PY + fi + # FEX takes its rootfs from FEXServer, and one started without FEX_ROOTFS serves none: stop it while no x86 client runs. + if ! pgrep -f 'steamrt64/steam( |$)' >/dev/null 2>&1; then + FEX_ROOTFS=$ROOTFS /usr/local/bin/FEXServer -k >/dev/null 2>&1 || true + fi +} + +x64_gpu() { + [ "${BL_X64_SOFTWARE:-0}" != 1 ] && [ -d /usr/local/share/fex-emu/GuestThunks ] && [ -d /usr/local/lib/fex-emu/HostThunks ] +} + +x64_webhelper_gpu() { + x64_gpu && [ "${BL_X64_CLIENT_SOFTWARE:-0}" != 1 ] && [ "${BL_X64_CEF_GPU:-1}" != 0 ] +} + +x64_env() { +# droiddeck-x64-arm-proton restores this arm64 environment before Proton runs. +export -p | grep -v -E '^declare -x (PWD|OLDPWD|SHLVL|_)=' > "$X64_HOME/arm-session.env.new" || true +mv -f "$X64_HOME/arm-session.env.new" "$X64_HOME/arm-session.env" +unset LD_LIBRARY_PATH LD_PRELOAD STEAM_RUNTIME STEAM_RUNTIME_PREFER_HOST_LIBRARIES +gpu_vars="GALLIUM_DRIVER MESA_LOADER_DRIVER_OVERRIDE VK_ICD_FILENAMES VK_DRIVER_FILES LIBGL_KOPPER_DRI2 ZINK_DEBUG ZINK_DESCRIPTORS TU_DEBUG MESA_NO_ERROR mesa_glthread" +rm -f "$X64_HOME/game-gpu.env" +if x64_gpu; then + printf '{"ThunksDB": {"GL": 1, "Vulkan": 1}}\n' > "$X64_HOME/thunks.json" + { + echo "export FEX_THUNKCONFIG='$X64_HOME/thunks.json'" + echo "unset LIBGL_ALWAYS_SOFTWARE LIBGL_DRI3_DISABLE GALLIUM_DRIVER" + for v in $gpu_vars; do + eval "val=\${$v-}"; [ -n "$val" ] && printf "export %s='%s'\n" "$v" "$val" + done + } > "$X64_HOME/game-gpu.env" +fi +if x64_gpu && [ "${BL_X64_CLIENT_SOFTWARE:-0}" != 1 ]; then + export FEX_THUNKCONFIG=$X64_HOME/thunks.json + unset LIBGL_ALWAYS_SOFTWARE LIBGL_DRI3_DISABLE +else +unset FEX_THUNKCONFIG $gpu_vars +export LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe +# Over DRI3 the X server hands out the GPU node, and Mesa's software path loops on KMS dumb buffers on it. +export LIBGL_DRI3_DISABLE=1 +fi +[ "${BL_X64_FP_OFF:-0}" = 1 ] && export PROOT_FP_OFF=1 +export FEX_TSOENABLED=${FEX_TSOENABLED:-1} FEX_VECTORTSOENABLED=${FEX_VECTORTSOENABLED:-0} \ + FEX_MEMCPYSETTSOENABLED=${FEX_MEMCPYSETTSOENABLED:-0} FEX_HALFBARRIERTSOENABLED=${FEX_HALFBARRIERTSOENABLED:-0} \ + FEX_X87REDUCEDPRECISION=${FEX_X87REDUCEDPRECISION:-1} FEX_MULTIBLOCK=${FEX_MULTIBLOCK:-1} +export HOME=$X64_HOME +export XDG_DATA_HOME=$X64_HOME/.local/share XDG_CONFIG_HOME=$X64_HOME/.config XDG_CACHE_HOME=$X64_HOME/.cache +export FEX_ROOTFS=$ROOTFS +export STEAM_EXTRA_COMPAT_TOOLS_PATHS= +export STEAM_RUNTIME=1 +[ -d "$X64_HOME/steamrt-shim" ] && export STEAM_RUNTIME_STEAMRT=$X64_HOME/steamrt-shim +# The client starts commands via steam-runtime-launch-client; Valve's needs a session-bus service, the shim's runs them. +[ -d "$X64_HOME/steamrt-shim/bin" ] && export PATH=$X64_HOME/steamrt-shim/bin:$PATH +export LD_LIBRARY_PATH=$STEAM_X64/steamrt64:$STEAM_X64/steamrt64/panorama:$X64_HOME/steamrt-libs +# After an update the client re-executes itself through pressure-vessel-wrap (bwrap) unless this guard is set. +export STEAM_STEAMRT_RECURSION_GUARD=1 +# proot is a tracer: tier0 takes it for a debugger and breaks into it with int3 on its first failed assertion. +export BL_WEBHELPER_HIDE_TRACER=1 +} + +x64_manifest_version() { + local chan + chan=$(cat "$STEAM_X64/package/beta" 2>/dev/null || echo "$X64_CHANNEL") + awk -F'"' '$2 == "version" { print $4; exit }' "$STEAM_X64/package/steam_client_${chan}_$1.manifest" 2>/dev/null || echo "?" +} + +# What x86 GL and Vulkan look like through FEX's thunks, for a session whose menus failed on the GPU. +x64_gpu_probe() { + local fex=${BL_FEX:-/usr/local/bin/FEX} + echo "== x86-64 GPU probe (x86 glxinfo and vulkaninfo through FEX):" + ( + unset LD_LIBRARY_PATH + export DISABLE_GAMESCOPE_WSI=1 vk_xwayland_wait_ready=true LIBGL_KOPPER_DISABLE=true + timeout 30 "$fex" /usr/bin/glxinfo -B 2>&1 | grep -E "OpenGL (renderer|core profile version|version) string|direct rendering|rror" | head -5 + timeout 30 "$fex" /usr/bin/vulkaninfo --summary 2>&1 | grep -E "deviceName|driverName|driverInfo|apiVersion|rror" | head -6 + ) | sed 's/^/ /' +} + +# Steam's menus come from the web helper; when its GPU process keeps exiting, Chromium gives up on the GPU and +# the menus never appear. Says so once in the session log, with the probe above. +x64_gpu_watch() { + local log=$STEAM_X64/logs/console-linux.txt from n codes + from=$(( $(wc -l 2>/dev/null < "$log" || echo 0) + 1 )) + tail -n0 -F --pid=$$ "$log" 2>/dev/null | grep -q -m1 "GPU process isn't usable" || return 0 + n=$(tail -n +"$from" "$log" | grep -c "GPU process exited unexpectedly" || true) + codes=$(tail -n +"$from" "$log" | grep -oE "GPU process exited unexpectedly: exit_code=[0-9]+" | sed 's/.*=//' | + sort | uniq -c | awk '{ printf "%s%s x%s", s, $2, $1; s = ", " }') + echo "== x86-64: Steam's menu renderer gave up on the GPU after $n GPU process exits (exit code ${codes:-?}); the menus stay blank. See steam/console-linux.txt and steam/webhelper_gpu.txt" + x64_gpu_probe +} + +x64_exec() { + x64_env + cd "$STEAM_X64" + # The client checksums its files at start and reinstalls over edited ones, so the session shim (preload/net.c) + # swaps the web helper at exec. The arm64 helper only comes up against a client of the same build. + if [ "${BL_X64_X86_WEBHELPER:-0}" != 1 ] && [ -x /usr/local/bin/droiddeck-x64-arm-webhelper ] && + [ -x "$ARM_STEAM/steamrtarm64/steamwebhelper" ]; then + local chan x86_build arm_build + chan=$(cat "$STEAM_X64/package/beta" 2>/dev/null || echo "$X64_CHANNEL") + x86_build=$(awk -F'"' '$2 == "version" { print $4; exit }' "$STEAM_X64/package/steam_client_${chan}_ubuntu12.manifest" 2>/dev/null || true) + arm_build=$(awk -F'"' '$2 == "version" { print $4; exit }' "$ARM_STEAM/package/steam_client_${chan}_linuxarm64.manifest" 2>/dev/null || true) + if [ -n "$x86_build" ] && [ "$x86_build" = "$arm_build" ]; then + export BL_X64_ARM_WEBHELPER=/usr/local/bin/droiddeck-x64-arm-webhelper + else + echo "== x86-64 client build ${x86_build:-?}, arm64 web helper's ${arm_build:-?}: keeping the x86 web helper" >&2 + fi + fi + if [ -z "${BL_X64_ARM_WEBHELPER:-}" ] && x64_webhelper_gpu; then + # Not --in-process-gpu (the preload's default): a GPU crash there takes the whole helper down. + export BL_WEBHELPER_ARGS="--ignore-gpu-blocklist --use-gl=angle --use-angle=gl --ozone-platform=x11" + [ -x /usr/local/bin/droiddeck-x64-webhelper ] && export BL_X64_ARM_WEBHELPER=/usr/local/bin/droiddeck-x64-webhelper + elif [ -z "${BL_X64_ARM_WEBHELPER:-}" ]; then + export BL_WEBHELPER_ARGS=stock + local a args=() soft=0 + for a in "$@"; do + case $a in + -cef-force-gpu|-cef-ozone-platform=*|-cef-use-gl=*|-cef-use-angle=*) soft=1 ;; + *) args+=("$a") ;; + esac + done + [ "$soft" = 1 ] && set -- "${args[@]}" -cef-disable-gpu + fi + mkdir -p "$STEAM_X64/logs" + touch "$STEAM_X64/logs/bootstrap_log.txt" + ( tail -n0 -F --pid=$$ "$STEAM_X64/logs/bootstrap_log.txt" 2>/dev/null | + grep --line-buffered -oE 'Downloading update \([0-9,]+ of [0-9,]+ KB\)' | sed -u 's/,//g' >&2 ) & + echo "== x86-64 client: ubuntu12 $(x64_manifest_version ubuntu12), steamrt64 $(x64_manifest_version steamrt64) (the client may update itself)" >&2 + x64_webhelper_gpu && { x64_gpu_watch >&2 & } + exec "${BL_FEX:-/usr/local/bin/FEX}" "$STEAM_X64/steamrt64/steam" "$@" +} + +# Steam renews its token every few days and refuses old copies: copy the newest every start, never while a client runs. +x64_sync_login() { + pgrep -f 'steamrt64/steam( |$)' >/dev/null 2>&1 && return 0 + pgrep -f 'steamrtarm64/steam( |$)' >/dev/null 2>&1 && return 0 + python3 - "$ARM_STEAM" "$STEAM_X64" "$REAL_HOME/.steam/registry.vdf" "$X64_HOME/.steam/registry.vdf" <<'PY' || step "could not share the sign-in between the clients" +import os, re, shutil, sys +arm, x64, arm_reg, x64_reg = sys.argv[1:5] +FILES = ("config/loginusers.vdf", "local.vdf") + + +def stamp(root): + if not all(os.path.isfile(os.path.join(root, f)) for f in FILES): + return None + # A client that refused its token leaves an empty ConnectCache: newest, but copying it signs the other out. + text = open(os.path.join(root, "local.vdf"), encoding="utf-8", errors="surrogateescape").read() + if not re.search(r'"ConnectCache"\s*\{\s*"[^"]+"\s*"[^"]+"', text): + return None + return os.path.getmtime(os.path.join(root, "local.vdf")) + + +a, x = stamp(arm), stamp(x64) +if a is None and x is None: + sys.exit(0) +if a is not None and x is not None and abs(a - x) < 1: + sys.exit(0) +if x is None or (a is not None and a > x): + src, dst, sreg, dreg, who = arm, x64, arm_reg, x64_reg, "arm64" +else: + src, dst, sreg, dreg, who = x64, arm, x64_reg, arm_reg, "x86-64" +for f in FILES: + os.makedirs(os.path.dirname(os.path.join(dst, f)), exist_ok=True) + # copy2 keeps the time stamp, so both match until one client signs in again. + shutil.copy2(os.path.join(src, f), os.path.join(dst, f)) +if os.path.isfile(sreg): + st = open(sreg, encoding="utf-8", errors="surrogateescape").read() + if not os.path.isfile(dreg): + os.makedirs(os.path.dirname(dreg), exist_ok=True) + shutil.copy2(sreg, dreg) + else: + dt = open(dreg, encoding="utf-8", errors="surrogateescape").read() + for key in ("AutoLoginUser", "RememberPassword"): + v = re.search(r'"%s"\s*"([^"]*)"' % key, st) + if v and re.search(r'"%s"\s*"' % key, dt): + dt = re.sub(r'("%s"\s*")[^"]*(")' % key, lambda m: m.group(1) + v.group(1) + m.group(2), dt, count=1) + open(dreg, "w", encoding="utf-8", errors="surrogateescape").write(dt) +print("droiddeck-steam-x64: sign-in shared from the %s client (the newer one)" % who) +PY +} + +case "${1:-}" in + --sync-login) x64_sync_login; exit 0 ;; + --prepare) x64_prepare; exit 0 ;; + --exec) shift; x64_exec "$@" ;; + --gpu) x64_gpu; exit $? ;; + --webhelper-gpu) x64_webhelper_gpu; exit $? ;; + --default-tool) x64_default_tool; exit 0 ;; + --map-direct) shift; x64_map_direct "$@"; exit 0 ;; +esac + +if pgrep -f 'steamrtarm64/steam( |$)' >/dev/null 2>&1; then + step "shutting down the arm64 client first" + "$ARM_STEAM/steamrtarm64/steam" -shutdown >/dev/null 2>&1 || true + for _ in $(seq 1 30); do pgrep -f 'steamrtarm64/steam( |$)' >/dev/null 2>&1 || break; sleep 1; done +fi +x64_prepare +step "FEX, rootfs and client ready" +if [ -n "${BL_FEXSERVER_LOG:-}" ]; then + FEX_ROOTFS=$ROOTFS "$(dirname "${BL_FEX:-/usr/local/bin/FEX}")/FEXServer" -f -p 600 >"$BL_FEXSERVER_LOG" 2>&1 & + sleep 1 +fi +# The client's connection status comes from NetworkManager on the system bus; a desktop has no system bus. +x64_bus= x64_nm= x64_pin= +x64_cleanup() { + [ -n "$x64_pin" ] && kill "$x64_pin" 2>/dev/null + [ -n "$x64_nm" ] && kill "$x64_nm" 2>/dev/null + [ -n "$x64_bus" ] && kill "$x64_bus" 2>/dev/null + return 0 +} +trap x64_cleanup EXIT +if ! pgrep -f 'dbus-daemon --config-file=/usr/local/share/droiddeck/system-bus.conf' >/dev/null 2>&1 \ + && command -v dbus-daemon >/dev/null 2>&1 && command -v droiddeck-netmanager >/dev/null 2>&1; then + mkdir -p /run/dbus /usr/local/share/droiddeck + cat > /usr/local/share/droiddeck/system-bus.conf <<'BUSCONF' +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <type>system</type> + <listen>unix:path=/run/dbus/system_bus_socket</listen> + <auth>EXTERNAL</auth> + <policy context="default"> + <allow user="*"/> + <allow own="*"/> + <allow send_destination="*"/> + <allow receive_sender="*"/> + </policy> +</busconfig> +BUSCONF + rm -f /run/dbus/system_bus_socket + dbus-daemon --config-file=/usr/local/share/droiddeck/system-bus.conf --nofork --nopidfile & + x64_bus=$! + for _ in $(seq 1 50); do [ -S /run/dbus/system_bus_socket ] && break; sleep 0.1; done + if [ -S /run/dbus/system_bus_socket ]; then + droiddeck-netmanager & + x64_nm=$! + step "network: system bus up, NetworkManager stand-in running" + else + step "network: the system bus did not come up; the client will show no connection" + fi +fi +# Left by a killed client: .crash opens the update UI on its spinner; stale Singleton* locks can blank the UI. +if ! pgrep -f 'steamrt64/steam( |$)' >/dev/null 2>&1; then + for f in "$STEAM_X64/.crash" "$STEAM_X64/steam.pid" "$STEAM_X64/config/htmlcache/SingletonLock" \ + "$STEAM_X64/config/htmlcache/SingletonCookie" "$STEAM_X64/config/htmlcache/SingletonSocket"; do + { [ -e "$f" ] || [ -L "$f" ]; } && rm -f "$f" + done +fi +if [ -n "${BL_CLIENT_CPUS:-}" ] && command -v taskset >/dev/null 2>&1; then + ( + while sleep 5; do + for pid in $(ps -A -o PID,ARGS | awk '($2 ~ /^(.*\/)?FEX(Interpreter)?$/) && ($3 ~ /steamrt64\/steam$/ || $3 ~ /steamwebhelper$/) {print $1} $2 ~ /steamrtarm64\/steamwebhelper$/ {print $1}'); do + taskset -a -p -c "$BL_CLIENT_CPUS" "$pid" >/dev/null 2>&1 + done + done + ) & + x64_pin=$! +fi +for attempt in 1 2 3 4 5; do + # The branch on disk must match -clientbeta before every start, or the client loops on rc=42. + echo "$X64_CHANNEL" > "$STEAM_X64/package/beta" + step "starting the x86-64 SteamRT3 client under FEX (attempt $attempt): $*" + rc=0 + if [ "${BL_X64_X86_WEBHELPER:-0}" != 1 ] || x64_webhelper_gpu; then cef=(-cef-force-gpu -cef-ozone-platform=x11 -cef-use-gl=angle -cef-use-angle=vulkan); else cef=(-cef-disable-gpu); fi + ( x64_exec -clientbeta "$X64_CHANNEL" -no-cef-sandbox "${cef[@]}" "$@" ) >>"$LOG" 2>&1 || rc=$? + step "client exited rc=$rc" + [ "$rc" = 42 ] || break +done \ No newline at end of file diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr new file mode 100755 index 0000000000..242bd169e1 --- /dev/null +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr @@ -0,0 +1,240 @@ +#!/bin/sh +set -u + +steamvr=${STEAMVR:-/opt/steamvr} +vrdir=${DROIDDECK_VR_DIR:-/usr/local/lib/droiddeck-vr} +driver=$vrdir/droiddeck +layer=$vrdir/layer +logs=$HOME/.local/share/Steam/logs +state=${XDG_RUNTIME_DIR:-/tmp}/droiddeck-steamvr +umask 077 +mkdir -p "$state" +chmod 700 "$state" + +PKG_URL=https://steamdeck-packages.steamos.cloud/archlinux-deckard-hotfixes/release/0.3.x/deckard-steamvr-rel-r25358740%2B28b72a4f-1-aarch64.pkg.tar.zst +PKG_SHA256=90a600775eb3e8856dc475f83166a93a290a0b1f3b4e82a69c8e2a8f06b9ddc9 + +running() { pgrep -x vrserver >/dev/null 2>&1; } +installed() { [ -x "$steamvr/bin/linuxarm64/vrstartup" ]; } +quest_settings() { + backup=$HOME/.local/share/droiddeck/steamvr-quest-settings.json + [ "$1" != restore ] || [ -f "$backup" ] || return 0 + python3 "${DROIDDECK_VR_SETTINGS_HELPER:-/usr/local/bin/droiddeck-steamvr-settings}" "$1" \ + "$HOME/.local/share/Steam/config/steamvr.vrsettings" "$backup" +} + +configure_graphics() { + case "$(cat /sys/class/kgsl/kgsl-3d0/gpu_model 2>/dev/null)" in + Adreno840*) + # The session's forced sysmem mode loses the Vulkan device in SteamVR. + export TU_DEBUG="$( + IFS=', ' + set -f + separator= + for flag in ${TU_DEBUG:-}; do + case "$flag" in ''|sysmem) continue ;; esac + printf '%s%s' "$separator" "$flag" + separator=, + done + )" + ;; + esac +} + +stop() { + rm -f "$state/active" + for n in vrcompositor vrserver vrmonitor vrdashboard vrstartup vrwebhelper; do + for p in $(pgrep -x "$n"); do kill "$p" 2>/dev/null; done + done + for p in $(pgrep -f "$steamvr/bin/linuxarm64/vrcompositor-launcher"); do kill "$p" 2>/dev/null; done + attempts=0 + while pgrep -x 'vrserver|vrcompositor' >/dev/null 2>&1; do + attempts=$((attempts + 1)) + if [ "$attempts" = 10 ]; then + for p in $(pgrep -x 'vrserver|vrcompositor'); do kill -KILL "$p" 2>/dev/null; done + fi + [ "$attempts" -lt 20 ] || { echo 'SteamVR did not stop; preferences remain backed up' >&2; return 1; } + sleep 0.1 + done + quest_settings restore +} + +case "${1:-status}" in +launch) + # Library/URL entry point: use the same installer and start path as the app. + exec 8>"$state/launch.lock" + flock -n 8 || exit 0 + if ! installed; then + "$0" install || exit $? + while [ -f "$state/installing" ]; do sleep 1; done + fi + "$0" start + ;; +status) + i=0; installed && i=1 + r=0; running && r=1 + if [ "$r" = 0 ] && [ -n "$(find "$state/active" -mmin +2 2>/dev/null)" ]; then rm -f "$state/active"; fi + n=0; [ -f "$state/installing" ] && n=1 + d=0; [ -f "$driver/bin/linuxarm64/driver_droiddeck.so" ] && [ -f "$layer/libVkLayer_droiddeck_vr.so" ] && d=1 + echo "installed=$i running=$r installing=$n driver=$d" + ;; +install) + exec 7>"$state/install.lock" + flock -n 7 || { echo "already installing"; exit 0; } + installed && { echo "SteamVR is already in $steamvr"; exit 0; } + : > "$state/installing" + trap 'rm -f "$state/installing"' EXIT + cache=$HOME/.cache/droiddeck-vr + mkdir -p "$cache" + pkg=$cache/steamvr.pkg.tar.zst + echo "downloading SteamVR (571 MB) from Valve's package server" + curl -fsSL --retry 5 -C - -o "$pkg" "$PKG_URL" || { echo "download failed"; exit 1; } + echo "$PKG_SHA256 $pkg" | sha256sum -c - >/dev/null 2>&1 || { echo "checksum mismatch: removing the download"; rm -f "$pkg"; exit 1; } + tmp=$cache/extract + rm -rf "$tmp" && mkdir -p "$tmp" + zstd -dc "$pkg" | tar -x -C "$tmp" opt/steamvr || { echo "extract failed"; rm -rf "$tmp"; exit 1; } + mkdir -p "$(dirname "$steamvr")" + rm -rf "$steamvr" && mv "$tmp/opt/steamvr" "$steamvr" && rm -rf "$tmp" "$pkg" + echo "SteamVR installed in $steamvr" + ;; +stop) + stop || exit 1 + ;; +start) + exec 9>"$state/start.lock" + flock -n 9 || { echo "SteamVR start already in progress"; exit 0; } + installed || { echo "SteamVR is not installed (droiddeck-steamvr install)"; exit 1; } + [ -f "$driver/bin/linuxarm64/driver_droiddeck.so" ] || { echo "the Cardboard driver is missing from $driver"; exit 1; } + if [ -f "$state/active" ] && { running || pgrep -x vrstartup >/dev/null 2>&1; }; then + echo "DroidDeck SteamVR is already running" + exit 0 + fi + stop || exit 1 + sleep 1 + mkdir -p "$HOME/.config/openvr" "$HOME/.config/openxr/1" "$logs" "$HOME/.local/share/Steam/config" + if [ -S "/run/droiddeck/droiddeck-xr-frames" ] && [ -z "${DROIDDECK_VR_PRESENT:-}" ]; then + export DROIDDECK_VR_PRESENT=questwsi + fi + python3 - "$HOME/.local/share/Steam/config/steamvr.vrsettings" <<'PY' +import json +import os +from pathlib import Path +import sys +import tempfile + +path = Path(sys.argv[1]) +try: + settings = json.loads(path.read_text()) if path.exists() else {} + section = settings.setdefault("steamvr", {}) + defaults = {} if os.environ.get("DROIDDECK_VR_PRESENT", "").startswith("quest") else {"supersampleManualOverride": True, "supersampleScale": 1.0} + changed = any(key not in section for key in defaults) + for key, value in defaults.items(): + section.setdefault(key, value) + driver = settings.get("driver_droiddeck") + if isinstance(driver, dict) and driver.get("blocked_by_safe_mode") is True: + driver["blocked_by_safe_mode"] = False + changed = True + print("SteamVR had blocked the DroidDeck driver after a crash; unblocked it") + if changed: + with tempfile.NamedTemporaryFile(mode="w", dir=path.parent, delete=False) as output: + temporary = Path(output.name) + try: + json.dump(settings, output, indent=3) + output.write("\n") + except BaseException: + temporary.unlink(missing_ok=True) + raise + try: + os.replace(temporary, path) + finally: + temporary.unlink(missing_ok=True) +except (OSError, ValueError, AttributeError, TypeError) as error: + print("Could not set SteamVR resolution defaults: " + str(error), file=sys.stderr) +try: + (path.parent / "vrserver_crash_timestamp.txt").unlink() + print("Removed SteamVR's crash marker so it starts without safe mode") +except FileNotFoundError: + pass +except OSError as error: + print("Could not remove SteamVR's crash marker: " + str(error), file=sys.stderr) +PY + cat > "$HOME/.config/openvr/openvrpaths.vrpath" <<JSON +{ + "config": ["$HOME/.local/share/Steam/config"], + "external_drivers": ["$driver"], + "jsonid": "vrpathreg", + "log": ["$logs"], + "runtime": ["$steamvr"], + "version": 1 +} +JSON + ln -sf "$steamvr/steamxr_linuxarm64.json" "$HOME/.config/openxr/1/active_runtime.json" + chaperone=$HOME/.local/share/Steam/config/chaperone_info.vrchap + [ -s "$chaperone" ] || cat > "$chaperone" <<'JSON' +{ + "jsonid" : "chaperone_info", + "universes" : [ + { + "collision_bounds" : [ + [ [ -1.0, 0.0, -1.0 ], [ -1.0, 2.43, -1.0 ], [ -1.0, 2.43, 1.0 ], [ -1.0, 0.0, 1.0 ] ], + [ [ -1.0, 0.0, 1.0 ], [ -1.0, 2.43, 1.0 ], [ 1.0, 2.43, 1.0 ], [ 1.0, 0.0, 1.0 ] ], + [ [ 1.0, 0.0, 1.0 ], [ 1.0, 2.43, 1.0 ], [ 1.0, 2.43, -1.0 ], [ 1.0, 0.0, -1.0 ] ], + [ [ 1.0, 0.0, -1.0 ], [ 1.0, 2.43, -1.0 ], [ -1.0, 2.43, -1.0 ], [ -1.0, 0.0, -1.0 ] ] + ], + "play_area" : [ 2.0, 2.0 ], + "seated" : { "translation" : [ 0.0, -1.6, 0.0 ], "yaw" : 0.0 }, + "standing" : { "translation" : [ 0.0, 0.0, 0.0 ], "yaw" : 0.0 }, + "universeID" : "2" + } + ], + "version" : 5 +} +JSON + + export VK_LAYER_PATH="$layer${VK_LAYER_PATH:+:$VK_LAYER_PATH}" + export VK_INSTANCE_LAYERS="VK_LAYER_DROIDDECK_vr${VK_INSTANCE_LAYERS:+:$VK_INSTANCE_LAYERS}" + export VK_LOADER_LAYERS_DISABLE="${VK_LOADER_LAYERS_DISABLE:-~implicit~}" + configure_graphics + export LD_PRELOAD="$layer/libdroiddeck_vr_scheduling.so${LD_PRELOAD:+:$LD_PRELOAD}" + if [ "${DROIDDECK_VR_PRESENT:-}" = questwsi ]; then + quest_settings apply || exit 1 + startup_handed_off=0 + trap '[ "$startup_handed_off" = 1 ] || quest_settings restore' EXIT + # The pinned Frame package's CVP constructor exits on Quest's unsupported SoC. + cvp=$steamvr/drivers/cv/bin/linuxarm64/libArcturusPerception.so + if [ -f "$cvp" ]; then + disabled=$cvp.droiddeck-disabled + if [ -e "$disabled" ]; then disabled=$(mktemp "$disabled.XXXXXX") || exit 1; fi + mv "$cvp" "$disabled" || exit 1 + echo "Disabled Frame-only CVP backend for Quest; SteamVR uses its normal compositor" + fi + fi + if [ "${DROIDDECK_VR_PRESENT:-}" = questframes ]; then + export DROIDDECK_VR_PRODUCER_LEASE=${DROIDDECK_VR_PRODUCER_LEASE:-1} + fi + if [ -z "${DROIDDECK_VR_DISPLAY_MODE:-}" ] && [ -x "$driver/bin/linuxarm64/xr-display-mode" ]; then + mode=$("$driver/bin/linuxarm64/xr-display-mode") || mode= + if [ -n "$mode" ]; then export DROIDDECK_VR_DISPLAY_MODE="$mode"; fi + fi + + shims=$state/shims + mkdir -p "$shims" + if ! command -v xset >/dev/null 2>&1; then + printf '#!/bin/sh\n# xset stand-in for vrwebhelper.sh: "q" only checks the display answers.\nexec xprop -root -display "${DISPLAY:-:0}" _NET_SUPPORTED >/dev/null 2>&1\n' > "$shims/xset" + chmod +x "$shims/xset" + export PATH="$shims:$PATH" + fi + + : > "$state/active" + cd "$steamvr/bin/linuxarm64" || exit 1 + startup_log=$logs/droiddeck-vrstartup.log + ln -sf "$startup_log" "$state/vrstartup.log" + setsid ./vrstartup 8>&- 9>&- > "$startup_log" 2>&1 < /dev/null & + startup_handed_off=1 + echo "SteamVR starting; logs in $logs and $state/vrstartup.log" + ;; +*) + echo "usage: droiddeck-steamvr status|install|start|stop|launch" >&2 + exit 2 + ;; +esac diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr-game b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr-game new file mode 100755 index 0000000000..d1e18827fc --- /dev/null +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr-game @@ -0,0 +1,21 @@ +#!/bin/sh +set -eu + +[ "$#" -gt 0 ] || { echo 'usage: droiddeck-steamvr-game COMMAND [ARG...]' >&2; exit 2; } +pgrep -x vrserver >/dev/null 2>&1 || { + echo 'Start SteamVR before launching a game with droiddeck-steamvr-game.' >&2 + exit 1 +} +vrdir=${DROIDDECK_VR_DIR:-/usr/local/lib/droiddeck-vr} +export VK_LAYER_PATH="$vrdir/layer${VK_LAYER_PATH:+:$VK_LAYER_PATH}" +export VK_INSTANCE_LAYERS="VK_LAYER_DROIDDECK_vr${VK_INSTANCE_LAYERS:+:$VK_INSTANCE_LAYERS}" +export VK_LOADER_LAYERS_DISABLE="${VK_LOADER_LAYERS_DISABLE:-~implicit~}" +# Quest's guest GPU images use Vulkan sharing rather than DMA-BUF modifiers. +if [ -S "/run/droiddeck/droiddeck-xr-frames" ]; then + export gamescope_vr_use_modifiers=${gamescope_vr_use_modifiers:-false} +fi +export gamescope_vr_nudge_to_visible=${gamescope_vr_nudge_to_visible:-true} +exec gamescope --backend openvr \ + --vr-overlay-key "gamescope.droiddeck.game.$$" \ + --vr-overlay-default-name 'DroidDeck game' \ + --vr-overlay-show-immediately --vr-overlay-physical-width 2.4 -- "$@" diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr-settings b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr-settings new file mode 100644 index 0000000000..28f93cf97c --- /dev/null +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr-settings @@ -0,0 +1,80 @@ +#!/usr/bin/python3 +"""Preserve SteamVR preferences across Quest's required compositor overrides.""" +import json +import os +from pathlib import Path +import sys + +OVERRIDES = {'enableLinuxVulkanAsync': True, 'motionSmoothing': False} + + +def read(path): + try: + with path.open() as source: + settings = json.load(source) + except FileNotFoundError: + return {} + if not isinstance(settings, dict) or not isinstance(settings.get('steamvr', {}), dict): + raise ValueError('Invalid SteamVR settings object') + return settings + + +def write(path, value): + path.parent.mkdir(parents=True, exist_ok=True, mode=0o700) + temporary = path.with_name(path.name + '.tmp') + with os.fdopen(os.open(temporary, os.O_WRONLY | os.O_CREAT | os.O_TRUNC | os.O_NOFOLLOW, 0o600), 'w') as destination: + json.dump(value, destination, indent=3) + destination.write('\n') + os.replace(temporary, path) + + +def saved_preferences(path): + try: + backup = read(path) + if not isinstance(backup.get('section'), bool) or not isinstance(backup.get('values'), dict): + raise ValueError('invalid backup object') + for key in OVERRIDES: + entry = backup['values'].get(key) + if not isinstance(entry, list) or len(entry) != 2 or not isinstance(entry[0], bool): + raise ValueError('invalid saved preference: ' + key) + return backup + except ValueError as error: + raise ValueError(f'Invalid preference backup {path}; repair the saved section/values and retry restore. ' + 'The backup and current preferences have been preserved.') from error + + +def update(operation, settings_path, backup_path): + settings = read(settings_path) + if operation == 'apply': + if backup_path.exists(): + saved_preferences(backup_path) + else: + section = settings.get('steamvr', {}) + write(backup_path, {'section': 'steamvr' in settings, + 'values': {key: [key in section, section.get(key)] for key in OVERRIDES}}) + settings.setdefault('steamvr', {}).update(OVERRIDES) + write(settings_path, settings) + elif operation == 'restore': + if not backup_path.exists(): + return + backup = saved_preferences(backup_path) + section = settings.setdefault('steamvr', {}) + for key in OVERRIDES: + present, value = backup['values'][key] + if present: + section[key] = value + else: + section.pop(key, None) + if not section and not backup['section']: + settings.pop('steamvr') + write(settings_path, settings) + backup_path.unlink() + else: + raise ValueError('Expected apply or restore') + + +if __name__ == '__main__': + try: + update(sys.argv[1], Path(sys.argv[2]), Path(sys.argv[3])) + except (OSError, ValueError, KeyError, IndexError, TypeError) as error: + sys.exit('Could not update SteamVR settings: ' + str(error)) diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-store-launch b/tools/linuxfs/overlay/usr/local/bin/droiddeck-store-launch index cb93faa44f..0b6f64ee42 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-store-launch +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-store-launch @@ -6,8 +6,10 @@ whoever started it: the Games tab, a pinned shortcut, or the Steam client's own looks for the store launcher DroidDeck wrote (.droiddeck-launch.bat) among the arguments; beside it .droiddeck-store.json says which store and game it is. -For an Epic game the game needs a fresh exchange code to sign in, which only the app can mint. The -request goes through files under $BL_LAUNCH_DIR/stores (the session root, the same path on both +For an Epic game, once the Epic Games Launcher is installed (droiddeck-epic), the game is started +through it: the hidden launcher signs the game in and hands its arguments back in +.droiddeck-epic-args. Without the launcher, or when it cannot, the game needs a fresh exchange code +to sign in, which only the app can mint. The request goes through files under $BL_LAUNCH_DIR/stores (the session root, the same path on both sides): req/<id>.json {"op": "epic-code", "store": "epic", "id": "<app name>"} (tmp + rename) @@ -30,11 +32,19 @@ import json import os import sys import time +import subprocess +import tempfile +import hashlib from pathlib import Path LAUNCHER = ".droiddeck-launch.bat" SIDECAR = ".droiddeck-store.json" EPIC_CODE = ".droiddeck-epic-code" +EPIC_ARGS = ".droiddeck-epic-args" +EPIC_CLIENT = "/usr/local/bin/droiddeck-epic" +EPIC_CLIENT_CURRENT = ".local/share/droiddeck-epic/current.json" +EPIC_HANDLED = "DROIDDECK_EPIC_HANDLED" +CLIENT_TIMEOUT = 150.0 TIMEOUT = 5.0 STALE_SECONDS = 300 SERVER_WAIT = 8.0 @@ -95,6 +105,30 @@ def drop_stale(folder, now=None): return False +def client_wanted(): + home = os.environ.get("HOME") or "/root" + return os.access(EPIC_CLIENT, os.X_OK) and os.path.isfile(os.path.join(home, EPIC_CLIENT_CURRENT)) + + +def through_client(folder, sidecar, timeout=CLIENT_TIMEOUT): + extra = sidecar.get("extra") if isinstance(sidecar.get("extra"), dict) else {} + namespace, item = str(extra.get("namespace") or ""), str(extra.get("catalogItemId") or "") + if not namespace or not item: + return "no-catalog-ids" + command = [EPIC_CLIENT, "launch", "--app", str(sidecar.get("id")), "--namespace", namespace, "--item", item, + "--folder", str(folder), "--owner", str(os.getppid()), "--timeout", str(int(timeout))] + try: + run = subprocess.run(command, stdout=subprocess.PIPE, stdin=subprocess.DEVNULL, timeout=timeout + 30) + answer = json.loads(run.stdout.decode("utf-8", "replace").strip().splitlines()[-1]) + except (OSError, ValueError, IndexError, subprocess.TimeoutExpired) as error: + return "error-" + type(error).__name__ + if not isinstance(answer, dict): + return "no-answer" + if answer.get("ok") and (folder / EPIC_ARGS).is_file(): + return "ok" + return str(answer.get("reason") or "failed") + + def ask(channel, request, timeout=TIMEOUT): """Writes [request] under channel/req and waits for channel/resp; the answer, or None on timeout.""" req_dir, resp_dir = channel / "req", channel / "resp" @@ -113,7 +147,6 @@ def ask(channel, request, timeout=TIMEOUT): return value except (OSError, ValueError): time.sleep(0.05) - # Not answered: the request is withdrawn so a late app does not mint a code nobody reads. try: (req_dir / (rid + ".json")).unlink() except OSError: @@ -226,10 +259,7 @@ def provision_prefix(compat_data, wait=SERVER_WAIT): reg = pfx / "user.reg" if not reg.is_file(): return "prefix-not-created" - # A wineserver still up for this prefix would write its own copy of user.reg over these lines. busy = not wait_for_server(pfx, wait) - # winebrowser starts the first entry it can; an absolute path does not depend on the PATH Wine - # hands it. set_value(reg, BROWSER_KEY, "Browsers", BROWSER + ",xdg-open") removed = remove_value(reg, EOS_KEY, "OverlayPath") state = "browser-set" if has_value(reg, BROWSER_KEY, "Browsers", BROWSER + ",xdg-open") else "browser-not-written" @@ -240,8 +270,6 @@ def provision_prefix(compat_data, wait=SERVER_WAIT): CLOUD_TIMEOUT = 15.0 CLOUD_STORES = ("gog", "epic") -# Exit status that tells droiddeck-proton this was a store game with cloud saves: it then waits for -# Proton instead of exec'ing it, and runs `droiddeck-store-launch --exited` after. STORE_GAME = 10 @@ -250,10 +278,16 @@ def cloud_on(sidecar): return str(sidecar.get("store")) in CLOUD_STORES and sidecar.get("cloud", True) is not False -def exited(argv): +def exited(argv, code=0): """After the game: ask the app to upload what changed, without waiting for it.""" found = find_store_game(argv) launch_dir = os.environ.get("BL_LAUNCH_DIR", "") + if found is not None and str(found[1].get("store")) == "epic" and os.environ.get(EPIC_HANDLED) != "1" \ + and os.access(EPIC_CLIENT, os.X_OK): + try: + subprocess.run([EPIC_CLIENT, "exited", "--code", str(code)], stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, timeout=10) + except (OSError, subprocess.TimeoutExpired): + pass if found is None or not launch_dir or not cloud_on(found[1]): return 0 store, game = str(found[1].get("store")), str(found[1].get("id")) @@ -262,9 +296,84 @@ def exited(argv): return 0 +COMET_DIR = Path("/usr/local/lib/droiddeck-comet") + + +def provision_galaxy(compat_data, proton, timeout=90): + """Proton creates the prefix and registers Galaxy before the first game runs.""" + if not compat_data or not proton or not Path(proton).is_file(): + return "no-proton" + data = Path(compat_data) + data.mkdir(parents=True, exist_ok=True) + marker = data / "pfx/.droiddeck-comet-service" + try: + version = (COMET_DIR / "version").read_text().strip() + tools = [COMET_DIR / "GalaxyCommunication.exe", COMET_DIR / "update-permissions.exe"] + if not all(p.is_file() for p in tools): + return "not-installed" + stamp = version + " " + " ".join(hashlib.sha256(p.read_bytes()).hexdigest() for p in tools) + if marker.is_file() and marker.read_text() == stamp and (data / "pfx/system.reg").is_file(): + return "ready" + with tempfile.TemporaryDirectory(prefix="droiddeck-galaxy-") as tmp: + folder = Path(tmp) + result = folder / "result" + bat = folder / "install.bat" + src = windows_path(str(COMET_DIR)) + answer = windows_path(str(result)) + target = r"C:\ProgramData\GOG.com\Galaxy\redists" + lines = ["@echo off", "setlocal", 'set "DD_DIR=%s"' % target, + "sc query GalaxyCommunication >nul 2>&1", + 'if not errorlevel 1 if not exist "%DD_DIR%\\droiddeck-comet" goto existing', + 'if not exist "%DD_DIR%" mkdir "%DD_DIR%"', + 'copy /y "%s\\GalaxyCommunication.exe" "%s\\GalaxyCommunication.exe" >nul' % (src, target), + 'if errorlevel 1 exit /b 1', + 'sc query GalaxyCommunication >nul 2>&1', + 'if errorlevel 1 sc create GalaxyCommunication binpath= "%s\\GalaxyCommunication.exe"' % target, + 'if errorlevel 1 exit /b 1', + '"%s\\update-permissions.exe"' % src, + 'if errorlevel 1 exit /b 1', + 'sc query GalaxyCommunication >nul 2>&1', + 'if errorlevel 1 exit /b 1', + 'echo managed>"%s\\droiddeck-comet"' % target, + ':existing', 'echo ready>"%s"' % answer, 'exit /b 0'] + bat.write_bytes(("\r\n".join(lines) + "\r\n").encode()) + env = os.environ.copy() + env["BL_COMET_BOOTSTRAP"] = "1" + run = subprocess.run([proton, "run", "cmd.exe", "/d", "/c", windows_path(str(bat))], + env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=timeout) + if run.returncode or not result.is_file() or result.read_text().strip() != "ready": + return "service-unavailable" + marker.write_text(stamp) + return "ready" + except subprocess.TimeoutExpired: + return "timeout" + except (OSError, ValueError): + return "service-unavailable" + + +def prepare_gog(sidecar, compat_data, launch_dir): + if not launch_dir: + log("gog achievements unavailable: no-channel") + return False + answer = ask(Path(launch_dir) / "stores", {"op": "gog-achievements", "store": "gog", "id": str(sidecar.get("id"))}, timeout=25.0) + if not isinstance(answer, dict) or not answer.get("ready"): + log("gog achievements: " + (str(answer.get("reason", "unavailable")) if isinstance(answer, dict) else "timeout")) + return False + state = provision_galaxy(compat_data, os.environ.get("BL_STORE_PROTON", "")) + log("gog achievements prefix: " + state) + return state == "ready" + + def main(argv): if argv and argv[0] == "--exited": - return exited(argv[1:]) + rest, code = argv[1:], 0 + if rest[:1] == ["--code"] and len(rest) > 1: + try: + code = int(rest[1]) + except ValueError: + pass + rest = rest[2:] + return exited(rest, code) found = find_store_game(argv) if found is None: return 0 @@ -273,11 +382,30 @@ def main(argv): compat_data = os.environ.get("STEAM_COMPAT_DATA_PATH", "").rstrip("/") prefix_id = os.path.basename(compat_data) if compat_data else "" launch_dir = os.environ.get("BL_LAUNCH_DIR", "") + if store == "gog": + prepare_gog(sidecar, compat_data, launch_dir) if store == "epic": - drop_stale(folder) + handled = os.environ.get(EPIC_HANDLED) == "1" and (folder / EPIC_ARGS).is_file() + if not handled: + drop_stale(folder) + try: + (folder / EPIC_ARGS).unlink() + except OSError: + pass choice = options(sidecar) - if not (choice["eos"] and not choice["offline"]): - # Sign-in off, or offline: no code, and none left over from before. + client = None + if handled: + client = "ok" + elif choice["eos"] and not choice["offline"] and client_wanted(): + client = through_client(folder, sidecar) + log("epic launch id=%s client=%s" % (game, client)) + if client == "ok": + try: + (folder / EPIC_CODE).unlink() + except OSError: + pass + log("epic launch id=%s through=client" % game) + elif not (choice["eos"] and not choice["offline"]): try: (folder / EPIC_CODE).unlink() except OSError: @@ -298,7 +426,6 @@ def main(argv): log("cloud %s %s down result=skipped reason=off" % (store, game)) return 0 if launch_dir: - # The cloud copy where it is newer, before the game reads its saves; bounded, then on regardless. answer = ask(Path(launch_dir) / "stores", {"op": "cloud-down", "store": store, "id": game}, timeout=CLOUD_TIMEOUT) if answer is None: log("cloud %s %s down result=timeout" % (store, game)) @@ -312,6 +439,6 @@ def main(argv): if __name__ == "__main__": try: sys.exit(main(sys.argv[1:])) - except Exception as e: # never in the way of the launch + except Exception as e: log("skipped: %s" % type(e).__name__) sys.exit(0) diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-wincomponents b/tools/linuxfs/overlay/usr/local/bin/droiddeck-wincomponents index 533f6674c3..7349e67847 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-wincomponents +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-wincomponents @@ -32,20 +32,13 @@ from pathlib import Path STORE = Path("/opt/droiddeck/wincomponents") SELECTION = Path.home() / ".config/droiddeck/wincomponents.json" -# Components the app is still downloading for a game Steam installed during this session: -# {"games": {"<appid>": ["vcredist2019_dll", ...]}}. A launch waits a little for them. PENDING = Path.home() / ".config/droiddeck/wincomponents-pending.json" PENDING_WAIT = 10.0 -# What this prefix holds from us, so a component the user turns off is taken out again. STATE = ".droiddeck-wincomponents.json" -# A file ours replaced that was not Proton's (a real installer's, the user's own), put back when the -# component is turned off. Proton's builtins need no copy: it restores those itself. BACKUP = ".droiddeck-wincomponents-backup" BUILTIN_MARKS = (b"Wine builtin DLL", b"Wine placeholder DLL") ARCH_DIRS = ("system32", "syswow64") ID = re.compile(r"[A-Za-z0-9][A-Za-z0-9._-]{0,63}") -# The registry file of each hive in a prefix, and the kinds of value registry.json holds: "key" -# makes a key, "append"/"prepend" add to a list such as PATH unless it is already there. HIVES = {"HKLM": "system.reg", "HKCU": "user.reg"} VALUE_TYPES = {"key", "sz", "expand_sz", "multi_sz", "dword", "binary", "append", "prepend"} @@ -80,7 +73,6 @@ def component(store, cid): for arch in ARCH_DIRS: folder = root / arch if folder.is_dir(): - # A few go one level down (gmdls: system32/drivers/gm.dls). for entry in sorted(folder.rglob("*")): if entry.is_file() and not entry.is_symlink(): rel = entry.relative_to(folder).as_posix().lower() @@ -195,12 +187,10 @@ def place(src, target, backup=None): final = found or target temp = final.with_name(".%s.droiddeck" % final.name) shutil.copy2(src, temp) - # Over a Proton builtin this swaps its symlink for our file. os.replace(temp, final) return True -# ---------------------------------------------------------------- the prefix's registry files def reg_escape(text, extra=""): """A string as Wine's registry files write it.""" @@ -556,7 +546,6 @@ def apply(compat_path, app_id, selection=SELECTION, store=STORE, pending=PENDING """Brings the prefix in line with the game's picks. Returns (overrides, notes).""" compat = Path(compat_path) pfx = compat / "pfx" - # A game Steam installed during this session may have components still on their way. waited = wait(app_id, pending, store) if wait else None ids = wanted(app_id, selection) state = load_state(compat) @@ -576,7 +565,6 @@ def apply(compat_path, app_id, selection=SELECTION, store=STORE, pending=PENDING overrides += names values += [(cid, value) for value in registry] for rel, src in files: - # A file this prefix already has from us is ours to replace; anything else is kept. if place(src, pfx / rel, None if rel in state["files"] else compat / BACKUP / rel): copied += 1 keep[rel] = cid @@ -594,8 +582,6 @@ def apply(compat_path, app_id, selection=SELECTION, store=STORE, pending=PENDING path.unlink() removed += 1 if removed: - # Proton refreshes its builtins only when its config changes; forgetting the config puts - # its own DLLs back where ours were on the next launch - this one. try: (compat / "config_info").unlink() except FileNotFoundError: @@ -627,7 +613,6 @@ def overrides_value(names): def main(): - # droiddeck-wincomponents <compatdata dir> <appid>: what a launch would do, for a shell. if len(sys.argv) != 3: print("usage: droiddeck-wincomponents <compatdata dir> <appid>", file=sys.stderr) return 2 diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-x64-arm-proton b/tools/linuxfs/overlay/usr/local/bin/droiddeck-x64-arm-proton new file mode 100755 index 0000000000..4a074be13f --- /dev/null +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-x64-arm-proton @@ -0,0 +1,46 @@ +#!/bin/bash +# Runs natively: droiddeck-steam-x64's x86 wrappers start it through an arm64 binary, which FEX hands to the CPU. +tool=$1; shift +x64_home=$HOME + +# The game overlay tags the game's windows with the Steam app ID; without it gamescope never shows them. +overlay=0 +case ${LD_PRELOAD:-} in *gameoverlayrenderer.so*) overlay=1 ;; esac + +for v in $(compgen -e); do + case $v in FEX_*) unset "$v" ;; esac +done +unset LD_LIBRARY_PATH LD_PRELOAD STEAM_RUNTIME_STEAMRT STEAM_STEAMRT_RECURSION_GUARD \ + LIBGL_ALWAYS_SOFTWARE LIBGL_DRI3_DISABLE GALLIUM_DRIVER BL_WEBHELPER_HIDE_TRACER PROOT_FP_OFF + +game_display=${DISPLAY:-} +if [ -f "$x64_home/arm-session.env" ]; then + . "$x64_home/arm-session.env" +else + export HOME=/root +fi +[ -z "$game_display" ] || export DISPLAY=$game_display +# Proton takes its Steam client parts from the client's install folder; the x86-64 client's are x86. +export BL_X64_STEAM_ROOT=${STEAM_COMPAT_CLIENT_INSTALL_PATH:-} +export STEAM_COMPAT_CLIENT_INSTALL_PATH=$HOME/.local/share/Steam +arm_overlay=$STEAM_COMPAT_CLIENT_INSTALL_PATH/steamrtarm64/gameoverlayrenderer.so +if [ "$overlay" = 1 ] && [ -f "$arm_overlay" ]; then + export LD_PRELOAD=$arm_overlay${LD_PRELOAD:+:$LD_PRELOAD} +fi + +dir=$HOME/.local/share/Steam/compatibilitytools.d/$tool +manifest=$dir/toolmanifest.vdf +[ -f "$manifest" ] || { echo "droiddeck-x64-arm-proton: no tool $dir" >&2; exit 127; } +if ! grep -q droiddeck-proton-wrap "$manifest" 2>/dev/null; then + python3 - "${dir%/*}" <<'PY' >&2 || true +import importlib.machinery, importlib.util, sys +path = "/usr/local/bin/steam-compatibility" +spec = importlib.util.spec_from_file_location("compat", path, loader=importlib.machinery.SourceFileLoader("compat", path)) +compat = importlib.util.module_from_spec(spec) +spec.loader.exec_module(compat) +compat.adopt_extras(sys.argv[1]) +PY +fi +cmd=$(sed -n 's/^[[:space:]]*"commandline"[[:space:]]*"\([^"]*\)".*/\1/p' "$manifest" | head -n 1) +entry=${cmd%% *} +exec "$dir/${entry#/}" "$@" diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-x64-arm-webhelper b/tools/linuxfs/overlay/usr/local/bin/droiddeck-x64-arm-webhelper new file mode 100755 index 0000000000..646dbd01b1 --- /dev/null +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-x64-arm-webhelper @@ -0,0 +1,20 @@ +#!/bin/bash +# The arm64 client's web helper for the x86-64 client, run natively: FEX hands this arm64 program to the CPU. +x64_home=$HOME +arm=/root/.local/share/Steam/steamrtarm64 + +for v in $(compgen -e); do + case $v in FEX_*) unset "$v" ;; esac +done +unset LD_PRELOAD LIBGL_ALWAYS_SOFTWARE LIBGL_DRI3_DISABLE BL_WEBHELPER_HIDE_TRACER BL_X64_ARM_WEBHELPER +if [ -f "$x64_home/arm-session.env" ]; then + eval "$(grep -E '^declare -x (VK_ICD_FILENAMES|VK_DRIVER_FILES|GALLIUM_DRIVER|MESA_LOADER_DRIVER_OVERRIDE|LIBGL_KOPPER_DRI2|TU_DEBUG|ZINK_DEBUG|ZINK_DESCRIPTORS|MESA_NO_ERROR|MESA_DISK_CACHE_DATABASE)=' "$x64_home/arm-session.env")" +fi +export LD_LIBRARY_PATH=$arm:$arm/panorama LIBGL_KOPPER_DISABLE=true + +args=() +for a in "$@"; do + case $a in --disable-gpu|--disable-gpu-compositing) ;; *) args+=("$a") ;; esac +done +cd "$arm" || exit 1 +exec "$arm/steamwebhelper" "${args[@]}" --ignore-gpu-blocklist diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-x64-webhelper b/tools/linuxfs/overlay/usr/local/bin/droiddeck-x64-webhelper new file mode 100755 index 0000000000..10abdf2a4a --- /dev/null +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-x64-webhelper @@ -0,0 +1,10 @@ +#!/bin/bash +# Steam's compositor draws each browser window from its X pixmap: frames must reach X, not gamescope's WSI layer. +# gamescope sets vk_xwayland_wait_ready=false for its children; kopper swapchains flashed black even with the wait. +unset BL_X64_ARM_WEBHELPER +# The shim already added the GPU flags (preload/webhelper.c) to these arguments. +export BL_WEBHELPER_ARGS=stock DISABLE_GAMESCOPE_WSI=1 vk_xwayland_wait_ready=true LIBGL_KOPPER_DISABLE=true +if [ -x ./steamwebhelper ]; then + exec ./steamwebhelper "$@" +fi +exec "$HOME/.local/share/Steam/steamrt64/steamwebhelper" "$@" diff --git a/tools/linuxfs/overlay/usr/local/bin/steam-compatibility b/tools/linuxfs/overlay/usr/local/bin/steam-compatibility index 18dc6bb129..fb84fd94d1 100755 --- a/tools/linuxfs/overlay/usr/local/bin/steam-compatibility +++ b/tools/linuxfs/overlay/usr/local/bin/steam-compatibility @@ -1,20 +1,4 @@ #!/usr/bin/python3 -# Makes the ARM64 Proton the client already downloaded usable here, and sets it as the default tool -# for Windows titles (CompatToolMapping "0" in config.vdf) when the user has not chosen one. Run -# before the client starts; it rewrites config.vdf on exit. -# -# steam-compatibility <steam root> -# -# Valve ships a native aarch64 Proton (arm64ec Wine with FEX as the x86 layer) as an ordinary depot, -# which is exactly what this runtime wants. Its toolmanifest declares require_tool_appid 4185400 - -# Steam Linux Runtime 4 for arm64 - so Steam stacks pressure-vessel underneath it, and -# pressure-vessel needs unprivileged user namespaces, which an Android app does not get. Steam then -# drops the launch on the floor: no window, no log, straight back to the library. -# -# So the depot is re-registered here as a compatibility tool of our own: every entry symlinked so -# nothing is copied and Steam still updates the real depot, but with a toolmanifest that leaves out -# require_tool_appid. Proton takes its base directory from dirname(sys.argv[0]) without resolving -# it, so it reads files/ through those symlinks and runs directly on this rootfs. import json import os import re @@ -26,22 +10,10 @@ TOOL = "droiddeck-proton-arm64" TOOL_11 = "droiddeck-proton-11-arm64" LEGACY_TOOL = "bannerlator-proton-arm64" LABEL_FILE = "/etc/steam-compatibility-label" -# The ARM64 Proton depot the client downloads for itself, as a compatibility-tool appid. -# The session asks the client to install it on the command line the first time (steam://install), -# so a new client has it before a Windows title is first launched. It is deliberately NOT named as -# this tool's dependency: a dependency is composed with its own dependencies, and this depot -# requires 4185400, the arm64 Steam Linux Runtime, whose container needs user namespaces Android -# does not give - the launch would be wrapped in it and die before this tool ever ran. PROTON_ARM64_APPID = "4427310" LAUNCHER = "droiddeck-proton" LEGACY_LAUNCHER = "bannerlator-proton" -# The extra Steam library the app mounts the installed games into (see droiddeck-steam-library). -# installed_apps() scans it too; it lives only in the sibling script, so define it here as well. -LIBRARY = "/mnt/droiddeck" # the card library is LIBRARY + "-sd"; internal storage is steam_root itself -# The client lists its own "Proton Experimental (ARM64)" and "Proton 11.0 (ARM64)" in the same -# Compatibility dropdown, and those are the two that cannot start a game here. Ours has to be -# unmistakable at a glance, or a user picks a neighbour and gets a launch that fails silently. -# Newest first: whichever the client has downloaded is used. +LIBRARY = "/mnt/droiddeck" SOURCES = ("Proton Experimental (ARM64)", "Proton 11.0 (ARM64)") OWN_TOOLS = ((TOOL, SOURCES), (TOOL_11, ("Proton 11.0 (ARM64)",))) FEX_TOOL = "droiddeck-fex" @@ -49,17 +21,15 @@ FEX_LAUNCHER = "droiddeck-fex-tool" FEX_FILES = ("toolmanifest.vdf", "compatibilitytool.vdf", FEX_LAUNCHER) FEX_APPID = "3127680" SNIPER_APPID = "1628350" -FEX_DEPENDENCIES = (FEX_APPID, SNIPER_APPID) +SLR4_APPID = "4183110" +FEX_DEPENDENCIES = (FEX_APPID, SNIPER_APPID, SLR4_APPID) +REQUIRED_TOOLS = (PROTON_ARM64_APPID,) + FEX_DEPENDENCIES +FULLY_INSTALLED = 4 +UPDATE_REQUIRED = 2 REQUEST_HANDOFF_SECONDS = 30 PLAYABLE_TYPES = frozenset(("game", "demo", "application", "beta")) COMPAT_DIR = os.path.join(os.environ.get("HOME", "/root"), ".local", "share", "droiddeck-compat") -# Written by us; everything else in the depot is symlinked through. OWN_FILES = ("toolmanifest.vdf", "compatibilitytool.vdf", LAUNCHER) -# The client assigns a Proton to a Windows title by itself, as a per-app CompatToolMapping entry at -# priority 250 - which outranks the "0" default, so setting that default alone changes nothing. Every -# Proton it can pick is one this runtime cannot start: the ARM64 ones want pressure-vessel (see -# above) and the x86_64 ones want pressure-vessel and FEX on top. Ours is the only one that runs -# here, so every Proton mapping is repointed at it. Tools that are not Proton are left alone. COMPAT_TOOL_VDF = """"compatibilitytools" { "compat_tools" @@ -84,52 +54,30 @@ TOOL_MANIFEST_VDF = """"manifest" """ % LAUNCHER -# Steam runs its own graphics probe through EVERY registered tool at once, ~40 s after logging in, -# all with STEAM_COMPAT_DATA_PATH=.../compatdata/0, and those concurrent Protons can write their -# builtin DLLs through each other's prefix links into each other's trees (seen: GE's FEX DLLs became -# Proton Experimental's). Moving those runs to a prefix per tool was tried and crashed the Steam -# client right after the probe started (segfault, rc 139, first ever in 25 sessions), so the client -# relies on compatdata/0 itself. The launch-time check below is the protection instead. - -# The Components page's choices, enforced in the one place every game launch passes: the app keeps -# desired.tsv (tool dir, Proton build, component, file, sha256, source copy) and an unpacked copy of -# each package in use. A file that no longer matches - whatever changed it - is put back before -# Proton starts. Only for the Proton build the choice was made for: after a Steam update the build -# differs and the Proton's own new files are left alone until the user chooses again. -# A store game (GOG, Epic, Amazon) is started through the launcher .bat DroidDeck wrote beside it. -# An Epic game needs a fresh sign-in code, which only the app can mint: droiddeck-store-launch asks -# for it and the app writes it into the game's folder, so a launch from the client's own Play -# button signs in just as one from the app does. A real launch only; never in the way of it. BL_STORE_SETUP = """ bl_store_launch() { [ "${verb:-}" = waitforexitandrun ] || return 0 - # A web address the game opens (Wine's winebrowser runs xdg-open) goes to Android's browser: - # droiddeck-open-url as xdg-open, first on the game's PATH, with the session channel left in a - # file in case Wine does not pass BL_LAUNCH_DIR on. (The prefix also names it as Wine's browser.) if [ -x /usr/local/bin/droiddeck-open-url ]; then mkdir -p /tmp/droiddeck-browser ln -sfn /usr/local/bin/droiddeck-open-url /tmp/droiddeck-browser/xdg-open - [ -n "${BL_LAUNCH_DIR:-}" ] && printf '%s\n' "$BL_LAUNCH_DIR" > /tmp/droiddeck-browser/launch-dir + [ -n "${BL_LAUNCH_DIR:-}" ] && printf '%s +' "$BL_LAUNCH_DIR" > /tmp/droiddeck-browser/launch-dir PATH="/tmp/droiddeck-browser:$PATH"; export PATH fi - # BL_DEBUG_BROWSER=1 (droiddeck-env): Wine traces how the game opens a web address. if [ "${BL_DEBUG_BROWSER:-}" = 1 ]; then WINEDEBUG="${WINEDEBUG:+$WINEDEBUG,}+shell,+winebrowser"; export WINEDEBUG fi [ -x /usr/local/bin/droiddeck-store-launch ] || return 0 /usr/local/bin/droiddeck-store-launch "$@" - # 10: a store game with cloud saves - the launch waits for Proton and uploads after (bl_run). [ $? -eq 10 ] && BL_STORE_EXIT=1 return 0 } -# Runs Proton: exec'd as always, except for a store game with cloud saves, where the wrapper stays -# to tell the app the game has exited so it can upload what changed. bl_run() { if [ -n "${BL_STORE_EXIT:-}" ]; then "$@" rc=$? - /usr/local/bin/droiddeck-store-launch --exited "${BL_STORE_ARGS[@]}" || true + /usr/local/bin/droiddeck-store-launch --exited --code "$rc" "${BL_STORE_ARGS[@]}" || true exit $rc fi exec "$@" @@ -141,29 +89,57 @@ bl_components() { base=$1 cm_dir="${HOME:-/root}/.local/share/droiddeck-components" cm_list="$cm_dir/desired.tsv" - # A real game launch only: the verb the client starts a game with and the game's own prefix. Every - # other run - above all the client's own probes right after login, which all share compatdata/0 - - # is left exactly as it was: with this check running through them, the client segfaulted (rc 139) - # within seconds of starting its probes, four sessions out of four. The prefix decides rather than - # the app id because a non-Steam shortcut launches with app id 0 but still gets a prefix of its own. [ "${verb:-}" = waitforexitandrun ] || return 0 case "${STEAM_COMPAT_DATA_PATH:-}" in ''|*/compatdata/0|*/compatdata/0/|*/compatdata/0-*) return 0 ;; esac [ -f "$cm_list" ] || return 0 - cm_app=${STEAM_COMPAT_DATA_PATH%/} + cm_app=${STEAM_COMPAT_DATA_PATH} + while [[ "$cm_app" == */ ]]; do cm_app=${cm_app%/}; done cm_app=${cm_app##*/} + if [[ "$cm_app" =~ ^(-?)([0-9]+)$ ]]; then + cm_sign=${BASH_REMATCH[1]} + cm_digits=${BASH_REMATCH[2]} + while [[ ${#cm_digits} -gt 1 && "$cm_digits" == 0* ]]; do cm_digits=${cm_digits#0}; done + if [[ ${#cm_digits} -le 10 ]]; then + cm_app=$((10#$cm_digits)) + [ "$cm_sign" = "-" ] && cm_app=$((-cm_app)) + if (( cm_app >= -2147483648 && cm_app <= 4294967295 && cm_app != 0 )); then + (( cm_app < 0 )) && cm_app=$((cm_app + 4294967296)) + else + cm_app="" + fi + else + cm_app="" + fi + else + cm_app="" + fi + if [ -z "$cm_app" ]; then + echo "droiddeck-proton: components: invalid game prefix, left as it is" >&2 + return 0 + fi cm_tool=${base##*/} cm_build=$(awk 'NR == 1 { print $2 }' "$base/version" 2>/dev/null) cm_fixed=0 cm_checked=0 - # One sha256sum for every file: each program started here pays a dozen traced library lookups - # under the game's search path before it does anything. + cm_selected=$(awk -F '\\t' -v app="$cm_app" -v tool="$cm_tool" -v build="$cm_build" ' + $2 == tool && $3 == build { + rows[++count] = $0 + scopes[count] = $1 + comps[count] = $4 + if ($1 == app) specific[$4] = 1 + } + END { + for (i = 1; i <= count; i++) + if (scopes[i] == app || (scopes[i] == "*" && !specific[comps[i]])) print rows[i] + } + ' "$cm_list") local cm_rows=() cm_files=() row h p local -A cm_sums=() - while IFS=$'\\t' read -r t want comp rel sum src; do - [ "$t" = "$cm_tool" ] && [ "$want" = "$cm_build" ] || continue + while IFS=$'\\t' read -r scope t want comp rel sum src; do + [ -n "$scope" ] || continue cm_rows+=("$comp"$'\\t'"$rel"$'\\t'"$sum"$'\\t'"$src") - [ -f "$base/$rel" ] && cm_files+=("$base/$rel") - done < "$cm_list" + [ "$src" != "-" ] && [ -f "$base/$rel" ] && cm_files+=("$base/$rel") + done <<< "$cm_selected" if [ ${#cm_files[@]} -gt 0 ]; then while read -r h p; do cm_sums["$p"]=$h; done < <(sha256sum -- "${cm_files[@]}" 2>/dev/null) fi @@ -171,6 +147,10 @@ bl_components() { IFS=$'\\t' read -r comp rel sum src <<< "$row" cm_checked=$((cm_checked + 1)) f="$base/$rel" + if [ "$src" = "-" ]; then + if [ -e "$f" ]; then rm -f "$f" && cm_fixed=$((cm_fixed + 1)); fi + continue + fi if [ -f "$f" ] && [ "${cm_sums[$f]:-}" = "$sum" ]; then continue; fi if [ ! -f "$src" ]; then echo "droiddeck-proton: components: $comp source missing ($src), left as it is" >&2 @@ -189,36 +169,17 @@ bl_components() { } """ -# Resolves the depot at launch time, so the tool can be registered before the depot exists and -# survives the client updating or replacing it. Proton takes its base directory from -# dirname(sys.argv[0]) without resolving it, so it is run from the depot itself. -# Cores for a game the client launches, kept separate from the client's own. One mask suits the -# client's menus and another suits a game, and they are wanted at the same time - so the game's is -# applied here, in the launch path every game goes through, rather than to the session as a whole. BL_GAME_CPUS_SETUP = """ bl_game_cpus() { [ -n "${BL_GAME_CPUS:-}" ] || return 0 command -v taskset >/dev/null 2>&1 || return 0 - # exec'd through taskset rather than set afterwards: a mask applied to a pid races the process - # into spawning its own threads, and this way every thread inherits it from the first instruction. BL_TASKSET="taskset -c $BL_GAME_CPUS" echo "droiddeck-proton: game cores $BL_GAME_CPUS" >&2 } """ -# Quake III engine games (id Tech 3) set their own resolution and switch the display to it. Under -# gamescope with the ARM64 Proton that switch is refused ("calling CDS: failed, bad mode") and the -# game never gets OpenGL; left at its own size in a window, it draws small in a corner. So these -# titles are told to stay windowed at the session's own size - unless the user's launch options -# already say something about the video mode, which are left as they are. -# The session puts the client's own libraries (steamrtarm64, its panorama/) ahead of everything for -# the client, and a game inherits that: Wine then resolved gnutls, SDL, FFmpeg and the rest against -# the client's private copies instead of the rootfs it was built for. Inside Steam's runtime -# container that path never reaches Proton either. (WinNative's winnative-proton-launch.) BL_LIBPATH_SETUP = """ bl_libpath() { - # A Proton built to prefer PipeWire (CachyOS's among the adopted ones) hung its audio thread - # here, where only PulseAudio answers. (WinNative, winnative-proton-launch.) export PROTON_USE_PIPEWIRE=${PROTON_USE_PIPEWIRE:-0} [ -n "${LD_LIBRARY_PATH:-}" ] || return 0 local kept= dir old_ifs=$IFS @@ -238,7 +199,6 @@ BL_IDTECH3_SETUP = """ bl_idtech3() { BL_EXTRA_ARGS=() case "${SteamAppId:-${STEAM_COMPAT_APP_ID:-}}" in - # Quake III Arena, Quake III: Team Arena, Return to Castle Wolfenstein, Jedi Academy. 2200|2350|9010|6020) ;; *) return 0 ;; esac @@ -254,8 +214,40 @@ bl_idtech3() { } """ +# Source games report VAC-secure or insecure only in their console, written to console.log only with -condebug. +# The app keeps the switch and the records in /root: the x86-64 client runs games with its own HOME. +BL_VACDIAG_SETUP = """ +bl_vacdiag() { + [ -f /root/.droiddeck-vac-diagnostics ] || return 0 + [ "${verb:-}" = waitforexitandrun ] || return 0 + local exe= a dir added=no app=${SteamAppId:-${STEAM_COMPAT_APP_ID:-0}} + for a in "$@"; do case $a in *.exe|*.EXE) exe=$a ;; esac; done + [ -n "$exe" ] || return 0 + dir=$(dirname "$exe") + # Source: <mod>/gameinfo.txt beside the exe. Source 2: game/bin/win64/<exe> with game/<mod>/gameinfo.gi. + if ls "$dir"/*/gameinfo.txt >/dev/null 2>&1 || ls "$dir"/../../*/gameinfo.gi >/dev/null 2>&1; then + case " $* " in + *" -condebug "*) echo "droiddeck-proton: vac-diag: app $app already has -condebug" >&2 ;; + *) BL_EXTRA_ARGS+=(-condebug); added=yes + echo "droiddeck-proton: vac-diag: app $app is a Source title; launched with -condebug" >&2 ;; + esac + else + added=not-source + echo "droiddeck-proton: vac-diag: app $app is not a Source title; it keeps no console log to read" >&2 + fi + case " $* " in + *" -insecure "*) echo "droiddeck-proton: vac-diag: app $app has -insecure in its launch options - it can never be VAC-secure this way" >&2 ;; + esac + printf '%s\tapp %s\tcondebug %s\t%s\n' "$(date +%s)" "$app" "$added" "${exe##*/}" >> /root/.droiddeck-vac-launches +} +""" + BL_DIRECTAUDIO_SETUP = """ bl_directaudio() { + case "${verb:-}" in + run|waitforexitandrun|runinprefix) ;; + *) return 0 ;; + esac base=$1 [ -n "${BL_DIRECTAUDIO:-}" ] || return 0 [ -d "$BL_DIRECTAUDIO" ] || return 0 @@ -266,10 +258,6 @@ bl_directaudio() { echo "droiddeck-proton: DirectAudio left off - it is built for Wine 11 and this Proton is '${version:-unknown}'. Pairing them would be silent rather than broken, so it is not worth guessing." >&2 return 0 fi - # Two builds of the driver ship, one per Wine audio interface, and both Wines call themselves - # 11.0: the private mmdevapi table is not versioned, and the wrong set plays silence, not an - # error. Proton's own winepulse.so tells them apart - it imports PsCreateSystemThread only on - # the system-thread table (Proton-CachyOS), never on the classic one (Valve, GE-Proton). winepulse="$base/files/lib/wine/aarch64-unix/winepulse.so" if [ ! -f "$winepulse" ]; then echo "droiddeck-proton: DirectAudio left off - no winepulse.so to read this Proton's audio interface from" >&2 @@ -281,20 +269,10 @@ bl_directaudio() { echo "droiddeck-proton: DirectAudio left off - no driver set for the $set interface is staged" >&2 return 0 fi - # Wine appends the per-architecture subdirectory to each entry, so the directory holding - # aarch64-unix/ and aarch64-windows/ is what goes here. WINEDLLPATH="$da/lib/wine${WINEDLLPATH:+:$WINEDLLPATH}" export WINEDLLPATH - # Proton-CachyOS's launcher sets WINE_AUDIO_DRIVER=pulse,alsa (setdefault, so an existing value - # wins), and its mmdevapi reads that variable BEFORE the registry - so the selection below was - # being overridden to pulse on every CachyOS game. Valve's and GE's mmdevapi do not read the - # variable at all and take the registry, which is why both are done. A value the user set for - # the game still wins: the per-game environment is applied after this. WINE_AUDIO_DRIVER="directaudio,pulse" export WINE_AUDIO_DRIVER - # mmdevapi only tries the drivers named in the registry; its built-in list is pulse, alsa, oss and - # coreaudio and knows nothing about this one. The key is appended to the prefix's user.reg rather - # than written with `wine reg`, which would start a wineserver here just to set one value. pfx="${STEAM_COMPAT_DATA_PATH:-}/pfx" reg="$pfx/user.reg" if [ -f "$reg" ]; then @@ -311,46 +289,21 @@ bl_directaudio() { elif ! BL_KEY="$key" awk 'index($0, "[") == 1 { inside = index($0, ENVIRON["BL_KEY"] " ") == 1 } inside && index($0, "\\"Audio\\"=") == 1 { last = $0 } END { exit last != "\\"Audio\\"=\\"directaudio,pulse\\"" }' "$reg" 2>/dev/null; then printf '\\n%s %s\\n"Audio"="directaudio,pulse"\\n' "$key" "$(date +%s)" >> "$reg" echo "droiddeck-proton: DirectAudio selected in the prefix" >&2 - # Steam runs this tool several times per launch (getcompatpath, run, waitforexitandrun); a - # wineserver from an earlier verb that still holds the registry saves its own copy on exit - # and drops this line. Said out loud so a game that stays on pulse once is explained; it - # takes on the next launch. (Writing through the live server with a bare `wine reg add` was - # tried and withdrawn: a second Wine invocation inside Steam's launch sequence is not safe.) srv="${BL_WINE_SERVER_BASE:-/tmp/.wine-$(id -u)}/server-$(printf '%x-%x' $(stat -c '%d %i' "$pfx" 2>/dev/null || echo 0 0))/socket" if [ -S "$srv" ]; then echo "droiddeck-proton: a wineserver is already running for this prefix; DirectAudio may only engage on the next launch" >&2 fi fi else - # A prefix that does not exist yet is created by Proton moments from now, after this runs, so - # the value lands on the NEXT launch of that game. Said out loud so a first launch on Proton's - # own audio does not look like a fault. (Having Proton create the prefix from here first was - # tried and withdrawn: a second Proton run inside Steam's launch sequence got the launch - # aborted - Steam games bounced back to their page with a half-made prefix.) echo "droiddeck-proton: no prefix yet - DirectAudio takes effect the next time this game starts" >&2 fi echo "droiddeck-proton: DirectAudio ready (Wine $major, $set)" >&2 } """ -# Resolves the depot at launch time, so the tool can be registered before the depot exists and -# survives the client updating or replacing it. Proton takes its base directory from -# dirname(sys.argv[0]) without resolving it, so it is run from the depot itself. LAUNCHER_SH = """#!/bin/bash -# DroidDeck's Proton ARM64: runs the ARM64 Proton the Steam client downloaded, without the -# Steam Linux Runtime container its own manifest asks for (no user namespaces on Android). verb=$1; shift steam_root=${STEAM_COMPAT_CLIENT_INSTALL_PATH:-${XDG_DATA_HOME:-$HOME/.local/share}/Steam} -# Steam's overlay is preloaded into every game Valve launches, and used to be dropped here: it was -# landing in front of open() and read() on /dev/input, letting Wine open the session's pad and -# answering every read of it with nothing - a controller that never reports, and Wine's HID thread -# spinning a core on it. -# -# Removing it was the wrong cure for an ordering problem. glibc processes LD_PRELOAD BEFORE -# /etc/ld.so.preload, and the interposer lives in the latter, so the overlay was simply ahead of it. -# Naming the interposer first in LD_PRELOAD puts it back in front and the overlay loads as Valve -# intends. That matters beyond the overlay itself: every deviation from the launch Valve ships is a -# difference this runtime would otherwise have to justify. for fake in /usr/local/lib/libfakeinput.so /usr/local/lib/libblsession.so; do if [ -f "$fake" ]; then case ":${LD_PRELOAD:-}:" in @@ -359,9 +312,6 @@ for fake in /usr/local/lib/libfakeinput.so /usr/local/lib/libblsession.so; do esac fi done -# ld.so looks every library up along the game's search path (its own directory, Steam's runtime -# and video directories, Proton's), and under proot each miss is a round trip to the tracer. With -# the fast path, the audit module skips the misses it can prove (tools/proot/fastpath/audit.c). audit=/usr/local/lib/libblaudit.so if [ -n "${PROOT_FP_KEY:-}" ] && [ -f "$audit" ]; then case ":${LD_AUDIT:-}:" in @@ -369,8 +319,6 @@ if [ -n "${PROOT_FP_KEY:-}" ] && [ -f "$audit" ]; then *) LD_AUDIT="$audit${LD_AUDIT:+:$LD_AUDIT}"; export LD_AUDIT ;; esac fi -# The depot this tool is named after, newest across the libraries that hold it; the others in the -# list stand in only when it is missing. depot= libraries=$(printf '%%s\\n' "$steam_root" /mnt/droiddeck-sd; sed -n 's/^[[:space:]]*"path"[[:space:]]*"\\(.*\\)"[[:space:]]*$/\\1/p' "$steam_root/steamapps/libraryfolders.vdf" 2>/dev/null) for name in %s; do @@ -393,7 +341,9 @@ if [ -n "$depot" ]; then bl_directaudio "$depot" bl_game_cpus bl_idtech3 "$@" + bl_vacdiag "$@" bl_libpath + BL_STORE_PROTON="$depot/proton"; export BL_STORE_PROTON bl_store_launch "$@" BL_STORE_ARGS=("$@") bl_run ${BL_TASKSET:-} /usr/local/bin/droiddeck-game-env "$depot/proton" "$verb" "$@" "${BL_EXTRA_ARGS[@]}" @@ -405,20 +355,13 @@ LAUNCHER_TEMPLATE = LAUNCHER_SH def launcher_sh(sources=SOURCES): - # Spliced in after the formatting, never through it: the function body contains ${major%%.*} - # and a % format would eat that into a single %, leaving a shell expansion that silently does - # something else. return (LAUNCHER_TEMPLATE % " ".join('"%s"' % n for n in sources)).replace( "verb=$1; shift", "verb=$1; shift\n" + BL_DIRECTAUDIO_SETUP + BL_GAME_CPUS_SETUP + BL_IDTECH3_SETUP - + BL_COMPONENTS_SETUP + BL_LIBPATH_SETUP + BL_STORE_SETUP, 1) + + BL_VACDIAG_SETUP + BL_COMPONENTS_SETUP + BL_LIBPATH_SETUP + BL_STORE_SETUP, 1) LAUNCHER_SH = launcher_sh() -# A third-party Proton dropped into compatibilitytools.d - GE-Proton, proton-cachyos, anything of -# that shape - is adopted rather than used as shipped, for the same two reasons Valve's ARM64 depot -# is: its manifest declares require_tool_appid, and the client's overlay library has to come out of -# LD_PRELOAD. Its own entry point is left untouched and called through this wrapper. EXTRA_WRAPPER = "droiddeck-proton-wrap" LEGACY_EXTRA_WRAPPER = "bannerlator-proton-wrap" ORIGINAL_SUFFIX = ".droiddeck-orig" @@ -431,16 +374,9 @@ EXTRA_MANIFEST_VDF = """"manifest" "compatmanager_layer_name" "proton" } """ % EXTRA_WRAPPER -# %s is the tool's own entry point, read out of the manifest it shipped with. EXTRA_WRAPPER_SH = """#!/bin/bash -# DroidDeck: runs a Proton installed into compatibilitytools.d without the Steam Linux Runtime -# container its own manifest asks for - pressure-vessel needs unprivileged user namespaces, which -# an Android app does not get, and the launch dies before Proton is reached. verb=$1; shift here=$(dirname "$0") -# See droiddeck-proton: the interposer goes first in LD_PRELOAD rather than the overlay being -# removed, because glibc reads LD_PRELOAD before /etc/ld.so.preload and the overlay was simply -# ahead of it on /dev/input. for fake in /usr/local/lib/libfakeinput.so /usr/local/lib/libblsession.so; do if [ -f "$fake" ]; then case ":${LD_PRELOAD:-}:" in @@ -449,7 +385,6 @@ for fake in /usr/local/lib/libfakeinput.so /usr/local/lib/libblsession.so; do esac fi done -# See droiddeck-proton: library lookups that cannot succeed are skipped with the fast path. audit=/usr/local/lib/libblaudit.so if [ -n "${PROOT_FP_KEY:-}" ] && [ -f "$audit" ]; then case ":${LD_AUDIT:-}:" in @@ -461,12 +396,12 @@ bl_components "$here" bl_directaudio "$here" bl_game_cpus bl_idtech3 "$@" +bl_vacdiag "$@" bl_libpath +BL_STORE_PROTON="$here/%s"; export BL_STORE_PROTON bl_store_launch "$@" BL_STORE_ARGS=("$@") -# Proton takes its base directory from dirname(sys.argv[0]) without resolving it, so it has to be -# started from its own tree. -bl_run ${BL_TASKSET:-} /usr/local/bin/droiddeck-game-env "$here/%s" "$verb" "$@" "${BL_EXTRA_ARGS[@]}" +bl_run ${BL_TASKSET:-} /usr/local/bin/droiddeck-game-env "$BL_STORE_PROTON" "$verb" "$@" "${BL_EXTRA_ARGS[@]}" """ EXTRA_COMPAT_TOOL_VDF = """"compatibilitytools" { @@ -664,8 +599,6 @@ def adopt_extras(tools): manifest = os.path.join(tool_dir, "toolmanifest.vdf") if not os.path.isdir(tool_dir) or not os.path.isfile(manifest): continue - # The shipped manifest is kept, once, and stays the source of the entry point: re-running - # must not read back our own rewritten commandline and wrap the wrapper. original = manifest + ORIGINAL_SUFFIX legacy = manifest + LEGACY_ORIGINAL_SUFFIX if not os.path.isfile(original) and os.path.isfile(legacy): @@ -688,12 +621,10 @@ def adopt_extras(tools): name = first_key(compat_vdf, ["compatibilitytools", "compat_tools"]) or entry wrapper = os.path.join(tool_dir, EXTRA_WRAPPER) try: - # Formatted first, spliced second: the function carries a printf %s and a - # ${major%%.*} of its own, and putting it through the format would eat both. body = (EXTRA_WRAPPER_SH % entry_point).replace( 'here=$(dirname "$0")', 'here=$(dirname "$0")\n' + BL_DIRECTAUDIO_SETUP + BL_GAME_CPUS_SETUP + BL_IDTECH3_SETUP - + BL_COMPONENTS_SETUP + BL_LIBPATH_SETUP + BL_STORE_SETUP, 1) + + BL_VACDIAG_SETUP + BL_COMPONENTS_SETUP + BL_LIBPATH_SETUP + BL_STORE_SETUP, 1) write_changed(wrapper, body, 0o755) write_changed(manifest, EXTRA_MANIFEST_VDF) write_changed(compat_vdf, EXTRA_COMPAT_TOOL_VDF % (name, display_name(entry))) @@ -707,19 +638,17 @@ def adopt_extras(tools): return adopted -# Steam's own tools and runtimes live in steamapps beside the games; they are not titles and must -# not be mapped to a compatibility tool. NOT_GAMES = frozenset(( - "228980", # Steamworks Common Redistributables - "1070560", # Steam Linux Runtime 1.0 (scout) - "1391110", # Steam Linux Runtime 2.0 (soldier) - "1628350", # Steam Linux Runtime 3.0 (sniper) - "1493710", # Proton Experimental - "3127680", # FEX - "4183110", # Steam Linux Runtime 4.0 - "4185400", # Steam Linux Runtime 4.0 - Arm64 - "4427310", # Proton Experimental (ARM64) - "4628740", # Proton 11.0 (ARM64) + "228980", + "1070560", + "1391110", + "1628350", + "1493710", + "3127680", + "4183110", + "4185400", + "4427310", + "4628740", )) @@ -769,6 +698,26 @@ def launch_programs(config): return found +def launch_options(config): + """An app's launch options as Steam lists them: executable, arguments, working folder, type and oslist.""" + launch = config.get("launch") if isinstance(config, dict) else None + found = [] + for key, option in launch.items() if isinstance(launch, dict) else (): + if not isinstance(option, dict) or not option.get("executable"): + continue + settings = option.get("config") if isinstance(option.get("config"), dict) else {} + found.append({ + "key": str(key), + "executable": str(option["executable"]), + "arguments": str(option.get("arguments", "")), + "workingdir": str(option.get("workingdir", "")), + "type": str(option.get("type", "")).lower(), + "oslist": str(settings.get("oslist", "")).lower(), + "betakey": str(settings.get("betakey", "")), + }) + return found + + def appinfo_entries(path): import struct try: @@ -860,6 +809,7 @@ def appinfo_entries(path): "type": str(common.get("type", "")).lower(), "recommended": str(recommended), "launch": launch_programs(info.get("config")), + "launch_options": launch_options(info.get("config")), } if app == STEAM_PLAY_MANIFESTS: extended = info.get("extended", {}) @@ -896,17 +846,46 @@ def native_targets(steam_root, apps): return {} targets = {} for app, (oslist, osarch, kind) in appinfo_platforms(os.path.join(steam_root, "appcache", "appinfo.vdf"), wanted).items(): - if kind not in PLAYABLE_TYPES or "windows" in oslist or "linux" not in oslist: + if kind not in PLAYABLE_TYPES or "linux" not in oslist: continue if "arm64" in osarch or "aarch64" in osarch: + targets[app] = None + continue + if "windows" in oslist: + targets[app] = NATIVE_CHOICE continue targets[app] = FEX_TOOL return targets -def linux_runtime_tool(name): - low = name.lower() - return low == "fex" or low.startswith("steamlinuxruntime") +def app_manifest(steam_root, app): + for library in libraries(steam_root): + try: + with open(os.path.join(library, "steamapps", "appmanifest_%s.acf" % app), encoding="utf-8", errors="replace") as f: + return tokenize(f.read()) + except OSError: + continue + return None + + +def manifest_flags(tokens): + for i in range(len(tokens) - 1): + if tokens[i].lower() == '"stateflags"': + value = tokens[i + 1].strip('"') + return int(value) if value.isdigit() else 0 + return 0 + + +def tool_downloads(steam_root): + """(app, "install" or "update") for each tool the client has yet to install or bring up to date.""" + wanted = [] + for app in REQUIRED_TOOLS: + tokens = app_manifest(steam_root, app) + if tokens is None: + wanted.append((app, "install")) + elif not manifest_flags(tokens) & FULLY_INSTALLED or manifest_flags(tokens) & UPDATE_REQUIRED: + wanted.append((app, "update")) + return wanted def fex_missing(steam_root): @@ -985,21 +964,56 @@ def app_order(app): return (len(app), app) -def plan_mapping(current, installed, runnable, default, auto, native=None, picks=()): +DEFERRED_GAME_TOOL = object() +NATIVE_CHOICE = object() + + +def plan_mapping(current, installed, runnable, default, auto, native=None, picks=(), overrides=None, managed=None, + native_choices=()): runnable = {n.lower() for n in runnable} installed = set(installed) picks = set(picks) native = native or {} + overrides = overrides or {} + managed = set(auto) if managed is None else set(managed) + native_choices = set(native_choices) changes, kept = {}, {} if current.get("0", "") != default: changes["0"] = default - for app in sorted((set(current) | installed | picks | set(auto)) - {"0"}, key=app_order): + for app in sorted((set(current) | installed | picks | set(auto) | set(overrides) | native_choices) - {"0"}, key=app_order): name = current.get(app, "") + if app in overrides: + target = overrides[app] + if target is DEFERRED_GAME_TOOL: + continue + target = target or default + if name != target: + changes[app] = target + if overrides[app] is None: + kept[app] = target + continue mine = auto.get(app) target = native.get(app, default) - stale = unrunnable(name, runnable) or (app in native and linux_runtime_tool(name)) + if not name and app in native_choices: + target = NATIVE_CHOICE + stale = unrunnable(name, runnable) if name and not stale and (mine is None or name != mine): continue + if target is NATIVE_CHOICE: + if not name and (app in native_choices or app in current or app in managed): + kept[app] = NATIVE_CHOICE + continue + target = default + if target is None: + if stale: + target = default + if name != target: + changes[app] = target + continue + else: + if name and app in managed and name == mine: + changes[app] = None + continue if not name and app not in installed and app not in picks: continue if name != target: @@ -1053,6 +1067,34 @@ def requested_tool(request, catalog): return None +def game_requests(directory=None): + value = read_json(state_path("games.json", directory)) + if value.get("version") != 1 or not isinstance(value.get("games"), dict): + return {} + return value["games"] + + +def requested_games(requests, catalog, runnable=None): + """App id -> requested tool, None for inherit, or DEFERRED_GAME_TOOL while unavailable.""" + runnable = None if runnable is None else set(runnable) + resolved = {} + for app, request in requests.items(): + if not isinstance(app, str) or not re.fullmatch(r"[1-9][0-9]*", app) or int(app) > 0xFFFFFFFF: + continue + if request is None: + resolved[app] = None + continue + if (not isinstance(request, dict) or not isinstance(request.get("dir"), str) or + not request["dir"] or not isinstance(request.get("valve"), bool)): + continue + tool = requested_tool(request, catalog) + if tool is None or runnable is not None and tool not in runnable: + resolved[app] = DEFERRED_GAME_TOOL + else: + resolved[app] = tool + return resolved + + def now_ms(): import time return int(time.time() * 1000) @@ -1110,8 +1152,37 @@ def read_mapping(tokens, mapping): return current +def read_config_mapping(config_path): + """Read per-app choices without creating or rewriting the client's mapping block.""" + try: + with open(config_path, encoding="utf-8", errors="replace") as f: + tokens = tokenize(f.read()) + except OSError: + return None + depth = 0 + for token in tokens: + if token == "{": + depth += 1 + elif token == "}": + depth -= 1 + if depth < 0: + return None + if depth != 0: + return None + steam = find_block(tokens, ["InstallConfigStore", "Software", "Valve", "Steam"]) + if steam is None: + return None + mapping = find_block(tokens[steam + 1:], ["CompatToolMapping"]) + return read_mapping(tokens, mapping + steam + 1) if mapping is not None else {} + + def set_mapping(tokens, mapping, app, tool): block = find_block(tokens[mapping + 1:], [app]) + if tool is None: + if block is not None: + block += mapping + 1 + del tokens[block - 1:block_end(tokens, block) + 1] + return if block is None: tokens[mapping + 1:mapping + 1] = [ '"%s"' % app, "{", '"name"', '"%s"' % tool, '"config"', '""', '"priority"', '"75"' if app == "0" else '"250"', "}"] @@ -1141,6 +1212,21 @@ def steam_running(): return False +def game_running(): + try: + pids = [p for p in os.listdir("/proc") if p.isdigit()] + except OSError: + return False + for pid in pids: + try: + with open("/proc/%s/cmdline" % pid, "rb") as f: + if b"\0SteamLaunch\0AppId=" in f.read(): + return True + except OSError: + continue + return False + + def live_helper_running(directory=None): try: with open(state_path("live.pid", directory)) as f: @@ -1151,7 +1237,8 @@ def live_helper_running(directory=None): return False -def register_default(config_path, apps=(), protect=(), default=None, catalog=None, directory=None, settle=False, picks=()): +def register_default(config_path, apps=(), protect=(), default=None, catalog=None, directory=None, settle=False, picks=(), + linux_tool=FEX_TOOL): """Writes the mapping: the "0" default and every title that follows it (see plan_mapping). With settle, the default itself is decided first (see choose_default): before the client starts, config.vdf holds what the client last kept, menu changes included.""" @@ -1174,13 +1261,23 @@ def register_default(config_path, apps=(), protect=(), default=None, catalog=Non else: default = state.get("default") if state.get("default") in names else TOOL steam_root = os.path.dirname(os.path.dirname(os.path.abspath(config_path))) - changes, auto = plan_mapping(current, apps, names, default, followers(state, current), native_targets(steam_root, apps), picks) + overrides = requested_games(game_requests(directory), catalog) + managed = state.get("auto", {}).keys() if isinstance(state.get("auto"), dict) else () + native_choices = state.get("native_choices", ()) + native = native_targets(steam_root, set(apps) | set(picks) | set(managed) | set(native_choices)) + if linux_tool != FEX_TOOL: + native = {app: linux_tool if tool == FEX_TOOL else tool for app, tool in native.items()} + changes, auto = plan_mapping( + current, apps, names, default, followers(state, current), native, picks, + overrides, managed, native_choices) for app, tool in changes.items(): set_mapping(tokens, mapping, app, tool) text = serialize(tokens) if text != serialize(tokenize(original)): write_changed(config_path, text) - state["auto"] = auto + state["auto"] = {app: tool for app, tool in auto.items() if tool is not NATIVE_CHOICE} + state["native_choices"] = sorted(app for app, tool in auto.items() if tool is NATIVE_CHOICE) + state.pop("native", None) state["tools"] = catalog state.setdefault("default", default) write_json(state_path("state.json", directory), state) @@ -1212,8 +1309,6 @@ def build_tool(tool_dir, depot, sources=SOURCES, name=TOOL): if os.path.islink(tool_dir): os.unlink(tool_dir) elif os.path.isdir(tool_dir) and set(os.listdir(tool_dir)) - set(OWN_FILES): - # Earlier versions mirrored the depot in here as symlinks; start clean. A directory holding - # only our own files is kept, and each file rewritten only when it changed. shutil.rmtree(tool_dir) os.makedirs(tool_dir, exist_ok=True) write_changed(os.path.join(tool_dir, "toolmanifest.vdf"), TOOL_MANIFEST_VDF) @@ -1238,8 +1333,71 @@ def remove_tool(tool_dir): shutil.rmtree(tool_dir) +def local_tools(steam_root): + """The names of the compatibility tools installed in steam_root/compatibilitytools.d.""" + names = set() + tools = os.path.join(steam_root, "compatibilitytools.d") + try: + entries = os.listdir(tools) + except OSError: + return names + for entry in entries: + try: + with open(os.path.join(tools, entry, "compatibilitytool.vdf"), encoding="utf-8", errors="replace") as f: + m = re.search(r'"compat_tools"\s*\{\s*"([^"]+)"', f.read()) + except OSError: + continue + if m: + names.add(m.group(1).lower()) + return names + + +def x64_repoint(steam_root, tool, live=False): + """The x86-64 client (droiddeck-steam-x64): its tools are arm64 wrappers that script makes and + its Linux titles run as Linux builds (FEX), so only the entries the client aimed at a Proton it + cannot start are repointed, to `tool`. Tools in its own compatibilitytools.d are kept: the + wrappers include proton-cachyos-*-a64, which starts with "proton" like Valve's own. + Returns the app ids repointed.""" + config = os.path.join(steam_root, "config", "config.vdf") + if not tool or not os.path.isfile(config): + return [] + with open(config, encoding="utf-8", errors="replace") as f: + original = f.read() + tokens = tokenize(original) + mapping = mapping_block(tokens) + if mapping is None: + return [] + keep = local_tools(steam_root) + moved = [] + current = read_mapping(tokens, mapping) + if "0" not in current: + set_mapping(tokens, mapping, "0", tool) + for app, name in current.items(): + named = name.lower() + # A tool named arm64 is never this client's (its wrappers are -a64), so this legacy name is always repointed. + legacy = named == "droiddeck-proton-arm64" + if (named.startswith("proton") or legacy) and named != tool.lower() \ + and (legacy or named not in keep): + set_mapping(tokens, mapping, app, tool) + if app != "0": + moved.append(app) + text = serialize(tokens) + if text != serialize(tokenize(original)): + write_changed(config, text) + print("steam-compatibility: x86-64 client's Proton entries point at %s" % tool) + # Steam reads a mapping changed while it runs only at its next start; the session restarts it (.bl-compat-pending). + if moved and live: + with open(os.path.join(os.path.expanduser("~"), ".bl-compat-pending"), "a") as f: + f.write("".join("%s\n" % a for a in moved)) + print("steam-compatibility: repointed while the client runs: %s" % " ".join(moved)) + return moved + + def main(): steam_root = sys.argv[1] + if "--x64" in sys.argv[2:]: + x64_repoint(steam_root, os.environ.get("BL_COMPAT_TOOL"), "--live" in sys.argv[2:]) + return tools = os.path.join(steam_root, "compatibilitytools.d") os.makedirs(tools, exist_ok=True) legacy = os.path.join(tools, LEGACY_TOOL) diff --git a/tools/linuxfs/preload/binfmt.c b/tools/linuxfs/preload/binfmt.c index 6592a8d5ee..7aee2ee2fa 100644 --- a/tools/linuxfs/preload/binfmt.c +++ b/tools/linuxfs/preload/binfmt.c @@ -1,11 +1,3 @@ -/* - * binfmt_misc for the desktop, which proot does not have: an exec of an x86 Linux program, a Windows - * program, or a program or script on noexec shared storage goes to droiddeck-open --exec, which runs - * it under FEX, Proton or its interpreter. x86 and Windows programs are caught before the exec: proot - * loads a static x86 program as a native one, which dies on its first instruction, and execvp runs a - * Windows program as a shell script. A program on noexec storage also passes access(X_OK), which KIO - * and Qt ask before they start one. Only in the desktop session. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <elf.h> @@ -27,7 +19,6 @@ typedef int (*spawn_fn)(pid_t *, const char *, const posix_spawn_file_actions_t *, const posix_spawnattr_t *, char *const[], char *const[]); -/* BINFMT_TEST: tools/tests builds it for the host, whose own x86 programs stand in for foreign ones. */ #if defined(__aarch64__) || defined(BINFMT_TEST) static int desktop(void) { @@ -35,7 +26,6 @@ static int desktop(void) { return value && value[0] == '1' && value[1] == 0; } -/* 1: x86 program or noexec storage, 2: Windows program, 3: script; 0 for anything else. */ static int foreign(const char *path, int error) { if (!path || !strcmp(path, BINFMT_HANDLER)) return 0; int fd = open(path, O_RDONLY | O_CLOEXEC); @@ -52,7 +42,6 @@ static int foreign(const char *path, int error) { } else if (n >= 2 && head[0] == '#' && head[1] == '!' && error == EACCES) { kind = 3; } - /* What the kernel refuses for its permissions stays refused; noexec storage has no execute bits to give. */ struct statvfs vfs; int allowed = kind && (((st.st_mode & 0111) && error != EACCES) || (fstatvfs(fd, &vfs) == 0 && (vfs.f_flag & ST_NOEXEC))); close(fd); @@ -63,7 +52,6 @@ static int wanted(const char *path, int error) { return (error == ENOEXEC || error == ENOENT || error == EACCES) && desktop() && foreign(path, error); } -/* The program on PATH as execvp would find it, into [out]. */ static int lookup(const char *file, char *out, size_t size) { if (!file || !*file) return 0; if (strchr(file, '/')) return snprintf(out, size, "%s", file) < (int)size; @@ -111,19 +99,16 @@ static int spawn_handler(pid_t *pid, const char *path, const posix_spawn_file_ac return real(pid, BINFMT_HANDLER, fa, attr, args, envp); } -/* Before an exec of [path]: an x86 or Windows program goes to the handler instead. */ __attribute__((visibility("hidden"))) void bl_binfmt_before(const char *path, char *const argv[], char *const envp[]) { if (desktop() && foreign(path, ENOEXEC)) hand_off(path, argv, envp); } -/* After a failed exec of [path]: the handler takes it over, or the exec's own error stands. */ __attribute__((visibility("hidden"))) int bl_binfmt_retry(const char *path, char *const argv[], char *const envp[], int error) { if (wanted(path, error)) hand_off(path, argv, envp); errno = error; return -1; } -/* The same around execvp, for the program it finds on PATH. */ __attribute__((visibility("hidden"))) void bl_binfmt_before_search(const char *file, char *const argv[], char *const envp[]) { char path[PATH_MAX]; if (desktop() && lookup(file, path, sizeof path)) bl_binfmt_before(path, argv, envp); @@ -136,7 +121,6 @@ __attribute__((visibility("hidden"))) int bl_binfmt_after_search(const char *fil return -1; } -/* After access(X_OK) of [path] was refused (pathcache.c): a program on noexec storage runs all the same. */ __attribute__((visibility("hidden"))) int bl_binfmt_runnable(const char *path, int mode) { if (mode != X_OK || !desktop()) return 0; int runs = foreign(path, EACCES) != 0; diff --git a/tools/linuxfs/preload/dircache.c b/tools/linuxfs/preload/dircache.c index baf0ada12e..7d6cffd124 100644 --- a/tools/linuxfs/preload/dircache.c +++ b/tools/linuxfs/preload/dircache.c @@ -1,10 +1,3 @@ -/* - * The Steam client lists a whole content directory about ten times per file it creates, moves or - * deletes, to match names case-insensitively. On Android's FUSE storage that made reserving space - * quadratic. Listings under steamapps/ on FUSE are kept for at most DIR_TTL_NS and dropped on any - * inotify event the client's own patched changes don't account for; directory timestamps alone - * can't be trusted, as NTFS volumes report whole seconds. BL_NO_DIR_CACHE=1 turns it off. - */ #define _GNU_SOURCE #include <dirent.h> #include <dlfcn.h> @@ -32,7 +25,6 @@ #define FUSE_MAGIC 0x65735546 #define WATCHED (IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_MOVED_TO | IN_DELETE_SELF | IN_MOVE_SELF | IN_ONLYDIR) -/* The client is 64-bit; 32-bit builds only pass creates through. */ #if __SIZEOF_POINTER__ == 8 _Static_assert(sizeof(struct dirent) == sizeof(struct dirent64), "dirent layouts differ"); @@ -88,7 +80,6 @@ static long long now_ns(void) { return (long long)t.tv_sec * 1000000000LL + t.tv_nsec; } -/* A child shares the parent's inotify queue, so it stops keeping listings. */ static void after_fork(void) { pthread_mutex_init(&lock, NULL); pthread_mutex_init(&oplock, NULL); @@ -100,7 +91,8 @@ static int enabled(void) { if (cached < 0) { const char *off = getenv("BL_NO_DIR_CACHE"); cached = strcmp(program_invocation_short_name, "steam") == 0 && - strstr(program_invocation_name, "steamrtarm64") != NULL && !(off && strcmp(off, "1") == 0); + (strstr(program_invocation_name, "steamrtarm64") != NULL || + strstr(program_invocation_name, "steamrt64") != NULL) && !(off && strcmp(off, "1") == 0); if (cached) pthread_atfork(NULL, NULL, after_fork); } return cached && !forked; @@ -162,7 +154,6 @@ static void unref(struct listing *l) { if (--l->refs == 0 && l->detached) destroy(l); } -/* The rest is called with lock held. */ static void release(int wd) { if (wd < 0 || notify < 0) return; @@ -179,7 +170,6 @@ static void detach(struct listing *l) { if (l->refs == 0) destroy(l); } -/* Takes the listing out of the table; freed now or when its last reader closes. */ static void drop(int slot) { struct listing *l = table[slot]; int wd = l->wd; @@ -195,7 +185,6 @@ static void changed(int wd) { if (handles[i] && (handles[i]->wd == wd || wd < 0)) __atomic_store_n(&handles[i]->dirty, 1, __ATOMIC_RELAXED); } -/* Applies queued events; the expected ones are the client's own changes, already patched in. */ static void pump(struct expect *x, int nx) { char buf[4096] __attribute__((aligned(__alignof__(struct inotify_event)))); if (notify < 0 || forked) return; @@ -268,9 +257,10 @@ static void install(struct listing *l) { int slot = find(l->dev, l->ino); if (slot >= 0) { struct listing *old = table[slot]; + int old_wd = old->wd; table[slot] = l; detach(old); - if (old->wd != l->wd) release(old->wd); + if (old_wd != l->wd) release(old_wd); return; } int victim = -1; @@ -302,7 +292,6 @@ static DIR *wrap(struct handle *h) { #define RECLEN(namelen) ((offsetof(struct dirent64, d_name) + (namelen) + 1 + 7) & ~(size_t)7) -/* The listing as packed dirent64 records, built once per version. */ static int records(struct listing *l) { if (l->recs) return 0; size_t len = 0; @@ -326,7 +315,6 @@ static int records(struct listing *l) { return 0; } -/* Lock-free from here on unless noted: a stream is only ever used by one thread at a time. */ static struct handle *lookup(DIR *d) { return registered(d) >= 0 ? (struct handle *)d : NULL; @@ -356,7 +344,6 @@ REAL(symlink); REAL(readdir64_r); REAL(readdir_r); -/* Resolved before the client starts threads; the calls below only fill gaps for earlier callers. */ __attribute__((constructor)) static void resolve(void) { NEXT(opendir); NEXT(readdir64); @@ -378,7 +365,6 @@ __attribute__((constructor)) static void resolve(void) { } #pragma GCC diagnostic pop -/* A reader of the kept listing when it is still current. */ static DIR *hit(const struct stat *st, struct handle *h, long long now) { pthread_mutex_lock(&lock); if (!changing) pump(NULL, 0); @@ -401,7 +387,6 @@ static DIR *hit(const struct stat *st, struct handle *h, long long now) { return NULL; } -/* Registers the stream and its watch before anything is read, so no change goes unseen. */ static int track(struct handle *h, const char *path) { pthread_mutex_lock(&lock); h->wd = watch(path); @@ -411,7 +396,6 @@ static int track(struct handle *h, const char *path) { return d != NULL; } -/* Reads through the real stream, keeping what it returns. */ static void filling(struct handle *h, DIR *real, const struct stat *st, long long now) { h->real = real; h->fill = calloc(1, sizeof(*h->fill)); @@ -625,7 +609,6 @@ static int watching(const char *path) { return eligible(path) && __atomic_load_n(&cached_listings, __ATOMIC_ACQUIRE) > 0; } -/* Called with oplock held: the client's tracked changes happen one at a time. */ static void begin(void) { pthread_mutex_lock(&lock); pump(NULL, 0); @@ -639,7 +622,6 @@ static void before(struct side *s) { enum { ADDED, REMOVED }; -/* Patches the listing after the client's own change, or drops it when unsure. Called with lock held. */ static int patch(struct side *s, int what, uint32_t event, int ok, int error, const char *target, struct expect *x) { struct stat now; if (!s->known) return 0; @@ -795,7 +777,6 @@ ONE_PATH(remove, REMOVED, IN_DELETE, next_remove(path)) return r; \ } -/* A refused hard link to a lock file is taken as a symlink (links.c). */ int bl_link_lock(const char *oldpath, const char *newpath, int result) __attribute__((visibility("hidden"))); static int link_or_lock(const char *from, const char *to) { return bl_link_lock(from, to, next_link(from, to)); } diff --git a/tools/linuxfs/preload/drm.c b/tools/linuxfs/preload/drm.c index bb4374be09..101512387f 100644 --- a/tools/linuxfs/preload/drm.c +++ b/tools/linuxfs/preload/drm.c @@ -1,10 +1,3 @@ -/* - * GEM handle emulation for the KGSL device presented as a DRM render node. - * - * Compositors and Mesa validate or convert dma-bufs with PRIME ioctls on the render node; KGSL - * has no GEM. Handles only serve as tokens to these callers, so a table of duplicated dma-buf - * descriptors stands in for the kernel's, and every other device is left to libdrm. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> @@ -19,7 +12,6 @@ #define MAX_HANDLES 4096 -/* DRM_IOCTL_GEM_CLOSE from drm.h: _IOW('d', 0x09, struct drm_gem_close { u32 handle, pad; }). */ struct gem_close { uint32_t handle; uint32_t pad; @@ -36,7 +28,7 @@ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; static struct handle_entry handle_entries[MAX_HANDLES]; static uint32_t next_handle = 1; static dev_t kgsl_dev; -static int kgsl_state; /* 0 unknown, 1 known, -1 absent */ +static int kgsl_state; static int is_kgsl(int fd) { struct stat st; @@ -63,7 +55,7 @@ static int same_file_description(int a, int b) { } #ifdef SYS_kcmp int saved_errno = errno; - long ret = syscall(SYS_kcmp, getpid(), getpid(), 0 /* KCMP_FILE */, a, b); + long ret = syscall(SYS_kcmp, getpid(), getpid(), 0 , a, b); errno = saved_errno; return ret == 0; #else @@ -81,11 +73,6 @@ static int find_handle_locked(int fd, uint32_t handle) { return -1; } -/* - * The old table used its slot index as the public handle. Once #275 started freeing slots, - * rapidly recreated swapchains immediately reused those numbers. Keep storage slots reusable but - * make the public token monotonic so a stale handle can fail instead of aliasing a newer buffer. - */ static uint32_t alloc_handle_locked(void) { for (int tries = 0; tries <= MAX_HANDLES; tries++) { uint32_t candidate = next_handle++; @@ -157,7 +144,6 @@ int drmPrimeHandleToFD(int fd, uint32_t handle, uint32_t flags, int *prime_fd) { return ret; } -/* Drops only a handle belonging to this KGSL file description. */ static int release_handle(int fd, uint32_t handle) { int found = 0; pthread_mutex_lock(&lock); @@ -179,16 +165,6 @@ int drmCloseBufferHandle(int fd, uint32_t handle) { return release_handle(fd, handle) ? 0 : -EINVAL; } -/* - * Zink gives its handles back with the GEM_CLOSE ioctl itself, not drmCloseBufferHandle - * (zink_bo.c, bo_destroy). KGSL refuses the ioctl, so the duplicated descriptor stayed open and - * kept the whole buffer alive. Preserve #275's reclamation without letting another KGSL file - * description release the token or making a new buffer immediately inherit a retired token. - * - * Caught at ioctl() (netif.c), which libdrm's drmIoctl calls, rather than by exporting drmIoctl: - * every session process preloads this library, and exporting drmIoctl from it brought on a - * judder replaying old frames in No Man's Sky on an Adreno 840 even with no handle released. - */ __attribute__((visibility("hidden"))) int bl_drm_gem_close(int fd, unsigned long request, void *arg, int *rc) { if (request != GEM_CLOSE || !arg || !is_kgsl(fd)) { return 0; @@ -202,12 +178,6 @@ __attribute__((visibility("hidden"))) int bl_drm_gem_close(int fd, unsigned long return 1; } -/* - * fork() carries over only the calling thread, so a lock another thread was holding at that - * instant stays held in the child by a thread that is not there to release it. Taking it before - * the fork makes the copy consistent; the parent then unlocks it and the child, whose one thread - * never locked it, gets a fresh one. (WinNative 79aa7f68.) - */ static void drm_lock_before_fork(void) { pthread_mutex_lock(&lock); } static void drm_unlock_after_fork(void) { pthread_mutex_unlock(&lock); } static void drm_reset_after_fork(void) { pthread_mutex_init(&lock, NULL); } diff --git a/tools/linuxfs/preload/fsync.c b/tools/linuxfs/preload/fsync.c index 844af92b8f..dfcb06979f 100644 --- a/tools/linuxfs/preload/fsync.c +++ b/tools/linuxfs/preload/fsync.c @@ -1,6 +1,3 @@ -/* droiddeck-fsync: futex_waitv(2) in userspace, so Proton's own fsync runs where the app sandbox refuses the syscall. - * Credit: fsync, the futex-based synchronization in Proton, by Elizabeth Figura and Paul Gofman; - * futex_waitv(2) by André Almeida. */ #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> diff --git a/tools/linuxfs/preload/inputudev.c b/tools/linuxfs/preload/inputudev.c index b4ff0b3efa..4960c382da 100644 --- a/tools/linuxfs/preload/inputudev.c +++ b/tools/linuxfs/preload/inputudev.c @@ -1,58 +1,29 @@ /* - * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0, with names - * changed to this project's. The reasoning below is the original author's. - * - * The session's controllers, described to libudev's callers. - * - * The pads are evdev nodes the app backs with its own input rings, bound over /dev/input. Wine's - * HID bus finds them there, but it identifies a node by resolving /sys/class/input/<name> and - * asking libudev about the result: on Android that resolves to whatever real input device the - * host numbered the same, whose device node libudev cannot read, so every pad is discarded before - * its identity is ever looked at. The fallback is Wine's SDL bus, and SDL enumerates through udev - * too, over a netlink socket the app sandbox refuses. A game was left with no controller at all - * while the Steam client, which reads the nodes itself, had one. - * - * So the pads are described here instead: the resolved path is answered for the session's own - * nodes, and libudev's accessors answer for that path from what the app already knows. They carry - * the identity of the pad Steam Input would present if it could - it has no /dev/uinput here to - * make one - which is the one identity Wine's own bus keeps rather than handing on to SDL. - * - * Only Wine's device host is answered, and only for the session's own nodes: the Steam client - * enumerates the same nodes for itself and would take a pad wearing Steam Input's identity for one - * of its own and ignore it. Every other caller, path and device object goes straight through. - * - * With libfakeinput's /dev/uinput stand-in (FAKE_EVDEV_UINPUT=1) Steam Input's own virtual pads - * exist too, as event16 and up, and those are what Wine is meant to read: each is described with - * the identity the client gave it, from the .uevent file libfakeinput writes beside the node. - * While one exists the app's pads are described as what they are, an Xbox 360 controller, which - * Wine's HID bus leaves alone - the game reads Steam Input's output, not the pad under it, as on - * a Steam Deck. With none (Steam Input off for the game) they keep the virtual identity, so the - * game still has a controller. + * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0. */ + #define _GNU_SOURCE #include <dlfcn.h> #include <limits.h> +#include <linux/input.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/ioctl.h> #include <sys/sysmacros.h> #include <sys/types.h> -/* The app opens one ring per configured controller; four is what its launcher offers. Nodes from - * UINPUT_BASE up are the virtual pads made through libfakeinput's /dev/uinput stand-in. */ #define RING_MAX 4 #define UINPUT_BASE 16 #define PAD_MAX 64 #define EVENT_MINOR_BASE 64 -/* BUS_VIRTUAL, and the identity Steam Input gives the gamepad it presents to a game. */ #define PAD_UEVENT_FORMAT \ "PRODUCT=6/28de/11ff/110\n" \ "NAME=\"Generic HID Gamepad %d\"\n" \ "PHYS=\"usb-fakeinput/input%d\"\n" -/* The identity libfakeinput gives the pad itself (FAKE_EVDEV_IDENTITY=xbox360). */ #define PAD_PHYSICAL_UEVENT_FORMAT \ "PRODUCT=3/45e/28e/110\n" \ "NAME=\"Xbox 360 Controller (%d)\"\n" \ @@ -70,11 +41,6 @@ static struct pad pads[PAD_MAX]; static int pad_count; static pthread_mutex_t virtual_lock = PTHREAD_MUTEX_INITIALIZER; -/* - * The slots the app published rings for, named in FAKE_EVDEV_MEMFD_PATHS as "<slot>=<path>" - * separated by semicolons. Without it the process has no pads of the session's and every call - * here is a passthrough. - */ static void discover_pads(void) { const char *spec = getenv("FAKE_EVDEV_MEMFD_PATHS"); const char *entry; @@ -113,7 +79,6 @@ static int uinput_enabled(void) { return enabled != NULL && atoi(enabled) != 0; } -/* Reads the .uevent libfakeinput wrote for virtual pad <node> into buf; 0 when there is none. */ static int read_virtual_uevent(int node, char *buf, size_t size) { const char *dir = getenv("FAKE_EVDEV_DIR"); char path[PATH_MAX]; @@ -138,10 +103,6 @@ static int any_virtual_pad(void) { return 0; } -/* - * Brings the entry for event<node> up to date before Wine resolves it: a virtual pad comes and - * goes with the client, and the app's pads change identity with it. - */ static void refresh_pad(int node) { struct pad *pad; @@ -168,7 +129,6 @@ static void refresh_pad(int node) { pthread_mutex_unlock(&virtual_lock); } -/* The pad a synthetic syspath names, or NULL when the path is not one of ours. */ static struct pad *pad_for_syspath(const char *syspath) { int i; @@ -180,7 +140,6 @@ static struct pad *pad_for_syspath(const char *syspath) { return NULL; } -/* A device object is ours exactly when it is one of the pads. */ static struct pad *pad_for_device(void *device) { int i; @@ -192,7 +151,6 @@ static struct pad *pad_for_device(void *device) { return NULL; } -/* The pad /sys/class/input/<name> stands for, or NULL when the path names something else. */ static struct pad *pad_for_syslink(const char *path) { static const char prefix[] = "/sys/class/input/"; const char *name; @@ -213,7 +171,6 @@ static void *next_symbol(const char *name) { return dlsym(RTLD_NEXT, name); } char *bl_cached_realpath(const char *path, char *resolved, char *(*real)(const char *, char *)) __attribute__((visibility("hidden"))); -/* Wine reaches libudev from its HID bus driver, which is the only caller these pads are for. */ static int caller_is_winebus(void *caller) { Dl_info info; @@ -221,6 +178,24 @@ static int caller_is_winebus(void *caller) { return strstr(info.dli_fname, "winebus.so") != NULL; } +/* Wine's HID haptics give every XInput rumble a 1000 ms cutoff and xinput only writes on a change, + * but XInput motors hold their speed until the next XInputSetState; evdev's length 0 holds until + * stopped. Only this library, preloaded first, sees winebus as the caller. The length is put back + * because winebus compares its copy with the next state to decide whether to upload again. */ +__attribute__((visibility("hidden"))) int bl_winebus_rumble_ioctl(int (*real)(int, unsigned long, void *), int fd, + unsigned long request, void *arg, void *caller, + int *rc) { + struct ff_effect *effect = arg; + __u16 length; + + if (request != EVIOCSFF || effect == NULL || effect->type != FF_RUMBLE || !caller_is_winebus(caller)) return 0; + length = effect->replay.length; + effect->replay.length = 0; + *rc = real(fd, request, arg); + effect->replay.length = length; + return 1; +} + char *realpath(const char *path, char *resolved) { static char *(*real_realpath)(const char *, char *); void *caller = __builtin_return_address(0); @@ -228,7 +203,6 @@ char *realpath(const char *path, char *resolved) { if (pad != NULL) { if (resolved == NULL) return strdup(pad->syspath); - /* PATH_MAX is what the caller promises when it passes a buffer. */ memcpy(resolved, pad->syspath, strlen(pad->syspath) + 1); return resolved; } @@ -336,10 +310,6 @@ dev_t udev_device_get_devnum(void *device) { return real_get(device); } -/* - * A pad has no bus behind it, so it stands in for its own input device and has no other parent. - * The reference is a borrowed one either way. - */ void *udev_device_get_parent_with_subsystem_devtype(void *device, const char *subsystem, const char *devtype) { static void *(*real_get)(void *, const char *, const char *); diff --git a/tools/linuxfs/preload/kgslid.c b/tools/linuxfs/preload/kgslid.c index 3dee629d1f..c909f4618d 100644 --- a/tools/linuxfs/preload/kgslid.c +++ b/tools/linuxfs/preload/kgslid.c @@ -1,16 +1,3 @@ -/* - * Adreno revisions the runtime's Turnip does not know, reported as the revision it does. - * - * Retail SM8850 phones report their A840 as chip_id 0x44050A21 (KGSL gpu_model "Adreno840v2"). - * Mesa only lists 0x44050A31, so the runtime's glibc Turnip refuses the device outright - * ("device (chip_id = 44050A21, gpu_id = 6860) is unsupported") and gamescope exits before Steam - * starts. Banners-Turnip fixes its own builds by registering the v2 id on the same A840 GPU info - * (patches/a840v2.py); answering KGSL's device-info query with the known id has the same effect - * on any Turnip in the session, including the one the runtime was built with. A driver that - * already knows the v2 id resolves the rewritten one to the same entry. - * - * Only the KGSL device-info property is touched. Its layout is the kernel's uapi (msm_kgsl.h). - */ #define _GNU_SOURCE 1 #include <stddef.h> #include <sys/ioctl.h> @@ -38,7 +25,7 @@ static const struct { unsigned int reported; unsigned int known; } CHIP_IDS[] = { - {0x44050A21, 0x44050A31}, /* Adreno 840v2 -> Adreno 840 */ + {0x44050A21, 0x44050A31}, }; void bl_kgsl_chip_id_fixup(unsigned long request, void *arg, int rc) { diff --git a/tools/linuxfs/preload/kgslpoll.c b/tools/linuxfs/preload/kgslpoll.c index 00eb8f01f3..841c049ee1 100644 --- a/tools/linuxfs/preload/kgslpoll.c +++ b/tools/linuxfs/preload/kgslpoll.c @@ -1,19 +1,3 @@ -/* - * A zero-timeout KGSL timestamp wait answered as the poll it was meant to be. - * - * Turnip's KGSL backend emulates timeline semaphores with timestamps, and asks "has this one - * retired yet?" by waiting on it with IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID and a timeout of 0. - * KGSL reads a timeout of 0 as no timeout at all, so the poll blocks until the GPU gets there. - * Mesa's timeline bookkeeping polls like that under a lock on every signalling submit, which put - * vkd3d-proton, DXVK, gamescope and Zink in lock-step with the GPU: one frame queued, never two. - * Found and measured by Bannerlator (PROGRESS_LOG 2026-09-29: a D3D12 demo went from 614 to - * 4335 fps with the same answer given in its Vulkan adapter); the driver-side fix is on - * Banners-Turnip, and this covers the drivers that do not carry it yet. - * - * The answer comes from the context's retired timestamp, compared the way KGSL compares them - * (with wrap-around). Anything the read does not answer - an unknown context, a device that is not - * KGSL - goes to the kernel as before. BL_NO_KGSL_POLL_FIX=1 turns it off. - */ #define _GNU_SOURCE #include <errno.h> #include <stdint.h> @@ -50,7 +34,6 @@ static int enabled(void) { return cached; } -/* True when the call was answered here, with its result in *rc (and errno set on failure). */ __attribute__((visibility("hidden"))) int bl_kgsl_poll(int (*real)(int, unsigned long, void *), int fd, unsigned long request, void *arg, int *rc) { diff --git a/tools/linuxfs/preload/links.c b/tools/linuxfs/preload/links.c index 7a963205b1..350990b61d 100644 --- a/tools/linuxfs/preload/links.c +++ b/tools/linuxfs/preload/links.c @@ -1,22 +1,3 @@ -/* - * Lock files taken by hard link, which Android denies apps. - * - * libICE and libXau lock an authority file the classic way: create "<file>-c", then link() it to - * "<file>-l" - the link either appears or fails because the other holder's is there. Android's - * SELinux policy refuses hard links in an app's data, so the link fails for everyone, the lock is - * never taken, and Plasma's session manager gives up at "Could not lock ICEAuthority file". With - * no session manager there is no Plasma desktop. - * - * Only that convention is answered here: when the real link is refused and the new name ends in - * "-l", a symlink stands in. Creating a symlink fails on an existing name just as a link does, so - * the lock excludes as before, and the holder removes both names when it is done. Every other - * link keeps the real answer: a program that links a file into place and then deletes the - * original would be left with a dangling symlink. - * - * That pattern itself is answered for one caller that asks: with DROIDDECK_LINK_RENAME=1 (the - * session sets it for localedef, which names a finished locale archive that way) a refused link - * becomes a rename that will not replace an existing name, which is all the link promised there. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> @@ -38,9 +19,7 @@ static int lock_name(const char *path) { return n > 2 && strcmp(path + n - 2, "-l") == 0; } -/* The answer to link(oldpath, newpath), given the real call's: a refused lock link becomes a symlink. */ __attribute__((visibility("hidden"))) int bl_link_lock(const char *oldpath, const char *newpath, int result) { - /* libc's own symlink: dircache.c's wrapper may be holding its lock around this call. */ static int (*real_symlink)(const char *, const char *); if (result == 0 || !refused(errno)) return result; if (moves_instead()) return renameat2(AT_FDCWD, oldpath, AT_FDCWD, newpath, RENAME_NOREPLACE); @@ -49,7 +28,6 @@ __attribute__((visibility("hidden"))) int bl_link_lock(const char *oldpath, cons return real_symlink(oldpath, newpath); } -/* 64-bit builds wrap link() in dircache.c, which hands its result to bl_link_lock. */ #if __SIZEOF_POINTER__ != 8 int link(const char *oldpath, const char *newpath) { static int (*real_link)(const char *, const char *); @@ -64,7 +42,6 @@ int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int result = real_linkat(olddirfd, oldpath, newdirfd, newpath, flags); if (result != 0 && refused(errno) && flags == 0 && moves_instead()) return renameat2(olddirfd, oldpath, newdirfd, newpath, RENAME_NOREPLACE); - /* A relative old name would resolve against the new name's directory as a symlink's target. */ if (result != 0 && refused(errno) && lock_name(newpath) && oldpath[0] == '/' && flags == 0) return symlinkat(oldpath, newdirfd, newpath); return result; diff --git a/tools/linuxfs/preload/lock.c b/tools/linuxfs/preload/lock.c index a11d024e26..b802fded6e 100644 --- a/tools/linuxfs/preload/lock.c +++ b/tools/linuxfs/preload/lock.c @@ -1,24 +1,7 @@ /* - * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0, with names - * changed to this project's. The reasoning below is the original author's. - * - * File locking for the game library on external storage. - * - * The user's games are bound in from /storage/emulated, which Android serves over FUSE, and that - * filesystem implements no locking at all: flock() and fcntl()'s lock commands answer ENOSYS for - * every file under it. The Steam client takes a shared lock on each content file as it validates - * or updates a title and treats the refusal as a failure, so a download walks its progress back - * and forth instead of finishing; a game reading its own data hits the same wall. - * - * Where the kernel can lock, it does: the real call runs first and its answer stands, so files on - * the app's own f2fs storage keep genuine cross-process exclusion. Only the filesystem that cannot - * lock at all is answered here, and granting is the honest reading of it - a filesystem with no - * lock state has nothing to contend over, and the one other party that could contend is inside - * this same session. Reporting failure instead buys no safety and costs the download. - * - * F_GETLK is the exception: it asks who holds a lock, and on a filesystem holding none the true - * answer is "nobody", so it is reported unlocked rather than granted. + * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0. */ + #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> @@ -28,7 +11,6 @@ #include <sys/file.h> #include <unistd.h> -/* The filesystem refuses the whole operation, rather than declining this particular lock. */ static int unsupported(int error) { return error == ENOSYS || error == ENOTSUP || error == EOPNOTSUPP; } @@ -44,12 +26,6 @@ int flock(int fd, int operation) { return result; } -/* - * fcntl()'s third argument is an int, a pointer, or absent depending on the command; only the - * lock commands are of interest here and all of those take a struct flock *. Anything else is - * passed straight through as a void * - wide enough for both an int and a pointer on every ABI - * the runtime is built for. - */ static int is_lock_command(int cmd) { switch (cmd) { case F_SETLK: @@ -104,6 +80,5 @@ int fcntl(int fd, int cmd, ...) { } #if defined(__GLIBC__) && defined(F_SETLK64) -/* glibc's large-file build redirects both names; the runtime is 64-bit, so they are the same call. */ int fcntl64(int fd, int cmd, ...) __attribute__((alias("fcntl"))); #endif diff --git a/tools/linuxfs/preload/net.c b/tools/linuxfs/preload/net.c index 636ba1aead..73b8c9c8b1 100644 --- a/tools/linuxfs/preload/net.c +++ b/tools/linuxfs/preload/net.c @@ -1,11 +1,3 @@ -/* - * Loopback socket ownership for Steam's IPC peer check. - * - * Steam validates a websocket peer by running lsof to find which process owns a 127.0.0.1 port. - * The Android sandbox denies both /proc/net/tcp and sock_diag, so no tool can answer. Every Steam - * process is preloaded with this library, so each records the ports it binds and connects, and the - * lsof Steam spawns is answered from that shared registry instead of being run. - */ #define _GNU_SOURCE #include <arpa/inet.h> #include <spawn.h> @@ -14,6 +6,7 @@ #include <linux/netlink.h> #include <netinet/in.h> #include <stdio.h> +#include <limits.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> @@ -54,8 +47,6 @@ static int loopback_family(const struct sockaddr *address, socklen_t length) { return 0; } -/* Record that this process owns a loopback socket on its local port; peer is the far end's port, - * 0 for a listening socket. */ static void record_port(int fd, unsigned peer) { struct sockaddr_storage ss; socklen_t len = sizeof(ss); @@ -119,7 +110,6 @@ typedef int (*connect_fn)(int, const struct sockaddr *, socklen_t); typedef int (*accept4_fn)(int, struct sockaddr *, socklen_t *, int); static unsigned guarded_port(void); -/* udevmon.c: a stand-in for the netlink socket the sandbox refuses, bound here without the kernel. */ __attribute__((visibility("hidden"))) int bl_udevmon_stand_in(int fd); int bind(int fd, const struct sockaddr *addr, socklen_t len) { @@ -239,7 +229,6 @@ int connect(int fd, const struct sockaddr *addr, socklen_t len) { if (peer) record_port(fd, peer); int ret = real(fd, addr, len); if (ret == 0 || errno == EINPROGRESS) { - /* The caller goes on to test for EINPROGRESS, which the bookkeeping must not disturb. */ int saved = errno; record_port(fd, peer); errno = saved; @@ -267,7 +256,6 @@ int accept(int fd, struct sockaddr *addr, socklen_t *len) { return accept4(fd, addr, len, 0); } -/* binfmt.c: an exec of a program the kernel cannot run, handed to droiddeck-open in the desktop. */ extern char **environ; typedef int (*spawn_fn)(pid_t *, const char *, const posix_spawn_file_actions_t *, const posix_spawnattr_t *, char *const[], char *const[]); @@ -275,12 +263,11 @@ __attribute__((visibility("hidden"))) void bl_binfmt_before(const char *path, ch __attribute__((visibility("hidden"))) int bl_binfmt_retry(const char *path, char *const argv[], char *const envp[], int error); __attribute__((visibility("hidden"))) void bl_binfmt_before_search(const char *file, char *const argv[], char *const envp[]); __attribute__((visibility("hidden"))) int bl_binfmt_after_search(const char *file, char *const argv[], char *const envp[], int error); +__attribute__((visibility("hidden"))) char *const *bl_webhelper_argv(const char *path, char *const argv[]); __attribute__((visibility("hidden"))) int bl_binfmt_spawn(pid_t *pid, const char *path, const posix_spawn_file_actions_t *fa, const posix_spawnattr_t *attr, char *const argv[], char *const envp[], spawn_fn real); -/* lsof would read the denied /proc/net/tcp; answer its -i TCP@host:port query from the registry - * instead of executing it. Recognised only when invoked as lsof with that query. */ static int maybe_answer_lsof(const char *path, char *const argv[]) { const char *base = strrchr(path, '/'); base = base ? base + 1 : path; @@ -302,7 +289,7 @@ static int maybe_answer_lsof(const char *path, char *const argv[]) { snprintf(path_buf, sizeof(path_buf), "%s/p%u", net_dir(), (unsigned)atoi(port_str)); int in = open(path_buf, O_RDONLY); if (in < 0) { - _exit(1); /* lsof exit code for "nothing found" */ + _exit(1); } char buf[64]; int n = read(in, buf, sizeof(buf) - 1); @@ -314,28 +301,53 @@ static int maybe_answer_lsof(const char *path, char *const argv[]) { int pid = 0, ppid = 0, uid = 0; unsigned peer = 0; sscanf(buf, "%d %d %d %u", &pid, &ppid, &uid, &peer); - /* Steam splits the address on "->" and wants exactly two halves, taking the port it asked - * about from the left one; only a listening socket has no far end. */ char out[160]; int m = peer ? snprintf(out, sizeof(out), "p%d\nR%d\nu%d\nn127.0.0.1:%u->127.0.0.1:%u\n", pid, ppid, uid, (unsigned)atoi(port_str), peer) : snprintf(out, sizeof(out), "p%d\nR%d\nu%d\nn127.0.0.1:%u\n", pid, ppid, uid, (unsigned)atoi(port_str)); - if (write(1, out, m) != m) { /* best effort */ } + if (write(1, out, m) != m) { } _exit(0); } -int execve(const char *path, char *const argv[], char *const envp[]) { +static char **web_helper_redirect(const char *path, char *const argv[], const char **launcher) { + const char *want = getenv("BL_X64_ARM_WEBHELPER"); + if (!want || !*want || !path) return NULL; + const char *base = strrchr(path, '/'); + if (strcmp(base ? base + 1 : path, "steamwebhelper") != 0) return NULL; + if (!strstr(path, "/steamrt64/")) { + char cwd[PATH_MAX]; + size_t n; + if (path[0] == '/' || !getcwd(cwd, sizeof(cwd))) return NULL; + n = strlen(cwd); + if (n < 10 || strcmp(cwd + n - 10, "/steamrt64") != 0) return NULL; + } + int argc = 0; + while (argv && argv[argc]) argc++; + char **out = calloc((size_t)argc + 2, sizeof(char *)); + if (!out) return NULL; + out[0] = (char *)want; + for (int i = 1; i < argc; i++) out[i] = argv[i]; + *launcher = want; + return out; +} + +int execve(const char *path, char *const argv_in[], char *const envp[]) { + char *const *argv = bl_webhelper_argv(path, argv_in); static int (*real)(const char *, char *const[], char *const[]); if (!real) real = (int (*)(const char *, char *const[], char *const[]))dlsym(RTLD_NEXT, "execve"); maybe_answer_lsof(path, argv); + const char *launcher = NULL; + char **redirected = web_helper_redirect(path, argv, &launcher); + if (redirected) { + real(launcher, redirected, envp); + free(redirected); + } bl_binfmt_before(path, argv, envp); real(path, argv, envp); return bl_binfmt_retry(path, argv, envp, errno); } -/* popen(3) and posix_spawn(3) reach lsof without going through the execve symbol above. The - * check is cheap, so a spawned lsof is answered here too by handling it in a short-lived child. */ static int answer_lsof_via_spawn(const char *path, char *const argv[], pid_t *pid) { pid_t child = fork(); if (child < 0) { @@ -351,7 +363,8 @@ static int answer_lsof_via_spawn(const char *path, char *const argv[], pid_t *pi return 0; } -int execvp(const char *file, char *const argv[]) { +int execvp(const char *file, char *const argv_in[]) { + char *const *argv = bl_webhelper_argv(file, argv_in); static int (*real)(const char *, char *const[]); if (!real) real = (int (*)(const char *, char *const[]))dlsym(RTLD_NEXT, "execvp"); maybe_answer_lsof(file, argv); @@ -360,10 +373,17 @@ int execvp(const char *file, char *const argv[]) { return bl_binfmt_after_search(file, argv, environ, errno); } -int execv(const char *path, char *const argv[]) { +int execv(const char *path, char *const argv_in[]) { + char *const *argv = bl_webhelper_argv(path, argv_in); static int (*real)(const char *, char *const[]); if (!real) real = (int (*)(const char *, char *const[]))dlsym(RTLD_NEXT, "execv"); maybe_answer_lsof(path, argv); + const char *launcher = NULL; + char **redirected = web_helper_redirect(path, argv, &launcher); + if (redirected) { + real(launcher, redirected); + free(redirected); + } bl_binfmt_before(path, argv, environ); real(path, argv); return bl_binfmt_retry(path, argv, environ, errno); diff --git a/tools/linuxfs/preload/netif.c b/tools/linuxfs/preload/netif.c index 0e394a7e7f..0223f0bb68 100644 --- a/tools/linuxfs/preload/netif.c +++ b/tools/linuxfs/preload/netif.c @@ -1,16 +1,7 @@ /* - * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0, with names - * changed to this project's. The reasoning below is the original author's. - * - * Network interfaces for a sandbox that hides them. - * - * Android denies an app the rtnetlink dump behind getifaddrs() and if_nameindex(), the hardware - * address ioctl, and every table under /proc/net. Wine builds its adapter, address, route and - * neighbour tables from exactly those, so a game saw a machine with no adapter, no address, no - * gateway and no MAC, and one that checks its adapters before going online waited for good. - * The app knows the real link from ConnectivityManager and writes it to /etc/droiddeck-net; - * whatever the kernel refuses is answered from that file. Anything the kernel does answer wins. + * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0. */ + #define _GNU_SOURCE 1 #include <arpa/inet.h> #include <dlfcn.h> @@ -108,9 +99,6 @@ static int fresh(long long *at) { return then != 0 && now_ns() - then < FRESH_NS; } -/* Wine's network driver reads the link several times for each table it builds, and some games - * have it build them all hundreds of times a second. The app rewrites the file when the device - * changes network, so a reading stands for a second. */ static pthread_mutex_t link_lock = PTHREAD_MUTEX_INITIALIZER; static struct link link_read; static int link_ok; @@ -128,7 +116,6 @@ static int load_link(struct link *link) { return ok; } -/* See drm.c: a fork must not leave the lock held by a thread the child does not have. */ static void link_lock_before_fork(void) { pthread_mutex_lock(&link_lock); } static void link_unlock_after_fork(void) { pthread_mutex_unlock(&link_lock); } static void link_reset_after_fork(void) { pthread_mutex_init(&link_lock, NULL); } @@ -137,8 +124,6 @@ __attribute__((constructor)) static void install_link_fork_handlers(void) { pthread_atfork(link_lock_before_fork, link_unlock_after_fork, link_reset_after_fork); } -/* When the kernel's own list was of no use, it is not asked again for a second: each asking binds - * a netlink socket, a stop in the tracer, only to be refused again. */ static long long ifaddrs_unusable_at, nameindex_unusable_at; static void prefix_mask(int family, unsigned prefix, unsigned char *out) { @@ -152,8 +137,6 @@ static int is_link_local(const struct link_addr *addr) { return addr->family == AF_INET6 && addr->bytes[0] == 0xfe && (addr->bytes[1] & 0xc0) == 0x80; } -/* One allocation per list. ifa_data of the head points at the head itself, which glibc never - * does, so freeifaddrs() can tell the two kinds of list apart without keeping any state. */ struct entry { struct ifaddrs ifa; struct sockaddr_storage addr, mask, extra; @@ -246,7 +229,6 @@ int getifaddrs(struct ifaddrs **out) { if (asked) __atomic_store_n(&ifaddrs_unusable_at, now_ns(), __ATOMIC_RELAXED); if (rc == 0 && list) real_freeifaddrs(list); - /* A leading slot keeps fill_entry()'s back link in bounds; the list starts after it. */ struct entry *block = calloc((size_t) link.addr_count + 5, sizeof(*block)); if (block == NULL) { errno = ENOMEM; @@ -277,7 +259,6 @@ void freeifaddrs(struct ifaddrs *list) { real_freeifaddrs(list); } -/* Names live in the same allocation as the array, right behind it; glibc strdup()s each one. */ struct name_block { struct if_nameindex index[3]; char names[2][IFNAMSIZ]; @@ -353,7 +334,6 @@ char *if_indextoname(unsigned int index, char name[IF_NAMESIZE]) { static int mac_unusable(const struct ifreq *ifr) { const unsigned char *a = (const unsigned char *) ifr->ifr_hwaddr.sa_data; if (ifr->ifr_hwaddr.sa_family != ARPHRD_ETHER) return 1; - /* Android hands out 02:00:00:00:00:00 where it hides the real address. */ int rest = a[1] | a[2] | a[3] | a[4] | a[5]; return (a[0] & 0x03) || (rest == 0 && (a[0] == 0 || a[0] == 0x02)); } @@ -420,14 +400,15 @@ static int is_link_query(unsigned long request) { || request == SIOCGIFBRDADDR; } -void bl_kgsl_chip_id_fixup(unsigned long request, void *arg, int rc); /* kgslid.c */ +void bl_kgsl_chip_id_fixup(unsigned long request, void *arg, int rc); +#include "../../quest/kgsl_compat.h" int bl_kgsl_poll(int (*real)(int, unsigned long, void *), int fd, unsigned long request, void *arg, int *rc) __attribute__((visibility("hidden"))); int bl_ntsync_ioctl(int fd, unsigned long request, void *arg, int *rc) __attribute__((visibility("hidden"))); int bl_drm_gem_close(int fd, unsigned long request, void *arg, int *rc) __attribute__((visibility("hidden"))); +int bl_winebus_rumble_ioctl(int (*real)(int, unsigned long, void *), int fd, unsigned long request, + void *arg, void *caller, int *rc) __attribute__((visibility("hidden"))); -/* Every DRM and evdev call comes through here, so the lookup is done once. Two threads racing - * to store it store the same pointer. */ int ioctl(int fd, unsigned long request, ...) { typedef int (*ioctl_fn)(int, unsigned long, void *); static ioctl_fn real; @@ -440,7 +421,8 @@ int ioctl(int fd, unsigned long request, ...) { if (bl_ntsync_ioctl(fd, request, arg, &rc)) return rc; if (bl_drm_gem_close(fd, request, arg, &rc)) return rc; if (real == NULL) real = (ioctl_fn) dlsym(RTLD_NEXT, "ioctl"); - if (!bl_kgsl_poll(real, fd, request, arg, &rc)) rc = real(fd, request, arg); + if (bl_winebus_rumble_ioctl(real, fd, request, arg, __builtin_return_address(0), &rc)) return rc; + if (!bl_kgsl_poll(real, fd, request, arg, &rc)) rc = quest_kgsl_ioctl(real, fd, request, arg); bl_kgsl_chip_id_fixup(request, arg, rc); if (arg == NULL || !is_link_query(request)) return rc; int saved = errno; @@ -537,7 +519,6 @@ static const char *denied_table(const char *path) { return NULL; } -/* A memfd rather than fmemopen(): the stream owns its contents, so fclose() frees everything. */ static FILE *synthesize(const char *table) { struct link link; if (!load_link(&link)) return NULL; @@ -557,12 +538,11 @@ static FILE *synthesize(const char *table) { return out; } -/* tracer.c */ -int bl_status_without_tracer(const char *path, int flags) __attribute__((visibility("hidden"))); +int bl_status_without_tracer(const char *path, int flags, const void *caller) __attribute__((visibility("hidden"))); -static FILE *open_stream(fopen_fn real, const char *path, const char *mode) { +static FILE *open_stream(fopen_fn real, const char *path, const char *mode, const void *caller) { int status = mode && mode[0] == 'r' && !strchr(mode, '+') - ? bl_status_without_tracer(path, O_RDONLY | O_CLOEXEC) : -1; + ? bl_status_without_tracer(path, O_RDONLY | O_CLOEXEC, caller) : -1; if (status >= 0) { FILE *copy = fdopen(status, "r"); if (copy == NULL) close(status); @@ -580,11 +560,11 @@ static FILE *open_stream(fopen_fn real, const char *path, const char *mode) { FILE *fopen(const char *path, const char *mode) { static fopen_fn real; if (real == NULL) real = (fopen_fn) dlsym(RTLD_NEXT, "fopen"); - return open_stream(real, path, mode); + return open_stream(real, path, mode, __builtin_return_address(0)); } FILE *fopen64(const char *path, const char *mode) { static fopen_fn real; if (real == NULL) real = (fopen_fn) dlsym(RTLD_NEXT, "fopen64"); - return open_stream(real, path, mode); + return open_stream(real, path, mode, __builtin_return_address(0)); } diff --git a/tools/linuxfs/preload/noexec.c b/tools/linuxfs/preload/noexec.c index 26aa539b71..0b0326bda6 100644 --- a/tools/linuxfs/preload/noexec.c +++ b/tools/linuxfs/preload/noexec.c @@ -1,9 +1,3 @@ -/* - * noexec.c: FEX runs an x86 program and its libraries where they lie, on noexec shared storage too. - * FEX maps them with the guest's PROT_EXEC, which the kernel refuses for a file on a noexec mount, - * but it never runs those pages itself - it runs its own translation of them - so a mapping or an - * mprotect refused for that alone is made without PROT_EXEC. Only in FEX's own processes. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> @@ -12,7 +6,6 @@ #include <sys/statvfs.h> #include <unistd.h> -/* NOEXEC_TEST: tools/tests builds it for the host. */ #if defined(__aarch64__) || defined(NOEXEC_TEST) static int in_fex(void) { @@ -28,7 +21,6 @@ static int in_fex(void) { return known; } -/* After an mmap failed (fsync.c's mmap asks): whether to map it again without PROT_EXEC. */ __attribute__((visibility("hidden"))) int bl_noexec_retry(int prot, int flags, int fd) { int error = errno; struct statvfs vfs; @@ -40,7 +32,6 @@ __attribute__((visibility("hidden"))) int bl_noexec_retry(int prot, int flags, i static int (*real_mprotect)(void *, size_t, int); -/* Looked up before anything runs: Wine calls mprotect from its signal handlers, where dlsym is unsafe. */ __attribute__((constructor)) static void noexec_init(void) { real_mprotect = (int (*)(void *, size_t, int))dlsym(RTLD_NEXT, "mprotect"); } diff --git a/tools/linuxfs/preload/ntsync.c b/tools/linuxfs/preload/ntsync.c index dc21b117f3..69f40a1457 100644 --- a/tools/linuxfs/preload/ntsync.c +++ b/tools/linuxfs/preload/ntsync.c @@ -1,5 +1,3 @@ -/* droiddeck-ntsync: a userspace implementation of the /dev/ntsync interface for kernels without the driver. - * Credit: ntsync, the kernel driver and its Wine client, by Elizabeth Figura. */ #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> @@ -1243,7 +1241,6 @@ int bl_udevmon_recvmsg(int fd, struct msghdr *msg, int flags, ssize_t (*real_rec ssize_t recvmsg(int fd, struct msghdr *msg, int flags) { static ssize_t (*real)(int, struct msghdr *, int); if (!real) real = (ssize_t (*)(int, struct msghdr *, int))dlsym(RTLD_NEXT, "recvmsg"); - /* udevmon.c's stand-in netlink sockets first: their messages are dressed as udevd's. */ ssize_t answered; if (msg && bl_udevmon_recvmsg(fd, msg, flags, real, &answered)) return answered; ssize_t r = real(fd, msg, flags); diff --git a/tools/linuxfs/preload/opens.c b/tools/linuxfs/preload/opens.c index 2e4a687e8d..3d1fdb35af 100644 --- a/tools/linuxfs/preload/opens.c +++ b/tools/linuxfs/preload/opens.c @@ -1,29 +1,7 @@ /* - * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0, with names - * changed to this project's. The reasoning below is the original author's. - * - * The adjustments a session's opens need. - * - * O_NOATIME on the game library: the user's games are bound in from shared storage, which Android - * serves over FUSE with every file owned by its media provider rather than by the app. O_NOATIME - * is reserved for a file's owner, so the kernel refuses such an open outright with EPERM. The - * Steam client opens every content file it reads that way, and treats the refusal as the file - * being unreadable or missing: a validation reports corrupt or missing files and an update is - * cancelled. The flag only asks the filesystem to skip an access-time update; the open is retried - * without it. Every other refusal is passed through untouched, and a file the process may open - * with the flag still is. - * - * The kernel's trace marker: tracefs is world-writable here, so the client's tier0 opens - * /sys/kernel/tracing/trace_marker at startup - three times over, once per module that profiles - - * and writes a "[%s] tgid=%d begin_ctx=%lld" line for every scope it enters. Nothing in the - * session reads those markers, and they are one more thing that can land in the wrong file when - * a descriptor number changes hands (tracer.c has the cause). They have been found appended to an - * app manifest, which the client then cannot parse, to a download's state file, and to content - * chunks, which it quarantines as corrupt. Refused the descriptor, tier0 writes nothing at all and - * has nothing to lose. - * - * A process status is served without the container's tracer in it; see tracer.c. + * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0. */ + #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> @@ -33,7 +11,7 @@ #include <string.h> #include <sys/types.h> -int bl_status_without_tracer(const char *path, int flags) __attribute__((visibility("hidden"))); +int bl_status_without_tracer(const char *path, int flags, const void *caller) __attribute__((visibility("hidden"))); int bl_writable_retry(int dirfd, const char *path, int flags) __attribute__((visibility("hidden"))); int bl_ntsync_open(const char *path, int flags) __attribute__((visibility("hidden"))); int bl_dircache_create(int dirfd, const char *path, int flags, mode_t mode, @@ -55,7 +33,6 @@ static int retry_without_noatime(int fd, int flags) { return fd < 0 && errno == EPERM && (flags & O_NOATIME); } -/* Both spellings tier0 tries, the debugfs one first. */ static int is_trace_marker(const char *path) { return path != NULL && (strcmp(path, "/sys/kernel/tracing/trace_marker") == 0 @@ -74,7 +51,7 @@ int open(const char *path, int flags, ...) { errno = EACCES; return -1; } - if ((fd = bl_status_without_tracer(path, flags)) >= 0) return fd; + if ((fd = bl_status_without_tracer(path, flags, __builtin_return_address(0))) >= 0) return fd; if ((fd = bl_ntsync_open(path, flags)) != -2) return fd; if (real_open == NULL) real_open = dlsym(RTLD_NEXT, "open"); if (real_open == NULL) { @@ -83,7 +60,6 @@ int open(const char *path, int flags, ...) { } fd = bl_dircache_create(AT_FDCWD, path, flags, mode, via_open); if (retry_without_noatime(fd, flags)) fd = real_open(path, flags & ~O_NOATIME, mode); - /* A read-only file the Steam client rewrites (perms.c). */ if (fd < 0 && bl_writable_retry(AT_FDCWD, path, flags)) fd = real_open(path, flags & ~O_NOATIME, mode); return fd; } @@ -100,7 +76,7 @@ int openat(int dirfd, const char *path, int flags, ...) { errno = EACCES; return -1; } - if ((fd = bl_status_without_tracer(path, flags)) >= 0) return fd; + if ((fd = bl_status_without_tracer(path, flags, __builtin_return_address(0))) >= 0) return fd; if ((fd = bl_ntsync_open(path, flags)) != -2) return fd; if (real_openat == NULL) real_openat = dlsym(RTLD_NEXT, "openat"); if (real_openat == NULL) { @@ -113,6 +89,5 @@ int openat(int dirfd, const char *path, int flags, ...) { return fd; } -/* The runtime is 64-bit, so the large-file names are the same calls. */ int open64(const char *path, int flags, ...) __attribute__((alias("open"))); int openat64(int dirfd, const char *path, int flags, ...) __attribute__((alias("openat"))); diff --git a/tools/linuxfs/preload/pathcache.c b/tools/linuxfs/preload/pathcache.c index 0aab91bd7a..7fd4c630a0 100644 --- a/tools/linuxfs/preload/pathcache.c +++ b/tools/linuxfs/preload/pathcache.c @@ -1,18 +1,3 @@ -/* - * Path lookups the Steam client repeats, answered from a short-lived cache. - * - * While it registers its compatibility tools after logon, the client resolves the same few - * directories - its local tools under compatibilitytools.d and its own platform directory - with - * realpath() and access() thousands of times a second. Each realpath() is one readlinkat() per - * path component, and under proot every one of those is a trapped syscall with a round trip - * through the tracer. Measured on an AYN Thor, that loop was 23 of the client's 31 seconds of - * startup, with proot busy for 16 of them. - * - * Only the client itself uses the cache, never a game or a helper. Only successful answers are - * kept, and only for a moment: a path that stops existing is noticed within PATH_CACHE_TTL_NS, and - * one that starts existing is never hidden, since failures always go to the filesystem. - * BL_NO_PATH_CACHE=1 turns it off. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> @@ -57,7 +42,8 @@ static int enabled(void) { if (cached >= 0) return cached; off = getenv("BL_NO_PATH_CACHE"); cached = strcmp(program_invocation_short_name, "steam") == 0 && - strstr(program_invocation_name, "steamrtarm64") != NULL && + (strstr(program_invocation_name, "steamrtarm64") != NULL || + strstr(program_invocation_name, "steamrt64") != NULL) && !(off != NULL && off[0] == '1'); return cached; } @@ -152,7 +138,6 @@ static int (*next_faccessat(void))(int, const char *, int, int) { return real; } -/* binfmt.c: a program on noexec storage, which the desktop runs all the same. */ __attribute__((visibility("hidden"))) int bl_binfmt_runnable(const char *path, int mode); static int check_cwd(const char *path, int mode, int flags) { diff --git a/tools/linuxfs/preload/perms.c b/tools/linuxfs/preload/perms.c index 96f1540c29..685f153840 100644 --- a/tools/linuxfs/preload/perms.c +++ b/tools/linuxfs/preload/perms.c @@ -1,20 +1,3 @@ -/* - * Root's way past a read-only file, for the Steam client. - * - * The client runs as "root" inside the session - the rootfs names the app's own uid root, and - * proot (-i) shows it that uid - but the kernel treats it as the ordinary user it is. The client - * leaves many content files read-only (r-x------, - * ~290 files of Proton Experimental (ARM64) alone), and when an update later rewrites one of them - * it opens the file for writing expecting root's permission to override the mode. The kernel - * refuses (EACCES), the client reports "Missing file permissions" and cancels the update - * (2026-09-26: Proton Experimental (ARM64), "CFileWriter: errno: 13 ... wineopenxr.dll"). - * - * So for the client's own processes, a refused write-open of a file this user owns is answered the - * way root's would be: the owner's write bit is added - to the file, or to the directory a new - * file is being created in - and the open is tried once more. chmod only succeeds on what the app - * owns, so nothing it could not already change is touched. Games, Wine and everything else keep - * ordinary permissions: only the processes started from the client's own directories take this. - */ #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> @@ -24,15 +7,10 @@ #include <unistd.h> static int in_steam_dirs(const char *path) { - return path != NULL && (strstr(path, "/Steam/steamrtarm64/") != NULL + return path != NULL && (strstr(path, "/Steam/steamrtarm64/") != NULL || strstr(path, "/Steam/steamrt64/") != NULL || strstr(path, "/Steam/ubuntu12_64/") != NULL || strstr(path, "/Steam/linuxarm64/") != NULL); } -/* - * The client and its helpers run from the Steam root's platform directories. The kernel's - * /proc/self/exe names proot's loader for every process in the session, so the program's own - * name - the path it was started by - is asked as well. - */ static int is_steam_client(void) { static int cached = -1; char exe[PATH_MAX]; @@ -52,10 +30,6 @@ static int grant_owner_write(int dirfd, const char *path) { return fchmodat(dirfd, path, (st.st_mode & 07777) | S_IWUSR, 0) == 0; } -/* - * After an open refused with EACCES: returns 1 when a write bit was added and the open is worth - * one more try. errno is left as the open set it. - */ __attribute__((visibility("hidden"))) int bl_writable_retry(int dirfd, const char *path, int flags) { int saved = errno; @@ -67,7 +41,6 @@ int bl_writable_retry(int dirfd, const char *path, int flags) { if (faccessat(dirfd, path, F_OK, 0) == 0) { granted = grant_owner_write(dirfd, path); } else if (flags & O_CREAT) { - /* A new file in a read-only directory. */ slash = strrchr(path, '/'); if (slash == NULL) { granted = grant_owner_write(dirfd, "."); diff --git a/tools/linuxfs/preload/pulseguard.c b/tools/linuxfs/preload/pulseguard.c new file mode 100644 index 0000000000..c3011df67d --- /dev/null +++ b/tools/linuxfs/preload/pulseguard.c @@ -0,0 +1,55 @@ +/* In Deck mode (-steamos3) the x86-64 client's SteamOS audio manager passes libpulse the NULL operation of a + * failed request, and libpulse aborts on it ("Assertion 'o' failed ... pa_operation_get_state()"). */ +#if defined(__x86_64__) || defined(__i386__) +#define _GNU_SOURCE +#include <dlfcn.h> +#include <stddef.h> + +typedef struct pa_operation pa_operation; + +#define PA_OPERATION_CANCELLED 2 + +/* A libpulse loaded with RTLD_LOCAL (Wine's winepulse.so) is not in RTLD_NEXT's scope. */ +static void *libpulse(const char *name) { + void *fn = dlsym(RTLD_NEXT, name); + if (!fn) { + void *handle = dlopen("libpulse.so.0", RTLD_LAZY | RTLD_NOLOAD); + if (handle) { + fn = dlsym(handle, name); + dlclose(handle); + } + } + return fn; +} + +int pa_operation_get_state(pa_operation *o) { + static int (*next)(pa_operation *); + if (!o) + return PA_OPERATION_CANCELLED; + if (!next) + next = (int (*)(pa_operation *))libpulse("pa_operation_get_state"); + return next ? next(o) : PA_OPERATION_CANCELLED; +} + +void pa_operation_unref(pa_operation *o) { + static void (*next)(pa_operation *); + if (!o) + return; + if (!next) + next = (void (*)(pa_operation *))libpulse("pa_operation_unref"); + if (next) + next(o); +} + +void pa_operation_cancel(pa_operation *o) { + static void (*next)(pa_operation *); + if (!o) + return; + if (!next) + next = (void (*)(pa_operation *))libpulse("pa_operation_cancel"); + if (next) + next(o); +} +#else +typedef int pulseguard_arm_build_has_nothing_to_do; +#endif diff --git a/tools/linuxfs/preload/quest_kgsl.c b/tools/linuxfs/preload/quest_kgsl.c new file mode 100644 index 0000000000..da5ef79fd1 --- /dev/null +++ b/tools/linuxfs/preload/quest_kgsl.c @@ -0,0 +1,2 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "../../quest/kgsl_compat.c" diff --git a/tools/linuxfs/preload/robust.c b/tools/linuxfs/preload/robust.c index 97bb9eec9a..679904b29a 100644 --- a/tools/linuxfs/preload/robust.c +++ b/tools/linuxfs/preload/robust.c @@ -1,22 +1,19 @@ -/* - * get_robust_list(2) for the session's own threads. - * - * Android's app policy refuses the call, and Steam's cross-process mutex insists on seeing the - * head glibc registered. The kernel's list protocol gives it away: a robust mutex this thread - * holds is linked directly behind the registered head, so locking a private one and following - * the link back finds the head without depending on libc's layout. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> #include <fcntl.h> +#include <limits.h> #include <linux/futex.h> +#include <linux/magic.h> #include <pthread.h> #include <stdarg.h> #include <stddef.h> #include <stdint.h> +#include <string.h> +#include <sys/stat.h> #include <sys/syscall.h> #include <sys/uio.h> +#include <sys/vfs.h> #include <unistd.h> #ifndef SYS_openat2 @@ -25,6 +22,17 @@ #define BL_RESOLVE_BENEATH 0x08 #define BL_RESOLVE_IN_ROOT 0x10 +// The kernel's MAXSYMLINKS. +#define BL_MAX_SYMLINKS 40 +#define BL_PROC_ROOT_INO 1 + +#ifdef SYS_newfstatat +#define BL_SYS_FSTATAT SYS_newfstatat +typedef struct stat bl_stat; +#else +#define BL_SYS_FSTATAT SYS_fstatat64 +typedef struct stat64 bl_stat; +#endif struct bl_open_how { uint64_t flags; @@ -33,8 +41,22 @@ struct bl_open_how { }; static long (*real_syscall)(long, ...); +static void *(*real_dlopen)(const char *, int); static int openat2_missing; +void *dlopen(const char *filename, int flags) { + if (!real_dlopen) { + real_dlopen = (void *(*)(const char *, int))dlsym(RTLD_NEXT, "dlopen"); + } + const char *basename = filename ? strrchr(filename, '/') : NULL; + basename = basename ? basename + 1 : filename; + // Steam's deep binding bypasses the robust-list shim under PRoot. + if (basename && strcmp(basename, "vrclient.so") == 0) { + flags &= ~RTLD_DEEPBIND; + } + return real_dlopen(filename, flags); +} + int bl_fsync_syscall(long number, const long *args, long *ret) __attribute__((visibility("hidden"))); static struct robust_list_head *thread_robust_head(void) { @@ -48,8 +70,6 @@ static struct robust_list_head *thread_robust_head(void) { if (pthread_mutex_lock(&mutex) != 0) { return NULL; } - /* The mutex holds tids and lock words beside the link, so a word is only followed - * through a read that fails instead of faulting on a non-pointer. */ uintptr_t lo = (uintptr_t)&mutex, hi = lo + sizeof(mutex); for (uintptr_t p = lo; p + sizeof(void *) <= hi && !head; p += sizeof(void *)) { struct robust_list_head *candidate = *(struct robust_list_head **)p; @@ -71,6 +91,151 @@ static struct robust_list_head *thread_robust_head(void) { return head; } +// Magic links are procfs links below a process's directory; procfs's root holds only plain ones (self, thread-self, mounts). +static int is_magic_link(int dirfd, char *link, size_t parent_len) { + int fd = (int)real_syscall(SYS_openat, (long)dirfd, (long)link, (long)(O_PATH | O_NOFOLLOW | O_CLOEXEC), 0L); + if (fd < 0) { + return 0; + } + struct statfs fs; + int procfs = real_syscall(SYS_fstatfs, (long)fd, (long)&fs) == 0 && fs.f_type == PROC_SUPER_MAGIC; + real_syscall(SYS_close, (long)fd); + if (!procfs) { + return 0; + } + char saved = link[parent_len]; + link[parent_len] = 0; + bl_stat parent; + long result = real_syscall(BL_SYS_FSTATAT, (long)dirfd, (long)(parent_len ? link : "."), (long)&parent, 0L); + link[parent_len] = saved; + return result != 0 || parent.st_ino != BL_PROC_ROOT_INO; +} + +// RESOLVE_IN_ROOT walked one component at a time: absolute symlinks restart at dirfd and ".." stops there. +static long openat_in_root(int dirfd, const char *path, int flags, long mode) { + char resolved[PATH_MAX]; + char pending[PATH_MAX]; + size_t resolved_len = 0; + int symlinks = 0; + int have_root = 0; + int root_on_procfs = 0; + dev_t root_dev = 0; + // O_NOFOLLOW and O_CREAT | O_EXCL leave a final symlink alone, unless a trailing slash follows it. + int nofollow = (flags & O_NOFOLLOW) || (flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL); + const char *rest = path; + for (;;) { + while (*rest == '/') { + rest++; + } + if (!*rest) { + break; + } + const char *name = rest; + const char *end = name; + while (*end && *end != '/') { + end++; + } + size_t len = (size_t)(end - name); + rest = end; + while (*rest == '/') { + rest++; + } + int last = !*rest; + int trailing_slash = last && rest != end; + if (len == 1 && name[0] == '.') { + continue; + } + if (len == 2 && name[0] == '.' && name[1] == '.') { + while (resolved_len > 0 && resolved[resolved_len - 1] != '/') { + resolved_len--; + } + if (resolved_len > 0) { + resolved_len--; + } + continue; + } + size_t separator = resolved_len > 0; + size_t candidate_len = resolved_len + separator + len; + if (candidate_len + 1 >= PATH_MAX) { + errno = ENAMETOOLONG; + return -1; + } + if (separator) { + resolved[resolved_len] = '/'; + } + memcpy(resolved + resolved_len + separator, name, len); + resolved[candidate_len] = 0; + bl_stat st; + int follow = !last || trailing_slash || !nofollow; + long stat_result = follow ? real_syscall(BL_SYS_FSTATAT, (long)dirfd, (long)resolved, (long)&st, (long)AT_SYMLINK_NOFOLLOW) : -1; + if (stat_result == 0 && S_ISLNK(st.st_mode)) { + if (++symlinks > BL_MAX_SYMLINKS) { + errno = ELOOP; + return -1; + } + if (!have_root) { + bl_stat root; + struct statfs root_fs; + if (real_syscall(BL_SYS_FSTATAT, (long)dirfd, (long)".", (long)&root, 0L) != 0) { + return -1; + } + root_dev = root.st_dev; + root_on_procfs = real_syscall(SYS_fstatfs, (long)dirfd, (long)&root_fs) == 0 && root_fs.f_type == PROC_SUPER_MAGIC; + have_root = 1; + } + if ((st.st_dev != root_dev || root_on_procfs) && is_magic_link(dirfd, resolved, resolved_len)) { + // RESOLVE_IN_ROOT refuses magic links. + errno = EXDEV; + return -1; + } + size_t rest_len = strlen(end); + if (rest_len + 1 >= PATH_MAX) { + errno = ENAMETOOLONG; + return -1; + } + char *tail = pending + PATH_MAX - rest_len - 1; + memmove(tail, end, rest_len + 1); + long target_len = real_syscall(SYS_readlinkat, (long)dirfd, (long)resolved, (long)pending, (long)(PATH_MAX - rest_len)); + if (target_len <= 0) { + if (target_len == 0) { + errno = ENOENT; + } + return -1; + } + if ((size_t)target_len + rest_len >= PATH_MAX) { + errno = ENAMETOOLONG; + return -1; + } + memmove(pending + target_len, tail, rest_len + 1); + if (pending[0] == '/') { + resolved_len = 0; + } + rest = pending; + continue; + } + if (last) { + resolved_len = candidate_len; + if (trailing_slash) { + resolved[resolved_len++] = '/'; + } + break; + } + if (stat_result != 0) { + return -1; + } + if (!S_ISDIR(st.st_mode)) { + errno = ENOTDIR; + return -1; + } + resolved_len = candidate_len; + } + if (resolved_len == 0) { + resolved[resolved_len++] = '.'; + } + resolved[resolved_len] = 0; + return real_syscall(SYS_openat, (long)dirfd, (long)resolved, (long)flags, mode); +} + static long openat2_via_openat(const long *args) { const char *path = (const char *)args[1]; const struct bl_open_how *how = (const struct bl_open_how *)args[2]; @@ -78,6 +243,9 @@ static long openat2_via_openat(const long *args) { errno = EINVAL; return -1; } + if ((how->resolve & BL_RESOLVE_IN_ROOT) && (int)args[0] != AT_FDCWD) { + return openat_in_root((int)args[0], path, (int)how->flags, (long)how->mode); + } if (how->resolve & BL_RESOLVE_IN_ROOT) { while (*path == '/') { path++; diff --git a/tools/linuxfs/preload/space.c b/tools/linuxfs/preload/space.c index 5edc0bd354..950197f655 100644 --- a/tools/linuxfs/preload/space.c +++ b/tools/linuxfs/preload/space.c @@ -1,23 +1,3 @@ -/* - * The free space a library reports. - * - * A library's games can live somewhere the folder that names the library does not. The card - * library is exactly that: its steamapps/common is bound to the card, but the directory above it - * belongs to the runtime image in the phone's own storage, and that directory is what the client - * measures. So it offers both install locations with the phone's free space against each, and the - * card's real figure - seventeen gigabytes more, on the device this was found on - never appears. - * - * The number is not only cosmetic: the client refuses an install it believes will not fit. Once - * the phone fills up it would turn down a card install with room to spare, and say nothing about - * why. - * - * Moving the whole library onto the card would fix the number and break something worse. The - * prefixes under steamapps/compatdata want symlinks and file locks, and the card is served over - * FUSE, which gives us neither - that is why they are kept in the runtime image in the first - * place. So the question is answered where the content actually is: a query about a library root - * named in BL_LIBRARY_SPACE is served from its steamapps/common, the bind that points at the - * card. Every other path is passed through untouched. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <stddef.h> @@ -26,8 +6,6 @@ #include <sys/statfs.h> #include <sys/statvfs.h> -/* A library root, or its steamapps, resolved to the directory that holds the games. Returns the - * rewritten path in `buf`, or NULL when `path` is not one of ours and should be left alone. */ static const char *content_of(const char *path, char *buf, size_t len) { const char *roots = getenv("BL_LIBRARY_SPACE"); if (!path || !roots || !*roots) @@ -38,8 +16,6 @@ static const char *content_of(const char *path, char *buf, size_t len) { const char *end = strchr(roots, ':'); size_t root_len = end ? (size_t)(end - roots) : strlen(roots); if (root_len > 0) { - /* The root itself, or the steamapps directly beneath it. Anything deeper is already inside - * a bind and answers for itself. */ int match = (path_len == root_len && !strncmp(path, roots, root_len)) || (path_len == root_len + 10 && !strncmp(path, roots, root_len) && !strcmp(path + root_len, "/steamapps")); diff --git a/tools/linuxfs/preload/storage.c b/tools/linuxfs/preload/storage.c index 201f93cd40..1e454b864a 100644 --- a/tools/linuxfs/preload/storage.c +++ b/tools/linuxfs/preload/storage.c @@ -1,13 +1,3 @@ -/* - * Opt-in observations for file allocation and writes to the selected Steam library. - * - * The session enables them only when storage diagnostics are turned on. Counters are local to - * each process, allocation details are capped, writes are sampled, and storage.log has a global - * size limit because every Steam child shares it. - * - * LD_PRELOAD cannot see direct syscalls or libc-internal calls that bypass public symbols. A - * missing entry therefore does not prove the operation did not happen. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> @@ -126,7 +116,6 @@ static void append_line(const char *line, size_t length) { syscall(SYS_close, (long)fd, 0L, 0L, 0L, 0L, 0L); goto done; } - /* One small append write per complete line; no per-write log flood. */ (void)syscall(SYS_write, (long)fd, (long)line, (long)length, 0L, 0L, 0L); syscall(SYS_close, (long)fd, 0L, 0L, 0L, 0L, 0L); done: @@ -156,7 +145,8 @@ static int steam_client(void) { static int cached = -1; if (cached < 0) cached = strcmp(program_invocation_short_name, "steam") == 0 && - strstr(program_invocation_name, "steamrtarm64") != NULL; + (strstr(program_invocation_name, "steamrtarm64") != NULL || + strstr(program_invocation_name, "steamrt64") != NULL); return cached; } @@ -223,7 +213,7 @@ int posix_fallocate(int fd, off_t offset, off_t length) { int call_errno = errno; uint64_t elapsed = now_ns() - start; allocation_line("posix_fallocate", result, call_errno, 0, offset, length, elapsed); - errno = entry_errno; /* POSIX requires the error to be returned, leaving errno unchanged. */ + errno = entry_errno; return result; } @@ -262,8 +252,6 @@ int ftruncate(int fd, off_t length) { int known = 0; if (steam_client()) { if (next_fstat == NULL) next_fstat = dlsym(RTLD_NEXT, "fstat"); - /* staging_file() reads /proc/self/fd, a round trip through proot: skip it for a shrink, which - * is passed through untouched either way. */ known = next_fstat != NULL && next_fstat(fd, &st) == 0 && S_ISREG(st.st_mode) && length >= st.st_size && staging_file(fd); } diff --git a/tools/linuxfs/preload/sysv.c b/tools/linuxfs/preload/sysv.c index 36d7bdd70e..dc349c232a 100644 --- a/tools/linuxfs/preload/sysv.c +++ b/tools/linuxfs/preload/sysv.c @@ -1,14 +1,3 @@ -/* System V semaphores and shared memory for programs in the Linux runtime. - * - * Android kernels are built without System V IPC, so semget/shmget fail with ENOSYS. Steam's tier0 - * creates its client-instance semaphore with semget and gives up when that fails. This library is - * LD_PRELOADed into the session and keeps each object in a file under /dev/shm (a bound directory - * the whole session shares): a semaphore set is an array of counters waited on with futexes, a - * segment is a plain file that shmat maps. Objects are found by the inode of their file, which is - * what the id is. semop applies its operations one by one (no all-or-nothing across a set) and - * SEM_UNDO is accepted but not performed - enough for the client, which uses single-counter sets. - * A message queue is a table of slots in its file: gamescope hands mangoapp (Deck mode's performance - * overlay) each frame's timings through one. */ #define _GNU_SOURCE #include <dirent.h> #include <errno.h> @@ -34,7 +23,7 @@ #include <unistd.h> #define DIR_DEFAULT "/dev/shm/wnsysv" -#define SEM_MAGIC 0x574e5345u /* "WNSE" */ +#define SEM_MAGIC 0x574e5345u #define MAX_OBJECTS 64 struct sem_header { @@ -43,9 +32,11 @@ struct sem_header { uint32_t key; uint32_t mode; int32_t creator_pid; - int32_t pad[11]; + _Atomic uint32_t otime; + _Atomic uint32_t ctime; + int32_t pad[9]; }; -/* The counters follow the header, one 32-bit word each (a futex word). */ +_Static_assert(sizeof(struct sem_header) == 64, "semaphore files written by older sessions keep their layout"); struct sem_map { int id; struct sem_header *hdr; size_t len; }; struct shm_map { void *addr; size_t len; int id; }; @@ -70,7 +61,6 @@ static int object_id(int fd) { return (int)(st.st_ino & 0x7fffffff); } -/* Open the object file of kind ("sem"/"shm") for key, creating it as flags ask. */ static int open_object(const char *kind, key_t key, int flags, int *created) { char path[PATH_MAX]; int oflags = O_RDWR | O_CLOEXEC; @@ -92,7 +82,6 @@ static int open_object(const char *kind, key_t key, int flags, int *created) { return fd; } -/* The object file for an id, found by inode. */ static int open_by_id(const char *kind, int id) { DIR *d = opendir(object_dir()); if (!d) return -1; @@ -135,7 +124,6 @@ static long futex(void *addr, int op, int val, const struct timespec *timeout) { return syscall(SYS_futex, addr, op, val, timeout, NULL, 0); } -/* ------------------------------------------------------------------ semaphores */ static struct sem_map *sem_lookup(int id) { for (int i = 0; i < MAX_OBJECTS; i++) @@ -176,7 +164,8 @@ int semget(key_t key, int nsems, int semflg) { size_t len = sizeof(struct sem_header) + (size_t)nsems * sizeof(int32_t); if (ftruncate(fd, (off_t)len) != 0) { close(fd); return -1; } struct sem_header h = {.magic = SEM_MAGIC, .nsems = (uint32_t)nsems, .key = (uint32_t)key, - .mode = (uint32_t)(semflg & 0777), .creator_pid = (int32_t)getpid()}; + .mode = (uint32_t)(semflg & 0777), .creator_pid = (int32_t)getpid(), + .ctime = (uint32_t)time(NULL)}; if (pwrite(fd, &h, sizeof(h), 0) != (ssize_t)sizeof(h)) { close(fd); return -1; } } else { struct sem_header h; @@ -220,8 +209,9 @@ int semtimedop(int semid, struct sembuf *sops, size_t nsops, const struct timesp } else if (sem_wait_op(w, sops[i].sem_op, sops[i].sem_flg, timeout) != 0) { return -1; } - if (sops[i].sem_op < 0) futex(w, FUTEX_WAKE, INT_MAX, NULL); /* zero-waiters see the change */ + if (sops[i].sem_op < 0) futex(w, FUTEX_WAKE, INT_MAX, NULL); } + atomic_store(&h->otime, (uint32_t)time(NULL)); return 0; } @@ -256,6 +246,7 @@ int semctl(int semid, int semnum, int cmd, ...) { if (semnum < 0 || (uint32_t)semnum >= h->nsems) { errno = EINVAL; return -1; } atomic_store(&words[semnum], (int32_t)(intptr_t)arg.buf); futex(&words[semnum], FUTEX_WAKE, INT_MAX, NULL); + atomic_store(&h->ctime, (uint32_t)time(NULL)); return 0; case GETALL: for (uint32_t i = 0; i < h->nsems; i++) arg.array[i] = (unsigned short)atomic_load(&words[i]); @@ -265,6 +256,7 @@ int semctl(int semid, int semnum, int cmd, ...) { atomic_store(&words[i], arg.array[i]); futex(&words[i], FUTEX_WAKE, INT_MAX, NULL); } + atomic_store(&h->ctime, (uint32_t)time(NULL)); return 0; case GETPID: return h->creator_pid; case GETNCNT: case GETZCNT: return 0; @@ -275,17 +267,15 @@ int semctl(int semid, int semnum, int cmd, ...) { arg.buf->sem_perm.gid = arg.buf->sem_perm.cgid = getgid(); arg.buf->sem_perm.mode = (unsigned short)h->mode; arg.buf->sem_nsems = h->nsems; + arg.buf->sem_otime = (time_t)atomic_load(&h->otime); + arg.buf->sem_ctime = (time_t)atomic_load(&h->ctime); return 0; - case IPC_SET: return 0; + case IPC_SET: atomic_store(&h->ctime, (uint32_t)time(NULL)); return 0; default: errno = EINVAL; return -1; } } -/* ------------------------------------------------------------------ shared memory */ -/* Linux keeps a removed segment attachable until the last detach, which X clients rely on: they - * remove the segment right after asking the server to attach it. A removed segment is renamed out - * of key lookup instead, and removed for good once it has been out of use for a while. */ static int remove_shm(int id) { DIR *d = opendir(object_dir()); if (!d) return -1; @@ -399,18 +389,18 @@ int shmctl(int shmid, int cmd, struct shmid_ds *buf) { } } -/* ------------------------------------------------------------------ message queues */ -/* Only what gamescope and mangoapp use: msgtyp 0 or > 0, IPC_NOWAIT and IPC_RMID. */ -#define MSG_MAGIC 0x574e4d51u /* "WNMQ" */ + + +#define MSG_MAGIC 0x574e4d51u #define MSG_SLOTS 32 struct msg_queue { uint32_t magic; - _Atomic int32_t lock; /* 0 free, else the holder's pid */ - _Atomic int32_t changed; /* bumped on every send and receive; waiters sleep on it */ + _Atomic int32_t lock; + _Atomic int32_t changed; uint64_t next_seq; - struct { uint64_t seq; long mtype; size_t len; char data[2048]; } slot[MSG_SLOTS]; /* seq 0: free */ + struct { uint64_t seq; long mtype; size_t len; char data[2048]; } slot[MSG_SLOTS]; }; static struct msg_queue *msg_map(int id) { @@ -425,7 +415,6 @@ static struct msg_queue *msg_map(int id) { return NULL; } -/* A process killed while holding the lock (Android ends sessions without warning) loses it. */ static void msg_lock(struct msg_queue *q) { for (int32_t owner = 0; !atomic_compare_exchange_strong(&q->lock, &owner, getpid()); owner = 0) { if (kill(owner, 0) != 0 && errno == ESRCH) atomic_compare_exchange_strong(&q->lock, &owner, 0); @@ -519,12 +508,6 @@ int msgctl(int msqid, int cmd, struct msqid_ds *buf) { return rc; } -/* - * fork() carries over only the calling thread, so a lock another thread was holding at that - * instant stays held in the child by a thread that is not there to release it. Taking it before - * the fork makes the copy consistent; the parent then unlocks it and the child, whose one thread - * never locked it, gets a fresh one. (WinNative 79aa7f68.) - */ static void sysv_lock_before_fork(void) { pthread_mutex_lock(&g_lock); } static void sysv_unlock_after_fork(void) { pthread_mutex_unlock(&g_lock); } static void sysv_reset_after_fork(void) { pthread_mutex_init(&g_lock, NULL); } diff --git a/tools/linuxfs/preload/tracefs.c b/tools/linuxfs/preload/tracefs.c index 17d45a01a5..8c59f2963a 100644 --- a/tools/linuxfs/preload/tracefs.c +++ b/tools/linuxfs/preload/tracefs.c @@ -1,15 +1,3 @@ -/* - * A trace instance for mangoapp where the kernel's tracefs is closed to the app. - * - * Valve's mangoapp (Deck mode's performance overlay) reads the GPU memory total on a Qualcomm - * display driver (msm_dpu / msm_drm) from the gpu_mem_total event, through a tracefs instance of - * its own - and aborts when tracefs_instance_create() fails, taking the whole overlay with it. - * Android mounts tracefs for root and the readtracefs group only, so it always fails here. - * - * The real calls run first. Only when they fail is the instance placed in an empty directory of - * the session's own, and reading its events answers with one gpu_mem_total record carrying the - * total KGSL - the GPU driver of every Adreno under Android - reports to the app. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <limits.h> @@ -25,7 +13,6 @@ struct tracefs_instance; struct tep_handle; struct tep_event; -/* The head of libtraceevent 1.8's struct tep_record (the version tools/mangoapp/packages.txt pins). */ struct tep_record { unsigned long long ts, offset; long long missed_events; @@ -35,7 +22,6 @@ struct tep_record { void *priv; }; -/* The event as Android kernels declare it (trace/events/gpu_mem.h). */ static const char gpu_mem_total_format[] = "name: gpu_mem_total\n" "ID: 1\n" diff --git a/tools/linuxfs/preload/tracer.c b/tools/linuxfs/preload/tracer.c index afcd37ee19..132af5134a 100644 --- a/tools/linuxfs/preload/tracer.c +++ b/tools/linuxfs/preload/tracer.c @@ -1,25 +1,13 @@ /* - * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0, with names - * changed to this project's. The reasoning below is the original author's. - * - * A process status without the container's tracer in it. - * - * proot runs the session under ptrace, so every process here reads a TracerPid in its - * /proc/<pid>/status. The Steam client takes that to mean a debugger is attached, and its arm64 - * build breaks into the supposed debugger with a bare "svc #0" after every failed assertion. That - * is no breakpoint: the registers still hold the call Plat_IsInDebugSession() just made, close(), - * with its own result, 1, as the argument - so each assertion closes descriptor 1. The number then - * goes to whatever the client opens next, and its standard output is written into that: app - * manifests and content chunks, its own connections, and the socket a game's Steam API talks - * over, which is how a game that stayed silent while loading found its pipe dead. - * - * The tracer is part of the container, not something a program should react to, so the status - * files are served with TracerPid 0. + * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0. */ + #define _GNU_SOURCE #include <ctype.h> +#include <dlfcn.h> #include <errno.h> #include <fcntl.h> +#include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <sys/syscall.h> @@ -34,7 +22,6 @@ static const char *skip_digits(const char *s) { return end == s ? NULL : end; } -/* /proc/{self,thread-self,<pid>}[/task/<tid>]/status */ static int is_status_path(const char *path) { const char *rest; if (path == NULL || strncmp(path, "/proc/", 6) != 0) return 0; @@ -46,10 +33,16 @@ static int is_status_path(const char *path) { return strcmp(rest, "/status") == 0; } -/* Chromium stands its hang watchdogs down when it sees a tracer, and the client's web helper does - * not come up within their patience here: it is left reading the truth. */ -static int is_web_helper(void) { - return strcmp(program_invocation_short_name, "steamwebhelper") == 0; +static int is_web_helper(const void *caller) { + if (strcmp(program_invocation_short_name, "steamwebhelper") != 0 && + strcmp(program_invocation_short_name, "vrwebhelper") != 0) + return 0; + const char *hide = getenv("BL_WEBHELPER_HIDE_TRACER"); + Dl_info info; + if (hide && hide[0] == '1' && caller && dladdr(caller, &info) && info.dli_fname + && strstr(info.dli_fname, "libtier0_s.so")) + return 0; + return 1; } static int write_all(int fd, const char *data, size_t len) { @@ -63,15 +56,13 @@ static int write_all(int fd, const char *data, size_t len) { return 0; } -/* The descriptor to hand back for a read-only open of a status file, or -1 with errno untouched - * when the path is something else or the copy cannot be made, and the real open should run. */ -__attribute__((visibility("hidden"))) int bl_status_without_tracer(const char *path, int flags) { +__attribute__((visibility("hidden"))) int bl_status_without_tracer(const char *path, int flags, const void *caller) { char text[STATUS_MAX]; size_t len = 0; int saved = errno; int out = -1; - if ((flags & O_ACCMODE) != O_RDONLY || !is_status_path(path) || is_web_helper()) return -1; + if ((flags & O_ACCMODE) != O_RDONLY || !is_status_path(path) || is_web_helper(caller)) return -1; int in = (int)syscall(SYS_openat, AT_FDCWD, path, O_RDONLY | O_CLOEXEC); if (in < 0) goto done; for (;;) { diff --git a/tools/linuxfs/preload/udevmon.c b/tools/linuxfs/preload/udevmon.c index 86baed110e..33baf2bdac 100644 --- a/tools/linuxfs/preload/udevmon.c +++ b/tools/linuxfs/preload/udevmon.c @@ -1,29 +1,7 @@ /* - * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0, with the - * symbol prefix changed to match this library. The reasoning below is the original author's. - * - * udev's netlink monitor, stood in for where the sandbox refuses the socket it is built on. - * - * The app sandbox denies a NETLINK_KOBJECT_UEVENT socket outright. libudev cannot create a - * monitor without one, and SDL's HID layer cannot start without a monitor: every SDL_hid_init() - * fails, the Steam client's controller code retries it hundreds of times a second, its main loop - * stalls, and the client asserts out from under the running game. Refusing SDL the library - * altogether (the earlier answer here) is what produced that failure. - * - * So the socket is answered instead: one end of a datagram socketpair stands in for the netlink - * socket, its peer held open so it never reads as hung up, and the few calls libudev makes on - * the socket that only a netlink one could answer are answered here. Nothing is ever written to - * it, so the monitor is live and silent, which is the most the kernel would deliver in a - * container anyway. The real socket is tried first, so this stays out of the way wherever a - * monitor could genuinely be created. - * - * The stand-in can also carry events after all (bl_udevmon_inject, below): libfakeinput plugs - * Steam's touch controller in and out of the client that way. - * - * Wine is left without one. Its HID bus reads the session's pads itself only when its SDL bus - * cannot start, and that is the path inputudev.c describes them on. Given a monitor the SDL bus - * comes up and takes the pads over from it. + * Ported from WinNative (maxjivi05, feature/wayland-gamescope, 2026-09-18/19), GPL-3.0. */ + #define _GNU_SOURCE #include <dlfcn.h> #include <errno.h> @@ -39,9 +17,9 @@ #include <unistd.h> struct stand_in { - int fd; /* the descriptor handed out, -1 when the slot is free */ - int peer; /* the other end, kept open */ - ino_t inode; /* identifies the socket after fd is closed and its number reused */ + int fd; + int peer; + ino_t inode; }; static struct stand_in stand_ins[16]; @@ -62,8 +40,6 @@ static ino_t socket_inode(int fd) { return fstat(fd, &st) == 0 ? st.st_ino : 0; } -/* Whether fd is one of the stand-in sockets. A slot whose descriptor was closed and reused by - * something else is retired on sight, so a later socket with the same number is not mistaken. */ static int is_stand_in(int fd) { int found = 0; if (fd < 0) @@ -108,7 +84,6 @@ static int make_stand_in(int type) { errno = saved; return -1; } - /* The peer is ours alone: it must not follow the socket into a child. */ fcntl(sv[1], F_SETFD, FD_CLOEXEC); pthread_mutex_lock(&lock); for (size_t i = 0; i < sizeof(stand_ins) / sizeof(stand_ins[0]); i++) { @@ -147,7 +122,6 @@ int socket(int domain, int type, int protocol) { return make_stand_in(type); } -/* For net.c's bind(): whether fd is a stand-in, which accepts any netlink address as bound. */ __attribute__((visibility("hidden"))) int bl_udevmon_stand_in(int fd) { return is_stand_in(fd); } @@ -180,8 +154,6 @@ int setsockopt(int fd, int level, int optname, const void *optval, socklen_t opt static int (*real_setsockopt)(int, int, int, const void *, socklen_t); if (is_stand_in(fd)) { - /* Group membership and packet filters only mean something on a socket that receives; this - * one never does, so they are accepted as set. The rest is genuine on a unix socket. */ if (level == SOL_NETLINK) return 0; if (level == SOL_SOCKET && (optname == SO_ATTACH_FILTER || optname == SO_DETACH_FILTER)) @@ -195,8 +167,6 @@ int setsockopt(int fd, int level, int optname, const void *optval, socklen_t opt return real_setsockopt(fd, level, optname, optval, optlen); } -/* udevd's message to the "udev" multicast group (systemd, device-monitor.c): this header, then the - * properties as NUL-separated KEY=VALUE strings. */ struct monitor_netlink_header { char prefix[8]; unsigned magic; @@ -209,7 +179,6 @@ struct monitor_netlink_header { unsigned filter_tag_bloom_lo; }; -/* systemd's string_hash32: MurmurHash2, seed 0. */ static unsigned murmur_hash2(const char *key, size_t len) { const unsigned m = 0x5bd1e995; unsigned h = (unsigned)len; @@ -236,8 +205,6 @@ static unsigned murmur_hash2(const char *key, size_t len) { return h; } -/* Sends a device event to every stand-in in this process, as udevd would; returns how many got it. - * For libfakeinput (found with dlsym), which knows when its devices come and go. */ __attribute__((visibility("default"))) int bl_udevmon_inject(const char *action, const char *devpath, const char *subsystem, const char *devname, unsigned major, unsigned minor) { @@ -247,7 +214,7 @@ __attribute__((visibility("default"))) int bl_udevmon_inject(const char *action, action, 0, devpath, 0, subsystem, 0, devname, 0, major, 0, minor, 0, __atomic_add_fetch(&seqnum, 1, __ATOMIC_RELAXED)); if (used <= 0 || (size_t)used >= sizeof(props)) return -1; - used++; /* the last string's NUL */ + used++; struct monitor_netlink_header header; memset(&header, 0, sizeof(header)); memcpy(header.prefix, "libudev", 8); @@ -269,10 +236,6 @@ __attribute__((visibility("default"))) int bl_udevmon_inject(const char *action, return sent; } -/* For ntsync.c's recvmsg(), which owns the symbol: 1 when fd is a stand-in, answered here (*result - * is what recvmsg returns), 0 otherwise. A message is dressed as udevd's: libudev drops one that - * does not come from the udev multicast group with root credentials. The sender address goes in - * the room msg_namelen had before the call; a unix socket sets it to 0. */ __attribute__((visibility("hidden"))) int bl_udevmon_recvmsg(int fd, struct msghdr *msg, int flags, ssize_t (*real_recvmsg)(int, struct msghdr *, int), ssize_t *result) { @@ -286,7 +249,7 @@ __attribute__((visibility("hidden"))) int bl_udevmon_recvmsg(int fd, struct msgh struct sockaddr_nl nl; memset(&nl, 0, sizeof(nl)); nl.nl_family = AF_NETLINK; - nl.nl_groups = 2; /* udev's group */ + nl.nl_groups = 2; memcpy(msg->msg_name, &nl, sizeof(nl)); msg->msg_namelen = sizeof(nl); } diff --git a/tools/linuxfs/preload/webhelper.c b/tools/linuxfs/preload/webhelper.c new file mode 100644 index 0000000000..af478c99af --- /dev/null +++ b/tools/linuxfs/preload/webhelper.c @@ -0,0 +1,73 @@ +#define _GNU_SOURCE +#include <stdlib.h> +#include <string.h> + +#ifndef WEBHELPER_DEFAULT +#define WEBHELPER_DEFAULT "--no-zygote --in-process-gpu -AudioServiceOutOfProcess" +#endif + +static int is_webhelper_browser(const char *path, char *const argv[]) { + if (!path || !argv) return 0; + const char *base = strrchr(path, '/'); + base = base ? base + 1 : path; + if (strcmp(base, "steamwebhelper")) return 0; + for (int i = 1; argv[i]; i++) + if (!strncmp(argv[i], "--type=", 7)) return 0; + return 1; +} + +static char *join_features(const char *have, const char *add) { + size_t a = have ? strlen(have) : 0, b = strlen(add); + char *out = malloc(a + b + 2); + if (!out) return NULL; + out[0] = 0; + if (a) strcat(strcat(out, have), ","); + return strcat(out, add); +} + +__attribute__((visibility("hidden"))) char *const *bl_webhelper_argv(const char *path, char *const argv[]) { + if (!is_webhelper_browser(path, argv)) return argv; + const char *spec = getenv("BL_WEBHELPER_ARGS"); + if (!spec || !*spec) spec = WEBHELPER_DEFAULT; + if (!strcmp(spec, "stock")) return argv; + + int argc = 0; + while (argv[argc]) argc++; + char *tokens = strdup(spec); + if (!tokens) return argv; + int extra = 0; + for (char *c = tokens; *c; c++) + if (*c == ' ') extra++; + char **out = calloc(argc + extra + 4, sizeof *out); + if (!out) return argv; + + const char *enable = NULL, *disable = NULL; + int n = 0; + for (int i = 0; i < argc; i++) { + if (i && !strncmp(argv[i], "--enable-features=", 18)) enable = argv[i] + 18; + else if (i && !strncmp(argv[i], "--disable-features=", 19)) disable = argv[i] + 19; + else out[n++] = argv[i]; + } + char *add_enable = NULL, *add_disable = NULL, *save = NULL; + for (char *t = strtok_r(tokens, " ", &save); t; t = strtok_r(NULL, " ", &save)) { + if (t[0] == '+' && t[1]) { + char *joined = join_features(add_enable, t + 1); + free(add_enable); + add_enable = joined; + } else if (t[0] == '-' && t[1] && t[1] != '-') { + char *joined = join_features(add_disable, t + 1); + free(add_disable); + add_disable = joined; + } else if (!strncmp(t, "--", 2)) { + out[n++] = t; + } + } + char *merged; + if (add_enable && (merged = join_features(enable, add_enable))) enable = merged; + if (add_disable && (merged = join_features(disable, add_disable))) disable = merged; + char *flag; + if (enable && (flag = malloc(strlen(enable) + 19))) out[n++] = strcat(strcpy(flag, "--enable-features="), enable); + if (disable && (flag = malloc(strlen(disable) + 20))) out[n++] = strcat(strcpy(flag, "--disable-features="), disable); + out[n] = NULL; + return out; +} diff --git a/tools/linuxfs/preload/xmode.c b/tools/linuxfs/preload/xmode.c index 8579f70bcc..e6842d73ab 100644 --- a/tools/linuxfs/preload/xmode.c +++ b/tools/linuxfs/preload/xmode.c @@ -1,26 +1,9 @@ -/* - * The Steam client's own screen, in a Follow screen session. - * - * With two Xwayland servers the client sizes them through GAMESCOPE_XWAYLAND_MODE_CONTROL - * ({server, width, height, allow_super_res} on the root window): the games' server (1) to a game's - * Game Resolution, and its own (0) to what it recommends for the display - 1920x1080 on a Fold's - * 2448x1848 inner panel. From then on it reads that 16:9 size back as the display's "native" one, - * so its interface and every game it starts are 16:9 with bars on a near-square panel, and stay so - * when the phone folds onto the cover screen. - * - * gamescope already keeps server 0 at the output's size and resizes it when the output changes (a - * Steam Deck docking; here, the app resizing the output as the phone folds and unfolds). So in a - * Follow screen session (BL_FOLLOW_OUTPUT=1) a request for server 0 is dropped and the client's - * screen stays the panel's; requests for the games' servers pass through untouched. Any other - * session, and any other property, is passed straight on. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -/* Xlib's types, without needing its headers in the build image. */ typedef struct _XDisplay Display; typedef unsigned long Atom; typedef unsigned long Window; @@ -48,12 +31,10 @@ int XChangeProperty(Display *dpy, Window w, Atom property, Atom type, int format static Display *atom_dpy; static Atom mode_control; if (!intern) intern = (intern_atom_fn)dlsym(RTLD_NEXT, "XInternAtom"); - /* Atoms belong to a connection; the client's is the one that writes this. */ if (intern && atom_dpy != dpy) { mode_control = intern(dpy, "GAMESCOPE_XWAYLAND_MODE_CONTROL", 1); atom_dpy = dpy; } - /* Format-32 property data is an array of long in Xlib. */ const long *v = (const long *)data; if (mode_control && property == mode_control && v[0] == 0) { static int said; diff --git a/tools/linuxfs/preload/zram.c b/tools/linuxfs/preload/zram.c new file mode 100644 index 0000000000..565e0f7dd0 --- /dev/null +++ b/tools/linuxfs/preload/zram.c @@ -0,0 +1,171 @@ +#define _GNU_SOURCE +#include <dlfcn.h> +#include <errno.h> +#include <fcntl.h> +#include <pthread.h> +#include <signal.h> +#include <stdint.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/syscall.h> +#include <sys/uio.h> +#include <unistd.h> + + +#ifndef MADV_PAGEOUT +#define MADV_PAGEOUT 21 +#endif +#ifndef ZR_CTL +#define ZR_CTL "/tmp/.bl-zram" +#endif +#define ZR_SWAPPED (1ULL << 62) +#define ZR_BATCH 512 + +static long (*zr_sys)(long, ...); +static unsigned long zr_page; +static int zr_busy; +static int zr_pending; +static char zr_maps[8192]; +static uint64_t zr_entries[ZR_BATCH]; +static struct iovec zr_iov[ZR_BATCH]; +static char zr_sink[ZR_BATCH]; + +static int zr_open(const char *path) { + return (int)zr_sys(SYS_openat, AT_FDCWD, path, O_RDONLY | O_CLOEXEC, 0); +} + +static int zr_mode(void) { + char c = 0; + int fd = zr_open(ZR_CTL); + if (fd < 0) return -1; + long n = zr_sys(SYS_read, fd, &c, 1); + zr_sys(SYS_close, fd); + return n == 1 && (c == '0' || c == '1') ? c - '0' : -1; +} + +static unsigned long zr_hex(const char **p) { + unsigned long v = 0; + for (;; (*p)++) { + char c = **p; + if (c >= '0' && c <= '9') v = v * 16 + (unsigned long)(c - '0'); + else if (c >= 'a' && c <= 'f') v = v * 16 + (unsigned long)(c - 'a' + 10); + else return v; + } +} + +static int zr_eligible(const char *line, int compress, unsigned long *start, unsigned long *end) { + const char *p = line; + *start = zr_hex(&p); + if (*p++ != '-') return 0; + *end = zr_hex(&p); + if (*p++ != ' ' || p[0] != 'r' || p[3] != 'p') return 0; + if (!compress) return 1; + if (p[1] != 'w') return 0; + for (int field = 0; field < 4; field++) { + while (*p && *p != ' ') p++; + while (*p == ' ') p++; + } + return *p == 0 || strncmp(p, "[heap]", 6) == 0 || strncmp(p, "[anon:", 6) == 0; +} + +static void zr_read_back(int pagemap, unsigned long start, unsigned long end) { + pid_t self = (pid_t)zr_sys(SYS_getpid); + struct iovec local = {zr_sink, 0}; + for (unsigned long addr = start; addr < end;) { + unsigned long count = (end - addr) / zr_page; + if (count > ZR_BATCH) count = ZR_BATCH; + if (zr_sys(SYS_lseek, pagemap, (long)(addr / zr_page * sizeof(uint64_t)), SEEK_SET) < 0) return; + long got = zr_sys(SYS_read, pagemap, zr_entries, count * sizeof(uint64_t)); + if (got < (long)sizeof(uint64_t)) return; + unsigned long n = 0; + for (unsigned long i = 0; i < (unsigned long)got / sizeof(uint64_t); i++) { + if (!(zr_entries[i] & ZR_SWAPPED)) continue; + zr_iov[n].iov_base = (void *)(addr + i * zr_page); + zr_iov[n++].iov_len = 1; + } + for (unsigned long done = 0; done < n;) { + local.iov_len = n - done; + long r = zr_sys(SYS_process_vm_readv, self, &local, 1UL, zr_iov + done, n - done, 0UL); + done += r > 0 ? (unsigned long)r : 1; + } + addr += (unsigned long)got / sizeof(uint64_t) * zr_page; + } +} + +static void zr_walk(int compress) { + int maps = zr_open("/proc/self/maps"); + if (maps < 0) return; + int pagemap = compress ? -1 : zr_open("/proc/self/pagemap"); + if (!compress && pagemap < 0) { + zr_sys(SYS_close, maps); + return; + } + size_t have = 0; + for (;;) { + long n = zr_sys(SYS_read, maps, zr_maps + have, sizeof(zr_maps) - 1 - have); + if (n < 0 && errno == EINTR) continue; + if (n <= 0) break; + have += (size_t)n; + zr_maps[have] = 0; + char *line = zr_maps; + char *nl; + while ((nl = memchr(line, '\n', have - (size_t)(line - zr_maps))) != NULL) { + *nl = 0; + unsigned long s, e; + if (zr_eligible(line, compress, &s, &e) && e > s) { + if (compress) zr_sys(SYS_madvise, s, e - s, MADV_PAGEOUT); + else zr_read_back(pagemap, s, e); + } + line = nl + 1; + } + have -= (size_t)(line - zr_maps); + memmove(zr_maps, line, have); + if (have == sizeof(zr_maps) - 1) have = 0; + } + if (pagemap >= 0) zr_sys(SYS_close, pagemap); + zr_sys(SYS_close, maps); +} + +static void zr_handler(int sig, siginfo_t *info, void *context) { + (void)sig; + (void)context; + if (info == NULL || info->si_code != SI_USER) return; + int saved = errno; + __atomic_store_n(&zr_pending, 1, __ATOMIC_SEQ_CST); + while (__atomic_load_n(&zr_pending, __ATOMIC_SEQ_CST) + && !__atomic_exchange_n(&zr_busy, 1, __ATOMIC_SEQ_CST)) { + __atomic_store_n(&zr_pending, 0, __ATOMIC_SEQ_CST); + int mode = zr_mode(); + if (mode >= 0) zr_walk(mode); + __atomic_store_n(&zr_busy, 0, __ATOMIC_SEQ_CST); + } + errno = saved; +} + +static void zr_child(void) { + __atomic_store_n(&zr_busy, 0, __ATOMIC_SEQ_CST); + __atomic_store_n(&zr_pending, 0, __ATOMIC_SEQ_CST); +} + +__attribute__((constructor)) static void zr_init(void) { + const char *name = program_invocation_short_name; + if (strcmp(name, "steam") != 0 && strcmp(name, "steamwebhelper") != 0) return; + void *libc = dlopen("libc.so.6", RTLD_LAZY | RTLD_NOLOAD); + if (libc == NULL) return; + zr_sys = (long (*)(long, ...))dlsym(libc, "syscall"); + if (zr_sys == NULL) return; + int fd = zr_open(ZR_CTL); + if (fd < 0) return; + zr_sys(SYS_close, fd); + long page = sysconf(_SC_PAGESIZE); + zr_page = page > 0 ? (unsigned long)page : 4096UL; + struct sigaction old; + if (sigaction(SIGURG, NULL, &old) != 0) return; + if ((old.sa_flags & SA_SIGINFO) || old.sa_handler != SIG_DFL) return; + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = zr_handler; + sa.sa_flags = SA_SIGINFO | SA_RESTART; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGURG, &sa, NULL) == 0) pthread_atfork(NULL, NULL, zr_child); +} diff --git a/tools/linuxfs/ssbs/ssbs_adapter.c b/tools/linuxfs/ssbs/ssbs_adapter.c index 92b3000f60..a3125f0708 100644 --- a/tools/linuxfs/ssbs/ssbs_adapter.c +++ b/tools/linuxfs/ssbs/ssbs_adapter.c @@ -1,30 +1,3 @@ -/* - * libssbs.so - keep PSTATE.SSBS set across signal returns, without rebuilding Wine. - * - * Wine's arm64 signal code writes PSTATE back from a Windows CONTEXT, whose Cpsr never carries - * SSBS (bit 12). Every signal return through that code (exception fixups, NtSetContextThread on - * another thread, the SIGUSR2 suspend path) therefore resumes the thread with SSBS clear, so the - * CPU runs it with speculative store bypass disabled - slower on cores such as Oryon. - * force_ssbs.diff (Sonicadvance1, FEX) fixes this inside ntdll; this library does the same from - * outside, for Protons that cannot be rebuilt: the Valve, GE and CachyOS ARM64 builds DroidDeck - * runs, which come prebuilt from Steam. Same source as Bannerlator's adapter (bionic), built here - * for glibc. - * - * How: interpose sigaction()/signal() via LD_PRELOAD. Every handler is installed behind one - * SA_SIGINFO trampoline that calls the real handler and then sets SSBS in the ucontext it is - * about to return through. The kernel accepts SSBS from userspace on sigreturn and context- - * switches it per thread, so the bit sticks until the next sigreturn. Handlers that never return - * (siglongjmp) are unaffected either way. - * - * Env: - * SSBS_ADAPTER_DISABLE=1 pass everything through untouched. - * SSBS_ADAPTER_OBSERVE=1 wrap and count, but leave SSBS as the handler left it (the baseline). - * SSBS_ADAPTER_DEBUG=1 log to stderr (implied by OBSERVE): - * - "returned with SSBS clear": a handler was about to resume a thread without SSBS. - * - "arrived with SSBS clear": a thread was RUNNING without SSBS when a signal reached it. - * Under the adapter this should stop after each thread's first fixed return; if it keeps - * counting, something other than a signal return is clearing the bit. - */ #define _GNU_SOURCE #include <dlfcn.h> #include <signal.h> @@ -41,7 +14,6 @@ typedef void (*sigact_fn)(int, siginfo_t *, void *); typedef void (*sighand_fn)(int); typedef int (*sigaction_fn)(int, const struct sigaction *, struct sigaction *); -/* Per signal: the handler the program asked for, and whether it wanted SA_SIGINFO. */ static _Atomic(void *) real_handler[MAX_SIG]; static atomic_bool real_siginfo[MAX_SIG]; @@ -69,7 +41,6 @@ __attribute__((constructor)) static void ctor(void) if (debug) fprintf(stderr, "libssbs: loaded (%s)\n", disabled ? "disabled" : observe ? "observing only" : "active"); } -/* 1, 2, 4, 8, ...: enough lines to see a trend without flooding the log. */ static int milestone(unsigned long n) { return (n & (n - 1)) == 0; } static void trampoline(int sig, siginfo_t *info, void *uc_v) @@ -130,7 +101,6 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oldact) void *prev_h = atomic_load(&real_handler[sig]); int prev_info = atomic_load(&real_siginfo[sig]); - /* Publish before installing so the trampoline never runs with a stale handler. */ if (act && wrapped(new_h)) { atomic_store(&real_siginfo[sig], new_info); atomic_store_explicit(&real_handler[sig], new_h, memory_order_release); @@ -142,7 +112,6 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oldact) atomic_store(&real_handler[sig], prev_h); } - /* Report the caller's own handler, not the trampoline, so handler chaining keeps working. */ if (ret == 0 && oldact && oldact->sa_sigaction == trampoline && prev_h) { if (prev_info) { oldact->sa_sigaction = (sigact_fn)prev_h; @@ -167,7 +136,6 @@ sighandler_t signal(int sig, sighandler_t handler) sighandler_t bsd_signal(int sig, sighandler_t handler) { return signal(sig, handler); } -/* glibc's System V flavour: a one-shot handler with no restart. */ sighandler_t sysv_signal(int sig, sighandler_t handler) { struct sigaction sa, old; diff --git a/tools/mangoapp/libtracefs-shim.c b/tools/mangoapp/libtracefs-shim.c index 58506cada4..7095a961f7 100644 --- a/tools/mangoapp/libtracefs-shim.c +++ b/tools/mangoapp/libtracefs-shim.c @@ -1,15 +1,3 @@ -// libtracefs.so.1 for mangoapp: the GPU memory Valve's overlay reads, without the kernel's tracing. -// -// Valve's mangoapp (msm.cpp, ftrace_gpumem.c) takes the GPU's memory in use - the VRAM and PVRAM -// lines - from the gpu_mem_total tracepoint (pid 0, the device's total) through libtracefs. An -// Android app may not use tracefs at all: the instance could not be made, and both lines read 0. -// This stands in for the libtracefs calls mangoapp makes, and hands its record walker one -// gpu_mem_total record carrying what the app writes to /run/droiddeck-hud/gpu-mem (bytes; the -// session's GpuMemComponent, from KGSL's own accounting). Only mangoapp loads this copy. -// -// The walker reads libtraceevent's structures directly, so the ones below are libtraceevent -// 1.8.2's (event-parse.h), the version tools/mangoapp/packages.txt pins; tep_find_event_by_record -// and tep_read_number are answered here too, ahead of the real libtraceevent in mangoapp's lookup. #include <sched.h> #include <stddef.h> @@ -76,7 +64,6 @@ struct tep_record { void *priv; }; -// gpu_mem_total's record: gpu_id, pid, size - as the kernel lays it out after the common fields. struct gpu_mem_total { unsigned int gpu_id; unsigned int pid; @@ -90,7 +77,6 @@ static struct tep_format_field pid_field = { static struct tep_event gpu_mem_event = { .name = "gpu_mem_total", .system = "gpu_mem", .format = {.nr_fields = 2, .fields = &pid_field}}; -// Never dereferenced by mangoapp: they only have to be non-null. static char handle; static char instance; diff --git a/tools/mangoapp/mangoapp b/tools/mangoapp/mangoapp index e912be1a83..0a208fef39 100644 --- a/tools/mangoapp/mangoapp +++ b/tools/mangoapp/mangoapp @@ -1,15 +1,5 @@ #!/bin/sh -# gamescope --mangoapp runs `mangoapp` from PATH; this puts Valve's build beside the libraries the -# runtime lacks (fmt 10, spdlog 1.13, glfw, libtracefs, libtraceevent), staged by the app. -# mangoapp reads its window through GLFW's X11 API. GLFW 3.4 takes XDG_SESSION_TYPE=wayland with a -# WAYLAND_DISPLAY as Wayland-only, and unset, libwayland falls back to wayland-0 - DroidDeck's own -# compositor, which shares XDG_RUNTIME_DIR - so both fail; x11 makes GLFW use gamescope's X server. export XDG_SESSION_TYPE=x11 -# gamescope's reaper restarts mangoapp the moment it exits, with no backoff. One that dies at start -# (a stale session preload without the System V queue, a driver it crashes on) was started about -# once a second for the whole session, each start a full exec under proot - the Steam menu itself -# lagged. More than 5 starts in 60 s leaves the overlay off: this waits instead of exiting, so the -# reaper has nothing to restart until the session ends. starts=/tmp/droiddeck-mangoapp-starts now=$(date +%s) recent=$(awk -v now="$now" '$1 > now - 60' "$starts" 2>/dev/null) diff --git a/tools/mangoapp/packages.txt b/tools/mangoapp/packages.txt index 9637e246a3..c5131beee9 100644 --- a/tools/mangoapp/packages.txt +++ b/tools/mangoapp/packages.txt @@ -1,12 +1,5 @@ -# Valve's aarch64 mangoapp (the Deck performance overlay) and the libraries it needs that the -# runtime does not have, at the versions it was built against (its .BUILDINFO: fmt 10.2.0, -# spdlog 1.13.0). CI fetches each, checks the sha256 and stages the files named below into the apk -# under usr/local/lib/mangoapp; SessionFiles copies them into the runtime at every launch. -# sha256 url 5b203a711e4e48f01fdffaa4f5a330f8fef22f1eab865f067a3e60bd99a28a5c https://holo-packages.steamos.cloud/archlinux-deckard-hotfixes/release/0.4.x/mangohud-20260902.1-1-aarch64.pkg.tar.zst ef7411229ea4e9b3ab4e36ac356a85b5072f362ee1de68b28d09c43f0b0ecc44 https://steamdeck-packages.steamos.cloud/archlinux-deckard/archlinux/mash-20240705.2/extra/os/aarch64/fmt-10.2.0-1-aarch64.pkg.tar.zst c9bfd2c3f15071329d381b9c2061d07503c4787ceb7001b9dfbf72a23c85cb04 https://steamdeck-packages.steamos.cloud/archlinux-deckard/archlinux/mash-20240705.2/extra/os/aarch64/spdlog-1.13.0-1-aarch64.pkg.tar.zst f9fae6c84a0382188f1cb20761424051593fd09b1456191cc250bd16e0a1d7a5 https://steamdeck-packages.steamos.cloud/archlinux-deckard/archlinux/mash-20240705.2/extra/os/aarch64/glfw-3.4-2-aarch64.pkg.tar.zst -# libtracefs is ours (libtracefs-shim.c), and reads libtraceevent's structures as 1.8.2 lays them -# out: moving libtraceevent off 1.8.2 means checking event-parse.h against the shim. 0cccdc9c92cb3cae1e37ebeb0ed20b93bb3b5000c8f955b63d0e07bd878c7018 https://steamdeck-packages.steamos.cloud/archlinux-deckard/archlinux/mash-20240705.2/extra/os/aarch64/libtraceevent-1%3A1.8.2-2-aarch64.pkg.tar.zst diff --git a/tools/msitools/packages.txt b/tools/msitools/packages.txt index 8329e68a7f..69a9dedba2 100644 --- a/tools/msitools/packages.txt +++ b/tools/msitools/packages.txt @@ -1,12 +1,3 @@ -# What droiddeck-msi-install runs: msitools' msiinfo reads a Windows Installer package's tables -# and streams, cabextract unpacks its cabinets (every compression a cabinet can use, which gcab -# alone cannot), 7-Zip (7z + its 7z.so format plugin) opens the installer .exe wrappers around -# packages (self-extracting 7-Zip and cabinet files, WiX bundles). Arch Linux ARM's aarch64 packages, hosted unchanged on this repo's -# msitools-0.106-r1 release because the mirror keeps only the newest of each. CI fetches each, -# checks the sha256 and stages the files below into the apk under usr/local/lib/droiddeck-msitools; -# SessionFiles copies them into the runtime at every launch. Everything else they need (glib, gio, -# libxml2.so.16, zlib, bzip2, libgcc_s) is in the runtime already. -# sha256 url 4ab93d800b320d19c6c1090e21b69e5764ee241b6370012459e0c5df03739a8d https://github.com/Droid-Deck/DroidDeck/releases/download/msitools-0.106-r1/msitools-0.106-3-aarch64.pkg.tar.xz 4028f44d83b2956ba2931d32aee8cceecbd6481e2febf86a3b6bfed69ef403d5 https://github.com/Droid-Deck/DroidDeck/releases/download/msitools-0.106-r1/libgsf-1.14.60-1-aarch64.pkg.tar.xz 3d7bd103313cb36d6cb703a5e583363e56ff255f105bcc0727916d195967976d https://github.com/Droid-Deck/DroidDeck/releases/download/msitools-0.106-r1/gcab-1.6-2-aarch64.pkg.tar.xz diff --git a/tools/prepare_windows_runtime.py b/tools/prepare_windows_runtime.py new file mode 100644 index 0000000000..831fc7d7de --- /dev/null +++ b/tools/prepare_windows_runtime.py @@ -0,0 +1,348 @@ +"""Prepare the audited Windows runtime from a pinned APK and rebuilt replacements. + +The donor was built from a CI merge, not just the PR head. Only unchanged +components are reused. Session helpers come from this checkout, libblsession +must be rebuilt for all three architectures, Gamescope comes from the current +checksum-pinned release, and the VR components are rebuilt in Docker (or reused +from a verified build manifest). Store engines are omitted (build with skipRust). +""" +import argparse +import hashlib +import io +import json +from pathlib import Path, PurePosixPath +import shutil +import struct +import subprocess +import sys +import tarfile +import tempfile +from zipfile import ZipFile + + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / 'tools/release')) +import runtime_inputs as runtime +from check_session_assets import source_assets +sys.path.insert(0, str(ROOT / 'tools/vr')) +import build_windows as vr_build + + +DONOR_SHA256 = 'b7efef6442f384446bdd1750cec21f0eda61b370bc21d9f55187448e5c256760' +DONOR_PR_SOURCE = 'bdf876d47cc9bb6fa810d014370da5bbb3c28039' +DONOR_MAIN_SOURCE = '46fac69438ed428f2ca43ea935cd47790264f380' +DONOR_TREE = 'ddbca4d572b809fb969be0cf80ef83d6ef6580ce' +DONOR_REVISION = 'cf24c5f2c771633ea426046006c2b977c7bd7d32' +DONOR_CERT_SHA256 = 'b241ea7d77822d39b89d3227e06f3ecf62adec6cbfd38ad06196787991b5d3f0' +DONOR_URL = 'https://github.com/Droid-Deck/DroidDeck-CI/releases/download/pr-732/DroidDeck-PR.732-bdf876d.apk' +AUDITED_SOURCE = '1dc66bf9be64a404c80400049c0803614814461b' +LOCAL_BUILD_PLUMBING = {'app/build.gradle', 'tools/release/runtime_inputs.py'} +# These Android-only inputs are compiled by Gradle, never taken from the donor. +# Keep this list explicit so unrelated native or Linux runtime edits still fail. +LOCAL_ANDROID_SOURCES = {'app/src/main/cpp/CMakeLists.txt', + 'app/src/main/cpp/viture/sdk_bridge.cpp', + 'app/src/main/cpp/viture/display_modes.h', + 'app/src/main/cpp/viture/stereo_frame_gate.h', + 'app/src/main/cpp/viture/uvc_bridge.cpp', + 'app/src/main/cpp/waylandcomp/src/cardboard.c', + 'app/src/main/cpp/waylandcomp/src/cardboard.h', + 'app/src/main/cpp/waylandcomp/src/cardboard.frag', + 'app/src/main/cpp/waylandcomp/src/cardboard_frag.h', + 'app/src/main/cpp/waylandcomp/src/waylandcomp_jni.c', + 'app/src/main/cpp/waylandcomp/src/spatialpose.c', + 'app/src/main/cpp/waylandcomp/CMakeLists.txt'} +# These audited helper updates are copied from this checkout by runtime.record(). +# Permit them only while source_assets() still guarantees that staging path. +LOCAL_SESSION_HELPERS = {'tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-compat', + 'tools/linuxfs/overlay/usr/local/bin/droiddeck-steamvr'} +VR_PREFIX = 'assets/linuxfs/usr/local/lib/droiddeck-vr/' +CHECK_PATHS = list(dict.fromkeys(runtime.SOURCE_PATHS + [ + 'app/src/main/cpp', 'app/src/main/jniLibs', 'app/src/main/rust/stores', 'tools/vr'])) +REBUILT = {'libblsession.so': 183, 'x86_64/libblsession.so': 62, 'i386/libblsession.so': 3} +REBUILT_SHA256 = { + 'libblsession.so': '1093ce33ca6d0a17a2eec7b3a3cc53969b01ffc459aef16b320cd3857825b738', + 'x86_64/libblsession.so': 'd0a558fee1ac4d5b898170a96b03e15610d9835e7097425027b8c31728da870a', + 'i386/libblsession.so': '785d8d9bf1fa20d083a7fed65d064c7580684d7065530d95a648e2d32901d2a2', +} +JNI = ('libproot.so', 'libproot-loader.so', 'libdirectaudiorelay.so') +PREPARED = ('pulseaudio.tzst', + 'graphics_driver/adrenotools-turnip25.1.0-quest1.tzst', + 'graphics_driver/adrenotools-turnip26.3.0-a6xx.tzst', + 'graphics_driver/adrenotools-turnip26.3.0-quest2.tzst') + + +def git(*args): + return subprocess.check_output(['git', '-C', str(ROOT), *args]) + + +def changed(base, target=None): + args = ['diff', '--no-ext-diff', '--ignore-cr-at-eol', '--name-only', '-z', base] + if target: + args.append(target) + return set(filter(None, git(*args, '--', *CHECK_PATHS).decode().split('\0'))) + + +def check_sources(): + # A branch label alone is insufficient: CI merged this main commit into it. + if git('merge-tree', '--write-tree', DONOR_PR_SOURCE, DONOR_MAIN_SOURCE).decode().splitlines()[0] != DONOR_TREE: + raise ValueError('The donor CI merge does not match the audited source tree') + helper_sources = {path.relative_to(ROOT).as_posix() for path in source_assets()} + reviewed = LOCAL_BUILD_PLUMBING | LOCAL_ANDROID_SOURCES | (LOCAL_SESSION_HELPERS & helper_sources) + unexpected = {p for p in changed(AUDITED_SOURCE, 'HEAD') - reviewed if not vr_build.is_source(p)} + if unexpected: + raise ValueError('Sources changed since the component audit:\n' + '\n'.join(sorted(unexpected))) + local = changed('HEAD') + untracked = set(filter(None, git('ls-files', '--others', '--exclude-standard', '-z', + '--', *CHECK_PATHS).decode().split('\0'))) + unexpected = {p for p in (local - reviewed) | (untracked - LOCAL_ANDROID_SOURCES) + if not vr_build.is_source(p)} + if unexpected: + raise ValueError('Unreviewed runtime/native/Rust changes:\n' + '\n'.join(sorted(unexpected))) + classifications = {} + for path in sorted(changed(DONOR_TREE, 'HEAD') | local | untracked): + if vr_build.is_source(path): + action = 'VR component rebuilt from current source and verified; never imported from donor' + elif path in LOCAL_ANDROID_SOURCES: + action = 'Android native source compiled by Gradle; not imported from donor' + elif path.startswith('app/src/main/rust/stores/'): + action = 'store engines omitted; Gradle must use skipRust=true' + elif path in helper_sources: + action = 'restaged from current source with LF line endings' + elif path in {'tools/linuxfs/preload/net.c', 'tools/linuxfs/preload/webhelper.c'}: + action = 'all three libblsession libraries rebuilt from current source' + elif path == 'tools/gamescope/release.env': + action = 'current checksum-pinned Gamescope archive replaces donor' + elif path in {'tools/build_local.sh', 'tools/directaudio/fetch.sh'}: + action = 'audited download/build cache plumbing; component inputs unchanged' + elif path == 'app/src/main/cpp/waylandcomp/src/compositor.c': + action = 'Android native library rebuilt by Gradle; not imported' + elif path in LOCAL_BUILD_PLUMBING: + action = 'local Windows build plumbing; changes recorded below' + else: + raise ValueError('Unclassified donor source difference: ' + path) + classifications[path] = action + return classifications + + +def validate_relative(name): + path = PurePosixPath(name) + if path.is_absolute() or not path.parts or any(part in {'.', '..'} or ':' in part for part in path.parts): + raise ValueError('Unsafe archive member: ' + name) + if '\\' in name: + raise ValueError('Backslash in archive member: ' + name) + return path + + +def checked_output(relative): + validate_relative(relative) + target = (ROOT / relative).resolve() + if not target.is_relative_to(ROOT.resolve()): + raise ValueError('Output escapes the checkout: ' + relative) + if git('ls-files', '--', relative).strip(): + raise ValueError('Refusing to overwrite tracked file: ' + relative) + return target + + +def read_gamescope(path): + pins = dict(line.split('=', 1) for line in (ROOT / 'tools/gamescope/release.env').read_text().splitlines() + if line and not line.startswith('#')) + if runtime.digest(path) != pins['GAMESCOPE_SHA256']: + raise ValueError('Gamescope archive checksum does not match tools/gamescope/release.env') + data = subprocess.run(['zstd', '-dc', str(path)], capture_output=True, check=True).stdout + files = {} + with tarfile.open(fileobj=io.BytesIO(data)) as archive: + for member in archive: + name = member.name.removeprefix('./') + validate_relative(name) + if member.isdir(): + continue + if not member.isfile(): + raise ValueError('Gamescope archive contains a non-regular member: ' + name) + if name in files: + raise ValueError('Duplicate Gamescope archive member: ' + name) + files[name] = archive.extractfile(member).read() + if set(files) != {'usr/local/bin/gamescope'}: + raise ValueError('Unexpected Gamescope archive payload: ' + ', '.join(files)) + return files, pins + + +def validate_rebuilt(path, machine): + data = path.read_bytes() + if len(data) < 20 or data[:4] != b'\x7fELF' or data[5] != 1 or struct.unpack('<H', data[18:20])[0] != machine: + raise ValueError('Replacement has the wrong ELF architecture: ' + str(path)) + return data + + +def validate_tracked_assets(package, llvm_strip): + checked = {} + for prefix, apk_prefix in [('app/src/main/jniLibs/', 'lib/'), + ('app/src/main/assets/desktop-removal/', 'assets/desktop-removal/')]: + tracked = filter(None, git('ls-files', '-z', '--', prefix).decode().split('\0')) + for name in tracked: + archive_name = apk_prefix + name.removeprefix(prefix) + content = (ROOT / name).read_bytes() + donor_content = package.read(archive_name) + verification = 'identical bytes' + if content != donor_content: + if prefix != 'app/src/main/jniLibs/': + raise ValueError('Tracked bytes differ from the donor: ' + name + + ' (text inputs must be checked out with LF)') + # AGP strips prebuilt JNI libraries during packaging. Verify that + # deterministic transformation on a temporary copy, never the source. + with tempfile.TemporaryDirectory(prefix='droiddeck-strip-check-') as temp: + stripped = Path(temp) / 'library.so' + subprocess.run([str(llvm_strip), '--strip-unneeded', '-o', str(stripped), + str(ROOT / name)], check=True, capture_output=True) + if stripped.read_bytes() != donor_content: + raise ValueError('Stripped tracked binary differs from donor: ' + name) + verification = 'identical after NDK llvm-strip --strip-unneeded' + checked[name] = {'source_sha256': hashlib.sha256(content).hexdigest(), + 'packaged_sha256': hashlib.sha256(donor_content).hexdigest(), + 'verification': verification} + return checked + + +def prepare(apk, rebuilt_dir, gamescope, llvm_strip=None, rebuilt_vr=None, vk_include=None, vr_image=vr_build.IMAGE): + classifications = check_sources() + if runtime.digest(apk) != DONOR_SHA256: + raise ValueError('Donor APK checksum mismatch') + gamescope_files, pins = read_gamescope(gamescope) + replacements = {name: validate_rebuilt(rebuilt_dir / name, machine) for name, machine in REBUILT.items()} + for name, data in replacements.items(): + if hashlib.sha256(data).hexdigest() != REBUILT_SHA256[name]: + raise ValueError('Replacement does not match the audited local rebuild: ' + name) + if vk_include is None: + if llvm_strip is None: + raise ValueError('Set --vk-include or --llvm-strip to locate the NDK Vulkan headers') + vk_include = llvm_strip.parent.parent / 'sysroot/usr/include' + if rebuilt_vr is None: + vr_files, vr_manifest = vr_build.build(ROOT / 'build/windows-setup/vr', vk_include, root=ROOT, image=vr_image) + else: + vr_files, vr_manifest = vr_build.validate(rebuilt_vr, vk_include, root=ROOT) + helpers = source_assets() + helper_assets = set(helpers.values()) + plan = {} + origins = {} + with ZipFile(apk) as package: + names = package.namelist() + if len(set(names)) != len(names): + raise ValueError('Donor APK has duplicate ZIP entries') + tracked = validate_tracked_assets(package, llvm_strip) + excluded = {'assets/linuxfs/' + name for name in REBUILT} + excluded.update('assets/linuxfs/' + name for name in gamescope_files) + excluded.update(helper_assets) + for name in names: + if name.endswith('/') or name in excluded or name.startswith(VR_PREFIX): + continue + if name.startswith(('assets/linuxfs/', 'assets/directaudio/', 'assets/droiddeck-esync/')): + target = 'app/src/main/' + name + checked_output(target) + plan[target] = package.read(name) + origins[target] = 'verified donor APK' + for name in JNI: + target = 'app/src/main/jniLibs/arm64-v8a/' + name + checked_output(target) + plan[target] = package.read('lib/arm64-v8a/' + name) + origins[target] = 'verified donor APK' + for name in PREPARED: + target = 'app/build/prepared-assets/' + name + checked_output(target) + plan[target] = package.read('assets/' + name) + origins[target] = 'verified donor APK' + for name, data in replacements.items(): + target = 'app/src/main/assets/linuxfs/' + name + checked_output(target) + plan[target] = data + origins[target] = 'locally rebuilt libblsession' + for name, data in gamescope_files.items(): + target = 'app/src/main/assets/linuxfs/' + name + checked_output(target) + plan[target] = data + origins[target] = 'checksum-pinned Gamescope release' + for name, data in vr_files.items(): + target = 'app/src/main/' + VR_PREFIX + name + checked_output(target) + plan[target] = data + origins[target] = 'VR rebuilt from current source; source and output checksums verified' + # Do not silently retain unrelated files from a prior preparation. + expected = set(plan) | {'app/src/main/' + name for name in helper_assets} + for tree in ('linuxfs', 'directaudio', 'droiddeck-esync'): + base = ROOT / 'app/src/main/assets' / tree + for path in base.rglob('*'): + if path.is_file() and not any(part.startswith('.') for part in path.relative_to(base).parts): + if path.relative_to(ROOT).as_posix() not in expected: + raise ValueError('Unexpected existing generated asset: ' + str(path)) + for source in helpers: + data = source.read_bytes() + normalized = data.replace(b'\r\n', b'\n') + if data != normalized: + source.write_bytes(normalized) + for target, data in plan.items(): + path = checked_output(target) + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(data) + runtime.record() + runtime.verify() + provenance = { + 'version': 1, + 'donor': {'url': DONOR_URL, 'sha256': DONOR_SHA256, 'signer_sha256': DONOR_CERT_SHA256, + 'pr_source': DONOR_PR_SOURCE, 'main_source': DONOR_MAIN_SOURCE, + 'source_tree': DONOR_TREE, 'embedded_revision': DONOR_REVISION}, + 'source_commit': git('rev-parse', 'HEAD').decode().strip(), + 'classified_differences': classifications, + 'build_plumbing': {name: {'sha256': runtime.digest(ROOT / name), + 'diff': git('diff', 'HEAD', '--', name).decode()} + for name in sorted(LOCAL_BUILD_PLUMBING)}, + 'android_sources_built_by_gradle': {name: runtime.digest(ROOT / name) + for name in sorted(LOCAL_ANDROID_SOURCES) + if (ROOT / name).is_file()}, + 'stores': 'omitted; use -PskipRust=true', + 'gamescope': {'repo': pins['GAMESCOPE_REPO'], 'tag': pins['GAMESCOPE_TAG'], + 'archive_sha256': pins['GAMESCOPE_SHA256']}, + 'tracked_files_verified': tracked, + 'vr_build': vr_manifest, + 'outputs': {name: {'origin': origins[name], 'sha256': hashlib.sha256(data).hexdigest()} + for name, data in sorted(plan.items())}, + 'preload_sources': {path.relative_to(ROOT).as_posix(): runtime.digest(path) + for path in sorted((ROOT / 'tools/linuxfs/preload').glob('*.c'))}, + 'preload_build_scripts': {path.relative_to(ROOT).as_posix(): { + 'sha256': runtime.digest(path), 'script': path.read_text()} + for path in sorted((ROOT / 'build/windows-setup').glob('build-preloads-*.sh'))}, + 'runtime_manifest_sha256': runtime.digest(ROOT / runtime.MANIFEST), + } + output = ROOT / 'app/build/windows-runtime-provenance.json' + output.write_text(json.dumps(provenance, indent=2, sort_keys=True) + '\n', encoding='utf-8') + print('Runtime inputs verified; donor components, rebuilt preloads, rebuilt VR and pinned Gamescope recorded.') + print('Store engines omitted: build with -PskipRust=true.') + print(output) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--apk', type=Path, default=ROOT / 'build/windows-setup/DroidDeck-PR.732-bdf876d.apk') + parser.add_argument('--rebuilt-linuxfs', type=Path, default=ROOT / 'build/windows-setup/rebuilt-linuxfs') + parser.add_argument('--gamescope', type=Path, default=ROOT / 'build/windows-setup/gamescope.tzst') + parser.add_argument('--llvm-strip', type=Path, default=Path.home() / + 'AppData/Local/Android/Sdk/ndk/27.3.13750724/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-strip.exe') + parser.add_argument('--rebuilt-vr', type=Path, help='Reuse a VR build with vr-build.json; default rebuilds in Docker') + parser.add_argument('--vk-include', type=Path, help='NDK Vulkan headers; defaults to the sysroot beside --llvm-strip') + parser.add_argument('--vr-image', default=vr_build.IMAGE, help='Docker compiler image for a fresh VR build') + parser.add_argument('--check-sources', action='store_true', help='Audit source differences without extracting files') + args = parser.parse_args() + zstd = ROOT / 'build/windows-setup/tools/zstd/zstd.exe' + if not shutil.which('zstd') and zstd.is_file(): + import os + os.environ['PATH'] = str(zstd.parent) + os.pathsep + os.environ.get('PATH', '') + try: + if args.check_sources: + print(json.dumps(check_sources(), indent=2, sort_keys=True)) + else: + prepare(args.apk.resolve(), args.rebuilt_linuxfs.resolve(), args.gamescope.resolve(), args.llvm_strip.resolve(), + args.rebuilt_vr.resolve() if args.rebuilt_vr else None, + args.vk_include.resolve() if args.vk_include else None, args.vr_image) + except (ValueError, OSError, subprocess.CalledProcessError, KeyError) as error: + parser.exit(1, str(error) + '\n') + + +if __name__ == '__main__': + main() diff --git a/tools/proot/PATCHES.md b/tools/proot/PATCHES.md index 342bf79e67..43380c33fd 100644 --- a/tools/proot/PATCHES.md +++ b/tools/proot/PATCHES.md @@ -78,8 +78,22 @@ Added by DroidDeck: exit.c act on (`TCSETSF`, the four termios2 requests, `FICLONE`) and allows the rest at once, and the ioctl block is emitted first (after WinNative 53836ca9, which traces only the termios2 ones). The `faccessat2` exit stop (termux 5ba8b95, for glibc's ENOSYS fallback on kernels before 5.8) and - the `statx` one (emulation on kernels before 4.11) are dropped when the running kernel is newer. + the `statx` one (emulation on kernels before 4.11) are dropped on kernels 5.8 and newer; patch + `0015` keeps it on 4.11–5.7 to return the mount ID added in 5.8. Host build: `ioctl` 31.6 -> 0.5 us; `stat`/`statx`/`faccessat2` about 44 -> 28 us (one stop). +- `0015-statx-mnt-id-fdinfo.patch` - kernels before 5.8 can complete `statx` without the mount ID + that libglnx requires while chasing an open descriptor. PRoot keeps the exit stop on those + kernels and fills only a missing ordinary `STATX_MNT_ID` for `AT_EMPTY_PATH` after pinning the + tracee descriptor, matching its device and inode to the successful statx result, and reading + `mnt_id` from the pin's fdinfo. A later close/reuse of the tracee fd cannot redirect that read; + a concurrent reuse for the same inode through a different bind mount is indistinguishable at + the exit stop. It does not synthesize `STATX_MNT_ID_UNIQUE`. +- `0016-robust-list-from-seccomp.patch` - Android's app policy refuses `set_robust_list` and + `get_robust_list`. proot still answers the first with `ENOSYS` but keeps the head each thread + offered (cleared on `execve`, none in a new task), and answers the second for the calling thread + with it. SteamVR's `vrclient.so` asks for the head through libc's `syscall()`, which + `libblsession.so`'s robust.c never sees: `libopenvr_api.so` opens it `RTLD_DEEPBIND`. Steam + aborted on "futex robust_list not initialized by pthreads" as soon as SteamVR was registered. Prototype (inert unless `PROOT_FASTPATH` is set; see `docs/development/proot-performance.md`): @@ -92,3 +106,14 @@ Prototype (inert unless `PROOT_FASTPATH` is set; see `docs/development/proot-per first tracee starts at `-w`'s, so relative lookups inside the tracee resolve where proot would. SM8850 (adb shell): `stat` 25.3 -> 0.6 us, `open+close` 25.3 -> 0.9 us, ENOENT 22.9 -> 1.6 us, 8 threads `stat`ing 89k -> 3.6M/s; equivalence suite (`bench/equiv.py`) byte-identical to proot. + +Old kernel fixes: + +- `0015-lost-fork-events.patch` - works around a problem reported on Xiaomi's msm 4.14 kernel: + the kernel sometimes reports a new process or thread but gives its ID as zero. Without that ID, + PRoot cannot finish setting it up, which can leave the session stuck. The patch searches `/proc` + for the child. If exactly one matches, PRoot uses its existing setup code. If several threads + match, it waits for the creating thread's `clone` call to return and uses the child ID returned + by the kernel instead. The original clone flags are preserved. When the kernel supplies a valid + ID in the notification, normal setup is unchanged. No timers or background polling are added. + Completely missing notifications and ambiguous matches for separate processes are not recovered. diff --git a/tools/proot/bench/equiv2.py b/tools/proot/bench/equiv2.py index 397f41b56a..b267ad121e 100644 --- a/tools/proot/bench/equiv2.py +++ b/tools/proot/bench/equiv2.py @@ -185,7 +185,6 @@ def sockets(base): srv = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) out.append(" bind " + call(lambda: srv.bind(path))) if not os.path.exists(path): - # adb's shell may not create sockets under /data/local/tmp; the app can. srv.close() return out out.append(" name " + call(lambda: srv.getsockname())) diff --git a/tools/proot/bench/equiv3.py b/tools/proot/bench/equiv3.py index 9f263ba48a..b40febf8e6 100644 --- a/tools/proot/bench/equiv3.py +++ b/tools/proot/bench/equiv3.py @@ -298,6 +298,27 @@ def deep_section(): t("unlink missing", lambda: os.unlink(DEEP + "/new")) t("unlink", lambda: os.unlink(DEEP + "/renamed")) t("realpath", lambda: realpath(DEEP + "/sub/../sub/link")) + srv = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + t("bind socket", lambda: srv.bind(DEEP + "/s.sock")) + t("listen", lambda: srv.listen(1)) + cli = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + t("connect socket", lambda: cli.connect(DEEP + "/s.sock")) + t("stat socket", lambda: mode_of(os.stat(DEEP + "/s.sock"))) + t("sockname", srv.getsockname) + t("peername", cli.getpeername) + t("accepted sockname", lambda: srv.accept()[0].getsockname()) + twin = DEEP[:-len("some")] + "more" + os.makedirs(twin) + other = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + t("bind same name elsewhere", lambda: other.bind(twin + "/s.sock")) + t("sockname, first", srv.getsockname) + t("sockname, same name elsewhere", other.getsockname) + other.close() + os.unlink(twin + "/s.sock") + os.rmdir(twin) + cli.close() + srv.close() + t("unlink socket", lambda: os.unlink(DEEP + "/s.sock")) t("listing", lambda: sorted(os.listdir(DEEP))) diff --git a/tools/proot/bench/fpbench.c b/tools/proot/bench/fpbench.c index c9b42d8886..f64e909e96 100644 --- a/tools/proot/bench/fpbench.c +++ b/tools/proot/bench/fpbench.c @@ -1,5 +1,3 @@ -/* The calls the fast path took over from proot, timed: run under fpoff and fastpath and compare. - * Usage: fpbench <scratch dir in the guest> [iterations]. Builds a Wine-like prefix there. */ #define _GNU_SOURCE #include <fcntl.h> #include <limits.h> diff --git a/tools/proot/bench/mechbench.c b/tools/proot/bench/mechbench.c index ae4319a959..4b9e034b4c 100644 --- a/tools/proot/bench/mechbench.c +++ b/tools/proot/bench/mechbench.c @@ -1,14 +1,3 @@ -/* Cost of the syscall-interception mechanisms available to an Android app, measured on the - * trapped call getppid() (the tracer/handler does no work, so this is pure mechanism cost). - * - * mechbench filter <n_linear> allowed syscall through a filter of n JEQs (linear, proot-style) - * mechbench tree allowed syscall through a binary-search filter (~150 entries) - * mechbench ptrace [spin] [regs] seccomp RET_TRACE + ptrace tracer (proot's mechanism) - * mechbench sigsys seccomp RET_TRAP + in-process SIGSYS handler - * mechbench notif [sync] [spin] seccomp RET_USER_NOTIF + supervisor thread - * mechbench openat2 <root> <path> openat2(RESOLVE_IN_ROOT) vs openat on the host path - * Env CPU_T / CPU_S pin the trapped thread / the tracer-supervisor to a cpu. - */ #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> @@ -68,8 +57,6 @@ static double time_trapped(void) { return (now() - t0) / N; } -/* A filter: arch check, then `n` JEQs on numbers that never match (like proot's list of ~150 - * traced syscalls seen by an allowed syscall), then `action` for TRAPPED, else ALLOW. */ static int install(int n_linear, uint32_t action, unsigned flags) { struct sock_filter *f = calloc(n_linear + 16, sizeof *f); int k = 0; @@ -77,7 +64,7 @@ static int install(int n_linear, uint32_t action, unsigned flags) { f[k++] = (struct sock_filter)BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, AUDIT_ARCH_AARCH64, 1, 0); f[k++] = (struct sock_filter)BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW); f[k++] = (struct sock_filter)BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, nr)); - for (int i = 0; i < n_linear; i++) /* numbers far above any real syscall */ + for (int i = 0; i < n_linear; i++) f[k++] = (struct sock_filter)BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 5000 + i, 0, 0); f[k++] = (struct sock_filter)BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, TRAPPED, 0, 1); f[k++] = (struct sock_filter)BPF_STMT(BPF_RET | BPF_K, action); @@ -87,7 +74,6 @@ static int install(int n_linear, uint32_t action, unsigned flags) { return syscall(SYS_seccomp, SECCOMP_SET_MODE_FILTER, flags, &p); } -/* ~150 traced numbers as a balanced binary search (what libseccomp's optimize=2 emits). */ static int emit_tree(struct sock_filter *f, int *k, int lo, int hi) { if (lo > hi) { f[(*k)++] = (struct sock_filter)BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW); return 0; } int mid = (lo + hi) / 2; @@ -106,7 +92,7 @@ static void *sigsys_unused; static void on_sigsys(int sig, siginfo_t *si, void *ctx) { (void)sig; (void)si; ucontext_t *uc = ctx; - uc->uc_mcontext.regs[0] = 4242; /* the emulated result */ + uc->uc_mcontext.regs[0] = 4242; } struct notif_arg { int fd; int spin; }; @@ -184,22 +170,17 @@ int main(int argc, char **argv) { if (ioctl(notif_fd, SECCOMP_IOCTL_NOTIF_SET_FLAGS, SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP) < 0) perror("SYNC_WAKE_UP"); else printf("(sync wake-up on)\n"); } - /* The filter lives on thread w, which has exited; install again on a fresh worker that - * does the timing. */ struct notif_arg na = {.fd = -1}; (void)na; printf("note: user-notif is measured in 'notif2'\n"); return 0; } if (!strcmp(mode, "notif2")) { - /* Supervisor = child thread (unfiltered), timed thread = main after installing. */ int sync = argc > 2 && !strcmp(argv[2], "sync"); pin("CPU_T"); int fd = install(0, SECCOMP_RET_USER_NOTIF, SECCOMP_FILTER_FLAG_NEW_LISTENER); if (fd < 0) { perror("NEW_LISTENER"); return 1; } if (sync && ioctl(fd, SECCOMP_IOCTL_NOTIF_SET_FLAGS, SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP, 0) < 0) perror("SYNC_WAKE_UP"); - /* The supervisor thread is created AFTER the filter, so it inherits it - but it only - * makes ioctl calls, which the filter allows. */ static struct notif_arg na; na.fd = fd; pthread_t s; diff --git a/tools/proot/bench/parstat.c b/tools/proot/bench/parstat.c index 0b229f080d..cb016b5b15 100644 --- a/tools/proot/bench/parstat.c +++ b/tools/proot/bench/parstat.c @@ -1,4 +1,3 @@ -/* T threads each stat()ing a path for D seconds: aggregate trapped-syscall throughput. */ #define _GNU_SOURCE #include <pthread.h> #include <stdio.h> diff --git a/tools/proot/bench/run-device.sh b/tools/proot/bench/run-device.sh index 20333318fb..0feacc437c 100644 --- a/tools/proot/bench/run-device.sh +++ b/tools/proot/bench/run-device.sh @@ -1,14 +1,4 @@ #!/system/bin/sh -# Runs a guest command on an adb-connected device the way a DroidDeck session runs proot (same -# options, a similar number of binds), as the shell user from /data/local/tmp/dd. Layout there: -# mini/ a glibc rootfs subset (glibc, bash, coreutils, python) + the bench binaries -# proot, loader this repo's proot (tools/proot/build.sh) -> variant "patched" -# proot-vanilla termux proot at source.env with no patches -> variant "vanilla" -# proot-fp this repo's proot incl. 0014 -> "fastpath" / "fpoff" -# mini/usr/lib/libfastpath.so tools/proot/fastpath/fastpath.c -# NOTE: adb shell is NOT under the app seccomp policy; see docs/development/proot-performance.md. -# -# run-device.sh <patched|vanilla|noseccomp|bare|fastpath|fpoff|direct> cmd... D=/data/local/tmp/dd V=$1; shift U=$(id -u) diff --git a/tools/proot/bench/sysbench.c b/tools/proot/bench/sysbench.c index 628e36e469..2d42ffdc5e 100644 --- a/tools/proot/bench/sysbench.c +++ b/tools/proot/bench/sysbench.c @@ -1,6 +1,3 @@ -/* Per-syscall latency under whatever runs this program (native, proot, ...). - * Usage: sysbench <deep-file> [iterations] - * Prints "name ns/op" lines. */ #define _GNU_SOURCE #include <fcntl.h> #include <linux/futex.h> diff --git a/tools/proot/bench/workloads.sh b/tools/proot/bench/workloads.sh index f09c0b9e56..a727605c3a 100644 --- a/tools/proot/bench/workloads.sh +++ b/tools/proot/bench/workloads.sh @@ -1,5 +1,4 @@ #!/system/bin/sh -# workloads: direct glibc (patched PT_INTERP) vs proot variants D=/data/local/tmp/dd; cd $D t() { local s=$(date +%s%N); "$@" >/dev/null 2>&1; local e=$(date +%s%N); echo $(( (e - s) / 1000000 )); } base() { t ./run.sh $1 /usr/bin/true; } diff --git a/tools/proot/build.sh b/tools/proot/build.sh index a899370fd9..718190552c 100755 --- a/tools/proot/build.sh +++ b/tools/proot/build.sh @@ -30,6 +30,7 @@ fetch() { } fetch proot.tar.gz "https://github.com/termux/proot/archive/${PROOT_COMMIT}.tar.gz" "$PROOT_SHA256" fetch talloc.tar.gz "https://www.samba.org/ftp/talloc/talloc-${TALLOC_VERSION}.tar.gz" "$TALLOC_SHA256" +cp "$HERE/statx_mnt_id.h" "$WORK/proot/src/tracee/statx_mnt_id.h" for patch in "$HERE"/patches/*.patch; do patch -d "$WORK/proot" -p1 --forward --quiet < "$patch" done diff --git a/tools/proot/fastpath/audit.c b/tools/proot/fastpath/audit.c index 01628712e2..6913ffa6f2 100644 --- a/tools/proot/fastpath/audit.c +++ b/tools/proot/fastpath/audit.c @@ -1,20 +1,3 @@ -/* - * libblaudit: an LD_AUDIT module that keeps ld.so from asking proot about libraries that are not - * there. ld.so finds a library by trying to open it in each directory of its search path in turn, - * and under proot every one of those opens is a round trip through the tracer. A game's environment - * puts the game's own directory, Steam's runtime and video directories and Proton's library - * directories ahead of /usr/lib, so most of the opens of every Wine process fail. - * - * la_objsearch() is asked about each candidate before ld.so opens it. One that provably does not - * exist - its parent directory is reached through no symlink, so proot would walk the same path, - * and the name itself is missing there - is skipped. Everything else is left to ld.so, which then - * behaves exactly as it would have. - * - * Built without libc: an audit module is loaded into a link namespace of its own, and a libc there - * would be searched for along that same path. Its calls go through the trampoline page of - * libblfastpath.so, mapped here first (libblfastpath finds it in place), and only in a process traced - * by the proot the environment describes (PROOT_FP_KEY, as libblfastpath checks it). - */ #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> @@ -26,7 +9,7 @@ #include <sys/syscall.h> #include <time.h> -#define FP_STUB_ADDR 0xffff00000UL /* as in fastpath.c */ +#define FP_STUB_ADDR 0xffff00000UL #define FP_STUB_SIZE 4096UL #define MAX_BINDS 256 #define PATH 4096 @@ -38,8 +21,6 @@ static stub_fn sys; static long sc(long nr, long a, long b, long c, long d) { return sys(nr, a, b, c, d, 0, 0); } -/* A syscall of its own, before the trampoline exists: only mmap, mprotect and munmap, which proot - * does not stop. */ static long raw(long nr, long a, long b, long c, long d) { register long x8 __asm__("x8") = nr; register long x0 __asm__("x0") = a; @@ -52,7 +33,6 @@ static long raw(long nr, long a, long b, long c, long d) { return x0; } -/* What __builtin___clear_cache does on aarch64, without libgcc. */ static void sync_code(char *b, char *e) { for (char *p = b; p < e; p += 4) __asm__ volatile("dc cvau, %0" : : "r"(p) : "memory"); __asm__ volatile("dsb ish" : : : "memory"); @@ -80,7 +60,6 @@ static int under(const char *path, const char *dir, size_t dlen) { return same(path, dir, dlen) && (path[dlen] == 0 || path[dlen] == '/'); } -/* ---------------------------------------------------------------- setup */ static char env[65536], tracer_env[32768]; static size_t env_len; @@ -109,7 +88,6 @@ static const char *var(const char *buf, size_t len, const char *name) { return NULL; } -/* The canonical form of a host path, as proot's realpath() made it; 0 when it has none. */ static int canonical(const char *path, char *out) { long fd = sc(SYS_openat, AT_FDCWD, (long)path, O_PATH | O_CLOEXEC, 0); if (fd < 0) return 0; @@ -148,14 +126,13 @@ static int traced_by_match(const char *key) { static void setup(void) { long p = raw(SYS_mmap, FP_STUB_ADDR, FP_STUB_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED_NOREPLACE); - /* Loaded before anything else maps, so whatever is already there is not the trampoline. */ if (p != (long)FP_STUB_ADDR) { if (p > 0) raw(SYS_munmap, p, FP_STUB_SIZE, 0, 0); return; } static const uint32_t code[] = { 0xAA0003E8, 0xAA0103E0, 0xAA0203E1, 0xAA0303E2, 0xAA0403E3, 0xAA0503E4, 0xAA0603E5, - 0xD4000001, 0xD65F03C0, /* mov x8,x0; mov x0..x5,x1..x6; svc #0; ret */ + 0xD4000001, 0xD65F03C0, }; copy((char *)p, (const char *)code, sizeof code); sync_code((char *)p, (char *)p + sizeof code); @@ -174,7 +151,6 @@ static void setup(void) { root = root_canon; rootlen = len_of(root); if (rootlen <= 1) return; - /* "host[:guest]|..." taken apart in place; a list this cannot hold leaves everything to ld.so. */ for (char *s = (char *)b; s && *s;) { if (nbinds == MAX_BINDS) return; char *end = s; @@ -196,9 +172,7 @@ static void setup(void) { ready = 1; } -/* ---------------------------------------------------------------- lookups */ -/* The host path proot binds there, as it canonicalised it: NULL for one it dropped (or /proc/self). */ static const char *bind_host(struct bind *bd) { if (!bd->state) { bd->state = under(bd->host, "/proc/self", 10) || !canonical(bd->host, bd->canon) ? 2 : 1; @@ -212,8 +186,6 @@ static long long now(void) { return ts.tv_sec * 1000000000LL + ts.tv_nsec; } -/* The host path proot gives a canonical guest path: under the longest binding over it (the last of - * two for the same path), else the rootfs. 0 for a binding proot dropped, or no room. */ static int to_host(const char *g, char *host, int *bound) { size_t n = len_of(g); struct bind *bd = NULL; @@ -235,12 +207,10 @@ static int to_host(const char *g, char *host, int *bound) { return 1; } -/* Under a directory proot or the kernel answers for in its own way. */ static int special(const char *g) { return under(g, "/proc", 5) || under(g, "/dev", 4) || under(g, "/sys", 4); } -/* A guest path proot only shows as glue, or one with a binding below it. */ static int above_binding(const char *g) { size_t n = len_of(g); for (int i = 0; i < nbinds; i++) @@ -248,12 +218,6 @@ static int above_binding(const char *g) { return 0; } -/* - * The canonical guest path of the directory `g`, walked as canonicalize() walks it: a symlink in the - * rootfs is followed in guest terms, its text losing the rootfs prefix as detranslate_path() has it. - * -1 when a component is missing, so proot fails the path with ENOENT. Anything this cannot follow - * exactly (a link inside a binding, glue, a component not a directory) gives 0. - */ static int canonical_dir(const char *g, char *out) { char path[PATH], next[PATH], host[PATH], text[PATH]; char st_buf[256] __attribute__((aligned(16))); @@ -312,8 +276,6 @@ static int canonical_dir(const char *g, char *out) { static struct { char dir[PATH]; char canon[PATH]; long long at; } known[VERIFIED]; static int next_slot; -/* canonical_dir(), remembered for a while: ld.so looks in the same few directories for every - * library. */ static int known_dir(const char *g, char *out) { size_t n = len_of(g); long long t = now(); @@ -331,8 +293,6 @@ static int known_dir(const char *g, char *out) { return 1; } -/* The guest path certainly names nothing: its directory is one proot reaches the same way, and the - * name is missing there. */ static int missing(const char *g) { char dir[PATH], cand[PATH], host[PATH]; size_t n = len_of(g); @@ -363,13 +323,6 @@ unsigned int la_version(unsigned int version) { return LAV_CURRENT; } -/* - * A candidate skipped here is one whose open "failed" with ld.so's errno as it stands, and ld.so - * gives up on the whole search path unless that is ENOENT or EACCES. So each lookup's first - * candidate is always opened for real: once that has failed, errno says so, and nothing ld.so - * does between candidates changes it unless the search ends anyway. The default directories are - * left alone too: what ld.so meets there is what it reports when a library is nowhere. - */ static int tried; char *la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) { diff --git a/tools/proot/fastpath/fastpath.c b/tools/proot/fastpath/fastpath.c index 3914423a0d..53741f4a6c 100644 --- a/tools/proot/fastpath/fastpath.c +++ b/tools/proot/fastpath/fastpath.c @@ -1,38 +1,3 @@ -/* - * proot fast path: path syscalls answered inside the process, without a ptrace round trip. - * - * proot traps every path syscall into its tracer: 15-60 us a call on a Snapdragon, most of it - * the two cross-core wake-ups between tracee and tracer. This library, preloaded into every guest - * process, answers the common calls itself and issues the translated syscall from a trampoline - * page at a fixed address, which proot's seccomp filter lets through without a stop - * (PROOT_FASTPATH, tools/proot/patches/0014). - * - * It decides nothing proot would decide differently. A guest path is resolved the way proot's - * canonicalize() does it, one component at a time from the root or the guest directory a - * relative path starts in: each component is mapped through the longest binding whose guest path - * is a prefix of it (else the rootfs) and looked at without following it; a symlink is read and - * its text resolved in its place, ".." drops the last resolved component, and a directory that - * only exists as proot's glue above a binding is walked through. The kernel then gets the host - * path that proot would have given it. In /proc, /proc/self and /proc/thread-self are followed as - * proot follows them, and a link proot emulates is read the way it answers readlink(); anything - * proot keeps state about (a renamed directory, sockets bound at a long path, glue itself), the - * /dev links into /proc, any flag not handled here and any failure to decide go to proot: the real - * libc call runs, proot traps it and answers as it always has. - * - * Only syscalls Android's app seccomp policy allows are used - not openat2 or faccessat2, which - * it answers with SIGSYS. - * - * Directories resolved once are remembered for PROOT_FP_TTL_MS (default 2000; 0 = resolve every - * call): a directory replaced by a symlink within that window would be missed, the same trade the - * session's pathcache.c makes for the Steam client. Renames, removals and new symlinks made here - * forget them at once. - * - * Config (the launcher sets it): PROOT_FP_ROOT=<host rootfs>, PROOT_FP_BINDS=<host:guest|...>; - * PROOT_FP_KEY=<key>, with PROOT_FASTPATH=<key> in proot's own environment: nothing is answered - * here unless the tracer is that proot (traced_by_match). - * PROOT_FP_OFF=1 disables it; PROOT_FP_STATS=1 reports hits and misses at exit, and - * PROOT_FP_LOG=<file> appends every call left to proot to that file. - */ #define _GNU_SOURCE #include <dirent.h> #include <dlfcn.h> @@ -66,14 +31,10 @@ #include <unistd.h> #include <utime.h> -#define FP_STUB_ADDR 0xffff00000UL /* must match FASTPATH_STUB_ADDR in proot's seccomp.c */ +#define FP_STUB_ADDR 0xffff00000UL #define FP_STUB_SIZE 4096UL -/* A session binds 80-odd paths (devices, the Steam libraries, each Games folder...). More than fit, - * or one that cannot be held, turns the fast path off: a bind it did not know would map that - * guest path into the rootfs instead (an empty mount point), which proot never does. */ #define MAX_BINDS 256 #define FP_SLOW (-100000L) -/* proot gives up at MAXSYMLINKS; a chain this long is left to it, whatever it decides. */ #define MAX_LINKS 16 typedef long (*stub_fn)(long nr, long a, long b, long c, long d, long e, long f); @@ -91,7 +52,6 @@ static unsigned long hits, misses; static long sc(long nr, long a, long b, long c, long d, long e) { return fp_sys(nr, a, b, c, d, e, 0); } static void fp_init(void); static pthread_once_t init_once = PTHREAD_ONCE_INIT; -/* Set up on the first call that could use it: a process that only execs on pays nothing. */ static inline int fp_ready(void) { pthread_once(&init_once, fp_init); return fp_on; @@ -102,7 +62,6 @@ static int under(const char *path, const char *dir, size_t dlen) { return strncmp(path, dir, dlen) == 0 && (path[dlen] == 0 || path[dlen] == '/'); } -/* ---------------------------------------------------------------- setup */ static void stats(void) { char line[160]; @@ -114,7 +73,6 @@ static void stats(void) { static const char *miss_log; static long fp_open(int dirfd, const char *path, int flags, mode_t mode); -/* A call left to proot. Opened for each line: a program may close or reuse any descriptor kept. */ static void missed(const char *call, int dirfd, const char *path) { misses++; if (!miss_log) return; @@ -133,8 +91,6 @@ static void missed(const char *call, int dirfd, const char *path) { sc(SYS_close, fd, 0, 0, 0, 0); } -/* The canonical form of a host path (bindings may name /sdcard, /data/user/0, ...), as realpath() - * gives it; -errno, leaving the path as it is, when it does not lead to one. */ static long canonical(char *path, size_t size) { long fd = sc(SYS_openat, AT_FDCWD, (long)path, O_PATH | O_CLOEXEC, 0, 0); if (fd < 0) return fd; @@ -153,17 +109,11 @@ static long tracer; static pthread_mutex_t cache_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t bind_lock; -static void after_fork(void) { pthread_mutex_init(&cache_lock, NULL); pthread_mutex_init(&bind_lock, NULL); } +static pthread_mutex_t long_lock; +static void after_fork(void) { pthread_mutex_init(&cache_lock, NULL); pthread_mutex_init(&bind_lock, NULL); pthread_mutex_init(&long_lock, NULL); } -/* - * The process is traced by a proot that lets the trampoline through and was given the same - * rootfs and bindings: its own environment carries PROOT_FASTPATH=<PROOT_FP_KEY> (the launcher - * derives the key from them) and no PROOT_NO_SECCOMP. A process that inherited the variables but - * runs under another proot, or none, must not translate paths itself: a proot that traps the - * trampoline would translate the host path a second time. - */ static int traced_by_match(const char *key) { - static char buf[32768]; /* under init_once */ + static char buf[32768]; char path[48], want[160]; long fd = sc(SYS_openat, AT_FDCWD, (long)"/proc/self/status", O_RDONLY | O_CLOEXEC, 0, 0); if (fd < 0) return 0; @@ -191,11 +141,26 @@ static int traced_by_match(const char *key) { return found; } -/* - * proot canonicalised every binding's host path with realpath() in its own process, so a binding of - * /proc/self/fd/1 (/dev/stdout) names whatever proot's own descriptor 1 is - /dev/null in a session - - * and one onto a pipe was dropped. Read through the tracer's /proc; 0 when that cannot be seen. - */ +static int fex_runs_32bit(void) { + if (strcmp(program_invocation_short_name, "FEX") != 0 && strcmp(program_invocation_short_name, "FEXInterpreter") != 0) + return 0; + char args[PATH_MAX + 64]; + long fd = syscall(SYS_openat, AT_FDCWD, "/proc/self/cmdline", O_RDONLY | O_CLOEXEC); + if (fd < 0) return 1; + long n = syscall(SYS_read, fd, args, sizeof args - 1); + syscall(SYS_close, fd); + if (n <= 0) return 1; + args[n] = 0; + const char *prog = args + strlen(args) + 1; + if (prog >= args + n || !*prog) return 1; + unsigned char ident[5]; + fd = syscall(SYS_openat, AT_FDCWD, prog, O_RDONLY | O_CLOEXEC); + if (fd < 0) return 1; + n = syscall(SYS_read, fd, ident, sizeof ident); + syscall(SYS_close, fd); + return !(n == 5 && memcmp(ident, "\x7f" "ELF", 4) == 0 && ident[4] == 2); +} + static int in_tracer(struct bind *bd) { char h[PATH_MAX]; if (snprintf(h, sizeof h, "/proc/%ld%s", tracer, bd->host + 10) >= (int)sizeof h) return 0; @@ -212,16 +177,17 @@ static void fp_init(void) { const char *r = getenv("PROOT_FP_ROOT"), *b = getenv("PROOT_FP_BINDS"), *t = getenv("PROOT_FP_TTL_MS"); const char *key = getenv("PROOT_FP_KEY"); if (!r || !*r || !key || !*key || getenv("PROOT_FP_OFF")) return; + if (fex_runs_32bit()) return; void *p = mmap((void *)FP_STUB_ADDR, FP_STUB_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED_NOREPLACE, -1, 0); if (p != (void *)FP_STUB_ADDR) { if (p != MAP_FAILED) { munmap(p, FP_STUB_SIZE); return; } - if (errno != EEXIST) return; /* mapped already: this library loaded twice */ + if (errno != EEXIST) return; } else { static const uint32_t code[] = { - 0xAA0003E8, /* mov x8, x0 */ 0xAA0103E0, /* mov x0, x1 */ 0xAA0203E1, /* mov x1, x2 */ - 0xAA0303E2, /* mov x2, x3 */ 0xAA0403E3, /* mov x3, x4 */ 0xAA0503E4, /* mov x4, x5 */ - 0xAA0603E5, /* mov x5, x6 */ 0xD4000001, /* svc #0 */ 0xD65F03C0, /* ret */ + 0xAA0003E8, 0xAA0103E0, 0xAA0203E1, + 0xAA0303E2, 0xAA0403E3, 0xAA0503E4, + 0xAA0603E5, 0xD4000001, 0xD65F03C0, }; memcpy(p, code, sizeof code); __builtin___clear_cache((char *)p, (char *)p + sizeof code); @@ -246,8 +212,6 @@ static void fp_init(void) { char *colon = strchr(spec, ':'); if (colon) *colon = 0; struct bind *bd = &binds[nbinds]; - /* Canonicalised on first use: some (/sdcard) are FUSE, slow to look up at every exec. - * Static storage: malloc here would grow the heap with brk(2), which proot traps. */ static char hosts[MAX_BINDS][PATH_MAX], guests[MAX_BINDS][512]; const char *g = colon ? colon + 1 : spec; if (strlen(g) >= sizeof guests[0]) { unheld = 1; break; } @@ -267,15 +231,13 @@ static void fp_init(void) { if (unheld || (s && *s)) { fp_sys = NULL; return; } for (int i = 0; i < nbinds; i++) if (under(binds[i].host, "/proc/self", 10) && !in_tracer(&binds[i])) { fp_sys = NULL; return; } - pthread_atfork(NULL, NULL, after_fork); /* registered once per exec */ + pthread_atfork(NULL, NULL, after_fork); fp_on = 1; if (getenv("PROOT_FP_STATS")) atexit(stats); miss_log = getenv("PROOT_FP_LOG"); if (miss_log && miss_log[0] != '/') miss_log = NULL; } -/* Whether proot holds a binding: one whose host path did not resolve it dropped ("can't sanitize - * binding"). 1, 0, or -1 when that cannot be told now. */ static pthread_mutex_t bind_lock = PTHREAD_MUTEX_INITIALIZER; static int held(struct bind *bd) { if (!__atomic_load_n(&bd->canon, __ATOMIC_ACQUIRE)) { @@ -290,16 +252,12 @@ static int held(struct bind *bd) { return !bd->dropped; } -/* ---------------------------------------------------------------- guest <-> host */ -/* Guest paths never answered here: bindings onto /proc/self, which proot resolves as its own. */ static int reserved(const char *g) { return under(g, "/dev/fd", 7) || under(g, "/dev/stdin", 10) || under(g, "/dev/stdout", 11) || under(g, "/dev/stderr", 11); } -/* The binding a canonical guest path is under (the longest guest prefix; of two for the same guest - * path, proot keeps the last), or NULL for the rootfs. -1 when it cannot be told. */ static int bind_of(const char *g, struct bind **out) { struct bind *bd = NULL; for (int i = 0; i < nbinds; i++) { @@ -312,7 +270,6 @@ static int bind_of(const char *g, struct bind **out) { return 0; } -/* The host path proot gives the kernel for a canonical guest path; -1 when it cannot be told. */ static int to_host(const char *g, char *host, struct bind **through) { struct bind *bd; if (bind_of(g, &bd) < 0) return -1; @@ -322,8 +279,6 @@ static int to_host(const char *g, char *host, struct bind **through) { return n < PATH_MAX ? 0 : -1; } -/* A guest directory proot only shows as glue: missing in the rootfs, with a binding below it. - * -1 when it cannot be told. */ static int glue_above_binding(const char *g, size_t len) { int glue = 0; for (int i = 0; i < nbinds && glue == 0; i++) @@ -331,13 +286,6 @@ static int glue_above_binding(const char *g, size_t len) { return glue; } -/* - * The k-th guest path proot could name a canonical host path by (the cwd, a dirfd), as its - * detranslation does: inside the rootfs, the rootfs's view of it, whatever is bound; elsewhere the - * binding with the deepest host path - two bindings of the same host path are two names, and which - * one proot uses depends on its list order. A name must also map back to the path, i.e. no longer - * binding hides it. 0, or -1 when there is no k-th. - */ static int guest_name(const char *h, int k, char *g) { char back[PATH_MAX]; size_t deepest = 0; @@ -359,7 +307,6 @@ static int guest_name(const char *h, int k, char *g) { return -1; } -/* The one guest path that names a host path, or -1. */ static int to_guest(const char *h, char *g, size_t size) { char other[PATH_MAX]; if (size < PATH_MAX || guest_name(h, 0, g) < 0) return -1; @@ -368,8 +315,6 @@ static int to_guest(const char *h, char *g, size_t size) { return 0; } -/* A host path or link text proot shows for a host path it read from a /proc link: in guest terms - * when the rootfs or a binding holds it, else as it is (a pipe, a socket, a path outside the guest). */ static int guest_text(const char *h, char *g) { int in = h[0] == '/' && under(h, root, rootlen); for (int i = 0; h[0] == '/' && !in && i < nbinds; i++) { @@ -382,8 +327,6 @@ static int guest_text(const char *h, char *g) { return 0; } -/* The binding proot's get_binding(HOST) finds for a host path outside the rootfs: the deepest host - * prefix. -1 for none, -2 when it cannot be told (two at that depth with different guest paths). */ static int host_bind(const char *h) { int found = -1; for (int i = 0; i < nbinds; i++) { @@ -396,11 +339,6 @@ static int host_bind(const char *h) { return found == -3 ? -2 : found; } -/* - * proot's detranslate_path() for the text of a link outside /proc whose own host path is `at`: - * text into the binding the link itself is in shows under that binding's guest path, other text - * naming the rootfs loses the rootfs prefix. 1 when rewritten, 0 when not, or FP_SLOW. - */ static long detranslated(char *text, const char *at) { if (text[0] != '/') return 0; if (!under(at, root, rootlen) && !under(text, root, rootlen)) { @@ -421,10 +359,9 @@ static long detranslated(char *text, const char *at) { return 1; } -/* ---------------------------------------------------------------- resolved directories */ #define SLOTS 512 -#define SLOT_PATH 256 /* longer directories are resolved every time */ +#define SLOT_PATH 256 struct slot { long long stamp; unsigned hash; unsigned gen; char literal[SLOT_PATH]; char guest[SLOT_PATH]; }; static struct slot cache[SLOTS]; static unsigned generation; @@ -441,7 +378,6 @@ static unsigned hash_of(const char *s) { return h; } -/* Something here changed which paths name which directories. */ static void forget(void) { __atomic_add_fetch(&generation, 1, __ATOMIC_RELEASE); } static int cached(const char *literal, unsigned h, char *guest) { @@ -467,12 +403,6 @@ static void remember(const char *literal, unsigned h, const char *guest) { pthread_mutex_unlock(&cache_lock); } -/* - * A binding below a symlink: proot canonicalised its guest path when it set it up - * (initialize_binding), so -b X:/sys/class/thermal/thermal_zone1/type binds the link's target, - * /sys/devices/virtual/thermal/thermal_zone1/type, and a path through the link meets it there. - * Known here by its literal text only, it would be missed; such a path is left to proot. - */ static int binding_below(const char *g) { size_t len = strlen(g); for (int i = 0; i < nbinds; i++) @@ -480,14 +410,7 @@ static int binding_below(const char *g) { return 0; } -/* ---------------------------------------------------------------- resolution */ -/* - * Where a resolution ended: the canonical guest path, its host path and, when it exists, its lstat. - * `libc` asks for links to be read as glibc's realpath() reads them, through readlink; `moving` is - * set once the answer depends on the caller (a /proc link), so it is not remembered. `magic`: it - * ends on /proc/<pid>/fd/N, which proot leaves for the kernel to follow; st is what it leads to. - */ struct res { char guest[PATH_MAX]; char host[PATH_MAX]; @@ -499,12 +422,10 @@ struct res { int magic; }; -/* A directory removed while open: the kernel names it "<path> (deleted)". */ static int gone(const char *h, size_t n) { return n > 10 && strcmp(h + n - 10, " (deleted)") == 0; } -/* The guest cwd proot keeps for this process, as the kernel's cwd names it. */ static long own_cwd(char *g) { char h[PATH_MAX]; long n = sc(SYS_readlinkat, AT_FDCWD, (long)"/proc/self/cwd", (long)h, sizeof h - 1, 0); @@ -514,7 +435,6 @@ static long own_cwd(char *g) { return (long)strlen(g); } -/* The program proot started this process with, asked of proot once: it is its own record. */ static char exe_text[PATH_MAX]; static int exe_len; static long own_exe(char *g) { @@ -537,12 +457,6 @@ static long own_exe(char *g) { return t; } -/* - * What proot's readlink() answers for the link r names under /proc (readlink_proc2, then - * detranslate_path): exe, cwd and root of a process it traces from its own records, every other - * link as the kernel has it with a host path put in guest terms. `changed` is set when that differs - * from the kernel's text, which is cut to `size` (0: no limit) before proot reads it. - */ static long proc_readlink(const struct res *r, char *text, size_t size, int *changed) { const char *name = strrchr(r->guest, '/') + 1; size_t blen = name - 1 - r->guest; @@ -566,7 +480,6 @@ static long proc_readlink(const struct res *r, char *text, size_t size, int *cha return (long)strlen(text); } -/* /proc/<pid>/fd/N. */ static int fd_link(const char *g) { const char *p = g + 6; if (strncmp(g, "/proc/", 6) != 0 || *p < '1' || *p > '9') return 0; @@ -575,11 +488,6 @@ static int fd_link(const char *g) { return 1; } -/* - * A link met under /proc while resolving, as canonicalize() reads it: /proc/self and - * /proc/thread-self name the caller for proot as for the kernel, the others are what proot's - * readlink() gives. 0 for /proc/<pid>/fd/N named last, which proot does not follow itself. - */ static long proc_link(struct res *r, char *text, int final) { int changed; if (!under(r->host, "/proc", 5)) return FP_SLOW; @@ -603,20 +511,10 @@ static int pop(char *g) { return 0; } -/* The final component is there for the call to meet but could not be looked at (sysfs and /proc - * nodes the app may not stat): proot leaves it to the kernel too. Only callers that act on r->host - * alone ask for it with MAY_BE_UNSEEN; to the others it is FP_SLOW. */ #define UNSEEN 2 #define MAY_BE_UNSEEN 2 -/* The final component is proot's glue: a directory, but not one the kernel has. */ #define GLUE 3 -/* - * Resolves `text` below r->guest (an existing canonical directory; "/" for an absolute text), as - * canonicalize() does. The final component is followed when `follow` is set; `last`: it is also the - * last of the whole path. 0 with r->exists set, 1 when only the final component is missing, - * UNSEEN, GLUE, -errno, or FP_SLOW. - */ static long walk(struct res *r, const char *text, int follow, int last) { char rest[PATH_MAX]; size_t len = strlen(text); @@ -646,9 +544,6 @@ static long walk(struct res *r, const char *text, int follow, int last) { if (to_host(r->guest, r->host, &through) < 0) return FP_SLOW; long s = sc(SYS_newfstatat, AT_FDCWD, (long)r->host, (long)&r->st, AT_SYMLINK_NOFOLLOW, 0); if (s < 0) { - /* A directory above a binding that proot could not look at when it set the binding up (one - * missing, or debugfs) is its glue; any other component it cannot look at is ENOENT unless it - * is the last, which the call itself then meets. */ int glue = glue_above_binding(r->guest, glen + n); if (glue < 0) return FP_SLOW; if (glue) { @@ -656,7 +551,6 @@ static long walk(struct res *r, const char *text, int follow, int last) { c = e; continue; } - /* glibc's realpath() meets it as its readlink() fails. */ if (!final || !last) return r->libc ? s : -ENOENT; return s == -ENOENT ? 1 : UNSEEN; } @@ -695,7 +589,6 @@ static long walk(struct res *r, const char *text, int follow, int last) { c = e; } if (!stated) { - /* Ended on the root, ".", ".." or glue: the directory itself. */ if (to_host(r->guest, r->host, NULL) < 0) return FP_SLOW; long s = sc(SYS_newfstatat, AT_FDCWD, (long)r->host, (long)&r->st, AT_SYMLINK_NOFOLLOW, 0); if (s < 0 && strcmp(r->guest, "/") != 0 && glue_above_binding(r->guest, strlen(r->guest))) return FP_SLOW; @@ -705,8 +598,6 @@ static long walk(struct res *r, const char *text, int follow, int last) { return 0; } -/* The host directory a relative path starts in; -ENOTDIR, as proot answers, for a descriptor that - * is no file-system object (a pipe, a socket), or -1. */ static int base_of(int dirfd, char *h) { char link[40]; if (dirfd == AT_FDCWD) snprintf(link, sizeof link, "/proc/self/cwd"); @@ -718,19 +609,12 @@ static int base_of(int dirfd, char *h) { return gone(h, n) ? -1 : 0; } -/* - * Resolves the guest path `base`/`path` (base NULL for an absolute path). Directories are looked - * up in the cache by their literal absolute path; only a path with ".." in it is resolved in full. - * A trailing "/" asks for an existing directory, as the kernel does; what a missing one creates is - * the caller's to check. - */ static long resolve_in(const char *base, const char *path, int follow, struct res *r) { char norm[PATH_MAX]; size_t o = 0; int dotdot = 0; size_t plen = strlen(path); int trailing = plen > 1 && path[plen - 1] == '/'; - /* "//" and "/./" go; ".." stays, it is not lexical once symlinks are involved. */ for (int part = base ? 0 : 1; part < 2; part++) { for (const char *c = part ? path : base; *c;) { while (*c == '/') c++; @@ -771,12 +655,6 @@ static long resolve_in(const char *base, const char *path, int follow, struct re return w; } -/* - * Resolves `path` relative to dirfd, as the guest means it. When the starting directory has two - * guest names (a library bound twice), proot resolves from the one it was reached by, which is - * not known here: the answer stands only if every name leads to the same place. r->named is set - * when the result's guest path is the one proot would report (realpath). - */ static __attribute__((noinline)) long same_from_other_names(const char *h, const char *path, int follow, long rs, const struct res *r) { char base[PATH_MAX]; @@ -811,12 +689,10 @@ static long resolve_as(int dirfd, const char *path, int how, int libc, struct re return rs == UNSEEN && !(how & MAY_BE_UNSEEN) ? FP_SLOW : rs; } -/* `how`: whether to follow a final link (1), and MAY_BE_UNSEEN. */ static long resolve(int dirfd, const char *path, int how, struct res *r) { return resolve_as(dirfd, path, how, 0, r); } -/* "name/" makes the kernel follow a final link; calls that act on the link itself leave it to proot. */ static int trailing_slash(const char *path) { size_t len = path ? strlen(path) : 0; return len > 1 && path[len - 1] == '/'; @@ -831,11 +707,9 @@ static int ret(long r) { static __typeof__(type) real_##name; \ if (!real_##name) real_##name = (type)dlsym(RTLD_NEXT, #name) -/* An answer from here (r != FP_SLOW) or the real call. */ #define ANSWER(r, dirfd, path, real_call) \ do { long r_ = (r); if (r_ != FP_SLOW) { hits++; return ret(r_); } missed(__func__, dirfd, path); return real_call; } while (0) -/* ---------------------------------------------------------------- open */ static long fp_open(int dirfd, const char *path, int flags, mode_t mode) { struct res r; @@ -846,7 +720,6 @@ static long fp_open(int dirfd, const char *path, int flags, mode_t mode) { if (rs < 0) return rs; if (rs == 1 && !(flags & O_CREAT)) return -ENOENT; if (rs == UNSEEN) return sc(SYS_openat, AT_FDCWD, (long)r.host, flags, (flags & O_CREAT) ? mode : 0, 0); - /* Resolved here: the kernel must not follow a link that appeared since in host terms. */ return sc(SYS_openat, AT_FDCWD, (long)r.host, flags | (follow && !r.magic ? O_NOFOLLOW : 0), (flags & O_CREAT) ? mode : 0, 0); } @@ -879,11 +752,9 @@ int __openat64_2(int d, const char *path, int flags) { return openat(d, path, fl int creat(const char *path, mode_t mode) { return open(path, O_WRONLY | O_CREAT | O_TRUNC, mode); } int creat64(const char *path, mode_t mode) __attribute__((alias("creat"))); -/* ---------------------------------------------------------------- stat family */ static long fp_stat(int dirfd, const char *path, int flags, struct stat *st) { struct res r; - /* fstat() is fstatat(fd, "", AT_EMPTY_PATH): nothing to translate. */ if ((flags & AT_EMPTY_PATH) && path && !path[0] && fp_ready()) return sc(SYS_newfstatat, dirfd, (long)"", (long)st, flags, 0); if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT)) return FP_SLOW; @@ -916,8 +787,6 @@ int lstat(const char *path, struct stat *st) { } int lstat64(const char *p, struct stat64 *st) { return lstat(p, (struct stat *)st); } -/* glibc turns fstat() into fstatat(fd, "", AT_EMPTY_PATH), which proot traps as a path call; the - * plain syscall is not traced at all. */ int fstat(int fd, struct stat *st) { REAL(fstat, int (*)(int, struct stat *)); if (!fp_ready()) return real_fstat(fd, st); @@ -926,13 +795,6 @@ int fstat(int fd, struct stat *st) { } int fstat64(int fd, struct stat64 *st) { return fstat(fd, (struct stat *)st); } -/* - * The pre-2.33 entry points. Programs linked against an older glibc - the Steam client, - * steamclient.so and filesystem_stdio.so among them - call these rather than stat(), so without - * them every stat the client makes goes to proot: a download's preallocation stats each file it - * creates. On aarch64 the only version is 0 (_STAT_VER), whose struct stat is the one above; - * glibc refuses any other with EINVAL, and so does this. - */ #define FP_STAT_VER 0 static int xstat_common(int ver, int dirfd, const char *path, struct stat *st, int flags) { REAL(fstatat, int (*)(int, const char *, struct stat *, int)); @@ -967,10 +829,7 @@ int statx(int dirfd, const char *path, int flags, unsigned mask, struct statx *o ANSWER(rs, dirfd, path, real_statx(dirfd, path, flags, mask, out)); } -/* ---------------------------------------------------------------- access */ -/* AT_EACCESS only differs from a plain check in a set-ID program, where glibc does the work itself; - * elsewhere glibc's own fallback is the plain faccessat, and so is this. */ static int effective_is_real(void) { return !getauxval(AT_SECURE) && getuid() == geteuid() && getgid() == getegid(); } @@ -979,8 +838,6 @@ static int access_common(int dirfd, const char *path, int mode, int flags) { REAL(faccessat, int (*)(int, const char *, int, int)); struct res r; if ((flags & AT_EACCESS) && effective_is_real()) flags &= ~AT_EACCESS; - /* faccessat(2) has no flags; AT_SYMLINK_NOFOLLOW (the Steam client passes it for every file it - * reserves) only differs on a symlink, which goes to proot. */ long rs = (flags & ~AT_SYMLINK_NOFOLLOW) == 0 ? resolve(dirfd, path, (flags & AT_SYMLINK_NOFOLLOW ? 0 : 1) | MAY_BE_UNSEEN, &r) : FP_SLOW; if (rs == 1) rs = -ENOENT; @@ -988,7 +845,6 @@ static int access_common(int dirfd, const char *path, int mode, int flags) { if (rs == 0 || rs == UNSEEN) rs = sc(SYS_faccessat, AT_FDCWD, (long)r.host, mode, 0, 0); if (rs != FP_SLOW) { hits++; return ret(rs); } missed(__func__, dirfd, path); - /* glibc tries faccessat2 first, which Android answers with SIGSYS: a second round trip. */ if (flags == 0) return (int)syscall(SYS_faccessat, dirfd, path, mode); return real_faccessat(dirfd, path, mode, flags); } @@ -997,13 +853,7 @@ int access(const char *path, int mode) { return access_common(AT_FDCWD, path, mo int eaccess(const char *path, int mode) { return access_common(AT_FDCWD, path, mode, AT_EACCESS); } int euidaccess(const char *path, int mode) __attribute__((alias("eaccess"))); -/* ---------------------------------------------------------------- readlink, realpath, getcwd */ -/* - * The text proot's readlink() gives for the link r names: the stored text as the kernel cuts it to - * `size` (0: no limit), detranslated. `changed`: proot wrote its own answer rather than leaving the - * kernel's. - */ static long link_text(const struct res *r, char *text, size_t size, int *changed) { int in_proc = under(r->guest, "/proc", 5); *changed = 0; @@ -1040,8 +890,6 @@ static ssize_t readlink_common(int dirfd, const char *path, char *buf, size_t si memcpy(buf, text, n); return n; } - /* As proot writes its answer: with the terminator when it fits, else cut at the buffer (or - * PATH_MAX) and reported as that long. */ size_t max = size < PATH_MAX ? size : PATH_MAX; if (n + 1 < max) { memcpy(buf, text, n + 1); @@ -1053,8 +901,6 @@ static ssize_t readlink_common(int dirfd, const char *path, char *buf, size_t si ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t size) { return readlink_common(dirfd, path, buf, size); } ssize_t readlink(const char *path, char *buf, size_t size) { return readlink_common(AT_FDCWD, path, buf, size); } -/* _FORTIFY_SOURCE builds call these, which reach libc's own readlink and getcwd directly; an - * overflow is still the real one's to report. */ ssize_t __readlink_chk(const char *path, char *buf, size_t size, size_t room) { REAL(__readlink_chk, ssize_t (*)(const char *, char *, size_t, size_t)); if (size > room) return real___readlink_chk(path, buf, size, room); @@ -1066,9 +912,6 @@ ssize_t __readlinkat_chk(int dirfd, const char *path, char *buf, size_t size, si return readlink_common(dirfd, path, buf, size); } -/* glibc's realpath() reads every component as a link, each a trapped readlinkat with an exit stop: - * wineserver and Wine resolve their prefix that way for every file they open, and a file's name - * through /proc/self/fd. */ char *realpath(const char *path, char *resolved) { REAL(realpath, char *(*)(const char *, char *)); struct res r; @@ -1093,8 +936,6 @@ char *__realpath_chk(const char *path, char *resolved, size_t size) { } char *canonicalize_file_name(const char *path) { return realpath(path, NULL); } -/* proot keeps the guest cwd and answers getcwd on the way out; with the fast path the kernel's cwd - * is its host directory, which names it whenever only one guest path does. */ char *getcwd(char *buf, size_t size) { REAL(getcwd, char *(*)(char *, size_t)); char g[PATH_MAX]; @@ -1117,7 +958,6 @@ char *__getcwd_chk(char *buf, size_t size, size_t room) { return getcwd(buf, size); } -/* ---------------------------------------------------------------- changes */ int mkdirat(int dirfd, const char *path, mode_t mode) { REAL(mkdirat, int (*)(int, const char *, mode_t)); @@ -1128,7 +968,6 @@ int mkdirat(int dirfd, const char *path, mode_t mode) { } int mkdir(const char *path, mode_t mode) { return mkdirat(AT_FDCWD, path, mode); } -/* The last name in a path is "." or "..", which the kernel refuses to remove. */ static int ends_in_dots(const char *path) { size_t n = strlen(path); while (n > 1 && path[n - 1] == '/') n--; @@ -1143,7 +982,6 @@ static long fp_unlink(int dirfd, const char *path, int flags) { int slash = trailing_slash(path); if ((flags & ~AT_REMOVEDIR) || !path || ends_in_dots(path) || (slash && !(flags & AT_REMOVEDIR))) return FP_SLOW; if (slash) { - /* rmdir("dir/") removes dir itself, never what a link of that name points to. */ size_t n = strlen(path); if (n >= sizeof bare) return FP_SLOW; while (n > 1 && path[n - 1] == '/') n--; @@ -1172,8 +1010,6 @@ int unlinkat(int dirfd, const char *path, int flags) { return unlink_common(dirf int unlink(const char *path) { return unlink_common(AT_FDCWD, path, 0); } int rmdir(const char *path) { return unlink_common(AT_FDCWD, path, AT_REMOVEDIR); } -/* A renamed directory moves the guest cwd proot keeps for every process under it, so those stay - * with proot; files are what programs rename all the time (write a copy, rename it over). */ static int rename_common(int olddirfd, const char *old, int newdirfd, const char *new, unsigned flags) { REAL(renameat2, int (*)(int, const char *, int, const char *, unsigned)); struct res from, to; @@ -1192,7 +1028,6 @@ static int rename_common(int olddirfd, const char *old, int newdirfd, const char } if (rs != FP_SLOW) { hits++; return ret(rs); } missed(__func__, olddirfd, old); - /* renameat, not renameat2: it is the one proot follows to move the cwd it keeps. */ if (!flags) return (int)syscall(SYS_renameat, olddirfd, old, newdirfd, new); return real_renameat2(olddirfd, old, newdirfd, new, flags); } @@ -1202,7 +1037,6 @@ int renameat2(int olddirfd, const char *old, int newdirfd, const char *new, unsi int renameat(int olddirfd, const char *old, int newdirfd, const char *new) { return rename_common(olddirfd, old, newdirfd, new, 0); } int rename(const char *old, const char *new) { return rename_common(AT_FDCWD, old, AT_FDCWD, new, 0); } -/* The link's text is stored as given, as proot stores it. */ int symlinkat(const char *target, int dirfd, const char *path) { REAL(symlinkat, int (*)(const char *, int, const char *)); struct res r; @@ -1230,7 +1064,7 @@ static int utimens_common(int dirfd, const char *path, const struct timespec tim struct res r; long rs; if (!path && fp_ready()) { - rs = sc(SYS_utimensat, dirfd, 0, (long)times, flags, 0); /* futimens() */ + rs = sc(SYS_utimensat, dirfd, 0, (long)times, flags, 0); } else { rs = flags & ~AT_SYMLINK_NOFOLLOW ? FP_SLOW : resolve(dirfd, path, (flags & AT_SYMLINK_NOFOLLOW ? 0 : 1) | MAY_BE_UNSEEN, &r); if (rs == 1) rs = -ENOENT; @@ -1273,7 +1107,6 @@ int truncate(const char *path, off_t length) { } int truncate64(const char *path, off_t length) __attribute__((alias("truncate"))); -/* proot reports /dev/shm as tmpfs on the way out of statfs; that stays with it. */ static int statfs_common(const char *path, struct statfs *buf, int (*real)(const char *, struct statfs *)) { struct res r; long rs = resolve(AT_FDCWD, path, 1, &r); @@ -1291,9 +1124,9 @@ int statfs64(const char *path, struct statfs64 *buf) { return statfs_common(path, (struct statfs *)buf, real_statfs64); } -#define FP_ST_VALID 0x0020 /* the kernel's ST_VALID: statfs filled in f_flags */ -/* statvfs() is statfs() converted as glibc converts it; without ST_VALID the mount flags would come - * from /proc/mounts, which glibc reads itself. */ +#define FP_ST_VALID 0x0020 + + static int statvfs_common(const char *path, struct statvfs *buf, int (*real)(const char *, struct statvfs *)) { struct res r; struct statfs fs; @@ -1328,8 +1161,6 @@ int statvfs64(const char *path, struct statvfs64 *buf) { return statvfs_common(path, (struct statvfs *)buf, real_statvfs64); } -/* Reading attributes only: fake_id0 rewrites the permission side of setting them. Wine reads - * user.DOSATTRIB for every file it reports on. */ static ssize_t getxattr_common(const char *path, const char *name, void *value, size_t size, int follow, ssize_t (*real)(const char *, const char *, void *, size_t)) { struct res r; @@ -1377,16 +1208,68 @@ int inotify_add_watch(int fd, const char *path, uint32_t mask) { ANSWER(rs, AT_FDCWD, path, real_inotify_add_watch(fd, path, mask)); } -/* ---------------------------------------------------------------- Unix sockets */ -/* - * proot only translates the path of a named Unix socket; every other address (abstract, unnamed, - * IP) passes through untouched, so the call itself needs no stop. A named one is resolved as proot - * would and sent with its host path, as long as that fits sun_path: a longer one proot binds to a - * short temporary name, so that stays with it. - */ -static long socket_address(const struct sockaddr *addr, socklen_t len, int follow, struct sockaddr_un *out, socklen_t *out_len) { +/* The kernel reports a socket named through /proc/self/fd/N/<name> under that name: map it back, per socket. */ +enum { LONG_SELF, LONG_PEER }; +static struct { unsigned long ino; int kind; char name[sizeof ((struct sockaddr_un *)0)->sun_path]; char guest[sizeof ((struct sockaddr_un *)0)->sun_path]; } long_names[64]; +static unsigned long_next; +static pthread_mutex_t long_lock = PTHREAD_MUTEX_INITIALIZER; + +static const char *fd_name(const char *path) { + if (strncmp(path, "/proc/self/fd/", 14) != 0) return NULL; + const char *p = path + 14; + if (*p < '0' || *p > '9') return NULL; + while (*p >= '0' && *p <= '9') p++; + return *p == '/' && p[1] ? p + 1 : NULL; +} + +static unsigned long socket_ino(int fd) { + struct stat st; + return sc(SYS_newfstatat, fd, (long)"", (long)&st, AT_EMPTY_PATH, 0) == 0 ? (unsigned long)st.st_ino : 0; +} + +static void remember_long(int fd, int kind, const char *name, const char *guest) { + unsigned long ino = socket_ino(fd); + if (!ino || !name || strlen(name) >= sizeof long_names[0].name || strlen(guest) >= sizeof long_names[0].guest) return; + unsigned count = sizeof long_names / sizeof long_names[0], i = count; + pthread_mutex_lock(&long_lock); + for (unsigned n = 0; n < count && i == count; n++) + if (long_names[n].ino == ino && long_names[n].kind == kind) i = n; + if (i == count) i = long_next++ % count; + long_names[i].ino = ino; + long_names[i].kind = kind; + snprintf(long_names[i].name, sizeof long_names[i].name, "%s", name); + snprintf(long_names[i].guest, sizeof long_names[i].guest, "%s", guest); + pthread_mutex_unlock(&long_lock); +} + +static int long_entry(int fd, int kind, const char *name, char *guest, size_t size) { + unsigned long ino = socket_ino(fd); + int found = -1; + if (!ino || !name) return -1; + pthread_mutex_lock(&long_lock); + for (unsigned n = 0; n < sizeof long_names / sizeof long_names[0] && found < 0; n++) + if (long_names[n].ino == ino && long_names[n].kind == kind && strcmp(long_names[n].name, name) == 0 + && strlen(long_names[n].guest) < size) { + memcpy(guest, long_names[n].guest, strlen(long_names[n].guest) + 1); + found = 0; + } + pthread_mutex_unlock(&long_lock); + return found; +} + +static void remember_long_address(int fd, int kind, const struct sockaddr *addr, socklen_t len, const struct sockaddr_un *used) { const struct sockaddr_un *un = (const struct sockaddr_un *)addr; + char guest[sizeof un->sun_path + 1]; + size_t glen = strnlen(un->sun_path, len - offsetof(struct sockaddr_un, sun_path)); + memcpy(guest, un->sun_path, glen); + guest[glen] = 0; + remember_long(fd, kind, fd_name(used->sun_path), guest); +} + +static long socket_address(const struct sockaddr *addr, socklen_t len, int follow, struct sockaddr_un *out, socklen_t *out_len, long *dir) { + const struct sockaddr_un *un = (const struct sockaddr_un *)addr; + *dir = -1; size_t room = sizeof un->sun_path; if (!addr || len <= offsetof(struct sockaddr_un, sun_path) || addr->sa_family != AF_UNIX || un->sun_path[0] == 0) return 0; @@ -1402,17 +1285,24 @@ static long socket_address(const struct sockaddr *addr, socklen_t len, int follo if (rs == 1 && follow) return -ENOENT; if (r.magic) return FP_SLOW; size_t hlen = strlen(r.host); - if (hlen >= room) return FP_SLOW; memset(out, 0, sizeof *out); out->sun_family = AF_UNIX; - memcpy(out->sun_path, r.host, hlen + 1); + if (hlen >= room) { + /* proot would bind it to a temporary name the fast path cannot see: name it through its directory. */ + char *slash = strrchr(r.host, '/'); + if (!slash || slash == r.host) return FP_SLOW; + *slash = 0; + *dir = sc(SYS_openat, AT_FDCWD, (long)r.host, O_PATH | O_DIRECTORY | O_CLOEXEC, 0, 0); + if (*dir < 0) return FP_SLOW; + hlen = snprintf(out->sun_path, room, "/proc/self/fd/%ld/%s", *dir, slash + 1); + if (hlen >= room) { sc(SYS_close, *dir, 0, 0, 0, 0); *dir = -1; return FP_SLOW; } + } else { + memcpy(out->sun_path, r.host, hlen + 1); + } *out_len = offsetof(struct sockaddr_un, sun_path) + hlen + 1; return 1; } -/* accept() and connect() are cancellation points in libc; a raw call is not, so only those that - * cannot block for long come here: a non-blocking socket, a listener with a connection waiting, - * or connecting a Unix one. */ static int nonblocking(int fd) { long fl = sc(SYS_fcntl, fd, F_GETFL, 0, 0, 0); return fl >= 0 && (fl & O_NONBLOCK); @@ -1422,10 +1312,15 @@ int connect(int fd, const struct sockaddr *addr, socklen_t len) { REAL(connect, int (*)(int, const struct sockaddr *, socklen_t)); struct sockaddr_un un; socklen_t un_len; - long rs = fp_ready() ? socket_address(addr, len, 1, &un, &un_len) : FP_SLOW; + long dir = -1; + long rs = fp_ready() ? socket_address(addr, len, 1, &un, &un_len, &dir) : FP_SLOW; if (rs == 0 && !(addr && addr->sa_family == AF_UNIX) && !nonblocking(fd)) rs = FP_SLOW; if (rs == 0) rs = sc(SYS_connect, fd, (long)addr, len, 0, 0); else if (rs == 1) rs = sc(SYS_connect, fd, (long)&un, un_len, 0, 0); + if (dir >= 0) { + sc(SYS_close, dir, 0, 0, 0, 0); + if (rs == 0 || rs == -EINPROGRESS) remember_long_address(fd, LONG_PEER, addr, len, &un); + } ANSWER(rs, AT_FDCWD, "(connect)", real_connect(fd, addr, len)); } @@ -1433,15 +1328,18 @@ int bind(int fd, const struct sockaddr *addr, socklen_t len) { REAL(bind, int (*)(int, const struct sockaddr *, socklen_t)); struct sockaddr_un un; socklen_t un_len; - long rs = fp_ready() ? socket_address(addr, len, 0, &un, &un_len) : FP_SLOW; + long dir = -1; + long rs = fp_ready() ? socket_address(addr, len, 0, &un, &un_len, &dir) : FP_SLOW; if (rs == 0) rs = sc(SYS_bind, fd, (long)addr, len, 0, 0); else if (rs == 1) rs = sc(SYS_bind, fd, (long)&un, un_len, 0, 0); + if (dir >= 0) { + sc(SYS_close, dir, 0, 0, 0, 0); + if (rs == 0) remember_long_address(fd, LONG_SELF, addr, len, &un); + } ANSWER(rs, AT_FDCWD, "(bind)", real_bind(fd, addr, len)); } -/* An address the kernel reports, as proot reports it: a named Unix socket's host path in guest - * terms. One no guest path names unambiguously is left as is, which proot cannot do better. */ -static void report_address(const struct sockaddr_storage *got, socklen_t got_len, struct sockaddr *addr, socklen_t *len) { +static void report_address(int fd, int kind, const struct sockaddr_storage *got, socklen_t got_len, struct sockaddr *addr, socklen_t *len) { struct sockaddr_storage shown = *got; socklen_t shown_len = got_len; const struct sockaddr_un *un = (const struct sockaddr_un *)got; @@ -1451,7 +1349,7 @@ static void report_address(const struct sockaddr_storage *got, socklen_t got_len memcpy(h, un->sun_path, hl); h[hl] = 0; struct sockaddr_un *out = (struct sockaddr_un *)&shown; - if (to_guest(h, g, sizeof g) == 0 && strlen(g) < sizeof out->sun_path) { + if ((long_entry(fd, kind, fd_name(h), g, sizeof g) == 0 || to_guest(h, g, sizeof g) == 0) && strlen(g) < sizeof out->sun_path) { memset(out->sun_path, 0, sizeof out->sun_path); strcpy(out->sun_path, g); shown_len = offsetof(struct sockaddr_un, sun_path) + strlen(g) + 1; @@ -1462,6 +1360,22 @@ static void report_address(const struct sockaddr_storage *got, socklen_t got_len } +static void inherit_long_name(int listener, int accepted) { + unsigned long ino = socket_ino(listener); + char name[sizeof long_names[0].name], guest[sizeof long_names[0].guest]; + int found = -1; + if (!ino) return; + pthread_mutex_lock(&long_lock); + for (unsigned n = 0; n < sizeof long_names / sizeof long_names[0] && found < 0; n++) + if (long_names[n].ino == ino && long_names[n].kind == LONG_SELF) { + snprintf(name, sizeof name, "%s", long_names[n].name); + snprintf(guest, sizeof guest, "%s", long_names[n].guest); + found = 0; + } + pthread_mutex_unlock(&long_lock); + if (found == 0) remember_long(accepted, LONG_SELF, name, guest); +} + static int pending(int fd) { struct pollfd p = { .fd = fd, .events = POLLIN }; struct timespec now = { 0, 0 }; @@ -1472,11 +1386,12 @@ static int accept_common(int fd, struct sockaddr *addr, socklen_t *len, int flag REAL(accept4, int (*)(int, struct sockaddr *, socklen_t *, int)); if (!fp_ready() || (addr && !len) || (!nonblocking(fd) && !pending(fd))) { missed(__func__, AT_FDCWD, "(accept)"); return real_accept4(fd, addr, len, flags); } hits++; - if (!addr) return ret(sc(SYS_accept4, fd, 0, 0, flags, 0)); struct sockaddr_storage got; socklen_t got_len = sizeof got; - long r = sc(SYS_accept4, fd, (long)&got, (long)&got_len, flags, 0); - if (r >= 0) report_address(&got, got_len, addr, len); + long r = sc(SYS_accept4, fd, addr ? (long)&got : 0, addr ? (long)&got_len : 0, flags, 0); + if (r >= 0) inherit_long_name(fd, (int)r); + if (!addr) return ret(r); + if (r >= 0) report_address((int)r, LONG_PEER, &got, got_len, addr, len); return ret(r); } int accept4(int fd, struct sockaddr *addr, socklen_t *len, int flags) { return accept_common(fd, addr, len, flags); } @@ -1488,7 +1403,7 @@ static int name_common(long nr, int fd, struct sockaddr *addr, socklen_t *len, i struct sockaddr_storage got; socklen_t got_len = sizeof got; long r = sc(nr, fd, (long)&got, (long)&got_len, 0, 0); - if (r == 0) report_address(&got, got_len, addr, len); + if (r == 0) report_address(fd, nr == SYS_getsockname ? LONG_SELF : LONG_PEER, &got, got_len, addr, len); return ret(r); } int getsockname(int fd, struct sockaddr *addr, socklen_t *len) { @@ -1500,10 +1415,7 @@ int getpeername(int fd, struct sockaddr *addr, socklen_t *len) { return name_common(SYS_getpeername, fd, addr, len, real_getpeername); } -/* ---------------------------------------------------------------- libc calls that open internally */ -/* shm_open() and shm_unlink() open /dev/shm/<name> with libc's internal calls; an overlay asks for - * FEX's statistics that way every frame. The name is checked and the file opened as glibc does. */ static int shm_path(const char *name, char *path) { while (*name == '/') name++; size_t n = strlen(name); @@ -1561,8 +1473,6 @@ static FILE *fopen_common(const char *path, const char *m, FILE *(*real)(const c FILE *fopen(const char *path, const char *m) { REAL(fopen, FILE *(*)(const char *, const char *)); return fopen_common(path, m, real_fopen); } FILE *fopen64(const char *path, const char *m) { REAL(fopen64, FILE *(*)(const char *, const char *)); return fopen_common(path, m, real_fopen64); } -/* glibc reads /sys/devices/system/cpu/online with its own open for every get_nprocs(), and - * sysconf(_SC_NPROCESSORS_ONLN) is that: overlays and thread pools ask it every frame. */ static int online_cpus(void) { long fd = fp_open(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY | O_CLOEXEC, 0); if (fd < 0) return -1; @@ -1595,11 +1505,7 @@ long sysconf(int name) { return real_sysconf(name); } -/* ---------------------------------------------------------------- uname */ -/* proot answers uname() with the utsname it started with (--kernel-release), the same for every - * call: asked once, it is every later answer. libX11 asks for each display connection, glibc's - * gethostname() through it. */ static struct utsname uts; static int uts_known; static long own_uname(struct utsname *u) { @@ -1639,8 +1545,6 @@ int gethostname(char *name, size_t len) { return 0; } -/* glibc's isatty() asks with TCGETS2, which proot rewrites to TCGETS (Android allows no termios2 - * request on a tty): one stop each way for every check. libudev and shells check all the time. */ int isatty(int fd) { REAL(isatty, int (*)(int)); struct termios k; @@ -1651,9 +1555,6 @@ int isatty(int fd) { return r == 0; } -/* proot reads a memfd's name only to refuse the few that are then executed or locked; the rest are - * made here. The session's /proc/net and status copies, wineserver and Xwayland make them often. - * Without memfd in the kernel, proot's ashmem stands in. */ int memfd_create(const char *name, unsigned flags) { REAL(memfd_create, int (*)(const char *, unsigned)); if (!name || !strncmp(name, "JITCode:", 8) || !strcmp(name, "opcache_lock") || !strncmp(name, "lib/apk/exec/", 13) @@ -1664,16 +1565,7 @@ int memfd_create(const char *name, unsigned flags) { return ret(r); } -/* ---------------------------------------------------------------- passwd */ -/* - * glibc's NSS stats /etc/nsswitch.conf and reads /etc/passwd with its own calls on every lookup, - * two stops each: Xwayland looks a user up for every client, every shell for itself. When - * nsswitch.conf sends passwd to "files" first with no action after it, a lookup that finds its - * entry there ends there, so that case is answered here from the same file. Anything else - not - * found, a file nss_files might read differently from this strict reading, a buffer it might call - * too small - goes to glibc. - */ static long read_small(const char *path, char *buf, size_t size) { long fd = fp_open(AT_FDCWD, path, O_RDONLY | O_CLOEXEC, 0); if (fd < 0) return -1; @@ -1707,8 +1599,6 @@ static int passwd_is_files(char *conf, size_t size) { return found; } -/* The line for `name` (or `uid`, name NULL) split in place into its seven fields; -1 for a file - * read strictly that has none, 0 when this cannot tell. `longest`: the longest line read up to it. */ static int passwd_line(char *file, const char *name, uid_t uid, char **f, size_t *longest) { *longest = 0; for (char *line = file; line && *line;) { @@ -1733,7 +1623,6 @@ static int passwd_line(char *file, const char *name, uid_t uid, char **f, size_t return -1; } -/* 1 with *pw filled from buf, 0 to leave it to glibc. */ static int own_passwd(const char *name, uid_t uid, struct passwd *pw, char *buf, size_t buflen) { char file[16384], *f[7]; size_t longest; @@ -1783,7 +1672,6 @@ int getpwuid_r(uid_t uid, struct passwd *pw, char *buf, size_t buflen, struct pa return passwd_r(NULL, uid, pw, buf, buflen, result, NULL, real_getpwuid_r); } -/* glibc's own getpwnam/getpwuid keep one static entry, as these do. */ static struct passwd static_pw; static char static_pw_buf[4096]; static pthread_mutex_t static_pw_lock = PTHREAD_MUTEX_INITIALIZER; diff --git a/tools/proot/patches/0004-seccomp-filter-by-argument.patch b/tools/proot/patches/0004-seccomp-filter-by-argument.patch index 302a97eba2..f5497337da 100644 --- a/tools/proot/patches/0004-seccomp-filter-by-argument.patch +++ b/tools/proot/patches/0004-seccomp-filter-by-argument.patch @@ -101,8 +101,8 @@ index 6d1ba47..8557d4a 100644 * Append to @program->filter the statements that allow anything (if - * unfiltered). Note that @nb_traced_syscalls is used to make a - * sanity check. This function returns -errno if an error occurred, -+ * unfiltered). Note that @section_length is used to make a sanity -+ * check. This function returns -errno if an error occurred, ++ ++ * otherwise 0. */ -static int end_arch_section(struct sock_fprog *program, size_t nb_traced_syscalls) @@ -125,7 +125,7 @@ index 6d1ba47..8557d4a 100644 /** * Append to @program->filter the statements that check the current - * @architecture. Note that @nb_traced_syscalls is used to make a -+ * @architecture. Note that @section_length is used to make a ++ * sanity check. This function returns -errno if an error occurred, * otherwise 0. */ diff --git a/tools/proot/patches/0010-new-mount-api-enosys.patch b/tools/proot/patches/0010-new-mount-api-enosys.patch index 87fd43d1f6..f10c1fb2a7 100644 --- a/tools/proot/patches/0010-new-mount-api-enosys.patch +++ b/tools/proot/patches/0010-new-mount-api-enosys.patch @@ -15,8 +15,8 @@ index 1d3b3fd..32d2503 100644 status = -ENOSYS; break; -+ /* The new mount API opens and moves paths proot never sees: open_tree(AT_FDCWD, "/") -+ * hands back the host's root. Callers (libglnx, systemd) fall back to openat. */ ++ ++ + case PR_open_tree: + case PR_move_mount: + case PR_fspick: diff --git a/tools/proot/patches/0011-kompat-utsname-only.patch b/tools/proot/patches/0011-kompat-utsname-only.patch index 9c1949cce5..407970b256 100644 --- a/tools/proot/patches/0011-kompat-utsname-only.patch +++ b/tools/proot/patches/0011-kompat-utsname-only.patch @@ -16,9 +16,9 @@ index 5c39942..4cb7dec 100644 FILTERED_SYSNUM_END, }; -+/* When the virtual kernel is not older than the actual one and the -+ * hwcap is left alone, the only thing left to emulate is the utsname -+ * itself: every other handler above returns without a change. */ ++ ++ ++ +static FilteredSysnum utsname_only_sysnums[] = { + { PR_setdomainname, FILTER_SYSEXIT }, + { PR_sethostname, FILTER_SYSEXIT }, @@ -26,12 +26,12 @@ index 5c39942..4cb7dec 100644 + FILTERED_SYSNUM_END, +}; + -+/** -+ * Return whether @config only renames the kernel identity (nodename, -+ * domainname, version string) without emulating an older kernel or -+ * another hwcap, in which case futex, fcntl, epoll_pwait, ... don't -+ * have to stop in the tracer and the vDSO can be left in place. -+ */ ++ ++ ++ ++ ++ ++ +static bool utsname_only(const Config *config) +{ + return config->actual_release != 0 diff --git a/tools/proot/patches/0012-android-hardlink-denial.patch b/tools/proot/patches/0012-android-hardlink-denial.patch index e2d089fb31..b8346a8cd9 100644 --- a/tools/proot/patches/0012-android-hardlink-denial.patch +++ b/tools/proot/patches/0012-android-hardlink-denial.patch @@ -19,7 +19,7 @@ index 8c3eb2e..4c28e10 100644 case PR_open: flags = peek_reg(tracee, CURRENT, SYSARG_2); +#ifdef __ANDROID__ -+ /* An O_TMPFILE file can only be named by linkat, which Android denies apps. */ ++ + if ((flags & __O_TMPFILE) != 0) { + status = -EOPNOTSUPP; + break; @@ -50,8 +50,8 @@ index df41084..5d981db 100644 break; +#ifdef __ANDROID__ -+ /* Android denies apps hard links with EACCES; EPERM is what callers such as -+ * libostree take as "no hard links here" and copy instead. */ ++ ++ + case PR_link: + case PR_linkat: + if ((int) syscall_result == -EACCES) diff --git a/tools/proot/patches/0012-fake_id0-identity-only.patch b/tools/proot/patches/0012-fake_id0-identity-only.patch index 155b62b8e9..73f9ac35e5 100644 --- a/tools/proot/patches/0012-fake_id0-identity-only.patch +++ b/tools/proot/patches/0012-fake_id0-identity-only.patch @@ -17,7 +17,7 @@ index 2e78783..5227ced 100644 #define FAKE_ID0_CONFIG_H #include <sys/types.h> /* uid_t, gid_t */ -+#include <stdbool.h> /* bool, */ ++#include <stdbool.h> typedef struct { uid_t ruid; @@ -26,8 +26,8 @@ index 2e78783..5227ced 100644 mode_t umask; + -+ /* The emulated ids are the ones PRoot really has: see -+ * identity_sysnums in fake_id0.c. */ ++ ++ + bool identity; } Config; @@ -40,17 +40,17 @@ index 9477f1c..fe08372 100644 FILTERED_SYSNUM_END, }; -+/* When the emulated ids are the ones PRoot really has, and the tracee -+ * is not root, every handler for the syscalls above but these is a -+ * no-op: stat and get*id report the real ids already, SCM_CREDENTIALS -+ * and SO_PEERCRED carry them, chown swaps an id for itself, and the -+ * permission and chroot fixups only apply to euid 0. The set*id -+ * family is still emulated (Android's app seccomp policy traps it) and -+ * so are the xattr permission fixups, which apply to any euid. An -+ * unprivileged set*id can only take an id the tracee already holds, -+ * and set-user-ID bits are not honoured in this mode (Android mounts -+ * the app's data nosuid, so the kernel would not honour them either), -+ * so the ids never change and the list stays sufficient. */ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +static FilteredSysnum identity_sysnums[] = { + { PR_fsetxattr, FILTER_SYSEXIT }, + { PR_lsetxattr, FILTER_SYSEXIT }, @@ -81,8 +81,8 @@ index 9477f1c..fe08372 100644 if ((int) result < 0 || tracee->status < 0 || sysnum != PR_execve) return 0; -+ /* The auxv already carries the real ids, and set-user-ID bits -+ * are not honoured in this mode: see identity_sysnums. */ ++ ++ + if (config->identity) + return 0; + diff --git a/tools/proot/patches/0013-seccomp-ioctl-by-request-and-kernel-exit-stops.patch b/tools/proot/patches/0013-seccomp-ioctl-by-request-and-kernel-exit-stops.patch index eaf62c5653..08fb2954cc 100644 --- a/tools/proot/patches/0013-seccomp-ioctl-by-request-and-kernel-exit-stops.patch +++ b/tools/proot/patches/0013-seccomp-ioctl-by-request-and-kernel-exit-stops.patch @@ -16,11 +16,11 @@ index 0b381bb..1116ab2 100644 #include <stdint.h> /* uint*_t, UINT*_MAX, */ #include <stdbool.h> #include <sys/resource.h> -+#include <sys/utsname.h> /* uname(2), */ -+#include <stdio.h> /* sscanf(3), */ -+#include <asm/ioctls.h> /* TCGETS2, TCSETS*2, */ -+#include <asm/termbits.h> /* struct termios2, */ -+#include <linux/fs.h> /* FICLONE, */ ++#include <sys/utsname.h> ++#include <stdio.h> ++#include <asm/ioctls.h> ++#include <asm/termbits.h> ++#include <linux/fs.h> #include <assert.h> /* assert(3), */ #include "syscall/seccomp.h" @@ -28,27 +28,27 @@ index 0b381bb..1116ab2 100644 return add_statements(program, LENGTH_TRACE_PRLIMIT_STACK, statements); } -+/** -+ * Append to @program->filter the statements that trace @syscall -+ * (ioctl) only for the requests enter.c and exit.c act on - the -+ * termios requests Android's policy denies an app on a pty, rewritten -+ * to ones it allows, and FICLONE, whose EACCES is turned into -+ * EOPNOTSUPP - and allow any other request at once. Every GPU submit -+ * and wait is an ioctl, so they no longer stop in the tracer, and the -+ * block is emitted first so they are also spared the rest of the list. -+ * (After WinNative, maxjivi05, 53836ca9.) -+ */ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +static int add_trace_ioctl_requests(struct sock_fprog *program, word_t syscall, int flag) +{ + const size_t request_offset = offsetof(struct seccomp_data, args[1]); + + #define LENGTH_TRACE_IOCTL 10 + struct sock_filter statements[LENGTH_TRACE_IOCTL] = { -+ /* Not this syscall: skip the block, the accumulator -+ * still holds the syscall number. */ ++ ++ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, syscall, 0, 9), + -+ /* Load the request's low word into the accumulator. */ ++ + BPF_STMT(BPF_LD + BPF_W + BPF_ABS, request_offset), + + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, TCSETSF, 5, 0), @@ -102,8 +102,8 @@ index 0b381bb..1116ab2 100644 if (status < 0) goto end; -+ /* Two passes: ioctl first, it is by far the most frequent -+ * syscall and almost every one of them is allowed. */ ++ ++ + for (pass = 0; pass < 2; pass++) for (j = 0; j < seccomp_archs[i].nb_abis; j++) { for (k = 0; sysnums[k].value != PR_void; k++) { @@ -117,15 +117,15 @@ index 0b381bb..1116ab2 100644 return 0; } -+/** -+ * Drop the exit stops PRoot only needs on kernels older than the one it -+ * runs on. The faccessat2 exit stop restores the arguments for glibc's -+ * fallback to faccessat on ENOSYS (kernels before 5.8, termux 5ba8b95); -+ * the statx one emulates the call when it fails, which only a kernel -+ * before 4.11 does for want of it - a statx Android's policy traps is -+ * emulated from SIGSYS instead. Both stops re-read and re-translate -+ * the path, and are paid on every call. -+ */ ++ ++ ++ ++ ++ ++ ++ ++ ++ +static void drop_unneeded_exit_stops(void) +{ + static bool done = false; diff --git a/tools/proot/patches/0014-fastpath-trampoline.patch b/tools/proot/patches/0014-fastpath-trampoline.patch index a865a50468..8daacbbee5 100644 --- a/tools/proot/patches/0014-fastpath-trampoline.patch +++ b/tools/proot/patches/0014-fastpath-trampoline.patch @@ -22,7 +22,7 @@ resolve where proot resolves them. Without PROOT_FASTPATH nothing changes. -#include <errno.h> /* errno(3), E* */ +#include <errno.h> -+#include <stdlib.h> /* errno(3), E* */ ++#include <stdlib.h> #include <talloc.h> /* talloc_*, */ #include <sys/un.h> /* struct sockaddr_un, */ #include <linux/net.h> /* SYS_*, */ @@ -30,15 +30,15 @@ resolve where proot resolves them. Without PROOT_FASTPATH nothing changes. if ((statl.st_mode & S_IXUSR) == 0) return -EACCES; -+ /* With the fast path, the kernel's cwd follows the guest's -+ * (at its host path), so relative lookups made inside the -+ * tracee resolve where proot would resolve them. */ ++ ++ ++ + if (getenv("PROOT_FASTPATH") != NULL) { + int fd = open(path, O_PATH | O_DIRECTORY | O_CLOEXEC); + -+ /* Where the kernel could not follow, it goes to the -+ * host's "/", which no binding names: the fast path -+ * then sends every relative lookup to proot. */ ++ ++ ++ + strcpy(oldpath, fd >= 0 ? path : "/"); + if (fd >= 0) + close(fd); @@ -52,7 +52,7 @@ resolve where proot resolves them. Without PROOT_FASTPATH nothing changes. talloc_set_name_const(tracee->fs->cwd, "$cwd"); + if (getenv("PROOT_FASTPATH") != NULL) { -+ /* fchdir(2) runs as it is; chdir(2) on the host path. */ ++ + status = syscall_number == PR_chdir + ? set_sysarg_path(tracee, oldpath, SYSARG_1) + : 0; @@ -68,7 +68,7 @@ resolve where proot resolves them. Without PROOT_FASTPATH nothing changes. #include <talloc.h> /* talloc_*, */ #include <errno.h> /* E*, */ #include <string.h> /* memcpy(3), */ -+#include <stdlib.h> /* getenv(3), */ ++#include <stdlib.h> #include <stddef.h> /* offsetof(3), */ #include <stdint.h> /* uint*_t, UINT*_MAX, */ #include <stdbool.h> @@ -76,11 +76,11 @@ resolve where proot resolves them. Without PROOT_FASTPATH nothing changes. * items). This function returns -errno if an error occurred, * otherwise 0. */ -+/* The fast path's trampoline page (tools/proot/fastpath): a traced syscall made from it was -+ * already translated inside the tracee and is let through without a stop. With PROOT_FASTPATH -+ * set, every SECCOMP_RET_TRACE is preceded by a check of the caller's address. The check sits -+ * after the syscall-number dispatch, so syscalls proot never traces stay constant-ALLOW and keep -+ * the kernel's seccomp action cache. FASTPATH_STUB_ADDR must match FP_STUB_ADDR in fastpath.c. */ ++ ++ ++ ++ ++ +#define FASTPATH_STUB_ADDR 0xffff00000ULL +#define FASTPATH_STUB_SIZE 0x1000ULL +#define LENGTH_FASTPATH_TAIL 7 @@ -102,8 +102,8 @@ resolve where proot resolves them. Without PROOT_FASTPATH nothing changes. +static int add_statements_raw(struct sock_fprog *program, size_t nb_statements, + struct sock_filter *statements); + -+/* Append @statements, each RET_TRACE expanded into the trampoline check when the fast path is -+ * on, every jump within (or out of) the block adjusted for the expansion. */ ++ ++ static int add_statements(struct sock_fprog *program, size_t nb_statements, struct sock_filter *statements) { @@ -176,7 +176,7 @@ resolve where proot resolves them. Without PROOT_FASTPATH nothing changes. + static size_t trace_length(Sysnum sysnum) { -+ /* Each trace block has exactly one RET_TRACE (see add_statements). */ ++ + return trace_length_raw(sysnum) + (fastpath_enabled() ? LENGTH_FASTPATH_TAIL - 1 : 0); +} + @@ -191,9 +191,9 @@ resolve where proot resolves them. Without PROOT_FASTPATH nothing changes. if (getenv("PROOT_NO_SECCOMP") == NULL) (void) enable_syscall_filtering(tracee); -+ /* The fast path resolves relative paths against the -+ * kernel's cwd: start it at the guest's (see chdir in -+ * syscall/enter.c). */ ++ ++ ++ + if (getenv("PROOT_FASTPATH") != NULL) { + char host_cwd[PATH_MAX]; + if (translate_path(tracee, host_cwd, AT_FDCWD, tracee->fs->cwd, true) >= 0) diff --git a/tools/proot/patches/0015-lost-fork-events.patch b/tools/proot/patches/0015-lost-fork-events.patch new file mode 100644 index 0000000000..d3912abf44 --- /dev/null +++ b/tools/proot/patches/0015-lost-fork-events.patch @@ -0,0 +1,315 @@ +Subject: [PATCH] recover zero child IDs, resolving ambiguous threads at clone exit + +Use a unique procfs match for delivered creation events with a zero child +PID. When concurrent thread clones are ambiguous, keep the creator's real +flags and obtain its exact child TID from the clone syscall return value. +Validate that TID against the traced thread group before existing child setup. +Do not defer vfork, guess parents, or select by PID order. Missing creation +events and ambiguous process (non-thread) clones remain unsupported. +No timers or polling are added by this recovery patch. + +diff --git a/src/tracee/tracee.c b/src/tracee/tracee.c +--- a/src/tracee/tracee.c ++++ b/src/tracee/tracee.c +@@ -32,6 +32,10 @@ + #include <sys/ptrace.h> /* ptrace(2), PTRACE_*, */ + #include <errno.h> /* E*, */ + #include <inttypes.h> /* PRI*, */ ++#include <unistd.h> /* getpid(2), */ ++#include <stdio.h> /* fopen(3), fgets(3), snprintf(3), */ ++#include <dirent.h> /* opendir(3), readdir(3), closedir(3), */ ++#include <limits.h> /* INT_MAX, */ + + #include "tracee/tracee.h" + #include "tracee/reg.h" +@@ -402,16 +406,128 @@ + } + } + ++/* Read host process IDs, not PRoot's guest /proc view. /proc/<tid>/status ++ * works for non-leader threads too, even though /proc lists only leaders. */ ++static int read_task_ids(pid_t pid, long *tgid, long *ppid, long *tracer) ++{ ++ char path[64], line[256]; ++ FILE *file; ++ int status; ++ ++ *tgid = *ppid = *tracer = -1; ++ snprintf(path, sizeof(path), "/proc/%d/status", (int) pid); ++ file = fopen(path, "re"); ++ if (file == NULL) ++ return -errno; ++ ++ while (fgets(line, sizeof(line), file) != NULL) { ++ if (strncmp(line, "Tgid:", 5) == 0) ++ *tgid = strtol(line + 5, NULL, 10); ++ else if (strncmp(line, "PPid:", 5) == 0) ++ *ppid = strtol(line + 5, NULL, 10); ++ else if (strncmp(line, "TracerPid:", 10) == 0) ++ *tracer = strtol(line + 10, NULL, 10); ++ } ++ status = ferror(file) || *tgid <= 0 || *ppid < 0 || *tracer < 0 ++ ? -EIO : 0; ++ fclose(file); ++ return status; ++} ++ ++/* Recover only a delivered creation event whose GETEVENTMSG succeeded but ++ * returned zero. The creator is still stopped at that event, and its real ++ * clone flags have already been read. Require exactly one uninitialized, ++ * PRoot-traced candidate of the right kind and relationship. Never infer ++ * clone flags from PPid, substitute a process for a thread, or choose by PID ++ * order. Include tracees whose initial SIGSTOP was handled before this event. ++ * Missing events and ambiguous candidates need separate recovery logic. */ ++static int find_event_child(Tracee *parent, word_t clone_flags, unsigned long *result) ++{ ++ char path[64]; ++ long parent_tgid, parent_ppid, tracer; ++ const long self = (long) getpid(); ++ const bool thread = (clone_flags & CLONE_THREAD) != 0; ++ struct dirent *entry; ++ DIR *dir; ++ unsigned long found = 0; ++ int status; ++ ++ status = read_task_ids(parent->pid, &parent_tgid, &parent_ppid, &tracer); ++ if (status < 0) ++ return status; ++ if (tracer != self) ++ return -ESRCH; ++ ++ if (thread) ++ snprintf(path, sizeof(path), "/proc/%ld/task", parent_tgid); ++ else ++ snprintf(path, sizeof(path), "/proc"); ++ dir = opendir(path); ++ if (dir == NULL) ++ return -errno; ++ ++ status = 0; ++ for (;;) { ++ long pid, tgid, ppid; ++ char *end; ++ Tracee *known; ++ ++ errno = 0; ++ entry = readdir(dir); ++ if (entry == NULL) { ++ if (errno != 0) ++ status = -errno; ++ break; ++ } ++ if (entry->d_name[0] < '0' || entry->d_name[0] > '9') ++ continue; ++ errno = 0; ++ pid = strtol(entry->d_name, &end, 10); ++ if (errno != 0 || *end != '\0' || pid <= 0 || pid > INT_MAX || ++ pid == parent->pid) ++ continue; ++ known = get_tracee(NULL, (pid_t) pid, false); ++ if (known != NULL && (known->terminated || known->exe != NULL || ++ known->parent != NULL)) ++ continue; ++ if (read_task_ids((pid_t) pid, &tgid, &ppid, &tracer) < 0 || ++ tracer != self) ++ continue; ++ if (thread) { ++ if (tgid != parent_tgid) ++ continue; ++ } else { ++ long expected_ppid = (clone_flags & CLONE_PARENT) != 0 ++ ? parent_ppid : parent_tgid; ++ if (tgid != pid || ppid != expected_ppid) ++ continue; ++ } ++ if (found != 0) { ++ status = -EAGAIN; ++ break; ++ } ++ found = (unsigned long) pid; ++ } ++ closedir(dir); ++ if (status < 0) ++ return status; ++ if (found == 0) ++ return -ESRCH; ++ *result = found; ++ return 0; ++} ++ + /** + * Make new @parent's child inherit from it. Depending on + * @clone_flags, some information are copied or shared. This function + * returns -errno if an error occured, otherwise 0. + */ ++static int new_child_setup(Tracee *parent, unsigned long pid, word_t clone_flags); ++ + int new_child(Tracee *parent, word_t clone_flags) + { +- int ptrace_options; ++ bool flags_known; + unsigned long pid; +- Tracee *child; + int status; + + /* If the tracee calls clone(2) with the CLONE_VFORK flag, +@@ -425,24 +541,62 @@ + * order to get the right flags. + */ + status = fetch_regs(parent); ++ flags_known = (status >= 0); + if (status >= 0 && get_sysnum(parent, CURRENT) == PR_clone) + clone_flags = peek_reg(parent, CURRENT, SYSARG_1); + else if (status >= 0 && get_sysnum(parent, CURRENT) == PR_clone3) { + word_t args = peek_reg(parent, CURRENT, SYSARG_1); + word_t flags = peek_uint64(parent, args); ++ flags_known = false; + if (errno == 0) { + word_t exit_signal = peek_uint64(parent, args + 4 * sizeof(uint64_t)); +- if (errno == 0) ++ if (errno == 0) { + clone_flags = (flags & ~(word_t) 0xFF) | (exit_signal & 0xFF); ++ flags_known = true; ++ } + } + } + + /* Get the pid of the parent's new child. */ + status = ptrace(PTRACE_GETEVENTMSG, parent->pid, NULL, &pid); +- if (status < 0 || pid == 0) { ++ if (status < 0) { + note(parent, WARNING, SYSTEM, "ptrace(GETEVENTMSG)"); + return status; + } ++ if (pid == 0) { ++ static bool warned; ++ ++ status = flags_known ? find_event_child(parent, clone_flags, &pid) : -EIO; ++ /* A thread creator can reach clone's exit while its child is held. ++ * vfork cannot: its creator waits for the child, so do not defer it. */ ++ if (status == -EAGAIN && (clone_flags & CLONE_THREAD) != 0 && ++ (clone_flags & CLONE_VFORK) == 0) { ++ parent->pending_clone_flags = clone_flags; ++ parent->restart_how = PTRACE_SYSCALL; ++ return 0; ++ } ++ if (status < 0) { ++ note(parent, WARNING, USER, ++ "zero fork-event pid for task %d: cannot safely identify child (%s); leaving it uninitialized", ++ (int) parent->pid, strerror(-status)); ++ return status; ++ } ++ if (!warned) { ++ warned = true; ++ note(parent, WARNING, USER, ++ "kernel returned a zero fork-event pid; using procfs child discovery"); ++ } ++ VERBOSE(parent, 1, "recovered child %lu for task %d from procfs", ++ pid, (int) parent->pid); ++ } ++ ++ return new_child_setup(parent, pid, clone_flags); ++} ++ ++static int new_child_setup(Tracee *parent, unsigned long pid, word_t clone_flags) ++{ ++ int ptrace_options; ++ Tracee *child; + + child = get_tracee(parent, (pid_t) pid, true); + if (child == NULL) { +@@ -628,6 +782,52 @@ + return 0; + } + ++/* A clone event occurs before the creating thread returns from clone. For an ++ * ambiguous thread lookup, obtain the exact TID at that syscall's exit instead ++ * of guessing from the order of /proc entries. Called before normal syscall ++ * exit handling so the registers and inherited tracee state are still intact. */ ++void finish_pending_child(Tracee *parent) ++{ ++ word_t flags = parent->pending_clone_flags; ++ word_t pid; ++ long ptgid, ppid, tracer, ctgid; ++ Tracee *known; ++ int status; ++ ++ parent->pending_clone_flags = 0; ++ status = fetch_regs(parent); ++ if (status < 0) ++ goto failed; ++ pid = peek_reg(parent, CURRENT, SYSARG_RESULT); ++ if (pid == 0 || pid > INT_MAX || pid == (word_t) parent->pid) { ++ status = -ESRCH; ++ goto failed; ++ } ++ /* Validate the host TID before setup. This also rejects an unmappable ++ * PID from a different PID namespace instead of adopting an unrelated task. */ ++ status = read_task_ids(parent->pid, &ptgid, &ppid, &tracer); ++ if (status < 0) ++ goto failed; ++ status = read_task_ids((pid_t) pid, &ctgid, &ppid, &tracer); ++ if (status < 0) ++ goto failed; ++ known = get_tracee(NULL, (pid_t) pid, false); ++ if (ctgid != ptgid || tracer != (long) getpid() || ++ (known != NULL && (known->terminated || known->exe != NULL || known->parent != NULL))) { ++ status = -ESRCH; ++ goto failed; ++ } ++ status = new_child_setup(parent, (unsigned long) pid, flags); ++ if (status < 0) ++ goto failed; ++ VERBOSE(parent, 1, "recovered thread %lu for task %d from clone return", ++ (unsigned long) pid, (int) parent->pid); ++ return; ++failed: ++ note(parent, WARNING, USER, "cannot recover thread at clone exit for task %d (error %d)", ++ (int) parent->pid, status); ++} ++ + /** + * Helper for swap_config(). + */ +diff --git a/src/tracee/event.c b/src/tracee/event.c +--- a/src/tracee/event.c ++++ b/src/tracee/event.c +@@ -398,6 +398,7 @@ + * before the exit stage, eg. PTRACE_EVENT_EXEC for the exit + * stage of execve(2). */ + sysexit_necessary = tracee->sysexit_pending ++ || tracee->pending_clone_flags != 0 + || tracee->chain.syscalls != NULL + || tracee->restore_original_regs_after_seccomp_event; + /* Don't overwrite restart_how if it is explicitly set +@@ -474,6 +475,9 @@ + /* Fall through. */ + case SIGTRAP | 0x80: + signal = 0; ++ ++ if (tracee->pending_clone_flags != 0) ++ finish_pending_child(tracee); + + /* This tracee got signaled then freed during the + sysenter stage but the kernel reports the sysexit +diff --git a/src/tracee/tracee.h b/src/tracee/tracee.h +--- a/src/tracee/tracee.h ++++ b/src/tracee/tracee.h +@@ -172,6 +172,9 @@ + SIGSTOP_ALLOWED, /* Allow SIGSTOP (once the parent is known). */ + SIGSTOP_PENDING, /* Block SIGSTOP until the parent is unknown. */ + } sigstop; ++ ++ /* Nonzero only while resolving an ambiguous thread clone at its exit. */ ++ word_t pending_clone_flags; + + /* True if next SIGSYS caused by seccomp should be silently dropped + * without affecting state of any registers. */ +@@ -310,6 +313,7 @@ + bool only_with_pevent, word_t wait_options); + extern bool has_ptracees(const Tracee *ptracer, pid_t pid, word_t wait_options); + extern int new_child(Tracee *parent, word_t clone_flags); ++extern void finish_pending_child(Tracee *parent); + extern Tracee *new_dummy_tracee(TALLOC_CTX *context); + extern void terminate_tracee(Tracee *tracee); + extern void free_terminated_tracees(); diff --git a/tools/proot/patches/0015-statx-mnt-id-fdinfo.patch b/tools/proot/patches/0015-statx-mnt-id-fdinfo.patch new file mode 100644 index 0000000000..a0821997ae --- /dev/null +++ b/tools/proot/patches/0015-statx-mnt-id-fdinfo.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: DroidDeck <droiddeck@users.noreply.github.com> +Date: Tue, 13 Oct 2026 00:00:00 +0000 +Subject: [PATCH] statx: supply mount IDs on kernels before 5.8 + +On kernels before 5.8, statx can succeed without STATX_MNT_ID. Recover it +from the already-open descriptor after verifying its identity. Keep the +compatibility exit stop only on kernels that need the missing field. +--- +diff --git a/src/syscall/seccomp.c b/src/syscall/seccomp.c +index ee7b8acd68660f38fd52f56e951ffb94e9061d68..ff3a79b60e9092a296bb444c919bb3861338727f 100644 +--- a/src/syscall/seccomp.c ++++ b/src/syscall/seccomp.c +@@ -764 +764 @@ static void drop_unneeded_exit_stops(void) +- if (major > 4 || (major == 4 && minor >= 11)) ++ if (major > 5 || (major == 5 && minor >= 8)) +diff --git a/src/tracee/statx.c b/src/tracee/statx.c +index ca972f892e84461cb694dd13a37bfbc67527b320..824771ccf5934e1f870fc36a29fb22fdcad0a856 100644 +--- a/src/tracee/statx.c ++++ b/src/tracee/statx.c +@@ -4,0 +5 @@ ++#include "tracee/statx_mnt_id.h" +@@ -125,0 +127,5 @@ int handle_statx_syscall(Tracee *tracee, bool from_sigsys) { ++ if (droiddeck_proot_statx_fill_mnt_id(tracee->pid, (int) dirfd, ++ (int) flags, guest_path, (unsigned int) mask, ++ &state.statx_buf)) ++ state.updated_stats = true; ++ diff --git a/tools/proot/patches/0016-robust-list-from-seccomp.patch b/tools/proot/patches/0016-robust-list-from-seccomp.patch new file mode 100644 index 0000000000..d9e5c61819 --- /dev/null +++ b/tools/proot/patches/0016-robust-list-from-seccomp.patch @@ -0,0 +1,61 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: DroidDeck <droiddeck@users.noreply.github.com> +Date: Tue, 13 Oct 2026 00:00:00 +0000 +Subject: [PATCH] seccomp: answer get_robust_list with the head set_robust_list + was refused for + +diff --git a/src/execve/exit.c b/src/execve/exit.c +index f32d3ec..b5475b3 100644 +--- a/src/execve/exit.c ++++ b/src/execve/exit.c +@@ -473,6 +473,8 @@ void translate_execve_exit(Tracee *tracee) + talloc_set_name_const(tracee->exe, "$exe"); + } + ++ tracee->robust_list = 0; ++ + /* New processes have no heap. */ + if (talloc_reference_count(tracee->heap) >= 1) { + talloc_unlink(tracee, tracee->heap); +diff --git a/src/tracee/seccomp.c b/src/tracee/seccomp.c +index 77d5b27..0af232b 100644 +--- a/src/tracee/seccomp.c ++++ b/src/tracee/seccomp.c +@@ -559,6 +559,24 @@ static int handle_seccomp_event_common(Tracee *tracee) + } + + case PR_set_robust_list: ++ tracee->robust_list = peek_reg(tracee, CURRENT, SYSARG_1); ++ set_result_after_seccomp(tracee, -ENOSYS); ++ break; ++ ++ case PR_get_robust_list: ++ { ++ pid_t pid = (pid_t) peek_reg(tracee, CURRENT, SYSARG_1); ++ if (tracee->robust_list == 0 || (pid != 0 && pid != tracee->pid)) { ++ set_result_after_seccomp(tracee, -ENOSYS); ++ break; ++ } ++ poke_word(tracee, peek_reg(tracee, CURRENT, SYSARG_2), tracee->robust_list); ++ if (errno == 0) ++ poke_word(tracee, peek_reg(tracee, CURRENT, SYSARG_3), 3 * sizeof_word(tracee)); ++ set_result_after_seccomp(tracee, errno != 0 ? -EFAULT : 0); ++ break; ++ } ++ + default: + /* Set errno to -ENOSYS */ + set_result_after_seccomp(tracee, -ENOSYS); +diff --git a/src/tracee/tracee.h b/src/tracee/tracee.h +index 1fca85f..496ca75 100644 +--- a/src/tracee/tracee.h ++++ b/src/tracee/tracee.h +@@ -248,6 +248,8 @@ typedef struct tracee { + * has to be ignored as it's same syscall entry */ + bool seccomp_already_handled_enter; + ++ word_t robust_list; ++ + /********************************************************************** + * Shared or private resources, depending on the CLONE_FS/VM flags. * + **********************************************************************/ diff --git a/tools/proot/statx_mnt_id.h b/tools/proot/statx_mnt_id.h new file mode 100644 index 0000000000..deb1789b8d --- /dev/null +++ b/tools/proot/statx_mnt_id.h @@ -0,0 +1,95 @@ +#ifndef DROIDDECK_PROOT_STATX_MNT_ID_H +#define DROIDDECK_PROOT_STATX_MNT_ID_H + +#include <errno.h> +#include <fcntl.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <sys/sysmacros.h> +#include <sys/types.h> +#include <unistd.h> + +static inline bool droiddeck_proot_read_fdinfo(int fd, uint64_t *mnt_id, uint64_t *ino) { + if (fd < 0 || !mnt_id || !ino) return false; + + char fdinfo_path[64]; + int n = snprintf(fdinfo_path, sizeof fdinfo_path, "/proc/self/fdinfo/%d", fd); + if (n < 0 || (size_t)n >= sizeof fdinfo_path) return false; + + FILE *fdinfo = fopen(fdinfo_path, "r"); + if (!fdinfo) return false; + + bool have_mnt_id = false, have_ino = false; + uint64_t parsed_mnt_id = 0, parsed_ino = 0; + char line[256]; + while (fgets(line, sizeof line, fdinfo)) { + const char *value = NULL; + uint64_t *field = NULL; + if (strncmp(line, "mnt_id:", 7) == 0) { + value = line + 7; + field = &parsed_mnt_id; + have_mnt_id = true; + } else if (strncmp(line, "ino:", 4) == 0) { + value = line + 4; + field = &parsed_ino; + have_ino = true; + } + if (!value) continue; + + errno = 0; + char *end = NULL; + unsigned long long parsed = strtoull(value, &end, 10); + if (errno || end == value || (*end && *end != '\n' && *end != '\r')) { + if (field == &parsed_mnt_id) have_mnt_id = false; + else have_ino = false; + continue; + } + *field = (uint64_t)parsed; + } + bool read_error = ferror(fdinfo); + fclose(fdinfo); + + if (read_error || !have_mnt_id || !have_ino || parsed_mnt_id == 0) return false; + *mnt_id = parsed_mnt_id; + *ino = parsed_ino; + return true; +} + +static inline bool droiddeck_proot_statx_fill_mnt_id(pid_t pid, int fd, + int flags, const char *path, + unsigned int mask, + struct statx *buf) { + if (fd < 0 || !(flags & AT_EMPTY_PATH) || !path || path[0] != '\0' + || !(mask & STATX_MNT_ID) || (buf->stx_mask & STATX_MNT_ID) + || !(buf->stx_mask & STATX_INO)) + return false; + + char tracee_fd_path[64]; + int n = snprintf(tracee_fd_path, sizeof tracee_fd_path, "/proc/%ld/fd/%d", (long)pid, fd); + if (n < 0 || (size_t)n >= sizeof tracee_fd_path) return false; + + /* Another thread sharing the tracee's fd table can close/reuse fd after statx returns. Pin the + * current referent, then require both device and inode to match statx before trusting its mount. + * Read fdinfo from our pin so a later tracee fd reuse cannot change which mount ID is observed. + * A same-inode bind-mount alias has the same device/inode pair; at this exit stop we cannot + * distinguish that rare concurrent replacement from the mount used by the completed syscall. */ + int pinned = open(tracee_fd_path, O_PATH | O_CLOEXEC); + if (pinned < 0) return false; + struct stat st; + bool same = fstat(pinned, &st) == 0 && st.st_ino == buf->stx_ino && + major(st.st_dev) == buf->stx_dev_major && minor(st.st_dev) == buf->stx_dev_minor; + uint64_t mnt_id = 0, ino = 0; + bool have_fdinfo = same && droiddeck_proot_read_fdinfo(pinned, &mnt_id, &ino); + close(pinned); + if (!have_fdinfo || ino != st.st_ino) return false; + + buf->stx_mnt_id = mnt_id; + buf->stx_mask |= STATX_MNT_ID; + return true; +} + +#endif diff --git a/tools/quest/android_wrapper.c b/tools/quest/android_wrapper.c new file mode 100644 index 0000000000..6f211b1be0 --- /dev/null +++ b/tools/quest/android_wrapper.c @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#define _GNU_SOURCE +#include "kgsl_compat.h" +#include <dlfcn.h> +#include <pthread.h> +#include <stdarg.h> +#include <sys/syscall.h> +#include <unistd.h> + +static int (*next_ioctl)(int, int, ...); +static pthread_once_t once = PTHREAD_ONCE_INIT; +static void resolve_ioctl(void) { next_ioctl = dlsym(RTLD_NEXT, "ioctl"); } +static int forward(int fd, unsigned long request, void *arg) { + pthread_once(&once, resolve_ioctl); + return next_ioctl ? next_ioctl(fd, (int)request, arg) : (int)syscall(SYS_ioctl, fd, request, arg); +} +__attribute__((visibility("default"))) int ioctl(int fd, int request, ...) { + va_list ap; + va_start(ap, request); + void *arg = va_arg(ap, void *); + va_end(ap); + return quest_kgsl_ioctl(forward, fd, (unsigned int)request, arg); +} diff --git a/tools/quest/build-driver.py b/tools/quest/build-driver.py new file mode 100644 index 0000000000..e72b2991ec --- /dev/null +++ b/tools/quest/build-driver.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python3 +"""Build the Quest allocation adapter around the unchanged bundled Android Turnip.""" +import io +import json +from pathlib import Path +import subprocess +import sys +import tarfile +import tempfile +import hashlib +import urllib.request +import zipfile + +ROOT = Path(__file__).resolve().parents[2] +OUTPUT = ROOT / 'app/build/prepared-assets/graphics_driver/adrenotools-turnip25.1.0-quest1.tzst' +A6XX_TAG = 'v26.3.0-20261012-r2' +A6XX_SHA256 = 'bb1b2c51e6446cf428d70255d037be169ac68108c00af33aa1ba7ece711f8336' +A6XX_URL = f'https://github.com/The412Banner/Banners-Turnip/releases/download/{A6XX_TAG}/Turnip-{A6XX_TAG}.zip' + + +def pack(entries, output): + stream = io.BytesIO() + with tarfile.open(fileobj=stream, mode='w', format=tarfile.USTAR_FORMAT) as archive: + for name, content in entries: + entry = tarfile.TarInfo(name) + entry.size = len(content) + entry.mode = 0o644 + archive.addfile(entry, io.BytesIO(content)) + compressed = subprocess.run(['zstd', '-q', '-19', '-c'], input=stream.getvalue(), + capture_output=True, check=True).stdout + output.parent.mkdir(parents=True, exist_ok=True) + output.write_bytes(compressed) + print(output) + + +def build_a6xx(ndk, output_dir=OUTPUT.parent, archive_path=None): + """Pin a real A6xx driver, with a separate Quest adapter around the same bytes.""" + cached = archive_path or ROOT / 'app/build/quest-inputs' / f'Turnip-{A6XX_TAG}.zip' + if not cached.exists(): + cached.parent.mkdir(parents=True, exist_ok=True) + data = urllib.request.urlopen(A6XX_URL, timeout=120).read() + if hashlib.sha256(data).hexdigest() != A6XX_SHA256: + raise ValueError('A6xx archive checksum mismatch') + cached.write_bytes(data) + data = cached.read_bytes() + if hashlib.sha256(data).hexdigest() != A6XX_SHA256: + raise ValueError('A6xx archive checksum mismatch') + with zipfile.ZipFile(io.BytesIO(data)) as archive: + driver = archive.read('libvulkan_freedreno.so') + original_meta = json.loads(archive.read('meta.json')) + if original_meta.get('libraryName') != 'libvulkan_freedreno.so': + raise ValueError('Unexpected A6xx driver library') + hosts = list((Path(ndk) / 'toolchains/llvm/prebuilt').glob('*')) + if len(hosts) != 1: + raise ValueError('Expected one NDK host toolchain') + llvm = hosts[0] / 'bin' + provenance = (f'Banners-Turnip {A6XX_TAG}\n{A6XX_URL}\nSHA256 {A6XX_SHA256}\n' + 'Mesa source: a0ff50acf0e1d152f54949490fa41558d2e0f7a4\n' + 'Quest adapter: DroidDeck tools/quest (GPL-3.0-or-later)\n').encode() + for quest in (False, True): + meta = dict(original_meta) + meta['name'] = 'Turnip Adreno 6xx' + (' - Quest 2 GPUOBJ experimental' if quest else ' - bundled fallback') + meta['description'] += ' Bundled for Adreno 6xx; Quest 2 hardware validation pending.' + entries = [('libvulkan_freedreno.so', driver), ('SOURCE.txt', provenance)] + if quest: + with tempfile.TemporaryDirectory(prefix='quest-a6xx-') as folder: + work = Path(folder) + original = work / 'libvulkan_freedreno.so' + original.write_bytes(driver) + wrapper = work / 'libquest_turnip.so' + subprocess.run([ + str(llvm / 'aarch64-linux-android28-clang'), '-shared', '-fPIC', '-O2', + '-Wall', '-Wextra', '-Werror', '-fvisibility=hidden', + '-Wl,-z,max-page-size=16384', '-Wl,-soname,libquest_turnip.so', + '-Wl,--no-as-needed', str(original), '-Wl,--as-needed', + str(ROOT / 'tools/quest/android_wrapper.c'), str(ROOT / 'tools/quest/kgsl_compat.c'), + '-ldl', '-llog', '-o', str(wrapper), + ], check=True) + subprocess.run([str(llvm / 'llvm-strip'), '--strip-unneeded', str(wrapper)], check=True) + entries.append(('libquest_turnip.so', wrapper.read_bytes())) + meta['libraryName'] = 'libquest_turnip.so' + entries.append(('meta.json', (json.dumps(meta, indent=2) + '\n').encode())) + name = 'turnip26.3.0-quest2' if quest else 'turnip26.3.0-a6xx' + pack(entries, output_dir / f'adrenotools-{name}.tzst') + + +def build(ndk, output=OUTPUT): + hosts = list((Path(ndk) / 'toolchains/llvm/prebuilt').glob('*')) + if len(hosts) != 1: + raise ValueError('Expected one NDK host toolchain') + llvm = hosts[0] / 'bin' + original = ROOT / 'app/src/main/assets/graphics_driver/adrenotools-turnip25.1.0.tzst' + data = subprocess.run(['zstd', '-dc', str(original)], capture_output=True, check=True).stdout + with tempfile.TemporaryDirectory(prefix='quest-driver-') as folder: + work = Path(folder) + with tarfile.open(fileobj=io.BytesIO(data)) as archive: + driver = archive.extractfile('vulkan.ad07xx.so').read() + (work / 'vulkan.ad07xx.so').write_bytes(driver) + wrapper = work / 'libquest_turnip.so' + subprocess.run([ + str(llvm / 'aarch64-linux-android26-clang'), '-shared', '-fPIC', '-O2', + '-Wall', '-Wextra', '-Werror', '-fvisibility=hidden', + '-Wl,-z,max-page-size=16384', '-Wl,-soname,libquest_turnip.so', + '-Wl,--no-as-needed', str(work / 'vulkan.ad07xx.so'), '-Wl,--as-needed', + str(ROOT / 'tools/quest/android_wrapper.c'), str(ROOT / 'tools/quest/kgsl_compat.c'), + '-ldl', '-llog', '-o', str(wrapper), + ], check=True) + subprocess.run([str(llvm / 'llvm-strip'), '--strip-unneeded', str(wrapper)], check=True) + metadata = json.dumps({ + 'libraryName': 'libquest_turnip.so', + 'name': 'Turnip Adreno 7xx - Quest GPUOBJ experimental', + 'description': 'Bundled A7xx driver with the experimental Quest 3/3S allocation adapter.', + 'driverVersion': 'Bundled Mesa + Quest GPUOBJ v1', + }, indent=2).encode() + b'\n' + stream = io.BytesIO() + with tarfile.open(fileobj=stream, mode='w', format=tarfile.USTAR_FORMAT) as archive: + for name, content in [('meta.json', metadata), ('libquest_turnip.so', wrapper.read_bytes()), + ('vulkan.ad07xx.so', driver)]: + entry = tarfile.TarInfo(name) + entry.size = len(content) + entry.mode = 0o644 + archive.addfile(entry, io.BytesIO(content)) + compressed = subprocess.run(['zstd', '-q', '-19', '-c'], input=stream.getvalue(), + capture_output=True, check=True).stdout + output.parent.mkdir(parents=True, exist_ok=True) + output.write_bytes(compressed) + print(output) + + +if __name__ == '__main__': + build(sys.argv[1]) + build_a6xx(sys.argv[1]) diff --git a/tools/quest/kgsl_compat.c b/tools/quest/kgsl_compat.c new file mode 100644 index 0000000000..33f4cfe182 --- /dev/null +++ b/tools/quest/kgsl_compat.c @@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "kgsl_compat.h" +#include <errno.h> +#include <limits.h> +#include <stdint.h> +#include <stdio.h> +#ifdef __ANDROID__ +#include <android/log.h> +#endif + +#if __SIZEOF_POINTER__ == 8 +_Static_assert(sizeof(struct kgsl_gpumem_alloc_id) == 48, "KGSL alloc ABI"); +_Static_assert(sizeof(struct kgsl_gpuobj_alloc) == 48, "GPUOBJ alloc ABI"); +_Static_assert(sizeof(struct kgsl_gpuobj_free) == 32, "GPUOBJ free ABI"); +_Static_assert(sizeof(struct kgsl_gpuobj_info) == 48, "GPUOBJ info ABI"); +#endif + +static void report(const char *operation, int error) { + static unsigned successes, failures; + unsigned *counter = error ? &failures : &successes; + if (__atomic_fetch_add(counter, 1, __ATOMIC_RELAXED) >= (error ? 8u : 1u)) return; + int saved = errno; +#ifdef __ANDROID__ + __android_log_print(error ? ANDROID_LOG_ERROR : ANDROID_LOG_INFO, "QuestKGSL", + "%s: GPUOBJ compatibility path, errno=%d", operation, error); +#else + fprintf(stderr, "[QuestKGSL] %s: GPUOBJ compatibility path, errno=%d\n", operation, error); +#endif + errno = saved; +} + +int quest_kgsl_ioctl(quest_ioctl_fn real, int fd, unsigned long request, void *arg) { + int rc = real(fd, request, arg); + if (rc != -1 || (errno != EACCES && errno != EPERM) || arg == NULL) return rc; + + if (request == IOCTL_KGSL_GPUMEM_ALLOC_ID) { + struct kgsl_gpumem_alloc_id *old = arg; + struct kgsl_gpuobj_alloc alloc = {.size = old->size, .flags = old->flags}; + rc = real(fd, IOCTL_KGSL_GPUOBJ_ALLOC, &alloc); + if (rc != 0) { report("alloc failed", errno); return rc; } + struct kgsl_gpuobj_info info = {.id = alloc.id}; + rc = real(fd, IOCTL_KGSL_GPUOBJ_INFO, &info); + int error = errno; + if (rc == 0 && (info.size > SIZE_MAX || alloc.mmapsize > SIZE_MAX || + info.gpuaddr > ULONG_MAX || info.flags > UINT_MAX)) { + rc = -1; + error = EOVERFLOW; + } + if (rc != 0) { + struct kgsl_gpuobj_free release = {.id = alloc.id}; + if (real(fd, IOCTL_KGSL_GPUOBJ_FREE, &release) != 0) + report("cleanup failed", errno); + errno = error; + report("info failed", error); + return rc; + } + old->id = alloc.id; + old->flags = (unsigned int)info.flags; + old->size = info.size; + old->mmapsize = alloc.mmapsize; + old->gpuaddr = info.gpuaddr; + report("allocation succeeded", 0); + return 0; + } + if (request == IOCTL_KGSL_GPUMEM_FREE_ID) { + const struct kgsl_gpumem_free_id *old = arg; + struct kgsl_gpuobj_free release = {.id = old->id}; + rc = real(fd, IOCTL_KGSL_GPUOBJ_FREE, &release); + if (rc != 0) report("free failed", errno); + } + return rc; +} diff --git a/tools/quest/kgsl_compat.h b/tools/quest/kgsl_compat.h new file mode 100644 index 0000000000..b6f0eb053e --- /dev/null +++ b/tools/quest/kgsl_compat.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#ifndef DROIDDECK_QUEST_KGSL_COMPAT_H +#define DROIDDECK_QUEST_KGSL_COMPAT_H + +#ifndef __user +#define __user +#endif +#include "../../app/src/main/cpp/adrenotools/src/hook/kgsl.h" + +typedef int (*quest_ioctl_fn)(int, unsigned long, void *); +__attribute__((visibility("hidden"))) +int quest_kgsl_ioctl(quest_ioctl_fn real, int fd, unsigned long request, void *arg); + +#endif diff --git a/tools/quest/test_first_frame.c b/tools/quest/test_first_frame.c new file mode 100644 index 0000000000..f58da48bb5 --- /dev/null +++ b/tools/quest/test_first_frame.c @@ -0,0 +1,74 @@ +/* Exercise the production vkp_render entrypoint without Android/Vulkan hardware. + * The Python runner extracts that function verbatim into the included file. */ +#include <assert.h> +#include <stddef.h> +#include <stdio.h> + +struct vkp_draw { int unused; }; +static int quest, framegen, cardboard, pass_result, base_result, pass_shown; +static int first_frames, pass_calls, base_calls, fallback_calls; +static int vkp_quest_layer_presentation(void) { return quest; } +static int vkp_framegen_active(void) { return framegen; } +static int vkp_cardboard_active(void) { return cardboard; } +static void vkp_apply_window_request(void) {} +static void sc_layer_hide_overlay(void) {} +static void sc_layer_hide(void) {} +static void droiddeck_log(const char *tag, const char *message, ...) {} +static void vkp_signal_first_frame(void) { first_frames++; } +static int vkp_base_black(int w, int h) { base_calls++; return base_result; } +static int sc_layer_present_pass(const struct vkp_draw *draws, int n, int w, int h) { + pass_calls++; + /* Production sc_layer_present_pass signals only after a content submission. + * Its no-op results (off-screen geometry or pool exhaustion) also return 0. */ + if (pass_result == 0 && pass_shown) vkp_signal_first_frame(); + return pass_result; +} +static int render_impl(int w, int h, const struct vkp_draw *draws, int n, + const void *hdr, int *how) { fallback_calls++; return 17; } + +#include "vkp_render_under_test.inc" + +static void reset(void) { + quest = 1; + framegen = cardboard = pass_result = base_result = pass_shown = 0; + first_frames = pass_calls = base_calls = fallback_calls = 0; +} + +int main(void) { + const struct vkp_draw draw = {0}; + reset(); + for (int i = 0; i < 3; i++) assert(vkp_render(1280, 720, NULL, 0) == 0); + assert(base_calls == 3 && pass_calls == 0 && first_frames == 0); + + /* An accepted layer operation is not necessarily a displayed client frame. */ + reset(); + assert(vkp_render(1280, 720, &draw, 1) == 0); + assert(pass_calls == 1 && base_calls == 1 && first_frames == 0); + + /* Content is the sole owner of the notification, with no second backdrop event. */ + reset(); pass_shown = 1; + assert(vkp_render(1280, 720, &draw, 1) == 0); + assert(first_frames == 1); + assert(vkp_render(1280, 720, NULL, 0) == 0); + assert(first_frames == 1); + + reset(); pass_result = -1; + assert(vkp_render(1280, 720, &draw, 1) == -1); + assert(first_frames == 0 && base_calls == 0); + reset(); base_result = -1; + assert(vkp_render(1280, 720, NULL, 0) == -1); + assert(first_frames == 0); + + /* Existing routes remain responsible for their own notifications. */ + for (int mode = 0; mode < 3; mode++) { + reset(); + if (mode == 0) quest = 0; + if (mode == 1) framegen = 1; + if (mode == 2) cardboard = 1; + assert(vkp_render(1280, 720, &draw, 1) == 17); + assert(fallback_calls == 1 && pass_calls == 0 && base_calls == 0); + assert(first_frames == 0); + } + puts("PASS: Quest first-frame notification waits for client content"); + return 0; +} diff --git a/tools/quest/test_kgsl_compat.c b/tools/quest/test_kgsl_compat.c new file mode 100644 index 0000000000..30ae397a89 --- /dev/null +++ b/tools/quest/test_kgsl_compat.c @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "kgsl_compat.h" +#include <assert.h> +#include <errno.h> +#include <stdio.h> +#include <string.h> + +static unsigned long calls[8]; +static int count, old_error, alloc_error, info_error, free_error; +static unsigned long address; +static int mock(int fd, unsigned long request, void *arg) { + assert(fd == 42 && count < 8); + calls[count++] = request; + if (request == IOCTL_KGSL_GPUMEM_ALLOC_ID || request == IOCTL_KGSL_GPUMEM_FREE_ID) { + if (old_error) { errno = old_error; return -1; } + return 0; + } + if (request == IOCTL_KGSL_GPUOBJ_ALLOC) { + if (alloc_error) { errno = alloc_error; return -1; } + struct kgsl_gpuobj_alloc *p = arg; + assert(p->size == 123 && p->flags == 0x10000 && !p->metadata && !p->metadata_len); + p->id = 77; p->size = 4096; p->mmapsize = 8192; + return 0; + } + if (request == IOCTL_KGSL_GPUOBJ_INFO) { + struct kgsl_gpuobj_info *p = arg; + assert(p->id == 77); + if (info_error) { errno = info_error; return -1; } + p->gpuaddr = address; p->flags = 0x20000; p->size = 4096; + return 0; + } + if (request == IOCTL_KGSL_GPUOBJ_FREE) { + struct kgsl_gpuobj_free *p = arg; + assert(p->id == 77 && !p->flags && !p->priv && !p->type && !p->len); + if (free_error) { errno = free_error; return -1; } + return 0; + } + errno = EACCES; + return -1; +} +static struct kgsl_gpumem_alloc_id reset(void) { + count = old_error = alloc_error = info_error = free_error = 0; + address = 0x100000; + return (struct kgsl_gpumem_alloc_id){.size = 123, .flags = 0x10000}; +} +int main(void) { + struct kgsl_gpumem_alloc_id p = reset(); + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_ALLOC_ID, &p) == 0 && count == 1); + p = reset(); old_error = EACCES; + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_ALLOC_ID, &p) == 0); + assert(count == 3 && p.id == 77 && p.size == 4096 && p.mmapsize == 8192); + assert(p.flags == 0x20000 && p.gpuaddr == address); + p = reset(); old_error = EPERM; address = 0; + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_ALLOC_ID, &p) == 0 && p.gpuaddr == 0); + p = reset(); old_error = ENOMEM; + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_ALLOC_ID, &p) == -1 && errno == ENOMEM && count == 1); + p = reset(); old_error = EACCES; alloc_error = ENOMEM; + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_ALLOC_ID, &p) == -1 && errno == ENOMEM && count == 2); + assert(p.id == 0 && p.size == 123); + p = reset(); old_error = EACCES; info_error = EIO; + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_ALLOC_ID, &p) == -1 && errno == EIO); + assert(count == 4 && calls[3] == IOCTL_KGSL_GPUOBJ_FREE && p.id == 0); + p = reset(); old_error = EACCES; info_error = EIO; free_error = ENOSPC; + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_ALLOC_ID, &p) == -1 && errno == EIO && count == 4); + p = reset(); old_error = EACCES; + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_ALLOC_ID, NULL) == -1 && count == 1); + p = reset(); old_error = EACCES; + assert(quest_kgsl_ioctl(mock, 42, 0x1234, &p) == -1 && errno == EACCES && count == 1); + struct kgsl_gpumem_free_id release = {.id = 77}; + reset(); old_error = EACCES; + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_FREE_ID, &release) == 0 && count == 2); + reset(); old_error = EPERM; free_error = EIO; + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_FREE_ID, &release) == -1 && errno == EIO && count == 2); + reset(); + assert(quest_kgsl_ioctl(mock, 42, IOCTL_KGSL_GPUMEM_FREE_ID, &release) == 0 && count == 1); + puts("PASS: 12 GPUOBJ translation, passthrough, failure and cleanup scenarios"); +} diff --git a/tools/quest/test_presentation.c b/tools/quest/test_presentation.c new file mode 100644 index 0000000000..dcbad62244 --- /dev/null +++ b/tools/quest/test_presentation.c @@ -0,0 +1,103 @@ +/* Exercise the production backdrop with mock Android buffers/transactions. */ +#include "../../app/src/main/cpp/waylandcomp/src/sc_layer.c" +#include "../../app/src/main/cpp/waylandcomp/src/quest_device.h" +#include <assert.h> + +struct AHardwareBuffer { unsigned char pixels[20 * 16 * 4]; }; +static struct AHardwareBuffer buffer; +static int fail_alloc, fail_lock, fail_unlock, fail_tx; +static int allocs, locks, unlocks, buffers, applies, creates, releases, retirements; +static int visible, zorder, opacity; +static ARect destination; +static ANativeWindow *window = (ANativeWindow *)1; +ANativeWindow *vkp_window(void) { return window; } +void droiddeck_log(const char *kind, const char *fmt, ...) { (void)kind; (void)fmt; } +int AHardwareBuffer_allocate(const AHardwareBuffer_Desc *d, AHardwareBuffer **b) { + assert(d->width == 16 && d->height == 16); + assert(d->usage & AHARDWAREBUFFER_USAGE_CPU_WRITE_RARELY); + allocs++; + if (fail_alloc) return -1; + memset(&buffer, 0xa5, sizeof(buffer)); *b = &buffer; return 0; +} +void AHardwareBuffer_describe(const AHardwareBuffer *b, AHardwareBuffer_Desc *d) { + assert(b == &buffer); *d = (AHardwareBuffer_Desc){.width=16,.height=16,.stride=20}; +} +int AHardwareBuffer_lock(AHardwareBuffer *b, uint64_t usage, int32_t fd, const ARect *r, void **p) { + (void)usage; (void)fd; (void)r; assert(b == &buffer); locks++; + if (fail_lock) return -1; + *p = buffer.pixels; return 0; +} +int AHardwareBuffer_unlock(AHardwareBuffer *b, int32_t *f) { + assert(b == &buffer && f == NULL); unlocks++; return fail_unlock ? -1 : 0; +} +void AHardwareBuffer_release(AHardwareBuffer *b) { assert(b == &buffer); releases++; } +static ASurfaceControl *create(ANativeWindow *w, const char *n) { + assert(w == window && strcmp(n, "droiddeck_wayland_black") == 0); creates++; + return (ASurfaceControl *)(uintptr_t)(100 + creates); +} +static ASurfaceTransaction *tx_create(void) { return fail_tx ? NULL : (ASurfaceTransaction *)2; } +static void tx_delete(ASurfaceTransaction *t) { assert(t == (ASurfaceTransaction *)2); } +static void tx_apply(ASurfaceTransaction *t) { (void)t; applies++; } +static void set_buffer(ASurfaceTransaction *t, ASurfaceControl *s, AHardwareBuffer *b, int fd) { + (void)t; (void)s; assert(b == &buffer && fd == -1); + /* No garbage, including padded row bytes, reaches the display. */ + for (unsigned i=0; i<sizeof(buffer.pixels); i++) assert(buffer.pixels[i] == 0); + assert(unlocks > 0); buffers++; +} +static void visibility(ASurfaceTransaction *t, ASurfaceControl *s, int8_t v) { (void)t; (void)s; visible=v; } +static void z(ASurfaceTransaction *t, ASurfaceControl *s, int32_t v) { (void)t; (void)s; zorder=v; } +static void transparency(ASurfaceTransaction *t, ASurfaceControl *s, int8_t v) { (void)t; (void)s; opacity=v; } +static void geometry(ASurfaceTransaction *t, ASurfaceControl *s, const ARect *src, const ARect *dst, int32_t rotation) { + (void)t; (void)s; assert(src->right==16 && src->bottom==16 && rotation==0); destination=*dst; +} +static void reparent(ASurfaceTransaction *t, ASurfaceControl *s, ASurfaceControl *parent) { + (void)t; (void)s; assert(parent==NULL); retirements++; +} +static void release(ASurfaceControl *s) { assert(s); } +static void reset(void) { + base_hide(1); g_blank=NULL; + fail_alloc=fail_lock=fail_unlock=fail_tx=0; + allocs=locks=unlocks=buffers=applies=creates=releases=retirements=0; + window=(ANativeWindow *)1; +} +int main(void) { + assert(quest_device_matches("Quest 2", "", "")); + assert(quest_device_matches("quest 3", "", "")); + assert(quest_device_matches("Quest 3S", "", "")); + assert(quest_device_matches("unknown", "hollywood", "Oculus")); + assert(quest_device_matches("unknown", "eureka", "Meta")); + assert(quest_device_matches("unknown", "panther", "Oculus")); + assert(!quest_device_matches("Pixel", "panther", "Google")); + assert(!quest_device_matches("Quest Pro", "seacliff", "Meta")); + assert(!quest_device_matches("", "", "")); + api.state=1; api.createFromWindow=create; api.txCreate=tx_create; api.txDelete=tx_delete; + api.txApply=tx_apply; api.setBuffer=set_buffer; api.setVisibility=visibility; + api.setZOrder=z; api.setBufferTransparency=transparency; api.setGeometry=geometry; + api.reparent=reparent; api.release=release; + reset(); + assert(sc_layer_base_black(1920,1080)==0); + assert(visible==ASC_VISIBILITY_SHOW && zorder==0 && opacity==ASC_TRANSPARENCY_OPAQUE); + assert(destination.right==1920 && destination.bottom==1080); + assert(allocs==1 && locks==1 && buffers==1 && creates==1); + assert(sc_layer_base_black(1920,1080)==0 && applies==1); /* retained, not redrawn */ + assert(sc_layer_base_black(1440,1080)==0 && destination.right==1440 && allocs==1); + sc_layer_hide_base(); assert(!visible && !g_base_shown); + assert(sc_layer_base_black(1440,1080)==0 && visible && allocs==1); + base_hide(1); assert(!g_base_sc && !g_base_shown && retirements==1); + window=(ANativeWindow *)3; + assert(sc_layer_base_black(1280,720)==0 && creates==2 && allocs==1 && locks==1); + reset(); fail_alloc=1; + assert(sc_layer_base_black(1920,1080)==-1 && buffers==0 && locks==0); + reset(); fail_lock=1; + assert(sc_layer_base_black(1920,1080)==-1 && buffers==0 && releases==1 && g_blank==NULL); + reset(); fail_unlock=1; + assert(sc_layer_base_black(1920,1080)==-1 && buffers==0 && releases==1 && g_blank==NULL); + reset(); fail_tx=1; + assert(sc_layer_base_black(1920,1080)==-1 && buffers==0 && !g_base_shown); + fail_tx=0; assert(sc_layer_base_black(1920,1080)==0 && creates==1 && locks==1); + reset(); window=NULL; + assert(sc_layer_base_black(1920,1080)==-1 && allocs==0); + window=(ANativeWindow *)1; + assert(sc_layer_base_black(0,1080)==-1 && allocs==0); + puts("PASS: Quest backdrop initialization, padding, reuse, resize, retire and failure recovery"); +} diff --git a/tools/release/axml_rename.py b/tools/release/axml_rename.py index 92da2753af..24fba660c9 100644 --- a/tools/release/axml_rename.py +++ b/tools/release/axml_rename.py @@ -1,6 +1,4 @@ #!/usr/bin/env python3 -# axml_rename.py in.apk out.apk old=new ... : rewrite whole strings in AndroidManifest.xml's string -# pool (binary XML), leaving every other entry of the apk byte-identical. Unsigned output. import struct, sys, zipfile def dec_len8(b, o): diff --git a/tools/release/check_android_libraries.py b/tools/release/check_android_libraries.py index 765e226acc..5d6c775561 100644 --- a/tools/release/check_android_libraries.py +++ b/tools/release/check_android_libraries.py @@ -8,13 +8,14 @@ from zipfile import ZipFile SYSTEM = set('libc.so libm.so libdl.so liblog.so libandroid.so libz.so libvulkan.so libstdc++.so ' - 'libGLESv2.so libEGL.so libnativewindow.so libjnigraphics.so libaaudio.so ' + 'libGLESv2.so libGLESv3.so libEGL.so libnativewindow.so libjnigraphics.so libaaudio.so ' 'libOpenSLES.so libmediandk.so libcamera2ndk.so libsync.so libneuralnetworks.so'.split()) EXPORTS = ['Java_com_droiddeck_launcher_stores_StoresNative_nativeVersion', 'Java_com_droiddeck_launcher_stores_gog_GogNative_nativeStart', - 'Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeStart', - 'Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeAssemble', - 'Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeStart'] + 'Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeCall', + 'Java_com_droiddeck_launcher_stores_epic_EpicNative_nativeInstall', + 'Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeCall', + 'Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeInstall'] def check(apk, readelf, stores=True): diff --git a/tools/release/check_session_assets.py b/tools/release/check_session_assets.py index 89d05f01b3..aa1985121c 100644 --- a/tools/release/check_session_assets.py +++ b/tools/release/check_session_assets.py @@ -1,10 +1,19 @@ """Reject an APK with missing or stale session helpers, including cached local bundles.""" from pathlib import Path +import re import sys from zipfile import ZipFile OVERLAY = Path(__file__).resolve().parents[1] / 'linuxfs/overlay' +SESSION_FILES = OVERLAY.parents[2] / 'app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt' + + +def check_extraction(overlay, source): + deployed = set(re.findall(r'"(usr/local/bin/droiddeck-[^"]+)"\s+to\s+"\1"', source)) + return ['not extracted at session start: ' + path.relative_to(overlay).as_posix() + for path in sorted((overlay / 'usr/local/bin').glob('droiddeck-*')) + if path.relative_to(overlay).as_posix() not in deployed] def source_assets(overlay=OVERLAY): @@ -23,7 +32,7 @@ def source_assets(overlay=OVERLAY): def check(apk, overlay=OVERLAY): - errors = [] + errors = check_extraction(overlay, SESSION_FILES.read_text()) if overlay == OVERLAY else [] with ZipFile(apk) as package: for source, asset in source_assets(overlay).items(): try: diff --git a/tools/release/pr_discord.py b/tools/release/pr_discord.py index 6b1b01f4b9..b577df247b 100644 --- a/tools/release/pr_discord.py +++ b/tools/release/pr_discord.py @@ -103,10 +103,11 @@ def description_excerpt(body): def build_content(repo, number, title, sha, apk, release, description=None): excerpt = description_excerpt(description) - return (f"**Signed PR test build** `pr-{number}` · `{sha[:7]}`\n" + return (f"**Signed test build** `pr-{number}` · `{sha[:7]}`\n" f"[#{number}](https://github.com/{repo}/pull/{number}): {plain_title(title)}\n" + (f"\n{excerpt}\n\n" if excerpt else "") + "_Not merged — for testing._\n" + f"In the app: **Updates → Test builds → #{number}**\n" f"Download: [standard APK](<{apk}>) · [all variants](<{release}>)") @@ -116,7 +117,7 @@ def retired_content(content, merged): content = "\n".join(line[2:-2] if line.startswith("~~") and line.endswith("~~") else line for line in content.splitlines()[2:]) struck = "\n".join(f"~~{line}~~" if line else "" for line in content.splitlines()) - return f"**{label}** — this PR test build is no longer available.\n\n{struck}" + return f"**{label}** — this test build is no longer available.\n\n{struck}" def sync(mode, repo, number, discord, sha="", apk="", release=""): diff --git a/tools/release/runtime_inputs.py b/tools/release/runtime_inputs.py index b332ee36ad..a539e46c4e 100644 --- a/tools/release/runtime_inputs.py +++ b/tools/release/runtime_inputs.py @@ -15,8 +15,13 @@ MANIFEST = Path('app/build/runtime-inputs.json') SOURCE_PATHS = ['app/build.gradle', 'app/src/main/cpp/fakeinput_steam.cpp', 'app/src/main/assets/pulseaudio.tzst', 'tools/linuxfs', 'tools/proot', 'tools/aaudio-sink', 'tools/directaudio', 'tools/gamescope/release.env', 'tools/droiddeck-esync/release.env', - 'tools/mangoapp', 'tools/msitools', 'tools/build_local.sh', - 'tools/release/runtime_inputs.py', 'app/src/main/assets/desktop-removal'] + 'tools/mangoapp', 'tools/msitools', 'tools/comet', 'tools/build_local.sh', + 'tools/release/runtime_inputs.py', 'app/src/main/assets/desktop-removal', + 'tools/quest', 'tools/vr/src', 'tools/vr/driver_droiddeck', 'tools/vr/layer', 'tools/vr/build.sh', + 'app/src/main/cpp/waylandcomp/src/headpose_shm.h', + 'app/src/main/cpp/waylandcomp/src/spatialpose_shm.h', + 'app/src/main/cpp/adrenotools/src/hook/kgsl.h', + 'app/src/main/assets/graphics_driver/adrenotools-turnip25.1.0.tzst'] def digest(path): @@ -34,7 +39,7 @@ def sources(root): for name in SOURCE_PATHS: path = root / name files.extend(path.rglob('*') if path.is_dir() else [path]) - return {str(path.relative_to(root)): digest(path) for path in sorted(set(files)) + return {path.relative_to(root).as_posix(): digest(path) for path in sorted(set(files)) if path.is_file() and '__pycache__' not in path.parts and path.suffix != '.pyc'} @@ -44,26 +49,46 @@ def outputs(root): base = root / 'app/src/main/assets' / tree for path in base.rglob('*'): if path.is_file() and not any(part.startswith('.') for part in path.relative_to(base).parts): - result['assets/' + tree + '/' + str(path.relative_to(base))] = str(path.relative_to(root)) + result['assets/' + tree + '/' + path.relative_to(base).as_posix()] = path.relative_to(root).as_posix() for library in ['libproot.so', 'libproot-loader.so', 'libdirectaudiorelay.so']: result['lib/arm64-v8a/' + library] = 'app/src/main/jniLibs/arm64-v8a/' + library result['assets/pulseaudio.tzst'] = 'app/build/prepared-assets/pulseaudio.tzst' + result['assets/graphics_driver/adrenotools-turnip25.1.0-quest1.tzst'] = \ + 'app/build/prepared-assets/graphics_driver/adrenotools-turnip25.1.0-quest1.tzst' + for name in ['turnip26.3.0-a6xx', 'turnip26.3.0-quest2']: + result[f'assets/graphics_driver/adrenotools-{name}.tzst'] = \ + f'app/build/prepared-assets/graphics_driver/adrenotools-{name}.tzst' return result def required(): - paths = ['assets/linuxfs/' + name for name in ['libfakeinput.so', 'libblsession.so', + paths = ['assets/graphics_driver/adrenotools-turnip25.1.0-quest1.tzst'] + paths += [f'assets/graphics_driver/adrenotools-{name}.tzst' + for name in ['turnip26.3.0-a6xx', 'turnip26.3.0-quest2']] + paths += ['assets/linuxfs/' + name for name in ['libfakeinput.so', 'libblsession.so', 'libblfastpath.so', 'libssbs.so', 'usr/local/bin/droiddeck-clipboard', 'usr/local/bin/gamescope', 'usr/local/lib/droiddeck/uruntime']] for arch in ['x86_64', 'i386']: paths += ['assets/linuxfs/' + arch + '/' + lib for lib in ['libfakeinput.so', 'libblsession.so']] paths += ['assets/linuxfs/x86_64/' + lib for lib in - ['libfaultreport.so', 'libthunkaudit.so', 'libvulkan-thunk.so']] + ['libfaultreport.so', 'libvulkan-thunk.so', 'libwebkitinput.so']] paths += ['assets/linuxfs/i386/libfaultreport.so'] paths += ['assets/linuxfs/usr/local/lib/droiddeck-msitools/' + name for name in ['msiinfo', 'cabextract', '7z', '7z.so', 'libmsi-1.0.so.0', 'libgsf-1.so.114', 'libgcab-1.0.so.0']] + paths += ['assets/linuxfs/usr/local/lib/droiddeck-vr/' + name for name in + ['droiddeck/bin/linuxarm64/driver_droiddeck.so', 'droiddeck/bin/linuxarm64/xr-display-mode', + 'droiddeck/driver.vrdrivermanifest', + 'droiddeck/resources/settings/default.vrsettings', 'layer/libVkLayer_droiddeck_vr.so', + 'layer/VK_LAYER_DROIDDECK_vr.json', 'layer/VK_LAYER_DROIDDECK_vr_implicit.json', + 'layer/libdroiddeck_vr_scheduling.so']] + for side in ['left', 'right']: + paths += [f'assets/linuxfs/usr/local/lib/droiddeck-vr/droiddeck/resources/rendermodels/droiddeck_hand_{side}/{name}' + for name in [f'droiddeck_hand_{side}.json', 'hand.mtl', 'hand.png', 'hand_open.obj', 'hand_fist.obj', + 'thumb_index_open.obj', 'thumb_index_pinch.obj']] paths += ['assets/linuxfs/usr/local/lib/mangoapp/' + name for name in ['mangoapp', 'libfmt.so.10', 'libspdlog.so.1.13', 'libglfw.so.3', 'libtraceevent.so.1', 'libtracefs.so.1']] + paths += ['assets/linuxfs/usr/local/lib/droiddeck-comet/' + name for name in + ['comet', 'GalaxyCommunication.exe', 'update-permissions.exe', 'LICENSE', 'version']] for driver in ['linux-wine11', 'linux-wine11-systhread']: paths += ['assets/directaudio/' + driver + '/' + name for name in ['aarch64-unix/winedirectaudio.so', 'aarch64-windows/winedirectaudio.drv', @@ -78,7 +103,6 @@ def required(): def record(root=ROOT): - # Refresh scripts even on a CI native-cache hit; these are source, not cached binaries. if root == ROOT: from check_session_assets import source_assets for source, asset in source_assets().items(): @@ -95,7 +119,6 @@ def record(root=ROOT): gzip.decompress((root / path).read_bytes()) except (OSError, EOFError) as error: raise ValueError('Invalid desktop removal inventory: ' + name) from error - # Check inside the compressed payload, where a plain Gradle build used to ship no sinks. process = subprocess.Popen(['zstd', '-dc', str(root / paths['assets/pulseaudio.tzst'])], stdout=subprocess.PIPE) try: with tarfile.open(fileobj=process.stdout, mode='r|') as archive: diff --git a/tools/release/sign-apk.sh b/tools/release/sign-apk.sh index 63475b4001..2cf46c551e 100755 --- a/tools/release/sign-apk.sh +++ b/tools/release/sign-apk.sh @@ -1,20 +1,4 @@ #!/usr/bin/env bash -# sign-apk.sh <in.apk> <variant> <out.apk> -# -# Turns a CI build (signed with the public AOSP testkey) into one package of tools/release/variants.txt -# signed with DroidDeck's own key, carrying the hand-over from the testkey: -# - v1 + v2 are signed by the testkey, v3 by our key, with a signed lineage testkey -> our key; -# - an install from before (testkey) updates to it and keeps its data; -# - the testkey loses its rollback right, so an apk signed with the testkey alone - which anyone -# can make - is refused as an update to it (device-proven on the Pocket FIT, 2026-09-24); -# - --rotation-min-sdk-version 28: the lineage applies from Android 9, not only from 13. -# -# The key comes from the environment and is never written anywhere but the path given: -# RELEASE_KEYSTORE path to the PKCS12 keystore -# RELEASE_STORE_PASSWORD its password (the key has the same one: PKCS12) -# RELEASE_KEY_ALIAS the key's alias -# BUILD_TOOLS Android build-tools dir (zipalign, apksigner, aapt) -# RELEASE_SIGNER_SHA256 optional: the expected certificate digest, else keystore/release-signer.sha256 set -euo pipefail die() { echo "::error::$*" >&2; exit 1; } @@ -37,7 +21,6 @@ export TESTKEY_PASSWORD=android work=$(mktemp -d) trap 'rm -rf "$work"' EXIT -# The package name and everything the manifest derives from it; component class names stay. P=com.droiddeck.launcher if [ "$pkg" = "$P" ]; then python3 "$here/axml_rename.py" "$in" "$work/renamed.apk" @@ -45,12 +28,12 @@ else python3 "$here/axml_rename.py" "$in" "$work/renamed.apk" \ "$P=$pkg" "$P.androidx-startup=$pkg.androidx-startup" "$P.logs=$pkg.logs" \ "$P.documents=$pkg.documents" "$P.home=$pkg.home" "$P.agent=$pkg.agent" \ + "$P.vr_recovery=$pkg.vr_recovery" \ "$P.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION=$pkg.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" fi got=$("$BUILD_TOOLS/aapt" dump badging "$work/renamed.apk" | sed -n "s/^package: name='\([^']*\)'.*/\1/p") [ "$got" = "$pkg" ] || die "$variant: the apk says package '$got', not '$pkg'" if [ "$pkg" != "$P" ]; then - # A provider left on the old authority would clash with the standard app installed beside it. tree=$("$BUILD_TOOLS/aapt" dump xmltree "$work/renamed.apk" AndroidManifest.xml) grep -E 'android:(authorities|taskAffinity)' <<<"$tree" | grep -F "\"$P." \ && die "$variant: the manifest still names $P in an authority or task" @@ -58,8 +41,6 @@ fi "$BUILD_TOOLS/zipalign" -p -f 4 "$work/renamed.apk" "$work/aligned.apk" -# The lineage: the testkey vouches for our key. Made fresh each time (it is two certificates and -# a signature, nothing secret beyond the key that signs it). "$BUILD_TOOLS/apksigner" rotate --out "$work/lineage" \ --old-signer --ks "$TESTKEY" --ks-type PKCS12 --ks-pass env:TESTKEY_PASSWORD \ --ks-key-alias testkey --key-pass env:TESTKEY_PASSWORD --set-rollback false \ @@ -76,13 +57,9 @@ fi --out "$out" "$work/aligned.apk" rm -f "$out.idsig" -# What the apk must carry, checked rather than assumed. "$BUILD_TOOLS/apksigner" verify --min-sdk-version 26 "$out" >/dev/null || die "$variant: does not verify" -# (Listed first, then searched: grep -q stops reading early, which fails a pipe under pipefail.) listing=$(unzip -l "$out") grep -qE 'META-INF/.*\.(SF|RSA)$' <<<"$listing" || die "$variant: no JAR signature (old installers)" -# Android 9+ must see our key and only our key. apksigner labels signers "Signer #1", "Signer -# (minSdkVersion=28, ...)" or "V3.0 Signer:" depending on its version; the digests are what count. certs=$("$BUILD_TOOLS/apksigner" verify --min-sdk-version 28 --print-certs "$out") v3=$(sed -n 's/^.*Signer.* certificate SHA-256 digest: //p' <<<"$certs" | sort -u) if [ "$v3" != "$expected" ]; then diff --git a/tools/release/update_catalog.py b/tools/release/update_catalog.py index b16e4eab3d..808e576a0d 100755 --- a/tools/release/update_catalog.py +++ b/tools/release/update_catalog.py @@ -368,8 +368,6 @@ def build_catalog(source: GitHub, ci: GitHub, source_repo: str, ci_repo: str) -> if version_code_text and version_code_text.isdigit(): version_code = int(version_code_text) else: - # Legacy test releases did not record it. If the PR did not change build.gradle, - # the base value is exact; otherwise use the PR head's value. version_code = base_code try: changed = source.get(f"/repos/{source_repo}/pulls/{pr}/files?per_page=100") diff --git a/tools/release/variants.txt b/tools/release/variants.txt index 6071068008..0df71a2992 100644 --- a/tools/release/variants.txt +++ b/tools/release/variants.txt @@ -1,8 +1,3 @@ -# The packages a signed build ships as. The same apk, with only the manifest's package name (and -# the names derived from it) changed: some phones give their performance modes only to apps with -# certain names. Each is its own app to Android - installs beside the others, with its own data. -# -# name package file suffix standard com.droiddeck.launcher - pubg com.tencent.ig -pubg antutu com.antutu.benchmark.full -antutu diff --git a/tools/run_windows.ps1 b/tools/run_windows.ps1 new file mode 100644 index 0000000000..af71ce7bce --- /dev/null +++ b/tools/run_windows.ps1 @@ -0,0 +1,24 @@ +param([string]$Serial) +$ErrorActionPreference = 'Stop' +$repoRoot = Split-Path -Parent $PSScriptRoot +Push-Location $repoRoot +try { + $javaConfig = if (Test-Path -LiteralPath '.gradle/config.properties' -PathType Leaf) { + Get-Content -LiteralPath '.gradle/config.properties' | Where-Object { $_ -match '^java.home=' } | Select-Object -First 1 + } + if ($javaConfig) { $env:JAVA_HOME = $javaConfig.Substring('java.home='.Length).Replace('\\', '\').Replace('\:', ':') } + & .\gradlew.bat :app:assembleDebug --console=plain + if ($LASTEXITCODE -ne 0) { throw 'Android build failed.' } + $adbArgs = @() + if ($Serial) { $adbArgs = @('-s', $Serial) } + & adb @adbArgs install -r 'app/build/outputs/apk/debug/app-debug.apk' + if ($LASTEXITCODE -ne 0) { throw 'APK installation failed; existing app data was not removed.' } + $suffixLine = if (Test-Path -LiteralPath 'local.properties' -PathType Leaf) { + Get-Content -LiteralPath 'local.properties' | Where-Object { $_ -match '^droiddeck.debugApplicationIdSuffix=' } | Select-Object -First 1 + } + $suffix = if ($suffixLine) { $suffixLine.Substring('droiddeck.debugApplicationIdSuffix='.Length) } else { '' } + & adb @adbArgs shell am start -W -n "com.droiddeck.launcher$suffix/com.droiddeck.launcher.MainActivity" + if ($LASTEXITCODE -ne 0) { throw 'App launch failed.' } +} finally { + Pop-Location +} diff --git a/tools/test_local.sh b/tools/test_local.sh index a2a69da629..bd29aef7dc 100755 --- a/tools/test_local.sh +++ b/tools/test_local.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# Session helpers and ELF preload tests need Linux (/proc, inotify and glibc), as in CI. set -euo pipefail repo_root=$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) cd "$repo_root" diff --git a/tools/test_quest_xr.py b/tools/test_quest_xr.py new file mode 100644 index 0000000000..bed182e743 --- /dev/null +++ b/tools/test_quest_xr.py @@ -0,0 +1,134 @@ +import argparse +import json +import os +import subprocess +import time +from pathlib import Path + +from adb_device import resolve_serial + + +def validate_samples(samples, require_controllers=False): + if len(samples) < 2: + return 'No advancing telemetry; check runtime initialization and headset wake/proximity' + if samples[-1]['rendered'] - samples[0]['rendered'] < 72: + return 'Fewer than 72 additional stereo frames were submitted' + if not any(sample['sessionState'] == 5 and sample['headFlags'] & 15 == 15 for sample in samples): + return 'No focused session with tracked 6DoF position and orientation' + if samples[-1]['sessionState'] != 5 or samples[-1]['headFlags'] & 15 != 15: + return 'Session did not remain focused with tracked 6DoF through the final sample' + if require_controllers and not any(all(sample['controllersActive']) for sample in samples): + return 'Both controllers did not become active' + if samples[-1].get('uploadedFrames', 0) - samples[0].get('uploadedFrames', 0) < 72: + return 'No advancing owned SteamVR images; XR submissions alone are insufficient' + if samples[-1].get('sourceFrameId', 0) <= samples[0].get('sourceFrameId', 0): + return 'SteamVR source frame IDs did not advance' + if samples[-1].get('steamvrState') != 4: + return 'SteamVR did not report RUNNING' + expected = 'frames' + if samples[-1].get('source') != expected: + return 'Wrong projection source' + return None + + +def summarize_samples(samples): + result = {'sampleCount': len(samples), 'focusedTrackedFraction': None, 'observedSeconds': None, 'ratesHz': {}} + if not samples: + return result + result['focusedTrackedFraction'] = sum(sample.get('sessionState') == 5 and sample.get('headFlags', 0) & 15 == 15 + for sample in samples) / len(samples) + if len(samples) < 2 or '_hostMonotonicSeconds' not in samples[0] or '_hostMonotonicSeconds' not in samples[-1]: + return result + duration = samples[-1]['_hostMonotonicSeconds'] - samples[0]['_hostMonotonicSeconds'] + if duration <= 0: + return result + result['observedSeconds'] = duration + for counter in ('rendered', 'guestFrames', 'receivedFrames', 'rejectedFrames', 'uploadedFrames'): + if counter in samples[0] and counter in samples[-1]: + delta = samples[-1][counter] - samples[0][counter] + result['ratesHz'][counter] = delta / duration if delta >= 0 else None + period = samples[-1].get('periodNs', 0) + result['runtimeRefreshHz'] = 1000000000 / period if period > 0 else None + return result + + +def collect_device_metrics(adb, package): + result = {} + for name, command in [('battery', ('shell', 'dumpsys', 'battery')), + ('thermal', ('shell', 'dumpsys', 'thermalservice')), + ('memory', ('shell', 'dumpsys', 'meminfo', package))]: + try: + result[name] = {'available': True, 'text': adb(*command)} + except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as error: + result[name] = {'available': False, 'error': type(error).__name__} + return result + + +def main(): + parser = argparse.ArgumentParser(description='Validate immersive DroidDeck XR on a connected Quest') + parser.add_argument('--adb', default=os.environ.get('ADB', 'adb')) + parser.add_argument('--serial') + parser.add_argument('--seconds', type=int, default=20) + parser.add_argument('--output', type=Path, default=Path('build/questxr-validation')) + parser.add_argument('--require-controllers', action='store_true') + parser.add_argument('--keep-awake', action='store_true') + parser.add_argument('--metrics', action='store_true', help='Record public battery, thermal and package memory dumps before/after testing') + args = parser.parse_args() + if args.seconds < 5 or args.seconds > 600: + parser.error('--seconds must be between 5 and 600') + serial = resolve_serial(args.adb, args.serial) + args.output.mkdir(parents=True, exist_ok=True) + + def adb(*command): + return subprocess.run([args.adb, '-s', serial, *command], check=True, + capture_output=True, text=True, timeout=15).stdout + + package = 'com.droiddeck.launcher' + health_path = f'/sdcard/Android/data/{package}/files/xr-health.json' + adb('shell', 'rm', '-f', health_path) + adb('shell', 'input', 'keyevent', 'KEYCODE_WAKEUP') + launch = ['shell', 'am', 'start', '-n', f'{package}/.QuestXrActivity'] + samples = [] + failure = None + metrics = {'before': collect_device_metrics(adb, package)} if args.metrics else None + try: + adb('shell', 'am', 'broadcast', '-a', 'com.oculus.vrpowermanager.prox_close') + adb(*launch) + deadline = time.monotonic() + args.seconds + while time.monotonic() < deadline: + time.sleep(1) + adb('shell', 'am', 'broadcast', '-a', 'com.oculus.vrpowermanager.prox_close') + try: + sample = json.loads(adb('shell', 'cat', health_path)) + sample['_hostMonotonicSeconds'] = time.monotonic() + samples.append(sample) + if sample.get('error'): + failure = sample['error'] + break + except (subprocess.CalledProcessError, json.JSONDecodeError): + pass + except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as error: + failure = f'ADB operation failed: {type(error).__name__}' + finally: + if not args.keep_awake: + try: + adb('shell', 'am', 'broadcast', '-a', 'com.oculus.vrpowermanager.prox_far') + except (subprocess.CalledProcessError, subprocess.TimeoutExpired): + failure = failure or 'Could not restore headset proximity after testing' + try: + log = adb('logcat', '-d', '-s', 'DroidDeckXR:I', 'OpenXR-Loader:W', 'AndroidRuntime:E') + except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as error: + log = str(error) + (args.output / 'logcat.txt').write_text(log, encoding='utf-8') + if metrics is not None: + metrics['after'] = collect_device_metrics(adb, package) + failure = failure or validate_samples(samples, args.require_controllers) + report = {'ok': failure is None, 'error': failure, 'samples': samples, 'summary': summarize_samples(samples), 'deviceMetrics': metrics} + (args.output / 'report.json').write_text(json.dumps(report, indent=2), encoding='utf-8') + print(json.dumps({'ok': report['ok'], 'error': failure, 'samples': len(samples), + 'last': samples[-1] if samples else None}, indent=2)) + return 0 if report['ok'] else 1 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/tools/tests/effects_source_cache_harness.c b/tools/tests/effects_source_cache_harness.c new file mode 100644 index 0000000000..1d355c2449 --- /dev/null +++ b/tools/tests/effects_source_cache_harness.c @@ -0,0 +1,83 @@ +#include <assert.h> +#include <stdint.h> +#include <stdio.h> +#include <string.h> + +#define VK_PRESENT_H +const char *vkp_gpu_name(void) { return "cache test"; } +void droiddeck_log(const char *tag, const char *fmt, ...) { (void)tag; (void)fmt; } +#include "vk_loader.h" +struct vk_api g_vk; +#include "effects_chain.c" + +static unsigned views, sets, freed_views, freed_sets; +static VkImageView bound_view; +static VkResult VKAPI_CALL create_view(VkDevice dev, const VkImageViewCreateInfo *info, + const VkAllocationCallbacks *alloc, VkImageView *out) { + (void)dev; (void)alloc; + assert(info->image != VK_NULL_HANDLE); + *out = (VkImageView)(uintptr_t)(100 + ++views); + return VK_SUCCESS; +} +static VkResult VKAPI_CALL allocate_set(VkDevice dev, const VkDescriptorSetAllocateInfo *info, + VkDescriptorSet *out) { + (void)dev; + assert(info->descriptorPool != VK_NULL_HANDLE && info->descriptorSetCount == 1); + *out = (VkDescriptorSet)(uintptr_t)(200 + ++sets); + return VK_SUCCESS; +} +static void VKAPI_CALL update_set(VkDevice dev, uint32_t count, const VkWriteDescriptorSet *writes, + uint32_t copies, const VkCopyDescriptorSet *copy) { + (void)dev; (void)copies; (void)copy; + assert(count == 1); + bound_view = writes->pImageInfo->imageView; +} +static VkResult VKAPI_CALL free_set(VkDevice dev, VkDescriptorPool pool, uint32_t count, + const VkDescriptorSet *set) { + (void)dev; (void)pool; + assert(pool != VK_NULL_HANDLE && count == 1 && *set != VK_NULL_HANDLE); + freed_sets++; + return VK_SUCCESS; +} +static void VKAPI_CALL destroy_view(VkDevice dev, VkImageView view, const VkAllocationCallbacks *alloc) { + (void)dev; (void)alloc; + assert(view != VK_NULL_HANDLE); + freed_views++; +} + +int main(int argc, char **argv) { + assert(argc == 2); + g_dev = (VkDevice)(uintptr_t)1; + g_dpool = (VkDescriptorPool)(uintptr_t)2; + g_dsl = (VkDescriptorSetLayout)(uintptr_t)3; + g_sampler = (VkSampler)(uintptr_t)4; + g_vk.CreateImageView = create_view; + g_vk.AllocateDescriptorSets = allocate_set; + g_vk.UpdateDescriptorSets = update_set; + g_vk.FreeDescriptorSets = free_set; + g_vk.DestroyImageView = destroy_view; + VkImage source = (VkImage)(uintptr_t)10; + assert(scene_ensure(source, 1280, 720) == 0); + VkImageView original = bound_view; + if (!strcmp(argv[1], "recycled")) { + vkp_effects_forget_image(source); + assert(freed_sets == 1 && freed_views == 1); + assert(scene_ensure(source, 1280, 720) == 0); + assert(bound_view != original && views == 2 && sets == 2); + } else if (!strcmp(argv[1], "unrelated")) { + vkp_effects_forget_image((VkImage)(uintptr_t)11); + vkp_effects_forget_image(VK_NULL_HANDLE); + assert(scene_ensure(source, 1280, 720) == 0); + assert(bound_view == original && views == 1 && !freed_views && !freed_sets); + } else if (!strcmp(argv[1], "repeated")) { + vkp_effects_forget_image(source); + vkp_effects_forget_image(source); + assert(freed_sets == 1 && freed_views == 1); + } else { + assert(!strcmp(argv[1], "resize")); + assert(scene_ensure(source, 1920, 1080) == 0); + assert(bound_view != original && views == 2 && freed_views == 1 && freed_sets == 1); + } + puts("PASS"); + return 0; +} diff --git a/tools/tests/pointer_release_harness.c b/tools/tests/pointer_release_harness.c new file mode 100644 index 0000000000..8369eb3771 --- /dev/null +++ b/tools/tests/pointer_release_harness.c @@ -0,0 +1,88 @@ +#include <assert.h> +#include <stdint.h> +#include <stdio.h> +#include <string.h> + +#define WL_POINTER_BUTTON_STATE_RELEASED 0 +#define WL_POINTER_FRAME_SINCE_VERSION 5 +struct wl_resource { int version, releases, frames; uint32_t held; }; +struct seat_pointer { struct wl_resource *ptr, *focus; }; +static struct seat_pointer g_ptrs[3]; +static int g_nptrs = 3; +static void *g_grab, *g_display; +static unsigned motion_calls, flushes; +static uint32_t now_ms(void) { return 42; } +static uint32_t wl_display_next_serial(void *d) { (void)d; return 1; } +static int wl_resource_get_version(struct wl_resource *r) { return r->version; } +static void wl_pointer_send_frame(struct wl_resource *r) { r->frames++; } +static void wl_display_flush_clients(void *d) { (void)d; flushes++; } +static void wl_pointer_send_button(struct wl_resource *r, uint32_t serial, + uint32_t t, uint32_t button, uint32_t state) { + (void)serial; (void)t; + assert(state == WL_POINTER_BUTTON_STATE_RELEASED); + r->held &= ~(1u << (button - 0x110)); + r->releases++; +} +/* The old dispatcher calls this even for releases, emitting stale coordinates. + * Recording this boundary detects that unwanted motion/focus routing path. */ +static void pointer_input(double x, double y, int relative, uint32_t button, int pressed) { + assert(x == 0 && y == 0 && relative == 1 && button >= 0x110 && button <= 0x112); + assert(pressed == 1); + motion_calls++; +} +#include "pointer_button.inc" +#define BTN_LEFT 0x110 +#define MAX_TOUCH_POINTS 2 +struct touch_point { int pointer_fallback; }; +static struct touch_point g_touch_points[MAX_TOUCH_POINTS]; +struct seat_touch { struct wl_resource *touch, *focus; }; +static struct seat_touch g_touches[1]; +static int g_ntouches = 1, cancels; +static void wl_touch_send_cancel(struct wl_resource *r) { (void)r; cancels++; } +#include "touch_cancel_all.inc" + +int main(int argc, char **argv) { + assert(argc == 2); + struct wl_resource surface = {0}; + struct wl_resource a = {.version = 5, .held = 7}; + struct wl_resource b = {.version = 4, .held = 7}; + struct wl_resource other = {.version = 5, .held = 7}; + g_ptrs[0] = (struct seat_pointer){&a, &surface}; + g_ptrs[1] = (struct seat_pointer){&b, &surface}; + g_ptrs[2] = (struct seat_pointer){&other, NULL}; + g_grab = &surface; + if (!strcmp(argv[1], "fallback") || !strcmp(argv[1], "native")) { + int fallback = !strcmp(argv[1], "fallback"); + g_touches[0] = (struct seat_touch){&a, &surface}; + g_touch_points[0].pointer_fallback = fallback; + touch_cancel_all(); + assert(!motion_calls && cancels == 1 && !g_touches[0].focus); + assert(!g_touch_points[0].pointer_fallback); + assert(a.releases == fallback && a.held == (fallback ? 6u : 7u)); + for (uint32_t button = 0x110; button <= 0x112; button++) pointer_button(button, 0); + assert(!motion_calls && !a.held && !b.held && !g_grab); + } else if (!strcmp(argv[1], "press")) { + pointer_button(0x110, 1); + assert(motion_calls == 1 && !a.releases && g_grab == &surface); + } else if (!strcmp(argv[1], "unfocused")) { + g_ptrs[0].focus = g_ptrs[1].focus = NULL; + pointer_button(0x110, 0); + assert(!motion_calls && !a.releases && !b.releases && !other.releases); + assert(!g_grab); + } else if (!strcmp(argv[1], "cleanup")) { + for (uint32_t button = 0x110; button <= 0x112; button++) pointer_button(button, 0); + assert(!motion_calls && !a.held && !b.held && other.held == 7); + assert(a.releases == 3 && b.releases == 3 && !other.releases); + assert(!g_grab && flushes == 3); + } else { + assert(!strcmp(argv[1], "focused")); + a.held = b.held = 1; + pointer_button(0x110, 0); + assert(!motion_calls && !a.held && !b.held); + assert(a.releases == 1 && b.releases == 1 && !other.releases); + assert(a.frames == 1 && !b.frames && !other.frames); + assert(g_ptrs[0].focus == &surface && g_ptrs[1].focus == &surface); + assert(!g_grab && flushes == 1); + } + puts("PASS"); +} diff --git a/tools/tests/steam_vr_launch_harness.js b/tools/tests/steam_vr_launch_harness.js new file mode 100644 index 0000000000..62d0127398 --- /dev/null +++ b/tools/tests/steam_vr_launch_harness.js @@ -0,0 +1,83 @@ +const assert = require('assert'); +const vm = require('vm'); +const source = require('fs').readFileSync(process.argv[2], 'utf8'); +const calls = [], requests = [], errors = [], timers = new Set(); +let changed; +const apps = { RunGame(...args) { calls.push({receiver: this, args}); return 'native'; } }; +const openvr = { + RegisterForVRModeChange(callback) { changed = callback; callback(false); return {unregister() {}}; }, + StartVR(...args) { return args; }, +}; +const overview = new Map([ + ['611670', {vr_only: true}], + ['620980', {vr_supported: true}], + ['730', {vr_only: false, vr_supported: false}], + ['18446744069414584320', {BSupportsVR() { return true; }}], +]); +const context = { + SteamClient: {Apps: apps, OpenVR: openvr}, + appStore: {GetAppOverviewByGameID: id => overview.get(id)}, + droiddeckLaunchSteamVr: id => requests.push(id), + setTimeout(callback, ms) { assert.strictEqual(ms, 600000); timers.add(callback); return callback; }, + clearTimeout: timer => timers.delete(timer), + console: {error: message => errors.push(message)}, +}; +context.window = context; +vm.createContext(context); +assert.strictEqual(vm.runInContext(source, context), 'installed'); +assert.strictEqual(vm.runInContext(source, context), 'present'); + +assert.strictEqual(apps.RunGame(730, '', -1, 100), 'native'); +assert.deepStrictEqual(requests, []); +assert.strictEqual(calls[0].receiver, apps); + +const receiver = {}; +apps.RunGame.call(receiver, '611670', 'custom args', 2, 100); +apps.RunGame('611670', 'duplicate', -1, 100); +assert.strictEqual(apps.RunGame(620980, '', -1, 100), 'native'); +assert.deepStrictEqual(requests, ['611670']); +assert.strictEqual(calls.length, 2); +assert.deepStrictEqual(calls[1].args, [620980, '', -1, 100]); +changed(false); +assert.strictEqual(calls.length, 2); +changed(true); +assert.strictEqual(calls.length, 3); +assert.strictEqual(calls[2].receiver, receiver); +assert.deepStrictEqual(calls[2].args, ['611670', 'custom args', 2, 100]); +assert.strictEqual(timers.size, 0); +changed(true); +assert.strictEqual(calls.length, 3); + +changed(false); +assert.strictEqual(apps.RunGame('18446744069414584320', '', -1, 100), 'native'); +assert.deepStrictEqual(calls[3].args, ['18446744069414584320', '', -1, 100]); +assert.deepStrictEqual(requests, ['611670']); +assert.strictEqual(timers.size, 0); +changed(true); + +apps.RunGame('250820', '', -1, 100); +openvr.StartVR(true); +assert.deepStrictEqual(requests.slice(-2), ['250820', '250820']); +assert.strictEqual(calls.length, 4); + +changed(false); +apps.RunGame('611670', '', -1, 100); +for (const timeout of [...timers]) { timers.delete(timeout); timeout(); } +assert.strictEqual(context.__droiddeckSteamVr.pending.size, 0); +assert.strictEqual(errors.length, 1); +changed(true); +assert.strictEqual(calls.length, 4); +apps.RunGame('611670', '', -1, 100); +assert.strictEqual(calls.length, 5); +assert.strictEqual(context.__droiddeckSteamVr.lastError, null); + +changed(false); +context.droiddeckLaunchSteamVr = () => { throw new Error('bridge disconnected'); }; +assert.throws(() => apps.RunGame('611670', '', -1, 100), /bridge disconnected/); +assert.strictEqual(context.__droiddeckSteamVr.pending.size, 0); +assert.strictEqual(timers.size, 0); +delete context.droiddeckLaunchSteamVr; +assert.strictEqual(apps.RunGame('611670', '', -1, 100), 'native'); +assert.strictEqual(apps.RunGame('250820', '', -1, 100), 'native'); +assert.deepStrictEqual(openvr.StartVR(true), [true]); +assert.strictEqual(calls.length, 7); diff --git a/tools/tests/sysv_otime_harness.c b/tools/tests/sysv_otime_harness.c new file mode 100644 index 0000000000..6fa57ca73c --- /dev/null +++ b/tools/tests/sysv_otime_harness.c @@ -0,0 +1,25 @@ +#define _GNU_SOURCE +#include <stdio.h> +#include <sys/ipc.h> +#include <sys/sem.h> + +int main(void) { + int creator = semget(0x5eed0001, 1, IPC_CREAT | IPC_EXCL | 0600); + if (creator < 0) { perror("semget"); return 1; } + struct semid_ds ds; + if (semctl(creator, 0, IPC_STAT, &ds) != 0 || ds.sem_otime != 0 || ds.sem_ctime == 0) { + printf("FAIL: a new set has otime %ld ctime %ld\n", (long)ds.sem_otime, (long)ds.sem_ctime); + return 1; + } + struct sembuf up = {0, 1, 0}; + if (semop(creator, &up, 1) != 0) { perror("semop"); return 1; } + int other = semget(0x5eed0001, 1, 0600); + if (other < 0 || semctl(other, 0, IPC_STAT, &ds) != 0 || ds.sem_otime == 0) { + printf("FAIL: otime still 0 after semop\n"); + return 1; + } + if (semctl(other, 0, GETVAL) != 1) { printf("FAIL: value\n"); return 1; } + semctl(creator, 0, IPC_RMID); + printf("PASS: sysv otime\n"); + return 0; +} diff --git a/tools/tests/termux_jni_harness.c b/tools/tests/termux_jni_harness.c index 66dc923c8b..049419ed2b 100644 --- a/tools/tests/termux_jni_harness.c +++ b/tools/tests/termux_jni_harness.c @@ -1,6 +1,3 @@ -// Drives Java_com_termux_terminal_JNI_createSubprocess against a mock JNIEnv that tracks local -// references the way ART does, so the JNI hygiene of app/src/main/cpp/termux/termux.c can be -// checked on the host. Built and run by tools/tests/test_termux_jni.py. #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -26,7 +23,6 @@ static jsize mock_array_length(JNIEnv* TERMUX_UNUSED(env), jarray array) static jobject mock_get_element(JNIEnv* TERMUX_UNUSED(env), jobjectArray TERMUX_UNUSED(array), jsize TERMUX_UNUSED(index)) { if (++live_refs > peak_refs) peak_refs = live_refs; - // ART aborts the process here: "local reference table overflow (max=512)". if (live_refs > LOCAL_REF_LIMIT) overflowed = 1; return (jobject) malloc(1); } @@ -53,7 +49,6 @@ static void mock_release_utf(JNIEnv* TERMUX_UNUSED(env), jstring string, const c { for (size_t i = 0; i < sizeof(pinned) / sizeof(pinned[0]); i++) { if (pinned[i].owner != NULL && pinned[i].chars == chars) { - // Releasing chars against some other string is a JNI contract violation. if (pinned[i].owner != string) mismatched_releases++; free(pinned[i].chars); pinned[i].owner = NULL; @@ -83,7 +78,6 @@ int main(int argc, char** argv) jsize arg_count = atoi(argv[1]); jsize env_count = atoi(argv[2]); - // The struct is JNINativeInterface in the NDK's header and JNINativeInterface_ in the JDK's. __typeof__(**(JNIEnv*) 0) table = { .GetArrayLength = mock_array_length, .GetObjectArrayElement = mock_get_element, @@ -97,7 +91,6 @@ int main(int argc, char** argv) }; const __typeof__(table)* env = &table; - // Arrays are modelled as their length; the caller's own references are not counted. jsize args = arg_count, envs = env_count; jint pid_slot[1] = {0}; jstring cmd = (jstring) "cmd", cwd = (jstring) "cwd"; diff --git a/tools/tests/test_binfmt_preload.py b/tools/tests/test_binfmt_preload.py index b1b0c09403..0d796ed516 100644 --- a/tools/tests/test_binfmt_preload.py +++ b/tools/tests/test_binfmt_preload.py @@ -46,7 +46,6 @@ int main(int argc, char **argv) { } """ -# Shell builtins only: anything it ran would be an x86 program, handed back to it. HANDLER = "#!/bin/sh\nprintf '%s\\n' \"$@\" > \"$HANDLER_LOG\"\nexit 7\n" @@ -61,7 +60,7 @@ class BinfmtPreloadTest(unittest.TestCase): cls.library = cls.tmp / "libbinfmt.so" subprocess.run(["gcc", "-shared", "-fPIC", "-O2", "-Wall", "-Wextra", "-Werror", "-DBINFMT_TEST", '-DBINFMT_HANDLER="%s"' % cls.handler, "-o", str(cls.library), - "-pthread"] + [str(PRELOAD / name) for name in ("binfmt.c", "net.c", "udevmon.c", "pathcache.c")] + ["-ldl"], + "-pthread"] + [str(PRELOAD / name) for name in ("binfmt.c", "net.c", "udevmon.c", "pathcache.c", "webhelper.c")] + ["-ldl"], check=True) source = cls.tmp / "program.c" source.write_text(PROGRAM) diff --git a/tools/tests/test_build_hand_lite.py b/tools/tests/test_build_hand_lite.py new file mode 100644 index 0000000000..ac9e376bad --- /dev/null +++ b/tools/tests/test_build_hand_lite.py @@ -0,0 +1,35 @@ +import importlib.util +import io +from pathlib import Path +import unittest +import zipfile + + +spec = importlib.util.spec_from_file_location('build_hand_lite', Path(__file__).parents[1] / 'build_hand_lite.py') +builder = importlib.util.module_from_spec(spec) +spec.loader.exec_module(builder) + + +class HandLiteBundleTest(unittest.TestCase): + def test_embedded_labels_are_reproducible_without_changing_model_bytes(self): + model = b'\x08\x00\x00\x00TFL3model tensors and weights' + outputs = [] + for year, order in [(2020, ['labels.txt', 'handedness.txt']), + (2026, ['handedness.txt', 'labels.txt'])]: + source = io.BytesIO(model) + with zipfile.ZipFile(source, 'a') as archive: + for name in order: + entry = zipfile.ZipInfo(name, (year, 10, 16, 12, 30, 0)) + archive.writestr(entry, name.encode()) + output = builder.canonicalize_associated_files(source.getvalue()) + self.assertEqual(model, output[:len(model)]) + self.assertEqual(output, builder.canonicalize_associated_files(output)) + with zipfile.ZipFile(io.BytesIO(output)) as archive: + for name in order: + self.assertEqual(name.encode(), archive.read(name)) + outputs.append(output) + self.assertEqual(*outputs) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_cardboard.py b/tools/tests/test_cardboard.py new file mode 100644 index 0000000000..8e1d260802 --- /dev/null +++ b/tools/tests/test_cardboard.py @@ -0,0 +1,57 @@ +from pathlib import Path +import re +import shutil +import subprocess +import tempfile +import unittest + +ROOT = Path(__file__).resolve().parents[2] +SRC = ROOT / 'app' / 'src' / 'main' / 'cpp' / 'waylandcomp' / 'src' +TOOLS = ROOT / 'tools' / 'cardboard' + + +def spirv_words(header: str) -> list[str]: + return re.findall(r'0x[0-9a-fA-F]{8}', header) + + +@unittest.skipUnless(shutil.which('cc'), 'needs a C compiler') +class CardboardParamsTest(unittest.TestCase): + def test_clamp_and_push_constant_layout(self): + with tempfile.TemporaryDirectory() as folder: + binary = str(Path(folder) / 'test-cardboard') + subprocess.run(['cc', '-std=c11', '-Wall', '-Wextra', '-Werror', '-O2', '-DCARDBOARD_HOST_TEST', + '-D_DEFAULT_SOURCE', f'-I{SRC}', f'-I{Path(folder)}', '-o', binary, + str(TOOLS / 'test_cardboard_params.c'), str(SRC / 'cardboard.c'), '-lm'], + check=True, cwd=folder, env=self._env(folder)) + result = subprocess.run([binary], capture_output=True, text=True, check=True, timeout=10) + self.assertIn('PASS: cardboard params', result.stdout) + + @staticmethod + def _env(folder): + import os + stub = Path(folder) / 'vulkan' + stub.mkdir(exist_ok=True) + (stub / 'vulkan.h').write_text('typedef struct VkDevice_T *VkDevice; typedef struct VkImage_T *VkImage;\n' + 'typedef struct VkCommandBuffer_T *VkCommandBuffer;\n' + 'typedef struct { int unused; } VkPhysicalDeviceMemoryProperties;\n') + return dict(os.environ) + + +@unittest.skipUnless(shutil.which('glslangValidator'), 'needs glslangValidator') +class CardboardShaderTest(unittest.TestCase): + def test_committed_spirv_matches_the_glsl(self): + with tempfile.TemporaryDirectory() as folder: + out = Path(folder) / 'cardboard_frag.h' + subprocess.run(['glslangValidator', '-V', '--vn', 'cardboard_frag_code', '-o', str(out), + str(SRC / 'cardboard.frag')], check=True, capture_output=True) + self.assertEqual(spirv_words(out.read_text()), spirv_words((SRC / 'cardboard_frag.h').read_text()), + 'cardboard_frag.h is stale: regenerate it from cardboard.frag (see cardboard.c)') + + def test_push_constants_fit_the_guaranteed_range(self): + glsl = (SRC / 'cardboard.frag').read_text() + block = glsl[glsl.index('uniform PC {'):glsl.index('} pc;')] + self.assertLessEqual(16 * len(re.findall(r'\bvec4\b', block)), 128) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_cdp_guard.py b/tools/tests/test_cdp_guard.py index 7dec3560c3..48196c1679 100644 --- a/tools/tests/test_cdp_guard.py +++ b/tools/tests/test_cdp_guard.py @@ -16,7 +16,7 @@ class CdpGuardTest(unittest.TestCase): def setUpClass(cls): cls.build = tempfile.TemporaryDirectory() cls.library = Path(cls.build.name) / "net.so" - subprocess.run(["cc", "-shared", "-fPIC", "-O2", str(SOURCE), str(SOURCE.parent / "binfmt.c"), "-x", "c", "-", "-ldl", + subprocess.run(["cc", "-shared", "-fPIC", "-O2", str(SOURCE), str(SOURCE.parent / "binfmt.c"), str(SOURCE.parent / "webhelper.c"), "-x", "c", "-", "-ldl", "-o", str(cls.library)], input=b"int bl_udevmon_stand_in(int fd) { return 0; }", check=True, capture_output=True) diff --git a/tools/tests/test_client_core_mask.py b/tools/tests/test_client_core_mask.py new file mode 100644 index 0000000000..59178b4dbb --- /dev/null +++ b/tools/tests/test_client_core_mask.py @@ -0,0 +1,39 @@ +"""Single-core Steam affinity is rechecked even if its thread count stayed the same.""" +import subprocess +import tempfile +import unittest +from pathlib import Path + +SCRIPT = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin/droiddeck-session' +SOURCE = SCRIPT.read_text() +FUNCTION = SOURCE[SOURCE.index('client_single_core_matches() {'):].split('\n}\n', 1)[0] + '\n}\n' + + +class ClientCoreMaskTest(unittest.TestCase): + def matches(self, wanted, tasks): + return subprocess.run(['bash', '-c', FUNCTION + '\nclient_single_core_matches "$@"', + 'test', wanted, *map(str, tasks)], capture_output=True).returncode + + def test_a_mask_change_without_a_new_thread_needs_repinning(self): + with tempfile.TemporaryDirectory() as tmp: + tasks = [Path(tmp) / str(i) for i in (1, 2)] + for task in tasks: + task.mkdir() + (task / 'status').write_text('Name:\tsteam\nCpus_allowed_list:\t7\n') + self.assertEqual(self.matches('7', tasks), 0) + (tasks[1] / 'status').write_text('Name:\tsteam\nCpus_allowed_list:\t0-7\n') + self.assertEqual(self.matches('7', tasks), 1) + + def test_an_exited_thread_does_not_prevent_checking_live_threads(self): + with tempfile.TemporaryDirectory() as tmp: + live = Path(tmp) / '1' + live.mkdir() + (live / 'status').write_text('Cpus_allowed_list:\t3-6\n') + self.assertEqual(self.matches('7', [Path(tmp) / 'gone', live]), 1) + + def test_multi_core_masks_keep_the_existing_thread_count_policy(self): + self.assertEqual(self.matches('0,1,2,3', []), 0) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_desktop_open.py b/tools/tests/test_desktop_open.py index a766a2467c..de98e75c6e 100644 --- a/tools/tests/test_desktop_open.py +++ b/tools/tests/test_desktop_open.py @@ -516,6 +516,65 @@ class ProtonRunTest(Temp): self.assertEqual(env["SteamAppId"], "413150") self.assertTrue((self.root / "steamapps/compatdata/413150").is_dir()) + def run_main(self, argv): + calls, dirs = [], [] + with mock.patch.dict(os.environ, {"STEAM_COMPAT_CLIENT_INSTALL_PATH": str(self.root)}), \ + mock.patch.object(RUN["os"], "execve", lambda *a: calls.append(a)), \ + mock.patch.object(RUN["os"], "chdir", dirs.append), mock.patch.dict(RUN, {"say": lambda message: None}): + code = RUN["main"](argv) + return code, calls, dirs + + def test_without_steam_a_steam_game_starts_its_default_windows_launch(self): + info = {"common": {"type": "Game", "oslist": "windows,linux"}, "config": {"launch": { + "0": {"executable": "Bin\\Game.exe", "arguments": "-dx11 \"-name=Two Words\"", "workingdir": "bin", + "type": "default", "config": {"oslist": "windows"}}, + "1": {"executable": "game.sh", "type": "default", "config": {"oslist": "linux"}}, + "2": {"executable": "Beta.exe", "type": "default", "config": {"oslist": "windows", "betakey": "beta"}}, + "3": {"executable": "Tools\\Editor.exe", "type": "option1"}, + }}} + self.write("Steam/appcache/appinfo.vdf", appinfo({413150: info})) + program = self.game("413150", "Some Game", "bin/game.exe") + self.game("413150", "Some Game", "Tools/Editor.exe") + code, calls, dirs = self.run_main(["--app", "413150", "--options", "-windowed"]) + self.assertIsNone(code) + entry, argv, env = calls[0] + self.assertEqual(argv[1:], ["waitforexitandrun", str(program), "-dx11", "-name=Two Words", "-windowed"]) + self.assertEqual((env["SteamAppId"], env["STEAM_COMPAT_DATA_PATH"]), + ("413150", str(self.root / "steamapps/compatdata/413150"))) + self.assertEqual(dirs, [str(program.parent)]) + + def test_without_steam_a_game_steam_cannot_start_is_refused(self): + self.write("Steam/appcache/appinfo.vdf", appinfo({413150: STARDEW})) + self.assertEqual(self.run_main(["--app", "413150"])[0], 2) + self.assertEqual(self.run_main(["--app", "3384071994"])[0], 2) + self.assertEqual(self.run_main(["--app", "0"])[0], 2) + self.assertEqual(self.run_main(["--app", "game"])[0], 2) + linux = {"common": {"type": "Game"}, "config": {"launch": {"0": {"executable": "run.sh", "config": {"oslist": "linux"}}}}} + self.write("Steam/appcache/appinfo.vdf", appinfo({70: linux})) + self.game("70", "Linux Game", "run.sh") + self.assertEqual(self.run_main(["--app", "70"])[0], 2) + + def test_without_steam_a_shortcut_keeps_its_prefix_folder_and_launch_options(self): + bat = self.write("Games/Epic/Game/.droiddeck-launch.bat", b"@echo off") + start = self.tmp / "Games/Epic/Game/Binaries" + start.mkdir() + code, calls, dirs = self.run_main(["--app", "2733369024", "--dir", str(start), "--options", + "PROTON_LOG=1 %command% -epicportal", "--", str(bat)]) + self.assertIsNone(code) + entry, argv, env = calls[0] + self.assertEqual(argv[1:], ["waitforexitandrun", str(bat), "-epicportal"]) + self.assertEqual((env["STEAM_COMPAT_DATA_PATH"], env["SteamAppId"], env["SteamGameId"], env["PROTON_LOG"]), + (str(self.root / "steamapps/compatdata/2733369024"), "0", str(2733369024 << 32 | 0x02000000), "1")) + self.assertTrue((self.root / "steamapps/compatdata/2733369024").is_dir()) + self.assertEqual(dirs, [str(start)]) + + def test_launch_options_split_like_steam_does(self): + split = RUN["split_options"] + self.assertEqual(split(""), ({}, [])) + self.assertEqual(split("-windowed -w 1280"), ({}, ["-windowed", "-w", "1280"])) + self.assertEqual(split("A=1 B=\"x y\" gamemoderun %command% -dx12"), ({"A": "1", "B": "x y"}, ["-dx12"])) + self.assertEqual(split("\"unterminated -x"), ({}, ["\"unterminated", "-x"])) + if __name__ == "__main__": unittest.main() diff --git a/tools/tests/test_desktop_removal.py b/tools/tests/test_desktop_removal.py index 674b9643fe..845e083572 100644 --- a/tools/tests/test_desktop_removal.py +++ b/tools/tests/test_desktop_removal.py @@ -13,8 +13,6 @@ class DesktopRemovalInventoryTest(unittest.TestCase): self.assertIn('usr/bin/lxqt-session', paths) self.assertIn('usr/bin/labwc', paths) self.assertIn('usr/local/bin/steamdeck-desktop', paths) - # The runtime pacman database did not protect libseat on the Thor. Removing it - # made gamescope and every Steam/native session exit 127 after desktop cleanup. self.assertNotIn('usr/lib/libseat.so.1', paths) self.assertNotIn('usr/lib/libseat.so', paths) self.assertFalse(any(p.startswith('usr/lib/libSDL2') for p in paths)) diff --git a/tools/tests/test_dircache_preload.py b/tools/tests/test_dircache_preload.py index 62792888c3..50ad24d5f7 100644 --- a/tools/tests/test_dircache_preload.py +++ b/tools/tests/test_dircache_preload.py @@ -21,7 +21,6 @@ FAKE = r""" int real_opendirs; -/* COARSE=1: directory stats that never change, like NTFS's whole-second times and fixed size. */ static void coarse(const char *path, struct stat *st) { if (getenv("COARSE") && strstr(path, "/fuse/") && S_ISDIR(st->st_mode)) { st->st_mtim = st->st_ctim = (struct timespec){1, 0}; @@ -70,7 +69,6 @@ int statfs(const char *path, struct statfs *out) { return r; } -/* FASTPATH=1: open directories the way the fast-path preload does, through fdopendir. */ DIR *opendir(const char *path) { static DIR *(*next)(const char *); if (!next) next = dlsym(RTLD_NEXT, "opendir"); diff --git a/tools/tests/test_droiddeck_agent.py b/tools/tests/test_droiddeck_agent.py index c04f2eeb89..986931a840 100644 --- a/tools/tests/test_droiddeck_agent.py +++ b/tools/tests/test_droiddeck_agent.py @@ -91,6 +91,37 @@ class AgentTest(unittest.TestCase): self.assertFalse(path.exists(), "the request file is consumed") return json.loads((self.dir / "resp" / "req.json").read_text()) + def vr_helper(self, body): + helper = self.dir / "droiddeck-steamvr" + helper.write_text("#!/bin/sh\n" + body) + old = os.environ.get("DROIDDECK_VR_HELPER") + os.environ["DROIDDECK_VR_HELPER"] = str(helper) + self.addCleanup(lambda: os.environ.pop("DROIDDECK_VR_HELPER") if old is None + else os.environ.__setitem__("DROIDDECK_VR_HELPER", old)) + return helper + + def test_vr_status_is_parsed(self): + self.vr_helper('echo "installed=1 running=0 installing=0 driver=1"\n') + answer = self.ask({"kind": "vr", "action": "status"}) + self.assertTrue(answer["ok"]) + self.assertEqual((True, False, False, True), + (answer["installed"], answer["running"], answer["installing"], answer["driver"])) + + def test_vr_runs_only_its_own_actions(self): + log = self.dir / "args" + self.vr_helper('echo "$@" > %s\n' % log) + self.assertTrue(self.ask({"kind": "vr", "action": "start"})["ok"]) + self.assertEqual("start", log.read_text().strip()) + answer = self.ask({"kind": "vr", "action": "rm -rf /"}) + self.assertFalse(answer["ok"]) + self.assertEqual("INVALID_REQUEST", answer["error"]["code"]) + + def test_vr_without_a_helper_is_unavailable(self): + os.environ["DROIDDECK_VR_HELPER"] = str(self.dir / "missing") + self.addCleanup(os.environ.pop, "DROIDDECK_VR_HELPER") + answer = self.ask({"kind": "vr", "action": "status"}) + self.assertEqual("UNAVAILABLE", answer["error"]["code"]) + def test_exec_output_and_status(self): answer = self.ask({"kind": "exec", "argv": ["sh", "-c", "echo out; echo err >&2; exit 3"], "env": {"X": "1"}}) self.assertTrue(answer["ok"]) @@ -208,6 +239,105 @@ class AgentTest(unittest.TestCase): missing = self.ask({"kind": "cdp", "expression": "1", "target": "Nope"}) self.assertEqual("NO_TARGET", missing["error"]["code"]) + def test_steam_selection(self): + with patch.object(agent, "cdp_eval", return_value={"value": "3180310"}) as evaluate: + answer = self.ask({"kind": "steam-selection"}) + self.assertEqual(3180310, answer["appId"]) + self.assertIn("document.activeElement", evaluate.call_args.args[1]) + self.assertEqual("Steam Big Picture Mode", evaluate.call_args.kwargs["target"]) + + def test_steam_selection_allows_no_highlight(self): + with patch.object(agent, "cdp_eval", return_value={"value": None}): + self.assertIsNone(self.ask({"kind": "steam-selection"})["appId"]) + + def test_steam_selection_rejects_invalid_app_id(self): + with patch.object(agent, "cdp_eval", return_value={"value": "4294967296"}): + answer = self.ask({"kind": "steam-selection"}) + self.assertEqual("INVALID_SELECTION", answer["error"]["code"]) + + def test_shortcut_cgameid_waits_for_exact_steam_overview_mapping(self): + game_id = str((3551182975 << 32) | 0x02000000) + self.assertEqual(3551182975, agent.steam_shortcut_app_id(game_id)) + self.assertIsNone(agent.steam_shortcut_app_id("413150")) + self.assertIsNone(agent.steam_shortcut_app_id(str((3551182975 << 32) | 0x03000000))) + clock = [0.0] + with patch.object(agent, "cdp_eval", side_effect=[{"value": None}, {"value": "3551182975"}]) as evaluate, \ + patch.object(agent.time, "monotonic", side_effect=lambda: clock[0]), \ + patch.object(agent.time, "sleep", side_effect=lambda delay: clock.__setitem__(0, clock[0] + delay)): + result = agent.wait_for_steam_shortcut_overview(self.dir, game_id, timeout=1) + self.assertEqual({"supported": True, "ready": True, "appId": 3551182975}, result) + expression = evaluate.call_args_list[0].args[1] + self.assertIn("GetAppOverviewByGameID", expression) + self.assertIn(json.dumps(game_id), expression) + self.assertNotIn("RequestAppDetails", expression) + self.assertFalse(evaluate.call_args_list[0].kwargs["await_promise"]) + + def test_wrong_overview_app_id_keeps_shortcut_url_held_until_timeout(self): + game_id = str((3537741571 << 32) | 0x02000000) + clock = [0.0] + with patch.object(agent, "cdp_eval", return_value={"value": "646570"}) as evaluate, \ + patch.object(agent.time, "monotonic", side_effect=lambda: clock[0]), \ + patch.object(agent.time, "sleep", side_effect=lambda delay: clock.__setitem__(0, clock[0] + delay)): + with self.assertRaises(agent.AgentError) as raised: + agent.wait_for_steam_shortcut_overview(self.dir, game_id, timeout=0.5) + self.assertEqual("STEAM_OVERVIEW_TIMEOUT", raised.exception.code) + self.assertGreater(evaluate.call_count, 0) + self.assertTrue(all("RequestAppDetails" not in call.args[1] for call in evaluate.call_args_list)) + + def test_normal_steam_ids_and_unknown_cgameids_skip_overview_wait(self): + for game_id in ("413150", str((123456789 << 32) | 0x03000000), "18446744073709551616"): + with self.subTest(game_id=game_id), patch.object(agent, "cdp_eval") as evaluate: + result = agent.wait_for_steam_shortcut_overview(self.dir, game_id) + self.assertFalse(result["supported"]) + evaluate.assert_not_called() + + def test_shortcut_state_tells_a_lost_shortcut_from_a_loading_library(self): + game_id = str((3333273269 << 32) | 0x02000000) + self.assertEqual("not-shortcut", agent.steam_shortcut_state(self.dir, "413150")) + for values, wanted, calls in ((["loading", "ready"], "ready", 2), (["loading", "missing"], "missing", 3), + ([None], "loading", 3)): + clock = [0.0] + replies = [{"value": v} for v in values] + [{"value": values[-1]}] * 10 + with self.subTest(values=values), patch.object(agent, "cdp_eval", side_effect=replies) as evaluate, \ + patch.object(agent.time, "monotonic", side_effect=lambda: clock[0]), \ + patch.object(agent.time, "sleep", side_effect=lambda delay: clock.__setitem__(0, clock[0] + delay)): + self.assertEqual(wanted, agent.steam_shortcut_state(self.dir, game_id, timeout=1)) + self.assertEqual(calls, evaluate.call_count) + self.assertIn("GetAppOverviewByGameID(%s)" % json.dumps(game_id), evaluate.call_args_list[0].args[1]) + + def test_shortcut_state_waits_out_an_unreachable_client_but_not_other_errors(self): + game_id = str((3333273269 << 32) | 0x02000000) + clock = [0.0] + with patch.object(agent, "cdp_eval", side_effect=agent.AgentError("NO_DEVTOOLS", "down")), \ + patch.object(agent.time, "monotonic", side_effect=lambda: clock[0]), \ + patch.object(agent.time, "sleep", side_effect=lambda delay: clock.__setitem__(0, clock[0] + delay)): + self.assertEqual("loading", agent.steam_shortcut_state(self.dir, game_id, timeout=1)) + with patch.object(agent, "cdp_eval", side_effect=agent.AgentError("CDP_EXCEPTION", "boom")): + with self.assertRaises(agent.AgentError): + agent.steam_shortcut_state(self.dir, game_id, timeout=1) + + def test_shortcut_state_command_exits_with_the_state(self): + game_id = str((3333273269 << 32) | 0x02000000) + launch = self.dir.parent + with patch.dict(os.environ, {"BL_LAUNCH_DIR": str(launch)}): + for state, code in (("ready", 0), ("missing", 4), ("not-shortcut", 3), ("loading", 1)): + with self.subTest(state=state), patch.object(agent, "steam_shortcut_state", return_value=state) as ask: + self.assertEqual(code, agent.main(["--steam-shortcut-state", game_id, "2"])) + self.assertEqual((launch / "agent", game_id, "2"), ask.call_args.args) + with patch.object(agent, "steam_shortcut_state", side_effect=agent.AgentError("CDP_EXCEPTION", "boom")): + self.assertEqual(1, agent.main(["--steam-shortcut-state", game_id])) + self.assertEqual(2, agent.main(["--steam-shortcut-state"])) + + def test_asleep_command_reports_steams_own_sleep_state(self): + with patch.dict(os.environ, {"BL_LAUNCH_DIR": str(self.dir.parent)}): + for value, code in (("yes", 0), ("no", 5), ("unknown", 1), (None, 1)): + with self.subTest(value=value), patch.object(agent, "cdp_eval", return_value={"value": value}) as ask: + self.assertEqual(code, agent.main(["--steam-asleep"])) + self.assertIn("m_bSuspending", ask.call_args.args[1]) + self.assertFalse(ask.call_args.kwargs["await_promise"]) + with patch.object(agent, "cdp_eval", side_effect=agent.AgentError("NO_DEVTOOLS", "down")): + self.assertEqual(1, agent.main(["--steam-asleep"])) + def test_cdp_exception(self): server = FakeDevTools({"result": {"result": {"type": "object"}, "exceptionDetails": { "text": "Uncaught", "exception": {"description": "ReferenceError: SteamClient is not defined"}}}}) @@ -252,5 +382,35 @@ class AgentTest(unittest.TestCase): self.assertIn(child.pid, agent.game_pids(424242)) +class VrFocusTest(unittest.TestCase): + def test_scene_dashboard_and_external_focus_changes(self): + focus = agent.VrSceneFocus() + self.assertEqual(focus.order([9, 7], [7, 42], 42), [42, 9, 7]) + self.assertIsNone(focus.order([42, 9, 7], [7, 42], 42)) + self.assertEqual(focus.order([42, 9, 7], [7, 42], None), [9, 7]) + self.assertIsNone(focus.order([9, 7], [7], 42)) + self.assertEqual(focus.order([9, 7], [7, 42], 42), [42, 9, 7]) + # Do not overwrite a different focus order installed after our last write. + self.assertIsNone(focus.order([123, 7], [7, 42], None)) + + def test_scene_requires_live_server_and_game_environment(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + state = root / 'scene.json' + for pid in (100, 200): + (root / str(pid)).mkdir() + (root / '100/comm').write_text('vrserver\n') + (root / '200/environ').write_bytes(b'SteamAppId=42\0Other=value\0') + state.write_text(json.dumps(dict(serverPid=100, scenePid=200, dashboard=False))) + self.assertEqual(agent.vr_scene_app(state, root), 42) + state.write_text(json.dumps(dict(serverPid=100, scenePid=200, dashboard=True))) + self.assertIsNone(agent.vr_scene_app(state, root)) + state.write_text(json.dumps(dict(serverPid=100, scenePid=200, dashboard=False))) + (root / '100/comm').write_text('other\n') + self.assertIsNone(agent.vr_scene_app(state, root)) + (root / '100/comm').unlink() + self.assertIsNone(agent.vr_scene_app(state, root)) + + if __name__ == "__main__": unittest.main() diff --git a/tools/tests/test_droiddeck_epic.py b/tools/tests/test_droiddeck_epic.py new file mode 100644 index 0000000000..9e08abe6cf --- /dev/null +++ b/tools/tests/test_droiddeck_epic.py @@ -0,0 +1,1205 @@ +import http.client +import io +import json +import os +import runpy +import shutil +import socket +import signal +import subprocess +import sys +import tarfile +import tempfile +import threading +import time +import unittest +from pathlib import Path +from unittest import mock + +BIN = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin" +EPIC = runpy.run_path(str(BIN / "droiddeck-epic")) +G = EPIC["main"].__globals__ +STORE = runpy.run_path(str(BIN / "droiddeck-store-launch")) +S = STORE["main"].__globals__ + + +def tar_add(archive, name, data=None, link=None, kind=None, mode=0o644): + info = tarfile.TarInfo(name) + if kind == "dir": + info.type = tarfile.DIRTYPE + info.mode = 0o755 + archive.addfile(info) + elif link is not None: + info.type = tarfile.SYMTYPE if kind != "hard" else tarfile.LNKTYPE + info.linkname = link + archive.addfile(info) + else: + info.size = len(data) + info.mode = mode + archive.addfile(info, io.BytesIO(data)) + + +def ar(members): + out = bytearray(b"!<arch>\n") + for name, data in members: + out += ("%-16s%-12s%-6s%-6s%-8s%-10d`\n" % (name + "/", 0, 0, 0, "100644", len(data))).encode() + out += data + if len(data) % 2: + out += b"\n" + return bytes(out) + + +class EpicTestCase(unittest.TestCase): + def setUp(self): + self.tmp = Path(tempfile.mkdtemp()) + self.addCleanup(shutil.rmtree, self.tmp, True) + self.home = self.tmp / "home" + state = self.home / ".local/share/droiddeck-epic" + data = self.home / ".local/share/com.epicgames.eglv2" + runtime = self.tmp / "run" + runtime.mkdir() + patches = { + "HOME": str(self.home), + "STATE": str(state), + "CURRENT": str(state / "current.json"), + "APPS": str(state / "app"), + "RUNTIMES": str(state / "runtime"), + "LOGS": str(state / "logs"), + "SHIMS": str(state / "bin"), + "FEX_CONFIG": str(state / "fex"), + "FEX_CACHE": str(self.home / ".cache/droiddeck-epic"), + "DATA": str(data), + "SETTINGS": str(data / "settings/app-settings.json"), + "API_FILE": str(data / "api.json"), + "AUTH_FILE": str(data / "auth" / "auth.json"), + "PROTON_ROOT": str(data / "compat/runtime"), + "INSTALLATIONS": str(data / "installations.jsonl"), + "V1_MANIFESTS": str(self.home / ".local/share/Epic/EpicGamesLauncher/Data/Manifests"), + "AUTO_SIGN_IN": str(state / "auto-sign-in"), + "SIGNED_OUT": str(state / "signed-out"), + "WEB_COOKIES": str(data / "cookies"), + } + for name, value in patches.items(): + patcher = mock.patch.dict(G, {name: value}) + patcher.start() + self.addCleanup(patcher.stop) + env = mock.patch.dict(os.environ, {"XDG_RUNTIME_DIR": str(runtime)}) + env.start() + self.addCleanup(env.stop) + self.state = state + self.data = data + + +class PreloadTest(EpicTestCase): + def test_launcher_runtime_preloads_the_webkit_input_fix(self): + source = self.tmp / "libwebkitinput.so" + source.write_bytes(b"scroll") + files = self.tmp / "files" + with mock.patch.dict(G, {"WEBKIT_INPUT_SOURCE": str(source)}): + G["install_preload"](str(files)) + self.assertEqual((files / "lib/x86_64-linux-gnu/droiddeck/libwebkitinput.so").read_bytes(), b"scroll") + self.assertEqual((files / "etc/ld.so.preload").read_text(), "/usr/lib/x86_64-linux-gnu/droiddeck/libwebkitinput.so\n") + with mock.patch.dict(G, {"WEBKIT_INPUT_SOURCE": str(self.tmp / "missing.so")}): + G["install_preload"](str(files)) + self.assertFalse((files / "lib/x86_64-linux-gnu/droiddeck/libwebkitinput.so").exists()) + self.assertEqual((files / "etc/ld.so.preload").read_text(), "") + + +class RuntimeExtractTest(EpicTestCase): + def test_runtime_extract_rewrites_links_and_skips_i386(self): + tarball = self.tmp / "rt.tar.gz" + with tarfile.open(tarball, "w:gz") as archive: + tar_add(archive, "metadata", b"[Runtime]\n") + tar_add(archive, "files", kind="dir") + tar_add(archive, "files/lib/x86_64-linux-gnu/libc.so.6", b"libc", mode=0o755) + tar_add(archive, "files/lib/ld-linux-x86-64.so.2", link="/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2") + tar_add(archive, "files/etc/alias", link="/etc/real") + tar_add(archive, "files/bin/rel", link="../lib/x86_64-linux-gnu/libc.so.6") + tar_add(archive, "files/lib/i386-linux-gnu/libc.so.6", b"i386") + tar_add(archive, "files/share/doc/readme", b"doc") + tar_add(archive, "files/lib/hard", link="files/lib/x86_64-linux-gnu/libc.so.6", kind="hard") + tar_add(archive, "../escape", b"x") + tar_add(archive, "other/file", b"x") + staging, count = G["extract_runtime"](str(tarball), str(self.tmp / "rt")) + files = Path(staging) / "files" + self.assertEqual(b"libc", (files / "lib/x86_64-linux-gnu/libc.so.6").read_bytes()) + self.assertTrue(os.access(files / "lib/x86_64-linux-gnu/libc.so.6", os.X_OK)) + self.assertEqual("x86_64-linux-gnu/ld-linux-x86-64.so.2", os.readlink(files / "lib/ld-linux-x86-64.so.2")) + self.assertEqual("real", os.readlink(files / "etc/alias")) + self.assertEqual("../lib/x86_64-linux-gnu/libc.so.6", os.readlink(files / "bin/rel")) + self.assertEqual(".", os.readlink(files / "usr")) + self.assertEqual(b"libc", (files / "lib/hard").read_bytes()) + self.assertFalse((files / "lib/i386-linux-gnu").exists()) + self.assertFalse((files / "share/doc").exists()) + self.assertFalse((self.tmp / "escape").exists()) + self.assertFalse((Path(staging) / "other").exists()) + self.assertTrue((Path(staging) / "metadata").is_file()) + self.assertEqual(6, count) + + def test_runtime_without_libc_is_refused(self): + tarball = self.tmp / "rt.tar.gz" + with tarfile.open(tarball, "w:gz") as archive: + tar_add(archive, "files/bin/sh", b"sh") + with self.assertRaises(G["Failure"]): + G["extract_runtime"](str(tarball), str(self.tmp / "rt")) + self.assertFalse((self.tmp / "rt.staging").exists()) + + def test_gles_comes_out_of_the_deb(self): + data = io.BytesIO() + with tarfile.open(fileobj=data, mode="w:xz") as archive: + tar_add(archive, "./usr/lib/x86_64-linux-gnu/libGLESv2.so.2.1.0", b"gles") + tar_add(archive, "./usr/lib/x86_64-linux-gnu/libGLESv2.so.2", link="libGLESv2.so.2.1.0") + tar_add(archive, "./usr/share/doc/libgles2/copyright", b"c") + deb = self.tmp / "gles.deb" + deb.write_bytes(ar([("debian-binary", b"2.0\n"), ("control.tar.xz", b"x"), ("data.tar.xz", data.getvalue())])) + files = self.tmp / "files" + G["install_gles"](str(deb), str(files)) + lib = files / "lib/x86_64-linux-gnu" + self.assertEqual(b"gles", (lib / "libGLESv2.so.2").read_bytes()) + self.assertEqual("libGLESv2.so.2.1.0", os.readlink(lib / "libGLESv2.so.2")) + self.assertFalse((files / "share").exists()) + bad = self.tmp / "bad.deb" + bad.write_bytes(b"not an archive") + with self.assertRaises(G["Failure"]): + G["install_gles"](str(bad), str(files)) + + def test_install_marks_ready_and_prunes_old_versions(self): + tarball = self.tmp / "rt.tar.gz" + with tarfile.open(tarball, "w:gz") as archive: + tar_add(archive, "files/lib/x86_64-linux-gnu/libc.so.6", b"libc") + data = io.BytesIO() + with tarfile.open(fileobj=data, mode="w:gz") as archive: + tar_add(archive, "./usr/lib/x86_64-linux-gnu/libGLESv2.so.2", b"gles") + deb = self.tmp / "gles.deb" + deb.write_bytes(ar([("data.tar.gz", data.getvalue())])) + old = self.state / "app/0.1" + old.mkdir(parents=True) + + def extract_app(image, dest): + os.makedirs(os.path.join(dest, "usr/bin")) + Path(dest, "AppRun").write_text("run") + Path(dest, "usr/bin/EpicGamesLauncher").write_text("bin") + + with mock.patch.dict(G, {"extract_app": extract_app, "fex_tool": lambda request=False: {"bin": "/fex", "server": "/s"}}), \ + mock.patch("sys.stdout", new_callable=io.StringIO) as out: + image = self.tmp / "image" + image.write_bytes(b"x") + code = G["install"]({"app": str(image), "app-version": "0.95.2+g1", "runtime": str(tarball), + "runtime-version": "4.0.1", "gles": str(deb)}) + self.assertEqual(0, code) + report = json.loads(out.getvalue()) + self.assertTrue(report["installed"]) + self.assertEqual({"app": "0.95.2+g1", "runtime": "4.0.1"}, json.loads((self.state / "current.json").read_text())) + self.assertFalse(old.exists()) + files = self.state / "runtime/4.0.1/files" + self.assertEqual("", (files / "etc/ld.so.preload").read_text()) + self.assertTrue((self.state / "runtime/4.0.1/.droiddeck-ready").is_file()) + self.assertTrue((self.state / "app/0.95.2+g1/.droiddeck-ready").is_file()) + + +class ArgumentsTest(EpicTestCase): + def test_client_arguments_win_and_paths_become_windows_paths(self): + ovt = self.tmp / "ovt" + ovt.mkdir() + client = ["-AUTH_LOGIN=unused", "-AUTH_PASSWORD=abc", "-AUTH_TYPE=exchangecode", "-epicapp=Fig", + "-epicovt=%s/token.ovt" % ovt, '-epicusername="Some One"', "-nosplash"] + own = ["-EpicPortal", "-epicapp=Fig", "-nosplash", "-windowed"] + merged = G["merge_args"](client, own) + self.assertIn('-epicovt="Z:%s\\token.ovt"' % str(ovt).replace("/", "\\"), merged) + self.assertEqual(1, merged.count("-nosplash")) + self.assertNotIn("-EpicPortal", merged) + self.assertEqual("-windowed", merged[-1]) + self.assertEqual("-AUTH_PASSWORD=abc", merged[1]) + + def test_command_line_escapes_cmd_specials_outside_quotes(self): + line = G["command_line"](["-a=b&c", '-n="A & B"', "two words", "-p=50%", "^x", "-z=a|b>c<d"]) + self.assertEqual('-a=b^&c -n="A & B" "two words" -p=50% ^^x -z=a^|b^>c^<d', line) + + def test_a_stray_quote_cannot_unescape_the_rest_of_the_line(self): + self.assertEqual('"-a=x &y" b^&c -n=A^&B', G["command_line"](['-a="x &y', "b&c", '-n=A&B"'])) + + def test_args_file_is_written_with_crlf(self): + folder = self.tmp / "game" + folder.mkdir() + line = G["write_args"](str(folder), {"args": ["-x"]}, ["-epicapp=Fig"]) + self.assertEqual("-epicapp=Fig -x", line) + self.assertEqual(b"-epicapp=Fig -x\r\n", (folder / ".droiddeck-epic-args").read_bytes()) + self.assertEqual(0o600, (folder / ".droiddeck-epic-args").stat().st_mode & 0o777) + self.assertEqual([".droiddeck-epic-args"], os.listdir(folder)) + + def test_paths_convert_both_ways(self): + self.assertEqual("Z:\\root\\a b\\c.exe", G["windows_path"]("/root/a b/c.exe")) + self.assertEqual("/root/a b/c.exe", G["native_path"]("Z:\\root\\a b\\c.exe")) + self.assertEqual("/root/x", G["native_path"]("z:\\root\\x")) + + def test_game_launches_are_told_apart_from_helpers(self): + game = {"args": ["-EpicPortal", "-epicapp=Fig"]} + self.assertTrue(G["is_game"](game)) + self.assertTrue(G["is_game"](game, "fig")) + self.assertFalse(G["is_game"](game, "Other")) + self.assertFalse(G["is_game"]({"args": ["/quiet"]})) + + def test_deep_link_quotes_the_app_id(self): + self.assertEqual("com.epicgames.launcher://apps/ns%3Aitem%3AFig?action=launch&silent=true", + G["deep_link"]("ns", "item", "Fig")) + + +class SignInTest(EpicTestCase): + AUTH = ("https://www.epicgames.com/id/authorize?client_id=c85f&response_type=code" + "&redirect_uri=http%3A%2F%2F127.0.0.1%3A41234%2Flauncher%2Fauthorized&state=s") + + def test_only_epic_loopback_sign_ins_count(self): + self.assertTrue(G["sign_in_url"](self.AUTH)) + self.assertFalse(G["sign_in_url"](self.AUTH.replace("www.epicgames.com", "example.com"))) + self.assertFalse(G["sign_in_url"](self.AUTH.replace("127.0.0.1%3A41234", "example.com%3A80"))) + self.assertFalse(G["sign_in_url"](self.AUTH.replace("%3A41234", ""))) + self.assertFalse(G["sign_in_url"]("https://store.epicgames.com/p/fig")) + + def test_xdg_open_hands_sign_in_and_links_to_the_app(self): + launch = self.tmp / "launch" + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(launch)}): + self.assertEqual(0, G["shim_open"]([self.AUTH])) + self.assertEqual(0, G["shim_open"](["https://store.epicgames.com/p/fig"])) + self.assertEqual(1, G["shim_open"](["mailto:x@example.com"])) + self.assertEqual(0, G["shim_open"](["steam://rungameid/2379304779"])) + self.assertEqual(1, G["shim_open"](["steam://rungameid/0"])) + requests = [json.loads(p.read_text()) for p in (launch / "stores/req").glob("*.json")] + self.assertEqual(["epic-sign-in", "open-url", "steam-run"], sorted(r["op"] for r in requests)) + self.assertEqual(["2379304779"], [r["id"] for r in requests if r["op"] == "steam-run"]) + + def test_the_xdg_open_command_forwards_steam_links(self): + launch = self.tmp / "cli-launch" + env = dict(os.environ, HOME=str(self.home), BL_LAUNCH_DIR=str(launch)) + def xdg_open(url): + return subprocess.run([sys.executable, str(BIN / "droiddeck-epic"), "xdg-open", url], env=env, + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=30).returncode + self.assertEqual(0, xdg_open("steam://rungameid/2379304779")) + self.assertEqual(0, xdg_open("steam://run/606150")) + self.assertEqual(1, xdg_open("steam://rungameid/0")) + requests = [json.loads(p.read_text()) for p in (launch / "stores/req").glob("*.json")] + self.assertEqual(["steam-run", "steam-run"], [r["op"] for r in requests]) + self.assertEqual(["2379304779", "606150"], sorted(r["id"] for r in requests)) + + +class SignInHandoffTest(EpicTestCase): + def requests(self, launch): + return [json.loads(p.read_text()) for p in sorted((launch / "stores/req").glob("*.json"))] + + def test_the_app_answers_whether_it_has_an_epic_account(self): + asked = [] + for reply, ready in (({"ok": True}, True), ({"ok": False, "reason": "no-account"}, False), (None, False)): + with mock.patch.dict(G, {"ask_app": lambda request, timeout, reply=reply: asked.append(request) or reply}): + self.assertEqual(ready, G["handoff_ready"]()) + self.assertEqual([{"op": "epic-client-handoff"}] * 3, asked) + + def test_carrying_the_sign_in_needs_a_signed_out_launcher_and_an_account(self): + marker = Path(G["AUTO_SIGN_IN"]) + marker.parent.mkdir(parents=True) + marker.write_text("1\n") + with mock.patch.dict(G, {"signed_in": lambda: True, "handoff_ready": lambda: True}): + self.assertFalse(G["carry_sign_in"]()) + self.assertFalse(marker.exists()) + with mock.patch.dict(G, {"signed_in": lambda: False, "handoff_ready": lambda: False}): + self.assertFalse(G["carry_sign_in"]()) + with mock.patch.dict(G, {"signed_in": lambda: False, "handoff_ready": lambda: True}): + self.assertTrue(G["carry_sign_in"]()) + + def test_a_fresh_marker_makes_the_sign_in_automatic(self): + launch = self.tmp / "launch" + marker = Path(G["AUTO_SIGN_IN"]) + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(launch)}): + G["shim_open"]([SignInTest.AUTH]) + marker.parent.mkdir(parents=True) + marker.write_text("1\n") + G["shim_open"]([SignInTest.AUTH]) + old = time.time() - G["AUTO_SIGN_IN_FRESH"] - 5 + os.utime(marker, (old, old)) + G["shim_open"]([SignInTest.AUTH]) + self.assertEqual([None, True, None], [r.get("auto") for r in self.requests(launch)]) + + def test_the_accessibility_bus_is_only_opened_for_a_carried_sign_in(self): + base = {"NO_AT_BRIDGE": "1", "GTK_A11Y": "none"} + with mock.patch.dict(G, {"KEPT_ENV": ("NO_AT_BRIDGE", "GTK_A11Y"), "CLIENT_ENV": {}, "fex_environment": lambda fex, files, base: {}}): + plain = G["client_environment"](base, None, None, ":0", "bus", "broker") + carried = G["client_environment"](base, None, None, ":0", "bus", "broker", "unix:abstract=a11y") + self.assertEqual(("1", "none", None), (plain.get("NO_AT_BRIDGE"), plain.get("GTK_A11Y"), plain.get("AT_SPI_BUS_ADDRESS"))) + self.assertEqual((None, None, "unix:abstract=a11y"), + (carried.get("NO_AT_BRIDGE"), carried.get("GTK_A11Y"), carried.get("AT_SPI_BUS_ADDRESS"))) + + def session(self): + session = G["Session"]("visible") + session.carried = True + session.a11y = "unix:abstract=a11y" + return session + + def test_the_welcome_screen_is_passed_then_sign_in_is_pressed_once(self): + pressed = [] + screens = [{"Get started": (":1.2", "/a")}, {"Sign in": (":1.2", "/b")}, {"Sign in": (":1.2", "/b")}] + session = self.session() + with mock.patch.dict(G, { + "signed_in": lambda: False, + "a11y_buttons": lambda address: screens.pop(0), + "a11y_press": lambda address, target: pressed.append(target) or True, + }): + for now in (10.0, 11.0, 12.5, 15.0): + session.carry_on(now) + self.assertEqual([("/a"), ("/b")], [target[1] for target in pressed]) + self.assertTrue(session.sign_in_pressed) + self.assertTrue(Path(G["AUTO_SIGN_IN"]).exists()) + self.assertEqual(1, len(screens)) + + def test_the_welcome_screen_is_pressed_a_limited_number_of_times(self): + pressed = [] + session = self.session() + with mock.patch.dict(G, { + "signed_in": lambda: False, + "a11y_buttons": lambda address: {"Get started": (":1.2", "/a")}, + "a11y_press": lambda address, target: pressed.append(target) or True, + }): + for step in range(10): + session.carry_on(step * 3.0) + self.assertEqual(G["FIRST_RUN_PRESSES"], len(pressed)) + + def test_signing_in_ends_the_carry_and_drops_the_marker(self): + marker = Path(G["AUTO_SIGN_IN"]) + marker.parent.mkdir(parents=True) + marker.write_text("1\n") + session = self.session() + with mock.patch.dict(G, {"signed_in": lambda: True}): + session.carry_on(1.0) + self.assertFalse(session.carried) + self.assertFalse(marker.exists()) + + def test_no_accessibility_bus_means_no_buttons(self): + self.assertEqual({}, G["a11y_buttons"](None)) + with mock.patch.dict(G, {"a11y_connect": lambda address: None}): + self.assertEqual({}, G["a11y_buttons"]("unix:abstract=a11y")) + self.assertFalse(G["a11y_press"]("unix:abstract=a11y", (":1.2", "/a"))) + + +class AuthTest(EpicTestCase): + def write_auth(self, value): + path = Path(G["AUTH_FILE"]) + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(json.dumps(value)) + + def test_only_a_prod_refresh_token_counts_as_signed_in(self): + self.assertFalse(G["signed_in"]()) + for value in ({"foo": 1}, {"prod": "x"}, {"prod": {"refresh_token": ""}}, {"gamedev": {"refresh_token": "t"}}): + self.write_auth(value) + self.assertFalse(G["signed_in"](), value) + self.write_auth({"prod": {"refresh_token": "t"}}) + self.assertTrue(G["signed_in"]()) + + +class SignOutTest(EpicTestCase): + def requests(self, launch): + return [json.loads(p.read_text()) for p in sorted((launch / "stores/req").glob("*.json"))] + + def follow(self, states, times): + launch = self.tmp / "launch" + session = G["Session"]("visible") + states = iter(states) + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(launch)}), \ + mock.patch.dict(G, {"signed_in": lambda: next(states)}): + for now in times: + session.follow_sign_out(now) + return self.requests(launch) if (launch / "stores/req").is_dir() else [] + + def test_signing_the_launcher_out_signs_droiddeck_out_after_the_grace(self): + grace = G["SIGN_OUT_GRACE"] + posted = self.follow([True, False, False, False, False], [0.0, 1.0, 1.0 + grace / 2, 1.0 + grace, 9.0 + grace]) + self.assertEqual([{"op": "epic-signed-out"}], posted) + + def test_a_short_token_gap_is_not_a_sign_out(self): + grace = G["SIGN_OUT_GRACE"] + self.assertEqual([], self.follow([True, False, True, False], [0.0, 1.0, 1.0 + grace / 2, 1.0 + grace])) + + def test_a_launcher_that_was_never_signed_in_posts_nothing(self): + self.assertEqual([], self.follow([False] * 3, [0.0, 10.0, 20.0])) + + def write_signed_in(self): + auth = Path(G["AUTH_FILE"]) + auth.parent.mkdir(parents=True, exist_ok=True) + auth.write_text(json.dumps({"prod": {"refresh_token": "t"}})) + Path(G["WEB_COOKIES"]).write_text("c") + marker = Path(G["SIGNED_OUT"]) + marker.parent.mkdir(parents=True, exist_ok=True) + marker.write_text("1\n") + return auth, marker + + def test_droiddecks_sign_out_drops_the_launchers_sign_in_once(self): + auth, marker = self.write_signed_in() + self.assertTrue(G["forget_sign_in"]()) + self.assertFalse(auth.exists() or marker.exists() or Path(G["WEB_COOKIES"]).exists()) + auth.write_text(json.dumps({"prod": {"refresh_token": "t"}})) + self.assertFalse(G["forget_sign_in"]()) + self.assertTrue(auth.exists()) + + def test_the_open_launcher_restarts_signed_out(self): + auth, marker = self.write_signed_in() + session = G["Session"]("visible") + session.broker = mock.Mock(closing=False, game=None, owner=None) + session.client = mock.Mock(poll=mock.Mock(return_value=None)) + session.was_signed_in = True + ended = [] + restarted = mock.Mock(poll=mock.Mock(return_value=0), returncode=0) + with mock.patch.object(session, "end_client", side_effect=lambda: ended.append(auth.exists())), \ + mock.patch.object(session, "start_client", side_effect=lambda: setattr(session, "client", restarted)), \ + mock.patch.dict(G, {"signed_in": lambda: False}): + self.assertEqual(0, session.watch()) + self.assertEqual([True], ended) + self.assertFalse(auth.exists() or marker.exists()) + self.assertIs(restarted, session.client) + self.assertFalse(session.was_signed_in) + + def test_the_open_launcher_waits_for_its_game_before_restarting(self): + self.write_signed_in() + session = G["Session"]("visible") + session.broker = mock.Mock(closing=False, game=object(), owner=None) + session.client = mock.Mock(poll=mock.Mock(side_effect=[None, None, 0]), returncode=0) + with mock.patch.object(session, "end_client") as end, mock.patch.object(session, "start_client") as start, \ + mock.patch.dict(G, {"signed_in": lambda: True}): + self.assertEqual(0, session.watch()) + end.assert_not_called() + start.assert_not_called() + self.assertTrue(Path(G["SIGNED_OUT"]).exists()) + + def test_the_hidden_launcher_closes_and_forgets_the_sign_in(self): + auth, marker = self.write_signed_in() + session = G["Session"]("hidden") + session.broker = mock.Mock(closing=False, game=None, owner=None, running=[]) + session.client = mock.Mock(poll=mock.Mock(return_value=None)) + with mock.patch.object(session, "end_client") as end: + self.assertEqual(0, session.watch()) + self.assertTrue(auth.exists()) + session.stop() + end.assert_called_once() + self.assertFalse(auth.exists() or marker.exists()) + + +class DisplayTest(EpicTestCase): + def test_hidden_display_comes_from_a_headless_gamescope(self): + session = G["Session"]("hidden") + session.rundir = str(self.tmp / "display-run") + os.makedirs(session.rundir) + spawned = [] + + def spawn(command, env, log=None, group=False): + spawned.append((command, env)) + marker = command[-1] + Path(marker).write_text(":2") + + session.spawn = spawn + display = session.start_display({"DISPLAY": ":0", "WAYLAND_DISPLAY": "gamescope-0", "HOME": "/root"}, "unix:path=/b") + self.assertEqual(":2", display) + command, env = spawned[0] + self.assertEqual(["gamescope", "--backend", "headless"], command[:3]) + self.assertNotIn("DISPLAY", env) + self.assertNotIn("WAYLAND_DISPLAY", env) + self.assertEqual("unix:path=/b", env["DBUS_SESSION_BUS_ADDRESS"]) + + +class InstallationsTest(EpicTestCase): + def add_game(self, guid="G1", app="Fig", store="epic", extra=None): + folder = self.tmp / ("game-" + app) + folder.mkdir() + (folder / ".droiddeck-store.json").write_text(json.dumps({"store": store, "id": app, "extra": extra or {}})) + manifests = Path(G["V1_MANIFESTS"]) + manifests.mkdir(parents=True, exist_ok=True) + (manifests / (guid + ".item")).write_text(json.dumps({ + "InstallationGuid": guid, "InstallLocation": str(folder), "CatalogNamespace": "ns", "CatalogItemId": "it", + "AppName": app, "AppVersionString": "v1", "InstallTags": ["en"], "SidecarConfigRevision": 1, + "SidecarDeploymentId": "dep", "LaunchExecutable": "Fig.exe", "bIsIncompleteInstall": False, + })) + return folder + + def lines(self): + return [json.loads(line) for line in Path(G["INSTALLATIONS"]).read_text().splitlines()] + + def test_missing_droiddeck_install_is_registered_as_windows(self): + folder = self.add_game() + self.assertTrue(G["sync_installations"]()) + header, entry = self.lines() + self.assertEqual(1, header["entries"]) + self.assertEqual("Windows", entry["platform"]) + self.assertEqual(str(folder), entry["dir"]) + self.assertEqual(["", "en"], entry["tags"]) + self.assertEqual({"revision": 1, "deploymentId": "dep"}, entry["sidecar"]) + self.assertFalse(G["sync_installations"]()) + + def test_imported_linux_record_is_switched_to_windows_and_others_kept(self): + folder = self.add_game() + other = {"installationId": "X", "dir": "/elsewhere", "platform": "Linux", "artifactId": "Other"} + mine = {"installationId": "G1", "dir": str(folder), "platform": "Linux", "artifactId": "Fig", "sidecar": {"revision": 0}} + Path(G["INSTALLATIONS"]).parent.mkdir(parents=True, exist_ok=True) + Path(G["INSTALLATIONS"]).write_text("\n".join(json.dumps(v) for v in ( + {"version": 1, "writtenAt": "t", "entries": 3}, mine, dict(mine, sidecar={"revision": 1}), other)) + "\n") + self.assertTrue(G["sync_installations"]()) + header, first, second, kept = self.lines() + self.assertEqual(3, header["entries"]) + self.assertEqual(["Windows", "Windows"], [first["platform"], second["platform"]]) + self.assertEqual({"revision": 1}, second["sidecar"]) + self.assertEqual(other, kept) + + def write_records(self, *records): + Path(G["INSTALLATIONS"]).parent.mkdir(parents=True, exist_ok=True) + Path(G["INSTALLATIONS"]).write_text("\n".join(json.dumps(v) for v in ( + {"version": 1, "writtenAt": "t", "entries": len(records)},) + records) + "\n") + + def test_imported_record_is_switched_after_the_launcher_consumed_the_item(self): + folder = self.add_game() + shutil.rmtree(G["V1_MANIFESTS"]) + self.write_records({"installationId": "G1", "dir": str(folder), "platform": "Linux", "artifactId": "Fig"}) + self.assertTrue(G["sync_installations"]()) + self.assertEqual("Windows", self.lines()[1]["platform"]) + self.assertFalse(G["sync_installations"]()) + + def test_games_the_launcher_installed_keep_their_platform(self): + folder = self.add_game(extra={"clientManaged": "true"}) + record = {"installationId": "G1", "dir": str(folder), "platform": "Linux", "artifactId": "Fig"} + self.write_records(record) + self.assertFalse(G["sync_installations"]()) + self.assertEqual(record, self.lines()[1]) + + def test_a_moved_game_points_the_launcher_at_its_new_folder(self): + folder = self.add_game() + old = {"installationId": "G1", "dir": "/gone/Fig", "platform": "Windows", "artifactId": "Fig"} + self.write_records(old, dict(old, version="v2")) + self.assertTrue(G["sync_installations"]()) + header, first, second = self.lines() + self.assertEqual(2, header["entries"]) + self.assertEqual([str(folder), str(folder)], [first["dir"], second["dir"]]) + self.assertEqual("v2", second["version"]) + self.assertFalse(G["sync_installations"]()) + + def test_an_imported_record_under_another_id_follows_the_move_and_platform(self): + folder = self.add_game() + self.write_records({"installationId": "L1", "dir": "/gone/Fig", "platform": "Linux", "artifactId": "Fig"}) + self.assertTrue(G["sync_installations"]()) + entry = self.lines()[1] + self.assertEqual(("L1", str(folder), "Windows"), (entry["installationId"], entry["dir"], entry["platform"])) + + def test_a_record_whose_folder_still_exists_is_not_moved(self): + folder = self.add_game() + other = self.tmp / "copy" + other.mkdir() + (other / ".droiddeck-store.json").write_text(json.dumps({"store": "epic", "id": "Fig"})) + record = {"installationId": "G1", "dir": str(other), "platform": "Windows", "artifactId": "Fig"} + self.write_records(record) + self.assertFalse(G["sync_installations"]()) + self.assertNotEqual(str(folder), self.lines()[1]["dir"]) + + def test_a_launcher_install_of_the_same_game_is_not_redirected(self): + self.add_game() + own = self.tmp / "launcher-Fig" + own.mkdir() + record = {"installationId": "L1", "dir": str(own), "platform": "Windows", "artifactId": "Fig"} + self.write_records(record) + G["sync_installations"]() + self.assertEqual(record, self.lines()[1]) + + def test_games_not_installed_by_droiddeck_are_left_alone(self): + self.add_game(store="gog") + self.assertFalse(G["sync_installations"]()) + self.assertFalse(Path(G["INSTALLATIONS"]).exists()) + + +class SettingsTest(EpicTestCase): + def test_settings_are_seeded_without_losing_the_rest(self): + settings = self.data / "settings/app-settings.json" + settings.parent.mkdir(parents=True) + settings.write_text(json.dumps({"locale": "de", "cloudSavesEnabled": True})) + self.assertTrue(G["seed_settings"]()) + saved = json.loads(settings.read_text()) + self.assertEqual("de", saved["locale"]) + self.assertFalse(saved["cloudSavesEnabled"]) + self.assertFalse(saved["minimizeToTray"]) + self.assertFalse(saved["automaticDownloadsEnabled"]) + self.assertFalse(G["seed_settings"]()) + + def test_proton_shim_replaces_every_ge_proton(self): + real = self.data / "compat/runtime/GE-Proton10-40" + real.mkdir(parents=True) + (real / "proton").write_text("#!/usr/bin/env python3\n") + G["install_shims"]() + for name in ("GE-Proton10-34", "GE-Proton10-40"): + shim = self.data / "compat/runtime" / name / "proton" + self.assertIn("droiddeck-epic", shim.read_text()) + self.assertIn(" proton ", shim.read_text()) + self.assertTrue(os.access(shim, os.X_OK)) + self.assertIn("xdg-open", (self.state / "bin/xdg-open").read_text()) + + +class BrokerTest(EpicTestCase): + def broker(self, mode="hidden"): + path = os.path.join(G["run_dir"](), "broker.sock") + broker = G["Broker"](path, mode, dict(os.environ)) + self.addCleanup(broker.shutdown) + return broker, path + + def shim(self, path, args, result): + def run(): + with mock.patch.dict(os.environ, {"DROIDDECK_EPIC_BROKER": path}): + result.append(G["shim_proton"](["waitforexitandrun", "/games/Fig/Fig.exe"] + args)) + thread = threading.Thread(target=run, daemon=True) + thread.start() + return thread + + def test_stale_broker_socket_is_removed_before_bind(self): + path = os.path.join(G["run_dir"](), "broker.sock") + os.makedirs(os.path.dirname(path), exist_ok=True) + stale = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + stale.bind(path) + stale.close() + broker, path = self.broker() + self.assertEqual("hidden", G["ask_broker"]({"op": "status"}, path=path)["mode"]) + + def test_hidden_launch_hands_args_and_waits_for_the_game(self): + broker, path = self.broker() + conn = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + conn.connect(path) + G["send"](conn, {"op": "await", "app": "Fig", "timeout": 10}) + time.sleep(0.2) + helper = [] + self.shim(path, ["/quiet"], helper).join(5) + self.assertEqual([0], helper) + result = [] + thread = self.shim(path, ["-epicapp=Fig", "-AUTH_PASSWORD=abc"], result) + reply = G["receive"](conn, 10) + conn.close() + self.assertTrue(reply["ok"]) + self.assertEqual(["-epicapp=Fig", "-AUTH_PASSWORD=abc"], reply["args"]) + time.sleep(0.3) + self.assertEqual([], result) + self.assertEqual({"ok": True}, G["ask_broker"]({"op": "exited", "code": 3}, path=path)) + thread.join(5) + self.assertEqual([3], result) + self.assertIsNotNone(broker.exited_at) + + def test_await_times_out_without_a_launch(self): + broker, path = self.broker() + conn = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + conn.connect(path) + G["send"](conn, {"op": "await", "app": "Fig", "timeout": 0.5}) + self.assertEqual({"ok": False, "reason": "timeout"}, G["receive"](conn, 5)) + conn.close() + + def test_broker_survives_malformed_requests(self): + broker, path = self.broker() + for raw in (b"[1, 2]\n", b'{"op": "exited", "code": [1]}\n', b'{"op": "exited", "code": "x"}\n', + b'{"op": "launch", "args": 5}\n'): + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as conn: + conn.connect(path) + conn.sendall(raw) + conn.settimeout(5) + conn.recv(4096) + self.assertEqual("hidden", G["ask_broker"]({"op": "status"}, path=path)["mode"]) + + def test_shim_survives_a_malformed_reply(self): + path = os.path.join(G["run_dir"](), "fake.sock") + os.makedirs(os.path.dirname(path), exist_ok=True) + server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + self.addCleanup(server.close) + server.bind(path) + server.listen(4) + replies = [b"[1]\n", b'{"code": "x"}\n'] + + def answer(): + for reply in replies: + conn, _ = server.accept() + with conn: + G["receive"](conn, 5) + conn.sendall(reply) + + threading.Thread(target=answer, daemon=True).start() + with mock.patch.dict(os.environ, {"DROIDDECK_EPIC_BROKER": path}): + for _ in replies: + self.assertEqual(1, G["shim_proton"](["waitforexitandrun", "/x.exe", "-epicapp=Fig"])) + + def test_shim_without_broker_fails(self): + with mock.patch.dict(os.environ, {"DROIDDECK_EPIC_BROKER": str(self.tmp / "missing.sock")}): + self.assertEqual(1, G["shim_proton"](["waitforexitandrun", "/x.exe", "-epicapp=Fig"])) + self.assertEqual(0, G["shim_proton"](["getcompatpath", "/x"])) + + def test_visible_mode_runs_store_games_through_their_launcher(self): + folder = self.tmp / "Fig" + folder.mkdir() + (folder / ".droiddeck-store.json").write_text(json.dumps({"store": "epic", "id": "Fig", "args": ["-x"]})) + (folder / ".droiddeck-launch.bat").write_text('if exist "%~dp0.droiddeck-epic-args" goto client\r\n') + calls = [] + + def popen(command, env=None, cwd=None, start_new_session=False): + calls.append((command, env.get("DROIDDECK_EPIC_HANDLED"), start_new_session)) + return mock.Mock(wait=mock.Mock(return_value=7)) + + running = [] + with mock.patch.object(subprocess, "Popen", popen): + code = G["run_game"]({"exe": str(folder / "Fig.exe"), "args": ["-epicapp=Fig"]}, {"PATH": "/usr/bin"}, running) + self.assertEqual(7, code) + self.assertEqual(([G["PROTON_RUN"], str(folder / ".droiddeck-launch.bat")], "1", True), calls[0]) + self.assertEqual([], running) + self.assertEqual(b"-epicapp=Fig -x\r\n", (folder / ".droiddeck-epic-args").read_bytes()) + + def test_visible_games_are_marked_as_playing_while_they_run(self): + broker, path = self.broker("visible") + launch = self.tmp / "launch" + marker = launch / G["PLAYING"] + seen = [] + + def run_game(request, env, running=None): + seen.append(marker.is_file()) + return 5 + + result = [] + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(launch)}), mock.patch.dict(G, {"run_game": run_game}): + self.shim(path, ["-epicapp=Fig"], result).join(10) + self.assertEqual([True], seen) + self.assertEqual([5], result) + self.assertFalse(marker.exists()) + + def steam_takes(self, path, app, replies): + def take(): + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as conn: + conn.connect(path) + G["send"](conn, {"op": "await", "app": app, "timeout": 10}) + replies.append(G["receive"](conn, 10)) + G["ask_broker"]({"op": "exited", "code": 6}, path=path) + threading.Thread(target=take, daemon=True).start() + + def test_a_game_started_in_the_open_launcher_goes_through_steam(self): + broker, path = self.broker("visible") + asked, ran, result, taken = [], [], [], [] + + def ask_app(request, timeout): + asked.append(request) + self.steam_takes(path, "Fig", taken) + return {"ok": True} + + with mock.patch.dict(G, { + "find_store_game": lambda exe: (str(self.tmp), {"store": "epic", "id": "Fig"}), + "ask_app": ask_app, + "run_game": lambda *a, **k: ran.append(a) or 3, + }): + self.shim(path, ["-epicapp=Fig", "-AUTH_PASSWORD=x"], result).join(10) + self.assertEqual([{"op": "epic-play-in-steam", "id": "Fig"}], asked) + self.assertEqual([], ran) + self.assertEqual([6], result) + self.assertEqual(["-epicapp=Fig", "-AUTH_PASSWORD=x"], taken[0]["args"]) + self.assertEqual([], broker.launches) + + def test_a_game_steam_never_takes_is_dropped_after_the_wait(self): + broker, path = self.broker("visible") + result = [] + with mock.patch.dict(G, { + "find_store_game": lambda exe: (str(self.tmp), {"store": "epic", "id": "Fig"}), + "ask_app": lambda request, timeout: {"ok": True}, + "run_game": lambda *a, **k: 3, + "STEAM_CLAIM_WAIT": 0.3, + }): + self.shim(path, ["-epicapp=Fig"], result).join(10) + self.assertEqual([0], result) + self.assertEqual([], broker.launches) + + def test_a_launch_steam_already_waits_for_is_handed_straight_to_it(self): + broker, path = self.broker("visible") + taken, result, asked = [], [], [] + self.steam_takes(path, "Fig", taken) + self.assertTrue(G["wait_for"](lambda: broker.awaiting.get("fig"), 5, 0.05)) + with mock.patch.dict(G, {"ask_app": lambda request, timeout: asked.append(request) or {"ok": True}, + "run_game": lambda *a, **k: 3}): + self.shim(path, ["-epicapp=Fig"], result).join(10) + self.assertEqual([], asked) + self.assertEqual([6], result) + self.assertEqual(["-epicapp=Fig"], taken[0]["args"]) + self.assertEqual({}, dict(broker.awaiting)) + + def test_steam_takes_the_launch_the_open_launcher_already_started(self): + broker, path = self.broker("visible") + item = G["Launch"]({"exe": "/games/Fig/Fig.exe", "args": ["-epicapp=Fig", "-x"]}) + broker.launches.append(item) + info = {"pid": os.getpid(), "broker": path, "mode": "visible", "bus": "unix:path=/nonexistent"} + with mock.patch.dict(G, {"forward": mock.Mock(side_effect=AssertionError("no deep link"))}): + reply = G["hand_off"](info, None, "Fig", "ns", "it", "1", time.monotonic() + 10) + self.assertTrue(reply["ok"]) + self.assertEqual(["-epicapp=Fig", "-x"], reply["args"]) + self.assertTrue(item.claimed) + self.assertIs(item, broker.game) + + def test_a_visible_launcher_that_started_nothing_gets_the_deep_link(self): + broker, path = self.broker("visible") + info = {"pid": os.getpid(), "broker": path, "mode": "visible", "bus": "unix:path=/x"} + sent, result = [], [] + + def forward(bus, url): + sent.append(url) + self.shim(path, ["-epicapp=Fig"], result) + return True + + with mock.patch.dict(G, {"api": lambda: {"port": 1}, "installed": lambda current, app: True, + "signed_in": lambda: True, "forward": forward, + "ask_app": mock.Mock(side_effect=AssertionError("offered to Steam"))}): + reply = G["hand_off"](info, None, "Fig", "ns", "it", "1", time.monotonic() + 10) + self.assertTrue(reply["ok"]) + self.assertEqual(["-epicapp=Fig"], reply["args"]) + self.assertEqual(1, len(sent)) + G["ask_broker"]({"op": "exited", "code": 2}, path=path) + self.assertTrue(G["wait_for"](lambda: result, 5, 0.05)) + self.assertEqual([2], result) + + def test_the_hidden_launcher_is_closed_before_the_visible_one_opens(self): + broker, path = self.broker() + proc = subprocess.Popen(["sleep", "30"]) + self.addCleanup(proc.kill) + info = {"pid": proc.pid, "mode": "hidden", "broker": path} + stops = [] + + def ask(message, timeout=3.0, path=None): + stops.append((message, path)) + proc.kill() + proc.wait() + return {"ok": True} + + with mock.patch.dict(G, {"read_json": lambda p: info, "ask_broker": ask}): + G["retire_hidden"]() + self.assertEqual([({"op": "stop"}, path)], stops) + stops.clear() + with mock.patch.dict(G, {"read_json": lambda p: dict(info, mode="visible", pid=os.getpid()), "ask_broker": ask}): + G["retire_hidden"]() + self.assertEqual([], stops) + + def test_the_open_mark_carries_the_steam_app_id(self): + launch = self.tmp / "launch" + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(launch)}): + with G["marked"](G["OPEN"], "3000000001"): + self.assertEqual("3000000001\n", (launch / G["OPEN"]).read_text()) + self.assertFalse((launch / G["OPEN"]).exists()) + + def test_the_steam_app_id_comes_from_the_reaper_above_the_launcher(self): + reaper = subprocess.Popen(["sh", "-c", "sleep 30; :", "SteamLaunch", "AppId=3000000001", "--"]) + self.addCleanup(reaper.kill) + children = Path("/proc/%d/task/%d/children" % (reaper.pid, reaper.pid)) + self.assertTrue(G["wait_for"](lambda: children.is_file() and children.read_text().split(), 5, 0.05)) + child = int(children.read_text().split()[0]) + self.assertEqual(reaper.pid, G["parent_pid"](child)) + self.assertEqual("3000000001", G["steam_app_id"](child)) + self.assertEqual("3000000001", G["steam_app_id"](reaper.pid)) + self.assertEqual("", G["steam_app_id"](os.getpid())) + self.assertEqual(0, G["parent_pid"](self.dead_pid())) + bad = subprocess.Popen(["sh", "-c", "sleep 30; :", "SteamLaunch", "AppId=x"]) + self.addCleanup(bad.kill) + self.assertEqual("", G["steam_app_id"](bad.pid)) + + def test_a_game_run_in_the_launcher_gets_steams_overlay_preload_back(self): + folder = self.tmp / "Fig" + folder.mkdir() + envs = [] + + def popen(command, env=None, cwd=None, start_new_session=False): + envs.append(env) + return mock.Mock(wait=mock.Mock(return_value=0)) + + with mock.patch.object(subprocess, "Popen", popen): + G["run_game"]({"exe": str(folder / "Fig.exe"), "args": []}, {"PATH": "/usr/bin", G["STEAM_PRELOAD"]: "/s/overlay.so"}) + G["run_game"]({"exe": str(folder / "Fig.exe"), "args": []}, {"PATH": "/usr/bin"}) + self.assertEqual("/s/overlay.so", envs[0]["LD_PRELOAD"]) + self.assertNotIn(G["STEAM_PRELOAD"], envs[0]) + self.assertNotIn("LD_PRELOAD", envs[1]) + + def test_an_owner_gone_ends_a_game_the_open_launcher_handed_to_steam(self): + broker, _ = self.broker("visible") + session = G["Session"]("visible") + session.broker = broker + polls = iter([None, None, None, 0]) + session.client = mock.Mock(poll=mock.Mock(side_effect=lambda: next(polls, 0)), returncode=0) + game = G["Launch"]({"args": ["-epicapp=Fig"]}) + broker.game = game + broker.owner = self.dead_pid() + result = [] + thread = threading.Thread(target=lambda: result.append(session.watch()), daemon=True) + thread.start() + thread.join(10) + self.assertEqual([0], result) + self.assertTrue(game.done.is_set()) + self.assertIsNone(broker.game) + + def test_a_game_steam_cannot_take_runs_in_the_open_launcher(self): + broker, path = self.broker("visible") + result = [] + for reply in ({"ok": False, "reason": "not-registered"}, None, [1]): + with mock.patch.dict(G, { + "find_store_game": lambda exe: (str(self.tmp), {"store": "epic", "id": "Fig"}), + "ask_app": lambda request, timeout: reply, + "run_game": lambda *a, **k: 4, + }): + self.shim(path, ["-epicapp=Fig"], result).join(10) + self.assertEqual([4, 4, 4], result) + + def test_only_registered_epic_games_are_offered_to_steam(self): + asked = [] + with mock.patch.dict(G, {"ask_app": lambda request, timeout: asked.append(request) or {"ok": True}}): + with mock.patch.dict(G, {"find_store_game": lambda exe: None}): + self.assertFalse(G["play_in_steam"]({"exe": "/games/Fig/Fig.exe"})) + with mock.patch.dict(G, {"find_store_game": lambda exe: ("/games/Fig", {"store": "gog", "id": "1"})}): + self.assertFalse(G["play_in_steam"]({"exe": "/games/Fig/Fig.exe"})) + self.assertEqual([], asked) + + def test_a_game_the_launcher_just_installed_is_offered_to_steam_by_its_install_record(self): + records = Path(G["INSTALLATIONS"]) + records.parent.mkdir(parents=True, exist_ok=True) + lines = [{"version": 1, "entries": 3}, + {"installationId": "A", "dir": "/games/Fig", "artifactId": "Fig"}, + {"installationId": "B", "dir": "/games/Old", "artifactId": "Old"}, + {"installationId": "B", "deleted": True}] + records.write_text("\n".join(json.dumps(line) for line in lines) + "\n") + asked = [] + with mock.patch.dict(G, {"find_store_game": lambda exe: None, + "ask_app": lambda request, timeout: asked.append(request) or {"ok": True}}): + self.assertTrue(G["play_in_steam"]({"exe": "/games/Fig/bin/Fig.exe"})) + self.assertFalse(G["play_in_steam"]({"exe": "/games/Old/Old.exe"})) + self.assertFalse(G["play_in_steam"]({"exe": "/games/Figment/Fig.exe"})) + self.assertEqual([{"op": "epic-play-in-steam", "id": "Fig"}], asked) + + def test_the_playing_mark_goes_away_when_the_game_fails(self): + launch = self.tmp / "launch" + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(launch)}): + with self.assertRaises(OSError), G["playing"](): + self.assertTrue((launch / G["PLAYING"]).is_file()) + raise OSError("boom") + self.assertFalse((launch / G["PLAYING"]).exists()) + + def test_a_stopped_session_leaves_no_playing_mark_for_the_next_launcher(self): + launch = self.tmp / "launch" + launch.mkdir() + (launch / G["PLAYING"]).write_text("1\n") + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(launch)}): + G["clear_playing"]() + G["clear_playing"]() + self.assertFalse((launch / G["PLAYING"]).exists()) + + def test_a_stopped_visible_session_ends_the_game_and_its_mark(self): + broker, _ = self.broker("visible") + launch = self.tmp / "launch" + launch.mkdir() + (launch / G["PLAYING"]).write_text("1\n") + game = subprocess.Popen(["sleep", "60"], start_new_session=True) + self.addCleanup(game.kill) + broker.running.append(game) + session = G["Session"]("visible") + session.broker = broker + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(launch)}): + session.stop() + self.assertIsNotNone(game.poll()) + self.assertFalse((launch / G["PLAYING"]).exists()) + + def dead_pid(self): + proc = subprocess.Popen(["true"]) + proc.wait() + return proc.pid + + def test_hidden_session_closes_once_the_game_and_its_owner_are_gone(self): + broker, _ = self.broker() + session = G["Session"]("hidden") + session.broker = broker + session.client = mock.Mock(poll=mock.Mock(return_value=None)) + game = G["Launch"]({"args": ["-epicapp=Fig"]}) + broker.game = game + broker.owner = self.dead_pid() + result = [] + with mock.patch.dict(G, {"EXIT_GRACE": 0.3}), mock.patch.object(broker, "exited", wraps=broker.exited) as exited: + thread = threading.Thread(target=lambda: result.append(session.watch()), daemon=True) + thread.start() + thread.join(5) + self.assertEqual([0], result) + self.assertTrue(game.done.is_set()) + self.assertIsNone(broker.game) + self.assertEqual(1, exited.call_count) + + def test_exited_without_a_game_changes_nothing(self): + broker, _ = self.broker() + broker.exited(0) + self.assertIsNone(broker.exited_at) + + def test_hand_off_stops_waiting_when_the_client_dies(self): + broker, path = self.broker() + info = {"pid": self.dead_pid(), "broker": path, "bus": "unix:path=/nonexistent"} + started = time.monotonic() + reply = G["hand_off"](info, None, "Fig", "ns", "it", "1", time.monotonic() + 30) + self.assertEqual({"ok": False, "reason": "client-exited"}, reply) + self.assertLess(time.monotonic() - started, 5) + + def test_forward_survives_a_hung_dbus_send(self): + with mock.patch.object(subprocess, "call", side_effect=subprocess.TimeoutExpired("dbus-send", 15)): + self.assertFalse(G["forward"]("unix:path=/x", "com.epicgames.launcher://apps/x")) + + +class LaunchTest(EpicTestCase): + def test_launch_refuses_before_the_client_is_ready(self): + folder = self.tmp / "Fig" + folder.mkdir() + (folder / ".droiddeck-store.json").write_text(json.dumps({"store": "epic", "id": "Fig"})) + options = {"app": "Fig", "namespace": "ns", "item": "it", "folder": str(folder)} + with mock.patch("sys.stdout", new_callable=io.StringIO) as out: + self.assertEqual(1, G["launch"](dict(options))) + self.assertEqual("old-launcher", json.loads(out.getvalue())["reason"]) + (folder / ".droiddeck-launch.bat").write_text("goto client .droiddeck-epic-args") + with mock.patch("sys.stdout", new_callable=io.StringIO) as out, \ + mock.patch.dict(G, {"fex_tool": lambda request=False: None}): + self.assertEqual(1, G["launch"](dict(options))) + self.assertEqual("not-installed", json.loads(out.getvalue())["reason"]) + + def test_a_start_error_is_reported_and_cleaned_up(self): + stopped = [] + with mock.patch.object(G["Session"], "run", side_effect=OSError("no dbus-daemon")), \ + mock.patch.object(signal, "signal") as handlers, \ + mock.patch.object(G["Session"], "stop", lambda session: stopped.append(handlers.call_args_list[-2:])): + self.assertEqual(2, G["serve"]("hidden")) + self.assertEqual([[mock.call(signal.SIGTERM, signal.SIG_IGN), mock.call(signal.SIGHUP, signal.SIG_IGN)]], stopped) + + def test_a_failed_spawn_closes_its_log_pipe(self): + session = G["Session"]("hidden") + closed = [] + real_close = os.close + with mock.patch.dict(G, {"capped_log": lambda path: 99999}), \ + mock.patch.object(subprocess, "Popen", side_effect=FileNotFoundError("gamescope")), \ + mock.patch.object(os, "close", lambda fd: closed.append(fd) if fd == 99999 else real_close(fd)): + with self.assertRaises(OSError): + session.spawn(["gamescope"], {}, str(self.tmp / "logs/g.log")) + self.assertEqual([99999], closed) + self.assertEqual([], session.procs) + + def test_a_broken_reply_from_the_launcher_api_means_not_known_yet(self): + with mock.patch.dict(G, {"api_get": mock.Mock(side_effect=http.client.IncompleteRead(b""))}): + self.assertIsNone(G["installed"]({"port": 1, "machineSecret": "s"}, "Fig")) + + def test_a_bad_timeout_falls_back_to_the_default(self): + with mock.patch("sys.stdout", new_callable=io.StringIO) as out: + self.assertEqual(1, G["launch"]({"timeout": "soon"})) + self.assertEqual("missing-game", json.loads(out.getvalue())["reason"]) + + def test_a_spawned_client_is_stopped_through_its_own_broker(self): + asked = [] + proc = mock.Mock(pid=4321, wait=mock.Mock(return_value=0)) + with mock.patch.dict(G, {"ask_broker": lambda message, timeout=5.0, path=None: asked.append(path) or {"ok": True}}): + G["stop_spawned"](proc, {"pid": 4321, "broker": "/run/spawned.sock"}) + self.assertEqual(["/run/spawned.sock"], asked) + + def test_a_spawned_client_that_will_not_stop_is_killed(self): + proc = subprocess.Popen(["python3", "-c", "import signal, time; signal.signal(signal.SIGTERM, signal.SIG_IGN); " + "print(1, flush=True); time.sleep(60)"], stdout=subprocess.PIPE, start_new_session=True) + self.addCleanup(proc.stdout.close) + self.addCleanup(proc.kill) + proc.stdout.readline() + with mock.patch.dict(G, {"STOP_WAIT": 0.2}): + G["stop_spawned"](proc, {"pid": proc.pid, "broker": str(self.tmp / "missing.sock")}) + self.assertEqual(-signal.SIGKILL, proc.poll()) + + def test_installations_listing_is_searched_for_the_app(self): + listing = {"installations": [{"sandboxId": "ns", "artifact": {"id": "Fig"}}]} + self.assertTrue(G["holds"](listing, "Fig")) + self.assertFalse(G["holds"](listing, "Other")) + + def test_run_command_opens_the_launcher(self): + with mock.patch.dict(G, {"serve": lambda mode: mode}): + self.assertEqual("visible", G["main"](["run"])) + + def test_launch_command_reaches_the_store_launch(self): + with mock.patch.dict(G, {"launch": lambda options: options.get("app")}): + self.assertEqual("Fig", G["main"](["launch", "--app", "Fig", "--namespace", "ns", "--item", "it"])) + + +class StoreLaunchClientTest(unittest.TestCase): + def setUp(self): + self.tmp = Path(tempfile.mkdtemp()) + self.addCleanup(shutil.rmtree, self.tmp, True) + self.folder = self.tmp / "Fig" + self.folder.mkdir() + self.sidecar = {"store": "epic", "id": "Fig", "extra": {"namespace": "ns", "catalogItemId": "it"}} + (self.folder / ".droiddeck-store.json").write_text(json.dumps(self.sidecar)) + + def test_client_is_wanted_once_installed(self): + state = self.tmp / ".local" / "share" / "droiddeck-epic" + with mock.patch.dict(os.environ, {"HOME": str(self.tmp)}), mock.patch("os.access", return_value=True): + self.assertFalse(S["client_wanted"]()) + state.mkdir(parents=True) + (state / "current.json").write_text("{}") + self.assertTrue(S["client_wanted"]()) + with mock.patch("os.access", return_value=False): + self.assertFalse(S["client_wanted"]()) + + def test_offline_game_skips_the_client(self): + calls = [] + sidecar = dict(self.sidecar, epic={"offline": True}) + (self.folder / ".droiddeck-store.json").write_text(json.dumps(sidecar)) + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(self.tmp / "launch"), "STEAM_COMPAT_DATA_PATH": ""}), \ + mock.patch.dict(S, {"client_wanted": lambda: calls.append("wanted") or True, + "ask": lambda channel, request, timeout=0: calls.append(request["op"]) or {"ok": True}}): + S["main"]([str(self.folder / ".droiddeck-launch.bat")]) + self.assertNotIn("wanted", calls) + self.assertNotIn("epic-code", calls) + + def test_through_client_needs_the_args_file(self): + answers = [b'{"ok": true}\n', b'{"ok": false, "reason": "signed-out"}\n'] + + def run(command, **kwargs): + self.assertEqual(["launch", "--app", "Fig", "--namespace", "ns", "--item", "it"], command[1:8]) + return subprocess.CompletedProcess(command, 0, stdout=answers.pop(0)) + + with mock.patch.object(subprocess, "run", run): + self.assertEqual("failed", S["through_client"](self.folder, self.sidecar)) + self.assertEqual("signed-out", S["through_client"](self.folder, self.sidecar)) + self.assertEqual("no-catalog-ids", S["through_client"](self.folder, {"id": "Fig"})) + + def test_epic_launch_falls_back_to_an_exchange_code(self): + calls = [] + env = {"BL_LAUNCH_DIR": str(self.tmp / "launch"), "STEAM_COMPAT_DATA_PATH": ""} + with mock.patch.dict(os.environ, env), \ + mock.patch.dict(S, {"client_wanted": lambda: True, + "through_client": lambda folder, sidecar, timeout=0: calls.append("client") or "timeout", + "ask": lambda channel, request, timeout=0: calls.append(request["op"]) or {"ok": True, "code": True}}): + S["main"]([str(self.folder / ".droiddeck-launch.bat")]) + self.assertEqual(["client", "epic-code", "cloud-down"], calls) + + def test_epic_launch_through_client_skips_the_code(self): + calls = [] + + def through(folder, sidecar, timeout=0): + calls.append("client") + (folder / ".droiddeck-epic-args").write_text("-epicapp=Fig\r\n") + return "ok" + + (self.folder / ".droiddeck-epic-code").write_text("stale") + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(self.tmp / "launch"), "STEAM_COMPAT_DATA_PATH": ""}), \ + mock.patch.dict(S, {"client_wanted": lambda: True, "through_client": through, + "ask": lambda channel, request, timeout=0: calls.append(request["op"]) or {"ok": True}}): + S["main"]([str(self.folder / ".droiddeck-launch.bat")]) + self.assertEqual(["client", "cloud-down"], calls) + self.assertFalse((self.folder / ".droiddeck-epic-code").exists()) + self.assertTrue((self.folder / ".droiddeck-epic-args").exists()) + + def test_handled_launch_keeps_the_clients_args(self): + calls = [] + (self.folder / ".droiddeck-epic-args").write_text("-epicapp=Fig\r\n") + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": str(self.tmp / "launch"), "DROIDDECK_EPIC_HANDLED": "1", + "STEAM_COMPAT_DATA_PATH": ""}), \ + mock.patch.dict(S, {"client_wanted": lambda: calls.append("wanted") or True, + "ask": lambda channel, request, timeout=0: calls.append(request["op"]) or {"ok": True}}): + S["main"]([str(self.folder / ".droiddeck-launch.bat")]) + self.assertEqual(["cloud-down"], calls) + self.assertTrue((self.folder / ".droiddeck-epic-args").exists()) + + def test_the_games_exit_code_reaches_the_epic_client(self): + runs = [] + bat = str(self.folder / ".droiddeck-launch.bat") + with mock.patch.dict(os.environ, {"BL_LAUNCH_DIR": ""}), mock.patch.dict(os.environ), \ + mock.patch("os.access", return_value=True), \ + mock.patch.object(subprocess, "run", lambda command, **kwargs: runs.append(command)): + os.environ.pop("DROIDDECK_EPIC_HANDLED", None) + self.assertEqual(0, S["main"](["--exited", "--code", "7", bat])) + self.assertEqual(0, S["main"](["--exited", bat])) + self.assertEqual([S["EPIC_CLIENT"], "exited", "--code", "7"], runs[0]) + self.assertEqual("0", runs[1][-1]) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_droiddeck_fex.py b/tools/tests/test_droiddeck_fex.py index 20ccad022f..0af8e7f4f6 100644 --- a/tools/tests/test_droiddeck_fex.py +++ b/tools/tests/test_droiddeck_fex.py @@ -92,6 +92,38 @@ class FexTestCase(unittest.TestCase): self.write(self.steam / "steamapps/appmanifest_1628350.acf", '"AppState" { "installdir" "SteamLinuxRuntime_sniper" }') return platform + def graphics(self, sniper, libc=b"GLIBC_2.2.5 GLIBC_2.31 GLIBC_2.34 GLIBC_2.41", libstdcxx=b"GLIBCXX_3.4.28 GLIBCXX_3.4.33"): + files = Path(sniper) / "files" + x86 = files / "lib/x86_64-linux-gnu" + self.write(x86 / "libc-2.31.so", b"GLIBC_2.2.5 GLIBC_2.31") + os.unlink(x86 / "libc.so.6") + os.symlink("libc-2.31.so", x86 / "libc.so.6") + self.write(x86 / "ld-2.31.so", b"old ld") + os.symlink("ld-2.31.so", x86 / "ld-linux-x86-64.so.2") + self.write(x86 / "libstdc++.so.6", b"GLIBCXX_3.4.28") + self.write(x86 / "libSegFault.so", b"old") + self.write(x86 / "libSDL2-2.0.so.0", b"sdl") + self.write(x86 / "libfoo.so.1.2", b"foo") + os.symlink("libfoo.so.1.2", x86 / "libfoo.so.1") + self.write(x86 / "gconv/OLD.so", b"old gconv") + self.write(files / "lib/i386-linux-gnu/libc.so.6", b"GLIBC_2.31") + self.write(files / "lib/i386-linux-gnu/ld-2.31.so", b"old ld32") + os.symlink("i386-linux-gnu/ld-2.31.so", files / "lib/ld-linux.so.2") + os.unlink(files / "lib64/ld-linux-x86-64.so.2") + os.symlink("../lib/x86_64-linux-gnu/ld-2.31.so", files / "lib64/ld-linux-x86-64.so.2") + platform = self.steam / "steamapps/common/SteamLinuxRuntime_4/steamrt4_platform_4.0.20260928.262390" + provided = platform / "files/lib/x86_64-linux-gnu" + self.write(provided / "libc.so.6", libc) + self.write(provided / "libstdc++.so.6", libstdcxx) + self.write(provided / "ld-linux-x86-64.so.2", b"new ld") + self.write(provided / "gconv/NEW.so", b"new gconv") + self.write(platform / "files/lib/i386-linux-gnu/libc.so.6", b"GLIBC_2.41") + self.write(platform / "files/lib/i386-linux-gnu/ld-linux.so.2", b"new ld32") + with gzip.open(platform / "usr-mtree.txt.gz", "wt") as out: + out.write("#mtree\n. type=dir\n") + self.write(self.steam / "steamapps/appmanifest_4183110.acf", '"AppState" { "installdir" "SteamLinuxRuntime_4" }') + return platform + def quiet(self, function, *args): with contextlib.redirect_stderr(io.StringIO()) as err: return function(*args), err.getvalue() @@ -198,12 +230,11 @@ class PrepareTest(FexTestCase): for arch in ("x86_64", "i386"): for name in ("libblsession.so", "libfakeinput.so"): self.write(self.tmp / "preloads" / arch / name, arch.encode() + name.encode()) - self.write(self.tmp / "preloads/x86_64/libthunkaudit.so", b"audit") self.write(self.tmp / "preloads/x86_64/libvulkan-thunk.so", b"pin") self.write(self.tmp / "ld.so.preload", "/usr/local/lib/libblsession.so\n/usr/local/lib/libfakeinput.so\n") FEX["install_preloads"](str(root)) - self.assertEqual((root / "lib/x86_64-linux-gnu/droiddeck/libthunkaudit.so").read_bytes(), b"audit") - self.assertEqual((root / "lib/x86_64-linux-gnu/droiddeck/libvulkan-thunk.so").read_bytes(), b"pin") + self.assertEqual((root / "lib/x86_64-linux-gnu/droiddeck/vulkan/libvulkan.so.1").read_bytes(), b"pin") + self.assertEqual(os.readlink(root / "lib/x86_64-linux-gnu/droiddeck/vulkan/libvulkan.so"), "libvulkan.so.1") self.assertEqual((root / "etc/ld.so.preload").read_text(), "/usr/$LIB/droiddeck/libblsession.so\n/usr/$LIB/droiddeck/libfakeinput.so\n") self.assertEqual((root / "lib/i386-linux-gnu/droiddeck/libfakeinput.so").read_bytes(), b"i386libfakeinput.so") @@ -252,7 +283,71 @@ class PrepareTest(FexTestCase): status = json.loads((self.home / ".local/share/droiddeck-fex/status.json").read_text()) self.assertEqual((status["ready"], status["runtime"], status["thunks"]), (True, str(platform), True)) self.assertFalse((self.home / ".config/droiddeck/fex-wanted").exists()) - self.assertEqual(self.quiet(FEX["prepare"])[1], "") + self.assertNotIn("prepared", self.quiet(FEX["prepare"])[1]) + + def test_a_newer_runtime_supplies_the_c_and_cxx_libraries(self): + self.fex_tool() + sniper = self.runtime() + FEX["materialize"](str(sniper)) + provider = self.graphics(sniper) + fex, said = self.quiet(FEX["prepare"]) + root = self.home / ".local/share/droiddeck-fex/rootfs" + self.assertIn("built the x86 runtime from sniper_platform_", said) + self.assertEqual(fex["rootfs"], str(root)) + config = json.loads((self.home / ".local/share/droiddeck-fex/config/Config.json").read_text()) + self.assertEqual(config["Config"]["RootFS"], str(root)) + x86 = root / "lib/x86_64-linux-gnu" + self.assertEqual((x86 / "libc.so.6").read_bytes(), b"GLIBC_2.2.5 GLIBC_2.31 GLIBC_2.34 GLIBC_2.41") + self.assertEqual((x86 / "libstdc++.so.6").read_bytes(), b"GLIBCXX_3.4.28 GLIBCXX_3.4.33") + self.assertEqual((x86 / "ld-linux-x86-64.so.2").read_bytes(), b"new ld") + self.assertEqual((x86 / "gconv/NEW.so").read_bytes(), b"new gconv") + self.assertEqual((root / "lib/i386-linux-gnu/libc.so.6").read_bytes(), b"GLIBC_2.41") + self.assertEqual((x86 / "libSDL2-2.0.so.0").read_bytes(), b"sdl") + self.assertEqual(os.readlink(x86 / "libfoo.so.1"), "libfoo.so.1.2") + self.assertEqual((x86 / "libfoo.so.1").read_bytes(), b"foo") + for stale in ("libc-2.31.so", "ld-2.31.so", "libSegFault.so"): + self.assertFalse(os.path.lexists(x86 / stale), stale) + self.assertEqual(os.readlink(root / "lib/ld-linux.so.2"), "i386-linux-gnu/ld-linux.so.2") + self.assertEqual((root / "lib/ld-linux.so.2").read_bytes(), b"new ld32") + self.assertEqual(os.readlink(root / "lib64/ld-linux-x86-64.so.2"), "../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2") + self.assertEqual((root / "lib64/ld-linux-x86-64.so.2").read_bytes(), b"new ld") + self.assertEqual(os.readlink(root / "usr"), ".") + self.assertEqual((root / "usr/bin/[").read_bytes(), b"blob") + self.assertEqual((sniper / "files/lib/x86_64-linux-gnu/libc.so.6").read_bytes(), b"GLIBC_2.2.5 GLIBC_2.31") + status = json.loads((self.home / ".local/share/droiddeck-fex/status.json").read_text()) + self.assertEqual(status["graphics"], str(provider)) + self.assertNotIn("built", self.quiet(FEX["prepare"])[1]) + os.utime(provider / "usr-mtree.txt.gz", ns=(1, 1)) + self.assertIn("built the x86 runtime", self.quiet(FEX["prepare"])[1]) + self.assertEqual(sorted(os.listdir(root.parent)), ["config", "lock", "rootfs", "status.json"]) + + def test_a_runtime_that_is_not_newer_is_left_out(self): + self.fex_tool() + sniper = self.runtime() + FEX["materialize"](str(sniper)) + self.graphics(sniper, libc=b"GLIBC_2.2.5 GLIBC_2.31", libstdcxx=b"GLIBCXX_3.4.28") + fex, said = self.quiet(FEX["prepare"]) + self.assertEqual(fex["rootfs"], str(sniper / "files")) + self.assertIn("has no newer C and C++ libraries than sniper_platform_", said) + self.assertFalse((self.home / ".local/share/droiddeck-fex/rootfs").exists()) + + def test_x86_steamworks_finds_the_x86_client(self): + for directory, machine in (("linux64", 62), ("linux32", 3), ("linuxarm64", 183)): + self.write(self.steam / directory / "steamclient.so", elf(machine)) + sdk = self.home / ".steam" + sdk.mkdir(parents=True) + os.symlink(self.steam / "linuxarm64", sdk / "sdk64") + os.symlink(self.steam / "linuxarm64", sdk / "sdkarm64") + FEX["link_steam_sdk"]() + self.assertEqual(os.readlink(sdk / "sdk64"), str(self.steam / "linux64")) + self.assertEqual(os.readlink(sdk / "sdk32"), str(self.steam / "linux32")) + self.assertEqual(os.readlink(sdk / "sdkarm64"), str(self.steam / "linuxarm64")) + os.unlink(sdk / "sdk32") + os.symlink(self.tmp / "elsewhere", sdk / "sdk32") + self.write(self.tmp / "elsewhere/steamclient.so", elf(3)) + FEX["link_steam_sdk"]() + self.assertEqual(os.readlink(sdk / "sdk32"), str(self.tmp / "elsewhere")) + self.assertEqual(sorted(os.listdir(sdk)), ["sdk32", "sdk64", "sdkarm64"]) def test_status_refreshes_what_the_app_reads_once_steam_installed_fex(self): with mock.patch.dict(G, {"steam_running": lambda: False}): @@ -317,6 +412,35 @@ class ExtractTest(FexTestCase): self.assertTrue((self.home / ".config/droiddeck/fex-wanted").is_file()) self.assertFalse(json.loads((self.home / ".local/share/droiddeck-fex/status.json").read_text())["ready"]) + def test_uruntime_that_only_drops_extended_attributes_still_unpacks(self): + tool = self.uruntime( + "mkdir -p AppDir && touch AppDir/AppRun\n" + "echo 'Failed to exec memfd: EACCES: Permission denied. Trying tmpfile in /tmp...' >&2\n" + "echo 'write_xattr: could not write xattr security.selinux for file ./AppDir/.DirIcon because you are not superuser!' >&2\n" + "echo 'Further error messages of this type are suppressed!' >&2\n" + "exit 2\n") + with mock.patch.dict(G, {"URUNTIME": tool, "fex_install": lambda: None, "steam_running": lambda: False}): + status, said = self.quiet(FEX["extract"], "image.AppImage") + self.assertEqual(status, 0) + self.assertIn("could not keep the image's extended attributes", said) + self.assertTrue(Path("squashfs-root/AppRun").is_file()) + + def test_an_attribute_only_failure_without_apprun_is_not_taken_as_unpacked(self): + tool = self.uruntime( + "mkdir -p AppDir\n" + "echo 'write_xattr: could not write xattr security.selinux for file ./AppDir/.DirIcon because you are not superuser!' >&2\n" + "exit 2\n") + with mock.patch.dict(G, {"URUNTIME": tool, "fex_install": lambda: None, "steam_running": lambda: False, "prepare": lambda: None}): + status, said = self.quiet(FEX["extract"], "image.AppImage") + self.assertIn("uruntime could not extract it (status 2)", said) + self.assertNotIn("could not keep the image's extended attributes", said) + self.assertFalse(os.path.lexists("squashfs-root/AppRun")) + + def test_other_uruntime_errors_are_not_taken_as_unpacked(self): + self.assertFalse(FEX["only_xattrs_failed"]("write_xattr: could not write xattr\nwrite_file: failed to create file x\n")) + self.assertFalse(FEX["only_xattrs_failed"]("")) + self.assertTrue(FEX["only_xattrs_failed"]("proot error: execveat() failed\nwrite_xattr: could not write xattr\n")) + def test_an_arm64_image_does_not_ask_for_fex(self): self.write(self.image, elf(183) + b"payload", 0o755) tool = self.uruntime("mkdir -p squashfs-root\n") @@ -335,13 +459,40 @@ class ExtractTest(FexTestCase): self.assertIn("no AppImage runtime for ARM64, no FEX yet and no unsquashfs", said) self.assertFalse(os.path.lexists("squashfs-root")) + def test_unsquashfs_fallback_disables_unwritable_xattrs(self): + tool = self.uruntime("exit 1\n") + commands = [] + + def call(argv, **kwargs): + commands.append(argv) + if argv[0] == tool: + return 1 + (self.work / "squashfs-root").mkdir() + (self.work / "squashfs-root/AppRun").touch() + return 0 + + with mock.patch.dict(G, { + "URUNTIME": tool, + "prepare": lambda: None, + "fex_install": lambda: None, + "steam_running": lambda: False, + "want_fex": lambda: None, + }), mock.patch("shutil.which", return_value="/usr/bin/unsquashfs"), \ + mock.patch("subprocess.call", side_effect=call): + status, said = self.quiet(FEX["extract"], "image.AppImage") + self.assertEqual(status, 0) + self.assertIn("uruntime could not extract it (status 1)", said) + self.assertEqual(commands[-1][0], "/usr/bin/unsquashfs") + self.assertIn("-no-xattrs", commands[-1]) + self.assertTrue(Path("squashfs-root/AppRun").is_file()) + class LaunchTest(FexTestCase): def test_the_guest_environment(self): arm = self.write(self.tmp / "arm.so", elf(183)) x86 = self.write(self.tmp / "x86.so", elf(62)) env = {"LD_PRELOAD": "%s:%s %s" % (arm, x86, self.tmp / "gone.so"), - "LD_LIBRARY_PATH": "/steam/steamrtarm64:/usr/lib/aarch64-linux-gnu:/game/lib", + "LD_LIBRARY_PATH": "/steam/steamrtarm64:/usr/lib/aarch64-linux-gnu:/game/lib:/steam/linuxarm64", "FEX_ROOTFS": "/usr/share/guestos/fex-mesa", "FEX_TSOENABLED": "1"} guest = FEX["guest_environment"]({"portable": True}, env) self.assertEqual((guest["LD_PRELOAD"], guest["LD_LIBRARY_PATH"], guest["FEX_PORTABLE"]), (str(x86), "/game/lib", "1")) @@ -349,8 +500,10 @@ class LaunchTest(FexTestCase): self.assertEqual(guest["FEX_TSOENABLED"], "1") self.assertTrue(guest["FEX_APP_CONFIG_LOCATION"].endswith("/config/")) self.assertEqual((guest["FEX_SILENTLOG"], guest["FEX_OUTPUTLOG"]), ("0", "stderr")) - guest = FEX["guest_environment"]({"portable": False}, {"LD_PRELOAD": str(arm), "FEX_PORTABLE": "1", "FEX_OUTPUTLOG": "/tmp/fex.log"}) - self.assertEqual(guest["FEX_OUTPUTLOG"], "/tmp/fex.log") + self.assertEqual(guest["GC_DISABLE_INCREMENTAL"], "1") + guest = FEX["guest_environment"]({"portable": False}, {"LD_PRELOAD": str(arm), "FEX_PORTABLE": "1", "FEX_OUTPUTLOG": "/tmp/fex.log", + "GC_DISABLE_INCREMENTAL": "0"}) + self.assertEqual((guest["FEX_OUTPUTLOG"], guest["GC_DISABLE_INCREMENTAL"]), ("/tmp/fex.log", "0")) self.assertNotIn("LD_PRELOAD", guest) self.assertNotIn("FEX_PORTABLE", guest) @@ -414,9 +567,8 @@ class LaunchTest(FexTestCase): self.runtime() self.write(tool / "usr/share/fex-emu/GuestThunks/libvulkan-guest.so", elf(62) + b"\0libstdc++.so.6\0GLIBCXX_3.4\0GLIBCXX_3.4.29\0libc.so.6\0GLIBC_2.2.5\0GLIBC_2.34\0") - self.write(self.tmp / "preloads/x86_64/libthunkaudit.so", elf(62)) - pin = self.write(self.tmp / "preloads/x86_64/libvulkan-thunk.so", elf(62)) - audit = "/usr/lib/x86_64-linux-gnu/droiddeck/libthunkaudit.so" + pin = self.write(self.tmp / "preloads/x86_64/libvulkan-thunk.so", elf(62) + b"\0libc.so.6\0GLIBC_2.2.5\0") + pinned = "/usr/lib/x86_64-linux-gnu/droiddeck/vulkan" def app(name, glibc=b"GLIBC_2.34\0GLIBC_2.44", glibcxx=b"GLIBCXX_3.4.29\0GLIBCXX_3.4.36", bundled=True): run = self.write(self.tmp / name / "AppRun", elf(62), 0o755) @@ -431,25 +583,32 @@ class LaunchTest(FexTestCase): _, said = self.quiet(FEX["launch"], [str(program)], dict(env or {}), "on", decide) return emulated.call_args[0][2], said + def search(env): + return env.get("LD_LIBRARY_PATH", "").split(":")[0] + env, said = started(app("new")) - self.assertEqual(env["LD_AUDIT"], audit) - self.assertIn("thunks on, its own Vulkan loader too", said) - env, _ = started(app("kept"), {"LD_AUDIT": "/opt/audit.so"}) - self.assertEqual(env["LD_AUDIT"], audit + ":/opt/audit.so") - env, _ = started(self.write(self.tmp / "elsewhere/run.sh", "#!/bin/sh\n", 0o755), decide=str(self.tmp / "new")) - self.assertEqual(env["LD_AUDIT"], audit) - env, said = started(app("old-cxx", glibcxx=b"GLIBCXX_3.4.28")) + self.assertEqual(search(env), pinned) self.assertNotIn("LD_AUDIT", env) + self.assertNotIn("LD_BIND_NOW", env) + self.assertIn("thunks on, its own Vulkan loader too", said) + env, _ = started(app("kept"), {"LD_LIBRARY_PATH": "/game/lib"}) + self.assertEqual(env["LD_LIBRARY_PATH"], pinned + ":/game/lib") + env, _ = started(self.write(self.tmp / "elsewhere/run.sh", "#!/bin/sh\n", 0o755), decide=str(self.tmp / "new")) + self.assertEqual(search(env), pinned) + env, said = started(app("old-cxx", glibcxx=b"GLIBCXX_3.4.28")) + self.assertNotEqual(search(env), pinned) self.assertIn("thunks on)", said) - self.assertNotIn("LD_AUDIT", started(app("old-libc", glibc=b"GLIBC_2.31"))[0]) - self.assertNotIn("LD_AUDIT", started(app("runtime-only", bundled=False))[0]) + self.assertNotEqual(search(started(app("old-libc", glibc=b"GLIBC_2.31"))[0]), pinned) + self.assertNotEqual(search(started(app("runtime-only", bundled=False))[0]), pinned) i386 = self.write(self.tmp / "new/game.i386", elf(3), 0o755) - self.assertNotIn("LD_AUDIT", started(i386)[0]) + self.assertNotEqual(search(started(i386)[0]), pinned) + self.write(pin, elf(62) + b"\0libc.so.6\0GLIBC_2.45\0") + self.assertNotEqual(search(started(app("new"))[0]), pinned) pin.unlink() - self.assertNotIn("LD_AUDIT", started(app("no-pin"))[0]) + self.assertNotEqual(search(started(app("no-pin"))[0]), pinned) self.write(pin, elf(62)) (tool / "usr/share/fex-emu/GuestThunks/libvulkan-guest.so").unlink() - self.assertNotIn("LD_AUDIT", started(app("no-thunk"))[0]) + self.assertNotEqual(search(started(app("no-thunk"))[0]), pinned) def test_steam_verbs(self): with mock.patch.dict(G, {"launch": mock.Mock(return_value=0)}): @@ -499,19 +658,70 @@ class AppInfoTest(unittest.TestCase): table = struct.pack("<I", len(strings)) + b"".join(s.encode() + b"\0" for s in strings) return struct.pack("<IIq", magic, 1, table_at) + body + table - def test_linux_only_titles_are_sent_to_fex(self): + def test_linux_only_titles_are_sent_to_fex_and_dual_platform_is_deferred(self): for magic in (0x07564427, 0x07564428, 0x07564429): with tempfile.TemporaryDirectory() as tmp: steam = Path(tmp) (steam / "appcache").mkdir() (steam / "appcache/appinfo.vdf").write_bytes(self.appinfo({ 10: ("windows", "", "Game"), 20: ("linux", "64", "Game"), 30: ("windows,linux,macos", "", "game"), - 40: ("linux", "arm64", "game"), 50: ("linux", "", "Demo"), 70: ("linux", "", "Tool"), 80: ("linux", "", "config"), + 40: ("linux", "arm64", "game"), 41: ("windows,linux", "aarch64", "game"), + 50: ("linux", "", "Demo"), 70: ("linux", "", "Tool"), 80: ("linux", "", "config"), 90: ("linux", "", ""), }, magic)) self.COMPAT["APPINFO_CACHE"].clear() - targets = self.COMPAT["native_targets"](str(steam), ["10", "20", "30", "40", "50", "70", "80", "90", "1628350", "60"]) - self.assertEqual(targets, {"20": "droiddeck-fex", "50": "droiddeck-fex"}, hex(magic)) + targets = self.COMPAT["native_targets"](str(steam), ["10", "20", "30", "40", "41", "50", "70", "80", "90", "1628350", "60"]) + self.assertEqual(targets, { + "20": "droiddeck-fex", "30": self.COMPAT["NATIVE_CHOICE"], + "40": None, "41": None, "50": "droiddeck-fex", + }, hex(magic)) + + @staticmethod + def manifest(steam, app, flags="4"): + (steam / "steamapps").mkdir(exist_ok=True) + (steam / ("steamapps/appmanifest_%s.acf" % app)).write_text('"AppState" { "appid" "%s" "StateFlags" "%s" }' % (app, flags)) + + def test_dual_platform_titles_keep_the_proton_default_unless_the_user_picks_fex(self): + with tempfile.TemporaryDirectory() as tmp: + steam = Path(tmp) / "Steam" + (steam / "appcache").mkdir(parents=True) + (steam / "appcache/appinfo.vdf").write_bytes(self.appinfo({ + 10: ("windows,linux", "", "game"), 20: ("windows,linux", "", "game"), 30: ("windows,linux", "", "game"), + 40: ("linux", "", "game"), + })) + self.COMPAT["APPINFO_CACHE"].clear() + for app in ("3127680", "1628350", "4183110"): + self.manifest(steam, app) + tool, fex = self.COMPAT["TOOL"], self.COMPAT["FEX_TOOL"] + state = Path(tmp) / "state" + state.mkdir() + (state / "state.json").write_text(json.dumps({"auto": {"20": fex}})) + catalog = [{"name": tool, "display": "Proton Experimental ARM64", "dir": "Proton Experimental (ARM64)", "valve": True}] + config = steam / "config/config.vdf" + config.parent.mkdir() + config.write_text('"InstallConfigStore" { "Software" { "Valve" { "Steam" { "CompatToolMapping" { ' + '"0" { "name" "%s" "config" "" "priority" "75" } ' + '"20" { "name" "%s" "config" "" "priority" "250" } ' + '"30" { "name" "%s" "config" "" "priority" "250" } } } } } }' % (tool, fex, fex)) + self.COMPAT["register_default"](str(config), ["10", "20", "30", "40"], catalog=catalog, directory=str(state)) + self.assertEqual(self.COMPAT["read_config_mapping"](str(config)), + {"0": tool, "10": tool, "20": tool, "30": fex, "40": fex}) + + def test_tools_are_fetched_until_fully_installed_and_up_to_date(self): + with tempfile.TemporaryDirectory() as tmp: + steam = Path(tmp) + (steam / "steamapps").mkdir() + downloads = self.COMPAT["tool_downloads"] + self.assertEqual(downloads(str(steam)), [ + ("4427310", "install"), ("3127680", "install"), ("1628350", "install"), ("4183110", "install")]) + self.manifest(steam, "4427310", flags="6") + self.manifest(steam, "3127680", flags="1026") + self.manifest(steam, "1628350", flags="4") + (steam / "steamapps/appmanifest_4183110.acf").write_text('"AppState" { "appid" "4183110" }') + self.assertEqual(downloads(str(steam)), [("4427310", "update"), ("3127680", "update"), ("4183110", "update")]) + for app in ("4427310", "3127680", "4183110"): + self.manifest(steam, app) + self.assertEqual(downloads(str(steam)), []) def test_titles_with_a_valve_pick_are_found_installed_or_not(self): def deck(oslist, runtime, kind="game"): @@ -545,14 +755,34 @@ class AppInfoTest(unittest.TestCase): self.assertEqual(changes, {"30": "GE-Proton11-7", "32": "GE-Proton11-7"}) self.assertEqual(auto, {"30": "GE-Proton11-7", "32": "GE-Proton11-7"}) - def test_the_mapping_sends_native_titles_to_fex_and_keeps_picks(self): + def test_automatic_native_mapping_uses_fex_and_keeps_explicit_tools(self): tool, fex = self.COMPAT["TOOL"], self.COMPAT["FEX_TOOL"] changes, auto = self.COMPAT["plan_mapping"]( {"0": tool, "20": "fex", "21": "steamlinuxruntime_sniper", "22": "GE-Proton11-7"}, ["20", "21", "22", "23", "24"], [tool, "GE-Proton11-7"], tool, {}, {"20": fex, "21": fex, "22": fex, "23": fex}) - self.assertEqual(changes, {"20": fex, "21": fex, "23": fex, "24": tool}) - self.assertEqual(auto, {"20": fex, "21": fex, "23": fex, "24": tool}) + self.assertEqual(changes, {"23": fex, "24": tool}) + self.assertEqual(auto, {"23": fex, "24": tool}) + + def test_explicit_linux_runtime_and_fex_selections_survive_default_maintenance(self): + tool, fex = self.COMPAT["TOOL"], self.COMPAT["FEX_TOOL"] + changes, auto = self.COMPAT["plan_mapping"]( + {"0": tool, "20": "steamlinuxruntime_arm64", "21": fex}, + ["20", "21"], [tool], tool, {}, {"20": None, "21": fex}, ["20", "21"]) + self.assertEqual(changes, {}) + self.assertEqual(auto, {}) + + def test_native_arm64_default_stays_unmapped_and_old_auto_proton_is_cleared(self): + tool = self.COMPAT["TOOL"] + changes, auto = self.COMPAT["plan_mapping"]( + {"0": tool, "20": tool}, ["20"], [tool], tool, {"20": tool}, {"20": None}, ["20"]) + self.assertEqual(changes, {"20": None}) + self.assertEqual(auto, {}) + + changes, auto = self.COMPAT["plan_mapping"]( + {"0": tool}, ["20"], [tool], tool, {}, {"20": None}, ["20"]) + self.assertEqual(changes, {}) + self.assertEqual(auto, {}) def test_the_tool_files(self): with tempfile.TemporaryDirectory() as tmp: diff --git a/tools/tests/test_droiddeckctl.py b/tools/tests/test_droiddeckctl.py index 22330ded0a..f6d29030a5 100644 --- a/tools/tests/test_droiddeckctl.py +++ b/tools/tests/test_droiddeckctl.py @@ -12,6 +12,7 @@ import sys import tempfile import textwrap import unittest +import unittest.mock TOOLS = Path(__file__).resolve().parents[1] sys.path.insert(0, str(TOOLS)) @@ -28,8 +29,6 @@ def load(name): ctl = load("droiddeckctl") scenario = load("droiddeck-scenario") -# A stand-in for adb: answers the provider's content calls from a JSON config (a list answers -# successive calls), records every invocation, and fakes the few shell commands droiddeckctl uses. FAKE_ADB = textwrap.dedent('''\ #!/usr/bin/env python3 import base64, json, os, sys @@ -58,6 +57,8 @@ FAKE_ADB = textwrap.dedent('''\ print(config.get("dumpsys_display", "")) elif args[:3] == ["shell", "dumpsys", "power"]: print(" mWakefulness=Awake") + elif args[:3] == ["shell", "dumpsys", "SurfaceFlinger"] and "-dump" in args: + print(config.get("timestats", "")) elif args[:2] == ["exec-out", "screencap"]: sys.stdout.buffer.write(b"\\x89PNG fake") with open(config["log"], "a") as log: @@ -80,6 +81,32 @@ DUMPSYS_DISPLAY = textwrap.dedent('''\ ''') +def timestats_record(name, frames, histogram, hz): + bins = " ".join(f"{ms}ms={histogram.get(ms, 0)}" for ms in (8, 16, 17, 25, 33, 50)) + return (f"displayRefreshRate = {hz} fps\nrenderRate = {hz} fps\nuid = 10479\nlayerName = {name}\n" + f"packageName = \ntotalFrames = {frames}\ndroppedFrames = 0\n" + f"present2present histogram is as below:\n{bins}\nlatch2present histogram is as below:\n8ms={frames}\n") + + +# A capture where the panel went from 60 to 120 Hz: the game layer is split in two records. The +# activity's own window and an unrelated app draw too, and must not count. +TIMESTATS_SPLIT = "SurfaceFlinger TimeStats:\ntotalFrames = 2000\n" + "".join([ + timestats_record("droiddeck_wayland_game#6110", 900, {16: 700, 33: 199}, 60), + timestats_record("droiddeck_wayland_game#6110", 900, {16: 850, 25: 49}, 120), + timestats_record("com.droiddeck.launcher/com.droiddeck.launcher.SessionActivity#6097", 8, {16: 7}, 60), + timestats_record("f291fb6 SurfaceView[com.droiddeck.launcher/com.droiddeck.launcher.SessionActivity]#6101", + 30, {33: 29}, 60), + timestats_record("StatusBar#106", 1, {}, 60), +]) + +# A build that presents the game on the session's SurfaceView instead of a layer of its own. +TIMESTATS_SURFACEVIEW = "SurfaceFlinger TimeStats:\n" + "".join([ + timestats_record("a1b2c3 SurfaceView[com.droiddeck.launcher/com.droiddeck.launcher.SessionActivity]#77", + 1800, {16: 1796, 33: 3}, 120), + timestats_record("a1b2c3 SurfaceView[com.other.app/com.other.app.Main]#12", 500, {8: 499}, 120), +]) + + def state(phase="READY", focused=None, focusable=()): focus = None if focused is None else {"focusedApp": focused, "focusableApps": list(focusable), "baselayerAppIds": [], "seq": 1, "t": 0} @@ -124,6 +151,25 @@ class DroiddeckctlTest(FakeAdbTest): self.assertEqual("INVALID_REQUEST", caught.exception.code) self.assertFalse(self.calls()) + def test_a_variant_package_is_reached_through_its_own_provider_and_activity(self): + with unittest.mock.patch.dict(os.environ, {"DROIDDECK_PACKAGE": "com.antutu.benchmark.full"}): + variant = load("droiddeckctl") + self.assertEqual("content://com.antutu.benchmark.full.agent", variant.AUTHORITY) + with self.assertRaises(variant.ControlError): # the fake adb does not answer `am start` + variant.start_agent_activity(str(self.adb), "fake-1", {"mode": "steam"}) + started = [e["args"] for e in self.calls() if e["args"][:3] == ["shell", "am", "start"]] + self.assertIn("com.antutu.benchmark.full/com.droiddeck.launcher.agent.AgentStartActivity", started[0]) + + def test_a_malformed_package_is_refused_before_adb(self): + with unittest.mock.patch.dict(os.environ, {"DROIDDECK_PACKAGE": "com.example;reboot"}): + variant = load("droiddeckctl") + out = io.StringIO() + with contextlib.redirect_stdout(out), contextlib.redirect_stderr(io.StringIO()): + code = variant.main(["--adb", str(self.adb), "--serial", "fake-1", "state"]) + self.assertEqual(2, code) + self.assertEqual("INVALID_REQUEST", json.loads(out.getvalue())["error"]["code"]) + self.assertFalse(self.calls()) + def test_state_passes_through_with_the_serial(self): self.configure({"state": state()}) code, out = self.run_ctl("state") @@ -136,7 +182,6 @@ class DroiddeckctlTest(FakeAdbTest): "launch": {"ok": True, "command": "launch", "appId": "489830"}, "state": [state(focused=769, focusable=[769]), state(focused=489830, focusable=[769])], }) - # Focus alone is not enough: the game must also be in the list Steam orders from. code, out = self.run_ctl("launch", "489830", "--wait", "--timeout", "1") self.assertEqual(5, code) self.assertEqual("TIMEOUT", out["error"]["code"]) @@ -193,7 +238,7 @@ class DroiddeckctlTest(FakeAdbTest): code, out = self.run_ctl("run", "/usr/bin/sh", "--", "-c", "true") self.assertEqual(7, code) self.assertEqual("AGENT_COMMANDS_DISABLED", out["error"]["code"]) - self.assertIn("Debugging tools", out["error"]["message"]) + self.assertIn("Setup > Diagnostics > Debugging tools", out["error"]["message"]) self.assertEqual(["access"], [c.get("method") for c in self.calls()]) def test_override_checks_names_before_pushing_any_file(self): @@ -236,6 +281,99 @@ class DroiddeckctlTest(FakeAdbTest): self.assertEqual(2, code) self.assertEqual("NO_SUCH_DISPLAY", out["error"]["code"]) + def test_pacing_sums_split_records_of_the_game_layer_only(self): + summary = ctl.pacing_summary(TIMESTATS_SPLIT, "com.droiddeck.launcher") + self.assertEqual(["droiddeck_wayland_game"], summary["layers"]) + self.assertEqual(1800, summary["frames"]) + self.assertEqual([60, 120], summary["refreshRates"]) + self.assertEqual({"16": 1550, "25": 49, "33": 199}, summary["presentToPresentMs"]) + self.assertEqual(16, summary["cadenceMs"]) + self.assertEqual(248, summary["offCadence"]) + self.assertEqual(13.8, summary["offCadencePercent"]) + + def test_pacing_falls_back_to_the_sessions_surfaceview(self): + summary = ctl.pacing_summary(TIMESTATS_SURFACEVIEW, "com.droiddeck.launcher") + self.assertEqual(1, len(summary["layers"])) + self.assertIn("SurfaceView[com.droiddeck.launcher/", summary["layers"][0]) + self.assertEqual(1800, summary["frames"]) + self.assertEqual(3, summary["offCadence"]) + + def test_pacing_captures_then_turns_timestats_off(self): + self.configure({}, timestats=TIMESTATS_SURFACEVIEW) + with unittest.mock.patch.object(ctl.time, "sleep"): + code, out = self.run_ctl("pacing", "--seconds", "1") + self.assertEqual(0, code) + self.assertEqual("pacing", out["command"]) + self.assertIn("fpsOnScreen", out) + sf = [c["args"][3:] for c in self.calls() if c["args"][:3] == ["shell", "dumpsys", "SurfaceFlinger"]] + self.assertEqual([["--timestats", "-clear", "-enable"], ["--timestats", "-dump"], ["--timestats", "-disable"]], sf) + + def test_pacing_without_a_session_on_screen_exits_4(self): + self.configure({}, timestats="SurfaceFlinger TimeStats:\n" + timestats_record("StatusBar#1", 3, {16: 2}, 60)) + with unittest.mock.patch.object(ctl.time, "sleep"): + code, out = self.run_ctl("pacing", "--seconds", "1") + self.assertEqual(4, code) + self.assertEqual("NO_FRAMES", out["error"]["code"]) + + def test_pacing_counts_both_buckets_of_one_cadence_and_only_the_chosen_layers_rates(self): + text = "SurfaceFlinger TimeStats:\n" + "".join([ + timestats_record("droiddeck_wayland_game#7", 910, {16: 450, 17: 450, 33: 10}, 60), + timestats_record("StatusBar#106", 4, {8: 3}, 90), + ]) + summary = ctl.pacing_summary(text, "com.droiddeck.launcher") + self.assertEqual(10, summary["offCadence"]) + self.assertEqual([60], summary["refreshRates"]) + + def test_pacing_skips_a_game_layer_with_no_frames_for_the_surfaceview(self): + text = "SurfaceFlinger TimeStats:\n" + "".join([ + timestats_record("droiddeck_wayland_game#7", 0, {}, 120), + timestats_record("a1 SurfaceView[com.droiddeck.launcher/com.droiddeck.launcher.SessionActivity]#8", 600, {16: 598, 33: 1}, 120), + ]) + summary = ctl.pacing_summary(text, "com.droiddeck.launcher") + self.assertEqual(600, summary["frames"]) + self.assertIn("SurfaceView[com.droiddeck.launcher/", summary["layers"][0]) + + def test_pacing_with_a_layer_that_drew_no_frames_exits_4(self): + self.configure({}, timestats="SurfaceFlinger TimeStats:\n" + timestats_record("droiddeck_wayland_game#7", 0, {}, 120)) + with unittest.mock.patch.object(ctl.time, "sleep"): + code, out = self.run_ctl("pacing", "--seconds", "1") + self.assertEqual(4, code) + self.assertEqual("NO_FRAMES", out["error"]["code"]) + + def test_pacing_turns_timestats_off_when_the_dump_fails(self): + calls = [] + + def adb(_adb, _serial, *args, timeout=30): + calls.append(args[3:]) + if "-dump" in args: + raise ctl.ControlError("timed out", "ADB_FAILED") + return ctl.subprocess.CompletedProcess(args, 0, b"", b"") + + with unittest.mock.patch.object(ctl, "run_adb", adb), unittest.mock.patch.object(ctl.time, "sleep"): + with self.assertRaises(ctl.ControlError) as caught: + ctl.pacing("adb", "fake-1", 1) + self.assertEqual("PACING_FAILED", caught.exception.code) + self.assertEqual(("--timestats", "-disable"), calls[-1]) + + def test_pacing_fails_when_timestats_cannot_be_turned_off(self): + def adb(_adb, _serial, *args, timeout=30): + return ctl.subprocess.CompletedProcess(args, 1 if "-disable" in args else 0, b"", b"") + + with unittest.mock.patch.object(ctl, "run_adb", adb), unittest.mock.patch.object(ctl.time, "sleep"): + with self.assertRaises(ctl.ControlError) as caught: + ctl.pacing("adb", "fake-1", 1) + self.assertEqual("PACING_FAILED", caught.exception.code) + self.assertIn("timestats off", str(caught.exception)) + + def test_pacing_maps_an_adb_failure_while_enabling_to_pacing_failed(self): + def adb(*_args, **_kwargs): + raise ctl.ControlError("adb vanished", "ADB_FAILED") + + with unittest.mock.patch.object(ctl, "run_adb", adb): + with self.assertRaises(ctl.ControlError) as caught: + ctl.pacing("adb", "fake-1", 1) + self.assertEqual("PACING_FAILED", caught.exception.code) + def test_input_requests(self): self.configure({"input": {"ok": True, "command": "input"}}) self.run_ctl("input", "tap", "0.5", "0.25", "--space", "fraction") @@ -333,7 +471,7 @@ class ScenarioTest(FakeAdbTest): "steps": [["state"], {"assert": "session.focus.focusedApp", "equals": 489830}]}) code, report = self.run_scenario(path) self.assertEqual(1, code) - self.assertEqual(1, len(report["runs"])) # stops at the first failure without --keep-going + self.assertEqual(1, len(report["runs"])) self.assertIn("is 769", report["runs"][0]["error"]) evidence = json.loads((Path(report["runs"][0]["folder"]) / "evidence.json").read_text()) self.assertEqual(769, evidence["focus"]["focusedApp"]) diff --git a/tools/tests/test_droiddeckctl_xr.py b/tools/tests/test_droiddeckctl_xr.py new file mode 100644 index 0000000000..f1b314f7bf --- /dev/null +++ b/tools/tests/test_droiddeckctl_xr.py @@ -0,0 +1,119 @@ +import importlib.machinery +import importlib.util +import json +import gzip +from pathlib import Path +import struct +import subprocess +import sys +import tempfile +import unittest +from unittest.mock import patch +import zlib + +TOOLS = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(TOOLS)) +loader = importlib.machinery.SourceFileLoader('ctl_xr', str(TOOLS / 'droiddeckctl')) +spec = importlib.util.spec_from_loader(loader.name, loader) +ctl = importlib.util.module_from_spec(spec) +loader.exec_module(ctl) + + +class XrCaptureTest(unittest.TestCase): + def test_png_keeps_rgb_rows_and_dimensions(self): + pixels = bytes([255, 0, 0, 0, 255, 0, 0, 0, 255, 255, 255, 255]) + png = ctl.xr_ppm_to_png(b'P6\n2 2\n255\n' + pixels) + self.assertEqual(png[:8], b'\x89PNG\r\n\x1a\n') + self.assertEqual(struct.unpack('>II', png[16:24]), (2, 2)) + position = png.index(b'IDAT') + size = struct.unpack('>I', png[position - 4:position])[0] + self.assertEqual(zlib.decompress(png[position + 4:position + 4 + size]), + b'\0' + pixels[:6] + b'\0' + pixels[6:]) + + def test_incomplete_or_invalid_images_are_rejected(self): + for data in (b'P6\n2 2\n255\nabc', b'P6\n0 1\n255\n', b'P6\n999999 1\n255\n', b'junk'): + with self.subTest(data=data), self.assertRaises(ctl.ControlError): + ctl.xr_ppm_to_png(data) + + def test_linear_source_and_display_eye_have_distinct_png_transfer_tags(self): + image = b'P6\n1 1\n255\n\x37\x37\x37' + self.assertIn(b'gAMA' + struct.pack('>I', 100000), ctl.xr_ppm_to_png(image, linear=True)) + self.assertIn(b'sRGB\0', ctl.xr_ppm_to_png(image)) + + def capture(self, root, failed=False, replaced=False, no_response=False, source=False, truncated=False): + calls = [] + token = None + reads = 0 + def adb(_adb, _serial, *args, **kwargs): + nonlocal token, reads + calls.append(args) + stdout = b'' + if args[0] == 'push': + token = Path(args[1]).read_text() + if args[:2] == ('shell', 'cat'): + reads += 1 + stdout = json.dumps({'id': ('old' if reads == 1 or no_response or (replaced and reads > 2) else token), + 'ok': not failed, 'validLayer': not failed, 'sourceImage': source}).encode() + if args[0] == 'exec-out': + stdout = gzip.compress(b'P6\n1 1\n255\n\x12\x34\x56') + if truncated: + stdout = stdout[:-5] + return subprocess.CompletedProcess(args, 0, stdout, b'') + with patch.object(ctl, 'run_adb', side_effect=adb), patch.object(ctl.time, 'sleep'): + result = ctl.xr_capture('adb', 'quest', root, 0.01 if no_response else 2) + return result, calls + + def test_stale_response_is_ignored_and_matching_pair_is_published(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) / 'capture' + result, calls = self.capture(root) + self.assertTrue(result['ok']) + self.assertEqual((root / 'left.png').read_bytes(), (root / 'right.png').read_bytes()) + self.assertEqual(len([c for c in calls if c[:2] == ('shell', 'cat')]), 3) + self.assertTrue((root / 'capture.json').is_file()) + + def test_invalid_layer_replaced_capture_and_timeout_publish_no_images(self): + for flags in ({'failed': True}, {'replaced': True}, {'no_response': True}, {'truncated': True}): + with self.subTest(flags=flags), tempfile.TemporaryDirectory() as directory: + root = Path(directory) / 'capture' + with self.assertRaises(ctl.ControlError): + self.capture(root, **flags) + self.assertFalse(root.exists()) + + def test_source_capture_is_pulled_when_supported_by_the_headset(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) / 'capture' + result, calls = self.capture(root, source=True) + self.assertEqual(result['source'], str((root / 'source.png').resolve())) + self.assertEqual(len([c for c in calls if c[0] == 'exec-out']), 3) + + def test_output_creation_and_write_failures_are_file_errors(self): + for operation in ('mkdir', 'write_bytes'): + with self.subTest(operation=operation), tempfile.TemporaryDirectory() as directory: + with patch.object(Path, operation, side_effect=PermissionError('output denied')): + with self.assertRaises(ctl.ControlError) as caught: + self.capture(Path(directory) / 'capture') + self.assertEqual(caught.exception.code, 'FILE_IO') + self.assertEqual(ctl.exit_code(caught.exception), 6) + + def test_stalled_metadata_read_uses_capture_deadline_and_reports_timeout(self): + calls = [] + def adb(_adb, _serial, *args, **kwargs): + calls.append((args, kwargs)) + if args[:2] == ('shell', 'cat'): + self.assertGreater(kwargs['timeout'], 0) + self.assertLessEqual(kwargs['timeout'], 0.1) + try: + raise subprocess.TimeoutExpired('adb', kwargs['timeout']) + except subprocess.TimeoutExpired as cause: + raise ctl.ControlError('metadata stalled', 'ADB_FAILED') from cause + return subprocess.CompletedProcess(args, 0, b'', b'') + with tempfile.TemporaryDirectory() as directory, patch.object(ctl, 'run_adb', side_effect=adb): + with self.assertRaises(ctl.ControlError) as caught: + ctl.xr_capture('adb', 'quest', Path(directory) / 'capture', 0.1) + self.assertEqual(caught.exception.code, 'TIMEOUT') + self.assertTrue(any(args[:3] == ('shell', 'rm', '-f') for args, _ in calls)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_effects_source_cache.py b/tools/tests/test_effects_source_cache.py new file mode 100644 index 0000000000..d42045b1cf --- /dev/null +++ b/tools/tests/test_effects_source_cache.py @@ -0,0 +1,62 @@ +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + + +REPO = Path(__file__).resolve().parents[2] + + +class EffectsSourceCacheTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + compiler = shutil.which(os.environ.get('CC', 'cc')) + if compiler is None: + raise unittest.SkipTest('A host C compiler is required for the Vulkan cache test') + candidates = [Path('/usr/include/vulkan'), Path('/opt/homebrew/include/vulkan')] + for name in ('ANDROID_NDK_HOME', 'ANDROID_NDK_ROOT', 'NDK_HOME'): + if os.environ.get(name): + candidates.extend(Path(os.environ[name]).glob('toolchains/llvm/prebuilt/*/sysroot/usr/include/vulkan')) + for sdk in {Path(os.environ.get('ANDROID_HOME', '/nonexistent')), + Path(os.environ.get('ANDROID_SDK_ROOT', '/nonexistent')), + Path.home() / 'Library/Android/sdk', Path.home() / 'Android/Sdk'}: + candidates.extend(sdk.glob('ndk/*/toolchains/llvm/prebuilt/*/sysroot/usr/include/vulkan')) + headers = next((p for p in candidates if (p / 'vulkan.h').is_file()), None) + if headers is None: + raise unittest.SkipTest('Vulkan headers from the Android NDK or system SDK are required') + cls.temp = tempfile.TemporaryDirectory(prefix='droiddeck-effects-cache-') + cls.addClassCleanup(cls.temp.cleanup) + folder = Path(cls.temp.name) + shutil.copytree(headers, folder / 'include/vulkan', ignore=shutil.ignore_patterns('*.hpp')) + if (headers.parent / 'vk_video').is_dir(): + shutil.copytree(headers.parent / 'vk_video', folder / 'include/vk_video') + cls.binary = folder / 'cache-test' + build = subprocess.run([compiler, '-std=c11', '-pthread', '-I' + str(folder / 'include'), + '-I' + str(REPO / 'app/src/main/cpp/waylandcomp/src'), + '-I' + str(REPO / 'app/src/main/cpp/shaders'), + str(REPO / 'tools/tests/effects_source_cache_harness.c'), + '-o', str(cls.binary)], capture_output=True, text=True) + if build.returncode: + raise RuntimeError(build.stderr) + + def check_cache(self, case): + result = subprocess.run([str(self.binary), case], check=True, capture_output=True, text=True) + self.assertEqual('PASS', result.stdout.strip()) + + def test_recycled_image_handle_gets_a_new_view_and_descriptor(self): + self.check_cache('recycled') + + def test_unrelated_and_null_images_preserve_the_current_view(self): + self.check_cache('unrelated') + + def test_repeated_owner_invalidation_does_not_double_free(self): + self.check_cache('repeated') + + def test_resize_replaces_the_cached_view_and_descriptor(self): + self.check_cache('resize') + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_esync_packs.py b/tools/tests/test_esync_packs.py index a793f1bee7..e836eaad11 100644 --- a/tools/tests/test_esync_packs.py +++ b/tools/tests/test_esync_packs.py @@ -746,6 +746,16 @@ class SelectTest(SyncTestCase): self.assertFalse((root / "wanted.tsv").exists()) self.assertFalse((root / "dist").exists()) + def test_droiddeck_proton_has_esync_built_in(self): + root = self.store() + tool = make_tool(self.tools, "DroidDeck-Proton 11-7.5", "1791000000 DroidDeck-Proton-11-7.5", builtin=True, ge=True, fsync=True) + command, env, said = self.select(tool, self.env()) + self.assertEqual(command[0], str(tool / "proton")) + self.assertNotIn("BL_SYNC_PACK", env) + self.assertEqual(said, "droiddeck-esync: DroidDeck-Proton 11-7.5 has esync built in\n") + self.assertFalse((root / "wanted.tsv").exists()) + self.assertFalse((root / "dist").exists()) + def test_wanted_rows_are_deduplicated(self): root = self.store() tool = make_tool(self.tools, "GE-Proton11-7", GE_LINE, ge=True) @@ -906,6 +916,15 @@ class ReconcileTest(SyncTestCase): self.assertTrue(self.dist_of("ge-GE-Proton11-7-r1", ge).is_dir()) self.assertIn("ge-GE-Proton11-7-r1", (root / "tools.tsv").read_text()) + def test_droiddeck_proton_is_scanned_but_our_own_tools_are_not(self): + steam = self.tmp / "steam" + tools = steam / "compatibilitytools.d" + ours = make_tool(tools, "DroidDeck-Proton 11-7.5", "1791000000 DroidDeck-Proton-11-7.5", salt=b"dd", builtin=True, ge=True) + make_tool(tools, "droiddeck-proton-arm64", salt=b"own") + make_tool(tools, "droiddeck-proton-11-arm64", salt=b"own11") + with mock.patch.dict(GLOBALS, {"SD_LIBRARY": str(self.tmp / "sd")}): + self.assertEqual(SYNC["find_tools"](str(steam)), [str(ours)]) + def test_steam_compatibility_reports_sync(self): steam = self.tmp / "steam" make_tool(steam / "steamapps/common", "Proton Experimental (ARM64)") diff --git a/tools/tests/test_fakeinput_ioctl.py b/tools/tests/test_fakeinput_ioctl.py new file mode 100644 index 0000000000..0eab191620 --- /dev/null +++ b/tools/tests/test_fakeinput_ioctl.py @@ -0,0 +1,84 @@ +import os +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import unittest + +SOURCE = Path(__file__).resolve().parents[2] / "app/src/main/cpp/fakeinput_steam.cpp" + +PROGRAM = r""" +#include <assert.h> +#include <errno.h> +#include <stdarg.h> +#include <sys/ioctl.h> +#include <termios.h> +#include <unistd.h> + +#ifdef BACKEND +int ioctl(int fd, unsigned long request, ...) { + va_list ap; + va_start(ap, request); + int *value = va_arg(ap, int *); + va_end(ap); + assert(fd == -1 && request == 0x12345678 && value); + *value = 0x51; + errno = EACCES; + return -1; +} +#else +int main(int argc, char **argv) { + if (argc > 1) { + int value = 0; + assert(ioctl(-1, 0x12345678, &value) == -1); + assert(value == 0x51 && errno == EACCES); + } else { + int fds[2]; + assert(pipe(fds) == 0); + struct termios term; + assert(ioctl(fds[0], TCGETS, &term) == -1 && errno == ENOTTY); + close(fds[0]); + close(fds[1]); + } + return 0; +} +#endif +""" + + +@unittest.skipUnless(sys.platform == "linux" and shutil.which("gcc") and shutil.which("g++"), + "needs Linux, gcc and g++") +class FakeinputIoctlTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.tmp = tempfile.TemporaryDirectory() + cls.addClassCleanup(cls.tmp.cleanup) + cls.path = Path(cls.tmp.name) + source = cls.path / "program.c" + source.write_text(PROGRAM) + subprocess.run(["gcc", "-o", str(cls.path / "program"), str(source)], check=True) + subprocess.run(["gcc", "-shared", "-fPIC", "-DBACKEND", "-o", + str(cls.path / "backend.so"), str(source)], check=True) + subprocess.run(["g++", "-shared", "-fPIC", "-O2", "-Wno-attributes", "-pthread", + "-std=c++17", "-static-libstdc++", "-static-libgcc", + "-Wl,--exclude-libs,ALL", "-o", str(cls.path / "libfakeinput.so"), + str(SOURCE), "-ldl"], check=True) + + def run_program(self, backend=False): + preload = str(self.path / "libfakeinput.so") + args = [str(self.path / "program")] + if backend: + preload += ":" + str(self.path / "backend.so") + args.append("backend") + subprocess.run(args, env=dict(os.environ, LD_PRELOAD=preload), check=True, timeout=10) + + def test_later_interposer_receives_arguments_and_returns_errno(self): + self.run_program(backend=True) + + def test_libc_passthrough_retains_kernel_error(self): + self.run_program() + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_fakeinput_ring.py b/tools/tests/test_fakeinput_ring.py new file mode 100644 index 0000000000..3c87bd11e2 --- /dev/null +++ b/tools/tests/test_fakeinput_ring.py @@ -0,0 +1,144 @@ +import os +from pathlib import Path +import shutil +import struct +import subprocess +import sys +import tempfile +import unittest + +SOURCE = Path(__file__).resolve().parents[2] / "app/src/main/cpp/fakeinput_steam.cpp" +RING_MAGIC = 0x46494252 +DESCRIPTION_MAGIC = 0x46495544 +HEADER = 64 +EVENT = 24 +CAPACITY = 4096 +DESCRIPTION = 1824 +READER = r""" +#include <fcntl.h> +#include <linux/input.h> +#include <stdio.h> +#include <unistd.h> + +int main(void) +{ + struct input_event events[64]; + int fd = open("/dev/input/event16", O_RDONLY | O_NONBLOCK); + if (fd < 0) { + perror("open"); + return 1; + } + while (read(fd, events, sizeof(events)) > 0) + ; + puts("ready"); + fflush(stdout); + char go; + if (read(0, &go, 1) != 1) + return 1; + ssize_t got = read(fd, events, sizeof(events)); + for (ssize_t i = 0; i < got / (ssize_t)sizeof(events[0]); i++) + printf("%ld.%06ld %u %u %d\n", (long)events[i].time.tv_sec, (long)events[i].time.tv_usec, events[i].type, + events[i].code, events[i].value); + return got > 0 ? 0 : 1; +} +""" +PROBE = r""" +#include <errno.h> +#include <fcntl.h> +#include <linux/input.h> +#include <linux/joystick.h> +#include <stdio.h> +#include <sys/ioctl.h> + +int main(void) +{ + char name[128] = ""; + struct input_id id = {0}; + int fd = open("/dev/input/event16", O_RDONLY | O_NONBLOCK); + if (fd < 0) + return 1; + int joydev = ioctl(fd, JSIOCGNAME(sizeof(name)), name); + printf("JSIOCGNAME %d %s\n", joydev, joydev < 0 && errno == EINVAL ? "EINVAL" : name); + if (ioctl(fd, EVIOCGID, &id) < 0 || ioctl(fd, EVIOCGNAME(sizeof(name)), name) < 0) + return 1; + printf("%04x:%04x %s\n", id.vendor, id.product, name); + return 0; +} +""" + + +def can_build(bits): + with tempfile.TemporaryDirectory() as tmp: + probe = Path(tmp) / "probe.cpp" + probe.write_text("#include <string>\nint main() { return std::string().size(); }\n") + return subprocess.run(["g++", bits, "-static-libstdc++", "-o", str(Path(tmp) / "probe"), str(probe)], + capture_output=True).returncode == 0 + + +@unittest.skipUnless(sys.platform == "linux" and os.uname().machine == "x86_64" and shutil.which("g++") + and shutil.which("gcc"), "needs gcc and g++ on an x86-64 Linux host") +class FakeinputRingTest(unittest.TestCase): + def setUp(self): + self.tmp = Path(tempfile.mkdtemp()) + self.addCleanup(shutil.rmtree, self.tmp, True) + + def ring(self): + hooks = self.tmp / "hooks" + hooks.mkdir() + (hooks / "event16").touch() + ring = bytearray(HEADER + CAPACITY * EVENT + DESCRIPTION) + struct.pack_into("<IIIIQQQ", ring, 0, RING_MAGIC, 2, EVENT, CAPACITY, 5, 0, 0) + struct.pack_into("<IiHHHHI80s", ring, HEADER + CAPACITY * EVENT, DESCRIPTION_MAGIC, os.getpid(), + 3, 0x28de, 0x11ff, 1, 16, b"Microsoft X-Box 360 pad 0") + path = hooks / ".uinput-event16" + path.write_bytes(bytes(ring)) + return hooks, path + + def build(self, bits, program, name): + if not can_build(bits): + self.skipTest("no %s C++ toolchain" % bits) + library = self.tmp / ("libfakeinput%s.so" % bits) + subprocess.run(["g++", bits, "-shared", "-fPIC", "-O2", "-Wno-attributes", "-pthread", "-std=c++17", + "-static-libstdc++", "-static-libgcc", "-Wl,--exclude-libs,ALL", "-o", str(library), + str(SOURCE), "-ldl"], check=True, capture_output=True) + binary = self.tmp / (name + bits) + (self.tmp / (name + ".c")).write_text(program) + subprocess.run(["gcc", bits, "-o", str(binary), str(self.tmp / (name + ".c"))], check=True) + return library, binary + + def read_through(self, bits): + library, reader = self.build(bits, READER, "reader") + hooks, path = self.ring() + env = dict(os.environ, LD_PRELOAD=str(library), FAKE_EVDEV_DIR=str(hooks)) + process = subprocess.Popen([str(reader)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, env=env, text=True) + self.addCleanup(process.kill) + self.assertEqual(process.stdout.readline(), "ready\n") + with open(path, "r+b") as ring: + for i, (kind, code, value) in enumerate(((1, 304, 1), (3, 1, -32768), (0, 0, 0))): + ring.seek(HEADER + (5 + i) * EVENT) + ring.write(struct.pack("<qqHHi", 1700000000 + i, 250000, kind, code, value)) + ring.seek(16) + ring.write(struct.pack("<Q", 8)) + output, _ = process.communicate("g", timeout=10) + self.assertEqual(process.returncode, 0) + return output + + def test_a_32_bit_guest_reads_the_64_bit_ring(self): + self.assertEqual(self.read_through("-m32"), + "1700000000.250000 1 304 1\n1700000001.250000 3 1 -32768\n1700000002.250000 0 0 0\n") + + def test_a_64_bit_guest_reads_the_same_ring(self): + self.assertEqual(self.read_through("-m64"), + "1700000000.250000 1 304 1\n1700000001.250000 3 1 -32768\n1700000002.250000 0 0 0\n") + + def test_an_event_node_rejects_joydev_requests_so_sdl_reads_its_id(self): + library, probe = self.build("-m64", PROBE, "probe") + hooks, _ = self.ring() + run = subprocess.run([str(probe)], capture_output=True, text=True, timeout=10, + env=dict(os.environ, LD_PRELOAD=str(library), FAKE_EVDEV_DIR=str(hooks))) + self.assertEqual(run.returncode, 0, run.stderr) + self.assertEqual(run.stdout, "JSIOCGNAME -1 EINVAL\n28de:11ff Microsoft X-Box 360 pad 0\n") + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_fex_install.py b/tools/tests/test_fex_install.py new file mode 100644 index 0000000000..355b540381 --- /dev/null +++ b/tools/tests/test_fex_install.py @@ -0,0 +1,91 @@ +import hashlib +import os +from pathlib import Path +import subprocess +import tempfile +import textwrap +import unittest + +SCRIPT = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/droiddeck-steam-x64" +SOURCE = SCRIPT.read_text() +START = SOURCE.index("fex_install() {") +END = SOURCE.index("\n}\n", START) + 3 +FEX_INSTALL = SOURCE[START:END] + +HARNESS = textwrap.dedent("""\ + set -eu + # The archive comes from PKG; the installed tree loads when INSTALLED_LOADS=1, any staged tree always does. + curl() { local out=; while [ $# -gt 0 ]; do [ "$1" = -o ] && out=$2; shift; done; cp "$PKG" "$out"; } + fex_loads() { case $1 in "$ROOT"/) [ "${INSTALLED_LOADS:-1}" = 1 ] ;; *) true ;; esac; } + """) + + +class FexInstallTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + base = Path(self.temp.name) + self.root = base / "root" + old = self.root / "usr/local" + (old / "bin").mkdir(parents=True) + (old / "bin/FEX").write_text("old FEX\n") + (old / "share/fex-emu").mkdir(parents=True) + (old / "share/fex-emu/.droiddeck-tag").write_text("fex-2610-r5\n") + new = base / "pkg/usr/local" + (new / "bin").mkdir(parents=True) + (new / "bin/FEX").write_text("new FEX\n") + (new / "lib").mkdir() + (new / "lib/libxxhash.so.0").write_text("lib\n") + self.pkg = base / "fex.tzst" + subprocess.run(f"tar -C '{base / 'pkg'}' -c . | zstd -q -o '{self.pkg}'", shell=True, check=True) + self.sha = hashlib.sha256(self.pkg.read_bytes()).hexdigest() + + def install(self, installed_loads, sha=None): + body = FEX_INSTALL.replace("local tag=$1 sha=$2 urls=$3 dst=/ ", "local tag=$1 sha=$2 urls=$3 dst=$ROOT/ ") + self.assertNotEqual(body, FEX_INSTALL) + script = HARNESS + body + 'if fex_install fex-2610-r6 "$SHA" u; then echo OK; else echo FAILED; fi\n' + env = dict(os.environ, ROOT=str(self.root), PKG=str(self.pkg), SHA=sha or self.sha, + INSTALLED_LOADS="1" if installed_loads else "0") + out = subprocess.run(["bash", "-c", script], env=env, text=True, capture_output=True, timeout=30) + self.assertEqual(0, out.returncode, out.stderr) + return out.stdout.strip().splitlines()[-1], out.stderr + + def tag(self): + return (self.root / "usr/local/share/fex-emu/.droiddeck-tag").read_text().strip() + + def test_a_build_that_loads_once_installed_replaces_the_old_one(self): + result, _ = self.install(installed_loads=True) + self.assertEqual("OK", result) + self.assertEqual("new FEX\n", (self.root / "usr/local/bin/FEX").read_text()) + self.assertTrue((self.root / "usr/local/lib/libxxhash.so.0").is_file()) + self.assertEqual("fex-2610-r6", self.tag()) + + def test_an_installed_copy_that_does_not_load_puts_the_old_files_back(self): + result, err = self.install(installed_loads=False) + self.assertEqual("FAILED", result) + self.assertIn("putting the previous files back", err) + self.assertEqual("old FEX\n", (self.root / "usr/local/bin/FEX").read_text()) + self.assertFalse((self.root / "usr/local/lib/libxxhash.so.0").exists()) + self.assertEqual("fex-2610-r5", self.tag()) + + def test_a_tag_that_cannot_be_written_puts_the_old_files_back(self): + share = self.root / "usr/local/share/fex-emu" + (share / ".droiddeck-tag").unlink() + share.rmdir() + share.write_text("not a folder\n") + result, err = self.install(installed_loads=True) + self.assertEqual("FAILED", result) + self.assertIn("putting the previous files back", err) + self.assertEqual("old FEX\n", (self.root / "usr/local/bin/FEX").read_text()) + self.assertFalse((self.root / "usr/local/lib/libxxhash.so.0").exists()) + + def test_an_archive_that_does_not_match_installs_nothing(self): + result, err = self.install(installed_loads=True, sha="0" * 64) + self.assertEqual("FAILED", result) + self.assertIn("no source gave the archive", err) + self.assertEqual("old FEX\n", (self.root / "usr/local/bin/FEX").read_text()) + self.assertEqual("fex-2610-r5", self.tag()) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_fex_select.py b/tools/tests/test_fex_select.py new file mode 100644 index 0000000000..94008a1c70 --- /dev/null +++ b/tools/tests/test_fex_select.py @@ -0,0 +1,85 @@ +import os +from pathlib import Path +import subprocess +import tempfile +import textwrap +import unittest + +SCRIPT = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/droiddeck-steam-x64" +SOURCE = SCRIPT.read_text() +START = SOURCE.index("x64_fex() {") +END = SOURCE.index("\n}\n", START) + 3 +X64_FEX = SOURCE[START:END] + +HARNESS = textwrap.dedent("""\ + set -eu + FEX_TAG=fex-2610-r5 FEX_SHA256=builtin FEX_URL=builtin-url + step() { echo "STEP $*"; } + # Installed FEX loads when LOADS=1; a build installs when its tag is in INSTALLABLE. + fex_loads() { [ "${LOADS:-0}" = 1 ]; } + fex_install() { + echo "INSTALL $1 $2 $3" + case " ${INSTALLABLE:-} " in *" $1 "*) echo "$1" > "$ROOT/tag"; : > "$ROOT/FEX"; chmod +x "$ROOT/FEX"; return 0 ;; esac + return 1 + } + """) + + +class FexSelectTest(unittest.TestCase): + def run_select(self, installed=None, loads=False, catalog=None, installable=()): + with tempfile.TemporaryDirectory() as root: + if installed: + Path(root, "tag").write_text(installed + "\n") + fex = Path(root, "FEX") + fex.write_text("") + fex.chmod(0o755) + body = (X64_FEX.replace("/usr/local/share/fex-emu/.droiddeck-tag", "$ROOT/tag") + .replace("/usr/local/bin/FEX", "$ROOT/FEX")) + script = HARNESS + body + 'if x64_fex; then echo "NOW $FEX_NOW|$FEX_FROM"; else echo FAILED; fi\n' + env = dict(os.environ, ROOT=root, LOADS="1" if loads else "0", INSTALLABLE=" ".join(installable)) + env.pop("BL_FEX_TAG", None) + if catalog: + env.update(BL_FEX_TAG=catalog, BL_FEX_SHA256="catsha", BL_FEX_URLS="a b") + out = subprocess.run(["bash", "-c", script], env=env, text=True, capture_output=True, timeout=10) + self.assertEqual(0, out.returncode, out.stderr) + lines = out.stdout.splitlines() + return [l for l in lines if l.startswith("INSTALL")], lines[-1] + + def test_the_catalog_build_already_installed_is_used(self): + installs, now = self.run_select(installed="fex-2610-r6", loads=True, catalog="fex-2610-r6") + self.assertEqual([], installs) + self.assertEqual("NOW fex-2610-r6|catalog", now) + + def test_a_newer_catalog_build_is_installed(self): + installs, now = self.run_select(installed="fex-2610-r5", loads=True, catalog="fex-2610-r6", installable=["fex-2610-r6"]) + self.assertEqual(["INSTALL fex-2610-r6 catsha a b"], installs) + self.assertEqual("NOW fex-2610-r6|catalog", now) + + def test_a_catalog_build_that_does_not_install_keeps_the_working_one(self): + installs, now = self.run_select(installed="fex-2610-r5", loads=True, catalog="fex-2610-r6") + self.assertEqual(["INSTALL fex-2610-r6 catsha a b"], installs) + self.assertEqual("NOW fex-2610-r5|kept; fex-2610-r6 did not install", now) + + def test_without_a_catalog_the_built_in_build_replaces_an_older_one(self): + installs, now = self.run_select(installed="fex-2610-r4", loads=True, installable=["fex-2610-r5"]) + self.assertEqual(["INSTALL fex-2610-r5 builtin builtin-url"], installs) + self.assertEqual("NOW fex-2610-r5|built-in", now) + + def test_an_installed_build_that_does_not_load_is_replaced(self): + installs, now = self.run_select(installed="fex-2610-r6", loads=False, catalog="fex-2610-r6", installable=["fex-2610-r6"]) + self.assertEqual(["INSTALL fex-2610-r6 catsha a b"], installs) + self.assertEqual("NOW fex-2610-r6|catalog", now) + + def test_a_first_install_falls_back_to_the_built_in_build(self): + installs, now = self.run_select(catalog="fex-2610-r6", installable=["fex-2610-r5"]) + self.assertEqual(["INSTALL fex-2610-r6 catsha a b", "INSTALL fex-2610-r5 builtin builtin-url"], installs) + self.assertEqual("NOW fex-2610-r5|built-in", now) + + def test_nothing_usable_fails(self): + installs, now = self.run_select(catalog="fex-2610-r6") + self.assertEqual(2, len(installs)) + self.assertEqual("FAILED", now) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_game_environment.py b/tools/tests/test_game_environment.py index 1fa4cd739a..9c8a98c202 100644 --- a/tools/tests/test_game_environment.py +++ b/tools/tests/test_game_environment.py @@ -1,3 +1,4 @@ +import hashlib import json import os import shutil @@ -25,7 +26,44 @@ def config_text(entries): return '"InstallConfigStore" { "Software" { "Valve" { "Steam" { "CompatToolMapping" { %s } } } } }' % mapping +class ReadConfigMappingTest(unittest.TestCase): + def test_missing_parent_or_unbalanced_vdf_is_not_treated_as_absent_choices(self): + with tempfile.TemporaryDirectory() as tmp: + config = Path(tmp) / "config.vdf" + config.write_text('"InstallConfigStore" { "Software" { "Other" {} } }') + self.assertIsNone(COMPAT["read_config_mapping"](str(config))) + config.write_text('"InstallConfigStore" { "Software" { "Valve" { "Steam" {} }') + self.assertIsNone(COMPAT["read_config_mapping"](str(config))) + + def test_valid_steam_parent_without_compat_mapping_has_no_per_app_choices(self): + with tempfile.TemporaryDirectory() as tmp: + config = Path(tmp) / "config.vdf" + config.write_text('"InstallConfigStore" { "Software" { "Valve" { "Steam" {} } } }') + self.assertEqual(COMPAT["read_config_mapping"](str(config)), {}) + + class GameEnvironmentTest(unittest.TestCase): + def test_directaudio_capture_follows_the_session_microphone_setting(self): + with tempfile.TemporaryDirectory() as tmp: + home = Path(tmp) + probe = home / "probe" + probe.write_text("#!" + sys.executable + "\nimport os\nprint(os.environ.get('BANNER_AUDIO_DIRECT_MIC', 'unset'))\n") + probe.chmod(0o755) + config = home / ".config/droiddeck/game-environment.json" + config.parent.mkdir(parents=True) + for enabled, override, expected in (("1", None, "1"), ("0", "1", "0"), ("1", "0", "0")): + with self.subTest(enabled=enabled, override=override): + profile = {} if override is None else { + "BANNER_AUDIO_DIRECT_MIC": override, "BL_MIC_ENABLED": override, + } + config.write_text(json.dumps({"version": 1, "games": {"42": profile}})) + env = dict(os.environ, HOME=tmp, BL_MIC_ENABLED=enabled, + BANNER_AUDIO_DIRECT_MIC="1", STEAM_COMPAT_DATA_PATH="/compatdata/42") + result = subprocess.run([sys.executable, str(BIN / "droiddeck-game-env"), + str(probe), "waitforexitandrun"], + env=env, text=True, capture_output=True, check=True) + self.assertEqual(result.stdout.strip(), expected) + def test_the_install_script_evaluator_gets_its_scripts_marked_first(self): with tempfile.TemporaryDirectory() as tmp: root = Path(tmp) @@ -52,6 +90,78 @@ class GameEnvironmentTest(unittest.TestCase): self.assertEqual(env["REMOVE"], "inherited") self.assertEqual(MODULE["apply_config"](env, config, "43")["CUSTOM"], "shared") + def test_a_games_wine_sync_choice_also_reaches_its_setup_runs(self): + env = {"BL_SYNC": "1", "BL_SYNC_FALLBACK": "1", "BL_FSYNC_FIRST": "0", "OTHER": "kept"} + config = {"version": 1, "games": {"42": {"BL_SYNC": "0", "BL_FSYNC_FIRST": "1", "PROTON_NO_ESYNC": "1", "FEX_TSOENABLED": "1"}}} + chosen = MODULE["apply_config"](env, MODULE["sync_config"](config, "42"), "42") + self.assertEqual(chosen, {"BL_SYNC": "0", "BL_SYNC_FALLBACK": "1", "BL_FSYNC_FIRST": "1", "PROTON_NO_ESYNC": "1", "OTHER": "kept"}) + + def test_component_profiles_override_general_and_restore_it_for_the_next_game(self): + with tempfile.TemporaryDirectory() as tmp: + root = Path(tmp) + home = root / "home" + component_dir = home / ".local/share/droiddeck-components" + base = root / "proton" + target = base / "files/lib/wine/dxvk/aarch64-windows/d3d11.dll" + leftover = target.with_name("d3d8.dll") + component_dir.mkdir(parents=True) + target.parent.mkdir(parents=True) + (base / "version").write_text("1 build-1\n") + general = root / "general.dll" + game = root / "game.dll" + general.write_text("general") + game.write_text("game") + target.write_text("old") + leftover.write_text("old") + digest = lambda path: hashlib.sha256(path.read_bytes()).hexdigest() + (component_dir / "desired.tsv").write_text( + "*\tproton\tbuild-1\tdxvk\tfiles/lib/wine/dxvk/aarch64-windows/d3d11.dll\t%s\t%s\n" + "42\tproton\tbuild-1\tdxvk\tfiles/lib/wine/dxvk/aarch64-windows/d3d11.dll\t%s\t%s\n" + "42\tproton\tbuild-1\tdxvk\tfiles/lib/wine/dxvk/aarch64-windows/d3d8.dll\t-\t-\n" + % (digest(general), general, digest(game), game) + ) + script = COMPAT["BL_COMPONENTS_SETUP"] + '\nverb=waitforexitandrun; bl_components "$1"\n' + env = dict(os.environ, HOME=str(home), STEAM_COMPAT_DATA_PATH="/steam/compatdata/42") + subprocess.run(["bash", "-c", script, "test", str(base)], env=env, check=True) + self.assertEqual(target.read_text(), "game") + self.assertFalse(leftover.exists()) + + env["STEAM_COMPAT_DATA_PATH"] = "/steam/compatdata/43" + subprocess.run(["bash", "-c", script, "test", str(base)], env=env, check=True) + self.assertEqual(target.read_text(), "general") + + def test_component_scope_matches_environment_scope_for_shortcut_ids(self): + with tempfile.TemporaryDirectory() as tmp: + root = Path(tmp) + component_dir = root / ".local/share/droiddeck-components" + base = root / "proton" + target = base / "files/lib/wine/dxvk/aarch64-windows/d3d11.dll" + component_dir.mkdir(parents=True) + target.parent.mkdir(parents=True) + (base / "version").write_text("1 build-1\n") + rows = [] + for scope in ("*", "42", "4294967295", "2147483648"): + source = root / ("default" if scope == "*" else scope) + source.write_text(scope) + rows.append("%s\tproton\tbuild-1\tdxvk\t%s\t%s\t%s\n" % ( + scope, target.relative_to(base), + hashlib.sha256(source.read_bytes()).hexdigest(), source, + )) + (component_dir / "desired.tsv").write_text("".join(rows)) + script = COMPAT["BL_COMPONENTS_SETUP"] + '\nverb=waitforexitandrun; bl_components "$1"\n' + for value in ( + "42", "00042", "43", "-1", "-0001", "4294967295", "-2147483648", + "2147483648", "-1///", "0", "-0", "000", "-2147483649", "4294967296", + "999999999999999999999999999", "not-an-id", "1+1", "", + ): + with self.subTest(prefix=value): + env = dict(os.environ, HOME=str(root), STEAM_COMPAT_DATA_PATH="/steam/compatdata/" + value) + target.write_text("untouched") + subprocess.run(["bash", "-c", script, "test", str(base)], env=env, check=True, capture_output=True) + scope = MODULE["game_id"](env) + expected = "untouched" if scope is None else scope if scope in {"42", "4294967295", "2147483648"} else "*" + self.assertEqual(target.read_text(), expected) + def test_engine_fixes_follow_the_games_files(self): with tempfile.TemporaryDirectory() as tmp: game = Path(tmp) / "Godot Game" @@ -69,6 +179,25 @@ class GameEnvironmentTest(unittest.TestCase): (other / "Other.exe").touch() self.assertEqual(MODULE["engine_fixes"](str(other / "Other.exe"), []), ({}, [], [])) + def test_arkham_city_gets_full_x87_precision_over_the_preset(self): + with tempfile.TemporaryDirectory() as tmp: + city = Path(tmp) / "Batman Arkham City GOTY/Binaries/Win32" + city.mkdir(parents=True) + for name in ("BatmanAC.exe", "BmLauncher.exe"): + (city / name).touch() + for exe in ("BatmanAC.exe", "BmLauncher.exe"): + env, extra, notes = MODULE["engine_fixes"](str(city / exe), []) + self.assertEqual((env, extra), ({"FEX_X87REDUCEDPRECISION": "0"}, [])) + config = {"version": 1, "shared": {"FEX_X87REDUCEDPRECISION": "1"}} + self.assertEqual(MODULE["apply_config"]({}, config, "200260", env)["FEX_X87REDUCEDPRECISION"], "0") + config["games"] = {"200260": {"FEX_X87REDUCEDPRECISION": "1"}} + self.assertEqual(MODULE["apply_config"]({}, config, "200260", env)["FEX_X87REDUCEDPRECISION"], "1") + asylum = Path(tmp) / "Batman Arkham Asylum GOTY/Binaries" + asylum.mkdir(parents=True) + for name in ("ShippingPC-BmGame.exe", "BmLauncher.exe"): + (asylum / name).touch() + self.assertEqual(MODULE["engine_fixes"](str(asylum / "BmLauncher.exe"), []), ({}, [], [])) + def test_a_new_fix_only_needs_registering(self): with tempfile.TemporaryDirectory() as tmp: (Path(tmp) / "Game.exe").touch() @@ -109,6 +238,22 @@ class GameEnvironmentTest(unittest.TestCase): with self.assertRaises(ValueError): MODULE["apply_config"]({}, {**config, "dxvkConfig": bad}, "42") + def test_game_texture_filtering_overrides_default_without_leaking(self): + default = "d3d9.samplerAnisotropy = 16" + game = "d3d9.samplerAnisotropy = 4" + config = { + "version": 1, + "shared": {}, + "games": {}, + "dxvkConfig": default, + "dxvkConfigGames": {"42": game, "43": ""}, + } + self.assertEqual(MODULE["apply_config"]({}, config, "42")["DXVK_CONFIG"], game) + self.assertNotIn("DXVK_CONFIG", MODULE["apply_config"]({}, config, "43")) + self.assertEqual(MODULE["apply_config"]({}, config, "44")["DXVK_CONFIG"], default) + with self.assertRaises(ValueError): + MODULE["apply_config"]({}, {**config, "dxvkConfigGames": []}, "42") + def test_game_ids_and_probes(self): for prefix in ("", "/compatdata/0", "/compatdata/0-123", "/compatdata/nope", "/compatdata/4294967296"): self.assertIsNone(MODULE["game_id"]({"STEAM_COMPAT_DATA_PATH": prefix})) @@ -257,11 +402,40 @@ class GameEnvironmentTest(unittest.TestCase): self.assertIn('"$here/proton"', (extra / COMPAT["EXTRA_WRAPPER"]).read_text()) self.assertIn("GE-Proton11-7", [entry["name"] for entry in COMPAT["tool_catalog"](str(home), None)]) + def test_droiddeck_proton_is_adopted_and_labelled_like_any_other_extra(self): + with tempfile.TemporaryDirectory() as tmp: + home = Path(tmp) + (home / "label").write_text("Compatible\n") + COMPAT["display_name"].__globals__["LABEL_FILE"] = str(home / "label") + tools = home / "compatibilitytools.d" + extra = tools / "DroidDeck-Proton 11-7.5" + extra.mkdir(parents=True) + (extra / "proton").write_text("") + (extra / "toolmanifest.vdf").write_text('"manifest" { "version" "2" "commandline" "/proton %verb%" "require_tool_appid" "4185400" }') + (extra / "compatibilitytool.vdf").write_text( + '"compatibilitytools" { "compat_tools" { "DroidDeck-Proton-11-7.5" { "install_path" "." ' + '"display_name" "DroidDeck-Proton 11-7.5" "from_oslist" "windows" "to_oslist" "linux" } } }') + COMPAT["build_tool"](str(tools / COMPAT["TOOL"]), None) + protect = COMPAT["adopt_extras"](str(tools)) + self.assertEqual(protect, {"DroidDeck-Proton-11-7.5": "DroidDeck-Proton 11-7.5"}) + compat = (extra / "compatibilitytool.vdf").read_text() + self.assertIn('"DroidDeck-Proton-11-7.5"', compat) + self.assertIn('"display_name" "DroidDeck-Proton 11-7.5 (Compatible)"', compat) + self.assertNotIn("require_tool_appid", (extra / "toolmanifest.vdf").read_text()) + self.assertIn('"$here/proton"', (extra / COMPAT["EXTRA_WRAPPER"]).read_text()) + catalog = COMPAT["tool_catalog"](str(home), None) + self.assertIn({"name": "DroidDeck-Proton-11-7.5", "display": "DroidDeck-Proton 11-7.5 (Compatible)", + "dir": "DroidDeck-Proton 11-7.5", "valve": False}, catalog) + config = home / "config.vdf" + config.write_text(config_text([("0", COMPAT["TOOL"]), ("42", "DroidDeck-Proton-11-7.5")])) + COMPAT["register_default"](str(config), ["42", "43"], protect=protect) + self.assertEqual(mapping_of(config.read_text()), {"0": COMPAT["TOOL"], "42": "DroidDeck-Proton-11-7.5", "43": COMPAT["TOOL"]}) + changes, _ = COMPAT["plan_mapping"]({"0": COMPAT["TOOL"], "42": "DroidDeck-Proton-11-7.5"}, ["42"], [COMPAT["TOOL"]], COMPAT["TOOL"], {}) + self.assertEqual(changes, {"42": COMPAT["TOOL"]}) + def test_both_proton_wrappers_call_environment_launcher(self): for script in (COMPAT["LAUNCHER_SH"], COMPAT["EXTRA_WRAPPER_SH"] % "proton"): subprocess.run(["bash", "-n"], input=script, text=True, check=True) - # Started through bl_run, which execs it - or, for a store game with cloud saves, waits - # for it so droiddeck-store-launch --exited can follow (test_store_launch.CloudHooks). self.assertIn('bl_run ${BL_TASKSET:-} /usr/local/bin/droiddeck-game-env', script) def test_wrappers_preload_the_session_library_before_the_input_shim(self): @@ -303,6 +477,218 @@ class ProtonDefaultTest(unittest.TestCase): self.assertEqual(changes, {"0": "GE-Proton11-7", "10": "GE-Proton11-7", "11": "GE-Proton11-7", "14": "GE-Proton11-7"}) self.assertEqual(auto, {"10": "GE-Proton11-7", "11": "GE-Proton11-7", "14": "GE-Proton11-7"}) + def test_windows_only_titles_still_follow_the_default(self): + changes, auto = COMPAT["plan_mapping"]( + {"0": self.TOOL}, ["42"], self.NAMES, self.TOOL, {}) + self.assertEqual(changes, {"42": self.TOOL}) + self.assertEqual(auto, {"42": self.TOOL}) + + def test_native_arm64_default_clears_only_our_auto_mapping(self): + with tempfile.TemporaryDirectory() as tmp: + config = Path(tmp) / "config.vdf" + config.write_text(config_text([("0", self.TOOL), ("42", self.TOOL)])) + (Path(tmp) / "state.json").write_text(json.dumps({ + "default": self.TOOL, + "auto": {"42": self.TOOL}, + })) + globals_ = COMPAT["register_default"].__globals__ + original_native_targets = globals_["native_targets"] + globals_["native_targets"] = lambda _root, _apps: {"42": None} + try: + COMPAT["register_default"]( + str(config), ["42"], catalog=self.CATALOG, directory=tmp) + first = config.read_bytes() + self.assertEqual(mapping_of(first.decode()), {"0": self.TOOL}) + self.assertEqual(COMPAT["tokenize"](first.decode()), + COMPAT["tokenize"](config_text([("0", self.TOOL)]))) + self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["auto"], {}) + + COMPAT["register_default"]( + str(config), ["42"], catalog=self.CATALOG, directory=tmp) + self.assertEqual(config.read_bytes(), first) + finally: + globals_["native_targets"] = original_native_targets + + def test_saved_native_choice_survives_valve_pick_without_appinfo(self): + app = "452280" + with tempfile.TemporaryDirectory() as tmp: + root = Path(tmp) + steam = root / "Steam" + config = steam / "config/config.vdf" + config.parent.mkdir(parents=True) + (steam / "steamapps").mkdir() + (steam / "steamapps" / ("appmanifest_%s.acf" % app)).write_text("") + config.write_text(config_text([("0", self.TOOL)])) + (root / "state.json").write_text(json.dumps({ + "default": self.TOOL, + "auto": {}, + "native_choices": [app], + })) + + globals_ = COMPAT["register_default"].__globals__ + original_native_targets = globals_["native_targets"] + globals_["native_targets"] = lambda _root, _apps: {} + try: + COMPAT["register_default"]( + str(config), [], catalog=self.CATALOG, directory=tmp, picks=[app]) + self.assertEqual(mapping_of(config.read_text()), {"0": self.TOOL}) + state = json.loads((root / "state.json").read_text()) + self.assertEqual(state["auto"], {}) + self.assertEqual(state["native_choices"], [app]) + finally: + globals_["native_targets"] = original_native_targets + + def test_shortcuts_scanner_keeps_native_choice_for_unrelated_app_list(self): + app, added_shortcut = "452280", "3537741571" + with tempfile.TemporaryDirectory() as tmp: + root = Path(tmp) + steam = root / "Steam" + config = steam / "config/config.vdf" + config.parent.mkdir(parents=True) + (steam / "steamapps").mkdir() + (steam / "steamapps" / ("appmanifest_%s.acf" % app)).write_text("") + config.write_text(config_text([("0", self.TOOL)])) + (root / "state.json").write_text(json.dumps({ + "default": self.TOOL, + "auto": {}, + "native_choices": [app], + })) + + globals_ = COMPAT["register_default"].__globals__ + original_native_targets = globals_["native_targets"] + globals_["native_targets"] = lambda _root, wanted: { + app: COMPAT["NATIVE_CHOICE"] + } if app in wanted else {} + try: + COMPAT["register_default"]( + str(config), [app], catalog=self.CATALOG, directory=tmp) + self.assertEqual(json.loads((root / "state.json").read_text())["native_choices"], [app]) + + COMPAT["register_default"]( + str(config), [added_shortcut], catalog=self.CATALOG, directory=tmp) + state = json.loads((root / "state.json").read_text()) + self.assertEqual(state["native_choices"], [app]) + self.assertEqual(state["auto"], {added_shortcut: self.TOOL}) + self.assertEqual(mapping_of(config.read_text()), { + "0": self.TOOL, + added_shortcut: self.TOOL, + }) + finally: + globals_["native_targets"] = original_native_targets + + def test_factorio_preserves_an_observed_native_choice_despite_ambiguous_metadata(self): + with tempfile.TemporaryDirectory() as tmp: + steam = Path(tmp) / "Steam" + config = steam / "config/config.vdf" + config.parent.mkdir(parents=True) + config.write_text(config_text([("0", self.TOOL)])) + state = {"default": self.TOOL, "auto": {}} + (Path(tmp) / "state.json").write_text(json.dumps(state)) + + globals_ = COMPAT["native_targets"].__globals__ + original_platforms = globals_["appinfo_platforms"] + globals_["appinfo_platforms"] = lambda _path, wanted: { + "427520": ({"linux", "macos", "windows"}, "", "game") + } if "427520" in wanted else {} + try: + native = COMPAT["native_targets"](str(steam), ["427520"]) + self.assertIs(native["427520"], COMPAT["NATIVE_CHOICE"]) + + changes, auto = COMPAT["plan_mapping"]( + {"0": self.TOOL}, ["427520"], self.NAMES, self.TOOL, {}, native) + self.assertEqual(changes, {"427520": self.TOOL}) + self.assertEqual(auto, {"427520": self.TOOL}) + + COMPAT["register_default"]( + str(config), ["427520"], catalog=self.CATALOG, directory=tmp) + self.assertEqual(mapping_of(config.read_text()), {"0": self.TOOL, "427520": self.TOOL}) + + state["auto"] = {"427520": self.TOOL} + (Path(tmp) / "state.json").write_text(json.dumps(state)) + config.write_text(config_text([("0", self.TOOL)])) + COMPAT["register_default"]( + str(config), ["427520"], catalog=self.CATALOG, directory=tmp) + first = config.read_bytes() + self.assertEqual(mapping_of(first.decode()), {"0": self.TOOL}) + self.assertEqual(COMPAT["tokenize"](first.decode()), + COMPAT["tokenize"](config_text([("0", self.TOOL)]))) + self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["auto"], {}) + self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["native_choices"], ["427520"]) + + COMPAT["register_default"]( + str(config), ["427520"], catalog=self.CATALOG, directory=tmp) + self.assertEqual(config.read_bytes(), first) + + config.write_text(config_text([("0", self.TOOL), ("427520", "")])) + COMPAT["register_default"]( + str(config), ["427520"], catalog=self.CATALOG, directory=tmp) + native_choice = config.read_bytes() + self.assertEqual(mapping_of(native_choice.decode()), {"0": self.TOOL, "427520": ""}) + self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["auto"], {}) + self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["native_choices"], ["427520"]) + COMPAT["register_default"]( + str(config), ["427520"], catalog=self.CATALOG, directory=tmp) + self.assertEqual(config.read_bytes(), native_choice) + + for choice in (COMPAT["FEX_TOOL"], COMPAT["TOOL_11"], "GE-Proton11-7"): + config.write_text(config_text([("0", self.TOOL), ("427520", choice)])) + COMPAT["register_default"]( + str(config), ["427520"], catalog=self.CATALOG, directory=tmp) + self.assertEqual(mapping_of(config.read_text()), {"0": self.TOOL, "427520": choice}) + self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["native_choices"], []) + + state = json.loads((Path(tmp) / "state.json").read_text()) + state["native_choices"] = ["427520"] + state["auto"] = {} + (Path(tmp) / "state.json").write_text(json.dumps(state)) + config.write_text(config_text([("0", self.TOOL), ("427520", "proton_experimental")])) + COMPAT["register_default"]( + str(config), ["427520"], catalog=self.CATALOG, directory=tmp) + self.assertEqual(mapping_of(config.read_text()), {"0": self.TOOL, "427520": self.TOOL}) + saved = json.loads((Path(tmp) / "state.json").read_text()) + self.assertEqual(saved["native_choices"], []) + self.assertEqual(saved["auto"], {"427520": self.TOOL}) + finally: + globals_["appinfo_platforms"] = original_platforms + + def test_native_arm64_preserves_a_proton_mapping_without_managed_state(self): + changes, auto = COMPAT["plan_mapping"]( + {"0": self.TOOL, "42": self.TOOL}, ["42"], self.NAMES, self.TOOL, + {"42": self.TOOL}, {"42": None}, managed=()) + self.assertEqual(changes, {}) + self.assertEqual(auto, {}) + + def test_native_arm64_keeps_a_chosen_valve_proton_through_its_wrapper(self): + changes, auto = COMPAT["plan_mapping"]( + {"0": self.TOOL, "42": "proton_experimental"}, ["42"], self.NAMES, + self.TOOL, {}, {"42": None}) + self.assertEqual(changes, {"42": self.TOOL}) + self.assertEqual(auto, {}) + + changes, auto = COMPAT["plan_mapping"]( + {"0": self.TOOL, "42": self.TOOL}, ["42"], self.NAMES, + self.TOOL, {}, {"42": None}) + self.assertEqual(changes, {}) + self.assertEqual(auto, {}) + + def test_native_arm64_keeps_explicit_runtime_fex_and_proton_profiles(self): + fex = COMPAT["FEX_TOOL"] + current = { + "0": self.TOOL, + "42": COMPAT["TOOL_11"], + "43": "GE-Proton11-7", + "44": "steamlinuxruntime_arm64", + "45": fex, + "46": "", + } + changes, auto = COMPAT["plan_mapping"]( + current, ["42", "43", "44", "45", "46"], self.NAMES, self.TOOL, {}, + {app: None for app in ("42", "43", "44", "45", "46")}, + overrides={"46": "GE-Proton11-7"}, + ) + self.assertEqual(changes, {"46": "GE-Proton11-7"}) + self.assertEqual(auto, {}) + def test_titles_following_the_default_move_with_it_and_picks_stay(self): current = {"0": self.TOOL, "10": self.TOOL, "11": "GE-Proton11-7", "12": self.TOOL} auto = {"10": self.TOOL, "11": self.TOOL, "12": self.TOOL} @@ -319,6 +705,57 @@ class ProtonDefaultTest(unittest.TestCase): changes, auto = self.plan({"0": self.TOOL}, [], self.TOOL, {"10": self.TOOL}) self.assertEqual((changes, auto), ({}, {})) + def test_per_game_proton_override_and_inherit_follow_steam_mappings(self): + current = {"0": self.TOOL, "10": self.TOOL, "11": "GE-Proton11-7", "12": self.TOOL} + overrides = {"10": "GE-Proton11-7", "11": None} + changes, auto = COMPAT["plan_mapping"]( + current, ["10", "11", "12"], self.NAMES, COMPAT["TOOL_11"], + {"10": self.TOOL, "12": self.TOOL}, overrides=overrides) + self.assertEqual(changes, {"0": COMPAT["TOOL_11"], "10": "GE-Proton11-7", "11": COMPAT["TOOL_11"], "12": COMPAT["TOOL_11"]}) + self.assertEqual(auto, {"11": COMPAT["TOOL_11"], "12": COMPAT["TOOL_11"]}) + + def test_per_game_requests_resolve_identity_and_defer_a_new_live_tool(self): + requests = { + "10": {"valve": False, "dir": "GE-Proton11-7"}, + "11": None, + "12": {"valve": True, "dir": "Proton 11.0 (ARM64)"}, + "0": None, + } + self.assertEqual( + COMPAT["requested_games"](requests, self.CATALOG), + {"10": "GE-Proton11-7", "11": None, "12": COMPAT["TOOL_11"]}, + ) + self.assertEqual( + COMPAT["requested_games"](requests, self.CATALOG, [self.TOOL, COMPAT["TOOL_11"]]), + {"10": COMPAT["DEFERRED_GAME_TOOL"], "11": None, "12": COMPAT["TOOL_11"]}, + ) + + def test_missing_per_game_proton_is_preserved_during_default_registration(self): + with tempfile.TemporaryDirectory() as tmp: + config = Path(tmp) / "config.vdf" + config.write_text(config_text([ + ("0", self.TOOL), + ("10", "GE-Proton9-1"), + ("11", self.TOOL), + ])) + (Path(tmp) / "games.json").write_text(json.dumps({ + "version": 1, + "games": { + "10": {"valve": False, "dir": "GE-Proton9-1"}, + }, + })) + + COMPAT["register_default"]( + str(config), ["10", "11"], default=COMPAT["TOOL_11"], + catalog=self.CATALOG, directory=tmp, + ) + + self.assertEqual(mapping_of(config.read_text()), { + "0": COMPAT["TOOL_11"], + "10": "GE-Proton9-1", + "11": COMPAT["TOOL_11"], + }) + def test_the_last_side_to_change_wins(self): state = {"default": self.TOOL, "applied": 5} default, state = COMPAT["choose_default"]("GE-Proton11-7", state, {"seq": 5, "dir": "Proton 11.0 (ARM64)", "valve": True}, self.CATALOG, now=100) @@ -396,8 +833,6 @@ class DirectAudioPrefixTest(unittest.TestCase): wine = self.tool / "files/bin-arm64/wine" wine.write_text("#!/bin/sh\necho wine-11.0-4c8f2e1 '(Staging)'\n") wine.chmod(0o755) - # Proton's own winepulse.so names the audio interface: the classic table never imports - # PsCreateSystemThread, the system-thread one (Proton-CachyOS) always does. (self.tool / "files/lib/wine/aarch64-unix").mkdir(parents=True) self.winepulse = self.tool / "files/lib/wine/aarch64-unix/winepulse.so" self.winepulse.write_bytes(b"\x7fELF classic wine 11 pulse driver") @@ -414,12 +849,12 @@ class DirectAudioPrefixTest(unittest.TestCase): (self.windows / folder).mkdir(parents=True) self.reg = self.compat / "pfx/user.reg" - def run_setup(self): - script = COMPAT["BL_DIRECTAUDIO_SETUP"] + '\nbl_directaudio "$1"\necho "WINEDLLPATH=$WINEDLLPATH"\necho "WINE_AUDIO_DRIVER=${WINE_AUDIO_DRIVER:-}"\n' + def run_setup(self, verb="waitforexitandrun"): + script = COMPAT["BL_DIRECTAUDIO_SETUP"] + '\nverb=$2\nbl_directaudio "$1"\necho "WINEDLLPATH=$WINEDLLPATH"\necho "WINE_AUDIO_DRIVER=${WINE_AUDIO_DRIVER:-}"\n' env = dict(os.environ, BL_DIRECTAUDIO=str(self.sets), STEAM_COMPAT_DATA_PATH=str(self.compat)) env.pop("WINEDLLPATH", None) env.pop("WINE_AUDIO_DRIVER", None) - return subprocess.run(["bash", "-c", script, "bash", str(self.tool)], env=env, capture_output=True, text=True, check=True) + return subprocess.run(["bash", "-c", script, "bash", str(self.tool), verb], env=env, capture_output=True, text=True, check=True) def audio_values(self): found, current = [], None @@ -434,13 +869,32 @@ class DirectAudioPrefixTest(unittest.TestCase): path = self.windows / folder / "winedirectaudio.drv" return os.readlink(path) if path.is_symlink() else None + def test_non_launch_verbs_preserve_audio_configuration(self): + for verb in ("getcompatpath", "getnativepath", "destroyprefix"): + with self.subTest(verb=verb): + self.reg.write_text('WINE REGISTRY Version 2\n\n[Software\\\\Wine\\\\Drivers] 1\n"Audio"="pulse"\n') + before = self.reg.read_bytes() + result = self.run_setup(verb) + self.assertEqual(self.reg.read_bytes(), before) + self.assertIsNone(self.link("system32")) + self.assertIsNone(self.link("syswow64")) + self.assertIn("WINEDLLPATH=\n", result.stdout) + self.assertIn("WINE_AUDIO_DRIVER=\n", result.stdout) + + def test_other_windows_launch_verbs_still_set_up_audio(self): + self.reg.write_text("WINE REGISTRY Version 2\n") + for verb in ("run", "runinprefix"): + with self.subTest(verb=verb): + result = self.run_setup(verb) + self.assertIn("DirectAudio ready", result.stderr) + self.assertIn("WINE_AUDIO_DRIVER=directaudio,pulse\n", result.stdout) + self.assertEqual(self.link("system32"), str(self.audio / "lib/wine/aarch64-windows/winedirectaudio.drv")) + def test_the_driver_is_placed_and_selected_the_way_wine_reads_it(self): self.reg.write_text("WINE REGISTRY Version 2\n;; All keys relative to \\\\User\\\\S-1-5-21-0-0-0-1000\n\n#arch=win64\n") result = self.run_setup() self.assertIn("DirectAudio selected", result.stderr) self.assertIn("WINEDLLPATH=%s/lib/wine" % self.audio, result.stdout) - # Proton-CachyOS's mmdevapi takes the driver list from this variable, and its launcher - # pre-sets it to pulse,alsa unless it is already set. self.assertIn("WINE_AUDIO_DRIVER=directaudio,pulse\n", result.stdout) self.assertEqual(self.link("system32"), str(self.audio / "lib/wine/aarch64-windows/winedirectaudio.drv")) self.assertEqual(self.link("syswow64"), str(self.audio / "lib/wine/i386-windows/winedirectaudio.drv")) diff --git a/tools/tests/test_glasses_localization.py b/tools/tests/test_glasses_localization.py new file mode 100644 index 0000000000..0708286fab --- /dev/null +++ b/tools/tests/test_glasses_localization.py @@ -0,0 +1,71 @@ +import collections +from pathlib import Path +import re +import unicodedata +import unittest +import xml.etree.ElementTree as ET + + +ROOT = Path(__file__).resolve().parents[2] +RES = ROOT / "app/src/main/res" +FORMAT = re.compile(r"%(?:\d+\$)?[-#+ 0,(]*\d*(?:\.\d+)?[a-zA-Z%]") + + +def strings(path): + return { + element.attrib["name"]: "".join(element.itertext()) + for element in ET.parse(path).getroot() + if element.tag == "string" and element.get("translatable") != "false" + } + + +class GlassesLocalizationTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.english = strings(RES / "values/strings.xml") + cls.required = { + key: value for key, value in cls.english.items() + if key.startswith(("glasses_", "spatial_", "tracking_recovery_", "setup_glasses_", "phone_camera_tracking_")) + or key in ("setup_tab_glasses", "hand_camera_prompt_title", "hand_camera_prompt_body", "hand_camera_setting_hint") + } + language_source = (ROOT / "app/src/main/java/com/droiddeck/launcher/core/AppLanguage.kt").read_text(encoding="utf-8") + tags = re.findall(r'"([a-zA-Z0-9-]+)"', re.search(r"val supported:.*?listOf\((.*?)\)", language_source, re.S).group(1)) + special = {"id": "in", "es-419": "b+es+419", "pt-BR": "pt"} + cls.locales = {} + for tag in tags: + if tag == "en": + continue + qualifier = special.get(tag, tag.replace("-", "-r")) + cls.locales[tag] = strings(RES / f"values-{qualifier}/strings.xml") + + def test_every_supported_language_has_nonempty_glasses_and_calibration_text(self): + for locale, translated in self.locales.items(): + for key in self.required: + with self.subTest(locale=locale, key=key): + self.assertTrue(translated.get(key, "").strip(), "Missing translation would fall back to English") + + def test_translations_preserve_format_arguments_and_explicit_line_breaks(self): + for locale, translated in self.locales.items(): + for key, source in self.required.items(): + with self.subTest(locale=locale, key=key): + target = translated.get(key, "") + self.assertEqual(collections.Counter(FORMAT.findall(source)), collections.Counter(FORMAT.findall(target))) + self.assertEqual(source.count(r"\n"), target.count(r"\n")) + + def test_printed_board_and_distance_guidance_preserve_measurements(self): + keys = ("spatial_print_hint", "spatial_print_scale", "spatial_print_check", "spatial_distance_12in", + "spatial_distance_30cm", "spatial_distance_20in", "spatial_distance_50cm", + "spatial_distance_hint", "spatial_distance_corners") + + def numbers(value): + value = "".join(str(unicodedata.decimal(char)) if char.isdecimal() else char for char in value) + return collections.Counter(number.replace(",", ".") for number in re.findall(r"\d+(?:[.,]\d+)?", value)) + + for locale, translated in self.locales.items(): + for key in keys: + with self.subTest(locale=locale, key=key): + self.assertEqual(numbers(self.english[key]), numbers(translated.get(key, ""))) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_launcher_cores.py b/tools/tests/test_launcher_cores.py index 98656b7454..4f05df2424 100644 --- a/tools/tests/test_launcher_cores.py +++ b/tools/tests/test_launcher_cores.py @@ -48,7 +48,7 @@ class LauncherCoresTest(unittest.TestCase): self.proc = self.root / 'proc' self.proc.mkdir() cpufreq = self.root / 'cpu' - for cpu in ALL: # 0-5 one cluster, 6-7 the fast one + for cpu in ALL: (cpufreq / f'cpu{cpu}/cpufreq').mkdir(parents=True) (cpufreq / f'cpu{cpu}/cpufreq/cpuinfo_max_freq').write_text('3532800\n' if cpu < 6 else '4320000\n') self.cores = FakeCores() @@ -118,7 +118,7 @@ class LauncherCoresTest(unittest.TestCase): self.process(100, LAUNCHER) self.process(200, HELPER) self.process(9, '/root/.local/share/Steam/steamrtarm64/steam') - self.governor.tick() # no focus file yet + self.governor.tick() self.focus_on(9, app=769) self.governor.tick() self.focus_on(100) @@ -141,7 +141,6 @@ class LauncherCoresTest(unittest.TestCase): self.process(400, GAME) self.focus_on(400) self.governor.tick() - # A new thread, and a new helper process the held one started: both born held. self.thread(200, 203, {5}, NICE) self.process(500, HELPER, (501,), cpus={5}, nice=NICE) self.now += 10 @@ -156,16 +155,16 @@ class LauncherCoresTest(unittest.TestCase): self.process(400, GAME) self.focus_on(400) self.governor.tick() - self.cores.state[201] = (ALL, -5) # the program raised a thread's priority itself + self.cores.state[201] = (ALL, -5) self.now += 5 self.governor.tick() - self.assertFalse(self.held(201)) # not looked at again before the rescan + self.assertFalse(self.held(201)) self.now += 5 self.governor.tick() self.assertTrue(self.held(201)) self.focus_on(200) self.governor.tick() - self.assertEqual((ALL, 0), self.cores.state[201]) # its first state, not the program's + self.assertEqual((ALL, 0), self.cores.state[201]) def test_a_steady_hold_is_not_rewritten(self): self.process(200, HELPER, (201,)) @@ -182,7 +181,7 @@ class LauncherCoresTest(unittest.TestCase): self.process(200, HELPER, (201,)) self.process(300, HELPER) self.process(400, GAME) - del self.cores.state[201] # ended between the listing and the call + del self.cores.state[201] self.focus_on(400) self.governor.tick() self.assertNotIn(201, self.holder.held[200]) diff --git a/tools/tests/test_login1.py b/tools/tests/test_login1.py index 947fd8eebb..9150d2d78b 100644 --- a/tools/tests/test_login1.py +++ b/tools/tests/test_login1.py @@ -22,6 +22,9 @@ IFACE = NAME + ".Manager" @unittest.skipUnless(Gio and os.environ.get("DBUS_SESSION_BUS_ADDRESS"), "requires dbus-run-session and PyGObject") class SleepHandshakeTest(unittest.TestCase): + ARGS = [] + AGENT_EXIT = None + def setUp(self): self.directory = tempfile.TemporaryDirectory() self.dir = Path(self.directory.name) @@ -35,7 +38,16 @@ class SleepHandshakeTest(unittest.TestCase): lambda bus, sender, path, interface, name, body: self.signals.append(body.unpack()[0])) env = dict(os.environ, BL_LAUNCH_DIR=str(self.dir), DBUS_SYSTEM_BUS_ADDRESS=os.environ["DBUS_SESSION_BUS_ADDRESS"]) - self.process = subprocess.Popen(["/usr/bin/python3", str(SCRIPT)], env=env, + script = SCRIPT + if self.AGENT_EXIT is not None: + bin_dir = self.dir / "bin" + bin_dir.mkdir() + script = bin_dir / SCRIPT.name + script.write_text(SCRIPT.read_text()) + agent = bin_dir / "droiddeck-agent" + agent.write_text("#!/bin/sh\necho \"$@\" >> \"%s\"\nexit %d\n" % (self.dir / "agent-calls", self.AGENT_EXIT)) + agent.chmod(0o755) + self.process = subprocess.Popen(["/usr/bin/python3", str(script), *self.ARGS], env=env, stdout=subprocess.DEVNULL) self.wait_for(lambda: (self.dir / "steam-sleep-ready").exists()) @@ -80,7 +92,7 @@ class SleepHandshakeTest(unittest.TestCase): token = self.suspend() self.assertTrue(self.preparing()) self.state(token, "paused") - self.state("0" * 32, "awake") # stale session acknowledgments cannot wake this one + self.state("0" * 32, "awake") time.sleep(0.1) self.assertTrue(self.preparing()) self.state(token, "awake") @@ -218,5 +230,69 @@ class SleepHandshakeTest(unittest.TestCase): self.call(IFACE, "PowerOff", GLib.Variant("(b)", (True,))) +class FakeAgentCase(unittest.TestCase): + ARGS = [] + setUp = SleepHandshakeTest.setUp + tearDown = SleepHandshakeTest.tearDown + wait_for = SleepHandshakeTest.wait_for + call = SleepHandshakeTest.call + suspend = SleepHandshakeTest.suspend + state = SleepHandshakeTest.state + request_wake = SleepHandshakeTest.request_wake + + def asked(self): + path = self.dir / "agent-calls" + return path.read_text().split() if path.exists() else [] + + +@unittest.skipUnless(Gio and os.environ.get("DBUS_SESSION_BUS_ADDRESS"), "requires dbus-run-session and PyGObject") +class AwakeSteamTest(FakeAgentCase): + AGENT_EXIT = 5 + + def test_resuming_an_awake_steam_sends_no_sleep_wake_pair(self): + self.request_wake() + self.wait_for(lambda: self.asked()) + deadline = time.monotonic() + 1.5 + while time.monotonic() < deadline: + self.wait_for(lambda: True) + time.sleep(0.05) + self.assertEqual([], self.signals) + self.assertEqual(["--steam-asleep"], self.asked()) + + def test_a_pending_sleep_still_wakes_without_asking_steam(self): + token = self.suspend() + self.state(token, "paused") + self.request_wake() + self.wait_for(lambda: self.signals == [True, False]) + self.assertEqual([], self.asked()) + + +@unittest.skipUnless(Gio and os.environ.get("DBUS_SESSION_BUS_ADDRESS"), "requires dbus-run-session and PyGObject") +class AsleepSteamTest(FakeAgentCase): + AGENT_EXIT = 0 + + def test_resuming_a_sleeping_steam_replays_the_pair(self): + self.request_wake() + self.wait_for(lambda: self.signals == [True, False]) + self.assertEqual(["--steam-asleep"], self.asked()) + + +class WithNetworkManagerTest(SleepHandshakeTest): + ARGS = ["--with-netmanager"] + + def owner(self, name): + return self.bus.call_sync("org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", + "GetConnectionUnixProcessID", GLib.Variant("(s)", (name,)), None, + Gio.DBusCallFlags.NONE, 2000, None).unpack()[0] + + def test_one_process_owns_login1_and_networkmanager(self): + self.wait_for(lambda: self.bus.call_sync( + "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "NameHasOwner", + GLib.Variant("(s)", ("org.freedesktop.NetworkManager",)), None, + Gio.DBusCallFlags.NONE, 2000, None).unpack()[0]) + self.assertEqual(self.owner("org.freedesktop.NetworkManager"), self.process.pid) + self.assertEqual(self.owner(NAME), self.process.pid) + + if __name__ == "__main__": unittest.main() diff --git a/tools/tests/test_mjpeg_payload.cpp b/tools/tests/test_mjpeg_payload.cpp new file mode 100644 index 0000000000..7d45fe4441 --- /dev/null +++ b/tools/tests/test_mjpeg_payload.cpp @@ -0,0 +1,23 @@ +#include "../../app/src/main/cpp/viture/mjpeg_payload.h" +#include <cassert> +#include <cstdio> +#include <cstring> + +int main() { + const uint8_t jpeg[] = {0xff,0xd8,0xff,0xc0,0,4,1,2,0xff,0xd9}; + uint8_t frame[32]{}; + std::memcpy(frame,jpeg,sizeof(jpeg)); + for (std::size_t padding=0; padding<=7; ++padding) + assert(mjpeg_payload_size(frame,sizeof(jpeg)+padding) == sizeof(jpeg)); + assert(mjpeg_payload_size(frame,sizeof(jpeg)+8) == 0); + for (std::size_t size=0; size<sizeof(jpeg); ++size) + assert(mjpeg_payload_size(frame,size) == 0); + frame[sizeof(jpeg)] = 0x42; + assert(mjpeg_payload_size(frame,sizeof(jpeg)+1) == 0); + frame[sizeof(jpeg)] = 0; + frame[0] = 0; + assert(mjpeg_payload_size(frame,sizeof(jpeg)) == 0); + assert(mjpeg_payload_size(nullptr,10) == 0); + assert(mjpeg_payload_size(jpeg,4*1024*1024+1) == 0); + std::puts("PASS: JPEG boundaries, 0-7 padding bytes, truncation, garbage, and bounds"); +} diff --git a/tools/tests/test_msi_install.py b/tools/tests/test_msi_install.py index 16e8807f1f..dda3eeea50 100644 --- a/tools/tests/test_msi_install.py +++ b/tools/tests/test_msi_install.py @@ -119,6 +119,32 @@ class LayoutTest(unittest.TestCase): inst.select() self.assertEqual(inst.included_components, {"Up", "Wide"}) + def test_a_duplicate_onto_the_file_itself_is_skipped(self): + with tempfile.TemporaryDirectory() as tmp: + src = Path(tmp) / "cab" / "dotnet.exe" + src.parent.mkdir() + src.write_bytes(b"MZ") + out = Path(tmp) / "out" + inst = installer({ + "Directory": rows("Directory Directory_Parent DefaultDir", + ("TARGETDIR", "", "SourceDir"), + ("ProgramFilesFolder", "TARGETDIR", "PFiles"), + ("DOTNETHOME", "ProgramFilesFolder", "dotnet"), + ("DOTNETHOME_X86", "ProgramFilesFolder", "dotnet")), + "Component": rows("Component Directory_ Attributes Condition KeyPath", + ("Host", "DOTNETHOME", "0", "", "DotnetExe")), + "Feature": rows("Feature Feature_Parent Level", ("Main", "", "1")), + "FeatureComponents": rows("Feature_ Component_", ("Main", "Host")), + "File": rows("File Component_ FileName", ("DotnetExe", "Host", "dotnet.exe")), + "DuplicateFile": rows("FileKey Component_ File_ DestName DestFolder", + ("Dup", "Host", "DotnetExe", "", "DOTNETHOME_X86")), + }, out=str(out)) + inst.select() + inst.install_files({"DotnetExe": src}) + placed = out / "drive_c/Program Files (x86)/dotnet/dotnet.exe" + self.assertEqual(placed.read_bytes(), b"MZ") + self.assertEqual(inst.counts["files"], 1) + def test_global_assembly_paths(self): with tempfile.TemporaryDirectory() as tmp: dll = Path(tmp) / "a.dll" @@ -240,13 +266,11 @@ class RegistryApplyTest(unittest.TestCase): text = (self.pfx / "system.reg").read_text() self.assertIn('"Version"="4.0"', text) self.assertIn('"Kept"="mine"', text) - # Through the Wow6432Node\Classes link into the shared Classes\Wow6432Node key, never under the link. self.assertIn('[Software\\\\Classes\\\\Wow6432Node\\\\CLSID\\\\{X}]', text) self.assertNotIn('[Software\\\\Wow6432Node\\\\Classes\\\\CLSID', text) self.assertIn('"PATH"=str(2):"C:\\\\PhysX;%SystemRoot%\\\\system32;%SystemRoot%"', text) self.assertNotIn("[System\\\\CurrentControlSet\\\\", text) self.assertIn('"Opt"=dword:00000002', (self.pfx / "user.reg").read_text()) - # The prefix's own spelling of Program Files (x86) is kept. self.assertTrue((self.pfx / "drive_c/program files (x86)/Microsoft XNA/xna.dll").is_file()) self.assertFalse((self.pfx / "drive_c/Program Files (x86)").exists()) diff --git a/tools/tests/test_netmanager.py b/tools/tests/test_netmanager.py index 23ce08070f..69159fdfce 100644 --- a/tools/tests/test_netmanager.py +++ b/tools/tests/test_netmanager.py @@ -117,7 +117,6 @@ class NetworkObjectsTest(unittest.TestCase): self.assertTrue(secured["RsnFlags"].unpack() & 0x100) self.assertTrue(secured["RsnFlags"].unpack() & 0x400) self.assertEqual(found[nm.ap_path(other["bssid"])][nm.NAME + ".AccessPoint"]["Flags"].unpack(), 0) - # Keep nearby-network discovery while a cellular connection provides the default route. cellular = nm.objects(dict(CELLULAR, accessPoints=[other])) self.assertIn(nm.ap_path(other["bssid"]), cellular) self.assertEqual(cellular[nm.ROOT + "/Devices/Wifi"][nm.NAME + ".Device.Wireless"]["ActiveAccessPoint"].unpack(), "/") @@ -131,7 +130,6 @@ class NetworkBusTest(unittest.TestCase): self.write(WIFI) self.bus = Gio.bus_get_sync(Gio.BusType.SESSION, None) env = dict(os.environ, DBUS_SYSTEM_BUS_ADDRESS=os.environ["DBUS_SESSION_BUS_ADDRESS"]) - # Use the production service and only redirect its input file for the fixture. launch = "import runpy,sys; from pathlib import Path; n=runpy.run_path(sys.argv[1]); g=n['main'].__globals__; g['SNAPSHOT']=Path(sys.argv[2]); g['SCAN_REQUEST']=Path(sys.argv[2]).with_suffix('.request'); n['main']()" self.process = subprocess.Popen([sys.executable, "-c", launch, str(SCRIPT), str(self.snapshot)], env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -217,7 +215,6 @@ class NetworkBusTest(unittest.TestCase): self.assertTrue(any(interface == nm.OBJECT_MANAGER and member == "InterfacesRemoved" and args[0] == nm.AP for _, interface, member, args in signals)) self.assertTrue(any(member == "AccessPointAdded" for _, _, member, _ in signals)) - # A missing/invalid snapshot is a transient input error, never a fake Ethernet handover. self.snapshot.write_text("{") time.sleep(1.2) self.assertEqual(self.prop(nm.ROOT, nm.NAME, "PrimaryConnectionType"), "802-11-wireless") @@ -250,8 +247,6 @@ class NetworkBusTest(unittest.TestCase): from gi.repository import NM except ValueError: self.skipTest("requires gir1.2-nm-1.0") - # libnm is a real consumer of the same API Steam reads. It caches objects by path, - # so the handover must replace the Wi-Fi device with a modem rather than mutate its type. previous = os.environ.get("DBUS_SYSTEM_BUS_ADDRESS") os.environ["DBUS_SYSTEM_BUS_ADDRESS"] = os.environ["DBUS_SESSION_BUS_ADDRESS"] try: diff --git a/tools/tests/test_openat2_preload.py b/tools/tests/test_openat2_preload.py new file mode 100644 index 0000000000..2187272ca3 --- /dev/null +++ b/tools/tests/test_openat2_preload.py @@ -0,0 +1,192 @@ +import errno +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + +PRELOAD = Path(__file__).resolve().parents[1] / "linuxfs/preload" + +# Opens each "<dirfd>\t<flags>\t<path>" case with openat2(RESOLVE_IN_ROOT) as FEX does: first through the kernel's own +# openat2 on argv[1] when it has one, then, with openat2 failing ENOSYS as under proot, through the preload on argv[2]. +PROGRAM = r""" +#define _GNU_SOURCE +#include <dlfcn.h> +#include <errno.h> +#include <fcntl.h> +#include <linux/filter.h> +#include <linux/seccomp.h> +#include <stddef.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/prctl.h> +#include <sys/stat.h> +#include <sys/syscall.h> +#include <unistd.h> + +#ifndef SYS_openat2 +#define SYS_openat2 437 +#endif + +struct how { uint64_t flags, mode, resolve; }; +static char cases[256][512]; +static int count; + +static void run(long (*call)(long, ...), const char *tree) { + int root = open(tree, O_PATH | O_DIRECTORY | O_CLOEXEC), outer = open("/", O_PATH | O_DIRECTORY | O_CLOEXEC); + for (int i = 0; i < count; i++) { + char *flags = strchr(cases[i], '\t') + 1, *path = strchr(flags, '\t') + 1; + struct how h = {strtoull(flags, NULL, 0), 0, 0x10}; + if (h.flags & O_CREAT) h.mode = 0644; + long fd = call(SYS_openat2, (long)(cases[i][0] == 'o' ? outer : root), (long)path, (long)&h, (long)sizeof(h)); + struct stat st; + if (fd < 0) { + printf("ERR %d\n", errno); + } else { + fstat((int)fd, &st); + printf("OK %llu %llu\n", (unsigned long long)st.st_dev, (unsigned long long)st.st_ino); + close((int)fd); + } + } +} + +int main(int argc, char **argv) { + if (argc < 3) return 2; + while (count < 256 && fgets(cases[count], sizeof(cases[count]), stdin)) { + cases[count][strcspn(cases[count], "\n")] = 0; + count++; + } + long (*kernel)(long, ...) = (long (*)(long, ...))dlsym(dlopen("libc.so.6", RTLD_LAZY | RTLD_NOLOAD), "syscall"); + struct how probe = {O_RDONLY, 0, 0x10}; + long fd = kernel(SYS_openat2, (long)AT_FDCWD, (long)".", (long)&probe, (long)sizeof(probe)); + if (fd >= 0) { + close((int)fd); + printf("kernel\n"); + run(kernel, argv[1]); + struct sock_filter filter[] = { + BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, nr)), + BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SYS_openat2, 0, 1), + BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | ENOSYS), + BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW), + }; + struct sock_fprog prog = {sizeof(filter) / sizeof(filter[0]), filter}; + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) || prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) { + perror("seccomp"); + return 3; + } + } + printf("preload\n"); + run(syscall, argv[2]); + return 0; +} +""" + +O_PATH = getattr(os, "O_PATH", 0o10000000) + +# (dirfd: r = the tree, o = "/"), flags, path, expected: a path in the tree, an errno name, or "proc" for a file outside it. +CASES = [ + ("r", os.O_RDONLY, "etc/alternatives/hn", "etc/hostname"), + ("r", os.O_RDONLY, "/lib64/x86_64-linux-gnu/libfoo.so.1", "usr/lib/x86_64-linux-gnu/libfoo.so.1.2"), + ("r", os.O_RDONLY, "lib/x86_64-linux-gnu/libfoo.so.1", "usr/lib/x86_64-linux-gnu/libfoo.so.1.2"), + ("r", os.O_RDONLY, "etc/escape", "etc/hostname"), + ("r", os.O_RDONLY, "dirlink/../etc/hostname", "etc/hostname"), + ("r", os.O_RDONLY, "rootlink/rootlink//etc/./hostname", "etc/hostname"), + ("r", os.O_RDONLY, "../../etc/hostname", "etc/hostname"), + ("r", os.O_RDONLY | os.O_DIRECTORY, "/", "."), + ("r", os.O_RDONLY | os.O_DIRECTORY, "usr/../..", "."), + ("r", os.O_RDONLY, "chain/l2", "chain/end"), + ("r", os.O_RDONLY, "chain/l1", "ELOOP"), + ("r", os.O_RDONLY, "loop/a/x", "ELOOP"), + ("r", os.O_RDONLY | os.O_NOFOLLOW, "etc/alternatives/hn", "ELOOP"), + ("r", O_PATH | os.O_NOFOLLOW, "etc/alternatives/hn", "etc/alternatives/hn"), + ("r", os.O_RDONLY | os.O_NOFOLLOW, "lib/x86_64-linux-gnu/libfoo.so.1.2", "usr/lib/x86_64-linux-gnu/libfoo.so.1.2"), + ("r", os.O_RDONLY | os.O_NOFOLLOW | os.O_DIRECTORY, "dirlink/", "usr"), + ("r", os.O_RDONLY, "file/", "ENOTDIR"), + ("r", os.O_RDONLY, "file/../etc/hostname", "ENOTDIR"), + ("r", os.O_RDONLY, "nonexist/../etc/hostname", "ENOENT"), + ("r", os.O_RDWR | os.O_CREAT | os.O_EXCL, "dangling", "EEXIST"), + ("r", os.O_RDWR | os.O_CREAT, "dangling", "usr/newfile"), + ("r", os.O_RDWR | os.O_CREAT, "missing/newfile", "ENOENT"), + ("r", os.O_RDWR | os.O_CREAT, "newdir/", "EISDIR"), + ("o", os.O_RDONLY | os.O_NONBLOCK, "proc/self/fd/0", "EXDEV"), + ("o", os.O_RDONLY, "proc/self/exe", "EXDEV"), + ("o", os.O_RDONLY, "proc/self/cwd/x", "EXDEV"), + ("o", os.O_RDONLY, "proc/self/status", "proc"), +] + + +def make_tree(root): + for folder in ("usr/lib/x86_64-linux-gnu", "etc/alternatives", "loop", "chain"): + (root / folder).mkdir(parents=True) + (root / "usr/lib/x86_64-linux-gnu/libfoo.so.1.2").write_text("x86") + (root / "etc/hostname").write_text("inside") + (root / "file").write_text("f") + (root / "chain/end").write_text("end") + links = {"usr/lib/x86_64-linux-gnu/libfoo.so.1": "libfoo.so.1.2", "lib": "usr/lib", "lib64": "/usr/lib", + "etc/alternatives/hn": "/etc/hostname", "etc/escape": "../../../../../../etc/hostname", "loop/a": "b", + "loop/b": "a", "dirlink": "/usr", "rootlink": "/", "dangling": "/usr/newfile"} + links.update({"chain/l%d" % i: ("l%d" % (i + 1) if i < 41 else "end") for i in range(1, 42)}) + for link, target in links.items(): + os.symlink(target, root / link) + + +def labels(lines, root): + inodes = {(os.lstat(root).st_dev, os.lstat(root).st_ino): "."} + for folder, dirs, files in os.walk(root): + for name in dirs + files: + st = os.lstat(os.path.join(folder, name)) + inodes[(st.st_dev, st.st_ino)] = os.path.relpath(os.path.join(folder, name), root) + out = [] + for line in lines: + kind, *values = line.split() + if kind == "OK": + out.append(inodes.get((int(values[0]), int(values[1])), "proc")) + else: + out.append(errno.errorcode[int(values[0])]) + return out + + +@unittest.skipUnless(shutil.which("cc") and os.path.isdir("/proc/self"), "needs cc and procfs") +class Openat2PreloadTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.tmp = Path(tempfile.mkdtemp()) + cls.lib = cls.tmp / "libopenat2.so" + subprocess.run(["cc", "-O2", "-Wall", "-Werror", "-fPIC", "-shared", "-pthread", "-o", str(cls.lib), + str(PRELOAD / "robust.c"), str(PRELOAD / "fsync.c"), str(PRELOAD / "noexec.c"), "-ldl"], check=True) + source = cls.tmp / "openat2.c" + source.write_text(PROGRAM) + subprocess.run(["cc", "-O2", "-Wall", "-Werror", "-o", str(cls.tmp / "openat2"), str(source), "-ldl"], check=True) + cls.trees = (cls.tmp / "kernel", cls.tmp / "preload") + for tree in cls.trees: + make_tree(tree) + cases = "".join("%s\t%d\t%s\n" % case[:3] for case in CASES) + result = subprocess.run([str(cls.tmp / "openat2"), *map(str, cls.trees)], input=cases, capture_output=True, text=True, + env=dict(os.environ, LD_PRELOAD=str(cls.lib)), timeout=60) + if result.returncode != 0: + raise AssertionError(result.stdout + result.stderr) + lines = result.stdout.splitlines() + cls.kernel = labels(lines[1:1 + len(CASES)], cls.trees[0]) if lines[0] == "kernel" else None + cls.preload = labels(lines[-len(CASES):], cls.trees[1]) + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.tmp, ignore_errors=True) + + def test_preload_resolves_in_the_root_without_openat2(self): + for case, got in zip(CASES, self.preload): + self.assertEqual(got, case[3], case) + self.assertTrue((self.trees[1] / "usr/newfile").exists()) + + def test_the_kernel_agrees(self): + if self.kernel is None: + self.skipTest("this kernel or sandbox has no openat2") + for case, got in zip(CASES, self.kernel): + self.assertEqual(got, case[3], case) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_output_refresh.py b/tools/tests/test_output_refresh.py new file mode 100644 index 0000000000..7b252649eb --- /dev/null +++ b/tools/tests/test_output_refresh.py @@ -0,0 +1,170 @@ +import os +from pathlib import Path +import re +import shutil +import subprocess +import sys +import tempfile +import unittest + + +ROOT = Path(__file__).resolve().parents[2] +SOURCE = ROOT / 'app/src/main/cpp/waylandcomp/src/compositor.c' + + +def extract_function(source, name): + match = re.search(r'^(?:static )?(?:void|int|uint32_t) ' + re.escape(name) + r'\([^;]*?\) \{', + source, re.MULTILINE) + if match is None: + raise AssertionError(f'Missing compositor function: {name}') + cursor, depth = match.end(), 1 + while depth: + depth += (source[cursor] == '{') - (source[cursor] == '}') + cursor += 1 + return source[match.start():cursor] + + +PREAMBLE = r''' +#define _GNU_SOURCE +#include <assert.h> +#include <errno.h> +#include <fcntl.h> +#include <stdatomic.h> +#include <stdint.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/ioctl.h> + +struct wl_resource { int version, modes, done, hz, w, h; struct wl_resource *next; }; +struct surface { int xdg_toplevel, toplevel_committed; struct surface *next; }; +struct input_msg { int type, p1, p2, p3, p4; }; +static struct wl_resource second = { .version = 1 }; +static struct wl_resource first = { .version = 4, .next = &second }; +static struct surface surface = { .xdg_toplevel = 1, .toplevel_committed = 1 }; +static int g_input_pipe[2] = {-1, -1}; +static atomic_int g_output_refresh_mhz = 60000; +static atomic_int g_output_refresh_pending; +static int g_output_announced_refresh_mhz = 60000; +static int g_output_w = 1920, g_output_h = 1080; +static int flushes, resizes, pointers, ticks; +static int scale_changes, scale_mode, scale_alignment, renders; +static void *g_display; +#define WL_OUTPUT_MODE_CURRENT 1 +#define WL_OUTPUT_MODE_PREFERRED 2 +#define wl_resource_for_each(r, list) for ((r) = &first; (r); (r) = (r)->next) +#define wl_list_for_each(s, list, link) for ((s) = &surface; (s); (s) = (s)->next) +static int wl_resource_get_version(struct wl_resource *r) { return r->version; } +static void wl_output_send_mode(struct wl_resource *r, int flags, int w, int h, int hz) { + assert(flags == 3); r->modes++; r->hz = hz; r->w = w; r->h = h; +} +static void wl_output_send_done(struct wl_resource *r) { r->done++; } +static void wl_display_flush_clients(void *display) { (void)display; flushes++; } +static void send_toplevel_configure(struct surface *s) { (void)s; resizes++; } +#define droiddeck_log(...) ((void)0) +#define deliver_key(m) ((void)0) +#define pointer_event(...) ((void)0) +#define pointer_button(...) ((void)0) +#define scroll_event(...) ((void)0) +#define axis_event(...) ((void)0) +#define pointer_delta(...) ((void)0) +#define deliver_touch(m) ((void)0) +#define deliver_pointer(m) (pointers++) +static void on_vsync(int64_t ns) { assert(ns > 0); ticks++; } +static void vk_present_set_scale_mode(int mode, int alignment) { + scale_changes++; scale_mode = mode; scale_alignment = alignment; +} +static void schedule_render(void) { renders++; } +''' + +CHECKS = r''' +static int queued(void) { int n; assert(ioctl(g_input_pipe[0], FIONREAD, &n) == 0); return n; } +static void drain(void) { on_input_readable(g_input_pipe[0], 0, NULL); } +static void expect(int modes, int hz, int resize_count) { + assert(first.modes == modes && second.modes == modes); + assert(first.hz == hz && second.hz == hz); + assert(first.w == 1920 && second.w == 1920 && first.h == 1080 && second.h == 1080); + assert(first.done == modes && second.done == 0); + assert(resizes == resize_count); + assert(pointers == 0); +} +int main(void) { + droiddeck_wayland_set_output_refresh_rate(120000); + assert(atomic_load(&g_output_refresh_mhz) == 120000); + assert(!atomic_load(&g_output_refresh_pending)); + assert(first.modes == 0 && second.modes == 0); + assert(pipe2(g_input_pipe, O_CLOEXEC | O_NONBLOCK) == 0); + g_output_announced_refresh_mhz = atomic_load(&g_output_refresh_mhz); + droiddeck_wayland_set_scale_mode(1, 4); + assert(queued() == sizeof(struct input_msg)); + drain(); + assert(scale_changes == 1 && scale_mode == 1 && scale_alignment == 4 && renders == 1); + assert(first.modes == 0 && second.modes == 0); + droiddeck_wayland_set_output_refresh_rate(120000); + assert(queued() == 0); + droiddeck_wayland_set_output_refresh_rate(60000); + assert(first.modes == 0 && queued() == sizeof(struct input_msg)); + drain(); expect(1, 60000, 0); assert(flushes == 1); + droiddeck_wayland_set_output_refresh_rate(60000); + assert(queued() == 0); drain(); expect(1, 60000, 0); + droiddeck_wayland_set_output_refresh_rate(90000); + droiddeck_wayland_set_output_refresh_rate(120000); + drain(); expect(2, 120000, 0); + droiddeck_wayland_set_output_refresh_rate(90000); + droiddeck_wayland_set_output_refresh_rate(120000); + drain(); expect(2, 120000, 0); + droiddeck_wayland_set_output_refresh_rate(60000); + droiddeck_wayland_output_resized(); + drain(); expect(3, 60000, 1); assert(flushes == 3); + struct input_msg wake = {10, 0, 0, 0, 0}; + int n = 0; + while (write(g_input_pipe[1], &wake, sizeof(wake)) == sizeof(wake)) n++; + assert(n > 0 && errno == EAGAIN); + droiddeck_wayland_set_output_refresh_rate(120000); + drain(); expect(4, 120000, 1); + droiddeck_wayland_set_output_refresh_rate(0); + drain(); expect(5, 60000, 1); + droiddeck_wayland_set_output_refresh_rate(-1); + assert(queued() == 0); + struct input_msg vsync = {5, 0, 16000000, 0, 0}; + assert(write(g_input_pipe[1], &vsync, sizeof(vsync)) == sizeof(vsync)); + drain(); expect(5, 60000, 1); assert(ticks == 1); + assert(nominal_refresh_ns() == 16666666); + assert(flushes == 5); + assert(scale_changes == 1 && scale_mode == 1 && scale_alignment == 4 && renders == 1); + droiddeck_wayland_set_scale_mode(1, 3); + droiddeck_wayland_set_output_refresh_rate(90000); + drain(); expect(6, 90000, 1); + assert(scale_changes == 2 && scale_mode == 1 && scale_alignment == 3 && renders == 2); + close(g_input_pipe[0]); close(g_input_pipe[1]); + puts("PASS"); +} +''' + + +@unittest.skipUnless(sys.platform.startswith('linux'), 'needs Linux nonblocking pipes') +class OutputRefreshTest(unittest.TestCase): + def test_refresh_notifications_preserve_client_pacing_without_resizing(self): + compiler = shutil.which(os.environ.get('CC', 'cc')) + if compiler is None: + self.skipTest('A host C compiler is required') + source = SOURCE.read_text() + functions = ('nominal_refresh_ns', 'output_send_mode', 'output_notify_mode', + 'output_resized', 'on_input_readable', 'droiddeck_wayland_output_resized', + 'droiddeck_wayland_set_scale_mode', + 'droiddeck_wayland_set_output_refresh_rate') + harness = PREAMBLE + '\n'.join(extract_function(source, name) for name in functions) + CHECKS + with tempfile.TemporaryDirectory(prefix='droiddeck-output-refresh-') as folder: + path = Path(folder) + (path / 'refresh.c').write_text(harness) + binary = path / 'refresh-test' + build = subprocess.run([compiler, '-std=c11', '-Wall', '-Wextra', '-Werror', + '-Wno-unused-parameter', '-O2', str(path / 'refresh.c'), + '-o', str(binary)], capture_output=True, text=True) + self.assertEqual(0, build.returncode, build.stderr) + result = subprocess.run([str(binary)], capture_output=True, text=True, timeout=10) + self.assertEqual(0, result.returncode, result.stderr) + self.assertEqual('PASS', result.stdout.strip()) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_picture_position_mapping.py b/tools/tests/test_picture_position_mapping.py new file mode 100644 index 0000000000..597fec9384 --- /dev/null +++ b/tools/tests/test_picture_position_mapping.py @@ -0,0 +1,74 @@ +"""Test the renderer's actual map and inverse map without a Vulkan device.""" +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + +REPO = Path(__file__).resolve().parents[2] + + +class GameTopMappingTest(unittest.TestCase): + def test_letterbox_alignment_and_touch_inverse(self): + cc = shutil.which(os.environ.get('CC', 'cc')) + if not cc: + self.skipTest('A host C compiler is required') + source = (REPO / 'app/src/main/cpp/waylandcomp/src/vk_present.c').read_text() + header = (REPO / 'app/src/main/cpp/waylandcomp/src/vk_present.h').read_text() + enums = header[header.index('enum vkp_scale_mode'):header.index('void vk_present_set_scale_mode')] + state = source[source.index('static volatile int g_mode'):source.index('static int64_t g_swap_retry_at_ns')] + def function(signature): + start = source.index(signature) + return source[start:source.index('\n}\n', start) + 3] + funcs = '\n'.join(function(name) for name in ['static const char *mode_name(', + 'static const char *align_name(', 'static void update_map(', 'int vkp_output_to_scene(', 'int vkp_game_picture_rect(']) + with tempfile.TemporaryDirectory() as tmp: + tmp = Path(tmp) + code = '#include <assert.h>\n#include <math.h>\n#include <stdio.h>\n#include <string.h>\n#include <pthread.h>\n' + code += '#define droiddeck_log(...) ((void)0)\nstatic struct { unsigned width, height; } g_extent;\n' + code += enums + state + funcs + code += r''' +static void near(double a, double b) { assert(fabs(a - b) < 0.01); } +static void check(int sw, int sh, int ow, int oh, int alignment) { + g_extent.width = ow; g_extent.height = oh; + g_mode = VKP_MODE_FIT; g_align = alignment; + update_map(sw, sh); + float rect[4]; + assert(vkp_game_picture_rect(rect)); + double top = alignment == VKP_ALIGN_PICTURE_TOP ? 0 : oh - sh * g_map.ky; + near(rect[0], g_map.off_x); near(rect[1], top); + near(rect[2], g_map.off_x + sw * g_map.kx); + near(rect[3], top + sh * g_map.ky); + near(g_map.off_y, top); + double sx, sy; + assert(vkp_output_to_scene(g_map.off_x + sw * g_map.kx / 2, + top + sh * g_map.ky / 2, &sx, &sy)); + near(sx, sw / 2.0); near(sy, sh / 2.0); + near(g_map.kx, g_map.ky); + assert(sh * g_map.ky <= oh + 0.01); + g_align = VKP_ALIGN_CENTER; update_map(sw, sh); + assert(!vkp_game_picture_rect(rect)); + near(g_map.off_y, (int)((oh - sh * g_map.ky) * 0.5)); +} +int main(void) { + for (int alignment = VKP_ALIGN_PICTURE_TOP; alignment <= VKP_ALIGN_PICTURE_BOTTOM; alignment++) { + check(1240, 1100, 2480, 2200, alignment); + check(1280, 720, 2480, 2200, alignment); + check(1024, 768, 2480, 2200, alignment); + check(1920, 1080, 2400, 1080, alignment); + check(1240, 1100, 2480, 1394, alignment); + } + g_align = VKP_ALIGN_TOP; update_map(1280, 720); + assert(g_map.rh == 697 && g_map.ry == 0); + puts("PASS"); +} +''' + (tmp / 'map.c').write_text(code) + subprocess.run([cc, '-std=c11', str(tmp / 'map.c'), '-lm', '-o', str(tmp / 'map')], check=True, capture_output=True, text=True) + result = subprocess.run([str(tmp / 'map')], capture_output=True, text=True) + self.assertEqual(result.returncode, 0, result.stderr) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_pointer_release.py b/tools/tests/test_pointer_release.py new file mode 100644 index 0000000000..9da5672e3f --- /dev/null +++ b/tools/tests/test_pointer_release.py @@ -0,0 +1,57 @@ +"""Exercise the compositor's real button dispatcher with a recording Wayland sink.""" +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + +REPO = Path(__file__).resolve().parents[2] + + +class PointerReleaseTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + compiler = shutil.which(os.environ.get('CC', 'cc')) + if compiler is None: + raise unittest.SkipTest('A host C compiler is required') + source = (REPO / 'app/src/main/cpp/waylandcomp/src/compositor.c').read_text() + start = source.index('static void pointer_button(uint32_t button, int pressed) {') + end = source.index('\n}\n', start) + 3 + cls.temp = tempfile.TemporaryDirectory(prefix='droiddeck-pointer-release-') + cls.addClassCleanup(cls.temp.cleanup) + folder = Path(cls.temp.name) + (folder / 'pointer_button.inc').write_text(source[start:end]) + start = source.index('static void touch_cancel_all(void) {') + end = source.index('\n}\n', start) + 3 + (folder / 'touch_cancel_all.inc').write_text(source[start:end]) + cls.binary = folder / 'pointer-test' + subprocess.run([compiler, '-std=c11', '-Wall', '-I', str(folder), + str(REPO / 'tools/tests/pointer_release_harness.c'), + '-o', str(cls.binary)], check=True, capture_output=True, text=True) + + def check_case(self, case): + result = subprocess.run([str(self.binary), case], capture_output=True, text=True) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + + def test_cleanup_releases_all_buttons_without_motion(self): + self.check_case('cleanup') + + def test_release_without_focus_does_not_select_a_window(self): + self.check_case('unfocused') + + def test_release_reaches_each_focused_pointer_and_clears_grab(self): + self.check_case('focused') + + def test_touch_fallback_cancel_releases_without_motion(self): + self.check_case('fallback') + + def test_native_touch_cancel_then_cleanup_releases_stale_buttons(self): + self.check_case('native') + + def test_press_keeps_existing_routing(self): + self.check_case('press') + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_prepare_windows_runtime.py b/tools/tests/test_prepare_windows_runtime.py new file mode 100644 index 0000000000..56e8d59306 --- /dev/null +++ b/tools/tests/test_prepare_windows_runtime.py @@ -0,0 +1,179 @@ +import importlib.util +from pathlib import Path +import struct +import tempfile +import unittest +from unittest import mock +from zipfile import ZipFile + + +spec = importlib.util.spec_from_file_location( + 'prepare_windows_runtime', Path(__file__).resolve().parents[1] / 'prepare_windows_runtime.py') +prepare = importlib.util.module_from_spec(spec) +spec.loader.exec_module(prepare) + + +class WindowsRuntimePreparationTest(unittest.TestCase): + def test_archive_paths_cannot_escape_destination(self): + for name in ('../outside', '/absolute', 'dir/../../outside', 'C:/absolute', 'dir\\outside', '.'): + with self.subTest(name=name), self.assertRaises(ValueError): + prepare.validate_relative(name) + + def test_tracked_outputs_cannot_be_overwritten(self): + with mock.patch.object(prepare, 'git', return_value=b'tracked/file\n'): + with self.assertRaisesRegex(ValueError, 'overwrite tracked'): + prepare.checked_output('tracked/file') + + def test_rebuilt_libraries_must_match_each_architecture(self): + with tempfile.TemporaryDirectory() as folder: + path = Path(folder) / 'libblsession.so' + elf = bytearray(64) + elf[:4] = b'\x7fELF' + elf[5] = 1 + elf[18:20] = struct.pack('<H', 183) + path.write_bytes(elf) + self.assertEqual(prepare.validate_rebuilt(path, 183), elf) + with self.assertRaisesRegex(ValueError, 'wrong ELF architecture'): + prepare.validate_rebuilt(path, 62) + path.write_bytes(b'not an ELF') + with self.assertRaisesRegex(ValueError, 'wrong ELF architecture'): + prepare.validate_rebuilt(path, 183) + + def test_new_committed_native_changes_reject_donor_reuse(self): + with mock.patch.object(prepare, 'git', return_value=prepare.DONOR_TREE.encode()), \ + mock.patch.object(prepare, 'changed', return_value={'tools/linuxfs/preload/net.c'}): + with self.assertRaisesRegex(ValueError, 'Sources changed since'): + prepare.check_sources() + + def test_vr_sources_are_classified_as_rebuilt_including_local_and_new_files(self): + committed = {'tools/vr/src/vk_layer_droiddeck_vr.c', 'tools/vr/build.sh'} + local = {'tools/vr/src/presenter.cpp'} + new = {'tools/vr/src/fence_tracker.h'} + with mock.patch.object(prepare, 'changed', side_effect=[committed, local, committed]), \ + mock.patch.object(prepare, 'git', side_effect=[prepare.DONOR_TREE.encode(), + b'tools/vr/src/fence_tracker.h\0']): + classifications = prepare.check_sources() + self.assertEqual(set(classifications), committed | local | new) + self.assertTrue(all('never imported from donor' in value for value in classifications.values())) + + def test_preparation_excludes_all_donor_vr_files_and_records_replacement_origin(self): + with tempfile.TemporaryDirectory() as folder: + root = Path(folder) + apk = root / 'donor.apk' + vr_name = 'layer/libVkLayer_droiddeck_vr.so' + with ZipFile(apk, 'w') as package: + package.writestr(prepare.VR_PREFIX + vr_name, b'old library') + package.writestr(prepare.VR_PREFIX + 'obsolete.so', b'obsolete donor file') + package.writestr('assets/linuxfs/unchanged.so', b'unchanged component') + (root / 'app/build').mkdir(parents=True) + (root / 'app/build/runtime-inputs.json').write_text('{}') + vr_manifest = {'version': 1, 'source_commit': 'current', 'outputs': {vr_name: 'verified'}} + with mock.patch.object(prepare, 'ROOT', root), \ + mock.patch.object(prepare, 'check_sources', return_value={}), \ + mock.patch.object(prepare, 'DONOR_SHA256', prepare.runtime.digest(apk)), \ + mock.patch.object(prepare, 'REBUILT', {}), \ + mock.patch.object(prepare, 'JNI', ()), mock.patch.object(prepare, 'PREPARED', ()), \ + mock.patch.object(prepare, 'LOCAL_BUILD_PLUMBING', set()), \ + mock.patch.object(prepare, 'source_assets', return_value={}), \ + mock.patch.object(prepare, 'read_gamescope', return_value=({}, { + 'GAMESCOPE_REPO': 'repo', 'GAMESCOPE_TAG': 'tag', 'GAMESCOPE_SHA256': 'hash'})), \ + mock.patch.object(prepare, 'validate_tracked_assets', return_value={}), \ + mock.patch.object(prepare, 'git', return_value=b''), \ + mock.patch.object(prepare.runtime, 'record'), mock.patch.object(prepare.runtime, 'verify'), \ + mock.patch.object(prepare.vr_build, 'build', return_value=({vr_name: b'new library'}, vr_manifest)) as build: + prepare.prepare(apk, root, root, llvm_strip=root / 'bin/llvm-strip') + build.assert_called_once() + vr_folder = root / 'app/src/main' / prepare.VR_PREFIX + self.assertEqual((vr_folder / vr_name).read_bytes(), b'new library') + self.assertFalse((vr_folder / 'obsolete.so').exists()) + import json + provenance = json.loads((root / 'app/build/windows-runtime-provenance.json').read_text()) + self.assertEqual(provenance['vr_build'], vr_manifest) + self.assertIn('VR rebuilt', provenance['outputs']['app/src/main/' + prepare.VR_PREFIX + vr_name]['origin']) + + def test_invalid_cached_vr_stops_before_reading_or_staging_the_donor(self): + with tempfile.TemporaryDirectory() as folder: + root = Path(folder) + apk = root / 'donor.apk' + apk.write_bytes(b'donor') + with mock.patch.object(prepare, 'check_sources', return_value={}), \ + mock.patch.object(prepare, 'DONOR_SHA256', prepare.runtime.digest(apk)), \ + mock.patch.object(prepare, 'REBUILT', {}), \ + mock.patch.object(prepare, 'read_gamescope', return_value=({}, {})), \ + mock.patch.object(prepare.vr_build, 'validate', side_effect=ValueError('VR build is stale')), \ + mock.patch.object(prepare.vr_build, 'build') as build, \ + mock.patch.object(prepare, 'ZipFile') as archive: + with self.assertRaisesRegex(ValueError, 'VR build is stale'): + prepare.prepare(apk, root, root, rebuilt_vr=root, vk_include=root) + build.assert_not_called() + archive.assert_not_called() + + def test_current_helpers_are_allowed_only_when_restaged_from_source(self): + helpers = prepare.LOCAL_SESSION_HELPERS + sources = {prepare.ROOT / path: 'assets/linuxfs/' + path.split('/overlay/')[1] + for path in helpers} + for local_changes in (set(), helpers): + with self.subTest(local_changes=local_changes), \ + mock.patch.object(prepare, 'source_assets', return_value=sources), \ + mock.patch.object(prepare, 'changed', side_effect=[helpers, local_changes, helpers]), \ + mock.patch.object(prepare, 'git', side_effect=[prepare.DONOR_TREE.encode(), b'']): + classifications = prepare.check_sources() + self.assertEqual(set(classifications), helpers) + self.assertTrue(all('restaged from current source' in action + for action in classifications.values())) + with mock.patch.object(prepare, 'source_assets', return_value={}), \ + mock.patch.object(prepare, 'changed', return_value=helpers), \ + mock.patch.object(prepare, 'git', return_value=prepare.DONOR_TREE.encode()): + with self.assertRaisesRegex(ValueError, 'Sources changed since'): + prepare.check_sources() + + def test_cardboard_changes_are_compiled_by_gradle_not_reused_from_donor(self): + changed = {'app/src/main/cpp/waylandcomp/src/cardboard.c'} + with mock.patch.object(prepare, 'changed', side_effect=[changed, changed, changed]), \ + mock.patch.object(prepare, 'git', side_effect=[prepare.DONOR_TREE.encode(), b'']): + classifications = prepare.check_sources() + self.assertEqual(set(classifications), changed) + self.assertIn('compiled by Gradle; not imported', next(iter(classifications.values()))) + + def test_other_helper_changes_still_need_an_audit(self): + with mock.patch.object(prepare, 'git', return_value=prepare.DONOR_TREE.encode()), \ + mock.patch.object(prepare, 'changed', return_value={ + 'tools/linuxfs/overlay/usr/local/bin/droiddeck-session'}): + with self.assertRaisesRegex(ValueError, 'Sources changed since'): + prepare.check_sources() + + def test_uncommitted_native_changes_reject_donor_reuse(self): + with mock.patch.object(prepare, 'git', side_effect=[prepare.DONOR_TREE.encode(), b'']), \ + mock.patch.object(prepare, 'changed', side_effect=[set(), {'tools/linuxfs/preload/net.c'}]): + with self.assertRaisesRegex(ValueError, 'Unreviewed runtime'): + prepare.check_sources() + + def test_wrong_apk_hash_fails_before_replacement_or_output_access(self): + with tempfile.TemporaryDirectory() as folder: + apk = Path(folder) / 'incorrect.apk' + apk.write_bytes(b'incorrect donor') + with mock.patch.object(prepare, 'check_sources', return_value={}), \ + mock.patch.object(prepare, 'read_gamescope') as read_gamescope: + with self.assertRaisesRegex(ValueError, 'Donor APK checksum mismatch'): + prepare.prepare(apk, Path(folder) / 'missing', Path(folder) / 'missing.tzst') + read_gamescope.assert_not_called() + + def test_sdk_bridge_is_compiled_locally_while_other_untracked_native_files_fail(self): + with mock.patch.object(prepare, 'source_assets', return_value={}), \ + mock.patch.object(prepare, 'changed', side_effect=[set(), {'app/src/main/cpp/CMakeLists.txt'}, set()]), \ + mock.patch.object(prepare, 'git', side_effect=[prepare.DONOR_TREE.encode(), + b'app/src/main/cpp/viture/sdk_bridge.cpp\0app/src/main/cpp/viture/stereo_frame_gate.h\0']): + classifications = prepare.check_sources() + self.assertEqual(set(classifications), {'app/src/main/cpp/CMakeLists.txt', + 'app/src/main/cpp/viture/sdk_bridge.cpp', + 'app/src/main/cpp/viture/stereo_frame_gate.h'}) + self.assertTrue(all('compiled by Gradle' in action for action in classifications.values())) + with mock.patch.object(prepare, 'changed', side_effect=[set(), set()]), \ + mock.patch.object(prepare, 'git', side_effect=[prepare.DONOR_TREE.encode(), + b'app/src/main/cpp/unreviewed.cpp\0']): + with self.assertRaisesRegex(ValueError, 'Unreviewed runtime'): + prepare.check_sources() + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_proot_statx_mnt_id.py b/tools/tests/test_proot_statx_mnt_id.py new file mode 100644 index 0000000000..e3dd59658e --- /dev/null +++ b/tools/tests/test_proot_statx_mnt_id.py @@ -0,0 +1,133 @@ +import shutil +import subprocess +import sys +import tempfile +from pathlib import Path +import unittest + +PROOT = Path(__file__).resolve().parents[1] / "proot" + +PROGRAM = r""" +#define _GNU_SOURCE +#include <fcntl.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <unistd.h> +#include "statx_mnt_id.h" + +static int fdinfo_mnt_id(int fd, uint64_t *out) { + char path[64], line[256]; + snprintf(path, sizeof path, "/proc/self/fdinfo/%d", fd); + FILE *f = fopen(path, "r"); + if (!f) return 0; + int found = 0; + while (fgets(line, sizeof line, f)) { + unsigned long long id; + if (sscanf(line, "mnt_id:%llu", &id) == 1) { + *out = (uint64_t)id; + found = 1; + break; + } + } + fclose(f); + return found; +} + +int main(void) { + char name[] = "/tmp/droiddeck-statx-mnt-id-XXXXXX"; + int fd = mkstemp(name); + if (fd < 0) return 1; + + struct stat st; + if (fstat(fd, &st) < 0) return 2; + uint64_t expected; + if (!fdinfo_mnt_id(fd, &expected) || expected == 0) return 3; + + /* Model a successful pre-5.8 statx: inode fields are present, MNT_ID is absent. */ + struct statx result = {0}; + result.stx_mask = STATX_TYPE | STATX_INO; + result.stx_mode = st.st_mode; + result.stx_ino = st.st_ino; + result.stx_dev_major = major(st.st_dev); + result.stx_dev_minor = minor(st.st_dev); + unsigned flags = AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW; + unsigned mask = STATX_TYPE | STATX_INO | STATX_MNT_ID; + if (!droiddeck_proot_statx_fill_mnt_id(getpid(), fd, flags, "", mask, &result)) return 4; + if (!(result.stx_mask & STATX_MNT_ID) || result.stx_mnt_id != expected) return 5; + + /* A reused fd can name the same inode number on another device. Inode alone is not identity. */ + result.stx_mask = STATX_TYPE | STATX_INO; + result.stx_dev_major = major(st.st_dev) ^ 1U; + result.stx_dev_minor = minor(st.st_dev); + if (droiddeck_proot_statx_fill_mnt_id(getpid(), fd, flags, "", mask, &result)) return 6; + if (result.stx_mask & STATX_MNT_ID) return 7; + + /* Only ordinary MNT_ID is reconstructed; never claim the newer UNIQUE bit. */ + result.stx_ino = st.st_ino; + result.stx_dev_major = major(st.st_dev); + result.stx_dev_minor = minor(st.st_dev); + if (droiddeck_proot_statx_fill_mnt_id(getpid(), fd, flags, "", 0x4000U, &result)) return 8; + if (result.stx_mask & STATX_MNT_ID) return 9; + + if (droiddeck_proot_statx_fill_mnt_id(getpid(), AT_FDCWD, flags, "", mask, &result)) return 10; + if (droiddeck_proot_statx_fill_mnt_id(getpid(), -1, flags, "", mask, &result)) return 11; + if (droiddeck_proot_statx_fill_mnt_id(getpid(), fd, AT_SYMLINK_NOFOLLOW, "", mask, &result)) return 12; + if (droiddeck_proot_statx_fill_mnt_id(getpid(), fd, flags, "file", mask, &result)) return 13; + int stale = dup(fd); + if (stale < 0 || close(stale) < 0) return 14; + if (droiddeck_proot_statx_fill_mnt_id(getpid(), stale, flags, "", mask, &result)) return 15; + + /* Pin the original referent, then reuse its tracee fd number. The pin's fdinfo stays stable, + * while recovery against the reused number must reject the different inode/device. */ + char replacement_name[] = "/tmp/droiddeck-statx-mnt-id-replacement-XXXXXX"; + int replacement = mkstemp(replacement_name); + if (replacement < 0) return 16; + int pinned; + char path[64]; + snprintf(path, sizeof path, "/proc/%ld/fd/%d", (long)getpid(), fd); + pinned = open(path, O_PATH | O_CLOEXEC); + if (pinned < 0) return 17; + uint64_t pinned_mnt_id, pinned_ino; + if (!droiddeck_proot_read_fdinfo(pinned, &pinned_mnt_id, &pinned_ino) || + pinned_mnt_id != expected || pinned_ino != st.st_ino) return 18; + + struct stat replacement_st; + if (fstat(replacement, &replacement_st) < 0) return 19; + if (replacement_st.st_dev == st.st_dev && replacement_st.st_ino == st.st_ino) return 20; + unlink(name); + if (close(fd) < 0 || dup2(replacement, fd) != fd) return 21; + close(replacement); + unlink(replacement_name); + + result.stx_mask = STATX_TYPE | STATX_INO; + result.stx_ino = st.st_ino; + result.stx_dev_major = major(st.st_dev); + result.stx_dev_minor = minor(st.st_dev); + if (droiddeck_proot_statx_fill_mnt_id(getpid(), fd, flags, "", mask, &result)) return 22; + if (result.stx_mask & STATX_MNT_ID) return 23; + if (!droiddeck_proot_read_fdinfo(pinned, &pinned_mnt_id, &pinned_ino) || + pinned_mnt_id != expected || pinned_ino != st.st_ino) return 24; + + close(pinned); + close(fd); + return 0; +} +""" + + +@unittest.skipUnless(shutil.which("cc") and sys.platform.startswith("linux"), "requires Linux and a C compiler") +class ProotStatxMountIdTest(unittest.TestCase): + def test_missing_mount_id_is_recovered_only_for_the_same_open_inode(self): + with tempfile.TemporaryDirectory() as tmp: + source = Path(tmp) / "test.c" + program = Path(tmp) / "test" + source.write_text(PROGRAM) + subprocess.run(["cc", "-O2", "-Wall", "-Werror", "-I", str(PROOT), "-o", str(program), str(source)], check=True) + subprocess.run([str(program)], check=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_proton_extra.py b/tools/tests/test_proton_extra.py new file mode 100644 index 0000000000..e7fc6bda34 --- /dev/null +++ b/tools/tests/test_proton_extra.py @@ -0,0 +1,105 @@ +import contextlib +import hashlib +import io +import os +from pathlib import Path +import runpy +import subprocess +import tarfile +import tempfile +import unittest +from unittest import mock + +BIN = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin" +EXTRA = runpy.run_path(str(BIN / "droiddeck-proton-extra")) +GLOBALS = EXTRA["pick_asset"].__globals__ + + +def asset(name): + return {"name": name, "browser_download_url": "https://github.com/o/r/releases/download/t/" + name} + + +def droiddeck_release(ver, prerelease=False, draft=False): + stem = "DroidDeck-Proton-%s-aarch64" % ver + return {"tag_name": "DroidDeck-Proton-" + ver, "prerelease": prerelease, "draft": draft, + "assets": [asset(stem + ".build-info.json"), asset(stem + ".sha512sum"), asset(stem + ".tar.gz")]} + + +class ProtonExtraTest(unittest.TestCase): + def test_sources_and_their_arm64_assets(self): + self.assertEqual(list(EXTRA["SOURCES"]), ["ge", "cachyos", "droiddeck"]) + repo, pattern = EXTRA["SOURCES"]["droiddeck"] + self.assertEqual(repo, "Droid-Deck/DroidDeck-Proton") + self.assertTrue(pattern.search("DroidDeck-Proton-11-7.5-aarch64.tar.gz")) + self.assertTrue(pattern.search("DroidDeck-Proton-11-8-aarch64.tar.xz")) + self.assertFalse(pattern.search("DroidDeck-Proton-11-7.5-aarch64.sha512sum")) + self.assertFalse(pattern.search("DroidDeck-Proton-11-7.5-aarch64.build-info.json")) + + def test_the_newest_full_release_with_its_sha512_file(self): + releases = [droiddeck_release("11-8", prerelease=True), droiddeck_release("11-7.9", draft=True), droiddeck_release("11-7.5")] + with mock.patch.dict(GLOBALS, {"fetch_json": lambda url: releases}): + tag, url, sums = EXTRA["pick_asset"]("droiddeck") + self.assertEqual(tag, "DroidDeck-Proton-11-7.5") + self.assertTrue(url.endswith("/DroidDeck-Proton-11-7.5-aarch64.tar.gz")) + self.assertTrue(sums.endswith("/DroidDeck-Proton-11-7.5-aarch64.sha512sum")) + with mock.patch.dict(GLOBALS, {"fetch_json": lambda url: [droiddeck_release("11-8", prerelease=True)]}): + self.assertEqual(EXTRA["pick_asset"]("droiddeck"), (None, None, None)) + + def test_a_tagged_release_is_fetched_by_its_tag(self): + asked = [] + with mock.patch.dict(GLOBALS, {"fetch_json": lambda url: asked.append(url) or droiddeck_release("11-7.5")}): + tag, url, sums = EXTRA["release_asset"]("droiddeck", "DroidDeck-Proton-11-7.5") + self.assertEqual(asked, ["https://api.github.com/repos/Droid-Deck/DroidDeck-Proton/releases/tags/DroidDeck-Proton-11-7.5"]) + self.assertTrue(url.endswith(".tar.gz") and sums.endswith(".sha512sum")) + + def test_a_ge_style_sha512_file_verifies_the_download(self): + with tempfile.TemporaryDirectory() as tmp: + tarball = Path(tmp) / "DroidDeck-Proton-11-7.5-aarch64.tar.gz" + tarball.write_bytes(b"tarball") + line = "%s %s\n" % (hashlib.sha512(b"tarball").hexdigest(), tarball.name) + + class Reply(io.BytesIO): + def __exit__(self, *exc): + return False + + with mock.patch.object(GLOBALS["urllib"].request, "urlopen", lambda req, timeout: Reply(line.encode())), \ + contextlib.redirect_stdout(io.StringIO()) as said: + EXTRA["verify"](str(tarball), "https://example/sums") + self.assertIn("checksum ok", said.getvalue()) + self.assertTrue(tarball.exists()) + bad = "%s %s\n" % ("0" * 128, tarball.name) + with mock.patch.object(GLOBALS["urllib"].request, "urlopen", lambda req, timeout: Reply(bad.encode())), \ + contextlib.redirect_stdout(io.StringIO()), self.assertRaises(SystemExit): + EXTRA["verify"](str(tarball), "https://example/sums") + self.assertFalse(tarball.exists()) + + def test_a_top_folder_with_a_space_is_installed_under_its_own_name(self): + with tempfile.TemporaryDirectory() as tmp: + src = Path(tmp) / "src" / "DroidDeck-Proton 11-7.5" + (src / "files/bin").mkdir(parents=True) + (src / "proton").write_text("#!/usr/bin/python3\n") + (src / "toolmanifest.vdf").write_text('"manifest" { "commandline" "/proton %verb%" }') + (src / "compatibilitytool.vdf").write_text( + '"compatibilitytools" { "compat_tools" { "DroidDeck-Proton-11-7.5" { "install_path" "." ' + '"display_name" "DroidDeck-Proton 11-7.5" } } }') + (src / "version").write_text("1791000000 DroidDeck-Proton-11-7.5\n") + tarball = Path(tmp) / "DroidDeck-Proton-11-7.5-aarch64.tar.gz" + with tarfile.open(tarball, "w:gz") as tar: + tar.add(src, arcname=src.name) + steam = Path(tmp) / "Steam" + adopted = [] + real = subprocess.call + fake = lambda args, **kw: adopted.append(args) or 0 if args[0] == "steam-compatibility" else real(args, **kw) + with mock.patch.object(GLOBALS["subprocess"], "call", fake), contextlib.redirect_stdout(io.StringIO()) as said: + with mock.patch.object(GLOBALS["sys"], "argv", ["droiddeck-proton-extra", str(steam), str(tarball)]): + EXTRA["main"]() + tools = steam / "compatibilitytools.d" + self.assertEqual(sorted(os.listdir(tools)), [".droiddeck-download", "DroidDeck-Proton 11-7.5"]) + self.assertTrue((tools / "DroidDeck-Proton 11-7.5" / "toolmanifest.vdf").is_file()) + self.assertEqual(adopted, [["steam-compatibility", str(steam)]]) + self.assertIn("droiddeck-proton-extra: installed DroidDeck-Proton 11-7.5\n", said.getvalue()) + self.assertEqual(EXTRA["installed"](str(tools)), ["DroidDeck-Proton 11-7.5"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_quest_kgsl.py b/tools/tests/test_quest_kgsl.py new file mode 100644 index 0000000000..4ce7ae0f63 --- /dev/null +++ b/tools/tests/test_quest_kgsl.py @@ -0,0 +1,23 @@ +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import unittest + +QUEST = Path(__file__).resolve().parents[1] / 'quest' + + +@unittest.skipUnless(sys.platform == 'linux' and shutil.which('gcc'), 'needs Linux and gcc') +class QuestKgslTest(unittest.TestCase): + def test_allocation_passthrough_translation_and_cleanup(self): + with tempfile.TemporaryDirectory() as folder: + binary = str(Path(folder) / 'test-kgsl') + subprocess.run(['gcc', '-Wall', '-Wextra', '-Werror', '-O2', '-o', binary, + str(QUEST / 'test_kgsl_compat.c'), str(QUEST / 'kgsl_compat.c')], check=True) + result = subprocess.run([binary], capture_output=True, text=True, check=True, timeout=10) + self.assertIn('PASS: 12 GPUOBJ', result.stdout) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_quest_presentation.py b/tools/tests/test_quest_presentation.py new file mode 100644 index 0000000000..9c87926e40 --- /dev/null +++ b/tools/tests/test_quest_presentation.py @@ -0,0 +1,75 @@ +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + +ROOT = Path(__file__).resolve().parents[2] + + +@unittest.skipUnless(shutil.which('cc'), 'needs a C compiler') +class QuestBackdropTest(unittest.TestCase): + def test_first_frame_requires_client_content(self): + # Compile the real entrypoint with controlled layer outcomes, including the + # successful no-op that previously dismissed the loading UI on a black frame. + source = (ROOT / 'app/src/main/cpp/waylandcomp/src/vk_present.c').read_text() + start = source.index('\nint vkp_render(') + end = source.index('\nint vkp_render_hdr(', start) + with tempfile.TemporaryDirectory() as folder: + work = Path(folder) + (work / 'vkp_render_under_test.inc').write_text(source[start:end]) + binary = work / 'test-first-frame' + subprocess.run(['cc', '-std=c11', '-Wall', '-Wextra', + '-Wno-unused-parameter', '-Wno-unused-function', f'-I{work}', + str(ROOT / 'tools/quest/test_first_frame.c'), '-o', str(binary)], + check=True, capture_output=True, text=True) + result = subprocess.run([str(binary)], capture_output=True, text=True, timeout=10) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + self.assertIn('PASS: Quest first-frame', result.stdout) + + def test_backdrop_lifecycle_and_failed_buffer_initialization(self): + with tempfile.TemporaryDirectory() as folder: + work = Path(folder) + android = work / 'android' + android.mkdir() + (android / 'rect.h').write_text('''#pragma once +#include <stdint.h> +typedef struct ARect { int32_t left, top, right, bottom; } ARect; +''') + (android / 'native_window.h').write_text('''#pragma once +typedef struct ANativeWindow ANativeWindow; +''') + (android / 'hardware_buffer.h').write_text('''#pragma once +#include <stdint.h> +#include "rect.h" +typedef struct AHardwareBuffer AHardwareBuffer; +typedef struct { uint32_t width,height,layers,format; uint64_t usage; + uint32_t stride,rfu0; uint64_t rfu1; } AHardwareBuffer_Desc; +#define AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM 1 +#define AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM 0x2b +#define AHARDWAREBUFFER_USAGE_CPU_READ_RARELY 2ULL +#define AHARDWAREBUFFER_USAGE_CPU_WRITE_RARELY 32ULL +#define AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE 256ULL +#define AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT 512ULL +#define AHARDWAREBUFFER_USAGE_COMPOSER_OVERLAY 2048ULL +int AHardwareBuffer_allocate(const AHardwareBuffer_Desc *, AHardwareBuffer **); +void AHardwareBuffer_describe(const AHardwareBuffer *, AHardwareBuffer_Desc *); +int AHardwareBuffer_lock(AHardwareBuffer *, uint64_t, int32_t, const ARect *, void **); +int AHardwareBuffer_unlock(AHardwareBuffer *, int32_t *); +void AHardwareBuffer_release(AHardwareBuffer *); +''') + binary = work / 'test-presentation' + subprocess.run(['cc', '-std=c11', '-O1', '-g', '-Wall', '-Wextra', + '-Wno-unused-parameter', '-Wno-unused-function', + '-ffunction-sections', '-fdata-sections', '-Wl,--gc-sections', + '-fsanitize=address,undefined', f'-I{work}', + f'-I{ROOT}/app/src/main/cpp/waylandcomp/prebuilt/include', + str(ROOT / 'tools/quest/test_presentation.c'), '-ldl', '-pthread', + '-o', str(binary)], check=True, capture_output=True, text=True) + result = subprocess.run([str(binary)], capture_output=True, text=True, timeout=10) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + self.assertIn('PASS: Quest backdrop', result.stdout) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_quest_xr_validation.py b/tools/tests/test_quest_xr_validation.py new file mode 100644 index 0000000000..1bffb9ccd7 --- /dev/null +++ b/tools/tests/test_quest_xr_validation.py @@ -0,0 +1,85 @@ +import sys +import unittest +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +from test_quest_xr import collect_device_metrics, summarize_samples, validate_samples +import subprocess + + +class QuestXrValidationTest(unittest.TestCase): + def samples(self, source='frames'): + return [{'rendered': count, 'sessionState': 5, 'headFlags': 15, 'source': source, + 'controllersActive': [False, False], 'guestFrames': count, + 'uploadedFrames': count, 'sourceFrameId': count + 1, 'steamvrState': 4} + for count in (0, 144)] + + def test_requires_owned_frame_projection(self): + self.assertIsNone(validate_samples(self.samples())) + self.assertEqual('Wrong projection source', validate_samples(self.samples('surface'))) + + def test_position_must_be_tracked_not_merely_valid(self): + samples = self.samples() + for sample in samples: + sample['headFlags'] = 7 + self.assertIn('tracked 6DoF', validate_samples(samples)) + + def test_optional_controllers_cannot_be_claimed_as_tested(self): + self.assertIn('controllers', validate_samples(self.samples(), require_controllers=True)) + + def test_one_early_tracked_sample_cannot_hide_final_tracking_loss(self): + samples = self.samples() + samples[-1]['headFlags'] = 7 + self.assertIn('final sample', validate_samples(samples)) + samples[-1]['headFlags'] = 15 + samples[-1]['sessionState'] = 4 + self.assertIn('final sample', validate_samples(samples)) + + def test_measured_rates_are_separate_from_runtime_refresh(self): + samples = self.samples('frames') + samples[0]['_hostMonotonicSeconds'] = 10 + samples[-1]['_hostMonotonicSeconds'] = 12 + samples[-1]['periodNs'] = 8333333 + summary = summarize_samples(samples) + self.assertEqual(summary['observedSeconds'], 2) + self.assertEqual(summary['ratesHz']['uploadedFrames'], 72) + self.assertAlmostEqual(summary['runtimeRefreshHz'], 120, places=3) + self.assertEqual(summary['focusedTrackedFraction'], 1) + samples[-1]['uploadedFrames'] = -1 + self.assertIsNone(summarize_samples(samples)['ratesHz']['uploadedFrames']) + self.assertIsNone(summarize_samples(self.samples())['observedSeconds']) + self.assertIsNone(summarize_samples([])['focusedTrackedFraction']) + + def test_metrics_failures_stay_unavailable_without_privileged_fallback(self): + commands = [] + def adb(*command): + commands.append(command) + if command[-1] == 'battery': + return 'temperature: 310' + raise subprocess.CalledProcessError(1, command, stderr='Permission denied') + metrics = collect_device_metrics(adb, 'com.droiddeck.launcher') + self.assertEqual(len(commands), 3) + self.assertTrue(metrics['battery']['available']) + self.assertFalse(metrics['thermal']['available']) + self.assertFalse(metrics['memory']['available']) + + def test_steamvr_requires_owned_images_and_source_frame_ids(self): + samples = self.samples('frames') + self.assertIsNone(validate_samples(samples)) + samples[-1]['uploadedFrames'] = 0 + self.assertIn('owned SteamVR images', validate_samples(samples)) + samples[-1]['uploadedFrames'] = 144 + samples[-1]['sourceFrameId'] = samples[0]['sourceFrameId'] + self.assertIn('frame IDs', validate_samples(samples)) + + def test_running_process_alone_is_not_success(self): + samples = self.samples('frames') + samples[-1]['rendered'] = 0 + self.assertIn('stereo frames', validate_samples(samples)) + samples[-1]['rendered'] = 144 + samples[-1]['steamvrState'] = 3 + self.assertIn('RUNNING', validate_samples(samples)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_request_fex.py b/tools/tests/test_request_fex.py index 43d032a344..11c77c0853 100644 --- a/tools/tests/test_request_fex.py +++ b/tools/tests/test_request_fex.py @@ -32,8 +32,10 @@ class RequestFexTest(unittest.TestCase): "start steam://install/1628350", "end steam://install/1628350"], self.log.read_text().splitlines()) self.install("1628350") + self.assertEqual(["4183110"], COMPAT["request_fex"](str(self.root), asked)) + self.install("4183110") self.assertEqual([], COMPAT["request_fex"](str(self.root), asked)) - self.assertEqual({"3127680", "1628350"}, asked) + self.assertEqual({"3127680", "1628350", "4183110"}, asked) def test_a_declined_install_is_not_asked_again_in_the_same_session(self): asked = set() diff --git a/tools/tests/test_run_windows.py b/tools/tests/test_run_windows.py new file mode 100644 index 0000000000..143fba9257 --- /dev/null +++ b/tools/tests/test_run_windows.py @@ -0,0 +1,76 @@ +"""Exercise the Windows launcher without building an APK or contacting a phone.""" +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + + +POWERSHELL = shutil.which('pwsh') or shutil.which('powershell') +SCRIPT = Path(__file__).resolve().parents[1] / 'run_windows.ps1' + + +@unittest.skipUnless(os.name == 'nt' and POWERSHELL, 'Windows PowerShell launcher') +class WindowsLauncherTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory(prefix='droiddeck windows launcher ') + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + (self.root / 'tools').mkdir() + shutil.copyfile(SCRIPT, self.root / 'tools/run_windows.ps1') + self.calls = self.root / 'calls.txt' + (self.root / 'gradlew.bat').write_text( + '@echo off\necho gradle JAVA_HOME=%JAVA_HOME%>>"%DROIDDECK_TEST_CALLS%"\n' + 'exit /b %DROIDDECK_TEST_GRADLE_EXIT%\n') + (self.root / 'adb.cmd').write_text( + '@echo off\necho adb %*>>"%DROIDDECK_TEST_CALLS%"\nexit /b 0\n') + self.env = dict(os.environ, JAVA_HOME=r'C:\provided-java', + DROIDDECK_TEST_CALLS=str(self.calls), DROIDDECK_TEST_GRADLE_EXIT='0') + self.env['PATH'] = str(self.root) + os.pathsep + self.env.get('PATH', '') + + def launch(self): + return subprocess.run( + [POWERSHELL, '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', + '-File', str(self.root / 'tools/run_windows.ps1'), '-Serial', 'test-phone'], + env=self.env, cwd=self.root, capture_output=True, text=True, timeout=30) + + def test_missing_optional_configs_keep_environment_java_and_base_package(self): + result = self.launch() + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + calls = self.calls.read_text().splitlines() + self.assertEqual(calls[0], r'gradle JAVA_HOME=C:\provided-java') + self.assertEqual(calls[1], 'adb -s test-phone install -r app/build/outputs/apk/debug/app-debug.apk') + self.assertEqual(calls[2], 'adb -s test-phone shell am start -W -n ' + 'com.droiddeck.launcher/com.droiddeck.launcher.MainActivity') + + def test_existing_configs_select_java_and_suffixed_package(self): + (self.root / '.gradle').mkdir() + (self.root / '.gradle/config.properties').write_text('java.home=C\\:\\\\configured-java\n') + (self.root / 'local.properties').write_text('droiddeck.debugApplicationIdSuffix=.xr\n') + result = self.launch() + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + calls = self.calls.read_text().splitlines() + self.assertEqual(calls[0], r'gradle JAVA_HOME=C:\configured-java') + self.assertTrue(calls[2].endswith('com.droiddeck.launcher.xr/com.droiddeck.launcher.MainActivity')) + + def test_empty_configs_use_defaults(self): + (self.root / '.gradle').mkdir() + (self.root / '.gradle/config.properties').touch() + (self.root / 'local.properties').touch() + result = self.launch() + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + calls = self.calls.read_text().splitlines() + self.assertEqual(calls[0], r'gradle JAVA_HOME=C:\provided-java') + self.assertTrue(calls[2].endswith('com.droiddeck.launcher/com.droiddeck.launcher.MainActivity')) + + def test_build_failure_still_stops_before_installation(self): + self.env['DROIDDECK_TEST_GRADLE_EXIT'] = '1' + result = self.launch() + self.assertNotEqual(result.returncode, 0) + self.assertIn('Android build failed.', result.stderr) + self.assertEqual(self.calls.read_text().splitlines(), [r'gradle JAVA_HOME=C:\provided-java']) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_runtime_inputs.py b/tools/tests/test_runtime_inputs.py index b2f2f02a55..e895c3a572 100644 --- a/tools/tests/test_runtime_inputs.py +++ b/tools/tests/test_runtime_inputs.py @@ -1,11 +1,12 @@ import importlib.util import gzip import io -from pathlib import Path +from pathlib import Path, PureWindowsPath import subprocess import tarfile import tempfile import unittest +from unittest import mock from zipfile import ZipFile @@ -55,6 +56,20 @@ class RuntimeInputsTest(unittest.TestCase): with self.assertRaisesRegex(ValueError, 'sources changed'): runtime.verify(self.root) + def test_changed_quest_source_rejects_old_outputs(self): + source = self.root / 'tools/quest/kgsl_compat.c' + source.parent.mkdir(parents=True) + source.write_text('old compatibility code') + runtime.record(self.root) + source.write_text('new compatibility code') + with self.assertRaisesRegex(ValueError, 'sources changed'): + runtime.verify(self.root) + + def test_missing_quest_driver_cannot_be_attested(self): + (self.root / 'app/build/prepared-assets/graphics_driver/adrenotools-turnip25.1.0-quest1.tzst').unlink() + with self.assertRaisesRegex(ValueError, 'quest1.tzst'): + runtime.record(self.root) + def test_modified_prebuilt_binary_is_rejected(self): runtime.record(self.root) (self.root / 'app/src/main/jniLibs/arm64-v8a/libproot.so').write_bytes(b'old APK binary') @@ -81,6 +96,29 @@ class RuntimeInputsTest(unittest.TestCase): package.writestr(name, (self.root / output['path']).read_bytes()) runtime.check_apk(apk, self.root) + def test_windows_manifest_matches_portable_apk_paths(self): + path_type = type(self.root) + original_relative_to = path_type.relative_to + + def windows_relative_to(path, *args, **kwargs): + return PureWindowsPath(original_relative_to(path, *args, **kwargs)) + + with mock.patch.object(path_type, 'relative_to', windows_relative_to): + runtime.record(self.root) + data = runtime.verify(self.root) + self.assertIn('tools/linuxfs/preload/test.c', data['sources']) + nested_asset = 'assets/linuxfs/usr/local/bin/gamescope' + self.assertEqual(data['outputs'][nested_asset]['path'], 'app/src/main/' + nested_asset) + for name in data['sources']: + self.assertNotIn('\\', name) + apk = self.root / 'portable.apk' + with ZipFile(apk, 'w') as package: + for name, output in data['outputs'].items(): + self.assertNotIn('\\', name) + self.assertNotIn('\\', output['path']) + package.writestr(name, (self.root / output['path']).read_bytes()) + runtime.check_apk(apk, self.root) + def test_android_expanding_or_renaming_a_compressed_inventory_is_rejected(self): runtime.record(self.root) data = runtime.verify(self.root) diff --git a/tools/tests/test_seed_redists.py b/tools/tests/test_seed_redists.py index 1f9e2ae71c..e236723185 100644 --- a/tools/tests/test_seed_redists.py +++ b/tools/tests/test_seed_redists.py @@ -22,8 +22,6 @@ GAME_SCRIPT = r'''"InstallScript" } ''' -# Red Dead Redemption 2's own script: Proton needs Khronos' vulkan-1.dll for it, which only the -# Vulkan runtime installer puts in the prefix. VULKAN_SCRIPT = r'''"InstallScript" { "Run Process" @@ -102,6 +100,53 @@ class SeedRedistsTest(unittest.TestCase): self.run_seed() self.assertIn('"VCRedist2022"=dword:00000001', self.reg.read_text()) + def test_markers_a_replaced_registry_lost_are_seeded_again(self): + self.game() + stock = self.reg.read_text() + self.run_seed() + ledger = (self.reg.parent / ".droiddeck-redists").read_text() + self.assertIn("VCRedist2022", ledger) + self.reg.write_text(stock) + self.run_seed() + reg = self.reg.read_text() + self.assertEqual(reg.count('"VCRedist2022"=dword:00000001'), 2, "both views again") + self.assertIn("[Software\\\\Microsoft\\\\VisualStudio\\\\14.0\\\\VC\\\\Runtimes\\\\x86]", reg) + self.assertEqual(sorted((self.reg.parent / ".droiddeck-redists").read_text().splitlines()), sorted(ledger.splitlines())) + self.run_seed() + self.assertEqual(reg, self.reg.read_text()) + + def test_a_marker_kept_in_only_one_view_is_seeded_again(self): + self.game() + self.run_seed() + wow = "[Software\\\\Wow6432Node\\\\Valve\\\\Steam\\\\Apps\\\\CommonRedist\\\\vcredist\\\\2022]" + blocks = self.reg.read_text().split("\n\n") + self.reg.write_text("\n\n".join(b for b in blocks if not (b.startswith(wow) and '"VCRedist2022"' in b))) + self.assertEqual(self.reg.read_text().count('"VCRedist2022"'), 1) + self.run_seed() + reg = self.reg.read_text() + self.assertEqual(reg.count('"VCRedist2022"'), 3, "the one left plus both views again") + self.assertTrue(any(b.startswith(wow) and '"VCRedist2022"' in b for b in reg.split("\n\n"))) + + def test_a_vc_runtime_another_architecture_lost_is_seeded_again(self): + self.run_seed() + arm64 = "[Software\\\\Wow6432Node\\\\Microsoft\\\\VisualStudio\\\\14.0\\\\VC\\\\Runtimes\\\\arm64]" + blocks = self.reg.read_text().split("\n\n") + self.reg.write_text("\n\n".join(b for b in blocks if not b.startswith(arm64))) + self.assertNotIn(arm64, self.reg.read_text()) + self.run_seed() + reg = self.reg.read_text() + self.assertIn(arm64, reg) + self.assertEqual(reg.count("[Software\\\\Microsoft\\\\VisualStudio\\\\14.0\\\\VC\\\\Runtimes\\\\x86]"), 2) + + def test_a_marker_written_in_one_view_only_is_kept_as_it_is(self): + self.game(script=GAME_SCRIPT.replace("Software\\\\Valve\\\\Steam\\\\Apps\\\\CommonRedist\\\\vcredist\\\\2022", "SOFTWARE\\\\AGEIA Technologies").replace("VCRedist2022", "PhysX Version")) + self.run_seed() + once = self.reg.read_text() + self.assertEqual(once.count('"PhysX Version"=dword:00000001'), 1) + result = self.run_seed() + self.assertEqual(once, self.reg.read_text()) + self.assertNotIn("gone", result.stdout) + def test_an_evaluator_script_nested_deeper_is_read(self): script = self.tmp / "legacycompat/evaluatorscript_409710.vdf" script.parent.mkdir(parents=True) @@ -148,7 +193,6 @@ class SeedRedistsTest(unittest.TestCase): self.assertIn('"Other"=dword:00000001', reg) self.assertNotIn("Vulkan111080", (self.reg.parent / ".droiddeck-redists").read_text()) self.assertEqual(int(self.reg.stat().st_mtime), 1_000_000_000) - # The client writes the marker itself once the installer has run; that one is left alone. with self.reg.open("a") as out: out.write('\n[Software\\\\Valve\\\\Steam\\\\Apps\\\\1174180] 1791730000\n"Vulkan111080"=dword:00000001\n') self.run_seed() diff --git a/tools/tests/test_session_assets.py b/tools/tests/test_session_assets.py index 6d20abc03e..14052c9d3a 100644 --- a/tools/tests/test_session_assets.py +++ b/tools/tests/test_session_assets.py @@ -37,3 +37,9 @@ class SessionAssetsTest(unittest.TestCase): with ZipFile(self.apk, 'w') as package: package.writestr(self.name, self.helper.read_bytes()) self.assertEqual([], assets.check(self.apk, self.overlay)) + + def test_bundled_helper_must_also_be_extracted(self): + self.assertEqual(['not extracted at session start: usr/local/bin/droiddeck-login1'], + assets.check_extraction(self.overlay, '')) + mapping = '"usr/local/bin/droiddeck-login1" to "usr/local/bin/droiddeck-login1"' + self.assertEqual([], assets.check_extraction(self.overlay, mapping)) diff --git a/tools/tests/test_session_cursor_routing.py b/tools/tests/test_session_cursor_routing.py new file mode 100644 index 0000000000..fdc88f75d8 --- /dev/null +++ b/tools/tests/test_session_cursor_routing.py @@ -0,0 +1,37 @@ +"""The XTest cursor path is enabled only for Steam sessions.""" +import os +from pathlib import Path +import re +import subprocess +import unittest + +SESSION = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin/droiddeck-session' +SOURCE = SESSION.read_text() +MATCH = re.search( + r'^ if \[ "\$mode" = steam \]; then\n.*?^ fi\n', SOURCE, re.M | re.S) +assert MATCH is not None +CURSOR_SETUP = MATCH.group(0) + + +class SessionCursorRoutingTest(unittest.TestCase): + def run_setup(self, mode, initial=None): + env = dict(os.environ, mode=mode) + if initial is not None: + env['gamescope_cursor_composite'] = initial + else: + env.pop('gamescope_cursor_composite', None) + result = subprocess.run( + ['bash', '-c', CURSOR_SETUP + 'printf "%s\n" "${gamescope_cursor_composite-}"'], + env=env, text=True, capture_output=True, check=True) + return result.stdout.strip() + + def test_steam_enables_manual_composition_for_the_nested_cursor(self): + self.assertEqual('2', self.run_setup('steam')) + + def test_other_sessions_keep_their_existing_cursor_composition(self): + self.assertEqual('', self.run_setup('desktop')) + self.assertEqual('1', self.run_setup('run', '1')) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_session_guest_command.py b/tools/tests/test_session_guest_command.py new file mode 100644 index 0000000000..9c319ce951 --- /dev/null +++ b/tools/tests/test_session_guest_command.py @@ -0,0 +1,65 @@ +"""Exercise the literal launch prefix from SessionService without an Android runtime. + +This is a focused source/exec regression check, not a Kotlin or PRoot integration +test. PRoot executes the first guest argument directly; KEY=VALUE is meaningful +only after /usr/bin/env. Read the production prefix rather than duplicate it. +""" +import json +from pathlib import Path +import re +import subprocess +import unittest + + +SERVICE = Path(__file__).resolve().parents[2] / ( + "app/src/main/java/com/droiddeck/launcher/session/SessionService.kt") + +VARIANTS = Path(__file__).resolve().parents[1] / "release/variants.txt" +PACKAGES = [line.split()[1] for line in VARIANTS.read_text().splitlines() + if line.strip() and not line.startswith("#")] + + +def guest_prefix(package): + source = SERVICE.read_text() + before_environment = source.split("val guest = ArrayList<String>()", 1)[1].split( + "addClientEnvironment(guest, steamHere)", 1)[0] + environment = source.split("private fun addClientEnvironment(", 1)[1].split( + 'guest.add("HOME=/root")', 1)[0] + prefix = [] + for line in (before_environment + environment).splitlines(): + line = line.strip() + if not line.startswith("guest.add("): + continue + expression = line[len("guest.add("):-1] + match = re.fullmatch(r'("[^"\\]*")(?: \+ (.+))?', expression) + if match is None: + raise AssertionError("Launch prefix changed; update its regression harness: " + line) + value = json.loads(match[1]) + if match[2]: + if match[2] != "com.droiddeck.launcher.runtime.BwrapSpawner.socket(this)": + raise AssertionError("Unexpected dynamic launch-prefix argument: " + line) + value += package + ".bwrap" + prefix.append(value) + return prefix + + +class SessionGuestCommandTest(unittest.TestCase): + def test_env_is_the_executable_for_every_package(self): + for package in PACKAGES: + with self.subTest(package=package): + self.assertEqual(["/usr/bin/env", "-i"], guest_prefix(package)[:2]) + + @unittest.skipUnless(Path("/usr/bin/env").is_file(), "needs /usr/bin/env") + def test_child_receives_its_package_socket_after_environment_is_cleared(self): + for package in PACKAGES: + with self.subTest(package=package): + result = subprocess.run( + guest_prefix(package), capture_output=True, text=True, check=True, + timeout=5, env={"DROIDDECK_BWRAP_SOCKET": "wrong.bwrap", "STALE_HOST": "1"}) + self.assertEqual( + ["DROIDDECK_BWRAP_SOCKET=" + package + ".bwrap"], + result.stdout.splitlines()) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_session_run_status.py b/tools/tests/test_session_run_status.py new file mode 100644 index 0000000000..b4c1914b7a --- /dev/null +++ b/tools/tests/test_session_run_status.py @@ -0,0 +1,74 @@ +import os +import re +import shutil +import signal +import subprocess +import tempfile +import time +import unittest +from pathlib import Path + +SESSION = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/droiddeck-session" + + +def run_program_function(): + match = re.search(r"^ run_program\(\) \{\n.*?^ \}\n", SESSION.read_text(), re.M | re.S) + return match.group(0) + + +class RunStatusTest(unittest.TestCase): + def setUp(self): + self.dir = Path(tempfile.mkdtemp()) + self.addCleanup(shutil.rmtree, self.dir, True) + + def run_with(self, command, launch_dir=True): + env = dict(os.environ) + env.pop("BL_LAUNCH_DIR", None) + if launch_dir: + env["BL_LAUNCH_DIR"] = str(self.dir) + return subprocess.run(["bash", "-c", run_program_function() + "run_program " + command + "; echo unreachable"], + env=env, capture_output=True, text=True, timeout=30) + + def test_the_program_status_is_kept_for_the_app(self): + run = self.run_with("sh -c 'exit 7'") + self.assertEqual(7, run.returncode) + self.assertNotIn("unreachable", run.stdout) + self.assertEqual("7\n", (self.dir / "run-status").read_text()) + self.assertFalse((self.dir / "run-status.tmp").exists()) + + def test_a_clean_exit_is_recorded_as_zero(self): + self.assertEqual(0, self.run_with("true").returncode) + self.assertEqual("0\n", (self.dir / "run-status").read_text()) + + def test_nothing_is_written_without_a_launch_dir(self): + self.assertEqual(3, self.run_with("sh -c 'exit 3'", launch_dir=False).returncode) + self.assertEqual([], os.listdir(self.dir)) + + def signalled(self, sig, program): + env = dict(os.environ, BL_LAUNCH_DIR=str(self.dir)) + ready = self.dir / "ready" + proc = subprocess.Popen(["bash", "-c", run_program_function() + "run_program " + program], + env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + self.addCleanup(proc.kill) + deadline = time.monotonic() + 10 + while not ready.exists() and time.monotonic() < deadline: + time.sleep(0.05) + self.assertTrue(ready.exists()) + proc.send_signal(sig) + return proc.wait(timeout=10) + + def test_a_stop_signal_reaches_the_program(self): + program = ("python3 -c 'import signal, sys, time; signal.signal(signal.SIGTERM, lambda *a: sys.exit(9)); " + "open(sys.argv[1], \"w\").close(); time.sleep(30)' %s" % (self.dir / "ready")) + self.assertEqual(9, self.signalled(signal.SIGTERM, program)) + self.assertEqual("9\n", (self.dir / "run-status").read_text()) + + def test_an_interrupt_reaches_the_program(self): + program = ("python3 -c 'import sys, time; open(sys.argv[1], \"w\").close(); time.sleep(30)' %s" + % (self.dir / "ready")) + self.assertEqual(130, self.signalled(signal.SIGINT, program)) + self.assertEqual("130\n", (self.dir / "run-status").read_text()) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_session_tmp.py b/tools/tests/test_session_tmp.py index 58607911d8..55caf42780 100644 --- a/tools/tests/test_session_tmp.py +++ b/tools/tests/test_session_tmp.py @@ -12,7 +12,7 @@ SESSION = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/d STEAM = ["mangohud.Ab3dE6gH", ".com.valvesoftware.Steam.x1Y2z3/", "steam_chrome_shmem_uid10480_0", "steamADfAnd/"] CHROMIUM = ["scoped_dir3yu9Xt/SingletonSocket"] APPIMAGE = ["droiddeck-appimage.19PoOD"] -BUS = ["dbus-1zWfOP1IaR="] # = a socket +BUS = ["dbus-1zWfOP1IaR="] KDE = ["plasma-csd-generator.BVWIWA/"] STALE = STEAM + CHROMIUM + APPIMAGE + BUS + KDE KEPT = ["droiddeck-mangohud.conf", ".X11-unix/", "steamworks", "steamABCDEF/inside", "notes.txt", diff --git a/tools/tests/test_steam_cold_launch.py b/tools/tests/test_steam_cold_launch.py new file mode 100644 index 0000000000..2c80a25467 --- /dev/null +++ b/tools/tests/test_steam_cold_launch.py @@ -0,0 +1,125 @@ +"""Requested Steam games are handed over as soon as the interface is up; a shortcut is handed over again only if it never took focus.""" +import os +from pathlib import Path +import subprocess +import tempfile +import textwrap +import unittest + +SESSION = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/droiddeck-session" +SOURCE = SESSION.read_text() +START = SOURCE.index(" steam_hold_launch() {") +END = SOURCE.index(' if [ -s "$HOME/.bl-autolaunch" ]; then', START) +assert START >= 0 +LAUNCH_BLOCK = textwrap.dedent(SOURCE[START:END]) +SHORTCUT = str((3551182975 << 32) | 0x02000000) + + +class SteamColdLaunchTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + self.launch_dir = self.root / "session" + self.launch_dir.mkdir() + self.bin = self.root / "bin" + self.bin.mkdir() + self.agent_args = self.root / "agent-args" + self.sleep_args = self.root / "sleep-args" + self.agent_count = self.root / "agent-count" + self.focus_count = self.root / "focus-count" + + # FOCUS lists the focused app per xprop call; the last value repeats. + xprop = self.bin / "xprop" + xprop.write_text( + "#!/bin/sh\n" + "n=$(cat \"$FOCUS_COUNT\" 2>/dev/null || echo 0); n=$((n + 1)); echo $n > \"$FOCUS_COUNT\"\n" + "i=0; last=769\n" + "for f in $FOCUS; do i=$((i + 1)); last=$f; [ \"$i\" -eq \"$n\" ] && break; done\n" + "echo \"GAMESCOPE_FOCUSED_APP(CARDINAL) = $last\"\n") + xprop.chmod(0o755) + agent = self.bin / "droiddeck-agent" + agent.write_text( + "#!/bin/sh\n" + "printf '%s\n' \"$@\" > \"$AGENT_ARGS\"\n" + "n=$(cat \"$AGENT_COUNT\" 2>/dev/null || echo 0); n=$((n + 1)); echo $n > \"$AGENT_COUNT\"\n" + "exit \"$AGENT_STATUS\"\n") + agent.chmod(0o755) + sleep = self.bin / "sleep" + sleep.write_text("#!/bin/sh\nprintf '%s\n' \"$@\" >> \"$SLEEP_ARGS\"\n") + sleep.chmod(0o755) + self.block = LAUNCH_BLOCK.replace("/usr/local/bin/droiddeck-agent", str(agent)) + + def run_launch(self, target, focus="769", helper_status=0): + env = dict(os.environ, HOME=str(self.root), BL_LAUNCH_DIR=str(self.launch_dir), + PATH=str(self.bin) + os.pathsep + os.environ["PATH"], + AGENT_ARGS=str(self.agent_args), SLEEP_ARGS=str(self.sleep_args), + AGENT_COUNT=str(self.agent_count), AGENT_STATUS=str(helper_status), + FOCUS=focus, FOCUS_COUNT=str(self.focus_count)) + script = self.block + "\nprintf 'ARG:%s\n' \"$@\"\nwait\n" + url = target if target.startswith("steam://") else "steam://rungameid/" + target + result = subprocess.run(["bash", "-c", script, "cold-launch", url], + env=env, text=True, capture_output=True, timeout=10) + self.assertEqual(0, result.returncode, result.stderr) + return result + + def hand_offs(self, result): + return [l for l in result.stdout.splitlines() if "launching the requested game" in l] + + def test_a_shortcut_that_takes_focus_is_handed_over_once_without_waiting_for_the_overview(self): + result = self.run_launch(SHORTCUT, focus="769 769 4242") + self.assertEqual(SHORTCUT, (self.launch_dir / "steam-game").read_text().strip()) + self.assertEqual(1, len(self.hand_offs(result)), result.stdout) + self.assertFalse(self.agent_args.exists(), result.stdout) + self.assertEqual(["1"], self.sleep_args.read_text().split()) + + def test_a_shortcut_that_never_takes_focus_is_handed_over_again_after_the_overview_wait(self): + result = self.run_launch(SHORTCUT, focus="769", helper_status=0) + self.assertEqual(2, len(self.hand_offs(result)), result.stdout) + self.assertIn("launching the requested game again", result.stdout) + self.assertEqual(["--wait-steam-shortcut-overview", SHORTCUT, "45"], self.agent_args.read_text().splitlines()) + self.assertEqual(["1"] * 20, self.sleep_args.read_text().split()) + + def test_a_timed_out_overview_still_gets_one_more_hand_off(self): + result = self.run_launch(SHORTCUT, focus="769", helper_status=1) + self.assertEqual(2, len(self.hand_offs(result)), result.stdout) + self.assertIn("overview status 1", result.stdout) + + def test_a_game_that_takes_focus_during_the_overview_wait_is_not_started_twice(self): + focus = " ".join(["769"] * 23) + " 4242" + result = self.run_launch(SHORTCUT, focus=focus, helper_status=0) + self.assertEqual(1, len(self.hand_offs(result)), result.stdout) + self.assertIn("took focus while waiting", result.stdout) + self.assertNotIn("launching the requested game again", result.stdout) + + def test_native_app_id_keeps_the_short_delay_and_is_handed_over_once(self): + result = self.run_launch("413150") + self.assertEqual("413150", (self.launch_dir / "steam-game").read_text().strip()) + self.assertEqual(1, len(self.hand_offs(result)), result.stdout) + self.assertEqual("4", self.sleep_args.read_text().strip()) + self.assertFalse(self.agent_args.exists()) + + def test_a_restart_for_a_game_uses_the_same_hand_off(self): + loop = SOURCE[SOURCE.index(' if [ -s "$HOME/.bl-restart-game" ]; then'):SOURCE.index(' if [ -f "$HOME/.bl-restart-once" ]; then')] + self.assertIn('steam_hold_launch "$_bl_again" &', loop) + self.assertNotIn("set -- \"steam://rungameid/", loop) + script = self.block + '\nsteam_hold_launch "%s"\n' % SHORTCUT + env = dict(os.environ, HOME=str(self.root), BL_LAUNCH_DIR=str(self.launch_dir), + PATH=str(self.bin) + os.pathsep + os.environ["PATH"], + AGENT_ARGS=str(self.agent_args), SLEEP_ARGS=str(self.sleep_args), + AGENT_COUNT=str(self.agent_count), AGENT_STATUS="1", + FOCUS="769", FOCUS_COUNT=str(self.focus_count)) + result = subprocess.run(["bash", "-c", script, "restart"], env=env, text=True, capture_output=True, timeout=10, check=True) + self.assertEqual(SHORTCUT, (self.launch_dir / "steam-game").read_text().strip(), result.stdout) + self.assertEqual(2, len(self.hand_offs(result)), result.stdout) + + def test_non_game_steam_urls_remain_on_the_original_startup_arguments(self): + url = "steam://open/library" + result = self.run_launch(url) + self.assertIn("ARG:" + url, result.stdout) + self.assertFalse((self.launch_dir / "steam-game").exists()) + self.assertFalse(self.agent_args.exists()) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_steam_compat_environment.py b/tools/tests/test_steam_compat_environment.py new file mode 100644 index 0000000000..22a15e0d45 --- /dev/null +++ b/tools/tests/test_steam_compat_environment.py @@ -0,0 +1,50 @@ +import json +import os +from pathlib import Path +import subprocess +import tempfile +import unittest + + +BIN = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin' + + +class SteamCompatEnvironmentTest(unittest.TestCase): + def test_library_launch_preserves_guest_environment_without_steam_client_libraries(self): + source = (BIN / 'droiddeck-session').read_text() + setup = source[source.index(' _bl_compat_env='):source.index(' export SDL_VIDEO_X11_DGAMOUSE=')] + launch = next(line for line in source.splitlines() + if 'droiddeck-steam-compat "$steam_root"' in line) + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + helper = root / 'droiddeck-steam-compat' + helper.write_text('#!/usr/bin/env python3\nimport json, os, sys\n' + 'json.dump({"env": dict(os.environ), "args": sys.argv[1:]}, ' + 'open(os.environ["BRIDGE_CAPTURE"], "w"))\n') + helper.chmod(0o755) + for inherited in ({}, {'LD_LIBRARY_PATH': '/guest/driver:/guest/libs'}, + {'LD_LIBRARY_PATH': '', 'STEAM_RUNTIME': ''}, + {'LD_LIBRARY_PATH': '/custom path/lib', 'STEAM_RUNTIME': '0'}): + with self.subTest(inherited=inherited): + env = dict(os.environ, PATH=str(root) + os.pathsep + os.environ['PATH'], + BRIDGE_CAPTURE=str(root / 'captured.json'), + VK_ICD_FILENAMES='/guest/driver/turnip.json', steam_root='/steam') + for key in ('LD_LIBRARY_PATH', 'STEAM_RUNTIME'): + env.pop(key, None) + env.update(inherited) + result = subprocess.run(['bash', '-c', setup + '\n' + launch + '\nwait $!\n' + 'printf "%s\\n" "$STEAM_RUNTIME" "$LD_LIBRARY_PATH"'], + env=env, capture_output=True, text=True, timeout=10) + self.assertEqual(result.returncode, 0, result.stderr) + bridge = json.loads((root / 'captured.json').read_text()) + self.assertEqual(bridge['args'], ['/steam']) + for key in ('LD_LIBRARY_PATH', 'STEAM_RUNTIME', 'VK_ICD_FILENAMES'): + self.assertEqual(bridge['env'].get(key), env.get(key), key) + client_path = '/steam/steamrtarm64:/steam/steamrtarm64/panorama' + if inherited.get('LD_LIBRARY_PATH'): + client_path += ':' + inherited['LD_LIBRARY_PATH'] + self.assertEqual(result.stdout.splitlines(), ['1', client_path]) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_steam_compat_live.py b/tools/tests/test_steam_compat_live.py index a20ffba2f9..90f7e73f8f 100644 --- a/tools/tests/test_steam_compat_live.py +++ b/tools/tests/test_steam_compat_live.py @@ -108,6 +108,86 @@ class FakePage: @unittest.skipUnless(shutil.which("node"), "node is not installed") class PageScriptTest(unittest.TestCase): + def test_vr_games_wait_for_steamvr_and_preserve_the_original_launch(self): + with tempfile.TemporaryDirectory() as tmp: + script = Path(tmp) / "vr.js" + script.write_text(LIVE["VR_JS"]) + harness = Path(__file__).with_name("steam_vr_launch_harness.js") + result = subprocess.run(["node", str(harness), str(script)], + capture_output=True, text=True, timeout=20) + self.assertEqual(result.returncode, 0, result.stderr) + + def test_tool_installs_skip_only_their_own_install_dialog(self): + harness_source = r""" +const assert = require('assert'); +globalThis.window = globalThis; +const script = require('fs').readFileSync(process.argv[2], 'utf8'); +globalThis.SteamClient = { Installs: {}, Downloads: {} }; +assert.throws(() => eval(script), /install calls are not ready/); +const opened = [], queued = []; +let wizard = null, continued = 0; +globalThis.SteamClient = { + Installs: { + OpenInstallWizard(apps, client) { opened.push([apps, client]); }, + RegisterForShowInstallWizard(callback) { assert.strictEqual(wizard, null); wizard = callback; return { unregister() {} }; }, + ContinueInstall() { continued++; }, + }, + Downloads: { QueueAppUpdate(app, client) { queued.push([app, client]); } }, +}; +assert.strictEqual(eval(script), 'installed'); +assert.strictEqual(eval(script), 'present'); +const tools = window.__droiddeckTools; +wizard({ eInstallState: 7, currentAppID: 4183110 }); +assert.strictEqual(continued, 0); +tools.install(4183110); +assert.deepStrictEqual(opened, [[[4183110], '0']]); +wizard({ eInstallState: 8, currentAppID: 4183110 }); +wizard({ eInstallState: 7, currentAppID: 892970 }); +assert.strictEqual(continued, 0); +wizard({ eInstallState: 7, currentAppID: 4183110 }); +wizard({ eInstallState: 7, currentAppID: 4183110 }); +assert.strictEqual(continued, 1); +tools.update(4427310); +assert.deepStrictEqual(queued, [[4427310, '0']]); +""" + with tempfile.TemporaryDirectory() as tmp: + script = Path(tmp) / "tools.js" + script.write_text(LIVE["TOOLS_JS"]) + harness = Path(tmp) / "harness.js" + harness.write_text(harness_source) + result = subprocess.run(["node", str(harness), str(script)], capture_output=True, text=True, timeout=20) + self.assertEqual(result.returncode, 0, result.stderr) + + def test_steamvr_library_launch_uses_binding_and_other_games_pass_through(self): + harness_source = r""" +const assert = require('assert'); +globalThis.window = globalThis; +const calls = [], requests = []; +const apps = { RunGame(...args) { assert.strictEqual(this, apps); calls.push(args); return 'native'; } }; +globalThis.SteamClient = { Apps: apps }; +window.droiddeckLaunchSteamVr = id => requests.push(id); +const script = require('fs').readFileSync(process.argv[2], 'utf8'); +assert.strictEqual(eval(script), 'installed'); +assert.strictEqual(eval(script), 'present'); +assert.strictEqual(apps.RunGame('250820', '', -1, 100), undefined); +apps.RunGame(250820, '', -1, 100); +assert.deepStrictEqual(requests, ['250820', '250820']); +assert.deepStrictEqual(calls, []); +assert.strictEqual(apps.RunGame('611670', 'custom args', -1, 100), 'native'); +assert.strictEqual(apps.RunGame('2508200', '', -1, 100), 'native'); +delete window.droiddeckLaunchSteamVr; +assert.strictEqual(apps.RunGame('250820', '', -1, 100), 'native'); +assert.deepStrictEqual(calls, [['611670', 'custom args', -1, 100], ['2508200', '', -1, 100], ['250820', '', -1, 100]]); +""" + with tempfile.TemporaryDirectory() as tmp: + script = Path(tmp) / "vr.js" + script.write_text(LIVE["VR_JS"]) + harness = Path(tmp) / "test.js" + harness.write_text(harness_source) + result = subprocess.run(["node", str(harness), str(script)], + capture_output=True, text=True, timeout=20) + self.assertEqual(result.returncode, 0, result.stderr) + def test_transport_framing_auth_and_notifications(self): with tempfile.TemporaryDirectory() as tmp: script = Path(tmp) / "install.js" @@ -208,6 +288,274 @@ class ReconcileTest(unittest.TestCase): self.assertEqual((state["pending"], state.get("applied", 0)), (TOOL_11, 0)) self.assertTrue(self.helper.request_waiting()) + def test_per_game_customize_and_inherit_apply_live(self): + page = FakePage({"0": TOOL, "10": TOOL, "11": TOOL_11}, [TOOL, TOOL_11]) + (self.state / "games.json").write_text(json.dumps({ + "version": 1, + "games": { + "10": {"valve": True, "dir": "Proton 11.0 (ARM64)"}, + "11": None, + }, + })) + state = self.reconcile(page) + self.assertEqual(page.sets, [("10", TOOL_11), ("11", TOOL)]) + self.assertEqual(state["auto"], {"11": TOOL}) + + def test_native_arm64_title_drops_auto_proton_once_and_keeps_explicit_choices(self): + (self.steam / "steamapps/appmanifest_11.acf").unlink() + (self.state / "state.json").write_text(json.dumps({ + "default": TOOL, + "auto": {"10": TOOL}, + })) + page = FakePage({"0": TOOL, "10": TOOL}, [TOOL, TOOL_11]) + original_native_targets = COMPAT["native_targets"] + COMPAT["native_targets"] = lambda _root, _apps: {"10": None} + try: + state = self.reconcile(page) + self.assertEqual(page.sets, [("10", "")]) + self.assertEqual(page.mapping["10"], "") + self.assertEqual(state["auto"], {}) + + page.sets.clear() + self.reconcile(page) + self.assertEqual(page.sets, []) + + (self.state / "games.json").write_text(json.dumps({ + "version": 1, + "games": {"10": {"valve": True, "dir": "Proton 11.0 (ARM64)"}}, + })) + state = self.reconcile(page) + self.assertEqual(page.sets, [("10", TOOL_11)]) + self.assertEqual(page.mapping["10"], TOOL_11) + self.assertEqual(state["auto"], {}) + (self.state / "games.json").unlink() + + page.sets.clear() + page.mapping["10"] = "steamlinuxruntime_arm64" + self.reconcile(page) + self.assertEqual(page.mapping["10"], "steamlinuxruntime_arm64") + self.assertEqual(page.sets, []) + + page.mapping["10"] = TOOL_11 + self.reconcile(page) + self.assertEqual(page.mapping["10"], TOOL_11) + self.assertEqual(page.sets, []) + + page.mapping["10"] = COMPAT["FEX_TOOL"] + self.reconcile(page) + self.assertEqual(page.mapping["10"], COMPAT["FEX_TOOL"]) + self.assertEqual(page.sets, []) + + page.mapping["10"] = "GE-Proton11-7" + self.reconcile(page) + self.assertEqual(page.mapping["10"], "GE-Proton11-7") + self.assertEqual(page.sets, []) + finally: + COMPAT["native_targets"] = original_native_targets + + def test_factorio_native_choice_survives_inherited_live_selection_and_restart(self): + app = "427520" + (self.steam / ("steamapps/appmanifest_%s.acf" % app)).write_text("") + config = self.steam / "config/config.vdf" + config.parent.mkdir(parents=True) + config.write_text( + '"InstallConfigStore" { "Software" { "Valve" { "Steam" { ' + '"CompatToolMapping" { "0" { "name" "%s" } } } } } }' % TOOL) + (self.state / "state.json").write_text(json.dumps({ + "default": TOOL, + "auto": {app: TOOL}, + })) + + original_native_targets = COMPAT["native_targets"] + COMPAT["native_targets"] = lambda _root, apps: { + app: COMPAT["NATIVE_CHOICE"] + } if app in apps else {} + try: + page = FakePage({"0": TOOL, "10": TOOL, "11": TOOL, app: "proton"}, [TOOL, TOOL_11]) + state = self.reconcile(page) + self.assertEqual(page.sets, []) + self.assertEqual(state["auto"], {}) + self.assertEqual(state["native_choices"], [app]) + self.assertEqual(COMPAT["read_config_mapping"](str(config)), {"0": TOOL}) + + page.sets.clear() + state = self.reconcile(page) + self.assertEqual(page.sets, []) + self.assertEqual(state["native_choices"], [app]) + restarted = LIVE["Helper"](str(self.steam), 1) + restarted.page = page + restarted.reconcile() + state = json.loads((self.state / "state.json").read_text()) + self.assertEqual(page.sets, []) + self.assertEqual(state["native_choices"], [app]) + + config.write_text( + '"InstallConfigStore" { "Software" { "Valve" { "Steam" { ' + '"CompatToolMapping" { "0" { "name" "%s" } ' + '"%s" { "name" "GE-Proton11-7" } } } } } }' % (TOOL, app)) + page.mapping[app] = "GE-Proton11-7" + state = self.reconcile(page) + self.assertEqual(page.mapping[app], "GE-Proton11-7") + self.assertEqual(page.sets, []) + self.assertEqual(state["native_choices"], []) + + for choice in ("steamlinuxruntime", COMPAT["FEX_TOOL"], TOOL_11): + (self.state / "state.json").write_text(json.dumps({ + "default": TOOL, + "auto": {}, + "native_choices": [app], + })) + config.write_text( + '"InstallConfigStore" { "Software" { "Valve" { "Steam" { ' + '"CompatToolMapping" { "0" { "name" "%s" } ' + '"%s" { "name" "%s" } } } } } }' % (TOOL, app, choice)) + page.mapping[app] = choice + page.sets.clear() + state = self.reconcile(page) + self.assertEqual(page.mapping[app], choice) + self.assertEqual(page.sets, []) + self.assertEqual(state["native_choices"], [], choice) + finally: + COMPAT["native_targets"] = original_native_targets + + def test_saved_native_choice_survives_live_restart_without_manifest_or_appinfo(self): + app = "452280" + config = self.steam / "config/config.vdf" + config.parent.mkdir(parents=True) + config.write_text( + '"InstallConfigStore" { "Software" { "Valve" { "Steam" { ' + '"CompatToolMapping" { "0" { "name" "%s" } } } } } }' % TOOL) + (self.state / "state.json").write_text(json.dumps({ + "default": TOOL, + "auto": {}, + "native_choices": [app], + })) + + original_native_targets = COMPAT["native_targets"] + COMPAT["native_targets"] = lambda _root, _apps: {} + try: + page = FakePage({"0": TOOL, app: "proton"}, [TOOL, TOOL_11]) + state = self.reconcile(page) + self.assertNotIn(app, self.helper.installed) + self.assertEqual(state["native_choices"], [app]) + self.assertNotIn(app, state["auto"]) + self.assertNotIn((app, TOOL), page.sets) + self.assertEqual(COMPAT["read_config_mapping"](str(config)), {"0": TOOL}) + + config.write_text('"InstallConfigStore" { "Software" { "Other" {} } }') + state = self.reconcile(page) + self.assertEqual(state["native_choices"], [app]) + self.assertNotIn((app, TOOL), page.sets) + + config.write_text( + '"InstallConfigStore" { "Software" { "Valve" { "Steam" { ' + '"CompatToolMapping" { "0" { "name" "%s" } ' + '"%s" { "name" "GE-Proton11-7" } } } } } }' % (TOOL, app)) + page.mapping[app] = "proton" + state = self.reconcile(page) + self.assertEqual(state["native_choices"], []) + self.assertNotIn((app, TOOL), page.sets) + self.assertEqual(COMPAT["read_config_mapping"](str(config))[app], "GE-Proton11-7") + finally: + COMPAT["native_targets"] = original_native_targets + + def dual_platform_game(self, state): + app = "892970" + (self.steam / ("steamapps/appmanifest_%s.acf" % app)).write_text("") + config = self.steam / "config/config.vdf" + config.parent.mkdir(parents=True) + config.write_text( + '"InstallConfigStore" { "Software" { "Valve" { "Steam" { ' + '"CompatToolMapping" { "0" { "name" "%s" } } } } } }' % TOOL) + (self.state / "state.json").write_text(json.dumps(state)) + patcher = mock.patch.dict(COMPAT, {"native_targets": lambda _root, apps: { + app: COMPAT["NATIVE_CHOICE"] + } if app in apps else {}}) + patcher.start() + self.addCleanup(patcher.stop) + return app, FakePage({"0": TOOL, "10": TOOL, "11": TOOL}, [TOOL, TOOL_11]) + + def test_unmapped_dual_platform_game_gets_the_default_live(self): + app, page = self.dual_platform_game({"default": TOOL, "auto": {"10": TOOL, "11": TOOL}}) + state = self.reconcile(page) + self.assertEqual(page.sets, [(app, TOOL)]) + self.assertEqual(state["auto"][app], TOOL) + self.assertEqual(state["native_choices"], []) + + page.mapping[app] = "" + page.sets.clear() + state = self.reconcile(page) + self.assertEqual(page.sets, []) + self.assertEqual(state["native_choices"], [app]) + + def test_unmapped_dual_platform_game_gets_the_default_without_a_readable_config(self): + app, page = self.dual_platform_game({"default": TOOL, "auto": {"10": TOOL}, "native_choices": ["11"]}) + (self.steam / "config/config.vdf").unlink() + page.mapping["11"] = "" + state = self.reconcile(page) + self.assertEqual(page.sets, [(app, TOOL)]) + self.assertEqual(state["auto"][app], TOOL) + self.assertEqual(state["native_choices"], ["11"]) + + def test_a_tool_set_live_is_kept_before_the_client_writes_its_config(self): + app, page = self.dual_platform_game({"default": TOOL, "auto": {"10": TOOL, "11": TOOL, "892970": TOOL}}) + page.known.append(COMPAT["FEX_TOOL"]) + page.mapping[app] = TOOL + config = self.steam / "config/config.vdf" + config.write_text( + '"InstallConfigStore" { "Software" { "Valve" { "Steam" { ' + '"CompatToolMapping" { "0" { "name" "%s" } "%s" { "name" "%s" } } } } } }' % (TOOL, app, TOOL)) + with mock.patch.dict(COMPAT, {"native_targets": lambda _root, apps: {app: COMPAT["FEX_TOOL"]} if app in apps else {}}): + state = self.reconcile(page) + self.assertEqual(page.sets, [(app, COMPAT["FEX_TOOL"])]) + state = self.reconcile(page) + self.assertEqual(page.sets, [(app, COMPAT["FEX_TOOL"])]) + self.assertEqual(state["auto"][app], COMPAT["FEX_TOOL"]) + + def test_native_list_from_earlier_builds_is_not_trusted(self): + app, page = self.dual_platform_game({"default": TOOL, "auto": {"10": TOOL, "11": TOOL}, "native": ["892970"]}) + state = self.reconcile(page) + self.assertEqual(page.sets, [(app, TOOL)]) + self.assertNotIn("native", state) + self.assertEqual(state["native_choices"], []) + + def test_factorio_without_prior_auto_state_uses_the_default_proton(self): + app = "427520" + (self.steam / ("steamapps/appmanifest_%s.acf" % app)).write_text("") + config = self.steam / "config/config.vdf" + config.parent.mkdir(parents=True) + config.write_text( + '"InstallConfigStore" { "Software" { "Valve" { "Steam" { ' + '"CompatToolMapping" { "0" { "name" "%s" } } } } } }' % TOOL) + (self.state / "state.json").write_text(json.dumps({"default": TOOL, "auto": {}})) + page = FakePage({"0": TOOL, "10": TOOL, "11": TOOL, app: "proton"}, [TOOL, TOOL_11]) + original_native_targets = COMPAT["native_targets"] + COMPAT["native_targets"] = lambda _root, apps: { + app: COMPAT["NATIVE_CHOICE"] + } if app in apps else {} + try: + state = self.reconcile(page) + self.assertEqual(page.sets, [(app, TOOL)]) + self.assertEqual(state["auto"], {app: TOOL}) + self.assertEqual(state["native_choices"], []) + self.assertEqual(COMPAT["read_config_mapping"](str(config)), {"0": TOOL}) + finally: + COMPAT["native_targets"] = original_native_targets + + def test_missing_per_game_proton_stays_deferred_live(self): + page = FakePage({"0": TOOL, "10": "GE-Proton9-1", "11": TOOL_11}, [TOOL, TOOL_11]) + (self.state / "games.json").write_text(json.dumps({ + "version": 1, + "games": { + "10": {"valve": False, "dir": "GE-Proton9-1"}, + "11": None, + }, + })) + state = self.reconcile(page) + self.assertEqual(page.sets, [("11", TOOL)]) + self.assertEqual(page.mapping["10"], "GE-Proton9-1") + self.assertEqual(state["auto"], {"11": TOOL}) + def test_file_mode_defers_to_the_live_helper(self): (self.state / "live.pid").write_text("%d\n" % os.getpid()) self.assertTrue(COMPAT["live_helper_running"]()) @@ -238,6 +586,79 @@ console.log(JSON.stringify({ sent: sent.length, asked: asked.length })); """ +class ToolPage(FakePage): + def __init__(self, fail=False): + super().__init__({"0": TOOL}, [TOOL]) + self.calls = [] + self.fail = fail + + def tools(self, call): + self.calls.append(call) + if self.fail: + raise RuntimeError("the client's install calls are not ready") + return True + + +class ToolDownloadTest(unittest.TestCase): + def setUp(self): + tmp = tempfile.TemporaryDirectory() + self.addCleanup(tmp.cleanup) + self.steam = Path(tmp.name) / "Steam" + (self.steam / "steamapps").mkdir(parents=True) + self.helper = LIVE["Helper"](str(self.steam), 1) + self.now = [1000.0] + self.running = [False] + self.requested = [] + patcher = mock.patch.dict(COMPAT, { + "game_running": lambda: self.running[0], + "request_fex": lambda root, asked: self.requested.append(root) or ["3127680"], + }) + patcher.start() + self.addCleanup(patcher.stop) + clock = mock.patch.object(LIVE["time"], "monotonic", lambda: self.now[0]) + clock.start() + self.addCleanup(clock.stop) + + def manifest(self, app, flags): + (self.steam / ("steamapps/appmanifest_%s.acf" % app)).write_text('"AppState" { "StateFlags" "%s" }' % flags) + + def test_missing_tools_are_installed_and_deferred_ones_queued(self): + self.manifest("4427310", "6") + self.manifest("3127680", "4") + self.manifest("1628350", "1026") + self.helper.page = page = ToolPage() + self.helper.ensure_tools() + self.assertEqual(page.calls, ["update(4427310)", "update(1628350)", "install(4183110)"]) + self.now[0] += 30 + self.helper.ensure_tools() + self.now[0] += 60 + self.helper.ensure_tools() + self.assertEqual(len(page.calls), 3) + self.now[0] += 300 + self.manifest("4427310", "4") + self.helper.ensure_tools() + self.assertEqual(page.calls[3:], ["update(1628350)", "install(4183110)"]) + self.assertEqual(self.requested, []) + + def test_nothing_is_queued_while_a_game_runs(self): + self.running[0] = True + self.helper.page = page = ToolPage() + self.helper.ensure_tools() + self.assertEqual(page.calls, []) + self.running[0] = False + self.now[0] += 60 + self.helper.ensure_tools() + self.assertEqual(len(page.calls), 4) + + def test_an_install_falls_back_to_the_steam_url(self): + for app in ("4427310", "1628350", "4183110"): + self.manifest(app, "4") + self.helper.page = page = ToolPage(fail=True) + self.helper.ensure_tools() + self.assertEqual(page.calls, ["install(3127680)"]) + self.assertEqual(self.requested, [str(self.steam)]) + + @unittest.skipUnless(shutil.which("node"), "node is not installed") class SwitchScriptTest(unittest.TestCase): def test_the_request_is_reported_and_still_sent(self): @@ -285,6 +706,54 @@ class SwitchToDesktopTest(unittest.TestCase): self.assertNotIn(("Runtime.addBinding", LIVE["SWITCH_BINDING"]), helper.page.calls) self.assertNotIn(LIVE["SWITCH_JS"], helper.page.scripts) + def test_vr_bridge_is_installed_for_both_steam_ui_modes(self): + for steamos in (False, True): + helper = LIVE["Helper"]("/steam", 1, steamos=steamos) + helper.attach() + self.assertIn(("Runtime.addBinding", LIVE["VR_BINDING"]), helper.page.calls) + self.assertIn(LIVE["VR_JS"], helper.page.scripts) + + def test_vr_bridge_accepts_only_steamvr_and_coalesces_requests(self): + helper = LIVE["Helper"]("/steam", 1) + helper.page = mock.Mock() + event = lambda payload: {"method": "Runtime.bindingCalled", "params": { + "name": LIVE["VR_BINDING"], "payload": payload}} + with mock.patch.dict(self.globals, {"launch_steamvr": mock.Mock()}) as patched: + launch = patched["launch_steamvr"] + helper.page.drain.return_value = [event("0"), event("250820; touch /tmp/wrong"), + event("-1"), event("01"), event("18446744073709551616"), + event("\u0661"), event(None), event({})] + helper.drain() + launch.assert_not_called() + helper.page.drain.return_value = [event("250820"), event("250820")] + helper.drain() + launch.assert_called_once_with() + + def test_vr_game_requests_share_an_in_progress_helper_and_retry_after_it_exits(self): + helper = LIVE["Helper"]("/steam", 1) + helper.page = mock.Mock() + event = lambda app: {"method": "Runtime.bindingCalled", "params": { + "name": LIVE["VR_BINDING"], "payload": app}} + child = mock.Mock() + child.poll.return_value = None + with mock.patch.dict(self.globals, {"launch_steamvr": mock.Mock(return_value=child)}) as patched: + helper.page.drain.return_value = [event("611670"), event("620980")] + helper.drain() + helper.drain() + patched["launch_steamvr"].assert_called_once_with() + child.poll.return_value = 0 + helper.drain() + self.assertEqual(patched["launch_steamvr"].call_count, 2) + + def test_vr_launch_runs_helper_without_shell_in_background(self): + with tempfile.TemporaryDirectory() as tmp, mock.patch.dict(os.environ, {"XDG_RUNTIME_DIR": tmp}): + with mock.patch.object(self.globals["subprocess"], "Popen") as popen: + LIVE["launch_steamvr"]() + self.assertEqual(popen.call_args.args, ([LIVE["VR_HELPER"], "launch"],)) + self.assertTrue(popen.call_args.kwargs["start_new_session"]) + self.assertNotIn("shell", popen.call_args.kwargs) + self.assertTrue((Path(tmp) / "droiddeck-steamvr/library-launch.log").exists()) + def test_the_request_goes_to_steamos_session_select(self): helper = LIVE["Helper"]("/steam", 1) helper.page = mock.Mock() diff --git a/tools/tests/test_steam_compat_x64.py b/tools/tests/test_steam_compat_x64.py new file mode 100644 index 0000000000..3d4b069e04 --- /dev/null +++ b/tools/tests/test_steam_compat_x64.py @@ -0,0 +1,108 @@ +import os +from pathlib import Path +import runpy +import tempfile +import unittest + +BIN = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin" +COMPAT = runpy.run_path(str(BIN / "steam-compatibility")) + +CONFIG = '''"InstallConfigStore" +{ +\t"Software" +\t{ +\t\t"Valve" +\t\t{ +\t\t\t"Steam" +\t\t\t{ +\t\t\t\t"CompatToolMapping" +\t\t\t\t{ +\t\t\t\t\t"550" +\t\t\t\t\t{ +\t\t\t\t\t\t"name"\t\t"proton_experimental" +\t\t\t\t\t\t"config"\t\t"" +\t\t\t\t\t\t"priority"\t\t"250" +\t\t\t\t\t} +\t\t\t\t\t"620" +\t\t\t\t\t{ +\t\t\t\t\t\t"name"\t\t"proton-cachyos-a64" +\t\t\t\t\t\t"config"\t\t"" +\t\t\t\t\t\t"priority"\t\t"250" +\t\t\t\t\t} +\t\t\t\t\t"880" +\t\t\t\t\t{ +\t\t\t\t\t\t"name"\t\t"droiddeck-proton-arm64" +\t\t\t\t\t\t"config"\t\t"" +\t\t\t\t\t\t"priority"\t\t"250" +\t\t\t\t\t} +\t\t\t\t\t"730" +\t\t\t\t\t{ +\t\t\t\t\t\t"name"\t\t"steamlinuxruntime" +\t\t\t\t\t\t"config"\t\t"" +\t\t\t\t\t\t"priority"\t\t"250" +\t\t\t\t\t} +\t\t\t\t} +\t\t\t} +\t\t} +\t} +} +''' + + +class X64RepointTest(unittest.TestCase): + """steam-compatibility --x64: the x86-64 client's Proton entries go to its arm64 wrapper.""" + + def setUp(self): + self.home = tempfile.TemporaryDirectory() + self.root = Path(self.home.name) / "Steam" + (self.root / "config").mkdir(parents=True) + (self.root / "config" / "config.vdf").write_text(CONFIG) + # A wrapper of its own whose name starts with "proton": kept, never repointed. + own = self.root / "compatibilitytools.d" / "proton-cachyos-a64" + own.mkdir(parents=True) + (own / "compatibilitytool.vdf").write_text('"compatibilitytools"\n{\n\t"compat_tools"\n\t{\n\t\t"proton-cachyos-a64"\n\t\t{\n\t\t}\n\t}\n}\n') + self.old_home = os.environ.get("HOME") + os.environ["HOME"] = self.home.name + + def tearDown(self): + if self.old_home is None: + os.environ.pop("HOME", None) + else: + os.environ["HOME"] = self.old_home + self.home.cleanup() + + def mapping(self): + tokens = COMPAT["tokenize"]((self.root / "config" / "config.vdf").read_text()) + return COMPAT["read_mapping"](tokens, COMPAT["mapping_block"](tokens)) + + def test_repoints_valve_proton_only(self): + moved = COMPAT["x64_repoint"](str(self.root), "GE-Proton11-7-a64") + self.assertEqual(moved, ["550", "880"]) + m = self.mapping() + self.assertEqual(m["550"], "GE-Proton11-7-a64") + self.assertEqual(m["620"], "proton-cachyos-a64") + self.assertEqual(m["730"], "steamlinuxruntime") + # The arm64 client's own Proton name, which this client ignores. + self.assertEqual(m["880"], "GE-Proton11-7-a64") + self.assertEqual(m["0"], "GE-Proton11-7-a64") + + def test_repoints_arm64_name_even_with_its_stray_tool(self): + # An arm64 compat pass that ran against this client also left its tool folder here. + stray = self.root / "compatibilitytools.d" / "droiddeck-proton-arm64" + stray.mkdir(parents=True) + (stray / "compatibilitytool.vdf").write_text('"compatibilitytools"\n{\n\t"compat_tools"\n\t{\n\t\t"droiddeck-proton-arm64"\n\t\t{\n\t\t}\n\t}\n}\n') + self.assertIn("880", COMPAT["x64_repoint"](str(self.root), "GE-Proton11-7-a64")) + self.assertEqual(self.mapping()["880"], "GE-Proton11-7-a64") + + def test_live_notes_pending_restart(self): + COMPAT["x64_repoint"](str(self.root), "GE-Proton11-7-a64", live=True) + self.assertEqual((Path(self.home.name) / ".bl-compat-pending").read_text(), "550\n880\n") + + def test_no_tool_changes_nothing(self): + before = (self.root / "config" / "config.vdf").read_text() + self.assertEqual(COMPAT["x64_repoint"](str(self.root), None), []) + self.assertEqual((self.root / "config" / "config.vdf").read_text(), before) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_steam_desktop_launch.py b/tools/tests/test_steam_desktop_launch.py new file mode 100644 index 0000000000..626631e7fe --- /dev/null +++ b/tools/tests/test_steam_desktop_launch.py @@ -0,0 +1,137 @@ +"""Desktop Steam stays on KDE; explicit Big Picture still switches sessions.""" +import fcntl +import os +from pathlib import Path +import subprocess +import tempfile +import time +import unittest + +BIN = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin' + + +class DesktopSteamLaunchTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + self.session = self.root / 'session' + self.session.mkdir() + self.env = dict(os.environ, HOME=str(self.root), XDG_DATA_HOME=str(self.root / 'data'), + XDG_CACHE_HOME=str(self.root / 'cache'), BL_DESKTOP='1', + BL_LAUNCH_DIR=str(self.session)) + supervisor = self.root / 'supervisor' + supervisor.write_text('#!/bin/bash\nprintf "%s\\n" "$BL_INSIDE" "$BL_STEAM_UI" "$DISPLAY" "$@"\n') + supervisor.chmod(0o755) + x64 = self.root / 'steam-x64' + x64.write_text('#!/bin/bash\nprintf "%s\\n" x64 "$@"\n') + x64.chmod(0o755) + self.launcher = self.root / 'launch' + self.launcher.write_text((BIN / 'droiddeck-steam-launch').read_text().replace( + '/usr/local/bin/droiddeck-session', str(supervisor)).replace( + '/usr/local/bin/droiddeck-steam-x64', str(x64))) + + def launch(self, *args): + return subprocess.run(['bash', str(self.launcher), *args], env=self.env, + text=True, capture_output=True) + + def test_desktop_keeps_display_and_does_not_request_session_switch(self): + self.env['DISPLAY'] = ':7' + result = self.launch('desktop') + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(result.stdout.splitlines(), ['1', 'desktop', ':7', 'steam', 'steam://open/library']) + self.assertFalse((self.session / 'steam-launch').exists()) + + def test_desktop_game_url_goes_to_client(self): + result = self.launch('desktop', '501590') + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(result.stdout.splitlines()[-1], 'steam://rungameid/501590') + self.assertFalse((self.session / 'steam-launch').exists()) + + def test_second_click_forwards_without_another_supervisor(self): + lock = self.root / 'cache/droiddeck/steam-desktop.lock' + lock.parent.mkdir(parents=True) + steam = self.root / 'data/Steam/steamrtarm64/steam' + steam.parent.mkdir(parents=True) + steam.write_text('#!/bin/bash\nprintf "%s\\n" "$@"\n') + steam.chmod(0o755) + (self.root / '.steam').mkdir() + os.mkfifo(self.root / '.steam/steam.pipe') + (self.root / '.steam/steam.pid').write_text(str(os.getpid())) + with lock.open('w') as handle: + fcntl.flock(handle, fcntl.LOCK_EX | fcntl.LOCK_NB) + result = self.launch('desktop', 'steam://open/settings') + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(result.stdout.splitlines(), ['-nobigpicture', '-no-cef-sandbox', '-cef-ozone-platform=x11', + '-cef-disable-gpu', 'steam://open/settings']) + self.assertFalse((self.session / 'steam-launch').exists()) + + def test_second_click_forwards_to_the_x86_64_client_in_its_own_home(self): + lock = self.root / 'cache/droiddeck/steam-desktop.lock' + lock.parent.mkdir(parents=True) + x64_home = self.root / 'x64' + (x64_home / '.steam').mkdir(parents=True) + os.mkfifo(x64_home / '.steam/steam.pipe') + (x64_home / '.steam/steam.pid').write_text(str(os.getpid())) + self.env.update(BL_STEAM_CLIENT_ARCH='x86_64', BL_X64_HOME=str(x64_home)) + with lock.open('w') as handle: + fcntl.flock(handle, fcntl.LOCK_EX | fcntl.LOCK_NB) + result = self.launch('desktop', '501590') + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(result.stdout.splitlines(), ['x64', '--exec', '-nobigpicture', '-no-cef-sandbox', + '-cef-ozone-platform=x11', '-cef-disable-gpu', + 'steam://rungameid/501590']) + + def test_second_click_waits_for_steam_ipc_during_startup(self): + lock = self.root / 'cache/droiddeck/steam-desktop.lock' + lock.parent.mkdir(parents=True) + steam = self.root / 'data/Steam/steamrtarm64/steam' + steam.parent.mkdir(parents=True) + marker = self.root / 'forwarded' + steam.write_text(f'#!/bin/bash\ntouch "{marker}"\n') + steam.chmod(0o755) + with lock.open('w') as handle: + fcntl.flock(handle, fcntl.LOCK_EX | fcntl.LOCK_NB) + process = subprocess.Popen(['bash', str(self.launcher), 'desktop'], env=self.env, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + try: + time.sleep(0.7) + self.assertIsNone(process.poll()) + self.assertFalse(marker.exists()) + (self.root / '.steam').mkdir() + (self.root / '.steam/steam.pid').write_text(str(os.getpid())) + os.mkfifo(self.root / '.steam/steam.pipe') + _, stderr = process.communicate(timeout=3) + self.assertEqual(process.returncode, 0, stderr) + self.assertTrue(marker.exists()) + finally: + if process.poll() is None: + process.kill() + process.communicate() + + def test_big_picture_requests_explicit_handoff(self): + result = self.launch('bigpicture') + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual((self.session / 'steam-launch').read_text(), 'ui=bigpicture\nurl=\n') + + def test_outside_desktop_preserves_session_request(self): + self.env.pop('BL_DESKTOP') + result = self.launch('desktop', 'steam://open/settings') + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual((self.session / 'steam-launch').read_text(), + 'ui=desktop\nurl=steam://open/settings\n') + + def test_invalid_target_cannot_trigger_a_handoff(self): + self.assertEqual(self.launch('desktop', 'bad').returncode, 64) + self.assertFalse((self.session / 'steam-launch').exists()) + + def test_cef_software_is_scoped_to_the_kde_client(self): + source = (BIN / 'droiddeck-session').read_text() + setup = source[source.index(' _bl_ui=(-gamepadui)'):source.index(' if [ "${BL_STEAM_UI:-}" != desktop ]; then')] + for desktop, ui, software in [('1', 'desktop', True), ('1', 'bigpicture', False), ('', 'desktop', False)]: + with self.subTest(desktop=desktop, ui=ui): + env = dict(self.env, BL_DESKTOP=desktop, BL_STEAM_UI=ui) + result = subprocess.check_output(['bash', '-c', setup + '\nprintf "%s\\n" "${_bl_cef[@]}"'], + env=env, text=True) + self.assertEqual('-cef-disable-gpu' in result, software) + self.assertEqual('-cef-use-angle=vulkan' in result, not software) diff --git a/tools/tests/test_steam_exit_status.py b/tools/tests/test_steam_exit_status.py new file mode 100644 index 0000000000..e66341febe --- /dev/null +++ b/tools/tests/test_steam_exit_status.py @@ -0,0 +1,69 @@ +import os +from pathlib import Path +import re +import subprocess +import tempfile +import unittest + + +SESSION = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin/droiddeck-session' + + +class SteamExitStatusTest(unittest.TestCase): + def run_session(self, child_status, compositor_status=0, report=True, report_value=None, + stale_status=None): + source = SESSION.read_text() + function = re.search(r'^run_gamescope\(\) \(\n.*?^\)\n', source, re.M | re.S) + self.assertIsNotNone(function) + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + stale_file = root / 'droiddeck-steam-exit.stale' + if stale_status is not None: + stale_file.write_text(str(stale_status) + '\n') + compositor = root / 'gamescope' + compositor.write_text('#!/bin/bash\n"$@"\nexit ' + str(compositor_status) + '\n') + compositor.chmod(0o755) + child = root / 'steam' + report_arg = '"$1"' if report_value is None else '"$2"' + report_line = ('printf "%s\\n" ' + report_arg + ' > "$BL_STEAM_EXIT_FILE"\n' + if report else '') + child.write_text('#!/bin/bash\n' + report_line + 'exit "$1"\n') + child.chmod(0o755) + env = dict(os.environ, PATH=str(root) + os.pathsep + os.environ['PATH'], + XDG_RUNTIME_DIR=str(root)) + result = subprocess.run(['bash', '-c', function.group() + '\nrun_gamescope "$@"', + 'session', str(child), str(child_status), + str(report_value) if report_value is not None else ''], env=env, + capture_output=True, text=True, timeout=10) + self.assertEqual(list(root.glob('droiddeck-steam-exit.??????')), []) + if stale_status is not None: + self.assertEqual(stale_file.read_text(), str(stale_status) + '\n') + return result.returncode + + def test_steam_crash_survives_successful_compositor_shutdown(self): + self.assertEqual(self.run_session(139), 139) + + def test_clean_steam_shutdown_remains_success(self): + self.assertEqual(self.run_session(0), 0) + + def test_compositor_failure_remains_visible(self): + self.assertEqual(self.run_session(0, compositor_status=1), 1) + + def test_early_child_failure_preserves_compositor_result(self): + self.assertEqual(self.run_session(127, compositor_status=127, report=False), 127) + + def test_no_report_does_not_invent_a_failure(self): + self.assertEqual(self.run_session(0, report=False), 0) + + def test_invalid_report_cannot_become_a_shell_exit_status(self): + self.assertEqual(self.run_session(999), 0) + + def test_malformed_report_is_ignored(self): + self.assertEqual(self.run_session(0, report_value='not-an-exit-code'), 0) + + def test_stale_marker_does_not_affect_a_new_launch(self): + self.assertEqual(self.run_session(0, report=False, stale_status=139), 0) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_steam_games.py b/tools/tests/test_steam_games.py index f74277714c..b451261647 100644 --- a/tools/tests/test_steam_games.py +++ b/tools/tests/test_steam_games.py @@ -55,6 +55,46 @@ class ImportsTest(unittest.TestCase): self.assertEqual(self.folder, (self.steam / 'steamapps/common/DroidDeck-42').resolve()) self.assertEqual(b'game', self.exe.read_bytes()) + def test_store_installs_stay_shortcuts_even_when_owned_on_steam(self): + self.snapshot() + game = dict(self.game, store='amazon') + games, routes = imports.route(self.steam, self.acct, [game]) + self.assertEqual([game], games) + self.assertEqual({}, routes) + self.assertFalse((self.steam / 'steamapps/appmanifest_42.acf').exists()) + self.assertFalse(os.path.lexists(self.steam / 'steamapps/common/DroidDeck-42')) + + def test_store_installs_imported_earlier_are_released(self): + self.snapshot() + imports.route(self.steam, self.acct, [self.game]) + unrelated = self.steam / 'steamapps/appmanifest_7.acf' + unrelated.write_text('"AppState"\n{\n "appid" "7"\n "installdir" "Other"\n}\n') + games, routes = imports.route(self.steam, self.acct, [dict(self.game, store='epic')]) + self.assertEqual({}, routes) + self.assertEqual(1, len(games)) + self.assertFalse((self.steam / 'steamapps/appmanifest_42.acf').exists()) + self.assertFalse(os.path.lexists(self.steam / 'steamapps/common/DroidDeck-42')) + self.assertTrue(unrelated.is_file()) + self.assertEqual(b'game', self.exe.read_bytes()) + + def test_watch_never_looks_up_store_installs(self): + listing = self.root / 'games.json' + listing.write_text(json.dumps([dict(self.game, store='gog')])) + with patch.object(imports, 'identify') as identify: + imports.watch(str(self.steam), str(listing)) + identify.assert_not_called() + + def test_native_programs_stay_shortcuts_and_are_never_looked_up(self): + self.snapshot() + game = dict(self.game, native=True) + self.assertEqual(([game], {}), imports.route(self.steam, self.acct, [game])) + self.assertFalse((self.steam / 'steamapps/appmanifest_42.acf').exists()) + listing = self.root / 'games.json' + listing.write_text(json.dumps([game])) + with patch.object(imports, 'identify') as identify: + imports.watch(str(self.steam), str(listing)) + identify.assert_not_called() + def test_migrates_only_unchanged_legacy_import_manifests(self): self.snapshot() imports.route(self.steam, self.acct, [self.game]) diff --git a/tools/tests/test_steam_install.py b/tools/tests/test_steam_install.py index d71dd7b4db..6cecaec752 100644 --- a/tools/tests/test_steam_install.py +++ b/tools/tests/test_steam_install.py @@ -25,10 +25,6 @@ class SteamInstallTest(unittest.TestCase): self.requests = self.root / 'requests' self.bin = self.root / 'bin' self.bin.mkdir() - # Only the network is faked: exercise real manifest parsing, checksums and zip extraction. - # TEST_PLAN lines "<file> <action>" are used up in order by requests for that file: - # "cut <bytes>" delivers up to that offset then drops the connection, "fail <status>" - # delivers nothing, "norange" refuses to resume. curl = self.bin / 'curl' curl.write_text('''#!/usr/bin/env python3 import os, sys @@ -41,6 +37,9 @@ with open(os.environ['TEST_REQUESTS'], 'a') as log: log.write(url + '\\n') with open(os.environ['TEST_REQUESTS'] + '.offsets', 'a') as log: log.write(f'{name} {offset}\\n') +host_fail = os.environ.get('TEST_FAIL_HOST') +if host_fail and host_fail in url: + sys.exit(22) action = [] plan = os.environ.get('TEST_PLAN') if plan and os.path.exists(plan): @@ -63,7 +62,6 @@ sys.exit(28 if end < len(data) else 0) ''') curl.chmod(0o755) self.plan = self.root / 'plan' - # macOS has shasum; the guest and Linux CI have sha256sum. if shutil.which('sha256sum') is None: sha = self.bin / 'sha256sum' sha.write_text('#!/bin/bash\nexec shasum -a 256 "$@"\n') @@ -88,11 +86,12 @@ sys.exit(28 if end < len(data) else 0) f'\t\t"file" "{archive.name}"\n\t\t"sha2" "{digest}"\n' '\t}\n}\n') - def install(self): - return subprocess.run(['bash', str(SCRIPT)], env=self.env, text=True, capture_output=True) + def install(self, fail_host=None): + env = self.env if fail_host is None else dict(self.env, TEST_FAIL_HOST=fail_host) + return subprocess.run(['bash', str(SCRIPT)], env=env, text=True, capture_output=True) - def assert_installed(self, channel='steamdeck_publicbeta'): - result = self.install() + def assert_installed(self, channel='steamdeck_publicbeta', fail_host=None, expected=None): + result = self.install(fail_host) self.assertEqual(0, result.returncode, result.stderr) self.assertEqual(channel + '\n', (self.steam / 'package/beta').read_text()) self.assertEqual('123456\n', (self.steam / 'package/droiddeck-installed').read_text()) @@ -100,16 +99,25 @@ sys.exit(28 if end < len(data) else 0) self.assertTrue(os.access(client, os.X_OK)) self.assertEqual(channel, client.read_text()) self.assertEqual((self.steam / 'linuxarm64').resolve(), (self.home / '.steam/sdkarm64').resolve()) - self.assertEqual([ - 'https://client-update.fastly.steamstatic.com/steam_client_' + channel + '_linuxarm64', - 'https://client-update.fastly.steamstatic.com/' + channel + '.zip', - ], self.requests.read_text().splitlines()) + if expected is None: + expected = [ + 'https://client-update.steamstatic.com/steam_client_' + channel + '_linuxarm64', + 'https://client-update.steamstatic.com/' + channel + '.zip', + ] + self.assertEqual(expected, self.requests.read_text().splitlines()) def test_downloads_the_deck_beta_client(self): self.assert_installed() + def test_a_cdn_that_does_not_answer_hands_over_to_the_next_one(self): + akamai = 'https://client-update.akamai.steamstatic.com' + self.assert_installed(fail_host='client-update.steamstatic.com', expected=[ + 'https://client-update.steamstatic.com/steam_client_steamdeck_publicbeta_linuxarm64', + akamai + '/steam_client_steamdeck_publicbeta_linuxarm64', + akamai + '/steamdeck_publicbeta.zip', + ]) + def test_an_install_from_another_branch_is_left_for_steam_to_move(self): - # An older app could install publicbeta; droiddeck-session moves the client at its start. self.assert_installed() requests = self.requests.read_text() (self.steam / 'package/beta').write_text('publicbeta\n') @@ -187,7 +195,6 @@ sys.exit(28 if end < len(data) else 0) self.assertEqual(0, self.install().returncode) self.assertFalse(self.requests.exists()) - def publish(self, **parts): """The CDN's client as these parts (block name -> byte count of incompressible content), listed with sizes as Valve's manifest lists them.""" @@ -247,7 +254,7 @@ sys.exit(28 if end < len(data) else 0) def test_a_failed_session_keeps_what_it_finished_and_fetched(self): files = self.two_parts() client = files['client_linuxarm64_linuxarm64'] - self.plan_for(client, 'cut 400000', *['fail 6'] * 4) + self.plan_for(client, 'cut 400000', *['fail 6'] * 12) result = self.install() self.assertNotEqual(0, result.returncode) self.assertIn('could not download client_linuxarm64_linuxarm64 (curl exit 6)', result.stderr) @@ -285,7 +292,7 @@ sys.exit(28 if end < len(data) else 0) self.download.mkdir(parents=True) (self.download / 'a_all.zip.0123').write_bytes(b'older') (self.download / 'b_all.zip.4567.unpacked').write_bytes(b'') - self.plan_for(files['client_linuxarm64_linuxarm64'], *['fail 7'] * 4) + self.plan_for(files['client_linuxarm64_linuxarm64'], *['fail 7'] * 12) self.assertNotEqual(0, self.install().returncode) self.assertEqual([files['a_all'] + '.unpacked'], sorted(p.name for p in self.download.iterdir())) @@ -294,7 +301,7 @@ sys.exit(28 if end < len(data) else 0) self.assertEqual(0, self.install().returncode) (self.home / '.bl-steam-repair').write_text('1\n') self.requests.unlink() - self.plan_for(files['client_linuxarm64_linuxarm64'], *['fail 7'] * 4) + self.plan_for(files['client_linuxarm64_linuxarm64'], *['fail 7'] * 12) self.assertNotEqual(0, self.install().returncode) self.assertIn(files['a_all'], self.requested()) self.requests.unlink() diff --git a/tools/tests/test_steam_language.py b/tools/tests/test_steam_language.py index 43b1e1a957..22d26e4634 100644 --- a/tools/tests/test_steam_language.py +++ b/tools/tests/test_steam_language.py @@ -37,7 +37,6 @@ def value(text, *path): STEAM = ('Registry', 'HKCU', 'Software', 'Valve', 'Steam', 'language') GLOBAL = ('Registry', 'HKCU', 'Software', 'Valve', 'Steamsteamglobal', 'language') -# As the client leaves it on a device (trimmed): both keys, other values beside them, and HKLM. CLIENT = '''"Registry" { "HKLM" diff --git a/tools/tests/test_steam_libraries.py b/tools/tests/test_steam_libraries.py index 3987470ba6..4f416a8401 100644 --- a/tools/tests/test_steam_libraries.py +++ b/tools/tests/test_steam_libraries.py @@ -121,7 +121,7 @@ class CompatLibrariesTest(unittest.TestCase): manifest(self.pc / "steamapps", 30) manifest(self.pc / "steamapps", 3127680, installdir="FEX") self.assertEqual(["20", "30"], COMPAT["installed_apps"](str(self.steam))) - self.assertEqual(["1628350"], COMPAT["fex_missing"](str(self.steam))) + self.assertEqual(["1628350", "4183110"], COMPAT["fex_missing"](str(self.steam))) def test_newest_proton_across_libraries_wins(self): for root, build in ((self.steam, "100"), (self.pc, "200")): diff --git a/tools/tests/test_steam_restart_cap.py b/tools/tests/test_steam_restart_cap.py new file mode 100644 index 0000000000..1763bc77f1 --- /dev/null +++ b/tools/tests/test_steam_restart_cap.py @@ -0,0 +1,34 @@ +import re +import subprocess +import unittest +from pathlib import Path + +SESSION = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/droiddeck-session" + + +def stuck_function(): + match = re.search(r"^steam_update_stuck\(\) \{\n.*?^\}\n", SESSION.read_text(), re.M | re.S) + return match.group(0) if match else None + + +class SteamRestartCapTest(unittest.TestCase): + def restarts(self, *seconds_up): + function = stuck_function() + self.assertIsNotNone(function, "droiddeck-session has no steam_update_stuck()") + script = function + "steam_updates=0\nfor up in %s; do\n" % " ".join(map(str, seconds_up)) + script += " if steam_update_stuck \"$up\"; then echo stop; else echo restart; fi\ndone\n" + return subprocess.run(["bash", "-c", script], capture_output=True, text=True, timeout=30, + check=True).stdout.split() + + def test_an_update_that_keeps_asking_at_once_is_stopped_on_the_third(self): + self.assertEqual(["restart", "restart", "stop"], self.restarts(11, 13, 9)) + + def test_restarts_of_a_client_that_stayed_up_are_never_stopped(self): + self.assertEqual(["restart"] * 5, self.restarts(75, 4000, 90, 600, 61)) + + def test_a_run_that_stayed_up_starts_the_count_again(self): + self.assertEqual(["restart", "restart", "restart", "restart", "stop"], self.restarts(12, 10, 300, 14, 8)) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_steam_shortcut_recovery.py b/tools/tests/test_steam_shortcut_recovery.py new file mode 100644 index 0000000000..fc196e94f1 --- /dev/null +++ b/tools/tests/test_steam_shortcut_recovery.py @@ -0,0 +1,185 @@ +import os +from pathlib import Path +import subprocess +import tempfile +import textwrap +import unittest + +SESSION = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/droiddeck-session" +SOURCE = SESSION.read_text() +START = SOURCE.index(" steam_other_game_running() {") +END = SOURCE.index(" steam_bring_forward() {", START) +FUNCTIONS = textwrap.dedent(SOURCE[START:END]) +GAME = str((3333273269 << 32) | 0x02000000) + + +class SteamShortcutRecoveryTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + self.launch = self.root / "session" + self.launch.mkdir() + self.bin = self.root / "bin" + self.bin.mkdir() + steam = self.root / "steam/steamrtarm64" + steam.mkdir(parents=True) + self.steam_log = self.root / "steam-args" + (steam / "steam").write_text("#!/bin/sh\nprintf '%s\\n' \"$*\" >> \"$STEAM_LOG\"\n") + (steam / "steam").chmod(0o755) + self.agent = self.bin / "droiddeck-agent" + self.agent.write_text( + "#!/bin/sh\n" + "n=$(cat \"$AGENT_COUNT\" 2>/dev/null || echo 0); n=$((n + 1)); echo $n > \"$AGENT_COUNT\"\n" + "i=0; last=0\n" + "for s in $AGENT_STATES; do i=$((i + 1)); last=$s; [ \"$i\" -eq \"$n\" ] && exit \"$s\"; done\n" + "exit \"$last\"\n") + self.agent.chmod(0o755) + + def launch_game(self, states, focusable="769", extra=None, client=None): + xprop = self.bin / "xprop" + xprop.write_text("#!/bin/sh\necho 'GAMESCOPE_FOCUSABLE_APPS(CARDINAL) = %s'\n" % focusable) + xprop.chmod(0o755) + script = "nap() { :; }\nsteam_root=%s\n%s%s\nsteam_launch_game %s\n" % ( + self.root / "steam", "steam_client=(%s --exec)\n" % client if client else "", + FUNCTIONS.replace("/usr/local/bin/droiddeck-agent", str(self.agent)), GAME) + env = dict(os.environ, HOME=str(self.root), BL_LAUNCH_DIR=str(self.launch), + PATH=str(self.bin) + os.pathsep + os.environ["PATH"], STEAM_LOG=str(self.steam_log), + AGENT_COUNT=str(self.root / "agent-count"), AGENT_STATES=states, **(extra or {})) + result = subprocess.run(["bash", "-c", script], env=env, text=True, capture_output=True, timeout=10) + self.assertEqual(0, result.returncode, result.stderr) + steam = self.steam_log.read_text().splitlines() if self.steam_log.exists() else [] + restart = self.root / ".bl-restart-game" + return steam, restart.read_text().strip() if restart.exists() else None, result.stdout + + def test_a_shortcut_that_stays_known_launches_once(self): + steam, restart, _ = self.launch_game("0") + self.assertEqual(["steam://rungameid/" + GAME], steam) + self.assertIsNone(restart) + self.assertEqual("9", (self.root / "agent-count").read_text().strip()) + + def test_a_shortcut_dropped_while_launching_restarts_steam_for_it(self): + steam, restart, out = self.launch_game("0 0 4") + self.assertEqual(["steam://rungameid/" + GAME, "-shutdown"], steam) + self.assertEqual(GAME, restart) + self.assertIn("dropped shortcut", out) + + def test_the_running_x86_64_client_gets_the_launch_and_the_restart(self): + x64 = self.bin / "droiddeck-steam-x64" + x64_log = self.root / "x64-args" + x64.write_text("#!/bin/sh\nprintf '%s\\n' \"$*\" >> \"$X64_LOG\"\n") + x64.chmod(0o755) + steam, restart, _ = self.launch_game("0 0 4", client=x64, extra={"X64_LOG": str(x64_log)}) + self.assertEqual([], steam) + self.assertEqual(["--exec steam://rungameid/" + GAME, "--exec -shutdown"], x64_log.read_text().splitlines()) + self.assertEqual(GAME, restart) + + def test_a_shortcut_already_lost_restarts_steam_without_launching(self): + steam, restart, out = self.launch_game("4") + self.assertEqual(["-shutdown"], steam) + self.assertEqual(GAME, restart) + self.assertIn("lost shortcut", out) + + def test_steam_is_restarted_only_once_for_the_same_game(self): + steam, restart, _ = self.launch_game("4") + self.assertEqual(GAME, restart) + (self.root / ".bl-restart-game").unlink() + self.steam_log.unlink() + (self.root / "agent-count").unlink() + steam, restart, out = self.launch_game("4") + self.assertEqual(["steam://rungameid/" + GAME], steam) + self.assertIsNone(restart) + self.assertIn("already restarted", out) + + def test_a_ready_shortcut_allows_a_later_restart_again(self): + self.launch_game("4") + (self.root / ".bl-restart-game").unlink() + (self.root / "agent-count").unlink() + self.launch_game("0") + self.assertFalse((self.root / ".bl-restarted-for").exists()) + + def test_a_running_game_is_never_cut_off_by_a_restart(self): + steam, restart, _ = self.launch_game("0 4", focusable="769,3703311242") + self.assertEqual(["steam://rungameid/" + GAME], steam) + self.assertIsNone(restart) + steam, restart, _ = self.launch_game("4", focusable="769,3703311242") + self.assertIsNone(restart) + + def test_the_open_launcher_does_not_count_as_a_running_game(self): + (self.launch / "epic-open").write_text("2702387189\n") + steam, restart, _ = self.launch_game("0 4", focusable="769,2702387189") + self.assertEqual(GAME, restart) + + def test_the_launcher_without_its_steam_id_still_does_not_count_as_a_running_game(self): + (self.launch / "epic-open").write_text("1\n") + launcher = {"BL_EPIC_APP_ID": "2702387189"} + steam, restart, _ = self.launch_game("0 4", focusable="769,2702387189", extra=launcher) + self.assertEqual(GAME, restart) + for marker in (".bl-restart-game", ".bl-restarted-for", "agent-count"): + (self.root / marker).unlink(missing_ok=True) + steam, restart, _ = self.launch_game("4", focusable="769,2702387189,3703311242", extra=launcher) + self.assertIsNone(restart) + + def test_steam_games_are_launched_without_watching(self): + steam, restart, _ = self.launch_game("3") + self.assertEqual(["steam://rungameid/" + GAME], steam) + self.assertIsNone(restart) + self.assertEqual("1", (self.root / "agent-count").read_text().strip()) + + def check_exits(self, listings, states, beats): + pgrep = self.bin / "pgrep" + pgrep.write_text( + "#!/bin/bash\n" + "n=$(cat \"$PGREP_COUNT\" 2>/dev/null || echo 0); n=$((n + 1)); echo $n > \"$PGREP_COUNT\"\n" + "IFS='|' read -r -a runs <<< \"$PGREP_RUNS\"\n" + "line=${runs[$((n - 1))]:-}\n" + "[ -n \"$line\" ] || exit 1\n" + "printf '%s\\n' \"$line\"\n") + pgrep.chmod(0o755) + script = "steam_root=%s\n%s\ndeclare -A _bl_ran=()\n_bl_exited=\n%s" % ( + self.root / "steam", FUNCTIONS.replace("/usr/local/bin/droiddeck-agent", str(self.agent)), + "steam_check_exits\n" * beats) + env = dict(os.environ, HOME=str(self.root), BL_LAUNCH_DIR=str(self.launch), + PATH=str(self.bin) + os.pathsep + os.environ["PATH"], STEAM_LOG=str(self.steam_log), + AGENT_COUNT=str(self.root / "agent-count"), AGENT_STATES=states, + PGREP_COUNT=str(self.root / "pgrep-count"), PGREP_RUNS="|".join(listings)) + result = subprocess.run(["bash", "-c", script], env=env, text=True, capture_output=True, timeout=10) + self.assertEqual(0, result.returncode, result.stderr) + steam = self.steam_log.read_text().splitlines() if self.steam_log.exists() else [] + agent = self.root / "agent-count" + return steam, (self.root / ".bl-restart-lost").exists(), int(agent.read_text()) if agent.exists() else 0, result.stdout + + RUNNING = "41 /root/.local/share/Steam/steamrtarm64/reaper SteamLaunch AppId=3333273269 -- /x/.droiddeck-launch.bat" + + def test_a_shortcut_dropped_when_its_game_exits_restarts_steam_once_nothing_runs(self): + steam, marker, asked, out = self.check_exits([self.RUNNING, "", "", ""], "4", 3) + self.assertEqual(["-shutdown"], steam) + self.assertTrue(marker) + self.assertEqual(1, asked) + self.assertIn("3333273269", out) + + def test_a_shortcut_still_listed_after_its_game_exits_is_left_alone(self): + steam, marker, asked, _ = self.check_exits([self.RUNNING, "", "", ""], "0", 4) + self.assertEqual([], steam) + self.assertFalse(marker) + self.assertEqual(1, asked) + + def test_the_check_waits_a_quiet_beat_after_the_exit(self): + steam, _, asked, _ = self.check_exits([self.RUNNING, ""], "4", 2) + self.assertEqual([], steam) + self.assertEqual(0, asked) + + def test_a_game_started_meanwhile_is_never_cut_off(self): + steam, marker, _, _ = self.check_exits([self.RUNNING, "", "", self.RUNNING], "4", 3) + self.assertEqual([], steam) + self.assertFalse(marker) + + def test_steam_games_are_not_checked(self): + game = "41 /root/.local/share/Steam/steamrtarm64/reaper SteamLaunch AppId=1245620 -- /x/eldenring.exe" + steam, _, asked, _ = self.check_exits([game, "", "", ""], "4", 3) + self.assertEqual([], steam) + self.assertEqual(0, asked) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_steam_shortcuts.py b/tools/tests/test_steam_shortcuts.py index 1213888f10..60a2998a60 100644 --- a/tools/tests/test_steam_shortcuts.py +++ b/tools/tests/test_steam_shortcuts.py @@ -147,6 +147,18 @@ class ShortcutsTest(unittest.TestCase): self.assertEqual({'1': 'Favorites', '0': shortcuts.TAG}, entry['tags']) self.assertEqual({'0': shortcuts.TAG}, shortcuts.merge(shortcuts.shortcut(self.game()), dict(shortcuts.shortcut(self.game()), tags={}), None, 0)[0]['tags']) + def test_a_copy_the_running_client_added_of_an_added_game_is_dropped(self): + self.run_writer(self.game()) + path = self.config / 'shortcuts.vdf' + data = shortcuts.parse(path.read_bytes())['shortcuts'] + live = dict(shortcuts.shortcut(self.game(appid=0x91234567)), tags={}) + own = dict(shortcuts.shortcut(self.game(exe='Other.exe', appid=0x92345678)), tags={}) + renamed = dict(shortcuts.shortcut(self.game(appid=0x93456789, name='My copy')), tags={}) + data.update({'7': live, '8': own, '9': renamed}) + path.write_bytes(shortcuts.write({'shortcuts': data})) + entries = self.run_writer(self.game()) + self.assertEqual({APPID, 0x92345678, 0x93456789}, set(entries)) + def test_a_damaged_record_is_started_over(self): self.run_writer(self.game()) (self.config / shortcuts.RECORD).write_text('{not json') @@ -172,7 +184,6 @@ class ShortcutsTest(unittest.TestCase): self.assertEqual('Example: Renamed', entry['AppName']) self.assertEqual('"%s/data"' % GUEST, entry['StartDir']) self.assertEqual('-dx11', entry['LaunchOptions']) - # One shortcut, the same appid. self.assertEqual([APPID], list(self.run_writer(game))) def test_a_target_chosen_in_the_app_updates_the_same_shortcut(self): diff --git a/tools/tests/test_steamvr_game.py b/tools/tests/test_steamvr_game.py new file mode 100644 index 0000000000..68c94d00d5 --- /dev/null +++ b/tools/tests/test_steamvr_game.py @@ -0,0 +1,65 @@ +import json +import os +from pathlib import Path +import socket +import subprocess +import tempfile +import unittest + + +SOURCE = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin/droiddeck-steamvr-game' + + +class SteamVrGameTest(unittest.TestCase): + def setUp(self): + temporary = tempfile.TemporaryDirectory() + self.addCleanup(temporary.cleanup) + self.root = Path(temporary.name) + self.helper = self.root / 'helper' + self.assertIn('/run/droiddeck/droiddeck-xr-frames', SOURCE.read_text()) + self.helper.write_text(SOURCE.read_text().replace('/run/droiddeck/droiddeck-xr-frames', + str(self.root / 'droiddeck-xr-frames')), encoding='utf-8') + self.command('pgrep', '#!/bin/sh\nexit 0\n') + self.command('gamescope', '#!/usr/bin/env python3\nimport json, os, sys\n' + 'print(json.dumps(dict(argv=sys.argv[1:], modifiers=os.getenv("gamescope_vr_use_modifiers"), ' + 'layers=os.getenv("VK_INSTANCE_LAYERS"))))\n') + self.env = {key: value for key, value in os.environ.items() + if not key.startswith(('gamescope_vr_', 'VK_'))} + self.env.update(PATH=str(self.root) + os.pathsep + os.environ['PATH'], + XDG_RUNTIME_DIR=str(self.root)) + + def command(self, name, text): + path = self.root / name + path.write_text(text, encoding='utf-8') + path.chmod(0o755) + + def run_game(self, *args): + return subprocess.run(['sh', str(self.helper), *args], env=self.env, + capture_output=True, text=True, timeout=5) + + def test_native_backend_preserves_command_arguments_and_nonquest_defaults(self): + result = self.run_game('game with spaces', 'a b', '$literal') + self.assertEqual(result.returncode, 0, result.stderr) + data = json.loads(result.stdout) + self.assertEqual(data['argv'][:2], ['--backend', 'openvr']) + self.assertEqual(data['argv'][-4:], ['--', 'game with spaces', 'a b', '$literal']) + self.assertIsNone(data['modifiers']) + self.assertEqual(data['layers'], 'VK_LAYER_DROIDDECK_vr') + + def test_quest_selects_vulkan_sharing_and_preserves_explicit_override(self): + with socket.socket(socket.AF_UNIX) as receiver: + receiver.bind(str(self.root / 'droiddeck-xr-frames')) + self.assertEqual(json.loads(self.run_game('game').stdout)['modifiers'], 'false') + self.env['gamescope_vr_use_modifiers'] = 'true' + self.assertEqual(json.loads(self.run_game('game').stdout)['modifiers'], 'true') + + def test_missing_runtime_and_missing_command_fail_clearly(self): + self.assertEqual(self.run_game().returncode, 2) + self.command('pgrep', '#!/bin/sh\nexit 1\n') + result = self.run_game('game') + self.assertEqual(result.returncode, 1) + self.assertIn('Start SteamVR', result.stderr) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_steamvr_graphics.py b/tools/tests/test_steamvr_graphics.py new file mode 100644 index 0000000000..9cdcd168f7 --- /dev/null +++ b/tools/tests/test_steamvr_graphics.py @@ -0,0 +1,79 @@ +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import time +import unittest + + +HELPER = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin/droiddeck-steamvr' + + +@unittest.skipUnless(shutil.which('sh'), 'requires a POSIX shell') +class SteamVrGraphicsTest(unittest.TestCase): + def launch(self, model, debug=None, action='start', preload=None): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + bindir = root / 'bin' + bindir.mkdir() + runtime = root / 'steamvr/bin/linuxarm64' + runtime.mkdir(parents=True) + (runtime / 'vrstartup').touch(mode=0o755) + driver = root / 'driver/droiddeck/bin/linuxarm64' + driver.mkdir(parents=True) + (driver / 'driver_droiddeck.so').touch() + result = root / 'launch-env' + preloads = root / 'launch-preload' + scripts = { + 'cat': 'if [ "$1" = /sys/class/kgsl/kgsl-3d0/gpu_model ]; then printf "%s" "$TEST_GPU_MODEL"; else exec /bin/cat "$@"; fi', + 'pgrep': 'exit 1', + 'setsid': 'printf "%s" "$LD_PRELOAD" > "$TEST_LAUNCH_PRELOAD"; printf "%s" "${TU_DEBUG-unset}" > "$TEST_LAUNCH_ENV"', + } + for name, script in scripts.items(): + path = bindir / name + path.write_text('#!/bin/sh\n' + script + '\n') + path.chmod(0o755) + env = dict(os.environ, HOME=str(root), XDG_RUNTIME_DIR=str(root / 'run'), + STEAMVR=str(root / 'steamvr'), DROIDDECK_VR_DIR=str(root / 'driver'), + PATH=str(bindir) + os.pathsep + os.environ['PATH'], + TEST_GPU_MODEL=model, TEST_LAUNCH_ENV=str(result), TEST_LAUNCH_PRELOAD=str(preloads)) + env.pop('TU_DEBUG', None) + env.pop('LD_PRELOAD', None) + if debug is not None: + env['TU_DEBUG'] = debug + if preload is not None: + env['LD_PRELOAD'] = preload + run = subprocess.run(['sh', str(HELPER), action], env=env, + capture_output=True, text=True, timeout=10) + self.assertEqual(run.returncode, 0, run.stderr) + until = time.monotonic() + 2 + while not result.exists() and time.monotonic() < until: + time.sleep(0.01) + self.assertEqual(preloads.read_text(), str(root / 'driver/layer/libdroiddeck_vr_scheduling.so') + + (':' + preload if preload else '')) + return result.read_text() + + def test_adreno_840_start_removes_forced_sysmem(self): + self.assertEqual(self.launch('Adreno840v2', 'sysmem'), '') + self.assertEqual(self.launch('Adreno840v2'), '') + + def test_preserves_other_debug_flags_and_removes_repeated_sysmem(self): + self.assertEqual(self.launch('Adreno840v2', 'sysmem,forcecb,sysmem,noubwc'), 'forcecb,noubwc') + self.assertEqual(self.launch('Adreno840v2', 'forcecb sysmem flushall'), 'forcecb,flushall') + + def test_library_launch_uses_the_same_graphics_setup(self): + self.assertEqual(self.launch('Adreno840v2', 'sysmem,forcecb', action='launch'), 'forcecb') + + def test_scheduling_preload_preserves_existing_preloads(self): + self.assertEqual(self.launch('Adreno840v2', 'sysmem', action='launch', + preload='/existing/preload.so'), '') + + def test_other_and_unknown_gpus_keep_their_environment(self): + self.assertEqual(self.launch('Adreno740'), 'unset') + self.assertEqual(self.launch('Adreno740', 'sysmem,forcecb'), 'sysmem,forcecb') + self.assertEqual(self.launch('', 'sysmem'), 'sysmem') + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_steamvr_helper.py b/tools/tests/test_steamvr_helper.py new file mode 100644 index 0000000000..3fa3e82255 --- /dev/null +++ b/tools/tests/test_steamvr_helper.py @@ -0,0 +1,215 @@ +import os +import json +import shutil +import socket +import subprocess +import sys +import tempfile +import time +import unittest +from pathlib import Path + + +SOURCE = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin/droiddeck-steamvr' + + +class SteamVrHelperTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.compiler_output = tempfile.TemporaryDirectory() + cls.addClassCleanup(cls.compiler_output.cleanup) + cls.scheduling = Path(cls.compiler_output.name) / 'libdroiddeck_vr_scheduling.so' + source = Path(__file__).resolve().parents[1] / 'vr/src/scheduling.c' + subprocess.run(['cc', '-shared', '-fPIC', '-o', str(cls.scheduling), str(source), '-ldl'], check=True) + + def setUp(self): + self.temporary = tempfile.TemporaryDirectory() + self.addCleanup(self.temporary.cleanup) + self.root = Path(self.temporary.name) + self.home = self.root / 'home' + self.runtime = self.root / 'runtime' + self.commands = self.root / 'commands' + self.driver = self.root / 'driver/droiddeck/bin/linuxarm64' + self.steamvr = self.root / 'steamvr' + for directory in (self.commands, self.driver, self.steamvr / 'bin/linuxarm64'): + directory.mkdir(parents=True) + self.helper = self.root / 'droiddeck-steamvr' + self.assertIn('/run/droiddeck/droiddeck-xr-frames', SOURCE.read_text()) + self.helper.write_text(SOURCE.read_text().replace('/run/droiddeck/droiddeck-xr-frames', + str(self.runtime / 'droiddeck-xr-frames')), encoding='utf-8') + self.executable(self.commands / 'pgrep', 'exit 1') + self.executable(self.commands / 'sleep', 'exit 0') + self.executable(self.commands / 'xset', 'exit 0') + self.executable(self.commands / 'setsid', 'exec "$@"') + self.executable(self.driver / 'xr-display-mode', 'echo 3360x1760@120') + self.executable(self.steamvr / 'bin/linuxarm64/vrstartup', + 'echo "display=${DROIDDECK_VR_DISPLAY_MODE:-unset}"') + (self.driver / 'driver_droiddeck.so').touch() + layer = self.root / 'driver/layer' + layer.mkdir() + shutil.copyfile(self.scheduling, layer / self.scheduling.name) + self.environment = dict(os.environ) + self.environment.pop('DROIDDECK_VR_DISPLAY_MODE', None) + self.environment.pop('DROIDDECK_VR_PRESENT', None) + self.environment.pop('DROIDDECK_VR_PRODUCER_LEASE', None) + self.environment.update(HOME=str(self.home), XDG_RUNTIME_DIR=str(self.runtime), + STEAMVR=str(self.steamvr), DROIDDECK_VR_DIR=str(self.root / 'driver'), + DROIDDECK_VR_SETTINGS_HELPER=str(SOURCE.with_name('droiddeck-steamvr-settings')), + PATH=str(self.commands) + os.pathsep + os.environ['PATH']) + + def executable(self, destination, body): + destination.write_text('#!/bin/sh\n' + body + '\n', encoding='utf-8') + destination.chmod(0o755) + + def start(self): + result = subprocess.run(['sh', str(self.helper), 'start'], env=self.environment, + capture_output=True, text=True, timeout=5) + self.assertEqual(result.returncode, 0, result.stderr) + log = self.home / '.local/share/Steam/logs/droiddeck-vrstartup.log' + deadline = time.monotonic() + 2 + while time.monotonic() < deadline: + if log.is_file() and 'display=' in log.read_text(): + return log + time.sleep(0.01) + self.fail('Startup log did not arrive') + + def test_fresh_runtime_mode_is_selected_and_log_survives_runtime_cleanup(self): + log = self.start() + self.assertEqual((self.runtime / 'droiddeck-steamvr').stat().st_mode & 0o777, 0o700) + self.assertEqual(log.read_text().strip(), 'display=3360x1760@120') + self.assertEqual((self.runtime / 'droiddeck-steamvr/vrstartup.log').resolve(), log) + shutil.rmtree(self.runtime) + self.assertTrue(log.is_file()) + + def test_explicit_display_override_is_preserved(self): + self.environment['DROIDDECK_VR_DISPLAY_MODE'] = '1920x1080@90' + self.assertEqual(self.start().read_text().strip(), 'display=1920x1080@90') + + def test_stale_or_missing_tracking_keeps_the_default(self): + self.executable(self.driver / 'xr-display-mode', 'exit 1') + self.assertEqual(self.start().read_text().strip(), 'display=unset') + + def test_older_runtime_without_the_reader_still_starts(self): + (self.driver / 'xr-display-mode').unlink() + self.assertEqual(self.start().read_text().strip(), 'display=unset') + + def lease_log(self): + self.executable(self.steamvr / 'bin/linuxarm64/vrstartup', + 'printf "display=%s present=%s lease=%s\\n" "${DROIDDECK_VR_DISPLAY_MODE:-unset}" ' + '"${DROIDDECK_VR_PRESENT:-unset}" "${DROIDDECK_VR_PRODUCER_LEASE:-unset}"') + return self.start().read_text().strip() + + def test_quest_receiver_uses_normal_compositor_and_excludes_unsupported_frame_backend(self): + self.runtime.mkdir() + cvp = self.steamvr / 'drivers/cv/bin/linuxarm64/libArcturusPerception.so' + cvp.parent.mkdir(parents=True) + cvp.write_bytes(b'frame-only backend') + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as receiver: + receiver.bind(str(self.runtime / 'droiddeck-xr-frames')) + self.assertIn('present=questwsi lease=unset', self.lease_log()) + settings = json.loads((self.home / '.local/share/Steam/config/steamvr.vrsettings').read_text()) + self.assertEqual(settings['steamvr'], {'enableLinuxVulkanAsync': True, 'motionSmoothing': False}) + self.assertFalse(cvp.exists()) + self.assertEqual(Path(str(cvp) + '.droiddeck-disabled').read_bytes(), b'frame-only backend') + + def test_quest_settings_preserve_other_preferences_and_start_is_idempotent(self): + self.environment['DROIDDECK_VR_PRESENT'] = 'questwsi' + path = self.home / '.local/share/Steam/config/steamvr.vrsettings' + path.parent.mkdir(parents=True) + path.write_text(json.dumps({'steamvr': {'somePreference': 42}, 'dashboard': {'somePreference': True}})) + self.start() + self.start() + settings = json.loads(path.read_text()) + self.assertEqual(settings['steamvr']['somePreference'], 42) + self.assertEqual(settings['dashboard'], {'somePreference': True}) + + def test_quest_refuses_to_overwrite_malformed_settings(self): + self.environment['DROIDDECK_VR_PRESENT'] = 'questwsi' + path = self.home / '.local/share/Steam/config/steamvr.vrsettings' + path.parent.mkdir(parents=True) + path.write_text('invalid json') + result = subprocess.run(['sh', str(self.helper), 'start'], env=self.environment, + capture_output=True, text=True, timeout=5) + self.assertNotEqual(result.returncode, 0) + self.assertEqual(path.read_text(), 'invalid json') + + def test_quest_stop_restores_only_overridden_preferences(self): + self.environment['DROIDDECK_VR_PRESENT'] = 'questwsi' + path = self.home / '.local/share/Steam/config/steamvr.vrsettings' + path.parent.mkdir(parents=True) + path.write_text(json.dumps({'steamvr': {'motionSmoothing': True, 'somePreference': 42}})) + self.start() + settings = json.loads(path.read_text()) + settings['dashboard'] = {'changedDuringSession': True} + path.write_text(json.dumps(settings)) + subprocess.run(['sh', str(self.helper), 'stop'], env=self.environment, check=True) + self.assertEqual(json.loads(path.read_text()), {'steamvr': {'motionSmoothing': True, 'somePreference': 42}, + 'dashboard': {'changedDuringSession': True}}) + + def test_invalid_backup_preserves_preferences_until_repaired(self): + settings = self.root / 'steamvr.vrsettings' + backup = self.root / 'quest-backup.json' + helper = SOURCE.with_name('droiddeck-steamvr-settings') + original = {'steamvr': {'motionSmoothing': True}, 'dashboard': {'unchanged': 42}} + settings.write_text(json.dumps(original)) + subprocess.run([sys.executable, str(helper), 'apply', str(settings), str(backup)], check=True) + valid_backup = backup.read_bytes() + applied = settings.read_bytes() + invalid = ['truncated {', '{}', '{"section": true, "values": []}', + '{"section": false, "values": {"motionSmoothing": [false]}}'] + for content in invalid: + for operation in ('apply', 'restore'): + with self.subTest(content=content, operation=operation): + backup.write_text(content) + result = subprocess.run([sys.executable, str(helper), operation, str(settings), str(backup)], + capture_output=True, text=True) + self.assertNotEqual(result.returncode, 0) + self.assertIn('repair the saved section/values and retry restore', result.stderr) + self.assertEqual(backup.read_text(), content) + self.assertEqual(settings.read_bytes(), applied) + backup.write_bytes(valid_backup) + subprocess.run([sys.executable, str(helper), 'restore', str(settings), str(backup)], check=True) + self.assertEqual(json.loads(settings.read_text()), original) + self.assertFalse(backup.exists()) + + def test_quest_update_preserves_previous_cvp_backup(self): + self.environment['DROIDDECK_VR_PRESENT'] = 'questwsi' + cvp = self.steamvr / 'drivers/cv/bin/linuxarm64/libArcturusPerception.so' + cvp.parent.mkdir(parents=True) + cvp.write_bytes(b'updated library') + backup = Path(str(cvp) + '.droiddeck-disabled') + backup.write_bytes(b'previous library') + self.start() + self.assertFalse(cvp.exists()) + self.assertEqual(backup.read_bytes(), b'previous library') + self.assertEqual([p.read_bytes() for p in cvp.parent.glob('*.droiddeck-disabled.*')], [b'updated library']) + + def test_start_failure_after_overrides_restores_preferences(self): + self.environment['DROIDDECK_VR_PRESENT'] = 'questwsi' + path = self.home / '.local/share/Steam/config/steamvr.vrsettings' + path.parent.mkdir(parents=True) + original = {'steamvr': {'enableLinuxVulkanAsync': False, 'motionSmoothing': True}} + path.write_text(json.dumps(original)) + cvp = self.steamvr / 'drivers/cv/bin/linuxarm64/libArcturusPerception.so' + cvp.parent.mkdir(parents=True) + cvp.touch() + self.executable(self.commands / 'mv', 'exit 1') + result = subprocess.run(['sh', str(self.helper), 'start'], env=self.environment, + capture_output=True, text=True, timeout=5) + self.assertNotEqual(result.returncode, 0) + self.assertEqual(json.loads(path.read_text()), original) + + def test_explicit_quest_presenter_enables_the_lease(self): + self.environment['DROIDDECK_VR_PRESENT'] = 'questframes' + self.assertIn('present=questframes lease=1', self.lease_log()) + + def test_explicit_diagnostic_override_is_preserved(self): + self.environment.update(DROIDDECK_VR_PRESENT='questframes', DROIDDECK_VR_PRODUCER_LEASE='0') + self.assertIn('present=questframes lease=0', self.lease_log()) + + def test_flat_presenter_does_not_enable_the_producer_lease(self): + self.assertIn('present=unset lease=unset', self.lease_log()) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_steamvr_settings.py b/tools/tests/test_steamvr_settings.py new file mode 100644 index 0000000000..501fc9365f --- /dev/null +++ b/tools/tests/test_steamvr_settings.py @@ -0,0 +1,83 @@ +import json +from pathlib import Path +import subprocess +import sys +import tempfile +import unittest + + +HELPER = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin/droiddeck-steamvr' +SCRIPT = HELPER.read_text().split("<<'PY'\n", 1)[1].split('\nPY\n', 1)[0] + + +class SteamVrSettingsTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.path = Path(self.temp.name) / 'steamvr.vrsettings' + + def run_defaults(self): + result = subprocess.run([sys.executable, '-', str(self.path)], input=SCRIPT, + capture_output=True, text=True, timeout=10) + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(list(self.path.parent.iterdir()), [self.path]) + return result + + def test_new_install_defaults_to_manual_100_percent(self): + self.run_defaults() + self.assertEqual(json.loads(self.path.read_text()), { + 'steamvr': {'supersampleManualOverride': True, 'supersampleScale': 1.0}}) + + def test_existing_automatic_gpu_estimate_does_not_override_app_resolution(self): + settings = {'GpuSpeed': {'gpuSpeedRenderTargetScale': 1.1}, + 'steamvr': {'environmentMode': 0}, 'driver_droiddeck': {'directMode': True}} + self.path.write_text(json.dumps(settings)) + self.run_defaults() + settings['steamvr'].update(supersampleManualOverride=True, supersampleScale=1.0) + self.assertEqual(json.loads(self.path.read_text()), settings) + + def test_explicit_user_and_per_game_settings_are_preserved_without_rewrite(self): + for manual in (False, True): + with self.subTest(manual=manual): + settings = {'steamvr': {'supersampleManualOverride': manual, 'supersampleScale': 0.7}, + 'steam.app.611670': {'resolutionScale': 80}} + content = json.dumps(settings) + self.path.write_text(content) + self.run_defaults() + self.assertEqual(self.path.read_text(), content) + + def test_defaults_are_idempotent(self): + self.run_defaults() + before = self.path.read_bytes() + self.run_defaults() + self.assertEqual(self.path.read_bytes(), before) + + def test_partial_user_settings_are_preserved(self): + self.path.write_text('{"steamvr": {"supersampleScale": 0.5}}') + self.run_defaults() + self.assertEqual(json.loads(self.path.read_text())['steamvr'], { + 'supersampleScale': 0.5, 'supersampleManualOverride': True}) + + def test_a_crash_block_on_the_droiddeck_driver_is_cleared_and_others_kept(self): + settings = {'steamvr': {'supersampleManualOverride': True, 'supersampleScale': 1.0}, + 'driver_droiddeck': {'blocked_by_safe_mode': True, 'directMode': True}, + 'driver_lighthouse': {'blocked_by_safe_mode': True}} + self.path.write_text(json.dumps(settings)) + self.assertIn('unblocked it', self.run_defaults().stdout) + settings['driver_droiddeck']['blocked_by_safe_mode'] = False + self.assertEqual(json.loads(self.path.read_text()), settings) + + def test_the_crash_marker_is_removed_so_steamvr_does_not_start_in_safe_mode(self): + (self.path.parent / 'vrserver_crash_timestamp.txt').write_text('1792116926 1789606310 223') + self.assertIn('crash marker', self.run_defaults().stdout) + + def test_invalid_settings_are_reported_without_losing_the_original(self): + for content in ('{broken', '[]', '{"steamvr": null}', '{"steamvr": []}'): + with self.subTest(content=content): + self.path.write_text(content) + self.assertIn('Could not set SteamVR resolution defaults', self.run_defaults().stderr) + self.assertEqual(self.path.read_text(), content) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_stereo_frame_gate.cpp b/tools/tests/test_stereo_frame_gate.cpp new file mode 100644 index 0000000000..1603bd657e --- /dev/null +++ b/tools/tests/test_stereo_frame_gate.cpp @@ -0,0 +1,66 @@ +#include "../../app/src/main/cpp/viture/stereo_frame_gate.h" +#include <cassert> +#include <cstdio> +#include <initializer_list> +#include <limits> + +int main() { + StereoFrameGate gate; + gate.SetHalfRate(true); + int copies = 0; + for (int i = 0; i < 250; ++i) { + const bool accepted = gate.Accept(1 + i*.04); + assert(accepted == (i%2 == 0)); + copies += accepted; + } + assert(copies == 125 && gate.received == 250 && gate.skipped == 125); + gate.SetHalfRate(false); + for (int i = 0; i < 25; ++i) assert(gate.Accept(20 + i*.04)); + assert(gate.received == 275 && gate.skipped == 125); + gate.SetHalfRate(true); + assert(gate.Accept(30)); + gate.SetHalfRate(true); + assert(!gate.Accept(30.04)); + assert(gate.Accept(30.08)); + assert(gate.Accept(1)); + assert(!gate.Accept(1.04)); + const auto count = gate.received; + assert(!gate.Accept(std::numeric_limits<double>::quiet_NaN())); + assert(!gate.Accept(0)); + assert(gate.received == count); + gate = {}; + gate.SetHalfRate(true); + assert(gate.Accept(1) && gate.received == 1 && gate.skipped == 0); + for (int rate : {500, 600, 800, 1000}) { + gate = {}; + gate.SetRatePermille(rate); + copies = 0; + int previousCopy = 0; + for (int i = 0; i < 250; ++i) { + gate.SetRatePermille(rate); + const bool accepted = gate.Accept(1 + i*.04); + if (i == 0) assert(accepted); + if (accepted) { + assert(i-previousCopy <= 2); + previousCopy = i; + ++copies; + } + } + assert(copies == 250*rate/1000); + assert(gate.received == 250 && gate.skipped == uint64_t(250-copies)); + assert(gate.Accept(.5)); + } + gate = {}; + for (int rate : {500, 600, 800, 1000, 800, 600, 500}) { + gate.SetRatePermille(rate); + assert(gate.Accept(1 + gate.received*.04)); + } + for (int invalid : {-1, 0, 499, 700, 1001}) { + gate = {}; + gate.SetRatePermille(invalid); + assert(gate.Accept(1)); + assert(!gate.Accept(1.04)); + assert(gate.Accept(1.08)); + } + puts("PASS: fractional stereo copies, stable phase, full-rate setup, source resets, invalid settings and reconnect reset"); +} diff --git a/tools/tests/test_storage_preload.py b/tools/tests/test_storage_preload.py index 2bf01eb011..4bdee7826f 100644 --- a/tools/tests/test_storage_preload.py +++ b/tools/tests/test_storage_preload.py @@ -88,6 +88,9 @@ class StoragePreloadTest(unittest.TestCase): subprocess.run(["cc", "-O2", "-o", str(cls.steam), str(build / "program.c")], check=True) cls.other = build / "steamwebhelper" shutil.copy(cls.steam, cls.other) + cls.steam_x64 = cls.dir / "steamrt64/steam" + cls.steam_x64.parent.mkdir() + shutil.copy(cls.steam, cls.steam_x64) @classmethod def tearDownClass(cls): @@ -117,6 +120,12 @@ class StoragePreloadTest(unittest.TestCase): self.assertEqual(["fallocate -1 EOPNOTSUPP 0", "ftruncate 0 - 0", "ftruncate 0 - 0"], out) self.assertEqual(["data.pak 0"], self.reached()) + def test_x86_64_client_reservation_is_not_zero_filled_either(self): + data = self.staging / "data.pak" + out = self.run_program(("fallocate", data, 1 << 20), ("ftruncate", data, 1 << 20), program=self.steam_x64) + self.assertEqual(["fallocate -1 EOPNOTSUPP 0", "ftruncate 0 - 0"], out) + self.assertEqual([], self.reached()) + def test_reservation_is_real_until_the_device_has_refused_one(self): data = self.staging / "data.pak" self.assertEqual(["ftruncate 0 - 4096"], self.run_program(("ftruncate", data, 4096))) diff --git a/tools/tests/test_store_launch.py b/tools/tests/test_store_launch.py index 46a255f758..1acf493ac9 100644 --- a/tools/tests/test_store_launch.py +++ b/tools/tests/test_store_launch.py @@ -10,6 +10,7 @@ import tempfile import threading import time import unittest +from unittest.mock import patch BIN = Path(__file__).resolve().parents[1] / 'linuxfs/overlay/usr/local/bin' @@ -55,7 +56,6 @@ class Detection(unittest.TestCase): def test_anything_else_is_left_alone(self): with tempfile.TemporaryDirectory() as root: folder = game(root) - # The exe of a store game is one too (a GOG game without a launcher); a stray file is not. self.assertEqual(folder, store.find_store_game([str(folder / 'Metalstorm.exe')])[0]) self.assertIsNone(store.find_store_game([str(Path(root) / 'elsewhere/readme.txt')])) (folder / '.droiddeck-store.json').unlink() @@ -64,15 +64,16 @@ class Detection(unittest.TestCase): def test_only_epic_asks_for_a_code(self): with tempfile.TemporaryDirectory() as root: folder = game(root, store_id='gog') - # Cloud saves off: nothing else to ask for either. sc = json.loads((folder / '.droiddeck-store.json').read_text()); sc['cloud'] = False (folder / '.droiddeck-store.json').write_text(json.dumps(sc)) os.environ['BL_LAUNCH_DIR'] = str(Path(root) / 'session') try: - self.assertEqual(0, store.main([str(folder / '.droiddeck-launch.bat')])) + with patch.object(store, 'ask', return_value={'ready': False, 'reason': 'off'}) as ask: + self.assertEqual(0, store.main([str(folder / '.droiddeck-launch.bat')])) + self.assertEqual('gog-achievements', ask.call_args.args[1]['op']) finally: del os.environ['BL_LAUNCH_DIR'] - self.assertFalse((Path(root) / 'session/stores').exists()) + class Asking(unittest.TestCase): @@ -133,7 +134,6 @@ class Prefix(unittest.TestCase): text = self.reg.read_text() self.assertIn('[Software\\\\Wine\\\\WineBrowser] ', text) self.assertIn('"Browsers"="/usr/local/bin/droiddeck-open-url,xdg-open"', text) - # A second launch adds nothing: the last word already says so. store.provision_prefix(str(self.compat)) self.assertEqual(text, self.reg.read_text()) @@ -155,7 +155,6 @@ class Choices(unittest.TestCase): folder = game(root) sidecar = json.loads((folder / '.droiddeck-store.json').read_text()) self.assertEqual({'eos': True, 'offline': False}, store.options(sidecar)) - # An earlier build's overlay field is read past. self.assertEqual({'eos': True, 'offline': False}, store.options({'epic': {'v': 2, 'overlay': True}})) sidecar['epic'] = {'eos': True, 'offline': True} sidecar['cloud'] = False @@ -172,7 +171,6 @@ class Choices(unittest.TestCase): finally: del os.environ['BL_LAUNCH_DIR'] del os.environ['STEAM_COMPAT_DATA_PATH'] - # Offline: no request was made and no code is left; the old overlay pointer is gone. self.assertFalse((Path(root) / 'session/stores/req').exists()) self.assertFalse((folder / '.droiddeck-epic-code').exists()) text = reg.read_text() @@ -197,7 +195,6 @@ class Browser(unittest.TestCase): class ExeTarget(unittest.TestCase): def test_a_game_started_by_its_exe_is_found_from_a_subfolder(self): - # Most GOG games have no launcher .bat: Steam runs the exe, which may sit in a subfolder. with tempfile.TemporaryDirectory() as root: folder = game(root, store_id='gog', ident='1207664643') (folder / 'bin/x64').mkdir(parents=True) @@ -219,15 +216,15 @@ class CloudHooks(unittest.TestCase): original = store.ask asked = [] store.ask = lambda channel, request, timeout=5.0: asked.append((request, timeout)) or {'ok': True, 'files': 2, 'reason': 'ok'} - # 10: the launcher waits for Proton and calls --exited afterwards. self.assertEqual(store.STORE_GAME, store.main([bat])) self.assertEqual(0, store.main(['--exited', bat])) finally: store.ask = original del os.environ['BL_LAUNCH_DIR'] - self.assertEqual({'op': 'cloud-down', 'store': 'gog', 'id': '1207664643'}, asked[0][0]) - self.assertEqual(store.CLOUD_TIMEOUT, asked[0][1]) - self.assertEqual('cloud-up', asked[1][0]['op']) + self.assertEqual('gog-achievements', asked[0][0]['op']) + self.assertEqual({'op': 'cloud-down', 'store': 'gog', 'id': '1207664643'}, asked[1][0]) + self.assertEqual(store.CLOUD_TIMEOUT, asked[1][1]) + self.assertEqual('cloud-up', asked[2][0]['op']) def test_cloud_off_or_amazon_runs_proton_as_before(self): with tempfile.TemporaryDirectory() as root: @@ -244,7 +241,7 @@ class CloudHooks(unittest.TestCase): self.assertIn('bl_run ${BL_TASKSET:-} /usr/local/bin/droiddeck-game-env', sh) self.assertNotIn('exec ${BL_TASKSET:-} /usr/local/bin/droiddeck-game-env', sh) self.assertIn('[ $? -eq 10 ] && BL_STORE_EXIT=1', compat.BL_STORE_SETUP) - self.assertIn('droiddeck-store-launch --exited "${BL_STORE_ARGS[@]}"', compat.BL_STORE_SETUP) + self.assertIn('droiddeck-store-launch --exited --code "$rc" "${BL_STORE_ARGS[@]}"', compat.BL_STORE_SETUP) self.assertIn('exec "$@"', compat.BL_STORE_SETUP) @@ -260,3 +257,60 @@ class Launchers(unittest.TestCase): if __name__ == '__main__': unittest.main() + + +class GogAchievements(unittest.TestCase): + def test_cloud_off_still_prepares_the_gog_companion(self): + with tempfile.TemporaryDirectory() as root: + folder = game(root, store_id='gog') + sidecar = json.loads((folder / store.SIDECAR).read_text()) + sidecar['cloud'] = False + (folder / store.SIDECAR).write_text(json.dumps(sidecar)) + with patch.dict(os.environ, {'BL_LAUNCH_DIR': root, 'STEAM_COMPAT_DATA_PATH': root + '/compat', 'BL_STORE_PROTON': '/chosen/proton'}), patch.object(store, 'ask', return_value={'ready': True}) as ask, patch.object(store, 'provision_galaxy', return_value='ready') as provision: + self.assertEqual(0, store.main([str(folder / store.LAUNCHER)])) + ask.assert_called_once() + provision.assert_called_once_with(root + '/compat', '/chosen/proton') + + def test_unavailable_companion_does_not_provision_or_block_the_game(self): + with patch.object(store, 'ask', return_value=None), patch.object(store, 'provision_galaxy') as provision: + self.assertFalse(store.prepare_gog({'id': '1', 'achievements': False}, '/pfx', '/session')) + provision.assert_not_called() + + def test_a_fresh_prefix_is_bootstrapped_before_marking_success(self): + with tempfile.TemporaryDirectory() as root: + base = Path(root) + tools = base / 'tools'; tools.mkdir() + for name in ('GalaxyCommunication.exe', 'update-permissions.exe', 'version'): + (tools / name).write_text(name) + proton = base / 'proton'; proton.write_text('selected Proton') + data = base / 'compat' + seen = [] + def run(argv, **kwargs): + self.assertEqual([str(proton), 'run', 'cmd.exe', '/d', '/c'], argv[:5]) + bat = Path(argv[5][2:].replace('\\', '/')) + text = bat.read_text() + seen.append(text) + self.assertIn('goto existing', text) + self.assertIn('update-permissions.exe', text) + result = text.split('echo ready>"')[1].split('"')[0] + Path(result[2:].replace('\\', '/')).write_text('ready') + (data / 'pfx').mkdir(parents=True) + (data / 'pfx/system.reg').write_text('Wine registry') + return __import__('subprocess').CompletedProcess(argv, 0) + with patch.object(store, 'COMET_DIR', tools), patch.object(store.subprocess, 'run', side_effect=run): + self.assertEqual('ready', store.provision_galaxy(str(data), str(proton))) + self.assertTrue((data / 'pfx/.droiddeck-comet-service').is_file()) + self.assertEqual('ready', store.provision_galaxy(str(data), str(proton))) + self.assertEqual(1, len(seen)) + __import__('shutil').rmtree(data / 'pfx') + self.assertEqual('ready', store.provision_galaxy(str(data), str(proton))) + self.assertEqual(2, len(seen)) + + def test_failed_service_install_is_not_marked_done(self): + with tempfile.TemporaryDirectory() as root: + base = Path(root) + for name in ('GalaxyCommunication.exe', 'update-permissions.exe', 'version', 'proton'): + (base / name).write_text(name) + with patch.object(store, 'COMET_DIR', base), patch.object(store.subprocess, 'run', return_value=__import__('subprocess').CompletedProcess([], 1)): + self.assertEqual('service-unavailable', store.provision_galaxy(str(base / 'compat'), str(base / 'proton'))) + self.assertFalse((base / 'compat/pfx/.droiddeck-comet-service').exists()) diff --git a/tools/tests/test_sysv_preload.py b/tools/tests/test_sysv_preload.py new file mode 100644 index 0000000000..75828567eb --- /dev/null +++ b/tools/tests/test_sysv_preload.py @@ -0,0 +1,25 @@ +from pathlib import Path +import os +import shutil +import subprocess +import sys +import tempfile +import unittest + +PRELOAD = Path(__file__).resolve().parents[1] / 'linuxfs' / 'preload' + + +@unittest.skipUnless(sys.platform == 'linux' and shutil.which('gcc'), 'needs Linux and gcc') +class SysvPreloadTest(unittest.TestCase): + def test_semop_sets_otime_for_waiters(self): + with tempfile.TemporaryDirectory() as folder: + binary = str(Path(folder) / 'test-sysv') + subprocess.run(['gcc', '-Wall', '-Wextra', '-O2', '-pthread', '-o', binary, + str(Path(__file__).resolve().parent / 'sysv_otime_harness.c'), str(PRELOAD / 'sysv.c')], check=True) + env = dict(os.environ, BL_SYSV_DIR=folder) + result = subprocess.run([binary], capture_output=True, text=True, timeout=10, env=env) + self.assertIn('PASS: sysv otime', result.stdout, result.stdout + result.stderr) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_termux_jni.py b/tools/tests/test_termux_jni.py index 0841140060..6fd3d97873 100644 --- a/tools/tests/test_termux_jni.py +++ b/tools/tests/test_termux_jni.py @@ -59,8 +59,6 @@ class TermuxJniTest(unittest.TestCase): return {key: int(value) for key, value in re.findall(r"(\w+)=(\d+)", line)} def test_a_long_argv_and_environment_stay_under_the_local_reference_limit(self): - # 300 + 300 is under 512 for each loop on its own but over it together, as the issue says: - # ART aborts with "local reference table overflow (max=512)". stats = self.run_harness(300, 300) self.assertEqual(stats["overflowed"], 0, stats) diff --git a/tools/tests/test_vr_chaperone.py b/tools/tests/test_vr_chaperone.py new file mode 100644 index 0000000000..074cd2daf6 --- /dev/null +++ b/tools/tests/test_vr_chaperone.py @@ -0,0 +1,25 @@ +import json +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + + +@unittest.skipUnless(shutil.which("g++"), "needs a Linux C++ compiler") +class XrChaperoneTest(unittest.TestCase): + def test_seated_origin_and_stage_preservation(self): + repository = Path(__file__).resolve().parents[2] + with tempfile.TemporaryDirectory() as directory: + executable = Path(directory) / "chaperone-test" + subprocess.run(["g++", "-std=c++17", "-Wall", "-Wextra", "-Werror", "-O2", + str(repository / "tools/vr/tests/test_xr_chaperone.cpp"), "-o", str(executable)], check=True) + result = json.loads(subprocess.check_output([str(executable)], text=True)) + self.assertEqual((result["jsonid"], result["version"]), ("chaperone_info", 5)) + self.assertEqual(result["time"], "2026-10-15T21:00:00Z") + universe, = result["universes"] + self.assertEqual(int(universe["universeID"]), 2) + self.assertEqual(universe["standing"], {"translation": [0, 0, 0], "yaw": 0}) + self.assertEqual(universe["collision_bounds"], []) + self.assertEqual(universe["play_area"], [0, 0]) + self.assertAlmostEqual(universe["seated"]["translation"][1], -1.6, places=6) diff --git a/tools/tests/test_vr_producer_lease.py b/tools/tests/test_vr_producer_lease.py new file mode 100644 index 0000000000..d11721ed96 --- /dev/null +++ b/tools/tests/test_vr_producer_lease.py @@ -0,0 +1,45 @@ +import ctypes.util +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + + +@unittest.skipUnless(shutil.which("gcc"), "needs gcc on a Linux host") +class VrProducerLeaseTest(unittest.TestCase): + def compile_and_run(self, source, headers=None, gpu=False): + repository = Path(__file__).resolve().parents[2] + with tempfile.TemporaryDirectory() as directory: + executable = Path(directory) / "producer-test" + command = ["gcc", "-std=c11", "-O2", "-Wall", "-Wextra", "-Werror", "-Wno-unused-parameter", "-pthread"] + if headers: + command += ["-I" + str(headers)] + command += [str(repository / "tools/vr/tests" / source), "-ldl"] + if gpu: + command += ["-l:libvulkan.so.1"] + subprocess.run(command + ["-o", str(executable)], check=True) + environment = dict(os.environ) + if gpu: + manifests = sorted(Path("/usr/share/vulkan/icd.d").glob("lvp_icd*.json")) + environment["VK_DRIVER_FILES"] = str(manifests[0]) + environment["VK_ICD_FILENAMES"] = str(manifests[0]) + result = subprocess.run([str(executable)], env=environment, capture_output=True, text=True, timeout=20) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + return result.stdout + + def test_protocol_and_retained_ownership(self): + self.assertIn("disconnect quarantine passed", self.compile_and_run("test_producer_lease.c")) + + def test_real_gpu_completion_and_frozen_overwrite(self): + if not ctypes.util.find_library("vulkan") or not list(Path("/usr/share/vulkan/icd.d").glob("lvp_icd*.json")): + self.skipTest("needs Vulkan loader and Lavapipe") + repository = Path(__file__).resolve().parents[2] + candidates = [os.environ.get("VK_INCLUDE", ""), "/usr/include", repository / "build/vr/include"] + candidates += [path for root in (os.environ.get("ANDROID_HOME"), os.environ.get("ANDROID_SDK_ROOT")) if root + for path in Path(root).glob("ndk/*/toolchains/llvm/prebuilt/*/sysroot/usr/include")] + headers = next((Path(path) for path in candidates if path and (Path(path) / "vulkan/vk_layer.h").is_file()), None) + if headers is None: + self.skipTest("needs Vulkan headers") + self.assertIn("1024 buffer values passed", self.compile_and_run("test_producer_gpu.c", headers=headers, gpu=True)) diff --git a/tools/tests/test_vr_semaphore_layer.py b/tools/tests/test_vr_semaphore_layer.py new file mode 100644 index 0000000000..2768160af2 --- /dev/null +++ b/tools/tests/test_vr_semaphore_layer.py @@ -0,0 +1,26 @@ +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + + +@unittest.skipUnless(shutil.which("gcc"), "needs gcc on a Linux host") +class VrSemaphoreLayerTest(unittest.TestCase): + def test_waits_are_never_fabricated(self): + repository = Path(__file__).resolve().parents[2] + candidates = [os.environ.get("VK_INCLUDE", ""), "/usr/include", repository / "build/vr/include"] + candidates += [path for root in (os.environ.get("ANDROID_HOME"), os.environ.get("ANDROID_SDK_ROOT")) if root + for path in Path(root).glob("ndk/*/toolchains/llvm/prebuilt/*/sysroot/usr/include")] + headers = next((Path(path) for path in candidates if path and (Path(path) / "vulkan/vk_layer.h").is_file()), None) + if headers is None: + self.skipTest("needs Vulkan headers") + with tempfile.TemporaryDirectory() as directory: + executable = Path(directory) / "semaphore-layer-test" + subprocess.run(["gcc", "-std=c11", "-O2", "-Wall", "-Wextra", "-Werror", "-Wno-unused-parameter", + "-pthread", "-I" + str(headers), str(repository / "tools/vr/tests/test_semaphore_layer.c"), + "-ldl", "-o", str(executable)], check=True) + result = subprocess.run([str(executable)], capture_output=True, text=True, timeout=20) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + self.assertIn("fd ownership passed", result.stdout) diff --git a/tools/tests/test_vr_wsi.py b/tools/tests/test_vr_wsi.py new file mode 100644 index 0000000000..9e93eb9baa --- /dev/null +++ b/tools/tests/test_vr_wsi.py @@ -0,0 +1,23 @@ +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + + +@unittest.skipUnless(shutil.which('g++'), 'needs a Linux C++ compiler') +class VrWsiTest(unittest.TestCase): + def test_compositor_handoff_and_frame_transport(self): + repository = Path(__file__).resolve().parents[2] + headers = next((p for p in (Path('/usr/include'), repository / 'build/vr/include') + if (p / 'vulkan/vulkan.h').is_file()), None) + if headers is None: + self.skipTest('needs Vulkan headers') + with tempfile.TemporaryDirectory() as directory: + for name in ('test_wsi_capture', 'test_xr_shared', 'test_xr_frames', 'test_xr_gpu'): + with self.subTest(name=name): + executable = Path(directory) / name + subprocess.run(['g++', '-std=c++17', '-O2', '-pthread', '-Wall', '-Wextra', '-Werror', + '-Wno-missing-field-initializers', '-I' + str(headers), + str(repository / 'tools/vr/tests' / (name + '.cpp')), '-o', str(executable)], check=True) + subprocess.run([str(executable)], check=True, timeout=20) diff --git a/tools/tests/test_vrclient_loader.py b/tools/tests/test_vrclient_loader.py new file mode 100644 index 0000000000..f468269925 --- /dev/null +++ b/tools/tests/test_vrclient_loader.py @@ -0,0 +1,57 @@ +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + + +@unittest.skipUnless(shutil.which("gcc"), "needs gcc on a Linux host") +class VrclientLoaderTest(unittest.TestCase): + def test_vrclient_keeps_syscall_interposition_without_changing_other_dsos(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + module = root / "module.c" + module.write_text(r""" +#include <errno.h> +#include <stddef.h> +#include <unistd.h> +#include <sys/syscall.h> +long syscall(long number, ...) { (void)number; errno = ENOSYS; return -1; } +int probe(void) { + void *head = NULL; size_t length = 0; + return syscall(SYS_get_robust_list, 0L, &head, &length) == 0 && head && length > 0; +} +""") + subprocess.run(["gcc", "-shared", "-fPIC", "-O2", str(module), "-o", + str(root / "vrclient.so")], check=True) + shutil.copy(root / "vrclient.so", root / "ordinary.so") + robust = Path(__file__).resolve().parents[1] / "linuxfs/preload/robust.c" + harness = root / "loader.c" + harness.write_text(r""" +#define _GNU_SOURCE +#include <assert.h> +#include <dlfcn.h> +int bl_fsync_syscall(long n, const long *a, long *r) { (void)n; (void)a; (void)r; return 0; } +#include """ + '"' + robust.as_posix() + '"' + r""" +int main(int argc, char **argv) { + assert(argc == 3); + void *ordinary = dlopen(argv[1], RTLD_NOW | RTLD_DEEPBIND); + assert(ordinary); + int (*probe)(void) = dlsym(ordinary, "probe"); + assert(probe && probe() == 0); + dlclose(ordinary); + void *vr = dlopen(argv[2], RTLD_NOW | RTLD_DEEPBIND); + assert(vr); + probe = dlsym(vr, "probe"); + assert(probe && probe() == 1); + dlclose(vr); +} +""") + subprocess.run(["gcc", "-O2", "-rdynamic", "-pthread", str(harness), + "-ldl", "-o", str(root / "loader")], check=True) + subprocess.run([str(root / "loader"), str(root / "ordinary.so"), + str(root / "vrclient.so")], check=True, timeout=10) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_vulkan_pin.py b/tools/tests/test_vulkan_pin.py new file mode 100644 index 0000000000..c848f77f7c --- /dev/null +++ b/tools/tests/test_vulkan_pin.py @@ -0,0 +1,141 @@ +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + +SOURCE = Path(__file__).resolve().parents[1] / "linuxfs/fex/vulkanpin.c" +THUNK = r""" +#include <string.h> +typedef struct { char extensionName[256]; unsigned int specVersion; } VkExtensionProperties; +typedef void (*Function)(void); +static const char *names[] = {"VK_KHR_surface", "VK_KHR_display", "VK_KHR_xlib_surface", "VK_EXT_direct_mode_display", + "VK_KHR_get_display_properties2", "VK_EXT_swapchain_colorspace"}; + +int vkEnumerateInstanceExtensionProperties(const char *layer, unsigned int *count, VkExtensionProperties *properties) +{ + unsigned int total = layer ? 0 : sizeof(names) / sizeof(names[0]); + if (!properties) { + *count = total; + return 0; + } + unsigned int n = *count < total ? *count : total; + for (unsigned int i = 0; i < n; i++) { + memset(&properties[i], 0, sizeof(properties[i])); + strcpy(properties[i].extensionName, names[i]); + properties[i].specVersion = i + 1; + } + *count = n; + return n < total ? 5 : 0; +} + +int vkCreateInstance(void) { return 42; } + +Function vkGetInstanceProcAddr(void *instance, const char *name) +{ + (void)instance; + if (!strcmp(name, "vkEnumerateInstanceExtensionProperties")) + return (Function)vkEnumerateInstanceExtensionProperties; + if (!strcmp(name, "vkCreateInstance")) + return (Function)vkCreateInstance; + if (!strcmp(name, "vkGetInstanceProcAddr")) + return (Function)vkGetInstanceProcAddr; + return 0; +} +""" +GAME = r""" +#include <dlfcn.h> +#include <stdio.h> +typedef struct { char extensionName[256]; unsigned int specVersion; } VkExtensionProperties; +typedef void (*Function)(void); +typedef int (*Enumerate)(const char *, unsigned int *, VkExtensionProperties *); +typedef Function (*ProcAddr)(void *, const char *); +#ifdef LINKED +int vkCreateInstance(void); +Function vkGetInstanceProcAddr(void *, const char *); +#endif + +static void list(Enumerate enumerate) +{ + VkExtensionProperties found[8]; + unsigned int count = 0; + int result = enumerate(0, &count, 0); + printf("count %u %d\n", count, result); + enumerate(0, &count, found); + for (unsigned int i = 0; i < count; i++) + printf("%s %u\n", found[i].extensionName, found[i].specVersion); + count = 1; + result = enumerate(0, &count, found); + printf("short %u %d %s\n", count, result, found[0].extensionName); +} + +int main(void) +{ +#ifdef LINKED + ProcAddr proc = vkGetInstanceProcAddr; + printf("linked %d\n", vkCreateInstance()); +#else + void *vulkan = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL); + if (!vulkan) + return 1; + ProcAddr proc = (ProcAddr)dlsym(vulkan, "vkGetInstanceProcAddr"); + printf("same handle %d\n", dlopen("libvulkan.so", RTLD_NOW | RTLD_NOLOAD) == vulkan); + printf("create %d\n", ((int (*)(void))dlsym(vulkan, "vkCreateInstance"))()); + list((Enumerate)dlsym(vulkan, "vkEnumerateInstanceExtensionProperties")); +#endif + printf("same proc %d create %d missing %d\n", proc(0, "vkGetInstanceProcAddr") == (Function)proc, + ((int (*)(void))proc(0, "vkCreateInstance"))(), proc(0, "vkNothing") == 0); + list((Enumerate)proc(0, "vkEnumerateInstanceExtensionProperties")); + return 0; +} +""" +LISTED = """count 3 0 +VK_KHR_surface 1 +VK_KHR_xlib_surface 3 +VK_EXT_swapchain_colorspace 6 +short 1 5 VK_KHR_surface +""" + + +@unittest.skipUnless(shutil.which("gcc") and os.uname().machine == "x86_64", "needs gcc on an x86-64 host") +class VulkanPinTest(unittest.TestCase): + def setUp(self): + self.tmp = Path(tempfile.mkdtemp()) + self.addCleanup(shutil.rmtree, self.tmp, ignore_errors=True) + + def gcc(self, *args): + made = subprocess.run(["gcc"] + [str(a) for a in args], capture_output=True, text=True) + self.assertEqual(made.returncode, 0, made.stderr) + + def test_display_extensions_are_hidden_in_front_of_the_thunk(self): + thunk = self.tmp / "usr/lib/libvulkan.so.1" + thunk.parent.mkdir(parents=True) + (self.tmp / "thunk.c").write_text(THUNK) + self.gcc("-shared", "-fPIC", "-Wl,-soname,libvulkan.so.1", "-o", thunk, self.tmp / "thunk.c") + stub = self.tmp / "stub/libvulkan.so.1" + stub.parent.mkdir() + self.gcc("-shared", "-nostdlib", "-Wl,-soname," + str(thunk), "-o", stub, "-x", "c", "/dev/null") + pinned = self.tmp / "pin" + pinned.mkdir() + self.gcc("-shared", "-fPIC", "-O2", "-Wall", "-Wextra", "-Werror", "-fvisibility=hidden", '-DVULKAN_THUNK="%s"' % thunk, + "-Wl,-soname,libvulkan.so.1", "-Wl,-z,nodelete", "-Wl,--no-as-needed", "-o", pinned / "libvulkan.so.1", + SOURCE, stub, "-ldl") + os.symlink("libvulkan.so.1", pinned / "libvulkan.so") + exported = subprocess.run(["nm", "-D", "--defined-only", pinned / "libvulkan.so.1"], capture_output=True, text=True) + self.assertEqual(sorted(line.split()[-1] for line in exported.stdout.splitlines()), + ["vkEnumerateInstanceExtensionProperties", "vkGetInstanceProcAddr"]) + (self.tmp / "game.c").write_text(GAME) + env = dict(os.environ, LD_LIBRARY_PATH=str(pinned)) + self.gcc("-o", self.tmp / "loader", self.tmp / "game.c", "-ldl") + run = subprocess.run([self.tmp / "loader"], capture_output=True, text=True, env=env) + self.assertEqual(run.returncode, 0, run.stderr) + self.assertEqual(run.stdout, "same handle 1\ncreate 42\n" + LISTED + "same proc 1 create 42 missing 1\n" + LISTED) + self.gcc("-DLINKED", "-o", self.tmp / "linked", self.tmp / "game.c", "-L", thunk.parent, "-l:libvulkan.so.1", "-ldl") + run = subprocess.run([self.tmp / "linked"], capture_output=True, text=True, env=env) + self.assertEqual(run.returncode, 0, run.stderr) + self.assertEqual(run.stdout, "linked 42\nsame proc 1 create 42 missing 1\n" + LISTED) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_webhelper_preload.py b/tools/tests/test_webhelper_preload.py new file mode 100644 index 0000000000..30a41fc7bd --- /dev/null +++ b/tools/tests/test_webhelper_preload.py @@ -0,0 +1,69 @@ +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + +PRELOAD = Path(__file__).resolve().parents[1] / "linuxfs/preload" + +PROGRAM = r""" +#include <stdio.h> +char *const *bl_webhelper_argv(const char *path, char *const argv[]); +int main(int argc, char **argv) { + char *const *out = bl_webhelper_argv(argv[1], argv + 1); + for (int i = 0; out[i]; i++) printf("%s\n", out[i]); + return 0; +} +""" + +WEBHELPER = "/root/.local/share/Steam/steamrtarm64/steamwebhelper" + + +@unittest.skipUnless(shutil.which("cc"), "needs cc") +class WebhelperPreloadTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.tmp = Path(tempfile.mkdtemp()) + source = cls.tmp / "program.c" + source.write_text(PROGRAM) + cls.program = cls.tmp / "program" + subprocess.run(["cc", "-O2", "-Wall", "-Werror", "-o", str(cls.program), str(source), + str(PRELOAD / "webhelper.c")], check=True) + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.tmp, ignore_errors=True) + + def argv(self, *args, spec=None): + env = {k: v for k, v in os.environ.items() if k != "BL_WEBHELPER_ARGS"} + if spec is not None: + env["BL_WEBHELPER_ARGS"] = spec + result = subprocess.run([str(self.program), *args], env=env, capture_output=True, text=True, check=True) + return result.stdout.splitlines() + + def test_the_browser_process_keeps_its_helpers_in_process(self): + out = self.argv(WEBHELPER, "-lang=en_US", "--enable-features=A", "--no-sandbox", "--disable-features=B,C") + self.assertEqual(out, [WEBHELPER, "-lang=en_US", "--no-sandbox", "--no-zygote", "--in-process-gpu", + "--enable-features=A", "--disable-features=B,C,AudioServiceOutOfProcess"]) + + def test_feature_lists_are_added_when_steam_passes_none(self): + out = self.argv(WEBHELPER, spec="+X -Y") + self.assertEqual(out, [WEBHELPER, "--enable-features=X", "--disable-features=Y"]) + + def test_child_processes_and_other_programs_are_left_alone(self): + child = [WEBHELPER, "--type=renderer", "--enable-features=A"] + self.assertEqual(self.argv(*child), child) + other = ["/usr/bin/steam", "--enable-features=A"] + self.assertEqual(self.argv(*other), other) + + def test_stock_turns_it_off(self): + args = [WEBHELPER, "--enable-features=A"] + self.assertEqual(self.argv(*args, spec="stock"), args) + + def test_an_empty_setting_means_the_default(self): + self.assertIn("--no-zygote", self.argv(WEBHELPER, spec="")) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_wincomponents.py b/tools/tests/test_wincomponents.py index fe0902af4c..ac50803d13 100644 --- a/tools/tests/test_wincomponents.py +++ b/tools/tests/test_wincomponents.py @@ -98,7 +98,7 @@ class WinComponentsTest(unittest.TestCase): self.pick("vc") self.apply() self.assertEqual(installer.read_bytes(), b"ours") - self.apply() # a second launch keeps the first backup, not ours + self.apply() self.pick() names, notes = self.apply() self.assertEqual(installer.read_bytes(), b"from a real installer") diff --git a/tools/tests/test_windows_vr_build.py b/tools/tests/test_windows_vr_build.py new file mode 100644 index 0000000000..fa51a169ac --- /dev/null +++ b/tools/tests/test_windows_vr_build.py @@ -0,0 +1,127 @@ +import importlib.util +import json +from pathlib import Path +import struct +import tempfile +import unittest +from unittest import mock + +spec = importlib.util.spec_from_file_location( + 'windows_vr_build', Path(__file__).resolve().parents[1] / 'vr/build_windows.py') +vr = importlib.util.module_from_spec(spec) +spec.loader.exec_module(vr) + + +class WindowsVrBuildTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.root = Path(self.temp.name) + self.out = self.root / 'build/vr' + self.include = self.root / 'ndk/include' + for name in vr.SOURCE_FILES: + self.write(self.root / name, b'build source\n') + for tree in vr.SOURCE_TREES: + self.write(self.root / tree / 'input.h', b'header\n') + for name, source in vr.CONFIGS.items(): + self.write(self.root / source, b'{"name": "current"}\n') + self.write(self.out / name, b'{"name": "current"}\n') + for name in vr.LIBRARIES | vr.EXECUTABLES: + data = bytearray(64) + data[:6] = b'\x7fELF\x02\x01' + struct.pack_into('<HH', data, 16, 3, 183) + self.write(self.out / name, data) + for name in vr.HAND_MODELS: + self.write(self.out / name, b'generated hand model\n') + for name in ('vulkan/vulkan_core.h', 'vulkan/vk_layer.h'): + self.write(self.include / name, b'vulkan header\n') + self.commit = mock.patch.object(vr, 'commit', return_value='current-revision') + self.commit.start() + self.addCleanup(self.commit.stop) + self.record() + + @staticmethod + def write(path, data): + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(data) + + def record(self): + self.manifest = {'version': 1, 'source_commit': 'current-revision', + 'sources': vr.hashes(vr.sources(self.root)), + 'headers': vr.hashes(vr.headers(self.include)), + 'outputs': {n: vr.sha((self.out / n).read_bytes()) for n in vr.OUTPUTS}} + self.save_manifest() + + def save_manifest(self): + (self.out / vr.MANIFEST).write_text(json.dumps(self.manifest)) + + def validate(self): + return vr.validate(self.out, self.include, self.root) + + def test_complete_current_build_accepts_windows_line_endings(self): + self.write(self.root / 'tools/vr/src/input.h', b'header\r\n') + files, manifest = self.validate() + self.assertEqual(set(files), vr.OUTPUTS) + self.assertEqual(manifest['source_commit'], 'current-revision') + + def test_missing_manifest_cannot_import_old_unattested_binaries(self): + (self.out / vr.MANIFEST).unlink() + with self.assertRaisesRegex(ValueError, 'Missing or invalid VR build manifest'): + self.validate() + + def test_modified_or_new_source_rejects_cached_build(self): + for name in ('tools/vr/src/input.h', 'tools/vr/src/new.h'): + with self.subTest(name=name): + path = self.root / name + previous = path.read_bytes() if path.exists() else None + self.write(path, b'changed\n') + with self.assertRaisesRegex(ValueError, 'VR build is stale'): + self.validate() + if previous is None: + path.unlink() + else: + path.write_bytes(previous) + + def test_changed_revision_or_vulkan_headers_reject_cached_build(self): + with mock.patch.object(vr, 'commit', return_value='new-revision'): + with self.assertRaisesRegex(ValueError, 'VR build is stale'): + self.validate() + self.write(self.include / 'vulkan/vulkan_core.h', b'new header\n') + with self.assertRaisesRegex(ValueError, 'VR build is stale'): + self.validate() + + def test_changed_binary_rejects_cached_build(self): + path = self.out / sorted(vr.LIBRARIES)[0] + path.write_bytes(path.read_bytes() + b'changed') + with self.assertRaisesRegex(ValueError, 'output checksum mismatch'): + self.validate() + + def test_wrong_architecture_rejected_even_with_matching_checksum(self): + path = self.out / sorted(vr.LIBRARIES)[0] + data = bytearray(path.read_bytes()) + struct.pack_into('<H', data, 18, 62) + path.write_bytes(data) + self.record() + with self.assertRaisesRegex(ValueError, 'not an ARM64 ELF shared library'): + self.validate() + + def test_missing_or_unexpected_outputs_reject_build(self): + path = self.out / sorted(vr.LIBRARIES)[0] + data = path.read_bytes() + path.unlink() + with self.assertRaisesRegex(ValueError, 'missing or unexpected'): + self.validate() + path.write_bytes(data) + self.write(self.out / 'old-library.so', data) + with self.assertRaisesRegex(ValueError, 'missing or unexpected'): + self.validate() + + def test_old_configuration_rejected_even_with_matching_checksum(self): + self.write(self.out / sorted(vr.CONFIGS)[0], b'{"name": "old"}') + self.record() + with self.assertRaisesRegex(ValueError, 'configuration differs'): + self.validate() + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/tests/test_winebus_rumble_preload.py b/tools/tests/test_winebus_rumble_preload.py new file mode 100644 index 0000000000..82e3b01120 --- /dev/null +++ b/tools/tests/test_winebus_rumble_preload.py @@ -0,0 +1,101 @@ +from pathlib import Path +import os +import shutil +import subprocess +import sys +import tempfile +import unittest + +PRELOAD = Path(__file__).resolve().parents[1] / "linuxfs/preload" + +# Stands in for libfakeinput.so, which ld.so.preload lists after libblsession.so. +SHIM = r""" +#include <linux/input.h> +#include <stdarg.h> +#include <stdio.h> + +int ioctl(int fd, unsigned long request, ...) { + va_list ap; + va_start(ap, request); + struct ff_effect *effect = va_arg(ap, struct ff_effect *); + va_end(ap); + if (request == EVIOCSFF) printf("shim type %u length %u\n", effect->type, effect->replay.length); + return 0; +} +""" + +UPLOAD = r""" +#include <linux/input.h> +#include <stdio.h> +#include <string.h> +#include <sys/ioctl.h> + +void upload(unsigned short type, unsigned short length) { + struct ff_effect effect; + memset(&effect, 0, sizeof(effect)); + effect.id = -1; + effect.type = type; + effect.replay.length = length; + ioctl(3, EVIOCSFF, &effect); + printf("caller length %u\n", effect.replay.length); +} +""" + +PROGRAM = r""" +#include <dlfcn.h> +#include <linux/input.h> +#include <stdio.h> + +void upload(unsigned short type, unsigned short length); + +int main(int argc, char **argv) { + void *winebus = dlopen(argv[1], RTLD_NOW); + void (*from_winebus)(unsigned short, unsigned short) = (void (*)(unsigned short, unsigned short))dlsym(winebus, "upload"); + if (argv[2][0] == 'w') from_winebus(argv[3][0] == 'r' ? FF_RUMBLE : FF_PERIODIC, 1000); + else upload(FF_RUMBLE, 1000); + fflush(stdout); + return 0; +} +""" + + +@unittest.skipUnless(sys.platform == "linux" and shutil.which("cc"), "needs Linux and cc") +class WinebusRumblePreloadTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.dir = Path(tempfile.mkdtemp()) + build = cls.dir / "build" + build.mkdir() + for name, text in (("shim.c", SHIM), ("upload.c", UPLOAD), ("program.c", PROGRAM)): + (build / name).write_text(text) + cls.lib = cls.dir / "libblsession.so" + subprocess.run(["cc", "-shared", "-fPIC", "-O2", "-Wall", "-pthread", "-o", str(cls.lib), + *map(str, sorted(PRELOAD.glob("*.c"))), "-ldl"], check=True) + cls.shim = cls.dir / "libshim.so" + subprocess.run(["cc", "-shared", "-fPIC", "-O2", "-o", str(cls.shim), str(build / "shim.c")], check=True) + cls.winebus = cls.dir / "winebus.so" + subprocess.run(["cc", "-shared", "-fPIC", "-O2", "-o", str(cls.winebus), str(build / "upload.c")], check=True) + cls.program = cls.dir / "program" + subprocess.run(["cc", "-O2", "-o", str(cls.program), str(build / "program.c"), str(build / "upload.c"), "-ldl"], + check=True) + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.dir, True) + + def upload(self, caller, kind="rumble"): + env = dict(os.environ, LD_PRELOAD="%s:%s" % (self.lib, self.shim)) + result = subprocess.run([str(self.program), str(self.winebus), caller, kind], env=env, + capture_output=True, text=True, timeout=10, check=True) + return result.stdout.splitlines() + + def test_winebus_rumble_reaches_the_shim_held_and_comes_back_unchanged(self): + self.assertEqual(self.upload("winebus"), ["shim type %d length 0" % 0x50, "caller length 1000"]) + + def test_other_callers_and_effects_keep_their_length(self): + self.assertEqual(self.upload("program"), ["shim type %d length 1000" % 0x50, "caller length 1000"]) + self.assertEqual(self.upload("winebus", "periodic"), ["shim type %d length 1000" % 0x51, "caller length 1000"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/tests/test_zram_preload.py b/tools/tests/test_zram_preload.py new file mode 100644 index 0000000000..a9a437e3ec --- /dev/null +++ b/tools/tests/test_zram_preload.py @@ -0,0 +1,174 @@ +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + +PRELOAD = Path(__file__).resolve().parents[1] / "linuxfs/preload" + +PROGRAM = r""" +#define _GNU_SOURCE +#include <fcntl.h> +#include <pthread.h> +#include <signal.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/mman.h> +#include <unistd.h> + +static const char *ctl; +static size_t size, page; +static volatile int stop; +static unsigned char *shared; + +static long status(const char *key) { + FILE *f = fopen("/proc/self/status", "r"); + char line[256]; + long v = -1; + while (f && fgets(line, sizeof(line), f)) + if (!strncmp(line, key, strlen(key))) v = atol(line + strlen(key)); + if (f) fclose(f); + return v; +} + +static void request(char mode) { + int fd = open(ctl, O_WRONLY | O_TRUNC); + if (fd < 0 || write(fd, &mode, 1) != 1) exit(3); + close(fd); + kill(getpid(), SIGURG); +} + +static uint64_t sum(const unsigned char *p, size_t n) { + uint64_t s = 0; + for (size_t i = 0; i < n; i += 64) s = s * 31 + p[i]; + return s; +} + +static void *writer(void *arg) { + unsigned char *mine = shared + (size_t)(uintptr_t)arg * (size / 4); + for (unsigned char round = 1; !stop; round++) { + for (size_t i = 0; i < size / 4; i += page) { + if (round > 1 && mine[i] != (unsigned char)(round - 1)) { + printf("corrupt\n"); + exit(4); + } + mine[i] = round; + } + } + return NULL; +} + +int main(int argc, char **argv) { + ctl = argv[1]; + size = strtoul(argv[2], NULL, 0) << 20; + int cycles = atoi(argv[3]); + page = (size_t)sysconf(_SC_PAGESIZE); + unsigned char *data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + for (size_t i = 0; i < size; i++) data[i] = (unsigned char)(i * 7 + i / 4096); + uint64_t before = sum(data, size); + shared = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + memset(shared, 0, size); + pthread_t t[2]; + for (uintptr_t i = 0; i < 2; i++) pthread_create(&t[i], NULL, writer, (void *)i); + struct sigaction sa; + sigaction(SIGURG, NULL, &sa); + printf("handler %d\n", (sa.sa_flags & SA_SIGINFO) ? 1 : 0); + if (argc > 4) { + unsigned char *ro = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + memset(ro, 0x5a, size); + mprotect(ro, size, PROT_READ); + madvise(ro, size, 21); + printf("elsewhere %ld\n", status("VmSwap:")); + request('0'); + printf("back %ld\n", status("VmSwap:")); + } + for (int c = 0; c < cycles; c++) { + request('1'); + printf("out %ld\n", status("VmSwap:")); + request('0'); + printf("back %ld\n", status("VmSwap:")); + } + stop = 1; + for (int i = 0; i < 2; i++) pthread_join(t[i], NULL); + printf("intact %d\n", sum(data, size) == before); + return 0; +} +""" + + +def swap_total_kb(): + for line in Path("/proc/meminfo").read_text().splitlines(): + if line.startswith("SwapTotal:"): + return int(line.split()[1]) + return 0 + + +@unittest.skipUnless(shutil.which("cc"), "needs a C compiler") +class ZramPreloadTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.dir = Path(tempfile.mkdtemp()) + cls.ctl = cls.dir / "ctl" + build = cls.dir / "build" + build.mkdir() + (build / "program.c").write_text(PROGRAM) + cls.lib = build / "libblsession.so" + subprocess.run(["cc", "-shared", "-fPIC", "-O2", "-Wall", "-pthread", "-DZR_CTL=\"%s\"" % cls.ctl, + "-o", str(cls.lib), *map(str, sorted(PRELOAD.glob("*.c"))), "-ldl"], check=True) + cls.steam = cls.dir / "steam" + subprocess.run(["cc", "-O2", "-pthread", "-o", str(cls.steam), str(build / "program.c")], check=True) + cls.game = cls.dir / "game" + shutil.copy(cls.steam, cls.game) + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.dir, True) + + def setUp(self): + self.ctl.write_text("0") + + def run_program(self, program=None, mb=48, cycles=1, *extra): + environment = dict(os.environ, LD_PRELOAD=str(self.lib)) + result = subprocess.run([str(program or self.steam), str(self.ctl), str(mb), str(cycles), *extra], env=environment, + capture_output=True, text=True, check=True, timeout=120) + out = {} + for line in result.stdout.splitlines(): + key, value = line.split() + out.setdefault(key, []).append(int(value)) + return out + + def test_only_the_client_takes_the_signal(self): + self.assertEqual([1], self.run_program()["handler"]) + self.assertEqual([0], self.run_program(self.game)["handler"]) + + def test_nothing_is_installed_without_the_control_file(self): + self.ctl.unlink() + try: + self.assertEqual([0], self.run_program(cycles=0)["handler"]) + finally: + self.ctl.write_text("0") + + @unittest.skipUnless(swap_total_kb() > 256 * 1024, "needs swap") + def test_pages_out_and_reads_back(self): + out = self.run_program(mb=48) + self.assertGreater(out["out"][0], 32 * 1024) + self.assertLess(out["back"][0], out["out"][0] // 4) + self.assertEqual([1], out["intact"]) + + @unittest.skipUnless(swap_total_kb() > 256 * 1024, "needs swap") + def test_reads_back_what_the_kernel_swapped_elsewhere(self): + out = self.run_program(None, 32, 0, "read-only") + self.assertGreater(out["elsewhere"][0], 16 * 1024) + self.assertLess(out["back"][0], out["elsewhere"][0] // 4) + + def test_memory_stays_intact_under_writers(self): + out = self.run_program(mb=32, cycles=6) + self.assertEqual([1], out["intact"]) + self.assertEqual(6, len(out["out"])) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/uvc/CMakeLists.txt b/tools/uvc/CMakeLists.txt new file mode 100644 index 0000000000..fe5247643b --- /dev/null +++ b/tools/uvc/CMakeLists.txt @@ -0,0 +1,60 @@ +cmake_minimum_required(VERSION 3.22) +project(droiddeck_rgb_uvc VERSION 0.0.8 LANGUAGES C CXX) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +set(RGB_UVC_SOURCE_ROOT "" CACHE PATH "Extracted checksum-pinned libusb and libuvc sources") +if(NOT RGB_UVC_SOURCE_ROOT) + message(FATAL_ERROR "Set RGB_UVC_SOURCE_ROOT or use tools/build_rgb_uvc.py") +endif() + +set(USB_SOURCE "${RGB_UVC_SOURCE_ROOT}/libusb-1.0.30") +set(UVC_SOURCE "${RGB_UVC_SOURCE_ROOT}/libuvc-0.0.8") +add_library(rgb_usb SHARED + ${USB_SOURCE}/libusb/core.c + ${USB_SOURCE}/libusb/descriptor.c + ${USB_SOURCE}/libusb/hotplug.c + ${USB_SOURCE}/libusb/io.c + ${USB_SOURCE}/libusb/sync.c + ${USB_SOURCE}/libusb/strerror.c + ${USB_SOURCE}/libusb/os/linux_usbfs.c + ${USB_SOURCE}/libusb/os/events_posix.c + ${USB_SOURCE}/libusb/os/threads_posix.c + ${USB_SOURCE}/libusb/os/linux_netlink.c +) +set_target_properties(rgb_usb PROPERTIES OUTPUT_NAME usb) +target_include_directories(rgb_usb PUBLIC ${USB_SOURCE}/libusb PRIVATE ${USB_SOURCE}/android ${USB_SOURCE}/libusb/os) +target_compile_options(rgb_usb PRIVATE -fvisibility=hidden -pthread) +target_link_options(rgb_usb PRIVATE -Wl,--no-undefined -Wl,-z,max-page-size=16384) +target_link_libraries(rgb_usb PUBLIC log) + +set(libuvc_VERSION_MAJOR 0) +set(libuvc_VERSION_MINOR 0) +set(libuvc_VERSION_PATCH 8) +set(libuvc_VERSION 0.0.8) +set(LIBUVC_HAS_JPEG OFF) +configure_file(${UVC_SOURCE}/include/libuvc/libuvc_config.h.in generated/libuvc/libuvc_config.h @ONLY) +add_library(rgb_uvc STATIC + ${UVC_SOURCE}/src/ctrl.c + ${UVC_SOURCE}/src/ctrl-gen.c + ${UVC_SOURCE}/src/device.c + ${UVC_SOURCE}/src/diag.c + ${UVC_SOURCE}/src/frame.c + ${UVC_SOURCE}/src/init.c + ${UVC_SOURCE}/src/stream.c + ${UVC_SOURCE}/src/misc.c +) +set_target_properties(rgb_uvc PROPERTIES OUTPUT_NAME uvc) +target_include_directories(rgb_uvc PUBLIC ${UVC_SOURCE}/include ${CMAKE_CURRENT_BINARY_DIR}/generated) +target_compile_definitions(rgb_uvc PRIVATE UVC_DEBUGGING LIBUVC_NUM_TRANSFER_BUFS=8) +target_compile_options(rgb_uvc PRIVATE -fvisibility=hidden -pthread) +target_link_libraries(rgb_uvc PUBLIC rgb_usb log) + +add_executable(uvc_submit_failure_test submit_failure_test.cpp) +target_compile_features(uvc_submit_failure_test PRIVATE cxx_std_17) +target_compile_definitions(uvc_submit_failure_test PRIVATE LIBUVC_NUM_TRANSFER_BUFS=8) +target_link_libraries(uvc_submit_failure_test PRIVATE rgb_uvc) +target_link_options(uvc_submit_failure_test PRIVATE + -Wl,--no-undefined -Wl,-z,max-page-size=16384 + -Wl,--wrap=libusb_submit_transfer -Wl,--wrap=libusb_cancel_transfer + -Wl,--wrap=libusb_set_interface_alt_setting + -Wl,--wrap=libusb_get_ss_endpoint_companion_descriptor +) diff --git a/tools/uvc/libuvc-submit-failure.patch b/tools/uvc/libuvc-submit-failure.patch new file mode 100644 index 0000000000..ad067d169d --- /dev/null +++ b/tools/uvc/libuvc-submit-failure.patch @@ -0,0 +1,19 @@ +--- a/src/stream.c ++++ b/src/stream.c +@@ -1281,13 +1281,15 @@ + } + + if ( ret != UVC_SUCCESS && transfer_id >= 0 ) { ++ pthread_mutex_lock(&strmh->cb_mutex); + for ( ; transfer_id < LIBUVC_NUM_TRANSFER_BUFS; transfer_id++) { + free ( strmh->transfers[transfer_id]->buffer ); + libusb_free_transfer ( strmh->transfers[transfer_id]); + strmh->transfers[transfer_id] = 0; + } +- ret = UVC_SUCCESS; ++ pthread_mutex_unlock(&strmh->cb_mutex); ++ uvc_stream_stop(strmh); + } + + UVC_EXIT(ret); + return ret; diff --git a/tools/uvc/submit_failure_test.cpp b/tools/uvc/submit_failure_test.cpp new file mode 100644 index 0000000000..67811908b7 --- /dev/null +++ b/tools/uvc/submit_failure_test.cpp @@ -0,0 +1,112 @@ +#include <libusb.h> +#include <libuvc/libuvc.h> +#include <libuvc/libuvc_internal.h> +#include <cstdio> +#include <thread> +#include <vector> + +static int failAt; +static int submissions; +static int cancellations; +static bool invalidCancellation; +static std::vector<std::thread> completions; + +extern "C" int __wrap_libusb_submit_transfer(libusb_transfer* transfer) { + if (!transfer) return LIBUSB_ERROR_INVALID_PARAM; + return submissions++ == failAt ? LIBUSB_ERROR_NO_MEM : LIBUSB_SUCCESS; +} + +extern "C" int __wrap_libusb_cancel_transfer(libusb_transfer* transfer) { + if (!transfer) { + invalidCancellation = true; + return LIBUSB_ERROR_INVALID_PARAM; + } + ++cancellations; + completions.emplace_back([transfer] { + transfer->status = LIBUSB_TRANSFER_CANCELLED; + transfer->callback(transfer); + }); + return LIBUSB_SUCCESS; +} + +extern "C" int __wrap_libusb_set_interface_alt_setting(libusb_device_handle*, int, int) { + return LIBUSB_SUCCESS; +} + +extern "C" int __wrap_libusb_get_ss_endpoint_companion_descriptor( + libusb_context*, const libusb_endpoint_descriptor*, libusb_ss_endpoint_companion_descriptor**) { + return LIBUSB_ERROR_NOT_FOUND; +} + +static void onFrame(uvc_frame_t*, void*) {} + +static bool checkFailure(int failureIndex) { + failAt = failureIndex; + submissions = cancellations = 0; + invalidCancellation = false; + uvc_frame_desc_t frame{}; + frame.bFrameIndex = 1; + frame.wWidth = 640; + frame.wHeight = 480; + uvc_format_desc_t format{}; + format.bFormatIndex = 1; + format.frame_descs = &frame; + memcpy(format.guidFormat, "MJPG", 4); + frame.parent = &format; + uvc_streaming_interface_t streamInterface{}; + streamInterface.bInterfaceNumber = 1; + streamInterface.bEndpointAddress = 0x81; + streamInterface.format_descs = &format; + format.parent = &streamInterface; + libusb_endpoint_descriptor endpoint{}; + endpoint.bEndpointAddress = 0x81; + endpoint.bmAttributes = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS; + endpoint.wMaxPacketSize = 512; + libusb_interface_descriptor alternatives[2]{}; + alternatives[0].bInterfaceNumber = alternatives[1].bInterfaceNumber = 1; + alternatives[1].bAlternateSetting = 1; + alternatives[1].bNumEndpoints = 1; + alternatives[1].endpoint = &endpoint; + libusb_interface interfaces[2]{}; + interfaces[1].num_altsetting = 2; + interfaces[1].altsetting = alternatives; + libusb_config_descriptor config{}; + config.bNumInterfaces = 2; + config.interface = interfaces; + uvc_device_info_t info{}; + info.config = &config; + uvc_device_handle_t camera{}; + camera.info = &info; + uvc_stream_handle_t stream{}; + stream.devh = &camera; + stream.stream_if = &streamInterface; + stream.cur_ctrl.bInterfaceNumber = 1; + stream.cur_ctrl.bFormatIndex = 1; + stream.cur_ctrl.bFrameIndex = 1; + stream.cur_ctrl.dwMaxPayloadTransferSize = 512; + stream.cur_ctrl.dwMaxVideoFrameSize = 8192; + pthread_mutex_init(&stream.cb_mutex, nullptr); + pthread_cond_init(&stream.cb_cond, nullptr); + + const int result = uvc_stream_start(&stream, onFrame, nullptr, 0); + if (result == UVC_SUCCESS) uvc_stream_stop(&stream); + for (auto& completion : completions) completion.join(); + completions.clear(); + bool valid = result == (failureIndex < 8 ? LIBUSB_ERROR_NO_MEM : UVC_SUCCESS) + && !stream.running && cancellations == failureIndex && !invalidCancellation; + for (auto* transfer : stream.transfers) valid = valid && transfer == nullptr; + pthread_cond_destroy(&stream.cb_cond); + pthread_mutex_destroy(&stream.cb_mutex); + if (!valid) std::fprintf(stderr, "failureIndex=%d result=%d cancellations=%d\n", failureIndex, result, cancellations); + return valid; +} + +int main() { + for (int iteration = 0; iteration < 20; ++iteration) { + for (int failureIndex : {0, 3, 8}) { + if (!checkFailure(failureIndex)) return 1; + } + } + std::puts("PASS: 60 starts covering zero/partial/full submissions; no USB hardware calls"); + return 0; +} diff --git a/tools/vr/build.sh b/tools/vr/build.sh new file mode 100755 index 0000000000..fd8aebd1c5 --- /dev/null +++ b/tools/vr/build.sh @@ -0,0 +1,101 @@ +#!/usr/bin/env bash +set -euo pipefail +here=$(cd "$(dirname "$0")" && pwd) +repo=$(cd "$here/../.." && pwd) + +native=0 +if [ "${1:-}" = --native ]; then native=1; shift; fi +out=${1:-$here/out} +case "$out" in /*) ;; *) out="$PWD/$out" ;; esac + +vkinc=${VK_INCLUDE:-} +if [ -z "$vkinc" ]; then + for ndk in "${ANDROID_NDK_HOME:-}" "${ANDROID_NDK_LATEST_HOME:-}" \ + $(ls -d "${ANDROID_HOME:-$HOME/Library/Android/sdk}"/ndk/* 2>/dev/null | sort -r); do + [ -n "$ndk" ] || continue + cand=$(ls -d "$ndk"/toolchains/llvm/prebuilt/*/sysroot/usr/include 2>/dev/null | head -1) + if [ -n "$cand" ] && [ -f "$cand/vulkan/vk_layer.h" ]; then vkinc=$cand; break; fi + done +fi +[ -n "$vkinc" ] && [ -f "$vkinc/vulkan/vulkan_core.h" ] || { echo "tools/vr/build.sh: no Vulkan headers (set VK_INCLUDE)" >&2; exit 1; } + +work="$repo/build/vr" +rm -rf "$work" && mkdir -p "$work/include" +cp -R "$vkinc/vulkan" "$work/include/" +if [ -d "$vkinc/vk_video" ]; then cp -R "$vkinc/vk_video" "$work/include/"; fi +mkdir -p "$work/out/droiddeck/bin/linuxarm64" "$work/out/layer" + +compile() { + local cmd=(sh -c ' + set -e + cc -std=c11 -O2 -Wall -Wextra -Werror -Ibuild/vr/include -Itools/vr/src \ + -o build/vr/test_fence_tracker tools/vr/tests/test_fence_tracker.c + build/vr/test_fence_tracker + cc -std=c11 -O2 -Wall -Wextra -Wno-unused-parameter -pthread -Ibuild/vr/include \ + -o build/vr/test_timeline_bridge tools/vr/tests/test_timeline_bridge.c -ldl + build/vr/test_timeline_bridge + cc -std=c11 -O2 -Wall -Wextra -Wno-unused-parameter -pthread -Ibuild/vr/include \ + -o build/vr/test_compositor_submit tools/vr/tests/test_compositor_submit.c -ldl + build/vr/test_compositor_submit + c++ -std=c++17 -O2 -Wall -Wextra -Werror -Itools/vr/src \ + -o build/vr/test_render_target tools/vr/tests/test_render_target.cpp + build/vr/test_render_target + c++ -std=c++17 -O2 -Wall -Wextra -Werror -Ibuild/vr/include -Itools/vr/src \ + -o build/vr/test_presenter_image tools/vr/tests/test_presenter_image.cpp + build/vr/test_presenter_image + c++ -std=c++17 -O2 -Wall -Wextra -Werror -Itools/vr/src \ + -o build/vr/test_spatial_tracking tools/vr/tests/test_spatial_tracking.cpp + build/vr/test_spatial_tracking + c++ -std=c++17 -O2 -Wall -Wextra -Werror -Itools/vr/src \ + -o build/vr/test_adaptive_pose tools/vr/tests/test_adaptive_pose.cpp + build/vr/test_adaptive_pose + c++ -std=c++17 -O2 -Wall -Wextra -Wno-unused-parameter -pthread -Itools/vr/src \ + -o build/vr/test_optical_controller tools/vr/tests/test_optical_controller.cpp + build/vr/test_optical_controller + cc -shared -fPIC -O2 -Wall -Wextra -Werror \ + -o build/vr/libdroiddeck_vr_scheduling.so tools/vr/src/scheduling.c -ldl + cc -O2 -Wall -Wextra -Werror -o build/vr/test_scheduling tools/vr/tests/test_scheduling.c + LD_PRELOAD="$PWD/build/vr/libdroiddeck_vr_scheduling.so" build/vr/test_scheduling + c++ -std=c++17 -O2 -Wall -Wextra -Werror -Wno-unused-parameter -Itools/vr/src \ + -o build/vr/test_joycon tools/vr/tests/test_joycon.cpp + build/vr/test_joycon + c++ -std=c++17 -O2 -Wall -Wextra -Werror -Wno-unused-parameter -Itools/vr/src \ + -o build/vr/make_hand_models tools/vr/make_hand_models.cpp + mkdir -p build/vr/out/droiddeck/resources + build/vr/make_hand_models build/vr/out/droiddeck/resources/rendermodels + mkdir -p build/vr/stub + aarch64-linux-gnu-g++ -std=c++17 -O2 -Wall -Wextra -Werror -static-libstdc++ -static-libgcc -pthread \ + -o build/vr/out/droiddeck/bin/linuxarm64/xr-display-mode tools/vr/src/xr_display_mode.cpp + aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wl,-soname,libwayland-client.so.0 -Itools/vr/third_party/wayland \ + -o build/vr/stub/libwayland-client.so tools/vr/src/wayland_client_stub.c + aarch64-linux-gnu-gcc -c -fPIC -O2 -Itools/vr/third_party/wayland -o build/vr/xdg-shell-protocol.o \ + app/src/main/cpp/waylandcomp/generated/xdg-shell-protocol.c + aarch64-linux-gnu-g++ -std=c++17 -shared -fPIC -O2 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers \ + -fvisibility=hidden -static-libstdc++ -static-libgcc -pthread -Wl,-z,defs -Ibuild/vr/include \ + -Itools/vr/third_party/wayland -Iapp/src/main/cpp/waylandcomp/generated \ + -o build/vr/out/droiddeck/bin/linuxarm64/driver_droiddeck.so tools/vr/src/driver_droiddeck.cpp tools/vr/src/presenter.cpp \ + build/vr/xdg-shell-protocol.o -Lbuild/vr/stub -lwayland-client -ldl + aarch64-linux-gnu-gcc -std=c11 -c -fPIC -O2 -Wall -Wextra -Wno-unused-parameter -fvisibility=hidden -pthread \ + -DDROIDDECK_WSI_CAPTURE -Ibuild/vr/include -o build/vr/vk_layer.o tools/vr/src/vk_layer_droiddeck_vr.c + aarch64-linux-gnu-g++ -std=c++17 -shared -fPIC -O2 -Wall -Wextra -Wno-missing-field-initializers -fvisibility=hidden -pthread \ + -static-libstdc++ -static-libgcc -Wl,-z,defs -Wl,-z,nodelete -Ibuild/vr/include \ + -o build/vr/out/layer/libVkLayer_droiddeck_vr.so build/vr/vk_layer.o tools/vr/src/wsi_capture.cpp -ldl + aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -Wextra -Werror -Wl,-z,defs \ + -o build/vr/out/layer/libdroiddeck_vr_scheduling.so tools/vr/src/scheduling.c -ldl + aarch64-linux-gnu-strip --strip-unneeded build/vr/out/droiddeck/bin/linuxarm64/driver_droiddeck.so \ + build/vr/out/layer/libVkLayer_droiddeck_vr.so build/vr/out/layer/libdroiddeck_vr_scheduling.so') + if [ "$native" = 1 ]; then + (cd "$repo" && "${cmd[@]}") + else + docker run --rm --platform linux/amd64 --user "$(id -u):$(id -g)" -v "$repo:/src" -w /src \ + "${DROIDDECK_BUILD_IMAGE:-droiddeck-local-cross:24.04-v3}" "${cmd[@]}" + fi +} +compile + +cp -R "$here/driver_droiddeck/." "$work/out/droiddeck/" +cp "$here/layer/VK_LAYER_DROIDDECK_vr.json" "$here/layer/VK_LAYER_DROIDDECK_vr_implicit.json" "$work/out/layer/" +rm -rf "$out/droiddeck" "$out/layer" +mkdir -p "$out" +cp -R "$work/out/droiddeck" "$work/out/layer" "$out/" +echo "built $out/droiddeck and $out/layer" diff --git a/tools/vr/build_windows.py b/tools/vr/build_windows.py new file mode 100644 index 0000000000..06a1dde74f --- /dev/null +++ b/tools/vr/build_windows.py @@ -0,0 +1,187 @@ +"""Build DroidDeck's ARM64 VR components in Docker and attest their inputs.""" +import argparse +import hashlib +import json +import os +from pathlib import Path +import shutil +import struct +import subprocess +import tempfile + +ROOT = Path(__file__).resolve().parents[2] +IMAGE = 'droiddeck-local-cross:24.04-v3' +MANIFEST = 'vr-build.json' +SOURCE_TREES = ('tools/vr/src', 'tools/vr/tests', 'tools/vr/third_party', + 'tools/vr/driver_droiddeck', 'tools/vr/layer') +SOURCE_FILES = ('tools/vr/build.sh', 'tools/vr/build_windows.py', 'tools/vr/make_hand_models.cpp', 'tools/local-cross.Dockerfile', + 'app/src/main/cpp/waylandcomp/src/headpose_shm.h', + 'app/src/main/cpp/waylandcomp/src/spatialpose_shm.h', + 'app/src/main/cpp/waylandcomp/generated/xdg-shell-protocol.c', + 'app/src/main/cpp/waylandcomp/generated/xdg-shell-client-protocol.h') +LIBRARIES = {'droiddeck/bin/linuxarm64/driver_droiddeck.so', 'layer/libVkLayer_droiddeck_vr.so', + 'layer/libdroiddeck_vr_scheduling.so'} +CONFIGS = { + 'droiddeck/driver.vrdrivermanifest': 'tools/vr/driver_droiddeck/driver.vrdrivermanifest', + 'droiddeck/resources/settings/default.vrsettings': 'tools/vr/driver_droiddeck/resources/settings/default.vrsettings', + 'layer/VK_LAYER_DROIDDECK_vr.json': 'tools/vr/layer/VK_LAYER_DROIDDECK_vr.json', + 'layer/VK_LAYER_DROIDDECK_vr_implicit.json': 'tools/vr/layer/VK_LAYER_DROIDDECK_vr_implicit.json', +} +EXECUTABLES = {'droiddeck/bin/linuxarm64/xr-display-mode'} +HAND_MODELS = { + f'droiddeck/resources/rendermodels/droiddeck_hand_{side}/{name}' + for side in ('left', 'right') + for name in (f'droiddeck_hand_{side}.json', 'hand.mtl', 'hand.png', 'hand_open.obj', + 'hand_fist.obj', 'thumb_index_open.obj', 'thumb_index_pinch.obj') +} +OUTPUTS = LIBRARIES | CONFIGS.keys() | EXECUTABLES | HAND_MODELS + + +def is_source(path): + return path in SOURCE_FILES or any(path.startswith(tree + '/') for tree in SOURCE_TREES) + + +def sha(data): + return hashlib.sha256(data).hexdigest() + + +def commit(root): + return subprocess.check_output(['git', '-C', str(root), 'rev-parse', 'HEAD']).decode().strip() + + +def sources(root): + paths = {root / name for name in SOURCE_FILES} + for tree in SOURCE_TREES: + paths.update(path for path in (root / tree).rglob('*') if path.is_file()) + result = {} + for path in sorted(paths): + if path.is_symlink() or not path.resolve().is_relative_to(root.resolve()): + raise ValueError('VR source escapes the checkout: ' + str(path)) + result[path.relative_to(root).as_posix()] = path.read_bytes().replace(b'\r\n', b'\n') + return result + + +def headers(include): + for name in ('vulkan/vulkan_core.h', 'vulkan/vk_layer.h'): + if not (include / name).is_file(): + raise ValueError('Missing Vulkan header: ' + str(include / name)) + return {path.relative_to(include).as_posix(): path.read_bytes().replace(b'\r\n', b'\n') + for tree in ('vulkan', 'vk_video') for path in sorted((include / tree).rglob('*')) + if path.is_file()} + + +def hashes(files): + return {name: sha(data) for name, data in files.items()} + + +def read_outputs(folder, root): + found = {p.relative_to(folder).as_posix() for p in folder.rglob('*') if p.is_file()} + if found - {MANIFEST} != OUTPUTS: + raise ValueError('VR build has missing or unexpected output files') + files = {} + for name in sorted(OUTPUTS): + path = folder / name + if path.is_symlink() or not path.resolve().is_relative_to(folder.resolve()): + raise ValueError('VR output escapes its build directory: ' + name) + data = path.read_bytes() + if name in LIBRARIES or name in EXECUTABLES: + if (len(data) < 64 or data[:6] != b'\x7fELF\x02\x01' or + struct.unpack_from('<H', data, 16)[0] not in ((3,) if name in LIBRARIES else (2, 3)) or + struct.unpack_from('<H', data, 18)[0] != 183): + raise ValueError('VR output is not an ARM64 ELF shared library or executable: ' + name) + elif name in CONFIGS and json.loads(data) != json.loads((root / CONFIGS[name]).read_bytes()): + raise ValueError('VR configuration differs from current source: ' + name) + elif not data: + raise ValueError('Empty VR output: ' + name) + files[name] = data + return files + + +def validate(folder, include, root=ROOT): + try: + manifest = json.loads((folder / MANIFEST).read_text(encoding='utf-8')) + except (OSError, ValueError) as error: + raise ValueError('Missing or invalid VR build manifest; rebuild with tools/vr/build_windows.py') from error + if (manifest.get('version') != 1 or manifest.get('source_commit') != commit(root) or + manifest.get('sources') != hashes(sources(root)) or + manifest.get('headers') != hashes(headers(include))): + raise ValueError('VR build is stale; rebuild with tools/vr/build_windows.py') + files = read_outputs(folder, root) + if manifest.get('outputs') != hashes(files): + raise ValueError('VR build output checksum mismatch; rebuild with tools/vr/build_windows.py') + return files, manifest + + +def build(folder, include, root=ROOT, image=IMAGE): + folder = folder.resolve() + workspace = (root / 'build/windows-setup').resolve() + if not workspace.is_relative_to(root.resolve()) or not folder.is_relative_to((root / 'build').resolve()): + raise ValueError('VR build output must be inside the checkout build directory') + input_files, input_headers, revision = sources(root), headers(include), commit(root) + docker = shutil.which('docker') + if not docker: + candidate = Path(os.environ.get('ProgramFiles', 'C:/Program Files')) / 'Docker/Docker/resources/bin/docker.exe' + if candidate.is_file(): + docker = str(candidate) + if not docker: + raise ValueError('Docker Desktop is required to rebuild VR; start its Linux engine and retry') + subprocess.run([docker, 'info', '--format', '{{.OSType}}'], check=True) + workspace.mkdir(parents=True, exist_ok=True) + with tempfile.TemporaryDirectory(prefix='vr-build-', dir=workspace) as temp: + snapshot = Path(temp).resolve() + # build.sh's recursive output cleanup and TemporaryDirectory cleanup are + # confined to this new, verified directory, never the real checkout. + if not snapshot.is_relative_to(workspace): + raise ValueError('Temporary VR workspace escapes the checkout') + inspect = subprocess.run([docker, 'image', 'inspect', '--format', '{{.Id}}', image], + capture_output=True, text=True) + if inspect.returncode: + if image != IMAGE: + raise ValueError('VR compiler image is not available locally: ' + image) + subprocess.run([docker, 'build', '--tag', image, '--file', '-', str(snapshot)], + input=input_files['tools/local-cross.Dockerfile'], check=True) + image_id = subprocess.check_output([docker, 'image', 'inspect', '--format', '{{.Id}}', image]).decode().strip() + for name, data in input_files.items(): + target = snapshot / name + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(data) + for name, data in input_headers.items(): + target = snapshot / 'vk-include' / name + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(data) + subprocess.run([docker, 'run', '--rm', '--platform', 'linux/amd64', + '--mount', f'type=bind,source={snapshot},target=/src', '-w', '/src', + '-e', 'VK_INCLUDE=/src/vk-include', image_id, + 'bash', 'tools/vr/build.sh', '--native', '/src/out'], check=True) + if sources(root) != input_files or headers(include) != input_headers or commit(root) != revision: + raise ValueError('VR inputs changed during compilation; retry the build') + files = read_outputs(snapshot / 'out', root) + manifest = {'version': 1, 'source_commit': revision, 'sources': hashes(input_files), + 'headers': hashes(input_headers), 'compiler_image': image_id, + 'outputs': hashes(files), 'native_tests': 'passed in tools/vr/build.sh'} + # Publish only after the complete build and native regression tests pass. + for name, data in files.items(): + target = folder / name + if not target.resolve().is_relative_to(folder): + raise ValueError('VR output escapes the build directory: ' + name) + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(data) + (folder / MANIFEST).write_text(json.dumps(manifest, indent=2, sort_keys=True) + '\n', encoding='utf-8') + return validate(folder, include, root) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--vk-include', type=Path, required=True, help='NDK sysroot/usr/include directory') + parser.add_argument('--out', type=Path, default=ROOT / 'build/windows-setup/vr') + parser.add_argument('--image', default=IMAGE, help='Existing Docker compiler image; default is built if missing') + args = parser.parse_args() + try: + build(args.out, args.vk_include.resolve(), image=args.image) + except (OSError, ValueError, subprocess.CalledProcessError) as error: + parser.exit(1, str(error) + '\n') + print('VR build and native tests verified: ' + str(args.out)) + + +if __name__ == '__main__': + main() diff --git a/tools/vr/driver_droiddeck/driver.vrdrivermanifest b/tools/vr/driver_droiddeck/driver.vrdrivermanifest new file mode 100644 index 0000000000..762ada4c26 --- /dev/null +++ b/tools/vr/driver_droiddeck/driver.vrdrivermanifest @@ -0,0 +1,7 @@ +{ + "alwaysActivate": true, + "name": "droiddeck", + "directory": "", + "resourceOnly": false, + "hmd_presence": ["*.*"] +} diff --git a/tools/vr/driver_droiddeck/resources/settings/default.vrsettings b/tools/vr/driver_droiddeck/resources/settings/default.vrsettings new file mode 100644 index 0000000000..fac915857b --- /dev/null +++ b/tools/vr/driver_droiddeck/resources/settings/default.vrsettings @@ -0,0 +1,11 @@ +{ + "driver_droiddeck": { + "enable": true, + "windowWidth": 1920, + "windowHeight": 1080, + "displayFrequency": 60.0, + "virtualDisplay": false, + "directMode": true, + "gamepadControllers": true + } +} diff --git a/tools/vr/layer/VK_LAYER_DROIDDECK_vr.json b/tools/vr/layer/VK_LAYER_DROIDDECK_vr.json new file mode 100644 index 0000000000..3e2fe8fb3d --- /dev/null +++ b/tools/vr/layer/VK_LAYER_DROIDDECK_vr.json @@ -0,0 +1,14 @@ +{ + "file_format_version": "1.2.0", + "layer": { + "name": "VK_LAYER_DROIDDECK_vr", + "type": "GLOBAL", + "library_path": "./libVkLayer_droiddeck_vr.so", + "api_version": "1.3.0", + "implementation_version": "1", + "description": "Lets SteamVR's compositor start on Turnip/KGSL: stands in for the display extensions", + "functions": { + "vkNegotiateLoaderLayerInterfaceVersion": "DroidDeckVr_NegotiateLoaderLayerInterfaceVersion" + } + } +} diff --git a/tools/vr/layer/VK_LAYER_DROIDDECK_vr_implicit.json b/tools/vr/layer/VK_LAYER_DROIDDECK_vr_implicit.json new file mode 100644 index 0000000000..2fd3d6805c --- /dev/null +++ b/tools/vr/layer/VK_LAYER_DROIDDECK_vr_implicit.json @@ -0,0 +1,17 @@ +{ + "file_format_version": "1.2.0", + "layer": { + "name": "VK_LAYER_DROIDDECK_vr", + "type": "GLOBAL", + "library_path": "/usr/local/lib/droiddeck-vr/layer/libVkLayer_droiddeck_vr.so", + "api_version": "1.3.0", + "implementation_version": "1", + "description": "Cardboard SteamVR: shared-texture semaphores and a stand-in display on Turnip/KGSL; passes through unless SteamVR runs", + "functions": { + "vkNegotiateLoaderLayerInterfaceVersion": "DroidDeckVr_NegotiateLoaderLayerInterfaceVersion" + }, + "disable_environment": { + "DROIDDECK_VR_LAYER_DISABLE": "1" + } + } +} diff --git a/tools/vr/make_hand_models.cpp b/tools/vr/make_hand_models.cpp new file mode 100644 index 0000000000..b4a3eac66d --- /dev/null +++ b/tools/vr/make_hand_models.cpp @@ -0,0 +1,42 @@ +#include <cstdio> +#include <string> +#include <sys/stat.h> + +#include "hand_mesh.h" + +using namespace droiddeck; + +static bool Write(const std::string &path, const void *data, size_t size) { + FILE *f = fopen(path.c_str(), "wb"); + if (!f) return false; + const bool ok = fwrite(data, 1, size, f) == size; + return fclose(f) == 0 && ok; +} + +static bool Write(const std::string &path, const std::string &text) { return Write(path, text.data(), text.size()); } + +int main(int argc, char **argv) { + if (argc != 2) { + fprintf(stderr, "usage: make_hand_models <rendermodels dir>\n"); + return 2; + } + const std::string root = argv[1]; + mkdir(root.c_str(), 0755); + const std::vector<uint8_t> skin = GlovePng(64, {246, 246, 249}, {224, 227, 233}, glove::kDarkest); + for (int right = 0; right < 2; right++) { + const std::string name = right ? "droiddeck_hand_right" : "droiddeck_hand_left"; + const std::string dir = root + "/" + name; + mkdir(dir.c_str(), 0755); + bool ok = Write(dir + "/" + name + ".json", HandModelJson(right)) && Write(dir + "/hand.mtl", HandMtl("hand", "hand.png")) && + Write(dir + "/hand.png", skin.data(), skin.size()) && + Write(dir + "/hand_open.obj", HandObj(BuildHandPart(right, HandPart::Hand, false), "hand")) && + Write(dir + "/hand_fist.obj", HandObj(BuildHandPart(right, HandPart::Hand, true), "hand")) && + Write(dir + "/thumb_index_open.obj", HandObj(BuildHandPart(right, HandPart::ThumbIndex, false), "hand")) && + Write(dir + "/thumb_index_pinch.obj", HandObj(BuildHandPart(right, HandPart::ThumbIndex, true), "hand")); + if (!ok) { + fprintf(stderr, "make_hand_models: could not write %s\n", dir.c_str()); + return 1; + } + } + return 0; +} diff --git a/tools/vr/src/OPENVR_LICENSE b/tools/vr/src/OPENVR_LICENSE new file mode 100644 index 0000000000..ee83337d7f --- /dev/null +++ b/tools/vr/src/OPENVR_LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2015, Valve Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tools/vr/src/adaptive_pose.h b/tools/vr/src/adaptive_pose.h new file mode 100644 index 0000000000..e74f9f48a6 --- /dev/null +++ b/tools/vr/src/adaptive_pose.h @@ -0,0 +1,46 @@ +#pragma once +#include "arm_model.h" +#include <cstdint> + +namespace droiddeck { + +class AdaptivePositionMotion { +public: + explicit AdaptivePositionMotion(double minimumCutoff = 1.5, double positionGain = 25.0) + : minimumCutoff_(minimumCutoff), positionGain_(positionGain) {} + void Reset() { time_ = 0; velocity_ = {}; } + + void Observe(const Vec3 &position, int64_t time) { + if (time == time_) return; + const double dt = double(time - time_) * 1e-9; + if (time_ > 0 && dt > 0 && dt <= .2) + velocity_ = velocity_ + ((position - position_) * (1.0 / dt) - velocity_) * Alpha(dt, 1.0); + else velocity_ = {}; + position_ = position; time_ = time; + } + + double PositionAlpha(double dt) const { + return Alpha(dt, std::clamp(minimumCutoff_ + positionGain_ * Length(velocity_), minimumCutoff_, 25.0)); + } + +private: + const double minimumCutoff_, positionGain_; + static double Alpha(double dt, double cutoff) { return -std::expm1(-2 * M_PI * cutoff * std::clamp(dt, 0.0, .2)); } + int64_t time_ = 0; + Vec3 position_, velocity_; +}; + +inline Quat ShoulderAim(const Vec3 &head, const Quat &headRotation, const Vec3 &palm, bool right, const Quat &fallback) { + const Vec3 headRight = Rotate(headRotation, {1, 0, 0}); + double yaw = 0; + if (!Heading(headRotation, &yaw)) yaw = std::atan2(-headRight.z, headRight.x); + const Quat torso = AboutY(yaw); + const Vec3 shoulder = head + Rotate(torso, {right ? .18 : -.18, -.28, 0}); + const Vec3 reach = palm - shoulder; + const double distance = Length(reach); + if (!std::isfinite(distance) || distance < .05) return fallback; + const Vec3 forward = Rotate(torso, {0, 0, -1}); + return Normalize(FromTo(forward, reach * (1.0 / distance)) * torso); +} + +} diff --git a/tools/vr/src/arm_model.h b/tools/vr/src/arm_model.h new file mode 100644 index 0000000000..4004677e2a --- /dev/null +++ b/tools/vr/src/arm_model.h @@ -0,0 +1,120 @@ +// Arm model ported from Google's GvrArmModel.cs (Google VR SDK for Unity, Apache-2.0), see docs/third-party/joycon. +#pragma once + +#include <algorithm> +#include <cmath> + +namespace droiddeck { + +struct Vec3 { + double x = 0.0, y = 0.0, z = 0.0; +}; + +struct Quat { + double w = 1.0, x = 0.0, y = 0.0, z = 0.0; +}; + +inline Vec3 operator+(const Vec3 &a, const Vec3 &b) { return {a.x + b.x, a.y + b.y, a.z + b.z}; } +inline Vec3 operator-(const Vec3 &a, const Vec3 &b) { return {a.x - b.x, a.y - b.y, a.z - b.z}; } +inline Vec3 operator*(const Vec3 &a, double s) { return {a.x * s, a.y * s, a.z * s}; } +inline double Dot(const Vec3 &a, const Vec3 &b) { return a.x * b.x + a.y * b.y + a.z * b.z; } +inline Vec3 Cross(const Vec3 &a, const Vec3 &b) { return {a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x}; } +inline double Length(const Vec3 &a) { return std::sqrt(Dot(a, a)); } + +inline Quat operator*(const Quat &a, const Quat &b) { + return {a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z, + a.w * b.x + a.x * b.w + a.y * b.z - a.z * b.y, + a.w * b.y - a.x * b.z + a.y * b.w + a.z * b.x, + a.w * b.z + a.x * b.y - a.y * b.x + a.z * b.w}; +} + +inline Quat Conjugate(const Quat &q) { return {q.w, -q.x, -q.y, -q.z}; } + +inline Quat Normalize(const Quat &q) { + const double n = std::sqrt(q.w * q.w + q.x * q.x + q.y * q.y + q.z * q.z); + if (!(n > 1e-9)) return {}; + return {q.w / n, q.x / n, q.y / n, q.z / n}; +} + +inline Vec3 Rotate(const Quat &q, const Vec3 &v) { + const Vec3 u{q.x, q.y, q.z}; + const Vec3 t = Cross(u, v) * 2.0; + return v + t * q.w + Cross(u, t); +} + +inline Quat AboutX(double radians) { return {std::cos(radians / 2), std::sin(radians / 2), 0.0, 0.0}; } +inline Quat AboutY(double radians) { return {std::cos(radians / 2), 0.0, std::sin(radians / 2), 0.0}; } + +inline Quat FromTo(const Vec3 &from, const Vec3 &to) { + const double d = Dot(from, to); + if (d < -0.999999) { + Vec3 axis = Cross({1.0, 0.0, 0.0}, from); + if (Length(axis) < 1e-6) axis = Cross({0.0, 1.0, 0.0}, from); + axis = axis * (1.0 / Length(axis)); + return {0.0, axis.x, axis.y, axis.z}; + } + const Vec3 c = Cross(from, to); + return Normalize({1.0 + d, c.x, c.y, c.z}); +} + +inline Quat Nlerp(const Quat &a, const Quat &b, double t) { + const double sign = a.w * b.w + a.x * b.x + a.y * b.y + a.z * b.z < 0.0 ? -1.0 : 1.0; + return Normalize({a.w + (sign * b.w - a.w) * t, a.x + (sign * b.x - a.x) * t, + a.y + (sign * b.y - a.y) * t, a.z + (sign * b.z - a.z) * t}); +} + +inline double AngleDegrees(const Quat &q) { return 2.0 * std::acos(std::min(std::fabs(q.w), 1.0)) * 180.0 / M_PI; } + +inline bool Heading(const Quat &q, double *radians) { + const Vec3 forward = Rotate(q, {0.0, 0.0, -1.0}); + if (std::hypot(forward.x, forward.z) < 0.25) return false; + *radians = std::atan2(-forward.x, -forward.z); + return true; +} + +class ArmModel { +public: + explicit ArmModel(bool right) : side_(right ? 1.0 : -1.0) {} + + void Reset() { torsoSet_ = false; } + + Vec3 Update(const Vec3 &head, const Quat &headRotation, const Quat &controller, double angularSpeed, double dt) { + Vec3 gaze = Rotate(headRotation, {0.0, 0.0, -1.0}); + gaze.y = 0.0; + const double length = Length(gaze); + if (length > 1e-3) { + gaze = gaze * (1.0 / length); + if (!torsoSet_) { + torso_ = gaze; + torsoSet_ = true; + } else { + const double strength = std::clamp((angularSpeed - 0.2) / 45.0, 0.0, 0.1); + const double follow = 1.0 - std::pow(1.0 - strength, std::max(dt, 0.0) * 60.0); + const double angle = std::atan2(Cross(torso_, gaze).y, Dot(torso_, gaze)); + torso_ = Rotate(AboutY(angle * follow), torso_); + } + } + const Quat torso = AboutY(std::atan2(-torso_.x, -torso_.z)); + const Vec3 forward = Rotate(Conjugate(torso) * controller, {0.0, 0.0, -1.0}); + const double elevation = std::asin(std::clamp(forward.y, -1.0, 1.0)) * 180.0 / M_PI; + const Quat swing = FromTo({0.0, 0.0, -1.0}, forward); + const double extension = std::clamp((elevation - kMinExtension) / (kMaxExtension - kMinExtension), 0.0, 1.0); + const Vec3 elbow = Vec3{0.195 * side_, -0.5, -0.005} + Vec3{-0.13 * side_, 0.14, -0.08} * extension; + const double suppression = 1.0 - std::pow(AngleDegrees(swing) / 180.0, 6.0); + const double share = ((1.0 - kElbowBend) + kElbowBend * extension * kExtensionWeight) * suppression; + const Quat lerp = Nlerp({}, swing, share); + const Quat elbowRotation = torso * Conjugate(lerp) * swing; + const Quat wristRotation = elbowRotation * lerp; + const Vec3 elbowAt = head + Rotate(torso, elbow); + const Vec3 wristAt = elbowAt + Rotate(elbowRotation, {0.0, 0.0, -0.25}); + return wristAt + Rotate(wristRotation, {0.0, 0.0, -0.05}); + } + +private: + static constexpr double kMinExtension = 7.0, kMaxExtension = 60.0, kElbowBend = 0.6, kExtensionWeight = 0.4; + double side_; + bool torsoSet_ = false; + Vec3 torso_{0.0, 0.0, -1.0}; +}; + +} diff --git a/tools/vr/src/driver_droiddeck.cpp b/tools/vr/src/driver_droiddeck.cpp new file mode 100644 index 0000000000..771e8da399 --- /dev/null +++ b/tools/vr/src/driver_droiddeck.cpp @@ -0,0 +1,1869 @@ +#include "openvr_driver.h" + +#include <algorithm> +#include <string> +#include <atomic> +#include <cstdarg> +#include <chrono> +#include <cmath> +#include <cstdio> +#include <cstdlib> +#include <ctime> +#include <cstring> +#include <cstddef> +#include <fcntl.h> +#include <map> +#include <sched.h> +#include <sys/mman.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/un.h> +#include <mutex> +#include <thread> +#include <vector> +#include <unistd.h> + +#include "../../../app/src/main/cpp/waylandcomp/src/headpose_shm.h" +#include "arm_model.h" +#include "hand_motion.h" +#include "hand_pose.h" +#include "handcam_shm.h" +#include "hand_skeleton.h" +#include "index_pose.h" +#include "joycon_shm.h" +#include "presenter.h" +#include "spatial_tracking.h" +#include "luma_joycon.h" +#include "render_target.h" +#include "xr_tracking_file.h" +#include "xr_frame_math.h" +#include "xr_vsync_timing.h" +#include "xr_touch_input.h" +#include "xr_chaperone.h" + +#define DD_EXPORT extern "C" __attribute__((visibility("default"))) + +using namespace vr; +using namespace droiddeck; + +namespace { + +const char *const kSettingsSection = "driver_droiddeck"; +const char *const kPosePath = "/run/droiddeck/" DROIDDECK_HEADPOSE_FILE; +const char *const kJoyConPath = "/run/droiddeck/" DROIDDECK_JOYCON_FILE; +const char *const kHandCamPath = "/run/droiddeck/" DROIDDECK_HANDCAM_FILE; +const char *const kHandTraceFlag = "/run/droiddeck/droiddeck-handtrace.on"; +const char *const kHandTracePath = "/run/droiddeck/droiddeck-handtrace.csv"; +constexpr float kMinPulseMs = 30.0f; +constexpr int64_t kJoyConStaleNs = 500000000; +constexpr int64_t kHandCamStaleNs = 300000000; +constexpr int64_t kBareHandsStaleNs = 2000000000; + +void Log(const char *fmt, ...) __attribute__((format(printf, 1, 2))); +void Log(const char *fmt, ...) { + char buf[1024]; + va_list ap; + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + if (VRDriverLog()) VRDriverLog()->Log(buf); + fprintf(stderr, "[droiddeck] %s\n", buf); +} + +class HandTrace { +public: + void Poll(int64_t nowNs) { + if (checkedNs_ && nowNs - checkedNs_ < 1000000000) return; + checkedNs_ = nowNs; + const bool want = access(kHandTraceFlag, F_OK) == 0; + if (want && !file_) { + file_ = fopen(kHandTracePath, "a"); + if (file_) { + fprintf(file_, "S,%lld\n", (long long)nowNs); + Log("hand trace started"); + } + } else if (!want && file_) { + fclose(file_); + file_ = nullptr; + Log("hand trace stopped"); + } + if (file_) fflush(file_); + } + + FILE *File() const { return file_; } + +private: + FILE *file_ = nullptr; + int64_t checkedNs_ = 0; +}; + +HandTrace gHandTrace; + +class PoseFile { +public: + bool Read(droiddeck_headpose *out) { + if (!map_ && !Open()) return false; + for (int tries = 0; tries < 8; tries++) { + uint32_t a = __atomic_load_n(&map_->seq, __ATOMIC_ACQUIRE); + if (a & 1u) continue; + memcpy(out, (const void *)map_, sizeof(*out)); + __atomic_thread_fence(__ATOMIC_ACQUIRE); + if (__atomic_load_n(&map_->seq, __ATOMIC_RELAXED) == a) + return out->magic == DROIDDECK_HEADPOSE_MAGIC && out->version == DROIDDECK_HEADPOSE_VERSION; + } + return false; + } + ~PoseFile() { if (map_) munmap((void *)map_, sizeof(*map_)); } + +private: + bool Open() { + int fd = open(kPosePath, O_RDONLY | O_CLOEXEC); + if (fd < 0) return false; + void *p = mmap(nullptr, sizeof(droiddeck_headpose), PROT_READ, MAP_SHARED, fd, 0); + close(fd); + if (p == MAP_FAILED) return false; + map_ = (volatile droiddeck_headpose *)p; + Log("head pose file mapped: %s", kPosePath); + return true; + } + volatile droiddeck_headpose *map_ = nullptr; +}; + +HmdQuaternion_t QuatFromMatrix(const float m[9]) { + HmdQuaternion_t q; + float tr = m[0] + m[4] + m[8]; + if (tr > 0.0f) { + float s = sqrtf(tr + 1.0f) * 2.0f; + q.w = 0.25f * s; q.x = (m[7] - m[5]) / s; q.y = (m[2] - m[6]) / s; q.z = (m[3] - m[1]) / s; + } else if (m[0] > m[4] && m[0] > m[8]) { + float s = sqrtf(1.0f + m[0] - m[4] - m[8]) * 2.0f; + q.w = (m[7] - m[5]) / s; q.x = 0.25f * s; q.y = (m[1] + m[3]) / s; q.z = (m[2] + m[6]) / s; + } else if (m[4] > m[8]) { + float s = sqrtf(1.0f + m[4] - m[0] - m[8]) * 2.0f; + q.w = (m[2] - m[6]) / s; q.x = (m[1] + m[3]) / s; q.y = 0.25f * s; q.z = (m[5] + m[7]) / s; + } else { + float s = sqrtf(1.0f + m[8] - m[0] - m[4]) * 2.0f; + q.w = (m[3] - m[1]) / s; q.x = (m[2] + m[6]) / s; q.y = (m[5] + m[7]) / s; q.z = 0.25f * s; + } + return q; +} + +double VsyncPeriodSeconds(); + +HmdMatrix34_t XrPoseMatrix(const DroidDeckXrPose &pose) { + const float qx = pose.orientation[0], qy = pose.orientation[1], qz = pose.orientation[2], qw = pose.orientation[3]; + HmdMatrix34_t matrix{}; + matrix.m[0][0] = 1 - 2 * (qy * qy + qz * qz); matrix.m[0][1] = 2 * (qx * qy - qw * qz); matrix.m[0][2] = 2 * (qx * qz + qw * qy); + matrix.m[1][0] = 2 * (qx * qy + qw * qz); matrix.m[1][1] = 1 - 2 * (qx * qx + qz * qz); matrix.m[1][2] = 2 * (qy * qz - qw * qx); + matrix.m[2][0] = 2 * (qx * qz - qw * qy); matrix.m[2][1] = 2 * (qy * qz + qw * qx); matrix.m[2][2] = 1 - 2 * (qx * qx + qy * qy); + for (int axis = 0; axis < 3; axis++) matrix.m[axis][3] = pose.position[axis]; + return matrix; +} + +HmdMatrix34_t XrEyeToHead(const DroidDeckXrPose &head, const DroidDeckXrPose &eye) { + HmdMatrix34_t headMatrix = XrPoseMatrix(head), eyeMatrix = XrPoseMatrix(eye), result{}; + for (int row = 0; row < 3; row++) { + for (int column = 0; column < 3; column++) + for (int inner = 0; inner < 3; inner++) result.m[row][column] += headMatrix.m[inner][row] * eyeMatrix.m[inner][column]; + for (int inner = 0; inner < 3; inner++) + result.m[row][3] += headMatrix.m[inner][row] * (eyeMatrix.m[inner][3] - headMatrix.m[inner][3]); + } + return result; +} + +class VirtualDisplay : public IVRVirtualDisplay { +public: + void Present(const PresentInfo_t *info, uint32_t size) override { + frames_++; + if (frames_ <= 5 || frames_ % 600 == 0) + Log("virtual display Present #%llu: handle 0x%llx vsync %d frame %llu (info %u bytes)", + (unsigned long long)frames_, (unsigned long long)info->backbufferTextureHandle, (int)info->vsync, + (unsigned long long)info->nFrameId, size); + last_ = std::chrono::steady_clock::now(); + } + void WaitForPresent() override {} + bool GetTimeSinceLastVsync(float *seconds, uint64_t *counter) override { + using namespace std::chrono; + const double period = VsyncPeriodSeconds(); + std::lock_guard<std::mutex> lock(vsyncMutex_); + const double t = duration<double>(steady_clock::now().time_since_epoch()).count(); + if (period != period_) { + vsyncBase_ = period_ > 0.0 ? vsyncBase_ + (uint64_t)((t - vsyncAt_) / period_) : (uint64_t)(t / period); + vsyncAt_ = t; + period_ = period; + } + const double since = t - vsyncAt_; + *seconds = (float)fmod(since, period); + *counter = vsyncBase_ + (uint64_t)(since / period); + return true; + } + +private: + uint64_t frames_ = 0; + std::chrono::steady_clock::time_point last_; + std::mutex vsyncMutex_; + double period_ = 0.0, vsyncAt_ = 0.0; + uint64_t vsyncBase_ = 0; +}; + +class Vsync { +public: + static constexpr std::chrono::microseconds kLead{2000}; + + static std::chrono::nanoseconds Interval() { return std::chrono::nanoseconds(intervalNs_.load()); } + static void SetRate(float hz) { + if (hz >= 24.0f && hz <= 240.0f) intervalNs_ = (int64_t)(1e9 / hz); + } + + static void Start() { + if (running_.exchange(true)) return; + timing_.Reset(); + thread_ = std::thread([] { + XrTrackingFile xrFile; + auto next = std::chrono::steady_clock::now() + Interval(); + while (running_) { + auto interval = Interval(); + DroidDeckXrTracking xr; + if (xrFile.Read(&xr) && XrTrackingFile::Fresh(xr)) { + interval = std::chrono::nanoseconds(xr.period_ns); + auto now = std::chrono::steady_clock::now(); + next = timing_.Target(now, next, xr.predicted_ns, interval); + } + auto announce = next - kLead; + std::this_thread::sleep_until(announce); + auto now = std::chrono::steady_clock::now(); + double offset = std::chrono::duration<double>(next - now).count(); + timing_.Record(next, interval); + VRServerDriverHost()->VsyncEvent(offset); + next += interval; + now = std::chrono::steady_clock::now(); + while (next <= now) next += interval; + } + }); + } + static void Stop() { + running_ = false; + if (thread_.joinable()) thread_.join(); + } + static std::chrono::steady_clock::time_point Deadline(uint32_t framesToThrottle) { + return timing_.Deadline(framesToThrottle); + } + +private: + static inline std::atomic<bool> running_{false}; + static inline std::atomic<int64_t> intervalNs_{16666667}; + static inline std::thread thread_; + static inline XrVsyncTiming timing_; +}; + +double VsyncPeriodSeconds() { return Vsync::Interval().count() / 1e9; } + +class DirectMode : public IVRDriverDirectModeComponent { +public: + void ConfigureXr(const DroidDeckXrTracking &tracking) { + xrWidth_ = tracking.eyes[0].width * 2; xrHeight_ = tracking.eyes[0].height; + for (int eye = 0; eye < 2; eye++) eyeToHead_[eye] = XrEyeToHead(tracking.head, tracking.eyes[eye].pose); + } + struct Set { + SharedTextureHandle_t handles[3] = {}; + int fds[3] = {-1, -1, -1}; + uint32_t pid = 0, index = 0; + SwapTextureSetDesc_t desc = {}; + }; + + void CreateSwapTextureSet(uint32_t pid, const SwapTextureSetDesc_t *d, SwapTextureSet_t *out) override { + Log("CreateSwapTextureSet pid %u: format %u, %ux%u, %u samples", pid, d->nFormat, d->nWidth, d->nHeight, d->nSampleCount); + Set set; + set.pid = pid; + set.desc = *d; + const uint32_t usage = 0x1 | 0x4 | 0x80 ; + const uint32_t create = 0x8 ; + for (int i = 0; i < 3; i++) { + SharedTextureHandle_t h = 0; + // Compute access makes SteamVR substitute UNORM for sRGB, darkening direct compositor output. + if (!VRIPCResourceManager()->NewSharedVulkanImage(d->nFormat, d->nWidth, d->nHeight, true, false, false, 1, 1, + create, usage, &h)) { + Log("NewSharedVulkanImage failed"); + return; + } + uint64_t ipc = 0; + VRIPCResourceManager()->RefResource(h, &ipc); + int fd = -1; + if (!VRIPCResourceManager()->ReceiveSharedFd(ipc, &fd)) Log("ReceiveSharedFd failed"); + set.handles[i] = h; + set.fds[i] = fd; + out->rSharedTextureHandles[i] = h; + } + out->unTextureFlags = 0; + Log(" -> handles 0x%llx 0x%llx 0x%llx, fds %d %d %d", (unsigned long long)set.handles[0], + (unsigned long long)set.handles[1], (unsigned long long)set.handles[2], set.fds[0], set.fds[1], set.fds[2]); + droiddeck::Presenter::AddTextures(set.handles, set.fds, d->nFormat, d->nWidth, d->nHeight, pid); + std::lock_guard<std::mutex> lock(mutex_); + sets_.push_back(set); + } + + void DestroySwapTextureSet(SharedTextureHandle_t h) override { + std::lock_guard<std::mutex> lock(mutex_); + for (auto it = sets_.begin(); it != sets_.end(); ++it) { + if (it->handles[0] == h || it->handles[1] == h || it->handles[2] == h) { + Release(*it); + sets_.erase(it); + return; + } + } + } + + void DestroyAllSwapTextureSets(uint32_t pid) override { + std::lock_guard<std::mutex> lock(mutex_); + for (auto it = sets_.begin(); it != sets_.end();) { + if (it->pid == pid) { Release(*it); it = sets_.erase(it); } else ++it; + } + } + + void GetNextSwapTextureSetIndex(SharedTextureHandle_t handles[2], uint32_t (*indices)[2]) override { + std::lock_guard<std::mutex> lock(mutex_); + for (int e = 0; e < 2; e++) { + Set *s = Find(handles[e]); + if (!s) { (*indices)[e] = 0; continue; } + s->index = (s->index + 1) % 3; + (*indices)[e] = s->index; + } + } + + void SubmitLayer(const SubmitLayerPerEye_t (&eyes)[2]) override { + layers_++; + if (layerInFrame_++ == 0) { + frame_.render = {}; + if (xrWidth_) { + frame_.render.magic = DROIDDECK_XR_FRAME_MAGIC; frame_.render.version = DROIDDECK_XR_FRAME_VERSION; + frame_.render.width = xrWidth_; frame_.render.height = xrHeight_; + frame_.render.bytes = xrWidth_ * xrHeight_ * 4; + frame_.render.color_space = DROIDDECK_XR_COLOR_LINEAR_RGBA8; + } + for (int e = 0; e < 2; e++) { + frame_.texture[e] = eyes[e].hTexture; + frame_.bounds[e][0] = eyes[e].bounds.uMin; frame_.bounds[e][1] = eyes[e].bounds.vMin; + frame_.bounds[e][2] = eyes[e].bounds.uMax; frame_.bounds[e][3] = eyes[e].bounds.vMax; + std::memcpy(frame_.render.projection[e], eyes[e].mProjection.m, sizeof(eyes[e].mProjection.m)); + xr_frame_eye_pose(frame_.render.eye_pose[e], eyes[e].mHmdPose.m, eyeToHead_[e].m); + } + } + if (frames_ < 3) + Log("SubmitLayer: textures 0x%llx / 0x%llx, bounds %.2f,%.2f-%.2f,%.2f", + (unsigned long long)eyes[0].hTexture, (unsigned long long)eyes[1].hTexture, + eyes[0].bounds.uMin, eyes[0].bounds.vMin, eyes[0].bounds.uMax, eyes[0].bounds.vMax); + } + + void Present(SharedTextureHandle_t sync) override { + frames_++; + frame_.render.frame_id = frames_; frame_.render.captured_ns = XrTrackingFile::Now(); + frame_.layers = layerInFrame_; + if (layerInFrame_) droiddeck::Presenter::Submit(frame_); + if (layerInFrame_ != lastLayerCount_) { + static int said; + if (said++ < 20) Log("frame %llu: %d layer(s) (was %d)", (unsigned long long)frames_, layerInFrame_, lastLayerCount_); + lastLayerCount_ = layerInFrame_; + } + layerInFrame_ = 0; + if (frames_ <= 3 || frames_ % 600 == 0) + Log("Present #%llu (%llu layers so far), sync 0x%llx", (unsigned long long)frames_, + (unsigned long long)layers_, (unsigned long long)sync); + } + + void PostPresent(const Throttling_t *t) override { + auto until = Vsync::Deadline(t ? t->nFramesToThrottle : 0); + if (until > std::chrono::steady_clock::now()) std::this_thread::sleep_until(until); + } + + void GetFrameTiming(DriverDirectMode_FrameTiming *t) override { t->m_nReprojectionFlags = 0; } + +private: + Set *Find(SharedTextureHandle_t h) { + for (auto &s : sets_) + for (int i = 0; i < 3; i++) + if (s.handles[i] == h) return &s; + return nullptr; + } + static void Release(Set &s) { + for (int i = 0; i < 3; i++) { + if (s.handles[i]) droiddeck::Presenter::RemoveTexture(s.handles[i]); + if (s.fds[i] >= 0) close(s.fds[i]); + if (s.handles[i]) VRIPCResourceManager()->UnrefResource(s.handles[i]); + } + } + + std::mutex mutex_; + std::vector<Set> sets_; + uint64_t frames_ = 0, layers_ = 0; + int layerInFrame_ = 0, lastLayerCount_ = -1; + droiddeck::EyeFrame frame_{}; + uint32_t xrWidth_ = 0, xrHeight_ = 0; + HmdMatrix34_t eyeToHead_[2]{}; +}; + +struct PadState { + uint32_t buttons = 0; + int16_t axes[8] = {}; +}; +enum : uint32_t { + PAD_A = 1u << 0, PAD_B = 1u << 1, PAD_X = 1u << 2, PAD_Y = 1u << 3, PAD_LB = 1u << 4, PAD_RB = 1u << 5, + PAD_SELECT = 1u << 6, PAD_START = 1u << 7, PAD_L3 = 1u << 8, PAD_R3 = 1u << 9, PAD_GUIDE = 1u << 10, +}; + +class PadRing { +public: + bool Read(PadState *out) { + if (!map_ && !Open()) return false; + for (int tries = 0; tries < 8; tries++) { + uint64_t a = __atomic_load_n((const uint64_t *)(map_ + 32), __ATOMIC_ACQUIRE); + if (a & 1u) continue; + memcpy(&out->buttons, (const void *)(map_ + 40), 4); + memcpy(out->axes, (const void *)(map_ + 44), 16); + __atomic_thread_fence(__ATOMIC_ACQUIRE); + if (__atomic_load_n((const uint64_t *)(map_ + 32), __ATOMIC_RELAXED) == a) return true; + } + return false; + } + ~PadRing() { if (map_) munmap((void *)map_, 64); } + +private: + bool Open() { + auto now = std::chrono::steady_clock::now(); + if (now < retry_) return false; + retry_ = now + std::chrono::seconds(2); + std::string path; + if (const char *env = getenv("DROIDDECK_VR_PAD_RING")) path = env; + if (path.empty()) { + const char *paths = getenv("FAKE_EVDEV_MEMFD_PATHS"); + if (paths && !strncmp(paths, "0=", 2)) path.assign(paths + 2, strcspn(paths + 2, ";")); + } + if (path.empty()) { + if (const char *dir = getenv("BL_LAUNCH_DIR")) path = std::string(dir) + "/dev/fakeinput-rings/ring0"; + } + if (path.empty()) return false; + int fd = open(path.c_str(), O_RDONLY | O_CLOEXEC); + if (fd < 0) return false; + void *p = mmap(nullptr, 64, PROT_READ, MAP_SHARED, fd, 0); + close(fd); + if (p == MAP_FAILED) return false; + uint32_t magic; + memcpy(&magic, p, 4); + if (magic != 0x46494252u) { munmap(p, 64); return false; } + map_ = (const volatile uint8_t *)p; + Log("game pad ring mapped: %s", path.c_str()); + return true; + } + const volatile uint8_t *map_ = nullptr; + std::chrono::steady_clock::time_point retry_{}; +}; + +template <typename T> +class ShmFile { +public: + ShmFile(const char *path, uint32_t magic, uint32_t version, const char *name) + : path_(path), magic_(magic), version_(version), name_(name) {} + bool Read(T *out) { + if (!map_ && !Open()) return false; + for (int tries = 0; tries < 64; tries++) { + if (tries) sched_yield(); + const uint32_t a = __atomic_load_n(&map_->seq, __ATOMIC_ACQUIRE); + if (a & 1u) continue; + memcpy(out, (const void *)map_, sizeof(*out)); + __atomic_thread_fence(__ATOMIC_ACQUIRE); + if (__atomic_load_n(&map_->seq, __ATOMIC_RELAXED) == a) return out->magic == magic_ && out->version == version_; + } + return false; + } + ~ShmFile() { if (map_) munmap((void *)map_, sizeof(*map_)); } + +private: + bool Open() { + const auto now = std::chrono::steady_clock::now(); + if (now < retry_) return false; + retry_ = now + std::chrono::seconds(2); + int fd = open(path_, O_RDONLY | O_CLOEXEC); + if (fd < 0) return false; + struct stat st; + if (fstat(fd, &st) != 0 || st.st_size < (off_t)sizeof(T)) { + close(fd); + return false; + } + void *p = mmap(nullptr, sizeof(T), PROT_READ, MAP_SHARED, fd, 0); + close(fd); + if (p == MAP_FAILED) return false; + map_ = (volatile T *)p; + Log("%s file mapped: %s", name_, path_); + return true; + } + const char *const path_; + const uint32_t magic_, version_; + const char *const name_; + volatile T *map_ = nullptr; + std::chrono::steady_clock::time_point retry_{}; +}; + +void SendRumble(uint16_t slot, const VREvent_HapticVibration_t &h) { + if (!(h.fAmplitude > 0.0f) || !(h.fFrequency > 0.0f)) return; + const float seconds = std::isfinite(h.fDurationSeconds) ? h.fDurationSeconds : 0.0f; + const uint16_t ms = (uint16_t)std::clamp(seconds * 1000.0f, kMinPulseMs, 5000.0f); + const uint16_t strength = (uint16_t)std::lround(std::min(h.fAmplitude, 1.0f) * 65535.0f); + const int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); + if (fd < 0) return; + sockaddr_un addr = {}; + addr.sun_family = AF_UNIX; + const char name[] = "droiddeck-rumble"; + memcpy(addr.sun_path + 1, name, sizeof(name) - 1); + const socklen_t length = (socklen_t)(offsetof(sockaddr_un, sun_path) + sizeof(name)); + if (connect(fd, (const sockaddr *)&addr, length) == 0) { + const uint16_t data[4] = {strength, strength, ms, slot}; + send(fd, data, sizeof(data), MSG_DONTWAIT | MSG_NOSIGNAL); + } + close(fd); +} + +int64_t MonotonicNs() { + return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::steady_clock::now().time_since_epoch()).count(); +} + +bool JoyConLive(const droiddeck_joycon_hand &hand, int64_t nowNs) { + return (hand.flags & DROIDDECK_JOYCON_CONNECTED) && hand.time_ns > 0 && + nowNs - hand.time_ns < kJoyConStaleNs && hand.time_ns - nowNs < kJoyConStaleNs; +} + +class HandController : public ITrackedDeviceServerDriver { +public: + explicit HandController(bool right) : right_(right), arm_(right), camera_(right), luma_(right) {} + + EVRInitError Activate(uint32_t id) override { + auto props = VRProperties(); + const PropertyContainerHandle_t c = props->TrackedDeviceToPropertyContainer(id); + props->SetStringProperty(c, Prop_ModelNumber_String, right_ ? "Knuckles Right" : "Knuckles Left"); + props->SetStringProperty(c, Prop_ManufacturerName_String, "DroidDeck"); + props->SetStringProperty(c, Prop_TrackingSystemName_String, "droiddeck"); + props->SetStringProperty(c, Prop_RenderModelName_String, RenderModel(expectBare_.load())); + props->SetStringProperty(c, Prop_ControllerType_String, "knuckles"); + props->SetStringProperty(c, Prop_InputProfilePath_String, "{indexcontroller}/input/index_controller_profile.json"); + props->SetStringProperty(c, Prop_RegisteredDeviceType_String, right_ ? "droiddeck/hand_right" : "droiddeck/hand_left"); + props->SetInt32Property(c, Prop_ControllerRoleHint_Int32, + right_ ? TrackedControllerRole_RightHand : TrackedControllerRole_LeftHand); + props->SetInt32Property(c, Prop_DeviceClass_Int32, TrackedDeviceClass_Controller); + props->SetInt32Property(c, Prop_ControllerHandSelectionPriority_Int32, 100); + props->SetBoolProperty(c, Prop_DeviceProvidesBatteryStatus_Bool, true); + props->SetBoolProperty(c, Prop_DeviceCanPowerOff_Bool, false); + container_ = c; + pose_.qWorldFromDriverRotation.w = 1; + pose_.qDriverFromHeadRotation.w = 1; + pose_.qRotation.w = 1; + pose_.result = TrackingResult_Uninitialized; + auto in = VRDriverInput(); + const auto boolean = [&](const char *path, VRInputComponentHandle_t *h) { in->CreateBooleanComponent(c, path, h); }; + const auto oneSided = [&](const char *path, VRInputComponentHandle_t *h) { + in->CreateScalarComponent(c, path, h, VRScalarType_Absolute, VRScalarUnits_NormalizedOneSided); + }; + const auto twoSided = [&](const char *path, VRInputComponentHandle_t *h) { + in->CreateScalarComponent(c, path, h, VRScalarType_Absolute, VRScalarUnits_NormalizedTwoSided); + }; + boolean("/input/system/click", &systemClick_); + boolean("/input/system/touch", &systemTouch_); + boolean("/input/a/click", &aClick_); + boolean("/input/a/touch", &aTouch_); + boolean("/input/b/click", &bClick_); + boolean("/input/b/touch", &bTouch_); + boolean("/input/trigger/click", &triggerClick_); + boolean("/input/trigger/touch", &triggerTouch_); + oneSided("/input/trigger/value", &trigger_); + boolean("/input/grip/touch", &gripTouch_); + oneSided("/input/grip/value", &grip_); + oneSided("/input/grip/force", &gripForce_); + twoSided("/input/thumbstick/x", &stickX_); + twoSided("/input/thumbstick/y", &stickY_); + boolean("/input/thumbstick/click", &stickClick_); + boolean("/input/thumbstick/touch", &stickTouch_); + twoSided("/input/trackpad/x", &padX_); + twoSided("/input/trackpad/y", &padY_); + oneSided("/input/trackpad/force", &padForce_); + boolean("/input/trackpad/touch", &padTouch_); + oneSided("/input/finger/index", &fingers_[0]); + oneSided("/input/finger/middle", &fingers_[1]); + oneSided("/input/finger/ring", &fingers_[2]); + oneSided("/input/finger/pinky", &fingers_[3]); + in->CreateSkeletonComponent(c, right_ ? "/input/skeleton/right" : "/input/skeleton/left", + right_ ? "/skeleton/hand/right" : "/skeleton/hand/left", "/pose/raw", + VRSkeletalTracking_Estimated, nullptr, 0, &skeleton_); + in->CreateHapticComponent(c, "/output/haptic", &haptic_); + SendSkeleton(); + id_.store(id, std::memory_order_release); + Log("%s hand activated", right_ ? "right" : "left"); + return VRInitError_None; + } + void Deactivate() override { id_.store(k_unTrackedDeviceIndexInvalid, std::memory_order_release); } + void EnterStandby() override {} + void *GetComponent(const char *) override { return nullptr; } + void DebugRequest(const char *, char *resp, uint32_t size) override { if (size) resp[0] = 0; } + + DriverPose_t GetPose() override { + std::lock_guard<std::mutex> lock(poseMutex_); + return pose_; + } + + void ExpectBare(bool bare) { expectBare_ = bare; } + + VRInputComponentHandle_t Haptic() const { + return id_.load(std::memory_order_acquire) == k_unTrackedDeviceIndexInvalid || bare_.load() ? 0 : haptic_; + } + + void SeeCamera(const Vec3 &fromHead, const Vec3 *joints, int64_t timeNs, bool estimated, int64_t nowNs) { + if (connected_) { + if (!aligning_) kalman_.Measure(timeNs, kHeadPosition + fromHead, estimated ? kEstimatedSigma : kCameraSigma); + } else if (bare_.load()) { + camera_.See(timeNs, kHeadPosition + fromHead, joints, kHeadPosition, nowNs); + } + } + + bool Update(const droiddeck_joycon_hand *hand, bool bare, const HmdQuaternion_t &headPose, int64_t nowNs, + const droiddeck_spatialpose *spatial = nullptr) { + const uint32_t id = id_.load(std::memory_order_acquire); + if (id == k_unTrackedDeviceIndexInvalid) return false; + const auto now = std::chrono::steady_clock::now(); + const double dt = std::min(std::chrono::duration<double>(now - lastUpdate_).count(), 0.1); + lastUpdate_ = now; + if (lumaMode_ != (spatial != nullptr) || (spatial && + (lumaConnection_ != spatial->connection || lumaOrigin_ != spatial->origin))) { + Disconnect(id); + luma_.Reset(); + lumaMode_ = spatial != nullptr; + if (spatial) { lumaConnection_ = spatial->connection; lumaOrigin_ = spatial->origin; } + } + if (spatial && !SpatialFresh(spatial->head, nowNs)) { + if (connected_ && hand) { + luma_.Reset(); + lumaSeen_ = false; + DriverPose_t p = GetPose(); + p.poseIsValid = false; + p.result = TrackingResult_Running_OutOfRange; + p.poseTimeOffset = 0; + std::fill_n(p.vecVelocity, 3, 0.0); + std::fill_n(p.vecAngularVelocity, 3, 0.0); + droiddeck_joycon_hand idle{}; + SendInputs(idle, 1.0); + { + std::lock_guard<std::mutex> lock(poseMutex_); + pose_ = p; + } + VRServerDriverHost()->TrackedDevicePoseUpdated(id, p, sizeof(p)); + } else Disconnect(id); + LeaveBare(id); + return true; + } + if (!hand) { + Disconnect(id); + if (bare) { + UpdateBare(id, nowNs, dt); + return true; + } + LeaveBare(id); + return false; + } + LeaveBare(id); + const Quat head{headPose.w, headPose.x, headPose.y, headPose.z}; + if (spatial) { + double norm = 0; + for (float v : hand->rotation) norm += v * v; + if (!std::isfinite(norm) || norm < 0.5 || norm > 1.5 || + !std::all_of(std::begin(hand->angular_velocity), std::end(hand->angular_velocity), + [](float v) { return std::isfinite(v); })) { + Disconnect(id); + return true; + } + } + const Quat q = Normalize({hand->rotation[0], hand->rotation[1], hand->rotation[2], hand->rotation[3]}); + if (!connected_ || hand->recenter != recenter_) { + recenter_ = hand->recenter; + aligning_ = true; + } + connected_ = true; + double headYaw = 0.0, handYaw = 0.0; + if (aligning_ && Heading(head, &headYaw) && Heading(q, &handYaw)) { + yaw_ = headYaw - handYaw; + aligning_ = false; + arm_.Reset(); + follower_.Reset(); + kalman_.Reset(); + luma_.Reset(); + shown_ = false; + Log("%s Joy-Con facing forward", right_ ? "right" : "left"); + } + const Quat turn = AboutY(yaw_); + const Quat aligned = turn * q; + const Vec3 rate{hand->angular_velocity[0], hand->angular_velocity[1], hand->angular_velocity[2]}; + Vec3 grip, velocity; + if (spatial) { + const auto tracked = luma_.Update(*spatial, aligned, Length(rate), nowNs, dt); + if (!tracked.valid || aligning_) { + Disconnect(id); + return true; + } + grip = tracked.position; + if (!lumaSeen_ || lumaCamera_ != tracked.camera) { + Log("%s Luma Joy-Con position: %s", right_ ? "right" : "left", + tracked.camera ? "stereo hand" : "6DoF arm estimate"); + lumaSeen_ = true; lumaCamera_ = tracked.camera; + } + } else { + const Vec3 palm = arm_.Update(kHeadPosition, head, aligned, Length(rate), dt); + const Vec3 moved = Rotate(turn, {hand->displacement[0], hand->displacement[1], hand->displacement[2]}); + const Vec3 inertial = Rotate(turn, {hand->inertial_velocity[0], hand->inertial_velocity[1], hand->inertial_velocity[2]}); + const bool holding = (hand->buttons & (DROIDDECK_JOYCON_TRIGGER | DROIDDECK_JOYCON_GRIP)) != 0; + kalman_.Input(hand->time_ns - kJoyConDelayNs, inertial, Length(rate)); + const bool camera = kalman_.Ready() && kalman_.TimeNs() - kalman_.SeenNs() <= kCameraHoldNs; + bool switched = false; + if (camera != cameraPlaced_) { + cameraPlaced_ = camera; + switched = true; + Log("%s Joy-Con hand placed by %s", right_ ? "right" : "left", camera ? "the camera" : "the arm model"); + if (!camera && shown_) follower_.Place(shownAt_, moved); + } + const double settle = holding ? kHoldingSettleSeconds : kSettleSeconds; + const Vec3 source = camera ? kalman_.Position() : follower_.Update(palm, moved, dt, settle, kMaxOffset); + velocity = camera ? kalman_.Velocity() : Rotate(turn, {hand->velocity[0], hand->velocity[1], hand->velocity[2]}); + if (shown_ && (switched || Length(source - source_) > kJump)) blend_ = shownAt_ - source; + else if (!shown_) blend_ = Vec3{}; + blend_ = blend_ * std::exp(-dt / kBlendSeconds); + grip = source + blend_; + source_ = source; + shownAt_ = grip; + shown_ = true; + if (FILE *trace = gHandTrace.File()) { + const Vec3 k = kalman_.Ready() ? kalman_.Position() : Vec3{}; + fprintf(trace, "J,%lld,%d,%lld,%.4f,%.4f,%.4f,%.4f,%.4f,%.4f,%d,%.4f,%.4f,%.4f,%.4f,%.4f,%.4f,%.3f,%.4f,%.4f,%.4f,%u,%.4f,%.4f,%.4f,%.4f,%.4f,%.4f,%.4f,%d\n", + (long long)nowNs, right_ ? 1 : 0, (long long)hand->time_ns, moved.x, moved.y, moved.z, palm.x, palm.y, palm.z, + camera ? 1 : 0, k.x, k.y, k.z, grip.x, grip.y, grip.z, Length(rate), velocity.x, velocity.y, velocity.z, + hand->buttons, aligned.w, aligned.x, aligned.y, aligned.z, inertial.x, inertial.y, inertial.z, kalman_.Ready() ? 1 : 0); + } + } + Quat raw; + Vec3 position; + IndexRawPose(right_, aligned, grip, &raw, &position); + const Vec3 spin = Rotate(aligned, rate); + DriverPose_t p = {}; + p.qWorldFromDriverRotation.w = 1; + p.qDriverFromHeadRotation.w = 1; + p.qRotation = {raw.w, raw.x, raw.y, raw.z}; + p.vecPosition[0] = position.x; + p.vecPosition[1] = position.y; + p.vecPosition[2] = position.z; + p.vecVelocity[0] = velocity.x; + p.vecVelocity[1] = velocity.y; + p.vecVelocity[2] = velocity.z; + p.vecAngularVelocity[0] = spin.x; + p.vecAngularVelocity[1] = spin.y; + p.vecAngularVelocity[2] = spin.z; + p.poseTimeOffset = spatial ? 0.0 : -std::max(0.0, (nowNs - hand->time_ns) * 1e-9); + p.willDriftInYaw = true; + p.poseIsValid = true; + p.result = TrackingResult_Running_OK; + p.deviceIsConnected = true; + { + std::lock_guard<std::mutex> lock(poseMutex_); + pose_ = p; + } + VRServerDriverHost()->TrackedDevicePoseUpdated(id, p, sizeof(p)); + SendInputs(*hand, dt); + SendBattery(*hand); + return true; + } + +private: + void UpdateBare(uint32_t id, int64_t nowNs, double dt) { + if (!bare_.load()) { + bare_ = true; + camera_.Reset(); + bareSeen_ = false; + VRProperties()->SetBoolProperty(container_, Prop_DeviceProvidesBatteryStatus_Bool, false); + VRProperties()->SetStringProperty(container_, Prop_RenderModelName_String, RenderModel(true)); + Log("%s hand follows the camera (no controller connected)", right_ ? "right" : "left"); + } + const CameraHandPose hand = camera_.Update(nowNs, dt); + if (hand.visible != bareSeen_) { + bareSeen_ = hand.visible; + Log("%s camera hand %s", right_ ? "right" : "left", hand.visible ? "seen" : "lost"); + } + DriverPose_t p; + { + std::lock_guard<std::mutex> lock(poseMutex_); + p = pose_; + } + p.qWorldFromDriverRotation = {1, 0, 0, 0}; + p.qDriverFromHeadRotation = {1, 0, 0, 0}; + p.deviceIsConnected = true; + p.willDriftInYaw = false; + p.poseTimeOffset = 0.0; + for (int i = 0; i < 3; i++) p.vecAngularVelocity[i] = 0.0; + if (hand.visible) { + p.qRotation = {hand.rotation.w, hand.rotation.x, hand.rotation.y, hand.rotation.z}; + p.vecPosition[0] = hand.position.x; + p.vecPosition[1] = hand.position.y; + p.vecPosition[2] = hand.position.z; + p.vecVelocity[0] = hand.velocity.x; + p.vecVelocity[1] = hand.velocity.y; + p.vecVelocity[2] = hand.velocity.z; + p.poseIsValid = true; + p.result = TrackingResult_Running_OK; + } else { + for (int i = 0; i < 3; i++) p.vecVelocity[i] = 0.0; + p.poseIsValid = false; + p.result = TrackingResult_Running_OutOfRange; + } + { + std::lock_guard<std::mutex> lock(poseMutex_); + pose_ = p; + } + VRServerDriverHost()->TrackedDevicePoseUpdated(id, p, sizeof(p)); + if (FILE *trace = gHandTrace.File()) { + const HandButtons &b = hand.buttons; + fprintf(trace, "B,%lld,%d,%d,%.4f,%.4f,%.4f,%.4f,%.4f,%.4f,%.4f,%.3f,%.3f,%.3f,%.3f,%.3f,%.3f,%.3f,%d%d%d%d%d%d%d,%.4f\n", + (long long)nowNs, right_ ? 1 : 0, hand.visible ? 1 : 0, hand.position.x, hand.position.y, hand.position.z, + hand.rotation.w, hand.rotation.x, hand.rotation.y, hand.rotation.z, hand.curls.thumb, hand.curls.index, + hand.curls.middle, hand.curls.ring, hand.curls.pinky, b.trigger, b.grip, b.triggerClick, b.gripClick, b.a, b.b, + b.system, b.facing, b.triggerTouch, camera_.Rms()); + } + SendBareInputs(hand); + } + + void LeaveBare(uint32_t id) { + if (!bare_.load()) return; + bare_ = false; + camera_.Reset(); + VRProperties()->SetBoolProperty(container_, Prop_DeviceProvidesBatteryStatus_Bool, true); + VRProperties()->SetStringProperty(container_, Prop_RenderModelName_String, RenderModel(false)); + if (!connected_) { + DriverPose_t p = {}; + p.qWorldFromDriverRotation.w = 1; + p.qDriverFromHeadRotation.w = 1; + p.qRotation.w = 1; + p.result = TrackingResult_Uninitialized; + { + std::lock_guard<std::mutex> lock(poseMutex_); + pose_ = p; + } + VRServerDriverHost()->TrackedDevicePoseUpdated(id, p, sizeof(p)); + droiddeck_joycon_hand idle = {}; + SendInputs(idle, 1.0); + } + Log("%s hand no longer follows the camera", right_ ? "right" : "left"); + } + + void SendBareInputs(const CameraHandPose &hand) { + const HandButtons &b = hand.buttons; + SetBool(systemClick_, b.system); + SetBool(systemTouch_, b.system); + SetBool(aClick_, b.a); + SetBool(aTouch_, b.a); + SetBool(bClick_, b.b); + SetBool(bTouch_, b.b); + SetBool(triggerClick_, b.triggerClick); + SetBool(triggerTouch_, b.triggerTouch); + SetScalar(trigger_, b.trigger); + SetBool(gripTouch_, b.grip >= kGripTouch); + SetScalar(grip_, b.grip); + SetScalar(gripForce_, b.gripClick ? 1.0f : 0.0f); + SetScalar(stickX_, 0.0f); + SetScalar(stickY_, 0.0f); + SetBool(stickClick_, false); + SetBool(stickTouch_, false); + SetScalar(padX_, 0.0f); + SetScalar(padY_, 0.0f); + SetScalar(padForce_, 0.0f); + SetBool(padTouch_, false); + if (hand.visible) curls_ = hand.curls; + SetScalar(fingers_[0], (float)curls_.index); + SetScalar(fingers_[1], (float)curls_.middle); + SetScalar(fingers_[2], (float)curls_.ring); + SetScalar(fingers_[3], (float)curls_.pinky); + if (std::chrono::steady_clock::now() - lastSkeleton_ >= kSkeletonPeriod) SendSkeleton(); + } + + const char *RenderModel(bool bare) const { + if (bare) return right_ ? "{droiddeck}droiddeck_hand_right" : "{droiddeck}droiddeck_hand_left"; + return right_ ? "{indexcontroller}valve_controller_knu_1_0_right" : "{indexcontroller}valve_controller_knu_1_0_left"; + } + + void Disconnect(uint32_t id) { + if (!connected_) return; + connected_ = false; + lumaSeen_ = false; + follower_.Reset(); + kalman_.Reset(); + luma_.Reset(); + shown_ = false; + DriverPose_t p = {}; + p.qWorldFromDriverRotation.w = 1; + p.qDriverFromHeadRotation.w = 1; + p.qRotation.w = 1; + p.result = TrackingResult_Uninitialized; + { + std::lock_guard<std::mutex> lock(poseMutex_); + pose_ = p; + } + droiddeck_joycon_hand idle = {}; + SendInputs(idle, 1.0); + VRServerDriverHost()->TrackedDevicePoseUpdated(id, p, sizeof(p)); + Log("%s Joy-Con hand disconnected", right_ ? "right" : "left"); + } + + void SendInputs(const droiddeck_joycon_hand &hand, double dt) { + const uint32_t b = hand.buttons; + const float x = std::clamp(hand.stick[0], -1.0f, 1.0f), y = std::clamp(hand.stick[1], -1.0f, 1.0f); + const bool stickTouched = (b & DROIDDECK_JOYCON_STICK) || x * x + y * y > kStickTouch * kStickTouch; + const bool trigger = b & DROIDDECK_JOYCON_TRIGGER, grip = b & DROIDDECK_JOYCON_GRIP; + const bool thumb = stickTouched || (b & (DROIDDECK_JOYCON_A | DROIDDECK_JOYCON_B | DROIDDECK_JOYCON_SYSTEM)) != 0; + const bool system = b & DROIDDECK_JOYCON_SYSTEM, a = b & DROIDDECK_JOYCON_A, bButton = b & DROIDDECK_JOYCON_B; + SetBool(systemClick_, system); + SetBool(systemTouch_, system); + SetBool(aClick_, a); + SetBool(aTouch_, a); + SetBool(bClick_, bButton); + SetBool(bTouch_, bButton); + SetBool(triggerClick_, trigger); + SetBool(triggerTouch_, trigger); + SetScalar(trigger_, trigger ? 1.0f : 0.0f); + SetBool(gripTouch_, grip); + SetScalar(grip_, grip ? 1.0f : 0.0f); + SetScalar(gripForce_, grip ? 1.0f : 0.0f); + SetScalar(stickX_, x); + SetScalar(stickY_, y); + SetBool(stickClick_, (b & DROIDDECK_JOYCON_STICK) != 0); + SetBool(stickTouch_, stickTouched); + SetScalar(padX_, 0.0f); + SetScalar(padY_, 0.0f); + SetScalar(padForce_, 0.0f); + SetBool(padTouch_, false); + const double follow = 1.0 - std::exp(-dt / kCurlSeconds); + curls_.thumb += ((thumb ? 1.0 : 0.0) - curls_.thumb) * follow; + curls_.index += ((trigger ? 1.0 : 0.0) - curls_.index) * follow; + const double rest = grip ? 1.0 : 0.0; + curls_.middle += (rest - curls_.middle) * follow; + curls_.ring = curls_.pinky = curls_.middle; + SetScalar(fingers_[0], (float)curls_.index); + for (int f = 1; f < 4; f++) SetScalar(fingers_[f], (float)curls_.middle); + const auto now = std::chrono::steady_clock::now(); + if (now - lastSkeleton_ >= kSkeletonPeriod) SendSkeleton(); + } + + void SendSkeleton() { + lastSkeleton_ = std::chrono::steady_clock::now(); + VRBoneTransform_t bones[kHandBones]; + HandSkeleton(right_, curls_, bones); + VRDriverInput()->UpdateSkeletonComponent(skeleton_, VRSkeletalMotionRange_WithController, bones, kHandBones); + VRDriverInput()->UpdateSkeletonComponent(skeleton_, VRSkeletalMotionRange_WithoutController, bones, kHandBones); + } + + void SendBattery(const droiddeck_joycon_hand &hand) { + const bool charging = hand.flags & DROIDDECK_JOYCON_CHARGING; + if (hand.battery >= 0.0f && std::fabs(hand.battery - battery_) > 0.005f) { + battery_ = hand.battery; + VRProperties()->SetFloatProperty(container_, Prop_DeviceBatteryPercentage_Float, std::min(battery_, 1.0f)); + } + if (charging != charging_) { + charging_ = charging; + VRProperties()->SetBoolProperty(container_, Prop_DeviceIsCharging_Bool, charging_); + } + } + + void SetBool(VRInputComponentHandle_t h, bool on) { + auto &last = booleans_[h]; + if (last == (on ? 2 : 1)) return; + last = on ? 2 : 1; + VRDriverInput()->UpdateBooleanComponent(h, on, 0); + } + void SetScalar(VRInputComponentHandle_t h, float value) { + auto it = scalars_.find(h); + if (it != scalars_.end() && it->second == value) return; + scalars_[h] = value; + VRDriverInput()->UpdateScalarComponent(h, value, 0); + } + + static constexpr float kStickTouch = 0.1f, kGripTouch = 0.5f; + static constexpr double kCurlSeconds = 0.05; + static constexpr std::chrono::milliseconds kSkeletonPeriod{11}; + static constexpr Vec3 kHeadPosition{0.0, 1.6, 0.0}; + static constexpr double kSettleSeconds = 0.6, kHoldingSettleSeconds = 1.5, kMaxOffset = 0.35; + static constexpr double kCameraSigma = 0.03, kEstimatedSigma = 0.06, kJump = 0.08, kBlendSeconds = 0.25; + static constexpr int64_t kCameraHoldNs = 750000000, kJoyConDelayNs = 45000000; + const bool right_; + ArmModel arm_; + HandFollower follower_; + HandKalman kalman_; + CameraHand camera_; + LumaJoyConPosition luma_; + bool lumaMode_ = false, lumaSeen_ = false, lumaCamera_ = false; + uint64_t lumaConnection_ = 0, lumaOrigin_ = 0; + std::atomic<bool> bare_{false}, expectBare_{false}; + bool bareSeen_ = false; + Vec3 source_, shownAt_, blend_; + bool shown_ = false; + bool cameraPlaced_ = false; + std::atomic<uint32_t> id_{k_unTrackedDeviceIndexInvalid}; + PropertyContainerHandle_t container_ = k_ulInvalidPropertyContainer; + std::mutex poseMutex_; + DriverPose_t pose_ = {}; + bool connected_ = false, aligning_ = true, charging_ = false; + uint32_t recenter_ = 0; + double yaw_ = 0.0; + float battery_ = -1.0f; + FingerCurls curls_; + std::map<VRInputComponentHandle_t, int> booleans_; + std::map<VRInputComponentHandle_t, float> scalars_; + std::chrono::steady_clock::time_point lastUpdate_ = std::chrono::steady_clock::now(), lastSkeleton_{}; + VRInputComponentHandle_t systemClick_ = 0, systemTouch_ = 0, aClick_ = 0, aTouch_ = 0, bClick_ = 0, bTouch_ = 0, + triggerClick_ = 0, triggerTouch_ = 0, trigger_ = 0, gripTouch_ = 0, grip_ = 0, gripForce_ = 0, + stickX_ = 0, stickY_ = 0, stickClick_ = 0, stickTouch_ = 0, padX_ = 0, padY_ = 0, padForce_ = 0, + padTouch_ = 0, fingers_[4] = {}, skeleton_ = 0, haptic_ = 0; +}; + +class CardboardController : public ITrackedDeviceServerDriver { +public: + explicit CardboardController(bool right) : right_(right) { + pose_.qWorldFromDriverRotation.w = pose_.qDriverFromHeadRotation.w = pose_.qRotation.w = 1; + } + + EVRInitError Activate(uint32_t id) override { + id_ = id; + PropertyContainerHandle_t c = VRProperties()->TrackedDeviceToPropertyContainer(id_); + XrTrackingFile tracking; + DroidDeckXrTracking packet{}; + xrMode_ = tracking.Read(&packet) && XrTrackingFile::Fresh(packet); + VRProperties()->SetStringProperty(c, Prop_ModelNumber_String, xrMode_ ? "DroidDeck Quest Touch" : "DroidDeck Pad Hand"); + VRProperties()->SetStringProperty(c, Prop_ManufacturerName_String, xrMode_ ? "Meta" : "DroidDeck"); + VRProperties()->SetStringProperty(c, Prop_TrackingSystemName_String, "droiddeck"); + VRProperties()->SetStringProperty(c, Prop_RenderModelName_String, xrMode_ ? + (right_ ? "oculus_quest_plus_controller_right" : "oculus_quest_plus_controller_left") : + (right_ ? "{indexcontroller}valve_controller_knu_1_0_right" : "{indexcontroller}valve_controller_knu_1_0_left")); + VRProperties()->SetStringProperty(c, Prop_ControllerType_String, xrMode_ ? "oculus_touch" : "vive_controller"); + VRProperties()->SetStringProperty(c, Prop_InputProfilePath_String, xrMode_ ? + "{oculus}/input/touch_profile.json" : "{htc}/input/vive_controller_profile.json"); + VRProperties()->SetInt32Property(c, Prop_ControllerRoleHint_Int32, + right_ ? TrackedControllerRole_RightHand : TrackedControllerRole_LeftHand); + VRProperties()->SetInt32Property(c, Prop_DeviceClass_Int32, TrackedDeviceClass_Controller); + auto in = VRDriverInput(); + in->CreateBooleanComponent(c, "/input/system/click", &system_); + in->CreateBooleanComponent(c, "/input/application_menu/click", &menu_); + in->CreateBooleanComponent(c, "/input/grip/click", &grip_); + in->CreateBooleanComponent(c, "/input/trigger/click", &triggerClick_); + in->CreateScalarComponent(c, "/input/trigger/value", &trigger_, VRScalarType_Absolute, VRScalarUnits_NormalizedOneSided); + in->CreateScalarComponent(c, xrMode_ ? "/input/joystick/x" : "/input/trackpad/x", &padX_, VRScalarType_Absolute, VRScalarUnits_NormalizedTwoSided); + in->CreateScalarComponent(c, xrMode_ ? "/input/joystick/y" : "/input/trackpad/y", &padY_, VRScalarType_Absolute, VRScalarUnits_NormalizedTwoSided); + in->CreateBooleanComponent(c, xrMode_ ? "/input/joystick/click" : "/input/trackpad/click", &padClick_); + in->CreateBooleanComponent(c, xrMode_ ? "/input/joystick/touch" : "/input/trackpad/touch", &padTouch_); + if (xrMode_) { + in->CreateScalarComponent(c, "/input/grip/value", &gripValue_, VRScalarType_Absolute, VRScalarUnits_NormalizedOneSided); + in->CreateBooleanComponent(c, "/input/trigger/touch", &triggerTouch_); + in->CreateBooleanComponent(c, right_ ? "/input/a/click" : "/input/x/click", &primaryClick_); + in->CreateBooleanComponent(c, right_ ? "/input/b/click" : "/input/y/click", &secondaryClick_); + in->CreateBooleanComponent(c, right_ ? "/input/a/touch" : "/input/x/touch", &primaryTouch_); + in->CreateBooleanComponent(c, right_ ? "/input/b/touch" : "/input/y/touch", &secondaryTouch_); + in->CreateBooleanComponent(c, "/input/thumbrest/touch", &thumbrestTouch_); + } + in->CreateHapticComponent(c, "/output/haptic", &haptic_); + Log("%s hand activated (%s)", right_ ? "right" : "left", xrMode_ ? "Quest Touch" : "game pad"); + return VRInitError_None; + } + void Deactivate() override { ClearInputs(); id_ = k_unTrackedDeviceIndexInvalid; } + void EnterStandby() override {} + void *GetComponent(const char *) override { return nullptr; } + void DebugRequest(const char *, char *resp, uint32_t size) override { if (size) resp[0] = 0; } + + DriverPose_t GetPose() override { return pose_; } + + void ClearInputs() { + const bool optical = opticalActive_; + opticalInputs_.Reset(); + opticalPose_.Reset(); + steadyHandAim_ = false; + opticalActive_ = false; + lastOpticalState_ = ~0u; + if (id_ == k_unTrackedDeviceIndexInvalid) return; + auto in = VRDriverInput(); + EVRInputError error = VRInputError_None; + for (VRInputComponentHandle_t h : {system_, menu_, grip_, triggerClick_, padClick_, padTouch_}) { + const auto result = in->UpdateBooleanComponent(h, false, 0); + if (result != VRInputError_None) error = result; + } + for (VRInputComponentHandle_t h : {trigger_, padX_, padY_}) { + const auto result = in->UpdateScalarComponent(h, 0.0f, 0); + if (result != VRInputError_None) error = result; + } + if (optical || error != VRInputError_None) + Log("%s controller inputs cleared: error=%d", right_ ? "right" : "left", int(error)); + } + + void UpdateXr(const DroidDeckXrHand &hand, int64_t predicted) { + if (id_ == k_unTrackedDeviceIndexInvalid) return; + DriverPose_t pose{}; + pose.qWorldFromDriverRotation.w = pose.qDriverFromHeadRotation.w = 1; + pose.qRotation.w = 1; + pose.deviceIsConnected = hand.active; + pose.poseIsValid = hand.active && XrTrackingFile::Tracked(hand.pose); + if (pose.poseIsValid) { + pose.qRotation = {hand.pose.orientation[3], hand.pose.orientation[0], hand.pose.orientation[1], hand.pose.orientation[2]}; + for (int axis = 0; axis < 3; axis++) pose.vecPosition[axis] = hand.pose.position[axis]; + pose.poseTimeOffset = XrTrackingFile::PoseTimeOffset(predicted, XrTrackingFile::Now()); + } + pose.result = pose.poseIsValid ? TrackingResult_Running_OK : TrackingResult_Running_OutOfRange; + pose_ = pose; + VRServerDriverHost()->TrackedDevicePoseUpdated(id_, pose, sizeof(pose)); + XrTouchInput input = xr_touch_input(hand, right_); + auto driverInput = VRDriverInput(); + driverInput->UpdateScalarComponent(trigger_, input.trigger, 0); + driverInput->UpdateBooleanComponent(triggerClick_, input.triggerClick, 0); + driverInput->UpdateBooleanComponent(grip_, input.gripClick, 0); + driverInput->UpdateScalarComponent(padX_, input.stickX, 0); + driverInput->UpdateScalarComponent(padY_, input.stickY, 0); + driverInput->UpdateBooleanComponent(padClick_, input.stickClick, 0); + driverInput->UpdateBooleanComponent(padTouch_, input.stickTouch, 0); + driverInput->UpdateBooleanComponent(menu_, false, 0); + driverInput->UpdateBooleanComponent(system_, input.systemClick, 0); + if (xrMode_) { + driverInput->UpdateScalarComponent(gripValue_, input.grip, 0); + driverInput->UpdateBooleanComponent(triggerTouch_, input.triggerTouch, 0); + driverInput->UpdateBooleanComponent(primaryClick_, input.primaryClick, 0); + driverInput->UpdateBooleanComponent(secondaryClick_, input.secondaryClick, 0); + driverInput->UpdateBooleanComponent(primaryTouch_, input.primaryTouch, 0); + driverInput->UpdateBooleanComponent(secondaryTouch_, input.secondaryTouch, 0); + driverInput->UpdateBooleanComponent(thumbrestTouch_, input.thumbrestTouch, 0); + } + } + + VRInputComponentHandle_t Haptic() const { return id_ == k_unTrackedDeviceIndexInvalid ? 0 : haptic_; } + bool XrMode() const { return xrMode_; } + + void Disconnect() { + ClearInputs(); + if (id_ == k_unTrackedDeviceIndexInvalid) return; + DriverPose_t p = {}; + p.qWorldFromDriverRotation.w = 1; + p.qDriverFromHeadRotation.w = 1; + p.qRotation.w = 1; + p.result = TrackingResult_Uninitialized; + pose_ = p; + VRServerDriverHost()->TrackedDevicePoseUpdated(id_, p, sizeof(p)); + } + + void UpdateOptical(const dd_spatial_hand &hand, bool headValid, const PadState *pad, int64_t now, + uint64_t connection, uint64_t origin, uint16_t inputEpochs = 0, + const dd_spatial_pose *aimHead = nullptr) { + if (id_ == k_unTrackedDeviceIndexInvalid) return; + opticalActive_ = true; + const bool inputValid = opticalInputs_.Update(hand, headValid, now, connection, origin, inputEpochs); + if (steadyHandAim_ != (aimHead != nullptr)) { + opticalPose_.Reset(); + steadyHandAim_ = aimHead != nullptr; + } + auto visualHand = hand; + if (aimHead && headValid && SpatialFresh(*aimHead, now) && SpatialHandFresh(hand, now)) { + const auto &h = *aimHead; + const auto &p = hand.pose; + const auto q = droiddeck::ShoulderAim({h.position[0], h.position[1], h.position[2]}, + {h.rotation[3], h.rotation[0], h.rotation[1], h.rotation[2]}, + {p.position[0], p.position[1], p.position[2]}, right_, + {p.rotation[3], p.rotation[0], p.rotation[1], p.rotation[2]}); + visualHand.pose.rotation[0] = q.x; visualHand.pose.rotation[1] = q.y; + visualHand.pose.rotation[2] = q.z; visualHand.pose.rotation[3] = q.w; + } + const bool valid = opticalPose_.Update(visualHand, headValid, now, connection, origin); + DriverPose_t p{}; + p.qWorldFromDriverRotation.w = p.qDriverFromHeadRotation.w = p.qRotation.w = 1; + if (valid) { + const auto &observed = opticalPose_.rendered; + p.qRotation = {observed.rotation[3], observed.rotation[0], observed.rotation[1], observed.rotation[2]}; + for (int i=0; i<3; ++i) p.vecPosition[i] = observed.position[i]; + p.poseTimeOffset = double(observed.time_ns-now)/1e9; + } + p.deviceIsConnected = true; p.poseIsValid = valid; + p.result = valid ? TrackingResult_Running_OK : TrackingResult_Running_OutOfRange; + auto in = VRDriverInput(); + const uint32_t b = pad ? pad->buttons : 0; + in->UpdateBooleanComponent(system_, right_ && (b & PAD_GUIDE), 0); + in->UpdateBooleanComponent(menu_, (b & (right_ ? PAD_START : PAD_SELECT)) != 0, 0); + const auto gripError = in->UpdateBooleanComponent(grip_, opticalInputs_.grip, 0); + const auto clickError = in->UpdateBooleanComponent(triggerClick_, opticalInputs_.click, 0); + const auto triggerError = in->UpdateScalarComponent(trigger_, opticalInputs_.trigger, 0); + const float x = pad ? pad->axes[right_ ? 2 : 0]/32767.0f : 0; + const float y = pad ? -pad->axes[right_ ? 3 : 1]/32767.0f : 0; + in->UpdateScalarComponent(padX_, x, 0); in->UpdateScalarComponent(padY_, y, 0); + in->UpdateBooleanComponent(padTouch_, x*x+y*y > 0.01f || (b & (right_ ? PAD_A : PAD_X)), 0); + in->UpdateBooleanComponent(padClick_, (b & (right_ ? (PAD_A|PAD_R3) : PAD_X)) != 0, 0); + LogOpticalInputs(hand, inputValid, valid, now, connection, origin, inputEpochs, gripError, clickError, triggerError); + pose_ = p; + VRServerDriverHost()->TrackedDevicePoseUpdated(id_, p, sizeof(p)); + } + + static constexpr float kReachSpeed = 0.6f, kReachMin = -0.2f, kReachMax = 1.0f; + + static bool Grabbing(const PadState &pad, bool right) { + return pad.axes[right ? 4 : 5] > kGrabTrigger || (pad.buttons & (right ? PAD_RB : PAD_LB)); + } + + void Update(const DriverPose_t &headPose, const PadState *pad, bool sticksMoveHands, float reach) { + const auto &head = headPose.qRotation; + if (id_ == k_unTrackedDeviceIndexInvalid) return; + if (opticalActive_) ClearInputs(); + const auto now = std::chrono::steady_clock::now(); + const float dt = std::min(std::chrono::duration<float>(now - lastUpdate_).count(), 0.1f); + lastUpdate_ = now; + const float follow = 1.0f - std::exp(-dt / kHandSmoothing); + const bool grab = pad && Grabbing(*pad, right_); + if (grab && pad->axes[7]) pull_ = std::clamp(pull_ - (pad->axes[7] > 0 ? 1.0f : -1.0f) * kReachSpeed * dt, kReachMin - reach, kReachMax - reach); + else if (!grab) pull_ -= pull_ * follow; + const float stickX = pad ? pad->axes[right_ ? 2 : 0] / 32767.0f : 0.0f, stickY = pad ? -pad->axes[right_ ? 3 : 1] / 32767.0f : 0.0f; + float aimX = 0.0f, aimY = 0.0f; + const float tilt = std::sqrt(stickX * stickX + stickY * stickY); + if (sticksMoveHands && tilt > kStickDeadzone) { + const float scale = std::min((tilt - kStickDeadzone) / (1.0f - kStickDeadzone), 1.0f) / tilt; + aimX = stickX * scale; + aimY = stickY * scale; + } + handX_ += (aimX * kHandRangeX - handX_) * follow; + handY_ += (aimY * (aimY > 0.0f ? kHandRangeUp : kHandRangeDown) - handY_) * follow; + DriverPose_t p = {}; + p.qWorldFromDriverRotation.w = 1; + p.qDriverFromHeadRotation.w = 1; + const double yaw = std::atan2(-handX_, kHandPivot) / 2, pitch = std::atan2(handY_, std::hypot(kHandPivot, handX_)) / 2; + const double cy = std::cos(yaw), sy = std::sin(yaw), cp = std::cos(pitch), sp = std::sin(pitch); + const double lw = cy * cp, lx = cy * sp, ly = sy * cp, lz = -sy * sp; + p.qRotation.w = head.w * lw - head.x * lx - head.y * ly - head.z * lz; + p.qRotation.x = head.w * lx + head.x * lw + head.y * lz - head.z * ly; + p.qRotation.y = head.w * ly - head.x * lz + head.y * lw + head.z * lx; + p.qRotation.z = head.w * lz + head.x * ly - head.y * lx + head.z * lw; + const double off[3] = {(right_ ? 0.18 : -0.18) + handX_, -0.25 + handY_, -0.35 - reach - pull_}; + double m[3][3]; + const double w = head.w, x = head.x, y = head.y, z = head.z; + m[0][0] = 1 - 2 * (y * y + z * z); m[0][1] = 2 * (x * y - z * w); m[0][2] = 2 * (x * z + y * w); + m[1][0] = 2 * (x * y + z * w); m[1][1] = 1 - 2 * (x * x + z * z); m[1][2] = 2 * (y * z - x * w); + m[2][0] = 2 * (x * z - y * w); m[2][1] = 2 * (y * z + x * w); m[2][2] = 1 - 2 * (x * x + y * y); + for (int i = 0; i < 3; i++) p.vecPosition[i] = headPose.vecPosition[i] + m[i][0] * off[0] + m[i][1] * off[1] + m[i][2] * off[2]; + p.poseIsValid = true; + p.result = TrackingResult_Running_OK; + p.deviceIsConnected = true; + pose_ = p; + VRServerDriverHost()->TrackedDevicePoseUpdated(id_, p, sizeof(p)); + if (!pad) return; + auto in = VRDriverInput(); + const uint32_t b = pad->buttons; + const float trig = pad->axes[right_ ? 4 : 5] / 255.0f; + const bool touch = !sticksMoveHands && stickX * stickX + stickY * stickY > 0.01f; + in->UpdateBooleanComponent(system_, right_ && (b & PAD_GUIDE), 0); + in->UpdateBooleanComponent(menu_, (b & (right_ ? PAD_START : PAD_SELECT)) != 0, 0); + in->UpdateBooleanComponent(grip_, (b & (right_ ? PAD_RB : PAD_LB)) != 0, 0); + in->UpdateScalarComponent(trigger_, trig, 0); + in->UpdateBooleanComponent(triggerClick_, trig > 0.6f, 0); + in->UpdateScalarComponent(padX_, touch ? stickX : 0.0f, 0); + in->UpdateScalarComponent(padY_, touch ? stickY : 0.0f, 0); + in->UpdateBooleanComponent(padTouch_, touch || (b & (right_ ? PAD_A : PAD_X)), 0); + in->UpdateBooleanComponent(padClick_, (b & (right_ ? (PAD_A | PAD_R3) : PAD_X)) != 0, 0); + } + +private: + void LogOpticalInputs(const dd_spatial_hand &hand, bool inputValid, bool poseValid, int64_t now, + uint64_t connection, uint64_t origin, uint16_t inputEpochs, EVRInputError gripError, + EVRInputError clickError, EVRInputError triggerError) { + const uint32_t triggerBand = !std::isfinite(hand.trigger) ? 3 : hand.trigger < .25f ? 0 : hand.trigger > .65f ? 2 : 1; + const uint32_t state = uint32_t(poseValid) | uint32_t(inputValid)<<1 | uint32_t(opticalInputs_.click)<<2 | + uint32_t(opticalInputs_.grip)<<3 | uint32_t(opticalInputs_.armed)<<4 | uint32_t(opticalInputs_.gripArmed)<<5 | + (hand.pose.flags & 7u)<<6 | triggerBand<<9 | uint32_t(hand.grip != 0)<<11; + const int errors[] = {int(gripError),int(clickError),int(triggerError)}; + if (state == lastOpticalState_ && connection == lastOpticalConnection_ && origin == lastOpticalOrigin_ && + inputEpochs == lastOpticalEpochs_ && + std::equal(errors,errors+3,lastOpticalErrors_)) return; + lastOpticalState_ = state; lastOpticalConnection_ = connection; lastOpticalOrigin_ = origin; + lastOpticalEpochs_ = inputEpochs; + std::copy_n(errors,3,lastOpticalErrors_); + Log("%s optical input pose=%d input=%d flags=%u raw=%.3f/%u out=%.3f/%d/%d armed=%d/%d error=%d/%d/%d ageMs=%.1f connection=%llu origin=%llu epochs=%u/%u", + right_ ? "right" : "left", int(poseValid), int(inputValid), hand.pose.flags, double(hand.trigger), hand.grip, + double(opticalInputs_.trigger), int(opticalInputs_.click), int(opticalInputs_.grip), + int(opticalInputs_.armed), int(opticalInputs_.gripArmed), errors[0], errors[1], errors[2], + hand.pose.time_ns > 0 ? double(now-hand.pose.time_ns)/1e6 : -1., + static_cast<unsigned long long>(connection), static_cast<unsigned long long>(origin), + unsigned(inputEpochs & 255), unsigned(inputEpochs >> 8)); + } + OpticalInputs opticalInputs_; + OpticalPose opticalPose_; + bool steadyHandAim_ = false; + bool opticalActive_ = false; + uint32_t lastOpticalState_ = ~0u; + uint64_t lastOpticalConnection_ = 0, lastOpticalOrigin_ = 0; + uint16_t lastOpticalEpochs_ = 0; + int lastOpticalErrors_[3]{}; + static constexpr int16_t kGrabTrigger = 153; + static constexpr float kStickDeadzone = 0.12f, kHandRangeX = 0.40f, kHandRangeUp = 0.50f, kHandRangeDown = 0.30f, kHandSmoothing = 0.05f, kHandPivot = 0.45f; + bool right_; + bool xrMode_ = false; + uint32_t id_ = k_unTrackedDeviceIndexInvalid; + DriverPose_t pose_ = {}; + float pull_ = 0.0f, handX_ = 0.0f, handY_ = 0.0f; + std::chrono::steady_clock::time_point lastUpdate_ = std::chrono::steady_clock::now(); + VRInputComponentHandle_t system_ = 0, menu_ = 0, grip_ = 0, triggerClick_ = 0, trigger_ = 0, padX_ = 0, padY_ = 0, + padClick_ = 0, padTouch_ = 0, haptic_ = 0; + VRInputComponentHandle_t gripValue_ = 0, triggerTouch_ = 0, primaryClick_ = 0, secondaryClick_ = 0, + primaryTouch_ = 0, secondaryTouch_ = 0, thumbrestTouch_ = 0; +}; + +class CardboardHmd : public ITrackedDeviceServerDriver, public IVRDisplayComponent { +public: + EVRInitError Activate(uint32_t unObjectId) override { + id_ = unObjectId; + PropertyContainerHandle_t c = VRProperties()->TrackedDeviceToPropertyContainer(id_); + container_ = c; + width_ = VRSettings()->GetInt32(kSettingsSection, "windowWidth"); + height_ = VRSettings()->GetInt32(kSettingsSection, "windowHeight"); + if (width_ <= 0) width_ = 1920; + if (height_ <= 0) height_ = 1080; + float hz = VRSettings()->GetFloat(kSettingsSection, "displayFrequency"); + if (hz <= 0.0f) hz = 60.0f; + DroidDeckXrTracking xr; + xrMode_ = xr_.Read(&xr) && XrTrackingFile::Fresh(xr); + if (xrMode_) { + width_ = xr.eyes[0].width * 2; height_ = xr.eyes[0].height; + hz = 1000000000.f / xr.period_ns; + } + tanHalf_ = 1.0f; + eyeAspect_ = (width_ * 0.5f) / height_; + droiddeck_headpose hp; + if (pose_.Read(&hp) && hp.tan_half_fov > 0.0f) { + tanHalf_ = hp.tan_half_fov; + if (hp.eye_aspect > 0.0f) eyeAspect_ = hp.eye_aspect; + sentMono_ = (hp.flags & DROIDDECK_HEADPOSE_MONO) != 0; + renderHeight_ = hp.render_height; + panelHeight_ = hp.eye_h; + } + if (!xrMode_ && pose_.Read(&hp) && hp.display_hz >= 24.0f) hz = hp.display_hz; + Vsync::SetRate(hz); + sentHz_ = hz; + sentTan_ = tanHalf_; + sentAspect_ = eyeAspect_; + VRProperties()->SetStringProperty(c, Prop_ModelNumber_String, xrMode_ ? "DroidDeck Quest OpenXR" : "DroidDeck Cardboard"); + VRProperties()->SetStringProperty(c, Prop_ManufacturerName_String, "DroidDeck"); + VRProperties()->SetStringProperty(c, Prop_TrackingSystemName_String, "droiddeck"); + VRProperties()->SetFloatProperty(c, Prop_UserIpdMeters_Float, 0.064f); + if (xrMode_) { + VRServerDriverHost()->SetDisplayEyeToHead(id_, XrEyeToHead(xr.head, xr.eyes[0].pose), XrEyeToHead(xr.head, xr.eyes[1].pose)); + dm_.ConfigureXr(xr); + float distanceSquared = 0; + for (int axis = 0; axis < 3; axis++) { + float difference = xr.eyes[0].pose.position[axis] - xr.eyes[1].pose.position[axis]; + distanceSquared += difference * difference; + } + VRProperties()->SetFloatProperty(c, Prop_UserIpdMeters_Float, std::sqrt(distanceSquared)); + } + VRProperties()->SetFloatProperty(c, Prop_UserHeadToEyeDepthMeters_Float, 0.0f); + VRProperties()->SetFloatProperty(c, Prop_DisplayFrequency_Float, hz); + VRProperties()->SetFloatProperty(c, Prop_SecondsFromVsyncToPhotons_Float, 0.011f); + VRProperties()->SetUint64Property(c, Prop_CurrentUniverseId_Uint64, 2); + chaperone_.Reset(); + if (xrMode_) PublishChaperone(xr); + VRProperties()->SetBoolProperty(c, Prop_IsOnDesktop_Bool, false); + VRProperties()->SetBoolProperty(c, Prop_DisplayDebugMode_Bool, false); + directMode_ = VRSettings()->GetBool(kSettingsSection, "directMode"); + const char *presentation = std::getenv("DROIDDECK_VR_PRESENT"); + if (xrMode_ && presentation && !std::strcmp(presentation, "questwsi")) directMode_ = false; + VRProperties()->SetBoolProperty(c, Prop_HasDriverDirectModeComponent_Bool, directMode_); + if (directMode_) { + VRProperties()->SetBoolProperty(c, Prop_DriverDirectModeSendsVsyncEvents_Bool, true); + VRProperties()->SetBoolProperty(c, Prop_Hmd_AllowsClientToControlTextureIndex, true); + } + VRProperties()->SetBoolProperty(c, Prop_HasDisplayComponent_Bool, true); + virtualDisplay_ = VRSettings()->GetBool(kSettingsSection, "virtualDisplay"); + VRProperties()->SetBoolProperty(c, Prop_HasVirtualDisplayComponent_Bool, virtualDisplay_); + VRProperties()->SetBoolProperty(c, Prop_ContainsProximitySensor_Bool, true); + VRDriverInput()->CreateBooleanComponent(c, "/proximity", &proximity_); + VRDriverInput()->UpdateBooleanComponent(proximity_, true, 0); + Log("HMD activated: %dx%d at %.0f Hz, eye tan(half fov) %.3f, eye aspect %.3f", width_, height_, hz, tanHalf_.load(), eyeAspect_.load()); + uint32_t renderW, renderH; + GetRecommendedRenderTargetSize(&renderW, &renderH); + Log("recommended render target: %ux%u per eye (selected height %u)", renderW, renderH, renderHeight_.load()); + + running_ = true; + thread_ = std::thread([this] { PoseLoop(); }); + if (directMode_) Vsync::Start(); + return VRInitError_None; + } + + bool Running() const { return running_; } + + void Deactivate() override { + Vsync::Stop(); + droiddeck::Presenter::Shutdown(); + running_ = false; + if (thread_.joinable()) thread_.join(); + id_ = k_unTrackedDeviceIndexInvalid; + } + + void EnterStandby() override {} + + void *GetComponent(const char *name) override { + Log("component asked for: %s", name); + if (!strncmp(name, "IVRDisplayComponent_", 20)) return static_cast<IVRDisplayComponent *>(this); + if (virtualDisplay_ && !strcmp(name, IVRVirtualDisplay_Version)) return static_cast<IVRVirtualDisplay *>(&vd_); + if (directMode_ && !strncmp(name, "IVRDriverDirectModeComponent_", 29)) return static_cast<IVRDriverDirectModeComponent *>(&dm_); + return nullptr; + } + + void DebugRequest(const char *, char *resp, uint32_t size) override { if (size) resp[0] = 0; } + + DriverPose_t GetPose() override { return GetPose(nullptr); } + + DriverPose_t GetPose(droiddeck_spatialpose *snapshot) { + std::lock_guard<std::mutex> lock(spatialMutex_); + DriverPose_t p = {}; + p.qWorldFromDriverRotation.w = 1; + p.qDriverFromHeadRotation.w = 1; + p.qRotation.w = 1; + DroidDeckXrTracking xr; + bool freshXr = xr_.Read(&xr) && XrTrackingFile::Fresh(xr); + if (freshXr || xrMode_) { + p.deviceIsConnected = true; + p.poseIsValid = freshXr && XrTrackingFile::Tracked(xr.head); + p.result = p.poseIsValid ? TrackingResult_Running_OK : TrackingResult_Running_OutOfRange; + if (p.poseIsValid) { + p.qRotation = {xr.head.orientation[3], xr.head.orientation[0], xr.head.orientation[1], xr.head.orientation[2]}; + for (int axis = 0; axis < 3; axis++) p.vecPosition[axis] = xr.head.position[axis]; + p.poseTimeOffset = XrTrackingFile::PoseTimeOffset(xr.predicted_ns, XrTrackingFile::Now()); + } + return p; + } + p.vecPosition[1] = 1.6; + droiddeck_headpose hp; + bool ok = pose_.Read(&hp); + if (ok) { + p.qRotation = QuatFromMatrix(hp.rot); + p.poseTimeOffset = 0; + if (hp.tan_half_fov > 0.0f) tanHalf_ = hp.tan_half_fov; + if (hp.eye_aspect > 0.0f) eyeAspect_ = hp.eye_aspect; + } + p.poseIsValid = true; + p.result = TrackingResult_Running_OK; + p.deviceIsConnected = true; + droiddeck_spatialpose spatial{}; + const bool spatialRead = spatial_.Read(&spatial); + if (spatialRead) lastSpatialSnapshot_ = spatial; + else { + spatial = lastSpatialSnapshot_; + spatial.head.flags = 0; + for (auto &hand : spatial.hands) hand.pose.flags = 0; + } + if (snapshot) *snapshot = spatial; + if (spatial.flags & DD_SPATIAL_ACTIVE) { + if (SpatialFresh(spatial.head, SpatialNow())) { + for (int i=0; i<3; ++i) p.vecPosition[i] = spatial.head.position[i]; + p.qRotation = {spatial.head.rotation[3], spatial.head.rotation[0], spatial.head.rotation[1], spatial.head.rotation[2]}; + lastSpatial_ = p; + } else { + if (lastSpatial_.deviceIsConnected) p = lastSpatial_; + p.poseIsValid = false; + p.result = TrackingResult_Running_OutOfRange; + } + } + return p; + } + + void GetWindowBounds(int32_t *x, int32_t *y, uint32_t *w, uint32_t *h) override { + *x = 0; *y = 0; *w = (uint32_t)width_; *h = (uint32_t)height_; + } + bool IsDisplayOnDesktop() override { return !directMode_; } + bool IsDisplayRealDisplay() override { return false; } + void GetRecommendedRenderTargetSize(uint32_t *w, uint32_t *h) override { + if (xrMode_) { *w = width_ / 2; *h = height_; return; } + const auto size = droiddeck::RenderTarget(eyeAspect_, renderHeight_, panelHeight_); + *w = size.width; + *h = size.height; + } + void GetEyeOutputViewport(EVREye eye, uint32_t *x, uint32_t *y, uint32_t *w, uint32_t *h) override { + *y = 0; *w = (uint32_t)width_ / 2; *h = (uint32_t)height_; + *x = eye == Eye_Left ? 0 : (uint32_t)width_ / 2; + } + void GetProjectionRaw(EVREye eye, float *left, float *right, float *top, float *bottom) override { + DroidDeckXrTracking xr; + if (xrMode_ && xr_.Read(&xr) && XrTrackingFile::Fresh(xr)) { + const float *fov = xr.eyes[eye == Eye_Right ? 1 : 0].fov; + xr_frame_projection_raw(fov, left, right, top, bottom); + return; + } + *left = -tanHalf_ * eyeAspect_; *right = tanHalf_ * eyeAspect_; + *top = -tanHalf_; *bottom = tanHalf_; + } + DistortionCoordinates_t ComputeDistortion(EVREye, float u, float v) override { + DistortionCoordinates_t d; + d.rfRed[0] = d.rfGreen[0] = d.rfBlue[0] = u; + d.rfRed[1] = d.rfGreen[1] = d.rfBlue[1] = v; + return d; + } + bool ComputeInverseDistortion(HmdVector2_t *result, EVREye, uint32_t, float u, float v) override { + result->v[0] = u; result->v[1] = v; + return true; + } + +private: + void UpdateEye(const droiddeck_headpose &hp) { + sentTan_ = tanHalf_ = hp.tan_half_fov; + sentAspect_ = eyeAspect_ = hp.eye_aspect; + sentMono_ = (hp.flags & DROIDDECK_HEADPOSE_MONO) != 0; + renderHeight_ = hp.render_height; + panelHeight_ = hp.eye_h; + HmdRect2_t r; + r.vTopLeft.v[0] = -tanHalf_ * eyeAspect_; + r.vTopLeft.v[1] = -tanHalf_; + r.vBottomRight.v[0] = tanHalf_ * eyeAspect_; + r.vBottomRight.v[1] = tanHalf_; + VRServerDriverHost()->SetDisplayProjectionRaw(id_, r, r); + uint32_t w = 0, h = 0; + GetRecommendedRenderTargetSize(&w, &h); + VRServerDriverHost()->SetRecommendedRenderTargetSize(id_, w, h); + VRServerDriverHost()->VendorSpecificEvent(id_, VREvent_LensDistortionChanged, VREvent_Data_t{}, 0.0); + Log("eye now tan(half fov) %.3f, aspect %.3f (%ux%u eye%s), render %ux%u", tanHalf_.load(), eyeAspect_.load(), hp.eye_w, hp.eye_h, + (hp.flags & DROIDDECK_HEADPOSE_MONO) ? ", one eye shown" : "", w, h); + } + + void UpdateRate(float hz) { + sentHz_ = hz; + Vsync::SetRate(hz); + VRProperties()->SetFloatProperty(container_, Prop_DisplayFrequency_Float, hz); + Log("panel now %.0f Hz", hz); + } + + void PublishChaperone(const DroidDeckXrTracking &tracking) { + chaperone_.Update(tracking, [this](const DroidDeckXrPose &head) { + char timestamp[32]; + std::time_t now = std::time(nullptr); std::tm utc{}; gmtime_r(&now, &utc); + std::strftime(timestamp, sizeof(timestamp), "%Y-%m-%dT%H:%M:%SZ", &utc); + const auto json = xr_chaperone_json(head, timestamp); + const auto container = VRProperties()->TrackedDeviceToPropertyContainer(id_); + return VRProperties()->SetStringProperty(container, Prop_DriverProvidedChaperoneJson_String, json.c_str()) == TrackedProp_Success; + }); + } + void PoseLoop() { + uint32_t lastSeq = 0; + droiddeck_joycon joyCons = {}; + bool haveJoyCons = false; + auto lastSent = std::chrono::steady_clock::now(); + while (running_) { + DroidDeckXrTracking xr; + if (xrMode_) { + bool fresh = xr_.Read(&xr) && XrTrackingFile::Fresh(xr); + if (fresh) PublishChaperone(xr); + DriverPose_t head = GetPose(); + VRServerDriverHost()->TrackedDevicePoseUpdated(id_, head, sizeof(head)); + for (int hand = 0; hand < 2; hand++) if (hands_[hand]) { + DroidDeckXrHand state = fresh ? xr.hands[hand] : DroidDeckXrHand{}; + hands_[hand]->UpdateXr(state, fresh ? xr.predicted_ns : 0); + } + VRDriverInput()->UpdateBooleanComponent(proximity_, fresh, 0); + std::this_thread::sleep_for(std::chrono::milliseconds(2)); + continue; + } + droiddeck_headpose hp; + bool fresh = pose_.Read(&hp) && hp.seq != lastSeq; + auto now = std::chrono::steady_clock::now(); + PadState pad; + const bool havePad = pad_.Read(&pad); + const bool padChanged = havePad && (pad.buttons != lastPad_.buttons || memcmp(pad.axes, lastPad_.axes, sizeof(pad.axes))); + droiddeck_joycon read; + if (joyConFile_.Read(&read)) { + joyCons = read; + haveJoyCons = true; + } + const bool joyConsChanged = haveJoyCons && joyCons.seq != lastJoyConSeq_; + if ((fresh || padChanged || joyConsChanged || now - lastSent > std::chrono::milliseconds(10)) && id_ != k_unTrackedDeviceIndexInvalid) { + if (joyConsChanged) lastJoyConSeq_ = joyCons.seq; + if (fresh) { + lastSeq = hp.seq; + if (hp.eye_w > 0 && hp.tan_half_fov > 0.0f && hp.eye_aspect > 0.0f && + (fabsf(hp.tan_half_fov - sentTan_) > 1e-3f || fabsf(hp.eye_aspect - sentAspect_) > 1e-3f || + ((hp.flags & DROIDDECK_HEADPOSE_MONO) != 0) != sentMono_ || + hp.render_height != renderHeight_ || hp.eye_h != panelHeight_)) + UpdateEye(hp); + if (hp.display_hz >= 24.0f && fabsf(hp.display_hz - sentHz_) > 0.5f) UpdateRate(hp.display_hz); + const bool worn = (hp.flags & DROIDDECK_HEADPOSE_ENABLED) != 0; + if (worn != worn_) { + worn_ = worn; + VRDriverInput()->UpdateBooleanComponent(proximity_, worn, 0); + Log("headset %s (Cardboard mode %s)", worn ? "worn" : "taken off", worn ? "on" : "off"); + } + } + droiddeck_spatialpose spatial{}; + DriverPose_t head = GetPose(&spatial); + VRServerDriverHost()->TrackedDevicePoseUpdated(id_, head, sizeof(DriverPose_t)); + const bool lumaJoyCons = (spatial.flags & DD_SPATIAL_ACTIVE) && (spatial.flags & DD_SPATIAL_JOYCONS); + const bool optical = !lumaJoyCons && (spatial.flags & DD_SPATIAL_ACTIVE) && (spatial.flags & DD_SPATIAL_HANDS); + if (!optical && havePad && (pad.buttons & PAD_L3) && !(lastPad_.buttons & PAD_L3)) { + sticksMoveHands_ = !sticksMoveHands_; + Log("sticks now move %s", sticksMoveHands_ ? "the hands" : "in the game"); + } + const float dt = std::min(std::chrono::duration<float>(now - lastReach_).count(), 0.1f); + lastReach_ = now; + if (havePad && pad.axes[7] && !CardboardController::Grabbing(pad, false) && !CardboardController::Grabbing(pad, true)) + reach_ = std::clamp(reach_ - (pad.axes[7] > 0 ? 1.0f : -1.0f) * CardboardController::kReachSpeed * dt, + CardboardController::kReachMin, CardboardController::kReachMax); + if (now - lastScan_ > std::chrono::seconds(1)) { + lastScan_ = now; + const bool other = OtherControllers(); + if (other != otherControllers_) { + otherControllers_ = other; + Log("%s", other ? "other VR controllers connected: pad hands off" : "no other VR controllers: pad hands on"); + } + } + const int64_t nowNs = MonotonicNs(); + gHandTrace.Poll(nowNs); + double headYaw = 0.0; + if (Heading({head.qRotation.w, head.qRotation.x, head.qRotation.y, head.qRotation.z}, &headYaw)) + headings_.Add(nowNs, {-std::sin(headYaw), 0.0, -std::cos(headYaw)}); + droiddeck_handcam cam; + if (handCamFile_.Read(&cam)) { + const bool running = (cam.flags & DROIDDECK_HANDCAM_RUNNING) != 0; + if (cam.frame != lastCamFrame_) { + lastCamFrame_ = cam.frame; + if (!lumaJoyCons && !optical && running && std::llabs(nowNs - cam.time_ns) < kHandCamStaleNs) SeeCamera(cam, nowNs); + } + bareFlag_ = running && (cam.flags & DROIDDECK_HANDCAM_BARE_HANDS); + bareTimeNs_ = cam.time_ns; + } + const bool bare = !otherControllers_ && !optical && !lumaJoyCons && bareFlag_ && std::llabs(nowNs - bareTimeNs_) < kBareHandsStaleNs; + if (bare != bareHands_) { + bareHands_ = bare; + Log("%s", bare ? "no controllers: the camera tracks bare hands" : "camera bare hands off"); + } + for (int side = 0; side < 2; side++) { + const droiddeck_joycon_hand *joyCon = + !otherControllers_ && !optical && haveJoyCons && JoyConLive(joyCons.hands[side], nowNs) ? &joyCons.hands[side] : nullptr; + if (handControllers_[side]) handControllers_[side]->ExpectBare(!joyCon && bare); + if (joyCon || bare) wantHand_[side] = true; + const bool covered = handControllers_[side] && handControllers_[side]->Update(joyCon, bare, head.qRotation, nowNs, + lumaJoyCons ? &spatial : nullptr); + CardboardController *hand = hands_[side]; + if (!hand) continue; + if (otherControllers_ || covered || bare || lumaJoyCons) { + if (!padHandOff_[side]) hand->Disconnect(); + padHandOff_[side] = true; + continue; + } + padHandOff_[side] = false; + if (optical) hand->UpdateOptical(spatial.hands[side], SpatialFresh(spatial.head, SpatialNow()), + havePad ? &pad : nullptr, SpatialNow(), spatial.connection, spatial.origin, + uint16_t(spatial.input_epochs >> (side*16)), + spatial.flags & DD_SPATIAL_STEADY_AIM ? &spatial.head : nullptr); + else hand->Update(head, havePad ? &pad : nullptr, sticksMoveHands_, reach_); + } + if (havePad) lastPad_ = pad; + lastSent = now; + } + std::this_thread::sleep_for(std::chrono::milliseconds(2)); + } + } + + void SeeCamera(const droiddeck_handcam &cam, int64_t nowNs) { + Vec3 forward; + const bool heading = headings_.At(cam.time_ns, &forward) && Length(forward) > 0.5; + if ((cam.flags & DROIDDECK_HANDCAM_FACE) && heading) { + const double dt = lastFaceNs_ ? std::max(0.0, (cam.time_ns - lastFaceNs_) * 1e-9) : 0.0; + lastFaceNs_ = cam.time_ns; + cameraYaw_.Add(std::atan2(-forward.x, -forward.z) - cam.face_yaw, dt); + } + double yaw = 0.0; + const bool aligned = cameraYaw_.Get(&yaw); + if (aligned != cameraAligned_) { + cameraAligned_ = aligned; + Log("hand camera %s", aligned ? "lined up with the headset" : "waiting to see your face"); + } + if (FILE *trace = gHandTrace.File()) + fprintf(trace, "C,%lld,%u,%lld,%u,%.4f,%.4f,%d,%.4f,%u,%.4f,%.4f,%.4f,%u,%.4f,%.4f,%.4f\n", (long long)nowNs, cam.frame, + (long long)cam.time_ns, cam.flags, cam.face_yaw, heading ? std::atan2(-forward.x, -forward.z) : 0.0, aligned ? 1 : 0, + aligned ? yaw : 0.0, cam.hands[0].flags, cam.hands[0].position[0], cam.hands[0].position[1], cam.hands[0].position[2], + cam.hands[1].flags, cam.hands[1].position[0], cam.hands[1].position[1], cam.hands[1].position[2]); + if (!aligned) return; + const Quat turn = AboutY(yaw); + for (int side = 0; side < 2; side++) { + const droiddeck_handcam_hand &hand = cam.hands[side]; + if (!(hand.flags & DROIDDECK_HANDCAM_SEEN) || !handControllers_[side]) continue; + Vec3 joints[kHandJoints]; + const bool haveJoints = (hand.flags & DROIDDECK_HANDCAM_JOINTS) != 0; + if (haveJoints) + for (int i = 0; i < kHandJoints; i++) joints[i] = Rotate(turn, {hand.joints[i][0], hand.joints[i][1], hand.joints[i][2]}); + handControllers_[side]->SeeCamera(Rotate(turn, {hand.position[0], hand.position[1], hand.position[2]}), haveJoints ? joints : nullptr, + cam.time_ns, (hand.flags & DROIDDECK_HANDCAM_ESTIMATED) != 0, nowNs); + } + } + + static bool OtherControllers() { + TrackedDevicePose_t poses[k_unMaxTrackedDeviceCount]; + VRServerDriverHost()->GetRawTrackedDevicePoses(0.0f, poses, k_unMaxTrackedDeviceCount); + for (uint32_t i = 0; i < k_unMaxTrackedDeviceCount; i++) { + if (!poses[i].bDeviceIsConnected) continue; + PropertyContainerHandle_t c = VRProperties()->TrackedDeviceToPropertyContainer(i); + if (VRProperties()->GetInt32Property(c, Prop_DeviceClass_Int32) != TrackedDeviceClass_Controller) continue; + if (VRProperties()->GetStringProperty(c, Prop_TrackingSystemName_String) != "droiddeck") return true; + } + return false; + } + + uint32_t id_ = k_unTrackedDeviceIndexInvalid; + int32_t width_ = 1920, height_ = 1080; + std::atomic<float> tanHalf_{1.0f}, eyeAspect_{0.889f}; + std::atomic<uint32_t> renderHeight_{720}, panelHeight_{0}; + float sentTan_ = 0.0f, sentAspect_ = 0.0f, sentHz_ = 0.0f; + bool sentMono_ = false; + PropertyContainerHandle_t container_ = k_ulInvalidPropertyContainer; +public: + void SetHands(CardboardController *left, CardboardController *right) { hands_[0] = left; hands_[1] = right; } + void SetHandControllers(HandController *left, HandController *right) { handControllers_[0] = left; handControllers_[1] = right; } + bool WantsHand(int side) const { return wantHand_[side].load(); } + +private: + PoseFile pose_; + SpatialFile spatial_; + std::mutex spatialMutex_; + DriverPose_t lastSpatial_{}; + droiddeck_spatialpose lastSpatialSnapshot_{}; + XrTrackingFile xr_; + XrChaperoneOrigin chaperone_; + bool xrMode_ = false; + PadRing pad_; + PadState lastPad_; + VRInputComponentHandle_t proximity_ = 0; + bool worn_ = true; + bool sticksMoveHands_ = true; + float reach_ = 0.0f; + std::chrono::steady_clock::time_point lastReach_ = std::chrono::steady_clock::now(); + std::chrono::steady_clock::time_point lastScan_{}; + bool otherControllers_ = false; + CardboardController *hands_[2] = {nullptr, nullptr}; + bool padHandOff_[2] = {false, false}; + ShmFile<droiddeck_joycon> joyConFile_{kJoyConPath, DROIDDECK_JOYCON_MAGIC, DROIDDECK_JOYCON_VERSION, "Joy-Con"}; + uint32_t lastJoyConSeq_ = 0; + ShmFile<droiddeck_handcam> handCamFile_{kHandCamPath, DROIDDECK_HANDCAM_MAGIC, DROIDDECK_HANDCAM_VERSION, "hand camera"}; + uint32_t lastCamFrame_ = 0; + int64_t lastFaceNs_ = 0; + TimeHistory headings_; + CameraYaw cameraYaw_; + bool cameraAligned_ = false; + bool bareHands_ = false, bareFlag_ = false; + int64_t bareTimeNs_ = 0; + HandController *handControllers_[2] = {nullptr, nullptr}; + std::atomic<bool> wantHand_[2] = {false, false}; + bool virtualDisplay_ = false, directMode_ = false; + VirtualDisplay vd_; + DirectMode dm_; + std::atomic<bool> running_{false}; + std::thread thread_; +}; + +class Provider : public IServerTrackedDeviceProvider { +public: + ~Provider() { + if (hmd_.Running()) hmd_.Deactivate(); + } + + EVRInitError Init(IVRDriverContext *ctx) override { + VR_INIT_SERVER_DRIVER_CONTEXT(ctx); + focusEnabled_ = access("/run/droiddeck/droiddeck-xr-frames", F_OK) == 0; + Log("DroidDeck Cardboard driver loaded"); + if (!VRServerDriverHost()->TrackedDeviceAdded("droiddeck-cardboard-hmd", TrackedDeviceClass_HMD, &hmd_)) + Log("TrackedDeviceAdded failed"); + if (VRSettings()->GetBool(kSettingsSection, "gamepadControllers")) { + VRServerDriverHost()->TrackedDeviceAdded("droiddeck-pad-left", TrackedDeviceClass_Controller, &left_); + VRServerDriverHost()->TrackedDeviceAdded("droiddeck-pad-right", TrackedDeviceClass_Controller, &right_); + hmd_.SetHands(&left_, &right_); + } + hmd_.SetHandControllers(&handLeft_, &handRight_); + return VRInitError_None; + } + void Cleanup() override { + if (focusEnabled_) unlink(kFocusPath); + if (haptics_) { munmap(haptics_, sizeof(*haptics_)); haptics_ = nullptr; } + VR_CLEANUP_SERVER_DRIVER_CONTEXT(); + } + const char *const *GetInterfaceVersions() override { return k_InterfaceVersions; } + void RunFrame() override { + for (int side = 0; side < 2; side++) { + if (handAdded_[side] || !hmd_.WantsHand(side)) continue; + handAdded_[side] = true; + if (!VRServerDriverHost()->TrackedDeviceAdded(side ? "droiddeck-hand-right" : "droiddeck-hand-left", + TrackedDeviceClass_Controller, side ? &handRight_ : &handLeft_)) + Log("%s hand could not be added", side ? "right" : "left"); + } + VREvent_t e; + while (VRServerDriverHost()->PollNextEvent(&e, sizeof(e))) { + if (focusEnabled_) { + bool changed = false; + if (e.eventType == VREvent_SceneApplicationChanged) { scenePid_ = e.data.process.pid; changed = true; } + if (e.eventType == VREvent_DashboardActivated) { dashboard_ = true; changed = true; } + if (e.eventType == VREvent_DashboardDeactivated) { dashboard_ = false; changed = true; } + if (changed) PublishFocus(); + } + if (e.eventType != VREvent_Input_HapticVibration) continue; + const VREvent_HapticVibration_t &h = e.data.hapticVibration; + if (!h.componentHandle) continue; + if (h.componentHandle == handLeft_.Haptic()) SendRumble(DROIDDECK_JOYCON_RUMBLE_SLOT, h); + else if (h.componentHandle == handRight_.Haptic()) SendRumble(DROIDDECK_JOYCON_RUMBLE_SLOT + 1, h); + else if (h.componentHandle == left_.Haptic() || h.componentHandle == right_.Haptic()) { + if (left_.XrMode()) SendHaptic(h.componentHandle == right_.Haptic() ? 1 : 0, h); + else SendRumble(0, h); + } + } + } + bool ShouldBlockStandbyMode() override { return false; } + void EnterStandby() override {} + void LeaveStandby() override {} + +private: + static constexpr const char *kFocusPath = "/run/droiddeck/droiddeck-steamvr/scene-focus.json"; + bool focusEnabled_ = false, dashboard_ = true; + uint32_t scenePid_ = 0; + void PublishFocus() { + const std::string temporary = std::string(kFocusPath) + ".tmp"; + int fd = open(temporary.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NOFOLLOW, 0600); + if (fd < 0) return; + char body[128]; + int length = snprintf(body, sizeof(body), "{\"serverPid\":%d,\"scenePid\":%u,\"dashboard\":%s}\n", + getpid(), scenePid_, dashboard_ ? "true" : "false"); + bool written = write(fd, body, length) == length; + close(fd); + if (written) rename(temporary.c_str(), kFocusPath); + else unlink(temporary.c_str()); + } + DroidDeckXrHaptics *haptics_ = nullptr; + void SendHaptic(int hand, const VREvent_HapticVibration_t &pulse) { + if (!std::isfinite(pulse.fAmplitude) || !std::isfinite(pulse.fFrequency) || !std::isfinite(pulse.fDurationSeconds)) return; + if (!haptics_) { + int descriptor = open("/run/droiddeck/" DROIDDECK_XR_HAPTIC_FILE, O_RDWR | O_CLOEXEC); + if (descriptor < 0) return; + struct stat status{}; + if (fstat(descriptor, &status) != 0 || status.st_size != sizeof(*haptics_)) { close(descriptor); return; } + void *mapping = mmap(nullptr, sizeof(*haptics_), PROT_READ | PROT_WRITE, MAP_SHARED, descriptor, 0); + close(descriptor); + if (mapping == MAP_FAILED) return; + haptics_ = static_cast<DroidDeckXrHaptics *>(mapping); + } + uint32_t sequence = __atomic_load_n(&haptics_->seq, __ATOMIC_RELAXED); + __atomic_store_n(&haptics_->seq, sequence | 1u, __ATOMIC_SEQ_CST); + __atomic_thread_fence(__ATOMIC_SEQ_CST); + auto &target = haptics_->hands[hand]; + target.id++; + target.duration_ns = (int64_t)(std::clamp(pulse.fDurationSeconds, 0.001f, 1.f) * 1000000000.0); + target.amplitude = std::clamp(pulse.fAmplitude, 0.f, 1.f); + target.frequency = std::max(pulse.fFrequency, 0.f); + __atomic_store_n(&haptics_->seq, (sequence | 1u) + 1u, __ATOMIC_RELEASE); + } + CardboardHmd hmd_; + CardboardController left_{false}, right_{true}; + HandController handLeft_{false}, handRight_{true}; + bool handAdded_[2] = {false, false}; +}; + +Provider g_provider; + +} + +DD_EXPORT void *HmdDriverFactory(const char *interfaceName, int *returnCode) { + if (!strcmp(interfaceName, IServerTrackedDeviceProvider_Version)) return &g_provider; + if (returnCode) *returnCode = VRInitError_Init_InterfaceNotFound; + return nullptr; +} diff --git a/tools/vr/src/fence_tracker.h b/tools/vr/src/fence_tracker.h new file mode 100644 index 0000000000..d016d9ded1 --- /dev/null +++ b/tools/vr/src/fence_tracker.h @@ -0,0 +1,104 @@ +#pragma once + +#include <stdint.h> +#include <stdlib.h> +#include <vulkan/vulkan.h> + +/* All pool operations require the caller's tracker lock. Reserved fences are + * invisible to the completer until vkQueueSubmit has returned successfully. */ +struct tracked { + struct tracked *next; + VkDevice dev; + VkFence fence; + PFN_vkWaitForFences wait; + PFN_vkResetFences reset; + PFN_vkDestroyFence destroy; + uint32_t mark; + enum { TRACK_IDLE, TRACK_RESERVED, TRACK_SUBMITTED } state; +}; + +static struct tracked *track_pool_take(struct tracked **pool, VkDevice dev, PFN_vkGetDeviceProcAddr gdpa) { + struct tracked *idle = NULL; + for (struct tracked *t = *pool; t; t = t->next) { + if (t->state != TRACK_IDLE) continue; + if (t->dev == dev) { + t->state = TRACK_RESERVED; + return t; + } + if (!idle) idle = t; + } + struct tracked t = {.dev = dev, .state = TRACK_RESERVED}; + t.wait = (PFN_vkWaitForFences)gdpa(dev, "vkWaitForFences"); + t.reset = (PFN_vkResetFences)gdpa(dev, "vkResetFences"); + t.destroy = (PFN_vkDestroyFence)gdpa(dev, "vkDestroyFence"); + PFN_vkCreateFence create = (PFN_vkCreateFence)gdpa(dev, "vkCreateFence"); + if (!t.wait || !t.reset || !t.destroy || !create) return NULL; + /* Never wait for a slot: the next submission may signal a semaphore that + * every outstanding fence is waiting on. Grow only at the high-water mark. */ + struct tracked *slot = idle ? idle : calloc(1, sizeof(*slot)); + if (!slot) return NULL; + VkFenceCreateInfo fci = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, NULL, 0}; + if (create(dev, &fci, NULL, &t.fence) != VK_SUCCESS) { + if (!idle) free(slot); + return NULL; + } + if (idle) { + idle->destroy(idle->dev, idle->fence, NULL); + t.next = idle->next; + } else { + t.next = *pool; + *pool = slot; + } + *slot = t; + return slot; +} + +static uint32_t track_pool_submitted(struct tracked *t, VkResult result, uint32_t issued) { + if (result == VK_SUCCESS) { + t->mark = ++issued; + t->state = TRACK_SUBMITTED; + } else { + t->reset(t->dev, 1, &t->fence); + t->state = TRACK_IDLE; + } + return issued; +} + +static int track_pool_reap(struct tracked *pool, uint32_t issued, uint32_t *done) { + int pending = 0; + uint32_t through = issued; + for (struct tracked *t = pool; t; t = t->next) { + if (t->state != TRACK_SUBMITTED) continue; + /* Scan all fences without blocking behind an earlier submission on a + * different queue. Device loss retires fences as in the previous path. */ + if (t->wait(t->dev, 1, &t->fence, VK_TRUE, 0) == VK_TIMEOUT) { + pending = 1; + if ((int32_t)(t->mark - through) <= 0) through = t->mark - 1; + } else { + t->reset(t->dev, 1, &t->fence); + t->state = TRACK_IDLE; + } + } + /* done is a contiguous watermark, not a count of completed fences. Later + * work may free its slot but cannot release an unfinished presenter frame. + * Signed differences also handle the uint32_t counter wrapping. */ + *done = through; + return pending; +} + +static int track_pool_device_busy(struct tracked *pool, VkDevice dev) { + for (struct tracked *t = pool; t; t = t->next) + if (t->dev == dev && t->state != TRACK_IDLE) return 1; + return 0; +} + +/* The caller must first wait for all this device's reservations and work. */ +static void track_pool_forget(struct tracked **pool, VkDevice dev) { + for (struct tracked **p = pool; *p;) { + struct tracked *t = *p; + if (t->dev != dev) { p = &t->next; continue; } + t->destroy(t->dev, t->fence, NULL); + *p = t->next; + free(t); + } +} diff --git a/tools/vr/src/hand_mesh.h b/tools/vr/src/hand_mesh.h new file mode 100644 index 0000000000..cfad5781b9 --- /dev/null +++ b/tools/vr/src/hand_mesh.h @@ -0,0 +1,463 @@ +#pragma once + +#include <algorithm> +#include <array> +#include <cmath> +#include <cstdint> +#include <cstdio> +#include <string> +#include <vector> + +#include "hand_pose.h" + +namespace droiddeck { + +struct HandMesh { + std::vector<Vec3> points, normals; + std::vector<double> tints, shades; + std::vector<std::array<int, 3>> faces; + + int Add(const Vec3 &p, const Vec3 &n, double tint = 0.0, double shade = 1.0) { + points.push_back(p); + normals.push_back(n); + tints.push_back(tint); + shades.push_back(shade); + return (int)points.size() - 1; + } + + void Face(int a, int b, int c, const Vec3 &outward) { + const Vec3 n = Cross(points[b] - points[a], points[c] - points[a]); + if (Dot(n, outward) < 0.0) faces.push_back({a, c, b}); + else faces.push_back({a, b, c}); + } +}; + +inline FingerCurls RelaxedCurls() { + FingerCurls c; + c.thumb = 0.15; + c.index = 0.1; + c.middle = c.ring = c.pinky = 0.15; + return c; +} + +inline void HandShape(bool right, bool pinch, bool fist, Vec3 out[kHandJoints]) { + using namespace hand; + FingerCurls c = RelaxedCurls(); + if (pinch) { + c.thumb = 0.7; + c.index = 0.55; + } + if (fist) c.middle = c.ring = c.pinky = 1.0; + HandJoints(right, c, out); + if (pinch) { + const Vec3 meet = out[kIndexTip] + (out[kThumbIp] - out[kIndexTip]) * 0.15; + const Vec3 shift = meet - out[kThumbTip]; + out[kThumbTip] = meet; + out[kThumbIp] = out[kThumbIp] + shift * 0.5; + out[kThumbMcp] = out[kThumbMcp] + shift * 0.15; + } +} + +enum class HandPart { Hand, ThumbIndex }; + +namespace glove { + +constexpr double kStep = 0.0026; +constexpr double kPalmHalf = 0.0105; +constexpr double kPalmRound = 0.0085; +constexpr double kWristSide = 0.02; +constexpr double kWristSpan = 0.017; +constexpr double kWristRadius = 0.0165; +constexpr double kCuffStart = 0.006; +constexpr double kCuffLength = 0.016; +constexpr double kCuffWidth[2] = {0.0295, 0.029}; +constexpr double kCuffDepth[2] = {0.021, 0.0205}; +constexpr double kCuffRound = 0.006; +constexpr double kJointBlend = 0.001; +constexpr double kFingerBlend = 0.010; +constexpr double kThumbBlend = 0.016; +constexpr double kWristBlend = 0.012; +constexpr double kCuffBlend = 0.005; +constexpr double kTintEdge = 0.0015; +constexpr double kTouchBlend = 0.008; +constexpr double kCutBlend = 0.004; +constexpr double kDome[3] = {0.030, 0.040, 0.0135}; +constexpr double kDomeAt = 0.55; +constexpr double kDomeBlend = 0.022; +constexpr double kFistRadius = 0.0095; +constexpr double kFistBlend = 0.006; +constexpr double kOcclusionStep = 0.004; +constexpr double kOcclusion = 3.0; +constexpr double kDarkest = 0.4; +constexpr double kInset = 0.0003; +constexpr double kReach = 0.03; +constexpr double kRadii[5][4] = {{0.0135, 0.0122, 0.0110, 0.0096}, + {0.0106, 0.0098, 0.0092, 0.0087}, + {0.0110, 0.0102, 0.0096, 0.0090}, + {0.0105, 0.0097, 0.0091, 0.0086}, + {0.0094, 0.0087, 0.0082, 0.0077}}; + +inline Vec3 Unit(const Vec3 &v) { + const double l = Length(v); + return l > 1e-12 ? v * (1.0 / l) : Vec3{0.0, 1.0, 0.0}; +} + +inline double Smin(double a, double b, double k) { + const double h = std::max(k - std::fabs(a - b), 0.0) / k; + return std::min(a, b) - h * h * k * 0.25; +} + +inline double Cone(const Vec3 &p, const Vec3 &a, const Vec3 &b, double ra, double rb) { + const Vec3 ab = b - a; + const double t = std::min(1.0, std::max(0.0, Dot(p - a, ab) / std::max(Dot(ab, ab), 1e-12))); + return Length(p - (a + ab * t)) - (ra + (rb - ra) * t); +} + +inline double Polygon(const std::vector<std::array<double, 2>> &v, double x, double y) { + double d = (x - v[0][0]) * (x - v[0][0]) + (y - v[0][1]) * (y - v[0][1]); + double sign = 1.0; + for (size_t i = 0, j = v.size() - 1; i < v.size(); j = i++) { + const double ex = v[j][0] - v[i][0], ey = v[j][1] - v[i][1]; + const double wx = x - v[i][0], wy = y - v[i][1]; + const double t = std::min(1.0, std::max(0.0, (wx * ex + wy * ey) / std::max(ex * ex + ey * ey, 1e-18))); + const double bx = wx - ex * t, by = wy - ey * t; + d = std::min(d, bx * bx + by * by); + const bool a = y >= v[i][1], b = y < v[j][1], c = ex * wy > ey * wx; + if ((a && b && c) || (!a && !b && !c)) sign = -sign; + } + return sign * std::sqrt(d); +} + +inline double Rounded(double a, double b, double round) { + return std::min(std::max(a, b), 0.0) + std::hypot(std::max(a, 0.0), std::max(b, 0.0)) - round; +} + +struct Finger { + Vec3 joints[4]; + double radii[4]; + + double Distance(const Vec3 &p) const { + double d = Cone(p, joints[0], joints[1], radii[0], radii[1]); + for (int i = 1; i < 3; i++) d = Smin(d, Cone(p, joints[i], joints[i + 1], radii[i], radii[i + 1]), kJointBlend); + return d; + } +}; + +class Glove { +public: + Glove(bool right, HandPart part, bool closed) : part_(part) { + using namespace hand; + Vec3 open[kHandJoints], j[kHandJoints]; + HandShape(right, false, false, open); + HandShape(right, part == HandPart::ThumbIndex && closed, part == HandPart::Hand && closed, j); + origin_ = open[kWrist]; + along_ = Unit(open[kMiddleMcp] - open[kWrist]); + normal_ = Unit(Cross(open[kIndexMcp] - open[kWrist], open[kPinkyMcp] - open[kWrist])); + across_ = Unit(Cross(along_, normal_)); + const Vec3 side = across_ * (Dot(open[kIndexMcp] - open[kPinkyMcp], across_) > 0.0 ? 1.0 : -1.0); + for (const Vec3 &q : {open[kWrist] + side * kWristSide, open[kThumbCmc], open[kIndexMcp], open[kMiddleMcp], open[kRingMcp], + open[kPinkyMcp], open[kWrist] - side * kWristSide}) + outline_.push_back({Dot(q - origin_, across_), Dot(q - origin_, along_)}); + wristA_ = open[kWrist] + across_ * kWristSpan; + wristB_ = open[kWrist] - across_ * kWristSpan; + const int first = part == HandPart::Hand ? 2 : 0, last = part == HandPart::Hand ? 4 : 1; + for (int f = first; f <= last; f++) { + Finger finger; + const int root = f == 0 ? kThumbCmc : kIndexMcp + 4 * (f - 1); + for (int i = 0; i < 4; i++) { + finger.joints[i] = j[root + i]; + finger.radii[i] = kRadii[f][i]; + } + finger.joints[3] = finger.joints[3] - Unit(finger.joints[3] - finger.joints[2]) * (finger.radii[3] * 0.7); + fingers_.push_back(finger); + } + dome_ = open[kWrist] + (open[kMiddleMcp] - open[kWrist]) * kDomeAt; + back_ = normal_ * (Dot(normal_, open[kThumbTip] - dome_) > 0.0 ? -1.0 : 1.0); + fist_ = part == HandPart::Hand && closed; + for (int f = 0; f < 3 && fist_; f++) { + fistLine_[f] = Vec3{}; + for (int i = 0; i < 4; i++) fistLine_[f] = fistLine_[f] + j[kMiddleMcp + 4 * f + i] * 0.25; + } + lo_ = hi_ = origin_; + const auto grow = [&](const Vec3 &q, double r) { + lo_ = Vec3{std::min(lo_.x, q.x - r), std::min(lo_.y, q.y - r), std::min(lo_.z, q.z - r)}; + hi_ = Vec3{std::max(hi_.x, q.x + r), std::max(hi_.y, q.y + r), std::max(hi_.z, q.z + r)}; + }; + for (int i : {kWrist, kThumbCmc, kIndexMcp, kMiddleMcp, kRingMcp, kPinkyMcp}) grow(open[i], kPalmHalf + kPalmRound + kWristSide); + grow(origin_ - along_ * kCuffLength, kCuffWidth[1] + kCuffRound); + for (const Finger &f : fingers_) + for (int i = 0; i < 4; i++) grow(f.joints[i], f.radii[i] + kThumbBlend); + } + + double Distance(const Vec3 &p) const { + double palm = Smin(Smin(Slab(p), Cone(p, wristA_, wristB_, kWristRadius, kWristRadius), kWristBlend), Cuff(p), kCuffBlend); + if (part_ == HandPart::ThumbIndex) { + double reach = 1e9; + for (const Finger &f : fingers_) reach = std::min(reach, f.Distance(p)); + palm = -Smin(-(palm + kInset), kReach - reach, kCutBlend); + } + double fingers = fingers_[0].Distance(p); + for (size_t i = 1; i < fingers_.size(); i++) fingers = Smin(fingers, fingers_[i].Distance(p), kTouchBlend); + if (fist_) + fingers = Smin(fingers, std::min(Cone(p, fistLine_[0], fistLine_[1], kFistRadius, kFistRadius), + Cone(p, fistLine_[1], fistLine_[2], kFistRadius, kFistRadius)), kFistBlend); + return Smin(palm, fingers, part_ == HandPart::ThumbIndex ? kThumbBlend : kFingerBlend); + } + + double Tint(const Vec3 &p) const { + double rest = Smin(Slab(p), Cone(p, wristA_, wristB_, kWristRadius, kWristRadius), kWristBlend); + for (const Finger &f : fingers_) rest = std::min(rest, f.Distance(p)); + return std::min(1.0, std::max(0.0, 0.5 + (rest - Cuff(p)) / (2.0 * kTintEdge))); + } + + double Shade(const Vec3 &p, const Vec3 &n) const { + double hidden = 0.0, weight = 1.0; + for (int i = 1; i <= 5; i++) { + const double h = kOcclusionStep * i; + hidden += (h - Distance(p + n * h)) * weight; + weight *= 0.6; + } + const double open = std::min(1.0, std::max(0.0, 1.0 - kOcclusion * hidden / kOcclusionStep / 5.0)); + const double light = 0.88 + 0.12 * Dot(n, back_); + return std::min(1.0, std::max(0.0, open * light)); + } + + Vec3 Low() const { return lo_ - Vec3{2.0, 2.0, 2.0} * kStep; } + Vec3 High() const { return hi_ + Vec3{2.0, 2.0, 2.0} * kStep; } + +private: + double Slab(const Vec3 &p) const { + const Vec3 q = p - origin_; + const double slab = Rounded(Polygon(outline_, Dot(q, across_), Dot(q, along_)), std::fabs(Dot(q, normal_)) - (kPalmHalf - kPalmRound), kPalmRound); + const Vec3 d = p - dome_; + const double x = Dot(d, across_), y = Dot(d, along_), z = Dot(d, normal_); + const double k0 = std::sqrt(x * x / (kDome[0] * kDome[0]) + y * y / (kDome[1] * kDome[1]) + z * z / (kDome[2] * kDome[2])); + const double k1 = std::sqrt(x * x / std::pow(kDome[0], 4) + y * y / std::pow(kDome[1], 4) + z * z / std::pow(kDome[2], 4)); + return Smin(slab, k1 > 1e-12 ? k0 * (k0 - 1.0) / k1 : -kDome[2], kDomeBlend); + } + + double Cuff(const Vec3 &p) const { + const Vec3 q = p - origin_; + const double t = -Dot(q, along_) + kCuffStart; + const double s = std::min(1.0, std::max(0.0, t / kCuffLength)); + const double a = kCuffWidth[0] + (kCuffWidth[1] - kCuffWidth[0]) * s - kCuffRound; + const double b = kCuffDepth[0] + (kCuffDepth[1] - kCuffDepth[0]) * s - kCuffRound; + const double x = Dot(q, across_), y = Dot(q, normal_); + const double k0 = std::hypot(x / a, y / b), k1 = std::hypot(x / (a * a), y / (b * b)); + const double radial = k1 > 1e-12 ? k0 * (k0 - 1.0) / k1 : -std::min(a, b); + return Rounded(radial, std::fabs(t - kCuffLength * 0.5) - (kCuffLength * 0.5 - kCuffRound), kCuffRound); + } + + HandPart part_; + bool fist_ = false; + Vec3 origin_, along_, across_, normal_, wristA_, wristB_, lo_, hi_, dome_, back_, fistLine_[3]; + std::vector<std::array<double, 2>> outline_; + std::vector<Finger> fingers_; +}; + +template <typename Field> Vec3 Gradient(const Field &f, const Vec3 &p) { + constexpr double e = 1e-5; + return Vec3{f(p + Vec3{e, 0.0, 0.0}) - f(p - Vec3{e, 0.0, 0.0}), f(p + Vec3{0.0, e, 0.0}) - f(p - Vec3{0.0, e, 0.0}), + f(p + Vec3{0.0, 0.0, e}) - f(p - Vec3{0.0, 0.0, e})} * + (0.5 / e); +} + +template <typename Field, typename Painter> +HandMesh SurfaceNet(const Field &f, const Painter &paint, const Vec3 &lo, const Vec3 &hi, double step) { + const int nx = (int)std::ceil((hi.x - lo.x) / step) + 1, ny = (int)std::ceil((hi.y - lo.y) / step) + 1, + nz = (int)std::ceil((hi.z - lo.z) / step) + 1; + const auto at = [&](int i, int j, int k) { return (size_t(k) * ny + j) * nx + i; }; + const auto corner = [&](int i, int j, int k) { return Vec3{lo.x + i * step, lo.y + j * step, lo.z + k * step}; }; + std::vector<double> value(size_t(nx) * ny * nz); + for (int k = 0; k < nz; k++) + for (int j = 0; j < ny; j++) + for (int i = 0; i < nx; i++) value[at(i, j, k)] = f(corner(i, j, k)); + std::vector<int> vertex(value.size(), -1); + HandMesh m; + for (int k = 0; k + 1 < nz; k++) + for (int j = 0; j + 1 < ny; j++) + for (int i = 0; i + 1 < nx; i++) { + double c[8]; + int inside = 0; + for (int n = 0; n < 8; n++) inside += (c[n] = value[at(i + (n & 1), j + ((n >> 1) & 1), k + (n >> 2))]) < 0.0; + if (inside == 0 || inside == 8) continue; + Vec3 sum; + int count = 0; + for (int a = 0; a < 8; a++) + for (int bit = 1; bit < 8; bit <<= 1) { + const int b = a | bit; + if (b == a || (c[a] < 0.0) == (c[b] < 0.0)) continue; + const Vec3 pa = corner(i + (a & 1), j + ((a >> 1) & 1), k + (a >> 2)); + const Vec3 pb = corner(i + (b & 1), j + ((b >> 1) & 1), k + (b >> 2)); + sum = sum + pa + (pb - pa) * (c[a] / (c[a] - c[b])); + count++; + } + Vec3 p = sum * (1.0 / count); + for (int it = 0; it < 3; it++) { + const Vec3 g = Gradient(f, p); + const double gg = Dot(g, g); + if (gg < 1e-12) break; + p = p - g * (f(p) / gg); + } + const Vec3 low = corner(i, j, k), high = corner(i + 1, j + 1, k + 1); + p = Vec3{std::clamp(p.x, low.x, high.x), std::clamp(p.y, low.y, high.y), std::clamp(p.z, low.z, high.z)}; + const Vec3 n = Unit(Gradient(f, p)); + const std::array<double, 2> colour = paint(p, n); + vertex[at(i, j, k)] = m.Add(p, n, colour[0], colour[1]); + } + for (int k = 1; k + 1 < nz; k++) + for (int j = 1; j + 1 < ny; j++) + for (int i = 1; i + 1 < nx; i++) { + const bool in = value[at(i, j, k)] < 0.0; + for (int axis = 0; axis < 3; axis++) { + const int di = axis == 0, dj = axis == 1, dk = axis == 2; + if ((value[at(i + di, j + dj, k + dk)] < 0.0) == in) continue; + int q[4]; + if (axis == 0) q[0] = vertex[at(i, j - 1, k - 1)], q[1] = vertex[at(i, j, k - 1)], q[2] = vertex[at(i, j, k)], q[3] = vertex[at(i, j - 1, k)]; + else if (axis == 1) q[0] = vertex[at(i - 1, j, k - 1)], q[1] = vertex[at(i, j, k - 1)], q[2] = vertex[at(i, j, k)], q[3] = vertex[at(i - 1, j, k)]; + else q[0] = vertex[at(i - 1, j - 1, k)], q[1] = vertex[at(i, j - 1, k)], q[2] = vertex[at(i, j, k)], q[3] = vertex[at(i - 1, j, k)]; + if (q[0] < 0 || q[1] < 0 || q[2] < 0 || q[3] < 0) continue; + if (in == (axis == 1)) std::swap(q[1], q[3]); + if (Length(m.points[q[0]] - m.points[q[2]]) < Length(m.points[q[1]] - m.points[q[3]])) { + m.faces.push_back({q[0], q[1], q[2]}); + m.faces.push_back({q[0], q[2], q[3]}); + } else { + m.faces.push_back({q[0], q[1], q[3]}); + m.faces.push_back({q[1], q[2], q[3]}); + } + } + } + return m; +} + +} + +inline HandMesh BuildHandPart(bool right, HandPart part, bool closed) { + const glove::Glove g(right, part, closed); + return glove::SurfaceNet([&](const Vec3 &p) { return g.Distance(p); }, [&](const Vec3 &p, const Vec3 &n) { return std::array<double, 2>{g.Tint(p), g.Shade(p, n)}; }, g.Low(), g.High(), + glove::kStep); +} + +inline std::string HandObj(const HandMesh &m, const char *material) { + std::string out = "mtllib hand.mtl\n"; + char line[160]; + for (const Vec3 &p : m.points) { + snprintf(line, sizeof(line), "v %.5f %.5f %.5f\n", p.x, p.y, p.z); + out += line; + } + for (size_t i = 0; i < m.tints.size(); i++) { + snprintf(line, sizeof(line), "vt %.3f %.3f\n", 0.02 + 0.96 * m.shades[i], 0.02 + 0.46 * m.tints[i]); + out += line; + } + for (const Vec3 &n : m.normals) { + snprintf(line, sizeof(line), "vn %.4f %.4f %.4f\n", n.x, n.y, n.z); + out += line; + } + out += "usemtl "; + out += material; + out += "\n"; + for (const auto &f : m.faces) { + snprintf(line, sizeof(line), "f %d/%d/%d %d/%d/%d %d/%d/%d\n", f[0] + 1, f[0] + 1, f[0] + 1, f[1] + 1, f[1] + 1, f[1] + 1, f[2] + 1, + f[2] + 1, f[2] + 1); + out += line; + } + return out; +} + +inline std::string HandMtl(const char *material, const char *texture) { + std::string out = "newmtl "; + out += material; + out += "\nNs 12.0\nd 1.0\nillum 2\nKa 1.0 1.0 1.0\nKd 1.0 1.0 1.0\nKs 0.1 0.1 0.1\nmap_Kd "; + out += texture; + out += "\n"; + return out; +} + +inline std::string HandModelJson(bool right) { + const auto part = [&](const char *name, const char *path, int button, bool shown) { + char text[512]; + snprintf(text, sizeof(text), + " \"%s\": {\n" + " \"filename\": \"%s.obj\",\n" + " \"motion\": {\n" + " \"type\": \"translate\",\n" + " \"pressed_path\": \"%s\",\n" + " \"controller_button\": %d,\n" + " \"value_mapping\": [0.0, 0.0],\n" + " \"axis\": [0.0, 0.0, 1.0]\n" + " },\n" + " \"visibility\": { \"default\": %s, \"press\": %s }\n" + " },\n", + name, name, path, button, shown ? "false" : "true", shown ? "true" : "false"); + return std::string(text); + }; + const auto pose = [](const char *name, const char *origin, const char *rotate) { + char text[256]; + snprintf(text, sizeof(text), " \"%s\": { \"component_local\": { \"origin\": [%s], \"rotate_xyz\": [%s] } }", name, origin, rotate); + return std::string(text); + }; + std::string out = "{\n \"components\": {\n"; + out += part("hand_open", "/input/grip/touch", 2, false); + out += part("hand_fist", "/input/grip/touch", 2, true); + out += part("thumb_index_open", "/input/trigger/click", 33, false); + out += part("thumb_index_pinch", "/input/trigger/click", 33, true); + out += pose("tip", right ? "-0.006, -0.015, 0.02" : "0.006, -0.015, 0.02", right ? "-40.0, 5.0, 0.0" : "-40.0, -5.0, 0.0") + ",\n"; + out += pose("base", right ? "-0.004758, -0.037977, 0.200466" : "0.004758, -0.037977, 0.200466", + right ? "-155.4, -0.427, -7.081" : "-155.4, -0.427, 7.081") + ",\n"; + out += pose("handgrip", right ? "0.003851, 0.003715, 0.075948" : "-0.003851, 0.003715, 0.075948", + right ? "15.392, 2.071, -0.303" : "15.392, -2.071, 0.303") + ",\n"; + out += pose("grip", "0.0, -0.015, 0.13", right ? "15.392, 2.071, -0.303" : "15.392, -2.071, 0.303") + ",\n"; + out += pose("gdc2015", "0.0, 0.0, 0.0", "0, 0, 0") + "\n"; + out += " }\n}\n"; + return out; +} + +inline uint32_t Crc32(const uint8_t *data, size_t size, uint32_t crc = 0) { + crc = ~crc; + for (size_t i = 0; i < size; i++) { + crc ^= data[i]; + for (int k = 0; k < 8; k++) crc = (crc >> 1) ^ (0xEDB88320u & (0u - (crc & 1u))); + } + return ~crc; +} + +inline std::vector<uint8_t> GlovePng(int size, const std::array<uint8_t, 3> &glove, const std::array<uint8_t, 3> &cuff, double darkest) { + std::vector<uint8_t> raw; + for (int y = 0; y < size; y++) { + raw.push_back(0); + const double t = 1.0 - std::fabs(2.0 * (y + 0.5) / size - 1.0); + for (int x = 0; x < size; x++) { + const double light = darkest + (1.0 - darkest) * x / double(size - 1); + for (int c = 0; c < 3; c++) raw.push_back(uint8_t(std::lround((glove[c] + (cuff[c] - glove[c]) * t) * light))); + } + } + std::vector<uint8_t> zlib = {0x78, 0x01, 0x01, uint8_t(raw.size() & 0xff), uint8_t(raw.size() >> 8), + uint8_t(~raw.size() & 0xff), uint8_t((~raw.size() >> 8) & 0xff)}; + zlib.insert(zlib.end(), raw.begin(), raw.end()); + uint32_t a = 1, s = 0; + for (uint8_t v : raw) { + a = (a + v) % 65521; + s = (s + a) % 65521; + } + const uint32_t adler = (s << 16) | a; + for (int i = 3; i >= 0; i--) zlib.push_back(uint8_t(adler >> (8 * i))); + std::vector<uint8_t> png = {0x89, 'P', 'N', 'G', 0x0d, 0x0a, 0x1a, 0x0a}; + const auto chunk = [&](const char *type, const std::vector<uint8_t> &data) { + for (int i = 3; i >= 0; i--) png.push_back(uint8_t(data.size() >> (8 * i))); + std::vector<uint8_t> body(type, type + 4); + body.insert(body.end(), data.begin(), data.end()); + png.insert(png.end(), body.begin(), body.end()); + const uint32_t crc = Crc32(body.data(), body.size()); + for (int i = 3; i >= 0; i--) png.push_back(uint8_t(crc >> (8 * i))); + }; + std::vector<uint8_t> header; + for (int v : {size, size}) + for (int i = 3; i >= 0; i--) header.push_back(uint8_t(v >> (8 * i))); + header.insert(header.end(), {8, 2, 0, 0, 0}); + chunk("IHDR", header); + chunk("IDAT", zlib); + chunk("IEND", {}); + return png; +} + +} diff --git a/tools/vr/src/hand_motion.h b/tools/vr/src/hand_motion.h new file mode 100644 index 0000000000..eaa89c7081 --- /dev/null +++ b/tools/vr/src/hand_motion.h @@ -0,0 +1,322 @@ +#pragma once + +#include <algorithm> +#include <cmath> +#include <cstdint> + +#include "arm_model.h" + +namespace droiddeck { + +class HandFollower { +public: + void Reset() { placed_ = false; } + + void Place(const Vec3 &at, const Vec3 &moved) { + at_ = at; + lastMoved_ = moved; + placed_ = true; + } + + Vec3 Update(const Vec3 &anchor, const Vec3 &moved, double dt, double anchorSeconds, double maxOffset) { + if (!placed_) { + at_ = anchor; + placed_ = true; + } else { + at_ = at_ + (moved - lastMoved_); + const double pull = 1.0 - std::exp(-std::max(dt, 0.0) / anchorSeconds); + at_ = at_ + (anchor - at_) * pull; + const Vec3 off = at_ - anchor; + const double length = Length(off); + if (length > maxOffset) at_ = anchor + off * (maxOffset / length); + } + lastMoved_ = moved; + return at_; + } + +private: + bool placed_ = false; + Vec3 at_, lastMoved_; +}; + +class TimeHistory { +public: + void Clear() { count_ = next_ = 0; } + + void Add(int64_t timeNs, const Vec3 &value) { + if (count_ && timeNs <= time_[Last()]) { + if (timeNs == time_[Last()]) value_[Last()] = value; + return; + } + time_[next_] = timeNs; + value_[next_] = value; + next_ = (next_ + 1) % kSize; + count_ = std::min(count_ + 1, kSize); + } + + bool At(int64_t timeNs, Vec3 *out) const { + if (!count_) return false; + int newer = Last(); + if (timeNs >= time_[newer]) { + *out = value_[newer]; + return true; + } + for (int i = 1; i < count_; i++) { + const int older = (newer - 1 + kSize) % kSize; + if (time_[older] <= timeNs) { + const double t = double(timeNs - time_[older]) / double(time_[newer] - time_[older]); + *out = value_[older] + (value_[newer] - value_[older]) * t; + return true; + } + newer = older; + } + *out = value_[newer]; + return true; + } + +private: + int Last() const { return (next_ - 1 + kSize) % kSize; } + + static constexpr int kSize = 256; + int64_t time_[kSize] = {}; + Vec3 value_[kSize]; + int count_ = 0, next_ = 0; +}; + +class CameraYaw { +public: + void Reset() { + c_ = s_ = weight_ = 0.0; + outliers_ = 0; + } + + void Add(double yaw, double dt) { + double current = 0.0; + if (Get(¤t) && std::fabs(std::remainder(yaw - current, 2.0 * M_PI)) > kJump) { + if (++outliers_ < kOutlierFrames) return; + Reset(); + } + outliers_ = 0; + const double keep = std::exp(-std::max(dt, 0.0) / kSeconds); + c_ = c_ * keep + std::cos(yaw); + s_ = s_ * keep + std::sin(yaw); + weight_ = weight_ * keep + 1.0; + } + + bool Get(double *yaw) const { + if (weight_ < kMinWeight || std::hypot(c_, s_) < kMinAgreement * weight_) return false; + *yaw = std::atan2(s_, c_); + return true; + } + +private: + static constexpr double kSeconds = 3.0, kMinWeight = 4.0, kMinAgreement = 0.7, kJump = 0.6; + static constexpr int kOutlierFrames = 8; + double c_ = 0.0, s_ = 0.0, weight_ = 0.0; + int outliers_ = 0; +}; + +class HandKalman { +public: + void Reset() { + ready_ = false; + haveInput_ = false; + count_ = 0; + outliers_ = 0; + seenNs_ = 0; + stillSeconds_ = 0.0; + } + + void Forget() { + ready_ = false; + outliers_ = 0; + } + + bool Ready() const { return ready_; } + int64_t SeenNs() const { return seenNs_; } + int64_t TimeNs() const { return lastNs_; } + Vec3 Position() const { return {axes_[0].x[0], axes_[1].x[0], axes_[2].x[0]}; } + Vec3 Velocity() const { return {axes_[0].x[1], axes_[1].x[1], axes_[2].x[1]}; } + bool Still() const { return stillSeconds_ > kStillSeconds; } + + void Input(int64_t timeNs, const Vec3 &inertial, double turnRate) { + if (haveInput_ && timeNs <= lastNs_) return; + if (!haveInput_ || timeNs - lastNs_ > kGapNs) { + Reset(); + haveInput_ = true; + lastNs_ = timeNs; + lastInertial_ = inertial; + return; + } + Step step; + step.timeNs = timeNs; + step.dt = (timeNs - lastNs_) * 1e-9; + step.du = inertial - lastInertial_; + lastNs_ = timeNs; + lastInertial_ = inertial; + const bool calm = turnRate < kStillTurn && Length(step.du) < kStillAccel * step.dt; + stillSeconds_ = calm ? stillSeconds_ + step.dt : 0.0; + if (ready_) { + Propagate(axes_, step.du, step.dt, Fade(timeNs - seenNs_)); + if (Still()) Stop(axes_); + for (int a = 0; a < 3; a++) step.after[a] = axes_[a]; + } + steps_[next_] = step; + next_ = (next_ + 1) % kSteps; + count_ = std::min(count_ + 1, kSteps); + } + + bool Measure(int64_t timeNs, const Vec3 &at, double sigma) { + if (!haveInput_ || timeNs > lastNs_ + kFutureNs || (count_ == 0 && timeNs < lastNs_)) return false; + int k = -1; + for (int i = 0; i < count_; i++) { + const Step &s = steps_[Index(i)]; + if (s.timeNs >= timeNs) { + k = i; + break; + } + } + const double z[3] = {at.x, at.y, at.z}; + if (k < 0) { + if (!ready_) Start(axes_, z, sigma); + else if (!Accept(axes_, z, sigma)) return false; + else Correct(axes_, z, sigma); + ready_ = true; + seenNs_ = timeNs; + return true; + } + const Step &first = steps_[Index(k)]; + if (timeNs < first.timeNs - int64_t(first.dt * 1e9)) return false; + Axis axes[3]; + if (ready_) { + if (k == 0) return false; + for (int a = 0; a < 3; a++) axes[a] = steps_[Index(k - 1)].after[a]; + } + const double frac = std::clamp((timeNs - (first.timeNs - first.dt * 1e9)) / (first.dt * 1e9), 0.0, 1.0); + if (ready_) { + Propagate(axes, first.du * frac, first.dt * frac, Fade(timeNs - seenNs_)); + if (!Accept(axes, z, sigma)) return false; + Correct(axes, z, sigma); + } else { + Start(axes, z, sigma); + } + Propagate(axes, first.du * (1.0 - frac), first.dt * (1.0 - frac), kDampingSeconds); + for (int a = 0; a < 3; a++) steps_[Index(k)].after[a] = axes[a]; + for (int i = k + 1; i < count_; i++) { + Step &s = steps_[Index(i)]; + Propagate(axes, s.du, s.dt, Fade(s.timeNs - timeNs)); + for (int a = 0; a < 3; a++) s.after[a] = axes[a]; + } + for (int a = 0; a < 3; a++) axes_[a] = axes[a]; + ready_ = true; + seenNs_ = timeNs; + return true; + } + +private: + struct Axis { + double x[2] = {0.0, 0.0}; + double P[2][2] = {}; + }; + struct Step { + int64_t timeNs = 0; + double dt = 0.0; + Vec3 du; + Axis after[3]; + }; + + int Index(int i) const { return (next_ - count_ + i + kSteps) % kSteps; } + + static void Start(Axis *axes, const double *z, double sigma) { + for (int a = 0; a < 3; a++) { + axes[a] = Axis(); + axes[a].x[0] = z[a]; + axes[a].P[0][0] = sigma * sigma; + axes[a].P[1][1] = kStartSpeed * kStartSpeed; + } + } + + bool Accept(const Axis *axes, const double *z, double sigma) { + double d2 = 0.0; + for (int a = 0; a < 3; a++) { + const double y = z[a] - axes[a].x[0]; + d2 += y * y / (axes[a].P[0][0] + sigma * sigma); + } + if (d2 <= kGate) { + outliers_ = 0; + return true; + } + if (++outliers_ < kOutliers) return false; + outliers_ = 0; + ready_ = false; + return true; + } + + void Correct(Axis *axes, const double *z, double sigma) const { + if (!ready_) { + Start(axes, z, sigma); + return; + } + for (int a = 0; a < 3; a++) Update(axes[a], 0, z[a], sigma); + } + + static void Update(Axis &s, int state, double z, double sigma) { + const double S = s.P[state][state] + sigma * sigma; + const double K[2] = {s.P[0][state] / S, s.P[1][state] / S}; + const double y = z - s.x[state]; + s.x[0] += K[0] * y; + s.x[1] += K[1] * y; + const double p00 = s.P[0][0] - K[0] * s.P[state][0]; + const double p01 = s.P[0][1] - K[0] * s.P[state][1]; + const double p11 = s.P[1][1] - K[1] * s.P[state][1]; + s.P[0][0] = p00; + s.P[0][1] = s.P[1][0] = p01; + s.P[1][1] = p11; + } + + static void Stop(Axis *axes) { + for (int a = 0; a < 3; a++) Update(axes[a], 1, 0.0, kStillSpeed); + } + + static double Fade(int64_t sinceSeenNs) { return sinceSeenNs > kStaleNs ? kStaleDampingSeconds : kDampingSeconds; } + + static void Propagate(Axis *axes, const Vec3 &du, double dt, double damping) { + if (dt <= 0.0) return; + const double motion = Length(du); + const double g = kMotionError * kMotionError * motion * motion; + const double d[3] = {du.x, du.y, du.z}; + const double keep = std::exp(-dt / damping); + const double q00 = kNoise * dt * dt * dt / 3.0 + g * dt * dt / 4.0; + const double q01 = kNoise * dt * dt / 2.0 + g * dt / 2.0; + const double q11 = kNoise * dt + g; + for (int a = 0; a < 3; a++) { + Axis &s = axes[a]; + s.x[0] += s.x[1] * dt + 0.5 * d[a] * dt; + s.x[1] = (s.x[1] + d[a]) * keep; + const double p00 = s.P[0][0] + 2.0 * dt * s.P[0][1] + dt * dt * s.P[1][1] + q00; + const double p01 = keep * (s.P[0][1] + dt * s.P[1][1]) + q01; + const double p11 = keep * keep * s.P[1][1] + q11; + s.P[0][0] = p00; + s.P[0][1] = s.P[1][0] = p01; + s.P[1][1] = p11; + } + } + + static constexpr int kSteps = 192; + static constexpr int64_t kGapNs = 250000000; + static constexpr int64_t kFutureNs = 50000000, kStaleNs = 200000000; + static constexpr double kNoise = 2.0, kMotionError = 0.3, kDampingSeconds = 0.3, kStaleDampingSeconds = 0.1; + static constexpr double kStartSpeed = 0.5; + static constexpr double kStillTurn = 0.3, kStillAccel = 0.6, kStillSeconds = 0.1, kStillSpeed = 0.05; + static constexpr double kGate = 25.0; + static constexpr int kOutliers = 3; + Step steps_[kSteps]; + Axis axes_[3]; + Vec3 lastInertial_; + int64_t lastNs_ = 0, seenNs_ = 0; + double stillSeconds_ = 0.0; + int count_ = 0, next_ = 0, outliers_ = 0; + bool ready_ = false, haveInput_ = false; +}; + +} diff --git a/tools/vr/src/hand_pose.h b/tools/vr/src/hand_pose.h new file mode 100644 index 0000000000..2d7f12ada8 --- /dev/null +++ b/tools/vr/src/hand_pose.h @@ -0,0 +1,443 @@ +#pragma once + +#include <algorithm> +#include <cmath> +#include <cstdint> + +#include "hand_skeleton.h" + +namespace droiddeck { + +constexpr int kHandJoints = 21; + +namespace hand { + +enum : int { + kWrist = 0, kThumbCmc = 1, kThumbMcp = 2, kThumbIp = 3, kThumbTip = 4, + kIndexMcp = 5, kIndexPip = 6, kIndexDip = 7, kIndexTip = 8, + kMiddleMcp = 9, kMiddleTip = 12, kRingMcp = 13, kRingTip = 16, kPinkyMcp = 17, kPinkyTip = 20, +}; + +constexpr int kPalm[5] = {kWrist, kIndexMcp, kMiddleMcp, kRingMcp, kPinkyMcp}; +constexpr int kCurlSteps = 20; + +inline double Angle(const Vec3 &a, const Vec3 &b) { + const double la = Length(a), lb = Length(b); + if (la < 1e-9 || lb < 1e-9) return 0.0; + return std::acos(std::clamp(Dot(a, b) / (la * lb), -1.0, 1.0)); +} + +inline double Bend(const Vec3 joints[kHandJoints], int finger) { + if (finger == 0) + return Angle(joints[kThumbMcp] - joints[kThumbCmc], joints[kThumbIp] - joints[kThumbMcp]) + + Angle(joints[kThumbIp] - joints[kThumbMcp], joints[kThumbTip] - joints[kThumbIp]); + const int mcp = kIndexMcp + (finger - 1) * 4; + return Angle(joints[mcp] - joints[kWrist], joints[mcp + 1] - joints[mcp]) + + Angle(joints[mcp + 1] - joints[mcp], joints[mcp + 2] - joints[mcp + 1]) + + Angle(joints[mcp + 2] - joints[mcp + 1], joints[mcp + 3] - joints[mcp + 2]); +} + +inline double &CurlOf(FingerCurls &c, int finger) { + switch (finger) { + case 0: return c.thumb; + case 1: return c.index; + case 2: return c.middle; + case 3: return c.ring; + default: return c.pinky; + } +} + +} + +inline void HandJoints(bool right, const FingerCurls &curls, Vec3 out[kHandJoints]) { + using namespace hand; + vr::VRBoneTransform_t bones[kHandBones]; + HandSkeleton(right, curls, bones); + const Quat wristRotation = ToQuat(bones[1].orientation); + const Vec3 wrist = ToVec(bones[1].position); + out[kWrist] = wrist; + const auto chain = [&](int first, int count, Vec3 *joints) { + Quat r = wristRotation; + Vec3 p = wrist; + for (int b = 0; b < count; b++) { + p = p + Rotate(r, ToVec(bones[first + b].position)); + r = r * ToQuat(bones[first + b].orientation); + joints[b] = p; + } + }; + chain(2, 4, &out[kThumbCmc]); + for (int f = 0; f < 4; f++) { + Vec3 joints[5]; + chain(6 + f * 5, 5, joints); + for (int j = 0; j < 4; j++) out[kIndexMcp + f * 4 + j] = joints[j + 1]; + } +} + +class HandModel { +public: + explicit HandModel(bool right) : right_(right) { + Vec3 open[kHandJoints], closed[kHandJoints]; + HandJoints(right, FingerCurls{}, open); + FingerCurls fist; + fist.thumb = fist.index = fist.middle = fist.ring = fist.pinky = 1.0; + HandJoints(right, fist, closed); + for (int i = 0; i < 5; i++) center_ = center_ + open[hand::kPalm[i]] * 0.2; + const Vec3 normal = Cross(open[hand::kIndexMcp] - open[hand::kWrist], open[hand::kPinkyMcp] - open[hand::kWrist]); + normalSign_ = Dot(normal, closed[hand::kMiddleTip] - open[hand::kMiddleTip]) >= 0.0 ? 1.0 : -1.0; + for (int s = 0; s <= hand::kCurlSteps; s++) { + FingerCurls c; + c.thumb = c.index = c.middle = c.ring = c.pinky = double(s) / hand::kCurlSteps; + Vec3 joints[kHandJoints]; + HandJoints(right, c, joints); + for (int f = 0; f < 5; f++) bends_[f][s] = hand::Bend(joints, f); + } + } + + bool Right() const { return right_; } + Vec3 PalmCenter() const { return center_; } + + bool Fit(const Vec3 joints[kHandJoints], const FingerCurls &curls, Quat *rotation, Vec3 *center, double *rms) const { + Vec3 shape[kHandJoints], palm[5], model; + HandJoints(right_, curls, shape); + for (int i = 0; i < 5; i++) model = model + shape[hand::kPalm[i]] * 0.2; + for (int i = 0; i < 5; i++) palm[i] = shape[hand::kPalm[i]] - model; + Vec3 observed[5], mean; + for (int i = 0; i < 5; i++) mean = mean + joints[hand::kPalm[i]] * 0.2; + for (int i = 0; i < 5; i++) observed[i] = joints[hand::kPalm[i]] - mean; + double S[3][3] = {}; + for (int i = 0; i < 5; i++) { + const double m[3] = {palm[i].x, palm[i].y, palm[i].z}; + const double o[3] = {observed[i].x, observed[i].y, observed[i].z}; + for (int r = 0; r < 3; r++) + for (int c = 0; c < 3; c++) S[r][c] += m[r] * o[c]; + } + double N[4][4] = { + {S[0][0] + S[1][1] + S[2][2], S[1][2] - S[2][1], S[2][0] - S[0][2], S[0][1] - S[1][0]}, + {S[1][2] - S[2][1], S[0][0] - S[1][1] - S[2][2], S[0][1] + S[1][0], S[2][0] + S[0][2]}, + {S[2][0] - S[0][2], S[0][1] + S[1][0], -S[0][0] + S[1][1] - S[2][2], S[1][2] + S[2][1]}, + {S[0][1] - S[1][0], S[2][0] + S[0][2], S[1][2] + S[2][1], -S[0][0] - S[1][1] + S[2][2]}, + }; + double q[4]; + if (!LargestEigenvector(N, q)) return false; + const Quat fitted = Normalize({q[0], q[1], q[2], q[3]}); + double squares = 0.0; + for (int i = 0; i < 5; i++) { + const Vec3 d = Rotate(fitted, palm[i]) - observed[i]; + squares += Dot(d, d); + } + *rotation = fitted; + if (center) *center = model; + if (rms) *rms = std::sqrt(squares / 5.0); + return true; + } + + Vec3 PalmNormal(const Vec3 joints[kHandJoints]) const { + const Vec3 n = Cross(joints[hand::kIndexMcp] - joints[hand::kWrist], joints[hand::kPinkyMcp] - joints[hand::kWrist]); + const double length = Length(n); + return length > 1e-9 ? n * (normalSign_ / length) : Vec3{}; + } + + FingerCurls Curls(const Vec3 joints[kHandJoints]) const { + FingerCurls out; + for (int f = 0; f < 5; f++) { + const double bend = hand::Bend(joints, f); + const double *table = bends_[f]; + double curl = bend <= table[0] ? 0.0 : 1.0; + for (int s = 0; s < hand::kCurlSteps; s++) { + if (bend < table[s] || bend > table[s + 1]) continue; + const double span = table[s + 1] - table[s]; + curl = (s + (span > 1e-9 ? (bend - table[s]) / span : 0.0)) / hand::kCurlSteps; + break; + } + hand::CurlOf(out, f) = curl; + } + return out; + } + +private: + static bool LargestEigenvector(double A[4][4], double out[4]) { + double V[4][4] = {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}; + for (int sweep = 0; sweep < 50; sweep++) { + double off = 0.0; + for (int p = 0; p < 4; p++) + for (int r = p + 1; r < 4; r++) off += A[p][r] * A[p][r]; + if (off < 1e-24) break; + for (int p = 0; p < 4; p++) + for (int r = p + 1; r < 4; r++) { + if (std::fabs(A[p][r]) < 1e-30) continue; + const double theta = (A[r][r] - A[p][p]) / (2.0 * A[p][r]); + const double t = (theta >= 0.0 ? 1.0 : -1.0) / (std::fabs(theta) + std::sqrt(theta * theta + 1.0)); + const double c = 1.0 / std::sqrt(t * t + 1.0), s = t * c; + for (int k = 0; k < 4; k++) { + const double akp = A[k][p], akr = A[k][r]; + A[k][p] = c * akp - s * akr; + A[k][r] = s * akp + c * akr; + } + for (int k = 0; k < 4; k++) { + const double apk = A[p][k], ark = A[r][k]; + A[p][k] = c * apk - s * ark; + A[r][k] = s * apk + c * ark; + } + for (int k = 0; k < 4; k++) { + const double vkp = V[k][p], vkr = V[k][r]; + V[k][p] = c * vkp - s * vkr; + V[k][r] = s * vkp + c * vkr; + } + } + } + int best = 0; + for (int i = 1; i < 4; i++) + if (A[i][i] > A[best][best]) best = i; + double length = 0.0; + for (int k = 0; k < 4; k++) length += V[k][best] * V[k][best]; + if (!(length > 1e-12)) return false; + for (int k = 0; k < 4; k++) out[k] = V[k][best] / std::sqrt(length); + return true; + } + + bool right_; + Vec3 center_; + double normalSign_ = 1.0; + double bends_[5][hand::kCurlSteps + 1] = {}; +}; + +class Debounce { +public: + bool Update(bool in, int64_t nowNs, int64_t onNs, int64_t offNs) { + if (in == on_) { + pending_ = false; + return on_; + } + if (!pending_) { + pending_ = true; + sinceNs_ = nowNs; + } + if (nowNs - sinceNs_ >= (in ? onNs : offNs)) { + on_ = in; + pending_ = false; + } + return on_; + } + void Reset() { on_ = pending_ = false; } + bool On() const { return on_; } + +private: + bool on_ = false, pending_ = false; + int64_t sinceNs_ = 0; +}; + +struct HandButtons { + float trigger = 0.0f, grip = 0.0f; + bool triggerClick = false, triggerTouch = false, gripClick = false; + bool a = false, b = false, system = false, facing = false; +}; + +class HandGestures { +public: + explicit HandGestures(bool right) : right_(right) {} + + HandButtons Update(const HandModel &model, const Vec3 joints[kHandJoints], const FingerCurls &curls, const Vec3 &palm, + const Vec3 &head, int64_t nowNs) { + using namespace hand; + const double index = Length(joints[kThumbTip] - joints[kIndexTip]); + const double middle = Length(joints[kThumbTip] - joints[kMiddleTip]); + const double ring = Length(joints[kThumbTip] - joints[kRingTip]); + const Vec3 toHead = head - palm; + const double distance = Length(toHead); + const bool towards = distance > 1e-6 && Dot(model.PalmNormal(joints), toHead * (1.0 / distance)) > kFacing; + HandButtons out; + out.facing = facing_.Update(towards, nowNs, kFacingOnNs, kOffNs); + const double fist = (curls.middle + curls.ring + curls.pinky) / 3.0; + out.grip = (float)std::clamp((fist - kGripStart) / (kGripFull - kGripStart), 0.0, 1.0); + out.gripClick = grip_.Update(gripClick_ ? out.grip > kGripRelease : out.grip >= 1.0f, nowNs, kOnNs, kOffNs); + gripClick_ = out.gripClick; + const bool pinch = pinch_.Update(index < (pinchHeld_ ? kPinchOff : kPinchOn), nowNs, kOnNs, kOffNs); + pinchHeld_ = pinch; + const bool loose = out.grip < 0.5f; + const bool aPinch = a_.Update(loose && !pinch && Touched(ring, a_.On()), nowNs, kOnNs, kOffNs); + const bool bPinch = b_.Update(loose && !pinch && Touched(middle, b_.On()), nowNs, kOnNs, kOffNs); + if (out.facing) { + if (right_) out.system = pinch; + else out.b = pinch; + return out; + } + out.trigger = (float)std::clamp((kPinchFar - index) / (kPinchFar - kPinchNear), 0.0, 1.0); + out.triggerClick = pinch; + out.triggerTouch = out.trigger > 0.0f; + out.a = aPinch; + out.b = bPinch; + return out; + } + + void Reset() { + pinch_.Reset(); + a_.Reset(); + b_.Reset(); + grip_.Reset(); + facing_.Reset(); + pinchHeld_ = gripClick_ = false; + } + + static constexpr double kPinchOn = 0.035, kPinchOff = 0.045, kPinchNear = 0.03, kPinchFar = 0.06; + static constexpr double kTouchOn = 0.025, kTouchOff = 0.035; + static constexpr double kGripStart = 0.35, kGripFull = 0.75, kGripRelease = 0.7; + static constexpr double kFacing = 0.6; + static constexpr int64_t kOnNs = 50000000, kOffNs = 100000000, kFacingOnNs = 300000000; + +private: + static bool Touched(double distance, bool held) { return distance < (held ? kTouchOff : kTouchOn); } + + bool right_; + Debounce pinch_, a_, b_, grip_, facing_; + bool pinchHeld_ = false, gripClick_ = false; +}; + +class SmoothTurn { +public: + void Reset() { ready_ = false; } + + Quat Update(const Quat &target, double dt) { + if (!ready_) { + at_ = last_ = target; + speed_ = 0.0; + ready_ = true; + return at_; + } + if (!(dt > 0.0)) return at_; + const double moved = AngleDegrees(Conjugate(last_) * target) * M_PI / 180.0; + last_ = target; + speed_ += (moved / dt - speed_) * Alpha(dt, kSpeedCutoff); + at_ = Nlerp(at_, target, Alpha(dt, kMinCutoff + kBeta * speed_)); + return at_; + } + + static constexpr double kMinCutoff = 1.0, kBeta = 0.2, kSpeedCutoff = 1.0; + +private: + static double Alpha(double dt, double hz) { return 1.0 / (1.0 + 1.0 / (2.0 * M_PI * hz * dt)); } + + bool ready_ = false; + Quat at_, last_; + double speed_ = 0.0; +}; + +class SmoothPoint { +public: + void Reset() { ready_ = false; } + + Vec3 Update(const Vec3 &target, double dt) { + if (!ready_) { + at_ = target; + speed_ = 0.0; + velocity_ = Vec3{}; + ready_ = true; + return at_; + } + if (!(dt > 0.0)) return at_; + const Vec3 before = at_; + speed_ += (Length(target - at_) / dt - speed_) * Alpha(dt, kSpeedCutoff); + at_ = at_ + (target - at_) * Alpha(dt, kMinCutoff + kBeta * speed_); + velocity_ = velocity_ + ((at_ - before) * (1.0 / dt) - velocity_) * Alpha(dt, kSpeedCutoff); + return at_; + } + + Vec3 Velocity() const { return velocity_; } + + static constexpr double kMinCutoff = 1.0, kBeta = 0.5, kSpeedCutoff = 1.0; + +private: + static double Alpha(double dt, double hz) { return 1.0 / (1.0 + 1.0 / (2.0 * M_PI * hz * dt)); } + + bool ready_ = false; + Vec3 at_, velocity_; + double speed_ = 0.0; +}; + +struct CameraHandPose { + bool visible = false; + Quat rotation; + Vec3 position, velocity; + FingerCurls curls; + HandButtons buttons; +}; + +class CameraHand { +public: + explicit CameraHand(bool right) : model_(right), gestures_(right) {} + + void Reset() { + Hide(); + shown_ = false; + } + + void See(int64_t timeNs, const Vec3 &palm, const Vec3 *joints, const Vec3 &head, int64_t nowNs) { + if (!joints) return; + const FingerCurls curls = model_.Curls(joints); + Quat rotation; + Vec3 center; + double rms = 1.0; + if (!model_.Fit(joints, curls, &rotation, ¢er, &rms) || rms > kMaxRms) return; + palm_ = palm; + seenNs_ = timeNs; + rms_ = rms; + if (seen_ && AngleDegrees(Conjugate(target_) * rotation) > kMaxTurnDegrees) { + const bool agrees = pending_ && AngleDegrees(Conjugate(pendingTurn_) * rotation) < kAgreeDegrees; + pending_ = !agrees; + pendingTurn_ = rotation; + if (!agrees) return; + } + pending_ = false; + seen_ = true; + target_ = rotation; + center_ = center; + targetCurls_ = curls; + buttons_ = gestures_.Update(model_, joints, curls, palm, head, nowNs); + } + + CameraHandPose Update(int64_t nowNs, double dt) { + CameraHandPose out; + if (!seen_ || nowNs - seenNs_ > kHoldNs) { + if (shown_) Hide(); + shown_ = false; + return out; + } + if (!shown_) curls_ = targetCurls_; + shown_ = true; + const double follow = 1.0 - std::exp(-std::max(dt, 0.0) / kCurlSeconds); + for (int f = 0; f < 5; f++) hand::CurlOf(curls_, f) += (hand::CurlOf(targetCurls_, f) - hand::CurlOf(curls_, f)) * follow; + out.visible = true; + out.rotation = turn_.Update(target_, dt); + out.position = place_.Update(palm_, dt) - Rotate(out.rotation, center_); + out.velocity = place_.Velocity(); + out.curls = curls_; + out.buttons = buttons_; + return out; + } + + double Rms() const { return rms_; } + + static constexpr double kMaxRms = 0.02, kCurlSeconds = 0.08, kMaxTurnDegrees = 45.0, kAgreeDegrees = 25.0; + static constexpr int64_t kHoldNs = 500000000; + +private: + void Hide() { + place_.Reset(); + turn_.Reset(); + gestures_.Reset(); + buttons_ = HandButtons(); + seen_ = pending_ = false; + } + + HandModel model_; + HandGestures gestures_; + SmoothPoint place_; + SmoothTurn turn_; + Quat target_, pendingTurn_; + Vec3 center_, palm_; + FingerCurls targetCurls_, curls_; + HandButtons buttons_; + int64_t seenNs_ = 0; + double rms_ = 0.0; + bool seen_ = false, pending_ = false, shown_ = false; +}; +} diff --git a/tools/vr/src/hand_skeleton.h b/tools/vr/src/hand_skeleton.h new file mode 100644 index 0000000000..8ade4a609d --- /dev/null +++ b/tools/vr/src/hand_skeleton.h @@ -0,0 +1,128 @@ +// Adapted from Valve's OpenVR handskeletonsimulation driver sample (BSD-3-Clause, see OPENVR_LICENSE), +// which follows Moshi Turner's hand simulation in Monado. +#pragma once + +#include "arm_model.h" +#include "openvr_driver.h" + +namespace droiddeck { + +constexpr uint32_t kHandBones = 31; + +struct FingerCurls { + double thumb = 0.0, index = 0.0, middle = 0.0, ring = 0.0, pinky = 0.0; +}; + +namespace hand { + +constexpr double kDegree = M_PI / 180.0; + +constexpr double kLengths[5][5] = { + {0.05, 0.05, 0.035, 0.025, 0.0}, + {0.03, 0.073, 0.045, 0.025, 0.02}, + {0.01, 0.091, 0.049, 0.03, 0.02}, + {0.02, 0.073, 0.045, 0.03, 0.03}, + {0.03, 0.067, 0.03, 0.025, 0.02}, +}; + +struct Joint { + double swing[2] = {0.0, 0.0}; + double twist = 0.0; +}; + +struct Finger { + Joint metacarpal, proximal; + double intermediate = 0.0, distal = 0.0; +}; + +inline Quat SwingTwist(const Joint &j) { + const double squared = j.swing[0] * j.swing[0] + j.swing[1] * j.swing[1]; + const double cosTwist = std::cos(j.twist * 0.5), sinTwist = std::sin(j.twist * 0.5); + double cosSwing = 1.0, sinOver = 0.5; + if (squared > 0.0) { + const double theta = std::sqrt(squared); + cosSwing = std::cos(theta * 0.5); + sinOver = std::sin(theta * 0.5) / theta; + } + return {cosSwing * cosTwist, cosSwing * sinTwist, + j.swing[1] * cosTwist * sinOver - j.swing[0] * sinTwist * sinOver, + j.swing[0] * cosTwist * sinOver + j.swing[1] * sinTwist * sinOver}; +} + +inline Quat AboutZ(double radians) { return {std::cos(radians * 0.5), 0.0, 0.0, std::sin(radians * 0.5)}; } + +inline vr::VRBoneTransform_t Bone(bool right, const Quat &q, Vec3 position) { + if (right) position.x = -position.x; + vr::VRBoneTransform_t t; + t.position = {{(float)position.x, (float)position.y, (float)position.z, 1.0f}}; + t.orientation = {(float)q.w, (float)q.x, (float)q.y, (float)q.z}; + return t; +} + +inline vr::VRBoneTransform_t Metacarpal(bool right, const Quat &orientation, double length) { + Quat q = Quat{0.5, 0.5, -0.5, 0.5} * orientation; + const Vec3 position = Rotate(q, {length, 0.0, 0.0}); + if (right) q = {q.x, -q.w, q.z, -q.y}; + return Bone(right, q, position); +} + +inline Quat ToQuat(const vr::HmdQuaternionf_t &q) { return {q.w, q.x, q.y, q.z}; } +inline Vec3 ToVec(const vr::HmdVector4_t &v) { return {v.v[0], v.v[1], v.v[2]}; } + +} + +inline void HandSkeleton(bool right, const FingerCurls &curls, vr::VRBoneTransform_t out[kHandBones]) { + using namespace hand; + out[0] = {{{0.0f, 0.0f, 0.0f, 1.0f}}, {1.0f, 0.0f, 0.0f, 0.0f}}; + out[1] = {{{-0.034038f, 0.036503f, 0.164722f, 1.0f}}, {-0.055147f, -0.078608f, -0.920279f, 0.379296f}}; + if (right) { + out[1].position.v[0] = -out[1].position.v[0]; + out[1].orientation.y = -out[1].orientation.y; + out[1].orientation.z = -out[1].orientation.z; + } + + Joint thumbMetacarpal, thumbProximal; + thumbMetacarpal.swing[0] = 10 * kDegree + curls.thumb * 5 * kDegree; + thumbMetacarpal.swing[1] = 40 * kDegree; + thumbProximal.swing[0] = curls.thumb * 90 * kDegree; + const double thumbDistal = curls.thumb * 90 * kDegree; + out[2] = Metacarpal(right, SwingTwist(thumbMetacarpal), kLengths[0][0]); + out[3] = Bone(right, SwingTwist(thumbProximal), {kLengths[0][1], 0.0, 0.0}); + out[4] = Bone(right, AboutZ(thumbDistal), {kLengths[0][2], 0.0, 0.0}); + out[5] = Bone(right, Quat{}, {kLengths[0][3], 0.0, 0.0}); + + const double metacarpalSplay[4] = {13.0, 0.0, -15.0, -27.0}; + const double proximalSplay[4] = {3.0, 0.0, -1.0, -2.0}; + const double fingerCurls[4] = {curls.index, curls.middle, curls.ring, curls.pinky}; + for (int f = 0; f < 4; f++) { + Finger finger; + finger.metacarpal.swing[0] = fingerCurls[f] * 5 * kDegree; + finger.metacarpal.swing[1] = metacarpalSplay[f] * kDegree; + finger.proximal.swing[0] = fingerCurls[f] * 90 * kDegree; + finger.proximal.swing[1] = proximalSplay[f] * kDegree; + finger.intermediate = 5 * kDegree + fingerCurls[f] * 80 * kDegree; + finger.distal = 5 * kDegree + fingerCurls[f] * 80 * kDegree; + const int base = 6 + f * 5; + const double *length = kLengths[f + 1]; + out[base] = Metacarpal(right, SwingTwist(finger.metacarpal), length[0]); + out[base + 1] = Bone(right, SwingTwist(finger.proximal), {length[1], 0.0, 0.0}); + out[base + 2] = Bone(right, AboutZ(finger.intermediate), {length[2], 0.0, 0.0}); + out[base + 3] = Bone(right, AboutZ(finger.distal), {length[3], 0.0, 0.0}); + out[base + 4] = Bone(right, Quat{}, {length[4], 0.0, 0.0}); + } + + const int distal[5] = {4, 9, 14, 19, 24}; + for (int f = 0; f < 5; f++) { + const int first = f == 0 ? 2 : 6 + (f - 1) * 5; + Quat rotation = ToQuat(out[1].orientation); + Vec3 position = ToVec(out[1].position); + for (int b = first; b <= distal[f]; b++) { + position = position + Rotate(rotation, ToVec(out[b].position)); + rotation = rotation * ToQuat(out[b].orientation); + } + out[26 + f] = {{{(float)position.x, (float)position.y, (float)position.z, 1.0f}}, + {(float)rotation.w, (float)rotation.x, (float)rotation.y, (float)rotation.z}}; + } +} + +} diff --git a/tools/vr/src/handcam_shm.h b/tools/vr/src/handcam_shm.h new file mode 100644 index 0000000000..732b25a4fe --- /dev/null +++ b/tools/vr/src/handcam_shm.h @@ -0,0 +1,51 @@ +#ifndef HANDCAM_SHM_H +#define HANDCAM_SHM_H +#include <stddef.h> +#include <stdint.h> + +#define DROIDDECK_HANDCAM_MAGIC 0x4D434844u +#define DROIDDECK_HANDCAM_VERSION 2u +#define DROIDDECK_HANDCAM_JOINT_COUNT 21 +#define DROIDDECK_HANDCAM_FILE "droiddeck-handcam" + +enum { + DROIDDECK_HANDCAM_RUNNING = 1u << 0, + DROIDDECK_HANDCAM_FACE = 1u << 1, + DROIDDECK_HANDCAM_BARE_HANDS = 1u << 2, +}; + +enum { + DROIDDECK_HANDCAM_SEEN = 1u << 0, + DROIDDECK_HANDCAM_ESTIMATED = 1u << 1, + DROIDDECK_HANDCAM_JOINTS = 1u << 2, +}; + +struct droiddeck_handcam_hand { + uint32_t flags; + float position[3]; + float joints[DROIDDECK_HANDCAM_JOINT_COUNT][3]; +}; + +struct droiddeck_handcam { + uint32_t magic; + uint32_t version; + uint32_t seq; + uint32_t flags; + int64_t time_ns; + uint32_t frame; + float face_yaw; + struct droiddeck_handcam_hand hands[2]; +}; + +#ifdef __cplusplus +#define DROIDDECK_HANDCAM_ASSERT static_assert +#else +#define DROIDDECK_HANDCAM_ASSERT _Static_assert +#endif +DROIDDECK_HANDCAM_ASSERT(offsetof(struct droiddeck_handcam_hand, joints) == 16, "handcam hand layout"); +DROIDDECK_HANDCAM_ASSERT(sizeof(struct droiddeck_handcam_hand) == 268, "handcam hand layout"); +DROIDDECK_HANDCAM_ASSERT(offsetof(struct droiddeck_handcam, time_ns) == 16, "handcam layout"); +DROIDDECK_HANDCAM_ASSERT(offsetof(struct droiddeck_handcam, hands) == 32, "handcam layout"); +DROIDDECK_HANDCAM_ASSERT(sizeof(struct droiddeck_handcam) == 568, "handcam layout"); + +#endif diff --git a/tools/vr/src/index_pose.h b/tools/vr/src/index_pose.h new file mode 100644 index 0000000000..79a301eb56 --- /dev/null +++ b/tools/vr/src/index_pose.h @@ -0,0 +1,17 @@ +// Index controller tip and grip offsets in its raw frame, as Monado's vive_poses.c (BSL-1.0) lists them; see docs/third-party/joycon. +#pragma once + +#include "arm_model.h" + +namespace droiddeck { + +inline Quat IndexTipRotation(bool right) { + return AboutY((right ? 5.0 : -5.0) * M_PI / 180.0) * AboutX(-40.0 * M_PI / 180.0); +} + +inline void IndexRawPose(bool right, const Quat &aim, const Vec3 &grip, Quat *raw, Vec3 *position) { + *raw = Normalize(aim * Conjugate(IndexTipRotation(right))); + *position = grip - Rotate(*raw, {0.0, -0.015, 0.13}); +} + +} diff --git a/tools/vr/src/joycon_shm.h b/tools/vr/src/joycon_shm.h new file mode 100644 index 0000000000..3655b9abdd --- /dev/null +++ b/tools/vr/src/joycon_shm.h @@ -0,0 +1,61 @@ +#ifndef JOYCON_SHM_H +#define JOYCON_SHM_H +#include <stddef.h> +#include <stdint.h> + +#define DROIDDECK_JOYCON_MAGIC 0x4E434A44u +#define DROIDDECK_JOYCON_VERSION 3u +#define DROIDDECK_JOYCON_FILE "droiddeck-joycon" +#define DROIDDECK_JOYCON_RUMBLE_SLOT 0x100u + +enum { + DROIDDECK_JOYCON_CONNECTED = 1u << 0, + DROIDDECK_JOYCON_CHARGING = 1u << 1, +}; + +enum { + DROIDDECK_JOYCON_TRIGGER = 1u << 0, + DROIDDECK_JOYCON_GRIP = 1u << 1, + DROIDDECK_JOYCON_A = 1u << 2, + DROIDDECK_JOYCON_B = 1u << 3, + DROIDDECK_JOYCON_STICK = 1u << 4, + DROIDDECK_JOYCON_SYSTEM = 1u << 5, +}; + +struct droiddeck_joycon_hand { + uint32_t flags; + uint32_t buttons; + float rotation[4]; + float angular_velocity[3]; + float stick[2]; + float battery; + uint32_t recenter; + uint32_t pad; + int64_t time_ns; + float displacement[3]; + float velocity[3]; + float inertial_velocity[3]; + uint32_t reserved; +}; + +struct droiddeck_joycon { + uint32_t magic; + uint32_t version; + uint32_t seq; + uint32_t reserved; + struct droiddeck_joycon_hand hands[2]; +}; + +#ifdef __cplusplus +#define DROIDDECK_JOYCON_ASSERT static_assert +#else +#define DROIDDECK_JOYCON_ASSERT _Static_assert +#endif +DROIDDECK_JOYCON_ASSERT(sizeof(struct droiddeck_joycon_hand) == 104, "joycon hand layout"); +DROIDDECK_JOYCON_ASSERT(offsetof(struct droiddeck_joycon_hand, time_ns) == 56, "joycon hand layout"); +DROIDDECK_JOYCON_ASSERT(offsetof(struct droiddeck_joycon_hand, displacement) == 64, "joycon hand layout"); +DROIDDECK_JOYCON_ASSERT(offsetof(struct droiddeck_joycon_hand, inertial_velocity) == 88, "joycon hand layout"); +DROIDDECK_JOYCON_ASSERT(sizeof(struct droiddeck_joycon) == 224, "joycon layout"); +DROIDDECK_JOYCON_ASSERT(offsetof(struct droiddeck_joycon, hands) == 16, "joycon layout"); + +#endif diff --git a/tools/vr/src/luma_joycon.h b/tools/vr/src/luma_joycon.h new file mode 100644 index 0000000000..887fbdd876 --- /dev/null +++ b/tools/vr/src/luma_joycon.h @@ -0,0 +1,67 @@ +#pragma once +#include "arm_model.h" +#include "spatial_tracking.h" + +namespace droiddeck { + +struct LumaJoyConPose { + Vec3 position; + bool valid = false, camera = false; +}; + +class LumaJoyConPosition { +public: + explicit LumaJoyConPosition(bool right) : side_(right ? 1 : 0), arm_(right) {} + + void Reset() { arm_.Reset(); motion_.Reset(); shown_ = false; blend_ = {}; lastCamera_ = {}; } + + LumaJoyConPose Update(const droiddeck_spatialpose &spatial, const Quat &rotation, + double angularSpeed, int64_t now, double dt) { + if (!(spatial.flags & DD_SPATIAL_ACTIVE) || !(spatial.flags & DD_SPATIAL_JOYCONS) || + !SpatialFresh(spatial.head, now)) { + Reset(); + return {}; + } + if (connection_ != spatial.connection || origin_ != spatial.origin) { + Reset(); + connection_ = spatial.connection; origin_ = spatial.origin; + } + dt = std::clamp(dt, 0.0, 0.1); + const auto &h = spatial.head; + const Vec3 head{h.position[0], h.position[1], h.position[2]}; + const Quat headRotation{h.rotation[3], h.rotation[0], h.rotation[1], h.rotation[2]}; + const Vec3 estimate = arm_.Update(head, headRotation, rotation, angularSpeed, dt); + const auto &observation = spatial.hands[side_]; + const auto &p = observation.pose.position; + const Vec3 measured{p[0], p[1], p[2]}; + if (SpatialHandFresh(observation, now) && Length(measured - head) <= 1.5 && + observation.pose.time_ns > lastCamera_.time_ns) { + motion_.Observe(measured, observation.pose.time_ns); + lastCamera_ = observation.pose; + } + const bool camera = SpatialFresh(lastCamera_, now, 200000000LL); + if (camera) { + const Vec3 source{lastCamera_.position[0], lastCamera_.position[1], lastCamera_.position[2]}; + position_ = shown_ ? position_ + (source - position_) * motion_.PositionAlpha(dt) : source; + blend_ = {}; + } else { + motion_.Reset(); + if (shown_ && camera_) blend_ = position_ - estimate; + blend_ = blend_ * std::exp(-dt / .18); + position_ = estimate + blend_; + } + shown_ = true; camera_ = camera; + return {position_, true, camera}; + } + +private: + const int side_; + ArmModel arm_; + AdaptivePositionMotion motion_; + uint64_t connection_ = 0, origin_ = 0; + bool shown_ = false, camera_ = false; + Vec3 position_, blend_; + dd_spatial_pose lastCamera_{}; +}; + +} diff --git a/tools/vr/src/openvr_driver.h b/tools/vr/src/openvr_driver.h new file mode 100644 index 0000000000..a781cacb6a --- /dev/null +++ b/tools/vr/src/openvr_driver.h @@ -0,0 +1,4099 @@ +#pragma once + +//========= Copyright Valve Corporation ============// + +#ifndef _OPENVR_DRIVER_API +#define _OPENVR_DRIVER_API + +#include <stdint.h> + + + + +namespace vr +{ + static const uint32_t k_nSteamVRVersionMajor = 2; + static const uint32_t k_nSteamVRVersionMinor = 15; + static const uint32_t k_nSteamVRVersionBuild = 6; +} + + +#ifndef _INCLUDE_CORE_VRTYPES_PUBLIC_H +#define _INCLUDE_CORE_VRTYPES_PUBLIC_H + +namespace vr +{ +#pragma pack( push, 8 ) + +typedef uint32_t PropertyTypeTag_t; + +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix33_t +{ + float m[3][3]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuaternionf_t +{ + float w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +struct VRBoneTransform_t +{ + HmdVector4_t position; + HmdQuaternionf_t orientation; +}; + +struct VREyeTrackingData_t +{ + bool bActive; + bool bValid; + bool bTracked; + + vr::HmdVector3_t vGazeOrigin; + vr::HmdVector3_t vGazeTarget; +}; + +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_Invalid = -1, + TextureType_DirectX = 0, + TextureType_OpenGL = 1, + TextureType_Vulkan = 2, + TextureType_IOSurface = 3, + TextureType_DirectX12 = 4, + TextureType_DXGISharedHandle = 5, + + TextureType_Metal = 6, + + + + TextureType_Reserved = 7, + TextureType_SharedTextureHandle = 8, +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, + ColorSpace_Gamma = 1, + ColorSpace_Linear = 2, +}; + +struct Texture_t +{ + void* handle; + ETextureType eType; + EColorSpace eColorSpace; +}; + +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +struct VRTextureWithPose_t : public Texture_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; +}; + +struct VRTextureDepthInfo_t +{ + void* handle; + HmdMatrix44_t mProjection; + HmdVector2_t vRange; +}; + +struct VRTextureWithDepth_t : public Texture_t +{ + VRTextureDepthInfo_t depth; +}; + +struct VRTextureWithPoseAndDepth_t : public VRTextureWithPose_t +{ + VRTextureDepthInfo_t depth; +}; + +struct VRTextureMotionInfo_t +{ + void *handle; + HmdMatrix44_t mDeltaPose; +}; + +struct VRTextureWithMotion_t : VRTextureWithPoseAndDepth_t +{ + VRTextureMotionInfo_t motion; +}; + +#if defined(__linux__) || defined(__APPLE__) +typedef uint64_t vrshared_uint64_t __attribute__ ((aligned(8))); +typedef double vrshared_double __attribute__ ((aligned(8))); +#else +typedef uint64_t vrshared_uint64_t; +typedef double vrshared_double; +#endif + +static const uint32_t MaxDmabufPlaneCount = 4; + +struct DmabufPlane_t +{ + uint32_t unOffset; + uint32_t unStride; + int32_t nFd; +}; + +struct DmabufAttributes_t +{ + void *pNext; + + uint32_t unWidth; + uint32_t unHeight; + uint32_t unDepth; + uint32_t unMipLevels; + uint32_t unArrayLayers; + uint32_t unSampleCount; + uint32_t unFormat; + uint64_t ulModifier; + + uint32_t unPlaneCount; + DmabufPlane_t plane[MaxDmabufPlaneCount]; +}; + +#pragma pack( pop ) + +} + +#endif + + +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +struct ID3D12Resource; +struct ID3D12CommandQueue; + +namespace vr +{ +#pragma pack( push, 8 ) + +typedef uint32_t SpatialAnchorHandle_t; + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + + +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, + + TrackingResult_Fallback_RotationOnly = 300, +}; + +typedef uint32_t DriverId_t; +static const uint32_t k_nDriverNone = 0xFFFFFFFF; + +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 64; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, + TrackedDeviceClass_HMD = 1, + TrackedDeviceClass_Controller = 2, + TrackedDeviceClass_GenericTracker = 3, + TrackedDeviceClass_TrackingReference = 4, + TrackedDeviceClass_DisplayRedirect = 5, + + TrackedDeviceClass_Max +}; + + +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, + TrackedControllerRole_LeftHand = 1, + TrackedControllerRole_RightHand = 2, + TrackedControllerRole_OptOut = 3, + TrackedControllerRole_Treadmill = 4, + TrackedControllerRole_Stylus = 5, + TrackedControllerRole_Max = 5 +}; + + +inline bool IsRoleAllowedAsHand( ETrackedControllerRole eRole ) +{ + switch ( eRole ) + { + case TrackedControllerRole_Invalid: + case TrackedControllerRole_LeftHand: + case TrackedControllerRole_RightHand: + return true; + default: + return false; + } +} + + +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; + HmdVector3_t vAngularVelocity; + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + bool bDeviceIsConnected; +}; + +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, + TrackingUniverseStanding = 1, + TrackingUniverseRawAndUncalibrated = 2, +}; + +enum EAdditionalRadioFeatures +{ + AdditionalRadioFeatures_None = 0x00000000, + AdditionalRadioFeatures_HTCLinkBox = 0x00000001, + AdditionalRadioFeatures_InternalDongle = 0x00000002, + AdditionalRadioFeatures_ExternalDongle = 0x00000004, +}; + +typedef uint64_t WebConsoleHandle_t; +#define INVALID_WEB_CONSOLE_HANDLE ((vr::WebConsoleHandle_t)0) + +typedef uint64_t PropertyContainerHandle_t; +typedef uint32_t PropertyTypeTag_t; + +static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; +static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; + +typedef PropertyContainerHandle_t DriverHandle_t; +static const PropertyContainerHandle_t k_ulInvalidDriverHandle = 0; + +static const PropertyTypeTag_t k_unFloatPropertyTag = 1; +static const PropertyTypeTag_t k_unInt32PropertyTag = 2; +static const PropertyTypeTag_t k_unUint64PropertyTag = 3; +static const PropertyTypeTag_t k_unBoolPropertyTag = 4; +static const PropertyTypeTag_t k_unStringPropertyTag = 5; +static const PropertyTypeTag_t k_unErrorPropertyTag = 6; +static const PropertyTypeTag_t k_unDoublePropertyTag = 7; + +static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; +static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; +static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; +static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; +static const PropertyTypeTag_t k_unHmdVector2PropertyTag = 24; +static const PropertyTypeTag_t k_unHmdQuadPropertyTag = 25; + +static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; +static const PropertyTypeTag_t k_unPathHandleInfoTag = 31; +static const PropertyTypeTag_t k_unActionPropertyTag = 32; +static const PropertyTypeTag_t k_unInputValuePropertyTag = 33; +static const PropertyTypeTag_t k_unWildcardPropertyTag = 34; +static const PropertyTypeTag_t k_unHapticVibrationPropertyTag = 35; +static const PropertyTypeTag_t k_unSkeletonPropertyTag = 36; + +static const PropertyTypeTag_t k_unSpatialAnchorPosePropertyTag = 40; +static const PropertyTypeTag_t k_unJsonPropertyTag = 41; +static const PropertyTypeTag_t k_unActiveActionSetPropertyTag = 42; + +static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; +static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; + + +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + Prop_ParentDriver_Uint64 = 1034, + Prop_ResourceRoot_String = 1035, + Prop_RegisteredDeviceType_String = 1036, + Prop_InputProfilePath_String = 1037, + Prop_NeverTracked_Bool = 1038, + Prop_NumCameras_Int32 = 1039, + Prop_CameraFrameLayout_Int32 = 1040, + Prop_CameraStreamFormat_Int32 = 1041, + Prop_AdditionalDeviceSettingsPath_String = 1042, + Prop_Identifiable_Bool = 1043, + Prop_BootloaderVersion_Uint64 = 1044, + Prop_AdditionalSystemReportData_String = 1045, + Prop_CompositeFirmwareVersion_String = 1046, + Prop_Firmware_RemindUpdate_Bool = 1047, + Prop_PeripheralApplicationVersion_Uint64 = 1048, + Prop_ManufacturerSerialNumber_String = 1049, + Prop_ComputedSerialNumber_String = 1050, + Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, + Prop_DevicePowerUsage_Float = 1052, + Prop_IgnoreMotionForStandby_Bool = 1053, + Prop_ActualTrackingSystemName_String = 1054, + Prop_AllowCameraToggle_Bool = 1055, + Prop_AllowLightSourceFrequency_Bool = 1056, + Prop_SteamRemoteClientID_Uint64 = 1057, + Prop_Reserved_1058 = 1058, + Prop_Reserved_1059 = 1059, + Prop_Reserved_1060 = 1060, + + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64_deprecated = Prop_Invalid, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + Prop_DisplayMCImageWidth_Int32 = 2038, + Prop_DisplayMCImageHeight_Int32 = 2039, + Prop_DisplayMCImageNumChannels_Int32 = 2040, + Prop_DisplayMCImageData_Binary = 2041, + Prop_SecondsFromPhotonsToVblank_Float = 2042, + Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043, + Prop_DisplayDebugMode_Bool = 2044, + Prop_GraphicsAdapterLuid_Uint64 = 2045, + Prop_DriverProvidedChaperonePath_String = 2048, + Prop_ExpectedTrackingReferenceCount_Int32 = 2049, + Prop_ExpectedControllerCount_Int32 = 2050, + Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, + Prop_NamedIconPathControllerRightDeviceOff_String = 2052, + Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, + Prop_DoNotApplyPrediction_Bool = 2054, + Prop_CameraToHeadTransforms_Matrix34_Array = 2055, + Prop_DistortionMeshResolution_Int32 = 2056, + Prop_DriverIsDrawingControllers_Bool = 2057, + Prop_DriverRequestsApplicationPause_Bool = 2058, + Prop_DriverRequestsReducedRendering_Bool = 2059, + Prop_MinimumIpdStepMeters_Float = 2060, + Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, + Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, + Prop_ImuToHeadTransform_Matrix34 = 2063, + Prop_ImuFactoryGyroBias_Vector3 = 2064, + Prop_ImuFactoryGyroScale_Vector3 = 2065, + Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, + Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, + Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + Prop_AdditionalRadioFeatures_Uint64 = 2070, + Prop_CameraWhiteBalance_Vector4_Array = 2071, + Prop_CameraDistortionFunction_Int32_Array = 2072, + Prop_CameraDistortionCoefficients_Float_Array = 2073, + Prop_ExpectedControllerType_String = 2074, + Prop_HmdTrackingStyle_Int32 = 2075, + Prop_DriverProvidedChaperoneVisibility_Bool = 2076, + Prop_HmdColumnCorrectionSettingPrefix_String = 2077, + Prop_CameraSupportsCompatibilityModes_Bool = 2078, + Prop_SupportsRoomViewDepthProjection_Bool = 2079, + Prop_DisplayAvailableFrameRates_Float_Array = 2080, + Prop_DisplaySupportsMultipleFramerates_Bool = 2081, + Prop_DisplayColorMultLeft_Vector3 = 2082, + Prop_DisplayColorMultRight_Vector3 = 2083, + Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084, + Prop_DisplaySupportsAnalogGain_Bool = 2085, + Prop_DisplayMinAnalogGain_Float = 2086, + Prop_DisplayMaxAnalogGain_Float = 2087, + Prop_CameraExposureTime_Float = 2088, + Prop_CameraGlobalGain_Float = 2089, + Prop_DashboardScale_Float = 2091, + Prop_Hmd_SupportsHDR10_Bool = 2093, + Prop_Hmd_EnableParallelRenderCameras_Bool = 2094, + Prop_DriverProvidedChaperoneJson_String = 2095, + Prop_ForceSystemLayerUseAppPoses_Bool = 2096, + Prop_DashboardLinkSupport_Int32 = 2097, + Prop_DisplayMinUIAnalogGain_Float = 2098, + + Prop_IpdUIRangeMinMeters_Float = 2100, + Prop_IpdUIRangeMaxMeters_Float = 2101, + Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102, + Prop_Hmd_SupportsMicMonitoring_Bool = 2103, + Prop_Hmd_SupportsDisplayPortTrainingMode_Bool = 2104, + Prop_Hmd_SupportsRoomViewDirect_Bool = 2105, + Prop_Hmd_SupportsAppThrottling_Bool = 2106, + Prop_Hmd_SupportsGpuBusMonitoring_Bool = 2107, + Prop_DriverDisplaysIPDChanges_Bool = 2108, + Prop_Reserved_2110 = 2110, + Prop_Reserved_2111 = 2111, + Prop_Reserved_2112 = 2112, + + Prop_Hmd_MaxDistortedTextureWidth_Int32 = 2113, + Prop_Hmd_MaxDistortedTextureHeight_Int32 = 2114, + Prop_Hmd_AllowSupersampleFiltering_Bool = 2115, + + Prop_Hmd_AllowsClientToControlTextureIndex = 2116, + Prop_Reserved_2117 = 2117, + + Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, + Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, + Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, + Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203, + Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204, + Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205, + Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, + Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, + Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, + + Prop_Audio_DefaultPlaybackDeviceId_String = 2300, + Prop_Audio_DefaultRecordingDeviceId_String = 2301, + Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, + Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303, + Prop_Audio_DriverManagesPlaybackVolumeControl_Bool = 2304, + Prop_Audio_DriverPlaybackVolume_Float = 2305, + Prop_Audio_DriverPlaybackMute_Bool = 2306, + Prop_Audio_DriverManagesRecordingVolumeControl_Bool = 2307, + Prop_Audio_DriverRecordingVolume_Float = 2308, + Prop_Audio_DriverRecordingMute_Bool = 2309, + + Prop_Audio_PipewirePlaybackNode_Int32 = 2400, + Prop_Audio_PipewireRecordingNode_Int32 = 2401, + + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, + Prop_Axis1Type_Int32 = 3003, + Prop_Axis2Type_Int32 = 3004, + Prop_Axis3Type_Int32 = 3005, + Prop_Axis4Type_Int32 = 3006, + Prop_ControllerRoleHint_Int32 = 3007, + + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + Prop_CanWirelessIdentify_Bool = 4007, + Prop_Nonce_Int32 = 4008, + + + Prop_IconPathName_String = 5000, + Prop_NamedIconPathDeviceOff_String = 5001, + Prop_NamedIconPathDeviceSearching_String = 5002, + Prop_NamedIconPathDeviceSearchingAlert_String = 5003, + Prop_NamedIconPathDeviceReady_String = 5004, + Prop_NamedIconPathDeviceReadyAlert_String = 5005, + Prop_NamedIconPathDeviceNotReady_String = 5006, + Prop_NamedIconPathDeviceStandby_String = 5007, + Prop_NamedIconPathDeviceAlertLow_String = 5008, + Prop_NamedIconPathDeviceStandbyAlert_String = 5009, + + + Prop_DisplayHiddenArea_Binary_Start = 5100, + Prop_DisplayHiddenArea_Binary_End = 5150, + Prop_ParentContainer = 5151, + Prop_OverrideContainer_Uint64 = 5152, + + Prop_UserConfigPath_String = 6000, + Prop_InstallPath_String = 6001, + Prop_HasDisplayComponent_Bool = 6002, + Prop_HasControllerComponent_Bool = 6003, + Prop_HasCameraComponent_Bool = 6004, + Prop_HasDriverDirectModeComponent_Bool = 6005, + Prop_HasVirtualDisplayComponent_Bool = 6006, + Prop_HasSpatialAnchorsSupport_Bool = 6007, + Prop_SupportsXrTextureSets_Bool = 6008, + Prop_SupportsXrEyeGazeInteraction_Bool = 6009, + Prop_DeviceHasNoIMU_Bool = 6010, + Prop_UseAdvancedPrediction_Bool = 6011, + + Prop_ControllerType_String = 7000, + + Prop_ControllerHandSelectionPriority_Int32 = 7002, + + + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, + + Prop_Reserved_11000 = 11000, + Prop_Reserved_11001 = 11001, + Prop_Reserved_11002 = 11002, + Prop_Reserved_11003 = 11003, + Prop_Reserved_11004 = 11004, + + Prop_TrackedDeviceProperty_Max = 1000000, +}; + +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, + TrackedProp_PermissionDenied = 10, + TrackedProp_InvalidOperation = 11, + TrackedProp_CannotWriteToWildcards = 12, + TrackedProp_IPCReadFailure = 13, + TrackedProp_OutOfMemory = 14, + TrackedProp_InvalidContainer = 15, +}; + +enum EHmdTrackingStyle +{ + HmdTrackingStyle_Unknown = 0, + + HmdTrackingStyle_Lighthouse = 1, + HmdTrackingStyle_OutsideInCameras = 2, + HmdTrackingStyle_InsideOutCameras = 3, +}; + +typedef uint64_t VRActionHandle_t; +typedef uint64_t VRActionSetHandle_t; +typedef uint64_t VRInputValueHandle_t; +typedef uint64_t VRInputComponentHandle_t; + +static const VRActionHandle_t k_ulInvalidActionHandle = 0; +static const VRActionSetHandle_t k_ulInvalidActionSetHandle = 0; +static const VRInputValueHandle_t k_ulInvalidInputValueHandle = 0; +static const VRInputComponentHandle_t k_ulInvalidInputComponentHandle = 0; + + +enum EVRSubmitFlags +{ + Submit_Default = 0x00, + + Submit_LensDistortionAlreadyApplied = 0x01, + + Submit_GlRenderBuffer = 0x02, + + Submit_Reserved = 0x04, + + Submit_TextureWithPose = 0x08, + + Submit_TextureWithDepth = 0x10, + + Submit_FrameDiscontinuity = 0x20, + + Submit_VulkanTextureWithArrayData = 0x40, + + Submit_GlArrayTexture = 0x80, + + Submit_IsEgl = 0x100, + + Submit_TextureWithMotion = 0x200 | Submit_TextureWithPose | Submit_TextureWithDepth, + + Submit_Reserved2 = 0x08000, + Submit_Reserved3 = 0x10000, + Submit_Reserved4 = 0x20000, + Submit_Reserved5 = 0x40000, + Submit_Reserved6 = 0x80000, +}; + +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + +struct VRVulkanTextureArrayData_t : public VRVulkanTextureData_t +{ + uint32_t m_unArrayIndex; + uint32_t m_unArraySize; +}; + +struct D3D12TextureData_t +{ + ID3D12Resource *m_pResource; + ID3D12CommandQueue *m_pCommandQueue; + uint32_t m_nNodeMask; +}; + +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + VREvent_LensDistortionChanged = 110, + VREvent_PropertyChanged = 111, + VREvent_WirelessDisconnect = 112, + VREvent_WirelessReconnect = 113, + VREvent_Reserved_0114 = 114, + VREvent_Reserved_0115 = 115, + + VREvent_ButtonPress = 200, + VREvent_ButtonUnpress = 201, + VREvent_ButtonTouch = 202, + VREvent_ButtonUntouch = 203, + + + + + + + + + VREvent_Modal_Cancel = 257, + + VREvent_MouseMove = 300, + VREvent_MouseButtonDown = 301, + VREvent_MouseButtonUp = 302, + VREvent_FocusEnter = 303, + VREvent_FocusLeave = 304, + VREvent_ScrollDiscrete = 305, + VREvent_TouchPadMove = 306, + VREvent_OverlayFocusChanged = 307, + VREvent_ReloadOverlays = 308, + VREvent_ScrollSmooth = 309, + VREvent_LockMousePosition = 310, + VREvent_UnlockMousePosition = 311, + + VREvent_InputFocusCaptured = 400, + VREvent_InputFocusReleased = 401, + + + VREvent_SceneApplicationChanged = 404, + + VREvent_InputFocusChanged = 406, + + VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, + VREvent_ActionBindingReloaded = 409, + + VREvent_HideRenderModels = 410, + VREvent_ShowRenderModels = 411, + + VREvent_SceneApplicationStateChanged = 412, + + VREvent_SceneAppPipeDisconnected = 413, + + VREvent_ConsoleOpened = 420, + VREvent_ConsoleClosed = 421, + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + + + VREvent_ResetDashboard = 506, + + VREvent_ImageLoaded = 508, + VREvent_ShowKeyboard = 509, + VREvent_HideKeyboard = 510, + VREvent_OverlayGamepadFocusGained = 511, + VREvent_OverlayGamepadFocusLost = 512, + VREvent_OverlaySharedTextureChanged = 513, + + + VREvent_ScreenshotTriggered = 516, + VREvent_ImageFailed = 517, + VREvent_DashboardOverlayCreated = 518, + VREvent_SwitchGamepadFocus = 519, + + + VREvent_RequestScreenshot = 520, + VREvent_ScreenshotTaken = 521, + VREvent_ScreenshotFailed = 522, + VREvent_SubmitScreenshotToDashboard = 523, + VREvent_ScreenshotProgressToDashboard = 524, + + VREvent_PrimaryDashboardDeviceChanged = 525, + VREvent_RoomViewShown = 526, + VREvent_RoomViewHidden = 527, + VREvent_ShowUI = 528, + VREvent_ShowDevTools = 529, + VREvent_DesktopViewUpdating = 530, + VREvent_DesktopViewReady = 531, + + VREvent_StartDashboard = 532, + VREvent_ElevatePrism = 533, + VREvent_OverlayClosed = 534, + VREvent_DashboardThumbChanged = 535, + VREvent_DesktopMightBeVisible = 536, + VREvent_DesktopMightBeHidden = 537, + VREvent_MutualSteamCapabilitiesChanged = 538, + VREvent_OverlayCreated = 539, + VREvent_OverlayDestroyed = 540, + VREvent_OverlayNameChanged = 544, + + VREvent_TrackingRecordingStarted = 541, + VREvent_TrackingRecordingStopped = 542, + VREvent_SetTrackingRecordingPath = 543, + + VREvent_Reserved_0560 = 560, + VREvent_Reserved_0561 = 561, + VREvent_Reserved_0562 = 562, + VREvent_Reserved_0563 = 563, + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, + VREvent_ProcessQuit = 701, + + VREvent_QuitAcknowledged = 703, + VREvent_DriverRequestedQuit = 704, + VREvent_RestartRequested = 705, + VREvent_InvalidateSwapTextureSets = 706, + VREvent_RequestDisconnectWirelessHMD = 707, + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + VREvent_ChaperoneFlushCache = 805, + VREvent_ChaperoneRoomSetupStarting = 806, + VREvent_ChaperoneRoomSetupCommitted = 807, + VREvent_StandingZeroPoseReset = 808, + VREvent_Reserved_0809 = 809, + VREvent_Reserved_0810 = 810, + VREvent_Reserved_0811 = 811, + VREvent_Reserved_0812 = 812, + VREvent_Reserved_0813 = 813, + VREvent_Reserved_0814 = 814, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_SteamVRSectionSettingChanged = 857, + VREvent_LighthouseSectionSettingChanged = 858, + VREvent_NullSectionSettingChanged = 859, + VREvent_UserInterfaceSectionSettingChanged = 860, + VREvent_NotificationsSectionSettingChanged = 861, + VREvent_KeyboardSectionSettingChanged = 862, + VREvent_PerfSectionSettingChanged = 863, + VREvent_DashboardSectionSettingChanged = 864, + VREvent_WebInterfaceSectionSettingChanged = 865, + VREvent_TrackersSectionSettingChanged = 866, + VREvent_LastKnownSectionSettingChanged = 867, + VREvent_DismissedWarningsSectionSettingChanged = 868, + VREvent_GpuSpeedSectionSettingChanged = 869, + VREvent_WindowsMRSectionSettingChanged = 870, + VREvent_OtherSectionSettingChanged = 871, + VREvent_AnyDriverSettingsChanged = 872, + VREvent_Reserved_0873 = 873, + + VREvent_StatusUpdate = 900, + + VREvent_WebInterface_InstallDriverCompleted = 950, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, + VREvent_KeyboardOpened_Global = 1203, + VREvent_KeyboardClosed_Global = 1204, + + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + VREvent_ProcessConnected = 1306, + VREvent_ProcessDisconnected = 1307, + + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + VREvent_Compositor_DisplayDisconnected = 1412, + VREvent_Compositor_DisplayReconnected = 1413, + VREvent_Compositor_HDCPError = 1414, + VREvent_Compositor_ApplicationNotResponding = 1415, + VREvent_Compositor_ApplicationResumed = 1416, + VREvent_Compositor_OutOfVideoMemory = 1417, + VREvent_Compositor_DisplayModeNotSupported = 1418, + VREvent_Compositor_StageOverrideReady = 1419, + VREvent_Compositor_RequestDisconnectReconnect = 1420, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + VREvent_MessageOverlayCloseRequested = 1651, + + VREvent_Input_HapticVibration = 1700, + VREvent_Input_BindingLoadFailed = 1701, + VREvent_Input_BindingLoadSuccessful = 1702, + VREvent_Input_ActionManifestReloaded = 1703, + VREvent_Input_ActionManifestLoadFailed = 1704, + VREvent_Input_ProgressUpdate = 1705, + VREvent_Input_TrackerActivated = 1706, + VREvent_Input_BindingsUpdated = 1707, + VREvent_Input_BindingSubscriptionChanged = 1708, + + VREvent_SpatialAnchors_PoseUpdated = 1800, + VREvent_SpatialAnchors_DescriptorUpdated = 1801, + VREvent_SpatialAnchors_RequestPoseUpdate = 1802, + VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, + + VREvent_SystemReport_Started = 1900, + + VREvent_Monitor_ShowHeadsetView = 2000, + VREvent_Monitor_HideHeadsetView = 2001, + + VREvent_Audio_SetSpeakersVolume = 2100, + VREvent_Audio_SetSpeakersMute = 2101, + VREvent_Audio_SetMicrophoneVolume = 2102, + VREvent_Audio_SetMicrophoneMute = 2103, + + VREvent_RenderModel_CountChanged = 2200, + + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, + k_EDeviceActivityLevel_Idle_Timeout = 4, +}; + + +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_IndexController_A = k_EButton_Grip, + k_EButton_IndexController_B = k_EButton_ApplicationMenu, + k_EButton_IndexController_JoyStick = k_EButton_Axis3, + + k_EButton_Reserved0 = 50, + k_EButton_Reserved1 = 51, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +struct VREvent_Controller_t +{ + uint32_t button; +}; + + +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +struct VREvent_Mouse_t +{ + float x, y; + uint32_t button; + + uint32_t cursorIndex; +}; + +struct VREvent_Scroll_t +{ + float xdelta, ydelta; + uint32_t unused; + float viewportscale; + + uint32_t cursorIndex; +}; + +struct VREvent_TouchPadMove_t +{ + bool bFingerDown; + + float flSecondsFingerDown; + + float fValueXFirst; + float fValueYFirst; + + float fValueXRaw; + float fValueYRaw; +}; + +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; + bool bConnectionLost; +}; + + +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; + uint64_t devicePath; + uint64_t memoryBlockId; + + uint32_t cursorIndex; +}; + + +struct VREvent_Status_t +{ + uint32_t statusState; +}; + +struct VREvent_Keyboard_t +{ + char cNewInput[8]; + uint64_t uUserValue; + uint64_t overlayHandle; +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse_deprecated; + uint64_t m_nCurrentUniverse; +}; + +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; + uint64_t reserved2; + uint64_t reserved3; + uint64_t reserved4; + uint64_t reserved5; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; +}; + +struct VREvent_Property_t +{ + PropertyContainerHandle_t container; + ETrackedDeviceProperty prop; +}; + +struct VREvent_HapticVibration_t +{ + uint64_t containerHandle; + uint64_t componentHandle; + float fDurationSeconds; + float fFrequency; + float fAmplitude; +}; + +struct VREvent_WebConsole_t +{ + WebConsoleHandle_t webConsoleHandle; +}; + +struct VREvent_InputBindingLoad_t +{ + vr::PropertyContainerHandle_t ulAppContainer; + uint64_t pathMessage; + uint64_t pathUrl; + uint64_t pathControllerType; +}; + +struct VREvent_InputActionManifestLoad_t +{ + uint64_t pathAppKey; + uint64_t pathMessage; + uint64_t pathMessageParam; + uint64_t pathManifestPath; +}; + +struct VREvent_SpatialAnchor_t +{ + SpatialAnchorHandle_t unHandle; +}; + +struct VREvent_ProgressUpdate_t +{ + uint64_t ulApplicationPropertyContainer; + uint64_t pathDevice; + uint64_t pathInputSource; + uint64_t pathProgressAction; + uint64_t pathIcon; + float fProgress; +}; + +enum EShowUIType +{ + ShowUI_ControllerBinding = 0, + ShowUI_ManageTrackers = 1, + ShowUI_Pairing = 3, + ShowUI_Settings = 4, + ShowUI_DebugCommands = 5, + ShowUI_FullControllerBinding = 6, + ShowUI_ManageDrivers = 7, +}; + +struct VREvent_ShowUI_t +{ + EShowUIType eType; +}; + +struct VREvent_ShowDevTools_t +{ + int32_t nBrowserIdentifier; +}; + +enum EHDCPError +{ + HDCPError_None = 0, + HDCPError_LinkLost = 1, + HDCPError_Tampered = 2, + HDCPError_DeviceRevoked = 3, + HDCPError_Unknown = 4 +}; + +struct VREvent_HDCPError_t +{ + EHDCPError eCode; +}; + +struct VREvent_AudioVolumeControl_t +{ + float fVolumeLevel; +}; + +struct VREvent_AudioMuteControl_t +{ + bool bMute; +}; + +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; + VREvent_HapticVibration_t hapticVibration; + VREvent_WebConsole_t webConsole; + VREvent_InputBindingLoad_t inputBinding; + VREvent_InputActionManifestLoad_t actionManifest; + VREvent_SpatialAnchor_t spatialAnchor; + VREvent_ProgressUpdate_t progressUpdate; + VREvent_ShowUI_t showUi; + VREvent_ShowDevTools_t showDevTools; + VREvent_HDCPError_t hdcpError; + VREvent_AudioVolumeControl_t audioVolumeControl; + VREvent_AudioMuteControl_t audioMuteControl; +} VREvent_Data_t; + + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( push, 4 ) +#endif + +struct VREvent_t +{ + uint32_t eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + VREvent_Data_t data; +}; + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), + VRComponentProperty_IsHighlighted = (1 << 5), +}; + + +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; + HmdMatrix34_t mTrackingToComponentLocal; + VRComponentProperties uProperties; +}; + + +enum EVRInputError +{ + VRInputError_None = 0, + VRInputError_NameNotFound = 1, + VRInputError_WrongType = 2, + VRInputError_InvalidHandle = 3, + VRInputError_InvalidParam = 4, + VRInputError_NoSteam = 5, + VRInputError_MaxCapacityReached = 6, + VRInputError_IPCError = 7, + VRInputError_NoActiveActionSet = 8, + VRInputError_InvalidDevice = 9, + VRInputError_InvalidSkeleton = 10, + VRInputError_InvalidBoneCount = 11, + VRInputError_InvalidCompressedData = 12, + VRInputError_NoData = 13, + VRInputError_BufferTooSmall = 14, + VRInputError_MismatchedActionManifest = 15, + VRInputError_MissingSkeletonData = 16, + VRInputError_InvalidBoneIndex = 17, + VRInputError_InvalidPriority = 18, + VRInputError_PermissionDenied = 19, + VRInputError_InvalidRenderModel = 20, +}; + +enum EVRSpatialAnchorError +{ + VRSpatialAnchorError_Success = 0, + VRSpatialAnchorError_Internal = 1, + VRSpatialAnchorError_UnknownHandle = 2, + VRSpatialAnchorError_ArrayTooSmall = 3, + VRSpatialAnchorError_InvalidDescriptorChar = 4, + VRSpatialAnchorError_NotYetAvailable = 5, + VRSpatialAnchorError_NotAvailableInThisUniverse = 6, + VRSpatialAnchorError_PermanentlyUnavailable = 7, + VRSpatialAnchorError_WrongDriver = 8, + VRSpatialAnchorError_DescriptorTooLong = 9, + VRSpatialAnchorError_Unknown = 10, + VRSpatialAnchorError_NoRoomCalibration = 11, + VRSpatialAnchorError_InvalidArgument = 12, + VRSpatialAnchorError_UnknownDriver = 13, +}; + +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, + + k_eHiddenAreaMesh_Max = 3, +}; + + +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, +}; + + +struct VRControllerAxis_t +{ + float x; + float y; +}; + + +static const uint32_t k_unControllerStateAxisCount = 5; + + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( push, 4 ) +#endif + +struct VRControllerState001_t +{ + uint32_t unPacketNum; + + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +typedef VRControllerState001_t VRControllerState_t; + + +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, + VROverlayError_TextureAlreadyLocked = 31, + VROverlayError_TextureLockCapacityReached = 32, + VROverlayError_TextureNotLocked = 33, + VROverlayError_TimedOut = 34, +}; + +enum EVRApplicationType +{ + VRApplication_Other = 0, + VRApplication_Scene = 1, + VRApplication_Overlay = 2, + VRApplication_Background = 3, + + VRApplication_Utility = 4, + + VRApplication_VRMonitor = 5, + VRApplication_SteamWatchdog = 6, + VRApplication_Bootstrapper = 7, + VRApplication_WebHelper = 8, + VRApplication_OpenXRInstance = 9, + VRApplication_OpenXRScene = 10, + VRApplication_OpenXROverlay = 11, + VRApplication_Prism = 12, + VRApplication_RoomView = 13, + + VRApplication_Max +}; + + +inline bool IsOpenXRAppType( EVRApplicationType eType ) +{ + return eType == VRApplication_OpenXRInstance + || eType == VRApplication_OpenXRScene + || eType == VRApplication_OpenXROverlay; +} + + +inline bool BAppTypeSubmitsEyeBuffers( EVRApplicationType eType ) +{ + return eType == VRApplication_Scene + || eType == VRApplication_OpenXRScene + || eType == VRApplication_RoomView; +} + + +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, + VRNotificationError_ServiceUnavailable = 104, +}; + + +enum EVRSkeletalMotionRange +{ + VRSkeletalMotionRange_WithController = 0, + + VRSkeletalMotionRange_WithoutController = 1, +}; + +enum EVRSkeletalTrackingLevel +{ + VRSkeletalTracking_Estimated = 0, + + VRSkeletalTracking_Partial = 1, + + VRSkeletalTracking_Full = 2, + + VRSkeletalTrackingLevel_Count, + VRSkeletalTrackingLevel_Max = VRSkeletalTrackingLevel_Count - 1 +}; + + +typedef int32_t BoneIndex_t; +const BoneIndex_t k_unInvalidBoneIndex = -1; + + + +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, + VRInitError_Init_InitCanceledByUser = 116, + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + VRInitError_Init_VRDashboardNotFound = 133, + VRInitError_Init_VRDashboardStartupFailed = 134, + VRInitError_Init_VRHomeNotFound = 135, + VRInitError_Init_VRHomeStartupFailed = 136, + VRInitError_Init_RebootingBusy = 137, + VRInitError_Init_FirmwareUpdateBusy = 138, + VRInitError_Init_FirmwareRecoveryBusy = 139, + VRInitError_Init_USBServiceBusy = 140, + VRInitError_Init_VRWebHelperStartupFailed = 141, + VRInitError_Init_TrackerManagerInitFailed = 142, + VRInitError_Init_AlreadyRunning = 143, + VRInitError_Init_FailedForVrMonitor = 144, + VRInitError_Init_PropertyManagerInitFailed = 145, + VRInitError_Init_WebServerFailed = 146, + VRInitError_Init_IllegalTypeTransition = 147, + VRInitError_Init_MismatchedRuntimes = 148, + VRInitError_Init_InvalidProcessId = 149, + VRInitError_Init_VRServiceStartupFailed = 150, + VRInitError_Init_PrismNeedsNewDrivers = 151, + VRInitError_Init_PrismStartupTimedOut = 152, + VRInitError_Init_CouldNotStartPrism = 153, + VRInitError_Init_PrismClientInitFailed = 154, + VRInitError_Init_PrismClientStartFailed = 155, + VRInitError_Init_PrismExitedUnexpectedly = 156, + VRInitError_Init_BadLuid = 157, + VRInitError_Init_NoServerForAppContainer = 158, + VRInitError_Init_DuplicateBootstrapper = 159, + VRInitError_Init_VRDashboardServicePending = 160, + VRInitError_Init_VRDashboardServiceTimeout = 161, + VRInitError_Init_VRDashboardServiceStopped = 162, + VRInitError_Init_VRDashboardAlreadyStarted = 163, + VRInitError_Init_VRDashboardCopyFailed = 164, + VRInitError_Init_VRDashboardTokenFailure = 165, + VRInitError_Init_VRDashboardEnvironmentFailure = 166, + VRInitError_Init_VRDashboardPathFailure = 167, + VRInitError_Init_InstallationTooOld = 168, + VRInitError_Init_ClientVersionAlreadyProvided = 169, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + VRInitError_Driver_HmdDisplayNotFoundLaptop = 213, + VRInitError_Driver_PeerDriverNotInstalled = 214, + VRInitError_Driver_WirelessHmdNotConnected = 215, + + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + VRInitError_IPC_ConnectFailedAfterTargetExited = 309, + VRInitError_IPC_NamespaceUnavailable = 310, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + VRInitError_Compositor_UnableToCreateDevice = 405, + VRInitError_Compositor_SharedStateIsNull = 406, + VRInitError_Compositor_NotificationManagerIsNull = 407, + VRInitError_Compositor_ResourceManagerClientIsNull = 408, + VRInitError_Compositor_MessageOverlaySharedStateInitFailure = 409, + VRInitError_Compositor_PropertiesInterfaceIsNull = 410, + VRInitError_Compositor_CreateFullscreenWindowFailed = 411, + VRInitError_Compositor_SettingsInterfaceIsNull = 412, + VRInitError_Compositor_FailedToShowWindow = 413, + VRInitError_Compositor_DistortInterfaceIsNull = 414, + VRInitError_Compositor_DisplayFrequencyFailure = 415, + VRInitError_Compositor_RendererInitializationFailed = 416, + VRInitError_Compositor_DXGIFactoryInterfaceIsNull = 417, + VRInitError_Compositor_DXGIFactoryCreateFailed = 418, + VRInitError_Compositor_DXGIFactoryQueryFailed = 419, + VRInitError_Compositor_InvalidAdapterDesktop = 420, + VRInitError_Compositor_InvalidHmdAttachment = 421, + VRInitError_Compositor_InvalidOutputDesktop = 422, + VRInitError_Compositor_InvalidDeviceProvided = 423, + VRInitError_Compositor_D3D11RendererInitializationFailed = 424, + VRInitError_Compositor_FailedToFindDisplayMode = 425, + VRInitError_Compositor_FailedToCreateSwapChain = 426, + VRInitError_Compositor_FailedToGetBackBuffer = 427, + VRInitError_Compositor_FailedToCreateRenderTarget = 428, + VRInitError_Compositor_FailedToCreateDXGI2SwapChain = 429, + VRInitError_Compositor_FailedtoGetDXGI2BackBuffer = 430, + VRInitError_Compositor_FailedToCreateDXGI2RenderTarget = 431, + VRInitError_Compositor_FailedToGetDXGIDeviceInterface = 432, + VRInitError_Compositor_SelectDisplayMode = 433, + VRInitError_Compositor_FailedToCreateNvAPIRenderTargets = 434, + VRInitError_Compositor_NvAPISetDisplayMode = 435, + VRInitError_Compositor_FailedToCreateDirectModeDisplay = 436, + VRInitError_Compositor_InvalidHmdPropertyContainer = 437, + VRInitError_Compositor_UpdateDisplayFrequency = 438, + VRInitError_Compositor_CreateRasterizerState = 439, + VRInitError_Compositor_CreateWireframeRasterizerState = 440, + VRInitError_Compositor_CreateSamplerState = 441, + VRInitError_Compositor_CreateClampToBorderSamplerState = 442, + VRInitError_Compositor_CreateAnisoSamplerState = 443, + VRInitError_Compositor_CreateOverlaySamplerState = 444, + VRInitError_Compositor_CreatePanoramaSamplerState = 445, + VRInitError_Compositor_CreateFontSamplerState = 446, + VRInitError_Compositor_CreateNoBlendState = 447, + VRInitError_Compositor_CreateBlendState = 448, + VRInitError_Compositor_CreateAlphaBlendState = 449, + VRInitError_Compositor_CreateBlendStateMaskR = 450, + VRInitError_Compositor_CreateBlendStateMaskG = 451, + VRInitError_Compositor_CreateBlendStateMaskB = 452, + VRInitError_Compositor_CreateDepthStencilState = 453, + VRInitError_Compositor_CreateDepthStencilStateNoWrite = 454, + VRInitError_Compositor_CreateDepthStencilStateNoDepth = 455, + VRInitError_Compositor_CreateFlushTexture = 456, + VRInitError_Compositor_CreateDistortionSurfaces = 457, + VRInitError_Compositor_CreateConstantBuffer = 458, + VRInitError_Compositor_CreateHmdPoseConstantBuffer = 459, + VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer = 460, + VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer = 461, + VRInitError_Compositor_CreateOverlayConstantBuffer = 462, + VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer = 463, + VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464, + VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465, + VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466, + VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467, + VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer = 468, + VRInitError_Compositor_CreateGeomConstantBuffer = 469, + VRInitError_Compositor_CreatePanelMaskConstantBuffer = 470, + VRInitError_Compositor_CreatePixelSimUBO = 471, + VRInitError_Compositor_CreateMSAARenderTextures = 472, + VRInitError_Compositor_CreateResolveRenderTextures = 473, + VRInitError_Compositor_CreateComputeResolveRenderTextures = 474, + VRInitError_Compositor_CreateDriverDirectModeResolveTextures = 475, + VRInitError_Compositor_OpenDriverDirectModeResolveTextures = 476, + VRInitError_Compositor_CreateFallbackSyncTexture = 477, + VRInitError_Compositor_ShareFallbackSyncTexture = 478, + VRInitError_Compositor_CreateOverlayIndexBuffer = 479, + VRInitError_Compositor_CreateOverlayVertexBuffer = 480, + VRInitError_Compositor_CreateTextVertexBuffer = 481, + VRInitError_Compositor_CreateTextIndexBuffer = 482, + VRInitError_Compositor_CreateMirrorTextures = 483, + VRInitError_Compositor_CreateLastFrameRenderTexture = 484, + VRInitError_Compositor_CreateMirrorOverlay = 485, + VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, + VRInitError_Compositor_DisplayModeNotSupported = 487, + VRInitError_Compositor_CreateOverlayInvalidCall = 488, + VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489, + VRInitError_Compositor_FailedToCreateMailbox = 490, + VRInitError_Compositor_WindowInterfaceIsNull = 491, + VRInitError_Compositor_SystemLayerCreateInstance = 492, + VRInitError_Compositor_SystemLayerCreateSession = 493, + VRInitError_Compositor_CreateInverseDistortUVs = 494, + VRInitError_Compositor_CreateBackbufferDepth = 495, + VRInitError_Compositor_CannotDRMLeaseDisplay = 496, + VRInitError_Compositor_CannotConnectToDisplayServer = 497, + VRInitError_Compositor_GnomeNoDRMLeasing = 498, + VRInitError_Compositor_FailedToInitializeEncoder = 499, + VRInitError_Compositor_CreateBlurTexture = 500, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, + VRInitError_VendorSpecific_OculusLinkNotEnabled = 1002, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, + VRInitError_VendorSpecific_HmdFound_UnexpectedConfiguration_1 = 1115, + + VRInitError_VendorSpecific_Oasis_UnlockRequired = 1150, + + VRInitError_VendorSpecific_VRLink_OutdatedDriverMESA = 1200, + VRInitError_VendorSpecific_VRLink_OutdatedDriverNVIDIA = 1201, + VRInitError_VendorSpecific_VRLink_NoVideoSupport = 1202, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + + VRInitError_LastError +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameLayout +{ + EVRTrackedCameraFrameLayout_Mono = 0x0001, + EVRTrackedCameraFrameLayout_Stereo = 0x0002, + EVRTrackedCameraFrameLayout_VerticalLayout = 0x0010, + EVRTrackedCameraFrameLayout_HorizontalLayout = 0x0020, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, + VRTrackedCameraFrameType_Undistorted, + VRTrackedCameraFrameType_MaximumUndistorted, + MAX_CAMERA_FRAME_TYPES +}; + +enum EVRDistortionFunctionType +{ + VRDistortionFunctionType_None, + VRDistortionFunctionType_FTheta, + VRDistortionFunctionType_Extended_FTheta, + MAX_DISTORTION_FUNCTION_TYPES, +}; + +static const uint32_t k_unMaxDistortionFunctionParameters = 8; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t trackedDevicePose; + + uint64_t ulFrameExposureTime; +}; + +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; + + + + + + +const uint32_t VRCompositor_ReprojectionMotion = 0x08; + +const uint32_t VRCompositor_PredictionMask = 0xF0; + + + + + +const uint32_t VRCompositor_ThrottleMask = 0xF00; + + + +#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) +#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 8 ) + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( push, 4 ) +#endif +struct Compositor_FrameTiming +{ + uint32_t m_nSize; + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; + uint32_t m_nNumMisPresented; + uint32_t m_nNumDroppedFrames; + uint32_t m_nReprojectionFlags; + + double m_flSystemTimeInSeconds; + + + + + + float m_flPreSubmitGpuMs; + float m_flPostSubmitGpuMs; + float m_flTotalRenderGpuMs; + float m_flCompositorRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorIdleCpuMs; + + + float m_flClientFrameIntervalMs; + float m_flPresentCallCpuMs; + float m_flWaitForPresentCpuMs; + float m_flSubmitFrameMs; + + + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; + + uint32_t m_nNumVSyncsReadyForUse; + uint32_t m_nNumVSyncsToFirstView; + + float m_flTransferLatencyMs; +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +struct Compositor_BenchmarkResults +{ + float m_flMegaPixelsPerSecond; + float m_flHmdRecommendedMegaPixelsPerSecond; +}; + +struct DriverDirectMode_FrameTiming +{ + uint32_t m_nSize; + uint32_t m_nNumFramePresents; + uint32_t m_nNumMisPresented; + uint32_t m_nNumDroppedFrames; + uint32_t m_nReprojectionFlags; +}; + + +const uint32_t VRCompositor_ReprojectionMotion_Enabled = 0x100; +const uint32_t VRCompositor_ReprojectionMotion_ForcedOn = 0x200; +const uint32_t VRCompositor_ReprojectionMotion_AppThrottled = 0x400; + + +enum EVSync +{ + VSync_None, + VSync_WaitRender, + VSync_NoWaitRender, +}; + +enum EVRMuraCorrectionMode +{ + EVRMuraCorrectionMode_Default = 0, + EVRMuraCorrectionMode_NoCorrection +}; + +enum Imu_OffScaleFlags +{ + OffScale_AccelX = 0x01, + OffScale_AccelY = 0x02, + OffScale_AccelZ = 0x04, + OffScale_GyroX = 0x08, + OffScale_GyroY = 0x10, + OffScale_GyroZ = 0x20, +}; + +struct ImuSample_t +{ + double fSampleTime; + HmdVector3d_t vAccel; + HmdVector3d_t vGyro; + uint32_t unOffScaleFlags; +}; + +enum class EVRDistortionChannel : uint32_t +{ + Red = 0, + Green, + Blue, + InverseRed, + InverseGreen, + InverseBlue, + Count +}; + +struct DistortionCoordinate_t +{ + float u, v; +}; + +#pragma pack( pop ) + +#if defined(_WIN32) + + #if !defined(OPENVR_BUILD_STATIC) + #ifdef VR_API_EXPORT + #define VR_INTERFACE extern "C" __declspec( dllexport ) + #else + #define VR_INTERFACE extern "C" __declspec( dllimport ) + #endif + #else + #define VR_INTERFACE extern "C" + #endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT + #define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else + #define VR_INTERFACE extern "C" +#endif + +#else + #error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) + #define VR_CALLTYPE __cdecl +#else + #define VR_CALLTYPE +#endif + +} +#endif + + +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + + +#ifndef _VRTRACKEDCAMERATYPES_H +#define _VRTRACKEDCAMERATYPES_H + +namespace vr +{ + +#pragma pack( push, 8 ) + +enum ECameraVideoStreamFormat +{ + CVS_FORMAT_UNKNOWN = 0, + CVS_FORMAT_RAW10 = 1, + CVS_FORMAT_NV12 = 2, + CVS_FORMAT_RGB24 = 3, + CVS_FORMAT_NV12_2 = 4, + CVS_FORMAT_YUYV16 = 5, + CVS_FORMAT_BAYER16BG = 6, + CVS_FORMAT_MJPEG = 7, + CVS_FORMAT_RGBX32 = 8, + CVS_MAX_FORMATS +}; + +enum ECameraCompatibilityMode +{ + CAMERA_COMPAT_MODE_BULK_DEFAULT = 0, + CAMERA_COMPAT_MODE_BULK_64K_DMA = 1, + CAMERA_COMPAT_MODE_BULK_16K_DMA = 2, + CAMERA_COMPAT_MODE_BULK_8K_DMA = 3, + CAMERA_COMPAT_MODE_ISO_52FPS = 4, + CAMERA_COMPAT_MODE_ISO_50FPS = 5, + CAMERA_COMPAT_MODE_ISO_48FPS = 6, + CAMERA_COMPAT_MODE_ISO_46FPS = 7, + CAMERA_COMPAT_MODE_ISO_44FPS = 8, + CAMERA_COMPAT_MODE_ISO_42FPS = 9, + CAMERA_COMPAT_MODE_ISO_40FPS = 10, + CAMERA_COMPAT_MODE_ISO_35FPS = 11, + CAMERA_COMPAT_MODE_ISO_30FPS = 12, + CAMERA_COMPAT_MODE_ISO_15FPS = 13, + MAX_CAMERA_COMPAT_MODES +}; + +enum ECameraRoomViewStyle +{ + CAMERA_ROOMVIEW_STYLE_DEFAULT = 0, + CAMERA_ROOMVIEW_STYLE_EDGE_A = 1, + CAMERA_ROOMVIEW_STYLE_EDGE_B = 2, + CAMERA_ROOMVIEW_STYLE_VIDEO_TRANSLUSCENT = 3, + CAMERA_ROOMVIEW_STYLE_VIDEO_OPAQUE = 4, + CAMERA_ROOMVIEW_STYLE_COUNT = 5, +}; + +#ifdef _MSC_VER +#define VR_CAMERA_DECL_ALIGN( x ) __declspec( align( x ) ) +#else +#define VR_CAMERA_DECL_ALIGN( x ) +#endif + +static const uint32_t k_unMaxCameras = 4; +static const uint32_t k_unMaxCameraFrameSharedHandles = 4; + +VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t +{ + ECameraVideoStreamFormat m_nStreamFormat; + + uint32_t m_nWidth; + uint32_t m_nHeight; + + uint32_t m_nImageDataSize; + + uint32_t m_nFrameSequence; + + uint32_t m_nBufferIndex; + uint32_t m_nBufferCount; + + uint32_t m_nExposureTime; + + uint32_t m_nISPFrameTimeStamp; + uint32_t m_nISPReferenceTimeStamp; + uint32_t m_nSyncCounter; + + uint32_t m_nCamSyncEvents; + uint32_t m_nISPSyncEvents; + + double m_flReferenceCamSyncTime; + + double m_flFrameElapsedTime; + double m_flFrameDeliveryRate; + + double m_flFrameCaptureTime_DriverAbsolute; + double m_flFrameCaptureTime_ServerRelative; + uint64_t m_nFrameCaptureTicks_ServerAbsolute; + double m_flFrameCaptureTime_ClientRelative; + + double m_flSyncMarkerError; + + TrackedDevicePose_t m_RawTrackedDevicePose; + + uint64_t m_pImageData; +}; + +#pragma pack( pop ) + +} + +#endif + + +#ifndef OPENVR_NO_STL +#include <string> +#endif + +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, + VRSettingsError_AccessDenied = 6, + }; + + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + static const char * const IVRSettings_Version = "IVRSettings_003"; + + class CVRSettingHelper + { + IVRSettings *m_pSettings; + public: + CVRSettingHelper( IVRSettings *pSettings ) + { + m_pSettings = pSettings; + } + + const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) + { + return m_pSettings->GetSettingsErrorNameFromEnum( eError ); + } + + void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetBool( pchSection, pchSettingsKey, bValue, peError ); + } + + void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetInt32( pchSection, pchSettingsKey, nValue, peError ); + } + void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetFloat( pchSection, pchSettingsKey, flValue, peError ); + } + void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( pchSection, pchSettingsKey, pchValue, peError ); + } +#ifndef OPENVR_NO_STL + void SetString( const std::string & sSection, const std::string & sSettingsKey, const std::string & sValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( sSection.c_str(), sSettingsKey.c_str(), sValue.c_str(), peError ); + } +#endif + + bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetBool( pchSection, pchSettingsKey, peError ); + } + int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetInt32( pchSection, pchSettingsKey, peError ); + } + float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetFloat( pchSection, pchSettingsKey, peError ); + } + void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) + { + m_pSettings->GetString( pchSection, pchSettingsKey, pchValue, unValueLen, peError ); + } +#ifndef OPENVR_NO_STL + std::string GetString( const std::string & sSection, const std::string & sSettingsKey, EVRSettingsError *peError = nullptr ) + { + char buf[4096]; + vr::EVRSettingsError eError; + m_pSettings->GetString( sSection.c_str(), sSettingsKey.c_str(), buf, sizeof( buf ), &eError ); + if ( peError ) + *peError = eError; + if ( eError == vr::VRSettingsError_None ) + return buf; + else + return ""; + } +#endif + + void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveSection( pchSection, peError ); + } + void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveKeyInSection( pchSection, pchSettingsKey, peError ); + } + }; + + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_Contrast_Float = "contrast"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; + static const char * const k_pch_SteamVR_StartColor_String = "startColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; + static const char * const k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; + static const char * const k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip"; + static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; + static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; + static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; + static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; + static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + static const char * const k_pch_SteamVR_FoveatedSharpening_Bool = "sharpening"; + static const char * const k_pch_SteamVR_FoveatedSharpeningOverride_Int32 = "sharpeningOverride"; + static const char * const k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle"; + static const char * const k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict"; + static const char * const k_pch_SteamVR_WorldScale_Float = "worldScale"; + static const char * const k_pch_SteamVR_FovScale_Int32 = "fovScale"; + static const char * const k_pch_SteamVR_FovScaleInner_Int32 = "fovScaleInner"; + static const char * const k_pch_SteamVR_FovScaleUpper_Int32 = "fovScaleUpper"; + static const char * const k_pch_SteamVR_FovScaleLower_Int32 = "fovScaleLower"; + static const char * const k_pch_SteamVR_FovScaleFormat_Int32 = "fovScaleFormat"; + static const char * const k_pch_SteamVR_FovScaleLetterboxed_Bool = "fovScaleLetterboxed"; + static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; + static const char * const k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode"; + static const char * const k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; + static const char * const k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; + static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard"; + static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp"; + static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec"; + static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; + static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; + static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; + static const char * const k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride"; + static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; + static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; + static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; + static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; + static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; + static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; + static const char * const k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; + static const char * const k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; + static const char * const k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; + static const char * const k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; + static const char * const k_pch_SteamVR_CustomIconStyle_String = "customIconStyle"; + static const char * const k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle"; + static const char * const k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate"; + static const char * const k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSetPriority"; + static const char * const k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2"; + static const char * const k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption"; + static const char * const k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches"; + static const char * const k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility"; + static const char * const k_pch_SteamVR_DisplayPortTrainingMode_Int = "displayPortTrainingMode"; + static const char * const k_pch_SteamVR_UsePrism_Bool = "usePrism"; + static const char * const k_pch_SteamVR_AllowFallbackMirrorWindowLinux_Bool = "allowFallbackMirrorWindowLinux"; + static const char * const k_pch_SteamVR_DisableKeyboardPrivacy_Bool = "disableKeyboardPrivacy"; + + static const char * const k_pch_OpenXR_Section = "openxr"; + static const char * const k_pch_OpenXR_MetaUnityPluginCompatibility_Int32 = "metaUnityPluginCompatibility"; + + static const char * const k_pch_DirectMode_Section = "direct_mode"; + static const char * const k_pch_DirectMode_Enable_Bool = "enable"; + static const char * const k_pch_DirectMode_Count_Int32 = "count"; + static const char * const k_pch_DirectMode_EdidVid_Int32 = "edidVid"; + static const char * const k_pch_DirectMode_EdidPid_Int32 = "edidPid"; + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; + static const char * const k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations"; + static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + static const char * const k_pch_WindowsMR_Section = "driver_holographic"; + + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + static const char * const k_pch_UserInterface_CheckStatusInterval_Int = "vrmStatusCheckInterval"; + static const char * const k_pch_UserInterface_CheckForSteam_Bool = "vrmCheckForSteam"; + + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + static const char * const k_pch_Perf_TestData_Float = "perfTestData"; + static const char * const k_pch_Perf_GPUProfiling_Bool = "GPUProfiling"; + static const char * const k_pch_Perf_GpuBusMonitoring_Bool = "gpuBusMonitoring"; + + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_WallHeight_Float = "CollisionBoundsWallHeight"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + static const char * const k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport"; + + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_ShowOnController_Bool = "showOnController"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_RoomView_Int32 = "roomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + static const char * const k_pch_Camera_RoomViewStyle_Int32 = "roomViewStyle"; + + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice"; + static const char * const k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName"; + static const char * const k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice"; + static const char * const k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName"; + static const char * const k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror"; + static const char * const k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice"; + static const char * const k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName"; + static const char * const k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_ActiveMirrorDevice_String = "activePlaybackMirrorDevice"; + static const char * const k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "enablePlaybackMirrorIndependentVolume"; + static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + static const char * const k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput"; + static const char * const k_pch_audio_MuteMicMonitor_Bool = "muteMicMonitor"; + + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout"; + static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; + static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; + static const char * const k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; + static const char * const k_pch_Power_OverrideWindowsPowerScheme_Bool = "overrideWindowsPowerScheme"; + + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + static const char * const k_pch_Dashboard_Position = "position"; + static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale"; + static const char * const k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer"; + static const char * const k_pch_Dashboard_AllowSteamOverlays_Bool = "allowSteamOverlays"; + static const char * const k_pch_Dashboard_AllowVRGamepadUI_Bool = "allowVRGamepadUI"; + static const char * const k_pch_Dashboard_SteamMatchesHMDFramerate = "steamMatchesHMDFramerate"; + static const char * const k_pch_Dashboard_GrabHandleAcceleration = "grabHandleAcceleration"; + static const char * const k_pch_Dashboard_OverlayBacksideColor_String = "overlayBacksideColor"; + + static const char * const k_pch_modelskin_Section = "modelskins"; + + static const char * const k_pch_Driver_Enable_Bool = "enable"; + static const char * const k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode"; + static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority"; + static const char * const k_pch_Driver_Hmd_AllowsClientToControlTextureIndex_Bool = "hmdAllowsClientToControlTextureIndex"; + static const char * const k_pch_Driver_ForceSystemLayerUseAppPoses_Bool = "forceSystemLayerUseAppPoses"; + + static const char* const k_pch_WebInterface_Section = "WebInterface"; + + static const char* const k_pch_VRWebHelper_Section = "VRWebHelper"; + static const char* const k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; + static const char* const k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; + + static const char* const k_pch_TrackingOverride_Section = "TrackingOverrides"; + + static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; + static const char* const k_pch_App_BindingLegacyAPISuffix_String = "_legacy"; + static const char *const k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput"; + static const char *const k_pch_App_BindingOpenXRAPISuffix_String = "_openxr"; + static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; + static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL"; + static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; + static const char* const k_pch_App_DominantHand_Int32 = "DominantHand"; + static const char* const k_pch_App_BlockOculusSDK_Bool = "blockOculusSDK"; + + static const char * const k_pch_Trackers_Section = "trackers"; + + static const char * const k_pch_DesktopUI_Section = "DesktopUI"; + + static const char * const k_pch_LastKnown_Section = "LastKnown"; + static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; + static const char *const k_pch_LastKnown_HMDModel_String = "HMDModel"; + static const char* const k_pch_LastKnown_ActualHMDDriver_String = "ActualHMDDriver"; + static const char* const k_pch_LastKnown_HMDSerialNumber_String = "HMDSerialNumber"; + static const char* const k_pch_LastKnown_HMDRemoteClientID_String = "RemoteClientID"; + + static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings"; + + static const char * const k_pch_Input_Section = "input"; + static const char* const k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; + static const char* const k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; + static const char* const k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; + + static const char * const k_pch_GpuSpeed_Section = "GpuSpeed"; + + static const char *const k_pch_XRRenderModelCache_Section = "XRRenderModelUuidCache"; + +} + + +namespace vr +{ + + +struct DriverPoseQuaternion_t +{ + double w, x, y, z; +}; + +struct DriverPose_t +{ + double poseTimeOffset; + + vr::HmdQuaternion_t qWorldFromDriverRotation; + double vecWorldFromDriverTranslation[ 3 ]; + + vr::HmdQuaternion_t qDriverFromHeadRotation; + double vecDriverFromHeadTranslation[ 3 ]; + + double vecPosition[ 3 ]; + + double vecVelocity[ 3 ]; + + double vecAcceleration[ 3 ]; + + vr::HmdQuaternion_t qRotation; + + double vecAngularVelocity[ 3 ]; + + double vecAngularAcceleration[ 3 ]; + + ETrackingResult result; + + bool poseIsValid; + bool willDriftInYaw; + bool shouldApplyHeadModel; + bool deviceIsConnected; +}; + + +class ITrackedDeviceServerDriver +{ +public: + + virtual EVRInitError Activate( uint32_t unObjectId ) = 0; + + virtual void Deactivate() = 0; + + virtual void EnterStandby() = 0; + + virtual void *GetComponent( const char *pchComponentNameAndVersion ) = 0; + + virtual void DebugRequest( const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + virtual DriverPose_t GetPose() = 0; +}; + + + +static const char *ITrackedDeviceServerDriver_Version = "ITrackedDeviceServerDriver_005"; + +} + + +namespace vr +{ + + + class IVRDisplayComponent + { + public: + + + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + virtual bool IsDisplayOnDesktop( ) = 0; + + virtual bool IsDisplayRealDisplay( ) = 0; + + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + virtual bool ComputeInverseDistortion( HmdVector2_t *pResult, EVREye eEye, uint32_t unChannel, float fU, float fV ) = 0; + }; + + static const char *IVRDisplayComponent_Version = "IVRDisplayComponent_003"; + +} + + +namespace vr +{ + enum VRSwapTextureFlag + { + VRSwapTextureFlag_Shared_NTHandle = 1 << 0, + }; + + class IVRDriverDirectModeComponent + { + public: + + + struct SwapTextureSetDesc_t + { + uint32_t nWidth; + uint32_t nHeight; + uint32_t nFormat; + uint32_t nSampleCount; + }; + + struct SwapTextureSet_t + { + vr::SharedTextureHandle_t rSharedTextureHandles[ 3 ]; + uint32_t unTextureFlags; + }; + + virtual void CreateSwapTextureSet( uint32_t unPid, const SwapTextureSetDesc_t *pSwapTextureSetDesc, SwapTextureSet_t *pOutSwapTextureSet ) {} + + virtual void DestroySwapTextureSet( vr::SharedTextureHandle_t sharedTextureHandle ) {} + + virtual void DestroyAllSwapTextureSets( uint32_t unPid ) {} + + virtual void GetNextSwapTextureSetIndex( vr::SharedTextureHandle_t sharedTextureHandles[ 2 ], uint32_t( *pIndices )[ 2 ] ) {} + + struct SubmitLayerPerEye_t + { + vr::SharedTextureHandle_t hTexture, hDepthTexture; + + vr::VRTextureBounds_t bounds; + + vr::HmdMatrix44_t mProjection; + + vr::HmdMatrix34_t mHmdPose; + + float flHmdPosePredictionTimeInSecondsFromNow; + }; + virtual void SubmitLayer( const SubmitLayerPerEye_t( &perEye )[ 2 ] ) {} + + virtual void Present( vr::SharedTextureHandle_t syncTexture ) {} + + struct Throttling_t + { + uint32_t nFramesToThrottle; + uint32_t nAdditionalFramesToPredict; + }; + virtual void PostPresent( const Throttling_t *pThrottling ) {} + + virtual void GetFrameTiming( DriverDirectMode_FrameTiming *pFrameTiming ) + { + pFrameTiming->m_nReprojectionFlags = 0; + } + }; + + static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_009"; + +} + + +namespace vr +{ + class ICameraVideoSinkCallback + { + public: + virtual void OnCameraVideoSinkCallback() = 0; + }; + + class IVRCameraComponent + { + public: + virtual bool GetCameraFrameDimensions( vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0; + virtual bool GetCameraFrameBufferingRequirements( int *pDefaultFrameQueueSize, uint32_t *pFrameBufferDataSize ) = 0; + virtual bool SetCameraFrameBuffering( int nFrameBufferCount, void **ppFrameBuffers, uint32_t nFrameBufferDataSize ) = 0; + virtual bool SetCameraVideoStreamFormat( vr::ECameraVideoStreamFormat nVideoStreamFormat ) = 0; + virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat() = 0; + virtual bool StartVideoStream() = 0; + virtual void StopVideoStream() = 0; + virtual bool IsVideoStreamActive( bool *pbPaused, float *pflElapsedTime ) = 0; + virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame() = 0; + virtual void ReleaseVideoStreamFrame( const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0; + virtual bool SetAutoExposure( bool bEnable ) = 0; + virtual bool PauseVideoStream() = 0; + virtual bool ResumeVideoStream() = 0; + virtual bool GetCameraDistortion( uint32_t nCameraIndex, float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0; + virtual bool GetCameraProjection( uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + virtual bool SetFrameRate( int nISPFrameRate, int nSensorFrameRate ) = 0; + virtual bool SetCameraVideoSinkCallback( vr::ICameraVideoSinkCallback *pCameraVideoSinkCallback ) = 0; + virtual bool GetCameraCompatibilityMode( vr::ECameraCompatibilityMode *pCameraCompatibilityMode ) = 0; + virtual bool SetCameraCompatibilityMode( vr::ECameraCompatibilityMode nCameraCompatibilityMode ) = 0; + virtual bool GetCameraFrameBounds( vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pLeft, uint32_t *pTop, uint32_t *pWidth, uint32_t *pHeight ) = 0; + virtual bool GetCameraIntrinsics( uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, HmdVector2_t *pFocalLength, HmdVector2_t *pCenter, vr::EVRDistortionFunctionType *peDistortionType, double rCoefficients[ k_unMaxDistortionFunctionParameters ] ) = 0; + }; + + static const char *IVRCameraComponent_Version = "IVRCameraComponent_003"; +} + + +namespace vr +{ + +class ITrackedDeviceServerDriver; +struct TrackedDeviceDriverInfo_t; +struct DriverPose_t; + +class IVRDriverContext +{ +public: + virtual void *GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError = nullptr ) = 0; + + virtual DriverHandle_t GetDriverHandle() = 0; +}; + + +class IServerTrackedDeviceProvider +{ +public: + virtual EVRInitError Init( IVRDriverContext *pDriverContext ) = 0; + + virtual void Cleanup() = 0; + + virtual const char * const *GetInterfaceVersions() = 0; + + virtual void RunFrame() = 0; + + + + virtual bool ShouldBlockStandbyMode() = 0; + + virtual void EnterStandby() = 0; + + virtual void LeaveStandby() = 0; + +}; + + +static const char *IServerTrackedDeviceProvider_Version = "IServerTrackedDeviceProvider_004"; + + + + +class IVRWatchdogProvider +{ +public: + virtual EVRInitError Init( IVRDriverContext *pDriverContext ) = 0; + + virtual void Cleanup() = 0; +}; + +static const char *IVRWatchdogProvider_Version = "IVRWatchdogProvider_001"; + + + + +class IVRCompositorPluginProvider +{ +public: + virtual EVRInitError Init( IVRDriverContext *pDriverContext ) = 0; + + virtual void Cleanup() = 0; + + virtual const char * const *GetInterfaceVersions() = 0; + + virtual void *GetComponent( const char *pchComponentNameAndVersion ) = 0; +}; + +static const char *IVRCompositorPluginProvider_Version = "IVRCompositorPluginProvider_001"; + +} + + +#include <string> +#include <vector> + +namespace vr +{ + + static const PropertyContainerHandle_t k_ulDisplayRedirectContainer = 0x600000003; + + enum EPropertyWriteType + { + PropertyWrite_Set = 0, + PropertyWrite_Erase = 1, + PropertyWrite_SetError = 2 + }; + + struct PropertyWrite_t + { + ETrackedDeviceProperty prop; + EPropertyWriteType writeType; + ETrackedPropertyError eSetError; + void *pvBuffer; + uint32_t unBufferSize; + PropertyTypeTag_t unTag; + ETrackedPropertyError eError; + }; + + struct PropertyRead_t + { + ETrackedDeviceProperty prop; + void *pvBuffer; + uint32_t unBufferSize; + PropertyTypeTag_t unTag; + uint32_t unRequiredBufferSize; + ETrackedPropertyError eError; + }; + + +class IVRProperties +{ +public: + + virtual ETrackedPropertyError ReadPropertyBatch( PropertyContainerHandle_t ulContainerHandle, PropertyRead_t *pBatch, uint32_t unBatchEntryCount ) = 0; + + virtual ETrackedPropertyError WritePropertyBatch( PropertyContainerHandle_t ulContainerHandle, PropertyWrite_t *pBatch, uint32_t unBatchEntryCount ) = 0; + + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + virtual PropertyContainerHandle_t TrackedDeviceToPropertyContainer( TrackedDeviceIndex_t nDevice ) = 0; +}; + +static const char * const IVRProperties_Version = "IVRProperties_001"; + +class CVRPropertyHelpers +{ +public: + CVRPropertyHelpers( IVRProperties * pProperties ) : m_pProperties( pProperties ) {} + + template <typename T> + T GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ); + + bool GetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + float GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + int32_t GetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + uint64_t GetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + HmdVector2_t GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + HmdVector3_t GetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + HmdVector4_t GetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + double GetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + + uint32_t GetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() void *pvBuffer, uint32_t unBufferSize, PropertyTypeTag_t *punTag, ETrackedPropertyError *pError = 0L ); + + uint32_t GetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ); + + std::string GetStringProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError = nullptr ); + + template< typename T> + ETrackedPropertyError GetPropertyVector( PropertyContainerHandle_t ulContainer, ETrackedDeviceProperty prop, PropertyTypeTag_t unExpectedTag, std::vector<T> *pvecResults ); + + ETrackedPropertyError SetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, bool bNewValue ); + ETrackedPropertyError SetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, float fNewValue ); + ETrackedPropertyError SetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, int32_t nNewValue ); + ETrackedPropertyError SetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, uint64_t ulNewValue ); + ETrackedPropertyError SetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector2_t & vNewValue ); + ETrackedPropertyError SetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector3_t & vNewValue ); + ETrackedPropertyError SetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector4_t & vNewValue ); + ETrackedPropertyError SetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, double vNewValue ); + + ETrackedPropertyError SetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const char *pchNewValue ); + + ETrackedPropertyError SetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, void *pvNewValue, uint32_t unNewValueSize, PropertyTypeTag_t unTag ); + + ETrackedPropertyError SetPropertyError( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError eError ); + + ETrackedPropertyError EraseProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop ); + + PropertyContainerHandle_t TrackedDeviceToPropertyContainer( TrackedDeviceIndex_t nDevice ) { return m_pProperties->TrackedDeviceToPropertyContainer( nDevice ); } + + template< typename T> + ETrackedPropertyError SetPropertyVector( PropertyContainerHandle_t ulContainer, ETrackedDeviceProperty prop, PropertyTypeTag_t unExpectedTag, std::vector<T> *vecProperties ); + + bool IsPropertySet( PropertyContainerHandle_t ulContainer, ETrackedDeviceProperty prop, ETrackedPropertyError *peError = nullptr ); +private: + template<typename T> + T GetPropertyHelper( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError, T bDefault, PropertyTypeTag_t unTypeTag ); + + IVRProperties *m_pProperties; +}; + + +template <> +inline std::string CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetStringProperty( ulContainer, prop, peError ); +} + + +template <> +inline bool CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetBoolProperty( ulContainer, prop, peError ); +} + + +template <> +inline float CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetFloatProperty( ulContainer, prop, peError ); +} + + +template <> +inline int32_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetInt32Property( ulContainer, prop, peError ); +} + + +template <> +inline uint64_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetUint64Property( ulContainer, prop, peError ); +} + + +template <> +inline HmdVector2_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetVec2Property( ulContainer, prop, peError ); +} + + +template <> +inline HmdVector3_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetVec3Property( ulContainer, prop, peError ); +} + + +template <> +inline HmdVector4_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetVec4Property( ulContainer, prop, peError ); +} + + +template <> +inline double CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetDoubleProperty( ulContainer, prop, peError ); +} + + +inline uint32_t CVRPropertyHelpers::GetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() void *pvBuffer, uint32_t unBufferSize, PropertyTypeTag_t *punTag, ETrackedPropertyError *pError ) +{ + PropertyRead_t batch; + batch.prop = prop; + batch.pvBuffer = pvBuffer; + batch.unBufferSize = unBufferSize; + + m_pProperties->ReadPropertyBatch( ulContainerHandle, &batch, 1 ); + + if ( pError ) + { + *pError = batch.eError; + } + + if ( punTag ) + { + *punTag = batch.unTag; + } + + return batch.unRequiredBufferSize; +} + + +inline ETrackedPropertyError CVRPropertyHelpers::SetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, void *pvNewValue, uint32_t unNewValueSize, PropertyTypeTag_t unTag ) +{ + PropertyWrite_t batch; + batch.writeType = PropertyWrite_Set; + batch.prop = prop; + batch.pvBuffer = pvNewValue; + batch.unBufferSize = unNewValueSize; + batch.unTag = unTag; + + m_pProperties->WritePropertyBatch( ulContainerHandle, &batch, 1 ); + + return batch.eError; +} + + +inline uint32_t CVRPropertyHelpers::GetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError ) +{ + PropertyTypeTag_t unTag; + ETrackedPropertyError error; + uint32_t unRequiredSize = GetProperty( ulContainerHandle, prop, pchValue, unBufferSize, &unTag, &error ); + if ( unTag != k_unStringPropertyTag && error == TrackedProp_Success ) + { + error = TrackedProp_WrongDataType; + } + + if ( pError ) + { + *pError = error; + } + + if ( error != TrackedProp_Success ) + { + if ( pchValue && unBufferSize ) + { + *pchValue = '\0'; + } + } + + return unRequiredSize; +} + + +inline std::string CVRPropertyHelpers::GetStringProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + char buf[1024]; + vr::ETrackedPropertyError err; + uint32_t unRequiredBufferLen = GetStringProperty( ulContainer, prop, buf, sizeof(buf), &err ); + + std::string sResult; + + if ( err == TrackedProp_Success ) + { + sResult = buf; + } + else if ( err == TrackedProp_BufferTooSmall ) + { + char *pchBuffer = new char[unRequiredBufferLen]; + unRequiredBufferLen = GetStringProperty( ulContainer, prop, pchBuffer, unRequiredBufferLen, &err ); + sResult = pchBuffer; + delete[] pchBuffer; + } + + if ( peError ) + { + *peError = err; + } + + return sResult; +} + + +inline ETrackedPropertyError CVRPropertyHelpers::SetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const char *pchNewValue ) +{ + if ( !pchNewValue ) + return TrackedProp_InvalidOperation; + + const char *pchCurr = pchNewValue; + while ( *pchCurr ) + { + pchCurr++; + } + + return SetProperty( ulContainerHandle, prop, (void *)pchNewValue, (uint32_t)(pchCurr - pchNewValue) + 1, k_unStringPropertyTag ); +} + + +template<typename T> +inline T CVRPropertyHelpers::GetPropertyHelper( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError, T bDefault, PropertyTypeTag_t unTypeTag ) +{ + T bValue; + ETrackedPropertyError eError; + PropertyTypeTag_t unReadTag; + GetProperty( ulContainerHandle, prop, &bValue, sizeof( bValue ), &unReadTag, &eError ); + if ( unReadTag != unTypeTag && eError == TrackedProp_Success ) + { + eError = TrackedProp_WrongDataType; + }; + + if ( pError ) + *pError = eError; + if ( eError != TrackedProp_Success ) + { + return bDefault; + } + else + { + return bValue; + } +} + + +inline bool CVRPropertyHelpers::GetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + return GetPropertyHelper<bool>( ulContainerHandle, prop, pError, false, k_unBoolPropertyTag ); +} + +inline float CVRPropertyHelpers::GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + return GetPropertyHelper<float>( ulContainerHandle, prop, pError, 0.f, k_unFloatPropertyTag ); +} + +inline double CVRPropertyHelpers::GetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + return GetPropertyHelper<double>( ulContainerHandle, prop, pError, 0., k_unDoublePropertyTag ); +} + +inline int32_t CVRPropertyHelpers::GetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + return GetPropertyHelper<int32_t>( ulContainerHandle, prop, pError, 0, k_unInt32PropertyTag ); +} + +inline uint64_t CVRPropertyHelpers::GetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + return GetPropertyHelper<uint64_t>( ulContainerHandle, prop, pError, 0, k_unUint64PropertyTag ); +} + +inline HmdVector2_t CVRPropertyHelpers::GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + HmdVector2_t defaultval = { { 0, 0 } }; + return GetPropertyHelper<HmdVector2_t>( ulContainerHandle, prop, pError, defaultval, k_unHmdVector2PropertyTag ); +} + +inline HmdVector3_t CVRPropertyHelpers::GetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + HmdVector3_t defaultval = { { 0, 0, 0 } }; + return GetPropertyHelper<HmdVector3_t>( ulContainerHandle, prop, pError, defaultval, k_unHmdVector3PropertyTag ); +} + +inline HmdVector4_t CVRPropertyHelpers::GetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + HmdVector4_t defaultval = { { 0, 0, 0, 0 } }; + return GetPropertyHelper<HmdVector4_t>( ulContainerHandle, prop, pError, defaultval, k_unHmdVector4PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, bool bNewValue ) +{ + return SetProperty( ulContainerHandle, prop, &bNewValue, sizeof( bNewValue ), k_unBoolPropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, float fNewValue ) +{ + return SetProperty( ulContainerHandle, prop, &fNewValue, sizeof( fNewValue ), k_unFloatPropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetDoubleProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, double fNewValue ) +{ + return SetProperty( ulContainerHandle, prop, &fNewValue, sizeof( fNewValue ), k_unDoublePropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, int32_t nNewValue ) +{ + return SetProperty( ulContainerHandle, prop, &nNewValue, sizeof( nNewValue ), k_unInt32PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, uint64_t ulNewValue ) +{ + return SetProperty( ulContainerHandle, prop, &ulNewValue, sizeof( ulNewValue ), k_unUint64PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector2_t & vNewValue ) +{ + return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector2_t ), k_unHmdVector2PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector3_t & vNewValue ) +{ + return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector3_t ), k_unHmdVector3PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector4_t & vNewValue ) +{ + return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector4_t ), k_unHmdVector4PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetPropertyError( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError eError ) +{ + PropertyWrite_t batch; + batch.writeType = PropertyWrite_SetError; + batch.prop = prop; + batch.eSetError = eError; + + m_pProperties->WritePropertyBatch( ulContainerHandle, &batch, 1 ); + + return batch.eError; +} + +inline ETrackedPropertyError CVRPropertyHelpers::EraseProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop ) +{ + PropertyWrite_t batch; + batch.writeType = PropertyWrite_Erase; + batch.prop = prop; + + m_pProperties->WritePropertyBatch( ulContainerHandle, &batch, 1 ); + + return batch.eError; + +} + +template< typename T > +ETrackedPropertyError CVRPropertyHelpers::SetPropertyVector(PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, PropertyTypeTag_t unTag, std::vector<T> *pvecProperties) +{ + return SetProperty( ulContainer, prop, &(*pvecProperties)[0], (uint32_t)(pvecProperties->size() * sizeof( T )), unTag ); +} + +template< typename T > +ETrackedPropertyError CVRPropertyHelpers::GetPropertyVector( PropertyContainerHandle_t ulContainer, ETrackedDeviceProperty prop, PropertyTypeTag_t unExpectedTag, std::vector<T> *pvecResults ) +{ + ETrackedPropertyError err; + PropertyTypeTag_t unTag; + uint32_t unNeeded; + if ( pvecResults->empty() ) + unNeeded = GetProperty( ulContainer, prop, nullptr, 0, &unTag, &err ); + else + unNeeded = GetProperty( ulContainer, prop, &(*pvecResults)[0], (uint32_t)(pvecResults->size() * sizeof( T )), &unTag, &err ); + uint32_t unFound = unNeeded / sizeof( T ); + if ( err == TrackedProp_Success ) + { + if ( unTag != unExpectedTag && unFound > 0 ) + { + return TrackedProp_WrongDataType; + } + + pvecResults->resize( unFound ); + return TrackedProp_Success; + } + else if ( err == TrackedProp_BufferTooSmall ) + { + pvecResults->resize( unFound ); + unNeeded = GetProperty( ulContainer, prop, &(*pvecResults)[0], (uint32_t)(pvecResults->size() * sizeof( T )), &unTag, &err ); + unFound = unNeeded / sizeof( T ); + + if ( err == TrackedProp_Success ) + { + if ( unTag != unExpectedTag ) + { + return TrackedProp_WrongDataType; + } + + pvecResults->resize( unFound ); + return TrackedProp_Success; + } + } + return err; +} + +inline bool CVRPropertyHelpers::IsPropertySet( PropertyContainerHandle_t ulContainer, ETrackedDeviceProperty prop, ETrackedPropertyError *peError ) +{ + ETrackedPropertyError error; + GetProperty( ulContainer, prop, nullptr, 0, nullptr, &error ); + if ( peError ) + *peError = error; + return error == TrackedProp_Success || error == TrackedProp_BufferTooSmall; +} + +} + + + + +namespace vr +{ + enum EVRScalarType + { + VRScalarType_Absolute = 0, + VRScalarType_Relative = 1, + }; + + + enum EVRScalarUnits + { + VRScalarUnits_NormalizedOneSided = 0, + VRScalarUnits_NormalizedTwoSided = 1, + }; + + class IVRDriverInput + { + public: + + virtual EVRInputError CreateBooleanComponent( PropertyContainerHandle_t ulContainer, const char *pchName, VRInputComponentHandle_t *pHandle ) = 0; + + virtual EVRInputError UpdateBooleanComponent( VRInputComponentHandle_t ulComponent, bool bNewValue, double fTimeOffset ) = 0; + + virtual EVRInputError CreateScalarComponent( PropertyContainerHandle_t ulContainer, const char *pchName, VRInputComponentHandle_t *pHandle, EVRScalarType eType, EVRScalarUnits eUnits ) = 0; + + virtual EVRInputError UpdateScalarComponent( VRInputComponentHandle_t ulComponent, float fNewValue, double fTimeOffset ) = 0; + + virtual EVRInputError CreateHapticComponent( PropertyContainerHandle_t ulContainer, const char *pchName, VRInputComponentHandle_t *pHandle ) = 0; + + virtual EVRInputError CreateSkeletonComponent( PropertyContainerHandle_t ulContainer, const char *pchName, const char *pchSkeletonPath, const char *pchBasePosePath, EVRSkeletalTrackingLevel eSkeletalTrackingLevel, const VRBoneTransform_t *pGripLimitTransforms, uint32_t unGripLimitTransformCount, VRInputComponentHandle_t *pHandle ) = 0; + + virtual EVRInputError UpdateSkeletonComponent( VRInputComponentHandle_t ulComponent, EVRSkeletalMotionRange eMotionRange, const VRBoneTransform_t *pTransforms, uint32_t unTransformCount ) = 0; + + virtual EVRInputError CreatePoseComponent( PropertyContainerHandle_t ulContainer, const char *pchName, VRInputComponentHandle_t *pHandle ) = 0; + + virtual EVRInputError UpdatePoseComponent( VRInputComponentHandle_t ulComponent, const HmdMatrix34_t *pMatPoseOffset, double fTimeOffset ) = 0; + + virtual EVRInputError CreateEyeTrackingComponent( PropertyContainerHandle_t ulContainer, const char *pchName, VRInputComponentHandle_t *pHandle ) = 0; + + virtual EVRInputError UpdateEyeTrackingComponent( VRInputComponentHandle_t ulComponent, const VREyeTrackingData_t *pEyeTrackingData, double fTimeOffset ) = 0; + }; + + static const char * const IVRDriverInput_Version = "IVRDriverInput_004"; + +} + + +namespace vr +{ + +class IVRDriverLog +{ +public: + virtual void Log( const char *pchLogMessage ) = 0; +}; + + +static const char *IVRDriverLog_Version = "IVRDriverLog_001"; + +} + + +namespace vr +{ + +class ITrackedDeviceServerDriver; +struct TrackedDeviceDriverInfo_t; +struct DriverPose_t; + +class IVRServerDriverHost +{ +public: + virtual bool TrackedDeviceAdded( const char *pchDeviceSerialNumber, ETrackedDeviceClass eDeviceClass, ITrackedDeviceServerDriver *pDriver ) = 0; + + virtual void TrackedDevicePoseUpdated( uint32_t unWhichDevice, const DriverPose_t & newPose, uint32_t unPoseStructSize ) = 0; + + virtual void VsyncEvent( double vsyncTimeOffsetSeconds ) = 0; + + virtual void VendorSpecificEvent( uint32_t unWhichDevice, vr::EVREventType eventType, const VREvent_Data_t & eventData, double eventTimeOffset ) = 0; + + virtual bool IsExiting() = 0; + + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + virtual void GetRawTrackedDevicePoses( float fPredictedSecondsFromNow, TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + virtual void RequestRestart( const char *pchLocalizedReason, const char *pchExecutableToStart, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + virtual void SetDisplayEyeToHead( uint32_t unWhichDevice, const HmdMatrix34_t & eyeToHeadLeft, const HmdMatrix34_t & eyeToHeadRight ) = 0; + + virtual void SetDisplayProjectionRaw( uint32_t unWhichDevice, const HmdRect2_t & eyeLeft, const HmdRect2_t & eyeRight ) = 0; + + virtual void SetRecommendedRenderTargetSize( uint32_t unWhichDevice, uint32_t nWidth, uint32_t nHeight ) = 0; +}; + +static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_006"; + +} + + +namespace vr +{ + +class IVRCompositorDriverHost +{ +public: + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; +}; + +static const char *IVRCompositorDriverHost_Version = "IVRCompositorDriverHost_001"; + +} + + +namespace vr +{ + +class CVRHiddenAreaHelpers +{ +public: + CVRHiddenAreaHelpers( IVRProperties *pProperties ) : m_pProperties( pProperties ) {} + + ETrackedPropertyError SetHiddenArea( EVREye eEye, EHiddenAreaMeshType type, HmdVector2_t *pVerts, uint32_t unVertCount ); + + uint32_t GetHiddenArea( EVREye eEye, EHiddenAreaMeshType type, HmdVector2_t *pVerts, uint32_t unVertCount, ETrackedPropertyError *peError ); + +private: + ETrackedDeviceProperty GetPropertyEnum( EVREye eEye, EHiddenAreaMeshType type ) + { + return (ETrackedDeviceProperty)(Prop_DisplayHiddenArea_Binary_Start + ((int)type * 2) + (int)eEye); + } + + IVRProperties *m_pProperties; +}; + + +inline ETrackedPropertyError CVRHiddenAreaHelpers::SetHiddenArea( EVREye eEye, EHiddenAreaMeshType type, HmdVector2_t *pVerts, uint32_t unVertCount ) +{ + ETrackedDeviceProperty prop = GetPropertyEnum( eEye, type ); + CVRPropertyHelpers propHelpers( m_pProperties ); + return propHelpers.SetProperty( propHelpers.TrackedDeviceToPropertyContainer( k_unTrackedDeviceIndex_Hmd ), prop, pVerts, sizeof( HmdVector2_t ) * unVertCount, k_unHiddenAreaPropertyTag ); +} + + +inline uint32_t CVRHiddenAreaHelpers::GetHiddenArea( EVREye eEye, EHiddenAreaMeshType type, HmdVector2_t *pVerts, uint32_t unVertCount, ETrackedPropertyError *peError ) +{ + ETrackedDeviceProperty prop = GetPropertyEnum( eEye, type ); + CVRPropertyHelpers propHelpers( m_pProperties ); + ETrackedPropertyError propError; + PropertyTypeTag_t unTag; + uint32_t unBytesNeeded = propHelpers.GetProperty( propHelpers.TrackedDeviceToPropertyContainer( k_unTrackedDeviceIndex_Hmd ), prop, pVerts, sizeof( HmdVector2_t )*unVertCount, &unTag, &propError ); + if ( propError == TrackedProp_Success && unTag != k_unHiddenAreaPropertyTag ) + { + propError = TrackedProp_WrongDataType; + unBytesNeeded = 0; + } + + if ( peError ) + { + *peError = propError; + } + + return unBytesNeeded / sizeof( HmdVector2_t ); +} + +} + + +namespace vr +{ + +class IVRWatchdogHost +{ +public: + virtual void WatchdogWakeUp( vr::ETrackedDeviceClass eDeviceClass ) = 0; +}; + +static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_002"; + +}; + + + + +namespace vr +{ + struct PresentInfo_t + { + SharedTextureHandle_t backbufferTextureHandle; + EVSync vsync; + uint64_t nFrameId; + double flVSyncTimeInSeconds; + }; + + class IVRVirtualDisplay + { + public: + + virtual void Present( const PresentInfo_t *pPresentInfo, uint32_t unPresentInfoSize ) = 0; + + virtual void WaitForPresent() = 0; + + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + }; + + static const char *IVRVirtualDisplay_Version = "IVRVirtualDisplay_002"; +} + + + +namespace vr +{ + +class IVRResources +{ +public: + + + virtual uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) = 0; + + virtual uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, VR_OUT_STRING() char *pchPathBuffer, uint32_t unBufferLen ) = 0; +}; + +static const char * const IVRResources_Version = "IVRResources_001"; + + +} + + +namespace vr +{ + +typedef uint64_t IOBufferHandle_t; +static const uint64_t k_ulInvalidIOBufferHandle = 0; + + enum EIOBufferError + { + IOBuffer_Success = 0, + IOBuffer_OperationFailed = 100, + IOBuffer_InvalidHandle = 101, + IOBuffer_InvalidArgument = 102, + IOBuffer_PathExists = 103, + IOBuffer_PathDoesNotExist = 104, + IOBuffer_Permission = 105, + }; + + enum EIOBufferMode + { + IOBufferMode_Read = 0x0001, + IOBufferMode_Write = 0x0002, + IOBufferMode_Create = 0x0200, + }; + + class IVRIOBuffer + { + public: + virtual vr::EIOBufferError Open( const char *pchPath, vr::EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, vr::IOBufferHandle_t *pulBuffer ) = 0; + + virtual vr::EIOBufferError Close( vr::IOBufferHandle_t ulBuffer ) = 0; + + virtual vr::EIOBufferError Read( vr::IOBufferHandle_t ulBuffer, void *pDst, uint32_t unBytes, uint32_t *punRead ) = 0; + + virtual vr::EIOBufferError Write( vr::IOBufferHandle_t ulBuffer, void *pSrc, uint32_t unBytes ) = 0; + + virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0; + + virtual bool HasReaders( vr::IOBufferHandle_t ulBuffer ) = 0; + }; + + static const char * const IVRIOBuffer_Version = "IVRIOBuffer_002"; +} + + +namespace vr +{ + +class IVRDriverManager +{ +public: + virtual uint32_t GetDriverCount() const = 0; + + virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0; + + virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0; +}; + +static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; + +} + + + + +namespace vr +{ + struct SpatialAnchorDriverPose_t + { + vr::HmdQuaternion_t qWorldRotation; + vr::HmdVector3d_t vWorldTranslation; + + uint64_t ulRequiredUniverseId; + + + + + + + + + + + + + + + + + + + double fValidDuration; + }; + + class IVRDriverSpatialAnchors + { + public: + + virtual EVRSpatialAnchorError UpdateSpatialAnchorPose( SpatialAnchorHandle_t unHandle, const SpatialAnchorDriverPose_t *pPose ) = 0; + + virtual EVRSpatialAnchorError SetSpatialAnchorPoseError( SpatialAnchorHandle_t unHandle, EVRSpatialAnchorError eError, double fValidDuration ) = 0; + + virtual EVRSpatialAnchorError UpdateSpatialAnchorDescriptor( SpatialAnchorHandle_t unHandle, const char *pchDescriptor ) = 0; + + virtual EVRSpatialAnchorError GetSpatialAnchorPose( SpatialAnchorHandle_t unHandle, SpatialAnchorDriverPose_t *pDriverPoseOut ) = 0; + + virtual EVRSpatialAnchorError GetSpatialAnchorDescriptor( SpatialAnchorHandle_t unHandle, VR_OUT_STRING() char *pchDescriptorOut, uint32_t *punDescriptorBufferLenInOut, bool bDecorated ) = 0; + + }; + + static const char * const IVRDriverSpatialAnchors_Version = "IVRDriverSpatialAnchors_001"; + +} + + +namespace vr +{ + +class IVRIPCResourceManagerClient +{ +public: + virtual bool NewSharedVulkanImage( uint32_t nImageFormat, uint32_t nWidth, uint32_t nHeight, bool bRenderable, bool bMappable, bool bComputeAccess, uint32_t unMipLevels, uint32_t unArrayLayerCount, uint32_t unAdditionalVkCreateFlags, uint32_t unAdditionalVkUsageFlags, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + virtual bool NewSharedVulkanBuffer( uint32_t nSize, uint32_t nUsageFlags, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + virtual bool NewSharedVulkanSemaphore( bool bCounting, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + virtual bool RefResource( vr::SharedTextureHandle_t hSharedHandle, uint64_t *pNewIpcHandle ) = 0; + + virtual bool UnrefResource( vr::SharedTextureHandle_t hSharedHandle ) = 0; + + virtual bool GetDmabufFormats( uint32_t *pOutFormatCount, uint32_t *pOutFormats ) = 0; + + virtual bool GetDmabufModifiers( vr::EVRApplicationType eApplicationType, uint32_t unDRMFormat, uint32_t *pOutModifierCount, uint64_t *pOutModifiers ) = 0; + + virtual bool ImportDmabuf( vr::EVRApplicationType eApplicationType, vr::DmabufAttributes_t *pDmabufAttributes, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + virtual bool ReceiveSharedFd( uint64_t ulIpcHandle, int *pOutFd ) = 0; + +protected: + virtual ~IVRIPCResourceManagerClient() {}; +}; + +static const char *IVRIPCResourceManagerClient_Version = "IVRIPCResourceManagerClient_003"; + +} + + + +namespace vr +{ +#if !defined( OPENVR_INTERFACE_INTERNAL ) + static const char * const k_InterfaceVersions[] = + { + IVRSettings_Version, + ITrackedDeviceServerDriver_Version, + IVRDisplayComponent_Version, + IVRDriverDirectModeComponent_Version, + IVRCameraComponent_Version, + IServerTrackedDeviceProvider_Version, + IVRWatchdogProvider_Version, + IVRVirtualDisplay_Version, + IVRDriverManager_Version, + IVRResources_Version, + IVRCompositorPluginProvider_Version, + IVRIPCResourceManagerClient_Version, + nullptr + }; + + inline IVRDriverContext *&VRDriverContext() + { + static IVRDriverContext *pHost; + return pHost; + } + + class COpenVRDriverContext + { + public: + COpenVRDriverContext() : m_propertyHelpers(nullptr), m_hiddenAreaHelpers(nullptr) { Clear(); } + void Clear(); + + EVRInitError InitServer(); + EVRInitError InitWatchdog(); + EVRInitError InitCompositor(); + + IVRSettings *VRSettings() + { + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = (IVRSettings *)VRDriverContext()->GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRProperties *VRPropertiesRaw() + { + if ( m_pVRProperties == nullptr ) + { + EVRInitError eError; + m_pVRProperties = (IVRProperties *)VRDriverContext()->GetGenericInterface( IVRProperties_Version, &eError ); + m_propertyHelpers = CVRPropertyHelpers( m_pVRProperties ); + m_hiddenAreaHelpers = CVRHiddenAreaHelpers( m_pVRProperties ); + } + return m_pVRProperties; + } + + CVRPropertyHelpers *VRProperties() + { + VRPropertiesRaw(); + return &m_propertyHelpers; + } + + CVRHiddenAreaHelpers *VRHiddenArea() + { + VRPropertiesRaw(); + return &m_hiddenAreaHelpers; + } + + IVRServerDriverHost *VRServerDriverHost() + { + if ( m_pVRServerDriverHost == nullptr ) + { + EVRInitError eError; + m_pVRServerDriverHost = (IVRServerDriverHost *)VRDriverContext()->GetGenericInterface( IVRServerDriverHost_Version, &eError ); + } + return m_pVRServerDriverHost; + } + + IVRWatchdogHost *VRWatchdogHost() + { + if ( m_pVRWatchdogHost == nullptr ) + { + EVRInitError eError; + m_pVRWatchdogHost = (IVRWatchdogHost *)VRDriverContext()->GetGenericInterface( IVRWatchdogHost_Version, &eError ); + } + return m_pVRWatchdogHost; + } + + IVRCompositorDriverHost *VRCompositorDriverHost() + { + if ( m_pVRCompositorDriverHost == nullptr ) + { + EVRInitError eError; + m_pVRCompositorDriverHost = ( IVRCompositorDriverHost * )VRDriverContext()->GetGenericInterface( IVRCompositorDriverHost_Version, &eError ); + } + return m_pVRCompositorDriverHost; + } + + IVRDriverLog *VRDriverLog() + { + if ( m_pVRDriverLog == nullptr ) + { + EVRInitError eError; + m_pVRDriverLog = (IVRDriverLog *)VRDriverContext()->GetGenericInterface( IVRDriverLog_Version, &eError ); + } + return m_pVRDriverLog; + } + + DriverHandle_t VR_CALLTYPE VRDriverHandle() + { + return VRDriverContext()->GetDriverHandle(); + } + + IVRDriverManager *VRDriverManager() + { + if ( !m_pVRDriverManager ) + { + EVRInitError eError; + m_pVRDriverManager = (IVRDriverManager *)VRDriverContext()->GetGenericInterface( IVRDriverManager_Version, &eError ); + } + return m_pVRDriverManager; + } + + IVRResources *VRResources() + { + if ( !m_pVRResources ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VRDriverContext()->GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRDriverInput *VRDriverInput() + { + if ( !m_pVRDriverInput ) + { + EVRInitError eError; + m_pVRDriverInput = (IVRDriverInput *)VRDriverContext()->GetGenericInterface( IVRDriverInput_Version, &eError ); + } + return m_pVRDriverInput; + } + + IVRIOBuffer *VRIOBuffer() + { + if ( !m_pVRIOBuffer ) + { + EVRInitError eError; + m_pVRIOBuffer = (IVRIOBuffer *)VRDriverContext()->GetGenericInterface( IVRIOBuffer_Version, &eError ); + } + return m_pVRIOBuffer; + } + + IVRDriverSpatialAnchors *VRDriverSpatialAnchors() + { + if ( !m_pVRDriverSpatialAnchors ) + { + EVRInitError eError; + m_pVRDriverSpatialAnchors = (IVRDriverSpatialAnchors *)VRDriverContext()->GetGenericInterface( IVRDriverSpatialAnchors_Version, &eError ); + } + return m_pVRDriverSpatialAnchors; + } + + IVRIPCResourceManagerClient *VRIPCResourceManager() + { + if ( m_pVRIPCResourceManager == nullptr ) + { + EVRInitError eError; + m_pVRIPCResourceManager = ( IVRIPCResourceManagerClient * )VRDriverContext()->GetGenericInterface( IVRIPCResourceManagerClient_Version, &eError ); + } + return m_pVRIPCResourceManager; + } + + private: + CVRPropertyHelpers m_propertyHelpers; + CVRHiddenAreaHelpers m_hiddenAreaHelpers; + + IVRSettings *m_pVRSettings; + IVRProperties *m_pVRProperties; + IVRServerDriverHost *m_pVRServerDriverHost; + IVRWatchdogHost *m_pVRWatchdogHost; + IVRCompositorDriverHost *m_pVRCompositorDriverHost; + IVRDriverLog *m_pVRDriverLog; + IVRDriverManager *m_pVRDriverManager; + IVRResources *m_pVRResources; + IVRDriverInput *m_pVRDriverInput; + IVRIOBuffer *m_pVRIOBuffer; + IVRDriverSpatialAnchors *m_pVRDriverSpatialAnchors; + IVRIPCResourceManagerClient *m_pVRIPCResourceManager; + }; + + inline COpenVRDriverContext &OpenVRInternal_ModuleServerDriverContext() + { + static void *ctx[sizeof( COpenVRDriverContext ) / sizeof( void * )]; + return *(COpenVRDriverContext *)ctx; + } + + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleServerDriverContext().VRSettings(); } + inline IVRProperties *VR_CALLTYPE VRPropertiesRaw() { return OpenVRInternal_ModuleServerDriverContext().VRPropertiesRaw(); } + inline CVRPropertyHelpers *VR_CALLTYPE VRProperties() { return OpenVRInternal_ModuleServerDriverContext().VRProperties(); } + inline CVRHiddenAreaHelpers *VR_CALLTYPE VRHiddenArea() { return OpenVRInternal_ModuleServerDriverContext().VRHiddenArea(); } + inline IVRDriverLog *VR_CALLTYPE VRDriverLog() { return OpenVRInternal_ModuleServerDriverContext().VRDriverLog(); } + inline IVRServerDriverHost *VR_CALLTYPE VRServerDriverHost() { return OpenVRInternal_ModuleServerDriverContext().VRServerDriverHost(); } + inline IVRWatchdogHost *VR_CALLTYPE VRWatchdogHost() { return OpenVRInternal_ModuleServerDriverContext().VRWatchdogHost(); } + inline IVRCompositorDriverHost *VR_CALLTYPE VRCompositorDriverHost() { return OpenVRInternal_ModuleServerDriverContext().VRCompositorDriverHost(); } + inline DriverHandle_t VR_CALLTYPE VRDriverHandle() { return OpenVRInternal_ModuleServerDriverContext().VRDriverHandle(); } + inline IVRDriverManager *VR_CALLTYPE VRDriverManager() { return OpenVRInternal_ModuleServerDriverContext().VRDriverManager(); } + inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleServerDriverContext().VRResources(); } + inline IVRDriverInput *VR_CALLTYPE VRDriverInput() { return OpenVRInternal_ModuleServerDriverContext().VRDriverInput(); } + inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleServerDriverContext().VRIOBuffer(); } + inline IVRDriverSpatialAnchors *VR_CALLTYPE VRDriverSpatialAnchors() { return OpenVRInternal_ModuleServerDriverContext().VRDriverSpatialAnchors(); } + inline IVRIPCResourceManagerClient *VR_CALLTYPE VRIPCResourceManager() { return OpenVRInternal_ModuleServerDriverContext().VRIPCResourceManager(); } + + inline void COpenVRDriverContext::Clear() + { + m_pVRSettings = nullptr; + m_pVRProperties = nullptr; + m_pVRServerDriverHost = nullptr; + m_pVRWatchdogHost = nullptr; + m_pVRCompositorDriverHost = nullptr; + m_pVRDriverLog = nullptr; + m_pVRDriverManager = nullptr; + m_pVRResources = nullptr; + m_pVRDriverInput = nullptr; + m_pVRIOBuffer = nullptr; + m_pVRDriverSpatialAnchors = nullptr; + m_pVRIPCResourceManager = nullptr; + } + + inline EVRInitError COpenVRDriverContext::InitServer() + { + Clear(); + if ( !VRServerDriverHost() + || !VRSettings() + || !VRProperties() + || !VRDriverLog() + || !VRDriverManager() + || !VRResources() ) + return VRInitError_Init_InterfaceNotFound; + return VRInitError_None; + } + + inline EVRInitError COpenVRDriverContext::InitWatchdog() + { + Clear(); + if ( !VRWatchdogHost() + || !VRSettings() + || !VRDriverLog() ) + return VRInitError_Init_InterfaceNotFound; + return VRInitError_None; + } + + inline EVRInitError COpenVRDriverContext::InitCompositor() + { + Clear(); + if ( !VRCompositorDriverHost() + || !VRSettings() + || !VRProperties() + || !VRDriverLog() + || !VRDriverManager() + || !VRResources() ) + return VRInitError_Init_InterfaceNotFound; + return VRInitError_None; + } + + inline EVRInitError InitServerDriverContext( IVRDriverContext *pContext ) + { + VRDriverContext() = pContext; + return OpenVRInternal_ModuleServerDriverContext().InitServer(); + } + + inline EVRInitError InitWatchdogDriverContext( IVRDriverContext *pContext ) + { + VRDriverContext() = pContext; + return OpenVRInternal_ModuleServerDriverContext().InitWatchdog(); + } + + inline EVRInitError InitCompositorDriverContext( IVRDriverContext *pContext ) + { + VRDriverContext() = pContext; + return OpenVRInternal_ModuleServerDriverContext().InitCompositor(); + } + + inline void CleanupDriverContext() + { + VRDriverContext() = nullptr; + OpenVRInternal_ModuleServerDriverContext().Clear(); + } + + #define VR_INIT_SERVER_DRIVER_CONTEXT( pContext ) \ + { \ + vr::EVRInitError eError = vr::InitServerDriverContext( pContext ); \ + if( eError != vr::VRInitError_None ) \ + return eError; \ + } + + #define VR_CLEANUP_SERVER_DRIVER_CONTEXT() \ + vr::CleanupDriverContext(); + + #define VR_INIT_WATCHDOG_DRIVER_CONTEXT( pContext ) \ + { \ + vr::EVRInitError eError = vr::InitWatchdogDriverContext( pContext ); \ + if( eError != vr::VRInitError_None ) \ + return eError; \ + } + + #define VR_CLEANUP_WATCHDOG_DRIVER_CONTEXT() \ + vr::CleanupDriverContext(); + +#define VR_INIT_COMPOSITOR_DRIVER_CONTEXT( pContext ) \ + { \ + vr::EVRInitError eError = vr::InitCompositorDriverContext( pContext ); \ + if( eError != vr::VRInitError_None ) \ + return eError; \ + } + +#define VR_CLEANUP_COMPOSITOR_DRIVER_CONTEXT() \ + vr::CleanupDriverContext(); + + +#endif + +} + + +#endif + + diff --git a/tools/vr/src/present_sync.h b/tools/vr/src/present_sync.h new file mode 100644 index 0000000000..e87d0e9632 --- /dev/null +++ b/tools/vr/src/present_sync.h @@ -0,0 +1,10 @@ +#pragma once +#include <stdint.h> + +#define DROIDDECK_PRESENT_SYNC_NAME "present-sync" +#define DROIDDECK_PRESENT_SYNC_SIZE 4096 + +struct droiddeck_present_sync { + uint32_t issued; + uint32_t done; +}; diff --git a/tools/vr/src/presenter.cpp b/tools/vr/src/presenter.cpp new file mode 100644 index 0000000000..20b0ad63cd --- /dev/null +++ b/tools/vr/src/presenter.cpp @@ -0,0 +1,916 @@ +#define VK_NO_PROTOTYPES +#include <vulkan/vulkan_core.h> +typedef struct _XDisplay Display; +typedef unsigned long Window; +typedef unsigned long VisualID; +#include <vulkan/vulkan_xlib.h> +#include <wayland-client.h> +#include <vulkan/vulkan_wayland.h> +#include "xdg-shell-client-protocol.h" + +#include "../../../app/src/main/cpp/waylandcomp/src/headpose_shm.h" +#include "presenter.h" +#include "presenter_image.h" +#include "present_sync.h" +#include "xr_tracking_file.h" +#include "xr_frame_channel.h" +#include "producer_lease.h" + +#include <algorithm> +#include <atomic> +#include <chrono> +#include <condition_variable> +#include <cstdarg> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <dlfcn.h> +#include <fcntl.h> +#include <linux/futex.h> +#include <mutex> +#include <string> +#include <sys/mman.h> +#include <sys/syscall.h> +#include <thread> +#include <unistd.h> +#include <vector> + +#include "openvr_driver.h" + +namespace droiddeck { +namespace { + +void Log(const char *fmt, ...) __attribute__((format(printf, 1, 2))); +void Log(const char *fmt, ...) { + char buf[1024]; + va_list ap; + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + if (vr::VRDriverContext() && vr::VRDriverLog()) vr::VRDriverLog()->Log(buf); + fprintf(stderr, "[droiddeck] %s\n", buf); +} + + +struct X11 { + void *lib = nullptr; + Display *(*OpenDisplay)(const char *); + Window (*DefaultRootWindow)(Display *); + int (*DefaultScreen)(Display *); + int (*DisplayWidth)(Display *, int); + int (*DisplayHeight)(Display *, int); + Window (*CreateSimpleWindow)(Display *, Window, int, int, unsigned, unsigned, unsigned, unsigned long, unsigned long); + unsigned long (*InternAtom)(Display *, const char *, int); + int (*ChangeProperty)(Display *, Window, unsigned long, unsigned long, int, int, const unsigned char *, int); + int (*MapWindow)(Display *, Window); + int (*StoreName)(Display *, Window, const char *); + int (*Flush)(Display *); + + bool Load() { + lib = dlopen("libX11.so.6", RTLD_NOW | RTLD_LOCAL); + if (!lib) return false; +#define X(name) if (!(*(void **)&name = dlsym(lib, "X" #name))) return false; + X(OpenDisplay) X(DefaultRootWindow) X(DefaultScreen) X(DisplayWidth) X(DisplayHeight) + X(CreateSimpleWindow) X(InternAtom) X(ChangeProperty) X(MapWindow) X(StoreName) X(Flush) +#undef X + return true; + } +}; + + +#define VK_GLOBAL(X) X(CreateInstance) +#define VK_INSTANCE(X) \ + X(DestroyInstance) X(EnumeratePhysicalDevices) X(GetPhysicalDeviceQueueFamilyProperties) \ + X(GetPhysicalDeviceMemoryProperties) X(CreateDevice) X(GetDeviceProcAddr) X(CreateXlibSurfaceKHR) \ + X(CreateWaylandSurfaceKHR) \ + X(GetPhysicalDeviceSurfaceSupportKHR) X(GetPhysicalDeviceSurfaceCapabilitiesKHR) \ + X(GetPhysicalDeviceSurfaceFormatsKHR) X(GetPhysicalDeviceSurfacePresentModesKHR) X(GetPhysicalDeviceProperties) X(DestroySurfaceKHR) +#define VK_DEVICE(X) \ + X(GetDeviceQueue) X(CreateSwapchainKHR) X(DestroySwapchainKHR) X(GetSwapchainImagesKHR) X(AcquireNextImageKHR) \ + X(QueuePresentKHR) X(CreateCommandPool) X(AllocateCommandBuffers) X(BeginCommandBuffer) X(EndCommandBuffer) \ + X(ResetCommandBuffer) X(CmdPipelineBarrier) X(CmdBlitImage) X(CmdClearColorImage) X(QueueSubmit) X(CreateFence) \ + X(WaitForFences) X(ResetFences) X(CreateSemaphore) X(CreateImage) X(DestroyImage) X(GetImageMemoryRequirements) \ + X(AllocateMemory) X(FreeMemory) X(BindImageMemory) X(DeviceWaitIdle) X(DestroyDevice) X(DestroyFence) X(DestroySemaphore) \ + X(DestroyCommandPool) X(CreateBuffer) X(DestroyBuffer) X(GetBufferMemoryRequirements) X(BindBufferMemory) \ + X(MapMemory) X(UnmapMemory) X(InvalidateMappedMemoryRanges) X(CmdCopyImageToBuffer) + +struct Vk { + void *lib = nullptr; + PFN_vkGetInstanceProcAddr GetInstanceProcAddr = nullptr; +#define X(n) PFN_vk##n n = nullptr; + VK_GLOBAL(X) VK_INSTANCE(X) VK_DEVICE(X) +#undef X +}; + +struct Imported { + uint64_t handle; + VkImage image = VK_NULL_HANDLE; + VkDeviceMemory memory = VK_NULL_HANDLE; + uint32_t width = 0, height = 0; + uint32_t producerPid = 0; + VkFormat format = VK_FORMAT_UNDEFINED; +}; + +struct PendingImport { + uint64_t handle; + int fd; + uint32_t format, width, height, producerPid; +}; + +class CaptureLease { +public: + explicit CaptureLease(uint32_t pid) : acquired_(droiddeck_producer_acquire(pid, &lease_)) {} + ~CaptureLease() { + if (lease_.descriptor < 0) return; + if (gpuComplete_) droiddeck_producer_release(&lease_); + else close(lease_.descriptor); + } + bool Acquired() const { return acquired_; } + void BeginGpu() { gpuComplete_ = false; } + void EndGpu() { gpuComplete_ = true; } + bool Release() { return gpuComplete_ && droiddeck_producer_release(&lease_); } +private: + droiddeck_producer_lease lease_{-1, 0}; + bool acquired_; + bool gpuComplete_ = true; +}; + +class Impl { +public: + static Impl &Get() { + static Impl *impl = made_ = new Impl; + return *impl; + } + + static Impl *Made() { return made_; } + + void Add(const uint64_t handles[3], const int fds[3], uint32_t format, uint32_t w, uint32_t h, uint32_t producerPid) { + std::lock_guard<std::mutex> lock(mutex_); + if (failed_ || exit_) return; + for (int i = 0; i < 3; i++) { + if (fds[i] < 0) continue; + int fd = dup(fds[i]); + if (fd >= 0) pending_.push_back({handles[i], fd, format, w, h, producerPid}); + } + EnsureThread(); + cv_.notify_all(); + } + + void Remove(uint64_t handle) { + std::lock_guard<std::mutex> lock(mutex_); + removals_.push_back(handle); + cv_.notify_all(); + } + + void Submit(const EyeFrame &f) { + std::unique_lock<std::mutex> lock(mutex_); + if (failed_ || exit_) return; + bool blocking = FrameChannelRequested(); + if (blocking) cv_.wait(lock, [this] { return failed_ || exit_ || (!haveFrame_ && !inFlight_); }); + if (failed_ || exit_) return; + EnsureThread(); + frame_ = f; + frameAt_ = std::chrono::steady_clock::now(); + const droiddeck_present_sync *sync = MapSync(frameAt_); + const uint32_t issued = sync ? __atomic_load_n(&sync->issued, __ATOMIC_ACQUIRE) : 0; + frameTracked_ = sync && issued != lastIssued_; + frameMark_ = issued; + lastIssued_ = issued; + haveFrame_ = true; + submitted_++; + uint64_t ticket = ++ticket_; + cv_.notify_all(); + if (blocking) cv_.wait(lock, [this, ticket] { return failed_ || completed_ >= ticket; }); + } + + void Shutdown() { + { + std::lock_guard<std::mutex> lock(mutex_); + exit_ = true; + cv_.notify_all(); + } + if (thread_.joinable()) thread_.join(); + } + +private: + static bool FrameChannelRequested() { + const char *mode = getenv("DROIDDECK_VR_PRESENT"); + return mode && !strcmp(mode, "questframes"); + } + + void Fail() { + std::lock_guard<std::mutex> lock(mutex_); + failed_ = true; + for (const auto &pending : pending_) close(pending.fd); + pending_.clear(); cv_.notify_all(); + } + void EnsureThread() { + if (!started_) { + started_ = true; + thread_ = std::thread([this] { + try { Run(); } + catch (const std::exception &error) { Log("presenter: %s", error.what()); } + Cleanup(); Fail(); + }); + } + } + + + void Run() { + const char *mode = getenv("DROIDDECK_VR_PRESENT"); + frameChannel_ = FrameChannelRequested(); + if (!frameChannel_) wayland_ = !(mode && !strcmp(mode, "x11")) && InitWayland(); + if (!frameChannel_ && !wayland_ && !InitWindow()) { + Log("presenter: unavailable, frames are not shown"); + Fail(); return; + } + if (!InitVulkan()) { + Log("presenter: unavailable, frames are not shown"); + Fail(); return; + } + if (const char *g = getenv("DROIDDECK_VR_PRESENT_GUARD_MS")) guard_ = std::chrono::microseconds((long)(atof(g) * 1000)); + uint64_t shown = 0, waited = 0, late = 0; + std::chrono::steady_clock::duration longest{}; + auto lastLog = std::chrono::steady_clock::now(); + while (true) { + EyeFrame f; + uint64_t ticket = 0; + std::chrono::steady_clock::time_point at; + uint32_t mark = 0; + bool tracked = false; + std::vector<PendingImport> imports; + std::vector<uint64_t> removals; + { + std::unique_lock<std::mutex> lock(mutex_); + cv_.wait(lock, [this] { return exit_ || haveFrame_ || !pending_.empty() || !removals_.empty(); }); + if (exit_) break; + imports.swap(pending_); + removals.swap(removals_); + f = frame_; + at = frameAt_; + mark = frameMark_; + tracked = frameTracked_; + bool draw = haveFrame_; + haveFrame_ = false; + inFlight_ = draw; ticket = ticket_; + if (!draw) f.texture[0] = f.texture[1] = 0; + } + if (wl_) { wl_display_dispatch_pending(wl_); wl_display_flush(wl_); } + for (auto &p : imports) Import(p); + for (auto h : removals) Forget(h); + if (f.texture[0] && !frameChannel_ && tracked) { + const auto start = std::chrono::steady_clock::now(); + const int r = WaitDrawn(mark, start + kDrawnTimeout); + if (r > 0) { + waited++; + longest = std::max(longest, std::chrono::steady_clock::now() - start); + } else if (r < 0) { + late++; + } + } else if (f.texture[0] && !frameChannel_) { + std::this_thread::sleep_until(at + guard_); + } + if (!frameChannel_) { + if (const Imported *eye = Find(f.texture[0])) FollowPanel(eye->format); + } + if (f.texture[0] && (frameChannel_ ? Capture(f) : Draw(f))) shown++; + { + std::lock_guard<std::mutex> lock(mutex_); + inFlight_ = false; completed_ = ticket; cv_.notify_all(); + if (failed_) break; + } + auto now = std::chrono::steady_clock::now(); + if (now - lastLog > std::chrono::seconds(10)) { + Log("presenter: %llu frames shown, %llu submitted, %llu waited for the GPU (longest %.1f ms), %llu late (last 10 s)", + (unsigned long long)shown, (unsigned long long)submitted_.exchange(0), (unsigned long long)waited, + std::chrono::duration<double, std::milli>(longest).count(), (unsigned long long)late); + shown = waited = late = 0; + longest = {}; + lastLog = now; + } + } + } + + void Cleanup() { + if (dev_) vk_.DeviceWaitIdle(dev_); + DestroyCapture(); + while (!textures_.empty()) Forget(textures_.back().handle); + if (dev_) { + if (swapchain_) vk_.DestroySwapchainKHR(dev_, swapchain_, nullptr); + if (acquired_) vk_.DestroySemaphore(dev_, acquired_, nullptr); + if (rendered_) vk_.DestroySemaphore(dev_, rendered_, nullptr); + if (fence_) vk_.DestroyFence(dev_, fence_, nullptr); + if (pool_) vk_.DestroyCommandPool(dev_, pool_, nullptr); + vk_.DestroyDevice(dev_, nullptr); dev_ = VK_NULL_HANDLE; + } + if (surface_) vk_.DestroySurfaceKHR(inst_, surface_, nullptr); + if (inst_) vk_.DestroyInstance(inst_, nullptr); + surface_ = VK_NULL_HANDLE; inst_ = VK_NULL_HANDLE; + } + + bool PanelSize(uint32_t *w, uint32_t *h) { + if (!pose_) { + int fd = open("/run/droiddeck/" DROIDDECK_HEADPOSE_FILE, O_RDONLY | O_CLOEXEC); + if (fd < 0) return false; + void *m = mmap(nullptr, sizeof(droiddeck_headpose), PROT_READ, MAP_SHARED, fd, 0); + close(fd); + if (m == MAP_FAILED) return false; + pose_ = (const volatile droiddeck_headpose *)m; + } + for (int tries = 0; tries < 8; tries++) { + const uint32_t a = __atomic_load_n(&pose_->seq, __ATOMIC_ACQUIRE); + if (a & 1u) continue; + const uint32_t ew = pose_->eye_w, eh = pose_->eye_h; + __atomic_thread_fence(__ATOMIC_ACQUIRE); + if (__atomic_load_n(&pose_->seq, __ATOMIC_RELAXED) != a) continue; + if (!ew || !eh || pose_->magic != DROIDDECK_HEADPOSE_MAGIC) return false; + *w = ew * 2; + *h = eh; + return true; + } + return false; + } + + void FollowPanel(VkFormat eyeFormat) { + uint32_t w = width_, h = height_; + if (wayland_ && !PanelSize(&w, &h)) return; + const bool resized = w != width_ || h != height_; + const bool encodingChanged = SrgbEyeFormat(eyeFormat) != SrgbEyeFormat(eyeFormat_); + const auto now = std::chrono::steady_clock::now(); + if (!resized && !encodingChanged && (swapchain_ || now < retryAt_)) return; + vk_.DeviceWaitIdle(dev_); + if (swapchain_) vk_.DestroySwapchainKHR(dev_, swapchain_, nullptr); + swapchain_ = VK_NULL_HANDLE; + images_.clear(); + if (resized) Log("presenter: panel now %ux%u (was %ux%u)", w, h, width_, height_); + width_ = w; + height_ = h; + eyeFormat_ = eyeFormat; + if (!CreateSwapchain()) retryAt_ = now + std::chrono::seconds(1); + } + + std::chrono::microseconds guard_{4000}; + std::chrono::steady_clock::time_point retryAt_{}; + static constexpr std::chrono::milliseconds kDrawnTimeout{100}; + + const droiddeck_present_sync *MapSync(std::chrono::steady_clock::time_point now) { + if (sync_) return sync_; + if (syncTried_.time_since_epoch().count() && now - syncTried_ < std::chrono::seconds(1)) return nullptr; + syncTried_ = now; + const char *rt = getenv("XDG_RUNTIME_DIR"); + std::string path = std::string(rt && *rt ? rt : "/run/droiddeck") + "/droiddeck-steamvr/" DROIDDECK_PRESENT_SYNC_NAME; + int fd = open(path.c_str(), O_RDONLY | O_CLOEXEC); + if (fd < 0) return nullptr; + void *m = mmap(nullptr, DROIDDECK_PRESENT_SYNC_SIZE, PROT_READ, MAP_SHARED, fd, 0); + close(fd); + if (m == MAP_FAILED) return nullptr; + sync_ = (const droiddeck_present_sync *)m; + Log("presenter: frames wait for the compositor's GPU work (%s)", path.c_str()); + return sync_; + } + + int WaitDrawn(uint32_t mark, std::chrono::steady_clock::time_point until) { + const droiddeck_present_sync *s = sync_; + int slept = 0; + while (true) { + const uint32_t done = __atomic_load_n(&s->done, __ATOMIC_ACQUIRE); + if ((int32_t)(done - mark) >= 0) return slept; + const auto left = until - std::chrono::steady_clock::now(); + if (left <= std::chrono::steady_clock::duration::zero()) return -1; + const auto ns = std::chrono::duration_cast<std::chrono::nanoseconds>(left).count(); + struct timespec ts = {(time_t)(ns / 1000000000), (long)(ns % 1000000000)}; + syscall(SYS_futex, const_cast<uint32_t *>(&s->done), FUTEX_WAIT, done, &ts, nullptr, 0); + slept = 1; + } + } + + struct wl_display *wl_ = nullptr; + struct wl_compositor *wlComp_ = nullptr; + struct xdg_wm_base *wm_ = nullptr; + struct wl_surface *wlSurf_ = nullptr; + struct xdg_surface *xdgSurf_ = nullptr; + struct xdg_toplevel *toplevel_ = nullptr; + bool wayland_ = false, configured_ = false; + int32_t cfgW_ = 0, cfgH_ = 0; + + static void OnGlobal(void *data, struct wl_registry *reg, uint32_t name, const char *iface, uint32_t version) { + Impl *self = (Impl *)data; + if (!strcmp(iface, wl_compositor_interface.name)) + self->wlComp_ = (struct wl_compositor *)wl_registry_bind(reg, name, &wl_compositor_interface, version < 4 ? version : 4); + else if (!strcmp(iface, xdg_wm_base_interface.name)) + self->wm_ = (struct xdg_wm_base *)wl_registry_bind(reg, name, &xdg_wm_base_interface, 1); + } + static void OnGlobalRemove(void *, struct wl_registry *, uint32_t) {} + static void OnPing(void *, struct xdg_wm_base *wm, uint32_t serial) { xdg_wm_base_pong(wm, serial); } + static void OnSurfaceConfigure(void *data, struct xdg_surface *xs, uint32_t serial) { + xdg_surface_ack_configure(xs, serial); + ((Impl *)data)->configured_ = true; + } + static void OnToplevelConfigure(void *data, struct xdg_toplevel *, int32_t w, int32_t h, struct wl_array *) { + Impl *self = (Impl *)data; + if (w > 0 && h > 0) { self->cfgW_ = w; self->cfgH_ = h; } + } + static void OnToplevelClose(void *, struct xdg_toplevel *) {} + + bool InitWayland() { + const char *name = getenv("DROIDDECK_VR_WAYLAND_DISPLAY"); + if (!name || !*name) name = "wayland-0"; + wl_ = wl_display_connect(name); + if (!wl_) { Log("presenter: no Wayland display %s; using the X11 overlay", name); return false; } + static const struct wl_registry_listener regListener = {OnGlobal, OnGlobalRemove}; + struct wl_registry *reg = wl_display_get_registry(wl_); + wl_registry_add_listener(reg, ®Listener, this); + wl_display_roundtrip(wl_); + if (!wlComp_ || !wm_) { Log("presenter: %s lacks wl_compositor or xdg_wm_base", name); return false; } + static const struct xdg_wm_base_listener wmListener = {OnPing}; + xdg_wm_base_add_listener(wm_, &wmListener, this); + wlSurf_ = wl_compositor_create_surface(wlComp_); + xdgSurf_ = xdg_wm_base_get_xdg_surface(wm_, wlSurf_); + static const struct xdg_surface_listener xsListener = {OnSurfaceConfigure}; + xdg_surface_add_listener(xdgSurf_, &xsListener, this); + toplevel_ = xdg_surface_get_toplevel(xdgSurf_); + static const struct xdg_toplevel_listener tlListener = {OnToplevelConfigure, OnToplevelClose, nullptr, nullptr}; + xdg_toplevel_add_listener(toplevel_, &tlListener, this); + xdg_toplevel_set_title(toplevel_, "DroidDeck Cardboard VR"); + xdg_toplevel_set_app_id(toplevel_, "droiddeck-cardboard-vr"); + xdg_toplevel_set_fullscreen(toplevel_, nullptr); + wl_surface_commit(wlSurf_); + for (int i = 0; i < 20 && !configured_; i++) wl_display_roundtrip(wl_); + width_ = height_ = 0; + if (!PanelSize(&width_, &height_)) width_ = height_ = 0; + XrTrackingFile xrFile; + DroidDeckXrTracking tracking; + if (xrFile.Read(&tracking) && XrTrackingFile::Fresh(tracking)) { + width_ = tracking.eyes[0].width * 2; height_ = tracking.eyes[0].height; + } + if (!width_ && cfgW_ > 0 && cfgH_ > 0) { width_ = (uint32_t)cfgW_; height_ = (uint32_t)cfgH_; } + if (!width_) { width_ = 1920; height_ = 1080; } + Log("presenter: %ux%u fullscreen window on Wayland display %s (configured %s)", width_, height_, name, configured_ ? "yes" : "no"); + return true; + } + + bool InitWindow() { + if (!x_.Load()) { Log("presenter: no libX11"); return false; } + const char *name = getenv("DROIDDECK_VR_DISPLAY"); + if (!name || !*name) name = ":0"; + dpy_ = x_.OpenDisplay(name); + if (!dpy_) { Log("presenter: cannot open X display %s", name); return false; } + int scr = x_.DefaultScreen(dpy_); + width_ = (uint32_t)x_.DisplayWidth(dpy_, scr); + height_ = (uint32_t)x_.DisplayHeight(dpy_, scr); + win_ = x_.CreateSimpleWindow(dpy_, x_.DefaultRootWindow(dpy_), 0, 0, width_, height_, 0, 0, 0); + x_.StoreName(dpy_, win_, "DroidDeck Cardboard VR"); + const char *atom = getenv("DROIDDECK_VR_OVERLAY_ATOM"); + if (!atom || !*atom) atom = "STEAM_OVERLAY"; + unsigned long cardinal = 6; + unsigned long one = 1; + x_.ChangeProperty(dpy_, win_, x_.InternAtom(dpy_, atom, 0), cardinal, 32, 0 , + (const unsigned char *)&one, 1); + x_.MapWindow(dpy_, win_); + x_.Flush(dpy_); + Log("presenter: %ux%u overlay window (%s) on X display %s", width_, height_, atom, name); + return true; + } + + bool InitVulkan() { + vk_.lib = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL); + if (!vk_.lib) { Log("presenter: no libvulkan"); return false; } + vk_.GetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(vk_.lib, "vkGetInstanceProcAddr"); +#define X(n) vk_.n = (PFN_vk##n)vk_.GetInstanceProcAddr(VK_NULL_HANDLE, "vk" #n); + VK_GLOBAL(X) +#undef X + const char *iexts[] = {"VK_KHR_surface", wayland_ ? "VK_KHR_wayland_surface" : "VK_KHR_xlib_surface"}; + VkApplicationInfo app = {VK_STRUCTURE_TYPE_APPLICATION_INFO, nullptr, "droiddeck-vr-presenter", 1, nullptr, 0, VK_API_VERSION_1_2}; + VkInstanceCreateInfo ici = {VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, nullptr, 0, &app, 0, nullptr, + frameChannel_ ? 0u : 2u, frameChannel_ ? nullptr : iexts}; + VkResult r = vk_.CreateInstance(&ici, nullptr, &inst_); + if (r != VK_SUCCESS) { Log("presenter: vkCreateInstance %d", r); return false; } +#define X(n) vk_.n = (PFN_vk##n)vk_.GetInstanceProcAddr(inst_, "vk" #n); + VK_INSTANCE(X) +#undef X + uint32_t n = 1; + VkPhysicalDevice pds[4]; + n = 4; + if (vk_.EnumeratePhysicalDevices(inst_, &n, pds) < 0 || n == 0) { Log("presenter: no GPU"); return false; } + pd_ = pds[0]; + VkPhysicalDeviceProperties props; + vk_.GetPhysicalDeviceProperties(pd_, &props); + vk_.GetPhysicalDeviceMemoryProperties(pd_, &mem_); + + if (!frameChannel_ && wayland_) { + VkWaylandSurfaceCreateInfoKHR wci = {VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR, nullptr, 0, wl_, wlSurf_}; + if ((r = vk_.CreateWaylandSurfaceKHR(inst_, &wci, nullptr, &surface_)) != VK_SUCCESS) { Log("presenter: wayland surface %d", r); return false; } + } else if (!frameChannel_) { + VkXlibSurfaceCreateInfoKHR sci = {VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, nullptr, 0, dpy_, win_}; + if ((r = vk_.CreateXlibSurfaceKHR(inst_, &sci, nullptr, &surface_)) != VK_SUCCESS) { Log("presenter: xlib surface %d", r); return false; } + } + + uint32_t nq = 0; + vk_.GetPhysicalDeviceQueueFamilyProperties(pd_, &nq, nullptr); + std::vector<VkQueueFamilyProperties> qf(nq); + vk_.GetPhysicalDeviceQueueFamilyProperties(pd_, &nq, qf.data()); + qfam_ = UINT32_MAX; + for (uint32_t i = 0; i < nq; i++) { + VkBool32 present = VK_FALSE; + if (frameChannel_) present = VK_TRUE; + else vk_.GetPhysicalDeviceSurfaceSupportKHR(pd_, i, surface_, &present); + if ((qf[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) && present) { qfam_ = i; break; } + } + if (qfam_ == UINT32_MAX) { Log("presenter: no queue can present"); return false; } + float prio = 1.0f; + VkDeviceQueueCreateInfo qci = {VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, nullptr, 0, qfam_, 1, &prio}; + const char *dexts[] = {"VK_KHR_external_memory_fd", "VK_KHR_swapchain"}; + VkDeviceCreateInfo dci = {VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, nullptr, 0, 1, &qci, 0, nullptr, frameChannel_ ? 1u : 2u, dexts, nullptr}; + if ((r = vk_.CreateDevice(pd_, &dci, nullptr, &dev_)) != VK_SUCCESS) { Log("presenter: vkCreateDevice %d", r); return false; } +#define X(n) vk_.n = (PFN_vk##n)vk_.GetDeviceProcAddr(dev_, "vk" #n); + VK_DEVICE(X) +#undef X + vk_.GetDeviceQueue(dev_, qfam_, 0, &queue_); + + VkCommandPoolCreateInfo pci = {VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, nullptr, + VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, qfam_}; + vk_.CreateCommandPool(dev_, &pci, nullptr, &pool_); + VkCommandBufferAllocateInfo cai = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, nullptr, pool_, VK_COMMAND_BUFFER_LEVEL_PRIMARY, 1}; + vk_.AllocateCommandBuffers(dev_, &cai, &cmd_); + VkFenceCreateInfo fci = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, nullptr, VK_FENCE_CREATE_SIGNALED_BIT}; + vk_.CreateFence(dev_, &fci, nullptr, &fence_); + VkSemaphoreCreateInfo semci = {VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, nullptr, 0}; + vk_.CreateSemaphore(dev_, &semci, nullptr, &acquired_); + vk_.CreateSemaphore(dev_, &semci, nullptr, &rendered_); + Log("presenter: Vulkan on %s, queue family %u", props.deviceName, qfam_); + return true; + } + + bool CreateSwapchain() { + VkSurfaceCapabilitiesKHR caps; + vk_.GetPhysicalDeviceSurfaceCapabilitiesKHR(pd_, surface_, &caps); + uint32_t nf = 0; + vk_.GetPhysicalDeviceSurfaceFormatsKHR(pd_, surface_, &nf, nullptr); + std::vector<VkSurfaceFormatKHR> fmts(nf); + vk_.GetPhysicalDeviceSurfaceFormatsKHR(pd_, surface_, &nf, fmts.data()); + VkSurfaceFormatKHR fmt{}; + if (!EyeSurfaceFormat(eyeFormat_, fmts.data(), nf, &fmt)) { + Log("presenter: no surface format preserves eye format %d", eyeFormat_); + return false; + } + uint32_t npm = 0; + vk_.GetPhysicalDeviceSurfacePresentModesKHR(pd_, surface_, &npm, nullptr); + std::vector<VkPresentModeKHR> pms(npm); + vk_.GetPhysicalDeviceSurfacePresentModesKHR(pd_, surface_, &npm, pms.data()); + VkPresentModeKHR pm = VK_PRESENT_MODE_FIFO_KHR; + for (auto m : pms) if (m == VK_PRESENT_MODE_MAILBOX_KHR) pm = m; + VkExtent2D ext = caps.currentExtent.width != UINT32_MAX ? caps.currentExtent : VkExtent2D{width_, height_}; + extent_ = ext; + uint32_t count = caps.minImageCount + 1; + if (caps.maxImageCount && count > caps.maxImageCount) count = caps.maxImageCount; + VkCompositeAlphaFlagBitsKHR alpha = (caps.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR) + ? VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR : (VkCompositeAlphaFlagBitsKHR)(caps.supportedCompositeAlpha & -caps.supportedCompositeAlpha); + VkSwapchainCreateInfoKHR sci = {VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR}; + sci.surface = surface_; + sci.minImageCount = count; + sci.imageFormat = fmt.format; + sci.imageColorSpace = fmt.colorSpace; + sci.imageExtent = ext; + sci.imageArrayLayers = 1; + sci.imageUsage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; + sci.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; + sci.preTransform = caps.currentTransform; + sci.compositeAlpha = alpha; + sci.presentMode = pm; + sci.clipped = VK_TRUE; + VkResult r = vk_.CreateSwapchainKHR(dev_, &sci, nullptr, &swapchain_); + if (r != VK_SUCCESS) { + swapchain_ = VK_NULL_HANDLE; + Log("presenter: vkCreateSwapchainKHR %d", r); + return false; + } + uint32_t ni = 0; + vk_.GetSwapchainImagesKHR(dev_, swapchain_, &ni, nullptr); + images_.resize(ni); + vk_.GetSwapchainImagesKHR(dev_, swapchain_, &ni, images_.data()); + Log("presenter: swapchain %ux%u, format %d, %u images, %s", ext.width, ext.height, fmt.format, ni, + pm == VK_PRESENT_MODE_MAILBOX_KHR ? "mailbox" : "fifo"); + return true; + } + + int MemoryType(uint32_t bits) { + for (uint32_t i = 0; i < mem_.memoryTypeCount; i++) + if ((bits & (1u << i)) && (mem_.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)) return (int)i; + for (uint32_t i = 0; i < mem_.memoryTypeCount; i++) if (bits & (1u << i)) return (int)i; + return -1; + } + + void Import(const PendingImport &p) { + Imported im{p.handle}; + im.width = p.width; + im.height = p.height; + im.producerPid = p.producerPid; + im.format = (VkFormat)p.format; + // Dedicated OPAQUE_FD imports must match SteamVR's exported image description. + SharedEyeImage description(im.format, p.width, p.height); + VkResult r = vk_.CreateImage(dev_, &description.info, nullptr, &im.image); + if (r != VK_SUCCESS) { Log("presenter: import image %d", r); close(p.fd); return; } + VkMemoryRequirements req; + vk_.GetImageMemoryRequirements(dev_, im.image, &req); + VkImportMemoryFdInfoKHR imp = {VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR, nullptr, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, p.fd}; + VkMemoryDedicatedAllocateInfo ded = {VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, &imp, im.image, VK_NULL_HANDLE}; + int memoryType = MemoryType(req.memoryTypeBits); + if (memoryType < 0) { vk_.DestroyImage(dev_, im.image, nullptr); close(p.fd); return; } + VkMemoryAllocateInfo mai = {VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, &ded, req.size, (uint32_t)memoryType}; + r = vk_.AllocateMemory(dev_, &mai, nullptr, &im.memory); + if (r != VK_SUCCESS) { + Log("presenter: import memory (fd %d, %llu bytes) %d", p.fd, (unsigned long long)req.size, r); + close(p.fd); + vk_.DestroyImage(dev_, im.image, nullptr); + return; + } + r = vk_.BindImageMemory(dev_, im.image, im.memory, 0); + if (r != VK_SUCCESS) { + Log("presenter: bind imported image %d", r); + vk_.DestroyImage(dev_, im.image, nullptr); + vk_.FreeMemory(dev_, im.memory, nullptr); + return; + } + textures_.push_back(im); + Log("presenter: imported texture 0x%llx (%ux%u, format %u)", (unsigned long long)p.handle, p.width, p.height, p.format); + } + + void Forget(uint64_t handle) { + for (auto it = textures_.begin(); it != textures_.end(); ++it) { + if (it->handle == handle) { + vk_.DeviceWaitIdle(dev_); + vk_.DestroyImage(dev_, it->image, nullptr); + vk_.FreeMemory(dev_, it->memory, nullptr); + textures_.erase(it); + return; + } + } + } + + const Imported *Find(uint64_t h) const { + for (auto &t : textures_) if (t.handle == h) return &t; + return nullptr; + } + + static VkImageMemoryBarrier Barrier(VkImage img, VkImageLayout from, VkImageLayout to, VkAccessFlags src, VkAccessFlags dst, + uint32_t srcQ = VK_QUEUE_FAMILY_IGNORED, uint32_t dstQ = VK_QUEUE_FAMILY_IGNORED) { + VkImageMemoryBarrier b = {VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, nullptr, src, dst, from, to, srcQ, dstQ, img, + {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}}; + return b; + } + + void DestroyCapture() { + if (!dev_) return; + if (captureImage_) vk_.DestroyImage(dev_, captureImage_, nullptr); + if (captureMemory_) vk_.FreeMemory(dev_, captureMemory_, nullptr); + if (readbackBuffer_) vk_.DestroyBuffer(dev_, readbackBuffer_, nullptr); + if (readbackMemory_) vk_.FreeMemory(dev_, readbackMemory_, nullptr); + captureImage_ = VK_NULL_HANDLE; captureMemory_ = readbackMemory_ = VK_NULL_HANDLE; + readbackBuffer_ = VK_NULL_HANDLE; captureWidth_ = captureHeight_ = 0; + } + + bool PrepareCapture(const DroidDeckXrFrameHeader &header) { + if (captureWidth_ == header.width && captureHeight_ == header.height) return true; + DestroyCapture(); + auto fail = [this](VkResult result) { Log("presenter: capture allocation failed %d", result); DestroyCapture(); return false; }; + VkImageCreateInfo image{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO}; + image.imageType = VK_IMAGE_TYPE_2D; image.format = VK_FORMAT_R8G8B8A8_UNORM; + image.extent = {header.width, header.height, 1}; image.mipLevels = image.arrayLayers = 1; + image.samples = VK_SAMPLE_COUNT_1_BIT; image.tiling = VK_IMAGE_TILING_OPTIMAL; + image.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; + VkResult result = vk_.CreateImage(dev_, &image, nullptr, &captureImage_); + if (result != VK_SUCCESS) return fail(result); + VkMemoryRequirements requirements{}; vk_.GetImageMemoryRequirements(dev_, captureImage_, &requirements); + int type = MemoryType(requirements.memoryTypeBits); + if (type < 0) return fail(VK_ERROR_FEATURE_NOT_PRESENT); + VkMemoryAllocateInfo allocation{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO}; + allocation.allocationSize = requirements.size; allocation.memoryTypeIndex = type; + result = vk_.AllocateMemory(dev_, &allocation, nullptr, &captureMemory_); + if (result != VK_SUCCESS) return fail(result); + result = vk_.BindImageMemory(dev_, captureImage_, captureMemory_, 0); + if (result != VK_SUCCESS) return fail(result); + VkBufferCreateInfo buffer{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO}; buffer.size = header.bytes; + buffer.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT; + result = vk_.CreateBuffer(dev_, &buffer, nullptr, &readbackBuffer_); + if (result != VK_SUCCESS) return fail(result); + vk_.GetBufferMemoryRequirements(dev_, readbackBuffer_, &requirements); + type = -1; + for (uint32_t index = 0; index < mem_.memoryTypeCount; index++) { + if ((requirements.memoryTypeBits & (1u << index)) && (mem_.memoryTypes[index].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)) { + type = index; + if (mem_.memoryTypes[index].propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) break; + } + } + if (type < 0) return fail(VK_ERROR_FEATURE_NOT_PRESENT); + allocation.allocationSize = requirements.size; allocation.memoryTypeIndex = type; + result = vk_.AllocateMemory(dev_, &allocation, nullptr, &readbackMemory_); + if (result != VK_SUCCESS) return fail(result); + result = vk_.BindBufferMemory(dev_, readbackBuffer_, readbackMemory_, 0); + if (result != VK_SUCCESS) return fail(result); + captureWidth_ = header.width; captureHeight_ = header.height; + return true; + } + + bool Capture(const EyeFrame &frame) { + if (frame.layers != 1 || !xr_frame_valid(frame.render)) { + static unsigned said = 0; + if (said++ < 3) Log("presenter: refusing Quest frame with unsupported layer count or render geometry (%u layers)", frame.layers); + return false; + } + const Imported *eye[2] = {Find(frame.texture[0]), Find(frame.texture[1])}; + if (!eye[0] || !eye[1]) return false; + for (int index = 0; index < 2; index++) { + for (float value : frame.bounds[index]) if (!std::isfinite(value) || value < 0 || value > 1) return false; + if (frame.bounds[index][0] == frame.bounds[index][2] || frame.bounds[index][1] == frame.bounds[index][3]) return false; + } + if (!eye[0]->producerPid || eye[0]->producerPid != eye[1]->producerPid) return false; + CaptureLease lease(eye[0]->producerPid); + if (!lease.Acquired()) { + static unsigned said = 0; + if (said++ < 3) Log("presenter: refusing Quest frame without a completed, retained producer lease (pid %u)", eye[0]->producerPid); + return false; + } + VkResult result = vk_.WaitForFences(dev_, 1, &fence_, VK_TRUE, UINT64_MAX); + if (result != VK_SUCCESS) { Fail(); return false; } + if (!PrepareCapture(frame.render)) return false; + if (vk_.ResetCommandBuffer(cmd_, 0) != VK_SUCCESS) { Fail(); return false; } + VkCommandBufferBeginInfo begin{VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO}; begin.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + if (vk_.BeginCommandBuffer(cmd_, &begin) != VK_SUCCESS) { Fail(); return false; } + VkImageMemoryBarrier before[] = { + Barrier(captureImage_, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 0, VK_ACCESS_TRANSFER_WRITE_BIT), + Barrier(eye[0]->image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, 0, VK_ACCESS_TRANSFER_READ_BIT, VK_QUEUE_FAMILY_EXTERNAL, qfam_), + Barrier(eye[1]->image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, 0, VK_ACCESS_TRANSFER_READ_BIT, VK_QUEUE_FAMILY_EXTERNAL, qfam_)}; + vk_.CmdPipelineBarrier(cmd_, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, + eye[0] == eye[1] ? 2 : 3, before); + int32_t half = frame.render.width / 2; + for (int index = 0; index < 2; index++) { + const float *bounds = frame.bounds[index]; + VkImageBlit blit{}; blit.srcSubresource = blit.dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; + blit.srcOffsets[0] = {static_cast<int32_t>(bounds[0] * eye[index]->width), static_cast<int32_t>(bounds[1] * eye[index]->height), 0}; + blit.srcOffsets[1] = {static_cast<int32_t>(bounds[2] * eye[index]->width), static_cast<int32_t>(bounds[3] * eye[index]->height), 1}; + blit.dstOffsets[0] = {index * half, 0, 0}; blit.dstOffsets[1] = {(index + 1) * half, static_cast<int32_t>(frame.render.height), 1}; + vk_.CmdBlitImage(cmd_, eye[index]->image, VK_IMAGE_LAYOUT_GENERAL, captureImage_, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &blit, VK_FILTER_LINEAR); + } + VkImageMemoryBarrier after[] = { + Barrier(captureImage_, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_TRANSFER_READ_BIT), + Barrier(eye[0]->image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, VK_ACCESS_TRANSFER_READ_BIT, 0, qfam_, VK_QUEUE_FAMILY_EXTERNAL), + Barrier(eye[1]->image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, VK_ACCESS_TRANSFER_READ_BIT, 0, qfam_, VK_QUEUE_FAMILY_EXTERNAL)}; + vk_.CmdPipelineBarrier(cmd_, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, + eye[0] == eye[1] ? 2 : 3, after); + VkBufferImageCopy copy{}; copy.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; + copy.imageExtent = {frame.render.width, frame.render.height, 1}; + vk_.CmdCopyImageToBuffer(cmd_, captureImage_, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, readbackBuffer_, 1, ©); + VkBufferMemoryBarrier host{VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER}; + host.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; host.dstAccessMask = VK_ACCESS_HOST_READ_BIT; + host.srcQueueFamilyIndex = host.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + host.buffer = readbackBuffer_; host.size = VK_WHOLE_SIZE; + vk_.CmdPipelineBarrier(cmd_, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_HOST_BIT, 0, 0, nullptr, 1, &host, 0, nullptr); + if (vk_.EndCommandBuffer(cmd_) != VK_SUCCESS || vk_.ResetFences(dev_, 1, &fence_) != VK_SUCCESS) { Fail(); return false; } + VkSubmitInfo submit{VK_STRUCTURE_TYPE_SUBMIT_INFO}; submit.commandBufferCount = 1; submit.pCommandBuffers = &cmd_; + lease.BeginGpu(); + result = vk_.QueueSubmit(queue_, 1, &submit, fence_); + if (result != VK_SUCCESS) { + if (vk_.DeviceWaitIdle(dev_) == VK_SUCCESS) lease.EndGpu(); + Fail(); return false; + } + result = vk_.WaitForFences(dev_, 1, &fence_, VK_TRUE, UINT64_MAX); + if (result != VK_SUCCESS) { + if (vk_.DeviceWaitIdle(dev_) == VK_SUCCESS) lease.EndGpu(); + Fail(); return false; + } + lease.EndGpu(); + if (!lease.Release()) return false; + void *mapping = nullptr; + if (vk_.MapMemory(dev_, readbackMemory_, 0, VK_WHOLE_SIZE, 0, &mapping) != VK_SUCCESS) return false; + VkMappedMemoryRange range{VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE}; range.memory = readbackMemory_; range.size = VK_WHOLE_SIZE; + result = vk_.InvalidateMappedMemoryRanges(dev_, 1, &range); + bool sent = result == VK_SUCCESS && sender_.Send("/run/droiddeck/" DROIDDECK_XR_FRAME_SOCKET, + frame.render, static_cast<unsigned char *>(mapping)); + vk_.UnmapMemory(dev_, readbackMemory_); + return sent; + } + + bool Draw(const EyeFrame &f) { + const Imported *eye[2] = {Find(f.texture[0]), Find(f.texture[1])}; + if (!eye[0] || !eye[1] || !swapchain_) return false; + if (SrgbEyeFormat(eye[0]->format) != SrgbEyeFormat(eye[1]->format)) return false; + vk_.WaitForFences(dev_, 1, &fence_, VK_TRUE, UINT64_MAX); + uint32_t idx = 0; + VkResult r = vk_.AcquireNextImageKHR(dev_, swapchain_, 100000000ull, acquired_, VK_NULL_HANDLE, &idx); + if (r != VK_SUCCESS && r != VK_SUBOPTIMAL_KHR) { + static int said; + if (said++ < 3) Log("presenter: acquire %d", r); + return false; + } + vk_.ResetFences(dev_, 1, &fence_); + vk_.ResetCommandBuffer(cmd_, 0); + VkCommandBufferBeginInfo bi = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr, VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT}; + vk_.BeginCommandBuffer(cmd_, &bi); + VkImage dst = images_[idx]; + VkImageMemoryBarrier pre[3] = { + Barrier(dst, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 0, VK_ACCESS_TRANSFER_WRITE_BIT), + Barrier(eye[0]->image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, 0, VK_ACCESS_TRANSFER_READ_BIT, + VK_QUEUE_FAMILY_EXTERNAL, qfam_), + Barrier(eye[1]->image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, 0, VK_ACCESS_TRANSFER_READ_BIT, + VK_QUEUE_FAMILY_EXTERNAL, qfam_)}; + vk_.CmdPipelineBarrier(cmd_, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, + eye[0] == eye[1] ? 2 : 3, pre); + VkClearColorValue black = {{0, 0, 0, 1}}; + VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; + vk_.CmdClearColorImage(cmd_, dst, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &black, 1, &range); + VkMemoryBarrier mb = {VK_STRUCTURE_TYPE_MEMORY_BARRIER, nullptr, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_TRANSFER_WRITE_BIT}; + vk_.CmdPipelineBarrier(cmd_, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1, &mb, 0, nullptr, 0, nullptr); + const int32_t half = (int32_t)extent_.width / 2; + for (int e = 0; e < 2; e++) { + const float *b = f.bounds[e]; + VkImageBlit blit = {}; + blit.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; + blit.srcOffsets[0] = {(int32_t)(b[0] * eye[e]->width), (int32_t)(b[1] * eye[e]->height), 0}; + blit.srcOffsets[1] = {(int32_t)(b[2] * eye[e]->width), (int32_t)(b[3] * eye[e]->height), 1}; + blit.dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; + blit.dstOffsets[0] = {e * half, 0, 0}; + blit.dstOffsets[1] = {e * half + half, (int32_t)extent_.height, 1}; + vk_.CmdBlitImage(cmd_, eye[e]->image, VK_IMAGE_LAYOUT_GENERAL, dst, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &blit, + VK_FILTER_LINEAR); + } + VkImageMemoryBarrier post[3] = { + Barrier(dst, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, VK_ACCESS_TRANSFER_WRITE_BIT, 0), + Barrier(eye[0]->image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, VK_ACCESS_TRANSFER_READ_BIT, 0, qfam_, + VK_QUEUE_FAMILY_EXTERNAL), + Barrier(eye[1]->image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, VK_ACCESS_TRANSFER_READ_BIT, 0, qfam_, + VK_QUEUE_FAMILY_EXTERNAL)}; + vk_.CmdPipelineBarrier(cmd_, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, 0, 0, nullptr, 0, nullptr, + eye[0] == eye[1] ? 2 : 3, post); + vk_.EndCommandBuffer(cmd_); + VkPipelineStageFlags wait = VK_PIPELINE_STAGE_TRANSFER_BIT; + VkSubmitInfo si = {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 1, &acquired_, &wait, 1, &cmd_, 1, &rendered_}; + if ((r = vk_.QueueSubmit(queue_, 1, &si, fence_)) != VK_SUCCESS) { Log("presenter: submit %d", r); return false; } + if (vk_.WaitForFences(dev_, 1, &fence_, VK_TRUE, (uint64_t)std::chrono::nanoseconds(kDrawnTimeout).count()) == VK_TIMEOUT) { + static int said; + if (said++ < 3) Log("presenter: the copy took over %lld ms; showing it anyway", (long long)kDrawnTimeout.count()); + } + VkPresentInfoKHR pi = {VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, nullptr, 1, &rendered_, 1, &swapchain_, &idx, nullptr}; + r = vk_.QueuePresentKHR(queue_, &pi); + if (r != VK_SUCCESS && r != VK_SUBOPTIMAL_KHR) { + static int said; + if (said++ < 3) Log("presenter: present %d", r); + } + return true; + } + + std::mutex mutex_; + std::condition_variable cv_; + std::vector<PendingImport> pending_; + std::vector<uint64_t> removals_; + EyeFrame frame_{}; + std::chrono::steady_clock::time_point frameAt_{}; + uint32_t frameMark_ = 0, lastIssued_ = 0; + bool frameTracked_ = false; + const droiddeck_present_sync *sync_ = nullptr; + const volatile droiddeck_headpose *pose_ = nullptr; + std::chrono::steady_clock::time_point syncTried_{}; + bool haveFrame_ = false, exit_ = false, started_ = false, inFlight_ = false, failed_ = false; + uint64_t ticket_ = 0, completed_ = 0; + bool frameChannel_ = false; + XrFrameSender sender_; + VkImage captureImage_ = VK_NULL_HANDLE; + VkDeviceMemory captureMemory_ = VK_NULL_HANDLE, readbackMemory_ = VK_NULL_HANDLE; + VkBuffer readbackBuffer_ = VK_NULL_HANDLE; + uint32_t captureWidth_ = 0, captureHeight_ = 0; + std::atomic<uint64_t> submitted_{0}; + std::thread thread_; + static inline std::atomic<Impl *> made_{nullptr}; + + X11 x_; + Display *dpy_ = nullptr; + Window win_ = 0; + uint32_t width_ = 0, height_ = 0; + Vk vk_; + VkInstance inst_ = VK_NULL_HANDLE; + VkPhysicalDevice pd_ = VK_NULL_HANDLE; + VkPhysicalDeviceMemoryProperties mem_{}; + VkSurfaceKHR surface_ = VK_NULL_HANDLE; + uint32_t qfam_ = 0; + VkDevice dev_ = VK_NULL_HANDLE; + VkQueue queue_ = VK_NULL_HANDLE; + VkCommandPool pool_ = VK_NULL_HANDLE; + VkCommandBuffer cmd_ = VK_NULL_HANDLE; + VkFence fence_ = VK_NULL_HANDLE; + VkSemaphore acquired_ = VK_NULL_HANDLE, rendered_ = VK_NULL_HANDLE; + VkSwapchainKHR swapchain_ = VK_NULL_HANDLE; + VkFormat eyeFormat_ = VK_FORMAT_UNDEFINED; + VkExtent2D extent_{}; + std::vector<VkImage> images_; + std::vector<Imported> textures_; +}; + +} + +void Presenter::AddTextures(const uint64_t h[3], const int fds[3], uint32_t f, uint32_t w, uint32_t hh, uint32_t pid) { Impl::Get().Add(h, fds, f, w, hh, pid); } +void Presenter::RemoveTexture(uint64_t h) { Impl::Get().Remove(h); } +void Presenter::Submit(const EyeFrame &f) { Impl::Get().Submit(f); } +void Presenter::Shutdown() { + if (Impl *impl = Impl::Made()) impl->Shutdown(); +} + +} diff --git a/tools/vr/src/presenter.h b/tools/vr/src/presenter.h new file mode 100644 index 0000000000..3a934a7221 --- /dev/null +++ b/tools/vr/src/presenter.h @@ -0,0 +1,23 @@ +#pragma once +#include <cstdint> +#include "xr_frame.h" + +namespace droiddeck { + +struct EyeFrame { + uint64_t texture[2]; + float bounds[2][4]; + DroidDeckXrFrameHeader render; + uint32_t layers = 0; +}; + +class Presenter { +public: + static void AddTextures(const uint64_t handles[3], const int fds[3], uint32_t vkFormat, uint32_t width, uint32_t height, + uint32_t producerPid); + static void RemoveTexture(uint64_t handle); + static void Submit(const EyeFrame &frame); + static void Shutdown(); +}; + +} diff --git a/tools/vr/src/presenter_image.h b/tools/vr/src/presenter_image.h new file mode 100644 index 0000000000..55e542520c --- /dev/null +++ b/tools/vr/src/presenter_image.h @@ -0,0 +1,57 @@ +#pragma once +#include <vulkan/vulkan_core.h> + +namespace droiddeck { + +inline VkFormat AlternateEyeFormat(VkFormat format) { + switch (format) { + case VK_FORMAT_R8G8B8A8_SRGB: return VK_FORMAT_R8G8B8A8_UNORM; + case VK_FORMAT_R8G8B8A8_UNORM: return VK_FORMAT_R8G8B8A8_SRGB; + case VK_FORMAT_B8G8R8A8_SRGB: return VK_FORMAT_B8G8R8A8_UNORM; + case VK_FORMAT_B8G8R8A8_UNORM: return VK_FORMAT_B8G8R8A8_SRGB; + default: return format; + } +} + +inline bool SrgbEyeFormat(VkFormat format) { + return format == VK_FORMAT_R8G8B8A8_SRGB || format == VK_FORMAT_B8G8R8A8_SRGB; +} + +struct SharedEyeImage { + VkFormat formats[2]; + VkImageFormatListCreateInfo list; + VkExternalMemoryImageCreateInfo external; + VkImageCreateInfo info; + + SharedEyeImage(VkFormat format, uint32_t width, uint32_t height) + : formats{format, AlternateEyeFormat(format)}, + list{VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO, nullptr, formats[0] == formats[1] ? 1u : 2u, formats}, + external{VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, &list, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT}, + info{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, &external, VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, VK_IMAGE_TYPE_2D, + format, {width, height, 1}, 1, 1, VK_SAMPLE_COUNT_1_BIT, VK_IMAGE_TILING_OPTIMAL, + VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, + VK_SHARING_MODE_EXCLUSIVE, 0, nullptr, VK_IMAGE_LAYOUT_UNDEFINED} {} + SharedEyeImage(const SharedEyeImage &) = delete; + SharedEyeImage &operator=(const SharedEyeImage &) = delete; +}; + +inline bool EyeSurfaceFormat(VkFormat eye, const VkSurfaceFormatKHR *formats, uint32_t count, VkSurfaceFormatKHR *out) { + const bool srgb = SrgbEyeFormat(eye); + if (count == 1 && formats[0].format == VK_FORMAT_UNDEFINED) { + *out = {srgb ? VK_FORMAT_B8G8R8A8_SRGB : VK_FORMAT_B8G8R8A8_UNORM, formats[0].colorSpace}; + return out->colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; + } + for (uint32_t i = 0; i < count; i++) { + const auto &f = formats[i]; + if (f.colorSpace != VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) continue; + if (srgb ? SrgbEyeFormat(f.format) : + f.format == VK_FORMAT_R8G8B8A8_UNORM || f.format == VK_FORMAT_B8G8R8A8_UNORM) { + *out = f; + return true; + } + } + return false; +} + +} diff --git a/tools/vr/src/producer_lease.h b/tools/vr/src/producer_lease.h new file mode 100644 index 0000000000..d5a75694bb --- /dev/null +++ b/tools/vr/src/producer_lease.h @@ -0,0 +1,207 @@ +#pragma once +#include <errno.h> +#include <fcntl.h> +#include <poll.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/un.h> +#include <time.h> +#include <unistd.h> + +#define DROIDDECK_PRODUCER_MAGIC 0x44504c31u +#define DROIDDECK_PRODUCER_ACQUIRE 1u +#define DROIDDECK_PRODUCER_READY 2u +#define DROIDDECK_PRODUCER_RELEASE 3u +#define DROIDDECK_PRODUCER_RELEASED 4u + +struct droiddeck_producer_message { + uint32_t magic; + uint32_t command; + uint64_t ticket; +}; + +static inline int64_t droiddeck_producer_now(void) { + struct timespec current; + clock_gettime(CLOCK_MONOTONIC, ¤t); + return (int64_t)current.tv_sec * 1000000000LL + current.tv_nsec; +} + +static inline int droiddeck_producer_path(char *path, size_t capacity, uint32_t pid) { + const char *runtime = getenv("XDG_RUNTIME_DIR"); + int length = snprintf(path, capacity, "%s/droiddeck-steamvr/producer-%u.sock", + runtime && *runtime ? runtime : "/run/droiddeck", pid); + return pid && length > 0 && (size_t)length < capacity; +} + +static inline int droiddeck_producer_private_parent(const char *path) { + char parent[sizeof(((struct sockaddr_un *)0)->sun_path)]; + if (strlen(path) >= sizeof(parent)) return 0; + strcpy(parent, path); + char *separator = strrchr(parent, '/'); + if (!separator) return 0; + *separator = 0; + struct stat metadata; + return lstat(parent, &metadata) == 0 && S_ISDIR(metadata.st_mode) && + metadata.st_uid == getuid() && !(metadata.st_mode & 0077); +} + +static inline int droiddeck_producer_peer(int descriptor, uint32_t expected_pid) { + struct ucred peer; + socklen_t length = sizeof(peer); + return getsockopt(descriptor, SOL_SOCKET, SO_PEERCRED, &peer, &length) == 0 && + peer.uid == getuid() && (!expected_pid || (uint32_t)peer.pid == expected_pid); +} + +static inline int droiddeck_producer_io(int descriptor, struct droiddeck_producer_message *message, + int writing, int64_t deadline) { + for (;;) { + int64_t remaining = deadline - droiddeck_producer_now(); + if (remaining <= 0) return 0; + struct pollfd ready = {descriptor, (short)(writing ? POLLOUT : POLLIN), 0}; + int result = poll(&ready, 1, (int)((remaining + 999999) / 1000000)); + if (result < 0 && errno == EINTR) continue; + if (result <= 0 || !(ready.revents & ready.events)) return 0; + ssize_t transferred = writing ? send(descriptor, message, sizeof(*message), MSG_NOSIGNAL | MSG_DONTWAIT) + : recv(descriptor, message, sizeof(*message), MSG_TRUNC | MSG_DONTWAIT); + if (transferred < 0 && (errno == EAGAIN || errno == EINTR)) continue; + return transferred == (ssize_t)sizeof(*message) && message->magic == DROIDDECK_PRODUCER_MAGIC; + } +} + +struct droiddeck_producer_lease { + int descriptor; + uint64_t ticket; +}; + +static inline int droiddeck_producer_acquire(uint32_t pid, struct droiddeck_producer_lease *lease) { + lease->descriptor = -1; + lease->ticket = 0; + struct sockaddr_un address; + memset(&address, 0, sizeof(address)); + address.sun_family = AF_UNIX; + if (!droiddeck_producer_path(address.sun_path, sizeof(address.sun_path), pid) || + !droiddeck_producer_private_parent(address.sun_path)) return 0; + int descriptor = socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); + if (descriptor < 0) return 0; + int64_t deadline = droiddeck_producer_now() + 250000000LL; + struct droiddeck_producer_message message = {DROIDDECK_PRODUCER_MAGIC, DROIDDECK_PRODUCER_ACQUIRE, 0}; + if (connect(descriptor, (struct sockaddr *)&address, sizeof(address)) != 0 || + !droiddeck_producer_peer(descriptor, pid) || + !droiddeck_producer_io(descriptor, &message, 1, deadline) || + !droiddeck_producer_io(descriptor, &message, 0, deadline) || + message.command != DROIDDECK_PRODUCER_READY || !message.ticket) { + close(descriptor); + return 0; + } + lease->descriptor = descriptor; + lease->ticket = message.ticket; + return 1; +} + +static inline int droiddeck_producer_release(struct droiddeck_producer_lease *lease) { + if (lease->descriptor < 0) return 0; + int64_t deadline = droiddeck_producer_now() + 250000000LL; + struct droiddeck_producer_message message = {DROIDDECK_PRODUCER_MAGIC, DROIDDECK_PRODUCER_RELEASE, lease->ticket}; + int released = droiddeck_producer_io(lease->descriptor, &message, 1, deadline) && + droiddeck_producer_io(lease->descriptor, &message, 0, deadline) && + message.command == DROIDDECK_PRODUCER_RELEASED && message.ticket == lease->ticket; + close(lease->descriptor); + lease->descriptor = -1; + return released; +} + +#ifdef DROIDDECK_PRODUCER_SERVER +#include <pthread.h> + +struct droiddeck_producer_server { + int listener; + pthread_t thread; + int (*acquire)(int64_t deadline); + void (*release)(void); + void (*quarantine)(void); + char path[sizeof(((struct sockaddr_un *)0)->sun_path)]; +}; + +static void *droiddeck_producer_serve(void *argument) { + struct droiddeck_producer_server *server = argument; + uint64_t ticket = 0; + for (;;) { + int connection = accept4(server->listener, NULL, NULL, SOCK_CLOEXEC | SOCK_NONBLOCK); + if (connection < 0) { + if (errno == EINTR) continue; + break; + } + struct droiddeck_producer_message message; + int64_t deadline = droiddeck_producer_now() + 150000000LL; + if (!droiddeck_producer_peer(connection, 0) || + !droiddeck_producer_io(connection, &message, 0, deadline) || + message.command != DROIDDECK_PRODUCER_ACQUIRE || message.ticket || !server->acquire(deadline)) { + close(connection); + continue; + } + uint64_t granted = ++ticket; + message = (struct droiddeck_producer_message){DROIDDECK_PRODUCER_MAGIC, DROIDDECK_PRODUCER_READY, granted}; + if (!droiddeck_producer_io(connection, &message, 1, droiddeck_producer_now() + 100000000LL)) { + server->release(); + close(connection); + continue; + } + int valid = 1; + while (valid) { + struct pollfd request = {connection, POLLIN, 0}; + int ready = poll(&request, 1, -1); + if (ready < 0 && errno == EINTR) continue; + if (ready <= 0 || !(request.revents & POLLIN)) { valid = 0; break; } + valid = droiddeck_producer_io(connection, &message, 0, droiddeck_producer_now() + 100000000LL) && + message.command == DROIDDECK_PRODUCER_RELEASE && message.ticket == granted; + break; + } + if (!valid) { + server->quarantine(); + close(connection); + break; + } + server->release(); + message = (struct droiddeck_producer_message){DROIDDECK_PRODUCER_MAGIC, DROIDDECK_PRODUCER_RELEASED, granted}; + droiddeck_producer_io(connection, &message, 1, droiddeck_producer_now() + 100000000LL); + close(connection); + } + return NULL; +} + +static int droiddeck_producer_start(struct droiddeck_producer_server *server) { + struct sockaddr_un address; + memset(&address, 0, sizeof(address)); + address.sun_family = AF_UNIX; + if (!droiddeck_producer_path(address.sun_path, sizeof(address.sun_path), getpid()) || + !droiddeck_producer_private_parent(address.sun_path)) return 0; + struct stat existing; + if (lstat(address.sun_path, &existing) == 0) { + if (!S_ISSOCK(existing.st_mode) || existing.st_uid != getuid()) return 0; + int probe = socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); + if (probe < 0) return 0; + int connected = connect(probe, (struct sockaddr *)&address, sizeof(address)); + int error = errno; + close(probe); + if (connected == 0 || error != ECONNREFUSED || unlink(address.sun_path) != 0) return 0; + } else if (errno != ENOENT) return 0; + server->listener = socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0); + if (server->listener < 0) return 0; + if (bind(server->listener, (struct sockaddr *)&address, sizeof(address)) != 0) { + close(server->listener); + return 0; + } + if (chmod(address.sun_path, 0600) == 0 && listen(server->listener, 4) == 0 && + pthread_create(&server->thread, NULL, droiddeck_producer_serve, server) == 0) { + strcpy(server->path, address.sun_path); + return 1; + } + close(server->listener); + unlink(address.sun_path); + return 0; +} +#endif diff --git a/tools/vr/src/render_target.h b/tools/vr/src/render_target.h new file mode 100644 index 0000000000..78c6e2745b --- /dev/null +++ b/tools/vr/src/render_target.h @@ -0,0 +1,21 @@ +#ifndef DROIDDECK_RENDER_TARGET_H +#define DROIDDECK_RENDER_TARGET_H + +#include <algorithm> +#include <cmath> +#include <cstdint> + +namespace droiddeck { + +struct RenderTargetSize { uint32_t width, height; }; + +inline RenderTargetSize RenderTarget(float aspect, uint32_t selectedHeight, uint32_t panelHeight) { + uint32_t height = selectedHeight > 0 ? std::min(selectedHeight, 8192u) : 720u; + if (panelHeight > 0) height = std::min(height, panelHeight); + if (!std::isfinite(aspect) || aspect <= 0.0f) aspect = 1.0f; + const float width = std::clamp(height * aspect, 1.0f, 8192.0f); + return {static_cast<uint32_t>(std::lround(width)), height}; +} + +} +#endif diff --git a/tools/vr/src/scheduling.c b/tools/vr/src/scheduling.c new file mode 100644 index 0000000000..df89196500 --- /dev/null +++ b/tools/vr/src/scheduling.c @@ -0,0 +1,38 @@ +#define _GNU_SOURCE +#include <dlfcn.h> +#include <errno.h> +#include <linux/capability.h> +#include <stdint.h> +#include <string.h> +#include <sys/resource.h> +#include <sys/syscall.h> +#include <unistd.h> + +extern char *program_invocation_short_name; + +static int cannot_schedule_realtime(void) { + struct rlimit priority; + struct __user_cap_header_struct header = {_LINUX_CAPABILITY_VERSION_3, 0}; + struct __user_cap_data_struct caps[2] = {{0}}; + if (getrlimit(RLIMIT_RTPRIO, &priority) || priority.rlim_cur != 0 || + syscall(SYS_capget, &header, caps)) return 0; + return !(caps[CAP_SYS_NICE / 32].effective & (UINT32_C(1) << (CAP_SYS_NICE % 32))); +} + +int setrlimit(__rlimit_resource_t resource, const struct rlimit *limit) { + int (*next)(__rlimit_resource_t, const struct rlimit *) = dlsym(RTLD_NEXT, "setrlimit"); + if (!next) { errno = ENOSYS; return -1; } + const int saved = errno; + if (resource == RLIMIT_RTTIME && + !strcmp(program_invocation_short_name, "vrcompositor") && cannot_schedule_realtime()) { + struct rlimit current; + if (!getrlimit(resource, ¤t) && + (limit->rlim_cur < current.rlim_cur || limit->rlim_max < current.rlim_max)) { + // SDL's failed RTKit fallback leaves a fatal RT budget on Android GPU submissions. + errno = EPERM; + return -1; + } + } + errno = saved; + return next(resource, limit); +} diff --git a/tools/vr/src/spatial_tracking.h b/tools/vr/src/spatial_tracking.h new file mode 100644 index 0000000000..20842c8877 --- /dev/null +++ b/tools/vr/src/spatial_tracking.h @@ -0,0 +1,175 @@ +#pragma once +#include "../../../app/src/main/cpp/waylandcomp/src/spatialpose_shm.h" +#include "adaptive_pose.h" +#include <algorithm> +#include <cmath> +#include <cstring> +#include <fcntl.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <time.h> +#include <unistd.h> + +inline int64_t SpatialNow() { + timespec t{}; clock_gettime(CLOCK_MONOTONIC, &t); + return int64_t(t.tv_sec)*1000000000LL+t.tv_nsec; +} +inline bool SpatialFresh(const dd_spatial_pose &p, int64_t now, int64_t maxAge = 100000000LL) { + if (!(p.flags & DD_SPATIAL_VALID) || p.time_ns <= 0 || now < p.time_ns || now-p.time_ns > maxAge) return false; + for (float v : p.position) if (!std::isfinite(v)) return false; + float n = 0; + for (float v : p.rotation) { if (!std::isfinite(v)) return false; n += v*v; } + return n > 0.99f && n < 1.01f; +} +inline bool SpatialHandFresh(const dd_spatial_hand &hand, int64_t now) { + return SpatialFresh(hand.pose, now, 200000000LL); +} +struct OpticalPose { + static constexpr int64_t kVisualHoldNs = 350000000LL; + dd_spatial_hand last{}; + dd_spatial_pose filtered{}, rendered{}; + int64_t receivedAt = 0, renderedAt = 0; + float velocity[3]{}; + unsigned observations = 0; + bool predict = false; + uint64_t connection = 0, origin = 0; + void Reset() { + last = {}; filtered = rendered = {}; + receivedAt = renderedAt = 0; + observations = 0; predict = false; std::fill_n(velocity,3,0); + } + bool HoldLastObservation(int64_t now) { + observations = 0; predict = false; receivedAt = 0; renderedAt = now; + if (SpatialFresh(last.pose,now,kVisualHoldNs)) return true; + Reset(); + return false; + } + bool Update(const dd_spatial_hand &hand, bool headValid, int64_t now, uint64_t nextConnection, uint64_t nextOrigin) { + if (!headValid || connection != nextConnection || origin != nextOrigin) Reset(); + connection = nextConnection; origin = nextOrigin; + if (!headValid) return false; + if (!SpatialHandFresh(hand, now) || hand.pose.time_ns < last.pose.time_ns) + return HoldLastObservation(now); + if (!observations && hand.pose.time_ns == last.pose.time_ns) return HoldLastObservation(now); + const bool interpolate = observations > 0 && renderedAt > 0 && now >= renderedAt && SpatialHandFresh(last,now); + if (hand.pose.time_ns > last.pose.time_ns) { + const float dt = float(hand.pose.time_ns-last.pose.time_ns)/1e9f; + if (observations && dt > 0 && dt <= .2f) { + float speed2 = 0, previousSpeed2 = 0, direction = 0, acceleration2 = 0; + for (int i=0; i<3; ++i) { + const float v = (hand.pose.position[i]-last.pose.position[i])/dt; + speed2 += v*v; + previousSpeed2 += velocity[i]*velocity[i]; + direction += v*velocity[i]; + const float acceleration = (v-velocity[i])/dt; + acceleration2 += acceleration*acceleration; + velocity[i] = v; + } + predict = observations >= 2 && speed2 <= 2.25f && acceleration2 <= 36.f && + direction > 0 && direction*direction >= .64f*speed2*previousSpeed2; + } else { + observations = 0; predict = false; std::fill_n(velocity,3,0); + } + filtered = hand.pose; + float norm = 0; + for (float v : filtered.rotation) norm += v*v; + for (float &v : filtered.rotation) v /= std::sqrt(norm); + ++observations; last = hand; receivedAt = now; + } + auto target = filtered; + if (predict) { + // Inference already consumes most capture age; receipt-relative prediction advances between results. + float seconds = std::clamp(float(now-receivedAt)/1e9f,0.f,.08f); + float speed2 = 0; + for (float v : velocity) speed2 += v*v; + if (speed2 > 0) seconds = std::min(seconds,.02f/std::sqrt(speed2)); + for (int i=0; i<3; ++i) target.position[i] += velocity[i]*seconds; + } + if (interpolate) { + const float alpha = 1.f-std::exp(-float(now-renderedAt)/15000000.f); + for (int i=0; i<3; ++i) rendered.position[i] += alpha*(target.position[i]-rendered.position[i]); + float dot = 0, norm = 0; + for (int i=0; i<4; ++i) dot += rendered.rotation[i]*target.rotation[i]; + for (int i=0; i<4; ++i) { + rendered.rotation[i] += alpha*((dot < 0 ? -1 : 1)*target.rotation[i]-rendered.rotation[i]); + norm += rendered.rotation[i]*rendered.rotation[i]; + } + for (float &v : rendered.rotation) v /= std::sqrt(norm); + rendered.time_ns = target.time_ns; rendered.flags = target.flags; + } else rendered = target; + renderedAt = now; + return SpatialHandFresh(last, now); + } +}; +struct OpticalInputs { + bool armed = false, gripArmed = false, click = false, grip = false; + float trigger = 0; + uint64_t connection = 0, origin = 0; + int64_t lastObservation = 0; + uint16_t inputEpochs = 0; + void Release() { armed = gripArmed = click = grip = false; trigger = 0; } + void Reset() { Release(); lastObservation = 0; inputEpochs = 0; } + bool Update(const dd_spatial_hand &hand, bool headValid, int64_t now, uint64_t nextConnection, uint64_t nextOrigin, + uint16_t nextEpochs = 0) { + if (connection != nextConnection || origin != nextOrigin) { + Reset(); connection = nextConnection; origin = nextOrigin; + } + if ((inputEpochs & 0xff) != (nextEpochs & 0xff)) { armed = click = false; trigger = 0; } + if ((inputEpochs >> 8) != (nextEpochs >> 8)) gripArmed = grip = false; + inputEpochs = nextEpochs; + if (!headValid || !SpatialHandFresh(hand, now)) { + Release(); return false; + } + if (hand.pose.time_ns < lastObservation) { Release(); return false; } + const bool newObservation = hand.pose.time_ns > lastObservation; + if (lastObservation && now-lastObservation > 200000000LL) Release(); + const bool triggerValid = (hand.pose.flags & DD_SPATIAL_TRIGGER_VALID) && std::isfinite(hand.trigger) && hand.trigger >= 0 && hand.trigger <= 1; + const bool gripValid = (hand.pose.flags & DD_SPATIAL_GRIP_VALID) && hand.grip <= 1; + if (!triggerValid) { armed = click = false; trigger = 0; } + if (!gripValid) gripArmed = grip = false; + if (!newObservation) return true; + lastObservation = hand.pose.time_ns; + if (triggerValid) { + if (hand.trigger < 0.25f) armed = true; + trigger = armed ? hand.trigger : 0; + click = click ? trigger > 0.45f : trigger > 0.65f; + } + if (gripValid) { + if (!hand.grip) gripArmed = true; + grip = gripArmed && hand.grip; + } + return true; + } +}; +class SpatialFile { +public: + explicit SpatialFile(const char *path = "/run/droiddeck/" DROIDDECK_SPATIALPOSE_FILE) : path_(path) {} + SpatialFile(const SpatialFile &) = delete; + SpatialFile &operator=(const SpatialFile &) = delete; + bool Read(droiddeck_spatialpose *out) { + if (!map_) { + int fd = open(path_, O_RDONLY | O_CLOEXEC); + if (fd < 0) return false; + struct stat st{}; + void *p = MAP_FAILED; + if (fstat(fd, &st) == 0 && st.st_size == sizeof(*out)) + p = mmap(nullptr, sizeof(*out), PROT_READ, MAP_SHARED, fd, 0); + close(fd); + if (p == MAP_FAILED) return false; + map_ = static_cast<droiddeck_spatialpose *>(p); + } + for (int i = 0; i < 8; ++i) { + const auto seq = __atomic_load_n(&map_->seq, __ATOMIC_ACQUIRE); + if (seq & 1u) continue; + memcpy(out, map_, sizeof(*out)); + __atomic_thread_fence(__ATOMIC_ACQUIRE); + if (seq == __atomic_load_n(&map_->seq, __ATOMIC_RELAXED)) + return out->magic == DROIDDECK_SPATIALPOSE_MAGIC && out->version == DROIDDECK_SPATIALPOSE_VERSION && out->size == sizeof(*out); + } + return false; + } + ~SpatialFile() { if (map_) munmap(map_, sizeof(*map_)); } +private: + const char *path_; + droiddeck_spatialpose *map_ = nullptr; +}; diff --git a/tools/vr/src/vk_layer_droiddeck_vr.c b/tools/vr/src/vk_layer_droiddeck_vr.c new file mode 100644 index 0000000000..5b315f243b --- /dev/null +++ b/tools/vr/src/vk_layer_droiddeck_vr.c @@ -0,0 +1,1480 @@ +#define _GNU_SOURCE +#include <vulkan/vulkan.h> +#include <vulkan/vk_layer.h> + +#include <pthread.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <unistd.h> +#include <errno.h> +#define DROIDDECK_PRODUCER_SERVER +#include "producer_lease.h" +#ifdef DROIDDECK_WSI_CAPTURE +#include "wsi_capture.h" +#endif + +#define LAYER_NAME "VK_LAYER_DROIDDECK_vr" +#define EXPORT __attribute__((visibility("default"))) + +static void say(const char *fmt, const char *arg) { + if (getenv("DROIDDECK_VR_LAYER_QUIET")) return; + fprintf(stderr, "[droiddeck-vr-layer] "); + fprintf(stderr, fmt, arg); + fputc('\n', stderr); +} + + +#include <dlfcn.h> +#include <execinfo.h> +#include <signal.h> +#include <ucontext.h> + +static void crash_handler(int sig, siginfo_t *si, void *uc_) { + ucontext_t *uc = uc_; +#if defined(__aarch64__) + void *program_counter = (void *)uc->uc_mcontext.pc; +#elif defined(__x86_64__) + void *program_counter = (void *)uc->uc_mcontext.gregs[REG_RIP]; +#else + void *program_counter = NULL; +#endif + char buf[512]; + int n = snprintf(buf, sizeof(buf), "\n[crashtrace] %s: signal %d addr %p pc %p\n", program_invocation_short_name, sig, + si->si_addr, program_counter); + if (write(2, buf, n)) {} + void *frames[48]; + int count = backtrace(frames, 48); + if (count > 1) frames[1] = program_counter; + for (int i = 1; i < count; i++) { + Dl_info info; + if (dladdr(frames[i], &info) && info.dli_fname) + n = snprintf(buf, sizeof(buf), "[crashtrace] #%d %s+0x%lx (%s)\n", i, info.dli_fname, + (unsigned long)((char *)frames[i] - (char *)info.dli_fbase), info.dli_sname ? info.dli_sname : "?"); + else + n = snprintf(buf, sizeof(buf), "[crashtrace] #%d %p\n", i, frames[i]); + if (write(2, buf, n)) {} + } + signal(sig, SIG_DFL); + raise(sig); +} + +static void crash_trace_install(void) { + static int done; + if (done++) return; + if (!getenv("DROIDDECK_VR_CRASHTRACE")) { + const char *rt = getenv("XDG_RUNTIME_DIR"); + char path[512]; + snprintf(path, sizeof(path), "%s/droiddeck-steamvr/crashtrace", rt && *rt ? rt : "/run/droiddeck"); + if (access(path, F_OK) != 0) return; + } + static char stack[65536]; + stack_t old_ss, ss = {.ss_sp = stack, .ss_size = sizeof(stack)}; + if (sigaltstack(NULL, &old_ss) == 0 && (old_ss.ss_flags & SS_DISABLE)) sigaltstack(&ss, NULL); + struct sigaction sa = {0}; + sa.sa_sigaction = crash_handler; + sa.sa_flags = SA_SIGINFO | SA_ONSTACK; + int sigs[] = {SIGSEGV, SIGABRT, SIGBUS, SIGILL, SIGFPE}; + for (unsigned i = 0; i < sizeof(sigs) / sizeof(*sigs); i++) { + struct sigaction old; + if (sigaction(sigs[i], NULL, &old) == 0 && !(old.sa_flags & SA_SIGINFO) && old.sa_handler == SIG_DFL) + sigaction(sigs[i], &sa, NULL); + } +} + + +struct inst { + VkInstance handle; + PFN_vkGetInstanceProcAddr gipa; + PFN_vkDestroyInstance destroy; + int stripped; + int active; + int producer; +}; +struct dev { + VkDevice handle; + PFN_vkGetDeviceProcAddr gdpa; + PFN_vkDestroyDevice destroy; + int active; + int display; + int producer; + int quest_images; +}; + +static int steamvr_running(void) { + const char *layers = getenv("VK_INSTANCE_LAYERS"); + if (layers && strstr(layers, "VK_LAYER_DROIDDECK_vr")) return 1; + if (getenv("DROIDDECK_VR_LAYER_FORCE")) return 1; + const char *rt = getenv("XDG_RUNTIME_DIR"); + char path[512]; + snprintf(path, sizeof(path), "%s/droiddeck-steamvr/active", rt && *rt ? rt : "/run/droiddeck"); + return access(path, F_OK) == 0; +} + +static int bridge_wanted(void) { + if (steamvr_running()) return 1; + if (strcmp(program_invocation_short_name, "steamwebhelper")) return 0; + const char *steamvr = getenv("STEAMVR"); + char path[512]; + snprintf(path, sizeof(path), "%s/bin/linuxarm64/vrstartup", steamvr && *steamvr ? steamvr : "/opt/steamvr"); + return access(path, F_OK) == 0; +} + +#define MAX_OBJS 64 +static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; +static struct inst g_inst[MAX_OBJS]; +static struct dev g_dev[MAX_OBJS]; + +static void *key(const void *obj) { return *(void **)obj; } + +static struct inst *inst_for(const void *obj) { + struct inst *r = NULL; + pthread_mutex_lock(&g_lock); + for (int i = 0; i < MAX_OBJS; i++) + if (g_inst[i].handle && key(g_inst[i].handle) == key(obj)) { r = &g_inst[i]; break; } + pthread_mutex_unlock(&g_lock); + return r; +} +static struct dev *dev_for(const void *obj) { + struct dev *r = NULL; + pthread_mutex_lock(&g_lock); + for (int i = 0; i < MAX_OBJS; i++) + if (g_dev[i].handle && key(g_dev[i].handle) == key(obj)) { r = &g_dev[i]; break; } + pthread_mutex_unlock(&g_lock); + return r; +} + +#define NEXT(dev, fn) ((PFN_vk##fn)dev_for(dev)->gdpa(dev, "vk" #fn)) +#define HOOK_AS(str, fn) if (!strcmp(name, str)) return (PFN_vkVoidFunction)fn; + +static const char *const DISPLAY_EXTS[] = { + "VK_KHR_display", "VK_EXT_direct_mode_display", "VK_EXT_display_surface_counter", + "VK_KHR_get_display_properties2", "VK_EXT_acquire_xlib_display", "VK_EXT_acquire_drm_display", +}; +static int is_display_ext(const char *name) { + for (size_t i = 0; i < sizeof(DISPLAY_EXTS) / sizeof(*DISPLAY_EXTS); i++) + if (!strcmp(name, DISPLAY_EXTS[i])) return 1; + return 0; +} + + +static VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *ci, const VkAllocationCallbacks *alloc, + VkInstance *out) { + crash_trace_install(); + VkLayerInstanceCreateInfo *chain = (VkLayerInstanceCreateInfo *)ci->pNext; + while (chain && !(chain->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO && chain->function == VK_LAYER_LINK_INFO)) + chain = (VkLayerInstanceCreateInfo *)chain->pNext; + if (!chain) return VK_ERROR_INITIALIZATION_FAILED; + PFN_vkGetInstanceProcAddr next_gipa = chain->u.pLayerInfo->pfnNextGetInstanceProcAddr; + chain->u.pLayerInfo = chain->u.pLayerInfo->pNext; + PFN_vkCreateInstance next_create = (PFN_vkCreateInstance)next_gipa(VK_NULL_HANDLE, "vkCreateInstance"); + if (!next_create) return VK_ERROR_INITIALIZATION_FAILED; + + const int vr = steamvr_running(); + VkInstanceCreateInfo mine = *ci; + const char **names = calloc(ci->enabledExtensionCount + 1, sizeof(*names)); + uint32_t n = 0; + int stripped = 0; + for (uint32_t i = 0; i < ci->enabledExtensionCount; i++) { + if (vr && is_display_ext(ci->ppEnabledExtensionNames[i])) { say("taking %s off the instance", ci->ppEnabledExtensionNames[i]); stripped = 1; continue; } + names[n++] = ci->ppEnabledExtensionNames[i]; + } + if (stripped) { + int have = 0; + for (uint32_t i = 0; i < n; i++) have |= !strcmp(names[i], "VK_EXT_headless_surface"); + const char *more[] = {"VK_EXT_headless_surface", "VK_KHR_surface"}; + names = realloc(names, (n + 3) * sizeof(*names)); + if (!have) names[n++] = more[0]; + int surf = 0; + for (uint32_t i = 0; i < n; i++) surf |= !strcmp(names[i], "VK_KHR_surface"); + if (!surf) names[n++] = more[1]; + } + mine.enabledExtensionCount = n; + mine.ppEnabledExtensionNames = names; + VkResult r = next_create(&mine, alloc, out); + free(names); + if (r != VK_SUCCESS) return r; + + const int active = vr || bridge_wanted(); + pthread_mutex_lock(&g_lock); + for (int i = 0; i < MAX_OBJS; i++) { + if (!g_inst[i].handle) { + const char *lease_mode = getenv("DROIDDECK_VR_PRODUCER_LEASE"); + int producer = lease_mode && !strcmp(lease_mode, "1") && !strcmp(program_invocation_short_name, "vrcompositor") && + (!ci->pApplicationInfo || !ci->pApplicationInfo->pApplicationName || + strcmp(ci->pApplicationInfo->pApplicationName, "droiddeck-vr-presenter")); + g_inst[i] = (struct inst){*out, next_gipa, + (PFN_vkDestroyInstance)next_gipa(*out, "vkDestroyInstance"), stripped, active, producer}; + break; + } + } + pthread_mutex_unlock(&g_lock); + return VK_SUCCESS; +} + +static void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks *alloc) { + struct inst *in = inst_for(instance); + if (!in) return; + PFN_vkDestroyInstance d = in->destroy; + pthread_mutex_lock(&g_lock); + memset(in, 0, sizeof(*in)); + pthread_mutex_unlock(&g_lock); + if (d) d(instance, alloc); +} + + +static VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice pd, const VkDeviceCreateInfo *ci, + const VkAllocationCallbacks *alloc, VkDevice *out) { + VkLayerDeviceCreateInfo *chain = (VkLayerDeviceCreateInfo *)ci->pNext; + while (chain && !(chain->sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO && chain->function == VK_LAYER_LINK_INFO)) + chain = (VkLayerDeviceCreateInfo *)chain->pNext; + if (!chain) return VK_ERROR_INITIALIZATION_FAILED; + PFN_vkGetInstanceProcAddr next_gipa = chain->u.pLayerInfo->pfnNextGetInstanceProcAddr; + PFN_vkGetDeviceProcAddr next_gdpa = chain->u.pLayerInfo->pfnNextGetDeviceProcAddr; + chain->u.pLayerInfo = chain->u.pLayerInfo->pNext; + struct inst *in = inst_for(pd); + PFN_vkCreateDevice next_create = (PFN_vkCreateDevice)next_gipa(in ? in->handle : VK_NULL_HANDLE, "vkCreateDevice"); + if (!next_create) return VK_ERROR_INITIALIZATION_FAILED; + const int active = in && in->active; + const int display = in && in->stripped; + + VkDeviceCreateInfo mine = *ci; + const char **names = calloc(ci->enabledExtensionCount + 4, sizeof(*names)); + if (!names) return VK_ERROR_OUT_OF_HOST_MEMORY; + uint32_t n = 0; + for (uint32_t i = 0; i < ci->enabledExtensionCount; i++) { + if (display && !strcmp(ci->ppEnabledExtensionNames[i], "VK_EXT_display_control")) { say("taking %s off the device", ci->ppEnabledExtensionNames[i]); continue; } + names[n++] = ci->ppEnabledExtensionNames[i]; + } +#ifdef DROIDDECK_WSI_CAPTURE + const char *present_mode = getenv("DROIDDECK_VR_PRESENT"); + if (present_mode && !strcmp(present_mode, "questwsi") && !strcmp(program_invocation_short_name, "vrcompositor")) { + PFN_vkEnumerateDeviceExtensionProperties enumerate = (PFN_vkEnumerateDeviceExtensionProperties) + next_gipa(in ? in->handle : VK_NULL_HANDLE, "vkEnumerateDeviceExtensionProperties"); + uint32_t count = 0; + if (enumerate && enumerate(pd, NULL, &count, NULL) == VK_SUCCESS && count) { + VkExtensionProperties *supported = calloc(count, sizeof(*supported)); + if (supported && enumerate(pd, NULL, &count, supported) == VK_SUCCESS) { + const char *required[] = {"VK_KHR_external_memory_fd", "VK_EXT_external_memory_dma_buf", "VK_EXT_queue_family_foreign"}; + for (unsigned j = 0; j < 3; j++) { + int enabled = 0, available = 0; + for (uint32_t k = 0; k < n; k++) if (!strcmp(names[k], required[j])) enabled = 1; + for (uint32_t k = 0; k < count; k++) if (!strcmp(supported[k].extensionName, required[j])) available = 1; + if (!enabled && available) names[n++] = required[j]; + } + } + free(supported); + } + } +#endif + mine.enabledExtensionCount = n; + mine.ppEnabledExtensionNames = names; + VkResult r = next_create(pd, &mine, alloc, out); + if (r != VK_SUCCESS) { free(names); return r; } + pthread_mutex_lock(&g_lock); + for (int i = 0; i < MAX_OBJS; i++) { + if (!g_dev[i].handle) { + g_dev[i] = (struct dev){*out, next_gdpa, (PFN_vkDestroyDevice)next_gdpa(*out, "vkDestroyDevice"), active, display, + in && in->producer, active && access("/run/droiddeck/droiddeck-xr-frames", F_OK) == 0}; + break; + } + } + pthread_mutex_unlock(&g_lock); +#ifdef DROIDDECK_WSI_CAPTURE + if (in) droiddeck_wsi_device(*out, pd, in->handle, in->gipa, next_gdpa, &mine); +#endif + free(names); + return VK_SUCCESS; +} + +static void forget_device_semaphores(VkDevice dev); +static void track_forget_device(VkDevice dev); +static void producer_destroy_device(struct dev *device, const VkAllocationCallbacks *allocator); + +static void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks *alloc) { + struct dev *d = dev_for(device); + if (!d) return; +#ifdef DROIDDECK_WSI_CAPTURE + droiddeck_wsi_destroy(device); +#endif + if (d->producer) producer_destroy_device(d, alloc); + forget_device_semaphores(device); + track_forget_device(device); + PFN_vkDestroyDevice f = d->destroy; + pthread_mutex_lock(&g_lock); + memset(d, 0, sizeof(*d)); + pthread_mutex_unlock(&g_lock); + if (f) f(device, alloc); +} + + +#include <fcntl.h> +#include <stdatomic.h> +#include <time.h> +#include "../../../app/src/main/cpp/waylandcomp/src/headpose_shm.h" + +#define FAKE_DISPLAY ((VkDisplayKHR)(uintptr_t)0xdd0001) +#define FAKE_MODE ((VkDisplayModeKHR)(uintptr_t)0xdd0002) +static VkSurfaceKHR g_hmd_surface; +static uint32_t g_mode_w = 1920, g_mode_h = 1080, g_mode_mhz = 60000; +static int g_mode_fixed; + +static void mode_init(void) { + static int done; + if (done++) return; + const char *m = getenv("DROIDDECK_VR_DISPLAY_MODE"); + unsigned w, h, hz; + if (m && sscanf(m, "%ux%u@%u", &w, &h, &hz) == 3 && w && h && hz) { g_mode_w = w; g_mode_h = h; g_mode_mhz = hz * 1000; g_mode_fixed = 1; } +} + +static uint64_t now_ns(void) { + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + return (uint64_t)ts.tv_sec * 1000000000ull + (uint64_t)ts.tv_nsec; +} +static _Atomic(const struct droiddeck_headpose *) g_pose; +static _Atomic uint64_t g_pose_tried; + +static const struct droiddeck_headpose *pose_map(void) { + const struct droiddeck_headpose *p = atomic_load(&g_pose); + if (p) return p; + uint64_t t = now_ns(), last = atomic_load(&g_pose_tried); + if (last && t - last < 1000000000ull) return NULL; + atomic_store(&g_pose_tried, t); + int fd = open("/run/droiddeck/" DROIDDECK_HEADPOSE_FILE, O_RDONLY | O_CLOEXEC); + if (fd < 0) return NULL; + void *m = mmap(NULL, sizeof(struct droiddeck_headpose), PROT_READ, MAP_SHARED, fd, 0); + close(fd); + if (m == MAP_FAILED) return NULL; + const struct droiddeck_headpose *expected = NULL; + if (!atomic_compare_exchange_strong(&g_pose, &expected, (const struct droiddeck_headpose *)m)) { + munmap(m, sizeof(struct droiddeck_headpose)); + return expected; + } + return m; +} + +static uint32_t mode_mhz(void) { + mode_init(); + if (g_mode_fixed) return g_mode_mhz; + const struct droiddeck_headpose *p = pose_map(); + if (!p || __atomic_load_n(&p->magic, __ATOMIC_RELAXED) != DROIDDECK_HEADPOSE_MAGIC) return g_mode_mhz; + uint32_t bits = __atomic_load_n((const uint32_t *)&p->display_hz, __ATOMIC_RELAXED); + float hz; + memcpy(&hz, &bits, sizeof(hz)); + return hz >= 24.0f && hz <= 240.0f ? (uint32_t)(hz * 1000.0f + 0.5f) : g_mode_mhz; +} + +static uint64_t frame_ns(void) { return 1000000000000ull / mode_mhz(); } + +static pthread_mutex_t g_vblank_lock = PTHREAD_MUTEX_INITIALIZER; +static uint64_t g_vblank_base, g_vblank_at, g_vblank_frame; + +static uint64_t vblank_count(void) { + uint64_t f = frame_ns(); + pthread_mutex_lock(&g_vblank_lock); + uint64_t t = now_ns(); + if (f != g_vblank_frame) { + g_vblank_base = g_vblank_frame ? g_vblank_base + (t - g_vblank_at) / g_vblank_frame : t / f; + g_vblank_at = t; + g_vblank_frame = f; + } + uint64_t n = g_vblank_base + (t - g_vblank_at) / f; + pthread_mutex_unlock(&g_vblank_lock); + return n; +} + +static VkDisplayPropertiesKHR display_props(void) { + mode_init(); + VkDisplayPropertiesKHR p = {0}; + p.display = FAKE_DISPLAY; + p.displayName = "DroidDeck Cardboard"; + p.physicalDimensions = (VkExtent2D){120, 68}; + p.physicalResolution = (VkExtent2D){g_mode_w, g_mode_h}; + p.supportedTransforms = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; + p.planeReorderPossible = VK_FALSE; + p.persistentContent = VK_FALSE; + return p; +} + +#define ONE(count, out, value) do { \ + if (!(out)) { *(count) = 1; return VK_SUCCESS; } \ + if (*(count) < 1) return VK_INCOMPLETE; \ + (out)[0] = (value); *(count) = 1; return VK_SUCCESS; } while (0) + +static VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice pd, uint32_t *count, VkDisplayPropertiesKHR *p) { + ONE(count, p, display_props()); +} +static VkResult VKAPI_CALL GetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice pd, uint32_t *count, VkDisplayProperties2KHR *p) { + if (!p) { *count = 1; return VK_SUCCESS; } + if (*count < 1) return VK_INCOMPLETE; + p[0].displayProperties = display_props(); + *count = 1; + return VK_SUCCESS; +} +static VkDisplayPlanePropertiesKHR plane_props(void) { + VkDisplayPlanePropertiesKHR p = {FAKE_DISPLAY, 0}; + return p; +} +static VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice pd, uint32_t *count, VkDisplayPlanePropertiesKHR *p) { + ONE(count, p, plane_props()); +} +static VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice pd, uint32_t *count, VkDisplayPlaneProperties2KHR *p) { + if (!p) { *count = 1; return VK_SUCCESS; } + if (*count < 1) return VK_INCOMPLETE; + p[0].displayPlaneProperties = plane_props(); + *count = 1; + return VK_SUCCESS; +} +static VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice pd, uint32_t plane, uint32_t *count, VkDisplayKHR *d) { + if (plane != 0) { *count = 0; return VK_SUCCESS; } + ONE(count, d, FAKE_DISPLAY); +} +static VkDisplayModePropertiesKHR mode_props(void) { + mode_init(); + VkDisplayModePropertiesKHR m = {FAKE_MODE, {{g_mode_w, g_mode_h}, mode_mhz()}}; + return m; +} +static VkResult VKAPI_CALL GetDisplayModePropertiesKHR(VkPhysicalDevice pd, VkDisplayKHR d, uint32_t *count, VkDisplayModePropertiesKHR *p) { + ONE(count, p, mode_props()); +} +static VkResult VKAPI_CALL GetDisplayModeProperties2KHR(VkPhysicalDevice pd, VkDisplayKHR d, uint32_t *count, VkDisplayModeProperties2KHR *p) { + if (!p) { *count = 1; return VK_SUCCESS; } + if (*count < 1) return VK_INCOMPLETE; + p[0].displayModeProperties = mode_props(); + *count = 1; + return VK_SUCCESS; +} +static VkResult VKAPI_CALL CreateDisplayModeKHR(VkPhysicalDevice pd, VkDisplayKHR d, const VkDisplayModeCreateInfoKHR *ci, + const VkAllocationCallbacks *a, VkDisplayModeKHR *m) { + *m = FAKE_MODE; + return VK_SUCCESS; +} +static VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice pd, VkDisplayModeKHR m, uint32_t plane, VkDisplayPlaneCapabilitiesKHR *c) { + mode_init(); + memset(c, 0, sizeof(*c)); + c->supportedAlpha = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR; + c->maxSrcExtent = c->maxDstExtent = (VkExtent2D){g_mode_w, g_mode_h}; + c->minSrcExtent = c->minDstExtent = (VkExtent2D){1, 1}; + c->maxSrcPosition = c->maxDstPosition = (VkOffset2D){0, 0}; + return VK_SUCCESS; +} +static VkResult VKAPI_CALL GetDisplayPlaneCapabilities2KHR(VkPhysicalDevice pd, const VkDisplayPlaneInfo2KHR *info, VkDisplayPlaneCapabilities2KHR *c) { + return GetDisplayPlaneCapabilitiesKHR(pd, info->mode, info->planeIndex, &c->capabilities); +} +static VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR(VkInstance i, const VkDisplaySurfaceCreateInfoKHR *ci, + const VkAllocationCallbacks *a, VkSurfaceKHR *s) { + struct inst *in = inst_for(i); + PFN_vkCreateHeadlessSurfaceEXT headless = in ? (PFN_vkCreateHeadlessSurfaceEXT)in->gipa(i, "vkCreateHeadlessSurfaceEXT") : NULL; + if (!headless) { say("%s: no headless surface to stand in", "vkCreateDisplayPlaneSurfaceKHR"); return VK_ERROR_INITIALIZATION_FAILED; } + VkHeadlessSurfaceCreateInfoEXT hci = {VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT, NULL, 0}; + VkResult r = headless(i, &hci, a, s); + if (r == VK_SUCCESS) g_hmd_surface = *s; + say("the display's surface is a headless one (%s)", r == VK_SUCCESS ? "ok" : "failed"); + return r; +} +static VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice pd, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT *c) { + struct inst *in = inst_for(pd); + PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR caps = + in ? (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)in->gipa(in->handle, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR") : NULL; + if (!caps) return VK_ERROR_INITIALIZATION_FAILED; + VkSurfaceCapabilitiesKHR k; + VkResult r = caps(pd, surface, &k); + if (r != VK_SUCCESS) return r; + mode_init(); + if (k.currentExtent.width == UINT32_MAX) k.currentExtent = (VkExtent2D){g_mode_w, g_mode_h}; + c->minImageCount = k.minImageCount; c->maxImageCount = k.maxImageCount; + c->currentExtent = k.currentExtent; c->minImageExtent = k.minImageExtent; c->maxImageExtent = k.maxImageExtent; + c->maxImageArrayLayers = k.maxImageArrayLayers; c->supportedTransforms = k.supportedTransforms; + c->currentTransform = k.currentTransform; c->supportedCompositeAlpha = k.supportedCompositeAlpha; + c->supportedUsageFlags = k.supportedUsageFlags; + c->supportedSurfaceCounters = VK_SURFACE_COUNTER_VBLANK_BIT_EXT; + return VK_SUCCESS; +} +static VkResult VKAPI_CALL ReleaseDisplayEXT(VkPhysicalDevice pd, VkDisplayKHR d) { return VK_SUCCESS; } +static VkResult VKAPI_CALL AcquireDrmDisplayEXT(VkPhysicalDevice pd, int32_t fd, VkDisplayKHR d) { return VK_SUCCESS; } +static VkResult VKAPI_CALL GetDrmDisplayEXT(VkPhysicalDevice pd, int32_t fd, uint32_t conn, VkDisplayKHR *d) { + *d = FAKE_DISPLAY; return VK_SUCCESS; +} +static VkResult VKAPI_CALL AcquireXlibDisplayEXT(VkPhysicalDevice pd, void *dpy, VkDisplayKHR d) { return VK_SUCCESS; } +static VkResult VKAPI_CALL GetRandROutputDisplayEXT(VkPhysicalDevice pd, void *dpy, unsigned long out, VkDisplayKHR *d) { + *d = FAKE_DISPLAY; return VK_SUCCESS; +} + +static VkResult VKAPI_CALL DisplayPowerControlEXT(VkDevice d, VkDisplayKHR disp, const VkDisplayPowerInfoEXT *info) { return VK_SUCCESS; } +static VkResult signalled_fence(VkDevice d, const VkAllocationCallbacks *a, VkFence *fence) { + VkFenceCreateInfo fci = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, NULL, VK_FENCE_CREATE_SIGNALED_BIT}; + return NEXT(d, CreateFence)(d, &fci, a, fence); +} +static VkResult VKAPI_CALL RegisterDeviceEventEXT(VkDevice d, const VkDeviceEventInfoEXT *info, const VkAllocationCallbacks *a, VkFence *fence) { + return signalled_fence(d, a, fence); +} +static VkResult VKAPI_CALL RegisterDisplayEventEXT(VkDevice d, VkDisplayKHR disp, const VkDisplayEventInfoEXT *info, + const VkAllocationCallbacks *a, VkFence *fence) { + mode_init(); + uint64_t f = frame_ns(), t = now_ns(); + uint64_t next = (t / f + 1) * f; + struct timespec ts = {(time_t)(next / 1000000000ull), (long)(next % 1000000000ull)}; + clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, NULL); + return signalled_fence(d, a, fence); +} +static VkResult VKAPI_CALL GetSwapchainCounterEXT(VkDevice d, VkSwapchainKHR sc, VkSurfaceCounterFlagBitsEXT counter, uint64_t *value) { + mode_init(); + *value = vblank_count(); + return VK_SUCCESS; +} + +static VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice d, const VkSwapchainCreateInfoKHR *ci, const VkAllocationCallbacks *a, + VkSwapchainKHR *out) { + PFN_vkCreateSwapchainKHR next = NEXT(d, CreateSwapchainKHR); + VkSwapchainCreateInfoKHR sized = *ci; +#ifdef DROIDDECK_WSI_CAPTURE + const char *capture_mode = getenv("DROIDDECK_VR_PRESENT"); + const int capture = capture_mode && !strcmp(capture_mode, "questwsi") + && !strcmp(program_invocation_short_name, "vrcompositor") && ci->surface == g_hmd_surface; + if (capture) + sized.imageUsage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; +#endif + mode_init(); + if (sized.imageExtent.width == UINT32_MAX || sized.imageExtent.height == UINT32_MAX) + sized.imageExtent = (VkExtent2D){g_mode_w, g_mode_h}; + ci = &sized; + VkResult r = next(d, ci, a, out); + if (r == VK_SUCCESS) { +#ifdef DROIDDECK_WSI_CAPTURE + if (capture) droiddeck_wsi_swapchain(d, *out, ci); +#endif + return r; + } + char line[256]; + int n = snprintf(line, sizeof(line), "format %d space %d mode %d images %u %ux%u usage 0x%x chain:", ci->imageFormat, + ci->imageColorSpace, ci->presentMode, ci->minImageCount, ci->imageExtent.width, ci->imageExtent.height, + ci->imageUsage); + for (const VkBaseInStructure *p = ci->pNext; p && n < (int)sizeof(line) - 16; p = p->pNext) n += snprintf(line + n, sizeof(line) - n, " %d", p->sType); + say("vkCreateSwapchainKHR refused (%s); retrying for the headless surface", line); + VkSwapchainCreateInfoKHR mine = *ci; + mine.pNext = NULL; + mine.presentMode = VK_PRESENT_MODE_FIFO_KHR; + mine.imageColorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; + if (mine.minImageCount < 2) mine.minImageCount = 2; + r = next(d, &mine, a, out); + if (r != VK_SUCCESS) { + mine.imageFormat = VK_FORMAT_B8G8R8A8_UNORM; + mine.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; +#ifdef DROIDDECK_WSI_CAPTURE + if (capture) mine.imageUsage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; +#endif + mine.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; + mine.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; + r = next(d, &mine, a, out); + } + say("headless swapchain: %s", r == VK_SUCCESS ? "ok" : "still refused"); +#ifdef DROIDDECK_WSI_CAPTURE + if (r == VK_SUCCESS && capture) droiddeck_wsi_swapchain(d, *out, &mine); +#endif + return r; +} + +static void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *allocator) { +#ifdef DROIDDECK_WSI_CAPTURE + droiddeck_wsi_forget(device, swapchain); +#endif + NEXT(device, DestroySwapchainKHR)(device, swapchain, allocator); +} + +static PFN_vkVoidFunction display_device_hook(const char *name) { + HOOK_AS("vkCreateSwapchainKHR", CreateSwapchainKHR) + HOOK_AS("vkDestroySwapchainKHR", DestroySwapchainKHR) + HOOK_AS("vkDisplayPowerControlEXT", DisplayPowerControlEXT) + HOOK_AS("vkRegisterDeviceEventEXT", RegisterDeviceEventEXT) + HOOK_AS("vkRegisterDisplayEventEXT", RegisterDisplayEventEXT) + HOOK_AS("vkGetSwapchainCounterEXT", GetSwapchainCounterEXT) + return NULL; +} + + +#include <sched.h> +#include <stdatomic.h> + +#define MAX_SEMS 256 +#define MAX_TYPED 2048 +#define SHARED_NAME "droiddeck-shared-sem" +#define POLL_US 300 + +static pthread_mutex_t g_submission_lock = PTHREAD_MUTEX_INITIALIZER; +static unsigned g_producer_idle_calls; +struct producer_queue { + VkQueue queue; + VkDevice device; + VkFence fence; +}; +static struct producer_queue g_producer_queues[MAX_OBJS]; +static int g_producer_overflow; +static int g_producer_started; +static int64_t g_producer_retry_at; +static struct droiddeck_producer_server g_producer_server; + +__attribute__((destructor)) static void producer_process_exit(void) { + if (g_producer_started && g_producer_server.path[0]) unlink(g_producer_server.path); +} + +static int producer_acquire(int64_t deadline) { + while (pthread_mutex_trylock(&g_submission_lock) != 0) { + if (droiddeck_producer_now() >= deadline) return 0; + usleep(100); + } + int queues = 0; + if (g_producer_overflow || g_producer_idle_calls) goto fail; + for (unsigned index = 0; index < MAX_OBJS; index++) { + struct producer_queue *entry = &g_producer_queues[index]; + if (!entry->queue) continue; + queues++; + struct dev *device = dev_for(entry->device); + if (!device) goto fail; + PFN_vkGetFenceStatus status = (PFN_vkGetFenceStatus)device->gdpa(device->handle, "vkGetFenceStatus"); + PFN_vkDestroyFence destroy = (PFN_vkDestroyFence)device->gdpa(device->handle, "vkDestroyFence"); + if (entry->fence) { + if (status(device->handle, entry->fence) != VK_SUCCESS) goto fail; + destroy(device->handle, entry->fence, NULL); + entry->fence = VK_NULL_HANDLE; + } + VkFenceCreateInfo create = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, NULL, 0}; + PFN_vkCreateFence create_fence = (PFN_vkCreateFence)device->gdpa(device->handle, "vkCreateFence"); + if (create_fence(device->handle, &create, NULL, &entry->fence) != VK_SUCCESS) goto fail; + PFN_vkQueueSubmit submit = (PFN_vkQueueSubmit)device->gdpa(device->handle, "vkQueueSubmit"); + if (submit(entry->queue, 0, NULL, entry->fence) != VK_SUCCESS) { + destroy(device->handle, entry->fence, NULL); + entry->fence = VK_NULL_HANDLE; + goto fail; + } + } + if (!queues) goto fail; + for (unsigned index = 0; index < MAX_OBJS; index++) { + struct producer_queue *entry = &g_producer_queues[index]; + if (!entry->queue) continue; + int64_t remaining = deadline - droiddeck_producer_now(); + if (remaining <= 0) goto fail; + struct dev *device = dev_for(entry->device); + PFN_vkWaitForFences wait = (PFN_vkWaitForFences)device->gdpa(device->handle, "vkWaitForFences"); + if (wait(device->handle, 1, &entry->fence, VK_TRUE, (uint64_t)remaining) != VK_SUCCESS) goto fail; + } + return 1; +fail: + pthread_mutex_unlock(&g_submission_lock); + return 0; +} + +static void producer_release(void) { + pthread_mutex_unlock(&g_submission_lock); +} + +static void producer_quarantine(void) { + say("%s", "producer lease lost before capture completion: submissions quarantined; restart SteamVR"); +} + +static void producer_record(struct dev *device, VkQueue queue) { + if (!g_producer_started && droiddeck_producer_now() >= g_producer_retry_at) { + g_producer_retry_at = droiddeck_producer_now() + 1000000000LL; + g_producer_server.acquire = producer_acquire; + g_producer_server.release = producer_release; + g_producer_server.quarantine = producer_quarantine; + if (droiddeck_producer_start(&g_producer_server)) { + pthread_detach(g_producer_server.thread); + g_producer_started = 1; + } + } + for (unsigned index = 0; index < MAX_OBJS; index++) { + struct producer_queue *entry = &g_producer_queues[index]; + if (entry->queue == queue) return; + if (!entry->queue) { + *entry = (struct producer_queue){queue, device->handle, VK_NULL_HANDLE}; + return; + } + } + g_producer_overflow = 1; +} + +static void producer_destroy_device(struct dev *device, const VkAllocationCallbacks *allocator) { + (void)allocator; + pthread_mutex_lock(&g_submission_lock); + PFN_vkDestroyFence destroy = (PFN_vkDestroyFence)device->gdpa(device->handle, "vkDestroyFence"); + for (unsigned index = 0; index < MAX_OBJS; index++) { + struct producer_queue *entry = &g_producer_queues[index]; + if (entry->device != device->handle) continue; + if (entry->fence) destroy(device->handle, entry->fence, NULL); + memset(entry, 0, sizeof(*entry)); + } + pthread_mutex_unlock(&g_submission_lock); +} + +struct bridged { + VkSemaphore sem; + VkDevice dev; + _Atomic uint64_t *counter; + int fd; + int timeline; + unsigned long ino; + uint64_t submitted; + uint64_t seen, seen_us; + int imported; +}; +static pthread_mutex_t g_br_lock = PTHREAD_MUTEX_INITIALIZER; +static struct bridged g_br[MAX_SEMS]; +static VkSemaphore g_timeline_sems[MAX_TYPED]; +static pthread_t g_poller; +static int g_poller_started; + +static int timeline_known(VkSemaphore s) { + int r = 0; + pthread_mutex_lock(&g_br_lock); + for (int i = 0; i < MAX_TYPED && !r; i++) r = g_timeline_sems[i] == s; + pthread_mutex_unlock(&g_br_lock); + return r; +} +static void timeline_note(VkSemaphore s, int add) { + pthread_mutex_lock(&g_br_lock); + for (int i = 0; i < MAX_TYPED; i++) { + if (add ? !g_timeline_sems[i] : g_timeline_sems[i] == s) { g_timeline_sems[i] = add ? s : VK_NULL_HANDLE; break; } + } + pthread_mutex_unlock(&g_br_lock); +} + +static struct bridged *bridged_find(VkSemaphore s) { + for (int i = 0; i < MAX_SEMS; i++) if (g_br[i].sem == s) return &g_br[i]; + return NULL; +} +static void bridged_drop(struct bridged *b) { + if (b->counter) munmap((void *)b->counter, 4096); + if (b->fd >= 0) close(b->fd); + memset(b, 0, sizeof(*b)); + b->fd = -1; +} + +static int sem_trace_on(void) { + static int checked, on; + if (!checked++) { + const char *rt = getenv("XDG_RUNTIME_DIR"); + char path[512]; + snprintf(path, sizeof(path), "%s/droiddeck-steamvr/semtrace", rt && *rt ? rt : "/run/droiddeck"); + on = access(path, F_OK) == 0; + } + return on; +} + +static uint64_t now_us(void) { + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + return (uint64_t)ts.tv_sec * 1000000u + (uint64_t)ts.tv_nsec / 1000u; +} + +static void *poller(void *arg) { + unsigned ticks = 0; + for (;;) { + const int trace = sem_trace_on() && (++ticks % (2000000 / POLL_US) == 0); + pthread_mutex_lock(&g_br_lock); + for (int i = 0; i < MAX_SEMS; i++) { + struct bridged *b = &g_br[i]; + if (!b->sem || !b->timeline) continue; + struct dev *d = dev_for(b->dev); + if (!d) continue; + PFN_vkGetSemaphoreCounterValue get = (PFN_vkGetSemaphoreCounterValue)d->gdpa(b->dev, "vkGetSemaphoreCounterValue"); + if (!get) get = (PFN_vkGetSemaphoreCounterValue)d->gdpa(b->dev, "vkGetSemaphoreCounterValueKHR"); + PFN_vkSignalSemaphore sig = (PFN_vkSignalSemaphore)d->gdpa(b->dev, "vkSignalSemaphore"); + if (!sig) sig = (PFN_vkSignalSemaphore)d->gdpa(b->dev, "vkSignalSemaphoreKHR"); + uint64_t local = 0; + if (!get || get(b->dev, b->sem, &local) != VK_SUCCESS) continue; + uint64_t shared = atomic_load(b->counter); + if (shared != b->seen) { b->seen = shared; b->seen_us = now_us(); } + if (trace) { + char line[192]; + snprintf(line, sizeof(line), "%s sem %p %s counter %lu local %llu shared %llu", program_invocation_short_name, + (void *)b->sem, b->imported ? "imported" : "made here", b->ino, (unsigned long long)local, (unsigned long long)shared); + say("%s", line); + } + if (local > shared) { + while (local > shared && !atomic_compare_exchange_weak(b->counter, &shared, local)) {} + } else if (shared > local && sig) { + VkSemaphoreSignalInfo si = {VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO, NULL, b->sem, shared}; + sig(b->dev, &si); + } + } + pthread_mutex_unlock(&g_br_lock); + usleep(POLL_US); + } + return arg; +} + +static void poller_start(void) { + if (__atomic_exchange_n(&g_poller_started, 1, __ATOMIC_ACQ_REL)) return; + if (pthread_create(&g_poller, NULL, poller, NULL) == 0) pthread_detach(g_poller); + say("%s", "shared semaphores are bridged between processes"); +} + +static _Atomic uint64_t *map_counter(int fd) { + void *p = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + return p == MAP_FAILED ? NULL : (_Atomic uint64_t *)p; +} + +static unsigned long fd_ino(int fd) { + struct stat st; + return fstat(fd, &st) == 0 ? (unsigned long)st.st_ino : 0; +} + +static int is_shared_counter(int fd) { + char path[64], target[128]; + snprintf(path, sizeof(path), "/proc/self/fd/%d", fd); + ssize_t n = readlink(path, target, sizeof(target) - 1); + if (n <= 0) return 0; + target[n] = 0; + return strstr(target, SHARED_NAME) != NULL; +} + +static VkResult VKAPI_CALL CreateSemaphore(VkDevice d, const VkSemaphoreCreateInfo *ci, const VkAllocationCallbacks *a, VkSemaphore *out) { + PFN_vkCreateSemaphore next = NEXT(d, CreateSemaphore); + const VkBaseInStructure *export_info = NULL; + const VkSemaphoreTypeCreateInfo *type_info = NULL; + for (const VkBaseInStructure *p = ci->pNext; p; p = p->pNext) { + if (p->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO) export_info = p; + if (p->sType == VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO) type_info = (const void *)p; + } + const int timeline = type_info && type_info->semaphoreType == VK_SEMAPHORE_TYPE_TIMELINE; + VkResult r = next(d, ci, a, out); + if (r == VK_SUCCESS) { + if (timeline) timeline_note(*out, 1); + return r; + } + if (!export_info || !timeline || + ((const VkExportSemaphoreCreateInfo *)export_info)->handleTypes != VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT) return r; + for (const VkBaseInStructure *item = ci->pNext; item; item = item->pNext) + if (item != export_info && item != (const void *)type_info) return r; + VkSemaphoreTypeCreateInfo type = {0}; + VkSemaphoreCreateInfo mine = *ci; + mine.pNext = NULL; + if (type_info) { + type = *type_info; + type.pNext = NULL; + mine.pNext = &type; + } + r = next(d, &mine, a, out); + if (r != VK_SUCCESS) return r; + if (timeline) timeline_note(*out, 1); + int fd = memfd_create(SHARED_NAME, MFD_CLOEXEC); + _Atomic uint64_t *counter = NULL; + if (fd >= 0 && ftruncate(fd, 4096) == 0) counter = map_counter(fd); + if (!counter) { + if (fd >= 0) close(fd); + NEXT(d, DestroySemaphore)(d, *out, a); + timeline_note(*out, 0); + *out = VK_NULL_HANDLE; + return VK_ERROR_OUT_OF_HOST_MEMORY; + } + atomic_store(counter, timeline ? type_info->initialValue : 0); + pthread_mutex_lock(&g_br_lock); + struct bridged *slot = bridged_find(VK_NULL_HANDLE); + if (slot) *slot = (struct bridged){*out, d, counter, fd, timeline, fd_ino(fd), 0, atomic_load(counter), now_us(), 0}; + pthread_mutex_unlock(&g_br_lock); + if (!slot) { + munmap((void *)counter, 4096); + close(fd); + NEXT(d, DestroySemaphore)(d, *out, a); + timeline_note(*out, 0); + *out = VK_NULL_HANDLE; + return VK_ERROR_TOO_MANY_OBJECTS; + } + if (timeline) poller_start(); + return r; +} + +static void forget_semaphore(VkSemaphore s) { + pthread_mutex_lock(&g_br_lock); + struct bridged *b = bridged_find(s); + if (b) bridged_drop(b); + pthread_mutex_unlock(&g_br_lock); + timeline_note(s, 0); +} + +static void forget_device_semaphores(VkDevice dev) { + pthread_mutex_lock(&g_br_lock); + for (int i = 0; i < MAX_SEMS; i++) if (g_br[i].sem && g_br[i].dev == dev) bridged_drop(&g_br[i]); + pthread_mutex_unlock(&g_br_lock); +} + +static void VKAPI_CALL DestroySemaphore(VkDevice d, VkSemaphore s, const VkAllocationCallbacks *a) { + forget_semaphore(s); + NEXT(d, DestroySemaphore)(d, s, a); +} + +static VkResult VKAPI_CALL GetSemaphoreFdKHR(VkDevice d, const VkSemaphoreGetFdInfoKHR *info, int *fd) { + pthread_mutex_lock(&g_br_lock); + struct bridged *b = bridged_find(info->semaphore); + int mine = b && b->fd >= 0 ? dup(b->fd) : -2; + if (b && info->handleType != VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT) { + if (mine >= 0) close(mine); + pthread_mutex_unlock(&g_br_lock); + return VK_ERROR_INVALID_EXTERNAL_HANDLE; + } + pthread_mutex_unlock(&g_br_lock); + if (mine == -2) return NEXT(d, GetSemaphoreFdKHR)(d, info, fd); + *fd = mine; + return mine >= 0 ? VK_SUCCESS : VK_ERROR_TOO_MANY_OBJECTS; +} + +static VkResult VKAPI_CALL ImportSemaphoreFdKHR(VkDevice d, const VkImportSemaphoreFdInfoKHR *info) { + if (info->fd < 0 || !is_shared_counter(info->fd)) return NEXT(d, ImportSemaphoreFdKHR)(d, info); + const int timeline = timeline_known(info->semaphore); + struct stat metadata; + if (!timeline || info->flags || info->handleType != VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT || + fstat(info->fd, &metadata) != 0 || metadata.st_size != 4096) return VK_ERROR_INVALID_EXTERNAL_HANDLE; + _Atomic uint64_t *counter = map_counter(info->fd); + if (!counter) return VK_ERROR_OUT_OF_HOST_MEMORY; + const unsigned long ino = fd_ino(info->fd); + pthread_mutex_lock(&g_br_lock); + struct bridged *b = bridged_find(info->semaphore); + if (b) bridged_drop(b); + b = bridged_find(VK_NULL_HANDLE); + if (b) *b = (struct bridged){info->semaphore, d, counter, info->fd, timeline, ino, 0, atomic_load(counter), now_us(), 1}; + pthread_mutex_unlock(&g_br_lock); + if (!b) { + munmap((void *)counter, 4096); + return VK_ERROR_TOO_MANY_OBJECTS; + } + if (timeline) poller_start(); + static int said; + if (said++ < 4) say("imported a shared timeline semaphore (%s): bridged", program_invocation_short_name); + return VK_SUCCESS; +} + +#define SUBMIT_GRACE_US 3000 +#define SHARED_IDLE_US 100000 + +static int quest_frames(void) { + static _Atomic uint64_t checked_us; + static _Atomic int present; + const uint64_t t = now_us(); + const uint64_t last = atomic_load(&checked_us); + if (!last || t - last > 1000000) { + atomic_store(&present, access("/run/droiddeck/droiddeck-xr-frames", F_OK) == 0); + atomic_store(&checked_us, t); + } + return atomic_load(&present); +} + +static int submit_drop_wait(VkSemaphore s, uint64_t value) { + pthread_mutex_lock(&g_br_lock); + struct bridged *b = bridged_find(s); + if (!b || !b->timeline || !b->imported) { pthread_mutex_unlock(&g_br_lock); return 0; } + const uint64_t queued = b->submitted; + const uint64_t seen_us = b->seen_us; + VkDevice dev = b->dev; + pthread_mutex_unlock(&g_br_lock); + if (!value || value <= queued) return 0; + struct dev *d = dev_for(dev); + if (!d || quest_frames()) return 0; + PFN_vkGetSemaphoreCounterValue get = (PFN_vkGetSemaphoreCounterValue)d->gdpa(dev, "vkGetSemaphoreCounterValue"); + if (!get) get = (PFN_vkGetSemaphoreCounterValue)d->gdpa(dev, "vkGetSemaphoreCounterValueKHR"); + if (!get) return 0; + const uint64_t start = now_us(); + const uint64_t until = start + (start - seen_us > SHARED_IDLE_US ? 0 : SUBMIT_GRACE_US); + for (;;) { + uint64_t local = 0; + if (get(dev, s, &local) == VK_SUCCESS && local >= value) return 0; + /* Only the poller mirrors shared values. A second host signal here can + * race its signal and submit the same timeline value twice. */ + if (now_us() >= until) break; + usleep(100); + } + static _Atomic int dropped; + if (atomic_fetch_add(&dropped, 1) == 0) + say("%s: dropping a submit's wait on a shared value nobody has signalled yet (Turnip would block the submit)", + program_invocation_short_name); + return 1; +} + +static void note_signal(VkSemaphore s, uint64_t value) { + pthread_mutex_lock(&g_br_lock); + struct bridged *b = bridged_find(s); + if (b && b->timeline && value > b->submitted) b->submitted = value; + pthread_mutex_unlock(&g_br_lock); +} + +static void note_submit_signals(uint32_t count, const VkSubmitInfo *submits) { + for (uint32_t i = 0; i < count; i++) { + const VkTimelineSemaphoreSubmitInfo *t = NULL; + for (const VkBaseInStructure *p = submits[i].pNext; p; p = p->pNext) + if (p->sType == VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO) t = (const void *)p; + for (uint32_t j = 0; t && j < submits[i].signalSemaphoreCount && j < t->signalSemaphoreValueCount; j++) + note_signal(submits[i].pSignalSemaphores[j], t->pSignalSemaphoreValues[j]); + } +} + +static void note_submit2_signals(uint32_t count, const VkSubmitInfo2 *submits) { + for (uint32_t i = 0; i < count; i++) + for (uint32_t j = 0; j < submits[i].signalSemaphoreInfoCount; j++) + note_signal(submits[i].pSignalSemaphoreInfos[j].semaphore, submits[i].pSignalSemaphoreInfos[j].value); +} + +static uint32_t keep_waits(const VkSemaphore *in, const VkPipelineStageFlags *stages, const uint64_t *values, uint32_t n, + VkSemaphore *out, VkPipelineStageFlags *out_stages, uint64_t *out_values) { + uint32_t k = 0; + for (uint32_t i = 0; i < n; i++) { + if (submit_drop_wait(in[i], values ? values[i] : 0)) continue; + out[k] = in[i]; + if (stages) out_stages[k] = stages[i]; + if (values) out_values[k] = values[i]; + k++; + } + return k; +} + +static void trace_sem(const char *what, VkSemaphore sem, uint64_t value) { + if (!sem_trace_on() || value > 3) return; + pthread_mutex_lock(&g_br_lock); + struct bridged *b = bridged_find(sem); + unsigned long ino = b ? b->ino : 0; + pthread_mutex_unlock(&g_br_lock); + if (!ino) return; + char line[160]; + snprintf(line, sizeof(line), "%s %s %p value %llu counter %lu", program_invocation_short_name, what, (void *)sem, + (unsigned long long)value, ino); + say("%s", line); +} + +#include <limits.h> +#include <linux/futex.h> +#include <sys/syscall.h> +#include "present_sync.h" +#include "fence_tracker.h" +#include <time.h> + +static pthread_mutex_t g_trk_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_cond_t g_trk_cond = PTHREAD_COND_INITIALIZER; +static struct tracked *g_trk; +static struct droiddeck_present_sync *g_sync; +static pthread_once_t g_sync_once = PTHREAD_ONCE_INIT; + +static void sync_wake(struct droiddeck_present_sync *s) { + syscall(SYS_futex, &s->done, FUTEX_WAKE, INT_MAX, NULL, NULL, 0); +} + +static void *completer(void *arg) { + struct droiddeck_present_sync *s = arg; + pthread_mutex_lock(&g_trk_lock); + for (;;) { + uint32_t done; + int pending = track_pool_reap(g_trk, __atomic_load_n(&s->issued, __ATOMIC_ACQUIRE), &done); + if (done != __atomic_load_n(&s->done, __ATOMIC_RELAXED)) { + __atomic_store_n(&s->done, done, __ATOMIC_RELEASE); + sync_wake(s); + } + pthread_cond_broadcast(&g_trk_cond); + if (pending) { + struct timespec until; + clock_gettime(CLOCK_REALTIME, &until); + until.tv_nsec += 1000000; /* Poll pending GPU work at most every 1 ms. */ + if (until.tv_nsec >= 1000000000) { until.tv_sec++; until.tv_nsec -= 1000000000; } + pthread_cond_timedwait(&g_trk_cond, &g_trk_lock, &until); + } else { + pthread_cond_wait(&g_trk_cond, &g_trk_lock); + } + } + return NULL; +} + +static void sync_init(void) { + if (strcmp(program_invocation_short_name, "vrcompositor")) return; + const char *rt = getenv("XDG_RUNTIME_DIR"); + char path[512]; + snprintf(path, sizeof(path), "%s/droiddeck-steamvr/%s", rt && *rt ? rt : "/run/droiddeck", DROIDDECK_PRESENT_SYNC_NAME); + int fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0600); + if (fd < 0) return; + void *m = ftruncate(fd, DROIDDECK_PRESENT_SYNC_SIZE) == 0 + ? mmap(NULL, DROIDDECK_PRESENT_SYNC_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0) : MAP_FAILED; + close(fd); + if (m == MAP_FAILED) return; + struct droiddeck_present_sync *s = m; + __atomic_store_n(&s->done, __atomic_load_n(&s->issued, __ATOMIC_ACQUIRE), __ATOMIC_RELEASE); + sync_wake(s); + pthread_t t; + if (pthread_create(&t, NULL, completer, s) != 0) { munmap(m, DROIDDECK_PRESENT_SYNC_SIZE); return; } + pthread_detach(t); + g_sync = s; + say("%s", "frames go to the presenter once their GPU work is done"); +} + +static struct tracked *track_take(struct dev *d) { + pthread_mutex_lock(&g_trk_lock); + struct tracked *t = track_pool_take(&g_trk, d->handle, d->gdpa); + pthread_mutex_unlock(&g_trk_lock); + return t; +} + +static void track_submitted(struct tracked *t, VkResult r) { + pthread_mutex_lock(&g_trk_lock); + uint32_t issued = track_pool_submitted(t, r, __atomic_load_n(&g_sync->issued, __ATOMIC_RELAXED)); + __atomic_store_n(&g_sync->issued, issued, __ATOMIC_RELEASE); + pthread_cond_broadcast(&g_trk_cond); + pthread_mutex_unlock(&g_trk_lock); +} + +static void track_forget_device(VkDevice dev) { + pthread_mutex_lock(&g_trk_lock); + while (track_pool_device_busy(g_trk, dev)) + pthread_cond_wait(&g_trk_cond, &g_trk_lock); + track_pool_forget(&g_trk, dev); + pthread_mutex_unlock(&g_trk_lock); +} + +static VkResult submit_tracked(PFN_vkQueueSubmit next, VkQueue q, uint32_t count, const VkSubmitInfo *submits, VkFence fence) { + if (strcmp(program_invocation_short_name, "vrcompositor")) return next(q, count, submits, fence); + pthread_once(&g_sync_once, sync_init); + struct dev *d = dev_for(q); + if (!g_sync || !d) return next(q, count, submits, fence); + struct tracked *slot = track_take(d); + if (!slot) return VK_ERROR_OUT_OF_HOST_MEMORY; + const VkFence mine = slot->fence; + VkResult r = next(q, count, submits, fence ? fence : mine); + if (r == VK_SUCCESS && fence) r = next(q, 0, NULL, mine); + track_submitted(slot, r); + return r; +} + +static VkResult submit2_tracked(PFN_vkQueueSubmit2 next, VkQueue q, uint32_t count, const VkSubmitInfo2 *submits, VkFence fence) { + if (strcmp(program_invocation_short_name, "vrcompositor")) return next(q, count, submits, fence); + pthread_once(&g_sync_once, sync_init); + struct dev *d = dev_for(q); + if (!g_sync || !d) return next(q, count, submits, fence); + struct tracked *slot = track_take(d); + if (!slot) return VK_ERROR_OUT_OF_HOST_MEMORY; + const VkFence mine = slot->fence; + VkResult r = next(q, count, submits, fence ? fence : mine); + if (r == VK_SUCCESS && fence) r = next(q, 0, NULL, mine); + track_submitted(slot, r); + return r; +} + +static VkResult VKAPI_CALL QueueSubmit(VkQueue q, uint32_t count, const VkSubmitInfo *submits, VkFence fence) { + PFN_vkQueueSubmit next = (PFN_vkQueueSubmit)dev_for(q)->gdpa(dev_for(q)->handle, "vkQueueSubmit"); + if (sem_trace_on()) + for (uint32_t i = 0; i < count; i++) { + const VkTimelineSemaphoreSubmitInfo *t = NULL; + for (const VkBaseInStructure *p = submits[i].pNext; p; p = p->pNext) + if (p->sType == VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO) t = (const void *)p; + for (uint32_t j = 0; j < submits[i].waitSemaphoreCount; j++) + trace_sem("waits", submits[i].pWaitSemaphores[j], t && j < t->waitSemaphoreValueCount ? t->pWaitSemaphoreValues[j] : 0); + for (uint32_t j = 0; j < submits[i].signalSemaphoreCount; j++) + trace_sem("signals", submits[i].pSignalSemaphores[j], t && j < t->signalSemaphoreValueCount ? t->pSignalSemaphoreValues[j] : 0); + } + int any = 0; + for (uint32_t i = 0; i < count && !any; i++) { + const VkTimelineSemaphoreSubmitInfo *t = NULL; + for (const VkBaseInStructure *p = submits[i].pNext; p; p = p->pNext) + if (p->sType == VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO) t = (const void *)p; + for (uint32_t j = 0; submits[i].pWaitSemaphores && j < submits[i].waitSemaphoreCount && !any; j++) + any = submit_drop_wait(submits[i].pWaitSemaphores[j], t && j < t->waitSemaphoreValueCount ? t->pWaitSemaphoreValues[j] : 0); + } + VkSubmitInfo *copy = NULL; + VkTimelineSemaphoreSubmitInfo *tl = NULL; + void **bufs = NULL; + if (any) { + copy = calloc(count, sizeof(*copy)); + tl = calloc(count, sizeof(*tl)); + bufs = calloc(count * 3, sizeof(void *)); + if (!copy || !tl || !bufs) { free(copy); free(tl); free(bufs); return VK_ERROR_OUT_OF_HOST_MEMORY; } + for (uint32_t i = 0; i < count; i++) { + copy[i] = submits[i]; + uint32_t n = submits[i].waitSemaphoreCount; + if (!n) continue; + VkSemaphore *sems = calloc(n, sizeof(*sems)); + VkPipelineStageFlags *stages = calloc(n, sizeof(*stages)); + uint64_t *vals = calloc(n, sizeof(*vals)); + bufs[i * 3] = sems; bufs[i * 3 + 1] = stages; bufs[i * 3 + 2] = vals; + if (!sems || !stages || !vals) { + for (uint32_t k = 0; k < count * 3; k++) free(bufs[k]); + free(bufs); free(tl); free(copy); + return VK_ERROR_OUT_OF_HOST_MEMORY; + } + const VkTimelineSemaphoreSubmitInfo *t = NULL; + for (const VkBaseInStructure *p = submits[i].pNext; p; p = p->pNext) + if (p->sType == VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO) t = (const void *)p; + uint32_t k = keep_waits(submits[i].pWaitSemaphores, submits[i].pWaitDstStageMask, + t && t->waitSemaphoreValueCount ? t->pWaitSemaphoreValues : NULL, n, sems, stages, vals); + copy[i].waitSemaphoreCount = k; + copy[i].pWaitSemaphores = sems; + copy[i].pWaitDstStageMask = stages; + if (t) { + tl[i] = *t; + tl[i].waitSemaphoreValueCount = t->waitSemaphoreValueCount ? k : 0; + tl[i].pWaitSemaphoreValues = vals; + tl[i].pNext = t->pNext; + copy[i].pNext = &tl[i]; + } + } + } + struct dev *device = dev_for(q); + if (device->producer) { pthread_mutex_lock(&g_submission_lock); producer_record(device, q); } + VkResult result = submit_tracked(next, q, count, any ? copy : submits, fence); + if (device->producer) pthread_mutex_unlock(&g_submission_lock); + note_submit_signals(count, submits); + if (any) { + for (uint32_t i = 0; i < count * 3; i++) free(bufs[i]); + free(bufs); free(tl); free(copy); + } + return result; +} + +static VkResult VKAPI_CALL QueueSubmit2(VkQueue q, uint32_t count, const VkSubmitInfo2 *submits, VkFence fence) { + PFN_vkQueueSubmit2 next = (PFN_vkQueueSubmit2)dev_for(q)->gdpa(dev_for(q)->handle, "vkQueueSubmit2"); + if (!next) next = (PFN_vkQueueSubmit2)dev_for(q)->gdpa(dev_for(q)->handle, "vkQueueSubmit2KHR"); + if (sem_trace_on()) + for (uint32_t i = 0; i < count; i++) { + for (uint32_t j = 0; j < submits[i].waitSemaphoreInfoCount; j++) + trace_sem("waits", submits[i].pWaitSemaphoreInfos[j].semaphore, submits[i].pWaitSemaphoreInfos[j].value); + for (uint32_t j = 0; j < submits[i].signalSemaphoreInfoCount; j++) + trace_sem("signals", submits[i].pSignalSemaphoreInfos[j].semaphore, submits[i].pSignalSemaphoreInfos[j].value); + } + int any = 0; + for (uint32_t i = 0; i < count && !any; i++) + for (uint32_t j = 0; submits[i].pWaitSemaphoreInfos && j < submits[i].waitSemaphoreInfoCount && !any; j++) + any = submit_drop_wait(submits[i].pWaitSemaphoreInfos[j].semaphore, submits[i].pWaitSemaphoreInfos[j].value); + VkSubmitInfo2 *copy = NULL; + VkSemaphoreSubmitInfo **waits = NULL; + if (any) { + copy = calloc(count, sizeof(*copy)); + waits = calloc(count, sizeof(*waits)); + if (!copy || !waits) { free(copy); free(waits); return VK_ERROR_OUT_OF_HOST_MEMORY; } + for (uint32_t i = 0; i < count; i++) { + copy[i] = submits[i]; + uint32_t n = submits[i].waitSemaphoreInfoCount, k = 0; + waits[i] = calloc(n + 1, sizeof(VkSemaphoreSubmitInfo)); + if (!waits[i]) { + for (uint32_t j = 0; j < i; j++) free(waits[j]); + free(waits); free(copy); + return VK_ERROR_OUT_OF_HOST_MEMORY; + } + for (uint32_t j = 0; j < n; j++) + if (!submit_drop_wait(submits[i].pWaitSemaphoreInfos[j].semaphore, submits[i].pWaitSemaphoreInfos[j].value)) + waits[i][k++] = submits[i].pWaitSemaphoreInfos[j]; + copy[i].waitSemaphoreInfoCount = k; + copy[i].pWaitSemaphoreInfos = waits[i]; + } + } + struct dev *device = dev_for(q); + if (device->producer) { pthread_mutex_lock(&g_submission_lock); producer_record(device, q); } + VkResult result = submit2_tracked(next, q, count, any ? copy : submits, fence); + if (device->producer) pthread_mutex_unlock(&g_submission_lock); + note_submit2_signals(count, submits); + if (any) { + for (uint32_t i = 0; i < count; i++) free(waits[i]); + free(waits); free(copy); + } + return result; +} + +static VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *info) { + struct dev *device = dev_for(queue); + PFN_vkQueuePresentKHR next = (PFN_vkQueuePresentKHR)device->gdpa(device->handle, "vkQueuePresentKHR"); + if (device->producer) { pthread_mutex_lock(&g_submission_lock); producer_record(device, queue); } +#ifdef DROIDDECK_WSI_CAPTURE + VkResult result = droiddeck_wsi_present(device->handle, queue, info, next); +#else + VkResult result = next(queue, info); +#endif + if (device->producer) pthread_mutex_unlock(&g_submission_lock); + return result; +} + +static VkResult VKAPI_CALL QueueBindSparse(VkQueue queue, uint32_t count, const VkBindSparseInfo *binds, VkFence fence) { + struct dev *device = dev_for(queue); + PFN_vkQueueBindSparse next = (PFN_vkQueueBindSparse)device->gdpa(device->handle, "vkQueueBindSparse"); + if (device->producer) { pthread_mutex_lock(&g_submission_lock); producer_record(device, queue); } + VkResult result = next(queue, count, binds, fence); + if (device->producer) pthread_mutex_unlock(&g_submission_lock); + return result; +} + +static VkResult VKAPI_CALL QueueWaitIdle(VkQueue queue) { + struct dev *device = dev_for(queue); + PFN_vkQueueWaitIdle next = (PFN_vkQueueWaitIdle)device->gdpa(device->handle, "vkQueueWaitIdle"); + if (device->producer) { + pthread_mutex_lock(&g_submission_lock); + g_producer_idle_calls++; + pthread_mutex_unlock(&g_submission_lock); + } + VkResult result = next(queue); + if (device->producer) { + pthread_mutex_lock(&g_submission_lock); + g_producer_idle_calls--; + pthread_mutex_unlock(&g_submission_lock); + } + return result; +} + +static VkResult VKAPI_CALL DeviceWaitIdle(VkDevice handle) { + struct dev *device = dev_for(handle); + PFN_vkDeviceWaitIdle next = (PFN_vkDeviceWaitIdle)device->gdpa(handle, "vkDeviceWaitIdle"); + if (device->producer) { + pthread_mutex_lock(&g_submission_lock); + g_producer_idle_calls++; + pthread_mutex_unlock(&g_submission_lock); + } + VkResult result = next(handle); + if (device->producer) { + pthread_mutex_lock(&g_submission_lock); + g_producer_idle_calls--; + pthread_mutex_unlock(&g_submission_lock); + } + return result; +} + +static VkResult VKAPI_CALL WaitSemaphores(VkDevice d, const VkSemaphoreWaitInfo *info, uint64_t timeout) { + PFN_vkWaitSemaphores next = (PFN_vkWaitSemaphores)dev_for(d)->gdpa(d, "vkWaitSemaphores"); + if (!next) next = (PFN_vkWaitSemaphores)dev_for(d)->gdpa(d, "vkWaitSemaphoresKHR"); + return next(d, info, timeout); +} + +static VkResult VKAPI_CALL GetSemaphoreCounterValue(VkDevice d, VkSemaphore s, uint64_t *value) { + PFN_vkGetSemaphoreCounterValue next = (PFN_vkGetSemaphoreCounterValue)dev_for(d)->gdpa(d, "vkGetSemaphoreCounterValue"); + if (!next) next = (PFN_vkGetSemaphoreCounterValue)dev_for(d)->gdpa(d, "vkGetSemaphoreCounterValueKHR"); + return next(d, s, value); +} + +static VkResult VKAPI_CALL CreateImage(VkDevice d, const VkImageCreateInfo *ci, const VkAllocationCallbacks *a, VkImage *out) { + VkImageCreateInfo compatible = *ci; + VkExternalMemoryImageCreateInfo shared; + const VkBaseInStructure *first = ci->pNext; + // SteamVR's OpenXR stereo arrays omit a format list, while DXVK adds one on import. + // Leave single-layer OpenVR images alone: the application owns their export layout. + if (dev_for(d)->quest_images && ci->arrayLayers > 1 && (ci->flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) && ci->tiling == VK_IMAGE_TILING_OPTIMAL + && first && first->sType == VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO) { + const VkBaseInStructure *second = first->pNext; + if (second && second->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO + && ((const VkExternalMemoryImageCreateInfo *)second)->handleTypes == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT) { + compatible.pNext = second; ci = &compatible; + say("%s", "matching opaque shared image layout to SteamVR's unrestricted format list"); + } + } + if (dev_for(d)->quest_images && ci->arrayLayers > 1 && (ci->flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) && ci->tiling == VK_IMAGE_TILING_OPTIMAL + && first && first->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO) { + const VkExternalMemoryImageCreateInfo *external = (const void *)first; + const VkBaseInStructure *second = external->pNext; + if (external->handleTypes == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT && second + && second->sType == VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO) { + shared = *external; shared.pNext = second->pNext; compatible.pNext = &shared; ci = &compatible; + say("%s", "matching opaque shared image layout to SteamVR's unrestricted format list"); + } + } + VkResult r = NEXT(d, CreateImage)(d, ci, a, out); + if (!sem_trace_on()) return r; + const VkExternalMemoryImageCreateInfo *ext = NULL; + const VkImageFormatListCreateInfo *list = NULL; + for (const VkBaseInStructure *p = ci->pNext; p; p = p->pNext) { + if (p->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO) ext = (const void *)p; + if (p->sType == VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO) list = (const void *)p; + } + if (!ext) return r; + char line[256]; + int n = snprintf(line, sizeof(line), "%s image %ux%u format %d flags 0x%x usage 0x%x tiling %d layers %u mips %u samples %u handles 0x%x list", + program_invocation_short_name, ci->extent.width, ci->extent.height, ci->format, ci->flags, ci->usage, + ci->tiling, ci->arrayLayers, ci->mipLevels, ci->samples, ext->handleTypes); + for (uint32_t i = 0; list && i < list->viewFormatCount && n < (int)sizeof(line) - 8; i++) + n += snprintf(line + n, sizeof(line) - n, " %d", list->pViewFormats[i]); + for (const VkBaseInStructure *p = ci->pNext; p && n < (int)sizeof(line) - 16; p = p->pNext) + n += snprintf(line + n, sizeof(line) - n, " chain:%d", p->sType); + say("%s", line); + return r; +} + +static PFN_vkVoidFunction semaphore_hook(const char *name) { + HOOK_AS("vkCreateImage", CreateImage) + HOOK_AS("vkCreateSemaphore", CreateSemaphore) + HOOK_AS("vkDestroySemaphore", DestroySemaphore) + HOOK_AS("vkGetSemaphoreFdKHR", GetSemaphoreFdKHR) + HOOK_AS("vkImportSemaphoreFdKHR", ImportSemaphoreFdKHR) + HOOK_AS("vkQueueSubmit", QueueSubmit) + HOOK_AS("vkQueueSubmit2", QueueSubmit2) + HOOK_AS("vkQueueSubmit2KHR", QueueSubmit2) + HOOK_AS("vkQueuePresentKHR", QueuePresentKHR) + HOOK_AS("vkQueueBindSparse", QueueBindSparse) + HOOK_AS("vkQueueWaitIdle", QueueWaitIdle) + HOOK_AS("vkDeviceWaitIdle", DeviceWaitIdle) + HOOK_AS("vkWaitSemaphores", WaitSemaphores) + HOOK_AS("vkWaitSemaphoresKHR", WaitSemaphores) + HOOK_AS("vkGetSemaphoreCounterValue", GetSemaphoreCounterValue) + HOOK_AS("vkGetSemaphoreCounterValueKHR", GetSemaphoreCounterValue) + return NULL; +} + + +#define HOOK(fn) if (!strcmp(name, "vk" #fn)) return (PFN_vkVoidFunction)fn; + +static PFN_vkVoidFunction display_hook(const char *name) { + HOOK(GetPhysicalDeviceDisplayPropertiesKHR) + HOOK(GetPhysicalDeviceDisplayProperties2KHR) + HOOK(GetPhysicalDeviceDisplayPlanePropertiesKHR) + HOOK(GetPhysicalDeviceDisplayPlaneProperties2KHR) + HOOK(GetDisplayPlaneSupportedDisplaysKHR) + HOOK(GetDisplayModePropertiesKHR) + HOOK(GetDisplayModeProperties2KHR) + HOOK(CreateDisplayModeKHR) + HOOK(GetDisplayPlaneCapabilitiesKHR) + HOOK(GetDisplayPlaneCapabilities2KHR) + HOOK(GetPhysicalDeviceSurfaceCapabilities2EXT) + HOOK(CreateDisplayPlaneSurfaceKHR) + HOOK(ReleaseDisplayEXT) + HOOK(AcquireDrmDisplayEXT) + HOOK(GetDrmDisplayEXT) + HOOK(AcquireXlibDisplayEXT) + HOOK(GetRandROutputDisplayEXT) + return NULL; +} + +EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL DroidDeckVr_GetDeviceProcAddr(VkDevice device, const char *name); + +EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL DroidDeckVr_GetInstanceProcAddr(VkInstance instance, const char *name) { + HOOK(CreateInstance) + HOOK(DestroyInstance) + HOOK(CreateDevice) + HOOK(DestroyDevice) + if (!strcmp(name, "vkGetInstanceProcAddr")) return (PFN_vkVoidFunction)DroidDeckVr_GetInstanceProcAddr; + if (!strcmp(name, "vkGetDeviceProcAddr")) return (PFN_vkVoidFunction)DroidDeckVr_GetDeviceProcAddr; + if (!instance) return NULL; + struct inst *in = inst_for(instance); + if (in && !in->active) return in->gipa(instance, name); + if (in && in->stripped) { + PFN_vkVoidFunction f = display_hook(name); + if (!f) f = display_device_hook(name); + if (f) return f; + } + if (in) { + PFN_vkVoidFunction f = semaphore_hook(name); + if (f && in->gipa(instance, name)) return f; + } + return in ? in->gipa(instance, name) : NULL; +} + +EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL DroidDeckVr_GetDeviceProcAddr(VkDevice device, const char *name) { + HOOK(DestroyDevice) + if (!strcmp(name, "vkGetDeviceProcAddr")) return (PFN_vkVoidFunction)DroidDeckVr_GetDeviceProcAddr; + struct dev *d = dev_for(device); + if (d && !d->active) return d->gdpa(device, name); + if (d && d->display) { + PFN_vkVoidFunction f = display_device_hook(name); + if (f) return f; + } + if (d) { + PFN_vkVoidFunction mine = semaphore_hook(name); + if (mine && d->gdpa(device, name)) return mine; + } + return d ? d->gdpa(device, name) : NULL; +} + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL DroidDeckVr_NegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *v) { + if (v->loaderLayerInterfaceVersion > 2) v->loaderLayerInterfaceVersion = 2; + v->pfnGetInstanceProcAddr = DroidDeckVr_GetInstanceProcAddr; + v->pfnGetDeviceProcAddr = DroidDeckVr_GetDeviceProcAddr; + v->pfnGetPhysicalDeviceProcAddr = NULL; + return VK_SUCCESS; +} diff --git a/tools/vr/src/wayland_client_stub.c b/tools/vr/src/wayland_client_stub.c new file mode 100644 index 0000000000..d81a07fda8 --- /dev/null +++ b/tools/vr/src/wayland_client_stub.c @@ -0,0 +1,31 @@ +#include <stdint.h> +#include <stddef.h> +#include "wayland-util.h" + +struct wl_display; +struct wl_proxy; +struct wl_event_queue; + +struct wl_display *wl_display_connect(const char *name) { return NULL; } +void wl_display_disconnect(struct wl_display *d) {} +int wl_display_roundtrip(struct wl_display *d) { return -1; } +int wl_display_dispatch(struct wl_display *d) { return -1; } +int wl_display_dispatch_pending(struct wl_display *d) { return -1; } +int wl_display_flush(struct wl_display *d) { return -1; } +int wl_display_get_error(struct wl_display *d) { return 0; } +struct wl_proxy *wl_proxy_marshal_flags(struct wl_proxy *p, uint32_t opcode, const struct wl_interface *i, uint32_t v, + uint32_t flags, ...) { return NULL; } +int wl_proxy_add_listener(struct wl_proxy *p, void (**impl)(void), void *data) { return -1; } +uint32_t wl_proxy_get_version(struct wl_proxy *p) { return 0; } +void wl_proxy_destroy(struct wl_proxy *p) {} +void wl_proxy_set_user_data(struct wl_proxy *p, void *d) {} +void *wl_proxy_get_user_data(struct wl_proxy *p) { return NULL; } + +const struct wl_interface wl_registry_interface; +const struct wl_interface wl_compositor_interface; +const struct wl_interface wl_surface_interface; +const struct wl_interface wl_output_interface; +const struct wl_interface wl_seat_interface; +const struct wl_interface wl_callback_interface; +const struct wl_interface wl_region_interface; +const struct wl_interface wl_buffer_interface; diff --git a/tools/vr/src/wsi_capture.cpp b/tools/vr/src/wsi_capture.cpp new file mode 100644 index 0000000000..11f4d4e2b6 --- /dev/null +++ b/tools/vr/src/wsi_capture.cpp @@ -0,0 +1,404 @@ +#define VK_NO_PROTOTYPES +#include "wsi_capture.h" +#include "xr_tracking_file.h" +#include "xr_frame_channel.h" +#include "xr_gpu_channel.h" +#include <algorithm> +#include <cstdio> +#include <memory> +#include <unordered_map> +#include <condition_variable> +#include <array> + +namespace { +#define FUNCTIONS(X) \ + X(GetSwapchainImagesKHR) X(CreateCommandPool) X(DestroyCommandPool) X(AllocateCommandBuffers) \ + X(ResetCommandBuffer) X(BeginCommandBuffer) X(EndCommandBuffer) X(CmdPipelineBarrier) \ + X(CmdCopyImageToBuffer) X(CreateBuffer) X(DestroyBuffer) X(GetBufferMemoryRequirements) \ + X(AllocateMemory) X(FreeMemory) X(BindBufferMemory) X(MapMemory) X(UnmapMemory) \ + X(InvalidateMappedMemoryRanges) X(CreateFence) X(DestroyFence) X(ResetFences) X(WaitForFences) X(QueueSubmit) \ + X(CreateSemaphore) X(DestroySemaphore) X(GetMemoryFdKHR) X(CreateImage) X(DestroyImage) \ + X(GetImageMemoryRequirements) X(BindImageMemory) X(CmdBlitImage) +struct Device { + VkDevice handle{}; + VkPhysicalDeviceMemoryProperties memory{}; + bool foreign{}; + PFN_vkGetMemoryFdPropertiesKHR GetMemoryFdPropertiesKHR{}; + std::unordered_map<VkQueue, uint32_t> queues; +#define MEMBER(name) PFN_vk##name name{}; + FUNCTIONS(MEMBER) +#undef MEMBER +}; +struct CaptureSlot { + Device *device{}; + VkCommandPool pool{}; + VkCommandBuffer command{}; + VkBuffer buffer{}; + VkDeviceMemory memory{}; + VkImage rgbaImage{}; + VkDeviceMemory rgbaMemory{}; + int sharedFd = -1; + bool rgbaInitialized{}; + void *mapping{}; + VkFence fence{}; + bool busy{}, queued{}; + DroidDeckXrFrameHeader header{}; + ~CaptureSlot() { Clear(); } + void Clear() { + if (!device) return; + if (busy && fence) device->WaitForFences(device->handle, 1, &fence, VK_TRUE, UINT64_MAX); + if (sharedFd >= 0) close(sharedFd); + if (fence) device->DestroyFence(device->handle, fence, nullptr); + if (pool) device->DestroyCommandPool(device->handle, pool, nullptr); + if (buffer) device->DestroyBuffer(device->handle, buffer, nullptr); + if (rgbaImage) device->DestroyImage(device->handle, rgbaImage, nullptr); + if (rgbaMemory) device->FreeMemory(device->handle, rgbaMemory, nullptr); + if (mapping) device->UnmapMemory(device->handle, memory); + if (memory) device->FreeMemory(device->handle, memory, nullptr); + device = nullptr; pool = VK_NULL_HANDLE; command = VK_NULL_HANDLE; buffer = VK_NULL_HANDLE; + memory = VK_NULL_HANDLE; rgbaImage = VK_NULL_HANDLE; rgbaMemory = VK_NULL_HANDLE; + sharedFd = -1; mapping = nullptr; fence = VK_NULL_HANDLE; busy = queued = rgbaInitialized = false; + } + bool Initialize(Device &d, VkExtent2D extent, VkFormat format, uint32_t family, int imported = -1, uint64_t size = 0) { + device = &d; + VkCommandPoolCreateInfo pc{VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO}; + pc.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; pc.queueFamilyIndex = family; + if (d.CreateCommandPool(d.handle, &pc, nullptr, &pool)) return false; + VkCommandBufferAllocateInfo ca{VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO}; + ca.commandPool = pool; ca.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; ca.commandBufferCount = 1; + if (d.AllocateCommandBuffers(d.handle, &ca, &command)) return false; + VkBufferCreateInfo bc{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO}; + VkExternalMemoryBufferCreateInfo external{VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO}; + external.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT; bc.pNext = &external; + bc.size = uint64_t(extent.width) * extent.height * 4; bc.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT; + if (d.CreateBuffer(d.handle, &bc, nullptr, &buffer)) return false; + VkMemoryRequirements requirements{}; d.GetBufferMemoryRequirements(d.handle, buffer, &requirements); + VkImportMemoryFdInfoKHR import{VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR}; + VkMemoryFdPropertiesKHR fdProperties{VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR}; + if (imported >= 0) { + if (!d.GetMemoryFdPropertiesKHR || size < requirements.size + || d.GetMemoryFdPropertiesKHR(d.handle, VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT, imported, &fdProperties)) return false; + requirements.memoryTypeBits &= fdProperties.memoryTypeBits; + } + uint32_t type = d.memory.memoryTypeCount; + for (uint32_t i = 0; i < d.memory.memoryTypeCount; i++) { + auto flags = d.memory.memoryTypes[i].propertyFlags; + if (!(requirements.memoryTypeBits & (1u << i)) || (imported < 0 && !(flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT))) continue; + type = i; + if (flags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) break; + } + if (type == d.memory.memoryTypeCount) return false; + VkMemoryAllocateInfo alloc{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO}; + VkExportMemoryAllocateInfo exported{VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO}; + exported.handleTypes = external.handleTypes; alloc.pNext = &exported; + alloc.allocationSize = requirements.size; alloc.memoryTypeIndex = type; + if (imported >= 0) { + import.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT; import.fd = dup(imported); + if (import.fd < 0) return false; + alloc.pNext = &import; alloc.allocationSize = size; + } + VkResult allocated = d.AllocateMemory(d.handle, &alloc, nullptr, &memory); + if (allocated && import.fd >= 0 && imported >= 0) close(import.fd); + if (allocated || d.BindBufferMemory(d.handle, buffer, memory, 0)) return false; + if (imported < 0) { + if (d.MapMemory(d.handle, memory, 0, VK_WHOLE_SIZE, 0, &mapping)) return false; + VkMemoryGetFdInfoKHR getFd{VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR}; + getFd.memory = memory; getFd.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT; + if (d.GetMemoryFdKHR(d.handle, &getFd, &sharedFd)) return false; + } + if (imported < 0) { + VkImageCreateInfo image{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO}; + image.imageType = VK_IMAGE_TYPE_2D; image.extent = {extent.width, extent.height, 1}; + image.mipLevels = image.arrayLayers = 1; image.samples = VK_SAMPLE_COUNT_1_BIT; + image.format = (format == VK_FORMAT_R8G8B8A8_SRGB || format == VK_FORMAT_B8G8R8A8_SRGB) + ? VK_FORMAT_R8G8B8A8_SRGB : VK_FORMAT_R8G8B8A8_UNORM; + image.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + if (d.CreateImage(d.handle, &image, nullptr, &rgbaImage)) return false; + d.GetImageMemoryRequirements(d.handle, rgbaImage, &requirements); + type = 0; + while (type < d.memory.memoryTypeCount && !(requirements.memoryTypeBits & (1u << type))) type++; + if (type == d.memory.memoryTypeCount) return false; + alloc.pNext = nullptr; alloc.allocationSize = requirements.size; alloc.memoryTypeIndex = type; + if (d.AllocateMemory(d.handle, &alloc, nullptr, &rgbaMemory) + || d.BindImageMemory(d.handle, rgbaImage, rgbaMemory, 0)) return false; + } + VkFenceCreateInfo fc{VK_STRUCTURE_TYPE_FENCE_CREATE_INFO}; + if (d.CreateFence(d.handle, &fc, nullptr, &fence)) return false; + return true; + } +}; +struct Swapchain { + explicit Swapchain(const char *trackingPath = "/run/droiddeck/" DROIDDECK_XR_FILE) : tracking(trackingPath) {} + Device *device{}; + VkExtent2D extent{}; + VkFormat format{}; + std::vector<VkImage> images; + std::vector<VkSemaphore> ready; + std::array<CaptureSlot, 3> slots; + uint64_t frame{}; + XrTrackingFile tracking; + XrFrameSender sender; + XrGpuSender gpuSender; + bool gpu{}; + bool initialized{}, attempted{}; + uint32_t family{}; + std::mutex sendMutex; + std::condition_variable sendReady; + bool stopping{}, failed{}; + std::thread sendThread; + ~Swapchain() { + { std::lock_guard<std::mutex> lock(sendMutex); stopping = true; sendReady.notify_all(); } + if (sendThread.joinable()) sendThread.join(); + for (auto semaphore : ready) if (semaphore) device->DestroySemaphore(device->handle, semaphore, nullptr); + } + void Run() noexcept { + try { Loop(); } + catch (...) { + std::lock_guard<std::mutex> lock(sendMutex); failed = true; + std::fprintf(stderr, "[droiddeck-vr-layer] WSI worker failed; restart SteamVR\n"); + } + } + void Loop() { + for (;;) { + CaptureSlot *slot; + { + std::unique_lock<std::mutex> lock(sendMutex); + sendReady.wait(lock, [this] { + return stopping || std::any_of(slots.begin(), slots.end(), [](const auto &item) { return item.queued; }); + }); + slot = nullptr; + for (auto &item : slots) if (item.queued && (!slot || item.header.frame_id < slot->header.frame_id)) slot = &item; + if (!slot) return; + slot->queued = false; + } + auto &d = *device; + const auto header = slot->header; + auto &fence = slot->fence; + auto &memory = slot->memory; + auto sharedFd = slot->sharedFd; + int64_t begin = XrTrackingFile::Now(); + VkResult result = d.WaitForFences(d.handle, 1, &fence, VK_TRUE, UINT64_MAX); + int64_t waited = XrTrackingFile::Now(); + VkMappedMemoryRange range{VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE}; range.memory = memory; range.size = VK_WHOLE_SIZE; + if (result == VK_SUCCESS && !gpu) result = d.InvalidateMappedMemoryRanges(d.handle, 1, &range); + int64_t invalidated = XrTrackingFile::Now(); + if (result == VK_SUCCESS && XrTrackingFile::Now() - header.captured_ns < 200000000LL) { + if (gpu) { + uint32_t flags = (format == VK_FORMAT_B8G8R8A8_UNORM || format == VK_FORMAT_B8G8R8A8_SRGB) ? XR_GPU_BGRA : 0; + if (!gpuSender.Send(header, static_cast<uint32_t>(slot - slots.data()), flags)) result = VK_ERROR_DEVICE_LOST; + } else sender.SendShared("/run/droiddeck/" DROIDDECK_XR_FRAME_SOCKET, header, sharedFd); + } + if (header.frame_id % 120 == 0) std::fprintf(stderr, "[droiddeck-vr-layer] WSI ms wait=%.2f invalidate=%.2f shared=%.2f\n", + (waited-begin)/1e6, (invalidated-waited)/1e6, (XrTrackingFile::Now()-invalidated)/1e6); + std::lock_guard<std::mutex> lock(sendMutex); + if (result != VK_SUCCESS || sender.SharedLeaseLost()) { + std::fprintf(stderr, "[droiddeck-vr-layer] WSI buffer quarantined: result=%d leaseLost=%d; restart SteamVR\n", result, sender.SharedLeaseLost()); + failed = true; return; + } + slot->busy = false; + } + } + bool Initialize(VkSwapchainKHR chain, VkQueue queue) { + if (initialized) return true; + if (attempted) return false; + attempted = true; + auto &d = *device; + auto queueFamily = d.queues.find(queue); + if (queueFamily == d.queues.end()) return false; + family = queueFamily->second; + uint32_t count = 0; + if (d.GetSwapchainImagesKHR(d.handle, chain, &count, nullptr) || !count) return false; + images.resize(count); + if (d.GetSwapchainImagesKHR(d.handle, chain, &count, images.data())) return false; + ready.resize(count); + VkSemaphoreCreateInfo semaphoreInfo{VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO}; + for (auto &semaphore : ready) if (d.CreateSemaphore(d.handle, &semaphoreInfo, nullptr, &semaphore)) return false; + XrGpuPoolInfo info; + std::array<int, XR_GPU_SLOTS> fds{{-1, -1, -1}}; + gpu = d.foreign && gpuSender.Connect("/run/droiddeck/" DROIDDECK_XR_GPU_SOCKET, extent.width, extent.height, info, fds); + if (gpu) { + for (unsigned index = 0; index < slots.size(); index++) + if (!slots[index].Initialize(d, extent, format, family, fds[index], info.sizes[index])) { gpu = false; break; } + for (int fd : fds) if (fd >= 0) close(fd); + } + if (!gpu) { + gpuSender.Close(); + for (auto &slot : slots) { slot.Clear(); if (!slot.Initialize(d, extent, format, family)) return false; } + } + sendThread = std::thread([this] { Run(); }); + initialized = true; + std::fprintf(stderr, "[droiddeck-vr-layer] capturing compositor swapchain %ux%u format %d channel=%s\n", extent.width, extent.height, format, gpu ? "gpu" : "cpu"); + return true; + } + VkResult Fail(VkResult result, CaptureSlot &slot) { + std::lock_guard<std::mutex> lock(sendMutex); + failed = true; slot.busy = false; + return result; + } + bool Header(DroidDeckXrFrameHeader &header) { + DroidDeckXrTracking packet{}; + if (!tracking.Read(&packet) || !XrTrackingFile::Fresh(packet)) return false; + header = {}; + header.magic = DROIDDECK_XR_FRAME_MAGIC; header.version = DROIDDECK_XR_FRAME_VERSION; + header.width = extent.width; header.height = extent.height; + header.bytes = extent.width * extent.height * 4; + header.color_space = DROIDDECK_XR_COLOR_SRGB_RGBA8; + header.frame_id = ++frame; header.captured_ns = XrTrackingFile::Now(); + for (int eye = 0; eye < 2; eye++) { + const auto &pose = packet.eyes[eye].pose; + const float x = pose.orientation[0], y = pose.orientation[1], z = pose.orientation[2], w = pose.orientation[3]; + float matrix[3][4] = {{1-2*(y*y+z*z),2*(x*y-w*z),2*(x*z+w*y),pose.position[0]}, + {2*(x*y+w*z),1-2*(x*x+z*z),2*(y*z-w*x),pose.position[1]}, + {2*(x*z-w*y),2*(y*z+w*x),1-2*(x*x+y*y),pose.position[2]}}; + std::memcpy(header.eye_pose[eye], matrix, sizeof(matrix)); + const auto *fov = packet.eyes[eye].fov; + float left = std::tan(fov[0]), right = std::tan(fov[1]), up = std::tan(fov[2]), down = std::tan(fov[3]); + auto &p = header.projection[eye]; + p[0][0] = 2/(right-left); p[0][2] = (right+left)/(right-left); + p[1][1] = 2/(up-down); p[1][2] = (up+down)/(up-down); + p[2][2] = -1; p[2][3] = -0.2f; p[3][2] = -1; + } + return xr_frame_valid(header); + } + VkResult Capture(VkQueue queue, uint32_t index, const VkPresentInfoKHR &present, VkSemaphore *completion) { + auto &d = *device; + if (index >= images.size()) return VK_ERROR_OUT_OF_DATE_KHR; + CaptureSlot *selected = nullptr; + { + std::lock_guard<std::mutex> lock(sendMutex); + if (failed) return VK_ERROR_DEVICE_LOST; + for (auto &slot : slots) if (!slot.busy) { selected = &slot; slot.busy = true; break; } + } + if (!selected) return VK_SUCCESS; + auto &slot = *selected; + DroidDeckXrFrameHeader header{}; + if (!Header(header)) { std::lock_guard<std::mutex> lock(sendMutex); slot.busy = false; return VK_SUCCESS; } + auto &command = slot.command; + auto &buffer = slot.buffer; + auto &fence = slot.fence; + auto &rgbaImage = slot.rgbaImage; + auto &rgbaInitialized = slot.rgbaInitialized; + VkResult result = d.ResetCommandBuffer(command, 0); + if (result) return Fail(result, slot); + VkCommandBufferBeginInfo begin{VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO}; + begin.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + if ((result = d.BeginCommandBuffer(command, &begin))) return Fail(result, slot); + VkImageMemoryBarrier image{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER}; + image.srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT; image.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; + image.oldLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; image.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; + image.srcQueueFamilyIndex = image.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + image.image = images[index]; image.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; + d.CmdPipelineBarrier(command, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image); + VkBufferImageCopy copy{}; copy.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; + copy.imageExtent = {extent.width, extent.height, 1}; + if (!gpu) { + VkImageMemoryBarrier rgba = image; + rgba.image = rgbaImage; rgba.srcAccessMask = rgbaInitialized ? VK_ACCESS_TRANSFER_READ_BIT : 0; + rgba.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; + rgba.oldLayout = rgbaInitialized ? VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL : VK_IMAGE_LAYOUT_UNDEFINED; + rgba.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; + d.CmdPipelineBarrier(command, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, &rgba); + VkImageBlit blit{}; blit.srcSubresource = blit.dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; + blit.srcOffsets[1] = blit.dstOffsets[1] = {static_cast<int32_t>(extent.width), static_cast<int32_t>(extent.height), 1}; + d.CmdBlitImage(command, images[index], VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, rgbaImage, + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &blit, VK_FILTER_NEAREST); + rgba.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; rgba.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; + rgba.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; rgba.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; + d.CmdPipelineBarrier(command, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, &rgba); + } + VkBufferMemoryBarrier ownership{VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER}; + ownership.srcQueueFamilyIndex = VK_QUEUE_FAMILY_FOREIGN_EXT; ownership.dstQueueFamilyIndex = family; + ownership.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; ownership.buffer = buffer; ownership.size = VK_WHOLE_SIZE; + if (gpu) d.CmdPipelineBarrier(command, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, + 0, 0, nullptr, 1, &ownership, 0, nullptr); + d.CmdCopyImageToBuffer(command, gpu ? images[index] : rgbaImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, buffer, 1, ©); + image.srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT; image.dstAccessMask = 0; + image.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; image.newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; + VkBufferMemoryBarrier host{VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER}; + host.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; host.dstAccessMask = VK_ACCESS_HOST_READ_BIT; + host.srcQueueFamilyIndex = host.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; host.buffer = buffer; host.size = VK_WHOLE_SIZE; + if (gpu) { + host.dstAccessMask = 0; host.srcQueueFamilyIndex = family; host.dstQueueFamilyIndex = VK_QUEUE_FAMILY_FOREIGN_EXT; + } + d.CmdPipelineBarrier(command, VK_PIPELINE_STAGE_TRANSFER_BIT, (gpu ? 0 : VK_PIPELINE_STAGE_HOST_BIT) | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, + 0, 0, nullptr, 1, &host, 1, &image); + if ((result = d.EndCommandBuffer(command)) || (result = d.ResetFences(d.handle, 1, &fence))) return Fail(result, slot); + std::vector<VkPipelineStageFlags> stages(present.waitSemaphoreCount, VK_PIPELINE_STAGE_TRANSFER_BIT); + VkSubmitInfo submit{VK_STRUCTURE_TYPE_SUBMIT_INFO}; + submit.waitSemaphoreCount = present.waitSemaphoreCount; submit.pWaitSemaphores = present.pWaitSemaphores; + submit.pWaitDstStageMask = stages.data(); submit.commandBufferCount = 1; submit.pCommandBuffers = &command; + submit.signalSemaphoreCount = 1; submit.pSignalSemaphores = &ready[index]; + if ((result = d.QueueSubmit(queue, 1, &submit, fence))) return Fail(result, slot); + rgbaInitialized = true; + { std::lock_guard<std::mutex> lock(sendMutex); slot.header = header; slot.queued = true; sendReady.notify_all(); } + *completion = ready[index]; + return VK_SUCCESS; + } +}; +std::mutex mutex; +std::unordered_map<VkDevice, std::unique_ptr<Device>> devices; +std::unordered_map<VkSwapchainKHR, std::unique_ptr<Swapchain>> swapchains; +} + +extern "C" void droiddeck_wsi_device(VkDevice device, VkPhysicalDevice physical, VkInstance instance, + PFN_vkGetInstanceProcAddr gipa, PFN_vkGetDeviceProcAddr gdpa, const VkDeviceCreateInfo *create) { + const char *mode = getenv("DROIDDECK_VR_PRESENT"); + if (!mode || strcmp(mode, "questwsi") || strcmp(program_invocation_short_name, "vrcompositor")) return; + auto d = std::make_unique<Device>(); d->handle = device; + d->GetMemoryFdPropertiesKHR = reinterpret_cast<PFN_vkGetMemoryFdPropertiesKHR>(gdpa(device, "vkGetMemoryFdPropertiesKHR")); + for (uint32_t index = 0; index < create->enabledExtensionCount; index++) + if (!strcmp(create->ppEnabledExtensionNames[index], "VK_EXT_queue_family_foreign")) d->foreign = true; +#define LOAD(name) d->name = reinterpret_cast<PFN_vk##name>(gdpa(device, "vk" #name)); if (!d->name) return; + FUNCTIONS(LOAD) +#undef LOAD + auto properties = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties>(gipa(instance, "vkGetPhysicalDeviceMemoryProperties")); + properties(physical, &d->memory); + auto getQueue = reinterpret_cast<PFN_vkGetDeviceQueue>(gdpa(device, "vkGetDeviceQueue")); + for (uint32_t index = 0; index < create->queueCreateInfoCount; index++) { + const auto &info = create->pQueueCreateInfos[index]; + if (info.flags) continue; + for (uint32_t number = 0; number < info.queueCount; number++) { + VkQueue queue{}; getQueue(device, info.queueFamilyIndex, number, &queue); + if (queue) d->queues[queue] = info.queueFamilyIndex; + } + } + std::lock_guard<std::mutex> lock(mutex); devices[device] = std::move(d); +} +extern "C" void droiddeck_wsi_destroy(VkDevice device) { + std::lock_guard<std::mutex> lock(mutex); + for (auto it = swapchains.begin(); it != swapchains.end();) + if (it->second->device->handle == device) it = swapchains.erase(it); else ++it; + devices.erase(device); +} +extern "C" void droiddeck_wsi_swapchain(VkDevice device, VkSwapchainKHR chain, const VkSwapchainCreateInfoKHR *create) { + std::lock_guard<std::mutex> lock(mutex); + auto it = devices.find(device); if (it == devices.end()) return; + if (create->imageFormat != VK_FORMAT_R8G8B8A8_UNORM && create->imageFormat != VK_FORMAT_R8G8B8A8_SRGB && + create->imageFormat != VK_FORMAT_B8G8R8A8_UNORM && create->imageFormat != VK_FORMAT_B8G8R8A8_SRGB) return; + auto chainState = std::make_unique<Swapchain>(); chainState->device = it->second.get(); + chainState->extent = create->imageExtent; chainState->format = create->imageFormat; + swapchains[chain] = std::move(chainState); +} +extern "C" void droiddeck_wsi_forget(VkDevice device, VkSwapchainKHR chain) { + (void)device; std::lock_guard<std::mutex> lock(mutex); swapchains.erase(chain); +} +extern "C" VkResult droiddeck_wsi_present(VkDevice device, VkQueue queue, const VkPresentInfoKHR *present, PFN_vkQueuePresentKHR next) try { + (void)device; std::lock_guard<std::mutex> lock(mutex); + if (present->swapchainCount != 1) return next(queue, present); + auto it = swapchains.find(present->pSwapchains[0]); + if (it == swapchains.end()) return next(queue, present); + if (!it->second->Initialize(present->pSwapchains[0], queue)) return VK_ERROR_INITIALIZATION_FAILED; + auto family = it->second->device->queues.find(queue); + if (family == it->second->device->queues.end() || family->second != it->second->family) + return VK_ERROR_INITIALIZATION_FAILED; + VkSemaphore completion{}; + VkResult result = it->second->Capture(queue, present->pImageIndices[0], *present, &completion); + if (result) return result; + if (!completion) return next(queue, present); + // Reacquiring this swapchain image also proves its previous present wait semaphore is reusable. + VkPresentInfoKHR copy = *present; copy.waitSemaphoreCount = 1; copy.pWaitSemaphores = &completion; + return next(queue, ©); +} catch (...) { + std::fprintf(stderr, "[droiddeck-vr-layer] WSI capture failed; restart SteamVR\n"); + return VK_ERROR_OUT_OF_HOST_MEMORY; +} diff --git a/tools/vr/src/wsi_capture.h b/tools/vr/src/wsi_capture.h new file mode 100644 index 0000000000..d56aab4eac --- /dev/null +++ b/tools/vr/src/wsi_capture.h @@ -0,0 +1,17 @@ +#pragma once +#include <vulkan/vulkan.h> + +#ifdef __cplusplus +extern "C" { +#endif +void droiddeck_wsi_device(VkDevice device, VkPhysicalDevice physical, VkInstance instance, + PFN_vkGetInstanceProcAddr gipa, PFN_vkGetDeviceProcAddr gdpa, + const VkDeviceCreateInfo *create); +void droiddeck_wsi_destroy(VkDevice device); +void droiddeck_wsi_swapchain(VkDevice device, VkSwapchainKHR swapchain, const VkSwapchainCreateInfoKHR *create); +void droiddeck_wsi_forget(VkDevice device, VkSwapchainKHR swapchain); +VkResult droiddeck_wsi_present(VkDevice device, VkQueue queue, const VkPresentInfoKHR *present, + PFN_vkQueuePresentKHR next); +#ifdef __cplusplus +} +#endif diff --git a/tools/vr/src/xr_chaperone.h b/tools/vr/src/xr_chaperone.h new file mode 100644 index 0000000000..146e7735e9 --- /dev/null +++ b/tools/vr/src/xr_chaperone.h @@ -0,0 +1,40 @@ +#pragma once +#include "xr_tracking_file.h" +#include <cmath> +#include <iomanip> +#include <locale> +#include <sstream> +#include <string> + +struct XrSeatedOrigin { + double yaw, translation[3]; +}; + +class XrChaperoneOrigin { +public: + void Reset() { published_ = false; } + template <typename Publish> void Update(const DroidDeckXrTracking &tracking, Publish publish) { + if (!published_ && XrTrackingFile::Fresh(tracking) && XrTrackingFile::Tracked(tracking.head)) + published_ = publish(tracking.head); + } +private: + bool published_ = false; +}; + +inline XrSeatedOrigin xr_seated_origin(const DroidDeckXrPose &head) { + const auto *q = head.orientation; + double yaw = std::atan2(2 * (q[0] * q[2] + q[3] * q[1]), 1 - 2 * (q[0] * q[0] + q[1] * q[1])); + double c = std::cos(yaw), s = std::sin(yaw); + return {-yaw, {-c * head.position[0] + s * head.position[2], -head.position[1], + -s * head.position[0] - c * head.position[2]}}; +} + +inline std::string xr_chaperone_json(const DroidDeckXrPose &head, const char *timestamp) { + auto seated = xr_seated_origin(head); + std::ostringstream json; json.imbue(std::locale::classic()); json << std::setprecision(9); + json << "{\"jsonid\":\"chaperone_info\",\"version\":5,\"time\":\"" << timestamp + << "\",\"universes\":[{\"universeID\":\"2\",\"standing\":{\"translation\":[0,0,0],\"yaw\":0}," + << "\"seated\":{\"translation\":[" << seated.translation[0] << ',' << seated.translation[1] << ',' << seated.translation[2] + << "],\"yaw\":" << seated.yaw << "},\"play_area\":[0,0],\"collision_bounds\":[]}]}"; + return json.str(); +} diff --git a/tools/vr/src/xr_display_mode.cpp b/tools/vr/src/xr_display_mode.cpp new file mode 100644 index 0000000000..f37aca258f --- /dev/null +++ b/tools/vr/src/xr_display_mode.cpp @@ -0,0 +1,11 @@ +#include "xr_display_mode.h" +#include <cstdio> + +int main(int argc, char **argv) { + XrTrackingFile reader(argc > 1 ? argv[1] : "/run/droiddeck/" DROIDDECK_XR_FILE); + DroidDeckXrTracking tracking{}; + if (!reader.Read(&tracking)) return 1; + auto mode = XrDisplayMode(tracking); + if (mode.empty()) return 1; + std::puts(mode.c_str()); +} diff --git a/tools/vr/src/xr_display_mode.h b/tools/vr/src/xr_display_mode.h new file mode 100644 index 0000000000..c8dba6c25e --- /dev/null +++ b/tools/vr/src/xr_display_mode.h @@ -0,0 +1,9 @@ +#pragma once +#include "xr_tracking_file.h" + +inline std::string XrDisplayMode(const DroidDeckXrTracking &tracking) { + if (!XrTrackingFile::Fresh(tracking)) return {}; + auto refresh = static_cast<uint32_t>(std::llround(1000000000.0 / tracking.period_ns)); + return std::to_string(tracking.eyes[0].width * 2) + "x" + std::to_string(tracking.eyes[0].height) + + "@" + std::to_string(refresh); +} diff --git a/tools/vr/src/xr_frame.h b/tools/vr/src/xr_frame.h new file mode 100644 index 0000000000..05e1c8e166 --- /dev/null +++ b/tools/vr/src/xr_frame.h @@ -0,0 +1,53 @@ +#pragma once +#include <stdint.h> +#include <cmath> + +#define DROIDDECK_XR_FRAME_MAGIC 0x46584444u +#define DROIDDECK_XR_FRAME_VERSION 1u +#define DROIDDECK_XR_FRAME_SHARED_VERSION 2u +#define DROIDDECK_XR_FRAME_SOCKET "droiddeck-xr-frames" +#define DROIDDECK_XR_FRAME_MAX_BYTES (64u * 1024u * 1024u) +#define DROIDDECK_XR_COLOR_LINEAR_RGBA8 1u +#define DROIDDECK_XR_COLOR_SRGB_RGBA8 2u + +struct DroidDeckXrFrameHeader { + uint32_t magic, version, width, height; + uint64_t frame_id; + int64_t captured_ns; + uint32_t bytes, color_space; + float eye_pose[2][3][4]; + float projection[2][4][4]; +}; + +static_assert(sizeof(DroidDeckXrFrameHeader) == 264, "XR frame protocol layout"); + +inline bool xr_frame_valid(const DroidDeckXrFrameHeader &header) { + uint64_t bytes = (uint64_t)header.width * header.height * 4; + if (header.magic != DROIDDECK_XR_FRAME_MAGIC || (header.version != DROIDDECK_XR_FRAME_VERSION + && header.version != DROIDDECK_XR_FRAME_SHARED_VERSION) + || !header.frame_id || header.width < 2 || (header.width & 1u) || !header.height + || header.width > 8192 || header.height > 4096 || bytes > DROIDDECK_XR_FRAME_MAX_BYTES + || header.bytes != bytes || (header.color_space != DROIDDECK_XR_COLOR_LINEAR_RGBA8 + && header.color_space != DROIDDECK_XR_COLOR_SRGB_RGBA8) || header.captured_ns <= 0) return false; + for (int eye = 0; eye < 2; eye++) { + for (const auto &row : header.eye_pose[eye]) for (float value : row) if (!std::isfinite(value)) return false; + for (const auto &row : header.projection[eye]) for (float value : row) if (!std::isfinite(value)) return false; + const auto &projection = header.projection[eye]; + if (projection[0][0] < 0.0001f || projection[1][1] < 0.0001f + || std::abs(projection[3][2] + 1.f) > 0.0001f || std::abs(projection[3][3]) > 0.0001f + || std::abs(projection[3][0]) > 0.0001f || std::abs(projection[3][1]) > 0.0001f + || std::abs(projection[0][1]) > 0.0001f || std::abs(projection[0][3]) > 0.0001f + || std::abs(projection[1][0]) > 0.0001f || std::abs(projection[1][3]) > 0.0001f) return false; + for (int row = 0; row < 3; row++) for (int other = 0; other < 3; other++) { + float product = 0; + for (int column = 0; column < 3; column++) product += header.eye_pose[eye][row][column] * header.eye_pose[eye][other][column]; + if (std::abs(product - (row == other ? 1.f : 0.f)) > 0.01f) return false; + } + const auto &rotation = header.eye_pose[eye]; + float determinant = rotation[0][0] * (rotation[1][1] * rotation[2][2] - rotation[1][2] * rotation[2][1]) + - rotation[0][1] * (rotation[1][0] * rotation[2][2] - rotation[1][2] * rotation[2][0]) + + rotation[0][2] * (rotation[1][0] * rotation[2][1] - rotation[1][1] * rotation[2][0]); + if (std::abs(determinant - 1.f) > 0.01f) return false; + } + return true; +} diff --git a/tools/vr/src/xr_frame_channel.h b/tools/vr/src/xr_frame_channel.h new file mode 100644 index 0000000000..36e5cb8fd3 --- /dev/null +++ b/tools/vr/src/xr_frame_channel.h @@ -0,0 +1,289 @@ +#pragma once +#include "xr_frame.h" +#include <atomic> +#include <cerrno> +#include <cstring> +#include <mutex> +#include <string> +#include <thread> +#include <vector> +#include <poll.h> +#include <fcntl.h> +#include <sys/file.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/mman.h> +#include <sys/ioctl.h> +#include <linux/dma-buf.h> +#include <sys/un.h> +#include <time.h> +#include <unistd.h> + +inline int64_t xr_frame_now() { + timespec now{}; clock_gettime(CLOCK_MONOTONIC, &now); + return (int64_t)now.tv_sec * 1000000000LL + now.tv_nsec; +} + +inline bool xr_frame_io(int descriptor, void *data, size_t size, bool write, int64_t deadline) { + auto *bytes = static_cast<unsigned char *>(data); + while (size) { + int64_t remaining = deadline - xr_frame_now(); + if (remaining <= 0) return false; + pollfd ready{descriptor, (short)(write ? POLLOUT : POLLIN), 0}; + int result = poll(&ready, 1, (int)((remaining + 999999) / 1000000)); + if (result < 0 && errno == EINTR) continue; + if (result <= 0 || !(ready.revents & ready.events)) return false; + ssize_t done = write ? send(descriptor, bytes, size, MSG_NOSIGNAL | MSG_DONTWAIT) + : recv(descriptor, bytes, size, MSG_DONTWAIT); + if (done < 0 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)) continue; + if (done <= 0) return false; + bytes += done; size -= done; + } + return true; +} + +inline bool xr_frame_peer(int descriptor) { + struct { pid_t pid; uid_t uid; gid_t gid; } peer{}; + socklen_t size = sizeof(peer); + return getsockopt(descriptor, SOL_SOCKET, SO_PEERCRED, &peer, &size) == 0 + && size == sizeof(peer) && peer.uid == getuid(); +} + +struct XrFrameDescriptor { + int fd = -1; + ~XrFrameDescriptor() { if (fd >= 0) close(fd); } + XrFrameDescriptor() = default; + XrFrameDescriptor(const XrFrameDescriptor &) = delete; + XrFrameDescriptor &operator=(const XrFrameDescriptor &) = delete; +}; + +inline bool xr_frame_header(int socket, DroidDeckXrFrameHeader &header, XrFrameDescriptor &shared, int64_t deadline) { + for (;;) { + int64_t remaining = deadline - xr_frame_now(); + if (remaining <= 0) return false; + pollfd ready{socket, POLLIN, 0}; + int result = poll(&ready, 1, (int)((remaining + 999999) / 1000000)); + if (result < 0 && errno == EINTR) continue; + if (result <= 0 || !(ready.revents & POLLIN)) return false; + alignas(cmsghdr) unsigned char control[CMSG_SPACE(8 * sizeof(int))]{}; + iovec data{&header, sizeof(header)}; + msghdr message{}; message.msg_iov = &data; message.msg_iovlen = 1; + message.msg_control = control; message.msg_controllen = sizeof(control); + ssize_t bytes = recvmsg(socket, &message, MSG_DONTWAIT | MSG_CMSG_CLOEXEC); + if (bytes < 0 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)) continue; + if (bytes <= 0) return false; + unsigned count = 0; + for (auto *item = CMSG_FIRSTHDR(&message); item; item = CMSG_NXTHDR(&message, item)) { + if (item->cmsg_level != SOL_SOCKET || item->cmsg_type != SCM_RIGHTS) continue; + size_t descriptors = (item->cmsg_len - CMSG_LEN(0)) / sizeof(int); + auto *fds = reinterpret_cast<int *>(CMSG_DATA(item)); + for (size_t index = 0; index < descriptors; index++) { + if (++count == 1) shared.fd = fds[index]; else close(fds[index]); + } + } + if ((message.msg_flags & (MSG_CTRUNC | MSG_TRUNC)) || count > 1) return false; + return xr_frame_io(socket, reinterpret_cast<unsigned char *>(&header) + bytes, sizeof(header) - bytes, false, deadline); + } +} + +inline bool xr_frame_shared_pixels(int descriptor, unsigned char *pixels, size_t bytes) { + struct stat status{}; + if (fstat(descriptor, &status) != 0 || status.st_size < static_cast<int64_t>(bytes)) return false; + dma_buf_sync sync{DMA_BUF_SYNC_START | DMA_BUF_SYNC_READ}; + if (ioctl(descriptor, DMA_BUF_IOCTL_SYNC, &sync) != 0) return false; + void *mapping = mmap(nullptr, bytes, PROT_READ, MAP_SHARED, descriptor, 0); + bool success = mapping != MAP_FAILED; + if (success) { std::memcpy(pixels, mapping, bytes); munmap(mapping, bytes); } + sync.flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_READ; + return ioctl(descriptor, DMA_BUF_IOCTL_SYNC, &sync) == 0 && success; +} + +struct DroidDeckXrPixels { + DroidDeckXrFrameHeader header{}; + std::vector<unsigned char> pixels; +}; + +class XrFrameReceiver { +public: + ~XrFrameReceiver() { Stop(); } + bool Start(const std::string &filename) { + if (listener_ >= 0 || filename.empty() || filename.size() >= sizeof(sockaddr_un::sun_path)) return false; + lock_ = open((filename + ".lock").c_str(), O_CREAT | O_RDWR | O_CLOEXEC | O_NOFOLLOW, 0600); + struct stat status{}; + if (lock_ < 0) return false; + if (fstat(lock_, &status) != 0 || !S_ISREG(status.st_mode) || status.st_uid != getuid() + || flock(lock_, LOCK_EX | LOCK_NB) != 0) { close(lock_); lock_ = -1; return false; } + if (lstat(filename.c_str(), &status) == 0) { + if (!S_ISSOCK(status.st_mode) || status.st_uid != getuid() || unlink(filename.c_str()) != 0) { + close(lock_); lock_ = -1; return false; + } + } else if (errno != ENOENT) { close(lock_); lock_ = -1; return false; } + sockaddr_un address{}; address.sun_family = AF_UNIX; + std::strcpy(address.sun_path, filename.c_str()); + listener_ = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); + if (listener_ < 0) { Stop(); return false; } + if (bind(listener_, reinterpret_cast<sockaddr *>(&address), sizeof(address)) != 0) { Stop(); return false; } + filename_ = filename; + if (chmod(filename.c_str(), 0600) != 0 || listen(listener_, 2) != 0) { Stop(); return false; } + { std::lock_guard<std::mutex> lock(mutex_); pending_ = {}; } + received_ = rejected_ = 0; + stopping_ = false; + thread_ = std::thread([this] { Loop(); }); + return true; + } + void Stop() { + stopping_ = true; + if (thread_.joinable()) thread_.join(); + if (listener_ >= 0) close(listener_); + listener_ = -1; + if (!filename_.empty()) unlink(filename_.c_str()); + filename_.clear(); + if (lock_ >= 0) close(lock_); + lock_ = -1; + std::lock_guard<std::mutex> lock(mutex_); + pending_ = {}; recycled_.clear(); + } + bool Take(DroidDeckXrPixels *out) { + std::lock_guard<std::mutex> lock(mutex_); + if (pending_.pixels.empty()) return false; + *out = std::move(pending_); + pending_ = {}; + return true; + } + void Recycle(std::vector<unsigned char> pixels) { + std::lock_guard<std::mutex> lock(mutex_); + if (recycled_.size() < 3) recycled_.push_back(std::move(pixels)); + } + uint64_t Rejected() const { return rejected_; } + uint64_t Received() const { return received_; } +private: + int listener_ = -1; + int lock_ = -1; + std::string filename_; + std::atomic<bool> stopping_{false}; + std::atomic<uint64_t> rejected_{0}, received_{0}; + std::thread thread_; + std::mutex mutex_; + DroidDeckXrPixels pending_; + std::vector<std::vector<unsigned char>> recycled_; + void Loop() { + while (!stopping_) { + pollfd ready{listener_, POLLIN, 0}; + if (poll(&ready, 1, 50) <= 0) continue; + int client = accept4(listener_, nullptr, nullptr, SOCK_CLOEXEC | SOCK_NONBLOCK); + if (client < 0) continue; + if (!xr_frame_peer(client)) { rejected_++; close(client); continue; } + uint64_t lastFrame = 0; + while (!stopping_) { + pollfd idle{client, POLLIN, 0}; + int available; + do { + available = poll(&idle, 1, 50); + } while (!stopping_ && (available == 0 || (available < 0 && errno == EINTR))); + if (stopping_ || available <= 0 || !(idle.revents & POLLIN)) break; + DroidDeckXrPixels frame; + XrFrameDescriptor shared; + int64_t deadline = xr_frame_now() + 200000000LL; + if (!xr_frame_header(client, frame.header, shared, deadline)) break; + int64_t now = xr_frame_now(); + if (!xr_frame_valid(frame.header) || frame.header.captured_ns > now + || now - frame.header.captured_ns > 500000000LL || frame.header.frame_id <= lastFrame + || (frame.header.version == DROIDDECK_XR_FRAME_SHARED_VERSION) != (shared.fd >= 0)) { rejected_++; break; } + try { + { + std::lock_guard<std::mutex> lock(mutex_); + if (!recycled_.empty()) { + frame.pixels = std::move(recycled_.back()); recycled_.pop_back(); + } + } + frame.pixels.resize(frame.header.bytes); + } + catch (...) { rejected_++; break; } + deadline = xr_frame_now() + 200000000LL; + bool copied = shared.fd >= 0 ? xr_frame_shared_pixels(shared.fd, frame.pixels.data(), frame.pixels.size()) + : xr_frame_io(client, frame.pixels.data(), frame.pixels.size(), false, deadline); + if (!copied) { rejected_++; break; } + if (xr_frame_now() - frame.header.captured_ns > 500000000LL) { rejected_++; break; } + uint64_t acknowledgement = frame.header.frame_id; + lastFrame = acknowledgement; + { + std::lock_guard<std::mutex> lock(mutex_); + if (!pending_.pixels.empty() && recycled_.size() < 3) recycled_.push_back(std::move(pending_.pixels)); + pending_ = std::move(frame); + } + received_++; + if (!xr_frame_io(client, &acknowledgement, sizeof(acknowledgement), true, deadline)) break; + } + close(client); + } + } +}; + +class XrFrameSender { +public: + XrFrameSender() = default; + XrFrameSender(const XrFrameSender &) = delete; + XrFrameSender &operator=(const XrFrameSender &) = delete; + ~XrFrameSender() { Disconnect(); } + bool Send(const std::string &filename, const DroidDeckXrFrameHeader &header, const unsigned char *pixels) { + return SendFrame(filename, header, pixels, -1); + } + bool SendShared(const std::string &filename, DroidDeckXrFrameHeader header, int shared) { + if (shared < 0 || sharedLeaseLost_) return false; + header.version = DROIDDECK_XR_FRAME_SHARED_VERSION; + return SendFrame(filename, header, nullptr, shared); + } + bool SharedLeaseLost() const { return sharedLeaseLost_; } +private: + int descriptor_ = -1; + bool sharedLeaseLost_ = false; + std::string filename_; + bool SendFrame(const std::string &filename, const DroidDeckXrFrameHeader &header, const unsigned char *pixels, int shared) { + if ((!pixels && shared < 0) || !xr_frame_valid(header) || filename.empty() + || filename.size() >= sizeof(sockaddr_un::sun_path) + || (header.version == DROIDDECK_XR_FRAME_SHARED_VERSION) != (shared >= 0)) return false; + if (filename_ != filename) Disconnect(); + int64_t deadline = xr_frame_now() + 200000000LL; + if (descriptor_ < 0) { + sockaddr_un address{}; address.sun_family = AF_UNIX; + std::strcpy(address.sun_path, filename.c_str()); + descriptor_ = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); + if (descriptor_ < 0) return false; + int result = connect(descriptor_, reinterpret_cast<sockaddr *>(&address), sizeof(address)); + if (result != 0 && errno == EINPROGRESS) { + pollfd ready{descriptor_, POLLOUT, 0}; + int error = 0; socklen_t size = sizeof(error); + result = poll(&ready, 1, 200) > 0 && getsockopt(descriptor_, SOL_SOCKET, SO_ERROR, &error, &size) == 0 + && error == 0 ? 0 : -1; + } + if (result != 0 || !xr_frame_peer(descriptor_)) { + Disconnect(); return false; + } + filename_ = filename; + } + uint64_t acknowledgement = 0; + bool sent = false; + if (shared >= 0) { + iovec data{const_cast<DroidDeckXrFrameHeader *>(&header), sizeof(header)}; + alignas(cmsghdr) unsigned char control[CMSG_SPACE(sizeof(int))]{}; + msghdr message{}; message.msg_iov = &data; message.msg_iovlen = 1; + message.msg_control = control; message.msg_controllen = sizeof(control); + auto *item = CMSG_FIRSTHDR(&message); item->cmsg_level = SOL_SOCKET; item->cmsg_type = SCM_RIGHTS; + item->cmsg_len = CMSG_LEN(sizeof(int)); std::memcpy(CMSG_DATA(item), &shared, sizeof(shared)); + ssize_t bytes; + do { bytes = sendmsg(descriptor_, &message, MSG_NOSIGNAL | MSG_DONTWAIT); } while (bytes < 0 && errno == EINTR); + if (bytes > 0) { + sharedLeaseLost_ = true; + sent = xr_frame_io(descriptor_, reinterpret_cast<unsigned char *>(data.iov_base) + bytes, + sizeof(header) - bytes, true, deadline); + } + } else sent = xr_frame_io(descriptor_, const_cast<DroidDeckXrFrameHeader *>(&header), sizeof(header), true, deadline) + && xr_frame_io(descriptor_, const_cast<unsigned char *>(pixels), header.bytes, true, deadline); + if (!sent + || !xr_frame_io(descriptor_, &acknowledgement, sizeof(acknowledgement), false, deadline) + || acknowledgement != header.frame_id) { Disconnect(); return false; } + sharedLeaseLost_ = false; + return true; + } + void Disconnect() { if (descriptor_ >= 0) close(descriptor_); descriptor_ = -1; filename_.clear(); } +}; diff --git a/tools/vr/src/xr_frame_math.h b/tools/vr/src/xr_frame_math.h new file mode 100644 index 0000000000..a78de79871 --- /dev/null +++ b/tools/vr/src/xr_frame_math.h @@ -0,0 +1,57 @@ +#pragma once +#include "xr_frame.h" + +struct DroidDeckXrRenderView { + float orientation[4]; + float position[3]; + float fov[4]; +}; + +inline void xr_frame_projection_raw(const float fov[4], float *left, float *right, float *top, float *bottom) { + *left = std::tan(fov[0]); *right = std::tan(fov[1]); + // OpenVR's top/bottom parameters are the lower/upper Y bounds in its projection formula. + *top = std::tan(fov[3]); *bottom = std::tan(fov[2]); +} + +inline void xr_frame_eye_pose(float result[3][4], const float head[3][4], const float eyeToHead[3][4]) { + for (int row = 0; row < 3; row++) { + for (int column = 0; column < 3; column++) { + result[row][column] = 0; + for (int inner = 0; inner < 3; inner++) result[row][column] += head[row][inner] * eyeToHead[inner][column]; + } + result[row][3] = head[row][3]; + for (int inner = 0; inner < 3; inner++) result[row][3] += head[row][inner] * eyeToHead[inner][3]; + } +} + +inline DroidDeckXrRenderView xr_frame_view(const DroidDeckXrFrameHeader &header, int eye) { + const auto &matrix = header.eye_pose[eye]; + DroidDeckXrRenderView view{}; + float trace = matrix[0][0] + matrix[1][1] + matrix[2][2]; + if (trace > 0) { + float scale = std::sqrt(trace + 1.f) * 2.f; + view.orientation[3] = scale * 0.25f; + view.orientation[0] = (matrix[2][1] - matrix[1][2]) / scale; + view.orientation[1] = (matrix[0][2] - matrix[2][0]) / scale; + view.orientation[2] = (matrix[1][0] - matrix[0][1]) / scale; + } else { + int axis = matrix[1][1] > matrix[0][0] ? 1 : 0; + if (matrix[2][2] > matrix[axis][axis]) axis = 2; + int next = (axis + 1) % 3, last = (axis + 2) % 3; + float scale = std::sqrt(1.f + matrix[axis][axis] - matrix[next][next] - matrix[last][last]) * 2.f; + view.orientation[axis] = scale * 0.25f; + view.orientation[next] = (matrix[axis][next] + matrix[next][axis]) / scale; + view.orientation[last] = (matrix[axis][last] + matrix[last][axis]) / scale; + view.orientation[3] = (matrix[last][next] - matrix[next][last]) / scale; + } + float lengthSquared = 0; + for (float value : view.orientation) lengthSquared += value * value; + for (float &value : view.orientation) value /= std::sqrt(lengthSquared); + for (int axis = 0; axis < 3; axis++) view.position[axis] = matrix[axis][3]; + const auto &projection = header.projection[eye]; + view.fov[0] = std::atan((projection[0][2] - 1.f) / projection[0][0]); + view.fov[1] = std::atan((projection[0][2] + 1.f) / projection[0][0]); + view.fov[2] = std::atan((projection[1][2] + 1.f) / projection[1][1]); + view.fov[3] = std::atan((projection[1][2] - 1.f) / projection[1][1]); + return view; +} diff --git a/tools/vr/src/xr_gpu_channel.h b/tools/vr/src/xr_gpu_channel.h new file mode 100644 index 0000000000..8735d3dc5d --- /dev/null +++ b/tools/vr/src/xr_gpu_channel.h @@ -0,0 +1,118 @@ +#pragma once +#include "xr_frame_channel.h" +#include <array> + +#define DROIDDECK_XR_GPU_SOCKET "droiddeck-xr-gpu" +constexpr uint32_t XR_GPU_MAGIC = 0x47584444u; +constexpr uint32_t XR_GPU_VERSION = 1; +constexpr unsigned XR_GPU_SLOTS = 3; +constexpr uint32_t XR_GPU_BGRA = 1; + +struct XrGpuRequest { uint32_t magic = XR_GPU_MAGIC, version = XR_GPU_VERSION, width{}, height{}; }; +struct XrGpuPoolInfo { + uint32_t magic = XR_GPU_MAGIC, version = XR_GPU_VERSION, width{}, height{}; + uint64_t sizes[XR_GPU_SLOTS]{}; +}; +struct XrGpuFrame { DroidDeckXrFrameHeader header{}; uint32_t slot{}, flags{}; }; +static_assert(sizeof(XrGpuRequest) == 16 && sizeof(XrGpuPoolInfo) == 40 && sizeof(XrGpuFrame) == 272, + "XR GPU protocol layout"); + +inline bool xr_gpu_dimensions(uint32_t width, uint32_t height) { + return width >= 2 && !(width & 1) && height && width <= 8192 && height <= 4096 + && uint64_t(width) * height * 4 <= DROIDDECK_XR_FRAME_MAX_BYTES; +} + +enum class XrGpuFrameState { Invalid, Stale, Ready }; +inline XrGpuFrameState xr_gpu_frame_state(const XrGpuFrame &frame, uint32_t width, uint32_t height, + uint64_t previous, int64_t now) { + if (frame.slot >= XR_GPU_SLOTS || (frame.flags & ~XR_GPU_BGRA) || !xr_frame_valid(frame.header) + || frame.header.width != width || frame.header.height != height || frame.header.frame_id <= previous + || frame.header.captured_ns > now + 100000000LL) return XrGpuFrameState::Invalid; + return now - frame.header.captured_ns > 200000000LL ? XrGpuFrameState::Stale : XrGpuFrameState::Ready; +} + +// SEQPACKET keeps descriptor transfer and its metadata in one indivisible message. +inline bool xr_gpu_send(int socket, const void *data, size_t size, const int *fds = nullptr, unsigned count = 0) { + if (count > XR_GPU_SLOTS) return false; + iovec bytes{const_cast<void *>(data), size}; + alignas(cmsghdr) unsigned char control[CMSG_SPACE(XR_GPU_SLOTS * sizeof(int))]{}; + msghdr message{}; message.msg_iov = &bytes; message.msg_iovlen = 1; + if (count) { + message.msg_control = control; message.msg_controllen = CMSG_SPACE(count * sizeof(int)); + auto *item = CMSG_FIRSTHDR(&message); item->cmsg_level = SOL_SOCKET; item->cmsg_type = SCM_RIGHTS; + item->cmsg_len = CMSG_LEN(count * sizeof(int)); std::memcpy(CMSG_DATA(item), fds, count * sizeof(int)); + } + ssize_t result; + do { result = sendmsg(socket, &message, MSG_NOSIGNAL | MSG_DONTWAIT); } while (result < 0 && errno == EINTR); + return result == static_cast<ssize_t>(size); +} + +inline bool xr_gpu_receive(int socket, void *data, size_t size, int *fds = nullptr, unsigned count = 0) { + if (count > XR_GPU_SLOTS) return false; + iovec bytes{data, size}; + alignas(cmsghdr) unsigned char control[CMSG_SPACE(16 * sizeof(int))]{}; + msghdr message{}; message.msg_iov = &bytes; message.msg_iovlen = 1; + message.msg_control = control; message.msg_controllen = sizeof(control); + ssize_t result; + do { result = recvmsg(socket, &message, MSG_DONTWAIT | MSG_CMSG_CLOEXEC); } while (result < 0 && errno == EINTR); + unsigned received = 0; + std::array<int, XR_GPU_SLOTS> owned{{-1, -1, -1}}; + for (auto *item = CMSG_FIRSTHDR(&message); result >= 0 && item; item = CMSG_NXTHDR(&message, item)) { + if (item->cmsg_level != SOL_SOCKET || item->cmsg_type != SCM_RIGHTS) continue; + auto *handles = reinterpret_cast<int *>(CMSG_DATA(item)); + for (unsigned index = 0; index < (item->cmsg_len - CMSG_LEN(0)) / sizeof(int); index++) { + if (received < owned.size()) owned[received] = handles[index]; else close(handles[index]); + received++; + } + } + bool valid = result == static_cast<ssize_t>(size) && !(message.msg_flags & (MSG_TRUNC | MSG_CTRUNC)) && received == count; + for (unsigned index = 0; index < owned.size(); index++) { + if (valid && index < count) fds[index] = owned[index]; + else if (owned[index] >= 0) close(owned[index]); + } + return valid; +} + +inline bool xr_gpu_wait(int socket, int timeout) { + pollfd ready{socket, POLLIN, 0}; + int result; + do { result = poll(&ready, 1, timeout); } while (result < 0 && errno == EINTR); + return result > 0 && (ready.revents & POLLIN); +} + +class XrGpuSender { +public: + ~XrGpuSender() { Close(); } + bool Connect(const char *filename, uint32_t width, uint32_t height, XrGpuPoolInfo &pool, + std::array<int, XR_GPU_SLOTS> &fds) { + Close(); + if (!xr_gpu_dimensions(width, height) || !filename || strlen(filename) >= sizeof(sockaddr_un::sun_path)) return false; + socket_ = socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); + if (socket_ < 0) return false; + sockaddr_un address{}; address.sun_family = AF_UNIX; std::strcpy(address.sun_path, filename); + if (connect(socket_, reinterpret_cast<sockaddr *>(&address), sizeof(address)) || !xr_frame_peer(socket_)) { Close(); return false; } + XrGpuRequest request; request.width = width; request.height = height; + if (!xr_gpu_send(socket_, &request, sizeof(request)) || !xr_gpu_wait(socket_, 2000) + || !xr_gpu_receive(socket_, &pool, sizeof(pool), fds.data(), fds.size())) { Close(); return false; } + bool valid = pool.magic == XR_GPU_MAGIC && pool.version == XR_GPU_VERSION && pool.width == width && pool.height == height; + const uint64_t bytes = uint64_t(width) * height * 4; + for (unsigned index = 0; index < fds.size(); index++) { + struct stat status{}; + if (fstat(fds[index], &status) || pool.sizes[index] < bytes || pool.sizes[index] > bytes + 65536 + || status.st_size != static_cast<int64_t>(pool.sizes[index])) valid = false; + } + if (!valid) { for (int &fd : fds) { close(fd); fd = -1; } Close(); } + return valid; + } + bool Send(const DroidDeckXrFrameHeader &header, uint32_t slot, uint32_t flags = 0) { + if (socket_ < 0 || slot >= XR_GPU_SLOTS || (flags & ~XR_GPU_BGRA) || !xr_frame_valid(header)) return false; + XrGpuFrame frame; frame.header = header; frame.slot = slot; frame.flags = flags; + uint64_t ack{}; + if (!xr_gpu_send(socket_, &frame, sizeof(frame)) || !xr_gpu_wait(socket_, 5000) + || !xr_gpu_receive(socket_, &ack, sizeof(ack)) || ack != header.frame_id) { Close(); return false; } + return true; + } + void Close() { if (socket_ >= 0) close(socket_); socket_ = -1; } +private: + int socket_ = -1; +}; diff --git a/tools/vr/src/xr_touch_input.h b/tools/vr/src/xr_touch_input.h new file mode 100644 index 0000000000..496ce58306 --- /dev/null +++ b/tools/vr/src/xr_touch_input.h @@ -0,0 +1,33 @@ +#pragma once +#include "xr_tracking.h" +#include <algorithm> +#include <cmath> + +struct XrTouchInput { + float trigger = 0, grip = 0, stickX = 0, stickY = 0; + bool triggerClick = false, gripClick = false, stickClick = false; + bool primaryClick = false, secondaryClick = false, systemClick = false; + bool triggerTouch = false, stickTouch = false, primaryTouch = false, secondaryTouch = false, thumbrestTouch = false; +}; + +inline XrTouchInput xr_touch_input(const DroidDeckXrHand &hand, bool right) { + XrTouchInput input; + if (!hand.active) return input; + auto scalar = [](float value, float minimum) { return std::isfinite(value) ? std::clamp(value, minimum, 1.f) : 0.f; }; + input.trigger = scalar(hand.trigger, 0); + input.grip = scalar(hand.squeeze, 0); + input.stickX = scalar(hand.stick[0], -1); + input.stickY = scalar(hand.stick[1], -1); + input.triggerClick = input.trigger > 0.6f; + input.gripClick = input.grip > 0.6f; + input.stickClick = hand.buttons & DROIDDECK_XR_STICK_CLICK; + input.primaryClick = hand.buttons & DROIDDECK_XR_PRIMARY_CLICK; + input.secondaryClick = hand.buttons & DROIDDECK_XR_SECONDARY_CLICK; + input.systemClick = !right && (hand.buttons & DROIDDECK_XR_MENU_CLICK); + input.triggerTouch = hand.buttons & DROIDDECK_XR_TRIGGER_TOUCH; + input.stickTouch = hand.buttons & DROIDDECK_XR_STICK_TOUCH; + input.primaryTouch = hand.buttons & DROIDDECK_XR_PRIMARY_TOUCH; + input.secondaryTouch = hand.buttons & DROIDDECK_XR_SECONDARY_TOUCH; + input.thumbrestTouch = hand.buttons & DROIDDECK_XR_THUMBREST_TOUCH; + return input; +} diff --git a/tools/vr/src/xr_tracking.h b/tools/vr/src/xr_tracking.h new file mode 100644 index 0000000000..aa864fa4a8 --- /dev/null +++ b/tools/vr/src/xr_tracking.h @@ -0,0 +1,59 @@ +#pragma once +#include <stdint.h> + +#define DROIDDECK_XR_MAGIC 0x52584444u +#define DROIDDECK_XR_VERSION 1u +#define DROIDDECK_XR_FILE "droiddeck-xr-tracking" +#define DROIDDECK_XR_STICK_CLICK (1u << 0) +#define DROIDDECK_XR_PRIMARY_CLICK (1u << 1) +#define DROIDDECK_XR_SECONDARY_CLICK (1u << 2) +#define DROIDDECK_XR_MENU_CLICK (1u << 3) +#define DROIDDECK_XR_TRIGGER_TOUCH (1u << 4) +#define DROIDDECK_XR_STICK_TOUCH (1u << 5) +#define DROIDDECK_XR_PRIMARY_TOUCH (1u << 6) +#define DROIDDECK_XR_SECONDARY_TOUCH (1u << 7) +#define DROIDDECK_XR_THUMBREST_TOUCH (1u << 8) + +struct DroidDeckXrPose { + float orientation[4]; + float position[3]; + uint32_t flags; +}; + +struct DroidDeckXrEye { + DroidDeckXrPose pose; + float fov[4]; + uint32_t width, height; +}; + +struct DroidDeckXrHand { + DroidDeckXrPose pose; + float trigger, squeeze, stick[2]; + uint32_t buttons, active; +}; + +struct DroidDeckXrTracking { + uint32_t magic, version, seq, active; + int64_t sampled_ns, predicted_ns, period_ns; + DroidDeckXrPose head; + DroidDeckXrEye eyes[2]; + DroidDeckXrHand hands[2]; +}; + +static_assert(sizeof(DroidDeckXrTracking) == 296, "XR tracking IPC layout"); + +#define DROIDDECK_XR_HAPTIC_MAGIC 0x48584444u +#define DROIDDECK_XR_HAPTIC_FILE "droiddeck-xr-haptics" + +struct DroidDeckXrPulse { + uint64_t id; + int64_t duration_ns; + float amplitude, frequency; +}; + +struct DroidDeckXrHaptics { + uint32_t magic, version, seq, reserved; + DroidDeckXrPulse hands[2]; +}; + +static_assert(sizeof(DroidDeckXrHaptics) == 64, "XR haptics IPC layout"); diff --git a/tools/vr/src/xr_tracking_file.h b/tools/vr/src/xr_tracking_file.h new file mode 100644 index 0000000000..1b122d412d --- /dev/null +++ b/tools/vr/src/xr_tracking_file.h @@ -0,0 +1,68 @@ +#pragma once +#include "xr_tracking.h" +#include <cstring> +#include <cmath> +#include <mutex> +#include <string> +#include <fcntl.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <time.h> +#include <unistd.h> + +class XrTrackingFile { +public: + explicit XrTrackingFile(const char *path = "/run/droiddeck/" DROIDDECK_XR_FILE) : path_(path) {} + ~XrTrackingFile() { if (mapping_) munmap(mapping_, sizeof(*mapping_)); } + bool Read(DroidDeckXrTracking *packet) { + std::lock_guard<std::mutex> lock(mutex_); + if (!mapping_) { + int descriptor = open(path_.c_str(), O_RDONLY | O_CLOEXEC); + if (descriptor < 0) return false; + struct stat status{}; + if (fstat(descriptor, &status) != 0 || status.st_size != sizeof(*mapping_)) { + close(descriptor); return false; + } + void *mapping = mmap(nullptr, sizeof(*mapping_), PROT_READ, MAP_SHARED, descriptor, 0); + close(descriptor); + if (mapping == MAP_FAILED) return false; + mapping_ = static_cast<DroidDeckXrTracking *>(mapping); + } + for (int attempt = 0; attempt < 8; attempt++) { + uint32_t sequence = __atomic_load_n(&mapping_->seq, __ATOMIC_ACQUIRE); + if (sequence & 1u) continue; + std::memcpy(packet, mapping_, sizeof(*packet)); + __atomic_thread_fence(__ATOMIC_ACQUIRE); + if (__atomic_load_n(&mapping_->seq, __ATOMIC_RELAXED) == sequence) + return packet->magic == DROIDDECK_XR_MAGIC && packet->version == DROIDDECK_XR_VERSION; + } + return false; + } + static int64_t Now() { + timespec now{}; clock_gettime(CLOCK_MONOTONIC, &now); + return (int64_t)now.tv_sec * 1000000000LL + now.tv_nsec; + } + static double PoseTimeOffset(int64_t predicted, int64_t now) { + return predicted > 0 ? (static_cast<double>(predicted) - static_cast<double>(now)) / 1000000000.0 : 0; + } + static bool Fresh(const DroidDeckXrTracking &packet) { + int64_t age = Now() - packet.sampled_ns; + return packet.active && age >= 0 && age < 500000000LL && packet.period_ns >= 1000000LL + && packet.period_ns <= 50000000LL && packet.eyes[0].width > 0 && packet.eyes[0].width <= 8192 + && packet.eyes[0].height > 0 && packet.eyes[0].height <= 8192; + } + static bool Tracked(const DroidDeckXrPose &pose) { + if ((pose.flags & 15u) != 15u) return false; + float lengthSquared = 0; + for (float value : pose.orientation) { + if (!std::isfinite(value)) return false; + lengthSquared += value * value; + } + for (float value : pose.position) if (!std::isfinite(value)) return false; + return std::abs(lengthSquared - 1.f) < 0.01f; + } +private: + DroidDeckXrTracking *mapping_ = nullptr; + std::mutex mutex_; + std::string path_; +}; diff --git a/tools/vr/src/xr_vsync_timing.h b/tools/vr/src/xr_vsync_timing.h new file mode 100644 index 0000000000..da1b272d72 --- /dev/null +++ b/tools/vr/src/xr_vsync_timing.h @@ -0,0 +1,36 @@ +#pragma once +#include <chrono> +#include <cstdint> +#include <mutex> + +class XrVsyncTiming { +public: + using Clock = std::chrono::steady_clock; + static constexpr std::chrono::nanoseconds kDefaultPeriod{16666667}; + + void Reset() { Record({}, kDefaultPeriod); } + + Clock::time_point Target(Clock::time_point now, Clock::time_point scheduled, + int64_t predictedNs, std::chrono::nanoseconds period) const { + std::lock_guard<std::mutex> lock(mutex_); + auto predicted = Clock::time_point(std::chrono::nanoseconds(predictedNs)); + return predictedNs > 0 && predicted > now && predicted > last_ && predicted < now + period * 3 + ? predicted : scheduled; + } + + void Record(Clock::time_point target, std::chrono::nanoseconds period) { + std::lock_guard<std::mutex> lock(mutex_); + last_ = target; + period_ = period; + } + + Clock::time_point Deadline(uint32_t framesToThrottle) const { + std::lock_guard<std::mutex> lock(mutex_); + return last_ + period_ * (1 + static_cast<int64_t>(framesToThrottle)); + } + +private: + mutable std::mutex mutex_; + Clock::time_point last_{}; + std::chrono::nanoseconds period_{kDefaultPeriod}; +}; diff --git a/tools/vr/tests/test_adaptive_pose.cpp b/tools/vr/tests/test_adaptive_pose.cpp new file mode 100644 index 0000000000..8819b09559 --- /dev/null +++ b/tools/vr/tests/test_adaptive_pose.cpp @@ -0,0 +1,58 @@ +#include "adaptive_pose.h" +#include <cassert> +#include <cstdio> + +using namespace droiddeck; + +int main() { + for (const int period : {10, 20}) { + AdaptivePositionMotion motion; + double position = 0, previous = 0, energy = 0, oldEnergy = 0, target = 0; + for (int frame = 0; frame < 2000; ++frame) { + if (frame % period == 0) { + target = (frame / period % 2 ? 1 : -1) * .004; + motion.Observe({target, 0, 0}, 1000000000LL + frame * 4000000LL); + } + position += (target - position) * motion.PositionAlpha(.004); + previous += (target - previous) * -std::expm1(-.004 / .06); + if (frame > 1000) { energy += position * position; oldEnergy += previous * previous; } + } + assert(energy < oldEnergy * .81); + motion.Reset(); position = previous = 0; + for (int frame = 0; frame < 500; ++frame) { + target = .5 * frame * .004; + motion.Observe({target, 0, 0}, 1000000000LL + frame * 4000000LL); + position += (target - position) * motion.PositionAlpha(.004); + previous += (target - previous) * -std::expm1(-.004 / .06); + } + assert(target - position < target - previous); + assert(target - position < .006); + } + AdaptivePositionMotion motion; + const double idle = motion.PositionAlpha(.01); + motion.Observe({}, 1000000000); + motion.Observe({.1, 0, 0}, 1080000000); + assert(motion.PositionAlpha(.01) > idle); + const double alpha = motion.PositionAlpha(.01); + motion.Observe({9, 9, 9}, 1080000000); + assert(motion.PositionAlpha(.01) == alpha); + motion.Observe({}, 2000000000); + assert(motion.PositionAlpha(.01) == idle); + motion.Reset(); + assert(motion.PositionAlpha(.01) == idle); + assert(motion.PositionAlpha(0) == 0); + for (bool right : {false, true}) for (double yaw : {0., .8, -2.}) { + const Vec3 head{1, 1.6, -2}; + const auto turn = AboutY(yaw); + const Vec3 shoulder = head + Rotate(turn, {right ? .18 : -.18, -.28, 0}); + const Vec3 ray = Rotate(turn, {.2, .1, -.5}); + const auto aim = ShoulderAim(head, turn, shoulder + ray, right, AboutX(1)); + assert(Length(Rotate(aim, {0, 0, -1}) - ray * (1 / Length(ray))) < 1e-8); + const auto flippedPalm = ShoulderAim(head, turn, shoulder + ray, right, AboutX(-2)); + assert(Length(Rotate(flippedPalm, {0, 0, -1}) - Rotate(aim, {0, 0, -1})) < 1e-8); + assert(ShoulderAim(head, turn, shoulder, right, AboutX(1)).x == AboutX(1).x); + } + const auto vertical = ShoulderAim({}, AboutX(M_PI / 2), {.3, -.1, -.5}, true, {}); + assert(std::isfinite(vertical.w) && std::isfinite(vertical.y)); + puts("PASS: adaptive jitter, motion response, capture time, reset, and shoulder aim"); +} diff --git a/tools/vr/tests/test_compositor_submit.c b/tools/vr/tests/test_compositor_submit.c new file mode 100644 index 0000000000..76dd11f82f --- /dev/null +++ b/tools/vr/tests/test_compositor_submit.c @@ -0,0 +1,221 @@ +#define _GNU_SOURCE +#include <ucontext.h> +#include <assert.h> +#include <stdint.h> +#include "../src/vk_layer_droiddeck_vr.c" + +struct fake_fence { VkResult result; unsigned resets; }; +static VkDevice device; +static VkResult submit_result = VK_SUCCESS, completion = VK_SUCCESS, marker_result = VK_SUCCESS; +static unsigned submits_seen, waits_seen, markers_seen, freed; +static int create_fails; +static VkFence caller_fence = (VkFence)(uintptr_t)99; + +static struct fake_fence *fake(VkFence f) { return (struct fake_fence *)(uintptr_t)f; } +static VkResult VKAPI_CALL create(VkDevice d, const VkFenceCreateInfo *ci, const VkAllocationCallbacks *a, VkFence *out) { + assert(d == device && ci->flags == 0); + if (create_fails) return VK_ERROR_OUT_OF_HOST_MEMORY; + struct fake_fence *f = calloc(1, sizeof(*f)); + f->result = VK_TIMEOUT; + *out = (VkFence)(uintptr_t)f; + return VK_SUCCESS; +} +static VkResult VKAPI_CALL wait_fence(VkDevice d, uint32_t n, const VkFence *f, VkBool32 all, uint64_t timeout) { + assert(d == device && n == 1 && all); + assert(timeout == 0); + waits_seen++; + return fake(*f)->result; +} +static VkResult VKAPI_CALL reset(VkDevice d, uint32_t n, const VkFence *f) { + assert(d == device && n == 1); + fake(*f)->resets++; + fake(*f)->result = VK_TIMEOUT; + return VK_SUCCESS; +} +static void VKAPI_CALL destroy(VkDevice d, VkFence f, const VkAllocationCallbacks *a) { + assert(d == device); free(fake(f)); freed++; +} +static PFN_vkVoidFunction VKAPI_CALL gdpa(VkDevice d, const char *name) { + assert(d == device); + if (!strcmp(name, "vkCreateFence")) return (PFN_vkVoidFunction)create; + if (!strcmp(name, "vkWaitForFences")) return (PFN_vkVoidFunction)wait_fence; + if (!strcmp(name, "vkResetFences")) return (PFN_vkVoidFunction)reset; + if (!strcmp(name, "vkDestroyFence")) return (PFN_vkVoidFunction)destroy; + assert(0); return NULL; +} +static VkResult submitted(uint32_t n, VkFence f) { + submits_seen++; + if (!strcmp(program_invocation_short_name, "vrserver")) return submit_result; + assert(g_trk && g_trk->state == TRACK_RESERVED); + if (!n) markers_seen++; + VkResult r = n ? submit_result : marker_result; + if (r == VK_SUCCESS && f != caller_fence) fake(f)->result = completion; + return r; +} +static VkResult VKAPI_CALL submit1(VkQueue q, uint32_t n, const VkSubmitInfo *info, VkFence f) { + assert((n == 0) == (info == NULL)); return submitted(n, f); +} +static VkResult VKAPI_CALL submit2(VkQueue q, uint32_t n, const VkSubmitInfo2 *info, VkFence f) { + assert((n == 0) == (info == NULL)); return submitted(n, f); +} +static void no_init(void) {} + +static VkQueue forwarded_queue; +static const void *forwarded_info; +static VkFence forwarded_fence; +static VkResult VKAPI_CALL forward1(VkQueue q, uint32_t n, const VkSubmitInfo *info, VkFence fence) { + assert(q == forwarded_queue && n == 1 && info == forwarded_info && fence == forwarded_fence); + submits_seen++; + return submit_result; +} +static VkResult VKAPI_CALL forward2(VkQueue q, uint32_t n, const VkSubmitInfo2 *info, VkFence fence) { + assert(q == forwarded_queue && n == 1 && info == forwarded_info && fence == forwarded_fence); + submits_seen++; + return submit_result; +} +static void unavailable_tracking(int modern, int missing_sync, VkFence fence, VkResult result) { + struct droiddeck_present_sync *saved_sync = g_sync; + const uint32_t issued = saved_sync->issued, done = saved_sync->done; + const unsigned freed_before = freed; + uintptr_t unknown_dispatch = 2; + forwarded_queue = missing_sync ? (VkQueue)device : (VkQueue)&unknown_dispatch; + if (missing_sync) g_sync = NULL; + VkSubmitInfo info = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO }; + VkSubmitInfo2 info2 = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2 }; + forwarded_info = modern ? (const void *)&info2 : (const void *)&info; + forwarded_fence = fence; + submits_seen = waits_seen = markers_seen = 0; + submit_result = result; + VkResult r = modern ? submit2_tracked(forward2, forwarded_queue, 1, &info2, fence) + : submit_tracked(forward1, forwarded_queue, 1, &info, fence); + assert(r == result && submits_seen == 1 && !waits_seen && !markers_seen && !g_trk); + assert(freed == freed_before && saved_sync->issued == issued && saved_sync->done == done); + g_sync = saved_sync; +} + +static void scenario(int modern, VkFence fence, VkResult submitStatus, VkResult markerStatus, VkResult completeStatus) { + submit_result = submitStatus; marker_result = markerStatus; completion = completeStatus; + submits_seen = waits_seen = markers_seen = 0; + VkSubmitInfo info = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO }; + VkSubmitInfo2 info2 = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2 }; + VkResult r = modern ? submit2_tracked(submit2, (VkQueue)device, 1, &info2, fence) + : submit_tracked(submit1, (VkQueue)device, 1, &info, fence); + VkResult tracking = submitStatus == VK_SUCCESS && fence ? markerStatus : submitStatus; + assert(r == tracking); + assert(waits_seen == 0); + assert(markers_seen == (submitStatus == VK_SUCCESS && fence ? 1u : 0u)); + assert(submits_seen == 1 + markers_seen); + if (tracking == VK_SUCCESS) { + assert(g_trk->state == TRACK_SUBMITTED && fake(g_trk->fence)->resets == 0); + if (completeStatus == VK_TIMEOUT) { + uint32_t done; + assert(track_pool_reap(g_trk, g_sync->issued, &done)); + assert(g_trk->state == TRACK_SUBMITTED && fake(g_trk->fence)->resets == 0); + } + fake(g_trk->fence)->result = VK_SUCCESS; + uint32_t done; + assert(!track_pool_reap(g_trk, g_sync->issued, &done)); + } + assert(!track_pool_device_busy(g_trk, device)); + track_pool_forget(&g_trk, device); +} + +static VkFence dependency_fence; +static VkQueue dependency_queue; +static VkResult dependency_submit(VkQueue q, VkFence fence, uint64_t wait, uint64_t signal) { + assert(g_trk && g_trk->state == TRACK_RESERVED); + if (q == dependency_queue) { + assert(wait == 1 && signal == 0 && dependency_fence == VK_NULL_HANDLE); + dependency_fence = fence; + fake(fence)->result = VK_TIMEOUT; + } else { + assert(wait == 0 && signal == 1 && dependency_fence != VK_NULL_HANDLE); + fake(dependency_fence)->result = fake(fence)->result = VK_SUCCESS; + } + return VK_SUCCESS; +} +static VkResult VKAPI_CALL dependent_submit1(VkQueue q, uint32_t n, const VkSubmitInfo *info, VkFence fence) { + assert(n == 1); + const VkTimelineSemaphoreSubmitInfo *timeline = info->pNext; + assert(timeline->sType == VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO); + return dependency_submit(q, fence, info->waitSemaphoreCount ? timeline->pWaitSemaphoreValues[0] : 0, + info->signalSemaphoreCount ? timeline->pSignalSemaphoreValues[0] : 0); +} +static VkResult VKAPI_CALL dependent_submit2(VkQueue q, uint32_t n, const VkSubmitInfo2 *info, VkFence fence) { + assert(n == 1); + return dependency_submit(q, fence, info->waitSemaphoreInfoCount ? info->pWaitSemaphoreInfos[0].value : 0, + info->signalSemaphoreInfoCount ? info->pSignalSemaphoreInfos[0].value : 0); +} +static void wait_before_signal(int modern) { + uintptr_t dispatch = *(uintptr_t *)device; + VkQueue signalling = (VkQueue)&dispatch; + dependency_queue = (VkQueue)device; + dependency_fence = VK_NULL_HANDLE; + VkSemaphore semaphore = (VkSemaphore)(uintptr_t)123; + uint64_t value = 1; + VkPipelineStageFlags stage = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; + VkTimelineSemaphoreSubmitInfo timeline_wait = { .sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, + .waitSemaphoreValueCount = 1, .pWaitSemaphoreValues = &value }; + VkTimelineSemaphoreSubmitInfo timeline_signal = { .sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, + .signalSemaphoreValueCount = 1, .pSignalSemaphoreValues = &value }; + VkSubmitInfo wait = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, .pNext = &timeline_wait, + .waitSemaphoreCount = 1, .pWaitSemaphores = &semaphore, .pWaitDstStageMask = &stage }; + VkSubmitInfo signal = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, .pNext = &timeline_signal, + .signalSemaphoreCount = 1, .pSignalSemaphores = &semaphore }; + VkSemaphoreSubmitInfo dependency = { .sType = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO, + .semaphore = semaphore, .value = 1, .stageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT }; + VkSubmitInfo2 wait2 = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2, + .waitSemaphoreInfoCount = 1, .pWaitSemaphoreInfos = &dependency }; + VkSubmitInfo2 signal2 = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2, + .signalSemaphoreInfoCount = 1, .pSignalSemaphoreInfos = &dependency }; + assert((modern ? submit2_tracked(dependent_submit2, dependency_queue, 1, &wait2, VK_NULL_HANDLE) + : submit_tracked(dependent_submit1, dependency_queue, 1, &wait, VK_NULL_HANDLE)) == VK_SUCCESS); + uint32_t done; + assert(track_pool_reap(g_trk, g_sync->issued, &done)); + assert(done == g_sync->issued - 1); + assert((modern ? submit2_tracked(dependent_submit2, signalling, 1, &signal2, VK_NULL_HANDLE) + : submit_tracked(dependent_submit1, signalling, 1, &signal, VK_NULL_HANDLE)) == VK_SUCCESS); + assert(!track_pool_reap(g_trk, g_sync->issued, &done)); + assert(done == g_sync->issued); + track_pool_forget(&g_trk, device); +} + +int main(void) { + uintptr_t dispatch = 1; + device = (VkDevice)&dispatch; + g_dev[0] = (struct dev){ .handle = device, .gdpa = gdpa }; + struct droiddeck_present_sync sync = {0}; + g_sync = &sync; + pthread_once(&g_sync_once, no_init); + program_invocation_short_name = "vrcompositor"; + for (int modern = 0; modern < 2; modern++) { + scenario(modern, VK_NULL_HANDLE, VK_SUCCESS, VK_SUCCESS, VK_SUCCESS); + scenario(modern, caller_fence, VK_SUCCESS, VK_SUCCESS, VK_SUCCESS); + scenario(modern, VK_NULL_HANDLE, VK_SUCCESS, VK_SUCCESS, VK_TIMEOUT); + scenario(modern, caller_fence, VK_SUCCESS, VK_SUCCESS, VK_ERROR_DEVICE_LOST); + scenario(modern, caller_fence, VK_ERROR_DEVICE_LOST, VK_SUCCESS, VK_SUCCESS); + scenario(modern, caller_fence, VK_SUCCESS, VK_ERROR_DEVICE_LOST, VK_SUCCESS); + } + assert(freed == 12); + wait_before_signal(0); + wait_before_signal(1); + for (int modern = 0; modern < 2; modern++) { + for (int missing_sync = 0; missing_sync < 2; missing_sync++) { + unavailable_tracking(modern, missing_sync, VK_NULL_HANDLE, VK_SUCCESS); + unavailable_tracking(modern, missing_sync, caller_fence, VK_SUCCESS); + unavailable_tracking(modern, missing_sync, caller_fence, VK_ERROR_DEVICE_LOST); + } + } + create_fails = 1; + submits_seen = 0; + VkSubmitInfo info = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO }; + VkSubmitInfo2 info2 = { .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2 }; + assert(submit_tracked(submit1, (VkQueue)device, 1, &info, VK_NULL_HANDLE) == VK_ERROR_OUT_OF_HOST_MEMORY); + assert(submit2_tracked(submit2, (VkQueue)device, 1, &info2, caller_fence) == VK_ERROR_OUT_OF_HOST_MEMORY); + assert(!submits_seen && !g_trk); + program_invocation_short_name = "vrserver"; + submit_result = VK_SUCCESS; waits_seen = 0; + assert(submit_tracked(submit1, (VkQueue)device, 1, &info, caller_fence) == VK_SUCCESS); + assert(submits_seen == 1 && waits_seen == 0 && !g_trk); + puts("PASS: compositor submissions stay asynchronous, preserve caller fences, and allow later cross-queue signals"); +} diff --git a/tools/vr/tests/test_fence_tracker.c b/tools/vr/tests/test_fence_tracker.c new file mode 100644 index 0000000000..8eecc3936a --- /dev/null +++ b/tools/vr/tests/test_fence_tracker.c @@ -0,0 +1,146 @@ +#include <assert.h> +#include <stdio.h> +#include <string.h> +#include "fence_tracker.h" + +struct fake_fence { VkDevice dev; VkResult result; unsigned waits; }; +static unsigned created, destroyed; +static int fail_create; + +static struct fake_fence *fake(VkFence fence) { return (struct fake_fence *)(uintptr_t)fence; } + +static VkResult VKAPI_CALL create_fence(VkDevice dev, const VkFenceCreateInfo *info, + const VkAllocationCallbacks *alloc, VkFence *out) { + (void)alloc; + assert(info->flags == 0); + if (fail_create) return VK_ERROR_OUT_OF_HOST_MEMORY; + struct fake_fence *f = calloc(1, sizeof(*f)); + assert(f); + f->dev = dev; + f->result = VK_TIMEOUT; + *out = (VkFence)(uintptr_t)f; + created++; + return VK_SUCCESS; +} + +static VkResult VKAPI_CALL wait_fence(VkDevice dev, uint32_t count, const VkFence *fences, + VkBool32 all, uint64_t timeout) { + assert(count == 1 && all && timeout == 0); + struct fake_fence *f = fake(*fences); + assert(f->dev == dev); + f->waits++; + return f->result; +} + +static VkResult VKAPI_CALL reset_fence(VkDevice dev, uint32_t count, const VkFence *fences) { + assert(count == 1 && fake(*fences)->dev == dev); + fake(*fences)->result = VK_TIMEOUT; + return VK_SUCCESS; +} + +static void VKAPI_CALL destroy_fence(VkDevice dev, VkFence fence, const VkAllocationCallbacks *alloc) { + (void)alloc; + assert(fake(fence)->dev == dev); + free(fake(fence)); + destroyed++; +} + +static PFN_vkVoidFunction VKAPI_CALL gdpa(VkDevice dev, const char *name) { + (void)dev; + if (!strcmp(name, "vkCreateFence")) return (PFN_vkVoidFunction)create_fence; + if (!strcmp(name, "vkWaitForFences")) return (PFN_vkVoidFunction)wait_fence; + if (!strcmp(name, "vkResetFences")) return (PFN_vkVoidFunction)reset_fence; + if (!strcmp(name, "vkDestroyFence")) return (PFN_vkVoidFunction)destroy_fence; + assert(0); + return NULL; +} + +static struct tracked *submit(struct tracked **pool, VkDevice dev, uint32_t *issued) { + struct tracked *t = track_pool_take(pool, dev, gdpa); + assert(t && t->state == TRACK_RESERVED); + *issued = track_pool_submitted(t, VK_SUCCESS, *issued); + return t; +} + +static void saturated_pool_and_out_of_order_completion(void) { + struct tracked *pool = NULL, *pending[130]; + VkDevice dev = (VkDevice)(uintptr_t)1; + uint32_t issued = 0, done = 0; + /* These waits can all depend on a signal from a later queue submission. + * A fixed 64-slot pool blocks that signal before it reaches the driver. */ + for (unsigned i = 0; i < 130; i++) pending[i] = submit(&pool, dev, &issued); + assert(issued == 130); + assert(track_pool_reap(pool, issued, &done) && done == 0); + for (unsigned i = 0; i < 130; i++) assert(fake(pending[i]->fence)->waits == 1); + + fake(pending[129]->fence)->result = VK_SUCCESS; + assert(track_pool_reap(pool, issued, &done) && done == 0); + assert(pending[129]->state == TRACK_IDLE); + unsigned before = created; + struct tracked *signal = submit(&pool, dev, &issued); + assert(signal == pending[129] && created == before && issued == 131); + /* Freeing the latest fence must not mark the older work as drawn. */ + for (unsigned i = 0; i < 129; i++) fake(pending[i]->fence)->result = VK_SUCCESS; + assert(track_pool_reap(pool, issued, &done) && done == 130); + fake(signal->fence)->result = VK_SUCCESS; + assert(!track_pool_reap(pool, issued, &done) && done == 131); + assert(!track_pool_device_busy(pool, dev)); + track_pool_forget(&pool, dev); + assert(!pool); +} + +static void wrapped_watermark(void) { + struct tracked *pool = NULL; + VkDevice dev = (VkDevice)(uintptr_t)1; + uint32_t issued = UINT32_MAX - 1, done = issued; + struct tracked *first = submit(&pool, dev, &issued); + struct tracked *second = submit(&pool, dev, &issued); + struct tracked *third = submit(&pool, dev, &issued); + assert(issued == 1); + fake(second->fence)->result = VK_SUCCESS; + fake(third->fence)->result = VK_SUCCESS; + assert(track_pool_reap(pool, issued, &done) && done == UINT32_MAX - 1); + fake(first->fence)->result = VK_SUCCESS; + assert(!track_pool_reap(pool, issued, &done) && done == 1); + track_pool_forget(&pool, dev); +} + +static void reservations_failures_and_devices(void) { + struct tracked *pool = NULL; + VkDevice a = (VkDevice)(uintptr_t)1, b = (VkDevice)(uintptr_t)2; + uint32_t issued = 7, done = 7; + struct tracked *reserved = track_pool_take(&pool, a, gdpa); + assert(track_pool_device_busy(pool, a)); + assert(!track_pool_reap(pool, issued, &done) && done == 7); + assert(fake(reserved->fence)->waits == 0); + issued = track_pool_submitted(reserved, VK_ERROR_DEVICE_LOST, issued); + assert(issued == 7 && !track_pool_device_busy(pool, a)); + fail_create = 1; + assert(!track_pool_take(&pool, b, gdpa)); + assert(pool == reserved && pool->dev == a); + fail_create = 0; + unsigned before = destroyed; + struct tracked *other = submit(&pool, b, &issued); + assert(other == reserved && destroyed == before + 1); + struct tracked *own = submit(&pool, a, &issued); + fake(other->fence)->result = VK_SUCCESS; + assert(track_pool_reap(pool, issued, &done) && done == 8); + track_pool_forget(&pool, b); + assert(pool == own && track_pool_device_busy(pool, a)); + fake(own->fence)->result = VK_ERROR_DEVICE_LOST; + assert(!track_pool_reap(pool, issued, &done) && done == 9); + track_pool_forget(&pool, a); + assert(!pool); + fail_create = 1; + assert(!track_pool_take(&pool, a, gdpa) && !pool); + fail_create = 0; +} + +int main(void) { + saturated_pool_and_out_of_order_completion(); + wrapped_watermark(); + reservations_failures_and_devices(); + assert(created == destroyed); + puts("fence tracker: all regression scenarios passed"); + return 0; +} diff --git a/tools/vr/tests/test_joycon.cpp b/tools/vr/tests/test_joycon.cpp new file mode 100644 index 0000000000..0308ad78ad --- /dev/null +++ b/tools/vr/tests/test_joycon.cpp @@ -0,0 +1,628 @@ +#include "arm_model.h" +#include "hand_motion.h" +#include "hand_mesh.h" +#include "hand_pose.h" +#include "hand_skeleton.h" +#include "index_pose.h" +#include "handcam_shm.h" +#include "joycon_shm.h" +#include "luma_joycon.h" + +#include <cstdio> +#include <cstdlib> +#include <map> + +using namespace droiddeck; + +static int failures = 0; + +static void check(bool ok, const char *what) { + if (ok) return; + fprintf(stderr, "FAILED: %s\n", what); + failures++; +} + +static bool near(double a, double b, double tolerance = 1e-6) { return std::fabs(a - b) <= tolerance; } + +static Vec3 Forward(const Quat &q) { return Rotate(q, {0.0, 0.0, -1.0}); } + +static void restingHandsHangInFrontAtElbowHeight() { + const Vec3 head{0.0, 1.6, 0.0}; + ArmModel right(true), left(false); + const Vec3 r = right.Update(head, {}, {}, 0.0, 0.01); + const Vec3 l = left.Update(head, {}, {}, 0.0, 0.01); + check(near(r.x, 0.195, 1e-9) && near(l.x, -0.195, 1e-9), "rest hands sit 19.5 cm either side"); + check(near(r.y, 1.1, 1e-9) && near(l.y, 1.1, 1e-9), "rest hands hang 50 cm below the eyes"); + check(near(r.z, -0.305, 1e-9) && near(l.z, -0.305, 1e-9), "rest hands reach 30.5 cm forward"); +} + +static void raisingTheControllerExtendsTheArm() { + const Vec3 head{0.0, 1.6, 0.0}; + ArmModel rest(true), raised(true); + const Vec3 low = rest.Update(head, {}, {}, 0.0, 0.01); + const Vec3 high = raised.Update(head, {}, AboutX(60.0 * M_PI / 180.0), 0.0, 0.01); + check(high.y > low.y + 0.2, "pointing up lifts the hand"); + check(high.x < low.x, "an extended arm moves the elbow inward"); +} + +static void theTorsoOnlyFollowsTheHeadWhileTheControllerMoves() { + const Vec3 head{0.0, 1.6, 0.0}; + ArmModel arm(true); + arm.Update(head, {}, {}, 0.0, 0.01); + const Quat lookLeft = AboutY(M_PI / 2); + const Vec3 still = arm.Update(head, lookLeft, {}, 0.0, 0.5); + check(near(still.x, 0.195, 1e-9), "a still controller keeps the torso where it was"); + for (int i = 0; i < 400; i++) arm.Update(head, lookLeft, lookLeft, 5.0, 0.01); + const Vec3 turned = arm.Update(head, lookLeft, lookLeft, 0.0, 0.01); + check(near(turned.z, -0.195, 1e-3) && near(turned.x, -0.305, 1e-3), "a moving controller lets the torso turn to the gaze"); + arm.Reset(); + const Vec3 snapped = arm.Update(head, {}, {}, 0.0, 0.01); + check(near(snapped.x, 0.195, 1e-9), "a reset snaps the torso to the gaze"); +} + +static void headingAlignmentTurnsTheControllerToTheGaze() { + double heading = 0.0; + check(Heading(AboutY(0.7), &heading) && near(heading, 0.7), "heading of a yaw rotation"); + check(!Heading(AboutX(M_PI / 2), &heading), "a controller pointing straight up has no heading"); + const Quat hand = AboutY(-1.1) * AboutX(0.3); + const Quat head = AboutY(0.4) * AboutX(-0.2); + double headYaw = 0.0, handYaw = 0.0; + check(Heading(head, &headYaw) && Heading(hand, &handYaw), "both headings exist"); + const Quat aligned = AboutY(headYaw - handYaw) * hand; + check(Heading(aligned, &heading) && near(heading, 0.4), "the aligned controller faces where the head faces"); + check(near(Forward(aligned).y, Forward(hand).y), "alignment keeps the controller's pitch"); +} + +static void theIndexTipPointsWhereTheJoyConPoints() { + for (bool right : {false, true}) { + const Quat aim = AboutY(0.5) * AboutX(-0.3); + const Vec3 grip{0.2, 1.1, -0.3}; + Quat raw; + Vec3 position; + IndexRawPose(right, aim, grip, &raw, &position); + const Vec3 tip = Forward(raw * IndexTipRotation(right)), want = Forward(aim); + check(near(tip.x, want.x) && near(tip.y, want.y) && near(tip.z, want.z), "the tip pose follows the Joy-Con"); + const Vec3 gripAt = position + Rotate(raw, {0.0, -0.015, 0.13}); + check(near(gripAt.x, grip.x) && near(gripAt.y, grip.y) && near(gripAt.z, grip.z), "the Index grip sits at the arm model's hand"); + const Vec3 handle = Forward(raw); + check(handle.y > Forward(aim).y + 0.4, "the raw handle tilts up from the pointing direction"); + } +} + +static void skeletonsAreFiniteMirroredAndNormalised() { + vr::VRBoneTransform_t left[kHandBones], right[kHandBones]; + for (double curl : {0.0, 0.5, 1.0}) { + FingerCurls curls; + curls.thumb = curls.index = curls.middle = curls.ring = curls.pinky = curl; + HandSkeleton(false, curls, left); + HandSkeleton(true, curls, right); + for (uint32_t b = 0; b < kHandBones; b++) { + for (const auto *bones : {left, right}) { + const auto &q = bones[b].orientation; + check(near(std::sqrt(q.w * q.w + q.x * q.x + q.y * q.y + q.z * q.z), 1.0, 1e-3), "bone orientations are unit quaternions"); + } + for (int i = 0; i < 3; i++) check(std::isfinite(left[b].position.v[i]) && std::isfinite(right[b].position.v[i]), "bone positions are finite"); + check(left[b].position.v[3] == 1.0f && right[b].position.v[3] == 1.0f, "bone positions are points"); + } + check(near(left[1].position.v[0], -right[1].position.v[0]), "the wrist is mirrored between hands"); + check(near(left[7].position.v[0], -right[7].position.v[0]), "finger bones are mirrored between hands"); + } + FingerCurls open, fist; + fist.index = 1.0; + HandSkeleton(false, open, left); + HandSkeleton(false, fist, right); + const auto reach = [](const vr::VRBoneTransform_t *bones) { + return std::hypot(bones[27].position.v[0] - bones[1].position.v[0], bones[27].position.v[1] - bones[1].position.v[1], + bones[27].position.v[2] - bones[1].position.v[2]); + }; + check(reach(right) < reach(left) - 0.05, "a curled index finger pulls its tip towards the wrist"); +} + +static void measuredMovementCarriesTheHandAndTheAnchorPullsItBack() { + HandFollower hand; + const Vec3 anchor{0.2, 1.1, -0.3}; + const Vec3 start = hand.Update(anchor, {5.0, 5.0, 5.0}, 0.01, 0.6, 0.35); + check(near(start.x, anchor.x) && near(start.y, anchor.y) && near(start.z, anchor.z), "the hand starts at the anchor"); + const Vec3 lifted = hand.Update(anchor, {5.0, 5.25, 5.0}, 0.0, 0.6, 0.35); + check(near(lifted.y, 1.35) && near(lifted.x, 0.2) && near(lifted.z, -0.3), "a measured 25 cm lift raises the hand 25 cm"); + Vec3 held = lifted; + for (int i = 0; i < 60; i++) held = hand.Update(anchor, {5.0, 5.25, 5.0}, 0.01, 0.6, 0.35); + check(near(held.y, 1.1 + 0.25 * std::exp(-1.0), 1e-3), "a held hand settles back over the anchor's time constant"); + hand.Update(anchor, {5.0, 6.25, 5.0}, 0.0, 0.6, 0.35); + const Vec3 far = hand.Update(anchor, {5.0, 6.25, 5.0}, 0.0, 0.6, 0.35); + check(near(Length(far - anchor), 0.35, 1e-9), "the hand stays within reach of the anchor"); + hand.Reset(); + const Vec3 reset = hand.Update({0.0, 1.0, 0.0}, {9.0, 9.0, 9.0}, 0.01, 0.6, 0.35); + check(near(reset.x, 0.0) && near(reset.y, 1.0) && near(reset.z, 0.0), "a reset puts the hand back on the anchor"); + const Vec3 after = hand.Update({0.0, 1.0, 0.0}, {9.0, 9.0, 8.9}, 0.0, 0.6, 0.35); + check(near(after.z, -0.1), "movement after a reset counts from the reset"); +} + +static void feedJoyCon(HandKalman &k, double from, double to, double (*pos)(double), double bias, double turn) { + const double dt = 0.01; + for (double t = from + dt; t < to + 1e-9; t += dt) { + const double v = (pos(t + 1e-4) - pos(t - 1e-4)) / 2e-4; + k.Input(int64_t(t * 1e9), {0.0, v + bias * t, 0.0}, turn); + } +} + +static double wave(double t) { return 1.0 + 0.2 * std::sin(2.0 * M_PI * 0.7 * t); } + +static void theFilterPlacesTheHandWhereItIsNowNotWhenThePictureWasTaken() { + HandKalman k; + const int64_t ms = 1000000; + k.Input(0, {0.0, 0.0, 0.0}, 1.0); + check(!k.Measure(-5 * ms, {0.0, 1.0, 0.0}, 0.02), "a sighting from before the Joy-Con started is skipped"); + double t = 0.0; + double worst = 0.0, squares = 0.0, pictureSquares = 0.0; + int counted = 0; + unsigned noise = 12345; + for (int frame = 0; frame < 150; frame++) { + feedJoyCon(k, t, t + 1.0 / 15.0, wave, 0.3, 1.0); + t += 1.0 / 15.0; + const double seen = t - 0.1; + noise = noise * 1103515245u + 12345u; + const double jitter = (int((noise >> 16) % 2001) - 1000) / 1000.0 * 0.02; + k.Measure(int64_t(seen * 1e9), {0.3, wave(seen) + jitter, -0.4}, 0.03); + if (frame > 45) { + const double error = k.Position().y - wave(t); + const double picture = wave(seen) + jitter - wave(t); + worst = std::max(worst, std::fabs(error)); + squares += error * error; + pictureSquares += picture * picture; + counted++; + } + } + check(k.Ready(), "the filter runs once the camera has seen the hand"); + check(std::sqrt(squares / counted) < 0.55 * std::sqrt(pictureSquares / counted) && worst < 0.07, + "a waving hand is shown nearer where it is now than the 0.1 s late, noisy picture, despite a drifting Joy-Con"); + check(near(k.Position().x, 0.3, 0.01) && near(k.Position().z, -0.4, 0.01), "still axes stay on the camera"); +} + +static void aLateSightingCorrectsThePastAndKeepsTheMoveSince() { + HandKalman k; + const int64_t ms = 1000000; + for (int i = 0; i <= 20; i++) k.Input(i * 10 * ms, {0.0, 0.0, 0.0}, 1.0); + check(k.Measure(200 * ms, {0.0, 1.0, 0.0}, 0.01), "the first sighting starts the filter"); + for (int i = 0; i < 30; i++) k.Measure((200 + i) * ms, {0.0, 1.0, 0.0}, 0.01); + for (int i = 21; i <= 30; i++) k.Input(i * 10 * ms, {0.0, 1.0, 0.0}, 1.0); + const double moved = k.Position().y - 1.0; + check(moved > 0.08, "a quick Joy-Con lift moves the hand at once"); + k.Measure(205 * ms, {0.0, 1.0, 0.0}, 0.01); + check(near(k.Position().y - 1.0, moved, 0.03), "a late sighting from before the lift does not undo it"); +} + +static void aWildSightingIsIgnoredUntilItRepeats() { + HandKalman k; + const int64_t ms = 1000000; + for (int i = 0; i <= 60; i++) { + k.Input(i * 10 * ms, {0.0, 0.0, 0.0}, 1.0); + if (i % 7 == 0) k.Measure(i * 10 * ms, {0.2, 1.1, -0.3}, 0.02); + } + check(!k.Measure(600 * ms, {-0.4, 1.1, -0.3}, 0.02), "one sighting far from the hand is ignored"); + check(!k.Measure(600 * ms, {-0.4, 1.1, -0.3}, 0.02), "a second one is ignored too"); + check(near(k.Position().x, 0.2, 0.02), "the hand stays where it was"); + check(k.Measure(600 * ms, {-0.4, 1.1, -0.3}, 0.02) && near(k.Position().x, -0.4, 0.03), "a third sighting in a row moves the hand there"); + k.Input(2000 * ms, {0.0, 0.0, 0.0}, 1.0); + check(!k.Ready(), "a long gap in Joy-Con reports starts over"); +} + +static double slide(double t) { return t < 1.0 ? 0.5 * t : 0.5; } +static double flat(double) { return 0.0; } + +static double lostAfterSlide(double turn, double seconds, double *speed) { + HandKalman k; + k.Input(0, {0.0, 0.0, 0.0}, 1.0); + double t = 0.0; + while (t < 1.0 - 1e-9) { + feedJoyCon(k, t, t + 1.0 / 15.0, flat, 0.0, 1.0); + t += 1.0 / 15.0; + k.Measure(int64_t(t * 1e9), {slide(t), 1.0, -0.4}, 0.03); + } + feedJoyCon(k, t, t + seconds, flat, 0.0, turn); + *speed = Length(k.Velocity()); + return k.Position().x - slide(t); +} + +static void aHandTheCameraLosesSettlesInsteadOfRunningAway() { + double speed = 0.0; + const double moving = lostAfterSlide(1.0, 2.0, &speed); + check(moving > 0.0 && moving < 0.1 && speed < 0.01, + "a hand the Joy-Con never felt moving settles within 10 cm of its last sighting instead of sliding on"); + const double still = lostAfterSlide(0.0, 0.5, &speed); + check(still > -0.01 && still < 0.06 && speed < 0.01, "a still Joy-Con stops the hand within a few cm"); +} + +static void posed(const HandModel &model, const FingerCurls &curls, const Quat &turn, const Vec3 &at, Vec3 out[kHandJoints]) { + Vec3 joints[kHandJoints]; + HandJoints(model.Right(), curls, joints); + for (int i = 0; i < kHandJoints; i++) out[i] = at + Rotate(turn, joints[i] - model.PalmCenter()); +} + +static void cameraFingerCurlsReadBackFromTheJoints() { + for (bool right : {false, true}) { + const HandModel model(right); + for (double c : {0.0, 0.2, 0.5, 0.8, 1.0}) { + FingerCurls curls; + curls.thumb = c; + curls.index = 1.0 - c; + curls.middle = curls.ring = curls.pinky = c; + Vec3 joints[kHandJoints]; + posed(model, curls, Normalize(AboutY(0.7) * AboutX(-0.4)), {0.1, 1.2, -0.4}, joints); + const FingerCurls read = model.Curls(joints); + check(near(read.thumb, curls.thumb, 0.02) && near(read.index, curls.index, 0.02) && near(read.middle, c, 0.02) && + near(read.ring, c, 0.02) && near(read.pinky, c, 0.02), + "finger curls read from camera joints match the curls that made them"); + } + } +} + +static void thePalmFitFindsTheHandsTurnAndPlace() { + for (bool right : {false, true}) { + const HandModel model(right); + const Quat turn = Normalize(AboutY(-2.1) * AboutX(0.9) * Quat{0.9, 0.0, 0.0, 0.43}); + FingerCurls curls; + curls.index = 0.6; + curls.middle = curls.ring = curls.pinky = 0.9; + Vec3 joints[kHandJoints]; + posed(model, curls, turn, {-0.2, 1.1, -0.35}, joints); + Quat fitted; + Vec3 center; + double rms = 1.0; + check(model.Fit(joints, model.Curls(joints), &fitted, ¢er, &rms), "the palm fit converges"); + check(AngleDegrees(Conjugate(turn) * fitted) < 0.5 && rms < 0.001, "the palm fit recovers the hand's turn even with bent fingers"); + Vec3 shape[kHandJoints]; + HandJoints(right, curls, shape); + check(Length(Rotate(fitted, shape[hand::kIndexTip] - center) - (joints[hand::kIndexTip] - (joints[0] + joints[5] + joints[9] + joints[13] + joints[17]) * 0.2)) < 0.002, + "the fitted skeleton puts the fingertips where the camera saw them"); + unsigned noise = 99; + for (int i = 0; i < kHandJoints; i++) { + noise = noise * 1103515245u + 12345u; + const double n = (int((noise >> 16) % 2001) - 1000) / 1000.0 * 0.004; + joints[i] = joints[i] + Vec3{n, -n, n * 0.5}; + } + check(model.Fit(joints, model.Curls(joints), &fitted, ¢er, &rms) && AngleDegrees(Conjugate(turn) * fitted) < 6.0, + "4 mm of landmark noise moves the fit a few degrees"); + } +} + +static void thePalmNormalPointsOutOfThePalm() { + for (bool right : {false, true}) { + const HandModel model(right); + Vec3 open[kHandJoints], fist[kHandJoints]; + FingerCurls closed; + closed.index = closed.middle = closed.ring = closed.pinky = 1.0; + posed(model, FingerCurls{}, Quat{}, {}, open); + posed(model, closed, Quat{}, {}, fist); + const Vec3 normal = model.PalmNormal(open); + check(near(Length(normal), 1.0, 1e-6) && Dot(normal, fist[hand::kIndexTip] - open[hand::kIndexTip]) > 0.0, + "the palm normal points the way the fingers close"); + } +} + +static void pinchesAndFistsBecomeButtons() { + const HandModel model(true); + HandGestures gestures(true); + const int64_t ms = 1000000; + Vec3 joints[kHandJoints]; + posed(model, FingerCurls{}, Quat{}, {0.2, 1.2, -0.4}, joints); + const Vec3 palm{0.2, 1.2, -0.4}; + const Vec3 normal = model.PalmNormal(joints); + const Vec3 away = palm - normal * 0.5; + HandButtons b = gestures.Update(model, joints, model.Curls(joints), palm, away, 0); + check(!b.triggerClick && !b.gripClick && !b.system && b.trigger == 0.0f, "an open hand presses nothing"); + joints[hand::kThumbTip] = joints[hand::kIndexTip] + Vec3{0.01, 0.0, 0.0}; + b = gestures.Update(model, joints, model.Curls(joints), palm, away, 10 * ms); + check(!b.triggerClick && b.trigger > 0.9f, "a pinch pulls the trigger at once but clicks only after it holds"); + b = gestures.Update(model, joints, model.Curls(joints), palm, away, 70 * ms); + check(b.triggerClick && !b.system, "a held pinch clicks the trigger"); + joints[hand::kThumbTip] = joints[hand::kIndexTip] + Vec3{0.04, 0.0, 0.0}; + b = gestures.Update(model, joints, model.Curls(joints), palm, away, 90 * ms); + check(b.triggerClick, "a pinch that loosens a little stays clicked"); + joints[hand::kThumbTip] = joints[hand::kIndexTip] + Vec3{0.08, 0.0, 0.0}; + gestures.Update(model, joints, model.Curls(joints), palm, away, 100 * ms); + b = gestures.Update(model, joints, model.Curls(joints), palm, away, 210 * ms); + check(!b.triggerClick && b.trigger == 0.0f, "opening the pinch releases the trigger"); + joints[hand::kThumbTip] = joints[hand::kIndexTip] + Vec3{0.0, 0.03, 0.0}; + gestures.Update(model, joints, model.Curls(joints), palm, away, 300 * ms); + b = gestures.Update(model, joints, model.Curls(joints), palm, away, 360 * ms); + check(b.triggerClick && b.trigger == 1.0f, "fingertips the camera reads 3 cm apart still pinch"); + + HandGestures fist(true); + FingerCurls closed; + closed.middle = closed.ring = closed.pinky = 1.0; + posed(model, closed, Quat{}, palm, joints); + fist.Update(model, joints, model.Curls(joints), palm, away, 0); + b = fist.Update(model, joints, model.Curls(joints), palm, away, 60 * ms); + check(b.gripClick && b.grip == 1.0f && !b.a && !b.b, "a fist grips without pressing A or B"); +} + +static void aPalmTurnedToTheFaceOpensTheMenus() { + const HandModel rightModel(true), leftModel(false); + HandGestures right(true), left(false); + const int64_t ms = 1000000; + const Vec3 palm{0.0, 1.3, -0.35}; + for (int side = 0; side < 2; side++) { + const HandModel &model = side ? rightModel : leftModel; + HandGestures &gestures = side ? right : left; + Vec3 joints[kHandJoints]; + posed(model, FingerCurls{}, Quat{}, palm, joints); + const Vec3 face = palm + model.PalmNormal(joints) * 0.4; + HandButtons b = gestures.Update(model, joints, model.Curls(joints), palm, face, 0); + check(!b.facing, "a palm must face the headset for a moment before it counts"); + joints[hand::kThumbTip] = joints[hand::kIndexTip]; + gestures.Update(model, joints, model.Curls(joints), palm, face, 310 * ms); + b = gestures.Update(model, joints, model.Curls(joints), palm, face, 380 * ms); + check(b.facing && !b.triggerClick && b.trigger == 0.0f, "a pinch with the palm facing the headset is not a trigger pull"); + check(side ? (b.system && !b.b) : (b.b && !b.system), + side ? "a right palm pinch presses the system button (SteamVR menu)" : "a left palm pinch presses B (game menu)"); + } +} + +static void aBareHandFollowsTheCameraAndHidesWhenLost() { + const int64_t ms = 1000000; + const Vec3 head{0.0, 1.6, 0.0}; + for (int side = 0; side < 2; side++) { + CameraHand hand(side == 1); + const Quat turn = Normalize(AboutY(side ? -0.4 : 0.4) * AboutX(-0.3)); + FingerCurls curls; + curls.index = 0.2; + curls.middle = curls.ring = curls.pinky = 0.4; + Vec3 shape[kHandJoints], mean, seen[kHandJoints]; + HandJoints(side == 1, curls, shape); + for (int i : hand::kPalm) mean = mean + shape[i] * 0.2; + for (int i = 0; i < kHandJoints; i++) seen[i] = Rotate(turn, shape[i] - mean); + Vec3 palm{side ? 0.15 : -0.15, 1.2, -0.4}; + CameraHandPose pose; + int64_t t = 0; + const auto run = [&](int64_t until, bool camera) { + for (; t <= until; t += 10 * ms) { + if (camera && t % (70 * ms) == 0) hand.See(t - 90 * ms, palm, seen, head, t); + pose = hand.Update(t, 0.01); + } + }; + run(90 * ms, false); + check(!pose.visible, "a camera hand stays hidden until the camera sees it"); + run(1000 * ms, true); + check(pose.visible && AngleDegrees(Conjugate(turn) * pose.rotation) < 1.0, "a camera hand turns the way the camera saw it"); + check(Length(pose.position - (palm - Rotate(turn, mean))) < 0.01, "a camera hand's skeleton root sits so its palm lands on the camera's palm"); + check(std::fabs(pose.curls.index - 0.2) < 0.05 && std::fabs(pose.curls.ring - 0.4) < 0.05, "a camera hand bends its fingers as seen"); + check(!pose.buttons.triggerClick, "a loose hand pulls nothing"); + seen[hand::kThumbTip] = seen[hand::kIndexTip]; + run(1200 * ms, true); + check(pose.buttons.triggerClick, "a pinch the camera sees clicks the trigger"); + run(1800 * ms, false); + check(!pose.visible && !pose.buttons.triggerClick, "a hand the camera loses hides and lets go"); + palm = {side ? -0.1 : 0.1, 1.45, -0.3}; + run(2400 * ms, true); + check(pose.visible && Length(pose.position - (palm - Rotate(turn, mean))) < 0.01, "a hand that comes back somewhere else shows up there"); + } +} + +static void theTurnSmootherSettlesAndKeepsUpWithFastTurns() { + SmoothTurn slow, fast; + Quat out = slow.Update(Quat{}, 0.01); + const Quat jitter = AboutX(4.0 * M_PI / 180.0); + double worst = 0.0; + for (int i = 0; i < 300; i++) { + out = slow.Update((i / 7) % 2 ? jitter : Conjugate(jitter), 0.01); + if (i > 100) worst = std::max(worst, AngleDegrees(out)); + } + check(worst < 2.5, "frame-to-frame wobble of a still hand is damped"); + fast.Update(Quat{}, 0.01); + for (int i = 1; i <= 50; i++) out = fast.Update(AboutY(3.0 * i * 0.01), 0.01); + check(AngleDegrees(Conjugate(AboutY(1.5)) * out) < 25.0, "a fast turn is followed closely"); +} + +static void theHandRenderModelIsAClosedOutwardFacingHand() { + for (int right = 0; right < 2; right++) { + for (HandPart part : {HandPart::Hand, HandPart::ThumbIndex}) { + for (int closed = 0; closed < 2; closed++) { + const HandMesh m = BuildHandPart(right, part, closed); + bool finite = !m.faces.empty() && m.points.size() < 65000, cuff = false; + size_t inward = 0; + for (const Vec3 &p : m.points) + finite = finite && std::isfinite(p.x) && std::isfinite(p.y) && std::isfinite(p.z) && Length(p) < 0.3; + for (double tint : m.tints) cuff = cuff || tint > 0.99; + std::map<std::pair<int, int>, int> edges; + for (const auto &f : m.faces) { + const Vec3 n = Cross(m.points[f[1]] - m.points[f[0]], m.points[f[2]] - m.points[f[0]]); + if (Dot(n, m.normals[f[0]] + m.normals[f[1]] + m.normals[f[2]]) < 0.0) inward++; + for (int e = 0; e < 3; e++) edges[{f[e], f[(e + 1) % 3]}]++; + } + bool sealed = true; + for (const auto &entry : edges) sealed = sealed && edges.count({entry.first.second, entry.first.first}) == 1; + check(finite, "hand model parts are small, finite meshes SteamVR can load"); + check(inward * 1000 < m.faces.size(), "hand model faces point out"); + check(sealed, "hand model parts are watertight"); + check(cuff, "the glove has a cuff at the wrist"); + } + } + Vec3 pinch[kHandJoints]; + HandShape(right, true, false, pinch); + check(Length(pinch[hand::kThumbTip] - pinch[hand::kIndexTip]) < 0.015, "the pinch model's thumb meets the index finger"); + Vec3 open[kHandJoints]; + HandShape(right, false, false, open); + check((open[hand::kThumbTip].x > 0.0) == !right, "the hand models are mirrored for the left and right hands"); + const std::string json = HandModelJson(right); + for (const char *name : {"hand_open.obj", "hand_fist.obj", "thumb_index_open.obj", "thumb_index_pinch.obj", "\"tip\"", "\"base\"", + "\"handgrip\"", "\"pressed_path\": \"/input/trigger/click\"", "\"pressed_path\": \"/input/grip/touch\"", + "\"controller_button\": 33", "\"press\": true"}) + check(json.find(name) != std::string::npos, "the hand model lists its parts, their inputs and the pointer poses"); + } + const std::vector<uint8_t> png = GlovePng(64, {246, 246, 249}, {224, 227, 233}, glove::kDarkest); + check(png.size() > 40 && png[1] == 'P' && png[2] == 'N' && png[3] == 'G', "the hand texture is a PNG"); +} + +static void sharedLayoutMatchesTheAppWriter() { + check(offsetof(droiddeck_joycon, seq) == 8, "sequence offset"); + check(offsetof(droiddeck_joycon_hand, buttons) == 4, "buttons offset"); + check(offsetof(droiddeck_joycon_hand, rotation) == 8, "rotation offset"); + check(offsetof(droiddeck_joycon_hand, angular_velocity) == 24, "angular velocity offset"); + check(offsetof(droiddeck_joycon_hand, stick) == 36, "stick offset"); + check(offsetof(droiddeck_joycon_hand, battery) == 44, "battery offset"); + check(offsetof(droiddeck_joycon_hand, recenter) == 48, "recenter offset"); + check(offsetof(droiddeck_joycon_hand, velocity) == 76, "velocity offset"); + check(offsetof(droiddeck_joycon_hand, inertial_velocity) == 88, "inertial velocity offset"); + check(sizeof(droiddeck_joycon) == 224, "file size"); + check(DROIDDECK_JOYCON_VERSION == 3, "file version"); + check(DROIDDECK_JOYCON_TRIGGER == 1 && DROIDDECK_JOYCON_GRIP == 2 && DROIDDECK_JOYCON_A == 4 && + DROIDDECK_JOYCON_B == 8 && DROIDDECK_JOYCON_STICK == 16 && DROIDDECK_JOYCON_SYSTEM == 32, + "button bits match JoyCon.kt"); +} + +static void historyInterpolatesBetweenSamples() { + TimeHistory history; + Vec3 out; + check(!history.At(0, &out), "an empty history has nothing to give"); + history.Add(1000, {0.0, 0.0, 0.0}); + history.Add(11000, {0.1, 0.0, -0.2}); + history.Add(5000, {9.0, 9.0, 9.0}); + check(history.At(6000, &out) && near(out.x, 0.05) && near(out.z, -0.1), "a time between samples is interpolated"); + check(history.At(50000, &out) && near(out.x, 0.1), "a time after the newest sample uses the newest"); + check(history.At(0, &out) && near(out.x, 0.0), "a time before the oldest sample uses the oldest"); + history.Add(11000, {0.2, 0.0, 0.0}); + check(history.At(11000, &out) && near(out.x, 0.2), "a repeated time replaces its sample"); + for (int i = 0; i < 1000; i++) history.Add(20000 + i * 1000, {double(i), 0.0, 0.0}); + check(history.At(0, &out) && out.x > 700.0, "only the newest samples are kept"); +} + +static void theCameraYawAveragesFaceReadingsAndFollowsARecenter() { + CameraYaw yaw; + double out = 0.0; + for (int i = 0; i < 3; i++) yaw.Add(0.5 + (i % 2 ? 0.1 : -0.1), 1.0 / 15.0); + check(!yaw.Get(&out), "a few readings are not enough"); + for (int i = 3; i < 30; i++) yaw.Add(0.5 + (i % 2 ? 0.1 : -0.1), 1.0 / 15.0); + check(yaw.Get(&out) && near(out, 0.5, 0.02), "noisy readings average out"); + for (int i = 0; i < 7; i++) yaw.Add(1.7, 1.0 / 15.0); + check(yaw.Get(&out) && near(out, 0.5, 0.02), "a short run of far readings is ignored"); + for (int i = 0; i < 6; i++) yaw.Add(1.7, 1.0 / 15.0); + check(yaw.Get(&out) && near(out, 1.7, 1e-6), "a lasting change starts a new average"); + CameraYaw wrapped; + for (int i = 0; i < 20; i++) wrapped.Add(i % 2 ? M_PI - 0.05 : -M_PI + 0.05, 1.0 / 15.0); + check(wrapped.Get(&out) && near(std::fabs(out), M_PI, 0.01), "readings either side of half a turn average to half a turn"); +} + +static void handCameraLayoutMatchesTheAppWriter() { + check(offsetof(droiddeck_handcam, seq) == 8, "camera sequence offset"); + check(offsetof(droiddeck_handcam, flags) == 12, "camera flags offset"); + check(offsetof(droiddeck_handcam, frame) == 24, "camera frame offset"); + check(offsetof(droiddeck_handcam, face_yaw) == 28, "camera face yaw offset"); + check(offsetof(droiddeck_handcam_hand, position) == 4, "camera hand position offset"); + check(offsetof(droiddeck_handcam, hands) + sizeof(droiddeck_handcam_hand) + offsetof(droiddeck_handcam_hand, joints) == 316, + "second hand's joints offset"); + check(DROIDDECK_HANDCAM_VERSION == 2 && DROIDDECK_HANDCAM_RUNNING == 1 && DROIDDECK_HANDCAM_FACE == 2 && + DROIDDECK_HANDCAM_BARE_HANDS == 4 && DROIDDECK_HANDCAM_SEEN == 1 && DROIDDECK_HANDCAM_ESTIMATED == 2 && + DROIDDECK_HANDCAM_JOINTS == 4 && DROIDDECK_HANDCAM_JOINT_COUNT == kHandJoints, + "camera flags match HandCameraShm.kt"); +} + +static void lumaStereoFallsBackInTheHeadTrackingOrigin() { + int64_t now = 1000000000; + droiddeck_spatialpose s{}; + s.flags = DD_SPATIAL_ACTIVE | DD_SPATIAL_JOYCONS; + s.connection = s.origin = 1; + s.head = {now, {2, 1.7f, 3}, {0, 0, 0, 1}, DD_SPATIAL_VALID}; + s.hands[0].pose = {now, {1.7f, 1.3f, 2.6f}, {0, 0, 0, 1}, DD_SPATIAL_VALID}; + s.hands[1].pose = {now, {2.3f, 1.3f, 2.6f}, {0, 0, 0, 1}, DD_SPATIAL_VALID}; + LumaJoyConPosition left(false), right(true); + auto l = left.Update(s, {}, 0, now, .01); + auto r = right.Update(s, {}, 0, now, .01); + check(l.valid && l.camera && r.camera && near(l.position.x, 1.7) && near(r.position.x, 2.3), + "stereo positions retain their world coordinates and handedness"); + s.head.position[0] += .1f; + l = left.Update(s, {}, 0, now, .01); + check(near(l.position.x, 1.7), "moving the head does not move a world-space stereo observation"); + now += 200000001; + s.head.time_ns = now; + l = left.Update(s, {}, 0, now, .01); + check(l.valid && !l.camera && Length(l.position - Vec3{1.7, 1.3, 2.6}) < .04, + "stale stereo falls back with a continuous transition"); + for (int i=0; i<100; ++i) l = left.Update(s, {}, 0, now, .01); + ArmModel expected(false); + const auto anchor = expected.Update({2.1, 1.7, 3}, {}, {}, 0, .01); + check(Length(l.position - anchor) < .003, "fallback settles to the translated 6DoF head anchor"); + s.hands[0].pose.time_ns = now; + auto reacquired = left.Update(s, {}, 0, now, .01); + check(reacquired.camera && Length(reacquired.position - l.position) < .04, "reacquisition blends without a snap"); + s.origin++; + s.head.position[0] = 0; + s.hands[0].pose = {}; + l = left.Update(s, {}, 0, now, .01); + check(l.valid && !l.camera && near(l.position.x, -.195), "origin changes discard the old world position and blend"); + s.head.time_ns = now - 100000001; + check(!left.Update(s, {}, 0, now, .01).valid, "head loss invalidates instead of guessing a world origin"); + s.head.time_ns = now; + s.hands[0].pose = {now + 1, {0, 1.3f, 3}, {0,0,0,1}, DD_SPATIAL_VALID}; + check(!left.Update(s, {}, 0, now, .01).camera, "future camera observations are rejected"); + s.hands[0].pose.time_ns = now; + s.hands[0].pose.position[0] = 99; + check(!left.Update(s, {}, 0, now, .01).camera, "implausible hand positions use the arm model"); + s.flags = DD_SPATIAL_ACTIVE; + check(!left.Update(s, {}, 0, now, .01).valid, "the experimental flag is required"); +} + +static void lumaReachSurvivesBriefDetectionMissesWithoutRefreshingOldDepth() { + int64_t now = 1000000000; + droiddeck_spatialpose s{}; + s.flags = DD_SPATIAL_ACTIVE | DD_SPATIAL_JOYCONS; + s.connection = s.origin = 1; + s.head = {now, {0, 1.7f, 0}, {0,0,0,1}, DD_SPATIAL_VALID}; + s.hands[0].pose = {now, {-.2f, 1.3f, -.3f}, {0,0,0,1}, DD_SPATIAL_VALID}; + LumaJoyConPosition tracker(false); + auto pose = tracker.Update(s, {}, 0, now, .01); + s.hands[0] = {}; + for (int i=0; i<19; ++i) { + now += 10000000; s.head.time_ns = now; + pose = tracker.Update(s, {}, 0, now, .01); + check(pose.camera && near(pose.position.z, -.3), "brief misses retain the last measured reach"); + } + now += 20000000; s.head.time_ns = now; + check(!tracker.Update(s, {}, 0, now, .02).camera, "held depth expires at its original capture timestamp"); + for (int i=0; i<100; ++i) { + now += 10000000; s.head.time_ns = now; + if (i % 16 == 0) + s.hands[0].pose = {now - 60000000, {-.2f, 1.3f, -.7f}, {0,0,0,1}, DD_SPATIAL_VALID}; + if (i % 16 == 8) s.hands[0] = {}; + pose = tracker.Update(s, {}, 0, now, .01); + } + check(pose.position.z < -.65, "intermittent stereo observations extend reach instead of repeatedly resetting to the arm model"); + s.connection++; + s.hands[0] = {}; + pose = tracker.Update(s, {}, 0, now, .01); + check(!pose.camera && near(pose.position.z, -.305), "reconnection cannot reuse cached camera depth"); +} + +int main() { + lumaReachSurvivesBriefDetectionMissesWithoutRefreshingOldDepth(); + lumaStereoFallsBackInTheHeadTrackingOrigin(); + restingHandsHangInFrontAtElbowHeight(); + raisingTheControllerExtendsTheArm(); + theTorsoOnlyFollowsTheHeadWhileTheControllerMoves(); + headingAlignmentTurnsTheControllerToTheGaze(); + theIndexTipPointsWhereTheJoyConPoints(); + skeletonsAreFiniteMirroredAndNormalised(); + measuredMovementCarriesTheHandAndTheAnchorPullsItBack(); + sharedLayoutMatchesTheAppWriter(); + historyInterpolatesBetweenSamples(); + theFilterPlacesTheHandWhereItIsNowNotWhenThePictureWasTaken(); + aLateSightingCorrectsThePastAndKeepsTheMoveSince(); + aWildSightingIsIgnoredUntilItRepeats(); + aHandTheCameraLosesSettlesInsteadOfRunningAway(); + theCameraYawAveragesFaceReadingsAndFollowsARecenter(); + handCameraLayoutMatchesTheAppWriter(); + cameraFingerCurlsReadBackFromTheJoints(); + thePalmFitFindsTheHandsTurnAndPlace(); + thePalmNormalPointsOutOfThePalm(); + pinchesAndFistsBecomeButtons(); + aPalmTurnedToTheFaceOpensTheMenus(); + aBareHandFollowsTheCameraAndHidesWhenLost(); + theTurnSmootherSettlesAndKeepsUpWithFastTurns(); + theHandRenderModelIsAClosedOutwardFacingHand(); + if (failures) { + fprintf(stderr, "%d Joy-Con check(s) failed\n", failures); + return 1; + } + printf("Joy-Con arm model, movement, camera, pose and layout checks passed\n"); + return 0; +} diff --git a/tools/vr/tests/test_optical_controller.cpp b/tools/vr/tests/test_optical_controller.cpp new file mode 100644 index 0000000000..cd84028830 --- /dev/null +++ b/tools/vr/tests/test_optical_controller.cpp @@ -0,0 +1,263 @@ +#include "../src/driver_droiddeck.cpp" +#include <cassert> +#include <map> + +void droiddeck::Presenter::AddTextures(const uint64_t[3], const int[3], uint32_t, uint32_t, uint32_t, uint32_t) {} +void droiddeck::Presenter::RemoveTexture(uint64_t) {} +void droiddeck::Presenter::Submit(const EyeFrame &) {} +void droiddeck::Presenter::Shutdown() {} + +struct Host : IVRServerDriverHost { + std::vector<DriverPose_t> poses; + const std::map<VRInputComponentHandle_t, float> *inputs = nullptr; + std::vector<std::map<VRInputComponentHandle_t, float>> inputsAtPose; + bool TrackedDeviceAdded(const char *, ETrackedDeviceClass, ITrackedDeviceServerDriver *) override { return true; } + void TrackedDevicePoseUpdated(uint32_t, const DriverPose_t &p, uint32_t) override { + poses.push_back(p); inputsAtPose.push_back(*inputs); + } + void VsyncEvent(double) override {} + void VendorSpecificEvent(uint32_t, EVREventType, const VREvent_Data_t &, double) override {} + bool IsExiting() override { return false; } + bool PollNextEvent(VREvent_t *, uint32_t) override { return false; } + void GetRawTrackedDevicePoses(float, TrackedDevicePose_t *, uint32_t) override {} + void RequestRestart(const char *, const char *, const char *, const char *) override {} + uint32_t GetFrameTimings(Compositor_FrameTiming *, uint32_t) override { return 0; } + void SetDisplayEyeToHead(uint32_t, const HmdMatrix34_t &, const HmdMatrix34_t &) override {} + void SetDisplayProjectionRaw(uint32_t, const HmdRect2_t &, const HmdRect2_t &) override {} + void SetRecommendedRenderTargetSize(uint32_t, uint32_t, uint32_t) override {} +}; +struct Properties : IVRProperties { + ETrackedPropertyError ReadPropertyBatch(PropertyContainerHandle_t, PropertyRead_t *, uint32_t) override { return TrackedProp_Success; } + ETrackedPropertyError WritePropertyBatch(PropertyContainerHandle_t, PropertyWrite_t *, uint32_t) override { return TrackedProp_Success; } + const char *GetPropErrorNameFromEnum(ETrackedPropertyError) override { return "success"; } + PropertyContainerHandle_t TrackedDeviceToPropertyContainer(TrackedDeviceIndex_t id) override { return id+1; } +}; +struct Input : IVRDriverInput { + std::map<VRInputComponentHandle_t, float> values; + std::map<std::string, VRInputComponentHandle_t> handles; + std::map<VRInputComponentHandle_t, EVRInputError> failures; + EVRInputError CreateBooleanComponent(PropertyContainerHandle_t, const char *name, VRInputComponentHandle_t *h) override { + *h = values.size()+1; values[*h]=0; handles[name]=*h; return VRInputError_None; + } + EVRInputError UpdateBooleanComponent(VRInputComponentHandle_t h, bool v, double) override { + if (failures[h] != VRInputError_None) return failures[h]; + values[h]=v; return VRInputError_None; + } + EVRInputError CreateScalarComponent(PropertyContainerHandle_t c, const char *n, VRInputComponentHandle_t *h, EVRScalarType, EVRScalarUnits) override { return CreateBooleanComponent(c,n,h); } + EVRInputError UpdateScalarComponent(VRInputComponentHandle_t h, float v, double) override { + if (failures[h] != VRInputError_None) return failures[h]; + values[h]=v; return VRInputError_None; + } + EVRInputError CreateHapticComponent(PropertyContainerHandle_t c, const char *n, VRInputComponentHandle_t *h) override { return CreateBooleanComponent(c,n,h); } + EVRInputError CreateSkeletonComponent(PropertyContainerHandle_t, const char *, const char *, const char *, EVRSkeletalTrackingLevel, const VRBoneTransform_t *, uint32_t, VRInputComponentHandle_t *) override { return VRInputError_None; } + EVRInputError UpdateSkeletonComponent(VRInputComponentHandle_t, EVRSkeletalMotionRange, const VRBoneTransform_t *, uint32_t) override { return VRInputError_None; } + EVRInputError CreatePoseComponent(PropertyContainerHandle_t, const char *, VRInputComponentHandle_t *) override { return VRInputError_None; } + EVRInputError UpdatePoseComponent(VRInputComponentHandle_t, const HmdMatrix34_t *, double) override { return VRInputError_None; } + EVRInputError CreateEyeTrackingComponent(PropertyContainerHandle_t, const char *, VRInputComponentHandle_t *) override { return VRInputError_None; } + EVRInputError UpdateEyeTrackingComponent(VRInputComponentHandle_t, const VREyeTrackingData_t *, double) override { return VRInputError_None; } +}; +struct DriverLog : IVRDriverLog { + std::vector<std::string> lines; + void Log(const char *message) override { lines.emplace_back(message); } +}; +struct Context : IVRDriverContext { + Host host; + Input input; + Properties properties; + DriverLog log; + Context() { host.inputs = &input.values; } + void *GetGenericInterface(const char *name, EVRInitError *) override { + if (!strcmp(name, IVRServerDriverHost_Version)) return &host; + if (!strcmp(name, IVRDriverInput_Version)) return &input; + if (!strcmp(name, IVRProperties_Version)) return &properties; + if (!strcmp(name, IVRDriverLog_Version)) return &log; + return nullptr; + } + DriverHandle_t GetDriverHandle() override { return 1; } +}; + +int main() { + Context context; + VRDriverContext() = &context; + CardboardController controller(false); + assert(controller.Activate(1) == VRInitError_None); + const auto gripHandle=context.input.handles.at("/input/grip/click"); + const auto clickHandle=context.input.handles.at("/input/trigger/click"); + const auto triggerHandle=context.input.handles.at("/input/trigger/value"); + const auto assertReleasedAtPose = [&] { + const auto &inputs=context.host.inputsAtPose.back(); + assert(inputs.at(gripHandle)==0 && inputs.at(clickHandle)==0 && inputs.at(triggerHandle)==0); + }; + dd_spatial_hand hand{}; + for (int i=0; i<500; ++i) controller.UpdateOptical(hand, false, nullptr, 1000000000+i, 1, 1); + assert(context.host.poses.size() == 500); + assert(context.log.lines.size()==2); + for (const auto &pose : context.host.poses) { + assert(pose.deviceIsConnected && !pose.poseIsValid); + assert(pose.result == TrackingResult_Running_OutOfRange); + assert(pose.qRotation.w == 1); + } + hand.pose = {1000000000, {1,2,3}, {0,0,0,1}, DD_SPATIAL_VALID | DD_SPATIAL_TRIGGER_VALID | DD_SPATIAL_GRIP_VALID}; + int64_t now=1000000000; + uint64_t connection=1,origin=1; + uint16_t epochs=0; + const auto observe = [&](float trigger,uint32_t grip) { + now+=80000000;hand.pose.time_ns=now;hand.trigger=trigger;hand.grip=grip; + controller.UpdateOptical(hand,true,nullptr,now,connection,origin,epochs); + }; + const auto missing = [&](bool headValid,int64_t elapsed) { + now+=elapsed;controller.UpdateOptical({},headValid,nullptr,now,connection,origin,epochs); + }; + const auto assertPressed = [&] { + assert(context.host.poses.back().poseIsValid); + assert(context.input.values.at(gripHandle)==1 && context.input.values.at(clickHandle)==1 && + context.input.values.at(triggerHandle)==1); + }; + observe(0,0);observe(1,1);assertPressed(); + now+=200000000;controller.UpdateOptical(hand,true,nullptr,now,connection,origin,epochs); + assertPressed(); + ++now;controller.UpdateOptical(hand,true,nullptr,now,connection,origin,epochs); + assert(context.host.poses.back().deviceIsConnected && context.host.poses.back().poseIsValid); + assertReleasedAtPose(); + now=hand.pose.time_ns+350000000;controller.UpdateOptical(hand,true,nullptr,now,connection,origin,epochs); + assert(context.host.poses.back().poseIsValid); + assert(std::abs(context.host.poses.back().poseTimeOffset+.35)<1e-9); + assertReleasedAtPose(); + ++now;controller.UpdateOptical(hand,true,nullptr,now,connection,origin,epochs); + assert(context.host.poses.back().deviceIsConnected && !context.host.poses.back().poseIsValid); + assertReleasedAtPose(); + + observe(0,0);observe(1,1);assertPressed(); + missing(true,50000000); + assert(context.host.poses.back().poseIsValid && context.host.poses.back().vecPosition[0]==1); + assert(std::abs(context.host.poses.back().poseTimeOffset+.05)<1e-9); + assertReleasedAtPose(); + missing(true,150000000); + assert(context.host.poses.back().poseIsValid); + assert(std::abs(context.host.poses.back().poseTimeOffset+.2)<1e-9); + missing(true,150000000); + assert(context.host.poses.back().poseIsValid); + assert(std::abs(context.host.poses.back().poseTimeOffset+.35)<1e-9); + assertReleasedAtPose(); + missing(true,1);assert(!context.host.poses.back().poseIsValid); + observe(1,1);assertReleasedAtPose(); + observe(0,0);observe(1,1);assertPressed(); + missing(false,10000000); + assert(!context.host.poses.back().poseIsValid);assertReleasedAtPose(); + missing(true,10000000);assert(!context.host.poses.back().poseIsValid); + + observe(0,0);observe(1,1);assertPressed(); + epochs=1;observe(1,1); + assert(context.host.poses.back().poseIsValid); + assert(context.input.values.at(gripHandle)==1 && context.input.values.at(clickHandle)==0 && context.input.values.at(triggerHandle)==0); + epochs=0x101;observe(1,1);assertReleasedAtPose(); + hand.trigger=0;hand.grip=0; + controller.UpdateOptical(hand,true,nullptr,now+1,connection,origin,epochs); + observe(1,1);assertReleasedAtPose(); + observe(0,0);observe(1,1);assertPressed(); + + ++origin;missing(true,10000000); + assert(!context.host.poses.back().poseIsValid);assertReleasedAtPose(); + observe(1,1);assertReleasedAtPose(); + observe(0,0);observe(1,1);assertPressed(); + ++connection;missing(true,10000000); + assert(!context.host.poses.back().poseIsValid);assertReleasedAtPose(); + + observe(0,0);observe(1,1);assertPressed(); + controller.Disconnect(); + assert(!context.host.poses.back().deviceIsConnected);assertReleasedAtPose(); + missing(true,10000000);assert(!context.host.poses.back().poseIsValid); + observe(1,1);assertReleasedAtPose(); + controller.Update(controller.GetPose(),nullptr,false,0); + missing(true,10000000);assert(!context.host.poses.back().poseIsValid); + PadState pad{};pad.axes[0]=16384;pad.buttons=PAD_SELECT; + controller.UpdateOptical({},true,&pad,++now,connection,origin,epochs); + assert(!context.host.poses.back().poseIsValid); + assert(std::any_of(context.input.values.begin(),context.input.values.end(),[](const auto &v){ return v.second!=0; })); + + observe(0,0);observe(1,1);assertPressed(); + context.input.failures[gripHandle]=VRInputError_IPCError; + missing(false,10000000); + assert(context.input.values.at(gripHandle)==1 && context.input.values.at(triggerHandle)==0); + assert(context.log.lines.back().find("error=7/0/0")!=std::string::npos); + const auto failedLogCount=context.log.lines.size(); + for(int i=0;i<10;++i) missing(false,1); + assert(context.log.lines.size()==failedLogCount); + context.input.failures[gripHandle]=VRInputError_None; + missing(false,10000000); + assertReleasedAtPose(); + assert(context.log.lines.back().find("error=0/0/0")!=std::string::npos); + assert(context.log.lines.size()==failedLogCount+1); + observe(1,1);assertReleasedAtPose(); + observe(0,0);observe(1,1);assertPressed(); + const dd_spatial_pose aimHead{now, {0,1.6f,0}, {0,0,0,1}, DD_SPATIAL_VALID}; + controller.UpdateOptical(hand,true,nullptr,now,connection,origin,epochs,&aimHead); + assertPressed(); + const auto aimed = controller.GetPose(); + const auto expectedAim = ShoulderAim({0,1.6f,0}, {}, {1,2,3}, false, {}); + assert(std::abs(aimed.qRotation.w - expectedAim.w) < 1e-6); + assert(std::abs(aimed.qRotation.y - expectedAim.y) < 1e-6); + assert(aimed.poseTimeOffset == 0); + controller.UpdateOptical(hand,true,nullptr,now,connection,origin,epochs); + assertPressed(); + assert(controller.GetPose().qRotation.w == 1); + const auto palmRotation=Normalize(AboutX(.4)*AboutY(-.6)); + hand.pose.rotation[0]=palmRotation.x;hand.pose.rotation[1]=palmRotation.y; + hand.pose.rotation[2]=palmRotation.z;hand.pose.rotation[3]=palmRotation.w; + controller.UpdateOptical(hand,true,nullptr,now,connection,++origin,epochs); + const auto normal=controller.GetPose(); + assert(std::abs(normal.qRotation.w-palmRotation.w)<1e-6); + assert(std::abs(normal.qRotation.x-palmRotation.x)<1e-6); + assert(std::abs(normal.qRotation.y-palmRotation.y)<1e-6); + assert(std::abs(normal.qRotation.z-palmRotation.z)<1e-6); + assert(normal.vecPosition[0]==hand.pose.position[0] && normal.poseTimeOffset==0); + controller.UpdateOptical({},true,nullptr,now+1,connection,origin,epochs,&aimHead); + assertReleasedAtPose(); + assert(!controller.GetPose().poseIsValid); + controller.Deactivate(); + for(const auto &value:context.input.values) assert(value.second==0); + const auto poseCount=context.host.poses.size(); + controller.UpdateOptical(hand,true,nullptr,now+1,connection,origin,epochs); + assert(context.host.poses.size()==poseCount); + HandController joyCon(false); + assert(joyCon.Activate(2) == VRInitError_None); + const auto joyTrigger = context.input.handles.at("/input/trigger/click"); + droiddeck_joycon_hand joy{}; + joy.rotation[0] = 1; + joy.time_ns = now; + joy.buttons = DROIDDECK_JOYCON_TRIGGER; + droiddeck_spatialpose spatial{}; + spatial.flags = DD_SPATIAL_ACTIVE | DD_SPATIAL_JOYCONS; + spatial.connection = spatial.origin = 1; + spatial.head = {now, {2, 1.6f, 3}, {0,0,0,1}, DD_SPATIAL_VALID}; + spatial.hands[0].pose = {now, {1.8f, 1.2f, 2.6f}, {0,0,0,1}, DD_SPATIAL_VALID}; + assert(joyCon.Update(&joy, false, {1,0,0,0}, now, &spatial)); + auto pose = joyCon.GetPose(); + assert(pose.poseIsValid && context.input.values.at(joyTrigger) == 1); + Quat expectedRotation; Vec3 expectedPosition; + IndexRawPose(false, {}, {1.8f, 1.2f, 2.6f}, &expectedRotation, &expectedPosition); + assert(std::abs(pose.vecPosition[0] - expectedPosition.x) < 1e-5); + assert(std::abs(pose.qRotation.w - expectedRotation.w) < 1e-5); + spatial.hands[0].pose.flags = 0; + joyCon.Update(&joy, false, {1,0,0,0}, now, &spatial); + assert(joyCon.GetPose().poseIsValid && context.input.values.at(joyTrigger) == 1); + const Quat turned = AboutY(.7); + joy.rotation[0] = turned.w; joy.rotation[2] = turned.y; + joyCon.Update(&joy, false, {1,0,0,0}, now, &spatial); + const auto beforeLoss = joyCon.GetPose().qRotation; + spatial.head.flags = 0; + joyCon.Update(&joy, false, {1,0,0,0}, now, &spatial); + assert(!joyCon.GetPose().poseIsValid && context.input.values.at(joyTrigger) == 0); + assert(context.host.inputsAtPose.back().at(joyTrigger) == 0); + spatial.head.flags = DD_SPATIAL_VALID; + joyCon.Update(&joy, false, {1,0,0,0}, now, &spatial); + assert(std::abs(joyCon.GetPose().qRotation.w - beforeLoss.w) < 1e-5); + assert(std::abs(joyCon.GetPose().qRotation.y - beforeLoss.y) < 1e-5); + spatial.origin++; + spatial.head.position[0] = -2; + joyCon.Update(&joy, false, {1,0,0,0}, now, &spatial); + assert(joyCon.GetPose().poseIsValid && joyCon.GetPose().vecPosition[0] < -2); + joyCon.Update(nullptr, false, {1,0,0,0}, now, &spatial); + assert(!joyCon.GetPose().deviceIsConnected && context.input.values.at(joyTrigger) == 0); + puts("PASS: optical controller recovery and Luma Joy-Con camera, fallback, head loss and origin changes"); +} diff --git a/tools/vr/tests/test_presenter_image.cpp b/tools/vr/tests/test_presenter_image.cpp new file mode 100644 index 0000000000..baf36bddf5 --- /dev/null +++ b/tools/vr/tests/test_presenter_image.cpp @@ -0,0 +1,41 @@ +#include "presenter_image.h" +#include <cassert> +#include <cstdio> +#include <initializer_list> + +int main() { + droiddeck::SharedEyeImage image(VK_FORMAT_R8G8B8A8_SRGB, 1728, 1080); + const auto &info = image.info; + // SteamVR's shared-eye creation trace on the Fold7: format 43, flags 8, usage 0x97, list 43/37. + assert(info.format == 43 && info.flags == 8 && info.usage == 0x97); + assert(info.extent.width == 1728 && info.extent.height == 1080 && info.extent.depth == 1); + assert(info.samples == VK_SAMPLE_COUNT_1_BIT && info.mipLevels == 1 && info.arrayLayers == 1); + assert(info.tiling == VK_IMAGE_TILING_OPTIMAL && info.sharingMode == VK_SHARING_MODE_EXCLUSIVE); + const auto *external = static_cast<const VkExternalMemoryImageCreateInfo *>(info.pNext); + assert(external->handleTypes == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT); + const auto *list = static_cast<const VkImageFormatListCreateInfo *>(external->pNext); + assert(list->viewFormatCount == 2 && list->pViewFormats[0] == 43 && list->pViewFormats[1] == 37); + + const VkSurfaceFormatKHR choices[] = { + {VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR}, + {VK_FORMAT_R8G8B8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR}, + {VK_FORMAT_B8G8R8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR}, + {VK_FORMAT_R8G8B8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR}, + }; + VkSurfaceFormatKHR selected{}; + for (VkFormat eye : {VK_FORMAT_R8G8B8A8_SRGB, VK_FORMAT_B8G8R8A8_SRGB}) { + assert(droiddeck::EyeSurfaceFormat(eye, choices, 4, &selected)); + assert(droiddeck::SrgbEyeFormat(selected.format)); + assert(!droiddeck::EyeSurfaceFormat(eye, choices, 2, &selected)); + } + for (VkFormat eye : {VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM}) { + assert(droiddeck::EyeSurfaceFormat(eye, choices, 4, &selected)); + assert(!droiddeck::SrgbEyeFormat(selected.format)); + assert(!droiddeck::EyeSurfaceFormat(eye, choices + 2, 2, &selected)); + } + assert(!droiddeck::EyeSurfaceFormat(VK_FORMAT_R8G8B8A8_SRGB, nullptr, 0, &selected)); + const VkSurfaceFormatKHR any{VK_FORMAT_UNDEFINED, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR}; + assert(droiddeck::EyeSurfaceFormat(VK_FORMAT_R8G8B8A8_SRGB, &any, 1, &selected)); + assert(selected.format == VK_FORMAT_B8G8R8A8_SRGB); + std::puts("PASS: shared eye imports match SteamVR and preserve color encoding through presentation"); +} diff --git a/tools/vr/tests/test_presenter_shutdown.cpp b/tools/vr/tests/test_presenter_shutdown.cpp new file mode 100644 index 0000000000..c9e90e3801 --- /dev/null +++ b/tools/vr/tests/test_presenter_shutdown.cpp @@ -0,0 +1,23 @@ +#include "../src/presenter.h" +#include <cassert> +#include <chrono> +#include <cstdlib> +#include <cstdio> +#include <thread> +#include <vector> + +int main() { + setenv("DROIDDECK_VR_PRESENT", "questframes", 1); + setenv("VK_ICD_FILENAMES", "/droiddeck-test-no-icd.json", 1); + setenv("VK_DRIVER_FILES", "/droiddeck-test-no-icd.json", 1); + auto started = std::chrono::steady_clock::now(); + std::vector<std::thread> callers; + for (int index = 0; index < 8; index++) callers.emplace_back([] { + droiddeck::EyeFrame frame{}; + for (int count = 0; count < 1000; count++) droiddeck::Presenter::Submit(frame); + }); + for (auto &caller : callers) caller.join(); + droiddeck::Presenter::Shutdown(); + assert(std::chrono::steady_clock::now() - started < std::chrono::seconds(5)); + std::puts("Presenter validation passed: unavailable GPU releases concurrent blocking callers and shutdown"); +} diff --git a/tools/vr/tests/test_producer_gpu.c b/tools/vr/tests/test_producer_gpu.c new file mode 100644 index 0000000000..b75d515f5f --- /dev/null +++ b/tools/vr/tests/test_producer_gpu.c @@ -0,0 +1,143 @@ +#define _GNU_SOURCE +#include <assert.h> +#include <stdatomic.h> +#include "../src/vk_layer_droiddeck_vr.c" + +static VkDevice test_device; +static VkQueue test_queue; +static VkSemaphore gate; +static VkCommandBuffer commands[2]; +static atomic_int second_returned; +static atomic_int second_entered; + +static void *signal_gate(void *argument) { + (void)argument; + usleep(30000); + VkSemaphoreSignalInfo signal_info = {VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO, NULL, gate, 1}; + assert(vkSignalSemaphore(test_device, &signal_info) == VK_SUCCESS); + return NULL; +} + +static void *second_submit(void *argument) { + (void)argument; + VkSubmitInfo submit = {VK_STRUCTURE_TYPE_SUBMIT_INFO, NULL, 0, NULL, NULL, 1, &commands[1], 0, NULL}; + atomic_store(&second_entered, 1); + assert(QueueSubmit(test_queue, 1, &submit, VK_NULL_HANDLE) == VK_SUCCESS); + atomic_store(&second_returned, 1); + return NULL; +} + +static void check_pixels(const uint32_t *pixels, uint32_t expected) { + for (unsigned index = 0; index < 1024; index++) assert(pixels[index] == expected); +} + +int main(void) { + setenv("DROIDDECK_VR_LAYER_QUIET", "1", 1); + VkApplicationInfo application = {VK_STRUCTURE_TYPE_APPLICATION_INFO, NULL, "DroidDeck producer GPU test", 1, NULL, 0, VK_API_VERSION_1_2}; + VkInstanceCreateInfo create_instance = {VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, NULL, 0, &application, 0, NULL, 0, NULL}; + VkInstance instance; + assert(vkCreateInstance(&create_instance, NULL, &instance) == VK_SUCCESS); + uint32_t count = 1; + VkPhysicalDevice physical; + VkResult enumeration = vkEnumeratePhysicalDevices(instance, &count, &physical); + assert((enumeration == VK_SUCCESS || enumeration == VK_INCOMPLETE) && count); + VkQueueFamilyProperties families[32]; + count = 32; + vkGetPhysicalDeviceQueueFamilyProperties(physical, &count, families); + uint32_t family = UINT32_MAX; + for (uint32_t index = 0; index < count; index++) + if (families[index].queueFlags & VK_QUEUE_GRAPHICS_BIT) { family = index; break; } + assert(family != UINT32_MAX); + float priority = 1; + VkDeviceQueueCreateInfo queue_info = {VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, NULL, 0, family, 1, &priority}; + VkPhysicalDeviceTimelineSemaphoreFeatures timeline_feature = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, NULL, VK_TRUE}; + VkDeviceCreateInfo create_device = {VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, &timeline_feature, 0, 1, &queue_info, 0, NULL, 0, NULL, NULL}; + assert(vkCreateDevice(physical, &create_device, NULL, &test_device) == VK_SUCCESS); + vkGetDeviceQueue(test_device, family, 0, &test_queue); + g_dev[0] = (struct dev){test_device, vkGetDeviceProcAddr, NULL, 1, 0, 1, 0}; + g_producer_started = 1; + VkBufferCreateInfo create_buffer = {VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, NULL, 0, 4096, VK_BUFFER_USAGE_TRANSFER_DST_BIT, + VK_SHARING_MODE_EXCLUSIVE, 0, NULL}; + VkBuffer buffer; + assert(vkCreateBuffer(test_device, &create_buffer, NULL, &buffer) == VK_SUCCESS); + VkMemoryRequirements requirements; + vkGetBufferMemoryRequirements(test_device, buffer, &requirements); + VkPhysicalDeviceMemoryProperties properties; + vkGetPhysicalDeviceMemoryProperties(physical, &properties); + uint32_t memory_type = UINT32_MAX; + VkMemoryPropertyFlags required = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + for (uint32_t index = 0; index < properties.memoryTypeCount; index++) + if ((requirements.memoryTypeBits & (1u << index)) && (properties.memoryTypes[index].propertyFlags & required) == required) { + memory_type = index; + break; + } + assert(memory_type != UINT32_MAX); + VkMemoryAllocateInfo allocate = {VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, NULL, requirements.size, memory_type}; + VkDeviceMemory memory; + assert(vkAllocateMemory(test_device, &allocate, NULL, &memory) == VK_SUCCESS); + assert(vkBindBufferMemory(test_device, buffer, memory, 0) == VK_SUCCESS); + uint32_t *pixels; + assert(vkMapMemory(test_device, memory, 0, VK_WHOLE_SIZE, 0, (void **)&pixels) == VK_SUCCESS); + VkCommandPoolCreateInfo create_pool = {VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, NULL, 0, family}; + VkCommandPool pool; + assert(vkCreateCommandPool(test_device, &create_pool, NULL, &pool) == VK_SUCCESS); + VkCommandBufferAllocateInfo allocate_commands = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, NULL, pool, VK_COMMAND_BUFFER_LEVEL_PRIMARY, 2}; + assert(vkAllocateCommandBuffers(test_device, &allocate_commands, commands) == VK_SUCCESS); + const uint32_t patterns[2] = {0x13579bdf, 0x2468ace0}; + for (unsigned index = 0; index < 2; index++) { + VkCommandBufferBeginInfo begin = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, NULL, 0, NULL}; + assert(vkBeginCommandBuffer(commands[index], &begin) == VK_SUCCESS); + vkCmdFillBuffer(commands[index], buffer, 0, 4096, patterns[index]); + VkMemoryBarrier barrier = {VK_STRUCTURE_TYPE_MEMORY_BARRIER, NULL, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_HOST_READ_BIT}; + vkCmdPipelineBarrier(commands[index], VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_HOST_BIT, 0, 1, &barrier, 0, NULL, 0, NULL); + assert(vkEndCommandBuffer(commands[index]) == VK_SUCCESS); + } + VkSemaphoreTypeCreateInfo type = {VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO, NULL, VK_SEMAPHORE_TYPE_TIMELINE, 0}; + VkSemaphoreCreateInfo create_gate = {VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, &type, 0}; + assert(vkCreateSemaphore(test_device, &create_gate, NULL, &gate) == VK_SUCCESS); + uint64_t value = 1; + VkTimelineSemaphoreSubmitInfo timeline = {VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, NULL, 1, &value, 0, NULL}; + VkPipelineStageFlags stage = VK_PIPELINE_STAGE_TRANSFER_BIT; + VkSubmitInfo first = {VK_STRUCTURE_TYPE_SUBMIT_INFO, &timeline, 1, &gate, &stage, 1, &commands[0], 0, NULL}; + assert(QueueSubmit(test_queue, 1, &first, VK_NULL_HANDLE) == VK_SUCCESS); + pthread_t signal_thread; + int64_t began = droiddeck_producer_now(); + assert(pthread_create(&signal_thread, NULL, signal_gate, NULL) == 0); + assert(producer_acquire(began + 1000000000LL)); + assert(droiddeck_producer_now() - began >= 20000000LL); + assert(pthread_join(signal_thread, NULL) == 0); + check_pixels(pixels, patterns[0]); + pthread_t writer; + assert(pthread_create(&writer, NULL, second_submit, NULL) == 0); + while (!atomic_load(&second_entered)) usleep(100); + usleep(50000); + assert(!atomic_load(&second_returned)); + check_pixels(pixels, patterns[0]); + producer_release(); + assert(pthread_join(writer, NULL) == 0); + assert(vkQueueWaitIdle(test_queue) == VK_SUCCESS); + check_pixels(pixels, patterns[1]); + value = 2; + assert(QueueSubmit(test_queue, 1, &first, VK_NULL_HANDLE) == VK_SUCCESS); + assert(!producer_acquire(droiddeck_producer_now() + 20000000LL)); + VkFence pending = g_producer_queues[0].fence; + assert(pending && vkGetFenceStatus(test_device, pending) == VK_NOT_READY); + assert(!producer_acquire(droiddeck_producer_now() + 20000000LL)); + assert(g_producer_queues[0].fence == pending); + VkSemaphoreSignalInfo release_gate = {VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO, NULL, gate, 2}; + assert(vkSignalSemaphore(test_device, &release_gate) == VK_SUCCESS); + assert(vkQueueWaitIdle(test_queue) == VK_SUCCESS); + assert(producer_acquire(droiddeck_producer_now() + 1000000000LL)); + producer_release(); + check_pixels(pixels, patterns[0]); + producer_destroy_device(&g_dev[0], NULL); + vkDestroySemaphore(test_device, gate, NULL); + vkDestroyCommandPool(test_device, pool, NULL); + vkUnmapMemory(test_device, memory); + vkDestroyBuffer(test_device, buffer, NULL); + vkFreeMemory(test_device, memory, NULL); + vkDestroyDevice(test_device, NULL); + vkDestroyInstance(instance, NULL); + puts("producer GPU: actual completion, frozen overwrite, timeout retention and 1024 buffer values passed"); + return 0; +} diff --git a/tools/vr/tests/test_producer_lease.c b/tools/vr/tests/test_producer_lease.c new file mode 100644 index 0000000000..c7a006d907 --- /dev/null +++ b/tools/vr/tests/test_producer_lease.c @@ -0,0 +1,115 @@ +#define _GNU_SOURCE +#define DROIDDECK_PRODUCER_SERVER +#include "../src/producer_lease.h" +#include <assert.h> +#include <stdatomic.h> + +static pthread_mutex_t queue_lock = PTHREAD_MUTEX_INITIALIZER; +static atomic_int completed; +static atomic_int released; +static atomic_int quarantined; +static atomic_int available; +static atomic_int slow; + +static int acquire(int64_t deadline) { + assert(deadline > droiddeck_producer_now()); + if (!atomic_load(&available)) return 0; + assert(pthread_mutex_lock(&queue_lock) == 0); + atomic_fetch_add(&completed, 1); + if (atomic_load(&slow)) usleep(170000); + return 1; +} + +static void release(void) { + atomic_fetch_add(&released, 1); + assert(pthread_mutex_unlock(&queue_lock) == 0); +} + +static void quarantine(void) { + atomic_store(&quarantined, 1); +} + +static void wait_count(atomic_int *counter, int expected) { + int64_t deadline = droiddeck_producer_now() + 1000000000LL; + while (atomic_load(counter) != expected && droiddeck_producer_now() < deadline) usleep(1000); + assert(atomic_load(counter) == expected); +} + +int main(void) { + char directory[] = "/tmp/droiddeck-producer-XXXXXX"; + assert(mkdtemp(directory)); + setenv("XDG_RUNTIME_DIR", directory, 1); + char parent[128]; + assert(snprintf(parent, sizeof(parent), "%s/droiddeck-steamvr", directory) > 0); + assert(mkdir(parent, 0755) == 0); + struct droiddeck_producer_server server = {.acquire = acquire, .release = release, .quarantine = quarantine}; + assert(!droiddeck_producer_start(&server)); + assert(chmod(parent, 0700) == 0); + char path[128]; + assert(droiddeck_producer_path(path, sizeof(path), getpid())); + int regular = open(path, O_CREAT | O_RDWR, 0600); + assert(regular >= 0); close(regular); + assert(!droiddeck_producer_start(&server)); + assert(unlink(path) == 0); + int stale = socket(AF_UNIX, SOCK_SEQPACKET, 0); + struct sockaddr_un address = {.sun_family = AF_UNIX}; + strcpy(address.sun_path, path); + assert(bind(stale, (struct sockaddr *)&address, sizeof(address)) == 0); + close(stale); + assert(droiddeck_producer_start(&server)); + struct stat metadata; + assert(stat(server.path, &metadata) == 0 && (metadata.st_mode & 0777) == 0600); + struct droiddeck_producer_server duplicate = server; + assert(!droiddeck_producer_start(&duplicate)); + struct droiddeck_producer_lease lease; + assert(!droiddeck_producer_acquire(getpid(), &lease)); + assert(!atomic_load(&completed)); + atomic_store(&available, 1); + assert(droiddeck_producer_acquire(getpid(), &lease)); + assert(fcntl(lease.descriptor, F_GETFD) & FD_CLOEXEC); + assert(pthread_mutex_trylock(&queue_lock) == EBUSY); + uint64_t first_ticket = lease.ticket; + usleep(300000); + assert(pthread_mutex_trylock(&queue_lock) == EBUSY && !atomic_load(&released)); + assert(droiddeck_producer_release(&lease)); + assert(lease.descriptor == -1 && atomic_load(&released) == 1); + assert(pthread_mutex_trylock(&queue_lock) == 0); + assert(pthread_mutex_unlock(&queue_lock) == 0); + assert(droiddeck_producer_acquire(getpid(), &lease)); + assert(lease.ticket > first_ticket); + assert(droiddeck_producer_release(&lease)); + atomic_store(&slow, 1); + assert(droiddeck_producer_acquire(getpid(), &lease)); + assert(droiddeck_producer_release(&lease)); + atomic_store(&slow, 0); + int abandoned = socket(AF_UNIX, SOCK_SEQPACKET, 0); + assert(connect(abandoned, (struct sockaddr *)&address, sizeof(address)) == 0); + struct droiddeck_producer_message request = {DROIDDECK_PRODUCER_MAGIC, DROIDDECK_PRODUCER_ACQUIRE, 0}; + atomic_store(&slow, 1); + int before = atomic_load(&completed); + assert(send(abandoned, &request, sizeof(request), MSG_NOSIGNAL) == sizeof(request)); + wait_count(&completed, before + 1); + close(abandoned); + wait_count(&released, 4); + assert(!atomic_load(&quarantined)); + atomic_store(&slow, 0); + char wrong_path[128]; + assert(droiddeck_producer_path(wrong_path, sizeof(wrong_path), (uint32_t)getpid() + 1)); + assert(link(server.path, wrong_path) == 0); + assert(!droiddeck_producer_acquire((uint32_t)getpid() + 1, &lease)); + assert(unlink(wrong_path) == 0); + assert(chmod(parent, 0755) == 0); + assert(!droiddeck_producer_acquire(getpid(), &lease)); + assert(chmod(parent, 0700) == 0); + assert(droiddeck_producer_acquire(getpid(), &lease)); + close(lease.descriptor); + wait_count(&quarantined, 1); + assert(atomic_load(&released) == 4); + assert(pthread_mutex_trylock(&queue_lock) == EBUSY); + assert(pthread_join(server.thread, NULL) == 0); + close(server.listener); + assert(unlink(server.path) == 0); + assert(rmdir(parent) == 0 && rmdir(directory) == 0); + puts("producer lease: peer PID, private socket, completion gate, retained ownership and disconnect quarantine passed"); + return 0; +} diff --git a/tools/vr/tests/test_render_target.cpp b/tools/vr/tests/test_render_target.cpp new file mode 100644 index 0000000000..a6d3cea401 --- /dev/null +++ b/tools/vr/tests/test_render_target.cpp @@ -0,0 +1,37 @@ +#include "render_target.h" +#include "../../../app/src/main/cpp/waylandcomp/src/headpose_shm.h" +#include <cstddef> +#include <cstdio> +#include <cstdlib> +#include <limits> + +static void check(float aspect, uint32_t selected, uint32_t panel, uint32_t w, uint32_t h) { + const auto result = droiddeck::RenderTarget(aspect, selected, panel); + if (result.width != w || result.height != h) { + std::fprintf(stderr, "FAIL: aspect %g, height %u, panel %u gave %ux%u, expected %ux%u\n", + aspect, selected, panel, result.width, result.height, w, h); + std::abort(); + } +} + +int main() { + static_assert(sizeof(droiddeck_headpose) == 128); + static_assert(offsetof(droiddeck_headpose, render_height) == 84); + check(1920.0f / 1080, 720, 1080, 1280, 720); + check(1920.0f / 1080, 900, 1080, 1600, 900); + check(1920.0f / 1080, 1080, 1080, 1920, 1080); + check(1920.0f / 1080, 1440, 1080, 1920, 1080); + check(1920.0f / 1200, 1200, 1200, 1920, 1200); + check(960.0f / 1080, 720, 1080, 640, 720); + check(1200.0f / 1080, 720, 1080, 800, 720); + check(16.0f / 9, 720, 0, 1280, 720); + check(16.0f / 9, 0, 1080, 1280, 720); + check(16.0f / 9, 720, 480, 853, 480); + check(0, 0, 0, 720, 720); + check(std::numeric_limits<float>::quiet_NaN(), 720, 1080, 720, 720); + check(std::numeric_limits<float>::infinity(), 720, 1080, 720, 720); + check(-1, 720, 1080, 720, 720); + check(1, UINT32_MAX, 0, 8192, 8192); + check(100, 720, 1080, 8192, 720); + std::puts("PASS: VR render targets follow the selected height and fit the panel"); +} diff --git a/tools/vr/tests/test_scheduling.c b/tools/vr/tests/test_scheduling.c new file mode 100644 index 0000000000..f5ac7592e8 --- /dev/null +++ b/tools/vr/tests/test_scheduling.c @@ -0,0 +1,58 @@ +#define _GNU_SOURCE +#include <assert.h> +#include <errno.h> +#include <linux/capability.h> +#include <stdint.h> +#include <stdio.h> +#include <sys/resource.h> +#include <sys/syscall.h> +#include <sys/wait.h> +#include <unistd.h> + +extern char *program_invocation_short_name; + +static int realtime_unavailable(void) { + struct rlimit priority; + struct __user_cap_header_struct header = {_LINUX_CAPABILITY_VERSION_3, 0}; + struct __user_cap_data_struct caps[2] = {{0}}; + assert(getrlimit(RLIMIT_RTPRIO, &priority) == 0); + assert(syscall(SYS_capget, &header, caps) == 0); + return priority.rlim_cur == 0 && + !(caps[CAP_SYS_NICE / 32].effective & (UINT32_C(1) << (CAP_SYS_NICE % 32))); +} + +static void check(int compositor) { + program_invocation_short_name = compositor ? "vrcompositor" : "vrserver"; + struct rlimit before, after, low = {100000, 200000}; + assert(getrlimit(RLIMIT_RTTIME, &before) == 0); + assert(before.rlim_cur > low.rlim_cur && before.rlim_max > low.rlim_max); + const int blocked = compositor && realtime_unavailable(); + int result = setrlimit(RLIMIT_RTTIME, &low); + if (blocked) { + assert(result == -1 && errno == EPERM); + assert(getrlimit(RLIMIT_RTTIME, &after) == 0); + assert(after.rlim_cur == before.rlim_cur && after.rlim_max == before.rlim_max); + assert(setrlimit(RLIMIT_RTTIME, &before) == 0); + } else { + assert(result == 0); + assert(getrlimit(RLIMIT_RTTIME, &after) == 0); + assert(after.rlim_cur == low.rlim_cur && after.rlim_max == low.rlim_max); + } + assert(getrlimit(RLIMIT_NOFILE, &before) == 0); + before.rlim_cur = 64; + assert(setrlimit(RLIMIT_NOFILE, &before) == 0); + assert(getrlimit(RLIMIT_NOFILE, &after) == 0 && after.rlim_cur == 64); + assert(setrlimit(-1, &before) == -1 && errno == EINVAL); +} + +int main(void) { + for (int compositor = 0; compositor <= 1; ++compositor) { + pid_t child = fork(); + assert(child >= 0); + if (!child) { check(compositor); _exit(0); } + int status; + assert(waitpid(child, &status, 0) == child); + assert(WIFEXITED(status) && WEXITSTATUS(status) == 0); + } + puts("SteamVR scheduling regression passed"); +} diff --git a/tools/vr/tests/test_semaphore_layer.c b/tools/vr/tests/test_semaphore_layer.c new file mode 100644 index 0000000000..89f4ce8ae7 --- /dev/null +++ b/tools/vr/tests/test_semaphore_layer.c @@ -0,0 +1,269 @@ +#define _GNU_SOURCE +#include <assert.h> +#include <fcntl.h> +#include "../src/vk_layer_droiddeck_vr.c" + +static const VkSubmitInfo *expected_submit; +static const VkSubmitInfo2 *expected_submit2; +static const VkSemaphoreWaitInfo *expected_wait; +static unsigned create_calls; +static unsigned destroyed; +static VkResult submit_result = VK_SUCCESS; +static int expect_dropped_wait; +static const void *expected_image_chain; +static const void *expected_external_tail; +static int expect_cloned_external; + +static VkResult VKAPI_CALL mock_image(VkDevice device, const VkImageCreateInfo *info, + const VkAllocationCallbacks *allocator, VkImage *output) { + (void)device; (void)allocator; (void)output; + if (expect_cloned_external) { + const VkExternalMemoryImageCreateInfo *external = info->pNext; + assert(external != expected_image_chain); + assert(external->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO); + assert(external->handleTypes == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT); + assert(external->pNext == expected_external_tail); + } else assert(info->pNext == expected_image_chain); + return VK_ERROR_FORMAT_NOT_SUPPORTED; +} + +static void check_shared_images(VkDevice device) { + VkBaseInStructure tail = {VK_STRUCTURE_TYPE_APPLICATION_INFO, NULL}; + VkExternalMemoryImageCreateInfo external = {VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, + &tail, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT}; + VkFormat formats[] = {VK_FORMAT_R8G8B8A8_SRGB, VK_FORMAT_R8G8B8A8_UNORM}; + VkImageFormatListCreateInfo list = {VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO, &external, 2, formats}; + VkImageCreateInfo image = {0}; + image.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; + image.pNext = &list; + image.flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT; + image.tiling = VK_IMAGE_TILING_OPTIMAL; + VkImage output; + /* Other targets, nonmutable, linear and DMA-BUF images retain their caller's chain. */ + expected_image_chain = &list; + assert(CreateImage(device, &image, NULL, &output) == VK_ERROR_FORMAT_NOT_SUPPORTED); + g_dev[0].quest_images = 1; + image.arrayLayers = 1; + assert(CreateImage(device, &image, NULL, &output) == VK_ERROR_FORMAT_NOT_SUPPORTED); + image.arrayLayers = 2; + image.flags = 0; + assert(CreateImage(device, &image, NULL, &output) == VK_ERROR_FORMAT_NOT_SUPPORTED); + image.flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT; + image.tiling = VK_IMAGE_TILING_LINEAR; + assert(CreateImage(device, &image, NULL, &output) == VK_ERROR_FORMAT_NOT_SUPPORTED); + image.tiling = VK_IMAGE_TILING_OPTIMAL; + external.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT; + assert(CreateImage(device, &image, NULL, &output) == VK_ERROR_FORMAT_NOT_SUPPORTED); + external.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT; + expected_image_chain = &external; + assert(CreateImage(device, &image, NULL, &output) == VK_ERROR_FORMAT_NOT_SUPPORTED); + assert(image.pNext == &list && list.pNext == &external && external.pNext == &tail); + /* The reverse chain order preserves its tail without modifying caller memory. */ + external.pNext = &list; list.pNext = &tail; image.pNext = &external; + expect_cloned_external = 1; expected_external_tail = &tail; + assert(CreateImage(device, &image, NULL, &output) == VK_ERROR_FORMAT_NOT_SUPPORTED); + assert(image.pNext == &external && external.pNext == &list && list.pNext == &tail); + expect_cloned_external = 0; g_dev[0].quest_images = 0; +} + +static VkResult VKAPI_CALL mock_submit(VkQueue queue, uint32_t count, const VkSubmitInfo *submits, VkFence fence) { + assert(queue && count == 1 && fence == VK_NULL_HANDLE); + if (expect_dropped_wait) { + assert(submits != expected_submit && submits->waitSemaphoreCount == 0); + const VkTimelineSemaphoreSubmitInfo *timeline = submits->pNext; + assert(timeline->sType == VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO && timeline->waitSemaphoreValueCount == 0); + assert(expected_submit->waitSemaphoreCount == 1); + return submit_result; + } + assert(submits == expected_submit); + assert(submits->waitSemaphoreCount == 1); + return submit_result; +} + +static VkResult VKAPI_CALL mock_submit2(VkQueue queue, uint32_t count, const VkSubmitInfo2 *submits, VkFence fence) { + assert(queue && count == 1 && fence == VK_NULL_HANDLE); + assert(submits == expected_submit2); + assert(submits->waitSemaphoreInfoCount == 1); + return submit_result; +} + +static VkResult VKAPI_CALL mock_wait(VkDevice device, const VkSemaphoreWaitInfo *info, uint64_t timeout) { + assert(device && info == expected_wait && timeout == 7654321); + assert(info->semaphoreCount == 65); + return VK_TIMEOUT; +} + +static VkResult VKAPI_CALL mock_create(VkDevice device, const VkSemaphoreCreateInfo *info, + const VkAllocationCallbacks *allocator, VkSemaphore *output) { + (void)device; + (void)allocator; + create_calls++; + for (const VkBaseInStructure *item = info->pNext; item; item = item->pNext) + if (item->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO) return VK_ERROR_INVALID_EXTERNAL_HANDLE; + *output = (VkSemaphore)(uintptr_t)(create_calls + 100); + return VK_SUCCESS; +} + +static void VKAPI_CALL mock_destroy(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *allocator) { + (void)device; + (void)semaphore; + (void)allocator; + destroyed++; +} + +static int expect_queue_lock; +static VkQueue other_queue; +static _Atomic int other_submitted; + +static void *signal_from_other_queue(void *unused) { + (void)unused; + assert(QueueSubmit(other_queue, 1, expected_submit, VK_NULL_HANDLE) == VK_SUCCESS); + atomic_store(&other_submitted, 1); + return NULL; +} + +static void check_queue_lock(void) { + int acquired = pthread_mutex_trylock(&g_submission_lock); + assert(acquired == 0); + if (!acquired) pthread_mutex_unlock(&g_submission_lock); + assert(g_producer_idle_calls == (unsigned)expect_queue_lock); + if (expect_queue_lock) assert(!producer_acquire(droiddeck_producer_now() + 10000000LL)); +} + +static VkResult VKAPI_CALL mock_queue_idle(VkQueue queue) { + assert(queue); check_queue_lock(); + if (expect_queue_lock) { + VkSubmitInfo signal = {VK_STRUCTURE_TYPE_SUBMIT_INFO, NULL, 1, NULL, NULL, 0, NULL, 0, NULL}; + expected_submit = &signal; + pthread_t worker; atomic_store(&other_submitted, 0); + assert(pthread_create(&worker, NULL, signal_from_other_queue, NULL) == 0); + int64_t deadline = droiddeck_producer_now() + 1000000000LL; + while (!atomic_load(&other_submitted) && droiddeck_producer_now() < deadline) usleep(1000); + assert(atomic_load(&other_submitted)); pthread_join(worker, NULL); + } + return VK_ERROR_DEVICE_LOST; +} + +static VkResult VKAPI_CALL mock_device_idle(VkDevice device) { + assert(device); check_queue_lock(); return VK_ERROR_DEVICE_LOST; +} + +static VkResult VKAPI_CALL mock_counter(VkDevice device, VkSemaphore semaphore, uint64_t *value) { + (void)device; (void)semaphore; + *value = 0; + return VK_SUCCESS; +} + +static VkResult VKAPI_CALL mock_signal(VkDevice device, const VkSemaphoreSignalInfo *info) { + (void)device; (void)info; + assert(0); + return VK_SUCCESS; +} + +static PFN_vkVoidFunction VKAPI_CALL mock_proc(VkDevice device, const char *name) { + (void)device; + if (!strcmp(name, "vkGetSemaphoreCounterValue")) return (PFN_vkVoidFunction)mock_counter; + if (!strcmp(name, "vkSignalSemaphore")) return (PFN_vkVoidFunction)mock_signal; + if (!strcmp(name, "vkCreateImage")) return (PFN_vkVoidFunction)mock_image; + if (!strcmp(name, "vkQueueWaitIdle")) return (PFN_vkVoidFunction)mock_queue_idle; + if (!strcmp(name, "vkDeviceWaitIdle")) return (PFN_vkVoidFunction)mock_device_idle; + if (!strcmp(name, "vkQueueSubmit")) return (PFN_vkVoidFunction)mock_submit; + if (!strcmp(name, "vkQueueSubmit2")) return (PFN_vkVoidFunction)mock_submit2; + if (!strcmp(name, "vkWaitSemaphores")) return (PFN_vkVoidFunction)mock_wait; + if (!strcmp(name, "vkCreateSemaphore")) return (PFN_vkVoidFunction)mock_create; + if (!strcmp(name, "vkDestroySemaphore")) return (PFN_vkVoidFunction)mock_destroy; + assert(0); + return NULL; +} + +int main(void) { + setenv("DROIDDECK_VR_LAYER_QUIET", "1", 1); + void *dispatch = &dispatch; + VkDevice device = (VkDevice)&dispatch; + VkQueue queue = (VkQueue)&dispatch; + void *other_dispatch = dispatch; + other_queue = (VkQueue)&other_dispatch; + g_producer_retry_at = INT64_MAX; + g_dev[0] = (struct dev){device, mock_proc, NULL, 1, 0, 0, 0}; + check_shared_images(device); + g_poller_started = 1; + PFN_vkQueueWaitIdle queue_idle = (PFN_vkQueueWaitIdle)semaphore_hook("vkQueueWaitIdle"); + PFN_vkDeviceWaitIdle device_idle = (PFN_vkDeviceWaitIdle)semaphore_hook("vkDeviceWaitIdle"); + assert(queue_idle && device_idle); + for (int producer = 0; producer <= 1; producer++) { + g_dev[0].producer = producer; + expect_queue_lock = producer; + assert(queue_idle(queue) == VK_ERROR_DEVICE_LOST); + assert(device_idle(device) == VK_ERROR_DEVICE_LOST); + assert(g_producer_idle_calls == 0); + } + g_dev[0].producer = 0; + VkExportSemaphoreCreateInfo export_info = {VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, NULL, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT}; + VkSemaphoreCreateInfo create = {VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, &export_info, 0}; + VkSemaphore semaphore = VK_NULL_HANDLE; + assert(CreateSemaphore(device, &create, NULL, &semaphore) == VK_ERROR_INVALID_EXTERNAL_HANDLE); + assert(create_calls == 1 && !semaphore); + VkSemaphoreTypeCreateInfo type = {VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO, &export_info, + VK_SEMAPHORE_TYPE_TIMELINE, 0}; + create.pNext = &type; + assert(CreateSemaphore(device, &create, NULL, &semaphore) == VK_SUCCESS); + struct bridged *bridge = bridged_find(semaphore); + assert(bridge && atomic_load(bridge->counter) == 0); + VkPipelineStageFlags stage = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; + uint64_t value = 9; + VkTimelineSemaphoreSubmitInfo timeline = {VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, NULL, 1, &value, 0, NULL}; + VkSubmitInfo submit = {VK_STRUCTURE_TYPE_SUBMIT_INFO, &timeline, 1, &semaphore, &stage, 0, NULL, 0, NULL}; + expected_submit = &submit; + assert(QueueSubmit(queue, 1, &submit, VK_NULL_HANDLE) == VK_SUCCESS); + assert(atomic_load(bridge->counter) == 0); + VkSemaphoreSubmitInfo wait2 = {VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO, NULL, semaphore, value, + VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, 0}; + VkSubmitInfo2 submit2 = {VK_STRUCTURE_TYPE_SUBMIT_INFO_2, NULL, 0, 1, &wait2, 0, NULL, 0, NULL}; + expected_submit2 = &submit2; + assert(QueueSubmit2(queue, 1, &submit2, VK_NULL_HANDLE) == VK_SUCCESS); + submit_result = VK_ERROR_DEVICE_LOST; + assert(QueueSubmit(queue, 1, &submit, VK_NULL_HANDLE) == VK_ERROR_DEVICE_LOST); + assert(QueueSubmit2(queue, 1, &submit2, VK_NULL_HANDLE) == VK_ERROR_DEVICE_LOST); + VkSemaphore semaphores[65]; + uint64_t values[65]; + for (unsigned index = 0; index < 65; index++) { semaphores[index] = semaphore; values[index] = value; } + VkSemaphoreWaitInfo wait = {VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO, NULL, VK_SEMAPHORE_WAIT_ANY_BIT, 65, semaphores, values}; + expected_wait = &wait; + assert(WaitSemaphores(device, &wait, 7654321) == VK_TIMEOUT); + int descriptor = dup(bridge->fd); + VkSemaphore binary = (VkSemaphore)(uintptr_t)999; + VkImportSemaphoreFdInfoKHR import_info = {VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR, NULL, binary, 0, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT, descriptor}; + assert(ImportSemaphoreFdKHR(device, &import_info) == VK_ERROR_INVALID_EXTERNAL_HANDLE); + assert(fcntl(descriptor, F_GETFD) >= 0); + timeline_note(binary, 1); + assert(ftruncate(descriptor, 32) == 0); + assert(ImportSemaphoreFdKHR(device, &import_info) == VK_ERROR_INVALID_EXTERNAL_HANDLE); + assert(ftruncate(descriptor, 4096) == 0); + import_info.flags = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT; + assert(ImportSemaphoreFdKHR(device, &import_info) == VK_ERROR_INVALID_EXTERNAL_HANDLE); + import_info.flags = 0; + assert(ImportSemaphoreFdKHR(device, &import_info) == VK_SUCCESS); + VkSubmitInfo imported_wait = submit; + imported_wait.pWaitSemaphores = &binary; + expected_submit = &imported_wait; + submit_result = VK_SUCCESS; + expect_dropped_wait = 1; + assert(QueueSubmit(queue, 1, &imported_wait, VK_NULL_HANDLE) == VK_SUCCESS); + expect_dropped_wait = 0; + VkSemaphoreGetFdInfoKHR get_info = {VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR, NULL, binary, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT}; + int reexported = -1; + assert(GetSemaphoreFdKHR(device, &get_info, &reexported) == VK_SUCCESS && reexported >= 0); + assert(fd_ino(reexported) == fd_ino(descriptor)); + close(reexported); + get_info.handleType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT; + assert(GetSemaphoreFdKHR(device, &get_info, &reexported) == VK_ERROR_INVALID_EXTERNAL_HANDLE); + DestroySemaphore(device, binary, NULL); + assert(fcntl(descriptor, F_GETFD) == -1 && errno == EBADF); + DestroySemaphore(device, semaphore, NULL); + assert(destroyed == 2 && !bridged_find(semaphore)); + puts("semaphore layer: pending waits retained, unsignalled imported waits dropped, errors propagated, unsupported binary imports refused, fd ownership passed"); + return 0; +} diff --git a/tools/vr/tests/test_spatial_tracking.cpp b/tools/vr/tests/test_spatial_tracking.cpp new file mode 100644 index 0000000000..4028502419 --- /dev/null +++ b/tools/vr/tests/test_spatial_tracking.cpp @@ -0,0 +1,387 @@ +#include "spatial_tracking.h" +#include <cassert> +#include <cstddef> +#include <cstdio> +#include <limits> + +static float PoseAngle(const float *a, const float *b) { + double dot=0,normA=0,normB=0; + for (int i=0; i<4; ++i) { + dot+=double(a[i])*b[i];normA+=double(a[i])*a[i];normB+=double(b[i])*b[i]; + } + return float(2*std::acos(std::clamp(std::abs(dot)/std::sqrt(normA*normB),0.,1.))); +} + +static void CheckPredictionDirection() { + for (const int framesPerSample : {10,20}) { + OpticalPose pose; + dd_spatial_hand hand{}; + for (int frame=0; frame<2000; ++frame) { + if (frame%framesPerSample==0) { + const int sample=frame/framesPerSample; + const float sign=sample%2 ? -1.f : 1.f; + const float position=sample ? sign*.004f : 0; + const float angle=sample ? sign*.05f : 0; + hand.pose={30000000000LL+frame*4000000LL,{position,0,0}, + {0,sign*std::sin(angle*.5f),0,sign*std::cos(angle*.5f)},DD_SPATIAL_VALID}; + } + assert(pose.Update(hand,true,30060000000LL+frame*4000000LL,1,1)); + assert(!pose.predict); + assert(std::abs(pose.rendered.position[0])<=.004f); + } + } +} + +static void CheckSmallMotion() { + for (const int framesPerSample : {10,20}) { + OpticalPose pose; + dd_spatial_hand hand{}; + const float identity[]={0,0,0,1}; + float previousPosition=0,previousAngle=0; + for (int sample=0; sample<56; ++sample) { + const int step=sample<16 ? 0 : sample<28 ? sample-15 : sample<44 ? 12 : 55-sample; + const float position=step*.0002f,angle=step*.000872665f; + hand.pose={70000000000LL+sample*framesPerSample*4000000LL,{position,0,0}, + {0,std::sin(angle*.5f),0,std::cos(angle*.5f)},DD_SPATIAL_VALID}; + for (int frame=0; frame<framesPerSample; ++frame) { + assert(pose.Update(hand,true,hand.pose.time_ns+60000000LL+frame*4000000LL,1,1)); + if (frame==0 && (sample==16 || sample==44)) { + const float direction=sample==16 ? 1.f : -1.f; + assert(direction*(pose.rendered.position[0]-previousPosition)>.00002f); + assert(direction*(PoseAngle(identity,pose.rendered.rotation)-previousAngle)>.00008f); + } + assert(pose.rendered.time_ns==hand.pose.time_ns); + } + const float actualAngle=PoseAngle(identity,pose.rendered.rotation); + assert(std::abs(pose.rendered.position[0]-position)<.0002f); + assert(std::abs(actualAngle-angle)<.00012f); + if ((sample>=16 && sample<28) || sample>=44) { + const float direction=sample<28 ? 1.f : -1.f; + assert(direction*(pose.rendered.position[0]-previousPosition)>.0001f); + assert(direction*(actualAngle-previousAngle)>.0005f); + } + previousPosition=pose.rendered.position[0];previousAngle=actualAngle; + } + } +} + +static void CheckPalmMotion() { + for (const int framesPerSample : {10,20}) { + OpticalPose pose; + dd_spatial_hand hand{}; + const float identity[]={0,0,0,1}; + float maximumPositionError=0,maximumAngleError=0; + for (int frame=0; frame<1000; ++frame) { + if (frame%framesPerSample==0) { + const float elapsed=frame*.004f; + const float angle=elapsed*.1f; + hand.pose={40000000000LL+frame*4000000LL,{elapsed*.01f,0,0}, + {0,std::sin(angle*.5f),0,std::cos(angle*.5f)},DD_SPATIAL_VALID}; + } + assert(pose.Update(hand,true,40060000000LL+frame*4000000LL,1,1)); + if (frame>250) { + const float observedAngle=float(hand.pose.time_ns-40000000000LL)*1e-9f*.1f; + maximumPositionError=std::max(maximumPositionError,std::abs(pose.rendered.position[0]-hand.pose.position[0])); + maximumAngleError=std::max(maximumAngleError,std::abs(PoseAngle(identity,pose.rendered.rotation)-observedAngle)); + } + } + std::printf("Palm %.1fHz slow motion maximum error position=%.3fmm rotation=%.3fdeg\n", + 250./framesPerSample,maximumPositionError*1000,maximumAngleError*180/M_PI); + assert(maximumPositionError<.001f && maximumAngleError<.013f); + pose.Reset(); + hand.pose={50000000000LL,{0,0,0},{0,0,0,1},DD_SPATIAL_VALID}; + for (int frame=0; frame<framesPerSample; ++frame) + assert(pose.Update(hand,true,50060000000LL+frame*4000000LL,1,1)); + hand.pose.time_ns+=framesPerSample*4000000LL; + hand.pose.position[0]=.1f; + hand.pose.rotation[1]=std::sin(float(M_PI/4)); + hand.pose.rotation[3]=std::cos(float(M_PI/4)); + int positionResponseMs=-1,rotationResponseMs=-1; + for (int frame=0; frame<20; ++frame) { + assert(pose.Update(hand,true,hand.pose.time_ns+60000000LL+frame*4000000LL,1,1)); + const auto &rendered=pose.rendered; + assert(rendered.position[0]>=0 && rendered.position[0]<=.100001f && !pose.predict); + if (positionResponseMs<0 && rendered.position[0]>=.095f) positionResponseMs=frame*4; + if (rotationResponseMs<0 && PoseAngle(identity,rendered.rotation)>=float(M_PI*.475)) + rotationResponseMs=frame*4; + assert(rendered.time_ns==hand.pose.time_ns); + } + assert(positionResponseMs>=36 && positionResponseMs<=52); + assert(rotationResponseMs>=36 && rotationResponseMs<=52); + std::printf("Palm %.1fHz 95%% step response position=%dms rotation=%dms after receipt\n", + 250./framesPerSample,positionResponseMs,rotationResponseMs); + const auto observed=pose.last; + hand.pose.position[0]=2; + hand.pose.rotation[1]=0;hand.pose.rotation[3]=1; + assert(pose.Update(hand,true,hand.pose.time_ns+140000000LL,1,1)); + assert(std::memcmp(&pose.last,&observed,sizeof(observed))==0); + } +} + +static void CheckVisualHold() { + OpticalPose pose; + OpticalInputs input; + dd_spatial_hand hand{}; + for (int sample=0; sample<3; ++sample) { + hand.pose={60000000000LL+sample*80000000LL,{sample*.02f,0,0},{0,0,0,1}, + DD_SPATIAL_VALID|DD_SPATIAL_TRIGGER_VALID|DD_SPATIAL_GRIP_VALID}; + hand.trigger=sample==2 ? 1.f : 0.f;hand.grip=sample==2 ? 1u : 0u; + assert(input.Update(hand,true,hand.pose.time_ns+60000000LL,1,1)); + for (int frame=0; frame<20; ++frame) + assert(pose.Update(hand,true,hand.pose.time_ns+60000000LL+frame*4000000LL,1,1)); + } + assert(pose.predict && input.click && input.grip); + const auto held=pose.rendered; + const int64_t capture=hand.pose.time_ns; + assert(pose.Update({},true,capture+140000000LL,1,1)); + assert(!input.Update({},true,capture+140000000LL,1,1)); + assert(!input.click && !input.grip && input.trigger==0); + assert(!pose.predict && !pose.receivedAt && !pose.observations); + auto repeated=hand;repeated.pose.position[0]=9; + for (int ageMs : {150,200,201,300,350}) { + const int64_t now=capture+ageMs*1000000LL; + assert(pose.Update(repeated,true,now,1,1)); + input.Update(repeated,true,now,1,1); + assert(!input.click && !input.grip && input.trigger==0); + assert(pose.last.pose.time_ns==capture); + assert(std::memcmp(&pose.rendered,&held,sizeof(held))==0); + assert(!pose.predict && !pose.receivedAt && !pose.observations); + } + auto stale=hand;stale.pose.time_ns+=20000000LL;stale.pose.position[0]=5; + assert(pose.Update(stale,true,capture+350000000LL,1,1)); + assert(pose.last.pose.time_ns==capture && std::memcmp(&pose.rendered,&held,sizeof(held))==0); + assert(!pose.Update(stale,true,capture+350000001LL,1,1)); + assert(!pose.last.pose.time_ns && !pose.rendered.flags); + assert(!pose.Update(repeated,true,capture+351000000LL,1,1)); + OpticalPose unseen; + assert(!unseen.Update(stale,true,stale.pose.time_ns+200000001LL,1,1)); + auto fresh=hand;fresh.pose.time_ns=capture+350000000LL;fresh.pose.position[0]=.5f; + fresh.pose.rotation[1]=std::sin(.3f);fresh.pose.rotation[3]=std::cos(.3f); + assert(pose.Update(fresh,true,capture+400000000LL,1,1)); + assert(pose.rendered.position[0]==.5f && !pose.predict); + assert(PoseAngle(pose.rendered.rotation,fresh.pose.rotation)<1e-6f); + assert(pose.rendered.time_ns==fresh.pose.time_ns); + assert(input.Update(fresh,true,capture+400000000LL,1,1)); + assert(!input.click && !input.grip && input.trigger==0); + for (int reset=0; reset<3; ++reset) { + OpticalPose resetPose; + assert(resetPose.Update(hand,true,capture,1,1)); + assert(resetPose.Update({},true,capture+150000000LL,1,1)); + const uint64_t connection=reset==1 ? 2 : 1,origin=reset==2 ? 2 : 1; + assert(!resetPose.Update({},reset!=0,capture+160000000LL,connection,origin)); + assert(!resetPose.last.pose.time_ns && !resetPose.rendered.flags); + assert(!resetPose.Update({},true,capture+170000000LL,connection,origin)); + } +} + +int main() { + CheckPredictionDirection(); + CheckSmallMotion(); + CheckPalmMotion(); + CheckVisualHold(); + static_assert(sizeof(droiddeck_spatialpose) == 176); + static_assert(offsetof(droiddeck_spatialpose, head) == 40); + static_assert(offsetof(droiddeck_spatialpose, hands) == 80); + char path[] = "/tmp/droiddeck-spatial-XXXXXX"; + int fd = mkstemp(path); assert(fd >= 0); + droiddeck_spatialpose out{}, s{}; + s.magic = DROIDDECK_SPATIALPOSE_MAGIC; s.version = DROIDDECK_SPATIALPOSE_VERSION; s.size = sizeof(s); + s.head = {1000000000LL, {1,2,3}, {0,0,0,1}, DD_SPATIAL_VALID}; + s.hands[0].pose = s.head; s.hands[0].pose.time_ns -= 50000000; + { + SpatialFile empty(path); assert(!empty.Read(&out)); + assert(write(fd, &s, sizeof(s)-1) == sizeof(s)-1); assert(!empty.Read(&out)); + } + assert(pwrite(fd, &s, sizeof(s), 0) == sizeof(s)); + { + SpatialFile reader(path); assert(reader.Read(&out)); + assert(out.hands[0].pose.time_ns == 950000000); + s.seq = 1; assert(pwrite(fd, &s, sizeof(s), 0) == sizeof(s)); assert(!reader.Read(&out)); + s.seq = 2; s.version = 99; assert(pwrite(fd, &s, sizeof(s), 0) == sizeof(s)); assert(!reader.Read(&out)); + s.version = 1; assert(pwrite(fd, &s, sizeof(s), 0) == sizeof(s)); assert(!reader.Read(&out)); + s.version = 2; assert(pwrite(fd, &s, sizeof(s), 0) == sizeof(s)); assert(!reader.Read(&out)); + s.input_epochs = 0x04030201; + s.version = DROIDDECK_SPATIALPOSE_VERSION; s.head.time_ns += 90000000; assert(pwrite(fd, &s, sizeof(s), 0) == sizeof(s)); assert(reader.Read(&out)); + assert(SpatialFresh(out.head, 1190000000)); assert(!SpatialFresh(out.head,1190000001)); + assert(out.hands[0].pose.time_ns == 950000000); + assert(out.input_epochs == 0x04030201); + assert(SpatialHandFresh(out.hands[0],1150000000)); assert(!SpatialHandFresh(out.hands[0],1150000001)); + } + close(fd); unlink(path); + assert(!SpatialFresh(s.head,1)); + s.head.position[0] = std::numeric_limits<float>::quiet_NaN(); assert(!SpatialFresh(s.head,1100000000)); + auto hand=s.hands[0]; hand.pose.time_ns=1000000000; hand.trigger=1; hand.grip=1; + hand.pose.flags |= DD_SPATIAL_TRIGGER_VALID | DD_SPATIAL_GRIP_VALID; + OpticalInputs input; + assert(input.Update(hand,true,1000000000,7,1)); assert(!input.click && !input.grip); + auto updateInput = [&](float trigger, uint32_t grip, uint16_t epochs = 0) { + hand.pose.time_ns += 10000000; + hand.trigger=trigger; hand.grip=grip; + return input.Update(hand,true,hand.pose.time_ns,7,1,epochs); + }; + updateInput(0,0); assert(input.armed && input.gripArmed); + updateInput(.8f,1); assert(input.click && input.grip); + updateInput(.5f,1); assert(input.click); + updateInput(.4f,1); assert(!input.click && input.grip); + updateInput(1,1); assert(input.click && input.grip); + assert(input.Update(hand,true,hand.pose.time_ns+200000000,7,1)); assert(input.click && input.grip); + assert(!input.Update(hand,true,hand.pose.time_ns+200000001,7,1)); assert(!input.armed && !input.grip && input.trigger==0); + hand.pose.time_ns += 210000000; + updateInput(1,1); assert(!input.click && !input.grip); + updateInput(0,0); updateInput(1,1); assert(input.click && input.grip); + hand.pose.flags &= ~DD_SPATIAL_TRIGGER_VALID; + updateInput(1,1); assert(!input.armed && !input.click && input.trigger==0 && input.grip); + hand.pose.flags |= DD_SPATIAL_TRIGGER_VALID; + updateInput(1,1); assert(!input.click && input.grip); + updateInput(0,1); updateInput(1,1); assert(input.click); + hand.pose.flags &= ~DD_SPATIAL_GRIP_VALID; + updateInput(1,1); assert(input.click && !input.grip && !input.gripArmed); + hand.pose.flags |= DD_SPATIAL_GRIP_VALID; + updateInput(1,1); assert(input.click && !input.grip); + updateInput(1,0); updateInput(1,1); assert(input.grip); + + updateInput(1,1,0x0100); assert(input.click && !input.grip && !input.gripArmed); + updateInput(1,1,0x0100); assert(input.click && !input.grip); + updateInput(1,0,0x0100); updateInput(1,1,0x0100); assert(input.grip); + updateInput(1,1,0x0101); assert(!input.click && !input.armed && input.grip); + updateInput(0,1,0x0101); updateInput(1,1,0x0101); assert(input.click && input.grip); + updateInput(1,1,0x0202); assert(!input.click && !input.grip); + updateInput(0,0,0x0202); updateInput(1,1,0x0202); assert(input.click && input.grip); + + input.Update({},false,hand.pose.time_ns+1,7,1,0x0202); + hand.trigger=0; hand.grip=0; + input.Update(hand,true,hand.pose.time_ns+2,7,1,0x0202); assert(!input.armed && !input.gripArmed); + updateInput(1,1,0x0202); assert(!input.click && !input.grip); + updateInput(0,0,0x0202); updateInput(1,1,0x0202); assert(input.click && input.grip); + hand.pose.time_ns+=210000000; + updateInput(1,1,0x0202); assert(!input.click && !input.grip); + updateInput(0,0,0x0202); updateInput(1,1,0x0202); + auto backwards=hand; backwards.pose.time_ns-=1000000; backwards.trigger=0; backwards.grip=0; + assert(!input.Update(backwards,true,hand.pose.time_ns,7,1,0x0202)); assert(!input.armed && !input.gripArmed); + updateInput(0,0,0x0202); updateInput(1,1,0x0202); + input.Update(hand,true,hand.pose.time_ns,7,2,0x0202); assert(!input.click && !input.grip); + hand.pose.time_ns=1210000000; + + OpticalPose pose; + assert(pose.Update(hand,true,1210000000,7,2)); + auto corrupt = hand; corrupt.pose.position[0] = std::numeric_limits<float>::quiet_NaN(); + assert(pose.Update(corrupt,true,1220000000,7,2)); + assert(pose.last.pose.position[0] == hand.pose.position[0]); + auto future = hand; future.pose.time_ns = 1500000000; + assert(pose.Update(future,true,1230000000,7,2)); + assert(pose.last.pose.time_ns == 1210000000); + auto old = hand; old.pose.time_ns -= 10000000; old.pose.position[0] = 99; + assert(pose.Update(old,true,1240000000,7,2)); + assert(pose.last.pose.time_ns == 1210000000); + assert(pose.Update({},true,1410000000,7,2)); + assert(pose.Update({},true,1560000000,7,2)); + assert(!pose.Update({},true,1560000001,7,2)); + + for (const int64_t delay : {60000000LL, 80000000LL, 120000000LL}) { + pose.Reset(); + hand.pose = {2000000000LL, {0,0,0}, {0,0,0,1.002f}, DD_SPATIAL_VALID}; + float previous = 0; + for (int sample=0; sample<8; ++sample) { + hand.pose.time_ns = 2000000000LL+sample*80000000LL; + hand.pose.position[0] = sample*.02f; + const float sign = sample%2 ? -1.f : 1.f; + hand.pose.rotation[1] = sign*1.002f*std::sin(sample*.05f); + hand.pose.rotation[3] = sign*1.002f*std::cos(sample*.05f); + float midway = 0; + for (int frame=0; frame<20; ++frame) { + const int64_t now = hand.pose.time_ns+delay+frame*4000000LL; + assert(pose.Update(hand,true,now,7,3)); + assert(pose.receivedAt==hand.pose.time_ns+delay); + assert(pose.rendered.time_ns==hand.pose.time_ns); + assert(pose.rendered.position[0]<=hand.pose.position[0]+.020001f); + float norm=0; for(float v:pose.rendered.rotation) norm+=v*v; + assert(std::abs(norm-1)<1e-5); + if (sample>=4) { + assert(pose.predict); + assert(pose.rendered.position[0]>previous+.0005f); + assert(pose.rendered.position[0]<previous+.006f); + const float movingTarget = hand.pose.position[0]+frame*.001f; + assert(std::abs(pose.rendered.position[0]-movingTarget)<.006f); + } + if (frame==10) midway = pose.rendered.position[0]; + if (sample>=4 && frame==19) assert(pose.rendered.position[0]-midway>.005f); + previous = pose.rendered.position[0]; + } + } + const int64_t stoppedAt = hand.pose.time_ns+80000000; + const float beforeStop = pose.rendered.position[0]; + hand.pose.time_ns = stoppedAt; + for (int frame=0; frame<20; ++frame) { + assert(pose.Update(hand,true,stoppedAt+delay+frame*4000000LL,7,3)); + assert(pose.rendered.position[0]<=beforeStop); + assert(pose.rendered.position[0]>=hand.pose.position[0]); + } + assert(std::abs(pose.rendered.position[0]-hand.pose.position[0])<.0001f); + + hand.pose.time_ns+=80000000; hand.pose.position[0]-=.04f; + previous = pose.rendered.position[0]; + for (int frame=0; frame<20; ++frame) { + assert(pose.Update(hand,true,hand.pose.time_ns+delay+frame*4000000LL,7,3)); + assert(!pose.predict); + assert(pose.rendered.position[0]<=previous); + assert(pose.rendered.position[0]>=hand.pose.position[0]); + previous=pose.rendered.position[0]; + } + hand.pose.time_ns+=80000000; hand.pose.position[0]-=.04f; + pose.Update(hand,true,hand.pose.time_ns+delay,7,3); + assert(pose.predict); + for (int frame=1; frame<20; ++frame) { + pose.Update(hand,true,hand.pose.time_ns+delay+frame*4000000LL,7,3); + assert(pose.rendered.position[0]>=hand.pose.position[0]-.020001f); + } + hand.pose.time_ns+=80000000; hand.pose.position[0]+=1.f; + pose.Update(hand,true,hand.pose.time_ns+delay,7,3); + assert(!pose.predict); + for (int frame=1; frame<20; ++frame) { + pose.Update(hand,true,hand.pose.time_ns+delay+frame*4000000LL,7,3); + assert(pose.rendered.position[0]<=hand.pose.position[0]); + } + } + + const auto held = pose.rendered; + pose.Update({},true,hand.pose.time_ns+196000000,7,3); + assert(!pose.predict && !pose.receivedAt); + assert(std::memcmp(&pose.rendered,&held,sizeof(held))==0); + pose.Update(hand,true,hand.pose.time_ns+198000000,7,3); + assert(std::memcmp(&pose.rendered,&held,sizeof(held))==0); + assert(pose.Update({},true,hand.pose.time_ns+200000000,7,3)); + assert(pose.Update({},true,hand.pose.time_ns+350000000,7,3)); + assert(!pose.Update({},true,hand.pose.time_ns+350000001,7,3)); + hand.pose.time_ns+=400000000; hand.pose.position[0]=.5f; + pose.Update(hand,true,hand.pose.time_ns+60000000,7,3); + assert(pose.rendered.position[0]==.5f && !pose.predict); + hand.pose.time_ns+=80000000; hand.pose.position[0]=.6f; + pose.Update(hand,true,hand.pose.time_ns+60000000,7,4); + assert(pose.rendered.position[0]==.6f && !pose.predict); + hand.pose.time_ns+=80000000; hand.pose.position[0]=.7f; + pose.Update(hand,true,hand.pose.time_ns+60000000,8,4); + assert(pose.rendered.position[0]==.7f && !pose.predict); + pose.Update({},false,hand.pose.time_ns+64000000,8,4); + assert(!pose.last.pose.time_ns && !pose.receivedAt && !pose.predict); + + pose.Reset(); + const int64_t delays[] = {60000000,120000000,80000000,60000000,120000000,80000000}; + int sample=0; + hand.pose = {6000000000LL, {0,0,0}, {0,0,0,1}, DD_SPATIAL_VALID}; + float previous=0; + for (int64_t now=6060000000LL; now<6556000000LL; now+=4000000) { + if (sample<5 && now>=6000000000LL+(sample+1)*80000000LL+delays[sample+1]) { + ++sample; + hand.pose.time_ns=6000000000LL+sample*80000000LL; + hand.pose.position[0]=sample*.02f; + } + assert(pose.Update(hand,true,now,8,4)); + assert(pose.receivedAt==hand.pose.time_ns+delays[sample]); + assert(pose.rendered.position[0]>=previous); + assert(pose.rendered.position[0]<=previous+.01f); + assert(pose.rendered.position[0]<=hand.pose.position[0]+.020001f); + assert(pose.rendered.time_ns==hand.pose.time_ns); + previous=pose.rendered.position[0]; + } + puts("PASS: spatial layout, files, freshness, independent timestamps and optical input recovery"); +} diff --git a/tools/vr/tests/test_timeline_bridge.c b/tools/vr/tests/test_timeline_bridge.c new file mode 100644 index 0000000000..3e23324d7c --- /dev/null +++ b/tools/vr/tests/test_timeline_bridge.c @@ -0,0 +1,63 @@ +#define _GNU_SOURCE +#include <ucontext.h> +#include <assert.h> +#include <stdint.h> + +#include "../src/vk_layer_droiddeck_vr.c" + +static _Atomic uint64_t local_value; +static _Atomic unsigned duplicate_signals; +static pthread_t submit_thread; +static int first_read = 1; + +static VkResult VKAPI_CALL get_value(VkDevice device, VkSemaphore semaphore, uint64_t *value) { + (void)device; + (void)semaphore; + *value = atomic_load(&local_value); + if (pthread_equal(pthread_self(), submit_thread) && first_read) { + first_read = 0; + assert(pthread_create(&g_poller, NULL, poller, NULL) == 0); + const uint64_t until = now_us() + 2000000; + while (!atomic_load(&local_value) && now_us() < until) usleep(100); + assert(atomic_load(&local_value) == 1); + } + return VK_SUCCESS; +} + +static VkResult VKAPI_CALL signal_value(VkDevice device, const VkSemaphoreSignalInfo *info) { + (void)device; + if (info->value <= atomic_load(&local_value)) { + atomic_fetch_add(&duplicate_signals, 1); + return VK_ERROR_DEVICE_LOST; + } + atomic_store(&local_value, info->value); + return VK_SUCCESS; +} + +static PFN_vkVoidFunction VKAPI_CALL get_proc(VkDevice device, const char *name) { + (void)device; + if (!strcmp(name, "vkGetSemaphoreCounterValue")) return (PFN_vkVoidFunction)get_value; + if (!strcmp(name, "vkSignalSemaphore")) return (PFN_vkVoidFunction)signal_value; + assert(0); + return NULL; +} + +int main(void) { + uintptr_t dispatch = 1; + VkDevice device = (VkDevice)&dispatch; + VkSemaphore semaphore = (VkSemaphore)(uintptr_t)2; + _Atomic uint64_t shared = 1; + g_dev[0] = (struct dev){.handle = device, .gdpa = get_proc}; + g_br[0] = (struct bridged){.sem = semaphore, .dev = device, .counter = &shared, + .fd = -1, .timeline = 1, .seen = 1, .seen_us = now_us(), .imported = 1}; + submit_thread = pthread_self(); + + submit_drop_wait(semaphore, 1); + assert(atomic_load(&local_value) == 1); + assert(atomic_load(&duplicate_signals) == 0); + assert(submit_drop_wait(semaphore, 1) == 0); + pthread_cancel(g_poller); + pthread_join(g_poller, NULL); + puts("PASS: a concurrent bridge signal cannot be repeated by the submit thread"); + return 0; +} diff --git a/tools/vr/tests/test_wsi_capture.cpp b/tools/vr/tests/test_wsi_capture.cpp new file mode 100644 index 0000000000..d5ab2f038a --- /dev/null +++ b/tools/vr/tests/test_wsi_capture.cpp @@ -0,0 +1,95 @@ +#include "../src/wsi_capture.cpp" +#include <cassert> + +static VkResult resetResult = VK_SUCCESS; +static unsigned submitted, presented, copied, blitted; +static bool gpuTest; +static unsigned acquired, released; +static VkSemaphore originalWaits[2]{(VkSemaphore)10, (VkSemaphore)11}; +static VkSemaphore expectedPresent; +static VkResult VKAPI_CALL Present(VkQueue, const VkPresentInfoKHR *info) { + presented++; + if (expectedPresent) assert(info->waitSemaphoreCount == 1 && info->pWaitSemaphores[0] == expectedPresent); + else assert(info->waitSemaphoreCount == 2 && info->pWaitSemaphores[0] == originalWaits[0]); + return VK_SUCCESS; +} + +int main() { + char path[] = "/tmp/droiddeck-wsi-XXXXXX"; int fd = mkstemp(path); assert(fd >= 0); + DroidDeckXrTracking tracking{}; + tracking.magic = DROIDDECK_XR_MAGIC; tracking.version = DROIDDECK_XR_VERSION; tracking.active = 1; + tracking.sampled_ns = xr_frame_now(); tracking.period_ns = 11111111; + for (auto &eye : tracking.eyes) { + eye.width = eye.height = 4; eye.pose.orientation[3] = 1; eye.pose.flags = 15; + eye.fov[0] = eye.fov[3] = -0.7f; eye.fov[1] = eye.fov[2] = 0.7f; + } + assert(write(fd, &tracking, sizeof(tracking)) == sizeof(tracking)); close(fd); + auto device = std::make_unique<Device>(); + device->ResetCommandBuffer = [](VkCommandBuffer, VkCommandBufferResetFlags) { return resetResult; }; + device->BeginCommandBuffer = [](VkCommandBuffer, const VkCommandBufferBeginInfo *) { return VK_SUCCESS; }; + device->EndCommandBuffer = [](VkCommandBuffer) { return VK_SUCCESS; }; + device->ResetFences = [](VkDevice, uint32_t, const VkFence *) { return VK_SUCCESS; }; + device->CmdPipelineBarrier = [](VkCommandBuffer, VkPipelineStageFlags, VkPipelineStageFlags, + VkDependencyFlags, uint32_t, const VkMemoryBarrier *, uint32_t buffers, const VkBufferMemoryBarrier *host, + uint32_t images, const VkImageMemoryBarrier *image) { + if (gpuTest && !images) { + assert(buffers == 1 && host->srcQueueFamilyIndex == VK_QUEUE_FAMILY_FOREIGN_EXT + && host->dstQueueFamilyIndex == 7 && host->dstAccessMask == VK_ACCESS_TRANSFER_WRITE_BIT); + acquired++; return; + } + assert(images == 1 && image->srcQueueFamilyIndex == VK_QUEUE_FAMILY_IGNORED); + if (buffers) { + if (gpuTest) { + assert(host->srcQueueFamilyIndex == 7 && host->dstQueueFamilyIndex == VK_QUEUE_FAMILY_FOREIGN_EXT + && !host->dstAccessMask); released++; + } else assert(host->dstAccessMask == VK_ACCESS_HOST_READ_BIT); + } + }; + device->CmdBlitImage = [](VkCommandBuffer, VkImage, VkImageLayout source, VkImage, VkImageLayout destination, + uint32_t count, const VkImageBlit *blit, VkFilter filter) { + assert(source == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL && destination == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); + assert(count == 1 && filter == VK_FILTER_NEAREST && blit->srcOffsets[1].x == 8); blitted++; + }; + device->CmdCopyImageToBuffer = [](VkCommandBuffer, VkImage, VkImageLayout layout, VkBuffer, + uint32_t count, const VkBufferImageCopy *copy) { + assert(layout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL && count == 1 && copy->imageExtent.width == 8); copied++; + }; + device->QueueSubmit = [](VkQueue, uint32_t count, const VkSubmitInfo *info, VkFence) { + assert(count == 1 && info->waitSemaphoreCount == 2 && info->signalSemaphoreCount == 1); + for (int i = 0; i < 2; i++) assert(info->pWaitSemaphores[i] == originalWaits[i] + && info->pWaitDstStageMask[i] == VK_PIPELINE_STAGE_TRANSFER_BIT); + submitted++; return VK_SUCCESS; + }; + device->DestroySemaphore = [](VkDevice, VkSemaphore, const VkAllocationCallbacks *) {}; + VkDevice handle = (VkDevice)1; VkQueue queue = (VkQueue)2; + device->handle = handle; device->queues[queue] = 7; + auto chain = std::make_unique<Swapchain>(path); + chain->device = device.get(); chain->family = 7; chain->initialized = true; chain->extent = {8, 4}; + chain->images = {(VkImage)20, (VkImage)21, (VkImage)22}; + chain->ready = {(VkSemaphore)30, (VkSemaphore)31, (VkSemaphore)32}; + devices[handle] = std::move(device); + VkSwapchainKHR swapchain = (VkSwapchainKHR)3; swapchains[swapchain] = std::move(chain); + VkPresentInfoKHR info{VK_STRUCTURE_TYPE_PRESENT_INFO_KHR}; + uint32_t index = 0; info.pImageIndices = &index; info.swapchainCount = 1; info.pSwapchains = &swapchain; + info.waitSemaphoreCount = 2; info.pWaitSemaphores = originalWaits; + for (index = 0; index < 3; index++) { + expectedPresent = (VkSemaphore)(uintptr_t)(30 + index); + assert(droiddeck_wsi_present(handle, queue, &info, Present) == VK_SUCCESS); + } + index = 0; expectedPresent = VK_NULL_HANDLE; + assert(droiddeck_wsi_present(handle, queue, &info, Present) == VK_SUCCESS); + assert(submitted == 3 && presented == 4 && copied == 3 && blitted == 3); + for (const auto &slot : swapchains[swapchain]->slots) assert(slot.busy && slot.queued && xr_frame_valid(slot.header)); + gpuTest = swapchains[swapchain]->gpu = true; + swapchains[swapchain]->slots[0].busy = false; + expectedPresent = (VkSemaphore)30; + assert(droiddeck_wsi_present(handle, queue, &info, Present) == VK_SUCCESS); + assert(acquired == 1 && released == 1 && copied == 4 && blitted == 3); + swapchains[swapchain]->slots[0].busy = false; + resetResult = VK_ERROR_DEVICE_LOST; + assert(droiddeck_wsi_present(handle, queue, &info, Present) == VK_ERROR_DEVICE_LOST); + assert(droiddeck_wsi_present(handle, queue, &info, Present) == VK_ERROR_DEVICE_LOST); + assert(submitted == 4 && presented == 5); + droiddeck_wsi_destroy(handle); unlink(path); + std::puts("WSI synchronization passed: original waits retained, per-image completion, bounded in-flight buffers and fatal error propagation"); +} diff --git a/tools/vr/tests/test_xr_chaperone.cpp b/tools/vr/tests/test_xr_chaperone.cpp new file mode 100644 index 0000000000..9051047f86 --- /dev/null +++ b/tools/vr/tests/test_xr_chaperone.cpp @@ -0,0 +1,30 @@ +#include "../src/xr_chaperone.h" +#include <cassert> +#include <cstdio> + +int main() { + DroidDeckXrPose head{{0, 0, 0, 1}, {2, 1.6f, -3}, 15}; + XrChaperoneOrigin deferred; + DroidDeckXrTracking tracking{}; + tracking.active = 1; tracking.period_ns = 11111111; tracking.sampled_ns = XrTrackingFile::Now(); + tracking.eyes[0].width = tracking.eyes[0].height = 4; + unsigned publications = 0; + auto publish = [&](const auto &pose) { publications++; assert(pose.position[1] == 1.6f); return true; }; + deferred.Update(tracking, publish); assert(publications == 0); + tracking.head = head; tracking.head.flags = 0; + deferred.Update(tracking, publish); assert(publications == 0); + tracking.head = head; + deferred.Update(tracking, publish); assert(publications == 1); + tracking.head.position[1] = 2; + deferred.Update(tracking, publish); assert(publications == 1); + deferred.Reset(); tracking.head = head; + deferred.Update(tracking, [&](const auto &) { publications++; return false; }); + deferred.Update(tracking, publish); assert(publications == 3); + auto origin = xr_seated_origin(head); + assert(origin.translation[0] == -2 && std::abs(origin.translation[1] + 1.6) < 1e-6 && origin.translation[2] == 3); + head.orientation[1] = head.orientation[3] = std::sqrt(0.5f); + origin = xr_seated_origin(head); + assert(std::abs(origin.yaw + 1.57079632679) < 1e-6); + assert(std::abs(origin.translation[0] + 3) < 1e-6 && std::abs(origin.translation[2] + 2) < 1e-6); + std::puts(xr_chaperone_json(head, "2026-10-15T21:00:00Z").c_str()); +} diff --git a/tools/vr/tests/test_xr_frames.cpp b/tools/vr/tests/test_xr_frames.cpp new file mode 100644 index 0000000000..837a7ce17a --- /dev/null +++ b/tools/vr/tests/test_xr_frames.cpp @@ -0,0 +1,152 @@ +#include "../src/xr_frame_channel.h" +#include "../src/xr_frame_math.h" +#include <cassert> +#include <cstdio> +#include <limits> + +static DroidDeckXrFrameHeader Header(uint64_t id = 1) { + DroidDeckXrFrameHeader header{}; + header.magic = DROIDDECK_XR_FRAME_MAGIC; header.version = DROIDDECK_XR_FRAME_VERSION; + header.width = 8; header.height = 4; header.bytes = 128; header.color_space = DROIDDECK_XR_COLOR_LINEAR_RGBA8; + header.frame_id = id; header.captured_ns = xr_frame_now(); + for (int eye = 0; eye < 2; eye++) { + for (int axis = 0; axis < 3; axis++) header.eye_pose[eye][axis][axis] = 1; + header.eye_pose[eye][0][3] = eye == 0 ? -0.032f : 0.032f; + header.eye_pose[eye][1][3] = 1.6f; + header.projection[eye][0][0] = header.projection[eye][1][1] = 1; + header.projection[eye][2][2] = -1.002f; header.projection[eye][2][3] = -0.1001f; + header.projection[eye][3][2] = -1; + } + return header; +} + +static int Connect(const std::string &path) { + int descriptor = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); + assert(descriptor >= 0); + sockaddr_un address{}; address.sun_family = AF_UNIX; + std::strcpy(address.sun_path, path.c_str()); + assert(connect(descriptor, reinterpret_cast<sockaddr *>(&address), sizeof(address)) == 0); + return descriptor; +} + +static void WaitRejected(XrFrameReceiver &receiver, uint64_t count) { + int64_t deadline = xr_frame_now() + 1000000000LL; + while (receiver.Rejected() < count && xr_frame_now() < deadline) usleep(1000); + assert(receiver.Rejected() == count); +} + +int main(int argc, char **argv) { + char directory[256]; + std::snprintf(directory, sizeof(directory), "%s/droiddeck-frames-XXXXXX", argc > 1 ? argv[1] : "/tmp"); + assert(mkdtemp(directory)); + std::string socketPath = std::string(directory) + "/frames"; + auto valid = Header(); assert(xr_frame_valid(valid)); + valid.color_space = DROIDDECK_XR_COLOR_SRGB_RGBA8; assert(xr_frame_valid(valid)); + auto unknownColor = valid; unknownColor.color_space = 3; assert(!xr_frame_valid(unknownColor)); + auto invalid = valid; invalid.version = 3; assert(!xr_frame_valid(invalid)); + invalid = valid; invalid.width = 3; assert(!xr_frame_valid(invalid)); + invalid = valid; invalid.bytes--; assert(!xr_frame_valid(invalid)); + invalid = valid; invalid.width = 8192; invalid.height = 4096; assert(!xr_frame_valid(invalid)); + invalid = valid; invalid.eye_pose[0][0][0] = -1; assert(!xr_frame_valid(invalid)); + invalid = valid; invalid.eye_pose[0][1][1] = 2; assert(!xr_frame_valid(invalid)); + invalid = valid; invalid.projection[0][0][0] = std::numeric_limits<float>::quiet_NaN(); assert(!xr_frame_valid(invalid)); + invalid = valid; invalid.projection[0][3][2] = 0; assert(!xr_frame_valid(invalid)); + invalid = valid; invalid.projection[0][1][1] = -1; assert(!xr_frame_valid(invalid)); + auto view = xr_frame_view(valid, 0); + assert(view.orientation[3] == 1 && view.position[0] == -0.032f && view.position[1] == 1.6f); + assert(std::abs(view.fov[0] + 0.785398f) < 0.00001f && std::abs(view.fov[2] - 0.785398f) < 0.00001f); + auto rotated = valid; + rotated.eye_pose[0][0][0] = rotated.eye_pose[0][2][2] = 0; + rotated.eye_pose[0][0][2] = 1; rotated.eye_pose[0][2][0] = -1; + assert(xr_frame_valid(rotated)); view = xr_frame_view(rotated, 0); + assert(std::abs(view.orientation[1] - 0.70710678f) < 0.00001f); + float eyeToHead[3][4]{{1, 0, 0, 0.032f}, {0, 1, 0, 0}, {0, 0, 1, 0}}; + auto paired = rotated; + xr_frame_eye_pose(paired.eye_pose[0], rotated.eye_pose[0], eyeToHead); + rotated.eye_pose[0][1][3] = 9; + assert(paired.eye_pose[0][1][3] == 1.6f && paired.eye_pose[0][2][3] == -0.032f); + assert(xr_frame_valid(paired)); + for (int axis = 0; axis < 3; axis++) { + rotated = valid; + for (int other = 0; other < 3; other++) if (other != axis) rotated.eye_pose[0][other][other] = -1; + assert(xr_frame_valid(rotated)); view = xr_frame_view(rotated, 0); + assert(view.orientation[axis] == 1 && view.orientation[3] == 0); + } + valid.projection[0][0][2] = 0.2f; valid.projection[0][1][2] = -0.1f; + view = xr_frame_view(valid, 0); + assert(std::abs(std::tan(view.fov[0]) + 0.8f) < 0.00001f && std::abs(std::tan(view.fov[2]) - 0.9f) < 0.00001f); + float left, right, top, bottom; + xr_frame_projection_raw(view.fov, &left, &right, &top, &bottom); + float xScale = 2 / (right - left), xOffset = (right + left) / (right - left); + float yScale = 2 / (bottom - top), yOffset = (bottom + top) / (bottom - top); + assert(std::abs(xScale - valid.projection[0][0][0]) < 0.00001f); + assert(std::abs(yScale - valid.projection[0][1][1]) < 0.00001f); + assert(std::abs(xOffset - valid.projection[0][0][2]) < 0.00001f); + assert(std::abs(yOffset - valid.projection[0][1][2]) < 0.00001f); + assert(std::abs(yScale * std::tan(view.fov[2]) - yOffset - 1) < 0.00001f); + assert(std::abs(yScale * std::tan(view.fov[3]) - yOffset + 1) < 0.00001f); + XrFrameReceiver receiver; assert(receiver.Start(socketPath)); + struct stat status{}; assert(stat(socketPath.c_str(), &status) == 0 && (status.st_mode & 0777) == 0600); + XrFrameReceiver other; assert(!other.Start(socketPath)); + XrFrameSender sender; + std::vector<unsigned char> pixels(valid.bytes, 17); + assert(sender.Send(socketPath, valid, pixels.data())); + pixels.assign(valid.bytes, 99); + DroidDeckXrPixels taken; assert(receiver.Take(&taken)); + assert(taken.header.frame_id == 1 && taken.pixels[0] == 17 && taken.header.eye_pose[0][0][3] == -0.032f); + assert(taken.header.color_space == DROIDDECK_XR_COLOR_SRGB_RGBA8); + assert(!receiver.Take(&taken)); + usleep(350000); + for (uint64_t id = 2; id <= 100; id++) { + auto header = Header(id); header.eye_pose[0][0][3] = static_cast<float>(id); + pixels.assign(header.bytes, static_cast<unsigned char>(id)); + assert(sender.Send(socketPath, header, pixels.data())); + } + assert(receiver.Take(&taken)); + assert(taken.header.frame_id == 100 && taken.header.eye_pose[0][0][3] == 100 && taken.pixels[0] == 100); + assert(receiver.Received() == 100); + assert(!sender.Send(socketPath, Header(100), pixels.data())); WaitRejected(receiver, 1); + assert(sender.Send(socketPath, Header(101), pixels.data())); assert(receiver.Take(&taken)); + receiver.Stop(); assert(!sender.Send(socketPath, Header(102), pixels.data())); + assert(receiver.Start(socketPath)); assert(sender.Send(socketPath, Header(1), pixels.data())); + assert(receiver.Take(&taken)); + receiver.Stop(); assert(receiver.Start(socketPath)); + int delayed = Connect(socketPath); + usleep(140000); + auto delayedHeader = Header(); + assert(xr_frame_io(delayed, &delayedHeader, sizeof(delayedHeader), true, xr_frame_now() + 200000000LL)); + usleep(110000); + assert(xr_frame_io(delayed, pixels.data(), pixels.size(), true, xr_frame_now() + 200000000LL)); + uint64_t acknowledged = 0; + assert(xr_frame_io(delayed, &acknowledged, sizeof(acknowledged), false, xr_frame_now() + 200000000LL)); + assert(acknowledged == delayedHeader.frame_id && receiver.Take(&taken)); + close(delayed); + receiver.Stop(); assert(receiver.Start(socketPath)); + int descriptor = Connect(socketPath); auto header = Header(); header.version = 3; + assert(xr_frame_io(descriptor, &header, sizeof(header), true, xr_frame_now() + 200000000LL)); + close(descriptor); WaitRejected(receiver, 1); assert(!receiver.Take(&taken)); + descriptor = Connect(socketPath); header = Header(); header.captured_ns += 1000000000LL; + assert(xr_frame_io(descriptor, &header, sizeof(header), true, xr_frame_now() + 200000000LL)); + close(descriptor); WaitRejected(receiver, 2); + descriptor = Connect(socketPath); header = Header(); header.captured_ns -= 1000000000LL; + assert(xr_frame_io(descriptor, &header, sizeof(header), true, xr_frame_now() + 200000000LL)); + close(descriptor); WaitRejected(receiver, 3); + descriptor = Connect(socketPath); header = Header(); + assert(xr_frame_io(descriptor, &header, sizeof(header), true, xr_frame_now() + 200000000LL)); + assert(send(descriptor, pixels.data(), 1, MSG_NOSIGNAL) == 1); + close(descriptor); WaitRejected(receiver, 4); assert(!receiver.Take(&taken)); + descriptor = Connect(socketPath); header = Header(); + assert(xr_frame_io(descriptor, &header, sizeof(header), true, xr_frame_now() + 200000000LL)); + WaitRejected(receiver, 5); close(descriptor); + assert(!sender.Send(socketPath, Header(200), pixels.data())); + assert(sender.Send(socketPath, Header(201), pixels.data())); + receiver.Stop(); + int stale = socket(AF_UNIX, SOCK_STREAM, 0); sockaddr_un address{}; address.sun_family = AF_UNIX; + std::strcpy(address.sun_path, socketPath.c_str()); + assert(bind(stale, reinterpret_cast<sockaddr *>(&address), sizeof(address)) == 0); close(stale); + assert(receiver.Start(socketPath)); receiver.Stop(); + int regular = open(socketPath.c_str(), O_CREAT | O_RDWR, 0600); assert(regular >= 0); close(regular); + assert(!receiver.Start(socketPath)); assert(stat(socketPath.c_str(), &status) == 0 && S_ISREG(status.st_mode)); + unlink(socketPath.c_str()); unlink((socketPath + ".lock").c_str()); rmdir(directory); + std::puts("XR frame validation passed: owned pixels, paired render pose, latest mailbox, bounds, projection, restart, stale socket, replay, malformed and timeout rejection"); +} diff --git a/tools/vr/tests/test_xr_gpu.cpp b/tools/vr/tests/test_xr_gpu.cpp new file mode 100644 index 0000000000..b41420a03e --- /dev/null +++ b/tools/vr/tests/test_xr_gpu.cpp @@ -0,0 +1,80 @@ +#include "../src/xr_gpu_channel.h" +#include <cassert> +#include <cstdio> +#include <dirent.h> + +static unsigned descriptors() { + DIR *directory = opendir("/proc/self/fd"); assert(directory); + unsigned count = 0; while (readdir(directory)) count++; closedir(directory); return count; +} + +int main() { + assert(xr_gpu_dimensions(3360, 1760)); + assert(!xr_gpu_dimensions(3, 4) && !xr_gpu_dimensions(8192, 4096)); + int pair[2]; assert(!socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, pair)); + int fd = memfd_create("xr-gpu-test", MFD_CLOEXEC); assert(fd >= 0 && !ftruncate(fd, 4096)); + XrGpuPoolInfo pool; int sent[3]{fd, fd, fd}; std::array<int, 3> received{{-1, -1, -1}}; + assert(xr_gpu_send(pair[0], &pool, sizeof(pool), sent, 3)); + assert(xr_gpu_receive(pair[1], &pool, sizeof(pool), received.data(), 3)); + for (int handle : received) { assert(fcntl(handle, F_GETFD) & FD_CLOEXEC); close(handle); } + auto count = descriptors(); + assert(xr_gpu_send(pair[0], &pool, sizeof(pool), sent, 3)); + assert(!xr_gpu_receive(pair[1], &pool, sizeof(pool)) && descriptors() == count); + assert(xr_gpu_send(pair[0], &pool, sizeof(pool), sent, 2)); + assert(!xr_gpu_receive(pair[1], &pool, sizeof(pool), received.data(), 3) && descriptors() == count); + assert(xr_gpu_send(pair[0], &pool, sizeof(pool), sent, 3)); + assert(!xr_gpu_receive(pair[1], &pool, sizeof(pool) - 1, received.data(), 3) && descriptors() == count); + close(pair[0]); close(pair[1]); + + char directory[] = "/tmp/dd-xr-gpu-XXXXXX"; assert(mkdtemp(directory)); + std::string filename = std::string(directory) + "/gpu"; + int listener = socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0); assert(listener >= 0); + sockaddr_un address{}; address.sun_family = AF_UNIX; strcpy(address.sun_path, filename.c_str()); + assert(!bind(listener, reinterpret_cast<sockaddr *>(&address), sizeof(address)) && !listen(listener, 1)); + for (unsigned attempt = 0; attempt < 3; attempt++) { + std::thread server([&] { + int peer = accept4(listener, nullptr, nullptr, SOCK_CLOEXEC); assert(peer >= 0 && xr_frame_peer(peer)); + XrGpuRequest request; assert(xr_gpu_wait(peer, 1000) && xr_gpu_receive(peer, &request, sizeof(request))); + assert(request.width == 32 && request.height == 32); + XrGpuPoolInfo reply; reply.width = reply.height = 32; + for (auto &size : reply.sizes) size = attempt == 2 ? 4095 : 4096; + assert(xr_gpu_send(peer, &reply, sizeof(reply), sent, 3)); + if (attempt != 2) { + XrGpuFrame frame; assert(xr_gpu_wait(peer, 1000) && xr_gpu_receive(peer, &frame, sizeof(frame))); + assert(frame.slot == 2 && frame.header.frame_id == 7); + auto now = xr_frame_now(); + frame.header.captured_ns = now; + assert(xr_gpu_frame_state(frame, 32, 32, 0, now) == XrGpuFrameState::Ready); + assert(xr_gpu_frame_state(frame, 32, 32, 7, now) == XrGpuFrameState::Invalid); + frame.header.captured_ns = now - 1000000000LL; + assert(xr_gpu_frame_state(frame, 32, 32, 0, now) == XrGpuFrameState::Stale); + frame.slot = 3; + assert(xr_gpu_frame_state(frame, 32, 32, 0, now) == XrGpuFrameState::Invalid); + if (!attempt) std::this_thread::sleep_for(std::chrono::milliseconds(700)); + uint64_t ack = attempt ? 8 : 7; + assert(xr_gpu_send(peer, &ack, sizeof(ack))); + } + close(peer); + }); + XrGpuSender sender; received.fill(-1); + bool connected = sender.Connect(filename.c_str(), 32, 32, pool, received); + assert(connected == (attempt != 2)); + if (connected) { + for (int handle : received) close(handle); + DroidDeckXrFrameHeader header{}; + header.magic = DROIDDECK_XR_FRAME_MAGIC; header.version = DROIDDECK_XR_FRAME_VERSION; + header.width = header.height = 32; header.bytes = 4096; header.color_space = DROIDDECK_XR_COLOR_SRGB_RGBA8; + header.frame_id = 7; header.captured_ns = xr_frame_now(); + for (int eye = 0; eye < 2; eye++) { + for (int axis = 0; axis < 3; axis++) header.eye_pose[eye][axis][axis] = 1; + header.projection[eye][0][0] = header.projection[eye][1][1] = 1; + header.projection[eye][3][2] = -1; + } + assert(sender.Send(header, 2) == (attempt == 0)); + if (attempt) assert(!sender.Send(header, 2)); + } else for (int handle : received) assert(handle == -1); + server.join(); + } + close(fd); close(listener); unlink(filename.c_str()); rmdir(directory); + puts("XR GPU transport passed: atomic FD ownership, malformed pool rejection, truncation cleanup and exact completion acknowledgement"); +} diff --git a/tools/vr/tests/test_xr_shared.cpp b/tools/vr/tests/test_xr_shared.cpp new file mode 100644 index 0000000000..fae4efde6a --- /dev/null +++ b/tools/vr/tests/test_xr_shared.cpp @@ -0,0 +1,67 @@ +#include "../src/xr_frame_channel.h" +#include <cassert> +#include <cstdio> +#include <sys/syscall.h> + +static DroidDeckXrFrameHeader Header() { + DroidDeckXrFrameHeader header{}; + header.magic = DROIDDECK_XR_FRAME_MAGIC; header.version = DROIDDECK_XR_FRAME_VERSION; + header.width = 8; header.height = 4; header.bytes = 128; + header.color_space = DROIDDECK_XR_COLOR_SRGB_RGBA8; header.frame_id = 1; header.captured_ns = xr_frame_now(); + for (int eye = 0; eye < 2; eye++) { + for (int axis = 0; axis < 3; axis++) header.eye_pose[eye][axis][axis] = 1; + header.projection[eye][0][0] = header.projection[eye][1][1] = 1; + header.projection[eye][3][2] = -1; + } + return header; +} + +int main() { + char directory[] = "/tmp/droiddeck-shared-XXXXXX"; assert(mkdtemp(directory)); + std::string path = std::string(directory) + "/frames"; + int listener = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); assert(listener >= 0); + sockaddr_un address{}; address.sun_family = AF_UNIX; std::strcpy(address.sun_path, path.c_str()); + assert(bind(listener, reinterpret_cast<sockaddr *>(&address), sizeof(address)) == 0); + assert(listen(listener, 1) == 0); + int buffer = syscall(SYS_memfd_create, "frame-test", 1); assert(buffer >= 0); + assert(ftruncate(buffer, 128) == 0); + unsigned char pixels[128]; std::memset(pixels, 27, sizeof(pixels)); + assert(pwrite(buffer, pixels, sizeof(pixels), 0) == sizeof(pixels)); + auto header = Header(); + XrFrameSender sender; + std::thread peer([&] { + int client = accept(listener, nullptr, nullptr); assert(client >= 0); + DroidDeckXrFrameHeader received{}; XrFrameDescriptor shared; + assert(xr_frame_header(client, received, shared, xr_frame_now() + 1000000000LL)); + assert(received.version == DROIDDECK_XR_FRAME_SHARED_VERSION && xr_frame_valid(received)); + assert(shared.fd >= 0 && (fcntl(shared.fd, F_GETFD) & FD_CLOEXEC)); + unsigned char copy[128]; assert(pread(shared.fd, copy, sizeof(copy), 0) == sizeof(copy)); + for (auto value : copy) assert(value == 27); + assert(xr_frame_io(client, &received.frame_id, sizeof(received.frame_id), true, xr_frame_now() + 1000000000LL)); + close(client); + }); + assert(sender.SendShared(path, header, buffer)); peer.join(); + assert(!sender.SharedLeaseLost()); + XrFrameSender lost; + std::thread disconnected([&] { + int client = accept(listener, nullptr, nullptr); assert(client >= 0); + DroidDeckXrFrameHeader received{}; XrFrameDescriptor shared; + assert(xr_frame_header(client, received, shared, xr_frame_now() + 1000000000LL)); + assert(shared.fd >= 0); + close(client); + }); + assert(!lost.SendShared(path, header, buffer)); disconnected.join(); + assert(lost.SharedLeaseLost()); + assert(!lost.SendShared(path, header, buffer)); + close(listener); unlink(path.c_str()); + XrFrameSender absent; + assert(!absent.SendShared(path, header, buffer)); assert(!absent.SharedLeaseLost()); + XrFrameReceiver receiver; assert(receiver.Start(path)); + XrFrameSender invalid; + // An ordinary file is not a DMA-BUF and must never be acknowledged as one. + assert(!invalid.SendShared(path, Header(), buffer)); + assert(invalid.SharedLeaseLost() && receiver.Rejected() == 1); + DroidDeckXrPixels frame; assert(!receiver.Take(&frame)); + receiver.Stop(); close(buffer); unlink((path + ".lock").c_str()); rmdir(directory); + std::puts("XR shared handoff passed: descriptor ownership, copied payload, acknowledgement, disconnect quarantine, absent peer and invalid buffer rejection"); +} diff --git a/tools/vr/tests/test_xr_touch.cpp b/tools/vr/tests/test_xr_touch.cpp new file mode 100644 index 0000000000..0d8f8f62d6 --- /dev/null +++ b/tools/vr/tests/test_xr_touch.cpp @@ -0,0 +1,51 @@ +#include "../src/xr_touch_input.h" +#include <cassert> +#include <cstdio> +#include <limits> + +int main() { + DroidDeckXrHand hand{}; + hand.active = 1; + hand.trigger = 0.7f; hand.squeeze = 0.8f; + hand.stick[0] = -0.4f; hand.stick[1] = 0.9f; + auto input = xr_touch_input(hand, false); + assert(input.trigger == hand.trigger && input.grip == hand.squeeze && input.triggerClick && input.gripClick); + assert(input.stickX == -0.4f && input.stickY == 0.9f); + assert(!input.stickTouch && !input.stickClick && !input.primaryClick && !input.secondaryClick && !input.systemClick); + hand.buttons = DROIDDECK_XR_PRIMARY_CLICK; + input = xr_touch_input(hand, false); + assert(input.primaryClick && !input.secondaryClick && !input.stickClick && !input.systemClick && !input.primaryTouch); + hand.buttons = DROIDDECK_XR_SECONDARY_CLICK; + input = xr_touch_input(hand, true); + assert(input.secondaryClick && !input.primaryClick && !input.systemClick && !input.stickClick); + hand.buttons = DROIDDECK_XR_STICK_CLICK; + input = xr_touch_input(hand, true); + assert(input.stickClick && !input.primaryClick && !input.stickTouch); + hand.buttons = DROIDDECK_XR_MENU_CLICK; + assert(xr_touch_input(hand, false).systemClick); + assert(!xr_touch_input(hand, true).systemClick); + hand.buttons = 0; + assert(!xr_touch_input(hand, false).systemClick); + hand.buttons = DROIDDECK_XR_TRIGGER_TOUCH | DROIDDECK_XR_STICK_TOUCH | DROIDDECK_XR_PRIMARY_TOUCH | + DROIDDECK_XR_SECONDARY_TOUCH | DROIDDECK_XR_THUMBREST_TOUCH; + hand.trigger = hand.squeeze = 0; + input = xr_touch_input(hand, false); + assert(input.triggerTouch && input.stickTouch && input.primaryTouch && input.secondaryTouch && input.thumbrestTouch); + assert(!input.triggerClick && !input.gripClick && !input.primaryClick && !input.secondaryClick && !input.stickClick); + hand.trigger = 2; hand.squeeze = -2; hand.stick[0] = -3; hand.stick[1] = 3; + input = xr_touch_input(hand, false); + assert(input.trigger == 1 && input.grip == 0 && input.stickX == -1 && input.stickY == 1); + hand.trigger = std::numeric_limits<float>::quiet_NaN(); + hand.squeeze = std::numeric_limits<float>::infinity(); + hand.stick[0] = hand.trigger; hand.stick[1] = -hand.squeeze; + input = xr_touch_input(hand, false); + assert(input.trigger == 0 && input.grip == 0 && input.stickX == 0 && input.stickY == 0); + hand.active = 0; + hand.buttons = UINT32_MAX; + hand.trigger = hand.squeeze = hand.stick[0] = hand.stick[1] = 1; + input = xr_touch_input(hand, false); + assert(input.trigger == 0 && input.grip == 0 && input.stickX == 0 && input.stickY == 0); + assert(!input.triggerClick && !input.gripClick && !input.stickClick && !input.primaryClick && !input.secondaryClick && !input.systemClick); + assert(!input.triggerTouch && !input.stickTouch && !input.primaryTouch && !input.secondaryTouch && !input.thumbrestTouch); + std::puts("Touch input: independent face/stick/system, real capacitive touch, analog grip, clamping and inactive reset passed"); +} diff --git a/tools/vr/tests/test_xr_tracking.cpp b/tools/vr/tests/test_xr_tracking.cpp new file mode 100644 index 0000000000..950f83f5de --- /dev/null +++ b/tools/vr/tests/test_xr_tracking.cpp @@ -0,0 +1,73 @@ +#include "../src/xr_tracking_file.h" +#include "../src/xr_display_mode.h" +#include <cassert> +#include <cstdio> +#include <limits> + +int main(int argc, char **argv) { + assert(XrTrackingFile::PoseTimeOffset(1010000000LL, 1000000000LL) == 0.01); + assert(XrTrackingFile::PoseTimeOffset(990000000LL, 1000000000LL) == -0.01); + assert(XrTrackingFile::PoseTimeOffset(0, 1000000000LL) == 0); + assert(XrTrackingFile::PoseTimeOffset(-1, 1000000000LL) == 0); + char filename[256]; + std::snprintf(filename, sizeof(filename), "%s/droiddeck-xr-test-XXXXXX", argc > 1 ? argv[1] : "/tmp"); + int descriptor = mkstemp(filename); + assert(descriptor >= 0); + assert(ftruncate(descriptor, sizeof(DroidDeckXrTracking)) == 0); + auto *writer = static_cast<DroidDeckXrTracking *>(mmap(nullptr, sizeof(DroidDeckXrTracking), + PROT_READ | PROT_WRITE, MAP_SHARED, descriptor, 0)); + assert(writer != MAP_FAILED); + { + XrTrackingFile reader(filename); + DroidDeckXrTracking packet{}; + assert(!reader.Read(&packet)); + writer->magic = DROIDDECK_XR_MAGIC; writer->version = DROIDDECK_XR_VERSION; + writer->active = 1; writer->sampled_ns = XrTrackingFile::Now(); writer->period_ns = 13888889; + writer->eyes[0].width = 1680; writer->eyes[0].height = 1760; + writer->head.orientation[3] = 1; writer->head.position[1] = 1.6f; writer->head.flags = 15; + assert(reader.Read(&packet)); assert(XrTrackingFile::Fresh(packet)); + assert(packet.head.position[1] == 1.6f); + assert(XrTrackingFile::Tracked(packet.head)); + assert(XrDisplayMode(packet) == "3360x1760@72"); + auto displayTracking = packet; + displayTracking.period_ns = 11111111; + assert(XrDisplayMode(displayTracking) == "3360x1760@90"); + displayTracking.period_ns = 8333547; + assert(XrDisplayMode(displayTracking) == "3360x1760@120"); + displayTracking.active = 0; + assert(XrDisplayMode(displayTracking).empty()); + displayTracking = packet; displayTracking.sampled_ns -= 1000000000LL; + assert(XrDisplayMode(displayTracking).empty()); + displayTracking = packet; displayTracking.period_ns = 0; + assert(XrDisplayMode(displayTracking).empty()); + auto invalidPose = packet.head; invalidPose.flags = 7; + assert(!XrTrackingFile::Tracked(invalidPose)); + invalidPose = packet.head; invalidPose.orientation[3] = 0; + assert(!XrTrackingFile::Tracked(invalidPose)); + invalidPose = packet.head; invalidPose.position[0] = std::numeric_limits<float>::quiet_NaN(); + assert(!XrTrackingFile::Tracked(invalidPose)); + __atomic_store_n(&writer->seq, 1u, __ATOMIC_RELEASE); + assert(!reader.Read(&packet)); + __atomic_store_n(&writer->seq, 2u, __ATOMIC_RELEASE); + writer->version++; + assert(!reader.Read(&packet)); + writer->version = DROIDDECK_XR_VERSION; + writer->sampled_ns = XrTrackingFile::Now() - 1000000000LL; + assert(reader.Read(&packet)); assert(!XrTrackingFile::Fresh(packet)); + writer->sampled_ns = XrTrackingFile::Now() + 1000000000LL; + assert(reader.Read(&packet)); assert(!XrTrackingFile::Fresh(packet)); + writer->sampled_ns = XrTrackingFile::Now(); writer->active = 0; + assert(reader.Read(&packet)); assert(!XrTrackingFile::Fresh(packet)); + writer->active = 1; writer->eyes[0].width = 9000; + assert(reader.Read(&packet)); assert(!XrTrackingFile::Fresh(packet)); + } + munmap(writer, sizeof(DroidDeckXrTracking)); + assert(ftruncate(descriptor, 16) == 0); + { + XrTrackingFile reader(filename); + DroidDeckXrTracking packet{}; + assert(!reader.Read(&packet)); + } + close(descriptor); unlink(filename); + std::puts("XR IPC validation passed: valid, seqlock, version, stale, future, inactive, dimensions, truncated"); +} diff --git a/tools/vr/tests/test_xr_vsync.cpp b/tools/vr/tests/test_xr_vsync.cpp new file mode 100644 index 0000000000..03976f82cc --- /dev/null +++ b/tools/vr/tests/test_xr_vsync.cpp @@ -0,0 +1,52 @@ +#include "../src/xr_vsync_timing.h" +#include <atomic> +#include <cassert> +#include <cstdio> +#include <initializer_list> +#include <limits> +#include <thread> + +int main() { + using namespace std::chrono; + using Clock = XrVsyncTiming::Clock; + XrVsyncTiming timing; + assert(timing.Deadline(0) == Clock::time_point(XrVsyncTiming::kDefaultPeriod)); + auto target = Clock::time_point(seconds(1)); + for (int64_t periodNs : {13888889LL, 11111111LL, 8333333LL}) { + auto period = nanoseconds(periodNs); + timing.Record(target, period); + assert(timing.Deadline(0) == target + period); + assert(timing.Deadline(2) == target + period * 3); + assert(timing.Deadline(std::numeric_limits<uint32_t>::max()) == target + period * 4294967296LL); + auto now = target - milliseconds(2); + auto scheduled = target + period; + assert(timing.Target(now, scheduled, 1000000000LL, period) == scheduled); + assert(timing.Target(now, scheduled, 0, period) == scheduled); + assert(timing.Target(now, scheduled, 900000000LL, period) == scheduled); + assert(timing.Target(now, scheduled, 2000000000LL, period) == scheduled); + auto prediction = target + period * 2; + auto predictedNs = duration_cast<nanoseconds>(prediction.time_since_epoch()).count(); + assert(timing.Target(now, scheduled, predictedNs, period) == prediction); + } + auto first = Clock::time_point(seconds(1)); + auto second = Clock::time_point(seconds(2)); + auto firstPeriod = nanoseconds(13888889); + auto secondPeriod = nanoseconds(8333333); + timing.Record(first, firstPeriod); + std::atomic<bool> finished{false}; + std::thread writer([&] { + for (int count = 0; count < 100000; count++) { + timing.Record(second, secondPeriod); + timing.Record(first, firstPeriod); + } + finished = true; + }); + do { + auto deadline = timing.Deadline(0); + assert(deadline == first + firstPeriod || deadline == second + secondPeriod); + } while (!finished); + writer.join(); + timing.Reset(); + assert(timing.Deadline(0) == Clock::time_point(XrVsyncTiming::kDefaultPeriod)); + std::puts("XR pacing validation passed: refresh rates, throttling, repeated predictions, atomic tick/period, restart"); +} diff --git a/tools/vr/third_party/wayland/README.md b/tools/vr/third_party/wayland/README.md new file mode 100644 index 0000000000..d186fff832 --- /dev/null +++ b/tools/vr/third_party/wayland/README.md @@ -0,0 +1,4 @@ +Wayland client headers (MIT, wayland 1.26.0, from the runtime's Arch Linux ARM package) for the SteamVR +driver's presenter (tools/vr/src/presenter.cpp). `src/wayland_client_stub.c` is only linked against at +build time, so the driver gets a `libwayland-client.so.0` dependency without the build needing the guest's +library; the runtime's real one is used on the device. diff --git a/tools/vr/third_party/wayland/wayland-client-core.h b/tools/vr/third_party/wayland/wayland-client-core.h new file mode 100644 index 0000000000..3f55d23c7f --- /dev/null +++ b/tools/vr/third_party/wayland/wayland-client-core.h @@ -0,0 +1,248 @@ +/* + * Copyright © 2008 Kristian Høgsberg + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef WAYLAND_CLIENT_CORE_H +#define WAYLAND_CLIENT_CORE_H + +#include <stdint.h> +#include "wayland-util.h" +#include "wayland-version.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct timespec; + +struct wl_proxy; + +struct wl_display; + +struct wl_event_queue; + +#define WL_MARSHAL_FLAG_DESTROY (1 << 0) + +void +wl_event_queue_destroy(struct wl_event_queue *queue); + +struct wl_proxy * +wl_proxy_marshal_flags(struct wl_proxy *proxy, uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, ...); + +struct wl_proxy * +wl_proxy_marshal_array_flags(struct wl_proxy *proxy, uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, + union wl_argument *args); + +void +wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...); + +void +wl_proxy_marshal_array(struct wl_proxy *p, uint32_t opcode, + union wl_argument *args); + +struct wl_proxy * +wl_proxy_create(struct wl_proxy *factory, + const struct wl_interface *interface); + +void * +wl_proxy_create_wrapper(void *proxy); + +void +wl_proxy_wrapper_destroy(void *proxy_wrapper); + +struct wl_proxy * +wl_proxy_marshal_constructor(struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + ...); + +struct wl_proxy * +wl_proxy_marshal_constructor_versioned(struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + ...); + +struct wl_proxy * +wl_proxy_marshal_array_constructor(struct wl_proxy *proxy, + uint32_t opcode, union wl_argument *args, + const struct wl_interface *interface); + +struct wl_proxy * +wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy, + uint32_t opcode, + union wl_argument *args, + const struct wl_interface *interface, + uint32_t version); + +void +wl_proxy_destroy(struct wl_proxy *proxy); + +int +wl_proxy_add_listener(struct wl_proxy *proxy, + void (**implementation)(void), void *data); + +const void * +wl_proxy_get_listener(struct wl_proxy *proxy); + +int +wl_proxy_add_dispatcher(struct wl_proxy *proxy, + wl_dispatcher_func_t dispatcher_func, + const void * dispatcher_data, void *data); + +void +wl_proxy_set_user_data(struct wl_proxy *proxy, void *user_data); + +void * +wl_proxy_get_user_data(struct wl_proxy *proxy); + +uint32_t +wl_proxy_get_version(struct wl_proxy *proxy); + +uint32_t +wl_proxy_get_id(struct wl_proxy *proxy); + +void +wl_proxy_set_tag(struct wl_proxy *proxy, + const char * const *tag); + +const char * const * +wl_proxy_get_tag(struct wl_proxy *proxy); + +const char * +wl_proxy_get_class(struct wl_proxy *proxy); + +const struct wl_interface * +wl_proxy_get_interface(struct wl_proxy *proxy); + +struct wl_display * +wl_proxy_get_display(struct wl_proxy *proxy); + +void +wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue); + +struct wl_event_queue * +wl_proxy_get_queue(const struct wl_proxy *proxy); + +const char * +wl_event_queue_get_name(const struct wl_event_queue *queue); + +struct wl_display * +wl_display_connect(const char *name); + +struct wl_display * +wl_display_connect_to_fd(int fd); + +void +wl_display_disconnect(struct wl_display *display); + +int +wl_display_get_fd(struct wl_display *display); + +int +wl_display_dispatch(struct wl_display *display); + +int +wl_display_dispatch_queue(struct wl_display *display, + struct wl_event_queue *queue); + +int +wl_display_dispatch_timeout(struct wl_display *display, + const struct timespec *timeout); + +int +wl_display_dispatch_queue_timeout(struct wl_display *display, + struct wl_event_queue *queue, + const struct timespec *timeout); + +int +wl_display_dispatch_queue_pending(struct wl_display *display, + struct wl_event_queue *queue); + +int +wl_display_dispatch_queue_pending_single(struct wl_display *display, + struct wl_event_queue *queue); + +int +wl_display_dispatch_pending(struct wl_display *display); + +int +wl_display_dispatch_pending_single(struct wl_display *display); + +int +wl_display_get_error(struct wl_display *display); + +uint32_t +wl_display_get_protocol_error(struct wl_display *display, + const struct wl_interface **interface, + uint32_t *id); + +int +wl_display_flush(struct wl_display *display); + +int +wl_display_roundtrip_queue(struct wl_display *display, + struct wl_event_queue *queue); + +int +wl_display_roundtrip(struct wl_display *display); + +struct wl_event_queue * +wl_display_create_queue(struct wl_display *display); + +struct wl_event_queue * +wl_display_create_queue_with_name(struct wl_display *display, + const char *name); + +int +wl_display_prepare_read_queue(struct wl_display *display, + struct wl_event_queue *queue); + +int +wl_display_prepare_read(struct wl_display *display); + +void +wl_display_cancel_read(struct wl_display *display); + +int +wl_display_read_events(struct wl_display *display); + +void +wl_log_set_handler_client(wl_log_func_t handler); + +void +wl_display_set_max_buffer_size(struct wl_display *display, + size_t max_buffer_size); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/tools/vr/third_party/wayland/wayland-client-protocol.h b/tools/vr/third_party/wayland/wayland-client-protocol.h new file mode 100644 index 0000000000..8c99c054f7 --- /dev/null +++ b/tools/vr/third_party/wayland/wayland-client-protocol.h @@ -0,0 +1,2328 @@ + +#ifndef WAYLAND_CLIENT_PROTOCOL_H +#define WAYLAND_CLIENT_PROTOCOL_H + +#include <stdint.h> +#include <stddef.h> +#include "wayland-client.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * @section page_copyright_wayland Copyright + * + * Copyright © 2008-2011 Kristian Høgsberg + * Copyright © 2010-2011 Intel Corporation + * Copyright © 2012-2013 Collabora, Ltd. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + + + + + + + + + + + + + + + + + + + + + + + + + + +struct wl_buffer; +struct wl_callback; +struct wl_compositor; +struct wl_data_device; +struct wl_data_device_manager; +struct wl_data_offer; +struct wl_data_source; +struct wl_display; +struct wl_fixes; +struct wl_keyboard; +struct wl_output; +struct wl_pointer; +struct wl_region; +struct wl_registry; +struct wl_seat; +struct wl_shell; +struct wl_shell_surface; +struct wl_shm; +struct wl_shm_pool; +struct wl_subcompositor; +struct wl_subsurface; +struct wl_surface; +struct wl_touch; + +#ifndef WL_DISPLAY_INTERFACE +#define WL_DISPLAY_INTERFACE +extern const struct wl_interface wl_display_interface; +#endif +#ifndef WL_REGISTRY_INTERFACE +#define WL_REGISTRY_INTERFACE +extern const struct wl_interface wl_registry_interface; +#endif +#ifndef WL_CALLBACK_INTERFACE +#define WL_CALLBACK_INTERFACE +extern const struct wl_interface wl_callback_interface; +#endif +#ifndef WL_COMPOSITOR_INTERFACE +#define WL_COMPOSITOR_INTERFACE +extern const struct wl_interface wl_compositor_interface; +#endif +#ifndef WL_SHM_POOL_INTERFACE +#define WL_SHM_POOL_INTERFACE +extern const struct wl_interface wl_shm_pool_interface; +#endif +#ifndef WL_SHM_INTERFACE +#define WL_SHM_INTERFACE +extern const struct wl_interface wl_shm_interface; +#endif +#ifndef WL_BUFFER_INTERFACE +#define WL_BUFFER_INTERFACE +extern const struct wl_interface wl_buffer_interface; +#endif +#ifndef WL_DATA_OFFER_INTERFACE +#define WL_DATA_OFFER_INTERFACE +extern const struct wl_interface wl_data_offer_interface; +#endif +#ifndef WL_DATA_SOURCE_INTERFACE +#define WL_DATA_SOURCE_INTERFACE +extern const struct wl_interface wl_data_source_interface; +#endif +#ifndef WL_DATA_DEVICE_INTERFACE +#define WL_DATA_DEVICE_INTERFACE +extern const struct wl_interface wl_data_device_interface; +#endif +#ifndef WL_DATA_DEVICE_MANAGER_INTERFACE +#define WL_DATA_DEVICE_MANAGER_INTERFACE +extern const struct wl_interface wl_data_device_manager_interface; +#endif +#ifndef WL_SHELL_INTERFACE +#define WL_SHELL_INTERFACE +extern const struct wl_interface wl_shell_interface; +#endif +#ifndef WL_SHELL_SURFACE_INTERFACE +#define WL_SHELL_SURFACE_INTERFACE +extern const struct wl_interface wl_shell_surface_interface; +#endif +#ifndef WL_SURFACE_INTERFACE +#define WL_SURFACE_INTERFACE +extern const struct wl_interface wl_surface_interface; +#endif +#ifndef WL_SEAT_INTERFACE +#define WL_SEAT_INTERFACE +extern const struct wl_interface wl_seat_interface; +#endif +#ifndef WL_POINTER_INTERFACE +#define WL_POINTER_INTERFACE +extern const struct wl_interface wl_pointer_interface; +#endif +#ifndef WL_KEYBOARD_INTERFACE +#define WL_KEYBOARD_INTERFACE +extern const struct wl_interface wl_keyboard_interface; +#endif +#ifndef WL_TOUCH_INTERFACE +#define WL_TOUCH_INTERFACE +extern const struct wl_interface wl_touch_interface; +#endif +#ifndef WL_OUTPUT_INTERFACE +#define WL_OUTPUT_INTERFACE +extern const struct wl_interface wl_output_interface; +#endif +#ifndef WL_REGION_INTERFACE +#define WL_REGION_INTERFACE +extern const struct wl_interface wl_region_interface; +#endif +#ifndef WL_SUBCOMPOSITOR_INTERFACE +#define WL_SUBCOMPOSITOR_INTERFACE +extern const struct wl_interface wl_subcompositor_interface; +#endif +#ifndef WL_SUBSURFACE_INTERFACE +#define WL_SUBSURFACE_INTERFACE +extern const struct wl_interface wl_subsurface_interface; +#endif +#ifndef WL_FIXES_INTERFACE +#define WL_FIXES_INTERFACE +extern const struct wl_interface wl_fixes_interface; +#endif + +#ifndef WL_DISPLAY_ERROR_ENUM +#define WL_DISPLAY_ERROR_ENUM +enum wl_display_error { + WL_DISPLAY_ERROR_INVALID_OBJECT = 0, + WL_DISPLAY_ERROR_INVALID_METHOD = 1, + WL_DISPLAY_ERROR_NO_MEMORY = 2, + WL_DISPLAY_ERROR_IMPLEMENTATION = 3, +}; +#endif + +struct wl_display_listener { + void (*error)(void *data, + struct wl_display *wl_display, + void *object_id, + uint32_t code, + const char *message); + void (*delete_id)(void *data, + struct wl_display *wl_display, + uint32_t id); +}; + +static inline int +wl_display_add_listener(struct wl_display *wl_display, + const struct wl_display_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_display, + (void (**)(void)) listener, data); +} + +#define WL_DISPLAY_SYNC 0 +#define WL_DISPLAY_GET_REGISTRY 1 + +#define WL_DISPLAY_ERROR_SINCE_VERSION 1 +#define WL_DISPLAY_DELETE_ID_SINCE_VERSION 1 + +#define WL_DISPLAY_SYNC_SINCE_VERSION 1 +#define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION 1 + +static inline void +wl_display_set_user_data(struct wl_display *wl_display, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_display, user_data); +} + +static inline void * +wl_display_get_user_data(struct wl_display *wl_display) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_display); +} + +static inline uint32_t +wl_display_get_version(struct wl_display *wl_display) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_display); +} + +static inline struct wl_callback * +wl_display_sync(struct wl_display *wl_display) +{ + struct wl_proxy *callback; + + callback = wl_proxy_marshal_flags((struct wl_proxy *) wl_display, + WL_DISPLAY_SYNC, &wl_callback_interface, wl_proxy_get_version((struct wl_proxy *) wl_display), 0, NULL); + + return (struct wl_callback *) callback; +} + +static inline struct wl_registry * +wl_display_get_registry(struct wl_display *wl_display) +{ + struct wl_proxy *registry; + + registry = wl_proxy_marshal_flags((struct wl_proxy *) wl_display, + WL_DISPLAY_GET_REGISTRY, &wl_registry_interface, wl_proxy_get_version((struct wl_proxy *) wl_display), 0, NULL); + + return (struct wl_registry *) registry; +} + +struct wl_registry_listener { + void (*global)(void *data, + struct wl_registry *wl_registry, + uint32_t name, + const char *interface, + uint32_t version); + void (*global_remove)(void *data, + struct wl_registry *wl_registry, + uint32_t name); +}; + +static inline int +wl_registry_add_listener(struct wl_registry *wl_registry, + const struct wl_registry_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_registry, + (void (**)(void)) listener, data); +} + +#define WL_REGISTRY_BIND 0 + +#define WL_REGISTRY_GLOBAL_SINCE_VERSION 1 +#define WL_REGISTRY_GLOBAL_REMOVE_SINCE_VERSION 1 + +#define WL_REGISTRY_BIND_SINCE_VERSION 1 + +static inline void +wl_registry_set_user_data(struct wl_registry *wl_registry, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_registry, user_data); +} + +static inline void * +wl_registry_get_user_data(struct wl_registry *wl_registry) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_registry); +} + +static inline uint32_t +wl_registry_get_version(struct wl_registry *wl_registry) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_registry); +} + +static inline void +wl_registry_destroy(struct wl_registry *wl_registry) +{ + wl_proxy_destroy((struct wl_proxy *) wl_registry); +} + +static inline void * +wl_registry_bind(struct wl_registry *wl_registry, uint32_t name, const struct wl_interface *interface, uint32_t version) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_registry, + WL_REGISTRY_BIND, interface, version, 0, name, interface->name, version, NULL); + + return (void *) id; +} + +struct wl_callback_listener { + void (*done)(void *data, + struct wl_callback *wl_callback, + uint32_t callback_data); +}; + +static inline int +wl_callback_add_listener(struct wl_callback *wl_callback, + const struct wl_callback_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_callback, + (void (**)(void)) listener, data); +} + +#define WL_CALLBACK_DONE_SINCE_VERSION 1 + + +static inline void +wl_callback_set_user_data(struct wl_callback *wl_callback, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_callback, user_data); +} + +static inline void * +wl_callback_get_user_data(struct wl_callback *wl_callback) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_callback); +} + +static inline uint32_t +wl_callback_get_version(struct wl_callback *wl_callback) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_callback); +} + +static inline void +wl_callback_destroy(struct wl_callback *wl_callback) +{ + wl_proxy_destroy((struct wl_proxy *) wl_callback); +} + +#define WL_COMPOSITOR_CREATE_SURFACE 0 +#define WL_COMPOSITOR_CREATE_REGION 1 +#define WL_COMPOSITOR_RELEASE 2 + + +#define WL_COMPOSITOR_CREATE_SURFACE_SINCE_VERSION 1 +#define WL_COMPOSITOR_CREATE_REGION_SINCE_VERSION 1 +#define WL_COMPOSITOR_RELEASE_SINCE_VERSION 7 + +static inline void +wl_compositor_set_user_data(struct wl_compositor *wl_compositor, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_compositor, user_data); +} + +static inline void * +wl_compositor_get_user_data(struct wl_compositor *wl_compositor) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_compositor); +} + +static inline uint32_t +wl_compositor_get_version(struct wl_compositor *wl_compositor) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_compositor); +} + +static inline void +wl_compositor_destroy(struct wl_compositor *wl_compositor) +{ + wl_proxy_destroy((struct wl_proxy *) wl_compositor); +} + +static inline struct wl_surface * +wl_compositor_create_surface(struct wl_compositor *wl_compositor) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_compositor, + WL_COMPOSITOR_CREATE_SURFACE, &wl_surface_interface, wl_proxy_get_version((struct wl_proxy *) wl_compositor), 0, NULL); + + return (struct wl_surface *) id; +} + +static inline struct wl_region * +wl_compositor_create_region(struct wl_compositor *wl_compositor) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_compositor, + WL_COMPOSITOR_CREATE_REGION, &wl_region_interface, wl_proxy_get_version((struct wl_proxy *) wl_compositor), 0, NULL); + + return (struct wl_region *) id; +} + +static inline void +wl_compositor_release(struct wl_compositor *wl_compositor) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_compositor, + WL_COMPOSITOR_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_compositor), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef WL_SHM_POOL_ERROR_ENUM +#define WL_SHM_POOL_ERROR_ENUM +enum wl_shm_pool_error { + WL_SHM_POOL_ERROR_INVALID_FORMAT = 0, + WL_SHM_POOL_ERROR_INVALID_STRIDE = 1, +}; +#endif + +#define WL_SHM_POOL_CREATE_BUFFER 0 +#define WL_SHM_POOL_DESTROY 1 +#define WL_SHM_POOL_RESIZE 2 + + +#define WL_SHM_POOL_CREATE_BUFFER_SINCE_VERSION 1 +#define WL_SHM_POOL_DESTROY_SINCE_VERSION 1 +#define WL_SHM_POOL_RESIZE_SINCE_VERSION 1 + +static inline void +wl_shm_pool_set_user_data(struct wl_shm_pool *wl_shm_pool, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_shm_pool, user_data); +} + +static inline void * +wl_shm_pool_get_user_data(struct wl_shm_pool *wl_shm_pool) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_shm_pool); +} + +static inline uint32_t +wl_shm_pool_get_version(struct wl_shm_pool *wl_shm_pool) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_shm_pool); +} + +static inline struct wl_buffer * +wl_shm_pool_create_buffer(struct wl_shm_pool *wl_shm_pool, int32_t offset, int32_t width, int32_t height, int32_t stride, uint32_t format) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_shm_pool, + WL_SHM_POOL_CREATE_BUFFER, &wl_buffer_interface, wl_proxy_get_version((struct wl_proxy *) wl_shm_pool), 0, NULL, offset, width, height, stride, format); + + return (struct wl_buffer *) id; +} + +static inline void +wl_shm_pool_destroy(struct wl_shm_pool *wl_shm_pool) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shm_pool, + WL_SHM_POOL_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shm_pool), WL_MARSHAL_FLAG_DESTROY); +} + +static inline void +wl_shm_pool_resize(struct wl_shm_pool *wl_shm_pool, int32_t size) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shm_pool, + WL_SHM_POOL_RESIZE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shm_pool), 0, size); +} + +#ifndef WL_SHM_ERROR_ENUM +#define WL_SHM_ERROR_ENUM +enum wl_shm_error { + WL_SHM_ERROR_INVALID_FORMAT = 0, + WL_SHM_ERROR_INVALID_STRIDE = 1, + WL_SHM_ERROR_INVALID_FD = 2, +}; +#endif + +#ifndef WL_SHM_FORMAT_ENUM +#define WL_SHM_FORMAT_ENUM +enum wl_shm_format { + WL_SHM_FORMAT_ARGB8888 = 0, + WL_SHM_FORMAT_XRGB8888 = 1, + WL_SHM_FORMAT_C8 = 0x20203843, + WL_SHM_FORMAT_RGB332 = 0x38424752, + WL_SHM_FORMAT_BGR233 = 0x38524742, + WL_SHM_FORMAT_XRGB4444 = 0x32315258, + WL_SHM_FORMAT_XBGR4444 = 0x32314258, + WL_SHM_FORMAT_RGBX4444 = 0x32315852, + WL_SHM_FORMAT_BGRX4444 = 0x32315842, + WL_SHM_FORMAT_ARGB4444 = 0x32315241, + WL_SHM_FORMAT_ABGR4444 = 0x32314241, + WL_SHM_FORMAT_RGBA4444 = 0x32314152, + WL_SHM_FORMAT_BGRA4444 = 0x32314142, + WL_SHM_FORMAT_XRGB1555 = 0x35315258, + WL_SHM_FORMAT_XBGR1555 = 0x35314258, + WL_SHM_FORMAT_RGBX5551 = 0x35315852, + WL_SHM_FORMAT_BGRX5551 = 0x35315842, + WL_SHM_FORMAT_ARGB1555 = 0x35315241, + WL_SHM_FORMAT_ABGR1555 = 0x35314241, + WL_SHM_FORMAT_RGBA5551 = 0x35314152, + WL_SHM_FORMAT_BGRA5551 = 0x35314142, + WL_SHM_FORMAT_RGB565 = 0x36314752, + WL_SHM_FORMAT_BGR565 = 0x36314742, + WL_SHM_FORMAT_RGB888 = 0x34324752, + WL_SHM_FORMAT_BGR888 = 0x34324742, + WL_SHM_FORMAT_XBGR8888 = 0x34324258, + WL_SHM_FORMAT_RGBX8888 = 0x34325852, + WL_SHM_FORMAT_BGRX8888 = 0x34325842, + WL_SHM_FORMAT_ABGR8888 = 0x34324241, + WL_SHM_FORMAT_RGBA8888 = 0x34324152, + WL_SHM_FORMAT_BGRA8888 = 0x34324142, + WL_SHM_FORMAT_XRGB2101010 = 0x30335258, + WL_SHM_FORMAT_XBGR2101010 = 0x30334258, + WL_SHM_FORMAT_RGBX1010102 = 0x30335852, + WL_SHM_FORMAT_BGRX1010102 = 0x30335842, + WL_SHM_FORMAT_ARGB2101010 = 0x30335241, + WL_SHM_FORMAT_ABGR2101010 = 0x30334241, + WL_SHM_FORMAT_RGBA1010102 = 0x30334152, + WL_SHM_FORMAT_BGRA1010102 = 0x30334142, + WL_SHM_FORMAT_YUYV = 0x56595559, + WL_SHM_FORMAT_YVYU = 0x55595659, + WL_SHM_FORMAT_UYVY = 0x59565955, + WL_SHM_FORMAT_VYUY = 0x59555956, + WL_SHM_FORMAT_AYUV = 0x56555941, + WL_SHM_FORMAT_NV12 = 0x3231564e, + WL_SHM_FORMAT_NV21 = 0x3132564e, + WL_SHM_FORMAT_NV16 = 0x3631564e, + WL_SHM_FORMAT_NV61 = 0x3136564e, + WL_SHM_FORMAT_YUV410 = 0x39565559, + WL_SHM_FORMAT_YVU410 = 0x39555659, + WL_SHM_FORMAT_YUV411 = 0x31315559, + WL_SHM_FORMAT_YVU411 = 0x31315659, + WL_SHM_FORMAT_YUV420 = 0x32315559, + WL_SHM_FORMAT_YVU420 = 0x32315659, + WL_SHM_FORMAT_YUV422 = 0x36315559, + WL_SHM_FORMAT_YVU422 = 0x36315659, + WL_SHM_FORMAT_YUV444 = 0x34325559, + WL_SHM_FORMAT_YVU444 = 0x34325659, + WL_SHM_FORMAT_R8 = 0x20203852, + WL_SHM_FORMAT_R16 = 0x20363152, + WL_SHM_FORMAT_RG88 = 0x38384752, + WL_SHM_FORMAT_GR88 = 0x38385247, + WL_SHM_FORMAT_RG1616 = 0x32334752, + WL_SHM_FORMAT_GR1616 = 0x32335247, + WL_SHM_FORMAT_XRGB16161616F = 0x48345258, + WL_SHM_FORMAT_XBGR16161616F = 0x48344258, + WL_SHM_FORMAT_ARGB16161616F = 0x48345241, + WL_SHM_FORMAT_ABGR16161616F = 0x48344241, + WL_SHM_FORMAT_XYUV8888 = 0x56555958, + WL_SHM_FORMAT_VUY888 = 0x34325556, + WL_SHM_FORMAT_VUY101010 = 0x30335556, + WL_SHM_FORMAT_Y210 = 0x30313259, + WL_SHM_FORMAT_Y212 = 0x32313259, + WL_SHM_FORMAT_Y216 = 0x36313259, + WL_SHM_FORMAT_Y410 = 0x30313459, + WL_SHM_FORMAT_Y412 = 0x32313459, + WL_SHM_FORMAT_Y416 = 0x36313459, + WL_SHM_FORMAT_XVYU2101010 = 0x30335658, + WL_SHM_FORMAT_XVYU12_16161616 = 0x36335658, + WL_SHM_FORMAT_XVYU16161616 = 0x38345658, + WL_SHM_FORMAT_Y0L0 = 0x304c3059, + WL_SHM_FORMAT_X0L0 = 0x304c3058, + WL_SHM_FORMAT_Y0L2 = 0x324c3059, + WL_SHM_FORMAT_X0L2 = 0x324c3058, + WL_SHM_FORMAT_YUV420_8BIT = 0x38305559, + WL_SHM_FORMAT_YUV420_10BIT = 0x30315559, + WL_SHM_FORMAT_XRGB8888_A8 = 0x38415258, + WL_SHM_FORMAT_XBGR8888_A8 = 0x38414258, + WL_SHM_FORMAT_RGBX8888_A8 = 0x38415852, + WL_SHM_FORMAT_BGRX8888_A8 = 0x38415842, + WL_SHM_FORMAT_RGB888_A8 = 0x38413852, + WL_SHM_FORMAT_BGR888_A8 = 0x38413842, + WL_SHM_FORMAT_RGB565_A8 = 0x38413552, + WL_SHM_FORMAT_BGR565_A8 = 0x38413542, + WL_SHM_FORMAT_NV24 = 0x3432564e, + WL_SHM_FORMAT_NV42 = 0x3234564e, + WL_SHM_FORMAT_P210 = 0x30313250, + WL_SHM_FORMAT_P010 = 0x30313050, + WL_SHM_FORMAT_P012 = 0x32313050, + WL_SHM_FORMAT_P016 = 0x36313050, + WL_SHM_FORMAT_AXBXGXRX106106106106 = 0x30314241, + WL_SHM_FORMAT_NV15 = 0x3531564e, + WL_SHM_FORMAT_Q410 = 0x30313451, + WL_SHM_FORMAT_Q401 = 0x31303451, + WL_SHM_FORMAT_XRGB16161616 = 0x38345258, + WL_SHM_FORMAT_XBGR16161616 = 0x38344258, + WL_SHM_FORMAT_ARGB16161616 = 0x38345241, + WL_SHM_FORMAT_ABGR16161616 = 0x38344241, + WL_SHM_FORMAT_C1 = 0x20203143, + WL_SHM_FORMAT_C2 = 0x20203243, + WL_SHM_FORMAT_C4 = 0x20203443, + WL_SHM_FORMAT_D1 = 0x20203144, + WL_SHM_FORMAT_D2 = 0x20203244, + WL_SHM_FORMAT_D4 = 0x20203444, + WL_SHM_FORMAT_D8 = 0x20203844, + WL_SHM_FORMAT_R1 = 0x20203152, + WL_SHM_FORMAT_R2 = 0x20203252, + WL_SHM_FORMAT_R4 = 0x20203452, + WL_SHM_FORMAT_R10 = 0x20303152, + WL_SHM_FORMAT_R12 = 0x20323152, + WL_SHM_FORMAT_AVUY8888 = 0x59555641, + WL_SHM_FORMAT_XVUY8888 = 0x59555658, + WL_SHM_FORMAT_P030 = 0x30333050, + WL_SHM_FORMAT_RGB161616 = 0x38344752, + WL_SHM_FORMAT_BGR161616 = 0x38344742, + WL_SHM_FORMAT_R16F = 0x48202052, + WL_SHM_FORMAT_GR1616F = 0x48205247, + WL_SHM_FORMAT_BGR161616F = 0x48524742, + WL_SHM_FORMAT_R32F = 0x46202052, + WL_SHM_FORMAT_GR3232F = 0x46205247, + WL_SHM_FORMAT_BGR323232F = 0x46524742, + WL_SHM_FORMAT_ABGR32323232F = 0x46384241, + WL_SHM_FORMAT_NV20 = 0x3032564e, + WL_SHM_FORMAT_NV30 = 0x3033564e, + WL_SHM_FORMAT_S010 = 0x30313053, + WL_SHM_FORMAT_S210 = 0x30313253, + WL_SHM_FORMAT_S410 = 0x30313453, + WL_SHM_FORMAT_S012 = 0x32313053, + WL_SHM_FORMAT_S212 = 0x32313253, + WL_SHM_FORMAT_S412 = 0x32313453, + WL_SHM_FORMAT_S016 = 0x36313053, + WL_SHM_FORMAT_S216 = 0x36313253, + WL_SHM_FORMAT_S416 = 0x36313453, + WL_SHM_FORMAT_XVUY2101010 = 0x30335958, + WL_SHM_FORMAT_P230 = 0x30333250, + WL_SHM_FORMAT_T430 = 0x30333454, + WL_SHM_FORMAT_Y8 = 0x59455247, + WL_SHM_FORMAT_XYYY2101010 = 0x34415059, +}; +#endif + +struct wl_shm_listener { + void (*format)(void *data, + struct wl_shm *wl_shm, + uint32_t format); +}; + +static inline int +wl_shm_add_listener(struct wl_shm *wl_shm, + const struct wl_shm_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_shm, + (void (**)(void)) listener, data); +} + +#define WL_SHM_CREATE_POOL 0 +#define WL_SHM_RELEASE 1 + +#define WL_SHM_FORMAT_SINCE_VERSION 1 + +#define WL_SHM_CREATE_POOL_SINCE_VERSION 1 +#define WL_SHM_RELEASE_SINCE_VERSION 2 + +static inline void +wl_shm_set_user_data(struct wl_shm *wl_shm, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_shm, user_data); +} + +static inline void * +wl_shm_get_user_data(struct wl_shm *wl_shm) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_shm); +} + +static inline uint32_t +wl_shm_get_version(struct wl_shm *wl_shm) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_shm); +} + +static inline void +wl_shm_destroy(struct wl_shm *wl_shm) +{ + wl_proxy_destroy((struct wl_proxy *) wl_shm); +} + +static inline struct wl_shm_pool * +wl_shm_create_pool(struct wl_shm *wl_shm, int32_t fd, int32_t size) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_shm, + WL_SHM_CREATE_POOL, &wl_shm_pool_interface, wl_proxy_get_version((struct wl_proxy *) wl_shm), 0, NULL, fd, size); + + return (struct wl_shm_pool *) id; +} + +static inline void +wl_shm_release(struct wl_shm *wl_shm) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shm, + WL_SHM_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shm), WL_MARSHAL_FLAG_DESTROY); +} + +struct wl_buffer_listener { + void (*release)(void *data, + struct wl_buffer *wl_buffer); +}; + +static inline int +wl_buffer_add_listener(struct wl_buffer *wl_buffer, + const struct wl_buffer_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_buffer, + (void (**)(void)) listener, data); +} + +#define WL_BUFFER_DESTROY 0 + +#define WL_BUFFER_RELEASE_SINCE_VERSION 1 + +#define WL_BUFFER_DESTROY_SINCE_VERSION 1 + +static inline void +wl_buffer_set_user_data(struct wl_buffer *wl_buffer, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_buffer, user_data); +} + +static inline void * +wl_buffer_get_user_data(struct wl_buffer *wl_buffer) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_buffer); +} + +static inline uint32_t +wl_buffer_get_version(struct wl_buffer *wl_buffer) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_buffer); +} + +static inline void +wl_buffer_destroy(struct wl_buffer *wl_buffer) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_buffer, + WL_BUFFER_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_buffer), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef WL_DATA_OFFER_ERROR_ENUM +#define WL_DATA_OFFER_ERROR_ENUM +enum wl_data_offer_error { + WL_DATA_OFFER_ERROR_INVALID_FINISH = 0, + WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK = 1, + WL_DATA_OFFER_ERROR_INVALID_ACTION = 2, + WL_DATA_OFFER_ERROR_INVALID_OFFER = 3, +}; +#endif + +struct wl_data_offer_listener { + void (*offer)(void *data, + struct wl_data_offer *wl_data_offer, + const char *mime_type); + void (*source_actions)(void *data, + struct wl_data_offer *wl_data_offer, + uint32_t source_actions); + void (*action)(void *data, + struct wl_data_offer *wl_data_offer, + uint32_t dnd_action); +}; + +static inline int +wl_data_offer_add_listener(struct wl_data_offer *wl_data_offer, + const struct wl_data_offer_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_data_offer, + (void (**)(void)) listener, data); +} + +#define WL_DATA_OFFER_ACCEPT 0 +#define WL_DATA_OFFER_RECEIVE 1 +#define WL_DATA_OFFER_DESTROY 2 +#define WL_DATA_OFFER_FINISH 3 +#define WL_DATA_OFFER_SET_ACTIONS 4 + +#define WL_DATA_OFFER_OFFER_SINCE_VERSION 1 +#define WL_DATA_OFFER_SOURCE_ACTIONS_SINCE_VERSION 3 +#define WL_DATA_OFFER_ACTION_SINCE_VERSION 3 + +#define WL_DATA_OFFER_ACCEPT_SINCE_VERSION 1 +#define WL_DATA_OFFER_RECEIVE_SINCE_VERSION 1 +#define WL_DATA_OFFER_DESTROY_SINCE_VERSION 1 +#define WL_DATA_OFFER_FINISH_SINCE_VERSION 3 +#define WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION 3 + +static inline void +wl_data_offer_set_user_data(struct wl_data_offer *wl_data_offer, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_data_offer, user_data); +} + +static inline void * +wl_data_offer_get_user_data(struct wl_data_offer *wl_data_offer) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_data_offer); +} + +static inline uint32_t +wl_data_offer_get_version(struct wl_data_offer *wl_data_offer) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_data_offer); +} + +static inline void +wl_data_offer_accept(struct wl_data_offer *wl_data_offer, uint32_t serial, const char *mime_type) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_offer, + WL_DATA_OFFER_ACCEPT, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_offer), 0, serial, mime_type); +} + +static inline void +wl_data_offer_receive(struct wl_data_offer *wl_data_offer, const char *mime_type, int32_t fd) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_offer, + WL_DATA_OFFER_RECEIVE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_offer), 0, mime_type, fd); +} + +static inline void +wl_data_offer_destroy(struct wl_data_offer *wl_data_offer) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_offer, + WL_DATA_OFFER_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_offer), WL_MARSHAL_FLAG_DESTROY); +} + +static inline void +wl_data_offer_finish(struct wl_data_offer *wl_data_offer) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_offer, + WL_DATA_OFFER_FINISH, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_offer), 0); +} + +static inline void +wl_data_offer_set_actions(struct wl_data_offer *wl_data_offer, uint32_t dnd_actions, uint32_t preferred_action) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_offer, + WL_DATA_OFFER_SET_ACTIONS, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_offer), 0, dnd_actions, preferred_action); +} + +#ifndef WL_DATA_SOURCE_ERROR_ENUM +#define WL_DATA_SOURCE_ERROR_ENUM +enum wl_data_source_error { + WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK = 0, + WL_DATA_SOURCE_ERROR_INVALID_SOURCE = 1, +}; +#endif + +struct wl_data_source_listener { + void (*target)(void *data, + struct wl_data_source *wl_data_source, + const char *mime_type); + void (*send)(void *data, + struct wl_data_source *wl_data_source, + const char *mime_type, + int32_t fd); + void (*cancelled)(void *data, + struct wl_data_source *wl_data_source); + void (*dnd_drop_performed)(void *data, + struct wl_data_source *wl_data_source); + void (*dnd_finished)(void *data, + struct wl_data_source *wl_data_source); + void (*action)(void *data, + struct wl_data_source *wl_data_source, + uint32_t dnd_action); +}; + +static inline int +wl_data_source_add_listener(struct wl_data_source *wl_data_source, + const struct wl_data_source_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_data_source, + (void (**)(void)) listener, data); +} + +#define WL_DATA_SOURCE_OFFER 0 +#define WL_DATA_SOURCE_DESTROY 1 +#define WL_DATA_SOURCE_SET_ACTIONS 2 + +#define WL_DATA_SOURCE_TARGET_SINCE_VERSION 1 +#define WL_DATA_SOURCE_SEND_SINCE_VERSION 1 +#define WL_DATA_SOURCE_CANCELLED_SINCE_VERSION 1 +#define WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION 3 +#define WL_DATA_SOURCE_DND_FINISHED_SINCE_VERSION 3 +#define WL_DATA_SOURCE_ACTION_SINCE_VERSION 3 + +#define WL_DATA_SOURCE_OFFER_SINCE_VERSION 1 +#define WL_DATA_SOURCE_DESTROY_SINCE_VERSION 1 +#define WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION 3 + +static inline void +wl_data_source_set_user_data(struct wl_data_source *wl_data_source, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_data_source, user_data); +} + +static inline void * +wl_data_source_get_user_data(struct wl_data_source *wl_data_source) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_data_source); +} + +static inline uint32_t +wl_data_source_get_version(struct wl_data_source *wl_data_source) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_data_source); +} + +static inline void +wl_data_source_offer(struct wl_data_source *wl_data_source, const char *mime_type) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_source, + WL_DATA_SOURCE_OFFER, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_source), 0, mime_type); +} + +static inline void +wl_data_source_destroy(struct wl_data_source *wl_data_source) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_source, + WL_DATA_SOURCE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_source), WL_MARSHAL_FLAG_DESTROY); +} + +static inline void +wl_data_source_set_actions(struct wl_data_source *wl_data_source, uint32_t dnd_actions) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_source, + WL_DATA_SOURCE_SET_ACTIONS, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_source), 0, dnd_actions); +} + +#ifndef WL_DATA_DEVICE_ERROR_ENUM +#define WL_DATA_DEVICE_ERROR_ENUM +enum wl_data_device_error { + WL_DATA_DEVICE_ERROR_ROLE = 0, + WL_DATA_DEVICE_ERROR_USED_SOURCE = 1, +}; +#endif + +struct wl_data_device_listener { + void (*data_offer)(void *data, + struct wl_data_device *wl_data_device, + struct wl_data_offer *id); + void (*enter)(void *data, + struct wl_data_device *wl_data_device, + uint32_t serial, + struct wl_surface *surface, + wl_fixed_t x, + wl_fixed_t y, + struct wl_data_offer *id); + void (*leave)(void *data, + struct wl_data_device *wl_data_device); + void (*motion)(void *data, + struct wl_data_device *wl_data_device, + uint32_t time, + wl_fixed_t x, + wl_fixed_t y); + void (*drop)(void *data, + struct wl_data_device *wl_data_device); + void (*selection)(void *data, + struct wl_data_device *wl_data_device, + struct wl_data_offer *id); +}; + +static inline int +wl_data_device_add_listener(struct wl_data_device *wl_data_device, + const struct wl_data_device_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_data_device, + (void (**)(void)) listener, data); +} + +#define WL_DATA_DEVICE_START_DRAG 0 +#define WL_DATA_DEVICE_SET_SELECTION 1 +#define WL_DATA_DEVICE_RELEASE 2 + +#define WL_DATA_DEVICE_DATA_OFFER_SINCE_VERSION 1 +#define WL_DATA_DEVICE_ENTER_SINCE_VERSION 1 +#define WL_DATA_DEVICE_LEAVE_SINCE_VERSION 1 +#define WL_DATA_DEVICE_MOTION_SINCE_VERSION 1 +#define WL_DATA_DEVICE_DROP_SINCE_VERSION 1 +#define WL_DATA_DEVICE_SELECTION_SINCE_VERSION 1 + +#define WL_DATA_DEVICE_START_DRAG_SINCE_VERSION 1 +#define WL_DATA_DEVICE_SET_SELECTION_SINCE_VERSION 1 +#define WL_DATA_DEVICE_RELEASE_SINCE_VERSION 2 + +static inline void +wl_data_device_set_user_data(struct wl_data_device *wl_data_device, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_data_device, user_data); +} + +static inline void * +wl_data_device_get_user_data(struct wl_data_device *wl_data_device) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_data_device); +} + +static inline uint32_t +wl_data_device_get_version(struct wl_data_device *wl_data_device) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_data_device); +} + +static inline void +wl_data_device_destroy(struct wl_data_device *wl_data_device) +{ + wl_proxy_destroy((struct wl_proxy *) wl_data_device); +} + +static inline void +wl_data_device_start_drag(struct wl_data_device *wl_data_device, struct wl_data_source *source, struct wl_surface *origin, struct wl_surface *icon, uint32_t serial) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_device, + WL_DATA_DEVICE_START_DRAG, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_device), 0, source, origin, icon, serial); +} + +static inline void +wl_data_device_set_selection(struct wl_data_device *wl_data_device, struct wl_data_source *source, uint32_t serial) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_device, + WL_DATA_DEVICE_SET_SELECTION, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_device), 0, source, serial); +} + +static inline void +wl_data_device_release(struct wl_data_device *wl_data_device) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_device, + WL_DATA_DEVICE_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_device), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM +#define WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM +enum wl_data_device_manager_dnd_action { + WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, + WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY = 1, + WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE = 2, + WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK = 4, +}; +#endif + +#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE 0 +#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE 1 +#define WL_DATA_DEVICE_MANAGER_RELEASE 2 + + +#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE_SINCE_VERSION 1 +#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE_SINCE_VERSION 1 +#define WL_DATA_DEVICE_MANAGER_RELEASE_SINCE_VERSION 4 + +static inline void +wl_data_device_manager_set_user_data(struct wl_data_device_manager *wl_data_device_manager, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_data_device_manager, user_data); +} + +static inline void * +wl_data_device_manager_get_user_data(struct wl_data_device_manager *wl_data_device_manager) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_data_device_manager); +} + +static inline uint32_t +wl_data_device_manager_get_version(struct wl_data_device_manager *wl_data_device_manager) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_data_device_manager); +} + +static inline void +wl_data_device_manager_destroy(struct wl_data_device_manager *wl_data_device_manager) +{ + wl_proxy_destroy((struct wl_proxy *) wl_data_device_manager); +} + +static inline struct wl_data_source * +wl_data_device_manager_create_data_source(struct wl_data_device_manager *wl_data_device_manager) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_data_device_manager, + WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE, &wl_data_source_interface, wl_proxy_get_version((struct wl_proxy *) wl_data_device_manager), 0, NULL); + + return (struct wl_data_source *) id; +} + +static inline struct wl_data_device * +wl_data_device_manager_get_data_device(struct wl_data_device_manager *wl_data_device_manager, struct wl_seat *seat) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_data_device_manager, + WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE, &wl_data_device_interface, wl_proxy_get_version((struct wl_proxy *) wl_data_device_manager), 0, NULL, seat); + + return (struct wl_data_device *) id; +} + +static inline void +wl_data_device_manager_release(struct wl_data_device_manager *wl_data_device_manager) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_data_device_manager, + WL_DATA_DEVICE_MANAGER_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_data_device_manager), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef WL_SHELL_ERROR_ENUM +#define WL_SHELL_ERROR_ENUM +enum wl_shell_error { + WL_SHELL_ERROR_ROLE = 0, +}; +#endif + +#define WL_SHELL_GET_SHELL_SURFACE 0 + + +#define WL_SHELL_GET_SHELL_SURFACE_SINCE_VERSION 1 + +static inline void +wl_shell_set_user_data(struct wl_shell *wl_shell, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_shell, user_data); +} + +static inline void * +wl_shell_get_user_data(struct wl_shell *wl_shell) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_shell); +} + +static inline uint32_t +wl_shell_get_version(struct wl_shell *wl_shell) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_shell); +} + +static inline void +wl_shell_destroy(struct wl_shell *wl_shell) +{ + wl_proxy_destroy((struct wl_proxy *) wl_shell); +} + +static inline struct wl_shell_surface * +wl_shell_get_shell_surface(struct wl_shell *wl_shell, struct wl_surface *surface) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_shell, + WL_SHELL_GET_SHELL_SURFACE, &wl_shell_surface_interface, wl_proxy_get_version((struct wl_proxy *) wl_shell), 0, NULL, surface); + + return (struct wl_shell_surface *) id; +} + +#ifndef WL_SHELL_SURFACE_RESIZE_ENUM +#define WL_SHELL_SURFACE_RESIZE_ENUM +enum wl_shell_surface_resize { + WL_SHELL_SURFACE_RESIZE_NONE = 0, + WL_SHELL_SURFACE_RESIZE_TOP = 1, + WL_SHELL_SURFACE_RESIZE_BOTTOM = 2, + WL_SHELL_SURFACE_RESIZE_LEFT = 4, + WL_SHELL_SURFACE_RESIZE_TOP_LEFT = 5, + WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT = 6, + WL_SHELL_SURFACE_RESIZE_RIGHT = 8, + WL_SHELL_SURFACE_RESIZE_TOP_RIGHT = 9, + WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT = 10, +}; +#endif + +#ifndef WL_SHELL_SURFACE_TRANSIENT_ENUM +#define WL_SHELL_SURFACE_TRANSIENT_ENUM +enum wl_shell_surface_transient { + WL_SHELL_SURFACE_TRANSIENT_INACTIVE = 0x1, +}; +#endif + +#ifndef WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM +#define WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM +enum wl_shell_surface_fullscreen_method { + WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT = 0, + WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE = 1, + WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER = 2, + WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL = 3, +}; +#endif + +struct wl_shell_surface_listener { + void (*ping)(void *data, + struct wl_shell_surface *wl_shell_surface, + uint32_t serial); + void (*configure)(void *data, + struct wl_shell_surface *wl_shell_surface, + uint32_t edges, + int32_t width, + int32_t height); + void (*popup_done)(void *data, + struct wl_shell_surface *wl_shell_surface); +}; + +static inline int +wl_shell_surface_add_listener(struct wl_shell_surface *wl_shell_surface, + const struct wl_shell_surface_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_shell_surface, + (void (**)(void)) listener, data); +} + +#define WL_SHELL_SURFACE_PONG 0 +#define WL_SHELL_SURFACE_MOVE 1 +#define WL_SHELL_SURFACE_RESIZE 2 +#define WL_SHELL_SURFACE_SET_TOPLEVEL 3 +#define WL_SHELL_SURFACE_SET_TRANSIENT 4 +#define WL_SHELL_SURFACE_SET_FULLSCREEN 5 +#define WL_SHELL_SURFACE_SET_POPUP 6 +#define WL_SHELL_SURFACE_SET_MAXIMIZED 7 +#define WL_SHELL_SURFACE_SET_TITLE 8 +#define WL_SHELL_SURFACE_SET_CLASS 9 + +#define WL_SHELL_SURFACE_PING_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_CONFIGURE_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_POPUP_DONE_SINCE_VERSION 1 + +#define WL_SHELL_SURFACE_PONG_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_MOVE_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_RESIZE_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_SET_TOPLEVEL_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_SET_TRANSIENT_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_SET_POPUP_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_SET_TITLE_SINCE_VERSION 1 +#define WL_SHELL_SURFACE_SET_CLASS_SINCE_VERSION 1 + +static inline void +wl_shell_surface_set_user_data(struct wl_shell_surface *wl_shell_surface, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_shell_surface, user_data); +} + +static inline void * +wl_shell_surface_get_user_data(struct wl_shell_surface *wl_shell_surface) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_shell_surface); +} + +static inline uint32_t +wl_shell_surface_get_version(struct wl_shell_surface *wl_shell_surface) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_shell_surface); +} + +static inline void +wl_shell_surface_destroy(struct wl_shell_surface *wl_shell_surface) +{ + wl_proxy_destroy((struct wl_proxy *) wl_shell_surface); +} + +static inline void +wl_shell_surface_pong(struct wl_shell_surface *wl_shell_surface, uint32_t serial) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_PONG, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0, serial); +} + +static inline void +wl_shell_surface_move(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_MOVE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0, seat, serial); +} + +static inline void +wl_shell_surface_resize(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial, uint32_t edges) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_RESIZE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0, seat, serial, edges); +} + +static inline void +wl_shell_surface_set_toplevel(struct wl_shell_surface *wl_shell_surface) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_SET_TOPLEVEL, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0); +} + +static inline void +wl_shell_surface_set_transient(struct wl_shell_surface *wl_shell_surface, struct wl_surface *parent, int32_t x, int32_t y, uint32_t flags) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_SET_TRANSIENT, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0, parent, x, y, flags); +} + +static inline void +wl_shell_surface_set_fullscreen(struct wl_shell_surface *wl_shell_surface, uint32_t method, uint32_t framerate, struct wl_output *output) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_SET_FULLSCREEN, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0, method, framerate, output); +} + +static inline void +wl_shell_surface_set_popup(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial, struct wl_surface *parent, int32_t x, int32_t y, uint32_t flags) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_SET_POPUP, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0, seat, serial, parent, x, y, flags); +} + +static inline void +wl_shell_surface_set_maximized(struct wl_shell_surface *wl_shell_surface, struct wl_output *output) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_SET_MAXIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0, output); +} + +static inline void +wl_shell_surface_set_title(struct wl_shell_surface *wl_shell_surface, const char *title) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_SET_TITLE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0, title); +} + +static inline void +wl_shell_surface_set_class(struct wl_shell_surface *wl_shell_surface, const char *class_) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_shell_surface, + WL_SHELL_SURFACE_SET_CLASS, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shell_surface), 0, class_); +} + +#ifndef WL_SURFACE_ERROR_ENUM +#define WL_SURFACE_ERROR_ENUM +enum wl_surface_error { + WL_SURFACE_ERROR_INVALID_SCALE = 0, + WL_SURFACE_ERROR_INVALID_TRANSFORM = 1, + WL_SURFACE_ERROR_INVALID_SIZE = 2, + WL_SURFACE_ERROR_INVALID_OFFSET = 3, + WL_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT = 4, + WL_SURFACE_ERROR_NO_BUFFER = 5, +}; +#endif + +struct wl_surface_listener { + void (*enter)(void *data, + struct wl_surface *wl_surface, + struct wl_output *output); + void (*leave)(void *data, + struct wl_surface *wl_surface, + struct wl_output *output); + void (*preferred_buffer_scale)(void *data, + struct wl_surface *wl_surface, + int32_t factor); + void (*preferred_buffer_transform)(void *data, + struct wl_surface *wl_surface, + uint32_t transform); +}; + +static inline int +wl_surface_add_listener(struct wl_surface *wl_surface, + const struct wl_surface_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_surface, + (void (**)(void)) listener, data); +} + +#define WL_SURFACE_DESTROY 0 +#define WL_SURFACE_ATTACH 1 +#define WL_SURFACE_DAMAGE 2 +#define WL_SURFACE_FRAME 3 +#define WL_SURFACE_SET_OPAQUE_REGION 4 +#define WL_SURFACE_SET_INPUT_REGION 5 +#define WL_SURFACE_COMMIT 6 +#define WL_SURFACE_SET_BUFFER_TRANSFORM 7 +#define WL_SURFACE_SET_BUFFER_SCALE 8 +#define WL_SURFACE_DAMAGE_BUFFER 9 +#define WL_SURFACE_OFFSET 10 +#define WL_SURFACE_GET_RELEASE 11 + +#define WL_SURFACE_ENTER_SINCE_VERSION 1 +#define WL_SURFACE_LEAVE_SINCE_VERSION 1 +#define WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION 6 +#define WL_SURFACE_PREFERRED_BUFFER_TRANSFORM_SINCE_VERSION 6 + +#define WL_SURFACE_DESTROY_SINCE_VERSION 1 +#define WL_SURFACE_ATTACH_SINCE_VERSION 1 +#define WL_SURFACE_DAMAGE_SINCE_VERSION 1 +#define WL_SURFACE_FRAME_SINCE_VERSION 1 +#define WL_SURFACE_SET_OPAQUE_REGION_SINCE_VERSION 1 +#define WL_SURFACE_SET_INPUT_REGION_SINCE_VERSION 1 +#define WL_SURFACE_COMMIT_SINCE_VERSION 1 +#define WL_SURFACE_SET_BUFFER_TRANSFORM_SINCE_VERSION 2 +#define WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION 3 +#define WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION 4 +#define WL_SURFACE_OFFSET_SINCE_VERSION 5 +#define WL_SURFACE_GET_RELEASE_SINCE_VERSION 7 + +static inline void +wl_surface_set_user_data(struct wl_surface *wl_surface, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_surface, user_data); +} + +static inline void * +wl_surface_get_user_data(struct wl_surface *wl_surface) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_surface); +} + +static inline uint32_t +wl_surface_get_version(struct wl_surface *wl_surface) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_surface); +} + +static inline void +wl_surface_destroy(struct wl_surface *wl_surface) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), WL_MARSHAL_FLAG_DESTROY); +} + +static inline void +wl_surface_attach(struct wl_surface *wl_surface, struct wl_buffer *buffer, int32_t x, int32_t y) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_ATTACH, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, buffer, x, y); +} + +static inline void +wl_surface_damage(struct wl_surface *wl_surface, int32_t x, int32_t y, int32_t width, int32_t height) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_DAMAGE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, x, y, width, height); +} + +static inline struct wl_callback * +wl_surface_frame(struct wl_surface *wl_surface) +{ + struct wl_proxy *callback; + + callback = wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_FRAME, &wl_callback_interface, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, NULL); + + return (struct wl_callback *) callback; +} + +static inline void +wl_surface_set_opaque_region(struct wl_surface *wl_surface, struct wl_region *region) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_SET_OPAQUE_REGION, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, region); +} + +static inline void +wl_surface_set_input_region(struct wl_surface *wl_surface, struct wl_region *region) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_SET_INPUT_REGION, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, region); +} + +static inline void +wl_surface_commit(struct wl_surface *wl_surface) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_COMMIT, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0); +} + +static inline void +wl_surface_set_buffer_transform(struct wl_surface *wl_surface, int32_t transform) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_SET_BUFFER_TRANSFORM, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, transform); +} + +static inline void +wl_surface_set_buffer_scale(struct wl_surface *wl_surface, int32_t scale) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_SET_BUFFER_SCALE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, scale); +} + +static inline void +wl_surface_damage_buffer(struct wl_surface *wl_surface, int32_t x, int32_t y, int32_t width, int32_t height) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_DAMAGE_BUFFER, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, x, y, width, height); +} + +static inline void +wl_surface_offset(struct wl_surface *wl_surface, int32_t x, int32_t y) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_OFFSET, NULL, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, x, y); +} + +static inline struct wl_callback * +wl_surface_get_release(struct wl_surface *wl_surface) +{ + struct wl_proxy *callback; + + callback = wl_proxy_marshal_flags((struct wl_proxy *) wl_surface, + WL_SURFACE_GET_RELEASE, &wl_callback_interface, wl_proxy_get_version((struct wl_proxy *) wl_surface), 0, NULL); + + return (struct wl_callback *) callback; +} + +#ifndef WL_SEAT_CAPABILITY_ENUM +#define WL_SEAT_CAPABILITY_ENUM +enum wl_seat_capability { + WL_SEAT_CAPABILITY_POINTER = 1, + WL_SEAT_CAPABILITY_KEYBOARD = 2, + WL_SEAT_CAPABILITY_TOUCH = 4, +}; +#endif + +#ifndef WL_SEAT_ERROR_ENUM +#define WL_SEAT_ERROR_ENUM +enum wl_seat_error { + WL_SEAT_ERROR_MISSING_CAPABILITY = 0, +}; +#endif + +struct wl_seat_listener { + void (*capabilities)(void *data, + struct wl_seat *wl_seat, + uint32_t capabilities); + void (*name)(void *data, + struct wl_seat *wl_seat, + const char *name); +}; + +static inline int +wl_seat_add_listener(struct wl_seat *wl_seat, + const struct wl_seat_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_seat, + (void (**)(void)) listener, data); +} + +#define WL_SEAT_GET_POINTER 0 +#define WL_SEAT_GET_KEYBOARD 1 +#define WL_SEAT_GET_TOUCH 2 +#define WL_SEAT_RELEASE 3 + +#define WL_SEAT_CAPABILITIES_SINCE_VERSION 1 +#define WL_SEAT_NAME_SINCE_VERSION 2 + +#define WL_SEAT_GET_POINTER_SINCE_VERSION 1 +#define WL_SEAT_GET_KEYBOARD_SINCE_VERSION 1 +#define WL_SEAT_GET_TOUCH_SINCE_VERSION 1 +#define WL_SEAT_RELEASE_SINCE_VERSION 5 + +static inline void +wl_seat_set_user_data(struct wl_seat *wl_seat, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_seat, user_data); +} + +static inline void * +wl_seat_get_user_data(struct wl_seat *wl_seat) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_seat); +} + +static inline uint32_t +wl_seat_get_version(struct wl_seat *wl_seat) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_seat); +} + +static inline void +wl_seat_destroy(struct wl_seat *wl_seat) +{ + wl_proxy_destroy((struct wl_proxy *) wl_seat); +} + +static inline struct wl_pointer * +wl_seat_get_pointer(struct wl_seat *wl_seat) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_seat, + WL_SEAT_GET_POINTER, &wl_pointer_interface, wl_proxy_get_version((struct wl_proxy *) wl_seat), 0, NULL); + + return (struct wl_pointer *) id; +} + +static inline struct wl_keyboard * +wl_seat_get_keyboard(struct wl_seat *wl_seat) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_seat, + WL_SEAT_GET_KEYBOARD, &wl_keyboard_interface, wl_proxy_get_version((struct wl_proxy *) wl_seat), 0, NULL); + + return (struct wl_keyboard *) id; +} + +static inline struct wl_touch * +wl_seat_get_touch(struct wl_seat *wl_seat) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_seat, + WL_SEAT_GET_TOUCH, &wl_touch_interface, wl_proxy_get_version((struct wl_proxy *) wl_seat), 0, NULL); + + return (struct wl_touch *) id; +} + +static inline void +wl_seat_release(struct wl_seat *wl_seat) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_seat, + WL_SEAT_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_seat), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef WL_POINTER_ERROR_ENUM +#define WL_POINTER_ERROR_ENUM +enum wl_pointer_error { + WL_POINTER_ERROR_ROLE = 0, +}; +#endif + +#ifndef WL_POINTER_BUTTON_STATE_ENUM +#define WL_POINTER_BUTTON_STATE_ENUM +enum wl_pointer_button_state { + WL_POINTER_BUTTON_STATE_RELEASED = 0, + WL_POINTER_BUTTON_STATE_PRESSED = 1, +}; +#endif + +#ifndef WL_POINTER_AXIS_ENUM +#define WL_POINTER_AXIS_ENUM +enum wl_pointer_axis { + WL_POINTER_AXIS_VERTICAL_SCROLL = 0, + WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, +}; +#endif + +#ifndef WL_POINTER_AXIS_SOURCE_ENUM +#define WL_POINTER_AXIS_SOURCE_ENUM +enum wl_pointer_axis_source { + WL_POINTER_AXIS_SOURCE_WHEEL = 0, + WL_POINTER_AXIS_SOURCE_FINGER = 1, + WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, + WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, +}; +#define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 +#endif + +#ifndef WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM +#define WL_POINTER_AXIS_RELATIVE_DIRECTION_ENUM +enum wl_pointer_axis_relative_direction { + WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL = 0, + WL_POINTER_AXIS_RELATIVE_DIRECTION_INVERTED = 1, +}; +#endif + +struct wl_pointer_listener { + void (*enter)(void *data, + struct wl_pointer *wl_pointer, + uint32_t serial, + struct wl_surface *surface, + wl_fixed_t surface_x, + wl_fixed_t surface_y); + void (*leave)(void *data, + struct wl_pointer *wl_pointer, + uint32_t serial, + struct wl_surface *surface); + void (*motion)(void *data, + struct wl_pointer *wl_pointer, + uint32_t time, + wl_fixed_t surface_x, + wl_fixed_t surface_y); + void (*button)(void *data, + struct wl_pointer *wl_pointer, + uint32_t serial, + uint32_t time, + uint32_t button, + uint32_t state); + void (*axis)(void *data, + struct wl_pointer *wl_pointer, + uint32_t time, + uint32_t axis, + wl_fixed_t value); + void (*frame)(void *data, + struct wl_pointer *wl_pointer); + void (*axis_source)(void *data, + struct wl_pointer *wl_pointer, + uint32_t axis_source); + void (*axis_stop)(void *data, + struct wl_pointer *wl_pointer, + uint32_t time, + uint32_t axis); + void (*axis_discrete)(void *data, + struct wl_pointer *wl_pointer, + uint32_t axis, + int32_t discrete); + void (*axis_value120)(void *data, + struct wl_pointer *wl_pointer, + uint32_t axis, + int32_t value120); + void (*axis_relative_direction)(void *data, + struct wl_pointer *wl_pointer, + uint32_t axis, + uint32_t direction); + void (*warp)(void *data, + struct wl_pointer *wl_pointer, + wl_fixed_t surface_x, + wl_fixed_t surface_y); +}; + +static inline int +wl_pointer_add_listener(struct wl_pointer *wl_pointer, + const struct wl_pointer_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_pointer, + (void (**)(void)) listener, data); +} + +#define WL_POINTER_SET_CURSOR 0 +#define WL_POINTER_RELEASE 1 + +#define WL_POINTER_ENTER_SINCE_VERSION 1 +#define WL_POINTER_LEAVE_SINCE_VERSION 1 +#define WL_POINTER_MOTION_SINCE_VERSION 1 +#define WL_POINTER_BUTTON_SINCE_VERSION 1 +#define WL_POINTER_AXIS_SINCE_VERSION 1 +#define WL_POINTER_FRAME_SINCE_VERSION 5 +#define WL_POINTER_AXIS_SOURCE_SINCE_VERSION 5 +#define WL_POINTER_AXIS_STOP_SINCE_VERSION 5 +#define WL_POINTER_AXIS_DISCRETE_SINCE_VERSION 5 +#define WL_POINTER_AXIS_VALUE120_SINCE_VERSION 8 +#define WL_POINTER_AXIS_RELATIVE_DIRECTION_SINCE_VERSION 9 +#define WL_POINTER_WARP_SINCE_VERSION 11 + +#define WL_POINTER_SET_CURSOR_SINCE_VERSION 1 +#define WL_POINTER_RELEASE_SINCE_VERSION 3 + +static inline void +wl_pointer_set_user_data(struct wl_pointer *wl_pointer, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_pointer, user_data); +} + +static inline void * +wl_pointer_get_user_data(struct wl_pointer *wl_pointer) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_pointer); +} + +static inline uint32_t +wl_pointer_get_version(struct wl_pointer *wl_pointer) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_pointer); +} + +static inline void +wl_pointer_destroy(struct wl_pointer *wl_pointer) +{ + wl_proxy_destroy((struct wl_proxy *) wl_pointer); +} + +static inline void +wl_pointer_set_cursor(struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface, int32_t hotspot_x, int32_t hotspot_y) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_pointer, + WL_POINTER_SET_CURSOR, NULL, wl_proxy_get_version((struct wl_proxy *) wl_pointer), 0, serial, surface, hotspot_x, hotspot_y); +} + +static inline void +wl_pointer_release(struct wl_pointer *wl_pointer) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_pointer, + WL_POINTER_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_pointer), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef WL_KEYBOARD_KEYMAP_FORMAT_ENUM +#define WL_KEYBOARD_KEYMAP_FORMAT_ENUM +enum wl_keyboard_keymap_format { + WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0, + WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1, +}; +#endif + +#ifndef WL_KEYBOARD_KEY_STATE_ENUM +#define WL_KEYBOARD_KEY_STATE_ENUM +enum wl_keyboard_key_state { + WL_KEYBOARD_KEY_STATE_RELEASED = 0, + WL_KEYBOARD_KEY_STATE_PRESSED = 1, + WL_KEYBOARD_KEY_STATE_REPEATED = 2, +}; +#define WL_KEYBOARD_KEY_STATE_REPEATED_SINCE_VERSION 10 +#endif + +struct wl_keyboard_listener { + void (*keymap)(void *data, + struct wl_keyboard *wl_keyboard, + uint32_t format, + int32_t fd, + uint32_t size); + void (*enter)(void *data, + struct wl_keyboard *wl_keyboard, + uint32_t serial, + struct wl_surface *surface, + struct wl_array *keys); + void (*leave)(void *data, + struct wl_keyboard *wl_keyboard, + uint32_t serial, + struct wl_surface *surface); + void (*key)(void *data, + struct wl_keyboard *wl_keyboard, + uint32_t serial, + uint32_t time, + uint32_t key, + uint32_t state); + void (*modifiers)(void *data, + struct wl_keyboard *wl_keyboard, + uint32_t serial, + uint32_t mods_depressed, + uint32_t mods_latched, + uint32_t mods_locked, + uint32_t group); + void (*repeat_info)(void *data, + struct wl_keyboard *wl_keyboard, + int32_t rate, + int32_t delay); +}; + +static inline int +wl_keyboard_add_listener(struct wl_keyboard *wl_keyboard, + const struct wl_keyboard_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_keyboard, + (void (**)(void)) listener, data); +} + +#define WL_KEYBOARD_RELEASE 0 + +#define WL_KEYBOARD_KEYMAP_SINCE_VERSION 1 +#define WL_KEYBOARD_ENTER_SINCE_VERSION 1 +#define WL_KEYBOARD_LEAVE_SINCE_VERSION 1 +#define WL_KEYBOARD_KEY_SINCE_VERSION 1 +#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION 1 +#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 4 + +#define WL_KEYBOARD_RELEASE_SINCE_VERSION 3 + +static inline void +wl_keyboard_set_user_data(struct wl_keyboard *wl_keyboard, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_keyboard, user_data); +} + +static inline void * +wl_keyboard_get_user_data(struct wl_keyboard *wl_keyboard) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_keyboard); +} + +static inline uint32_t +wl_keyboard_get_version(struct wl_keyboard *wl_keyboard) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_keyboard); +} + +static inline void +wl_keyboard_destroy(struct wl_keyboard *wl_keyboard) +{ + wl_proxy_destroy((struct wl_proxy *) wl_keyboard); +} + +static inline void +wl_keyboard_release(struct wl_keyboard *wl_keyboard) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_keyboard, + WL_KEYBOARD_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_keyboard), WL_MARSHAL_FLAG_DESTROY); +} + +struct wl_touch_listener { + void (*down)(void *data, + struct wl_touch *wl_touch, + uint32_t serial, + uint32_t time, + struct wl_surface *surface, + int32_t id, + wl_fixed_t x, + wl_fixed_t y); + void (*up)(void *data, + struct wl_touch *wl_touch, + uint32_t serial, + uint32_t time, + int32_t id); + void (*motion)(void *data, + struct wl_touch *wl_touch, + uint32_t time, + int32_t id, + wl_fixed_t x, + wl_fixed_t y); + void (*frame)(void *data, + struct wl_touch *wl_touch); + void (*cancel)(void *data, + struct wl_touch *wl_touch); + void (*shape)(void *data, + struct wl_touch *wl_touch, + int32_t id, + wl_fixed_t major, + wl_fixed_t minor); + void (*orientation)(void *data, + struct wl_touch *wl_touch, + int32_t id, + wl_fixed_t orientation); +}; + +static inline int +wl_touch_add_listener(struct wl_touch *wl_touch, + const struct wl_touch_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_touch, + (void (**)(void)) listener, data); +} + +#define WL_TOUCH_RELEASE 0 + +#define WL_TOUCH_DOWN_SINCE_VERSION 1 +#define WL_TOUCH_UP_SINCE_VERSION 1 +#define WL_TOUCH_MOTION_SINCE_VERSION 1 +#define WL_TOUCH_FRAME_SINCE_VERSION 1 +#define WL_TOUCH_CANCEL_SINCE_VERSION 1 +#define WL_TOUCH_SHAPE_SINCE_VERSION 6 +#define WL_TOUCH_ORIENTATION_SINCE_VERSION 6 + +#define WL_TOUCH_RELEASE_SINCE_VERSION 3 + +static inline void +wl_touch_set_user_data(struct wl_touch *wl_touch, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_touch, user_data); +} + +static inline void * +wl_touch_get_user_data(struct wl_touch *wl_touch) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_touch); +} + +static inline uint32_t +wl_touch_get_version(struct wl_touch *wl_touch) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_touch); +} + +static inline void +wl_touch_destroy(struct wl_touch *wl_touch) +{ + wl_proxy_destroy((struct wl_proxy *) wl_touch); +} + +static inline void +wl_touch_release(struct wl_touch *wl_touch) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_touch, + WL_TOUCH_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_touch), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef WL_OUTPUT_SUBPIXEL_ENUM +#define WL_OUTPUT_SUBPIXEL_ENUM +enum wl_output_subpixel { + WL_OUTPUT_SUBPIXEL_UNKNOWN = 0, + WL_OUTPUT_SUBPIXEL_NONE = 1, + WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB = 2, + WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR = 3, + WL_OUTPUT_SUBPIXEL_VERTICAL_RGB = 4, + WL_OUTPUT_SUBPIXEL_VERTICAL_BGR = 5, +}; +#endif + +#ifndef WL_OUTPUT_TRANSFORM_ENUM +#define WL_OUTPUT_TRANSFORM_ENUM +enum wl_output_transform { + WL_OUTPUT_TRANSFORM_NORMAL = 0, + WL_OUTPUT_TRANSFORM_90 = 1, + WL_OUTPUT_TRANSFORM_180 = 2, + WL_OUTPUT_TRANSFORM_270 = 3, + WL_OUTPUT_TRANSFORM_FLIPPED = 4, + WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5, + WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6, + WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7, +}; +#endif + +#ifndef WL_OUTPUT_MODE_ENUM +#define WL_OUTPUT_MODE_ENUM +enum wl_output_mode { + WL_OUTPUT_MODE_CURRENT = 0x1, + WL_OUTPUT_MODE_PREFERRED = 0x2, +}; +#endif + +struct wl_output_listener { + void (*geometry)(void *data, + struct wl_output *wl_output, + int32_t x, + int32_t y, + int32_t physical_width, + int32_t physical_height, + int32_t subpixel, + const char *make, + const char *model, + int32_t transform); + void (*mode)(void *data, + struct wl_output *wl_output, + uint32_t flags, + int32_t width, + int32_t height, + int32_t refresh); + void (*done)(void *data, + struct wl_output *wl_output); + void (*scale)(void *data, + struct wl_output *wl_output, + int32_t factor); + void (*name)(void *data, + struct wl_output *wl_output, + const char *name); + void (*description)(void *data, + struct wl_output *wl_output, + const char *description); +}; + +static inline int +wl_output_add_listener(struct wl_output *wl_output, + const struct wl_output_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) wl_output, + (void (**)(void)) listener, data); +} + +#define WL_OUTPUT_RELEASE 0 + +#define WL_OUTPUT_GEOMETRY_SINCE_VERSION 1 +#define WL_OUTPUT_MODE_SINCE_VERSION 1 +#define WL_OUTPUT_DONE_SINCE_VERSION 2 +#define WL_OUTPUT_SCALE_SINCE_VERSION 2 +#define WL_OUTPUT_NAME_SINCE_VERSION 4 +#define WL_OUTPUT_DESCRIPTION_SINCE_VERSION 4 + +#define WL_OUTPUT_RELEASE_SINCE_VERSION 3 + +static inline void +wl_output_set_user_data(struct wl_output *wl_output, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_output, user_data); +} + +static inline void * +wl_output_get_user_data(struct wl_output *wl_output) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_output); +} + +static inline uint32_t +wl_output_get_version(struct wl_output *wl_output) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_output); +} + +static inline void +wl_output_destroy(struct wl_output *wl_output) +{ + wl_proxy_destroy((struct wl_proxy *) wl_output); +} + +static inline void +wl_output_release(struct wl_output *wl_output) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_output, + WL_OUTPUT_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_output), WL_MARSHAL_FLAG_DESTROY); +} + +#define WL_REGION_DESTROY 0 +#define WL_REGION_ADD 1 +#define WL_REGION_SUBTRACT 2 + + +#define WL_REGION_DESTROY_SINCE_VERSION 1 +#define WL_REGION_ADD_SINCE_VERSION 1 +#define WL_REGION_SUBTRACT_SINCE_VERSION 1 + +static inline void +wl_region_set_user_data(struct wl_region *wl_region, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_region, user_data); +} + +static inline void * +wl_region_get_user_data(struct wl_region *wl_region) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_region); +} + +static inline uint32_t +wl_region_get_version(struct wl_region *wl_region) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_region); +} + +static inline void +wl_region_destroy(struct wl_region *wl_region) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_region, + WL_REGION_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_region), WL_MARSHAL_FLAG_DESTROY); +} + +static inline void +wl_region_add(struct wl_region *wl_region, int32_t x, int32_t y, int32_t width, int32_t height) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_region, + WL_REGION_ADD, NULL, wl_proxy_get_version((struct wl_proxy *) wl_region), 0, x, y, width, height); +} + +static inline void +wl_region_subtract(struct wl_region *wl_region, int32_t x, int32_t y, int32_t width, int32_t height) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_region, + WL_REGION_SUBTRACT, NULL, wl_proxy_get_version((struct wl_proxy *) wl_region), 0, x, y, width, height); +} + +#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM +#define WL_SUBCOMPOSITOR_ERROR_ENUM +enum wl_subcompositor_error { + WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0, + WL_SUBCOMPOSITOR_ERROR_BAD_PARENT = 1, +}; +#endif + +#define WL_SUBCOMPOSITOR_DESTROY 0 +#define WL_SUBCOMPOSITOR_GET_SUBSURFACE 1 + + +#define WL_SUBCOMPOSITOR_DESTROY_SINCE_VERSION 1 +#define WL_SUBCOMPOSITOR_GET_SUBSURFACE_SINCE_VERSION 1 + +static inline void +wl_subcompositor_set_user_data(struct wl_subcompositor *wl_subcompositor, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_subcompositor, user_data); +} + +static inline void * +wl_subcompositor_get_user_data(struct wl_subcompositor *wl_subcompositor) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_subcompositor); +} + +static inline uint32_t +wl_subcompositor_get_version(struct wl_subcompositor *wl_subcompositor) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_subcompositor); +} + +static inline void +wl_subcompositor_destroy(struct wl_subcompositor *wl_subcompositor) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_subcompositor, + WL_SUBCOMPOSITOR_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_subcompositor), WL_MARSHAL_FLAG_DESTROY); +} + +static inline struct wl_subsurface * +wl_subcompositor_get_subsurface(struct wl_subcompositor *wl_subcompositor, struct wl_surface *surface, struct wl_surface *parent) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) wl_subcompositor, + WL_SUBCOMPOSITOR_GET_SUBSURFACE, &wl_subsurface_interface, wl_proxy_get_version((struct wl_proxy *) wl_subcompositor), 0, NULL, surface, parent); + + return (struct wl_subsurface *) id; +} + +#ifndef WL_SUBSURFACE_ERROR_ENUM +#define WL_SUBSURFACE_ERROR_ENUM +enum wl_subsurface_error { + WL_SUBSURFACE_ERROR_BAD_SURFACE = 0, +}; +#endif + +#define WL_SUBSURFACE_DESTROY 0 +#define WL_SUBSURFACE_SET_POSITION 1 +#define WL_SUBSURFACE_PLACE_ABOVE 2 +#define WL_SUBSURFACE_PLACE_BELOW 3 +#define WL_SUBSURFACE_SET_SYNC 4 +#define WL_SUBSURFACE_SET_DESYNC 5 + + +#define WL_SUBSURFACE_DESTROY_SINCE_VERSION 1 +#define WL_SUBSURFACE_SET_POSITION_SINCE_VERSION 1 +#define WL_SUBSURFACE_PLACE_ABOVE_SINCE_VERSION 1 +#define WL_SUBSURFACE_PLACE_BELOW_SINCE_VERSION 1 +#define WL_SUBSURFACE_SET_SYNC_SINCE_VERSION 1 +#define WL_SUBSURFACE_SET_DESYNC_SINCE_VERSION 1 + +static inline void +wl_subsurface_set_user_data(struct wl_subsurface *wl_subsurface, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_subsurface, user_data); +} + +static inline void * +wl_subsurface_get_user_data(struct wl_subsurface *wl_subsurface) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_subsurface); +} + +static inline uint32_t +wl_subsurface_get_version(struct wl_subsurface *wl_subsurface) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_subsurface); +} + +static inline void +wl_subsurface_destroy(struct wl_subsurface *wl_subsurface) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_subsurface, + WL_SUBSURFACE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_subsurface), WL_MARSHAL_FLAG_DESTROY); +} + +static inline void +wl_subsurface_set_position(struct wl_subsurface *wl_subsurface, int32_t x, int32_t y) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_subsurface, + WL_SUBSURFACE_SET_POSITION, NULL, wl_proxy_get_version((struct wl_proxy *) wl_subsurface), 0, x, y); +} + +static inline void +wl_subsurface_place_above(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_subsurface, + WL_SUBSURFACE_PLACE_ABOVE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_subsurface), 0, sibling); +} + +static inline void +wl_subsurface_place_below(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_subsurface, + WL_SUBSURFACE_PLACE_BELOW, NULL, wl_proxy_get_version((struct wl_proxy *) wl_subsurface), 0, sibling); +} + +static inline void +wl_subsurface_set_sync(struct wl_subsurface *wl_subsurface) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_subsurface, + WL_SUBSURFACE_SET_SYNC, NULL, wl_proxy_get_version((struct wl_proxy *) wl_subsurface), 0); +} + +static inline void +wl_subsurface_set_desync(struct wl_subsurface *wl_subsurface) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_subsurface, + WL_SUBSURFACE_SET_DESYNC, NULL, wl_proxy_get_version((struct wl_proxy *) wl_subsurface), 0); +} + +#ifndef WL_FIXES_ERROR_ENUM +#define WL_FIXES_ERROR_ENUM +enum wl_fixes_error { + WL_FIXES_ERROR_INVALID_ACK_REMOVE = 0, +}; +#endif + +#define WL_FIXES_DESTROY 0 +#define WL_FIXES_DESTROY_REGISTRY 1 +#define WL_FIXES_ACK_GLOBAL_REMOVE 2 + + +#define WL_FIXES_DESTROY_SINCE_VERSION 1 +#define WL_FIXES_DESTROY_REGISTRY_SINCE_VERSION 1 +#define WL_FIXES_ACK_GLOBAL_REMOVE_SINCE_VERSION 2 + +static inline void +wl_fixes_set_user_data(struct wl_fixes *wl_fixes, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wl_fixes, user_data); +} + +static inline void * +wl_fixes_get_user_data(struct wl_fixes *wl_fixes) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wl_fixes); +} + +static inline uint32_t +wl_fixes_get_version(struct wl_fixes *wl_fixes) +{ + return wl_proxy_get_version((struct wl_proxy *) wl_fixes); +} + +static inline void +wl_fixes_destroy(struct wl_fixes *wl_fixes) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_fixes, + WL_FIXES_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_fixes), WL_MARSHAL_FLAG_DESTROY); +} + +static inline void +wl_fixes_destroy_registry(struct wl_fixes *wl_fixes, struct wl_registry *registry) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_fixes, + WL_FIXES_DESTROY_REGISTRY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_fixes), 0, registry); +} + +static inline void +wl_fixes_ack_global_remove(struct wl_fixes *wl_fixes, struct wl_registry *registry, uint32_t name) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wl_fixes, + WL_FIXES_ACK_GLOBAL_REMOVE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_fixes), 0, registry, name); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/tools/vr/third_party/wayland/wayland-client.h b/tools/vr/third_party/wayland/wayland-client.h new file mode 100644 index 0000000000..dd6676f6ab --- /dev/null +++ b/tools/vr/third_party/wayland/wayland-client.h @@ -0,0 +1,33 @@ +/* + * Copyright © 2008 Kristian Høgsberg + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +#ifndef WAYLAND_CLIENT_H +#define WAYLAND_CLIENT_H + +#include "wayland-client-core.h" +#include "wayland-client-protocol.h" + +#endif diff --git a/tools/vr/third_party/wayland/wayland-util.h b/tools/vr/third_party/wayland/wayland-util.h new file mode 100644 index 0000000000..d411ddd4f5 --- /dev/null +++ b/tools/vr/third_party/wayland/wayland-util.h @@ -0,0 +1,211 @@ +/* + * Copyright © 2008 Kristian Høgsberg + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +#ifndef WAYLAND_UTIL_H +#define WAYLAND_UTIL_H + +#include <math.h> +#include <stddef.h> +#include <inttypes.h> +#include <stdarg.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__GNUC__) && __GNUC__ >= 4 +#define WL_EXPORT __attribute__ ((visibility("default"))) +#else +#define WL_EXPORT +#endif + +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || (defined(__cplusplus) && __cplusplus >= 201402L) +#define WL_DEPRECATED [[deprecated]] +#elif defined(__GNUC__) && __GNUC__ >= 4 +#define WL_DEPRECATED __attribute__ ((deprecated)) +#else +#define WL_DEPRECATED +#endif + +#if defined(__GNUC__) && __GNUC__ >= 4 +#define WL_PRINTF(x, y) __attribute__((__format__(__printf__, x, y))) +#else +#define WL_PRINTF(x, y) +#endif + +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L +#define WL_TYPEOF(expr) typeof(expr) +#else +#define WL_TYPEOF(expr) __typeof__(expr) +#endif + +struct wl_object; + +#define WL_MAX_MESSAGE_SIZE 4096 + +struct wl_message { + const char *name; + const char *signature; + const struct wl_interface **types; +}; + +struct wl_interface { + const char *name; + int version; + int method_count; + const struct wl_message *methods; + int event_count; + const struct wl_message *events; +}; + +struct wl_list { + struct wl_list *prev; + struct wl_list *next; +}; + +void +wl_list_init(struct wl_list *list); + +void +wl_list_insert(struct wl_list *list, struct wl_list *elm); + +void +wl_list_remove(struct wl_list *elm); + +int +wl_list_length(const struct wl_list *list); + +int +wl_list_empty(const struct wl_list *list); + +void +wl_list_insert_list(struct wl_list *list, struct wl_list *other); + +#define wl_container_of(ptr, sample, member) \ + (WL_TYPEOF(sample))((char *)(ptr) - \ + offsetof(WL_TYPEOF(*sample), member)) + +#define wl_list_for_each(pos, head, member) \ + for (pos = wl_container_of((head)->next, pos, member); \ + &pos->member != (head); \ + pos = wl_container_of(pos->member.next, pos, member)) + +#define wl_list_for_each_safe(pos, tmp, head, member) \ + for (pos = wl_container_of((head)->next, pos, member), \ + tmp = wl_container_of((pos)->member.next, tmp, member); \ + &pos->member != (head); \ + pos = tmp, \ + tmp = wl_container_of(pos->member.next, tmp, member)) + +#define wl_list_for_each_reverse(pos, head, member) \ + for (pos = wl_container_of((head)->prev, pos, member); \ + &pos->member != (head); \ + pos = wl_container_of(pos->member.prev, pos, member)) + +#define wl_list_for_each_reverse_safe(pos, tmp, head, member) \ + for (pos = wl_container_of((head)->prev, pos, member), \ + tmp = wl_container_of((pos)->member.prev, tmp, member); \ + &pos->member != (head); \ + pos = tmp, \ + tmp = wl_container_of(pos->member.prev, tmp, member)) + +struct wl_array { + size_t size; + size_t alloc; + void *data; +}; + +void +wl_array_init(struct wl_array *array); + +void +wl_array_release(struct wl_array *array); + +void * +wl_array_add(struct wl_array *array, size_t size); + +int +wl_array_copy(struct wl_array *array, struct wl_array *source); + +#define wl_array_for_each(pos, array) \ + for (pos = (array)->data; \ + (array)->size != 0 && \ + (const char *) pos < ((const char *) (array)->data + (array)->size); \ + (pos)++) + +typedef int32_t wl_fixed_t; + +static inline double +wl_fixed_to_double(wl_fixed_t f) +{ + return f / 256.0; +} + +static inline wl_fixed_t +wl_fixed_from_double(double d) +{ + return (wl_fixed_t) (round(d * 256.0)); +} + +static inline int +wl_fixed_to_int(wl_fixed_t f) +{ + return f / 256; +} + +static inline wl_fixed_t +wl_fixed_from_int(int i) +{ + return i * 256; +} + +union wl_argument { + int32_t i; + uint32_t u; + wl_fixed_t f; + const char *s; + struct wl_object *o; + uint32_t n; + struct wl_array *a; + int32_t h; +}; + +typedef int (*wl_dispatcher_func_t)(const void *user_data, void *target, + uint32_t opcode, const struct wl_message *msg, + union wl_argument *args); + +typedef void (*wl_log_func_t)(const char *fmt, va_list args) WL_PRINTF(1, 0); + +enum wl_iterator_result { + WL_ITERATOR_STOP, + WL_ITERATOR_CONTINUE +}; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/tools/vr/third_party/wayland/wayland-version.h b/tools/vr/third_party/wayland/wayland-version.h new file mode 100644 index 0000000000..c7e04c2cd4 --- /dev/null +++ b/tools/vr/third_party/wayland/wayland-version.h @@ -0,0 +1,34 @@ +/* + * Copyright © 2012 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef WAYLAND_VERSION_H +#define WAYLAND_VERSION_H + +#define WAYLAND_VERSION_MAJOR 1 +#define WAYLAND_VERSION_MINOR 26 +#define WAYLAND_VERSION_MICRO 0 +#define WAYLAND_VERSION "1.26.0" + +#endif